!function(oc,vl){"object"==typeof exports&&"object"==typeof module?module.exports=vl():"function"==typeof define&&define.amd?define([],vl):"object"==typeof exports?exports.Plotly=vl():oc.Plotly=vl()}(self,function(){return function(){var oc={98847:function($,R,e){"use strict";var k=e(71828),A={"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 l in A){var T=l.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");k.addStyleRule(T,A[l])}},98222:function($,R,e){"use strict";$.exports=e(82887)},27206:function($,R,e){"use strict";$.exports=e(60822)},59893:function($,R,e){"use strict";$.exports=e(23381)},5224:function($,R,e){"use strict";$.exports=e(83832)},59509:function($,R,e){"use strict";$.exports=e(72201)},75557:function($,R,e){"use strict";$.exports=e(91815)},40338:function($,R,e){"use strict";$.exports=e(21462)},35080:function($,R,e){"use strict";$.exports=e(51319)},61396:function($,R,e){"use strict";$.exports=e(57516)},40549:function($,R,e){"use strict";$.exports=e(98128)},49866:function($,R,e){"use strict";$.exports=e(99442)},36089:function($,R,e){"use strict";$.exports=e(93740)},19548:function($,R,e){"use strict";$.exports=e(8729)},35831:function($,R,e){"use strict";$.exports=e(93814)},61039:function($,R,e){"use strict";$.exports=e(14382)},97040:function($,R,e){"use strict";$.exports=e(51759)},77986:function($,R,e){"use strict";$.exports=e(10421)},24296:function($,R,e){"use strict";$.exports=e(43102)},58872:function($,R,e){"use strict";$.exports=e(92165)},29626:function($,R,e){"use strict";$.exports=e(3325)},65591:function($,R,e){"use strict";$.exports=e(36071)},69738:function($,R,e){"use strict";$.exports=e(43905)},92650:function($,R,e){"use strict";$.exports=e(35902)},35630:function($,R,e){"use strict";$.exports=e(69816)},73434:function($,R,e){"use strict";$.exports=e(94507)},27909:function($,R,e){"use strict";var k=e(19548);k.register([e(27206),e(5224),e(58872),e(65591),e(69738),e(92650),e(49866),e(25743),e(6197),e(97040),e(85461),e(73434),e(54201),e(81299),e(47645),e(35630),e(77986),e(83043),e(93005),e(96881),e(4534),e(50581),e(40549),e(77900),e(47582),e(35080),e(21641),e(17280),e(5861),e(29626),e(10021),e(65317),e(96268),e(61396),e(35831),e(16122),e(46163),e(40344),e(40338),e(48131),e(36089),e(55334),e(75557),e(19440),e(99488),e(59893),e(97393),e(98222),e(61039),e(24296),e(66398),e(59509)]),$.exports=k},46163:function($,R,e){"use strict";$.exports=e(15154)},96881:function($,R,e){"use strict";$.exports=e(64943)},50581:function($,R,e){"use strict";$.exports=e(21164)},55334:function($,R,e){"use strict";$.exports=e(54186)},65317:function($,R,e){"use strict";$.exports=e(94873)},10021:function($,R,e){"use strict";$.exports=e(67618)},54201:function($,R,e){"use strict";$.exports=e(58810)},5861:function($,R,e){"use strict";$.exports=e(20593)},16122:function($,R,e){"use strict";$.exports=e(29396)},83043:function($,R,e){"use strict";$.exports=e(13551)},48131:function($,R,e){"use strict";$.exports=e(46858)},47582:function($,R,e){"use strict";$.exports=e(17988)},21641:function($,R,e){"use strict";$.exports=e(68868)},96268:function($,R,e){"use strict";$.exports=e(20467)},19440:function($,R,e){"use strict";$.exports=e(91271)},99488:function($,R,e){"use strict";$.exports=e(21461)},97393:function($,R,e){"use strict";$.exports=e(85956)},25743:function($,R,e){"use strict";$.exports=e(52979)},66398:function($,R,e){"use strict";$.exports=e(32275)},17280:function($,R,e){"use strict";$.exports=e(6419)},77900:function($,R,e){"use strict";$.exports=e(61510)},81299:function($,R,e){"use strict";$.exports=e(87619)},93005:function($,R,e){"use strict";$.exports=e(93601)},40344:function($,R,e){"use strict";$.exports=e(96595)},47645:function($,R,e){"use strict";$.exports=e(70954)},6197:function($,R,e){"use strict";$.exports=e(47462)},4534:function($,R,e){"use strict";$.exports=e(17659)},85461:function($,R,e){"use strict";$.exports=e(19990)},82884:function($){"use strict";$.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},50215:function($,R,e){"use strict";var k=e(82884),A=e(41940),l=e(85555),T=e(44467).templatedArray;e(24695),$.exports=T("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:A({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:k.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:k.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",l.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",l.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",l.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",l.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:A({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},3749:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(92605).draw;function T(d){k.filterVisible(d._fullLayout.annotations).forEach(function(t){var o=A.getFromId(d,t.xref),r=A.getFromId(d,t.yref),n=A.getRefType(t.xref),i=A.getRefType(t.yref);t._extremes={},"range"===n&&b(t,o),"range"===i&&b(t,r)})}function b(d,s){var t,o=s._id,r=o.charAt(0),n=d[r],i=d["a"+r],p=d["_"+r+"padplus"],f=d["_"+r+"padminus"],x={x:1,y:-1}[r]*d[r+"shift"],v=3*d.arrowsize*d.arrowwidth||0,g=v+x,y=v-x,h=3*d.startarrowsize*d.arrowwidth||0,m=h+x,w=h-x;if(d["a"+r+"ref"]===d[r+"ref"]){var u=A.findExtremes(s,[s.r2c(n)],{ppadplus:g,ppadminus:y}),S=A.findExtremes(s,[s.r2c(i)],{ppadplus:Math.max(p,m),ppadminus:Math.max(f,w)});t={min:[u.min[0],S.min[0]],max:[u.max[0],S.max[0]]}}else m=i?m+i:m,w=i?w-i:w,t=A.findExtremes(s,[s.r2c(n)],{ppadplus:Math.max(p,g,m),ppadminus:Math.max(f,y,w)});d._extremes[o]=t}$.exports=function(d){if(k.filterVisible(d._fullLayout.annotations).length&&d._fullData.length)return k.syncOrAsync([l,T],d)}},44317:function($,R,e){"use strict";var k=e(71828),A=e(73972),l=e(44467).arrayEditor;function T(d,s){var t,o,r,n,i,a,c,p=d._fullLayout.annotations,f=[],x=[],v=[],g=(s||[]).length;for(t=0;t<p.length;t++)if(n=(r=p[t]).clicktoshow){for(o=0;o<g;o++)if(a=(i=s[o]).xaxis,c=i.yaxis,a._id===r.xref&&c._id===r.yref&&a.d2r(i.x)===b(r._xclick,a)&&c.d2r(i.y)===b(r._yclick,c)){(r.visible?"onout"===n?x:v:f).push(t);break}o===g&&r.visible&&"onout"===n&&x.push(t)}return{on:f,off:x,explicitOff:v}}function b(d,s){return"log"===s.type?s.l2r(d):s.d2r(d)}$.exports={hasClickToShow:function(d,s){var t=T(d,s);return t.on.length>0||t.explicitOff.length>0},onClick:function(d,s){var t,o,r=T(d,s),n=r.on,i=r.off.concat(r.explicitOff),a={},c=d._fullLayout.annotations;if(n.length||i.length){for(t=0;t<n.length;t++)(o=l(d.layout,"annotations",c[n[t]])).modifyItem("visible",!0),k.extendFlat(a,o.getUpdateObj());for(t=0;t<i.length;t++)(o=l(d.layout,"annotations",c[i[t]])).modifyItem("visible",!1),k.extendFlat(a,o.getUpdateObj());return A.call("update",d,{},a)}}}},25625:function($,R,e){"use strict";var k=e(71828),A=e(7901);$.exports=function(l,T,b,d){d("opacity");var s=d("bgcolor"),t=d("bordercolor"),o=A.opacity(t);d("borderpad");var r=d("borderwidth"),n=d("showarrow");if(d("text",n?" ":b._dfltTitle.annotation),d("textangle"),k.coerceFont(d,"font",b.font),d("width"),d("align"),d("height")&&d("valign"),n){var i,a,c=d("arrowside");-1!==c.indexOf("end")&&(i=d("arrowhead"),a=d("arrowsize")),-1!==c.indexOf("start")&&(d("startarrowhead",i),d("startarrowsize",a)),d("arrowcolor",o?T.bordercolor:A.defaultLine),d("arrowwidth",2*(o&&r||1)),d("standoff"),d("startstandoff")}var p=d("hovertext"),f=b.hoverlabel||{};if(p){var x=d("hoverlabel.bgcolor",f.bgcolor||(A.opacity(s)?A.rgb(s):A.defaultLine)),v=d("hoverlabel.bordercolor",f.bordercolor||A.contrast(x));k.coerceFont(d,"hoverlabel.font",{family:f.font.family,size:f.font.size,color:f.font.color||v})}d("captureevents",!!p)}},94128:function($,R,e){"use strict";var k=e(92770),A=e(58163);$.exports=function(l,T,b,d){T=T||{};var s="log"===b&&"linear"===T.type;if(s||"linear"===b&&"log"===T.type)for(var o,r,n=l._fullLayout.annotations,i=T._id.charAt(0),a=0;a<n.length;a++)r="annotations["+a+"].",(o=n[a])[i+"ref"]===T._id&&c(i),o["a"+i+"ref"]===T._id&&c("a"+i);function c(p){var f=o[p],x=null;x=s?A(f,T.range):Math.pow(10,f),k(x)||(x=null),d(r+p,x)}}},84046:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(85501),T=e(25625),b=e(50215);function d(s,t,o){function r(S,_){return k.coerce(s,t,b,S,_)}var n=r("visible"),i=r("clicktoshow");if(n||i){T(s,t,o,r);for(var a=t.showarrow,c=["x","y"],p=[-10,-30],f={_fullLayout:o},x=0;x<2;x++){var v=c[x],g=A.coerceRef(s,t,f,v,"","paper");if("paper"!==g&&A.getFromId(f,g)._annIndices.push(t._index),A.coercePosition(t,f,r,g,v,.5),a){var y="a"+v,h=A.coerceRef(s,t,f,y,"pixel",["pixel","paper"]);"pixel"!==h&&h!==g&&(h=t[y]="pixel"),A.coercePosition(t,f,r,h,y,"pixel"===h?p[x]:.4)}r(v+"anchor"),r(v+"shift")}if(k.noneOrAll(s,t,["x","y"]),a&&k.noneOrAll(s,t,["ax","ay"]),i){var w=r("xclick"),u=r("yclick");t._xclick=void 0===w?t.x:A.cleanPosition(w,f,t.xref),t._yclick=void 0===u?t.y:A.cleanPosition(u,f,t.yref)}}}$.exports=function(s,t){l(s,t,{name:"annotations",handleItemDefaults:d})}},92605:function($,R,e){"use strict";var k=e(39898),A=e(73972),l=e(74875),T=e(71828),b=T.strTranslate,d=e(89298),s=e(7901),t=e(91424),o=e(30211),r=e(63893),n=e(6964),i=e(28569),a=e(44467).arrayEditor,c=e(13011);function p(v,g){var y=v._fullLayout.annotations[g]||{},h=d.getFromId(v,y.xref),m=d.getFromId(v,y.yref);h&&h.setScale(),m&&m.setScale(),x(v,y,g,!1,h,m)}function f(v,g,y,h,m){var w=m[y],u=m[y+"ref"],S=-1!==y.indexOf("y"),_="domain"===d.getRefType(u),E=S?h.h:h.w;return v?_?w+(S?-g:g)/v._length:v.p2r(v.r2p(w)+g):w+(S?-g:g)/E}function x(v,g,y,h,m,w){var u,S,_=v._fullLayout,E=v._fullLayout._size,L=v._context.edits;h?(u="annotation-"+h,S=h+".annotations"):(u="annotation",S="annotations");var C=a(v.layout,S,g),P=C.modifyBase,I=C.modifyItem,U=C.getUpdateObj;_._infolayer.selectAll("."+u+'[data-index="'+y+'"]').remove();var z="clip"+_._uid+"_ann"+y;if(g._input&&!1!==g.visible){var H={x:{},y:{}},F=+g.textangle||0,N=_._infolayer.append("g").classed(u,!0).attr("data-index",String(y)).style("opacity",g.opacity),B=N.append("g").classed("annotation-text-g",!0),j=L[g.showarrow?"annotationTail":"annotationPosition"],J=g.captureevents||L.annotationText||j,G=B.append("g").style("pointer-events",J?"all":null).call(n,"pointer").on("click",function(){v._dragging=!1,v.emit("plotly_clickannotation",me(k.event))});g.hovertext&&G.on("mouseover",function(){var ve=g.hoverlabel,Pe=ve.font,xe=this.getBoundingClientRect(),ke=v.getBoundingClientRect();o.loneHover({x0:xe.left-ke.left,x1:xe.right-ke.left,y:(xe.top+xe.bottom)/2-ke.top,text:g.hovertext,color:ve.bgcolor,borderColor:ve.bordercolor,fontFamily:Pe.family,fontSize:Pe.size,fontColor:Pe.color},{container:_._hoverlayer.node(),outerContainer:_._paper.node(),gd:v})}).on("mouseout",function(){o.loneUnhover(_._hoverlayer.node())});var V=g.borderwidth,X=V+g.borderpad,K=G.append("rect").attr("class","bg").style("stroke-width",V+"px").call(s.stroke,g.bordercolor).call(s.fill,g.bgcolor),re=g.width||g.height,ee=_._topclips.selectAll("#"+z).data(re?[0]:[]);ee.enter().append("clipPath").classed("annclip",!0).attr("id",z).append("rect"),ee.exit().remove();var ie=g.font,oe=_._meta?T.templateString(g.text,_._meta):g.text,ce=G.append("text").classed("annotation-text",!0).text(oe);L.annotationText?ce.call(r.makeEditable,{delegate:G,gd:v}).call(de).on("edit",function(ve){g.text=ve,this.call(de),I("text",ve),m&&m.autorange&&P(m._name+".autorange",!0),w&&w.autorange&&P(w._name+".autorange",!0),A.call("_guiRelayout",v,U())}):ce.call(de)}else k.selectAll("#"+z).remove();function me(ve){var Pe={index:y,annotation:g._input,fullAnnotation:g,event:ve};return h&&(Pe.subplotId=h),Pe}function de(ve){return ve.call(t.font,ie).attr({"text-anchor":{left:"start",right:"end"}[g.align]||"middle"}),r.convertToTspans(ve,v,he),ve}function he(){var ve=ce.selectAll("a");1===ve.size()&&ve.text()===ce.text()&&G.insert("a",":first-child").attr({"xlink:xlink:href":ve.attr("xlink:href"),"xlink:xlink:show":ve.attr("xlink:show")}).style({cursor:"pointer"}).node().appendChild(K.node());var Pe=G.select(".annotation-text-math-group"),xe=!Pe.empty(),ke=t.bBox((xe?Pe:ce).node()),Ae=ke.width,Te=ke.height,Q=g.width||Ae,se=g.height||Te,fe=Math.round(Q+2*X),ye=Math.round(se+2*X);function Me(At,ht){return"auto"===ht&&(ht=At<.3333333333333333?"left":At>.6666666666666666?"right":"center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[ht]}for(var Ie=!1,Ce=["x","y"],Re=0;Re<Ce.length;Re++){var le,ge,_e,Fe,Ve,He=Ce[Re],nt=g[He+"ref"]||He,tt=g["a"+He+"ref"],ot={x:m,y:w}[He],dt=(F+("x"===He?0:-90))*Math.PI/180,kt=fe*Math.cos(dt),mt=ye*Math.sin(dt),wt=Math.abs(kt)+Math.abs(mt),Lt=g[He+"anchor"],Ct=g[He+"shift"]*("x"===He?1:-1),It=H[He],Ut=d.getRefType(nt);if(ot&&"domain"!==Ut){var Rt=ot.r2fraction(g[He]);(Rt<0||Rt>1)&&(tt===nt?((Rt=ot.r2fraction(g["a"+He]))<0||Rt>1)&&(Ie=!0):Ie=!0),le=ot._offset+ot.r2p(g[He]),Fe=.5}else{var Ge="domain"===Ut;"x"===He?(_e=g[He],le=Ge?ot._offset+ot._length*_e:le=E.l+E.w*_e):(_e=1-g[He],le=Ge?ot._offset+ot._length*_e:le=E.t+E.h*_e),Fe=g.showarrow?.5:_e}if(g.showarrow){It.head=le;var We=g["a"+He];if(Ve=kt*Me(.5,g.xanchor)-mt*Me(.5,g.yanchor),tt===nt){var Be=d.getRefType(tt);"domain"===Be?("y"===He&&(We=1-We),It.tail=ot._offset+ot._length*We):It.tail="paper"===Be?"y"===He?E.t+E.h*(We=1-We):E.l+E.w*We:ot._offset+ot.r2p(We),ge=Ve}else It.tail=le+We,ge=Ve+We;It.text=It.tail+Ve;var Ye=_["x"===He?"width":"height"];if("paper"===nt&&(It.head=T.constrain(It.head,1,Ye-1)),"pixel"===tt){var rt=-Math.max(It.tail-3,It.text),Se=Math.min(It.tail+3,It.text)-Ye;rt>0?(It.tail+=rt,It.text+=rt):Se>0&&(It.tail-=Se,It.text-=Se)}It.tail+=Ct,It.head+=Ct}else ge=Ve=wt*Me(Fe,Lt),It.text=le+Ve;It.text+=Ct,Ve+=Ct,g["_"+He+"padplus"]=wt/2+(ge+=Ct),g["_"+He+"padminus"]=wt/2-ge,g["_"+He+"size"]=wt,g["_"+He+"shift"]=Ve}if(Ie)G.remove();else{var ze=0,Ke=0;"left"!==g.align&&(ze=(Q-Ae)*("center"===g.align?.5:1)),"top"!==g.valign&&(Ke=(se-Te)*("middle"===g.valign?.5:1)),xe?Pe.select("svg").attr({x:X+ze-1,y:X+Ke}).call(t.setClipUrl,re?z:null,v):ce.call(r.positionText,X+ze-ke.left,X+Ke-ke.top).call(t.setClipUrl,re?z:null,v),ee.select("rect").call(t.setRect,X,X,Q,se),K.call(t.setRect,V/2,V/2,fe-V,ye-V),G.call(t.setTranslate,Math.round(H.x.text-fe/2),Math.round(H.y.text-ye/2)),B.attr({transform:"rotate("+F+","+H.x.text+","+H.y.text+")"});var Tt,Et=function(At,ht){N.selectAll(".annotation-arrow-g").remove();var pt=H.x.head,gt=H.y.head,Pt=H.x.tail+At,Ot=H.y.tail+ht,Ht=H.x.text+At,jt=H.y.text+ht,Nt=T.rotationXYMatrix(F,Ht,jt),Gt=T.apply2DTransform(Nt),un=T.apply2DTransform2(Nt),pn=+K.attr("width"),Kt=+K.attr("height"),wn=Ht-.5*pn,Bn=wn+pn,vn=jt-.5*Kt,cn=vn+Kt,dn=[[wn,vn,wn,cn],[wn,cn,Bn,cn],[Bn,cn,Bn,vn],[Bn,vn,wn,vn]].map(un);if(!dn.reduce(function(Zn,qn){return Zn^!!T.segmentsIntersect(pt,gt,pt+1e6,gt+1e6,qn[0],qn[1],qn[2],qn[3])},!1)){dn.forEach(function(Zn){var qn=T.segmentsIntersect(Pt,Ot,pt,gt,Zn[0],Zn[1],Zn[2],Zn[3]);qn&&(Pt=qn.x,Ot=qn.y)});var sn=g.arrowwidth,hn=g.arrowcolor,En=g.arrowside,Mn=N.append("g").style({opacity:s.opacity(hn)}).classed("annotation-arrow-g",!0),Rn=Mn.append("path").attr("d","M"+Pt+","+Ot+"L"+pt+","+gt).style("stroke-width",sn+"px").call(s.stroke,s.rgb(hn));if(c(Rn,En,g),L.annotationPosition&&Rn.node().parentNode&&!h){var Nn=pt,Fn=gt;if(g.standoff){var rr=Math.sqrt(Math.pow(pt-Pt,2)+Math.pow(gt-Ot,2));Nn+=g.standoff*(Pt-pt)/rr,Fn+=g.standoff*(Ot-gt)/rr}var $n,mr,fr=Mn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(Pt-Nn)+","+(Ot-Fn),transform:b(Nn,Fn)}).style("stroke-width",sn+6+"px").call(s.stroke,"rgba(0,0,0,0)").call(s.fill,"rgba(0,0,0,0)");i.init({element:fr.node(),gd:v,prepFn:function(){var Zn=t.getTranslate(G);$n=Zn.x,mr=Zn.y,m&&m.autorange&&P(m._name+".autorange",!0),w&&w.autorange&&P(w._name+".autorange",!0)},moveFn:function(Zn,qn){var ur=Gt($n,mr),Zt=ur[0]+Zn,nn=ur[1]+qn;G.call(t.setTranslate,Zt,nn),I("x",f(m,Zn,"x",E,g)),I("y",f(w,qn,"y",E,g)),g.axref===g.xref&&I("ax",f(m,Zn,"ax",E,g)),g.ayref===g.yref&&I("ay",f(w,qn,"ay",E,g)),Mn.attr("transform",b(Zn,qn)),B.attr({transform:"rotate("+F+","+Zt+","+nn+")"})},doneFn:function(){A.call("_guiRelayout",v,U());var Zn=document.querySelector(".js-notes-box-panel");Zn&&Zn.redraw(Zn.selectedObj)}})}}};g.showarrow&&Et(0,0),j&&i.init({element:G.node(),gd:v,prepFn:function(){Tt=B.attr("transform")},moveFn:function(At,ht){var pt="pointer";if(g.showarrow)I("ax",g.axref===g.xref?f(m,At,"ax",E,g):g.ax+At),I("ay",g.ayref===g.yref?f(w,ht,"ay",E.w,g):g.ay+ht),Et(At,ht);else{if(h)return;var gt,Pt;if(m)gt=f(m,At,"x",E,g);else{var Ot=g._xsize/E.w;gt=i.align(g.x+(g._xshift-g.xshift)/E.w-Ot/2+At/E.w,Ot,0,1,g.xanchor)}if(w)Pt=f(w,ht,"y",E,g);else{var jt=g._ysize/E.h;Pt=i.align(g.y-(g._yshift+g.yshift)/E.h-jt/2-ht/E.h,jt,0,1,g.yanchor)}I("x",gt),I("y",Pt),m&&w||(pt=i.getCursor(m?.5:gt,w?.5:Pt,g.xanchor,g.yanchor))}B.attr({transform:b(At,ht)+Tt}),n(G,pt)},clickFn:function(At,ht){g.captureevents&&v.emit("plotly_clickannotation",me(ht))},doneFn:function(){n(G),A.call("_guiRelayout",v,U());var At=document.querySelector(".js-notes-box-panel");At&&At.redraw(At.selectedObj)}})}}}$.exports={draw:function(v){var g=v._fullLayout;g._infolayer.selectAll(".annotation").remove();for(var y=0;y<g.annotations.length;y++)g.annotations[y].visible&&p(v,y);return l.previousPromises(v)},drawOne:p,drawRaw:x}},13011:function($,R,e){"use strict";var k=e(39898),A=e(7901),l=e(82884),T=e(71828),b=T.strScale,d=T.strRotate,s=T.strTranslate;$.exports=function(t,o,r){var n,i,a,c,p=t.node(),f=l[r.arrowhead||0],x=l[r.startarrowhead||0],v=(r.arrowwidth||1)*(r.arrowsize||1),g=(r.arrowwidth||1)*(r.startarrowsize||1),y=o.indexOf("start")>=0,h=o.indexOf("end")>=0,m=f.backoff*v+r.standoff,w=x.backoff*g+r.startstandoff;if("line"===p.nodeName){n={x:+t.attr("x1"),y:+t.attr("y1")},i={x:+t.attr("x2"),y:+t.attr("y2")};var u=n.x-i.x,S=n.y-i.y;if(c=(a=Math.atan2(S,u))+Math.PI,m&&w&&m+w>Math.sqrt(u*u+S*S))return void N();if(m){if(m*m>u*u+S*S)return void N();var _=m*Math.cos(a),E=m*Math.sin(a);i.x+=_,i.y+=E,t.attr({x2:i.x,y2:i.y})}if(w){if(w*w>u*u+S*S)return void N();var L=w*Math.cos(a),C=w*Math.sin(a);n.x-=L,n.y-=C,t.attr({x1:n.x,y1:n.y})}}else if("path"===p.nodeName){var P=p.getTotalLength(),I="";if(P<m+w)return void N();var U=p.getPointAtLength(0),z=p.getPointAtLength(.1);a=Math.atan2(U.y-z.y,U.x-z.x),n=p.getPointAtLength(Math.min(w,P)),I="0px,"+w+"px,";var H=p.getPointAtLength(P),F=p.getPointAtLength(P-.1);c=Math.atan2(H.y-F.y,H.x-F.x),i=p.getPointAtLength(Math.max(0,P-m)),t.style("stroke-dasharray",I+=P-(I?w+m:m)+"px,"+P+"px")}function N(){t.style("stroke-dasharray","0px,100px")}function B(j,J,G,V){j.path&&(j.noRotate&&(G=0),k.select(p.parentNode).append("path").attr({class:t.attr("class"),d:j.path,transform:s(J.x,J.y)+d(180*G/Math.PI)+b(V)}).style({fill:A.rgb(r.arrowcolor),"stroke-width":0}))}y&&B(x,n,a,g),h&&B(f,i,c,v)}},32745:function($,R,e){"use strict";var k=e(92605),A=e(44317);$.exports={moduleType:"component",name:"annotations",layoutAttributes:e(50215),supplyLayoutDefaults:e(84046),includeBasePlot:e(76325)("annotations"),calcAutorange:e(3749),draw:k.draw,drawOne:k.drawOne,drawRaw:k.drawRaw,hasClickToShow:A.hasClickToShow,onClick:A.onClick,convertCoords:e(94128)}},26997:function($,R,e){"use strict";var k=e(50215),A=e(30962).overrideAll,l=e(44467).templatedArray;$.exports=A(l("annotation",{visible:k.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:k.xanchor,xshift:k.xshift,yanchor:k.yanchor,yshift:k.yshift,text:k.text,textangle:k.textangle,font:k.font,width:k.width,height:k.height,opacity:k.opacity,align:k.align,valign:k.valign,bgcolor:k.bgcolor,bordercolor:k.bordercolor,borderpad:k.borderpad,borderwidth:k.borderwidth,showarrow:k.showarrow,arrowcolor:k.arrowcolor,arrowhead:k.arrowhead,startarrowhead:k.startarrowhead,arrowside:k.arrowside,arrowsize:k.arrowsize,startarrowsize:k.startarrowsize,arrowwidth:k.arrowwidth,standoff:k.standoff,startstandoff:k.startstandoff,hovertext:k.hovertext,hoverlabel:k.hoverlabel,captureevents:k.captureevents}),"calc","from-root")},5485:function($,R,e){"use strict";var k=e(71828),A=e(89298);function l(T,b){var d=b.fullSceneLayout.domain,s=b.fullLayout._size,t={pdata:null,type:"linear",autorange:!1,range:[-1/0,1/0]};T._xa={},k.extendFlat(T._xa,t),A.setConvert(T._xa),T._xa._offset=s.l+d.x[0]*s.w,T._xa.l2p=function(){return.5*(1+T._pdata[0]/T._pdata[3])*s.w*(d.x[1]-d.x[0])},T._ya={},k.extendFlat(T._ya,t),A.setConvert(T._ya),T._ya._offset=s.t+(1-d.y[1])*s.h,T._ya.l2p=function(){return.5*(1-T._pdata[1]/T._pdata[3])*s.h*(d.y[1]-d.y[0])}}$.exports=function(T){for(var b=T.fullSceneLayout.annotations,d=0;d<b.length;d++)l(b[d],T);T.fullLayout._infolayer.selectAll(".annotation-"+T.id).remove()}},20226:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(85501),T=e(25625),b=e(26997);function d(s,t,o,r){function n(a,c){return k.coerce(s,t,b,a,c)}function i(a){var c=a+"axis",p={_fullLayout:{}};return p._fullLayout[c]=o[c],A.coercePosition(t,p,n,a,a,.5)}n("visible")&&(T(s,t,r.fullLayout,n),i("x"),i("y"),i("z"),k.noneOrAll(s,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",n("xanchor"),n("yanchor"),n("xshift"),n("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",n("ax",-10),n("ay",-30),k.noneOrAll(s,t,["ax","ay"])))}$.exports=function(s,t,o){l(s,t,{name:"annotations",handleItemDefaults:d,fullLayout:o.fullLayout})}},82188:function($,R,e){"use strict";var k=e(92605).drawRaw,A=e(63538),l=["x","y","z"];$.exports=function(T){for(var b=T.fullSceneLayout,d=T.dataScale,s=b.annotations,t=0;t<s.length;t++){for(var o=s[t],r=!1,n=0;n<3;n++){var i=l[n],c=b[i+"axis"].r2fraction(o[i]);if(c<0||c>1){r=!0;break}}r?T.fullLayout._infolayer.select(".annotation-"+T.id+'[data-index="'+t+'"]').remove():(o._pdata=A(T.glplot.cameraParams,[b.xaxis.r2l(o.x)*d[0],b.yaxis.r2l(o.y)*d[1],b.zaxis.r2l(o.z)*d[2]]),k(T.graphDiv,o,t,T.id,o._xa,o._ya))}}},2468:function($,R,e){"use strict";var k=e(73972),A=e(71828);$.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(26997)}}},layoutAttributes:e(26997),handleDefaults:e(20226),includeBasePlot:function(l,T){var b=k.subplotsRegistry.gl3d;if(b)for(var d=b.attrRegex,s=Object.keys(l),t=0;t<s.length;t++){var o=s[t];d.test(o)&&(l[o].annotations||[]).length&&(A.pushUnique(T._basePlotModules,b),A.pushUnique(T._subplots.gl3d,o))}},convert:e(5485),draw:e(82188)}},7561:function($,R,e){"use strict";$.exports=e(63489),e(94338),e(3961),e(38751),e(86825),e(37715),e(99384),e(43805),e(88874),e(83290),e(29108),e(55422),e(94320),e(31320),e(51367),e(21457)},72201:function($,R,e){"use strict";var k=e(7561),A=e(71828),l=e(50606),T=l.EPOCHJD,b=l.ONEDAY,d={valType:"enumerated",values:A.sortObjectKeys(k.calendars),editType:"calc",dflt:"gregorian"},s=function(v,g,y,h){var m={};return m[y]=d,A.coerce(v,g,m,y,h)},t="##",o={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:t,w:t,c:{0:"D M d %X yyyy","-":"D M d %X yyyy"},x:{0:"mm/dd/yyyy","-":"mm/dd/yyyy"}},r={};function n(v){return r[v]||(r[v]=k.instance(v))}function i(v){return A.extendFlat({},d,{description:v})}function a(v){return"Sets the calendar system to use with `"+v+"` date data."}var c={xcalendar:i(a("x"))},p=A.extendFlat({},c,{ycalendar:i(a("y"))}),f=A.extendFlat({},p,{zcalendar:i(a("z"))}),x=i(["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(" "));$.exports={moduleType:"component",name:"calendars",schema:{traces:{scatter:p,bar:p,box:p,heatmap:p,contour:p,histogram:p,histogram2d:p,histogram2dcontour:p,scatter3d:f,surface:f,mesh3d:f,scattergl:p,ohlc:c,candlestick:c},layout:{calendar:i(["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:i(["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:i(["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:d,handleDefaults:s,handleTraceDefaults:function(v,g,y,h){for(var m=0;m<y.length;m++)s(v,g,y[m]+"calendar",h.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:n,worldCalFmt:function(v,g,y){for(var h,m,w,u,S,_=Math.floor((g+.05)/b)+T,E=n(y).fromJD(_),L=0;-1!==(L=v.indexOf("%",L));)"0"===(h=v.charAt(L+1))||"-"===h||"_"===h?(w=3,m=v.charAt(L+2),"_"===h&&(h="-")):(m=h,h="0",w=2),(u=o[m])?(S=u===t?t:E.formatDate(u[h]),v=v.substr(0,L)+S+v.substr(L+w),L+=S.length):L+=w;return v}}},22399:function($,R){"use strict";R.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"],R.defaultLine="#444",R.lightLine="#eee",R.background="#fff",R.borderLine="#BEC8D9",R.lightFraction=90.9090909090909},7901:function($,R,e){"use strict";var k=e(84267),A=e(92770),l=e(73627).isTypedArray,T=$.exports={},b=e(22399);T.defaults=b.defaults;var d=T.defaultLine=b.defaultLine;T.lightLine=b.lightLine;var s=T.background=b.background;function t(o){if(A(o)||"string"!=typeof o)return o;var r=o.trim();if("rgb"!==r.substr(0,3))return o;var n=r.match(/^rgba?\s*\(([^()]*)\)$/);if(!n)return o;var i=n[1].trim().split(/\s*[\s,]\s*/),a="a"===r.charAt(3)&&4===i.length;if(!a&&3!==i.length)return o;for(var c=0;c<i.length;c++){if(!(i[c].length&&(i[c]=Number(i[c]),i[c]>=0)))return o;if(3===c)i[c]>1&&(i[c]=1);else if(i[c]>=1)return o}var p=Math.round(255*i[0])+", "+Math.round(255*i[1])+", "+Math.round(255*i[2]);return a?"rgba("+p+", "+i[3]+")":"rgb("+p+")"}T.tinyRGB=function(o){var r=o.toRgb();return"rgb("+Math.round(r.r)+", "+Math.round(r.g)+", "+Math.round(r.b)+")"},T.rgb=function(o){return T.tinyRGB(k(o))},T.opacity=function(o){return o?k(o).getAlpha():0},T.addOpacity=function(o,r){var n=k(o).toRgb();return"rgba("+Math.round(n.r)+", "+Math.round(n.g)+", "+Math.round(n.b)+", "+r+")"},T.combine=function(o,r){var n=k(o).toRgb();if(1===n.a)return k(o).toRgbString();var i=k(r||s).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};return k({r:a.r*(1-n.a)+n.r*n.a,g:a.g*(1-n.a)+n.g*n.a,b:a.b*(1-n.a)+n.b*n.a}).toRgbString()},T.contrast=function(o,r,n){var i=k(o);return 1!==i.getAlpha()&&(i=k(T.combine(o,s))),(i.isDark()?r?i.lighten(r):s:n?i.darken(n):d).toString()},T.stroke=function(o,r){var n=k(r);o.style({stroke:T.tinyRGB(n),"stroke-opacity":n.getAlpha()})},T.fill=function(o,r){var n=k(r);o.style({fill:T.tinyRGB(n),"fill-opacity":n.getAlpha()})},T.clean=function(o){if(o&&"object"==typeof o){var r,n,i,a,c=Object.keys(o);for(r=0;r<c.length;r++)if(a=o[i=c[r]],"color"===i.substr(i.length-5))if(Array.isArray(a))for(n=0;n<a.length;n++)a[n]=t(a[n]);else o[i]=t(a);else if("colorscale"===i.substr(i.length-10)&&Array.isArray(a))for(n=0;n<a.length;n++)Array.isArray(a[n])&&(a[n][1]=t(a[n][1]));else if(Array.isArray(a)){var p=a[0];if(!Array.isArray(p)&&p&&"object"==typeof p)for(n=0;n<a.length;n++)T.clean(a[n])}else a&&"object"==typeof a&&!l(a)&&T.clean(a)}}},63583:function($,R,e){"use strict";var k=e(13838),A=e(41940),l=e(1426).extendFlat,T=e(30962).overrideAll;$.exports=T({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number",min:-2,max:3},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number",min:-2,max:3},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:k.linecolor,outlinewidth:k.linewidth,bordercolor:k.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:k.minor.tickmode,nticks:k.nticks,tick0:k.tick0,dtick:k.dtick,tickvals:k.tickvals,ticktext:k.ticktext,ticks:l({},k.ticks,{dflt:""}),ticklabeloverflow:l({},k.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:k.ticklen,tickwidth:k.tickwidth,tickcolor:k.tickcolor,ticklabelstep:k.ticklabelstep,showticklabels:k.showticklabels,tickfont:A({}),tickangle:k.tickangle,tickformat:k.tickformat,tickformatstops:k.tickformatstops,tickprefix:k.tickprefix,showtickprefix:k.showtickprefix,ticksuffix:k.ticksuffix,showticksuffix:k.showticksuffix,separatethousands:k.separatethousands,exponentformat:k.exponentformat,minexponent:k.minexponent,showexponent:k.showexponent,title:{text:{valType:"string"},font:A({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:A({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},30939:function($){"use strict";$.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},62499:function($,R,e){"use strict";var k=e(71828),A=e(44467),l=e(26218),T=e(38701),b=e(96115),d=e(89426),s=e(63583);$.exports=function(t,o,r){var n=A.newContainer(o,"colorbar"),i=t.colorbar||{};function a(S,_){return k.coerce(i,n,s,S,_)}var c=r.margin||{t:0,b:0,l:0,r:0},p=r.width-c.l-c.r,f=r.height-c.t-c.b,x="v"===a("orientation"),v=a("thicknessmode");a("thickness","fraction"===v?30/(x?p:f):30);var g=a("lenmode");a("len","fraction"===g?1:x?f:p),a("x",x?1.02:.5),a("xanchor",x?"left":"center"),a("xpad"),a("y",x?.5:1.02),a("yanchor",x?"middle":"bottom"),a("ypad"),k.noneOrAll(i,n,["x","y"]),a("outlinecolor"),a("outlinewidth"),a("bordercolor"),a("borderwidth"),a("bgcolor");var y=k.coerce(i,n,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:x?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");a("ticklabeloverflow",-1!==y.indexOf("inside")?"hide past domain":"hide past div"),l(i,n,a,"linear");var h=r.font,m={outerTicks:!1,font:h};-1!==y.indexOf("inside")&&(m.bgColor="black"),d(i,n,a,"linear",m),b(i,n,a,"linear",m),T(i,n,a,"linear",m),a("title.text",r._dfltTitle.colorbar);var w=n.tickfont,u=k.extendFlat({},w,{color:h.color,size:k.bigFont(w.size)});k.coerceFont(a,"title.font",u),a("title.side",x?"top":"right")}},98981:function($,R,e){"use strict";var k=e(39898),A=e(84267),l=e(74875),T=e(73972),b=e(89298),d=e(28569),s=e(71828),t=s.strTranslate,o=e(1426).extendFlat,r=e(6964),n=e(91424),i=e(7901),a=e(92998),c=e(63893),p=e(52075).flipScale,f=e(71453),x=e(52830),v=e(13838),g=e(18783),y=g.LINE_SPACING,h=g.FROM_TL,m=g.FROM_BR,w=e(30939).cn;$.exports={draw:function(u){var S=u._fullLayout._infolayer.selectAll("g."+w.colorbar).data(function(_){var E,L,C,P,I=_._fullLayout,U=_.calcdata,z=[];function H(re){return o(re,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function F(){"function"==typeof P.calc?P.calc(_,C,E):(E._fillgradient=L.reversescale?p(L.colorscale):L.colorscale,E._zrange=[L[P.min],L[P.max]])}for(var N=0;N<U.length;N++){var j=(C=U[N][0].trace)._module.colorbar;if(!0===C.visible&&j)for(var J=Array.isArray(j),G=J?j:[j],V=0;V<G.length;V++){var W=(P=G[V]).container;(L=W?C[W]:C)&&L.showscale&&((E=H(L.colorbar))._id="cb"+C.uid+(J&&W?"-"+W:""),E._traceIndex=C.index,E._propPrefix=(W?W+".":"")+"colorbar.",E._meta=C._meta,F(),z.push(E))}}for(var X in I._colorAxes)if((L=I[X]).showscale){var K=I._colorAxes[X];(E=H(L.colorbar))._id="cb"+X,E._propPrefix=X+".colorbar.",E._meta=I._meta,P={min:"cmin",max:"cmax"},"heatmap"!==K[0]&&(P.calc=(C=K[1])._module.colorbar.calc),F(),z.push(E)}return z}(u),function(_){return _._id});S.enter().append("g").attr("class",function(_){return _._id}).classed(w.colorbar,!0),S.each(function(_){var E=k.select(this);s.ensureSingle(E,"rect",w.cbbg),s.ensureSingle(E,"g",w.cbfills),s.ensureSingle(E,"g",w.cblines),s.ensureSingle(E,"g",w.cbaxis,function(C){C.classed(w.crisp,!0)}),s.ensureSingle(E,"g",w.cbtitleunshift,function(C){C.append("g").classed(w.cbtitle,!0)}),s.ensureSingle(E,"rect",w.cboutline);var C,P,I,U,z,H,F,N,L=function(C,P,I){var U="v"===P.orientation,z=P.len,H=P.lenmode,F=P.thickness,N=P.thicknessmode,B=P.outlinewidth,j=P.borderwidth,J=P.bgcolor,G=P.xanchor,V=P.yanchor,W=P.xpad,X=P.ypad,K=P.x,re=U?P.y:1-P.y,ee=I._fullLayout,ie=ee._size,oe=P._fillcolor,ce=P._line,me=P.title,de=me.side,he=P._zrange||k.extent(("function"==typeof oe?oe:ce.color).domain()),ve="function"==typeof ce.color?ce.color:function(){return ce.color},Pe="function"==typeof oe?oe:function(){return oe},xe=P._levels,ke=function(Ut,Rt,Ge){var We,Be,Ye=Rt._levels,rt=[],Se=[],ze=Ye.end+Ye.size/100,Ke=Ye.size,st=1.001*Ge[0]-.001*Ge[1],ct=1.001*Ge[1]-.001*Ge[0];for(Be=0;Be<1e5&&(We=Ye.start+Be*Ke,!(Ke>0?We>=ze:We<=ze));Be++)We>st&&We<ct&&rt.push(We);if(Rt._fillgradient)Se=[0];else if("function"==typeof Rt._fillcolor){var Tt=Rt._filllevels;if(Tt)for(ze=Tt.end+Tt.size/100,Ke=Tt.size,Be=0;Be<1e5&&(We=Tt.start+Be*Ke,!(Ke>0?We>=ze:We<=ze));Be++)We>Ge[0]&&We<Ge[1]&&Se.push(We);else(Se=rt.map(function(Et){return Et-Ye.size/2})).push(Se[Se.length-1]+Ye.size)}else Rt._fillcolor&&"string"==typeof Rt._fillcolor&&(Se=[0]);return Ye.size<0&&(rt.reverse(),Se.reverse()),{line:rt,fill:Se}}(0,P,he),Ae=ke.fill,Te=ke.line,Q=Math.round(F*("fraction"===N?U?ie.w:ie.h:1)),se=Q/(U?ie.w:ie.h),fe=Math.round(z*("fraction"===H?U?ie.h:ie.w:1)),ye=fe/(U?ie.h:ie.w),Me=Math.round(U?K*ie.w+W:re*ie.h+X),Ie={center:.5,right:1}[G]||0,Ce={top:1,middle:.5}[V]||0,Re=U?K-Ie*se:re-Ce*se,le=U?re-Ce*ye:K-Ie*ye,ge=Math.round(U?ie.h*(1-le):ie.w*le);P._lenFrac=ye,P._thickFrac=se,P._uFrac=Re,P._vFrac=le;var _e=P._axis=function(Ut,Rt,Ge){var We=Ut._fullLayout,Be="v"===Rt.orientation,Ye={type:"linear",range:Ge,tickmode:Rt.tickmode,nticks:Rt.nticks,tick0:Rt.tick0,dtick:Rt.dtick,tickvals:Rt.tickvals,ticktext:Rt.ticktext,ticks:Rt.ticks,ticklen:Rt.ticklen,tickwidth:Rt.tickwidth,tickcolor:Rt.tickcolor,showticklabels:Rt.showticklabels,ticklabelposition:Rt.ticklabelposition,ticklabeloverflow:Rt.ticklabeloverflow,ticklabelstep:Rt.ticklabelstep,tickfont:Rt.tickfont,tickangle:Rt.tickangle,tickformat:Rt.tickformat,exponentformat:Rt.exponentformat,minexponent:Rt.minexponent,separatethousands:Rt.separatethousands,showexponent:Rt.showexponent,showtickprefix:Rt.showtickprefix,tickprefix:Rt.tickprefix,showticksuffix:Rt.showticksuffix,ticksuffix:Rt.ticksuffix,title:Rt.title,showline:!0,anchor:"free",side:Be?"right":"bottom",position:1},rt=Be?"y":"x",Se={type:"linear",_id:rt+Rt._id},ze={letter:rt,font:We.font,noHover:!0,noTickson:!0,noTicklabelmode:!0,calendar:We.calendar};function Ke(st,ct){return s.coerce(Ye,Se,v,st,ct)}return f(Ye,Se,Ke,ze,We),x(Ye,Se,Ke,ze),Se}(I,P,he);_e.position=se+(U?K+W/ie.w:re+X/ie.h);var Fe=-1!==["top","bottom"].indexOf(de);if(U&&Fe&&(_e.title.side=de,_e.titlex=K+W/ie.w,_e.titley=le+("top"===me.side?ye-X/ie.h:X/ie.h)),U||Fe||(_e.title.side=de,_e.titley=re+X/ie.h,_e.titlex=le+W/ie.w),ce.color&&"auto"===P.tickmode){_e.tickmode="linear",_e.tick0=xe.start;var Ve=xe.size,He=s.constrain(fe/50,4,15)+1,nt=(he[1]-he[0])/((P.nticks||He)*Ve);if(nt>1){var tt=Math.pow(10,Math.floor(Math.log(nt)/Math.LN10));Ve*=tt*s.roundUp(nt/tt,[2,5,10]),(Math.abs(xe.start)/xe.size+1e-6)%1<2e-6&&(_e.tick0=0)}_e.dtick=Ve}_e.domain=U?[le+X/ie.h,le+ye-X/ie.h]:[le+W/ie.w,le+ye-W/ie.w],_e.setScale(),C.attr("transform",t(Math.round(ie.l),Math.round(ie.t)));var ot,dt=C.select("."+w.cbtitleunshift).attr("transform",t(-Math.round(ie.l),-Math.round(ie.t))),kt=_e.ticklabelposition,mt=_e.title.font.size,wt=C.select("."+w.cbaxis),Lt=0,Ct=0;function It(Ut,Rt){var Ge={propContainer:_e,propName:P._propPrefix+"title",traceIndex:P._traceIndex,_meta:P._meta,placeholder:ee._dfltTitle.colorbar,containerGroup:C.select("."+w.cbtitle)},We="h"===Ut.charAt(0)?Ut.substr(1):"h"+Ut;C.selectAll("."+We+",."+We+"-math-group").remove(),a.draw(I,Ut,o(Ge,Rt||{}))}return s.syncOrAsync([l.previousPromises,function(){var Ut,Rt;(U&&Fe||!U&&!Fe)&&("top"===de&&(Ut=W+ie.l+ie.w*K,Rt=X+ie.t+ie.h*(1-le-ye)+3+.75*mt),"bottom"===de&&(Ut=W+ie.l+ie.w*K,Rt=X+ie.t+ie.h*(1-le)-3-.25*mt),"right"===de&&(Rt=X+ie.t+ie.h*re+3+.75*mt,Ut=W+ie.l+ie.w*le),It(_e._id+"title",{attributes:{x:Ut,y:Rt,"text-anchor":U?"start":"middle"}}))},function(){if(!U&&!Fe||U&&Fe){var Ut,Rt=C.select("."+w.cbtitle),Ge=Rt.select("text"),We=[-B/2,B/2],Be=Rt.select(".h"+_e._id+"title-math-group").node(),Ye=15.6;if(Ge.node()&&(Ye=parseInt(Ge.node().style.fontSize,10)*y),Be?(Ut=n.bBox(Be),Ct=Ut.width,(Lt=Ut.height)>Ye&&(We[1]-=(Lt-Ye)/2)):Ge.node()&&!Ge.classed(w.jsPlaceholder)&&(Ut=n.bBox(Ge.node()),Ct=Ut.width,Lt=Ut.height),U){if(Lt){if(Lt+=5,"top"===de)_e.domain[1]-=Lt/ie.h,We[1]*=-1;else{_e.domain[0]+=Lt/ie.h;var rt=c.lineCount(Ge);We[1]+=(1-rt)*Ye}Rt.attr("transform",t(We[0],We[1])),_e.setScale()}}else Ct&&("right"===de&&(_e.domain[0]+=(Ct+mt/2)/ie.w),Rt.attr("transform",t(We[0],We[1])),_e.setScale())}C.selectAll("."+w.cbfills+",."+w.cblines).attr("transform",U?t(0,Math.round(ie.h*(1-_e.domain[1]))):t(Math.round(ie.w*_e.domain[0]),0)),wt.attr("transform",U?t(0,Math.round(-ie.t)):t(Math.round(-ie.l),0));var Se=C.select("."+w.cbfills).selectAll("rect."+w.cbfill).attr("style","").data(Ae);Se.enter().append("rect").classed(w.cbfill,!0).style("stroke","none"),Se.exit().remove();var ze=he.map(_e.c2p).map(Math.round).sort(function(Et,At){return Et-At});Se.each(function(Et,At){var ht=[0===At?he[0]:(Ae[At]+Ae[At-1])/2,At===Ae.length-1?he[1]:(Ae[At]+Ae[At+1])/2].map(_e.c2p).map(Math.round);U&&(ht[1]=s.constrain(ht[1]+(ht[1]>ht[0])?1:-1,ze[0],ze[1]));var pt=k.select(this).attr(U?"x":"y",Me).attr(U?"y":"x",k.min(ht)).attr(U?"width":"height",Math.max(Q,2)).attr(U?"height":"width",Math.max(k.max(ht)-k.min(ht),2));if(P._fillgradient)n.gradient(pt,I,P._id,U?"vertical":"horizontalreversed",P._fillgradient,"fill");else{var gt=Pe(Et).replace("e-","");pt.attr("fill",A(gt).toHexString())}});var Ke=C.select("."+w.cblines).selectAll("path."+w.cbline).data(ce.color&&ce.width?Te:[]);Ke.enter().append("path").classed(w.cbline,!0),Ke.exit().remove(),Ke.each(function(Et){var At=Me,ht=Math.round(_e.c2p(Et))+ce.width/2%1;k.select(this).attr("d","M"+(U?At+","+ht:ht+","+At)+(U?"h":"v")+Q).call(n.lineGroupStyle,ce.width,ve(Et),ce.dash)}),wt.selectAll("g."+_e._id+"tick,path").remove();var st=Me+Q+(B||0)/2-("outside"===P.ticks?1:0),ct=b.calcTicks(_e),Tt=b.getTickSigns(_e)[2];return b.drawTicks(I,_e,{vals:"inside"===_e.ticks?b.clipEnds(_e,ct):ct,layer:wt,path:b.makeTickPath(_e,st,Tt),transFn:b.makeTransTickFn(_e)}),b.drawLabels(I,_e,{vals:ct,layer:wt,transFn:b.makeTransTickLabelFn(_e),labelFns:b.makeLabelFns(_e,st)})},function(){if(U&&!Fe||!U&&Fe){var Ut,Rt,Ge=_e.position||0,We=_e._offset+_e._length/2;if("right"===de)Rt=We,Ut=ie.l+ie.w*Ge+10+mt*(_e.showticklabels?1:.5);else if(Ut=We,"bottom"===de&&(Rt=ie.t+ie.h*Ge+10+(-1===kt.indexOf("inside")?_e.tickfont.size:0)+("intside"!==_e.ticks&&P.ticklen||0)),"top"===de){var Be=me.text.split("<br>").length;Rt=ie.t+ie.h*Ge+10-Q-y*mt*Be}It((U?"h":"v")+_e._id+"title",{avoid:{selection:k.select(I).selectAll("g."+_e._id+"tick"),side:de,offsetTop:U?0:ie.t,offsetLeft:U?ie.l:0,maxShift:U?ee.width:ee.height},attributes:{x:Ut,y:Rt,"text-anchor":"middle"},transform:{rotate:U?-90:0,offset:0}})}},l.previousPromises,function(){var Ut,Rt=Q+B/2;-1===kt.indexOf("inside")&&(Ut=n.bBox(wt.node()),Rt+=U?Ut.width:Ut.height),ot=dt.select("text");var Ge=0,We=U&&"top"===de,Be=!U&&"right"===de,Ye=0;if(ot.node()&&!ot.classed(w.jsPlaceholder)){var rt,Se=dt.select(".h"+_e._id+"title-math-group").node();Se&&(U&&Fe||!U&&!Fe)?(Ge=(Ut=n.bBox(Se)).width,rt=Ut.height):(Ge=(Ut=n.bBox(dt.node())).right-ie.l-(U?Me:ge),rt=Ut.bottom-ie.t-(U?ge:Me),U||"top"!==de||(Rt+=Ut.height,Ye=Ut.height)),Be&&(ot.attr("transform",t(Ge/2+mt/2,0)),Ge*=2),Rt=Math.max(Rt,U?Ge:rt)}var ze=2*(U?W:X)+Rt+j+B/2,Ke=0;!U&&me.text&&"bottom"===V&&re<=0&&(ze+=Ke=ze/2,Ye+=Ke),ee._hColorbarMoveTitle=Ke,ee._hColorbarMoveCBTitle=Ye;var st=j+B;C.select("."+w.cbbg).attr("x",(U?Me:ge)-st/2-(U?W:0)).attr("y",(U?ge:Me)-(U?fe:X+Ye-Ke)).attr(U?"width":"height",Math.max(ze-Ke,2)).attr(U?"height":"width",Math.max(fe+st,2)).call(i.fill,J).call(i.stroke,P.bordercolor).style("stroke-width",j);var ct=Be?Math.max(Ge-10,0):0;if(C.selectAll("."+w.cboutline).attr("x",(U?Me:ge+W)+ct).attr("y",(U?ge+X-fe:Me)+(We?Lt:0)).attr(U?"width":"height",Math.max(Q,2)).attr(U?"height":"width",Math.max(fe-(U?2*X+Lt:2*W+ct),2)).call(i.stroke,P.outlinecolor).style({fill:"none","stroke-width":B}),C.attr("transform",t(ie.l-(U?Ie*ze:0),ie.t-(U?0:(1-Ce)*ze-Ye))),!U&&(j||A(J).getAlpha()&&!A.equals(ee.paper_bgcolor,J))){var Tt=wt.selectAll("text"),Et=Tt[0].length,At=C.select("."+w.cbbg).node(),ht=n.bBox(At),pt=n.getTranslate(C);Tt.each(function(Gt,un){var pn=Et-1;if(0===un||un===pn){var Kt,wn=n.bBox(this),Bn=n.getTranslate(this);un===pn?(Kt=ht.right+pt.x+ge-j-2+K-(wn.right+Bn.x))>0&&(Kt=0):0===un&&(Kt=ht.left+pt.x+ge+j+2-(wn.left+Bn.x))<0&&(Kt=0),Kt&&(Et<3?this.setAttribute("transform","translate("+Kt+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var gt={},Pt=h[G],Ot=m[G],Ht=h[V],jt=m[V],Nt=ze-Q;U?("pixels"===H?(gt.y=re,gt.t=fe*Ht,gt.b=fe*jt):(gt.t=gt.b=0,gt.yt=re+z*Ht,gt.yb=re-z*jt),"pixels"===N?(gt.x=K,gt.l=ze*Pt,gt.r=ze*Ot):(gt.l=Nt*Pt,gt.r=Nt*Ot,gt.xl=K-F*Pt,gt.xr=K+F*Ot)):("pixels"===H?(gt.x=K,gt.l=fe*Pt,gt.r=fe*Ot):(gt.l=gt.r=0,gt.xl=K+z*Pt,gt.xr=K-z*Ot),"pixels"===N?(gt.y=1-re,gt.t=ze*Ht,gt.b=ze*jt):(gt.t=Nt*Ht,gt.b=Nt*jt,gt.yt=re-F*Ht,gt.yb=re+F*jt)),l.autoMargin(I,P._id,gt)}],I)}(E,_,u);L&&L.then&&(u._promises||[]).push(L),u._context.edits.colorbarPosition&&(F="v"===(P=_).orientation,N=(I=u)._fullLayout._size,d.init({element:(C=E).node(),gd:I,prepFn:function(){U=C.attr("transform"),r(C)},moveFn:function(B,j){C.attr("transform",U+t(B,j)),z=d.align((F?P._uFrac:P._vFrac)+B/N.w,F?P._thickFrac:P._lenFrac,0,1,P.xanchor),H=d.align((F?P._vFrac:1-P._uFrac)-j/N.h,F?P._lenFrac:P._thickFrac,0,1,P.yanchor);var J=d.getCursor(z,H,P.xanchor,P.yanchor);r(C,J)},doneFn:function(){if(r(C),void 0!==z&&void 0!==H){var B={};B[P._propPrefix+"x"]=z,B[P._propPrefix+"y"]=H,void 0!==P._traceIndex?T.call("_guiRestyle",I,B,P._traceIndex):T.call("_guiRelayout",I,B)}}}))}),S.exit().each(function(_){l.autoMargin(u,_._id)}).remove(),S.order()}}},76228:function($,R,e){"use strict";var k=e(71828);$.exports=function(A){return k.isPlainObject(A.colorbar)}},12311:function($,R,e){"use strict";$.exports={moduleType:"component",name:"colorbar",attributes:e(63583),supplyDefaults:e(62499),draw:e(98981).draw,hasColorbar:e(76228)}},50693:function($,R,e){"use strict";var k=e(63583),A=e(30587).counter,l=e(78607),T=e(63282).scales;function b(d){return"`"+d+"`"}l(T),$.exports=function(d,s){d=d||"";var t,o=(s=s||{}).cLetter||"c",r="noScale"in s?s.noScale:"marker.line"===d,n="showScaleDflt"in s?s.showScaleDflt:"z"===o,i="string"==typeof s.colorscaleDflt?T[s.colorscaleDflt]:null,a=s.editTypeOverride||"",c=d?d+".":"";"colorAttr"in s?t=s.colorAttr:b(c+(t={z:"z",c:"color"}[o]));var p=o+"auto",f=o+"min",x=o+"max",v=o+"mid",g=(b(c+p),b(c+f),b(c+x),{});g[f]=g[x]=void 0;var y={};y[p]=!1;var h={};return"color"===t&&(h.color={valType:"color",arrayOk:!0,editType:a||"style"},s.anim&&(h.color.anim=!0)),h[p]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:g},h[f]={valType:"number",dflt:null,editType:a||"plot",impliedEdits:y},h[x]={valType:"number",dflt:null,editType:a||"plot",impliedEdits:y},h[v]={valType:"number",dflt:null,editType:"calc",impliedEdits:g},h.colorscale={valType:"colorscale",editType:"calc",dflt:i,impliedEdits:{autocolorscale:!1}},h.autocolorscale={valType:"boolean",dflt:!1!==s.autoColorDflt,editType:"calc",impliedEdits:{colorscale:void 0}},h.reversescale={valType:"boolean",dflt:!1,editType:"plot"},r||(h.showscale={valType:"boolean",dflt:n,editType:"calc"},h.colorbar=k),s.noColorAxis||(h.coloraxis={valType:"subplotid",regex:A("coloraxis"),dflt:null,editType:"calc"}),h}},78803:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(52075).extractOpts;$.exports=function(T,b,d){var t=T._fullLayout,o=d.vals,r=d.containerStr,n=r?A.nestedProperty(b,r).get():b,i=l(n),a=!1!==i.auto,c=i.min,p=i.max,f=i.mid,x=function(){return A.aggNums(Math.min,null,o)},v=function(){return A.aggNums(Math.max,null,o)};void 0===c?c=x():a&&(c=n._colorAx&&k(c)?Math.min(c,x()):x()),void 0===p?p=v():a&&(p=n._colorAx&&k(p)?Math.max(p,v()):v()),a&&void 0!==f&&(p-f>f-c?c=f-(p-f):p-f<f-c&&(p=f+(f-c))),c===p&&(c-=.5,p+=.5),i._sync("min",c),i._sync("max",p),i.autocolorscale&&i._sync("colorscale",c*p<0?t.colorscale.diverging:c>=0?t.colorscale.sequential:t.colorscale.sequentialminus)}},33046:function($,R,e){"use strict";var k=e(71828),A=e(52075).hasColorscale,l=e(52075).extractOpts;$.exports=function(T,b){function d(a,c){var p=a["_"+c];void 0!==p&&(a[c]=p)}function s(a,c){var p=c.container?k.nestedProperty(a,c.container).get():a;if(p)if(p.coloraxis)p._colorAx=b[p.coloraxis];else{var f=l(p),x=f.auto;(x||void 0===f.min)&&d(p,c.min),(x||void 0===f.max)&&d(p,c.max),f.autocolorscale&&d(p,"colorscale")}}for(var t=0;t<T.length;t++){var o=T[t],r=o._module.colorbar;if(r)if(Array.isArray(r))for(var n=0;n<r.length;n++)s(o,r[n]);else s(o,r);A(o,"marker.line")&&s(o,{container:"marker.line",min:"cmin",max:"cmax"})}for(var i in b._colorAxes)s(b[i],{min:"cmin",max:"cmax"})}},1586:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(76228),T=e(62499),b=e(63282).isValid,d=e(73972).traceIs;function s(t,o){var r=o.slice(0,o.length-1);return o?A.nestedProperty(t,r).get()||{}:t}$.exports=function t(o,r,n,i,a){var c=a.prefix,p=a.cLetter,f="_module"in r,x=s(o,c),v=s(r,c),g=s(r._template||{},c)||{},y=function(){return delete o.coloraxis,delete r.coloraxis,t(o,r,n,i,a)};if(f){var h=n._colorAxes||{},m=i(c+"coloraxis");if(m){var w=d(r,"contour")&&A.nestedProperty(r,"contours.coloring").get()||"heatmap",u=h[m];return void(u?(u[2].push(y),u[0]!==w&&(u[0]=!1,A.warn(["Ignoring coloraxis:",m,"setting","as it is linked to incompatible colorscales."].join(" ")))):h[m]=[w,r,[y]])}}var S=x[p+"min"],_=x[p+"max"],E=k(S)&&k(_)&&S<_;i(c+p+"auto",!E)?i(c+p+"mid"):(i(c+p+"min"),i(c+p+"max"));var L,C,P=x.colorscale,I=g.colorscale;void 0!==P&&(L=!b(P)),void 0!==I&&(L=!b(I)),i(c+"autocolorscale",L),i(c+"colorscale"),i(c+"reversescale"),"marker.line."!==c&&(c&&f&&(C=l(x)),i(c+"showscale",C)&&(c&&g&&(v._template=g),T(x,v,n)))}},52075:function($,R,e){"use strict";var k=e(39898),A=e(84267),l=e(92770),T=e(71828),b=e(7901),d=e(63282).isValid,s=["showscale","autocolorscale","colorscale","reversescale","colorbar"],t=["min","max","mid","auto"];function o(c){var p,f,x,v=c._colorAx,g=v||c,y={};for(f=0;f<s.length;f++)y[x=s[f]]=g[x];if(v)for(p="c",f=0;f<t.length;f++)y[x=t[f]]=g["c"+x];else{var h;for(f=0;f<t.length;f++)((h="c"+(x=t[f]))in g||(h="z"+x)in g)&&(y[x]=g[h]);p=h.charAt(0)}return y._sync=function(m,w){var u=-1!==t.indexOf(m)?p+m:m;g[u]=g["_"+u]=w},y}function r(c){for(var p=o(c),f=p.min,x=p.max,v=p.reversescale?n(p.colorscale):p.colorscale,g=v.length,y=new Array(g),h=new Array(g),m=0;m<g;m++){var w=v[m];y[m]=f+w[0]*(x-f),h[m]=w[1]}return{domain:y,range:h}}function n(c){for(var p=c.length,f=new Array(p),x=p-1,v=0;x>=0;x--,v++){var g=c[x];f[v]=[1-g[0],g[1]]}return f}function i(c,p){p=p||{};for(var f=c.domain,x=c.range,v=x.length,g=new Array(v),y=0;y<v;y++){var h=A(x[y]).toRgb();g[y]=[h.r,h.g,h.b,h.a]}var m,w=k.scale.linear().domain(f).range(g).clamp(!0),u=p.noNumericCheck,S=p.returnArray;return(m=u&&S?w:u?function(_){return a(w(_))}:S?function(_){return l(_)?w(_):A(_).isValid()?_:b.defaultLine}:function(_){return l(_)?a(w(_)):A(_).isValid()?_:b.defaultLine}).domain=w.domain,m.range=function(){return x},m}function a(c){return A({r:c[0],g:c[1],b:c[2],a:c[3]}).toRgbString()}$.exports={hasColorscale:function(c,p,f){var x=p?T.nestedProperty(c,p).get()||{}:c,v=x[f||"color"],g=!1;if(T.isArrayOrTypedArray(v))for(var y=0;y<v.length;y++)if(l(v[y])){g=!0;break}return T.isPlainObject(x)&&(g||!0===x.showscale||l(x.cmin)&&l(x.cmax)||d(x.colorscale)||T.isPlainObject(x.colorbar))},extractOpts:o,extractScale:r,flipScale:n,makeColorScaleFunc:i,makeColorScaleFuncFromTrace:function(c,p){return i(r(c),p)}}},21081:function($,R,e){"use strict";var k=e(63282),A=e(52075);$.exports={moduleType:"component",name:"colorscale",attributes:e(50693),layoutAttributes:e(72673),supplyLayoutDefaults:e(30959),handleDefaults:e(1586),crossTraceDefaults:e(33046),calc:e(78803),scales:k.scales,defaultScale:k.defaultScale,getScale:k.get,isValidScale:k.isValid,hasColorscale:A.hasColorscale,extractOpts:A.extractOpts,extractScale:A.extractScale,flipScale:A.flipScale,makeColorScaleFunc:A.makeColorScaleFunc,makeColorScaleFuncFromTrace:A.makeColorScaleFuncFromTrace}},72673:function($,R,e){"use strict";var k=e(1426).extendFlat,A=e(50693),l=e(63282).scales;$.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:l.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:l.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:l.RdBu,editType:"calc"}},coloraxis:k({_isSubplotObj:!0,editType:"calc"},A("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}},30959:function($,R,e){"use strict";var k=e(71828),A=e(44467),l=e(72673),T=e(1586);$.exports=function(b,d){function s(p,f){return k.coerce(b,d,l,p,f)}s("colorscale.sequential"),s("colorscale.sequentialminus"),s("colorscale.diverging");var t,o,r=d._colorAxes;function n(p,f){return k.coerce(t,o,l.coloraxis,p,f)}for(var i in r){var a=r[i];if(a[0])t=b[i]||{},(o=A.newContainer(d,i,"coloraxis"))._name=i,T(t,o,d,n,{prefix:"",cLetter:"c"});else{for(var c=0;c<a[2].length;c++)a[2][c]();delete d._colorAxes[i]}}}},63282:function($,R,e){"use strict";var k=e(84267),A={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)"]]},l=A.RdBu;function T(b){var d=0;if(!Array.isArray(b)||b.length<2||!b[0]||!b[b.length-1]||0!=+b[0][0]||1!=+b[b.length-1][0])return!1;for(var s=0;s<b.length;s++){var t=b[s];if(2!==t.length||+t[0]<d||!k(t[1]).isValid())return!1;d=+t[0]}return!0}$.exports={scales:A,defaultScale:l,get:function(b,d){if(d||(d=l),!b)return d;function s(){try{b=A[b]||JSON.parse(b)}catch{b=d}}return"string"==typeof b&&(s(),"string"==typeof b&&s()),T(b)?b:d},isValid:function(b){return void 0!==A[b]||T(b)}}},92807:function($){"use strict";$.exports=function(R,e,k,A,l){var T=(R-k)/(A-k),b=T+e/(A-k),d=(T+b)/2;return"left"===l||"bottom"===l?T:"center"===l||"middle"===l?d:"right"===l||"top"===l?b:T<.6666666666666666-d?T:b>1.3333333333333333-d?b:d}},70461:function($,R,e){"use strict";var k=e(71828),A=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];$.exports=function(l,T,b,d){return l="left"===b?0:"center"===b?1:"right"===b?2:k.constrain(Math.floor(3*l),0,2),T="bottom"===d?0:"middle"===d?1:"top"===d?2:k.constrain(Math.floor(3*T),0,2),A[T][l]}},64505:function($,R){"use strict";R.selectMode=function(e){return"lasso"===e||"select"===e},R.drawMode=function(e){return"drawclosedpath"===e||"drawopenpath"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},R.openMode=function(e){return"drawline"===e||"drawopenpath"===e},R.rectMode=function(e){return"select"===e||"drawline"===e||"drawrect"===e||"drawcircle"===e},R.freeMode=function(e){return"lasso"===e||"drawclosedpath"===e||"drawopenpath"===e},R.selectingOrDrawing=function(e){return R.freeMode(e)||R.rectMode(e)}},28569:function($,R,e){"use strict";var k=e(48956),A=e(57035),l=e(38520),T=e(71828).removeElement,b=e(85555),d=$.exports={};d.align=e(92807),d.getCursor=e(70461);var s=e(26041);function t(){var r=document.createElement("div");r.className="dragcover";var n=r.style;return n.position="fixed",n.left=0,n.right=0,n.top=0,n.bottom=0,n.zIndex=999999999,n.background="none",document.body.appendChild(r),r}function o(r){return k(r.changedTouches?r.changedTouches[0]:r,document.body)}d.unhover=s.wrapped,d.unhoverRaw=s.raw,d.init=function(r){var n,i,a,c,p,f,x,v,g=r.gd,y=1,h=g._context.doubleClickDelay,m=r.element;g._mouseDownTime||(g._mouseDownTime=0),m.style.pointerEvents="all",m.onmousedown=u,l?(m._ontouchstart&&m.removeEventListener("touchstart",m._ontouchstart),m._ontouchstart=u,m.addEventListener("touchstart",u,{passive:!1})):m.ontouchstart=u;var w=r.clampFn||function(E,L,C){return Math.abs(E)<C&&(E=0),Math.abs(L)<C&&(L=0),[E,L]};function u(E){g._dragged=!1,g._dragging=!0;var L=o(E);n=L[0],i=L[1],x=E.target,f=E,v=2===E.buttons||E.ctrlKey,void 0===E.clientX&&void 0===E.clientY&&(E.clientX=n,E.clientY=i),(a=(new Date).getTime())-g._mouseDownTime<h?y+=1:(y=1,g._mouseDownTime=a),r.prepFn&&r.prepFn(E,n,i),A&&!v?(p=t()).style.cursor=window.getComputedStyle(m).cursor:A||(p=document,c=window.getComputedStyle(document.documentElement).cursor,document.documentElement.style.cursor=window.getComputedStyle(m).cursor),document.addEventListener("mouseup",_),document.addEventListener("touchend",_),!1!==r.dragmode&&(E.preventDefault(),document.addEventListener("mousemove",S),document.addEventListener("touchmove",S,{passive:!1}))}function S(E){E.preventDefault();var L=o(E),P=w(L[0]-n,L[1]-i,r.minDrag||b.MINDRAG),I=P[0],U=P[1];(I||U)&&(g._dragged=!0,d.unhover(g,E)),g._dragged&&r.moveFn&&!v&&(g._dragdata={element:m,dx:I,dy:U},r.moveFn(I,U))}function _(E){if(delete g._dragdata,!1!==r.dragmode&&(E.preventDefault(),document.removeEventListener("mousemove",S),document.removeEventListener("touchmove",S)),document.removeEventListener("mouseup",_),document.removeEventListener("touchend",_),A?T(p):c&&(p.documentElement.style.cursor=c,c=null),g._dragging){if(g._dragging=!1,(new Date).getTime()-g._mouseDownTime>h&&(y=Math.max(y-1,1)),g._dragged)r.doneFn&&r.doneFn();else if(r.clickFn&&r.clickFn(y,f),!v){var L;try{L=new MouseEvent("click",E)}catch{var C=o(E);(L=document.createEvent("MouseEvents")).initMouseEvent("click",E.bubbles,E.cancelable,E.view,E.detail,E.screenX,E.screenY,C[0],C[1],E.ctrlKey,E.altKey,E.shiftKey,E.metaKey,E.button,E.relatedTarget)}x.dispatchEvent(L)}g._dragging=!1,g._dragged=!1}else g._dragged=!1}},d.coverSlip=t},26041:function($,R,e){"use strict";var k=e(11086),A=e(79990),l=e(24401).getGraphDiv,T=e(26675),b=$.exports={};b.wrapped=function(d,s,t){(d=l(d))._fullLayout&&A.clear(d._fullLayout._uid+T.HOVERID),b.raw(d,s,t)},b.raw=function(d,s){var t=d._fullLayout,o=d._hoverdata;s||(s={}),s.target&&!d._dragged&&!1===k.triggerHandler(d,"plotly_beforehover",s)||(t._hoverlayer.selectAll("g").remove(),t._hoverlayer.selectAll("line").remove(),t._hoverlayer.selectAll("circle").remove(),d._hoverdata=void 0,s.target&&o&&d.emit("plotly_unhover",{event:s,points:o}))}},79952:function($,R){"use strict";R.P={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},R.u={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},91424:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=A.numberFormat,T=e(92770),b=e(84267),d=e(73972),s=e(7901),t=e(21081),o=A.strTranslate,r=e(63893),n=e(77922),i=e(18783).LINE_SPACING,a=e(37822).DESELECTDIM,c=e(34098),p=e(39984),f=e(23469).appendArrayPointValue,x=$.exports={};function v(xe,ke,Ae){var Te=ke.fillpattern,Q=Te&&x.getPatternAttr(Te.shape,0,"");if(Q){var se=x.getPatternAttr(Te.bgcolor,0,null),fe=x.getPatternAttr(Te.fgcolor,0,null),ye=Te.fgopacity,Me=x.getPatternAttr(Te.size,0,8),Ie=x.getPatternAttr(Te.solidity,0,.3);x.pattern(xe,"point",Ae,ke.uid,Q,Me,Ie,void 0,Te.fillmode,se,fe,ye)}else ke.fillcolor&&xe.call(s.fill,ke.fillcolor)}x.font=function(xe,ke,Ae,Te){A.isPlainObject(ke)&&(Te=ke.color,Ae=ke.size,ke=ke.family),ke&&xe.style("font-family",ke),Ae+1&&xe.style("font-size",Ae+"px"),Te&&xe.call(s.fill,Te)},x.setPosition=function(xe,ke,Ae){xe.attr("x",ke).attr("y",Ae)},x.setSize=function(xe,ke,Ae){xe.attr("width",ke).attr("height",Ae)},x.setRect=function(xe,ke,Ae,Te,Q){xe.call(x.setPosition,ke,Ae).call(x.setSize,Te,Q)},x.translatePoint=function(xe,ke,Ae,Te){var Q=Ae.c2p(xe.x),se=Te.c2p(xe.y);return!!(T(Q)&&T(se)&&ke.node())&&("text"===ke.node().nodeName?ke.attr("x",Q).attr("y",se):ke.attr("transform",o(Q,se)),!0)},x.translatePoints=function(xe,ke,Ae){xe.each(function(Te){var Q=k.select(this);x.translatePoint(Te,Q,ke,Ae)})},x.hideOutsideRangePoint=function(xe,ke,Ae,Te,Q,se){ke.attr("display",Ae.isPtWithinRange(xe,Q)&&Te.isPtWithinRange(xe,se)?null:"none")},x.hideOutsideRangePoints=function(xe,ke){if(ke._hasClipOnAxisFalse){var Ae=ke.xaxis,Te=ke.yaxis;xe.each(function(Q){var se=Q[0].trace,fe=se.xcalendar,ye=se.ycalendar,Me=d.traceIs(se,"bar-like")?".bartext":".point,.textpoint";xe.selectAll(Me).each(function(Ie){x.hideOutsideRangePoint(Ie,k.select(this),Ae,Te,fe,ye)})})}},x.crispRound=function(xe,ke,Ae){return ke&&T(ke)?xe._context.staticPlot?ke:ke<1?1:Math.round(ke):Ae||0},x.singleLineStyle=function(xe,ke,Ae,Te,Q){ke.style("fill","none");var se=(((xe||[])[0]||{}).trace||{}).line||{},fe=Ae||se.width||0,ye=Q||se.dash||"";s.stroke(ke,Te||se.color),x.dashLine(ke,ye,fe)},x.lineGroupStyle=function(xe,ke,Ae,Te){xe.style("fill","none").each(function(Q){var se=(((Q||[])[0]||{}).trace||{}).line||{},fe=ke||se.width||0,ye=Te||se.dash||"";k.select(this).call(s.stroke,Ae||se.color).call(x.dashLine,ye,fe)})},x.dashLine=function(xe,ke,Ae){ke=x.dashStyle(ke,Ae=+Ae||0),xe.style({"stroke-dasharray":ke,"stroke-width":Ae+"px"})},x.dashStyle=function(xe,ke){ke=+ke||1;var Ae=Math.max(ke,3);return"solid"===xe?xe="":"dot"===xe?xe=Ae+"px,"+Ae+"px":"dash"===xe?xe=3*Ae+"px,"+3*Ae+"px":"longdash"===xe?xe=5*Ae+"px,"+5*Ae+"px":"dashdot"===xe?xe=3*Ae+"px,"+Ae+"px,"+Ae+"px,"+Ae+"px":"longdashdot"===xe&&(xe=5*Ae+"px,"+2*Ae+"px,"+Ae+"px,"+2*Ae+"px"),xe},x.singleFillStyle=function(xe,ke){var Ae=k.select(xe.node());v(xe,((Ae.data()[0]||[])[0]||{}).trace||{},ke)},x.fillGroupStyle=function(xe,ke){xe.style("stroke-width",0).each(function(Ae){var Te=k.select(this);Ae[0].trace&&v(Te,Ae[0].trace,ke)})};var g=e(90998);x.symbolNames=[],x.symbolFuncs=[],x.symbolBackOffs=[],x.symbolNeedLines={},x.symbolNoDot={},x.symbolNoFill={},x.symbolList=[],Object.keys(g).forEach(function(xe){var ke=g[xe],Ae=ke.n;x.symbolList.push(Ae,String(Ae),xe,Ae+100,String(Ae+100),xe+"-open"),x.symbolNames[Ae]=xe,x.symbolFuncs[Ae]=ke.f,x.symbolBackOffs[Ae]=ke.backoff||0,ke.needLine&&(x.symbolNeedLines[Ae]=!0),ke.noDot?x.symbolNoDot[Ae]=!0:x.symbolList.push(Ae+200,String(Ae+200),xe+"-dot",Ae+300,String(Ae+300),xe+"-open-dot"),ke.noFill&&(x.symbolNoFill[Ae]=!0)});var y=x.symbolNames.length;function h(xe,ke,Ae,Te){return x.symbolFuncs[xe%100](ke,Ae,Te)+(xe>=200?"M0,0.5L0.5,0L0,-0.5L-0.5,0Z":"")}x.symbolNumber=function(xe){if(T(xe))xe=+xe;else if("string"==typeof xe){var ke=0;xe.indexOf("-open")>0&&(ke=100,xe=xe.replace("-open","")),xe.indexOf("-dot")>0&&(ke+=200,xe=xe.replace("-dot","")),(xe=x.symbolNames.indexOf(xe))>=0&&(xe+=ke)}return xe%100>=y||xe>=400?0:Math.floor(Math.max(xe,0))};var m={x1:1,x2:0,y1:0,y2:0},w={x1:0,x2:0,y1:1,y2:0},u=l("~f"),S={radial:{node:"radialGradient"},radialreversed:{node:"radialGradient",reversed:!0},horizontal:{node:"linearGradient",attrs:m},horizontalreversed:{node:"linearGradient",attrs:m,reversed:!0},vertical:{node:"linearGradient",attrs:w},verticalreversed:{node:"linearGradient",attrs:w,reversed:!0}};x.gradient=function(xe,ke,Ae,Te,Q,se){for(var fe=Q.length,ye=S[Te],Me=new Array(fe),Ie=0;Ie<fe;Ie++)ye.reversed?Me[fe-1-Ie]=[u(100*(1-Q[Ie][0])),Q[Ie][1]]:Me[Ie]=[u(100*Q[Ie][0]),Q[Ie][1]];var Ce=ke._fullLayout,Re="g"+Ce._uid+"-"+Ae,le=Ce._defs.select(".gradients").selectAll("#"+Re).data([Te+Me.join(";")],A.identity);le.exit().remove(),le.enter().append(ye.node).each(function(){var ge=k.select(this);ye.attrs&&ge.attr(ye.attrs),ge.attr("id",Re);var _e=ge.selectAll("stop").data(Me);_e.exit().remove(),_e.enter().append("stop"),_e.each(function(Fe){var Ve=b(Fe[1]);k.select(this).attr({offset:Fe[0]+"%","stop-color":s.tinyRGB(Ve),"stop-opacity":Ve.getAlpha()})})}),xe.style(se,G(Re,ke)).style(se+"-opacity",null),xe.classed("gradient_filled",!0)},x.pattern=function(xe,ke,Ae,Te,Q,se,fe,ye,Me,Ie,Ce,Re){var le="legend"===ke;ye&&("overlay"===Me?Ce=s.contrast(Ie=ye):(Ie=void 0,Ce=ye));var ge,_e,Fe,Ve,He,nt,tt,ot,dt,kt=Ae._fullLayout,mt="p"+kt._uid+"-"+Te,wt={},Lt=b(Ce),Ct=s.tinyRGB(Lt),It=Re*Lt.getAlpha();switch(Q){case"/":ge=se*Math.sqrt(2),_e=se*Math.sqrt(2),nt="path",wt={d:Fe="M-"+ge/4+","+_e/4+"l"+ge/2+",-"+_e/2+"M0,"+_e+"L"+ge+",0M"+ge/4*3+","+_e/4*5+"l"+ge/2+",-"+_e/2,opacity:It,stroke:Ct,"stroke-width":(Ve=fe*se)+"px"};break;case"\\":ge=se*Math.sqrt(2),_e=se*Math.sqrt(2),nt="path",wt={d:Fe="M"+ge/4*3+",-"+_e/4+"l"+ge/2+","+_e/2+"M0,0L"+ge+","+_e+"M-"+ge/4+","+_e/4*3+"l"+ge/2+","+_e/2,opacity:It,stroke:Ct,"stroke-width":(Ve=fe*se)+"px"};break;case"x":ge=se*Math.sqrt(2),_e=se*Math.sqrt(2),Fe="M-"+ge/4+","+_e/4+"l"+ge/2+",-"+_e/2+"M0,"+_e+"L"+ge+",0M"+ge/4*3+","+_e/4*5+"l"+ge/2+",-"+_e/2+"M"+ge/4*3+",-"+_e/4+"l"+ge/2+","+_e/2+"M0,0L"+ge+","+_e+"M-"+ge/4+","+_e/4*3+"l"+ge/2+","+_e/2,Ve=se-se*Math.sqrt(1-fe),nt="path",wt={d:Fe,opacity:It,stroke:Ct,"stroke-width":Ve+"px"};break;case"|":nt="path",nt="path",wt={d:Fe="M"+(ge=se)/2+",0L"+ge/2+","+(_e=se),opacity:It,stroke:Ct,"stroke-width":(Ve=fe*se)+"px"};break;case"-":nt="path",nt="path",wt={d:Fe="M0,"+(_e=se)/2+"L"+(ge=se)+","+_e/2,opacity:It,stroke:Ct,"stroke-width":(Ve=fe*se)+"px"};break;case"+":nt="path",Fe="M"+(ge=se)/2+",0L"+ge/2+","+(_e=se)+"M0,"+_e/2+"L"+ge+","+_e/2,Ve=se-se*Math.sqrt(1-fe),nt="path",wt={d:Fe,opacity:It,stroke:Ct,"stroke-width":Ve+"px"};break;case".":ge=se,_e=se,fe<Math.PI/4?He=Math.sqrt(fe*se*se/Math.PI):(tt=fe,ot=Math.PI/4,He=(dt=se/2)+(se/Math.sqrt(2)-dt)*(tt-ot)/(1-ot)),nt="circle",wt={cx:ge/2,cy:_e/2,r:He,opacity:It,fill:Ct}}var Ut=[Q||"noSh",Ie||"noBg",Ce||"noFg",se,fe].join(";"),Rt=kt._defs.select(".patterns").selectAll("#"+mt).data([Ut],A.identity);Rt.exit().remove(),Rt.enter().append("pattern").each(function(){var Ge=k.select(this);if(Ge.attr({id:mt,width:ge+"px",height:_e+"px",patternUnits:"userSpaceOnUse",patternTransform:le?"scale(0.8)":""}),Ie){var We=b(Ie),Be=s.tinyRGB(We),Ye=We.getAlpha(),rt=Ge.selectAll("rect").data([0]);rt.exit().remove(),rt.enter().append("rect").attr({width:ge+"px",height:_e+"px",fill:Be,"fill-opacity":Ye})}var Se=Ge.selectAll(nt).data([0]);Se.exit().remove(),Se.enter().append(nt).attr(wt)}),xe.style("fill",G(mt,Ae)).style("fill-opacity",null),xe.classed("pattern_filled",!0)},x.initGradients=function(xe){A.ensureSingle(xe._fullLayout._defs,"g","gradients").selectAll("linearGradient,radialGradient").remove(),k.select(xe).selectAll(".gradient_filled").classed("gradient_filled",!1)},x.initPatterns=function(xe){A.ensureSingle(xe._fullLayout._defs,"g","patterns").selectAll("pattern").remove(),k.select(xe).selectAll(".pattern_filled").classed("pattern_filled",!1)},x.getPatternAttr=function(xe,ke,Ae){return xe&&A.isArrayOrTypedArray(xe)?ke<xe.length?xe[ke]:Ae:xe},x.pointStyle=function(xe,ke,Ae){if(xe.size()){var Te=x.makePointStyleFns(ke);xe.each(function(Q){x.singlePointStyle(Q,k.select(this),ke,Te,Ae)})}},x.singlePointStyle=function(xe,ke,Ae,Te,Q){var se=Ae.marker,fe=se.line;if(ke.style("opacity",Te.selectedOpacityFn?Te.selectedOpacityFn(xe):void 0===xe.mo?se.opacity:xe.mo),Te.ms2mrc){var ye;ye="various"===xe.ms||"various"===se.size?3:Te.ms2mrc(xe.ms),xe.mrc=ye,Te.selectedSizeFn&&(ye=xe.mrc=Te.selectedSizeFn(xe));var Me=x.symbolNumber(xe.mx||se.symbol)||0;xe.om=Me%200>=100;var Ie=Pe(xe,Ae),Ce=X(xe,Ae);ke.attr("d",h(Me,ye,Ie,Ce))}var Re,le,ge,_e=!1;if(xe.so?(ge=fe.outlierwidth,le=fe.outliercolor,Re=se.outliercolor):(ge=(xe.mlw+1||(fe||{}).width+1||(xe.trace?(xe.trace.marker.line||{}).width:0)+1)-1||0,le="mlc"in xe?xe.mlcc=Te.lineScale(xe.mlc):A.isArrayOrTypedArray(fe.color)?s.defaultLine:fe.color,A.isArrayOrTypedArray(se.color)&&(Re=s.defaultLine,_e=!0),Re="mc"in xe?xe.mcc=Te.markerScale(xe.mc):se.color||"rgba(0,0,0,0)",Te.selectedColorFn&&(Re=Te.selectedColorFn(xe))),xe.om)ke.call(s.stroke,Re).style({"stroke-width":(ge||1)+"px",fill:"none"});else{ke.style("stroke-width",(xe.isBlank?0:ge)+"px");var Ve=se.gradient,He=xe.mgt;He?_e=!0:He=Ve&&Ve.type,A.isArrayOrTypedArray(He)&&(S[He=He[0]]||(He=0));var nt=se.pattern,tt=nt&&x.getPatternAttr(nt.shape,xe.i,"");if(He&&"none"!==He){var ot=xe.mgc;ot?_e=!0:ot=Ve.color;var dt=Ae.uid;_e&&(dt+="-"+xe.i),x.gradient(ke,Q,dt,He,[[0,ot],[1,Re]],"fill")}else if(tt){var kt=x.getPatternAttr(nt.bgcolor,xe.i,null),mt=x.getPatternAttr(nt.fgcolor,xe.i,null),wt=nt.fgopacity,Lt=x.getPatternAttr(nt.size,xe.i,8),Ct=x.getPatternAttr(nt.solidity,xe.i,.3),It=xe.mcc||A.isArrayOrTypedArray(nt.shape)||A.isArrayOrTypedArray(nt.bgcolor)||A.isArrayOrTypedArray(nt.size)||A.isArrayOrTypedArray(nt.solidity),Ut=Ae.uid;It&&(Ut+="-"+xe.i),x.pattern(ke,"point",Q,Ut,tt,Lt,Ct,xe.mcc,nt.fillmode,kt,mt,wt)}else s.fill(ke,Re);ge&&s.stroke(ke,le)}},x.makePointStyleFns=function(xe){var ke={},Ae=xe.marker;return ke.markerScale=x.tryColorscale(Ae,""),ke.lineScale=x.tryColorscale(Ae,"line"),d.traceIs(xe,"symbols")&&(ke.ms2mrc=c.isBubble(xe)?p(xe):function(){return(Ae.size||6)/2}),xe.selectedpoints&&A.extendFlat(ke,x.makeSelectedPointStyleFns(xe)),ke},x.makeSelectedPointStyleFns=function(xe){var ke={},Q=xe.marker||{},se=(xe.selected||{}).marker||{},fe=(xe.unselected||{}).marker||{},Me=se.opacity,Ie=fe.opacity,Ce=void 0!==Me,Re=void 0!==Ie;(A.isArrayOrTypedArray(Q.opacity)||Ce||Re)&&(ke.selectedOpacityFn=function(ot){var dt=void 0===ot.mo?Q.opacity:ot.mo;return ot.selected?Ce?Me:dt:Re?Ie:a*dt});var le=Q.color,ge=se.color,_e=fe.color;(ge||_e)&&(ke.selectedColorFn=function(ot){var dt=ot.mcc||le;return ot.selected?ge||dt:_e||dt});var Fe=Q.size,Ve=se.size,He=fe.size,nt=void 0!==Ve,tt=void 0!==He;return d.traceIs(xe,"symbols")&&(nt||tt)&&(ke.selectedSizeFn=function(ot){var dt=ot.mrc||Fe/2;return ot.selected?nt?Ve/2:dt:tt?He/2:dt}),ke},x.makeSelectedTextStyleFns=function(xe){var ke={},ye=(xe.textfont||{}).color,Me=((xe.selected||{}).textfont||{}).color,Ie=((xe.unselected||{}).textfont||{}).color;return ke.selectedTextColorFn=function(Ce){var Re=Ce.tc||ye;return Ce.selected?Me||Re:Ie||(Me?Re:s.addOpacity(Re,a))},ke},x.selectedPointStyle=function(xe,ke){if(xe.size()&&ke.selectedpoints){var Ae=x.makeSelectedPointStyleFns(ke),Te=ke.marker||{},Q=[];Ae.selectedOpacityFn&&Q.push(function(se,fe){se.style("opacity",Ae.selectedOpacityFn(fe))}),Ae.selectedColorFn&&Q.push(function(se,fe){s.fill(se,Ae.selectedColorFn(fe))}),Ae.selectedSizeFn&&Q.push(function(se,fe){var ye=fe.mx||Te.symbol||0,Me=Ae.selectedSizeFn(fe);se.attr("d",h(x.symbolNumber(ye),Me,Pe(fe,ke),X(fe,ke))),fe.mrc2=Me}),Q.length&&xe.each(function(se){for(var fe=k.select(this),ye=0;ye<Q.length;ye++)Q[ye](fe,se)})}},x.tryColorscale=function(xe,ke){var Ae=ke?A.nestedProperty(xe,ke).get():xe;return Ae&&(Ae.colorscale||Ae._colorAx)&&A.isArrayOrTypedArray(Ae.color)?t.makeColorScaleFuncFromTrace(Ae):A.identity};var _,E,L={start:1,end:-1,middle:0,bottom:1,top:-1};function C(xe,ke,Ae,Te,Q){var se=k.select(xe.node().parentNode),fe=-1!==ke.indexOf("top")?"top":-1!==ke.indexOf("bottom")?"bottom":"middle",ye=-1!==ke.indexOf("left")?"end":-1!==ke.indexOf("right")?"start":"middle",Me=Te?Te/.8+1:0,Ie=(r.lineCount(xe)-1)*i+1,Ce=L[ye]*Me,Re=.75*Ae+L[fe]*Me+(L[fe]-1)*Ie*Ae/2;xe.attr("text-anchor",ye),Q||se.attr("transform",o(Ce,Re))}function P(xe,ke){var Ae=xe.ts||ke.textfont.size;return T(Ae)&&Ae>0?Ae:0}function I(xe,ke,Ae){return Ae&&(xe=B(xe)),ke?z(xe[1]):U(xe[0])}function U(xe){var ke=k.round(xe,2);return _=ke,ke}function z(xe){var ke=k.round(xe,2);return E=ke,ke}function H(xe,ke,Ae,Te){var Q=xe[0]-ke[0],se=xe[1]-ke[1],fe=Ae[0]-ke[0],ye=Ae[1]-ke[1],Me=Math.pow(Q*Q+se*se,.25),Ie=Math.pow(fe*fe+ye*ye,.25),Ce=(Ie*Ie*Q-Me*Me*fe)*Te,Re=(Ie*Ie*se-Me*Me*ye)*Te,le=3*Ie*(Me+Ie),ge=3*Me*(Me+Ie);return[[U(ke[0]+(le&&Ce/le)),z(ke[1]+(le&&Re/le))],[U(ke[0]-(ge&&Ce/ge)),z(ke[1]-(ge&&Re/ge))]]}x.textPointStyle=function(xe,ke,Ae){if(xe.size()){var Te;if(ke.selectedpoints){var Q=x.makeSelectedTextStyleFns(ke);Te=Q.selectedTextColorFn}var se=ke.texttemplate,fe=Ae._fullLayout;xe.each(function(ye){var Me=k.select(this),Ie=se?A.extractOption(ye,ke,"txt","texttemplate"):A.extractOption(ye,ke,"tx","text");if(Ie||0===Ie){if(se){var Ce=ke._module.formatLabels,Re=Ce?Ce(ye,ke,fe):{},le={};f(le,ke,ye.i),Ie=A.texttemplateString(Ie,Re,fe._d3locale,le,ye,ke._meta||{})}var _e=ye.tp||ke.textposition,Fe=P(ye,ke),Ve=Te?Te(ye):ye.tc||ke.textfont.color;Me.call(x.font,ye.tf||ke.textfont.family,Fe,Ve).text(Ie).call(r.convertToTspans,Ae).call(C,_e,Fe,ye.mrc)}else Me.remove()})}},x.selectedTextStyle=function(xe,ke){if(xe.size()&&ke.selectedpoints){var Ae=x.makeSelectedTextStyleFns(ke);xe.each(function(Te){var Q=k.select(this),se=Ae.selectedTextColorFn(Te),fe=Te.tp||ke.textposition,ye=P(Te,ke);s.fill(Q,se);var Me=d.traceIs(ke,"bar-like");C(Q,fe,ye,Te.mrc2||Te.mrc,Me)})}},x.smoothopen=function(xe,ke){if(xe.length<3)return"M"+xe.join("L");var Ae,Te="M"+xe[0],Q=[];for(Ae=1;Ae<xe.length-1;Ae++)Q.push(H(xe[Ae-1],xe[Ae],xe[Ae+1],ke));for(Te+="Q"+Q[0][0]+" "+xe[1],Ae=2;Ae<xe.length-1;Ae++)Te+="C"+Q[Ae-2][1]+" "+Q[Ae-1][0]+" "+xe[Ae];return Te+"Q"+Q[xe.length-3][1]+" "+xe[xe.length-1]},x.smoothclosed=function(xe,ke){if(xe.length<3)return"M"+xe.join("L")+"Z";var Ae,Te="M"+xe[0],Q=xe.length-1,se=[H(xe[Q],xe[0],xe[1],ke)];for(Ae=1;Ae<Q;Ae++)se.push(H(xe[Ae-1],xe[Ae],xe[Ae+1],ke));for(se.push(H(xe[Q-1],xe[Q],xe[0],ke)),Ae=1;Ae<=Q;Ae++)Te+="C"+se[Ae-1][1]+" "+se[Ae][0]+" "+xe[Ae];return Te+"C"+se[Q][1]+" "+se[0][0]+" "+xe[0]+"Z"};var F={hv:function(xe,ke,Ae){return"H"+U(ke[0])+"V"+I(ke,1,Ae)},vh:function(xe,ke,Ae){return"V"+z(ke[1])+"H"+I(ke,0,Ae)},hvh:function(xe,ke,Ae){return"H"+U((xe[0]+ke[0])/2)+"V"+z(ke[1])+"H"+I(ke,0,Ae)},vhv:function(xe,ke,Ae){return"V"+z((xe[1]+ke[1])/2)+"H"+U(ke[0])+"V"+I(ke,1,Ae)}},N=function(xe,ke,Ae){return"L"+I(ke,0,Ae)+","+I(ke,1,Ae)};function B(xe,ke){var Ae=xe.backoff,Te=xe.trace,Q=xe.d,se=xe.i;if(Ae&&Te&&Te.marker&&Te.marker.angle%360==0&&Te.line&&"spline"!==Te.line.shape){var fe=A.isArrayOrTypedArray(Ae),ye=xe,Me=ke?ke[0]:_||0,Ie=ke?ke[1]:E||0,Ce=ye[0],Re=ye[1],_e=Math.atan2(Re-Ie,Ce-Me),Fe=fe?Ae[se]:Ae;if("auto"===Fe){var Ve=ye.i;"scatter"===Te.type&&Ve--;var He=ye.marker,nt=He.symbol;A.isArrayOrTypedArray(nt)&&(nt=nt[Ve]);var tt=He.size;A.isArrayOrTypedArray(tt)&&(tt=tt[Ve]),Fe=He?x.symbolBackOffs[x.symbolNumber(nt)]*tt:0,Fe+=x.getMarkerStandoff(Q[Ve],Te)||0}var ot=Ce-Fe*Math.cos(_e),dt=Re-Fe*Math.sin(_e);(ot<=Ce&&ot>=Me||ot>=Ce&&ot<=Me)&&(dt<=Re&&dt>=Ie||dt>=Re&&dt<=Ie)&&(xe=[ot,dt])}return xe}x.steps=function(xe){var ke=F[xe]||N;return function(Ae){for(var Te="M"+U(Ae[0][0])+","+z(Ae[0][1]),Q=Ae.length,se=1;se<Q;se++)Te+=ke(Ae[se-1],Ae[se],se===Q-1);return Te}},x.applyBackoff=B,x.makeTester=function(){var xe=A.ensureSingleById(k.select("body"),"svg","js-plotly-tester",function(Ae){Ae.attr(n.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),ke=A.ensureSingle(xe,"path","js-reference-point",function(Ae){Ae.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});x.tester=xe,x.testref=ke},x.savedBBoxes={};var j=0;function J(xe){var ke=xe.getAttribute("data-unformatted");if(null!==ke)return ke+xe.getAttribute("data-math")+xe.getAttribute("text-anchor")+xe.getAttribute("style")}function G(xe,ke){if(!xe)return null;var Ae=ke._context,Te=Ae._exportedPlot?"":Ae._baseUrl||"";return Te?"url('"+Te+"#"+xe+"')":"url(#"+xe+")"}x.bBox=function(xe,ke,Ae){var Te,Q,se;if(Ae||(Ae=J(xe)),Ae){if(Te=x.savedBBoxes[Ae])return A.extendFlat({},Te)}else if(1===xe.childNodes.length){var fe=xe.childNodes[0];if(Ae=J(fe)){var ye=+fe.getAttribute("x")||0,Me=+fe.getAttribute("y")||0,Ie=fe.getAttribute("transform");if(!Ie){var Ce=x.bBox(fe,!1,Ae);return ye&&(Ce.left+=ye,Ce.right+=ye),Me&&(Ce.top+=Me,Ce.bottom+=Me),Ce}if(Te=x.savedBBoxes[Ae+="~"+ye+"~"+Me+"~"+Ie])return A.extendFlat({},Te)}}ke?Q=xe:(se=x.tester.node(),Q=xe.cloneNode(!0),se.appendChild(Q)),k.select(Q).attr("transform",null).call(r.positionText,0,0);var Re=Q.getBoundingClientRect(),le=x.testref.node().getBoundingClientRect();ke||se.removeChild(Q);var ge={height:Re.height,width:Re.width,left:Re.left-le.left,top:Re.top-le.top,right:Re.right-le.left,bottom:Re.bottom-le.top};return j>=1e4&&(x.savedBBoxes={},j=0),Ae&&(x.savedBBoxes[Ae]=ge),j++,A.extendFlat({},ge)},x.setClipUrl=function(xe,ke,Ae){xe.attr("clip-path",G(ke,Ae))},x.getTranslate=function(xe){var ke=(xe[xe.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,function(Ae,Te,Q){return[Te,Q].join(" ")}).split(" ");return{x:+ke[0]||0,y:+ke[1]||0}},x.setTranslate=function(xe,ke,Ae){var Q=xe.attr?"attr":"setAttribute",se=xe[xe.attr?"attr":"getAttribute"]("transform")||"";return ke=ke||0,Ae=Ae||0,se=se.replace(/(\btranslate\(.*?\);?)/,"").trim(),se=(se+=o(ke,Ae)).trim(),xe[Q]("transform",se),se},x.getScale=function(xe){var ke=(xe[xe.attr?"attr":"getAttribute"]("transform")||"").replace(/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,function(Ae,Te,Q){return[Te,Q].join(" ")}).split(" ");return{x:+ke[0]||1,y:+ke[1]||1}},x.setScale=function(xe,ke,Ae){var Q=xe.attr?"attr":"setAttribute",se=xe[xe.attr?"attr":"getAttribute"]("transform")||"";return ke=ke||1,Ae=Ae||1,se=se.replace(/(\bscale\(.*?\);?)/,"").trim(),se=(se+="scale("+ke+","+Ae+")").trim(),xe[Q]("transform",se),se};var V=/\s*sc.*/;x.setPointGroupScale=function(xe,ke,Ae){if(ke=ke||1,Ae=Ae||1,xe){var Te=1===ke&&1===Ae?"":"scale("+ke+","+Ae+")";xe.each(function(){var Q=(this.getAttribute("transform")||"").replace(V,"");Q=(Q+=Te).trim(),this.setAttribute("transform",Q)})}};var W=/translate\([^)]*\)\s*$/;function X(xe,ke){var Ae;return xe&&(Ae=xe.mf),void 0===Ae&&(Ae=ke.marker&&ke.marker.standoff||0),ke._geo||ke._xA?Ae:-Ae}x.setTextPointsScale=function(xe,ke,Ae){xe&&xe.each(function(){var Te,Q=k.select(this),se=Q.select("text");if(se.node()){var fe=parseFloat(se.attr("x")||0),ye=parseFloat(se.attr("y")||0),Me=(Q.attr("transform")||"").match(W);Te=1===ke&&1===Ae?[]:[o(fe,ye),"scale("+ke+","+Ae+")",o(-fe,-ye)],Me&&Te.push(Me),Q.attr("transform",Te.join(""))}})},x.getMarkerStandoff=X;var K,re,ee,ie,oe,ce,me=Math.atan2,de=Math.cos,he=Math.sin;function ve(xe,ke){var Ae=ke[0],Te=ke[1];return[Ae*de(xe)-Te*he(xe),Ae*he(xe)+Te*de(xe)]}function Pe(xe,ke){var Ae,Te,Q=xe.ma;void 0===Q&&(Q=ke.marker.angle||0);var se=ke.marker.angleref;if("previous"===se||"north"===se){if(ke._geo){var fe=ke._geo.project(xe.lonlat);Ae=fe[0],Te=fe[1]}else{var ye=ke._xA,Me=ke._yA;if(!ye||!Me)return 90;Ae=ye.c2p(xe.x),Te=Me.c2p(xe.y)}if(ke._geo){var Ie,Ce=xe.lonlat[0],Re=xe.lonlat[1],le=ke._geo.project([Ce,Re+1e-5]),ge=ke._geo.project([Ce+1e-5,Re]),_e=me(ge[1]-Te,ge[0]-Ae),Fe=me(le[1]-Te,le[0]-Ae);if("north"===se)Ie=Q/180*Math.PI;else if("previous"===se){var Ve=Ce/180*Math.PI,He=Re/180*Math.PI,nt=K/180*Math.PI,tt=re/180*Math.PI,ot=nt-Ve,dt=de(tt)*he(ot),kt=he(tt)*de(He)-de(tt)*he(He)*de(ot);Ie=-me(dt,kt)-Math.PI,K=Ce,re=Re}var mt=ve(_e,[de(Ie),0]),wt=ve(Fe,[he(Ie),0]);Q=me(mt[1]+wt[1],mt[0]+wt[0])/Math.PI*180,"previous"!==se||ce===ke.uid&&xe.i===oe+1||(Q=null)}if("previous"===se&&!ke._geo)if(ce===ke.uid&&xe.i===oe+1&&T(Ae)&&T(Te)){var Lt=Ae-ee,Ct=Te-ie,It=ke.line&&ke.line.shape||"",Ut=It.slice(It.length-1);"h"===Ut&&(Ct=0),"v"===Ut&&(Lt=0),Q+=me(Ct,Lt)/Math.PI*180+90}else Q=null}return ee=Ae,ie=Te,oe=xe.i,ce=ke.uid,Q}x.getMarkerAngle=Pe},90998:function($,R,e){"use strict";var k,A,l,T,b=e(95616),d=e(39898).round,s="M0,0Z",t=Math.sqrt(2),o=Math.sqrt(3),r=Math.PI,n=Math.cos,i=Math.sin;function a(p){return null===p}function c(p,f,x){if(!(p&&p%360!=0||f))return x;if(l===p&&T===f&&k===x)return A;function v(I,U){var z=n(I),H=i(I),F=U[0],N=U[1]+(f||0);return[F*z-N*H,F*H+N*z]}l=p,T=f,k=x;for(var g=p/180*r,y=0,h=0,m=b(x),w="",u=0;u<m.length;u++){var S=m[u],_=S[0],E=y,L=h;if("M"===_||"L"===_)y=+S[1],h=+S[2];else if("m"===_||"l"===_)y+=+S[1],h+=+S[2];else if("H"===_)y=+S[1];else if("h"===_)y+=+S[1];else if("V"===_)h=+S[1];else if("v"===_)h+=+S[1];else if("A"===_){y=+S[1],h=+S[2];var C=v(g,[+S[6],+S[7]]);S[6]=C[0],S[7]=C[1],S[3]=+S[3]+p}"H"!==_&&"V"!==_||(_="L"),"h"!==_&&"v"!==_||(_="l"),"m"!==_&&"l"!==_||(y-=E,h-=L);var P=v(g,[y,h]);"H"!==_&&"V"!==_||(_="L"),"M"!==_&&"L"!==_&&"m"!==_&&"l"!==_||(S[1]=P[0],S[2]=P[1]),S[0]=_,w+=S[0]+S.slice(1).join(",")}return A=w,w}$.exports={circle:{n:0,f:function(p,f,x){if(a(f))return s;var v=d(p,2),g="M"+v+",0A"+v+","+v+" 0 1,1 0,-"+v+"A"+v+","+v+" 0 0,1 "+v+",0Z";return x?c(f,x,g):g}},square:{n:1,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M"+v+","+v+"H-"+v+"V-"+v+"H"+v+"Z")}},diamond:{n:2,f:function(p,f,x){if(a(f))return s;var v=d(1.3*p,2);return c(f,x,"M"+v+",0L0,"+v+"L-"+v+",0L0,-"+v+"Z")}},cross:{n:3,f:function(p,f,x){if(a(f))return s;var v=d(.4*p,2),g=d(1.2*p,2);return c(f,x,"M"+g+","+v+"H"+v+"V"+g+"H-"+v+"V"+v+"H-"+g+"V-"+v+"H-"+v+"V-"+g+"H"+v+"V-"+v+"H"+g+"Z")}},x:{n:4,f:function(p,f,x){if(a(f))return s;var v=d(.8*p/t,2),g="l"+v+","+v,y="l"+v+",-"+v,h="l-"+v+",-"+v,m="l-"+v+","+v;return c(f,x,"M0,"+v+g+y+h+y+h+m+h+m+g+m+g+"Z")}},"triangle-up":{n:5,f:function(p,f,x){if(a(f))return s;var v=d(2*p/o,2);return c(f,x,"M-"+v+","+d(p/2,2)+"H"+v+"L0,-"+d(p,2)+"Z")}},"triangle-down":{n:6,f:function(p,f,x){if(a(f))return s;var v=d(2*p/o,2);return c(f,x,"M-"+v+",-"+d(p/2,2)+"H"+v+"L0,"+d(p,2)+"Z")}},"triangle-left":{n:7,f:function(p,f,x){if(a(f))return s;var v=d(2*p/o,2);return c(f,x,"M"+d(p/2,2)+",-"+v+"V"+v+"L-"+d(p,2)+",0Z")}},"triangle-right":{n:8,f:function(p,f,x){if(a(f))return s;var v=d(2*p/o,2);return c(f,x,"M-"+d(p/2,2)+",-"+v+"V"+v+"L"+d(p,2)+",0Z")}},"triangle-ne":{n:9,f:function(p,f,x){if(a(f))return s;var v=d(.6*p,2),g=d(1.2*p,2);return c(f,x,"M-"+g+",-"+v+"H"+v+"V"+g+"Z")}},"triangle-se":{n:10,f:function(p,f,x){if(a(f))return s;var v=d(.6*p,2),g=d(1.2*p,2);return c(f,x,"M"+v+",-"+g+"V"+v+"H-"+g+"Z")}},"triangle-sw":{n:11,f:function(p,f,x){if(a(f))return s;var v=d(.6*p,2),g=d(1.2*p,2);return c(f,x,"M"+g+","+v+"H-"+v+"V-"+g+"Z")}},"triangle-nw":{n:12,f:function(p,f,x){if(a(f))return s;var v=d(.6*p,2),g=d(1.2*p,2);return c(f,x,"M-"+v+","+g+"V-"+v+"H"+g+"Z")}},pentagon:{n:13,f:function(p,f,x){if(a(f))return s;var v=d(.951*p,2),g=d(.588*p,2),y=d(-p,2),h=d(-.309*p,2);return c(f,x,"M"+v+","+h+"L"+g+","+d(.809*p,2)+"H-"+g+"L-"+v+","+h+"L0,"+y+"Z")}},hexagon:{n:14,f:function(p,f,x){if(a(f))return s;var v=d(p,2),g=d(p/2,2),y=d(p*o/2,2);return c(f,x,"M"+y+",-"+g+"V"+g+"L0,"+v+"L-"+y+","+g+"V-"+g+"L0,-"+v+"Z")}},hexagon2:{n:15,f:function(p,f,x){if(a(f))return s;var v=d(p,2),g=d(p/2,2),y=d(p*o/2,2);return c(f,x,"M-"+g+","+y+"H"+g+"L"+v+",0L"+g+",-"+y+"H-"+g+"L-"+v+",0Z")}},octagon:{n:16,f:function(p,f,x){if(a(f))return s;var v=d(.924*p,2),g=d(.383*p,2);return c(f,x,"M-"+g+",-"+v+"H"+g+"L"+v+",-"+g+"V"+g+"L"+g+","+v+"H-"+g+"L-"+v+","+g+"V-"+g+"Z")}},star:{n:17,f:function(p,f,x){if(a(f))return s;var v=1.4*p,g=d(.225*v,2),y=d(.951*v,2),h=d(.363*v,2),m=d(.588*v,2),w=d(-v,2),u=d(-.309*v,2),S=d(.118*v,2),_=d(.809*v,2);return c(f,x,"M"+g+","+u+"H"+y+"L"+h+","+S+"L"+m+","+_+"L0,"+d(.382*v,2)+"L-"+m+","+_+"L-"+h+","+S+"L-"+y+","+u+"H-"+g+"L0,"+w+"Z")}},hexagram:{n:18,f:function(p,f,x){if(a(f))return s;var v=d(.66*p,2),g=d(.38*p,2),y=d(.76*p,2);return c(f,x,"M-"+y+",0l-"+g+",-"+v+"h"+y+"l"+g+",-"+v+"l"+g+","+v+"h"+y+"l-"+g+","+v+"l"+g+","+v+"h-"+y+"l-"+g+","+v+"l-"+g+",-"+v+"h-"+y+"Z")}},"star-triangle-up":{n:19,f:function(p,f,x){if(a(f))return s;var v=d(p*o*.8,2),g=d(.8*p,2),y=d(1.6*p,2),h=d(4*p,2),m="A "+h+","+h+" 0 0 1 ";return c(f,x,"M-"+v+","+g+m+v+","+g+m+"0,-"+y+m+"-"+v+","+g+"Z")}},"star-triangle-down":{n:20,f:function(p,f,x){if(a(f))return s;var v=d(p*o*.8,2),g=d(.8*p,2),y=d(1.6*p,2),h=d(4*p,2),m="A "+h+","+h+" 0 0 1 ";return c(f,x,"M"+v+",-"+g+m+"-"+v+",-"+g+m+"0,"+y+m+v+",-"+g+"Z")}},"star-square":{n:21,f:function(p,f,x){if(a(f))return s;var v=d(1.1*p,2),g=d(2*p,2),y="A "+g+","+g+" 0 0 1 ";return c(f,x,"M-"+v+",-"+v+y+"-"+v+","+v+y+v+","+v+y+v+",-"+v+y+"-"+v+",-"+v+"Z")}},"star-diamond":{n:22,f:function(p,f,x){if(a(f))return s;var v=d(1.4*p,2),g=d(1.9*p,2),y="A "+g+","+g+" 0 0 1 ";return c(f,x,"M-"+v+",0"+y+"0,"+v+y+v+",0"+y+"0,-"+v+y+"-"+v+",0Z")}},"diamond-tall":{n:23,f:function(p,f,x){if(a(f))return s;var v=d(.7*p,2),g=d(1.4*p,2);return c(f,x,"M0,"+g+"L"+v+",0L0,-"+g+"L-"+v+",0Z")}},"diamond-wide":{n:24,f:function(p,f,x){if(a(f))return s;var v=d(1.4*p,2),g=d(.7*p,2);return c(f,x,"M0,"+g+"L"+v+",0L0,-"+g+"L-"+v+",0Z")}},hourglass:{n:25,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M"+v+","+v+"H-"+v+"L"+v+",-"+v+"H-"+v+"Z")},noDot:!0},bowtie:{n:26,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M"+v+","+v+"V-"+v+"L-"+v+","+v+"V-"+v+"Z")},noDot:!0},"circle-cross":{n:27,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M0,"+v+"V-"+v+"M"+v+",0H-"+v+"M"+v+",0A"+v+","+v+" 0 1,1 0,-"+v+"A"+v+","+v+" 0 0,1 "+v+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(p,f,x){if(a(f))return s;var v=d(p,2),g=d(p/t,2);return c(f,x,"M"+g+","+g+"L-"+g+",-"+g+"M"+g+",-"+g+"L-"+g+","+g+"M"+v+",0A"+v+","+v+" 0 1,1 0,-"+v+"A"+v+","+v+" 0 0,1 "+v+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M0,"+v+"V-"+v+"M"+v+",0H-"+v+"M"+v+","+v+"H-"+v+"V-"+v+"H"+v+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M"+v+","+v+"L-"+v+",-"+v+"M"+v+",-"+v+"L-"+v+","+v+"M"+v+","+v+"H-"+v+"V-"+v+"H"+v+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(p,f,x){if(a(f))return s;var v=d(1.3*p,2);return c(f,x,"M"+v+",0L0,"+v+"L-"+v+",0L0,-"+v+"ZM0,-"+v+"V"+v+"M-"+v+",0H"+v)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(p,f,x){if(a(f))return s;var v=d(1.3*p,2),g=d(.65*p,2);return c(f,x,"M"+v+",0L0,"+v+"L-"+v+",0L0,-"+v+"ZM-"+g+",-"+g+"L"+g+","+g+"M-"+g+","+g+"L"+g+",-"+g)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(p,f,x){if(a(f))return s;var v=d(1.4*p,2);return c(f,x,"M0,"+v+"V-"+v+"M"+v+",0H-"+v)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M"+v+","+v+"L-"+v+",-"+v+"M"+v+",-"+v+"L-"+v+","+v)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(p,f,x){if(a(f))return s;var v=d(1.2*p,2),g=d(.85*p,2);return c(f,x,"M0,"+v+"V-"+v+"M"+v+",0H-"+v+"M"+g+","+g+"L-"+g+",-"+g+"M"+g+",-"+g+"L-"+g+","+g)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(p,f,x){if(a(f))return s;var v=d(p/2,2),g=d(p,2);return c(f,x,"M"+v+","+g+"V-"+g+"M"+(v-g)+",-"+g+"V"+g+"M"+g+","+v+"H-"+g+"M-"+g+","+(v-g)+"H"+g)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(p,f,x){if(a(f))return s;var v=d(1.2*p,2),g=d(1.6*p,2),y=d(.8*p,2);return c(f,x,"M-"+v+","+y+"L0,0M"+v+","+y+"L0,0M0,-"+g+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(p,f,x){if(a(f))return s;var v=d(1.2*p,2),g=d(1.6*p,2),y=d(.8*p,2);return c(f,x,"M-"+v+",-"+y+"L0,0M"+v+",-"+y+"L0,0M0,"+g+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(p,f,x){if(a(f))return s;var v=d(1.2*p,2),g=d(1.6*p,2),y=d(.8*p,2);return c(f,x,"M"+y+","+v+"L0,0M"+y+",-"+v+"L0,0M-"+g+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(p,f,x){if(a(f))return s;var v=d(1.2*p,2),g=d(1.6*p,2),y=d(.8*p,2);return c(f,x,"M-"+y+","+v+"L0,0M-"+y+",-"+v+"L0,0M"+g+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(p,f,x){if(a(f))return s;var v=d(1.4*p,2);return c(f,x,"M"+v+",0H-"+v)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(p,f,x){if(a(f))return s;var v=d(1.4*p,2);return c(f,x,"M0,"+v+"V-"+v)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M"+v+",-"+v+"L-"+v+","+v)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M"+v+","+v+"L-"+v+",-"+v)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M0,0L-"+v+","+d(2*p,2)+"H"+v+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M0,0L-"+v+",-"+d(2*p,2)+"H"+v+"Z")},noDot:!0},"arrow-left":{n:47,f:function(p,f,x){if(a(f))return s;var v=d(2*p,2),g=d(p,2);return c(f,x,"M0,0L"+v+",-"+g+"V"+g+"Z")},noDot:!0},"arrow-right":{n:48,f:function(p,f,x){if(a(f))return s;var v=d(2*p,2),g=d(p,2);return c(f,x,"M0,0L-"+v+",-"+g+"V"+g+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M-"+v+",0H"+v+"M0,0L-"+v+","+d(2*p,2)+"H"+v+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(p,f,x){if(a(f))return s;var v=d(p,2);return c(f,x,"M-"+v+",0H"+v+"M0,0L-"+v+",-"+d(2*p,2)+"H"+v+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(p,f,x){if(a(f))return s;var v=d(2*p,2),g=d(p,2);return c(f,x,"M0,-"+g+"V"+g+"M0,0L"+v+",-"+g+"V"+g+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(p,f,x){if(a(f))return s;var v=d(2*p,2),g=d(p,2);return c(f,x,"M0,-"+g+"V"+g+"M0,0L-"+v+",-"+g+"V"+g+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(p,f,x){if(a(f))return s;var v=r/2.5,g=2*p*n(v),y=2*p*i(v);return c(f,x,"M0,0L"+-g+","+y+"L"+g+","+y+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(p,f,x){if(a(f))return s;var v=r/4,g=2*p*n(v),y=2*p*i(v);return c(f,x,"M0,0L"+-g+","+y+"A "+2*p+","+2*p+" 0 0 1 "+g+","+y+"Z")},backoff:.4,noDot:!0}}},25673:function($){"use strict";$.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc",_deprecated:{opacity:{valType:"number",editType:"style"}}}},84532:function($,R,e){"use strict";var k=e(92770),A=e(73972),l=e(89298),T=e(71828),b=e(45827);function d(s,t,o,r){var n=t["error_"+r]||{},i=[];if(n.visible&&-1!==["linear","log"].indexOf(o.type)){for(var a=b(n),c=0;c<s.length;c++){var p=s[c],f=p.i;if(void 0===f)f=c;else if(null===f)continue;var x=p[r];if(k(o.c2l(x))){var v=a(x,f);if(k(v[0])&&k(v[1])){var g=p[r+"s"]=x-v[0],y=p[r+"h"]=x+v[1];i.push(g,y)}}}var m=t._extremes[o._id],w=l.findExtremes(o,i,T.extendFlat({tozero:m.opts.tozero},{padded:!0}));m.min=m.min.concat(w.min),m.max=m.max.concat(w.max)}}$.exports=function(s){for(var t=s.calcdata,o=0;o<t.length;o++){var r=t[o],n=r[0].trace;if(!0===n.visible&&A.traceIs(n,"errorBarsOK")){var i=l.getFromId(s,n.xaxis),a=l.getFromId(s,n.yaxis);d(r,n,i,"x"),d(r,n,a,"y")}}}},45827:function($){"use strict";function R(e,k){return"percent"===e?function(A){return Math.abs(A*k/100)}:"constant"===e?function(){return Math.abs(k)}:"sqrt"===e?function(A){return Math.sqrt(Math.abs(A))}:void 0}$.exports=function(e){var k=e.type,A=e.symmetric;if("data"===k){var l=e.array||[];if(A)return function(s,t){var o=+l[t];return[o,o]};var T=e.arrayminus||[];return function(s,t){var o=+l[t],r=+T[t];return isNaN(o)&&isNaN(r)?[NaN,NaN]:[r||0,o||0]}}var b=R(k,e.value),d=R(k,e.valueminus);return A||void 0===e.valueminus?function(s){var t=b(s);return[t,t]}:function(s){return[d(s),b(s)]}}},97587:function($,R,e){"use strict";var k=e(92770),A=e(73972),l=e(71828),T=e(44467),b=e(25673);$.exports=function(d,s,t,o){var r="error_"+o.axis,n=T.newContainer(s,r),i=d[r]||{};function a(x,v){return l.coerce(i,n,b,x,v)}if(!1!==a("visible",void 0!==i.array||void 0!==i.value||"sqrt"===i.type)){var c=a("type","array"in i?"data":"percent"),p=!0;"sqrt"!==c&&(p=a("symmetric",!(("data"===c?"arrayminus":"valueminus")in i))),"data"===c?(a("array"),a("traceref"),p||(a("arrayminus"),a("tracerefminus"))):"percent"!==c&&"constant"!==c||(a("value"),p||a("valueminus"));var f="copy_"+o.inherit+"style";o.inherit&&(s["error_"+o.inherit]||{}).visible&&a(f,!(i.color||k(i.thickness)||k(i.width))),o.inherit&&n[f]||(a("color",t),a("thickness"),a("width",A.traceIs(s,"gl3d")?0:4))}}},37369:function($,R,e){"use strict";var k=e(71828),A=e(30962).overrideAll,l=e(25673),T={error_x:k.extendFlat({},l),error_y:k.extendFlat({},l)};delete T.error_x.copy_zstyle,delete T.error_y.copy_zstyle,delete T.error_y.copy_ystyle;var b={error_x:k.extendFlat({},l),error_y:k.extendFlat({},l),error_z:k.extendFlat({},l)};delete b.error_x.copy_ystyle,delete b.error_y.copy_ystyle,delete b.error_z.copy_ystyle,delete b.error_z.copy_zstyle,$.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:T,bar:T,histogram:T,scatter3d:A(b,"calc","nested"),scattergl:A(T,"calc","nested")}},supplyDefaults:e(97587),calc:e(84532),makeComputeError:e(45827),plot:e(19398),style:e(62662),hoverInfo:function(d,s,t){(s.error_y||{}).visible&&(t.yerr=d.yh-d.y,s.error_y.symmetric||(t.yerrneg=d.y-d.ys)),(s.error_x||{}).visible&&(t.xerr=d.xh-d.x,s.error_x.symmetric||(t.xerrneg=d.x-d.xs))}}},19398:function($,R,e){"use strict";var k=e(39898),A=e(92770),l=e(91424),T=e(34098);$.exports=function(b,d,s,t){var o=s.xaxis,r=s.yaxis,n=t&&t.duration>0;d.each(function(i){var a,c=i[0].trace,p=c.error_x||{},f=c.error_y||{};c.ids&&(a=function(y){return y.id});var x=T.hasMarkers(c)&&c.marker.maxdisplayed>0;f.visible||p.visible||(i=[]);var v=k.select(this).selectAll("g.errorbar").data(i,a);if(v.exit().remove(),i.length){p.visible||v.selectAll("path.xerror").remove(),f.visible||v.selectAll("path.yerror").remove(),v.style("opacity",1);var g=v.enter().append("g").classed("errorbar",!0);n&&g.style("opacity",0).transition().duration(t.duration).style("opacity",1),l.setClipUrl(v,s.layerClipId,b),v.each(function(y){var L,C,P,I,h=k.select(this),m=(P=r,I={x:(C=o).c2p((L=y).x),y:P.c2p(L.y)},void 0!==L.yh&&(I.yh=P.c2p(L.yh),I.ys=P.c2p(L.ys),A(I.ys)||(I.noYS=!0,I.ys=P.c2p(L.ys,!0))),void 0!==L.xh&&(I.xh=C.c2p(L.xh),I.xs=C.c2p(L.xs),A(I.xs)||(I.noXS=!0,I.xs=C.c2p(L.xs,!0))),I);if(!x||y.vis){var w,u=h.select("path.yerror");if(f.visible&&A(m.x)&&A(m.yh)&&A(m.ys)){var S=f.width;w="M"+(m.x-S)+","+m.yh+"h"+2*S+"m-"+S+",0V"+m.ys,m.noYS||(w+="m-"+S+",0h"+2*S),u.size()?n&&(u=u.transition().duration(t.duration).ease(t.easing)):u=h.append("path").style("vector-effect","non-scaling-stroke").classed("yerror",!0),u.attr("d",w)}else u.remove();var _=h.select("path.xerror");if(p.visible&&A(m.y)&&A(m.xh)&&A(m.xs)){var E=(p.copy_ystyle?f:p).width;w="M"+m.xh+","+(m.y-E)+"v"+2*E+"m0,-"+E+"H"+m.xs,m.noXS||(w+="m0,-"+E+"v"+2*E),_.size()?n&&(_=_.transition().duration(t.duration).ease(t.easing)):_=h.append("path").style("vector-effect","non-scaling-stroke").classed("xerror",!0),_.attr("d",w)}else _.remove()}})}})}},62662:function($,R,e){"use strict";var k=e(39898),A=e(7901);$.exports=function(l){l.each(function(T){var b=T[0].trace,d=b.error_y||{},s=b.error_x||{},t=k.select(this);t.selectAll("path.yerror").style("stroke-width",d.thickness+"px").call(A.stroke,d.color),s.copy_ystyle&&(s=d),t.selectAll("path.xerror").style("stroke-width",s.thickness+"px").call(A.stroke,s.color)})}},77914:function($,R,e){"use strict";var k=e(41940),A=e(528).hoverlabel,l=e(1426).extendFlat;$.exports={hoverlabel:{bgcolor:l({},A.bgcolor,{arrayOk:!0}),bordercolor:l({},A.bordercolor,{arrayOk:!0}),font:k({arrayOk:!0,editType:"none"}),align:l({},A.align,{arrayOk:!0}),namelength:l({},A.namelength,{arrayOk:!0}),editType:"none"}}},30732:function($,R,e){"use strict";var k=e(71828),A=e(73972);function l(T,b,d,s){s=s||k.identity,Array.isArray(T)&&(b[0][d]=s(T))}$.exports=function(T){var b=T.calcdata,d=T._fullLayout;function s(i){return function(a){return k.coerceHoverinfo({hoverinfo:a},{_module:i._module},d)}}for(var t=0;t<b.length;t++){var o=b[t],r=o[0].trace;if(!A.traceIs(r,"pie-like")){var n=A.traceIs(r,"2dMap")?l:k.fillArray;n(r.hoverinfo,o,"hi",s(r)),r.hovertemplate&&n(r.hovertemplate,o,"ht"),r.hoverlabel&&(n(r.hoverlabel.bgcolor,o,"hbg"),n(r.hoverlabel.bordercolor,o,"hbc"),n(r.hoverlabel.font.size,o,"hts"),n(r.hoverlabel.font.color,o,"htc"),n(r.hoverlabel.font.family,o,"htf"),n(r.hoverlabel.namelength,o,"hnl"),n(r.hoverlabel.align,o,"hta"))}}}},75914:function($,R,e){"use strict";var k=e(73972),A=e(88335).hover;$.exports=function(l,T,b){var d=k.getComponentMethod("annotations","onClick")(l,l._hoverdata);function s(){l.emit("plotly_click",{points:l._hoverdata,event:T})}void 0!==b&&A(l,T,b,!0),l._hoverdata&&T&&T.target&&(d&&d.then?d.then(s):s(),T.stopImmediatePropagation&&T.stopImmediatePropagation())}},26675:function($){"use strict";$.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}},54268:function($,R,e){"use strict";var k=e(71828),A=e(77914),l=e(38048);$.exports=function(T,b,d,s){var t=k.extendFlat({},s.hoverlabel);b.hovertemplate&&(t.namelength=-1),l(T,b,function(o,r){return k.coerce(T,b,A,o,r)},t)}},23469:function($,R,e){"use strict";var k=e(71828);R.getSubplot=function(s){return s.subplot||s.xaxis+s.yaxis||s.geo},R.isTraceInSubplots=function(s,t){if("splom"===s.type){for(var o=s.xaxes||[],r=s.yaxes||[],n=0;n<o.length;n++)for(var i=0;i<r.length;i++)if(-1!==t.indexOf(o[n]+r[i]))return!0;return!1}return-1!==t.indexOf(R.getSubplot(s))},R.flat=function(s,t){for(var o=new Array(s.length),r=0;r<s.length;r++)o[r]=t;return o},R.p2c=function(s,t){for(var o=new Array(s.length),r=0;r<s.length;r++)o[r]=s[r].p2c(t);return o},R.getDistanceFunction=function(s,t,o,r){return"closest"===s?r||R.quadrature(t,o):"x"===s.charAt(0)?t:o},R.getClosest=function(s,t,o){if(!1!==o.index)o.index>=0&&o.index<s.length?o.distance=0:o.index=!1;else for(var r=0;r<s.length;r++){var n=t(s[r]);n<=o.distance&&(o.index=r,o.distance=n)}return o},R.inbox=function(s,t,o){return s*t<0||0===s?o:1/0},R.quadrature=function(s,t){return function(o){var r=s(o),n=t(o);return Math.sqrt(r*r+n*n)}},R.makeEventData=function(s,t,o){var r="index"in s?s.index:s.pointNumber,n={data:t._input,fullData:t,curveNumber:t.index,pointNumber:r};if(t._indexToPoints){var i=t._indexToPoints[r];1===i.length?n.pointIndex=i[0]:n.pointIndices=i}else n.pointIndex=r;return t._module.eventData?n=t._module.eventData(n,s,t,o,r):("xVal"in s?n.x=s.xVal:"x"in s&&(n.x=s.x),"yVal"in s?n.y=s.yVal:"y"in s&&(n.y=s.y),s.xa&&(n.xaxis=s.xa),s.ya&&(n.yaxis=s.ya),void 0!==s.zLabelVal&&(n.z=s.zLabelVal)),R.appendArrayPointValue(n,t,r),n},R.appendArrayPointValue=function(s,t,o){var r=t._arrayAttrs;if(r)for(var n=0;n<r.length;n++){var i=r[n],a=l(i);if(void 0===s[a]){var c=T(k.nestedProperty(t,i).get(),o);void 0!==c&&(s[a]=c)}}},R.appendArrayMultiPointValues=function(s,t,o){var r=t._arrayAttrs;if(r)for(var n=0;n<r.length;n++){var i=r[n],a=l(i);if(void 0===s[a]){for(var c=k.nestedProperty(t,i).get(),p=new Array(o.length),f=0;f<o.length;f++)p[f]=T(c,o[f]);s[a]=p}}};var A={ids:"id",locations:"location",labels:"label",values:"value","marker.colors":"color",parents:"parent"};function l(s){return A[s]||s}function T(s,t){return Array.isArray(t)?Array.isArray(s)&&Array.isArray(s[t[0]])?s[t[0]][t[1]]:void 0:s[t]}var b={x:!0,y:!0},d={"x unified":!0,"y unified":!0};R.isUnifiedHover=function(s){return"string"==typeof s&&!!d[s]},R.isXYhover=function(s){return"string"==typeof s&&!!b[s]}},88335:function($,R,e){"use strict";var k=e(39898),A=e(92770),l=e(84267),T=e(71828),b=T.strTranslate,d=T.strRotate,s=e(11086),t=e(63893),o=e(39918),r=e(91424),n=e(7901),i=e(28569),a=e(89298),c=e(73972),p=e(23469),f=e(26675),x=e(99017),v=e(43969),g=f.YANGLE,y=Math.PI*g/180,h=1/Math.sin(y),m=Math.cos(y),w=Math.sin(y),u=f.HOVERARROWSIZE,S=f.HOVERTEXTPAD,_={box:!0,ohlc:!0,violin:!0,candlestick:!0},E={scatter:!0,scattergl:!0,splom:!0};function L(V){return[V.trace.index,V.index,V.x0,V.y0,V.name,V.attr,V.xa?V.xa._id:"",V.ya?V.ya._id:""].join(",")}R.hover=function(V,W,X,K){V=T.getGraphDiv(V);var re=W.target;T.throttle(V._fullLayout._uid+f.HOVERID,f.HOVERMINTIME,function(){!function(ee,ie,oe,ce,me){oe||(oe="xy");var de=Array.isArray(oe)?oe:[oe],he=ee._fullLayout,ve=he._plots||[],Pe=ve[oe],xe=he._has("cartesian");if(Pe){var ke=Pe.overlays.map(function(qn){return qn.id});de=de.concat(ke)}for(var Ae=de.length,Te=new Array(Ae),Q=new Array(Ae),se=!1,fe=0;fe<Ae;fe++){var ye=de[fe];if(ve[ye])se=!0,Te[fe]=ve[ye].xaxis,Q[fe]=ve[ye].yaxis;else{if(!he[ye]||!he[ye]._subplot)return void T.warn("Unrecognized subplot: "+ye);var Me=he[ye]._subplot;Te[fe]=Me.xaxis,Q[fe]=Me.yaxis}}var Ie=ie.hovermode||he.hovermode;if(Ie&&!se&&(Ie="closest"),-1===["x","y","closest","x unified","y unified"].indexOf(Ie)||!ee.calcdata||ee.querySelector(".zoombox")||ee._dragging)return i.unhoverRaw(ee,ie);var Ce=he.hoverdistance;-1===Ce&&(Ce=1/0);var Re=he.spikedistance;-1===Re&&(Re=1/0);var le,ge,_e,Fe,Ve,He,nt,tt,ot,dt,kt,mt,wt,Lt=[],Ct=[],It={hLinePoint:null,vLinePoint:null},Ut=!1;if(Array.isArray(ie))for(Ie="array",_e=0;_e<ie.length;_e++)(Ve=ee.calcdata[ie[_e].curveNumber||0])&&(He=Ve[0].trace,"skip"!==Ve[0].trace.hoverinfo&&(Ct.push(Ve),"h"===He.orientation&&(Ut=!0)));else{for(Fe=0;Fe<ee.calcdata.length;Fe++)"skip"!==(He=(Ve=ee.calcdata[Fe])[0].trace).hoverinfo&&p.isTraceInSubplots(He,de)&&(Ct.push(Ve),"h"===He.orientation&&(Ut=!0));var Rt,Ge;if(me){if(!1===s.triggerHandler(ee,"plotly_beforehover",ie))return;var We=me.getBoundingClientRect();Rt=ie.clientX-We.left,Ge=ie.clientY-We.top,he._calcInverseTransform(ee);var Be=T.apply3DTransform(he._invTransform)(Rt,Ge);if(Ge=Be[1],(Rt=Be[0])<0||Rt>Te[0]._length||Ge<0||Ge>Q[0]._length)return i.unhoverRaw(ee,ie)}else Rt="xpx"in ie?ie.xpx:Te[0]._length/2,Ge="ypx"in ie?ie.ypx:Q[0]._length/2;if(ie.pointerX=Rt+Te[0]._offset,ie.pointerY=Ge+Q[0]._offset,le="xval"in ie?p.flat(de,ie.xval):p.p2c(Te,Rt),ge="yval"in ie?p.flat(de,ie.yval):p.p2c(Q,Ge),!A(le[0])||!A(ge[0]))return T.warn("Fx.hover failed",ie,ee),i.unhoverRaw(ee,ie)}var Ye=1/0;function rt(qn,ur){for(Fe=0;Fe<Ct.length;Fe++)if((Ve=Ct[Fe])&&Ve[0]&&Ve[0].trace&&!0===(He=Ve[0].trace).visible&&0!==He._length&&-1===["carpet","contourcarpet"].indexOf(He._module.name)){if("splom"===He.type?nt=de[tt=0]:(nt=p.getSubplot(He),tt=de.indexOf(nt)),p.isUnifiedHover(ot=Ie)&&(ot=ot.charAt(0)),mt={cd:Ve,trace:He,xa:Te[tt],ya:Q[tt],maxHoverDistance:Ce,maxSpikeDistance:Re,index:!1,distance:Math.min(Ye,Ce),spikeDistance:1/0,xSpike:void 0,ySpike:void 0,color:n.defaultLine,name:He.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},he[nt]&&(mt.subplot=he[nt]._subplot),he._splomScenes&&he._splomScenes[He.uid]&&(mt.scene=he._splomScenes[He.uid]),wt=Lt.length,"array"===ot){var Zt=ie[Fe];"pointNumber"in Zt?(mt.index=Zt.pointNumber,ot="closest"):(ot="","xval"in Zt&&(dt=Zt.xval,ot="x"),"yval"in Zt&&(kt=Zt.yval,ot=ot?"closest":"y"))}else void 0!==qn&&void 0!==ur?(dt=qn,kt=ur):(dt=le[tt],kt=ge[tt]);if(0!==Ce)if(He._module&&He._module.hoverPoints){var nn=He._module.hoverPoints(mt,dt,kt,ot,{finiteRange:!0,hoverLayer:he._hoverlayer});if(nn)for(var zn,_n=0;_n<nn.length;_n++)A((zn=nn[_n]).x0)&&A(zn.y0)&&Lt.push(z(zn,Ie))}else T.log("Unrecognized trace type in hover:",He);if("closest"===Ie&&Lt.length>wt&&(Lt.splice(0,wt),Ye=Lt[0].distance),xe&&0!==Re&&0===Lt.length){mt.distance=Re,mt.index=!1;var Cn=He._module.hoverPoints(mt,dt,kt,"closest",{hoverLayer:he._hoverlayer});if(Cn&&(Cn=Cn.filter(function(kn){return kn.spikeDistance<=Re})),Cn&&Cn.length){var Un,Gn=Cn.filter(function(kn){return kn.xa.showspikes&&"hovered data"!==kn.xa.spikesnap});if(Gn.length){var ar=Gn[0];A(ar.x0)&&A(ar.y0)&&(Un=ze(ar),(!It.vLinePoint||It.vLinePoint.spikeDistance>Un.spikeDistance)&&(It.vLinePoint=Un))}var yr=Cn.filter(function(kn){return kn.ya.showspikes&&"hovered data"!==kn.ya.spikesnap});if(yr.length){var $t=yr[0];A($t.x0)&&A($t.y0)&&(Un=ze($t),(!It.hLinePoint||It.hLinePoint.spikeDistance>Un.spikeDistance)&&(It.hLinePoint=Un))}}}}}function Se(qn,ur,Zt){for(var nn,zn=null,_n=1/0,Cn=0;Cn<qn.length;Cn++)nn=qn[Cn].spikeDistance,Zt&&0===Cn&&(nn=-1/0),nn<=_n&&nn<=ur&&(zn=qn[Cn],_n=nn);return zn}function ze(qn){return qn?{xa:qn.xa,ya:qn.ya,x:void 0!==qn.xSpike?qn.xSpike:(qn.x0+qn.x1)/2,y:void 0!==qn.ySpike?qn.ySpike:(qn.y0+qn.y1)/2,distance:qn.distance,spikeDistance:qn.spikeDistance,curveNumber:qn.trace.index,color:qn.color,pointNumber:qn.index}:null}rt();var Ke={fullLayout:he,container:he._hoverlayer,event:ie},st=ee._spikepoints;ee._spikepoints={vLinePoint:It.vLinePoint,hLinePoint:It.hLinePoint};var Tt=function(){Lt.sort(function(qn,ur){return qn.distance-ur.distance}),Lt=function(qn,ur){for(var Zt=ur.charAt(0),nn=[],zn=[],_n=[],Cn=0;Cn<qn.length;Cn++){var Un=qn[Cn];c.traceIs(Un.trace,"bar-like")||c.traceIs(Un.trace,"box-violin")?_n.push(Un):Un.trace[Zt+"period"]?zn.push(Un):nn.push(Un)}return nn.concat(zn).concat(_n)}(Lt,Ie)};Tt();var Et=Ie.charAt(0),At=("x"===Et||"y"===Et)&&Lt[0]&&E[Lt[0].trace.type];if(xe&&0!==Re&&0!==Lt.length){var ht=Se(Lt.filter(function(qn){return qn.ya.showspikes}),Re,At);It.hLinePoint=ze(ht);var pt=Se(Lt.filter(function(qn){return qn.xa.showspikes}),Re,At);It.vLinePoint=ze(pt)}if(0===Lt.length){var gt=i.unhoverRaw(ee,ie);return!xe||null===It.hLinePoint&&null===It.vLinePoint||F(st)&&H(ee,It,Ke),gt}if(xe&&F(st)&&H(ee,It,Ke),p.isXYhover(ot)&&0!==Lt[0].length&&"splom"!==Lt[0].trace.type){var Pt=Lt[0],Ot=(Lt=_[Pt.trace.type]?Lt.filter(function(qn){return qn.trace.index===Pt.trace.index}):[Pt]).length;rt(B("x",Pt,he),B("y",Pt,he));var Ht,jt=[],Nt={},Gt=0,un=function(qn){var ur=_[qn.trace.type]?L(qn):qn.trace.index;if(Nt[ur]){var Zt=Nt[ur]-1,nn=jt[Zt];Zt>0&&Math.abs(qn.distance)<Math.abs(nn.distance)&&(jt[Zt]=qn)}else Gt++,Nt[ur]=Gt,jt.push(qn)};for(Ht=0;Ht<Ot;Ht++)un(Lt[Ht]);for(Ht=Lt.length-1;Ht>Ot-1;Ht--)un(Lt[Ht]);Lt=jt,Tt()}var pn=ee._hoverdata,Kt=[],wn=j(ee),Bn=J(ee);for(_e=0;_e<Lt.length;_e++){var vn=Lt[_e],cn=p.makeEventData(vn,vn.trace,vn.cd);if(!1!==vn.hovertemplate){var dn=!1;vn.cd[vn.index]&&vn.cd[vn.index].ht&&(dn=vn.cd[vn.index].ht),vn.hovertemplate=dn||vn.trace.hovertemplate||!1}if(vn.xa&&vn.ya){var sn=vn.x0+vn.xa._offset,hn=vn.x1+vn.xa._offset,En=vn.y0+vn.ya._offset,Mn=vn.y1+vn.ya._offset,Rn=Math.min(sn,hn),Nn=Math.max(sn,hn),Fn=Math.min(En,Mn),rr=Math.max(En,Mn);cn.bbox={x0:Rn+Bn,x1:Nn+Bn,y0:Fn+wn,y1:rr+wn}}vn.eventData=[cn],Kt.push(cn)}ee._hoverdata=Kt;var $n="y"===Ie&&(Ct.length>1||Lt.length>1)||"closest"===Ie&&Ut&&Lt.length>1,mr=n.combine(he.plot_bgcolor||n.background,he.paper_bgcolor),fr=P(Lt,{gd:ee,hovermode:Ie,rotateLabels:$n,bgColor:mr,container:he._hoverlayer,outerContainer:he._paper.node(),commonLabelOpts:he.hoverlabel,hoverdistance:he.hoverdistance});if(p.isUnifiedHover(Ie)||(function(qn,ur,Zt){var nn,zn,_n,Cn,Un,Gn,ar,yr=0,$t=1,kn=qn.size(),zt=new Array(kn),Wt=0;function tn(yn){var Ln=yn[0],Hn=yn[yn.length-1];if(_n=Hn.pos+Hn.dp+Hn.size-Ln.pmax,(zn=Ln.pmin-Ln.pos-Ln.dp+Ln.size)>.01){for(Un=yn.length-1;Un>=0;Un--)yn[Un].dp+=zn;nn=!1}if(!(_n<.01)){if(zn<-.01){for(Un=yn.length-1;Un>=0;Un--)yn[Un].dp-=_n;nn=!1}if(nn){var Wn=0;for(Cn=0;Cn<yn.length;Cn++)(Gn=yn[Cn]).pos+Gn.dp+Gn.size>Ln.pmax&&Wn++;for(Cn=yn.length-1;Cn>=0&&!(Wn<=0);Cn--)(Gn=yn[Cn]).pos>Ln.pmax-1&&(Gn.del=!0,Wn--);for(Cn=0;Cn<yn.length&&!(Wn<=0);Cn++)if((Gn=yn[Cn]).pos<Ln.pmin+1)for(Gn.del=!0,Wn--,_n=2*Gn.size,Un=yn.length-1;Un>=0;Un--)yn[Un].dp-=_n;for(Cn=yn.length-1;Cn>=0&&!(Wn<=0);Cn--)(Gn=yn[Cn]).pos+Gn.dp+Gn.size>Ln.pmax&&(Gn.del=!0,Wn--)}}}for(qn.each(function(yn){var Ln=yn[ur],Hn="x"===Ln._id.charAt(0),Wn=Ln.range;0===Wt&&Wn&&Wn[0]>Wn[1]!==Hn&&($t=-1),zt[Wt++]=[{datum:yn,traceIndex:yn.trace.index,dp:0,pos:yn.pos,posref:yn.posref,size:yn.by*(Hn?h:1)/2,pmin:0,pmax:Hn?Zt.width:Zt.height}]}),zt.sort(function(yn,Ln){return yn[0].posref-Ln[0].posref||$t*(Ln[0].traceIndex-yn[0].traceIndex)});!nn&&yr<=kn;){for(yr++,nn=!0,Cn=0;Cn<zt.length-1;){var Sn=zt[Cn],An=zt[Cn+1],Tn=Sn[Sn.length-1],an=An[0];if((zn=Tn.pos+Tn.dp+Tn.size-an.pos-an.dp+an.size)>.01&&Tn.pmin===an.pmin&&Tn.pmax===an.pmax){for(Un=An.length-1;Un>=0;Un--)An[Un].dp+=zn;for(Sn.push.apply(Sn,An),zt.splice(Cn+1,1),ar=0,Un=Sn.length-1;Un>=0;Un--)ar+=Sn[Un].dp;for(_n=ar/Sn.length,Un=Sn.length-1;Un>=0;Un--)Sn[Un].dp-=_n;nn=!1}else Cn++}zt.forEach(tn)}for(Cn=zt.length-1;Cn>=0;Cn--){var mn=zt[Cn];for(Un=mn.length-1;Un>=0;Un--){var on=mn[Un],fn=on.datum;fn.offset=on.dp,fn.del=on.del}}}(fr,$n?"xa":"ya",he),U(fr,$n,he._invScaleX,he._invScaleY)),me&&me.tagName){var Zn=c.getComponentMethod("annotations","hasClickToShow")(ee,Kt);o(k.select(me),Zn?"pointer":"")}me&&!ce&&function(qn,ur,Zt){if(!Zt||Zt.length!==qn._hoverdata.length)return!0;for(var nn=Zt.length-1;nn>=0;nn--){var zn=Zt[nn],_n=qn._hoverdata[nn];if(zn.curveNumber!==_n.curveNumber||String(zn.pointNumber)!==String(_n.pointNumber)||String(zn.pointNumbers)!==String(_n.pointNumbers))return!0}return!1}(ee,0,pn)&&(pn&&ee.emit("plotly_unhover",{event:ie,points:pn}),ee.emit("plotly_hover",{event:ie,points:ee._hoverdata,xaxes:Te,yaxes:Q,xvals:le,yvals:ge}))}(V,W,X,K,re)})},R.loneHover=function(V,W){var X=!0;Array.isArray(V)||(X=!1,V=[V]);var K=W.gd,re=j(K),ee=J(K),ie=P(V.map(function(me){var de=me._x0||me.x0||me.x||0,he=me._x1||me.x1||me.x||0,ve=me._y0||me.y0||me.y||0,Pe=me._y1||me.y1||me.y||0,xe=me.eventData;if(xe){var ke=Math.min(de,he),Ae=Math.max(de,he),Te=Math.min(ve,Pe),Q=Math.max(ve,Pe),se=me.trace;if(c.traceIs(se,"gl3d")){var fe=K._fullLayout[se.scene]._scene.container,ye=fe.offsetLeft,Me=fe.offsetTop;ke+=ye,Ae+=ye,Te+=Me,Q+=Me}xe.bbox={x0:ke+ee,x1:Ae+ee,y0:Te+re,y1:Q+re},W.inOut_bbox&&W.inOut_bbox.push(xe.bbox)}else xe=!1;return{color:me.color||n.defaultLine,x0:me.x0||me.x||0,x1:me.x1||me.x||0,y0:me.y0||me.y||0,y1:me.y1||me.y||0,xLabel:me.xLabel,yLabel:me.yLabel,zLabel:me.zLabel,text:me.text,name:me.name,idealAlign:me.idealAlign,borderColor:me.borderColor,fontFamily:me.fontFamily,fontSize:me.fontSize,fontColor:me.fontColor,nameLength:me.nameLength,textAlign:me.textAlign,trace:me.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:me.hovertemplate||!1,hovertemplateLabels:me.hovertemplateLabels||!1,eventData:xe}}),{gd:K,hovermode:"closest",rotateLabels:!1,bgColor:W.bgColor||n.background,container:k.select(W.container),outerContainer:W.outerContainer||W.container}),oe=0,ce=0;return ie.sort(function(me,de){return me.y0-de.y0}).each(function(me,de){var he=me.y0-me.by/2;me.offset=he-5<oe?oe-he+5:0,oe=he+me.by+me.offset,de===W.anchorIndex&&(ce=me.offset)}).each(function(me){me.offset-=ce}),U(ie,!1,K._fullLayout._invScaleX,K._fullLayout._invScaleY),X?ie:ie.node()};var C=/<extra>([\s\S]*)<\/extra>/;function P(V,W){var X=W.gd,K=X._fullLayout,re=W.hovermode,ee=W.rotateLabels,ie=W.bgColor,oe=W.container,ce=W.outerContainer,me=W.commonLabelOpts||{};if(0===V.length)return[[]];var de=W.fontFamily||f.HOVERFONT,he=W.fontSize||f.HOVERFONTSIZE,ve=V[0],Pe=ve.xa,xe=ve.ya,ke=re.charAt(0),Ae=ke+"Label",Te=ve[Ae];if(void 0===Te&&"multicategory"===Pe.type)for(var Q=0;Q<V.length&&void 0===(Te=V[Q][Ae]);Q++);var se=G(X,ce),fe=se.top,ye=se.width,Me=se.height,Ie=void 0!==Te&&ve.distance<=W.hoverdistance&&("x"===re||"y"===re);if(Ie){var Ce,Re,le=!0;for(Ce=0;Ce<V.length;Ce++)if(le&&void 0===V[Ce].zLabel&&(le=!1),Re=V[Ce].hoverinfo||V[Ce].trace.hoverinfo){var ge=Array.isArray(Re)?Re:Re.split("+");if(-1===ge.indexOf("all")&&-1===ge.indexOf(re)){Ie=!1;break}}le&&(Ie=!1)}var _e=oe.selectAll("g.axistext").data(Ie?[0]:[]);if(_e.enter().append("g").classed("axistext",!0),_e.exit().remove(),_e.each(function(){var pt=k.select(this),gt=T.ensureSingle(pt,"path","",function(Nn){Nn.style({"stroke-width":"1px"})}),Pt=T.ensureSingle(pt,"text","",function(Nn){Nn.attr("data-notex",1)}),Ot=me.bgcolor||n.defaultLine,Ht=me.bordercolor||n.contrast(Ot),jt=n.contrast(Ot),Nt={family:me.font.family||de,size:me.font.size||he,color:me.font.color||jt};gt.style({fill:Ot,stroke:Ht}),Pt.text(Te).call(r.font,Nt).call(t.positionText,0,0).call(t.convertToTspans,X),pt.attr("transform","");var Gt,un,pn=G(X,Pt.node());if("x"===re){var Kt="top"===Pe.side?"-":"";Pt.attr("text-anchor","middle").call(t.positionText,0,"top"===Pe.side?fe-pn.bottom-u-S:fe-pn.top+u+S),un=xe._offset+("top"===Pe.side?0:xe._length);var wn=pn.width/2+S;(Gt=Pe._offset+(ve.x0+ve.x1)/2)<wn?(Gt=wn,gt.attr("d","M-"+(wn-u)+",0L-"+(wn-2*u)+","+Kt+u+"H"+(S+pn.width/2)+"v"+Kt+(2*S+pn.height)+"H-"+wn+"V"+Kt+u+"Z")):Gt>K.width-wn?(Gt=K.width-wn,gt.attr("d","M"+(wn-u)+",0L"+wn+","+Kt+u+"v"+Kt+(2*S+pn.height)+"H-"+wn+"V"+Kt+u+"H"+(wn-2*u)+"Z")):gt.attr("d","M0,0L"+u+","+Kt+u+"H"+(S+pn.width/2)+"v"+Kt+(2*S+pn.height)+"H-"+(S+pn.width/2)+"V"+Kt+u+"H-"+u+"Z")}else{var Bn,vn,cn;"right"===xe.side?(Bn="start",vn=1,cn="",Gt=Pe._offset+Pe._length):(Bn="end",vn=-1,cn="-",Gt=Pe._offset),un=xe._offset+(ve.y0+ve.y1)/2,Pt.attr("text-anchor",Bn),gt.attr("d","M0,0L"+cn+u+","+u+"V"+(S+pn.height/2)+"h"+cn+(2*S+pn.width)+"V-"+(S+pn.height/2)+"H"+cn+u+"V-"+u+"Z");var dn,sn=pn.height/2,hn=fe-pn.top-sn,En="clip"+K._uid+"commonlabel"+xe._id;if(Gt<pn.width+2*S+u){dn="M-"+(u+S)+"-"+sn+"h-"+(pn.width-S)+"V"+sn+"h"+(pn.width-S)+"Z";var Mn=pn.width-Gt+S;t.positionText(Pt,Mn,hn),"end"===Bn&&Pt.selectAll("tspan").each(function(){var Nn=k.select(this),Fn=r.tester.append("text").text(Nn.text()).call(r.font,Nt),rr=G(X,Fn.node());Math.round(rr.width)<Math.round(pn.width)&&Nn.attr("x",Mn-rr.width),Fn.remove()})}else t.positionText(Pt,vn*(S+u),hn),dn=null;var Rn=K._topclips.selectAll("#"+En).data(dn?[0]:[]);Rn.enter().append("clipPath").attr("id",En).append("path"),Rn.exit().remove(),Rn.select("path").attr("d",dn),r.setClipUrl(Pt,dn?En:null,X)}pt.attr("transform",b(Gt,un))}),p.isUnifiedHover(re)){oe.selectAll("g.hovertext").remove();var Fe=V.filter(function(pt){return"none"!==pt.hoverinfo});if(0===Fe.length)return;var Ve=K.hoverlabel,He=Ve.font,tt={font:He};x({showlegend:!0,legend:{title:{text:Te,font:He},font:He,bgcolor:Ve.bgcolor,bordercolor:Ve.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:K.legend?K.legend.traceorder:void 0,orientation:"v"}},tt,X._fullData);var ot=tt.legend;ot.entries=[];for(var dt=0;dt<Fe.length;dt++){var kt=Fe[dt];if("none"!==kt.hoverinfo){var mt=I(kt,!0,re,K,Te),wt=mt[0],Lt=mt[1];kt.name=Lt,kt.text=""!==Lt?Lt+" : "+wt:wt;var Ct=kt.cd[kt.index];Ct&&(Ct.mc&&(kt.mc=Ct.mc),Ct.mcc&&(kt.mc=Ct.mcc),Ct.mlc&&(kt.mlc=Ct.mlc),Ct.mlcc&&(kt.mlc=Ct.mlcc),Ct.mlw&&(kt.mlw=Ct.mlw),Ct.mrc&&(kt.mrc=Ct.mrc),Ct.dir&&(kt.dir=Ct.dir)),kt._distinct=!0,ot.entries.push([kt])}}ot.entries.sort(function(pt,gt){return pt[0].trace.index-gt[0].trace.index}),ot.layer=oe,ot._inHover=!0,ot._groupTitleFont=Ve.grouptitlefont,v(X,ot);var It,Ut,Rt,Ge,We=oe.select("g.legend"),Be=G(X,We.node()),Ye=Be.width+2*S,rt=Be.height+2*S,Se=Fe[0],ze=(Se.x0+Se.x1)/2,Ke=(Se.y0+Se.y1)/2,st=!(c.traceIs(Se.trace,"bar-like")||c.traceIs(Se.trace,"box-violin"));"y"===ke?st?(Ut=Ke-S,It=Ke+S):(Ut=Math.min.apply(null,Fe.map(function(pt){return Math.min(pt.y0,pt.y1)})),It=Math.max.apply(null,Fe.map(function(pt){return Math.max(pt.y0,pt.y1)}))):Ut=It=T.mean(Fe.map(function(pt){return(pt.y0+pt.y1)/2}))-rt/2,"x"===ke?st?(Rt=ze+S,Ge=ze-S):(Rt=Math.max.apply(null,Fe.map(function(pt){return Math.max(pt.x0,pt.x1)})),Ge=Math.min.apply(null,Fe.map(function(pt){return Math.min(pt.x0,pt.x1)}))):Rt=Ge=T.mean(Fe.map(function(pt){return(pt.x0+pt.x1)/2}))-Ye/2;var ct,Tt,Et=Pe._offset,At=xe._offset;return Ge+=Et-Ye,Ut+=At-rt,ct=(Rt+=Et)+Ye<ye&&Rt>=0?Rt:Ge+Ye<ye&&Ge>=0?Ge:Et+Ye<ye?Et:Rt-ze<ze-Ge+Ye?ye-Ye:0,Tt=(It+=At)+rt<Me&&It>=0?It:Ut+rt<Me&&Ut>=0?Ut:At+rt<Me?At:It-Ke<Ke-Ut+rt?Me-rt:0,We.attr("transform",b((ct+=S)-1,(Tt+=S)-1)),We}var ht=oe.selectAll("g.hovertext").data(V,function(pt){return L(pt)});return ht.enter().append("g").classed("hovertext",!0).each(function(){var pt=k.select(this);pt.append("rect").call(n.fill,n.addOpacity(ie,.8)),pt.append("text").classed("name",!0),pt.append("path").style("stroke-width","1px"),pt.append("text").classed("nums",!0).call(r.font,de,he)}),ht.exit().remove(),ht.each(function(pt){var gt=k.select(this).attr("transform",""),Pt=pt.color;Array.isArray(Pt)&&(Pt=Pt[pt.eventData[0].pointNumber]);var Ot=pt.bgcolor||Pt,Ht=n.combine(n.opacity(Ot)?Ot:n.defaultLine,ie),jt=n.combine(n.opacity(Pt)?Pt:n.defaultLine,ie),Nt=pt.borderColor||n.contrast(Ht),Gt=I(pt,Ie,re,K,Te,gt),un=Gt[0],pn=Gt[1],Kt=gt.select("text.nums").call(r.font,pt.fontFamily||de,pt.fontSize||he,pt.fontColor||Nt).text(un).attr("data-notex",1).call(t.positionText,0,0).call(t.convertToTspans,X),wn=gt.select("text.name"),Bn=0,vn=0;if(pn&&pn!==un){wn.call(r.font,pt.fontFamily||de,pt.fontSize||he,jt).text(pn).attr("data-notex",1).call(t.positionText,0,0).call(t.convertToTspans,X);var cn=G(X,wn.node());Bn=cn.width+2*S,vn=cn.height+2*S}else wn.remove(),gt.select("rect").remove();gt.select("path").style({fill:Ht,stroke:Nt});var dn=pt.xa._offset+(pt.x0+pt.x1)/2,sn=pt.ya._offset+(pt.y0+pt.y1)/2,hn=Math.abs(pt.x1-pt.x0),En=Math.abs(pt.y1-pt.y0),Mn=G(X,Kt.node()),Rn=Mn.width/K._invScaleX,Nn=Mn.height/K._invScaleY;pt.ty0=(fe-Mn.top)/K._invScaleY,pt.bx=Rn+2*S,pt.by=Math.max(Nn+2*S,vn),pt.anchor="start",pt.txwidth=Rn,pt.tx2width=Bn,pt.offset=0;var Fn,rr,$n=(Rn+u+S+Bn)*K._invScaleX;if(ee)pt.pos=dn,Fn=sn+En/2+$n<=Me,rr=sn-En/2-$n>=0,"top"!==pt.idealAlign&&Fn||!rr?Fn?(sn+=En/2,pt.anchor="start"):pt.anchor="middle":(sn-=En/2,pt.anchor="end");else if(pt.pos=sn,Fn=dn+hn/2+$n<=ye,rr=dn-hn/2-$n>=0,"left"!==pt.idealAlign&&Fn||!rr)if(Fn)dn+=hn/2,pt.anchor="start";else{pt.anchor="middle";var mr=$n/2,fr=dn+mr-ye,Zn=dn-mr;fr>0&&(dn-=fr),Zn<0&&(dn+=-Zn)}else dn-=hn/2,pt.anchor="end";Kt.attr("text-anchor",pt.anchor),Bn&&wn.attr("text-anchor",pt.anchor),gt.attr("transform",b(dn,sn)+(ee?d(g):""))}),ht}function I(V,W,X,K,re,ee){var ie="",oe="";void 0!==V.nameOverride&&(V.name=V.nameOverride),V.name&&(V.trace._meta&&(V.name=T.templateString(V.name,V.trace._meta)),ie=N(V.name,V.nameLength));var ce=X.charAt(0);void 0!==V.zLabel?(void 0!==V.xLabel&&(oe+="x: "+V.xLabel+"<br>"),void 0!==V.yLabel&&(oe+="y: "+V.yLabel+"<br>"),"choropleth"!==V.trace.type&&"choroplethmapbox"!==V.trace.type&&(oe+=(oe?"z: ":"")+V.zLabel)):W&&V[ce+"Label"]===re?oe=V[("x"===ce?"y":"x")+"Label"]||"":void 0===V.xLabel?void 0!==V.yLabel&&"scattercarpet"!==V.trace.type&&(oe=V.yLabel):oe=void 0===V.yLabel?V.xLabel:"("+V.xLabel+", "+V.yLabel+")",!V.text&&0!==V.text||Array.isArray(V.text)||(oe+=(oe?"<br>":"")+V.text),void 0!==V.extraText&&(oe+=(oe?"<br>":"")+V.extraText),ee&&""===oe&&!V.hovertemplate&&(""===ie&&ee.remove(),oe=ie);var de=V.hovertemplate||!1;if(de){var he=V.hovertemplateLabels||V;V[ce+"Label"]!==re&&(he[ce+"other"]=he[ce+"Val"],he[ce+"otherLabel"]=he[ce+"Label"]),oe=(oe=T.hovertemplateString(de,he,K._d3locale,V.eventData[0]||{},V.trace._meta)).replace(C,function(ve,Pe){return ie=N(Pe,V.nameLength),""})}return[oe,ie]}function U(V,W,X,K){var re=function(ie){return ie*X},ee=function(ie){return ie*K};V.each(function(ie){var oe=k.select(this);if(ie.del)return oe.remove();var ce=oe.select("text.nums"),me=ie.anchor,de="end"===me?-1:1,he={start:1,end:-1,middle:0}[me],ve=he*(u+S),Pe=ve+he*(ie.txwidth+S),xe=0,ke=ie.offset,Ae="middle"===me;Ae&&(ve-=ie.tx2width/2,Pe+=ie.txwidth/2+S),W&&(ke*=-w,xe=ie.offset*m),oe.select("path").attr("d",Ae?"M-"+re(ie.bx/2+ie.tx2width/2)+","+ee(ke-ie.by/2)+"h"+re(ie.bx)+"v"+ee(ie.by)+"h-"+re(ie.bx)+"Z":"M0,0L"+re(de*u+xe)+","+ee(u+ke)+"v"+ee(ie.by/2-u)+"h"+re(de*ie.bx)+"v-"+ee(ie.by)+"H"+re(de*u+xe)+"V"+ee(ke-u)+"Z");var Te=xe+ve,Q=ke+ie.ty0-ie.by/2+S,se=ie.textAlign||"auto";"auto"!==se&&("left"===se&&"start"!==me?(ce.attr("text-anchor","start"),Te=Ae?-ie.bx/2-ie.tx2width/2+S:-ie.bx-S):"right"===se&&"end"!==me&&(ce.attr("text-anchor","end"),Te=Ae?ie.bx/2-ie.tx2width/2-S:ie.bx+S)),ce.call(t.positionText,re(Te),ee(Q)),ie.tx2width&&(oe.select("text.name").call(t.positionText,re(Pe+he*S+xe),ee(ke+ie.ty0-ie.by/2+S)),oe.select("rect").call(r.setRect,re(Pe+(he-1)*ie.tx2width/2+xe),ee(ke-ie.by/2-1),re(ie.tx2width),ee(ie.by+2)))})}function z(V,W){var X=V.index,K=V.trace||{},re=V.cd[0],ee=V.cd[X]||{};function ie(ve){return ve||A(ve)&&0===ve}var oe=Array.isArray(X)?function(ve,Pe){var xe=T.castOption(re,X,ve);return ie(xe)?xe:T.extractOption({},K,"",Pe)}:function(ve,Pe){return T.extractOption(ee,K,ve,Pe)};function ce(ve,Pe,xe){var ke=oe(Pe,xe);ie(ke)&&(V[ve]=ke)}if(ce("hoverinfo","hi","hoverinfo"),ce("bgcolor","hbg","hoverlabel.bgcolor"),ce("borderColor","hbc","hoverlabel.bordercolor"),ce("fontFamily","htf","hoverlabel.font.family"),ce("fontSize","hts","hoverlabel.font.size"),ce("fontColor","htc","hoverlabel.font.color"),ce("nameLength","hnl","hoverlabel.namelength"),ce("textAlign","hta","hoverlabel.align"),V.posref="y"===W||"closest"===W&&"h"===K.orientation?V.xa._offset+(V.x0+V.x1)/2:V.ya._offset+(V.y0+V.y1)/2,V.x0=T.constrain(V.x0,0,V.xa._length),V.x1=T.constrain(V.x1,0,V.xa._length),V.y0=T.constrain(V.y0,0,V.ya._length),V.y1=T.constrain(V.y1,0,V.ya._length),void 0!==V.xLabelVal&&(V.xLabel="xLabel"in V?V.xLabel:a.hoverLabelText(V.xa,V.xLabelVal,K.xhoverformat),V.xVal=V.xa.c2d(V.xLabelVal)),void 0!==V.yLabelVal&&(V.yLabel="yLabel"in V?V.yLabel:a.hoverLabelText(V.ya,V.yLabelVal,K.yhoverformat),V.yVal=V.ya.c2d(V.yLabelVal)),void 0!==V.zLabelVal&&void 0===V.zLabel&&(V.zLabel=String(V.zLabelVal)),!(isNaN(V.xerr)||"log"===V.xa.type&&V.xerr<=0)){var me=a.tickText(V.xa,V.xa.c2l(V.xerr),"hover").text;V.xLabel+=void 0!==V.xerrneg?" +"+me+" / -"+a.tickText(V.xa,V.xa.c2l(V.xerrneg),"hover").text:" \xb1 "+me,"x"===W&&(V.distance+=1)}if(!(isNaN(V.yerr)||"log"===V.ya.type&&V.yerr<=0)){var de=a.tickText(V.ya,V.ya.c2l(V.yerr),"hover").text;V.yLabel+=void 0!==V.yerrneg?" +"+de+" / -"+a.tickText(V.ya,V.ya.c2l(V.yerrneg),"hover").text:" \xb1 "+de,"y"===W&&(V.distance+=1)}var he=V.hoverinfo||V.trace.hoverinfo;return he&&"all"!==he&&(-1===(he=Array.isArray(he)?he:he.split("+")).indexOf("x")&&(V.xLabel=void 0),-1===he.indexOf("y")&&(V.yLabel=void 0),-1===he.indexOf("z")&&(V.zLabel=void 0),-1===he.indexOf("text")&&(V.text=void 0),-1===he.indexOf("name")&&(V.name=void 0)),V}function H(V,W,X){var K,re,ee=X.container,ie=X.fullLayout,oe=ie._size,ce=X.event,me=!!W.hLinePoint,de=!!W.vLinePoint;if(ee.selectAll(".spikeline").remove(),de||me){var he=n.combine(ie.plot_bgcolor,ie.paper_bgcolor);if(me){var ve,Pe,xe=W.hLinePoint;K=xe&&xe.xa,"cursor"===(re=xe&&xe.ya).spikesnap?(ve=ce.pointerX,Pe=ce.pointerY):(ve=K._offset+xe.x,Pe=re._offset+xe.y);var ke,Ae,Te=l.readability(xe.color,he)<1.5?n.contrast(he):xe.color,Q=re.spikemode,se=re.spikethickness,fe=re.spikecolor||Te,ye=a.getPxPosition(V,re);if(-1!==Q.indexOf("toaxis")||-1!==Q.indexOf("across")){if(-1!==Q.indexOf("toaxis")&&(ke=ye,Ae=ve),-1!==Q.indexOf("across")){var Me=re._counterDomainMin,Ie=re._counterDomainMax;"free"===re.anchor&&(Me=Math.min(Me,re.position),Ie=Math.max(Ie,re.position)),ke=oe.l+Me*oe.w,Ae=oe.l+Ie*oe.w}ee.insert("line",":first-child").attr({x1:ke,x2:Ae,y1:Pe,y2:Pe,"stroke-width":se,stroke:fe,"stroke-dasharray":r.dashStyle(re.spikedash,se)}).classed("spikeline",!0).classed("crisp",!0),ee.insert("line",":first-child").attr({x1:ke,x2:Ae,y1:Pe,y2:Pe,"stroke-width":se+2,stroke:he}).classed("spikeline",!0).classed("crisp",!0)}-1!==Q.indexOf("marker")&&ee.insert("circle",":first-child").attr({cx:ye+("right"!==re.side?se:-se),cy:Pe,r:se,fill:fe}).classed("spikeline",!0)}if(de){var Ce,Re,le=W.vLinePoint;re=le&&le.ya,"cursor"===(K=le&&le.xa).spikesnap?(Ce=ce.pointerX,Re=ce.pointerY):(Ce=K._offset+le.x,Re=re._offset+le.y);var ge,_e,Fe=l.readability(le.color,he)<1.5?n.contrast(he):le.color,Ve=K.spikemode,He=K.spikethickness,nt=K.spikecolor||Fe,tt=a.getPxPosition(V,K);if(-1!==Ve.indexOf("toaxis")||-1!==Ve.indexOf("across")){if(-1!==Ve.indexOf("toaxis")&&(ge=tt,_e=Re),-1!==Ve.indexOf("across")){var ot=K._counterDomainMin,dt=K._counterDomainMax;"free"===K.anchor&&(ot=Math.min(ot,K.position),dt=Math.max(dt,K.position)),ge=oe.t+(1-dt)*oe.h,_e=oe.t+(1-ot)*oe.h}ee.insert("line",":first-child").attr({x1:Ce,x2:Ce,y1:ge,y2:_e,"stroke-width":He,stroke:nt,"stroke-dasharray":r.dashStyle(K.spikedash,He)}).classed("spikeline",!0).classed("crisp",!0),ee.insert("line",":first-child").attr({x1:Ce,x2:Ce,y1:ge,y2:_e,"stroke-width":He+2,stroke:he}).classed("spikeline",!0).classed("crisp",!0)}-1!==Ve.indexOf("marker")&&ee.insert("circle",":first-child").attr({cx:Ce,cy:tt-("top"!==K.side?He:-He),r:He,fill:nt}).classed("spikeline",!0)}}}function F(V,W){return!W||W.vLinePoint!==V._spikepoints.vLinePoint||W.hLinePoint!==V._spikepoints.hLinePoint}function N(V,W){return t.plainText(V||"",{len:W,allowedTags:["br","sub","sup","b","i","em"]})}function B(V,W,X){var K=W[V+"a"],re=W[V+"Val"],ee=W.cd[0];if("category"===K.type||"multicategory"===K.type)re=K._categoriesMap[re];else if("date"===K.type){var ie=W.trace[V+"periodalignment"];if(ie){var oe=W.cd[W.index],ce=oe[V+"Start"];void 0===ce&&(ce=oe[V]);var me=oe[V+"End"];void 0===me&&(me=oe[V]);var de=me-ce;"end"===ie?re+=de:"middle"===ie&&(re+=de/2)}re=K.d2c(re)}return ee&&ee.t&&ee.t.posLetter===K._id&&("group"!==X.boxmode&&"group"!==X.violinmode||(re+=ee.t.dPos)),re}function j(V){return V.offsetTop+V.clientTop}function J(V){return V.offsetLeft+V.clientLeft}function G(V,W){var X=V._fullLayout,K=W.getBoundingClientRect(),re=K.x,ee=K.y,ie=re+K.width,oe=ee+K.height,ce=T.apply3DTransform(X._invTransform)(re,ee),me=T.apply3DTransform(X._invTransform)(ie,oe),de=ce[0],he=ce[1],ve=me[0],Pe=me[1];return{x:de,y:he,width:ve-de,height:Pe-he,top:Math.min(he,Pe),left:Math.min(de,ve),right:Math.max(de,ve),bottom:Math.max(he,Pe)}}},38048:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(23469).isUnifiedHover;$.exports=function(T,b,d,s){s=s||{};var t=b.legend;function o(r){s.font[r]||(s.font[r]=t?b.legend.font[r]:b.font[r])}b&&l(b.hovermode)&&(s.font||(s.font={}),o("size"),o("family"),o("color"),t?(s.bgcolor||(s.bgcolor=A.combine(b.legend.bgcolor,b.paper_bgcolor)),s.bordercolor||(s.bordercolor=b.legend.bordercolor)):s.bgcolor||(s.bgcolor=b.paper_bgcolor)),d("hoverlabel.bgcolor",s.bgcolor),d("hoverlabel.bordercolor",s.bordercolor),d("hoverlabel.namelength",s.namelength),k.coerceFont(d,"hoverlabel.font",s.font),d("hoverlabel.align",s.align)}},98212:function($,R,e){"use strict";var k=e(71828),A=e(528);$.exports=function(l,T){function b(d,s){return void 0!==T[d]?T[d]:k.coerce(l,T,A,d,s)}return b("clickmode"),b("hovermode")}},30211:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(28569),T=e(23469),b=e(528),d=e(88335);$.exports={moduleType:"component",name:"fx",constants:e(26675),schema:{layout:b},attributes:e(77914),layoutAttributes:b,supplyLayoutGlobalDefaults:e(22774),supplyDefaults:e(54268),supplyLayoutDefaults:e(34938),calc:e(30732),getDistanceFunction:T.getDistanceFunction,getClosest:T.getClosest,inbox:T.inbox,quadrature:T.quadrature,appendArrayPointValue:T.appendArrayPointValue,castHoverOption:function(s,t,o){return A.castOption(s,t,"hoverlabel."+o)},castHoverinfo:function(s,t,o){return A.castOption(s,o,"hoverinfo",function(r){return A.coerceHoverinfo({hoverinfo:r},{_module:s._module},t)})},hover:d.hover,unhover:l.unhover,loneHover:d.loneHover,loneUnhover:function(s){var t=A.isD3Selection(s)?s:k.select(s);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()},click:e(75914)}},528:function($,R,e){"use strict";var k=e(26675),A=e(41940),l=A({editType:"none"});l.family.dflt=k.HOVERFONT,l.size.dflt=k.HOVERFONTSIZE,$.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:l,grouptitlefont:A({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}},34938:function($,R,e){"use strict";var k=e(71828),A=e(528),l=e(98212),T=e(38048);$.exports=function(b,d){function s(n,i){return k.coerce(b,d,A,n,i)}l(b,d)&&(s("hoverdistance"),s("spikedistance")),"select"===s("dragmode")&&s("selectdirection");var t=d._has("mapbox"),o=d._has("geo"),r=d._basePlotModules.length;"zoom"===d.dragmode&&((t||o)&&1===r||t&&o&&2===r)&&(d.dragmode="pan"),T(b,d,s),k.coerceFont(s,"hoverlabel.grouptitlefont",d.hoverlabel.font)}},22774:function($,R,e){"use strict";var k=e(71828),A=e(38048),l=e(528);$.exports=function(T,b){A(T,b,function(d,s){return k.coerce(T,b,l,d,s)})}},83312:function($,R,e){"use strict";var k=e(71828),A=e(30587).counter,l=e(27670).Y,T=e(85555).idRegex,b=e(44467),d={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:[A("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[T.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[T.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:l({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 s(r,n,i){var a=n[i+"axes"],c=Object.keys((r._splomAxes||{})[i]||{});return Array.isArray(a)?a:c.length?c:void 0}function t(r,n,i,a,c,p){var f=n(r+"gap",i),x=n("domain."+r);n(r+"side",a);for(var v=new Array(c),g=x[0],y=(x[1]-g)/(c-f),h=y*(1-f),m=0;m<c;m++){var w=g+y*m;v[p?c-1-m:m]=[w,w+h]}return v}function o(r,n,i,a,c){var p,f=new Array(i);function x(v,g){-1!==n.indexOf(g)&&void 0===a[g]?(f[v]=g,a[g]=v):f[v]=""}if(Array.isArray(r))for(p=0;p<i;p++)x(p,r[p]);else for(x(0,c),p=1;p<i;p++)x(p,c+(p+1));return f}$.exports={moduleType:"component",name:"grid",schema:{layout:{grid:d}},layoutAttributes:d,sizeDefaults:function(r,n){var i=r.grid||{},a=s(n,i,"x"),c=s(n,i,"y");if(r.grid||a||c){var p,f,x=Array.isArray(i.subplots)&&Array.isArray(i.subplots[0]),v=Array.isArray(a),g=Array.isArray(c),y=v&&a!==i.xaxes&&g&&c!==i.yaxes;x?(p=i.subplots.length,f=i.subplots[0].length):(g&&(p=c.length),v&&(f=a.length));var h=b.newContainer(n,"grid"),m=C("rows",p),w=C("columns",f);if(m*w>1){x||v||g||"independent"===C("pattern")&&(x=!0),h._hasSubplotGrid=x;var u,S,_="top to bottom"===C("roworder"),L=x?.3:.1;y&&n._splomGridDflt&&(u=n._splomGridDflt.xside,S=n._splomGridDflt.yside),h._domains={x:t("x",C,x?.2:.1,u,w),y:t("y",C,L,S,m,_)}}else delete n.grid}function C(P,I){return k.coerce(i,h,d,P,I)}},contentDefaults:function(r,n){var i=n.grid;if(i&&i._domains){var a,c,p,f,x,v,g,y=r.grid||{},h=n._subplots,m=i._hasSubplotGrid,w=i.rows,u=i.columns,S="independent"===i.pattern,_=i._axisMap={};if(m){var E=y.subplots||[];v=i.subplots=new Array(w);var L=1;for(a=0;a<w;a++){var C=v[a]=new Array(u),P=E[a]||[];for(c=0;c<u;c++)if(S?(x=1===L?"xy":"x"+L+"y"+L,L++):x=P[c],C[c]="",-1!==h.cartesian.indexOf(x)){if(g=x.indexOf("y"),p=x.slice(0,g),f=x.slice(g),void 0!==_[p]&&_[p]!==c||void 0!==_[f]&&_[f]!==a)continue;C[c]=x,_[p]=c,_[f]=a}}}else{var I=s(n,y,"x"),U=s(n,y,"y");i.xaxes=o(I,h.xaxis,u,_,"x"),i.yaxes=o(U,h.yaxis,w,_,"y")}var z=i._anchors={},H="top to bottom"===i.roworder;for(var F in _){var N,B,j,J=F.charAt(0),G=i[J+"side"];if(G.length<8)z[F]="free";else if("x"===J){if("t"===G.charAt(0)===H?(N=0,B=1,j=w):(N=w-1,B=-1,j=-1),m){var V=_[F];for(a=N;a!==j;a+=B)if((x=v[a][V])&&(g=x.indexOf("y"),x.slice(0,g)===F)){z[F]=x.slice(g);break}}else for(a=N;a!==j;a+=B)if(-1!==h.cartesian.indexOf(F+(f=i.yaxes[a]))){z[F]=f;break}}else if("l"===G.charAt(0)?(N=0,B=1,j=u):(N=u-1,B=-1,j=-1),m){var W=_[F];for(a=N;a!==j;a+=B)if((x=v[W][a])&&(g=x.indexOf("y"),x.slice(g)===F)){z[F]=x.slice(0,g);break}}else for(a=N;a!==j;a+=B)if(-1!==h.cartesian.indexOf((p=i.xaxes[a])+F)){z[F]=p;break}}}}}},69819:function($,R,e){"use strict";var k=e(85555),A=e(44467).templatedArray;e(24695),$.exports=A("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",k.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",k.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})},75378:function($,R,e){"use strict";var k=e(92770),A=e(58163);$.exports=function(l,T,b,d){T=T||{};var s="log"===b&&"linear"===T.type;if(s||"linear"===b&&"log"===T.type)for(var o,r,n=l._fullLayout.images,i=T._id.charAt(0),a=0;a<n.length;a++)if(r="images["+a+"].",(o=n[a])[i+"ref"]===T._id){var c=o[i],p=o["size"+i],f=null,x=null;if(s){f=A(c,T.range);var v=p/Math.pow(10,f)/2;x=2*Math.log(v+Math.sqrt(1+v*v))/Math.LN10}else x=(f=Math.pow(10,c))*(Math.pow(10,p/2)-Math.pow(10,-p/2));k(f)?k(x)||(x=null):(f=null,x=null),d(r+i,f),d(r+"size"+i,x)}}},81603:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(85501),T=e(69819);function b(d,s,t){function o(f,x){return k.coerce(d,s,T,f,x)}var r=o("source");if(!o("visible",!!r))return s;o("layer"),o("xanchor"),o("yanchor"),o("sizex"),o("sizey"),o("sizing"),o("opacity");for(var n={_fullLayout:t},i=["x","y"],a=0;a<2;a++){var c=i[a],p=A.coerceRef(d,s,n,c,"paper",void 0);"paper"!==p&&A.getFromId(n,p)._imgIndices.push(s._index),A.coercePosition(s,n,o,p,c,0)}return s}$.exports=function(d,s){l(d,s,{name:"images",handleItemDefaults:b})}},80750:function($,R,e){"use strict";var k=e(39898),A=e(91424),l=e(89298),T=e(41675),b=e(77922);$.exports=function(d){var s,t,o=d._fullLayout,r=[],n={},i=[];for(t=0;t<o.images.length;t++){var a=o.images[t];if(a.visible)if("below"===a.layer&&"paper"!==a.xref&&"paper"!==a.yref){s=T.ref2id(a.xref)+T.ref2id(a.yref);var c=o._plots[s];if(!c){i.push(a);continue}c.mainplot&&(s=c.mainplot.id),n[s]||(n[s]=[]),n[s].push(a)}else"above"===a.layer?r.push(a):i.push(a)}var p={left:{sizing:"xMin",offset:0},center:{sizing:"xMid",offset:-.5},right:{sizing:"xMax",offset:-1}},f={top:{sizing:"YMin",offset:0},middle:{sizing:"YMid",offset:-.5},bottom:{sizing:"YMax",offset:-1}};function x(u){var S=k.select(this);if(this._imgSrc!==u.source)if(S.attr("xmlns",b.svg),u.source&&"data:"===u.source.slice(0,5))S.attr("xlink:href",u.source),this._imgSrc=u.source;else{var _=new Promise(function(E){var L=new Image;function C(){S.remove(),E()}this.img=L,L.setAttribute("crossOrigin","anonymous"),L.onerror=C,L.onload=function(){var P=document.createElement("canvas");P.width=this.width,P.height=this.height,P.getContext("2d",{willReadFrequently:!0}).drawImage(this,0,0);var I=P.toDataURL("image/png");S.attr("xlink:href",I),E()},S.on("error",C),L.src=u.source,this._imgSrc=u.source}.bind(this));d._promises.push(_)}}function v(u){var S,_,E=k.select(this),L=l.getFromId(d,u.xref),C=l.getFromId(d,u.yref),P="domain"===l.getRefType(u.xref),I="domain"===l.getRefType(u.yref),U=o._size;S=void 0!==L?"string"==typeof u.xref&&P?L._length*u.sizex:Math.abs(L.l2p(u.sizex)-L.l2p(0)):u.sizex*U.w,_=void 0!==C?"string"==typeof u.yref&&I?C._length*u.sizey:Math.abs(C.l2p(u.sizey)-C.l2p(0)):u.sizey*U.h;var z,H,F=S*p[u.xanchor].offset,N=_*f[u.yanchor].offset,B=p[u.xanchor].sizing+f[u.yanchor].sizing;switch(z=void 0!==L?"string"==typeof u.xref&&P?L._length*u.x+L._offset:L.r2p(u.x)+L._offset:u.x*U.w+U.l,z+=F,H=void 0!==C?"string"==typeof u.yref&&I?C._length*(1-u.y)+C._offset:C.r2p(u.y)+C._offset:U.h-u.y*U.h+U.t,H+=N,u.sizing){case"fill":B+=" slice";break;case"stretch":B="none"}E.attr({x:z,y:H,width:S,height:_,preserveAspectRatio:B,opacity:u.opacity});var j=(L&&"domain"!==l.getRefType(u.xref)?L._id:"")+(C&&"domain"!==l.getRefType(u.yref)?C._id:"");A.setClipUrl(E,j?"clip"+o._uid+j:null,d)}var g=o._imageLowerLayer.selectAll("image").data(i),y=o._imageUpperLayer.selectAll("image").data(r);g.enter().append("image"),y.enter().append("image"),g.exit().remove(),y.exit().remove(),g.each(function(u){x.bind(this)(u),v.bind(this)(u)}),y.each(function(u){x.bind(this)(u),v.bind(this)(u)});var h=Object.keys(o._plots);for(t=0;t<h.length;t++){var m=o._plots[s=h[t]];if(m.imagelayer){var w=m.imagelayer.selectAll("image").data(n[s]||[]);w.enter().append("image"),w.exit().remove(),w.each(function(u){x.bind(this)(u),v.bind(this)(u)})}}}},68804:function($,R,e){"use strict";$.exports={moduleType:"component",name:"images",layoutAttributes:e(69819),supplyLayoutDefaults:e(81603),includeBasePlot:e(76325)("images"),draw:e(80750),convertCoords:e(75378)}},33030:function($,R,e){"use strict";var k=e(41940),A=e(22399);$.exports={bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:A.defaultLine,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:k({editType:"legend"}),grouptitlefont:k({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},x:{valType:"number",min:-2,max:3,editType:"legend"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",min:-2,max:3,editType:"legend"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:k({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left"],editType:"legend"},editType:"legend"},editType:"legend"}},14928:function($){"use strict";$.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}},99017:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(44467),T=e(9012),b=e(33030),d=e(10820),s=e(10130);$.exports=function(t,o,r){var n,i=t.legend||{},a=l.newContainer(o,"legend");function c(C,P){return A.coerce(i,a,b,C,P)}for(var p=function(C,P){return A.coerce(n._input,n,T,C,P)},f=o.font||{},x=A.coerceFont(c,"grouptitlefont",A.extendFlat({},f,{size:Math.round(1.1*f.size)})),v=0,g=!1,y="normal",h=0;h<r.length;h++)(n=r[h]).visible&&((n.showlegend||n._dfltShowLegend&&!(n._module&&n._module.attributes&&n._module.attributes.showlegend&&!1===n._module.attributes.showlegend.dflt))&&(v++,n.showlegend&&(g=!0,(k.traceIs(n,"pie-like")||!0===n._input.showlegend)&&v++),A.coerceFont(p,"legendgrouptitle.font",x)),(k.traceIs(n,"bar")&&"stack"===o.barmode||-1!==["tonextx","tonexty"].indexOf(n.fill))&&(y=s.isGrouped({traceorder:y})?"grouped+reversed":"reversed"),void 0!==n.legendgroup&&""!==n.legendgroup&&(y=s.isReversed({traceorder:y})?"reversed+grouped":"grouped"));var m=A.coerce(t,o,d,"showlegend",g&&v>1);if(!1===m&&(o.legend=void 0),(!1!==m||i.uirevision)&&(c("uirevision",o.uirevision),!1!==m)){c("bgcolor",o.paper_bgcolor),c("bordercolor"),c("borderwidth");var w,u,S,_=A.coerceFont(c,"font",o.font),E="h"===c("orientation");if(E?(w=0,k.getComponentMethod("rangeslider","isVisible")(t.xaxis)?(u=1.1,S="bottom"):(u=-.1,S="top")):(w=1.02,u=1,S="auto"),c("traceorder",y),s.isGrouped(o.legend)&&c("tracegroupgap"),c("entrywidth"),c("entrywidthmode"),c("itemsizing"),c("itemwidth"),c("itemclick"),c("itemdoubleclick"),c("groupclick"),c("x",w),c("xanchor"),c("y",u),c("yanchor",S),c("valign"),A.noneOrAll(i,a,["x","y"]),c("title.text")){c("title.side",E?"left":"top");var L=A.extendFlat({},_,{size:A.bigFont(_.size)});A.coerceFont(c,"title.font",L)}}}},43969:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(74875),T=e(73972),b=e(11086),d=e(28569),s=e(91424),t=e(7901),o=e(63893),r=e(85167),n=e(14928),i=e(18783),a=i.LINE_SPACING,c=i.FROM_TL,p=i.FROM_BR,f=e(82424),x=e(53630),v=e(10130);function g(E,L,C){var P=E[0],z=P.trace.legendwidth||L.entrywidth;return"fraction"===L.entrywidthmode?L._maxWidth*z:C+(z||P.width)}function y(E,L,C,P,I){var U=C.data()[0][0].trace,z={event:I,node:C.node(),curveNumber:U.index,expandedIndex:U._expandedIndex,data:E.data,layout:E.layout,frames:E._transitionData._frames,config:E._context,fullData:E._fullData,fullLayout:E._fullLayout};U._group&&(z.group=U._group),T.traceIs(U,"pie-like")&&(z.label=C.datum()[0].label),!1!==b.triggerHandler(E,"plotly_legendclick",z)&&(1===P?L._clickTimeout=setTimeout(function(){E._fullLayout&&r(C,E,P)},E._context.doubleClickDelay):2===P&&(L._clickTimeout&&clearTimeout(L._clickTimeout),E._legendMouseDownTime=0,!1!==b.triggerHandler(E,"plotly_legenddoubleclick",z)&&r(C,E,P)))}function h(E,L,C){var P,I,U=E.data()[0][0],z=U.trace,H=T.traceIs(z,"pie-like"),F=!C._inHover&&L._context.edits.legendText&&!H,N=C._maxNameLength;U.groupTitle?(P=U.groupTitle.text,I=U.groupTitle.font):(I=C.font,C.entries?P=U.text:(P=H?U.label:z.name,z._meta&&(P=A.templateString(P,z._meta))));var B=A.ensureSingle(E,"text","legendtext");B.attr("text-anchor","start").call(s.font,I).text(F?m(P,N):P),o.positionText(B,C.itemwidth+2*n.itemGap,0),F?B.call(o.makeEditable,{gd:L,text:P}).call(u,E,L,C).on("edit",function(J){this.text(m(J,N)).call(u,E,L,C);var G=U.trace._fullInput||{},V={};if(T.hasTransform(G,"groupby")){var W=T.getTransformIndices(G,"groupby"),K=A.keyedContainer(G,"transforms["+W[W.length-1]+"].styles","target","value.name");K.set(U.trace._group,J),V=K.constructUpdate()}else V.name=J;return T.call("_guiRestyle",L,V,z.index)}):u(B,E,L,C)}function m(E,L){var C=Math.max(4,L);if(E&&E.trim().length>=C/2)return E;for(var P=C-(E=E||"").length;P>0;P--)E+=" ";return E}function w(E,L){var C,P=L._context.doubleClickDelay,I=1,U=A.ensureSingle(E,"rect","legendtoggle",function(z){L._context.staticPlot||z.style("cursor","pointer").attr("pointer-events","all"),z.call(t.fill,"rgba(0,0,0,0)")});L._context.staticPlot||(U.on("mousedown",function(){(C=(new Date).getTime())-L._legendMouseDownTime<P?I+=1:(I=1,L._legendMouseDownTime=C)}),U.on("mouseup",function(){if(!L._dragged&&!L._editing){var z=L._fullLayout.legend;(new Date).getTime()-L._legendMouseDownTime>P&&(I=Math.max(I-1,1)),y(L,z,E,I,k.event)}}))}function u(E,L,C,P,I){P._inHover&&E.attr("data-notex",!0),o.convertToTspans(E,C,function(){!function(U,z,H,F){var N=U.data()[0][0];if(H._inHover||!N||N.trace.showlegend){var B=U.select("g[class*=math-group]"),j=B.node();H||(H=z._fullLayout.legend);var J,G,V=H.borderwidth,W=(1===F?H.title.font:N.groupTitle?N.groupTitle.font:H.font).size*a;if(j){var X=s.bBox(j);J=X.height,G=X.width,1===F?s.setTranslate(B,V,V+.75*J):s.setTranslate(B,0,.25*J)}else{var K=U.select(1===F?".legendtitletext":".legendtext"),re=o.lineCount(K),ee=K.node();if(J=W*re,G=ee?s.bBox(ee).width:0,1===F)"left"===H.title.side&&(G+=2*n.itemGap),o.positionText(K,V+n.titlePad,V+W);else{var ie=2*n.itemGap+H.itemwidth;N.groupTitle&&(ie=n.itemGap,G-=H.itemwidth),o.positionText(K,ie,-W*((re-1)/2-.3))}}1===F?(H._titleWidth=G,H._titleHeight=J):(N.lineHeight=W,N.height=Math.max(J,16)+3,N.width=G)}else U.remove()}(L,C,P,I)})}function S(E){return A.isRightAnchor(E)?"right":A.isCenterAnchor(E)?"center":"left"}function _(E){return A.isBottomAnchor(E)?"bottom":A.isMiddleAnchor(E)?"middle":"top"}$.exports=function(E,L){return L||(L=E._fullLayout.legend||{}),function(C,P){var I,U,z=C._fullLayout,H="legend"+z._uid,F=P._inHover;if(F?(I=P.layer,H+="-hover"):I=z._infolayer,I){if(C._legendMouseDownTime||(C._legendMouseDownTime=0),F){if(!P.entries)return;U=f(P.entries,P)}else{if(!C.calcdata)return;U=z.showlegend&&f(C.calcdata,P)}var N=z.hiddenlabels||[];if(!(F||z.showlegend&&U.length))return I.selectAll(".legend").remove(),z._topdefs.select("#"+H).remove(),l.autoMargin(C,"legend");var B=A.ensureSingle(I,"g","legend",function(ee){F||ee.attr("pointer-events","all")}),j=A.ensureSingleById(z._topdefs,"clipPath",H,function(ee){ee.append("rect")}),J=A.ensureSingle(B,"rect","bg",function(ee){ee.attr("shape-rendering","crispEdges")});J.call(t.stroke,P.bordercolor).call(t.fill,P.bgcolor).style("stroke-width",P.borderwidth+"px");var G=A.ensureSingle(B,"g","scrollbox"),V=P.title;if(P._titleWidth=0,P._titleHeight=0,V.text){var W=A.ensureSingle(G,"text","legendtitletext");W.attr("text-anchor","start").call(s.font,V.font).text(V.text),u(W,G,C,P,1)}else G.selectAll(".legendtitletext").remove();var X=A.ensureSingle(B,"rect","scrollbar",function(ee){ee.attr(n.scrollBarEnterAttrs).call(t.fill,n.scrollBarColor)}),K=G.selectAll("g.groups").data(U);K.enter().append("g").attr("class","groups"),K.exit().remove();var re=K.selectAll("g.traces").data(A.identity);re.enter().append("g").attr("class","traces"),re.exit().remove(),re.style("opacity",function(ee){var ie=ee[0].trace;return T.traceIs(ie,"pie-like")?-1!==N.indexOf(ee[0].label)?.5:1:"legendonly"===ie.visible?.5:1}).each(function(){k.select(this).call(h,C,P)}).call(x,C,P).each(function(){F||k.select(this).call(w,C)}),A.syncOrAsync([l.previousPromises,function(){return function(ee,ie,oe,ce){var me=ee._fullLayout;ce||(ce=me.legend);var de=me._size,he=v.isVertical(ce),ve=v.isGrouped(ce),Pe="fraction"===ce.entrywidthmode,xe=ce.borderwidth,ke=2*xe,Ae=n.itemGap,Te=ce.itemwidth+2*Ae,Q=2*(xe+Ae),se=_(ce),fe=ce.y<0||0===ce.y&&"top"===se,ye=ce.y>1||1===ce.y&&"bottom"===se,Me=ce.tracegroupgap,Ie={};ce._maxHeight=Math.max(fe||ye?me.height/2:de.h,30);var Ce=0;ce._width=0,ce._height=0;var We,Be,Ye,rt,Re=(Be=0,Ye=0,(rt=(We=ce).title.side)&&(-1!==rt.indexOf("left")&&(Be=We._titleWidth),-1!==rt.indexOf("top")&&(Ye=We._titleHeight)),[Be,Ye]);if(he)oe.each(function(We){var Be=We[0].height;s.setTranslate(this,xe+Re[0],xe+Re[1]+ce._height+Be/2+Ae),ce._height+=Be,ce._width=Math.max(ce._width,We[0].width)}),Ce=Te+ce._width,ce._width+=Ae+Te+ke,ce._height+=Q,ve&&(ie.each(function(We,Be){s.setTranslate(this,0,Be*ce.tracegroupgap)}),ce._height+=(ce._lgroupsLength-1)*ce.tracegroupgap);else{var le=S(ce),Fe=ye||fe,Ve=me.width/2;ce._maxWidth=Math.max(ce.x<0||0===ce.x&&"right"===le?Fe&&"left"===le?de.l+de.w:Ve:ce.x>1||1===ce.x&&"left"===le?Fe&&"right"===le?de.r+de.w:Ve:de.w,2*Te);var He=0,nt=0;oe.each(function(We){var Be=g(We,ce,Te);He=Math.max(He,Be),nt+=Be}),Ce=null;var tt=0;if(ve){var ot=0,dt=0,kt=0;ie.each(function(){var We=0,Be=0;k.select(this).selectAll("g.traces").each(function(rt){var Se=g(rt,ce,Te),ze=rt[0].height;s.setTranslate(this,Re[0],Re[1]+xe+Ae+ze/2+Be),Be+=ze,We=Math.max(We,Se),Ie[rt[0].trace.legendgroup]=We});var Ye=We+Ae;dt>0&&Ye+xe+dt>ce._maxWidth?(tt=Math.max(tt,dt),dt=0,kt+=ot+Me,ot=Be):ot=Math.max(ot,Be),s.setTranslate(this,dt,kt),dt+=Ye}),ce._width=Math.max(tt,dt)+xe,ce._height=kt+ot+Q}else{var mt=oe.size(),wt=nt+ke+(mt-1)*Ae<ce._maxWidth,Lt=0,Ct=0,It=0,Ut=0;oe.each(function(We){var Be=We[0].height,Ye=g(We,ce,Te),rt=wt?Ye:He;Pe||(rt+=Ae),rt+xe+Ct-Ae>=ce._maxWidth&&(tt=Math.max(tt,Ut),Ct=0,It+=Lt,ce._height+=Lt,Lt=0),s.setTranslate(this,Re[0]+xe+Ct,Re[1]+xe+It+Be/2+Ae),Ut=Ct+Ye+Ae,Ct+=rt,Lt=Math.max(Lt,Be)}),wt?(ce._width=Ct+ke,ce._height=Lt+Q):(ce._width=Math.max(tt,Ut)+ke,ce._height+=Lt+Q)}}ce._width=Math.ceil(Math.max(ce._width+Re[0],ce._titleWidth+2*(xe+n.titlePad))),ce._height=Math.ceil(Math.max(ce._height+Re[1],ce._titleHeight+2*(xe+n.itemGap))),ce._effHeight=Math.min(ce._height,ce._maxHeight);var Rt=ee._context.edits,Ge=Rt.legendText||Rt.legendPosition;oe.each(function(We){var Be=k.select(this).select(".legendtoggle"),Ye=We[0].height,rt=We[0].trace.legendgroup,Se=g(We,ce,Te);ve&&""!==rt&&(Se=Ie[rt]);var ze=Ge?Te:Ce||Se;he||Pe||(ze+=Ae/2),s.setRect(Be,0,-Ye/2,ze,Ye)})}(C,K,re,P)},function(){var ee,ie,oe,ce,_e,Fe,Ve,He,me=z._size,de=P.borderwidth;if(!F){if(Ve=S(Fe=(_e=C)._fullLayout.legend),He=_(Fe),l.autoMargin(_e,"legend",{x:Fe.x,y:Fe.y,l:Fe._width*c[Ve],r:Fe._width*p[Ve],b:Fe._effHeight*p[He],t:Fe._effHeight*c[He]}))return;var ve=me.l+me.w*P.x-c[S(P)]*P._width,Pe=me.t+me.h*(1-P.y)-c[_(P)]*P._effHeight;if(z.margin.autoexpand){var xe=ve,ke=Pe;ve=A.constrain(ve,0,z.width-P._width),Pe=A.constrain(Pe,0,z.height-P._effHeight),ve!==xe&&A.log("Constrain legend.x to make legend fit inside graph"),Pe!==ke&&A.log("Constrain legend.y to make legend fit inside graph")}s.setTranslate(B,ve,Pe)}if(X.on(".drag",null),B.on("wheel",null),F||P._height<=P._maxHeight||C._context.staticPlot){var Ae=P._effHeight;F&&(Ae=P._height),J.attr({width:P._width-de,height:Ae-de,x:de/2,y:de/2}),s.setTranslate(G,0,0),j.select("rect").attr({width:P._width-2*de,height:Ae-2*de,x:de,y:de}),s.setClipUrl(G,H,C),s.setRect(X,0,0,0,0),delete P._scrollY}else{var Te,se,fe=Math.max(n.scrollBarMinHeight,P._effHeight*P._effHeight/P._height),ye=P._effHeight-fe-2*n.scrollBarMargin,Me=P._height-P._effHeight,Ie=ye/Me,Ce=Math.min(P._scrollY||0,Me);J.attr({width:P._width-2*de+n.scrollBarWidth+n.scrollBarMargin,height:P._effHeight-de,x:de/2,y:de/2}),j.select("rect").attr({width:P._width-2*de+n.scrollBarWidth+n.scrollBarMargin,height:P._effHeight-2*de,x:de,y:de+Ce}),s.setClipUrl(G,H,C),ge(Ce,fe,Ie),B.on("wheel",function(){ge(Ce=A.constrain(P._scrollY+k.event.deltaY/ye*Me,0,Me),fe,Ie),0!==Ce&&Ce!==Me&&k.event.preventDefault()});var Re=k.behavior.drag().on("dragstart",function(){var _e=k.event.sourceEvent;Te="touchstart"===_e.type?_e.changedTouches[0].clientY:_e.clientY,se=Ce}).on("drag",function(){var _e=k.event.sourceEvent;2===_e.buttons||_e.ctrlKey||ge(Ce=function(Fe,Ve,He){return A.constrain((He-Ve)/Ie+Fe,0,Me)}(se,Te,"touchmove"===_e.type?_e.changedTouches[0].clientY:_e.clientY),fe,Ie)});X.call(Re);var le=k.behavior.drag().on("dragstart",function(){var _e=k.event.sourceEvent;"touchstart"===_e.type&&(Te=_e.changedTouches[0].clientY,se=Ce)}).on("drag",function(){var _e=k.event.sourceEvent;"touchmove"===_e.type&&ge(Ce=function(Fe,Ve,He){return A.constrain((Ve-He)/Ie+Fe,0,Me)}(se,Te,_e.changedTouches[0].clientY),fe,Ie)});G.call(le)}function ge(_e,Fe,Ve){P._scrollY=C._fullLayout.legend._scrollY=_e,s.setTranslate(G,0,-_e),s.setRect(X,P._width,n.scrollBarMargin+_e*Ve,n.scrollBarWidth,Fe),j.select("rect").attr("y",de+_e)}C._context.edits.legendPosition&&(B.classed("cursor-move",!0),d.init({element:B.node(),gd:C,prepFn:function(){var _e=s.getTranslate(B);oe=_e.x,ce=_e.y},moveFn:function(_e,Fe){var Ve=oe+_e,He=ce+Fe;s.setTranslate(B,Ve,He),ee=d.align(Ve,0,me.l,me.l+me.w,P.xanchor),ie=d.align(He,0,me.t+me.h,me.t,P.yanchor)},doneFn:function(){void 0!==ee&&void 0!==ie&&T.call("_guiRelayout",C,{"legend.x":ee,"legend.y":ie})},clickFn:function(_e,Fe){var Ve=I.selectAll("g.traces").filter(function(){var He=this.getBoundingClientRect();return Fe.clientX>=He.left&&Fe.clientX<=He.right&&Fe.clientY>=He.top&&Fe.clientY<=He.bottom});Ve.size()>0&&y(C,B,Ve,_e,Fe)}}))}],C)}}(E,L)}},82424:function($,R,e){"use strict";var k=e(73972),A=e(10130);$.exports=function(l,T){var b,d,s=T._inHover,t=A.isGrouped(T),o=A.isReversed(T),r={},n=[],i=!1,a={},c=0,p=0;function f(U,z){if(""!==U&&A.isGrouped(T))-1===n.indexOf(U)?(n.push(U),i=!0,r[U]=[z]):r[U].push(z);else{var H="~~i"+c;n.push(H),r[H]=[z],c++}}for(b=0;b<l.length;b++){var x=l[b],v=x[0],g=v.trace,y=g.legendgroup;if(s||g.visible&&g.showlegend)if(k.traceIs(g,"pie-like"))for(a[y]||(a[y]={}),d=0;d<x.length;d++){var h=x[d].label;a[y][h]||(f(y,{label:h,color:x[d].color,i:x[d].i,trace:g,pts:x[d].pts}),a[y][h]=!0,p=Math.max(p,(h||"").length))}else f(y,v),p=Math.max(p,(g.name||"").length)}if(!n.length)return[];var m=!i||!t,w=[];for(b=0;b<n.length;b++){var u=r[n[b]];w.push(m?u[0]:u)}for(m&&(w=[w]),b=0;b<w.length;b++){var S=1/0;for(d=0;d<w[b].length;d++){var _=w[b][d].trace.legendrank;S>_&&(S=_)}w[b][0]._groupMinRank=S,w[b][0]._preGroupSort=b}var E=function(U,z){return U.trace.legendrank-z.trace.legendrank||U._preSort-z._preSort};for(w.forEach(function(U,z){U[0]._preGroupSort=z}),w.sort(function(U,z){return U[0]._groupMinRank-z[0]._groupMinRank||U[0]._preGroupSort-z[0]._preGroupSort}),b=0;b<w.length;b++){w[b].forEach(function(U,z){U._preSort=z}),w[b].sort(E);var L=w[b][0].trace,C=null;for(d=0;d<w[b].length;d++){var P=w[b][d].trace.legendgrouptitle;if(P&&P.text){C=P,s&&(P.font=T._groupTitleFont);break}}if(o&&w[b].reverse(),C){var I=!1;for(d=0;d<w[b].length;d++)if(k.traceIs(w[b][d].trace,"pie-like")){I=!0;break}w[b].unshift({i:-1,groupTitle:C,noClick:I,trace:{showlegend:L.showlegend,legendgroup:L.legendgroup,visible:"toggleitem"===T.groupclick||L.visible}})}for(d=0;d<w[b].length;d++)w[b][d]=[w[b][d]]}return T._lgroupsLength=w.length,T._maxNameLength=p,w}},85167:function($,R,e){"use strict";var k=e(71828),A=e(73972),l=!0;$.exports=function(T,b,d){var s=b._fullLayout;if(!b._dragged&&!b._editing){var t,o=s.legend.itemclick,r=s.legend.itemdoubleclick,n=s.legend.groupclick;if(1===d&&"toggle"===o&&"toggleothers"===r&&l&&b.data&&b._context.showTips&&k.notifier(k._(b,"Double-click on legend to isolate one trace"),"long"),l=!1,1===d?t=o:2===d&&(t=r),t){var i="togglegroup"===n,a=s.hiddenlabels?s.hiddenlabels.slice():[],c=T.data()[0][0];if(!c.groupTitle||!c.noClick){var p,f,x,v,g,y=b._fullData,h=c.trace,m=h.legendgroup,w={},u=[],S=[],_=[];if(A.traceIs(h,"pie-like")){var E=c.label,L=a.indexOf(E);"toggle"===t?-1===L?a.push(E):a.splice(L,1):"toggleothers"===t&&(a=[],b.calcdata[0].forEach(function(W){E!==W.label&&a.push(W.label)}),b._fullLayout.hiddenlabels&&b._fullLayout.hiddenlabels.length===a.length&&-1===L&&(a=[])),A.call("_guiRelayout",b,"hiddenlabels",a)}else{var C,P=m&&m.length,I=[];if(P)for(p=0;p<y.length;p++)(C=y[p]).visible&&C.legendgroup===m&&I.push(p);if("toggle"===t){var U;switch(h.visible){case!0:U="legendonly";break;case!1:U=!1;break;case"legendonly":U=!0}if(P)if(i)for(p=0;p<y.length;p++)!1!==y[p].visible&&y[p].legendgroup===m&&V(y[p],U);else V(h,U);else V(h,U)}else if("toggleothers"===t){var F,B=!0;for(p=0;p<y.length;p++)if(F=!0!==y[p].showlegend,!(y[p]===h||F||P&&y[p].legendgroup===m||!0!==y[p].visible||A.traceIs(y[p],"notLegendIsolatable"))){B=!1;break}for(p=0;p<y.length;p++)if(!1!==y[p].visible&&!A.traceIs(y[p],"notLegendIsolatable"))switch(h.visible){case"legendonly":V(y[p],!0);break;case!0:F=!0!==y[p].showlegend&&!y[p].legendgroup,V(y[p],!!(y[p]===h||P&&y[p].legendgroup===m||F)||!!B||"legendonly")}}for(p=0;p<S.length;p++)if(x=S[p]){var j=x.constructUpdate(),J=Object.keys(j);for(f=0;f<J.length;f++)(w[v=J[f]]=w[v]||[])[_[p]]=j[v]}for(g=Object.keys(w),p=0;p<g.length;p++)for(v=g[p],f=0;f<u.length;f++)w[v].hasOwnProperty(f)||(w[v][f]=void 0);A.call("_guiRestyle",b,w,u)}}}}function G(W,X,K){var re=u.indexOf(W),ee=w[X];return ee||(ee=w[X]=[]),-1===u.indexOf(W)&&(u.push(W),re=u.length-1),ee[re]=K,re}function V(W,X){if(!c.groupTitle||i){var K=W._fullInput;if(A.hasTransform(K,"groupby")){var re=S[K.index];if(!re){var ee=A.getTransformIndices(K,"groupby");re=k.keyedContainer(K,"transforms["+ee[ee.length-1]+"].styles","target","value.visible"),S[K.index]=re}var oe=re.get(W._group);void 0===oe&&(oe=!0),!1!==oe&&re.set(W._group,X),_[K.index]=G(K.index,"visible",!1!==K.visible)}else G(K.index,"visible",!1!==K.visible&&X)}}}},10130:function($,R){"use strict";R.isGrouped=function(e){return-1!==(e.traceorder||"").indexOf("grouped")},R.isVertical=function(e){return"h"!==e.orientation},R.isReversed=function(e){return-1!==(e.traceorder||"").indexOf("reversed")}},2199:function($,R,e){"use strict";$.exports={moduleType:"component",name:"legend",layoutAttributes:e(33030),supplyLayoutDefaults:e(99017),draw:e(43969),style:e(53630)}},53630:function($,R,e){"use strict";var k=e(39898),A=e(73972),l=e(71828),T=l.strTranslate,b=e(91424),d=e(7901),s=e(52075).extractOpts,t=e(34098),o=e(63463),r=e(53581).castOption,n=e(14928);function i(p,f){return(f?"radial":"horizontal")+(p?"":"reversed")}function a(p){var f=p[0].trace,x=f.contours,v=t.hasLines(f),g=t.hasMarkers(f),y=f.visible&&f.fill&&"none"!==f.fill,h=!1,m=!1;if(x){var w=x.coloring;"lines"===w?h=!0:v="none"===w||"heatmap"===w||x.showlines,"constraint"===x.type?y="="!==x._operation:"fill"!==w&&"heatmap"!==w||(m=!0)}return{showMarker:g,showLine:v,showFill:y,showGradientLine:h,showGradientFill:m,anyLine:v||h,anyFill:y||m}}function c(p,f,x){return p&&l.isArrayOrTypedArray(p)?f:p>x?x:p}$.exports=function(p,f,x){x||(x=f._fullLayout.legend);var g="constant"===x.itemsizing,y=x.itemwidth,m=T((y+2*n.itemGap)/2,0),w=function(_,E,L,C){var P;if(_+1)P=_;else{if(!(E&&E.width>0))return 0;P=E.width}return g?C:Math.min(P,L)};function u(_,E,L){var C=_[0].trace,P=C.marker||{},I=P.line||{},U=L?C.visible&&C.type===L:A.traceIs(C,"bar"),z=k.select(E).select("g.legendpoints").selectAll("path.legend"+L).data(U?[_]:[]);z.enter().append("path").classed("legend"+L,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),z.exit().remove(),z.each(function(H){var F=k.select(this),N=H[0],B=w(N.mlw,P.line,5,2);F.style("stroke-width",B+"px");var j=N.mcc;if(!x._inHover&&"mc"in N){var J=s(P),G=J.mid;void 0===G&&(G=(J.max+J.min)/2),j=b.tryColorscale(P,"")(G)}var V=j||N.mc||P.color,W=P.pattern,X=W&&b.getPatternAttr(W.shape,0,"");if(X){var K=b.getPatternAttr(W.bgcolor,0,null),re=b.getPatternAttr(W.fgcolor,0,null),ee=W.fgopacity,ie=c(W.size,8,10),oe=c(W.solidity,.5,1);F.call(b.pattern,"legend",f,"legend-"+C.uid,X,ie,oe,j,W.fillmode,K,re,ee)}else F.call(d.fill,V);B&&d.stroke(F,N.mlc||I.color)})}function S(_,E,L){var C=_[0],P=C.trace,I=L?P.visible&&P.type===L:A.traceIs(P,L),U=k.select(E).select("g.legendpoints").selectAll("path.legend"+L).data(I?[_]:[]);if(U.enter().append("path").classed("legend"+L,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),U.exit().remove(),U.size()){var z=(P.marker||{}).line,H=w(r(z.width,C.pts),z,5,2),F=l.minExtend(P,{marker:{line:{width:H}}});F.marker.line.color=z.color;var N=l.minExtend(C,{trace:F});o(U,N,F)}}p.each(function(_){var E=k.select(this),L=l.ensureSingle(E,"g","layers");L.style("opacity",_[0].trace.opacity);var C=x.valign,P=_[0].lineHeight,I=_[0].height;L.attr("transform","middle"!==C&&P&&I?T(0,{top:1,bottom:-1}[C]*(.5*(P-I+3))):null),L.selectAll("g.legendfill").data([_]).enter().append("g").classed("legendfill",!0),L.selectAll("g.legendlines").data([_]).enter().append("g").classed("legendlines",!0);var z=L.selectAll("g.legendsymbols").data([_]);z.enter().append("g").classed("legendsymbols",!0),z.selectAll("g.legendpoints").data([_]).enter().append("g").classed("legendpoints",!0)}).each(function(_){var E,L=_[0].trace,C=[];if(L.visible)switch(L.type){case"histogram2d":case"heatmap":C=[["M-15,-2V4H15V-2Z"]],E=!0;break;case"choropleth":case"choroplethmapbox":C=[["M-6,-6V6H6V-6Z"]],E=!0;break;case"densitymapbox":C=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],E="radial";break;case"cone":C=[["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"]],E=!1;break;case"streamtube":C=[["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"]],E=!1;break;case"surface":C=[["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"]],E=!0;break;case"mesh3d":C=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],E=!1;break;case"volume":C=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],E=!0;break;case"isosurface":C=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],E=!1}var P=k.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(C);P.enter().append("path").classed("legend3dandfriends",!0).attr("transform",m).style("stroke-miterlimit",1),P.exit().remove(),P.each(function(I,U){var z,H=k.select(this),F=s(L),N=F.colorscale,B=F.reversescale;if(N){if(!E){var j=N.length;z=0===U?N[B?j-1:0][1]:1===U?N[B?0:j-1][1]:N[Math.floor((j-1)/2)][1]}}else{var J=L.vertexcolor||L.facecolor||L.color;z=l.isArrayOrTypedArray(J)?J[U]||J[0]:J}H.attr("d",I[0]),z?H.call(d.fill,z):H.call(function(G){G.size()&&b.gradient(G,f,"legendfill-"+L.uid,i(B,"radial"===E),N,"fill")})})}).each(function(_){var E=_[0].trace,L="waterfall"===E.type;if(_[0]._distinct&&L){var C=_[0].trace[_[0].dir].marker;return _[0].mc=C.color,_[0].mlw=C.line.width,_[0].mlc=C.line.color,u(_,this,"waterfall")}var P=[];E.visible&&L&&(P=_[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 I=k.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(P);I.enter().append("path").classed("legendwaterfall",!0).attr("transform",m).style("stroke-miterlimit",1),I.exit().remove(),I.each(function(U){var z=k.select(this),H=E[U[0]].marker,F=w(void 0,H.line,5,2);z.attr("d",U[1]).style("stroke-width",F+"px").call(d.fill,H.color),F&&z.call(d.stroke,H.line.color)})}).each(function(_){u(_,this,"funnel")}).each(function(_){u(_,this)}).each(function(_){var E=_[0].trace,L=k.select(this).select("g.legendpoints").selectAll("path.legendbox").data(E.visible&&A.traceIs(E,"box-violin")?[_]:[]);L.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",m),L.exit().remove(),L.each(function(){var C=k.select(this);if("all"!==E.boxpoints&&"all"!==E.points||0!==d.opacity(E.fillcolor)||0!==d.opacity((E.line||{}).color)){var P=w(void 0,E.line,5,2);C.style("stroke-width",P+"px").call(d.fill,E.fillcolor),P&&d.stroke(C,E.line.color)}else{var I=l.minExtend(E,{marker:{size:g?12:l.constrain(E.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});L.call(b.pointStyle,I,f)}})}).each(function(_){S(_,this,"funnelarea")}).each(function(_){S(_,this,"pie")}).each(function(_){var E,L,C=a(_),P=C.showFill,I=C.showLine,U=C.showGradientLine,z=C.showGradientFill,H=C.anyFill,F=C.anyLine,N=_[0],B=N.trace,j=s(B),J=j.colorscale,G=j.reversescale,V=t.hasMarkers(B)||!H?"M5,0":F?"M5,-2":"M5,-3",W=k.select(this),X=W.select(".legendfill").selectAll("path").data(P||z?[_]:[]);if(X.enter().append("path").classed("js-fill",!0),X.exit().remove(),X.attr("d",V+"h"+y+"v6h-"+y+"z").call(function(ee){ee.size()&&(P?b.fillGroupStyle(ee,f):b.gradient(ee,f,"legendfill-"+B.uid,i(G),J,"fill"))}),I||U){var K=w(void 0,B.line,10,5);L=l.minExtend(B,{line:{width:K}}),E=[l.minExtend(N,{trace:L})]}var re=W.select(".legendlines").selectAll("path").data(I||U?[E]:[]);re.enter().append("path").classed("js-line",!0),re.exit().remove(),re.attr("d",V+(U?"l"+y+",0.0001":"h"+y)).call(I?b.lineGroupStyle:function(ee){if(ee.size()){var ie="legendline-"+B.uid;b.lineGroupStyle(ee),b.gradient(ee,f,ie,i(G),J,"stroke")}})}).each(function(_){var E,L,C=a(_),U=C.showLine,z=C.showMarker,H=_[0],F=H.trace,N=!z&&!C.anyLine&&!C.anyFill&&t.hasText(F);function B(re,ee,ie,oe){var ce=l.nestedProperty(F,re).get(),me=l.isArrayOrTypedArray(ce)&&ee?ee(ce):ce;if(g&&me&&void 0!==oe&&(me=oe),ie){if(me<ie[0])return ie[0];if(me>ie[1])return ie[1]}return me}function j(re){return H._distinct&&H.index&&re[H.index]?re[H.index]:re[0]}if(z||N||U){var J={},G={};if(z){J.mc=B("marker.color",j),J.mx=B("marker.symbol",j),J.mo=B("marker.opacity",l.mean,[.2,1]),J.mlc=B("marker.line.color",j),J.mlw=B("marker.line.width",l.mean,[0,5],2),G.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var V=B("marker.size",l.mean,[2,16],12);J.ms=V,G.marker.size=V}U&&(G.line={width:B("line.width",j,[0,10],5)}),N&&(J.tx="Aa",J.tp=B("textposition",j),J.ts=10,J.tc=B("textfont.color",j),J.tf=B("textfont.family",j)),E=[l.minExtend(H,J)],(L=l.minExtend(F,G)).selectedpoints=null,L.texttemplate=null}var W=k.select(this).select("g.legendpoints"),X=W.selectAll("path.scatterpts").data(z?E:[]);X.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",m),X.exit().remove(),X.call(b.pointStyle,L,f),z&&(E[0].mrc=3);var K=W.selectAll("g.pointtext").data(N?E:[]);K.enter().append("g").classed("pointtext",!0).append("text").attr("transform",m),K.exit().remove(),K.selectAll("text").call(b.textPointStyle,L,f)}).each(function(_){var E=_[0].trace,L=k.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(E.visible&&"candlestick"===E.type?[_,_]:[]);L.enter().append("path").classed("legendcandle",!0).attr("d",function(C,P){return P?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",m).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(C,P){var I=k.select(this),U=E[P?"increasing":"decreasing"],z=w(void 0,U.line,5,2);I.style("stroke-width",z+"px").call(d.fill,U.fillcolor),z&&d.stroke(I,U.line.color)})}).each(function(_){var E=_[0].trace,L=k.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(E.visible&&"ohlc"===E.type?[_,_]:[]);L.enter().append("path").classed("legendohlc",!0).attr("d",function(C,P){return P?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",m).style("stroke-miterlimit",1),L.exit().remove(),L.each(function(C,P){var I=k.select(this),U=E[P?"increasing":"decreasing"],z=w(void 0,U.line,5,2);I.style("fill","none").call(b.dashLine,U.line.dash,z),z&&d.stroke(I,U.line.color)})})}},42068:function($,R,e){"use strict";e(93348),$.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},26023:function($,R,e){"use strict";var k=e(73972),A=e(74875),l=e(41675),T=e(24255),b=e(34031).eraseActiveShape,d=e(71828),s=d._,t=$.exports={};function o(v,g){var y,h,m=g.currentTarget,w=m.getAttribute("data-attr"),u=m.getAttribute("data-val")||!0,S=v._fullLayout,_={},E=l.list(v,null,!0),L=S._cartesianSpikesEnabled;if("zoom"===w){var C,P="in"===u?.5:2,I=(1+P)/2,U=(1-P)/2;for(h=0;h<E.length;h++)if(!(y=E[h]).fixedrange)if(C=y._name,"auto"===u)_[C+".autorange"]=!0;else if("reset"===u){if(void 0===y._rangeInitial)_[C+".autorange"]=!0;else{var z=y._rangeInitial.slice();_[C+".range[0]"]=z[0],_[C+".range[1]"]=z[1]}void 0!==y._showSpikeInitial&&(_[C+".showspikes"]=y._showSpikeInitial,"on"!==L||y._showSpikeInitial||(L="off"))}else{var H=[y.r2l(y.range[0]),y.r2l(y.range[1])],F=[I*H[0]+U*H[1],I*H[1]+U*H[0]];_[C+".range[0]"]=y.l2r(F[0]),_[C+".range[1]"]=y.l2r(F[1])}}else"hovermode"!==w||"x"!==u&&"y"!==u||m.setAttribute("data-val",u=S._isHoriz?"y":"x"),_[w]=u;S._cartesianSpikesEnabled=L,k.call("_guiRelayout",v,_)}function r(v,g){for(var y=g.currentTarget,h=y.getAttribute("data-attr"),m=y.getAttribute("data-val")||!0,w=v._fullLayout._subplots.gl3d||[],u={},S=h.split("."),_=0;_<w.length;_++)u[w[_]+"."+S[1]]=m;u.dragmode="pan"===m?m:"zoom",k.call("_guiRelayout",v,u)}function n(v,g){for(var y=g.currentTarget.getAttribute("data-attr"),h="resetLastSave"===y,m="resetDefault"===y,w=v._fullLayout,u=w._subplots.gl3d||[],S={},_=0;_<u.length;_++){var E,L=u[_],C=L+".camera",P=L+".aspectratio",I=L+".aspectmode",U=w[L]._scene;h?(S[C+".up"]=U.viewInitial.up,S[C+".eye"]=U.viewInitial.eye,S[C+".center"]=U.viewInitial.center,E=!0):m&&(S[C+".up"]=null,S[C+".eye"]=null,S[C+".center"]=null,E=!0),E&&(S[P+".x"]=U.viewInitial.aspectratio.x,S[P+".y"]=U.viewInitial.aspectratio.y,S[P+".z"]=U.viewInitial.aspectratio.z,S[I]=U.viewInitial.aspectmode)}k.call("_guiRelayout",v,S)}function i(v,g){var y=g.currentTarget,h=y._previousVal,m=v._fullLayout,w=m._subplots.gl3d||[],u=["xaxis","yaxis","zaxis"],S={},_={};if(h)_=h,y._previousVal=null;else{for(var E=0;E<w.length;E++){var L=w[E],C=m[L],P=L+".hovermode";S[P]=C.hovermode,_[P]=!1;for(var I=0;I<3;I++){var U=u[I],z=L+"."+U+".showspikes";_[z]=!1,S[z]=C[U].showspikes}}y._previousVal=S}return _}function a(v,g){for(var y=g.currentTarget,h=y.getAttribute("data-attr"),m=y.getAttribute("data-val")||!0,w=v._fullLayout,u=w._subplots.geo||[],S=0;S<u.length;S++){var _=u[S];if("zoom"===h){var L=w[_].projection.scale;k.call("_guiRelayout",v,_+".projection.scale","in"===m?2*L:.5*L)}}"reset"===h&&x(v,"geo")}function c(v){var g=v._fullLayout;return!g.hovermode&&(g._has("cartesian")?g._isHoriz?"y":"x":"closest")}function p(v){var g=c(v);k.call("_guiRelayout",v,"hovermode",g)}function f(v,g){for(var y=g.currentTarget.getAttribute("data-val"),h=v._fullLayout,m=h._subplots.mapbox||[],w={},u=0;u<m.length;u++){var S=m[u],_=h[S].zoom;w[S+".zoom"]="in"===y?1.05*_:_/1.05}k.call("_guiRelayout",v,w)}function x(v,g){for(var y=v._fullLayout,h=y._subplots[g]||[],m={},w=0;w<h.length;w++)for(var u=h[w],S=y[u]._subplot.viewInitial,_=Object.keys(S),E=0;E<_.length;E++){var L=_[E];m[u+"."+L]=S[L]}k.call("_guiRelayout",v,m)}t.toImage={name:"toImage",title:function(v){return s(v,"png"===((v._context.toImageButtonOptions||{}).format||"png")?"Download plot as a png":"Download plot")},icon:T.camera,click:function(v){var g=v._context.toImageButtonOptions,y={format:g.format||"png"};d.notifier(s(v,"Taking snapshot - this may take a few seconds"),"long"),"svg"!==y.format&&d.isIE()&&(d.notifier(s(v,"IE only supports svg.  Changing format to svg."),"long"),y.format="svg"),["filename","width","height","scale"].forEach(function(h){h in g&&(y[h]=g[h])}),k.call("downloadImage",v,y).then(function(h){d.notifier(s(v,"Snapshot succeeded")+" - "+h,"long")}).catch(function(){d.notifier(s(v,"Sorry, there was a problem downloading your snapshot!"),"long")})}},t.sendDataToCloud={name:"sendDataToCloud",title:function(v){return s(v,"Edit in Chart Studio")},icon:T.disk,click:function(v){A.sendDataToCloud(v)}},t.editInChartStudio={name:"editInChartStudio",title:function(v){return s(v,"Edit in Chart Studio")},icon:T.pencil,click:function(v){A.sendDataToCloud(v)}},t.zoom2d={name:"zoom2d",_cat:"zoom",title:function(v){return s(v,"Zoom")},attr:"dragmode",val:"zoom",icon:T.zoombox,click:o},t.pan2d={name:"pan2d",_cat:"pan",title:function(v){return s(v,"Pan")},attr:"dragmode",val:"pan",icon:T.pan,click:o},t.select2d={name:"select2d",_cat:"select",title:function(v){return s(v,"Box Select")},attr:"dragmode",val:"select",icon:T.selectbox,click:o},t.lasso2d={name:"lasso2d",_cat:"lasso",title:function(v){return s(v,"Lasso Select")},attr:"dragmode",val:"lasso",icon:T.lasso,click:o},t.drawclosedpath={name:"drawclosedpath",title:function(v){return s(v,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:T.drawclosedpath,click:o},t.drawopenpath={name:"drawopenpath",title:function(v){return s(v,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:T.drawopenpath,click:o},t.drawline={name:"drawline",title:function(v){return s(v,"Draw line")},attr:"dragmode",val:"drawline",icon:T.drawline,click:o},t.drawrect={name:"drawrect",title:function(v){return s(v,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:T.drawrect,click:o},t.drawcircle={name:"drawcircle",title:function(v){return s(v,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:T.drawcircle,click:o},t.eraseshape={name:"eraseshape",title:function(v){return s(v,"Erase active shape")},icon:T.eraseshape,click:b},t.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(v){return s(v,"Zoom in")},attr:"zoom",val:"in",icon:T.zoom_plus,click:o},t.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(v){return s(v,"Zoom out")},attr:"zoom",val:"out",icon:T.zoom_minus,click:o},t.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(v){return s(v,"Autoscale")},attr:"zoom",val:"auto",icon:T.autoscale,click:o},t.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(v){return s(v,"Reset axes")},attr:"zoom",val:"reset",icon:T.home,click:o},t.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(v){return s(v,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:T.tooltip_basic,gravity:"ne",click:o},t.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(v){return s(v,"Compare data on hover")},attr:"hovermode",val:function(v){return v._fullLayout._isHoriz?"y":"x"},icon:T.tooltip_compare,gravity:"ne",click:o},t.zoom3d={name:"zoom3d",_cat:"zoom",title:function(v){return s(v,"Zoom")},attr:"scene.dragmode",val:"zoom",icon:T.zoombox,click:r},t.pan3d={name:"pan3d",_cat:"pan",title:function(v){return s(v,"Pan")},attr:"scene.dragmode",val:"pan",icon:T.pan,click:r},t.orbitRotation={name:"orbitRotation",title:function(v){return s(v,"Orbital rotation")},attr:"scene.dragmode",val:"orbit",icon:T["3d_rotate"],click:r},t.tableRotation={name:"tableRotation",title:function(v){return s(v,"Turntable rotation")},attr:"scene.dragmode",val:"turntable",icon:T["z-axis"],click:r},t.resetCameraDefault3d={name:"resetCameraDefault3d",_cat:"resetCameraDefault",title:function(v){return s(v,"Reset camera to default")},attr:"resetDefault",icon:T.home,click:n},t.resetCameraLastSave3d={name:"resetCameraLastSave3d",_cat:"resetCameraLastSave",title:function(v){return s(v,"Reset camera to last save")},attr:"resetLastSave",icon:T.movie,click:n},t.hoverClosest3d={name:"hoverClosest3d",_cat:"hoverclosest",title:function(v){return s(v,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:T.tooltip_basic,gravity:"ne",click:function(v,g){var y=i(v,g);k.call("_guiRelayout",v,y)}},t.zoomInGeo={name:"zoomInGeo",_cat:"zoomin",title:function(v){return s(v,"Zoom in")},attr:"zoom",val:"in",icon:T.zoom_plus,click:a},t.zoomOutGeo={name:"zoomOutGeo",_cat:"zoomout",title:function(v){return s(v,"Zoom out")},attr:"zoom",val:"out",icon:T.zoom_minus,click:a},t.resetGeo={name:"resetGeo",_cat:"reset",title:function(v){return s(v,"Reset")},attr:"reset",val:null,icon:T.autoscale,click:a},t.hoverClosestGeo={name:"hoverClosestGeo",_cat:"hoverclosest",title:function(v){return s(v,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:T.tooltip_basic,gravity:"ne",click:p},t.hoverClosestGl2d={name:"hoverClosestGl2d",_cat:"hoverclosest",title:function(v){return s(v,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:T.tooltip_basic,gravity:"ne",click:p},t.hoverClosestPie={name:"hoverClosestPie",_cat:"hoverclosest",title:function(v){return s(v,"Toggle show closest data on hover")},attr:"hovermode",val:"closest",icon:T.tooltip_basic,gravity:"ne",click:p},t.resetViewSankey={name:"resetSankeyGroup",title:function(v){return s(v,"Reset view")},icon:T.home,click:function(v){for(var g={"node.groups":[],"node.x":[],"node.y":[]},y=0;y<v._fullData.length;y++){var h=v._fullData[y]._viewInitial;g["node.groups"].push(h.node.groups.slice()),g["node.x"].push(h.node.x.slice()),g["node.y"].push(h.node.y.slice())}k.call("restyle",v,g)}},t.toggleHover={name:"toggleHover",title:function(v){return s(v,"Toggle show closest data on hover")},attr:"hovermode",val:null,toggle:!0,icon:T.tooltip_basic,gravity:"ne",click:function(v,g){var y=i(v,g);y.hovermode=c(v),k.call("_guiRelayout",v,y)}},t.resetViews={name:"resetViews",title:function(v){return s(v,"Reset views")},icon:T.home,click:function(v,g){var y=g.currentTarget;y.setAttribute("data-attr","zoom"),y.setAttribute("data-val","reset"),o(v,g),y.setAttribute("data-attr","resetLastSave"),n(v,g),x(v,"geo"),x(v,"mapbox")}},t.toggleSpikelines={name:"toggleSpikelines",title:function(v){return s(v,"Toggle Spike Lines")},icon:T.spikeline,attr:"_cartesianSpikesEnabled",val:"on",click:function(v){var g=v._fullLayout;g._cartesianSpikesEnabled="on"===g._cartesianSpikesEnabled?"off":"on",k.call("_guiRelayout",v,function(h){for(var m="on"===h._fullLayout._cartesianSpikesEnabled,w=l.list(h,null,!0),u={},S=0;S<w.length;S++){var _=w[S];u[_._name+".showspikes"]=!!m||_._showSpikeInitial}return u}(v))}},t.resetViewMapbox={name:"resetViewMapbox",_cat:"resetView",title:function(v){return s(v,"Reset view")},attr:"reset",icon:T.home,click:function(v){x(v,"mapbox")}},t.zoomInMapbox={name:"zoomInMapbox",_cat:"zoomin",title:function(v){return s(v,"Zoom in")},attr:"zoom",val:"in",icon:T.zoom_plus,click:f},t.zoomOutMapbox={name:"zoomOutMapbox",_cat:"zoomout",title:function(v){return s(v,"Zoom out")},attr:"zoom",val:"out",icon:T.zoom_minus,click:f}},93348:function($,R,e){"use strict";var k=e(26023),A=Object.keys(k),l=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],T=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(l),b=[];A.forEach(function(d){!function(s){if(-1===T.indexOf(s._cat||s.name)){var t=s.name,o=(s._cat||s.name).toLowerCase();-1===b.indexOf(t)&&b.push(t),-1===b.indexOf(o)&&b.push(o)}}(k[d])}),b.sort(),$.exports={DRAW_MODES:l,backButtons:T,foreButtons:b}},35750:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(44467),T=e(42068);$.exports=function(b,d){var s=b.modebar||{},t=l.newContainer(d,"modebar");function o(n,i){return k.coerce(s,t,T,n,i)}o("orientation"),o("bgcolor",A.addOpacity(d.paper_bgcolor,.5));var r=A.contrast(A.rgb(d.modebar.bgcolor));o("color",A.addOpacity(r,.3)),o("activecolor",A.addOpacity(r,.7)),o("uirevision",d.uirevision),o("add"),o("remove")}},64168:function($,R,e){"use strict";$.exports={moduleType:"component",name:"modebar",layoutAttributes:e(42068),supplyLayoutDefaults:e(35750),manage:e(14192)}},14192:function($,R,e){"use strict";var k=e(41675),A=e(34098),l=e(73972),T=e(23469).isUnifiedHover,b=e(37676),d=e(26023),s=e(93348).DRAW_MODES,t=e(71828).extendDeep;$.exports=function(o){var r=o._fullLayout,n=o._context,i=r._modeBar;if(n.displayModeBar||n.watermark){if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var a,c=n.modeBarButtons;a=Array.isArray(c)&&c.length?function(p){for(var f=t([],p),x=0;x<f.length;x++)for(var v=f[x],g=0;g<v.length;g++){var y=v[g];if("string"==typeof y){if(void 0===d[y])throw new Error(["*modeBarButtons* configuration options","invalid button name"].join(" "));f[x][g]=d[y]}}return f}(c):!n.displayModeBar&&n.watermark?[]:function(p){var f=p._fullLayout,x=p._fullData,v=p._context;function g(ce,me){if("string"==typeof me){if(me.toLowerCase()===ce.toLowerCase())return!0}else if(me.name===ce||(me._cat||me.name)===ce.toLowerCase())return!0;return!1}var y=f.modebar.add;"string"==typeof y&&(y=[y]);var h=f.modebar.remove;"string"==typeof h&&(h=[h]);var m=v.modeBarButtonsToAdd.concat(y.filter(function(ce){for(var me=0;me<v.modeBarButtonsToRemove.length;me++)if(g(ce,v.modeBarButtonsToRemove[me]))return!1;return!0})),w=v.modeBarButtonsToRemove.concat(h.filter(function(ce){for(var me=0;me<v.modeBarButtonsToAdd.length;me++)if(g(ce,v.modeBarButtonsToAdd[me]))return!1;return!0})),u=f._has("cartesian"),S=f._has("gl3d"),_=f._has("geo"),E=f._has("pie"),L=f._has("funnelarea"),C=f._has("gl2d"),P=f._has("ternary"),I=f._has("mapbox"),U=f._has("polar"),z=f._has("smith"),H=f._has("sankey"),F=function(ce){for(var me=k.list({_fullLayout:ce},null,!0),de=0;de<me.length;de++)if(!me[de].fixedrange)return!1;return!0}(f),N=T(f.hovermode),B=[];function j(ce){if(ce.length){for(var me=[],de=0;de<ce.length;de++){for(var he=ce[de],ve=d[he],Pe=ve.name.toLowerCase(),xe=(ve._cat||ve.name).toLowerCase(),ke=!1,Ae=0;Ae<w.length;Ae++){var Te=w[Ae].toLowerCase();if(Te===Pe||Te===xe){ke=!0;break}}ke||me.push(d[he])}B.push(me)}}var J=["toImage"];v.showEditInChartStudio?J.push("editInChartStudio"):v.showSendToCloud&&J.push("sendDataToCloud"),j(J);var G=[],V=[],W=[],X=[];(u||C||E||L||P)+_+S+I+U+z>1?(V=["toggleHover"],W=["resetViews"]):_?(G=["zoomInGeo","zoomOutGeo"],V=["hoverClosestGeo"],W=["resetGeo"]):S?(V=["hoverClosest3d"],W=["resetCameraDefault3d","resetCameraLastSave3d"]):I?(G=["zoomInMapbox","zoomOutMapbox"],V=["toggleHover"],W=["resetViewMapbox"]):C?V=["hoverClosestGl2d"]:E?V=["hoverClosestPie"]:H?(V=["hoverClosestCartesian","hoverCompareCartesian"],W=["resetViewSankey"]):V=["toggleHover"],u&&(V=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(function(ce){for(var me=0;me<ce.length;me++)if(!l.traceIs(ce[me],"noHover"))return!1;return!0}(x)||N)&&(V=[]),!u&&!C||F||(G=["zoomIn2d","zoomOut2d","autoScale2d"],"resetViews"!==W[0]&&(W=["resetScale2d"])),S?X=["zoom3d","pan3d","orbitRotation","tableRotation"]:(u||C)&&!F||P?X=["zoom2d","pan2d"]:I||_?X=["pan2d"]:U&&(X=["zoom2d"]),function(ce){for(var me=!1,de=0;de<ce.length&&!me;de++){var he=ce[de];he._module&&he._module.selectPoints&&(l.traceIs(he,"scatter-like")?(A.hasMarkers(he)||A.hasText(he))&&(me=!0):l.traceIs(he,"box-violin")&&"all"!==he.boxpoints&&"all"!==he.points||(me=!0))}return me}(x)&&X.push("select2d","lasso2d");var K=[],re=function(ce){-1===K.indexOf(ce)&&-1!==V.indexOf(ce)&&K.push(ce)};if(Array.isArray(m)){for(var ee=[],ie=0;ie<m.length;ie++){var oe=m[ie];"string"==typeof oe?(oe=oe.toLowerCase(),-1!==s.indexOf(oe)?(f._has("mapbox")||f._has("cartesian"))&&X.push(oe):"togglespikelines"===oe?re("toggleSpikelines"):"togglehover"===oe?re("toggleHover"):"hovercompare"===oe?re("hoverCompareCartesian"):"hoverclosest"===oe?(re("hoverClosestCartesian"),re("hoverClosestGeo"),re("hoverClosest3d"),re("hoverClosestGl2d"),re("hoverClosestPie")):"v1hovermode"===oe&&(re("toggleHover"),re("hoverClosestCartesian"),re("hoverCompareCartesian"),re("hoverClosestGeo"),re("hoverClosest3d"),re("hoverClosestGl2d"),re("hoverClosestPie"))):ee.push(oe)}m=ee}return j(X),j(G.concat(W)),j(K),function(ce,me){if(me.length)if(Array.isArray(me[0]))for(var de=0;de<me.length;de++)ce.push(me[de]);else ce.push(me);return ce}(B,m)}(o),i?i.update(o,a):r._modeBar=b(o,a)}else i&&(i.destroy(),delete r._modeBar)}},37676:function($,R,e){"use strict";var k=e(39898),A=e(92770),l=e(71828),T=e(24255),b=e(11506).version,d=new DOMParser;function s(o){this.container=o.container,this.element=document.createElement("div"),this.update(o.graphInfo,o.buttons),this.container.appendChild(this.element)}var t=s.prototype;t.update=function(o,r){this.graphInfo=o;var n=this.graphInfo._context,i=this.graphInfo._fullLayout,a="modebar-"+i._uid;this.element.setAttribute("id",a),this._uid=a,this.element.className="modebar","hover"===n.displayModeBar&&(this.element.className+=" modebar--hover ease-bg"),"v"===i.modebar.orientation&&(this.element.className+=" vertical",r=r.reverse());var c=i.modebar,p="hover"===n.displayModeBar?".js-plotly-plot .plotly:hover ":"";l.deleteRelatedStyleRule(a),l.addRelatedStyleRule(a,p+"#"+a+" .modebar-group","background-color: "+c.bgcolor),l.addRelatedStyleRule(a,"#"+a+" .modebar-btn .icon path","fill: "+c.color),l.addRelatedStyleRule(a,"#"+a+" .modebar-btn:hover .icon path","fill: "+c.activecolor),l.addRelatedStyleRule(a,"#"+a+" .modebar-btn.active .icon path","fill: "+c.activecolor);var f=!this.hasButtons(r),x=this.hasLogo!==n.displaylogo,v=this.locale!==n.locale;if(this.locale=n.locale,(f||x||v)&&(this.removeAllButtons(),this.updateButtons(r),n.watermark||n.displaylogo)){var g=this.getLogo();n.watermark&&(g.className=g.className+" watermark"),"v"===i.modebar.orientation?this.element.insertBefore(g,this.element.childNodes[0]):this.element.appendChild(g),this.hasLogo=!0}this.updateActiveButton()},t.updateButtons=function(o){var r=this;this.buttons=o,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(n){var i=r.createGroup();n.forEach(function(a){var c=a.name;if(!c)throw new Error("must provide button 'name' in button config");if(-1!==r.buttonsNames.indexOf(c))throw new Error("button name '"+c+"' is taken");r.buttonsNames.push(c);var p=r.createButton(a);r.buttonElements.push(p),i.appendChild(p)}),r.element.appendChild(i)})},t.createGroup=function(){var o=document.createElement("div");return o.className="modebar-group",o},t.createButton=function(o){var r=this,n=document.createElement("a");n.setAttribute("rel","tooltip"),n.className="modebar-btn";var i=o.title;void 0===i?i=o.name:"function"==typeof i&&(i=i(this.graphInfo)),(i||0===i)&&n.setAttribute("data-title",i),void 0!==o.attr&&n.setAttribute("data-attr",o.attr);var a=o.val;if(void 0!==a&&("function"==typeof a&&(a=a(this.graphInfo)),n.setAttribute("data-val",a)),"function"!=typeof o.click)throw new Error("must provide button 'click' function in button config");n.addEventListener("click",function(p){o.click(r.graphInfo,p),r.updateActiveButton(p.currentTarget)}),n.setAttribute("data-toggle",o.toggle||!1),o.toggle&&k.select(n).classed("active",!0);var c=o.icon;return n.appendChild("function"==typeof c?c():this.createIcon(c||T.question)),n.setAttribute("data-gravity",o.gravity||"n"),n},t.createIcon=function(o){var r,n=A(o.height)?Number(o.height):o.ascent-o.descent,i="http://www.w3.org/2000/svg";if(o.path){(r=document.createElementNS(i,"svg")).setAttribute("viewBox",[0,0,o.width,n].join(" ")),r.setAttribute("class","icon");var a=document.createElementNS(i,"path");a.setAttribute("d",o.path),o.transform?a.setAttribute("transform",o.transform):void 0!==o.ascent&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+o.ascent+")"),r.appendChild(a)}return o.svg&&(r=d.parseFromString(o.svg,"application/xml").childNodes[0]),r.setAttribute("height","1em"),r.setAttribute("width","1em"),r},t.updateActiveButton=function(o){var r=this.graphInfo._fullLayout,n=void 0!==o?o.getAttribute("data-attr"):null;this.buttonElements.forEach(function(i){var a=i.getAttribute("data-val")||!0,c=i.getAttribute("data-attr"),p="true"===i.getAttribute("data-toggle"),f=k.select(i);if(p)c===n&&f.classed("active",!f.classed("active"));else{var x=null===c?c:l.nestedProperty(r,c).get();f.classed("active",x===a)}})},t.hasButtons=function(o){var r=this.buttons;if(!r||o.length!==r.length)return!1;for(var n=0;n<o.length;++n){if(o[n].length!==r[n].length)return!1;for(var i=0;i<o[n].length;i++)if(o[n][i].name!==r[n][i].name)return!1}return!0},t.getLogo=function(){var o=this.createGroup(),r=document.createElement("a");return r.href="https://plotly.com/",r.target="_blank",r.setAttribute("data-title",l._(this.graphInfo,"Produced with Plotly.js")+" (v"+b+")"),r.className="modebar-btn plotlyjsicon modebar-btn--logo",r.appendChild(this.createIcon(T.newplotlylogo)),o.appendChild(r),o},t.removeAllButtons=function(){for(;this.element.firstChild;)this.element.removeChild(this.element.firstChild);this.hasLogo=!1},t.destroy=function(){l.removeElement(this.container.querySelector(".modebar")),l.deleteRelatedStyleRule(this._uid)},$.exports=function(o,r){var n=o._fullLayout,i=new s({graphInfo:o,container:n._modebardiv.node(),buttons:r});return n._privateplot&&k.select(i.element).append("span").classed("badge-private float--left",!0).text("PRIVATE"),i}},37113:function($,R,e){"use strict";var k=e(41940),A=e(22399),l=(0,e(44467).templatedArray)("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});$.exports={visible:{valType:"boolean",editType:"plot"},buttons:l,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:k({editType:"plot"}),bgcolor:{valType:"color",dflt:A.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:A.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}},89573:function($){"use strict";$.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}},28674:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(44467),T=e(85501),b=e(37113),d=e(89573);function s(t,o,r,n){var i=n.calendar;function a(p,f){return k.coerce(t,o,b.buttons,p,f)}if(a("visible")){var c=a("step");"all"!==c&&(!i||"gregorian"===i||"month"!==c&&"year"!==c?a("stepmode"):o.stepmode="backward",a("count")),a("label")}}$.exports=function(t,o,r,n,i){var a=t.rangeselector||{},c=l.newContainer(o,"rangeselector");function p(v,g){return k.coerce(a,c,b,v,g)}if(p("visible",T(a,c,{name:"buttons",handleItemDefaults:s,calendar:i}).length>0)){var f=function(v,g,y){for(var h=y.filter(function(S){return g[S].anchor===v._id}),m=0,w=0;w<h.length;w++){var u=g[h[w]].domain;u&&(m=Math.max(u[1],m))}return[v.domain[0],m+d.yPad]}(o,r,n);p("x",f[0]),p("y",f[1]),k.noneOrAll(t,o,["x","y"]),p("xanchor"),p("yanchor"),k.coerceFont(p,"font",r.font);var x=p("bgcolor");p("activecolor",A.contrast(x,d.lightAmount,d.darkAmount)),p("bordercolor"),p("borderwidth")}}},21598:function($,R,e){"use strict";var k=e(39898),A=e(73972),l=e(74875),T=e(7901),b=e(91424),d=e(71828),s=d.strTranslate,t=e(63893),o=e(41675),r=e(18783),n=r.LINE_SPACING,i=r.FROM_TL,a=r.FROM_BR,c=e(89573),p=e(70565);function f(g){return g._id}function x(g,y,h){var w,u,m=d.ensureSingle(g,"rect","selector-rect",function(w){w.attr("shape-rendering","crispEdges")});m.attr({rx:c.rx,ry:c.ry}),m.call(T.stroke,y.bordercolor).call(T.fill,(w=y,u=h,u._isActive||u._isHovered?w.activecolor:w.bgcolor)).style("stroke-width",y.borderwidth+"px")}function v(g,y,h,m){var w,u;d.ensureSingle(g,"text","selector-text",function(S){S.attr("text-anchor","middle")}).call(b.font,y.font).text((w=h,u=m._fullLayout._meta,w.label?u?d.templateString(w.label,u):w.label:"all"===w.step?"all":w.count+w.step.charAt(0))).call(function(S){t.convertToTspans(S,m)})}$.exports=function(g){var y=g._fullLayout._infolayer.selectAll(".rangeselector").data(function(h){for(var m=o.list(h,"x",!0),w=[],u=0;u<m.length;u++){var S=m[u];S.rangeselector&&S.rangeselector.visible&&w.push(S)}return w}(g),f);y.enter().append("g").classed("rangeselector",!0),y.exit().remove(),y.style({cursor:"pointer","pointer-events":"all"}),y.each(function(h){var m=k.select(this),w=h,u=w.rangeselector,S=m.selectAll("g.button").data(d.filterVisible(u.buttons));S.enter().append("g").classed("button",!0),S.exit().remove(),S.each(function(_){var E=k.select(this),L=p(w,_);_._isActive=function(C,P,I){if("all"===P.step)return!0===C.autorange;var U=Object.keys(I);return C.range[0]===I[U[0]]&&C.range[1]===I[U[1]]}(w,_,L),E.call(x,u,_),E.call(v,u,_,g),E.on("click",function(){g._dragged||A.call("_guiRelayout",g,L)}),E.on("mouseover",function(){_._isHovered=!0,E.call(x,u,_)}),E.on("mouseout",function(){_._isHovered=!1,E.call(x,u,_)})}),function(_,E,L,C,P){var I=0,U=0,z=L.borderwidth;E.each(function(){var J=k.select(this).select(".selector-text"),V=Math.max(L.font.size*n*t.lineCount(J),16)+3;U=Math.max(U,V)}),E.each(function(){var J=k.select(this),G=J.select(".selector-rect"),V=J.select(".selector-text"),W=V.node()&&b.bBox(V.node()).width,X=L.font.size*n,K=t.lineCount(V),re=Math.max(W+10,c.minButtonWidth);J.attr("transform",s(z+I,z)),G.attr({x:0,y:0,width:re,height:U}),t.positionText(V,re/2,U/2-(K-1)*X/2+3),I+=re+5});var H=_._fullLayout._size,F=H.l+H.w*L.x,N=H.t+H.h*(1-L.y),B="left";d.isRightAnchor(L)&&(F-=I,B="right"),d.isCenterAnchor(L)&&(F-=I/2,B="center");var j="top";d.isBottomAnchor(L)&&(N-=U,j="bottom"),d.isMiddleAnchor(L)&&(N-=U/2,j="middle"),I=Math.ceil(I),U=Math.ceil(U),F=Math.round(F),N=Math.round(N),l.autoMargin(_,C+"-range-selector",{x:L.x,y:L.y,l:I*i[B],r:I*a[B],b:U*a[j],t:U*i[j]}),P.attr("transform",s(F,N))}(g,S,u,w._name,m)})}},70565:function($,R,e){"use strict";var k=e(81041),A=e(71828).titleCase;$.exports=function(l,T){var b=l._name,d={};if("all"===T.step)d[b+".autorange"]=!0;else{var s=function(t,o){var r,n=t.range,i=new Date(t.r2l(n[1])),c=k["utc"+A(o.step)],p=o.count;switch(o.stepmode){case"backward":r=t.l2r(+c.offset(i,-p));break;case"todate":var f=c.offset(i,-p);r=t.l2r(+c.ceil(f))}return[r,n[1]]}(l,T);d[b+".range[0]"]=s[0],d[b+".range[1]"]=s[1]}return d}},97218:function($,R,e){"use strict";$.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:e(37113)}}},layoutAttributes:e(37113),handleDefaults:e(28674),draw:e(21598)}},75148:function($,R,e){"use strict";var k=e(22399);$.exports={bgcolor:{valType:"color",dflt:k.background,editType:"plot"},bordercolor:{valType:"color",dflt:k.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}},88443:function($,R,e){"use strict";var k=e(41675).list,A=e(71739).getAutoRange,l=e(73251);$.exports=function(T){for(var b=k(T,"x",!0),d=0;d<b.length;d++){var s=b[d],t=s[l.name];t&&t.visible&&t.autorange&&(t._input.autorange=!0,t._input.range=t.range=A(T,s))}}},73251:function($){"use strict";$.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}},26377:function($,R,e){"use strict";var k=e(71828),A=e(44467),l=e(41675),T=e(75148),b=e(47850);$.exports=function(d,s,t){var o=d[t],r=s[t];if(o.rangeslider||s._requestRangeslider[r._id]){k.isPlainObject(o.rangeslider)||(o.rangeslider={});var n,i,a=o.rangeslider,c=A.newContainer(r,"rangeslider");if(m("visible")){m("bgcolor",s.plot_bgcolor),m("bordercolor"),m("borderwidth"),m("thickness"),m("autorange",!r.isValidRange(a.range)),m("range");var p=s._subplots;if(p)for(var f=p.cartesian.filter(function(u){return u.substr(0,u.indexOf("y"))===l.name2id(t)}).map(function(u){return u.substr(u.indexOf("y"),u.length)}),x=k.simpleMap(f,l.id2name),v=0;v<x.length;v++){var g=x[v];n=a[g]||{},i=A.newContainer(c,g,"yaxis");var y,h=s[g];n.range&&h.isValidRange(n.range)&&(y="fixed"),"match"!==w("rangemode",y)&&w("range",h.range.slice())}c._input=a}}function m(u,S){return k.coerce(a,c,T,u,S)}function w(u,S){return k.coerce(n,i,b,u,S)}}},72413:function($,R,e){"use strict";var k=e(39898),A=e(73972),l=e(74875),T=e(71828),b=T.strTranslate,d=e(91424),s=e(7901),t=e(92998),o=e(93612),r=e(41675),n=e(28569),i=e(6964),a=e(73251);function c(y,h,m,w){var u=T.ensureSingle(y,"rect",a.bgClassName,function(L){L.attr({x:0,y:0,"shape-rendering":"crispEdges"})}),S=w.borderwidth%2==0?w.borderwidth:w.borderwidth-1,_=-w._offsetShift,E=d.crispRound(h,w.borderwidth);u.attr({width:w._width+S,height:w._height+S,transform:b(_,_),"stroke-width":E}).call(s.stroke,w.bordercolor).call(s.fill,w.bgcolor)}function p(y,h,m,w){T.ensureSingleById(h._fullLayout._topdefs,"clipPath",w._clipId,function(S){S.append("rect").attr({x:0,y:0})}).select("rect").attr({width:w._width,height:w._height})}function f(y,h,m,w){var u,S=h.calcdata,_=y.selectAll("g."+a.rangePlotClassName).data(m._subplotsWith,T.identity);_.enter().append("g").attr("class",function(E){return a.rangePlotClassName+" "+E}).call(d.setClipUrl,w._clipId,h),_.order(),_.exit().remove(),_.each(function(E,L){var C=k.select(this),P=0===L,I=r.getFromId(h,E,"y"),U=I._name,z=w[U],H={data:[],layout:{xaxis:{type:m.type,domain:[0,1],range:w.range.slice(),calendar:m.calendar},width:w._width,height:w._height,margin:{t:0,b:0,l:0,r:0}},_context:h._context};m.rangebreaks&&(H.layout.xaxis.rangebreaks=m.rangebreaks),H.layout[U]={type:I.type,domain:[0,1],range:"match"!==z.rangemode?z.range.slice():I.range.slice(),calendar:I.calendar},I.rangebreaks&&(H.layout[U].rangebreaks=I.rangebreaks),l.supplyDefaults(H);var F=H._fullLayout.xaxis,N=H._fullLayout[U];F.clearCalc(),F.setScale(),N.clearCalc(),N.setScale();var B={id:E,plotgroup:C,xaxis:F,yaxis:N,isRangePlot:!0};P?u=B:(B.mainplot="xy",B.mainplotinfo=u),o.rangePlot(h,B,function(j,J){for(var G=[],V=0;V<j.length;V++){var W=j[V],X=W[0].trace;X.xaxis+X.yaxis===J&&G.push(W)}return G}(S,E))})}function x(y,h,m,w,u){T.ensureSingle(y,"rect",a.maskMinClassName,function(S){S.attr({x:0,y:0,"shape-rendering":"crispEdges"})}).attr("height",w._height).call(s.fill,a.maskColor),T.ensureSingle(y,"rect",a.maskMaxClassName,function(S){S.attr({y:0,"shape-rendering":"crispEdges"})}).attr("height",w._height).call(s.fill,a.maskColor),"match"!==u.rangemode&&(T.ensureSingle(y,"rect",a.maskMinOppAxisClassName,function(S){S.attr({y:0,"shape-rendering":"crispEdges"})}).attr("width",w._width).call(s.fill,a.maskOppAxisColor),T.ensureSingle(y,"rect",a.maskMaxOppAxisClassName,function(S){S.attr({y:0,"shape-rendering":"crispEdges"})}).attr("width",w._width).style("border-top",a.maskOppBorder).call(s.fill,a.maskOppAxisColor))}function v(y,h,m,w){h._context.staticPlot||T.ensureSingle(y,"rect",a.slideBoxClassName,function(u){u.attr({y:0,cursor:a.slideBoxCursor,"shape-rendering":"crispEdges"})}).attr({height:w._height,fill:a.slideBoxFill})}function g(y,h,m,w){var u=T.ensureSingle(y,"g",a.grabberMinClassName),S=T.ensureSingle(y,"g",a.grabberMaxClassName),_={x:0,width:a.handleWidth,rx:a.handleRadius,fill:s.background,stroke:s.defaultLine,"stroke-width":a.handleStrokeWidth,"shape-rendering":"crispEdges"},E={y:Math.round(w._height/4),height:Math.round(w._height/2)};T.ensureSingle(u,"rect",a.handleMinClassName,function(C){C.attr(_)}).attr(E),T.ensureSingle(S,"rect",a.handleMaxClassName,function(C){C.attr(_)}).attr(E);var L={width:a.grabAreaWidth,x:0,y:0,fill:a.grabAreaFill,cursor:h._context.staticPlot?void 0:a.grabAreaCursor};T.ensureSingle(u,"rect",a.grabAreaMinClassName,function(C){C.attr(L)}).attr("height",w._height),T.ensureSingle(S,"rect",a.grabAreaMaxClassName,function(C){C.attr(L)}).attr("height",w._height)}$.exports=function(y){for(var h=y._fullLayout,m=h._rangeSliderData,w=0;w<m.length;w++){var u=m[w][a.name];u._clipId=u._id+"-"+h._uid}var S=h._infolayer.selectAll("g."+a.containerClassName).data(m,function(_){return _._name});S.exit().each(function(_){h._topdefs.select("#"+_[a.name]._clipId).remove()}).remove(),0!==m.length&&(S.enter().append("g").classed(a.containerClassName,!0).attr("pointer-events","all"),S.each(function(_){var E=k.select(this),L=_[a.name],C=h[r.id2name(_.anchor)],P=L[r.id2name(_.anchor)];if(L.range){var I,U=T.simpleMap(L.range,_.r2l),z=T.simpleMap(_.range,_.r2l);I=z[0]<z[1]?[Math.min(U[0],z[0]),Math.max(U[1],z[1])]:[Math.max(U[0],z[0]),Math.min(U[1],z[1])],L.range=L._input.range=T.simpleMap(I,_.l2r)}_.cleanRange("rangeslider.range");var H=h._size,F=_.domain;L._width=H.w*(F[1]-F[0]);var N=Math.round(H.l+H.w*F[0]),B=Math.round(H.t+H.h*(1-_._counterDomainMin)+("bottom"===_.side?_._depth:0)+L._offsetShift+a.extraPad);E.attr("transform",b(N,B)),L._rl=T.simpleMap(L.range,_.r2l);var j=L._rl[0],J=L._rl[1],G=J-j;if(L.p2d=function(ce){return ce/L._width*G+j},L.d2p=function(ce){return(ce-j)/G*L._width},_.rangebreaks){var V=_.locateBreaks(j,J);if(V.length){var W,X,K=0;for(W=0;W<V.length;W++)K+=(X=V[W]).max-X.min;var re=L._width/(J-j-K),ee=[-re*j];for(W=0;W<V.length;W++)ee.push(ee[ee.length-1]-re*((X=V[W]).max-X.min));for(L.d2p=function(ce){for(var me=ee[0],de=0;de<V.length;de++){var he=V[de];if(ce>=he.max)me=ee[de+1];else if(ce<he.min)break}return me+re*ce},W=0;W<V.length;W++)(X=V[W]).pmin=L.d2p(X.min),X.pmax=L.d2p(X.max);L.p2d=function(ce){for(var me=ee[0],de=0;de<V.length;de++){var he=V[de];if(ce>=he.pmax)me=ee[de+1];else if(ce<he.pmin)break}return(ce-me)/re}}}if("match"!==P.rangemode){var ie=C.r2l(P.range[0]),oe=C.r2l(P.range[1])-ie;L.d2pOppAxis=function(ce){return(ce-ie)/oe*L._height}}E.call(c,y,_,L).call(p,y,_,L).call(f,y,_,L).call(x,y,_,L,P).call(v,y,_,L).call(g,y,_,L),function(ce,me,de,he){if(!me._context.staticPlot){var ve=ce.select("rect."+a.slideBoxClassName).node(),Pe=ce.select("rect."+a.grabAreaMinClassName).node(),xe=ce.select("rect."+a.grabAreaMaxClassName).node();ce.on("mousedown",ke),ce.on("touchstart",ke)}function ke(){var Ae=k.event,Te=Ae.target,Q=Ae.clientX||Ae.touches[0].clientX,se=Q-ce.node().getBoundingClientRect().left,fe=he.d2p(de._rl[0]),ye=he.d2p(de._rl[1]),Me=n.coverSlip();function Ie(Re){var le,ge,_e,Fe=+(Re.clientX||Re.touches[0].clientX)-Q;switch(Te){case ve:_e="ew-resize",le=fe+Fe,ge=ye+Fe;break;case Pe:_e="col-resize",le=fe+Fe,ge=ye;break;case xe:_e="col-resize",le=fe,ge=ye+Fe;break;default:_e="ew-resize",le=se,ge=se+Fe}if(ge<le){var Ve=ge;ge=le,le=Ve}he._pixelMin=le,he._pixelMax=ge,i(k.select(Me),_e),function(He,nt,tt,ot){function dt(wt){return tt.l2r(T.constrain(wt,ot._rl[0],ot._rl[1]))}var kt=dt(ot.p2d(ot._pixelMin)),mt=dt(ot.p2d(ot._pixelMax));window.requestAnimationFrame(function(){A.call("_guiRelayout",nt,tt._name+".range",[kt,mt])})}(0,me,de,he)}function Ce(){Me.removeEventListener("mousemove",Ie),Me.removeEventListener("mouseup",Ce),this.removeEventListener("touchmove",Ie),this.removeEventListener("touchend",Ce),T.removeElement(Me)}this.addEventListener("touchmove",Ie),this.addEventListener("touchend",Ce),Me.addEventListener("mousemove",Ie),Me.addEventListener("mouseup",Ce)}}(E,y,_,L),function(ce,me,de,he,ve,Pe){var xe=a.handleWidth/2;function ke(Re){return T.constrain(Re,0,he._width)}function Ae(Re){return T.constrain(Re,0,he._height)}function Te(Re){return T.constrain(Re,-xe,he._width+xe)}var Q=ke(he.d2p(de._rl[0])),se=ke(he.d2p(de._rl[1]));if(ce.select("rect."+a.slideBoxClassName).attr("x",Q).attr("width",se-Q),ce.select("rect."+a.maskMinClassName).attr("width",Q),ce.select("rect."+a.maskMaxClassName).attr("x",se).attr("width",he._width-se),"match"!==Pe.rangemode){var fe=he._height-Ae(he.d2pOppAxis(ve._rl[1])),ye=he._height-Ae(he.d2pOppAxis(ve._rl[0]));ce.select("rect."+a.maskMinOppAxisClassName).attr("x",Q).attr("height",fe).attr("width",se-Q),ce.select("rect."+a.maskMaxOppAxisClassName).attr("x",Q).attr("y",ye).attr("height",he._height-ye).attr("width",se-Q),ce.select("rect."+a.slideBoxClassName).attr("y",fe).attr("height",ye-fe)}var Ie=Math.round(Te(Q-xe))-.5,Ce=Math.round(Te(se-xe))+.5;ce.select("g."+a.grabberMinClassName).attr("transform",b(Ie,.5)),ce.select("g."+a.grabberMaxClassName).attr("transform",b(Ce,.5))}(E,0,_,L,C,P),"bottom"===_.side&&t.draw(y,_._id+"title",{propContainer:_,propName:_._name+".title",placeholder:h._dfltTitle.x,attributes:{x:_._offset+_._length/2,y:B+L._height+L._offsetShift+10+1.5*_.title.font.size,"text-anchor":"middle"}})}))}},549:function($,R,e){"use strict";var k=e(41675),A=e(63893),l=e(73251),T=e(18783).LINE_SPACING,b=l.name;function d(s){var t=s&&s[b];return t&&t.visible}R.isVisible=d,R.makeData=function(s){var t=k.list({_fullLayout:s},"x",!0),o=s.margin,r=[];if(!s._has("gl2d"))for(var n=0;n<t.length;n++){var i=t[n];if(d(i)){r.push(i);var a=i[b];a._id=b+i._id,a._height=(s.height-o.b-o.t)*a.thickness,a._offsetShift=Math.floor(a.borderwidth/2)}}s._rangeSliderData=r},R.autoMarginOpts=function(s,t){var o=s._fullLayout,r=t[b],n=t._id.charAt(0),i=0,a=0;return"bottom"===t.side&&(i=t._depth,t.title.text!==o._dfltTitle[n]&&(a=1.5*t.title.font.size+10+r._offsetShift,a+=(t.title.text.match(A.BR_TAG_ALL)||[]).length*t.title.font.size*T)),{x:0,y:t._counterDomainMin,l:0,r:0,t:0,b:r._height+i+Math.max(o.margin.b,a),pad:l.extraPad+2*r._offsetShift}}},13137:function($,R,e){"use strict";var k=e(71828),A=e(75148),l=e(47850),T=e(549);$.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:k.extendFlat({},A,{yaxis:l})}}},layoutAttributes:e(75148),handleDefaults:e(26377),calcAutorange:e(88443),draw:e(72413),isVisible:T.isVisible,makeData:T.makeData,autoMarginOpts:T.autoMarginOpts}},47850:function($){"use strict";$.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}},8389:function($,R,e){"use strict";var k=e(50215),A=e(82196).line,l=e(79952).P,T=e(1426).extendFlat,b=e(30962).overrideAll,d=e(44467).templatedArray;e(24695),$.exports=b(d("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:T({},k.xref,{}),yref:T({},k.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:A.color,width:T({},A.width,{min:1,dflt:1}),dash:T({},l,{dflt:"dot"})}}),"arraydraw","from-root")},34122:function($){"use strict";$.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}},59402:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(85501),T=e(8389),b=e(30477);function d(s,t,o){function r(E,L){return k.coerce(s,t,T,E,L)}var n=r("path"),i="path"!==r("type",n?"path":"rect");i&&delete t.path,r("opacity"),r("line.color"),r("line.width"),r("line.dash");for(var a=["x","y"],c=0;c<2;c++){var p,f,x,v=a[c],g={_fullLayout:o},y=A.coerceRef(s,t,g,v);if((p=A.getFromId(g,y))._selectionIndices.push(t._index),x=b.rangeToShapePosition(p),f=b.shapePositionToRange(p),i){var h=v+"0",m=v+"1",w=s[h],u=s[m];s[h]=f(s[h],!0),s[m]=f(s[m],!0),A.coercePosition(t,g,r,y,h),A.coercePosition(t,g,r,y,m);var S=t[h],_=t[m];void 0!==S&&void 0!==_&&(t[h]=x(S),t[m]=x(_),s[h]=w,s[m]=u)}}i&&k.noneOrAll(s,t,["x0","x1","y0","y1"])}$.exports=function(s,t){l(s,t,{name:"selections",handleItemDefaults:d});for(var o=t.selections,r=0;r<o.length;r++){var n=o[r];n&&void 0===n.path&&(void 0!==n.x0&&void 0!==n.x1&&void 0!==n.y0&&void 0!==n.y1||(t.selections[r]=null))}}},32485:function($,R,e){"use strict";var k=e(60165).readPaths,A=e(42359),l=e(51873).clearOutlineControllers,T=e(7901),b=e(91424),d=e(44467).arrayEditor,s=e(30477),t=s.getPathString;function o(c){var p=c._fullLayout;for(var f in l(c),p._selectionLayer.selectAll("path").remove(),p._plots){var x=p._plots[f].selectionLayer;x&&x.selectAll("path").remove()}for(var v=0;v<p.selections.length;v++)n(c,v)}function r(c){return c._context.editSelection}function n(c,p){c._fullLayout._paperdiv.selectAll('.selectionlayer [data-index="'+p+'"]').remove();var f=s.makeSelectionsOptionsAndPlotinfo(c,p),x=f.options,v=f.plotinfo;x._input&&function(g){var y=t(c,x),h={"data-index":p,"fill-rule":"evenodd",d:y},m=x.opacity,w="rgba(0,0,0,0)",u=x.line.color||T.contrast(c._fullLayout.plot_bgcolor),S=x.line.width,_=x.line.dash;S||(S=5,_="solid");var E=r(c)&&c._fullLayout._activeSelectionIndex===p;E&&(w=c._fullLayout.activeselection.fillcolor,m=c._fullLayout.activeselection.opacity);for(var L=[],C=1;C>=0;C--){var P=g.append("path").attr(h).style("opacity",C?.1:m).call(T.stroke,u).call(T.fill,w).call(b.dashLine,C?"solid":_,C?4+S:S);if(i(P,c,x),E){var I=d(c.layout,"selections",x);P.style({cursor:"move"});var U={element:P.node(),plotinfo:v,gd:c,editHelpers:I,isActiveSelection:!0},z=k(y,c);A(z,P,U)}else P.style("pointer-events",C?"all":"none");L[C]=P}var H=L[0];L[1].node().addEventListener("click",function(){return function(F,N){if(r(F)){var B=+N.node().getAttribute("data-index");if(B>=0){if(B===F._fullLayout._activeSelectionIndex)return void a(F);F._fullLayout._activeSelectionIndex=B,F._fullLayout._deactivateSelection=a,o(F)}}}(c,H)})}(c._fullLayout._selectionLayer)}function i(c,p,f){b.setClipUrl(c,"clip"+p._fullLayout._uid+(f.xref+f.yref),p)}function a(c){r(c)&&c._fullLayout._activeSelectionIndex>=0&&(l(c),delete c._fullLayout._activeSelectionIndex,o(c))}$.exports={draw:o,drawOne:n,activateLastSelection:function(c){r(c)&&(c._fullLayout._activeSelectionIndex=c._fullLayout.selections.length-1,c._fullLayout._deactivateSelection=a,o(c))}}},53777:function($,R,e){"use strict";var k=e(79952).P,A=e(1426).extendFlat;$.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:A({},k,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},90849:function($){"use strict";$.exports=function(R,e,k){k("newselection.mode"),k("newselection.line.width")&&(k("newselection.line.color"),k("newselection.line.dash")),k("activeselection.fillcolor"),k("activeselection.opacity")}},35855:function($,R,e){"use strict";var k=e(64505).selectMode,A=e(51873).clearOutline,l=e(60165),T=l.readPaths,b=l.writePaths,d=l.fixDatesForPaths;$.exports=function(s,t){if(s.length){var o=s[0][0];if(o){var r=o.getAttribute("d"),n=t.gd,i=n._fullLayout.newselection,a=t.plotinfo,c=a.xaxis,p=a.yaxis,f=t.isActiveSelection,x=t.dragmode,v=(n.layout||{}).selections||[];if(!k(x)&&void 0!==f){var g=n._fullLayout._activeSelectionIndex;if(g<v.length)switch(n._fullLayout.selections[g].type){case"rect":x="select";break;case"path":x="lasso"}}var y,h=T(r,n,a,f),m={xref:c._id,yref:p._id,opacity:i.opacity,line:{color:i.line.color,width:i.line.width,dash:i.line.dash}};1===h.length&&(y=h[0]),y&&5===y.length&&"select"===x?(m.type="rect",m.x0=y[0][1],m.y0=y[0][2],m.x1=y[2][1],m.y1=y[2][2]):(m.type="path",c&&p&&d(h,c,p),m.path=b(h),y=null),A(n);for(var w=t.editHelpers,u=(w||{}).modifyItem,S=[],_=0;_<v.length;_++){var E=n._fullLayout.selections[_];if(E){if(S[_]=E._input,void 0!==f&&_===n._fullLayout._activeSelectionIndex){var L=m;switch(E.type){case"rect":u("x0",L.x0),u("x1",L.x1),u("y0",L.y0),u("y1",L.y1);break;case"path":u("path",L.path)}}}else S[_]=E}return void 0===f?(S.push(m),S):w?w.getUpdateObj():{}}}}},75549:function($,R,e){"use strict";var k=e(71828).strTranslate;function A(l,T){switch(l.type){case"log":return l.p2d(T);case"date":return l.p2r(T,0,l.calendar);default:return l.p2r(T)}}$.exports={p2r:A,r2p:function(l,T){switch(l.type){case"log":return l.d2p(T);case"date":return l.r2p(T,0,l.calendar);default:return l.r2p(T)}},axValue:function(l){var T="y"===l._id.charAt(0)?1:0;return function(b){return A(l,b[T])}},getTransform:function(l){return k(l.xaxis._offset,l.yaxis._offset)}}},47322:function($,R,e){"use strict";var k=e(32485),A=e(3937);$.exports={moduleType:"component",name:"selections",layoutAttributes:e(8389),supplyLayoutDefaults:e(59402),supplyDrawNewSelectionDefaults:e(90849),includeBasePlot:e(76325)("selections"),draw:k.draw,drawOne:k.drawOne,reselect:A.reselect,prepSelect:A.prepSelect,clearOutline:A.clearOutline,clearSelectionsCache:A.clearSelectionsCache,selectOnClick:A.selectOnClick}},3937:function($,R,e){"use strict";var k=e(52142),A=e(38258),l=e(73972),T=e(91424).dashStyle,b=e(7901),d=e(30211),s=e(23469).makeEventData,t=e(64505),o=t.freeMode,r=t.rectMode,n=t.drawMode,i=t.openMode,a=t.selectMode,c=e(30477),p=e(21459),f=e(42359),x=e(51873).clearOutline,v=e(60165),g=v.handleEllipse,y=v.readPaths,h=e(90551),m=e(35855),w=e(32485).activateLastSelection,u=e(71828),S=u.sorterAsc,_=e(61082),E=e(79990),L=e(41675).getFromId,C=e(33306),P=e(61549).redrawReglTraces,I=e(34122),U=I.MINSELECT,z=_.filter,H=_.tester,F=e(75549),N=F.p2r,B=F.axValue,j=F.getTransform;function J(Ce){return void 0!==Ce.subplot}function G(Ce,Re,le,ge,_e,Fe,Ve){var He,nt,tt,ot,dt,kt,mt,wt,Lt,Ye,Ct=Re._hoverdata,It=Re._fullLayout.clickmode.indexOf("event")>-1,Ut=[];if((Ye=Ct)&&Array.isArray(Ye)&&!0!==Ye[0].hoverOnBox){K(Ce,Re,Fe);var Rt=function(Ye,rt){var Se,ze,Ke=Ye[0],st=-1,ct=[];for(ze=0;ze<rt.length;ze++)if(Ke.fullData._expandedIndex===(Se=rt[ze]).cd[0].trace._expandedIndex){if(!0===Ke.hoverOnBox)break;void 0!==Ke.pointNumber?st=Ke.pointNumber:void 0!==Ke.binNumber&&(st=Ke.binNumber,ct=Ke.pointNumbers);break}return{pointNumber:st,pointNumbers:ct,searchInfo:Se}}(Ct,He=ie(Re,le,ge,_e));if(Rt.pointNumbers.length>0?function(Ye,rt){var Se,ze,Ke,st=[];for(Ke=0;Ke<Ye.length;Ke++)(Se=Ye[Ke]).cd[0].trace.selectedpoints&&Se.cd[0].trace.selectedpoints.length>0&&st.push(Se);if(1===st.length&&st[0]===rt.searchInfo&&(ze=rt.searchInfo.cd[0].trace).selectedpoints.length===rt.pointNumbers.length){for(Ke=0;Ke<rt.pointNumbers.length;Ke++)if(ze.selectedpoints.indexOf(rt.pointNumbers[Ke])<0)return!1;return!0}return!1}(He,Rt):function(Ye){var rt,Se,ze=0;for(Se=0;Se<Ye.length;Se++)if((rt=Ye[Se].cd[0].trace).selectedpoints&&(rt.selectedpoints.length>1||(ze+=rt.selectedpoints.length)>1))return!1;return 1===ze}(He)&&(kt=ce(Rt))){for(Ve&&Ve.remove(),Lt=0;Lt<He.length;Lt++)(nt=He[Lt])._module.selectPoints(nt,!1);me(Re,He),re(Fe),It&&Ie(Re)}else{for(mt=Ce.shiftKey&&(void 0!==kt?kt:ce(Rt)),tt=function(Ye,rt,Se){return{pointNumber:Ye,searchInfo:rt,subtract:!!Se}}(Rt.pointNumber,Rt.searchInfo,mt),ot=X(Fe.selectionDefs.concat([tt])),Lt=0;Lt<He.length;Lt++)if(dt=he(He[Lt]._module.selectPoints(He[Lt],ot),He[Lt]),Ut.length)for(var Ge=0;Ge<dt.length;Ge++)Ut.push(dt[Ge]);else Ut=dt;if(me(Re,He,wt={points:Ut}),tt&&Fe&&Fe.selectionDefs.push(tt),Ve){var We=Fe.mergedPolygons,Be=i(Fe.dragmode);f(ve(We,Be),Ve,Fe)}It&&Me(Re,wt)}}}function V(Ce){return"pointNumber"in Ce&&"searchInfo"in Ce}function W(Ce){return{xmin:0,xmax:0,ymin:0,ymax:0,pts:[],contains:function(Re,le,ge,_e){return _e.cd[0].trace._expandedIndex===Ce.searchInfo.cd[0].trace._expandedIndex&&ge===Ce.pointNumber},isRect:!1,degenerate:!1,subtract:!!Ce.subtract}}function X(Ce){if(Ce.length){for(var Re=[],le=V(Ce[0])?0:Ce[0][0][0],ge=le,_e=V(Ce[0])?0:Ce[0][0][1],Fe=_e,Ve=0;Ve<Ce.length;Ve++)if(V(Ce[Ve]))Re.push(W(Ce[Ve]));else{var He=H(Ce[Ve]);He.subtract=!!Ce[Ve].subtract,Re.push(He),le=Math.min(le,He.xmin),ge=Math.max(ge,He.xmax),_e=Math.min(_e,He.ymin),Fe=Math.max(Fe,He.ymax)}return{xmin:le,xmax:ge,ymin:_e,ymax:Fe,pts:[],contains:function(nt,tt,ot,dt){for(var kt=!1,mt=0;mt<Re.length;mt++)Re[mt].contains(nt,tt,ot,dt)&&(kt=!Re[mt].subtract);return kt},isRect:!1,degenerate:!1}}}function K(Ce,Re,le){var ge=Re._fullLayout,_e=le.plotinfo,Fe=le.dragmode,Ve=ge._lastSelectedSubplot&&ge._lastSelectedSubplot===_e.id,He=(Ce.shiftKey||Ce.altKey)&&!(n(Fe)&&i(Fe));Ve&&He&&_e.selection&&_e.selection.selectionDefs&&!le.selectionDefs?(le.selectionDefs=_e.selection.selectionDefs,le.mergedPolygons=_e.selection.mergedPolygons):He&&_e.selection||re(le),Ve||(x(Re),ge._lastSelectedSubplot=_e.id)}function re(Ce,Re){var le=Ce.dragmode,ge=Ce.plotinfo,_e=Ce.gd;_e._fullLayout._activeShapeIndex>=0&&_e._fullLayout._deactivateShape(_e),_e._fullLayout._activeSelectionIndex>=0&&_e._fullLayout._deactivateSelection(_e);var Fe=_e._fullLayout._zoomlayer,Ve=n(le),He=a(le);if(Ve||He){var nt,tt,ot=Fe.selectAll(".select-outline-"+ge.id);ot&&_e._fullLayout._outlining&&(Ve&&(nt=h(ot,Ce)),nt&&l.call("_guiRelayout",_e,{shapes:nt}),He&&!J(Ce)&&(tt=m(ot,Ce)),tt&&(_e._fullLayout._noEmitSelectedAtStart=!0,l.call("_guiRelayout",_e,{selections:tt}).then(function(){Re&&w(_e)})),_e._fullLayout._outlining=!1)}ge.selection={},ge.selection.selectionDefs=Ce.selectionDefs=[],ge.selection.mergedPolygons=Ce.mergedPolygons=[]}function ee(Ce){return Ce._id}function ie(Ce,Re,le,ge){if(!Ce.calcdata)return[];var _e,Fe,Ve,He=[],nt=Re.map(ee),tt=le.map(ee);for(Ve=0;Ve<Ce.calcdata.length;Ve++)if(!0===(Fe=(_e=Ce.calcdata[Ve])[0].trace).visible&&Fe._module&&Fe._module.selectPoints)if(!J({subplot:ge})||Fe.subplot!==ge&&Fe.geo!==ge)if("splom"===Fe.type){if(Fe._xaxes[nt[0]]&&Fe._yaxes[tt[0]]){var ot=oe(Fe._module,_e,Re[0],le[0]);ot.scene=Ce._fullLayout._splomScenes[Fe.uid],He.push(ot)}}else if("sankey"===Fe.type){var dt=oe(Fe._module,_e,Re[0],le[0]);He.push(dt)}else{if(-1===nt.indexOf(Fe.xaxis)||-1===tt.indexOf(Fe.yaxis))continue;He.push(oe(Fe._module,_e,L(Ce,Fe.xaxis),L(Ce,Fe.yaxis)))}else He.push(oe(Fe._module,_e,Re[0],le[0]));return He}function oe(Ce,Re,le,ge){return{_module:Ce,cd:Re,xaxis:le,yaxis:ge}}function ce(Ce){var Re=Ce.searchInfo.cd[0].trace,ge=Ce.pointNumbers;return!!Re.selectedpoints&&Re.selectedpoints.indexOf(ge.length>0?ge[0]:Ce.pointNumber)>-1}function me(Ce,Re,le){var ge,_e;for(ge=0;ge<Re.length;ge++){var Fe=Re[ge].cd[0].trace._fullInput,Ve=Ce._fullLayout._tracePreGUI[Fe.uid]||{};void 0===Ve.selectedpoints&&(Ve.selectedpoints=Fe._input.selectedpoints||null)}if(le){var He=le.points||[];for(ge=0;ge<Re.length;ge++)(_e=Re[ge].cd[0].trace)._input.selectedpoints=_e._fullInput.selectedpoints=[],_e._fullInput!==_e&&(_e.selectedpoints=[]);for(var nt=0;nt<He.length;nt++){var tt=He[nt],ot=tt.data,dt=tt.fullData,kt=tt.pointIndex,mt=tt.pointIndices;mt?([].push.apply(ot.selectedpoints,mt),_e._fullInput!==_e&&[].push.apply(dt.selectedpoints,mt)):(ot.selectedpoints.push(kt),_e._fullInput!==_e&&dt.selectedpoints.push(kt))}}else for(ge=0;ge<Re.length;ge++)delete(_e=Re[ge].cd[0].trace).selectedpoints,delete _e._input.selectedpoints,_e._fullInput!==_e&&delete _e._fullInput.selectedpoints;!function(wt,Lt){for(var Ct=!1,It=0;It<Lt.length;It++){var Ut=Lt[It],Rt=Ut.cd;l.traceIs(Rt[0].trace,"regl")&&(Ct=!0);var Ge=Ut._module,We=Ge.styleOnSelect||Ge.style;We&&(We(wt,Rt,Rt[0].node3),Rt[0].nodeRangePlot3&&We(wt,Rt,Rt[0].nodeRangePlot3))}Ct&&(C(wt),P(wt))}(Ce,Re)}function de(Ce,Re,le){for(var ge=(le?k.difference:k.union)({regions:Ce},{regions:[Re]}).regions.reverse(),_e=0;_e<ge.length;_e++){var Fe=ge[_e];Fe.subtract=Q(Fe,ge.slice(0,_e))}return ge}function he(Ce,Re){if(Array.isArray(Ce))for(var le=Re.cd,ge=Re.cd[0].trace,_e=0;_e<Ce.length;_e++)Ce[_e]=s(Ce[_e],ge,le);return Ce}function ve(Ce,Re){for(var le=[],ge=0;ge<Ce.length;ge++){le[ge]=[];for(var _e=0;_e<Ce[ge].length;_e++){le[ge][_e]=[],le[ge][_e][0]=_e?"L":"M";for(var Fe=0;Fe<Ce[ge][_e].length;Fe++)le[ge][_e].push(Ce[ge][_e][Fe])}Re||le[ge].push(["Z",le[ge][0][1],le[ge][0][2]])}return le}function Pe(Ce,Re){for(var le,ge,_e=[],Fe=[],Ve=0;Ve<Re.length;Ve++){var He=Re[Ve];ge=He._module.selectPoints(He,Ce),Fe.push(ge),le=he(ge,He),_e=_e.concat(le)}return _e}function xe(Ce,Re,le,ge,_e){var Fe,Ve,He,nt=!!ge;_e&&(Fe=_e.plotinfo,Ve=_e.xaxes[0]._id,He=_e.yaxes[0]._id);var tt=[],ot=[],dt=Te(Ce),kt=Ce._fullLayout;if(Fe){var mt=kt._zoomlayer,wt=kt.dragmode,Lt=n(wt),Ct=a(wt);if(Lt||Ct){var It=L(Ce,Ve,"x"),Ut=L(Ce,He,"y");if(It&&Ut){var Rt=mt.selectAll(".select-outline-"+Fe.id);if(Rt&&Ce._fullLayout._outlining&&Rt.length){for(var Ge=Rt[0][0].getAttribute("d"),We=y(Ge,Ce,Fe),Be=[],Ye=0;Ye<We.length;Ye++){for(var rt=We[Ye],Se=[],ze=0;ze<rt.length;ze++)Se.push([se(It,rt[ze][1]),se(Ut,rt[ze][2])]);Se.xref=Ve,Se.yref=He,Se.subtract=Q(Se,Be),Be.push(Se)}dt=dt.concat(Be)}}}}var Ke=Ve&&He?[Ve+He]:kt._subplots.cartesian;!function(Rn){var Nn=Rn.calcdata;if(Nn)for(var Fn=0;Fn<Nn.length;Fn++){var $n=Rn._fullLayout._splomScenes;if($n){var mr=$n[Nn[Fn][0].trace.uid];mr&&(mr.selectBatch=[])}}}(Ce);for(var st={},ct=0;ct<Ke.length;ct++){var Tt=Ke[ct],Et=Tt.indexOf("y"),At=Tt.slice(0,Et),ht=Tt.slice(Et),pt=Ve&&He?le:void 0;if(pt=Ae(dt,At,ht,pt)){var gt=ge;if(!nt){var Pt=L(Ce,At,"x"),Ot=L(Ce,ht,"y");gt=ie(Ce,[Pt],[Ot],Tt);for(var Ht=0;Ht<gt.length;Ht++){var jt=gt[Ht],Nt=jt.cd[0],Gt=Nt.trace;if("scattergl"===jt._module.name&&!Nt.t.xpx){var un=Gt.x,pn=Gt.y,Kt=Gt._length;Nt.t.xpx=[],Nt.t.ypx=[];for(var wn=0;wn<Kt;wn++)Nt.t.xpx[wn]=Pt.c2p(un[wn]),Nt.t.ypx[wn]=Ot.c2p(pn[wn])}"splom"===jt._module.name&&(st[Gt.uid]||(st[Gt.uid]=!0))}}var Bn=Pe(pt,gt);tt=tt.concat(Bn),ot=ot.concat(gt)}}var vn={points:tt};me(Ce,ot,vn);var cn=kt.clickmode.indexOf("event")>-1&&Re;if(!Fe&&Re){var dn=Te(Ce,!0);if(dn.length){var sn=dn[0].xref,hn=dn[0].yref;if(sn&&hn){var En=fe(dn);ye([L(Ce,sn,"x"),L(Ce,hn,"y")])(vn,En)}}Ce._fullLayout._noEmitSelectedAtStart?Ce._fullLayout._noEmitSelectedAtStart=!1:cn&&Me(Ce,vn),kt._reselect=!1}if(!Fe&&kt._deselect){var Mn=kt._deselect;(function(Rn,Nn,Fn){for(var rr=0;rr<Fn.length;rr++){var $n=Fn[rr];if($n.xaxis&&$n.xaxis._id===Rn&&$n.yaxis&&$n.yaxis._id===Nn)return!0}return!1})(Ve=Mn.xref,He=Mn.yref,ot)||ke(Ce,Ve,He,ge),cn&&(vn.points.length?Me(Ce,vn):Ie(Ce)),kt._deselect=!1}return{eventData:vn,selectionTesters:le}}function ke(Ce,Re,le,ge){ge=ie(Ce,[L(Ce,Re,"x")],[L(Ce,le,"y")],Re+le);for(var _e=0;_e<ge.length;_e++){var Fe=ge[_e];Fe._module.selectPoints(Fe,!1)}me(Ce,ge)}function Ae(Ce,Re,le,ge){for(var _e,Fe=0;Fe<Ce.length;Fe++){var Ve=Ce[Fe];Re===Ve.xref&&le===Ve.yref&&(_e?ge=X(_e=de(_e,Ve,!!Ve.subtract)):(_e=[Ve],ge=H(Ve)))}return ge}function Te(Ce,Re){for(var le=[],ge=Ce._fullLayout,_e=ge.selections,Fe=_e.length,Ve=0;Ve<Fe;Ve++)if(!Re||Ve===ge._activeSelectionIndex){var He=_e[Ve];if(He){var nt,tt,ot,dt,kt,mt=He.xref,wt=He.yref,Lt=L(Ce,mt,"x"),Ct=L(Ce,wt,"y");if("rect"===He.type){kt=[];var It=se(Lt,He.x0),Ut=se(Lt,He.x1),Rt=se(Ct,He.y0),Ge=se(Ct,He.y1);kt=[[It,Rt],[It,Ge],[Ut,Ge],[Ut,Rt]],nt=Math.min(It,Ut),tt=Math.max(It,Ut),ot=Math.min(Rt,Ge),dt=Math.max(Rt,Ge),kt.xmin=nt,kt.xmax=tt,kt.ymin=ot,kt.ymax=dt,kt.xref=mt,kt.yref=wt,kt.subtract=!1,kt.isRect=!0,le.push(kt)}else if("path"===He.type)for(var We=He.path.split("Z"),Be=[],Ye=0;Ye<We.length;Ye++){var rt=We[Ye];if(rt){var Se=c.extractPathCoords(rt+="Z",p.paramIsX,"raw"),ze=c.extractPathCoords(rt,p.paramIsY,"raw");nt=1/0,tt=-1/0,ot=1/0,dt=-1/0,kt=[];for(var Ke=0;Ke<Se.length;Ke++){var st=se(Lt,Se[Ke]),ct=se(Ct,ze[Ke]);kt.push([st,ct]),nt=Math.min(st,nt),tt=Math.max(st,tt),ot=Math.min(ct,ot),dt=Math.max(ct,dt)}kt.xmin=nt,kt.xmax=tt,kt.ymin=ot,kt.ymax=dt,kt.xref=mt,kt.yref=wt,kt.subtract=Q(kt,Be),Be.push(kt),le.push(kt)}}}}return le}function Q(Ce,Re){for(var le=!1,ge=0;ge<Re.length;ge++)for(var _e=Re[ge],Fe=0;Fe<Ce.length;Fe++)if(A(Ce[Fe],_e)){le=!le;break}return le}function se(Ce,Re){return"date"===Ce.type&&(Re=Re.replace("_"," ")),"log"===Ce.type?Ce.c2p(Re):Ce.r2p(Re,null,Ce.calendar)}function fe(Ce){for(var Re=Ce.length,le=[],ge=0;ge<Re;ge++){var _e=Ce[ge];le=(le=le.concat(_e)).concat([_e[0]])}return(Fe=le).isRect=5===Fe.length&&Fe[0][0]===Fe[4][0]&&Fe[0][1]===Fe[4][1]&&Fe[0][0]===Fe[1][0]&&Fe[2][0]===Fe[3][0]&&Fe[0][1]===Fe[3][1]&&Fe[1][1]===Fe[2][1]||Fe[0][1]===Fe[1][1]&&Fe[2][1]===Fe[3][1]&&Fe[0][0]===Fe[3][0]&&Fe[1][0]===Fe[2][0],Fe.isRect&&(Fe.xmin=Math.min(Fe[0][0],Fe[2][0]),Fe.xmax=Math.max(Fe[0][0],Fe[2][0]),Fe.ymin=Math.min(Fe[0][1],Fe[2][1]),Fe.ymax=Math.max(Fe[0][1],Fe[2][1])),Fe;var Fe}function ye(Ce){return function(Re,le){for(var ge,_e,Fe=0;Fe<Ce.length;Fe++){var Ve=Ce[Fe],He=Ve._id,nt=He.charAt(0);if(le.isRect){ge||(ge={});var tt=le[nt+"min"],ot=le[nt+"max"];void 0!==tt&&void 0!==ot&&(ge[He]=[N(Ve,tt),N(Ve,ot)].sort(S))}else _e||(_e={}),_e[He]=le.map(B(Ve))}ge&&(Re.range=ge),_e&&(Re.lassoPoints=_e)}}function Me(Ce,Re){Re&&(Re.selections=(Ce.layout||{}).selections||[]),Ce.emit("plotly_selected",Re)}function Ie(Ce){Ce.emit("plotly_deselect",null)}$.exports={reselect:xe,prepSelect:function(Ce,Re,le,ge,_e){var Fe=!J(ge),Ve=o(_e),He=r(_e),nt=i(_e),tt=n(_e),ot=a(_e),dt="drawcircle"===_e,kt="drawline"===_e||dt,mt=ge.gd,wt=mt._fullLayout,Lt=ot&&"immediate"===wt.newselection.mode&&Fe,Ct=wt._zoomlayer,It=ge.element.getBoundingClientRect(),Ut=ge.plotinfo,Rt=j(Ut),Ge=Re-It.left,We=le-It.top;wt._calcInverseTransform(mt);var Ye,rt,Se,ze,Ke,st,ct,Be=u.apply3DTransform(wt._invTransform)(Ge,We),Tt=wt._invScaleX,Et=wt._invScaleY,At=Ge=Be[0],ht=We=Be[1],pt="M"+Ge+","+We,gt=ge.xaxes[0],Pt=ge.yaxes[0],Ot=gt._length,Ht=Pt._length,jt=Ce.altKey&&!(n(_e)&&nt);K(Ce,mt,ge),Ve&&(Ye=z([[Ge,We]],I.BENDPX));var Nt=Ct.selectAll("path.select-outline-"+Ut.id).data([1]),Gt=tt?wt.newshape:wt.newselection,un=tt&&!nt?Gt.fillcolor:"rgba(0,0,0,0)",pn=Gt.line.color||(Fe?b.contrast(mt._fullLayout.plot_bgcolor):"#7f7f7f");Nt.enter().append("path").attr("class","select-outline select-outline-"+Ut.id).style({opacity:tt?Gt.opacity/2:1,"stroke-dasharray":T(Gt.line.dash,Gt.line.width),"stroke-width":Gt.line.width+"px","shape-rendering":"crispEdges"}).call(b.stroke,pn).call(b.fill,un).attr("fill-rule","evenodd").classed("cursor-move",!!tt).attr("transform",Rt).attr("d",pt+"Z");var Kt=Ct.append("path").attr("class","zoombox-corners").style({fill:b.background,stroke:b.defaultLine,"stroke-width":1}).attr("transform",Rt).attr("d","M0,0Z"),wn=wt._uid+I.SELECTID,Bn=[],vn=ie(mt,ge.xaxes,ge.yaxes,ge.subplot);Lt&&!Ce.shiftKey&&(ge._clearSubplotSelections=function(){if(Fe){var dn=gt._id,sn=Pt._id;ke(mt,dn,sn,vn);for(var hn=(mt.layout||{}).selections||[],En=[],Mn=!1,Rn=0;Rn<hn.length;Rn++){var Nn=wt.selections[Rn];Nn.xref!==dn||Nn.yref!==sn?En.push(hn[Rn]):Mn=!0}Mn&&(mt._fullLayout._noEmitSelectedAtStart=!0,l.call("_guiRelayout",mt,{selections:En}))}});var dn,cn=(dn=ge).plotinfo.fillRangeItems||ye(dn.xaxes.concat(dn.yaxes));ge.moveFn=function(dn,sn){ge._clearSubplotSelections&&(ge._clearSubplotSelections(),ge._clearSubplotSelections=void 0),At=Math.max(0,Math.min(Ot,Tt*dn+Ge)),ht=Math.max(0,Math.min(Ht,Et*sn+We));var hn=Math.abs(At-Ge),En=Math.abs(ht-We);if(He){var Mn,Rn,Nn;if(ot){var Fn=wt.selectdirection;switch(Mn="any"===Fn?En<Math.min(.6*hn,U)?"h":hn<Math.min(.6*En,U)?"v":"d":Fn){case"h":Rn=dt?Ht/2:0,Nn=Ht;break;case"v":Rn=dt?Ot/2:0,Nn=Ot}}if(tt)switch(wt.newshape.drawdirection){case"vertical":Mn="h",Rn=dt?Ht/2:0,Nn=Ht;break;case"horizontal":Mn="v",Rn=dt?Ot/2:0,Nn=Ot;break;case"ortho":hn<En?(Mn="h",Rn=We,Nn=ht):(Mn="v",Rn=Ge,Nn=At);break;default:Mn="d"}"h"===Mn?((ze=kt?g(dt,[At,Rn],[At,Nn]):[[Ge,Rn],[Ge,Nn],[At,Nn],[At,Rn]]).xmin=kt?At:Math.min(Ge,At),ze.xmax=kt?At:Math.max(Ge,At),ze.ymin=Math.min(Rn,Nn),ze.ymax=Math.max(Rn,Nn),Kt.attr("d","M"+ze.xmin+","+(We-U)+"h-4v"+2*U+"h4ZM"+(ze.xmax-1)+","+(We-U)+"h4v"+2*U+"h-4Z")):"v"===Mn?((ze=kt?g(dt,[Rn,ht],[Nn,ht]):[[Rn,We],[Rn,ht],[Nn,ht],[Nn,We]]).xmin=Math.min(Rn,Nn),ze.xmax=Math.max(Rn,Nn),ze.ymin=kt?ht:Math.min(We,ht),ze.ymax=kt?ht:Math.max(We,ht),Kt.attr("d","M"+(Ge-U)+","+ze.ymin+"v-4h"+2*U+"v4ZM"+(Ge-U)+","+(ze.ymax-1)+"v4h"+2*U+"v-4Z")):"d"===Mn&&((ze=kt?g(dt,[Ge,We],[At,ht]):[[Ge,We],[Ge,ht],[At,ht],[At,We]]).xmin=Math.min(Ge,At),ze.xmax=Math.max(Ge,At),ze.ymin=Math.min(We,ht),ze.ymax=Math.max(We,ht),Kt.attr("d","M0,0Z"))}else Ve&&(Ye.addPt([At,ht]),ze=Ye.filtered);if(ge.selectionDefs&&ge.selectionDefs.length?(Se=de(ge.mergedPolygons,ze,jt),ze.subtract=jt,rt=X(ge.selectionDefs.concat([ze]))):(Se=[ze],rt=H(ze)),f(ve(Se,nt),Nt,ge),ot){var rr,$n=xe(mt,!1),mr=$n.eventData?$n.eventData.points.slice():[];$n=xe(mt,!1,rt,vn,ge),rt=$n.selectionTesters,ct=$n.eventData,rr=Ye?Ye.filtered:fe(Se),E.throttle(wn,I.SELECTDELAY,function(){for(var fr=(Bn=Pe(rt,vn)).slice(),Zn=0;Zn<mr.length;Zn++){for(var qn=mr[Zn],ur=!1,Zt=0;Zt<fr.length;Zt++)if(fr[Zt].curveNumber===qn.curveNumber&&fr[Zt].pointNumber===qn.pointNumber){ur=!0;break}ur||fr.push(qn)}fr.length&&(ct||(ct={}),ct.points=fr),cn(ct,rr),mt.emit("plotly_selecting",ct)})}},ge.clickFn=function(dn,sn){if(Kt.remove(),mt._fullLayout._activeShapeIndex>=0)mt._fullLayout._deactivateShape(mt);else if(!tt){var hn=wt.clickmode;E.done(wn).then(function(){if(E.clear(wn),2===dn){for(Nt.remove(),Ke=0;Ke<vn.length;Ke++)(st=vn[Ke])._module.selectPoints(st,!1);if(me(mt,vn),re(ge),Ie(mt),vn.length){var En=vn[0].xaxis,Mn=vn[0].yaxis;if(En&&Mn){for(var Rn=[],Nn=mt._fullLayout.selections,Fn=0;Fn<Nn.length;Fn++){var rr=Nn[Fn];rr&&(rr.xref===En._id&&rr.yref===Mn._id||Rn.push(rr))}Rn.length<Nn.length&&(mt._fullLayout._noEmitSelectedAtStart=!0,l.call("_guiRelayout",mt,{selections:Rn}))}}}else hn.indexOf("select")>-1&&G(sn,mt,ge.xaxes,ge.yaxes,ge.subplot,ge,Nt),"event"===hn&&Me(mt,void 0);d.click(mt,sn)}).catch(u.error)}},ge.doneFn=function(){Kt.remove(),E.done(wn).then(function(){E.clear(wn),!Lt&&ze&&ge.selectionDefs&&(ze.subtract=jt,ge.selectionDefs.push(ze),ge.mergedPolygons.length=0,[].push.apply(ge.mergedPolygons,Se)),(Lt||tt)&&re(ge,Lt),ge.doneFnCompleted&&ge.doneFnCompleted(Bn),ot&&Me(mt,ct)}).catch(u.error)}},clearOutline:x,clearSelectionsCache:re,selectOnClick:G}},89827:function($,R,e){"use strict";var k=e(50215),A=e(82196).line,l=e(79952).P,T=e(1426).extendFlat,b=e(44467).templatedArray;e(24695),$.exports=b("shape",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},xref:T({},k.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:T({},k.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:T({},A.color,{editType:"arraydraw"}),width:T({},A.width,{editType:"calc+arraydraw"}),dash:T({},l,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},editType:"arraydraw"})},5627:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(21459),T=e(30477);function b(o){return s(o.line.width,o.xsizemode,o.x0,o.x1,o.path,!1)}function d(o){return s(o.line.width,o.ysizemode,o.y0,o.y1,o.path,!0)}function s(o,r,n,i,a,c){var p=o/2,f=c;if("pixel"===r){var x=a?T.extractPathCoords(a,c?l.paramIsY:l.paramIsX):[n,i],v=k.aggNums(Math.max,null,x),g=k.aggNums(Math.min,null,x),y=g<0?Math.abs(g)+p:p,h=v>0?v+p:p;return{ppad:p,ppadplus:f?y:h,ppadminus:f?h:y}}return{ppad:p}}function t(o,r,n,i,a){var c="category"===o.type||"multicategory"===o.type?o.r2c:o.d2c;if(void 0!==r)return[c(r),c(n)];if(i){var p,f,x,v,g=1/0,y=-1/0,h=i.match(l.segmentRE);for("date"===o.type&&(c=T.decodeDate(c)),p=0;p<h.length;p++)void 0!==(f=a[h[p].charAt(0)].drawn)&&(!(x=h[p].substr(1).match(l.paramRE))||x.length<f||((v=c(x[f]))<g&&(g=v),v>y&&(y=v)));return y>=g?[g,y]:void 0}}$.exports=function(o){var n=k.filterVisible(o._fullLayout.shapes);if(n.length&&o._fullData.length)for(var i=0;i<n.length;i++){var a,c,p=n[i];p._extremes={};var f=A.getRefType(p.xref),x=A.getRefType(p.yref);if("paper"!==p.xref&&"domain"!==f){var v="pixel"===p.xsizemode?p.xanchor:p.x0,g="pixel"===p.xsizemode?p.xanchor:p.x1;(c=t(a=A.getFromId(o,p.xref),v,g,p.path,l.paramIsX))&&(p._extremes[a._id]=A.findExtremes(a,c,b(p)))}if("paper"!==p.yref&&"domain"!==x){var y="pixel"===p.ysizemode?p.yanchor:p.y0,h="pixel"===p.ysizemode?p.yanchor:p.y1;(c=t(a=A.getFromId(o,p.yref),y,h,p.path,l.paramIsY))&&(p._extremes[a._id]=A.findExtremes(a,c,d(p)))}}}},21459:function($){"use strict";$.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},84726:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(85501),T=e(89827),b=e(30477);function d(s,t,o){function r(P,I){return k.coerce(s,t,T,P,I)}if(r("visible")){var n=r("path"),i="path"!==r("type",n?"path":"rect");i&&delete t.path,r("editable"),r("layer"),r("opacity"),r("fillcolor"),r("fillrule"),r("line.width")&&(r("line.color"),r("line.dash"));for(var a=r("xsizemode"),c=r("ysizemode"),p=["x","y"],f=0;f<2;f++){var x,v,g,y=p[f],h=y+"anchor",m="x"===y?a:c,w={_fullLayout:o},u=A.coerceRef(s,t,w,y,void 0,"paper");if("range"===A.getRefType(u)?((x=A.getFromId(w,u))._shapeIndices.push(t._index),g=b.rangeToShapePosition(x),v=b.shapePositionToRange(x)):v=g=k.identity,i){var S=y+"0",_=y+"1",E=s[S],L=s[_];s[S]=v(s[S],!0),s[_]=v(s[_],!0),"pixel"===m?(r(S,0),r(_,10)):(A.coercePosition(t,w,r,u,S,.25),A.coercePosition(t,w,r,u,_,.75)),t[S]=g(t[S]),t[_]=g(t[_]),s[S]=E,s[_]=L}if("pixel"===m){var C=s[h];s[h]=v(s[h],!0),A.coercePosition(t,w,r,u,h,.25),t[h]=g(t[h]),s[h]=C}}i&&k.noneOrAll(s,t,["x0","x1","y0","y1"])}}$.exports=function(s,t){l(s,t,{name:"shapes",handleItemDefaults:d})}},42359:function($,R,e){"use strict";var k=e(71828).strTranslate,A=e(28569),l=e(64505),T=l.drawMode,b=l.selectMode,d=e(73972),s=e(7901),t=e(89995),o=t.i000,r=t.i090,n=t.i180,i=t.i270,a=e(51873).clearOutlineControllers,c=e(60165),p=c.pointsOnRectangle,f=c.pointsOnEllipse,x=c.writePaths,v=e(90551),g=e(35855);function y(h,m){var w,u,S,L=h.length;return u=h[w=(m+1)%L][1],S=h[w][2],u===h[m][1]&&S===h[m][2]&&(u=h[w=(m+2)%L][1],S=h[w][2]),[w,u,S]}$.exports=function h(m,w,u,S){S||(S=0);var _=u.gd;function E(){h(m,w,u,S++),f(m[0])&&L({redrawing:!0})}function L(ee){var ie={};void 0!==u.isActiveShape&&(u.isActiveShape=!1,ie=v(w,u)),void 0!==u.isActiveSelection&&(u.isActiveSelection=!1,ie=g(w,u),_._fullLayout._reselect=!0),Object.keys(ie).length&&d.call((ee||{}).redrawing?"relayout":"_guiRelayout",_,ie)}var C,P,I,U,z,H=_._fullLayout._zoomlayer,F=u.dragmode,N=T(F),B=b(F);function j(ee){I=+ee.srcElement.getAttribute("data-i"),U=+ee.srcElement.getAttribute("data-j"),C[I][U].moveFn=J}function J(ee,ie){if(m.length){var oe=z[I][U][1],ce=z[I][U][2],me=m[I],de=me.length;if(p(me)){var he=ee,ve=ie;u.isActiveSelection&&(y(me,U)[1]===me[U][1]?ve=0:he=0);for(var Pe=0;Pe<de;Pe++)if(Pe!==U){var xe=me[Pe];xe[1]===me[U][1]&&(xe[1]=oe+he),xe[2]===me[U][2]&&(xe[2]=ce+ve)}if(me[U][1]=oe+he,me[U][2]=ce+ve,!p(me))for(var ke=0;ke<de;ke++)for(var Ae=0;Ae<me[ke].length;Ae++)me[ke][Ae]=z[I][ke][Ae]}else me[U][1]=oe+ee,me[U][2]=ce+ie;E()}}function G(){L()}function V(ee,ie){if(2===ee){I=+ie.srcElement.getAttribute("data-i"),U=+ie.srcElement.getAttribute("data-j");var oe=m[I];p(oe)||f(oe)||function(){if(m.length&&m[I]&&m[I].length){for(var ce=[],me=0;me<m[I].length;me++)me!==U&&ce.push(m[I][me]);ce.length>1&&(2!==ce.length||"Z"!==ce[1][0])&&(0===U&&(ce[0][0]="M"),m[I]=ce,E(),L())}}()}}function W(ee,ie){(function(oe,ce){if(m.length)for(var me=0;me<m.length;me++)for(var de=0;de<m[me].length;de++)for(var he=0;he+2<m[me][de].length;he+=2)m[me][de][he+1]=z[me][de][he+1]+oe,m[me][de][he+2]=z[me][de][he+2]+ce})(ee,ie),E()}(N||B)&&(_._fullLayout._outlining=!0),a(_),w.attr("d",x(m)),S||!u.isActiveShape&&!u.isActiveSelection||(z=function(ee,ie){for(var oe=0;oe<ie.length;oe++){var ce=ie[oe];ee[oe]=[];for(var me=0;me<ce.length;me++){ee[oe][me]=[];for(var de=0;de<ce[me].length;de++)ee[oe][me][de]=ce[me][de]}}return ee}([],m),function(ee){C=[];for(var ie=0;ie<m.length;ie++){var oe=m[ie],ce=p(oe),me=!ce&&f(oe);C[ie]=[];for(var de=oe.length,he=0;he<de;he++)if("Z"!==oe[he][0]&&(!me||he===o||he===r||he===n||he===i)){var ve,Pe=ce&&u.isActiveSelection;Pe&&(ve=y(oe,he));var xe=oe[he][1],ke=oe[he][2],Ae=ee.append(Pe?"rect":"circle").attr("data-i",ie).attr("data-j",he).style({fill:s.background,stroke:s.defaultLine,"stroke-width":1,"shape-rendering":"crispEdges"});if(Pe){var Te=ve[1]-xe,Q=ve[2]-ke,se=Q?5:Math.max(Math.min(25,Math.abs(Te)-5),5),fe=Te?5:Math.max(Math.min(25,Math.abs(Q)-5),5);Ae.classed(Q?"cursor-ew-resize":"cursor-ns-resize",!0).attr("width",se).attr("height",fe).attr("x",xe-se/2).attr("y",ke-fe/2).attr("transform",k(Te/2,Q/2))}else Ae.classed("cursor-grab",!0).attr("r",5).attr("cx",xe).attr("cy",ke);C[ie][he]={element:Ae.node(),gd:_,prepFn:j,doneFn:G,clickFn:V},A.init(C[ie][he])}}}(H.append("g").attr("class","outline-controllers")),P=[],m.length&&(P[0]={element:w[0][0],gd:_,prepFn:function X(ee){(I=+ee.srcElement.getAttribute("data-i"))||(I=0),P[I].moveFn=W},doneFn:function K(){L()},clickFn:function re(ee){2===ee&&function(ie){if(b(ie._fullLayout.dragmode)){a(ie);var oe=ie._fullLayout._activeSelectionIndex,ce=(ie.layout||{}).selections||[];if(oe<ce.length){for(var me=[],de=0;de<ce.length;de++)de!==oe&&me.push(ce[de]);delete ie._fullLayout._activeSelectionIndex;var he=ie._fullLayout.selections[oe];ie._fullLayout._deselect={xref:he.xref,yref:he.yref},d.call("_guiRelayout",ie,{selections:me})}}}(_)}},A.init(P[0])))}},34031:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(89298),T=e(60165).readPaths,b=e(42359),d=e(51873).clearOutlineControllers,s=e(7901),t=e(91424),o=e(44467).arrayEditor,r=e(28569),n=e(6964),i=e(21459),a=e(30477),c=a.getPathString;function p(m){var w=m._fullLayout;for(var u in w._shapeUpperLayer.selectAll("path").remove(),w._shapeLowerLayer.selectAll("path").remove(),w._plots){var S=w._plots[u].shapelayer;S&&S.selectAll("path").remove()}for(var _=0;_<w.shapes.length;_++)w.shapes[_].visible&&v(m,_)}function f(m){return!!m._fullLayout._outlining}function x(m){return!m._context.edits.shapePosition}function v(m,w){m._fullLayout._paperdiv.selectAll('.shapelayer [data-index="'+w+'"]').remove();var u=a.makeShapesOptionsAndPlotinfo(m,w),S=u.options,_=u.plotinfo;S._input&&!1!==S.visible&&function E(L){var C=c(m,S),P={"data-index":w,"fill-rule":S.fillrule,d:C},I=S.opacity,U=S.fillcolor,z=S.line.width?S.line.color:"rgba(0,0,0,0)",H=S.line.width,F=S.line.dash;H||!0!==S.editable||(H=5,F="solid");var N="Z"!==C[C.length-1],B=x(m)&&S.editable&&m._fullLayout._activeShapeIndex===w;B&&(U=N?"rgba(0,0,0,0)":m._fullLayout.activeshape.fillcolor,I=m._fullLayout.activeshape.opacity);var j,J=L.append("path").attr(P).style("opacity",I).call(s.stroke,z).call(s.fill,U).call(t.dashLine,F,H);if(g(J,m,S),(B||m._context.edits.shapePosition)&&(j=o(m.layout,"shapes",S)),B){J.style({cursor:"move"});var G={element:J.node(),plotinfo:_,gd:m,editHelpers:j,isActiveShape:!0},V=T(C,m);b(V,J,G)}else m._context.edits.shapePosition?function(W,X,K,re,ee,ie){var oe,ce,me,de,he,ve,Pe,xe,ke,Ae,Te,Q,se,fe,ye,Me,Ie="pixel"===K.xsizemode,Ce="pixel"===K.ysizemode,Re="line"===K.type,le="path"===K.type,ge=ie.modifyItem,_e=l.getFromId(W,K.xref),Fe=l.getRefType(K.xref),Ve=l.getFromId(W,K.yref),He=l.getRefType(K.yref),nt=a.getDataToPixel(W,_e,!1,Fe),tt=a.getDataToPixel(W,Ve,!0,He),ot=a.getPixelToData(W,_e,!1,Fe),dt=a.getPixelToData(W,Ve,!0,He),kt=Re?function(){var Ge=Math.max(K.line.width,10),We=ee.append("g").attr("data-index",re);We.append("path").attr("d",X.attr("d")).style({cursor:"move","stroke-width":Ge,"stroke-opacity":"0"});var Be={"fill-opacity":"0"},Ye=Math.max(Ge/2,10);return We.append("circle").attr({"data-line-point":"start-point",cx:Ie?nt(K.xanchor)+K.x0:nt(K.x0),cy:Ce?tt(K.yanchor)-K.y0:tt(K.y0),r:Ye}).style(Be).classed("cursor-grab",!0),We.append("circle").attr({"data-line-point":"end-point",cx:Ie?nt(K.xanchor)+K.x1:nt(K.x1),cy:Ce?tt(K.yanchor)-K.y1:tt(K.y1),r:Ye}).style(Be).classed("cursor-grab",!0),We}():X,mt={element:kt.node(),gd:W,prepFn:function(Rt){var Ge,We,Be,Ye,rt,Se,ze,Ke;f(W)||(Ie&&(he=nt(K.xanchor)),Ce&&(ve=tt(K.yanchor)),"path"===K.type?ye=K.path:(oe=Ie?K.x0:nt(K.x0),ce=Ce?K.y0:tt(K.y0),me=Ie?K.x1:nt(K.x1),de=Ce?K.y1:tt(K.y1)),oe<me?(ke=oe,se="x0",Ae=me,fe="x1"):(ke=me,se="x1",Ae=oe,fe="x0"),!Ce&&ce<de||Ce&&ce>de?(Pe=ce,Te="y0",xe=de,Q="y1"):(Pe=de,Te="y1",xe=ce,Q="y0"),wt(Rt),It(ee,K),Ge=X,rt=(We=K).yref,Se=l.getFromId(Be=W,Ye=We.xref),ze=l.getFromId(Be,rt),Ke="","paper"===Ye||Se.autorange||(Ke+=Ye),"paper"===rt||ze.autorange||(Ke+=rt),t.setClipUrl(Ge,Ke?"clip"+Be._fullLayout._uid+Ke:null,Be),mt.moveFn="move"===Me?Lt:Ct,mt.altKey=Rt.altKey)},doneFn:function(){f(W)||(n(X),Ut(ee),g(X,W,K),k.call("_guiRelayout",W,ie.getUpdateObj()))},clickFn:function(){f(W)||Ut(ee)}};function wt(Rt){if(f(W))Me=null;else if(Re)Me="path"===Rt.target.tagName?"move":"start-point"===Rt.target.attributes["data-line-point"].value?"resize-over-start-point":"resize-over-end-point";else{var Ge=mt.element.getBoundingClientRect(),We=Ge.right-Ge.left,Be=Ge.bottom-Ge.top,Se=!le&&We>10&&Be>10&&!Rt.shiftKey?r.getCursor((Rt.clientX-Ge.left)/We,1-(Rt.clientY-Ge.top)/Be):"move";n(X,Se),Me=Se.split("-")[0]}}function Lt(Rt,Ge){if("path"===K.type){var We=function(rt){return rt},Be=We,Ye=We;Ie?ge("xanchor",K.xanchor=ot(he+Rt)):(Be=function(rt){return ot(nt(rt)+Rt)},_e&&"date"===_e.type&&(Be=a.encodeDate(Be))),Ce?ge("yanchor",K.yanchor=dt(ve+Ge)):(Ye=function(rt){return dt(tt(rt)+Ge)},Ve&&"date"===Ve.type&&(Ye=a.encodeDate(Ye))),ge("path",K.path=y(ye,Be,Ye))}else Ie?ge("xanchor",K.xanchor=ot(he+Rt)):(ge("x0",K.x0=ot(oe+Rt)),ge("x1",K.x1=ot(me+Rt))),Ce?ge("yanchor",K.yanchor=dt(ve+Ge)):(ge("y0",K.y0=dt(ce+Ge)),ge("y1",K.y1=dt(de+Ge)));X.attr("d",c(W,K)),It(ee,K)}function Ct(Rt,Ge){if(le){var We=function(Ot){return Ot},Be=We,Ye=We;Ie?ge("xanchor",K.xanchor=ot(he+Rt)):(Be=function(Ot){return ot(nt(Ot)+Rt)},_e&&"date"===_e.type&&(Be=a.encodeDate(Be))),Ce?ge("yanchor",K.yanchor=dt(ve+Ge)):(Ye=function(Ot){return dt(tt(Ot)+Ge)},Ve&&"date"===Ve.type&&(Ye=a.encodeDate(Ye))),ge("path",K.path=y(ye,Be,Ye))}else if(Re){if("resize-over-start-point"===Me){var rt=oe+Rt,Se=Ce?ce-Ge:ce+Ge;ge("x0",K.x0=Ie?rt:ot(rt)),ge("y0",K.y0=Ce?Se:dt(Se))}else if("resize-over-end-point"===Me){var ze=me+Rt,Ke=Ce?de-Ge:de+Ge;ge("x1",K.x1=Ie?ze:ot(ze)),ge("y1",K.y1=Ce?Ke:dt(Ke))}}else{var st=function(Ot){return-1!==Me.indexOf(Ot)},ct=st("n"),Tt=st("s"),Et=st("w"),At=st("e"),ht=ct?Pe+Ge:Pe,pt=Tt?xe+Ge:xe,gt=Et?ke+Rt:ke,Pt=At?Ae+Rt:Ae;Ce&&(ct&&(ht=Pe-Ge),Tt&&(pt=xe-Ge)),(!Ce&&pt-ht>10||Ce&&ht-pt>10)&&(ge(Te,K[Te]=Ce?ht:dt(ht)),ge(Q,K[Q]=Ce?pt:dt(pt))),Pt-gt>10&&(ge(se,K[se]=Ie?gt:ot(gt)),ge(fe,K[fe]=Ie?Pt:ot(Pt)))}X.attr("d",c(W,K)),It(ee,K)}function It(Rt,Ge){(Ie||Ce)&&function(){var We="path"!==Ge.type,Be=Rt.selectAll(".visual-cue").data([0]);Be.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":1}).classed("visual-cue",!0);var Ye=nt(Ie?Ge.xanchor:A.midRange(We?[Ge.x0,Ge.x1]:a.extractPathCoords(Ge.path,i.paramIsX))),rt=tt(Ce?Ge.yanchor:A.midRange(We?[Ge.y0,Ge.y1]:a.extractPathCoords(Ge.path,i.paramIsY)));Ye=a.roundPositionForSharpStrokeRendering(Ye,1),rt=a.roundPositionForSharpStrokeRendering(rt,1),Be.attr("d",Ie&&Ce?"M"+(Ye-1-1)+","+(rt-1-1)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z":Ie?"M"+(Ye-1-1)+","+(rt-9-1)+"v18 h2 v-18 Z":"M"+(Ye-9-1)+","+(rt-1-1)+"h18 v2 h-18 Z")}()}function Ut(Rt){Rt.selectAll(".visual-cue").remove()}r.init(mt),kt.node().onmousemove=wt}(m,J,S,w,L,j):!0===S.editable&&J.style("pointer-events",N||s.opacity(U)*I<=.5?"stroke":"all");J.node().addEventListener("click",function(){return function(W,X){if(x(W)){var K=+X.node().getAttribute("data-index");if(K>=0){if(K===W._fullLayout._activeShapeIndex)return void h(W);W._fullLayout._activeShapeIndex=K,W._fullLayout._deactivateShape=h,p(W)}}}(m,J)})}("below"!==S.layer?m._fullLayout._shapeUpperLayer:"paper"===S.xref||"paper"===S.yref?m._fullLayout._shapeLowerLayer:_._hadPlotinfo?(_.mainplotinfo||_).shapelayer:m._fullLayout._shapeLowerLayer)}function g(m,w,u){var S=(u.xref+u.yref).replace(/paper/g,"").replace(/[xyz][1-9]* *domain/g,"");t.setClipUrl(m,S?"clip"+w._fullLayout._uid+S:null,w)}function y(m,w,u){return m.replace(i.segmentRE,function(S){var _=0,E=S.charAt(0),L=i.paramIsX[E],C=i.paramIsY[E],P=i.numParams[E];return E+S.substr(1).replace(i.paramRE,function(I){return _>=P||(L[_]?I=w(I):C[_]&&(I=u(I)),_++),I})})}function h(m){x(m)&&m._fullLayout._activeShapeIndex>=0&&(d(m),delete m._fullLayout._activeShapeIndex,p(m))}$.exports={draw:p,drawOne:v,eraseActiveShape:function(m){if(x(m)){d(m);var w=m._fullLayout._activeShapeIndex,u=(m.layout||{}).shapes||[];if(w<u.length){for(var S=[],_=0;_<u.length;_++)_!==w&&S.push(u[_]);delete m._fullLayout._activeShapeIndex,k.call("_guiRelayout",m,{shapes:S})}}}}},29241:function($,R,e){"use strict";var k=e(79952).P,A=e(1426).extendFlat;$.exports={newshape:{line:{color:{valType:"color",editType:"none"},width:{valType:"number",min:0,dflt:4,editType:"none"},dash:A({},k,{dflt:"solid",editType:"none"}),editType:"none"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"none"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"none"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal",editType:"none"},editType:"none"},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},89995:function($){"use strict";$.exports={CIRCLE_SIDES:32,i000:0,i090:8,i180:16,i270:24,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}},45547:function($,R,e){"use strict";var k=e(7901);$.exports=function(A,l,T){T("newshape.drawdirection"),T("newshape.layer"),T("newshape.fillcolor"),T("newshape.fillrule"),T("newshape.opacity"),T("newshape.line.width")&&(T("newshape.line.color",k.contrast((A||{}).plot_bgcolor||"#FFF")),T("newshape.line.dash")),T("activeshape.fillcolor"),T("activeshape.opacity")}},60165:function($,R,e){"use strict";var k=e(95616),A=e(89995),l=A.CIRCLE_SIDES,T=A.SQRT2,b=e(75549),d=b.p2r,s=b.r2p,t=[0,3,4,5,6,1,2],o=[0,3,4,1,2];function r(i,a){return Math.abs(i-a)<=1e-6}function n(i,a){var c=a[1]-i[1],p=a[2]-i[2];return Math.sqrt(c*c+p*p)}R.writePaths=function(i){var a=i.length;if(!a)return"M0,0Z";for(var c="",p=0;p<a;p++)for(var f=i[p].length,x=0;x<f;x++){var v=i[p][x][0];if("Z"===v)c+="Z";else for(var g=i[p][x].length,y=0;y<g;y++){var h=y;"Q"===v||"S"===v?h=o[y]:"C"===v&&(h=t[y]),c+=i[p][x][h],y>0&&y<g-1&&(c+=",")}}return c},R.readPaths=function(i,a,c,p){var f,x,v,g=k(i),y=[],h=-1,m=0,w=0,u=function(){x=m,v=w};u();for(var S=0;S<g.length;S++){var P=[],I=g[S][0],U=I;switch(I){case"M":y[++h]=[],P.push([U,m=+g[S][1],w=+g[S][2]]),u();break;case"Q":case"S":P.push([U,m=+g[S][3],w=+g[S][4],+g[S][1],+g[S][2]]);break;case"C":P.push([U,m=+g[S][5],w=+g[S][6],+g[S][1],+g[S][2],+g[S][3],+g[S][4]]);break;case"T":case"L":P.push([U,m=+g[S][1],w=+g[S][2]]);break;case"H":P.push([U="L",m=+g[S][1],w]);break;case"V":P.push([U="L",m,w=+g[S][1]]);break;case"A":U="L";var z=+g[S][1],H=+g[S][2];+g[S][4]||(z=-z,H=-H);var F=m-z,N=w;for(f=1;f<=l/2;f++){var B=2*Math.PI*f/l;P.push([U,F+z*Math.cos(B),N+H*Math.sin(B)])}break;case"Z":m===x&&w===v||P.push([U,m=x,w=v])}for(var j=(c||{}).domain,J=a._fullLayout._size,G=c&&"pixel"===c.xsizemode,V=c&&"pixel"===c.ysizemode,W=!1===p,X=0;X<P.length;X++){for(f=0;f+2<7;f+=2){var K=P[X][f+1],re=P[X][f+2];void 0!==K&&void 0!==re&&(m=K,w=re,c&&(c.xaxis&&c.xaxis.p2r?(W&&(K-=c.xaxis._offset),K=G?s(c.xaxis,c.xanchor)+K:d(c.xaxis,K)):(W&&(K-=J.l),j?K=j.x[0]+K/J.w:K/=J.w),c.yaxis&&c.yaxis.p2r?(W&&(re-=c.yaxis._offset),re=V?s(c.yaxis,c.yanchor)-re:d(c.yaxis,re)):(W&&(re-=J.t),re=j?j.y[1]-re/J.h:1-re/J.h)),P[X][f+1]=K,P[X][f+2]=re)}y[h].push(P[X].slice())}}return y},R.pointsOnRectangle=function(i){if(5!==i.length)return!1;for(var a=1;a<3;a++)if(!r(i[0][a]-i[1][a],i[3][a]-i[2][a])||!r(i[0][a]-i[3][a],i[1][a]-i[2][a]))return!1;return!(!r(i[0][1],i[1][1])&&!r(i[0][1],i[3][1])||!(n(i[0],i[1])*n(i[0],i[3])))},R.pointsOnEllipse=function(i){var a=i.length;if(a!==l+1)return!1;a=l;for(var c=0;c<a;c++){var p=(2*a-c)%a,f=(a/2+p)%a;if(!r(n(i[c],i[(a/2+c)%a]),n(i[p],i[f])))return!1}return!0},R.handleEllipse=function(i,a,c){if(!i)return[a,c];var p=R.ellipseOver({x0:a[0],y0:a[1],x1:c[0],y1:c[1]}),f=(p.x1+p.x0)/2,x=(p.y1+p.y0)/2,v=(p.x1-p.x0)/2,g=(p.y1-p.y0)/2;v||(v=g/=T),g||(g=v/=T);for(var y=[],h=0;h<l;h++){var m=2*h*Math.PI/l;y.push([f+v*Math.cos(m),x+g*Math.sin(m)])}return y},R.ellipseOver=function(i){var a=i.x0,c=i.y0,p=i.x1,f=i.y1,x=p-a,v=f-c,g=((a-=x)+p)/2,y=((c-=v)+f)/2;return{x0:g-(x*=T),y0:y-(v*=T),x1:g+x,y1:y+v}},R.fixDatesForPaths=function(i,a,c){var p="date"===a.type,f="date"===c.type;if(!p&&!f)return i;for(var x=0;x<i.length;x++)for(var v=0;v<i[x].length;v++)for(var g=0;g+2<i[x][v].length;g+=2)p&&(i[x][v][g+1]=i[x][v][g+1].replace(" ","_")),f&&(i[x][v][g+2]=i[x][v][g+2].replace(" ","_"));return i}},90551:function($,R,e){"use strict";var k=e(64505),A=k.drawMode,l=k.openMode,T=e(89995),b=T.i000,d=T.i090,s=T.i180,t=T.i270,o=T.cos45,r=T.sin45,n=e(75549),i=n.p2r,a=n.r2p,c=e(51873).clearOutline,p=e(60165),f=p.readPaths,x=p.writePaths,v=p.ellipseOver,g=p.fixDatesForPaths;$.exports=function(y,h){if(y.length){var m=y[0][0];if(m){var w=m.getAttribute("d"),u=h.gd,S=u._fullLayout.newshape,_=h.plotinfo,E=_.xaxis,L=_.yaxis,C=!!_.domain||!_.xaxis,P=!!_.domain||!_.yaxis,I=h.isActiveShape,U=h.dragmode,z=(u.layout||{}).shapes||[];if(!A(U)&&void 0!==I){var H=u._fullLayout._activeShapeIndex;if(H<z.length)switch(u._fullLayout.shapes[H].type){case"rect":U="drawrect";break;case"circle":U="drawcircle";break;case"line":U="drawline";break;case"path":var F=z[H].path||"";U="Z"===F[F.length-1]?"drawclosedpath":"drawopenpath"}}var N,B=l(U),j=f(w,u,_,I),J={editable:!0,xref:C?"paper":E._id,yref:P?"paper":L._id,layer:S.layer,opacity:S.opacity,line:{color:S.line.color,width:S.line.width,dash:S.line.dash}};if(B||(J.fillcolor=S.fillcolor,J.fillrule=S.fillrule),1===j.length&&(N=j[0]),N&&5===N.length&&"drawrect"===U)J.type="rect",J.x0=N[0][1],J.y0=N[0][2],J.x1=N[2][1],J.y1=N[2][2];else if(N&&"drawline"===U)J.type="line",J.x0=N[0][1],J.y0=N[0][2],J.x1=N[1][1],J.y1=N[1][2];else if(N&&"drawcircle"===U){J.type="circle";var G=N[b][1],V=N[d][1],W=N[s][1],X=N[t][1],K=N[b][2],re=N[d][2],ee=N[s][2],ie=N[t][2],oe=_.xaxis&&("date"===_.xaxis.type||"log"===_.xaxis.type),ce=_.yaxis&&("date"===_.yaxis.type||"log"===_.yaxis.type);oe&&(G=a(_.xaxis,G),V=a(_.xaxis,V),W=a(_.xaxis,W),X=a(_.xaxis,X)),ce&&(K=a(_.yaxis,K),re=a(_.yaxis,re),ee=a(_.yaxis,ee),ie=a(_.yaxis,ie));var me=(V+X)/2,de=(K+ee)/2,he=v({x0:me,y0:de,x1:me+(X-V+W-G)/2*o,y1:de+(ie-re+ee-K)/2*r});oe&&(he.x0=i(_.xaxis,he.x0),he.x1=i(_.xaxis,he.x1)),ce&&(he.y0=i(_.yaxis,he.y0),he.y1=i(_.yaxis,he.y1)),J.x0=he.x0,J.y0=he.y0,J.x1=he.x1,J.y1=he.y1}else J.type="path",E&&L&&g(j,E,L),J.path=x(j),N=null;c(u);for(var ve=h.editHelpers,Pe=(ve||{}).modifyItem,xe=[],ke=0;ke<z.length;ke++){var Ae=u._fullLayout.shapes[ke];if(xe[ke]=Ae._input,void 0!==I&&ke===u._fullLayout._activeShapeIndex){var Te=J;switch(Ae.type){case"line":case"rect":case"circle":Pe("x0",Te.x0),Pe("x1",Te.x1),Pe("y0",Te.y0),Pe("y1",Te.y1);break;case"path":Pe("path",Te.path)}}}return void 0===I?(xe.push(J),xe):ve?ve.getUpdateObj():{}}}}},51873:function($){"use strict";$.exports={clearOutlineControllers:function(R){var e=R._fullLayout._zoomlayer;e&&e.selectAll(".outline-controllers").remove()},clearOutline:function(R){var e=R._fullLayout._zoomlayer;e&&e.selectAll(".select-outline").remove(),R._fullLayout._outlining=!1}}},30477:function($,R,e){"use strict";var k=e(21459),A=e(71828),l=e(89298);R.rangeToShapePosition=function(T){return"log"===T.type?T.r2d:function(b){return b}},R.shapePositionToRange=function(T){return"log"===T.type?T.d2r:function(b){return b}},R.decodeDate=function(T){return function(b){return b.replace&&(b=b.replace("_"," ")),T(b)}},R.encodeDate=function(T){return function(b){return T(b).replace(" ","_")}},R.extractPathCoords=function(T,b,d){var s=[];return T.match(k.segmentRE).forEach(function(t){var o=b[t.charAt(0)].drawn;if(void 0!==o){var r=t.substr(1).match(k.paramRE);if(r&&!(r.length<o)){var n=r[o],i=d?n:A.cleanNumber(n);s.push(i)}}}),s},R.getDataToPixel=function(T,b,d,s){var t,o=T._fullLayout._size;if(b)if("domain"===s)t=function(n){return b._length*(d?1-n:n)+b._offset};else{var r=R.shapePositionToRange(b);t=function(n){return b._offset+b.r2p(r(n,!0))},"date"===b.type&&(t=R.decodeDate(t))}else t=d?function(n){return o.t+o.h*(1-n)}:function(n){return o.l+o.w*n};return t},R.getPixelToData=function(T,b,d,s){var t,o=T._fullLayout._size;if(b)if("domain"===s)t=function(n){var i=(n-b._offset)/b._length;return d?1-i:i};else{var r=R.rangeToShapePosition(b);t=function(n){return r(b.p2r(n-b._offset))}}else t=d?function(n){return 1-(n-o.t)/o.h}:function(n){return(n-o.l)/o.w};return t},R.roundPositionForSharpStrokeRendering=function(T,b){var d=1===Math.round(b%2),s=Math.round(T);return d?s+.5:s},R.makeShapesOptionsAndPlotinfo=function(T,b){var d=T._fullLayout.shapes[b]||{},s=T._fullLayout._plots[d.xref+d.yref];return s?s._hadPlotinfo=!0:(s={},d.xref&&"paper"!==d.xref&&(s.xaxis=T._fullLayout[d.xref+"axis"]),d.yref&&"paper"!==d.yref&&(s.yaxis=T._fullLayout[d.yref+"axis"])),s.xsizemode=d.xsizemode,s.ysizemode=d.ysizemode,s.xanchor=d.xanchor,s.yanchor=d.yanchor,{options:d,plotinfo:s}},R.makeSelectionsOptionsAndPlotinfo=function(T,b){var d=T._fullLayout.selections[b]||{},s=T._fullLayout._plots[d.xref+d.yref];return s?s._hadPlotinfo=!0:(s={},d.xref&&(s.xaxis=T._fullLayout[d.xref+"axis"]),d.yref&&(s.yaxis=T._fullLayout[d.yref+"axis"])),{options:d,plotinfo:s}},R.getPathString=function(T,b){var d,s,t,o,r,n,i,a,L,C,P,U,z,H,F,c=b.type,p=l.getRefType(b.xref),f=l.getRefType(b.yref),x=l.getFromId(T,b.xref),v=l.getFromId(T,b.yref),g=T._fullLayout._size;if(x?"domain"===p?s=function(L){return x._offset+x._length*L}:(d=R.shapePositionToRange(x),s=function(L){return x._offset+x.r2p(d(L,!0))}):s=function(L){return g.l+g.w*L},v?"domain"===f?o=function(L){return v._offset+v._length*(1-L)}:(t=R.shapePositionToRange(v),o=function(L){return v._offset+v.r2p(t(L,!0))}):o=function(L){return g.t+g.h*(1-L)},"path"===c)return x&&"date"===x.type&&(s=R.decodeDate(s)),v&&"date"===v.type&&(o=R.decodeDate(o)),C=s,P=o,U=(L=b).xsizemode,z=L.ysizemode,H=L.xanchor,F=L.yanchor,L.path.replace(k.segmentRE,function(N){var B=0,j=N.charAt(0),J=k.paramIsX[j],G=k.paramIsY[j],V=k.numParams[j],W=N.substr(1).replace(k.paramRE,function(X){return J[B]?X="pixel"===U?C(H)+Number(X):C(X):G[B]&&(X="pixel"===z?P(F)-Number(X):P(X)),++B>V&&(X="X"),X});return B>V&&(W=W.replace(/[\s,]*X.*/,""),A.log("Ignoring extra params in segment "+N)),j+W});if("pixel"===b.xsizemode){var y=s(b.xanchor);r=y+b.x0,n=y+b.x1}else r=s(b.x0),n=s(b.x1);if("pixel"===b.ysizemode){var h=o(b.yanchor);i=h-b.y0,a=h-b.y1}else i=o(b.y0),a=o(b.y1);if("line"===c)return"M"+r+","+i+"L"+n+","+a;if("rect"===c)return"M"+r+","+i+"H"+n+"V"+a+"H"+r+"Z";var m=(r+n)/2,w=(i+a)/2,u=Math.abs(m-r),S=Math.abs(w-i),_="A"+u+","+S,E=m+u+","+w;return"M"+E+_+" 0 1,1 "+m+","+(w-S)+_+" 0 0,1 "+E+"Z"}},89853:function($,R,e){"use strict";var k=e(34031);$.exports={moduleType:"component",name:"shapes",layoutAttributes:e(89827),supplyLayoutDefaults:e(84726),supplyDrawNewShapeDefaults:e(45547),includeBasePlot:e(76325)("shapes"),calcAutorange:e(5627),draw:k.draw,drawOne:k.drawOne}},75067:function($,R,e){"use strict";var k=e(41940),A=e(35025),l=e(1426).extendDeepAll,T=e(30962).overrideAll,b=e(85594),d=e(44467).templatedArray,s=e(98292),t=d("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}});$.exports=T(d("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:t,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:l(A({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:b.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:k({})},font:k({}),activebgcolor:{valType:"color",dflt:s.gripBgActiveColor},bgcolor:{valType:"color",dflt:s.railBgColor},bordercolor:{valType:"color",dflt:s.railBorderColor},borderwidth:{valType:"number",min:0,dflt:s.railBorderWidth},ticklen:{valType:"number",min:0,dflt:s.tickLength},tickcolor:{valType:"color",dflt:s.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:s.minorTickLength}}),"arraydraw","from-root")},98292:function($){"use strict";$.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},12343:function($,R,e){"use strict";var k=e(71828),A=e(85501),l=e(75067),T=e(98292).name,b=l.steps;function d(t,o,r){function n(f,x){return k.coerce(t,o,l,f,x)}for(var i=A(t,o,{name:"steps",handleItemDefaults:s}),a=0,c=0;c<i.length;c++)i[c].visible&&a++;if(a<2?o.visible=!1:n("visible")){o._stepCount=a;var p=o._visibleSteps=k.filterVisible(i);(i[n("active")]||{}).visible||(o.active=p[0]._index),n("x"),n("y"),k.noneOrAll(t,o,["x","y"]),n("xanchor"),n("yanchor"),n("len"),n("lenmode"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),k.coerceFont(n,"font",r.font),n("currentvalue.visible")&&(n("currentvalue.xanchor"),n("currentvalue.prefix"),n("currentvalue.suffix"),n("currentvalue.offset"),k.coerceFont(n,"currentvalue.font",o.font)),n("transition.duration"),n("transition.easing"),n("bgcolor"),n("activebgcolor"),n("bordercolor"),n("borderwidth"),n("ticklen"),n("tickwidth"),n("tickcolor"),n("minorticklen")}}function s(t,o){function r(i,a){return k.coerce(t,o,b,i,a)}if("skip"===t.method||Array.isArray(t.args)?r("visible"):o.visible=!1){r("method"),r("args");var n=r("label","step-"+o._index);r("value",n),r("execute")}}$.exports=function(t,o){A(t,o,{name:T,handleItemDefaults:d})}},44504:function($,R,e){"use strict";var k=e(39898),A=e(74875),l=e(7901),T=e(91424),b=e(71828),d=b.strTranslate,s=e(63893),t=e(44467).arrayEditor,o=e(98292),r=e(18783),n=r.LINE_SPACING,i=r.FROM_TL,a=r.FROM_BR;function c(P){return o.autoMarginIdRoot+P._index}function p(P){return P._index}function f(P,I){var U=T.tester.selectAll("g."+o.labelGroupClass).data(I._visibleSteps);U.enter().append("g").classed(o.labelGroupClass,!0);var z=0,H=0;U.each(function(X){var K=g(k.select(this),{step:X},I).node();if(K){var re=T.bBox(K);H=Math.max(H,re.height),z=Math.max(z,re.width)}}),U.remove();var F=I._dims={};F.inputAreaWidth=Math.max(o.railWidth,o.gripHeight);var N=P._fullLayout._size;if(F.lx=N.l+N.w*I.x,F.ly=N.t+N.h*(1-I.y),F.outerLength="fraction"===I.lenmode?Math.round(N.w*I.len):I.len,F.inputAreaStart=0,F.inputAreaLength=Math.round(F.outerLength-I.pad.l-I.pad.r),F.labelStride=Math.max(1,Math.ceil((z+o.labelPadding)/((F.inputAreaLength-2*o.stepInset)/(I._stepCount-1)))),F.labelHeight=H,F.currentValueMaxWidth=0,F.currentValueHeight=0,F.currentValueTotalHeight=0,F.currentValueMaxLines=1,I.currentvalue.visible){var J=T.tester.append("g");U.each(function(X){var K=x(J,I,X.label),re=K.node()&&T.bBox(K.node())||{width:0,height:0},ee=s.lineCount(K);F.currentValueMaxWidth=Math.max(F.currentValueMaxWidth,Math.ceil(re.width)),F.currentValueHeight=Math.max(F.currentValueHeight,Math.ceil(re.height)),F.currentValueMaxLines=Math.max(F.currentValueMaxLines,ee)}),F.currentValueTotalHeight=F.currentValueHeight+I.currentvalue.offset,J.remove()}F.height=F.currentValueTotalHeight+o.tickOffset+I.ticklen+o.labelOffset+F.labelHeight+I.pad.t+I.pad.b;var G="left";b.isRightAnchor(I)&&(F.lx-=F.outerLength,G="right"),b.isCenterAnchor(I)&&(F.lx-=F.outerLength/2,G="center");var V="top";b.isBottomAnchor(I)&&(F.ly-=F.height,V="bottom"),b.isMiddleAnchor(I)&&(F.ly-=F.height/2,V="middle"),F.outerLength=Math.ceil(F.outerLength),F.height=Math.ceil(F.height),F.lx=Math.round(F.lx),F.ly=Math.round(F.ly);var W={y:I.y,b:F.height*a[V],t:F.height*i[V]};"fraction"===I.lenmode?(W.l=0,W.xl=I.x-I.len*i[G],W.r=0,W.xr=I.x+I.len*a[G]):(W.x=I.x,W.l=F.outerLength*i[G],W.r=F.outerLength*a[G]),A.autoMargin(P,c(I),W)}function x(P,I,U){if(I.currentvalue.visible){var z,H,F=I._dims;switch(I.currentvalue.xanchor){case"right":z=F.inputAreaLength-o.currentValueInset-F.currentValueMaxWidth,H="left";break;case"center":z=.5*F.inputAreaLength,H="middle";break;default:z=o.currentValueInset,H="left"}var N=b.ensureSingle(P,"text",o.labelClass,function(W){W.attr({"text-anchor":H,"data-notex":1})}),B=I.currentvalue.prefix?I.currentvalue.prefix:"";if("string"==typeof U)B+=U;else{var j=I.steps[I.active].label,J=I._gd._fullLayout._meta;J&&(j=b.templateString(j,J)),B+=j}I.currentvalue.suffix&&(B+=I.currentvalue.suffix),N.call(T.font,I.currentvalue.font).text(B).call(s.convertToTspans,I._gd);var G=s.lineCount(N);return s.positionText(N,z,(F.currentValueMaxLines+1-G)*I.currentvalue.font.size*n),N}}function v(P,I,U){b.ensureSingle(P,"rect",o.gripRectClass,function(z){z.call(w,I,P,U).style("pointer-events","all")}).attr({width:o.gripWidth,height:o.gripHeight,rx:o.gripRadius,ry:o.gripRadius}).call(l.stroke,U.bordercolor).call(l.fill,U.bgcolor).style("stroke-width",U.borderwidth+"px")}function g(P,I,U){var z=b.ensureSingle(P,"text",o.labelClass,function(N){N.attr({"text-anchor":"middle","data-notex":1})}),H=I.step.label,F=U._gd._fullLayout._meta;return F&&(H=b.templateString(H,F)),z.call(T.font,U.font).text(H).call(s.convertToTspans,U._gd),z}function y(P,I){var U=b.ensureSingle(P,"g",o.labelsClass),z=I._dims,H=U.selectAll("g."+o.labelGroupClass).data(z.labelSteps);H.enter().append("g").classed(o.labelGroupClass,!0),H.exit().remove(),H.each(function(F){var N=k.select(this);N.call(g,F,I),T.setTranslate(N,_(I,F.fraction),o.tickOffset+I.ticklen+I.font.size*n+o.labelOffset+z.currentValueTotalHeight)})}function h(P,I,U,z,H){var F=Math.round(z*(U._stepCount-1)),N=U._visibleSteps[F]._index;N!==U.active&&m(P,I,U,N,!0,H)}function m(P,I,U,z,H,F){var N=U.active;U.active=z,t(P.layout,o.name,U).applyUpdate("active",z);var B=U.steps[U.active];I.call(S,U,F),I.call(x,U),P.emit("plotly_sliderchange",{slider:U,step:U.steps[U.active],interaction:H,previousActive:N}),B&&B.method&&H&&(I._nextMethod?(I._nextMethod.step=B,I._nextMethod.doCallback=H,I._nextMethod.doTransition=F):(I._nextMethod={step:B,doCallback:H,doTransition:F},I._nextMethodRaf=window.requestAnimationFrame(function(){var j=I._nextMethod.step;j.method&&(j.execute&&A.executeAPICommand(P,j.method,j.args),I._nextMethod=null,I._nextMethodRaf=null)})))}function w(P,I,U){if(!I._context.staticPlot){var z=U.node(),H=k.select(I);P.on("mousedown",N),P.on("touchstart",N)}function F(){return U.data()[0]}function N(){var B=F();I.emit("plotly_sliderstart",{slider:B});var j=U.select("."+o.gripRectClass);k.event.stopPropagation(),k.event.preventDefault(),j.call(l.fill,B.activebgcolor);var J=E(B,k.mouse(z)[0]);function G(){var W=F(),X=E(W,k.mouse(z)[0]);h(I,U,W,X,!1)}function V(){var W=F();W._dragging=!1,j.call(l.fill,W.bgcolor),H.on("mouseup",null),H.on("mousemove",null),H.on("touchend",null),H.on("touchmove",null),I.emit("plotly_sliderend",{slider:W,step:W.steps[W.active]})}h(I,U,B,J,!0),B._dragging=!0,H.on("mousemove",G),H.on("touchmove",G),H.on("mouseup",V),H.on("touchend",V)}}function u(P,I){var U=P.selectAll("rect."+o.tickRectClass).data(I._visibleSteps),z=I._dims;U.enter().append("rect").classed(o.tickRectClass,!0),U.exit().remove(),U.attr({width:I.tickwidth+"px","shape-rendering":"crispEdges"}),U.each(function(H,F){var N=F%z.labelStride==0,B=k.select(this);B.attr({height:N?I.ticklen:I.minorticklen}).call(l.fill,I.tickcolor),T.setTranslate(B,_(I,F/(I._stepCount-1))-.5*I.tickwidth,(N?o.tickOffset:o.minorTickOffset)+z.currentValueTotalHeight)})}function S(P,I,U){for(var z=P.select("rect."+o.gripRectClass),H=0,F=0;F<I._stepCount;F++)if(I._visibleSteps[F]._index===I.active){H=F;break}var N=_(I,H/(I._stepCount-1));if(!I._invokingCommand){var B=z;U&&I.transition.duration>0&&(B=B.transition().duration(I.transition.duration).ease(I.transition.easing)),B.attr("transform",d(N-.5*o.gripWidth,I._dims.currentValueTotalHeight))}}function _(P,I){var U=P._dims;return U.inputAreaStart+o.stepInset+(U.inputAreaLength-2*o.stepInset)*Math.min(1,Math.max(0,I))}function E(P,I){var U=P._dims;return Math.min(1,Math.max(0,(I-o.stepInset-U.inputAreaStart)/(U.inputAreaLength-2*o.stepInset-2*U.inputAreaStart)))}function L(P,I,U){var z=U._dims,H=b.ensureSingle(P,"rect",o.railTouchRectClass,function(F){F.call(w,I,P,U).style("pointer-events","all")});H.attr({width:z.inputAreaLength,height:Math.max(z.inputAreaWidth,o.tickOffset+U.ticklen+z.labelHeight)}).call(l.fill,U.bgcolor).attr("opacity",0),T.setTranslate(H,0,z.currentValueTotalHeight)}function C(P,I){var U=I._dims,z=U.inputAreaLength-2*o.railInset,H=b.ensureSingle(P,"rect",o.railRectClass);H.attr({width:z,height:o.railWidth,rx:o.railRadius,ry:o.railRadius,"shape-rendering":"crispEdges"}).call(l.stroke,I.bordercolor).call(l.fill,I.bgcolor).style("stroke-width",I.borderwidth+"px"),T.setTranslate(H,o.railInset,.5*(U.inputAreaWidth-o.railWidth)+U.currentValueTotalHeight)}$.exports=function(P){var I=P._context.staticPlot,U=P._fullLayout,z=function(J,G){for(var V=J[o.name],W=[],X=0;X<V.length;X++){var K=V[X];K.visible&&(K._gd=G,W.push(K))}return W}(U,P),H=U._infolayer.selectAll("g."+o.containerClassName).data(z.length>0?[0]:[]);function F(J){J._commandObserver&&(J._commandObserver.remove(),delete J._commandObserver),A.autoMargin(P,c(J))}if(H.enter().append("g").classed(o.containerClassName,!0).style("cursor",I?null:"ew-resize"),H.exit().each(function(){k.select(this).selectAll("g."+o.groupClassName).each(F)}).remove(),0!==z.length){var N=H.selectAll("g."+o.groupClassName).data(z,p);N.enter().append("g").classed(o.groupClassName,!0),N.exit().each(F).remove();for(var B=0;B<z.length;B++)f(P,z[B]);N.each(function(J){var G=k.select(this);(function(V){var W=V._dims;W.labelSteps=[];for(var X=V._stepCount,K=0;K<X;K+=W.labelStride)W.labelSteps.push({fraction:K/(X-1),step:V._visibleSteps[K]})})(J),A.manageCommandObserver(P,J,J._visibleSteps,function(V){var W=G.data()[0];W.active!==V.index&&(W._dragging||m(P,G,W,V.index,!1,!0))}),function(V,W,X){(X.steps[X.active]||{}).visible||(X.active=X._visibleSteps[0]._index),W.call(x,X).call(C,X).call(y,X).call(u,X).call(L,V,X).call(v,V,X);var K=X._dims;T.setTranslate(W,K.lx+X.pad.l,K.ly+X.pad.t),W.call(S,X,!1),W.call(x,X)}(P,k.select(this),J)})}}},23243:function($,R,e){"use strict";var k=e(98292);$.exports={moduleType:"component",name:k.name,layoutAttributes:e(75067),supplyLayoutDefaults:e(12343),draw:e(44504)}},92998:function($,R,e){"use strict";var k=e(39898),A=e(92770),l=e(74875),T=e(73972),b=e(71828),d=b.strTranslate,s=e(91424),t=e(7901),o=e(63893),r=e(37822),n=e(18783).OPPOSITE_SIDE,i=/ [XY][0-9]* /;$.exports={draw:function(a,c,p){var f,x=p.propContainer,v=p.propName,g=p.placeholder,y=p.traceIndex,h=p.avoid||{},m=p.attributes,w=p.transform,u=p.containerGroup,S=a._fullLayout,_=1,E=!1,L=x.title,C=(L&&L.text?L.text:"").trim(),P=L&&L.font?L.font:{},I=P.family,U=P.size,z=P.color;"title.text"===v?f="titleText":-1!==v.indexOf("axis")?f="axisTitleText":v.indexOf(!0)&&(f="colorbarTitleText");var H=a._context.edits[f];""===C?_=0:C.replace(i," % ")===g.replace(i," % ")&&(_=.2,E=!0,H||(C="")),p._meta?C=b.templateString(C,p._meta):S._meta&&(C=b.templateString(C,S._meta));var F,N=C||H;u||(u=b.ensureSingle(S._infolayer,"g","g-"+c),F=S._hColorbarMoveTitle);var B=u.selectAll("text").data(N?[0]:[]);if(B.enter().append("text"),B.text(C).attr("class",c),B.exit().remove(),!N)return u;function j(V){b.syncOrAsync([J,G],V)}function J(V){var W;return!w&&F&&(w={}),w?(W="",w.rotate&&(W+="rotate("+[w.rotate,m.x,m.y]+")"),(w.offset||F)&&(W+=d(0,(w.offset||0)-(F||0)))):W=null,V.attr("transform",W),V.style({"font-family":I,"font-size":k.round(U,2)+"px",fill:t.rgb(z),opacity:_*t.opacity(z),"font-weight":l.fontWeight}).attr(m).call(o.convertToTspans,a),l.previousPromises(a)}function G(V){var W=k.select(V.node().parentNode);if(h&&h.selection&&h.side&&C){W.attr("transform",null);var X=n[h.side],K="left"===h.side||"top"===h.side?-1:1,re=A(h.pad)?h.pad:2,ee=s.bBox(W.node()),oe=h.maxShift||K*({left:0,top:0,right:S.width,bottom:S.height}[h.side]-ee[h.side]),ce=0;if(oe<0)ce=oe;else{var me=h.offsetLeft||0,de=h.offsetTop||0;ee.left-=me,ee.right-=me,ee.top-=de,ee.bottom-=de,h.selection.each(function(){var ve=s.bBox(this);b.bBoxIntersect(ee,ve,re)&&(ce=Math.max(ce,K*(ve[h.side]-ee[X])+re))}),ce=Math.min(oe,ce),x._titleScoot=Math.abs(ce)}if(ce>0||oe<0){var he={left:[-ce,0],right:[ce,0],top:[0,-ce],bottom:[0,ce]}[h.side];W.attr("transform",d(he[0],he[1]))}}}return B.call(j),H&&(C?B.on(".opacity",null):(_=0,E=!0,B.text(g).on("mouseover.opacity",function(){k.select(this).transition().duration(r.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){k.select(this).transition().duration(r.HIDE_PLACEHOLDER).style("opacity",0)})),B.call(o.makeEditable,{gd:a}).on("edit",function(V){void 0!==y?T.call("_guiRestyle",a,v,V,y):T.call("_guiRelayout",a,v,V)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(j)}).on("input",function(V){this.text(V||" ").call(o.positionText,m.x,m.y)})),B.classed("js-placeholder",E),u}}},7163:function($,R,e){"use strict";var k=e(41940),A=e(22399),l=e(1426).extendFlat,T=e(30962).overrideAll,b=e(35025),d=e(44467).templatedArray,s=d("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}});$.exports=T(d("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:s,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:l(b({editType:"arraydraw"}),{}),font:k({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:A.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},75909:function($){"use strict";$.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:"\u25c4",right:"\u25ba",up:"\u25b2",down:"\u25bc"}}},64897:function($,R,e){"use strict";var k=e(71828),A=e(85501),l=e(7163),T=e(75909).name,b=l.buttons;function d(t,o,r){function n(i,a){return k.coerce(t,o,l,i,a)}n("visible",A(t,o,{name:"buttons",handleItemDefaults:s}).length>0)&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),k.noneOrAll(t,o,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),k.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function s(t,o){function r(n,i){return k.coerce(t,o,b,n,i)}r("visible","skip"===t.method||Array.isArray(t.args))&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}$.exports=function(t,o){A(t,o,{name:T,handleItemDefaults:d})}},13689:function($,R,e){"use strict";var k=e(39898),A=e(74875),l=e(7901),T=e(91424),b=e(71828),d=e(63893),s=e(44467).arrayEditor,t=e(18783).LINE_SPACING,o=e(75909),r=e(25849);function n(_){return _._index}function i(_,E){return+_.attr(o.menuIndexAttrName)===E._index}function a(_,E,L,C,P,I,U,z){E.active=U,s(_.layout,o.name,E).applyUpdate("active",U),"buttons"===E.type?p(_,C,null,null,E):"dropdown"===E.type&&(P.attr(o.menuIndexAttrName,"-1"),c(_,C,P,I,E),z||p(_,C,P,I,E))}function c(_,E,L,C,P){var I=b.ensureSingle(E,"g",o.headerClassName,function(B){B.style("pointer-events","all")}),U=P._dims,F={y:P.pad.t,yPad:0,x:P.pad.l,xPad:0,index:0},N={width:U.headerWidth,height:U.headerHeight};I.call(f,P,P.buttons[P.active]||o.blankHeaderOpts,_).call(u,P,F,N),b.ensureSingle(E,"text",o.headerArrowClassName,function(B){B.attr("text-anchor","end").call(T.font,P.font).text(o.arrowSymbol[P.direction])}).attr({x:U.headerWidth-o.arrowOffsetX+P.pad.l,y:U.headerHeight/2+o.textOffsetY+P.pad.t}),I.on("click",function(){L.call(S,String(i(L,P)?-1:P._index)),p(_,E,L,C,P)}),I.on("mouseover",function(){I.call(y)}),I.on("mouseout",function(){I.call(h,P)}),T.setTranslate(E,U.lx,U.ly)}function p(_,E,L,C,P){L||(L=E).attr("pointer-events","all");var I=-1==+L.attr(o.menuIndexAttrName)&&"buttons"!==P.type?[]:P.buttons,U="dropdown"===P.type?o.dropdownButtonClassName:o.buttonClassName,z=L.selectAll("g."+U).data(b.filterVisible(I)),H=z.enter().append("g").classed(U,!0),F=z.exit();"dropdown"===P.type?(H.attr("opacity","0").transition().attr("opacity","1"),F.transition().attr("opacity","0").remove()):F.remove();var N=0,B=0,j=P._dims,J=-1!==["up","down"].indexOf(P.direction);"dropdown"===P.type&&(J?B=j.headerHeight+o.gapButtonHeader:N=j.headerWidth+o.gapButtonHeader),"dropdown"===P.type&&"up"===P.direction&&(B=-o.gapButtonHeader+o.gapButton-j.openHeight),"dropdown"===P.type&&"left"===P.direction&&(N=-o.gapButtonHeader+o.gapButton-j.openWidth);var W,X,K,G={x:j.lx+N+P.pad.l,y:j.ly+B+P.pad.t,yPad:o.gapButton,xPad:o.gapButton,index:0},V={l:G.x+P.borderwidth,t:G.y+P.borderwidth};z.each(function(W,X){var K=k.select(this);K.call(f,P,W,_).call(u,P,G),K.on("click",function(){k.event.defaultPrevented||(W.execute&&(W.args2&&P.active===X?(a(_,P,0,E,L,C,-1),A.executeAPICommand(_,W.method,W.args2)):(a(_,P,0,E,L,C,X),A.executeAPICommand(_,W.method,W.args))),_.emit("plotly_buttonclicked",{menu:P,button:W,active:P.active}))}),K.on("mouseover",function(){K.call(y)}),K.on("mouseout",function(){K.call(h,P),z.call(g,P)})}),z.call(g,P),J?(V.w=Math.max(j.openWidth,j.headerWidth),V.h=G.y-V.t):(V.w=G.x-V.l,V.h=Math.max(j.openHeight,j.headerHeight)),V.direction=P.direction,C&&(z.size()?function(W,X,K,re,ee,ie){var oe,ce,me,de=ee.direction,ve=ee._dims,Pe=ee.active;if("up"===de||"down"===de)for(ce=0,me=0;me<Pe;me++)ce+=ve.heights[me]+o.gapButton;else for(oe=0,me=0;me<Pe;me++)oe+=ve.widths[me]+o.gapButton;re.enable(ie,oe,ce),re.hbar&&re.hbar.attr("opacity","0").transition().attr("opacity","1"),re.vbar&&re.vbar.attr("opacity","0").transition().attr("opacity","1")}(0,0,0,C,P,V):(K=!!(W=C).vbar,(X=!!W.hbar)&&W.hbar.transition().attr("opacity","0").each("end",function(){X=!1,K||W.disable()}),K&&W.vbar.transition().attr("opacity","0").each("end",function(){K=!1,X||W.disable()})))}function f(_,E,L,C){_.call(x,E).call(v,E,L,C)}function x(_,E){b.ensureSingle(_,"rect",o.itemRectClassName,function(L){L.attr({rx:o.rx,ry:o.ry,"shape-rendering":"crispEdges"})}).call(l.stroke,E.bordercolor).call(l.fill,E.bgcolor).style("stroke-width",E.borderwidth+"px")}function v(_,E,L,C){var P=b.ensureSingle(_,"text",o.itemTextClassName,function(z){z.attr({"text-anchor":"start","data-notex":1})}),I=L.label,U=C._fullLayout._meta;U&&(I=b.templateString(I,U)),P.call(T.font,E.font).text(I).call(d.convertToTspans,C)}function g(_,E){var L=E.active;_.each(function(C,P){var I=k.select(this);P===L&&E.showactive&&I.select("rect."+o.itemRectClassName).call(l.fill,o.activeColor)})}function y(_){_.select("rect."+o.itemRectClassName).call(l.fill,o.hoverColor)}function h(_,E){_.select("rect."+o.itemRectClassName).call(l.fill,E.bgcolor)}function m(_,E){var L=E._dims={width1:0,height1:0,heights:[],widths:[],totalWidth:0,totalHeight:0,openWidth:0,openHeight:0,lx:0,ly:0},C=T.tester.selectAll("g."+o.dropdownButtonClassName).data(b.filterVisible(E.buttons));C.enter().append("g").classed(o.dropdownButtonClassName,!0);var P=-1!==["up","down"].indexOf(E.direction);C.each(function(N,B){var j=k.select(this);j.call(f,E,N,_);var J=j.select("."+o.itemTextClassName),G=J.node()&&T.bBox(J.node()).width,V=Math.max(G+o.textPadX,o.minWidth),W=E.font.size*t,X=d.lineCount(J),K=Math.max(W*X,o.minHeight)+o.textOffsetY;K=Math.ceil(K),V=Math.ceil(V),L.widths[B]=V,L.heights[B]=K,L.height1=Math.max(L.height1,K),L.width1=Math.max(L.width1,V),P?(L.totalWidth=Math.max(L.totalWidth,V),L.openWidth=L.totalWidth,L.totalHeight+=K+o.gapButton,L.openHeight+=K+o.gapButton):(L.totalWidth+=V+o.gapButton,L.openWidth+=V+o.gapButton,L.totalHeight=Math.max(L.totalHeight,K),L.openHeight=L.totalHeight)}),P?L.totalHeight-=o.gapButton:L.totalWidth-=o.gapButton,L.headerWidth=L.width1+o.arrowPadX,L.headerHeight=L.height1,"dropdown"===E.type&&(P?(L.width1+=o.arrowPadX,L.totalHeight=L.height1):L.totalWidth=L.width1,L.totalWidth+=o.arrowPadX),C.remove();var I=L.totalWidth+E.pad.l+E.pad.r,U=L.totalHeight+E.pad.t+E.pad.b,z=_._fullLayout._size;L.lx=z.l+z.w*E.x,L.ly=z.t+z.h*(1-E.y);var H="left";b.isRightAnchor(E)&&(L.lx-=I,H="right"),b.isCenterAnchor(E)&&(L.lx-=I/2,H="center");var F="top";b.isBottomAnchor(E)&&(L.ly-=U,F="bottom"),b.isMiddleAnchor(E)&&(L.ly-=U/2,F="middle"),L.totalWidth=Math.ceil(L.totalWidth),L.totalHeight=Math.ceil(L.totalHeight),L.lx=Math.round(L.lx),L.ly=Math.round(L.ly),A.autoMargin(_,w(E),{x:E.x,y:E.y,l:I*({right:1,center:.5}[H]||0),r:I*({left:1,center:.5}[H]||0),b:U*({top:1,middle:.5}[F]||0),t:U*({bottom:1,middle:.5}[F]||0)})}function w(_){return o.autoMarginIdRoot+_._index}function u(_,E,L,C){C=C||{};var P=_.select("."+o.itemRectClassName),I=_.select("."+o.itemTextClassName),U=E.borderwidth,z=L.index,H=E._dims;T.setTranslate(_,U+L.x,U+L.y);var F=-1!==["up","down"].indexOf(E.direction),N=C.height||(F?H.heights[z]:H.height1);P.attr({x:0,y:0,width:C.width||(F?H.width1:H.widths[z]),height:N});var B=E.font.size*t,j=(d.lineCount(I)-1)*B/2;d.positionText(I,o.textOffsetX,N/2-j+o.textOffsetY),F?L.y+=H.heights[z]+L.yPad:L.x+=H.widths[z]+L.xPad,L.index++}function S(_,E){_.attr(o.menuIndexAttrName,E||"-1").selectAll("g."+o.dropdownButtonClassName).remove()}$.exports=function(_){var E=_._fullLayout,L=b.filterVisible(E[o.name]);function C(B){A.autoMargin(_,w(B))}var P=E._menulayer.selectAll("g."+o.containerClassName).data(L.length>0?[0]:[]);if(P.enter().append("g").classed(o.containerClassName,!0).style("cursor","pointer"),P.exit().each(function(){k.select(this).selectAll("g."+o.headerGroupClassName).each(C)}).remove(),0!==L.length){var I=P.selectAll("g."+o.headerGroupClassName).data(L,n);I.enter().append("g").classed(o.headerGroupClassName,!0);for(var U=b.ensureSingle(P,"g",o.dropdownButtonGroupClassName,function(B){B.style("pointer-events","all")}),z=0;z<L.length;z++)m(_,L[z]);var N=new r(_,U,"updatemenus"+E._uid);I.enter().size()&&(U.node().parentNode.appendChild(U.node()),U.call(S)),I.exit().each(function(B){U.call(S),C(B)}).remove(),I.each(function(B){var j=k.select(this),J="dropdown"===B.type?U:null;A.manageCommandObserver(_,B,B.buttons,function(G){a(_,B,0,j,J,N,G.index,!0)}),"dropdown"===B.type?(c(_,j,U,N,B),i(U,B)&&p(_,j,U,N,B)):p(_,j,null,null,B)})}}},20763:function($,R,e){"use strict";var k=e(75909);$.exports={moduleType:"component",name:k.name,layoutAttributes:e(7163),supplyLayoutDefaults:e(64897),draw:e(13689)}},25849:function($,R,e){"use strict";$.exports=b;var k=e(39898),A=e(7901),l=e(91424),T=e(71828);function b(d,s,t){this.gd=d,this.container=s,this.id=t,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})}b.barWidth=2,b.barLength=20,b.barRadius=2,b.barPad=1,b.barColor="#808BA4",b.prototype.enable=function(d,s,t){var o=this.gd._fullLayout,r=o.width,n=o.height;this.position=d;var i,a,c,p,f=this.position.l,x=this.position.w,v=this.position.t,g=this.position.h,y=this.position.direction,h="down"===y,m="left"===y,w="up"===y,u=x,S=g;h||m||"right"===y||w||(this.position.direction="down",h=!0),h||w?(a=(i=f)+u,h?(c=v,S=(p=Math.min(c+S,n))-c):S=(p=v+S)-(c=Math.max(p-S,0))):(p=(c=v)+S,m?u=(a=f+u)-(i=Math.max(a-u,0)):(i=f,u=(a=Math.min(i+u,r))-i)),this._box={l:i,t:c,w:u,h:S};var _=x>u,E=b.barLength+2*b.barPad,L=b.barWidth+2*b.barPad,C=f,P=v+g;P+L>n&&(P=n-L);var I=this.container.selectAll("rect.scrollbar-horizontal").data(_?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-horizontal",!0).call(A.fill,b.barColor),_?(this.hbar=I.attr({rx:b.barRadius,ry:b.barRadius,x:C,y:P,width:E,height:L}),this._hbarXMin=C+E/2,this._hbarTranslateMax=u-E):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var U=g>S,z=b.barWidth+2*b.barPad,H=b.barLength+2*b.barPad,F=f+x,N=v;F+z>r&&(F=r-z);var B=this.container.selectAll("rect.scrollbar-vertical").data(U?[0]:[]);B.exit().on(".drag",null).remove(),B.enter().append("rect").classed("scrollbar-vertical",!0).call(A.fill,b.barColor),U?(this.vbar=B.attr({rx:b.barRadius,ry:b.barRadius,x:F,y:N,width:z,height:H}),this._vbarYMin=N+H/2,this._vbarTranslateMax=S-H):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var j=this.id,J=i-.5,G=U?a+z+.5:a+.5,V=c-.5,W=_?p+L+.5:p+.5,X=o._topdefs.selectAll("#"+j).data(_||U?[0]:[]);if(X.exit().remove(),X.enter().append("clipPath").attr("id",j).append("rect"),_||U?(this._clipRect=X.select("rect").attr({x:Math.floor(J),y:Math.floor(V),width:Math.ceil(G)-Math.floor(J),height:Math.ceil(W)-Math.floor(V)}),this.container.call(l.setClipUrl,j,this.gd),this.bg.attr({x:f,y:v,width:x,height:g})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(l.setClipUrl,null),delete this._clipRect),_||U){var K=k.behavior.drag().on("dragstart",function(){k.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(K);var re=k.behavior.drag().on("dragstart",function(){k.event.sourceEvent.preventDefault(),k.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));_&&this.hbar.on(".drag",null).call(re),U&&this.vbar.on(".drag",null).call(re)}this.setTranslate(s,t)},b.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(l.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)},b.prototype._onBoxDrag=function(){var d=this.translateX,s=this.translateY;this.hbar&&(d-=k.event.dx),this.vbar&&(s-=k.event.dy),this.setTranslate(d,s)},b.prototype._onBoxWheel=function(){var d=this.translateX,s=this.translateY;this.hbar&&(d+=k.event.deltaY),this.vbar&&(s+=k.event.deltaY),this.setTranslate(d,s)},b.prototype._onBarDrag=function(){var d=this.translateX,s=this.translateY;if(this.hbar){var t=d+this._hbarXMin,o=t+this._hbarTranslateMax;d=(T.constrain(k.event.x,t,o)-t)/(o-t)*(this.position.w-this._box.w)}if(this.vbar){var r=s+this._vbarYMin,n=r+this._vbarTranslateMax;s=(T.constrain(k.event.y,r,n)-r)/(n-r)*(this.position.h-this._box.h)}this.setTranslate(d,s)},b.prototype.setTranslate=function(d,s){var t=this.position.w-this._box.w,o=this.position.h-this._box.h;d=T.constrain(d||0,0,t),s=T.constrain(s||0,0,o),this.translateX=d,this.translateY=s,this.container.call(l.setTranslate,this._box.l-this.position.l-d,this._box.t-this.position.t-s),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+d-.5),y:Math.floor(this.position.t+s-.5)}),this.hbar&&this.hbar.call(l.setTranslate,d+d/t*this._hbarTranslateMax,s),this.vbar&&this.vbar.call(l.setTranslate,d,s+s/o*this._vbarTranslateMax)}},18783:function($){"use strict";$.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},24695:function($){"use strict";$.exports={axisRefDescription:function(R,e,k){return["If set to a",R,"axis id (e.g. *"+R+"* or","*"+R+"2*), the `"+R+"` position refers to a",R,"coordinate. If set to *paper*, the `"+R+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+k+"). If set to a",R,"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.,","*"+R+"2 domain* refers to the domain of the second",R," axis and a",R,"position of 0.5 refers to the","point between the",e,"and the",k,"of the domain of the","second",R,"axis."].join(" ")}}},22372:function($){"use strict";$.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25b2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25bc"}}},31562:function($){"use strict";$.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},74808:function($){"use strict";$.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},29659:function($){"use strict";$.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87381:function($){"use strict";$.exports={circle:"\u25cf","circle-open":"\u25cb",square:"\u25a0","square-open":"\u25a1",diamond:"\u25c6","diamond-open":"\u25c7",cross:"+",x:"\u274c"}},37822:function($){"use strict";$.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},50606:function($){"use strict";$.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:"\u2212"}},77922:function($,R){"use strict";R.xmlns="http://www.w3.org/2000/xmlns/",R.svg="http://www.w3.org/2000/svg",R.xlink="http://www.w3.org/1999/xlink",R.svgAttrs={xmlns:R.svg,"xmlns:xlink":R.xlink}},8729:function($,R,e){"use strict";R.version=e(11506).version,e(7417),e(98847);for(var k=e(73972),A=R.register=k.register,l=e(10641),T=Object.keys(l),b=0;b<T.length;b++){var d=T[b];"_"!==d.charAt(0)&&(R[d]=l[d]),A({moduleType:"apiMethod",name:d,fn:l[d]})}A(e(67368)),A([e(2199),e(30211),e(32745),e(2468),e(47322),e(89853),e(68804),e(20763),e(23243),e(13137),e(97218),e(83312),e(37369),e(21081),e(12311),e(64168)]),A([e(92177),e(37815)]),window.PlotlyLocales&&Array.isArray(window.PlotlyLocales)&&(A(window.PlotlyLocales),delete window.PlotlyLocales),R.Icons=e(24255);var s=e(30211),t=e(74875);R.Plots={resize:t.resize,graphJson:t.graphJson,sendDataToCloud:t.sendDataToCloud},R.Fx={hover:s.hover,unhover:s.unhover,loneHover:s.loneHover,loneUnhover:s.loneUnhover},R.Snapshot=e(44511),R.PlotSchema=e(86281)},24255:function($){"use strict";$.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("")}}},99863:function($,R){"use strict";R.isLeftAnchor=function(e){return"left"===e.xanchor||"auto"===e.xanchor&&e.x<=.3333333333333333},R.isCenterAnchor=function(e){return"center"===e.xanchor||"auto"===e.xanchor&&e.x>.3333333333333333&&e.x<.6666666666666666},R.isRightAnchor=function(e){return"right"===e.xanchor||"auto"===e.xanchor&&e.x>=.6666666666666666},R.isTopAnchor=function(e){return"top"===e.yanchor||"auto"===e.yanchor&&e.y>=.6666666666666666},R.isMiddleAnchor=function(e){return"middle"===e.yanchor||"auto"===e.yanchor&&e.y>.3333333333333333&&e.y<.6666666666666666},R.isBottomAnchor=function(e){return"bottom"===e.yanchor||"auto"===e.yanchor&&e.y<=.3333333333333333}},26348:function($,R,e){"use strict";var k=e(64872),A=k.mod,l=k.modHalf,T=Math.PI,b=2*T;function d(r){return Math.abs(r[1]-r[0])>b-1e-14}function s(r,n){return l(n-r,b)}function t(r,n){if(d(n))return!0;var i,a;n[0]<n[1]?(i=n[0],a=n[1]):(i=n[1],a=n[0]),(i=A(i,b))>(a=A(a,b))&&(a+=b);var c=A(r,b),p=c+b;return c>=i&&c<=a||p>=i&&p<=a}function o(r,n,i,a,c,p,f){c=c||0,p=p||0;var x,v,g,y,h,m=d([i,a]);function w(E,L){return[E*Math.cos(L)+c,p-E*Math.sin(L)]}m?(x=0,v=T,g=b):i<a?(x=i,g=a):(x=a,g=i),r<n?(y=r,h=n):(y=n,h=r);var u,S=Math.abs(g-x)<=T?0:1;function _(E,L,C){return"A"+[E,E]+" "+[0,S,C]+" "+w(E,L)}return m?u=null===y?"M"+w(h,x)+_(h,v,0)+_(h,g,0)+"Z":"M"+w(y,x)+_(y,v,0)+_(y,g,0)+"ZM"+w(h,x)+_(h,v,1)+_(h,g,1)+"Z":null===y?(u="M"+w(h,x)+_(h,g,0),f&&(u+="L0,0Z")):u="M"+w(y,x)+"L"+w(h,x)+_(h,g,0)+"L"+w(y,g)+_(y,x,1)+"Z",u}$.exports={deg2rad:function(r){return r/180*T},rad2deg:function(r){return r/T*180},angleDelta:s,angleDist:function(r,n){return Math.abs(s(r,n))},isFullCircle:d,isAngleInsideSector:t,isPtInsideSector:function(r,n,i,a){return!!t(n,a)&&(i[0]<i[1]?(c=i[0],p=i[1]):(c=i[1],p=i[0]),r>=c&&r<=p);var c,p},pathArc:function(r,n,i,a,c){return o(null,r,n,i,a,c,0)},pathSector:function(r,n,i,a,c){return o(null,r,n,i,a,c,1)},pathAnnulus:function(r,n,i,a,c,p){return o(r,n,i,a,c,p,1)}}},73627:function($,R){"use strict";var e=Array.isArray,k=ArrayBuffer,A=DataView;function l(d){return k.isView(d)&&!(d instanceof A)}function T(d){return e(d)||l(d)}function b(d,s,t){if(T(d)){if(T(d[0])){for(var o=t,r=0;r<d.length;r++)o=s(o,d[r].length);return o}return d.length}return 0}R.isTypedArray=l,R.isArrayOrTypedArray=T,R.isArray1D=function(d){return!T(d[0])},R.ensureArray=function(d,s){return e(d)||(d=[]),d.length=s,d},R.concat=function(){var d,s,t,o,r,n,i,a,c=[],p=!0,f=0;for(t=0;t<arguments.length;t++)(n=(o=arguments[t]).length)&&(s?c.push(o):(s=o,r=n),e(o)?d=!1:(p=!1,f?d!==o.constructor&&(d=!1):d=o.constructor),f+=n);if(!f)return[];if(!c.length)return s;if(p)return s.concat.apply(s,c);if(d){for((i=new d(f)).set(s),t=0;t<c.length;t++)i.set(o=c[t],r),r+=o.length;return i}for(i=new Array(f),a=0;a<s.length;a++)i[a]=s[a];for(t=0;t<c.length;t++){for(o=c[t],a=0;a<o.length;a++)i[r+a]=o[a];r+=a}return i},R.maxRowLength=function(d){return b(d,Math.max,0)},R.minRowLength=function(d){return b(d,Math.min,1/0)}},95218:function($,R,e){"use strict";var k=e(92770),A=e(50606).BADNUM,l=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;$.exports=function(T){return"string"==typeof T&&(T=T.replace(l,"")),k(T)?Number(T):A}},33306:function($){"use strict";$.exports=function(R){var e=R._fullLayout;e._glcanvas&&e._glcanvas.size()&&e._glcanvas.each(function(k){k.regl&&k.regl.clear({color:!0,depth:!0})})}},86367:function($){"use strict";$.exports=function(R){R._responsiveChartHandler&&(window.removeEventListener("resize",R._responsiveChartHandler),delete R._responsiveChartHandler)}},96554:function($,R,e){"use strict";var k=e(92770),A=e(84267),l=e(9012),T=e(63282),b=e(7901),d=e(37822).DESELECTDIM,s=e(65487),t=e(30587).counter,o=e(64872).modHalf,r=e(73627).isArrayOrTypedArray;function n(i,a){var c=R.valObjectMeta[a.valType];if(a.arrayOk&&r(i))return!0;if(c.validateFunction)return c.validateFunction(i,a);var p={},f=p;return c.coerceFunction(i,{set:function(v){f=v}},p,a),f!==p}R.valObjectMeta={data_array:{coerceFunction:function(i,a,c){r(i)?a.set(i):void 0!==c&&a.set(c)}},enumerated:{coerceFunction:function(i,a,c,p){p.coerceNumber&&(i=+i),-1===p.values.indexOf(i)?a.set(c):a.set(i)},validateFunction:function(i,a){a.coerceNumber&&(i=+i);for(var c=a.values,p=0;p<c.length;p++){var f=String(c[p]);if("/"===f.charAt(0)&&"/"===f.charAt(f.length-1)){if(new RegExp(f.substr(1,f.length-2)).test(i))return!0}else if(i===c[p])return!0}return!1}},boolean:{coerceFunction:function(i,a,c){a.set(!0===i||!1===i?i:c)}},number:{coerceFunction:function(i,a,c,p){!k(i)||void 0!==p.min&&i<p.min||void 0!==p.max&&i>p.max?a.set(c):a.set(+i)}},integer:{coerceFunction:function(i,a,c,p){i%1||!k(i)||void 0!==p.min&&i<p.min||void 0!==p.max&&i>p.max?a.set(c):a.set(+i)}},string:{coerceFunction:function(i,a,c,p){a.set("string"!=typeof i?!0!==p.strict&&"number"==typeof i?String(i):c:p.noBlank&&!i?c:i)}},color:{coerceFunction:function(i,a,c){A(i).isValid()?a.set(i):a.set(c)}},colorlist:{coerceFunction:function(i,a,c){Array.isArray(i)&&i.length&&i.every(function(p){return A(p).isValid()})?a.set(i):a.set(c)}},colorscale:{coerceFunction:function(i,a,c){a.set(T.get(i,c))}},angle:{coerceFunction:function(i,a,c){"auto"===i?a.set("auto"):k(i)?a.set(o(+i,360)):a.set(c)}},subplotid:{coerceFunction:function(i,a,c,p){var f=p.regex||t(c);"string"==typeof i&&f.test(i)?a.set(i):a.set(c)},validateFunction:function(i,a){var c=a.dflt;return i===c||"string"==typeof i&&!!t(c).test(i)}},flaglist:{coerceFunction:function(i,a,c,p){if(-1===(p.extras||[]).indexOf(i))if("string"==typeof i){for(var f=i.split("+"),x=0;x<f.length;){var v=f[x];-1===p.flags.indexOf(v)||f.indexOf(v)<x?f.splice(x,1):x++}a.set(f.length?f.join("+"):c)}else a.set(c);else a.set(i)}},any:{coerceFunction:function(i,a,c){a.set(void 0===i?c:i)}},info_array:{coerceFunction:function(i,a,c,p){function f(P,I,U){var z;return void 0===U&&(U=I.dflt),R.valObjectMeta[I.valType].coerceFunction(P,{set:function(F){z=F}},U,I),z}var x=2===p.dimensions||"1-2"===p.dimensions&&Array.isArray(i)&&Array.isArray(i[0]);if(Array.isArray(i)){var v,g,y,m,w,u=p.items,S=[],_=Array.isArray(u),E=_&&x&&Array.isArray(u[0]),L=x&&_&&!E,C=_&&!L?u.length:i.length;if(c=Array.isArray(c)?c:[],x)for(v=0;v<C;v++)for(S[v]=[],y=Array.isArray(i[v])?i[v]:[],m=L?u.length:_?u[v].length:y.length,g=0;g<m;g++)void 0!==(w=f(y[g],L?u[g]:_?u[v][g]:u,(c[v]||[])[g]))&&(S[v][g]=w);else for(v=0;v<C;v++)void 0!==(w=f(i[v],_?u[v]:u,c[v]))&&(S[v]=w);a.set(S)}else a.set(c)},validateFunction:function(i,a){if(!Array.isArray(i))return!1;var c=a.items,p=Array.isArray(c),f=2===a.dimensions;if(!a.freeLength&&i.length!==c.length)return!1;for(var x=0;x<i.length;x++)if(f){if(!Array.isArray(i[x])||!a.freeLength&&i[x].length!==c[x].length)return!1;for(var v=0;v<i[x].length;v++)if(!n(i[x][v],p?c[x][v]:c))return!1}else if(!n(i[x],p?c[x]:c))return!1;return!0}}},R.coerce=function(i,a,c,p,f){var x=s(c,p).get(),v=s(i,p),g=s(a,p),y=v.get(),h=a._template;if(void 0===y&&h&&(y=s(h,p).get(),h=0),void 0===f&&(f=x.dflt),x.arrayOk&&r(y))return g.set(y),y;var m=R.valObjectMeta[x.valType].coerceFunction;m(y,g,f,x);var w=g.get();return h&&w===f&&!n(y,x)&&(m(y=s(h,p).get(),g,f,x),w=g.get()),w},R.coerce2=function(i,a,c,p,f){var x=s(i,p),v=R.coerce(i,a,c,p,f);return null!=x.get()&&v},R.coerceFont=function(i,a,c){var p={};return p.family=i(a+".family",(c=c||{}).family),p.size=i(a+".size",c.size),p.color=i(a+".color",c.color),p},R.coercePattern=function(i,a,c,p){if(i(a+".shape")){i(a+".solidity"),i(a+".size");var f="overlay"===i(a+".fillmode");if(!p){var x=i(a+".bgcolor",f?c:void 0);i(a+".fgcolor",f?b.contrast(x):c)}i(a+".fgopacity",f?.5:1)}},R.coerceHoverinfo=function(i,a,c){var p,f=a._module.attributes,x=f.hoverinfo?f:l,v=x.hoverinfo;if(1===c._dataLength){var g="all"===v.dflt?v.flags.slice():v.dflt.split("+");g.splice(g.indexOf("name"),1),p=g.join("+")}return R.coerce(i,a,x,"hoverinfo",p)},R.coerceSelectionMarkerOpacity=function(i,a){if(i.marker){var c,p,f=i.marker.opacity;void 0!==f&&(r(f)||i.selected||i.unselected||(c=f,p=d*f),a("selected.marker.opacity",c),a("unselected.marker.opacity",p))}},R.validate=n},41631:function($,R,e){"use strict";var k,A,l=e(84096).i$,T=e(92770),b=e(47769),d=e(64872).mod,s=e(50606),t=s.BADNUM,o=s.ONEDAY,r=s.ONEHOUR,n=s.ONEMIN,i=s.ONESEC,a=s.EPOCHJD,c=e(73972),p=e(84096).g0,f=/^\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,v=(new Date).getFullYear()-70;function g(I){return I&&c.componentsRegistry.calendars&&"string"==typeof I&&"gregorian"!==I}function y(I,U){return String(I+Math.pow(10,U)).substr(1)}R.dateTick0=function(I,U){var F,N,z=(N=!!U,g(F=I)?N?c.getComponentMethod("calendars","CANONICAL_SUNDAY")[F]:c.getComponentMethod("calendars","CANONICAL_TICK")[F]:N?"2000-01-02":"2000-01-01");if(U<2)return z;var H=R.dateTime2ms(z,I);return R.ms2DateTime(H+=o*(U-1),0,I)},R.dfltRange=function(I){return g(I)?c.getComponentMethod("calendars","DFLTRANGE")[I]:["2000-01-01","2001-01-01"]},R.isJSDate=function(I){return"object"==typeof I&&null!==I&&"function"==typeof I.getTime},R.dateTime2ms=function(I,U){if(R.isJSDate(I)){var z=I.getTimezoneOffset()*n,H=(I.getUTCMinutes()-I.getMinutes())*n+(I.getUTCSeconds()-I.getSeconds())*i+(I.getUTCMilliseconds()-I.getMilliseconds());if(H){var F=3*n;z=z-F/2+d(H-z+F/2,F)}return(I=Number(I)-z)>=k&&I<=A?I:t}if("string"!=typeof I&&"number"!=typeof I)return t;I=String(I);var N=g(U),B=I.charAt(0);!N||"G"!==B&&"g"!==B||(I=I.substr(1),U="");var j=N&&"chinese"===U.substr(0,7),J=I.match(j?x:f);if(!J)return t;var G=J[1],V=J[3]||"1",W=Number(J[5]||1),X=Number(J[7]||0),K=Number(J[9]||0),re=Number(J[11]||0);if(N){if(2===G.length)return t;var ee;G=Number(G);try{var ie=c.getComponentMethod("calendars","getCal")(U);if(j){var oe="i"===V.charAt(V.length-1);V=parseInt(V,10),ee=ie.newDate(G,ie.toMonthIndex(G,V,oe),W)}else ee=ie.newDate(G,Number(V),W)}catch{return t}return ee?(ee.toJD()-a)*o+X*r+K*n+re*i:t}G=2===G.length?(Number(G)+2e3-v)%100+v:Number(G),V-=1;var ce=new Date(Date.UTC(2e3,V,W,X,K));return ce.setUTCFullYear(G),ce.getUTCMonth()!==V||ce.getUTCDate()!==W?t:ce.getTime()+re*i},k=R.MIN_MS=R.dateTime2ms("-9999"),A=R.MAX_MS=R.dateTime2ms("9999-12-31 23:59:59.9999"),R.isDateTime=function(I,U){return R.dateTime2ms(I,U)!==t};var h=90*o,m=3*r,w=5*n;function u(I,U,z,H,F){if((U||z||H||F)&&(I+=" "+y(U,2)+":"+y(z,2),(H||F)&&(I+=":"+y(H,2),F))){for(var N=4;F%10==0;)N-=1,F/=10;I+="."+y(F,N)}return I}R.ms2DateTime=function(I,U,z){if("number"!=typeof I||!(I>=k&&I<=A))return t;U||(U=0);var H,F,N,B,j,J,G=Math.floor(10*d(I+.05,1)),V=Math.round(I-G/10);if(g(z)){var W=Math.floor(V/o)+a,X=Math.floor(d(I,o));try{H=c.getComponentMethod("calendars","getCal")(z).fromJD(W).formatDate("yyyy-mm-dd")}catch{H=p("G%Y-%m-%d")(new Date(V))}if("-"===H.charAt(0))for(;H.length<11;)H="-0"+H.substr(1);else for(;H.length<10;)H="0"+H;F=U<h?Math.floor(X/r):0,N=U<h?Math.floor(X%r/n):0,B=U<m?Math.floor(X%n/i):0,j=U<w?X%i*10+G:0}else J=new Date(V),H=p("%Y-%m-%d")(J),F=U<h?J.getUTCHours():0,N=U<h?J.getUTCMinutes():0,B=U<m?J.getUTCSeconds():0,j=U<w?10*J.getUTCMilliseconds()+G:0;return u(H,F,N,B,j)},R.ms2DateTimeLocal=function(I){if(!(I>=k+o&&I<=A-o))return t;var U=Math.floor(10*d(I+.05,1)),z=new Date(Math.round(I-U/10));return u(l("%Y-%m-%d")(z),z.getHours(),z.getMinutes(),z.getSeconds(),10*z.getUTCMilliseconds()+U)},R.cleanDate=function(I,U,z){if(I===t)return U;if(R.isJSDate(I)||"number"==typeof I&&isFinite(I)){if(g(z))return b.error("JS Dates and milliseconds are incompatible with world calendars",I),U;if(!(I=R.ms2DateTimeLocal(+I))&&void 0!==U)return U}else if(!R.isDateTime(I,z))return b.error("unrecognized date",I),U;return I};var S=/%\d?f/g,_=/%h/g,E={1:"1",2:"1",3:"2",4:"2"};function L(I,U,z,H){I=I.replace(S,function(N){var B=Math.min(+N.charAt(1)||6,6);return(U/1e3%1+2).toFixed(B).substr(2).replace(/0+$/,"")||"0"});var F=new Date(Math.floor(U+.05));if(I=I.replace(_,function(){return E[z("%q")(F)]}),g(H))try{I=c.getComponentMethod("calendars","worldCalFmt")(I,U,H)}catch{return"Invalid"}return z(I)(F)}var C=[59,59.9,59.99,59.999,59.9999];R.formatDate=function(I,U,z,H,F,N){if(F=g(F)&&F,!U)if("y"===z)U=N.year;else if("m"===z)U=N.month;else{if("d"!==z)return function(B,j){var J=d(B+.05,o),G=y(Math.floor(J/r),2)+":"+y(d(Math.floor(J/n),60),2);if("M"!==j){T(j)||(j=0);var V=(100+Math.min(d(B/i,60),C[j])).toFixed(j).substr(1);j>0&&(V=V.replace(/0+$/,"").replace(/[\.]$/,"")),G+=":"+V}return G}(I,z)+"\n"+L(N.dayMonthYear,I,H,F);U=N.dayMonth+"\n"+N.year}return L(U,I,H,F)};var P=3*o;R.incrementMonth=function(I,U,z){z=g(z)&&z;var H=d(I,o);if(I=Math.round(I-H),z)try{var F=Math.round(I/o)+a,N=c.getComponentMethod("calendars","getCal")(z),B=N.fromJD(F);return U%12?N.add(B,U,"m"):N.add(B,U/12,"y"),(B.toJD()-a)*o+H}catch{b.error("invalid ms "+I+" in calendar "+z)}var j=new Date(I+P);return j.setUTCMonth(j.getUTCMonth()+U)+H-P},R.findExactDates=function(I,U){for(var z,H,F=0,N=0,B=0,j=0,J=g(U)&&c.getComponentMethod("calendars","getCal")(U),G=0;G<I.length;G++)if(T(H=I[G])){if(!(H%o))if(J)try{1===(z=J.fromJD(H/o+a)).day()?1===z.month()?F++:N++:B++}catch{}else 1===(z=new Date(H)).getUTCDate()?0===z.getUTCMonth()?F++:N++:B++}else j++;B+=N+=F;var V=I.length-j;return{exactYears:F/V,exactMonths:N/V,exactDays:B/V}}},24401:function($,R,e){"use strict";var k=e(39898),A=e(47769),l=e(35657),T=e(79576);function b(r){var n=r&&r.parentNode;n&&n.removeChild(r)}function d(r,n,i){var a="plotly.js-style-"+r,c=document.getElementById(a);c||((c=document.createElement("style")).setAttribute("id",a),c.appendChild(document.createTextNode("")),document.head.appendChild(c));var p=c.sheet;p.insertRule?p.insertRule(n+"{"+i+"}",0):p.addRule?p.addRule(n,i,0):A.warn("addStyleRule failed")}function s(r){var n=window.getComputedStyle(r,null),i=n.getPropertyValue("-webkit-transform")||n.getPropertyValue("-moz-transform")||n.getPropertyValue("-ms-transform")||n.getPropertyValue("-o-transform")||n.getPropertyValue("transform");return"none"===i?null:i.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(a){return+a})}function t(r){for(var n=[];o(r);)n.push(r),r=r.parentNode;return n}function o(r){return r&&(r instanceof Element||r instanceof HTMLElement)}$.exports={getGraphDiv:function(r){var n;if("string"==typeof r){if(null===(n=document.getElementById(r)))throw new Error("No DOM element with id '"+r+"' exists on the page.");return n}if(null==r)throw new Error("DOM element provided is null or undefined");return r},isPlotDiv:function(r){var n=k.select(r);return n.node()instanceof HTMLElement&&n.size()&&n.classed("js-plotly-plot")},removeElement:b,addStyleRule:function(r,n){d("global",r,n)},addRelatedStyleRule:d,deleteRelatedStyleRule:function(r){var i=document.getElementById("plotly.js-style-"+r);i&&b(i)},getFullTransformMatrix:function(r){var n=t(r),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return n.forEach(function(a){var c=s(a);if(c){var p=l.convertCssMatrix(c);i=T.multiply(i,i,p)}}),i},getElementTransformMatrix:s,getElementAndAncestors:t,equalDomRects:function(r,n){return r&&n&&r.x===n.x&&r.y===n.y&&r.top===n.top&&r.left===n.left&&r.right===n.right&&r.bottom===n.bottom}}},11086:function($,R,e){"use strict";var k=e(15398).EventEmitter;$.exports={init:function(l){if(l._ev instanceof k)return l;var T=new k,b=new k;return l._ev=T,l._internalEv=b,l.on=T.on.bind(T),l.once=T.once.bind(T),l.removeListener=T.removeListener.bind(T),l.removeAllListeners=T.removeAllListeners.bind(T),l._internalOn=b.on.bind(b),l._internalOnce=b.once.bind(b),l._removeInternalListener=b.removeListener.bind(b),l._removeAllInternalListeners=b.removeAllListeners.bind(b),l.emit=function(d,s){typeof jQuery<"u"&&jQuery(l).trigger(d,s),T.emit(d,s),b.emit(d,s)},l},triggerHandler:function(l,T,b){var d,s;typeof jQuery<"u"&&(d=jQuery(l).triggerHandler(T,b));var t=l._ev;if(!t)return d;var o,r=t._events[T];if(!r)return d;function n(i){return i.listener?(t.removeListener(T,i.listener),i.fired?void 0:(i.fired=!0,i.listener.apply(t,[b]))):i.apply(t,[b])}for(r=Array.isArray(r)?r:[r],o=0;o<r.length-1;o++)n(r[o]);return s=n(r[o]),void 0!==d?d:s},purge:function(l){return delete l._ev,delete l.on,delete l.once,delete l.removeListener,delete l.removeAllListeners,delete l.emit,delete l._ev,delete l._internalEv,delete l._internalOn,delete l._internalOnce,delete l._removeInternalListener,delete l._removeAllInternalListeners,l}}},1426:function($,R,e){"use strict";var k=e(41965),A=Array.isArray;function l(T,b,d,s){var t,o,r,n,i,a,p=T[0],f=T.length;if(2===f&&A(p)&&A(T[1])&&0===p.length){if(function(v,g){var y,h;for(y=0;y<v.length;y++){if(null!==(h=v[y])&&"object"==typeof h)return!1;void 0!==h&&(g[y]=h)}return!0}(T[1],p))return p;p.splice(0,p.length)}for(var x=1;x<f;x++)for(o in t=T[x])r=p[o],n=t[o],s&&A(n)?p[o]=n:b&&n&&(k(n)||(i=A(n)))?(i?(i=!1,a=r&&A(r)?r:[]):a=r&&k(r)?r:{},p[o]=l([a,n],b,d,s)):(void 0!==n||d)&&(p[o]=n);return p}R.extendFlat=function(){return l(arguments,!1,!1,!1)},R.extendDeep=function(){return l(arguments,!0,!1,!1)},R.extendDeepAll=function(){return l(arguments,!0,!0,!1)},R.extendDeepNoArrays=function(){return l(arguments,!0,!1,!0)}},75744:function($){"use strict";$.exports=function(R){for(var e={},k=[],A=0,l=0;l<R.length;l++){var T=R[l];1!==e[T]&&(e[T]=1,k[A++]=T)}return k}},76756:function($){"use strict";function R(k){return!0===k.visible}function e(k){var A=k[0].trace;return!0===A.visible&&0!==A._length}$.exports=function(k){for(var A,l=(A=k,Array.isArray(A)&&Array.isArray(A[0])&&A[0][0]&&A[0][0].trace?e:R),T=[],b=0;b<k.length;b++){var d=k[b];l(d)&&T.push(d)}return T}},41327:function($,R,e){"use strict";var k=e(39898),A=e(24138),l=e(30774),T=e(29261),b=e(85268),d=e(23389),s=e(47769),t=e(41965),o=e(65487),r=e(61082),n=Object.keys(A),i={"ISO-3":d,"USA-states":d,"country names":function(c){for(var p=0;p<n.length;p++){var f=n[p];if(new RegExp(A[f]).test(c.trim().toLowerCase()))return f}return s.log("Unrecognized country name: "+c+"."),!1}};function a(c){var p=c.geojson,f=window.PlotlyGeoAssets||{},x="string"==typeof p?f[p]:p;return t(x)?x:(s.error("Oops ... something went wrong when fetching "+p),!1)}$.exports={locationToFeature:function(c,p,f){if(!p||"string"!=typeof p)return!1;var x,v,g,y=i[c](p);if(y){if("USA-states"===c)for(x=[],g=0;g<f.length;g++)(v=f[g]).properties&&v.properties.gu&&"USA"===v.properties.gu&&x.push(v);else x=f;for(g=0;g<x.length;g++)if((v=x[g]).id===y)return v;s.log(["Location with id",y,"does not have a matching topojson feature at this resolution."].join(" "))}return!1},feature2polygons:function(c){var p,f,x,v,g=c.geometry,y=g.coordinates,h=c.id,m=[];function w(u){for(var S=0;S<u.length-1;S++)if(u[S][0]>0&&u[S+1][0]<0)return S;return null}switch(p="RUS"===h||"FJI"===h?function(u){var S;if(null===w(u))S=u;else for(S=new Array(u.length),v=0;v<u.length;v++)S[v]=[u[v][0]<0?u[v][0]+360:u[v][0],u[v][1]];m.push(r.tester(S))}:"ATA"===h?function(u){var S=w(u);if(null===S)return m.push(r.tester(u));var _=new Array(u.length+1),E=0;for(v=0;v<u.length;v++)v>S?_[E++]=[u[v][0]+360,u[v][1]]:v===S?(_[E++]=u[v],_[E++]=[u[v][0],-90]):_[E++]=u[v];var L=r.tester(_);L.pts.pop(),m.push(L)}:function(u){m.push(r.tester(u))},g.type){case"MultiPolygon":for(f=0;f<y.length;f++)for(x=0;x<y[f].length;x++)p(y[f][x]);break;case"Polygon":for(f=0;f<y.length;f++)p(y[f])}return m},getTraceGeojson:a,extractTraceFeature:function(c){var p=c[0].trace,f=a(p);if(!f)return!1;var x,v={},g=[];for(x=0;x<p._length;x++){var y=c[x];(y.loc||0===y.loc)&&(v[y.loc]=y)}function h(u){var S=o(u,p.featureidkey||"id").get(),_=v[S];if(_){var E=u.geometry;if("Polygon"===E.type||"MultiPolygon"===E.type){var L={type:"Feature",id:S,geometry:E,properties:{}};L.properties.ct=function(C){var P,I=C.geometry;if("MultiPolygon"===I.type)for(var U=I.coordinates,z=0,H=0;H<U.length;H++){var F={type:"Polygon",coordinates:U[H]},N=l.default(F);N>z&&(z=N,P=F)}else P=I;return T.default(P).geometry.coordinates}(L),_.fIn=u,_.fOut=L,g.push(L)}else s.log(["Location",_.loc,"does not have a valid GeoJSON geometry.","Traces with locationmode *geojson-id* only support","*Polygon* and *MultiPolygon* geometries."].join(" "))}delete v[S]}switch(f.type){case"FeatureCollection":var m=f.features;for(x=0;x<m.length;x++)h(m[x]);break;case"Feature":h(f);break;default:return s.warn(["Invalid GeoJSON type",(f.type||"none")+".","Traces with locationmode *geojson-id* only support","*FeatureCollection* and *Feature* types."].join(" ")),!1}for(var w in v)s.log(["Location *"+w+"*","does not have a matching feature with id-key","*"+p.featureidkey+"*."].join(" "));return g},fetchTraceGeoData:function(c){var p=window.PlotlyGeoAssets||{},f=[];function x(h){return new Promise(function(m,w){k.json(h,function(u,S){return u?(delete p[h],w(new Error(404===u.status?'GeoJSON at URL "'+h+'" does not exist.':"Unexpected error while fetching from "+h))):(p[h]=S,m(S))})})}function v(h){return new Promise(function(m,w){var u=0,S=setInterval(function(){return p[h]&&"pending"!==p[h]?(clearInterval(S),m(p[h])):u>100?(clearInterval(S),w("Unexpected error while fetching from "+h)):void u++},50)})}for(var g=0;g<c.length;g++){var y=c[g][0].trace.geojson;"string"==typeof y&&(p[y]?"pending"===p[y]&&f.push(v(y)):(p[y]="pending",f.push(x(y))))}return f},computeBbox:function(c){return b.default(c)}}},18214:function($,R,e){"use strict";var k=e(50606).BADNUM;R.calcTraceToLineCoords=function(A){for(var l=A[0].trace.connectgaps,T=[],b=[],d=0;d<A.length;d++){var s=A[d].lonlat;s[0]!==k?b.push(s):!l&&b.length>0&&(T.push(b),b=[])}return b.length>0&&T.push(b),T},R.makeLine=function(A){return 1===A.length?{type:"LineString",coordinates:A[0]}:{type:"MultiLineString",coordinates:A}},R.makePolygon=function(A){if(1===A.length)return{type:"Polygon",coordinates:A};for(var l=new Array(A.length),T=0;T<A.length;T++)l[T]=[A[T]];return{type:"MultiPolygon",coordinates:l}},R.makeBlank=function(){return{type:"Point",coordinates:[]}}},87642:function($,R,e){"use strict";var k,A,l,T=e(64872).mod;function b(s,t,o,r,n,i,a,c){var p=o-s,f=n-s,x=a-n,v=r-t,g=i-t,y=c-i,h=p*y-x*v;if(0===h)return null;var m=(f*y-x*g)/h,w=(f*v-p*g)/h;return w<0||w>1||m<0||m>1?null:{x:s+p*m,y:t+v*m}}function d(s,t,o,r,n){var i=r*s+n*t;if(i<0)return r*r+n*n;if(i>o){var a=r-s,c=n-t;return a*a+c*c}var p=r*t-n*s;return p*p/o}R.segmentsIntersect=b,R.segmentDistance=function(s,t,o,r,n,i,a,c){if(b(s,t,o,r,n,i,a,c))return 0;var p=o-s,f=r-t,x=a-n,v=c-i,g=p*p+f*f,y=x*x+v*v,h=Math.min(d(p,f,g,n-s,i-t),d(p,f,g,a-s,c-t),d(x,v,y,s-n,t-i),d(x,v,y,o-n,r-i));return Math.sqrt(h)},R.getTextLocation=function(s,t,o,r){if(s===A&&r===l||(k={},A=s,l=r),k[o])return k[o];var n=s.getPointAtLength(T(o-r/2,t)),i=s.getPointAtLength(T(o+r/2,t)),a=Math.atan((i.y-n.y)/(i.x-n.x)),c=s.getPointAtLength(T(o,t)),p={x:(4*c.x+n.x+i.x)/6,y:(4*c.y+n.y+i.y)/6,theta:a};return k[o]=p,p},R.clearLocationCache=function(){A=null},R.getVisibleSegment=function(s,t,o){var r,n,i=t.left,a=t.right,c=t.top,p=t.bottom,f=0,x=s.getTotalLength(),v=x;function g(h){var m=s.getPointAtLength(h);0===h?r=m:h===x&&(n=m);var w=m.x<i?i-m.x:m.x>a?m.x-a:0,u=m.y<c?c-m.y:m.y>p?m.y-p:0;return Math.sqrt(w*w+u*u)}for(var y=g(f);y;){if((f+=y+o)>v)return;y=g(f)}for(y=g(v);y;){if(f>(v-=y+o))return;y=g(v)}return{min:f,max:v,len:v-f,total:x,isClosed:0===f&&v===x&&Math.abs(r.x-n.x)<.1&&Math.abs(r.y-n.y)<.1}},R.findPointOnPath=function(s,t,o,r){for(var n,i,a,c=(r=r||{}).pathLength||s.getTotalLength(),p=r.tolerance||.001,f=r.iterationLimit||30,x=s.getPointAtLength(0)[o]>s.getPointAtLength(c)[o]?-1:1,v=0,g=0,y=c;v<f;){if(a=(i=s.getPointAtLength(n=(g+y)/2))[o]-t,Math.abs(a)<p)return i;x*a>0?y=n:g=n,v++}return i}},81697:function($,R,e){"use strict";var k=e(92770),A=e(84267),l=e(25075),T=e(21081),b=e(22399).defaultLine,d=e(73627).isArrayOrTypedArray,s=l(b);function t(n,i){var a=n;return a[3]*=i,a}function o(n){if(k(n))return s;var i=l(n);return i.length?i:s}function r(n){return k(n)?n:1}$.exports={formatColor:function(n,i,a){var c,p,f,x,v,g=n.color,y=d(g),h=d(i),m=T.extractOpts(n),w=[];if(c=void 0!==m.colorscale?T.makeColorScaleFuncFromTrace(n):o,p=y?function(S,_){return void 0===S[_]?s:l(c(S[_]))}:o,f=h?function(S,_){return void 0===S[_]?1:r(S[_])}:r,y||h)for(var u=0;u<a;u++)x=p(g,u),v=f(i,u),w[u]=t(x,v);else w=t(l(g),i);return w},parseColorScale:function(n){var i=T.extractOpts(n),a=i.colorscale;return i.reversescale&&(a=T.flipScale(i.colorscale)),a.map(function(c){var p=c[0],f=A(c[1]).toRgb();return{index:p,rgb:[f.r,f.g,f.b,f.a]}})}}},28984:function($,R,e){"use strict";var k=e(23389);function A(l){return[l]}$.exports={keyFun:function(l){return l.key},repeat:A,descend:k,wrap:A,unwrap:function(l){return l[0]}}},23389:function($){"use strict";$.exports=function(R){return R}},39240:function($){"use strict";$.exports=function(R,e){if(!e)return R;var k=1/Math.abs(e),A=k>1?(k*R+k*e)/k:R+e,l=String(A).length;if(l>16){var T=String(e).length;if(l>=String(R).length+T){var b=parseFloat(A).toPrecision(12);-1===b.indexOf("e+")&&(A=+b)}}return A}},71828:function($,R,e){"use strict";var k=e(39898),A=e(84096).g0,l=e(60721).WU,T=e(92770),b=e(50606),d=b.FP_SAFE,s=-d,t=b.BADNUM,o=$.exports={};o.adjustFormat=function(G){return!G||/^\d[.]\df/.test(G)||/[.]\d%/.test(G)?G:"0.f"===G?"~f":/^\d%/.test(G)?"~%":/^\ds/.test(G)?"~s":!/^[~,.0$]/.test(G)&&/[&fps]/.test(G)?"~"+G:G};var r={};o.warnBadFormat=function(G){var V=String(G);r[V]||(r[V]=1,o.warn('encountered bad format: "'+V+'"'))},o.noFormat=function(G){return String(G)},o.numberFormat=function(G){var V;try{V=l(o.adjustFormat(G))}catch{return o.warnBadFormat(G),o.noFormat}return V},o.nestedProperty=e(65487),o.keyedContainer=e(66636),o.relativeAttr=e(6962),o.isPlainObject=e(41965),o.toLogRange=e(58163),o.relinkPrivateKeys=e(51332);var n=e(73627);o.isTypedArray=n.isTypedArray,o.isArrayOrTypedArray=n.isArrayOrTypedArray,o.isArray1D=n.isArray1D,o.ensureArray=n.ensureArray,o.concat=n.concat,o.maxRowLength=n.maxRowLength,o.minRowLength=n.minRowLength;var i=e(64872);o.mod=i.mod,o.modHalf=i.modHalf;var a=e(96554);o.valObjectMeta=a.valObjectMeta,o.coerce=a.coerce,o.coerce2=a.coerce2,o.coerceFont=a.coerceFont,o.coercePattern=a.coercePattern,o.coerceHoverinfo=a.coerceHoverinfo,o.coerceSelectionMarkerOpacity=a.coerceSelectionMarkerOpacity,o.validate=a.validate;var c=e(41631);o.dateTime2ms=c.dateTime2ms,o.isDateTime=c.isDateTime,o.ms2DateTime=c.ms2DateTime,o.ms2DateTimeLocal=c.ms2DateTimeLocal,o.cleanDate=c.cleanDate,o.isJSDate=c.isJSDate,o.formatDate=c.formatDate,o.incrementMonth=c.incrementMonth,o.dateTick0=c.dateTick0,o.dfltRange=c.dfltRange,o.findExactDates=c.findExactDates,o.MIN_MS=c.MIN_MS,o.MAX_MS=c.MAX_MS;var p=e(65888);o.findBin=p.findBin,o.sorterAsc=p.sorterAsc,o.sorterDes=p.sorterDes,o.distinctVals=p.distinctVals,o.roundUp=p.roundUp,o.sort=p.sort,o.findIndexOfMin=p.findIndexOfMin,o.sortObjectKeys=e(78607);var f=e(80038);o.aggNums=f.aggNums,o.len=f.len,o.mean=f.mean,o.median=f.median,o.midRange=f.midRange,o.variance=f.variance,o.stdev=f.stdev,o.interp=f.interp;var x=e(35657);o.init2dArray=x.init2dArray,o.transposeRagged=x.transposeRagged,o.dot=x.dot,o.translationMatrix=x.translationMatrix,o.rotationMatrix=x.rotationMatrix,o.rotationXYMatrix=x.rotationXYMatrix,o.apply3DTransform=x.apply3DTransform,o.apply2DTransform=x.apply2DTransform,o.apply2DTransform2=x.apply2DTransform2,o.convertCssMatrix=x.convertCssMatrix,o.inverseTransformMatrix=x.inverseTransformMatrix;var v=e(26348);o.deg2rad=v.deg2rad,o.rad2deg=v.rad2deg,o.angleDelta=v.angleDelta,o.angleDist=v.angleDist,o.isFullCircle=v.isFullCircle,o.isAngleInsideSector=v.isAngleInsideSector,o.isPtInsideSector=v.isPtInsideSector,o.pathArc=v.pathArc,o.pathSector=v.pathSector,o.pathAnnulus=v.pathAnnulus;var g=e(99863);o.isLeftAnchor=g.isLeftAnchor,o.isCenterAnchor=g.isCenterAnchor,o.isRightAnchor=g.isRightAnchor,o.isTopAnchor=g.isTopAnchor,o.isMiddleAnchor=g.isMiddleAnchor,o.isBottomAnchor=g.isBottomAnchor;var y=e(87642);o.segmentsIntersect=y.segmentsIntersect,o.segmentDistance=y.segmentDistance,o.getTextLocation=y.getTextLocation,o.clearLocationCache=y.clearLocationCache,o.getVisibleSegment=y.getVisibleSegment,o.findPointOnPath=y.findPointOnPath;var h=e(1426);o.extendFlat=h.extendFlat,o.extendDeep=h.extendDeep,o.extendDeepAll=h.extendDeepAll,o.extendDeepNoArrays=h.extendDeepNoArrays;var m=e(47769);o.log=m.log,o.warn=m.warn,o.error=m.error;var w=e(30587);o.counterRegex=w.counter;var u=e(79990);o.throttle=u.throttle,o.throttleDone=u.done,o.clearThrottle=u.clear;var S=e(24401);function _(G){var V={};for(var W in G)for(var X=G[W],K=0;K<X.length;K++)V[X[K]]=+W;return V}o.getGraphDiv=S.getGraphDiv,o.isPlotDiv=S.isPlotDiv,o.removeElement=S.removeElement,o.addStyleRule=S.addStyleRule,o.addRelatedStyleRule=S.addRelatedStyleRule,o.deleteRelatedStyleRule=S.deleteRelatedStyleRule,o.getFullTransformMatrix=S.getFullTransformMatrix,o.getElementTransformMatrix=S.getElementTransformMatrix,o.getElementAndAncestors=S.getElementAndAncestors,o.equalDomRects=S.equalDomRects,o.clearResponsive=e(86367),o.preserveDrawingBuffer=e(45142),o.makeTraceGroups=e(77310),o._=e(15867),o.notifier=e(75046),o.filterUnique=e(75744),o.filterVisible=e(76756),o.pushUnique=e(75138),o.increment=e(39240),o.cleanNumber=e(95218),o.ensureNumber=function(G){return T(G)?(G=Number(G))>d||G<s?t:G:t},o.isIndex=function(G,V){return!(void 0!==V&&G>=V)&&T(G)&&G>=0&&G%1==0},o.noop=e(64213),o.identity=e(23389),o.repeat=function(G,V){for(var W=new Array(V),X=0;X<V;X++)W[X]=G;return W},o.swapAttrs=function(G,V,W,X){W||(W="x"),X||(X="y");for(var K=0;K<V.length;K++){var re=V[K],ee=o.nestedProperty(G,re.replace("?",W)),ie=o.nestedProperty(G,re.replace("?",X)),oe=ee.get();ee.set(ie.get()),ie.set(oe)}},o.raiseToTop=function(G){G.parentNode.appendChild(G)},o.cancelTransition=function(G){return G.transition().duration(0)},o.constrain=function(G,V,W){return V>W?Math.max(W,Math.min(V,G)):Math.max(V,Math.min(W,G))},o.bBoxIntersect=function(G,V,W){return G.left<=V.right+(W=W||0)&&V.left<=G.right+W&&G.top<=V.bottom+W&&V.top<=G.bottom+W},o.simpleMap=function(G,V,W,X,K){for(var re=G.length,ee=new Array(re),ie=0;ie<re;ie++)ee[ie]=V(G[ie],W,X,K);return ee},o.randstr=function G(V,W,X,K){if(X||(X=16),void 0===W&&(W=24),W<=0)return"0";var re,ee,ie=Math.log(Math.pow(2,W))/Math.log(X),oe="";for(re=2;ie===1/0;re*=2)ie=Math.log(Math.pow(2,W/re))/Math.log(X)*re;var ce=ie-Math.floor(ie);for(re=0;re<Math.floor(ie);re++)oe=Math.floor(Math.random()*X).toString(X)+oe;ce&&(ee=Math.pow(X,ce),oe=Math.floor(Math.random()*ee).toString(X)+oe);var me=parseInt(oe,X);return V&&V[oe]||me!==1/0&&me>=Math.pow(2,W)?K>10?(o.warn("randstr failed uniqueness"),oe):G(V,W,X,(K||0)+1):oe},o.OptionControl=function(G,V){G||(G={}),V||(V="opt");var W={optionList:[],_newoption:function(X){X[V]=G,W[X.name]=X,W.optionList.push(X)}};return W["_"+V]=G,W},o.smooth=function(G,V){if((V=Math.round(V)||0)<2)return G;var W,X,K,re,ee=G.length,ie=2*ee,oe=2*V-1,ce=new Array(oe),me=new Array(ee);for(W=0;W<oe;W++)ce[W]=(1-Math.cos(Math.PI*(W+1)/V))/(2*V);for(W=0;W<ee;W++){for(re=0,X=0;X<oe;X++)(K=W+X+1-V)<-ee?K-=ie*Math.round(K/ie):K>=ie&&(K-=ie*Math.floor(K/ie)),K<0?K=-1-K:K>=ee&&(K=ie-1-K),re+=G[K]*ce[X];me[W]=re}return me},o.syncOrAsync=function(G,V,W){var X;function K(){return o.syncOrAsync(G,V,W)}for(;G.length;)if((X=(0,G.splice(0,1)[0])(V))&&X.then)return X.then(K);return W&&W(V)},o.stripTrailingSlash=function(G){return"/"===G.substr(-1)?G.substr(0,G.length-1):G},o.noneOrAll=function(G,V,W){if(G){var X,K=!1,re=!0;for(X=0;X<W.length;X++)null!=G[W[X]]?K=!0:re=!1;if(K&&!re)for(X=0;X<W.length;X++)G[W[X]]=V[W[X]]}},o.mergeArray=function(G,V,W,X){var K="function"==typeof X;if(o.isArrayOrTypedArray(G))for(var re=Math.min(G.length,V.length),ee=0;ee<re;ee++){var ie=G[ee];V[ee][W]=K?X(ie):ie}},o.mergeArrayCastPositive=function(G,V,W){return o.mergeArray(G,V,W,function(X){var K=+X;return isFinite(K)&&K>0?K:0})},o.fillArray=function(G,V,W,X){if(X=X||o.identity,o.isArrayOrTypedArray(G))for(var K=0;K<V.length;K++)V[K][W]=X(G[K])},o.castOption=function(G,V,W,X){X=X||o.identity;var K=o.nestedProperty(G,W).get();return o.isArrayOrTypedArray(K)?Array.isArray(V)&&o.isArrayOrTypedArray(K[V[0]])?X(K[V[0]][V[1]]):X(K[V]):K},o.extractOption=function(G,V,W,X){if(W in G)return G[W];var K=o.nestedProperty(V,X).get();return Array.isArray(K)?void 0:K},o.tagSelected=function(G,V,W){var X,K,re=V.selectedpoints,ee=V._indexToPoints;ee&&(X=_(ee));for(var ie=0;ie<re.length;ie++){var oe=re[ie];if(o.isIndex(oe)||o.isArrayOrTypedArray(oe)&&o.isIndex(oe[0])&&o.isIndex(oe[1])){var ce=X?X[oe]:oe,me=W?W[ce]:ce;void 0!==(K=me)&&K<G.length&&(G[me].selected=1)}}},o.selIndices2selPoints=function(G){var V=G.selectedpoints,W=G._indexToPoints;if(W){for(var X=_(W),K=[],re=0;re<V.length;re++){var ee=V[re];if(o.isIndex(ee)){var ie=X[ee];o.isIndex(ie)&&K.push(ie)}}return K}return V},o.getTargetArray=function(G,V){var W=V.target;if("string"==typeof W&&W){var X=o.nestedProperty(G,W).get();return!!Array.isArray(X)&&X}return!!Array.isArray(W)&&W},o.minExtend=function(G,V){var W={};"object"!=typeof V&&(V={});var X,K,re,ee=Object.keys(G);for(X=0;X<ee.length;X++)re=G[K=ee[X]],"_"!==K.charAt(0)&&"function"!=typeof re&&(W[K]="module"===K?re:Array.isArray(re)?"colorscale"===K?re.slice():re.slice(0,3):o.isTypedArray(re)?re.subarray(0,3):re&&"object"==typeof re?o.minExtend(G[K],V[K]):re);for(ee=Object.keys(V),X=0;X<ee.length;X++)"object"==typeof(re=V[K=ee[X]])&&K in W&&"object"==typeof W[K]||(W[K]=re);return W},o.titleCase=function(G){return G.charAt(0).toUpperCase()+G.substr(1)},o.containsAny=function(G,V){for(var W=0;W<V.length;W++)if(-1!==G.indexOf(V[W]))return!0;return!1},o.isIE=function(){return void 0!==window.navigator.msSaveBlob};var E=/Version\/[\d\.]+.*Safari/;o.isSafari=function(){return E.test(window.navigator.userAgent)};var L=/iPad|iPhone|iPod/;o.isIOS=function(){return L.test(window.navigator.userAgent)};var C=/Firefox\/(\d+)\.\d+/;o.getFirefoxVersion=function(){var G=C.exec(window.navigator.userAgent);if(G&&2===G.length){var V=parseInt(G[1]);if(!isNaN(V))return V}return null},o.isD3Selection=function(G){return G instanceof k.selection},o.ensureSingle=function(G,V,W,X){var K=G.select(V+(W?"."+W:""));if(K.size())return K;var re=G.append(V);return W&&re.classed(W,!0),X&&re.call(X),re},o.ensureSingleById=function(G,V,W,X){var K=G.select(V+"#"+W);if(K.size())return K;var re=G.append(V).attr("id",W);return X&&re.call(X),re},o.objectFromPath=function(G,V){for(var W,X=G.split("."),K=W={},re=0;re<X.length;re++){var ee=X[re],ie=null,oe=X[re].match(/(.*)\[([0-9]+)\]/);oe?(ie=oe[2],(W=W[ee=oe[1]]=[])[ie]=re===X.length-1?V:{},W=W[ie]):(W[ee]=re===X.length-1?V:{},W=W[ee])}return K};var P=/^([^\[\.]+)\.(.+)?/,I=/^([^\.]+)\[([0-9]+)\](\.)?(.+)?/;o.expandObjectPaths=function(G){var V,W,X,K,re,ee,ie;if("object"==typeof G&&!Array.isArray(G))for(W in G)G.hasOwnProperty(W)&&((V=W.match(P))?(K=G[W],X=V[1],delete G[W],G[X]=o.extendDeepNoArrays(G[X]||{},o.objectFromPath(W,o.expandObjectPaths(K))[X])):(V=W.match(I))?(K=G[W],X=V[1],re=parseInt(V[2]),delete G[W],G[X]=G[X]||[],"."===V[3]?(ie=V[4],ee=G[X][re]=G[X][re]||{},o.extendDeepNoArrays(ee,o.objectFromPath(ie,o.expandObjectPaths(K)))):G[X][re]=o.expandObjectPaths(K)):G[W]=o.expandObjectPaths(G[W]));return G},o.numSeparate=function(G,V,W){if(W||(W=!1),"string"!=typeof V||0===V.length)throw new Error("Separator string required for formatting!");"number"==typeof G&&(G=String(G));var X=/(\d+)(\d{3})/,K=V.charAt(0),re=V.charAt(1),ee=G.split("."),ie=ee[0],oe=ee.length>1?K+ee[1]:"";if(re&&(ee.length>1||ie.length>4||W))for(;X.test(ie);)ie=ie.replace(X,"$1"+re+"$2");return ie+oe},o.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var U=/^\w*$/;o.templateString=function(G,V){var W={};return G.replace(o.TEMPLATE_STRING_REGEX,function(X,K){var re;return U.test(K)?re=V[K]:(W[K]=W[K]||o.nestedProperty(V,K).get,re=W[K]()),o.isValidTextValue(re)?re:""})};var z={max:10,count:0,name:"hovertemplate"};o.hovertemplateString=function(){return N.apply(z,arguments)};var H={max:10,count:0,name:"texttemplate"};o.texttemplateString=function(){return N.apply(H,arguments)};var F=/^[:|\|]/;function N(G,V,W){var X=this,K=arguments;V||(V={});var re={};return G.replace(o.TEMPLATE_STRING_REGEX,function(ee,ie,oe){var ce,me,de,he="_xother"===ie||"_yother"===ie,ve="_xother_"===ie||"_yother_"===ie,Pe="xother_"===ie||"yother_"===ie,xe="xother"===ie||"yother"===ie||he||Pe||ve,ke=ie;if((he||ve)&&(ke=ke.substring(1)),(Pe||ve)&&(ke=ke.substring(0,ke.length-1)),xe){if(void 0===(ce=V[ke]))return""}else for(de=3;de<K.length;de++)if(me=K[de]){if(me.hasOwnProperty(ke)){ce=me[ke];break}if(U.test(ke)||(ce=o.nestedProperty(me,ke).get(),(ce=re[ke]||o.nestedProperty(me,ke).get())&&(re[ke]=ce)),void 0!==ce)break}if(void 0===ce&&X)return X.count<X.max&&(o.warn("Variable '"+ke+"' in "+X.name+" could not be found!"),ce=ee),X.count===X.max&&o.warn("Too many "+X.name+" warnings - additional warnings will be suppressed"),X.count++,ee;if(oe){var Ae;if(":"===oe[0]&&(ce=(Ae=W?W.numberFormat:o.numberFormat)(oe.replace(F,""))(ce)),"|"===oe[0]){Ae=W?W.timeFormat:A;var Te=o.dateTime2ms(ce);ce=o.formatDate(Te,oe.replace(F,""),!1,Ae)}}else{var Q=ke+"Label";V.hasOwnProperty(Q)&&(ce=V[Q])}return xe&&(ce="("+ce+")",(he||ve)&&(ce=" "+ce),(Pe||ve)&&(ce+=" ")),ce})}o.subplotSort=function(G,V){for(var W=Math.min(G.length,V.length)+1,X=0,K=0,re=0;re<W;re++){var ee=G.charCodeAt(re)||0,ie=V.charCodeAt(re)||0,oe=ee>=48&&ee<=57,ce=ie>=48&&ie<=57;if(oe&&(X=10*X+ee-48),ce&&(K=10*K+ie-48),!oe||!ce){if(X!==K)return X-K;if(ee!==ie)return ee-ie}}return K-X};var B=2e9;o.seedPseudoRandom=function(){B=2e9},o.pseudoRandom=function(){var G=B;return B=(69069*B+1)%4294967296,Math.abs(B-G)<429496729?o.pseudoRandom():B/4294967296},o.fillText=function(G,V,W){var X=Array.isArray(W)?function(ee){W.push(ee)}:function(ee){W.text=ee},K=o.extractOption(G,V,"htx","hovertext");if(o.isValidTextValue(K))return X(K);var re=o.extractOption(G,V,"tx","text");return o.isValidTextValue(re)?X(re):void 0},o.isValidTextValue=function(G){return G||0===G},o.formatPercent=function(G,V){V=V||0;for(var W=(Math.round(100*G*Math.pow(10,V))*Math.pow(.1,V)).toFixed(V)+"%",X=0;X<V;X++)-1!==W.indexOf(".")&&(W=(W=W.replace("0%","%")).replace(".%","%"));return W},o.isHidden=function(G){var V=window.getComputedStyle(G).display;return!V||"none"===V},o.strTranslate=function(G,V){return G||V?"translate("+G+","+V+")":""},o.strRotate=function(G){return G?"rotate("+G+")":""},o.strScale=function(G){return 1!==G?"scale("+G+")":""},o.getTextTransform=function(G){var V=G.noCenter,W=G.textX,X=G.textY,oe=G.rotate,ce=G.scale;return ce?ce>1&&(ce=1):ce=0,o.strTranslate(G.targetX-ce*(W+(G.anchorX||0)),G.targetY-ce*(X+(G.anchorY||0)))+o.strScale(ce)+(oe?"rotate("+oe+(V?"":" "+W+" "+X)+")":"")},o.setTransormAndDisplay=function(G,V){G.attr("transform",o.getTextTransform(V)),G.style("display",V.scale?null:"none")},o.ensureUniformFontSize=function(G,V){var W=o.extendFlat({},V);return W.size=Math.max(V.size,G._fullLayout.uniformtext.minsize||0),W},o.join2=function(G,V,W){var X=G.length;return X>1?G.slice(0,-1).join(V)+W+G[X-1]:G.join(V)},o.bigFont=function(G){return Math.round(1.2*G)};var j=o.getFirefoxVersion(),J=null!==j&&j<86;o.getPositionFromD3Event=function(){return J?[k.event.layerX,k.event.layerY]:[k.event.offsetX,k.event.offsetY]}},41965:function($){"use strict";$.exports=function(R){return window&&window.process&&window.process.versions?"[object Object]"===Object.prototype.toString.call(R):"[object Object]"===Object.prototype.toString.call(R)&&Object.getPrototypeOf(R).hasOwnProperty("hasOwnProperty")}},66636:function($,R,e){"use strict";var k=e(65487),A=/^\w*$/;$.exports=function(l,T,b,d){var s,t,o;b=b||"name",d=d||"value";var r={};T&&T.length?(o=k(l,T),t=o.get()):t=l,T=T||"";var n={};if(t)for(s=0;s<t.length;s++)n[t[s][b]]=s;var i=A.test(d),a={set:function(c,p){var f=null===p?4:0;if(!t){if(!o||4===f)return;o.set(t=[])}var x=n[c];if(void 0===x){if(4===f)return;f|=3,n[c]=x=t.length}else p!==(i?t[x][d]:k(t[x],d).get())&&(f|=2);var v=t[x]=t[x]||{};return v[b]=c,i?v[d]=p:k(v,d).set(p),null!==p&&(f&=-5),r[x]=r[x]|f,a},get:function(c){if(t){var p=n[c];return void 0===p?void 0:i?t[p][d]:k(t[p],d).get()}},rename:function(c,p){var f=n[c];return void 0===f||(r[f]=1|r[f],n[p]=f,delete n[c],t[f][b]=p),a},remove:function(c){var p=n[c];if(void 0===p)return a;var f=t[p];if(Object.keys(f).length>2)return r[p]=2|r[p],a.set(c,null);if(i){for(s=p;s<t.length;s++)r[s]=3|r[s];for(s=p;s<t.length;s++)n[t[s][b]]--;t.splice(p,1),delete n[c]}else k(f,d).set(null),r[p]=6|r[p];return a},constructUpdate:function(){for(var c,p,f={},x=Object.keys(r),v=0;v<x.length;v++)c=T+"["+(p=x[v])+"]",t[p]?(1&r[p]&&(f[c+"."+b]=t[p][b]),2&r[p]&&(f[c+"."+d]=i?4&r[p]?null:t[p][d]:4&r[p]?null:k(t[p],d).get())):f[c]=null;return f}};return a}},15867:function($,R,e){"use strict";var k=e(73972);$.exports=function(A,l){for(var T=A._context.locale,b=0;b<2;b++){for(var d=A._context.locales,s=0;s<2;s++){var t=(d[T]||{}).dictionary;if(t){var o=t[l];if(o)return o}d=k.localeRegistry}var r=T.split("-")[0];if(r===T)break;T=r}return l}},47769:function($,R,e){"use strict";var k=e(72075).dfltConfig,A=e(75046),l=$.exports={};l.log=function(){var T;if(k.logging>1){var b=["LOG:"];for(T=0;T<arguments.length;T++)b.push(arguments[T]);console.trace.apply(console,b)}if(k.notifyOnLogging>1){var d=[];for(T=0;T<arguments.length;T++)d.push(arguments[T]);A(d.join("<br>"),"long")}},l.warn=function(){var T;if(k.logging>0){var b=["WARN:"];for(T=0;T<arguments.length;T++)b.push(arguments[T]);console.trace.apply(console,b)}if(k.notifyOnLogging>0){var d=[];for(T=0;T<arguments.length;T++)d.push(arguments[T]);A(d.join("<br>"),"stick")}},l.error=function(){var T;if(k.logging>0){var b=["ERROR:"];for(T=0;T<arguments.length;T++)b.push(arguments[T]);console.error.apply(console,b)}if(k.notifyOnLogging>0){var d=[];for(T=0;T<arguments.length;T++)d.push(arguments[T]);A(d.join("<br>"),"stick")}}},77310:function($,R,e){"use strict";var k=e(39898);$.exports=function(A,l,T){var b=A.selectAll("g."+T.replace(/\s/g,".")).data(l,function(s){return s[0].trace.uid});b.exit().remove(),b.enter().append("g").attr("class",T),b.order();var d=A.classed("rangeplot")?"nodeRangePlot3":"node3";return b.each(function(s){s[0][d]=k.select(this)}),b}},35657:function($,R,e){"use strict";var k=e(79576);R.init2dArray=function(A,l){for(var T=new Array(A),b=0;b<A;b++)T[b]=new Array(l);return T},R.transposeRagged=function(A){var l,T,b=0,d=A.length;for(l=0;l<d;l++)b=Math.max(b,A[l].length);var s=new Array(b);for(l=0;l<b;l++)for(s[l]=new Array(d),T=0;T<d;T++)s[l][T]=A[T][l];return s},R.dot=function(A,l){if(!A.length||!l.length||A.length!==l.length)return null;var T,b,d=A.length;if(A[0].length)for(T=new Array(d),b=0;b<d;b++)T[b]=R.dot(A[b],l);else if(l[0].length){var s=R.transposeRagged(l);for(T=new Array(s.length),b=0;b<s.length;b++)T[b]=R.dot(A,s[b])}else for(T=0,b=0;b<d;b++)T+=A[b]*l[b];return T},R.translationMatrix=function(A,l){return[[1,0,A],[0,1,l],[0,0,1]]},R.rotationMatrix=function(A){var l=A*Math.PI/180;return[[Math.cos(l),-Math.sin(l),0],[Math.sin(l),Math.cos(l),0],[0,0,1]]},R.rotationXYMatrix=function(A,l,T){return R.dot(R.dot(R.translationMatrix(l,T),R.rotationMatrix(A)),R.translationMatrix(-l,-T))},R.apply3DTransform=function(A){return function(){var l=arguments,T=1===arguments.length?l[0]:[l[0],l[1],l[2]||0];return R.dot(A,[T[0],T[1],T[2],1]).slice(0,3)}},R.apply2DTransform=function(A){return function(){var l=arguments;3===l.length&&(l=l[0]);var T=1===arguments.length?l[0]:[l[0],l[1]];return R.dot(A,[T[0],T[1],1]).slice(0,2)}},R.apply2DTransform2=function(A){var l=R.apply2DTransform(A);return function(T){return l(T.slice(0,2)).concat(l(T.slice(2,4)))}},R.convertCssMatrix=function(A){if(A){var l=A.length;if(16===l)return A;if(6===l)return[A[0],A[1],0,0,A[2],A[3],0,0,0,0,1,0,A[4],A[5],0,1]}return[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]},R.inverseTransformMatrix=function(A){var l=[];return k.invert(l,A),[[l[0],l[1],l[2],l[3]],[l[4],l[5],l[6],l[7]],[l[8],l[9],l[10],l[11]],[l[12],l[13],l[14],l[15]]]}},64872:function($){"use strict";$.exports={mod:function(R,e){var k=R%e;return k<0?k+e:k},modHalf:function(R,e){return Math.abs(R)>e/2?R-Math.round(R/e)*e:R}}},65487:function($,R,e){"use strict";var k=e(92770),A=e(73627).isArrayOrTypedArray;function l(r,n){return function(){var i,a,c,p,f,x=r;for(p=0;p<n.length-1;p++){if(-1===(i=n[p])){for(a=!0,c=[],f=0;f<x.length;f++)c[f]=l(x[f],n.slice(p+1))(),c[f]!==c[0]&&(a=!1);return a?c[0]:c}if("number"==typeof i&&!A(x)||"object"!=typeof(x=x[i])||null===x)return}if("object"==typeof x&&null!==x&&null!==(c=x[n[p]]))return c}}$.exports=function(r,n){if(k(n))n=String(n);else if("string"!=typeof n||"[-1]"===n.substr(n.length-4))throw"bad property string";for(var i,a,c,p=0,f=n.split(".");p<f.length;){if(i=String(f[p]).match(/^([^\[\]]*)((\[\-?[0-9]*\])+)$/)){if(i[1])f[p]=i[1];else{if(0!==p)throw"bad property string";f.splice(0,1)}for(a=i[2].substr(1,i[2].length-2).split("]["),c=0;c<a.length;c++)p++,f.splice(p,0,Number(a[c]))}p++}return"object"!=typeof r?{set:function(){throw"bad container"},get:function(){},astr:n,parts:f,obj:r}:{set:d(r,f,n),get:l(r,f),astr:n,parts:f,obj:r}};var T=/(^|\.)args\[/;function b(r,n){return void 0===r||null===r&&!n.match(T)}function d(r,n,i){return function(a){var c,p,f=r,x="",v=[[r,x]],g=b(a,i);for(p=0;p<n.length-1;p++){if("number"==typeof(c=n[p])&&!A(f))throw"array index but container is not an array";if(-1===c){if(g=!t(f,n.slice(p+1),a,i))break;return}if(!o(f,c,n[p+1],g))break;if("object"!=typeof(f=f[c])||null===f)throw"container is not an object";x=s(x,c),v.push([f,x])}if(g){if(p===n.length-1&&(delete f[n[p]],Array.isArray(f)&&+n[p]==f.length-1))for(;f.length&&void 0===f[f.length-1];)f.pop()}else f[n[p]]=a}}function s(r,n){var i=n;return k(n)?i="["+n+"]":r&&(i="."+n),r+i}function t(r,n,i,a){var c,p=A(i),f=!0,x=i,v=a.replace("-1",0),g=!p&&b(i,v),y=n[0];for(c=0;c<r.length;c++)v=a.replace("-1",c),p&&(g=b(x=i[c%i.length],v)),g&&(f=!1),o(r,c,y,g)&&d(r[c],n,a.replace("-1",c))(x);return f}function o(r,n,i,a){if(void 0===r[n]){if(a)return!1;r[n]="number"==typeof i?[]:{}}return!0}},64213:function($){"use strict";$.exports=function(){}},75046:function($,R,e){"use strict";var k=e(39898),A=e(92770),l=[];$.exports=function(T,b){if(-1===l.indexOf(T)){l.push(T);var d=1e3;A(b)?d=b:"long"===b&&(d=3e3);var s=k.select("body").selectAll(".plotly-notifier").data([0]);s.enter().append("div").classed("plotly-notifier",!0),s.selectAll(".notifier-note").data(l).enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(o){var r=k.select(this);r.append("button").classed("notifier-close",!0).html("&times;").on("click",function(){r.transition().call(t)});for(var n=r.append("p"),i=o.split(/<br\s*\/?>/g),a=0;a<i.length;a++)a&&n.append("br"),n.append("span").text(i[a]);"stick"===b?r.transition().duration(350).style("opacity",1):r.transition().duration(700).style("opacity",1).transition().delay(d).call(t)})}function t(o){o.duration(700).style("opacity",0).each("end",function(r){var n=l.indexOf(r);-1!==n&&l.splice(n,1),k.select(this).remove()})}}},39918:function($,R,e){"use strict";var k=e(6964),A="data-savedcursor";$.exports=function(l,T){var b=l.attr(A);if(T){if(!b){for(var d=(l.attr("class")||"").split(" "),s=0;s<d.length;s++){var t=d[s];0===t.indexOf("cursor-")&&l.attr(A,t.substr(7)).classed(t,!1)}l.attr(A)||l.attr(A,"!!")}k(l,T)}else b&&(l.attr(A,null),"!!"===b?k(l):k(l,b))}},61082:function($,R,e){"use strict";var k=e(35657).dot,A=e(50606).BADNUM,l=$.exports={};l.tester=function(T){var b,d=T.slice(),s=d[0][0],t=s,o=d[0][1],r=o;for(d[d.length-1][0]===d[0][0]&&d[d.length-1][1]===d[0][1]||d.push(d[0]),b=1;b<d.length;b++)s=Math.min(s,d[b][0]),t=Math.max(t,d[b][0]),o=Math.min(o,d[b][1]),r=Math.max(r,d[b][1]);var n,i=!1;5===d.length&&(d[0][0]===d[1][0]?d[2][0]===d[3][0]&&d[0][1]===d[3][1]&&d[1][1]===d[2][1]&&(i=!0,n=function(p){return p[0]===d[0][0]}):d[0][1]===d[1][1]&&d[2][1]===d[3][1]&&d[0][0]===d[3][0]&&d[1][0]===d[2][0]&&(i=!0,n=function(p){return p[1]===d[0][1]}));var a=!0,c=d[0];for(b=1;b<d.length;b++)if(c[0]!==d[b][0]||c[1]!==d[b][1]){a=!1;break}return{xmin:s,xmax:t,ymin:o,ymax:r,pts:d,contains:i?function(p,f){var x=p[0],v=p[1];return!(x===A||x<s||x>t||v===A||v<o||v>r||f&&n(p))}:function(p,f){var x=p[0],v=p[1];if(x===A||x<s||x>t||v===A||v<o||v>r)return!1;var g,y,h,m,w,u=d.length,S=d[0][0],_=d[0][1],E=0;for(g=1;g<u;g++)if(y=S,h=_,S=d[g][0],_=d[g][1],!(x<(m=Math.min(y,S))||x>Math.max(y,S)||v>Math.max(h,_)))if(v<Math.min(h,_))x!==m&&E++;else{if(v===(w=S===y?v:h+(x-y)*(_-h)/(S-y)))return 1!==g||!f;v<=w&&x!==m&&E++}return E%2==1},isRect:i,degenerate:a}},l.isSegmentBent=function(T,b,d,s){var t,o,r,n=T[b],i=[T[d][0]-n[0],T[d][1]-n[1]],a=k(i,i),c=Math.sqrt(a),p=[-i[1]/c,i[0]/c];for(t=b+1;t<d;t++)if((r=k(o=[T[t][0]-n[0],T[t][1]-n[1]],i))<0||r>a||Math.abs(k(o,p))>s)return!0;return!1},l.filter=function(T,b){var d=[T[0]],s=0,t=0;function o(r){T.push(r);var n=d.length,i=s;d.splice(t+1);for(var a=i+1;a<T.length;a++)(a===T.length-1||l.isSegmentBent(T,i,a+1,b))&&(d.push(T[a]),d.length<n-2&&(s=a,t=d.length-1),i=a)}return T.length>1&&o(T.pop()),{addPt:o,raw:T,filtered:d}}},79749:function($,R,e){"use strict";var k=e(58617),A=e(98580);$.exports=function(l,T,b){var d=l._fullLayout,s=!0;return d._glcanvas.each(function(t){if(t.regl)t.regl.preloadCachedCode(b);else if(!t.pick||d._has("parcoords")){try{t.regl=A({canvas:this,attributes:{antialias:!t.pick,preserveDrawingBuffer:!0},pixelRatio:l._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:T||[],cachedCode:b||{}})}catch{s=!1}t.regl||(s=!1),s&&this.addEventListener("webglcontextlost",function(o){l&&l.emit&&l.emit("plotly_webglcontextlost",{event:o,layer:t.key})},!1)}}),s||k({container:d._glcontainer.node()}),s}},45142:function($,R,e){"use strict";var k=e(92770),A=e(35791);$.exports=function(l){var T,n;if("string"!=typeof(T=l&&l.hasOwnProperty("userAgent")?l.userAgent:(typeof navigator<"u"&&(n=navigator.userAgent),n&&n.headers&&"string"==typeof n.headers["user-agent"]&&(n=n.headers["user-agent"]),n)))return!0;var b=A({ua:{headers:{"user-agent":T}},tablet:!0,featureDetect:!1});if(!b)for(var d=T.split(" "),s=1;s<d.length;s++)if(-1!==d[s].indexOf("Safari"))for(var t=s-1;t>-1;t--){var o=d[t];if("Version/"===o.substr(0,8)){var r=o.substr(8).split(".")[0];if(k(r)&&(r=+r),r>=13)return!0}}return b}},75138:function($){"use strict";$.exports=function(R,e){if(e instanceof RegExp){for(var k=e.toString(),A=0;A<R.length;A++)if(R[A]instanceof RegExp&&R[A].toString()===k)return R;R.push(e)}else!e&&0!==e||-1!==R.indexOf(e)||R.push(e);return R}},10847:function($,R,e){"use strict";var k=e(71828),A=e(72075).dfltConfig,l={add:function(T,b,d,s,t){var o,r;T.undoQueue=T.undoQueue||{index:0,queue:[],sequence:!1},r=T.undoQueue.index,T.autoplay?T.undoQueue.inSequence||(T.autoplay=!1):(!T.undoQueue.sequence||T.undoQueue.beginSequence?(T.undoQueue.queue.splice(r,T.undoQueue.queue.length-r,o={undo:{calls:[],args:[]},redo:{calls:[],args:[]}}),T.undoQueue.index+=1):o=T.undoQueue.queue[r-1],T.undoQueue.beginSequence=!1,o&&(o.undo.calls.unshift(b),o.undo.args.unshift(d),o.redo.calls.push(s),o.redo.args.push(t)),T.undoQueue.queue.length>A.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 b,d;if(!(void 0===T.undoQueue||isNaN(T.undoQueue.index)||T.undoQueue.index<=0)){for(T.undoQueue.index--,b=T.undoQueue.queue[T.undoQueue.index],T.undoQueue.inSequence=!0,d=0;d<b.undo.calls.length;d++)l.plotDo(T,b.undo.calls[d],b.undo.args[d]);T.undoQueue.inSequence=!1,T.autoplay=!1}},redo:function(T){var b,d;if(!(void 0===T.undoQueue||isNaN(T.undoQueue.index)||T.undoQueue.index>=T.undoQueue.queue.length)){for(b=T.undoQueue.queue[T.undoQueue.index],T.undoQueue.inSequence=!0,d=0;d<b.redo.calls.length;d++)l.plotDo(T,b.redo.calls[d],b.redo.args[d]);T.undoQueue.inSequence=!1,T.autoplay=!1,T.undoQueue.index++}},plotDo:function(T,b,d){T.autoplay=!0,d=function(s,t){for(var o,r=[],n=0;n<t.length;n++)r[n]=(o=t[n])===s?o:"object"==typeof o?Array.isArray(o)?k.extendDeep([],o):k.extendDeepAll({},o):o;return r}(T,d),b.apply(null,d)}};$.exports=l},30587:function($,R){"use strict";R.counter=function(e,k,A,l){var T=(k||"")+(A?"":"$"),b=!1===l?"":"^";return"xy"===e?new RegExp(b+"x([2-9]|[1-9][0-9]+)?y([2-9]|[1-9][0-9]+)?"+T):new RegExp(b+e+"([2-9]|[1-9][0-9]+)?"+T)}},6962:function($){"use strict";var R=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,e=/^[^\.\[\]]+$/;$.exports=function(k,A){for(;A;){var l=k.match(R);if(l)k=l[1];else{if(!k.match(e))throw new Error("bad relativeAttr call:"+[k,A]);k=""}if("^"!==A.charAt(0))break;A=A.slice(1)}return k&&"["!==A.charAt(0)?k+"."+A:k+A}},51332:function($,R,e){"use strict";var k=e(73627).isArrayOrTypedArray,A=e(41965);$.exports=function l(T,b){for(var d in b){var s=b[d],t=T[d];if(t!==s)if("_"===d.charAt(0)||"function"==typeof s){if(d in T)continue;T[d]=s}else if(k(s)&&k(t)&&A(s[0])){if("customdata"===d||"ids"===d)continue;for(var o=Math.min(s.length,t.length),r=0;r<o;r++)t[r]!==s[r]&&A(s[r])&&A(t[r])&&l(t[r],s[r])}else A(s)&&A(t)&&(l(t,s),Object.keys(t).length||delete T[d])}}},65888:function($,R,e){"use strict";var k=e(92770),A=e(47769),l=e(23389),T=e(50606).BADNUM,b=1e-9;function d(r,n){return r<n}function s(r,n){return r<=n}function t(r,n){return r>n}function o(r,n){return r>=n}R.findBin=function(r,n,i){if(k(n.start))return i?Math.ceil((r-n.start)/n.size-b)-1:Math.floor((r-n.start)/n.size+b);var a,c,p=0,f=n.length,x=0,v=f>1?(n[f-1]-n[0])/(f-1):1;for(c=v>=0?i?d:s:i?o:t,r+=v*b*(i?-1:1)*(v>=0?1:-1);p<f&&x++<100;)c(n[a=Math.floor((p+f)/2)],r)?p=a+1:f=a;return x>90&&A.log("Long binary search..."),p-1},R.sorterAsc=function(r,n){return r-n},R.sorterDes=function(r,n){return n-r},R.distinctVals=function(r){var n,i=r.slice();for(i.sort(R.sorterAsc),n=i.length-1;n>-1&&i[n]===T;n--);for(var a,c=i[n]-i[0]||1,p=c/(n||1)/1e4,f=[],x=0;x<=n;x++){var v=i[x],g=v-a;void 0===a?(f.push(v),a=v):g>p&&(c=Math.min(c,g),f.push(v),a=v)}return{vals:f,minDiff:c}},R.roundUp=function(r,n,i){for(var a,c=0,p=n.length-1,f=0,x=i?0:1,v=i?1:0,g=i?Math.ceil:Math.floor;c<p&&f++<100;)n[a=g((c+p)/2)]<=r?c=a+x:p=a-v;return n[c]},R.sort=function(r,n){for(var i=0,a=0,c=1;c<r.length;c++){var p=n(r[c],r[c-1]);if(p<0?i=1:p>0&&(a=1),i&&a)return r.sort(n)}return a?r:r.reverse()},R.findIndexOfMin=function(r,n){n=n||l;for(var i,a=1/0,c=0;c<r.length;c++){var p=n(r[c]);p<a&&(a=p,i=c)}return i}},6964:function($){"use strict";$.exports=function(R,e){(R.attr("class")||"").split(" ").forEach(function(k){0===k.indexOf("cursor-")&&R.classed(k,!1)}),e&&R.classed("cursor-"+e,!0)}},58617:function($,R,e){"use strict";var k=e(7901),A=function(){};$.exports=function(l){for(var T in l)"function"==typeof l[T]&&(l[T]=A);l.destroy=function(){l.container.parentNode.removeChild(l.container)};var b=document.createElement("div");b.className="no-webgl",b.style.cursor="pointer",b.style.fontSize="24px",b.style.color=k.defaults[0],b.style.position="absolute",b.style.left=b.style.top="0px",b.style.width=b.style.height="100%",b.style["background-color"]=k.lightLine,b.style["z-index"]=30;var d=document.createElement("p");return d.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",d.style.position="relative",d.style.top="50%",d.style.left="50%",d.style.height="30%",d.style.width="50%",d.style.margin="-15% 0 0 -25%",b.appendChild(d),l.container.appendChild(b),l.container.style.background="#FFFFFF",l.container.onclick=function(){window.open("https://get.webgl.org")},!1}},78607:function($){"use strict";$.exports=function(R){return Object.keys(R).sort()}},80038:function($,R,e){"use strict";var k=e(92770),A=e(73627).isArrayOrTypedArray;R.aggNums=function(l,T,b,d){var s,t;if((!d||d>b.length)&&(d=b.length),k(T)||(T=!1),A(b[0])){for(t=new Array(d),s=0;s<d;s++)t[s]=R.aggNums(l,T,b[s]);b=t}for(s=0;s<d;s++)k(T)?k(b[s])&&(T=l(+T,+b[s])):T=b[s];return T},R.len=function(l){return R.aggNums(function(T){return T+1},0,l)},R.mean=function(l,T){return T||(T=R.len(l)),R.aggNums(function(b,d){return b+d},0,l)/T},R.midRange=function(l){if(void 0!==l&&0!==l.length)return(R.aggNums(Math.max,null,l)+R.aggNums(Math.min,null,l))/2},R.variance=function(l,T,b){return T||(T=R.len(l)),k(b)||(b=R.mean(l,T)),R.aggNums(function(d,s){return d+Math.pow(s-b,2)},0,l)/T},R.stdev=function(l,T,b){return Math.sqrt(R.variance(l,T,b))},R.median=function(l){var T=l.slice().sort();return R.interp(T,.5)},R.interp=function(l,T){if(!k(T))throw"n should be a finite number";if((T=T*l.length-.5)<0)return l[0];if(T>l.length-1)return l[l.length-1];var b=T%1;return b*l[Math.ceil(T)]+(1-b)*l[Math.floor(T)]}},78614:function($,R,e){"use strict";var k=e(25075);$.exports=function(A){return A?k(A):[0,0,0,1]}},63893:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=A.strTranslate,T=e(77922),b=e(18783).LINE_SPACING,d=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;R.convertToTspans=function(I,U,z){var H=I.text(),F=!I.attr("data-notex")&&U&&U._context.typesetMath&&typeof MathJax<"u"&&H.match(d),N=k.select(I.node().parentNode);if(!N.empty()){var B=I.attr("class")?I.attr("class").split(" ")[0]:"text";return N.selectAll("svg."+(B+="-math")).remove(),N.selectAll("g."+B+"-group").remove(),I.style("display",null).attr({"data-unformatted":H,"data-math":"N"}),F?(U&&U._promises||[]).push(new Promise(function(J){I.style("display","none");var G=parseInt(I.node().style.fontSize,10);!function(W,X,K){var re,ee,ie,oe,ce=parseInt((MathJax.version||"").split(".")[0]);if(2===ce||3===ce){var me=function(){var he="math-output-"+A.randstr({},64),ve=(oe=k.select("body").append("div").attr({id:he}).style({visibility:"hidden",position:"absolute","font-size":X.fontSize+"px"}).text(W.replace(s,"\\lt ").replace(t,"\\gt "))).node();return 2===ce?MathJax.Hub.Typeset(ve):MathJax.typeset([ve])},de=function(){var he=oe.select(2===ce?".MathJax_SVG":".MathJax"),ve=!he.empty()&&oe.select("svg").node();if(ve){var Pe,xe=ve.getBoundingClientRect();Pe=2===ce?k.select("body").select("#MathJax_SVG_glyphs"):he.select("defs"),K(he,Pe,xe)}else A.log("There was an error in the tex syntax.",W),K();oe.remove()};2===ce?MathJax.Hub.Queue(function(){return ee=A.extendDeepAll({},MathJax.Hub.config),ie=MathJax.Hub.processSectionDelay,void 0!==MathJax.Hub.processSectionDelay&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:o},displayAlign:"left"})},function(){if("SVG"!==(re=MathJax.Hub.config.menuSettings.renderer))return MathJax.Hub.setRenderer("SVG")},me,de,function(){if("SVG"!==re)return MathJax.Hub.setRenderer(re)},function(){return void 0!==ie&&(MathJax.Hub.processSectionDelay=ie),MathJax.Hub.Config(ee)}):3===ce&&(ee=A.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=o,"svg"!==(re=MathJax.config.startup.output)&&(MathJax.config.startup.output="svg"),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){me(),de(),"svg"!==re&&(MathJax.config.startup.output=re),MathJax.config=ee}))}else A.warn("No MathJax version:",MathJax.version)}(F[2],{fontSize:G},function(W,X,K){N.selectAll("svg."+B).remove(),N.selectAll("g."+B+"-group").remove();var re=W&&W.select("svg");if(!re||!re.node())return j(),void J();var ee=N.append("g").classed(B+"-group",!0).attr({"pointer-events":"none","data-unformatted":H,"data-math":"Y"});ee.node().appendChild(re.node()),X&&X.node()&&re.node().insertBefore(X.node().cloneNode(!0),re.node().firstChild);var ie=K.width,oe=K.height;re.attr({class:B,height:oe,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var ce=I.node().style.fill||"black",me=re.select("g");me.attr({fill:ce,stroke:ce});var de=me.node().getBoundingClientRect(),he=de.width,ve=de.height;(he>ie||ve>oe)&&(re.style("overflow","hidden"),he=(de=re.node().getBoundingClientRect()).width,ve=de.height);var Pe=+I.attr("x"),xe=+I.attr("y"),ke=-(G||I.node().getBoundingClientRect().height)/4;if("y"===B[0])ee.attr({transform:"rotate("+[-90,Pe,xe]+")"+l(-he/2,ke-ve/2)});else if("l"===B[0])xe=ke-ve/2;else if("a"===B[0]&&0!==B.indexOf("atitle"))Pe=0,xe=ke;else{var Ae=I.attr("text-anchor");Pe-=he*("middle"===Ae?.5:"end"===Ae?1:0),xe=xe+ke-ve/2}re.attr({x:Pe,y:xe}),z&&z.call(I,ee),J(ee)})})):j(),I}function j(){N.empty()||(B=I.attr("class")+"-math",N.select("svg."+B).remove()),I.text("").style("white-space","pre"),function(G,V){V=V.replace(p," ");var W,X=!1,K=[],re=-1;function ee(){re++;var fe=document.createElementNS(T.svg,"tspan");k.select(fe).attr({class:"line",dy:re*b+"em"}),G.appendChild(fe),W=fe;var ye=K;if(K=[{node:fe}],ye.length>1)for(var Me=1;Me<ye.length;Me++)ie(ye[Me])}function ie(fe){var ye,Me=fe.type,Ie={};if("a"===Me){ye="a";var Ce=fe.target,Re=fe.href,le=fe.popup;Re&&(Ie={"xlink:xlink:show":"_blank"===Ce||"_"!==Ce.charAt(0)?"new":"replace",target:Ce,"xlink:xlink:href":Re},le&&(Ie.onclick='window.open(this.href.baseVal,this.target.baseVal,"'+le+'");return false;'))}else ye="tspan";fe.style&&(Ie.style=fe.style);var ge=document.createElementNS(T.svg,ye);if("sup"===Me||"sub"===Me){oe(W,a),W.appendChild(ge);var _e=document.createElementNS(T.svg,"tspan");oe(_e,a),k.select(_e).attr("dy",i[Me]),Ie.dy=n[Me],W.appendChild(ge),W.appendChild(_e)}else W.appendChild(ge);k.select(ge).attr(Ie),W=fe.node=ge,K.push(fe)}function oe(fe,ye){fe.appendChild(document.createTextNode(ye))}function ce(fe){if(1!==K.length){var ye=K.pop();fe!==ye.type&&A.log("Start tag <"+ye.type+"> doesnt match end tag <"+fe+">. Pretending it did match.",V),W=K[K.length-1].node}else A.log("Ignoring unexpected end tag </"+fe+">.",V)}v.test(V)?ee():(W=G,K=[{node:G}]);for(var me=V.split(f),de=0;de<me.length;de++){var he=me[de],ve=he.match(x),Pe=ve&&ve[2].toLowerCase(),xe=r[Pe];if("br"===Pe)ee();else if(void 0===xe)oe(W,E(he));else if(ve[1])ce(Pe);else{var ke=ve[4],Ae={type:Pe},Te=w(ke,g);if(Te?(Te=Te.replace(u,"$1 fill:"),xe&&(Te+=";"+xe)):xe&&(Te=xe),Te&&(Ae.style=Te),"a"===Pe){X=!0;var Q=w(ke,y);if(Q){var se=L(Q);se&&(Ae.href=se,Ae.target=w(ke,h)||"_blank",Ae.popup=w(ke,m))}}ie(Ae)}}return X}(I.node(),H)&&I.style("pointer-events","all"),R.positionText(I),z&&z.call(I)}};var s=/(<|&lt;|&#60;)/g,t=/(>|&gt;|&#62;)/g,o=[["$","$"],["\\(","\\)"]],r={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"},n={sub:"0.3em",sup:"-0.6em"},i={sub:"-0.21em",sup:"0.42em"},a="\u200b",c=["http:","https:","mailto:","",void 0,":"],p=R.NEWLINES=/(\r\n?|\n)/g,f=/(<[^<>]*>)/,x=/<(\/?)([^ >]*)(\s+(.*))?>/i,v=/<br(\s+.*)?>/i;R.BR_TAG_ALL=/<br(\s+.*)?>/gi;var g=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,y=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,h=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,m=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function w(I,U){if(!I)return null;var z=I.match(U),H=z&&(z[3]||z[4]);return H&&E(H)}var u=/(^|;)\s*color:/;R.plainText=function(I,U){for(var z=void 0!==(U=U||{}).len&&-1!==U.len?U.len:1/0,H=void 0!==U.allowedTags?U.allowedTags:["br"],N=I.split(f),B=[],j="",J=0,G=0;G<N.length;G++){var V=N[G],W=V.match(x),X=W&&W[2].toLowerCase();if(X)-1!==H.indexOf(X)&&(B.push(V),j=X);else{var K=V.length;if(J+K<z)B.push(V),J+=K;else if(J<z){var re=z-J;j&&("br"!==j||re<=3||K<=3)&&B.pop(),B.push(z>3?V.substr(0,re-3)+"...":V.substr(0,re));break}j=""}}return B.join("")};var S={mu:"\u03bc",amp:"&",lt:"<",gt:">",nbsp:"\xa0",times:"\xd7",plusmn:"\xb1",deg:"\xb0"},_=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function E(I){return I.replace(_,function(U,z){return("#"===z.charAt(0)?function(H){if(!(H>1114111)){var F=String.fromCodePoint;if(F)return F(H);var N=String.fromCharCode;return H<=65535?N(H):N(55232+(H>>10),H%1024+56320)}}("x"===z.charAt(1)?parseInt(z.substr(2),16):parseInt(z.substr(1),10)):S[z])||U})}function L(I){var U=encodeURI(decodeURI(I)),z=document.createElement("a"),H=document.createElement("a");z.href=I,H.href=U;var N=H.protocol;return-1!==c.indexOf(z.protocol)&&-1!==c.indexOf(N)?U:""}function C(I,U,z){var H,F,N,B=z.horizontalAlign,j=z.verticalAlign||"top",J=I.node().getBoundingClientRect(),G=U.node().getBoundingClientRect();return F="bottom"===j?function(){return J.bottom-H.height}:"middle"===j?function(){return J.top+(J.height-H.height)/2}:function(){return J.top},N="right"===B?function(){return J.right-H.width}:"center"===B?function(){return J.left+(J.width-H.width)/2}:function(){return J.left},function(){H=this.node().getBoundingClientRect();var V=N()-G.left,W=F()-G.top,X=z.gd||{};if(z.gd){X._fullLayout._calcInverseTransform(X);var K=A.apply3DTransform(X._fullLayout._invTransform)(V,W);V=K[0],W=K[1]}return this.style({top:W+"px",left:V+"px","z-index":1e3}),this}}R.convertEntities=E,R.sanitizeHTML=function(I){I=I.replace(p," ");for(var U=document.createElement("p"),z=U,H=[],F=I.split(f),N=0;N<F.length;N++){var B=F[N],j=B.match(x),J=j&&j[2].toLowerCase();if(J in r)if(j[1])H.length&&(z=H.pop());else{var G=j[4],V=w(G,g),W=V?{style:V}:{};if("a"===J){var X=w(G,y);if(X){var K=L(X);if(K){W.href=K;var re=w(G,h);re&&(W.target=re)}}}var ee=document.createElement(J);z.appendChild(ee),k.select(ee).attr(W),z=ee,H.push(ee)}else z.appendChild(document.createTextNode(E(B)))}return U.innerHTML},R.lineCount=function(I){return I.selectAll("tspan.line").size()||1},R.positionText=function(I,U,z){return I.each(function(){var H=k.select(this);function F(j,J){return void 0===J?null===(J=H.attr(j))&&(H.attr(j,0),J=0):H.attr(j,J),J}var N=F("x",U),B=F("y",z);"text"===this.nodeName&&H.selectAll("tspan.line").attr({x:N,y:B})})};var P="1px ";R.makeTextShadow=function(I){return"1px 1px 1px "+I+", -1px -"+P+P+I+", 1px -"+P+P+I+", -"+P+P+P+I},R.makeEditable=function(I,U){var z=U.gd,H=U.delegate,F=k.dispatch("edit","input","cancel"),N=H||I;if(I.style({"pointer-events":H?"none":"all"}),1!==I.size())throw new Error("boo");function B(){var J,G,V,W,X;J=k.select(z).select(".svg-container"),G=J.append("div"),V=I.node().style,W=parseFloat(V.fontSize||12),void 0===(X=U.text)&&(X=I.attr("data-unformatted")),G.classed("plugin-editable editable",!0).style({position:"absolute","font-family":V.fontFamily||"Arial","font-size":W,color:U.fill||V.fill||"black",opacity:1,"background-color":U.background||"transparent",outline:"#ffffff33 1px solid",margin:[-W/8+1,0,0,-1].join("px ")+"px",padding:"0","box-sizing":"border-box"}).attr({contenteditable:!0}).text(X).call(C(I,J,U)).on("blur",function(){z._editing=!1,I.text(this.textContent).style({opacity:1});var ee,ie=k.select(this).attr("class");(ee=ie?"."+ie.split(" ")[0]+"-math-group":"[class*=-math-group]")&&k.select(I.node().parentNode).select(ee).style({opacity:0});var oe=this.textContent;k.select(this).transition().duration(0).remove(),k.select(document).on("mouseup",null),F.edit.call(I,oe)}).on("focus",function(){var ee=this;z._editing=!0,k.select(document).on("mouseup",function(){if(k.event.target===ee)return!1;document.activeElement===G.node()&&G.node().blur()})}).on("keyup",function(){27===k.event.which?(z._editing=!1,I.style({opacity:1}),k.select(this).style({opacity:0}).on("blur",function(){return!1}).transition().remove(),F.cancel.call(I,this.textContent)):(F.input.call(I,this.textContent),k.select(this).call(C(I,J,U)))}).on("keydown",function(){13===k.event.which&&this.blur()}).call(j),I.style({opacity:0});var K,re=N.attr("class");(K=re?"."+re.split(" ")[0]+"-math-group":"[class*=-math-group]")&&k.select(I.node().parentNode).select(K).style({opacity:0})}function j(J){var G=J.node(),V=document.createRange();V.selectNodeContents(G);var W=window.getSelection();W.removeAllRanges(),W.addRange(V),G.focus()}return U.immediate?B():N.on("click",B),k.rebind(I,F,"on")}},79990:function($,R){"use strict";var e={};function k(A){A&&null!==A.timer&&(clearTimeout(A.timer),A.timer=null)}R.throttle=function(A,l,T){var b=e[A],d=Date.now();if(!b){for(var s in e)e[s].ts<d-6e4&&delete e[s];b=e[A]={ts:0,timer:null}}function t(){T(),b.ts=Date.now(),b.onDone&&(b.onDone(),b.onDone=null)}k(b),d>b.ts+l?t():b.timer=setTimeout(function(){t(),b.timer=null},l)},R.done=function(A){var l=e[A];return l&&l.timer?new Promise(function(T){var b=l.onDone;l.onDone=function(){b&&b(),T(),l.onDone=null}}):Promise.resolve()},R.clear=function(A){if(A)k(e[A]),delete e[A];else for(var l in e)R.clear(l)}},58163:function($,R,e){"use strict";var k=e(92770);$.exports=function(A,l){if(A>0)return Math.log(A)/Math.LN10;var T=Math.log(Math.min(l[0],l[1]))/Math.LN10;return k(T)||(T=Math.log(Math.max(l[0],l[1]))/Math.LN10-6),T}},90973:function($,R,e){"use strict";var k=$.exports={},A=e(78776).locationmodeToLayer,l=e(96892).zL;k.getTopojsonName=function(T){return[T.scope.replace(/ /g,"-"),"_",T.resolution.toString(),"m"].join("")},k.getTopojsonPath=function(T,b){return T+b+".json"},k.getTopojsonFeatures=function(T,b){return l(b,b.objects[A[T.locationmode]]).features}},37815:function($){"use strict";$.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},92177:function($){"use strict";$.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},14458:function($,R,e){"use strict";var k=e(73972);$.exports=function(A){for(var l,T,b=k.layoutArrayContainers,d=k.layoutArrayRegexes,s=A.split("[")[0],t=0;t<d.length;t++)if((T=A.match(d[t]))&&0===T.index){l=T[0];break}if(l||(l=b[b.indexOf(s)]),!l)return!1;var o=A.substr(l.length);return o?!!(T=o.match(/^\[(0|[1-9][0-9]*)\](\.(.+))?$/))&&{array:l,index:Number(T[1]),property:T[3]||""}:{array:l,index:"",property:""}}},30962:function($,R,e){"use strict";var k=e(71828),A=k.extendFlat,l=k.isPlainObject,T={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},b={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},d=T.flags.slice().concat(["fullReplot"]),s=b.flags.slice().concat("layoutReplot");function t(n){for(var i={},a=0;a<n.length;a++)i[n[a]]=!1;return i}function o(n,i,a){var c=A({},n);for(var p in c){var f=c[p];l(f)&&(c[p]=r(f,i,0,p))}return"from-root"===a&&(c.editType=i),c}function r(n,i,a,c){if(n.valType){var p=A({},n);if(p.editType=i,Array.isArray(n.items)){p.items=new Array(n.items.length);for(var f=0;f<n.items.length;f++)p.items[f]=r(n.items[f],i)}return p}return o(n,i,"_"===c.charAt(0)?"nested":"from-root")}$.exports={traces:T,layout:b,traceFlags:function(){return t(d)},layoutFlags:function(){return t(s)},update:function(n,i){var a=i.editType;if(a&&"none"!==a)for(var c=a.split("+"),p=0;p<c.length;p++)n[c[p]]=!0},overrideAll:o}},58377:function($,R,e){"use strict";var k=e(92770),A=e(27812),l=e(73972),T=e(71828),b=e(74875),d=e(41675),s=e(7901),t=d.cleanId,o=d.getFromTrace,r=l.traceIs;function n(y,h){var m=y[h],w=h.charAt(0);m&&"paper"!==m&&(y[h]=t(m,w,!0))}function i(y){function h(m,w){y[m]&&(!y.title||!y.title[w])&&(y.title||(y.title={}),y.title[w]=y[m],delete y[m])}y&&("string"!=typeof y.title&&"number"!=typeof y.title||(y.title={text:y.title}),h("titlefont","font"),h("titleposition","position"),h("titleside","side"),h("titleoffset","offset"))}function a(y){if(!T.isPlainObject(y))return!1;var h=y.name;return delete y.name,delete y.showlegend,("string"==typeof h||"number"==typeof h)&&String(h)}function c(y,h,m,w){if(m&&!w)return y;if(w&&!m||!y.trim())return h;if(!h.trim())return y;var u,S=Math.min(y.length,h.length);for(u=0;u<S&&y.charAt(u)===h.charAt(u);u++);return y.substr(0,u).trim()}function p(y){var h="middle",m="center";return"string"==typeof y&&(-1!==y.indexOf("top")?h="top":-1!==y.indexOf("bottom")&&(h="bottom"),-1!==y.indexOf("left")?m="left":-1!==y.indexOf("right")&&(m="right")),h+" "+m}function f(y,h){return h in y&&"object"==typeof y[h]&&0===Object.keys(y[h]).length}R.clearPromiseQueue=function(y){Array.isArray(y._promises)&&y._promises.length>0&&T.log("Clearing previous rejected promises from queue."),y._promises=[]},R.cleanLayout=function(y){var h,m;y||(y={}),y.xaxis1&&(y.xaxis||(y.xaxis=y.xaxis1),delete y.xaxis1),y.yaxis1&&(y.yaxis||(y.yaxis=y.yaxis1),delete y.yaxis1),y.scene1&&(y.scene||(y.scene=y.scene1),delete y.scene1);var w=(b.subplotsRegistry.cartesian||{}).attrRegex,u=(b.subplotsRegistry.polar||{}).attrRegex,S=(b.subplotsRegistry.ternary||{}).attrRegex,_=(b.subplotsRegistry.gl3d||{}).attrRegex,E=Object.keys(y);for(h=0;h<E.length;h++){var L=E[h];if(w&&w.test(L)){var C=y[L];C.anchor&&"free"!==C.anchor&&(C.anchor=t(C.anchor)),C.overlaying&&(C.overlaying=t(C.overlaying)),C.type||(C.isdate?C.type="date":C.islog?C.type="log":!1===C.isdate&&!1===C.islog&&(C.type="linear")),"withzero"!==C.autorange&&"tozero"!==C.autorange||(C.autorange=!0,C.rangemode="tozero"),delete C.islog,delete C.isdate,delete C.categories,f(C,"domain")&&delete C.domain,void 0!==C.autotick&&(void 0===C.tickmode&&(C.tickmode=C.autotick?"auto":"linear"),delete C.autotick),i(C)}else if(u&&u.test(L))i(y[L].radialaxis);else if(S&&S.test(L)){var P=y[L];i(P.aaxis),i(P.baxis),i(P.caxis)}else if(_&&_.test(L)){var I=y[L],U=I.cameraposition;if(Array.isArray(U)&&4===U[0].length){var H=U[1],F=U[2],N=A([],U[0]),B=[];for(m=0;m<3;++m)B[m]=H[m]+F*N[2+4*m];I.camera={eye:{x:B[0],y:B[1],z:B[2]},center:{x:H[0],y:H[1],z:H[2]},up:{x:0,y:0,z:1}},delete I.cameraposition}i(I.xaxis),i(I.yaxis),i(I.zaxis)}}var j=Array.isArray(y.annotations)?y.annotations.length:0;for(h=0;h<j;h++){var J=y.annotations[h];T.isPlainObject(J)&&(J.ref&&("paper"===J.ref?(J.xref="paper",J.yref="paper"):"data"===J.ref&&(J.xref="x",J.yref="y"),delete J.ref),n(J,"xref"),n(J,"yref"))}var G=Array.isArray(y.shapes)?y.shapes.length:0;for(h=0;h<G;h++){var V=y.shapes[h];T.isPlainObject(V)&&(n(V,"xref"),n(V,"yref"))}var W=Array.isArray(y.images)?y.images.length:0;for(h=0;h<W;h++){var X=y.images[h];T.isPlainObject(X)&&(n(X,"xref"),n(X,"yref"))}var K=y.legend;return K&&(K.x>3?(K.x=1.02,K.xanchor="left"):K.x<-2&&(K.x=-.02,K.xanchor="right"),K.y>3?(K.y=1.02,K.yanchor="bottom"):K.y<-2&&(K.y=-.02,K.yanchor="top")),i(y),"rotate"===y.dragmode&&(y.dragmode="orbit"),s.clean(y),y.template&&y.template.layout&&R.cleanLayout(y.template.layout),y},R.cleanData=function(y){for(var h=0;h<y.length;h++){var m,w=y[h];if("histogramy"===w.type&&"xbins"in w&&!("ybins"in w)&&(w.ybins=w.xbins,delete w.xbins),w.error_y&&"opacity"in w.error_y){var u=s.defaults,S=w.error_y.color||(r(w,"bar")?s.defaultLine:u[h%u.length]);w.error_y.color=s.addOpacity(s.rgb(S),s.opacity(S)*w.error_y.opacity),delete w.error_y.opacity}if("bardir"in w&&("h"!==w.bardir||!r(w,"bar")&&"histogram"!==w.type.substr(0,9)||(w.orientation="h",R.swapXYData(w)),delete w.bardir),"histogramy"===w.type&&R.swapXYData(w),"histogramx"!==w.type&&"histogramy"!==w.type||(w.type="histogram"),"scl"in w&&!("colorscale"in w)&&(w.colorscale=w.scl,delete w.scl),"reversescl"in w&&!("reversescale"in w)&&(w.reversescale=w.reversescl,delete w.reversescl),w.xaxis&&(w.xaxis=t(w.xaxis,"x")),w.yaxis&&(w.yaxis=t(w.yaxis,"y")),r(w,"gl3d")&&w.scene&&(w.scene=b.subplotsRegistry.gl3d.cleanId(w.scene)),!r(w,"pie-like")&&!r(w,"bar-like"))if(Array.isArray(w.textposition))for(m=0;m<w.textposition.length;m++)w.textposition[m]=p(w.textposition[m]);else w.textposition&&(w.textposition=p(w.textposition));var _=l.getModule(w);if(_&&_.colorbar){var E=_.colorbar.container,L=E?w[E]:w;L&&L.colorscale&&("YIGnBu"===L.colorscale&&(L.colorscale="YlGnBu"),"YIOrRd"===L.colorscale&&(L.colorscale="YlOrRd"))}if("surface"===w.type&&T.isPlainObject(w.contours)){var C=["x","y","z"];for(m=0;m<C.length;m++){var P=w.contours[C[m]];T.isPlainObject(P)&&(P.highlightColor&&(P.highlightcolor=P.highlightColor,delete P.highlightColor),P.highlightWidth&&(P.highlightwidth=P.highlightWidth,delete P.highlightWidth))}}if("candlestick"===w.type||"ohlc"===w.type){var I=!1!==(w.increasing||{}).showlegend,U=!1!==(w.decreasing||{}).showlegend,z=a(w.increasing),H=a(w.decreasing);if(!1!==z&&!1!==H){var F=c(z,H,I,U);F&&(w.name=F)}else!z&&!H||w.name||(w.name=z||H)}if(Array.isArray(w.transforms)){var N=w.transforms;for(m=0;m<N.length;m++){var B=N[m];if(T.isPlainObject(B))switch(B.type){case"filter":B.filtersrc&&(B.target=B.filtersrc,delete B.filtersrc),B.calendar&&(B.valuecalendar||(B.valuecalendar=B.calendar),delete B.calendar);break;case"groupby":if(B.styles=B.styles||B.style,B.styles&&!Array.isArray(B.styles)){var j=B.styles,J=Object.keys(j);B.styles=[];for(var G=0;G<J.length;G++)B.styles.push({target:J[G],value:j[J[G]]})}}}}f(w,"line")&&delete w.line,"marker"in w&&(f(w.marker,"line")&&delete w.marker.line,f(w,"marker")&&delete w.marker),s.clean(w),w.autobinx&&(delete w.autobinx,delete w.xbins),w.autobiny&&(delete w.autobiny,delete w.ybins),i(w),w.colorbar&&i(w.colorbar),w.marker&&w.marker.colorbar&&i(w.marker.colorbar),w.line&&w.line.colorbar&&i(w.line.colorbar),w.aaxis&&i(w.aaxis),w.baxis&&i(w.baxis)}},R.swapXYData=function(y){var h;if(T.swapAttrs(y,["?","?0","d?","?bins","nbins?","autobin?","?src","error_?"]),Array.isArray(y.z)&&Array.isArray(y.z[0])&&(y.transpose?delete y.transpose:y.transpose=!0),y.error_x&&y.error_y){var m=y.error_y,w="copy_ystyle"in m?m.copy_ystyle:!(m.color||m.thickness||m.width);T.swapAttrs(y,["error_?.copy_ystyle"]),w&&T.swapAttrs(y,["error_?.color","error_?.thickness","error_?.width"])}if("string"==typeof y.hoverinfo){var u=y.hoverinfo.split("+");for(h=0;h<u.length;h++)"x"===u[h]?u[h]="y":"y"===u[h]&&(u[h]="x");y.hoverinfo=u.join("+")}},R.coerceTraceIndices=function(y,h){if(k(h))return[h];if(!Array.isArray(h)||!h.length)return y.data.map(function(u,S){return S});if(Array.isArray(h)){for(var m=[],w=0;w<h.length;w++)T.isIndex(h[w],y.data.length)?m.push(h[w]):T.warn("trace index (",h[w],") is not a number or is out of bounds");return m}return h},R.manageArrayContainers=function(y,h,m){var w=y.obj,u=y.parts,S=u.length,_=u[S-1],E=k(_);if(E&&null===h){var L=u.slice(0,S-1).join(".");T.nestedProperty(w,L).get().splice(_,1)}else E&&void 0===y.get()&&void 0===y.get()&&(m[y.astr]=null),y.set(h)};var x=/(\.[^\[\]\.]+|\[[^\[\]\.]+\])$/;function v(y){var h=y.search(x);if(h>0)return y.substr(0,h)}R.hasParent=function(y,h){for(var m=v(h);m;){if(m in y)return!0;m=v(m)}return!1};var g=["x","y","z"];R.clearAxisTypes=function(y,h,m){for(var w=0;w<h.length;w++)for(var u=y._fullData[w],S=0;S<3;S++){var _=o(y,u,g[S]);if(_&&"log"!==_.type){var E=_._name,L=_._id.substr(1);if("scene"===L.substr(0,5)){if(void 0!==m[L])continue;E=L+"."+E}var C=E+".type";void 0===m[E]&&void 0===m[C]&&T.nestedProperty(y.layout,C).set(null)}}}},10641:function($,R,e){"use strict";var k=e(72391);R._doPlot=k._doPlot,R.newPlot=k.newPlot,R.restyle=k.restyle,R.relayout=k.relayout,R.redraw=k.redraw,R.update=k.update,R._guiRestyle=k._guiRestyle,R._guiRelayout=k._guiRelayout,R._guiUpdate=k._guiUpdate,R._storeDirectGUIEdit=k._storeDirectGUIEdit,R.react=k.react,R.extendTraces=k.extendTraces,R.prependTraces=k.prependTraces,R.addTraces=k.addTraces,R.deleteTraces=k.deleteTraces,R.moveTraces=k.moveTraces,R.purge=k.purge,R.addFrames=k.addFrames,R.deleteFrames=k.deleteFrames,R.animate=k.animate,R.setPlotConfig=k.setPlotConfig,R.toImage=e(403),R.validate=e(84936),R.downloadImage=e(7239);var A=e(96318);R.makeTemplate=A.makeTemplate,R.validateTemplate=A.validateTemplate},6611:function($,R,e){"use strict";var k=e(41965),A=e(64213),l=e(47769),T=e(65888).sorterAsc,b=e(73972);R.containerArrayMatch=e(14458);var d=R.isAddVal=function(t){return"add"===t||k(t)},s=R.isRemoveVal=function(t){return null===t||"remove"===t};R.applyContainerArrayChanges=function(t,o,r,n,i){var a=o.astr,c=b.getComponentMethod(a,"supplyLayoutDefaults"),p=b.getComponentMethod(a,"draw"),f=b.getComponentMethod(a,"drawOne"),x=n.replot||n.recalc||c===A||p===A,v=t.layout,g=t._fullLayout;if(r[""]){Object.keys(r).length>1&&l.warn("Full array edits are incompatible with other edits",a);var y=r[""][""];if(s(y))o.set(null);else{if(!Array.isArray(y))return l.warn("Unrecognized full array edit value",a,y),!0;o.set(y)}return!x&&(c(v,g),p(t),!0)}var h,m,w,u,S,_,E,C=Object.keys(r).map(Number).sort(T),P=o.get(),I=P||[],U=i(g,a).get(),z=[],H=-1,F=I.length;for(h=0;h<C.length;h++)if(u=r[w=C[h]],S=Object.keys(u),E=d(_=u[""]),w<0||w>I.length-(E?0:1))l.warn("index out of range",a,w);else if(void 0!==_)S.length>1&&l.warn("Insertion & removal are incompatible with edits to the same index.",a,w),s(_)?z.push(w):E?("add"===_&&(_={}),I.splice(w,0,_),U&&U.splice(w,0,{})):l.warn("Unrecognized full object edit value",a,w,_),-1===H&&(H=w);else for(m=0;m<S.length;m++)i(I[w],S[m],a+"["+w+"].").set(u[S[m]]);for(h=z.length-1;h>=0;h--)I.splice(z[h],1),U&&U.splice(z[h],1);if(I.length?P||o.set(I):o.set(null),x)return!1;if(c(v,g),f!==A){var N;if(-1===H)N=C;else{for(F=Math.max(I.length,F),N=[],h=0;h<C.length&&!((w=C[h])>=H);h++)N.push(w);for(h=H;h<F;h++)N.push(h)}for(h=0;h<N.length;h++)f(t,N[h])}else p(t);return!0}},72391:function($,R,e){"use strict";var k=e(39898),A=e(92770),l=e(57035),T=e(71828),b=T.nestedProperty,d=e(11086),s=e(10847),t=e(73972),o=e(86281),r=e(74875),n=e(89298),i=e(91424),a=e(7901),c=e(4305).initInteractions,p=e(77922),f=e(47322).clearOutline,x=e(72075).dfltConfig,v=e(6611),g=e(58377),y=e(61549),h=e(30962),m=e(85555).AX_NAME_PATTERN,w=0;function u(Q){var se=Q._fullLayout;se._redrawFromAutoMarginCount?se._redrawFromAutoMarginCount--:Q.emit("plotly_afterplot")}function S(Q,se){try{Q._fullLayout._paper.style("background",se)}catch(fe){T.error(fe)}}function _(Q,se){S(Q,a.combine(se,"white"))}function E(Q,se){if(!Q._context){Q._context=T.extendDeep({},x);var fe=k.select("base");Q._context._baseUrl=fe.size()&&fe.attr("href")?window.location.href.split("#")[0]:""}var ye,Me,Ie,Ce=Q._context;if(se){for(Me=Object.keys(se),ye=0;ye<Me.length;ye++)"editable"!==(Ie=Me[ye])&&"edits"!==Ie&&Ie in Ce&&(Ce[Ie]="setBackground"===Ie&&"opaque"===se[Ie]?_:se[Ie]);se.plot3dPixelRatio&&!Ce.plotGlPixelRatio&&(Ce.plotGlPixelRatio=Ce.plot3dPixelRatio);var Re=se.editable;if(void 0!==Re)for(Ce.editable=Re,Me=Object.keys(Ce.edits),ye=0;ye<Me.length;ye++)Ce.edits[Me[ye]]=Re;if(se.edits)for(Me=Object.keys(se.edits),ye=0;ye<Me.length;ye++)(Ie=Me[ye])in Ce.edits&&(Ce.edits[Ie]=se.edits[Ie]);Ce._exportedPlot=se._exportedPlot}Ce.staticPlot&&(Ce.editable=!1,Ce.edits={},Ce.autosizable=!1,Ce.scrollZoom=!1,Ce.doubleClick=!1,Ce.showTips=!1,Ce.showLink=!1,Ce.displayModeBar=!1),"hover"!==Ce.displayModeBar||l||(Ce.displayModeBar=!0),"transparent"!==Ce.setBackground&&"function"==typeof Ce.setBackground||(Ce.setBackground=S),Ce._hasZeroHeight=Ce._hasZeroHeight||0===Q.clientHeight,Ce._hasZeroWidth=Ce._hasZeroWidth||0===Q.clientWidth;var le=Ce.scrollZoom,ge=Ce._scrollZoom={};if(!0===le)ge.cartesian=1,ge.gl3d=1,ge.geo=1,ge.mapbox=1;else if("string"==typeof le){var _e=le.split("+");for(ye=0;ye<_e.length;ye++)ge[_e[ye]]=1}else!1!==le&&(ge.gl3d=1,ge.geo=1,ge.mapbox=1)}function L(Q,se){var fe,ye,Me=se+1,Ie=[];for(fe=0;fe<Q.length;fe++)(ye=Q[fe])<0?Ie.push(Me+ye):Ie.push(ye);return Ie}function C(Q,se,fe){var ye,Me;for(ye=0;ye<se.length;ye++){if((Me=se[ye])!==parseInt(Me,10))throw new Error("all values in "+fe+" must be integers");if(Me>=Q.data.length||Me<-Q.data.length)throw new Error(fe+" must be valid indices for gd.data.");if(se.indexOf(Me,ye+1)>-1||Me>=0&&se.indexOf(-Q.data.length+Me)>-1||Me<0&&se.indexOf(Q.data.length+Me)>-1)throw new Error("each index in "+fe+" must be unique.")}}function P(Q,se,fe){if(!Array.isArray(Q.data))throw new Error("gd.data must be an array.");if(void 0===se)throw new Error("currentIndices is a required argument.");if(Array.isArray(se)||(se=[se]),C(Q,se,"currentIndices"),void 0===fe||Array.isArray(fe)||(fe=[fe]),void 0!==fe&&C(Q,fe,"newIndices"),void 0!==fe&&se.length!==fe.length)throw new Error("current and new indices must be of equal length.")}function I(Q,se,fe,ye,Me){!function(Ve,He,nt,tt){var ot=T.isPlainObject(tt);if(!Array.isArray(Ve.data))throw new Error("gd.data must be an array");if(!T.isPlainObject(He))throw new Error("update must be a key:value object");if(void 0===nt)throw new Error("indices must be an integer or array of integers");for(var dt in C(Ve,nt,"indices"),He){if(!Array.isArray(He[dt])||He[dt].length!==nt.length)throw new Error("attribute "+dt+" must be an array of length equal to indices array length");if(ot&&(!(dt in tt)||!Array.isArray(tt[dt])||tt[dt].length!==He[dt].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")}}(Q,se,fe,ye);for(var Ie=function(Ve,He,nt,tt){var dt,kt,mt,wt,Lt=T.isPlainObject(tt),Ct=[];for(var It in Array.isArray(nt)||(nt=[nt]),nt=L(nt,Ve.data.length-1),He)for(var Ut=0;Ut<nt.length;Ut++){if(dt=(kt=b(Ve.data[nt[Ut]],It)).get(),!T.isArrayOrTypedArray(mt=He[It][Ut]))throw new Error("attribute: "+It+" index: "+Ut+" must be an array");if(!T.isArrayOrTypedArray(dt))throw new Error("cannot extend missing or non-array attribute: "+It);if(dt.constructor!==mt.constructor)throw new Error("cannot extend array with an array of a different type: "+It);A(wt=Lt?tt[It][Ut]:tt)||(wt=-1),Ct.push({prop:kt,target:dt,insert:mt,maxp:Math.floor(wt)})}return Ct}(Q,se,fe,ye),Ce={},Re={},le=0;le<Ie.length;le++){var ge=Ie[le].prop,Fe=Me(Ie[le].target,Ie[le].insert,Ie[le].maxp);ge.set(Fe[0]),Array.isArray(Ce[ge.astr])||(Ce[ge.astr]=[]),Ce[ge.astr].push(Fe[1]),Array.isArray(Re[ge.astr])||(Re[ge.astr]=[]),Re[ge.astr].push(Ie[le].target.length)}return{update:Ce,maxPoints:Re}}function U(Q,se){var fe=new Q.constructor(Q.length+se.length);return fe.set(Q),fe.set(se,Q.length),fe}function z(Q,se,fe,ye){Q=T.getGraphDiv(Q),g.clearPromiseQueue(Q);var Me={};if("string"==typeof se)Me[se]=fe;else{if(!T.isPlainObject(se))return T.warn("Restyle fail.",se,fe,ye),Promise.reject();Me=T.extendFlat({},se),void 0===ye&&(ye=fe)}Object.keys(Me).length&&(Q.changed=!0);var Ie=g.coerceTraceIndices(Q,ye),Ce=B(Q,Me,Ie),Re=Ce.flags;Re.calc&&(Q.calcdata=void 0),Re.clearAxisTypes&&g.clearAxisTypes(Q,Ie,{});var le=[];Re.fullReplot?le.push(R._doPlot):(le.push(r.previousPromises),r.supplyDefaults(Q),Re.markerSize&&(r.doCalcdata(Q),V(le)),Re.style&&le.push(y.doTraceStyle),Re.colorbars&&le.push(y.doColorBars),le.push(u)),le.push(r.rehover,r.redrag,r.reselect),s.add(Q,z,[Q,Ce.undoit,Ce.traces],z,[Q,Ce.redoit,Ce.traces]);var ge=T.syncOrAsync(le,Q);return ge&&ge.then||(ge=Promise.resolve()),ge.then(function(){return Q.emit("plotly_restyle",Ce.eventData),Q})}function H(Q){return void 0===Q?null:Q}function F(Q,se){return se?function(fe,ye,Me){var Ie=b(fe,ye),Ce=Ie.set;return Ie.set=function(Re){N((Me||"")+ye,Ie.get(),Re,Q),Ce(Re)},Ie}:b}function N(Q,se,fe,ye){if(Array.isArray(se)||Array.isArray(fe))for(var Me=Array.isArray(se)?se:[],Ie=Array.isArray(fe)?fe:[],Ce=Math.max(Me.length,Ie.length),Re=0;Re<Ce;Re++)N(Q+"["+Re+"]",Me[Re],Ie[Re],ye);else if(T.isPlainObject(se)||T.isPlainObject(fe)){var le=T.isPlainObject(se)?se:{},ge=T.isPlainObject(fe)?fe:{},_e=T.extendFlat({},le,ge);for(var Fe in _e)N(Q+"."+Fe,le[Fe],ge[Fe],ye)}else void 0===ye[Q]&&(ye[Q]=H(se))}function B(Q,se,fe){var ye,Me=Q._fullLayout,Ie=Q._fullData,Ce=Q.data,Re=Me._guiEditing,le=F(Me._preGUI,Re),ge=T.extendDeepAll({},se);j(se);var _e,Fe=h.traceFlags(),Ve={},He={};function nt(){return fe.map(function(){})}function tt(Nt){var Gt=n.id2name(Nt);-1===_e.indexOf(Gt)&&_e.push(Gt)}function ot(Nt){return"LAYOUT"+Nt+".autorange"}function dt(Nt){return"LAYOUT"+Nt+".range"}function kt(Nt){for(var Gt=Nt;Gt<Ie.length;Gt++)if(Ie[Gt]._input===Ce[Nt])return Ie[Gt]}function mt(Nt,Gt,un){if(Array.isArray(Nt))Nt.forEach(function(wn){mt(wn,Gt,un)});else if(!(Nt in se)&&!g.hasParent(se,Nt)){var pn;if("LAYOUT"===Nt.substr(0,6))pn=le(Q.layout,Nt.replace("LAYOUT",""));else{var Kt=fe[un];pn=F(Me._tracePreGUI[kt(Kt)._fullInput.uid],Re)(Ce[Kt],Nt)}Nt in He||(He[Nt]=nt()),void 0===He[Nt][un]&&(He[Nt][un]=H(pn.get())),void 0!==Gt&&pn.set(Gt)}}function wt(Nt){return function(Gt){return Ie[Gt][Nt]}}function Lt(Nt){return function(Gt,un){return!1===Gt?Ie[fe[un]][Nt]:null}}for(var Ct in se){if(g.hasParent(se,Ct))throw new Error("cannot set "+Ct+" and a parent attribute simultaneously");var It,Ut,Rt,Ge,We,Be,Ye=se[Ct];if("autobinx"!==Ct&&"autobiny"!==Ct||(Ct=Ct.charAt(Ct.length-1)+"bins",Ye=Array.isArray(Ye)?Ye.map(Lt(Ct)):!1===Ye?fe.map(wt(Ct)):null),Ve[Ct]=Ye,"LAYOUT"!==Ct.substr(0,6)){for(He[Ct]=nt(),ye=0;ye<fe.length;ye++)if(It=Ce[fe[ye]],Ut=kt(fe[ye]),Ge=(Rt=F(Me._tracePreGUI[Ut._fullInput.uid],Re)(It,Ct)).get(),void 0!==(We=Array.isArray(Ye)?Ye[ye%Ye.length]:Ye)){var rt=Rt.parts[Rt.parts.length-1],Se=Ct.substr(0,Ct.length-rt.length-1),ze=Se?Se+".":"",Ke=Se?b(Ut,Se).get():Ut;if((Be=o.getTraceValObject(Ut,Rt.parts))&&Be.impliedEdits&&null!==We)for(var st in Be.impliedEdits)mt(T.relativeAttr(Ct,st),Be.impliedEdits[st],ye);else if("thicknessmode"!==rt&&"lenmode"!==rt||Ge===We||"fraction"!==We&&"pixels"!==We||!Ke){if("type"===Ct&&("pie"===We!=("pie"===Ge)||"funnelarea"===We!=("funnelarea"===Ge))){var ct="x",Tt="y";"bar"!==We&&"bar"!==Ge||"h"!==It.orientation||(ct="y",Tt="x"),T.swapAttrs(It,["?","?src"],"labels",ct),T.swapAttrs(It,["d?","?0"],"label",ct),T.swapAttrs(It,["?","?src"],"values",Tt),"pie"===Ge||"funnelarea"===Ge?(b(It,"marker.color").set(b(It,"marker.colors").get()),Me._pielayer.selectAll("g.trace").remove()):t.traceIs(It,"cartesian")&&b(It,"marker.colors").set(b(It,"marker.color").get())}}else{var Et=Me._size,At=Ke.orient,ht="top"===At||"bottom"===At;if("thicknessmode"===rt){var pt=ht?Et.h:Et.w;mt(ze+"thickness",Ke.thickness*("fraction"===We?1/pt:pt),ye)}else{var gt=ht?Et.w:Et.h;mt(ze+"len",Ke.len*("fraction"===We?1/gt:gt),ye)}}if(He[Ct][ye]=H(Ge),-1!==["swapxy","swapxyaxes","orientation","orientationaxes"].indexOf(Ct)){if("orientation"===Ct){Rt.set(We);var Pt=It.x&&!It.y?"h":"v";if((Rt.get()||Pt)===Ut.orientation)continue}else"orientationaxes"===Ct&&(It.orientation={v:"h",h:"v"}[Ut.orientation]);g.swapXYData(It),Fe.calc=Fe.clearAxisTypes=!0}else-1!==r.dataArrayContainers.indexOf(Rt.parts[0])?(g.manageArrayContainers(Rt,We,He),Fe.calc=!0):(Be?Be.arrayOk&&!t.traceIs(Ut,"regl")&&(T.isArrayOrTypedArray(We)||T.isArrayOrTypedArray(Ge))?Fe.calc=!0:h.update(Fe,Be):Fe.calc=!0,Rt.set(We))}if(-1!==["swapxyaxes","orientationaxes"].indexOf(Ct)&&n.swap(Q,fe),"orientationaxes"===Ct){var Ot=b(Q.layout,"hovermode"),Ht=Ot.get();"x"===Ht?Ot.set("y"):"y"===Ht?Ot.set("x"):"x unified"===Ht?Ot.set("y unified"):"y unified"===Ht&&Ot.set("x unified")}if(-1!==["orientation","type"].indexOf(Ct)){for(_e=[],ye=0;ye<fe.length;ye++){var jt=Ce[fe[ye]];t.traceIs(jt,"cartesian")&&(tt(jt.xaxis||"x"),tt(jt.yaxis||"y"))}mt(_e.map(ot),!0,0),mt(_e.map(dt),[0,1],0)}}else Rt=le(Q.layout,Ct.replace("LAYOUT","")),He[Ct]=[H(Rt.get())],Rt.set(Array.isArray(Ye)?Ye[0]:Ye),Fe.calc=!0}return(Fe.calc||Fe.plot)&&(Fe.fullReplot=!0),{flags:Fe,undoit:He,redoit:Ve,traces:fe,eventData:T.extendDeepNoArrays([],[ge,fe])}}function j(Q){var se,fe,ye,Me=T.counterRegex("axis",".title",!1,!1),Ie=/colorbar\.title$/,Ce=Object.keys(Q);for(se=0;se<Ce.length;se++)ye=Q[fe=Ce[se]],"title"!==fe&&!Me.test(fe)&&!Ie.test(fe)||"string"!=typeof ye&&"number"!=typeof ye?fe.indexOf("titlefont")>-1&&-1===fe.indexOf("grouptitlefont")?Re(fe,fe.replace("titlefont","title.font")):fe.indexOf("titleposition")>-1?Re(fe,fe.replace("titleposition","title.position")):fe.indexOf("titleside")>-1?Re(fe,fe.replace("titleside","title.side")):fe.indexOf("titleoffset")>-1&&Re(fe,fe.replace("titleoffset","title.offset")):Re(fe,fe.replace("title","title.text"));function Re(le,ge){Q[ge]=Q[le],delete Q[le]}}function J(Q,se,fe){Q=T.getGraphDiv(Q),g.clearPromiseQueue(Q);var ye={};if("string"==typeof se)ye[se]=fe;else{if(!T.isPlainObject(se))return T.warn("Relayout fail.",se,fe),Promise.reject();ye=T.extendFlat({},se)}Object.keys(ye).length&&(Q.changed=!0);var Me=re(Q,ye),Ie=Me.flags;Ie.calc&&(Q.calcdata=void 0);var Ce=[r.previousPromises];Ie.layoutReplot?Ce.push(y.layoutReplot):Object.keys(ye).length&&(G(Q,Ie,Me)||r.supplyDefaults(Q),Ie.legend&&Ce.push(y.doLegend),Ie.layoutstyle&&Ce.push(y.layoutStyles),Ie.axrange&&V(Ce,Me.rangesAltered),Ie.ticks&&Ce.push(y.doTicksRelayout),Ie.modebar&&Ce.push(y.doModeBar),Ie.camera&&Ce.push(y.doCamera),Ie.colorbars&&Ce.push(y.doColorBars),Ce.push(u)),Ce.push(r.rehover,r.redrag,r.reselect),s.add(Q,J,[Q,Me.undoit],J,[Q,Me.redoit]);var Re=T.syncOrAsync(Ce,Q);return Re&&Re.then||(Re=Promise.resolve(Q)),Re.then(function(){return Q.emit("plotly_relayout",Me.eventData),Q})}function G(Q,se,fe){var ye=Q._fullLayout;if(!se.axrange)return!1;for(var Me in se)if("axrange"!==Me&&se[Me])return!1;for(var Ie in fe.rangesAltered){var Ce=n.id2name(Ie),Re=Q.layout[Ce],le=ye[Ce];if(le.autorange=Re.autorange,Re.range&&(le.range=Re.range.slice()),le.cleanRange(),le._matchGroup)for(var ge in le._matchGroup)if(ge!==Ie){var _e=ye[n.id2name(ge)];_e.autorange=le.autorange,_e.range=le.range.slice(),_e._input.range=le.range.slice()}}return!0}function V(Q,se){Q.push(f,y.doAutoRangeAndConstraints,se?function(ye){var Me=[];for(var Ie in se){var Ce=n.getFromId(ye,Ie);if(Me.push(Ie),-1!==(Ce.ticklabelposition||"").indexOf("inside")&&Ce._anchorAxis&&Me.push(Ce._anchorAxis._id),Ce._matchGroup)for(var Re in Ce._matchGroup)se[Re]||Me.push(Re)}return n.draw(ye,Me,{skipTitle:!0})}:function(ye){return n.draw(ye,"redraw")},y.drawData,y.finalDraw)}var W=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,X=/^[xyz]axis[0-9]*\.autorange$/,K=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function re(Q,se){var fe,ye,Me,Ie=Q.layout,Ce=Q._fullLayout,le=F(Ce._preGUI,Ce._guiEditing),ge=Object.keys(se),_e=n.list(Q),Fe=T.extendDeepAll({},se),Ve={};for(j(se),ge=Object.keys(se),ye=0;ye<ge.length;ye++)if(0===ge[ye].indexOf("allaxes")){for(Me=0;Me<_e.length;Me++){var He=_e[Me]._id.substr(1),nt=-1!==He.indexOf("scene")?He+".":"",tt=ge[ye].replace("allaxes",nt+_e[Me]._name);se[tt]||(se[tt]=se[ge[ye]])}delete se[ge[ye]]}var ot=h.layoutFlags(),dt={},kt={};function mt(Kt,wn){if(Array.isArray(Kt))Kt.forEach(function(vn){mt(vn,wn)});else if(!(Kt in se)&&!g.hasParent(se,Kt)){var Bn=le(Ie,Kt);Kt in kt||(kt[Kt]=H(Bn.get())),void 0!==wn&&Bn.set(wn)}}var wt,Lt={};function Ct(Kt){var wn=n.name2id(Kt.split(".")[0]);return Lt[wn]=1,wn}for(var It in se){if(g.hasParent(se,It))throw new Error("cannot set "+It+" and a parent attribute simultaneously");for(var Ut=le(Ie,It),Rt=se[It],Ge=Ut.parts.length-1;Ge>0&&"string"!=typeof Ut.parts[Ge];)Ge--;var We=Ut.parts[Ge],Be=Ut.parts[Ge-1]+"."+We,Ye=Ut.parts.slice(0,Ge).join("."),rt=b(Q.layout,Ye).get(),Se=b(Ce,Ye).get(),ze=Ut.get();if(void 0!==Rt){dt[It]=Rt,kt[It]="reverse"===We?Rt:H(ze);var Ke=o.getLayoutValObject(Ce,Ut.parts);if(Ke&&Ke.impliedEdits&&null!==Rt)for(var st in Ke.impliedEdits)mt(T.relativeAttr(It,st),Ke.impliedEdits[st]);if(-1!==["width","height"].indexOf(It))if(Rt){mt("autosize",null);var ct="height"===It?"width":"height";mt(ct,Ce[ct])}else Ce[It]=Q._initialAutoSize[It];else if("autosize"===It)mt("width",Rt?null:Ce.width),mt("height",Rt?null:Ce.height);else if(Be.match(W))Ct(Be),b(Ce,Ye+"._inputRange").set(null);else if(Be.match(X)){Ct(Be),b(Ce,Ye+"._inputRange").set(null);var Tt=b(Ce,Ye).get();Tt._inputDomain&&(Tt._input.domain=Tt._inputDomain.slice())}else Be.match(K)&&b(Ce,Ye+"._inputDomain").set(null);if("type"===We){wt=rt;var Et="linear"===Se.type&&"log"===Rt;if(Et||"log"===Se.type&&"linear"===Rt){if(wt&&wt.range)if(Se.autorange)Et&&(wt.range=wt.range[1]>wt.range[0]?[1,2]:[2,1]);else{var ht=wt.range[0],pt=wt.range[1];Et?(ht<=0&&pt<=0&&mt(Ye+".autorange",!0),ht<=0?ht=pt/1e6:pt<=0&&(pt=ht/1e6),mt(Ye+".range[0]",Math.log(ht)/Math.LN10),mt(Ye+".range[1]",Math.log(pt)/Math.LN10)):(mt(Ye+".range[0]",Math.pow(10,ht)),mt(Ye+".range[1]",Math.pow(10,pt)))}else mt(Ye+".autorange",!0);Array.isArray(Ce._subplots.polar)&&Ce._subplots.polar.length&&Ce[Ut.parts[0]]&&"radialaxis"===Ut.parts[1]&&delete Ce[Ut.parts[0]]._subplot.viewInitial["radialaxis.range"],t.getComponentMethod("annotations","convertCoords")(Q,Se,Rt,mt),t.getComponentMethod("images","convertCoords")(Q,Se,Rt,mt)}else mt(Ye+".autorange",!0),mt(Ye+".range",null);b(Ce,Ye+"._inputRange").set(null)}else if(We.match(m)){var gt=b(Ce,It).get(),Pt=(Rt||{}).type;Pt&&"-"!==Pt||(Pt="linear"),t.getComponentMethod("annotations","convertCoords")(Q,gt,Pt,mt),t.getComponentMethod("images","convertCoords")(Q,gt,Pt,mt)}var Ot=v.containerArrayMatch(It);if(Ot){fe=Ot.array;var Ht=Ot.property,jt=Ke||{editType:"calc"};""!==(ye=Ot.index)&&""===Ht&&(v.isAddVal(Rt)?kt[It]=null:v.isRemoveVal(Rt)?kt[It]=(b(Ie,fe).get()||[])[ye]:T.warn("unrecognized full object value",se)),h.update(ot,jt),Ve[fe]||(Ve[fe]={});var Nt=Ve[fe][ye];Nt||(Nt=Ve[fe][ye]={}),Nt[Ht]=Rt,delete se[It]}else"reverse"===We?(rt.range?rt.range.reverse():(mt(Ye+".autorange",!0),rt.range=[1,0]),Se.autorange?ot.calc=!0:ot.plot=!0):("dragmode"===It&&(!1===Rt&&!1!==ze||!1!==Rt&&!1===ze)||Ce._has("scatter-like")&&Ce._has("regl")&&"dragmode"===It&&("lasso"===Rt||"select"===Rt)&&"lasso"!==ze&&"select"!==ze||Ce._has("gl2d")?ot.plot=!0:Ke?h.update(ot,Ke):ot.calc=!0,Ut.set(Rt))}}for(fe in Ve)v.applyContainerArrayChanges(Q,le(Ie,fe),Ve[fe],ot,le)||(ot.plot=!0);for(var Gt in Lt){var un=(wt=n.getFromId(Q,Gt))&&wt._constraintGroup;if(un)for(var pn in ot.calc=!0,un)Lt[pn]||(n.getFromId(Q,pn)._constraintShrinkable=!0)}return(ee(Q)||se.height||se.width)&&(ot.plot=!0),(ot.plot||ot.calc)&&(ot.layoutReplot=!0),{flags:ot,rangesAltered:Lt,undoit:kt,redoit:dt,eventData:Fe}}function ee(Q){var se=Q._fullLayout,fe=se.width,ye=se.height;return Q.layout.autosize&&r.plotAutoSize(Q,Q.layout,se),se.width!==fe||se.height!==ye}function ie(Q,se,fe,ye){Q=T.getGraphDiv(Q),g.clearPromiseQueue(Q),T.isPlainObject(se)||(se={}),T.isPlainObject(fe)||(fe={}),Object.keys(se).length&&(Q.changed=!0),Object.keys(fe).length&&(Q.changed=!0);var Me=g.coerceTraceIndices(Q,ye),Ie=B(Q,T.extendFlat({},se),Me),Ce=Ie.flags,Re=re(Q,T.extendFlat({},fe)),le=Re.flags;(Ce.calc||le.calc)&&(Q.calcdata=void 0),Ce.clearAxisTypes&&g.clearAxisTypes(Q,Me,fe);var ge=[];le.layoutReplot?ge.push(y.layoutReplot):Ce.fullReplot?ge.push(R._doPlot):(ge.push(r.previousPromises),G(Q,le,Re)||r.supplyDefaults(Q),Ce.style&&ge.push(y.doTraceStyle),(Ce.colorbars||le.colorbars)&&ge.push(y.doColorBars),le.legend&&ge.push(y.doLegend),le.layoutstyle&&ge.push(y.layoutStyles),le.axrange&&V(ge,Re.rangesAltered),le.ticks&&ge.push(y.doTicksRelayout),le.modebar&&ge.push(y.doModeBar),le.camera&&ge.push(y.doCamera),ge.push(u)),ge.push(r.rehover,r.redrag,r.reselect),s.add(Q,ie,[Q,Ie.undoit,Re.undoit,Ie.traces],ie,[Q,Ie.redoit,Re.redoit,Ie.traces]);var _e=T.syncOrAsync(ge,Q);return _e&&_e.then||(_e=Promise.resolve(Q)),_e.then(function(){return Q.emit("plotly_update",{data:Ie.eventData,layout:Re.eventData}),Q})}function oe(Q){return function(se){se._fullLayout._guiEditing=!0;var fe=Q.apply(null,arguments);return se._fullLayout._guiEditing=!1,fe}}var ce=[{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"}],me=[{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 de(Q,se){for(var fe=0;fe<se.length;fe++){var ye=se[fe],Me=Q.match(ye.pattern);if(Me){var Ie=Me[1]||"";return{head:Ie,tail:Q.substr(Ie.length+1),attr:ye.attr}}}}function he(Q,se){var fe=b(se,Q).get();if(void 0!==fe)return fe;var ye=Q.split(".");for(ye.pop();ye.length>1;)if(ye.pop(),void 0!==(fe=b(se,ye.join(".")+".uirevision").get()))return fe;return se.uirevision}function ve(Q,se){for(var fe=0;fe<se.length;fe++)if(se[fe]._fullInput.uid===Q)return fe;return-1}function Pe(Q,se,fe){for(var ye=0;ye<se.length;ye++)if(se[ye].uid===Q)return ye;return!se[fe]||se[fe].uid?-1:fe}function xe(Q,se){var fe=T.isPlainObject(Q),ye=Array.isArray(Q);return fe||ye?(fe&&T.isPlainObject(se)||ye&&Array.isArray(se))&&JSON.stringify(Q)===JSON.stringify(se):Q===se}function ke(Q,se,fe,ye){var Me,Ie,Ce,Re=ye.getValObject,le=ye.flags,ge=ye.immutable,_e=ye.inArray,Fe=ye.arrayIndex;function Ve(){var rt=Me.editType;_e&&-1!==rt.indexOf("arraydraw")?T.pushUnique(le.arrays[_e],Fe):(h.update(le,Me),"none"!==rt&&le.nChanges++,ye.transition&&Me.anim&&le.nChangesAnim++,(W.test(Ce)||X.test(Ce))&&(le.rangesAltered[fe[0]]=1),K.test(Ce)&&b(se,"_inputDomain").set(null),"datarevision"===Ie&&(le.newDataRevision=1))}function He(rt){return"data_array"===rt.valType||rt.arrayOk}for(Ie in Q){if(le.calc&&!ye.transition)return;var nt=Q[Ie],tt=se[Ie],ot=fe.concat(Ie);if(Ce=ot.join("."),"_"!==Ie.charAt(0)&&"function"!=typeof nt&&nt!==tt){if(("tick0"===Ie||"dtick"===Ie)&&"geo"!==fe[0]){var dt=se.tickmode;if("auto"===dt||"array"===dt||!dt)continue}if(("range"!==Ie||!se.autorange)&&("zmin"!==Ie&&"zmax"!==Ie||"contourcarpet"!==se.type)&&(Me=Re(ot))&&(!Me._compareAsJSON||JSON.stringify(nt)!==JSON.stringify(tt))){var kt,mt=Me.valType,wt=He(Me),Lt=Array.isArray(nt),Ct=Array.isArray(tt);if(Lt&&Ct){var It="_input_"+Ie,Ut=Q[It],Rt=se[It];if(Array.isArray(Ut)&&Ut===Rt)continue}if(void 0===tt)wt&&Lt?le.calc=!0:Ve();else if(Me._isLinkedToArray){var Ge=[],We=!1;_e||(le.arrays[Ie]=Ge);var Be=Math.min(nt.length,tt.length),Ye=Math.max(nt.length,tt.length);if(Be!==Ye){if("arraydraw"!==Me.editType){Ve();continue}We=!0}for(kt=0;kt<Be;kt++)ke(nt[kt],tt[kt],ot.concat(kt),T.extendFlat({inArray:Ie,arrayIndex:kt},ye));if(We)for(kt=Be;kt<Ye;kt++)Ge.push(kt)}else!mt&&T.isPlainObject(nt)?ke(nt,tt,ot,ye):wt?Lt&&Ct?(ge&&(le.calc=!0),(ge||ye.newDataRevision)&&Ve()):Lt!==Ct?le.calc=!0:Ve():Lt&&Ct&&nt.length===tt.length&&String(nt)===String(tt)||Ve()}}}for(Ie in se)if(!(Ie in Q)&&"_"!==Ie.charAt(0)&&"function"!=typeof se[Ie]){if(He(Me=Re(fe.concat(Ie)))&&Array.isArray(se[Ie]))return void(le.calc=!0);Ve()}}function Ae(Q,se){var fe;for(fe in Q)if("_"!==fe.charAt(0)){var ye=Q[fe],Me=se[fe];if(ye!==Me)if(T.isPlainObject(ye)&&T.isPlainObject(Me)){if(Ae(ye,Me))return!0}else{if(!Array.isArray(ye)||!Array.isArray(Me)||ye.length!==Me.length)return!0;for(var Ie=0;Ie<ye.length;Ie++)if(ye[Ie]!==Me[Ie]&&(!T.isPlainObject(ye[Ie])||!T.isPlainObject(Me[Ie])||Ae(ye[Ie],Me[Ie])))return!0}}}function Te(Q){var se=Q._fullLayout,fe=Q.getBoundingClientRect();if(!T.equalDomRects(fe,se._lastBBox)){var ye=se._invTransform=T.inverseTransformMatrix(T.getFullTransformMatrix(Q));se._invScaleX=Math.sqrt(ye[0][0]*ye[0][0]+ye[0][1]*ye[0][1]+ye[0][2]*ye[0][2]),se._invScaleY=Math.sqrt(ye[1][0]*ye[1][0]+ye[1][1]*ye[1][1]+ye[1][2]*ye[1][2]),se._lastBBox=fe}}R.animate=function(Q,se,fe){if(Q=T.getGraphDiv(Q),!T.isPlotDiv(Q))throw new Error("This element is not a Plotly plot: "+Q+". It's likely that you've failed to create a plot before animating it. For more details, see https://plotly.com/javascript/animations/");var ye=Q._transitionData;ye._frameQueue||(ye._frameQueue=[]);var Me=(fe=r.supplyAnimationDefaults(fe)).transition,Ie=fe.frame;function Ce(ge){return Array.isArray(Me)?ge>=Me.length?Me[0]:Me[ge]:Me}function Re(ge){return Array.isArray(Ie)?ge>=Ie.length?Ie[0]:Ie[ge]:Ie}function le(ge,_e){var Fe=0;return function(){if(ge&&++Fe===_e)return ge()}}return void 0===ye._frameWaitingCnt&&(ye._frameWaitingCnt=0),new Promise(function(ge,_e){var Ve,He,nt=0;function tt(It){return It.transitionOpts=Array.isArray(Me)?nt>=Me.length?Me[nt]:Me[0]:Me,nt++,It}var ot=[],dt=null==se,kt=Array.isArray(se);if(dt||kt||!T.isPlainObject(se)){if(dt||-1!==["string","number"].indexOf(typeof se))for(Ve=0;Ve<ye._frames.length;Ve++)(He=ye._frames[Ve])&&(dt||String(He.group)===String(se))&&ot.push({type:"byname",name:String(He.name),data:tt({name:He.name})});else if(kt)for(Ve=0;Ve<se.length;Ve++){var mt=se[Ve];-1!==["number","string"].indexOf(typeof mt)?(mt=String(mt),ot.push({type:"byname",name:mt,data:tt({name:mt})})):T.isPlainObject(mt)&&ot.push({type:"object",data:tt(T.extendFlat({},mt))})}}else ot.push({type:"object",data:tt(T.extendFlat({},se))});for(Ve=0;Ve<ot.length;Ve++)if("byname"===(He=ot[Ve]).type&&!ye._frameHash[He.data.name])return T.warn('animate failure: frame not found: "'+He.data.name+'"'),void _e();-1!==["next","immediate"].indexOf(fe.mode)&&function(){if(0!==ye._frameQueue.length){for(;ye._frameQueue.length;){var It=ye._frameQueue.pop();It.onInterrupt&&It.onInterrupt()}Q.emit("plotly_animationinterrupted",[])}}(),"reverse"===fe.direction&&ot.reverse();var wt=Q._fullLayout._currentFrame;if(wt&&fe.fromcurrent){var Lt=-1;for(Ve=0;Ve<ot.length;Ve++)if("byname"===(He=ot[Ve]).type&&He.name===wt){Lt=Ve;break}if(Lt>0&&Lt<ot.length-1){var Ct=[];for(Ve=0;Ve<ot.length;Ve++)He=ot[Ve],("byname"!==ot[Ve].type||Ve>Lt)&&Ct.push(He);ot=Ct}}ot.length>0?function(It){if(0!==It.length){for(var Ut=0;Ut<It.length;Ut++){var Rt;Rt="byname"===It[Ut].type?r.computeFrame(Q,It[Ut].name):It[Ut].data;var Ge=Re(Ut),We=Ce(Ut);We.duration=Math.min(We.duration,Ge.duration);var Be={frame:Rt,name:It[Ut].name,frameOpts:Ge,transitionOpts:We};Ut===It.length-1&&(Be.onComplete=le(ge,2),Be.onInterrupt=_e),ye._frameQueue.push(Be)}"immediate"===fe.mode&&(ye._lastFrameAt=-1/0),ye._animationRaf||function Fe(){Q.emit("plotly_animating"),ye._lastFrameAt=-1/0,ye._timeToNext=0,ye._runningTransitions=0,ye._currentFrame=null;var It=function(){ye._animationRaf=window.requestAnimationFrame(It),Date.now()-ye._lastFrameAt>ye._timeToNext&&function(){ye._currentFrame&&ye._currentFrame.onComplete&&ye._currentFrame.onComplete();var Ut=ye._currentFrame=ye._frameQueue.shift();if(Ut){var Rt=Ut.name?Ut.name.toString():null;Q._fullLayout._currentFrame=Rt,ye._lastFrameAt=Date.now(),ye._timeToNext=Ut.frameOpts.duration,r.transition(Q,Ut.frame.data,Ut.frame.layout,g.coerceTraceIndices(Q,Ut.frame.traces),Ut.frameOpts,Ut.transitionOpts).then(function(){Ut.onComplete&&Ut.onComplete()}),Q.emit("plotly_animatingframe",{name:Rt,frame:Ut.frame,animation:{frame:Ut.frameOpts,transition:Ut.transitionOpts}})}else Q.emit("plotly_animated"),window.cancelAnimationFrame(ye._animationRaf),ye._animationRaf=null}()};It()}()}}(ot):(Q.emit("plotly_animated"),ge())})},R.addFrames=function(Q,se,fe){if(Q=T.getGraphDiv(Q),null==se)return Promise.resolve();if(!T.isPlotDiv(Q))throw new Error("This element is not a Plotly plot: "+Q+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var ye,Me,Ie,Ce,Re=Q._transitionData._frames,le=Q._transitionData._frameHash;if(!Array.isArray(se))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+se);var ge=Re.length+2*se.length,_e=[],Fe={};for(ye=se.length-1;ye>=0;ye--)if(T.isPlainObject(se[ye])){var Ve=se[ye].name,He=(le[Ve]||Fe[Ve]||{}).name,nt=se[ye].name;He&&nt&&"number"==typeof nt&&(le[He]||Fe[He])&&w<5&&(w++,T.warn('addFrames: overwriting frame "'+(le[He]||Fe[He]).name+'" with a frame whose name of type "number" also equates to "'+He+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),5===w&&T.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.")),Fe[Ve]={name:Ve},_e.push({frame:r.supplyFrameDefaults(se[ye]),index:fe&&null!=fe[ye]?fe[ye]:ge+ye})}_e.sort(function(It,Ut){return It.index>Ut.index?-1:It.index<Ut.index?1:0});var ot=[],dt=[],kt=Re.length;for(ye=_e.length-1;ye>=0;ye--){if("number"==typeof(Me=_e[ye].frame).name&&T.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!Me.name)for(;le[Me.name="frame "+Q._transitionData._counter++];);if(le[Me.name]){for(Ie=0;Ie<Re.length&&(Re[Ie]||{}).name!==Me.name;Ie++);ot.push({type:"replace",index:Ie,value:Me}),dt.unshift({type:"replace",index:Ie,value:Re[Ie]})}else Ce=Math.max(0,Math.min(_e[ye].index,kt)),ot.push({type:"insert",index:Ce,value:Me}),dt.unshift({type:"delete",index:Ce}),kt++}return s&&s.add(Q,r.modifyFrames,[Q,dt],r.modifyFrames,[Q,ot]),r.modifyFrames(Q,ot)},R.deleteFrames=function(Q,se){if(Q=T.getGraphDiv(Q),!T.isPlotDiv(Q))throw new Error("This element is not a Plotly plot: "+Q);var fe,ye,Me=Q._transitionData._frames,Ie=[],Ce=[];if(!se)for(se=[],fe=0;fe<Me.length;fe++)se.push(fe);for((se=se.slice()).sort(),fe=se.length-1;fe>=0;fe--)Ie.push({type:"delete",index:ye=se[fe]}),Ce.unshift({type:"insert",index:ye,value:Me[ye]});return s&&s.add(Q,r.modifyFrames,[Q,Ce],r.modifyFrames,[Q,Ie]),r.modifyFrames(Q,Ie)},R.addTraces=function Q(se,fe,ye){se=T.getGraphDiv(se);var Me,Ie,Ce=[],Re=R.deleteTraces,le=Q,ge=[se,Ce],_e=[se,fe];for(function(Fe,Ve,He){var nt,tt;if(!Array.isArray(Fe.data))throw new Error("gd.data must be an array.");if(void 0===Ve)throw new Error("traces must be defined.");for(Array.isArray(Ve)||(Ve=[Ve]),nt=0;nt<Ve.length;nt++)if("object"!=typeof(tt=Ve[nt])||Array.isArray(tt)||null===tt)throw new Error("all values in traces array must be non-array objects");if(void 0===He||Array.isArray(He)||(He=[He]),void 0!==He&&He.length!==Ve.length)throw new Error("if indices is specified, traces.length must equal indices.length")}(se,fe,ye),Array.isArray(fe)||(fe=[fe]),fe=fe.map(function(Fe){return T.extendFlat({},Fe)}),g.cleanData(fe),Me=0;Me<fe.length;Me++)se.data.push(fe[Me]);for(Me=0;Me<fe.length;Me++)Ce.push(-fe.length+Me);if(void 0===ye)return Ie=R.redraw(se),s.add(se,Re,ge,le,_e),Ie;Array.isArray(ye)||(ye=[ye]);try{P(se,Ce,ye)}catch(Fe){throw se.data.splice(se.data.length-fe.length,fe.length),Fe}return s.startSequence(se),s.add(se,Re,ge,le,_e),Ie=R.moveTraces(se,Ce,ye),s.stopSequence(se),Ie},R.deleteTraces=function Q(se,fe){se=T.getGraphDiv(se);var ye,Me,Ie=[],Ce=R.addTraces,Re=Q,le=[se,Ie,fe],ge=[se,fe];if(void 0===fe)throw new Error("indices must be an integer or array of integers.");for(Array.isArray(fe)||(fe=[fe]),C(se,fe,"indices"),(fe=L(fe,se.data.length-1)).sort(T.sorterDes),ye=0;ye<fe.length;ye+=1)Me=se.data.splice(fe[ye],1)[0],Ie.push(Me);var _e=R.redraw(se);return s.add(se,Ce,le,Re,ge),_e},R.extendTraces=function Q(se,fe,ye,Me){var Ce=I(se=T.getGraphDiv(se),fe,ye,Me,function Ie(ge,_e,Fe){var Ve,He;if(T.isTypedArray(ge))if(Fe<0){var nt=new ge.constructor(0),tt=U(ge,_e);Fe<0?(Ve=tt,He=nt):(Ve=nt,He=tt)}else if(Ve=new ge.constructor(Fe),He=new ge.constructor(ge.length+_e.length-Fe),Fe===_e.length)Ve.set(_e),He.set(ge);else if(Fe<_e.length){var ot=_e.length-Fe;Ve.set(_e.subarray(ot)),He.set(ge),He.set(_e.subarray(0,ot),ge.length)}else{var dt=Fe-_e.length,kt=ge.length-dt;Ve.set(ge.subarray(kt)),Ve.set(_e,dt),He.set(ge.subarray(0,kt))}else Ve=ge.concat(_e),He=Fe>=0&&Fe<Ve.length?Ve.splice(0,Ve.length-Fe):[];return[Ve,He]}),Re=R.redraw(se);return s.add(se,R.prependTraces,[se,Ce.update,ye,Ce.maxPoints],Q,arguments),Re},R.moveTraces=function Q(se,fe,ye){var Me,Ie=[],Ce=[],Re=Q,le=Q,ge=[se=T.getGraphDiv(se),ye,fe],_e=[se,fe,ye];if(P(se,fe,ye),fe=Array.isArray(fe)?fe:[fe],void 0===ye)for(ye=[],Me=0;Me<fe.length;Me++)ye.push(-fe.length+Me);for(ye=Array.isArray(ye)?ye:[ye],fe=L(fe,se.data.length-1),ye=L(ye,se.data.length-1),Me=0;Me<se.data.length;Me++)-1===fe.indexOf(Me)&&Ie.push(se.data[Me]);for(Me=0;Me<fe.length;Me++)Ce.push({newIndex:ye[Me],trace:se.data[fe[Me]]});for(Ce.sort(function(Ve,He){return Ve.newIndex-He.newIndex}),Me=0;Me<Ce.length;Me+=1)Ie.splice(Ce[Me].newIndex,0,Ce[Me].trace);se.data=Ie;var Fe=R.redraw(se);return s.add(se,Re,ge,le,_e),Fe},R.prependTraces=function Q(se,fe,ye,Me){var Ce=I(se=T.getGraphDiv(se),fe,ye,Me,function Ie(ge,_e,Fe){var Ve,He;if(T.isTypedArray(ge))if(Fe<=0){var nt=new ge.constructor(0),tt=U(_e,ge);Fe<0?(Ve=tt,He=nt):(Ve=nt,He=tt)}else if(Ve=new ge.constructor(Fe),He=new ge.constructor(ge.length+_e.length-Fe),Fe===_e.length)Ve.set(_e),He.set(ge);else if(Fe<_e.length){var ot=_e.length-Fe;Ve.set(_e.subarray(0,ot)),He.set(_e.subarray(ot)),He.set(ge,ot)}else{var dt=Fe-_e.length;Ve.set(_e),Ve.set(ge.subarray(0,dt),_e.length),He.set(ge.subarray(dt))}else Ve=_e.concat(ge),He=Fe>=0&&Fe<Ve.length?Ve.splice(Fe,Ve.length):[];return[Ve,He]}),Re=R.redraw(se);return s.add(se,R.extendTraces,[se,Ce.update,ye,Ce.maxPoints],Q,arguments),Re},R.newPlot=function(Q,se,fe,ye){return Q=T.getGraphDiv(Q),r.cleanPlot([],{},Q._fullData||[],Q._fullLayout||{}),r.purge(Q),R._doPlot(Q,se,fe,ye)},R._doPlot=function(Q,se,fe,ye){var Me;if(Q=T.getGraphDiv(Q),d.init(Q),T.isPlainObject(se)){var Ie=se;se=Ie.data,fe=Ie.layout,ye=Ie.config,Me=Ie.frames}if(!1===d.triggerHandler(Q,"plotly_beforeplot",[se,fe,ye]))return Promise.reject();se||fe||T.isPlotDiv(Q)||T.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",Q),E(Q,ye),fe||(fe={}),k.select(Q).classed("js-plotly-plot",!0),i.makeTester(),Array.isArray(Q._promises)||(Q._promises=[]);var Ce=0===(Q.data||[]).length&&Array.isArray(se);Array.isArray(se)&&(g.cleanData(se),Ce?Q.data=se:Q.data.push.apply(Q.data,se),Q.empty=!1),Q.layout&&!Ce||(Q.layout=g.cleanLayout(fe)),r.supplyDefaults(Q);var Re=Q._fullLayout,le=Re._has("cartesian");Re._replotting=!0,(Ce||Re._shouldCreateBgLayer)&&(function(dt){var kt=k.select(dt),mt=dt._fullLayout;if(mt._calcInverseTransform=Te,mt._calcInverseTransform(dt),mt._container=kt.selectAll(".plot-container").data([0]),mt._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),mt._paperdiv=mt._container.selectAll(".svg-container").data([0]),mt._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),mt._glcontainer=mt._paperdiv.selectAll(".gl-container").data([{}]),mt._glcontainer.enter().append("div").classed("gl-container",!0),mt._paperdiv.selectAll(".main-svg").remove(),mt._paperdiv.select(".modebar-container").remove(),mt._paper=mt._paperdiv.insert("svg",":first-child").classed("main-svg",!0),mt._toppaper=mt._paperdiv.append("svg").classed("main-svg",!0),mt._modebardiv=mt._paperdiv.append("div"),delete mt._modeBar,mt._hoverpaper=mt._paperdiv.append("svg").classed("main-svg",!0),!mt._uid){var wt={};k.selectAll("defs").each(function(){this.id&&(wt[this.id.split("-")[1]]=1)}),mt._uid=T.randstr(wt)}mt._paperdiv.selectAll(".main-svg").attr(p.svgAttrs),mt._defs=mt._paper.append("defs").attr("id","defs-"+mt._uid),mt._clips=mt._defs.append("g").classed("clips",!0),mt._topdefs=mt._toppaper.append("defs").attr("id","topdefs-"+mt._uid),mt._topclips=mt._topdefs.append("g").classed("clips",!0),mt._bgLayer=mt._paper.append("g").classed("bglayer",!0),mt._draggers=mt._paper.append("g").classed("draglayer",!0);var Lt=mt._paper.append("g").classed("layer-below",!0);mt._imageLowerLayer=Lt.append("g").classed("imagelayer",!0),mt._shapeLowerLayer=Lt.append("g").classed("shapelayer",!0),mt._cartesianlayer=mt._paper.append("g").classed("cartesianlayer",!0),mt._polarlayer=mt._paper.append("g").classed("polarlayer",!0),mt._smithlayer=mt._paper.append("g").classed("smithlayer",!0),mt._ternarylayer=mt._paper.append("g").classed("ternarylayer",!0),mt._geolayer=mt._paper.append("g").classed("geolayer",!0),mt._funnelarealayer=mt._paper.append("g").classed("funnelarealayer",!0),mt._pielayer=mt._paper.append("g").classed("pielayer",!0),mt._iciclelayer=mt._paper.append("g").classed("iciclelayer",!0),mt._treemaplayer=mt._paper.append("g").classed("treemaplayer",!0),mt._sunburstlayer=mt._paper.append("g").classed("sunburstlayer",!0),mt._indicatorlayer=mt._toppaper.append("g").classed("indicatorlayer",!0),mt._glimages=mt._paper.append("g").classed("glimages",!0);var Ct=mt._toppaper.append("g").classed("layer-above",!0);mt._imageUpperLayer=Ct.append("g").classed("imagelayer",!0),mt._shapeUpperLayer=Ct.append("g").classed("shapelayer",!0),mt._selectionLayer=mt._toppaper.append("g").classed("selectionlayer",!0),mt._infolayer=mt._toppaper.append("g").classed("infolayer",!0),mt._menulayer=mt._toppaper.append("g").classed("menulayer",!0),mt._zoomlayer=mt._toppaper.append("g").classed("zoomlayer",!0),mt._hoverlayer=mt._hoverpaper.append("g").classed("hoverlayer",!0),mt._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),dt.emit("plotly_framework")}(Q),Re._shouldCreateBgLayer&&delete Re._shouldCreateBgLayer),i.initGradients(Q),i.initPatterns(Q),Ce&&n.saveShowSpikeInitial(Q);var ge=!Q.calcdata||Q.calcdata.length!==(Q._fullData||[]).length;ge&&r.doCalcdata(Q);for(var _e=0;_e<Q.calcdata.length;_e++)Q.calcdata[_e][0].trace=Q._fullData[_e];Q._context.responsive?Q._responsiveChartHandler||(Q._responsiveChartHandler=function(){T.isHidden(Q)||r.resize(Q)},window.addEventListener("resize",Q._responsiveChartHandler)):T.clearResponsive(Q);var Fe=T.extendFlat({},Re._size),Ve=0;function He(){if(r.clearAutoMarginIds(Q),y.drawMarginPushers(Q),n.allowAutoMargin(Q),Re._has("pie"))for(var dt=Q._fullData,kt=0;kt<dt.length;kt++){var mt=dt[kt];"pie"===mt.type&&mt.automargin&&r.allowAutoMargin(Q,"pie."+mt.uid+".automargin")}return r.doAutoMargin(Q),r.previousPromises(Q)}function nt(){Q._transitioning||(y.doAutoRangeAndConstraints(Q),Ce&&n.saveRangeInitial(Q),t.getComponentMethod("rangeslider","calcAutorange")(Q))}var tt=[r.previousPromises,function(){if(Me)return R.addFrames(Q,Me)},function dt(){for(var kt=Re._basePlotModules,mt=0;mt<kt.length;mt++)kt[mt].drawFramework&&kt[mt].drawFramework(Q);!Re._glcanvas&&Re._has("gl")&&(Re._glcanvas=Re._glcontainer.selectAll(".gl-canvas").data([{key:"contextLayer",context:!0,pick:!1},{key:"focusLayer",context:!1,pick:!1},{key:"pickLayer",context:!1,pick:!0}],function(It){return It.key}),Re._glcanvas.enter().append("canvas").attr("class",function(It){return"gl-canvas gl-canvas-"+It.key.replace("Layer","")}).style({position:"absolute",top:0,left:0,overflow:"visible","pointer-events":"none"}));var wt=Q._context.plotGlPixelRatio;if(Re._glcanvas){Re._glcanvas.attr("width",Re.width*wt).attr("height",Re.height*wt).style("width",Re.width+"px").style("height",Re.height+"px");var Lt=Re._glcanvas.data()[0].regl;if(Lt&&(Math.floor(Re.width*wt)!==Lt._gl.drawingBufferWidth||Math.floor(Re.height*wt)!==Lt._gl.drawingBufferHeight)){var Ct="WebGL context buffer and canvas dimensions do not match due to browser/WebGL bug.";if(!Ve)return T.log(Ct+" Clearing graph and plotting again."),r.cleanPlot([],{},Q._fullData,Re),r.supplyDefaults(Q),Re=Q._fullLayout,r.doCalcdata(Q),Ve++,dt();T.error(Ct)}}return"h"===Re.modebar.orientation?Re._modebardiv.style("height",null).style("width","100%"):Re._modebardiv.style("width",null).style("height",Re.height+"px"),r.previousPromises(Q)},He,function(){if(r.didMarginChange(Fe,Re._size))return T.syncOrAsync([He,y.layoutStyles],Q)}];le&&tt.push(function(){if(ge)return T.syncOrAsync([t.getComponentMethod("shapes","calcAutorange"),t.getComponentMethod("annotations","calcAutorange"),nt],Q);nt()}),tt.push(y.layoutStyles),le&&tt.push(function(){return n.draw(Q,Ce?"":"redraw")},function(dt){dt._fullLayout._insideTickLabelsAutorange&&J(dt,dt._fullLayout._insideTickLabelsAutorange).then(function(){dt._fullLayout._insideTickLabelsAutorange=void 0})}),tt.push(y.drawData,y.finalDraw,c,r.addLinks,r.rehover,r.redrag,r.reselect,r.doAutoMargin,function(dt){dt._fullLayout._insideTickLabelsAutorange&&Ce&&n.saveRangeInitial(dt,!0)},r.previousPromises);var ot=T.syncOrAsync(tt,Q);return ot&&ot.then||(ot=Promise.resolve()),ot.then(function(){return u(Q),Q})},R.purge=function(Q){var se=(Q=T.getGraphDiv(Q))._fullLayout||{};return r.cleanPlot([],{},Q._fullData||[],se),r.purge(Q),d.purge(Q),se._container&&se._container.remove(),delete Q._context,Q},R.react=function(Q,se,fe,ye){var Me,Ie;Q=T.getGraphDiv(Q),g.clearPromiseQueue(Q);var Ye,rt,Se,ze,Ke,st,Ce=Q._fullData,Re=Q._fullLayout;if(T.isPlotDiv(Q)&&Ce&&Re){if(T.isPlainObject(se)){var le=se;se=le.data,fe=le.layout,ye=le.config,Me=le.frames}var ge=!1;if(ye){var _e=T.extendDeep({},Q._context);Q._context=void 0,E(Q,ye),ge=Ae(_e,Q._context)}Q.data=se||[],g.cleanData(Q.data),Q.layout=fe||{},g.cleanLayout(Q.layout),function(Ye,rt,Se,ze){var Ke,st,ct,Tt,Et,At,ht,pt,gt,Pt,Ot=ze._preGUI,Ht=[],jt={},Nt={};for(Ke in Ot){if(Et=de(Ke,ce)){if(gt=Et.head,Pt=Et.tail,(Tt=(ct=b(ze,st=Et.attr||gt+".uirevision").get())&&he(st,rt))&&Tt===ct){if(null===(At=Ot[Ke])&&(At=void 0),xe(pt=(ht=b(rt,Ke)).get(),At)){void 0===pt&&"autorange"===Pt&&Ht.push(gt),ht.set(H(b(ze,Ke).get()));continue}if("autorange"===Pt||"range["===Pt.substr(0,6)){var pn=Ot[gt+".autorange"];if(pn||null===pn&&null===Ot[gt+".range[0]"]&&null===Ot[gt+".range[1]"]){if(!(gt in jt)){var Kt=b(rt,gt).get();jt[gt]=Kt&&(Kt.autorange||!1!==Kt.autorange&&(!Kt.range||2!==Kt.range.length))}if(jt[gt]){ht.set(H(b(ze,Ke).get()));continue}}}}}else T.warn("unrecognized GUI edit: "+Ke);delete Ot[Ke],Et&&"range["===Et.tail.substr(0,6)&&(Nt[Et.head]=1)}for(var wn=0;wn<Ht.length;wn++){var Bn=Ht[wn];if(Nt[Bn]){var vn=b(rt,Bn).get();vn&&delete vn.autorange}}var cn=ze._tracePreGUI;for(var dn in cn){var sn,hn=cn[dn],En=null;for(Ke in hn){if(!En){var Mn=ve(dn,Se);if(Mn<0){delete cn[dn];break}var Rn=Pe(dn,Ye,(sn=Se[Mn]._fullInput).index);if(Rn<0){delete cn[dn];break}En=Ye[Rn]}if(Et=de(Ke,me)){if(Et.attr?Tt=(ct=b(ze,Et.attr).get())&&he(Et.attr,rt):(ct=sn.uirevision,void 0===(Tt=En.uirevision)&&(Tt=rt.uirevision)),Tt&&Tt===ct&&(null===(At=hn[Ke])&&(At=void 0),xe(pt=(ht=b(En,Ke)).get(),At))){ht.set(H(b(sn,Ke).get()));continue}}else T.warn("unrecognized GUI edit: "+Ke+" in trace uid "+dn);delete hn[Ke]}}}(Q.data,Q.layout,Ce,Re),r.supplyDefaults(Q,{skipUpdateCalc:!0});var Fe=Q._fullData,Ve=Q._fullLayout,He=void 0===Ve.datarevision,nt=Ve.transition,tt=(Ye=Q,rt=Re,Se=Ve,ze=He,Ke=nt,(st=h.layoutFlags()).arrays={},st.rangesAltered={},st.nChanges=0,st.nChangesAnim=0,ke(rt,Se,[],{getValObject:function(ct){return o.getLayoutValObject(Se,ct)},flags:st,immutable:ze,transition:Ke,gd:Ye}),(st.plot||st.calc)&&(st.layoutReplot=!0),Ke&&st.nChanges&&st.nChangesAnim&&(st.anim=st.nChanges===st.nChangesAnim?"all":"some"),st),dt=function(Ye,rt,Se,ze,Ke,st){var ct=rt.length===Se.length;if(!Ke&&!ct)return{fullReplot:!0,calc:!0};var Tt,Et,At=h.traceFlags();At.arrays={},At.nChanges=0,At.nChangesAnim=0;var ht={getValObject:function(gt){var Pt=o.getTraceValObject(Et,gt);return!Et._module.animatable&&Pt.anim&&(Pt.anim=!1),Pt},flags:At,immutable:ze,transition:Ke,newDataRevision:st,gd:Ye},pt={};for(Tt=0;Tt<rt.length;Tt++)if(Se[Tt]){if(r.hasMakesDataTransform(Et=Se[Tt]._fullInput)&&(Et=Se[Tt]),pt[Et.uid])continue;pt[Et.uid]=1,ke(rt[Tt]._fullInput,Et,[],ht)}return(At.calc||At.plot)&&(At.fullReplot=!0),Ke&&At.nChanges&&At.nChangesAnim&&(At.anim=At.nChanges===At.nChangesAnim&&ct?"all":"some"),At}(Q,Ce,Fe,He,nt,tt.newDataRevision);if(ee(Q)&&(tt.layoutReplot=!0),dt.calc||tt.calc){Q.calcdata=void 0;for(var kt=Object.getOwnPropertyNames(Ve),mt=0;mt<kt.length;mt++){var wt=kt[mt],Lt=wt.substring(0,5);if("xaxis"===Lt||"yaxis"===Lt){var Ct=Ve[wt]._emptyCategories;Ct&&Ct()}}}else r.supplyDefaultsUpdateCalc(Q.calcdata,Fe);var It=[];if(Me&&(Q._transitionData={},r.createTransitionData(Q),It.push(function(){return R.addFrames(Q,Me)})),Ve.transition&&!ge&&(dt.anim||tt.anim))tt.ticks&&It.push(y.doTicksRelayout),r.doCalcdata(Q),y.doAutoRangeAndConstraints(Q),It.push(function(){return r.transitionFromReact(Q,dt,tt,Re)});else if(dt.fullReplot||tt.layoutReplot||ge)Q._fullLayout._skipDefaults=!0,It.push(R._doPlot);else{for(var Ut in tt.arrays){var Rt=tt.arrays[Ut];if(Rt.length){var Ge=t.getComponentMethod(Ut,"drawOne");if(Ge!==T.noop)for(var We=0;We<Rt.length;We++)Ge(Q,Rt[We]);else{var Be=t.getComponentMethod(Ut,"draw");if(Be===T.noop)throw new Error("cannot draw components: "+Ut);Be(Q)}}}It.push(r.previousPromises),dt.style&&It.push(y.doTraceStyle),(dt.colorbars||tt.colorbars)&&It.push(y.doColorBars),tt.legend&&It.push(y.doLegend),tt.layoutstyle&&It.push(y.layoutStyles),tt.axrange&&V(It),tt.ticks&&It.push(y.doTicksRelayout),tt.modebar&&It.push(y.doModeBar),tt.camera&&It.push(y.doCamera),It.push(u)}It.push(r.rehover,r.redrag,r.reselect),(Ie=T.syncOrAsync(It,Q))&&Ie.then||(Ie=Promise.resolve(Q))}else Ie=R.newPlot(Q,se,fe,ye);return Ie.then(function(){return Q.emit("plotly_react",{data:se,layout:fe}),Q})},R.redraw=function(Q){if(Q=T.getGraphDiv(Q),!T.isPlotDiv(Q))throw new Error("This element is not a Plotly plot: "+Q);return g.cleanData(Q.data),g.cleanLayout(Q.layout),Q.calcdata=void 0,R._doPlot(Q).then(function(){return Q.emit("plotly_redraw"),Q})},R.relayout=J,R.restyle=z,R.setPlotConfig=function(Q){return T.extendFlat(x,Q)},R.update=ie,R._guiRelayout=oe(J),R._guiRestyle=oe(z),R._guiUpdate=oe(ie),R._storeDirectGUIEdit=function(Q,se,fe){for(var ye in fe)N(ye,b(Q,ye).get(),fe[ye],se)}},72075:function($){"use strict";var R={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:{}}},e={};(function k(A,l){for(var T in A){var b=A[T];b.valType?l[T]=b.dflt:(l[T]||(l[T]={}),k(b,l[T]))}})(R,e),$.exports={configAttributes:R,dfltConfig:e}},86281:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(9012),T=e(10820),b=e(31391),d=e(85594),s=e(72075).configAttributes,t=e(30962),o=A.extendDeepAll,r=A.isPlainObject,n=A.isArrayOrTypedArray,i=A.nestedProperty,a=A.valObjectMeta,c="_isSubplotObj",p="_isLinkedToArray",f="_deprecated",x=[c,p,"_arrayAttrRegexps",f];function v(u,S,_){if(!u)return!1;if(u._isLinkedToArray)if(g(S[_]))_++;else if(_<S.length)return!1;for(;_<S.length;_++){var E=u[S[_]];if(!r(E)||(u=E,_===S.length-1))break;if(u._isLinkedToArray){if(!g(S[++_]))return!1}else if("info_array"===u.valType){var L=S[++_];if(!g(L))return!1;var C=u.items;if(Array.isArray(C)){if(L>=C.length)return!1;if(2===u.dimensions){if(_++,S.length===_)return u;var P=S[_];if(!g(P))return!1;u=C[L][P]}else u=C[L]}else u=C}}return u}function g(u){return u===Math.round(u)&&u>=0}function y(){var u,S,_={};for(u in o(_,T),k.subplotsRegistry)if((S=k.subplotsRegistry[u]).layoutAttributes)if(Array.isArray(S.attr))for(var E=0;E<S.attr.length;E++)m(_,S,S.attr[E]);else m(_,S,"subplot"===S.attr?S.name:S.attr);for(u in k.componentsRegistry){var L=(S=k.componentsRegistry[u]).schema;if(L&&(L.subplots||L.layout)){var C=L.subplots;if(C&&C.xaxis&&!C.yaxis)for(var P in C.xaxis)delete _.yaxis[P];delete _.xaxis.shift,delete _.xaxis.autoshift}else"colorscale"===S.name?o(_,S.layoutAttributes):S.layoutAttributes&&w(_,S.layoutAttributes,S.name)}return{layoutAttributes:h(_)}}function h(u){return R.crawl(u,function(_,E,L){R.isValObject(_)?!0!==_.arrayOk&&"data_array"!==_.valType||(L[E+"src"]={valType:"string",editType:"none"}):r(_)&&(_.role="object")}),R.crawl(u,function(_,E,L){if(_){var C=_._isLinkedToArray;C&&(delete _._isLinkedToArray,L[E]={items:{}},L[E].items[C]=_,L[E].role="object")}}),function(S){!function _(E){for(var L in E)if(r(E[L]))_(E[L]);else if(Array.isArray(E[L]))for(var C=0;C<E[L].length;C++)_(E[L][C]);else E[L]instanceof RegExp&&(E[L]=E[L].toString())}(S)}(u),u}function m(u,S,_){var E=i(u,_),L=o({},S.layoutAttributes);L._isSubplotObj=!0,E.set(L)}function w(u,S,_){var E=i(u,_);E.set(o(E.get()||{},S))}R.IS_SUBPLOT_OBJ=c,R.IS_LINKED_TO_ARRAY=p,R.DEPRECATED=f,R.UNDERSCORE_ATTRS=x,R.get=function(){var u={};k.allTypes.forEach(function(E){u[E]=function(L){var C,P;P=(C=k.modules[L]._module).basePlotModule;var I={type:null},U=o({},l),z=o({},C.attributes);R.crawl(z,function(N,B,j,J,G){i(U,G).set(void 0),void 0===N&&i(z,G).set(void 0)}),o(I,U),k.traceIs(L,"noOpacity")&&delete I.opacity,k.traceIs(L,"showLegend")||(delete I.showlegend,delete I.legendgroup),k.traceIs(L,"noHover")&&(delete I.hoverinfo,delete I.hoverlabel),C.selectPoints||delete I.selectedpoints,o(I,z),P.attributes&&o(I,P.attributes),I.type=L;var H={meta:C.meta||{},categories:C.categories||{},animatable:!!C.animatable,type:L,attributes:h(I)};if(C.layoutAttributes){var F={};o(F,C.layoutAttributes),H.layoutAttributes=h(F)}return C.animatable||R.crawl(H,function(N){R.isValObject(N)&&"anim"in N&&delete N.anim}),H}(E)});var S,_={};return Object.keys(k.transformsRegistry).forEach(function(E){var L,P;_[E]=(P=o({},k.transformsRegistry[L=E].attributes),Object.keys(k.componentsRegistry).forEach(function(I){var U=k.componentsRegistry[I];U.schema&&U.schema.transforms&&U.schema.transforms[L]&&Object.keys(U.schema.transforms[L]).forEach(function(z){w(P,U.schema.transforms[L][z],z)})}),{attributes:h(P)})}),{defs:{valObjects:a,metaKeys:x.concat(["description","role","editType","impliedEdits"]),editType:{traces:t.traces,layout:t.layout},impliedEdits:{}},traces:u,layout:y(),transforms:_,frames:(S={frames:o({},b)},h(S),S.frames),animation:h(d),config:h(s)}},R.crawl=function(u,S,_,E){var L=_||0;E=E||"",Object.keys(u).forEach(function(C){var P=u[C];if(-1===x.indexOf(C)){var I=(E?E+".":"")+C;S(P,C,u,L,I),R.isValObject(P)||r(P)&&"impliedEdits"!==C&&R.crawl(P,S,L+1,I)}})},R.isValObject=function(u){return u&&void 0!==u.valType},R.findArrayAttributes=function(u){var S,_,E=[],L=[],C=[];function P(N,B,j,J){L=L.slice(0,J).concat([B]),C=C.slice(0,J).concat([N&&N._isLinkedToArray]),N&&("data_array"===N.valType||!0===N.arrayOk)&&("colorbar"!==L[J-1]||"ticktext"!==B&&"tickvals"!==B)&&I(S,0,"")}function I(N,B,j){var J=N[L[B]],G=j+L[B];if(B===L.length-1)n(J)&&E.push(_+G);else if(C[B]){if(Array.isArray(J))for(var V=0;V<J.length;V++)r(J[V])&&I(J[V],B+1,G+"["+V+"].")}else r(J)&&I(J,B+1,G+".")}S=u,_="",R.crawl(l,P),u._module&&u._module.attributes&&R.crawl(u._module.attributes,P);var U=u.transforms;if(U)for(var z=0;z<U.length;z++){var H=U[z],F=H._module;F&&(_="transforms["+z+"].",S=H,R.crawl(F.attributes,P))}return E},R.getTraceValObject=function(u,S){var _,E,L=S[0],C=1;if("transforms"===L){if(1===S.length)return l.transforms;var P=u.transforms;if(!Array.isArray(P)||!P.length)return!1;var I=S[1];if(!g(I)||I>=P.length)return!1;E=(_=(k.transformsRegistry[P[I].type]||{}).attributes)&&_[S[2]],C=3}else{var U=u._module;if(U||(U=(k.modules[u.type||l.type.dflt]||{})._module),!U)return!1;if(!(E=(_=U.attributes)&&_[L])){var z=U.basePlotModule;z&&z.attributes&&(E=z.attributes[L])}E||(E=l[L])}return v(E,S,C)},R.getLayoutValObject=function(u,S){return v(function(E,L){var C,P,I,U,z=E._basePlotModules;if(z){var H;for(C=0;C<z.length;C++){if((I=z[C]).attrRegex&&I.attrRegex.test(L)){if(I.layoutAttrOverrides)return I.layoutAttrOverrides;!H&&I.layoutAttributes&&(H=I.layoutAttributes)}var F=I.baseLayoutAttrOverrides;if(F&&L in F)return F[L]}if(H)return H}var N=E._modules;if(N)for(C=0;C<N.length;C++)if((U=N[C].layoutAttributes)&&L in U)return U[L];for(P in k.componentsRegistry){if("colorscale"===(I=k.componentsRegistry[P]).name&&0===L.indexOf("coloraxis"))return I.layoutAttributes[L];if(!I.schema&&L===I.name)return I.layoutAttributes}return L in T&&T[L]}(u,S[0]),S,1)}},44467:function($,R,e){"use strict";var k=e(71828),A=e(9012),l={name:{valType:"string",editType:"none"}};function T(d){return d&&"string"==typeof d}function b(d){return"s"!==d.charAt(d.length-1)&&k.warn("bad argument to arrayDefaultKey: "+d),d.substr(0,d.length-1)+"defaults"}l.templateitemname={valType:"string",editType:"calc"},R.templatedArray=function(d,s){return s._isLinkedToArray=d,s.name=l.name,s.templateitemname=l.templateitemname,s},R.traceTemplater=function(d){var s,t,o={};for(s in d)t=d[s],Array.isArray(t)&&t.length&&(o[s]=0);return{newTrace:function(r){var n={type:s=k.coerce(r,{},A,"type"),_template:null};if(s in o){var i=o[s]%(t=d[s]).length;o[s]++,n._template=t[i]}return n}}},R.newContainer=function(d,s,t){var o=d._template,r=o&&(o[s]||t&&o[t]);return k.isPlainObject(r)||(r=null),d[s]={_template:r}},R.arrayTemplater=function(d,s,t){var o=d._template,r=o&&o[b(s)],n=o&&o[s];Array.isArray(n)&&n.length||(n=[]);var i={};return{newItem:function(a){var c={name:a.name,_input:a},p=c.templateitemname=a.templateitemname;if(!T(p))return c._template=r,c;for(var f=0;f<n.length;f++){var x=n[f];if(x.name===p)return i[p]=1,c._template=x,c}return c[t]=a[t]||!1,c._template=!1,c},defaultItems:function(){for(var a=[],c=0;c<n.length;c++){var p=n[c],f=p.name;if(T(f)&&!i[f]){var x={_template:p,name:f,_input:{_templateitemname:f}};x.templateitemname=p.templateitemname,a.push(x),i[f]=1}}return a}}},R.arrayDefaultKey=b,R.arrayEditor=function(d,s,t){var o=(k.nestedProperty(d,s).get()||[]).length,r=t._index,n=r>=o&&(t._input||{})._templateitemname;n&&(r=o);var i,a=s+"["+r+"]";function c(){i={},n&&(i[a]={},i[a].templateitemname=n)}function p(x,v){n?k.nestedProperty(i[a],x).set(v):i[a+"."+x]=v}function f(){var x=i;return c(),x}return c(),{modifyBase:function(x,v){i[x]=v},modifyItem:p,getUpdateObj:f,applyUpdate:function(x,v){x&&p(x,v);var g=f();for(var y in g)k.nestedProperty(d,y).set(g[y])}}}},61549:function($,R,e){"use strict";var k=e(39898),A=e(73972),l=e(74875),T=e(71828),b=e(33306),d=e(7901),s=e(91424),t=e(92998),o=e(64168),r=e(89298),n=e(18783),i=e(99082),a=i.enforce,c=i.clean,p=e(71739).doAutoRange,f="start";function x(u,S,_){for(var E=0;E<_.length;E++){var L=_[E][0],C=_[E][1];if(!(L[0]>=u[1]||L[1]<=u[0])&&C[0]<S[1]&&C[1]>S[0])return!0}return!1}function v(u){var S,_,E,L,C,P,I=u._fullLayout,U=I._size,z=U.p,H=r.list(u,"",!0);if(I._paperdiv.style({width:u._context.responsive&&I.autosize&&!u._context._hasZeroWidth&&!u.layout.width?"100%":I.width+"px",height:u._context.responsive&&I.autosize&&!u._context._hasZeroHeight&&!u.layout.height?"100%":I.height+"px"}).selectAll(".main-svg").call(s.setSize,I.width,I.height),u._context.setBackground(u,I.paper_bgcolor),R.drawMainTitle(u),o.manage(u),!I._has("cartesian"))return l.previousPromises(u);function F(Ve,He,nt){var tt=Ve._lw/2;return"x"===Ve._id.charAt(0)?He?"top"===nt?He._offset-z-tt:He._offset+He._length+z+tt:U.t+U.h*(1-(Ve.position||0))+tt%1:He?"right"===nt?He._offset+He._length+z+tt:He._offset-z-tt:U.l+U.w*(Ve.position||0)+tt%1}for(S=0;S<H.length;S++){var N=(L=H[S])._anchorAxis;L._linepositions={},L._lw=s.crispRound(u,L.linewidth,1),L._mainLinePosition=F(L,N,L.side),L._mainMirrorPosition=L.mirror&&N?F(L,N,n.OPPOSITE_SIDE[L.side]):null}var B=[],j=[],J=[],G=1===d.opacity(I.paper_bgcolor)&&1===d.opacity(I.plot_bgcolor)&&I.paper_bgcolor===I.plot_bgcolor;for(_ in I._plots)if((E=I._plots[_]).mainplot)E.bg&&E.bg.remove(),E.bg=void 0;else{var V=E.xaxis.domain,W=E.yaxis.domain,X=E.plotgroup;if(x(V,W,J)){var K=X.node(),re=E.bg=T.ensureSingle(X,"rect","bg");K.insertBefore(re.node(),K.childNodes[0]),j.push(_)}else X.select("rect.bg").remove(),J.push([V,W]),G||(B.push(_),j.push(_))}var ee,ie,oe,ce,me,de,he,ve,Pe,xe,ke,Ae,Te,Q=I._bgLayer.selectAll(".bg").data(B);for(Q.enter().append("rect").classed("bg",!0),Q.exit().remove(),Q.each(function(Ve){I._plots[Ve].bg=k.select(this)}),S=0;S<j.length;S++)C=(E=I._plots[j[S]]).xaxis,P=E.yaxis,E.bg&&void 0!==C._offset&&void 0!==P._offset&&E.bg.call(s.setRect,C._offset-z,P._offset-z,C._length+2*z,P._length+2*z).call(d.fill,I.plot_bgcolor).style("stroke-width",0);if(!I._hasOnlyLargeSploms)for(_ in I._plots){C=(E=I._plots[_]).xaxis,P=E.yaxis;var se,fe,ye=E.clipId="clip"+I._uid+_+"plot",Me=T.ensureSingleById(I._clips,"clipPath",ye,function(Ve){Ve.classed("plotclip",!0).append("rect")});E.clipRect=Me.select("rect").attr({width:C._length,height:P._length}),s.setTranslate(E.plot,C._offset,P._offset),E._hasClipOnAxisFalse?(se=null,fe=ye):(se=ye,fe=null),s.setClipUrl(E.plot,se,u),E.layerClipId=fe}function Ie(Ve){return"M"+ee+","+Ve+"H"+ie}function Ce(Ve){return"M"+C._offset+","+Ve+"h"+C._length}function Re(Ve){return"M"+Ve+","+ve+"V"+he}function le(Ve){return void 0!==P._shift&&(Ve+=P._shift),"M"+Ve+","+P._offset+"v"+P._length}function ge(Ve,He,nt){if(!Ve.showline||_!==Ve._mainSubplot)return"";if(!Ve._anchorAxis)return nt(Ve._mainLinePosition);var tt=He(Ve._mainLinePosition);return Ve.mirror&&(tt+=He(Ve._mainMirrorPosition)),tt}for(_ in I._plots){P=(E=I._plots[_]).yaxis;var _e="M0,0";g(C=E.xaxis,_)&&(me=h(C,"left",P,H),ee=C._offset-(me?z+me:0),de=h(C,"right",P,H),ie=C._offset+C._length+(de?z+de:0),oe=F(C,P,"bottom"),ce=F(C,P,"top"),!(Te=!C._anchorAxis||_!==C._mainSubplot)||"allticks"!==C.mirror&&"all"!==C.mirror||(C._linepositions[_]=[oe,ce]),_e=ge(C,Ie,Ce),Te&&C.showline&&("all"===C.mirror||"allticks"===C.mirror)&&(_e+=Ie(oe)+Ie(ce)),E.xlines.style("stroke-width",C._lw+"px").call(d.stroke,C.showline?C.linecolor:"rgba(0,0,0,0)")),E.xlines.attr("d",_e);var Fe="M0,0";g(P,_)&&(ke=h(P,"bottom",C,H),he=P._offset+P._length+(ke?z:0),Ae=h(P,"top",C,H),ve=P._offset-(Ae?z:0),Pe=F(P,C,"left"),xe=F(P,C,"right"),!(Te=!P._anchorAxis||_!==P._mainSubplot)||"allticks"!==P.mirror&&"all"!==P.mirror||(P._linepositions[_]=[Pe,xe]),Fe=ge(P,Re,le),Te&&P.showline&&("all"===P.mirror||"allticks"===P.mirror)&&(Fe+=Re(Pe)+Re(xe)),E.ylines.style("stroke-width",P._lw+"px").call(d.stroke,P.showline?P.linecolor:"rgba(0,0,0,0)")),E.ylines.attr("d",Fe)}return r.makeClipPaths(u),l.previousPromises(u)}function g(u,S){return(u.ticks||u.showline)&&(S===u._mainSubplot||"all"===u.mirror||"allticks"===u.mirror)}function y(u,S,_){if(!_.showline||!_._lw)return!1;if("all"===_.mirror||"allticks"===_.mirror)return!0;var E=_._anchorAxis;if(!E)return!1;var L=n.FROM_BL[S];return _.side===S?E.domain[L]===u.domain[L]:_.mirror&&E.domain[1-L]===u.domain[1-L]}function h(u,S,_,E){if(y(u,S,_))return _._lw;for(var L=0;L<E.length;L++){var C=E[L];if(C._mainAxis===_._mainAxis&&y(u,S,C))return C._lw}return 0}function m(u,S){var _=u.title,E=u._size,L=0;return S===f?L=_.pad.l:"end"===S&&(L=-_.pad.r),"paper"===_.xref?E.l+E.w*_.x+L:u.width*_.x+L}function w(u,S){var _=u.title,E=u._size,L=0;return"0em"!==S&&S?S===n.CAP_SHIFT+"em"&&(L=_.pad.t):L=-_.pad.b,"auto"===_.y?E.t/2:"paper"===_.yref?E.t+E.h-E.h*_.y+L:u.height-u.height*_.y+L}R.layoutStyles=function(u){return T.syncOrAsync([l.doAutoMargin,v],u)},R.drawMainTitle=function(u){var C,P,S=u._fullLayout,_=(P="middle",T.isRightAnchor(C=S.title)?P="end":T.isLeftAnchor(C)&&(P=f),P),E=function(L){var C=L.title,P="0em";return T.isTopAnchor(C)?P=n.CAP_SHIFT+"em":T.isMiddleAnchor(C)&&(P=n.MID_SHIFT+"em"),P}(S);t.draw(u,"gtitle",{propContainer:S,propName:"title.text",placeholder:S._dfltTitle.plot,attributes:{x:m(S,_),y:w(S,E),"text-anchor":_,dy:E}})},R.doTraceStyle=function(u){var S,_=u.calcdata,E=[];for(S=0;S<_.length;S++){var L=_[S],C=L[0]||{},P=C.trace||{},I=P._module||{},U=I.arraysToCalcdata;U&&U(L,P);var z=I.editStyle;z&&E.push({fn:z,cd0:C})}if(E.length){for(S=0;S<E.length;S++){var H=E[S];H.fn(u,H.cd0)}b(u),R.redrawReglTraces(u)}return l.style(u),A.getComponentMethod("legend","draw")(u),l.previousPromises(u)},R.doColorBars=function(u){return A.getComponentMethod("colorbar","draw")(u),l.previousPromises(u)},R.layoutReplot=function(u){var S=u.layout;return u.layout=void 0,A.call("_doPlot",u,"",S)},R.doLegend=function(u){return A.getComponentMethod("legend","draw")(u),l.previousPromises(u)},R.doTicksRelayout=function(u){return r.draw(u,"redraw"),u._fullLayout._hasOnlyLargeSploms&&(A.subplotsRegistry.splom.updateGrid(u),b(u),R.redrawReglTraces(u)),R.drawMainTitle(u),l.previousPromises(u)},R.doModeBar=function(u){var S=u._fullLayout;o.manage(u);for(var _=0;_<S._basePlotModules.length;_++){var E=S._basePlotModules[_].updateFx;E&&E(u)}return l.previousPromises(u)},R.doCamera=function(u){for(var S=u._fullLayout,_=S._subplots.gl3d,E=0;E<_.length;E++){var L=S[_[E]];L._scene.setViewport(L)}},R.drawData=function(u){var S=u._fullLayout;b(u);for(var _=S._basePlotModules,E=0;E<_.length;E++)_[E].plot(u);return R.redrawReglTraces(u),l.style(u),A.getComponentMethod("selections","draw")(u),A.getComponentMethod("shapes","draw")(u),A.getComponentMethod("annotations","draw")(u),A.getComponentMethod("images","draw")(u),S._replotting=!1,l.previousPromises(u)},R.redrawReglTraces=function(u){var S=u._fullLayout;if(S._has("regl")){var _,E,L=u._fullData,C=[],P=[];for(S._hasOnlyLargeSploms&&S._splomGrid.draw(),_=0;_<L.length;_++){var I=L[_];!0===I.visible&&0!==I._length&&("splom"===I.type?S._splomScenes[I.uid].draw():"scattergl"===I.type?T.pushUnique(C,I.xaxis+I.yaxis):"scatterpolargl"===I.type&&T.pushUnique(P,I.subplot))}for(_=0;_<C.length;_++)(E=S._plots[C[_]])._scene&&E._scene.draw();for(_=0;_<P.length;_++)(E=S[P[_]]._subplot)._scene&&E._scene.draw()}},R.doAutoRangeAndConstraints=function(u){for(var S,_=r.list(u,"",!0),E={},L=0;L<_.length;L++)if(!E[(S=_[L])._id]){E[S._id]=1,c(u,S),p(u,S);var C=S._matchGroup;if(C)for(var P in C){var I=r.getFromId(u,P);p(u,I,S.range),E[P]=1}}a(u)},R.finalDraw=function(u){A.getComponentMethod("rangeslider","draw")(u),A.getComponentMethod("rangeselector","draw")(u)},R.drawMarginPushers=function(u){A.getComponentMethod("legend","draw")(u),A.getComponentMethod("rangeselector","draw")(u),A.getComponentMethod("sliders","draw")(u),A.getComponentMethod("updatemenus","draw")(u),A.getComponentMethod("colorbar","draw")(u)}},96318:function($,R,e){"use strict";var k=e(71828),A=k.isPlainObject,l=e(86281),T=e(74875),b=e(9012),d=e(44467),s=e(72075).dfltConfig;function t(f,x){f=k.extendDeep({},f);var v,g,y=Object.keys(f).sort();function h(_,E,L){if(A(E)&&A(_))t(_,E);else if(Array.isArray(E)&&Array.isArray(_)){var C=d.arrayTemplater({_template:f},L);for(g=0;g<E.length;g++){var P=E[g],I=C.newItem(P)._template;I&&t(I,P)}var U=C.defaultItems();for(g=0;g<U.length;g++)E.push(U[g]._template);for(g=0;g<E.length;g++)delete E[g].templateitemname}}for(v=0;v<y.length;v++){var m=y[v],w=f[m];if(m in x?h(w,x[m],m):x[m]=w,o(m)===m)for(var u in x){var S=o(u);u===S||S!==m||u in f||h(w,x[u],m)}}}function o(f){return f.replace(/[0-9]+$/,"")}function r(f,x,v,g,y){var h=y&&v(y);for(var m in f){var w=f[m],u=a(f,m,g),S=a(f,m,y),_=v(S);if(!_){var E=o(m);E!==m&&(_=v(S=a(f,E,y)))}if(!(h&&h===_||!_||_._noTemplating||"data_array"===_.valType||_.arrayOk&&Array.isArray(w)))if(!_.valType&&A(w))r(w,x,v,u,S);else if(_._isLinkedToArray&&Array.isArray(w))for(var L=!1,C=0,P={},I=0;I<w.length;I++){var U=w[I];if(A(U)){var z=U.name;if(z)P[z]||(r(U,x,v,a(w,C,u),a(w,C,S)),C++,P[z]=1);else if(!L){var H=a(f,d.arrayDefaultKey(m),g),F=a(w,C,u);r(U,x,v,F,a(w,C,S));var N=k.nestedProperty(x,F);k.nestedProperty(x,H).set(N.get()),N.set(null),L=!0}}}else k.nestedProperty(x,u).set(w)}}function n(f,x){return l.getLayoutValObject(f,k.nestedProperty({},x).parts)}function i(f,x){return l.getTraceValObject(f,k.nestedProperty({},x).parts)}function a(f,x,v){return v?Array.isArray(f)?v+"["+x+"]":v+"."+x:x}function c(f){for(var x=0;x<f.length;x++)if(A(f[x]))return!0}function p(f){var x;switch(f.code){case"data":x="The template has no key data.";break;case"layout":x="The template has no key layout.";break;case"missing":x=f.path?"There are no templates for item "+f.path+" with name "+f.templateitemname:"There are no templates for trace "+f.index+", of type "+f.traceType+".";break;case"unused":x=f.path?"The template item at "+f.path+" was not used in constructing the plot.":f.dataCount?"Some of the templates of type "+f.traceType+" were not used. The template has "+f.templateCount+" traces, the data only has "+f.dataCount+" of this type.":"The template has "+f.templateCount+" traces of type "+f.traceType+" but there are none in the data.";break;case"reused":x="Some of the templates of type "+f.traceType+" were used more than once. The template has "+f.templateCount+" traces, the data has "+f.dataCount+" of this type."}return f.msg=x,f}R.makeTemplate=function(f){f=k.isPlainObject(f)?f:k.getGraphDiv(f),f=k.extendDeep({_context:s},{data:f.data,layout:f.layout}),T.supplyDefaults(f);var x=f.data||[],v=f.layout||{};v._basePlotModules=f._fullLayout._basePlotModules,v._modules=f._fullLayout._modules;var g={data:{},layout:{}};x.forEach(function(C){var P={};r(C,P,i.bind(null,C));var I=k.coerce(C,{},b,"type"),U=g.data[I];U||(U=g.data[I]=[]),U.push(P)}),r(v,g.layout,n.bind(null,v)),delete g.layout.template;var y=v.template;if(A(y)){var h,m,w,u,S,_,E=y.layout;A(E)&&t(E,g.layout);var L=y.data;if(A(L)){for(m in g.data)if(w=L[m],Array.isArray(w)){for(_=(S=g.data[m]).length,u=w.length,h=0;h<_;h++)t(w[h%u],S[h]);for(h=_;h<u;h++)S.push(k.extendDeep({},w[h]))}for(m in L)m in g.data||(g.data[m]=k.extendDeep([],L[m]))}}return g},R.validateTemplate=function(f,x){var v=k.extendDeep({},{_context:s,data:f.data,layout:f.layout}),g=v.layout||{};A(x)||(x=g.template||{});var y=x.layout,h=x.data,m=[];v.layout=g,v.layout.template=x,T.supplyDefaults(v);var w=v._fullLayout,u=v._fullData,S={};if(A(y)?(function U(z,H){for(var F in z)if("_"!==F.charAt(0)&&A(z[F])){var N,B=o(F),j=[];for(N=0;N<H.length;N++)j.push(a(z,F,H[N])),B!==F&&j.push(a(z,B,H[N]));for(N=0;N<j.length;N++)S[j[N]]=1;U(z[F],j)}}(w,["layout"]),function U(z,H){for(var F in z)if(-1===F.indexOf("defaults")&&A(z[F])){var N=a(z,F,H);S[N]?U(z[F],N):m.push({code:"unused",path:N})}}(y,"layout")):m.push({code:"layout"}),A(h)){for(var _,E={},L=0;L<u.length;L++){var C=u[L];E[_=C.type]=(E[_]||0)+1,C._fullInput._template||m.push({code:"missing",index:C._fullInput.index,traceType:_})}for(_ in h){var P=h[_].length,I=E[_]||0;P>I?m.push({code:"unused",traceType:_,templateCount:P,dataCount:I}):I>P&&m.push({code:"reused",traceType:_,templateCount:P,dataCount:I})}}else m.push({code:"data"});if(function U(z,H){for(var F in z)if("_"!==F.charAt(0)){var N=z[F],B=a(z,F,H);A(N)?(Array.isArray(z)&&!1===N._template&&N.templateitemname&&m.push({code:"missing",path:B,templateitemname:N.templateitemname}),U(N,B)):Array.isArray(N)&&c(N)&&U(N,B)}}({data:u,layout:w},""),m.length)return m.map(p)}},403:function($,R,e){"use strict";var k=e(92770),A=e(72391),l=e(74875),T=e(71828),b=e(25095),d=e(5900),s=e(70942),t=e(11506).version,o={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}};$.exports=function(r,n){var i,a,c,p;function f(I){return!(I in n)||T.validate(n[I],o[I])}if(n=n||{},T.isPlainObject(r)?(i=r.data||[],a=r.layout||{},c=r.config||{},p={}):(r=T.getGraphDiv(r),i=T.extendDeep([],r.data),a=T.extendDeep({},r.layout),c=r._context,p=r._fullLayout||{}),!f("width")&&null!==n.width||!f("height")&&null!==n.height)throw new Error("Height and width should be pixel values.");if(!f("format"))throw new Error("Export format is not "+T.join2(o.format.values,", "," or ")+".");var x={};function v(I,U){return T.coerce(n,x,o,I,U)}var g=v("format"),y=v("width"),h=v("height"),m=v("scale"),w=v("setBackground"),u=v("imageDataOnly"),S=document.createElement("div");S.style.position="absolute",S.style.left="-5000px",document.body.appendChild(S);var _=T.extendFlat({},a);y?_.width=y:null===n.width&&k(p.width)&&(_.width=p.width),h?_.height=h:null===n.height&&k(p.height)&&(_.height=p.height);var E=T.extendFlat({},c,{_exportedPlot:!0,staticPlot:!0,setBackground:w}),L=b.getRedrawFunc(S);function C(){return new Promise(function(I){setTimeout(I,b.getDelay(S._fullLayout))})}function P(){return new Promise(function(I,U){var z=d(S,g,m),H=S._fullLayout.width,F=S._fullLayout.height;function N(){A.purge(S),document.body.removeChild(S)}if("full-json"===g){var B=l.graphJson(S,!1,"keepdata","object",!0,!0);return B.version=t,B=JSON.stringify(B),N(),I(u?B:b.encodeJSON(B))}if(N(),"svg"===g)return I(u?z:b.encodeSVG(z));var j=document.createElement("canvas");j.id=T.randstr(),s({format:g,width:H,height:F,scale:m,canvas:j,svg:z,promise:!0}).then(I).catch(U)})}return new Promise(function(I,U){A.newPlot(S,i,_,E).then(L).then(C).then(P).then(function(z){var H;I((H=z,u?H.replace(b.IMAGE_URL_PREFIX,""):H))}).catch(function(z){U(z)})})}},84936:function($,R,e){"use strict";var k=e(71828),A=e(74875),l=e(86281),T=e(72075).dfltConfig,b=k.isPlainObject,d=Array.isArray,s=k.isArrayOrTypedArray;function t(x,v,g,y,h,m){m=m||[];for(var w=Object.keys(x),u=0;u<w.length;u++){var S=w[u];if("transforms"!==S){var _=m.slice();_.push(S);var E=x[S],L=v[S],C=c(g,S),P=(C||{}).valType,I="info_array"===P,U="colorscale"===P,z=(C||{}).items;if(a(g,S))if(b(E)&&b(L)&&"any"!==P)t(E,L,C,y,h,_);else if(I&&d(E)){E.length>L.length&&y.push(i("unused",h,_.concat(L.length)));var H,F,B,j,J=L.length,G=Array.isArray(z);if(G&&(J=Math.min(J,z.length)),2===C.dimensions)for(F=0;F<J;F++)if(d(E[F])){E[F].length>L[F].length&&y.push(i("unused",h,_.concat(F,L[F].length)));var V=L[F].length;for(H=0;H<(G?Math.min(V,z[F].length):V);H++)j=L[F][H],k.validate(B=E[F][H],G?z[F][H]:z)?j!==B&&j!==+B&&y.push(i("dynamic",h,_.concat(F,H),B,j)):y.push(i("value",h,_.concat(F,H),B))}else y.push(i("array",h,_.concat(F),E[F]));else for(F=0;F<J;F++)j=L[F],k.validate(B=E[F],G?z[F]:z)?j!==B&&j!==+B&&y.push(i("dynamic",h,_.concat(F),B,j)):y.push(i("value",h,_.concat(F),B))}else if(C.items&&!I&&d(E)){var W,X,K=z[Object.keys(z)[0]],re=[];for(W=0;W<L.length;W++){var ee=L[W]._index||W;if((X=_.slice()).push(ee),b(E[ee])&&b(L[W])){re.push(ee);var ie=E[ee],oe=L[W];b(ie)&&!1!==ie.visible&&!1===oe.visible?y.push(i("invisible",h,X)):t(ie,oe,K,y,h,X)}}for(W=0;W<E.length;W++)(X=_.slice()).push(W),b(E[W])?-1===re.indexOf(W)&&y.push(i("unused",h,X)):y.push(i("object",h,X,E[W]))}else!b(E)&&b(L)?y.push(i("object",h,_,E)):s(E)||!s(L)||I||U?S in v?k.validate(E,C)?"enumerated"===C.valType&&(C.coerceNumber&&E!==+L||E!==L)&&y.push(i("dynamic",h,_,E,L)):y.push(i("value",h,_,E)):y.push(i("unused",h,_,E)):y.push(i("array",h,_,E));else y.push(i("schema",h,_))}}return y}$.exports=function(x,v){void 0===x&&(x=[]),void 0===v&&(v={});var g,y,h=l.get(),m=[],w={_context:k.extendFlat({},T)};d(x)?(w.data=k.extendDeep([],x),g=x):(w.data=[],g=[],m.push(i("array","data"))),b(v)?(w.layout=k.extendDeep({},v),y=v):(w.layout={},y={},arguments.length>1&&m.push(i("object","layout"))),A.supplyDefaults(w);for(var u=w._fullData,S=g.length,_=0;_<S;_++){var E=g[_],L=["data",_];if(b(E)){var C=u[_],P=C.type,I=h.traces[P].attributes;I.type={valType:"enumerated",values:[P]},!1===C.visible&&!1!==E.visible&&m.push(i("invisible",L)),t(E,C,I,m,L);var U=E.transforms,z=C.transforms;if(U){d(U)||m.push(i("array",L,["transforms"])),L.push("transforms");for(var H=0;H<U.length;H++){var F=["transforms",H],N=U[H].type;if(b(U[H])){var B=h.transforms[N]?h.transforms[N].attributes:{};B.type={valType:"enumerated",values:Object.keys(h.transforms)},t(U[H],z[H],B,m,L,F)}else m.push(i("object",L,F))}}}else m.push(i("object",L))}var j=w._fullLayout,J=function o(x,v){for(var g=x.layout.layoutAttributes,y=0;y<v.length;y++){var h=v[y],m=x.traces[h.type],w=m.layoutAttributes;w&&k.extendFlat(h.subplot?g[m.attributes.subplot.dflt]:g,w)}return g}(h,u);return t(y,j,J,m,"layout"),0===m.length?void 0:m};var r={object:function(x,v){return("layout"===x&&""===v?"The layout argument":"data"===x[0]&&""===v?"Trace "+x[1]+" in the data argument":n(x)+"key "+v)+" must be linked to an object container"},array:function(x,v){return("data"===x?"The data argument":n(x)+"key "+v)+" must be linked to an array container"},schema:function(x,v){return n(x)+"key "+v+" is not part of the schema"},unused:function(x,v,g){var y=b(g)?"container":"key";return n(x)+y+" "+v+" did not get coerced"},dynamic:function(x,v,g,y){return[n(x)+"key",v,"(set to '"+g+"')","got reset to","'"+y+"'","during defaults."].join(" ")},invisible:function(x,v){return(v?n(x)+"item "+v:"Trace "+x[1])+" got defaulted to be not visible"},value:function(x,v,g){return[n(x)+"key "+v,"is set to an invalid value ("+g+")"].join(" ")}};function n(x){return d(x)?"In data trace "+x[1]+", ":"In "+x+", "}function i(x,v,g,y,h){var m,w;g=g||"",d(v)?(m=v[0],w=v[1]):(m=v,w=null);var u=function(_){if(!d(_))return String(_);for(var E="",L=0;L<_.length;L++){var C=_[L];"number"==typeof C?E=E.substr(0,E.length-1)+"["+C+"]":E+=C,L<_.length-1&&(E+=".")}return E}(g),S=r[x](v,u,y,h);return k.log(S),{code:x,container:m,trace:w,path:g,astr:u,msg:S}}function a(x,v){var g=f(v),y=g.keyMinusId;return!!(y in x&&x[y]._isSubplotObj&&g.id)||v in x}function c(x,v){return v in x?x[v]:x[f(v).keyMinusId]}var p=k.counterRegex("([a-z]+)");function f(x){var v=x.match(p);return{keyMinusId:v&&v[1],id:v&&v[2]}}},85594:function($){"use strict";$.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}},85501:function($,R,e){"use strict";var k=e(71828),A=e(44467);$.exports=function(l,T,b){var d,s,t=b.name,o=b.inclusionAttr||"visible",r=T[t],n=k.isArrayOrTypedArray(l[t])?l[t]:[],i=T[t]=[],a=A.arrayTemplater(T,t,o);for(d=0;d<n.length;d++){var c=n[d];k.isPlainObject(c)?s=a.newItem(c):(s=a.newItem({}))[o]=!1,s._index=d,!1!==s[o]&&b.handleItemDefaults(c,s,T,b),i.push(s)}var p=a.defaultItems();for(d=0;d<p.length;d++)(s=p[d])._index=i.length,b.handleItemDefaults({},s,T,b,{}),i.push(s);if(k.isArrayOrTypedArray(r)){var f=Math.min(r.length,i.length);for(d=0;d<f;d++)k.relinkPrivateKeys(i[d],r[d])}return i}},9012:function($,R,e){"use strict";var k=e(41940),A=e(77914);$.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:k({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:A.hoverlabel,stream:{token:{valType:"string",noBlank:!0,strict:!0,editType:"calc"},maxpoints:{valType:"number",min:0,max:1e4,dflt:500,editType:"calc"},editType:"calc"},transforms:{_isLinkedToArray:"transform",editType:"calc"},uirevision:{valType:"any",editType:"none"}}},42973:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=A.dateTime2ms,T=A.incrementMonth,b=e(50606).ONEAVGMONTH;$.exports=function(d,s,t,o){if("date"!==s.type)return{vals:o};var r=d[t+"periodalignment"];if(!r)return{vals:o};var n,i=d[t+"period"];if(k(i)){if((i=+i)<=0)return{vals:o}}else if("string"==typeof i&&"M"===i.charAt(0)){var a=+i.substring(1);if(!(a>0&&Math.round(a)===a))return{vals:o};n=a}for(var c=s.calendar,p="start"===r,f="end"===r,v=l(d[t+"period0"],c)||0,g=[],y=[],h=[],m=o.length,w=0;w<m;w++){var u,S,_,E=o[w];if(n){for(u=Math.round((E-v)/(n*b)),_=T(v,n*u,c);_>E;)_=T(_,-n,c);for(;_<=E;)_=T(_,n,c);S=T(_,-n,c)}else{for(_=v+(u=Math.round((E-v)/i))*i;_>E;)_-=i;for(;_<=E;)_+=i;S=_-i}g[w]=p?S:f?_:(S+_)/2,y[w]=S,h[w]=_}return{vals:g,starts:y,ends:h}}},89502:function($){"use strict";$.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},71739:function($,R,e){"use strict";var k=e(39898),A=e(92770),l=e(71828),T=e(50606).FP_SAFE,b=e(73972),d=e(91424),s=e(41675),t=s.getFromId,o=s.isLinked;function r(y,h){var m,w,u=[],S=y._fullLayout,_=i(S,h,0),E=i(S,h,1),L=a(y,h),C=L.min,P=L.max;if(0===C.length||0===P.length)return l.simpleMap(h.range,h.r2l);var I=C[0].val,U=P[0].val;for(m=1;m<C.length&&I===U;m++)I=Math.min(I,C[m].val);for(m=1;m<P.length&&I===U;m++)U=Math.max(U,P[m].val);var z=!1;if(h.range){var H=l.simpleMap(h.range,h.r2l);z=H[1]<H[0]}"reversed"===h.autorange&&(z=!0,h.autorange=!0);var F,N,B,j,J,G,V=h.rangemode,W="tozero"===V,X="nonnegative"===V,K=h._length,re=K/10,ee=0;for(m=0;m<C.length;m++)for(F=C[m],w=0;w<P.length;w++)(G=(N=P[w]).val-F.val-n(h,F.val,N.val))>0&&((J=K-_(F)-E(N))>re?G/J>ee&&(B=F,j=N,ee=G/J):G/K>ee&&(B={val:F.val,nopad:1},j={val:N.val,nopad:1},ee=G/K));if(I===U){var ie=I-1,oe=I+1;if(W)if(0===I)u=[0,1];else{var ce=(I>0?P:C).reduce(function(de,he){return Math.max(de,E(he))},0),me=I/(1-Math.min(.5,ce/K));u=I>0?[0,me]:[me,0]}else u=X?[Math.max(0,ie),Math.max(1,oe)]:[ie,oe]}else W?(B.val>=0&&(B={val:0,nopad:1}),j.val<=0&&(j={val:0,nopad:1})):X&&(B.val-ee*_(B)<0&&(B={val:0,nopad:1}),j.val<=0&&(j={val:1,nopad:1})),ee=(j.val-B.val-n(h,F.val,N.val))/(K-_(B)-E(j)),u=[B.val-ee*_(B),j.val+ee*E(j)];return z&&u.reverse(),l.simpleMap(u,h.l2r||Number)}function n(y,h,m){var w=0;if(y.rangebreaks)for(var u=y.locateBreaks(h,m),S=0;S<u.length;S++){var _=u[S];w+=_.max-_.min}return w}function i(y,h,m){var w=.05*h._length,u=h._anchorAxis||{};if(-1!==(h.ticklabelposition||"").indexOf("inside")||-1!==(u.ticklabelposition||"").indexOf("inside")){var S="reversed"===h.autorange;if(!S){var _=l.simpleMap(h.range,h.r2l);S=_[1]<_[0]}S&&(m=!m)}var E=0;return o(y,h._id)||(E=function(L,C,P){var I=0,U="x"===C._id.charAt(0);for(var z in L._plots){var H=L._plots[z];if(C._id===H.xaxis._id||C._id===H.yaxis._id){var F=(U?H.yaxis:H.xaxis)||{};if(-1!==(F.ticklabelposition||"").indexOf("inside")&&(!P&&("left"===F.side||"bottom"===F.side)||P&&("top"===F.side||"right"===F.side))){if(F._vals){var N=l.deg2rad(F._tickAngles[F._id+"tick"]||0),B=Math.abs(Math.cos(N)),j=Math.abs(Math.sin(N));F._vals[0].bb||F._selections[F._id+"tick"].each(function(K){var re=k.select(this);re.select(".text-math-group").empty()&&(K.bb=d.bBox(re.node()))});for(var G=0;G<F._vals.length;G++){var V=F._vals[G].bb;if(V){var W=6+V.width,X=6+V.height;I=Math.max(I,U?Math.max(W*B,X*j):Math.max(X*B,W*j))}}}"inside"===F.ticks&&"inside"===F.ticklabelposition&&(I+=F.ticklen||0)}}}return I}(y,h,m)),w=Math.max(E,w),"domain"===h.constrain&&h._inputDomain&&(w*=(h._inputDomain[1]-h._inputDomain[0])/(h.domain[1]-h.domain[0])),function(L){return L.nopad?0:L.pad+(L.extrapad?w:E)}}function a(y,h,m){var w,u,S,_=h._id,L=y._fullLayout,C=[],P=[];function I(N,B){for(w=0;w<B.length;w++){var j=N[B[w]],J=(j._extremes||{})[_];if(!0===j.visible&&J){for(u=0;u<J.min.length;u++)c(C,(S=J.min[u]).val,S.pad,{extrapad:S.extrapad});for(u=0;u<J.max.length;u++)p(P,(S=J.max[u]).val,S.pad,{extrapad:S.extrapad})}}}if(I(y._fullData,h._traceIndices),I(L.annotations||[],h._annIndices||[]),I(L.shapes||[],h._shapeIndices||[]),h._matchGroup&&!m)for(var U in h._matchGroup)if(U!==h._id){var z=t(y,U),H=a(y,z,!0),F=h._length/z._length;for(u=0;u<H.min.length;u++)c(C,(S=H.min[u]).val,S.pad*F,{extrapad:S.extrapad});for(u=0;u<H.max.length;u++)p(P,(S=H.max[u]).val,S.pad*F,{extrapad:S.extrapad})}return{min:C,max:P}}function c(y,h,m,w){f(y,h,m,w,v)}function p(y,h,m,w){f(y,h,m,w,g)}function f(y,h,m,w,u){for(var S=w.tozero,_=w.extrapad,E=!0,L=0;L<y.length&&E;L++){var C=y[L];if(u(C.val,h)&&C.pad>=m&&(C.extrapad||!_)){E=!1;break}u(h,C.val)&&C.pad<=m&&(_||!C.extrapad)&&(y.splice(L,1),L--)}if(E){var P=S&&0===h;y.push({val:h,pad:P?0:m,extrapad:!P&&_})}}function x(y){return A(y)&&Math.abs(y)<T}function v(y,h){return y<=h}function g(y,h){return y>=h}$.exports={getAutoRange:r,makePadFn:i,doAutoRange:function(y,h,m){if(h.setScale(),h.autorange){h.range=m?m.slice():r(y,h),h._r=h.range.slice(),h._rl=l.simpleMap(h._r,h.r2l);var w=h._input,u={};u[h._attr+".range"]=h.range,u[h._attr+".autorange"]=h.autorange,b.call("_storeDirectGUIEdit",y.layout,y._fullLayout._preGUI,u),w.range=h.range.slice(),w.autorange=h.autorange}var S=h._anchorAxis;if(S&&S.rangeslider){var _=S.rangeslider[h._name];_&&"auto"===_.rangemode&&(_.range=r(y,h)),S._input.rangeslider[h._name]=l.extendFlat({},_)}},findExtremes:function(y,h,m){m||(m={}),y._m||y.setScale();var w,u,S,_,E,L,C,P,I,U=[],z=[],H=h.length,F=m.padded||!1,N=m.tozero&&("linear"===y.type||"-"===y.type),B="log"===y.type,j=!1,J=m.vpadLinearized||!1;function G(oe){if(Array.isArray(oe))return j=!0,function(me){return Math.max(Number(oe[me]||0),0)};var ce=Math.max(Number(oe||0),0);return function(){return ce}}var V=G((y._m>0?m.ppadplus:m.ppadminus)||m.ppad||0),W=G((y._m>0?m.ppadminus:m.ppadplus)||m.ppad||0),X=G(m.vpadplus||m.vpad),K=G(m.vpadminus||m.vpad);if(!j){if(P=1/0,I=-1/0,B)for(w=0;w<H;w++)(u=h[w])<P&&u>0&&(P=u),u>I&&u<T&&(I=u);else for(w=0;w<H;w++)(u=h[w])<P&&u>-T&&(P=u),u>I&&u<T&&(I=u);h=[P,I],H=2}var re={tozero:N,extrapad:F};function ee(oe){A(S=h[oe])&&(L=V(oe),C=W(oe),J?(_=y.c2l(S)-K(oe),E=y.c2l(S)+X(oe)):(P=S-K(oe),I=S+X(oe),B&&P<I/10&&(P=I/10),_=y.c2l(P),E=y.c2l(I)),N&&(_=Math.min(0,_),E=Math.max(0,E)),x(_)&&c(U,_,C,re),x(E)&&p(z,E,L,re))}var ie=Math.min(6,H);for(w=0;w<ie;w++)ee(w);for(w=H-1;w>=ie;w--)ee(w);return{min:U,max:z,opts:m}},concatExtremes:a}},89298:function($,R,e){"use strict";var k=e(39898),A=e(92770),l=e(74875),T=e(73972),b=e(71828),d=b.strTranslate,s=e(63893),t=e(92998),o=e(7901),r=e(91424),n=e(13838),i=e(66287),a=e(50606),c=a.ONEMAXYEAR,p=a.ONEAVGYEAR,f=a.ONEMINYEAR,x=a.ONEMAXQUARTER,v=a.ONEAVGQUARTER,g=a.ONEMINQUARTER,y=a.ONEMAXMONTH,h=a.ONEAVGMONTH,m=a.ONEMINMONTH,w=a.ONEWEEK,u=a.ONEDAY,S=u/2,_=a.ONEHOUR,E=a.ONEMIN,L=a.ONESEC,C=a.MINUS_SIGN,P=a.BADNUM,I={K:"zeroline"},U={K:"gridline",L:"path"},z={K:"minor-gridline",L:"path"},H={K:"tick",L:"path"},F={K:"tick",L:"text"},N={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},B=e(18783),j=B.MID_SHIFT,J=B.CAP_SHIFT,G=B.LINE_SPACING,V=B.OPPOSITE_SIDE,W=$.exports={};W.setConvert=e(21994);var X=e(4322),K=e(41675),re=K.idSort,ee=K.isLinked;W.id2name=K.id2name,W.name2id=K.name2id,W.cleanId=K.cleanId,W.list=K.list,W.listIds=K.listIds,W.getFromId=K.getFromId,W.getFromTrace=K.getFromTrace;var ie=e(71739);function oe(Se){var ze=1e-4*(Se[1]-Se[0]);return[Se[0]-ze,Se[1]+ze]}W.getAutoRange=ie.getAutoRange,W.findExtremes=ie.findExtremes,W.coerceRef=function(Se,ze,Ke,st,ct,Tt){var Et=st.charAt(st.length-1),At=Ke._fullLayout._subplots[Et+"axis"],ht=st+"ref",pt={};return ct||(ct=At[0]||("string"==typeof Tt?Tt:Tt[0])),Tt||(Tt=ct),At=At.concat(At.map(function(gt){return gt+" domain"})),pt[ht]={valType:"enumerated",values:At.concat(Tt?"string"==typeof Tt?[Tt]:Tt:[]),dflt:ct},b.coerce(Se,ze,pt,ht)},W.getRefType=function(Se){return void 0===Se?Se:"paper"===Se?"paper":"pixel"===Se?"pixel":/( domain)$/.test(Se)?"domain":"range"},W.coercePosition=function(Se,ze,Ke,st,ct,Tt){var Et,At;if("range"!==W.getRefType(st))Et=b.ensureNumber,At=Ke(ct,Tt);else{var ht=W.getFromId(ze,st);At=Ke(ct,Tt=ht.fraction2r(Tt)),Et=ht.cleanPos}Se[ct]=Et(At)},W.cleanPosition=function(Se,ze,Ke){return("paper"===Ke||"pixel"===Ke?b.ensureNumber:W.getFromId(ze,Ke).cleanPos)(Se)},W.redrawComponents=function(Se,ze){ze=ze||W.listIds(Se);var Ke=Se._fullLayout;function st(ct,Tt,Et,At){for(var ht=T.getComponentMethod(ct,Tt),pt={},gt=0;gt<ze.length;gt++)for(var Pt=Ke[W.id2name(ze[gt])][Et],Ot=0;Ot<Pt.length;Ot++){var Ht=Pt[Ot];if(!pt[Ht]&&(ht(Se,Ht),pt[Ht]=1,At))return}}st("annotations","drawOne","_annIndices"),st("shapes","drawOne","_shapeIndices"),st("images","draw","_imgIndices",!0),st("selections","drawOne","_selectionIndices")};var ce=W.getDataConversions=function(Se,ze,Ke,st){var ct,Tt="x"===Ke||"y"===Ke||"z"===Ke?Ke:st;if(Array.isArray(Tt)){if(ct={type:X(st,void 0,{autotypenumbers:Se._fullLayout.autotypenumbers}),_categories:[]},W.setConvert(ct),"category"===ct.type)for(var Et=0;Et<st.length;Et++)ct.d2c(st[Et])}else ct=W.getFromTrace(Se,ze,Tt);return ct?{d2c:ct.d2c,c2d:ct.c2d}:"ids"===Tt?{d2c:de,c2d:de}:{d2c:me,c2d:me}};function me(Se){return+Se}function de(Se){return String(Se)}function he(Se,ze){return Math.abs((Se/ze+.5)%1-.5)<.001}function ve(Se,ze){return Math.abs(Se/ze-1)<.001}function Pe(Se){return+Se.substring(1)}function xe(Se,ze){return Se.rangebreaks&&(ze=ze.filter(function(Ke){return Se.maskBreaks(Ke.x)!==P})),ze}function ke(Se){var ze=Se._mainAxis,Ke=[];if(ze._vals)for(var st=0;st<ze._vals.length;st++)if(!ze._vals[st].noTick){var ct=ze.l2p(ze._vals[st].x),Tt=Se.p2l(ct),Et=W.tickText(Se,Tt);ze._vals[st].minor&&(Et.minor=!0,Et.text=""),Ke.push(Et)}return xe(Se,Ke)}function Ae(Se){var ze=oe(b.simpleMap(Se.range,Se.r2l)),Ke=Math.min(ze[0],ze[1]),st=Math.max(ze[0],ze[1]),ct="category"===Se.type?Se.d2l_noadd:Se.d2l;"log"===Se.type&&"L"!==String(Se.dtick).charAt(0)&&(Se.dtick="L"+Math.pow(10,Math.floor(Math.min(Se.range[0],Se.range[1]))-1));for(var Tt=[],Et=0;Et<=1;Et++)if(!Et||Se.minor){var At=Et?Se.minor.tickvals:Se.tickvals,ht=Et?[]:Se.ticktext;if(At){Array.isArray(ht)||(ht=[]);for(var pt=0;pt<At.length;pt++){var gt=ct(At[pt]);if(gt>Ke&&gt<st){var Pt=void 0===ht[pt]?W.tickText(Se,gt):le(Se,gt,String(ht[pt]));Et&&(Pt.minor=!0,Pt.text=""),Tt.push(Pt)}}}}return xe(Se,Tt)}W.getDataToCoordFunc=function(Se,ze,Ke,st){return ce(Se,ze,Ke,st).d2c},W.counterLetter=function(Se){var ze=Se.charAt(0);return"x"===ze?"y":"y"===ze?"x":void 0},W.minDtick=function(Se,ze,Ke,st){-1===["log","category","multicategory"].indexOf(Se.type)&&st?void 0===Se._minDtick?(Se._minDtick=ze,Se._forceTick0=Ke):Se._minDtick&&((Se._minDtick/ze+1e-6)%1<2e-6&&((Ke-Se._forceTick0)/ze%1+1.000001)%1<2e-6?(Se._minDtick=ze,Se._forceTick0=Ke):((ze/Se._minDtick+1e-6)%1>2e-6||((Ke-Se._forceTick0)/Se._minDtick%1+1.000001)%1>2e-6)&&(Se._minDtick=0)):Se._minDtick=0},W.saveRangeInitial=function(Se,ze){for(var Ke=W.list(Se,"",!0),st=!1,ct=0;ct<Ke.length;ct++){var Tt=Ke[ct],Et=void 0===Tt._rangeInitial;(Et&&!1===Tt.autorange||ze&&(Et||Tt.range[0]!==Tt._rangeInitial[0]||Tt.range[1]!==Tt._rangeInitial[1]))&&(Tt._rangeInitial=Tt.range.slice(),st=!0)}return st},W.saveShowSpikeInitial=function(Se,ze){for(var Ke=W.list(Se,"",!0),st=!1,ct="on",Tt=0;Tt<Ke.length;Tt++){var Et=Ke[Tt],At=void 0===Et._showSpikeInitial;(At||ze&&(At||Et.showspikes!==Et._showspikes))&&(Et._showSpikeInitial=Et.showspikes,st=!0),"on"!==ct||Et.showspikes||(ct="off")}return Se._fullLayout._cartesianSpikesEnabled=ct,st},W.autoBin=function(Se,ze,Ke,st,ct,Tt){var Et,At=b.aggNums(Math.min,null,Se),ht=b.aggNums(Math.max,null,Se);if("category"===ze.type||"multicategory"===ze.type)return{start:At-.5,end:ht+.5,size:Math.max(1,Math.round(Tt)||1),_dataSpan:ht-At};if(ct||(ct=ze.calendar),Et="log"===ze.type?{type:"linear",range:[At,ht]}:{type:ze.type,range:b.simpleMap([At,ht],ze.c2r,0,ct),calendar:ct},W.setConvert(Et),Tt=Tt&&i.dtick(Tt,Et.type))Et.dtick=Tt,Et.tick0=i.tick0(void 0,Et.type,ct);else{var pt;if(Ke)pt=(ht-At)/Ke;else{var gt=b.distinctVals(Se),Pt=Math.pow(10,Math.floor(Math.log(gt.minDiff)/Math.LN10)),Ot=Pt*b.roundUp(gt.minDiff/Pt,[.9,1.9,4.9,9.9],!0);pt=Math.max(Ot,2*b.stdev(Se)/Math.pow(Se.length,st?.25:.4)),A(pt)||(pt=1)}W.autoTicks(Et,pt)}var Ht,jt=Et.dtick,Nt=W.tickIncrement(W.tickFirst(Et),jt,"reverse",ct);if("number"==typeof jt)Ht=(Nt=function(Gt,un,pn,Kt,wn){var Bn=0,vn=0,cn=0,dn=0;function sn(Rn){return(1+100*(Rn-Gt)/pn.dtick)%100<2}for(var hn=0;hn<un.length;hn++)un[hn]%1==0?cn++:A(un[hn])||dn++,sn(un[hn])&&Bn++,sn(un[hn]+pn.dtick/2)&&vn++;var En=un.length-dn;if(cn===En&&"date"!==pn.type)pn.dtick<1?Gt=Kt-.5*pn.dtick:(Gt-=.5)+pn.dtick<Kt&&(Gt+=pn.dtick);else if(vn<.1*En&&(Bn>.3*En||sn(Kt)||sn(wn))){var Mn=pn.dtick/2;Gt+=Gt+Mn<Kt?Mn:-Mn}return Gt}(Nt,Se,Et,At,ht))+(1+Math.floor((ht-Nt)/jt))*jt;else for("M"===Et.dtick.charAt(0)&&(Nt=function(Gt,un,pn,Kt,wn){var Bn=b.findExactDates(un,wn);if(Bn.exactDays>.8){var vn=Number(pn.substr(1));Bn.exactYears>.8&&vn%12==0?Gt=W.tickIncrement(Gt,"M6","reverse")+1.5*u:Bn.exactMonths>.8?Gt=W.tickIncrement(Gt,"M1","reverse")+15.5*u:Gt-=S;var cn=W.tickIncrement(Gt,pn);if(cn<=Kt)return cn}return Gt}(Nt,Se,jt,At,ct)),Ht=Nt;Ht<=ht;)Ht=W.tickIncrement(Ht,jt,!1,ct);return{start:ze.c2r(Nt,0,ct),end:ze.c2r(Ht,0,ct),size:jt,_dataSpan:ht-At}},W.prepMinorTicks=function(Se,ze,Ke){if(!ze.minor.dtick){delete Se.dtick;var st,ct=ze.dtick&&A(ze._tmin);if(ct){var Tt=W.tickIncrement(ze._tmin,ze.dtick,!0);st=[ze._tmin,.99*Tt+.01*ze._tmin]}else{var Et=b.simpleMap(ze.range,ze.r2l);st=[Et[0],.8*Et[0]+.2*Et[1]]}if(Se.range=b.simpleMap(st,ze.l2r),Se._isMinor=!0,W.prepTicks(Se,Ke),ct){var At=A(ze.dtick),ht=A(Se.dtick),pt=At?ze.dtick:+ze.dtick.substring(1),gt=ht?Se.dtick:+Se.dtick.substring(1);At&&ht?he(pt,gt)?pt===2*w&&gt===2*u&&(Se.dtick=w):Se.dtick=pt===2*w&&gt===3*u?w:pt!==w||(ze._input.minor||{}).nticks?ve(pt/gt,2.5)?pt/2:pt:u:"M"===String(ze.dtick).charAt(0)?ht?Se.dtick="M1":he(pt,gt)?pt>=12&&2===gt&&(Se.dtick="M3"):Se.dtick=ze.dtick:"L"===String(Se.dtick).charAt(0)?"L"===String(ze.dtick).charAt(0)?he(pt,gt)||(Se.dtick=ve(pt/gt,2.5)?ze.dtick/2:ze.dtick):Se.dtick="D1":"D2"===Se.dtick&&+ze.dtick>1&&(Se.dtick=1)}Se.range=ze.range}void 0===ze.minor._tick0Init&&(Se.tick0=ze.tick0)},W.prepTicks=function(Se,ze){var Ke=b.simpleMap(Se.range,Se.r2l,void 0,void 0,ze);if("auto"===Se.tickmode||!Se.dtick){var st,ct=Se.nticks;ct||("category"===Se.type||"multicategory"===Se.type?(st=Se.tickfont?b.bigFont(Se.tickfont.size||12):15,ct=Se._length/st):(st="y"===Se._id.charAt(0)?40:80,ct=b.constrain(Se._length/st,4,9)+1),"radialaxis"===Se._name&&(ct*=2)),Se.minor&&"array"!==Se.minor.tickmode||"array"===Se.tickmode&&(ct*=100),Se._roughDTick=Math.abs(Ke[1]-Ke[0])/ct,W.autoTicks(Se,Se._roughDTick),Se._minDtick>0&&Se.dtick<2*Se._minDtick&&(Se.dtick=Se._minDtick,Se.tick0=Se.l2r(Se._forceTick0))}"period"===Se.ticklabelmode&&function(Tt){var Et;function At(){return!(A(Tt.dtick)||"M"!==Tt.dtick.charAt(0))}var ht=At(),pt=W.getTickFormat(Tt);if(pt){var gt=Tt._dtickInit!==Tt.dtick;/%[fLQsSMX]/.test(pt)||(/%[HI]/.test(pt)?(Et=_,gt&&!ht&&Tt.dtick<_&&(Tt.dtick=_)):/%p/.test(pt)?(Et=S,gt&&!ht&&Tt.dtick<S&&(Tt.dtick=S)):/%[Aadejuwx]/.test(pt)?(Et=u,gt&&!ht&&Tt.dtick<u&&(Tt.dtick=u)):/%[UVW]/.test(pt)?(Et=w,gt&&!ht&&Tt.dtick<w&&(Tt.dtick=w)):/%[Bbm]/.test(pt)?(Et=h,gt&&(ht?Pe(Tt.dtick)<1:Tt.dtick<m)&&(Tt.dtick="M1")):/%[q]/.test(pt)?(Et=v,gt&&(ht?Pe(Tt.dtick)<3:Tt.dtick<g)&&(Tt.dtick="M3")):/%[Yy]/.test(pt)&&(Et=p,gt&&(ht?Pe(Tt.dtick)<12:Tt.dtick<f)&&(Tt.dtick="M12")))}(ht=At())&&Tt.tick0===Tt._dowTick0&&(Tt.tick0=Tt._rawTick0),Tt._definedDelta=Et}(Se),Se.tick0||(Se.tick0="date"===Se.type?"2000-01-01":0),"date"===Se.type&&Se.dtick<.1&&(Se.dtick=.1),Re(Se)},W.calcTicks=function(Se,ze){for(var Ke,st,ct=Se.type,Tt=Se.calendar,Et=Se.ticklabelstep,At="period"===Se.ticklabelmode,ht=b.simpleMap(Se.range,Se.r2l,void 0,void 0,ze),pt=ht[1]<ht[0],gt=Math.min(ht[0],ht[1]),Pt=Math.max(ht[0],ht[1]),Ot=Math.max(1e3,Se._length||0),Ht=[],jt=[],Nt=[],Gt=[],un=Se.minor&&(Se.minor.ticks||Se.minor.showgrid),pn=1;pn>=(un?0:1);pn--){var Kt=!pn;pn?(Se._dtickInit=Se.dtick,Se._tick0Init=Se.tick0):(Se.minor._dtickInit=Se.minor.dtick,Se.minor._tick0Init=Se.minor.tick0);var wn=pn?Se:b.extendFlat({},Se,Se.minor);if(Kt?W.prepMinorTicks(wn,Se,ze):W.prepTicks(wn,ze),"array"!==wn.tickmode)if("sync"!==wn.tickmode){var Bn=oe(ht),vn=Bn[0],cn=Bn[1],dn=A(wn.dtick),sn="log"===ct&&!(dn||"L"===wn.dtick.charAt(0)),hn=W.tickFirst(wn,ze);if(pn){if(Se._tmin=hn,hn<vn!==pt)break;"category"!==ct&&"multicategory"!==ct||(cn=pt?Math.max(-.5,cn):Math.min(Se._categories.length-.5,cn))}var En,Mn,Rn=null,Nn=hn;pn&&(dn?Mn=Se.dtick:"date"===ct?"string"==typeof Se.dtick&&"M"===Se.dtick.charAt(0)&&(Mn=h*Se.dtick.substring(1)):Mn=Se._roughDTick,En=Math.round((Se.r2l(Nn)-Se.r2l(Se.tick0))/Mn)-1);var Fn=wn.dtick;for(wn.rangebreaks&&wn._tick0Init!==wn.tick0&&(Nn=We(Nn,Se),pt||(Nn=W.tickIncrement(Nn,Fn,!pt,Tt))),pn&&At&&(Nn=W.tickIncrement(Nn,Fn,!pt,Tt),En--);pt?Nn>=cn:Nn<=cn;Nn=W.tickIncrement(Nn,Fn,pt,Tt)){if(pn&&En++,wn.rangebreaks&&!pt){if(Nn<vn)continue;if(wn.maskBreaks(Nn)===P&&We(Nn,wn)>=Pt)break}if(Nt.length>Ot||Nn===Rn)break;Rn=Nn;var rr={value:Nn};pn?(sn&&Nn!==(0|Nn)&&(rr.simpleLabel=!0),Et>1&&En%Et&&(rr.skipLabel=!0),Nt.push(rr)):(rr.minor=!0,Gt.push(rr))}}else Nt=[],Ht=ke(Se);else pn?(Nt=[],Ht=Ae(Se)):(Gt=[],jt=Ae(Se))}if(un&&!("inside"===Se.minor.ticks&&"outside"===Se.ticks||"outside"===Se.minor.ticks&&"inside"===Se.ticks)){for(var $n=Nt.map(function(kn){return kn.value}),mr=[],fr=0;fr<Gt.length;fr++){var Zn=Gt[fr],qn=Zn.value;if(-1===$n.indexOf(qn)){for(var ur=!1,Zt=0;!ur&&Zt<Nt.length;Zt++)1e7+Nt[Zt].value===1e7+qn&&(ur=!0);ur||mr.push(Zn)}}Gt=mr}if(At&&function(kn,zt,Wt){for(var tn=0;tn<kn.length;tn++){var Sn=kn[tn].value,An=tn,Tn=tn+1;tn<kn.length-1?(An=tn,Tn=tn+1):tn>0?(An=tn-1,Tn=tn):(An=tn,Tn=tn);var an,fn=Math.abs(kn[Tn].value-kn[An].value),yn=Wt||fn,Ln=0;yn>=f?Ln=fn>=f&&fn<=c?fn:p:Wt===v&&yn>=g?Ln=fn>=g&&fn<=x?fn:v:yn>=m?Ln=fn>=m&&fn<=y?fn:h:Wt===w&&yn>=w?Ln=w:yn>=u?Ln=u:Wt===S&&yn>=S?Ln=S:Wt===_&&yn>=_&&(Ln=_),Ln>=fn&&(Ln=fn,an=!0);var Hn=Sn+Ln;if(zt.rangebreaks&&Ln>0){for(var Wn=0,Kn=0;Kn<84;Kn++){var nr=(Kn+.5)/84;zt.maskBreaks(Sn*(1-nr)+nr*Hn)!==P&&Wn++}(Ln*=Wn/84)||(kn[tn].drop=!0),an&&fn>w&&(Ln=fn)}(Ln>0||0===tn)&&(kn[tn].periodX=Sn+Ln/2)}}(Nt,Se,Se._definedDelta),Se.rangebreaks){var nn="y"===Se._id.charAt(0),zn=1;"auto"===Se.tickmode&&(zn=Se.tickfont?Se.tickfont.size:12);var _n=NaN;for(Ke=Nt.length-1;Ke>-1;Ke--)if(Nt[Ke].drop)Nt.splice(Ke,1);else{Nt[Ke].value=We(Nt[Ke].value,Se);var Cn=Se.c2p(Nt[Ke].value);(nn?_n>Cn-zn:_n<Cn+zn)?Nt.splice(pt?Ke+1:Ke,1):_n=Cn}}Ge(Se)&&360===Math.abs(ht[1]-ht[0])&&Nt.pop(),Se._tmax=(Nt[Nt.length-1]||{}).value,Se._prevDateHead="",Se._inCalcTicks=!0;var Un,Gn,ar=function(kn){kn.text="",Se._prevDateHead=st};for(Nt=Nt.concat(Gt),Ke=0;Ke<Nt.length;Ke++){var $t=Nt[Ke].value;Nt[Ke].minor?jt.push({x:$t,minor:!0}):(st=Se._prevDateHead,Un=W.tickText(Se,$t,!1,Nt[Ke].simpleLabel),void 0!==(Gn=Nt[Ke].periodX)&&(Un.periodX=Gn,(Gn>Pt||Gn<gt)&&(Gn>Pt&&(Un.periodX=Pt),Gn<gt&&(Un.periodX=gt),ar(Un))),Nt[Ke].skipLabel&&ar(Un),Ht.push(Un))}return Ht=Ht.concat(jt),Se._inCalcTicks=!1,At&&Ht.length&&(Ht[0].noTick=!0),Ht};var Te=[2,5,10],Q=[1,2,3,6,12],se=[1,2,5,10,15,30],fe=[1,2,3,7,14],ye=[-.046,0,.301,.477,.602,.699,.778,.845,.903,.954,1],Me=[-.301,0,.301,.699,1],Ie=[15,30,45,90,180];function Ce(Se,ze,Ke){return ze*b.roundUp(Se/ze,Ke)}function Re(Se){var ze=Se.dtick;if(Se._tickexponent=0,A(ze)||"string"==typeof ze||(ze=1),"category"!==Se.type&&"multicategory"!==Se.type||(Se._tickround=null),"date"===Se.type){var Ke=Se.r2l(Se.tick0),st=Se.l2r(Ke).replace(/(^-|i)/g,""),ct=st.length;if("M"===String(ze).charAt(0))Se._tickround=ct>10||"01-01"!==st.substr(5)?"d":+ze.substr(1)%12==0?"y":"m";else if(ze>=u&&ct<=10||ze>=15*u)Se._tickround="d";else if(ze>=E&&ct<=16||ze>=_)Se._tickround="M";else if(ze>=L&&ct<=19||ze>=E)Se._tickround="S";else{var Tt=Se.l2r(Ke+ze).replace(/^-/,"").length;Se._tickround=Math.max(ct,Tt)-20,Se._tickround<0&&(Se._tickround=4)}}else if(A(ze)||"L"===ze.charAt(0)){var Et=Se.range.map(Se.r2d||Number);A(ze)||(ze=Number(ze.substr(1))),Se._tickround=2-Math.floor(Math.log(ze)/Math.LN10+.01);var At=Math.max(Math.abs(Et[0]),Math.abs(Et[1])),ht=Math.floor(Math.log(At)/Math.LN10+.01),pt=void 0===Se.minexponent?3:Se.minexponent;Math.abs(ht)>pt&&(Se._tickexponent=_e(Se.exponentformat)&&!Fe(ht)?3*Math.round((ht-1)/3):ht)}else Se._tickround=null}function le(Se,ze,Ke){var st=Se.tickfont||{};return{x:ze,dx:0,dy:0,text:Ke||"",fontSize:st.size,font:st.family,fontColor:st.color}}W.autoTicks=function(Se,ze,Ke){var st;function ct(Pt){return Math.pow(Pt,Math.floor(Math.log(ze)/Math.LN10))}if("date"===Se.type){Se.tick0=b.dateTick0(Se.calendar,0);var Tt=2*ze;if(Tt>p)ze/=p,st=ct(10),Se.dtick="M"+12*Ce(ze,st,Te);else if(Tt>h)Se.dtick="M"+Ce(ze/=h,1,Q);else if(Tt>u){if(Se.dtick=Ce(ze,u,Se._hasDayOfWeekBreaks?[1,2,7,14]:fe),!Ke){var Et=W.getTickFormat(Se),At="period"===Se.ticklabelmode;At&&(Se._rawTick0=Se.tick0),Se.tick0=/%[uVW]/.test(Et)?b.dateTick0(Se.calendar,2):b.dateTick0(Se.calendar,1),At&&(Se._dowTick0=Se.tick0)}}else Tt>_?Se.dtick=Ce(ze,_,Q):Tt>E?Se.dtick=Ce(ze,E,se):Tt>L?Se.dtick=Ce(ze,L,se):(st=ct(10),Se.dtick=Ce(ze,st,Te))}else if("log"===Se.type){Se.tick0=0;var ht=b.simpleMap(Se.range,Se.r2l);if(Se._isMinor&&(ze*=1.5),ze>.7)Se.dtick=Math.ceil(ze);else if(Math.abs(ht[1]-ht[0])<1){var pt=1.5*Math.abs((ht[1]-ht[0])/ze);ze=Math.abs(Math.pow(10,ht[1])-Math.pow(10,ht[0]))/pt,st=ct(10),Se.dtick="L"+Ce(ze,st,Te)}else Se.dtick=ze>.3?"D2":"D1"}else"category"===Se.type||"multicategory"===Se.type?(Se.tick0=0,Se.dtick=Math.ceil(Math.max(ze,1))):Ge(Se)?(Se.tick0=0,Se.dtick=Ce(ze,st=1,Ie)):(Se.tick0=0,st=ct(10),Se.dtick=Ce(ze,st,Te));if(0===Se.dtick&&(Se.dtick=1),!A(Se.dtick)&&"string"!=typeof Se.dtick){var gt=Se.dtick;throw Se.dtick=1,"ax.dtick error: "+String(gt)}},W.tickIncrement=function(Se,ze,Ke,st){var ct=Ke?-1:1;if(A(ze))return b.increment(Se,ct*ze);var Tt=ze.charAt(0),Et=ct*Number(ze.substr(1));if("M"===Tt)return b.incrementMonth(Se,Et,st);if("L"===Tt)return Math.log(Math.pow(10,Se)+Et)/Math.LN10;if("D"===Tt){var At="D2"===ze?Me:ye,ht=Se+.01*ct,pt=b.roundUp(b.mod(ht,1),At,Ke);return Math.floor(ht)+Math.log(k.round(Math.pow(10,pt),1))/Math.LN10}throw"unrecognized dtick "+String(ze)},W.tickFirst=function(Se,ze){var Ke=Se.r2l||Number,st=b.simpleMap(Se.range,Ke,void 0,void 0,ze),ct=st[1]<st[0],Tt=ct?Math.floor:Math.ceil,Et=oe(st)[0],At=Se.dtick,ht=Ke(Se.tick0);if(A(At)){var pt=Tt((Et-ht)/At)*At+ht;return"category"!==Se.type&&"multicategory"!==Se.type||(pt=b.constrain(pt,0,Se._categories.length-1)),pt}var gt=At.charAt(0),Pt=Number(At.substr(1));if("M"===gt){for(var Ot,Ht,jt,Nt=0,Gt=ht;Nt<10;){if(((Ot=W.tickIncrement(Gt,At,ct,Se.calendar))-Et)*(Gt-Et)<=0)return ct?Math.min(Gt,Ot):Math.max(Gt,Ot);Ht=(Et-(Gt+Ot)/2)/(Ot-Gt),jt=gt+(Math.abs(Math.round(Ht))||1)*Pt,Gt=W.tickIncrement(Gt,jt,Ht<0?!ct:ct,Se.calendar),Nt++}return b.error("tickFirst did not converge",Se),Gt}if("L"===gt)return Math.log(Tt((Math.pow(10,Et)-ht)/Pt)*Pt+ht)/Math.LN10;if("D"===gt){var un="D2"===At?Me:ye,pn=b.roundUp(b.mod(Et,1),un,ct);return Math.floor(Et)+Math.log(k.round(Math.pow(10,pn),1))/Math.LN10}throw"unrecognized dtick "+String(At)},W.tickText=function(Se,ze,Ke,st){var ct,Tt=le(Se,ze),Et="array"===Se.tickmode,At=Ke||Et,ht=Se.type,pt="category"===ht?Se.d2l_noadd:Se.d2l;if(Et&&Array.isArray(Se.ticktext)){var gt=b.simpleMap(Se.range,Se.r2l),Pt=(Math.abs(gt[1]-gt[0])-(Se._lBreaks||0))/1e4;for(ct=0;ct<Se.ticktext.length&&!(Math.abs(ze-pt(Se.tickvals[ct]))<Pt);ct++);if(ct<Se.ticktext.length)return Tt.text=String(Se.ticktext[ct]),Tt}function Ot(Nt){return void 0===Nt||(Ke?"none"===Nt:"all"!==Nt&&ze!=={first:Se._tmin,last:Se._tmax}[Nt])}var Gt,un,Ht=Ke?"never":"none"!==Se.exponentformat&&Ot(Se.showexponent)?"hide":"";if("date"===ht?function(Nt,Gt,un,pn){var Kt=Nt._tickround,wn=un&&Nt.hoverformat||W.getTickFormat(Nt);pn&&(Kt=A(Kt)?4:{y:"m",m:"d",d:"M",M:"S",S:4}[Kt]);var Bn,vn=b.formatDate(Gt.x,wn,Kt,Nt._dateFormat,Nt.calendar,Nt._extraFormat),cn=vn.indexOf("\n");if(-1!==cn&&(Bn=vn.substr(cn+1),vn=vn.substr(0,cn)),pn&&("00:00:00"===vn||"00:00"===vn?(vn=Bn,Bn=""):8===vn.length&&(vn=vn.replace(/:00$/,""))),Bn)if(un)"d"===Kt?vn+=", "+Bn:vn=Bn+(vn?", "+vn:"");else if(Nt._inCalcTicks&&Nt._prevDateHead===Bn){var dn=Be(Nt),sn=Nt._trueSide||Nt.side;(!dn&&"top"===sn||dn&&"bottom"===sn)&&(vn+="<br> ")}else Nt._prevDateHead=Bn,vn+="<br>"+Bn;Gt.text=vn}(Se,Tt,Ke,At):"log"===ht?function(Nt,Gt,un,pn,Kt){var wn=Nt.dtick,Bn=Gt.x,vn=Nt.tickformat,cn="string"==typeof wn&&wn.charAt(0);if("never"===Kt&&(Kt=""),pn&&"L"!==cn&&(wn="L3",cn="L"),vn||"L"===cn)Gt.text=Ve(Math.pow(10,Bn),Nt,Kt,pn);else if(A(wn)||"D"===cn&&b.mod(Bn+.01,1)<.1){var dn=Math.round(Bn),sn=Math.abs(dn),hn=Nt.exponentformat;"power"===hn||_e(hn)&&Fe(dn)?(Gt.text=0===dn?1:1===dn?"10":"10<sup>"+(dn>1?"":C)+sn+"</sup>",Gt.fontSize*=1.25):("e"===hn||"E"===hn)&&sn>2?Gt.text="1"+hn+(dn>0?"+":C)+sn:(Gt.text=Ve(Math.pow(10,Bn),Nt,"","fakehover"),"D1"===wn&&"y"===Nt._id.charAt(0)&&(Gt.dy-=Gt.fontSize/6))}else{if("D"!==cn)throw"unrecognized dtick "+String(wn);Gt.text=String(Math.round(Math.pow(10,b.mod(Bn,1)))),Gt.fontSize*=.75}if("D1"===Nt.dtick){var En=String(Gt.text).charAt(0);"0"!==En&&"1"!==En||("y"===Nt._id.charAt(0)?Gt.dx-=Gt.fontSize/4:(Gt.dy+=Gt.fontSize/2,Gt.dx+=(Nt.range[1]>Nt.range[0]?1:-1)*Gt.fontSize*(Bn<0?.5:.25)))}}(Se,Tt,0,At,Ht):"category"===ht?(Gt=Tt,void 0===(un=Se._categories[Math.round(Gt.x)])&&(un=""),Gt.text=String(un)):"multicategory"===ht?function(Nt,Gt,un){var pn=Math.round(Gt.x),Kt=Nt._categories[pn]||[],wn=void 0===Kt[1]?"":String(Kt[1]),Bn=void 0===Kt[0]?"":String(Kt[0]);un?Gt.text=Bn+" - "+wn:(Gt.text=wn,Gt.text2=Bn)}(Se,Tt,Ke):Ge(Se)?function(Nt,Gt,un,pn,Kt){if("radians"!==Nt.thetaunit||un)Gt.text=Ve(Gt.x,Nt,Kt,pn);else{var wn=Gt.x/180;if(0===wn)Gt.text="0";else{var Bn=function(cn){function dn(Mn,Rn){return Math.abs(Mn-Rn)<=1e-6}var sn=function(Mn){for(var Rn=1;!dn(Math.round(Mn*Rn)/Rn,Mn);)Rn*=10;return Rn}(cn),hn=cn*sn,En=Math.abs(function Mn(Rn,Nn){return dn(Nn,0)?Rn:Mn(Nn,Rn%Nn)}(hn,sn));return[Math.round(hn/En),Math.round(sn/En)]}(wn);if(Bn[1]>=100)Gt.text=Ve(b.deg2rad(Gt.x),Nt,Kt,pn);else{var vn=Gt.x<0;Gt.text=1===Bn[1]?1===Bn[0]?"\u03c0":Bn[0]+"\u03c0":["<sup>",Bn[0],"</sup>","\u2044","<sub>",Bn[1],"</sub>","\u03c0"].join(""),vn&&(Gt.text=C+Gt.text)}}}}(Se,Tt,Ke,At,Ht):function(Nt,Gt,un,pn,Kt){"never"===Kt?Kt="":"all"===Nt.showexponent&&Math.abs(Gt.x/Nt.dtick)<1e-6&&(Kt="hide"),Gt.text=Ve(Gt.x,Nt,Kt,pn)}(Se,Tt,0,At,Ht),st||(Se.tickprefix&&!Ot(Se.showtickprefix)&&(Tt.text=Se.tickprefix+Tt.text),Se.ticksuffix&&!Ot(Se.showticksuffix)&&(Tt.text+=Se.ticksuffix)),"boundaries"===Se.tickson||Se.showdividers){var jt=function(Nt){var Gt=Se.l2p(Nt);return Gt>=0&&Gt<=Se._length?Nt:null};Tt.xbnd=[jt(Tt.x-.5),jt(Tt.x+Se.dtick-.5)]}return Tt},W.hoverLabelText=function(Se,ze,Ke){Ke&&(Se=b.extendFlat({},Se,{hoverformat:Ke}));var st=Array.isArray(ze)?ze[0]:ze,ct=Array.isArray(ze)?ze[1]:void 0;if(void 0!==ct&&ct!==st)return W.hoverLabelText(Se,st,Ke)+" - "+W.hoverLabelText(Se,ct,Ke);var Tt="log"===Se.type&&st<=0,Et=W.tickText(Se,Se.c2l(Tt?-st:st),"hover").text;return Tt?0===st?"0":C+Et:Et};var ge=["f","p","n","\u03bc","m","","k","M","G","T"];function _e(Se){return"SI"===Se||"B"===Se}function Fe(Se){return Se>14||Se<-15}function Ve(Se,ze,Ke,st){var ct=Se<0,Tt=ze._tickround,Et=Ke||ze.exponentformat||"B",At=ze._tickexponent,ht=W.getTickFormat(ze),pt=ze.separatethousands;if(st){var gt={exponentformat:Et,minexponent:ze.minexponent,dtick:"none"===ze.showexponent?ze.dtick:A(Se)&&Math.abs(Se)||1,range:"none"===ze.showexponent?ze.range.map(ze.r2d):[0,Se||1]};Re(gt),Tt=(Number(gt._tickround)||0)+4,At=gt._tickexponent,ze.hoverformat&&(ht=ze.hoverformat)}if(ht)return ze._numFormat(ht)(Se).replace(/-/g,C);var Pt,Ot=Math.pow(10,-Tt)/2;if("none"===Et&&(At=0),(Se=Math.abs(Se))<Ot)Se="0",ct=!1;else{if(Se+=Ot,At&&(Se*=Math.pow(10,-At),Tt+=At),0===Tt)Se=String(Math.floor(Se));else if(Tt<0){Se=(Se=String(Math.round(Se))).substr(0,Se.length+Tt);for(var Ht=Tt;Ht<0;Ht++)Se+="0"}else{var jt=(Se=String(Se)).indexOf(".")+1;jt&&(Se=Se.substr(0,jt+Tt).replace(/\.?0+$/,""))}Se=b.numSeparate(Se,ze._separators,pt)}return At&&"hide"!==Et&&(_e(Et)&&Fe(At)&&(Et="power"),Pt=At<0?C+-At:"power"!==Et?"+"+At:String(At),"e"===Et||"E"===Et?Se+=Et+Pt:"power"===Et?Se+="\xd710<sup>"+Pt+"</sup>":"B"===Et&&9===At?Se+="B":_e(Et)&&(Se+=ge[At/3+5])),ct?C+Se:Se}function He(Se,ze){if(Se){var Ke=Object.keys(N).reduce(function(st,ct){return-1!==ze.indexOf(ct)&&N[ct].forEach(function(Tt){st[Tt]=1}),st},{});Object.keys(Se).forEach(function(st){Ke[st]||(1===st.length?Se[st]=0:delete Se[st])})}}function nt(Se,ze){for(var Ke=[],st={},ct=0;ct<ze.length;ct++){var Tt=ze[ct];st[Tt.text2]?st[Tt.text2].push(Tt.x):st[Tt.text2]=[Tt.x]}for(var Et in st)Ke.push(le(Se,b.interp(st[Et],.5),Et));return Ke}function tt(Se){return void 0!==Se.periodX?Se.periodX:Se.x}function ot(Se){return[Se.text,Se.x,Se.axInfo,Se.font,Se.fontSize,Se.fontColor].join("_")}function dt(Se){var ze=Se.title.font.size,Ke=(Se.title.text.match(s.BR_TAG_ALL)||[]).length;return Se.title.hasOwnProperty("standoff")?Ke?ze*(J+Ke*G):ze*J:Ke?ze*(Ke+1)*G:ze}function kt(Se,ze){var Ke=Se.l2p(ze);return Ke>1&&Ke<Se._length-1}function mt(Se){var ze=k.select(Se),Ke=ze.select(".text-math-group");return Ke.empty()?ze.select("text"):Ke}function wt(Se){return Se._id+".automargin"}function Lt(Se){return wt(Se)+".mirror"}function Ct(Se){return Se._id+".rangeslider"}function It(Se,ze){for(var Ke=0;Ke<ze.length;Ke++)-1===Se.indexOf(ze[Ke])&&Se.push(ze[Ke])}function Ut(Se,ze,Ke){var st,ct,Tt=[],Et=[],At=Se.layout;for(st=0;st<ze.length;st++)Tt.push(W.getFromId(Se,ze[st]));for(st=0;st<Ke.length;st++)Et.push(W.getFromId(Se,Ke[st]));var ht=Object.keys(n),pt=["anchor","domain","overlaying","position","side","tickangle","editType"],gt=["linear","log"];for(st=0;st<ht.length;st++){var Pt=ht[st],Ot=Tt[0][Pt],Ht=Et[0][Pt],jt=!0,Nt=!1,Gt=!1;if("_"!==Pt.charAt(0)&&"function"!=typeof Ot&&-1===pt.indexOf(Pt)){for(ct=1;ct<Tt.length&&jt;ct++){var un=Tt[ct][Pt];"type"===Pt&&-1!==gt.indexOf(Ot)&&-1!==gt.indexOf(un)&&Ot!==un?Nt=!0:un!==Ot&&(jt=!1)}for(ct=1;ct<Et.length&&jt;ct++){var pn=Et[ct][Pt];"type"===Pt&&-1!==gt.indexOf(Ht)&&-1!==gt.indexOf(pn)&&Ht!==pn?Gt=!0:Et[ct][Pt]!==Ht&&(jt=!1)}jt&&(Nt&&(At[Tt[0]._name].type="linear"),Gt&&(At[Et[0]._name].type="linear"),Rt(At,Pt,Tt,Et,Se._fullLayout._dfltTitle))}}for(st=0;st<Se._fullLayout.annotations.length;st++){var Kt=Se._fullLayout.annotations[st];-1!==ze.indexOf(Kt.xref)&&-1!==Ke.indexOf(Kt.yref)&&b.swapAttrs(At.annotations[st],["?"])}}function Rt(Se,ze,Ke,st,ct){var Tt,Et=b.nestedProperty,At=Et(Se[Ke[0]._name],ze).get(),ht=Et(Se[st[0]._name],ze).get();for("title"===ze&&(At&&At.text===ct.x&&(At.text=ct.y),ht&&ht.text===ct.y&&(ht.text=ct.x)),Tt=0;Tt<Ke.length;Tt++)Et(Se,Ke[Tt]._name+"."+ze).set(ht);for(Tt=0;Tt<st.length;Tt++)Et(Se,st[Tt]._name+"."+ze).set(At)}function Ge(Se){return"angularaxis"===Se._id}function We(Se,ze){for(var Ke=ze._rangebreaks.length,st=0;st<Ke;st++){var ct=ze._rangebreaks[st];if(Se>=ct.min&&Se<ct.max)return ct.max}return Se}function Be(Se){return-1!==(Se.ticklabelposition||"").indexOf("inside")}function Ye(Se,ze){Be(Se._anchorAxis||{})&&Se._hideCounterAxisInsideTickLabels&&Se._hideCounterAxisInsideTickLabels(ze)}function rt(Se,ze,Ke,st){var ct,Tt="free"===Se.anchor||void 0!==Se.overlaying&&!1!==Se.overlaying?Se.overlaying:Se._id;ct=st?"right"===Se.side?ze:-ze:ze,Tt in Ke||(Ke[Tt]={}),Se.side in Ke[Tt]||(Ke[Tt][Se.side]=0),Ke[Tt][Se.side]+=ct}W.getTickFormat=function(Se){var ze,Ke,st,ct,Tt,Et,At,ht,Ot,Ht,jt,Nt,Gt,un;function pt(Ot){return"string"!=typeof Ot?Ot:Number(Ot.replace("M",""))*h}function gt(Ot,Ht){var jt=["L","D"];if(typeof Ot==typeof Ht){if("number"==typeof Ot)return Ot-Ht;var Nt=jt.indexOf(Ot.charAt(0)),Gt=jt.indexOf(Ht.charAt(0));return Nt===Gt?Number(Ot.replace(/(L|D)/g,""))-Number(Ht.replace(/(L|D)/g,"")):Nt-Gt}return"number"==typeof Ot?1:-1}if(Se.tickformatstops&&Se.tickformatstops.length>0)switch(Se.type){case"date":case"linear":for(ze=0;ze<Se.tickformatstops.length;ze++)if((st=Se.tickformatstops[ze]).enabled&&(ct=Se.dtick,Et=void 0,Et=pt||function(Ot){return Ot},ht=(Tt=st.dtickrange)[1],(!(At=Tt[0])&&"number"!=typeof At||Et(At)<=Et(ct))&&(!ht&&"number"!=typeof ht||Et(ht)>=Et(ct)))){Ke=st;break}break;case"log":for(ze=0;ze<Se.tickformatstops.length;ze++)if((st=Se.tickformatstops[ze]).enabled&&(void 0,void 0,void 0,void 0,jt=null===(Ht=st.dtickrange)[0],Nt=null===Ht[1],Gt=gt(Ot=Se.dtick,Ht[0])>=0,un=gt(Ot,Ht[1])<=0,(jt||Gt)&&(Nt||un))){Ke=st;break}}return Ke?Ke.value:Se.tickformat},W.getSubplots=function(Se,ze){var Ke=Se._fullLayout._subplots,st=Ke.cartesian.concat(Ke.gl2d||[]),ct=ze?W.findSubplotsWithAxis(st,ze):st;return ct.sort(function(Tt,Et){var At=Tt.substr(1).split("y"),ht=Et.substr(1).split("y");return At[0]===ht[0]?+At[1]-+ht[1]:+At[0]-+ht[0]}),ct},W.findSubplotsWithAxis=function(Se,ze){for(var Ke=new RegExp("x"===ze._id.charAt(0)?"^"+ze._id+"y":ze._id+"$"),st=[],ct=0;ct<Se.length;ct++){var Tt=Se[ct];Ke.test(Tt)&&st.push(Tt)}return st},W.makeClipPaths=function(Se){var ze=Se._fullLayout;if(!ze._hasOnlyLargeSploms){var Ke,st,ct={_offset:0,_length:ze.width,_id:""},Tt={_offset:0,_length:ze.height,_id:""},Et=W.list(Se,"x",!0),At=W.list(Se,"y",!0),ht=[];for(Ke=0;Ke<Et.length;Ke++)for(ht.push({x:Et[Ke],y:Tt}),st=0;st<At.length;st++)0===Ke&&ht.push({x:ct,y:At[st]}),ht.push({x:Et[Ke],y:At[st]});var pt=ze._clips.selectAll(".axesclip").data(ht,function(gt){return gt.x._id+gt.y._id});pt.enter().append("clipPath").classed("axesclip",!0).attr("id",function(gt){return"clip"+ze._uid+gt.x._id+gt.y._id}).append("rect"),pt.exit().remove(),pt.each(function(gt){k.select(this).select("rect").attr({x:gt.x._offset||0,y:gt.y._offset||0,width:gt.x._length||1,height:gt.y._length||1})})}},W.draw=function(Se,ze,Ke){var st=Se._fullLayout;"redraw"===ze&&st._paper.selectAll("g.subplot").each(function(At){var pt=st._plots[At[0]];if(pt){var gt=pt.xaxis,Pt=pt.yaxis;pt.xaxislayer.selectAll("."+gt._id+"tick").remove(),pt.yaxislayer.selectAll("."+Pt._id+"tick").remove(),pt.xaxislayer.selectAll("."+gt._id+"tick2").remove(),pt.yaxislayer.selectAll("."+Pt._id+"tick2").remove(),pt.xaxislayer.selectAll("."+gt._id+"divider").remove(),pt.yaxislayer.selectAll("."+Pt._id+"divider").remove(),pt.minorGridlayer&&pt.minorGridlayer.selectAll("path").remove(),pt.gridlayer&&pt.gridlayer.selectAll("path").remove(),pt.zerolinelayer&&pt.zerolinelayer.selectAll("path").remove(),st._infolayer.select(".g-"+gt._id+"title").remove(),st._infolayer.select(".g-"+Pt._id+"title").remove()}});var ct=ze&&"redraw"!==ze?ze:W.listIds(Se),Tt=W.list(Se).filter(function(At){return At.autoshift}).map(function(At){return At.overlaying});ct.map(function(At){var ht=W.getFromId(Se,At);if("sync"===ht.tickmode&&ht.overlaying){var pt=ct.findIndex(function(gt){return gt===ht.overlaying});pt>=0&&ct.unshift(ct.splice(pt,1).shift())}});var Et={false:{left:0,right:0}};return b.syncOrAsync(ct.map(function(At){return function(){if(At){var ht=W.getFromId(Se,At);Ke||(Ke={}),Ke.axShifts=Et,Ke.overlayingShiftedAx=Tt;var pt=W.drawOne(Se,ht,Ke);return ht._shiftPusher&&rt(ht,ht._fullDepth||0,Et,!0),ht._r=ht.range.slice(),ht._rl=b.simpleMap(ht._r,ht.r2l),pt}}}))},W.drawOne=function(Se,ze,Ke){var st,ct,Tt,Et=(Ke=Ke||{}).axShifts||{},At=Ke.overlayingShiftedAx||[];ze.setScale();var Tn,ht=Se._fullLayout,pt=ze._id,gt=pt.charAt(0),Pt=W.counterLetter(pt),Ot=ht._plots[ze._mainSubplot];if(Ot){if(ze._shiftPusher=ze.autoshift||-1!==At.indexOf(ze._id)||-1!==At.indexOf(ze.overlaying),ze._shiftPusher&"free"===ze.anchor){var Ht=ze.linewidth/2||0;"inside"===ze.ticks&&(Ht+=ze.ticklen),rt(ze,Ht,Et,!0),rt(ze,ze.shift||0,Et,!1)}!0===Ke.skipTitle&&void 0!==ze._shift||(ze._shift=(Tn=ze).autoshift?Et[Tn.overlaying][Tn.side]:Tn.shift||0);var jt=Ot[gt+"axislayer"],Nt=ze._mainLinePosition,Gt=Nt+=ze._shift,un=ze._mainMirrorPosition,pn=ze._vals=W.calcTicks(ze),Kt=[ze.mirror,Gt,un].join("_");for(st=0;st<pn.length;st++)pn[st].axInfo=Kt;ze._selections={},ze._tickAngles&&(ze._prevTickAngles=ze._tickAngles),ze._tickAngles={},ze._depth=null;var wn={};if(ze.visible){var Bn,vn,cn=W.makeTransTickFn(ze),dn=W.makeTransTickLabelFn(ze),sn="inside"===ze.ticks,hn="outside"===ze.ticks;if("boundaries"===ze.tickson){var En=function(Tn,an){var mn,on=[],fn=function(yn,Ln){var Hn=yn.xbnd[Ln];null!==Hn&&on.push(b.extendFlat({},yn,{x:Hn}))};if(an.length){for(mn=0;mn<an.length;mn++)fn(an[mn],0);fn(an[mn-1],1)}return on}(0,pn);vn=W.clipEnds(ze,En),Bn=sn?vn:En}else vn=W.clipEnds(ze,pn),Bn=sn&&"period"!==ze.ticklabelmode?vn:pn;var Mn,Rn=ze._gridVals=vn,Nn=function(Tn,an){var mn,on,fn=[],yn=an.length&&an[an.length-1].x<an[0].x,Ln=function(Wn,Kn){var nr=Wn.xbnd[Kn];null!==nr&&fn.push(b.extendFlat({},Wn,{x:nr}))};if(Tn.showdividers&&an.length){for(mn=0;mn<an.length;mn++){var Hn=an[mn];Hn.text2!==on&&Ln(Hn,yn?1:0),on=Hn.text2}Ln(an[mn-1],yn?0:1)}return fn}(ze,pn);if(!ht._hasOnlyLargeSploms){var Fn=ze._subplotsWith,rr={};for(st=0;st<Fn.length;st++){var $n=(Tt=ht._plots[ct=Fn[st]])[Pt+"axis"],mr=$n._mainAxis._id;if(!rr[mr]){rr[mr]=1;var fr="x"===gt?"M0,"+$n._offset+"v"+$n._length:"M"+$n._offset+",0h"+$n._length;W.drawGrid(Se,ze,{vals:Rn,counterAxis:$n,layer:Tt.gridlayer.select("."+pt),minorLayer:Tt.minorGridlayer.select("."+pt),path:fr,transFn:cn}),W.drawZeroLine(Se,ze,{counterAxis:$n,layer:Tt.zerolinelayer,path:fr,transFn:cn})}}}var Zn=W.getTickSigns(ze),qn=W.getTickSigns(ze,"minor");if(ze.ticks||ze.minor&&ze.minor.ticks){var ur,Zt,nn,zn,_n=W.makeTickPath(ze,Gt,Zn[2]),Cn=W.makeTickPath(ze,Gt,qn[2],{minor:!0});if(ze._anchorAxis&&ze.mirror&&!0!==ze.mirror?(ur=W.makeTickPath(ze,un,Zn[3]),Zt=W.makeTickPath(ze,un,qn[3],{minor:!0}),nn=_n+ur,zn=Cn+Zt):(ur="",Zt="",nn=_n,zn=Cn),ze.showdividers&&hn&&"boundaries"===ze.tickson){var Un={};for(st=0;st<Nn.length;st++)Un[Nn[st].x]=1;Mn=function(Tn){return Un[Tn.x]?ur:nn}}else Mn=function(Tn){return Tn.minor?zn:nn}}if(W.drawTicks(Se,ze,{vals:Bn,layer:jt,path:Mn,transFn:cn}),"allticks"===ze.mirror){var Gn=Object.keys(ze._linepositions||{});for(st=0;st<Gn.length;st++){Tt=ht._plots[ct=Gn[st]];var ar=ze._linepositions[ct]||[],$t=ar[1],kn=ar[2],zt=W.makeTickPath(ze,ar[0],kn?Zn[0]:qn[0],{minor:kn})+W.makeTickPath(ze,$t,kn?Zn[1]:qn[1],{minor:kn});W.drawTicks(Se,ze,{vals:Bn,layer:Tt[gt+"axislayer"],path:zt,transFn:cn})}}var Wt=[];if(Wt.push(function(){return W.drawLabels(Se,ze,{vals:pn,layer:jt,plotinfo:Tt,transFn:dn,labelFns:W.makeLabelFns(ze,Gt)})}),"multicategory"===ze.type){var tn={x:2,y:10}[gt];Wt.push(function(){var Tn={x:"height",y:"width"}[gt],an=An()[Tn]+tn+(ze._tickAngles[pt+"tick"]?ze.tickfont.size*G:0);return W.drawLabels(Se,ze,{vals:nt(ze,pn),layer:jt,cls:pt+"tick2",repositionOnUpdate:!0,secondary:!0,transFn:cn,labelFns:W.makeLabelFns(ze,Gt+an*Zn[4])})}),Wt.push(function(){return ze._depth=Zn[4]*(An("tick2")[ze.side]-Gt),function(Tn,an,mn){var on=an._id+"divider",fn=mn.vals,yn=mn.layer.selectAll("path."+on).data(fn,ot);yn.exit().remove(),yn.enter().insert("path",":first-child").classed(on,1).classed("crisp",1).call(o.stroke,an.dividercolor).style("stroke-width",r.crispRound(Tn,an.dividerwidth,1)+"px"),yn.attr("transform",mn.transFn).attr("d",mn.path)}(Se,ze,{vals:Nn,layer:jt,path:W.makeTickPath(ze,Gt,Zn[4],{len:ze._depth}),transFn:cn})})}else ze.title.hasOwnProperty("standoff")&&Wt.push(function(){ze._depth=Zn[4]*(An()[ze.side]-Gt)});var Sn=T.getComponentMethod("rangeslider","isVisible")(ze);return Ke.skipTitle||Sn&&"bottom"===ze.side||Wt.push(function(){return function(Tn,an){var mn,on=Tn._fullLayout,fn=an._id,yn=fn.charAt(0),Ln=an.title.font.size;if(an.title.hasOwnProperty("standoff"))mn=an._depth+an.title.standoff+dt(an);else{var Hn=Be(an);if("multicategory"===an.type)mn=an._depth;else{var Wn=1.5*Ln;Hn&&(Wn=.5*Ln,"outside"===an.ticks&&(Wn+=an.ticklen)),mn=10+Wn+(an.linewidth?an.linewidth-1:0)}Hn||(mn+="x"===yn?"top"===an.side?Ln*(an.showticklabels?1:0):Ln*(an.showticklabels?1.5:.5):"right"===an.side?Ln*(an.showticklabels?1:.5):Ln*(an.showticklabels?.5:0))}var Kn,nr,er,or,ir=W.getPxPosition(Tn,an);if("x"===yn?(nr=an._offset+an._length/2,er="top"===an.side?ir-mn:ir+mn):(er=an._offset+an._length/2,nr="right"===an.side?ir+mn:ir-mn,Kn={rotate:"-90",offset:0}),"multicategory"!==an.type){var lr=an._selections[an._id+"tick"];if(or={selection:lr,side:an.side},lr&&lr.node()&&lr.node().parentNode){var br=r.getTranslate(lr.node().parentNode);or.offsetLeft=br.x,or.offsetTop=br.y}an.title.hasOwnProperty("standoff")&&(or.pad=0)}return an._titleStandoff=mn,t.draw(Tn,fn+"title",{propContainer:an,propName:an._name+".title.text",placeholder:on._dfltTitle[yn],avoid:or,transform:Kn,attributes:{x:nr,y:er,"text-anchor":"middle"}})}(Se,ze)}),Wt.push(function(){var Tn,an,mn,on,fn=ze.side.charAt(0),yn=V[ze.side].charAt(0),Ln=W.getPxPosition(Se,ze),Hn=hn?ze.ticklen:0;(ze.automargin||Sn||ze._shiftPusher)&&("multicategory"===ze.type?Tn=An("tick2"):(Tn=An(),"x"===gt&&"b"===fn&&(ze._depth=Math.max(Tn.width>0?Tn.bottom-Ln:0,Hn))));var Wn=0,Kn=0;if(ze._shiftPusher&&(Wn=Math.max(Hn,Tn.height>0?"l"===fn?Ln-Tn.left:Tn.right-Ln:0),ze.title.text!==ht._dfltTitle[gt]&&(Kn=(ze._titleStandoff||0)+(ze._titleScoot||0),"l"===fn&&(Kn+=dt(ze))),ze._fullDepth=Math.max(Wn,Kn)),ze.automargin){an={x:0,y:0,r:0,l:0,t:0,b:0};var nr=[0,1],er="number"==typeof ze._shift?ze._shift:0;if("x"===gt){if("b"===fn?an[fn]=ze._depth:(an[fn]=ze._depth=Math.max(Tn.width>0?Ln-Tn.top:0,Hn),nr.reverse()),Tn.width>0){var or=Tn.right-(ze._offset+ze._length);or>0&&(an.xr=1,an.r=or);var ir=ze._offset-Tn.left;ir>0&&(an.xl=0,an.l=ir)}}else if("l"===fn?(ze._depth=Math.max(Tn.height>0?Ln-Tn.left:0,Hn),an[fn]=ze._depth-er):(ze._depth=Math.max(Tn.height>0?Tn.right-Ln:0,Hn),an[fn]=ze._depth+er,nr.reverse()),Tn.height>0){var lr=Tn.bottom-(ze._offset+ze._length);lr>0&&(an.yb=0,an.b=lr);var br=ze._offset-Tn.top;br>0&&(an.yt=1,an.t=br)}an[Pt]="free"===ze.anchor?ze.position:ze._anchorAxis.domain[nr[0]],ze.title.text!==ht._dfltTitle[gt]&&(an[fn]+=dt(ze)+(ze.title.standoff||0)),ze.mirror&&"free"!==ze.anchor&&((mn={x:0,y:0,r:0,l:0,t:0,b:0})[yn]=ze.linewidth,ze.mirror&&!0!==ze.mirror&&(mn[yn]+=Hn),!0===ze.mirror||"ticks"===ze.mirror?mn[Pt]=ze._anchorAxis.domain[nr[1]]:"all"!==ze.mirror&&"allticks"!==ze.mirror||(mn[Pt]=[ze._counterDomainMin,ze._counterDomainMax][nr[1]]))}Sn&&(on=T.getComponentMethod("rangeslider","autoMarginOpts")(Se,ze)),"string"==typeof ze.automargin&&(He(an,ze.automargin),He(mn,ze.automargin)),l.autoMargin(Se,wt(ze),an),l.autoMargin(Se,Lt(ze),mn),l.autoMargin(Se,Ct(ze),on)}),b.syncOrAsync(Wt)}}function An(Tn){var mn,on,fn,yn,Ln,Hn,an=pt+(Tn||"tick");return wn[an]||(wn[an]=((mn=ze)._selections[on=an].size()?(fn=1/0,yn=-1/0,Ln=1/0,Hn=-1/0,mn._selections[on].each(function(){var Wn=mt(this),Kn=r.bBox(Wn.node().parentNode);fn=Math.min(fn,Kn.top),yn=Math.max(yn,Kn.bottom),Ln=Math.min(Ln,Kn.left),Hn=Math.max(Hn,Kn.right)})):(fn=0,yn=0,Ln=0,Hn=0),{top:fn,bottom:yn,left:Ln,right:Hn,height:yn-fn,width:Hn-Ln})),wn[an]}},W.getTickSigns=function(Se,ze){var Ke=Se._id.charAt(0),ct=Se.side==={x:"top",y:"right"}[Ke]?1:-1,Tt=[-1,1,ct,-ct];return"inside"!==(ze?(Se.minor||{}).ticks:Se.ticks)==("x"===Ke)&&(Tt=Tt.map(function(Et){return-Et})),Se.side&&Tt.push({l:-1,t:-1,r:1,b:1}[Se.side.charAt(0)]),Tt},W.makeTransTickFn=function(Se){return"x"===Se._id.charAt(0)?function(ze){return d(Se._offset+Se.l2p(ze.x),0)}:function(ze){return d(0,Se._offset+Se.l2p(ze.x))}},W.makeTransTickLabelFn=function(Se){var ze=function(ct){var Tt=ct.ticklabelposition||"",Et=function(un){return-1!==Tt.indexOf(un)},At=Et("top"),ht=Et("left"),pt=Et("right"),gt=Et("bottom"),Pt=Et("inside"),Ot=gt||ht||At||pt;if(!Ot&&!Pt)return[0,0];var Ht=ct.side,jt=Ot?(ct.tickwidth||0)/2:0,Nt=3,Gt=ct.tickfont?ct.tickfont.size:12;return(gt||At)&&(jt+=Gt*J,Nt+=(ct.linewidth||0)/2),(ht||pt)&&(jt+=(ct.linewidth||0)/2,Nt+=3),Pt&&"top"===Ht&&(Nt-=Gt*(1-J)),(ht||At)&&(jt=-jt),"bottom"!==Ht&&"right"!==Ht||(Nt=-Nt),[Ot?jt:0,Pt?Nt:0]}(Se),Ke=ze[0],st=ze[1];return"x"===Se._id.charAt(0)?function(ct){return d(Ke+Se._offset+Se.l2p(tt(ct)),st)}:function(ct){return d(st,Ke+Se._offset+Se.l2p(tt(ct)))}},W.makeTickPath=function(Se,ze,Ke,st){st||(st={});var ct=st.minor;if(ct&&!Se.minor)return"";var Tt=void 0!==st.len?st.len:ct?Se.minor.ticklen:Se.ticklen,Et=Se._id.charAt(0),At=(Se.linewidth||1)/2;return"x"===Et?"M0,"+(ze+At*Ke)+"v"+Tt*Ke:"M"+(ze+At*Ke)+",0h"+Tt*Ke},W.makeLabelFns=function(Se,ze,Ke){var st=Se.ticklabelposition||"",ct=function(En){return-1!==st.indexOf(En)},Tt=ct("top"),Et=ct("left"),At=ct("right"),ht=ct("bottom")||Et||Tt||At,pt=ct("inside"),gt="inside"===st&&"inside"===Se.ticks||!pt&&"outside"===Se.ticks&&"boundaries"!==Se.tickson,Pt=0,Ot=0,Ht=gt?Se.ticklen:0;if(pt?Ht*=-1:ht&&(Ht=0),gt&&(Pt+=Ht,Ke)){var jt=b.deg2rad(Ke);Pt=Ht*Math.cos(jt)+1,Ot=Ht*Math.sin(jt)}Se.showticklabels&&(gt||Se.showline)&&(Pt+=.2*Se.tickfont.size);var Nt,Gt,un,pn,Kt,wn={labelStandoff:Pt+=(Se.linewidth||1)/2*(pt?-1:1),labelShift:Ot},Bn=0,vn=Se.side,cn=Se._id.charAt(0),dn=Se.tickangle;if("x"===cn)pn=(Kt=!pt&&"bottom"===vn||pt&&"top"===vn)?1:-1,pt&&(pn*=-1),Nt=Ot*pn,Gt=ze+Pt*pn,un=Kt?1:-.2,90===Math.abs(dn)&&(pt?un+=j:un=-90===dn&&"bottom"===vn?J:90===dn&&"top"===vn?j:.5,Bn=j/2*(dn/90)),wn.xFn=function(En){return En.dx+Nt+Bn*En.fontSize},wn.yFn=function(En){return En.dy+Gt+En.fontSize*un},wn.anchorFn=function(En,Mn){if(ht){if(Et)return"end";if(At)return"start"}return A(Mn)&&0!==Mn&&180!==Mn?Mn*pn<0!==pt?"end":"start":"middle"},wn.heightFn=function(En,Mn,Rn){return Mn<-60||Mn>60?-.5*Rn:"top"===Se.side!==pt?-Rn:0};else if("y"===cn){if(pn=(Kt=!pt&&"left"===vn||pt&&"right"===vn)?1:-1,pt&&(pn*=-1),Nt=Pt,Gt=Ot*pn,un=0,pt||90!==Math.abs(dn)||(un=-90===dn&&"left"===vn||90===dn&&"right"===vn?J:.5),pt){var sn=A(dn)?+dn:0;if(0!==sn){var hn=b.deg2rad(sn);Bn=Math.abs(Math.sin(hn))*J*pn,un=0}}wn.xFn=function(En){return En.dx+ze-(Nt+En.fontSize*un)*pn+Bn*En.fontSize},wn.yFn=function(En){return En.dy+Gt+En.fontSize*j},wn.anchorFn=function(En,Mn){return A(Mn)&&90===Math.abs(Mn)?"middle":Kt?"end":"start"},wn.heightFn=function(En,Mn,Rn){return"right"===Se.side&&(Mn*=-1),Mn<-30?-Rn:Mn<30?-.5*Rn:0}}return wn},W.drawTicks=function(Se,ze,Ke){Ke=Ke||{};var st=ze._id+"tick",ct=[].concat(ze.minor&&ze.minor.ticks?Ke.vals.filter(function(Et){return Et.minor&&!Et.noTick}):[]).concat(ze.ticks?Ke.vals.filter(function(Et){return!Et.minor&&!Et.noTick}):[]),Tt=Ke.layer.selectAll("path."+st).data(ct,ot);Tt.exit().remove(),Tt.enter().append("path").classed(st,1).classed("ticks",1).classed("crisp",!1!==Ke.crisp).each(function(Et){return o.stroke(k.select(this),Et.minor?ze.minor.tickcolor:ze.tickcolor)}).style("stroke-width",function(Et){return r.crispRound(Se,Et.minor?ze.minor.tickwidth:ze.tickwidth,1)+"px"}).attr("d",Ke.path).style("display",null),Ye(ze,[H]),Tt.attr("transform",Ke.transFn)},W.drawGrid=function(Se,ze,Ke){if(Ke=Ke||{},"sync"!==ze.tickmode){var st=ze._id+"grid",ct=ze.minor&&ze.minor.showgrid,Tt=ct?Ke.vals.filter(function(un){return un.minor}):[],Et=ze.showgrid?Ke.vals.filter(function(un){return!un.minor}):[],At=Ke.counterAxis;if(At&&W.shouldShowZeroLine(Se,ze,At))for(var ht="array"===ze.tickmode,pt=0;pt<Et.length;pt++){var gt=Et[pt].x;if(ht?!gt:Math.abs(gt)<ze.dtick/100){if(Et=Et.slice(0,pt).concat(Et.slice(pt+1)),!ht)break;pt--}}ze._gw=r.crispRound(Se,ze.gridwidth,1);for(var Pt=ct?r.crispRound(Se,ze.minor.gridwidth,1):0,Ot=Ke.layer,Ht=Ke.minorLayer,jt=1;jt>=0;jt--){var Nt=jt?Ot:Ht;if(Nt){var Gt=Nt.selectAll("path."+st).data(jt?Et:Tt,ot);Gt.exit().remove(),Gt.enter().append("path").classed(st,1).classed("crisp",!1!==Ke.crisp),Gt.attr("transform",Ke.transFn).attr("d",Ke.path).each(function(un){return o.stroke(k.select(this),un.minor?ze.minor.gridcolor:ze.gridcolor||"#ddd")}).style("stroke-dasharray",function(un){return r.dashStyle(un.minor?ze.minor.griddash:ze.griddash,un.minor?ze.minor.gridwidth:ze.gridwidth)}).style("stroke-width",function(un){return(un.minor?Pt:ze._gw)+"px"}).style("display",null),"function"==typeof Ke.path&&Gt.attr("d",Ke.path)}}Ye(ze,[U,z])}},W.drawZeroLine=function(Se,ze,Ke){var st=ze._id+"zl",ct=W.shouldShowZeroLine(Se,ze,(Ke=Ke||Ke).counterAxis),Tt=Ke.layer.selectAll("path."+st).data(ct?[{x:0,id:ze._id}]:[]);Tt.exit().remove(),Tt.enter().append("path").classed(st,1).classed("zl",1).classed("crisp",!1!==Ke.crisp).each(function(){Ke.layer.selectAll("path").sort(function(Et,At){return re(Et.id,At.id)})}),Tt.attr("transform",Ke.transFn).attr("d",Ke.path).call(o.stroke,ze.zerolinecolor||o.defaultLine).style("stroke-width",r.crispRound(Se,ze.zerolinewidth,ze._gw||1)+"px").style("display",null),Ye(ze,[I])},W.drawLabels=function(Se,ze,Ke){Ke=Ke||{};var st=Se._fullLayout,ct=ze._id,Tt=ct.charAt(0),Et=Ke.cls||ct+"tick",At=Ke.vals.filter(function(pn){return pn.text}),ht=Ke.labelFns,pt=Ke.secondary?0:ze.tickangle,gt=(ze._prevTickAngles||{})[Et],Pt=Ke.layer.selectAll("g."+Et).data(ze.showticklabels?At:[],ot),Ot=[];function Ht(pn,Kt){pn.each(function(wn){var Bn=k.select(this),vn=Bn.select(".text-math-group"),cn=ht.anchorFn(wn,Kt),dn=Ke.transFn.call(Bn.node(),wn)+(A(Kt)&&0!=+Kt?" rotate("+Kt+","+ht.xFn(wn)+","+(ht.yFn(wn)-wn.fontSize/2)+")":""),sn=s.lineCount(Bn),hn=G*wn.fontSize,En=ht.heightFn(wn,A(Kt)?+Kt:0,(sn-1)*hn);if(En&&(dn+=d(0,En)),vn.empty()){var Mn=Bn.select("text");Mn.attr({transform:dn,"text-anchor":cn}),Mn.style("opacity",1),ze._adjustTickLabelsOverflow&&ze._adjustTickLabelsOverflow()}else{var Rn=r.bBox(vn.node()).width*{end:-.5,start:.5}[cn];vn.attr("transform",dn+d(Rn,0))}})}Pt.enter().append("g").classed(Et,1).append("text").attr("text-anchor","middle").each(function(pn){var Kt=k.select(this),wn=Se._promises.length;Kt.call(s.positionText,ht.xFn(pn),ht.yFn(pn)).call(r.font,pn.font,pn.fontSize,pn.fontColor).text(pn.text).call(s.convertToTspans,Se),Se._promises[wn]?Ot.push(Se._promises.pop().then(function(){Ht(Kt,pt)})):Ht(Kt,pt)}),Ye(ze,[F]),Pt.exit().remove(),Ke.repositionOnUpdate&&Pt.each(function(pn){k.select(this).select("text").call(s.positionText,ht.xFn(pn),ht.yFn(pn))}),ze._adjustTickLabelsOverflow=function(){var pn=ze.ticklabeloverflow;if(pn&&"allow"!==pn){var Kt=-1!==pn.indexOf("hide"),wn="x"===ze._id.charAt(0),Bn=0,vn=wn?Se._fullLayout.width:Se._fullLayout.height;if(-1!==pn.indexOf("domain")){var cn=b.simpleMap(ze.range,ze.r2l);Bn=ze.l2p(cn[0])+ze._offset,vn=ze.l2p(cn[1])+ze._offset}var dn=Math.min(Bn,vn),sn=Math.max(Bn,vn),hn=ze.side,En=1/0,Mn=-1/0;for(var Rn in Pt.each(function(rr){var $n=k.select(this);if($n.select(".text-math-group").empty()){var mr=r.bBox($n.node()),fr=0;wn?(mr.right>sn||mr.left<dn)&&(fr=1):(mr.bottom>sn||mr.top+(ze.tickangle?0:rr.fontSize/4)<dn)&&(fr=1);var Zn=$n.select("text");fr?Kt&&Zn.style("opacity",0):(Zn.style("opacity",1),En="bottom"===hn||"right"===hn?Math.min(En,wn?mr.top:mr.left):-1/0,Mn="top"===hn||"left"===hn?Math.max(Mn,wn?mr.bottom:mr.right):1/0)}}),st._plots){var Nn=st._plots[Rn];if(ze._id===Nn.xaxis._id||ze._id===Nn.yaxis._id){var Fn=wn?Nn.yaxis:Nn.xaxis;Fn&&(Fn["_visibleLabelMin_"+ze._id]=En,Fn["_visibleLabelMax_"+ze._id]=Mn)}}}},ze._hideCounterAxisInsideTickLabels=function(pn){var Kt="x"===ze._id.charAt(0),wn=[];for(var Bn in st._plots){var vn=st._plots[Bn];ze._id!==vn.xaxis._id&&ze._id!==vn.yaxis._id||wn.push(Kt?vn.yaxis:vn.xaxis)}wn.forEach(function(cn,dn){cn&&Be(cn)&&(pn||[I,z,U,H,F]).forEach(function(sn){var hn="tick"===sn.K&&"text"===sn.L&&"period"===ze.ticklabelmode,En=st._plots[ze._mainSubplot];(sn.K===I.K?En.zerolinelayer.selectAll("."+ze._id+"zl"):sn.K===z.K?En.minorGridlayer.selectAll("."+ze._id):sn.K===U.K?En.gridlayer.selectAll("."+ze._id):En[ze._id.charAt(0)+"axislayer"]).each(function(){var Mn=k.select(this);sn.L&&(Mn=Mn.selectAll(sn.L)),Mn.each(function(Rn){var Nn=ze.l2p(hn?tt(Rn):Rn.x)+ze._offset,Fn=k.select(this);Nn<ze["_visibleLabelMax_"+cn._id]&&Nn>ze["_visibleLabelMin_"+cn._id]?Fn.style("display","none"):"tick"!==sn.K||dn||Fn.style("display",null)})})})})},Ht(Pt,gt+1?gt:pt);var jt=null;ze._selections&&(ze._selections[Et]=Pt);var Nt=[function(){return Ot.length&&Promise.all(Ot)}];ze.automargin&&st._redrawFromAutoMarginCount&&90===gt?(jt=90,Nt.push(function(){Ht(Pt,gt)})):Nt.push(function(){if(Ht(Pt,pt),At.length&&"x"===Tt&&!A(pt)&&("log"!==ze.type||"D"!==String(ze.dtick).charAt(0))){jt=0;var pn,Kt=0,wn=[];if(Pt.each(function($n){Kt=Math.max(Kt,$n.fontSize);var mr=ze.l2p($n.x),fr=mt(this),Zn=r.bBox(fr.node());wn.push({top:0,bottom:10,height:10,left:mr-Zn.width/2,right:mr+Zn.width/2+2,width:Zn.width+2})}),"boundaries"!==ze.tickson&&!ze.showdividers||Ke.secondary){var Bn=At.length,vn=Math.abs((At[Bn-1].x-At[0].x)*ze._m)/(Bn-1),cn=ze.ticklabelposition||"",dn=function($n){return-1!==cn.indexOf($n)},sn=dn("top"),hn=dn("left"),En=dn("right"),Mn=dn("bottom")||hn||sn||En?(ze.tickwidth||0)+6:0,Rn=vn<2.5*Kt||"multicategory"===ze.type||"realaxis"===ze._name;for(pn=0;pn<wn.length-1;pn++)if(b.bBoxIntersect(wn[pn],wn[pn+1],Mn)){jt=Rn?90:30;break}}else{var Nn=2;for(ze.ticks&&(Nn+=ze.tickwidth/2),pn=0;pn<wn.length;pn++){var Fn=At[pn].xbnd,rr=wn[pn];if(null!==Fn[0]&&rr.left-ze.l2p(Fn[0])<Nn||null!==Fn[1]&&ze.l2p(Fn[1])-rr.right<Nn){jt=90;break}}}jt&&Ht(Pt,jt)}}),ze._tickAngles&&Nt.push(function(){ze._tickAngles[Et]=null===jt?A(pt)?pt:0:jt});var Gt=ze._anchorAxis;Gt&&Gt.autorange&&Be(ze)&&!ee(st,ze._id)&&(st._insideTickLabelsAutorange||(st._insideTickLabelsAutorange={}),st._insideTickLabelsAutorange[Gt._name+".autorange"]=Gt.autorange,Nt.push(function(){Pt.each(function(pn,Kt){var wn=mt(this);wn.select(".text-math-group").empty()&&(ze._vals[Kt].bb=r.bBox(wn.node()))})}));var un=b.syncOrAsync(Nt);return un&&un.then&&Se._promises.push(un),un},W.getPxPosition=function(Se,ze){var Ke,st=Se._fullLayout._size,ct=ze._id.charAt(0),Tt=ze.side;return"free"!==ze.anchor?Ke=ze._anchorAxis:"x"===ct?Ke={_offset:st.t+(1-(ze.position||0))*st.h,_length:0}:"y"===ct&&(Ke={_offset:st.l+(ze.position||0)*st.w+ze._shift,_length:0}),"top"===Tt||"left"===Tt?Ke._offset:"bottom"===Tt||"right"===Tt?Ke._offset+Ke._length:void 0},W.shouldShowZeroLine=function(Se,ze,Ke){var st=b.simpleMap(ze.range,ze.r2l);return st[0]*st[1]<=0&&ze.zeroline&&("linear"===ze.type||"-"===ze.type)&&!(ze.rangebreaks&&ze.maskBreaks(0)===P)&&(kt(ze,0)||!function(ct,Tt,Et,At){var ht=Et._mainAxis;if(ht){var pt=ct._fullLayout,gt=Tt._id.charAt(0),Pt=W.counterLetter(Tt._id),Ot=Tt._offset+(Math.abs(At[0])<Math.abs(At[1])==("x"===gt)?0:Tt._length),Ht=pt._plots[Et._mainSubplot];if(!(Ht.mainplotinfo||Ht).overlays.length)return un(Et);for(var jt=W.list(ct,Pt),Nt=0;Nt<jt.length;Nt++){var Gt=jt[Nt];if(Gt._mainAxis===ht&&un(Gt))return!0}}function un(pn){if(!pn.showline||!pn.linewidth)return!1;var Kt=Math.max((pn.linewidth+Tt.zerolinewidth)/2,1);function wn(cn){return"number"==typeof cn&&Math.abs(cn-Ot)<Kt}if(wn(pn._mainLinePosition)||wn(pn._mainMirrorPosition))return!0;var Bn=pn._linepositions||{};for(var vn in Bn)if(wn(Bn[vn][0])||wn(Bn[vn][1]))return!0}}(Se,ze,Ke,st)||function(ct,Tt){for(var Et=ct._fullData,At=Tt._mainSubplot,ht=Tt._id.charAt(0),pt=0;pt<Et.length;pt++){var gt=Et[pt];if(!0===gt.visible&&gt.xaxis+gt.yaxis===At&&(T.traceIs(gt,"bar-like")&&gt.orientation==={x:"h",y:"v"}[ht]||gt.fill&&gt.fill.charAt(gt.fill.length-1)===ht))return!0}return!1}(Se,ze))},W.clipEnds=function(Se,ze){return ze.filter(function(Ke){return kt(Se,Ke.x)})},W.allowAutoMargin=function(Se){for(var ze=W.list(Se,"",!0),Ke=0;Ke<ze.length;Ke++){var st=ze[Ke];st.automargin&&(l.allowAutoMargin(Se,wt(st)),st.mirror&&l.allowAutoMargin(Se,Lt(st))),T.getComponentMethod("rangeslider","isVisible")(st)&&l.allowAutoMargin(Se,Ct(st))}},W.swap=function(Se,ze){for(var Ke=function(ct,Tt){var Et,At,ht=[];for(Et=0;Et<Tt.length;Et++){var pt=[],gt=ct._fullData[Tt[Et]].xaxis,Pt=ct._fullData[Tt[Et]].yaxis;if(gt&&Pt){for(At=0;At<ht.length;At++)-1===ht[At].x.indexOf(gt)&&-1===ht[At].y.indexOf(Pt)||pt.push(At);if(pt.length){var Ot,Ht=ht[pt[0]];if(pt.length>1)for(At=1;At<pt.length;At++)It(Ht.x,(Ot=ht[pt[At]]).x),It(Ht.y,Ot.y);It(Ht.x,[gt]),It(Ht.y,[Pt])}else ht.push({x:[gt],y:[Pt]})}}return ht}(Se,ze),st=0;st<Ke.length;st++)Ut(Se,Ke[st].x,Ke[st].y)}},4322:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(50606).BADNUM,T=A.isArrayOrTypedArray,b=A.isDateTime,d=A.cleanNumber,s=Math.round;function t(r,n){return n?k(r):"number"==typeof r}function o(r){return Math.max(1,(r-1)/1e3)}$.exports=function(r,n,i){var g,a=r,c=i.noMultiCategory;if(T(a)&&!a.length)return"-";if(!c&&T((g=a)[0])&&T(g[1]))return"multicategory";if(c&&Array.isArray(a[0])){for(var p=[],f=0;f<a.length;f++)if(T(a[f]))for(var x=0;x<a[f].length;x++)p.push(a[f][x]);a=p}if(function(g,y){for(var h=g.length,m=o(h),w=0,u=0,S={},_=0;_<h;_+=m){var E=g[s(_)],L=String(E);S[L]||(S[L]=1,b(E,y)&&w++,k(E)&&u++)}return w>2*u}(a,n))return"date";var v="strict"!==i.autotypenumbers;return function(g,y){for(var h=g.length,m=o(h),w=0,u=0,S={},_=0;_<h;_+=m){var E=g[s(_)],L=String(E);if(!S[L]){S[L]=1;var C=typeof E;"boolean"===C?u++:(y?d(E)!==l:"number"===C)?w++:"string"===C&&u++}}return u>2*w}(a,v)?"category":function(g,y){for(var h=g.length,m=0;m<h;m++)if(t(g[m],y))return!0;return!1}(a,v)?"linear":"-"}},71453:function($,R,e){"use strict";var k=e(92770),A=e(73972),l=e(71828),T=e(44467),b=e(85501),d=e(13838),s=e(26218),t=e(38701),o=e(96115),r=e(89426),n=e(15258),i=e(92128),a=e(21994),c=e(85555).WEEKDAY_PATTERN,p=e(85555).HOUR_PATTERN;function f(g,y,h){function m(P,I){return l.coerce(g,y,d.rangebreaks,P,I)}if(m("enabled")){var w=m("bounds");if(w&&w.length>=2){var u,S,_="";if(2===w.length)for(u=0;u<2;u++)if(S=v(w[u])){_=c;break}var E=m("pattern",_);if(E===c)for(u=0;u<2;u++)(S=v(w[u]))&&(y.bounds[u]=w[u]=S-1);if(E)for(u=0;u<2;u++)switch(S=w[u],E){case c:if(!k(S)||(S=+S)!==Math.floor(S)||S<0||S>=7)return void(y.enabled=!1);y.bounds[u]=w[u]=S;break;case p:if(!k(S)||(S=+S)<0||S>24)return void(y.enabled=!1);y.bounds[u]=w[u]=S}if(!1===h.autorange){var L=h.range;if(L[0]<L[1]){if(w[0]<L[0]&&w[1]>L[1])return void(y.enabled=!1)}else if(w[0]>L[0]&&w[1]<L[1])return void(y.enabled=!1)}}else{var C=m("values");if(!C||!C.length)return void(y.enabled=!1);m("dvalue")}}}$.exports=function(g,y,h,m,w){var u,S=m.letter,_=m.font||{},E=m.splomStash||{},L=h("visible",!m.visibleDflt),P=y.type||(y._template||{}).type||"-";"date"===P&&(A.getComponentMethod("calendars","handleDefaults")(g,y,"calendar",m.calendar),m.noTicklabelmode||(u=h("ticklabelmode")));var I="";m.noTicklabelposition&&"multicategory"!==P||(I=l.coerce(g,y,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:"period"===u?["outside","inside"]:"x"===S?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),m.noTicklabeloverflow||h("ticklabeloverflow",-1!==I.indexOf("inside")?"hide past domain":"category"===P||"multicategory"===P?"allow":"hide past div"),a(y,w);var U=!y.isValidRange(g.range);U&&m.reverseDflt&&(U="reversed"),!h("autorange",U)||"linear"!==P&&"-"!==P||h("rangemode"),h("range"),y.cleanRange(),n(g,y,h,m),"category"===P||m.noHover||h("hoverformat");var z=h("color"),H=z!==d.color.dflt?z:_.color,F=E.label||w._dfltTitle[S];if(r(g,y,h,P,m),!L)return y;h("title.text",F),l.coerceFont(h,"title.font",{family:_.family,size:l.bigFont(_.size),color:H}),s(g,y,h,P);var N=m.hasMinor;if(N&&(T.newContainer(y,"minor"),s(g,y,h,P,{isMinor:!0})),o(g,y,h,P,m),t(g,y,h,m),N){var B=m.isMinor;m.isMinor=!0,t(g,y,h,m),m.isMinor=B}i(g,y,h,{dfltColor:z,bgColor:m.bgColor,showGrid:m.showGrid,hasMinor:N,attributes:d}),!N||y.minor.ticks||y.minor.showgrid||delete y.minor,(y.showline||y.ticks)&&h("mirror");var j,J="multicategory"===P;if(m.noTickson||"category"!==P&&!J||!y.ticks&&!y.showgrid||(J&&(j="boundaries"),"boundaries"===h("tickson",j)&&delete y.ticklabelposition),J&&h("showdividers")&&(h("dividercolor"),h("dividerwidth")),"date"===P)if(b(g,y,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:f}),y.rangebreaks.length){for(var G=0;G<y.rangebreaks.length;G++)if(y.rangebreaks[G].pattern===c){y._hasDayOfWeekBreaks=!0;break}if(a(y,w),w._has("scattergl")||w._has("splom"))for(var V=0;V<m.data.length;V++){var W=m.data[V];"scattergl"!==W.type&&"splom"!==W.type||(W.visible=!1,l.warn(W.type+" traces do not work on axes with rangebreaks. Setting trace "+W.index+" to `visible: false`."))}}else delete y.rangebreaks;return y};var x={sun:1,mon:2,tue:3,wed:4,thu:5,fri:6,sat:7};function v(g){if("string"==typeof g)return x[g.substr(0,3).toLowerCase()]}},12663:function($,R,e){"use strict";var k=e(31562),A=k.FORMAT_LINK,l=k.DATE_FORMAT_LINK;function T(d,s){return["Sets the "+d+" formatting rule"+(s?"for `"+s+"` ":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+A+"."].join(" ")}function b(d,s){return T(d,s)+[" And for dates see: "+l+".","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(" ")}$.exports={axisHoverFormat:function(d,s){return{valType:"string",dflt:"",editType:"none",description:(s?T:b)("hover text",d)+["By default the values are formatted using "+(s?"generic number format":"`"+d+"axis.hoverformat`")+"."].join(" ")}},descriptionOnlyNumbers:T,descriptionWithDates:b}},41675:function($,R,e){"use strict";var k=e(73972),A=e(85555);function l(T,b){if(b&&b.length)for(var d=0;d<b.length;d++)if(b[d][T])return!0;return!1}R.id2name=function(T){if("string"==typeof T&&T.match(A.AX_ID_PATTERN)){var b=T.split(" ")[0].substr(1);return"1"===b&&(b=""),T.charAt(0)+"axis"+b}},R.name2id=function(T){if(T.match(A.AX_NAME_PATTERN)){var b=T.substr(5);return"1"===b&&(b=""),T.charAt(0)+b}},R.cleanId=function(T,b,d){var s=/( domain)$/.test(T);if("string"==typeof T&&T.match(A.AX_ID_PATTERN)&&(!b||T.charAt(0)===b)&&(!s||d)){var t=T.split(" ")[0].substr(1).replace(/^0+/,"");return"1"===t&&(t=""),T.charAt(0)+t+(s&&d?" domain":"")}},R.list=function(T,b,d){var s=T._fullLayout;if(!s)return[];var t,o=R.listIds(T,b),r=new Array(o.length);for(t=0;t<o.length;t++){var n=o[t];r[t]=s[n.charAt(0)+"axis"+n.substr(1)]}if(!d){var i=s._subplots.gl3d||[];for(t=0;t<i.length;t++){var a=s[i[t]];b?r.push(a[b+"axis"]):r.push(a.xaxis,a.yaxis,a.zaxis)}}return r},R.listIds=function(T,b){var d=T._fullLayout;if(!d)return[];var s=d._subplots;return b?s[b+"axis"]:s.xaxis.concat(s.yaxis)},R.getFromId=function(T,b,d){var s=T._fullLayout;return b=void 0===b||"string"!=typeof b?b:b.replace(" domain",""),"x"===d?b=b.replace(/y[0-9]*/,""):"y"===d&&(b=b.replace(/x[0-9]*/,"")),s[R.id2name(b)]},R.getFromTrace=function(T,b,d){var s=T._fullLayout,t=null;if(k.traceIs(b,"gl3d")){var o=b.scene;"scene"===o.substr(0,5)&&(t=s[o][d+"axis"])}else t=R.getFromId(T,b[d+"axis"]||d);return t},R.idSort=function(T,b){var d=T.charAt(0),s=b.charAt(0);return d!==s?d>s?1:-1:+(T.substr(1)||1)-+(b.substr(1)||1)},R.ref2id=function(T){return!!/^[xyz]/.test(T)&&T.split(" ")[0]},R.isLinked=function(T,b){return l(b,T._axisMatchGroups)||l(b,T._axisConstraintGroups)}},15258:function($){"use strict";$.exports=function(R,e,k,A){if("category"===e.type){var l,T=R.categoryarray,b=Array.isArray(T)&&T.length>0;b&&(l="array");var d,s=k("categoryorder",l);"array"===s&&(d=k("categoryarray")),b||"array"!==s||(s=e.categoryorder="trace"),"trace"===s?e._initialCategories=[]:"array"===s?e._initialCategories=d.slice():(d=function(t,o){var r,n,i,a=o.dataAttr||t._id.charAt(0),c={};if(o.axData)r=o.axData;else for(r=[],n=0;n<o.data.length;n++){var p=o.data[n];p[a+"axis"]===t._id&&r.push(p)}for(n=0;n<r.length;n++){var f=r[n][a];for(i=0;i<f.length;i++){var x=f[i];null!=x&&(c[x]=1)}}return Object.keys(c)}(e,A).sort(),"category ascending"===s?e._initialCategories=d:"category descending"===s&&(e._initialCategories=d.reverse()))}}},66287:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(50606),T=l.ONEDAY,b=l.ONEWEEK;R.dtick=function(d,s){var t="log"===s,o="date"===s,r="category"===s,n=o?T:1;if(!d)return n;if(k(d))return(d=Number(d))<=0?n:r?Math.max(1,Math.round(d)):o?Math.max(.1,d):d;if("string"!=typeof d||!o&&!t)return n;var i=d.charAt(0),a=d.substr(1);return(a=k(a)?Number(a):0)<=0||!(o&&"M"===i&&a===Math.round(a)||t&&"L"===i||t&&"D"===i&&(1===a||2===a))?n:d},R.tick0=function(d,s,t,o){return"date"===s?A.cleanDate(d,A.dateTick0(t,o%b==0?1:0)):"D1"!==o&&"D2"!==o?k(d)?Number(d):0:void 0}},85555:function($,R,e){"use strict";var k=e(30587).counter;$.exports={idRegex:{x:k("x","( domain)?"),y:k("y","( domain)?")},attrRegex:k("[xy]axis"),xAxisMatch:k("xaxis"),yAxisMatch:k("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},99082:function($,R,e){"use strict";var k=e(71828),A=e(71739),l=e(41675).id2name,T=e(13838),b=e(42449),d=e(21994),s=e(50606).ALMOST_EQUAL,t=e(18783).FROM_BL;function o(f,x,v){var g=v.axIds,y=v.layoutOut,h=v.hasImage,m=y._axisConstraintGroups,w=y._axisMatchGroups,u=x._id,S=u.charAt(0),_=((y._splomAxes||{})[S]||{})[u]||{},E=x._id,L="x"===E.charAt(0);function C(X,K){return k.coerce(f,x,T,X,K)}x._matchGroup=null,x._constraintGroup=null,C("constrain",h?"domain":"range"),k.coerce(f,x,{constraintoward:{valType:"enumerated",values:L?["left","center","right"]:["bottom","middle","top"],dflt:L?"center":"middle"}},"constraintoward");var P,I,U=x.type,z=[];for(P=0;P<g.length;P++)(I=g[P])!==E&&y[l(I)].type===U&&z.push(I);var H=n(m,E);if(H){var F=[];for(P=0;P<z.length;P++)H[I=z[P]]||F.push(I);z=F}var N,B,j=z.length;j&&(f.matches||_.matches)&&(N=k.coerce(f,x,{matches:{valType:"enumerated",values:z,dflt:-1!==z.indexOf(_.matches)?_.matches:void 0}},"matches"));var J=h&&!L?x.anchor:void 0;if(j&&!N&&(f.scaleanchor||J)&&(B=k.coerce(f,x,{scaleanchor:{valType:"enumerated",values:z}},"scaleanchor",J)),N){x._matchGroup=i(w,E,N,1);var G=y[l(N)],V=r(y,x)/r(y,G);L!==("x"===N.charAt(0))&&(V=(L?"x":"y")+V),i(m,E,N,V)}else f.matches&&-1!==g.indexOf(f.matches)&&k.warn("ignored "+x._name+'.matches: "'+f.matches+'" to avoid an infinite loop');if(B){var W=C("scaleratio");W||(W=x.scaleratio=1),i(m,E,B,W)}else f.scaleanchor&&-1!==g.indexOf(f.scaleanchor)&&k.warn("ignored "+x._name+'.scaleanchor: "'+f.scaleanchor+'" to avoid either an infinite loop and possibly inconsistent scaleratios, or because this axis declares a *matches* constraint.')}function r(f,x){var v=x.domain;return v||(v=f[l(x.overlaying)].domain),v[1]-v[0]}function n(f,x){for(var v=0;v<f.length;v++)if(f[v][x])return f[v];return null}function i(f,x,v,g){var y,h,m,w,u,S=n(f,x);null===S?((S={})[x]=1,u=f.length,f.push(S)):u=f.indexOf(S);var _=Object.keys(S);for(y=0;y<f.length;y++)if(m=f[y],y!==u&&m[v]){var E=m[v];for(h=0;h<_.length;h++)m[w=_[h]]=a(E,a(g,S[w]));return void f.splice(u,1)}if(1!==g)for(h=0;h<_.length;h++){var L=_[h];S[L]=a(g,S[L])}S[v]=1}function a(f,x){var v,g,y="",h="";"string"==typeof f&&(v=(y=f.match(/^[xy]*/)[0]).length,f=+f.substr(v)),"string"==typeof x&&(g=(h=x.match(/^[xy]*/)[0]).length,x=+x.substr(g));var m=f*x;return v||g?v&&g&&y.charAt(0)!==h.charAt(0)?v===g?m:(v>g?y.substr(g):h.substr(v))+m:y+h+f*x:m}function c(f,x){for(var v=x._size,g=v.h/v.w,y={},h=Object.keys(f),m=0;m<h.length;m++){var w=h[m],u=f[w];if("string"==typeof u){var S=u.match(/^[xy]*/)[0],_=S.length;u=+u.substr(_);for(var E="y"===S.charAt(0)?g:1/g,L=0;L<_;L++)u*=E}y[w]=u}return y}function p(f,x){var v=f._inputDomain,y=v[0]+(v[1]-v[0])*t[f.constraintoward];f.domain=f._input.domain=[y+(v[0]-y)/x,y+(v[1]-y)/x],f.setScale()}R.handleDefaults=function(f,x,v){var g,y,h,m,w,u,S,_,E=v.axIds,L=v.axHasImage,C=x._axisConstraintGroups=[],P=x._axisMatchGroups=[];for(g=0;g<E.length;g++)o(w=f[m=l(E[g])],u=x[m],{axIds:E,layoutOut:x,hasImage:L[m]});function I(G,V){for(g=0;g<G.length;g++)for(h in y=G[g])x[l(h)][V]=y}for(I(P,"_matchGroup"),g=0;g<C.length;g++)for(h in y=C[g])if((u=x[l(h)]).fixedrange){for(var U in y){var z=l(U);!1===(f[z]||{}).fixedrange&&k.warn("fixedrange was specified as false for axis "+z+" but was overridden because another axis in its constraint group has fixedrange true"),x[z].fixedrange=!0}break}for(g=0;g<C.length;){for(h in y=C[g]){(u=x[l(h)])._matchGroup&&Object.keys(u._matchGroup).length===Object.keys(y).length&&(C.splice(g,1),g--);break}g++}I(C,"_constraintGroup");var H=["constrain","range","autorange","rangemode","rangebreaks","categoryorder","categoryarray"],F=!1,N=!1;function B(){_=u[S],"rangebreaks"===S&&(N=u._hasDayOfWeekBreaks)}for(g=0;g<P.length;g++){y=P[g];for(var j=0;j<H.length;j++){var J;for(h in S=H[j],_=null,y)if(w=f[m=l(h)],S in(u=x[m])){if(!u.matches&&(J=u,S in w)){B();break}null===_&&S in w&&B()}if("range"===S&&_&&(F=!0),"autorange"===S&&null===_&&F&&(_=!1),null===_&&S in J&&(_=J[S]),null!==_)for(h in y)(u=x[l(h)])[S]="range"===S?_.slice():_,"rangebreaks"===S&&(u._hasDayOfWeekBreaks=N,d(u,x))}}},R.enforce=function(f){var x,v,g,y,h,m,w,u,S=f._fullLayout,_=S._axisConstraintGroups||[];for(x=0;x<_.length;x++){g=c(_[x],S);var E=Object.keys(g),L=1/0,C=0,P=1/0,I={},U={},z=!1;for(v=0;v<E.length;v++)U[y=E[v]]=h=S[l(y)],h._inputDomain?h.domain=h._inputDomain.slice():h._inputDomain=h.domain.slice(),h._inputRange||(h._inputRange=h.range.slice()),h.setScale(),I[y]=m=Math.abs(h._m)/g[y],L=Math.min(L,m),"domain"!==h.constrain&&h._constraintShrinkable||(P=Math.min(P,m)),delete h._constraintShrinkable,C=Math.max(C,m),"domain"===h.constrain&&(z=!0);if(!(L>s*C)||z)for(v=0;v<E.length;v++)if(m=I[y=E[v]],w=(h=U[y]).constrain,m!==P||"domain"===w)if(u=m/P,"range"===w)b(h,u);else{var H=h._inputDomain,F=(h.domain[1]-h.domain[0])/(H[1]-H[0]),N=(h.r2l(h.range[1])-h.r2l(h.range[0]))/(h.r2l(h._inputRange[1])-h.r2l(h._inputRange[0]));if((u/=F)*N<1){h.domain=h._input.domain=H.slice(),b(h,u);continue}if(N<1&&(h.range=h._input.range=h._inputRange.slice(),u*=N),h.autorange){var B=h.r2l(h.range[0]),j=h.r2l(h.range[1]),J=(B+j)/2,G=J,V=J,W=Math.abs(j-J),X=J-W*u*1.0001,K=J+W*u*1.0001,re=A.makePadFn(S,h,0),ee=A.makePadFn(S,h,1);p(h,u);var ie,oe,ce=Math.abs(h._m),me=A.concatExtremes(f,h),de=me.min,he=me.max;for(oe=0;oe<de.length;oe++)(ie=de[oe].val-re(de[oe])/ce)>X&&ie<G&&(G=ie);for(oe=0;oe<he.length;oe++)(ie=he[oe].val+ee(he[oe])/ce)<K&&ie>V&&(V=ie);u/=(V-G)/(2*W),G=h.l2r(G),V=h.l2r(V),h.range=h._input.range=B<j?[G,V]:[V,G]}p(h,u)}}},R.getAxisGroup=function(f,x){for(var v=f._axisMatchGroups,g=0;g<v.length;g++)if(v[g][x])return"g"+g;return x},R.clean=function(f,x){if(x._inputDomain){for(var v=!1,g=x._id,y=f._fullLayout._axisConstraintGroups,h=0;h<y.length;h++)if(y[h][g]){v=!0;break}v&&"domain"===x.constrain||(x._input.domain=x.domain=x._inputDomain,delete x._inputDomain)}}},29323:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=A.numberFormat,T=e(84267),b=e(38520),d=e(73972),s=A.strTranslate,t=e(63893),o=e(7901),r=e(91424),n=e(30211),i=e(89298),a=e(6964),c=e(28569),p=e(64505),f=p.selectingOrDrawing,x=p.freeMode,v=e(18783).FROM_TL,g=e(33306),y=e(61549).redrawReglTraces,h=e(74875),m=e(41675).getFromId,w=e(47322).prepSelect,u=e(47322).clearOutline,S=e(47322).selectOnClick,_=e(42449),E=e(85555),L=E.MINDRAG,C=E.MINZOOM,P=!0;function I(ie,oe,ce,me){var de=A.ensureSingle(ie.draglayer,oe,ce,function(he){he.classed("drag",!0).style({fill:"transparent","stroke-width":0}).attr("data-subplot",ie.id)});return de.call(a,me),de.node()}function U(ie,oe,ce,me,de,he,ve){var Pe=I(ie,"rect",oe,ce);return k.select(Pe).call(r.setRect,me,de,he,ve),Pe}function z(ie,oe){for(var ce=0;ce<ie.length;ce++)if(!ie[ce].fixedrange)return oe;return""}function H(ie,oe,ce,me,de){for(var he=0;he<ie.length;he++){var ve=ie[he];if(!ve.fixedrange)if(ve.rangebreaks){var Pe="y"===ve._id.charAt(0),ke=Pe?1-ce:ce;me[ve._name+".range[0]"]=ve.l2r(ve.p2l((Pe?1-oe:oe)*ve._length)),me[ve._name+".range[1]"]=ve.l2r(ve.p2l(ke*ve._length))}else{var Ae=ve._rl[0],Te=ve._rl[1]-Ae;me[ve._name+".range[0]"]=ve.l2r(Ae+Te*oe),me[ve._name+".range[1]"]=ve.l2r(Ae+Te*ce)}}if(de&&de.length){var Q=(oe+(1-ce))/2;H(de,Q,1-Q,me,[])}}function F(ie,oe){for(var ce=0;ce<ie.length;ce++){var me=ie[ce];if(!me.fixedrange)if(me.rangebreaks){var de=me._length,he=(me.p2l(0+oe)-me.p2l(0)+(me.p2l(de+oe)-me.p2l(de)))/2;me.range=[me.l2r(me._rl[0]-he),me.l2r(me._rl[1]-he)]}else me.range=[me.l2r(me._rl[0]-oe/me._m),me.l2r(me._rl[1]-oe/me._m)]}}function N(ie){return 1-(ie>=0?Math.min(ie,.9):1/(1/Math.max(ie,-.3)+3.222))}function B(ie,oe,ce,me,de){return ie.append("path").attr("class","zoombox").style({fill:oe>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",s(ce,me)).attr("d",de+"Z")}function j(ie,oe,ce){return ie.append("path").attr("class","zoombox-corners").style({fill:o.background,stroke:o.defaultLine,"stroke-width":1,opacity:0}).attr("transform",s(oe,ce)).attr("d","M0,0Z")}function J(ie,oe,ce,me,de,he){ie.attr("d",me+"M"+ce.l+","+ce.t+"v"+ce.h+"h"+ce.w+"v-"+ce.h+"h-"+ce.w+"Z"),G(ie,oe,de,he)}function G(ie,oe,ce,me){ce||(ie.transition().style("fill",me>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),oe.transition().style("opacity",1).duration(200))}function V(ie){k.select(ie).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function W(ie){P&&ie.data&&ie._context.showTips&&(A.notifier(A._(ie,"Double-click to zoom back out"),"long"),P=!1)}function X(ie){var oe=Math.floor(Math.min(ie.b-ie.t,ie.r-ie.l,C)/2);return"M"+(ie.l-3.5)+","+(ie.t-.5+oe)+"h3v"+-oe+"h"+oe+"v-3h-"+(oe+3)+"ZM"+(ie.r+3.5)+","+(ie.t-.5+oe)+"h-3v"+-oe+"h"+-oe+"v-3h"+(oe+3)+"ZM"+(ie.r+3.5)+","+(ie.b+.5-oe)+"h-3v"+oe+"h"+-oe+"v3h"+(oe+3)+"ZM"+(ie.l-3.5)+","+(ie.b+.5-oe)+"h3v"+oe+"h"+oe+"v3h-"+(oe+3)+"Z"}function K(ie,oe,ce,me,de){for(var he,ve,Pe,xe,ke=!1,Ae={},Te={},Q=(de||{}).xaHash,se=(de||{}).yaHash,fe=0;fe<oe.length;fe++){var ye=oe[fe];for(he in ce)if(ye[he]){for(Pe in ye)de&&(Q[Pe]||se[Pe])||("x"===Pe.charAt(0)?ce:me)[Pe]||(Ae[Pe]=he);for(ve in me)de&&(Q[ve]||se[ve])||!ye[ve]||(ke=!0)}for(ve in me)if(ye[ve])for(xe in ye)de&&(Q[xe]||se[xe])||("x"===xe.charAt(0)?ce:me)[xe]||(Te[xe]=ve)}ke&&(A.extendFlat(Ae,Te),Te={});var Me={},Ie=[];for(Pe in Ae){var Ce=m(ie,Pe);Ie.push(Ce),Me[Ce._id]=Ce}var Re={},le=[];for(xe in Te){var ge=m(ie,xe);le.push(ge),Re[ge._id]=ge}return{xaHash:Me,yaHash:Re,xaxes:Ie,yaxes:le,xLinks:Ae,yLinks:Te,isSubplotConstrained:ke}}function re(ie,oe){if(b){var ce=void 0!==ie.onwheel?"wheel":"mousewheel";ie._onwheel&&ie.removeEventListener(ce,ie._onwheel),ie._onwheel=oe,ie.addEventListener(ce,oe,{passive:!1})}else void 0!==ie.onwheel?ie.onwheel=oe:void 0!==ie.onmousewheel?ie.onmousewheel=oe:ie.isAddedWheelEvent||(ie.isAddedWheelEvent=!0,ie.addEventListener("wheel",oe,{passive:!1}))}function ee(ie){var oe=[];for(var ce in ie)oe.push(ie[ce]);return oe}$.exports={makeDragBox:function(ie,oe,ce,me,de,he,ve,Pe){var xe,ke,Ae,Te,Q,se,fe,ye,Me,Ie,Ce,Re,le,ge,_e,Fe,Ve,He,nt,tt,ot,dt,kt,mt=ie._fullLayout._zoomlayer,wt=ve+Pe==="nsew",Lt=1===(ve+Pe).length;function Ct(){if(Me=(xe=oe.xaxis)._length,Ie=(ke=oe.yaxis)._length,fe=xe._offset,ye=ke._offset,(Ae={})[xe._id]=xe,(Te={})[ke._id]=ke,ve&&Pe)for(var cn=oe.overlays,dn=0;dn<cn.length;dn++){var sn=cn[dn].xaxis;Ae[sn._id]=sn;var hn=cn[dn].yaxis;Te[hn._id]=hn}Q=ee(Ae),se=ee(Te),le=z(Q,Pe),ge=z(se,ve),_e=!ge&&!le,Re=K(ie,ie._fullLayout._axisMatchGroups,Ae,Te);var En=(Ce=K(ie,ie._fullLayout._axisConstraintGroups,Ae,Te,Re)).isSubplotConstrained||Re.isSubplotConstrained;Fe=Pe||En,Ve=ve||En;var Mn=ie._fullLayout;He=Mn._has("scattergl"),nt=Mn._has("splom"),tt=Mn._has("svg")}ce+=oe.yaxis._shift,Ct();var cn,It=(cn=ge+le)?"nsew"===cn?wt?"":"pan"===ie._fullLayout.dragmode?"move":"crosshair":cn.toLowerCase()+"-resize":"pointer",Ut=U(oe,ve+Pe+"drag",It,ce,me,de,he);if(_e&&!wt)return Ut.onmousedown=null,Ut.style.pointerEvents="none",Ut;var Rt,Ge,We,Be,Ye,rt,Se,ze,Ke,st,ct={element:Ut,gd:ie,plotinfo:oe};function Tt(){ct.plotinfo.selection=!1,u(ie)}function Et(cn,dn){var $n,mr,fr,Zn,qn,sn=ct.gd;if(sn._fullLayout._activeShapeIndex>=0)sn._fullLayout._deactivateShape(sn);else{var hn=sn._fullLayout.clickmode;if(V(sn),2!==cn||Lt||function un(){if(!ie._transitioningWithDuration){var cn=ie._context.doubleClick,dn=[];le&&(dn=dn.concat(Q)),ge&&(dn=dn.concat(se)),Re.xaxes&&(dn=dn.concat(Re.xaxes)),Re.yaxes&&(dn=dn.concat(Re.yaxes));var sn,hn,En,Mn={};if("reset+autosize"===cn)for(cn="autosize",hn=0;hn<dn.length;hn++)if((sn=dn[hn])._rangeInitial&&(sn.range[0]!==sn._rangeInitial[0]||sn.range[1]!==sn._rangeInitial[1])||!sn._rangeInitial&&!sn.autorange){cn="reset";break}if("autosize"===cn)for(hn=0;hn<dn.length;hn++)(sn=dn[hn]).fixedrange||(Mn[sn._name+".autorange"]=!0);else if("reset"===cn)for((le||Ce.isSubplotConstrained)&&(dn=dn.concat(Ce.xaxes)),ge&&!Ce.isSubplotConstrained&&(dn=dn.concat(Ce.yaxes)),Ce.isSubplotConstrained&&(le?ge||(dn=dn.concat(se)):dn=dn.concat(Q)),hn=0;hn<dn.length;hn++)(sn=dn[hn]).fixedrange||(sn._rangeInitial?(Mn[sn._name+".range[0]"]=(En=sn._rangeInitial)[0],Mn[sn._name+".range[1]"]=En[1]):Mn[sn._name+".autorange"]=!0);ie.emit("plotly_doubleclick",null),d.call("_guiRelayout",ie,Mn)}}(),wt)hn.indexOf("select")>-1&&S(dn,sn,Q,se,oe.id,ct),hn.indexOf("event")>-1&&n.click(sn,dn,oe.id);else if(1===cn&&Lt){var En=ve?ke:xe,Mn="s"===ve||"w"===Pe?0:1,Rn=En._name+".range["+Mn+"]",Nn=(Zn=($n=En).range[mr=Mn],qn=Math.abs(Zn-$n.range[1-mr]),"date"===$n.type?Zn:"log"===$n.type?(fr=Math.ceil(Math.max(0,-Math.log(qn)/Math.LN10))+3,l("."+fr+"g")(Math.pow(10,Zn))):(fr=Math.floor(Math.log(Math.abs(Zn))/Math.LN10)-Math.floor(Math.log(qn)/Math.LN10)+4,l("."+String(fr)+"g")(Zn))),Fn="left",rr="middle";if(En.fixedrange)return;ve?(rr="n"===ve?"top":"bottom","right"===En.side&&(Fn="right")):"e"===Pe&&(Fn="right"),sn._context.showAxisRangeEntryBoxes&&k.select(Ut).call(t.makeEditable,{gd:sn,immediate:!0,background:sn._fullLayout.paper_bgcolor,text:String(Nn),fill:En.tickfont?En.tickfont.color:"#444",horizontalAlign:Fn,verticalAlign:rr}).on("edit",function($n){var mr=En.d2r($n);void 0!==mr&&d.call("_guiRelayout",sn,Rn,mr)})}}}function At(cn,dn){if(ie._transitioningWithDuration)return!1;var rr,$n,sn=Math.max(0,Math.min(Me,dt*cn+Rt)),hn=Math.max(0,Math.min(Ie,kt*dn+Ge)),En=Math.abs(sn-Rt),Mn=Math.abs(hn-Ge);function Rn(){Se="",We.r=We.l,We.t=We.b,Ke.attr("d","M0,0Z")}if(We.l=Math.min(Rt,sn),We.r=Math.max(Rt,sn),We.t=Math.min(Ge,hn),We.b=Math.max(Ge,hn),Ce.isSubplotConstrained)En>C||Mn>C?(Se="xy",En/Me>Mn/Ie?(Mn=En*Ie/Me,Ge>hn?We.t=Ge-Mn:We.b=Ge+Mn):(En=Mn*Me/Ie,Rt>sn?We.l=Rt-En:We.r=Rt+En),Ke.attr("d",X(We))):Rn();else if(Re.isSubplotConstrained)if(En>C||Mn>C){Se="xy";var Nn=Math.min(We.l/Me,(Ie-We.b)/Ie),Fn=Math.max(We.r/Me,(Ie-We.t)/Ie);We.l=Nn*Me,We.r=Fn*Me,We.b=(1-Nn)*Ie,We.t=(1-Fn)*Ie,Ke.attr("d",X(We))}else Rn();else!ge||Mn<Math.min(Math.max(.6*En,L),C)?En<L||!le?Rn():(We.t=0,We.b=Ie,Se="x",Ke.attr("d","M"+((rr=We).l-.5)+","+(($n=Ge)-C-.5)+"h-3v"+(2*C+1)+"h3ZM"+(rr.r+.5)+","+($n-C-.5)+"h3v"+(2*C+1)+"h-3Z")):!le||En<Math.min(.6*Mn,C)?(We.l=0,We.r=Me,Se="y",Ke.attr("d",function(rr,$n){return"M"+($n-C-.5)+","+(rr.t-.5)+"v-3h"+(2*C+1)+"v3ZM"+($n-C-.5)+","+(rr.b+.5)+"v3h"+(2*C+1)+"v-3Z"}(We,Rt))):(Se="xy",Ke.attr("d",X(We)));We.w=We.r-We.l,We.h=We.b-We.t,Se&&(st=!0),ie._dragged=st,J(ze,Ke,We,Ye,rt,Be),ht(),ie.emit("plotly_relayouting",ot),rt=!0}function ht(){ot={},"xy"!==Se&&"x"!==Se||(H(Q,We.l/Me,We.r/Me,ot,Ce.xaxes),Nt("x",ot)),"xy"!==Se&&"y"!==Se||(H(se,(Ie-We.b)/Ie,(Ie-We.t)/Ie,ot,Ce.yaxes),Nt("y",ot))}function pt(){ht(),V(ie),pn(),W(ie)}ct.prepFn=function(cn,dn,sn){var hn=ct.dragmode,En=ie._fullLayout.dragmode;En!==hn&&(ct.dragmode=En),Ct(),dt=ie._fullLayout._invScaleX,kt=ie._fullLayout._invScaleY,_e||(wt?cn.shiftKey?"pan"===En?En="zoom":f(En)||(En="pan"):cn.ctrlKey&&(En="pan"):En="pan"),ct.minDrag=x(En)?1:void 0,f(En)?(ct.xaxes=Q,ct.yaxes=se,w(cn,dn,sn,ct,En)):(ct.clickFn=Et,f(hn)&&Tt(),_e||("zoom"===En?(ct.moveFn=At,ct.doneFn=pt,ct.minDrag=1,function(Mn,Rn,Nn){var Fn=Ut.getBoundingClientRect();Rt=Rn-Fn.left,Ge=Nn-Fn.top,ie._fullLayout._calcInverseTransform(ie);var rr=A.apply3DTransform(ie._fullLayout._invTransform)(Rt,Ge);We={l:Rt=rr[0],r:Rt,w:0,t:Ge=rr[1],b:Ge,h:0},Be=ie._hmpixcount?ie._hmlumcount/ie._hmpixcount:T(ie._fullLayout.plot_bgcolor).getLuminance(),rt=!1,Se="xy",st=!1,ze=B(mt,Be,fe,ye,Ye="M0,0H"+Me+"V"+Ie+"H0V0"),Ke=j(mt,fe,ye)}(0,dn,sn)):"pan"===En&&(ct.moveFn=jt,ct.doneFn=pn))),ie._fullLayout._redrag=function(){var Mn=ie._dragdata;Mn&&Mn.element===Ut&&(f(ie._fullLayout.dragmode)||(Ct(),Kt([0,0,Me,Ie]),ct.moveFn(Mn.dx,Mn.dy)))}},c.init(ct);var gt=[0,0,Me,Ie],Pt=null,Ot=E.REDRAWDELAY,Ht=oe.mainplot?ie._fullLayout._plots[oe.mainplot]:oe;function jt(cn,dn){if(cn*=dt,dn*=kt,!ie._transitioningWithDuration){if(ie._fullLayout._replotting=!0,"ew"===le||"ns"===ge){var sn=le?-cn:0,hn=ge?-dn:0;if(Re.isSubplotConstrained){if(le&&ge){var En=(cn/Me-dn/Ie)/2;sn=-(cn=En*Me),hn=-(dn=-En*Ie)}ge?sn=-hn*Me/Ie:hn=-sn*Ie/Me}return le&&(F(Q,cn),Nt("x")),ge&&(F(se,dn),Nt("y")),Kt([sn,hn,Me,Ie]),Gt(),void ie.emit("plotly_relayouting",ot)}var Mn,Rn,Nn="w"===le==("n"===ge)?1:-1;if(le&&ge&&(Ce.isSubplotConstrained||Re.isSubplotConstrained)){var Fn=(cn/Me+Nn*dn/Ie)/2;cn=Fn*Me,dn=Nn*Fn*Ie}if("w"===le?cn=fr(Q,0,cn):"e"===le?cn=fr(Q,1,-cn):le||(cn=0),"n"===ge?dn=fr(se,1,dn):"s"===ge?dn=fr(se,0,-dn):ge||(dn=0),Mn="w"===le?cn:0,Rn="n"===ge?dn:0,Ce.isSubplotConstrained&&!Re.isSubplotConstrained||Re.isSubplotConstrained&&le&&ge&&Nn>0){var rr;if(Re.isSubplotConstrained||!le&&1===ge.length){for(rr=0;rr<Q.length;rr++)Q[rr].range=Q[rr]._r.slice(),_(Q[rr],1-dn/Ie);Mn=(cn=dn*Me/Ie)/2}if(Re.isSubplotConstrained||!ge&&1===le.length){for(rr=0;rr<se.length;rr++)se[rr].range=se[rr]._r.slice(),_(se[rr],1-cn/Me);Rn=(dn=cn*Ie/Me)/2}}Re.isSubplotConstrained&&ge||Nt("x"),Re.isSubplotConstrained&&le||Nt("y");var $n=Me-cn,mr=Ie-dn;!Re.isSubplotConstrained||le&&ge||(le?(Rn=Mn?0:cn*Ie/Me,mr=$n*Ie/Me):(Mn=Rn?0:dn*Me/Ie,$n=mr*Me/Ie)),Kt([Mn,Rn,$n,mr]),Gt(),ie.emit("plotly_relayouting",ot)}function fr(Zn,qn,ur){for(var Zt,nn,zn=1-qn,_n=0;_n<Zn.length;_n++){var Cn=Zn[_n];if(!Cn.fixedrange){Zt=Cn,nn=Cn._rl[zn]+(Cn._rl[qn]-Cn._rl[zn])/N(ur/Cn._length);var Un=Cn.l2r(nn);!1!==Un&&void 0!==Un&&(Cn.range[qn]=Un)}}return Zt._length*(Zt._rl[qn]-nn)/(Zt._rl[qn]-Zt._rl[zn])}}function Nt(cn,dn){for(var sn=Re.isSubplotConstrained?{x:se,y:Q}[cn]:Re[cn+"axes"],hn=Re.isSubplotConstrained?{x:Q,y:se}[cn]:[],En=0;En<sn.length;En++){var Mn=sn[En],Rn=Mn._id,Nn=Re.xLinks[Rn]||Re.yLinks[Rn],Fn=hn[0]||Ae[Nn]||Te[Nn];Fn&&(dn?(dn[Mn._name+".range[0]"]=dn[Fn._name+".range[0]"],dn[Mn._name+".range[1]"]=dn[Fn._name+".range[1]"]):Mn.range=Fn.range.slice())}}function Gt(){var cn,dn=[];function sn(Rn){for(cn=0;cn<Rn.length;cn++)Rn[cn].fixedrange||dn.push(Rn[cn]._id)}function hn(Rn,Nn){for(cn=0;cn<Rn.length;cn++){var Fn=Rn[cn],rr=Fn[Nn];Fn.fixedrange||"sync"!==rr.tickmode||dn.push(rr._id)}}for(Fe&&(sn(Q),sn(Ce.xaxes),sn(Re.xaxes),hn(oe.overlays,"xaxis")),Ve&&(sn(se),sn(Ce.yaxes),sn(Re.yaxes),hn(oe.overlays,"yaxis")),ot={},cn=0;cn<dn.length;cn++){var Mn=m(ie,dn[cn]);i.drawOne(ie,Mn,{skipTitle:!0}),ot[Mn._name+".range[0]"]=Mn.range[0],ot[Mn._name+".range[1]"]=Mn.range[1]}i.redrawComponents(ie,dn)}function pn(){Kt([0,0,Me,Ie]),A.syncOrAsync([h.previousPromises,function(){ie._fullLayout._replotting=!1,d.call("_guiRelayout",ie,ot)}],ie)}function Kt(cn){var dn,sn,hn,En,Mn=ie._fullLayout,Rn=Mn._plots,Nn=Mn._subplots.cartesian;if(nt&&d.subplotsRegistry.splom.drag(ie),He)for(dn=0;dn<Nn.length;dn++)if(hn=(sn=Rn[Nn[dn]]).xaxis,En=sn.yaxis,sn._scene){var Fn=A.simpleMap(hn.range,hn.r2l),rr=A.simpleMap(En.range,En.r2l);sn._scene.update({range:[Fn[0],rr[0],Fn[1],rr[1]]})}if((nt||He)&&(g(ie),y(ie)),tt){var $n=cn[2]/xe._length,mr=cn[3]/ke._length;for(dn=0;dn<Nn.length;dn++){hn=(sn=Rn[Nn[dn]]).xaxis,En=sn.yaxis;var fr,Zn,qn,ur,nn=(Ve||Re.isSubplotConstrained)&&!En.fixedrange&&Te[En._id];if((Fe||Re.isSubplotConstrained)&&!hn.fixedrange&&Ae[hn._id]?(fr=$n,qn=Pe||Re.isSubplotConstrained?cn[0]:vn(hn,fr)):Re.xaHash[hn._id]?(fr=$n,qn=cn[0]*hn._length/xe._length):Re.yaHash[hn._id]?(fr=mr,qn="ns"===ge?-cn[1]*hn._length/ke._length:vn(hn,fr,{n:"top",s:"bottom"}[ge])):qn=Bn(hn,fr=wn(hn,$n,mr)),nn?(Zn=mr,ur=ve||Re.isSubplotConstrained?cn[1]:vn(En,Zn)):Re.yaHash[En._id]?(Zn=mr,ur=cn[1]*En._length/ke._length):Re.xaHash[En._id]?(Zn=$n,ur="ew"===le?-cn[0]*En._length/xe._length:vn(En,Zn,{e:"right",w:"left"}[le])):ur=Bn(En,Zn=wn(En,$n,mr)),fr||Zn){fr||(fr=1),Zn||(Zn=1);var zn=hn._offset-qn/fr,_n=En._offset-ur/Zn;sn.clipRect.call(r.setTranslate,qn,ur).call(r.setScale,fr,Zn),sn.plot.call(r.setTranslate,zn,_n).call(r.setScale,1/fr,1/Zn),fr===sn.xScaleFactor&&Zn===sn.yScaleFactor||(r.setPointGroupScale(sn.zoomScalePts,fr,Zn),r.setTextPointsScale(sn.zoomScaleTxt,fr,Zn)),r.hideOutsideRangePoints(sn.clipOnAxisFalseTraces,sn),sn.xScaleFactor=fr,sn.yScaleFactor=Zn}}}}function wn(cn,dn,sn){return cn.fixedrange?0:Fe&&Ce.xaHash[cn._id]?dn:Ve&&(Ce.isSubplotConstrained?Ce.xaHash:Ce.yaHash)[cn._id]?sn:0}function Bn(cn,dn){return dn?(cn.range=cn._r.slice(),_(cn,dn),vn(cn,dn)):0}function vn(cn,dn,sn){return cn._length*(1-dn)*v[sn||cn.constraintoward||"middle"]}return ve.length*Pe.length!=1&&re(Ut,function(cn){if(ie._context._scrollZoom.cartesian||ie._fullLayout._enablescrollzoom){if(Tt(),ie._transitioningWithDuration)return cn.preventDefault(),void cn.stopPropagation();Ct(),clearTimeout(Pt);var dn=-cn.deltaY;if(isFinite(dn)||(dn=cn.wheelDelta/10),isFinite(dn)){var sn,hn=Math.exp(-Math.min(Math.max(dn,-20),20)/200),En=Ht.draglayer.select(".nsewdrag").node().getBoundingClientRect(),Mn=(cn.clientX-En.left)/En.width,Rn=(En.bottom-cn.clientY)/En.height;if(Fe){for(Pe||(Mn=.5),sn=0;sn<Q.length;sn++)Nn(Q[sn],Mn,hn);Nt("x"),gt[2]*=hn,gt[0]+=gt[2]*Mn*(1/hn-1)}if(Ve){for(ve||(Rn=.5),sn=0;sn<se.length;sn++)Nn(se[sn],Rn,hn);Nt("y"),gt[3]*=hn,gt[1]+=gt[3]*(1-Rn)*(1/hn-1)}Kt(gt),Gt(),ie.emit("plotly_relayouting",ot),Pt=setTimeout(function(){ie._fullLayout&&(gt=[0,0,Me,Ie],pn())},Ot),cn.preventDefault()}else A.log("Did not find wheel motion attributes: ",cn)}function Nn(Fn,rr,$n){if(!Fn.fixedrange){var mr=A.simpleMap(Fn.range,Fn.r2l),fr=mr[0]+(mr[1]-mr[0])*rr;Fn.range=mr.map(function(Zn){return Fn.l2r(fr+(Zn-fr)*$n)})}}}),Ut},makeDragger:I,makeRectDragger:U,makeZoombox:B,makeCorners:j,updateZoombox:J,xyCorners:X,transitionZoombox:G,removeZoombox:V,showDoubleClickNotifier:W,attachWheelEventHandler:re}},4305:function($,R,e){"use strict";var k=e(39898),A=e(30211),l=e(28569),T=e(6964),b=e(29323).makeDragBox,d=e(85555).DRAGGERSIZE;R.initInteractions=function(s){var t=s._fullLayout;if(s._context.staticPlot)k.select(s).selectAll(".drag").remove();else if(t._has("cartesian")||t._has("splom")){Object.keys(t._plots||{}).sort(function(r,n){if((t._plots[r].mainplot&&!0)===(t._plots[n].mainplot&&!0)){var i=r.split("y"),a=n.split("y");return i[0]===a[0]?Number(i[1]||1)-Number(a[1]||1):Number(i[0]||1)-Number(a[0]||1)}return t._plots[r].mainplot?1:-1}).forEach(function(r){var n=t._plots[r],i=n.xaxis,a=n.yaxis;if(!n.mainplot){var c=b(s,n,i._offset,a._offset,i._length,a._length,"ns","ew");c.onmousemove=function(x){s._fullLayout._rehover=function(){s._fullLayout._hoversubplot===r&&s._fullLayout._plots[r]&&A.hover(s,x,r)},A.hover(s,x,r),s._fullLayout._lasthover=c,s._fullLayout._hoversubplot=r},c.onmouseout=function(x){s._dragging||(s._fullLayout._hoversubplot=null,l.unhover(s,x))},s._context.showAxisDragHandles&&(b(s,n,i._offset-d,a._offset-d,d,d,"n","w"),b(s,n,i._offset+i._length,a._offset-d,d,d,"n","e"),b(s,n,i._offset-d,a._offset+a._length,d,d,"s","w"),b(s,n,i._offset+i._length,a._offset+a._length,d,d,"s","e"))}if(s._context.showAxisDragHandles){if(r===i._mainSubplot){var p=i._mainLinePosition;"top"===i.side&&(p-=d),b(s,n,i._offset+.1*i._length,p,.8*i._length,d,"","ew"),b(s,n,i._offset,p,.1*i._length,d,"","w"),b(s,n,i._offset+.9*i._length,p,.1*i._length,d,"","e")}if(r===a._mainSubplot){var f=a._mainLinePosition;"right"!==a.side&&(f-=d),b(s,n,f,a._offset+.1*a._length,d,.8*a._length,"ns",""),b(s,n,f,a._offset+.9*a._length,d,.1*a._length,"s",""),b(s,n,f,a._offset,d,.1*a._length,"n","")}}});var o=t._hoverlayer.node();o.onmousemove=function(r){r.target=s._fullLayout._lasthover,A.hover(s,r,t._hoversubplot)},o.onclick=function(r){r.target=s._fullLayout._lasthover,A.click(s,r)},o.onmousedown=function(r){s._fullLayout._lasthover.onmousedown(r)},R.updateFx(s)}},R.updateFx=function(s){var t=s._fullLayout;T(t._draggers,"pan"===t.dragmode?"move":"crosshair")}},76325:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(41675);$.exports=function(T){return function(b,d){var s=b[T];if(Array.isArray(s))for(var t=k.subplotsRegistry.cartesian,o=t.idRegex,r=d._subplots,n=r.xaxis,i=r.yaxis,a=r.cartesian,c=d._has("cartesian")||d._has("gl2d"),p=0;p<s.length;p++){var f=s[p];if(A.isPlainObject(f)){var x=l.cleanId(f.xref,"x",!1),v=l.cleanId(f.yref,"y",!1),g=o.x.test(x),y=o.y.test(v);if(g||y){c||A.pushUnique(d._basePlotModules,t);var h=!1;g&&-1===n.indexOf(x)&&(n.push(x),h=!0),y&&-1===i.indexOf(v)&&(i.push(v),h=!0),h&&g&&y&&a.push(x+v)}}}}}},93612:function($,R,e){"use strict";var k=e(39898),A=e(73972),l=e(71828),T=e(74875),b=e(91424),d=e(27659).a0,s=e(41675),t=e(85555),o=e(77922),r=l.ensureSingle;function n(f,x,v){return l.ensureSingle(f,x,v,function(g){g.datum(v)})}function i(f,x,v,g,y){for(var h,m,w,u=t.traceLayerClasses,S=f._fullLayout,_=S._modules,E=[],L=[],C=0;C<_.length;C++){var P=(h=_[C]).name,I=A.modules[P].categories;if(I.svg){var U=h.layerName||P+"layer",z=h.plot;w=(m=d(v,z))[0],v=m[1],w.length&&E.push({i:u.indexOf(U),className:U,plotMethod:z,cdModule:w}),I.zoomScale&&L.push("."+U)}}E.sort(function(N,B){return N.i-B.i});var H=x.plot.selectAll("g.mlayer").data(E,function(N){return N.className});if(H.enter().append("g").attr("class",function(N){return N.className}).classed("mlayer",!0).classed("rangeplot",x.isRangePlot),H.exit().remove(),H.order(),H.each(function(N){var B=k.select(this),j=N.className;N.plotMethod(f,x,N.cdModule,B,g,y),-1===t.clipOnAxisFalseQuery.indexOf("."+j)&&b.setClipUrl(B,x.layerClipId,f)}),S._has("scattergl")&&(h=A.getModule("scattergl"),w=d(v,h)[0],h.plot(f,x,w)),!f._context.staticPlot&&(x._hasClipOnAxisFalse&&(x.clipOnAxisFalseTraces=x.plot.selectAll(t.clipOnAxisFalseQuery.join(",")).selectAll(".trace")),L.length)){var F=x.plot.selectAll(L.join(",")).selectAll(".trace");x.zoomScalePts=F.selectAll("path.point"),x.zoomScaleTxt=F.selectAll(".textpoint")}}function a(f,x){var v=x.plotgroup,g=x.id,y=t.layerValue2layerClass[x.xaxis.layer],h=t.layerValue2layerClass[x.yaxis.layer],m=f._fullLayout._hasOnlyLargeSploms;if(x.mainplot){var w=x.mainplotinfo,u=w.plotgroup,S=g+"-x",_=g+"-y";x.minorGridlayer=w.minorGridlayer,x.gridlayer=w.gridlayer,x.zerolinelayer=w.zerolinelayer,r(w.overlinesBelow,"path",S),r(w.overlinesBelow,"path",_),r(w.overaxesBelow,"g",S),r(w.overaxesBelow,"g",_),x.plot=r(w.overplot,"g",g),r(w.overlinesAbove,"path",S),r(w.overlinesAbove,"path",_),r(w.overaxesAbove,"g",S),r(w.overaxesAbove,"g",_),x.xlines=u.select(".overlines-"+y).select("."+S),x.ylines=u.select(".overlines-"+h).select("."+_),x.xaxislayer=u.select(".overaxes-"+y).select("."+S),x.yaxislayer=u.select(".overaxes-"+h).select("."+_)}else if(m)x.xlines=r(v,"path","xlines-above"),x.ylines=r(v,"path","ylines-above"),x.xaxislayer=r(v,"g","xaxislayer-above"),x.yaxislayer=r(v,"g","yaxislayer-above");else{var E=r(v,"g","layer-subplot");x.shapelayer=r(E,"g","shapelayer"),x.imagelayer=r(E,"g","imagelayer"),x.minorGridlayer=r(v,"g","minor-gridlayer"),x.gridlayer=r(v,"g","gridlayer"),x.zerolinelayer=r(v,"g","zerolinelayer"),r(v,"path","xlines-below"),r(v,"path","ylines-below"),x.overlinesBelow=r(v,"g","overlines-below"),r(v,"g","xaxislayer-below"),r(v,"g","yaxislayer-below"),x.overaxesBelow=r(v,"g","overaxes-below"),x.plot=r(v,"g","plot"),x.overplot=r(v,"g","overplot"),x.xlines=r(v,"path","xlines-above"),x.ylines=r(v,"path","ylines-above"),x.overlinesAbove=r(v,"g","overlines-above"),r(v,"g","xaxislayer-above"),r(v,"g","yaxislayer-above"),x.overaxesAbove=r(v,"g","overaxes-above"),x.xlines=v.select(".xlines-"+y),x.ylines=v.select(".ylines-"+h),x.xaxislayer=v.select(".xaxislayer-"+y),x.yaxislayer=v.select(".yaxislayer-"+h)}m||(n(x.minorGridlayer,"g",x.xaxis._id),n(x.minorGridlayer,"g",x.yaxis._id),x.minorGridlayer.selectAll("g").map(function(L){return L[0]}).sort(s.idSort),n(x.gridlayer,"g",x.xaxis._id),n(x.gridlayer,"g",x.yaxis._id),x.gridlayer.selectAll("g").map(function(L){return L[0]}).sort(s.idSort)),x.xlines.style("fill","none").classed("crisp",!0),x.ylines.style("fill","none").classed("crisp",!0)}function c(f,x){if(f){var v={};for(var g in f.each(function(w){var u=w[0];k.select(this).remove(),p(u,x),v[u]=!0}),x._plots)for(var y=x._plots[g].overlays||[],h=0;h<y.length;h++){var m=y[h];v[m.id]&&m.plot.selectAll(".trace").remove()}}}function p(f,x){x._draggers.selectAll("g."+f).remove(),x._defs.select("#clip"+x._uid+f+"plot").remove()}R.name="cartesian",R.attr=["xaxis","yaxis"],R.idRoot=["x","y"],R.idRegex=t.idRegex,R.attrRegex=t.attrRegex,R.attributes=e(89502),R.layoutAttributes=e(13838),R.supplyLayoutDefaults=e(86763),R.transitionAxes=e(66847),R.finalizeSubplots=function(f,x){var v,g,y,h=x._subplots,m=h.xaxis,w=h.yaxis,u=h.cartesian,S=u.concat(h.gl2d||[]),_={},E={};for(v=0;v<S.length;v++){var L=S[v].split("y");_[L[0]]=1,E["y"+L[1]]=1}for(v=0;v<m.length;v++)_[g=m[v]]||(y=(f[s.id2name(g)]||{}).anchor,t.idRegex.y.test(y)||(y="y"),u.push(g+y),S.push(g+y),E[y]||(E[y]=1,l.pushUnique(w,y)));for(v=0;v<w.length;v++)E[y=w[v]]||(g=(f[s.id2name(y)]||{}).anchor,t.idRegex.x.test(g)||(g="x"),u.push(g+y),S.push(g+y),_[g]||(_[g]=1,l.pushUnique(m,g)));if(!S.length){for(var C in g="",y="",f)t.attrRegex.test(C)&&("x"===C.charAt(0)?(!g||+C.substr(5)<+g.substr(5))&&(g=C):(!y||+C.substr(5)<+y.substr(5))&&(y=C));g=g?s.name2id(g):"x",y=y?s.name2id(y):"y",m.push(g),w.push(y),u.push(g+y)}},R.plot=function(f,x,v,g){var y,h=f._fullLayout,m=h._subplots.cartesian,w=f.calcdata;if(!Array.isArray(x))for(x=[],y=0;y<w.length;y++)x.push(y);for(y=0;y<m.length;y++){for(var u,S=m[y],_=h._plots[S],E=[],L=0;L<w.length;L++){var C=w[L],P=C[0].trace;P.xaxis+P.yaxis===S&&((-1!==x.indexOf(P.index)||P.carpet)&&(u&&u[0].trace.xaxis+u[0].trace.yaxis===S&&-1!==["tonextx","tonexty","tonext"].indexOf(P.fill)&&-1===E.indexOf(u)&&E.push(u),E.push(C)),u=C)}i(f,_,E,v,g)}},R.clean=function(f,x,v,g){var y,h,m,w=g._plots||{},u=x._plots||{},S=g._subplots||{};if(g._hasOnlyLargeSploms&&!x._hasOnlyLargeSploms)for(m in w)(y=w[m]).plotgroup&&y.plotgroup.remove();var _=g._has&&g._has("gl"),E=x._has&&x._has("gl");if(_&&!E)for(m in w)(y=w[m])._scene&&y._scene.destroy();if(S.xaxis&&S.yaxis){var L=s.listIds({_fullLayout:g});for(h=0;h<L.length;h++){var C=L[h];x[s.id2name(C)]||g._infolayer.selectAll(".g-"+C+"title").remove()}}var P=g._has&&g._has("cartesian"),I=x._has&&x._has("cartesian");if(P&&!I)c(g._cartesianlayer.selectAll(".subplot"),g),g._defs.selectAll(".axesclip").remove(),delete g._axisConstraintGroups,delete g._axisMatchGroups;else if(S.cartesian)for(h=0;h<S.cartesian.length;h++){var U=S.cartesian[h];u[U]||(g._cartesianlayer.selectAll("."+U+",."+U+"-x,."+U+"-y").remove(),p(U,g))}},R.drawFramework=function(f){var x=f._fullLayout,v=function(y){var h,m,w,u,S,_,E=y._fullLayout,L=E._subplots.cartesian,C=L.length,P=[],I=[];for(h=0;h<C;h++){var H=(S=(u=E._plots[w=L[h]]).xaxis)._mainAxis._id+(_=u.yaxis)._mainAxis._id,F=E._plots[H];u.overlays=[],H!==w&&F?(u.mainplot=H,u.mainplotinfo=F,I.push(w)):(u.mainplot=void 0,u.mainplotinfo=void 0,P.push(w))}for(h=0;h<I.length;h++)(u=E._plots[w=I[h]]).mainplotinfo.overlays.push(u);var N=P.concat(I),B=new Array(C);for(h=0;h<C;h++){var j=[w=N[h],(S=(u=E._plots[w]).xaxis).layer,(_=u.yaxis).layer,S.overlaying||"",_.overlaying||""];for(m=0;m<u.overlays.length;m++)j.push(u.overlays[m].id);B[h]=j}return B}(f),g=x._cartesianlayer.selectAll(".subplot").data(v,String);g.enter().append("g").attr("class",function(y){return"subplot "+y[0]}),g.order(),g.exit().call(c,x),g.each(function(y){var h=y[0],m=x._plots[h];m.plotgroup=k.select(this),a(f,m),m.draglayer=r(x._draggers,"g",h)})},R.rangePlot=function(f,x,v){a(f,x),i(f,x,v),T.style(f)},R.toSVG=function(f){var x=f._fullLayout._glimages,v=k.select(f).selectAll(".svg-container");v.filter(function(g,y){return y===v.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var g=this,y=g.toDataURL("image/png");x.append("svg:image").attr({xmlns:o.svg,"xlink:href":y,preserveAspectRatio:"none",x:0,y:0,width:g.style.width,height:g.style.height})})},R.updateFx=e(4305).updateFx},13838:function($,R,e){"use strict";var k=e(41940),A=e(22399),l=e(79952).P,T=e(1426).extendFlat,b=e(44467).templatedArray,d=e(12663).descriptionWithDates,s=e(50606).ONEDAY,t=e(85555),o=t.HOUR_PATTERN,r=t.WEEKDAY_PATTERN,n={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},i=T({},n,{values:n.values.slice().concat(["sync"])});function a(S){return{valType:"integer",min:0,dflt:S?5:0,editType:"ticks"}}var c={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},p={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},f={valType:"data_array",editType:"ticks"},x={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function v(S){var _={valType:"number",min:0,editType:"ticks"};return S||(_.dflt=5),_}function g(S){var _={valType:"number",min:0,editType:"ticks"};return S||(_.dflt=1),_}var y={valType:"color",dflt:A.defaultLine,editType:"ticks"},h={valType:"color",dflt:A.lightLine,editType:"ticks"};function m(S){var _={valType:"number",min:0,editType:"ticks"};return S||(_.dflt=1),_}var w=T({},l,{editType:"ticks"}),u={valType:"boolean",editType:"ticks"};$.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:A.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:k({editType:"ticks"}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},scaleanchor:{valType:"enumerated",values:[t.idRegex.x.toString(),t.idRegex.y.toString()],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[t.idRegex.x.toString(),t.idRegex.y.toString()],editType:"calc"},rangebreaks:b("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:[r,o,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:s},editType:"calc"}),tickmode:i,nticks:a(),tick0:c,dtick:p,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:f,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:v(),tickwidth:g(),tickcolor:y,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:T({},l,{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:k({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:d("tick label")},tickformatstops:b("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:d("hover text")},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:A.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:u,gridcolor:h,gridwidth:m(),griddash:w,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:A.defaultLine,editType:"ticks"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:A.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",t.idRegex.x.toString(),t.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",t.idRegex.x.toString(),t.idRegex.y.toString()],editType:"plot"},minor:{tickmode:n,nticks:a("minor"),tick0:c,dtick:p,tickvals:f,ticks:x,ticklen:v("minor"),tickwidth:g("minor"),tickcolor:y,gridcolor:h,gridwidth:m("minor"),griddash:w,showgrid:u,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:k({editType:"ticks"})}}},86763:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(23469).isUnifiedHover,T=e(98212),b=e(44467),d=e(10820),s=e(13838),t=e(951),o=e(71453),r=e(99082),n=e(52830),i=e(41675),a=i.id2name,c=i.name2id,p=e(85555).AX_ID_PATTERN,f=e(73972),x=f.traceIs,v=f.getComponentMethod;function g(y,h,m){Array.isArray(y[h])?y[h].push(m):y[h]=[m]}$.exports=function(y,h,m){var w,u,S=h.autotypenumbers,_={},E={},L={},C={},P={},I={},U={},z={},H={},F={};for(w=0;w<m.length;w++){var N=m[w];if(x(N,"cartesian")||x(N,"gl2d")){var B,j;if(N.xaxis)B=a(N.xaxis),g(_,B,N);else if(N.xaxes)for(u=0;u<N.xaxes.length;u++)g(_,a(N.xaxes[u]),N);if(N.yaxis)j=a(N.yaxis),g(_,j,N);else if(N.yaxes)for(u=0;u<N.yaxes.length;u++)g(_,a(N.yaxes[u]),N);"funnel"===N.type?"h"===N.orientation?(B&&(E[B]=!0),j&&(U[j]=!0)):j&&(L[j]=!0):"image"===N.type?(j&&(z[j]=!0),B&&(z[B]=!0)):(j&&(P[j]=!0,I[j]=!0),x(N,"carpet")&&("carpet"!==N.type||N._cheater)||B&&(C[B]=!0)),"carpet"===N.type&&N._cheater&&B&&(E[B]=!0),x(N,"2dMap")&&(H[B]=!0,H[j]=!0),x(N,"oriented")&&(F["h"===N.orientation?j:B]=!0)}}var J=h._subplots,G=J.xaxis,V=J.yaxis,W=k.simpleMap(G,a),X=k.simpleMap(V,a),K=W.concat(X),re=A.background;G.length&&V.length&&(re=k.coerce(y,h,d,"plot_bgcolor"));var ee,ie,oe,ce,me,de=A.combine(re,h.paper_bgcolor);function he(){me._traceIndices=(_[ee]||[]).map(function(Ct){return Ct._expandedIndex}),me._annIndices=[],me._shapeIndices=[],me._selectionIndices=[],me._imgIndices=[],me._subplotsWith=[],me._counterAxes=[],me._name=me._attr=ee,me._id=ie}function ve(Lt,Ct){return k.coerce(ce,me,s,Lt,Ct)}function Pe(Lt,Ct){return k.coerce2(ce,me,s,Lt,Ct)}function xe(Lt){return"x"===Lt?V:G}function ke(Lt,Ct){for(var It="x"===Lt?W:X,Ut=[],Rt=0;Rt<It.length;Rt++){var Ge=It[Rt];Ge===Ct||(y[Ge]||{}).overlaying||Ut.push(c(Ge))}return Ut}var Ae={x:xe("x"),y:xe("y")},Te=Ae.x.concat(Ae.y),Q={},se=[];function fe(){var Lt=ce.matches;p.test(Lt)&&-1===Te.indexOf(Lt)&&(Q[Lt]=ce.type,se=Object.keys(Q))}var ye=T(y,h),Me=l(ye);for(w=0;w<K.length;w++){ie=c(ee=K[w]),oe=ee.charAt(0),k.isPlainObject(y[ee])||(y[ee]={}),ce=y[ee],me=b.newContainer(h,ee,oe+"axis"),he();var Re={hasMinor:!0,letter:oe,font:h.font,outerTicks:H[ee],showGrid:!F[ee],data:_[ee]||[],bgColor:de,calendar:h.calendar,automargin:!0,visibleDflt:"x"===oe&&!C[ee]&&E[ee]||"y"===oe&&!P[ee]&&L[ee],reverseDflt:"y"===oe&&(!I[ee]&&U[ee]||z[ee]),autotypenumbersDflt:S,splomStash:((h._splomAxes||{})[oe]||{})[ie]};ve("uirevision",h.uirevision),t(ce,me,ve,Re),o(ce,me,ve,Re,h);var le=Me&&oe===ye.charAt(0),ge=Pe("spikecolor",Me?me.color:void 0),_e=Pe("spikethickness",Me?1.5:void 0),Fe=Pe("spikedash",Me?"dot":void 0),Ve=Pe("spikemode",Me?"across":void 0),He=Pe("spikesnap");ve("showspikes",!!(le||ge||_e||Fe||Ve||He))||(delete me.spikecolor,delete me.spikethickness,delete me.spikedash,delete me.spikemode,delete me.spikesnap);var nt=a(ce.overlaying),tt=[0,1];if(void 0!==h[nt]){var ot=a(h[nt].anchor);void 0!==h[ot]&&(tt=h[ot].domain)}n(ce,me,ve,{letter:oe,counterAxes:Ae[oe],overlayableAxes:ke(oe,ee),grid:h.grid,overlayingDomain:tt}),ve("title.standoff"),fe(),me._input=ce}for(w=0;w<se.length;){ie=se[w++],oe=(ee=a(ie)).charAt(0),k.isPlainObject(y[ee])||(y[ee]={}),ce=y[ee],me=b.newContainer(h,ee,oe+"axis"),he();var dt={letter:oe,font:h.font,outerTicks:H[ee],showGrid:!F[ee],data:[],bgColor:de,calendar:h.calendar,automargin:!0,visibleDflt:!1,reverseDflt:!1,autotypenumbersDflt:S,splomStash:((h._splomAxes||{})[oe]||{})[ie]};ve("uirevision",h.uirevision),me.type=Q[ie]||"linear",o(ce,me,ve,dt,h),n(ce,me,ve,{letter:oe,counterAxes:Ae[oe],overlayableAxes:ke(oe,ee),grid:h.grid}),ve("fixedrange"),fe(),me._input=ce}var kt=v("rangeslider","handleDefaults"),mt=v("rangeselector","handleDefaults");for(w=0;w<W.length;w++)ce=y[ee=W[w]],me=h[ee],kt(y,h,ee),"date"===me.type&&mt(ce,me,h,X,me.calendar),ve("fixedrange");for(w=0;w<X.length;w++){ce=y[ee=X[w]];var wt=h[a((me=h[ee]).anchor)];ve("fixedrange",v("rangeslider","isVisible")(wt))}r.handleDefaults(y,h,{axIds:Te.concat(se).sort(i.idSort),axHasImage:z})}},92128:function($,R,e){"use strict";var k=e(84267).mix,A=e(22399),l=e(71828);$.exports=function(T,b,d,s){var t=(s=s||{}).dfltColor;function o(y,h){return l.coerce2(T,b,s.attributes,y,h)}var r=o("linecolor",t),n=o("linewidth");d("showline",s.showLine||!!r||!!n)||(delete b.linecolor,delete b.linewidth);var i=o("gridcolor",k(t,s.bgColor,s.blend||A.lightFraction).toRgbString()),a=o("gridwidth"),c=o("griddash");if(d("showgrid",s.showGrid||!!i||!!a||!!c)||(delete b.gridcolor,delete b.gridwidth,delete b.griddash),s.hasMinor){var p=o("minor.gridcolor",k(b.gridcolor,s.bgColor,67).toRgbString()),f=o("minor.gridwidth",b.gridwidth||1),x=o("minor.griddash",b.griddash||"solid");d("minor.showgrid",!!p||!!f||!!x)||(delete b.minor.gridcolor,delete b.minor.gridwidth,delete b.minor.griddash)}if(!s.noZeroLine){var v=o("zerolinecolor",t),g=o("zerolinewidth");d("zeroline",s.showGrid||!!v||!!g)||(delete b.zerolinecolor,delete b.zerolinewidth)}}},52830:function($,R,e){"use strict";var k=e(92770),A=e(71828);$.exports=function(l,T,b,d){var s,t,o,r,n,i,a=d.counterAxes||[],c=d.overlayableAxes||[],p=d.letter,f=d.grid,x=d.overlayingDomain;f&&(s=f._anchors[T._id],(t=f._domains[p][f._axisMap[T._id]])&&(o=f[p+"side"].split(" ")[0],r=f.domain[p]["right"===o||"top"===o?1:0])),t=t||[0,1],s=s||(k(l.position)?"free":a[0]||"free"),o=o||("x"===p?"bottom":"left"),r=r||0,n=0,i=!1;var v=A.coerce(l,T,{anchor:{valType:"enumerated",values:["free"].concat(a),dflt:s}},"anchor"),g=A.coerce(l,T,{side:{valType:"enumerated",values:"x"===p?["bottom","top"]:["left","right"],dflt:o}},"side");"free"===v&&("y"===p&&(b("autoshift")&&(r="left"===g?x[0]:x[1],i=!T.automargin||T.automargin,n="left"===g?-3:3),b("shift",n)),b("position",r)),b("automargin",i);var y=!1;if(c.length&&(y=A.coerce(l,T,{overlaying:{valType:"enumerated",values:[!1].concat(c),dflt:!1}},"overlaying")),!y){var h=b("domain",t);h[0]>h[1]-.000244140625&&(T.domain=t),A.noneOrAll(l.domain,T.domain,t),"sync"===T.tickmode&&(T.tickmode="auto")}return b("layer"),T}},89426:function($,R,e){"use strict";var k=e(59652);$.exports=function(A,l,T,b,d){d||(d={});var s=d.tickSuffixDflt,t=k(A);T("tickprefix")&&T("showtickprefix",t),T("ticksuffix",s)&&T("showticksuffix",t)}},42449:function($,R,e){"use strict";var k=e(18783).FROM_BL;$.exports=function(A,l,T){void 0===T&&(T=k[A.constraintoward||"center"]);var b=[A.r2l(A.range[0]),A.r2l(A.range[1])],d=b[0]+(b[1]-b[0])*T;A.range=A._input.range=[A.l2r(d+(b[0]-d)*l),A.l2r(d+(b[1]-d)*l)],A.setScale()}},21994:function($,R,e){"use strict";var k=e(39898),A=e(84096).g0,l=e(71828),T=l.numberFormat,b=e(92770),d=l.cleanNumber,s=l.ms2DateTime,t=l.dateTime2ms,o=l.ensureNumber,r=l.isArrayOrTypedArray,n=e(50606),i=n.FP_SAFE,a=n.BADNUM,c=n.LOG_CLIP,p=n.ONEWEEK,f=n.ONEDAY,x=n.ONEHOUR,v=n.ONEMIN,g=n.ONESEC,y=e(41675),h=e(85555),m=h.HOUR_PATTERN,w=h.WEEKDAY_PATTERN;function u(_){return Math.pow(10,_)}function S(_){return null!=_}$.exports=function(_,E){E=E||{};var L=_._id||"x",C=L.charAt(0);function P(K,re){if(K>0)return Math.log(K)/Math.LN10;if(K<=0&&re&&_.range&&2===_.range.length){var ee=_.range[0],ie=_.range[1];return.5*(ee+ie-2*c*Math.abs(ee-ie))}return a}function I(K,re,ee,ie){if((ie||{}).msUTC&&b(K))return+K;var oe=t(K,ee||_.calendar);if(oe===a){if(!b(K))return a;K=+K;var ce=Math.floor(10*l.mod(K+.05,1)),me=Math.round(K-ce/10);oe=t(new Date(me))+ce/10}return oe}function U(K,re,ee){return s(K,re,ee||_.calendar)}function z(K){return _._categories[Math.round(K)]}function H(K){if(S(K)){if(void 0===_._categoriesMap&&(_._categoriesMap={}),void 0!==_._categoriesMap[K])return _._categoriesMap[K];_._categories.push("number"==typeof K?String(K):K);var re=_._categories.length-1;return _._categoriesMap[K]=re,re}return a}function F(K){if(_._categoriesMap)return _._categoriesMap[K]}function N(K){var re=F(K);return void 0!==re?re:b(K)?+K:void 0}function B(K){return b(K)?+K:F(K)}function j(K,re,ee){return k.round(ee+re*K,2)}function J(K,re,ee){return(K-ee)/re}var G=function(K){return b(K)?j(K,_._m,_._b):a},V=function(K){return J(K,_._m,_._b)};if(_.rangebreaks){var W="y"===C;G=function(K){if(!b(K))return a;var re=_._rangebreaks.length;if(!re)return j(K,_._m,_._b);var ee=W;_.range[0]>_.range[1]&&(ee=!ee);for(var ie=ee?-1:1,oe=ie*K,ce=0,me=0;me<re;me++){var de=ie*_._rangebreaks[me].min,he=ie*_._rangebreaks[me].max;if(oe<de)break;if(!(oe>he)){ce=oe<(de+he)/2?me:me+1;break}ce=me+1}var ve=_._B[ce]||0;return isFinite(ve)?j(K,_._m2,ve):0},V=function(K){var re=_._rangebreaks.length;if(!re)return J(K,_._m,_._b);for(var ee=0,ie=0;ie<re&&!(K<_._rangebreaks[ie].pmin);ie++)K>_._rangebreaks[ie].pmax&&(ee=ie+1);return J(K,_._m2,_._B[ee])}}_.c2l="log"===_.type?P:o,_.l2c="log"===_.type?u:o,_.l2p=G,_.p2l=V,_.c2p="log"===_.type?function(K,re){return G(P(K,re))}:G,_.p2c="log"===_.type?function(K){return u(V(K))}:V,-1!==["linear","-"].indexOf(_.type)?(_.d2r=_.r2d=_.d2c=_.r2c=_.d2l=_.r2l=d,_.c2d=_.c2r=_.l2d=_.l2r=o,_.d2p=_.r2p=function(K){return _.l2p(d(K))},_.p2d=_.p2r=V,_.cleanPos=o):"log"===_.type?(_.d2r=_.d2l=function(K,re){return P(d(K),re)},_.r2d=_.r2c=function(K){return u(d(K))},_.d2c=_.r2l=d,_.c2d=_.l2r=o,_.c2r=P,_.l2d=u,_.d2p=function(K,re){return _.l2p(_.d2r(K,re))},_.p2d=function(K){return u(V(K))},_.r2p=function(K){return _.l2p(d(K))},_.p2r=V,_.cleanPos=o):"date"===_.type?(_.d2r=_.r2d=l.identity,_.d2c=_.r2c=_.d2l=_.r2l=I,_.c2d=_.c2r=_.l2d=_.l2r=U,_.d2p=_.r2p=function(K,re,ee){return _.l2p(I(K,0,ee))},_.p2d=_.p2r=function(K,re,ee){return U(V(K),re,ee)},_.cleanPos=function(K){return l.cleanDate(K,a,_.calendar)}):"category"===_.type?(_.d2c=_.d2l=H,_.r2d=_.c2d=_.l2d=z,_.d2r=_.d2l_noadd=N,_.r2c=function(K){var re=B(K);return void 0!==re?re:_.fraction2r(.5)},_.l2r=_.c2r=o,_.r2l=B,_.d2p=function(K){return _.l2p(_.r2c(K))},_.p2d=function(K){return z(V(K))},_.r2p=_.d2p,_.p2r=V,_.cleanPos=function(K){return"string"==typeof K&&""!==K?K:o(K)}):"multicategory"===_.type&&(_.r2d=_.c2d=_.l2d=z,_.d2r=_.d2l_noadd=N,_.r2c=function(K){var re=N(K);return void 0!==re?re:_.fraction2r(.5)},_.r2c_just_indices=F,_.l2r=_.c2r=o,_.r2l=N,_.d2p=function(K){return _.l2p(_.r2c(K))},_.p2d=function(K){return z(V(K))},_.r2p=_.d2p,_.p2r=V,_.cleanPos=function(K){return Array.isArray(K)||"string"==typeof K&&""!==K?K:o(K)},_.setupMultiCategory=function(K){var re,ee,ie=_._traceIndices,oe=_._matchGroup;if(oe&&0===_._categories.length)for(var ce in oe)if(ce!==L){var me=E[y.id2name(ce)];ie=ie.concat(me._traceIndices)}var de=[[0,{}],[0,{}]],he=[];for(re=0;re<ie.length;re++){var ve=K[ie[re]];if(C in ve){var Pe=ve[C],xe=ve._length||l.minRowLength(Pe);if(r(Pe[0])&&r(Pe[1]))for(ee=0;ee<xe;ee++){var ke=Pe[0][ee],Ae=Pe[1][ee];S(ke)&&S(Ae)&&(he.push([ke,Ae]),ke in de[0][1]||(de[0][1][ke]=de[0][0]++),Ae in de[1][1]||(de[1][1][Ae]=de[1][0]++))}}}for(he.sort(function(Te,Q){var se=de[0][1],fe=se[Te[0]]-se[Q[0]];if(fe)return fe;var ye=de[1][1];return ye[Te[1]]-ye[Q[1]]}),re=0;re<he.length;re++)H(he[re])}),_.fraction2r=function(K){var re=_.r2l(_.range[0]),ee=_.r2l(_.range[1]);return _.l2r(re+K*(ee-re))},_.r2fraction=function(K){var re=_.r2l(_.range[0]),ee=_.r2l(_.range[1]);return(_.r2l(K)-re)/(ee-re)},_.cleanRange=function(K,re){re||(re={}),K||(K="range");var ee,ie,oe=l.nestedProperty(_,K).get();if(ie=(ie="date"===_.type?l.dfltRange(_.calendar):"y"===C?h.DFLTRANGEY:"realaxis"===_._name?[0,1]:re.dfltRange||h.DFLTRANGEX).slice(),"tozero"!==_.rangemode&&"nonnegative"!==_.rangemode||(ie[0]=0),oe&&2===oe.length)for("date"!==_.type||_.autorange||(oe[0]=l.cleanDate(oe[0],a,_.calendar),oe[1]=l.cleanDate(oe[1],a,_.calendar)),ee=0;ee<2;ee++)if("date"===_.type){if(!l.isDateTime(oe[ee],_.calendar)){_[K]=ie;break}if(_.r2l(oe[0])===_.r2l(oe[1])){var ce=l.constrain(_.r2l(oe[0]),l.MIN_MS+1e3,l.MAX_MS-1e3);oe[0]=_.l2r(ce-1e3),oe[1]=_.l2r(ce+1e3);break}}else{if(!b(oe[ee])){if(!b(oe[1-ee])){_[K]=ie;break}oe[ee]=oe[1-ee]*(ee?10:.1)}if(oe[ee]<-i?oe[ee]=-i:oe[ee]>i&&(oe[ee]=i),oe[0]===oe[1]){var me=Math.max(1,Math.abs(1e-6*oe[0]));oe[0]-=me,oe[1]+=me}}else l.nestedProperty(_,K).set(ie)},_.setScale=function(K){var re=E._size;if(_.overlaying){var ee=y.getFromId({_fullLayout:E},_.overlaying);_.domain=ee.domain}var ie=K&&_._r?"_r":"range",oe=_.calendar;_.cleanRange(ie);var ce,me,de=_.r2l(_[ie][0],oe),he=_.r2l(_[ie][1],oe),ve="y"===C;if(ve?(_._offset=re.t+(1-_.domain[1])*re.h,_._length=re.h*(_.domain[1]-_.domain[0]),_._m=_._length/(de-he),_._b=-_._m*he):(_._offset=re.l+_.domain[0]*re.w,_._length=re.w*(_.domain[1]-_.domain[0]),_._m=_._length/(he-de),_._b=-_._m*de),_._rangebreaks=[],_._lBreaks=0,_._m2=0,_._B=[],_.rangebreaks&&(_._rangebreaks=_.locateBreaks(Math.min(de,he),Math.max(de,he)),_._rangebreaks.length)){for(ce=0;ce<_._rangebreaks.length;ce++)me=_._rangebreaks[ce],_._lBreaks+=Math.abs(me.max-me.min);var Pe=ve;de>he&&(Pe=!Pe),Pe&&_._rangebreaks.reverse();var xe=Pe?-1:1;for(_._m2=xe*_._length/(Math.abs(he-de)-_._lBreaks),_._B.push(-_._m2*(ve?he:de)),ce=0;ce<_._rangebreaks.length;ce++)_._B.push(_._B[_._B.length-1]-xe*_._m2*((me=_._rangebreaks[ce]).max-me.min));for(ce=0;ce<_._rangebreaks.length;ce++)(me=_._rangebreaks[ce]).pmin=G(me.min),me.pmax=G(me.max)}if(!isFinite(_._m)||!isFinite(_._b)||_._length<0)throw E._replotting=!1,new Error("Something went wrong with axis scaling")},_.maskBreaks=function(K){var re,ee,ie,oe,ce,me=_.rangebreaks||[];me._cachedPatterns||(me._cachedPatterns=me.map(function(ke){return ke.enabled&&ke.bounds?l.simpleMap(ke.bounds,ke.pattern?d:_.d2c):null})),me._cachedValues||(me._cachedValues=me.map(function(ke){return ke.enabled&&ke.values?l.simpleMap(ke.values,_.d2c).sort(l.sorterAsc):null}));for(var de=0;de<me.length;de++){var he=me[de];if(he.enabled)if(he.bounds){switch(ee=(re=me._cachedPatterns[de])[0],ie=re[1],he.pattern){case w:oe=(ce=new Date(K)).getUTCDay(),ee>ie&&(ie+=7,oe<ee&&(oe+=7));break;case m:oe=(ce=new Date(K)).getUTCHours()+(ce.getUTCMinutes()/60+ce.getUTCSeconds()/3600+ce.getUTCMilliseconds()/36e5),ee>ie&&(ie+=24,oe<ee&&(oe+=24));break;case"":oe=K}if(oe>=ee&&oe<ie)return a}else for(var Pe=me._cachedValues[de],xe=0;xe<Pe.length;xe++)if(ie=(ee=Pe[xe])+he.dvalue,K>=ee&&K<ie)return a}return K},_.locateBreaks=function(K,re){var ee,ie,oe,ce,me=[];if(!_.rangebreaks)return me;var de=_.rangebreaks.slice().sort(function(ye,Me){return ye.pattern===w&&Me.pattern===m?-1:Me.pattern===w&&ye.pattern===m?1:0}),he=function(ye,Me){if((ye=l.constrain(ye,K,re))!==(Me=l.constrain(Me,K,re))){for(var Ie=!0,Ce=0;Ce<me.length;Ce++){var Re=me[Ce];ye<Re.max&&Me>=Re.min&&(ye<Re.min&&(Re.min=ye),Me>Re.max&&(Re.max=Me),Ie=!1)}Ie&&me.push({min:ye,max:Me})}};for(ee=0;ee<de.length;ee++){var ve=de[ee];if(ve.enabled)if(ve.bounds){var Pe=K,xe=re;ve.pattern&&(Pe=Math.floor(Pe)),oe=(ie=l.simpleMap(ve.bounds,ve.pattern?d:_.r2l))[0],ce=ie[1];var ke,Ae,Te=new Date(Pe);switch(ve.pattern){case w:Ae=p,ke=(ce-oe+(ce<oe?7:0))*f,Pe+=oe*f-(Te.getUTCDay()*f+Te.getUTCHours()*x+Te.getUTCMinutes()*v+Te.getUTCSeconds()*g+Te.getUTCMilliseconds());break;case m:Ae=f,ke=(ce-oe+(ce<oe?24:0))*x,Pe+=oe*x-(Te.getUTCHours()*x+Te.getUTCMinutes()*v+Te.getUTCSeconds()*g+Te.getUTCMilliseconds());break;default:Pe=Math.min(ie[0],ie[1]),ke=Ae=(xe=Math.max(ie[0],ie[1]))-Pe}for(var Q=Pe;Q<xe;Q+=Ae)he(Q,Q+ke)}else for(var se=l.simpleMap(ve.values,_.d2c),fe=0;fe<se.length;fe++)he(oe=se[fe],ce=oe+ve.dvalue)}return me.sort(function(ye,Me){return ye.min-Me.min}),me},_.makeCalcdata=function(K,re,ee){var ie,oe,ce,me,de=_.type,he="date"===de&&K[re+"calendar"];if(re in K){if(ie=K[re],me=K._length||l.minRowLength(ie),l.isTypedArray(ie)&&("linear"===de||"log"===de)){if(me===ie.length)return ie;if(ie.subarray)return ie.subarray(0,me)}if("multicategory"===de)return function(xe,ke){for(var Ae=new Array(ke),Te=0;Te<ke;Te++)Ae[Te]=F([(xe[0]||[])[Te],(xe[1]||[])[Te]]);return Ae}(ie,me);for(oe=new Array(me),ce=0;ce<me;ce++)oe[ce]=_.d2c(ie[ce],0,he,ee)}else{var ve=re+"0"in K?_.d2c(K[re+"0"],0,he):0,Pe=K["d"+re]?Number(K["d"+re]):1;for(ie=K[{x:"y",y:"x"}[re]],me=K._length||ie.length,oe=new Array(me),ce=0;ce<me;ce++)oe[ce]=ve+ce*Pe}if(_.rangebreaks)for(ce=0;ce<me;ce++)oe[ce]=_.maskBreaks(oe[ce]);return oe},_.isValidRange=function(K){return Array.isArray(K)&&2===K.length&&b(_.r2l(K[0]))&&b(_.r2l(K[1]))},_.isPtWithinRange=function(K,re){var ee=_.c2l(K[C],null,re),ie=_.r2l(_.range[0]),oe=_.r2l(_.range[1]);return ie<oe?ie<=ee&&ee<=oe:oe<=ee&&ee<=ie},_._emptyCategories=function(){_._categories=[],_._categoriesMap={}},_.clearCalc=function(){var K=_._matchGroup;if(K){var re=null,ee=null;for(var ie in K){var oe=E[y.id2name(ie)];if(oe._categories){re=oe._categories,ee=oe._categoriesMap;break}}re&&ee?(_._categories=re,_._categoriesMap=ee):_._emptyCategories()}else _._emptyCategories();if(_._initialCategories)for(var ce=0;ce<_._initialCategories.length;ce++)H(_._initialCategories[ce])},_.sortByInitialCategories=function(){var K=[];if(_._emptyCategories(),_._initialCategories)for(var re=0;re<_._initialCategories.length;re++)H(_._initialCategories[re]);K=K.concat(_._traceIndices);var ee=_._matchGroup;for(var ie in ee)if(L!==ie){var oe=E[y.id2name(ie)];oe._categories=_._categories,oe._categoriesMap=_._categoriesMap,K=K.concat(oe._traceIndices)}return K};var X=E._d3locale;"date"===_.type&&(_._dateFormat=X?X.timeFormat:A,_._extraFormat=E._extraFormat),_._separators=E.separators,_._numFormat=X?X.numberFormat:T,delete _._minDtick,delete _._forceTick0}},59652:function($){"use strict";$.exports=function(R){var e=["showexponent","showtickprefix","showticksuffix"].filter(function(k){return void 0!==R[k]});if(e.every(function(k){return R[k]===R[e[0]]})||1===e.length)return R[e[0]]}},96115:function($,R,e){"use strict";var k=e(71828),A=e(7901).contrast,l=e(13838),T=e(59652),b=e(85501);function d(s,t){function o(r,n){return k.coerce(s,t,l.tickformatstops,r,n)}o("enabled")&&(o("dtickrange"),o("value"))}$.exports=function(s,t,o,r,n){n||(n={});var i=T(s);if(o("showticklabels")){var a=n.font||{},c=t.color,p=-1!==(t.ticklabelposition||"").indexOf("inside")?A(n.bgColor):c&&c!==l.color.dflt?c:a.color;if(k.coerceFont(o,"tickfont",{family:a.family,size:a.size,color:p}),n.noTicklabelstep||"multicategory"===r||"log"===r||o("ticklabelstep"),n.noAng||o("tickangle"),"category"!==r){var f=o("tickformat");b(s,t,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:d}),t.tickformatstops.length||delete t.tickformatstops,n.noExp||f||"date"===r||(o("showexponent",i),o("exponentformat"),o("minexponent"),o("separatethousands"))}}}},38701:function($,R,e){"use strict";var k=e(71828),A=e(13838);$.exports=function(l,T,b,d){var s=d.isMinor,t=s?l.minor||{}:l,o=s?T.minor:T,r=s?A.minor:A,n=s?"minor.":"",i=k.coerce2(t,o,r,"ticklen",s?.6*(T.ticklen||5):void 0),a=k.coerce2(t,o,r,"tickwidth",s?T.tickwidth||1:void 0),c=k.coerce2(t,o,r,"tickcolor",(s?T.tickcolor:void 0)||o.color);b(n+"ticks",!s&&d.outerTicks||i||a||c?"outside":"")||(delete o.ticklen,delete o.tickwidth,delete o.tickcolor)}},26218:function($,R,e){"use strict";var k=e(66287),A=e(71828).isArrayOrTypedArray;$.exports=function(l,T,b,d,s){s||(s={});var t=s.isMinor,o=t?l.minor||{}:l,r=t?T.minor:T,n=t?"minor.":"";function i(v){var g=o[v];return void 0!==g?g:(r._template||{})[v]}var a=i("tick0"),c=i("dtick"),p=i("tickvals"),f=b(n+"tickmode",A(p)?"array":c?"linear":"auto");if("auto"===f||"sync"===f)b(n+"nticks");else if("linear"===f){var x=r.dtick=k.dtick(c,d);r.tick0=k.tick0(a,d,T.calendar,x)}else"multicategory"!==d&&(void 0===b(n+"tickvals")?r.tickmode="auto":t||b("ticktext"))}},66847:function($,R,e){"use strict";var k=e(39898),A=e(73972),l=e(71828),T=e(91424),b=e(89298);$.exports=function(d,s,t,o){var r=d._fullLayout;if(0!==s.length){var n,i,a,c;o&&(n=o());var p=k.ease(t.easing);return d._transitionData._interruptCallbacks.push(function(){return window.cancelAnimationFrame(c),c=null,function(){for(var v={},g=0;g<s.length;g++){var y=s[g],m=y.plotinfo.yaxis;y.xr0&&(v[y.plotinfo.xaxis._name+".range"]=y.xr0.slice()),y.yr0&&(v[m._name+".range"]=y.yr0.slice())}return A.call("relayout",d,v).then(function(){for(var w=0;w<s.length;w++)f(s[w].plotinfo)})}()}),i=Date.now(),c=window.requestAnimationFrame(function v(){a=Date.now();for(var g=Math.min(1,(a-i)/t.duration),y=p(g),h=0;h<s.length;h++)x(s[h],y);a-i>t.duration?(function(){for(var m={},w=0;w<s.length;w++){var u=s[w],_=u.plotinfo.yaxis;u.xr1&&(m[u.plotinfo.xaxis._name+".range"]=u.xr1.slice()),u.yr1&&(m[_._name+".range"]=u.yr1.slice())}n&&n(),A.call("relayout",d,m).then(function(){for(var E=0;E<s.length;E++)f(s[E].plotinfo)})}(),c=window.cancelAnimationFrame(v)):c=window.requestAnimationFrame(v)}),Promise.resolve()}function f(v){var g=v.xaxis,y=v.yaxis;r._defs.select("#"+v.clipId+"> rect").call(T.setTranslate,0,0).call(T.setScale,1,1),v.plot.call(T.setTranslate,g._offset,y._offset).call(T.setScale,1,1);var h=v.plot.selectAll(".scatterlayer .trace");h.selectAll(".point").call(T.setPointGroupScale,1,1),h.selectAll(".textpoint").call(T.setTextPointsScale,1,1),h.call(T.hideOutsideRangePoints,v)}function x(v,g){var y=v.plotinfo,h=y.xaxis,m=y.yaxis,w=h._length,u=m._length,S=!!v.xr1,_=!!v.yr1,E=[];if(S){var L=l.simpleMap(v.xr0,h.r2l),C=l.simpleMap(v.xr1,h.r2l),P=L[1]-L[0],I=C[1]-C[0];E[0]=(L[0]*(1-g)+g*C[0]-L[0])/(L[1]-L[0])*w,E[2]=w*(1-g+g*I/P),h.range[0]=h.l2r(L[0]*(1-g)+g*C[0]),h.range[1]=h.l2r(L[1]*(1-g)+g*C[1])}else E[0]=0,E[2]=w;if(_){var U=l.simpleMap(v.yr0,m.r2l),z=l.simpleMap(v.yr1,m.r2l),H=U[1]-U[0],F=z[1]-z[0];E[1]=(U[1]*(1-g)+g*z[1]-U[1])/(U[0]-U[1])*u,E[3]=u*(1-g+g*F/H),m.range[0]=h.l2r(U[0]*(1-g)+g*z[0]),m.range[1]=m.l2r(U[1]*(1-g)+g*z[1])}else E[1]=0,E[3]=u;b.drawOne(d,h,{skipTitle:!0}),b.drawOne(d,m,{skipTitle:!0}),b.redrawComponents(d,[h._id,m._id]);var N=S?w/E[2]:1,B=_?u/E[3]:1,W=h._offset-(S?E[0]/E[2]*w:0),X=m._offset-(_?E[1]/E[3]*u:0);y.clipRect.call(T.setTranslate,S?E[0]:0,_?E[1]:0).call(T.setScale,1/N,1/B),y.plot.call(T.setTranslate,W,X).call(T.setScale,N,B),T.setPointGroupScale(y.zoomScalePts,1/N,1/B),T.setTextPointsScale(y.zoomScaleTxt,1/N,1/B)}b.redrawComponents(d)}},951:function($,R,e){"use strict";var k=e(73972).traceIs,A=e(4322);function l(b){return{v:"x",h:"y"}[b.orientation||"v"]}function T(b,d){var s=l(b),t=k(b,"box-violin"),o=k(b._fullInput||{},"candlestick");return t&&!o&&d===s&&void 0===b[s]&&void 0===b[s+"0"]}$.exports=function(b,d,s,t){s("autotypenumbers",t.autotypenumbersDflt),"-"===s("type",(t.splomStash||{}).type)&&(function(o,r){if("-"===o.type){var n,i=o._id,a=i.charAt(0);-1!==i.indexOf("scene")&&(i=a);var c=function(m,w,u){for(var S=0;S<m.length;S++){var _=m[S];if("splom"===_.type&&_._length>0&&(_["_"+u+"axes"]||{})[w]||(_[u+"axis"]||u)===w&&(T(_,u)||(_[u]||[]).length||_[u+"0"]))return _}}(r,i,a);if(c)if("histogram"!==c.type||a!=={v:"y",h:"x"}[c.orientation||"v"]){var p=a+"calendar",f=c[p],x={noMultiCategory:!k(c,"cartesian")||k(c,"noMultiCategory")};if("box"===c.type&&c._hasPreCompStats&&a==={h:"x",v:"y"}[c.orientation||"v"]&&(x.noMultiCategory=!0),x.autotypenumbers=o.autotypenumbers,T(c,a)){var v=l(c),g=[];for(n=0;n<r.length;n++){var y=r[n];k(y,"box-violin")&&(y[a+"axis"]||a)===i&&(g.push(void 0!==y[v]?y[v][0]:void 0!==y.name?y.name:"text"),y[p]!==f&&(f=void 0))}o.type=A(g,f,x)}else if("splom"===c.type){var h=c.dimensions[c._axesDim[i]];h.visible&&(o.type=A(h.values,f,x))}else o.type=A(c[a]||[c[a+"0"]],f,x)}else o.type="linear"}}(d,t.data),"-"===d.type?d.type="linear":b.type=d.type)}},31137:function($,R,e){"use strict";var k=e(73972),A=e(71828);function l(s,t,o){var r,n,i,a=!1;if("data"===t.type)r=s._fullData[null!==t.traces?t.traces[0]:0];else{if("layout"!==t.type)return!1;r=s._fullLayout}return n=A.nestedProperty(r,t.prop).get(),(i=o[t.type]=o[t.type]||{}).hasOwnProperty(t.prop)&&i[t.prop]!==n&&(a=!0),i[t.prop]=n,{changed:a,value:n}}function T(s,t){var o=[],r=t[0],n={};if("string"==typeof r)n[r]=t[1];else{if(!A.isPlainObject(r))return o;n=r}return d(n,function(i,a,c){o.push({type:"layout",prop:i,value:c})},"",0),o}function b(s,t){var o,r,n,i,a=[];if(n=t[1],o=t[2],i={},"string"==typeof(r=t[0]))i[r]=n;else{if(!A.isPlainObject(r))return a;i=r,void 0===o&&(o=n)}return void 0===o&&(o=null),d(i,function(c,p,f){var x,v;if(Array.isArray(f)){v=f.slice();var g=Math.min(v.length,s.data.length);o&&(g=Math.min(g,o.length)),x=[];for(var y=0;y<g;y++)x[y]=o?o[y]:y}else v=f,x=o?o.slice():null;if(null===x)Array.isArray(v)&&(v=v[0]);else if(Array.isArray(x)){if(!Array.isArray(v)){var h=v;v=[];for(var m=0;m<x.length;m++)v[m]=h}v.length=Math.min(x.length,v.length)}a.push({type:"data",prop:c,traces:x,value:v})},"",0),a}function d(s,t,o,r){Object.keys(s).forEach(function(n){var i=s[n];if("_"!==n[0]){var a=o+(r>0?".":"")+n;A.isPlainObject(i)?d(i,t,a,r+1):t(a,n,i)}})}R.manageCommandObserver=function(s,t,o,r){var n={},i=!0;t&&t._commandObserver&&(n=t._commandObserver),n.cache||(n.cache={}),n.lookupTable={};var a=R.hasSimpleAPICommandBindings(s,o,n.lookupTable);if(t&&t._commandObserver){if(a)return n;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,n}if(a){l(s,a,n.cache),n.check=function(){if(i){var f=l(s,a,n.cache);return f.changed&&r&&void 0!==n.lookupTable[f.value]&&(n.disable(),Promise.resolve(r({value:f.value,type:a.type,prop:a.prop,traces:a.traces,index:n.lookupTable[f.value]})).then(n.enable,n.enable)),f.changed}};for(var c=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],p=0;p<c.length;p++)s._internalOn(c[p],n.check);n.remove=function(){for(var f=0;f<c.length;f++)s._removeInternalListener(c[f],n.check)}}else A.log("Unable to automatically bind plot updates to API command"),n.lookupTable={},n.remove=function(){};return n.disable=function(){i=!1},n.enable=function(){i=!0},t&&(t._commandObserver=n),n},R.hasSimpleAPICommandBindings=function(s,t,o){var r,n,i=t.length;for(r=0;r<i;r++){var a,c=t[r],p=c.method,f=c.args;if(Array.isArray(f)||(f=[]),!p)return!1;var x=R.computeAPICommandBindings(s,p,f);if(1!==x.length)return!1;if(n){if((a=x[0]).type!==n.type||a.prop!==n.prop)return!1;if(Array.isArray(n.traces)){if(!Array.isArray(a.traces))return!1;a.traces.sort();for(var v=0;v<n.traces.length;v++)if(n.traces[v]!==a.traces[v])return!1}else if(a.prop!==n.prop)return!1}else n=x[0],Array.isArray(n.traces)&&n.traces.sort();var g=(a=x[0]).value;if(Array.isArray(g)){if(1!==g.length)return!1;g=g[0]}o&&(o[g]=r)}return n},R.executeAPICommand=function(s,t,o){if("skip"===t)return Promise.resolve();var r=k.apiMethodRegistry[t],n=[s];Array.isArray(o)||(o=[]);for(var i=0;i<o.length;i++)n.push(o[i]);return r.apply(null,n).catch(function(a){return A.warn("API call to Plotly."+t+" rejected.",a),Promise.reject(a)})},R.computeAPICommandBindings=function(s,t,o){var r,i;switch(Array.isArray(o)||(o=[]),t){case"restyle":r=b(s,o);break;case"relayout":r=T(0,o);break;case"update":r=b(s,[o[0],o[2]]).concat(T(0,[o[1]]));break;case"animate":i=o,r=Array.isArray(i[0])&&1===i[0].length&&-1!==["string","number"].indexOf(typeof i[0][0])?[{type:"layout",prop:"_currentFrame",value:i[0][0].toString()}]:[];break;default:r=[]}return r}},27670:function($,R,e){"use strict";var k=e(1426).extendFlat;R.Y=function(A,l){l=l||{};var T={valType:"info_array",editType:(A=A||{}).editType,items:[{valType:"number",min:0,max:1,editType:A.editType},{valType:"number",min:0,max:1,editType:A.editType}],dflt:[0,1]},b={x:k({},T,{}),y:k({},T,{}),editType:A.editType};return A.noGridCell||(b.row={valType:"integer",min:0,dflt:0,editType:A.editType},b.column={valType:"integer",min:0,dflt:0,editType:A.editType}),b},R.c=function(A,l,T,b){var d=b&&b.x||[0,1],s=b&&b.y||[0,1],t=l.grid;if(t){var o=T("domain.column");void 0!==o&&(o<t.columns?d=t._domains.x[o]:delete A.domain.column);var r=T("domain.row");void 0!==r&&(r<t.rows?s=t._domains.y[r]:delete A.domain.row)}var n=T("domain.x",d),i=T("domain.y",s);n[0]<n[1]||(A.domain.x=d.slice()),i[0]<i[1]||(A.domain.y=s.slice())}},41940:function($){"use strict";$.exports=function(R){var e=R.editType,k=R.colorEditType;void 0===k&&(k=e);var A={family:{valType:"string",noBlank:!0,strict:!0,editType:e},size:{valType:"number",min:1,editType:e},color:{valType:"color",editType:k},editType:e};return R.autoSize&&(A.size.dflt="auto"),R.autoColor&&(A.color.dflt="auto"),R.arrayOk&&(A.family.arrayOk=!0,A.size.arrayOk=!0,A.color.arrayOk=!0),A}},31391:function($){"use strict";$.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}},78776:function($,R){"use strict";R.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"},R.axesNames=["lonaxis","lataxis"],R.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360},R.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180},R.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]}},R.clipPad=.001,R.precision=.1,R.landColor="#F0DC82",R.waterColor="#3399FF",R.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"},R.sphereSVG={type:"Sphere"},R.fillLayers={ocean:1,land:1,lakes:1},R.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1},R.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"],R.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"],R.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}},69082:function($,R,e){"use strict";var k=e(39898),A=e(27362),l=A.geoPath,T=A.geoDistance,b=e(65704),d=e(73972),s=e(71828),t=s.strTranslate,o=e(7901),r=e(91424),n=e(30211),i=e(74875),a=e(89298),c=e(71739).getAutoRange,p=e(28569),f=e(47322).prepSelect,x=e(47322).clearOutline,v=e(47322).selectOnClick,g=e(74455),y=e(78776),h=e(41327),m=e(90973),w=e(96892).zL;function u(E){this.id=E.id,this.graphDiv=E.graphDiv,this.container=E.container,this.topojsonURL=E.topojsonURL,this.isStatic=E.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var S=u.prototype;function _(E,L){var C=y.clipPad,P=E[0]+C,I=E[1]-C,U=L[0]+C,z=L[1]-C;P>0&&I<0&&(I+=360);var H=(I-P)/4;return{type:"Polygon",coordinates:[[[P,U],[P,z],[P+H,z],[P+2*H,z],[P+3*H,z],[I,z],[I,U],[I-H,U],[I-2*H,U],[I-3*H,U],[P,U]]]}}$.exports=function(E){return new u(E)},S.plot=function(E,L,C,P){var I=this;if(P)return I.update(E,L,!0);I._geoCalcData=E,I._fullLayout=L;var U=L[this.id],z=[],H=!1;for(var F in y.layerNameToAdjective)if("frame"!==F&&U["show"+F]){H=!0;break}for(var N=!1,B=0;B<E.length;B++){var j=E[0][0].trace;j._geo=I,j.locationmode&&(H=!0);var J=j.marker;if(J){var V=J.angleref;(J.angle||"north"===V||"previous"===V)&&(N=!0)}}if(this._hasMarkerAngles=N,H){var W=m.getTopojsonName(U);null!==I.topojson&&W===I.topojsonName||(I.topojsonName=W,void 0===PlotlyGeoAssets.topojson[I.topojsonName]&&z.push(I.fetchTopojson()))}z=z.concat(h.fetchTraceGeoData(E)),C.push(new Promise(function(X,K){Promise.all(z).then(function(){I.topojson=PlotlyGeoAssets.topojson[I.topojsonName],I.update(E,L),X()}).catch(K)}))},S.fetchTopojson=function(){var E=this,L=m.getTopojsonPath(E.topojsonURL,E.topojsonName);return new Promise(function(C,P){k.json(L,function(I,U){if(I)return P(404===I.status?new Error(["plotly.js could not find topojson file at",L+".","Make sure the *topojsonURL* plot config option","is set properly."].join(" ")):new Error(["unexpected error while fetching topojson file at",L].join(" ")));PlotlyGeoAssets.topojson[E.topojsonName]=U,C()})})},S.update=function(E,L,C){var P=L[this.id];this.hasChoropleth=!1;for(var I=0;I<E.length;I++){var U=E[I],z=U[0].trace;"choropleth"===z.type&&(this.hasChoropleth=!0),!0===z.visible&&z._length>0&&z._module.calcGeoJSON(U,L)}if(!C){if(this.updateProjection(E,L))return;this.viewInitial&&this.scope===P.scope||this.saveViewInitial(P)}this.scope=P.scope,this.updateBaseLayers(L,P),this.updateDims(L,P),this.updateFx(L,P),i.generalUpdatePerTraceModule(this.graphDiv,this,E,P);var H=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=H.selectAll(".point"),this.dataPoints.text=H.selectAll("text"),this.dataPaths.line=H.selectAll(".js-line");var F=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=F.selectAll("path"),this._render()},S.updateProjection=function(E,L){var C=this.graphDiv,P=L[this.id],I=L._size,U=P.domain,z=P.projection,H=P.lonaxis,F=P.lataxis,N=H._ax,B=F._ax,j=this.projection=function(Te){var Q=Te.projection,se=Q.type,fe=y.projNames[se];fe="geo"+s.titleCase(fe);for(var ye=(A[fe]||b[fe])(),Me=Te._isSatellite?180*Math.acos(1/Q.distance)/Math.PI:Te._isClipped?y.lonaxisSpan[se]/2:null,Ie=["center","rotate","parallels","clipExtent"],Ce=function(ge){return ge?ye:[]},Re=0;Re<Ie.length;Re++){var le=Ie[Re];"function"!=typeof ye[le]&&(ye[le]=Ce)}return ye.isLonLatOverEdges=function(ge){if(null===ye(ge))return!0;if(Me){var _e=ye.rotate();return T(ge,[-_e[0],-_e[1]])>Me*Math.PI/180}return!1},ye.getPath=function(){return l().projection(ye)},ye.getBounds=function(ge){return ye.getPath().bounds(ge)},ye.precision(y.precision),Te._isSatellite&&ye.tilt(Q.tilt).distance(Q.distance),Me&&ye.clipAngle(Me-y.clipPad),ye}(P),J=[[I.l+I.w*U.x[0],I.t+I.h*(1-U.y[1])],[I.l+I.w*U.x[1],I.t+I.h*(1-U.y[0])]],G=P.center||{},V=z.rotation||{},W=H.range||[],X=F.range||[];if(P.fitbounds){N._length=J[1][0]-J[0][0],B._length=J[1][1]-J[0][1],N.range=c(C,N),B.range=c(C,B);var K=(N.range[0]+N.range[1])/2,re=(B.range[0]+B.range[1])/2;if(P._isScoped)G={lon:K,lat:re};else if(P._isClipped){G={lon:K,lat:re},V={lon:K,lat:re,roll:V.roll};var ee=z.type,ie=y.lonaxisSpan[ee]/2||180,oe=y.lataxisSpan[ee]/2||90;W=[K-ie,K+ie],X=[re-oe,re+oe]}else G={lon:K,lat:re},V={lon:K,lat:V.lat,roll:V.roll}}j.center([G.lon-V.lon,G.lat-V.lat]).rotate([-V.lon,-V.lat,V.roll]).parallels(z.parallels);var ce=_(W,X);j.fitExtent(J,ce);var me=this.bounds=j.getBounds(ce),de=this.fitScale=j.scale(),he=j.translate();if(P.fitbounds){var ve=j.getBounds(_(N.range,B.range)),Pe=Math.min((me[1][0]-me[0][0])/(ve[1][0]-ve[0][0]),(me[1][1]-me[0][1])/(ve[1][1]-ve[0][1]));isFinite(Pe)?j.scale(Pe*de):s.warn("Something went wrong during"+this.id+"fitbounds computations.")}else j.scale(z.scale*de);var xe=this.midPt=[(me[0][0]+me[1][0])/2,(me[0][1]+me[1][1])/2];if(j.translate([he[0]+(xe[0]-he[0]),he[1]+(xe[1]-he[1])]).clipExtent(me),P._isAlbersUsa){var ke=j([G.lon,G.lat]),Ae=j.translate();j.translate([Ae[0]-(ke[0]-Ae[0]),Ae[1]-(ke[1]-Ae[1])])}},S.updateBaseLayers=function(E,L){var C=this,P=C.topojson,I=C.layers,U=C.basePaths;function z(j){return"lonaxis"===j||"lataxis"===j}function H(j){return!!y.lineLayers[j]}function F(j){return!!y.fillLayers[j]}var N=(this.hasChoropleth?y.layersForChoropleth:y.layers).filter(function(j){return H(j)||F(j)?L["show"+j]:!z(j)||L[j].showgrid}),B=C.framework.selectAll(".layer").data(N,String);B.exit().each(function(j){delete I[j],delete U[j],k.select(this).remove()}),B.enter().append("g").attr("class",function(j){return"layer "+j}).each(function(j){var J=I[j]=k.select(this);"bg"===j?C.bgRect=J.append("rect").style("pointer-events","all"):z(j)?U[j]=J.append("path").style("fill","none"):"backplot"===j?J.append("g").classed("choroplethlayer",!0):"frontplot"===j?J.append("g").classed("scatterlayer",!0):H(j)?U[j]=J.append("path").style("fill","none").style("stroke-miterlimit",2):F(j)&&(U[j]=J.append("path").style("stroke","none"))}),B.order(),B.each(function(j){var J=U[j],G=y.layerNameToAdjective[j];"frame"===j?J.datum(y.sphereSVG):H(j)||F(j)?J.datum(w(P,P.objects[j])):z(j)&&J.datum(function(V,W,X){var K,re,ee,ie=W[V],oe=y.scopeDefaults[W.scope];"lonaxis"===V?(K=oe.lonaxisRange,re=oe.lataxisRange,ee=function(Ae,Te){return[Ae,Te]}):"lataxis"===V&&(K=oe.lataxisRange,re=oe.lonaxisRange,ee=function(Ae,Te){return[Te,Ae]});var ce={type:"linear",range:[K[0],K[1]-1e-6],tick0:ie.tick0,dtick:ie.dtick};a.setConvert(ce,X);var me=a.calcTicks(ce);W.isScoped||"lonaxis"!==V||me.pop();for(var de=me.length,he=new Array(de),ve=0;ve<de;ve++)for(var Pe=me[ve].x,xe=he[ve]=[],ke=re[0];ke<re[1]+2.5;ke+=2.5)xe.push(ee(Pe,ke));return{type:"MultiLineString",coordinates:he}}(j,L,E)).call(o.stroke,L[j].gridcolor).call(r.dashLine,L[j].griddash,L[j].gridwidth),H(j)?J.call(o.stroke,L[G+"color"]).call(r.dashLine,"",L[G+"width"]):F(j)&&J.call(o.fill,L[G+"color"])})},S.updateDims=function(E,L){var C=this.bounds,P=(L.framewidth||0)/2,I=C[0][0]-P,U=C[0][1]-P,z=C[1][0]-I+P,H=C[1][1]-U+P;r.setRect(this.clipRect,I,U,z,H),this.bgRect.call(r.setRect,I,U,z,H).call(o.fill,L.bgcolor),this.xaxis._offset=I,this.xaxis._length=z,this.yaxis._offset=U,this.yaxis._length=H},S.updateFx=function(E,L){var C=this,P=C.graphDiv,I=C.bgRect,U=E.dragmode,z=E.clickmode;if(!C.isStatic){var H={element:C.bgRect.node(),gd:P,plotinfo:{id:C.id,xaxis:C.xaxis,yaxis:C.yaxis,fillRangeItems:function(N,B){B.isRect?(N.range={})[C.id]=[F([B.xmin,B.ymin]),F([B.xmax,B.ymax])]:(N.lassoPoints={})[C.id]=B.map(F)}},xaxes:[C.xaxis],yaxes:[C.yaxis],subplot:C.id,clickFn:function(N){2===N&&x(P)}};"pan"===U?(I.node().onmousedown=null,I.call(g(C,L)),I.on("dblclick.zoom",function(){var N=C.viewInitial,B={};for(var j in N)B[C.id+"."+j]=N[j];d.call("_guiRelayout",P,B),P.emit("plotly_doubleclick",null)}),P._context._scrollZoom.geo||I.on("wheel.zoom",null)):"select"!==U&&"lasso"!==U||(I.on(".zoom",null),H.prepFn=function(N,B,j){f(N,B,j,H,U)},p.init(H)),I.on("mousemove",function(){var N=C.projection.invert(s.getPositionFromD3Event());if(!N)return p.unhover(P,k.event);C.xaxis.p2c=function(){return N[0]},C.yaxis.p2c=function(){return N[1]},n.hover(P,k.event,C.id)}),I.on("mouseout",function(){P._dragging||p.unhover(P,k.event)}),I.on("click",function(){"select"!==U&&"lasso"!==U&&(z.indexOf("select")>-1&&v(k.event,P,[C.xaxis],[C.yaxis],C.id,H),z.indexOf("event")>-1&&n.click(P,k.event))})}function F(N){return C.projection.invert([N[0]+C.xaxis._offset,N[1]+C.yaxis._offset])}},S.makeFramework=function(){var E=this,L=E.graphDiv,C=L._fullLayout,P="clip"+C._uid+E.id;E.clipDef=C._clips.append("clipPath").attr("id",P),E.clipRect=E.clipDef.append("rect"),E.framework=k.select(E.container).append("g").attr("class","geo "+E.id).call(r.setClipUrl,P,L),E.project=function(I){var U=E.projection(I);return U?[U[0]-E.xaxis._offset,U[1]-E.yaxis._offset]:[null,null]},E.xaxis={_id:"x",c2p:function(I){return E.project(I)[0]}},E.yaxis={_id:"y",c2p:function(I){return E.project(I)[1]}},E.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},a.setConvert(E.mockAxis,C)},S.saveViewInitial=function(E){var C=E.center||{},P=E.projection,I=P.rotation||{};this.viewInitial={fitbounds:E.fitbounds,"projection.scale":P.scale},s.extendFlat(this.viewInitial,E._isScoped?{"center.lon":C.lon,"center.lat":C.lat}:E._isClipped?{"projection.rotation.lon":I.lon,"projection.rotation.lat":I.lat}:{"center.lon":C.lon,"center.lat":C.lat,"projection.rotation.lon":I.lon})},S.render=function(E){this._hasMarkerAngles&&E?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var E,L=this.projection,C=L.getPath();function P(U){var z=L(U.lonlat);return z?t(z[0],z[1]):null}function I(U){return L.isLonLatOverEdges(U.lonlat)?"none":null}for(E in this.basePaths)this.basePaths[E].attr("d",C);for(E in this.dataPaths)this.dataPaths[E].attr("d",function(U){return C(U.geojson)});for(E in this.dataPoints)this.dataPoints[E].attr("display",I).attr("transform",P)}},44622:function($,R,e){"use strict";var k=e(27659).AU,A=e(71828).counterRegex,l=e(69082),T="geo",b=A(T),d={};d.geo={valType:"subplotid",dflt:T,editType:"calc"},$.exports={attr:T,name:T,idRoot:T,idRegex:b,attrRegex:b,attributes:d,layoutAttributes:e(77519),supplyLayoutDefaults:e(82161),plot:function(s){for(var t=s._fullLayout,o=s.calcdata,r=t._subplots.geo,n=0;n<r.length;n++){var i=r[n],a=k(o,T,i),c=t[i]._subplot;c||(c=l({id:i,graphDiv:s,container:t._geolayer.node(),topojsonURL:s._context.topojsonURL,staticPlot:s._context.staticPlot}),t[i]._subplot=c),c.plot(a,t,s._promises)}},updateFx:function(s){for(var t=s._fullLayout,o=t._subplots.geo,r=0;r<o.length;r++){var n=t[o[r]];n._subplot.updateFx(t,n)}},clean:function(s,t,o,r){for(var n=r._subplots.geo||[],i=0;i<n.length;i++){var a=n[i],c=r[a]._subplot;!t[a]&&c&&(c.framework.remove(),c.clipDef.remove())}}}},77519:function($,R,e){"use strict";var k=e(22399),A=e(27670).Y,l=e(79952).P,T=e(78776),b=e(30962).overrideAll,d=e(78607),s={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:k.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:l};($.exports=b({domain:A({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:!1,editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:d(T.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:d(T.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:k.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:T.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:T.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:T.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:T.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:k.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:k.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:k.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:k.background},lonaxis:s,lataxis:s},"plot","from-root")).uirevision={valType:"any",editType:"none"}},82161:function($,R,e){"use strict";var k=e(71828),A=e(49119),l=e(27659).NG,T=e(78776),b=e(77519),d=T.axesNames;function s(t,o,r,n){var i=l(n.fullData,"geo",n.id).map(function(V){return V._expandedIndex}),a=r("resolution"),c=r("scope"),p=T.scopeDefaults[c],f=r("projection.type",p.projType),x=o._isAlbersUsa="albers usa"===f;x&&(c=o.scope="usa");var v=o._isScoped="world"!==c,g=o._isSatellite="satellite"===f,y=o._isConic=-1!==f.indexOf("conic")||"albers"===f,h=o._isClipped=!!T.lonaxisSpan[f];if(!1===t.visible){var m=k.extendDeep({},o._template);m.showcoastlines=!1,m.showcountries=!1,m.showframe=!1,m.showlakes=!1,m.showland=!1,m.showocean=!1,m.showrivers=!1,m.showsubunits=!1,m.lonaxis&&(m.lonaxis.showgrid=!1),m.lataxis&&(m.lataxis.showgrid=!1),o._template=m}for(var w=r("visible"),u=0;u<d.length;u++){var S,_=d[u],E=[30,10][u];if(v)S=p[_+"Range"];else{var L=T[_+"Span"],C=(L[f]||L["*"])/2,P=r("projection.rotation."+_.substr(0,3),p.projRotate[u]);S=[P-C,P+C]}var I=r(_+".range",S);r(_+".tick0"),r(_+".dtick",E),r(_+".showgrid",!!w&&void 0)&&(r(_+".gridcolor"),r(_+".gridwidth"),r(_+".griddash")),o[_]._ax={type:"linear",_id:_.slice(0,3),_traceIndices:i,setScale:k.identity,c2l:k.identity,r2l:k.identity,autorange:!0,range:I.slice(),_m:1,_input:{}}}var U=o.lonaxis.range,z=o.lataxis.range,H=U[0],F=U[1];H>0&&F<0&&(F+=360);var N,B,j,J=(H+F)/2;if(!x){var G=v?p.projRotate:[J,0,0];N=r("projection.rotation.lon",G[0]),r("projection.rotation.lat",G[1]),r("projection.rotation.roll",G[2]),r("showcoastlines",!v&&w)&&(r("coastlinecolor"),r("coastlinewidth")),r("showocean",!!w&&void 0)&&r("oceancolor")}x?(B=-96.6,j=38.7):(B=v?J:N,j=(z[0]+z[1])/2),r("center.lon",B),r("center.lat",j),g&&(r("projection.tilt"),r("projection.distance")),y&&r("projection.parallels",p.projParallels||[0,60]),r("projection.scale"),r("showland",!!w&&void 0)&&r("landcolor"),r("showlakes",!!w&&void 0)&&r("lakecolor"),r("showrivers",!!w&&void 0)&&(r("rivercolor"),r("riverwidth")),r("showcountries",v&&"usa"!==c&&w)&&(r("countrycolor"),r("countrywidth")),("usa"===c||"north america"===c&&50===a)&&(r("showsubunits",w),r("subunitcolor"),r("subunitwidth")),v||r("showframe",w)&&(r("framecolor"),r("framewidth")),r("bgcolor"),r("fitbounds")&&(delete o.projection.scale,v?(delete o.center.lon,delete o.center.lat):h?(delete o.center.lon,delete o.center.lat,delete o.projection.rotation.lon,delete o.projection.rotation.lat,delete o.lonaxis.range,delete o.lataxis.range):(delete o.center.lon,delete o.center.lat,delete o.projection.rotation.lon))}$.exports=function(t,o,r){A(t,o,r,{type:"geo",attributes:b,handleDefaults:s,fullData:r,partition:"y"})}},74455:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(73972),T=Math.PI/180,b=180/Math.PI,d={cursor:"pointer"},s={cursor:"auto"};function t(w,u){return k.behavior.zoom().translate(u.translate()).scale(u.scale())}function o(w,u,S){var _=w.id,E=w.graphDiv,L=E.layout,C=L[_],P=E._fullLayout,I=P[_],U={},z={};function H(F,N){U[_+"."+F]=A.nestedProperty(C,F).get(),l.call("_storeDirectGUIEdit",L,P._preGUI,U);var B=A.nestedProperty(I,F);B.get()!==N&&(B.set(N),A.nestedProperty(C,F).set(N),z[_+"."+F]=N)}S(H),H("projection.scale",u.scale()/w.fitScale),H("fitbounds",!1),E.emit("plotly_relayout",z)}function r(w,u){var S=t(0,u);function _(E){var L=u.invert(w.midPt);E("center.lon",L[0]),E("center.lat",L[1])}return S.on("zoomstart",function(){k.select(this).style(d)}).on("zoom",function(){u.scale(k.event.scale).translate(k.event.translate),w.render(!0);var E=u.invert(w.midPt);w.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":u.scale()/w.fitScale,"geo.center.lon":E[0],"geo.center.lat":E[1]})}).on("zoomend",function(){k.select(this).style(s),o(w,u,_)}),S}function n(w,u){var S,_,E,L,C,P,I,U,z,H=t(0,u);function F(B){return u.invert(B)}function N(B){var j=u.rotate(),J=u.invert(w.midPt);B("projection.rotation.lon",-j[0]),B("center.lon",J[0]),B("center.lat",J[1])}return H.on("zoomstart",function(){k.select(this).style(d),S=k.mouse(this),_=u.rotate(),E=u.translate(),L=_,C=F(S)}).on("zoom",function(){if(P=k.mouse(this),function(J){var G=F(J);if(!G)return!0;var V=u(G);return Math.abs(V[0]-J[0])>2||Math.abs(V[1]-J[1])>2}(S))return H.scale(u.scale()),void H.translate(u.translate());u.scale(k.event.scale),u.translate([E[0],k.event.translate[1]]),C?F(P)&&(U=F(P),u.rotate(I=[L[0]+(U[0]-C[0]),_[1],_[2]]),L=I):C=F(S=P),z=!0,w.render(!0);var B=u.rotate(),j=u.invert(w.midPt);w.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":u.scale()/w.fitScale,"geo.center.lon":j[0],"geo.center.lat":j[1],"geo.projection.rotation.lon":-B[0]})}).on("zoomend",function(){k.select(this).style(s),z&&o(w,u,N)}),H}function i(w,u){var S,_={r:u.rotate(),k:u.scale()},E=t(0,u),L=function(F){for(var N=0,B=arguments.length,j=[];++N<B;)j.push(arguments[N]);var J=k.dispatch.apply(null,j);return J.of=function(G,V){return function(W){var X;try{X=W.sourceEvent=k.event,W.target=F,k.event=W,J[W.type].apply(G,V)}finally{k.event=X}}},J}(E,"zoomstart","zoom","zoomend"),C=0,P=E.on;function H(F){var N=u.rotate();F("projection.rotation.lon",-N[0]),F("projection.rotation.lat",-N[1])}return E.on("zoomstart",function(){k.select(this).style(d);var F=k.mouse(this),N=u.rotate(),B=N,j=u.translate(),J=function c(w){var u=.5*w[0]*T,S=.5*w[1]*T,_=.5*w[2]*T,E=Math.sin(u),L=Math.cos(u),C=Math.sin(S),P=Math.cos(S),I=Math.sin(_),U=Math.cos(_);return[L*P*U+E*C*I,E*P*U-L*C*I,L*C*U+E*P*I,L*P*I-E*C*U]}(N);S=a(u,F),P.call(E,"zoom",function(){var G=k.mouse(this);if(u.scale(_.k=k.event.scale),S){if(a(u,G)){u.rotate(N).translate(j);var V=a(u,G),W=function f(w,u){if(w&&u){var S=function(C,P){return[C[1]*P[2]-C[2]*P[1],C[2]*P[0]-C[0]*P[2],C[0]*P[1]-C[1]*P[0]]}(w,u),_=Math.sqrt(m(S,S)),E=.5*Math.acos(Math.max(-1,Math.min(1,m(w,u)))),L=Math.sin(E)/_;return _&&[Math.cos(E),S[2]*L,-S[1]*L,S[0]*L]}}(S,V),X=function h(w){return[Math.atan2(2*(w[0]*w[1]+w[2]*w[3]),1-2*(w[1]*w[1]+w[2]*w[2]))*b,Math.asin(Math.max(-1,Math.min(1,2*(w[0]*w[2]-w[3]*w[1]))))*b,Math.atan2(2*(w[0]*w[3]+w[1]*w[2]),1-2*(w[2]*w[2]+w[3]*w[3]))*b]}(function p(w,u){var S=w[0],_=w[1],E=w[2],L=w[3],C=u[0],P=u[1],I=u[2],U=u[3];return[S*C-_*P-E*I-L*U,S*P+_*C+E*U-L*I,S*I-_*U+E*C+L*P,S*U+_*I-E*P+L*C]}(J,W)),K=_.r=function x(w,u,S){var _=y(u,2,w[0]);_=y(_,1,w[1]),_=y(_,0,w[2]-S[2]);var E,L,C=u[0],P=u[1],I=u[2],U=_[0],z=_[1],H=_[2],F=Math.atan2(P,C)*b,N=Math.sqrt(C*C+P*P);Math.abs(z)>N?(L=(z>0?90:-90)-F,E=0):(L=Math.asin(z/N)*b-F,E=Math.sqrt(N*N-z*z));var B=180-L-2*F,j=(Math.atan2(H,U)-Math.atan2(I,E))*b,J=(Math.atan2(H,U)-Math.atan2(I,-E))*b;return v(S[0],S[1],L,j)<=v(S[0],S[1],B,J)?[L,j,S[2]]:[B,J,S[2]]}(X,S,B);isFinite(K[0])&&isFinite(K[1])&&isFinite(K[2])||(K=B),u.rotate(K),B=K}}else S=a(u,F=G);!function U(F){F({type:"zoom"})}(L.of(this,arguments))}),function I(F){C++||F({type:"zoomstart"})}(L.of(this,arguments))}).on("zoomend",function(){k.select(this).style(s),P.call(E,"zoom",null),function z(F){--C||F({type:"zoomend"})}(L.of(this,arguments)),o(w,u,H)}).on("zoom.redraw",function(){w.render(!0);var F=u.rotate();w.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":u.scale()/w.fitScale,"geo.projection.rotation.lon":-F[0],"geo.projection.rotation.lat":-F[1]})}),k.rebind(E,L,"on")}function a(w,u){var _,E,L,C,S=w.invert(u);return S&&isFinite(S[0])&&isFinite(S[1])&&(E=(_=S)[0]*T,L=_[1]*T,[(C=Math.cos(L))*Math.cos(E),C*Math.sin(E),Math.sin(L)])}function v(w,u,S,_){var E=g(S-w),L=g(_-u);return Math.sqrt(E*E+L*L)}function g(w){return(w%360+540)%360-180}function y(w,u,S){var _=S*T,E=w.slice(),L=0===u?1:0,C=2===u?1:2,P=Math.cos(_),I=Math.sin(_);return E[L]=w[L]*P-w[C]*I,E[C]=w[C]*P+w[L]*I,E}function m(w,u){for(var S=0,_=0,E=w.length;_<E;++_)S+=w[_]*u[_];return S}$.exports=function(w,u){return(u._isScoped?r:u._isClipped?i:n)(w,w.projection)}},27659:function($,R,e){"use strict";var k=e(73972),A=e(85555).SUBPLOT_PATTERN;R.AU=function(l,T,b){var d=k.subplotsRegistry[T];if(!d)return[];for(var s=d.attr,t=[],o=0;o<l.length;o++){var r=l[o];r[0].trace[s]===b&&t.push(r)}return t},R.a0=function(l,T){var b,d=[],s=[];if(!(b="string"==typeof T?k.getModule(T).plot:"function"==typeof T?T:T.plot))return[d,l];for(var t=0;t<l.length;t++){var o=l[t],r=o[0].trace;!0===r.visible&&0!==r._length&&(r._module.plot===b?d.push(o):s.push(o))}return[d,s]},R.NG=function(l,T,b){if(!k.subplotsRegistry[T])return[];var d,s,t,o=k.subplotsRegistry[T].attr,r=[];if("gl2d"===T){var n=b.match(A);s="x"+n[1],t="y"+n[2]}for(var i=0;i<l.length;i++)d=l[i],"gl2d"===T&&k.traceIs(d,"gl2d")?d[o[0]]===s&&d[o[1]]===t&&r.push(d):d[o]===b&&r.push(d);return r}},75071:function($,R,e){"use strict";var k=e(16825),A=e(1195),l=e(48956),T=e(85555),b=e(38520);function d(s,t){this.element=s,this.plot=t,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]}$.exports=function(s){var t=s.mouseContainer,o=s.glplot,r=new d(t,o);function n(){s.xaxis.autorange=!1,s.yaxis.autorange=!1}function i(a,c,p){var f,x,v=s.calcDataBox(),g=o.viewBox,y=r.lastPos[0],h=r.lastPos[1],m=T.MINDRAG*o.pixelRatio,w=T.MINZOOM*o.pixelRatio;function u(P,I,U){var z=Math.min(I,U),H=Math.max(I,U);z!==H?(v[P]=z,v[P+2]=H,r.dataBox=v,s.setRanges(v)):(s.selectBox.selectBox=[0,0,1,1],s.glplot.setDirty())}switch(c*=o.pixelRatio,p=g[3]-g[1]-(p*=o.pixelRatio),s.fullLayout.dragmode){case"zoom":if(a){var S=c/(g[2]-g[0])*(v[2]-v[0])+v[0],_=p/(g[3]-g[1])*(v[3]-v[1])+v[1];r.boxInited||(r.boxStart[0]=S,r.boxStart[1]=_,r.dragStart[0]=c,r.dragStart[1]=p),r.boxEnd[0]=S,r.boxEnd[1]=_,r.boxInited=!0,r.boxEnabled||r.boxStart[0]===r.boxEnd[0]&&r.boxStart[1]===r.boxEnd[1]||(r.boxEnabled=!0);var E=Math.abs(r.dragStart[0]-c)<w,L=Math.abs(r.dragStart[1]-p)<w;if(!function(){for(var P=s.graphDiv._fullLayout._axisConstraintGroups,I=s.xaxis._id,U=s.yaxis._id,z=0;z<P.length;z++)if(-1!==P[z][I]){if(-1!==P[z][U])return!0;break}return!1}()||E&&L)E&&(r.boxEnd[0]=r.boxStart[0]),L&&(r.boxEnd[1]=r.boxStart[1]);else{f=r.boxEnd[0]-r.boxStart[0],x=r.boxEnd[1]-r.boxStart[1];var C=(v[3]-v[1])/(v[2]-v[0]);Math.abs(f*C)>Math.abs(x)?(r.boxEnd[1]=r.boxStart[1]+Math.abs(f)*C*(x>=0?1:-1),r.boxEnd[1]<v[1]?(r.boxEnd[1]=v[1],r.boxEnd[0]=r.boxStart[0]+(v[1]-r.boxStart[1])/Math.abs(C)):r.boxEnd[1]>v[3]&&(r.boxEnd[1]=v[3],r.boxEnd[0]=r.boxStart[0]+(v[3]-r.boxStart[1])/Math.abs(C))):(r.boxEnd[0]=r.boxStart[0]+Math.abs(x)/C*(f>=0?1:-1),r.boxEnd[0]<v[0]?(r.boxEnd[0]=v[0],r.boxEnd[1]=r.boxStart[1]+(v[0]-r.boxStart[0])*Math.abs(C)):r.boxEnd[0]>v[2]&&(r.boxEnd[0]=v[2],r.boxEnd[1]=r.boxStart[1]+(v[2]-r.boxStart[0])*Math.abs(C)))}}else r.boxEnabled?(x=r.boxStart[1]!==r.boxEnd[1],(f=r.boxStart[0]!==r.boxEnd[0])||x?(f&&(u(0,r.boxStart[0],r.boxEnd[0]),s.xaxis.autorange=!1),x&&(u(1,r.boxStart[1],r.boxEnd[1]),s.yaxis.autorange=!1),s.relayoutCallback()):s.glplot.setDirty(),r.boxEnabled=!1,r.boxInited=!1):r.boxInited&&(r.boxInited=!1);break;case"pan":r.boxEnabled=!1,r.boxInited=!1,a?(r.panning||(r.dragStart[0]=c,r.dragStart[1]=p),Math.abs(r.dragStart[0]-c)<m&&(c=r.dragStart[0]),Math.abs(r.dragStart[1]-p)<m&&(p=r.dragStart[1]),x=(h-p)*(v[3]-v[1])/(o.viewBox[3]-o.viewBox[1]),v[0]+=f=(y-c)*(v[2]-v[0])/(o.viewBox[2]-o.viewBox[0]),v[2]+=f,v[1]+=x,v[3]+=x,s.setRanges(v),r.panning=!0,r.lastInputTime=Date.now(),n(),s.cameraChanged(),s.handleAnnotations()):r.panning&&(r.panning=!1,s.relayoutCallback())}r.lastPos[0]=c,r.lastPos[1]=p}return r.mouseListener=k(t,i),t.addEventListener("touchstart",function(a){var c=l(a.changedTouches[0],t);i(0,c[0],c[1]),i(1,c[0],c[1]),a.preventDefault()},!!b&&{passive:!1}),t.addEventListener("touchmove",function(a){a.preventDefault();var c=l(a.changedTouches[0],t);i(1,c[0],c[1]),a.preventDefault()},!!b&&{passive:!1}),t.addEventListener("touchend",function(a){i(0,r.lastPos[0],r.lastPos[1]),a.preventDefault()},!!b&&{passive:!1}),r.wheelListener=A(t,function(a,c){if(!s.scrollZoom)return!1;var p=s.calcDataBox(),f=o.viewBox,x=r.lastPos[0],v=r.lastPos[1],g=Math.exp(5*c/(f[3]-f[1])),y=x/(f[2]-f[0])*(p[2]-p[0])+p[0],h=v/(f[3]-f[1])*(p[3]-p[1])+p[1];return p[0]=(p[0]-y)*g+y,p[2]=(p[2]-y)*g+y,p[1]=(p[1]-h)*g+h,p[3]=(p[3]-h)*g+h,s.setRanges(p),r.lastInputTime=Date.now(),n(),s.cameraChanged(),s.handleAnnotations(),s.relayoutCallback(),!0},!0),r}},82961:function($,R,e){"use strict";var k=e(89298),A=e(78614);function l(d){this.scene=d,this.gl=d.gl,this.pixelRatio=d.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 T=l.prototype,b=["xaxis","yaxis"];T.merge=function(d){var s,t,o,r,n,i,a,c,p,f,x;for(this.titleEnable=!1,this.backgroundColor=A(d.plot_bgcolor),f=0;f<2;++f){var v=(s=b[f]).charAt(0);for(o=(t=d[this.scene[s]._name]).title.text===this.scene.fullLayout._dfltTitle[v]?"":t.title.text,x=0;x<=2;x+=2)this.labelEnable[f+x]=!1,this.labels[f+x]=o,this.labelColor[f+x]=A(t.title.font.color),this.labelFont[f+x]=t.title.font.family,this.labelSize[f+x]=t.title.font.size,this.labelPad[f+x]=this.getLabelPad(s,t),this.tickEnable[f+x]=!1,this.tickColor[f+x]=A((t.tickfont||{}).color),this.tickAngle[f+x]="auto"===t.tickangle?0:Math.PI*-t.tickangle/180,this.tickPad[f+x]=this.getTickPad(t),this.tickMarkLength[f+x]=0,this.tickMarkWidth[f+x]=t.tickwidth||0,this.tickMarkColor[f+x]=A(t.tickcolor),this.borderLineEnable[f+x]=!1,this.borderLineColor[f+x]=A(t.linecolor),this.borderLineWidth[f+x]=t.linewidth||0;a=this.hasSharedAxis(t),n=this.hasAxisInDfltPos(s,t)&&!a,i=this.hasAxisInAltrPos(s,t)&&!a,r=t.mirror||!1,c=a?-1!==String(r).indexOf("all"):!!r,p=a?"allticks"===r:-1!==String(r).indexOf("ticks"),n?this.labelEnable[f]=!0:i&&(this.labelEnable[f+2]=!0),n?this.tickEnable[f]=t.showticklabels:i&&(this.tickEnable[f+2]=t.showticklabels),(n||c)&&(this.borderLineEnable[f]=t.showline),(i||c)&&(this.borderLineEnable[f+2]=t.showline),(n||p)&&(this.tickMarkLength[f]=this.getTickMarkLength(t)),(i||p)&&(this.tickMarkLength[f+2]=this.getTickMarkLength(t)),this.gridLineEnable[f]=t.showgrid,this.gridLineColor[f]=A(t.gridcolor),this.gridLineWidth[f]=t.gridwidth,this.zeroLineEnable[f]=t.zeroline,this.zeroLineColor[f]=A(t.zerolinecolor),this.zeroLineWidth[f]=t.zerolinewidth}},T.hasSharedAxis=function(d){var s=this.scene;return 0!==k.findSubplotsWithAxis(s.fullLayout._subplots.gl2d,d).indexOf(s.id)},T.hasAxisInDfltPos=function(d,s){var t=s.side;return"xaxis"===d?"bottom"===t:"yaxis"===d?"left"===t:void 0},T.hasAxisInAltrPos=function(d,s){var t=s.side;return"xaxis"===d?"top"===t:"yaxis"===d?"right"===t:void 0},T.getLabelPad=function(d,s){var t=1.5,o=s.title.font.size,r=s.showticklabels;return"xaxis"===d?"top"===s.side?o*(t+(r?1:0))-10:o*(t+(r?.5:0))-10:"yaxis"===d?"right"===s.side?10+o*(t+(r?1:.5)):10+o*(t+(r?.5:0)):void 0},T.getTickPad=function(d){return"outside"===d.ticks?10+d.ticklen:15},T.getTickMarkLength=function(d){if(!d.ticks)return 0;var s=d.ticklen;return"inside"===d.ticks?-s:s},$.exports=function(d){return new l(d)}},4796:function($,R,e){"use strict";var k=e(30962).overrideAll,A=e(92918),l=e(10820),T=e(77922),b=e(85555),d=e(93612),s=e(528),t=e(27659).NG;R.name="gl2d",R.attr=["xaxis","yaxis"],R.idRoot=["x","y"],R.idRegex=b.idRegex,R.attrRegex=b.attrRegex,R.attributes=e(89502),R.supplyLayoutDefaults=function(o,r,n){r._has("cartesian")||d.supplyLayoutDefaults(o,r,n)},R.layoutAttrOverrides=k(d.layoutAttributes,"plot","from-root"),R.baseLayoutAttrOverrides=k({plot_bgcolor:l.plot_bgcolor,hoverlabel:s.hoverlabel},"plot","nested"),R.plot=function(o){for(var r=o._fullLayout,n=o._fullData,i=r._subplots.gl2d,a=0;a<i.length;a++){var c=i[a],p=r._plots[c],f=t(n,"gl2d",c),x=p._scene2d;void 0===x&&(x=new A({id:c,graphDiv:o,container:o.querySelector(".gl-container"),staticPlot:o._context.staticPlot,plotGlPixelRatio:o._context.plotGlPixelRatio},r),p._scene2d=x),x.plot(f,o.calcdata,r,o.layout)}},R.clean=function(o,r,n,i){for(var a=i._subplots.gl2d||[],c=0;c<a.length;c++){var p=a[c],f=i._plots[p];f._scene2d&&0===t(o,"gl2d",p).length&&(f._scene2d.destroy(),delete i._plots[p])}d.clean.apply(this,arguments)},R.drawFramework=function(o){o._context.staticPlot||d.drawFramework(o)},R.toSVG=function(o){for(var r=o._fullLayout,n=r._subplots.gl2d,i=0;i<n.length;i++){var a=r._plots[n[i]]._scene2d,c=a.toImage("png");r._glimages.append("svg:image").attr({xmlns:T.svg,"xlink:href":c,x:0,y:0,width:"100%",height:"100%",preserveAspectRatio:"none"}),a.destroy()}},R.updateFx=function(o){for(var r=o._fullLayout,n=r._subplots.gl2d,i=0;i<n.length;i++)r._plots[n[i]]._scene2d.updateFx(r.dragmode)}},92918:function($,R,e){"use strict";var k,A,l=e(73972),T=e(89298),b=e(30211),d=e(9330).gl_plot2d,s=e(9330).gl_spikes2d,t=e(9330).gl_select_box,o=e(40372),r=e(82961),n=e(75071),i=e(58617),a=e(99082),c=a.enforce,p=a.clean,f=e(71739).doAutoRange,x=e(64505),v=x.drawMode,g=x.selectMode,y=["xaxis","yaxis"],h=e(85555).SUBPLOT_PATTERN;function m(u,S){this.container=u.container,this.graphDiv=u.graphDiv,this.pixelRatio=u.plotGlPixelRatio||window.devicePixelRatio,this.id=u.id,this.staticPlot=!!u.staticPlot,this.scrollZoom=this.graphDiv._context._scrollZoom.cartesian,this.fullData=null,this.updateRefs(S),this.makeFramework(),this.stopped||(this.glplotOptions=r(this),this.glplotOptions.merge(S),this.glplot=d(this.glplotOptions),this.camera=n(this),this.traces={},this.spikes=s(this.glplot),this.selectBox=t(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())}$.exports=m;var w=m.prototype;w.makeFramework=function(){if(this.staticPlot){if(!(A||(k=document.createElement("canvas"),A=o({canvas:k,preserveDrawingBuffer:!1,premultipliedAlpha:!0,antialias:!0}))))throw new Error("Error creating static canvas/context for image server");this.canvas=k,this.gl=A}else{var u=this.container.querySelector(".gl-canvas-focus"),S=o({canvas:u,preserveDrawingBuffer:!0,premultipliedAlpha:!0});if(!S)return i(this),void(this.stopped=!0);this.canvas=u,this.gl=S}var _=this.canvas;_.style.width="100%",_.style.height="100%",_.style.position="absolute",_.style.top="0px",_.style.left="0px",_.style["pointer-events"]="none",this.updateSize(_);var E=this.svgContainer=document.createElementNS("http://www.w3.org/2000/svg","svg");E.style.position="absolute",E.style.top=E.style.left="0px",E.style.width=E.style.height="100%",E.style["z-index"]=20,E.style["pointer-events"]="none";var L=this.mouseContainer=document.createElement("div");L.style.position="absolute",L.style["pointer-events"]="auto",this.pickCanvas=this.container.querySelector(".gl-canvas-pick");var C=this.container;C.appendChild(E),C.appendChild(L);var P=this;L.addEventListener("mouseout",function(){P.isMouseOver=!1,P.unhover()}),L.addEventListener("mouseover",function(){P.isMouseOver=!0})},w.toImage=function(u){u||(u="png"),this.stopped=!0,this.staticPlot&&this.container.appendChild(k),this.updateSize(this.canvas);var S=this.glplot.gl,_=S.drawingBufferWidth,E=S.drawingBufferHeight;S.clearColor(1,1,1,0),S.clear(S.COLOR_BUFFER_BIT|S.DEPTH_BUFFER_BIT),this.glplot.setDirty(),this.glplot.draw(),S.bindFramebuffer(S.FRAMEBUFFER,null);var L=new Uint8Array(_*E*4);S.readPixels(0,0,_,E,S.RGBA,S.UNSIGNED_BYTE,L);for(var C=0,P=E-1;C<P;++C,--P)for(var I=0;I<_;++I)for(var U=0;U<4;++U){var z=L[4*(_*C+I)+U];L[4*(_*C+I)+U]=L[4*(_*P+I)+U],L[4*(_*P+I)+U]=z}var H=document.createElement("canvas");H.width=_,H.height=E;var F,N=H.getContext("2d",{willReadFrequently:!0}),B=N.createImageData(_,E);switch(B.data.set(L),N.putImageData(B,0,0),u){case"jpeg":F=H.toDataURL("image/jpeg");break;case"webp":F=H.toDataURL("image/webp");break;default:F=H.toDataURL("image/png")}return this.staticPlot&&this.container.removeChild(k),F},w.updateSize=function(u){u||(u=this.canvas);var S=this.pixelRatio,_=this.fullLayout,L=_.height,C=0|Math.ceil(S*_.width),P=0|Math.ceil(S*L);return u.width===C&&u.height===P||(u.width=C,u.height=P),u},w.computeTickMarks=function(){this.xaxis.setScale(),this.yaxis.setScale();for(var u=[T.calcTicks(this.xaxis),T.calcTicks(this.yaxis)],S=0;S<2;++S)for(var _=0;_<u[S].length;++_)u[S][_].text=u[S][_].text+"";return u},w.updateRefs=function(u){this.fullLayout=u;var S=this.id.match(h),E="yaxis"+S[2];this.xaxis=this.fullLayout["xaxis"+S[1]],this.yaxis=this.fullLayout[E]},w.relayoutCallback=function(){var u=this.graphDiv,S=this.xaxis,_=this.yaxis,E=u.layout,L={},C=L[S._name+".range"]=S.range.slice(),P=L[_._name+".range"]=_.range.slice();L[S._name+".autorange"]=S.autorange,L[_._name+".autorange"]=_.autorange,l.call("_storeDirectGUIEdit",u.layout,u._fullLayout._preGUI,L);var I=E[S._name];I.range=C,I.autorange=S.autorange;var U=E[_._name];U.range=P,U.autorange=_.autorange,L.lastInputTime=this.camera.lastInputTime,u.emit("plotly_relayout",L)},w.cameraChanged=function(){var u=this.camera;this.glplot.setDataBox(this.calcDataBox());var S=this.computeTickMarks();(function(_,E){for(var L=0;L<2;++L){var C=_[L],P=E[L];if(C.length!==P.length)return!0;for(var I=0;I<C.length;++I)if(C[I].x!==P[I].x)return!0}return!1})(S,this.glplotOptions.ticks)&&(this.glplotOptions.ticks=S,this.glplotOptions.dataBox=u.dataBox,this.glplot.update(this.glplotOptions),this.handleAnnotations())},w.handleAnnotations=function(){for(var u=this.graphDiv,S=this.fullLayout.annotations,_=0;_<S.length;_++){var E=S[_];E.xref===this.xaxis._id&&E.yref===this.yaxis._id&&l.getComponentMethod("annotations","drawOne")(u,_)}},w.destroy=function(){if(this.glplot){var u=this.traces;u&&Object.keys(u).map(function(S){u[S].dispose(),delete u[S]}),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}},w.plot=function(u,S,_){var E=this.glplot;this.updateRefs(_),this.xaxis.clearCalc(),this.yaxis.clearCalc(),this.updateTraces(u,S),this.updateFx(_.dragmode);var L=_.width,C=_.height;this.updateSize(this.canvas);var P=this.glplotOptions;P.merge(_),P.screenBox=[0,0,L,C];var I={_fullLayout:{_axisConstraintGroups:_._axisConstraintGroups,xaxis:this.xaxis,yaxis:this.yaxis,_size:_._size}};p(I,this.xaxis),p(I,this.yaxis);var U,z,H=_._size,F=this.xaxis.domain,N=this.yaxis.domain;for(P.viewBox=[H.l+F[0]*H.w,H.b+N[0]*H.h,L-H.r-(1-F[1])*H.w,C-H.t-(1-N[1])*H.h],this.mouseContainer.style.width=H.w*(F[1]-F[0])+"px",this.mouseContainer.style.height=H.h*(N[1]-N[0])+"px",this.mouseContainer.height=H.h*(N[1]-N[0]),this.mouseContainer.style.left=H.l+F[0]*H.w+"px",this.mouseContainer.style.top=H.t+(1-N[1])*H.h+"px",z=0;z<2;++z)(U=this[y[z]])._length=P.viewBox[z+2]-P.viewBox[z],f(this.graphDiv,U),U.setScale();c(I),P.ticks=this.computeTickMarks(),P.dataBox=this.calcDataBox(),P.merge(_),E.update(P),this.glplot.draw()},w.calcDataBox=function(){var u=this.xaxis,S=this.yaxis,_=u.range,E=S.range,L=u.r2l,C=S.r2l;return[L(_[0]),C(E[0]),L(_[1]),C(E[1])]},w.setRanges=function(u){var S=this.xaxis,_=this.yaxis,E=S.l2r,L=_.l2r;S.range=[E(u[0]),E(u[2])],_.range=[L(u[1]),L(u[3])]},w.updateTraces=function(u,S){var _,E,L,C=Object.keys(this.traces);this.fullData=u;e:for(_=0;_<C.length;_++){var P=C[_],I=this.traces[P];for(E=0;E<u.length;E++)if((L=u[E]).uid===P&&L.type===I.type)continue e;I.dispose(),delete this.traces[P]}for(_=0;_<u.length;_++){var U=S[_],z=this.traces[(L=u[_]).uid];z?z.update(L,U):(z=L._module.plot(this,L,U),this.traces[L.uid]=z)}this.glplot.objects.sort(function(H,F){return H._trace.index-F._trace.index})},w.updateFx=function(u){g(u)||v(u)?(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"===u?"move":"zoom"===u?"crosshair":null},w.emitPointAction=function(u,S){for(var _,E=u.trace.uid,L=u.pointIndex,C=0;C<this.fullData.length;C++)this.fullData[C].uid===E&&(_=this.fullData[C]);var P={x:u.traceCoord[0],y:u.traceCoord[1],curveNumber:_.index,pointNumber:L,data:_._input,fullData:this.fullData,xaxis:this.xaxis,yaxis:this.yaxis};b.appendArrayPointValue(P,_,L),this.graphDiv.emit(S,{points:[P]})},w.draw=function(){if(!this.stopped){requestAnimationFrame(this.redraw);var u=this.glplot,S=this.camera,_=S.mouseListener,E=1===this.lastButtonState&&0===_.buttons,L=this.fullLayout;this.lastButtonState=_.buttons,this.cameraChanged();var C,P=_.x*u.pixelRatio,I=this.canvas.height-u.pixelRatio*_.y;if(S.boxEnabled&&"zoom"===L.dragmode){this.selectBox.enabled=!0;for(var U=this.selectBox.selectBox=[Math.min(S.boxStart[0],S.boxEnd[0]),Math.min(S.boxStart[1],S.boxEnd[1]),Math.max(S.boxStart[0],S.boxEnd[0]),Math.max(S.boxStart[1],S.boxEnd[1])],z=0;z<2;z++)S.boxStart[z]===S.boxEnd[z]&&(U[z]=u.dataBox[z],U[z+2]=u.dataBox[z+2]);u.setDirty()}else if(!S.panning&&this.isMouseOver){this.selectBox.enabled=!1;var H=L._size,B=(C=u.pick(P/u.pixelRatio+H.l+this.xaxis.domain[0]*H.w,I/u.pixelRatio-(H.t+(1-this.yaxis.domain[1])*H.h)))&&C.object._trace.handlePick(C);if(B&&E&&this.emitPointAction(B,"plotly_click"),C&&"skip"!==C.object._trace.hoverinfo&&L.hovermode&&B&&(!this.lastPickResult||this.lastPickResult.traceUid!==B.trace.uid||this.lastPickResult.dataCoord[0]!==B.dataCoord[0]||this.lastPickResult.dataCoord[1]!==B.dataCoord[1])){var j=B;this.lastPickResult={traceUid:B.trace?B.trace.uid:null,dataCoord:B.dataCoord.slice()},this.spikes.update({center:C.dataCoord}),j.screenCoord=[((u.viewBox[2]-u.viewBox[0])*(C.dataCoord[0]-u.dataBox[0])/(u.dataBox[2]-u.dataBox[0])+u.viewBox[0])/u.pixelRatio,(this.canvas.height-(u.viewBox[3]-u.viewBox[1])*(C.dataCoord[1]-u.dataBox[1])/(u.dataBox[3]-u.dataBox[1])-u.viewBox[1])/u.pixelRatio],this.emitPointAction(B,"plotly_hover");var J=this.fullData[j.trace.index]||{},G=j.pointIndex,V=b.castHoverinfo(J,L,G);if(V&&"all"!==V){var W=V.split("+");-1===W.indexOf("x")&&(j.traceCoord[0]=void 0),-1===W.indexOf("y")&&(j.traceCoord[1]=void 0),-1===W.indexOf("z")&&(j.traceCoord[2]=void 0),-1===W.indexOf("text")&&(j.textLabel=void 0),-1===W.indexOf("name")&&(j.name=void 0)}b.loneHover({x:j.screenCoord[0],y:j.screenCoord[1],xLabel:this.hoverFormatter("xaxis",j.traceCoord[0]),yLabel:this.hoverFormatter("yaxis",j.traceCoord[1]),zLabel:j.traceCoord[2],text:j.textLabel,name:j.name,color:b.castHoverOption(J,G,"bgcolor")||j.color,borderColor:b.castHoverOption(J,G,"bordercolor"),fontFamily:b.castHoverOption(J,G,"font.family"),fontSize:b.castHoverOption(J,G,"font.size"),fontColor:b.castHoverOption(J,G,"font.color"),nameLength:b.castHoverOption(J,G,"namelength"),textAlign:b.castHoverOption(J,G,"align")},{container:this.svgContainer,gd:this.graphDiv})}}C||this.unhover(),u.draw()}},w.unhover=function(){this.lastPickResult&&(this.spikes.update({}),this.lastPickResult=null,this.graphDiv.emit("plotly_unhover"),b.loneUnhover(this.svgContainer))},w.hoverFormatter=function(u,S){if(void 0!==S){var _=this[u];return T.tickText(_,_.c2l(S),"hover").text}}},58547:function($,R,e){"use strict";var k=e(30962).overrideAll,A=e(528),l=e(33539),T=e(27659).NG,b=e(71828),d=e(77922),s="gl3d",t="scene";R.name=s,R.attr=t,R.idRoot=t,R.idRegex=R.attrRegex=b.counterRegex("scene"),R.attributes=e(59084),R.layoutAttributes=e(65500),R.baseLayoutAttrOverrides=k({hoverlabel:A.hoverlabel},"plot","nested"),R.supplyLayoutDefaults=e(24682),R.plot=function(o){for(var r=o._fullLayout,n=o._fullData,i=r._subplots.gl3d,a=0;a<i.length;a++){var c=i[a],p=T(n,s,c),f=r[c],x=f.camera,v=f._scene;v||(v=new l({id:c,graphDiv:o,container:o.querySelector(".gl-container"),staticPlot:o._context.staticPlot,plotGlPixelRatio:o._context.plotGlPixelRatio,camera:x},r),f._scene=v),v.viewInitial||(v.viewInitial={up:{x:x.up.x,y:x.up.y,z:x.up.z},eye:{x:x.eye.x,y:x.eye.y,z:x.eye.z},center:{x:x.center.x,y:x.center.y,z:x.center.z}}),v.plot(p,r,o.layout)}},R.clean=function(o,r,n,i){for(var a=i._subplots.gl3d||[],c=0;c<a.length;c++){var p=a[c];!r[p]&&i[p]._scene&&(i[p]._scene.destroy(),i._infolayer&&i._infolayer.selectAll(".annotation-"+p).remove())}},R.toSVG=function(o){for(var r=o._fullLayout,n=r._subplots.gl3d,i=r._size,a=0;a<n.length;a++){var c=r[n[a]],p=c.domain,f=c._scene,x=f.toImage("png");r._glimages.append("svg:image").attr({xmlns:d.svg,"xlink:href":x,x:i.l+i.w*p.x[0],y:i.t+i.h*(1-p.y[1]),width:i.w*(p.x[1]-p.x[0]),height:i.h*(p.y[1]-p.y[0]),preserveAspectRatio:"none"}),f.destroy()}},R.cleanId=function(o){if(o.match(/^scene[0-9]*$/)){var r=o.substr(5);return"1"===r&&(r=""),t+r}},R.updateFx=function(o){for(var r=o._fullLayout,n=r._subplots.gl3d,i=0;i<n.length;i++)r[n[i]]._scene.updateFx(r.dragmode,r.hovermode)}},59084:function($){"use strict";$.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}},77894:function($,R,e){"use strict";var k=e(7901),A=e(13838),l=e(1426).extendFlat,T=e(30962).overrideAll;$.exports=T({visible:A.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:k.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:A.color,categoryorder:A.categoryorder,categoryarray:A.categoryarray,title:{text:A.title.text,font:A.title.font},type:l({},A.type,{values:["-","linear","log","date","category"]}),autotypenumbers:A.autotypenumbers,autorange:A.autorange,rangemode:A.rangemode,range:l({},A.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:A.minor.tickmode,nticks:A.nticks,tick0:A.tick0,dtick:A.dtick,tickvals:A.tickvals,ticktext:A.ticktext,ticks:A.ticks,mirror:A.mirror,ticklen:A.ticklen,tickwidth:A.tickwidth,tickcolor:A.tickcolor,showticklabels:A.showticklabels,tickfont:A.tickfont,tickangle:A.tickangle,tickprefix:A.tickprefix,showtickprefix:A.showtickprefix,ticksuffix:A.ticksuffix,showticksuffix:A.showticksuffix,showexponent:A.showexponent,exponentformat:A.exponentformat,minexponent:A.minexponent,separatethousands:A.separatethousands,tickformat:A.tickformat,tickformatstops:A.tickformatstops,hoverformat:A.hoverformat,showline:A.showline,linecolor:A.linecolor,linewidth:A.linewidth,showgrid:A.showgrid,gridcolor:l({},A.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:A.gridwidth,zeroline:A.zeroline,zerolinecolor:A.zerolinecolor,zerolinewidth:A.zerolinewidth,_deprecated:{title:A._deprecated.title,titlefont:A._deprecated.titlefont}},"plot","from-root")},3277:function($,R,e){"use strict";var k=e(84267).mix,A=e(71828),l=e(44467),T=e(77894),b=e(951),d=e(71453),s=["xaxis","yaxis","zaxis"];$.exports=function(t,o,r){var n,i;function a(f,x){return A.coerce(n,i,T,f,x)}for(var c=0;c<s.length;c++){var p=s[c];n=t[p]||{},(i=l.newContainer(o,p))._id=p[0]+r.scene,i._name=p,b(n,i,a,r),d(n,i,a,{font:r.font,letter:p[0],data:r.data,showGrid:!0,noTickson:!0,noTicklabelmode:!0,noTicklabelstep:!0,noTicklabelposition:!0,noTicklabeloverflow:!0,bgColor:r.bgColor,calendar:r.calendar},r.fullLayout),a("gridcolor",k(i.color,r.bgColor,72.72727272727273).toRgbString()),a("title.text",p[0]),i.setScale=A.noop,a("showspikes")&&(a("spikesides"),a("spikethickness"),a("spikecolor",i.color)),a("showaxeslabels"),a("showbackground")&&a("backgroundcolor")}}},30422:function($,R,e){"use strict";var k=e(78614),A=e(71828),l=["xaxis","yaxis","zaxis"];function T(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}T.prototype.merge=function(b,d){for(var s=this,t=0;t<3;++t){var o=d[l[t]];o.visible?(s.labels[t]=b._meta?A.templateString(o.title.text,b._meta):o.title.text,"font"in o.title&&(o.title.font.color&&(s.labelColor[t]=k(o.title.font.color)),o.title.font.family&&(s.labelFont[t]=o.title.font.family),o.title.font.size&&(s.labelSize[t]=o.title.font.size)),"showline"in o&&(s.lineEnable[t]=o.showline),"linecolor"in o&&(s.lineColor[t]=k(o.linecolor)),"linewidth"in o&&(s.lineWidth[t]=o.linewidth),"showgrid"in o&&(s.gridEnable[t]=o.showgrid),"gridcolor"in o&&(s.gridColor[t]=k(o.gridcolor)),"gridwidth"in o&&(s.gridWidth[t]=o.gridwidth),"log"===o.type?s.zeroEnable[t]=!1:"zeroline"in o&&(s.zeroEnable[t]=o.zeroline),"zerolinecolor"in o&&(s.zeroLineColor[t]=k(o.zerolinecolor)),"zerolinewidth"in o&&(s.zeroLineWidth[t]=o.zerolinewidth),s.lineTickEnable[t]=!(!("ticks"in o)||!o.ticks),"ticklen"in o&&(s.lineTickLength[t]=s._defaultLineTickLength[t]=o.ticklen),"tickcolor"in o&&(s.lineTickColor[t]=k(o.tickcolor)),"tickwidth"in o&&(s.lineTickWidth[t]=o.tickwidth),"tickangle"in o&&(s.tickAngle[t]="auto"===o.tickangle?-3600:Math.PI*-o.tickangle/180),"showticklabels"in o&&(s.tickEnable[t]=o.showticklabels),"tickfont"in o&&(o.tickfont.color&&(s.tickColor[t]=k(o.tickfont.color)),o.tickfont.family&&(s.tickFont[t]=o.tickfont.family),o.tickfont.size&&(s.tickSize[t]=o.tickfont.size)),"mirror"in o?-1!==["ticks","all","allticks"].indexOf(o.mirror)?(s.lineTickMirror[t]=!0,s.lineMirror[t]=!0):!0===o.mirror?(s.lineTickMirror[t]=!1,s.lineMirror[t]=!0):(s.lineTickMirror[t]=!1,s.lineMirror[t]=!1):s.lineMirror[t]=!1,"showbackground"in o&&!1!==o.showbackground?(s.backgroundEnable[t]=!0,s.backgroundColor[t]=k(o.backgroundcolor)):s.backgroundEnable[t]=!1):(s.tickEnable[t]=!1,s.labelEnable[t]=!1,s.lineEnable[t]=!1,s.lineTickEnable[t]=!1,s.gridEnable[t]=!1,s.zeroEnable[t]=!1,s.backgroundEnable[t]=!1)}},$.exports=function(b,d){var s=new T;return s.merge(b,d),s}},24682:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(73972),T=e(49119),b=e(3277),d=e(65500),s=e(27659).NG,t="gl3d";function o(r,n,i,a){for(var c=i("bgcolor"),p=A.combine(c,a.paper_bgcolor),f=["up","center","eye"],x=0;x<f.length;x++)i("camera."+f[x]+".x"),i("camera."+f[x]+".y"),i("camera."+f[x]+".z");i("camera.projection.type");var v=!!i("aspectratio.x")&&!!i("aspectratio.y")&&!!i("aspectratio.z"),g=i("aspectmode",v?"manual":"auto");v||(r.aspectratio=n.aspectratio={x:1,y:1,z:1},"manual"===g&&(n.aspectmode="auto"),r.aspectmode=n.aspectmode);var y=s(a.fullData,t,a.id);b(r,n,{font:a.font,scene:a.id,data:y,bgColor:p,calendar:a.calendar,autotypenumbersDflt:a.autotypenumbersDflt,fullLayout:a.fullLayout}),l.getComponentMethod("annotations3d","handleDefaults")(r,n,a);var h=a.getDfltFromLayout("dragmode");if(!1!==h&&!h)if(h="orbit",r.camera&&r.camera.up){var m=r.camera.up.x,w=r.camera.up.y,u=r.camera.up.z;0!==u&&(m&&w&&u?u/Math.sqrt(m*m+w*w+u*u)>.999&&(h="turntable"):h="turntable")}else h="turntable";i("dragmode",h),i("hovermode",a.getDfltFromLayout("hovermode"))}$.exports=function(r,n,i){var a=n._basePlotModules.length>1;T(r,n,i,{type:t,attributes:d,handleDefaults:o,fullLayout:n,font:n.font,fullData:i,getDfltFromLayout:function(c){if(!a)return k.validate(r[c],d[c])?r[c]:void 0},autotypenumbersDflt:n.autotypenumbers,paper_bgcolor:n.paper_bgcolor,calendar:n.calendar})}},65500:function($,R,e){"use strict";var k=e(77894),A=e(27670).Y,l=e(1426).extendFlat,T=e(71828).counterRegex;function b(d,s,t){return{x:{valType:"number",dflt:d,editType:"camera"},y:{valType:"number",dflt:s,editType:"camera"},z:{valType:"number",dflt:t,editType:"camera"},editType:"camera"}}$.exports={_arrayAttrRegexps:[T("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:l(b(0,0,1),{}),center:l(b(0,0,0),{}),eye:l(b(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:A({name:"scene",editType:"plot"}),aspectmode:{valType:"enumerated",values:["auto","cube","data","manual"],dflt:"auto",editType:"plot",impliedEdits:{"aspectratio.x":void 0,"aspectratio.y":void 0,"aspectratio.z":void 0}},aspectratio:{x:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},y:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},z:{valType:"number",min:0,editType:"plot",impliedEdits:{"^aspectmode":"manual"}},editType:"plot",impliedEdits:{aspectmode:"manual"}},xaxis:k,yaxis:k,zaxis:k,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},13133:function($,R,e){"use strict";var k=e(78614),A=["xaxis","yaxis","zaxis"];function l(){this.enabled=[!0,!0,!0],this.colors=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.drawSides=[!0,!0,!0],this.lineWidth=[1,1,1]}l.prototype.merge=function(T){for(var b=0;b<3;++b){var d=T[A[b]];d.visible?(this.enabled[b]=d.showspikes,this.colors[b]=k(d.spikecolor),this.drawSides[b]=d.spikesides,this.lineWidth[b]=d.spikethickness):(this.enabled[b]=!1,this.drawSides[b]=!1)}},$.exports=function(T){var b=new l;return b.merge(T),b}},96085:function($,R,e){"use strict";$.exports=function(b){for(var d=b.axesOptions,s=b.glplot.axesPixels,t=b.fullSceneLayout,o=[[],[],[]],r=0;r<3;++r){var n=t[l[r]];if(n._length=(s[r].hi-s[r].lo)*s[r].pixelsPerDataUnit/b.dataScale[r],Math.abs(n._length)===1/0||isNaN(n._length))o[r]=[];else{n._input_range=n.range.slice(),n.range[0]=s[r].lo/b.dataScale[r],n.range[1]=s[r].hi/b.dataScale[r],n._m=1/(b.dataScale[r]*s[r].pixelsPerDataUnit),n.range[0]===n.range[1]&&(n.range[0]-=1,n.range[1]+=1);var i=n.tickmode;if("auto"===n.tickmode){n.tickmode="linear";var a=n.nticks||A.constrain(n._length/40,4,9);k.autoTicks(n,Math.abs(n.range[1]-n.range[0])/a)}for(var c=k.calcTicks(n,{msUTC:!0}),p=0;p<c.length;++p)c[p].x=c[p].x*b.dataScale[r],"date"===n.type&&(c[p].text=c[p].text.replace(/\<br\>/g," "));o[r]=c,n.tickmode=i}}for(d.ticks=o,r=0;r<3;++r)for(T[r]=.5*(b.glplot.bounds[0][r]+b.glplot.bounds[1][r]),p=0;p<2;++p)d.bounds[p][r]=b.glplot.bounds[p][r];b.contourLevels=function(f){for(var x=new Array(3),v=0;v<3;++v){for(var g=f[v],y=new Array(g.length),h=0;h<g.length;++h)y[h]=g[h].x;x[v]=y}return x}(o)};var k=e(89298),A=e(71828),l=["xaxis","yaxis","zaxis"],T=[0,0,0]},63538:function($){"use strict";function R(e,k){var A,l,T=[0,0,0,0];for(A=0;A<4;++A)for(l=0;l<4;++l)T[l]+=e[4*A+l]*k[A];return T}$.exports=function(e,k){return R(e.projection,R(e.view,R(e.model,[k[0],k[1],k[2],1])))}},33539:function($,R,e){"use strict";var k,A,l=e(9330).gl_plot3d,T=l.createCamera,b=l.createScene,d=e(40372),s=e(38520),t=e(73972),o=e(71828),r=o.preserveDrawingBuffer(),n=e(89298),i=e(30211),a=e(78614),c=e(58617),p=e(63538),f=e(30422),x=e(13133),v=e(96085);function g(u,S){var _=document.createElement("div"),E=u.container;this.graphDiv=u.graphDiv;var L=document.createElementNS("http://www.w3.org/2000/svg","svg");L.style.position="absolute",L.style.top=L.style.left="0px",L.style.width=L.style.height="100%",L.style["z-index"]=20,L.style["pointer-events"]="none",_.appendChild(L),this.svgContainer=L,_.id=u.id,_.style.position="absolute",_.style.top=_.style.left="0px",_.style.width=_.style.height="100%",E.appendChild(_),this.fullLayout=S,this.id=u.id||"scene",this.fullSceneLayout=S[this.id],this.plotArgs=[[],{},{}],this.axesOptions=f(S,S[this.id]),this.spikeOptions=x(S[this.id]),this.container=_,this.staticMode=!!u.staticPlot,this.pixelRatio=this.pixelRatio||u.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=t.getComponentMethod("annotations3d","convert"),this.drawAnnotations=t.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var y=g.prototype;y.prepareOptions=function(){var u=this,S={canvas:u.canvas,gl:u.gl,glOptions:{preserveDrawingBuffer:r,premultipliedAlpha:!0,antialias:!0},container:u.container,axes:u.axesOptions,spikes:u.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:u.camera,pixelRatio:u.pixelRatio};if(u.staticMode){if(!(A||(k=document.createElement("canvas"),A=d({canvas:k,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}))))throw new Error("error creating static canvas/context for image server");S.gl=A,S.canvas=k}return S};var h=!0;y.tryCreatePlot=function(){var u=this,S=u.prepareOptions(),_=!0;try{u.glplot=b(S)}catch{if(u.staticMode||!h||r)_=!1;else{o.warn(["webgl setup failed possibly due to","false preserveDrawingBuffer config.","The mobile/tablet device may not be detected by is-mobile module.","Enabling preserveDrawingBuffer in second attempt to create webgl scene..."].join(" "));try{r=S.glOptions.preserveDrawingBuffer=!0,u.glplot=b(S)}catch{r=S.glOptions.preserveDrawingBuffer=!1,_=!1}}}return h=!1,_},y.initializeGLCamera=function(){var u=this,S=u.fullSceneLayout.camera;u.camera=T(u.container,{center:[S.center.x,S.center.y,S.center.z],eye:[S.eye.x,S.eye.y,S.eye.z],up:[S.up.x,S.up.y,S.up.z],_ortho:"orthographic"===S.projection.type,zoomMin:.01,zoomMax:100,mode:"orbit"})},y.initializeGLPlot=function(){var u=this;if(u.initializeGLCamera(),!u.tryCreatePlot())return c(u);u.traces={},u.make4thDimension();var S=u.graphDiv,_=S.layout,E=function(){var C={};return u.isCameraChanged(_)&&(C[u.id+".camera"]=u.getCamera()),u.isAspectChanged(_)&&(C[u.id+".aspectratio"]=u.glplot.getAspectratio(),"manual"!==_[u.id].aspectmode&&(u.fullSceneLayout.aspectmode=_[u.id].aspectmode=C[u.id+".aspectmode"]="manual")),C},L=function(C){if(!1!==C.fullSceneLayout.dragmode){var P=E();C.saveLayout(_),C.graphDiv.emit("plotly_relayout",P)}};return u.glplot.canvas&&(u.glplot.canvas.addEventListener("mouseup",function(){L(u)}),u.glplot.canvas.addEventListener("wheel",function(C){if(S._context._scrollZoom.gl3d){if(u.camera._ortho){var P=C.deltaX>C.deltaY?1.1:.9090909090909091,I=u.glplot.getAspectratio();u.glplot.setAspectratio({x:P*I.x,y:P*I.y,z:P*I.z})}L(u)}},!!s&&{passive:!1}),u.glplot.canvas.addEventListener("mousemove",function(){if(!1!==u.fullSceneLayout.dragmode&&0!==u.camera.mouseListener.buttons){var C=E();u.graphDiv.emit("plotly_relayouting",C)}}),u.staticMode||u.glplot.canvas.addEventListener("webglcontextlost",function(C){S&&S.emit&&S.emit("plotly_webglcontextlost",{event:C,layer:u.id})},!1)),u.glplot.oncontextloss=function(){u.recoverContext()},u.glplot.onrender=function(){u.render()},!0},y.render=function(){var u,S=this,_=S.graphDiv,E=S.svgContainer,L=S.container.getBoundingClientRect();_._fullLayout._calcInverseTransform(_);var I=L.width*_._fullLayout._invScaleX,U=L.height*_._fullLayout._invScaleY;E.setAttributeNS(null,"viewBox","0 0 "+I+" "+U),E.setAttributeNS(null,"width",I),E.setAttributeNS(null,"height",U),v(S),S.glplot.axes.update(S.axesOptions);for(var z=Object.keys(S.traces),H=null,F=S.glplot.selection,N=0;N<z.length;++N)"skip"!==(u=S.traces[z[N]]).data.hoverinfo&&u.handlePick(F)&&(H=u),u.setContourLevels&&u.setContourLevels();function B(me,de,he){var ve=S.fullSceneLayout[me+"axis"];return"log"!==ve.type&&(de=ve.d2l(de)),n.hoverLabelText(ve,de,he)}if(null!==H){var J,j=p(S.glplot.cameraParams,F.dataCoordinate),G=_._fullData[(u=H.data).index],V=F.index,W={xLabel:B("x",F.traceCoordinate[0],u.xhoverformat),yLabel:B("y",F.traceCoordinate[1],u.yhoverformat),zLabel:B("z",F.traceCoordinate[2],u.zhoverformat)},X=i.castHoverinfo(G,S.fullLayout,V),K=(X||"").split("+"),re=X&&"all"===X;G.hovertemplate||re||(-1===K.indexOf("x")&&(W.xLabel=void 0),-1===K.indexOf("y")&&(W.yLabel=void 0),-1===K.indexOf("z")&&(W.zLabel=void 0),-1===K.indexOf("text")&&(F.textLabel=void 0),-1===K.indexOf("name")&&(H.name=void 0));var ee=[];"cone"===u.type||"streamtube"===u.type?(W.uLabel=B("x",F.traceCoordinate[3],u.uhoverformat),(re||-1!==K.indexOf("u"))&&ee.push("u: "+W.uLabel),W.vLabel=B("y",F.traceCoordinate[4],u.vhoverformat),(re||-1!==K.indexOf("v"))&&ee.push("v: "+W.vLabel),W.wLabel=B("z",F.traceCoordinate[5],u.whoverformat),(re||-1!==K.indexOf("w"))&&ee.push("w: "+W.wLabel),W.normLabel=F.traceCoordinate[6].toPrecision(3),(re||-1!==K.indexOf("norm"))&&ee.push("norm: "+W.normLabel),"streamtube"===u.type&&(W.divergenceLabel=F.traceCoordinate[7].toPrecision(3),(re||-1!==K.indexOf("divergence"))&&ee.push("divergence: "+W.divergenceLabel)),F.textLabel&&ee.push(F.textLabel),J=ee.join("<br>")):"isosurface"===u.type||"volume"===u.type?(W.valueLabel=n.hoverLabelText(S._mockAxis,S._mockAxis.d2l(F.traceCoordinate[3]),u.valuehoverformat),ee.push("value: "+W.valueLabel),F.textLabel&&ee.push(F.textLabel),J=ee.join("<br>")):J=F.textLabel;var ie={x:F.traceCoordinate[0],y:F.traceCoordinate[1],z:F.traceCoordinate[2],data:G._input,fullData:G,curveNumber:G.index,pointNumber:V};i.appendArrayPointValue(ie,G,V),u._module.eventData&&(ie=G._module.eventData(ie,F,G,{},V));var oe={points:[ie]};if(S.fullSceneLayout.hovermode){var ce=[];i.loneHover({trace:G,x:(.5+.5*j[0]/j[3])*I,y:(.5-.5*j[1]/j[3])*U,xLabel:W.xLabel,yLabel:W.yLabel,zLabel:W.zLabel,text:J,name:H.name,color:i.castHoverOption(G,V,"bgcolor")||H.color,borderColor:i.castHoverOption(G,V,"bordercolor"),fontFamily:i.castHoverOption(G,V,"font.family"),fontSize:i.castHoverOption(G,V,"font.size"),fontColor:i.castHoverOption(G,V,"font.color"),nameLength:i.castHoverOption(G,V,"namelength"),textAlign:i.castHoverOption(G,V,"align"),hovertemplate:o.castOption(G,V,"hovertemplate"),hovertemplateLabels:o.extendFlat({},ie,W),eventData:[ie]},{container:E,gd:_,inOut_bbox:ce}),ie.bbox=ce[0]}_.emit(F.buttons&&F.distance<5?"plotly_click":"plotly_hover",oe),this.oldEventData=oe}else i.loneUnhover(E),this.oldEventData&&_.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;S.drawAnnotations(S)},y.recoverContext=function(){var u=this;u.glplot.dispose();var S=function(){u.glplot.gl.isContextLost()?requestAnimationFrame(S):u.initializeGLPlot()?u.plot.apply(u,u.plotArgs):o.error("Catastrophic and unrecoverable WebGL error. Context lost.")};requestAnimationFrame(S)};var m=["xaxis","yaxis","zaxis"];function w(u,S,_){for(var E=u.fullSceneLayout,L=0;L<3;L++){var C=m[L],P=C.charAt(0),I=E[C],U=S[P],z=S[P+"calendar"],H=S["_"+P+"length"];if(o.isArrayOrTypedArray(U))for(var F,N=0;N<(H||U.length);N++)if(o.isArrayOrTypedArray(U[N]))for(var B=0;B<U[N].length;++B)F=I.d2l(U[N][B],0,z),!isNaN(F)&&isFinite(F)&&(_[0][L]=Math.min(_[0][L],F),_[1][L]=Math.max(_[1][L],F));else F=I.d2l(U[N],0,z),!isNaN(F)&&isFinite(F)&&(_[0][L]=Math.min(_[0][L],F),_[1][L]=Math.max(_[1][L],F));else _[0][L]=Math.min(_[0][L],0),_[1][L]=Math.max(_[1][L],H-1)}}y.plot=function(u,S,_){var E=this;if(E.plotArgs=[u,S,_],!E.glplot.contextLost){var L,C,P,I,U,z,H=S[E.id],F=_[E.id];E.fullLayout=S,E.fullSceneLayout=H,E.axesOptions.merge(S,H),E.spikeOptions.merge(H),E.setViewport(H),E.updateFx(H.dragmode,H.hovermode),E.camera.enableWheel=E.graphDiv._context._scrollZoom.gl3d,E.glplot.setClearColor(a(H.bgcolor)),E.setConvert(U),u?Array.isArray(u)||(u=[u]):u=[];var N=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]];for(P=0;P<u.length;++P)!0===(L=u[P]).visible&&0!==L._length&&w(this,L,N);!function(fe,ye){for(var Me=fe.fullSceneLayout,Ie=Me.annotations||[],Ce=0;Ce<3;Ce++)for(var Re=m[Ce],le=Re.charAt(0),ge=Me[Re],_e=0;_e<Ie.length;_e++){var Fe=Ie[_e];if(Fe.visible){var Ve=ge.r2l(Fe[le]);!isNaN(Ve)&&isFinite(Ve)&&(ye[0][Ce]=Math.min(ye[0][Ce],Ve),ye[1][Ce]=Math.max(ye[1][Ce],Ve))}}}(this,N);var B=[1,1,1];for(I=0;I<3;++I)B[I]=N[1][I]===N[0][I]?1:1/(N[1][I]-N[0][I]);for(E.dataScale=B,E.convertAnnotations(this),P=0;P<u.length;++P)!0===(L=u[P]).visible&&0!==L._length&&((C=E.traces[L.uid])?C.data.type===L.type?C.update(L):(C.dispose(),C=L._module.plot(this,L),E.traces[L.uid]=C):(C=L._module.plot(this,L),E.traces[L.uid]=C),C.name=L.name);var j=Object.keys(E.traces);e:for(P=0;P<j.length;++P){for(I=0;I<u.length;++I)if(u[I].uid===j[P]&&!0===u[I].visible&&0!==u[I]._length)continue e;(C=E.traces[j[P]]).dispose(),delete E.traces[j[P]]}E.glplot.objects.sort(function(fe,ye){return fe._trace.data.index-ye._trace.data.index});var J,G=[[0,0,0],[0,0,0]],V=[],W={};for(P=0;P<3;++P){if((z=(U=H[m[P]]).type)in W?(W[z].acc*=B[P],W[z].count+=1):W[z]={acc:B[P],count:1},U.autorange){G[0][P]=1/0,G[1][P]=-1/0;var X=E.glplot.objects,K=E.fullSceneLayout.annotations||[],re=U._name.charAt(0);for(I=0;I<X.length;I++){var ee=X[I],ie=ee.bounds,oe=ee._trace.data._pad||0;G[0][P]="ErrorBars"===ee.constructor.name&&U._lowerLogErrorBound?Math.min(G[0][P],U._lowerLogErrorBound):Math.min(G[0][P],ie[0][P]/B[P]-oe),G[1][P]=Math.max(G[1][P],ie[1][P]/B[P]+oe)}for(I=0;I<K.length;I++){var ce=K[I];if(ce.visible){var me=U.r2l(ce[re]);G[0][P]=Math.min(G[0][P],me),G[1][P]=Math.max(G[1][P],me)}}if("rangemode"in U&&"tozero"===U.rangemode&&(G[0][P]=Math.min(G[0][P],0),G[1][P]=Math.max(G[1][P],0)),G[0][P]>G[1][P])G[0][P]=-1,G[1][P]=1;else{var de=G[1][P]-G[0][P];G[0][P]-=de/32,G[1][P]+=de/32}if("reversed"===U.autorange){var he=G[0][P];G[0][P]=G[1][P],G[1][P]=he}}else{var ve=U.range;G[0][P]=U.r2l(ve[0]),G[1][P]=U.r2l(ve[1])}G[0][P]===G[1][P]&&(G[0][P]-=1,G[1][P]+=1),V[P]=G[1][P]-G[0][P],E.glplot.setBounds(P,{min:G[0][P]*B[P],max:G[1][P]*B[P]})}var Pe=H.aspectmode;if("cube"===Pe)J=[1,1,1];else if("manual"===Pe){var xe=H.aspectratio;J=[xe.x,xe.y,xe.z]}else{if("auto"!==Pe&&"data"!==Pe)throw new Error("scene.js aspectRatio was not one of the enumerated types");var ke=[1,1,1];for(P=0;P<3;++P){var Ae=W[z=(U=H[m[P]]).type];ke[P]=Math.pow(Ae.acc,1/Ae.count)/B[P]}J="data"===Pe||Math.max.apply(null,ke)/Math.min.apply(null,ke)<=4?ke:[1,1,1]}H.aspectratio.x=F.aspectratio.x=J[0],H.aspectratio.y=F.aspectratio.y=J[1],H.aspectratio.z=F.aspectratio.z=J[2],E.glplot.setAspectratio(H.aspectratio),E.viewInitial.aspectratio||(E.viewInitial.aspectratio={x:H.aspectratio.x,y:H.aspectratio.y,z:H.aspectratio.z}),E.viewInitial.aspectmode||(E.viewInitial.aspectmode=H.aspectmode);var Te=H.domain||null,Q=S._size||null;if(Te&&Q){var se=E.container.style;se.position="absolute",se.left=Q.l+Te.x[0]*Q.w+"px",se.top=Q.t+(1-Te.y[1])*Q.h+"px",se.width=Q.w*(Te.x[1]-Te.x[0])+"px",se.height=Q.h*(Te.y[1]-Te.y[0])+"px"}E.glplot.redraw()}},y.destroy=function(){var u=this;u.glplot&&(u.camera.mouseListener.enabled=!1,u.container.removeEventListener("wheel",u.camera.wheelListener),u.camera=null,u.glplot.dispose(),u.container.parentNode.removeChild(u.container),u.glplot=null)},y.getCamera=function(){var u,S=this;return S.camera.view.recalcMatrix(S.camera.view.lastT()),{up:{x:(u=S.camera).up[0],y:u.up[1],z:u.up[2]},center:{x:u.center[0],y:u.center[1],z:u.center[2]},eye:{x:u.eye[0],y:u.eye[1],z:u.eye[2]},projection:{type:!0===u._ortho?"orthographic":"perspective"}}},y.setViewport=function(u){var S,_=this,E=u.camera;_.camera.lookAt.apply(this,[[(S=E).eye.x,S.eye.y,S.eye.z],[S.center.x,S.center.y,S.center.z],[S.up.x,S.up.y,S.up.z]]),_.glplot.setAspectratio(u.aspectratio),"orthographic"===E.projection.type!==_.camera._ortho&&(_.glplot.redraw(),_.glplot.clearRGBA(),_.glplot.dispose(),_.initializeGLPlot())},y.isCameraChanged=function(u){var U,z,H,F,N,S=this.getCamera(),_=o.nestedProperty(u,this.id+".camera").get(),L=!1;if(void 0===_)L=!0;else{for(var C=0;C<3;C++)for(var P=0;P<3;P++)if(H=P,void 0,void 0,N=["x","y","z"],!(U=_)[(F=["up","center","eye"])[z=C]]||S[F[z]][N[H]]!==U[F[z]][N[H]]){L=!0;break}(!_.projection||S.projection&&S.projection.type!==_.projection.type)&&(L=!0)}return L},y.isAspectChanged=function(u){var S=this.glplot.getAspectratio(),_=o.nestedProperty(u,this.id+".aspectratio").get();return void 0===_||_.x!==S.x||_.y!==S.y||_.z!==S.z},y.saveLayout=function(u){var S,_,E,L,C,P,I=this,U=I.fullLayout,z=I.isCameraChanged(u),H=I.isAspectChanged(u),F=z||H;if(F){var N={};z&&(S=I.getCamera(),E=(_=o.nestedProperty(u,I.id+".camera")).get(),N[I.id+".camera"]=E),H&&(L=I.glplot.getAspectratio(),P=(C=o.nestedProperty(u,I.id+".aspectratio")).get(),N[I.id+".aspectratio"]=P),t.call("_storeDirectGUIEdit",u,U._preGUI,N),z&&(_.set(S),o.nestedProperty(U,I.id+".camera").set(S)),H&&(C.set(L),o.nestedProperty(U,I.id+".aspectratio").set(L),I.glplot.redraw())}return F},y.updateFx=function(u,S){var _=this,E=_.camera;if(E)if("orbit"===u)E.mode="orbit",E.keyBindingMode="rotate";else if("turntable"===u){E.up=[0,0,1],E.mode="turntable",E.keyBindingMode="rotate";var L=_.graphDiv,C=L._fullLayout,P=_.fullSceneLayout.camera,I=P.up.x,U=P.up.y,z=P.up.z;if(z/Math.sqrt(I*I+U*U+z*z)<.999){var H=_.id+".camera.up",F={x:0,y:0,z:1},N={};N[H]=F;var B=L.layout;t.call("_storeDirectGUIEdit",B,C._preGUI,N),P.up=F,o.nestedProperty(B,H).set(F)}}else E.keyBindingMode=u;_.fullSceneLayout.hovermode=S},y.toImage=function(u){var S=this;u||(u="png"),S.staticMode&&S.container.appendChild(k),S.glplot.redraw();var _=S.glplot.gl,E=_.drawingBufferWidth,L=_.drawingBufferHeight;_.bindFramebuffer(_.FRAMEBUFFER,null);var C=new Uint8Array(E*L*4);_.readPixels(0,0,E,L,_.RGBA,_.UNSIGNED_BYTE,C),function(H,F,N){for(var B=0,j=N-1;B<j;++B,--j)for(var J=0;J<F;++J)for(var G=0;G<4;++G){var V=4*(F*B+J)+G,W=4*(F*j+J)+G,X=H[V];H[V]=H[W],H[W]=X}}(C,E,L),function(H,F,N){for(var B=0;B<N;++B)for(var j=0;j<F;++j){var J=4*(F*B+j),G=H[J+3];if(G>0)for(var V=255/G,W=0;W<3;++W)H[J+W]=Math.min(V*H[J+W],255)}}(C,E,L);var P=document.createElement("canvas");P.width=E,P.height=L;var I,U=P.getContext("2d",{willReadFrequently:!0}),z=U.createImageData(E,L);switch(z.data.set(C),U.putImageData(z,0,0),u){case"jpeg":I=P.toDataURL("image/jpeg");break;case"webp":I=P.toDataURL("image/webp");break;default:I=P.toDataURL("image/png")}return S.staticMode&&S.container.removeChild(k),I},y.setConvert=function(){for(var u=0;u<3;u++){var S=this.fullSceneLayout[m[u]];n.setConvert(S,this.fullLayout),S.setScale=o.noop}},y.make4thDimension=function(){var u=this,S=u.graphDiv._fullLayout;u._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},n.setConvert(u._mockAxis,S)},$.exports=g},90060:function($){"use strict";$.exports=function(R,e,k,A){A=A||R.length;for(var l=new Array(A),T=0;T<A;T++)l[T]=[R[T],e[T],k[T]];return l}},10820:function($,R,e){"use strict";var k=e(41940),A=e(85594),l=e(22399),T=e(29241),b=e(53777),d=e(35025),s=e(1426).extendFlat,t=k({editType:"calc"});t.family.dflt='"Open Sans", verdana, arial, sans-serif',t.size.dflt=12,t.color.dflt=l.defaultLine,$.exports={font:t,title:{text:{valType:"string",editType:"layoutstyle"},font:k({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:s(d({editType:"layoutstyle"}),{}),editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:l.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:l.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:l.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:T.newshape,activeshape:T.activeshape,newselection:b.newselection,activeselection:b.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:s({},A.transition,{editType:"none"}),_deprecated:{title:{valType:"string",editType:"layoutstyle"},titlefont:k({editType:"layoutstyle"})}}},77734:function($,R,e){"use strict";var k=e(78607),A='\xa9 <a target="_blank" href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',l=['\xa9 <a target="_blank" href="https://carto.com/">Carto</a>',A].join(" "),T=['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://www.openstreetmap.org/copyright">ODbL</a>'].join(" "),b={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:A,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}]},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}]},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution:l,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/light_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-positron",type:"raster",source:"plotly-carto-positron",minzoom:0,maxzoom:22}]},"carto-darkmatter":{id:"carto-darkmatter",version:8,sources:{"plotly-carto-darkmatter":{type:"raster",attribution:l,tiles:["https://cartodb-basemaps-c.global.ssl.fastly.net/dark_all/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-carto-darkmatter",type:"raster",source:"plotly-carto-darkmatter",minzoom:0,maxzoom:22}]},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:T,tiles:["https://stamen-tiles.a.ssl.fastly.net/terrain/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}]},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:T,tiles:["https://stamen-tiles.a.ssl.fastly.net/toner/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}]},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:['Map tiles by <a target="_blank" href="https://stamen.com">Stamen Design</a>','under <a target="_blank" href="https://creativecommons.org/licenses/by/3.0">CC BY 3.0</a>',"|",'Data by <a target="_blank" href="https://openstreetmap.org">OpenStreetMap</a> contributors','under <a target="_blank" href="https://creativecommons.org/licenses/by-sa/3.0">CC BY SA</a>'].join(" "),tiles:["https://stamen-tiles.a.ssl.fastly.net/watercolor/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}]}},d=k(b);$.exports={requiredVersion:"1.10.1",styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:b,styleValuesNonMapbox:d,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install mapbox-gl@1.10.1."].join("\n"),noAccessTokenErrorMsg:["Missing Mapbox access token.","Mapbox trace type require a Mapbox access token to be registered.","For example:","  Plotly.newPlot(gd, data, layout, { mapboxAccessToken: 'my-access-token' });","More info here: https://www.mapbox.com/help/define-access-token/"].join("\n"),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",d.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join("\n"),multipleTokensErrorMsg:["Set multiple mapbox access token across different mapbox subplot,","using first token found as mapbox-gl does not allow multipleaccess tokens on the same page."].join("\n"),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":'content: ""; cursor: pointer; position: absolute; background-image: url(\'data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E\'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;',"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":'display:block; width: 21px; height: 21px; background-image: url(\'data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E\')'}}},13056:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l){var T=A.split(" "),b=T[0],d=T[1],s=k.isArrayOrTypedArray(l)?k.mean(l):l,t=.5+s/100,o=1.5+s/100,r=["",""],n=[0,0];switch(b){case"top":r[0]="top",n[1]=-o;break;case"bottom":r[0]="bottom",n[1]=o}switch(d){case"left":r[1]="right",n[0]=-t;break;case"right":r[1]="left",n[0]=t}return{anchor:r[0]&&r[1]?r.join("-"):r[0]?r[0]:r[1]?r[1]:"center",offset:n}}},50101:function($,R,e){"use strict";var k=e(44517),A=e(71828),l=A.strTranslate,T=A.strScale,b=e(27659).AU,d=e(77922),s=e(39898),t=e(91424),o=e(63893),r=e(10481),n="mapbox",i=R.constants=e(77734);function a(c){return"string"==typeof c&&(-1!==i.styleValuesMapbox.indexOf(c)||0===c.indexOf("mapbox://"))}R.name=n,R.attr="subplot",R.idRoot=n,R.idRegex=R.attrRegex=A.counterRegex(n),R.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},R.layoutAttributes=e(23585),R.supplyLayoutDefaults=e(77882),R.plot=function(c){var p=c._fullLayout,f=c.calcdata,x=p._subplots.mapbox;if(k.version!==i.requiredVersion)throw new Error(i.wrongVersionErrorMsg);var v=function(u,S){var _=u._fullLayout;if(""===u._context.mapboxAccessToken)return"";for(var E=[],L=[],C=!1,P=!1,I=0;I<S.length;I++){var U=_[S[I]],z=U.accesstoken;a(U.style)&&(z?A.pushUnique(E,z):(a(U._input.style)&&(A.error("Uses Mapbox map style, but did not set an access token."),C=!0),P=!0)),z&&A.pushUnique(L,z)}if(P){var H=C?i.noAccessTokenErrorMsg:i.missingStyleErrorMsg;throw A.error(H),new Error(H)}return E.length?(E.length>1&&A.warn(i.multipleTokensErrorMsg),E[0]):(L.length&&A.log(["Listed mapbox access token(s)",L.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}(c,x);k.accessToken=v;for(var g=0;g<x.length;g++){var y=x[g],h=b(f,n,y),m=p[y],w=m._subplot;w||(w=new r(c,y),p[y]._subplot=w),w.viewInitial||(w.viewInitial={center:A.extendFlat({},m.center),zoom:m.zoom,bearing:m.bearing,pitch:m.pitch}),w.plot(h,p,c._promises)}},R.clean=function(c,p,f,x){for(var v=x._subplots.mapbox||[],g=0;g<v.length;g++){var y=v[g];!p[y]&&x[y]._subplot&&x[y]._subplot.destroy()}},R.toSVG=function(c){for(var p=c._fullLayout,f=p._subplots.mapbox,x=p._size,v=0;v<f.length;v++){var g=p[f[v]],y=g.domain,h=g._subplot.toImage("png");p._glimages.append("svg:image").attr({xmlns:d.svg,"xlink:href":h,x:x.l+x.w*y.x[0],y:x.t+x.h*(1-y.y[1]),width:x.w*(y.x[1]-y.x[0]),height:x.h*(y.y[1]-y.y[0]),preserveAspectRatio:"none"});var m=s.select(g._subplot.div);if(null!==m.select(".mapboxgl-ctrl-logo").node().offsetParent){var w=p._glimages.append("g");w.attr("transform",l(x.l+x.w*y.x[0]+10,x.t+x.h*(1-y.y[0])-31)),w.append("path").attr("d",i.mapboxLogo.path0).style({opacity:.9,fill:"#ffffff","enable-background":"new"}),w.append("path").attr("d",i.mapboxLogo.path1).style("opacity",.35).style("enable-background","new"),w.append("path").attr("d",i.mapboxLogo.path2).style("opacity",.35).style("enable-background","new"),w.append("polygon").attr("points",i.mapboxLogo.polygon).style({opacity:.9,fill:"#ffffff","enable-background":"new"})}var u=m.select(".mapboxgl-ctrl-attrib").text().replace("Improve this map",""),S=p._glimages.append("g"),_=S.append("text");_.text(u).classed("static-attribution",!0).attr({"font-size":12,"font-family":"Arial",color:"rgba(0, 0, 0, 0.75)","text-anchor":"end","data-unformatted":u});var E=t.bBox(_.node()),L=x.w*(y.x[1]-y.x[0]);if(E.width>L/2){var C=u.split("|").join("<br>");_.text(C).attr("data-unformatted",C).call(o.convertToTspans,c),E=t.bBox(_.node())}_.attr("transform",l(-3,8-E.height)),S.insert("rect",".static-attribution").attr({x:-E.width-6,y:-E.height-3,width:E.width+6,height:E.height+3,fill:"rgba(255, 255, 255, 0.75)"});var P=1;E.width+6>L&&(P=L/(E.width+6));var I=[x.l+x.w*y.x[1],x.t+x.h*(1-y.y[0])];S.attr("transform",l(I[0],I[1])+T(P))}},R.updateFx=function(c){for(var p=c._fullLayout,f=p._subplots.mapbox,x=0;x<f.length;x++)p[f[x]]._subplot.updateFx(p)}},67911:function($,R,e){"use strict";var k=e(71828),A=e(63893).sanitizeHTML,l=e(13056),T=e(77734);function b(o,r){this.subplot=o,this.uid=o.uid+"-"+r,this.index=r,this.idSource="source-"+this.uid,this.idLayer=T.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var d=b.prototype;function s(o){if(!o.visible)return!1;var r=o.source;if(Array.isArray(r)&&r.length>0){for(var n=0;n<r.length;n++)if("string"!=typeof r[n]||0===r[n].length)return!1;return!0}return k.isPlainObject(r)||"string"==typeof r&&r.length>0}function t(o){var r={},n={};switch(o.type){case"circle":k.extendFlat(n,{"circle-radius":o.circle.radius,"circle-color":o.color,"circle-opacity":o.opacity});break;case"line":k.extendFlat(n,{"line-width":o.line.width,"line-color":o.color,"line-opacity":o.opacity,"line-dasharray":o.line.dash});break;case"fill":k.extendFlat(n,{"fill-color":o.color,"fill-outline-color":o.fill.outlinecolor,"fill-opacity":o.opacity});break;case"symbol":var i=o.symbol,a=l(i.textposition,i.iconsize);k.extendFlat(r,{"icon-image":i.icon+"-15","icon-size":i.iconsize/10,"text-field":i.text,"text-size":i.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":i.placement}),k.extendFlat(n,{"icon-color":o.color,"text-color":i.textfont.color,"text-opacity":o.opacity});break;case"raster":k.extendFlat(n,{"raster-fade-duration":0,"raster-opacity":o.opacity})}return{layout:r,paint:n}}d.update=function(o){this.visible?this.needsNewImage(o)?this.updateImage(o):this.needsNewSource(o)?(this.removeLayer(),this.updateSource(o),this.updateLayer(o)):this.needsNewLayer(o)?this.updateLayer(o):this.updateStyle(o):(this.updateSource(o),this.updateLayer(o)),this.visible=s(o)},d.needsNewImage=function(o){return this.subplot.map.getSource(this.idSource)&&"image"===this.sourceType&&"image"===o.sourcetype&&(this.source!==o.source||JSON.stringify(this.coordinates)!==JSON.stringify(o.coordinates))},d.needsNewSource=function(o){return this.sourceType!==o.sourcetype||JSON.stringify(this.source)!==JSON.stringify(o.source)||this.layerType!==o.type},d.needsNewLayer=function(o){return this.layerType!==o.type||this.below!==this.subplot.belowLookup["layout-"+this.index]},d.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]},d.updateImage=function(o){this.subplot.map.getSource(this.idSource).updateImage({url:o.source,coordinates:o.coordinates});var r=this.findFollowingMapboxLayerId(this.lookupBelow());null!==r&&this.subplot.map.moveLayer(this.idLayer,r)},d.updateSource=function(o){var i,a,c,p,f,r=this.subplot.map;if(r.getSource(this.idSource)&&r.removeSource(this.idSource),this.sourceType=o.sourcetype,this.source=o.source,s(o)){var n=(p=(i=o).source,f={type:c=i.sourcetype},"geojson"===c?a="data":"vector"===c?a="string"==typeof p?"url":"tiles":"raster"===c?(a="tiles",f.tileSize=256):"image"===c&&(a="url",f.coordinates=i.coordinates),f[a]=p,i.sourceattribution&&(f.attribution=A(i.sourceattribution)),f);r.addSource(this.idSource,n)}},d.findFollowingMapboxLayerId=function(o){if("traces"===o)for(var r=this.subplot.getMapLayers(),n=0;n<r.length;n++){var i=r[n].id;if("string"==typeof i&&0===i.indexOf(T.traceLayerPrefix)){o=i;break}}return o},d.updateLayer=function(o){var r=this.subplot,n=t(o),i=this.lookupBelow(),a=this.findFollowingMapboxLayerId(i);this.removeLayer(),s(o)&&r.addLayer({id:this.idLayer,source:this.idSource,"source-layer":o.sourcelayer||"",type:o.type,minzoom:o.minzoom,maxzoom:o.maxzoom,layout:n.layout,paint:n.paint},a),this.layerType=o.type,this.below=i},d.updateStyle=function(o){if(s(o)){var r=t(o);this.subplot.setOptions(this.idLayer,"setLayoutProperty",r.layout),this.subplot.setOptions(this.idLayer,"setPaintProperty",r.paint)}},d.removeLayer=function(){var o=this.subplot.map;o.getLayer(this.idLayer)&&o.removeLayer(this.idLayer)},d.dispose=function(){var o=this.subplot.map;o.getLayer(this.idLayer)&&o.removeLayer(this.idLayer),o.getSource(this.idSource)&&o.removeSource(this.idSource)},$.exports=function(o,r,n){var i=new b(o,r);return i.update(n),i}},23585:function($,R,e){"use strict";var k=e(71828),A=e(7901).defaultLine,l=e(27670).Y,T=e(41940),b=e(82196).textposition,d=e(30962).overrideAll,s=e(44467).templatedArray,t=e(77734),o=T({});o.family.dflt="Open Sans Regular, Arial Unicode MS Regular",($.exports=d({_arrayAttrRegexps:[k.counterRegex("mapbox",".layers",!0)],domain:l({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:t.styleValuesMapbox.concat(t.styleValuesNonMapbox),dflt:t.styleValueDflt},center:{lon:{valType:"number",dflt:0},lat:{valType:"number",dflt:0}},zoom:{valType:"number",dflt:1},bearing:{valType:"number",dflt:0},pitch:{valType:"number",dflt:0},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:s("layer",{visible:{valType:"boolean",dflt:!0},sourcetype:{valType:"enumerated",values:["geojson","vector","raster","image"],dflt:"geojson"},source:{valType:"any"},sourcelayer:{valType:"string",dflt:""},sourceattribution:{valType:"string"},type:{valType:"enumerated",values:["circle","line","fill","symbol","raster"],dflt:"circle"},coordinates:{valType:"any"},below:{valType:"string"},color:{valType:"color",dflt:A},opacity:{valType:"number",min:0,max:1,dflt:1},minzoom:{valType:"number",min:0,max:24,dflt:0},maxzoom:{valType:"number",min:0,max:24,dflt:24},circle:{radius:{valType:"number",dflt:15}},line:{width:{valType:"number",dflt:2},dash:{valType:"data_array"}},fill:{outlinecolor:{valType:"color",dflt:A}},symbol:{icon:{valType:"string",dflt:"marker"},iconsize:{valType:"number",dflt:10},text:{valType:"string",dflt:""},placement:{valType:"enumerated",values:["point","line","line-center"],dflt:"point"},textfont:o,textposition:k.extendFlat({},b,{arrayOk:!1})}})},"plot","from-root")).uirevision={valType:"any",editType:"none"}},77882:function($,R,e){"use strict";var k=e(71828),A=e(49119),l=e(85501),T=e(23585);function b(s,t,o,r){o("accesstoken",r.accessToken),o("style"),o("center.lon"),o("center.lat"),o("zoom"),o("bearing"),o("pitch");var n=o("bounds.west"),i=o("bounds.east"),a=o("bounds.south"),c=o("bounds.north");void 0!==n&&void 0!==i&&void 0!==a&&void 0!==c||delete t.bounds,l(s,t,{name:"layers",handleItemDefaults:d}),t._input=s}function d(s,t){function o(c,p){return k.coerce(s,t,T.layers,c,p)}if(o("visible")){var r,n=o("sourcetype"),i="raster"===n||"image"===n;o("source"),o("sourceattribution"),"vector"===n&&o("sourcelayer"),"image"===n&&o("coordinates"),i&&(r="raster");var a=o("type",r);i&&"raster"!==a&&(a=t.type="raster",k.log("Source types *raster* and *image* must drawn *raster* layer type.")),o("below"),o("color"),o("opacity"),o("minzoom"),o("maxzoom"),"circle"===a&&o("circle.radius"),"line"===a&&(o("line.width"),o("line.dash")),"fill"===a&&o("fill.outlinecolor"),"symbol"===a&&(o("symbol.icon"),o("symbol.iconsize"),o("symbol.text"),k.coerceFont(o,"symbol.textfont"),o("symbol.textposition"),o("symbol.placement"))}}$.exports=function(s,t,o){A(s,t,o,{type:"mapbox",attributes:T,handleDefaults:b,partition:"y",accessToken:t._mapboxAccessToken})}},10481:function($,R,e){"use strict";var k=e(44517),A=e(71828),l=e(41327),T=e(73972),b=e(89298),d=e(28569),s=e(30211),t=e(64505),o=t.drawMode,r=t.selectMode,n=e(47322).prepSelect,i=e(47322).clearOutline,a=e(47322).clearSelectionsCache,c=e(47322).selectOnClick,p=e(77734),f=e(67911);function x(w,u){this.id=u,this.gd=w;var S=w._fullLayout,_=w._context;this.container=S._glcontainer.node(),this.isStatic=_.staticPlot,this.uid=S._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(S),this.map=null,this.accessToken=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var v=x.prototype;v.plot=function(w,u,S){var _,E=this;E.map&&u[E.id].accesstoken!==E.accessToken&&(E.map.remove(),E.map=null,E.styleObj=null,E.traceHash={},E.layerList=[]),_=new Promise(E.map?function(C,P){E.updateMap(w,u,C,P)}:function(C,P){E.createMap(w,u,C,P)}),S.push(_)},v.createMap=function(w,u,S,_){var E=this,L=u[E.id],C=E.styleObj=y(L.style);E.accessToken=L.accesstoken;var P=L.bounds,I=P?[[P.west,P.south],[P.east,P.north]]:null,U=E.map=new k.Map({container:E.div,style:C.style,center:m(L.center),zoom:L.zoom,bearing:L.bearing,pitch:L.pitch,maxBounds:I,interactive:!E.isStatic,preserveDrawingBuffer:E.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new k.AttributionControl({compact:!0}));U._canvas.style.left="0px",U._canvas.style.top="0px",E.rejectOnError(_),E.isStatic||E.initFx(w,u);var z=[];z.push(new Promise(function(H){U.once("load",H)})),z=z.concat(l.fetchTraceGeoData(w)),Promise.all(z).then(function(){E.fillBelowLookup(w,u),E.updateData(w),E.updateLayout(u),E.resolveOnRender(S)}).catch(_)},v.updateMap=function(w,u,S,_){var E=this,L=E.map,C=u[this.id];E.rejectOnError(_);var P=[],I=y(C.style);JSON.stringify(E.styleObj)!==JSON.stringify(I)&&(E.styleObj=I,L.setStyle(I.style),E.traceHash={},P.push(new Promise(function(U){L.once("styledata",U)}))),P=P.concat(l.fetchTraceGeoData(w)),Promise.all(P).then(function(){E.fillBelowLookup(w,u),E.updateData(w),E.updateLayout(u),E.resolveOnRender(S)}).catch(_)},v.fillBelowLookup=function(w,u){var S,_,E=u[this.id].layers,L=this.belowLookup={},C=!1;for(S=0;S<w.length;S++){var P=w[S][0].trace,I=P._module;"string"==typeof P.below?_=P.below:I.getBelow&&(_=I.getBelow(P,this)),""===_&&(C=!0),L["trace-"+P.uid]=_||""}for(S=0;S<E.length;S++){var U=E[S];L["layout-"+S]=_="string"==typeof U.below?U.below:C?"traces":""}var z,H,F={};for(z in L)F[_=L[z]]?F[_].push(z):F[_]=[z];for(_ in F){var N=F[_];if(N.length>1)for(S=0;S<N.length;S++)0===(z=N[S]).indexOf("trace-")?(H=z.split("trace-")[1],this.traceHash[H]&&(this.traceHash[H].below=null)):0===z.indexOf("layout-")&&(H=z.split("layout-")[1],this.layerList[H]&&(this.layerList[H].below=null))}};var g={choroplethmapbox:0,densitymapbox:1,scattermapbox:2};function y(w){var u={};return A.isPlainObject(w)?(u.id=w.id,u.style=w):"string"==typeof w?(u.id=w,u.style=-1!==p.styleValuesMapbox.indexOf(w)?h(w):p.stylesNonMapbox[w]?p.stylesNonMapbox[w]:w):(u.id=p.styleValueDflt,u.style=h(p.styleValueDflt)),u.transition={duration:0,delay:0},u}function h(w){return p.styleUrlPrefix+w+"-"+p.styleUrlSuffix}function m(w){return[w.lon,w.lat]}v.updateData=function(w){var u,S,_,E,L=this.traceHash,C=w.slice().sort(function(H,F){return g[H[0].trace.type]-g[F[0].trace.type]});for(_=0;_<C.length;_++){var P=C[_],I=!1;(u=L[(S=P[0].trace).uid])&&(u.type===S.type?(u.update(P),I=!0):u.dispose()),!I&&S._module&&(L[S.uid]=S._module.plot(this,P))}var U=Object.keys(L);e:for(_=0;_<U.length;_++){var z=U[_];for(E=0;E<w.length;E++)if(z===(S=w[E][0].trace).uid)continue e;(u=L[z]).dispose(),delete L[z]}},v.updateLayout=function(w){var u=this.map,S=w[this.id];this.dragging||this.wheeling||(u.setCenter(m(S.center)),u.setZoom(S.zoom),u.setBearing(S.bearing),u.setPitch(S.pitch)),this.updateLayers(w),this.updateFramework(w),this.updateFx(w),this.map.resize(),this.gd._context._scrollZoom.mapbox?u.scrollZoom.enable():u.scrollZoom.disable()},v.resolveOnRender=function(w){var u=this.map;u.on("render",function S(){u.loaded()&&(u.off("render",S),setTimeout(w,10))})},v.rejectOnError=function(w){var u=this.map;function S(){w(new Error(p.mapOnErrorMsg))}u.once("error",S),u.once("style.error",S),u.once("source.error",S),u.once("tile.error",S),u.once("layer.error",S)},v.createFramework=function(w){var u=this,S=u.div=document.createElement("div");S.id=u.uid,S.style.position="absolute",u.container.appendChild(S),u.xaxis={_id:"x",c2p:function(_){return u.project(_).x}},u.yaxis={_id:"y",c2p:function(_){return u.project(_).y}},u.updateFramework(w),u.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},b.setConvert(u.mockAxis,w)},v.initFx=function(w,u){var S=this,_=S.gd,E=S.map;function L(){s.loneUnhover(u._hoverlayer)}function C(){var P=S.getView();_.emit("plotly_relayouting",S.getViewEditsWithDerived(P))}E.on("moveend",function(P){if(S.map){var I=_._fullLayout;if(P.originalEvent||S.wheeling){var U=I[S.id];T.call("_storeDirectGUIEdit",_.layout,I._preGUI,S.getViewEdits(U));var z=S.getView();U._input.center=U.center=z.center,U._input.zoom=U.zoom=z.zoom,U._input.bearing=U.bearing=z.bearing,U._input.pitch=U.pitch=z.pitch,_.emit("plotly_relayout",S.getViewEditsWithDerived(z))}P.originalEvent&&"mouseup"===P.originalEvent.type?S.dragging=!1:S.wheeling&&(S.wheeling=!1),I._rehover&&I._rehover()}}),E.on("wheel",function(){S.wheeling=!0}),E.on("mousemove",function(P){var I=S.div.getBoundingClientRect(),U=[P.originalEvent.offsetX,P.originalEvent.offsetY];P.target.getBoundingClientRect=function(){return I},S.xaxis.p2c=function(){return E.unproject(U).lng},S.yaxis.p2c=function(){return E.unproject(U).lat},_._fullLayout._rehover=function(){_._fullLayout._hoversubplot===S.id&&_._fullLayout[S.id]&&s.hover(_,P,S.id)},s.hover(_,P,S.id),_._fullLayout._hoversubplot=S.id}),E.on("dragstart",function(){S.dragging=!0,L()}),E.on("zoomstart",L),E.on("mouseout",function(){_._fullLayout._hoversubplot=null}),E.on("drag",C),E.on("zoom",C),E.on("dblclick",function(){var P=_._fullLayout[S.id];T.call("_storeDirectGUIEdit",_.layout,_._fullLayout._preGUI,S.getViewEdits(P));var I=S.viewInitial;E.setCenter(m(I.center)),E.setZoom(I.zoom),E.setBearing(I.bearing),E.setPitch(I.pitch);var U=S.getView();P._input.center=P.center=U.center,P._input.zoom=P.zoom=U.zoom,P._input.bearing=P.bearing=U.bearing,P._input.pitch=P.pitch=U.pitch,_.emit("plotly_doubleclick",null),_.emit("plotly_relayout",S.getViewEditsWithDerived(U))}),S.clearOutline=function(){a(S.dragOptions),i(S.dragOptions.gd)},S.onClickInPanFn=function(P){return function(I){var U=_._fullLayout.clickmode;U.indexOf("select")>-1&&c(I.originalEvent,_,[S.xaxis],[S.yaxis],S.id,P),U.indexOf("event")>-1&&s.click(_,I.originalEvent)}}},v.updateFx=function(w){var u=this,S=u.map;if(!u.isStatic){var L=w.dragmode;u.dragOptions=A.extendDeep(u.dragOptions||{},{dragmode:w.dragmode,element:u.div,gd:u.gd,plotinfo:{id:u.id,domain:w[u.id].domain,xaxis:u.xaxis,yaxis:u.yaxis,fillRangeItems:function(I,U){U.isRect?(I.range={})[u.id]=[P([U.xmin,U.ymin]),P([U.xmax,U.ymax])]:(I.lassoPoints={})[u.id]=U.map(P)}},xaxes:[u.xaxis],yaxes:[u.yaxis],subplot:u.id}),S.off("click",u.onClickInPanHandler),r(L)||o(L)?(S.dragPan.disable(),S.on("zoomstart",u.clearOutline),u.dragOptions.prepFn=function(I,U,z){n(I,U,z,u.dragOptions,L)},d.init(u.dragOptions)):(S.dragPan.enable(),S.off("zoomstart",u.clearOutline),u.div.onmousedown=null,u.div.ontouchstart=null,u.div.removeEventListener("touchstart",u.div._ontouchstart),u.onClickInPanHandler=u.onClickInPanFn(u.dragOptions),S.on("click",u.onClickInPanHandler))}function P(I){var U=u.map.unproject(I);return[U.lng,U.lat]}},v.updateFramework=function(w){var u=w[this.id].domain,S=w._size,_=this.div.style;_.width=S.w*(u.x[1]-u.x[0])+"px",_.height=S.h*(u.y[1]-u.y[0])+"px",_.left=S.l+u.x[0]*S.w+"px",_.top=S.t+(1-u.y[1])*S.h+"px",this.xaxis._offset=S.l+u.x[0]*S.w,this.xaxis._length=S.w*(u.x[1]-u.x[0]),this.yaxis._offset=S.t+(1-u.y[1])*S.h,this.yaxis._length=S.h*(u.y[1]-u.y[0])},v.updateLayers=function(w){var u,S=w[this.id].layers,_=this.layerList;if(S.length!==_.length){for(u=0;u<_.length;u++)_[u].dispose();for(_=this.layerList=[],u=0;u<S.length;u++)_.push(f(this,u,S[u]))}else for(u=0;u<S.length;u++)_[u].update(S[u])},v.destroy=function(){this.map&&(this.map.remove(),this.map=null,this.container.removeChild(this.div))},v.toImage=function(){return this.map.stop(),this.map.getCanvas().toDataURL()},v.setOptions=function(w,u,S){for(var _ in S)this.map[u](w,_,S[_])},v.getMapLayers=function(){return this.map.getStyle().layers},v.addLayer=function(w,u){var S=this.map;if("string"==typeof u){if(""===u)return void S.addLayer(w,u);for(var _=this.getMapLayers(),E=0;E<_.length;E++)if(u===_[E].id)return void S.addLayer(w,u);A.warn(["Trying to add layer with *below* value",u,"referencing a layer that does not exist","or that does not yet exist."].join(" "))}S.addLayer(w)},v.project=function(w){return this.map.project(new k.LngLat(w[0],w[1]))},v.getView=function(){var w=this.map,u=w.getCenter(),S={lon:u.lng,lat:u.lat},_=w.getCanvas(),E=parseInt(_.style.width),L=parseInt(_.style.height);return{center:S,zoom:w.getZoom(),bearing:w.getBearing(),pitch:w.getPitch(),_derived:{coordinates:[w.unproject([0,0]).toArray(),w.unproject([E,0]).toArray(),w.unproject([E,L]).toArray(),w.unproject([0,L]).toArray()]}}},v.getViewEdits=function(w){for(var u=this.id,S=["center","zoom","bearing","pitch"],_={},E=0;E<S.length;E++){var L=S[E];_[u+"."+L]=w[L]}return _},v.getViewEditsWithDerived=function(w){var u=this.id,S=this.getViewEdits(w);return S[u+"._derived"]=w._derived,S},$.exports=x},35025:function($){"use strict";$.exports=function(R){var e=R.editType;return{t:{valType:"number",dflt:0,editType:e},r:{valType:"number",dflt:0,editType:e},b:{valType:"number",dflt:0,editType:e},l:{valType:"number",dflt:0,editType:e},editType:e}}},74875:function($,R,e){"use strict";var k=e(39898),A=e(84096).Dq,l=e(60721).FF,T=e(92770),b=e(73972),d=e(86281),s=e(44467),t=e(71828),o=e(7901),r=e(50606).BADNUM,n=e(41675),i=e(51873).clearOutline,a=e(21479),c=e(85594),p=e(31391),f=e(27659).a0,x=t.relinkPrivateKeys,v=t._,g=$.exports={};t.extendFlat(g,b),g.attributes=e(9012),g.attributes.type.values=g.allTypes,g.fontAttrs=e(41940),g.layoutAttributes=e(10820),g.fontWeight="normal";var y=g.transformsRegistry,h=e(31137);g.executeAPICommand=h.executeAPICommand,g.computeAPICommandBindings=h.computeAPICommandBindings,g.manageCommandObserver=h.manageCommandObserver,g.hasSimpleAPICommandBindings=h.hasSimpleAPICommandBindings,g.redrawText=function(F){return F=t.getGraphDiv(F),new Promise(function(N){setTimeout(function(){F._fullLayout&&(b.getComponentMethod("annotations","draw")(F),b.getComponentMethod("legend","draw")(F),b.getComponentMethod("colorbar","draw")(F),N(g.previousPromises(F)))},300)})},g.resize=function(F){var N;F=t.getGraphDiv(F);var B=new Promise(function(j,J){F&&!t.isHidden(F)||J(new Error("Resize must be passed a displayed plot div element.")),F._redrawTimer&&clearTimeout(F._redrawTimer),F._resolveResize&&(N=F._resolveResize),F._resolveResize=j,F._redrawTimer=setTimeout(function(){if(!F.layout||F.layout.width&&F.layout.height||t.isHidden(F))j(F);else{delete F.layout.width,delete F.layout.height;var G=F.changed;F.autoplay=!0,b.call("relayout",F,{autosize:!0}).then(function(){F.changed=G,F._resolveResize===j&&(delete F._resolveResize,j(F))})}},100)});return N&&N(B),B},g.previousPromises=function(F){if((F._promises||[]).length)return Promise.all(F._promises).then(function(){F._promises=[]})},g.addLinks=function(F){if(F._context.showLink||F._context.showSources){var N=F._fullLayout,B=t.ensureSingle(N._paper,"text","js-plot-link-container",function(X){X.style({"font-family":'"Open Sans", Arial, sans-serif',"font-size":"12px",fill:o.defaultLine,"pointer-events":"all"}).each(function(){var K=k.select(this);K.append("tspan").classed("js-link-to-tool",!0),K.append("tspan").classed("js-link-spacer",!0),K.append("tspan").classed("js-sourcelinks",!0)})}),j=B.node(),J={y:N._paper.attr("height")-9};document.body.contains(j)&&j.getComputedTextLength()>=N.width-20?(J["text-anchor"]="start",J.x=5):(J["text-anchor"]="end",J.x=N._paper.attr("width")-7),B.attr(J);var G=B.select(".js-link-to-tool"),V=B.select(".js-link-spacer"),W=B.select(".js-sourcelinks");F._context.showSources&&F._context.showSources(F),F._context.showLink&&function(X,K){K.text("");var re=K.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(X._context.linkText+" "+String.fromCharCode(187));if(X._context.sendData)re.on("click",function(){g.sendDataToCloud(X)});else{var ee=window.location.pathname.split("/"),ie=window.location.search;re.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+ee[2].split(".")[0]+"/"+ee[1]+ie})}}(F,G),V.text(G.text()&&W.text()?" - ":"")}},g.sendDataToCloud=function(F){var N=(window.PLOTLYENV||{}).BASE_URL||F._context.plotlyServerURL;if(N){F.emit("plotly_beforeexport");var B=k.select(F).append("div").attr("id","hiddenform").style("display","none"),j=B.append("form").attr({action:N+"/external",method:"post",target:"_blank"});return j.append("input").attr({type:"text",name:"data"}).node().value=g.graphJson(F,!1,"keepdata"),j.node().submit(),B.remove(),F.emit("plotly_afterexport"),!1}};var m=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],w=["year","month","dayMonth","dayMonthYear"];function u(F,N){var B=F._context.locale;B||(B="en-US");var j=!1,J={};function G(ee){for(var ie=!0,oe=0;oe<N.length;oe++){var ce=N[oe];J[ce]||(ee[ce]?J[ce]=ee[ce]:ie=!1)}ie&&(j=!0)}for(var V=0;V<2;V++){for(var W=F._context.locales,X=0;X<2;X++){var K=(W[B]||{}).format;if(K&&(G(K),j))break;W=b.localeRegistry}var re=B.split("-")[0];if(j||re===B)break;B=re}return j||G(b.localeRegistry.en.format),J}function S(F,N){var B={_fullLayout:N},j="x"===F._id.charAt(0),J=F._mainAxis._anchorAxis,G="",V="",W="";if(J&&(W=J._mainAxis._id,G=j?F._id+W:W+F._id),!G||!N._plots[G]){G="";for(var X=F._counterAxes,K=0;K<X.length;K++){var re=X[K],ee=j?F._id+re:re+F._id;V||(V=ee);var ie=n.getFromId(B,re);if(W&&ie.overlaying===W){G=ee;break}}}return G||V}function _(F){var N=F.transforms;if(Array.isArray(N)&&N.length)for(var B=0;B<N.length;B++){var j=N[B],J=j._module||y[j.type];if(J&&J.makesData)return!0}return!1}function E(F,N,B,j){for(var J=F.transforms,G=[F],V=0;V<J.length;V++){var W=J[V],X=y[W.type];X&&X.transform&&(G=X.transform(G,{transform:W,fullTrace:F,fullData:N,layout:B,fullLayout:j,transformIndex:V}))}return G}function L(F){return"string"==typeof F&&"px"===F.substr(F.length-2)&&parseFloat(F)}function C(F){var N=F.margin;if(!F._size){var B=F._size={l:Math.round(N.l),r:Math.round(N.r),t:Math.round(N.t),b:Math.round(N.b),p:Math.round(N.pad)};B.w=Math.round(F.width)-B.l-B.r,B.h=Math.round(F.height)-B.t-B.b}F._pushmargin||(F._pushmargin={}),F._pushmarginIds||(F._pushmarginIds={})}g.supplyDefaults=function(F,N){var _e,Fe,B=N&&N.skipUpdateCalc,j=F._fullLayout||{};if(j._skipDefaults)delete j._skipDefaults;else{var J,G=F._fullLayout={},V=F.layout||{},W=F._fullData||[],X=F._fullData=[],K=F.data||[],re=F.calcdata||[],ee=F._context||{};F._transitionData||g.createTransitionData(F),G._dfltTitle={plot:v(F,"Click to enter Plot title"),x:v(F,"Click to enter X axis title"),y:v(F,"Click to enter Y axis title"),colorbar:v(F,"Click to enter Colorscale title"),annotation:v(F,"new text")},G._traceWord=v(F,"trace");var ie=u(F,m);if(G._mapboxAccessToken=ee.mapboxAccessToken,j._initialAutoSizeIsDone){var oe=j.width,ce=j.height;g.supplyLayoutGlobalDefaults(V,G,ie),V.width||(G.width=oe),V.height||(G.height=ce),g.sanitizeMargins(G)}else{g.supplyLayoutGlobalDefaults(V,G,ie);var me=!V.width||!V.height,de=G.autosize;me&&(de||ee.autosizable)?g.plotAutoSize(F,V,G):me&&g.sanitizeMargins(G),!de&&me&&(V.width=G.width,V.height=G.height)}G._d3locale=((_e=ie).decimal=(Fe=G.separators).charAt(0),_e.thousands=Fe.charAt(1),{numberFormat:function(Ve){try{Ve=l(_e).format(t.adjustFormat(Ve))}catch{return t.warnBadFormat(Ve),t.noFormat}return Ve},timeFormat:A(_e).utcFormat}),G._extraFormat=u(F,w),G._initialAutoSizeIsDone=!0,G._dataLength=K.length,G._modules=[],G._visibleModules=[],G._basePlotModules=[];var ve=G._subplots=function(){var _e,Fe,Ve=b.collectableSubplotTypes,He={};if(!Ve){Ve=[];var nt=b.subplotsRegistry;for(var tt in nt){var ot=nt[tt].attr;if(ot&&(Ve.push(tt),Array.isArray(ot)))for(Fe=0;Fe<ot.length;Fe++)t.pushUnique(Ve,ot[Fe])}}for(_e=0;_e<Ve.length;_e++)He[Ve[_e]]=[];return He}(),Pe=G._splomAxes={x:{},y:{}},xe=G._splomSubplots={};G._splomGridDflt={},G._scatterStackOpts={},G._firstScatter={},G._alignmentOpts={},G._colorAxes={},G._requestRangeslider={},G._traceUids=function(_e,Fe){var Ve,He,nt=Fe.length,tt=[];for(Ve=0;Ve<_e.length;Ve++){var ot=_e[Ve]._fullInput;ot!==He&&tt.push(ot),He=ot}var dt=tt.length,kt=new Array(nt),mt={};function wt(It,Ut){kt[Ut]=It,mt[It]=1}function Lt(It,Ut){if(It&&"string"==typeof It&&!mt[It])return wt(It,Ut),!0}for(Ve=0;Ve<nt;Ve++){var Ct=Fe[Ve].uid;"number"==typeof Ct&&(Ct=String(Ct)),Lt(Ct,Ve)||Ve<dt&&Lt(tt[Ve].uid,Ve)||wt(t.randstr(mt),Ve)}return kt}(W,K),G._globalTransforms=(F._context||{}).globalTransforms,g.supplyDataDefaults(K,X,V,G);var ke=Object.keys(Pe.x),Ae=Object.keys(Pe.y);if(ke.length>1&&Ae.length>1){for(b.getComponentMethod("grid","sizeDefaults")(V,G),J=0;J<ke.length;J++)t.pushUnique(ve.xaxis,ke[J]);for(J=0;J<Ae.length;J++)t.pushUnique(ve.yaxis,Ae[J]);for(var Te in xe)t.pushUnique(ve.cartesian,Te)}if(G._has=g._hasPlotType.bind(G),W.length===X.length)for(J=0;J<X.length;J++)x(X[J],W[J]);g.supplyLayoutModuleDefaults(V,G,X,F._transitionData);var Q=G._visibleModules,se=[];for(J=0;J<Q.length;J++){var fe=Q[J].crossTraceDefaults;fe&&t.pushUnique(se,fe)}for(J=0;J<se.length;J++)se[J](X,G);G._hasOnlyLargeSploms=1===G._basePlotModules.length&&"splom"===G._basePlotModules[0].name&&ke.length>15&&Ae.length>15&&0===G.shapes.length&&0===G.images.length,g.linkSubplots(X,G,W,j),g.cleanPlot(X,G,W,j);var ye=!(!j._has||!j._has("gl2d")),Me=!(!G._has||!G._has("gl2d")),Ie=!(!j._has||!j._has("cartesian"))||ye,Ce=!(!G._has||!G._has("cartesian"))||Me;Ie&&!Ce?j._bgLayer.remove():Ce&&!Ie&&(G._shouldCreateBgLayer=!0),j._zoomlayer&&!F._dragging&&i({_fullLayout:j}),function(_e,Fe){var Ve,He=[];Fe.meta&&(Ve=Fe._meta={meta:Fe.meta,layout:{meta:Fe.meta}});for(var nt=0;nt<_e.length;nt++){var tt=_e[nt];tt.meta?He[tt.index]=tt._meta={meta:tt.meta}:Fe.meta&&(tt._meta={meta:Fe.meta}),Fe.meta&&(tt._meta.layout={meta:Fe.meta})}He.length&&(Ve||(Ve=Fe._meta={}),Ve.data=He)}(X,G),x(G,j),b.getComponentMethod("colorscale","crossTraceDefaults")(X,G),G._preGUI||(G._preGUI={}),G._tracePreGUI||(G._tracePreGUI={});var Re,le=G._tracePreGUI,ge={};for(Re in le)ge[Re]="old";for(J=0;J<X.length;J++)ge[Re=X[J]._fullInput.uid]||(le[Re]={}),ge[Re]="new";for(Re in ge)"old"===ge[Re]&&delete le[Re];C(G),b.getComponentMethod("rangeslider","makeData")(G),B||re.length!==X.length||g.supplyDefaultsUpdateCalc(re,X)}},g.supplyDefaultsUpdateCalc=function(F,N){for(var B=0;B<N.length;B++){var j=N[B],J=(F[B]||[])[0];if(J&&J.trace){var G=J.trace;if(G._hasCalcTransform){var V,W,X,K=G._arrayAttrs;for(V=0;V<K.length;V++)X=t.nestedProperty(G,W=K[V]).get().slice(),t.nestedProperty(j,W).set(X)}J.trace=j}}},g.createTransitionData=function(F){F._transitionData||(F._transitionData={}),F._transitionData._frames||(F._transitionData._frames=[]),F._transitionData._frameHash||(F._transitionData._frameHash={}),F._transitionData._counter||(F._transitionData._counter=0),F._transitionData._interruptCallbacks||(F._transitionData._interruptCallbacks=[])},g._hasPlotType=function(F){var N,B=this._basePlotModules||[];for(N=0;N<B.length;N++)if(B[N].name===F)return!0;var j=this._modules||[];for(N=0;N<j.length;N++){var J=j[N].name;if(J===F)return!0;var G=b.modules[J];if(G&&G.categories[F])return!0}return!1},g.cleanPlot=function(F,N,B,j){var J,G,V=j._basePlotModules||[];for(J=0;J<V.length;J++){var W=V[J];W.clean&&W.clean(F,N,B,j)}var X=j._has&&j._has("gl"),K=N._has&&N._has("gl");X&&!K&&void 0!==j._glcontainer&&(j._glcontainer.selectAll(".gl-canvas").remove(),j._glcontainer.selectAll(".no-webgl").remove(),j._glcanvas=null);var re=!!j._infolayer;e:for(J=0;J<B.length;J++){var ee=B[J].uid;for(G=0;G<F.length;G++)if(ee===F[G].uid)continue e;re&&j._infolayer.select(".cb"+ee).remove()}},g.linkSubplots=function(F,N,B,j){var J,G,V=j._plots||{},W=N._plots={},X=N._subplots,K={_fullData:F,_fullLayout:N},re=X.cartesian.concat(X.gl2d||[]);for(J=0;J<re.length;J++){var ee,ie=re[J],oe=V[ie],ce=n.getFromId(K,ie,"x"),me=n.getFromId(K,ie,"y");for(oe?ee=W[ie]=oe:(ee=W[ie]={}).id=ie,ce._counterAxes.push(me._id),me._counterAxes.push(ce._id),ce._subplotsWith.push(ie),me._subplotsWith.push(ie),ee.xaxis=ce,ee.yaxis=me,ee._hasClipOnAxisFalse=!1,G=0;G<F.length;G++){var de=F[G];if(de.xaxis===ee.xaxis._id&&de.yaxis===ee.yaxis._id&&!1===de.cliponaxis){ee._hasClipOnAxisFalse=!0;break}}}var he,ve=n.list(K,null,!0);for(J=0;J<ve.length;J++){var Pe=null;(he=ve[J]).overlaying&&(Pe=n.getFromId(K,he.overlaying))&&Pe.overlaying&&(he.overlaying=!1,Pe=null),he._mainAxis=Pe||he,Pe&&(he.domain=Pe.domain.slice()),he._anchorAxis="free"===he.anchor?null:n.getFromId(K,he.anchor)}for(J=0;J<ve.length;J++)if((he=ve[J])._counterAxes.sort(n.idSort),he._subplotsWith.sort(t.subplotSort),he._mainSubplot=S(he,N),he._counterAxes.length&&(he.spikemode&&-1!==he.spikemode.indexOf("across")||he.automargin&&he.mirror&&"free"!==he.anchor||b.getComponentMethod("rangeslider","isVisible")(he))){var xe=1,ke=0;for(G=0;G<he._counterAxes.length;G++){var Ae=n.getFromId(K,he._counterAxes[G]);xe=Math.min(xe,Ae.domain[0]),ke=Math.max(ke,Ae.domain[1])}xe<ke&&(he._counterDomainMin=xe,he._counterDomainMax=ke)}},g.clearExpandedTraceDefaultColors=function(F){var N,B,j;for(B=[],(N=F._module._colorAttrs)||(F._module._colorAttrs=N=[],d.crawl(F._module.attributes,function(J,G,V,W){B[W]=G,B.length=W+1,"color"===J.valType&&void 0===J.dflt&&N.push(B.join("."))})),j=0;j<N.length;j++)t.nestedProperty(F,"_input."+N[j]).get()||t.nestedProperty(F,N[j]).set(null)},g.supplyDataDefaults=function(F,N,B,j){var J,G,V,W=j._modules,X=j._visibleModules,K=j._basePlotModules,re=0,ee=0;function ie(Te){N.push(Te);var Q=Te._module;Q&&(t.pushUnique(W,Q),!0===Te.visible&&t.pushUnique(X,Q),t.pushUnique(K,Te._module.basePlotModule),re++,!1!==Te._input.visible&&ee++)}j._transformModules=[];var oe={},ce=[],de=s.traceTemplater((B.template||{}).data||{});for(J=0;J<F.length;J++){if((G=de.newTrace(V=F[J])).uid=j._traceUids[J],g.supplyTraceDefaults(V,G,ee,j,J),G.index=J,G._input=V,G._expandedIndex=re,G.transforms&&G.transforms.length)for(var he=!1!==V.visible&&!1===G.visible,ve=E(G,N,B,j),Pe=0;Pe<ve.length;Pe++){var xe=ve[Pe],ke={_template:G._template,type:G.type,uid:G.uid+Pe};he&&!1===xe.visible&&delete xe.visible,g.supplyTraceDefaults(xe,ke,re,j,J),x(ke,xe),ke.index=J,ke._input=V,ke._fullInput=G,ke._expandedIndex=re,ke._expandedInput=xe,ie(ke)}else G._fullInput=G,G._expandedInput=G,ie(G);b.traceIs(G,"carpetAxis")&&(oe[G.carpet]=G),b.traceIs(G,"carpetDependent")&&ce.push(J)}for(J=0;J<ce.length;J++)if((G=N[ce[J]]).visible){var Ae=oe[G.carpet];G._carpet=Ae,Ae&&Ae.visible?(G.xaxis=Ae.xaxis,G.yaxis=Ae.yaxis):G.visible=!1}},g.supplyAnimationDefaults=function(F){var N;F=F||{};var B={};function j(J,G){return t.coerce(F||{},B,c,J,G)}if(j("mode"),j("direction"),j("fromcurrent"),Array.isArray(F.frame))for(B.frame=[],N=0;N<F.frame.length;N++)B.frame[N]=g.supplyAnimationFrameDefaults(F.frame[N]||{});else B.frame=g.supplyAnimationFrameDefaults(F.frame||{});if(Array.isArray(F.transition))for(B.transition=[],N=0;N<F.transition.length;N++)B.transition[N]=g.supplyAnimationTransitionDefaults(F.transition[N]||{});else B.transition=g.supplyAnimationTransitionDefaults(F.transition||{});return B},g.supplyAnimationFrameDefaults=function(F){var N={};function B(j,J){return t.coerce(F||{},N,c.frame,j,J)}return B("duration"),B("redraw"),N},g.supplyAnimationTransitionDefaults=function(F){var N={};function B(j,J){return t.coerce(F||{},N,c.transition,j,J)}return B("duration"),B("easing"),N},g.supplyFrameDefaults=function(F){var N={};function B(j,J){return t.coerce(F,N,p,j,J)}return B("group"),B("name"),B("traces"),B("baseframe"),B("data"),B("layout"),N},g.supplyTraceDefaults=function(F,N,B,j,J){var G,V=j.colorway||o.defaults,W=V[B%V.length];function X(ve,Pe){return t.coerce(F,N,g.attributes,ve,Pe)}var K=X("visible");X("type"),X("name",j._traceWord+" "+J),X("uirevision",j.uirevision);var re=g.getModule(N);if(N._module=re,re){var ee=re.basePlotModule,ie=ee.attr,oe=ee.attributes;if(ie&&oe){var ce=j._subplots,me="";if(K||"gl2d"!==ee.name){if(Array.isArray(ie))for(G=0;G<ie.length;G++){var de=ie[G],he=t.coerce(F,N,oe,de);ce[de]&&t.pushUnique(ce[de],he),me+=he}else me=t.coerce(F,N,oe,ie);ce[ee.name]&&t.pushUnique(ce[ee.name],me)}}}return K&&(X("customdata"),X("ids"),X("meta"),b.traceIs(N,"showLegend")?(t.coerce(F,N,re.attributes.showlegend?re.attributes:g.attributes,"showlegend"),X("legendwidth"),X("legendgroup"),X("legendgrouptitle.text"),X("legendrank"),N._dfltShowLegend=!0):N._dfltShowLegend=!1,re&&re.supplyDefaults(F,N,W,j),b.traceIs(N,"noOpacity")||X("opacity"),b.traceIs(N,"notLegendIsolatable")&&(N.visible=!!N.visible),b.traceIs(N,"noHover")||(N.hovertemplate||t.coerceHoverinfo(F,N,j),"parcats"!==N.type&&b.getComponentMethod("fx","supplyDefaults")(F,N,W,j)),re&&re.selectPoints&&X("selectedpoints"),g.supplyTransformDefaults(F,N,j)),N},g.hasMakesDataTransform=_,g.supplyTransformDefaults=function(F,N,B){if(N._length||_(F)){var j=B._globalTransforms||[],J=B._transformModules||[];if(Array.isArray(F.transforms)||0!==j.length)for(var V=j.concat(F.transforms||[]),W=N.transforms=[],X=0;X<V.length;X++){var K,re=V[X],ee=re.type,ie=y[ee],oe=!(re._module&&re._module===ie),ce=ie&&"function"==typeof ie.transform;ie||t.warn("Unrecognized transform type "+ee+"."),ie&&ie.supplyDefaults&&(oe||ce)?((K=ie.supplyDefaults(re,N,B,F)).type=ee,K._module=ie,t.pushUnique(J,ie)):K=t.extendFlat({},re),W.push(K)}}},g.supplyLayoutGlobalDefaults=function(F,N,B){function j(X,K){return t.coerce(F,N,g.layoutAttributes,X,K)}var J=F.template;t.isPlainObject(J)&&(N.template=J,N._template=J.layout,N._dataTemplate=J.data),j("autotypenumbers");var G=t.coerceFont(j,"font");t.coerceFont(j,"title.font",t.extendFlat({},G,{size:Math.round(1.4*G.size)})),j("title.text",N._dfltTitle.plot),j("title.xref"),j("title.yref"),j("title.x"),j("title.y"),j("title.xanchor"),j("title.yanchor"),j("title.pad.t"),j("title.pad.r"),j("title.pad.b"),j("title.pad.l"),j("uniformtext.mode")&&j("uniformtext.minsize"),j("autosize",!(F.width&&F.height)),j("width"),j("height"),j("minreducedwidth"),j("minreducedheight"),j("margin.l"),j("margin.r"),j("margin.t"),j("margin.b"),j("margin.pad"),j("margin.autoexpand"),F.width&&F.height&&g.sanitizeMargins(N),b.getComponentMethod("grid","sizeDefaults")(F,N),j("paper_bgcolor"),j("separators",B.decimal+B.thousands),j("hidesources"),j("colorway"),j("datarevision");var W=j("uirevision");j("editrevision",W),j("selectionrevision",W),b.getComponentMethod("modebar","supplyLayoutDefaults")(F,N),b.getComponentMethod("shapes","supplyDrawNewShapeDefaults")(F,N,j),b.getComponentMethod("selections","supplyDrawNewSelectionDefaults")(F,N,j),j("meta"),t.isPlainObject(F.transition)&&(j("transition.duration"),j("transition.easing"),j("transition.ordering")),b.getComponentMethod("calendars","handleDefaults")(F,N,"calendar"),b.getComponentMethod("fx","supplyLayoutGlobalDefaults")(F,N,j),t.coerce(F,N,a,"scattermode")},g.plotAutoSize=function(F,N,B){var j,J,G=F._context||{},V=G.frameMargins,W=t.isPlotDiv(F);if(W&&F.emit("plotly_autosize"),G.fillFrame)j=window.innerWidth,J=window.innerHeight,document.body.style.overflow="hidden";else{var X=W?window.getComputedStyle(F):{};if(j=L(X.width)||L(X.maxWidth)||B.width,J=L(X.height)||L(X.maxHeight)||B.height,T(V)&&V>0){var K=1-2*V;j=Math.round(K*j),J=Math.round(K*J)}}var re=g.layoutAttributes.width.min,ee=g.layoutAttributes.height.min;j<re&&(j=re),J<ee&&(J=ee);var ie=!N.width&&Math.abs(B.width-j)>1,oe=!N.height&&Math.abs(B.height-J)>1;(oe||ie)&&(ie&&(B.width=j),oe&&(B.height=J)),F._initialAutoSize||(F._initialAutoSize={width:j,height:J}),g.sanitizeMargins(B)},g.supplyLayoutModuleDefaults=function(F,N,B,j){var J,G,V,W=b.componentsRegistry,X=N._basePlotModules,K=b.subplotsRegistry.cartesian;for(J in W)(V=W[J]).includeBasePlot&&V.includeBasePlot(F,N);for(var re in X.length||X.push(K),N._has("cartesian")&&(b.getComponentMethod("grid","contentDefaults")(F,N),K.finalizeSubplots(F,N)),N._subplots)N._subplots[re].sort(t.subplotSort);for(G=0;G<X.length;G++)(V=X[G]).supplyLayoutDefaults&&V.supplyLayoutDefaults(F,N,B);var ee=N._modules;for(G=0;G<ee.length;G++)(V=ee[G]).supplyLayoutDefaults&&V.supplyLayoutDefaults(F,N,B);var ie=N._transformModules;for(G=0;G<ie.length;G++)(V=ie[G]).supplyLayoutDefaults&&V.supplyLayoutDefaults(F,N,B,j);for(J in W)(V=W[J]).supplyLayoutDefaults&&V.supplyLayoutDefaults(F,N,B)},g.purge=function(F){var N=F._fullLayout||{};void 0!==N._glcontainer&&(N._glcontainer.selectAll(".gl-canvas").remove(),N._glcontainer.remove(),N._glcanvas=null),N._modeBar&&N._modeBar.destroy(),F._transitionData&&(F._transitionData._interruptCallbacks&&(F._transitionData._interruptCallbacks.length=0),F._transitionData._animationRaf&&window.cancelAnimationFrame(F._transitionData._animationRaf)),t.clearThrottle(),t.clearResponsive(F),delete F.data,delete F.layout,delete F._fullData,delete F._fullLayout,delete F.calcdata,delete F.empty,delete F.fid,delete F.undoqueue,delete F.undonum,delete F.autoplay,delete F.changed,delete F._promises,delete F._redrawTimer,delete F._hmlumcount,delete F._hmpixcount,delete F._transitionData,delete F._transitioning,delete F._initialAutoSize,delete F._transitioningWithDuration,delete F._dragging,delete F._dragged,delete F._dragdata,delete F._hoverdata,delete F._snapshotInProgress,delete F._editing,delete F._mouseDownTime,delete F._legendMouseDownTime,F.removeAllListeners&&F.removeAllListeners()},g.style=function(F){var N,B=F._fullLayout._visibleModules,j=[];for(N=0;N<B.length;N++){var J=B[N];J.style&&t.pushUnique(j,J.style)}for(N=0;N<j.length;N++)j[N](F)},g.sanitizeMargins=function(F){if(F&&F.margin){var N,B=F.width,j=F.height,J=F.margin,V=j-(J.t+J.b);B-(J.l+J.r)<0&&(N=(B-1)/(J.l+J.r),J.l=Math.floor(N*J.l),J.r=Math.floor(N*J.r)),V<0&&(N=(j-1)/(J.t+J.b),J.t=Math.floor(N*J.t),J.b=Math.floor(N*J.b))}},g.clearAutoMarginIds=function(F){F._fullLayout._pushmarginIds={}},g.allowAutoMargin=function(F,N){F._fullLayout._pushmarginIds[N]=1},g.autoMargin=function(F,N,B){var j=F._fullLayout,J=j.width,G=j.height,V=j.margin,X=j.minreducedheight,K=t.constrain(J-V.l-V.r,2,j.minreducedwidth),re=t.constrain(G-V.t-V.b,2,X),ee=Math.max(0,J-K),ie=Math.max(0,G-re),oe=j._pushmargin,ce=j._pushmarginIds;if(!1!==V.autoexpand){if(B){var me=B.pad;if(void 0===me&&(me=Math.min(12,V.l,V.r,V.t,V.b)),ee){var de=(B.l+B.r)/ee;de>1&&(B.l/=de,B.r/=de)}if(ie){var he=(B.t+B.b)/ie;he>1&&(B.t/=he,B.b/=he)}oe[N]={l:{val:void 0!==B.xl?B.xl:B.x,size:B.l+me},r:{val:void 0!==B.xr?B.xr:B.x,size:B.r+me},b:{val:void 0!==B.yb?B.yb:B.y,size:B.b+me},t:{val:void 0!==B.yt?B.yt:B.y,size:B.t+me}},ce[N]=1}else delete oe[N],delete ce[N];if(!j._replotting)return g.doAutoMargin(F)}},g.doAutoMargin=function(F){var N=F._fullLayout,B=N.width,j=N.height;N._size||(N._size={}),C(N);var J=N._size,G=N.margin,V=t.extendFlat({},J),W=G.l,X=G.r,K=G.t,re=G.b,ee=N._pushmargin,ie=N._pushmarginIds,oe=N.minreducedwidth,ce=N.minreducedheight;if(!1!==N.margin.autoexpand){for(var me in ee)ie[me]||delete ee[me];for(var de in ee.base={l:{val:0,size:W},r:{val:1,size:X},t:{val:1,size:K},b:{val:0,size:re}},ee){var he=ee[de].l||{},ve=ee[de].b||{},Pe=he.val,xe=he.size,ke=ve.val,Ae=ve.size;for(var Te in ee){if(T(xe)&&ee[Te].r){var Q=ee[Te].r.val,se=ee[Te].r.size;if(Q>Pe){var fe=(xe*Q+(se-B)*Pe)/(Q-Pe),ye=(se*(1-Pe)+(xe-B)*(1-Q))/(Q-Pe);fe+ye>W+X&&(W=fe,X=ye)}}if(T(Ae)&&ee[Te].t){var Me=ee[Te].t.val,Ie=ee[Te].t.size;if(Me>ke){var Ce=(Ae*Me+(Ie-j)*ke)/(Me-ke),Re=(Ie*(1-ke)+(Ae-j)*(1-Me))/(Me-ke);Ce+Re>re+K&&(re=Ce,K=Re)}}}}}var ot,le=t.constrain(B-G.l-G.r,2,oe),ge=t.constrain(j-G.t-G.b,2,ce),_e=Math.max(0,B-le),Fe=Math.max(0,j-ge);if(_e){var Ve=(W+X)/_e;Ve>1&&(W/=Ve,X/=Ve)}if(Fe){var He=(re+K)/Fe;He>1&&(re/=He,K/=He)}if(J.l=Math.round(W),J.r=Math.round(X),J.t=Math.round(K),J.b=Math.round(re),J.p=Math.round(G.pad),J.w=Math.round(B)-J.l-J.r,J.h=Math.round(j)-J.t-J.b,!N._replotting&&(g.didMarginChange(V,J)||function(tt){if("_redrawFromAutoMarginCount"in tt._fullLayout)return!1;var ot=n.list(tt,"",!0);for(var dt in ot)if(ot[dt].autoshift||ot[dt].shift)return!0;return!1}(F))){"_redrawFromAutoMarginCount"in N?N._redrawFromAutoMarginCount++:N._redrawFromAutoMarginCount=1;var nt=3*(1+Object.keys(ie).length);if(N._redrawFromAutoMarginCount<nt)return b.call("_doPlot",F);N._size=V,t.warn("Too many auto-margin redraws.")}ot=n.list(F,"",!0),["_adjustTickLabelsOverflow","_hideCounterAxisInsideTickLabels"].forEach(function(dt){for(var kt=0;kt<ot.length;kt++){var mt=ot[kt][dt];mt&&mt()}})};var P=["l","r","t","b","p","w","h"];function I(F,N,B){var j=!1,G=t.syncOrAsync([g.previousPromises,function(){if(F._transitionData)return F._transitioning=!1,function(V){var W=Promise.resolve();if(!V)return W;for(;V.length;)W=W.then(V.shift());return W}(F._transitionData._interruptCallbacks)},B.prepareFn,g.rehover,g.reselect,function(){return F.emit("plotly_transitioning",[]),new Promise(function(V){F._transitioning=!0,N.duration>0&&(F._transitioningWithDuration=!0),F._transitionData._interruptCallbacks.push(function(){j=!0}),B.redraw&&F._transitionData._interruptCallbacks.push(function(){return b.call("redraw",F)}),F._transitionData._interruptCallbacks.push(function(){F.emit("plotly_transitioninterrupted",[])});var W=0,X=0;function K(){return W++,function(){var re;X++,j||X!==W||(re=V,F._transitionData&&(function(ee){if(ee)for(;ee.length;)ee.shift()}(F._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(B.redraw)return b.call("redraw",F)}).then(function(){F._transitioning=!1,F._transitioningWithDuration=!1,F.emit("plotly_transitioned",[])}).then(re)))}}B.runFn(K),setTimeout(K())})}],F);return G&&G.then||(G=Promise.resolve()),G.then(function(){return F})}g.didMarginChange=function(F,N){for(var B=0;B<P.length;B++){var j=P[B],J=F[j],G=N[j];if(!T(J)||Math.abs(G-J)>1)return!0}return!1},g.graphJson=function(F,N,B,j,J,G){(J&&N&&!F._fullData||J&&!N&&!F._fullLayout)&&g.supplyDefaults(F);var W=J?F._fullLayout:F.layout,X=(F._transitionData||{})._frames;function K(ie,oe){if("function"==typeof ie)return oe?"_function_":null;if(t.isPlainObject(ie)){var ce,me={};return Object.keys(ie).sort().forEach(function(de){if(-1===["_","["].indexOf(de.charAt(0)))if("function"!=typeof ie[de]){if("keepdata"===B){if("src"===de.substr(de.length-3))return}else if("keepstream"===B){if("string"==typeof(ce=ie[de+"src"])&&ce.indexOf(":")>0&&!t.isPlainObject(ie.stream))return}else if("keepall"!==B&&"string"==typeof(ce=ie[de+"src"])&&ce.indexOf(":")>0)return;me[de]=K(ie[de],oe)}else oe&&(me[de]="_function")}),me}return Array.isArray(ie)?ie.map(function(de){return K(de,oe)}):t.isTypedArray(ie)?t.simpleMap(ie,t.identity):t.isJSDate(ie)?t.ms2DateTimeLocal(+ie):ie}var re={data:((J?F._fullData:F.data)||[]).map(function(ie){var oe=K(ie);return N&&delete oe.fit,oe})};if(!N&&(re.layout=K(W),J)){var ee=W._size;re.layout.computed={margin:{b:ee.b,l:ee.l,r:ee.r,t:ee.t}}}return X&&(re.frames=K(X)),G&&(re.config=K(F._context,!0)),"object"===j?re:JSON.stringify(re)},g.modifyFrames=function(F,N){var B,j,J,G=F._transitionData._frames,V=F._transitionData._frameHash;for(B=0;B<N.length;B++)switch((j=N[B]).type){case"replace":var W=(G[j.index]||{}).name,X=(J=j.value).name;G[j.index]=V[X]=J,X!==W&&(delete V[W],V[X]=J);break;case"insert":V[(J=j.value).name]=J,G.splice(j.index,0,J);break;case"delete":delete V[(J=G[j.index]).name],G.splice(j.index,1)}return Promise.resolve()},g.computeFrame=function(F,N){var B,j,J,G,V=F._transitionData._frameHash;if(!N)throw new Error("computeFrame must be given a string frame name");var W=V[N.toString()];if(!W)return!1;for(var X=[W],K=[W.name];W.baseframe&&(W=V[W.baseframe.toString()])&&-1===K.indexOf(W.name);)X.push(W),K.push(W.name);for(var re={};W=X.pop();)if(W.layout&&(re.layout=g.extendLayout(re.layout,W.layout)),W.data){if(re.data||(re.data=[]),!(j=W.traces))for(j=[],B=0;B<W.data.length;B++)j[B]=B;for(re.traces||(re.traces=[]),B=0;B<W.data.length;B++)null!=(J=j[B])&&(-1===(G=re.traces.indexOf(J))&&(re.traces[G=re.data.length]=J),re.data[G]=g.extendTrace(re.data[G],W.data[B]))}return re},g.recomputeFrameHash=function(F){for(var N=F._transitionData._frameHash={},B=F._transitionData._frames,j=0;j<B.length;j++){var J=B[j];J&&J.name&&(N[J.name]=J)}},g.extendObjectWithContainers=function(F,N,B){var j,J,G,V,W,X,K,re=t.extendDeepNoArrays({},N||{}),ee=t.expandObjectPaths(re),ie={};if(B&&B.length)for(G=0;G<B.length;G++)void 0===(J=(j=t.nestedProperty(ee,B[G])).get())?t.nestedProperty(ie,B[G]).set(null):(j.set(null),t.nestedProperty(ie,B[G]).set(J));if(F=t.extendDeepNoArrays(F||{},ee),B&&B.length)for(G=0;G<B.length;G++)if(X=t.nestedProperty(ie,B[G]).get()){for(K=(W=t.nestedProperty(F,B[G])).get(),Array.isArray(K)||W.set(K=[]),V=0;V<X.length;V++){var oe=X[V];K[V]=null===oe?null:g.extendObjectWithContainers(K[V],oe)}W.set(K)}return F},g.dataArrayContainers=["transforms","dimensions"],g.layoutArrayContainers=b.layoutArrayContainers,g.extendTrace=function(F,N){return g.extendObjectWithContainers(F,N,g.dataArrayContainers)},g.extendLayout=function(F,N){return g.extendObjectWithContainers(F,N,g.layoutArrayContainers)},g.transition=function(F,N,B,j,J,G){var V={redraw:J.redraw},W={},X=[];return V.prepareFn=function(){for(var K=Array.isArray(N)?N.length:0,re=j.slice(0,K),ee=0;ee<re.length;ee++){var ie=re[ee],oe=F._fullData[ie]._module;if(oe){if(oe.animatable){var ce=oe.basePlotModule.name;W[ce]||(W[ce]=[]),W[ce].push(ie)}F.data[re[ee]]=g.extendTrace(F.data[re[ee]],N[ee])}}var me=t.expandObjectPaths(t.extendDeepNoArrays({},B)),de=/^[xy]axis[0-9]*$/;for(var he in me)de.test(he)&&delete me[he].range;g.extendLayout(F.layout,me),delete F.calcdata,g.supplyDefaults(F),g.doCalcdata(F);var ve=t.expandObjectPaths(B);if(ve){var Pe=F._fullLayout._plots;for(var xe in Pe){var ke=Pe[xe],Ae=ke.xaxis,Te=ke.yaxis,Q=Ae.range.slice(),se=Te.range.slice(),fe=null,ye=null,Me=null,Ie=null;Array.isArray(ve[Ae._name+".range"])?fe=ve[Ae._name+".range"].slice():Array.isArray((ve[Ae._name]||{}).range)&&(fe=ve[Ae._name].range.slice()),Array.isArray(ve[Te._name+".range"])?ye=ve[Te._name+".range"].slice():Array.isArray((ve[Te._name]||{}).range)&&(ye=ve[Te._name].range.slice()),Q&&fe&&(Ae.r2l(Q[0])!==Ae.r2l(fe[0])||Ae.r2l(Q[1])!==Ae.r2l(fe[1]))&&(Me={xr0:Q,xr1:fe}),se&&ye&&(Te.r2l(se[0])!==Te.r2l(ye[0])||Te.r2l(se[1])!==Te.r2l(ye[1]))&&(Ie={yr0:se,yr1:ye}),(Me||Ie)&&X.push(t.extendFlat({plotinfo:ke},Me,Ie))}}return Promise.resolve()},V.runFn=function(K){var re,ee,ie=F._fullLayout._basePlotModules,oe=X.length;if(B)for(ee=0;ee<ie.length;ee++)ie[ee].transitionAxes&&ie[ee].transitionAxes(F,X,G,K);for(var ce in oe?((re=t.extendFlat({},G)).duration=0,delete W.cartesian):re=G,W){var me=W[ce];F._fullData[me[0]]._module.basePlotModule.plot(F,me,re,K)}},I(F,G,V)},g.transitionFromReact=function(F,N,B,j){var J=F._fullLayout,G=J.transition,V={},W=[];return V.prepareFn=function(){var X=J._plots;for(var K in V.redraw=!1,"some"===N.anim&&(V.redraw=!0),"some"===B.anim&&(V.redraw=!0),X){var re=X[K],ee=re.xaxis,ie=re.yaxis,oe=j[ee._name].range.slice(),ce=j[ie._name].range.slice(),me=ee.range.slice(),de=ie.range.slice();ee.setScale(),ie.setScale();var he=null,ve=null;ee.r2l(oe[0])===ee.r2l(me[0])&&ee.r2l(oe[1])===ee.r2l(me[1])||(he={xr0:oe,xr1:me}),ie.r2l(ce[0])===ie.r2l(de[0])&&ie.r2l(ce[1])===ie.r2l(de[1])||(ve={yr0:ce,yr1:de}),(he||ve)&&W.push(t.extendFlat({plotinfo:re},he,ve))}return Promise.resolve()},V.runFn=function(X){for(var K,re,ee,ie=F._fullData,oe=F._fullLayout._basePlotModules,ce=[],me=0;me<ie.length;me++)ce.push(me);function de(){if(F._fullLayout)for(var ve=0;ve<oe.length;ve++)oe[ve].transitionAxes&&oe[ve].transitionAxes(F,W,K,X)}function he(){if(F._fullLayout)for(var ve=0;ve<oe.length;ve++)oe[ve].plot(F,ee,re,X)}W.length&&N.anim?"traces first"===G.ordering?(K=t.extendFlat({},G,{duration:0}),ee=ce,re=G,setTimeout(de,G.duration),he()):(K=G,ee=null,re=t.extendFlat({},G,{duration:0}),setTimeout(he,K.duration),de()):W.length?(K=G,de()):N.anim&&(ee=ce,re=G,he())},I(F,G,V)},g.doCalcdata=function(F,N){var B,j,J,G,V=n.list(F),W=F._fullData,X=F._fullLayout,K=new Array(W.length),re=(F.calcdata||[]).slice();for(F.calcdata=K,X._numBoxes=0,X._numViolins=0,X._violinScaleGroupStats={},F._hmpixcount=0,F._hmlumcount=0,X._piecolormap={},X._sunburstcolormap={},X._treemapcolormap={},X._iciclecolormap={},X._funnelareacolormap={},J=0;J<W.length;J++)Array.isArray(N)&&-1===N.indexOf(J)&&(K[J]=re[J]);for(J=0;J<W.length;J++)(B=W[J])._arrayAttrs=d.findArrayAttributes(B),B._extremes={};var ee=X._subplots.polar||[];for(J=0;J<ee.length;J++)V.push(X[ee[J]].radialaxis,X[ee[J]].angularaxis);for(var ie in X._colorAxes){var oe=X[ie];!1!==oe.cauto&&(delete oe.cmin,delete oe.cmax)}var ce=!1;function me(ve){if(j=(B=W[ve])._module,!0===B.visible&&B.transforms){if(j&&j.calc){var Pe=j.calc(F,B);Pe[0]&&Pe[0].t&&Pe[0].t._scene&&delete Pe[0].t._scene.dirty}for(G=0;G<B.transforms.length;G++){var xe=B.transforms[G];(j=y[xe.type])&&j.calcTransform&&(B._hasCalcTransform=!0,ce=!0,j.calcTransform(F,B,xe))}}}function de(ve,Pe){if(!!(j=(B=W[ve])._module).isContainer===Pe){var xe=[];if(!0===B.visible&&0!==B._length){delete B._indexToPoints;var ke=B.transforms||[];for(G=ke.length-1;G>=0;G--)if(ke[G].enabled){B._indexToPoints=ke[G]._indexToPoints;break}j&&j.calc&&(xe=j.calc(F,B))}Array.isArray(xe)&&xe[0]||(xe=[{x:r,y:r}]),xe[0].t||(xe[0].t={}),xe[0].trace=B,K[ve]=xe}}for(z(V,W,X),J=0;J<W.length;J++)de(J,!0);for(J=0;J<W.length;J++)me(J);for(ce&&z(V,W,X),J=0;J<W.length;J++)de(J,!0);for(J=0;J<W.length;J++)de(J,!1);H(F);var he=function(ve,Pe){var xe,ke,Ae,Te,Q,se=[];function fe(Ge,We,Be){var Ye=We._id.charAt(0);if("histogram2dcontour"===Ge){var rt=We._counterAxes[0],Se=n.getFromId(Pe,rt),ze="x"===Ye||"x"===rt&&"category"===Se.type,Ke="y"===Ye||"y"===rt&&"category"===Se.type;return function(st,ct){return 0===st||0===ct||ze&&st===Be[ct].length-1||Ke&&ct===Be.length-1?-1:("y"===Ye?ct:st)-1}}return function(st,ct){return"y"===Ye?ct:st}}var ye={min:function(Ge){return t.aggNums(Math.min,null,Ge)},max:function(Ge){return t.aggNums(Math.max,null,Ge)},sum:function(Ge){return t.aggNums(function(We,Be){return We+Be},null,Ge)},total:function(Ge){return t.aggNums(function(We,Be){return We+Be},null,Ge)},mean:function(Ge){return t.mean(Ge)},median:function(Ge){return t.median(Ge)}};for(xe=0;xe<ve.length;xe++){var Me=ve[xe];if("category"===Me.type){var Ie=Me.categoryorder.match(U);if(Ie){var Ce=Ie[1],Re=Ie[2],le=Me._id.charAt(0),ge="x"===le,_e=[];for(ke=0;ke<Me._categories.length;ke++)_e.push([Me._categories[ke],[]]);for(ke=0;ke<Me._traceIndices.length;ke++){var Fe=Me._traceIndices[ke],Ve=Pe._fullData[Fe];if(!0===Ve.visible){var He=Ve.type;b.traceIs(Ve,"histogram")&&(delete Ve._xautoBinFinished,delete Ve._yautoBinFinished);var nt="splom"===He,tt="scattergl"===He,ot=Pe.calcdata[Fe];for(Ae=0;Ae<ot.length;Ae++){var dt,kt,mt=ot[Ae];if(nt){var wt=Ve._axesDim[Me._id];if(!ge){var Lt=Ve._diag[wt][0];Lt&&(Me=Pe._fullLayout[n.id2name(Lt)])}var Ct=mt.trace.dimensions[wt].values;for(Te=0;Te<Ct.length;Te++)for(dt=Me._categoriesMap[Ct[Te]],Q=0;Q<mt.trace.dimensions.length;Q++)Q!==wt&&_e[dt][1].push(mt.trace.dimensions[Q].values[Te])}else if(tt){for(Te=0;Te<mt.t.x.length;Te++)ge?(dt=mt.t.x[Te],kt=mt.t.y[Te]):(dt=mt.t.y[Te],kt=mt.t.x[Te]),_e[dt][1].push(kt);mt.t&&mt.t._scene&&delete mt.t._scene.dirty}else if(mt.hasOwnProperty("z")){var Ut=fe(Ve.type,Me,kt=mt.z);for(Te=0;Te<kt.length;Te++)for(Q=0;Q<kt[Te].length;Q++)(dt=Ut(Q,Te))+1&&_e[dt][1].push(kt[Te][Q])}else for(void 0===(dt=mt.p)&&(dt=mt[le]),void 0===(kt=mt.s)&&(kt=mt.v),void 0===kt&&(kt=ge?mt.y:mt.x),Array.isArray(kt)||(kt=void 0===kt?[]:[kt]),Te=0;Te<kt.length;Te++)_e[dt][1].push(kt[Te])}}}Me._categoriesValue=_e;var Rt=[];for(ke=0;ke<_e.length;ke++)Rt.push([_e[ke][0],ye[Ce](_e[ke][1])]);Rt.sort(function(Ge,We){return Ge[1]-We[1]}),Me._categoriesAggregatedValue=Rt,Me._initialCategories=Rt.map(function(Ge){return Ge[0]}),"descending"===Re&&Me._initialCategories.reverse(),se=se.concat(Me.sortByInitialCategories())}}}return se}(V,F);if(he.length){for(X._numBoxes=0,X._numViolins=0,J=0;J<he.length;J++)de(he[J],!0);for(J=0;J<he.length;J++)de(he[J],!1);H(F)}b.getComponentMethod("fx","calc")(F),b.getComponentMethod("errorbars","calc")(F)};var U=/(total|sum|min|max|mean|median) (ascending|descending)/;function z(F,N,B){var j={};function J(X){X.clearCalc(),"multicategory"===X.type&&X.setupMultiCategory(N),j[X._id]=1}t.simpleMap(F,J);for(var G=B._axisMatchGroups||[],V=0;V<G.length;V++)for(var W in G[V])j[W]||J(B[n.id2name(W)])}function H(F){var N,B,j,J=F._fullLayout,G=J._visibleModules,V={};for(B=0;B<G.length;B++){var W=G[B],X=W.crossTraceCalc;if(X){var K=W.basePlotModule.name;V[K]?t.pushUnique(V[K],X):V[K]=[X]}}for(j in V){var re=V[j],ee=J._subplots[j];if(Array.isArray(ee))for(N=0;N<ee.length;N++){var ie=ee[N],oe="cartesian"===j?J._plots[ie]:J[ie];for(B=0;B<re.length;B++)re[B](F,oe,ie)}else for(B=0;B<re.length;B++)re[B](F)}}g.rehover=function(F){F._fullLayout._rehover&&F._fullLayout._rehover()},g.redrag=function(F){F._fullLayout._redrag&&F._fullLayout._redrag()},g.reselect=function(F){var N=F._fullLayout,B=(F.layout||{}).selections,j=N._previousSelections;N._previousSelections=B;var J=N._reselect||JSON.stringify(B)!==JSON.stringify(j);b.getComponentMethod("selections","reselect")(F,J)},g.generalUpdatePerTraceModule=function(F,N,B,j){var J,G=N.traceHash,V={};for(J=0;J<B.length;J++){var W=B[J],X=W[0].trace;X.visible&&(V[X.type]=V[X.type]||[],V[X.type].push(W))}for(var K in G)if(!V[K]){var re=G[K][0];re[0].trace.visible=!1,V[K]=[re]}for(var ee in V){var ie=V[ee];ie[0][0].trace._module.plot(F,N,t.filterVisible(ie),j)}N.traceHash=V},g.plotBasePlot=function(F,N,B,j,J){var G=b.getModule(F),V=f(N.calcdata,G)[0];G.plot(N,V,j,J)},g.cleanBasePlot=function(F,N,B,j,J){var G=J._has&&J._has(F),V=B._has&&B._has(F);G&&!V&&J["_"+F+"layer"].selectAll("g.trace").remove()}},9813:function($){"use strict";$.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}},10869:function($,R,e){"use strict";var k=e(71828),A=e(61082).tester,l=k.findIndexOfMin,T=k.isAngleInsideSector,b=k.angleDelta,d=k.angleDist;function s(n,i,a,c){var p,f,x=c[0],v=c[1],g=o(Math.sin(i)-Math.sin(n)),y=o(Math.cos(i)-Math.cos(n)),h=Math.tan(a),m=o(1/h),w=g/y,u=v-w*x;return m?g&&y?f=h*(p=u/(h-w)):y?(p=v*m,f=v):(p=x,f=x*h):g&&y?(p=0,f=u):y?(p=0,f=v):p=f=NaN,[p,f]}function t(n,i,a,c){return k.isFullCircle([i,a])?function(p,f){var x,v=f.length,g=new Array(v+1);for(x=0;x<v;x++){var y=f[x];g[x]=[p*Math.cos(y),p*Math.sin(y)]}return g[x]=g[0].slice(),g}(n,c):function(p,f,x,v){var g,y,h=v.length,m=[];function w(U){return[p*Math.cos(U),p*Math.sin(U)]}function u(U,z,H){return s(U,z,H,w(U))}function S(U){return k.mod(U,h)}function _(U){return T(U,[f,x])}var E=l(v,function(U){return _(U)?d(U,f):1/0}),L=u(v[E],v[S(E-1)],f);for(m.push(L),g=E,y=0;y<h;g++,y++){var C=v[S(g)];if(!_(C))break;m.push(w(C))}var P=l(v,function(U){return _(U)?d(U,x):1/0}),I=u(v[P],v[S(P+1)],x);return m.push(I),m.push([0,0]),m.push(m[0].slice()),m}(n,i,a,c)}function o(n){return Math.abs(n)>1e-10?n:0}function r(n,i,a){i=i||0,a=a||0;for(var c=n.length,p=new Array(c),f=0;f<c;f++){var x=n[f];p[f]=[i+x[0],a-x[1]]}return p}$.exports={isPtInsidePolygon:function(n,i,a,c,p){if(!T(i,c))return!1;var f,x;a[0]<a[1]?(f=a[0],x=a[1]):(f=a[1],x=a[0]);var v=A(t(f,c[0],c[1],p)),g=A(t(x,c[0],c[1],p)),y=[n*Math.cos(i),n*Math.sin(i)];return g.contains(y)&&!v.contains(y)},findPolygonOffset:function(n,i,a,c){for(var p=1/0,f=1/0,x=t(n,i,a,c),v=0;v<x.length;v++){var g=x[v];p=Math.min(p,g[0]),f=Math.min(f,-g[1])}return[p,f]},findEnclosingVertexAngles:function(n,i){var a=l(i,function(p){var f=b(p,n);return f>0?f:1/0}),c=k.mod(a+1,i.length);return[i[a],i[c]]},findIntersectionXY:s,findXYatLength:function(n,i,a,c){var p=-i*a,f=i*i+1,x=2*(i*p-a),g=Math.sqrt(x*x-4*f*(p*p+a*a-n*n)),y=(-x+g)/(2*f),h=(-x-g)/(2*f);return[[y,i*y+p+c],[h,i*h+p+c]]},clampTiny:o,pathPolygon:function(n,i,a,c,p,f){return"M"+r(t(n,i,a,c),p,f).join("L")},pathPolygonAnnulus:function(n,i,a,c,p,f,x){var v,g;n<i?(v=n,g=i):(v=i,g=n);var y=r(t(v,a,c,p),f,x);return"M"+r(t(g,a,c,p),f,x).reverse().join("L")+"M"+y.join("L")}}},23580:function($,R,e){"use strict";var k=e(27659).AU,A=e(71828).counterRegex,l=e(77997),T=e(9813),b=T.attr,d=T.name,s=A(d),t={};t[b]={valType:"subplotid",dflt:d,editType:"calc"},$.exports={attr:b,name:d,idRoot:d,idRegex:s,attrRegex:s,attributes:t,layoutAttributes:e(73812),supplyLayoutDefaults:e(68993),plot:function(o){for(var r=o._fullLayout,n=o.calcdata,i=r._subplots[d],a=0;a<i.length;a++){var c=i[a],p=k(n,d,c),f=r[c]._subplot;f||(f=l(o,c),r[c]._subplot=f),f.plot(p,r,o._promises)}},clean:function(o,r,n,i){for(var a=i._subplots[d]||[],c=i._has&&i._has("gl"),p=r._has&&r._has("gl"),f=c&&!p,x=0;x<a.length;x++){var v=a[x],g=i[v]._subplot;if(!r[v]&&g)for(var y in g.framework.remove(),g.layers["radial-axis-title"].remove(),g.clipPaths)g.clipPaths[y].remove();f&&g._scene&&(g._scene.destroy(),g._scene=null)}},toSVG:e(93612).toSVG}},73812:function($,R,e){"use strict";var k=e(22399),A=e(13838),l=e(27670).Y,T=e(71828).extendFlat,b=e(30962).overrideAll,d=b({color:A.color,showline:T({},A.showline,{dflt:!0}),linecolor:A.linecolor,linewidth:A.linewidth,showgrid:T({},A.showgrid,{dflt:!0}),gridcolor:A.gridcolor,gridwidth:A.gridwidth,griddash:A.griddash},"plot","from-root"),s=b({tickmode:A.minor.tickmode,nticks:A.nticks,tick0:A.tick0,dtick:A.dtick,tickvals:A.tickvals,ticktext:A.ticktext,ticks:A.ticks,ticklen:A.ticklen,tickwidth:A.tickwidth,tickcolor:A.tickcolor,ticklabelstep:A.ticklabelstep,showticklabels:A.showticklabels,showtickprefix:A.showtickprefix,tickprefix:A.tickprefix,showticksuffix:A.showticksuffix,ticksuffix:A.ticksuffix,showexponent:A.showexponent,exponentformat:A.exponentformat,minexponent:A.minexponent,separatethousands:A.separatethousands,tickfont:A.tickfont,tickangle:A.tickangle,tickformat:A.tickformat,tickformatstops:A.tickformatstops,layer:A.layer},"plot","from-root"),t={visible:T({},A.visible,{dflt:!0}),type:T({},A.type,{values:["-","linear","log","date","category"]}),autotypenumbers:A.autotypenumbers,autorange:T({},A.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},range:T({},A.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:A.categoryorder,categoryarray:A.categoryarray,angle:{valType:"angle",editType:"plot"},side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:T({},A.title.text,{editType:"plot",dflt:""}),font:T({},A.title.font,{editType:"plot"}),editType:"plot"},hoverformat:A.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc",_deprecated:{title:A._deprecated.title,titlefont:A._deprecated.titlefont}};T(t,d,s);var o={visible:T({},A.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:A.autotypenumbers,categoryorder:A.categoryorder,categoryarray:A.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:A.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};T(o,d,s),$.exports={domain:l({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:k.background},radialaxis:t,angularaxis:o,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}},68993:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(44467),T=e(49119),b=e(27659).NG,d=e(26218),s=e(38701),t=e(96115),o=e(89426),r=e(15258),n=e(92128),i=e(4322),a=e(73812),c=e(12101),p=e(9813),f=p.axisNames;function x(g,y,h,m){var w=h("bgcolor");m.bgColor=A.combine(w,m.paper_bgcolor);var u=h("sector");h("hole");var S,_=b(m.fullData,p.name,m.id),E=m.layoutOut;function L(X,K){return h(S+"."+X,K)}for(var C=0;C<f.length;C++){k.isPlainObject(g[S=f[C]])||(g[S]={});var P=g[S],I=l.newContainer(y,S);I._id=I._name=S,I._attr=m.id+"."+S,I._traceIndices=_.map(function(X){return X._expandedIndex});var U=p.axisName2dataArray[S],z=v(P,I,L,_,U,m);r(P,I,L,{axData:_,dataAttr:U});var H=L("visible");switch(c(I,y,E),L("uirevision",y.uirevision),I._m=1,S){case"radialaxis":var F=L("autorange",!I.isValidRange(P.range));P.autorange=F,!F||"linear"!==z&&"-"!==z||L("rangemode"),"reversed"===F&&(I._m=-1),L("range"),I.cleanRange("range",{dfltRange:[0,1]});break;case"angularaxis":if("date"===z){k.log("Polar plots do not support date angular axes yet.");for(var N=0;N<_.length;N++)_[N].visible=!1;z=P.type=I.type="linear"}L("linear"===z?"thetaunit":"period");var B=L("direction");L("rotation",{counterclockwise:0,clockwise:90}[B])}if(o(P,I,L,I.type,{tickSuffixDflt:"degrees"===I.thetaunit?"\xb0":void 0}),H){var j,J,G,V,W=m.font||{};J=(j=L("color"))===P.color?j:W.color,G=W.size,V=W.family,d(P,I,L,I.type),t(P,I,L,I.type,{font:{color:J,size:G,family:V}}),s(P,I,L,{outerTicks:!0}),n(P,I,L,{dfltColor:j,bgColor:m.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a[S]}),L("layer"),"radialaxis"===S&&(L("side"),L("angle",u[0]),L("title.text"),k.coerceFont(L,"title.font",{color:J,size:k.bigFont(G),family:V}))}"category"!==z&&L("hoverformat"),I._input=P}"category"===y.angularaxis.type&&h("gridshape")}function v(g,y,h,m,w,u){var S=h("autotypenumbers",u.autotypenumbersDflt);if("-"===h("type")){for(var _,E=0;E<m.length;E++)if(m[E].visible){_=m[E];break}_&&_[w]&&(y.type=i(_[w],"gregorian",{noMultiCategory:!0,autotypenumbers:S})),"-"===y.type?y.type="linear":g.type=y.type}return y.type}$.exports=function(g,y,h){T(g,y,h,{type:p.name,attributes:a,handleDefaults:x,font:y.font,autotypenumbersDflt:y.autotypenumbers,paper_bgcolor:y.paper_bgcolor,fullData:h,layoutOut:y})}},77997:function($,R,e){"use strict";var k=e(39898),A=e(84267),l=e(73972),T=e(71828),b=T.strRotate,d=T.strTranslate,s=e(7901),t=e(91424),o=e(74875),r=e(89298),n=e(21994),i=e(12101),a=e(71739).doAutoRange,c=e(29323),p=e(28569),f=e(30211),x=e(92998),v=e(47322).prepSelect,g=e(47322).selectOnClick,y=e(47322).clearOutline,h=e(6964),m=e(33306),w=e(61549).redrawReglTraces,u=e(18783).MID_SHIFT,S=e(9813),_=e(10869),E=e(23893),L=E.smith,C=E.reactanceArc,P=E.resistanceArc,I=E.smithTransform,U=T._,z=T.mod,H=T.deg2rad,F=T.rad2deg;function N(V,W,X){this.isSmith=X||!1,this.id=W,this.gd=V,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var K=V._fullLayout;this.clipIds.forTraces="clip"+K._uid+W+"-for-traces",this.clipPaths.forTraces=K._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=K["_"+(X?"smith":"polar")+"layer"].append("g").attr("class",W),this.getHole=function(ee){return this.isSmith?0:ee.hole},this.getSector=function(ee){return this.isSmith?[0,360]:ee.sector},this.getRadial=function(ee){return this.isSmith?ee.realaxis:ee.radialaxis},this.getAngular=function(ee){return this.isSmith?ee.imaginaryaxis:ee.angularaxis},X||(this.radialTickLayout=null,this.angularTickLayout=null)}var B=N.prototype;function j(V){var W=V.ticks+String(V.ticklen)+String(V.showticklabels);return"side"in V&&(W+=V.side),W}function J(V,W){return W[T.findIndexOfMin(W,function(X){return T.angleDist(V,X)})]}function G(V,W,X){return W?(V.attr("display",null),V.attr(X)):V&&V.attr("display","none"),V}$.exports=function(V,W,X){return new N(V,W,X)},B.plot=function(V,W){for(var X=this,K=W[X.id],re=!1,ee=0;ee<V.length;ee++)if(!1===V[ee][0].trace.cliponaxis){re=!0;break}X._hasClipOnAxisFalse=re,X.updateLayers(W,K),X.updateLayout(W,K),o.generalUpdatePerTraceModule(X.gd,X,V,K),X.updateFx(W,K),X.isSmith&&(delete K.realaxis.range,delete K.imaginaryaxis.range)},B.updateLayers=function(V,W){var X=this,K=X.isSmith,re=X.layers,ee=X.getRadial(W),ie=X.getAngular(W),oe=S.layerNames,ce=oe.indexOf("frontplot"),me=oe.slice(0,ce),de="below traces"===ie.layer,he="below traces"===ee.layer;de&&me.push("angular-line"),he&&me.push("radial-line"),de&&me.push("angular-axis"),he&&me.push("radial-axis"),me.push("frontplot"),de||me.push("angular-line"),he||me.push("radial-line"),de||me.push("angular-axis"),he||me.push("radial-axis");var ve=(K?"smith":"polar")+"sublayer",Pe=X.framework.selectAll("."+ve).data(me,String);Pe.enter().append("g").attr("class",function(xe){return ve+" "+xe}).each(function(xe){var ke=re[xe]=k.select(this);switch(xe){case"frontplot":K||ke.append("g").classed("barlayer",!0),ke.append("g").classed("scatterlayer",!0);break;case"backplot":ke.append("g").classed("maplayer",!0);break;case"plotbg":re.bg=ke.append("path");break;case"radial-grid":case"angular-grid":ke.style("fill","none");break;case"radial-line":ke.append("line").style("fill","none");break;case"angular-line":ke.append("path").style("fill","none")}}),Pe.order()},B.updateLayout=function(V,W){var X=this,K=X.layers,re=V._size,ee=X.getRadial(W),ie=X.getAngular(W),oe=W.domain.x,ce=W.domain.y;X.xOffset=re.l+re.w*oe[0],X.yOffset=re.t+re.h*(1-ce[1]);var me=X.xLength=re.w*(oe[1]-oe[0]),de=X.yLength=re.h*(ce[1]-ce[0]),he=X.getSector(W);X.sectorInRad=he.map(H);var ve,Pe,xe,ke,Ae,tt,ot,dt,kt,mt,wt,Lt,Ct,It,Ut,Te=X.sectorBBox=(kt=(tt=he)[1]-(dt=tt[0]),wt=(mt=z(dt,360))+kt,Lt=Math.cos(H(mt)),Ct=Math.sin(H(mt)),It=Math.cos(H(wt)),Ut=Math.sin(H(wt)),ot=mt<=90&&wt>=90||mt>90&&wt>=450?1:Ct<=0&&Ut<=0?0:Math.max(Ct,Ut),[mt<=180&&wt>=180||mt>180&&wt>=540?-1:Lt>=0&&It>=0?0:Math.min(Lt,It),mt<=270&&wt>=270||mt>270&&wt>=630?-1:Ct>=0&&Ut>=0?0:Math.min(Ct,Ut),wt>=360?1:Lt<=0&&It<=0?0:Math.max(Lt,It),ot]),Q=Te[2]-Te[0],fe=de/me,ye=Math.abs((Te[3]-Te[1])/Q);fe>ye?(ve=me,Ae=(de-(Pe=me*ye))/re.h/2,xe=[oe[0],oe[1]],ke=[ce[0]+Ae,ce[1]-Ae]):(Pe=de,Ae=(me-(ve=de/ye))/re.w/2,xe=[oe[0]+Ae,oe[1]-Ae],ke=[ce[0],ce[1]]),X.xLength2=ve,X.yLength2=Pe,X.xDomain2=xe,X.yDomain2=ke;var Me,Ie=X.xOffset2=re.l+re.w*xe[0],Ce=X.yOffset2=re.t+re.h*(1-ke[1]),Re=X.radius=ve/Q,le=X.innerRadius=X.getHole(W)*Re,ge=X.cx=Ie-Re*Te[0],_e=X.cy=Ce+Re*Te[3],Fe=X.cxx=ge-Ie,Ve=X.cyy=_e-Ce,He=ee.side;"counterclockwise"===He?(Me=He,He="top"):"clockwise"===He&&(Me=He,He="bottom"),X.radialAxis=X.mockAxis(V,W,ee,{_id:"x",side:He,_trueSide:Me,domain:[le/re.w,Re/re.w]}),X.angularAxis=X.mockAxis(V,W,ie,{side:"right",domain:[0,Math.PI],autorange:!1}),X.doAutoRange(V,W),X.updateAngularAxis(V,W),X.updateRadialAxis(V,W),X.updateRadialAxisTitle(V,W),X.xaxis=X.mockCartesianAxis(V,W,{_id:"x",domain:xe}),X.yaxis=X.mockCartesianAxis(V,W,{_id:"y",domain:ke});var nt=X.pathSubplot();X.clipPaths.forTraces.select("path").attr("d",nt).attr("transform",d(Fe,Ve)),K.frontplot.attr("transform",d(Ie,Ce)).call(t.setClipUrl,X._hasClipOnAxisFalse?null:X.clipIds.forTraces,X.gd),K.bg.attr("d",nt).attr("transform",d(ge,_e)).call(s.fill,W.bgcolor)},B.mockAxis=function(V,W,X,K){var re=T.extendFlat({},X,K);return i(re,W,V),re},B.mockCartesianAxis=function(V,W,X){var K=this,re=K.isSmith,ee=X._id,ie=T.extendFlat({type:"linear"},X);n(ie,V);var oe={x:[0,2],y:[1,3]};return ie.setRange=function(){var ce=K.sectorBBox,me=oe[ee],de=K.radialAxis._rl,he=(de[1]-de[0])/(1-K.getHole(W));ie.range=[ce[me[0]]*he,ce[me[1]]*he]},ie.isPtWithinRange="x"!==ee||re?function(){return!0}:function(ce){return K.isPtInside(ce)},ie.setRange(),ie.setScale(),ie},B.doAutoRange=function(V,W){var X=this,K=X.gd,re=X.radialAxis,ee=X.getRadial(W);a(K,re);var ie=re.range;ee.range=ie.slice(),ee._input.range=ie.slice(),re._rl=[re.r2l(ie[0],null,"gregorian"),re.r2l(ie[1],null,"gregorian")]},B.updateRadialAxis=function(V,W){var X=this,K=X.gd,re=X.layers,ee=X.radius,ie=X.innerRadius,oe=X.cx,ce=X.cy,me=X.getRadial(W),de=z(X.getSector(W)[0],360),he=X.radialAxis,ve=ie<ee,Pe=X.isSmith;Pe||(X.fillViewInitialKey("radialaxis.angle",me.angle),X.fillViewInitialKey("radialaxis.range",he.range.slice()),he.setGeometry()),"auto"===he.tickangle&&de>90&&de<=270&&(he.tickangle=180);var xe=Pe?function(Ce){var Re=I(X,L([Ce.x,0]));return d(Re[0]-oe,Re[1]-ce)}:function(Ce){return d(he.l2p(Ce.x)+ie,0)},ke=Pe?function(Ce){return P(X,Ce.x,-1/0,1/0)}:function(Ce){return X.pathArc(he.r2p(Ce.x)+ie)},Ae=j(me);if(X.radialTickLayout!==Ae&&(re["radial-axis"].selectAll(".xtick").remove(),X.radialTickLayout=Ae),ve){he.setScale();var Te=0,Q=Pe?(he.tickvals||[]).filter(function(Ce){return Ce>=0}).map(function(Ce){return r.tickText(he,Ce,!0,!1)}):r.calcTicks(he),se=Pe?Q:r.clipEnds(he,Q),fe=r.getTickSigns(he)[2];Pe&&(("top"===he.ticks&&"bottom"===he.side||"bottom"===he.ticks&&"top"===he.side)&&(fe=-fe),"top"===he.ticks&&"top"===he.side&&(Te=-he.ticklen),"bottom"===he.ticks&&"bottom"===he.side&&(Te=he.ticklen)),r.drawTicks(K,he,{vals:Q,layer:re["radial-axis"],path:r.makeTickPath(he,0,fe),transFn:xe,crisp:!1}),r.drawGrid(K,he,{vals:se,layer:re["radial-grid"],path:ke,transFn:T.noop,crisp:!1}),r.drawLabels(K,he,{vals:Q,layer:re["radial-axis"],transFn:xe,labelFns:r.makeLabelFns(he,Te)})}var ye=X.radialAxisAngle=X.vangles?F(J(H(me.angle),X.vangles)):me.angle,Me=d(oe,ce),Ie=Me+b(-ye);G(re["radial-axis"],ve&&(me.showticklabels||me.ticks),{transform:Ie}),G(re["radial-grid"],ve&&me.showgrid,{transform:Pe?"":Me}),G(re["radial-line"].select("line"),ve&&me.showline,{x1:Pe?-ee:ie,y1:0,x2:ee,y2:0,transform:Ie}).attr("stroke-width",me.linewidth).call(s.stroke,me.linecolor)},B.updateRadialAxisTitle=function(V,W,X){if(!this.isSmith){var K=this,re=K.gd,ee=K.radius,ie=K.cx,oe=K.cy,ce=K.getRadial(W),me=K.id+"title",de=0;if(ce.title){var he=t.bBox(K.layers["radial-axis"].node()).height,ve=ce.title.font.size,Pe=ce.side;de="top"===Pe?ve:"counterclockwise"===Pe?-(he+.4*ve):he+.8*ve}var xe=void 0!==X?X:K.radialAxisAngle,ke=H(xe),Ae=Math.cos(ke),Te=Math.sin(ke),Q=ie+ee/2*Ae+de*Te,se=oe-ee/2*Te+de*Ae;K.layers["radial-axis-title"]=x.draw(re,me,{propContainer:ce,propName:K.id+".radialaxis.title",placeholder:U(re,"Click to enter radial axis title"),attributes:{x:Q,y:se,"text-anchor":"middle"},transform:{rotate:-xe}})}},B.updateAngularAxis=function(V,W){var X=this,K=X.gd,re=X.layers,ee=X.radius,ie=X.innerRadius,oe=X.cx,ce=X.cy,me=X.getAngular(W),de=X.angularAxis,he=X.isSmith;he||(X.fillViewInitialKey("angularaxis.rotation",me.rotation),de.setGeometry(),de.setScale());var ve=he?function(Ce){var Re=I(X,L([0,Ce.x]));return Math.atan2(Re[0]-oe,Re[1]-ce)-Math.PI/2}:function(Ce){return de.t2g(Ce.x)};"linear"===de.type&&"radians"===de.thetaunit&&(de.tick0=F(de.tick0),de.dtick=F(de.dtick));var Pe=function(Ce){return d(oe+ee*Math.cos(Ce),ce-ee*Math.sin(Ce))},xe=he?function(Ce){var Re=I(X,L([0,Ce.x]));return d(Re[0],Re[1])}:function(Ce){return Pe(ve(Ce))},ke=he?function(Ce){var Re=I(X,L([0,Ce.x])),le=Math.atan2(Re[0]-oe,Re[1]-ce)-Math.PI/2;return d(Re[0],Re[1])+b(-F(le))}:function(Ce){var Re=ve(Ce);return Pe(Re)+b(-F(Re))},Ae=he?function(Ce){return C(X,Ce.x,0,1/0)}:function(Ce){var Re=ve(Ce),le=Math.cos(Re),ge=Math.sin(Re);return"M"+[oe+ie*le,ce-ie*ge]+"L"+[oe+ee*le,ce-ee*ge]},Te=r.makeLabelFns(de,0).labelStandoff,Q={xFn:function(Ce){var Re=ve(Ce);return Math.cos(Re)*Te},yFn:function(Ce){var Re=ve(Ce),le=Math.sin(Re)>0?.2:1;return-Math.sin(Re)*(Te+Ce.fontSize*le)+Math.abs(Math.cos(Re))*(Ce.fontSize*u)},anchorFn:function(Ce){var Re=ve(Ce),le=Math.cos(Re);return Math.abs(le)<.1?"middle":le>0?"start":"end"},heightFn:function(Ce,Re,le){var ge=ve(Ce);return-.5*(1+Math.sin(ge))*le}},se=j(me);X.angularTickLayout!==se&&(re["angular-axis"].selectAll("."+de._id+"tick").remove(),X.angularTickLayout=se);var fe,ye=he?[1/0].concat(de.tickvals||[]).map(function(Ce){return r.tickText(de,Ce,!0,!1)}):r.calcTicks(de);if(he&&(ye[0].text="\u221e",ye[0].fontSize*=1.75),"linear"===W.gridshape?(fe=ye.map(ve),T.angleDelta(fe[0],fe[1])<0&&(fe=fe.slice().reverse())):fe=null,X.vangles=fe,"category"===de.type&&(ye=ye.filter(function(Ce){return T.isAngleInsideSector(ve(Ce),X.sectorInRad)})),de.visible){var Me="inside"===de.ticks?-1:1;r.drawTicks(K,de,{vals:ye,layer:re["angular-axis"],path:"M"+Me*((de.linewidth||1)/2)+",0h"+Me*de.ticklen,transFn:ke,crisp:!1}),r.drawGrid(K,de,{vals:ye,layer:re["angular-grid"],path:Ae,transFn:T.noop,crisp:!1}),r.drawLabels(K,de,{vals:ye,layer:re["angular-axis"],repositionOnUpdate:!0,transFn:xe,labelFns:Q})}G(re["angular-line"].select("path"),me.showline,{d:X.pathSubplot(),transform:d(oe,ce)}).attr("stroke-width",me.linewidth).call(s.stroke,me.linecolor)},B.updateFx=function(V,W){this.gd._context.staticPlot||(!this.isSmith&&(this.updateAngularDrag(V),this.updateRadialDrag(V,W,0),this.updateRadialDrag(V,W,1)),this.updateHoverAndMainDrag(V))},B.updateHoverAndMainDrag=function(V){var W,X,K=this,re=K.isSmith,ee=K.gd,oe=V._zoomlayer,ce=S.MINZOOM,me=S.OFFEDGE,de=K.radius,he=K.innerRadius,ve=K.cx,Pe=K.cy,xe=K.cxx,ke=K.cyy,Ae=K.sectorInRad,Te=K.vangles,Q=K.radialAxis,se=_.clampTiny,fe=_.findXYatLength,ye=_.findEnclosingVertexAngles,Me=S.cornerHalfWidth,Ie=S.cornerLen/2,Ce=c.makeDragger(K.layers,"path","maindrag",!1===V.dragmode?"none":"crosshair");k.select(Ce).attr("d",K.pathSubplot()).attr("transform",d(ve,Pe)),Ce.onmousemove=function(Se){f.hover(ee,Se,K.id),ee._fullLayout._lasthover=Ce,ee._fullLayout._hoversubplot=K.id},Ce.onmouseout=function(Se){ee._dragging||p.unhover(ee,Se)};var Re,le,ge,_e,Fe,Ve,He,nt,tt,ot={element:Ce,gd:ee,subplot:K.id,plotinfo:{id:K.id,xaxis:K.xaxis,yaxis:K.yaxis},xaxes:[K.xaxis],yaxes:[K.yaxis]};function dt(Se,ze){return Math.sqrt(Se*Se+ze*ze)}function kt(Se,ze){return dt(Se-xe,ze-ke)}function mt(Se,ze){return Math.atan2(ke-ze,Se-xe)}function wt(Se,ze){return[Se*Math.cos(ze),Se*Math.sin(-ze)]}function Lt(Se,ze){if(0===Se)return K.pathSector(2*Me);var Ke=Ie/Se,st=ze-Ke,ct=ze+Ke,Tt=Math.max(0,Math.min(Se,de)),Et=Tt-Me,At=Tt+Me;return"M"+wt(Et,st)+"A"+[Et,Et]+" 0,0,0 "+wt(Et,ct)+"L"+wt(At,ct)+"A"+[At,At]+" 0,0,1 "+wt(At,st)+"Z"}function Ct(Se,ze,Ke){if(0===Se)return K.pathSector(2*Me);var st,ct,Tt=wt(Se,ze),Et=wt(Se,Ke),At=se((Tt[0]+Et[0])/2),ht=se((Tt[1]+Et[1])/2);if(At&&ht){var pt=ht/At,gt=-1/pt,Pt=fe(Me,pt,At,ht);st=fe(Ie,gt,Pt[0][0],Pt[0][1]),ct=fe(Ie,gt,Pt[1][0],Pt[1][1])}else{var Ot,Ht;ht?(Ot=Ie,Ht=Me):(Ot=Me,Ht=Ie),st=[[At-Ot,ht-Ht],[At+Ot,ht-Ht]],ct=[[At-Ot,ht+Ht],[At+Ot,ht+Ht]]}return"M"+st.join("L")+"L"+ct.reverse().join("L")+"Z"}function It(Se,ze){return ze=Math.max(Math.min(ze,de),he),Se<me?Se=0:de-Se<me?Se=de:ze<me?ze=0:de-ze<me&&(ze=de),Math.abs(ze-Se)>ce?(Se<ze?(ge=Se,_e=ze):(ge=ze,_e=Se),!0):(ge=null,_e=null,!1)}function Ut(Se,ze){ze=ze||"M0,0Z",nt.attr("d",Se=Se||Fe),tt.attr("d",ze),c.transitionZoombox(nt,tt,Ve,He),Ve=!0;var Ke={};Ye(Ke),ee.emit("plotly_relayouting",Ke)}function Rt(Se,ze){var Ke,st,ct=Re+(Se*=W),Tt=le+(ze*=X),Et=kt(Re,le),At=Math.min(kt(ct,Tt),de),ht=mt(Re,le);It(Et,At)&&(Ke=Fe+K.pathSector(_e),ge&&(Ke+=K.pathSector(ge)),st=Lt(ge,ht)+Lt(_e,ht)),Ut(Ke,st)}function Ge(Se,ze,Ke,st){var ct=_.findIntersectionXY(Ke,st,Ke,[Se-xe,ke-ze]);return dt(ct[0],ct[1])}function We(Se,ze){var Ke,st,ct=Re+Se,Tt=le+ze,Et=mt(Re,le),At=mt(ct,Tt),ht=ye(Et,Te),pt=ye(At,Te);It(Ge(Re,le,ht[0],ht[1]),Math.min(Ge(ct,Tt,pt[0],pt[1]),de))&&(Ke=Fe+K.pathSector(_e),ge&&(Ke+=K.pathSector(ge)),st=[Ct(ge,ht[0],ht[1]),Ct(_e,ht[0],ht[1])].join(" ")),Ut(Ke,st)}function Be(){if(c.removeZoombox(ee),null!==ge&&null!==_e){var Se={};Ye(Se),c.showDoubleClickNotifier(ee),l.call("_guiRelayout",ee,Se)}}function Ye(Se){var ze=Q._rl,Ke=(ze[1]-ze[0])/(1-he/de)/de;Se[K.id+".radialaxis.range"]=[ze[0]+(ge-he)*Ke,ze[0]+(_e-he)*Ke]}function rt(Se,ze){var Ke=ee._fullLayout.clickmode;if(c.removeZoombox(ee),2===Se){var st={};for(var ct in K.viewInitial)st[K.id+"."+ct]=K.viewInitial[ct];ee.emit("plotly_doubleclick",null),l.call("_guiRelayout",ee,st)}Ke.indexOf("select")>-1&&1===Se&&g(ze,ee,[K.xaxis],[K.yaxis],K.id,ot),Ke.indexOf("event")>-1&&f.click(ee,ze,K.id)}ot.prepFn=function(Se,ze,Ke){var st=ee._fullLayout.dragmode,ct=Ce.getBoundingClientRect();ee._fullLayout._calcInverseTransform(ee),W=ee._fullLayout._invScaleX,X=ee._fullLayout._invScaleY;var Et=T.apply3DTransform(ee._fullLayout._invTransform)(ze-ct.left,Ke-ct.top);if(Re=Et[0],le=Et[1],Te){var At=_.findPolygonOffset(de,Ae[0],Ae[1],Te);Re+=xe+At[0],le+=ke+At[1]}switch(st){case"zoom":ot.clickFn=rt,re||(ot.moveFn=Te?We:Rt,ot.doneFn=Be,ge=null,_e=null,Fe=K.pathSubplot(),Ve=!1,He=A(ee._fullLayout[K.id].bgcolor).getLuminance(),(nt=c.makeZoombox(oe,He,ve,Pe,Fe)).attr("fill-rule","evenodd"),tt=c.makeCorners(oe,ve,Pe),y(ee));break;case"select":case"lasso":v(Se,ze,Ke,ot,st)}},p.init(ot)},B.updateRadialDrag=function(V,W,X){var K=this,re=K.gd,ee=K.layers,ie=K.radius,oe=K.innerRadius,ce=K.cx,me=K.cy,de=K.radialAxis,he=S.radialDragBoxSize,ve=he/2;if(de.visible){var Pe,xe,ke,Ae=H(K.radialAxisAngle),Te=de._rl,Q=Te[0],se=Te[1],fe=Te[X],ye=.75*(Te[1]-Te[0])/(1-K.getHole(W))/ie;X?(Pe=ce+(ie+ve)*Math.cos(Ae),xe=me-(ie+ve)*Math.sin(Ae),ke="radialdrag"):(Pe=ce+(oe-ve)*Math.cos(Ae),xe=me-(oe-ve)*Math.sin(Ae),ke="radialdrag-inner");var Me,Ie,Ce,Re=c.makeRectDragger(ee,ke,"crosshair",-ve,-ve,he,he),le={element:Re,gd:re};!1===V.dragmode&&(le.dragmode=!1),G(k.select(Re),de.visible&&oe<ie,{transform:d(Pe,xe)}),le.prepFn=function(){Me=null,Ie=null,Ce=null,le.moveFn=ge,le.doneFn=_e,y(re)},le.clampFn=function(He,nt){return Math.sqrt(He*He+nt*nt)<S.MINDRAG&&(He=0,nt=0),[He,nt]},p.init(le)}function ge(He,nt){if(Me)Me(He,nt);else{var tt=[He,-nt],ot=[Math.cos(Ae),Math.sin(Ae)],dt=Math.abs(T.dot(tt,ot)/Math.sqrt(T.dot(tt,tt)));isNaN(dt)||(Me=dt<.5?Fe:Ve)}var mt,kt={};mt=kt,null!==Ie?mt[K.id+".radialaxis.angle"]=Ie:null!==Ce&&(mt[K.id+".radialaxis.range["+X+"]"]=Ce),re.emit("plotly_relayouting",kt)}function _e(){null!==Ie?l.call("_guiRelayout",re,K.id+".radialaxis.angle",Ie):null!==Ce&&l.call("_guiRelayout",re,K.id+".radialaxis.range["+X+"]",Ce)}function Fe(He,nt){if(0!==X){Ie=Math.atan2(me-(xe+nt),Pe+He-ce),K.vangles&&(Ie=J(Ie,K.vangles)),Ie=F(Ie);var dt=d(ce,me)+b(-Ie);ee["radial-axis"].attr("transform",dt),ee["radial-line"].select("line").attr("transform",dt);var kt=K.gd._fullLayout;K.updateRadialAxisTitle(kt,kt[K.id],Ie)}}function Ve(He,nt){var tt=T.dot([He,-nt],[Math.cos(Ae),Math.sin(Ae)]);if(Ce=fe-ye*tt,ye>0==(X?Ce>Q:Ce<se)){var ot=re._fullLayout,dt=ot[K.id];de.range[X]=Ce,de._rl[X]=Ce,K.updateRadialAxis(ot,dt),K.xaxis.setRange(),K.xaxis.setScale(),K.yaxis.setRange(),K.yaxis.setScale();var kt=!1;for(var mt in K.traceHash){var wt=K.traceHash[mt],Lt=T.filterVisible(wt);wt[0][0].trace._module.plot(re,K,Lt,dt),l.traceIs(mt,"gl")&&Lt.length&&(kt=!0)}kt&&(m(re),w(re))}else Ce=null}},B.updateAngularDrag=function(V){var W=this,X=W.gd,K=W.layers,re=W.radius,ee=W.angularAxis,ie=W.cx,oe=W.cy,ce=W.cxx,me=W.cyy,de=S.angularDragBoxSize,he=c.makeDragger(K,"path","angulardrag",!1===V.dragmode?"none":"move"),ve={element:he,gd:X};function Pe(le,ge){return Math.atan2(me+de-ge,le-ce-de)}!1===V.dragmode?ve.dragmode=!1:k.select(he).attr("d",W.pathAnnulus(re,re+de)).attr("transform",d(ie,oe)).call(h,"move");var xe,ke,Ae,Te,Q,se,fe=K.frontplot.select(".scatterlayer").selectAll(".trace"),ye=fe.selectAll(".point"),Me=fe.selectAll(".textpoint");function Ie(le,ge){var _e=W.gd._fullLayout,Fe=_e[W.id],Ve=Pe(xe+le*V._invScaleX,ke+ge*V._invScaleY),He=F(Ve-se);if(Te=Ae+He,K.frontplot.attr("transform",d(W.xOffset2,W.yOffset2)+b([-He,ce,me])),W.vangles){Q=W.radialAxisAngle+He;var nt=d(ie,oe)+b(-He),tt=d(ie,oe)+b(-Q);K.bg.attr("transform",nt),K["radial-grid"].attr("transform",nt),K["radial-axis"].attr("transform",tt),K["radial-line"].select("line").attr("transform",tt),W.updateRadialAxisTitle(_e,Fe,Q)}else W.clipPaths.forTraces.select("path").attr("transform",d(ce,me)+b(He));ye.each(function(){var Lt=k.select(this),Ct=t.getTranslate(Lt);Lt.attr("transform",d(Ct.x,Ct.y)+b([He]))}),Me.each(function(){var Lt=k.select(this),Ct=Lt.select("text"),It=t.getTranslate(Lt);Lt.attr("transform",b([He,Ct.attr("x"),Ct.attr("y")])+d(It.x,It.y))}),ee.rotation=T.modHalf(Te,360),W.updateAngularAxis(_e,Fe),W._hasClipOnAxisFalse&&!T.isFullCircle(W.sectorInRad)&&fe.call(t.hideOutsideRangePoints,W);var ot=!1;for(var dt in W.traceHash)if(l.traceIs(dt,"gl")){var kt=W.traceHash[dt],mt=T.filterVisible(kt);kt[0][0].trace._module.plot(X,W,mt,Fe),mt.length&&(ot=!0)}ot&&(m(X),w(X));var wt={};Ce(wt),X.emit("plotly_relayouting",wt)}function Ce(le){le[W.id+".angularaxis.rotation"]=Te,W.vangles&&(le[W.id+".radialaxis.angle"]=Q)}function Re(){Me.select("text").attr("transform",null);var le={};Ce(le),l.call("_guiRelayout",X,le)}ve.prepFn=function(le,ge,_e){Ae=V[W.id].angularaxis.rotation;var Ve=he.getBoundingClientRect();xe=ge-Ve.left,ke=_e-Ve.top,X._fullLayout._calcInverseTransform(X);var He=T.apply3DTransform(V._invTransform)(xe,ke);se=Pe(xe=He[0],ke=He[1]),ve.moveFn=Ie,ve.doneFn=Re,y(X)},W.vangles&&!T.isFullCircle(W.sectorInRad)&&(ve.prepFn=T.noop,h(k.select(he),null)),p.init(ve)},B.isPtInside=function(V){if(this.isSmith)return!0;var W=this.sectorInRad,X=this.vangles,K=this.angularAxis.c2g(V.theta),re=this.radialAxis,ee=re.c2l(V.r);return(X?_.isPtInsidePolygon:T.isPtInsideSector)(ee,K,re._rl,W,X)},B.pathArc=function(V){var W=this.sectorInRad,X=this.vangles;return(X?_.pathPolygon:T.pathArc)(V,W[0],W[1],X)},B.pathSector=function(V){var W=this.sectorInRad,X=this.vangles;return(X?_.pathPolygon:T.pathSector)(V,W[0],W[1],X)},B.pathAnnulus=function(V,W){var X=this.sectorInRad,K=this.vangles;return(K?_.pathPolygonAnnulus:T.pathAnnulus)(V,W,X[0],X[1],K)},B.pathSubplot=function(){var V=this.innerRadius,W=this.radius;return V?this.pathAnnulus(V,W):this.pathSector(W)},B.fillViewInitialKey=function(V,W){V in this.viewInitial||(this.viewInitial[V]=W)}},12101:function($,R,e){"use strict";var k=e(71828),A=e(21994),l=k.deg2rad,T=k.rad2deg;$.exports=function(b,d,s){switch(A(b,s),b._id){case"x":case"radialaxis":r=d._subplot,(t=b).setGeometry=function(){var n=t._rl[0],i=t._rl[1],a=r.innerRadius,c=(r.radius-a)/(i-n),p=a/c,f=n>i?function(x){return x<=0}:function(x){return x>=0};t.c2g=function(x){var v=t.c2l(x)-n;return(f(v)?v:0)+p},t.g2c=function(x){return t.l2c(x+n-p)},t.g2p=function(x){return x*c},t.c2p=function(x){return t.g2p(t.c2g(x))}};break;case"angularaxis":!function(t,o){var r=t.type;if("linear"===r){var n=t.d2c,i=t.c2d;t.d2c=function(a,c){return p=n(a),"degrees"===c?l(p):p;var p},t.c2d=function(a,c){return i((p=a,"degrees"===c?T(p):p));var p}}t.makeCalcdata=function(a,c){var p,f,x=a[c],v=a._length,g=function(u){return t.d2c(u,a.thetaunit)};if(x){if(k.isTypedArray(x)&&"linear"===r){if(v===x.length)return x;if(x.subarray)return x.subarray(0,v)}for(p=new Array(v),f=0;f<v;f++)p[f]=g(x[f])}else{var y=c+"0",h="d"+c,m=y in a?g(a[y]):0,w=a[h]?g(a[h]):(t.period||2*Math.PI)/v;for(p=new Array(v),f=0;f<v;f++)p[f]=m+f*w}return p},t.setGeometry=function(){var a,c,p,f,x=o.sector,v=x.map(l),g={clockwise:-1,counterclockwise:1}[t.direction],y=l(t.rotation),h=function(S){return g*S+y},m=function(S){return(S-y)/g};switch(r){case"linear":c=a=k.identity,f=l,p=T,t.range=k.isFullCircle(v)?[x[0],x[0]+360]:v.map(m).map(T);break;case"category":var w=t._categories.length,u=t.period?Math.max(t.period,w):w;0===u&&(u=1),c=f=function(S){return 2*S*Math.PI/u},a=p=function(S){return S*u/Math.PI/2},t.range=[0,u]}t.c2g=function(S){return h(c(S))},t.g2c=function(S){return a(m(S))},t.t2g=function(S){return h(f(S))},t.g2t=function(S){return p(m(S))}}}(b,d)}var t,r}},39779:function($){"use strict";$.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}},23893:function($){"use strict";function R(l){return l<0?-1:l>0?1:0}function e(l){var T=l[0],b=l[1];if(!isFinite(T)||!isFinite(b))return[1,0];var d=(T+1)*(T+1)+b*b;return[(T*T+b*b-1)/d,2*b/d]}function k(l,T){return[T[0]*l.radius+l.cx,-T[1]*l.radius+l.cy]}function A(l,T){return T*l.radius}$.exports={smith:e,reactanceArc:function(l,T,b,d){var s=k(l,e([b,T])),t=s[0],o=s[1],r=k(l,e([d,T])),n=r[0],i=r[1];if(0===T)return["M"+t+","+o,"L"+n+","+i].join(" ");var a=A(l,1/Math.abs(T));return["M"+t+","+o,"A"+a+","+a+" 0 0,"+(T<0?1:0)+" "+n+","+i].join(" ")},resistanceArc:function(l,T,b,d){var s=A(l,1/(T+1)),t=k(l,e([T,b])),o=t[0],r=t[1],n=k(l,e([T,d])),i=n[0],a=n[1];if(R(b)!==R(d)){var c=k(l,e([T,0]));return["M"+o+","+r,"A"+s+","+s+" 0 0,"+(0<b?0:1)+" "+c[0]+","+c[1],"A"+s+","+s+" 0 0,"+(d<0?0:1)+i+","+a].join(" ")}return["M"+o+","+r,"A"+s+","+s+" 0 0,"+(d<b?0:1)+" "+i+","+a].join(" ")},smithTransform:k}},7504:function($,R,e){"use strict";var k=e(27659).AU,A=e(71828).counterRegex,l=e(77997),T=e(39779),b=T.attr,d=T.name,s=A(d),t={};t[b]={valType:"subplotid",dflt:d,editType:"calc"},$.exports={attr:b,name:d,idRoot:d,idRegex:s,attrRegex:s,attributes:t,layoutAttributes:e(33419),supplyLayoutDefaults:e(9558),plot:function(o){for(var r=o._fullLayout,n=o.calcdata,i=r._subplots[d],a=0;a<i.length;a++){var c=i[a],p=k(n,d,c),f=r[c]._subplot;f||(f=l(o,c,!0),r[c]._subplot=f),f.plot(p,r,o._promises)}},clean:function(o,r,n,i){for(var a=i._subplots[d]||[],c=0;c<a.length;c++){var p=a[c],f=i[p]._subplot;if(!r[p]&&f)for(var x in f.framework.remove(),f.clipPaths)f.clipPaths[x].remove()}},toSVG:e(93612).toSVG}},33419:function($,R,e){"use strict";var k=e(22399),A=e(13838),l=e(27670).Y,T=e(71828).extendFlat,b=e(30962).overrideAll,d=b({color:A.color,showline:T({},A.showline,{dflt:!0}),linecolor:A.linecolor,linewidth:A.linewidth,showgrid:T({},A.showgrid,{dflt:!0}),gridcolor:A.gridcolor,gridwidth:A.gridwidth,griddash:A.griddash},"plot","from-root"),s=b({ticklen:A.ticklen,tickwidth:T({},A.tickwidth,{dflt:2}),tickcolor:A.tickcolor,showticklabels:A.showticklabels,showtickprefix:A.showtickprefix,tickprefix:A.tickprefix,showticksuffix:A.showticksuffix,ticksuffix:A.ticksuffix,tickfont:A.tickfont,tickformat:A.tickformat,hoverformat:A.hoverformat,layer:A.layer},"plot","from-root"),t=T({visible:T({},A.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:T({},A.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},d,s),o=T({visible:T({},A.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:A.ticks,editType:"calc"},d,s);$.exports={domain:l({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:k.background},realaxis:t,imaginaryaxis:o,editType:"calc"}},9558:function($,R,e){"use strict";var k,A,l,T=e(71828),b=e(7901),d=e(44467),s=e(49119),t=e(27659).NG,o=e(89426),r=e(96115),n=e(92128),i=e(21994),a=e(33419),c=e(39779),p=c.axisNames,f=(k=function(v){return v.slice().reverse().map(function(g){return-g}).concat([0]).concat(v)},A=String,l={},function(v){var g=A?A(v):v;if(g in l)return l[g];var y=k(v);return l[g]=y,y});function x(v,g,y,h){var m=y("bgcolor");h.bgColor=b.combine(m,h.paper_bgcolor);var w,u=t(h.fullData,c.name,h.id),S=h.layoutOut;function _(B,j){return y(w+"."+B,j)}for(var E=0;E<p.length;E++){T.isPlainObject(v[w=p[E]])||(v[w]={});var L=v[w],C=d.newContainer(g,w);C._id=C._name=w,C._attr=h.id+"."+w,C._traceIndices=u.map(function(B){return B._expandedIndex});var P=_("visible");if(C.type="linear",i(C,S),o(L,C,_,C.type),P){var I,U,z,H,F="realaxis"===w;F&&_("side"),F?_("tickvals"):_("tickvals",f(g.realaxis.tickvals||a.realaxis.tickvals.dflt));var N=h.font||{};P&&(U=(I=_("color"))===L.color?I:N.color,z=N.size,H=N.family),r(L,C,_,C.type,{noTicklabelstep:!0,noAng:!F,noExp:!0,font:{color:U,size:z,family:H}}),T.coerce2(v,g,a,w+".ticklen"),T.coerce2(v,g,a,w+".tickwidth"),T.coerce2(v,g,a,w+".tickcolor",g.color),_("ticks")||(delete g[w].ticklen,delete g[w].tickwidth,delete g[w].tickcolor),n(L,C,_,{dfltColor:I,bgColor:h.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a[w]}),_("layer")}_("hoverformat"),delete C.type,C._input=L}}$.exports=function(v,g,y){s(v,g,y,{noUirevision:!0,type:c.name,attributes:a,handleDefaults:x,font:g.font,paper_bgcolor:g.paper_bgcolor,fullData:y,layoutOut:g})}},49119:function($,R,e){"use strict";var k=e(71828),A=e(44467),l=e(27670).c;$.exports=function(T,b,d,s){var t,o,n=s.attributes,i=s.handleDefaults,a=s.partition||"x",c=b._subplots[s.type],p=c.length,f=p&&c[0].replace(/\d+$/,"");function x(h,m){return k.coerce(t,o,n,h,m)}for(var v=0;v<p;v++){var g=c[v];t=T[g]?T[g]:T[g]={},o=A.newContainer(b,g,f),s.noUirevision||x("uirevision",b.uirevision);var y={};y[a]=[v/p,(v+1)/p],l(o,b,x,y),s.id=g,i(t,o,x,s)}}},5386:function($,R,e){"use strict";function A(l){var T=l.description?" "+l.description:"",b=l.keys||[];if(b.length>0){for(var d=[],s=0;s<b.length;s++)d[s]="`"+b[s]+"`";T+="Finally, the template string has access to ",T=1===b.length?"variable "+d[0]:"variables "+d.slice(0,-1).join(", ")+" and "+d.slice(-1)+"."}return T}e(31562),R.f=function(l,T){l=l||{},A(T=T||{});var b={valType:"string",dflt:"",editType:l.editType||"none"};return!1!==l.arrayOk&&(b.arrayOk=!0),b},R.s=function(l,T){l=l||{},A(T=T||{});var b={valType:"string",dflt:"",editType:l.editType||"calc"};return!1!==l.arrayOk&&(b.arrayOk=!0),b}},61639:function($,R,e){"use strict";var k=e(64380),A=e(27659).AU,l=e(71828).counterRegex,T="ternary";R.name=T;var b=R.attr="subplot";R.idRoot=T,R.idRegex=R.attrRegex=l(T),(R.attributes={})[b]={valType:"subplotid",dflt:"ternary",editType:"calc"},R.layoutAttributes=e(81367),R.supplyLayoutDefaults=e(25369),R.plot=function(d){for(var s=d._fullLayout,t=d.calcdata,o=s._subplots.ternary,r=0;r<o.length;r++){var n=o[r],i=A(t,T,n),a=s[n]._subplot;a||(a=new k({id:n,graphDiv:d,container:s._ternarylayer.node()},s),s[n]._subplot=a),a.plot(i,s,d._promises)}},R.clean=function(d,s,t,o){for(var r=o._subplots.ternary||[],n=0;n<r.length;n++){var i=r[n],a=o[i]._subplot;!s[i]&&a&&(a.plotContainer.remove(),a.clipDef.remove(),a.clipDefRelative.remove(),a.layers["a-title"].remove(),a.layers["b-title"].remove(),a.layers["c-title"].remove())}}},81367:function($,R,e){"use strict";var k=e(22399),A=e(27670).Y,l=e(13838),T=e(30962).overrideAll,b=e(1426).extendFlat,d={title:{text:l.title.text,font:l.title.font},color:l.color,tickmode:l.minor.tickmode,nticks:b({},l.nticks,{dflt:6,min:1}),tick0:l.tick0,dtick:l.dtick,tickvals:l.tickvals,ticktext:l.ticktext,ticks:l.ticks,ticklen:l.ticklen,tickwidth:l.tickwidth,tickcolor:l.tickcolor,ticklabelstep:l.ticklabelstep,showticklabels:l.showticklabels,showtickprefix:l.showtickprefix,tickprefix:l.tickprefix,showticksuffix:l.showticksuffix,ticksuffix:l.ticksuffix,showexponent:l.showexponent,exponentformat:l.exponentformat,minexponent:l.minexponent,separatethousands:l.separatethousands,tickfont:l.tickfont,tickangle:l.tickangle,tickformat:l.tickformat,tickformatstops:l.tickformatstops,hoverformat:l.hoverformat,showline:b({},l.showline,{dflt:!0}),linecolor:l.linecolor,linewidth:l.linewidth,showgrid:b({},l.showgrid,{dflt:!0}),gridcolor:l.gridcolor,gridwidth:l.gridwidth,griddash:l.griddash,layer:l.layer,min:{valType:"number",dflt:0,min:0},_deprecated:{title:l._deprecated.title,titlefont:l._deprecated.titlefont}},s=$.exports=T({domain:A({name:"ternary"}),bgcolor:{valType:"color",dflt:k.background},sum:{valType:"number",dflt:1,min:0},aaxis:d,baxis:d,caxis:d},"plot","from-root");s.uirevision={valType:"any",editType:"none"},s.aaxis.uirevision=s.baxis.uirevision=s.caxis.uirevision={valType:"any",editType:"none"}},25369:function($,R,e){"use strict";var k=e(7901),A=e(44467),l=e(71828),T=e(49119),b=e(96115),d=e(89426),s=e(38701),t=e(26218),o=e(92128),r=e(81367),n=["aaxis","baxis","caxis"];function i(c,p,f,x){var v,g,y,h=f("bgcolor"),m=f("sum");x.bgColor=k.combine(h,x.paper_bgcolor);for(var w=0;w<n.length;w++)g=c[v=n[w]]||{},(y=A.newContainer(p,v))._name=v,a(g,y,x,p);var u=p.aaxis,S=p.baxis,_=p.caxis;u.min+S.min+_.min>=m&&(u.min=0,S.min=0,_.min=0,c.aaxis&&delete c.aaxis.min,c.baxis&&delete c.baxis.min,c.caxis&&delete c.caxis.min)}function a(c,p,f,x){var v=r[p._name];function g(S,_){return l.coerce(c,p,v,S,_)}g("uirevision",x.uirevision),p.type="linear";var y=g("color"),h=y!==v.color.dflt?y:f.font.color,m=p._name.charAt(0).toUpperCase(),w="Component "+m,u=g("title.text",w);p._hovertitle=u===w?u:m,l.coerceFont(g,"title.font",{family:f.font.family,size:l.bigFont(f.font.size),color:h}),g("min"),t(c,p,g,"linear"),d(c,p,g,"linear"),b(c,p,g,"linear"),s(c,p,g,{outerTicks:!0}),g("showticklabels")&&(l.coerceFont(g,"tickfont",{family:f.font.family,size:f.font.size,color:h}),g("tickangle"),g("tickformat")),o(c,p,g,{dfltColor:y,bgColor:f.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:v}),g("hoverformat"),g("layer")}$.exports=function(c,p,f){T(c,p,f,{type:"ternary",attributes:r,handleDefaults:i,font:p.font,paper_bgcolor:p.paper_bgcolor})}},64380:function($,R,e){"use strict";var k=e(39898),A=e(84267),l=e(73972),T=e(71828),b=T.strTranslate,d=T._,s=e(7901),t=e(91424),o=e(21994),r=e(1426).extendFlat,n=e(74875),i=e(89298),a=e(28569),c=e(30211),p=e(64505),f=p.freeMode,x=p.rectMode,v=e(92998),g=e(47322).prepSelect,y=e(47322).selectOnClick,h=e(47322).clearOutline,m=e(47322).clearSelectionsCache,w=e(85555);function u(z,H){this.id=z.id,this.graphDiv=z.graphDiv,this.init(H),this.makeFramework(H),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}$.exports=u;var S=u.prototype;S.init=function(z){this.container=z._ternarylayer,this.defs=z._defs,this.layoutId=z._uid,this.traceHash={},this.layers={}},S.plot=function(z,H){var F=this,N=H[F.id],B=H._size;F._hasClipOnAxisFalse=!1;for(var j=0;j<z.length;j++)if(!1===z[j][0].trace.cliponaxis){F._hasClipOnAxisFalse=!0;break}F.updateLayers(N),F.adjustLayout(N,B),n.generalUpdatePerTraceModule(F.graphDiv,F,z,N),F.layers.plotbg.select("path").call(s.fill,N.bgcolor)},S.makeFramework=function(z){var H=this,F=H.graphDiv,N=z[H.id],B=H.clipId="clip"+H.layoutId+H.id,j=H.clipIdRelative="clip-relative"+H.layoutId+H.id;H.clipDef=T.ensureSingleById(z._clips,"clipPath",B,function(J){J.append("path").attr("d","M0,0Z")}),H.clipDefRelative=T.ensureSingleById(z._clips,"clipPath",j,function(J){J.append("path").attr("d","M0,0Z")}),H.plotContainer=T.ensureSingle(H.container,"g",H.id),H.updateLayers(N),t.setClipUrl(H.layers.backplot,B,F),t.setClipUrl(H.layers.grids,B,F)},S.updateLayers=function(z){var H=this.layers,F=["draglayer","plotbg","backplot","grids"];"below traces"===z.aaxis.layer&&F.push("aaxis","aline"),"below traces"===z.baxis.layer&&F.push("baxis","bline"),"below traces"===z.caxis.layer&&F.push("caxis","cline"),F.push("frontplot"),"above traces"===z.aaxis.layer&&F.push("aaxis","aline"),"above traces"===z.baxis.layer&&F.push("baxis","bline"),"above traces"===z.caxis.layer&&F.push("caxis","cline");var N=this.plotContainer.selectAll("g.toplevel").data(F,String),B=["agrid","bgrid","cgrid"];N.enter().append("g").attr("class",function(j){return"toplevel "+j}).each(function(j){var J=k.select(this);H[j]=J,"frontplot"===j?J.append("g").classed("scatterlayer",!0):"backplot"===j?J.append("g").classed("maplayer",!0):"plotbg"===j?J.append("path").attr("d","M0,0Z"):"aline"===j||"bline"===j||"cline"===j?J.append("path"):"grids"===j&&B.forEach(function(G){H[G]=J.append("g").classed("grid "+G,!0)})}),N.order()};var _=Math.sqrt(4/3);S.adjustLayout=function(z,H){var F,N,B,j,J,G,V=this,W=z.domain,X=(W.x[0]+W.x[1])/2,K=(W.y[0]+W.y[1])/2,re=W.x[1]-W.x[0],ee=W.y[1]-W.y[0],ie=re*H.w,oe=ee*H.h,ce=z.sum,me=z.aaxis.min,de=z.baxis.min,he=z.caxis.min;ie>_*oe?B=(j=oe)*_:j=(B=ie)/_,J=re*B/ie,G=ee*j/oe,N=H.t+H.h*(1-K)-j/2,V.x0=F=H.l+H.w*X-B/2,V.y0=N,V.w=B,V.h=j,V.sum=ce,V.xaxis={type:"linear",range:[me+2*he-ce,ce-me-2*de],domain:[X-J/2,X+J/2],_id:"x"},o(V.xaxis,V.graphDiv._fullLayout),V.xaxis.setScale(),V.xaxis.isPtWithinRange=function(Me){return Me.a>=V.aaxis.range[0]&&Me.a<=V.aaxis.range[1]&&Me.b>=V.baxis.range[1]&&Me.b<=V.baxis.range[0]&&Me.c>=V.caxis.range[1]&&Me.c<=V.caxis.range[0]},V.yaxis={type:"linear",range:[me,ce-de-he],domain:[K-G/2,K+G/2],_id:"y"},o(V.yaxis,V.graphDiv._fullLayout),V.yaxis.setScale(),V.yaxis.isPtWithinRange=function(){return!0};var ve=V.yaxis.domain[0],Pe=V.aaxis=r({},z.aaxis,{range:[me,ce-de-he],side:"left",tickangle:(+z.aaxis.tickangle||0)-30,domain:[ve,ve+G*_],anchor:"free",position:0,_id:"y",_length:B});o(Pe,V.graphDiv._fullLayout),Pe.setScale();var xe=V.baxis=r({},z.baxis,{range:[ce-me-he,de],side:"bottom",domain:V.xaxis.domain,anchor:"free",position:0,_id:"x",_length:B});o(xe,V.graphDiv._fullLayout),xe.setScale();var ke=V.caxis=r({},z.caxis,{range:[ce-me-de,he],side:"right",tickangle:(+z.caxis.tickangle||0)+30,domain:[ve,ve+G*_],anchor:"free",position:0,_id:"y",_length:B});o(ke,V.graphDiv._fullLayout),ke.setScale();var Ae="M"+F+","+(N+j)+"h"+B+"l-"+B/2+",-"+j+"Z";V.clipDef.select("path").attr("d",Ae),V.layers.plotbg.select("path").attr("d",Ae);var Te="M0,"+j+"h"+B+"l-"+B/2+",-"+j+"Z";V.clipDefRelative.select("path").attr("d",Te);var Q=b(F,N);V.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Q),V.clipDefRelative.select("path").attr("transform",null);var se=b(F-xe._offset,N+j);V.layers.baxis.attr("transform",se),V.layers.bgrid.attr("transform",se);var fe=b(F+B/2,N)+"rotate(30)"+b(0,-Pe._offset);V.layers.aaxis.attr("transform",fe),V.layers.agrid.attr("transform",fe);var ye=b(F+B/2,N)+"rotate(-30)"+b(0,-ke._offset);V.layers.caxis.attr("transform",ye),V.layers.cgrid.attr("transform",ye),V.drawAxes(!0),V.layers.aline.select("path").attr("d",Pe.showline?"M"+F+","+(N+j)+"l"+B/2+",-"+j:"M0,0").call(s.stroke,Pe.linecolor||"#000").style("stroke-width",(Pe.linewidth||0)+"px"),V.layers.bline.select("path").attr("d",xe.showline?"M"+F+","+(N+j)+"h"+B:"M0,0").call(s.stroke,xe.linecolor||"#000").style("stroke-width",(xe.linewidth||0)+"px"),V.layers.cline.select("path").attr("d",ke.showline?"M"+(F+B/2)+","+N+"l"+B/2+","+j:"M0,0").call(s.stroke,ke.linecolor||"#000").style("stroke-width",(ke.linewidth||0)+"px"),V.graphDiv._context.staticPlot||V.initInteractions(),t.setClipUrl(V.layers.frontplot,V._hasClipOnAxisFalse?null:V.clipId,V.graphDiv)},S.drawAxes=function(z){var H=this,F=H.graphDiv,N=H.id.substr(7)+"title",B=H.layers,j=H.aaxis,J=H.baxis,G=H.caxis;if(H.drawAx(j),H.drawAx(J),H.drawAx(G),z){var V=Math.max(j.showticklabels?j.tickfont.size/2:0,(G.showticklabels?.75*G.tickfont.size:0)+("outside"===G.ticks?.87*G.ticklen:0)),W=(J.showticklabels?J.tickfont.size:0)+("outside"===J.ticks?J.ticklen:0)+3;B["a-title"]=v.draw(F,"a"+N,{propContainer:j,propName:H.id+".aaxis.title",placeholder:d(F,"Click to enter Component A title"),attributes:{x:H.x0+H.w/2,y:H.y0-j.title.font.size/3-V,"text-anchor":"middle"}}),B["b-title"]=v.draw(F,"b"+N,{propContainer:J,propName:H.id+".baxis.title",placeholder:d(F,"Click to enter Component B title"),attributes:{x:H.x0-W,y:H.y0+H.h+.83*J.title.font.size+W,"text-anchor":"middle"}}),B["c-title"]=v.draw(F,"c"+N,{propContainer:G,propName:H.id+".caxis.title",placeholder:d(F,"Click to enter Component C title"),attributes:{x:H.x0+H.w+W,y:H.y0+H.h+.83*G.title.font.size+W,"text-anchor":"middle"}})}},S.drawAx=function(z){var H,F=this,N=F.graphDiv,B=z._name,j=B.charAt(0),J=z._id,G=F.layers[B],V=j+"tickLayout",W=(H=z).ticks+String(H.ticklen)+String(H.showticklabels);F[V]!==W&&(G.selectAll("."+J+"tick").remove(),F[V]=W),z.setScale();var X=i.calcTicks(z),K=i.clipEnds(z,X),re=i.makeTransTickFn(z),ee=i.getTickSigns(z)[2],ie=T.deg2rad(30),oe=ee*(z.linewidth||1)/2,ce=ee*z.ticklen,me=F.w,de=F.h,he="b"===j?"M0,"+oe+"l"+Math.sin(ie)*ce+","+Math.cos(ie)*ce:"M"+oe+",0l"+Math.cos(ie)*ce+","+-Math.sin(ie)*ce,ve={a:"M0,0l"+de+",-"+me/2,b:"M0,0l-"+me/2+",-"+de,c:"M0,0l-"+de+","+me/2}[j];i.drawTicks(N,z,{vals:"inside"===z.ticks?K:X,layer:G,path:he,transFn:re,crisp:!1}),i.drawGrid(N,z,{vals:K,layer:F.layers[j+"grid"],path:ve,transFn:re,crisp:!1}),i.drawLabels(N,z,{vals:X,layer:G,transFn:re,labelFns:i.makeLabelFns(z,0,30)})};var E=w.MINZOOM/2+.87,L="m-0.87,.5h"+E+"v3h-"+(E+5.2)+"l"+(E/2+2.6)+",-"+(.87*E+4.5)+"l2.6,1.5l-"+E/2+","+.87*E+"Z",C="m0.87,.5h-"+E+"v3h"+(E+5.2)+"l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-2.6,1.5l"+E/2+","+.87*E+"Z",P="m0,1l"+E/2+","+.87*E+"l2.6,-1.5l-"+(E/2+2.6)+",-"+(.87*E+4.5)+"l-"+(E/2+2.6)+","+(.87*E+4.5)+"l2.6,1.5l"+E/2+",-"+.87*E+"Z",I=!0;function U(z){k.select(z).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}S.clearOutline=function(){m(this.dragOptions),h(this.dragOptions.gd)},S.initInteractions=function(){var z,H,F,N,B,j,J,G,V,W,X,K,re=this,ee=re.layers.plotbg.select("path").node(),ie=re.graphDiv,oe=ie._fullLayout._zoomlayer;function ce(Te){var Q={};return Q[re.id+".aaxis.min"]=Te.a,Q[re.id+".baxis.min"]=Te.b,Q[re.id+".caxis.min"]=Te.c,Q}function me(Te,Q){var se=ie._fullLayout.clickmode;U(ie),2===Te&&(ie.emit("plotly_doubleclick",null),l.call("_guiRelayout",ie,ce({a:0,b:0,c:0}))),se.indexOf("select")>-1&&1===Te&&y(Q,ie,[re.xaxis],[re.yaxis],re.id,re.dragOptions),se.indexOf("event")>-1&&c.click(ie,Q,re.id)}function de(Te,Q){return 1-Q/re.h}function he(Te,Q){return 1-(Te+(re.h-Q)/Math.sqrt(3))/re.w}function ve(Te,Q){return(Te-(re.h-Q)/Math.sqrt(3))/re.w}function Pe(Te,Q){var se=F+Te*z,fe=N+Q*H,ye=Math.max(0,Math.min(1,de(0,N),de(0,fe))),Me=Math.max(0,Math.min(1,he(F,N),he(se,fe))),Ie=Math.max(0,Math.min(1,ve(F,N),ve(se,fe))),Ce=(ye/2+Ie)*re.w,Re=(1-ye/2-Me)*re.w,le=(Ce+Re)/2,ge=Re-Ce,_e=(1-ye)*re.h,Fe=_e-ge/_;ge<w.MINZOOM?(J=B,X.attr("d",V),K.attr("d","M0,0Z")):(J={a:B.a+ye*j,b:B.b+Me*j,c:B.c+Ie*j},X.attr("d",V+"M"+Ce+","+_e+"H"+Re+"L"+le+","+Fe+"L"+Ce+","+_e+"Z"),K.attr("d","M"+F+","+N+"m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2ZM"+Ce+","+_e+L+"M"+Re+","+_e+C+"M"+le+","+Fe+P)),W||(X.transition().style("fill",G>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),K.transition().style("opacity",1).duration(200),W=!0),ie.emit("plotly_relayouting",ce(J))}function xe(){U(ie),J!==B&&(l.call("_guiRelayout",ie,ce(J)),I&&ie.data&&ie._context.showTips&&(T.notifier(d(ie,"Double-click to zoom back out"),"long"),I=!1))}function ke(Te,Q){var se=Te/re.xaxis._m,fe=Q/re.yaxis._m,ye=[(J={a:B.a-fe,b:B.b+(se+fe)/2,c:B.c-(se-fe)/2}).a,J.b,J.c].sort(T.sorterAsc),Me=ye.indexOf(J.a),Ie=ye.indexOf(J.b),Ce=ye.indexOf(J.c);ye[0]<0&&(ye[1]+ye[0]/2<0?(ye[2]+=ye[0]+ye[1],ye[0]=ye[1]=0):(ye[2]+=ye[0]/2,ye[1]+=ye[0]/2,ye[0]=0),Q=(B.a-(J={a:ye[Me],b:ye[Ie],c:ye[Ce]}).a)*re.yaxis._m,Te=(B.c-J.c-B.b+J.b)*re.xaxis._m);var Re=b(re.x0+Te,re.y0+Q);re.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Re);var le=b(-Te,-Q);re.clipDefRelative.select("path").attr("transform",le),re.aaxis.range=[J.a,re.sum-J.b-J.c],re.baxis.range=[re.sum-J.a-J.c,J.b],re.caxis.range=[re.sum-J.a-J.b,J.c],re.drawAxes(!1),re._hasClipOnAxisFalse&&re.plotContainer.select(".scatterlayer").selectAll(".trace").call(t.hideOutsideRangePoints,re),ie.emit("plotly_relayouting",ce(J))}function Ae(){l.call("_guiRelayout",ie,ce(J))}this.dragOptions={element:ee,gd:ie,plotinfo:{id:re.id,domain:ie._fullLayout[re.id].domain,xaxis:re.xaxis,yaxis:re.yaxis},subplot:re.id,prepFn:function(Te,Q,se){re.dragOptions.xaxes=[re.xaxis],re.dragOptions.yaxes=[re.yaxis],z=ie._fullLayout._invScaleX,H=ie._fullLayout._invScaleY;var fe=re.dragOptions.dragmode=ie._fullLayout.dragmode;re.dragOptions.minDrag=f(fe)?1:void 0,"zoom"===fe?(re.dragOptions.moveFn=Pe,re.dragOptions.clickFn=me,re.dragOptions.doneFn=xe,function(ye,Me,Ie){var Ce=ee.getBoundingClientRect();F=Me-Ce.left,N=Ie-Ce.top,ie._fullLayout._calcInverseTransform(ie);var le=T.apply3DTransform(ie._fullLayout._invTransform)(F,N);F=le[0],N=le[1],J=B={a:re.aaxis.range[0],b:re.baxis.range[1],c:re.caxis.range[1]},j=re.aaxis.range[1]-B.a,G=A(re.graphDiv._fullLayout[re.id].bgcolor).getLuminance(),V="M0,"+re.h+"L"+re.w/2+", 0L"+re.w+","+re.h+"Z",W=!1,X=oe.append("path").attr("class","zoombox").attr("transform",b(re.x0,re.y0)).style({fill:G>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",V),K=oe.append("path").attr("class","zoombox-corners").attr("transform",b(re.x0,re.y0)).style({fill:s.background,stroke:s.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),re.clearOutline(ie)}(0,Q,se)):"pan"===fe?(re.dragOptions.moveFn=ke,re.dragOptions.clickFn=me,re.dragOptions.doneFn=Ae,J=B={a:re.aaxis.range[0],b:re.baxis.range[1],c:re.caxis.range[1]},re.clearOutline(ie)):(x(fe)||f(fe))&&g(Te,Q,se,re.dragOptions,fe)}},ee.onmousemove=function(Te){c.hover(ie,Te,re.id),ie._fullLayout._lasthover=ee,ie._fullLayout._hoversubplot=re.id},ee.onmouseout=function(Te){ie._dragging||a.unhover(ie,Te)},a.init(this.dragOptions)}},73972:function($,R,e){"use strict";var k=e(47769),A=e(64213),l=e(75138),T=e(41965),b=e(24401).addStyleRule,d=e(1426),s=e(9012),t=e(10820),o=d.extendFlat,r=d.extendDeepAll;function n(y){var h=y.name,m=y.categories,w=y.meta;if(R.modules[h])k.log("Type "+h+" already registered");else{R.subplotsRegistry[y.basePlotModule.name]||function(I){var U=I.name;if(R.subplotsRegistry[U])k.log("Plot type "+U+" already registered.");else for(var z in p(I),R.subplotsRegistry[U]=I,R.componentsRegistry)v(z,I.name)}(y.basePlotModule);for(var u={},S=0;S<m.length;S++)u[m[S]]=!0,R.allCategories[m[S]]=!0;for(var _ in R.modules[h]={_module:y,categories:u},w&&Object.keys(w).length&&(R.modules[h].meta=w),R.allTypes.push(h),R.componentsRegistry)f(_,h);y.layoutAttributes&&o(R.traceLayoutAttributes,y.layoutAttributes);var E=y.basePlotModule,L=E.name;if("mapbox"===L){var C=E.constants.styleRules;for(var P in C)b(".js-plotly-plot .plotly .mapboxgl-"+P,C[P])}"geo"!==L&&"mapbox"!==L||void 0!==window.PlotlyGeoAssets||(window.PlotlyGeoAssets={topojson:{}})}}function i(y){if("string"!=typeof y.name)throw new Error("Component module *name* must be a string.");var h=y.name;for(var m in R.componentsRegistry[h]=y,y.layoutAttributes&&(y.layoutAttributes._isLinkedToArray&&l(R.layoutArrayContainers,h),p(y)),R.modules)f(h,m);for(var w in R.subplotsRegistry)v(h,w);for(var u in R.transformsRegistry)x(h,u);y.schema&&y.schema.layout&&r(t,y.schema.layout)}function a(y){if("string"!=typeof y.name)throw new Error("Transform module *name* must be a string.");var h="Transform module "+y.name,m="function"==typeof y.transform,w="function"==typeof y.calcTransform;if(!m&&!w)throw new Error(h+" is missing a *transform* or *calcTransform* method.");for(var u in m&&w&&k.log([h+" has both a *transform* and *calcTransform* methods.","Please note that all *transform* methods are executed","before all *calcTransform* methods."].join(" ")),T(y.attributes)||k.log(h+" registered without an *attributes* object."),"function"!=typeof y.supplyDefaults&&k.log(h+" registered without a *supplyDefaults* method."),R.transformsRegistry[y.name]=y,R.componentsRegistry)x(u,y.name)}function c(y){var h=y.name,m=h.split("-")[0],w=y.dictionary,u=y.format,S=w&&Object.keys(w).length,_=u&&Object.keys(u).length,E=R.localeRegistry,L=E[h];if(L||(E[h]=L={}),m!==h){var C=E[m];C||(E[m]=C={}),S&&C.dictionary===L.dictionary&&(C.dictionary=w),_&&C.format===L.format&&(C.format=u)}S&&(L.dictionary=w),_&&(L.format=u)}function p(y){if(y.layoutAttributes){var h=y.layoutAttributes._arrayAttrRegexps;if(h)for(var m=0;m<h.length;m++)l(R.layoutArrayRegexes,h[m])}}function f(y,h){var m=R.componentsRegistry[y].schema;if(m&&m.traces){var w=m.traces[h];w&&r(R.modules[h]._module.attributes,w)}}function x(y,h){var m=R.componentsRegistry[y].schema;if(m&&m.transforms){var w=m.transforms[h];w&&r(R.transformsRegistry[h].attributes,w)}}function v(y,h){var m=R.componentsRegistry[y].schema;if(m&&m.subplots){var w=R.subplotsRegistry[h],u=w.layoutAttributes,S="subplot"===w.attr?w.name:w.attr;Array.isArray(S)&&(S=S[0]);var _=m.subplots[S];u&&_&&r(u,_)}}function g(y){return"object"==typeof y&&(y=y.type),y}R.modules={},R.allCategories={},R.allTypes=[],R.subplotsRegistry={},R.transformsRegistry={},R.componentsRegistry={},R.layoutArrayContainers=[],R.layoutArrayRegexes=[],R.traceLayoutAttributes={},R.localeRegistry={},R.apiMethodRegistry={},R.collectableSubplotTypes=null,R.register=function(y){if(R.collectableSubplotTypes=null,!y)throw new Error("No argument passed to Plotly.register.");y&&!Array.isArray(y)&&(y=[y]);for(var h=0;h<y.length;h++){var m=y[h];if(!m)throw new Error("Invalid module was attempted to be registered!");switch(m.moduleType){case"trace":n(m);break;case"transform":a(m);break;case"component":i(m);break;case"locale":c(m);break;case"apiMethod":R.apiMethodRegistry[m.name]=m.fn;break;default:throw new Error("Invalid module was attempted to be registered!")}}},R.getModule=function(y){var h=R.modules[g(y)];return!!h&&h._module},R.traceIs=function(y,h){if("various"===(y=g(y)))return!1;var m=R.modules[y];return m||(y&&k.log("Unrecognized trace type "+y+"."),m=R.modules[s.type.dflt]),!!m.categories[h]},R.getTransformIndices=function(y,h){for(var m=[],w=y.transforms||[],u=0;u<w.length;u++)w[u].type===h&&m.push(u);return m},R.hasTransform=function(y,h){for(var m=y.transforms||[],w=0;w<m.length;w++)if(m[w].type===h)return!0;return!1},R.getComponentMethod=function(y,h){var m=R.componentsRegistry[y];return m&&m[h]||A},R.call=function(){var y=arguments[0],h=[].slice.call(arguments,1);return R.apiMethodRegistry[y].apply(null,h)}},61914:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=A.extendFlat,T=A.extendDeep;function b(d){var s;switch(d){case"themes__thumb":s={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":s={title:{text:""},hidesources:!0,showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:s={}}return s}$.exports=function(d,s){var t,n=d.layout,i=T([],d.data),a=T({},n,b(s.tileClass)),c=d._context||{};if(s.width&&(a.width=s.width),s.height&&(a.height=s.height),"thumbnail"===s.tileClass||"themes__thumb"===s.tileClass){a.annotations=[];var p=Object.keys(a);for(t=0;t<p.length;t++)["xaxis","yaxis","zaxis"].indexOf(p[t].slice(0,5))>-1&&(a[p[t]].title={text:""});for(t=0;t<i.length;t++){var f=i[t];f.showscale=!1,f.marker&&(f.marker.showscale=!1),k.traceIs(f,"pie-like")&&(f.textposition="none")}}if(Array.isArray(s.annotations))for(t=0;t<s.annotations.length;t++)a.annotations.push(s.annotations[t]);var x=Object.keys(a).filter(function(m){return m.match(/^scene\d*$/)});if(x.length){var v={};for("thumbnail"===s.tileClass&&(v={title:{text:""},showaxeslabels:!1,showticklabels:!1,linetickenable:!1}),t=0;t<x.length;t++){var g=a[x[t]];g.xaxis||(g.xaxis={}),g.yaxis||(g.yaxis={}),g.zaxis||(g.zaxis={}),l(g.xaxis,v),l(g.yaxis,v),l(g.zaxis,v),g._scene=null}}var y=document.createElement("div");s.tileClass&&(y.className=s.tileClass);var h={gd:y,td:y,layout:a,data:i,config:{staticPlot:void 0===s.staticPlot||s.staticPlot,plotGlPixelRatio:void 0===s.plotGlPixelRatio?2:s.plotGlPixelRatio,displaylogo:s.displaylogo||!1,showLink:s.showLink||!1,showTips:s.showTips||!1,mapboxAccessToken:c.mapboxAccessToken}};return"transparent"!==s.setBackground&&(h.config.setBackground=s.setBackground||"opaque"),h.gd.defaultLayout=b(s.tileClass),h}},7239:function($,R,e){"use strict";var k=e(71828),A=e(403),l=e(22435),T=e(25095);$.exports=function(b,d){var s;return k.isPlainObject(b)||(s=k.getGraphDiv(b)),(d=d||{}).format=d.format||"png",d.width=d.width||null,d.height=d.height||null,d.imageDataOnly=!0,new Promise(function(t,o){s&&s._snapshotInProgress&&o(new Error("Snapshotting already in progress.")),k.isIE()&&"svg"!==d.format&&o(new Error(T.MSG_IE_BAD_FORMAT)),s&&(s._snapshotInProgress=!0);var r=A(b,d),n=d.filename||b.fn||"newplot";n+="."+d.format.replace("-","."),r.then(function(i){return s&&(s._snapshotInProgress=!1),l(i,n,d.format)}).then(function(i){t(i)}).catch(function(i){s&&(s._snapshotInProgress=!1),o(i)})})}},22435:function($,R,e){"use strict";var k=e(71828),A=e(25095);$.exports=function(l,T,b){var d=document.createElement("a"),s="download"in d;return new Promise(function(t,o){var r,n;return k.isIE()?(r=A.createBlob(l,"svg"),window.navigator.msSaveBlob(r,T),r=null,t(T)):s?(r=A.createBlob(l,b),n=A.createObjectURL(r),d.href=n,d.download=T,document.body.appendChild(d),d.click(),document.body.removeChild(d),A.revokeObjectURL(n),r=null,t(T)):k.isSafari()?(A.octetStream(("svg"===b?",":";base64,")+encodeURIComponent(l)),t(T)):void o(new Error("download error"))})}},25095:function($,R,e){"use strict";var k=e(73972);R.getDelay=function(l){return l._has&&(l._has("gl3d")||l._has("gl2d")||l._has("mapbox"))?500:0},R.getRedrawFunc=function(l){return function(){k.getComponentMethod("colorbar","draw")(l)}},R.encodeSVG=function(l){return"data:image/svg+xml,"+encodeURIComponent(l)},R.encodeJSON=function(l){return"data:application/json,"+encodeURIComponent(l)};var A=window.URL||window.webkitURL;R.createObjectURL=function(l){return A.createObjectURL(l)},R.revokeObjectURL=function(l){return A.revokeObjectURL(l)},R.createBlob=function(l,T){if("svg"===T)return new window.Blob([l],{type:"image/svg+xml;charset=utf-8"});if("full-json"===T)return new window.Blob([l],{type:"application/json;charset=utf-8"});var b=function(d){for(var s=d.length,t=new ArrayBuffer(s),o=new Uint8Array(t),r=0;r<s;r++)o[r]=d.charCodeAt(r);return t}(window.atob(l));return new window.Blob([b],{type:"image/"+T})},R.octetStream=function(l){document.location.href="data:application/octet-stream"+l},R.IMAGE_URL_PREFIX=/^data:image\/\w+;base64,/,R.MSG_IE_BAD_FORMAT="Sorry IE does not support downloading from canvas. Try {format:'svg'} instead."},44511:function($,R,e){"use strict";var k=e(25095),A={getDelay:k.getDelay,getRedrawFunc:k.getRedrawFunc,clone:e(61914),toSVG:e(5900),svgToImg:e(70942),toImage:e(56395),downloadImage:e(7239)};$.exports=A},70942:function($,R,e){"use strict";var k=e(71828),A=e(15398).EventEmitter,l=e(25095);$.exports=function(T){var b=T.emitter||new A,d=new Promise(function(s,t){var o=window.Image,r=T.svg,n=T.format||"png";if(k.isIE()&&"svg"!==n){var i=new Error(l.MSG_IE_BAD_FORMAT);return t(i),T.promise?d:b.emit("error",i)}var a,c,p=T.canvas,f=T.scale||1,g=f*(T.width||300),y=f*(T.height||150),h=p.getContext("2d",{willReadFrequently:!0}),m=new o;"svg"===n||k.isSafari()?c=l.encodeSVG(r):(a=l.createBlob(r,"svg"),c=l.createObjectURL(a)),p.width=g,p.height=y,m.onload=function(){var w;switch(a=null,l.revokeObjectURL(c),"svg"!==n&&h.drawImage(m,0,0,g,y),n){case"jpeg":w=p.toDataURL("image/jpeg");break;case"png":w=p.toDataURL("image/png");break;case"webp":w=p.toDataURL("image/webp");break;case"svg":w=c;break;default:var u="Image format is not jpeg, png, svg or webp.";if(t(new Error(u)),!T.promise)return b.emit("error",u)}s(w),T.promise||b.emit("success",w)},m.onerror=function(w){if(a=null,l.revokeObjectURL(c),t(w),!T.promise)return b.emit("error",w)},m.src=c});return T.promise?d:b}},56395:function($,R,e){"use strict";var k=e(15398).EventEmitter,A=e(73972),l=e(71828),T=e(25095),b=e(61914),d=e(5900),s=e(70942);$.exports=function(t,o){var r=new k,n=b(t,{format:"png"}),i=n.gd;i.style.position="absolute",i.style.left="-5000px",document.body.appendChild(i);var a=T.getRedrawFunc(i);return A.call("_doPlot",i,n.data,n.layout,n.config).then(a).then(function(){var c=T.getDelay(i._fullLayout);setTimeout(function(){var p=d(i),f=document.createElement("canvas");f.id=l.randstr(),(r=s({format:o.format,width:i._fullLayout.width,height:i._fullLayout.height,canvas:f,emitter:r,svg:p})).clean=function(){i&&document.body.removeChild(i)}},c)}).catch(function(c){r.emit("error",c)}),r}},5900:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(91424),T=e(7901),b=e(77922),d=/"/g,s="TOBESTRIPPED",t=new RegExp('("TOBESTRIPPED)|(TOBESTRIPPED")',"g");$.exports=function(o,r,n){var i,a=o._fullLayout,c=a._paper,p=a._toppaper,f=a.width,x=a.height;c.insert("rect",":first-child").call(l.setRect,0,0,f,x).call(T.fill,a.paper_bgcolor);var v=a._basePlotModules||[];for(i=0;i<v.length;i++){var g=v[i];g.toSVG&&g.toSVG(o)}if(p){var y=p.node().childNodes,h=Array.prototype.slice.call(y);for(i=0;i<h.length;i++){var m=h[i];m.childNodes.length&&c.node().appendChild(m)}}a._draggers&&a._draggers.remove(),c.node().style.background="",c.selectAll("text").attr({"data-unformatted":null,"data-math":null}).each(function(){var u=k.select(this);if("hidden"!==this.style.visibility&&"none"!==this.style.display){u.style({visibility:null,display:null});var S=this.style.fontFamily;S&&-1!==S.indexOf('"')&&u.style("font-family",S.replace(d,s))}else u.remove()}),c.selectAll(".gradient_filled,.pattern_filled").each(function(){var u=k.select(this),S=this.style.fill;S&&-1!==S.indexOf("url(")&&u.style("fill",S.replace(d,s));var _=this.style.stroke;_&&-1!==_.indexOf("url(")&&u.style("stroke",_.replace(d,s))}),"pdf"!==r&&"eps"!==r||c.selectAll("#MathJax_SVG_glyphs path").attr("stroke-width",0),c.node().setAttributeNS(b.xmlns,"xmlns",b.svg),c.node().setAttributeNS(b.xmlns,"xmlns:xlink",b.xlink),"svg"===r&&n&&(c.attr("width",n*f),c.attr("height",n*x),c.attr("viewBox","0 0 "+f+" "+x));var u,S,_,w=(new window.XMLSerializer).serializeToString(c.node());return w=(w=(u=w,S=k.select("body").append("div").style({display:"none"}).html(""),_=u.replace(/(&[^;]*;)/gi,function(E){return"&lt;"===E?"&#60;":"&rt;"===E?"&#62;":-1!==E.indexOf("<")||-1!==E.indexOf(">")?"":S.html(E).text()}),S.remove(),w=_).replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&amp;")).replace(t,"'"),A.isIE()&&(w=(w=(w=w.replace(/"/gi,"'")).replace(/(\('#)([^']*)('\))/gi,'("#$2")')).replace(/(\\')/gi,'"')),w}},75341:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l){for(var T=0;T<A.length;T++)A[T].i=T;k.mergeArray(l.text,A,"tx"),k.mergeArray(l.hovertext,A,"htx");var b=l.marker;if(b){k.mergeArray(b.opacity,A,"mo",!0),k.mergeArray(b.color,A,"mc");var d=b.line;d&&(k.mergeArray(d.color,A,"mlc"),k.mergeArrayCastPositive(d.width,A,"mlw"))}}},1486:function($,R,e){"use strict";var k=e(82196),A=e(12663).axisHoverFormat,l=e(5386).f,T=e(5386).s,b=e(50693),d=e(41940),s=e(97313),t=e(79952).u,o=e(1426).extendFlat,r=d({editType:"calc",arrayOk:!0,colorEditType:"style"}),n=o({},k.marker.line.width,{dflt:0}),i=o({width:n,editType:"calc"},b("marker.line")),a=o({line:i,editType:"calc"},b("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:t});$.exports={x:k.x,x0:k.x0,dx:k.dx,y:k.y,y0:k.y0,dy:k.dy,xperiod:k.xperiod,yperiod:k.yperiod,xperiod0:k.xperiod0,yperiod0:k.yperiod0,xperiodalignment:k.xperiodalignment,yperiodalignment:k.yperiodalignment,xhoverformat:A("x"),yhoverformat:A("y"),text:k.text,texttemplate:T({editType:"plot"},{keys:s.eventDataKeys}),hovertext:k.hovertext,hovertemplate:l({},{keys:s.eventDataKeys}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:o({},r,{}),insidetextfont:o({},r,{}),outsidetextfont:o({},r,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:o({},k.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:a,offsetgroup:k.offsetgroup,alignmentgroup:k.alignmentgroup,selected:{marker:{opacity:k.selected.marker.opacity,color:k.selected.marker.color,editType:"style"},textfont:k.selected.textfont,editType:"style"},unselected:{marker:{opacity:k.unselected.marker.opacity,color:k.unselected.marker.color,editType:"style"},textfont:k.unselected.textfont,editType:"style"},_deprecated:{bardir:{valType:"enumerated",editType:"calc",values:["v","h"]}}}},92290:function($,R,e){"use strict";var k=e(89298),A=e(42973),l=e(52075).hasColorscale,T=e(78803),b=e(75341),d=e(66279);$.exports=function(s,t){var o,r,n,i,a,c,p=k.getFromId(s,t.xaxis||"x"),f=k.getFromId(s,t.yaxis||"y"),x={msUTC:!(!t.base&&0!==t.base)};"h"===t.orientation?(o=p.makeCalcdata(t,"x",x),n=f.makeCalcdata(t,"y"),i=A(t,f,"y",n),a=!!t.yperiodalignment,c="y"):(o=f.makeCalcdata(t,"y",x),n=p.makeCalcdata(t,"x"),i=A(t,p,"x",n),a=!!t.xperiodalignment,c="x"),r=i.vals;for(var v=Math.min(r.length,o.length),g=new Array(v),y=0;y<v;y++)g[y]={p:r[y],s:o[y]},a&&(g[y].orig_p=n[y],g[y][c+"End"]=i.ends[y],g[y][c+"Start"]=i.starts[y]),t.ids&&(g[y].id=String(t.ids[y]));return l(t,"marker")&&T(s,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),l(t,"marker.line")&&T(s,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),b(g,t),d(g,t),g}},97313:function($){"use strict";$.exports={TEXTPAD:3,eventDataKeys:["value","label"]}},11661:function($,R,e){"use strict";var k=e(92770),A=e(71828).isArrayOrTypedArray,l=e(50606).BADNUM,T=e(73972),b=e(89298),d=e(99082).getAxisGroup,s=e(61546);function t(v,g,y,h,m){if(h.length){var w,u,S,_;switch(function(E,L){var C,P;for(C=0;C<L.length;C++){var I,U=L[C],z=U[0].trace,H="funnel"===z.type?z._base:z.base,F="h"===z.orientation?z.xcalendar:z.ycalendar,N="category"===E.type||"multicategory"===E.type?function(){return null}:E.d2c;if(A(H)){for(P=0;P<Math.min(H.length,U.length);P++)I=N(H[P],0,F),k(I)?(U[P].b=+I,U[P].hasB=1):U[P].b=0;for(;P<U.length;P++)U[P].b=0}else{I=N(H,0,F);var B=k(I);for(I=B?I:0,P=0;P<U.length;P++)U[P].b=I,B&&(U[P].hasB=1)}}}(y,h),m.mode){case"overlay":o(g,y,h,m);break;case"group":for(w=[],u=[],S=0;S<h.length;S++)void 0===(_=h[S])[0].trace.offset?u.push(_):w.push(_);u.length&&(E=v,C=y,U=new s(u,{posAxis:L=g,sepNegVal:!1,overlapNoMerge:!(I=m).norm}),function(z,H,F,N){for(var B=z._fullLayout,G=F.minDiff,V=F.traces,W=V.length,X=F.positions.length!==F.distinctPositions.length,K=G*(1-N.gap),re=d(B,H._id)+V[0][0].trace.orientation,ee=B._alignmentOpts[re]||{},ie=0;ie<W;ie++){var oe,ce,me=V[ie],de=me[0].trace,ve=Object.keys((ee[de.alignmentgroup]||{}).offsetGroups||{}).length,Pe=(oe=ve?K/ve:X?K/W:K)*(1-(N.groupgap||0));ce=ve?((2*de._offsetIndex+1-ve)*oe-Pe)/2:X?((2*ie+1-W)*oe-Pe)/2:-Pe/2;var xe=me[0].t;xe.barwidth=Pe,xe.poffset=ce,xe.bargroupwidth=K,xe.bardelta=G}F.binWidth=V[0][0].t.barwidth/100,n(F),i(H,F),a(H,F,X)}(E,L,U,I),function(z,H){for(var F=z.traces,N=0;N<F.length;N++){var B=F[N];if(void 0===B[0].trace.base)for(var j=new s([B],{posAxis:H,sepNegVal:!0,overlapNoMerge:!0}),J=0;J<B.length;J++){var G=B[J];if(G.p!==l){var V=j.put(G.p,G.b+G.s);V&&(G.b=V)}}}}(U,L),I.norm?(p(U),f(C,U,I)):c(C,U)),w.length&&o(g,y,w,m);break;case"stack":case"relative":for(w=[],u=[],S=0;S<h.length;S++)void 0===(_=h[S])[0].trace.base?u.push(_):w.push(_);u.length&&function(E,L,C,P,I){var U=new s(P,{posAxis:L,sepNegVal:"relative"===I.mode,overlapNoMerge:!(I.norm||"stack"===I.mode||"relative"===I.mode)});r(L,U,I),function(B,j,J){var G,V,W,X,K,re,ee=x(B),ie=j.traces;for(X=0;X<ie.length;X++)if("funnel"===(V=(G=ie[X])[0].trace).type)for(K=0;K<G.length;K++)(re=G[K]).s!==l&&j.put(re.p,-.5*re.s);for(X=0;X<ie.length;X++){W="funnel"===(V=(G=ie[X])[0].trace).type;var oe=[];for(K=0;K<G.length;K++)if((re=G[K]).s!==l){var ce,me=j.put(re.p,ce=W?re.s:re.s+re.b),de=me+ce;re.b=me,re[ee]=de,J.norm||(oe.push(de),re.hasB&&oe.push(me))}J.norm||(V._extremes[B._id]=b.findExtremes(B,oe,{tozero:!0,padded:!0}))}}(C,U,I);for(var z=0;z<P.length;z++)for(var H=P[z],F=0;F<H.length;F++){var N=H[F];N.s!==l&&N.b+N.s===U.get(N.p,N.s)&&(N._outmost=!0)}I.norm&&f(C,U,I)}(0,g,y,u,m),w.length&&o(g,y,w,m)}!function(E,L){var C,P,I,U=x(L),z={},H=1/0,F=-1/0;for(C=0;C<E.length;C++)for(I=E[C],P=0;P<I.length;P++){var N=I[P].p;k(N)&&(H=Math.min(H,N),F=Math.max(F,N))}var B=1e4/(F-H),j=z.round=function(re){return String(Math.round(B*(re-H)))};for(C=0;C<E.length;C++){(I=E[C])[0].t.extents=z;var J=I[0].t.poffset,G=Array.isArray(J);for(P=0;P<I.length;P++){var V=I[P],W=V[U]-V.w/2;if(k(W)){var X=V[U]+V.w/2,K=j(V.p);z[K]=z[K]?[Math.min(W,z[K][0]),Math.max(X,z[K][1])]:[W,X]}V.p0=V.p+(G?J[P]:J),V.p1=V.p0+V.w,V.s0=V.b,V.s1=V.s0+V.s}}}(h,g)}var E,L,C,I,U}function o(v,g,y,h){for(var m=0;m<y.length;m++){var u=new s([y[m]],{posAxis:v,sepNegVal:!1,overlapNoMerge:!h.norm});r(v,u,h),h.norm?(p(u),f(g,u,h)):c(g,u)}}function r(v,g,y){for(var h=g.minDiff,m=g.traces,w=h*(1-y.gap),u=w*(1-(y.groupgap||0)),S=-u/2,_=0;_<m.length;_++){var E=m[_][0].t;E.barwidth=u,E.poffset=S,E.bargroupwidth=w,E.bardelta=h}g.binWidth=m[0][0].t.barwidth/100,n(g),i(v,g),a(v,g)}function n(v){var g,y,h=v.traces;for(g=0;g<h.length;g++){var m,w=h[g],u=w[0],S=u.trace,_=u.t,E=S._offset||S.offset,L=_.poffset;if(A(E)){for(m=Array.prototype.slice.call(E,0,w.length),y=0;y<m.length;y++)k(m[y])||(m[y]=L);for(y=m.length;y<w.length;y++)m.push(L);_.poffset=m}else void 0!==E&&(_.poffset=E);var C=S._width||S.width,P=_.barwidth;if(A(C)){var I=Array.prototype.slice.call(C,0,w.length);for(y=0;y<I.length;y++)k(I[y])||(I[y]=P);for(y=I.length;y<w.length;y++)I.push(P);if(_.barwidth=I,void 0===E){for(m=[],y=0;y<w.length;y++)m.push(L+(P-I[y])/2);_.poffset=m}}else void 0!==C&&(_.barwidth=C,void 0===E&&(_.poffset=L+(P-C)/2))}}function i(v,g){for(var y=g.traces,h=x(v),m=0;m<y.length;m++)for(var w=y[m],u=w[0].t,S=u.poffset,_=Array.isArray(S),E=u.barwidth,L=Array.isArray(E),C=0;C<w.length;C++){var P=w[C],I=P.w=L?E[C]:E;void 0===P.p&&(P.p=P[h],P["orig_"+h]=P[h]),P[h]=P.p+((_?S[C]:S)+I/2)}}function a(v,g,y){var h=g.traces,m=g.minDiff/2;b.minDtick(v,g.minDiff,g.distinctPositions[0],y);for(var w=0;w<h.length;w++){var u,S,_,E,L=h[w],C=L[0],P=C.trace,I=[];for(E=0;E<L.length;E++)S=(u=L[E]).p-m,I.push(S,_=u.p+m);if(P.width||P.offset){var U=C.t,z=U.poffset,H=U.barwidth,F=Array.isArray(z),N=Array.isArray(H);for(E=0;E<L.length;E++)_=(S=(u=L[E]).p+(F?z[E]:z))+(N?H[E]:H),I.push(S,_)}P._extremes[v._id]=b.findExtremes(v,I,{padded:!1})}}function c(v,g){for(var y=g.traces,h=x(v),m=0;m<y.length;m++){for(var w=y[m],u=w[0].trace,S="scatter"===u.type,_="v"===u.orientation,E=[],L=!1,C=0;C<w.length;C++){var P=w[C],I=S?0:P.b,U=S?_?P.y:P.x:I+P.s;P[h]=U,E.push(U),P.hasB&&E.push(I),P.hasB&&P.b||(L=!0)}u._extremes[v._id]=b.findExtremes(v,E,{tozero:L,padded:!0})}}function p(v){for(var g=v.traces,y=0;y<g.length;y++)for(var h=g[y],m=0;m<h.length;m++){var w=h[m];w.s!==l&&v.put(w.p,w.b+w.s)}}function f(v,g,y){var h=g.traces,m=x(v),w="fraction"===y.norm?1:100,u=w/1e9,S=v.l2c(v.c2l(0)),_="stack"===y.mode?w:S;function E(J){return k(v.c2l(J))&&(J<S-u||J>_+u||!k(S))}for(var L=0;L<h.length;L++){for(var C=h[L],P=C[0].trace,I=[],U=!1,z=!1,H=0;H<C.length;H++){var F=C[H];if(F.s!==l){var N=Math.abs(w/g.get(F.p,F.s));F.b*=N,F.s*=N;var B=F.b,j=B+F.s;F[m]=j,I.push(j),z=z||E(j),F.hasB&&(I.push(B),z=z||E(B)),F.hasB&&F.b||(U=!0)}}P._extremes[v._id]=b.findExtremes(v,I,{tozero:U,padded:z})}}function x(v){return v._id.charAt(0)}$.exports={crossTraceCalc:function(v,g){for(var y=g.xaxis,h=g.yaxis,m=v._fullLayout,w=v._fullData,u=v.calcdata,S=[],_=[],E=0;E<w.length;E++){var L=w[E];if(!0===L.visible&&T.traceIs(L,"bar")&&L.xaxis===y._id&&L.yaxis===h._id&&("h"===L.orientation?S.push(u[E]):_.push(u[E]),L._computePh))for(var C=v.calcdata[E],P=0;P<C.length;P++)"function"==typeof C[P].ph0&&(C[P].ph0=C[P].ph0()),"function"==typeof C[P].ph1&&(C[P].ph1=C[P].ph1())}var I={xCat:"category"===y.type||"multicategory"===y.type,yCat:"category"===h.type||"multicategory"===h.type,mode:m.barmode,norm:m.barnorm,gap:m.bargap,groupgap:m.bargroupgap};t(v,y,h,_,I),t(v,h,y,S,I)},setGroupPositions:t}},90769:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(73972),T=e(67513),b=e(73927),d=e(98340),s=e(26125),t=e(1486),o=k.coerceFont;function r(n,i,a,c,p,f){var x=!1!==(f=f||{}).moduleHasSelected,v=!1!==f.moduleHasUnselected,g=!1!==f.moduleHasConstrain,y=!1!==f.moduleHasCliponaxis,h=!1!==f.moduleHasTextangle,m=!1!==f.moduleHasInsideanchor,w=!!f.hasPathbar,u=Array.isArray(p)||"auto"===p,S=u||"inside"===p,_=u||"outside"===p;if(S||_){var E=o(c,"textfont",a.font),L=k.extendFlat({},E),C=!(n.textfont&&n.textfont.color);if(C&&delete L.color,o(c,"insidetextfont",L),w){var P=k.extendFlat({},E);C&&delete P.color,o(c,"pathbar.textfont",P)}_&&o(c,"outsidetextfont",E),x&&c("selected.textfont.color"),v&&c("unselected.textfont.color"),g&&c("constraintext"),y&&c("cliponaxis"),h&&c("textangle"),c("texttemplate")}S&&m&&c("insidetextanchor")}$.exports={supplyDefaults:function(n,i,a,c){function p(g,y){return k.coerce(n,i,t,g,y)}if(T(n,i,c,p)){b(n,i,c,p),p("xhoverformat"),p("yhoverformat"),p("orientation",i.x&&!i.y?"h":"v"),p("base"),p("offset"),p("width"),p("text"),p("hovertext"),p("hovertemplate");var f=p("textposition");r(n,0,c,p,f,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),d(n,i,p,a,c);var x=(i.marker.line||{}).color,v=l.getComponentMethod("errorbars","supplyDefaults");v(n,i,x||A.defaultLine,{axis:"y"}),v(n,i,x||A.defaultLine,{axis:"x",inherit:"y"}),k.coerceSelectionMarkerOpacity(i,p)}else i.visible=!1},crossTraceDefaults:function(n,i){var c;function p(x){return k.coerce(c._input,c,t,x)}if("group"===i.barmode)for(var f=0;f<n.length;f++)"bar"===(c=n[f]).type&&s(c._input,c,i,p)},handleText:r}},58065:function($){"use strict";$.exports=function(R,e,k){return R.x="xVal"in e?e.xVal:e.x,R.y="yVal"in e?e.yVal:e.y,e.xa&&(R.xaxis=e.xa),e.ya&&(R.yaxis=e.ya),"h"===k.orientation?(R.label=R.y,R.value=R.x):(R.label=R.x,R.value=R.y),R}},69383:function($,R,e){"use strict";var k=e(92770),A=e(84267),l=e(71828).isArrayOrTypedArray;R.coerceString=function(T,b,d){if("string"==typeof b){if(b||!T.noBlank)return b}else if(("number"==typeof b||!0===b)&&!T.strict)return String(b);return void 0!==d?d:T.dflt},R.coerceNumber=function(T,b,d){if(k(b)){b=+b;var s=T.min,t=T.max;if(!(void 0!==s&&b<s||void 0!==t&&b>t))return b}return void 0!==d?d:T.dflt},R.coerceColor=function(T,b,d){return A(b).isValid()?b:void 0!==d?d:T.dflt},R.coerceEnumerated=function(T,b,d){return T.coerceNumber&&(b=+b),-1!==T.values.indexOf(b)?b:void 0!==d?d:T.dflt},R.getValue=function(T,b){var d;return Array.isArray(T)?b<T.length&&(d=T[b]):d=T,d},R.getLineWidth=function(T,b){return 0<b.mlw?b.mlw:l(T.marker.line.width)?0:T.marker.line.width}},95423:function($,R,e){"use strict";var k=e(30211),A=e(73972),l=e(7901),T=e(71828).fillText,b=e(69383).getLineWidth,d=e(89298).hoverLabelText,s=e(50606).BADNUM;function t(r,n,i,a,c){var p,f,x,v,g,y,h,m=r.cd,w=m[0].trace,u=m[0].t,S="closest"===a,_="waterfall"===w.type,E=r.maxHoverDistance,L=r.maxSpikeDistance;"h"===w.orientation?(p=i,f=n,x="y",v="x",g=G,y=j):(p=n,f=i,x="x",v="y",y=G,g=j);var C=w[x+"period"],P=S||C;function I(oe){return z(oe,-1)}function U(oe){return z(oe,1)}function z(oe,ce){return oe[x]+ce*oe.w/2}function H(oe){return oe[x+"End"]-oe[x+"Start"]}var F=S?I:C?function(oe){return oe.p-H(oe)/2}:function(oe){return Math.min(I(oe),oe.p-u.bardelta/2)},N=S?U:C?function(oe){return oe.p+H(oe)/2}:function(oe){return Math.max(U(oe),oe.p+u.bardelta/2)};function B(oe,ce,me){return c.finiteRange&&(me=0),k.inbox(oe-p,ce-p,me+Math.min(1,Math.abs(ce-oe)/h)-1)}function j(oe){return B(F(oe),N(oe),E)}function J(oe){var ce=oe[v];if(_){var me=Math.abs(oe.rawS)||0;f>0?ce+=me:f<0&&(ce-=me)}return ce}function G(oe){var ce=f,me=oe.b,de=J(oe);return k.inbox(me-ce,de-ce,E+(de-ce)/(de-me)-1)}var V=r[x+"a"],W=r[v+"a"];h=Math.abs(V.r2c(V.range[1])-V.r2c(V.range[0]));var oe,ce,me,de,X=k.getDistanceFunction(a,g,y,function(oe){return(g(oe)+y(oe))/2});if(k.getClosest(m,X,r),!1!==r.index&&m[r.index].p!==s){P||(F=function(oe){return Math.min(I(oe),oe.p-u.bargroupwidth/2)},N=function(oe){return Math.max(U(oe),oe.p+u.bargroupwidth/2)});var K=m[r.index],re=w.base?K.b+K.s:K.s;r[v+"0"]=r[v+"1"]=W.c2p(K[v],!0),r[v+"LabelVal"]=re;var ee=u.extents[u.extents.round(K.p)];return r[x+"0"]=V.c2p(S?F(K):ee[0],!0),r[x+"1"]=V.c2p(S?N(K):ee[1],!0),r[x+"LabelVal"]=void 0!==K.orig_p?K.orig_p:K.p,r.labelLabel=d(V,r[x+"LabelVal"],w[x+"hoverformat"]),r.valueLabel=d(W,r[v+"LabelVal"],w[v+"hoverformat"]),r.baseLabel=d(W,K.b,w[v+"hoverformat"]),r.spikeDistance=(ce=f,me=(oe=K).b,de=J(oe),(k.inbox(me-ce,de-ce,L+(de-ce)/(de-me)-1)+function(oe){return B(I(oe),U(oe),L)}(K))/2),r[x+"Spike"]=V.c2p(K.p,!0),T(K,w,r),r.hovertemplate=w.hovertemplate,r}}function o(r,n){var i=n.mcc||r.marker.color,a=n.mlcc||r.marker.line.color,c=b(r,n);return l.opacity(i)?i:l.opacity(a)&&c?a:void 0}$.exports={hoverPoints:function(r,n,i,a,c){var p=t(r,n,i,a,c);if(p){var f=p.cd,x=f[0].trace,v=f[p.index];return p.color=o(x,v),A.getComponentMethod("errorbars","hoverInfo")(v,x,p),[p]}},hoverOnBars:t,getTraceColor:o}},60822:function($,R,e){"use strict";$.exports={attributes:e(1486),layoutAttributes:e(43641),supplyDefaults:e(90769).supplyDefaults,crossTraceDefaults:e(90769).crossTraceDefaults,supplyLayoutDefaults:e(13957),calc:e(92290),crossTraceCalc:e(11661).crossTraceCalc,colorbar:e(4898),arraysToCalcdata:e(75341),plot:e(17295).plot,style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,hoverPoints:e(95423).hoverPoints,eventData:e(58065),selectPoints:e(81974),moduleType:"trace",name:"bar",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},43641:function($){"use strict";$.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},13957:function($,R,e){"use strict";var k=e(73972),A=e(89298),l=e(71828),T=e(43641);$.exports=function(b,d,s){function t(x,v){return l.coerce(b,d,T,x,v)}for(var o=!1,r=!1,n=!1,i={},a=t("barmode"),c=0;c<s.length;c++){var p=s[c];if(k.traceIs(p,"bar")&&p.visible){if(o=!0,"group"===a){var f=p.xaxis+p.yaxis;i[f]&&(n=!0),i[f]=!0}p.visible&&"histogram"===p.type&&"category"!==A.getFromId({_fullLayout:d},p["v"===p.orientation?"xaxis":"yaxis"]).type&&(r=!0)}}o?("overlay"!==a&&t("barnorm"),t("bargap",r&&!n?0:.2),t("bargroupgap")):delete d.barmode}},17295:function($,R,e){"use strict";var k=e(39898),A=e(92770),l=e(71828),T=e(63893),b=e(7901),d=e(91424),s=e(73972),t=e(89298).tickText,o=e(72597),r=o.recordMinTextSize,n=o.clearMinTextSize,i=e(16688),a=e(69383),c=e(97313),p=e(1486),f=p.text,x=p.textposition,v=e(23469).appendArrayPointValue,g=c.TEXTPAD;function y(L){return L.id}function m(L,C){return L<C?1:-1}function w(L,C,P,I){var U;return!C.uniformtext.mode&&u(P)?(I&&(U=I()),L.transition().duration(P.duration).ease(P.easing).each("end",function(){U&&U()}).each("interrupt",function(){U&&U()})):L}function u(L){return L&&L.duration>0}function S(L){return"auto"===L?0:L}function _(L,C){var P=Math.PI/180*C,I=Math.abs(Math.sin(P)),U=Math.abs(Math.cos(P));return{x:L.width*U+L.height*I,y:L.width*I+L.height*U}}function E(L,C,P,I,U,z){var H=!!z.isHorizontal,F=!!z.constrained,N=z.angle||0,B=z.anchor||"end",j="end"===B,J="start"===B,G=((z.leftToRight||0)+1)/2,V=1-G,W=U.width,X=U.height,K=Math.abs(C-L),re=Math.abs(I-P),ee=K>2*g&&re>2*g?g:0;K-=2*ee,re-=2*ee;var ie=S(N);"auto"!==N||W<=K&&X<=re||!(W>K||X>re)||(W>re||X>K)&&W<X==K<re||(ie+=90);var oe=_(U,ie),ce=1;F&&(ce=Math.min(1,K/oe.x,re/oe.y));var me=U.left*V+U.right*G,de=(U.top+U.bottom)/2,he=(L+g)*V+(C-g)*G,ve=(P+I)/2,Pe=0,xe=0;if(J||j){var ke=(H?oe.x:oe.y)/2,Ae=H?m(L,C):m(P,I);H?J?(he=L+Ae*ee,Pe=-Ae*ke):(he=C-Ae*ee,Pe=Ae*ke):J?(ve=P+Ae*ee,xe=-Ae*ke):(ve=I-Ae*ee,xe=Ae*ke)}return{textX:me,textY:de,targetX:he,targetY:ve,anchorX:Pe,anchorY:xe,scale:ce,rotate:ie}}$.exports={plot:function(L,C,P,I,U,z){var H=C.xaxis,F=C.yaxis,N=L._fullLayout;U||(U={mode:N.barmode,norm:N.barmode,gap:N.bargap,groupgap:N.bargroupgap},n("bar",N));var B=l.makeTraceGroups(I,P,"trace bars").each(function(j){var J=k.select(this),G=j[0].trace,X="bar"===G.type||"funnel"===G.type,K=0;"waterfall"===G.type&&G.connector.visible&&"between"===G.connector.mode&&(K=G.connector.line.width/2);var re="h"===G.orientation,ee=u(U),ie=l.ensureSingle(J,"g","points"),oe=function h(L){if(L.ids)return y}(G),ce=ie.selectAll("g.point").data(l.identity,oe);ce.enter().append("g").classed("point",!0),ce.exit().remove(),ce.each(function(de,he){var ve,Pe,le,ge,_e,Fe,Ve,He,nt,tt,xe=k.select(this),ke=(ge=H,_e=F,He=[],tt=(Fe=re)?_e:ge,(Ve=[])[0]=(nt=Fe?ge:_e).c2p((le=de).s0,!0),He[0]=tt.c2p(le.p0,!0),Ve[1]=nt.c2p(le.s1,!0),He[1]=tt.c2p(le.p1,!0),Fe?[Ve,He]:[He,Ve]),Ae=ke[0][0],Te=ke[0][1],Q=ke[1][0],se=ke[1][1],fe=0==(re?Te-Ae:se-Q);if(fe&&X&&a.getLineWidth(G,de)&&(fe=!1),fe||(fe=!(A(Ae)&&A(Te)&&A(Q)&&A(se))),de.isBlank=fe,fe&&(re?Te=Ae:se=Q),K&&!fe&&(re?(Ae-=m(Ae,Te)*K,Te+=m(Ae,Te)*K):(Q-=m(Q,se)*K,se+=m(Q,se)*K)),"waterfall"===G.type){if(!fe){var ye=G[de.dir].marker;ve=ye.line.width,Pe=ye.color}}else ve=a.getLineWidth(G,de),Pe=de.mc||G.marker.color;function Me(le){var ge=k.round(ve/2%1,2);return 0===U.gap&&0===U.groupgap?k.round(Math.round(le)-ge,2):le}if(!L._context.staticPlot){var Ie=b.opacity(Pe)<1||ve>.01?Me:function(le,ge,_e){return _e&&le===ge?le:Math.abs(le-ge)>=2?Me(le):le>ge?Math.ceil(le):Math.floor(le)};Ae=Ie(Ae,Te,re),Te=Ie(Te,Ae,re),Q=Ie(Q,se,!re),se=Ie(se,Q,!re)}var Ce=w(l.ensureSingle(xe,"path"),N,U,z);if(Ce.style("vector-effect","non-scaling-stroke").attr("d",isNaN((Te-Ae)*(se-Q))||fe&&L._context.staticPlot?"M0,0Z":"M"+Ae+","+Q+"V"+se+"H"+Te+"V"+Q+"Z").call(d.setClipUrl,C.layerClipId,L),!N.uniformtext.mode&&ee){var Re=d.makePointStyleFns(G);d.singlePointStyle(de,Ce,G,Re,L)}(function(le,ge,_e,Fe,Ve,He,nt,tt,ot,dt,kt){var mt,wt=ge.xaxis,Lt=ge.yaxis,Ct=le._fullLayout;function It(Nt,Gt,un){return l.ensureSingle(Nt,"text").text(Gt).attr({class:"bartext bartext-"+mt,"text-anchor":"middle","data-notex":1}).call(d.font,un).call(T.convertToTspans,le)}var Gt,un,pn,Kt,wn,Bn,Ut=Fe[0].trace,Rt="h"===Ut.orientation,Ge=(un=Ve,pn=wt,Kt=Lt,wn=(Bn=(Gt=Fe)[0].trace).texttemplate?function(vn,cn,dn,sn,hn){var En=cn[0].trace,Mn=l.castOption(En,dn,"texttemplate");if(!Mn)return"";var Rn,Nn,Fn,rr,$n="histogram"===En.type,mr="waterfall"===En.type,fr="funnel"===En.type,Zn="h"===En.orientation;function qn(Un){return t(rr,rr.c2l(Un),!0).text}Zn?(Rn="y",Nn=hn,Fn="x",rr=sn):(Rn="x",Nn=sn,Fn="y",rr=hn);var Zt=cn[dn],nn={};nn.label=Zt.p,nn.labelLabel=nn[Rn+"Label"]=t(Nn,Nn.c2l(Zt.p),!0).text;var zn=l.castOption(En,Zt.i,"text");(0===zn||zn)&&(nn.text=zn),nn.value=Zt.s,nn.valueLabel=nn[Fn+"Label"]=qn(Zt.s);var _n={};v(_n,En,Zt.i),($n||void 0===_n.x)&&(_n.x=Zn?nn.value:nn.label),($n||void 0===_n.y)&&(_n.y=Zn?nn.label:nn.value),($n||void 0===_n.xLabel)&&(_n.xLabel=Zn?nn.valueLabel:nn.labelLabel),($n||void 0===_n.yLabel)&&(_n.yLabel=Zn?nn.labelLabel:nn.valueLabel),mr&&(nn.delta=+Zt.rawS||Zt.s,nn.deltaLabel=qn(nn.delta),nn.final=Zt.v,nn.finalLabel=qn(nn.final),nn.initial=nn.final-nn.delta,nn.initialLabel=qn(nn.initial)),fr&&(nn.value=Zt.s,nn.valueLabel=qn(nn.value),nn.percentInitial=Zt.begR,nn.percentInitialLabel=l.formatPercent(Zt.begR),nn.percentPrevious=Zt.difR,nn.percentPreviousLabel=l.formatPercent(Zt.difR),nn.percentTotal=Zt.sumR,nn.percenTotalLabel=l.formatPercent(Zt.sumR));var Cn=l.castOption(En,Zt.i,"customdata");return Cn&&(nn.customdata=Cn),l.texttemplateString(Mn,nn,vn._d3locale,_n,nn,En._meta||{})}(Ct,Gt,un,pn,Kt):Bn.textinfo?function(vn,cn,dn,sn){var hn=vn[0].trace,En="h"===hn.orientation,Mn="waterfall"===hn.type,Rn="funnel"===hn.type;function Nn(Cn){return t(En?dn:sn,+Cn,!0).text}var Fn,mr=vn[cn],fr=hn.textinfo.split("+"),Zn=[],qn=function(Cn){return-1!==fr.indexOf(Cn)};if(qn("label")&&Zn.push(t(En?sn:dn,vn[cn].p,!0).text),qn("text")&&(0===(Fn=l.castOption(hn,mr.i,"text"))||Fn)&&Zn.push(Fn),Mn){var ur=+mr.rawS||mr.s,Zt=mr.v,nn=Zt-ur;qn("initial")&&Zn.push(Nn(nn)),qn("delta")&&Zn.push(Nn(ur)),qn("final")&&Zn.push(Nn(Zt))}if(Rn){qn("value")&&Zn.push(Nn(mr.s));var zn=0;qn("percent initial")&&zn++,qn("percent previous")&&zn++,qn("percent total")&&zn++;var _n=zn>1;qn("percent initial")&&(Fn=l.formatPercent(mr.begR),_n&&(Fn+=" of initial"),Zn.push(Fn)),qn("percent previous")&&(Fn=l.formatPercent(mr.difR),_n&&(Fn+=" of previous"),Zn.push(Fn)),qn("percent total")&&(Fn=l.formatPercent(mr.sumR),_n&&(Fn+=" of total"),Zn.push(Fn))}return Zn.join("<br>")}(Gt,un,pn,Kt):a.getValue(Bn.text,un),a.coerceString(f,wn));mt=function(Nt,Gt){var un=a.getValue(Nt.textposition,Gt);return a.coerceEnumerated(x,un)}(Ut,Ve);var Be=Fe[Ve],Ye=!("stack"===dt.mode||"relative"===dt.mode)||Be._outmost;if(Ge&&"none"!==mt&&(!Be.isBlank&&He!==nt&&tt!==ot||"auto"!==mt&&"inside"!==mt)){var rt=Ct.font,Se=i.getBarColor(Fe[Ve],Ut),ze=i.getInsideTextFont(Ut,Ve,rt,Se),Ke=i.getOutsideTextFont(Ut,Ve,rt),st=_e.datum();Rt?"log"===wt.type&&st.s0<=0&&(He=wt.range[0]<wt.range[1]?0:wt._length):"log"===Lt.type&&st.s0<=0&&(tt=Lt.range[0]<Lt.range[1]?Lt._length:0);var ct,Tt,Et,At,ht,pt=Math.abs(nt-He)-2*g,gt=Math.abs(ot-tt)-2*g;if("outside"===mt&&(Ye||Be.hasB||(mt="inside")),"auto"===mt&&(Ye?(mt="inside",ct=It(_e,Ge,ht=l.ensureUniformFontSize(le,ze)),Et=(Tt=d.bBox(ct.node())).width,At=Tt.height,Et>0&&At>0&&(Et<=pt&&At<=gt||Et<=gt&&At<=pt||(Rt?pt>=Et*(gt/At):gt>=At*(pt/Et)))?mt="inside":(mt="outside",ct.remove(),ct=null)):mt="inside"),!ct){var Pt=(ct=It(_e,Ge,ht=l.ensureUniformFontSize(le,"outside"===mt?Ke:ze))).attr("transform");if(ct.attr("transform",""),Et=(Tt=d.bBox(ct.node())).width,At=Tt.height,ct.attr("transform",Pt),Et<=0||At<=0)return void ct.remove()}var Ot,Ht=Ut.textangle;Ot="outside"===mt?function(Nt,Gt,un,pn,Kt,wn){var Bn,vn=!!wn.isHorizontal,cn=!!wn.constrained,dn=wn.angle||0,sn=Kt.width,hn=Kt.height,En=Math.abs(Gt-Nt),Mn=Math.abs(pn-un);Bn=vn?Mn>2*g?g:0:En>2*g?g:0;var Rn=1;cn&&(Rn=vn?Math.min(1,Mn/hn):Math.min(1,En/sn));var Nn=S(dn),Fn=_(Kt,Nn),rr=(vn?Fn.x:Fn.y)/2,$n=(Kt.left+Kt.right)/2,mr=(Kt.top+Kt.bottom)/2,fr=(Nt+Gt)/2,Zn=(un+pn)/2,qn=0,ur=0,Zt=vn?m(Gt,Nt):m(un,pn);return vn?(fr=Gt-Zt*Bn,qn=Zt*rr):(Zn=pn+Zt*Bn,ur=-Zt*rr),{textX:$n,textY:mr,targetX:fr,targetY:Zn,anchorX:qn,anchorY:ur,scale:Rn,rotate:Nn}}(He,nt,tt,ot,Tt,{isHorizontal:Rt,constrained:"both"===Ut.constraintext||"outside"===Ut.constraintext,angle:Ht}):E(He,nt,tt,ot,Tt,{isHorizontal:Rt,constrained:"both"===Ut.constraintext||"inside"===Ut.constraintext,angle:Ht,anchor:Ut.insidetextanchor}),Ot.fontSize=ht.size,r("histogram"===Ut.type?"bar":Ut.type,Ot,Ct),Be.transform=Ot;var jt=w(ct,Ct,dt,kt);l.setTransormAndDisplay(jt,Ot)}else _e.select("text").remove()})(L,C,xe,j,he,Ae,Te,Q,se,U,z),C.layerClipId&&d.hideOutsideRangePoint(de,xe.select("text"),H,F,G.xcalendar,G.ycalendar)}),d.setClipUrl(J,!1===G.cliponaxis?null:C.layerClipId,L)});s.getComponentMethod("errorbars","plot")(L,B,C,U)},toMoveInsideBar:E}},81974:function($){"use strict";function R(e,k,A,l,T){var b=k.c2p(l?e.s0:e.p0,!0),d=k.c2p(l?e.s1:e.p1,!0),s=A.c2p(l?e.p0:e.s0,!0),t=A.c2p(l?e.p1:e.s1,!0);return T?[(b+d)/2,(s+t)/2]:l?[d,(s+t)/2]:[(b+d)/2,t]}$.exports=function(e,k){var A,l=e.cd,T=e.xaxis,b=e.yaxis,d=l[0].trace,s="funnel"===d.type,t="h"===d.orientation,o=[];if(!1===k)for(A=0;A<l.length;A++)l[A].selected=0;else for(A=0;A<l.length;A++){var r=l[A],n="ct"in r?r.ct:R(r,T,b,t,s);k.contains(n,!1,A,e)?(o.push({pointNumber:A,x:T.c2d(r.x),y:b.c2d(r.y)}),r.selected=1):r.selected=0}return o}},61546:function($,R,e){"use strict";$.exports=A;var k=e(71828).distinctVals;function A(l,T){this.traces=l,this.sepNegVal=T.sepNegVal,this.overlapNoMerge=T.overlapNoMerge;for(var b=1/0,d=T.posAxis._id.charAt(0),s=[],t=0;t<l.length;t++){for(var o=l[t],r=0;r<o.length;r++){var n=o[r],i=n.p;void 0===i&&(i=n[d]),void 0!==i&&s.push(i)}o[0]&&o[0].width1&&(b=Math.min(o[0].width1,b))}this.positions=s;var a=k(s);this.distinctPositions=a.vals,this.minDiff=1===a.vals.length&&b!==1/0?b:Math.min(a.minDiff,b);var c=(T.posAxis||{}).type;"category"!==c&&"multicategory"!==c||(this.minDiff=1),this.binWidth=this.minDiff,this.bins={}}A.prototype.put=function(l,T){var b=this.getLabel(l,T),d=this.bins[b]||0;return this.bins[b]=d+T,d},A.prototype.get=function(l,T){var b=this.getLabel(l,T);return this.bins[b]||0},A.prototype.getLabel=function(l,T){return(T<0&&this.sepNegVal?"v":"^")+(this.overlapNoMerge?l:Math.round(l/this.binWidth))}},16688:function($,R,e){"use strict";var k=e(39898),A=e(7901),l=e(91424),T=e(71828),b=e(73972),d=e(72597).resizeText,s=e(1486),t=s.textfont,o=s.insidetextfont,r=s.outsidetextfont,n=e(69383);function i(y,h,m){l.pointStyle(y.selectAll("path"),h,m),a(y,h,m)}function a(y,h,m){y.selectAll("text").each(function(w){var u=k.select(this),S=T.ensureUniformFontSize(m,c(u,w,h,m));l.font(u,S)})}function c(y,h,m,w){var u=w._fullLayout.font,S=m.textfont;if(y.classed("bartext-inside")){var _=g(h,m);S=f(m,h.i,u,_)}else y.classed("bartext-outside")&&(S=x(m,h.i,u));return S}function p(y,h,m){return v(t,y.textfont,h,m)}function f(y,h,m,w){var u=p(y,h,m);return(void 0===y._input.textfont||void 0===y._input.textfont.color||Array.isArray(y.textfont.color)&&void 0===y.textfont.color[h])&&(u={color:A.contrast(w),family:u.family,size:u.size}),v(o,y.insidetextfont,h,u)}function x(y,h,m){var w=p(y,h,m);return v(r,y.outsidetextfont,h,w)}function v(y,h,m,w){var u=n.getValue((h=h||{}).family,m),S=n.getValue(h.size,m),_=n.getValue(h.color,m);return{family:n.coerceString(y.family,u,w.family),size:n.coerceNumber(y.size,S,w.size),color:n.coerceColor(y.color,_,w.color)}}function g(y,h){return"waterfall"===h.type?h[y.dir].marker.color:y.mcc||y.mc||h.marker.color}$.exports={style:function(y){var h=k.select(y).selectAll("g.barlayer").selectAll("g.trace");d(y,h,"bar");var m=h.size(),w=y._fullLayout;h.style("opacity",function(u){return u[0].trace.opacity}).each(function(u){("stack"===w.barmode&&m>1||0===w.bargap&&0===w.bargroupgap&&!u[0].trace.marker.line.width)&&k.select(this).attr("shape-rendering","crispEdges")}),h.selectAll("g.points").each(function(u){i(k.select(this),u[0].trace,y)}),b.getComponentMethod("errorbars","style")(h)},styleTextPoints:a,styleOnSelect:function(y,h,m){var u,S,_,E,L,C,w=h[0].trace;w.selectedpoints?(S=w,_=y,l.selectedPointStyle((u=m).selectAll("path"),S),E=u.selectAll("text"),L=S,C=_,E.each(function(P){var I,U=k.select(this);if(P.selected){I=T.ensureUniformFontSize(C,c(U,P,L,C));var z=L.selected.textfont&&L.selected.textfont.color;z&&(I.color=z),l.font(U,I)}else l.selectedTextStyle(U,L)})):(i(m,w,y),b.getComponentMethod("errorbars","style")(m))},getInsideTextFont:f,getOutsideTextFont:x,getBarColor:g,resizeText:d}},98340:function($,R,e){"use strict";var k=e(7901),A=e(52075).hasColorscale,l=e(1586),T=e(71828).coercePattern;$.exports=function(b,d,s,t,o){var r=s("marker.color",t),n=A(b,"marker");n&&l(b,d,o,s,{prefix:"marker.",cLetter:"c"}),s("marker.line.color",k.defaultLine),A(b,"marker.line")&&l(b,d,o,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width"),s("marker.opacity"),T(s,"marker.pattern",r,n),s("selected.marker.color"),s("unselected.marker.color")}},72597:function($,R,e){"use strict";var k=e(39898),A=e(71828);function l(T){return"_"+T+"Text_minsize"}$.exports={recordMinTextSize:function(T,b,d){if(d.uniformtext.mode){var s=l(T),t=d.uniformtext.minsize,o=b.scale*b.fontSize;b.hide=o<t,d[s]=d[s]||1/0,b.hide||(d[s]=Math.min(d[s],Math.max(o,t)))}},clearMinTextSize:function(T,b){b[l(T)]=void 0},resizeText:function(T,b,d){var s=T._fullLayout,t=s["_"+d+"Text_minsize"];if(t){var o,r="hide"===s.uniformtext.mode;switch(d){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}b.selectAll(o).each(function(n){var i=n.transform;if(i){i.scale=r&&i.hide?0:t/i.fontSize;var a=k.select(this).select("text");A.setTransormAndDisplay(a,i)}})}}}},55023:function($,R,e){"use strict";var k=e(5386).f,A=e(1426).extendFlat,l=e(81245),T=e(1486);$.exports={r:l.r,theta:l.theta,r0:l.r0,dr:l.dr,theta0:l.theta0,dtheta:l.dtheta,thetaunit:l.thetaunit,base:A({},T.base,{}),offset:A({},T.offset,{}),width:A({},T.width,{}),text:A({},T.text,{}),hovertext:A({},T.hovertext,{}),marker:T.marker,hoverinfo:l.hoverinfo,hovertemplate:k(),selected:T.selected,unselected:T.unselected}},74692:function($,R,e){"use strict";var k=e(52075).hasColorscale,A=e(78803),l=e(75341),T=e(11661).setGroupPositions,b=e(66279),d=e(73972).traceIs,s=e(71828).extendFlat;$.exports={calc:function(t,o){for(var r=t._fullLayout,n=o.subplot,a=r[n].angularaxis,c=r[n].radialaxis.makeCalcdata(o,"r"),p=a.makeCalcdata(o,"theta"),f=o._length,x=new Array(f),v=c,g=p,y=0;y<f;y++)x[y]={p:g[y],s:v[y]};function h(m){var w=o[m];void 0!==w&&(o["_"+m]=Array.isArray(w)?a.makeCalcdata(o,m):a.d2c(w,o.thetaunit))}return"linear"===a.type&&(h("width"),h("offset")),k(o,"marker")&&A(t,o,{vals:o.marker.color,containerStr:"marker",cLetter:"c"}),k(o,"marker.line")&&A(t,o,{vals:o.marker.line.color,containerStr:"marker.line",cLetter:"c"}),l(x,o),b(x,o),x},crossTraceCalc:function(t,o,r){for(var n=t.calcdata,i=[],a=0;a<n.length;a++){var c=n[a],p=c[0].trace;!0===p.visible&&d(p,"bar")&&p.subplot===r&&i.push(c)}var f=s({},o.radialaxis,{_id:"x"});T(t,o.angularaxis,f,i,{mode:o.barmode,norm:o.barnorm,gap:o.bargap,groupgap:o.bargroupgap})}}},6135:function($,R,e){"use strict";var k=e(71828),A=e(22184).handleRThetaDefaults,l=e(98340),T=e(55023);$.exports=function(b,d,s,t){function o(r,n){return k.coerce(b,d,T,r,n)}A(b,d,t,o)?(o("thetaunit"),o("base"),o("offset"),o("width"),o("text"),o("hovertext"),o("hovertemplate"),l(b,d,o,s,t),k.coerceSelectionMarkerOpacity(d,o)):d.visible=!1}},27379:function($,R,e){"use strict";var k=e(30211),A=e(71828),l=e(95423).getTraceColor,T=A.fillText,b=e(59150).makeHoverPointText,d=e(10869).isPtInsidePolygon;$.exports=function(s,t,o){var r=s.cd,n=r[0].trace,i=s.subplot,a=i.radialAxis,p=i.vangles,f=p?d:A.isPtInsideSector,x=s.maxHoverDistance,v=i.angularAxis._period||2*Math.PI,g=Math.abs(a.g2p(Math.sqrt(t*t+o*o))),y=Math.atan2(o,t);if(a.range[0]>a.range[1]&&(y+=Math.PI),k.getClosest(r,function(w){return f(g,y,[w.rp0,w.rp1],[w.thetag0,w.thetag1],p)?x+Math.min(1,Math.abs(w.thetag1-w.thetag0)/v)-1+(w.rp1-g)/(w.rp1-w.rp0)-1:1/0},s),!1!==s.index){var h=r[s.index];s.x0=s.x1=h.ct[0],s.y0=s.y1=h.ct[1];var m=A.extendFlat({},h,{r:h.s,theta:h.p});return T(h,n,s),b(m,n,i,s),s.hovertemplate=n.hovertemplate,s.color=l(n,h),s.xLabelVal=s.yLabelVal=void 0,h.s<0&&(s.idealAlign="left"),[s]}}},23381:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"barpolar",basePlotModule:e(23580),categories:["polar","bar","showLegend"],attributes:e(55023),layoutAttributes:e(40151),supplyDefaults:e(6135),supplyLayoutDefaults:e(19860),calc:e(74692).calc,crossTraceCalc:e(74692).crossTraceCalc,plot:e(60173),colorbar:e(4898),formatLabels:e(98608),style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,hoverPoints:e(27379),selectPoints:e(81974),meta:{}}},40151:function($){"use strict";$.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},19860:function($,R,e){"use strict";var k=e(71828),A=e(40151);$.exports=function(l,T,b){var d,s={};function t(n,i){return k.coerce(l[d]||{},T[d],A,n,i)}for(var o=0;o<b.length;o++){var r=b[o];"barpolar"===r.type&&!0===r.visible&&(s[d=r.subplot]||(t("barmode"),t("bargap"),s[d]=1))}}},60173:function($,R,e){"use strict";var k=e(39898),A=e(92770),l=e(71828),T=e(91424),b=e(10869);$.exports=function(d,s,t){var p,f,x,o=s.xaxis,r=s.yaxis,n=s.radialAxis,i=s.angularAxis,a=(f=(p=s).cxx,x=p.cyy,p.vangles?function(v,g,y,h){var m,w;l.angleDelta(y,h)>0?(m=y,w=h):(m=h,w=y);var u=[b.findEnclosingVertexAngles(m,p.vangles)[0],(m+w)/2,b.findEnclosingVertexAngles(w,p.vangles)[1]];return b.pathPolygonAnnulus(v,g,m,w,u,f,x)}:function(v,g,y,h){return l.pathAnnulus(v,g,y,h,f,x)}),c=s.layers.frontplot.select("g.barlayer");l.makeTraceGroups(c,t,"trace bars").each(function(){var p=k.select(this),f=l.ensureSingle(p,"g","points").selectAll("g.point").data(l.identity);f.enter().append("g").style("vector-effect","non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),f.exit().remove(),f.each(function(x){var v,g=k.select(this),y=x.rp0=n.c2p(x.s0),h=x.rp1=n.c2p(x.s1),m=x.thetag0=i.c2g(x.p0),w=x.thetag1=i.c2g(x.p1);if(A(y)&&A(h)&&A(m)&&A(w)&&y!==h&&m!==w){var u=n.c2g(x.s1),S=(m+w)/2;x.ct=[o.c2p(u*Math.cos(S)),r.c2p(u*Math.sin(S))],v=a(y,h,m,w)}else v="M0,0Z";l.ensureSingle(g,"path").attr("d",v)}),T.setClipUrl(p,s._hasClipOnAxisFalse?s.clipIds.forTraces:null,d)})}},53522:function($,R,e){"use strict";var k=e(82196),A=e(1486),l=e(22399),T=e(12663).axisHoverFormat,b=e(5386).f,d=e(1426).extendFlat,s=k.marker,t=s.line;$.exports={y:{valType:"data_array",editType:"calc+clearAxisTypes"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},x0:{valType:"any",editType:"calc+clearAxisTypes"},y0:{valType:"any",editType:"calc+clearAxisTypes"},dx:{valType:"number",editType:"calc"},dy:{valType:"number",editType:"calc"},xperiod:k.xperiod,yperiod:k.yperiod,xperiod0:k.xperiod0,yperiod0:k.yperiod0,xperiodalignment:k.xperiodalignment,yperiodalignment:k.yperiodalignment,xhoverformat:T("x"),yhoverformat:T("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:d({},s.symbol,{arrayOk:!1,editType:"plot"}),opacity:d({},s.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:d({},s.angle,{arrayOk:!1,editType:"calc"}),size:d({},s.size,{arrayOk:!1,editType:"calc"}),color:d({},s.color,{arrayOk:!1,editType:"style"}),line:{color:d({},t.color,{arrayOk:!1,dflt:l.defaultLine,editType:"style"}),width:d({},t.width,{arrayOk:!1,dflt:0,editType:"style"}),outliercolor:{valType:"color",editType:"style"},outlierwidth:{valType:"number",min:0,dflt:1,editType:"style"},editType:"style"},editType:"plot"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:k.fillcolor,whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},offsetgroup:A.offsetgroup,alignmentgroup:A.alignmentgroup,selected:{marker:k.selected.marker,editType:"style"},unselected:{marker:k.unselected.marker,editType:"style"},text:d({},k.text,{}),hovertext:d({},k.hovertext,{}),hovertemplate:b({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},48518:function($,R,e){"use strict";var k=e(92770),A=e(89298),l=e(42973),T=e(71828),b=e(50606).BADNUM,d=T._;$.exports=function(f,x){var v,g,y,h,m,w,u,S=f._fullLayout,_=A.getFromId(f,x.xaxis||"x"),E=A.getFromId(f,x.yaxis||"y"),L=[],C="violin"===x.type?"_numViolins":"_numBoxes";"h"===x.orientation?(y=_,h="x",m=E,w="y",u=!!x.yperiodalignment):(y=E,h="y",m=_,w="x",u=!!x.xperiodalignment);var P,I,U,z,H,F,N=function(_e,Fe,Ve,He){var nt,tt=Fe+"0"in _e;if(Fe in _e||tt&&"d"+Fe in _e){var ot=Ve.makeCalcdata(_e,Fe);return[l(_e,Ve,Fe,ot).vals,ot]}nt=tt?_e[Fe+"0"]:"name"in _e&&("category"===Ve.type||k(_e.name)&&-1!==["linear","log"].indexOf(Ve.type)||T.isDateTime(_e.name)&&"date"===Ve.type)?_e.name:He;for(var dt="multicategory"===Ve.type?Ve.r2c_just_indices(nt):Ve.d2c(nt,0,_e[Fe+"calendar"]),kt=_e._length,mt=new Array(kt),wt=0;wt<kt;wt++)mt[wt]=dt;return[mt]}(x,w,m,S[C]),B=N[0],j=N[1],J=T.distinctVals(B,m),G=J.vals,V=J.minDiff/2,W="all"===(x.boxpoints||x.points)?T.identity:function(_e){return _e.v<P.lf||_e.v>P.uf};if(x._hasPreCompStats){var X=x[h],K=function(_e){return y.d2c((x[_e]||[])[v])},re=1/0,ee=-1/0;for(v=0;v<x._length;v++){var ie=B[v];if(k(ie)){if((P={}).pos=P[w]=ie,u&&j&&(P.orig_p=j[v]),P.q1=K("q1"),P.med=K("median"),P.q3=K("q3"),I=[],X&&T.isArrayOrTypedArray(X[v]))for(g=0;g<X[v].length;g++)(F=y.d2c(X[v][g]))!==b&&(t(H={v:F,i:[v,g]},x,[v,g]),I.push(H));if(P.pts=I.sort(o),z=(U=P[h]=I.map(r)).length,P.med!==b&&P.q1!==b&&P.q3!==b&&P.med>=P.q1&&P.q3>=P.med){var oe=K("lowerfence");P.lf=oe!==b&&oe<=P.q1?oe:n(P,U,z);var ce=K("upperfence");P.uf=ce!==b&&ce>=P.q3?ce:i(P,U,z);var me=K("mean");P.mean=me!==b?me:z?T.mean(U,z):(P.q1+P.q3)/2;var de=K("sd");P.sd=me!==b&&de>=0?de:z?T.stdev(U,z,P.mean):P.q3-P.q1,P.lo=a(P),P.uo=c(P);var he=K("notchspan");he=he!==b&&he>0?he:p(P,z),P.ln=P.med-he,P.un=P.med+he;var ve=P.lf,Pe=P.uf;x.boxpoints&&U.length&&(ve=Math.min(ve,U[0]),Pe=Math.max(Pe,U[z-1])),x.notched&&(ve=Math.min(ve,P.ln),Pe=Math.max(Pe,P.un)),P.min=ve,P.max=Pe}else{var xe;T.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+P.q1,"median = "+P.med,"q3 = "+P.q3].join("\n")),P.med=xe=P.med!==b?P.med:P.q1!==b?P.q3!==b?(P.q1+P.q3)/2:P.q1:P.q3!==b?P.q3:0,P.q1=P.q3=xe,P.lf=P.uf=xe,P.mean=P.sd=xe,P.ln=P.un=xe,P.min=P.max=xe}re=Math.min(re,P.min),ee=Math.max(ee,P.max),P.pts2=I.filter(W),L.push(P)}}x._extremes[y._id]=A.findExtremes(y,[re,ee],{padded:!0})}else{var ke=y.makeCalcdata(x,h),Ae=function(_e,Fe){for(var Ve=_e.length,He=new Array(Ve+1),nt=0;nt<Ve;nt++)He[nt]=_e[nt]-Fe;return He[Ve]=_e[Ve-1]+Fe,He}(G,V),Te=G.length,Q=function(_e){for(var Fe=new Array(_e),Ve=0;Ve<_e;Ve++)Fe[Ve]=[];return Fe}(Te);for(v=0;v<x._length;v++)if(k(F=ke[v])){var se=T.findBin(B[v],Ae);se>=0&&se<Te&&(t(H={v:F,i:v},x,v),Q[se].push(H))}var fe=1/0,ye=-1/0,Me=x.quartilemethod,Ie="exclusive"===Me,Ce="inclusive"===Me;for(v=0;v<Te;v++)if(Q[v].length>0){var Re,le;(P={}).pos=P[w]=G[v],I=P.pts=Q[v].sort(o),z=(U=P[h]=I.map(r)).length,P.min=U[0],P.max=U[z-1],P.mean=T.mean(U,z),P.sd=T.stdev(U,z,P.mean),P.med=T.interp(U,.5),z%2&&(Ie||Ce)?(Ie?(Re=U.slice(0,z/2),le=U.slice(z/2+1)):Ce&&(Re=U.slice(0,z/2+1),le=U.slice(z/2)),P.q1=T.interp(Re,.5),P.q3=T.interp(le,.5)):(P.q1=T.interp(U,.25),P.q3=T.interp(U,.75)),P.lf=n(P,U,z),P.uf=i(P,U,z),P.lo=a(P),P.uo=c(P);var ge=p(P,z);P.ln=P.med-ge,P.un=P.med+ge,fe=Math.min(fe,P.ln),ye=Math.max(ye,P.un),P.pts2=I.filter(W),L.push(P)}x._extremes[y._id]=A.findExtremes(y,x.notched?ke.concat([fe,ye]):ke,{padded:!0})}return function(_e,Fe){if(T.isArrayOrTypedArray(Fe.selectedpoints))for(var Ve=0;Ve<_e.length;Ve++){for(var He=_e[Ve].pts||[],nt={},tt=0;tt<He.length;tt++)nt[He[tt].i]=tt;T.tagSelected(He,Fe,nt)}}(L,x),L.length>0?(L[0].t={num:S[C],dPos:V,posLetter:w,valLetter:h,labels:{med:d(f,"median:"),min:d(f,"min:"),q1:d(f,"q1:"),q3:d(f,"q3:"),max:d(f,"max:"),mean:d(f,"sd"===x.boxmean?"mean \xb1 \u03c3:":"mean:"),lf:d(f,"lower fence:"),uf:d(f,"upper fence:")}},S[C]++,L):[{t:{empty:!0}}]};var s={text:"tx",hovertext:"htx"};function t(f,x,v){for(var g in s)T.isArrayOrTypedArray(x[g])&&(Array.isArray(v)?T.isArrayOrTypedArray(x[g][v[0]])&&(f[s[g]]=x[g][v[0]][v[1]]):f[s[g]]=x[g][v])}function o(f,x){return f.v-x.v}function r(f){return f.v}function n(f,x,v){return 0===v?f.q1:Math.min(f.q1,x[Math.min(T.findBin(2.5*f.q1-1.5*f.q3,x,!0)+1,v-1)])}function i(f,x,v){return 0===v?f.q3:Math.max(f.q3,x[Math.max(T.findBin(2.5*f.q3-1.5*f.q1,x),0)])}function a(f){return 4*f.q1-3*f.q3}function c(f){return 4*f.q3-3*f.q1}function p(f,x){return 0===x?0:1.57*(f.q3-f.q1)/Math.sqrt(x)}},37188:function($,R,e){"use strict";var k=e(89298),A=e(71828),l=e(99082).getAxisGroup,T=["v","h"];function b(d,s,t,o){var r,n,i,a=s.calcdata,c=s._fullLayout,p=o._id,f=p.charAt(0),x=[],v=0;for(r=0;r<t.length;r++)for(i=a[t[r]],n=0;n<i.length;n++)x.push(o.c2l(i[n].pos,!0)),v+=(i[n].pts2||[]).length;if(x.length){var g=A.distinctVals(x);"category"!==o.type&&"multicategory"!==o.type||(g.minDiff=1);var y=g.minDiff/2;k.minDtick(o,g.minDiff,g.vals[0],!0);var h=c["violin"===d?"_numViolins":"_numBoxes"],m="group"===c[d+"mode"]&&h>1,w=1-c[d+"gap"],u=1-c[d+"groupgap"];for(r=0;r<t.length;r++){var S,_,E,L,C,P,I=(i=a[t[r]])[0].trace,U=i[0].t,z=I.width,H=I.side;if(z)S=_=L=z/2,E=0;else if(S=y,m){var F=l(c,o._id)+I.orientation,B=Object.keys(((c._alignmentOpts[F]||{})[I.alignmentgroup]||{}).offsetGroups||{}).length,j=B||h;_=S*w*u/j,E=2*S*(((B?I._offsetIndex:U.num)+.5)/j-.5)*w,L=S*w/j}else _=S*w*u,E=0,L=S;U.dPos=S,U.bPos=E,U.bdPos=_,U.wHover=L;var J,G,V,W,X,K,re=E+_,ee=!!z;if("positive"===H?(C=S*(z?1:.5),J=re,P=J=E):"negative"===H?(C=J=E,P=S*(z?1:.5),G=re):(C=P=S,J=G=re),(I.boxpoints||I.points)&&v>0){var ie=I.pointpos,oe=I.jitter,ce=I.marker.size/2,me=0;ie+oe>=0&&((me=re*(ie+oe))>C?(ee=!0,X=ce,V=me):me>J&&(X=ce,V=C)),me<=C&&(V=C);var de=0;ie-oe<=0&&((de=-re*(ie-oe))>P?(ee=!0,K=ce,W=de):de>G&&(K=ce,W=P)),de<=P&&(W=P)}else V=C,W=P;var he=new Array(i.length);for(n=0;n<i.length;n++)he[n]=i[n].pos;I._extremes[p]=k.findExtremes(o,he,{padded:ee,vpadminus:W,vpadplus:V,vpadLinearized:!0,ppadminus:{x:K,y:X}[f],ppadplus:{x:X,y:K}[f]})}}}$.exports={crossTraceCalc:function(d,s){for(var t=d.calcdata,o=s.xaxis,r=s.yaxis,n=0;n<T.length;n++){for(var i=T[n],a="h"===i?r:o,c=[],p=0;p<t.length;p++){var f=t[p],v=f[0].trace;!0!==v.visible||"box"!==v.type&&"candlestick"!==v.type||f[0].t.empty||(v.orientation||"v")!==i||v.xaxis!==o._id||v.yaxis!==r._id||c.push(p)}b("box",d,c,a)}},setPositionOffset:b}},36411:function($,R,e){"use strict";var k=e(71828),A=e(73972),l=e(7901),T=e(73927),b=e(26125),d=e(4322),s=e(53522);function t(r,n,i,a){function c(H){var F=0;return H&&H.length&&(F+=1,k.isArrayOrTypedArray(H[0])&&H[0].length&&(F+=1)),F}function p(H){return k.validate(r[H],s[H])}var f,x=i("y"),v=i("x");if("box"===n.type){var g=i("q1"),y=i("median"),h=i("q3");n._hasPreCompStats=g&&g.length&&y&&y.length&&h&&h.length,f=Math.min(k.minRowLength(g),k.minRowLength(y),k.minRowLength(h))}var m,w,u=c(x),S=c(v),_=u&&k.minRowLength(x),E=S&&k.minRowLength(v),L=a.calendar,C={autotypenumbers:a.autotypenumbers};if(n._hasPreCompStats)switch(String(S)+String(u)){case"00":var P=p("x0")||p("dx");m=!p("y0")&&!p("dy")||P?"v":"h",w=f;break;case"10":m="v",w=Math.min(f,E);break;case"20":m="h",w=Math.min(f,v.length);break;case"01":m="h",w=Math.min(f,_);break;case"02":m="v",w=Math.min(f,x.length);break;case"12":m="v",w=Math.min(f,E,x.length);break;case"21":m="h",w=Math.min(f,v.length,_);break;case"11":w=0;break;case"22":var I,U=!1;for(I=0;I<v.length;I++)if("category"===d(v[I],L,C)){U=!0;break}if(U)m="v",w=Math.min(f,E,x.length);else{for(I=0;I<x.length;I++)if("category"===d(x[I],L,C)){U=!0;break}U?(m="h",w=Math.min(f,v.length,_)):(m="v",w=Math.min(f,E,x.length))}}else u>0?(m="v",w=S>0?Math.min(E,_):Math.min(_)):S>0?(m="h",w=Math.min(E)):w=0;if(w){n._length=w;var z=i("orientation",m);n._hasPreCompStats?"v"===z&&0===S?(i("x0",0),i("dx",1)):"h"===z&&0===u&&(i("y0",0),i("dy",1)):"v"===z&&0===S?i("x0"):"h"===z&&0===u&&i("y0"),A.getComponentMethod("calendars","handleTraceDefaults")(r,n,["x","y"],a)}else n.visible=!1}function o(r,n,i,a){var c=a.prefix,p=k.coerce2(r,n,s,"marker.outliercolor"),f=i("marker.line.outliercolor"),x="outliers";n._hasPreCompStats?x="all":(p||f)&&(x="suspectedoutliers");var v=i(c+"points",x);v?(i("jitter","all"===v?.3:0),i("pointpos","all"===v?-1.5:0),i("marker.symbol"),i("marker.opacity"),i("marker.size"),i("marker.angle"),i("marker.color",n.line.color),i("marker.line.color"),i("marker.line.width"),"suspectedoutliers"===v&&(i("marker.line.outliercolor",n.marker.color),i("marker.line.outlierwidth")),i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size"),i("text"),i("hovertext")):delete n.marker;var g=i("hoveron");"all"!==g&&-1===g.indexOf("points")||i("hovertemplate"),k.coerceSelectionMarkerOpacity(n,i)}$.exports={supplyDefaults:function(r,n,i,a){function c(h,m){return k.coerce(r,n,s,h,m)}if(t(r,n,c,a),!1!==n.visible){T(r,n,a,c),c("xhoverformat"),c("yhoverformat");var p=n._hasPreCompStats;p&&(c("lowerfence"),c("upperfence")),c("line.color",(r.marker||{}).color||i),c("line.width"),c("fillcolor",l.addOpacity(n.line.color,.5));var f=!1;if(p){var x=c("mean"),v=c("sd");x&&x.length&&(f=!0,v&&v.length&&(f="sd"))}c("boxmean",f),c("whiskerwidth"),c("width"),c("quartilemethod");var g=!1;if(p){var y=c("notchspan");y&&y.length&&(g=!0)}else k.validate(r.notchwidth,s.notchwidth)&&(g=!0);c("notched",g)&&c("notchwidth"),o(r,n,c,{prefix:"box"})}},crossTraceDefaults:function(r,n){var a;function c(x){return k.coerce(a._input,a,s,x)}for(var p=0;p<r.length;p++){var f=(a=r[p]).type;"box"!==f&&"violin"!==f||"group"===n[f+"mode"]&&b(a._input,a,n,c)}},handleSampleDefaults:t,handlePointsDefaults:o}},74907:function($){"use strict";$.exports=function(R,e){return e.hoverOnBox&&(R.hoverOnBox=e.hoverOnBox),"xVal"in e&&(R.x=e.xVal),"yVal"in e&&(R.y=e.yVal),e.xa&&(R.xaxis=e.xa),e.ya&&(R.yaxis=e.ya),R}},41868:function($,R,e){"use strict";var k=e(89298),A=e(71828),l=e(30211),T=e(7901),b=A.fillText;function d(t,o,r,n){var i,a,c,p,f,x,v,g,y,h,m,w,u,S,_=t.cd,E=t.xa,L=t.ya,C=_[0].trace,P=_[0].t,I="violin"===C.type,U=P.bdPos,z=P.wHover,H=function(xe){return c.c2l(xe.pos)+P.bPos-c.c2l(x)};I&&"both"!==C.side?("positive"===C.side&&(y=function(xe){var ke=H(xe);return l.inbox(ke,ke+z,h)},w=U,u=0),"negative"===C.side&&(y=function(xe){var ke=H(xe);return l.inbox(ke-z,ke,h)},w=0,u=U)):(y=function(xe){var ke=H(xe);return l.inbox(ke-z,ke+z,h)},w=u=U),S=I?function(xe){return l.inbox(xe.span[0]-f,xe.span[1]-f,h)}:function(xe){return l.inbox(xe.min-f,xe.max-f,h)},"h"===C.orientation?(f=o,x=r,v=S,g=y,i="y",c=L,a="x",p=E):(f=r,x=o,v=y,g=S,i="x",c=E,a="y",p=L);var F=Math.min(1,U/Math.abs(c.r2c(c.range[1])-c.r2c(c.range[0])));function N(xe){return(v(xe)+g(xe))/2}h=t.maxHoverDistance-F,m=t.maxSpikeDistance-F;var B=l.getDistanceFunction(n,v,g,N);if(l.getClosest(_,B,t),!1===t.index)return[];var j=_[t.index],J=C.line.color,G=(C.marker||{}).color;t.color=T.opacity(J)&&C.line.width?J:T.opacity(G)&&C.boxpoints?G:C.fillcolor,t[i+"0"]=c.c2p(j.pos+P.bPos-u,!0),t[i+"1"]=c.c2p(j.pos+P.bPos+w,!0),t[i+"LabelVal"]=void 0!==j.orig_p?j.orig_p:j.pos;var V=i+"Spike";t.spikeDistance=N(j)*m/h,t[V]=c.c2p(j.pos,!0);var W=C.boxmean||(C.meanline||{}).visible,X=C.boxpoints||C.points,K=X&&W?["max","uf","q3","med","mean","q1","lf","min"]:X&&!W?["max","uf","q3","med","q1","lf","min"]:!X&&W?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"];C.orientation===(p.range[1]<p.range[0]?"v":"h")&&K.reverse();for(var ee=t.spikeDistance,ie=t[V],oe=[],ce=0;ce<K.length;ce++){var me=K[ce];if(me in j){var de=j[me],he=p.c2p(de,!0),ve=A.extendFlat({},t);ve.attr=me,ve[a+"0"]=ve[a+"1"]=he,ve[a+"LabelVal"]=de,ve[a+"Label"]=(P.labels?P.labels[me]+" ":"")+k.hoverLabelText(p,de,C[a+"hoverformat"]),ve.hoverOnBox=!0,"mean"===me&&"sd"in j&&"sd"===C.boxmean&&(ve[a+"err"]=j.sd),ve.hovertemplate=!1,oe.push(ve)}}t.name="",t.spikeDistance=void 0,t[V]=void 0;for(var Pe=0;Pe<oe.length;Pe++)"med"!==oe[Pe].attr?(oe[Pe].name="",oe[Pe].spikeDistance=void 0,oe[Pe][V]=void 0):(oe[Pe].spikeDistance=ee,oe[Pe][V]=ie);return oe}function s(t,o,r){for(var n,i,a,c=t.cd,p=t.xa,f=t.ya,x=c[0].trace,v=p.c2p(o),g=f.c2p(r),y=l.quadrature(function(I){var U=Math.max(3,I.mrc||0);return Math.max(Math.abs(p.c2p(I.x)-v)-U,1-3/U)},function(I){var U=Math.max(3,I.mrc||0);return Math.max(Math.abs(f.c2p(I.y)-g)-U,1-3/U)}),h=!1,m=0;m<c.length;m++){i=c[m];for(var w=0;w<(i.pts||[]).length;w++){var u=y(a=i.pts[w]);u<=t.distance&&(t.distance=u,h=[m,w])}}if(!h)return!1;a=(i=c[h[0]]).pts[h[1]];var S=p.c2p(a.x,!0),_=f.c2p(a.y,!0),E=a.mrc||1;n=A.extendFlat({},t,{index:a.i,color:(x.marker||{}).color,name:x.name,x0:S-E,x1:S+E,y0:_-E,y1:_+E,spikeDistance:t.distance,hovertemplate:x.hovertemplate});var L,C=i.orig_p,P=void 0!==C?C:i.pos;return"h"===x.orientation?(L=f,n.xLabelVal=a.x,n.yLabelVal=P):(L=p,n.xLabelVal=P,n.yLabelVal=a.y),n[L._id.charAt(0)+"Spike"]=L.c2p(i.pos,!0),b(a,x,n),n}$.exports={hoverPoints:function(t,o,r,n){var i,a=t.cd[0].trace.hoveron,c=[];return-1!==a.indexOf("boxes")&&(c=c.concat(d(t,o,r,n))),-1!==a.indexOf("points")&&(i=s(t,o,r)),"closest"===n?i?[i]:c:(i&&c.push(i),c)},hoverOnBoxes:d,hoverOnPoints:s}},83832:function($,R,e){"use strict";$.exports={attributes:e(53522),layoutAttributes:e(40094),supplyDefaults:e(36411).supplyDefaults,crossTraceDefaults:e(36411).crossTraceDefaults,supplyLayoutDefaults:e(4199).supplyLayoutDefaults,calc:e(48518),crossTraceCalc:e(37188).crossTraceCalc,plot:e(86047).plot,style:e(58063).style,styleOnSelect:e(58063).styleOnSelect,hoverPoints:e(41868).hoverPoints,eventData:e(74907),selectPoints:e(24626),moduleType:"trace",name:"box",basePlotModule:e(93612),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}},40094:function($){"use strict";$.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}},4199:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(40094);function T(b,d,s,t,o){for(var r=o+"Layout",n=!1,i=0;i<s.length;i++)if(k.traceIs(s[i],r)){n=!0;break}n&&(t(o+"mode"),t(o+"gap"),t(o+"groupgap"))}$.exports={supplyLayoutDefaults:function(b,d,s){T(0,0,s,function(t,o){return A.coerce(b,d,l,t,o)},"box")},_supply:T}},86047:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(91424);function T(s,t,o,r){var n,i,a="h"===o.orientation,c=t.val,p=t.pos,f=!!p.rangebreaks,x=r.bPos,v=r.wdPos||0,g=r.bPosPxOffset||0,y=o.whiskerwidth||0,h=o.notched||!1,m=h?1-2*o.notchwidth:1;Array.isArray(r.bdPos)?(n=r.bdPos[0],i=r.bdPos[1]):(n=r.bdPos,i=r.bdPos);var w=s.selectAll("path.box").data("violin"!==o.type||o.box.visible?A.identity:[]);w.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","box"),w.exit().remove(),w.each(function(u){if(u.empty)return"M0,0Z";var S=p.c2l(u.pos+x,!0),_=p.l2p(S-n)+g,E=p.l2p(S+i)+g,L=f?(_+E)/2:p.l2p(S)+g,C=o.whiskerwidth,P=f?_*C+(1-C)*L:p.l2p(S-v)+g,I=f?E*C+(1-C)*L:p.l2p(S+v)+g,U=p.l2p(S-n*m)+g,z=p.l2p(S+i*m)+g,H=c.c2p(u.q1,!0),F=c.c2p(u.q3,!0),N=A.constrain(c.c2p(u.med,!0),Math.min(H,F)+1,Math.max(H,F)-1),B=void 0===u.lf||!1===o.boxpoints,j=c.c2p(B?u.min:u.lf,!0),J=c.c2p(B?u.max:u.uf,!0),G=c.c2p(u.ln,!0),V=c.c2p(u.un,!0);a?k.select(this).attr("d","M"+N+","+U+"V"+z+"M"+H+","+_+"V"+E+(h?"H"+G+"L"+N+","+z+"L"+V+","+E:"")+"H"+F+"V"+_+(h?"H"+V+"L"+N+","+U+"L"+G+","+_:"")+"ZM"+H+","+L+"H"+j+"M"+F+","+L+"H"+J+(0===y?"":"M"+j+","+P+"V"+I+"M"+J+","+P+"V"+I)):k.select(this).attr("d","M"+U+","+N+"H"+z+"M"+_+","+H+"H"+E+(h?"V"+G+"L"+z+","+N+"L"+E+","+V:"")+"V"+F+"H"+_+(h?"V"+V+"L"+U+","+N+"L"+_+","+G:"")+"ZM"+L+","+H+"V"+j+"M"+L+","+F+"V"+J+(0===y?"":"M"+P+","+j+"H"+I+"M"+P+","+J+"H"+I))})}function b(s,t,o,r){var n=t.x,i=t.y,a=r.bdPos,c=r.bPos,p=o.boxpoints||o.points;A.seedPseudoRandom();var f=s.selectAll("g.points").data(p?function(v){return v.forEach(function(g){g.t=r,g.trace=o}),v}:[]);f.enter().append("g").attr("class","points"),f.exit().remove();var x=f.selectAll("path").data(function(v){var g,y,h=v.pts2,m=Math.max((v.max-v.min)/10,v.q3-v.q1),w=1e-9*m,u=.01*m,S=[],_=0;if(o.jitter){if(0===m)for(_=1,S=new Array(h.length),g=0;g<h.length;g++)S[g]=1;else for(g=0;g<h.length;g++){var E=Math.max(0,g-5),L=h[E].v,C=Math.min(h.length-1,g+5),P=h[C].v;"all"!==p&&(h[g].v<v.lf?P=Math.min(P,v.lf):L=Math.max(L,v.uf));var I=Math.sqrt(u*(C-E)/(P-L+w))||0;I=A.constrain(Math.abs(I),0,1),S.push(I),_=Math.max(I,_)}y=2*o.jitter/(_||1)}for(g=0;g<h.length;g++){var U=h[g],z=U.v,H=o.jitter?y*S[g]*(A.pseudoRandom()-.5):0,F=v.pos+c+a*(o.pointpos+H);"h"===o.orientation?(U.y=F,U.x=z):(U.x=F,U.y=z),"suspectedoutliers"===p&&z<v.uo&&z>v.lo&&(U.so=!0)}return h});x.enter().append("path").classed("point",!0),x.exit().remove(),x.call(l.translatePoints,n,i)}function d(s,t,o,r){var n,i,a=t.val,c=t.pos,p=!!c.rangebreaks,f=r.bPos,x=r.bPosPxOffset||0,v=o.boxmean||(o.meanline||{}).visible;Array.isArray(r.bdPos)?(n=r.bdPos[0],i=r.bdPos[1]):(n=r.bdPos,i=r.bdPos);var g=s.selectAll("path.mean").data("box"===o.type&&o.boxmean||"violin"===o.type&&o.box.visible&&o.meanline.visible?A.identity:[]);g.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),g.exit().remove(),g.each(function(y){var h=c.c2l(y.pos+f,!0),m=c.l2p(h-n)+x,w=c.l2p(h+i)+x,u=p?(m+w)/2:c.l2p(h)+x,S=a.c2p(y.mean,!0),_=a.c2p(y.mean-y.sd,!0),E=a.c2p(y.mean+y.sd,!0);"h"===o.orientation?k.select(this).attr("d","M"+S+","+m+"V"+w+("sd"===v?"m0,0L"+_+","+u+"L"+S+","+m+"L"+E+","+u+"Z":"")):k.select(this).attr("d","M"+m+","+S+"H"+w+("sd"===v?"m0,0L"+u+","+_+"L"+m+","+S+"L"+u+","+E+"Z":""))})}$.exports={plot:function(s,t,o,r){var n=t.xaxis,i=t.yaxis;A.makeTraceGroups(r,o,"trace boxes").each(function(a){var c,p,f=k.select(this),x=a[0],v=x.t,g=x.trace;v.wdPos=v.bdPos*g.whiskerwidth,!0!==g.visible||v.empty?f.remove():("h"===g.orientation?(c=i,p=n):(c=n,p=i),T(f,{pos:c,val:p},g,v),b(f,{x:n,y:i},g,v),d(f,{pos:c,val:p},g,v))})},plotBoxAndWhiskers:T,plotPoints:b,plotBoxMean:d}},24626:function($){"use strict";$.exports=function(R,e){var k,A,l=R.cd,T=R.xaxis,b=R.yaxis,d=[];if(!1===e)for(k=0;k<l.length;k++)for(A=0;A<(l[k].pts||[]).length;A++)l[k].pts[A].selected=0;else for(k=0;k<l.length;k++)for(A=0;A<(l[k].pts||[]).length;A++){var s=l[k].pts[A],t=T.c2p(s.x),o=b.c2p(s.y);e.contains([t,o],null,s.i,R)?(d.push({pointNumber:s.i,x:T.c2d(s.x),y:b.c2d(s.y)}),s.selected=1):s.selected=0}return d}},58063:function($,R,e){"use strict";var k=e(39898),A=e(7901),l=e(91424);$.exports={style:function(T,b,d){var s=d||k.select(T).selectAll("g.trace.boxes");s.style("opacity",function(t){return t[0].trace.opacity}),s.each(function(t){var o=k.select(this),r=t[0].trace,n=r.line.width;function i(p,f,x,v){p.style("stroke-width",f+"px").call(A.stroke,x).call(A.fill,v)}var a=o.selectAll("path.box");if("candlestick"===r.type)a.each(function(p){if(!p.empty){var f=k.select(this),x=r[p.dir];i(f,x.line.width,x.line.color,x.fillcolor),f.style("opacity",r.selectedpoints&&!p.selected?.3:1)}});else{i(a,n,r.line.color,r.fillcolor),o.selectAll("path.mean").style({"stroke-width":n,"stroke-dasharray":2*n+"px,"+n+"px"}).call(A.stroke,r.line.color);var c=o.selectAll("path.point");l.pointStyle(c,r,T)}})},styleOnSelect:function(T,b,d){var s=b[0].trace,t=d.selectAll("path.point");s.selectedpoints?l.selectedPointStyle(t,s):l.pointStyle(t,s,T)}}},75343:function($,R,e){"use strict";var k=e(71828).extendFlat,A=e(12663).axisHoverFormat,l=e(2522),T=e(53522);function b(d){return{line:{color:k({},T.line.color,{dflt:d}),width:T.line.width,editType:"style"},fillcolor:T.fillcolor,editType:"style"}}$.exports={xperiod:l.xperiod,xperiod0:l.xperiod0,xperiodalignment:l.xperiodalignment,xhoverformat:A("x"),yhoverformat:A("y"),x:l.x,open:l.open,high:l.high,low:l.low,close:l.close,line:{width:k({},T.line.width,{}),editType:"style"},increasing:b(l.increasing.line.color.dflt),decreasing:b(l.decreasing.line.color.dflt),text:l.text,hovertext:l.hovertext,whiskerwidth:k({},T.whiskerwidth,{dflt:0}),hoverlabel:l.hoverlabel}},41197:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(42973),T=e(3485).calcCommon;function b(d,s,t,o){return{min:t,q1:Math.min(d,o),med:o,q3:Math.max(d,o),max:s}}$.exports=function(d,s){var t=d._fullLayout,o=A.getFromId(d,s.xaxis),r=A.getFromId(d,s.yaxis),n=o.makeCalcdata(s,"x"),i=l(s,o,"x",n).vals,a=T(d,s,n,i,r,b);return a.length?(k.extendFlat(a[0].t,{num:t._numBoxes,dPos:k.distinctVals(i).minDiff/2,posLetter:"x",valLetter:"y"}),t._numBoxes++,a):[{t:{empty:!0}}]}},1026:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(14555),T=e(73927),b=e(75343);function d(s,t,o,r){var n=o(r+".line.color");o(r+".line.width",t.line.width),o(r+".fillcolor",A.addOpacity(n,.5))}$.exports=function(s,t,o,r){function n(i,a){return k.coerce(s,t,b,i,a)}l(s,t,n,r)?(T(s,t,r,n,{x:!0}),n("xhoverformat"),n("yhoverformat"),n("line.width"),d(0,t,n,"increasing"),d(0,t,n,"decreasing"),n("text"),n("hovertext"),n("whiskerwidth"),r._requestRangeslider[t.xaxis]=!0):t.visible=!1}},91815:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"candlestick",basePlotModule:e(93612),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:e(75343),layoutAttributes:e(40094),supplyLayoutDefaults:e(4199).supplyLayoutDefaults,crossTraceCalc:e(37188).crossTraceCalc,supplyDefaults:e(1026),calc:e(41197),plot:e(86047).plot,layerName:"boxlayer",style:e(58063).style,hoverPoints:e(66449).hoverPoints,selectPoints:e(67324)}},13145:function($,R,e){"use strict";var k=e(11500),A=e(44467);$.exports=function(l,T,b,d,s){var t,o,r,n;d("a")||(d("da"),d("a0")),d("b")||(d("db"),d("b0")),t=l,o=T,r=b,n=s,["aaxis","baxis"].forEach(function(i){var a=i.charAt(0),c=t[i]||{},p=A.newContainer(o,i);k(c,p,{noTicklabelstep:!0,tickfont:"x",id:a+"axis",letter:a,font:o.font,name:i,data:t[a],calendar:o.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r}),p._categories=p._categories||[],t[i]||"-"===c.type||(t[i]={type:c.type})})}},402:function($,R,e){"use strict";var k=e(71828).isArrayOrTypedArray;function A(l,T){if(!k(l)||T>=10)return null;for(var b=1/0,d=-1/0,s=l.length,t=0;t<s;t++){var o=l[t];if(k(o)){var r=A(o,T+1);r&&(b=Math.min(r[0],b),d=Math.max(r[1],d))}else b=Math.min(o,b),d=Math.max(o,d)}return[b,d]}$.exports=function(l){return A(l,0)}},99798:function($,R,e){"use strict";var k=e(41940),A=e(1928),l=e(22399),T=k({editType:"calc"});T.family.dflt='"Open Sans", verdana, arial, sans-serif',T.size.dflt=12,T.color.dflt=l.defaultLine,$.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:A,baxis:A,font:T,color:{valType:"color",dflt:l.defaultLine,editType:"plot"},transforms:void 0}},4536:function($,R,e){"use strict";var k=e(71828).isArrayOrTypedArray;$.exports=function(A,l,T,b){var d,s,t,o,r,n,i,a,c,p,f,x,v,g=k(T)?"a":"b",y=("a"===g?A.aaxis:A.baxis).smoothing,h="a"===g?A.a2i:A.b2j,m="a"===g?T:b,w="a"===g?b:T,u="a"===g?l.a.length:l.b.length,S="a"===g?l.b.length:l.a.length,_=Math.floor("a"===g?A.b2j(w):A.a2i(w)),E="a"===g?function(J){return A.evalxy([],J,_)}:function(J){return A.evalxy([],_,J)};y&&(t=Math.max(0,Math.min(S-2,_)),o=_-t,s="a"===g?function(J,G){return A.dxydi([],J,t,G,o)}:function(J,G){return A.dxydj([],t,J,o,G)});var L=h(m[0]),C=h(m[1]),P=L<C?1:-1,I=1e-8*(C-L),U=P>0?Math.floor:Math.ceil,z=P>0?Math.ceil:Math.floor,H=P>0?Math.min:Math.max,F=P>0?Math.max:Math.min,N=U(L+I),B=z(C-I),j=[[i=E(L)]];for(d=N;d*P<B*P;d+=P)r=[],f=F(L,d),v=(x=H(C,d+P))-f,n=Math.max(0,Math.min(u-2,Math.floor(.5*(f+x)))),a=E(x),y&&(c=s(n,f-n),p=s(n,x-n),r.push([i[0]+c[0]/3*v,i[1]+c[1]/3*v]),r.push([a[0]-p[0]/3*v,a[1]-p[1]/3*v])),r.push(a),j.push(r),i=a;return j}},1928:function($,R,e){"use strict";var k=e(41940),A=e(22399),l=e(13838),T=e(12663).descriptionWithDates,b=e(30962).overrideAll,d=e(79952).P,s=e(1426).extendFlat;$.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:k({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:l.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},tickfont:k({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:T("tick label")},tickformatstops:b(l.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:A.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:s({},d,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:s({},d,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:A.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},_deprecated:{title:{valType:"string",editType:"calc"},titlefont:k({editType:"calc"}),titleoffset:{valType:"number",dflt:10,editType:"calc"}},editType:"calc"}},11500:function($,R,e){"use strict";var k=e(99798),A=e(7901).addOpacity,l=e(73972),T=e(71828),b=e(26218),d=e(96115),s=e(89426),t=e(15258),o=e(21994),r=e(4322);$.exports=function(n,i,a){var c=a.letter,p=a.font||{},f=k[c+"axis"];function x(P,I){return T.coerce(n,i,f,P,I)}function v(P,I){return T.coerce2(n,i,f,P,I)}a.name&&(i._name=a.name,i._id=a.name),x("autotypenumbers",a.autotypenumbersDflt);var g=x("type");"-"===g&&(a.data&&function(P,I){if("-"===P.type){var U=P._id.charAt(0);P.type=r(I,P[U+"calendar"],{autotypenumbers:P.autotypenumbers})}}(i,a.data),"-"===i.type?i.type="linear":g=n.type=i.type),x("smoothing"),x("cheatertype"),x("showticklabels"),x("labelprefix",c+" = "),x("labelsuffix"),x("showtickprefix"),x("showticksuffix"),x("separatethousands"),x("tickformat"),x("exponentformat"),x("minexponent"),x("showexponent"),x("categoryorder"),x("tickmode"),x("tickvals"),x("ticktext"),x("tick0"),x("dtick"),"array"===i.tickmode&&(x("arraytick0"),x("arraydtick")),x("labelpadding"),i._hovertitle=c,"date"===g&&l.getComponentMethod("calendars","handleDefaults")(n,i,"calendar",a.calendar),o(i,a.fullLayout),i.c2p=T.identity;var y=x("color",a.dfltColor),h=y===n.color?y:p.color;x("title.text")&&(T.coerceFont(x,"title.font",{family:p.family,size:T.bigFont(p.size),color:h}),x("title.offset")),x("tickangle"),x("autorange",!i.isValidRange(n.range))&&x("rangemode"),x("range"),i.cleanRange(),x("fixedrange"),b(n,i,x,g),s(n,i,x,g,a),d(n,i,x,g,a),t(n,i,x,{data:a.data,dataAttr:c});var m=v("gridcolor",A(y,.3)),w=v("gridwidth"),u=v("griddash"),S=x("showgrid");S||(delete i.gridcolor,delete i.gridwidth,delete i.griddash);var _=v("startlinecolor",y),E=v("startlinewidth",w);x("startline",i.showgrid||!!_||!!E)||(delete i.startlinecolor,delete i.startlinewidth);var L=v("endlinecolor",y),C=v("endlinewidth",w);return x("endline",i.showgrid||!!L||!!C)||(delete i.endlinecolor,delete i.endlinewidth),S?(x("minorgridcount"),x("minorgridwidth",w),x("minorgriddash",u),x("minorgridcolor",A(m,.06)),i.minorgridcount||(delete i.minorgridwidth,delete i.minorgriddash,delete i.minorgridcolor)):(delete i.gridcolor,delete i.gridwidth,delete i.griddash),"none"===i.showticklabels&&(delete i.tickfont,delete i.tickangle,delete i.showexponent,delete i.exponentformat,delete i.minexponent,delete i.tickformat,delete i.showticksuffix,delete i.showtickprefix),i.showticksuffix||delete i.ticksuffix,i.showtickprefix||delete i.tickprefix,x("tickmode"),i}},25281:function($,R,e){"use strict";var k=e(89298),A=e(71828).isArray1D,l=e(53824),T=e(402),b=e(20347),d=e(83311),s=e(44807),t=e(4742),o=e(72505),r=e(68296),n=e(11435);$.exports=function(i,a){var c=k.getFromId(i,a.xaxis),p=k.getFromId(i,a.yaxis),f=a.aaxis,x=a.baxis,v=a.x,g=a.y,y=[];v&&A(v)&&y.push("x"),g&&A(g)&&y.push("y"),y.length&&r(a,f,x,"a","b",y);var h=a._a=a._a||a.a,m=a._b=a._b||a.b;v=a._x||a.x,g=a._y||a.y;var w={};a._cheater&&(v=l("index"===f.cheatertype?h.length:h,"index"===x.cheatertype?m.length:m,a.cheaterslope)),a._x=v=t(v),a._y=g=t(g),o(v,h,m),o(g,h,m),n(a),a.setScale();var _=T(v),E=T(g),L=.5*(_[1]-_[0]),C=.5*(_[1]+_[0]),P=.5*(E[1]-E[0]),I=.5*(E[1]+E[0]),U=1.3;return E=[I-P*U,I+P*U],a._extremes[c._id]=k.findExtremes(c,_=[C-L*U,C+L*U],{padded:!0}),a._extremes[p._id]=k.findExtremes(p,E,{padded:!0}),b(a,"a","b"),b(a,"b","a"),d(a,f),d(a,x),w.clipsegments=s(a._xctrl,a._yctrl,f,x),w.x=v,w.y=g,w.a=h,w.b=m,[w]}},44807:function($){"use strict";$.exports=function(R,e,k,A){var l,T,b,d=[],s=!!k.smoothing,t=!!A.smoothing,o=R[0].length-1,r=R.length-1;for(l=0,T=[],b=[];l<=o;l++)T[l]=R[0][l],b[l]=e[0][l];for(d.push({x:T,y:b,bicubic:s}),l=0,T=[],b=[];l<=r;l++)T[l]=R[l][o],b[l]=e[l][o];for(d.push({x:T,y:b,bicubic:t}),l=o,T=[],b=[];l>=0;l--)T[o-l]=R[r][l],b[o-l]=e[r][l];for(d.push({x:T,y:b,bicubic:s}),l=r,T=[],b=[];l>=0;l--)T[r-l]=R[l][0],b[r-l]=e[l][0];return d.push({x:T,y:b,bicubic:t}),d}},20347:function($,R,e){"use strict";var k=e(89298),A=e(1426).extendFlat;$.exports=function(l,T,b){var d,s,t,o,r,n,i,a,c,p,f,x,v,g,y=l["_"+T],h=l[T+"axis"],m=h._gridlines=[],w=h._minorgridlines=[],u=h._boundarylines=[],S=l["_"+b],_=l[b+"axis"];"array"===h.tickmode&&(h.tickvals=y.slice());var E=l._xctrl,L=l._yctrl,C=E[0].length,P=E.length,I=l._a.length,U=l._b.length;k.prepTicks(h),"array"===h.tickmode&&delete h.tickvals;var z=h.smoothing?3:1;function H(N){var B,j,J,G,V,W,X,K,re,ee,ie,oe,ce=[],me=[],de={};if("b"===T)for(j=l.b2j(N),J=Math.floor(Math.max(0,Math.min(U-2,j))),G=j-J,de.length=U,de.crossLength=I,de.xy=function(he){return l.evalxy([],he,j)},de.dxy=function(he,ve){return l.dxydi([],he,J,ve,G)},B=0;B<I;B++)W=Math.min(I-2,B),X=B-W,K=l.evalxy([],B,j),_.smoothing&&B>0&&(re=l.dxydi([],B-1,J,0,G),ce.push(V[0]+re[0]/3),me.push(V[1]+re[1]/3),ee=l.dxydi([],B-1,J,1,G),ce.push(K[0]-ee[0]/3),me.push(K[1]-ee[1]/3)),ce.push(K[0]),me.push(K[1]),V=K;else for(B=l.a2i(N),W=Math.floor(Math.max(0,Math.min(I-2,B))),X=B-W,de.length=I,de.crossLength=U,de.xy=function(he){return l.evalxy([],B,he)},de.dxy=function(he,ve){return l.dxydj([],W,he,X,ve)},j=0;j<U;j++)J=Math.min(U-2,j),G=j-J,K=l.evalxy([],B,j),_.smoothing&&j>0&&(ie=l.dxydj([],W,j-1,X,0),ce.push(V[0]+ie[0]/3),me.push(V[1]+ie[1]/3),oe=l.dxydj([],W,j-1,X,1),ce.push(K[0]-oe[0]/3),me.push(K[1]-oe[1]/3)),ce.push(K[0]),me.push(K[1]),V=K;return de.axisLetter=T,de.axis=h,de.crossAxis=_,de.value=N,de.constvar=b,de.index=a,de.x=ce,de.y=me,de.smoothing=_.smoothing,de}function F(N){var B,j,J,G,V,W=[],X=[],K={};if(K.length=y.length,K.crossLength=S.length,"b"===T)for(J=Math.max(0,Math.min(U-2,N)),V=Math.min(1,Math.max(0,N-J)),K.xy=function(re){return l.evalxy([],re,N)},K.dxy=function(re,ee){return l.dxydi([],re,J,ee,V)},B=0;B<C;B++)W[B]=E[N*z][B],X[B]=L[N*z][B];else for(j=Math.max(0,Math.min(I-2,N)),G=Math.min(1,Math.max(0,N-j)),K.xy=function(re){return l.evalxy([],N,re)},K.dxy=function(re,ee){return l.dxydj([],j,re,G,ee)},B=0;B<P;B++)W[B]=E[B][N*z],X[B]=L[B][N*z];return K.axisLetter=T,K.axis=h,K.crossAxis=_,K.value=y[N],K.constvar=b,K.index=N,K.x=W,K.y=X,K.smoothing=_.smoothing,K}if("array"===h.tickmode){for(o=5e-15,n=(r=[Math.floor((y.length-1-h.arraytick0)/h.arraydtick*(1+o)),Math.ceil(-h.arraytick0/h.arraydtick/(1+o))].sort(function(N,B){return N-B}))[0]-1,i=r[1]+1,a=n;a<i;a++)(s=h.arraytick0+h.arraydtick*a)<0||s>y.length-1||m.push(A(F(s),{color:h.gridcolor,width:h.gridwidth,dash:h.griddash}));for(a=n;a<i;a++)if(t=h.arraytick0+h.arraydtick*a,f=Math.min(t+h.arraydtick,y.length-1),!(t<0||t>y.length-1||f<0||f>y.length-1))for(x=y[t],v=y[f],d=0;d<h.minorgridcount;d++)(g=f-t)<=0||(p=x+(v-x)*(d+1)/(h.minorgridcount+1)*(h.arraydtick/g))<y[0]||p>y[y.length-1]||w.push(A(H(p),{color:h.minorgridcolor,width:h.minorgridwidth,dash:h.minorgriddash}));h.startline&&u.push(A(F(0),{color:h.startlinecolor,width:h.startlinewidth})),h.endline&&u.push(A(F(y.length-1),{color:h.endlinecolor,width:h.endlinewidth}))}else{for(o=5e-15,n=(r=[Math.floor((y[y.length-1]-h.tick0)/h.dtick*(1+o)),Math.ceil((y[0]-h.tick0)/h.dtick/(1+o))].sort(function(N,B){return N-B}))[0],i=r[1],a=n;a<=i;a++)m.push(A(H(c=h.tick0+h.dtick*a),{color:h.gridcolor,width:h.gridwidth,dash:h.griddash}));for(a=n-1;a<i+1;a++)for(c=h.tick0+h.dtick*a,d=0;d<h.minorgridcount;d++)(p=c+h.dtick*(d+1)/(h.minorgridcount+1))<y[0]||p>y[y.length-1]||w.push(A(H(p),{color:h.minorgridcolor,width:h.minorgridwidth,dash:h.minorgriddash}));h.startline&&u.push(A(H(y[0]),{color:h.startlinecolor,width:h.startlinewidth})),h.endline&&u.push(A(H(y[y.length-1]),{color:h.endlinecolor,width:h.endlinewidth}))}}},83311:function($,R,e){"use strict";var k=e(89298),A=e(1426).extendFlat;$.exports=function(l,T){var b,d,s,t=T._labels=[],o=T._gridlines;for(b=0;b<o.length;b++)s=o[b],-1!==["start","both"].indexOf(T.showticklabels)&&(d=k.tickText(T,s.value),A(d,{prefix:void 0,suffix:void 0,endAnchor:!0,xy:s.xy(0),dxy:s.dxy(0,0),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:0===b,isLast:b===o.length-1}),t.push(d)),-1!==["end","both"].indexOf(T.showticklabels)&&(d=k.tickText(T,s.value),A(d,{endAnchor:!1,xy:s.xy(s.crossLength-1),dxy:s.dxy(s.crossLength-2,1),axis:s.axis,length:s.crossAxis.length,font:s.axis.tickfont,isFirst:0===b,isLast:b===o.length-1}),t.push(d))}},42048:function($){"use strict";$.exports=function(R,e,k,A){var l=R[0]-e[0],T=R[1]-e[1],b=k[0]-e[0],d=k[1]-e[1],s=Math.pow(l*l+T*T,.25),t=Math.pow(b*b+d*d,.25),o=(t*t*l-s*s*b)*A,r=(t*t*T-s*s*d)*A,n=t*(s+t)*3,i=s*(s+t)*3;return[[e[0]+(n&&o/n),e[1]+(n&&r/n)],[e[0]-(i&&o/i),e[1]-(i&&r/i)]]}},53824:function($,R,e){"use strict";var k=e(71828).isArrayOrTypedArray;$.exports=function(A,l,T){var b,d,s,t,o,r,n=[],i=k(A)?A.length:A,a=k(l)?l.length:l,c=k(A)?A:null,p=k(l)?l:null;c&&(s=(c.length-1)/(c[c.length-1]-c[0])/(i-1)),p&&(t=(p.length-1)/(p[p.length-1]-p[0])/(a-1));var f=1/0,x=-1/0;for(d=0;d<a;d++)for(n[d]=[],o=p?(p[d]-p[0])*t:d/(a-1),b=0;b<i;b++)r=(c?(c[b]-c[0])*s:b/(i-1))-o*T,f=Math.min(r,f),x=Math.max(r,x),n[d][b]=r;var v=1/(x-f),g=-f*v;for(d=0;d<a;d++)for(b=0;b<i;b++)n[d][b]=v*n[d][b]+g;return n}},45664:function($,R,e){"use strict";var k=e(42048),A=e(71828).ensureArray;function l(T,b,d){return[(2*(-.5*d[0]+1.5*b[0])+T[0])/3,(2*(-.5*d[1]+1.5*b[1])+T[1])/3]}$.exports=function(T,b,d,s,t,o){var r,n,i,a,c,p,f,x,v,g,y=d[0].length,h=d.length,m=t?3*y-2:y,w=o?3*h-2:h;for(T=A(T,w),b=A(b,w),i=0;i<w;i++)T[i]=A(T[i],m),b[i]=A(b[i],m);for(n=0,a=0;n<h;n++,a+=o?3:1)for(c=T[a],p=b[a],f=d[n],x=s[n],r=0,i=0;r<y;r++,i+=t?3:1)c[i]=f[r],p[i]=x[r];if(t)for(n=0,a=0;n<h;n++,a+=o?3:1){for(r=1,i=3;r<y-1;r++,i+=3)v=k([d[n][r-1],s[n][r-1]],[d[n][r],s[n][r]],[d[n][r+1],s[n][r+1]],t),T[a][i-1]=v[0][0],b[a][i-1]=v[0][1],T[a][i+1]=v[1][0],b[a][i+1]=v[1][1];g=l([T[a][0],b[a][0]],[T[a][2],b[a][2]],[T[a][3],b[a][3]]),T[a][1]=g[0],b[a][1]=g[1],g=l([T[a][m-1],b[a][m-1]],[T[a][m-3],b[a][m-3]],[T[a][m-4],b[a][m-4]]),T[a][m-2]=g[0],b[a][m-2]=g[1]}if(o)for(i=0;i<m;i++){for(a=3;a<w-3;a+=3)v=k([T[a-3][i],b[a-3][i]],[T[a][i],b[a][i]],[T[a+3][i],b[a+3][i]],o),T[a-1][i]=v[0][0],b[a-1][i]=v[0][1],T[a+1][i]=v[1][0],b[a+1][i]=v[1][1];g=l([T[0][i],b[0][i]],[T[2][i],b[2][i]],[T[3][i],b[3][i]]),T[1][i]=g[0],b[1][i]=g[1],g=l([T[w-1][i],b[w-1][i]],[T[w-3][i],b[w-3][i]],[T[w-4][i],b[w-4][i]]),T[w-2][i]=g[0],b[w-2][i]=g[1]}if(t&&o)for(a=1;a<w;a+=(a+1)%3==0?2:1){for(i=3;i<m-3;i+=3)v=k([T[a][i-3],b[a][i-3]],[T[a][i],b[a][i]],[T[a][i+3],b[a][i+3]],t),T[a][i-1]=.5*(T[a][i-1]+v[0][0]),b[a][i-1]=.5*(b[a][i-1]+v[0][1]),T[a][i+1]=.5*(T[a][i+1]+v[1][0]),b[a][i+1]=.5*(b[a][i+1]+v[1][1]);g=l([T[a][0],b[a][0]],[T[a][2],b[a][2]],[T[a][3],b[a][3]]),T[a][1]=.5*(T[a][1]+g[0]),b[a][1]=.5*(b[a][1]+g[1]),g=l([T[a][m-1],b[a][m-1]],[T[a][m-3],b[a][m-3]],[T[a][m-4],b[a][m-4]]),T[a][m-2]=.5*(T[a][m-2]+g[0]),b[a][m-2]=.5*(b[a][m-2]+g[1])}return[T,b]}},35509:function($){"use strict";$.exports={RELATIVE_CULL_TOLERANCE:1e-6}},54495:function($){"use strict";$.exports=function(R,e,k){return e&&k?function(A,l,T,b,d){var s,n,i;A||(A=[]),l*=3,T*=3;var a=b*b,c=1-b,p=c*c,f=c*b*2,x=-3*p,v=3*(p-f),g=3*(f-a),y=3*a,h=d*d,m=h*d,w=1-d,u=w*w,S=u*w;for(i=0;i<R.length;i++)s=x*(n=R[i])[T][l]+v*n[T][l+1]+g*n[T][l+2]+y*n[T][l+3],A[i]=S*s+3*(u*d*(x*n[T+1][l]+v*n[T+1][l+1]+g*n[T+1][l+2]+y*n[T+1][l+3])+w*h*(x*n[T+2][l]+v*n[T+2][l+1]+g*n[T+2][l+2]+y*n[T+2][l+3]))+m*(x*n[T+3][l]+v*n[T+3][l+1]+g*n[T+3][l+2]+y*n[T+3][l+3]);return A}:e?function(A,l,T,b,d){var s,o,r;A||(A=[]),l*=3;var n=b*b,i=1-b,a=i*i,c=i*b*2,p=-3*a,f=3*(a-c),x=3*(c-n),v=3*n,g=1-d;for(o=0;o<R.length;o++)s=p*(r=R[o])[T][l]+f*r[T][l+1]+x*r[T][l+2]+v*r[T][l+3],A[o]=g*s+d*(p*r[T+1][l]+f*r[T+1][l+1]+x*r[T+1][l+2]+v*r[T+1][l+3]);return A}:k?function(A,l,T,b,d){var s,n,i;A||(A=[]),T*=3;var a=d*d,c=a*d,p=1-d,f=p*p,x=f*p;for(n=0;n<R.length;n++)s=(i=R[n])[T][l+1]-i[T][l],A[n]=x*s+3*(f*d*(i[T+1][l+1]-i[T+1][l])+p*a*(i[T+2][l+1]-i[T+2][l]))+c*(i[T+3][l+1]-i[T+3][l]);return A}:function(A,l,T,b,d){var s,o,r;A||(A=[]);var n=1-d;for(o=0;o<R.length;o++)s=(r=R[o])[T][l+1]-r[T][l],A[o]=n*s+d*(r[T+1][l+1]-r[T+1][l]);return A}}},73057:function($){"use strict";$.exports=function(R,e,k){return e&&k?function(A,l,T,b,d){var s,n,i;A||(A=[]),l*=3,T*=3;var a=b*b,c=a*b,p=1-b,f=p*p,x=f*p,v=d*d,g=1-d,y=g*g,h=g*d*2,m=-3*y,w=3*(y-h),u=3*(h-v),S=3*v;for(i=0;i<R.length;i++)s=m*(n=R[i])[T][l]+w*n[T+1][l]+u*n[T+2][l]+S*n[T+3][l],A[i]=x*s+3*(f*b*(m*n[T][l+1]+w*n[T+1][l+1]+u*n[T+2][l+1]+S*n[T+3][l+1])+p*a*(m*n[T][l+2]+w*n[T+1][l+2]+u*n[T+2][l+2]+S*n[T+3][l+2]))+c*(m*n[T][l+3]+w*n[T+1][l+3]+u*n[T+2][l+3]+S*n[T+3][l+3]);return A}:e?function(A,l,T,b,d){var s,n,i;A||(A=[]),l*=3;var a=d*d,c=a*d,p=1-d,f=p*p,x=f*p;for(n=0;n<R.length;n++)s=(i=R[n])[T+1][l]-i[T][l],A[n]=x*s+3*(f*d*(i[T+1][l+1]-i[T][l+1])+p*a*(i[T+1][l+2]-i[T][l+2]))+c*(i[T+1][l+3]-i[T][l+3]);return A}:k?function(A,l,T,b,d){var s,o,r;A||(A=[]),T*=3;var n=1-b,i=d*d,a=1-d,c=a*a,p=a*d*2,f=-3*c,x=3*(c-p),v=3*(p-i),g=3*i;for(o=0;o<R.length;o++)s=f*(r=R[o])[T][l]+x*r[T+1][l]+v*r[T+2][l]+g*r[T+3][l],A[o]=n*s+b*(f*r[T][l+1]+x*r[T+1][l+1]+v*r[T+2][l+1]+g*r[T+3][l+1]);return A}:function(A,l,T,b,d){var s,o,r;A||(A=[]);var n=1-b;for(o=0;o<R.length;o++)s=(r=R[o])[T+1][l]-r[T][l],A[o]=n*s+b*(r[T+1][l+1]-r[T][l+1]);return A}}},20349:function($){"use strict";$.exports=function(R,e,k,A,l){var T=e-2,b=k-2;return A&&l?function(d,s,t){var o,a,c;d||(d=[]);var p=Math.max(0,Math.min(Math.floor(s),T)),f=Math.max(0,Math.min(Math.floor(t),b)),x=Math.max(0,Math.min(1,s-p)),v=Math.max(0,Math.min(1,t-f));p*=3,f*=3;var g=x*x,y=g*x,h=1-x,m=h*h,w=m*h,u=v*v,S=u*v,_=1-v,E=_*_,L=E*_;for(c=0;c<R.length;c++)o=w*(a=R[c])[f][p]+3*(m*x*a[f][p+1]+h*g*a[f][p+2])+y*a[f][p+3],d[c]=L*o+3*(E*v*(w*a[f+1][p]+3*(m*x*a[f+1][p+1]+h*g*a[f+1][p+2])+y*a[f+1][p+3])+_*u*(w*a[f+2][p]+3*(m*x*a[f+2][p+1]+h*g*a[f+2][p+2])+y*a[f+2][p+3]))+S*(w*a[f+3][p]+3*(m*x*a[f+3][p+1]+h*g*a[f+3][p+2])+y*a[f+3][p+3]);return d}:A?function(d,s,t){d||(d=[]);var o,a,c,p=Math.max(0,Math.min(Math.floor(s),T)),f=Math.max(0,Math.min(Math.floor(t),b)),x=Math.max(0,Math.min(1,s-p)),v=Math.max(0,Math.min(1,t-f));p*=3;var g=x*x,y=g*x,h=1-x,m=h*h,w=m*h,u=1-v;for(a=0;a<R.length;a++)o=u*(c=R[a])[f][p]+v*c[f+1][p],d[a]=w*o+3*(m*x*(u*c[f][p+1]+v*c[f+1][p+1])+h*g*(u*c[f][p+2]+v*c[f+1][p+1]))+y*(u*c[f][p+3]+v*c[f+1][p+1]);return d}:l?function(d,s,t){d||(d=[]);var o,a,c,p=Math.max(0,Math.min(Math.floor(s),T)),f=Math.max(0,Math.min(Math.floor(t),b)),x=Math.max(0,Math.min(1,s-p)),v=Math.max(0,Math.min(1,t-f));f*=3;var g=v*v,y=g*v,h=1-v,m=h*h,w=m*h,u=1-x;for(a=0;a<R.length;a++)o=u*(c=R[a])[f][p]+x*c[f][p+1],d[a]=w*o+3*(m*v*(u*c[f+1][p]+x*c[f+1][p+1])+h*g*(u*c[f+2][p]+x*c[f+2][p+1]))+y*(u*c[f+3][p]+x*c[f+3][p+1]);return d}:function(d,s,t){d||(d=[]);var o,n,i,a=Math.max(0,Math.min(Math.floor(s),T)),c=Math.max(0,Math.min(Math.floor(t),b)),p=Math.max(0,Math.min(1,s-a)),f=Math.max(0,Math.min(1,t-c)),x=1-f,v=1-p;for(n=0;n<R.length;n++)o=v*(i=R[n])[c][a]+p*i[c][a+1],d[n]=x*o+f*(v*i[c+1][a]+p*i[c+1][a+1]);return d}}},92087:function($,R,e){"use strict";var k=e(71828),A=e(19237),l=e(13145),T=e(99798),b=e(22399);$.exports=function(d,s,t,o){function r(i,a){return k.coerce(d,s,T,i,a)}s._clipPathId="clip"+s.uid+"carpet";var n=r("color",b.defaultLine);k.coerceFont(r,"font"),r("carpet"),l(d,s,o,r,n),s.a&&s.b?(s.a.length<3&&(s.aaxis.smoothing=0),s.b.length<3&&(s.baxis.smoothing=0),A(d,s,r)||(s.visible=!1),s._cheater&&r("cheaterslope")):s.visible=!1}},21462:function($,R,e){"use strict";$.exports={attributes:e(99798),supplyDefaults:e(92087),plot:e(89740),calc:e(25281),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:e(93612),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}},22882:function($){"use strict";$.exports=function(R,e){for(var k,A=R._fullData.length,l=0;l<A;l++){var T=R._fullData[l];if(T.index!==e.index&&"carpet"===T.type&&(k||(k=T),T.carpet===e.carpet))return T}return k}},67961:function($){"use strict";$.exports=function(R,e,k){if(0===R.length)return"";var A,l=[],T=k?3:1;for(A=0;A<R.length;A+=T)l.push(R[A]+","+e[A]),k&&A<R.length-T&&(l.push("C"),l.push([R[A+1]+","+e[A+1],R[A+2]+","+e[A+2]+" "].join(" ")));return l.join(k?"":"L")}},27669:function($,R,e){"use strict";var k=e(71828).isArrayOrTypedArray;$.exports=function(A,l,T){var b;for(k(A)?A.length>l.length&&(A=A.slice(0,l.length)):A=[],b=0;b<l.length;b++)A[b]=T(l[b]);return A}},11651:function($){"use strict";$.exports=function(R,e,k,A,l,T){var b=l[0]*R.dpdx(e),d=l[1]*R.dpdy(k),s=1,t=1;if(T){var o=Math.sqrt(l[0]*l[0]+l[1]*l[1]),r=Math.sqrt(T[0]*T[0]+T[1]*T[1]);t=Math.max(0,(l[0]*T[0]+l[1]*T[1])/o/r)}var i=180*Math.atan2(d,b)/Math.PI;return i<-90?(i+=180,s=-s):i>90&&(i-=180,s=-s),{angle:i,flip:s,p:R.c2p(A,e,k),offsetMultplier:t}}},89740:function($,R,e){"use strict";var k=e(39898),A=e(91424),l=e(27669),T=e(67961),b=e(11651),d=e(63893),s=e(71828),t=s.strRotate,o=s.strTranslate,r=e(18783);function n(f,x,v,g,y,h){var m="const-"+y+"-lines",w=v.selectAll("."+m).data(h);w.enter().append("path").classed(m,!0).style("vector-effect","non-scaling-stroke"),w.each(function(u){var S=u,E=S.y,L=l([],S.x,f.c2p),C=l([],E,x.c2p),P="M"+T(L,C,S.smoothing);k.select(this).attr("d",P).style("stroke-width",S.width).style("stroke",S.color).style("stroke-dasharray",A.dashStyle(S.dash,S.width)).style("fill","none")}),w.exit().remove()}function i(f,x,v,g,y,h,m,w){var u=h.selectAll("text."+w).data(m);u.enter().append("text").classed(w,!0);var S=0,_={};return u.each(function(E,L){var C;if("auto"===E.axis.tickangle)C=b(g,x,v,E.xy,E.dxy);else{var P=(E.axis.tickangle+180)*Math.PI/180;C=b(g,x,v,E.xy,[Math.cos(P),Math.sin(P)])}L||(_={angle:C.angle,flip:C.flip});var I=(E.endAnchor?-1:1)*C.flip,U=k.select(this).attr({"text-anchor":I>0?"start":"end","data-notex":1}).call(A.font,E.font).text(E.text).call(d.convertToTspans,f),z=A.bBox(this);U.attr("transform",o(C.p[0],C.p[1])+t(C.angle)+o(E.axis.labelpadding*I,.3*z.height)),S=Math.max(S,z.width+E.axis.labelpadding)}),u.exit().remove(),_.maxExtent=S,_}$.exports=function(f,x,v,g){var y=x.xaxis,h=x.yaxis,m=f._fullLayout._clips;s.makeTraceGroups(g,v,"trace").each(function(w){var u=k.select(this),S=w[0],_=S.trace,E=_.aaxis,L=_.baxis,C=s.ensureSingle(u,"g","minorlayer"),P=s.ensureSingle(u,"g","majorlayer"),I=s.ensureSingle(u,"g","boundarylayer"),U=s.ensureSingle(u,"g","labellayer");u.style("opacity",_.opacity),n(y,h,P,0,"a",E._gridlines),n(y,h,P,0,"b",L._gridlines),n(y,h,C,0,"a",E._minorgridlines),n(y,h,C,0,"b",L._minorgridlines),n(y,h,I,0,"a-boundary",E._boundarylines),n(y,h,I,0,"b-boundary",L._boundarylines);var F,N,B,J,G,V,W,X,K,re,ee,ie,oe,ce,me,z=i(f,y,h,_,0,U,E._labels,"a-label"),H=i(f,y,h,_,0,U,L._labels,"b-label");F=f,N=U,B=_,J=y,G=h,V=z,W=H,ie=s.aggNums(Math.min,null,B.a),oe=s.aggNums(Math.max,null,B.a),ce=s.aggNums(Math.min,null,B.b),me=s.aggNums(Math.max,null,B.b),re=B.ab2xy(X=.5*(ie+oe),K=ce,!0),ee=B.dxyda_rough(X,K),void 0===V.angle&&s.extendFlat(V,b(B,J,G,re,B.dxydb_rough(X,K))),p(F,N,B,0,re,ee,B.aaxis,J,G,V,"a-title"),re=B.ab2xy(X=ie,K=.5*(ce+me),!0),ee=B.dxydb_rough(X,K),void 0===W.angle&&s.extendFlat(W,b(B,J,G,re,B.dxyda_rough(X,K))),p(F,N,B,0,re,ee,B.baxis,J,G,W,"b-title"),function(F,N,B,j,J){var G,V,W,X,K=B.select("#"+F._clipPathId);K.size()||(K=B.append("clipPath").classed("carpetclip",!0));var re=s.ensureSingle(K,"path","carpetboundary"),ee=N.clipsegments,ie=[];for(X=0;X<ee.length;X++)V=l([],(G=ee[X]).x,j.c2p),W=l([],G.y,J.c2p),ie.push(T(V,W,G.bicubic));var oe="M"+ie.join("L")+"Z";K.attr("id",F._clipPathId),re.attr("d",oe)}(_,S,m,y,h)})};var a=r.LINE_SPACING,c=(1-r.MID_SHIFT)/a+1;function p(f,x,v,g,y,h,m,w,u,S,_){var E=[];m.title.text&&E.push(m.title.text);var L=x.selectAll("text."+_).data(E),C=S.maxExtent;L.enter().append("text").classed(_,!0),L.each(function(){var P=b(v,w,u,y,h);-1===["start","both"].indexOf(m.showticklabels)&&(C=0);var I=m.title.font.size;C+=I+m.title.offset;var U=(S.angle+(S.flip<0?180:0)-P.angle+450)%360,z=U>90&&U<270,H=k.select(this);H.text(m.title.text).call(d.convertToTspans,f),z&&(C=(-d.lineCount(H)+c)*a*I-C),H.attr("transform",o(P.p[0],P.p[1])+t(P.angle)+o(0,C)).attr("text-anchor","middle").call(A.font,m.title.font)}),L.exit().remove()}},11435:function($,R,e){"use strict";var k=e(35509),A=e(65888).findBin,l=e(45664),T=e(20349),b=e(54495),d=e(73057);$.exports=function(s){var t=s._a,o=s._b,r=t.length,n=o.length,i=s.aaxis,a=s.baxis,c=t[0],p=t[r-1],f=o[0],x=o[n-1],v=t[t.length-1]-t[0],g=o[o.length-1]-o[0],y=v*k.RELATIVE_CULL_TOLERANCE,h=g*k.RELATIVE_CULL_TOLERANCE;c-=y,p+=y,f-=h,x+=h,s.isVisible=function(m,w){return m>c&&m<p&&w>f&&w<x},s.isOccluded=function(m,w){return m<c||m>p||w<f||w>x},s.setScale=function(){var u=l(s._xctrl,s._yctrl,s._x,s._y,i.smoothing,a.smoothing);s._xctrl=u[0],s._yctrl=u[1],s.evalxy=T([s._xctrl,s._yctrl],r,n,i.smoothing,a.smoothing),s.dxydi=b([s._xctrl,s._yctrl],i.smoothing,a.smoothing),s.dxydj=d([s._xctrl,s._yctrl],i.smoothing,a.smoothing)},s.i2a=function(m){var w=Math.max(0,Math.floor(m[0]),r-2),u=m[0]-w;return(1-u)*t[w]+u*t[w+1]},s.j2b=function(m){var w=Math.max(0,Math.floor(m[1]),r-2),u=m[1]-w;return(1-u)*o[w]+u*o[w+1]},s.ij2ab=function(m){return[s.i2a(m[0]),s.j2b(m[1])]},s.a2i=function(m){var w=Math.max(0,Math.min(A(m,t),r-2)),u=t[w];return Math.max(0,Math.min(r-1,w+(m-u)/(t[w+1]-u)))},s.b2j=function(m){var w=Math.max(0,Math.min(A(m,o),n-2)),u=o[w];return Math.max(0,Math.min(n-1,w+(m-u)/(o[w+1]-u)))},s.ab2ij=function(m){return[s.a2i(m[0]),s.b2j(m[1])]},s.i2c=function(m,w){return s.evalxy([],m,w)},s.ab2xy=function(m,w,u){if(!u&&(m<t[0]||m>t[r-1]|w<o[0]||w>o[n-1]))return[!1,!1];var S=s.a2i(m),_=s.b2j(w),E=s.evalxy([],S,_);if(u){var L,C,P,I,U=0,z=0,H=[];m<t[0]?(L=0,C=0,U=(m-t[0])/(t[1]-t[0])):m>t[r-1]?(L=r-2,C=1,U=(m-t[r-1])/(t[r-1]-t[r-2])):C=S-(L=Math.max(0,Math.min(r-2,Math.floor(S)))),w<o[0]?(P=0,I=0,z=(w-o[0])/(o[1]-o[0])):w>o[n-1]?(P=n-2,I=1,z=(w-o[n-1])/(o[n-1]-o[n-2])):I=_-(P=Math.max(0,Math.min(n-2,Math.floor(_)))),U&&(s.dxydi(H,L,P,C,I),E[0]+=H[0]*U,E[1]+=H[1]*U),z&&(s.dxydj(H,L,P,C,I),E[0]+=H[0]*z,E[1]+=H[1]*z)}return E},s.c2p=function(m,w,u){return[w.c2p(m[0]),u.c2p(m[1])]},s.p2x=function(m,w,u){return[w.p2c(m[0]),u.p2c(m[1])]},s.dadi=function(m){var w=Math.max(0,Math.min(t.length-2,m));return t[w+1]-t[w]},s.dbdj=function(m){var w=Math.max(0,Math.min(o.length-2,m));return o[w+1]-o[w]},s.dxyda=function(m,w,u,S){var _=s.dxydi(null,m,w,u,S),E=s.dadi(m,u);return[_[0]/E,_[1]/E]},s.dxydb=function(m,w,u,S){var _=s.dxydj(null,m,w,u,S),E=s.dbdj(w,S);return[_[0]/E,_[1]/E]},s.dxyda_rough=function(m,w,u){var S=v*(u||.1),_=s.ab2xy(m+S,w,!0),E=s.ab2xy(m-S,w,!0);return[.5*(_[0]-E[0])/S,.5*(_[1]-E[1])/S]},s.dxydb_rough=function(m,w,u){var S=g*(u||.1),_=s.ab2xy(m,w+S,!0),E=s.ab2xy(m,w-S,!0);return[.5*(_[0]-E[0])/S,.5*(_[1]-E[1])/S]},s.dpdx=function(m){return m._m},s.dpdy=function(m){return m._m}}},72505:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l,T){var b,d,s,a,c,p,f,x,v,g,y,h,m,N,B,j,J,G,t=[],o=[],r=A[0].length,n=A.length,u=0;for(b=0;b<r;b++)for(d=0;d<n;d++)void 0===A[d][b]&&(t.push(b),o.push(d),A[d][b]=(B=d,j=void 0,J=void 0,G=void 0,J=0,G=0,(N=b)>0&&void 0!==(j=A[B][N-1])&&(G++,J+=j),N<r-1&&void 0!==(j=A[B][N+1])&&(G++,J+=j),B>0&&void 0!==(j=A[B-1][N])&&(G++,J+=j),B<n-1&&void 0!==(j=A[B+1][N])&&(G++,J+=j),J/Math.max(1,G))),u=Math.max(u,Math.abs(A[d][b]));if(!t.length)return A;var S=0,_=0,E=t.length;do{for(S=0,s=0;s<E;s++){d=o[s];var C,P,I,U,z,H=0,F=0;0===(b=t[s])?(P=l[U=Math.min(r-1,2)],F+=(C=A[d][1])+(C-A[d][U])*(l[0]-(I=l[1]))/(I-P),H++):b===r-1&&(P=l[U=Math.max(0,r-3)],F+=(C=A[d][r-2])+(C-A[d][U])*(l[r-1]-(I=l[r-2]))/(I-P),H++),(0===b||b===r-1)&&d>0&&d<n-1&&(F+=((c=T[d]-T[d-1])*A[d+1][b]+(a=T[d+1]-T[d])*A[d-1][b])/(c+a),H++),0===d?(P=T[z=Math.min(n-1,2)],F+=(C=A[1][b])+(C-A[z][b])*(T[0]-(I=T[1]))/(I-P),H++):d===n-1&&(P=T[z=Math.max(0,n-3)],F+=(C=A[n-2][b])+(C-A[z][b])*(T[n-1]-(I=T[n-2]))/(I-P),H++),(0===d||d===n-1)&&b>0&&b<r-1&&(F+=((c=l[b]-l[b-1])*A[d][b+1]+(a=l[b+1]-l[b])*A[d][b-1])/(c+a),H++),H?F/=H:(y=(x=T[d+1]-T[d])*(v=T[d]-T[d-1])*(x+v),F=((g=(p=l[b+1]-l[b])*(f=l[b]-l[b-1])*(p+f))*(v*A[d+1][b]+x*A[d-1][b])+y*(f*A[d][b+1]+p*A[d][b-1]))/(y*(f+p)+g*(v+x))),S+=(m=(h=F-A[d][b])/u)*m,A[d][b]+=h*(1+(H?0:.85))}S=Math.sqrt(S)}while(_++<100&&S>1e-5);return k.log("Smoother converged to",S,"after",_,"iterations"),A}},19237:function($,R,e){"use strict";var k=e(71828).isArray1D;$.exports=function(A,l,T){var b=T("x"),d=b&&b.length,s=T("y"),t=s&&s.length;if(!d&&!t)return!1;if(l._cheater=!b,d&&!k(b)||t&&!k(s))l._length=null;else{var o=d?b.length:1/0;t&&(o=Math.min(o,s.length)),l.a&&l.a.length&&(o=Math.min(o,l.a.length)),l.b&&l.b.length&&(o=Math.min(o,l.b.length)),l._length=o}return!0}},69568:function($,R,e){"use strict";var k=e(5386).f,A=e(19316),l=e(50693),T=e(9012),b=e(22399).defaultLine,d=e(1426).extendFlat,s=A.marker.line;$.exports=d({locations:{valType:"data_array",editType:"calc"},locationmode:A.locationmode,z:{valType:"data_array",editType:"calc"},geojson:d({},A.geojson,{}),featureidkey:A.featureidkey,text:d({},A.text,{}),hovertext:d({},A.hovertext,{}),marker:{line:{color:d({},s.color,{dflt:b}),width:d({},s.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:A.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:A.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:d({},T.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:k(),showlegend:d({},T.showlegend,{dflt:!1})},l("",{cLetter:"z",editTypeOverride:"calc"}))},38675:function($,R,e){"use strict";var k=e(92770),A=e(50606).BADNUM,l=e(78803),T=e(75225),b=e(66279);function d(s){return s&&"string"==typeof s}$.exports=function(s,t){var o,r=t._length,n=new Array(r);o=t.geojson?function(f){return d(f)||k(f)}:d;for(var i=0;i<r;i++){var a=n[i]={},c=t.locations[i],p=t.z[i];o(c)&&k(p)?(a.loc=c,a.z=p):(a.loc=null,a.z=A),a.index=i}return T(n,t),l(s,t,{vals:t.z,containerStr:"",cLetter:"z"}),b(n,t),n}},61869:function($,R,e){"use strict";var k=e(71828),A=e(1586),l=e(69568);$.exports=function(T,b,d,s){function t(a,c){return k.coerce(T,b,l,a,c)}var o=t("locations"),r=t("z");if(o&&o.length&&k.isArrayOrTypedArray(r)&&r.length){b._length=Math.min(o.length,r.length);var n,i=t("geojson");("string"==typeof i&&""!==i||k.isPlainObject(i))&&(n="geojson-id"),"geojson-id"===t("locationmode",n)&&t("featureidkey"),t("text"),t("hovertext"),t("hovertemplate"),t("marker.line.width")&&t("marker.line.color"),t("marker.opacity"),A(T,b,s,t,{prefix:"",cLetter:"z"}),k.coerceSelectionMarkerOpacity(b,t)}else b.visible=!1}},92069:function($){"use strict";$.exports=function(R,e,k,A,l){R.location=e.location,R.z=e.z;var T=A[l];return T.fIn&&T.fIn.properties&&(R.properties=T.fIn.properties),R.ct=T.ct,R}},42300:function($,R,e){"use strict";var k=e(89298),A=e(69568),l=e(71828).fillText;$.exports=function(T,b,d){var s,t,o,r,n=T.cd,i=n[0].trace,a=T.subplot,c=[b,d],p=[b+360,d];for(t=0;t<n.length;t++)if(r=!1,(s=n[t])._polygons){for(o=0;o<s._polygons.length;o++)s._polygons[o].contains(c)&&(r=!r),s._polygons[o].contains(p)&&(r=!r);if(r)break}if(r&&s)return T.x0=T.x1=T.xa.c2p(s.ct),T.y0=T.y1=T.ya.c2p(s.ct),T.index=s.index,T.location=s.loc,T.z=s.z,T.zLabel=k.tickText(a.mockAxis,a.mockAxis.c2l(s.z),"hover").text,T.hovertemplate=s.hovertemplate,function(f,x,v){if(!x.hovertemplate){var g=v.hi||x.hoverinfo,y=String(v.loc),h="all"===g?A.hoverinfo.flags:g.split("+"),m=-1!==h.indexOf("name"),w=-1!==h.indexOf("location"),u=-1!==h.indexOf("z"),S=-1!==h.indexOf("text"),_=[];!m&&w?f.nameOverride=y:(m&&(f.nameOverride=x.name),w&&_.push(y)),u&&_.push(f.zLabel),S&&l(v,x,_),f.extraText=_.join("<br>")}}(T,i,s),[T]}},51319:function($,R,e){"use strict";$.exports={attributes:e(69568),supplyDefaults:e(61869),colorbar:e(61243),calc:e(38675),calcGeoJSON:e(99841).calcGeoJSON,plot:e(99841).plot,style:e(99636).style,styleOnSelect:e(99636).styleOnSelect,hoverPoints:e(42300),eventData:e(92069),selectPoints:e(81253),moduleType:"trace",name:"choropleth",basePlotModule:e(44622),categories:["geo","noOpacity","showLegend"],meta:{}}},99841:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(41327),T=e(90973).getTopojsonFeatures,b=e(71739).findExtremes,d=e(99636).style;$.exports={calcGeoJSON:function(s,t){for(var o=s[0].trace,r=t[o.geo],n=r._subplot,i=o.locationmode,a=o._length,c="geojson-id"===i?l.extractTraceFeature(s):T(o,n.topojson),p=[],f=[],x=0;x<a;x++){var v=s[x],g="geojson-id"===i?v.fOut:l.locationToFeature(i,v.loc,c);if(g){v.geojson=g,v.ct=g.properties.ct,v._polygons=l.feature2polygons(g);var y=l.computeBbox(g);p.push(y[0],y[2]),f.push(y[1],y[3])}else v.geojson=null}if("geojson"===r.fitbounds&&"geojson-id"===i){var h=l.computeBbox(l.getTraceGeojson(o));p=[h[0],h[2]],f=[h[1],h[3]]}var m={padded:!0};o._extremes.lon=b(r.lonaxis._ax,p,m),o._extremes.lat=b(r.lataxis._ax,f,m)},plot:function(s,t,o){var r=t.layers.backplot.select(".choroplethlayer");A.makeTraceGroups(r,o,"trace choropleth").each(function(n){var i=k.select(this).selectAll("path.choroplethlocation").data(A.identity);i.enter().append("path").classed("choroplethlocation",!0),i.exit().remove(),d(s,n)})}}},81253:function($){"use strict";$.exports=function(R,e){var k,A,l,T,b,d=R.cd,s=R.xaxis,t=R.yaxis,o=[];if(!1===e)for(k=0;k<d.length;k++)d[k].selected=0;else for(k=0;k<d.length;k++)(l=(A=d[k]).ct)&&(T=s.c2p(l),b=t.c2p(l),e.contains([T,b],null,k,R)?(o.push({pointNumber:k,lon:l[0],lat:l[1]}),A.selected=1):A.selected=0);return o}},99636:function($,R,e){"use strict";var k=e(39898),A=e(7901),l=e(91424),T=e(21081);function b(d,s){var t=s[0].trace,o=s[0].node3.selectAll(".choroplethlocation"),r=t.marker||{},n=r.line||{},i=T.makeColorScaleFuncFromTrace(t);o.each(function(a){k.select(this).attr("fill",i(a.z)).call(A.stroke,a.mlc||n.color).call(l.dashLine,"",a.mlw||n.width||0).style("opacity",r.opacity)}),l.selectedPointStyle(o,t)}$.exports={style:function(d,s){s&&b(0,s)},styleOnSelect:function(d,s){var o=s[0].trace;o.selectedpoints?l.selectedPointStyle(s[0].node3.selectAll(".choroplethlocation"),o):b(0,s)}}},64496:function($,R,e){"use strict";var k=e(69568),A=e(50693),l=e(5386).f,T=e(9012),b=e(1426).extendFlat;$.exports=b({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:b({},k.featureidkey,{}),below:{valType:"string",editType:"plot"},text:k.text,hovertext:k.hovertext,marker:{line:{color:b({},k.marker.line.color,{editType:"plot"}),width:b({},k.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:b({},k.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:b({},k.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:b({},k.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:k.hoverinfo,hovertemplate:l({},{keys:["properties"]}),showlegend:b({},T.showlegend,{dflt:!1})},A("",{cLetter:"z",editTypeOverride:"calc"}))},82004:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(21081),T=e(91424),b=e(18214).makeBlank,d=e(41327);function s(t){var o,r=t[0].trace,n=r._opts;if(r.selectedpoints){for(var i=T.makeSelectedPointStyleFns(r),a=0;a<t.length;a++){var c=t[a];c.fOut&&(c.fOut.properties.mo2=i.selectedOpacityFn(c))}o={type:"identity",property:"mo2"}}else o=A.isArrayOrTypedArray(r.marker.opacity)?{type:"identity",property:"mo"}:r.marker.opacity;return A.extendFlat(n.fill.paint,{"fill-opacity":o}),A.extendFlat(n.line.paint,{"line-opacity":o}),n}$.exports={convert:function(t){var o=t[0].trace,r=!0===o.visible&&0!==o._length,n={layout:{visibility:"none"},paint:{}},i={layout:{visibility:"none"},paint:{}},a=o._opts={fill:n,line:i,geojson:b()};if(!r)return a;var c=d.extractTraceFeature(t);if(!c)return a;var p,f,x,v=l.makeColorScaleFuncFromTrace(o),g=o.marker,y=g.line||{};A.isArrayOrTypedArray(g.opacity)&&(p=function(_){var E=_.mo;return k(E)?+A.constrain(E,0,1):0}),A.isArrayOrTypedArray(y.color)&&(f=function(_){return _.mlc}),A.isArrayOrTypedArray(y.width)&&(x=function(_){return _.mlw});for(var h=0;h<t.length;h++){var m=t[h],w=m.fOut;if(w){var u=w.properties;u.fc=v(m.z),p&&(u.mo=p(m)),f&&(u.mlc=f(m)),x&&(u.mlw=x(m)),m.ct=u.ct,m._polygons=d.feature2polygons(w)}}var S=p?{type:"identity",property:"mo"}:g.opacity;return A.extendFlat(n.paint,{"fill-color":{type:"identity",property:"fc"},"fill-opacity":S}),A.extendFlat(i.paint,{"line-color":f?{type:"identity",property:"mlc"}:y.color,"line-width":x?{type:"identity",property:"mlw"}:y.width,"line-opacity":S}),n.layout.visibility="visible",i.layout.visibility="visible",a.geojson={type:"FeatureCollection",features:c},s(t),a},convertOnSelect:s}},22654:function($,R,e){"use strict";var k=e(71828),A=e(1586),l=e(64496);$.exports=function(T,b,d,s){function t(i,a){return k.coerce(T,b,l,i,a)}var o=t("locations"),r=t("z"),n=t("geojson");k.isArrayOrTypedArray(o)&&o.length&&k.isArrayOrTypedArray(r)&&r.length&&("string"==typeof n&&""!==n||k.isPlainObject(n))?(t("featureidkey"),b._length=Math.min(o.length,r.length),t("below"),t("text"),t("hovertext"),t("hovertemplate"),t("marker.line.width")&&t("marker.line.color"),t("marker.opacity"),A(T,b,s,t,{prefix:"",cLetter:"z"}),k.coerceSelectionMarkerOpacity(b,t)):b.visible=!1}},57516:function($,R,e){"use strict";$.exports={attributes:e(64496),supplyDefaults:e(22654),colorbar:e(61243),calc:e(38675),plot:e(7852),hoverPoints:e(42300),eventData:e(92069),selectPoints:e(81253),styleOnSelect:function(k,A){A&&A[0].trace._glTrace.updateOnSelect(A)},getBelow:function(k,A){for(var l=A.getMapLayers(),T=l.length-2;T>=0;T--){var b=l[T].id;if("string"==typeof b&&0===b.indexOf("water"))for(var d=T+1;d<l.length;d++)if("string"==typeof(b=l[d].id)&&-1===b.indexOf("plotly-"))return b}},moduleType:"trace",name:"choroplethmapbox",basePlotModule:e(50101),categories:["mapbox","gl","noOpacity","showLegend"],meta:{hr_name:"choropleth_mapbox"}}},7852:function($,R,e){"use strict";var k=e(82004).convert,A=e(82004).convertOnSelect,l=e(77734).traceLayerPrefix;function T(d,s){this.type="choroplethmapbox",this.subplot=d,this.uid=s,this.sourceId="source-"+s,this.layerList=[["fill",l+s+"-fill"],["line",l+s+"-line"]],this.below=null}var b=T.prototype;b.update=function(d){this._update(k(d)),d[0].trace._glTrace=this},b.updateOnSelect=function(d){this._update(A(d))},b._update=function(d){var s=this.subplot,t=this.layerList,o=s.belowLookup["trace-"+this.uid];s.map.getSource(this.sourceId).setData(d.geojson),o!==this.below&&(this._removeLayers(),this._addLayers(d,o),this.below=o);for(var r=0;r<t.length;r++){var n=t[r],a=n[1],c=d[n[0]];s.setOptions(a,"setLayoutProperty",c.layout),"visible"===c.layout.visibility&&s.setOptions(a,"setPaintProperty",c.paint)}},b._addLayers=function(d,s){for(var t=this.subplot,o=this.layerList,r=this.sourceId,n=0;n<o.length;n++){var i=o[n],a=i[0],c=d[a];t.addLayer({type:a,id:i[1],source:r,layout:c.layout,paint:c.paint},s)}},b._removeLayers=function(){for(var d=this.subplot.map,s=this.layerList,t=s.length-1;t>=0;t--)d.removeLayer(s[t][1])},b.dispose=function(){var d=this.subplot.map;this._removeLayers(),d.removeSource(this.sourceId)},$.exports=function(d,s){var t=s[0].trace,o=new T(d,t.uid),r=o.sourceId,n=k(s),i=o.below=d.belowLookup["trace-"+t.uid];return d.map.addSource(r,{type:"geojson",data:n.geojson}),o._addLayers(n,i),s[0].trace._glTrace=o,o}},12674:function($,R,e){"use strict";var k=e(50693),A=e(12663).axisHoverFormat,l=e(5386).f,T=e(2418),b=e(9012),d=e(1426).extendFlat,s={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:l({editType:"calc"},{keys:["norm"]}),uhoverformat:A("u",1),vhoverformat:A("v",1),whoverformat:A("w",1),xhoverformat:A("x"),yhoverformat:A("y"),zhoverformat:A("z"),showlegend:d({},b.showlegend,{dflt:!1})};d(s,k("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(t){s[t]=T[t]}),s.hoverinfo=d({},b.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),s.transforms=void 0,$.exports=s},31371:function($,R,e){"use strict";var k=e(78803);$.exports=function(A,l){for(var T=l.u,b=l.v,d=l.w,s=Math.min(l.x.length,l.y.length,l.z.length,T.length,b.length,d.length),t=-1/0,o=1/0,r=0;r<s;r++){var n=T[r],i=b[r],a=d[r],c=Math.sqrt(n*n+i*i+a*a);t=Math.max(t,c),o=Math.min(o,c)}l._len=s,l._normMax=t,k(A,l,{vals:[o,t],containerStr:"",cLetter:"c"})}},5453:function($,R,e){"use strict";var k=e(9330).gl_cone3d,A=e(9330).gl_cone3d.createConeMesh,l=e(71828).simpleMap,T=e(81697).parseColorScale,b=e(21081).extractOpts,d=e(90060);function s(a,c){this.scene=a,this.uid=c,this.mesh=null,this.data=null}var t=s.prototype;t.handlePick=function(a){if(a.object===this.mesh){var c=a.index=a.data.index,v=this.data.u[c],g=this.data.v[c],y=this.data.w[c];a.traceCoordinate=[this.data.x[c],this.data.y[c],this.data.z[c],v,g,y,Math.sqrt(v*v+g*g+y*y)];var h=this.data.hovertext||this.data.text;return Array.isArray(h)&&void 0!==h[c]?a.textLabel=h[c]:h&&(a.textLabel=h),!0}};var o={xaxis:0,yaxis:1,zaxis:2},r={tip:1,tail:0,cm:.25,center:.5},n={tip:1,tail:1,cm:.75,center:.5};function i(a,c){var p=a.fullSceneLayout,f=a.dataScale,x={};function v(m,w){var u=p[w],S=f[o[w]];return l(m,function(_){return u.d2l(_)*S})}x.vectors=d(v(c.u,"xaxis"),v(c.v,"yaxis"),v(c.w,"zaxis"),c._len),x.positions=d(v(c.x,"xaxis"),v(c.y,"yaxis"),v(c.z,"zaxis"),c._len);var g=b(c);x.colormap=T(c),x.vertexIntensityBounds=[g.min/c._normMax,g.max/c._normMax],x.coneOffset=r[c.anchor],x.coneSize="scaled"===c.sizemode?c.sizeref||.5:c.sizeref&&c._normMax?c.sizeref/c._normMax:.5;var y=k(x),h=c.lightposition;return y.lightPosition=[h.x,h.y,h.z],y.ambient=c.lighting.ambient,y.diffuse=c.lighting.diffuse,y.specular=c.lighting.specular,y.roughness=c.lighting.roughness,y.fresnel=c.lighting.fresnel,y.opacity=c.opacity,c._pad=n[c.anchor]*y.vectorScale*y.coneScale*c._normMax,y}t.update=function(a){this.data=a;var c=i(this.scene,a);this.mesh.update(c)},t.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},$.exports=function(a,c){var p=a.glplot.gl,f=i(a,c),x=A(p,f),v=new s(a,c.uid);return v.mesh=x,v.data=c,x._trace=v,a.glplot.add(x),v}},91750:function($,R,e){"use strict";var k=e(71828),A=e(1586),l=e(12674);$.exports=function(T,b,d,s){function t(p,f){return k.coerce(T,b,l,p,f)}var o=t("u"),r=t("v"),n=t("w"),i=t("x"),a=t("y"),c=t("z");o&&o.length&&r&&r.length&&n&&n.length&&i&&i.length&&a&&a.length&&c&&c.length?(t("sizeref"),t("sizemode"),t("anchor"),t("lighting.ambient"),t("lighting.diffuse"),t("lighting.specular"),t("lighting.roughness"),t("lighting.fresnel"),t("lightposition.x"),t("lightposition.y"),t("lightposition.z"),A(T,b,s,t,{prefix:"",cLetter:"c"}),t("text"),t("hovertext"),t("hovertemplate"),t("uhoverformat"),t("vhoverformat"),t("whoverformat"),t("xhoverformat"),t("yhoverformat"),t("zhoverformat"),b._length=null):b.visible=!1}},98128:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"cone",basePlotModule:e(58547),categories:["gl3d","showLegend"],attributes:e(12674),supplyDefaults:e(91750),colorbar:{min:"cmin",max:"cmax"},calc:e(31371),plot:e(5453),eventData:function(k,A){return k.norm=A.traceCoordinate[6],k},meta:{}}},70600:function($,R,e){"use strict";var k=e(21606),A=e(82196),l=e(12663),T=l.axisHoverFormat,b=l.descriptionOnlyNumbers,d=e(50693),s=e(79952).P,t=e(41940),o=e(1426).extendFlat,r=e(74808),n=r.COMPARISON_OPS2,i=r.INTERVAL_OPS,a=A.line;$.exports=o({z:k.z,x:k.x,x0:k.x0,dx:k.dx,y:k.y,y0:k.y0,dy:k.dy,xperiod:k.xperiod,yperiod:k.yperiod,xperiod0:A.xperiod0,yperiod0:A.yperiod0,xperiodalignment:k.xperiodalignment,yperiodalignment:k.yperiodalignment,text:k.text,hovertext:k.hovertext,transpose:k.transpose,xtype:k.xtype,ytype:k.ytype,xhoverformat:T("x"),yhoverformat:T("y"),zhoverformat:T("z",1),hovertemplate:k.hovertemplate,texttemplate:o({},k.texttemplate,{}),textfont:o({},k.textfont,{}),hoverongaps:k.hoverongaps,connectgaps:o({},k.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:t({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:b("contour label")},operation:{valType:"enumerated",values:[].concat(n).concat(i),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:o({},a.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:s,smoothing:o({},a.smoothing,{}),editType:"plot"}},d("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))},27529:function($,R,e){"use strict";var k=e(21081),A=e(90757),l=e(18670),T=e(53572);$.exports=function(b,d){var s=A(b,d),t=s[0].z;l(d,t);var o,r=d.contours,n=k.extractOpts(d);if("heatmap"===r.coloring&&n.auto&&!1===d.autocontour){var i=r.start,a=T(r),c=r.size||1,p=Math.floor((a-i)/c)+1;isFinite(c)||(c=1,p=1);var f=i-c/2;o=[f,f+p*c]}else o=t;return k.calc(b,d,{vals:o,cLetter:"z"}),s}},20083:function($){"use strict";$.exports=function(R,e){var k,A=R[0],l=A.z;switch(e.type){case"levels":var T=Math.min(l[0][0],l[0][1]);for(k=0;k<R.length;k++){var b=R[k];b.prefixBoundary=!b.edgepaths.length&&(T>b.level||b.starts.length&&T===b.level)}break;case"constraint":if(A.prefixBoundary=!1,A.edgepaths.length)return;var d=A.x.length,s=A.y.length,t=-1/0,o=1/0;for(k=0;k<s;k++)o=Math.min(o,l[k][0]),o=Math.min(o,l[k][d-1]),t=Math.max(t,l[k][0]),t=Math.max(t,l[k][d-1]);for(k=1;k<d-1;k++)o=Math.min(o,l[0][k]),o=Math.min(o,l[s-1][k]),t=Math.max(t,l[0][k]),t=Math.max(t,l[s-1][k]);var r,n,i=e.value;switch(e._operation){case">":i>t&&(A.prefixBoundary=!0);break;case"<":(i<o||A.starts.length&&i===o)&&(A.prefixBoundary=!0);break;case"[]":r=Math.min(i[0],i[1]),((n=Math.max(i[0],i[1]))<o||r>t||A.starts.length&&n===o)&&(A.prefixBoundary=!0);break;case"][":r=Math.min(i[0],i[1]),n=Math.max(i[0],i[1]),r<o&&n>t&&(A.prefixBoundary=!0)}}}},90654:function($,R,e){"use strict";var k=e(21081),A=e(86068),l=e(53572);$.exports={min:"zmin",max:"zmax",calc:function(T,b,d){var s=b.contours,t=b.line,o=s.size||1,r=s.coloring,n=A(b,{isColorbar:!0});if("heatmap"===r){var i=k.extractOpts(b);d._fillgradient=i.reversescale?k.flipScale(i.colorscale):i.colorscale,d._zrange=[i.min,i.max]}else"fill"===r&&(d._fillcolor=n);d._line={color:"lines"===r?n:t.color,width:!1!==s.showlines?t.width:0,dash:t.dash},d._levels={start:s.start,end:l(s),size:o}}}},36914:function($){"use strict";$.exports={BOTTOMSTART:[1,9,13,104,713],TOPSTART:[4,6,7,104,713],LEFTSTART:[8,12,14,208,1114],RIGHTSTART:[2,3,11,208,1114],NEWDELTA:[null,[-1,0],[0,-1],[-1,0],[1,0],null,[0,-1],[-1,0],[0,1],[0,1],null,[0,1],[1,0],[1,0],[0,-1]],CHOOSESADDLE:{104:[4,1],208:[2,8],713:[7,13],1114:[11,14]},SADDLEREMAINDER:{1:4,2:8,4:1,7:13,8:2,11:14,13:7,14:11},LABELDISTANCE:2,LABELINCREASE:10,LABELMIN:3,LABELMAX:10,LABELOPTIMIZER:{EDGECOST:1,ANGLECOST:1,NEIGHBORCOST:5,SAMELEVELFACTOR:10,SAMELEVELDISTANCE:5,MAXCOST:100,INITIALSEARCHPOINTS:10,ITERATIONS:5}}},83179:function($,R,e){"use strict";var k=e(92770),A=e(14523),l=e(7901),T=l.addOpacity,b=l.opacity,d=e(74808),s=d.CONSTRAINT_REDUCTION,t=d.COMPARISON_OPS2;$.exports=function(o,r,n,i,a,c){var p,f,x,y,h,m,v=r.contours,g=n("contours.operation");v._operation=s[g],y=n,-1===t.indexOf((h=v).operation)?(y("contours.value",[0,1]),Array.isArray(h.value)?h.value.length>2?h.value=h.value.slice(2):0===h.length?h.value=[0,1]:h.length<2?(m=parseFloat(h.value[0]),h.value=[m,m+1]):h.value=[parseFloat(h.value[0]),parseFloat(h.value[1])]:k(h.value)&&(m=parseFloat(h.value),h.value=[m,m+1])):(y("contours.value",0),k(h.value)||(h.value=Array.isArray(h.value)?parseFloat(h.value[0]):0)),"="===g?p=v.showlines=!0:(p=n("contours.showlines"),x=n("fillcolor",T((o.line||{}).color||a,.5))),p&&(f=n("line.color",x&&b(x)?T(r.fillcolor,1):a),n("line.width",2),n("line.dash")),n("line.smoothing"),A(n,i,f,c)}},64237:function($,R,e){"use strict";var k=e(74808),A=e(92770);function l(d,s){var t,o=Array.isArray(s);function r(n){return A(n)?+n:null}return-1!==k.COMPARISON_OPS2.indexOf(d)?t=r(o?s[0]:s):-1!==k.INTERVAL_OPS.indexOf(d)?t=o?[r(s[0]),r(s[1])]:[r(s),r(s)]:-1!==k.SET_OPS.indexOf(d)&&(t=o?s.map(r):[r(s)]),t}function T(d){return function(s){s=l(d,s);var t=Math.min(s[0],s[1]),o=Math.max(s[0],s[1]);return{start:t,end:o,size:o-t}}}function b(d){return function(s){return{start:s=l(d,s),end:1/0,size:1/0}}}$.exports={"[]":T("[]"),"][":T("]["),">":b(">"),"<":b("<"),"=":b("=")}},67217:function($){"use strict";$.exports=function(R,e,k,A){var l=A("contours.start"),T=A("contours.end"),b=!1===l||!1===T,d=k("contours.size");!(b?e.autocontour=!0:k("autocontour",!1))&&d||k("ncontours")}},84857:function($,R,e){"use strict";var k=e(71828);function A(l){return k.extendFlat({},l,{edgepaths:k.extendDeep([],l.edgepaths),paths:k.extendDeep([],l.paths),starts:k.extendDeep([],l.starts)})}$.exports=function(l,T){var b,d,s,t=function(n){return n.reverse()},o=function(n){return n};switch(T){case"=":case"<":return l;case">":for(1!==l.length&&k.warn("Contour data invalid for the specified inequality operation."),d=l[0],b=0;b<d.edgepaths.length;b++)d.edgepaths[b]=t(d.edgepaths[b]);for(b=0;b<d.paths.length;b++)d.paths[b]=t(d.paths[b]);for(b=0;b<d.starts.length;b++)d.starts[b]=t(d.starts[b]);return l;case"][":var r=t;t=o,o=r;case"[]":for(2!==l.length&&k.warn("Contour data invalid for the specified inequality range operation."),d=A(l[0]),s=A(l[1]),b=0;b<d.edgepaths.length;b++)d.edgepaths[b]=t(d.edgepaths[b]);for(b=0;b<d.paths.length;b++)d.paths[b]=t(d.paths[b]);for(b=0;b<d.starts.length;b++)d.starts[b]=t(d.starts[b]);for(;s.edgepaths.length;)d.edgepaths.push(o(s.edgepaths.shift()));for(;s.paths.length;)d.paths.push(o(s.paths.shift()));for(;s.starts.length;)d.starts.push(o(s.starts.shift()));return[d]}}},13031:function($,R,e){"use strict";var k=e(71828),A=e(67684),l=e(73927),T=e(83179),b=e(67217),d=e(8724),s=e(58623),t=e(70600);$.exports=function(o,r,n,i){function a(p,f){return k.coerce(o,r,t,p,f)}if(A(o,r,a,i)){l(o,r,i,a),a("xhoverformat"),a("yhoverformat"),a("text"),a("hovertext"),a("hoverongaps"),a("hovertemplate");var c="constraint"===a("contours.type");a("connectgaps",k.isArray1D(r.z)),c?T(o,r,a,i,n):(b(o,r,a,function(p){return k.coerce2(o,r,t,p)}),d(o,r,a,i)),r.contours&&"heatmap"===r.contours.coloring&&s(a,i)}else r.visible=!1}},87558:function($,R,e){"use strict";var k=e(71828),A=e(64237),l=e(53572);$.exports=function(T,b,d){for(var s="constraint"===T.type?A[T._operation](T.value):T,t=s.size,o=[],r=l(s),n=d.trace._carpetTrace,i=n?{xaxis:n.aaxis,yaxis:n.baxis,x:d.a,y:d.b}:{xaxis:b.xaxis,yaxis:b.yaxis,x:d.x,y:d.y},a=s.start;a<r;a+=t)if(o.push(k.extendFlat({level:a,crossings:{},starts:[],edgepaths:[],paths:[],z:d.z,smoothing:d.trace.line.smoothing},i)),o.length>1e3){k.warn("Too many contours, clipping at 1000",T);break}return o}},53572:function($){"use strict";$.exports=function(R){return R.end+R.size/1e6}},81696:function($,R,e){"use strict";var k=e(71828),A=e(36914);function l(d,s,t,o){return Math.abs(d[0]-s[0])<t&&Math.abs(d[1]-s[1])<o}function T(d,s,t,o,r){var n,re,ie,oe,ce,i=s.join(","),a=d.crossings[i],c=(ie=s,oe=0,ce=0,(re=a)>20&&t?208===re||1114===re?oe=0===ie[0]?1:-1:ce=0===ie[1]?1:-1:-1!==A.BOTTOMSTART.indexOf(re)?ce=1:-1!==A.LEFTSTART.indexOf(re)?oe=1:-1!==A.TOPSTART.indexOf(re)?ce=-1:oe=-1,[oe,ce]),p=[b(d,s,[-c[0],-c[1]])],f=d.z.length,x=d.z[0].length,v=s.slice(),g=c.slice();for(n=0;n<1e4;n++){if(a>20?d.crossings[i]=A.SADDLEREMAINDER[a=A.CHOOSESADDLE[a][(c[0]||c[1])<0?0:1]]:delete d.crossings[i],!(c=A.NEWDELTA[a])){k.log("Found bad marching index:",a,s,d.level);break}if(p.push(b(d,s,c)),s[0]+=c[0],s[1]+=c[1],i=s.join(","),l(p[p.length-1],p[p.length-2],o,r)&&p.pop(),s[0]===v[0]&&s[1]===v[1]&&c[0]===g[0]&&c[1]===g[1]||t&&(c[0]&&(s[0]<0||s[0]>x-2)||c[1]&&(s[1]<0||s[1]>f-2)))break;a=d.crossings[i]}1e4===n&&k.log("Infinite loop in contour?");var h,m,w,u,S,_,E,L,C,P,I,U,z,H,F,N=l(p[0],p[p.length-1],o,r),B=0,j=.2*d.smoothing,J=[],G=0;for(n=1;n<p.length;n++)H=(U=p[n])[2]-(z=p[n-1])[2],F=U[3]-z[3],B+=E=Math.sqrt(H*H+F*F),J.push(E);var V=B/J.length*j;function W(re){return p[re%p.length]}for(n=p.length-2;n>=G;n--)if((h=J[n])<V){for(w=0,m=n-1;m>=G&&h+J[m]<V;m--)h+=J[m];if(N&&n===p.length-2)for(w=0;w<m&&h+J[w]<V;w++)h+=J[w];S=n-m+w+1,_=Math.floor((n+m+w+2)/2),u=N||n!==p.length-2?N||-1!==m?S%2?W(_):[(W(_)[0]+W(_+1)[0])/2,(W(_)[1]+W(_+1)[1])/2]:p[0]:p[p.length-1],p.splice(m+1,n-m+1,u),n=m+1,w&&(G=w),N&&(n===p.length-2?p[w]=p[p.length-1]:0===n&&(p[p.length-1]=p[0]))}for(p.splice(0,G),n=0;n<p.length;n++)p[n].length=2;if(!(p.length<2))if(N)p.pop(),d.paths.push(p);else{t||k.log("Unclosed interior contour?",d.level,v.join(","),p.join("L"));var X=!1;for(L=0;L<d.edgepaths.length;L++)if(P=d.edgepaths[L],!X&&l(P[0],p[p.length-1],o,r)){p.pop(),X=!0;var K=!1;for(C=0;C<d.edgepaths.length;C++)if(l((I=d.edgepaths[C])[I.length-1],p[0],o,r)){K=!0,p.shift(),d.edgepaths.splice(L,1),C===L?d.paths.push(p.concat(I)):(C>L&&C--,d.edgepaths[C]=I.concat(p,P));break}K||(d.edgepaths[L]=p.concat(P))}for(L=0;L<d.edgepaths.length&&!X;L++)l((P=d.edgepaths[L])[P.length-1],p[0],o,r)&&(p.shift(),d.edgepaths[L]=P.concat(p),X=!0);X||d.edgepaths.push(p)}}function b(d,s,t){var o=s[0]+Math.max(t[0],0),r=s[1]+Math.max(t[1],0),n=d.z[r][o],i=d.xaxis,a=d.yaxis;if(t[1]){var c=(d.level-n)/(d.z[r][o+1]-n),p=(1!==c?(1-c)*i.c2l(d.x[o]):0)+(0!==c?c*i.c2l(d.x[o+1]):0);return[i.c2p(i.l2c(p),!0),a.c2p(d.y[r],!0),o+c,r]}var f=(d.level-n)/(d.z[r+1][o]-n),x=(1!==f?(1-f)*a.c2l(d.y[r]):0)+(0!==f?f*a.c2l(d.y[r+1]):0);return[i.c2p(d.x[o],!0),a.c2p(a.l2c(x),!0),o,r+f]}$.exports=function(d,s,t){var o,r,n,i;for(s=s||.01,t=t||.01,r=0;r<d.length;r++){for(n=d[r],i=0;i<n.starts.length;i++)T(n,n.starts[i],"edge",s,t);for(o=0;Object.keys(n.crossings).length&&o<1e4;)o++,T(n,Object.keys(n.crossings)[0].split(",").map(Number),void 0,s,t);1e4===o&&k.log("Infinite loop in contour?")}}},52421:function($,R,e){"use strict";var k=e(7901),A=e(46248);$.exports=function(l,T,b,d,s){s||(s={}),s.isContour=!0;var t=A(l,T,b,d,s);return t&&t.forEach(function(o){var r=o.trace;"constraint"===r.contours.type&&(r.fillcolor&&k.opacity(r.fillcolor)?o.color=k.addOpacity(r.fillcolor,1):r.contours.showlines&&k.opacity(r.line.color)&&(o.color=k.addOpacity(r.line.color,1)))}),t}},99442:function($,R,e){"use strict";$.exports={attributes:e(70600),supplyDefaults:e(13031),calc:e(27529),plot:e(29854).plot,style:e(84426),colorbar:e(90654),hoverPoints:e(52421),moduleType:"trace",name:"contour",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},14523:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l,T,b){if(b||(b={}),A("contours.showlabels")){var d=l.font;k.coerceFont(A,"contours.labelfont",{family:d.family,size:d.size,color:T}),A("contours.labelformat")}!1!==b.hasHover&&A("zhoverformat")}},86068:function($,R,e){"use strict";var k=e(39898),A=e(21081),l=e(53572);$.exports=function(T){var b=T.contours,d=b.start,s=l(b),t=b.size||1,o=Math.floor((s-d)/t)+1,r="lines"===b.coloring?0:1,n=A.extractOpts(T);isFinite(t)||(t=1,o=1);var i,a,c=n.reversescale?A.flipScale(n.colorscale):n.colorscale,p=c.length,f=new Array(p),x=new Array(p);if("heatmap"===b.coloring){var v=n.min,g=n.max;for(a=0;a<p;a++)f[a]=(i=c[a])[0]*(g-v)+v,x[a]=i[1];var y=k.extent([v,g,b.start,b.start+t*(o-1)]),h=y[v<g?0:1],m=y[v<g?1:0];h!==v&&(f.splice(0,0,h),x.splice(0,0,x[0])),m!==g&&(f.push(m),x.push(x[x.length-1]))}else for(a=0;a<p;a++)f[a]=((i=c[a])[0]*(o+r-1)-r/2)*t+d,x[a]=i[1];return A.makeColorScaleFunc({domain:f,range:x},{noNumericCheck:!0})}},87678:function($,R,e){"use strict";var k=e(36914);function A(l,T){var b=(T[0][0]>l?0:1)+(T[0][1]>l?0:2)+(T[1][1]>l?0:4)+(T[1][0]>l?0:8);return 5===b||10===b?l>(T[0][0]+T[0][1]+T[1][0]+T[1][1])/4?5===b?713:1114:5===b?104:208:15===b?0:b}$.exports=function(l){var T,b,d,s,t,o,r,n,i,a=l[0].z,c=a.length,p=a[0].length,f=2===c||2===p;for(b=0;b<c-1;b++)for(s=[],0===b&&(s=s.concat(k.BOTTOMSTART)),b===c-2&&(s=s.concat(k.TOPSTART)),T=0;T<p-1;T++)for(d=s.slice(),0===T&&(d=d.concat(k.LEFTSTART)),T===p-2&&(d=d.concat(k.RIGHTSTART)),t=T+","+b,o=[[a[b][T],a[b][T+1]],[a[b+1][T],a[b+1][T+1]]],i=0;i<l.length;i++)(r=A((n=l[i]).level,o))&&(n.crossings[t]=r,-1!==d.indexOf(r)&&(n.starts.push([T,b]),f&&-1!==d.indexOf(r,d.indexOf(r)+1)&&n.starts.push([T,b])))}},29854:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(91424),T=e(21081),b=e(63893),d=e(89298),s=e(21994),t=e(50347),o=e(87678),r=e(81696),n=e(87558),i=e(84857),a=e(20083),c=e(36914),p=c.LABELOPTIMIZER;function f(g,y){var h,m,w,u,S,_,L="",C=0,P=g.edgepaths.map(function(N,B){return B}),I=!0;function H(N){return Math.abs(N[0]-y[2][0])<.01}for(;P.length;){for(_=l.smoothopen(g.edgepaths[C],g.smoothing),L+=I?_:_.replace(/^M/,"L"),P.splice(P.indexOf(C),1),h=g.edgepaths[C][g.edgepaths[C].length-1],u=-1,w=0;w<4;w++){if(!h){A.log("Missing end?",C,g);break}for(Math.abs(h[1]-y[0][1])<.01&&!H(h)?m=y[1]:Math.abs(h[0]-y[0][0])<.01?m=y[0]:Math.abs(h[1]-y[2][1])<.01?m=y[3]:H(h)&&(m=y[2]),S=0;S<g.edgepaths.length;S++){var F=g.edgepaths[S][0];Math.abs(h[0]-m[0])<.01?Math.abs(h[0]-F[0])<.01&&(F[1]-h[1])*(m[1]-F[1])>=0&&(m=F,u=S):Math.abs(h[1]-m[1])<.01?Math.abs(h[1]-F[1])<.01&&(F[0]-h[0])*(m[0]-F[0])>=0&&(m=F,u=S):A.log("endpt to newendpt is not vert. or horz.",h,m,F)}if(h=m,u>=0)break;L+="L"+m}if(u===g.edgepaths.length){A.log("unclosed perimeter path");break}(I=-1===P.indexOf(C=u))&&(C=P[0],L+="Z")}for(C=0;C<g.paths.length;C++)L+=l.smoothclosed(g.paths[C],g.smoothing);return L}function x(g,y,h,m){var w=y.width/2,u=y.height/2,S=g.x,_=g.y,E=g.theta,L=Math.cos(E)*w,C=Math.sin(E)*w,P=(S>m.center?m.right-S:S-m.left)/(L+Math.abs(Math.sin(E)*u)),I=(_>m.middle?m.bottom-_:_-m.top)/(Math.abs(C)+Math.cos(E)*u);if(P<1||I<1)return 1/0;var U=p.EDGECOST*(1/(P-1)+1/(I-1));U+=p.ANGLECOST*E*E;for(var z=S-L,H=_-C,F=S+L,N=_+C,B=0;B<h.length;B++){var j=h[B],J=Math.cos(j.theta)*j.width/2,G=Math.sin(j.theta)*j.width/2,V=2*A.segmentDistance(z,H,F,N,j.x-J,j.y-G,j.x+J,j.y+G)/(y.height+j.height),W=j.level===y.level,X=W?p.SAMELEVELDISTANCE:1;if(V<=X)return 1/0;U+=p.NEIGHBORCOST*(W?p.SAMELEVELFACTOR:1)/(V-X)}return U}function v(g){var y,h,m=g.trace._emptypoints,w=[],u=g.z.length,S=g.z[0].length,_=[];for(y=0;y<S;y++)_.push(1);for(y=0;y<u;y++)w.push(_.slice());for(y=0;y<m.length;y++)w[(h=m[y])[0]][h[1]]=0;return g.zmask=w,w}R.plot=function(g,y,h,m){var w=y.xaxis,u=y.yaxis;A.makeTraceGroups(m,h,"contour").each(function(S){var _=k.select(this),E=S[0],C=E.x,P=E.y,I=E.trace.contours,U=n(I,y,E),z=A.ensureSingle(_,"g","heatmapcoloring"),H=[];"heatmap"===I.coloring&&(H=[S]),t(g,y,H,z),o(U),r(U);var W,X,K,F=w.c2p(C[0],!0),N=w.c2p(C[C.length-1],!0),B=u.c2p(P[0],!0),j=u.c2p(P[P.length-1],!0),J=[[F,j],[N,j],[N,B],[F,B]],G=U;"constraint"===I.type&&(G=i(U,I._operation)),W=J,X=I,(K=A.ensureSingle(_,"g","contourbg").selectAll("path").data("fill"===X.coloring?[0]:[])).enter().append("path"),K.exit().remove(),K.attr("d","M"+W.join("L")+"Z").style("stroke","none"),function(V,W,X,K){var re="fill"===K.coloring||"constraint"===K.type&&"="!==K._operation,ee="M"+X.join("L")+"Z";re&&a(W,K);var ie=A.ensureSingle(V,"g","contourfill").selectAll("path").data(re?W:[]);ie.enter().append("path"),ie.exit().remove(),ie.each(function(oe){var ce=(oe.prefixBoundary?ee:"")+f(oe,X);ce?k.select(this).attr("d",ce).style("stroke","none"):k.select(this).remove()})}(_,G,J,I),function(V,W,X,K,re){var ee=A.ensureSingle(V,"g","contourlines"),ie=!1!==re.showlines,oe=re.showlabels,ce=ie&&oe,me=R.createLines(ee,ie||oe,W),de=R.createLineClip(ee,ce,X,K.trace.uid),he=V.selectAll("g.contourlabels").data(oe?[0]:[]);if(he.exit().remove(),he.enter().append("g").classed("contourlabels",!0),oe){var ve=[],Pe=[];A.clearLocationCache();var xe=R.labelFormatter(X,K),ke=l.tester.append("text").attr("data-notex",1).call(l.font,re.labelfont),Ae=W[0].xaxis,Te=W[0].yaxis,Q=Ae._length,se=Te._length,fe=Ae.range,ye=Te.range,Me=A.aggNums(Math.min,null,K.x),Ie=A.aggNums(Math.max,null,K.x),Ce=A.aggNums(Math.min,null,K.y),Re=A.aggNums(Math.max,null,K.y),le=Math.max(Ae.c2p(Me,!0),0),ge=Math.min(Ae.c2p(Ie,!0),Q),_e=Math.max(Te.c2p(Re,!0),0),Fe=Math.min(Te.c2p(Ce,!0),se),Ve={};fe[0]<fe[1]?(Ve.left=le,Ve.right=ge):(Ve.left=ge,Ve.right=le),ye[0]<ye[1]?(Ve.top=_e,Ve.bottom=Fe):(Ve.top=Fe,Ve.bottom=_e),Ve.middle=(Ve.top+Ve.bottom)/2,Ve.center=(Ve.left+Ve.right)/2,ve.push([[Ve.left,Ve.top],[Ve.right,Ve.top],[Ve.right,Ve.bottom],[Ve.left,Ve.bottom]]);var He=Math.sqrt(Q*Q+se*se),nt=c.LABELDISTANCE*He/Math.max(1,W.length/c.LABELINCREASE);me.each(function(tt){var ot=R.calcTextOpts(tt.level,xe,ke,X);k.select(this).selectAll("path").each(function(){var dt=A.getVisibleSegment(this,Ve,ot.height/2);if(dt&&!(dt.len<(ot.width+ot.height)*c.LABELMIN))for(var kt=Math.min(Math.ceil(dt.len/nt),c.LABELMAX),mt=0;mt<kt;mt++){var wt=R.findBestTextLocation(this,dt,ot,Pe,Ve);if(!wt)break;R.addLabelData(wt,ot,Pe,ve)}})}),ke.remove(),R.drawLabels(he,Pe,X,de,ce?ve:null)}oe&&!ie&&me.remove()}(_,U,g,E,I),function(V,W,X,K,re){var ee=K.trace,oe="clip"+ee.uid,ce=X._fullLayout._clips.selectAll("#"+oe).data(ee.connectgaps?[]:[0]);if(ce.enter().append("clipPath").classed("contourclip",!0).attr("id",oe),ce.exit().remove(),!1===ee.connectgaps){var me={level:.9,crossings:{},starts:[],edgepaths:[],paths:[],xaxis:W.xaxis,yaxis:W.yaxis,x:K.x,y:K.y,z:v(K),smoothing:0};o([me]),r([me]),a([me],{type:"levels"}),A.ensureSingle(ce,"path","").attr("d",(me.prefixBoundary?"M"+re.join("L")+"Z":"")+f(me,re))}else oe=null;l.setClipUrl(V,oe,X)}(_,y,g,E,J)})},R.createLines=function(g,y,h){var m=h[0].smoothing,w=g.selectAll("g.contourlevel").data(y?h:[]);if(w.exit().remove(),w.enter().append("g").classed("contourlevel",!0),y){var u=w.selectAll("path.openline").data(function(_){return _.pedgepaths||_.edgepaths});u.exit().remove(),u.enter().append("path").classed("openline",!0),u.attr("d",function(_){return l.smoothopen(_,m)}).style("stroke-miterlimit",1).style("vector-effect","non-scaling-stroke");var S=w.selectAll("path.closedline").data(function(_){return _.ppaths||_.paths});S.exit().remove(),S.enter().append("path").classed("closedline",!0),S.attr("d",function(_){return l.smoothclosed(_,m)}).style("stroke-miterlimit",1).style("vector-effect","non-scaling-stroke")}return w},R.createLineClip=function(g,y,h,m){var w=y?"clipline"+m:null,u=h._fullLayout._clips.selectAll("#"+w).data(y?[0]:[]);return u.exit().remove(),u.enter().append("clipPath").classed("contourlineclip",!0).attr("id",w),l.setClipUrl(g,w,h),u},R.labelFormatter=function(g,y){var h=g._fullLayout,m=y.trace,w=m.contours,u={type:"linear",_id:"ycontour",showexponent:"all",exponentformat:"B"};if(w.labelformat)u.tickformat=w.labelformat,s(u,h);else{var S=T.extractOpts(m);if(S&&S.colorbar&&S.colorbar._axis)u=S.colorbar._axis;else{if("constraint"===w.type){var _=w.value;u.range=Array.isArray(_)?[_[0],_[_.length-1]]:[_,_]}else u.range=[w.start,w.end],u.nticks=(w.end-w.start)/w.size;u.range[0]===u.range[1]&&(u.range[1]+=u.range[0]||1),u.nticks||(u.nticks=1e3),s(u,h),d.prepTicks(u),u._tmin=null,u._tmax=null}}return function(E){return d.tickText(u,E).text}},R.calcTextOpts=function(g,y,h,m){var w=y(g);h.text(w).call(b.convertToTspans,m);var u=h.node(),S=l.bBox(u,!0);return{text:w,width:S.width,height:S.height,fontSize:+u.style["font-size"].replace("px",""),level:g,dy:(S.top+S.bottom)/2}},R.findBestTextLocation=function(g,y,h,m,w){var u,S,_,E,L,C=h.width;y.isClosed?(u=y.min+(S=y.len/p.INITIALSEARCHPOINTS)/2,_=y.max):(u=y.min+(S=(y.len-C)/(p.INITIALSEARCHPOINTS+1))+C/2,_=y.max-(S+C)/2);for(var P=1/0,I=0;I<p.ITERATIONS;I++){for(var U=u;U<_;U+=S){var z=A.getTextLocation(g,y.total,U,C),H=x(z,h,m,w);H<P&&(P=H,L=z,E=U)}if(P>2*p.MAXCOST)break;I&&(S/=2),_=(u=E-S/2)+1.5*S}if(P<=p.MAXCOST)return L},R.addLabelData=function(g,y,h,m){var w=y.fontSize,u=y.width+w/3,S=Math.max(0,y.height-w/3),_=g.x,E=g.y,L=g.theta,C=Math.sin(L),P=Math.cos(L),I=function(z,H){return[_+z*P-H*C,E+z*C+H*P]},U=[I(-u/2,-S/2),I(-u/2,S/2),I(u/2,S/2),I(u/2,-S/2)];h.push({text:y.text,x:_,y:E,dy:y.dy,theta:L,level:y.level,width:u,height:S}),m.push(U)},R.drawLabels=function(g,y,h,m,w){var u=g.selectAll("text").data(y,function(E){return E.text+","+E.x+","+E.y+","+E.theta});if(u.exit().remove(),u.enter().append("text").attr({"data-notex":1,"text-anchor":"middle"}).each(function(E){var L=E.x+Math.sin(E.theta)*E.dy,C=E.y-Math.cos(E.theta)*E.dy;k.select(this).text(E.text).attr({x:L,y:C,transform:"rotate("+180*E.theta/Math.PI+" "+L+" "+C+")"}).call(b.convertToTspans,h)}),w){for(var S="",_=0;_<w.length;_++)S+="M"+w[_].join("L")+"Z";A.ensureSingle(m,"path","").attr("d",S)}}},18670:function($,R,e){"use strict";var k=e(89298),A=e(71828);function l(T,b,d){var s={type:"linear",range:[T,b]};return k.autoTicks(s,(b-T)/(d||15)),s}$.exports=function(T,b){var d=T.contours;if(T.autocontour){var s=T.zmin,t=T.zmax;(T.zauto||void 0===s)&&(s=A.aggNums(Math.min,null,b)),(T.zauto||void 0===t)&&(t=A.aggNums(Math.max,null,b));var o=l(s,t,T.ncontours);d.size=o.dtick,d.start=k.tickFirst(o),o.range.reverse(),d.end=k.tickFirst(o),d.start===s&&(d.start+=d.size),d.end===t&&(d.end-=d.size),d.start>d.end&&(d.start=d.end=(d.start+d.end)/2),T._input.contours||(T._input.contours={}),A.extendFlat(T._input.contours,{start:d.start,end:d.end,size:d.size}),T._input.autocontour=!0}else if("constraint"!==d.type){var r,n=d.start,i=d.end,a=T._input.contours;n>i&&(d.start=a.start=i,i=d.end=a.end=n,n=d.start),d.size>0||(r=n===i?1:l(n,i,T.ncontours).dtick,a.size=d.size=r)}}},84426:function($,R,e){"use strict";var k=e(39898),A=e(91424),l=e(70035),T=e(86068);$.exports=function(b){var d=k.select(b).selectAll("g.contour");d.style("opacity",function(s){return s[0].trace.opacity}),d.each(function(s){var t=k.select(this),o=s[0].trace,r=o.contours,n=o.line,i=r.size||1,a=r.start,c="constraint"===r.type,p=!c&&"lines"===r.coloring,f=!c&&"fill"===r.coloring,x=p||f?T(o):null;t.selectAll("g.contourlevel").each(function(y){k.select(this).selectAll("path").call(A.lineGroupStyle,n.width,p?x(y.level):n.color,n.dash)});var v=r.labelfont;if(t.selectAll("g.contourlabels text").each(function(y){A.font(k.select(this),{family:v.family,size:v.size,color:v.color||(p?x(y.level):n.color)})}),c)t.selectAll("g.contourfill path").style("fill",o.fillcolor);else if(f){var g;t.selectAll("g.contourfill path").style("fill",function(y){return void 0===g&&(g=y.level),x(y.level+.5*i)}),void 0===g&&(g=a),t.selectAll("g.contourbg path").style("fill",x(g-.5*i))}}),l(b)}},8724:function($,R,e){"use strict";var k=e(1586),A=e(14523);$.exports=function(l,T,b,d,s){var t,o=b("contours.coloring"),r="";"fill"===o&&(t=b("contours.showlines")),!1!==t&&("lines"!==o&&(r=b("line.color","#000")),b("line.width",.5),b("line.dash")),"none"!==o&&(!0!==l.showlegend&&(T.showlegend=!1),T._dfltShowLegend=!1,k(l,T,d,b,{prefix:"",cLetter:"z"})),b("line.smoothing"),A(b,d,r,s)}},88085:function($,R,e){"use strict";var k=e(21606),A=e(70600),l=e(50693),T=e(1426).extendFlat,b=A.contours;$.exports=T({carpet:{valType:"string",editType:"calc"},z:k.z,a:k.x,a0:k.x0,da:k.dx,b:k.y,b0:k.y0,db:k.dy,text:k.text,hovertext:k.hovertext,transpose:k.transpose,atype:k.xtype,btype:k.ytype,fillcolor:A.fillcolor,autocontour:A.autocontour,ncontours:A.ncontours,contours:{type:b.type,start:b.start,end:b.end,size:b.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:b.showlines,showlabels:b.showlabels,labelfont:b.labelfont,labelformat:b.labelformat,operation:b.operation,value:b.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:A.line.color,width:A.line.width,dash:A.line.dash,smoothing:A.line.smoothing,editType:"plot"},transforms:void 0},l("",{cLetter:"z",autoColorDflt:!1}))},59885:function($,R,e){"use strict";var k=e(78803),A=e(71828),l=e(68296),T=e(4742),b=e(824),d=e(43907),s=e(70769),t=e(75005),o=e(22882),r=e(18670);$.exports=function(n,i){var a=i._carpetTrace=o(n,i);if(a&&a.visible&&"legendonly"!==a.visible){if(!i.a||!i.b){var c=n.data[a.index],p=n.data[i.index];p.a||(p.a=c.a),p.b||(p.b=c.b),t(p,i,i._defaultColor,n._fullLayout)}var f=function(x,v){var g,y,h,m,w,u,S,_=v._carpetTrace,E=_.aaxis,L=_.baxis;E._minDtick=0,L._minDtick=0,A.isArray1D(v.z)&&l(v,E,L,"a","b",["z"]),g=v._a=v._a||v.a,m=v._b=v._b||v.b,g=g?E.makeCalcdata(v,"_a"):[],m=m?L.makeCalcdata(v,"_b"):[],y=v.a0||0,h=v.da||1,w=v.b0||0,u=v.db||1,S=v._z=T(v._z||v.z,v.transpose),v._emptypoints=d(S),b(S,v._emptypoints);var C=A.maxRowLength(S),z={a:s(v,"scaled"===v.xtype?"":g,y,h,C,E),b:s(v,"scaled"===v.ytype?"":m,w,u,S.length,L),z:S};return"levels"===v.contours.type&&"none"!==v.contours.coloring&&k(x,v,{vals:S,containerStr:"",cLetter:"z"}),[z]}(n,i);return r(i,i._z),f}}},75005:function($,R,e){"use strict";var k=e(71828),A=e(67684),l=e(88085),T=e(83179),b=e(67217),d=e(8724);$.exports=function(s,t,o,r){function n(i,a){return k.coerce(s,t,l,i,a)}if(n("carpet"),s.a&&s.b){if(!A(s,t,n,r,"a","b"))return void(t.visible=!1);n("text"),"constraint"===n("contours.type")?T(s,t,n,r,o,{hasHover:!1}):(b(s,t,n,function(i){return k.coerce2(s,t,l,i)}),d(s,t,n,r,{hasHover:!1}))}else t._defaultColor=o,t._length=null}},93740:function($,R,e){"use strict";$.exports={attributes:e(88085),supplyDefaults:e(75005),colorbar:e(90654),calc:e(59885),plot:e(51048),style:e(84426),moduleType:"trace",name:"contourcarpet",basePlotModule:e(93612),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},51048:function($,R,e){"use strict";var k=e(39898),A=e(27669),l=e(67961),T=e(91424),b=e(71828),d=e(87678),s=e(81696),t=e(29854),o=e(36914),r=e(84857),n=e(87558),i=e(20083),a=e(22882),c=e(4536);function p(v,g,y){var h=v.getPointAtLength(g),m=v.getPointAtLength(y),w=m.x-h.x,u=m.y-h.y,S=Math.sqrt(w*w+u*u);return[w/S,u/S]}function f(v){var g=Math.sqrt(v[0]*v[0]+v[1]*v[1]);return[v[0]/g,v[1]/g]}function x(v,g){var y=Math.abs(v[0]*g[0]+v[1]*g[1]);return Math.sqrt(1-y*y)/y}$.exports=function(v,g,y,h){var m=g.xaxis,w=g.yaxis;b.makeTraceGroups(h,y,"contour").each(function(u){var S=k.select(this),_=u[0],E=_.trace,L=E._carpetTrace=a(v,E),C=v.calcdata[L.index][0];if(L.visible&&"legendonly"!==L.visible){var P=_.a,I=_.b,U=E.contours,z=n(U,g,_),H="constraint"===U.type,F=U._operation,N=H?"="===F?"lines":"fill":U.coloring,B=[[P[0],I[I.length-1]],[P[P.length-1],I[I.length-1]],[P[P.length-1],I[0]],[P[0],I[0]]];d(z),s(z,1e-8*(P[P.length-1]-P[0]),1e-8*(I[I.length-1]-I[0]));var G,V,W,X,K=z;"constraint"===U.type&&(K=r(z,F)),function(oe,ce){var me,de,he,ve,Pe,xe,ke,Ae,Te;for(me=0;me<oe.length;me++){for(Pe=(ve=oe[me]).pedgepaths=[],xe=ve.ppaths=[],de=0;de<ve.edgepaths.length;de++){for(Te=ve.edgepaths[de],ke=[],he=0;he<Te.length;he++)ke[he]=ce(Te[he]);Pe.push(ke)}for(de=0;de<ve.paths.length;de++){for(Te=ve.paths[de],Ae=[],he=0;he<Te.length;he++)Ae[he]=ce(Te[he]);xe.push(Ae)}}}(z,ie);var re=[];for(X=C.clipsegments.length-1;X>=0;X--)V=A([],(G=C.clipsegments[X]).x,m.c2p),W=A([],G.y,w.c2p),V.reverse(),W.reverse(),re.push(l(V,W,G.bicubic));var ee="M"+re.join("L")+"Z";(function(oe,ce,me,de,he,ve){var Pe,xe,ke,Ae,Te=b.ensureSingle(oe,"g","contourbg").selectAll("path").data("fill"!==ve||he?[]:[0]);Te.enter().append("path"),Te.exit().remove();var Q=[];for(Ae=0;Ae<ce.length;Ae++)xe=A([],(Pe=ce[Ae]).x,me.c2p),ke=A([],Pe.y,de.c2p),Q.push(l(xe,ke,Pe.bicubic));Te.attr("d","M"+Q.join("L")+"Z").style("stroke","none")})(S,C.clipsegments,m,w,H,N),function(oe,ce,me,de,he,ve,Pe,xe,ke,Ae,Te){var Q="fill"===Ae;Q&&i(he,oe.contours);var se=b.ensureSingle(ce,"g","contourfill").selectAll("path").data(Q?he:[]);se.enter().append("path"),se.exit().remove(),se.each(function(fe){var ye=(fe.prefixBoundary?Te:"")+function(Me,Ie,Ce,Re,le,ge,_e,Fe){var Ve,He,nt,tt,ot,dt,kt,mt="",wt=Ie.edgepaths.map(function(Se,ze){return ze}),Lt=!0,Ct=1e-4*Math.abs(Ce[0][0]-Ce[2][0]),It=1e-4*Math.abs(Ce[0][1]-Ce[2][1]);function Ut(Se){return Math.abs(Se[1]-Ce[0][1])<It}function Rt(Se){return Math.abs(Se[1]-Ce[2][1])<It}function Ge(Se){return Math.abs(Se[0]-Ce[0][0])<Ct}function We(Se){return Math.abs(Se[0]-Ce[2][0])<Ct}function Be(Se,ze){var Ke,st,ct,Tt,Et="";for(Ut(Se)&&!We(Se)||Rt(Se)&&!Ge(Se)?(Tt=le.aaxis,ct=c(le,ge,[Se[0],ze[0]],.5*(Se[1]+ze[1]))):(Tt=le.baxis,ct=c(le,ge,.5*(Se[0]+ze[0]),[Se[1],ze[1]])),Ke=1;Ke<ct.length;Ke++)for(Et+=Tt.smoothing?"C":"L",st=0;st<ct[Ke].length;st++){var At=ct[Ke][st];Et+=[_e.c2p(At[0]),Fe.c2p(At[1])]+" "}return Et}for(Ve=0,He=null;wt.length;){for(He&&(mt+=Be(He,Ie.edgepaths[Ve][0])),kt=T.smoothopen(Ie.edgepaths[Ve].map(Re),Ie.smoothing),mt+=Lt?kt:kt.replace(/^M/,"L"),wt.splice(wt.indexOf(Ve),1),He=Ie.edgepaths[Ve][Ie.edgepaths[Ve].length-1],ot=-1,tt=0;tt<4;tt++){if(!He){b.log("Missing end?",Ve,Ie);break}for(Ut(He)&&!We(He)?nt=Ce[1]:Ge(He)?nt=Ce[0]:Rt(He)?nt=Ce[3]:We(He)&&(nt=Ce[2]),dt=0;dt<Ie.edgepaths.length;dt++){var rt=Ie.edgepaths[dt][0];Math.abs(He[0]-nt[0])<Ct?Math.abs(He[0]-rt[0])<Ct&&(rt[1]-He[1])*(nt[1]-rt[1])>=0&&(nt=rt,ot=dt):Math.abs(He[1]-nt[1])<It?Math.abs(He[1]-rt[1])<It&&(rt[0]-He[0])*(nt[0]-rt[0])>=0&&(nt=rt,ot=dt):b.log("endpt to newendpt is not vert. or horz.",He,nt,rt)}if(ot>=0)break;mt+=Be(He,nt),He=nt}if(ot===Ie.edgepaths.length){b.log("unclosed perimeter path");break}(Lt=-1===wt.indexOf(Ve=ot))&&(Ve=wt[0],mt+=Be(He,nt)+"Z",He=null)}for(Ve=0;Ve<Ie.paths.length;Ve++)mt+=T.smoothclosed(Ie.paths[Ve].map(Re),Ie.smoothing);return mt}(0,fe,ve,Pe,xe,ke,me,de);ye?k.select(this).attr("d",ye).style("stroke","none"):k.select(this).remove()})}(E,S,m,w,K,B,ie,L,C,N,ee),function(oe,ce,me,de,he,ve,Pe){var xe=b.ensureSingle(oe,"g","contourlines"),ke=!1!==he.showlines,Ae=he.showlabels,Te=ke&&Ae,Q=t.createLines(xe,ke||Ae,ce),se=t.createLineClip(xe,Te,me,de.trace.uid),fe=oe.selectAll("g.contourlabels").data(Ae?[0]:[]);if(fe.exit().remove(),fe.enter().append("g").classed("contourlabels",!0),Ae){var Ie=ve.xaxis._length,Ce=ve.yaxis._length,Re=[[[0,0],[Ie,0],[Ie,Ce],[0,Ce]]],le=[];b.clearLocationCache();var ge=t.labelFormatter(me,de),_e=T.tester.append("text").attr("data-notex",1).call(T.font,he.labelfont),Fe={left:0,right:Ie,center:Ie/2,top:0,bottom:Ce,middle:Ce/2},Ve=Math.sqrt(Ie*Ie+Ce*Ce),He=o.LABELDISTANCE*Ve/Math.max(1,ce.length/o.LABELINCREASE);Q.each(function(nt){var tt=t.calcTextOpts(nt.level,ge,_e,me);k.select(this).selectAll("path").each(function(ot){var kt=b.getVisibleSegment(this,Fe,tt.height/2);if(kt&&(function(Ct,It,Ut,Rt,Ge,We){for(var Be,Ye=0;Ye<Ut.pedgepaths.length;Ye++)It===Ut.pedgepaths[Ye]&&(Be=Ut.edgepaths[Ye]);if(Be){var rt=Ge.a[0],Se=Ge.a[Ge.a.length-1],ze=Ge.b[0],Ke=Ge.b[Ge.b.length-1],st=p(Ct,0,1),ct=p(Ct,Rt.total,Rt.total-1),Tt=At(Be[0],st),Et=Rt.total-At(Be[Be.length-1],ct);Rt.min<Tt&&(Rt.min=Tt),Rt.max>Et&&(Rt.max=Et),Rt.len=Rt.max-Rt.min}function At(ht,pt){var gt,Pt=0;return(Math.abs(ht[0]-rt)<.1||Math.abs(ht[0]-Se)<.1)&&(gt=f(Ge.dxydb_rough(ht[0],ht[1],.1)),Pt=Math.max(Pt,We*x(pt,gt)/2)),(Math.abs(ht[1]-ze)<.1||Math.abs(ht[1]-Ke)<.1)&&(gt=f(Ge.dxyda_rough(ht[0],ht[1],.1)),Pt=Math.max(Pt,We*x(pt,gt)/2)),Pt}}(this,ot,nt,kt,Pe,tt.height),!(kt.len<(tt.width+tt.height)*o.LABELMIN)))for(var mt=Math.min(Math.ceil(kt.len/He),o.LABELMAX),wt=0;wt<mt;wt++){var Lt=t.findBestTextLocation(this,kt,tt,le,Fe);if(!Lt)break;t.addLabelData(Lt,tt,le,Re)}})}),_e.remove(),t.drawLabels(fe,le,me,se,Te?Re:null)}Ae&&!ke&&Q.remove()}(S,z,v,_,U,g,L),T.setClipUrl(S,L._clipPathId,v)}function ie(oe){var ce=L.ab2xy(oe[0],oe[1],!0);return[m.c2p(ce[0]),w.c2p(ce[1])]}})}},64096:function($,R,e){"use strict";var k=e(50693),A=e(5386).f,l=e(9012),T=e(99181),b=e(1426).extendFlat;$.exports=b({lon:T.lon,lat:T.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:T.text,hovertext:T.hovertext,hoverinfo:b({},l.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:A(),showlegend:b({},l.showlegend,{dflt:!1})},k("",{cLetter:"z",editTypeOverride:"calc"}))},85070:function($,R,e){"use strict";var k=e(92770),A=e(71828).isArrayOrTypedArray,l=e(50606).BADNUM,T=e(78803),b=e(71828)._;$.exports=function(d,s){for(var t=s._length,o=new Array(t),r=s.z,n=A(r)&&r.length,i=0;i<t;i++){var a=o[i]={},c=s.lon[i],p=s.lat[i];if(a.lonlat=k(c)&&k(p)?[+c,+p]:[l,l],n){var f=r[i];a.z=k(f)?f:l}}return T(d,s,{vals:n?r:[0,1],containerStr:"",cLetter:"z"}),t&&(o[0].t={labels:{lat:b(d,"lat:")+" ",lon:b(d,"lon:")+" "}}),o}},52414:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(7901),T=e(21081),b=e(50606).BADNUM,d=e(18214).makeBlank;$.exports=function(s){var t=s[0].trace,o=!0===t.visible&&0!==t._length,r=t._opts={heatmap:{layout:{visibility:"none"},paint:{}},geojson:d()};if(!o)return r;var n,i=[],a=t.z,c=t.radius,p=A.isArrayOrTypedArray(a)&&a.length,f=A.isArrayOrTypedArray(c);for(n=0;n<s.length;n++){var x=s[n],v=x.lonlat;if(v[0]!==b){var g={};if(p){var y=x.z;g.z=y!==b?y:0}f&&(g.r=k(c[n])&&c[n]>0?+c[n]:0),i.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:g})}}var h=T.extractOpts(t),m=h.reversescale?T.flipScale(h.colorscale):h.colorscale,w=m[0][1],u=["interpolate",["linear"],["heatmap-density"],0,l.opacity(w)<1?w:l.addOpacity(w,0)];for(n=1;n<m.length;n++)u.push(m[n][0],m[n][1]);return A.extendFlat(r.heatmap.paint,{"heatmap-weight":p?["interpolate",["linear"],["get","z"],h.min,0,h.max,1]:1/(h.max-h.min),"heatmap-color":u,"heatmap-radius":f?{type:"identity",property:"r"}:t.radius,"heatmap-opacity":t.opacity}),r.geojson={type:"FeatureCollection",features:i},r.heatmap.layout.visibility="visible",r}},79429:function($,R,e){"use strict";var k=e(71828),A=e(1586),l=e(64096);$.exports=function(T,b,d,s){function t(i,a){return k.coerce(T,b,l,i,a)}var o=t("lon")||[],r=t("lat")||[],n=Math.min(o.length,r.length);n?(b._length=n,t("z"),t("radius"),t("below"),t("text"),t("hovertext"),t("hovertemplate"),A(T,b,s,t,{prefix:"",cLetter:"z"})):b.visible=!1}},62474:function($){"use strict";$.exports=function(R,e){return R.lon=e.lon,R.lat=e.lat,R.z=e.z,R}},84684:function($,R,e){"use strict";var k=e(89298),A=e(28178).hoverPoints,l=e(28178).getExtraText;$.exports=function(T,b,d){var s=A(T,b,d);if(s){var t=s[0],o=t.cd,r=o[0].trace,n=o[t.index];if(delete t.color,"z"in n){var i=t.subplot.mockAxis;t.z=n.z,t.zLabel=k.tickText(i,i.c2l(n.z),"hover").text}return t.extraText=l(r,n,o[0].t.labels),[t]}}},93814:function($,R,e){"use strict";$.exports={attributes:e(64096),supplyDefaults:e(79429),colorbar:e(61243),formatLabels:e(15636),calc:e(85070),plot:e(7336),hoverPoints:e(84684),eventData:e(62474),getBelow:function(k,A){for(var l=A.getMapLayers(),T=0;T<l.length;T++){var b=l[T],d=b.id;if("symbol"===b.type&&"string"==typeof d&&-1===d.indexOf("plotly-"))return d}},moduleType:"trace",name:"densitymapbox",basePlotModule:e(50101),categories:["mapbox","gl","showLegend"],meta:{hr_name:"density_mapbox"}}},7336:function($,R,e){"use strict";var k=e(52414),A=e(77734).traceLayerPrefix;function l(b,d){this.type="densitymapbox",this.subplot=b,this.uid=d,this.sourceId="source-"+d,this.layerList=[["heatmap",A+d+"-heatmap"]],this.below=null}var T=l.prototype;T.update=function(b){var d=this.subplot,s=this.layerList,t=k(b),o=d.belowLookup["trace-"+this.uid];d.map.getSource(this.sourceId).setData(t.geojson),o!==this.below&&(this._removeLayers(),this._addLayers(t,o),this.below=o);for(var r=0;r<s.length;r++){var n=s[r],a=n[1],c=t[n[0]];d.setOptions(a,"setLayoutProperty",c.layout),"visible"===c.layout.visibility&&d.setOptions(a,"setPaintProperty",c.paint)}},T._addLayers=function(b,d){for(var s=this.subplot,t=this.layerList,o=this.sourceId,r=0;r<t.length;r++){var n=t[r],i=n[0],a=b[i];s.addLayer({type:i,id:n[1],source:o,layout:a.layout,paint:a.paint},d)}},T._removeLayers=function(){for(var b=this.subplot.map,d=this.layerList,s=d.length-1;s>=0;s--)b.removeLayer(d[s][1])},T.dispose=function(){var b=this.subplot.map;this._removeLayers(),b.removeSource(this.sourceId)},$.exports=function(b,d){var s=d[0].trace,t=new l(b,s.uid),o=t.sourceId,r=k(d),n=t.below=b.belowLookup["trace-"+s.uid];return b.map.addSource(o,{type:"geojson",data:r.geojson}),t._addLayers(r,n),t}},49789:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l){for(var T=0;T<A.length;T++)A[T].i=T;k.mergeArray(l.text,A,"tx"),k.mergeArray(l.hovertext,A,"htx");var b=l.marker;if(b){k.mergeArray(b.opacity,A,"mo"),k.mergeArray(b.color,A,"mc");var d=b.line;d&&(k.mergeArray(d.color,A,"mlc"),k.mergeArrayCastPositive(d.width,A,"mlw"))}}},1285:function($,R,e){"use strict";var k,A=e(1486),l=e(82196).line,T=e(9012),b=e(12663).axisHoverFormat,d=e(5386).f,s=e(5386).s,t=e(18517),o=e(1426).extendFlat,r=e(7901);$.exports={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:b("x"),yhoverformat:b("y"),hovertext:A.hovertext,hovertemplate:d({},{keys:t.eventDataKeys}),hoverinfo:o({},T.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:s({editType:"plot"},{keys:t.eventDataKeys.concat(["label","value"])}),text:A.text,textposition:A.textposition,insidetextanchor:o({},A.insidetextanchor,{dflt:"middle"}),textangle:o({},A.textangle,{dflt:0}),textfont:A.textfont,insidetextfont:A.insidetextfont,outsidetextfont:A.outsidetextfont,constraintext:A.constraintext,cliponaxis:A.cliponaxis,orientation:o({},A.orientation,{}),offset:o({},A.offset,{arrayOk:!1}),width:o({},A.width,{arrayOk:!1}),marker:(k=o({},A.marker),delete k.pattern,k),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:o({},l.color,{dflt:r.defaultLine}),width:o({},l.width,{dflt:0,editType:"plot"}),dash:l.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:A.offsetgroup,alignmentgroup:A.alignmentgroup}},9532:function($,R,e){"use strict";var k=e(89298),A=e(42973),l=e(49789),T=e(66279),b=e(50606).BADNUM;function d(s){return s===b?0:s}$.exports=function(s,t){var o,r,n,i,a,c,p,f,x=k.getFromId(s,t.xaxis||"x"),v=k.getFromId(s,t.yaxis||"y");"h"===t.orientation?(o=x.makeCalcdata(t,"x"),n=v.makeCalcdata(t,"y"),i=A(t,v,"y",n),a=!!t.yperiodalignment,c="y"):(o=v.makeCalcdata(t,"y"),n=x.makeCalcdata(t,"x"),i=A(t,x,"x",n),a=!!t.xperiodalignment,c="x"),r=i.vals;var g,y=Math.min(r.length,o.length),h=new Array(y);for(t._base=[],p=0;p<y;p++){o[p]<0&&(o[p]=b);var m=!1;o[p]!==b&&p+1<y&&o[p+1]!==b&&(m=!0),f=h[p]={p:r[p],s:o[p],cNext:m},t._base[p]=-.5*f.s,a&&(h[p].orig_p=n[p],h[p][c+"End"]=i.ends[p],h[p][c+"Start"]=i.starts[p]),t.ids&&(f.id=String(t.ids[p])),0===p&&(h[0].vTotal=0),h[0].vTotal+=d(f.s),f.begR=d(f.s)/d(h[0].s)}for(p=0;p<y;p++)(f=h[p]).s!==b&&(f.sumR=f.s/h[0].vTotal,f.difR=void 0!==g?f.s/g:1,g=f.s);return l(h,t),T(h,t),h}},18517:function($){"use strict";$.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}},8984:function($,R,e){"use strict";var k=e(11661).setGroupPositions;$.exports=function(A,l){var T,b,d=A._fullLayout,s=A._fullData,t=A.calcdata,o=l.xaxis,r=l.yaxis,n=[],i=[],a=[];for(b=0;b<s.length;b++){var c=s[b];!0===c.visible&&c.xaxis===o._id&&c.yaxis===r._id&&"funnel"===c.type&&(T=t[b],"h"===c.orientation?a.push(T):i.push(T),n.push(T))}var f={mode:d.funnelmode,norm:d.funnelnorm,gap:d.funnelgap,groupgap:d.funnelgroupgap};for(k(A,o,r,i,f),k(A,r,o,a,f),b=0;b<n.length;b++){T=n[b];for(var x=0;x<T.length;x++)x+1<T.length&&(T[x].nextP0=T[x+1].p0,T[x].nextS0=T[x+1].s0,T[x].nextP1=T[x+1].p1,T[x].nextS1=T[x+1].s1)}}},26199:function($,R,e){"use strict";var k=e(71828),A=e(26125),l=e(90769).handleText,T=e(67513),b=e(73927),d=e(1285),s=e(7901);$.exports={supplyDefaults:function(t,o,r,n){function i(f,x){return k.coerce(t,o,d,f,x)}if(T(t,o,n,i)){b(t,o,n,i),i("xhoverformat"),i("yhoverformat"),i("orientation",o.y&&!o.x?"v":"h"),i("offset"),i("width");var a=i("text");i("hovertext"),i("hovertemplate");var c=i("textposition");l(t,o,n,i,c,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"===o.textposition||o.texttemplate||i("textinfo",Array.isArray(a)?"text+value":"value");var p=i("marker.color",r);i("marker.line.color",s.defaultLine),i("marker.line.width"),i("connector.visible")&&(i("connector.fillcolor",(x=k.isArrayOrTypedArray(f=p)?"#000":f,s.addOpacity(x,.5*s.opacity(x)))),i("connector.line.width")&&(i("connector.line.color"),i("connector.line.dash")))}else o.visible=!1;var f,x},crossTraceDefaults:function(t,o){var r,n;function i(c){return k.coerce(n._input,n,d,c)}if("group"===o.funnelmode)for(var a=0;a<t.length;a++)r=(n=t[a])._input,A(r,n,o,i)}}},34598:function($){"use strict";$.exports=function(R,e){return R.x="xVal"in e?e.xVal:e.x,R.y="yVal"in e?e.yVal:e.y,"percentInitial"in e&&(R.percentInitial=e.percentInitial),"percentPrevious"in e&&(R.percentPrevious=e.percentPrevious),"percentTotal"in e&&(R.percentTotal=e.percentTotal),e.xa&&(R.xaxis=e.xa),e.ya&&(R.yaxis=e.ya),R}},63341:function($,R,e){"use strict";var k=e(7901).opacity,A=e(95423).hoverOnBars,l=e(71828).formatPercent;$.exports=function(T,b,d,s,t){var y,h,m,w,u,o=A(T,b,d,s,t);if(o){var r=o.cd,n=r[0].trace,a=r[o.index];o[("h"===n.orientation?"x":"y")+"LabelVal"]=a.s,o.percentInitial=a.begR,o.percentInitialLabel=l(a.begR,1),o.percentPrevious=a.difR,o.percentPreviousLabel=l(a.difR,1),o.percentTotal=a.sumR,o.percentTotalLabel=l(a.sumR,1);var c=a.hi||n.hoverinfo,p=[];if(c&&"none"!==c&&"skip"!==c){var f="all"===c,x=c.split("+"),v=function(g){return f||-1!==x.indexOf(g)};v("percent initial")&&p.push(o.percentInitialLabel+" of initial"),v("percent previous")&&p.push(o.percentPreviousLabel+" of previous"),v("percent total")&&p.push(o.percentTotalLabel+" of total")}return o.extraText=p.join("<br>"),o.color=(h=n.marker,w=(y=a).mlc||h.line.color,u=y.mlw||h.line.width,k(m=y.mc||h.color)?m:k(w)&&u?w:void 0),[o]}}},51759:function($,R,e){"use strict";$.exports={attributes:e(1285),layoutAttributes:e(10440),supplyDefaults:e(26199).supplyDefaults,crossTraceDefaults:e(26199).crossTraceDefaults,supplyLayoutDefaults:e(93138),calc:e(9532),crossTraceCalc:e(8984),plot:e(80461),style:e(68266).style,hoverPoints:e(63341),eventData:e(34598),selectPoints:e(81974),moduleType:"trace",name:"funnel",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},10440:function($){"use strict";$.exports={funnelmode:{valType:"enumerated",values:["stack","group","overlay"],dflt:"stack",editType:"calc"},funnelgap:{valType:"number",min:0,max:1,editType:"calc"},funnelgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},93138:function($,R,e){"use strict";var k=e(71828),A=e(10440);$.exports=function(l,T,b){var d=!1;function s(r,n){return k.coerce(l,T,A,r,n)}for(var t=0;t<b.length;t++){var o=b[t];if(o.visible&&"funnel"===o.type){d=!0;break}}d&&(s("funnelmode"),s("funnelgap",.2),s("funnelgroupgap"))}},80461:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(91424),T=e(50606).BADNUM,b=e(17295),d=e(72597).clearMinTextSize;function s(t,o,r,n){var i=[],a=[],c=n?o:r,p=n?r:o;return i[0]=c.c2p(t.s0,!0),a[0]=p.c2p(t.p0,!0),i[1]=c.c2p(t.s1,!0),a[1]=p.c2p(t.p1,!0),i[2]=c.c2p(t.nextS0,!0),a[2]=p.c2p(t.nextP0,!0),i[3]=c.c2p(t.nextS1,!0),a[3]=p.c2p(t.nextP1,!0),n?[i,a]:[a,i]}$.exports=function(t,o,r,n){var a,c,x,v,i=t._fullLayout;d("funnel",i),a=t,x=(c=o).xaxis,v=c.yaxis,A.makeTraceGroups(n,r,"trace bars").each(function(g){var y=k.select(this),h=g[0].trace,m=A.ensureSingle(y,"g","regions");if(h.connector&&h.connector.visible){var w="h"===h.orientation,u=m.selectAll("g.region").data(A.identity);u.enter().append("g").classed("region",!0),u.exit().remove();var S=u.size();u.each(function(_,E){if(E===S-1||_.cNext){var L=s(_,x,v,w),C=L[0],P=L[1],I="";C[0]!==T&&P[0]!==T&&C[1]!==T&&P[1]!==T&&C[2]!==T&&P[2]!==T&&C[3]!==T&&P[3]!==T&&(I+=w?"M"+C[0]+","+P[1]+"L"+C[2]+","+P[2]+"H"+C[3]+"L"+C[1]+","+P[1]+"Z":"M"+C[1]+","+P[1]+"L"+C[2]+","+P[3]+"V"+P[2]+"L"+C[1]+","+P[0]+"Z"),""===I&&(I="M0,0Z"),A.ensureSingle(k.select(this),"path").attr("d",I).call(l.setClipUrl,c.layerClipId,a)}})}else m.remove()}),function(a,c,p,f){var x=c.xaxis,v=c.yaxis;A.makeTraceGroups(f,p,"trace bars").each(function(g){var y=k.select(this),h=g[0].trace,m=A.ensureSingle(y,"g","lines");if(h.connector&&h.connector.visible&&h.connector.line.width){var w="h"===h.orientation,u=m.selectAll("g.line").data(A.identity);u.enter().append("g").classed("line",!0),u.exit().remove();var S=u.size();u.each(function(_,E){if(E===S-1||_.cNext){var L=s(_,x,v,w),C=L[0],P=L[1],I="";void 0!==C[3]&&void 0!==P[3]&&(w?(I+="M"+C[0]+","+P[1]+"L"+C[2]+","+P[2],I+="M"+C[1]+","+P[1]+"L"+C[3]+","+P[2]):(I+="M"+C[1]+","+P[1]+"L"+C[2]+","+P[3],I+="M"+C[1]+","+P[0]+"L"+C[2]+","+P[2])),""===I&&(I="M0,0Z"),A.ensureSingle(k.select(this),"path").attr("d",I).call(l.setClipUrl,c.layerClipId,a)}})}else m.remove()})}(t,o,r,n),b.plot(t,o,r,n,{mode:i.funnelmode,norm:i.funnelmode,gap:i.funnelgap,groupgap:i.funnelgroupgap})}},68266:function($,R,e){"use strict";var k=e(39898),A=e(91424),l=e(7901),T=e(37822).DESELECTDIM,b=e(16688),d=e(72597).resizeText,s=b.styleTextPoints;$.exports={style:function(t,o,r){var n=r||k.select(t).selectAll("g.funnellayer").selectAll("g.trace");d(t,n,"funnel"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=k.select(this),c=i[0].trace;a.selectAll(".point > path").each(function(p){if(!p.isBlank){var f=c.marker;k.select(this).call(l.fill,p.mc||f.color).call(l.stroke,p.mlc||f.line.color).call(A.dashLine,f.line.dash,p.mlw||f.line.width).style("opacity",c.selectedpoints&&!p.selected?T:1)}}),s(a,c,t),a.selectAll(".regions").each(function(){k.select(this).selectAll("path").style("stroke-width",0).call(l.fill,c.connector.fillcolor)}),a.selectAll(".lines").each(function(){var p=c.connector.line;A.lineGroupStyle(k.select(this).selectAll("path"),p.width,p.color,p.dash)})})}}},86807:function($,R,e){"use strict";var k=e(34e3),A=e(9012),l=e(27670).Y,T=e(5386).f,b=e(5386).s,d=e(1426).extendFlat;$.exports={labels:k.labels,label0:k.label0,dlabel:k.dlabel,values:k.values,marker:{colors:k.marker.colors,line:{color:d({},k.marker.line.color,{dflt:null}),width:d({},k.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},text:k.text,hovertext:k.hovertext,scalegroup:d({},k.scalegroup,{}),textinfo:d({},k.textinfo,{flags:["label","text","value","percent"]}),texttemplate:b({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:d({},A.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:T({},{keys:["label","color","value","text","percent"]}),textposition:d({},k.textposition,{values:["inside","none"],dflt:"inside"}),textfont:k.textfont,insidetextfont:k.insidetextfont,title:{text:k.title.text,font:k.title.font,position:d({},k.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:l({name:"funnelarea",trace:!0,editType:"calc"}),aspectratio:{valType:"number",min:0,dflt:1,editType:"plot"},baseratio:{valType:"number",min:0,max:1,dflt:.333,editType:"plot"}}},6452:function($,R,e){"use strict";var k=e(74875);R.name="funnelarea",R.plot=function(A,l,T,b){k.plotBasePlot(R.name,A,l,T,b)},R.clean=function(A,l,T,b){k.cleanBasePlot(R.name,A,l,T,b)}},89574:function($,R,e){"use strict";var k=e(32354);$.exports={calc:function(A,l){return k.calc(A,l)},crossTraceCalc:function(A){k.crossTraceCalc(A,{type:"funnelarea"})}}},86282:function($,R,e){"use strict";var k=e(71828),A=e(86807),l=e(27670).c,T=e(90769).handleText,b=e(37434).handleLabelsAndValues;$.exports=function(d,s,t,o){function r(g,y){return k.coerce(d,s,A,g,y)}var n=r("labels"),i=r("values"),a=b(n,i),c=a.len;if(s._hasLabels=a.hasLabels,s._hasValues=a.hasValues,!s._hasLabels&&s._hasValues&&(r("label0"),r("dlabel")),c){s._length=c,r("marker.line.width")&&r("marker.line.color",o.paper_bgcolor),r("marker.colors"),r("scalegroup");var p,f=r("text"),x=r("texttemplate");if(x||(p=r("textinfo",Array.isArray(f)?"text+percent":"percent")),r("hovertext"),r("hovertemplate"),x||p&&"none"!==p){var v=r("textposition");T(d,s,o,r,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}l(s,o,r),r("title.text")&&(r("title.position"),k.coerceFont(r,"title.font",o.font)),r("aspectratio"),r("baseratio")}else s.visible=!1}},10421:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e(6452),categories:["pie-like","funnelarea","showLegend"],attributes:e(86807),layoutAttributes:e(80097),supplyDefaults:e(86282),supplyLayoutDefaults:e(57402),calc:e(89574).calc,crossTraceCalc:e(89574).crossTraceCalc,plot:e(79187),style:e(71858),styleOne:e(63463),meta:{}}},80097:function($,R,e){"use strict";var k=e(92774).hiddenlabels;$.exports={hiddenlabels:k,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57402:function($,R,e){"use strict";var k=e(71828),A=e(80097);$.exports=function(l,T){function b(d,s){return k.coerce(l,T,A,d,s)}b("hiddenlabels"),b("funnelareacolorway",T.colorway),b("extendfunnelareacolors")}},79187:function($,R,e){"use strict";var k=e(39898),A=e(91424),l=e(71828),T=l.strScale,b=l.strTranslate,d=e(63893),s=e(17295).toMoveInsideBar,t=e(72597),o=t.recordMinTextSize,r=t.clearMinTextSize,n=e(53581),i=e(14575),a=i.attachFxHandlers,c=i.determineInsideTextFont,p=i.layoutAreas,f=i.prerenderTitles,x=i.positionTitleOutside,v=i.formatSliceLabel;function g(y,h){return"l"+(h[0]-y[0])+","+(h[1]-y[1])}$.exports=function(y,h){var m=y._context.staticPlot,w=y._fullLayout;r("funnelarea",w),f(h,y),p(h,w._size),l.makeTraceGroups(w._funnelarealayer,h,"trace").each(function(u){var S=k.select(this),_=u[0],E=_.trace;(function(L){if(L.length){var C=L[0],P=C.trace,I=P.aspectratio,U=P.baseratio;U>.999&&(U=.999);var z,H,F,N=Math.pow(U,2),B=C.vTotal,j=B,J=B*N/(1-N)/B,G=[];for(G.push(ke()),H=L.length-1;H>-1;H--)(F=L[H]).hidden||(J+=F.v/j,G.push(ke()));var W=1/0,X=-1/0;for(H=0;H<G.length;H++)z=G[H],W=Math.min(W,z[1]),X=Math.max(X,z[1]);for(H=0;H<G.length;H++)G[H][1]-=(X+W)/2;var re=C.r,ee=(X-W)/2,ie=re/G[G.length-1][0],oe=re/ee*I;for(C.r=oe*ee,H=0;H<G.length;H++)G[H][0]*=ie,G[H][1]*=oe;var ce,me,de=[-(z=G[0])[0],z[1]],he=[z[0],z[1]],ve=0;for(H=L.length-1;H>-1;H--)if(!(F=L[H]).hidden){var Pe=G[ve+=1][0],xe=G[ve][1];F.TL=[-Pe,xe],F.TR=[Pe,xe],F.BL=de,F.BR=he,F.pxmid=[.5*((ce=F.TR)[0]+(me=F.BR)[0]),.5*(ce[1]+me[1])],de=F.TL,he=F.TR}}function ke(){var Ae,Te={x:Ae=Math.sqrt(J),y:-Ae};return[Te.x,Te.y]}})(u),S.each(function(){var L=k.select(this).selectAll("g.slice").data(u);L.enter().append("g").classed("slice",!0),L.exit().remove(),L.each(function(P,I){if(P.hidden)k.select(this).selectAll("path,g").remove();else{P.pointNumber=P.i,P.curveNumber=E.index;var U=_.cx,z=_.cy,H=k.select(this),F=H.selectAll("path.surface").data([P]);F.enter().append("path").classed("surface",!0).style({"pointer-events":m?"none":"all"}),H.call(a,y,u);var N="M"+(U+P.TR[0])+","+(z+P.TR[1])+g(P.TR,P.BR)+g(P.BR,P.BL)+g(P.BL,P.TL)+"Z";F.attr("d",N),v(y,P,_);var B=n.castOption(E.textposition,P.pts),j=H.selectAll("g.slicetext").data(P.text&&"none"!==B?[0]:[]);j.enter().append("g").classed("slicetext",!0),j.exit().remove(),j.each(function(){var J=l.ensureSingle(k.select(this),"text","",function(ie){ie.attr("data-notex",1)}),G=l.ensureUniformFontSize(y,c(E,P,w.font));J.text(P.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(A.font,G).call(d.convertToTspans,y);var V,W,X,K=A.bBox(J.node()),re=Math.min(P.BL[1],P.BR[1])+z,ee=Math.max(P.TL[1],P.TR[1])+z;W=Math.max(P.TL[0],P.BL[0])+U,X=Math.min(P.TR[0],P.BR[0])+U,(V=s(W,X,re,ee,K,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"})).fontSize=G.size,o(E.type,V,w),u[I].transform=V,l.setTransormAndDisplay(J,V)})}});var C=k.select(this).selectAll("g.titletext").data(E.title.text?[0]:[]);C.enter().append("g").classed("titletext",!0),C.exit().remove(),C.each(function(){var P=l.ensureSingle(k.select(this),"text","",function(z){z.attr("data-notex",1)}),I=E.title.text;E._meta&&(I=l.templateString(I,E._meta)),P.text(I).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(A.font,E.title.font).call(d.convertToTspans,y);var U=x(_,w._size);P.attr("transform",b(U.x,U.y)+T(Math.min(1,U.scale))+b(U.tx,U.ty))})})})}},71858:function($,R,e){"use strict";var k=e(39898),A=e(63463),l=e(72597).resizeText;$.exports=function(T){var b=T._fullLayout._funnelarealayer.selectAll(".trace");l(T,b,"funnelarea"),b.each(function(d){var s=d[0].trace,t=k.select(this);t.style({opacity:s.opacity}),t.selectAll("path.surface").each(function(o){k.select(this).call(A,o,s)})})}},21606:function($,R,e){"use strict";var k=e(82196),A=e(9012),l=e(41940),T=e(12663).axisHoverFormat,b=e(5386).f,d=e(5386).s,s=e(50693),t=e(1426).extendFlat;$.exports=t({z:{valType:"data_array",editType:"calc"},x:t({},k.x,{impliedEdits:{xtype:"array"}}),x0:t({},k.x0,{impliedEdits:{xtype:"scaled"}}),dx:t({},k.dx,{impliedEdits:{xtype:"scaled"}}),y:t({},k.y,{impliedEdits:{ytype:"array"}}),y0:t({},k.y0,{impliedEdits:{ytype:"scaled"}}),dy:t({},k.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:t({},k.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:t({},k.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:t({},k.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:t({},k.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:t({},k.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:t({},k.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:T("x"),yhoverformat:T("y"),zhoverformat:T("z",1),hovertemplate:b(),texttemplate:d({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:l({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:t({},A.showlegend,{dflt:!1})},{transforms:void 0},s("",{cLetter:"z",autoColorDflt:!1}))},90757:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(89298),T=e(42973),b=e(17562),d=e(78803),s=e(68296),t=e(4742),o=e(824),r=e(43907),n=e(70769),i=e(50606).BADNUM;function a(c){for(var p=[],f=c.length,x=0;x<f;x++){var v=c[x];v!==i&&p.push(v)}return p}$.exports=function(c,p){var f,x,v,g,y,h,m,w,u,S,_,E=l.getFromId(c,p.xaxis||"x"),L=l.getFromId(c,p.yaxis||"y"),C=k.traceIs(p,"contour"),P=k.traceIs(p,"histogram"),I=k.traceIs(p,"gl2d"),U=C?"best":p.zsmooth;if(E._minDtick=0,L._minDtick=0,P)g=(_=b(c,p)).orig_x,f=_.x,x=_.x0,v=_.dx,w=_.orig_y,y=_.y,h=_.y0,m=_.dy,u=_.z;else{var z=p.z;A.isArray1D(z)?(s(p,E,L,"x","y",["z"]),f=p._x,y=p._y,z=p._z):(g=p.x?E.makeCalcdata(p,"x"):[],w=p.y?L.makeCalcdata(p,"y"):[],f=T(p,E,"x",g).vals,y=T(p,L,"y",w).vals,p._x=f,p._y=y),x=p.x0,v=p.dx,h=p.y0,m=p.dy,u=t(z,p,E,L)}function H(ee){U=p._input.zsmooth=p.zsmooth=!1,A.warn('cannot use zsmooth: "fast": '+ee)}if((E.rangebreaks||L.rangebreaks)&&(u=function(ee,ie,oe){for(var ce=[],me=-1,de=0;de<oe.length;de++)if(ie[de]!==i){ce[++me]=[];for(var he=0;he<oe[de].length;he++)ee[he]!==i&&ce[me].push(oe[de][he])}return ce}(f,y,u),P||(f=a(f),y=a(y),p._x=f,p._y=y)),P||!C&&!p.connectgaps||(p._emptypoints=r(u),o(u,p._emptypoints)),"fast"===U)if("log"===E.type||"log"===L.type)H("log axis found");else if(!P){if(f.length){var F=(f[f.length-1]-f[0])/(f.length-1),N=Math.abs(F/100);for(S=0;S<f.length-1;S++)if(Math.abs(f[S+1]-f[S]-F)>N){H("x scale is not linear");break}}if(y.length&&"fast"===U){var B=(y[y.length-1]-y[0])/(y.length-1),j=Math.abs(B/100);for(S=0;S<y.length-1;S++)if(Math.abs(y[S+1]-y[S]-B)>j){H("y scale is not linear");break}}}var J=A.maxRowLength(u),G="scaled"===p.xtype?"":f,V=n(p,G,x,v,J,E),W="scaled"===p.ytype?"":y,X=n(p,W,h,m,u.length,L);I||(p._extremes[E._id]=l.findExtremes(E,V),p._extremes[L._id]=l.findExtremes(L,X));var K={x:V,y:X,z:u,text:p._text||p.text,hovertext:p._hovertext||p.hovertext};if(p.xperiodalignment&&g&&(K.orig_x=g),p.yperiodalignment&&w&&(K.orig_y=w),G&&G.length===V.length-1&&(K.xCenter=G),W&&W.length===X.length-1&&(K.yCenter=W),P&&(K.xRanges=_.xRanges,K.yRanges=_.yRanges,K.pts=_.pts),C||d(c,p,{vals:u,cLetter:"z"}),C&&p.contours&&"heatmap"===p.contours.coloring){var re={type:"contour"===p.type?"heatmap":"histogram2d",xcalendar:p.xcalendar,ycalendar:p.ycalendar};K.xfill=n(re,G,x,v,J,E),K.yfill=n(re,W,h,m,u.length,L)}return[K]}},4742:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(50606).BADNUM;$.exports=function(T,b,d,s){var t,o,r,n,i,a;function c(y){if(k(y))return+y}if(b&&b.transpose){for(t=0,i=0;i<T.length;i++)t=Math.max(t,T[i].length);if(0===t)return!1;r=function(y){return y.length},n=function(y,h,m){return(y[m]||[])[h]}}else t=T.length,r=function(y,h){return y[h].length},n=function(y,h,m){return(y[h]||[])[m]};function f(y){if(b&&"carpet"!==b.type&&"contourcarpet"!==b.type&&y&&"category"===y.type&&b["_"+y._id.charAt(0)].length){var h=y._id.charAt(0),m={},w=b["_"+h+"CategoryMap"]||b[h];for(i=0;i<w.length;i++)m[w[i]]=i;return function(u){var S=m[y._categories[u]];return S+1?S:l}}return A.identity}var x=f(d),v=f(s);s&&"category"===s.type&&(t=s._categories.length);var y,h,m,g=new Array(t);for(i=0;i<t;i++)for(o=d&&"category"===d.type?d._categories.length:r(T,i),g[i]=new Array(o),a=0;a<o;a++)g[i][a]=c((y=T,h=v(i),m=x(a),h===l||m===l?l:n(y,h,m)));return g}},61243:function($){"use strict";$.exports={min:"zmin",max:"zmax"}},68296:function($,R,e){"use strict";var k=e(71828),A=e(50606).BADNUM,l=e(42973);$.exports=function(T,b,d,s,t,o){var r=T._length,n=b.makeCalcdata(T,s),i=d.makeCalcdata(T,t);n=l(T,b,s,n).vals,i=l(T,d,t,i).vals;var a,c,p,f,x=T.text,v=void 0!==x&&k.isArray1D(x),g=T.hovertext,y=void 0!==g&&k.isArray1D(g),h=k.distinctVals(n),m=h.vals,w=k.distinctVals(i),u=w.vals,S=[],_=u.length,E=m.length;for(a=0;a<o.length;a++)S[a]=k.init2dArray(_,E);v&&(p=k.init2dArray(_,E)),y&&(f=k.init2dArray(_,E));var L=k.init2dArray(_,E);for(a=0;a<r;a++)if(n[a]!==A&&i[a]!==A){var C=k.findBin(n[a]+h.minDiff/2,m),P=k.findBin(i[a]+w.minDiff/2,u);for(c=0;c<o.length;c++)S[c][P][C]=T[o[c]][a],L[P][C]=a;v&&(p[P][C]=x[a]),y&&(f[P][C]=g[a])}for(T["_"+s]=m,T["_"+t]=u,c=0;c<o.length;c++)T["_"+o[c]]=S[c];v&&(T._text=p),y&&(T._hovertext=f),b&&"category"===b.type&&(T["_"+s+"CategoryMap"]=m.map(function(U){return b._categories[U]})),d&&"category"===d.type&&(T["_"+t+"CategoryMap"]=u.map(function(U){return d._categories[U]})),T._after2before=L}},76382:function($,R,e){"use strict";var k=e(71828),A=e(67684),l=e(58623),T=e(73927),b=e(49901),d=e(1586),s=e(21606);$.exports=function(t,o,r,n){function i(a,c){return k.coerce(t,o,s,a,c)}A(t,o,i,n)?(T(t,o,n,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hovertemplate"),l(i,n),b(t,o,i,n),i("hoverongaps"),i("connectgaps",k.isArray1D(o.z)&&!1!==o.zsmooth),d(t,o,n,i,{prefix:"",cLetter:"z"})):o.visible=!1}},43907:function($,R,e){"use strict";var k=e(71828).maxRowLength;$.exports=function(A){var l,T,b,d,s,t,o,r,n=[],i={},a=[],c=A[0],p=[],f=[0,0,0],x=k(A);for(T=0;T<A.length;T++)for(l=p,p=c,c=A[T+1]||[],b=0;b<x;b++)void 0===p[b]&&((t=(void 0!==p[b-1]?1:0)+(void 0!==p[b+1]?1:0)+(void 0!==l[b]?1:0)+(void 0!==c[b]?1:0))?(0===T&&t++,0===b&&t++,T===A.length-1&&t++,b===p.length-1&&t++,t<4&&(i[[T,b]]=[T,b,t]),n.push([T,b,t])):a.push([T,b]));for(;a.length;){for(o={},r=!1,s=a.length-1;s>=0;s--)(t=((i[[(T=(d=a[s])[0])-1,b=d[1]]]||f)[2]+(i[[T+1,b]]||f)[2]+(i[[T,b-1]]||f)[2]+(i[[T,b+1]]||f)[2])/20)&&(o[d]=[T,b,t],a.splice(s,1),r=!0);if(!r)throw"findEmpties iterated with no new neighbors";for(d in o)i[d]=o[d],n.push(o[d])}return n.sort(function(v,g){return g[2]-v[2]})}},46248:function($,R,e){"use strict";var k=e(30211),A=e(71828),l=e(89298),T=e(21081).extractOpts;$.exports=function(b,d,s,t,o){o||(o={});var r,n,i,a,c=o.isContour,p=b.cd[0],f=p.trace,x=b.xa,v=b.ya,g=p.x,y=p.y,h=p.z,m=p.xCenter,w=p.yCenter,u=p.zmask,S=f.zhoverformat,_=g,E=y;if(!1!==b.index){try{i=Math.round(b.index[1]),a=Math.round(b.index[0])}catch{return void A.error("Error hovering on heatmap, pointNumber must be [row,col], found:",b.index)}if(i<0||i>=h[0].length||a<0||a>h.length)return}else{if(k.inbox(d-g[0],d-g[g.length-1],0)>0||k.inbox(s-y[0],s-y[y.length-1],0)>0)return;if(c){var L;for(_=[2*g[0]-g[1]],L=1;L<g.length;L++)_.push((g[L]+g[L-1])/2);for(_.push([2*g[g.length-1]-g[g.length-2]]),E=[2*y[0]-y[1]],L=1;L<y.length;L++)E.push((y[L]+y[L-1])/2);E.push([2*y[y.length-1]-y[y.length-2]])}i=Math.max(0,Math.min(_.length-2,A.findBin(d,_))),a=Math.max(0,Math.min(E.length-2,A.findBin(s,E)))}var C,P,I=x.c2p(g[i]),U=x.c2p(g[i+1]),z=v.c2p(y[a]),H=v.c2p(y[a+1]);c?(U=I,r=(C=p.orig_x||g)[i],H=z,n=(P=p.orig_y||y)[a]):(C=p.orig_x||m||g,P=p.orig_y||w||y,r=m?C[i]:(C[i]+C[i+1])/2,n=w?P[a]:(P[a]+P[a+1])/2,x&&"category"===x.type&&(r=g[i]),v&&"category"===v.type&&(n=y[a]),f.zsmooth&&(I=U=x.c2p(r),z=H=v.c2p(n)));var F=h[a][i];if(u&&!u[a][i]&&(F=void 0),void 0!==F||f.hoverongaps){var N;Array.isArray(p.hovertext)&&Array.isArray(p.hovertext[a])?N=p.hovertext[a][i]:Array.isArray(p.text)&&Array.isArray(p.text[a])&&(N=p.text[a][i]);var B=T(f),J=l.tickText({type:"linear",range:[B.min,B.max],hoverformat:S,_separators:x._separators,_numFormat:x._numFormat},F,"hover").text;return[A.extendFlat(b,{index:f._after2before?f._after2before[a][i]:[a,i],distance:b.maxHoverDistance,spikeDistance:b.maxSpikeDistance,x0:I,x1:U,y0:z,y1:H,xLabelVal:r,yLabelVal:n,zLabelVal:F,zLabel:J,text:N})]}}},92165:function($,R,e){"use strict";$.exports={attributes:e(21606),supplyDefaults:e(76382),calc:e(90757),plot:e(50347),colorbar:e(61243),style:e(70035),hoverPoints:e(46248),moduleType:"trace",name:"heatmap",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}},824:function($,R,e){"use strict";var k=e(71828),A=[[-1,0],[1,0],[0,-1],[0,1]];function l(b){return.5-.25*Math.min(1,.5*b)}function T(b,d,s){var t,o,r,n,i,a,c,p,f,x,v,g,y,h=0;for(n=0;n<d.length;n++){for(v=b[o=(t=d[n])[0]][r=t[1]],x=0,f=0,i=0;i<4;i++)(c=b[o+(a=A[i])[0]])&&void 0!==(p=c[r+a[1]])&&(0===x?g=y=p:(g=Math.min(g,p),y=Math.max(y,p)),f++,x+=p);if(0===f)throw"iterateInterp2d order is wrong: no defined neighbors";b[o][r]=x/f,void 0===v?f<4&&(h=1):(b[o][r]=(1+s)*b[o][r]-s*v,y>g&&(h=Math.max(h,Math.abs(b[o][r]-v)/(y-g))))}return h}$.exports=function(b,d){var s,t=1;for(T(b,d),s=0;s<d.length&&!(d[s][2]<4);s++);for(d=d.slice(s),s=0;s<100&&t>.01;s++)t=T(b,d,l(t));return t>.01&&k.log("interp2d didn't converge quickly",t),b}},58623:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l){A("texttemplate");var T=k.extendFlat({},l.font,{color:"auto",size:"auto"});k.coerceFont(A,"textfont",T)}},70769:function($,R,e){"use strict";var k=e(73972),A=e(71828).isArrayOrTypedArray;$.exports=function(l,T,b,d,s,t){var o,r,n,i=[],a=k.traceIs(l,"contour"),c=k.traceIs(l,"histogram"),p=k.traceIs(l,"gl2d");if(A(T)&&T.length>1&&!c&&"category"!==t.type){var f=T.length;if(!(f<=s))return T.slice(0,a?s:s+1);if(a||p)i=T.slice(0,s);else if(1===s)i=[T[0]-.5,T[0]+.5];else{for(i=[1.5*T[0]-.5*T[1]],n=1;n<f;n++)i.push(.5*(T[n-1]+T[n]));i.push(1.5*T[f-1]-.5*T[f-2])}if(f<s){var x=i[i.length-1],v=x-i[i.length-2];for(n=f;n<s;n++)i.push(x+=v)}}else{var g=l[t._id.charAt(0)+"calendar"];for(o=c?t.r2c(b,0,g):A(T)&&1===T.length?T[0]:void 0===b?0:("log"===t.type?t.d2c:t.r2c)(b,0,g),r=d||1,n=a||p?0:-.5;n<s;n++)i.push(o+r*n)}return i}},50347:function($,R,e){"use strict";var k=e(39898),A=e(84267),l=e(73972),T=e(91424),b=e(89298),d=e(71828),s=e(63893),t=e(8225),o=e(7901),r=e(21081).extractOpts,n=e(21081).makeColorScaleFuncFromTrace,i=e(77922),a=e(18783).LINE_SPACING,c="heatmap-label";function p(y){return y.selectAll("g."+c)}function f(y){p(y).remove()}function x(y,h){var m=h.length-2,w=d.constrain(d.findBin(y,h),0,m),u=h[w],_=d.constrain(w+(y-u)/(h[w+1]-u)-.5,0,m),E=Math.round(_),L=Math.abs(_-E);return _&&_!==m&&L?{bin0:E,frac:L,bin1:Math.round(E+L/(_-E))}:{bin0:E,bin1:E,frac:0}}function v(y,h){var m=h.length-1,w=d.constrain(d.findBin(y,h),0,m),u=h[w],S=(y-u)/(h[w+1]-u)||0;return S<=0?{bin0:w,bin1:w,frac:0}:S<.5?{bin0:w,bin1:w+1,frac:S}:{bin0:w+1,bin1:w,frac:1-S}}function g(y,h,m){y[h]=m[0],y[h+1]=m[1],y[h+2]=m[2],y[h+3]=Math.round(255*m[3])}$.exports=function(y,h,m,w){var u=h.xaxis,S=h.yaxis;d.makeTraceGroups(w,m,"hm").each(function(_){var E,L,C,P,I,U,z,H,F=k.select(this),N=_[0],B=N.trace,j=B.xgap||0,J=B.ygap||0,G=N.z,V=N.x,W=N.y,X=N.xCenter,K=N.yCenter,re=l.traceIs(B,"contour"),ee=re?"best":B.zsmooth,ie=G.length,oe=d.maxRowLength(G),ce=!1,me=!1;for(U=0;void 0===E&&U<V.length-1;)E=u.c2p(V[U]),U++;for(U=V.length-1;void 0===L&&U>0;)L=u.c2p(V[U]),U--;for(L<E&&(C=L,L=E,E=C,ce=!0),U=0;void 0===P&&U<W.length-1;)P=S.c2p(W[U]),U++;for(U=W.length-1;void 0===I&&U>0;)I=S.c2p(W[U]),U--;if(I<P&&(C=P,P=I,I=C,me=!0),re&&(X=V,K=W,V=N.xfill,W=N.yfill),"fast"!==ee){var de="best"===ee?0:.5;E=Math.max(-de*u._length,E),L=Math.min((1+de)*u._length,L),P=Math.max(-de*S._length,P),I=Math.min((1+de)*S._length,I)}var he,ve,Pe=Math.round(L-E),xe=Math.round(I-P);if(Pe<=0||xe<=0)return F.selectAll("image").data([]).exit().remove(),void f(F);"fast"===ee?(he=oe,ve=ie):(he=Pe,ve=xe);var ke=document.createElement("canvas");ke.width=he,ke.height=ve;var Ae,Te,Q=ke.getContext("2d"),se=n(B,{noNumericCheck:!0,returnArray:!0});"fast"===ee?(Ae=ce?function(Zn){return oe-1-Zn}:d.identity,Te=me?function(Zn){return ie-1-Zn}:d.identity):(Ae=function(Zn){return d.constrain(Math.round(u.c2p(V[Zn])-E),0,Pe)},Te=function(Zn){return d.constrain(Math.round(S.c2p(W[Zn])-P),0,xe)});var fe,ye,Me,Ie,Ce=Te(0),Re=[Ce,Ce],le=ce?0:1,ge=me?0:1,_e=0,Fe=0,Ve=0,He=0;function nt(Zn,qn){if(void 0!==Zn){var ur=se(Zn);return ur[0]=Math.round(ur[0]),ur[1]=Math.round(ur[1]),ur[2]=Math.round(ur[2]),_e+=qn,Fe+=ur[0]*qn,Ve+=ur[1]*qn,He+=ur[2]*qn,ur}return[0,0,0,0]}function tt(Zn,qn,ur,Zt){var nn=Zn[ur.bin0];if(void 0===nn)return nt(void 0,1);var _n=Zn[ur.bin1],Cn=qn[ur.bin0],Un=qn[ur.bin1];return nt(nn+ur.frac*(_n-nn||0)+Zt.frac*((Cn-nn||0)+ur.frac*(void 0===_n?void 0===Un?0:void 0===Cn?2*(Un-nn):2*(2*Un-Cn-nn)/3:void 0===Un?void 0===Cn?0:2*(2*nn-_n-Cn)/3:void 0===Cn?2*(2*Un-_n-nn)/3:Un+nn-_n-Cn)))}if(ee){var ot,dt=0;try{ot=new Uint8Array(Pe*xe*4)}catch{ot=new Array(Pe*xe*4)}if("best"===ee){var kt,mt,wt,Lt=X||V,Ct=K||W,It=new Array(Lt.length),Ut=new Array(Ct.length),Rt=new Array(Pe),Ge=X?v:x,We=K?v:x;for(U=0;U<Lt.length;U++)It[U]=Math.round(u.c2p(Lt[U])-E);for(U=0;U<Ct.length;U++)Ut[U]=Math.round(S.c2p(Ct[U])-P);for(U=0;U<Pe;U++)Rt[U]=Ge(U,It);for(z=0;z<xe;z++)for(mt=G[(kt=We(z,Ut)).bin0],wt=G[kt.bin1],U=0;U<Pe;U++,dt+=4)g(ot,dt,Ie=tt(mt,wt,Rt[U],kt))}else for(z=0;z<ie;z++)for(Me=G[z],Re=Te(z),U=0;U<Pe;U++)Ie=nt(Me[U],1),g(ot,dt=4*(Re*Pe+Ae(U)),Ie);var Be=Q.createImageData(Pe,xe);try{Be.data.set(ot)}catch{var Ye=Be.data,rt=Ye.length;for(z=0;z<rt;z++)Ye[z]=ot[z]}Q.putImageData(Be,0,0)}else{var Se=Math.floor(j/2),ze=Math.floor(J/2);for(z=0;z<ie;z++)if(Me=G[z],Re.reverse(),Re[ge]=Te(z+1),Re[0]!==Re[1]&&void 0!==Re[0]&&void 0!==Re[1])for(fe=[ye=Ae(0),ye],U=0;U<oe;U++)fe.reverse(),fe[le]=Ae(U+1),fe[0]!==fe[1]&&void 0!==fe[0]&&void 0!==fe[1]&&(Ie=nt(Me[U],(fe[1]-fe[0])*(Re[1]-Re[0])),Q.fillStyle="rgba("+Ie.join(",")+")",Q.fillRect(fe[0]+Se,Re[0]+ze,fe[1]-fe[0]-j,Re[1]-Re[0]-J))}Fe=Math.round(Fe/_e),Ve=Math.round(Ve/_e),He=Math.round(He/_e);var Ke=A("rgb("+Fe+","+Ve+","+He+")");y._hmpixcount=(y._hmpixcount||0)+_e,y._hmlumcount=(y._hmlumcount||0)+_e*Ke.getLuminance();var st=F.selectAll("image").data(_);st.enter().append("svg:image").attr({xmlns:i.svg,preserveAspectRatio:"none"}),st.attr({height:xe,width:Pe,x:E,y:P,"xlink:href":ke.toDataURL("image/png")}),f(F);var ct=B.texttemplate;if(ct){var Tt=r(B),Et={type:"linear",range:[Tt.min,Tt.max],_separators:u._separators,_numFormat:u._numFormat},At="histogram2dcontour"===B.type,ht="contour"===B.type,pt=ht?ie-1:ie,gt=ht?1:0,Pt=ht?oe-1:oe,Ot=[];for(U=ht?1:0;U<pt;U++){var Ht;if(ht)Ht=N.y[U];else if(At){if(0===U||U===ie-1)continue;Ht=N.y[U]}else if(N.yCenter)Ht=N.yCenter[U];else{if(U+1===ie&&void 0===N.y[U+1])continue;Ht=(N.y[U]+N.y[U+1])/2}var jt=Math.round(S.c2p(Ht));if(!(0>jt||jt>S._length))for(z=gt;z<Pt;z++){var Nt;if(ht)Nt=N.x[z];else if(At){if(0===z||z===oe-1)continue;Nt=N.x[z]}else if(N.xCenter)Nt=N.xCenter[z];else{if(z+1===oe&&void 0===N.x[z+1])continue;Nt=(N.x[z]+N.x[z+1])/2}var Gt=Math.round(u.c2p(Nt));if(!(0>Gt||Gt>u._length)){var un=t({x:Nt,y:Ht},B,y._fullLayout);un.x=Nt,un.y=Ht;var pn=N.z[U][z];void 0===pn?(un.z="",un.zLabel=""):(un.z=pn,un.zLabel=b.tickText(Et,pn,"hover").text);var Kt=N.text&&N.text[U]&&N.text[U][z];void 0!==Kt&&!1!==Kt||(Kt=""),un.text=Kt;var wn=d.texttemplateString(ct,un,y._fullLayout._d3locale,un,B._meta||{});if(wn){var Bn=wn.split("<br>"),vn=Bn.length,cn=0;for(H=0;H<vn;H++)cn=Math.max(cn,Bn[H].length);Ot.push({l:vn,c:cn,t:wn,x:Gt,y:jt,z:pn})}}}}var dn=B.textfont,sn=dn.family,hn=dn.size,En=y._fullLayout.font.size;if(!hn||"auto"===hn){var Mn=1/0,Rn=1/0,Nn=0,Fn=0;for(H=0;H<Ot.length;H++){var rr=Ot[H];if(Nn=Math.max(Nn,rr.l),Fn=Math.max(Fn,rr.c),H<Ot.length-1){var $n=Ot[H+1],mr=Math.abs($n.x-rr.x),fr=Math.abs($n.y-rr.y);mr&&(Mn=Math.min(Mn,mr)),fr&&(Rn=Math.min(Rn,fr))}}isFinite(Mn)&&isFinite(Rn)?(Mn-=j,Rn-=J,Mn/=Fn,Rn/=Nn,Mn/=a/2,Rn/=a,hn=Math.min(Math.floor(Mn),Math.floor(Rn),En)):hn=En}if(hn<=0||!isFinite(hn))return;p(F).data(Ot).enter().append("g").classed(c,1).append("text").attr("text-anchor","middle").each(function(Zn){var Zt,qn=k.select(this),ur=dn.color;ur&&"auto"!==ur||(ur=o.contrast("rgba("+se(Zn.z).join()+")")),qn.attr("data-notex",1).call(s.positionText,(Zt=Zn,Zt.x),function(Zt){return Zt.y-hn*(Zt.l*a/2-1)}(Zn)).call(T.font,sn,hn,ur).text(Zn.t).call(s.convertToTspans,y)})}})}},70035:function($,R,e){"use strict";var k=e(39898);$.exports=function(A){k.select(A).selectAll(".hm image").style("opacity",function(l){return l.trace.opacity})}},49901:function($){"use strict";$.exports=function(R,e,k){!1===k("zsmooth")&&(k("xgap"),k("ygap")),k("zhoverformat")}},67684:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(73972);function T(b,d){var s=d(b);return"scaled"===(s?d(b+"type","array"):"scaled")&&(d(b+"0"),d("d"+b)),s}$.exports=function(b,d,s,t,o,r){var n,i,a=s("z");if(o=o||"x",r=r||"y",void 0===a||!a.length)return 0;if(A.isArray1D(b.z)){n=s(o),i=s(r);var c=A.minRowLength(n),p=A.minRowLength(i);if(0===c||0===p)return 0;d._length=Math.min(c,p,a.length)}else{if(n=T(o,s),i=T(r,s),!function(f){for(var x,v=!0,g=!1,y=!1,h=0;h<f.length;h++){if(!A.isArrayOrTypedArray(x=f[h])){v=!1;break}x.length>0&&(g=!0);for(var m=0;m<x.length;m++)if(k(x[m])){y=!0;break}}return v&&g&&y}(a))return 0;s("transpose"),d._length=null}return"heatmapgl"===b.type||l.getComponentMethod("calendars","handleTraceDefaults")(b,d,[o,r],t),!0}},16063:function($,R,e){"use strict";for(var k=e(21606),A=e(50693),l=e(1426).extendFlat,T=e(30962).overrideAll,b=["z","x","x0","dx","y","y0","dy","text","transpose","xtype","ytype"],d={},s=0;s<b.length;s++){var t=b[s];d[t]=k[t]}d.zsmooth={valType:"enumerated",values:["fast",!1],dflt:"fast",editType:"calc"},l(d,A("",{cLetter:"z",autoColorDflt:!1})),$.exports=T(d,"calc","nested")},59560:function($,R,e){"use strict";var k=e(9330).gl_heatmap2d,A=e(89298),l=e(78614);function T(d,s){this.scene=d,this.uid=s,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=k(d.glplot,this.options),this.heatmap._trace=this}var b=T.prototype;b.handlePick=function(d){var s=this.options,t=s.shape,o=d.pointId,r=o%t[0],n=Math.floor(o/t[0]);return{trace:this,dataCoord:d.dataCoord,traceCoord:[s.x[r],s.y[n],s.z[o]],textLabel:this.textLabels[o],name:this.name,pointIndex:[n,r],hoverinfo:this.hoverinfo}},b.update=function(d,s){var t=s[0];this.index=d.index,this.name=d.name,this.hoverinfo=d.hoverinfo;var o=t.z;this.options.z=[].concat.apply([],o),this.options.shape=[o[0].length,o.length],this.options.x=t.x,this.options.y=t.y,this.options.zsmooth=d.zsmooth;var i=function(x){for(var v=x.colorscale,g=x.zmin,y=x.zmax,h=v.length,m=new Array(h),w=new Array(4*h),u=0;u<h;u++){var S=v[u],_=l(S[1]);m[u]=g+S[0]*(y-g);for(var E=0;E<4;E++)w[4*u+E]=_[E]}return{colorLevels:m,colorValues:w}}(d);this.options.colorLevels=i.colorLevels,this.options.colorValues=i.colorValues,this.textLabels=[].concat.apply([],d.text),this.heatmap.update(this.options);var a,c,p=this.scene.xaxis,f=this.scene.yaxis;!1===d.zsmooth&&(a={ppad:t.x[1]-t.x[0]},c={ppad:t.y[1]-t.y[0]}),d._extremes[p._id]=A.findExtremes(p,t.x,a),d._extremes[f._id]=A.findExtremes(f,t.y,c)},b.dispose=function(){this.heatmap.dispose()},$.exports=function(d,s,t){var o=new T(d,s.uid);return o.update(s,t),o}},19600:function($,R,e){"use strict";var k=e(71828),A=e(67684),l=e(1586),T=e(16063);$.exports=function(b,d,s,t){function o(r,n){return k.coerce(b,d,T,r,n)}A(b,d,o,t)?(o("text"),o("zsmooth"),l(b,d,t,o,{prefix:"",cLetter:"z"})):d.visible=!1}},3325:function($,R,e){"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(" "),$.exports={attributes:e(16063),supplyDefaults:e(19600),colorbar:e(61243),calc:e(90757),plot:e(59560),moduleType:"trace",name:"heatmapgl",basePlotModule:e(4796),categories:["gl","gl2d","2dMap"],meta:{}}},7745:function($,R,e){"use strict";var k=e(1486),A=e(12663).axisHoverFormat,l=e(5386).f,T=e(5386).s,b=e(41940),d=e(17656),s=e(72406),t=e(1426).extendFlat;$.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:A("x"),yhoverformat:A("y"),text:t({},k.text,{}),hovertext:t({},k.hovertext,{}),orientation:k.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:d("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:d("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:l({},{keys:s.eventDataKeys}),texttemplate:T({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),textposition:t({},k.textposition,{arrayOk:!1}),textfont:b({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:b({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:b({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:k.insidetextanchor,textangle:k.textangle,cliponaxis:k.cliponaxis,constraintext:k.constraintext,marker:k.marker,offsetgroup:k.offsetgroup,alignmentgroup:k.alignmentgroup,selected:k.selected,unselected:k.unselected,_deprecated:{bardir:k._deprecated.bardir}}},42174:function($){"use strict";$.exports=function(R,e){for(var k=R.length,A=0,l=0;l<k;l++)e[l]?(R[l]/=e[l],A+=R[l]):R[l]=null;return A}},17656:function($){"use strict";$.exports=function(R,e){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}},59575:function($,R,e){"use strict";var k=e(92770);$.exports={count:function(A,l,T){return T[A]++,1},sum:function(A,l,T,b){var d=b[l];return k(d)?(d=Number(d),T[A]+=d,d):0},avg:function(A,l,T,b,d){var s=b[l];return k(s)&&(s=Number(s),T[A]+=s,d[A]++),0},min:function(A,l,T,b){var d=b[l];if(k(d)){if(d=Number(d),!k(T[A]))return T[A]=d,d;if(T[A]>d){var s=d-T[A];return T[A]=d,s}}return 0},max:function(A,l,T,b){var d=b[l];if(k(d)){if(d=Number(d),!k(T[A]))return T[A]=d,d;if(T[A]<d){var s=d-T[A];return T[A]=d,s}}return 0}}},40965:function($,R,e){"use strict";var k=e(50606),A=k.ONEAVGYEAR,l=k.ONEAVGMONTH,T=k.ONEDAY,b=k.ONEHOUR,d=k.ONEMIN,s=k.ONESEC,t=e(89298).tickIncrement;function o(a,c,p,f){if(a*c<=0)return 1/0;for(var x=Math.abs(c-a),v="date"===p.type,g=r(x,v),y=0;y<10;y++){var h=r(80*g,v);if(g===h||!n(h,a,c,v,p,f))break;g=h}return g}function r(a,c){return c&&a>s?a>T?a>1.1*A?A:a>1.1*l?l:T:a>b?b:a>d?d:s:Math.pow(10,Math.floor(Math.log(a)/Math.LN10))}function n(a,c,p,f,x,v){if(f&&a>T){var g=i(c,x,v),y=i(p,x,v),h=a===A?0:1;return g[h]!==y[h]}return Math.floor(p/a)-Math.floor(c/a)>.1}function i(a,c,p){var f=c.c2d(a,A,p).split("-");return""===f[0]&&(f.unshift(),f[0]="-"+f[0]),f}$.exports=function(a,c,p,f,x){var v,g,y=-1.1*c,h=-.1*c,m=a-h,w=p[0],u=p[1],S=Math.min(o(w+h,w+m,f,x),o(u+h,u+m,f,x)),_=Math.min(o(w+y,w+h,f,x),o(u+y,u+h,f,x));if(S>_&&_<Math.abs(u-w)/4e3?(v=S,g=!1):(v=Math.min(S,_),g=!0),"date"===f.type&&v>T){var E=v===A?1:6,L=v===A?"M12":"M1";return function(C,P){var I=f.c2d(C,A,x),U=I.indexOf("-",E);U>0&&(I=I.substr(0,U));var z=f.d2c(I,0,x);if(z<C){var H=t(z,L,!1,x);(z+H)/2<C+a&&(z=H)}return P&&g?t(z,L,!0,x):z}}return function(C,P){var I=v*Math.round(C/v);return I+v/10<C&&I+.9*v<C+a&&(I+=v),P&&g&&(I-=v),I}}},72138:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(73972),T=e(89298),b=e(75341),d=e(59575),s=e(36362),t=e(42174),o=e(40965);function r(n,i,a,c,p){var f,x,v,g,y,h,m,w=c+"bins",u=n._fullLayout,_=u._histogramBinOpts[i["_"+c+"bingroup"]],E="overlay"===u.barmode,L=function(he){return a.r2c(he,0,g)},C=function(he){return a.c2r(he,0,g)},P="date"===a.type?function(he){return he||0===he?A.cleanDate(he,null,g):null}:function(he){return k(he)?Number(he):null};function I(he,ve,Pe){ve[he+"Found"]?(ve[he]=P(ve[he]),null===ve[he]&&(ve[he]=Pe[he])):(h[he]=ve[he]=Pe[he],A.nestedProperty(x[0],w+"."+he).set(Pe[he]))}if(i["_"+c+"autoBinFinished"])delete i["_"+c+"autoBinFinished"];else{x=_.traces;var U=[],z=!0,H=!1,F=!1;for(f=0;f<x.length;f++)if((v=x[f]).visible){var N=_.dirs[f];y=v["_"+N+"pos0"]=a.makeCalcdata(v,N),U=A.concat(U,y),delete v["_"+c+"autoBinFinished"],!0===i.visible&&(z?z=!1:(delete v._autoBin,v["_"+c+"autoBinFinished"]=1),l.traceIs(v,"2dMap")&&(H=!0),"histogram2dcontour"===v.type&&(F=!0))}var B=T.autoBin(U,a,_.nbins,H,g=x[0][c+"calendar"],_.sizeFound&&_.size),j=x[0]._autoBin={};if(h=j[_.dirs[0]]={},F&&(_.size||(B.start=C(T.tickIncrement(L(B.start),B.size,!0,g))),void 0===_.end&&(B.end=C(T.tickIncrement(L(B.end),B.size,!1,g)))),E&&!l.traceIs(i,"2dMap")&&0===B._dataSpan&&"category"!==a.type&&"multicategory"!==a.type){if(p)return[B,y,!0];B=function(he,ve,Pe,xe,ke){var Ae,Te,Q,se=he._fullLayout,fe=function(nt,tt){for(var ot=tt.xaxis,dt=tt.yaxis,kt=tt.orientation,mt=[],wt=nt._fullData,Lt=0;Lt<wt.length;Lt++){var Ct=wt[Lt];"histogram"===Ct.type&&!0===Ct.visible&&Ct.orientation===kt&&Ct.xaxis===ot&&Ct.yaxis===dt&&mt.push(Ct)}return mt}(he,ve),ye=!1,Me=1/0,Ie=[ve];for(Ae=0;Ae<fe.length;Ae++)if((Te=fe[Ae])===ve)ye=!0;else if(ye){var Ce=r(he,Te,Pe,xe,!0),Re=Ce[0],le=Ce[2];Te["_"+xe+"autoBinFinished"]=1,Te["_"+xe+"pos0"]=Ce[1],le?Ie.push(Te):Me=Math.min(Me,Re.size)}else Q=se._histogramBinOpts[Te["_"+xe+"bingroup"]],Me=Math.min(Me,Q.size||Te[ke].size);var ge=new Array(Ie.length);for(Ae=0;Ae<Ie.length;Ae++)for(var _e=Ie[Ae]["_"+xe+"pos0"],Fe=0;Fe<_e.length;Fe++)if(void 0!==_e[Fe]){ge[Ae]=_e[Fe];break}for(isFinite(Me)||(Me=A.distinctVals(ge).minDiff),Ae=0;Ae<Ie.length;Ae++){var Ve=(Te=Ie[Ae])[xe+"calendar"],He={start:Pe.c2r(ge[Ae]-Me/2,0,Ve),end:Pe.c2r(ge[Ae]+Me/2,0,Ve),size:Me};Te._input[ke]=Te[ke]=He,(Q=se._histogramBinOpts[Te["_"+xe+"bingroup"]])&&A.extendFlat(Q,He)}return ve[ke]}(n,i,a,c,w)}(m=v.cumulative||{}).enabled&&"include"!==m.currentbin&&("decreasing"===m.direction?B.start=C(T.tickIncrement(L(B.start),B.size,!0,g)):B.end=C(T.tickIncrement(L(B.end),B.size,!1,g))),_.size=B.size,_.sizeFound||(h.size=B.size,A.nestedProperty(x[0],w+".size").set(B.size)),I("start",_,B),I("end",_,B)}y=i["_"+c+"pos0"],delete i["_"+c+"pos0"];var J=i._input[w]||{},G=A.extendFlat({},_),V=_.start,W=a.r2l(J.start),X=void 0!==W;if((_.startFound||X)&&W!==a.r2l(V)){var K=X?W:A.aggNums(Math.min,null,y),re={type:"category"===a.type||"multicategory"===a.type?"linear":a.type,r2l:a.r2l,dtick:_.size,tick0:V,calendar:g,range:[K,T.tickIncrement(K,_.size,!1,g)].map(a.l2r)},ee=T.tickFirst(re);ee>a.r2l(K)&&(ee=T.tickIncrement(ee,_.size,!0,g)),G.start=a.l2r(ee),X||A.nestedProperty(i,w+".start").set(G.start)}var ie=_.end,oe=a.r2l(J.end),ce=void 0!==oe;if((_.endFound||ce)&&oe!==a.r2l(ie)){var me=ce?oe:A.aggNums(Math.max,null,y);G.end=a.l2r(me),ce||A.nestedProperty(i,w+".start").set(G.end)}var de="autobin"+c;return!1===i._input[de]&&(i._input[w]=A.extendFlat({},i[w]||{}),delete i._input[de],delete i[de]),[G,y]}$.exports={calc:function(n,i){var a,c,p,f,x=[],v=[],g="h"===i.orientation,y=T.getFromId(n,g?i.yaxis:i.xaxis),h=g?"y":"x",m={x:"y",y:"x"}[h],w=i[h+"calendar"],u=i.cumulative,S=r(n,i,y,h),_=S[0],E=S[1],L="string"==typeof _.size,C=[],P=L?C:_,I=[],U=[],z=[],H=0,F=i.histnorm,N=i.histfunc,B=-1!==F.indexOf("density");u.enabled&&B&&(F=F.replace(/ ?density$/,""),B=!1);var j,J="max"===N||"min"===N?null:0,G=d.count,V=s[F],W=!1,X=function(Te){return y.r2c(Te,0,w)};for(A.isArrayOrTypedArray(i[m])&&"count"!==N&&(j=i[m],W="avg"===N,G=d[N]),a=X(_.start),p=X(_.end)+(a-T.tickIncrement(a,_.size,!1,w))/1e6;a<p&&x.length<1e6&&(c=T.tickIncrement(a,_.size,!1,w),x.push((a+c)/2),v.push(J),z.push([]),C.push(a),B&&I.push(1/(c-a)),W&&U.push(0),!(c<=a));)a=c;C.push(a),L||"date"!==y.type||(P={start:X(P.start),end:X(P.end),size:P.size}),n._fullLayout._roundFnOpts||(n._fullLayout._roundFnOpts={});var K=i["_"+h+"bingroup"],re={leftGap:1/0,rightGap:1/0};K&&(n._fullLayout._roundFnOpts[K]||(n._fullLayout._roundFnOpts[K]=re),re=n._fullLayout._roundFnOpts[K]);var ee,ie=v.length,oe=!0,ce=re.leftGap,me=re.rightGap,de={};for(a=0;a<E.length;a++){var he=E[a];(f=A.findBin(he,P))>=0&&f<ie&&(H+=G(f,a,v,j,U),oe&&z[f].length&&he!==E[z[f][0]]&&(oe=!1),z[f].push(a),de[a]=f,ce=Math.min(ce,he-C[f]),me=Math.min(me,C[f+1]-he))}re.leftGap=ce,re.rightGap=me,oe||(ee=function(Te,Q){return function(){var se=n._fullLayout._roundFnOpts[K];return o(se.leftGap,se.rightGap,C,y,w)(Te,Q)}}),W&&(H=t(v,U)),V&&V(v,H,I),u.enabled&&function(Te,Q,se){var fe,ye,Me;function Ie(Re){Me=Te[Re],Te[Re]/=2}function Ce(Re){Te[Re]=Me+(ye=Te[Re])/2,Me+=ye}if("half"===se)if("increasing"===Q)for(Ie(0),fe=1;fe<Te.length;fe++)Ce(fe);else for(Ie(Te.length-1),fe=Te.length-2;fe>=0;fe--)Ce(fe);else if("increasing"===Q){for(fe=1;fe<Te.length;fe++)Te[fe]+=Te[fe-1];"exclude"===se&&(Te.unshift(0),Te.pop())}else{for(fe=Te.length-2;fe>=0;fe--)Te[fe]+=Te[fe+1];"exclude"===se&&(Te.push(0),Te.shift())}}(v,u.direction,u.currentbin);var ve=Math.min(x.length,v.length),Pe=[],xe=0,ke=ve-1;for(a=0;a<ve;a++)if(v[a]){xe=a;break}for(a=ve-1;a>=xe;a--)if(v[a]){ke=a;break}for(a=xe;a<=ke;a++)if(k(x[a])&&k(v[a])){var Ae={p:x[a],s:v[a],b:0};u.enabled||(Ae.pts=z[a],oe?Ae.ph0=Ae.ph1=z[a].length?E[z[a][0]]:x[a]:(i._computePh=!0,Ae.ph0=ee(C[a]),Ae.ph1=ee(C[a+1],!0))),Pe.push(Ae)}return 1===Pe.length&&(Pe[0].width1=T.tickIncrement(Pe[0].p,_.size,!1,w)-Pe[0].p),b(Pe,i),A.isArrayOrTypedArray(i.selectedpoints)&&A.tagSelected(Pe,i,de),Pe},calcAllAutoBins:r}},72406:function($){"use strict";$.exports={eventDataKeys:["binNumber"]}},82222:function($,R,e){"use strict";var k=e(71828),A=e(41675),l=e(73972).traceIs,T=e(26125),b=k.nestedProperty,d=e(99082).getAxisGroup,s=[{aStr:{x:"xbins.start",y:"ybins.start"},name:"start"},{aStr:{x:"xbins.end",y:"ybins.end"},name:"end"},{aStr:{x:"xbins.size",y:"ybins.size"},name:"size"},{aStr:{x:"nbinsx",y:"nbinsy"},name:"nbins"}],t=["x","y"];$.exports=function(o,r){var n,i,a,c,p,f,x,v=r._histogramBinOpts={},g=[],y={},h=[];function m(B,j){return k.coerce(n._input,n,n._module.attributes,B,j)}function w(B){return"v"===B.orientation?"x":"y"}function u(B,j,J){var G=B.uid+"__"+J;j||(j=G);var V=A.getFromTrace({_fullLayout:r},B,J).type,W=B[J+"calendar"]||"",X=v[j],K=!0;X&&(V===X.axType&&W===X.calendar?(K=!1,X.traces.push(B),X.dirs.push(J)):(j=G,V!==X.axType&&k.warn(["Attempted to group the bins of trace",B.index,"set on a","type:"+V,"axis","with bins on","type:"+X.axType,"axis."].join(" ")),W!==X.calendar&&k.warn(["Attempted to group the bins of trace",B.index,"set with a",W,"calendar","with bins",X.calendar?"on a "+X.calendar+" calendar":"w/o a set calendar"].join(" ")))),K&&(v[j]={traces:[B],dirs:[J],axType:V,calendar:B[J+"calendar"]||""}),B["_"+J+"bingroup"]=j}for(p=0;p<o.length;p++)l(n=o[p],"histogram")&&(g.push(n),delete n._xautoBinFinished,delete n._yautoBinFinished,l(n,"2dMap")||T(n._input,n,r,m));var S=r._alignmentOpts||{};for(p=0;p<g.length;p++){if(a="",!l(n=g[p],"2dMap")){if(c=w(n),"group"===r.barmode&&n.alignmentgroup){var E=d(r,n[c+"axis"])+n.orientation;(S[E]||{})[n.alignmentgroup]&&(a=E)}a||"overlay"===r.barmode||(a=d(r,n.xaxis)+d(r,n.yaxis)+w(n))}a?(y[a]||(y[a]=[]),y[a].push(n)):h.push(n)}for(a in y)if(1!==(i=y[a]).length){var L=!1;for(i.length&&(n=i[0],L=m("bingroup")),a=L||a,p=0;p<i.length;p++){var C=(n=i[p])._input.bingroup;C&&C!==a&&k.warn(["Trace",n.index,"must match","within bingroup",a+".","Ignoring its bingroup:",C,"setting."].join(" ")),n.bingroup=a,u(n,a,w(n))}}else h.push(i[0]);for(p=0;p<h.length;p++){n=h[p];var P=m("bingroup");if(l(n,"2dMap"))for(x=0;x<2;x++){var I=m((c=t[x])+"bingroup",P?P+"__"+c:null);u(n,I,c)}else u(n,P,w(n))}for(a in v){var U=v[a];for(i=U.traces,f=0;f<s.length;f++){var z,H,F=s[f],N=F.name;if("nbins"!==N||!U.sizeFound){for(p=0;p<i.length;p++){if(void 0!==b((n=i[p])._input,z=F.aStr[c=U.dirs[p]]).get()){U[N]=m(z),U[N+"Found"]=!0;break}(H=(n._autoBin||{})[c]||{})[N]&&b(n,z).set(H[N])}if("start"===N||"end"===N)for(;p<i.length;p++)(n=i[p])["_"+c+"bingroup"]&&m(z,(H=(n._autoBin||{})[c]||{})[N]);"nbins"!==N||U.sizeFound||U.nbinsFound||(n=i[0],U[N]=m(z))}}}}},11385:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(7901),T=e(90769).handleText,b=e(98340),d=e(7745);$.exports=function(s,t,o,r){function n(h,m){return A.coerce(s,t,d,h,m)}var i=n("x"),a=n("y");n("cumulative.enabled")&&(n("cumulative.direction"),n("cumulative.currentbin")),n("text");var c=n("textposition");T(s,t,r,n,c,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),n("hovertext"),n("hovertemplate"),n("xhoverformat"),n("yhoverformat");var p=n("orientation",a&&!i?"h":"v"),f="v"===p?"x":"y",x="v"===p?"y":"x",v=i&&a?Math.min(A.minRowLength(i)&&A.minRowLength(a)):A.minRowLength(t[f]||[]);if(v){t._length=v,k.getComponentMethod("calendars","handleTraceDefaults")(s,t,["x","y"],r),t[x]&&n("histfunc"),n("histnorm"),n("autobin"+f),b(s,t,n,o,r),A.coerceSelectionMarkerOpacity(t,n);var g=(t.marker.line||{}).color,y=k.getComponentMethod("errorbars","supplyDefaults");y(s,t,g||l.defaultLine,{axis:"y"}),y(s,t,g||l.defaultLine,{axis:"x",inherit:"y"})}else t.visible=!1}},84402:function($){"use strict";$.exports=function(R,e,k,A,l){if(R.x="xVal"in e?e.xVal:e.x,R.y="yVal"in e?e.yVal:e.y,"zLabelVal"in e&&(R.z=e.zLabelVal),e.xa&&(R.xaxis=e.xa),e.ya&&(R.yaxis=e.ya),!(k.cumulative||{}).enabled){var T,b=Array.isArray(l)?A[0].pts[l[0]][l[1]]:A[l].pts;if(R.pointNumbers=b,R.binNumber=R.pointNumber,delete R.pointNumber,delete R.pointIndex,k._indexToPoints){T=[];for(var d=0;d<b.length;d++)T=T.concat(k._indexToPoints[b[d]])}else T=b;R.pointIndices=T}return R}},76440:function($,R,e){"use strict";var k=e(95423).hoverPoints,A=e(89298).hoverLabelText;$.exports=function(l,T,b,d,s){var t=k(l,T,b,d,s);if(t){var o=(l=t[0]).cd[l.index],r=l.cd[0].trace;if(!r.cumulative.enabled){var n="h"===r.orientation?"y":"x";l[n+"Label"]=A(l[n+"a"],[o.ph0,o.ph1],r[n+"hoverformat"])}return t}}},36071:function($,R,e){"use strict";$.exports={attributes:e(7745),layoutAttributes:e(43641),supplyDefaults:e(11385),crossTraceDefaults:e(82222),supplyLayoutDefaults:e(13957),calc:e(72138).calc,crossTraceCalc:e(11661).crossTraceCalc,plot:e(17295).plot,layerName:"barlayer",style:e(16688).style,styleOnSelect:e(16688).styleOnSelect,colorbar:e(4898),hoverPoints:e(76440),selectPoints:e(81974),eventData:e(84402),moduleType:"trace",name:"histogram",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}},36362:function($){"use strict";$.exports={percent:function(R,e){for(var k=R.length,A=100/e,l=0;l<k;l++)R[l]*=A},probability:function(R,e){for(var k=R.length,A=0;A<k;A++)R[A]/=e},density:function(R,e,k,A){var l=R.length;A=A||1;for(var T=0;T<l;T++)R[T]*=k[T]*A},"probability density":function(R,e,k,A){var l=R.length;A&&(e/=A);for(var T=0;T<l;T++)R[T]*=k[T]/e}}},35361:function($,R,e){"use strict";var k=e(7745),A=e(17656),l=e(21606),T=e(9012),b=e(12663).axisHoverFormat,d=e(5386).f,s=e(5386).s,t=e(50693),o=e(1426).extendFlat;$.exports=o({x:k.x,y:k.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:k.histnorm,histfunc:k.histfunc,nbinsx:k.nbinsx,xbins:A("x"),nbinsy:k.nbinsy,ybins:A("y"),autobinx:k.autobinx,autobiny:k.autobiny,bingroup:o({},k.bingroup,{}),xbingroup:o({},k.bingroup,{}),ybingroup:o({},k.bingroup,{}),xgap:l.xgap,ygap:l.ygap,zsmooth:l.zsmooth,xhoverformat:b("x"),yhoverformat:b("y"),zhoverformat:b("z",1),hovertemplate:d({},{keys:"z"}),texttemplate:s({arrayOk:!1,editType:"plot"},{keys:"z"}),textfont:l.textfont,showlegend:o({},T.showlegend,{dflt:!1})},t("",{cLetter:"z",autoColorDflt:!1}))},17562:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(59575),T=e(36362),b=e(42174),d=e(40965),s=e(72138).calcAllAutoBins;function t(n,i,a,c){var p,f=new Array(n);if(c)for(p=0;p<n;p++)f[p]=1/(i[p+1]-i[p]);else{var x=1/a;for(p=0;p<n;p++)f[p]=x}return f}function o(n,i){return{start:n(i.start),end:n(i.end),size:i.size}}function r(n,i,a,c,p,f){var x,v=n.length-1,g=new Array(v),y=d(a,c,n,p,f);for(x=0;x<v;x++){var h=(i||[])[x];g[x]=void 0===h?[y(n[x]),y(n[x+1],!0)]:[h,h]}return g}$.exports=function(n,i){var a,c,p,f,x=A.getFromId(n,i.xaxis),v=A.getFromId(n,i.yaxis),g=i.xcalendar,y=i.ycalendar,h=function(dt){return x.r2c(dt,0,g)},m=function(dt){return v.r2c(dt,0,y)},w=s(n,i,x,"x"),u=w[0],S=w[1],_=s(n,i,v,"y"),E=_[0],L=_[1],C=i._length;S.length>C&&S.splice(C,S.length-C),L.length>C&&L.splice(C,L.length-C);var P=[],I=[],U=[],z="string"==typeof u.size,H="string"==typeof E.size,F=[],N=[],B=z?F:u,j=H?N:E,J=0,G=[],V=[],W=i.histnorm,X=i.histfunc,K=-1!==W.indexOf("density"),re="max"===X||"min"===X?null:0,ee=l.count,ie=T[W],oe=!1,ce=[],me=[],de="z"in i?i.z:"marker"in i&&Array.isArray(i.marker.color)?i.marker.color:"";de&&"count"!==X&&(oe="avg"===X,ee=l[X]);var he=u.size,ve=h(u.start),Pe=h(u.end)+(ve-A.tickIncrement(ve,he,!1,g))/1e6;for(a=ve;a<Pe;a=A.tickIncrement(a,he,!1,g))I.push(re),F.push(a),oe&&U.push(0);F.push(a);var ke=I.length,Ae=(a-ve)/ke,Te=x.c2r(ve+Ae/2,0,g),Q=E.size,se=m(E.start),fe=m(E.end)+(se-A.tickIncrement(se,Q,!1,y))/1e6;for(a=se;a<fe;a=A.tickIncrement(a,Q,!1,y)){P.push(I.slice()),N.push(a);var ye=new Array(ke);for(c=0;c<ke;c++)ye[c]=[];V.push(ye),oe&&G.push(U.slice())}N.push(a);var Me=P.length,Ie=(a-se)/Me,Ce=v.c2r(se+Ie/2,0,y);K&&(ce=t(I.length,B,Ae,z),me=t(P.length,j,Ie,H)),z||"date"!==x.type||(B=o(h,B)),H||"date"!==v.type||(j=o(m,j));var Re=!0,le=!0,ge=new Array(ke),_e=new Array(Me),Fe=1/0,Ve=1/0,He=1/0,nt=1/0;for(a=0;a<C;a++){var tt=S[a],ot=L[a];p=k.findBin(tt,B),f=k.findBin(ot,j),p>=0&&p<ke&&f>=0&&f<Me&&(J+=ee(p,a,P[f],de,G[f]),V[f][p].push(a),Re&&(void 0===ge[p]?ge[p]=tt:ge[p]!==tt&&(Re=!1)),le&&(void 0===_e[f]?_e[f]=ot:_e[f]!==ot&&(le=!1)),Fe=Math.min(Fe,tt-F[p]),Ve=Math.min(Ve,F[p+1]-tt),He=Math.min(He,ot-N[f]),nt=Math.min(nt,N[f+1]-ot))}if(oe)for(f=0;f<Me;f++)J+=b(P[f],G[f]);if(ie)for(f=0;f<Me;f++)ie(P[f],J,ce,me[f]);return{x:S,xRanges:r(F,Re&&ge,Fe,Ve,x,g),x0:Te,dx:Ae,y:L,yRanges:r(N,le&&_e,He,nt,v,y),y0:Ce,dy:Ie,z:P,pts:V}}},93888:function($,R,e){"use strict";var k=e(71828),A=e(75238),l=e(49901),T=e(1586),b=e(58623),d=e(35361);$.exports=function(s,t,o,r){function n(i,a){return k.coerce(s,t,d,i,a)}A(s,t,n,r),!1!==t.visible&&(l(s,t,n,r),T(s,t,r,n,{prefix:"",cLetter:"z"}),n("hovertemplate"),b(n,r),n("xhoverformat"),n("yhoverformat"))}},76128:function($,R,e){"use strict";var k=e(46248),A=e(89298).hoverLabelText;$.exports=function(l,T,b,d,s){var t=k(l,T,b,d,s);if(t){var o=(l=t[0]).index,i=l.cd[0],a=i.trace,c=i.xRanges[o[1]],p=i.yRanges[o[0]];return l.xLabel=A(l.xa,[c[0],c[1]],a.xhoverformat),l.yLabel=A(l.ya,[p[0],p[1]],a.yhoverformat),t}}},43905:function($,R,e){"use strict";$.exports={attributes:e(35361),supplyDefaults:e(93888),crossTraceDefaults:e(82222),calc:e(90757),plot:e(50347),layerName:"heatmaplayer",colorbar:e(61243),style:e(70035),hoverPoints:e(76128),eventData:e(84402),moduleType:"trace",name:"histogram2d",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}},75238:function($,R,e){"use strict";var k=e(73972),A=e(71828);$.exports=function(l,T,b,d){var s=b("x"),t=b("y"),o=A.minRowLength(s),r=A.minRowLength(t);o&&r?(T._length=Math.min(o,r),k.getComponentMethod("calendars","handleTraceDefaults")(l,T,["x","y"],d),(b("z")||b("marker.color"))&&b("histfunc"),b("histnorm"),b("autobinx"),b("autobiny")):T.visible=!1}},99066:function($,R,e){"use strict";var k=e(35361),A=e(70600),l=e(50693),T=e(12663).axisHoverFormat,b=e(1426).extendFlat;$.exports=b({x:k.x,y:k.y,z:k.z,marker:k.marker,histnorm:k.histnorm,histfunc:k.histfunc,nbinsx:k.nbinsx,xbins:k.xbins,nbinsy:k.nbinsy,ybins:k.ybins,autobinx:k.autobinx,autobiny:k.autobiny,bingroup:k.bingroup,xbingroup:k.xbingroup,ybingroup:k.ybingroup,autocontour:A.autocontour,ncontours:A.ncontours,contours:A.contours,line:{color:A.line.color,width:b({},A.line.width,{dflt:.5}),dash:A.line.dash,smoothing:A.line.smoothing,editType:"plot"},xhoverformat:T("x"),yhoverformat:T("y"),zhoverformat:T("z",1),hovertemplate:k.hovertemplate,texttemplate:A.texttemplate,textfont:A.textfont},l("",{cLetter:"z",editTypeOverride:"calc"}))},62654:function($,R,e){"use strict";var k=e(71828),A=e(75238),l=e(67217),T=e(8724),b=e(58623),d=e(99066);$.exports=function(s,t,o,r){function n(i,a){return k.coerce(s,t,d,i,a)}A(s,t,n,r),!1!==t.visible&&(l(s,t,n,function(i){return k.coerce2(s,t,d,i)}),T(s,t,n,r),n("xhoverformat"),n("yhoverformat"),n("hovertemplate"),t.contours&&"heatmap"===t.contours.coloring&&b(n,r))}},35902:function($,R,e){"use strict";$.exports={attributes:e(99066),supplyDefaults:e(62654),crossTraceDefaults:e(82222),calc:e(27529),plot:e(29854).plot,layerName:"contourlayer",style:e(84426),colorbar:e(90654),hoverPoints:e(52421),moduleType:"trace",name:"histogram2dcontour",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}},46291:function($,R,e){"use strict";var k=e(5386).f,A=e(5386).s,l=e(50693),T=e(27670).Y,b=e(34e3),d=e(57564),s=e(45802),t=e(43473),o=e(1426).extendFlat;$.exports={labels:d.labels,parents:d.parents,values:d.values,branchvalues:d.branchvalues,count:d.count,level:d.level,maxdepth:d.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:s.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:o({colors:d.marker.colors,line:d.marker.line,editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),leaf:d.leaf,pathbar:s.pathbar,text:b.text,textinfo:d.textinfo,texttemplate:A({editType:"plot"},{keys:t.eventDataKeys.concat(["label","value"])}),hovertext:b.hovertext,hoverinfo:d.hoverinfo,hovertemplate:k({},{keys:t.eventDataKeys}),textfont:b.textfont,insidetextfont:b.insidetextfont,outsidetextfont:s.outsidetextfont,textposition:s.textposition,sort:b.sort,root:d.root,domain:T({name:"icicle",trace:!0,editType:"calc"})}},96346:function($,R,e){"use strict";var k=e(74875);R.name="icicle",R.plot=function(A,l,T,b){k.plotBasePlot(R.name,A,l,T,b)},R.clean=function(A,l,T,b){k.cleanBasePlot(R.name,A,l,T,b)}},46584:function($,R,e){"use strict";var k=e(52147);R.y=function(A,l){return k.calc(A,l)},R.T=function(A){return k._runCrossTraceCalc("icicle",A)}},56524:function($,R,e){"use strict";var k=e(71828),A=e(46291),l=e(7901),T=e(27670).c,b=e(90769).handleText,d=e(97313).TEXTPAD,s=e(21081),t=s.hasColorscale,o=s.handleDefaults;$.exports=function(r,n,i,a){function c(h,m){return k.coerce(r,n,A,h,m)}var p=c("labels"),f=c("parents");if(p&&p.length&&f&&f.length){var x=c("values");c(x&&x.length?"branchvalues":"count"),c("level"),c("maxdepth"),c("tiling.orientation"),c("tiling.flip"),c("tiling.pad");var v=c("text");c("texttemplate"),n.texttemplate||c("textinfo",Array.isArray(v)?"text+label":"label"),c("hovertext"),c("hovertemplate");var g=c("pathbar.visible");b(r,n,a,c,"auto",{hasPathbar:g,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),c("textposition"),c("marker.line.width")&&c("marker.line.color",a.paper_bgcolor),c("marker.colors");var y=n._hasColorscale=t(r,"marker","colors")||(r.marker||{}).coloraxis;y&&o(r,n,a,c,{prefix:"marker.",cLetter:"c"}),c("leaf.opacity",y?1:.7),n._hovered={marker:{line:{width:2,color:l.contrast(a.paper_bgcolor)}}},g&&(c("pathbar.thickness",n.pathbar.textfont.size+2*d),c("pathbar.side"),c("pathbar.edgeshape")),c("sort"),c("root.color"),T(n,a,c),n._length=null}else n.visible=!1}},90666:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(91424),T=e(63893),b=e(21538),d=e(82454).styleOne,s=e(43473),t=e(2791),o=e(83523),r=e(24714).formatSliceLabel,n=!1;$.exports=function(i,a,c,p,f){var x=f.width,v=f.height,g=f.viewX,y=f.viewY,h=f.pathSlice,m=f.toMoveInsideSlice,w=f.strTransform,u=f.hasTransition,S=f.handleSlicesExit,_=f.makeUpdateSliceInterpolator,E=f.makeUpdateTextInterpolator,L=f.prevEntry,C=i._context.staticPlot,P=i._fullLayout,I=a[0].trace,U=-1!==I.textposition.indexOf("left"),z=-1!==I.textposition.indexOf("right"),H=-1!==I.textposition.indexOf("bottom"),F=b(c,[x,v],{flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,orientation:I.tiling.orientation,pad:{inner:I.tiling.pad},maxDepth:I._maxDepth}).descendants(),N=1/0,B=-1/0;F.forEach(function(W){var X=W.depth;X>=I._maxDepth?(W.x0=W.x1=(W.x0+W.x1)/2,W.y0=W.y1=(W.y0+W.y1)/2):(N=Math.min(N,X),B=Math.max(B,X))}),p=p.data(F,t.getPtId),I._maxVisibleLayers=isFinite(B)?B-N+1:0,p.enter().append("g").classed("slice",!0),S(p,n,{},[x,v],h),p.order();var j=null;if(u&&L){var J=t.getPtId(L);p.each(function(W){null===j&&t.getPtId(W)===J&&(j={x0:W.x0,x1:W.x1,y0:W.y0,y1:W.y1})})}var G=function(){return j||{x0:0,x1:x,y0:0,y1:v}},V=p;return u&&(V=V.transition().each("end",function(){var W=k.select(this);t.setSliceCursor(W,i,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),V.each(function(W){W._x0=g(W.x0),W._x1=g(W.x1),W._y0=y(W.y0),W._y1=y(W.y1),W._hoverX=g(W.x1-I.tiling.pad),W._hoverY=y(H?W.y1-I.tiling.pad/2:W.y0+I.tiling.pad/2);var X=k.select(this),K=A.ensureSingle(X,"path","surface",function(oe){oe.style("pointer-events",C?"none":"all")});u?K.transition().attrTween("d",function(oe){var ce=_(oe,n,G(),[x,v],{orientation:I.tiling.orientation,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1});return function(me){return h(ce(me))}}):K.attr("d",h),X.call(o,c,i,a,{styleOne:d,eventDataKeys:s.eventDataKeys,transitionTime:s.CLICK_TRANSITION_TIME,transitionEasing:s.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,i,{isTransitioning:i._transitioning}),K.call(d,W,I,{hovered:!1}),W._text=W.x0===W.x1||W.y0===W.y1?"":r(W,c,I,a,P)||"";var re=A.ensureSingle(X,"g","slicetext"),ee=A.ensureSingle(re,"text","",function(oe){oe.attr("data-notex",1)}),ie=A.ensureUniformFontSize(i,t.determineTextFont(I,W,P.font));ee.text(W._text||" ").classed("slicetext",!0).attr("text-anchor",z?"end":U?"start":"middle").call(l.font,ie).call(T.convertToTspans,i),W.textBB=l.bBox(ee.node()),W.transform=m(W,{fontSize:ie.size}),W.transform.fontSize=ie.size,u?ee.transition().attrTween("transform",function(oe){var ce=E(oe,n,G(),[x,v]);return function(me){return w(ce(me))}}):ee.attr("transform",w(W))}),j}},69816:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"icicle",basePlotModule:e(96346),categories:[],animatable:!0,attributes:e(46291),layoutAttributes:e(92894),supplyDefaults:e(56524),supplyLayoutDefaults:e(21070),calc:e(46584).y,crossTraceCalc:e(46584).T,plot:e(85596),style:e(82454).style,colorbar:e(4898),meta:{}}},92894:function($){"use strict";$.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},21070:function($,R,e){"use strict";var k=e(71828),A=e(92894);$.exports=function(l,T){function b(d,s){return k.coerce(l,T,A,d,s)}b("iciclecolorway",T.colorway),b("extendiciclecolors")}},21538:function($,R,e){"use strict";var k=e(674),A=e(14102);$.exports=function(l,T,b){var d=b.flipX,s=b.flipY,t="h"===b.orientation,o=b.maxDepth,r=T[0],n=T[1];o&&(r=(l.height+1)*T[0]/Math.min(l.height+1,o),n=(l.height+1)*T[1]/Math.min(l.height+1,o));var i=k.partition().padding(b.pad.inner).size(t?[T[1],r]:[T[0],n])(l);return(t||d||s)&&A(i,T,{swapXY:t,flipX:d,flipY:s}),i}},85596:function($,R,e){"use strict";var k=e(80694),A=e(90666);$.exports=function(l,T,b,d){return k(l,T,b,d,{type:"icicle",drawDescendants:A})}},82454:function($,R,e){"use strict";var k=e(39898),A=e(7901),l=e(71828),T=e(72597).resizeText;function b(d,s,t){var o=s.data.data,r=!s.children,n=o.i,i=l.castOption(t,n,"marker.line.color")||A.defaultLine,a=l.castOption(t,n,"marker.line.width")||0;d.style("stroke-width",a).call(A.fill,o.color).call(A.stroke,i).style("opacity",r?t.leaf.opacity:null)}$.exports={style:function(d){var s=d._fullLayout._iciclelayer.selectAll(".trace");T(d,s,"icicle"),s.each(function(t){var o=k.select(this),r=t[0].trace;o.style("opacity",r.opacity),o.selectAll("path.surface").each(function(n){k.select(this).call(b,n,r)})})},styleOne:b}},17230:function($,R,e){"use strict";for(var k=e(9012),A=e(5386).f,l=e(1426).extendFlat,T=e(51877).colormodel,b=["rgb","rgba","rgba256","hsl","hsla"],d=[],s=[],t=0;t<b.length;t++){var o=T[b[t]];d.push("For the `"+b[t]+"` colormodel, it is ["+(o.zminDflt||o.min).join(", ")+"]."),s.push("For the `"+b[t]+"` colormodel, it is ["+(o.zmaxDflt||o.max).join(", ")+"].")}$.exports=l({source:{valType:"string",editType:"calc"},z:{valType:"data_array",editType:"calc"},colormodel:{valType:"enumerated",values:b,editType:"calc"},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot"},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc"},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dx:{valType:"number",dflt:1,editType:"calc"},dy:{valType:"number",dflt:1,editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"data_array",editType:"plot"},hoverinfo:l({},k.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:A({},{keys:["z","color","colormodel"]}),transforms:void 0})},71113:function($,R,e){"use strict";var k=e(71828),A=e(51877),l=e(92770),T=e(89298),b=e(71828).maxRowLength,d=e(67395).A;function s(o,r,n,i){return function(a){return k.constrain((a-o)*r,n,i)}}function t(o,r){return function(n){return k.constrain(n,o,r)}}$.exports=function(o,r){var n,i;if(r._hasZ)n=r.z.length,i=b(r.z);else if(r._hasSource){var a=d(r.source);n=a.height,i=a.width}var c,p=T.getFromId(o,r.xaxis||"x"),f=T.getFromId(o,r.yaxis||"y"),x=p.d2c(r.x0)-r.dx/2,v=f.d2c(r.y0)-r.dy/2,g=[x,x+i*r.dx],y=[v,v+n*r.dy];if(p&&"log"===p.type)for(c=0;c<i;c++)g.push(x+c*r.dx);if(f&&"log"===f.type)for(c=0;c<n;c++)y.push(v+c*r.dy);return r._extremes[p._id]=T.findExtremes(p,g),r._extremes[f._id]=T.findExtremes(f,y),r._scaler=function(h){var m=A.colormodel[h.colormodel],w=(m.colormodel||h.colormodel).length;h._sArray=[];for(var u=0;u<w;u++)h._sArray.push(m.min[u]!==h.zmin[u]||m.max[u]!==h.zmax[u]?s(h.zmin[u],(m.max[u]-m.min[u])/(h.zmax[u]-h.zmin[u]),m.min[u],m.max[u]):t(m.min[u],m.max[u]));return function(S){for(var _=S.slice(0,w),E=0;E<w;E++){var L=_[E];if(!l(L))return!1;_[E]=h._sArray[E](L)}return _}}(r),[{x0:x,y0:v,z:r.z,w:i,h:n}]}},51877:function($){"use strict";$.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(R){return R.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(R){return R.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(R){return R.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(R){var e=R.slice(0,3);return e[1]=e[1]+"%",e[2]=e[2]+"%",e},suffix:["\xb0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(R){var e=R.slice(0,4);return e[1]=e[1]+"%",e[2]=e[2]+"%",e},suffix:["\xb0","%","%",""]}},pixelatedStyle:["image-rendering: optimizeSpeed","image-rendering: -moz-crisp-edges","image-rendering: -o-crisp-edges","image-rendering: -webkit-optimize-contrast","image-rendering: optimize-contrast","image-rendering: crisp-edges","image-rendering: pixelated",""].join("; ")}},13245:function($,R,e){"use strict";var k=e(71828),A=e(17230),l=e(51877),T=e(25095).IMAGE_URL_PREFIX;$.exports=function(b,d){function s(r,n){return k.coerce(b,d,A,r,n)}s("source"),d.source&&!d.source.match(T)&&delete d.source,d._hasSource=!!d.source;var t,o=s("z");d._hasZ=!(void 0===o||!o.length||!o[0]||!o[0].length),d._hasZ||d._hasSource?(s("x0"),s("y0"),s("dx"),s("dy"),d._hasZ?(s("colormodel","rgb"),s("zmin",(t=l.colormodel[d.colormodel]).zminDflt||t.min),s("zmax",t.zmaxDflt||t.max)):d._hasSource&&(d.colormodel="rgba256",d.zmin=(t=l.colormodel[d.colormodel]).zminDflt,d.zmax=t.zmaxDflt),s("zsmooth"),s("text"),s("hovertext"),s("hovertemplate"),d._length=null):d.visible=!1}},30835:function($){"use strict";$.exports=function(R,e){return"xVal"in e&&(R.x=e.xVal),"yVal"in e&&(R.y=e.yVal),e.xa&&(R.xaxis=e.xa),e.ya&&(R.yaxis=e.ya),R.color=e.color,R.colormodel=e.trace.colormodel,R.z||(R.z=e.color),R}},67395:function($,R,e){"use strict";var k=e(33575),A=e(25095).IMAGE_URL_PREFIX,l=e(12856).Buffer;R.A=function(T){var b=T.replace(A,""),d=new l(b,"base64");return k(d)}},28749:function($,R,e){"use strict";var k=e(30211),A=e(71828),l=e(51877);$.exports=function(T,b,d){var s=T.cd[0],t=s.trace,o=T.xa,r=T.ya;if(!(k.inbox(b-s.x0,b-(s.x0+s.w*t.dx),0)>0||k.inbox(d-s.y0,d-(s.y0+s.h*t.dy),0)>0)){var n,i=Math.floor((b-s.x0)/t.dx),a=Math.floor(Math.abs(d-s.y0)/t.dy);if(t._hasZ?n=s.z[a][i]:t._hasSource&&(n=t._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(i,a,1,1).data),n){var c,p=s.hi||t.hoverinfo;if(p){var f=p.split("+");-1!==f.indexOf("all")&&(f=["color"]),-1!==f.indexOf("color")&&(c=!0)}var x,v=l.colormodel[t.colormodel],g=v.colormodel||t.colormodel,y=g.length,h=t._scaler(n),m=v.suffix,w=[];(t.hovertemplate||c)&&(w.push("["+[h[0]+m[0],h[1]+m[1],h[2]+m[2]].join(", ")),4===y&&w.push(", "+h[3]+m[3]),w.push("]"),w=w.join(""),T.extraText=g.toUpperCase()+": "+w),Array.isArray(t.hovertext)&&Array.isArray(t.hovertext[a])?x=t.hovertext[a][i]:Array.isArray(t.text)&&Array.isArray(t.text[a])&&(x=t.text[a][i]);var u=r.c2p(s.y0+(a+.5)*t.dy),S=s.x0+(i+.5)*t.dx,_=s.y0+(a+.5)*t.dy,E="["+n.slice(0,t.colormodel.length).join(", ")+"]";return[A.extendFlat(T,{index:[a,i],x0:o.c2p(s.x0+i*t.dx),x1:o.c2p(s.x0+(i+1)*t.dx),y0:u,y1:u,color:h,xVal:S,xLabelVal:S,yVal:_,yLabelVal:_,zLabelVal:E,text:x,hovertemplateLabels:{zLabel:E,colorLabel:w,"color[0]Label":h[0]+m[0],"color[1]Label":h[1]+m[1],"color[2]Label":h[2]+m[2],"color[3]Label":h[3]+m[3]}})]}}}},94507:function($,R,e){"use strict";$.exports={attributes:e(17230),supplyDefaults:e(13245),calc:e(71113),plot:e(60775),style:e(12826),hoverPoints:e(28749),eventData:e(30835),moduleType:"trace",name:"image",basePlotModule:e(93612),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},60775:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=A.strTranslate,T=e(77922),b=e(51877),d=A.isIOS()||A.isSafari()||A.isIE();$.exports=function(s,t,o,r){var n=t.xaxis,i=t.yaxis,a=!(d||s._context._exportedPlot);A.makeTraceGroups(r,o,"im").each(function(c){var p=k.select(this),f=c[0],x=f.trace,v=("fast"===x.zsmooth||!1===x.zsmooth&&a)&&!x._hasZ&&x._hasSource&&"linear"===n.type&&"linear"===i.type;x._realImage=v;var g,y,h,m,w,u,S=f.z,_=f.x0,E=f.y0,L=f.w,C=f.h,P=x.dx,I=x.dy;for(u=0;void 0===g&&u<L;)g=n.c2p(_+u*P),u++;for(u=L;void 0===y&&u>0;)y=n.c2p(_+u*P),u--;for(u=0;void 0===m&&u<C;)m=i.c2p(E+u*I),u++;for(u=C;void 0===w&&u>0;)w=i.c2p(E+u*I),u--;y<g&&(h=y,y=g,g=h),w<m&&(h=m,m=w,w=h),v||(g=Math.max(-.5*n._length,g),y=Math.min(1.5*n._length,y),m=Math.max(-.5*i._length,m),w=Math.min(1.5*i._length,w));var U=Math.round(y-g),z=Math.round(w-m);if(U<=0||z<=0)p.selectAll("image").data([]).exit().remove();else{var H=p.selectAll("image").data([c]);H.enter().append("svg:image").attr({xmlns:T.svg,preserveAspectRatio:"none"}),H.exit().remove();var F=!1===x.zsmooth?b.pixelatedStyle:"";if(v){var N=A.simpleMap(n.range,n.r2l),B=A.simpleMap(i.range,i.r2l),j=N[1]<N[0],J=B[1]>B[0];if(j||J){var G=g+U/2,V=m+z/2;F+="transform:"+l(G+"px",V+"px")+"scale("+(j?-1:1)+","+(J?-1:1)+")"+l(-G+"px",-V+"px")+";"}}H.attr("style",F);var W=new Promise(function(K){if(x._hasZ)K();else if(x._hasSource)if(x._canvas&&x._canvas.el.width===L&&x._canvas.el.height===C&&x._canvas.source===x.source)K();else{var re=document.createElement("canvas");re.width=L,re.height=C;var ee=re.getContext("2d",{willReadFrequently:!0});x._image=x._image||new Image;var ie=x._image;ie.onload=function(){ee.drawImage(ie,0,0),x._canvas={el:re,source:x.source},K()},ie.setAttribute("src",x.source)}}).then(function(){var K;if(x._hasZ)K=X(function(ie,oe){return S[oe][ie]}).toDataURL("image/png");else if(x._hasSource)if(v)K=x.source;else{var ee=x._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(0,0,L,C).data;K=X(function(ie,oe){var ce=4*(oe*L+ie);return[ee[ce],ee[ce+1],ee[ce+2],ee[ce+3]]}).toDataURL("image/png")}H.attr({"xlink:href":K,height:z,width:U,x:g,y:m})});s._promises.push(W)}function X(K){var re=document.createElement("canvas");re.width=U,re.height=z;var ee,ie=re.getContext("2d",{willReadFrequently:!0}),oe=function(Te){return A.constrain(Math.round(n.c2p(_+Te*P)-g),0,U)},ce=function(Te){return A.constrain(Math.round(i.c2p(E+Te*I)-m),0,z)},me=b.colormodel[x.colormodel],de=me.colormodel||x.colormodel,he=me.fmt;for(u=0;u<f.w;u++){var ve=oe(u),Pe=oe(u+1);if(Pe!==ve&&!isNaN(Pe)&&!isNaN(ve))for(var xe=0;xe<f.h;xe++){var ke=ce(xe),Ae=ce(xe+1);Ae===ke||isNaN(Ae)||isNaN(ke)||!K(u,xe)||(ee=x._scaler(K(u,xe)),ie.fillStyle=ee?de+"("+he(ee).join(",")+")":"rgba(0,0,0,0)",ie.fillRect(ve,ke,Pe-ve,Ae-ke))}}return re}})}},12826:function($,R,e){"use strict";var k=e(39898);$.exports=function(A){k.select(A).selectAll(".im image").style("opacity",function(l){return l[0].trace.opacity})}},54846:function($,R,e){"use strict";var k=e(1426).extendFlat,A=e(1426).extendDeep,l=e(30962).overrideAll,T=e(41940),b=e(22399),d=e(27670).Y,s=e(13838),t=e(44467).templatedArray,o=e(22372),r=e(12663).descriptionOnlyNumbers,n=T({editType:"plot",colorEditType:"plot"}),i={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:b.defaultLine,editType:"plot"},width:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},thickness:{valType:"number",min:0,max:1,dflt:1,editType:"plot"},editType:"calc"},a={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},c=t("step",A({},i,{range:a}));$.exports={mode:{valType:"flaglist",editType:"calc",flags:["number","delta","gauge"],dflt:"number"},value:{valType:"number",editType:"calc",anim:!0},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},domain:d({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:k({},n,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:r("value")},font:k({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"plot"},delta:{reference:{valType:"number",editType:"calc"},position:{valType:"enumerated",values:["top","bottom","left","right"],dflt:"bottom",editType:"plot"},relative:{valType:"boolean",editType:"plot",dflt:!1},valueformat:{valType:"string",editType:"plot",description:r("value")},increasing:{symbol:{valType:"string",dflt:o.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:o.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:o.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:o.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:k({},n,{}),prefix:{valType:"string",dflt:"",editType:"plot"},suffix:{valType:"string",dflt:"",editType:"plot"},editType:"calc"},gauge:{shape:{valType:"enumerated",editType:"plot",dflt:"angular",values:["angular","bullet"]},bar:A({},i,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:b.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:l({range:a,visible:k({},s.visible,{dflt:!0}),tickmode:s.minor.tickmode,nticks:s.nticks,tick0:s.tick0,dtick:s.dtick,tickvals:s.tickvals,ticktext:s.ticktext,ticks:k({},s.ticks,{dflt:"outside"}),ticklen:s.ticklen,tickwidth:s.tickwidth,tickcolor:s.tickcolor,ticklabelstep:s.ticklabelstep,showticklabels:s.showticklabels,tickfont:T({}),tickangle:s.tickangle,tickformat:s.tickformat,tickformatstops:s.tickformatstops,tickprefix:s.tickprefix,showtickprefix:s.showtickprefix,ticksuffix:s.ticksuffix,showticksuffix:s.showticksuffix,separatethousands:s.separatethousands,exponentformat:s.exponentformat,minexponent:s.minexponent,showexponent:s.showexponent,editType:"plot"},"plot"),steps:c,threshold:{line:{color:k({},i.line.color,{}),width:k({},i.line.width,{dflt:1}),editType:"plot"},thickness:k({},i.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},15970:function($,R,e){"use strict";var k=e(74875);R.name="indicator",R.plot=function(A,l,T,b){k.plotBasePlot(R.name,A,l,T,b)},R.clean=function(A,l,T,b){k.cleanBasePlot(R.name,A,l,T,b)}},24667:function($){"use strict";$.exports={calc:function(R,e){var k=[],A=e.value;"number"!=typeof e._lastValue&&(e._lastValue=e.value);var l=e._lastValue,T=l;return e._hasDelta&&"number"==typeof e.delta.reference&&(T=e.delta.reference),k[0]={y:A,lastY:l,delta:A-T,relativeDelta:(A-T)/T},k}}},84577:function($){"use strict";$.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},94425:function($,R,e){"use strict";var k=e(71828),A=e(54846),l=e(27670).c,T=e(44467),b=e(85501),d=e(84577),s=e(26218),t=e(38701),o=e(96115),r=e(89426);function n(i,a){function c(p,f){return k.coerce(i,a,A.gauge.steps,p,f)}c("color"),c("line.color"),c("line.width"),c("range"),c("thickness")}$.exports={supplyDefaults:function(i,a,c,p){function f(L,C){return k.coerce(i,a,A,L,C)}l(a,p,f),f("mode"),a._hasNumber=-1!==a.mode.indexOf("number"),a._hasDelta=-1!==a.mode.indexOf("delta"),a._hasGauge=-1!==a.mode.indexOf("gauge");var x=f("value");a._range=[0,"number"==typeof x?1.5*x:1];var v,g,y,h,m,w,u=new Array(2);function S(L,C){return k.coerce(y,h,A.gauge,L,C)}function _(L,C){return k.coerce(m,w,A.gauge.axis,L,C)}if(a._hasNumber&&(f("number.valueformat"),f("number.font.color",p.font.color),f("number.font.family",p.font.family),f("number.font.size"),void 0===a.number.font.size&&(a.number.font.size=d.defaultNumberFontSize,u[0]=!0),f("number.prefix"),f("number.suffix"),v=a.number.font.size),a._hasDelta&&(f("delta.font.color",p.font.color),f("delta.font.family",p.font.family),f("delta.font.size"),void 0===a.delta.font.size&&(a.delta.font.size=(a._hasNumber?.5:1)*(v||d.defaultNumberFontSize),u[1]=!0),f("delta.reference",a.value),f("delta.relative"),f("delta.valueformat",a.delta.relative?"2%":""),f("delta.increasing.symbol"),f("delta.increasing.color"),f("delta.decreasing.symbol"),f("delta.decreasing.color"),f("delta.position"),f("delta.prefix"),f("delta.suffix"),g=a.delta.font.size),a._scaleNumbers=(!a._hasNumber||u[0])&&(!a._hasDelta||u[1])||!1,f("title.font.color",p.font.color),f("title.font.family",p.font.family),f("title.font.size",.25*(v||g||d.defaultNumberFontSize)),f("title.text"),a._hasGauge){(y=i.gauge)||(y={}),h=T.newContainer(a,"gauge"),S("shape"),(a._isBullet="bullet"===a.gauge.shape)||f("title.align","center"),(a._isAngular="angular"===a.gauge.shape)||f("align","center"),S("bgcolor",p.paper_bgcolor),S("borderwidth"),S("bordercolor"),S("bar.color"),S("bar.line.color"),S("bar.line.width"),S("bar.thickness",d.valueThickness*("bullet"===a.gauge.shape?.5:1)),b(y,h,{name:"steps",handleItemDefaults:n}),S("threshold.value"),S("threshold.thickness"),S("threshold.line.width"),S("threshold.line.color"),m={},y&&(m=y.axis||{}),w=T.newContainer(h,"axis"),_("visible"),a._range=_("range",a._range);var E={outerTicks:!0};s(m,w,_,"linear"),r(m,w,_,"linear",E),o(m,w,_,"linear",E),t(m,w,_,E)}else f("title.align","center"),f("align","center"),a._isAngular=a._isBullet=!1;a._length=null}}},15154:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"indicator",basePlotModule:e(15970),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:e(54846),supplyDefaults:e(94425).supplyDefaults,calc:e(24667).calc,plot:e(75634),meta:{}}},75634:function($,R,e){"use strict";var k=e(39898),A=e(29502).sX,l=e(29502).k4,T=e(71828),b=T.strScale,d=T.strTranslate,s=T.rad2deg,t=e(18783).MID_SHIFT,o=e(91424),r=e(84577),n=e(63893),i=e(89298),a=e(71453),c=e(52830),p=e(13838),f=e(7901),x={left:"start",center:"middle",right:"end"},v={left:0,center:.5,right:1},g=/[yzafpn\xb5mkMGTPEZY]/;function y(_){return _&&_.duration>0}function h(_){_.each(function(E){f.stroke(k.select(this),E.line.color)}).each(function(E){f.fill(k.select(this),E.color)}).style("stroke-width",function(E){return E.line.width})}function m(_,E,L){var C=_._fullLayout,P=T.extendFlat({type:"linear",ticks:"outside",range:L,showline:!0},E),I={type:"linear",_id:"x"+E._id},U={letter:"x",font:C.font,noHover:!0,noTickson:!0};function z(H,F){return T.coerce(P,I,p,H,F)}return a(P,I,z,U,C),c(P,I,z,U),I}function w(_,E,L){return[Math.min(E/_.width,L/_.height),_,E+"x"+L]}function u(_,E,L,C){var P=document.createElementNS("http://www.w3.org/2000/svg","text"),I=k.select(P);return I.text(_).attr("x",0).attr("y",0).attr("text-anchor",L).attr("data-unformatted",_).call(n.convertToTspans,C).call(o.font,E),o.bBox(I.node())}function S(_,E,L,C,P,I){var U="_cache"+E;_[U]&&_[U].key===P||(_[U]={key:P,value:L});var z=T.aggNums(I,null,[_[U].value,C],2);return _[U].value=z,z}$.exports=function(_,E,L,C){var P,I=_._fullLayout;y(L)&&C&&(P=C()),T.makeTraceGroups(I._indicatorlayer,E,"trace").each(function(U){var z,H,F,N,B,j=U[0].trace,J=k.select(this),G=j._hasGauge,V=j._isAngular,W=j._isBullet,X=j.domain,K={w:I._size.w*(X.x[1]-X.x[0]),h:I._size.h*(X.y[1]-X.y[0]),l:I._size.l+I._size.w*X.x[0],r:I._size.r+I._size.w*(1-X.x[1]),t:I._size.t+I._size.h*(1-X.y[1]),b:I._size.b+I._size.h*X.y[0]},re=K.l+K.w/2,ee=K.t+K.h/2,ie=Math.min(K.w/2,K.h),oe=r.innerRadius*ie,ce=j.align||"center";if(H=ee,G){if(V&&(z=re,H=ee+ie/2,F=function(Ae){return Te=Ae,[(Q=.9*oe)/Math.sqrt(Te.width/2*(Te.width/2)+Te.height*Te.height),Te,Q];var Te,Q}),W){var me=r.bulletPadding,de=1-r.bulletNumberDomainSize+me;z=K.l+(de+(1-de)*v[ce])*K.w,F=function(Ae){return w(Ae,(r.bulletNumberDomainSize-me)*K.w,K.h)}}}else z=K.l+v[ce]*K.w,F=function(Ae){return w(Ae,K.w,K.h)};(function(Ae,Te,Q,se){var fe,ye,Me,Ie=Q[0].trace,Ce=se.numbersX,Re=se.numbersY,le=Ie.align||"center",ge=x[le],_e=se.transitionOpts,Fe=se.onComplete,Ve=T.ensureSingle(Te,"g","numbers"),He=[];Ie._hasNumber&&He.push("number"),Ie._hasDelta&&(He.push("delta"),"left"===Ie.delta.position&&He.reverse());var nt=Ve.selectAll("text").data(He);function tt(It,Ut,Rt,Ge){if(!It.match("s")||Rt>=0==Ge>=0||Ut(Rt).slice(-1).match(g)||Ut(Ge).slice(-1).match(g))return Ut;var We=It.slice().replace("s","f").replace(/\d+/,function(Ye){return parseInt(Ye)-1}),Be=m(Ae,{tickformat:We});return function(Ye){return Math.abs(Ye)<1?i.tickText(Be,Ye).text:Ut(Ye)}}nt.enter().append("text"),nt.attr("text-anchor",function(){return ge}).attr("class",function(It){return It}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),nt.exit().remove();var ot,dt=Ie.mode+Ie.align;if(Ie._hasDelta&&(ot=function(){var It=m(Ae,{tickformat:Ie.delta.valueformat},Ie._range);It.setScale(),i.prepTicks(It);var Ut=function(ze){return i.tickText(It,ze).text},Rt=Ie.delta.suffix,Ge=Ie.delta.prefix,We=function(ze){return Ie.delta.relative?ze.relativeDelta:ze.delta},Be=function(ze,Ke){return 0===ze||"number"!=typeof ze||isNaN(ze)?"-":(ze>0?Ie.delta.increasing.symbol:Ie.delta.decreasing.symbol)+Ge+Ke(ze)+Rt},Ye=function(ze){return ze.delta>=0?Ie.delta.increasing.color:Ie.delta.decreasing.color};void 0===Ie._deltaLastValue&&(Ie._deltaLastValue=We(Q[0]));var rt=Ve.select("text.delta");function Se(){rt.text(Be(We(Q[0]),Ut)).call(f.fill,Ye(Q[0])).call(n.convertToTspans,Ae)}return rt.call(o.font,Ie.delta.font).call(f.fill,Ye({delta:Ie._deltaLastValue})),y(_e)?rt.transition().duration(_e.duration).ease(_e.easing).tween("text",function(){var ze=k.select(this),Ke=We(Q[0]),st=Ie._deltaLastValue,ct=tt(Ie.delta.valueformat,Ut,st,Ke),Tt=l(st,Ke);return Ie._deltaLastValue=Ke,function(Et){ze.text(Be(Tt(Et),ct)),ze.call(f.fill,Ye({delta:Tt(Et)}))}}).each("end",function(){Se(),Fe&&Fe()}).each("interrupt",function(){Se(),Fe&&Fe()}):Se(),ye=u(Be(We(Q[0]),Ut),Ie.delta.font,ge,Ae),rt}(),dt+=Ie.delta.position+Ie.delta.font.size+Ie.delta.font.family+Ie.delta.valueformat,dt+=Ie.delta.increasing.symbol+Ie.delta.decreasing.symbol,Me=ye),Ie._hasNumber&&(function(){var It=m(Ae,{tickformat:Ie.number.valueformat},Ie._range);It.setScale(),i.prepTicks(It);var Ut=function(Ye){return i.tickText(It,Ye).text},Rt=Ie.number.suffix,Ge=Ie.number.prefix,We=Ve.select("text.number");function Be(){var Ye="number"==typeof Q[0].y?Ge+Ut(Q[0].y)+Rt:"-";We.text(Ye).call(o.font,Ie.number.font).call(n.convertToTspans,Ae)}y(_e)?We.transition().duration(_e.duration).ease(_e.easing).each("end",function(){Be(),Fe&&Fe()}).each("interrupt",function(){Be(),Fe&&Fe()}).attrTween("text",function(){var Ye=k.select(this),rt=l(Q[0].lastY,Q[0].y);Ie._lastValue=Q[0].y;var Se=tt(Ie.number.valueformat,Ut,Q[0].lastY,Q[0].y);return function(ze){Ye.text(Ge+Se(rt(ze))+Rt)}}):Be(),fe=u(Ge+Ut(Q[0].y)+Rt,Ie.number.font,ge,Ae)}(),dt+=Ie.number.font.size+Ie.number.font.family+Ie.number.valueformat+Ie.number.suffix+Ie.number.prefix,Me=fe),Ie._hasDelta&&Ie._hasNumber){var kt,mt,wt=[(fe.left+fe.right)/2,(fe.top+fe.bottom)/2],Lt=[(ye.left+ye.right)/2,(ye.top+ye.bottom)/2],Ct=.75*Ie.delta.font.size;"left"===Ie.delta.position&&(kt=S(Ie,"deltaPos",0,-1*(fe.width*v[Ie.align]+ye.width*(1-v[Ie.align])+Ct),dt,Math.min),mt=wt[1]-Lt[1],Me={width:fe.width+ye.width+Ct,height:Math.max(fe.height,ye.height),left:ye.left+kt,right:fe.right,top:Math.min(fe.top,ye.top+mt),bottom:Math.max(fe.bottom,ye.bottom+mt)}),"right"===Ie.delta.position&&(kt=S(Ie,"deltaPos",0,fe.width*(1-v[Ie.align])+ye.width*v[Ie.align]+Ct,dt,Math.max),mt=wt[1]-Lt[1],Me={width:fe.width+ye.width+Ct,height:Math.max(fe.height,ye.height),left:fe.left,right:ye.right+kt,top:Math.min(fe.top,ye.top+mt),bottom:Math.max(fe.bottom,ye.bottom+mt)}),"bottom"===Ie.delta.position&&(kt=null,mt=ye.height,Me={width:Math.max(fe.width,ye.width),height:fe.height+ye.height,left:Math.min(fe.left,ye.left),right:Math.max(fe.right,ye.right),top:fe.bottom-fe.height,bottom:fe.bottom+ye.height}),"top"===Ie.delta.position&&(kt=null,mt=fe.top,Me={width:Math.max(fe.width,ye.width),height:fe.height+ye.height,left:Math.min(fe.left,ye.left),right:Math.max(fe.right,ye.right),top:fe.bottom-fe.height-ye.height,bottom:fe.bottom}),ot.attr({dx:kt,dy:mt})}(Ie._hasNumber||Ie._hasDelta)&&Ve.attr("transform",function(){var Ut,It=se.numbersScaler(Me),Rt=S(Ie,"numbersScale",1,It[0],dt+=It[2],Math.min);Ie._scaleNumbers||(Rt=1),Ie._numbersTop=Rt*Me.top+(Ut=Ie._isAngular?Re-Rt*Me.bottom:Re-Rt*(Me.top+Me.bottom)/2);var Ge=Me[le];"center"===le&&(Ge=(Me.left+Me.right)/2);var We=Ce-Rt*Ge;return We=S(Ie,"numbersTranslate",0,We,dt,Math.max),d(We,Ut)+b(Rt)})})(_,J,U,{numbersX:z,numbersY:H,numbersScaler:F,transitionOpts:L,onComplete:P}),G&&(N={range:j.gauge.axis.range,color:j.gauge.bgcolor,line:{color:j.gauge.bordercolor,width:0},thickness:1},B={range:j.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:j.gauge.bordercolor,width:j.gauge.borderwidth},thickness:1});var he=J.selectAll("g.angular").data(V?U:[]);he.exit().remove();var ve=J.selectAll("g.angularaxis").data(V?U:[]);ve.exit().remove(),V&&function(Ae,Te,Q,se){var fe,ye,Me,Ie,Ce=Q[0].trace,Re=se.size,le=se.radius,ge=se.innerRadius,_e=se.gaugeBg,Fe=se.gaugeOutline,Ve=[Re.l+Re.w/2,Re.t+Re.h/2+le/2],He=se.gauge,nt=se.layer,tt=se.transitionOpts,ot=se.onComplete,dt=Math.PI/2;function kt(Et){var At=Ce.gauge.axis.range[0],ht=(Et-At)/(Ce.gauge.axis.range[1]-At)*Math.PI-dt;return ht<-dt?-dt:ht>dt?dt:ht}function mt(Et){return k.svg.arc().innerRadius((ge+le)/2-Et/2*(le-ge)).outerRadius((ge+le)/2+Et/2*(le-ge)).startAngle(-dt)}function wt(Et){Et.attr("d",function(At){return mt(At.thickness).startAngle(kt(At.range[0])).endAngle(kt(At.range[1]))()})}He.enter().append("g").classed("angular",!0),He.attr("transform",d(Ve[0],Ve[1])),nt.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),nt.selectAll("g.xangularaxistick,path,text").remove(),(fe=m(Ae,Ce.gauge.axis)).type="linear",fe.range=Ce.gauge.axis.range,fe._id="xangularaxis",fe.ticklabeloverflow="allow",fe.setScale();var Lt=function(Et){return(fe.range[0]-Et.x)/(fe.range[1]-fe.range[0])*Math.PI+Math.PI},Ct={},It=i.makeLabelFns(fe,0).labelStandoff;Ct.xFn=function(Et){var At=Lt(Et);return Math.cos(At)*It},Ct.yFn=function(Et){var At=Lt(Et),ht=Math.sin(At)>0?.2:1;return-Math.sin(At)*(It+Et.fontSize*ht)+Math.abs(Math.cos(At))*(Et.fontSize*t)},Ct.anchorFn=function(Et){var At=Lt(Et),ht=Math.cos(At);return Math.abs(ht)<.1?"middle":ht>0?"start":"end"},Ct.heightFn=function(Et,At,ht){var pt=Lt(Et);return-.5*(1+Math.sin(pt))*ht};var Ut=function(Et){return d(Ve[0]+le*Math.cos(Et),Ve[1]-le*Math.sin(Et))};Me=function(Et){return Ut(Lt(Et))},ye=i.calcTicks(fe),Ie=i.getTickSigns(fe)[2],fe.visible&&(i.drawTicks(Ae,fe,{vals:ye,layer:nt,path:"M"+(Ie="inside"===fe.ticks?-1:1)*((fe.linewidth||1)/2)+",0h"+Ie*fe.ticklen,transFn:function(Et){var At=Lt(Et);return Ut(At)+"rotate("+-s(At)+")"}}),i.drawLabels(Ae,fe,{vals:ye,layer:nt,transFn:Me,labelFns:Ct}));var Ge=[_e].concat(Ce.gauge.steps),We=He.selectAll("g.bg-arc").data(Ge);We.enter().append("g").classed("bg-arc",!0).append("path"),We.select("path").call(wt).call(h),We.exit().remove();var Be=mt(Ce.gauge.bar.thickness),Ye=He.selectAll("g.value-arc").data([Ce.gauge.bar]);Ye.enter().append("g").classed("value-arc",!0).append("path");var rt,Se,ze,Ke=Ye.select("path");y(tt)?(Ke.transition().duration(tt.duration).ease(tt.easing).each("end",function(){ot&&ot()}).each("interrupt",function(){ot&&ot()}).attrTween("d",(rt=Be,Se=kt(Q[0].lastY),ze=kt(Q[0].y),function(){var Et=A(Se,ze);return function(At){return rt.endAngle(Et(At))()}})),Ce._lastValue=Q[0].y):Ke.attr("d","number"==typeof Q[0].y?Be.endAngle(kt(Q[0].y)):"M0,0Z"),Ke.call(h),Ye.exit().remove(),Ge=[];var st=Ce.gauge.threshold.value;(st||0===st)&&Ge.push({range:[st,st],color:Ce.gauge.threshold.color,line:{color:Ce.gauge.threshold.line.color,width:Ce.gauge.threshold.line.width},thickness:Ce.gauge.threshold.thickness});var ct=He.selectAll("g.threshold-arc").data(Ge);ct.enter().append("g").classed("threshold-arc",!0).append("path"),ct.select("path").call(wt).call(h),ct.exit().remove();var Tt=He.selectAll("g.gauge-outline").data([Fe]);Tt.enter().append("g").classed("gauge-outline",!0).append("path"),Tt.select("path").call(wt).call(h),Tt.exit().remove()}(_,0,U,{radius:ie,innerRadius:oe,gauge:he,layer:ve,size:K,gaugeBg:N,gaugeOutline:B,transitionOpts:L,onComplete:P});var Pe=J.selectAll("g.bullet").data(W?U:[]);Pe.exit().remove();var xe=J.selectAll("g.bulletaxis").data(W?U:[]);xe.exit().remove(),W&&function(Ae,Te,Q,se){var fe,ye,Me,Ie,Ce,Re=Q[0].trace,le=se.gauge,ge=se.layer,_e=se.gaugeBg,Fe=se.gaugeOutline,Ve=se.size,He=Re.domain,nt=se.transitionOpts,tt=se.onComplete;le.enter().append("g").classed("bullet",!0),le.attr("transform",d(Ve.l,Ve.t)),ge.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),ge.selectAll("g.xbulletaxistick,path,text").remove();var ot=Ve.h,dt=Re.gauge.bar.thickness*ot,kt=He.x[0],mt=He.x[0]+(He.x[1]-He.x[0])*(Re._hasNumber||Re._hasDelta?1-r.bulletNumberDomainSize:1);function wt(We){We.attr("width",function(Be){return Math.max(0,fe.c2p(Be.range[1])-fe.c2p(Be.range[0]))}).attr("x",function(Be){return fe.c2p(Be.range[0])}).attr("y",function(Be){return.5*(1-Be.thickness)*ot}).attr("height",function(Be){return Be.thickness*ot})}(fe=m(Ae,Re.gauge.axis))._id="xbulletaxis",fe.domain=[kt,mt],fe.setScale(),ye=i.calcTicks(fe),Me=i.makeTransTickFn(fe),Ie=i.getTickSigns(fe)[2],Ce=Ve.t+Ve.h,fe.visible&&(i.drawTicks(Ae,fe,{vals:"inside"===fe.ticks?i.clipEnds(fe,ye):ye,layer:ge,path:i.makeTickPath(fe,Ce,Ie),transFn:Me}),i.drawLabels(Ae,fe,{vals:ye,layer:ge,transFn:Me,labelFns:i.makeLabelFns(fe,Ce)}));var Lt=[_e].concat(Re.gauge.steps),Ct=le.selectAll("g.bg-bullet").data(Lt);Ct.enter().append("g").classed("bg-bullet",!0).append("rect"),Ct.select("rect").call(wt).call(h),Ct.exit().remove();var It=le.selectAll("g.value-bullet").data([Re.gauge.bar]);It.enter().append("g").classed("value-bullet",!0).append("rect"),It.select("rect").attr("height",dt).attr("y",(ot-dt)/2).call(h),y(nt)?It.select("rect").transition().duration(nt.duration).ease(nt.easing).each("end",function(){tt&&tt()}).each("interrupt",function(){tt&&tt()}).attr("width",Math.max(0,fe.c2p(Math.min(Re.gauge.axis.range[1],Q[0].y)))):It.select("rect").attr("width","number"==typeof Q[0].y?Math.max(0,fe.c2p(Math.min(Re.gauge.axis.range[1],Q[0].y))):0),It.exit().remove();var Ut=Q.filter(function(){return Re.gauge.threshold.value||0===Re.gauge.threshold.value}),Rt=le.selectAll("g.threshold-bullet").data(Ut);Rt.enter().append("g").classed("threshold-bullet",!0).append("line"),Rt.select("line").attr("x1",fe.c2p(Re.gauge.threshold.value)).attr("x2",fe.c2p(Re.gauge.threshold.value)).attr("y1",(1-Re.gauge.threshold.thickness)/2*ot).attr("y2",(1-(1-Re.gauge.threshold.thickness)/2)*ot).call(f.stroke,Re.gauge.threshold.line.color).style("stroke-width",Re.gauge.threshold.line.width),Rt.exit().remove();var Ge=le.selectAll("g.gauge-outline").data([Fe]);Ge.enter().append("g").classed("gauge-outline",!0).append("rect"),Ge.select("rect").call(wt).call(h),Ge.exit().remove()}(_,0,U,{gauge:Pe,layer:xe,size:K,gaugeBg:N,gaugeOutline:B,transitionOpts:L,onComplete:P});var ke=J.selectAll("text.title").data(U);ke.exit().remove(),ke.enter().append("text").classed("title",!0),ke.attr("text-anchor",function(){return W?x.right:x[j.title.align]}).text(j.title.text).call(o.font,j.title.font).call(n.convertToTspans,_),ke.attr("transform",function(){var Ae,Te=K.l+K.w*v[j.title.align],Q=r.titlePadding,se=o.bBox(ke.node());return G?(V&&(Ae=j.gauge.axis.visible?o.bBox(ve.node()).top-Q-se.bottom:K.t+K.h/2-ie/2-se.bottom-Q),W&&(Ae=H-(se.top+se.bottom)/2,Te=K.l-r.bulletPadding*K.w)):Ae=j._numbersTop-Q-se.bottom,d(Te,Ae)})})}},16249:function($,R,e){"use strict";var k=e(50693),A=e(12663).axisHoverFormat,l=e(5386).f,T=e(2418),b=e(9012),d=e(1426).extendFlat,s=e(30962).overrideAll,t=$.exports=s(d({x:{valType:"data_array"},y:{valType:"data_array"},z:{valType:"data_array"},value:{valType:"data_array"},isomin:{valType:"number"},isomax:{valType:"number"},surface:{show:{valType:"boolean",dflt:!0},count:{valType:"integer",dflt:2,min:1},fill:{valType:"number",min:0,max:1,dflt:1},pattern:{valType:"flaglist",flags:["A","B","C","D","E"],extras:["all","odd","even"],dflt:"all"}},spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:.15}},slices:{x:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}},caps:{x:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},y:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}},z:{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:l(),xhoverformat:A("x"),yhoverformat:A("y"),zhoverformat:A("z"),valuehoverformat:A("value",1),showlegend:d({},b.showlegend,{dflt:!1})},k("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:T.opacity,lightposition:T.lightposition,lighting:T.lighting,flatshading:T.flatshading,contour:T.contour,hoverinfo:d({},b.hoverinfo)}),"calc","nested");t.flatshading.dflt=!0,t.lighting.facenormalsepsilon.dflt=0,t.x.editType=t.y.editType=t.z.editType=t.value.editType="calc+clearAxisTypes",t.transforms=void 0},56959:function($,R,e){"use strict";var k=e(78803),A=e(88489).processGrid,l=e(88489).filter;$.exports=function(T,b){b._len=Math.min(b.x.length,b.y.length,b.z.length,b.value.length),b._x=l(b.x,b._len),b._y=l(b.y,b._len),b._z=l(b.z,b._len),b._value=l(b.value,b._len);var d=A(b);b._gridFill=d.fill,b._Xs=d.Xs,b._Ys=d.Ys,b._Zs=d.Zs,b._len=d.len;for(var s=1/0,t=-1/0,o=0;o<b._len;o++){var r=b._value[o];s=Math.min(s,r),t=Math.max(t,r)}b._minValues=s,b._maxValues=t,b._vMin=null==b.isomin?s:b.isomin,b._vMax=void 0===b.isomax||null===b.isomin?t:b.isomax,k(T,b,{vals:[b._vMin,b._vMax],containerStr:"",cLetter:"c"})}},22674:function($,R,e){"use strict";var k=e(9330).gl_mesh3d,A=e(81697).parseColorScale,l=e(78614),T=e(21081).extractOpts,b=e(90060),d=function(n,i){for(var a=i.length-1;a>0;a--){var c=Math.min(i[a],i[a-1]),p=Math.max(i[a],i[a-1]);if(p>c&&c<n&&n<=p)return{id:a,distRatio:(p-n)/(p-c)}}return{id:0,distRatio:0}};function s(n,i,a){this.scene=n,this.uid=a,this.mesh=i,this.name="",this.data=null,this.showContour=!1}var t=s.prototype;t.handlePick=function(n){if(n.object===this.mesh){var i=n.data.index,c=this.data._meshY[i],p=this.data._meshZ[i],f=this.data._Ys.length,x=this.data._Zs.length,v=d(this.data._meshX[i],this.data._Xs).id,g=d(c,this.data._Ys).id,y=d(p,this.data._Zs).id,h=n.index=y+x*g+x*f*v;n.traceCoordinate=[this.data._meshX[h],this.data._meshY[h],this.data._meshZ[h],this.data._value[h]];var m=this.data.hovertext||this.data.text;return Array.isArray(m)&&void 0!==m[h]?n.textLabel=m[h]:m&&(n.textLabel=m),!0}},t.update=function(n){var i=this.scene,a=i.fullSceneLayout;function c(x,v,g,y){return v.map(function(h){return x.d2l(h,0,y)*g})}this.data=r(n);var p={positions:b(c(a.xaxis,n._meshX,i.dataScale[0],n.xcalendar),c(a.yaxis,n._meshY,i.dataScale[1],n.ycalendar),c(a.zaxis,n._meshZ,i.dataScale[2],n.zcalendar)),cells:b(n._meshI,n._meshJ,n._meshK),lightPosition:[n.lightposition.x,n.lightposition.y,n.lightposition.z],ambient:n.lighting.ambient,diffuse:n.lighting.diffuse,specular:n.lighting.specular,roughness:n.lighting.roughness,fresnel:n.lighting.fresnel,vertexNormalsEpsilon:n.lighting.vertexnormalsepsilon,faceNormalsEpsilon:n.lighting.facenormalsepsilon,opacity:n.opacity,contourEnable:n.contour.show,contourColor:l(n.contour.color).slice(0,3),contourWidth:n.contour.width,useFacetNormals:n.flatshading},f=T(n);p.vertexIntensity=n._meshIntensity,p.vertexIntensityBounds=[f.min,f.max],p.colormap=A(n),this.mesh.update(p)},t.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};var o=["xyz","xzy","yxz","yzx","zxy","zyx"];function r(n){n._meshI=[],n._meshJ=[],n._meshK=[];var i,a,c,p,f,x,v,g=n.surface.show,y=n.spaceframe.show,h=n.surface.fill,m=n.spaceframe.fill,w=!1,u=!1,S=0,_=n._Xs,E=n._Ys,L=n._Zs,C=_.length,P=E.length,I=L.length,U=o.indexOf(n._gridFill.replace(/-/g,"").replace(/\+/g,"")),z=function(Re,le,ge){switch(U){case 5:return ge+I*le+I*P*Re;case 4:return ge+I*Re+I*C*le;case 3:return le+P*ge+P*I*Re;case 2:return le+P*Re+P*C*ge;case 1:return Re+C*ge+C*I*le;default:return Re+C*le+C*P*ge}},H=n._minValues,F=n._maxValues,N=n._vMin,B=n._vMax;function j(Re,le,ge){for(var _e=x.length,Fe=a;Fe<_e;Fe++)if(Re===c[Fe]&&le===p[Fe]&&ge===f[Fe])return Fe;return-1}function J(){a=i}function G(){c=[],p=[],f=[],x=[],i=0,J()}function V(Re,le,ge,_e){return c.push(Re),p.push(le),f.push(ge),x.push(_e),++i-1}function W(Re,le,ge){for(var _e=[],Fe=0;Fe<Re.length;Fe++)_e[Fe]=Re[Fe]*(1-ge)+ge*le[Fe];return _e}function X(Re){v=Re}function K(Re,le){return"all"===Re||null===Re||Re.indexOf(le)>-1}function re(Re,le){return null===Re?le:Re}function ee(Re,le,ge){J();var Fe,Ve,Ut,Rt,Ge,We,Be,Ye,rt,Se,ze,Ke,st,ct,Tt,He=[le],nt=[ge];if(v>=1)He=[le],nt=[ge];else if(v>0){var tt=(Rt=ge,Se=W(Ye=function(Et,At,ht){for(var pt=[],gt=0;gt<Et.length;gt++)pt[gt]=(Et[gt]+At[gt]+ht[gt])/3;return pt}(Ge=(Ut=le)[0],We=Ut[1],Be=Ut[2]),Ge,rt=Math.sqrt(1-v)),{xyzv:[[Ge,We,ze=W(Ye,We,rt)],[ze,Se,Ge],[We,Be,Ke=W(Ye,Be,rt)],[Ke,ze,We],[Be,Ge,Se],[Se,Ke,Be]],abc:[[st=Rt[0],ct=Rt[1],-1],[-1,-1,st],[ct,Tt=Rt[2],-1],[-1,-1,ct],[Tt,st,-1],[-1,-1,Tt]]});He=tt.xyzv,nt=tt.abc}for(var ot=0;ot<He.length;ot++){le=He[ot],ge=nt[ot];for(var dt=[],kt=0;kt<3;kt++){var mt=le[kt][0],wt=le[kt][1],Lt=le[kt][2],Ct=le[kt][3],It=ge[kt]>-1?ge[kt]:j(mt,wt,Lt);dt[kt]=It>-1?It:V(mt,wt,Lt,re(Re,Ct))}Fe=dt[1],Ve=dt[2],n._meshI.push(dt[0]),n._meshJ.push(Fe),n._meshK.push(Ve),++S}}function ie(Re,le,ge,_e){var Fe=Re[3];Fe<ge&&(Fe=ge),Fe>_e&&(Fe=_e);for(var Ve=(Re[3]-Fe)/(Re[3]-le[3]+1e-9),He=[],nt=0;nt<4;nt++)He[nt]=(1-Ve)*Re[nt]+Ve*le[nt];return He}function oe(Re,le,ge){return Re>=le&&Re<=ge}function ce(Re){var le=.001*(B-N);return Re>=N-le&&Re<=B+le}function me(Re){for(var le=[],ge=0;ge<4;ge++){var _e=Re[ge];le.push([n._x[_e],n._y[_e],n._z[_e],n._value[_e]])}return le}function de(Re,le,ge,_e,Fe,Ve){Ve||(Ve=1),ge=[-1,-1,-1];var He=!1,nt=[oe(le[0][3],_e,Fe),oe(le[1][3],_e,Fe),oe(le[2][3],_e,Fe)];if(!nt[0]&&!nt[1]&&!nt[2])return!1;var tt=function(dt,kt,mt){return ce(kt[0][3])&&ce(kt[1][3])&&ce(kt[2][3])?(ee(dt,kt,mt),!0):Ve<3&&de(dt,kt,mt,N,B,++Ve)};if(nt[0]&&nt[1]&&nt[2])return tt(Re,le,ge)||He;var ot=!1;return[[0,1,2],[2,0,1],[1,2,0]].forEach(function(dt){if(nt[dt[0]]&&nt[dt[1]]&&!nt[dt[2]]){var kt=le[dt[0]],mt=le[dt[1]],wt=le[dt[2]],Lt=ie(wt,kt,_e,Fe),Ct=ie(wt,mt,_e,Fe);He=tt(Re,[Ct,Lt,kt],[-1,-1,ge[dt[0]]])||He,He=tt(Re,[kt,mt,Ct],[ge[dt[0]],ge[dt[1]],-1])||He,ot=!0}}),ot||[[0,1,2],[1,2,0],[2,0,1]].forEach(function(dt){if(nt[dt[0]]&&!nt[dt[1]]&&!nt[dt[2]]){var kt=le[dt[0]],wt=le[dt[2]],Lt=ie(le[dt[1]],kt,_e,Fe),Ct=ie(wt,kt,_e,Fe);He=tt(Re,[Ct,Lt,kt],[-1,-1,ge[dt[0]]])||He,ot=!0}}),He}function he(Re,le,ge,_e){var tt,ot,dt,kt,Fe=!1,Ve=me(le),He=[oe(Ve[0][3],ge,_e),oe(Ve[1][3],ge,_e),oe(Ve[2][3],ge,_e),oe(Ve[3][3],ge,_e)];if(!(He[0]||He[1]||He[2]||He[3]))return Fe;if(He[0]&&He[1]&&He[2]&&He[3])return u&&(tt=Re,ot=Ve,dt=le,(kt=function(mt,wt,Lt){ee(tt,[ot[mt],ot[wt],ot[Lt]],[dt[mt],dt[wt],dt[Lt]])})(0,1,2),kt(3,0,1),kt(2,3,0),Fe=void kt(1,2,3)||Fe),Fe;var nt=!1;return[[0,1,2,3],[3,0,1,2],[2,3,0,1],[1,2,3,0]].forEach(function(tt){if(He[tt[0]]&&He[tt[1]]&&He[tt[2]]&&!He[tt[3]]){var ot=Ve[tt[0]],dt=Ve[tt[1]],kt=Ve[tt[2]],mt=Ve[tt[3]];if(u)Fe=ee(Re,[ot,dt,kt],[le[tt[0]],le[tt[1]],le[tt[2]]])||Fe;else{var wt=ie(mt,ot,ge,_e),Lt=ie(mt,dt,ge,_e),Ct=ie(mt,kt,ge,_e);Fe=ee(null,[wt,Lt,Ct],[-1,-1,-1])||Fe}nt=!0}}),nt||([[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2],[0,2,3,1],[1,3,2,0]].forEach(function(tt){if(He[tt[0]]&&He[tt[1]]&&!He[tt[2]]&&!He[tt[3]]){var ot=Ve[tt[0]],dt=Ve[tt[1]],kt=Ve[tt[2]],mt=Ve[tt[3]],wt=ie(kt,ot,ge,_e),Lt=ie(kt,dt,ge,_e),Ct=ie(mt,dt,ge,_e),It=ie(mt,ot,ge,_e);u?(Fe=ee(Re,[ot,It,wt],[le[tt[0]],-1,-1])||Fe,Fe=ee(Re,[dt,Lt,Ct],[le[tt[1]],-1,-1])||Fe):(Rt=[wt,Lt,Ct,It],Ge=[-1,-1,-1,-1],(We=function(Be,Ye,rt){ee(null,[Rt[Be],Rt[Ye],Rt[rt]],[Ge[Be],Ge[Ye],Ge[rt]])})(0,1,2),Fe=void We(2,3,0)||Fe),nt=!0}var Rt,Ge,We}),nt||[[0,1,2,3],[1,2,3,0],[2,3,0,1],[3,0,1,2]].forEach(function(tt){if(He[tt[0]]&&!He[tt[1]]&&!He[tt[2]]&&!He[tt[3]]){var ot=Ve[tt[0]],kt=Ve[tt[2]],mt=Ve[tt[3]],wt=ie(Ve[tt[1]],ot,ge,_e),Lt=ie(kt,ot,ge,_e),Ct=ie(mt,ot,ge,_e);u?(Fe=ee(Re,[ot,wt,Lt],[le[tt[0]],-1,-1])||Fe,Fe=ee(Re,[ot,Lt,Ct],[le[tt[0]],-1,-1])||Fe,Fe=ee(Re,[ot,Ct,wt],[le[tt[0]],-1,-1])||Fe):Fe=ee(null,[wt,Lt,Ct],[-1,-1,-1])||Fe,nt=!0}})),Fe}function ve(Re,le,ge,_e,Fe,Ve,He,nt,tt,ot,dt){var kt=!1;return w&&(K(Re,"A")&&(kt=he(null,[le,ge,_e,Ve],ot,dt)||kt),K(Re,"B")&&(kt=he(null,[ge,_e,Fe,tt],ot,dt)||kt),K(Re,"C")&&(kt=he(null,[ge,Ve,He,tt],ot,dt)||kt),K(Re,"D")&&(kt=he(null,[_e,Ve,nt,tt],ot,dt)||kt),K(Re,"E")&&(kt=he(null,[ge,_e,Ve,tt],ot,dt)||kt)),u&&(kt=he(Re,[ge,_e,Ve,tt],ot,dt)||kt),kt}function Pe(Re,le,ge,_e,Fe,Ve,He,nt){return[!0===nt[0]||de(Re,me([le,ge,_e]),[le,ge,_e],Ve,He),!0===nt[1]||de(Re,me([_e,Fe,le]),[_e,Fe,le],Ve,He)]}function xe(Re,le,ge,_e,Fe,Ve,He,nt,tt){return nt?Pe(Re,le,ge,Fe,_e,Ve,He,tt):Pe(Re,ge,Fe,_e,le,Ve,He,tt)}function ke(Re,le,ge,_e,Fe,Ve,He){var nt,tt,ot,dt,kt=!1,mt=function(){kt=de(Re,[nt,tt,ot],[-1,-1,-1],Fe,Ve)||kt,kt=de(Re,[ot,dt,nt],[-1,-1,-1],Fe,Ve)||kt},wt=He[0],Lt=He[1],Ct=He[2];return wt&&(nt=W(me([z(le,ge-0,_e-0)])[0],me([z(le-1,ge-0,_e-0)])[0],wt),tt=W(me([z(le,ge-0,_e-1)])[0],me([z(le-1,ge-0,_e-1)])[0],wt),ot=W(me([z(le,ge-1,_e-1)])[0],me([z(le-1,ge-1,_e-1)])[0],wt),dt=W(me([z(le,ge-1,_e-0)])[0],me([z(le-1,ge-1,_e-0)])[0],wt),mt()),Lt&&(nt=W(me([z(le-0,ge,_e-0)])[0],me([z(le-0,ge-1,_e-0)])[0],Lt),tt=W(me([z(le-0,ge,_e-1)])[0],me([z(le-0,ge-1,_e-1)])[0],Lt),ot=W(me([z(le-1,ge,_e-1)])[0],me([z(le-1,ge-1,_e-1)])[0],Lt),dt=W(me([z(le-1,ge,_e-0)])[0],me([z(le-1,ge-1,_e-0)])[0],Lt),mt()),Ct&&(nt=W(me([z(le-0,ge-0,_e)])[0],me([z(le-0,ge-0,_e-1)])[0],Ct),tt=W(me([z(le-0,ge-1,_e)])[0],me([z(le-0,ge-1,_e-1)])[0],Ct),ot=W(me([z(le-1,ge-1,_e)])[0],me([z(le-1,ge-1,_e-1)])[0],Ct),dt=W(me([z(le-1,ge-0,_e)])[0],me([z(le-1,ge-0,_e-1)])[0],Ct),mt()),kt}function Ae(Re,le,ge,_e,Fe,Ve,He,nt,tt,ot,dt,kt){var mt=Re;return kt?(w&&"even"===Re&&(mt=null),ve(mt,le,ge,_e,Fe,Ve,He,nt,tt,ot,dt)):(w&&"odd"===Re&&(mt=null),ve(mt,tt,nt,He,Ve,Fe,_e,ge,le,ot,dt))}function Te(Re,le,ge,_e,Fe){for(var Ve=[],He=0,nt=0;nt<le.length;nt++)for(var tt=le[nt],ot=1;ot<I;ot++)for(var dt=1;dt<P;dt++)Ve.push(xe(Re,z(tt,dt-1,ot-1),z(tt,dt-1,ot),z(tt,dt,ot-1),z(tt,dt,ot),ge,_e,(tt+dt+ot)%2,Fe&&Fe[He]?Fe[He]:[])),He++;return Ve}function Q(Re,le,ge,_e,Fe){for(var Ve=[],He=0,nt=0;nt<le.length;nt++)for(var tt=le[nt],ot=1;ot<C;ot++)for(var dt=1;dt<I;dt++)Ve.push(xe(Re,z(ot-1,tt,dt-1),z(ot,tt,dt-1),z(ot-1,tt,dt),z(ot,tt,dt),ge,_e,(ot+tt+dt)%2,Fe&&Fe[He]?Fe[He]:[])),He++;return Ve}function se(Re,le,ge,_e,Fe){for(var Ve=[],He=0,nt=0;nt<le.length;nt++)for(var tt=le[nt],ot=1;ot<P;ot++)for(var dt=1;dt<C;dt++)Ve.push(xe(Re,z(dt-1,ot-1,tt),z(dt-1,ot,tt),z(dt,ot-1,tt),z(dt,ot,tt),ge,_e,(dt+ot+tt)%2,Fe&&Fe[He]?Fe[He]:[])),He++;return Ve}function fe(Re,le,ge){for(var _e=1;_e<I;_e++)for(var Fe=1;Fe<P;Fe++)for(var Ve=1;Ve<C;Ve++)Ae(Re,z(Ve-1,Fe-1,_e-1),z(Ve-1,Fe-1,_e),z(Ve-1,Fe,_e-1),z(Ve-1,Fe,_e),z(Ve,Fe-1,_e-1),z(Ve,Fe-1,_e),z(Ve,Fe,_e-1),z(Ve,Fe,_e),le,ge,(Ve+Fe+_e)%2)}function ye(Re,le,ge,_e,Fe,Ve){for(var He=[],tt=0;tt<le.length;tt++)for(var ot=le[tt],dt=1;dt<I;dt++)for(var kt=1;kt<P;kt++)He.push(ke(Re,ot,kt,dt,ge,_e,Fe[tt]));return He}function Me(Re,le,ge,_e,Fe,Ve){for(var He=[],tt=0;tt<le.length;tt++)for(var ot=le[tt],dt=1;dt<C;dt++)for(var kt=1;kt<I;kt++)He.push(ke(Re,dt,ot,kt,ge,_e,Fe[tt]));return He}function Ie(Re,le,ge,_e,Fe,Ve){for(var He=[],tt=0;tt<le.length;tt++)for(var ot=le[tt],dt=1;dt<P;dt++)for(var kt=1;kt<C;kt++)He.push(ke(Re,kt,dt,ot,ge,_e,Fe[tt]));return He}function Ce(Re,le){for(var ge=[],_e=Re;_e<le;_e++)ge.push(_e);return ge}return function(){G(),function(){for(var tt=0;tt<C;tt++)for(var ot=0;ot<P;ot++)for(var dt=0;dt<I;dt++){var kt=z(tt,ot,dt);V(n._x[kt],n._y[kt],n._z[kt],n._value[kt])}}();var Re=null;if(y&&m&&(X(m),u=!0,fe(Re,N,B),u=!1),g&&h){X(h);for(var le=n.surface.pattern,ge=n.surface.count,_e=0;_e<ge;_e++){var Fe=1===ge?.5:_e/(ge-1),Ve=(1-Fe)*N+Fe*B,He=Math.abs(Ve-H)>Math.abs(Ve-F)?[H,Ve]:[Ve,F];w=!0,fe(le,He[0],He[1]),w=!1}}var nt=[[Math.min(N,F),Math.max(N,F)],[Math.min(H,B),Math.max(H,B)]];["x","y","z"].forEach(function(tt){for(var ot=[],dt=0;dt<nt.length;dt++){var kt=0,mt=nt[dt][0],wt=nt[dt][1],Lt=n.slices[tt];if(Lt.show&&Lt.fill){X(Lt.fill);var Ct=[],It=[],Ut=[];if(Lt.locations.length)for(var Rt=0;Rt<Lt.locations.length;Rt++){var Ge=d(Lt.locations[Rt],"x"===tt?_:"y"===tt?E:L);0===Ge.distRatio?Ct.push(Ge.id):Ge.id>0&&(It.push(Ge.id),Ut.push("x"===tt?[Ge.distRatio,0,0]:"y"===tt?[0,Ge.distRatio,0]:[0,0,Ge.distRatio]))}else Ct=Ce(1,"x"===tt?C-1:"y"===tt?P-1:I-1);It.length>0&&(ot[kt]="x"===tt?ye(Re,It,mt,wt,Ut):"y"===tt?Me(Re,It,mt,wt,Ut):Ie(Re,It,mt,wt,Ut),kt++),Ct.length>0&&(ot[kt]="x"===tt?Te(Re,Ct,mt,wt,ot[kt]):"y"===tt?Q(Re,Ct,mt,wt,ot[kt]):se(Re,Ct,mt,wt,ot[kt]),kt++)}var We=n.caps[tt];We.show&&We.fill&&(X(We.fill),ot[kt]="x"===tt?Te(Re,[0,C-1],mt,wt,ot[kt]):"y"===tt?Q(Re,[0,P-1],mt,wt,ot[kt]):se(Re,[0,I-1],mt,wt,ot[kt]),kt++)}}),0===S&&G(),n._meshX=c,n._meshY=p,n._meshZ=f,n._meshIntensity=x,n._Xs=_,n._Ys=E,n._Zs=L}(),n}$.exports={findNearestOnAxis:d,generateIsoMeshes:r,createIsosurfaceTrace:function(n,i){var c=k({gl:n.glplot.gl}),p=new s(n,c,i.uid);return c._trace=p,p.update(i),n.glplot.add(c),p}}},82738:function($,R,e){"use strict";var k=e(71828),A=e(73972),l=e(16249),T=e(1586);function b(d,s,t,o,r){var n=r("isomin"),i=r("isomax");null!=i&&null!=n&&n>i&&(s.isomin=null,s.isomax=null);var a=r("x"),c=r("y"),p=r("z"),f=r("value");a&&a.length&&c&&c.length&&p&&p.length&&f&&f.length?(A.getComponentMethod("calendars","handleTraceDefaults")(d,s,["x","y","z"],o),r("valuehoverformat"),["x","y","z"].forEach(function(x){r(x+"hoverformat");var v="caps."+x;r(v+".show")&&r(v+".fill");var g="slices."+x;r(g+".show")&&(r(g+".fill"),r(g+".locations"))}),r("spaceframe.show")&&r("spaceframe.fill"),r("surface.show")&&(r("surface.count"),r("surface.fill"),r("surface.pattern")),r("contour.show")&&(r("contour.color"),r("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(x){r(x)}),T(d,s,o,r,{prefix:"",cLetter:"c"}),s._length=null):s.visible=!1}$.exports={supplyDefaults:function(d,s,t,o){b(d,s,0,o,function(r,n){return k.coerce(d,s,l,r,n)})},supplyIsoDefaults:b}},64943:function($,R,e){"use strict";$.exports={attributes:e(16249),supplyDefaults:e(82738).supplyDefaults,calc:e(56959),colorbar:{min:"cmin",max:"cmax"},plot:e(22674).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},2418:function($,R,e){"use strict";var k=e(50693),A=e(12663).axisHoverFormat,l=e(5386).f,T=e(54532),b=e(9012),d=e(1426).extendFlat;$.exports=d({x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},i:{valType:"data_array",editType:"calc"},j:{valType:"data_array",editType:"calc"},k:{valType:"data_array",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:l({editType:"calc"}),xhoverformat:A("x"),yhoverformat:A("y"),zhoverformat:A("z"),delaunayaxis:{valType:"enumerated",values:["x","y","z"],dflt:"z",editType:"calc"},alphahull:{valType:"number",dflt:-1,editType:"calc"},intensity:{valType:"data_array",editType:"calc"},intensitymode:{valType:"enumerated",values:["vertex","cell"],dflt:"vertex",editType:"calc"},color:{valType:"color",editType:"calc"},vertexcolor:{valType:"data_array",editType:"calc"},facecolor:{valType:"data_array",editType:"calc"},transforms:void 0},k("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:T.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:d({},T.contours.x.show,{}),color:T.contours.x.color,width:T.contours.x.width,editType:"calc"},lightposition:{x:d({},T.lightposition.x,{dflt:1e5}),y:d({},T.lightposition.y,{dflt:1e5}),z:d({},T.lightposition.z,{dflt:0}),editType:"calc"},lighting:d({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc"},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc"},editType:"calc"},T.lighting),hoverinfo:d({},b.hoverinfo,{editType:"calc"}),showlegend:d({},b.showlegend,{dflt:!1})})},82932:function($,R,e){"use strict";var k=e(78803);$.exports=function(A,l){l.intensity&&k(A,l,{vals:l.intensity,containerStr:"",cLetter:"c"})}},91134:function($,R,e){"use strict";var k=e(9330).gl_mesh3d,A=e(9330).delaunay_triangulate,l=e(9330).alpha_shape,T=e(9330).convex_hull,b=e(81697).parseColorScale,d=e(78614),s=e(21081).extractOpts,t=e(90060);function o(p,f,x){this.scene=p,this.uid=x,this.mesh=f,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var r=o.prototype;function n(p){for(var f=[],x=p.length,v=0;v<x;v++)f[v]=d(p[v]);return f}function i(p,f,x,v){for(var g=[],y=f.length,h=0;h<y;h++)g[h]=p.d2l(f[h],0,v)*x;return g}function a(p){for(var f=[],x=p.length,v=0;v<x;v++)f[v]=Math.round(p[v]);return f}function c(p,f){for(var x=p.length,v=0;v<x;v++)if(p[v]<=-.5||p[v]>=f-.5)return!1;return!0}r.handlePick=function(p){if(p.object===this.mesh){var f=p.index=p.data.index;p.traceCoordinate=p.data._cellCenter?p.data.dataCoordinate:[this.data.x[f],this.data.y[f],this.data.z[f]];var x=this.data.hovertext||this.data.text;return Array.isArray(x)&&void 0!==x[f]?p.textLabel=x[f]:x&&(p.textLabel=x),!0}},r.update=function(p){var f=this.scene,x=f.fullSceneLayout;this.data=p;var v,g=p.x.length,y=t(i(x.xaxis,p.x,f.dataScale[0],p.xcalendar),i(x.yaxis,p.y,f.dataScale[1],p.ycalendar),i(x.zaxis,p.z,f.dataScale[2],p.zcalendar));if(p.i&&p.j&&p.k){if(p.i.length!==p.j.length||p.j.length!==p.k.length||!c(p.i,g)||!c(p.j,g)||!c(p.k,g))return;v=t(a(p.i),a(p.j),a(p.k))}else v=0===p.alphahull?T(y):p.alphahull>0?l(p.alphahull,y):function(u,S){for(var _=["x","y","z"].indexOf(u),E=[],L=S.length,C=0;C<L;C++)E[C]=[S[C][(_+1)%3],S[C][(_+2)%3]];return A(E)}(p.delaunayaxis,y);var h={positions:y,cells:v,lightPosition:[p.lightposition.x,p.lightposition.y,p.lightposition.z],ambient:p.lighting.ambient,diffuse:p.lighting.diffuse,specular:p.lighting.specular,roughness:p.lighting.roughness,fresnel:p.lighting.fresnel,vertexNormalsEpsilon:p.lighting.vertexnormalsepsilon,faceNormalsEpsilon:p.lighting.facenormalsepsilon,opacity:p.opacity,contourEnable:p.contour.show,contourColor:d(p.contour.color).slice(0,3),contourWidth:p.contour.width,useFacetNormals:p.flatshading};if(p.intensity){var m=s(p);this.color="#fff";var w=p.intensitymode;h[w+"Intensity"]=p.intensity,h[w+"IntensityBounds"]=[m.min,m.max],h.colormap=b(p)}else p.vertexcolor?(this.color=p.vertexcolor[0],h.vertexColors=n(p.vertexcolor)):p.facecolor?(this.color=p.facecolor[0],h.cellColors=n(p.facecolor)):(this.color=p.color,h.meshColor=d(p.color));this.mesh.update(h)},r.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},$.exports=function(p,f){var v=k({gl:p.glplot.gl}),g=new o(p,v,f.uid);return v._trace=g,g.update(f),p.glplot.add(v),g}},58669:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(1586),T=e(2418);$.exports=function(b,d,s,t){function o(n,i){return A.coerce(b,d,T,n,i)}function r(n){var i=n.map(function(a){var c=o(a);return c&&A.isArrayOrTypedArray(c)?c:null});return i.every(function(a){return a&&a.length===i[0].length})&&i}r(["x","y","z"])?(r(["i","j","k"]),(!d.i||d.j&&d.k)&&(!d.j||d.k&&d.i)&&(!d.k||d.i&&d.j)?(k.getComponentMethod("calendars","handleTraceDefaults")(b,d,["x","y","z"],t),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","alphahull","delaunayaxis","opacity"].forEach(function(n){o(n)}),o("contour.show")&&(o("contour.color"),o("contour.width")),"intensity"in b?(o("intensity"),o("intensitymode"),l(b,d,t,o,{prefix:"",cLetter:"c"})):(d.showscale=!1,"facecolor"in b?o("facecolor"):"vertexcolor"in b?o("vertexcolor"):o("color",s)),o("text"),o("hovertext"),o("hovertemplate"),o("xhoverformat"),o("yhoverformat"),o("zhoverformat"),d._length=null):d.visible=!1):d.visible=!1}},21164:function($,R,e){"use strict";$.exports={attributes:e(2418),supplyDefaults:e(58669),calc:e(82932),colorbar:{min:"cmin",max:"cmax"},plot:e(91134),moduleType:"trace",name:"mesh3d",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},2522:function($,R,e){"use strict";var k=e(71828).extendFlat,A=e(82196),l=e(12663).axisHoverFormat,T=e(79952).P,b=e(77914),d=e(22372),s=d.INCREASING.COLOR,t=d.DECREASING.COLOR,o=A.line;function r(n){return{line:{color:k({},o.color,{dflt:n}),width:o.width,dash:T,editType:"style"},editType:"style"}}$.exports={xperiod:A.xperiod,xperiod0:A.xperiod0,xperiodalignment:A.xperiodalignment,xhoverformat:l("x"),yhoverformat:l("y"),x:{valType:"data_array",editType:"calc+clearAxisTypes"},open:{valType:"data_array",editType:"calc"},high:{valType:"data_array",editType:"calc"},low:{valType:"data_array",editType:"calc"},close:{valType:"data_array",editType:"calc"},line:{width:k({},o.width,{}),dash:k({},T,{}),editType:"style"},increasing:r(s),decreasing:r(t),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:k({},b.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},3485:function($,R,e){"use strict";var k=e(71828),A=k._,l=e(89298),T=e(42973),b=e(50606).BADNUM;function d(t,o,r,n){return{o:t,h:o,l:r,c:n}}function s(t,o,r,n,i,a){for(var c=i.makeCalcdata(o,"open"),p=i.makeCalcdata(o,"high"),f=i.makeCalcdata(o,"low"),x=i.makeCalcdata(o,"close"),v=Array.isArray(o.text),g=Array.isArray(o.hovertext),y=!0,h=null,m=!!o.xperiodalignment,w=[],u=0;u<n.length;u++){var S=n[u],_=c[u],E=p[u],L=f[u],C=x[u];if(S!==b&&_!==b&&E!==b&&L!==b&&C!==b){C===_?null!==h&&C!==h&&(y=C>h):y=C>_,h=C;var P=a(_,E,L,C);P.pos=S,P.yc=(_+C)/2,P.i=u,P.dir=y?"increasing":"decreasing",P.x=P.pos,P.y=[L,E],m&&(P.orig_p=r[u]),v&&(P.tx=o.text[u]),g&&(P.htx=o.hovertext[u]),w.push(P)}else w.push({pos:S,empty:!0})}return o._extremes[i._id]=l.findExtremes(i,k.concat(f,p),{padded:!0}),w.length&&(w[0].t={labels:{open:A(t,"open:")+" ",high:A(t,"high:")+" ",low:A(t,"low:")+" ",close:A(t,"close:")+" "}}),w}$.exports={calc:function(t,o){var r=l.getFromId(t,o.xaxis),n=l.getFromId(t,o.yaxis),i=function(x,v,g){var y=g._minDiff;if(!y){var h,m=x._fullData,w=[];for(y=1/0,h=0;h<m.length;h++){var u=m[h];if("ohlc"===u.type&&!0===u.visible&&u.xaxis===v._id){w.push(u);var S=v.makeCalcdata(u,"x");u._origX=S;var _=T(g,v,"x",S).vals;u._xcalc=_;var E=k.distinctVals(_).minDiff;E&&isFinite(E)&&(y=Math.min(y,E))}}for(y===1/0&&(y=1),h=0;h<w.length;h++)w[h]._minDiff=y}return y*g.tickwidth}(t,r,o),a=o._minDiff;o._minDiff=null;var c=o._origX;o._origX=null;var p=o._xcalc;o._xcalc=null;var f=s(t,o,c,p,n,d);return o._extremes[r._id]=l.findExtremes(r,p,{vpad:a/2}),f.length?(k.extendFlat(f[0].t,{wHover:a/2,tickLen:i}),f):[{t:{empty:!0}}]},calcCommon:s}},16169:function($,R,e){"use strict";var k=e(71828),A=e(14555),l=e(73927),T=e(2522);function b(d,s,t,o){t(o+".line.color"),t(o+".line.width",s.line.width),t(o+".line.dash",s.line.dash)}$.exports=function(d,s,t,o){function r(n,i){return k.coerce(d,s,T,n,i)}A(d,s,r,o)?(l(d,s,o,r,{x:!0}),r("xhoverformat"),r("yhoverformat"),r("line.width"),r("line.dash"),b(0,s,r,"increasing"),b(0,s,r,"decreasing"),r("text"),r("hovertext"),r("tickwidth"),o._requestRangeslider[s.xaxis]=!0):s.visible=!1}},66449:function($,R,e){"use strict";var k=e(89298),A=e(71828),l=e(30211),T=e(7901),b=e(71828).fillText,d=e(22372),s={increasing:d.INCREASING.SYMBOL,decreasing:d.DECREASING.SYMBOL};function t(n,i,a,c){var p,f,x=n.cd,v=n.xa,g=x[0].trace,y=x[0].t,h=g.type,m="ohlc"===h?"l":"min",w="ohlc"===h?"h":"max",u=y.bPos||0,S=y.bdPos||y.tickLen,_=y.wHover,E=Math.min(1,S/Math.abs(v.r2c(v.range[1])-v.r2c(v.range[0])));function L(F){var N=F.pos+u-i;return l.inbox(N-_,N+_,p)}function C(F){var N=F[m],B=F[w];return N===B||l.inbox(N-a,B-a,p)}function P(F){return(L(F)+C(F))/2}p=n.maxHoverDistance-E,f=n.maxSpikeDistance-E;var I=l.getDistanceFunction(c,L,C,P);if(l.getClosest(x,I,n),!1===n.index)return null;var U=x[n.index];if(U.empty)return null;var z=g[U.dir],H=z.line.color;return n.color=T.opacity(H)&&z.line.width?H:z.fillcolor,n.x0=v.c2p(U.pos+u-S,!0),n.x1=v.c2p(U.pos+u+S,!0),n.xLabelVal=void 0!==U.orig_p?U.orig_p:U.pos,n.spikeDistance=P(U)*f/p,n.xSpike=v.c2p(U.pos,!0),n}function o(n,i,a,c){var p=n.cd,f=n.ya,x=p[0].trace,v=p[0].t,g=[],y=t(n,i,a,c);if(!y)return[];var h=p[y.index].hi||x.hoverinfo,m=h.split("+");if("all"!==h&&-1===m.indexOf("y"))return[];for(var w=["high","open","close","low"],u={},S=0;S<w.length;S++){var _,E=w[S],L=x[E][y.index],C=f.c2p(L,!0);L in u?(_=u[L]).yLabel+="<br>"+v.labels[E]+k.hoverLabelText(f,L,x.yhoverformat):((_=A.extendFlat({},y)).y0=_.y1=C,_.yLabelVal=L,_.yLabel=v.labels[E]+k.hoverLabelText(f,L,x.yhoverformat),_.name="",g.push(_),u[L]=_)}return g}function r(n,i,a,c){var p=n.cd,f=n.ya,x=p[0].trace,v=p[0].t,g=t(n,i,a,c);if(!g)return[];var y=p[g.index],h=g.index=y.i,m=y.dir;function w(P){return v.labels[P]+k.hoverLabelText(f,x[P][h],x.yhoverformat)}var u=y.hi||x.hoverinfo,S=u.split("+"),_="all"===u,E=_||-1!==S.indexOf("y"),L=_||-1!==S.indexOf("text"),C=E?[w("open"),w("high"),w("low"),w("close")+"  "+s[m]]:[];return L&&b(y,x,C),g.extraText=C.join("<br>"),g.y0=g.y1=f.c2p(y.yc,!0),[g]}$.exports={hoverPoints:function(n,i,a,c){return n.cd[0].trace.hoverlabel.split?o(n,i,a,c):r(n,i,a,c)},hoverSplit:o,hoverOnPoints:r}},54186:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"ohlc",basePlotModule:e(93612),categories:["cartesian","svg","showLegend"],meta:{},attributes:e(2522),supplyDefaults:e(16169),calc:e(3485).calc,plot:e(72314),style:e(53101),hoverPoints:e(66449).hoverPoints,selectPoints:e(67324)}},14555:function($,R,e){"use strict";var k=e(73972),A=e(71828);$.exports=function(l,T,b,d){var s=b("x"),t=b("open"),o=b("high"),r=b("low"),n=b("close");if(b("hoverlabel.split"),k.getComponentMethod("calendars","handleTraceDefaults")(l,T,["x"],d),t&&o&&r&&n){var i=Math.min(t.length,o.length,r.length,n.length);return s&&(i=Math.min(i,A.minRowLength(s))),T._length=i,i}}},72314:function($,R,e){"use strict";var k=e(39898),A=e(71828);$.exports=function(l,T,b,d){var s=T.yaxis,t=T.xaxis,o=!!t.rangebreaks;A.makeTraceGroups(d,b,"trace ohlc").each(function(r){var n=k.select(this),i=r[0],a=i.t;if(!0!==i.trace.visible||a.empty)n.remove();else{var c=a.tickLen,p=n.selectAll("path").data(A.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(f){if(f.empty)return"M0,0Z";var x=t.c2p(f.pos-c,!0),v=t.c2p(f.pos+c,!0),g=o?(x+v)/2:t.c2p(f.pos,!0);return"M"+x+","+s.c2p(f.o,!0)+"H"+g+"M"+g+","+s.c2p(f.h,!0)+"V"+s.c2p(f.l,!0)+"M"+v+","+s.c2p(f.c,!0)+"H"+g})}})}},67324:function($){"use strict";$.exports=function(R,e){var k,A=R.cd,l=R.xaxis,T=R.yaxis,b=[],d=A[0].t.bPos||0;if(!1===e)for(k=0;k<A.length;k++)A[k].selected=0;else for(k=0;k<A.length;k++){var s=A[k];e.contains([l.c2p(s.pos+d),T.c2p(s.yc)],null,s.i,R)?(b.push({pointNumber:s.i,x:l.c2d(s.pos),y:T.c2d(s.yc)}),s.selected=1):s.selected=0}return b}},53101:function($,R,e){"use strict";var k=e(39898),A=e(91424),l=e(7901);$.exports=function(T,b,d){var s=d||k.select(T).selectAll("g.ohlclayer").selectAll("g.trace");s.style("opacity",function(t){return t[0].trace.opacity}),s.each(function(t){var o=t[0].trace;k.select(this).selectAll("path").each(function(r){if(!r.empty){var n=o[r.dir].line;k.select(this).style("fill","none").call(l.stroke,n.color).call(A.dashLine,n.dash,n.width).style("opacity",o.selectedpoints&&!r.selected?.3:1)}})})}},99506:function($,R,e){"use strict";var k=e(1426).extendFlat,A=e(9012),l=e(41940),T=e(50693),b=e(5386).f,d=e(27670).Y,s=k({editType:"calc"},T("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:b({editType:"plot",arrayOk:!1},{keys:["count","probability"]})});$.exports={domain:d({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:k({},A.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:b({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:l({editType:"calc"}),tickfont:l({editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:s,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}},27677:function($,R,e){"use strict";var k=e(27659).a0,A=e(45784),l="parcats";R.name=l,R.plot=function(T,b,d,s){var t=k(T.calcdata,l);t.length&&A(T,t[0],d,s)},R.clean=function(T,b,d,s){var t=s._has&&s._has("parcats"),o=b._has&&b._has("parcats");t&&!o&&s._paperdiv.selectAll(".parcats").remove()}},28699:function($,R,e){"use strict";var k=e(28984).wrap,A=e(52075).hasColorscale,l=e(78803),T=e(75744),b=e(91424),d=e(71828),s=e(92770);function t(n,i,a){n.valueInds.push(i),n.count+=a}function o(n,i,a){return{categoryInds:n,color:i,rawColor:a,valueInds:[],count:0}}function r(n,i,a){n.valueInds.push(i),n.count+=a}$.exports=function(n,i){var a=d.filterVisible(i.dimensions);if(0===a.length)return[];var c,p,f,x=a.map(function(j){var J;if("trace"===j.categoryorder)J=null;else if("array"===j.categoryorder)J=j.categoryarray;else{J=T(j.values);for(var G=!0,V=0;V<J.length;V++)if(!s(J[V])){G=!1;break}J.sort(G?d.sorterAsc:void 0),"category descending"===j.categoryorder&&(J=J.reverse())}return function(W,X){X=null==X?[]:X.map(function(de){return de});var K={},re={},ee=[];X.forEach(function(de,he){K[de]=0,re[de]=he});for(var ie=0;ie<W.length;ie++){var oe,ce=W[ie];void 0===K[ce]?(K[ce]=1,oe=X.push(ce)-1,re[ce]=oe):(K[ce]++,oe=re[ce]),ee.push(oe)}var me=X.map(function(de){return K[de]});return{uniqueValues:X,uniqueCounts:me,inds:ee}}(j.values,J)});c=d.isArrayOrTypedArray(i.counts)?i.counts:[i.counts],function(j){var J;if(function(V){for(var W=new Array(V.length),X=0;X<V.length;X++){if(V[X]<0||V[X]>=V.length||void 0!==W[V[X]])return!1;W[V[X]]=!0}return!0}(j.map(function(V){return V.displayindex})))for(J=0;J<j.length;J++)j[J]._displayindex=j[J].displayindex;else for(J=0;J<j.length;J++)j[J]._displayindex=J}(a),a.forEach(function(j,J){!function(G,V){G._categoryarray=V.uniqueValues,G._ticktext=null==G.ticktext?[]:G.ticktext.slice();for(var W=G._ticktext.length;W<V.uniqueValues.length;W++)G._ticktext.push(V.uniqueValues[W])}(j,x[J])});var v,g=i.line;g?(A(i,"line")&&l(n,i,{vals:i.line.color,containerStr:"line",cLetter:"c"}),v=b.tryColorscale(g)):v=d.identity;var y,h,m,w,u,S=a[0].values.length,_={},E=x.map(function(j){return j.inds});for(f=0,y=0;y<S;y++){var L=[];for(h=0;h<E.length;h++)L.push(E[h][y]);f+=p=c[y%c.length];var C=(m=y,w=void 0,u=void 0,d.isArrayOrTypedArray(g.color)?u=w=g.color[m%g.color.length]:w=g.color,{color:v(w),rawColor:u}),P=L+"-"+C.rawColor;void 0===_[P]&&(_[P]=o(L,C.color,C.rawColor)),r(_[P],y,p)}var I,j,J,G,V,U=a.map(function(j,J){return{dimensionInd:J,containerInd:j._index,displayInd:j._displayindex,dimensionLabel:j.label,count:f,categories:[],dragX:null}});for(y=0;y<S;y++)for(p=c[y%c.length],h=0;h<U.length;h++){var z=U[h].containerInd,H=x[h].inds[y],F=U[h].categories;void 0===F[H]&&(F[H]={dimensionInd:h,categoryInd:I=H,categoryValue:i.dimensions[z]._categoryarray[H],displayInd:I,categoryLabel:i.dimensions[z]._ticktext[H],valueInds:[],count:0,dragY:null}),t(F[H],y,p)}return k((J=_,G=f,V=(j=U).map(function(W){return W.categories.length}).reduce(function(W,X){return Math.max(W,X)}),{dimensions:j,paths:J,trace:void 0,maxCats:V,count:G}))}},14647:function($,R,e){"use strict";var k=e(71828),A=e(52075).hasColorscale,l=e(1586),T=e(27670).c,b=e(85501),d=e(99506),s=e(94397);function t(o,r){function n(v,g){return k.coerce(o,r,d.dimensions,v,g)}var i=n("values"),a=n("visible");if(i&&i.length||(a=r.visible=!1),a){n("label"),n("displayindex",r._index);var c,p=o.categoryarray,f=Array.isArray(p)&&p.length>0;f&&(c="array");var x=n("categoryorder",c);"array"===x?(n("categoryarray"),n("ticktext")):(delete o.categoryarray,delete o.ticktext),f||"array"!==x||(r.categoryorder="trace")}}$.exports=function(o,r,n,i){function a(v,g){return k.coerce(o,r,d,v,g)}var c=b(o,r,{name:"dimensions",handleItemDefaults:t}),p=function(v,g,y,h,m){m("line.shape"),m("line.hovertemplate");var w=m("line.color",h.colorway[0]);if(A(v,"line")&&k.isArrayOrTypedArray(w)){if(w.length)return m("line.colorscale"),l(v,g,h,m,{prefix:"line.",cLetter:"c"}),w.length;g.line.color=y}return 1/0}(o,r,n,i,a);T(r,i,a),Array.isArray(c)&&c.length||(r.visible=!1),s(r,c,"values",p),a("hoveron"),a("hovertemplate"),a("arrangement"),a("bundlecolors"),a("sortpaths"),a("counts");var f={family:i.font.family,size:Math.round(i.font.size),color:i.font.color};k.coerceFont(a,"labelfont",f);var x={family:i.font.family,size:Math.round(i.font.size/1.2),color:i.font.color};k.coerceFont(a,"tickfont",x)}},94873:function($,R,e){"use strict";$.exports={attributes:e(99506),supplyDefaults:e(14647),calc:e(28699),plot:e(45784),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e(27677),categories:["noOpacity"],meta:{}}},45460:function($,R,e){"use strict";var k=e(39898),A=e(29502).k4,l=e(72391),T=e(30211),b=e(71828),d=b.strTranslate,s=e(91424),t=e(84267),o=e(63893);function r(G,V,W,X){var K=V._context.staticPlot,re=G.map(F.bind(0,V,W)),ee=X.selectAll("g.parcatslayer").data([null]);ee.enter().append("g").attr("class","parcatslayer").style("pointer-events",K?"none":"all");var ie=ee.selectAll("g.trace.parcats").data(re,n),oe=ie.enter().append("g").attr("class","trace parcats");ie.attr("transform",function(Ae){return d(Ae.x,Ae.y)}),oe.append("g").attr("class","paths");var ce=ie.select("g.paths").selectAll("path.path").data(function(Ae){return Ae.paths},n);ce.attr("fill",function(Ae){return Ae.model.color});var me=ce.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.model.color}).attr("fill-opacity",0);g(me),ce.attr("d",function(Ae){return Ae.svgD}),me.empty()||ce.sort(a),ce.exit().remove(),ce.on("mouseover",c).on("mouseout",p).on("click",v),oe.append("g").attr("class","dimensions");var de=ie.select("g.dimensions").selectAll("g.dimension").data(function(Ae){return Ae.dimensions},n);de.enter().append("g").attr("class","dimension"),de.attr("transform",function(Ae){return d(Ae.x,0)}),de.exit().remove();var he=de.selectAll("g.category").data(function(Ae){return Ae.categories},n),ve=he.enter().append("g").attr("class","category");he.attr("transform",function(Ae){return d(0,Ae.y)}),ve.append("rect").attr("class","catrect").attr("pointer-events","none"),he.select("rect.catrect").attr("fill","none").attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}),h(ve);var Pe=he.selectAll("rect.bandrect").data(function(Ae){return Ae.bands},n);Pe.each(function(){b.raiseToTop(this)}),Pe.attr("fill",function(Ae){return Ae.color});var xe=Pe.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ae){return Ae.color}).attr("fill-opacity",0);Pe.attr("fill",function(Ae){return Ae.color}).attr("width",function(Ae){return Ae.width}).attr("height",function(Ae){return Ae.height}).attr("y",function(Ae){return Ae.y}).attr("cursor",function(Ae){return"fixed"===Ae.parcatsViewModel.arrangement?"default":"perpendicular"===Ae.parcatsViewModel.arrangement?"ns-resize":"move"}),m(xe),Pe.exit().remove(),ve.append("text").attr("class","catlabel").attr("pointer-events","none");var ke=V._fullLayout.paper_bgcolor;he.select("text.catlabel").attr("text-anchor",function(Ae){return i(Ae)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",o.makeTextShadow(ke)).style("fill","rgb(0, 0, 0)").attr("x",function(Ae){return i(Ae)?Ae.width+5:-5}).attr("y",function(Ae){return Ae.height/2}).text(function(Ae){return Ae.model.categoryLabel}).each(function(Ae){s.font(k.select(this),Ae.parcatsViewModel.categorylabelfont),o.convertToTspans(k.select(this),V)}),ve.append("text").attr("class","dimlabel"),he.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ae){return"fixed"===Ae.parcatsViewModel.arrangement?"default":"ew-resize"}).attr("x",function(Ae){return Ae.width/2}).attr("y",-5).text(function(Ae,Te){return 0===Te?Ae.parcatsViewModel.model.dimensions[Ae.model.dimensionInd].dimensionLabel:null}).each(function(Ae){s.font(k.select(this),Ae.parcatsViewModel.labelfont)}),he.selectAll("rect.bandrect").on("mouseover",E).on("mouseout",L),he.exit().remove(),de.call(k.behavior.drag().origin(function(Ae){return{x:Ae.x,y:0}}).on("dragstart",C).on("drag",P).on("dragend",I)),ie.each(function(Ae){Ae.traceSelection=k.select(this),Ae.pathSelection=k.select(this).selectAll("g.paths").selectAll("path.path"),Ae.dimensionSelection=k.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),ie.exit().remove()}function n(G){return G.key}function i(G){return G.model.dimensionInd===G.parcatsViewModel.dimensions[G.parcatsViewModel.dimensions.length-1].model.dimensionInd}function a(G,V){return G.model.rawColor>V.model.rawColor?1:G.model.rawColor<V.model.rawColor?-1:0}function c(G){if(!G.parcatsViewModel.dragDimension&&-1===G.parcatsViewModel.hoverinfoItems.indexOf("skip")){b.raiseToTop(this),y(k.select(this));var V=f(G),W=x(G);if(G.parcatsViewModel.graphDiv.emit("plotly_hover",{points:V,event:k.event,constraints:W}),-1===G.parcatsViewModel.hoverinfoItems.indexOf("none")){var X,K,re,ee=k.mouse(this)[0],ie=G.parcatsViewModel.graphDiv,oe=G.parcatsViewModel.trace,ce=ie._fullLayout,me=ce._paperdiv.node().getBoundingClientRect(),de=G.parcatsViewModel.graphDiv.getBoundingClientRect();for(re=0;re<G.leftXs.length-1;re++)if(G.leftXs[re]+G.dimWidths[re]-2<=ee&&ee<=G.leftXs[re+1]+2){var he=G.parcatsViewModel.dimensions[re];X=(he.x+he.width+G.parcatsViewModel.dimensions[re+1].x)/2,K=(G.topYs[re]+G.topYs[re+1]+G.height)/2;break}var Pe=G.parcatsViewModel.x+X,xe=G.parcatsViewModel.y+K,ke=t.mostReadable(G.model.color,["black","white"]),Ae=G.model.count,Te=Ae/G.parcatsViewModel.model.count,Q={countLabel:Ae,probabilityLabel:Te.toFixed(3)},se=[];-1!==G.parcatsViewModel.hoverinfoItems.indexOf("count")&&se.push(["Count:",Q.countLabel].join(" ")),-1!==G.parcatsViewModel.hoverinfoItems.indexOf("probability")&&se.push(["P:",Q.probabilityLabel].join(" "));var fe=se.join("<br>"),ye=k.mouse(ie)[0];T.loneHover({trace:oe,x:Pe-me.left+de.left,y:xe-me.top+de.top,text:fe,color:G.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:ke,idealAlign:ye<Pe?"right":"left",hovertemplate:(oe.line||{}).hovertemplate,hovertemplateLabels:Q,eventData:[{data:oe._input,fullData:oe,count:Ae,probability:Te}]},{container:ce._hoverlayer.node(),outerContainer:ce._paper.node(),gd:ie})}}}function p(G){if(!G.parcatsViewModel.dragDimension&&(g(k.select(this)),T.loneUnhover(G.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()),G.parcatsViewModel.pathSelection.sort(a),-1===G.parcatsViewModel.hoverinfoItems.indexOf("skip"))){var V=f(G),W=x(G);G.parcatsViewModel.graphDiv.emit("plotly_unhover",{points:V,event:k.event,constraints:W})}}function f(G){for(var V=[],W=U(G.parcatsViewModel),X=0;X<G.model.valueInds.length;X++)V.push({curveNumber:W,pointNumber:G.model.valueInds[X]});return V}function x(G){for(var V={},W=G.parcatsViewModel.model.dimensions,X=0;X<W.length;X++){var K=W[X];V[K.containerInd]=K.categories[G.model.categoryInds[X]].categoryValue}return void 0!==G.model.rawColor&&(V.color=G.model.rawColor),V}function v(G){if(-1===G.parcatsViewModel.hoverinfoItems.indexOf("skip")){var V=f(G),W=x(G);G.parcatsViewModel.graphDiv.emit("plotly_click",{points:V,event:k.event,constraints:W})}}function g(G){G.attr("fill",function(V){return V.model.color}).attr("fill-opacity",.6).attr("stroke","lightgray").attr("stroke-width",.2).attr("stroke-opacity",1)}function y(G){G.attr("fill-opacity",.8).attr("stroke",function(V){return t.mostReadable(V.model.color,["black","white"])}).attr("stroke-width",.3)}function h(G){G.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function m(G){G.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function w(G){var W=G.categoryViewModel.model.dimensionInd,X=G.categoryViewModel.model.categoryInd;return G.parcatsViewModel.pathSelection.filter(function(K){return K.model.categoryInds[W]===X&&K.model.color===G.color})}function u(G,V,W){var X=k.select(G).datum(),K=X.categoryViewModel.model,re=X.parcatsViewModel.graphDiv,ee=k.select(G.parentNode).selectAll("rect.bandrect"),ie=[];ee.each(function(ce){w(ce).each(function(me){Array.prototype.push.apply(ie,f(me))})});var oe={};oe[K.dimensionInd]=K.categoryValue,re.emit(V,{points:ie,event:W,constraints:oe})}function S(G,V,W){var X=k.select(G).datum(),K=X.categoryViewModel.model,re=X.parcatsViewModel.graphDiv,ee=w(X),ie=[];ee.each(function(ce){Array.prototype.push.apply(ie,f(ce))});var oe={};oe[K.dimensionInd]=K.categoryValue,void 0!==X.rawColor&&(oe.color=X.rawColor),re.emit(V,{points:ie,event:W,constraints:oe})}function _(G,V,W){G._fullLayout._calcInverseTransform(G);var X,K,re=G._fullLayout._invScaleX,ee=G._fullLayout._invScaleY,ie=k.select(W.parentNode).select("rect.catrect"),oe=ie.node().getBoundingClientRect(),ce=ie.datum(),me=ce.parcatsViewModel,he=me.trace,ve=oe.top+oe.height/2;me.dimensions.length>1&&me.model.dimensions[ce.model.dimensionInd].displayInd===me.dimensions.length-1?(X=oe.left,K="left"):(X=oe.left+oe.width,K="right");var Pe=ce.model.count,xe=ce.model.categoryLabel,ke=Pe/ce.parcatsViewModel.model.count,Ae={countLabel:Pe,categoryLabel:xe,probabilityLabel:ke.toFixed(3)},Te=[];-1!==ce.parcatsViewModel.hoverinfoItems.indexOf("count")&&Te.push(["Count:",Ae.countLabel].join(" ")),-1!==ce.parcatsViewModel.hoverinfoItems.indexOf("probability")&&Te.push(["P("+Ae.categoryLabel+"):",Ae.probabilityLabel].join(" "));var Q=Te.join("<br>");return{trace:he,x:re*(X-V.left),y:ee*(ve-V.top),text:Q,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:K,hovertemplate:he.hovertemplate,hovertemplateLabels:Ae,eventData:[{data:he._input,fullData:he,count:Pe,category:xe,probability:ke}]}}function E(G){if(!G.parcatsViewModel.dragDimension&&-1===G.parcatsViewModel.hoverinfoItems.indexOf("skip")){if(k.mouse(this)[1]<-1)return;var V,W=G.parcatsViewModel.graphDiv,X=W._fullLayout,K=X._paperdiv.node().getBoundingClientRect(),re=G.parcatsViewModel.hoveron,ee=this;"color"===re?(y(ce=w(oe=k.select(ie=ee).datum())),ce.each(function(){b.raiseToTop(this)}),k.select(ie.parentNode).selectAll("rect.bandrect").filter(function(me){return me.color===oe.color}).each(function(){b.raiseToTop(this),k.select(this).attr("stroke","black").attr("stroke-width",1.5)}),S(ee,"plotly_hover",k.event)):(function(ie){k.select(ie.parentNode).selectAll("rect.bandrect").each(function(oe){var ce=w(oe);y(ce),ce.each(function(){b.raiseToTop(this)})}),k.select(ie.parentNode).select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}(ee),u(ee,"plotly_hover",k.event)),-1===G.parcatsViewModel.hoverinfoItems.indexOf("none")&&("category"===re?V=_(W,K,ee):"color"===re?V=function(ie,oe,ce){ie._fullLayout._calcInverseTransform(ie);var me,de,he=ie._fullLayout._invScaleX,ve=ie._fullLayout._invScaleY,Pe=ce.getBoundingClientRect(),xe=k.select(ce).datum(),ke=xe.categoryViewModel,Ae=ke.parcatsViewModel,Q=Ae.trace,se=Pe.y+Pe.height/2;Ae.dimensions.length>1&&Ae.model.dimensions[ke.model.dimensionInd].displayInd===Ae.dimensions.length-1?(me=Pe.left,de="left"):(me=Pe.left+Pe.width,de="right");var fe=ke.model.categoryLabel,ye=xe.parcatsViewModel.model.count,Me=0;xe.categoryViewModel.bands.forEach(function(nt){nt.color===xe.color&&(Me+=nt.count)});var Ie=ke.model.count,Ce=0;Ae.pathSelection.each(function(nt){nt.model.color===xe.color&&(Ce+=nt.model.count)});var Re=Me/ye,le=Me/Ce,ge=Me/Ie,_e={countLabel:ye,categoryLabel:fe,probabilityLabel:Re.toFixed(3)},Fe=[];-1!==ke.parcatsViewModel.hoverinfoItems.indexOf("count")&&Fe.push(["Count:",_e.countLabel].join(" ")),-1!==ke.parcatsViewModel.hoverinfoItems.indexOf("probability")&&(Fe.push("P(color \u2229 "+fe+"): "+_e.probabilityLabel),Fe.push("P("+fe+" | color): "+le.toFixed(3)),Fe.push("P(color | "+fe+"): "+ge.toFixed(3)));var Ve=Fe.join("<br>"),He=t.mostReadable(xe.color,["black","white"]);return{trace:Q,x:he*(me-oe.left),y:ve*(se-oe.top),text:Ve,color:xe.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:He,fontSize:10,idealAlign:de,hovertemplate:Q.hovertemplate,hovertemplateLabels:_e,eventData:[{data:Q._input,fullData:Q,category:fe,count:ye,probability:Re,categorycount:Ie,colorcount:Ce,bandcolorcount:Me}]}}(W,K,ee):"dimension"===re&&(V=function(ie,oe,ce){var me=[];return k.select(ce.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){me.push(_(ie,oe,this))}),me}(W,K,ee)),V&&T.loneHover(V,{container:X._hoverlayer.node(),outerContainer:X._paper.node(),gd:W}))}var ie,oe,ce}function L(G){var V=G.parcatsViewModel;V.dragDimension||(g(V.pathSelection),h(V.dimensionSelection.selectAll("g.category")),m(V.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),T.loneUnhover(V.graphDiv._fullLayout._hoverlayer.node()),V.pathSelection.sort(a),-1!==V.hoverinfoItems.indexOf("skip"))||("color"===G.parcatsViewModel.hoveron?S(this,"plotly_unhover",k.event):u(this,"plotly_unhover",k.event))}function C(G){"fixed"!==G.parcatsViewModel.arrangement&&(G.dragDimensionDisplayInd=G.model.displayInd,G.initialDragDimensionDisplayInds=G.parcatsViewModel.model.dimensions.map(function(V){return V.displayInd}),G.dragHasMoved=!1,G.dragCategoryDisplayInd=null,k.select(this).selectAll("g.category").select("rect.catrect").each(function(V){var W=k.mouse(this)[0],X=k.mouse(this)[1];-2<=W&&W<=V.width+2&&-2<=X&&X<=V.height+2&&(G.dragCategoryDisplayInd=V.model.displayInd,G.initialDragCategoryDisplayInds=G.model.categories.map(function(K){return K.displayInd}),V.model.dragY=V.y,b.raiseToTop(this.parentNode),k.select(this.parentNode).selectAll("rect.bandrect").each(function(K){K.y<X&&X<=K.y+K.height&&(G.potentialClickBand=this)}))}),G.parcatsViewModel.dragDimension=G,T.loneUnhover(G.parcatsViewModel.graphDiv._fullLayout._hoverlayer.node()))}function P(G){if("fixed"!==G.parcatsViewModel.arrangement&&(G.dragHasMoved=!0,null!==G.dragDimensionDisplayInd)){var V=G.dragDimensionDisplayInd,W=V-1,X=V+1,K=G.parcatsViewModel.dimensions[V];if(null!==G.dragCategoryDisplayInd){var re=K.categories[G.dragCategoryDisplayInd];re.model.dragY+=k.event.dy;var ee=re.model.dragY,ie=re.model.displayInd,oe=K.categories,ce=oe[ie-1],me=oe[ie+1];void 0!==ce&&ee<ce.y+ce.height/2&&(re.model.displayInd=ce.model.displayInd,ce.model.displayInd=ie),void 0!==me&&ee+re.height>me.y+me.height/2&&(re.model.displayInd=me.model.displayInd,me.model.displayInd=ie),G.dragCategoryDisplayInd=re.model.displayInd}if(null===G.dragCategoryDisplayInd||"freeform"===G.parcatsViewModel.arrangement){K.model.dragX=k.event.x;var de=G.parcatsViewModel.dimensions[W],he=G.parcatsViewModel.dimensions[X];void 0!==de&&K.model.dragX<de.x+de.width&&(K.model.displayInd=de.model.displayInd,de.model.displayInd=V),void 0!==he&&K.model.dragX+K.width>he.x&&(K.model.displayInd=he.model.displayInd,he.model.displayInd=G.dragDimensionDisplayInd),G.dragDimensionDisplayInd=K.model.displayInd}j(G.parcatsViewModel),B(G.parcatsViewModel),H(G.parcatsViewModel),z(G.parcatsViewModel)}}function I(G){if("fixed"!==G.parcatsViewModel.arrangement&&null!==G.dragDimensionDisplayInd){k.select(this).selectAll("text").attr("font-weight","normal");var V={},W=U(G.parcatsViewModel),X=G.parcatsViewModel.model.dimensions.map(function(me){return me.displayInd}),K=G.initialDragDimensionDisplayInds.some(function(me,de){return me!==X[de]});K&&X.forEach(function(me,de){V["dimensions["+G.parcatsViewModel.model.dimensions[de].containerInd+"].displayindex"]=me});var re=!1;if(null!==G.dragCategoryDisplayInd){var ee=G.model.categories.map(function(me){return me.displayInd});if(re=G.initialDragCategoryDisplayInds.some(function(me,de){return me!==ee[de]})){var ie=G.model.categories.slice().sort(function(me,de){return me.displayInd-de.displayInd}),oe=ie.map(function(me){return me.categoryValue}),ce=ie.map(function(me){return me.categoryLabel});V["dimensions["+G.model.containerInd+"].categoryarray"]=[oe],V["dimensions["+G.model.containerInd+"].ticktext"]=[ce],V["dimensions["+G.model.containerInd+"].categoryorder"]="array"}}-1===G.parcatsViewModel.hoverinfoItems.indexOf("skip")&&!G.dragHasMoved&&G.potentialClickBand&&("color"===G.parcatsViewModel.hoveron?S(G.potentialClickBand,"plotly_click",k.event.sourceEvent):u(G.potentialClickBand,"plotly_click",k.event.sourceEvent)),G.model.dragX=null,null!==G.dragCategoryDisplayInd&&(G.parcatsViewModel.dimensions[G.dragDimensionDisplayInd].categories[G.dragCategoryDisplayInd].model.dragY=null,G.dragCategoryDisplayInd=null),G.dragDimensionDisplayInd=null,G.parcatsViewModel.dragDimension=null,G.dragHasMoved=null,G.potentialClickBand=null,j(G.parcatsViewModel),B(G.parcatsViewModel),k.transition().duration(300).ease("cubic-in-out").each(function(){H(G.parcatsViewModel,!0),z(G.parcatsViewModel,!0)}).each("end",function(){(K||re)&&l.restyle(G.parcatsViewModel.graphDiv,V,[W])})}}function U(G){for(var V,W=G.graphDiv._fullData,X=0;X<W.length;X++)if(G.key===W[X].uid){V=X;break}return V}function z(G,V){var W;void 0===V&&(V=!1),G.pathSelection.data(function(X){return X.paths},n),(W=G.pathSelection,V?W.transition():W).attr("d",function(X){return X.svgD})}function H(G,V){function W(ee){return V?ee.transition():ee}void 0===V&&(V=!1),G.dimensionSelection.data(function(ee){return ee.dimensions},n);var X=G.dimensionSelection.selectAll("g.category").data(function(ee){return ee.categories},n);W(G.dimensionSelection).attr("transform",function(ee){return d(ee.x,0)}),W(X).attr("transform",function(ee){return d(0,ee.y)}),X.select(".dimlabel").text(function(ee,ie){return 0===ie?ee.parcatsViewModel.model.dimensions[ee.model.dimensionInd].dimensionLabel:null}),X.select(".catlabel").attr("text-anchor",function(ee){return i(ee)?"start":"end"}).attr("x",function(ee){return i(ee)?ee.width+5:-5}).each(function(ee){var ie,oe;i(ee)?(ie=ee.width+5,oe="start"):(ie=-5,oe="end"),k.select(this).selectAll("tspan").attr("x",ie).attr("text-anchor",oe)});var K=X.selectAll("rect.bandrect").data(function(ee){return ee.bands},n),re=K.enter().append("rect").attr("class","bandrect").attr("cursor","move").attr("stroke-opacity",0).attr("fill",function(ee){return ee.color}).attr("fill-opacity",0);K.attr("fill",function(ee){return ee.color}).attr("width",function(ee){return ee.width}).attr("height",function(ee){return ee.height}).attr("y",function(ee){return ee.y}),m(re),K.each(function(){b.raiseToTop(this)}),K.exit().remove()}function F(G,V,W){var X,K=W[0],re=V.margin||{l:80,r:80,t:100,b:80},ee=K.trace,ie=ee.domain,oe=V.width,ce=V.height,me=Math.floor(oe*(ie.x[1]-ie.x[0])),de=Math.floor(ce*(ie.y[1]-ie.y[0])),he=ie.x[0]*oe+re.l,ve=V.height-ie.y[1]*V.height+re.t,Pe=ee.line.shape;X="all"===ee.hoverinfo?["count","probability"]:(ee.hoverinfo||"").split("+");var xe={trace:ee,key:ee.uid,model:K,x:he,y:ve,width:me,height:de,hoveron:ee.hoveron,hoverinfoItems:X,arrangement:ee.arrangement,bundlecolors:ee.bundlecolors,sortpaths:ee.sortpaths,labelfont:ee.labelfont,categorylabelfont:ee.tickfont,pathShape:Pe,dragDimension:null,margin:re,paths:[],dimensions:[],graphDiv:G,traceSelection:null,pathSelection:null,dimensionSelection:null};return K.dimensions&&(j(xe),B(xe)),xe}function N(G,V,W,X,K){var re,ee,ie=[],oe=[];for(ee=0;ee<W.length-1;ee++)re=A(W[ee]+G[ee],G[ee+1]),ie.push(re(K)),oe.push(re(1-K));var ce="M "+G[0]+","+V[0];for(ce+="l"+W[0]+",0 ",ee=1;ee<W.length;ee++)ce+="C"+ie[ee-1]+","+V[ee-1]+" "+oe[ee-1]+","+V[ee]+" "+G[ee]+","+V[ee],ce+="l"+W[ee]+",0 ";for(ce+="l0,"+X+" ",ce+="l -"+W[W.length-1]+",0 ",ee=W.length-2;ee>=0;ee--)ce+="C"+oe[ee]+","+(V[ee+1]+X)+" "+ie[ee]+","+(V[ee]+X)+" "+(G[ee]+W[ee])+","+(V[ee]+X),ce+="l-"+W[ee]+",0 ";return ce+"Z"}function B(G){var V=G.dimensions,W=G.model,X=V.map(function(_e){return _e.categories.map(function(Fe){return Fe.y})}),K=G.model.dimensions.map(function(_e){return _e.categories.map(function(Fe){return Fe.displayInd})}),re=G.model.dimensions.map(function(_e){return _e.displayInd}),ee=G.dimensions.map(function(_e){return _e.model.dimensionInd}),ie=V.map(function(_e){return _e.x}),oe=V.map(function(_e){return _e.width}),ce=[];for(var me in W.paths)W.paths.hasOwnProperty(me)&&ce.push(W.paths[me]);function de(_e){var Fe=_e.categoryInds.map(function(Ve,He){return K[He][Ve]});return ee.map(function(Ve){return Fe[Ve]})}ce.sort(function(_e,Fe){var Ve=de(_e),He=de(Fe);return"backward"===G.sortpaths&&(Ve.reverse(),He.reverse()),Ve.push(_e.valueInds[0]),He.push(Fe.valueInds[0]),G.bundlecolors&&(Ve.unshift(_e.rawColor),He.unshift(Fe.rawColor)),Ve<He?-1:Ve>He?1:0});for(var he=new Array(ce.length),ve=V[0].model.count,Pe=V[0].categories.map(function(_e){return _e.height}).reduce(function(_e,Fe){return _e+Fe}),xe=0;xe<ce.length;xe++){var ke,Ae=ce[xe];ke=ve>0?Pe*(Ae.count/ve):0;for(var Te,Q=new Array(X.length),se=0;se<Ae.categoryInds.length;se++){var ye=K[se][Ae.categoryInds[se]],Me=re[se];Q[Me]=X[Me][ye],X[Me][ye]+=ke;var Ie=G.dimensions[Me].categories[ye],Ce=Ie.bands.length,Re=Ie.bands[Ce-1];if(void 0===Re||Ae.rawColor!==Re.rawColor){var le=void 0===Re?0:Re.y+Re.height;Ie.bands.push({key:le,color:Ae.color,rawColor:Ae.rawColor,height:ke,width:Ie.width,count:Ae.count,y:le,categoryViewModel:Ie,parcatsViewModel:G})}else{var ge=Ie.bands[Ce-1];ge.height+=ke,ge.count+=Ae.count}}Te=N(ie,Q,oe,ke,"hspline"===G.pathShape?.5:0),he[xe]={key:Ae.valueInds[0],model:Ae,height:ke,leftXs:ie,topYs:Q,dimWidths:oe,svgD:Te,parcatsViewModel:G}}G.paths=he}function j(G){var V=G.model.dimensions.map(function(ee){return{displayInd:ee.displayInd,dimensionInd:ee.dimensionInd}});V.sort(function(ee,ie){return ee.displayInd-ie.displayInd});var W=[];for(var X in V)W.push(J(G,G.model.dimensions[V[X].dimensionInd]));G.dimensions=W}function J(G,V){var W,X=G.model.dimensions.length;W=40+(X>1?(G.width-80-16)/(X-1):0)*V.displayInd;var re,ee,ie,ce,me=[],de=G.model.maxCats,he=V.categories.length,ve=V.count,Pe=G.height-8*(de-1),xe=8*(de-he)/2,ke=V.categories.map(function(Ae){return{displayInd:Ae.displayInd,categoryInd:Ae.categoryInd}});for(ke.sort(function(Ae,Te){return Ae.displayInd-Te.displayInd}),ce=0;ce<he;ce++)ie={key:(ee=V.categories[ke[ce].categoryInd]).valueInds[0],model:ee,width:16,height:re=ve>0?ee.count/ve*Pe:0,y:null!==ee.dragY?ee.dragY:xe,bands:[],parcatsViewModel:G},xe=xe+re+8,me.push(ie);return{key:V.dimensionInd,x:null!==V.dragX?V.dragX:W,y:0,width:16,model:V,categories:me,parcatsViewModel:G,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}$.exports=function(G,V,W,X){r(W,G,X,V)}},45784:function($,R,e){"use strict";var k=e(45460);$.exports=function(A,l,T,b){var d=A._fullLayout,t=d._size;k(A,d._paper,l,{width:t.w,height:t.h,margin:{t:t.t,r:t.r,b:t.b,l:t.l}},T,b)}},73362:function($,R,e){"use strict";var k=e(50693),A=e(13838),l=e(41940),T=e(27670).Y,b=e(1426).extendFlat,d=e(44467).templatedArray;$.exports={domain:T({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:l({editType:"plot"}),tickfont:l({editType:"plot"}),rangefont:l({editType:"plot"}),dimensions:d("dimension",{label:{valType:"string",editType:"plot"},tickvals:b({},A.tickvals,{editType:"plot"}),ticktext:b({},A.ticktext,{editType:"plot"}),tickformat:b({},A.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:b({editType:"calc"},k("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"}}},57920:function($,R,e){"use strict";var k=e(25706),A=e(39898),l=e(28984).keyFun,T=e(28984).repeat,b=e(71828).sorterAsc,d=e(71828).strTranslate,s=k.bar.snapRatio;function t(_,E){return _*(1-s)+E*s}var o=k.bar.snapClose;function r(_,E){return _*(1-o)+E*o}function n(_,E,L,C){if(function(J,G){for(var V=0;V<G.length;V++)if(J>=G[V][0]&&J<=G[V][1])return!0;return!1}(L,C))return L;var P=_?-1:1,I=0,U=E.length-1;if(P<0){var z=I;I=U,U=z}for(var H=E[I],F=H,N=I;P*N<P*U;N+=P){var B=N+P,j=E[B];if(P*L<P*r(H,j))return t(H,F);if(P*L<P*j||B===U)return t(j,H);F=H,H=j}}function i(_){_.attr("x",-k.bar.captureWidth/2).attr("width",k.bar.captureWidth)}function a(_){_.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function c(_){if(!_.brush.filterSpecified)return"0,"+_.height;for(var E,L,C,P=p(_.brush.filter.getConsolidated(),_.height),I=[0],U=P.length?P[0][0]:null,z=0;z<P.length;z++)L=(E=P[z])[1]-E[0],I.push(U),I.push(L),(C=z+1)<P.length&&(U=P[C][0]-E[1]);return I.push(_.height),I}function p(_,E){return _.map(function(L){return L.map(function(C){return Math.max(0,C*E)}).sort(b)})}function f(){A.select(document.body).style("cursor",null)}function x(_){_.attr("stroke-dasharray",c)}function v(_,E){var L=A.select(_).selectAll(".highlight, .highlight-shadow");x(E?L.transition().duration(k.bar.snapDuration).each("end",E):L)}function g(_,E){var L,C=_.brush,P=NaN,I={};if(C.filterSpecified){var U=_.height,z=C.filter.getConsolidated(),H=p(z,U),F=NaN,N=NaN,B=NaN;for(L=0;L<=H.length;L++){var j=H[L];if(j&&j[0]<=E&&E<=j[1]){F=L;break}if(N=L?L-1:NaN,j&&j[0]>E){B=L;break}}if(P=F,isNaN(P)&&(P=isNaN(N)||isNaN(B)?isNaN(N)?B:N:E-H[N][1]<H[B][0]-E?N:B),!isNaN(P)){var J=H[P],G=function(K,re){var ee=k.bar.handleHeight;if(!(re>K[1]+ee||re<K[0]-ee))return re>=.9*K[1]+.1*K[0]?"n":re<=.9*K[0]+.1*K[1]?"s":"ns"}(J,E);G&&(I.interval=z[P],I.intervalPix=J,I.region=G)}}if(_.ordinal&&!I.region){var V=_.unitTickvals,W=_.unitToPaddedPx.invert(E);for(L=0;L<V.length;L++){var X=[.25*V[Math.max(L-1,0)]+.75*V[L],.25*V[Math.min(L+1,V.length-1)]+.75*V[L]];if(W>=X[0]&&W<=X[1]){I.clickableOrdinalRange=X;break}}}return I}function y(_,E){A.event.sourceEvent.stopPropagation();var L=E.height-A.mouse(_)[1]-2*k.verticalPadding,C=E.brush.svgBrush;C.wasDragged=!0,C._dragging=!0,C.newExtent=C.grabbingBar?[L-C.grabPoint,L+C.barLength-C.grabPoint].map(E.unitToPaddedPx.invert):[C.startExtent,E.unitToPaddedPx.invert(L)].sort(b),E.brush.filterSpecified=!0,C.extent=C.stayingIntervals.concat([C.newExtent]),C.brushCallback(E),v(_.parentNode)}function h(_,E){var L=g(E,E.height-A.mouse(_)[1]-2*k.verticalPadding),C="crosshair";L.clickableOrdinalRange?C="pointer":L.region&&(C=L.region+"-resize"),A.select(document.body).style("cursor",C)}function m(_){_.on("mousemove",function(E){A.event.preventDefault(),E.parent.inBrushDrag||h(this,E)}).on("mouseleave",function(E){E.parent.inBrushDrag||f()}).call(A.behavior.drag().on("dragstart",function(E){!function(L,C){A.event.sourceEvent.stopPropagation();var P=C.height-A.mouse(L)[1]-2*k.verticalPadding,I=C.unitToPaddedPx.invert(P),U=C.brush,z=g(C,P),H=z.interval,F=U.svgBrush;if(F.wasDragged=!1,F.grabbingBar="ns"===z.region,F.grabbingBar){var N=H.map(C.unitToPaddedPx);F.grabPoint=P-N[0]-k.verticalPadding,F.barLength=N[1]-N[0]}F.clickableOrdinalRange=z.clickableOrdinalRange,F.stayingIntervals=C.multiselect&&U.filterSpecified?U.filter.getConsolidated():[],H&&(F.stayingIntervals=F.stayingIntervals.filter(function(B){return B[0]!==H[0]&&B[1]!==H[1]})),F.startExtent=z.region?H["s"===z.region?1:0]:I,C.parent.inBrushDrag=!0,F.brushStartCallback()}(this,E)}).on("drag",function(E){y(this,E)}).on("dragend",function(E){!function(L,C){var P=C.brush,I=P.filter,U=P.svgBrush;U._dragging||(h(L,C),y(L,C),C.brush.svgBrush.wasDragged=!1),U._dragging=!1,A.event.sourceEvent.stopPropagation();var z=U.grabbingBar;if(U.grabbingBar=!1,U.grabLocation=void 0,C.parent.inBrushDrag=!1,f(),!U.wasDragged)return U.wasDragged=void 0,U.clickableOrdinalRange?P.filterSpecified&&C.multiselect?U.extent.push(U.clickableOrdinalRange):(U.extent=[U.clickableOrdinalRange],P.filterSpecified=!0):z?(U.extent=U.stayingIntervals,0===U.extent.length&&u(P)):u(P),U.brushCallback(C),v(L.parentNode),void U.brushEndCallback(P.filterSpecified?I.getConsolidated():[]);var H=function(){I.set(I.getConsolidated())};if(C.ordinal){var F=C.unitTickvals;F[F.length-1]<F[0]&&F.reverse(),U.newExtent=[n(0,F,U.newExtent[0],U.stayingIntervals),n(1,F,U.newExtent[1],U.stayingIntervals)];var N=U.newExtent[1]>U.newExtent[0];U.extent=U.stayingIntervals.concat(N?[U.newExtent]:[]),U.extent.length||u(P),U.brushCallback(C),N?v(L.parentNode,H):(H(),v(L.parentNode))}else H();U.brushEndCallback(P.filterSpecified?I.getConsolidated():[])}(this,E)}))}function w(_,E){return _[0]-E[0]}function u(_){_.filterSpecified=!1,_.svgBrush.extent=[[-1/0,1/0]]}function S(_){for(var E,L=_.slice(),C=[],P=L.shift();P;){for(E=P.slice();(P=L.shift())&&P[0]<=E[1];)E[1]=Math.max(E[1],P[1]);C.push(E)}return 1===C.length&&C[0][0]>C[0][1]&&(C=[]),C}$.exports={makeBrush:function(_,E,L,C,P,I){var U,H,F,N,z=(N=[],{set:function(B){1===(N=B.map(function(j){return j.slice().sort(b)}).sort(w)).length&&N[0][0]===-1/0&&N[0][1]===1/0&&(N=[[0,-1]]),H=S(N),F=N.reduce(function(j,J){return[Math.min(j[0],J[0]),Math.max(j[1],J[1])]},[1/0,-1/0])},get:function(){return N.slice()},getConsolidated:function(){return H},getBounds:function(){return F}});return z.set(L),{filter:z,filterSpecified:E,svgBrush:{extent:[],brushStartCallback:C,brushCallback:(U=P,function(H){var F=H.brush,B=F.svgBrush.extent.map(function(J){return J.slice()}).slice();F.filter.set(B),U()}),brushEndCallback:I}}},ensureAxisBrush:function(_,E,L){var C=_.selectAll("."+k.cn.axisBrush).data(T,l);C.enter().append("g").classed(k.cn.axisBrush,!0),function(P,I,U){var z=U._context.staticPlot,H=P.selectAll(".background").data(T);H.enter().append("rect").classed("background",!0).call(i).call(a).style("pointer-events",z?"none":"auto").attr("transform",d(0,k.verticalPadding)),H.call(m).attr("height",function(B){return B.height-k.verticalPadding});var F=P.selectAll(".highlight-shadow").data(T);F.enter().append("line").classed("highlight-shadow",!0).attr("x",-k.bar.width/2).attr("stroke-width",k.bar.width+k.bar.strokeWidth).attr("stroke",I).attr("opacity",k.bar.strokeOpacity).attr("stroke-linecap","butt"),F.attr("y1",function(B){return B.height}).call(x);var N=P.selectAll(".highlight").data(T);N.enter().append("line").classed("highlight",!0).attr("x",-k.bar.width/2).attr("stroke-width",k.bar.width-k.bar.strokeWidth).attr("stroke",k.bar.fillColor).attr("opacity",k.bar.fillOpacity).attr("stroke-linecap","butt"),N.attr("y1",function(B){return B.height}).call(x)}(C,E,L)},cleanRanges:function(_,E){if(Array.isArray(_[0])?(_=_.map(function(C){return C.sort(b)}),_=E.multiselect?S(_.sort(w)):[_[0]]):_=[_.sort(b)],E.tickvals){var L=E.tickvals.slice().sort(b);if(!(_=_.map(function(C){var P=[n(0,L,C[0],[]),n(1,L,C[1],[])];if(P[1]>P[0])return P}).filter(function(C){return C})).length)return}return _.length>1?_:_[0]}}},71791:function($,R,e){"use strict";$.exports={attributes:e(73362),supplyDefaults:e(3633),calc:e(24639),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e(49351),categories:["gl","regl","noOpacity","noHover"],meta:{}}},49351:function($,R,e){"use strict";var k=e(39898),A=e(27659).a0,l=e(21341),T=e(77922);R.name="parcoords",R.plot=function(b){var d=A(b.calcdata,"parcoords")[0];d.length&&l(b,d)},R.clean=function(b,d,s,t){var o=t._has&&t._has("parcoords"),r=d._has&&d._has("parcoords");o&&!r&&(t._paperdiv.selectAll(".parcoords").remove(),t._glimages.selectAll("*").remove())},R.toSVG=function(b){var d=b._fullLayout._glimages,s=k.select(b).selectAll(".svg-container");s.filter(function(t,o){return o===s.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus").each(function(){var t=this,o=t.toDataURL("image/png");d.append("svg:image").attr({xmlns:T.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:t.style.width,height:t.style.height})}),window.setTimeout(function(){k.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},24639:function($,R,e){"use strict";var k=e(71828).isArrayOrTypedArray,A=e(21081),l=e(28984).wrap;$.exports=function(T,b){var d,s;return A.hasColorscale(b,"line")&&k(b.line.color)?(d=b.line.color,s=A.extractOpts(b.line).colorscale,A.calc(T,b,{vals:d,containerStr:"line",cLetter:"c"})):(d=function(t){for(var o=new Array(t),r=0;r<t;r++)o[r]=.5;return o}(b._length),s=[[0,b.line.color],[1,b.line.color]]),l({lineColor:d,cscale:s})}},25706:function($){"use strict";$.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"}}},3633:function($,R,e){"use strict";var k=e(71828),A=e(52075).hasColorscale,l=e(1586),T=e(27670).c,b=e(85501),d=e(89298),s=e(73362),t=e(57920),o=e(25706).maxDimensionCount,r=e(94397);function n(i,a,c,p){function f(h,m){return k.coerce(i,a,s.dimensions,h,m)}var x=f("values"),v=f("visible");if(x&&x.length||(v=a.visible=!1),v){f("label"),f("tickvals"),f("ticktext"),f("tickformat");var g=f("range");a._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:g},d.setConvert(a._ax,p.layout),f("multiselect");var y=f("constraintrange");y&&(a.constraintrange=t.cleanRanges(y,a))}}$.exports=function(i,a,c,p){function f(h,m){return k.coerce(i,a,s,h,m)}var x=i.dimensions;Array.isArray(x)&&x.length>o&&(k.log("parcoords traces support up to "+o+" dimensions at the moment"),x.splice(o));var v=b(i,a,{name:"dimensions",layout:p,handleItemDefaults:n}),g=function(h,m,w,u,S){var _=S("line.color",w);if(A(h,"line")&&k.isArrayOrTypedArray(_)){if(_.length)return S("line.colorscale"),l(h,m,u,S,{prefix:"line.",cLetter:"c"}),_.length;m.line.color=w}return 1/0}(i,a,c,p,f);T(a,p,f),Array.isArray(v)&&v.length||(a.visible=!1),r(a,v,"values",g);var y={family:p.font.family,size:Math.round(p.font.size/1.2),color:p.font.color};k.coerceFont(f,"labelfont",y),k.coerceFont(f,"tickfont",y),k.coerceFont(f,"rangefont",y),f("labelangle"),f("labelside"),f("unselected.line.color"),f("unselected.line.opacity")}},1602:function($,R,e){"use strict";var k=e(71828).isTypedArray;R.convertTypedArray=function(A){return k(A)?Array.prototype.slice.call(A):A},R.isOrdinal=function(A){return!!A.tickvals},R.isVisible=function(A){return A.visible||!("visible"in A)}},67618:function($,R,e){"use strict";var k=e(71791);k.plot=e(21341),$.exports=k},83398:function($,R,e){"use strict";var k=e(56068),A=k(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nattribute vec4 p01_04, p05_08, p09_12, p13_16,\n               p17_20, p21_24, p25_28, p29_32,\n               p33_36, p37_40, p41_44, p45_48,\n               p49_52, p53_56, p57_60, colors;\n\nuniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,\n             loA, hiA, loB, hiB, loC, hiC, loD, hiD;\n\nuniform vec2 resolution, viewBoxPos, viewBoxSize;\nuniform float maskHeight;\nuniform float drwLayer; // 0: context, 1: focus, 2: pick\nuniform vec4 contextColor;\nuniform sampler2D maskTexture, palette;\n\nbool isPick    = (drwLayer > 1.5);\nbool isContext = (drwLayer < 0.5);\n\nconst vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);\nconst vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);\n\nfloat val(mat4 p, mat4 v) {\n    return dot(matrixCompMult(p, v) * UNITS, UNITS);\n}\n\nfloat axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {\n    float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);\n    float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);\n    return y1 * (1.0 - ratio) + y2 * ratio;\n}\n\nint iMod(int a, int b) {\n    return a - b * (a / b);\n}\n\nbool fOutside(float p, float lo, float hi) {\n    return (lo < hi) && (lo > p || p > hi);\n}\n\nbool vOutside(vec4 p, vec4 lo, vec4 hi) {\n    return (\n        fOutside(p[0], lo[0], hi[0]) ||\n        fOutside(p[1], lo[1], hi[1]) ||\n        fOutside(p[2], lo[2], hi[2]) ||\n        fOutside(p[3], lo[3], hi[3])\n    );\n}\n\nbool mOutside(mat4 p, mat4 lo, mat4 hi) {\n    return (\n        vOutside(p[0], lo[0], hi[0]) ||\n        vOutside(p[1], lo[1], hi[1]) ||\n        vOutside(p[2], lo[2], hi[2]) ||\n        vOutside(p[3], lo[3], hi[3])\n    );\n}\n\nbool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {\n    return mOutside(A, loA, hiA) ||\n           mOutside(B, loB, hiB) ||\n           mOutside(C, loC, hiC) ||\n           mOutside(D, loD, hiD);\n}\n\nbool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {\n    mat4 pnts[4];\n    pnts[0] = A;\n    pnts[1] = B;\n    pnts[2] = C;\n    pnts[3] = D;\n\n    for(int i = 0; i < 4; ++i) {\n        for(int j = 0; j < 4; ++j) {\n            for(int k = 0; k < 4; ++k) {\n                if(0 == iMod(\n                    int(255.0 * texture2D(maskTexture,\n                        vec2(\n                            (float(i * 2 + j / 2) + 0.5) / 8.0,\n                            (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight\n                        ))[3]\n                    ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),\n                    2\n                )) return true;\n            }\n        }\n    }\n    return false;\n}\n\nvec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {\n    float x = 0.5 * sign(v) + 0.5;\n    float y = axisY(x, A, B, C, D);\n    float z = 1.0 - abs(v);\n\n    z += isContext ? 0.0 : 2.0 * float(\n        outsideBoundingBox(A, B, C, D) ||\n        outsideRasterMask(A, B, C, D)\n    );\n\n    return vec4(\n        2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,\n        z,\n        1.0\n    );\n}\n\nvoid main() {\n    mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);\n    mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);\n    mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);\n    mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);\n\n    float v = colors[3];\n\n    gl_Position = position(isContext, v, A, B, C, D);\n\n    fragColor =\n        isContext ? vec4(contextColor) :\n        isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));\n}\n"]),l=k(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n    gl_FragColor = fragColor;\n}\n"]),T=e(25706).maxDimensionCount,b=e(71828),d=new Uint8Array(4),s=new Uint8Array(4),t={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function o(v,g,y,h,m){var w=v._gl;w.enable(w.SCISSOR_TEST),w.scissor(g,y,h,m),v.clear({color:[0,0,0,0],depth:1})}function r(v,g,y,h,m,w){var u=w.key;y.drawCompleted||(v.read({x:0,y:0,width:1,height:1,data:d}),y.drawCompleted=!0),function S(_){var E=Math.min(h,m-_*h);0===_&&(window.cancelAnimationFrame(y.currentRafs[u]),delete y.currentRafs[u],o(v,w.scissorX,w.scissorY,w.scissorWidth,w.viewBoxSize[1])),y.clearOnly||(w.count=2*E,w.offset=2*_*h,g(w),_*h+E<m&&(y.currentRafs[u]=window.requestAnimationFrame(function(){S(_+1)})),y.drawCompleted=!1)}(0)}function n(v,g){for(var y=new Array(256),h=0;h<256;h++)y[h]=v(h/255).concat(g);return y}function i(v,g){return(v>>>8*g)%256/255}function a(v,g,y){for(var h=new Array(8*g),m=0,w=0;w<g;w++)for(var u=0;u<2;u++)for(var S=0;S<4;S++){var _=4*v+S,E=y[64*w+_];63===_&&0===u&&(E*=-1),h[m++]=E}return h}function c(v){var g="0"+v;return g.substr(g.length-2)}function p(v){return v<T?"p"+c(v+1)+"_"+c(v+4):"colors"}function f(v,g,y,h,m,w,u,S,_,E,L,C,P,I){for(var U=[[],[]],z=0;z<64;z++)U[0][z]=z===m?1:0,U[1][z]=z===w?1:0;var H=v.lines.canvasOverdrag*I,F=v.domain,N=v.canvasWidth*I,B=v.canvasHeight*I,j=v.pad.l*I,J=v.pad.b*I,G=v.layoutHeight*I,V=v.layoutWidth*I,W=v.deselectedLines.color,X=v.deselectedLines.opacity;return b.extendFlat({key:L,resolution:[N,B],viewBoxPos:[(u*=I)+H,S*=I],viewBoxSize:[_*=I,E*=I],i0:m,i1:w,dim0A:U[0].slice(0,16),dim0B:U[0].slice(16,32),dim0C:U[0].slice(32,48),dim0D:U[0].slice(48,64),dim1A:U[1].slice(0,16),dim1B:U[1].slice(16,32),dim1C:U[1].slice(32,48),dim1D:U[1].slice(48,64),drwLayer:C,contextColor:[W[0]/255,W[1]/255,W[2]/255,"auto"!==X?W[3]*X:Math.max(.00392156862745098,Math.pow(1/v.lines.color.length,.3333333333333333))],scissorX:(h===g?0:u+H)+(j-H)+V*F.x[0],scissorWidth:(h===y?N-u+H:_+.5)+(h===g?u+H:0),scissorY:S+J+G*F.y[0],scissorHeight:E,viewportX:j-H+V*F.x[0],viewportY:J+G*F.y[0],viewportWidth:N,viewportHeight:B},P)}function x(v){var g=2047,y=Math.max(0,Math.floor(v[0]*g),0),h=Math.min(g,Math.ceil(v[1]*g),g);return[Math.min(y,h),Math.max(y,h)]}$.exports=function(v,g){var y,m,w,u,S=g.context,_=g.pick,E=g.regl,L=E._gl,C=L.getParameter(L.ALIASED_LINE_WIDTH_RANGE),P=Math.max(C[0],Math.min(C[1],g.viewModel.plotGlPixelRatio)),I={currentRafs:{},drawCompleted:!0,clearOnly:!1},U=function(B){for(var j={},J=0;J<=T;J+=4)j[p(J)]=B.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)});return j}(E),z=E.texture(t),H=[];N(g);var F=E({profile:!1,blend:{enable:S,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:!S,mask:!0,func:"less",range:[0,1]},cull:{enable:!0,face:"back"},scissor:{enable:!0,box:{x:E.prop("scissorX"),y:E.prop("scissorY"),width:E.prop("scissorWidth"),height:E.prop("scissorHeight")}},viewport:{x:E.prop("viewportX"),y:E.prop("viewportY"),width:E.prop("viewportWidth"),height:E.prop("viewportHeight")},dither:!1,vert:A,frag:l,primitive:"lines",lineWidth:P,attributes:U,uniforms:{resolution:E.prop("resolution"),viewBoxPos:E.prop("viewBoxPos"),viewBoxSize:E.prop("viewBoxSize"),dim0A:E.prop("dim0A"),dim1A:E.prop("dim1A"),dim0B:E.prop("dim0B"),dim1B:E.prop("dim1B"),dim0C:E.prop("dim0C"),dim1C:E.prop("dim1C"),dim0D:E.prop("dim0D"),dim1D:E.prop("dim1D"),loA:E.prop("loA"),hiA:E.prop("hiA"),loB:E.prop("loB"),hiB:E.prop("hiB"),loC:E.prop("loC"),hiC:E.prop("hiC"),loD:E.prop("loD"),hiD:E.prop("hiD"),palette:z,contextColor:E.prop("contextColor"),maskTexture:E.prop("maskTexture"),drwLayer:E.prop("drwLayer"),maskHeight:E.prop("maskHeight")},offset:E.prop("offset"),count:E.prop("count")});function N(B){y=B.model,m=B.viewModel.dimensions.slice(),w=m[0]?m[0].values.length:0;var j=y.lines,J=_?j.color.map(function(V,W){return W/j.color.length}):j.color,G=function(V,W,X){for(var re=new Array(V*(T+4)),ee=0,ie=0;ie<V;ie++){for(var oe=0;oe<T;oe++)re[ee++]=oe<W.length?W[oe].paddedUnitValues[ie]:.5;re[ee++]=i(ie,2),re[ee++]=i(ie,1),re[ee++]=i(ie,0),re[ee++]=Math.max(1e-6,Math.min(.999999,X[ie]))}return re}(w,m,J);(function(V,W,X){for(var K=0;K<=T;K+=4)V[p(K)](a(K/4,W,X))})(U,w,G),S||_||(z=E.texture(b.extendFlat({data:n(y.unitToColor,255)},t)))}return{render:function(B,j,J){var G,V,W,X=B.length,K=1/0,re=-1/0;for(G=0;G<X;G++)B[G].dim0.canvasX<K&&(K=B[G].dim0.canvasX,V=G),B[G].dim1.canvasX>re&&(re=B[G].dim1.canvasX,W=G);0===X&&o(E,0,0,y.canvasWidth,y.canvasHeight);var ee=function(ke){var Ae,Te,Q,se=[[],[]];for(Q=0;Q<64;Q++){var fe=!ke&&Q<m.length?m[Q].brush.filter.getBounds():[-1/0,1/0];se[0][Q]=fe[0],se[1][Q]=fe[1]}var ye=new Array(16384);for(Ae=0;Ae<16384;Ae++)ye[Ae]=255;if(!ke)for(Ae=0;Ae<m.length;Ae++){var Me=Ae%8,Ie=(Ae-Me)/8,Ce=Math.pow(2,Me),Re=m[Ae].brush.filter.get();if(!(Re.length<2)){var le=x(Re[0])[1];for(Te=1;Te<Re.length;Te++){var ge=x(Re[Te]);for(Q=le+1;Q<ge[0];Q++)ye[8*Q+Ie]&=~Ce;le=Math.max(le,ge[1])}}}var _e={shape:[8,2048],format:"alpha",type:"uint8",mag:"nearest",min:"nearest",data:ye};return u?u(_e):u=E.texture(_e),{maskTexture:u,maskHeight:2048,loA:se[0].slice(0,16),loB:se[0].slice(16,32),loC:se[0].slice(32,48),loD:se[0].slice(48,64),hiA:se[1].slice(0,16),hiB:se[1].slice(16,32),hiC:se[1].slice(32,48),hiD:se[1].slice(48,64)}}(S);for(G=0;G<X;G++){var ie=B[G],oe=ie.dim0.crossfilterDimensionIndex,ce=ie.dim1.crossfilterDimensionIndex,me=ie.canvasX,de=ie.canvasY,he=me+ie.panelSizeX,ve=ie.plotGlPixelRatio;if(j||!H[oe]||H[oe][0]!==me||H[oe][1]!==he){H[oe]=[me,he];var Pe=f(y,V,W,G,oe,ce,me,de,ie.panelSizeX,ie.panelSizeY,ie.dim0.crossfilterDimensionIndex,S?0:_?2:1,ee,ve);I.clearOnly=J,r(E,F,I,j?y.lines.blockLineCount:w,w,Pe)}}},readPixel:function(B,j){return E.read({x:B,y:j,width:1,height:1,data:s}),s},readPixels:function(B,j,J,G){var V=new Uint8Array(4*J*G);return E.read({x:B,y:j,width:J,height:G,data:V}),V},destroy:function(){for(var B in v.style["pointer-events"]="none",z.destroy(),u&&u.destroy(),U)U[B].destroy()},update:N}}},94397:function($){"use strict";$.exports=function(R,e,k,A){var l,T;for(A||(A=1/0),l=0;l<e.length;l++)(T=e[l]).visible&&(A=Math.min(A,T[k].length));for(A===1/0&&(A=0),R._length=A,l=0;l<e.length;l++)(T=e[l]).visible&&(T._length=A);return A}},17171:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=A.numberFormat,T=e(36652),b=e(89298),d=A.strRotate,s=A.strTranslate,t=e(63893),o=e(91424),r=e(21081),n=e(28984),i=n.keyFun,a=n.repeat,c=n.unwrap,p=e(1602),f=e(25706),x=e(57920),v=e(83398);function g(H,F,N){return A.aggNums(H,null,F,N)}function y(H,F){return m(g(Math.min,H,F),g(Math.max,H,F))}function h(H){var F=H.range;return F?m(F[0],F[1]):y(H.values,H._length)}function m(H,F){return!isNaN(H)&&isFinite(H)||(H=0),!isNaN(F)&&isFinite(F)||(F=0),H===F&&(0===H?(H-=1,F+=1):(H*=.9,F*=1.1)),[H,F]}function w(H,F,N,B,j){var J,G,V=h(N);return B?k.scale.ordinal().domain(B.map((J=l(N.tickformat),G=j,G?function(W,X){return G[X]??J(W)}:J))).range(B.map(function(W){return H-F+(W-V[0])/(V[1]-V[0])*(2*F-H)})):k.scale.linear().domain(V).range([H-F,F])}function u(H){if(H.tickvals){var F=h(H);return k.scale.ordinal().domain(H.tickvals).range(H.tickvals.map(function(N){return(N-F[0])/(F[1]-F[0])}))}}function S(H){var F=H.map(function(j){return j[0]}),N=H.map(function(j){var J=T(j[1]);return k.rgb("rgb("+J[0]+","+J[1]+","+J[2]+")")}),B="rgb".split("").map(function(j){return k.scale.linear().clamp(!0).domain(F).range(N.map((J=j,function(G){return G[J]})));var J});return function(j){return B.map(function(J){return J(j)})}}function _(H){return H.dimensions.some(function(F){return F.brush.filterSpecified})}function E(H,F,N){var B=c(F),j=B.trace,J=p.convertTypedArray(B.lineColor),G=j.line,V={color:T(j.unselected.line.color),opacity:j.unselected.line.opacity},W=r.extractOpts(G),X=W.reversescale?r.flipScale(B.cscale):B.cscale,K=j.domain,re=j.dimensions,ee=H.width,ie=j.labelangle,oe=j.labelside,ce=j.labelfont,me=j.tickfont,de=j.rangefont,he=A.extendDeepNoArrays({},G,{color:J.map(k.scale.linear().domain(h({values:J,range:[W.min,W.max],_length:j._length}))),blockLineCount:f.blockLineCount,canvasOverdrag:f.overdrag*f.canvasPixelRatio}),ve=Math.floor(ee*(K.x[1]-K.x[0])),Pe=Math.floor(H.height*(K.y[1]-K.y[0])),xe=H.margin||{l:80,r:80,t:100,b:80},ke=ve,Ae=Pe;return{key:N,colCount:re.filter(p.isVisible).length,dimensions:re,tickDistance:f.tickDistance,unitToColor:S(X),lines:he,deselectedLines:V,labelAngle:ie,labelSide:oe,labelFont:ce,tickFont:me,rangeFont:de,layoutWidth:ee,layoutHeight:H.height,domain:K,translateX:K.x[0]*ee,translateY:H.height-K.y[1]*H.height,pad:xe,canvasWidth:ke*f.canvasPixelRatio+2*he.canvasOverdrag,canvasHeight:Ae*f.canvasPixelRatio,width:ke,height:Ae,canvasPixelRatio:f.canvasPixelRatio}}function L(H,F,N){var ee,ie,B=N.width,j=N.height,J=N.dimensions,G=N.canvasPixelRatio,V=function(ee){return B*ee/Math.max(1,N.colCount-1)},W=f.verticalPadding/j,X=(ee=j,ie=f.verticalPadding,k.scale.linear().range([ie,ee-ie])),K={key:N.key,xScale:V,model:N,inBrushDrag:!1},re={};return K.dimensions=J.filter(p.isVisible).map(function(ee,ie){var ye,Me,oe=(ye=ee,Me=W,k.scale.linear().domain(h(ye)).range([Me,1-Me])),ce=re[ee.label];re[ee.label]=(ce||0)+1;var me=ee.label+(ce?"__"+ce:""),de=ee.constraintrange,he=de&&de.length;he&&!Array.isArray(de[0])&&(de=[de]);var ve=he?de.map(function(ye){return ye.map(oe)}):[[-1/0,1/0]],Pe=ee.values;Pe.length>ee._length&&(Pe=Pe.slice(0,ee._length));var xe,ke=ee.tickvals;function Ae(ye,Me){return{val:ye,text:xe[Me]}}function Te(ye,Me){return ye.val-Me.val}if(Array.isArray(ke)&&ke.length){xe=ee.ticktext,Array.isArray(xe)&&xe.length?xe.length>ke.length?xe=xe.slice(0,ke.length):ke.length>xe.length&&(ke=ke.slice(0,xe.length)):xe=ke.map(l(ee.tickformat));for(var Q=1;Q<ke.length;Q++)if(ke[Q]<ke[Q-1]){for(var se=ke.map(Ae).sort(Te),fe=0;fe<ke.length;fe++)ke[fe]=se[fe].val,xe[fe]=se[fe].text;break}}else ke=void 0;return Pe=p.convertTypedArray(Pe),{key:me,label:ee.label,tickFormat:ee.tickformat,tickvals:ke,ticktext:xe,ordinal:p.isOrdinal(ee),multiselect:ee.multiselect,xIndex:ie,crossfilterDimensionIndex:ie,visibleIndex:ee._index,height:j,values:Pe,paddedUnitValues:Pe.map(oe),unitTickvals:ke&&ke.map(oe),xScale:V,x:V(ie),canvasX:V(ie)*G,unitToPaddedPx:X,domainScale:w(j,f.verticalPadding,ee,ke,xe),ordinalScale:u(ee),parent:K,model:N,brush:x.makeBrush(H,he,ve,function(){H.linePickActive(!1)},function(){var ye=K;ye.focusLayer&&ye.focusLayer.render(ye.panels,!0);var Me=_(ye);!H.contextShown()&&Me?(ye.contextLayer&&ye.contextLayer.render(ye.panels,!0),H.contextShown(!0)):H.contextShown()&&!Me&&(ye.contextLayer&&ye.contextLayer.render(ye.panels,!0,!0),H.contextShown(!1))},function(ye){if(K.focusLayer.render(K.panels,!0),K.pickLayer&&K.pickLayer.render(K.panels,!0),H.linePickActive(!0),F&&F.filterChanged){var Me=oe.invert,Ie=ye.map(function(Ce){return Ce.map(Me).sort(A.sorterAsc)}).sort(function(Ce,Re){return Ce[0]-Re[0]});F.filterChanged(K.key,ee._index,Ie)}})}}),K}function C(H){H.classed(f.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function P(H,F){var B=H*Math.PI/180;return{dir:"top"===F?1:-1,dx:Math.sin(B),dy:Math.cos(B),degrees:H}}function I(H,F,N){for(var B=F.panels||(F.panels=[]),j=H.data(),J=0;J<j.length-1;J++){var G=B[J]||(B[J]={}),V=j[J],W=j[J+1];G.dim0=V,G.dim1=W,G.canvasX=V.canvasX,G.panelSizeX=W.canvasX-V.canvasX,G.panelSizeY=F.model.canvasHeight,G.y=0,G.canvasY=0,G.plotGlPixelRatio=N}}function U(H,F){return b.tickText(H._ax,F,!1).text}function z(H,F){if(H.ordinal)return"";var N=H.domainScale.domain();return U(H.model.dimensions[H.visibleIndex],N[F?N.length-1:0])}$.exports=function(H,F,N,B){var j=H._context.staticPlot,J=H._fullLayout,G=J._toppaper,V=J._glcontainer,W=H._context.plotGlPixelRatio,X=H._fullLayout.paper_bgcolor;!function(ye){for(var Me=0;Me<ye.length;Me++)for(var Ie=0;Ie<ye[Me].length;Ie++)for(var Ce=ye[Me][Ie].trace,Re=Ce.dimensions,le=0;le<Re.length;le++){var ge=Re[le].values,_e=Re[le]._ax;_e&&(_e.range=_e.range?m(_e.range[0],_e.range[1]):y(ge,Ce._length),_e.dtick||(_e.dtick=.01*(Math.abs(_e.range[1]-_e.range[0])||1)),_e.tickformat=Re[le].tickformat,b.calcTicks(_e),_e.cleanRange())}}(F);var K,re,ee=(K=!0,re=!1,{linePickActive:function(ye){return arguments.length?K=!!ye:K},contextShown:function(ye){return arguments.length?re=!!ye:re}}),ie=F.filter(function(ye){return c(ye).trace.visible}).map(E.bind(0,N)).map(L.bind(0,ee,B));V.each(function(ye,Me){return A.extendFlat(ye,ie[Me])});var oe=V.selectAll(".gl-canvas").each(function(ye){ye.viewModel=ie[0],ye.viewModel.plotGlPixelRatio=W,ye.viewModel.paperColor=X,ye.model=ye.viewModel?ye.viewModel.model:null}),ce=null;oe.filter(function(ye){return ye.pick}).style("pointer-events",j?"none":"auto").on("mousemove",function(ye){if(ee.linePickActive()&&ye.lineLayer&&B&&B.hover){var Me=k.event,Ie=this.width,Ce=this.height,Re=k.mouse(this),le=Re[0],ge=Re[1];if(le<0||ge<0||le>=Ie||ge>=Ce)return;var _e=ye.lineLayer.readPixel(le,Ce-1-ge),Fe=0!==_e[3],Ve=Fe?_e[2]+256*(_e[1]+256*_e[0]):null,He={x:le,y:ge,clientX:Me.clientX,clientY:Me.clientY,dataIndex:ye.model.key,curveNumber:Ve};Ve!==ce&&(Fe?B.hover(He):B.unhover&&B.unhover(He),ce=Ve)}}),oe.style("opacity",function(ye){return ye.pick?0:1}),G.style("background","rgba(255, 255, 255, 0)");var me=G.selectAll("."+f.cn.parcoords).data(ie,i);me.exit().remove(),me.enter().append("g").classed(f.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),me.attr("transform",function(ye){return s(ye.model.translateX,ye.model.translateY)});var de=me.selectAll("."+f.cn.parcoordsControlView).data(a,i);de.enter().append("g").classed(f.cn.parcoordsControlView,!0),de.attr("transform",function(ye){return s(ye.model.pad.l,ye.model.pad.t)});var he=de.selectAll("."+f.cn.yAxis).data(function(ye){return ye.dimensions},i);he.enter().append("g").classed(f.cn.yAxis,!0),de.each(function(ye){I(he,ye,W)}),oe.each(function(ye){ye.viewModel&&(!ye.lineLayer||B?ye.lineLayer=v(this,ye):ye.lineLayer.update(ye),(ye.key||0===ye.key)&&(ye.viewModel[ye.key]=ye.lineLayer),ye.lineLayer.render(ye.viewModel.panels,!ye.context||B))}),he.attr("transform",function(ye){return s(ye.xScale(ye.xIndex),0)}),he.call(k.behavior.drag().origin(function(ye){return ye}).on("drag",function(ye){var Me=ye.parent;ee.linePickActive(!1),ye.x=Math.max(-f.overdrag,Math.min(ye.model.width+f.overdrag,k.event.x)),ye.canvasX=ye.x*ye.model.canvasPixelRatio,he.sort(function(Ie,Ce){return Ie.x-Ce.x}).each(function(Ie,Ce){Ie.xIndex=Ce,Ie.x=ye===Ie?Ie.x:Ie.xScale(Ie.xIndex),Ie.canvasX=Ie.x*Ie.model.canvasPixelRatio}),I(he,Me,W),he.filter(function(Ie){return 0!==Math.abs(ye.xIndex-Ie.xIndex)}).attr("transform",function(Ie){return s(Ie.xScale(Ie.xIndex),0)}),k.select(this).attr("transform",s(ye.x,0)),he.each(function(Ie,Ce,Re){Re===ye.parent.key&&(Me.dimensions[Ce]=Ie)}),Me.contextLayer&&Me.contextLayer.render(Me.panels,!1,!_(Me)),Me.focusLayer.render&&Me.focusLayer.render(Me.panels)}).on("dragend",function(ye){var Me=ye.parent;ye.x=ye.xScale(ye.xIndex),ye.canvasX=ye.x*ye.model.canvasPixelRatio,I(he,Me,W),k.select(this).attr("transform",function(Ie){return s(Ie.x,0)}),Me.contextLayer&&Me.contextLayer.render(Me.panels,!1,!_(Me)),Me.focusLayer&&Me.focusLayer.render(Me.panels),Me.pickLayer&&Me.pickLayer.render(Me.panels,!0),ee.linePickActive(!0),B&&B.axesMoved&&B.axesMoved(Me.key,Me.dimensions.map(function(Ie){return Ie.crossfilterDimensionIndex}))})),he.exit().remove();var ve=he.selectAll("."+f.cn.axisOverlays).data(a,i);ve.enter().append("g").classed(f.cn.axisOverlays,!0),ve.selectAll("."+f.cn.axis).remove();var Pe=ve.selectAll("."+f.cn.axis).data(a,i);Pe.enter().append("g").classed(f.cn.axis,!0),Pe.each(function(ye){var Me=ye.model.height/ye.model.tickDistance,Ie=ye.domainScale,Ce=Ie.domain();k.select(this).call(k.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Me,ye.tickFormat).tickValues(ye.ordinal?Ce:null).tickFormat(function(Re){return p.isOrdinal(ye)?Re:U(ye.model.dimensions[ye.visibleIndex],Re)}).scale(Ie)),o.font(Pe.selectAll("text"),ye.model.tickFont)}),Pe.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),Pe.selectAll("text").style("text-shadow",t.makeTextShadow(X)).style("cursor","default");var xe=ve.selectAll("."+f.cn.axisHeading).data(a,i);xe.enter().append("g").classed(f.cn.axisHeading,!0);var ke=xe.selectAll("."+f.cn.axisTitle).data(a,i);ke.enter().append("text").classed(f.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",j?"none":"auto"),ke.text(function(ye){return ye.label}).each(function(ye){var Me=k.select(this);o.font(Me,ye.model.labelFont),t.convertToTspans(Me,H)}).attr("transform",function(ye){var Me=P(ye.model.labelAngle,ye.model.labelSide),Ie=f.axisTitleOffset;return(Me.dir>0?"":s(0,2*Ie+ye.model.height))+d(Me.degrees)+s(-Ie*Me.dx,-Ie*Me.dy)}).attr("text-anchor",function(ye){var Me=P(ye.model.labelAngle,ye.model.labelSide);return 2*Math.abs(Me.dx)>Math.abs(Me.dy)?Me.dir*Me.dx<0?"start":"end":"middle"});var Ae=ve.selectAll("."+f.cn.axisExtent).data(a,i);Ae.enter().append("g").classed(f.cn.axisExtent,!0);var Te=Ae.selectAll("."+f.cn.axisExtentTop).data(a,i);Te.enter().append("g").classed(f.cn.axisExtentTop,!0),Te.attr("transform",s(0,-f.axisExtentOffset));var Q=Te.selectAll("."+f.cn.axisExtentTopText).data(a,i);Q.enter().append("text").classed(f.cn.axisExtentTopText,!0).call(C),Q.text(function(ye){return z(ye,!0)}).each(function(ye){o.font(k.select(this),ye.model.rangeFont)});var se=Ae.selectAll("."+f.cn.axisExtentBottom).data(a,i);se.enter().append("g").classed(f.cn.axisExtentBottom,!0),se.attr("transform",function(ye){return s(0,ye.model.height+f.axisExtentOffset)});var fe=se.selectAll("."+f.cn.axisExtentBottomText).data(a,i);fe.enter().append("text").classed(f.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(C),fe.text(function(ye){return z(ye,!1)}).each(function(ye){o.font(k.select(this),ye.model.rangeFont)}),x.ensureAxisBrush(ve,X,H)}},21341:function($,R,e){"use strict";var k=e(17171),A=e(79749),l=e(1602).isVisible,T={};function b(d,s,t){var o=s.indexOf(t),r=d.indexOf(o);return-1===r&&(r+=s.length),r}($.exports=function(d,s){var t=d._fullLayout;if(A(d,[],T)){var o={},r={},n={},i={},a=t._size;s.forEach(function(c,p){var f=c[0].trace;n[p]=f.index;var x=i[p]=f._fullInput.index;o[p]=d.data[x].dimensions,r[p]=d.data[x].dimensions.slice()}),k(d,s,{width:a.w,height:a.h,margin:{t:a.t,r:a.r,b:a.b,l:a.l}},{filterChanged:function(c,p,f){var x=r[c][p],v=f.map(function(u){return u.slice()}),g="dimensions["+p+"].constraintrange",y=t._tracePreGUI[d._fullData[n[c]]._fullInput.uid];void 0===y[g]&&(y[g]=x.constraintrange||null);var m=d._fullData[n[c]].dimensions[p];v.length?(1===v.length&&(v=v[0]),x.constraintrange=v,m.constraintrange=v.slice(),v=[v]):(delete x.constraintrange,delete m.constraintrange,v=null);var w={};w[g]=v,d.emit("plotly_restyle",[w,[i[c]]])},hover:function(c){d.emit("plotly_hover",c)},unhover:function(c){d.emit("plotly_unhover",c)},axesMoved:function(c,p){var x,v,f=(x=p,v=r[c].filter(l),function(g,y){return b(x,v,g)-b(x,v,y)});o[c].sort(f),r[c].filter(function(x){return!l(x)}).sort(function(x){return r[c].indexOf(x)}).forEach(function(x){o[c].splice(o[c].indexOf(x),1),o[c].splice(r[c].indexOf(x),0,x)}),d.emit("plotly_restyle",[{dimensions:[o[c]]},[i[c]]])}})}}).reglPrecompiled=T},34e3:function($,R,e){"use strict";var k=e(9012),A=e(27670).Y,l=e(41940),T=e(22399),b=e(5386).f,d=e(5386).s,s=e(1426).extendFlat,t=l({editType:"plot",arrayOk:!0,colorEditType:"plot"});$.exports={labels:{valType:"data_array",editType:"calc"},label0:{valType:"number",dflt:0,editType:"calc"},dlabel:{valType:"number",dflt:1,editType:"calc"},values:{valType:"data_array",editType:"calc"},marker:{colors:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:T.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},editType:"calc"},text:{valType:"data_array",editType:"plot"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},scalegroup:{valType:"string",dflt:"",editType:"calc"},textinfo:{valType:"flaglist",flags:["label","text","value","percent"],extras:["none"],editType:"calc"},hoverinfo:s({},k.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:b({},{keys:["label","color","value","percent","text"]}),texttemplate:d({editType:"plot"},{keys:["label","color","value","percent","text"]}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:s({},t,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:s({},t,{}),outsidetextfont:s({},t,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:s({},t,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:A({name:"pie",trace:!0,editType:"calc"}),hole:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},sort:{valType:"boolean",dflt:!0,editType:"calc"},direction:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",dflt:0,editType:"calc"},pull:{valType:"number",min:0,max:1,dflt:0,arrayOk:!0,editType:"calc"},_deprecated:{title:{valType:"string",dflt:"",editType:"calc"},titlefont:s({},t,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},13584:function($,R,e){"use strict";var k=e(74875);R.name="pie",R.plot=function(A,l,T,b){k.plotBasePlot(R.name,A,l,T,b)},R.clean=function(A,l,T,b){k.cleanBasePlot(R.name,A,l,T,b)}},32354:function($,R,e){"use strict";var k=e(92770),A=e(84267),l=e(7901),T={};function b(s){return function(t,o){return!!t&&!!(t=A(t)).isValid()&&(t=l.addOpacity(t,t.getAlpha()),s[o]||(s[o]=t),t)}}function d(s,t){var o,r=JSON.stringify(s),n=t[r];if(!n){for(n=s.slice(),o=0;o<s.length;o++)n.push(A(s[o]).lighten(20).toHexString());for(o=0;o<s.length;o++)n.push(A(s[o]).darken(20).toHexString());t[r]=n}return n}$.exports={calc:function(s,t){var o,r,n=[],i=s._fullLayout,a=i.hiddenlabels||[],c=t.labels,p=t.marker.colors||[],f=t.values,x=t._length,v=t._hasValues&&x;if(t.dlabel)for(c=new Array(x),o=0;o<x;o++)c[o]=String(t.label0+o*t.dlabel);var g={},y=b(i["_"+t.type+"colormap"]),h=0,m=!1;for(o=0;o<x;o++){var w,u,S;if(v){if(!k(w=f[o]))continue;w=+w}else w=1;void 0!==(u=c[o])&&""!==u||(u=o);var _=g[u=String(u)];void 0===_?(g[u]=n.length,(S=-1!==a.indexOf(u))||(h+=w),n.push({v:w,label:u,color:y(p[o],u),i:o,pts:[o],hidden:S})):(m=!0,(r=n[_]).v+=w,r.pts.push(o),r.hidden||(h+=w),!1===r.color&&p[o]&&(r.color=y(p[o],u)))}return n=n.filter(function(E){return E.v>=0}),("funnelarea"===t.type?m:t.sort)&&n.sort(function(E,L){return L.v-E.v}),n[0]&&(n[0].vTotal=h),n},crossTraceCalc:function(s,t){var o=(t||{}).type;o||(o="pie");var r=s._fullLayout,n=s.calcdata,i=r[o+"colorway"],a=r["_"+o+"colormap"];r["extend"+o+"colors"]&&(i=d(i,T));for(var c=0,p=0;p<n.length;p++){var f=n[p];if(f[0].trace.type===o)for(var x=0;x<f.length;x++){var v=f[x];!1===v.color&&(a[v.label]?v.color=a[v.label]:(a[v.label]=v.color=i[c%i.length],c++))}}},makePullColorFn:b,generateExtendedColors:d}},37434:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(34e3),T=e(27670).c,b=e(90769).handleText;function d(s,t){var o=Array.isArray(s),r=A.isArrayOrTypedArray(t),n=Math.min(o?s.length:1/0,r?t.length:1/0);if(isFinite(n)||(n=0),n&&r){for(var i,a=0;a<n;a++){var c=t[a];if(k(c)&&c>0){i=!0;break}}i||(n=0)}return{hasLabels:o,hasValues:r,len:n}}$.exports={handleLabelsAndValues:d,supplyDefaults:function(s,t,o,r){function n(y,h){return A.coerce(s,t,l,y,h)}var i=d(n("labels"),n("values")),a=i.len;if(t._hasLabels=i.hasLabels,t._hasValues=i.hasValues,!t._hasLabels&&t._hasValues&&(n("label0"),n("dlabel")),a){t._length=a,n("marker.line.width")&&n("marker.line.color"),n("marker.colors"),n("scalegroup");var c,p=n("text"),f=n("texttemplate");if(f||(c=n("textinfo",Array.isArray(p)?"text+percent":"percent")),n("hovertext"),n("hovertemplate"),f||c&&"none"!==c){var x=n("textposition");b(s,t,r,n,x,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),(Array.isArray(x)||"auto"===x||"outside"===x)&&n("automargin"),("inside"===x||"auto"===x||Array.isArray(x))&&n("insidetextorientation")}T(t,r,n);var v=n("hole");if(n("title.text")){var g=n("title.position",v?"middle center":"top center");v||"middle center"!==g||(t.title.position="top center"),A.coerceFont(n,"title.font",r.font)}n("sort"),n("direction"),n("rotation"),n("pull")}else t.visible=!1}}},20007:function($,R,e){"use strict";var k=e(23469).appendArrayMultiPointValues;$.exports=function(A,l){var T={curveNumber:l.index,pointNumbers:A.pts,data:l._input,fullData:l,label:A.label,color:A.color,value:A.v,percent:A.percent,text:A.text,bbox:A.bbox,v:A.v};return 1===A.pts.length&&(T.pointNumber=T.i=A.pts[0]),k(T,l,A.pts),"funnelarea"===l.type&&(delete T.v,delete T.i),T}},53581:function($,R,e){"use strict";var k=e(71828);function A(l){return-1!==l.indexOf("e")?l.replace(/[.]?0+e/,"e"):-1!==l.indexOf(".")?l.replace(/[.]?0+$/,""):l}R.formatPiePercent=function(l,T){var b=A((100*l).toPrecision(3));return k.numSeparate(b,T)+"%"},R.formatPieValue=function(l,T){var b=A(l.toPrecision(10));return k.numSeparate(b,T)},R.getFirstFilled=function(l,T){if(Array.isArray(l))for(var b=0;b<T.length;b++){var d=l[T[b]];if(d||0===d||""===d)return d}},R.castOption=function(l,T){return Array.isArray(l)?R.getFirstFilled(l,T):l||void 0},R.getRotationAngle=function(l){return("auto"===l?0:l)*Math.PI/180}},58810:function($,R,e){"use strict";$.exports={attributes:e(34e3),supplyDefaults:e(37434).supplyDefaults,supplyLayoutDefaults:e(92097),layoutAttributes:e(92774),calc:e(32354).calc,crossTraceCalc:e(32354).crossTraceCalc,plot:e(14575).plot,style:e(68357),styleOne:e(63463),moduleType:"trace",name:"pie",basePlotModule:e(13584),categories:["pie-like","pie","showLegend"],meta:{}}},92774:function($){"use strict";$.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},92097:function($,R,e){"use strict";var k=e(71828),A=e(92774);$.exports=function(l,T){function b(d,s){return k.coerce(l,T,A,d,s)}b("hiddenlabels"),b("piecolorway",T.colorway),b("extendpiecolors")}},14575:function($,R,e){"use strict";var k=e(39898),A=e(74875),l=e(30211),T=e(7901),b=e(91424),d=e(71828),s=d.strScale,t=d.strTranslate,o=e(63893),r=e(72597),n=r.recordMinTextSize,i=r.clearMinTextSize,a=e(97313).TEXTPAD,c=e(53581),p=e(20007),f=e(71828).isValidTextValue;function x(F,N,B){var j=B[0],J=j.cx,G=j.cy,V=j.trace,W="funnelarea"===V.type;"_hasHoverLabel"in V||(V._hasHoverLabel=!1),"_hasHoverEvent"in V||(V._hasHoverEvent=!1),F.on("mouseover",function(X){var K=N._fullLayout,re=N._fullData[V.index];if(!N._dragging&&!1!==K.hovermode){var ee=re.hoverinfo;if(Array.isArray(ee)&&(ee=l.castHoverinfo({hoverinfo:[c.castOption(ee,X.pts)],_module:V._module},K,0)),"all"===ee&&(ee="label+text+value+percent+name"),re.hovertemplate||"none"!==ee&&"skip"!==ee&&ee){var ie=X.rInscribed||0,oe=J+X.pxmid[0]*(1-ie),ce=G+X.pxmid[1]*(1-ie),me=K.separators,de=[];if(ee&&-1!==ee.indexOf("label")&&de.push(X.label),X.text=c.castOption(re.hovertext||re.text,X.pts),ee&&-1!==ee.indexOf("text")){var he=X.text;d.isValidTextValue(he)&&de.push(he)}X.value=X.v,X.valueLabel=c.formatPieValue(X.v,me),ee&&-1!==ee.indexOf("value")&&de.push(X.valueLabel),X.percent=X.v/j.vTotal,X.percentLabel=c.formatPiePercent(X.percent,me),ee&&-1!==ee.indexOf("percent")&&de.push(X.percentLabel);var ve=re.hoverlabel,Pe=ve.font,xe=[];l.loneHover({trace:V,x0:oe-ie*j.r,x1:oe+ie*j.r,y:ce,_x0:W?J+X.TL[0]:oe-ie*j.r,_x1:W?J+X.TR[0]:oe+ie*j.r,_y0:W?G+X.TL[1]:ce-ie*j.r,_y1:W?G+X.BL[1]:ce+ie*j.r,text:de.join("<br>"),name:re.hovertemplate||-1!==ee.indexOf("name")?re.name:void 0,idealAlign:X.pxmid[0]<0?"left":"right",color:c.castOption(ve.bgcolor,X.pts)||X.color,borderColor:c.castOption(ve.bordercolor,X.pts),fontFamily:c.castOption(Pe.family,X.pts),fontSize:c.castOption(Pe.size,X.pts),fontColor:c.castOption(Pe.color,X.pts),nameLength:c.castOption(ve.namelength,X.pts),textAlign:c.castOption(ve.align,X.pts),hovertemplate:c.castOption(re.hovertemplate,X.pts),hovertemplateLabels:X,eventData:[p(X,re)]},{container:K._hoverlayer.node(),outerContainer:K._paper.node(),gd:N,inOut_bbox:xe}),X.bbox=xe[0],V._hasHoverLabel=!0}V._hasHoverEvent=!0,N.emit("plotly_hover",{points:[p(X,re)],event:k.event})}}),F.on("mouseout",function(X){var K=N._fullLayout,re=N._fullData[V.index],ee=k.select(this).datum();V._hasHoverEvent&&(X.originalEvent=k.event,N.emit("plotly_unhover",{points:[p(ee,re)],event:k.event}),V._hasHoverEvent=!1),V._hasHoverLabel&&(l.loneUnhover(K._hoverlayer.node()),V._hasHoverLabel=!1)}),F.on("click",function(X){N._dragging||!1===N._fullLayout.hovermode||(N._hoverdata=[p(X,N._fullData[V.index])],l.click(N,k.event))})}function v(F,N,B){var j=c.castOption(F.insidetextfont.color,N.pts);!j&&F._input.textfont&&(j=c.castOption(F._input.textfont.color,N.pts));var J=c.castOption(F.insidetextfont.family,N.pts)||c.castOption(F.textfont.family,N.pts)||B.family,G=c.castOption(F.insidetextfont.size,N.pts)||c.castOption(F.textfont.size,N.pts)||B.size;return{color:j||T.contrast(N.color),family:J,size:G}}function g(F,N){for(var B,j,J=0;J<F.length;J++)if((j=(B=F[J][0]).trace).title.text){var G=j.title.text;j._meta&&(G=d.templateString(G,j._meta));var V=b.tester.append("text").attr("data-notex",1).text(G).call(b.font,j.title.font).call(o.convertToTspans,N),W=b.bBox(V.node(),!0);B.titleBox={width:W.width,height:W.height},V.remove()}}function y(F,N,B){var j=B.r||N.rpx1,J=N.rInscribed;if(N.startangle===N.stopangle)return{rCenter:1-J,scale:0,rotate:0,textPosAngle:0};var G,V=N.ring,W=1===V&&Math.abs(N.startangle-N.stopangle)===2*Math.PI,X=N.halfangle,K=N.midangle,re=B.trace.insidetextorientation,ee="horizontal"===re,ie="tangential"===re,oe="radial"===re,ce="auto"===re,me=[];if(!ce){var de,he=function(Te,Q){if(Re=(Me=N).stopangle,(Ce=Me.startangle)>(Ie=Te)&&Ie>Re||Ce<Ie&&Ie<Re){var se=Math.abs(Te-N.startangle),fe=Math.abs(Te-N.stopangle),ye=se<fe?se:fe;(G="tan"===Q?m(F,j,V,ye,0):h(F,j,V,ye,Math.PI/2)).textPosAngle=Te,me.push(G)}var Me,Ie,Ce,Re};if(ee||ie){for(de=4;de>=-4;de-=2)he(Math.PI*de,"tan");for(de=4;de>=-4;de-=2)he(Math.PI*(de+1),"tan")}if(ee||oe){for(de=4;de>=-4;de-=2)he(Math.PI*(de+1.5),"rad");for(de=4;de>=-4;de-=2)he(Math.PI*(de+.5),"rad")}}if(W||ce||ee){var ve=Math.sqrt(F.width*F.width+F.height*F.height);if((G={scale:J*j*2/ve,rCenter:1-J,rotate:0}).textPosAngle=(N.startangle+N.stopangle)/2,G.scale>=1)return G;me.push(G)}(ce||oe)&&((G=h(F,j,V,X,K)).textPosAngle=(N.startangle+N.stopangle)/2,me.push(G)),(ce||ie)&&((G=m(F,j,V,X,K)).textPosAngle=(N.startangle+N.stopangle)/2,me.push(G));for(var Pe=0,xe=0,ke=0;ke<me.length;ke++){var Ae=me[ke].scale;if(xe<Ae&&(xe=Ae,Pe=ke),!ce&&xe>=1)break}return me[Pe]}function h(F,N,B,j,J){N=Math.max(0,N-2*a);var G=F.width/F.height,V=S(G,j,N,B);return{scale:2*V/F.height,rCenter:w(G,V/N),rotate:u(J)}}function m(F,N,B,j,J){N=Math.max(0,N-2*a);var G=F.height/F.width,V=S(G,j,N,B);return{scale:2*V/F.width,rCenter:w(G,V/N),rotate:u(J+Math.PI/2)}}function w(F,N){return Math.cos(N)-F*N}function u(F){return(180/Math.PI*F+720)%180-90}function S(F,N,B,j){var J=F+1/(2*Math.tan(N));return B*Math.min(1/(Math.sqrt(J*J+.5)+J),j/(Math.sqrt(F*F+j/2)+F))}function _(F,N){return F.v!==N.vTotal||N.trace.hole?Math.min(1/(1+1/Math.sin(F.halfangle)),F.ring/2):1}function E(F,N){var B=N.pxmid[0],j=N.pxmid[1],J=F.width/2,G=F.height/2;return B<0&&(J*=-1),j<0&&(G*=-1),{scale:1,rCenter:1,rotate:0,x:J+Math.abs(G)*(J>0?1:-1)/2,y:G/(1+B*B/(j*j)),outside:!0}}function L(F,N){var B,j,J,G=F.trace,V={x:F.cx,y:F.cy},W={tx:0,ty:0};W.ty+=G.title.font.size,J=P(G),-1!==G.title.position.indexOf("top")?(V.y-=(1+J)*F.r,W.ty-=F.titleBox.height):-1!==G.title.position.indexOf("bottom")&&(V.y+=(1+J)*F.r);var X,K=F.r/(void 0===(X=F.trace.aspectratio)?1:X),re=N.w*(G.domain.x[1]-G.domain.x[0])/2;return-1!==G.title.position.indexOf("left")?(re+=K,V.x-=(1+J)*K,W.tx+=F.titleBox.width/2):-1!==G.title.position.indexOf("center")?re*=2:-1!==G.title.position.indexOf("right")&&(re+=K,V.x+=(1+J)*K,W.tx-=F.titleBox.width/2),B=re/F.titleBox.width,j=C(F,N)/F.titleBox.height,{x:V.x,y:V.y,scale:Math.min(B,j),tx:W.tx,ty:W.ty}}function C(F,N){var B=F.trace;return Math.min(F.titleBox.height,N.h*(B.domain.y[1]-B.domain.y[0])/2)}function P(F){var N,B=F.pull;if(!B)return 0;if(Array.isArray(B))for(B=0,N=0;N<F.pull.length;N++)F.pull[N]>B&&(B=F.pull[N]);return B}function I(F,N){for(var B=[],j=0;j<F.length;j++){var J=F[j][0],G=J.trace,V=G.domain,W=N.w*(V.x[1]-V.x[0]),X=N.h*(V.y[1]-V.y[0]);G.title.text&&"middle center"!==G.title.position&&(X-=C(J,N));var re=X/2;"funnelarea"!==G.type||G.scalegroup||(re/=G.aspectratio),J.r=Math.min(W/2,re)/(1+P(G)),J.cx=N.l+N.w*(G.domain.x[1]+G.domain.x[0])/2,J.cy=N.t+N.h*(1-G.domain.y[0])-X/2,G.title.text&&-1!==G.title.position.indexOf("bottom")&&(J.cy-=C(J,N)),G.scalegroup&&-1===B.indexOf(G.scalegroup)&&B.push(G.scalegroup)}!function(ee,ie){for(var oe,ce,me,de=0;de<ie.length;de++){var he=1/0,ve=ie[de];for(ce=0;ce<ee.length;ce++)if((me=(oe=ee[ce][0]).trace).scalegroup===ve){var Pe;if("pie"===me.type)Pe=oe.r*oe.r;else if("funnelarea"===me.type){var xe,ke;me.aspectratio>1?ke=(xe=oe.r)/me.aspectratio:xe=(ke=oe.r)*me.aspectratio,Pe=(xe*=(1+me.baseratio)/2)*ke}he=Math.min(he,Pe/oe.vTotal)}for(ce=0;ce<ee.length;ce++)if((me=(oe=ee[ce][0]).trace).scalegroup===ve){var Ae=he*oe.vTotal;"funnelarea"===me.type&&(Ae/=(1+me.baseratio)/2,Ae/=me.aspectratio),oe.r=Math.sqrt(Ae)}}}(F,B)}function U(F,N){return[F*Math.sin(N),-F*Math.cos(N)]}function z(F,N,B){var Pe,j=F._fullLayout,J=B.trace,G=J.texttemplate,V=J.textinfo;if(!G&&V&&"none"!==V){var W,X=V.split("+"),K=function(Pe){return-1!==X.indexOf(Pe)},re=K("label"),ee=K("text"),ie=K("value"),oe=K("percent"),ce=j.separators;if(W=re?[N.label]:[],ee){var me=c.getFirstFilled(J.text,N.pts);f(me)&&W.push(me)}ie&&W.push(c.formatPieValue(N.v,ce)),oe&&W.push(c.formatPiePercent(N.v/B.vTotal,ce)),N.text=W.join("<br>")}if(G){var de=d.castOption(J,N.i,"texttemplate");if(de){var he={label:(Pe=N).label,value:Pe.v,valueLabel:c.formatPieValue(Pe.v,j.separators),percent:Pe.v/B.vTotal,percentLabel:c.formatPiePercent(Pe.v/B.vTotal,j.separators),color:Pe.color,text:Pe.text,customdata:d.castOption(J,Pe.i,"customdata")},ve=c.getFirstFilled(J.text,N.pts);(f(ve)||""===ve)&&(he.text=ve),N.text=d.texttemplateString(de,he,F._fullLayout._d3locale,he,J._meta||{})}else N.text=""}}function H(F,N){var B=F.rotate*Math.PI/180,j=Math.cos(B),J=Math.sin(B),G=(N.left+N.right)/2,V=(N.top+N.bottom)/2;F.textX=G*j-V*J,F.textY=G*J+V*j,F.noCenter=!0}$.exports={plot:function(F,N){var B=F._context.staticPlot,j=F._fullLayout,J=j._size;i("pie",j),g(N,F),I(N,J);var G=d.makeTraceGroups(j._pielayer,N,"trace").each(function(V){var W=k.select(this),X=V[0],K=X.trace;(function(re){var ee,ie,oe,ce=re[0],me=ce.r,de=ce.trace,he=c.getRotationAngle(de.rotation),ve=2*Math.PI/ce.vTotal,Pe="px0",xe="px1";if("counterclockwise"===de.direction){for(ee=0;ee<re.length&&re[ee].hidden;ee++);if(ee===re.length)return;he+=ve*re[ee].v,ve*=-1,Pe="px1",xe="px0"}for(oe=U(me,he),ee=0;ee<re.length;ee++)(ie=re[ee]).hidden||(ie[Pe]=oe,ie.startangle=he,ie.pxmid=U(me,he+=ve*ie.v/2),ie.midangle=he,oe=U(me,he+=ve*ie.v/2),ie.stopangle=he,ie[xe]=oe,ie.largeArc=ie.v>ce.vTotal/2?1:0,ie.halfangle=Math.PI*Math.min(ie.v/ce.vTotal,.5),ie.ring=1-de.hole,ie.rInscribed=_(ie,ce))})(V),W.attr("stroke-linejoin","round"),W.each(function(){var re=k.select(this).selectAll("g.slice").data(V);re.enter().append("g").classed("slice",!0),re.exit().remove();var ee=[[[],[]],[[],[]]],ie=!1;re.each(function(xe,ke){if(xe.hidden)k.select(this).selectAll("path,g").remove();else{xe.pointNumber=xe.i,xe.curveNumber=K.index,ee[xe.pxmid[1]<0?0:1][xe.pxmid[0]<0?0:1].push(xe);var Ae=X.cx,Te=X.cy,Q=k.select(this),se=Q.selectAll("path.surface").data([xe]);if(se.enter().append("path").classed("surface",!0).style({"pointer-events":B?"none":"all"}),Q.call(x,F,V),K.pull){var fe=+c.castOption(K.pull,xe.pts)||0;fe>0&&(Ae+=fe*xe.pxmid[0],Te+=fe*xe.pxmid[1])}xe.cxFinal=Ae,xe.cyFinal=Te;var ye=K.hole;if(xe.v===X.vTotal){var Me="M"+(Ae+xe.px0[0])+","+(Te+xe.px0[1])+ge(xe.px0,xe.pxmid,!0,1)+ge(xe.pxmid,xe.px0,!0,1)+"Z";se.attr("d",ye?"M"+(Ae+ye*xe.px0[0])+","+(Te+ye*xe.px0[1])+ge(xe.px0,xe.pxmid,!1,ye)+ge(xe.pxmid,xe.px0,!1,ye)+"Z"+Me:Me)}else{var Ie=ge(xe.px0,xe.px1,!0,1);if(ye){var Ce=1-ye;se.attr("d","M"+(Ae+ye*xe.px1[0])+","+(Te+ye*xe.px1[1])+ge(xe.px1,xe.px0,!1,ye)+"l"+Ce*xe.px0[0]+","+Ce*xe.px0[1]+Ie+"Z")}else se.attr("d","M"+Ae+","+Te+"l"+xe.px0[0]+","+xe.px0[1]+Ie+"Z")}z(F,xe,X);var Re=c.castOption(K.textposition,xe.pts),le=Q.selectAll("g.slicetext").data(xe.text&&"none"!==Re?[0]:[]);le.enter().append("g").classed("slicetext",!0),le.exit().remove(),le.each(function(){var kt,mt,wt,_e=d.ensureSingle(k.select(this),"text","",function(kt){kt.attr("data-notex",1)}),Fe=d.ensureUniformFontSize(F,"outside"===Re?(wt=j.font,{color:c.castOption((kt=K).outsidetextfont.color,(mt=xe).pts)||c.castOption(kt.textfont.color,mt.pts)||wt.color,family:c.castOption(kt.outsidetextfont.family,mt.pts)||c.castOption(kt.textfont.family,mt.pts)||wt.family,size:c.castOption(kt.outsidetextfont.size,mt.pts)||c.castOption(kt.textfont.size,mt.pts)||wt.size}):v(K,xe,j.font));_e.text(xe.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(b.font,Fe).call(o.convertToTspans,F);var Ve,He=b.bBox(_e.node());if("outside"===Re)Ve=E(He,xe);else if(Ve=y(He,xe,X),"auto"===Re&&Ve.scale<1){var nt=d.ensureUniformFontSize(F,K.outsidetextfont);_e.call(b.font,nt),Ve=E(He=b.bBox(_e.node()),xe)}var tt=Ve.textPosAngle,ot=void 0===tt?xe.pxmid:U(X.r,tt);if(Ve.targetX=Ae+ot[0]*Ve.rCenter+(Ve.x||0),Ve.targetY=Te+ot[1]*Ve.rCenter+(Ve.y||0),H(Ve,He),Ve.outside){var dt=Ve.targetY;xe.yLabelMin=dt-He.height/2,xe.yLabelMid=dt,xe.yLabelMax=dt+He.height/2,xe.labelExtraX=0,xe.labelExtraY=0,ie=!0}Ve.fontSize=Fe.size,n(K.type,Ve,j),V[ke].transform=Ve,d.setTransormAndDisplay(_e,Ve)})}function ge(_e,Fe,Ve,He){return"a"+He*X.r+","+He*X.r+" 0 "+xe.largeArc+(Ve?" 1 ":" 0 ")+He*(Fe[0]-_e[0])+","+He*(Fe[1]-_e[1])}});var ke,oe=k.select(this).selectAll("g.titletext").data(K.title.text?[0]:[]);if(oe.enter().append("g").classed("titletext",!0),oe.exit().remove(),oe.each(function(){var xe,Te,Q,ke=d.ensureSingle(k.select(this),"text","",function(Te){Te.attr("data-notex",1)}),Ae=K.title.text;K._meta&&(Ae=d.templateString(Ae,K._meta)),ke.text(Ae).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(b.font,K.title.font).call(o.convertToTspans,F),xe="middle center"===K.title.position?(Te=X,Q=Math.sqrt(Te.titleBox.width*Te.titleBox.width+Te.titleBox.height*Te.titleBox.height),{x:Te.cx,y:Te.cy,scale:Te.trace.hole*Te.r*2/Q,tx:0,ty:-Te.titleBox.height/2+Te.trace.title.font.size}):L(X,J),ke.attr("transform",t(xe.x,xe.y)+s(Math.min(1,xe.scale))+t(xe.tx,xe.ty))}),ie&&function(xe,ke){var Ae,Te,Q,se,fe,ye,Me,Ie,Ce,Re,le,ge,_e;function Fe(tt,ot){return tt.pxmid[1]-ot.pxmid[1]}function Ve(tt,ot){return ot.pxmid[1]-tt.pxmid[1]}function He(tt,ot){ot||(ot={});var dt,kt,mt,wt,Lt=ot.labelExtraY+(Te?ot.yLabelMax:ot.yLabelMin),Ct=Te?tt.yLabelMin:tt.yLabelMax,It=Te?tt.yLabelMax:tt.yLabelMin,Ut=tt.cyFinal+fe(tt.px0[1],tt.px1[1]),Rt=Lt-Ct;if(Rt*Me>0&&(tt.labelExtraY=Rt),Array.isArray(ke.pull))for(kt=0;kt<Re.length;kt++)(mt=Re[kt])===tt||(c.castOption(ke.pull,tt.pts)||0)>=(c.castOption(ke.pull,mt.pts)||0)||((tt.pxmid[1]-mt.pxmid[1])*Me>0?(Rt=mt.cyFinal+fe(mt.px0[1],mt.px1[1])-Ct-tt.labelExtraY)*Me>0&&(tt.labelExtraY+=Rt):(It+tt.labelExtraY-Ut)*Me>0&&(dt=3*ye*Math.abs(kt-Re.indexOf(tt)),(wt=mt.cxFinal+se(mt.px0[0],mt.px1[0])+dt-(tt.cxFinal+tt.pxmid[0])-tt.labelExtraX)*ye>0&&(tt.labelExtraX+=wt)))}for(Te=0;Te<2;Te++)for(Q=Te?Fe:Ve,fe=Te?Math.max:Math.min,Me=Te?1:-1,Ae=0;Ae<2;Ae++){for(se=Ae?Math.max:Math.min,ye=Ae?1:-1,(Ie=xe[Te][Ae]).sort(Q),Re=(Ce=xe[1-Te][Ae]).concat(Ie),ge=[],le=0;le<Ie.length;le++)void 0!==Ie[le].yLabelMid&&ge.push(Ie[le]);for(_e=!1,le=0;Te&&le<Ce.length;le++)if(void 0!==Ce[le].yLabelMid){_e=Ce[le];break}for(le=0;le<ge.length;le++){var nt=le&&ge[le-1];_e&&!le&&(nt=_e),He(ge[le],nt)}}}(ee,K),ke=K,re.each(function(Ae){var Te=k.select(this);if(Ae.labelExtraX||Ae.labelExtraY){var Q=Te.select("g.slicetext text");Ae.transform.targetX+=Ae.labelExtraX,Ae.transform.targetY+=Ae.labelExtraY,d.setTransormAndDisplay(Q,Ae.transform);var se=Ae.cxFinal+Ae.pxmid[0],fe="M"+se+","+(Ae.cyFinal+Ae.pxmid[1]),ye=(Ae.yLabelMax-Ae.yLabelMin)*(Ae.pxmid[0]<0?-1:1)/4;if(Ae.labelExtraX){var Me=Ae.labelExtraX*Ae.pxmid[1]/Ae.pxmid[0],Ie=Ae.yLabelMid+Ae.labelExtraY-(Ae.cyFinal+Ae.pxmid[1]);Math.abs(Me)>Math.abs(Ie)?fe+="l"+Ie*Ae.pxmid[0]/Ae.pxmid[1]+","+Ie+"H"+(se+Ae.labelExtraX+ye):fe+="l"+Ae.labelExtraX+","+Me+"v"+(Ie-Me)+"h"+ye}else fe+="V"+(Ae.yLabelMid+Ae.labelExtraY)+"h"+ye;d.ensureSingle(Te,"path","textline").call(T.stroke,ke.outsidetextfont.color).attr({"stroke-width":Math.min(2,ke.outsidetextfont.size/8),d:fe,fill:"none"})}else Te.select("path.textline").remove()}),ie&&K.automargin){var ce=b.bBox(W.node()),me=K.domain,ve=(J.w*(me.x[1]-me.x[0])*.5-X.r)/J.w,Pe=(J.h*(me.y[1]-me.y[0])*.5-X.r)/J.h;A.autoMargin(F,"pie."+K.uid+".automargin",{xl:me.x[0]-ve,xr:me.x[1]+ve,yb:me.y[0]-Pe,yt:me.y[1]+Pe,l:Math.max(X.cx-X.r-ce.left,0),r:Math.max(ce.right-(X.cx+X.r),0),b:Math.max(ce.bottom-(X.cy+X.r),0),t:Math.max(X.cy-X.r-ce.top,0),pad:5})}})});setTimeout(function(){G.selectAll("tspan").each(function(){var V=k.select(this);V.attr("dy")&&V.attr("dy",V.attr("dy"))})},0)},formatSliceLabel:z,transformInsideText:y,determineInsideTextFont:v,positionTitleOutside:L,prerenderTitles:g,layoutAreas:I,attachFxHandlers:x,computeTransform:H}},68357:function($,R,e){"use strict";var k=e(39898),A=e(63463),l=e(72597).resizeText;$.exports=function(T){var b=T._fullLayout._pielayer.selectAll(".trace");l(T,b,"pie"),b.each(function(d){var s=d[0].trace,t=k.select(this);t.style({opacity:s.opacity}),t.selectAll("path.surface").each(function(o){k.select(this).call(A,o,s)})})}},63463:function($,R,e){"use strict";var k=e(7901),A=e(53581).castOption;$.exports=function(l,T,b){var d=b.marker.line,s=A(d.color,T.pts)||k.defaultLine,t=A(d.width,T.pts)||0;l.style("stroke-width",t).call(k.fill,T.color).call(k.stroke,s)}},10959:function($,R,e){"use strict";var k=e(82196);$.exports={x:k.x,y:k.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:k.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}},42743:function($,R,e){"use strict";var k=e(9330).gl_pointcloud2d,A=e(78614),l=e(71739).findExtremes,T=e(34603);function b(s,t){this.scene=s,this.uid=t,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=k(s.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var d=b.prototype;d.handlePick=function(s){var t=this.idToIndex[s.pointId];return{trace:this,dataCoord:s.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[2*t],this.pickXYData[2*t+1]]:[this.pickXData[t],this.pickYData[t]],textLabel:Array.isArray(this.textLabels)?this.textLabels[t]:this.textLabels,color:this.color,name:this.name,pointIndex:t,hoverinfo:this.hoverinfo}},d.update=function(s){this.index=s.index,this.textLabels=s.text,this.name=s.name,this.hoverinfo=s.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(s),this.color=T(s,{})},d.updateFast=function(s){var t,o,r,n,i,a,c=this.xData=this.pickXData=s.x,p=this.yData=this.pickYData=s.y,f=this.pickXYData=s.xy,v=s.indices,g=this.bounds;if(f){if(r=f,t=f.length>>>1,s.xbounds&&s.ybounds)g[0]=s.xbounds[0],g[2]=s.xbounds[1],g[1]=s.ybounds[0],g[3]=s.ybounds[1];else for(a=0;a<t;a++)i=r[2*a+1],(n=r[2*a])<g[0]&&(g[0]=n),n>g[2]&&(g[2]=n),i<g[1]&&(g[1]=i),i>g[3]&&(g[3]=i);if(v)o=v;else for(o=new Int32Array(t),a=0;a<t;a++)o[a]=a}else for(t=c.length,r=new Float32Array(2*t),o=new Int32Array(t),a=0;a<t;a++)n=c[a],i=p[a],o[a]=a,r[2*a]=n,r[2*a+1]=i,n<g[0]&&(g[0]=n),n>g[2]&&(g[2]=n),i<g[1]&&(g[1]=i),i>g[3]&&(g[3]=i);this.idToIndex=o,this.pointcloudOptions.idToIndex=o,this.pointcloudOptions.positions=r;var y=A(s.marker.color),h=A(s.marker.border.color),m=s.opacity*s.marker.opacity;y[3]*=m,this.pointcloudOptions.color=y;var w=s.marker.blend;null===w&&(w=c.length<100||p.length<100),this.pointcloudOptions.blend=w,h[3]*=m,this.pointcloudOptions.borderColor=h;var u=s.marker.sizemin,S=Math.max(s.marker.sizemax,s.marker.sizemin);this.pointcloudOptions.sizeMin=u,this.pointcloudOptions.sizeMax=S,this.pointcloudOptions.areaRatio=s.marker.border.arearatio,this.pointcloud.update(this.pointcloudOptions);var _=this.scene.xaxis,E=this.scene.yaxis,L=S/2||.5;s._extremes[_._id]=l(_,[g[0],g[2]],{ppad:L}),s._extremes[E._id]=l(E,[g[1],g[3]],{ppad:L})},d.dispose=function(){this.pointcloud.dispose()},$.exports=function(s,t){var o=new b(s,t.uid);return o.update(t),o}},33876:function($,R,e){"use strict";var k=e(71828),A=e(10959);$.exports=function(l,T,b){function d(s,t){return k.coerce(l,T,A,s,t)}d("x"),d("y"),d("xbounds"),d("ybounds"),l.xy&&l.xy instanceof Float32Array&&(T.xy=l.xy),l.indices&&l.indices instanceof Int32Array&&(T.indices=l.indices),d("text"),d("marker.color",b),d("marker.opacity"),d("marker.blend"),d("marker.sizemin"),d("marker.sizemax"),d("marker.border.color",b),d("marker.border.arearatio"),T._length=null}},20593:function($,R,e){"use strict";["*pointcloud* trace is deprecated!","Please consider switching to the *scattergl* trace type."].join(" "),$.exports={attributes:e(10959),supplyDefaults:e(33876),calc:e(36563),plot:e(42743),moduleType:"trace",name:"pointcloud",basePlotModule:e(4796),categories:["gl","gl2d","showLegend"],meta:{}}},39953:function($,R,e){"use strict";var k=e(41940),A=e(9012),l=e(22399),T=e(77914),b=e(27670).Y,d=e(5386).f,s=e(50693),t=e(44467).templatedArray,o=e(12663).descriptionOnlyNumbers,r=e(1426).extendFlat,n=e(30962).overrideAll;($.exports=n({hoverinfo:r({},A.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:T.hoverlabel,domain:b({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},valueformat:{valType:"string",dflt:".3s",description:o("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:k({}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:l.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:T.hoverlabel,hovertemplate:d({},{keys:["value","label"]})},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:l.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:T.hoverlabel,hovertemplate:d({},{keys:["value","label"]}),colorscales:t("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:r(s().colorscale,{dflt:[[0,"white"],[1,"black"]]})})}},"calc","nested")).transforms=void 0},75536:function($,R,e){"use strict";var k=e(30962).overrideAll,A=e(27659).a0,l=e(60436),T=e(528),b=e(6964),d=e(28569),s=e(47322).prepSelect,t=e(71828),o=e(73972),r="sankey";function n(i,a){var c=i._fullData[a],p=i._fullLayout,f=p.dragmode,v=c._bgRect;if(v&&"pan"!==f&&"zoom"!==f){b(v,"pan"===p.dragmode?"move":"crosshair");var g={_id:"x",c2p:t.identity,_offset:c._sankey.translateX,_length:c._sankey.width},y={_id:"y",c2p:t.identity,_offset:c._sankey.translateY,_length:c._sankey.height},h={gd:i,element:v.node(),plotinfo:{id:a,xaxis:g,yaxis:y,fillRangeItems:t.noop},subplot:a,xaxes:[g],yaxes:[y],doneFnCompleted:function(m){var w,u=i._fullData[a],S=u.node.groups.slice(),_=[];function E(I){for(var U=u._sankey.graph.nodes,z=0;z<U.length;z++)if(U[z].pointNumber===I)return U[z]}for(var L=0;L<m.length;L++){var C=E(m[L].pointNumber);if(C)if(C.group){for(var P=0;P<C.childrenNodes.length;P++)_.push(C.childrenNodes[P].pointNumber);S[C.pointNumber-u.node._count]=!1}else _.push(C.pointNumber)}w=S.filter(Boolean).concat([_]),o.call("_guiRestyle",i,{"node.groups":[w]},a)},prepFn:function(m,w,u){s(m,w,u,h,f)}};d.init(h)}}R.name=r,R.baseLayoutAttrOverrides=k({hoverlabel:T.hoverlabel},"plot","nested"),R.plot=function(i){var a=A(i.calcdata,r)[0];l(i,a),R.updateFx(i)},R.clean=function(i,a,c,p){var f=p._has&&p._has(r),x=a._has&&a._has(r);f&&!x&&(p._paperdiv.selectAll(".sankey").remove(),p._paperdiv.selectAll(".bgsankey").remove())},R.updateFx=function(i){for(var a=0;a<i._fullData.length;a++)n(i,a)}},92930:function($,R,e){"use strict";var k=e(68664),A=e(71828),l=e(28984).wrap,T=A.isArrayOrTypedArray,b=A.isIndex,d=e(21081);$.exports=function(s,t){var o=function(r){var n,i=r.node,a=r.link,c=[],p=T(a.color),f=T(a.customdata),x={},v={},g=a.colorscales.length;for(n=0;n<g;n++){var y=a.colorscales[n],h=d.extractScale(y,{cLetter:"c"}),m=d.makeColorScaleFunc(h);v[y.label]=m}var w=0;for(n=0;n<a.value.length;n++)a.source[n]>w&&(w=a.source[n]),a.target[n]>w&&(w=a.target[n]);var u,S=w+1;r.node._count=S;var _=r.node.groups,E={};for(n=0;n<_.length;n++){var L=_[n];for(u=0;u<L.length;u++){var C=L[u],P=S+n;E.hasOwnProperty(C)?A.warn("Node "+C+" is already part of a group."):E[C]=P}}var I={source:[],target:[]};for(n=0;n<a.value.length;n++){var U=a.value[n],z=a.source[n],H=a.target[n];if(U>0&&b(z,S)&&b(H,S)&&(!E.hasOwnProperty(z)||!E.hasOwnProperty(H)||E[z]!==E[H])){E.hasOwnProperty(H)&&(H=E[H]),E.hasOwnProperty(z)&&(z=E[z]),x[z=+z]=x[H=+H]=!0;var F="";a.label&&a.label[n]&&(F=a.label[n]);var N=null;F&&v.hasOwnProperty(F)&&(N=v[F]),c.push({pointNumber:n,label:F,color:p?a.color[n]:a.color,customdata:f?a.customdata[n]:a.customdata,concentrationscale:N,source:z,target:H,value:+U}),I.source.push(z),I.target.push(H)}}var B=S+_.length,j=T(i.color),J=T(i.customdata),G=[];for(n=0;n<B;n++)x[n]&&G.push({group:n>S-1,childrenNodes:[],pointNumber:n,label:i.label[n],color:j?i.color[n]:i.color,customdata:J?i.customdata[n]:i.customdata});var W=!1;return function(X,K,re){for(var ee=A.init2dArray(X,0),ie=0;ie<Math.min(K.length,re.length);ie++)if(A.isIndex(K[ie],X)&&A.isIndex(re[ie],X)){if(K[ie]===re[ie])return!0;ee[K[ie]].push(re[ie])}return k(ee).components.some(function(oe){return oe.length>1})}(B,I.source,I.target)&&(W=!0),{circular:W,links:c,nodes:G,groups:_,groupLookup:E}}(t);return l({circular:o.circular,_nodes:o.nodes,_links:o.links,_groups:o.groups,_groupLookup:o.groupLookup})}},85247:function($){"use strict";$.exports={nodeTextOffsetHorizontal:4,nodeTextOffsetVertical:3,nodePadAcross:10,sankeyIterations:50,forceIterations:5,forceTicksPerFrame:10,duration:500,ease:"linear",cn:{sankey:"sankey",sankeyLinks:"sankey-links",sankeyLink:"sankey-link",sankeyNodeSet:"sankey-node-set",sankeyNode:"sankey-node",nodeRect:"node-rect",nodeLabel:"node-label"}}},26857:function($,R,e){"use strict";var k=e(71828),A=e(39953),l=e(7901),T=e(84267),b=e(27670).c,d=e(38048),s=e(44467),t=e(85501);function o(r,n){function i(a,c){return k.coerce(r,n,A.link.colorscales,a,c)}i("label"),i("cmin"),i("cmax"),i("colorscale")}$.exports=function(r,n,i,a){function c(S,_){return k.coerce(r,n,A,S,_)}var p=k.extendDeep(a.hoverlabel,r.hoverlabel),f=r.node,x=s.newContainer(n,"node");function v(S,_){return k.coerce(f,x,A.node,S,_)}v("label"),v("groups"),v("x"),v("y"),v("pad"),v("thickness"),v("line.color"),v("line.width"),v("hoverinfo",r.hoverinfo),d(f,x,v,p),v("hovertemplate");var g=a.colorway;v("color",x.label.map(function(S,_){return l.addOpacity(g[_%g.length],.8)})),v("customdata");var y=r.link||{},h=s.newContainer(n,"link");function m(S,_){return k.coerce(y,h,A.link,S,_)}m("label"),m("arrowlen"),m("source"),m("target"),m("value"),m("line.color"),m("line.width"),m("hoverinfo",r.hoverinfo),d(y,h,m,p),m("hovertemplate");var w,u=T(a.paper_bgcolor).getLuminance()<.333?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)";m("color",k.repeat(u,h.value.length)),m("customdata"),t(y,h,{name:"colorscales",handleItemDefaults:o}),b(n,a,c),c("orientation"),c("valueformat"),c("valuesuffix"),x.x.length&&x.y.length&&(w="freeform"),c("arrangement",w),k.coerceFont(c,"textfont",k.extendFlat({},a.font)),n._length=null}},29396:function($,R,e){"use strict";$.exports={attributes:e(39953),supplyDefaults:e(26857),calc:e(92930),plot:e(60436),moduleType:"trace",name:"sankey",basePlotModule:e(75536),selectPoints:e(84564),categories:["noOpacity"],meta:{}}},60436:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=A.numberFormat,T=e(3393),b=e(30211),d=e(7901),s=e(85247).cn,t=A._;function o(y){return""!==y}function r(y,h){return y.filter(function(m){return m.key===h.traceId})}function n(y,h){k.select(y).select("path").style("fill-opacity",h),k.select(y).select("rect").style("fill-opacity",h)}function i(y){k.select(y).select("text.name").style("fill","black")}function a(y){return function(h){return-1!==y.node.sourceLinks.indexOf(h.link)||-1!==y.node.targetLinks.indexOf(h.link)}}function c(y){return function(h){return-1!==h.node.sourceLinks.indexOf(y.link)||-1!==h.node.targetLinks.indexOf(y.link)}}function p(y,h,m){h&&m&&r(m,h).selectAll("."+s.sankeyLink).filter(a(h)).call(x.bind(0,h,m,!1))}function f(y,h,m){h&&m&&r(m,h).selectAll("."+s.sankeyLink).filter(a(h)).call(v.bind(0,h,m,!1))}function x(y,h,m,w){var u=w.datum().link.label;w.style("fill-opacity",function(S){if(!S.link.concentrationscale)return.4}),u&&r(h,y).selectAll("."+s.sankeyLink).filter(function(S){return S.link.label===u}).style("fill-opacity",function(S){if(!S.link.concentrationscale)return.4}),m&&r(h,y).selectAll("."+s.sankeyNode).filter(c(y)).call(p)}function v(y,h,m,w){var u=w.datum().link.label;w.style("fill-opacity",function(S){return S.tinyColorAlpha}),u&&r(h,y).selectAll("."+s.sankeyLink).filter(function(S){return S.link.label===u}).style("fill-opacity",function(S){return S.tinyColorAlpha}),m&&r(h,y).selectAll(s.sankeyNode).filter(c(y)).call(f)}function g(y,h){var w=A.nestedProperty(y.hoverlabel||{},h).get();return!Array.isArray(w)&&w}$.exports=function(y,h){for(var m=y._fullLayout,w=m._paper,u=m._size,S=0;S<y._fullData.length;S++)if(y._fullData[S].visible&&y._fullData[S].type===s.sankey&&!y._fullData[S]._viewInitial){var _=y._fullData[S].node;y._fullData[S]._viewInitial={node:{groups:_.groups.slice(),x:_.x.slice(),y:_.y.slice()}}}var E=t(y,"source:")+" ",L=t(y,"target:")+" ",C=t(y,"concentration:")+" ",P=t(y,"incoming flow count:")+" ",I=t(y,"outgoing flow count:")+" ";T(y,w,h,{width:u.w,height:u.h,margin:{t:u.t,r:u.r,b:u.b,l:u.l}},{linkEvents:{hover:function(U,z,H){!1!==y._fullLayout.hovermode&&(k.select(U).call(x.bind(0,z,H,!0)),"skip"!==z.link.trace.link.hoverinfo&&(z.link.fullData=z.link.trace,y.emit("plotly_hover",{event:k.event,points:[z.link]})))},follow:function(U,z){if(!1!==y._fullLayout.hovermode){var H=z.link.trace.link;if("none"!==H.hoverinfo&&"skip"!==H.hoverinfo){for(var F=[],N=0,B=0;B<z.flow.links.length;B++){var j=z.flow.links[B];if("closest"!==y._fullLayout.hovermode||z.link.pointNumber===j.pointNumber){z.link.pointNumber===j.pointNumber&&(N=B),j.fullData=j.trace,H=z.link.trace.link;var J=V(j),G={valueLabel:l(z.valueFormat)(j.value)+z.valueSuffix};F.push({x:J[0],y:J[1],name:G.valueLabel,text:[j.label||"",E+j.source.label,L+j.target.label,j.concentrationscale?C+l("%0.2f")(j.flow.labelConcentration):""].filter(o).join("<br>"),color:g(H,"bgcolor")||d.addOpacity(j.color,1),borderColor:g(H,"bordercolor"),fontFamily:g(H,"font.family"),fontSize:g(H,"font.size"),fontColor:g(H,"font.color"),nameLength:g(H,"namelength"),textAlign:g(H,"align"),idealAlign:k.event.x<J[0]?"right":"left",hovertemplate:H.hovertemplate,hovertemplateLabels:G,eventData:[j]})}}b.loneHover(F,{container:m._hoverlayer.node(),outerContainer:m._paper.node(),gd:y,anchorIndex:N}).each(function(){z.link.concentrationscale||n(this,.65),i(this)})}}function V(W){var X,K;W.circular?(X=(W.circularPathData.leftInnerExtent+W.circularPathData.rightInnerExtent)/2,K=W.circularPathData.verticalFullExtent):(X=(W.source.x1+W.target.x0)/2,K=(W.y0+W.y1)/2);var re=[X,K];return"v"===W.trace.orientation&&re.reverse(),re[0]+=z.parent.translateX,re[1]+=z.parent.translateY,re}},unhover:function(U,z,H){!1!==y._fullLayout.hovermode&&(k.select(U).call(v.bind(0,z,H,!0)),"skip"!==z.link.trace.link.hoverinfo&&(z.link.fullData=z.link.trace,y.emit("plotly_unhover",{event:k.event,points:[z.link]})),b.loneUnhover(m._hoverlayer.node()))},select:function(U,z){var H=z.link;H.originalEvent=k.event,y._hoverdata=[H],b.click(y,{target:!0})}},nodeEvents:{hover:function(U,z,H){!1!==y._fullLayout.hovermode&&(k.select(U).call(p,z,H),"skip"!==z.node.trace.node.hoverinfo&&(z.node.fullData=z.node.trace,y.emit("plotly_hover",{event:k.event,points:[z.node]})))},follow:function(U,z){if(!1!==y._fullLayout.hovermode){var H=z.node.trace.node;if("none"!==H.hoverinfo&&"skip"!==H.hoverinfo){var F=k.select(U).select("."+s.nodeRect),N=y._fullLayout._paperdiv.node().getBoundingClientRect(),B=F.node().getBoundingClientRect(),j=B.left-2-N.left,J=B.right+2-N.left,G=B.top+B.height/4-N.top,V={valueLabel:l(z.valueFormat)(z.node.value)+z.valueSuffix};z.node.fullData=z.node.trace,y._fullLayout._calcInverseTransform(y);var W=y._fullLayout._invScaleX,K=b.loneHover({x0:W*j,x1:W*J,y:y._fullLayout._invScaleY*G,name:l(z.valueFormat)(z.node.value)+z.valueSuffix,text:[z.node.label,P+z.node.targetLinks.length,I+z.node.sourceLinks.length].filter(o).join("<br>"),color:g(H,"bgcolor")||z.tinyColorHue,borderColor:g(H,"bordercolor"),fontFamily:g(H,"font.family"),fontSize:g(H,"font.size"),fontColor:g(H,"font.color"),nameLength:g(H,"namelength"),textAlign:g(H,"align"),idealAlign:"left",hovertemplate:H.hovertemplate,hovertemplateLabels:V,eventData:[z.node]},{container:m._hoverlayer.node(),outerContainer:m._paper.node(),gd:y});n(K,.85),i(K)}}},unhover:function(U,z,H){!1!==y._fullLayout.hovermode&&(k.select(U).call(f,z,H),"skip"!==z.node.trace.node.hoverinfo&&(z.node.fullData=z.node.trace,y.emit("plotly_unhover",{event:k.event,points:[z.node]})),b.loneUnhover(m._hoverlayer.node()))},select:function(U,z,H){var F=z.node;F.originalEvent=k.event,y._hoverdata=[F],k.select(U).call(f,z,H),b.click(y,{target:!0})}}})}},3393:function($,R,e){"use strict";var k=e(49887),A=e(29502).k4,l=e(39898),T=e(30838),b=e(86781),d=e(85247),s=e(84267),t=e(7901),o=e(91424),r=e(71828),n=r.strTranslate,i=r.strRotate,a=e(28984),c=a.keyFun,p=a.repeat,f=a.unwrap,x=e(63893),v=e(73972),g=e(18783),y=g.CAP_SHIFT,h=g.LINE_SPACING;function m(B,j,J){var G,V=f(j),W=V.trace,X=W.domain,K="h"===W.orientation,re=W.node.pad,ee=W.node.thickness,ie=B.width*(X.x[1]-X.x[0]),oe=B.height*(X.y[1]-X.y[0]),ce=V._nodes,me=V._links,de=V.circular;(G=de?b.sankeyCircular().circularLinkGap(0):T.sankey()).iterations(d.sankeyIterations).size(K?[ie,oe]:[oe,ie]).nodeWidth(ee).nodePadding(re).nodeId(function(ye){return ye.pointNumber}).nodes(ce).links(me);var he,ve,Pe,xe=G();for(var ke in G.nodePadding()<re&&r.warn("node.pad was reduced to ",G.nodePadding()," to fit within the figure."),V._groupLookup){var Ae,Te=parseInt(V._groupLookup[ke]);for(he=0;he<xe.nodes.length;he++)if(xe.nodes[he].pointNumber===Te){Ae=xe.nodes[he];break}if(Ae){var Q={pointNumber:parseInt(ke),x0:Ae.x0,x1:Ae.x1,y0:Ae.y0,y1:Ae.y1,partOfGroup:!0,sourceLinks:[],targetLinks:[]};xe.nodes.unshift(Q),Ae.childrenNodes.unshift(Q)}}if(function(){for(he=0;he<xe.nodes.length;he++){var ye,Me,Ie=xe.nodes[he],Ce={};for(ve=0;ve<Ie.targetLinks.length;ve++)ye=(Me=Ie.targetLinks[ve]).source.pointNumber+":"+Me.target.pointNumber,Ce.hasOwnProperty(ye)||(Ce[ye]=[]),Ce[ye].push(Me);var Re=Object.keys(Ce);for(ve=0;ve<Re.length;ve++){var le=Ce[ye=Re[ve]],ge=0,_e={};for(Pe=0;Pe<le.length;Pe++)_e[(Me=le[Pe]).label]||(_e[Me.label]=0),_e[Me.label]+=Me.value,ge+=Me.value;for(Pe=0;Pe<le.length;Pe++)(Me=le[Pe]).flow={value:ge,labelConcentration:_e[Me.label]/ge,concentration:Me.value/ge,links:le},Me.concentrationscale&&(Me.color=s(Me.concentrationscale(Me.flow.labelConcentration)))}var Fe=0;for(ve=0;ve<Ie.sourceLinks.length;ve++)Fe+=Ie.sourceLinks[ve].value;for(ve=0;ve<Ie.sourceLinks.length;ve++)(Me=Ie.sourceLinks[ve]).concentrationOut=Me.value/Fe;var Ve=0;for(ve=0;ve<Ie.targetLinks.length;ve++)Ve+=Ie.targetLinks[ve].value;for(ve=0;ve<Ie.targetLinks.length;ve++)(Me=Ie.targetLinks[ve]).concenrationIn=Me.value/Ve}}(),W.node.x.length&&W.node.y.length){for(he=0;he<Math.min(W.node.x.length,W.node.y.length,xe.nodes.length);he++)if(W.node.x[he]&&W.node.y[he]){var se=[W.node.x[he]*ie,W.node.y[he]*oe];xe.nodes[he].x0=se[0]-ee/2,xe.nodes[he].x1=se[0]+ee/2;var fe=xe.nodes[he].y1-xe.nodes[he].y0;xe.nodes[he].y0=se[1]-fe/2,xe.nodes[he].y1=se[1]+fe/2}"snap"===W.arrangement&&function(ye){var Me,Ie,Ce=ye.map(function(Fe,Ve){return{x0:Fe.x0,index:Ve}}).sort(function(Fe,Ve){return Fe.x0-Ve.x0}),Re=[],le=-1,ge=-1/0;for(he=0;he<Ce.length;he++){var _e=ye[Ce[he].index];_e.x0>ge+ee&&(le+=1,Me=_e.x0),ge=_e.x0,Re[le]||(Re[le]=[]),Re[le].push(_e),_e.x0+=Ie=Me-_e.x0,_e.x1+=Ie}return Re}(ce=xe.nodes).forEach(function(ye){var Me,Ie,Ce,Re=0,le=ye.length;for(ye.sort(function(ge,_e){return ge.y0-_e.y0}),Ce=0;Ce<le;++Ce)(Me=ye[Ce]).y0>=Re||(Ie=Re-Me.y0)>1e-6&&(Me.y0+=Ie,Me.y1+=Ie),Re=Me.y1+re}),G.update(xe)}return{circular:de,key:J,trace:W,guid:r.randstr(),horizontal:K,width:ie,height:oe,nodePad:W.node.pad,nodeLineColor:W.node.line.color,nodeLineWidth:W.node.line.width,linkLineColor:W.link.line.color,linkLineWidth:W.link.line.width,linkArrowLength:W.link.arrowlen,valueFormat:W.valueformat,valueSuffix:W.valuesuffix,textFont:W.textfont,translateX:X.x[0]*B.width+B.margin.l,translateY:B.height-X.y[1]*B.height+B.margin.t,dragParallel:K?oe:ie,dragPerpendicular:K?ie:oe,arrangement:W.arrangement,sankey:G,graph:xe,forceLayouts:{},interactionState:{dragInProgress:!1,hovered:!1}}}function w(B,j,J){var G=s(j.color),V=j.source.label+"|"+j.target.label+"__"+J;return j.trace=B.trace,j.curveNumber=B.trace.index,{circular:B.circular,key:V,traceId:B.key,pointNumber:j.pointNumber,link:j,tinyColorHue:t.tinyRGB(G),tinyColorAlpha:G.getAlpha(),linkPath:u,linkLineColor:B.linkLineColor,linkLineWidth:B.linkLineWidth,linkArrowLength:B.linkArrowLength,valueFormat:B.valueFormat,valueSuffix:B.valueSuffix,sankey:B.sankey,parent:B,interactionState:B.interactionState,flow:j.flow}}function u(){return function(B){var ve,Pe,xe,ke,j=B.linkArrowLength;if(B.link.circular)return Pe=j,xe=(ve=B.link).width/2,ke=ve.circularPathData,"top"===ve.circularLinkType?"M "+(ke.targetX-Pe)+" "+(ke.targetY+xe)+" L"+(ke.rightInnerExtent-Pe)+" "+(ke.targetY+xe)+"A"+(ke.rightLargeArcRadius+xe)+" "+(ke.rightSmallArcRadius+xe)+" 0 0 1 "+(ke.rightFullExtent-xe-Pe)+" "+(ke.targetY-ke.rightSmallArcRadius)+"L"+(ke.rightFullExtent-xe-Pe)+" "+ke.verticalRightInnerExtent+"A"+(ke.rightLargeArcRadius+xe)+" "+(ke.rightLargeArcRadius+xe)+" 0 0 1 "+(ke.rightInnerExtent-Pe)+" "+(ke.verticalFullExtent-xe)+"L"+ke.leftInnerExtent+" "+(ke.verticalFullExtent-xe)+"A"+(ke.leftLargeArcRadius+xe)+" "+(ke.leftLargeArcRadius+xe)+" 0 0 1 "+(ke.leftFullExtent+xe)+" "+ke.verticalLeftInnerExtent+"L"+(ke.leftFullExtent+xe)+" "+(ke.sourceY-ke.leftSmallArcRadius)+"A"+(ke.leftLargeArcRadius+xe)+" "+(ke.leftSmallArcRadius+xe)+" 0 0 1 "+ke.leftInnerExtent+" "+(ke.sourceY+xe)+"L"+ke.sourceX+" "+(ke.sourceY+xe)+"L"+ke.sourceX+" "+(ke.sourceY-xe)+"L"+ke.leftInnerExtent+" "+(ke.sourceY-xe)+"A"+(ke.leftLargeArcRadius-xe)+" "+(ke.leftSmallArcRadius-xe)+" 0 0 0 "+(ke.leftFullExtent-xe)+" "+(ke.sourceY-ke.leftSmallArcRadius)+"L"+(ke.leftFullExtent-xe)+" "+ke.verticalLeftInnerExtent+"A"+(ke.leftLargeArcRadius-xe)+" "+(ke.leftLargeArcRadius-xe)+" 0 0 0 "+ke.leftInnerExtent+" "+(ke.verticalFullExtent+xe)+"L"+(ke.rightInnerExtent-Pe)+" "+(ke.verticalFullExtent+xe)+"A"+(ke.rightLargeArcRadius-xe)+" "+(ke.rightLargeArcRadius-xe)+" 0 0 0 "+(ke.rightFullExtent+xe-Pe)+" "+ke.verticalRightInnerExtent+"L"+(ke.rightFullExtent+xe-Pe)+" "+(ke.targetY-ke.rightSmallArcRadius)+"A"+(ke.rightLargeArcRadius-xe)+" "+(ke.rightSmallArcRadius-xe)+" 0 0 0 "+(ke.rightInnerExtent-Pe)+" "+(ke.targetY-xe)+"L"+(ke.targetX-Pe)+" "+(ke.targetY-xe)+(Pe>0?"L"+ke.targetX+" "+ke.targetY:"")+"Z":"M "+(ke.targetX-Pe)+" "+(ke.targetY-xe)+" L"+(ke.rightInnerExtent-Pe)+" "+(ke.targetY-xe)+"A"+(ke.rightLargeArcRadius+xe)+" "+(ke.rightSmallArcRadius+xe)+" 0 0 0 "+(ke.rightFullExtent-xe-Pe)+" "+(ke.targetY+ke.rightSmallArcRadius)+"L"+(ke.rightFullExtent-xe-Pe)+" "+ke.verticalRightInnerExtent+"A"+(ke.rightLargeArcRadius+xe)+" "+(ke.rightLargeArcRadius+xe)+" 0 0 0 "+(ke.rightInnerExtent-Pe)+" "+(ke.verticalFullExtent+xe)+"L"+ke.leftInnerExtent+" "+(ke.verticalFullExtent+xe)+"A"+(ke.leftLargeArcRadius+xe)+" "+(ke.leftLargeArcRadius+xe)+" 0 0 0 "+(ke.leftFullExtent+xe)+" "+ke.verticalLeftInnerExtent+"L"+(ke.leftFullExtent+xe)+" "+(ke.sourceY+ke.leftSmallArcRadius)+"A"+(ke.leftLargeArcRadius+xe)+" "+(ke.leftSmallArcRadius+xe)+" 0 0 0 "+ke.leftInnerExtent+" "+(ke.sourceY-xe)+"L"+ke.sourceX+" "+(ke.sourceY-xe)+"L"+ke.sourceX+" "+(ke.sourceY+xe)+"L"+ke.leftInnerExtent+" "+(ke.sourceY+xe)+"A"+(ke.leftLargeArcRadius-xe)+" "+(ke.leftSmallArcRadius-xe)+" 0 0 1 "+(ke.leftFullExtent-xe)+" "+(ke.sourceY+ke.leftSmallArcRadius)+"L"+(ke.leftFullExtent-xe)+" "+ke.verticalLeftInnerExtent+"A"+(ke.leftLargeArcRadius-xe)+" "+(ke.leftLargeArcRadius-xe)+" 0 0 1 "+ke.leftInnerExtent+" "+(ke.verticalFullExtent-xe)+"L"+(ke.rightInnerExtent-Pe)+" "+(ke.verticalFullExtent-xe)+"A"+(ke.rightLargeArcRadius-xe)+" "+(ke.rightLargeArcRadius-xe)+" 0 0 1 "+(ke.rightFullExtent+xe-Pe)+" "+ke.verticalRightInnerExtent+"L"+(ke.rightFullExtent+xe-Pe)+" "+(ke.targetY+ke.rightSmallArcRadius)+"A"+(ke.rightLargeArcRadius-xe)+" "+(ke.rightSmallArcRadius-xe)+" 0 0 1 "+(ke.rightInnerExtent-Pe)+" "+(ke.targetY+xe)+"L"+(ke.targetX-Pe)+" "+(ke.targetY+xe)+(Pe>0?"L"+ke.targetX+" "+ke.targetY:"")+"Z";var J=Math.abs((B.link.target.x0-B.link.source.x1)/2);j>J&&(j=J);var G=B.link.source.x1,V=B.link.target.x0-j,W=A(G,V),X=W(.5),K=W(.5),re=B.link.y0-B.link.width/2,ee=B.link.y0+B.link.width/2,ie=B.link.y1-B.link.width/2,oe=B.link.y1+B.link.width/2,he=j>0?"L"+(V+j)+","+(ie+B.link.width/2):"";return"M"+G+","+re+"C"+X+","+re+" "+K+","+ie+" "+V+","+ie+(he+="L"+V+","+oe)+"C"+K+","+oe+" "+X+","+ee+" "+G+","+ee+"Z"}}function S(B,j){var J=s(j.color),G=d.nodePadAcross,V=B.nodePad/2;j.dx=j.x1-j.x0,j.dy=j.y1-j.y0;var W=j.dx,X=Math.max(.5,j.dy),K="node_"+j.pointNumber;return j.group&&(K=r.randstr()),j.trace=B.trace,j.curveNumber=B.trace.index,{index:j.pointNumber,key:K,partOfGroup:j.partOfGroup||!1,group:j.group,traceId:B.key,trace:B.trace,node:j,nodePad:B.nodePad,nodeLineColor:B.nodeLineColor,nodeLineWidth:B.nodeLineWidth,textFont:B.textFont,size:B.horizontal?B.height:B.width,visibleWidth:Math.ceil(W),visibleHeight:X,zoneX:-G,zoneY:-V,zoneWidth:W+2*G,zoneHeight:X+2*V,labelY:B.horizontal?j.dy/2+1:j.dx/2+1,left:1===j.originalLayer,sizeAcross:B.width,forceLayouts:B.forceLayouts,horizontal:B.horizontal,darkBackground:J.getBrightness()<=128,tinyColorHue:t.tinyRGB(J),tinyColorAlpha:J.getAlpha(),valueFormat:B.valueFormat,valueSuffix:B.valueSuffix,sankey:B.sankey,graph:B.graph,arrangement:B.arrangement,uniqueNodeLabelPathId:[B.guid,B.key,K].join("_"),interactionState:B.interactionState,figure:B}}function _(B){B.attr("transform",function(j){return n(j.node.x0.toFixed(3),j.node.y0.toFixed(3))})}function E(B){B.call(_)}function L(B,j){B.call(E),j.attr("d",u())}function C(B){B.attr("width",function(j){return j.node.x1-j.node.x0}).attr("height",function(j){return j.visibleHeight})}function P(B){return B.link.width>1||B.linkLineWidth>0}function I(B){return n(B.translateX,B.translateY)+(B.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function U(B,j,J){B.on(".basic",null).on("mouseover.basic",function(G){G.interactionState.dragInProgress||G.partOfGroup||(J.hover(this,G,j),G.interactionState.hovered=[this,G])}).on("mousemove.basic",function(G){G.interactionState.dragInProgress||G.partOfGroup||(J.follow(this,G),G.interactionState.hovered=[this,G])}).on("mouseout.basic",function(G){G.interactionState.dragInProgress||G.partOfGroup||(J.unhover(this,G,j),G.interactionState.hovered=!1)}).on("click.basic",function(G){G.interactionState.hovered&&(J.unhover(this,G,j),G.interactionState.hovered=!1),G.interactionState.dragInProgress||G.partOfGroup||J.select(this,G,j)})}function z(B,j,J,G){var V=l.behavior.drag().origin(function(W){return{x:W.node.x0+W.visibleWidth/2,y:W.node.y0+W.visibleHeight/2}}).on("dragstart",function(W){if("fixed"!==W.arrangement&&(r.ensureSingle(G._fullLayout._infolayer,"g","dragcover",function(K){G._fullLayout._dragCover=K}),r.raiseToTop(this),W.interactionState.dragInProgress=W.node,F(W.node),W.interactionState.hovered&&(J.nodeEvents.unhover.apply(0,W.interactionState.hovered),W.interactionState.hovered=!1),"snap"===W.arrangement)){var X=W.traceId+"|"+W.key;W.forceLayouts[X]?W.forceLayouts[X].alpha(1):function(K,re,ee,ie){!function(ce){for(var me=0;me<ce.length;me++)ce[me].y=(ce[me].y0+ce[me].y1)/2,ce[me].x=(ce[me].x0+ce[me].x1)/2}(ee.graph.nodes);var me,de,he,oe=ee.graph.nodes.filter(function(ce){return ce.originalX===ee.node.originalX}).filter(function(ce){return!ce.partOfGroup});ee.forceLayouts[re]=k.forceSimulation(oe).alphaDecay(0).force("collide",k.forceCollide().radius(function(ce){return ce.dy/2+ee.nodePad/2}).strength(1).iterations(d.forceIterations)).force("constrain",(me=re,de=oe,he=ee,function(){for(var ve=0,Pe=0;Pe<de.length;Pe++){var xe=de[Pe];xe===he.interactionState.dragInProgress?(xe.x=xe.lastDraggedX,xe.y=xe.lastDraggedY):(xe.vx=(xe.originalX-xe.x)/d.forceTicksPerFrame,xe.y=Math.min(he.size-xe.dy/2,Math.max(xe.dy/2,xe.y))),ve=Math.max(ve,Math.abs(xe.vx),Math.abs(xe.vy))}!he.interactionState.dragInProgress&&ve<.1&&he.forceLayouts[me].alpha()>0&&he.forceLayouts[me].alpha(0)})).stop()}(0,X,W),K=B,re=j,ee=W,ie=X,oe=G,window.requestAnimationFrame(function ce(){var me;for(me=0;me<d.forceTicksPerFrame;me++)ee.forceLayouts[ie].tick();if(function(he){for(var ve=0;ve<he.length;ve++)he[ve].y0=he[ve].y-he[ve].dy/2,he[ve].y1=he[ve].y0+he[ve].dy,he[ve].x0=he[ve].x-he[ve].dx/2,he[ve].x1=he[ve].x0+he[ve].dx}(ee.graph.nodes),ee.sankey.update(ee.graph),L(K.filter(N(ee)),re),ee.forceLayouts[ie].alpha()>0)window.requestAnimationFrame(ce);else{var de=ee.node.originalX;ee.node.x0=de-ee.visibleWidth/2,ee.node.x1=de+ee.visibleWidth/2,H(ee,oe)}})}var K,re,ee,ie,oe}).on("drag",function(W){if("fixed"!==W.arrangement){var X=l.event.x,K=l.event.y;"snap"===W.arrangement?(W.node.x0=X-W.visibleWidth/2,W.node.x1=X+W.visibleWidth/2,W.node.y0=K-W.visibleHeight/2,W.node.y1=K+W.visibleHeight/2):("freeform"===W.arrangement&&(W.node.x0=X-W.visibleWidth/2,W.node.x1=X+W.visibleWidth/2),K=Math.max(0,Math.min(W.size-W.visibleHeight/2,K)),W.node.y0=K-W.visibleHeight/2,W.node.y1=K+W.visibleHeight/2),F(W.node),"snap"!==W.arrangement&&(W.sankey.update(W.graph),L(B.filter(N(W)),j))}}).on("dragend",function(W){if("fixed"!==W.arrangement){W.interactionState.dragInProgress=!1;for(var X=0;X<W.node.childrenNodes.length;X++)W.node.childrenNodes[X].x=W.node.x,W.node.childrenNodes[X].y=W.node.y;"snap"!==W.arrangement&&H(W,G)}});B.on(".drag",null).call(V)}function H(B,j){for(var J=[],G=[],V=0;V<B.graph.nodes.length;V++){var X=(B.graph.nodes[V].y0+B.graph.nodes[V].y1)/2;J.push((B.graph.nodes[V].x0+B.graph.nodes[V].x1)/2/B.figure.width),G.push(X/B.figure.height)}v.call("_guiRestyle",j,{"node.x":[J],"node.y":[G]},B.trace.index).then(function(){j._fullLayout._dragCover&&j._fullLayout._dragCover.remove()})}function F(B){B.lastDraggedX=B.x0+B.dx/2,B.lastDraggedY=B.y0+B.dy/2}function N(B){return function(j){return j.node.originalX===B.node.originalX}}$.exports=function(B,j,J,G,V){var W=B._context.staticPlot,X=!1;r.ensureSingle(B._fullLayout._infolayer,"g","first-render",function(){X=!0});var K=B._fullLayout._dragCover,re=J.filter(function(ve){return f(ve).trace.visible}).map(m.bind(null,G)),ee=j.selectAll("."+d.cn.sankey).data(re,c);ee.exit().remove(),ee.enter().append("g").classed(d.cn.sankey,!0).style("box-sizing","content-box").style("position","absolute").style("left",0).style("shape-rendering","geometricPrecision").style("pointer-events",W?"none":"auto").attr("transform",I),ee.each(function(ve,Pe){B._fullData[Pe]._sankey=ve;var xe="bgsankey-"+ve.trace.uid+"-"+Pe;r.ensureSingle(B._fullLayout._draggers,"rect",xe),B._fullData[Pe]._bgRect=l.select("."+xe),B._fullData[Pe]._bgRect.style("pointer-events",W?"none":"all").attr("width",ve.width).attr("height",ve.height).attr("x",ve.translateX).attr("y",ve.translateY).classed("bgsankey",!0).style({fill:"transparent","stroke-width":0})}),ee.transition().ease(d.ease).duration(d.duration).attr("transform",I);var ie=ee.selectAll("."+d.cn.sankeyLinks).data(p,c);ie.enter().append("g").classed(d.cn.sankeyLinks,!0).style("fill","none");var oe=ie.selectAll("."+d.cn.sankeyLink).data(function(ve){return ve.graph.links.filter(function(Pe){return Pe.value}).map(w.bind(null,ve))},c);oe.enter().append("path").classed(d.cn.sankeyLink,!0).call(U,ee,V.linkEvents),oe.style("stroke",function(ve){return P(ve)?t.tinyRGB(s(ve.linkLineColor)):ve.tinyColorHue}).style("stroke-opacity",function(ve){return P(ve)?t.opacity(ve.linkLineColor):ve.tinyColorAlpha}).style("fill",function(ve){return ve.tinyColorHue}).style("fill-opacity",function(ve){return ve.tinyColorAlpha}).style("stroke-width",function(ve){return P(ve)?ve.linkLineWidth:1}).attr("d",u()),oe.style("opacity",function(){return B._context.staticPlot||X||K?1:0}).transition().ease(d.ease).duration(d.duration).style("opacity",1),oe.exit().transition().ease(d.ease).duration(d.duration).style("opacity",0).remove();var ce=ee.selectAll("."+d.cn.sankeyNodeSet).data(p,c);ce.enter().append("g").classed(d.cn.sankeyNodeSet,!0),ce.style("cursor",function(ve){switch(ve.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var me=ce.selectAll("."+d.cn.sankeyNode).data(function(ve){var Pe=ve.graph.nodes;return function(xe){var ke,Ae=[];for(ke=0;ke<xe.length;ke++)xe[ke].originalX=(xe[ke].x0+xe[ke].x1)/2,xe[ke].originalY=(xe[ke].y0+xe[ke].y1)/2,-1===Ae.indexOf(xe[ke].originalX)&&Ae.push(xe[ke].originalX);for(Ae.sort(function(Te,Q){return Te-Q}),ke=0;ke<xe.length;ke++)xe[ke].originalLayerIndex=Ae.indexOf(xe[ke].originalX),xe[ke].originalLayer=xe[ke].originalLayerIndex/(Ae.length-1)}(Pe),Pe.map(S.bind(null,ve))},c);me.enter().append("g").classed(d.cn.sankeyNode,!0).call(_).style("opacity",function(ve){return!B._context.staticPlot&&!X||ve.partOfGroup?0:1}),me.call(U,ee,V.nodeEvents).call(z,oe,V,B),me.transition().ease(d.ease).duration(d.duration).call(_).style("opacity",function(ve){return ve.partOfGroup?0:1}),me.exit().transition().ease(d.ease).duration(d.duration).style("opacity",0).remove();var de=me.selectAll("."+d.cn.nodeRect).data(p);de.enter().append("rect").classed(d.cn.nodeRect,!0).call(C),de.style("stroke-width",function(ve){return ve.nodeLineWidth}).style("stroke",function(ve){return t.tinyRGB(s(ve.nodeLineColor))}).style("stroke-opacity",function(ve){return t.opacity(ve.nodeLineColor)}).style("fill",function(ve){return ve.tinyColorHue}).style("fill-opacity",function(ve){return ve.tinyColorAlpha}),de.transition().ease(d.ease).duration(d.duration).call(C);var he=me.selectAll("."+d.cn.nodeLabel).data(p);he.enter().append("text").classed(d.cn.nodeLabel,!0).style("cursor","default"),he.attr("data-notex",1).text(function(ve){return ve.node.label}).each(function(ve){var Pe=l.select(this);o.font(Pe,ve.textFont),x.convertToTspans(Pe,B)}).style("text-shadow",x.makeTextShadow(B._fullLayout.paper_bgcolor)).attr("text-anchor",function(ve){return ve.horizontal&&ve.left?"end":"start"}).attr("transform",function(ve){var Pe=l.select(this),xe=x.lineCount(Pe),Ae=ve.nodeLineWidth/2+3,Te=((ve.horizontal?ve.visibleHeight:ve.visibleWidth)-ve.textFont.size*((xe-1)*h-y))/2;ve.horizontal&&(ve.left?Ae=-Ae:Ae+=ve.visibleWidth);var Q=ve.horizontal?"":"scale(-1,1)"+i(90);return n(ve.horizontal?Ae:Te,ve.horizontal?Te:Ae)+Q}),he.transition().ease(d.ease).duration(d.duration)}},84564:function($){"use strict";$.exports=function(R,e){for(var k=[],A=R.cd[0].trace,l=A._sankey.graph.nodes,T=0;T<l.length;T++){var b=l[T];if(!b.partOfGroup){var d=[(b.x0+b.x1)/2,(b.y0+b.y1)/2];"v"===A.orientation&&d.reverse(),e&&e.contains(d,!1,T,R)&&k.push({pointNumber:b.pointNumber})}}return k}},75225:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l){for(var T=0;T<A.length;T++)A[T].i=T;k.mergeArray(l.text,A,"tx"),k.mergeArray(l.texttemplate,A,"txt"),k.mergeArray(l.hovertext,A,"htx"),k.mergeArray(l.customdata,A,"data"),k.mergeArray(l.textposition,A,"tp"),l.textfont&&(k.mergeArrayCastPositive(l.textfont.size,A,"ts"),k.mergeArray(l.textfont.color,A,"tc"),k.mergeArray(l.textfont.family,A,"tf"));var b=l.marker;if(b){k.mergeArrayCastPositive(b.size,A,"ms"),k.mergeArrayCastPositive(b.opacity,A,"mo"),k.mergeArray(b.symbol,A,"mx"),k.mergeArray(b.angle,A,"ma"),k.mergeArray(b.standoff,A,"mf"),k.mergeArray(b.color,A,"mc");var d=b.line;b.line&&(k.mergeArray(d.color,A,"mlc"),k.mergeArrayCastPositive(d.width,A,"mlw"));var s=b.gradient;s&&"none"!==s.type&&(k.mergeArray(s.type,A,"mgt"),k.mergeArray(s.color,A,"mgc"))}}},82196:function($,R,e){"use strict";var k=e(12663).axisHoverFormat,A=e(5386).s,l=e(5386).f,T=e(50693),b=e(41940),d=e(79952).P,s=e(79952).u,t=e(91424),o=e(47581),r=e(1426).extendFlat;$.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:k("x"),yhoverformat:k("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:A({},{}),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:l({},{keys:o.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:r({},d,{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:{valType:"color",editType:"style",anim:!0},fillpattern:s,marker:r({symbol:{valType:"enumerated",values:t.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:r({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},editType:"calc"},T("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"},T("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:b({editType:"calc",colorEditType:"style",arrayOk:!0})}},47761:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(89298),T=e(42973),b=e(50606).BADNUM,d=e(34098),s=e(36922),t=e(75225),o=e(66279);function r(p,f,x,v,g,y,h){var m=f._length,w=p._fullLayout,u=x._id,S=v._id,_=w._firstScatter[a(f)]===f.uid,E=(c(f,w,x,v)||{}).orientation,L=f.fill;x._minDtick=0,v._minDtick=0;var C={padded:!0},P={padded:!0};h&&(C.ppad=P.ppad=h);var I=m<2||g[0]!==g[m-1]||y[0]!==y[m-1];I&&("tozerox"===L||"tonextx"===L&&(_||"h"===E))?C.tozero=!0:(f.error_y||{}).visible||"tonexty"!==L&&"tozeroy"!==L&&(d.hasMarkers(f)||d.hasText(f))||(C.padded=!1,C.ppad=0),I&&("tozeroy"===L||"tonexty"===L&&(_||"v"===E))?P.tozero=!0:"tonextx"!==L&&"tozerox"!==L||(P.padded=!1),u&&(f._extremes[u]=l.findExtremes(x,g,C)),S&&(f._extremes[S]=l.findExtremes(v,y,P))}function n(p,f){if(d.hasMarkers(p)){var x,v=p.marker,g=1.6*(p.marker.sizeref||1);if(x="area"===p.marker.sizemode?function(u){return Math.max(Math.sqrt((u||0)/g),3)}:function(u){return Math.max((u||0)/g,3)},A.isArrayOrTypedArray(v.size)){var y={type:"linear"};l.setConvert(y);for(var h=y.makeCalcdata(p.marker,"size"),m=new Array(f),w=0;w<f;w++)m[w]=x(h[w]);return m}return x(v.size)}}function i(p,f){var x=a(f),v=p._firstScatter;v[x]||(v[x]=f.uid)}function a(p){var f=p.stackgroup;return p.xaxis+p.yaxis+p.type+(f?"-"+f:"")}function c(p,f,x,v){var g=p.stackgroup;if(g){var y=f._scatterStackOpts[x._id+v._id][g],h="v"===y.orientation?v:x;return"linear"===h.type||"log"===h.type?y:void 0}}$.exports={calc:function(p,f){var x,v,g,y,h,m,w=p._fullLayout,u=f._xA=l.getFromId(p,f.xaxis||"x","x"),S=f._yA=l.getFromId(p,f.yaxis||"y","y"),_=u.makeCalcdata(f,"x"),E=S.makeCalcdata(f,"y"),L=T(f,u,"x",_),C=T(f,S,"y",E),P=L.vals,I=C.vals,U=f._length,z=new Array(U),H=f.ids,F=c(f,w,u,S),N=!1;i(w,f);var B,j="x",J="y";F?(A.pushUnique(F.traceIndices,f._expandedIndex),(x="v"===F.orientation)?(J="s",B="x"):(j="s",B="y"),h="interpolate"===F.stackgaps):r(p,f,u,S,P,I,n(f,U));var G=!!f.xperiodalignment,V=!!f.yperiodalignment;for(v=0;v<U;v++){var W=z[v]={},X=k(P[v]),K=k(I[v]);X&&K?(W[j]=P[v],W[J]=I[v],G&&(W.orig_x=_[v],W.xEnd=L.ends[v],W.xStart=L.starts[v]),V&&(W.orig_y=E[v],W.yEnd=C.ends[v],W.yStart=C.starts[v])):F&&(x?X:K)?(W[B]=x?P[v]:I[v],W.gap=!0,h?(W.s=b,N=!0):W.s=0):W[j]=W[J]=b,H&&(W.id=String(H[v]))}if(t(z,f),s(p,f),o(z,f),F){for(v=0;v<z.length;)z[v][B]===b?z.splice(v,1):v++;if(A.sort(z,function(oe,ce){return oe[B]-ce[B]||oe.i-ce.i}),N){for(v=0;v<z.length-1&&z[v].gap;)v++;for((m=z[v].s)||(m=z[v].s=0),g=0;g<v;g++)z[g].s=m;for(y=z.length-1;y>v&&z[y].gap;)y--;for(m=z[y].s,g=z.length-1;g>y;g--)z[g].s=m;for(;v<y;)if(z[++v].gap){for(g=v+1;z[g].gap;)g++;for(var re=z[v-1][B],ee=z[v-1].s,ie=(z[g].s-ee)/(z[g][B]-re);v<g;)z[v].s=ee+(z[v][B]-re)*ie,v++}}}return z},calcMarkerSize:n,calcAxisExpansion:r,setFirstScatter:i,getStackOpts:c}},66279:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l){k.isArrayOrTypedArray(l.selectedpoints)&&k.tagSelected(A,l)}},36922:function($,R,e){"use strict";var k=e(52075).hasColorscale,A=e(78803),l=e(34098);$.exports=function(T,b){l.hasLines(b)&&k(b,"line")&&A(T,b,{vals:b.line.color,containerStr:"line",cLetter:"c"}),l.hasMarkers(b)&&(k(b,"marker")&&A(T,b,{vals:b.marker.color,containerStr:"marker",cLetter:"c"}),k(b,"marker.line")&&A(T,b,{vals:b.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}},47581:function($){"use strict";$.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}},72626:function($,R,e){"use strict";var k=e(47761),A=e(11661).setGroupPositions;function l(T,b,d,s,t,o,r){t[s]=!0;var a,c,f,x,v,n={i:null,gap:!0,s:0};if(n[r]=d,T.splice(b,0,n),b&&d===T[b-1][r]){var i=T[b-1];n.s=i.s,n.i=i.i,n.gap=i.gap}else o&&(n.s=(f=r,x=(a=T)[(c=b)-1],(v=a[c+1])?x?x.s+(v.s-x.s)*(d-x[f])/(v[f]-x[f]):v.s:x.s));b||(T[0].t=T[1].t,T[0].trace=T[1].trace,delete T[1].t,delete T[1].trace)}$.exports=function(T,b){"group"===T._fullLayout.scattermode&&function(B,j){for(var J=j.xaxis,G=j.yaxis,V=B._fullLayout,W=B._fullData,X=B.calcdata,K=[],re=[],ee=0;ee<W.length;ee++){var ie=W[ee];!0===ie.visible&&"scatter"===ie.type&&ie.xaxis===J._id&&ie.yaxis===G._id&&("h"===ie.orientation?K.push(X[ee]):"v"===ie.orientation&&re.push(X[ee]))}var oe={mode:V.scattermode,gap:V.scattergap};A(B,J,G,re,oe),A(B,G,J,K,oe)}(T,b);var d=b.xaxis,s=b.yaxis,o=T._fullLayout._scatterStackOpts[d._id+s._id];if(o){var r,n,i,a,c,p,f,x,v,g,y,h,m,w,u,S=T.calcdata;for(var _ in o){var E=(g=o[_]).traceIndices;if(E.length){for(y="interpolate"===g.stackgaps,h=g.groupnorm,"v"===g.orientation?(m="x",w="y"):(m="y",w="x"),u=new Array(E.length),r=0;r<u.length;r++)u[r]=!1;p=S[E[0]];var L=new Array(p.length);for(r=0;r<p.length;r++)L[r]=p[r][m];for(r=1;r<E.length;r++){for(c=S[E[r]],n=i=0;n<c.length;n++){for(f=c[n][m];f>L[i]&&i<L.length;i++)l(c,n,L[i],r,u,y,m),n++;if(f!==L[i]){for(a=0;a<r;a++)l(S[E[a]],i,f,a,u,y,m);L.splice(i,0,f)}i++}for(;i<L.length;i++)l(c,n,L[i],r,u,y,m),n++}var C=L.length;for(n=0;n<p.length;n++){for(x=p[n][w]=p[n].s,r=1;r<E.length;r++)(c=S[E[r]])[0].trace._rawLength=c[0].trace._length,c[0].trace._length=C,c[n][w]=x+=c[n].s;if(h)for(v=("fraction"===h?x:x/100)||1,r=0;r<E.length;r++){var P=S[E[r]][n];P[w]/=v,P.sNorm=P.s/v}}for(r=0;r<E.length;r++){var I=(c=S[E[r]])[0].trace,U=k.calcMarkerSize(I,I._rawLength),z=Array.isArray(U);if(U&&u[r]||z){var H=U;for(U=new Array(C),n=0;n<C;n++)U[n]=c[n].gap?0:z?H[c[n].i]:H}var F=new Array(C),N=new Array(C);for(n=0;n<C;n++)F[n]=c[n].x,N[n]=c[n].y;k.calcAxisExpansion(T,I,d,s,F,N,U),c[0].t.orientation=g.orientation}}}}}},34936:function($,R,e){"use strict";var k=e(71828),A=e(26125),l=e(82196);$.exports=function(T,b){var s,t;function o(c){return k.coerce(s._input,s,l,c)}if("group"===b.scattermode)for(t=0;t<T.length;t++)"scatter"===(s=T[t]).type&&A(s._input,s,b,o);for(t=0;t<T.length;t++){var r=T[t];if("scatter"===r.type){var n=r.fill;if("none"!==n&&"toself"!==n&&(r.opacity=void 0,"tonexty"===n||"tonextx"===n))for(var i=t-1;i>=0;i--){var a=T[i];if("scatter"===a.type&&a.xaxis===r.xaxis&&a.yaxis===r.yaxis){a.opacity=void 0;break}}}}}},17438:function($,R,e){"use strict";var k=e(71828),A=e(73972),l=e(82196),T=e(47581),b=e(34098),d=e(67513),s=e(73927),t=e(565),o=e(49508),r=e(11058),n=e(94039),i=e(82410),a=e(28908),c=e(71828).coercePattern;$.exports=function(p,f,x,v){function g(E,L){return k.coerce(p,f,l,E,L)}var y=d(p,f,v,g);if(y||(f.visible=!1),f.visible){s(p,f,v,g),g("xhoverformat"),g("yhoverformat");var h=t(p,f,v,g);"group"===v.scattermode&&void 0===f.orientation&&g("orientation","v");var m=!h&&y<T.PTS_LINESONLY?"lines+markers":"lines";g("text"),g("hovertext"),g("mode",m),b.hasLines(f)&&(r(p,f,x,v,g,{backoff:!0}),n(p,f,g),g("connectgaps"),g("line.simplify")),b.hasMarkers(f)&&o(p,f,x,v,g,{gradient:!0}),b.hasText(f)&&(g("texttemplate"),i(p,f,v,g));var w=[];(b.hasMarkers(f)||b.hasText(f))&&(g("cliponaxis"),g("marker.maxdisplayed"),w.push("points")),g("fill",h?h.fillDflt:"none"),"none"!==f.fill&&(a(p,f,x,g),b.hasLines(f)||n(p,f,g),c(g,"fillpattern",f.fillcolor,!1));var u=(f.line||{}).color,S=(f.marker||{}).color;"tonext"!==f.fill&&"toself"!==f.fill||w.push("fills"),g("hoveron",w.join("+")||"points"),"fills"!==f.hoveron&&g("hovertemplate");var _=A.getComponentMethod("errorbars","supplyDefaults");_(p,f,u||S||x,{axis:"y"}),_(p,f,u||S||x,{axis:"x",inherit:"y"}),k.coerceSelectionMarkerOpacity(f,g)}}},28908:function($,R,e){"use strict";var k=e(7901),A=e(71828).isArrayOrTypedArray;$.exports=function(l,T,b,d){var s=!1;if(T.marker){var t=T.marker.color,o=(T.marker.line||{}).color;t&&!A(t)?s=t:o&&!A(o)&&(s=o)}d("fillcolor",k.addOpacity((T.line||{}).color||s||b,.5))}},8225:function($,R,e){"use strict";var k=e(89298);$.exports=function(A,l,T){var b={},d={_fullLayout:T},s=k.getFromTrace(d,l,"x"),t=k.getFromTrace(d,l,"y"),o=A.orig_x;void 0===o&&(o=A.x);var r=A.orig_y;return void 0===r&&(r=A.y),b.xLabel=k.tickText(s,s.c2l(o),!0).text,b.yLabel=k.tickText(t,t.c2l(r),!0).text,b}},34603:function($,R,e){"use strict";var k=e(7901),A=e(34098);$.exports=function(l,T){var b,d;if("lines"===l.mode)return(b=l.line.color)&&k.opacity(b)?b:l.fillcolor;if("none"===l.mode)return l.fill?l.fillcolor:"";var s=T.mcc||(l.marker||{}).color,t=T.mlcc||((l.marker||{}).line||{}).color;return(d=s&&k.opacity(s)?s:t&&k.opacity(t)&&(T.mlw||((l.marker||{}).line||{}).width)?t:"")?k.opacity(d)<.3?k.addOpacity(d,.3):d:(b=(l.line||{}).color)&&k.opacity(b)&&A.hasLines(l)&&l.line.width?b:l.fillcolor}},26125:function($,R,e){"use strict";var k=e(99082).getAxisGroup;$.exports=function(A,l,T,b){var d=l.orientation,t=k(T,l[{v:"x",h:"y"}[d]+"axis"])+d,o=T._alignmentOpts||{},r=b("alignmentgroup"),n=o[t];n||(n=o[t]={});var i=n[r];i?i.traces.push(l):i=n[r]={traces:[l],alignmentIndex:Object.keys(n).length,offsetGroups:{}};var a=b("offsetgroup"),c=i.offsetGroups,p=c[a];a&&(p||(p=c[a]={offsetIndex:Object.keys(c).length}),l._offsetIndex=p.offsetIndex)}},33720:function($,R,e){"use strict";var k=e(71828),A=e(30211),l=e(73972),T=e(34603),b=e(7901),d=k.fillText;$.exports=function(s,t,o,r){var n=s.cd,i=n[0].trace,a=s.xa,c=s.ya,p=a.c2p(t),f=c.c2p(o),x=[p,f],v=i.hoveron||"",g=-1!==i.mode.indexOf("markers")?3:.5,y=!!i.xperiodalignment,h=!!i.yperiodalignment;if(-1!==v.indexOf("points")){var m=function(me){var de=Math.max(g,me.mrc||0),he=a.c2p(me.x)-p,ve=c.c2p(me.y)-f;return Math.max(Math.sqrt(he*he+ve*ve)-de,1-g/de)},w=A.getDistanceFunction(r,function(me){if(y){var de=a.c2p(me.xStart),he=a.c2p(me.xEnd);return p>=Math.min(de,he)&&p<=Math.max(de,he)?0:1/0}var ve=Math.max(3,me.mrc||0),Pe=1-1/ve,xe=Math.abs(a.c2p(me.x)-p);return xe<ve?Pe*xe/ve:xe-ve+Pe},function(me){if(h){var de=c.c2p(me.yStart),he=c.c2p(me.yEnd);return f>=Math.min(de,he)&&f<=Math.max(de,he)?0:1/0}var ve=Math.max(3,me.mrc||0),Pe=1-1/ve,xe=Math.abs(c.c2p(me.y)-f);return xe<ve?Pe*xe/ve:xe-ve+Pe},m);if(A.getClosest(n,w,s),!1!==s.index){var u=n[s.index],S=a.c2p(u.x,!0),_=c.c2p(u.y,!0),E=u.mrc||1;s.index=u.i;var L=n[0].t.orientation,C=L&&(u.sNorm||u.s),P="h"===L?C:void 0!==u.orig_x?u.orig_x:u.x,I="v"===L?C:void 0!==u.orig_y?u.orig_y:u.y;return k.extendFlat(s,{color:T(i,u),x0:S-E,x1:S+E,xLabelVal:P,y0:_-E,y1:_+E,yLabelVal:I,spikeDistance:m(u),hovertemplate:i.hovertemplate}),d(u,i,s),l.getComponentMethod("errorbars","hoverInfo")(u,i,s),[s]}}if(-1!==v.indexOf("fills")&&i._polygons){var U,z,H,F,N,B,J,G,V=i._polygons,W=[],X=!1,K=1/0,re=-1/0,ee=1/0,ie=-1/0;for(U=0;U<V.length;U++)(H=V[U]).contains(x)&&(X=!X,W.push(H),ee=Math.min(ee,H.ymin),ie=Math.max(ie,H.ymax));if(X){var oe=((ee=Math.max(ee,0))+(ie=Math.min(ie,c._length)))/2;for(U=0;U<W.length;U++)for(F=W[U].pts,z=1;z<F.length;z++)(J=F[z-1][1])>oe!=(G=F[z][1])>=oe&&(B=F[z-1][0],G-J&&(N=B+(F[z][0]-B)*(oe-J)/(G-J),K=Math.min(K,N),re=Math.max(re,N)));K=Math.max(K,0),re=Math.min(re,a._length);var ce=b.defaultLine;return b.opacity(i.fillcolor)?ce=i.fillcolor:b.opacity((i.line||{}).color)&&(ce=i.line.color),k.extendFlat(s,{distance:s.maxHoverDistance,x0:K,x1:re,y0:oe,y1:oe,color:ce,hovertemplate:!1}),delete s.index,s.text=i.text&&!Array.isArray(i.text)?String(i.text):i.name,[s]}}}},67368:function($,R,e){"use strict";var k=e(34098);$.exports={hasLines:k.hasLines,hasMarkers:k.hasMarkers,hasText:k.hasText,isBubble:k.isBubble,attributes:e(82196),layoutAttributes:e(21479),supplyDefaults:e(17438),crossTraceDefaults:e(34936),supplyLayoutDefaults:e(79334),calc:e(47761).calc,crossTraceCalc:e(72626),arraysToCalcdata:e(75225),plot:e(32663),colorbar:e(4898),formatLabels:e(8225),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(33720),selectPoints:e(98002),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e(93612),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},21479:function($){"use strict";$.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},79334:function($,R,e){"use strict";var k=e(71828),A=e(21479);$.exports=function(l,T){"group"===T.scattermode&&k.coerce(l,T,A,"scattergap","group"===T.barmode?T.bargap:.2)}},11058:function($,R,e){"use strict";var k=e(71828).isArrayOrTypedArray,A=e(52075).hasColorscale,l=e(1586);$.exports=function(T,b,d,s,t,o){o||(o={});var r=(T.marker||{}).color;t("line.color",d),A(T,"line")?l(T,b,s,t,{prefix:"line.",cLetter:"c"}):t("line.color",!k(r)&&r||d),t("line.width"),o.noDash||t("line.dash"),o.backoff&&t("line.backoff")}},34621:function($,R,e){"use strict";var k=e(91424),A=e(50606),l=A.BADNUM,T=A.LOG_CLIP,b=T+.5,d=T-.5,s=e(71828),t=s.segmentsIntersect,o=s.constrain,r=e(47581);$.exports=function(n,i){var a,c,p,f,x,v,g,y,h,m,w,u,S,_,E,L,C,P,I=i.trace||{},U=i.xaxis,z=i.yaxis,H="log"===U.type,F="log"===z.type,N=U._length,B=z._length,j=i.backoff,J=I.marker,G=i.connectGaps,V=i.baseTolerance,W=i.shape,X="linear"===W,K=I.fill&&"none"!==I.fill,re=[],ee=r.minTolerance,ie=n.length,oe=new Array(ie),ce=0;function me(Rt){var Ge=n[Rt];if(!Ge)return!1;var We=i.linearized?U.l2p(Ge.x):U.c2p(Ge.x),Be=i.linearized?z.l2p(Ge.y):z.c2p(Ge.y);if(We===l){if(H&&(We=U.c2p(Ge.x,!0)),We===l)return!1;F&&Be===l&&(We*=Math.abs(U._m*B*(U._m>0?b:d)/(z._m*N*(z._m>0?b:d)))),We*=1e3}if(Be===l){if(F&&(Be=z.c2p(Ge.y,!0)),Be===l)return!1;Be*=1e3}return[We,Be]}function de(Rt,Ge,We,Be){var Ye=We-Rt,rt=Be-Ge,Se=.5-Rt,ze=.5-Ge,Ke=Ye*Ye+rt*rt,st=Ye*Se+rt*ze;if(st>0&&st<Ke){var ct=Se*rt-ze*Ye;if(ct*ct<Ke)return!0}}function he(Rt,Ge){var We=Rt[0]/N,Be=Rt[1]/B,Ye=Math.max(0,-We,We-1,-Be,Be-1);return Ye&&void 0!==C&&de(We,Be,C,P)&&(Ye=0),Ye&&Ge&&de(We,Be,Ge[0]/N,Ge[1]/B)&&(Ye=0),(1+r.toleranceGrowth*Ye)*V}function ve(Rt,Ge){var We=Rt[0]-Ge[0],Be=Rt[1]-Ge[1];return Math.sqrt(We*We+Be*Be)}var Pe,xe,ke,Ae,Te,Q,se,fe=r.maxScreensAway,ye=-N*fe,Me=N*(1+fe),Ie=-B*fe,Ce=B*(1+fe),Re=[[ye,Ie,Me,Ie],[Me,Ie,Me,Ce],[Me,Ce,ye,Ce],[ye,Ce,ye,Ie]];function le(Rt){if(Rt[0]<ye||Rt[0]>Me||Rt[1]<Ie||Rt[1]>Ce)return[o(Rt[0],ye,Me),o(Rt[1],Ie,Ce)]}function ge(Rt,Ge){return Rt[0]===Ge[0]&&(Rt[0]===ye||Rt[0]===Me)||Rt[1]===Ge[1]&&(Rt[1]===Ie||Rt[1]===Ce)||void 0}function _e(Rt,Ge,We){return function(Be,Ye){var rt=le(Be),Se=le(Ye),ze=[];if(rt&&Se&&ge(rt,Se))return ze;rt&&ze.push(rt),Se&&ze.push(Se);var Ke=2*s.constrain((Be[Rt]+Ye[Rt])/2,Ge,We)-((rt||Be)[Rt]+(Se||Ye)[Rt]);return Ke&&((rt&&Se?Ke>0==rt[Rt]>Se[Rt]?rt:Se:rt||Se)[Rt]+=Ke),ze}}function Fe(Rt){var Ge=Rt[0],We=Rt[1],Be=Ge===oe[ce-1][0],Ye=We===oe[ce-1][1];if(!Be||!Ye)if(ce>1){var rt=Ge===oe[ce-2][0],Se=We===oe[ce-2][1];Be&&(Ge===ye||Ge===Me)&&rt?Se?ce--:oe[ce-1]=Rt:Ye&&(We===Ie||We===Ce)&&Se?rt?ce--:oe[ce-1]=Rt:oe[ce++]=Rt}else oe[ce++]=Rt}function Ve(Rt){oe[ce-1][0]!==Rt[0]&&oe[ce-1][1]!==Rt[1]&&Fe([ke,Ae]),Fe(Rt),Te=null,ke=Ae=0}"linear"===W||"spline"===W?se=function(Rt,Ge){for(var We=[],Be=0,Ye=0;Ye<4;Ye++){var rt=Re[Ye],Se=t(Rt[0],Rt[1],Ge[0],Ge[1],rt[0],rt[1],rt[2],rt[3]);Se&&(!Be||Math.abs(Se.x-We[0][0])>1||Math.abs(Se.y-We[0][1])>1)&&(Se=[Se.x,Se.y],Be&&ve(Se,Rt)<ve(We[0],Rt)?We.unshift(Se):We.push(Se),Be++)}return We}:"hv"===W||"vh"===W?se=function(Rt,Ge){var We=[],Be=le(Rt),Ye=le(Ge);return Be&&Ye&&ge(Be,Ye)||(Be&&We.push(Be),Ye&&We.push(Ye)),We}:"hvh"===W?se=_e(0,ye,Me):"vhv"===W&&(se=_e(1,Ie,Ce));var He=s.isArrayOrTypedArray(J);function nt(Rt){if(Rt&&j&&(Rt.i=a,Rt.d=n,Rt.trace=I,Rt.marker=He?J[Rt.i]:J,Rt.backoff=j),C=Rt[0]/N,P=Rt[1]/B,xe=Rt[1]<Ie?Ie:Rt[1]>Ce?Ce:0,(Pe=Rt[0]<ye?ye:Rt[0]>Me?Me:0)||xe){if(ce)if(Te){var Ge=se(Te,Rt);Ge.length>1&&(Ve(Ge[0]),oe[ce++]=Ge[1])}else Q=se(oe[ce-1],Rt)[0],oe[ce++]=Q;else oe[ce++]=[Pe||Rt[0],xe||Rt[1]];var We=oe[ce-1];Pe&&xe&&(We[0]!==Pe||We[1]!==xe)?(Te&&(ke!==Pe&&Ae!==xe?Fe(ke&&Ae?(rt=(Ye=Rt)[0]-(Be=Te)[0],Se=(Ye[1]-Be[1])/rt,(Be[1]*Ye[0]-Ye[1]*Be[0])/rt>0?[Se>0?ye:Me,Ce]:[Se>0?Me:ye,Ie]):[ke||Pe,Ae||xe]):ke&&Ae&&Fe([ke,Ae])),Fe([Pe,xe])):ke-Pe&&Ae-xe&&Fe([Pe||ke,xe||Ae]),Te=Rt,ke=Pe,Ae=xe}else Te&&Ve(se(Te,Rt)[0]),oe[ce++]=Rt;var Be,Ye,rt,Se}for(a=0;a<ie;a++)if(c=me(a)){for(ce=0,Te=null,nt(c),a++;a<ie;a++){if(!(f=me(a))){if(G)continue;break}if(X&&i.simplify){var tt=me(a+1);if(m=ve(f,c),K&&(0===ce||ce===ie-1)||!(m<he(f,tt)*ee)){for(y=[(f[0]-c[0])/m,(f[1]-c[1])/m],x=c,w=m,u=_=E=0,g=!1,p=f,a++;a<n.length;a++){if(v=tt,tt=me(a+1),!v){if(G)continue;break}if(L=(h=[v[0]-c[0],v[1]-c[1]])[0]*y[1]-h[1]*y[0],_=Math.min(_,L),(E=Math.max(E,L))-_>he(v,tt))break;p=v,(S=h[0]*y[0]+h[1]*y[1])>w?(w=S,f=v,g=!1):S<u&&(u=S,x=v,g=!0)}if(g?(nt(f),p!==x&&nt(x)):(x!==c&&nt(x),p!==f&&nt(f)),nt(p),a>=n.length||!v)break;nt(v),c=v}}else nt(f)}Te&&Fe([ke||Te[0],Ae||Te[1]]),re.push(oe.slice(0,ce))}var ot=W.slice(W.length-1);if(j&&"h"!==ot&&"v"!==ot){for(var dt=!1,kt=-1,mt=[],wt=0;wt<re.length;wt++)for(var Lt=0;Lt<re[wt].length-1;Lt++){var Ct=re[wt][Lt],It=re[wt][Lt+1],Ut=k.applyBackoff(It,Ct);Ut[0]===It[0]&&Ut[1]===It[1]||(dt=!0),mt[kt+1]||(mt[++kt]=[Ct,[Ut[0],Ut[1]]])}return dt?mt:re}return re}},94039:function($){"use strict";$.exports=function(R,e,k){"spline"===k("line.shape")&&k("line.smoothing")}},68687:function($){"use strict";var R={tonextx:1,tonexty:1,tonext:1};$.exports=function(e,k,A){var l,T,b,d,s,t={},o=!1,r=-1,n=0,i=-1;for(T=0;T<A.length;T++)(b=(l=A[T][0].trace).stackgroup||"")?b in t?s=t[b]:(s=t[b]=n,n++):l.fill in R&&i>=0?s=i:(s=i=n,n++),s<r&&(o=!0),l._groupIndex=r=s;var a=A.slice();o&&a.sort(function(p,f){var x=p[0].trace,v=f[0].trace;return x._groupIndex-v._groupIndex||x.index-v.index});var c={};for(T=0;T<a.length;T++)b=(l=a[T][0].trace).stackgroup||"",!0===l.visible?(l._nexttrace=null,l.fill in R&&(l._prevtrace=(d=c[b])||null,d&&(d._nexttrace=l)),l._ownfill=l.fill&&("tozero"===l.fill.substr(0,6)||"toself"===l.fill||"to"===l.fill.substr(0,2)&&!l._prevtrace),c[b]=l):l._prevtrace=l._nexttrace=l._ownfill=null;return a}},39984:function($,R,e){"use strict";var k=e(92770);$.exports=function(A,l){l||(l=2);var T=A.marker,b=T.sizeref||1,d=T.sizemin||0,s="area"===T.sizemode?function(t){return Math.sqrt(t/b)}:function(t){return t/b};return function(t){var o=s(t/l);return k(o)&&o>0?Math.max(o,d):0}}},4898:function($){"use strict";$.exports={container:"marker",min:"cmin",max:"cmax"}},49508:function($,R,e){"use strict";var k=e(7901),A=e(52075).hasColorscale,l=e(1586),T=e(34098);$.exports=function(b,d,s,t,o,r){var n=T.isBubble(b),i=(b.line||{}).color;r=r||{},i&&(s=i),o("marker.symbol"),o("marker.opacity",n?.7:1),o("marker.size"),r.noAngle||(o("marker.angle"),r.noAngleRef||o("marker.angleref"),r.noStandOff||o("marker.standoff")),o("marker.color",s),A(b,"marker")&&l(b,d,t,o,{prefix:"marker.",cLetter:"c"}),r.noSelect||(o("selected.marker.color"),o("unselected.marker.color"),o("selected.marker.size"),o("unselected.marker.size")),r.noLine||(o("marker.line.color",i&&!Array.isArray(i)&&d.marker.color!==i?i:n?k.background:k.defaultLine),A(b,"marker.line")&&l(b,d,t,o,{prefix:"marker.line.",cLetter:"c"}),o("marker.line.width",n?1:0)),n&&(o("marker.sizeref"),o("marker.sizemin"),o("marker.sizemode")),r.gradient&&"none"!==o("marker.gradient.type")&&o("marker.gradient.color")}},73927:function($,R,e){"use strict";var k=e(71828).dateTick0,A=e(50606).ONEWEEK;function l(T,b){return k(b,T%A==0?1:0)}$.exports=function(T,b,d,s,t){if(t||(t={x:!0,y:!0}),t.x){var o=s("xperiod");o&&(s("xperiod0",l(o,b.xcalendar)),s("xperiodalignment"))}if(t.y){var r=s("yperiod");r&&(s("yperiod0",l(r,b.ycalendar)),s("yperiodalignment"))}}},32663:function($,R,e){"use strict";var k=e(39898),A=e(73972),l=e(71828),T=l.ensureSingle,b=l.identity,d=e(91424),s=e(34098),t=e(34621),o=e(68687),r=e(61082).tester;function n(i,a,c,p,f,x,v){var g;!function(Q,se,fe,ye,Me){var Ie=fe.xaxis,Ce=fe.yaxis,Re=k.extent(l.simpleMap(Ie.range,Ie.r2c)),le=k.extent(l.simpleMap(Ce.range,Ce.r2c)),ge=ye[0].trace;if(s.hasMarkers(ge)){var _e=ge.marker.maxdisplayed;if(0!==_e){var Fe=ye.filter(function(tt){return tt.x>=Re[0]&&tt.x<=Re[1]&&tt.y>=le[0]&&tt.y<=le[1]}),Ve=Math.ceil(Fe.length/_e),He=0;Me.forEach(function(tt,ot){var dt=tt[0].trace;s.hasMarkers(dt)&&dt.marker.maxdisplayed>0&&ot<se&&He++});var nt=Math.round(He*Ve/3+Math.floor(He/3)*Ve/7.1);ye.forEach(function(tt){delete tt.vis}),Fe.forEach(function(tt,ot){0===Math.round((ot+nt)%Ve)&&(tt.vis=!0)})}}}(0,a,c,p,f);var y=!!v&&v.duration>0;function h(Q){return y?Q.transition():Q}var m=c.xaxis,w=c.yaxis,u=p[0].trace,S=u.line,_=k.select(x),E=T(_,"g","errorbars"),L=T(_,"g","lines"),C=T(_,"g","points"),P=T(_,"g","text");if(A.getComponentMethod("errorbars","plot")(i,E,c,v),!0===u.visible){var I,U;h(_).style("opacity",u.opacity);var z=u.fill.charAt(u.fill.length-1);"x"!==z&&"y"!==z&&(z=""),p[0][c.isRangePlot?"nodeRangePlot3":"node3"]=_;var H,F,N="",B=[],j=u._prevtrace;j&&(N=j._prevRevpath||"",U=j._nextFill,B=j._polygons);var J,G,V,W,X,K,re,ee="",ie="",oe=[],ce=l.noop;if(I=u._ownFill,s.hasLines(u)||"none"!==u.fill){for(U&&U.datum(p),-1!==["hv","vh","hvh","vhv"].indexOf(S.shape)?(J=d.steps(S.shape),G=d.steps(S.shape.split("").reverse().join(""))):J=G="spline"===S.shape?function(Q){var se=Q[Q.length-1];return Q.length>1&&Q[0][0]===se[0]&&Q[0][1]===se[1]?d.smoothclosed(Q.slice(1),S.smoothing):d.smoothopen(Q,S.smoothing)}:function(Q){return"M"+Q.join("L")},V=function(Q){return G(Q.reverse())},oe=t(p,{xaxis:m,yaxis:w,trace:u,connectGaps:u.connectgaps,baseTolerance:Math.max(S.width||1,3)/4,shape:S.shape,backoff:S.backoff,simplify:S.simplify,fill:u.fill}),re=u._polygons=new Array(oe.length),g=0;g<oe.length;g++)u._polygons[g]=r(oe[g]);oe.length&&(W=oe[0][0],K=(X=oe[oe.length-1])[X.length-1]),ce=function(Q){return function(se){if(H=J(se),F=V(se),ee?z?(ee+="L"+H.substr(1),ie=F+"L"+ie.substr(1)):(ee+="Z"+H,ie=F+"Z"+ie):(ee=H,ie=F),s.hasLines(u)){var fe=k.select(this);if(fe.datum(p),Q)h(fe.style("opacity",0).attr("d",H).call(d.lineGroupStyle)).style("opacity",1);else{var ye=h(fe);ye.attr("d",H),d.singleLineStyle(p,ye)}}}}}var me=L.selectAll(".js-line").data(oe);h(me.exit()).style("opacity",0).remove(),me.each(ce(!1)),me.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke").call(d.lineGroupStyle).each(ce(!0)),d.setClipUrl(me,c.layerClipId,i),oe.length?(I?(I.datum(p),W&&K&&(z?("y"===z?W[1]=K[1]=w.c2p(0,!0):"x"===z&&(W[0]=K[0]=m.c2p(0,!0)),h(I).attr("d","M"+K+"L"+W+"L"+ee.substr(1)).call(d.singleFillStyle,i)):h(I).attr("d",ee+"Z").call(d.singleFillStyle,i))):U&&("tonext"===u.fill.substr(0,6)&&ee&&N?("tonext"===u.fill?h(U).attr("d",ee+"Z"+N+"Z").call(d.singleFillStyle,i):h(U).attr("d",ee+"L"+N.substr(1)+"Z").call(d.singleFillStyle,i),u._polygons=u._polygons.concat(B)):(he(U),u._polygons=null)),u._prevRevpath=ie,u._prevPolygons=re):(I?he(I):U&&he(U),u._polygons=u._prevRevpath=u._prevPolygons=null),C.datum(p),P.datum(p),function(Q,se,fe){var ye,Me=fe[0].trace,Ie=s.hasMarkers(Me),Ce=s.hasText(Me),Re=function Ae(Q){if(Q.ids)return ke}(Me),le=Te,ge=Te;if(Ie||Ce){var _e=b,Fe=Me.stackgroup,Ve=Fe&&"infer zero"===i._fullLayout._scatterStackOpts[m._id+w._id][Fe].stackgaps;Me.marker.maxdisplayed||Me._needsCull?_e=Ve?Pe:ve:Fe&&!Ve&&(_e=xe),Ie&&(le=_e),Ce&&(ge=_e)}var He,nt=(ye=Q.selectAll("path.point").data(le,Re)).enter().append("path").classed("point",!0);y&&nt.call(d.pointStyle,Me,i).call(d.translatePoints,m,w).style("opacity",0).transition().style("opacity",1),ye.order(),Ie&&(He=d.makePointStyleFns(Me)),ye.each(function(tt){var ot=k.select(this),dt=h(ot);d.translatePoint(tt,dt,m,w)?(d.singlePointStyle(tt,dt,Me,He,i),c.layerClipId&&d.hideOutsideRangePoint(tt,dt,m,w,Me.xcalendar,Me.ycalendar),Me.customdata&&ot.classed("plotly-customdata",null!=tt.data)):dt.remove()}),y?ye.exit().transition().style("opacity",0).remove():ye.exit().remove(),(ye=se.selectAll("g").data(ge,Re)).enter().append("g").classed("textpoint",!0).append("text"),ye.order(),ye.each(function(tt){var ot=k.select(this),dt=h(ot.select("text"));d.translatePoint(tt,dt,m,w)?c.layerClipId&&d.hideOutsideRangePoint(tt,ot,m,w,Me.xcalendar,Me.ycalendar):ot.remove()}),ye.selectAll("text").call(d.textPointStyle,Me,i).each(function(tt){var ot=m.c2p(tt.x),dt=w.c2p(tt.y);k.select(this).selectAll("tspan.line").each(function(){h(k.select(this)).attr({x:ot,y:dt})})}),ye.exit().remove()}(C,P,p);var de=!1===u.cliponaxis?null:c.layerClipId;d.setClipUrl(C,de,i),d.setClipUrl(P,de,i)}function he(Q){h(Q).attr("d","M0,0Z")}function ve(Q){return Q.filter(function(se){return!se.gap&&se.vis})}function Pe(Q){return Q.filter(function(se){return se.vis})}function xe(Q){return Q.filter(function(se){return!se.gap})}function ke(Q){return Q.id}function Te(){return!1}}$.exports=function(i,a,c,p,f,x){var v,g,w,S,y=!f,h=!!f&&f.duration>0,m=o(i,a,c);(v=p.selectAll("g.trace").data(m,function(w){return w[0].trace.uid})).enter().append("g").attr("class",function(w){return"trace scatter trace"+w[0].trace.uid}).style("stroke-miterlimit",2),v.order(),w=i,S=a,v.each(function(_){var E=T(k.select(this),"g","fills");d.setClipUrl(E,S.layerClipId,w);var L=_[0].trace,C=[];L._ownfill&&C.push("_ownFill"),L._nexttrace&&C.push("_nextFill");var P=E.selectAll("g").data(C,b);P.enter().append("g"),P.exit().each(function(I){L[I]=null}).remove(),P.order().each(function(I){L[I]=T(k.select(this),"path","js-fill")})}),h?(x&&(g=x()),k.transition().duration(f.duration).ease(f.easing).each("end",function(){g&&g()}).each("interrupt",function(){g&&g()}).each(function(){p.selectAll("g.trace").each(function(w,u){n(i,u,a,w,m,this,f)})})):v.each(function(w,u){n(i,u,a,w,m,this,f)}),y&&v.exit().remove(),p.selectAll("path:not([d])").remove()}},98002:function($,R,e){"use strict";var k=e(34098);$.exports=function(A,l){var T,b,d,s,t=A.cd,o=A.xaxis,r=A.yaxis,n=[],i=t[0].trace;if(!k.hasMarkers(i)&&!k.hasText(i))return[];if(!1===l)for(T=0;T<t.length;T++)t[T].selected=0;else for(T=0;T<t.length;T++)d=o.c2p((b=t[T]).x),s=r.c2p(b.y),null!==b.i&&l.contains([d,s],!1,T,A)?(n.push({pointNumber:b.i,x:o.c2d(b.x),y:r.c2d(b.y)}),b.selected=1):b.selected=0;return n}},565:function($){"use strict";var R=["orientation","groupnorm","stackgaps"];$.exports=function(e,k,A,l){var T=A._scatterStackOpts,b=l("stackgroup");if(b){var d=k.xaxis+k.yaxis,s=T[d];s||(s=T[d]={});var t=s[b],o=!1;t?t.traces.push(k):(t=s[b]={traceIndices:[],traces:[k]},o=!0);for(var r={orientation:k.x&&!k.y?"h":"v"},n=0;n<R.length;n++){var i=R[n],a=i+"Found";if(!t[a]){var c=void 0!==e[i],p="orientation"===i;if((c||o)&&(t[i]=l(i,r[i]),p&&(t.fillDflt="h"===t[i]?"tonextx":"tonexty"),c&&(t[a]=!0,!o&&(delete t.traces[0][i],p))))for(var f=0;f<t.traces.length-1;f++){var x=t.traces[f];x._input.fill!==x.fill&&(x.fill=t.fillDflt)}}}return t}}},16296:function($,R,e){"use strict";var k=e(39898),A=e(91424),l=e(73972);function T(d,s,t){A.pointStyle(d.selectAll("path.point"),s,t)}function b(d,s,t){A.textPointStyle(d.selectAll("text"),s,t)}$.exports={style:function(d){var s=k.select(d).selectAll("g.trace.scatter");s.style("opacity",function(t){return t[0].trace.opacity}),s.selectAll("g.points").each(function(t){T(k.select(this),t.trace||t[0].trace,d)}),s.selectAll("g.text").each(function(t){b(k.select(this),t.trace||t[0].trace,d)}),s.selectAll("g.trace path.js-line").call(A.lineGroupStyle),s.selectAll("g.trace path.js-fill").call(A.fillGroupStyle,d),l.getComponentMethod("errorbars","style")(s)},stylePoints:T,styleText:b,styleOnSelect:function(d,s,t){var o=s[0].trace;o.selectedpoints?(A.selectedPointStyle(t.selectAll("path.point"),o),A.selectedTextStyle(t.selectAll("text"),o)):(T(t,o,d),b(t,o,d))}}},34098:function($,R,e){"use strict";var k=e(71828);$.exports={hasLines:function(A){return A.visible&&A.mode&&-1!==A.mode.indexOf("lines")},hasMarkers:function(A){return A.visible&&(A.mode&&-1!==A.mode.indexOf("markers")||"splom"===A.type)},hasText:function(A){return A.visible&&A.mode&&-1!==A.mode.indexOf("text")},isBubble:function(A){return k.isPlainObject(A.marker)&&k.isArrayOrTypedArray(A.marker.size)}}},82410:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l,T,b,d){d=d||{},b("textposition"),k.coerceFont(b,"textfont",T.font),d.noSelect||(b("selected.textfont.color"),b("unselected.textfont.color"))}},67513:function($,R,e){"use strict";var k=e(71828),A=e(73972);$.exports=function(l,T,b,d){var s,t=d("x"),o=d("y");if(A.getComponentMethod("calendars","handleTraceDefaults")(l,T,["x","y"],b),t){var r=k.minRowLength(t);o?s=Math.min(r,k.minRowLength(o)):(s=r,d("y0"),d("dy"))}else{if(!o)return 0;s=k.minRowLength(o),d("x0"),d("dx")}return T._length=s,s}},44542:function($,R,e){"use strict";var k=e(82196),A=e(50693),l=e(12663).axisHoverFormat,T=e(5386).f,b=e(5386).s,d=e(9012),s=e(29659),t=e(87381),o=e(1426).extendFlat,r=e(30962).overrideAll,n=e(78607),a=k.marker,c=a.line,p=o({width:k.line.width,dash:{valType:"enumerated",values:n(s),dflt:"solid"}},A("line")),f=$.exports=r({x:k.x,y:k.y,z:{valType:"data_array"},text:o({},k.text,{}),texttemplate:b({},{}),hovertext:o({},k.hovertext,{}),hovertemplate:T(),xhoverformat:l("x"),yhoverformat:l("y"),zhoverformat:l("z"),mode:o({},k.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}},y:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}},z:{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}},connectgaps:k.connectgaps,line:p,marker:o({symbol:{valType:"enumerated",values:n(t),dflt:"circle",arrayOk:!0},size:o({},a.size,{dflt:8}),sizeref:a.sizeref,sizemin:a.sizemin,sizemode:a.sizemode,opacity:o({},a.opacity,{arrayOk:!1}),colorbar:a.colorbar,line:o({width:o({},c.width,{arrayOk:!1})},A("marker.line"))},A("marker")),textposition:o({},k.textposition,{dflt:"top center"}),textfont:{color:k.textfont.color,size:k.textfont.size,family:o({},k.textfont.family,{arrayOk:!1})},opacity:d.opacity,hoverinfo:o({},d.hoverinfo)},"calc","nested");f.x.editType=f.y.editType=f.z.editType="calc+clearAxisTypes"},36563:function($,R,e){"use strict";var k=e(75225),A=e(36922);$.exports=function(l,T){var b=[{x:!1,y:!1,trace:T,t:{}}];return k(b,T),A(l,T),b}},67336:function($,R,e){"use strict";var k=e(73972);function A(l,T,b,d){if(!T||!T.visible)return null;for(var s=k.getComponentMethod("errorbars","makeComputeError")(T),t=new Array(l.length),o=0;o<l.length;o++){var r=s(+l[o],o);if("log"===d.type){var n=d.c2l(l[o]),i=l[o]-r[0],a=l[o]+r[1];if(t[o]=[(d.c2l(i,!0)-n)*b,(d.c2l(a,!0)-n)*b],i>0){var c=d.c2l(i);d._lowerLogErrorBound||(d._lowerLogErrorBound=c),d._lowerErrorBound=Math.min(d._lowerLogErrorBound,c)}}else t[o]=[-r[0]*b,r[1]*b]}return t}$.exports=function(l,T,b){var d=[A(l.x,l.error_x,T[0],b.xaxis),A(l.y,l.error_y,T[1],b.yaxis),A(l.z,l.error_z,T[2],b.zaxis)],s=function(a){for(var c=0;c<a.length;c++)if(a[c])return a[c].length;return 0}(d);if(0===s)return null;for(var t=new Array(s),o=0;o<s;o++){for(var r=[[0,0,0],[0,0,0]],n=0;n<3;n++)if(d[n])for(var i=0;i<2;i++)r[i][n]=d[n][o][i];t[o]=r}return t}},58925:function($,R,e){"use strict";var k=e(9330).gl_line3d,A=e(9330).gl_scatter3d,l=e(9330).gl_error3d,T=e(9330).gl_mesh3d,b=e(9330).delaunay_triangulate,d=e(71828),s=e(78614),t=e(81697).formatColor,o=e(39984),r=e(29659),n=e(87381),i=e(89298),a=e(23469).appendArrayPointValue,c=e(67336);function p(u,S){this.scene=u,this.uid=S,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var f=p.prototype;function x(u){return null==u?0:u.indexOf("left")>-1?-1:u.indexOf("right")>-1?1:0}function v(u){return null==u?0:u.indexOf("top")>-1?-1:u.indexOf("bottom")>-1?1:0}function g(u,S){return S(4*u)}function y(u){return n[u]}function h(u,S,_,E,L){var C=null;if(d.isArrayOrTypedArray(u)){C=[];for(var P=0;P<S;P++)C[P]=void 0===u[P]?E:_(u[P],L)}else C=_(u,d.identity);return C}function m(u){if(d.isArrayOrTypedArray(u)){var S=u[0];return d.isArrayOrTypedArray(S)&&(u=S),"rgb("+u.slice(0,3).map(function(_){return Math.round(255*_)})+")"}return null}function w(u){return d.isArrayOrTypedArray(u)?4===u.length&&"number"==typeof u[0]?m(u):u.map(m):null}f.handlePick=function(u){if(u.object&&(u.object===this.linePlot||u.object===this.delaunayMesh||u.object===this.textMarkers||u.object===this.scatterPlot)){var S=u.index=u.data.index;return u.object.highlight&&u.object.highlight(null),this.scatterPlot&&(u.object=this.scatterPlot,this.scatterPlot.highlight(u.data)),u.textLabel="",this.textLabels&&(Array.isArray(this.textLabels)?(this.textLabels[S]||0===this.textLabels[S])&&(u.textLabel=this.textLabels[S]):u.textLabel=this.textLabels),u.traceCoordinate=[this.data.x[S],this.data.y[S],this.data.z[S]],!0}},f.update=function(u){var S,_,E,L,C=this.scene.glplot.gl,P=r.solid;this.data=u;var I=function(H,F){var N,B,j,J,G,V,W=[],X=H.fullSceneLayout,K=H.dataScale,re=X.xaxis,ee=X.yaxis,ie=X.zaxis,oe=F.marker,ce=F.line,me=F.x||[],de=F.y||[],he=F.z||[],ve=me.length,Pe=F.xcalendar,xe=F.ycalendar,ke=F.zcalendar;for(G=0;G<ve;G++)N=re.d2l(me[G],0,Pe)*K[0],B=ee.d2l(de[G],0,xe)*K[1],j=ie.d2l(he[G],0,ke)*K[2],W[G]=[N,B,j];if(Array.isArray(F.text))V=F.text;else if(void 0!==F.text)for(V=new Array(ve),G=0;G<ve;G++)V[G]=F.text;function Ae(Ve,He){var nt=X[Ve];return i.tickText(nt,nt.d2l(He),!0).text}var Te=F.texttemplate;if(Te){var Q=H.fullLayout._d3locale,se=Array.isArray(Te),fe=se?Math.min(Te.length,ve):ve,ye=se?function(Ve){return Te[Ve]}:function(){return Te};for(V=new Array(fe),G=0;G<fe;G++){var Me={x:me[G],y:de[G],z:he[G]},Ie={xLabel:Ae("xaxis",me[G]),yLabel:Ae("yaxis",de[G]),zLabel:Ae("zaxis",he[G])},Ce={};a(Ce,F,G);var Re=F._meta||{};V[G]=d.texttemplateString(ye(G),Ie,Q,Ce,Me,Re)}}if(J={position:W,mode:F.mode,text:V},"line"in F&&(J.lineColor=t(ce,1,ve),J.lineWidth=ce.width,J.lineDashes=ce.dash),"marker"in F){var le=o(F);J.scatterColor=t(oe,1,ve),J.scatterSize=h(oe.size,ve,g,20,le),J.scatterMarker=h(oe.symbol,ve,y,"\u25cf"),J.scatterLineWidth=oe.line.width,J.scatterLineColor=t(oe.line,1,ve),J.scatterAngle=0}"textposition"in F&&(J.textOffset=function(Ve){var He=[0,0];if(Array.isArray(Ve))for(var nt=0;nt<Ve.length;nt++)He[nt]=[0,0],Ve[nt]&&(He[nt][0]=x(Ve[nt]),He[nt][1]=v(Ve[nt]));else He[0]=x(Ve),He[1]=v(Ve);return He}(F.textposition),J.textColor=t(F.textfont,1,ve),J.textSize=h(F.textfont.size,ve,d.identity,12),J.textFont=F.textfont.family,J.textAngle=0);var ge=["x","y","z"];for(J.project=[!1,!1,!1],J.projectScale=[1,1,1],J.projectOpacity=[1,1,1],G=0;G<3;++G){var _e=F.projection[ge[G]];(J.project[G]=_e.show)&&(J.projectOpacity[G]=_e.opacity,J.projectScale[G]=_e.scale)}J.errorBounds=c(F,K,X);var Fe=function(Ve){for(var He=[0,0,0],nt=[[0,0,0],[0,0,0],[0,0,0]],tt=[1,1,1],ot=0;ot<3;ot++){var dt=Ve[ot];dt&&!1!==dt.copy_zstyle&&!1!==Ve[2].visible&&(dt=Ve[2]),dt&&dt.visible&&(He[ot]=dt.width/2,nt[ot]=s(dt.color),tt[ot]=dt.thickness)}return{capSize:He,color:nt,lineWidth:tt}}([F.error_x,F.error_y,F.error_z]);return J.errorColor=Fe.color,J.errorLineWidth=Fe.lineWidth,J.errorCapSize=Fe.capSize,J.delaunayAxis=F.surfaceaxis,J.delaunayColor=s(F.surfacecolor),J}(this.scene,u);"mode"in I&&(this.mode=I.mode),"lineDashes"in I&&I.lineDashes in r&&(P=r[I.lineDashes]),this.color=w(I.scatterColor)||w(I.lineColor),this.dataPoints=I.position,S={gl:this.scene.glplot.gl,position:I.position,color:I.lineColor,lineWidth:I.lineWidth||1,dashes:P[0],dashScale:P[1],opacity:u.opacity,connectGaps:u.connectgaps},-1!==this.mode.indexOf("lines")?this.linePlot?this.linePlot.update(S):(this.linePlot=k(S),this.linePlot._trace=this,this.scene.glplot.add(this.linePlot)):this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose(),this.linePlot=null);var U=u.opacity;if(u.marker&&u.marker.opacity&&(U*=u.marker.opacity),_={gl:this.scene.glplot.gl,position:I.position,color:I.scatterColor,size:I.scatterSize,glyph:I.scatterMarker,opacity:U,orthographic:!0,lineWidth:I.scatterLineWidth,lineColor:I.scatterLineColor,project:I.project,projectScale:I.projectScale,projectOpacity:I.projectOpacity},-1!==this.mode.indexOf("markers")?this.scatterPlot?this.scatterPlot.update(_):(this.scatterPlot=A(_),this.scatterPlot._trace=this,this.scatterPlot.highlightScale=1,this.scene.glplot.add(this.scatterPlot)):this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose(),this.scatterPlot=null),L={gl:this.scene.glplot.gl,position:I.position,glyph:I.text,color:I.textColor,size:I.textSize,angle:I.textAngle,alignment:I.textOffset,font:I.textFont,orthographic:!0,lineWidth:0,project:!1,opacity:u.opacity},this.textLabels=u.hovertext||u.text,-1!==this.mode.indexOf("text")?this.textMarkers?this.textMarkers.update(L):(this.textMarkers=A(L),this.textMarkers._trace=this,this.textMarkers.highlightScale=1,this.scene.glplot.add(this.textMarkers)):this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose(),this.textMarkers=null),E={gl:this.scene.glplot.gl,position:I.position,color:I.errorColor,error:I.errorBounds,lineWidth:I.errorLineWidth,capSize:I.errorCapSize,opacity:u.opacity},this.errorBars?I.errorBounds?this.errorBars.update(E):(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose(),this.errorBars=null):I.errorBounds&&(this.errorBars=l(E),this.errorBars._trace=this,this.scene.glplot.add(this.errorBars)),I.delaunayAxis>=0){var z=function(H,F,N){var B,j=(N+1)%3,J=(N+2)%3,G=[],V=[];for(B=0;B<H.length;++B){var W=H[B];!isNaN(W[j])&&isFinite(W[j])&&!isNaN(W[J])&&isFinite(W[J])&&(G.push([W[j],W[J]]),V.push(B))}var X=b(G);for(B=0;B<X.length;++B)for(var K=X[B],re=0;re<K.length;++re)K[re]=V[K[re]];return{positions:H,cells:X,meshColor:F}}(I.position,I.delaunayColor,I.delaunayAxis);z.opacity=u.opacity,this.delaunayMesh?this.delaunayMesh.update(z):(z.gl=C,this.delaunayMesh=T(z),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)},f.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())},$.exports=function(u,S){var _=new p(u,S.uid);return _.update(S),_}},21428:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(34098),T=e(49508),b=e(11058),d=e(82410),s=e(44542);$.exports=function(t,o,r,n){function i(y,h){return A.coerce(t,o,s,y,h)}var y,h,m,w,u,S,_,E;if(y=t,h=o,w=n,u=0,S=(m=i)("x"),_=m("y"),E=m("z"),k.getComponentMethod("calendars","handleTraceDefaults")(y,h,["x","y","z"],w),S&&_&&E&&(u=Math.min(S.length,_.length,E.length),h._length=h._xlength=h._ylength=h._zlength=u),u){i("text"),i("hovertext"),i("hovertemplate"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),i("mode"),l.hasLines(o)&&(i("connectgaps"),b(t,o,r,n,i)),l.hasMarkers(o)&&T(t,o,r,n,i,{noSelect:!0,noAngle:!0}),l.hasText(o)&&(i("texttemplate"),d(t,o,n,i,{noSelect:!0}));var c=(o.line||{}).color,p=(o.marker||{}).color;i("surfaceaxis")>=0&&i("surfacecolor",c||p);for(var f=["x","y","z"],x=0;x<3;++x){var v="projection."+f[x];i(v+".show")&&(i(v+".opacity"),i(v+".scale"))}var g=k.getComponentMethod("errorbars","supplyDefaults");g(t,o,c||p||r,{axis:"z"}),g(t,o,c||p||r,{axis:"y",inherit:"z"}),g(t,o,c||p||r,{axis:"x",inherit:"z"})}else o.visible=!1}},13551:function($,R,e){"use strict";$.exports={plot:e(58925),attributes:e(44542),markerSymbols:e(87381),supplyDefaults:e(21428),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e(36563),moduleType:"trace",name:"scatter3d",basePlotModule:e(58547),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},97001:function($,R,e){"use strict";var k=e(82196),A=e(9012),l=e(5386).f,T=e(5386).s,b=e(50693),d=e(1426).extendFlat,s=k.marker,t=k.line,o=s.line;$.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:d({},k.mode,{dflt:"markers"}),text:d({},k.text,{}),texttemplate:T({editType:"plot"},{keys:["a","b","text"]}),hovertext:d({},k.hovertext,{}),line:{color:t.color,width:t.width,dash:t.dash,backoff:t.backoff,shape:d({},t.shape,{values:["linear","spline"]}),smoothing:t.smoothing,editType:"calc"},connectgaps:k.connectgaps,fill:d({},k.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:k.fillcolor,marker:d({symbol:s.symbol,opacity:s.opacity,maxdisplayed:s.maxdisplayed,angle:s.angle,angleref:s.angleref,standoff:s.standoff,size:s.size,sizeref:s.sizeref,sizemin:s.sizemin,sizemode:s.sizemode,line:d({width:o.width,editType:"calc"},b("marker.line")),gradient:s.gradient,editType:"calc"},b("marker")),textfont:k.textfont,textposition:k.textposition,selected:k.selected,unselected:k.unselected,hoverinfo:d({},A.hoverinfo,{flags:["a","b","text","name"]}),hoveron:k.hoveron,hovertemplate:l()}},34618:function($,R,e){"use strict";var k=e(92770),A=e(36922),l=e(75225),T=e(66279),b=e(47761).calcMarkerSize,d=e(22882);$.exports=function(s,t){var o=t._carpetTrace=d(s,t);if(o&&o.visible&&"legendonly"!==o.visible){var r;t.xaxis=o.xaxis,t.yaxis=o.yaxis;var n,i,a=t._length,c=new Array(a),p=!1;for(r=0;r<a;r++)if(i=t.b[r],k(n=t.a[r])&&k(i)){var f=o.ab2xy(+n,+i,!0),x=o.isVisible(+n,+i);x||(p=!0),c[r]={x:f[0],y:f[1],a:n,b:i,vis:x}}else c[r]={x:!1,y:!1};return t._needsCull=p,c[0].carpet=o,c[0].trace=t,b(t,a),A(s,t),l(c,t),T(c,t),c}}},98965:function($,R,e){"use strict";var k=e(71828),A=e(47581),l=e(34098),T=e(49508),b=e(11058),d=e(94039),s=e(82410),t=e(28908),o=e(97001);$.exports=function(r,n,i,a){function c(g,y){return k.coerce(r,n,o,g,y)}c("carpet"),n.xaxis="x",n.yaxis="y";var p=c("a"),f=c("b"),x=Math.min(p.length,f.length);if(x){n._length=x,c("text"),c("texttemplate"),c("hovertext"),c("mode",x<A.PTS_LINESONLY?"lines+markers":"lines"),l.hasLines(n)&&(b(r,n,i,a,c,{backoff:!0}),d(r,n,c),c("connectgaps")),l.hasMarkers(n)&&T(r,n,i,a,c,{gradient:!0}),l.hasText(n)&&s(r,n,a,c);var v=[];(l.hasMarkers(n)||l.hasText(n))&&(c("marker.maxdisplayed"),v.push("points")),c("fill"),"none"!==n.fill&&(t(r,n,i,c),l.hasLines(n)||d(r,n,c)),"tonext"!==n.fill&&"toself"!==n.fill||v.push("fills"),"fills"!==c("hoveron",v.join("+")||"points")&&c("hovertemplate"),k.coerceSelectionMarkerOpacity(n,c)}else n.visible=!1}},16165:function($){"use strict";$.exports=function(R,e,k,A,l){var T=A[l];return R.a=T.a,R.b=T.b,R.y=T.y,R}},48953:function($){"use strict";$.exports=function(R,e){var k={},A=e._carpet,l=A.ab2ij([R.a,R.b]),T=Math.floor(l[0]),b=l[0]-T,d=Math.floor(l[1]),t=A.evalxy([],T,d,b,l[1]-d);return k.yLabel=t[1].toFixed(3),k}},22931:function($,R,e){"use strict";var k=e(33720),A=e(71828).fillText;$.exports=function(l,T,b,d){var s=k(l,T,b,d);if(s&&!1!==s[0].index){var t=s[0];if(void 0===t.index){var r=l.xa._length,n=r*(1-t.y0/l.ya._length)/2,i=r-n;return t.x0=Math.max(Math.min(t.x0,i),n),t.x1=Math.max(Math.min(t.x1,i),n),s}var a=t.cd[t.index];t.a=a.a,t.b=a.b,t.xLabelVal=void 0,t.yLabelVal=void 0;var c=t.trace,p=c._carpet,f=c._module.formatLabels(a,c);t.yLabel=f.yLabel,delete t.text;var x=[];if(!c.hovertemplate){var v=(a.hi||c.hoverinfo).split("+");-1!==v.indexOf("all")&&(v=["a","b","text"]),-1!==v.indexOf("a")&&g(p.aaxis,a.a),-1!==v.indexOf("b")&&g(p.baxis,a.b),x.push("y: "+t.yLabel),-1!==v.indexOf("text")&&A(a,c,x),t.extraText=x.join("<br>")}return s}function g(y,h){var m;m=y.labelprefix&&y.labelprefix.length>0?y.labelprefix.replace(/ = $/,""):y._hovertitle,x.push(m+": "+h.toFixed(3)+y.labelsuffix)}}},46858:function($,R,e){"use strict";$.exports={attributes:e(97001),supplyDefaults:e(98965),colorbar:e(4898),formatLabels:e(48953),calc:e(34618),plot:e(1913),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(22931),selectPoints:e(98002),eventData:e(16165),moduleType:"trace",name:"scattercarpet",basePlotModule:e(93612),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},1913:function($,R,e){"use strict";var k=e(32663),A=e(89298),l=e(91424);$.exports=function(T,b,d,s){var t,o,r,n=d[0][0].carpet,i=A.getFromId(T,n.xaxis||"x"),a=A.getFromId(T,n.yaxis||"y"),c={xaxis:i,yaxis:a,plot:b.plot};for(t=0;t<d.length;t++)(o=d[t][0].trace)._xA=i,o._yA=a;for(k(T,c,d,s),t=0;t<d.length;t++)r=s.selectAll("g.trace"+(o=d[t][0].trace).uid+" .js-line"),l.setClipUrl(r,d[t][0].carpet._clipPathId,T)}},19316:function($,R,e){"use strict";var k=e(5386).f,A=e(5386).s,l=e(82196),T=e(9012),b=e(50693),d=e(79952).P,s=e(1426).extendFlat,t=e(30962).overrideAll,o=l.marker,r=l.line,n=o.line;$.exports=t({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:s({},l.mode,{dflt:"markers"}),text:s({},l.text,{}),texttemplate:A({editType:"plot"},{keys:["lat","lon","location","text"]}),hovertext:s({},l.hovertext,{}),textfont:l.textfont,textposition:l.textposition,line:{color:r.color,width:r.width,dash:d},connectgaps:l.connectgaps,marker:s({symbol:o.symbol,opacity:o.opacity,angle:o.angle,angleref:s({},o.angleref,{values:["previous","up","north"]}),standoff:o.standoff,size:o.size,sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,colorbar:o.colorbar,line:s({width:n.width},b("marker.line")),gradient:o.gradient},b("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:l.fillcolor,selected:l.selected,unselected:l.unselected,hoverinfo:s({},T.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:k()},"calc","nested")},84622:function($,R,e){"use strict";var k=e(92770),A=e(50606).BADNUM,l=e(36922),T=e(75225),b=e(66279),d=e(71828)._;function s(t){return t&&"string"==typeof t}$.exports=function(t,o){var r,n=Array.isArray(o.locations),i=n?o.locations.length:o._length,a=new Array(i);r=o.geojson?function(g){return s(g)||k(g)}:s;for(var c=0;c<i;c++){var p=a[c]={};if(n){var f=o.locations[c];p.loc=r(f)?f:null}else{var x=o.lon[c],v=o.lat[c];p.lonlat=k(x)&&k(v)?[+x,+v]:[A,A]}}return T(a,o),l(t,o),b(a,o),i&&(a[0].t={labels:{lat:d(t,"lat:")+" ",lon:d(t,"lon:")+" "}}),a}},10659:function($,R,e){"use strict";var k=e(71828),A=e(34098),l=e(49508),T=e(11058),b=e(82410),d=e(28908),s=e(19316);$.exports=function(t,o,r,n){function i(g,y){return k.coerce(t,o,s,g,y)}var a,c=i("locations");if(c&&c.length){var p,f=i("geojson");("string"==typeof f&&""!==f||k.isPlainObject(f))&&(p="geojson-id"),"geojson-id"===i("locationmode",p)&&i("featureidkey"),a=c.length}else{var x=i("lon")||[],v=i("lat")||[];a=Math.min(x.length,v.length)}a?(o._length=a,i("text"),i("hovertext"),i("hovertemplate"),i("mode"),A.hasLines(o)&&(T(t,o,r,n,i),i("connectgaps")),A.hasMarkers(o)&&l(t,o,r,n,i,{gradient:!0}),A.hasText(o)&&(i("texttemplate"),b(t,o,n,i)),i("fill"),"none"!==o.fill&&d(t,o,r,i),k.coerceSelectionMarkerOpacity(o,i)):o.visible=!1}},84084:function($){"use strict";$.exports=function(R,e,k,A,l){R.lon=e.lon,R.lat=e.lat,R.location=e.loc?e.loc:null;var T=A[l];return T.fIn&&T.fIn.properties&&(R.properties=T.fIn.properties),R}},82719:function($,R,e){"use strict";var k=e(89298);$.exports=function(A,l,T){var b={},d=T[l.geo]._subplot.mockAxis,s=A.lonlat;return b.lonLabel=k.tickText(d,d.c2l(s[0]),!0).text,b.latLabel=k.tickText(d,d.c2l(s[1]),!0).text,b}},14977:function($,R,e){"use strict";var k=e(30211),A=e(50606).BADNUM,l=e(34603),T=e(71828).fillText,b=e(19316);$.exports=function(d,s,t){var o=d.cd,r=o[0].trace,n=d.xa,i=d.ya,a=d.subplot,c=a.projection.isLonLatOverEdges,p=a.project;if(k.getClosest(o,function(m){var w=m.lonlat;if(w[0]===A||c(w))return 1/0;var u=p(w),S=p([s,t]),_=Math.abs(u[0]-S[0]),E=Math.abs(u[1]-S[1]),L=Math.max(3,m.mrc||0);return Math.max(Math.sqrt(_*_+E*E)-L,1-3/L)},d),!1!==d.index){var f=o[d.index],x=f.lonlat,v=[n.c2p(x),i.c2p(x)],g=f.mrc||1;d.x0=v[0]-g,d.x1=v[0]+g,d.y0=v[1]-g,d.y1=v[1]+g,d.loc=f.loc,d.lon=x[0],d.lat=x[1];var y={};y[r.geo]={_subplot:a};var h=r._module.formatLabels(f,r,y);return d.lonLabel=h.lonLabel,d.latLabel=h.latLabel,d.color=l(r,f),d.extraText=function(m,w,u,S){if(!m.hovertemplate){var _=w.hi||m.hoverinfo,E="all"===_?b.hoverinfo.flags:_.split("+"),L=-1!==E.indexOf("location")&&Array.isArray(m.locations),C=-1!==E.indexOf("lon"),P=-1!==E.indexOf("lat"),I=-1!==E.indexOf("text"),U=[];return L?U.push(w.loc):C&&P?U.push("("+z(u.latLabel)+", "+z(u.lonLabel)+")"):C?U.push(S.lon+z(u.lonLabel)):P&&U.push(S.lat+z(u.latLabel)),I&&T(w,m,U),U.join("<br>")}function z(H){return H+"\xb0"}}(r,f,d,o[0].t.labels),d.hovertemplate=r.hovertemplate,[d]}}},17988:function($,R,e){"use strict";$.exports={attributes:e(19316),supplyDefaults:e(10659),colorbar:e(4898),formatLabels:e(82719),calc:e(84622),calcGeoJSON:e(89171).calcGeoJSON,plot:e(89171).plot,style:e(33095),styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(14977),eventData:e(84084),selectPoints:e(20548),moduleType:"trace",name:"scattergeo",basePlotModule:e(44622),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},89171:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(90973).getTopojsonFeatures,T=e(18214),b=e(41327),d=e(71739).findExtremes,s=e(50606).BADNUM,t=e(47761).calcMarkerSize,o=e(34098),r=e(33095);$.exports={calcGeoJSON:function(n,i){var a,c,p=n[0].trace,f=i[p.geo],x=f._subplot,v=p._length;if(Array.isArray(p.locations)){var g=p.locationmode,y="geojson-id"===g?b.extractTraceFeature(n):l(p,x.topojson);for(a=0;a<v;a++){c=n[a];var h="geojson-id"===g?c.fOut:b.locationToFeature(g,c.loc,y);c.lonlat=h?h.properties.ct:[s,s]}}var m,w,u={padded:!0};if("geojson"===f.fitbounds&&"geojson-id"===p.locationmode){var S=b.computeBbox(b.getTraceGeojson(p));m=[S[0],S[2]],w=[S[1],S[3]]}else{for(m=new Array(v),w=new Array(v),a=0;a<v;a++)m[a]=(c=n[a]).lonlat[0],w[a]=c.lonlat[1];u.ppad=t(p,v)}p._extremes.lon=d(f.lonaxis._ax,m,u),p._extremes.lat=d(f.lataxis._ax,w,u)},plot:function(n,i,a){var c=i.layers.frontplot.select(".scatterlayer"),p=A.makeTraceGroups(c,a,"trace scattergeo");function f(x,v){x.lonlat[0]===s&&k.select(v).remove()}p.selectAll("*").remove(),p.each(function(x){var v=k.select(this),g=x[0].trace;if(o.hasLines(g)||"none"!==g.fill){var y=T.calcTraceToLineCoords(x),h="none"!==g.fill?T.makePolygon(y):T.makeLine(y);v.selectAll("path.js-line").data([{geojson:h,trace:g}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}o.hasMarkers(g)&&v.selectAll("path.point").data(A.identity).enter().append("path").classed("point",!0).each(function(m){f(m,this)}),o.hasText(g)&&v.selectAll("g").data(A.identity).enter().append("g").append("text").each(function(m){f(m,this)}),r(n,x)})}}},20548:function($,R,e){"use strict";var k=e(34098),A=e(50606).BADNUM;$.exports=function(l,T){var b,d,s,t,o,r=l.cd,n=l.xaxis,i=l.yaxis,a=[],c=r[0].trace;if(!k.hasMarkers(c)&&!k.hasText(c))return[];if(!1===T)for(o=0;o<r.length;o++)r[o].selected=0;else for(o=0;o<r.length;o++)(d=(b=r[o]).lonlat)[0]!==A&&(s=n.c2p(d),t=i.c2p(d),T.contains([s,t],null,o,l)?(a.push({pointNumber:o,lon:d[0],lat:d[1]}),b.selected=1):b.selected=0);return a}},33095:function($,R,e){"use strict";var k=e(39898),A=e(91424),l=e(7901),T=e(16296),b=T.stylePoints,d=T.styleText;$.exports=function(s,t){var o,r,n,i;t&&(o=s,n=(r=t)[0].trace,(i=r[0].node3).style("opacity",r[0].trace.opacity),b(i,n,o),d(i,n,o),i.selectAll("path.js-line").style("fill","none").each(function(a){var c=k.select(this),p=a.trace,f=p.line||{};c.call(l.stroke,f.color).call(A.dashLine,f.dash||"",f.width||0),"none"!==p.fill&&c.call(l.fill,p.fillcolor)}))}},42341:function($,R,e){"use strict";var k=e(9012),A=e(82196),l=e(12663).axisHoverFormat,T=e(50693),b=e(78607),d=e(1426).extendFlat,s=e(30962).overrideAll,t=e(78232).DASHES,o=A.line,r=A.marker,n=r.line,i=$.exports=s({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:l("x"),yhoverformat:l("y"),text:A.text,hovertext:A.hovertext,textposition:A.textposition,textfont:A.textfont,mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:o.color,width:o.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:b(t),dflt:"solid"}},marker:d({},T("marker"),{symbol:r.symbol,angle:r.angle,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,opacity:r.opacity,colorbar:r.colorbar,line:d({},T("marker.line"),{width:n.width})}),connectgaps:A.connectgaps,fill:d({},A.fill,{dflt:"none"}),fillcolor:A.fillcolor,selected:{marker:A.selected.marker,textfont:A.selected.textfont},unselected:{marker:A.unselected.marker,textfont:A.unselected.textfont},opacity:k.opacity},"calc","nested");i.x.editType=i.y.editType=i.x0.editType=i.y0.editType="calc+clearAxisTypes",i.hovertemplate=A.hovertemplate,i.texttemplate=A.texttemplate},72156:function($,R,e){"use strict";var k=e(20794);$.exports={moduleType:"trace",name:"scattergl",basePlotModule:e(93612),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:e(42341),supplyDefaults:e(47148),crossTraceDefaults:e(34936),colorbar:e(4898),formatLabels:e(68101),calc:e(45032),hoverPoints:k.hoverPoints,selectPoints:e(58147),meta:{}}},45032:function($,R,e){"use strict";var k=e(88294),A=e(71828),l=e(41675),T=e(71739).findExtremes,b=e(42973),d=e(47761),s=d.calcMarkerSize,t=d.calcAxisExpansion,o=d.setFirstScatter,r=e(36922),n=e(19635),i=e(38967),a=e(50606).BADNUM,c=e(78232).TOO_MANY_POINTS;function p(f,x,v){var g=f._extremes[x._id],y=T(x,v._bnds,{padded:!0});g.min=g.min.concat(y.min),g.max=g.max.concat(y.max)}$.exports=function(f,x){var v,g=f._fullLayout,y=x._xA=l.getFromId(f,x.xaxis,"x"),h=x._yA=l.getFromId(f,x.yaxis,"y"),m=g._plots[x.xaxis+x.yaxis],w=x._length,u=w>=c,S=2*w,_={},E=y.makeCalcdata(x,"x"),L=h.makeCalcdata(x,"y"),C=b(x,y,"x",E),P=b(x,h,"y",L),I=C.vals,U=P.vals;x._x=I,x._y=U,x.xperiodalignment&&(x._origX=E,x._xStarts=C.starts,x._xEnds=C.ends),x.yperiodalignment&&(x._origY=L,x._yStarts=P.starts,x._yEnds=P.ends);var z=new Array(S),H=new Array(w);for(v=0;v<w;v++)z[2*v]=I[v]===a?NaN:I[v],z[2*v+1]=U[v]===a?NaN:U[v],H[v]=v;if("log"===y.type)for(v=0;v<S;v+=2)z[v]=y.c2l(z[v]);if("log"===h.type)for(v=1;v<S;v+=2)z[v]=h.c2l(z[v]);u&&"log"!==y.type&&"log"!==h.type?_.tree=k(z):_.ids=H,r(f,x);var F,N=function(j,J,G,V,W,X){var K=n.style(j,G);if(K.marker&&(K.marker.positions=V),K.line&&V.length>1&&A.extendFlat(K.line,n.linePositions(j,G,V)),K.errorX||K.errorY){var re=n.errorBarPositions(j,G,V,W,X);K.errorX&&A.extendFlat(K.errorX,re.x),K.errorY&&A.extendFlat(K.errorY,re.y)}return K.text&&(A.extendFlat(K.text,{positions:V},n.textPosition(j,G,K.text,K.marker)),A.extendFlat(K.textSel,{positions:V},n.textPosition(j,G,K.text,K.markerSel)),A.extendFlat(K.textUnsel,{positions:V},n.textPosition(j,G,K.text,K.markerUnsel))),K}(f,0,x,z,I,U),B=i(f,m);return o(g,x),u?N.marker&&(F=N.marker.sizeAvg||Math.max(N.marker.size,3)):F=s(x,w),t(f,x,y,h,I,U,F),N.errorX&&p(x,y,N.errorX),N.errorY&&p(x,h,N.errorY),N.fill&&!B.fill2d&&(B.fill2d=!0),N.marker&&!B.scatter2d&&(B.scatter2d=!0),N.line&&!B.line2d&&(B.line2d=!0),!N.errorX&&!N.errorY||B.error2d||(B.error2d=!0),N.text&&!B.glText&&(B.glText=!0),N.marker&&(N.marker.snap=w),B.lineOptions.push(N.line),B.errorXOptions.push(N.errorX),B.errorYOptions.push(N.errorY),B.fillOptions.push(N.fill),B.markerOptions.push(N.marker),B.markerSelectedOptions.push(N.markerSel),B.markerUnselectedOptions.push(N.markerUnsel),B.textOptions.push(N.text),B.textSelectedOptions.push(N.textSel),B.textUnselectedOptions.push(N.textUnsel),B.selectBatch.push([]),B.unselectBatch.push([]),_._scene=B,_.index=B.count,_.x=I,_.y=U,_.positions=z,B.count++,[{x:!1,y:!1,t:_,trace:x}]}},78232:function($){"use strict";$.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]}}},19635:function($,R,e){"use strict";var k=e(92770),A=e(82019),l=e(25075),T=e(73972),b=e(71828),d=e(91424),s=e(41675),t=e(81697).formatColor,o=e(34098),r=e(39984),n=e(68645),i=e(78232),a=e(37822).DESELECTDIM,c={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},p=e(23469).appendArrayPointValue;function f(E,L){var C,P=E._fullLayout,I=L._length,U=L.textfont,z=L.textposition,H=Array.isArray(z)?z:[z],F=U.color,N=U.size,B=U.family,j={},J=E._context.plotGlPixelRatio,G=L.texttemplate;if(G){j.text=[];var V=P._d3locale,W=Array.isArray(G),X=W?Math.min(G.length,I):I,K=W?function(de){return G[de]}:function(){return G};for(C=0;C<X;C++){var re={i:C},ee=L._module.formatLabels(re,L,P),ie={};p(ie,L,C);var oe=L._meta||{};j.text.push(b.texttemplateString(K(C),ee,V,ie,re,oe))}}else j.text=Array.isArray(L.text)&&L.text.length<I?L.text.slice():L.text;if(Array.isArray(j.text))for(C=j.text.length;C<I;C++)j.text[C]="";for(j.opacity=L.opacity,j.font={},j.align=[],j.baseline=[],C=0;C<H.length;C++){var ce=H[C].split(/\s+/);switch(ce[1]){case"left":j.align.push("right");break;case"right":j.align.push("left");break;default:j.align.push(ce[1])}switch(ce[0]){case"top":j.baseline.push("bottom");break;case"bottom":j.baseline.push("top");break;default:j.baseline.push(ce[0])}}if(Array.isArray(F))for(j.color=new Array(I),C=0;C<I;C++)j.color[C]=F[C];else j.color=F;if(b.isArrayOrTypedArray(N)||Array.isArray(B))for(j.font=new Array(I),C=0;C<I;C++){var me=j.font[C]={};me.size=(b.isTypedArray(N)?N[C]:Array.isArray(N)?k(N[C])?N[C]:0:N)*J,me.family=Array.isArray(B)?B[C]:B}else j.font={size:N*J,family:B};return j}function x(E,L){var C,P,I=L._length,U=L.marker,z={},H=b.isArrayOrTypedArray(U.symbol),F=b.isArrayOrTypedArray(U.angle),N=b.isArrayOrTypedArray(U.color),B=b.isArrayOrTypedArray(U.line.color),j=b.isArrayOrTypedArray(U.opacity),J=b.isArrayOrTypedArray(U.size),G=b.isArrayOrTypedArray(U.line.width);if(H||(P=n.isOpenSymbol(U.symbol)),H||N||B||j||F){z.symbols=new Array(I),z.angles=new Array(I),z.colors=new Array(I),z.borderColors=new Array(I);var V=U.symbol,W=U.angle,X=t(U,U.opacity,I),K=t(U.line,U.opacity,I);if(!Array.isArray(K[0])){var re=K;for(K=Array(I),C=0;C<I;C++)K[C]=re}if(!Array.isArray(X[0])){var ee=X;for(X=Array(I),C=0;C<I;C++)X[C]=ee}if(!Array.isArray(V)){var ie=V;for(V=Array(I),C=0;C<I;C++)V[C]=ie}if(!Array.isArray(W)){var oe=W;for(W=Array(I),C=0;C<I;C++)W[C]=oe}for(z.symbols=V,z.angles=W,z.colors=X,z.borderColors=K,C=0;C<I;C++)H&&(P=n.isOpenSymbol(U.symbol[C])),P&&(K[C]=X[C].slice(),X[C]=X[C].slice(),X[C][3]=0);for(z.opacity=L.opacity,z.markers=new Array(I),C=0;C<I;C++)z.markers[C]=_({mx:z.symbols[C],ma:z.angles[C]},L)}else P?(z.color=l(U.color,"uint8"),z.color[3]=0,z.borderColor=l(U.color,"uint8")):(z.color=l(U.color,"uint8"),z.borderColor=l(U.line.color,"uint8")),z.opacity=L.opacity*U.opacity,z.marker=_({mx:U.symbol,ma:U.angle},L);var ce,me=r(L,1);if(J||G){var de,he=z.sizes=new Array(I),ve=z.borderSizes=new Array(I),Pe=0;if(J){for(C=0;C<I;C++)he[C]=me(U.size[C]),Pe+=he[C];de=Pe/I}else for(ce=me(U.size),C=0;C<I;C++)he[C]=ce;if(G)for(C=0;C<I;C++)ve[C]=U.line.width[C];else for(ce=U.line.width,C=0;C<I;C++)ve[C]=ce;z.sizeAvg=de}else z.size=me(U&&U.size||10),z.borderSizes=me(U.line.width);return z}function v(E,L,C){var I={};return C&&(C.marker&&C.marker.symbol?I=x(0,b.extendFlat({},L.marker,C.marker)):C.marker&&(C.marker.size&&(I.size=C.marker.size),C.marker.color&&(I.colors=C.marker.color),void 0!==C.marker.opacity&&(I.opacity=C.marker.opacity))),I}function g(E,L,C){var P={};if(!C)return P;if(C.textfont){var I={opacity:1,text:L.text,texttemplate:L.texttemplate,textposition:L.textposition,textfont:b.extendFlat({},L.textfont)};C.textfont&&b.extendFlat(I.textfont,C.textfont),P=f(E,I)}return P}function y(E,L,C){var P={capSize:2*L.width*C,lineWidth:L.thickness*C,color:L.color};return L.copy_ystyle&&(P=E.error_y),P}var h=i.SYMBOL_SDF_SIZE,m=i.SYMBOL_SIZE,w=i.SYMBOL_STROKE,u={},S=d.symbolFuncs[0](.05*m);function _(E,L){var C,P,I=E.mx;if("circle"===I)return null;var U=d.symbolNumber(I),z=d.symbolFuncs[U%100],H=!!d.symbolNoDot[U%100],F=!!d.symbolNoFill[U%100],N=n.isDotSymbol(I);if(E.ma&&(I+="_"+E.ma),u[I])return u[I];var B=d.getMarkerAngle(E,L);return C=N&&!H?z(1.1*m,B)+S:z(m,B),P=A(C,{w:h,h,viewBox:[-m,-m,m,m],stroke:F?w:-w}),u[I]=P,P||null}$.exports={style:function(E,L){var C,P={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=E._context.plotGlPixelRatio;if(!0!==L.visible)return P;if(o.hasText(L)&&(P.text=f(E,L),P.textSel=g(E,L,L.selected),P.textUnsel=g(E,L,L.unselected)),o.hasMarkers(L)&&(P.marker=x(0,L),P.markerSel=v(0,L,L.selected),P.markerUnsel=v(0,L,L.unselected),!L.unselected&&b.isArrayOrTypedArray(L.marker.opacity))){var U=L.marker.opacity;for(P.markerUnsel.opacity=new Array(U.length),C=0;C<U.length;C++)P.markerUnsel.opacity[C]=a*U[C]}if(o.hasLines(L)){P.line={overlay:!0,thickness:L.line.width*I,color:L.line.color,opacity:L.opacity};var z=(i.DASHES[L.line.dash]||[1]).slice();for(C=0;C<z.length;++C)z[C]*=L.line.width*I;P.line.dashes=z}return L.error_x&&L.error_x.visible&&(P.errorX=y(L,L.error_x,I)),L.error_y&&L.error_y.visible&&(P.errorY=y(L,L.error_y,I)),L.fill&&"none"!==L.fill&&(P.fill={closed:!0,fill:L.fillcolor,thickness:0}),P},markerStyle:x,markerSelection:v,linePositions:function(E,L,C){var P,I,U=C.length,z=U/2;if(o.hasLines(L)&&z)if("hv"===L.line.shape){for(P=[],I=0;I<z-1;I++)isNaN(C[2*I])||isNaN(C[2*I+1])?P.push(NaN,NaN,NaN,NaN):(P.push(C[2*I],C[2*I+1]),isNaN(C[2*I+2])||isNaN(C[2*I+3])?P.push(NaN,NaN):P.push(C[2*I+2],C[2*I+1]));P.push(C[U-2],C[U-1])}else if("hvh"===L.line.shape){for(P=[],I=0;I<z-1;I++)if(isNaN(C[2*I])||isNaN(C[2*I+1])||isNaN(C[2*I+2])||isNaN(C[2*I+3]))isNaN(C[2*I])||isNaN(C[2*I+1])?P.push(NaN,NaN):P.push(C[2*I],C[2*I+1]),P.push(NaN,NaN);else{var H=(C[2*I]+C[2*I+2])/2;P.push(C[2*I],C[2*I+1],H,C[2*I+1],H,C[2*I+3])}P.push(C[U-2],C[U-1])}else if("vhv"===L.line.shape){for(P=[],I=0;I<z-1;I++)if(isNaN(C[2*I])||isNaN(C[2*I+1])||isNaN(C[2*I+2])||isNaN(C[2*I+3]))isNaN(C[2*I])||isNaN(C[2*I+1])?P.push(NaN,NaN):P.push(C[2*I],C[2*I+1]),P.push(NaN,NaN);else{var F=(C[2*I+1]+C[2*I+3])/2;P.push(C[2*I],C[2*I+1],C[2*I],F,C[2*I+2],F)}P.push(C[U-2],C[U-1])}else if("vh"===L.line.shape){for(P=[],I=0;I<z-1;I++)isNaN(C[2*I])||isNaN(C[2*I+1])?P.push(NaN,NaN,NaN,NaN):(P.push(C[2*I],C[2*I+1]),isNaN(C[2*I+2])||isNaN(C[2*I+3])?P.push(NaN,NaN):P.push(C[2*I],C[2*I+3]));P.push(C[U-2],C[U-1])}else P=C;var N=!1;for(I=0;I<P.length;I++)if(isNaN(P[I])){N=!0;break}var B=N||P.length>i.TOO_MANY_POINTS||o.hasMarkers(L)?"rect":"round";if(N&&L.connectgaps){var j=P[0],J=P[1];for(I=0;I<P.length;I+=2)isNaN(P[I])||isNaN(P[I+1])?(P[I]=j,P[I+1]=J):(j=P[I],J=P[I+1])}return{join:B,positions:P}},errorBarPositions:function(E,L,C,P,I){var U=T.getComponentMethod("errorbars","makeComputeError"),z=s.getFromId(E,L.xaxis,"x"),H=s.getFromId(E,L.yaxis,"y"),F=C.length/2,N={};function B(j,J){var G=J._id.charAt(0),V=L["error_"+G];if(V&&V.visible&&("linear"===J.type||"log"===J.type)){for(var W=U(V),X={x:0,y:1}[G],K={x:[0,1,2,3],y:[2,3,0,1]}[G],re=new Float64Array(4*F),ee=1/0,ie=-1/0,oe=0,ce=0;oe<F;oe++,ce+=4){var me=j[oe];if(k(me)){var de=C[2*oe+X],he=W(me,oe),ve=he[0],Pe=he[1];if(k(ve)&&k(Pe)){var ke=me+Pe;re[ce+K[0]]=de-J.c2l(me-ve),re[ce+K[1]]=J.c2l(ke)-de,re[ce+K[2]]=0,re[ce+K[3]]=0,ee=Math.min(ee,me-ve),ie=Math.max(ie,me+Pe)}}}N[G]={positions:C,errors:re,_bnds:[ee,ie]}}}return B(P,z),B(I,H),N},textPosition:function(E,L,C,P){var I,U=L._length,z={};if(o.hasMarkers(L)){var H=C.font,F=C.align,N=C.baseline;for(z.offset=new Array(U),I=0;I<U;I++){var B=P.sizes?P.sizes[I]:P.size,j=Array.isArray(H)?H[I].size:H.size,J=Array.isArray(F)?F.length>1?F[I]:F[0]:F,G=Array.isArray(N)?N.length>1?N[I]:N[0]:N,W=c[G],X=B?B/.8+1:0;z.offset[I]=[c[J]*X/j,(-W*X-.5*W)/j]}}return z}}},47148:function($,R,e){"use strict";var k=e(71828),A=e(73972),l=e(68645),T=e(42341),b=e(47581),d=e(34098),s=e(67513),t=e(73927),o=e(49508),r=e(11058),n=e(28908),i=e(82410);$.exports=function(a,c,p,f){function x(S,_){return k.coerce(a,c,T,S,_)}var v=!!a.marker&&l.isOpenSymbol(a.marker.symbol),g=d.isBubble(a),y=s(a,c,f,x);if(y){t(a,c,f,x),x("xhoverformat"),x("yhoverformat");var h=y<b.PTS_LINESONLY?"lines+markers":"lines";x("text"),x("hovertext"),x("hovertemplate"),x("mode",h),d.hasLines(c)&&(x("connectgaps"),r(a,c,p,f,x),x("line.shape")),d.hasMarkers(c)&&(o(a,c,p,f,x,{noAngleRef:!0,noStandOff:!0}),x("marker.line.width",v||g?1:0)),d.hasText(c)&&(x("texttemplate"),i(a,c,f,x));var m=(c.line||{}).color,w=(c.marker||{}).color;x("fill"),"none"!==c.fill&&n(a,c,p,x);var u=A.getComponentMethod("errorbars","supplyDefaults");u(a,c,m||w||p,{axis:"y"}),u(a,c,m||w||p,{axis:"x",inherit:"y"}),k.coerceSelectionMarkerOpacity(c,x)}else c.visible=!1}},5345:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(37822).DESELECTDIM;$.exports={styleTextSelection:function(T){var b,d,s=T[0],t=s.trace,o=s.t,r=o._scene,n=o.index,i=r.selectBatch[n],a=r.unselectBatch[n],c=r.textOptions[n],p=r.textSelectedOptions[n]||{},f=r.textUnselectedOptions[n]||{},x=k.extendFlat({},c);if(i.length||a.length){var v=p.color,g=f.color,y=c.color,h=Array.isArray(y);for(x.color=new Array(t._length),b=0;b<i.length;b++)x.color[d=i[b]]=v||(h?y[d]:y);for(b=0;b<a.length;b++){d=a[b];var m=h?y[d]:y;x.color[d]=g||(v?m:A.addOpacity(m,l))}}r.glText[n].update(x)}}},68101:function($,R,e){"use strict";var k=e(8225);$.exports=function(A,l,T){var b=A.i;return"x"in A||(A.x=l._x[b]),"y"in A||(A.y=l._y[b]),k(A,l,T)}},68645:function($,R,e){"use strict";var k=e(78232);R.isOpenSymbol=function(A){return"string"==typeof A?k.OPEN_RE.test(A):A%200>100},R.isDotSymbol=function(A){return"string"==typeof A?k.DOT_RE.test(A):A>200}},20794:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(34603);function T(b,d,s,t){var o=b.xa,r=b.ya,n=b.distance,i=b.dxy,a=b.index,c={pointNumber:a,x:d[a],y:s[a]};c.tx=Array.isArray(t.text)?t.text[a]:t.text,c.htx=Array.isArray(t.hovertext)?t.hovertext[a]:t.hovertext,c.data=Array.isArray(t.customdata)?t.customdata[a]:t.customdata,c.tp=Array.isArray(t.textposition)?t.textposition[a]:t.textposition;var p=t.textfont;p&&(c.ts=A.isArrayOrTypedArray(p.size)?p.size[a]:p.size,c.tc=Array.isArray(p.color)?p.color[a]:p.color,c.tf=Array.isArray(p.family)?p.family[a]:p.family);var f=t.marker;f&&(c.ms=A.isArrayOrTypedArray(f.size)?f.size[a]:f.size,c.mo=A.isArrayOrTypedArray(f.opacity)?f.opacity[a]:f.opacity,c.mx=A.isArrayOrTypedArray(f.symbol)?f.symbol[a]:f.symbol,c.ma=A.isArrayOrTypedArray(f.angle)?f.angle[a]:f.angle,c.mc=A.isArrayOrTypedArray(f.color)?f.color[a]:f.color);var x=f&&f.line;x&&(c.mlc=Array.isArray(x.color)?x.color[a]:x.color,c.mlw=A.isArrayOrTypedArray(x.width)?x.width[a]:x.width);var v=f&&f.gradient;v&&"none"!==v.type&&(c.mgt=Array.isArray(v.type)?v.type[a]:v.type,c.mgc=Array.isArray(v.color)?v.color[a]:v.color);var g=o.c2p(c.x,!0),y=r.c2p(c.y,!0),h=c.mrc||1,m=t.hoverlabel;m&&(c.hbg=Array.isArray(m.bgcolor)?m.bgcolor[a]:m.bgcolor,c.hbc=Array.isArray(m.bordercolor)?m.bordercolor[a]:m.bordercolor,c.hts=A.isArrayOrTypedArray(m.font.size)?m.font.size[a]:m.font.size,c.htc=Array.isArray(m.font.color)?m.font.color[a]:m.font.color,c.htf=Array.isArray(m.font.family)?m.font.family[a]:m.font.family,c.hnl=A.isArrayOrTypedArray(m.namelength)?m.namelength[a]:m.namelength);var w=t.hoverinfo;w&&(c.hi=Array.isArray(w)?w[a]:w);var u=t.hovertemplate;u&&(c.ht=Array.isArray(u)?u[a]:u);var S={};S[b.index]=c;var _=t._origX,E=t._origY,L=A.extendFlat({},b,{color:l(t,c),x0:g-h,x1:g+h,xLabelVal:_?_[a]:c.x,y0:y-h,y1:y+h,yLabelVal:E?E[a]:c.y,cd:S,distance:n,spikeDistance:i,hovertemplate:c.ht});return c.htx?L.text=c.htx:c.tx?L.text=c.tx:t.text&&(L.text=t.text),A.fillText(c,t,L),k.getComponentMethod("errorbars","hoverInfo")(c,t,L),L}$.exports={hoverPoints:function(b,d,s,t){var o,r,n,i,a,c,p,f,x,v,g=b.cd,y=g[0].t,h=g[0].trace,m=b.xa,w=b.ya,u=y.x,S=y.y,_=m.c2p(d),E=w.c2p(s),L=b.distance;if(y.tree){var C=m.p2c(_-L),P=m.p2c(_+L),I=w.p2c(E-L),U=w.p2c(E+L);o="x"===t?y.tree.range(Math.min(C,P),Math.min(w._rl[0],w._rl[1]),Math.max(C,P),Math.max(w._rl[0],w._rl[1])):y.tree.range(Math.min(C,P),Math.min(I,U),Math.max(C,P),Math.max(I,U))}else o=y.ids;var z=L;if("x"===t){var H=!!h.xperiodalignment,F=!!h.yperiodalignment;for(c=0;c<o.length;c++){if(i=u[r=o[c]],p=Math.abs(m.c2p(i)-_),H){var N=m.c2p(h._xStarts[r]),B=m.c2p(h._xEnds[r]);p=_>=Math.min(N,B)&&_<=Math.max(N,B)?0:1/0}if(p<z){if(z=p,f=w.c2p(a=S[r])-E,F){var j=w.c2p(h._yStarts[r]),J=w.c2p(h._yEnds[r]);f=E>=Math.min(j,J)&&E<=Math.max(j,J)?0:1/0}v=Math.sqrt(p*p+f*f),n=o[c]}}}else for(c=o.length-1;c>-1;c--)i=u[r=o[c]],a=S[r],p=m.c2p(i)-_,f=w.c2p(a)-E,(x=Math.sqrt(p*p+f*f))<z&&(z=v=x,n=r);return b.index=n,b.distance=z,b.dxy=v,void 0===n?[b]:[T(b,u,S,h)]},calcHover:T}},68868:function($,R,e){"use strict";var k=e(72156);k.plot=e(26787),$.exports=k},26787:function($,R,e){"use strict";var k=e(11870),A=e(46075),l=e(3593),T=e(42505),b=e(71828),d=e(64505).selectMode,s=e(79749),t=e(34098),o=e(68687),r=e(5345).styleTextSelection,n={};function i(a,c,p,f){var x=a._size,u=x.w*f,S=x.h*f;return[x.l*f+c.domain[0]*u,x.b*f+p.domain[0]*S,a.width*f-x.r*f-(1-c.domain[1])*u,a.height*f-x.t*f-(1-p.domain[1])*S]}($.exports=function(a,c,p){if(p.length){var f,x,v=a._fullLayout,g=c._scene,y=c.xaxis,h=c.yaxis;if(g)if(s(a,["ANGLE_instanced_arrays","OES_element_index_uint"],n)){var m=g.count,w=v._glcanvas.data()[0].regl;if(o(a,c,p),g.dirty){if(!0===g.error2d&&(g.error2d=l(w)),!0===g.line2d&&(g.line2d=A(w)),!0===g.scatter2d&&(g.scatter2d=k(w)),!0===g.fill2d&&(g.fill2d=A(w)),!0===g.glText)for(g.glText=new Array(m),f=0;f<m;f++)g.glText[f]=new T(w);if(g.glText){if(m>g.glText.length){var u=m-g.glText.length;for(f=0;f<u;f++)g.glText.push(new T(w))}else m<g.glText.length&&g.glText.splice(m,g.glText.length-m).forEach(function(re){re.destroy()});for(f=0;f<m;f++)g.glText[f].update(g.textOptions[f])}if(g.line2d&&(g.line2d.update(g.lineOptions),g.lineOptions=g.lineOptions.map(function(re){if(re&&re.positions){for(var ee=re.positions,ie=0;ie<ee.length&&(isNaN(ee[ie])||isNaN(ee[ie+1]));)ie+=2;for(var oe=ee.length-2;oe>ie&&(isNaN(ee[oe])||isNaN(ee[oe+1]));)oe-=2;re.positions=ee.slice(ie,oe+2)}return re}),g.line2d.update(g.lineOptions)),g.error2d){var _=(g.errorXOptions||[]).concat(g.errorYOptions||[]);g.error2d.update(_)}g.scatter2d&&g.scatter2d.update(g.markerOptions),g.fillOrder=b.repeat(null,m),g.fill2d&&(g.fillOptions=g.fillOptions.map(function(re,ee){var ie=p[ee];if(re&&ie&&ie[0]&&ie[0].trace){var oe,ce,me=ie[0],de=me.trace,he=me.t,ve=g.lineOptions[ee],Pe=[];de._ownfill&&Pe.push(ee),de._nexttrace&&Pe.push(ee+1),Pe.length&&(g.fillOrder[ee]=Pe);var xe,ke,Ae=[],Te=ve&&ve.positions||he.positions;if("tozeroy"===de.fill){for(xe=0;xe<Te.length&&isNaN(Te[xe+1]);)xe+=2;for(ke=Te.length-2;ke>xe&&isNaN(Te[ke+1]);)ke-=2;0!==Te[xe+1]&&(Ae=[Te[xe],0]),Ae=Ae.concat(Te.slice(xe,ke+2)),0!==Te[ke+1]&&(Ae=Ae.concat([Te[ke],0]))}else if("tozerox"===de.fill){for(xe=0;xe<Te.length&&isNaN(Te[xe]);)xe+=2;for(ke=Te.length-2;ke>xe&&isNaN(Te[ke]);)ke-=2;0!==Te[xe]&&(Ae=[0,Te[xe+1]]),Ae=Ae.concat(Te.slice(xe,ke+2)),0!==Te[ke]&&(Ae=Ae.concat([0,Te[ke+1]]))}else if("toself"===de.fill||"tonext"===de.fill){for(Ae=[],oe=0,re.splitNull=!0,ce=0;ce<Te.length;ce+=2)(isNaN(Te[ce])||isNaN(Te[ce+1]))&&((Ae=Ae.concat(Te.slice(oe,ce))).push(Te[oe],Te[oe+1]),Ae.push(null,null),oe=ce+2);Ae=Ae.concat(Te.slice(oe)),oe&&Ae.push(Te[oe],Te[oe+1])}else{var Q=de._nexttrace;if(Q){var se=g.lineOptions[ee+1];if(se){var fe=se.positions;if("tonexty"===de.fill){for(Ae=Te.slice(),ee=Math.floor(fe.length/2);ee--;){var ye=fe[2*ee],Me=fe[2*ee+1];isNaN(ye)||isNaN(Me)||Ae.push(ye,Me)}re.fill=Q.fillcolor}}}}if(de._prevtrace&&"tonext"===de._prevtrace.fill){var Ie=g.lineOptions[ee-1].positions,Ce=Ae.length/2,Re=[oe=Ce];for(ce=0;ce<Ie.length;ce+=2)(isNaN(Ie[ce])||isNaN(Ie[ce+1]))&&(Re.push(ce/2+Ce+1),oe=ce+2);Ae=Ae.concat(Ie),re.hole=Re}return re.fillmode=de.fill,re.opacity=de.opacity,re.positions=Ae,re}}),g.fill2d.update(g.fillOptions))}var L=d(v.dragmode),C=v.clickmode.indexOf("select")>-1;for(f=0;f<m;f++){var P=p[f][0],I=P.trace,U=P.t,z=U.index,H=I._length,F=U.x,N=U.y;if(I.selectedpoints||L||C){if(L||(L=!0),I.selectedpoints){var B=g.selectBatch[z]=b.selIndices2selPoints(I),j={};for(x=0;x<B.length;x++)j[B[x]]=1;var J=[];for(x=0;x<H;x++)j[x]||J.push(x);g.unselectBatch[z]=J}var G=U.xpx=new Array(H),V=U.ypx=new Array(H);for(x=0;x<H;x++)G[x]=y.c2p(F[x]),V[x]=h.c2p(N[x])}else U.xpx=U.ypx=null}if(L){if(g.select2d||(g.select2d=k(v._glcanvas.data()[1].regl)),g.scatter2d){var W=new Array(m);for(f=0;f<m;f++)W[f]=g.selectBatch[f].length||g.unselectBatch[f].length?g.markerUnselectedOptions[f]:{};g.scatter2d.update(W)}g.select2d&&(g.select2d.update(g.markerOptions),g.select2d.update(g.markerSelectedOptions)),g.glText&&p.forEach(function(re){t.hasText(((re||[])[0]||{}).trace||{})&&r(re)})}else g.scatter2d&&g.scatter2d.update(g.markerOptions);var X={viewport:i(v,y,h,a._context.plotGlPixelRatio),range:[(y._rl||y.range)[0],(h._rl||h.range)[0],(y._rl||y.range)[1],(h._rl||h.range)[1]]},K=b.repeat(X,g.count);g.fill2d&&g.fill2d.update(K),g.line2d&&g.line2d.update(K),g.error2d&&g.error2d.update(K.concat(K)),g.scatter2d&&g.scatter2d.update(K),g.select2d&&g.select2d.update(K),g.glText&&g.glText.forEach(function(re){re.update(X)})}else g.init()}}).reglPrecompiled=n},38967:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l){var T=l._scene,b={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},d={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return l._scene||((T=l._scene={}).init=function(){k.extendFlat(T,d,b)},T.init(),T.update=function(s){var t=k.repeat(s,T.count);if(T.fill2d&&T.fill2d.update(t),T.scatter2d&&T.scatter2d.update(t),T.line2d&&T.line2d.update(t),T.error2d&&T.error2d.update(t.concat(t)),T.select2d&&T.select2d.update(t),T.glText)for(var o=0;o<T.count;o++)T.glText[o].update(s)},T.draw=function(){for(var s=T.count,t=T.fill2d,o=T.error2d,r=T.line2d,n=T.scatter2d,i=T.glText,a=T.select2d,c=T.selectBatch,p=T.unselectBatch,f=0;f<s;f++){if(t&&T.fillOrder[f]&&t.draw(T.fillOrder[f]),r&&T.lineOptions[f]&&r.draw(f),o&&(T.errorXOptions[f]&&o.draw(f),T.errorYOptions[f]&&o.draw(f+s)),n&&T.markerOptions[f])if(p[f].length){var x=k.repeat([],T.count);x[f]=p[f],n.draw(x)}else c[f].length||n.draw(f);i[f]&&T.textOptions[f]&&i[f].render()}a&&a.draw(c),T.dirty=!1},T.destroy=function(){T.fill2d&&T.fill2d.destroy&&T.fill2d.destroy(),T.scatter2d&&T.scatter2d.destroy&&T.scatter2d.destroy(),T.error2d&&T.error2d.destroy&&T.error2d.destroy(),T.line2d&&T.line2d.destroy&&T.line2d.destroy(),T.select2d&&T.select2d.destroy&&T.select2d.destroy(),T.glText&&T.glText.forEach(function(s){s.destroy&&s.destroy()}),T.lineOptions=null,T.fillOptions=null,T.markerOptions=null,T.markerSelectedOptions=null,T.markerUnselectedOptions=null,T.errorXOptions=null,T.errorYOptions=null,T.textOptions=null,T.textSelectedOptions=null,T.textUnselectedOptions=null,T.selectBatch=null,T.unselectBatch=null,l._scene=null}),T.dirty||k.extendFlat(T,b),T}},58147:function($,R,e){"use strict";var k=e(34098),A=e(5345).styleTextSelection;$.exports=function(l,T){var b=l.cd,d=l.xaxis,s=l.yaxis,t=[],o=b[0].trace,r=b[0].t,n=o._length,i=r.x,a=r.y,c=r._scene,p=r.index;if(!c)return t;var f=k.hasText(o),x=k.hasMarkers(o);if(!0!==o.visible||!x&&!f)return t;var g=[],y=[];if(!1!==T&&!T.degenerate)for(var h=0;h<n;h++)T.contains([r.xpx[h],r.ypx[h]],!1,h,l)?(g.push(h),t.push({pointNumber:h,x:d.c2d(i[h]),y:s.c2d(a[h])})):y.push(h);if(x){var m=c.scatter2d;if(g.length||y.length){if(!c.selectBatch[p].length&&!c.unselectBatch[p].length){var w=new Array(c.count);w[p]=c.markerUnselectedOptions[p],m.update.apply(m,w)}}else{var u=new Array(c.count);u[p]=c.markerOptions[p],m.update.apply(m,u)}}return c.selectBatch[p]=g,c.unselectBatch[p]=y,f&&A(b),t}},99181:function($,R,e){"use strict";var k=e(5386).f,A=e(5386).s,l=e(19316),T=e(82196),b=e(23585),d=e(9012),s=e(50693),t=e(1426).extendFlat,o=e(30962).overrideAll,r=e(23585),n=l.line,i=l.marker;$.exports=o({lon:l.lon,lat:l.lat,cluster:{enabled:{valType:"boolean"},maxzoom:t({},r.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:t({},i.opacity,{dflt:1})},mode:t({},T.mode,{dflt:"markers"}),text:t({},T.text,{}),texttemplate:A({editType:"plot"},{keys:["lat","lon","text"]}),hovertext:t({},T.hovertext,{}),line:{color:n.color,width:n.width},connectgaps:T.connectgaps,marker:t({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:i.opacity,size:i.size,sizeref:i.sizeref,sizemin:i.sizemin,sizemode:i.sizemode},s("marker")),fill:l.fill,fillcolor:T.fillcolor,textfont:b.layers.symbol.textfont,textposition:b.layers.symbol.textposition,below:{valType:"string"},selected:{marker:T.selected.marker},unselected:{marker:T.unselected.marker},hoverinfo:t({},d.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:k()},"calc","nested")},15790:function($,R,e){"use strict";var k=e(92770),A=e(71828),l=e(50606).BADNUM,T=e(18214),b=e(21081),d=e(91424),s=e(39984),t=e(34098),o=e(13056),r=e(23469).appendArrayPointValue,n=e(63893).NEWLINES,i=e(63893).BR_TAG_ALL;function a(v){return{type:v,geojson:T.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function c(v,g){return A.isArrayOrTypedArray(v)?g?function(y){return k(v[y])?+v[y]:0}:function(y){return v[y]}:v?function(){return v}:p}function p(){return""}function f(v){return v[0]===l}function x(v,g){var y;if(A.isArrayOrTypedArray(v)&&A.isArrayOrTypedArray(g)){y=["step",["get","point_count"],v[0]];for(var h=1;h<v.length;h++)y.push(g[h-1],v[h])}else y=v;return y}$.exports=function(v,g){var y,h=g[0].trace,m=!0===h.visible&&0!==h._length,w="none"!==h.fill,u=t.hasLines(h),S=t.hasMarkers(h),_=t.hasText(h),E=S&&"circle"===h.marker.symbol,L=S&&"circle"!==h.marker.symbol,C=h.cluster&&h.cluster.enabled,P=a("fill"),I=a("line"),U=a("circle"),z=a("symbol"),H={fill:P,line:I,circle:U,symbol:z};if(!m)return H;if((w||u)&&(y=T.calcTraceToLineCoords(g)),w&&(P.geojson=T.makePolygon(y),P.layout.visibility="visible",A.extendFlat(P.paint,{"fill-color":h.fillcolor})),u&&(I.geojson=T.makeLine(y),I.layout.visibility="visible",A.extendFlat(I.paint,{"line-width":h.line.width,"line-color":h.line.color,"line-opacity":h.opacity})),E){var F=function(j){var J,G,V,W,X=j[0].trace,K=X.marker,re=X.selectedpoints,ee=A.isArrayOrTypedArray(K.color),ie=A.isArrayOrTypedArray(K.size),oe=A.isArrayOrTypedArray(K.opacity);function ce(Ae){return X.opacity*Ae}ee&&(G=b.hasColorscale(X,"marker")?b.makeColorScaleFuncFromTrace(K):A.identity),ie&&(V=s(X)),oe&&(W=function(Ae){return ce(k(Ae)?+A.constrain(Ae,0,1):0)});var me,de,he=[];for(J=0;J<j.length;J++){var ve=j[J],Pe=ve.lonlat;if(!f(Pe)){var xe={};G&&(xe.mcc=ve.mcc=G(ve.mc)),V&&(xe.mrc=ve.mrc=V(ve.ms)),W&&(xe.mo=W(ve.mo)),re&&(xe.selected=ve.selected||0),he.push({type:"Feature",id:J+1,geometry:{type:"Point",coordinates:Pe},properties:xe})}}if(re)for(me=d.makeSelectedPointStyleFns(X),J=0;J<he.length;J++){var ke=he[J].properties;me.selectedOpacityFn&&(ke.mo=ce(me.selectedOpacityFn(ke))),me.selectedColorFn&&(ke.mcc=me.selectedColorFn(ke)),me.selectedSizeFn&&(ke.mrc=me.selectedSizeFn(ke))}return{geojson:{type:"FeatureCollection",features:he},mcc:ee||me&&me.selectedColorFn?{type:"identity",property:"mcc"}:K.color,mrc:ie||me&&me.selectedSizeFn?{type:"identity",property:"mrc"}:(de=K.size,de/2),mo:oe||me&&me.selectedOpacityFn?{type:"identity",property:"mo"}:ce(K.opacity)}}(g);U.geojson=F.geojson,U.layout.visibility="visible",C&&(U.filter=["!",["has","point_count"]],H.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":x(h.cluster.color,h.cluster.step),"circle-radius":x(h.cluster.size,h.cluster.step),"circle-opacity":x(h.cluster.opacity,h.cluster.step)}},H.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":["Open Sans Regular","Arial Unicode MS Regular"],"text-size":12}}),A.extendFlat(U.paint,{"circle-color":F.mcc,"circle-radius":F.mrc,"circle-opacity":F.mo})}if(E&&C&&(U.filter=["!",["has","point_count"]]),(L||_)&&(z.geojson=function(j,J){for(var G=J._fullLayout,V=j[0].trace,W=V.marker||{},X=W.symbol,K=W.angle,re="circle"!==X?c(X):p,ee="auto"!==K?c(K,!0):p,ie=t.hasText(V)?c(V.text):p,oe=[],ce=0;ce<j.length;ce++){var me=j[ce];if(!f(me.lonlat)){var de,he=V.texttemplate;if(he){var ve=Array.isArray(he)?he[ce]||"":he,Pe=V._module.formatLabels(me,V,G),xe={};r(xe,V,me.i),de=A.texttemplateString(ve,Pe,G._d3locale,xe,me,V._meta||{})}else de=ie(ce);de&&(de=de.replace(n,"").replace(i,"\n")),oe.push({type:"Feature",geometry:{type:"Point",coordinates:me.lonlat},properties:{symbol:re(ce),angle:ee(ce),text:de}})}}return{type:"FeatureCollection",features:oe}}(g,v),A.extendFlat(z.layout,{visibility:"visible","icon-image":"{symbol}-15","text-field":"{text}"}),L&&(A.extendFlat(z.layout,{"icon-size":h.marker.size/10}),"angle"in h.marker&&"auto"!==h.marker.angle&&A.extendFlat(z.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),z.layout["icon-allow-overlap"]=h.marker.allowoverlap,A.extendFlat(z.paint,{"icon-opacity":h.opacity*h.marker.opacity,"icon-color":h.marker.color})),_)){var B=o(h.textposition,(h.marker||{}).size);A.extendFlat(z.layout,{"text-size":h.textfont.size,"text-anchor":B.anchor,"text-offset":B.offset}),A.extendFlat(z.paint,{"text-color":h.textfont.color,"text-opacity":h.opacity})}return H}},76645:function($,R,e){"use strict";var k=e(71828),A=e(34098),l=e(49508),T=e(11058),b=e(82410),d=e(28908),s=e(99181);$.exports=function(t,o,r,n){function i(h,m){return k.coerce(t,o,s,h,m)}function a(h,m){return k.coerce2(t,o,s,h,m)}var m,w,u,S,_;if(m=o,u=(w=i)("lon")||[],S=w("lat")||[],_=Math.min(u.length,S.length),m._length=_,_){if(i("text"),i("texttemplate"),i("hovertext"),i("hovertemplate"),i("mode"),i("below"),A.hasLines(o)&&(T(t,o,r,n,i,{noDash:!0}),i("connectgaps")),A.hasMarkers(o)){l(t,o,r,n,i,{noLine:!0,noAngle:!0}),i("marker.allowoverlap"),i("marker.angle");var p=o.marker;"circle"!==p.symbol&&(k.isArrayOrTypedArray(p.size)&&(p.size=p.size[0]),k.isArrayOrTypedArray(p.color)&&(p.color=p.color[0]))}var f=a("cluster.maxzoom"),x=a("cluster.step"),v=a("cluster.color",o.marker&&o.marker.color||r),g=a("cluster.size"),y=a("cluster.opacity");i("cluster.enabled",!1!==f||!1!==x||!1!==v||!1!==g||!1!==y),A.hasText(o)&&b(t,o,n,i,{noSelect:!0}),i("fill"),"none"!==o.fill&&d(t,o,r,i),k.coerceSelectionMarkerOpacity(o,i)}else o.visible=!1}},53353:function($){"use strict";$.exports=function(R,e){return R.lon=e.lon,R.lat=e.lat,R}},15636:function($,R,e){"use strict";var k=e(89298);$.exports=function(A,l,T){var b={},d=T[l.subplot]._subplot.mockAxis,s=A.lonlat;return b.lonLabel=k.tickText(d,d.c2l(s[0]),!0).text,b.latLabel=k.tickText(d,d.c2l(s[1]),!0).text,b}},28178:function($,R,e){"use strict";var k=e(30211),A=e(71828),l=e(34603),T=A.fillText,b=e(50606).BADNUM,d=e(77734).traceLayerPrefix;function s(t,o,r){if(!t.hovertemplate){var n=(o.hi||t.hoverinfo).split("+"),i=-1!==n.indexOf("all"),a=-1!==n.indexOf("lon"),c=-1!==n.indexOf("lat"),p=o.lonlat,f=[];return i||a&&c?f.push("("+x(p[1])+", "+x(p[0])+")"):a?f.push(r.lon+x(p[0])):c&&f.push(r.lat+x(p[1])),(i||-1!==n.indexOf("text"))&&T(o,t,f),f.join("<br>")}function x(v){return v+"\xb0"}}$.exports={hoverPoints:function(t,o,r){var n=t.cd,i=n[0].trace,a=t.xa,c=t.ya,p=t.subplot,f=[],v=i.cluster&&i.cluster.enabled;if(v){var g=p.map.queryRenderedFeatures(null,{layers:[d+i.uid+"-circle"]});f=g.map(function(P){return P.id})}var y=360*(o>=0?Math.floor((o+180)/360):Math.ceil((o-180)/360)),h=o-y;if(k.getClosest(n,function(P){var I=P.lonlat;if(I[0]===b||v&&-1===f.indexOf(P.i+1))return 1/0;var U=A.modHalf(I[0],360),z=I[1],H=p.project([U,z]),F=H.x-a.c2p([h,z]),N=H.y-c.c2p([U,r]),B=Math.max(3,P.mrc||0);return Math.max(Math.sqrt(F*F+N*N)-B,1-3/B)},t),!1!==t.index){var m=n[t.index],w=m.lonlat,u=[A.modHalf(w[0],360)+y,w[1]],S=a.c2p(u),_=c.c2p(u),E=m.mrc||1;t.x0=S-E,t.x1=S+E,t.y0=_-E,t.y1=_+E;var L={};L[i.subplot]={_subplot:p};var C=i._module.formatLabels(m,i,L);return t.lonLabel=C.lonLabel,t.latLabel=C.latLabel,t.color=l(i,m),t.extraText=s(i,m,n[0].t.labels),t.hovertemplate=i.hovertemplate,[t]}},getExtraText:s}},20467:function($,R,e){"use strict";$.exports={attributes:e(99181),supplyDefaults:e(76645),colorbar:e(4898),formatLabels:e(15636),calc:e(84622),plot:e(86951),hoverPoints:e(28178).hoverPoints,eventData:e(53353),selectPoints:e(86387),styleOnSelect:function(k,A){A&&A[0].trace._glTrace.update(A)},moduleType:"trace",name:"scattermapbox",basePlotModule:e(50101),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},86951:function($,R,e){"use strict";var k=e(71828),A=e(15790),l=e(77734).traceLayerPrefix,T={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function b(s,t,o,r){this.type="scattermapbox",this.subplot=s,this.uid=t,this.clusterEnabled=o,this.isHidden=r,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:l+t+"-fill",line:l+t+"-line",circle:l+t+"-circle",symbol:l+t+"-symbol",cluster:l+t+"-cluster",clusterCount:l+t+"-cluster-count"},this.below=null}var d=b.prototype;d.addSource=function(s,t,o){var r={type:"geojson",data:t.geojson};o&&o.enabled&&k.extendFlat(r,{cluster:!0,clusterMaxZoom:o.maxzoom}),this.subplot.map.addSource(this.sourceIds[s],r)},d.setSourceData=function(s,t){this.subplot.map.getSource(this.sourceIds[s]).setData(t.geojson)},d.addLayer=function(s,t,o){var r={type:t.type,id:this.layerIds[s],source:this.sourceIds[s],layout:t.layout,paint:t.paint};t.filter&&(r.filter=t.filter),this.subplot.addLayer(r,o)},d.update=function(s){var t=s[0].trace,o=this.subplot,r=o.map,n=A(o.gd,s),i=o.belowLookup["trace-"+this.uid],a=!(!t.cluster||!t.cluster.enabled),c=!!this.clusterEnabled,p=this;function f(h){c?function(m){for(var w=T.cluster,u=w.length-1;u>=0;u--)r.removeLayer(p.layerIds[w[u]]);m||r.removeSource(p.sourceIds.circle)}(h):function(m){for(var w=T.nonCluster,u=w.length-1;u>=0;u--){var S=w[u];r.removeLayer(p.layerIds[S]),m||r.removeSource(p.sourceIds[S])}}(h)}function x(h){a?function(m){m||p.addSource("circle",n.circle,t.cluster);for(var w=T.cluster,u=0;u<w.length;u++){var S=w[u];p.addLayer(S,n[S],i)}}(h):function(m){for(var w=T.nonCluster,u=0;u<w.length;u++){var S=w[u],_=n[S];m||p.addSource(S,_),p.addLayer(S,_,i)}}(h)}var g=this.isHidden,y=!0!==t.visible;y?g||f():g?y||x():c!==a?(f(),x()):(this.below!==i&&(f(!0),x(!0)),function v(){for(var h=a?T.cluster:T.nonCluster,m=0;m<h.length;m++){var w=h[m],u=n[w];u&&(o.setOptions(p.layerIds[w],"setLayoutProperty",u.layout),"visible"===u.layout.visibility&&("cluster"!==w&&p.setSourceData(w,u),o.setOptions(p.layerIds[w],"setPaintProperty",u.paint)))}}()),this.clusterEnabled=a,this.isHidden=y,this.below=i,s[0].trace._glTrace=this},d.dispose=function(){for(var s=this.subplot.map,t=this.clusterEnabled?T.cluster:T.nonCluster,o=t.length-1;o>=0;o--){var r=t[o];s.removeLayer(this.layerIds[r]),s.removeSource(this.sourceIds[r])}},$.exports=function(s,t){var o,r,n,i=t[0].trace,a=i.cluster&&i.cluster.enabled,p=new b(s,i.uid,a,!0!==i.visible),f=A(s.gd,t),x=p.below=s.belowLookup["trace-"+i.uid];if(a)for(p.addSource("circle",f.circle,i.cluster),o=0;o<T.cluster.length;o++)n=f[r=T.cluster[o]],p.addLayer(r,n,x);else for(o=0;o<T.nonCluster.length;o++)n=f[r=T.nonCluster[o]],p.addSource(r,n,i.cluster),p.addLayer(r,n,x);return t[0].trace._glTrace=p,p}},86387:function($,R,e){"use strict";var k=e(71828),A=e(34098),l=e(50606).BADNUM;$.exports=function(T,b){var d,s=T.cd,t=T.xaxis,o=T.yaxis,r=[];if(!A.hasMarkers(s[0].trace))return[];if(!1===b)for(d=0;d<s.length;d++)s[d].selected=0;else for(d=0;d<s.length;d++){var i=s[d],a=i.lonlat;if(a[0]!==l){var c=[k.modHalf(a[0],360),a[1]],p=[t.c2p(c),o.c2p(c)];b.contains(p,null,d,T)?(r.push({pointNumber:d,lon:a[0],lat:a[1]}),i.selected=1):i.selected=0}}return r}},81245:function($,R,e){"use strict";var k=e(5386).f,A=e(5386).s,l=e(1426).extendFlat,T=e(82196),b=e(9012),d=T.line;$.exports={mode:T.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:T.text,texttemplate:A({editType:"plot"},{keys:["r","theta","text"]}),hovertext:T.hovertext,line:{color:d.color,width:d.width,dash:d.dash,backoff:d.backoff,shape:l({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:T.connectgaps,marker:T.marker,cliponaxis:l({},T.cliponaxis,{dflt:!1}),textposition:T.textposition,textfont:T.textfont,fill:l({},T.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:T.fillcolor,hoverinfo:l({},b.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:T.hoveron,hovertemplate:k(),selected:T.selected,unselected:T.unselected}},26442:function($,R,e){"use strict";var k=e(92770),A=e(50606).BADNUM,l=e(89298),T=e(36922),b=e(75225),d=e(66279),s=e(47761).calcMarkerSize;$.exports=function(t,o){for(var r=t._fullLayout,n=o.subplot,i=r[n].radialaxis,a=r[n].angularaxis,c=i.makeCalcdata(o,"r"),p=a.makeCalcdata(o,"theta"),f=o._length,x=new Array(f),v=0;v<f;v++){var g=c[v],y=p[v],h=x[v]={};k(g)&&k(y)?(h.r=g,h.theta=y):h.r=A}var m=s(o,f);return o._extremes.x=l.findExtremes(i,c,{ppad:m}),T(t,o),b(x,o),d(x,o),x}},22184:function($,R,e){"use strict";var k=e(71828),A=e(34098),l=e(49508),T=e(11058),b=e(94039),d=e(82410),s=e(28908),t=e(47581).PTS_LINESONLY,o=e(81245);function r(n,i,a,c){var p,f=c("r"),x=c("theta");if(f)x?p=Math.min(f.length,x.length):(p=f.length,c("theta0"),c("dtheta"));else{if(!x)return 0;p=i.theta.length,c("r0"),c("dr")}return i._length=p,p}$.exports={handleRThetaDefaults:r,supplyDefaults:function(n,i,a,c){function p(v,g){return k.coerce(n,i,o,v,g)}var f=r(0,i,0,p);if(f){p("thetaunit"),p("mode",f<t?"lines+markers":"lines"),p("text"),p("hovertext"),"fills"!==i.hoveron&&p("hovertemplate"),A.hasLines(i)&&(T(n,i,a,c,p,{backoff:!0}),b(n,i,p),p("connectgaps")),A.hasMarkers(i)&&l(n,i,a,c,p,{gradient:!0}),A.hasText(i)&&(p("texttemplate"),d(n,i,c,p));var x=[];(A.hasMarkers(i)||A.hasText(i))&&(p("cliponaxis"),p("marker.maxdisplayed"),x.push("points")),p("fill"),"none"!==i.fill&&(s(n,i,a,p),A.hasLines(i)||b(n,i,p)),"tonext"!==i.fill&&"toself"!==i.fill||x.push("fills"),p("hoveron",x.join("+")||"points"),k.coerceSelectionMarkerOpacity(i,p)}else i.visible=!1}}},98608:function($,R,e){"use strict";var k=e(71828),A=e(89298);$.exports=function(l,T,b){var d,s,t={},o=b[T.subplot]._subplot;o?(d=o.radialAxis,s=o.angularAxis):(d=(o=b[T.subplot]).radialaxis,s=o.angularaxis);var r=d.c2l(l.r);t.rLabel=A.tickText(d,r,!0).text;var n="degrees"===s.thetaunit?k.rad2deg(l.theta):l.theta;return t.thetaLabel=A.tickText(s,n,!0).text,t}},59150:function($,R,e){"use strict";var k=e(33720);function A(l,T,b,d){var s=b.radialAxis,t=b.angularAxis;s._hovertitle="r",t._hovertitle="\u03b8";var o={};o[T.subplot]={_subplot:b};var r=T._module.formatLabels(l,T,o);d.rLabel=r.rLabel,d.thetaLabel=r.thetaLabel;var i=[];function a(p,f){i.push(p._hovertitle+": "+f)}if(!T.hovertemplate){var c=(l.hi||T.hoverinfo).split("+");-1!==c.indexOf("all")&&(c=["r","theta","text"]),-1!==c.indexOf("r")&&a(s,d.rLabel),-1!==c.indexOf("theta")&&a(t,d.thetaLabel),-1!==c.indexOf("text")&&d.text&&(i.push(d.text),delete d.text),d.extraText=i.join("<br>")}}$.exports={hoverPoints:function(l,T,b,d){var s=k(l,T,b,d);if(s&&!1!==s[0].index){var t=s[0];if(void 0===t.index)return s;var o=l.subplot,r=t.cd[t.index],n=t.trace;if(o.isPtInside(r))return t.xLabelVal=void 0,t.yLabelVal=void 0,A(r,n,o,t),t.hovertemplate=n.hovertemplate,s}},makeHoverPointText:A}},91271:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e(23580),categories:["polar","symbols","showLegend","scatter-like"],attributes:e(81245),supplyDefaults:e(22184).supplyDefaults,colorbar:e(4898),formatLabels:e(98608),calc:e(26442),plot:e(45162),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(59150).hoverPoints,selectPoints:e(98002),meta:{}}},45162:function($,R,e){"use strict";var k=e(32663),A=e(50606).BADNUM;$.exports=function(l,T,b){for(var d=T.layers.frontplot.select("g.scatterlayer"),s=T.xaxis,t=T.yaxis,o={xaxis:s,yaxis:t,plot:T.framework,layerClipId:T._hasClipOnAxisFalse?T.clipIds.forTraces:null},r=T.radialAxis,n=T.angularAxis,i=0;i<b.length;i++)for(var a=b[i],c=0;c<a.length;c++){0===c&&(a[0].trace._xA=s,a[0].trace._yA=t);var p=a[c],f=p.r;if(f===A)p.x=p.y=A;else{var x=r.c2g(f),v=n.c2g(p.theta);p.x=x*Math.cos(v),p.y=x*Math.sin(v)}}k(l,o,b,d)}},53286:function($,R,e){"use strict";var k=e(81245),A=e(42341),l=e(5386).s;$.exports={mode:k.mode,r:k.r,theta:k.theta,r0:k.r0,dr:k.dr,theta0:k.theta0,dtheta:k.dtheta,thetaunit:k.thetaunit,text:k.text,texttemplate:l({editType:"plot"},{keys:["r","theta","text"]}),hovertext:k.hovertext,hovertemplate:k.hovertemplate,line:A.line,connectgaps:A.connectgaps,marker:A.marker,fill:A.fill,fillcolor:A.fillcolor,textposition:A.textposition,textfont:A.textfont,hoverinfo:k.hoverinfo,selected:k.selected,unselected:k.unselected}},65746:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:e(23580),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:e(53286),supplyDefaults:e(75485),colorbar:e(4898),formatLabels:e(46255),calc:e(37499),hoverPoints:e(29347).hoverPoints,selectPoints:e(58147),meta:{}}},37499:function($,R,e){"use strict";var k=e(36922),A=e(47761).calcMarkerSize,l=e(19635),T=e(89298),b=e(78232).TOO_MANY_POINTS;$.exports=function(d,s){var t=d._fullLayout,o=s.subplot,r=t[o].radialaxis,n=t[o].angularaxis,i=s._r=r.makeCalcdata(s,"r"),a=s._theta=n.makeCalcdata(s,"theta"),c=s._length,p={};c<i.length&&(i=i.slice(0,c)),c<a.length&&(a=a.slice(0,c)),p.r=i,p.theta=a,k(d,s);var f,x=p.opts=l.style(d,s);return c<b?f=A(s,c):x.marker&&(f=2*(x.marker.sizeAvg||Math.max(x.marker.size,3))),s._extremes.x=T.findExtremes(r,i,{ppad:f}),[{x:!1,y:!1,t:p,trace:s}]}},75485:function($,R,e){"use strict";var k=e(71828),A=e(34098),l=e(22184).handleRThetaDefaults,T=e(49508),b=e(11058),d=e(82410),s=e(28908),t=e(47581).PTS_LINESONLY,o=e(53286);$.exports=function(r,n,i,a){function c(f,x){return k.coerce(r,n,o,f,x)}var p=l(r,n,a,c);p?(c("thetaunit"),c("mode",p<t?"lines+markers":"lines"),c("text"),c("hovertext"),"fills"!==n.hoveron&&c("hovertemplate"),A.hasLines(n)&&(b(r,n,i,a,c),c("connectgaps")),A.hasMarkers(n)&&T(r,n,i,a,c,{noAngleRef:!0,noStandOff:!0}),A.hasText(n)&&(c("texttemplate"),d(r,n,a,c)),c("fill"),"none"!==n.fill&&s(r,n,i,c),k.coerceSelectionMarkerOpacity(n,c)):n.visible=!1}},46255:function($,R,e){"use strict";var k=e(98608);$.exports=function(A,l,T){var b=A.i;return"r"in A||(A.r=l._r[b]),"theta"in A||(A.theta=l._theta[b]),k(A,l,T)}},29347:function($,R,e){"use strict";var k=e(20794),A=e(59150).makeHoverPointText;$.exports={hoverPoints:function(l,T,b,d){var s=l.cd[0].t,t=s.r,o=s.theta,r=k.hoverPoints(l,T,b,d);if(r&&!1!==r[0].index){var n=r[0];if(void 0===n.index)return r;var i=l.subplot,a=n.cd[n.index],c=n.trace;if(a.r=t[n.index],a.theta=o[n.index],i.isPtInside(a))return n.xLabelVal=void 0,n.yLabelVal=void 0,A(a,c,i,n),r}}}},21461:function($,R,e){"use strict";var k=e(65746);k.plot=e(49741),$.exports=k},49741:function($,R,e){"use strict";var k=e(88294),A=e(92770),l=e(26787),T=e(38967),b=e(19635),d=e(71828),s=e(78232).TOO_MANY_POINTS;$.exports=function(t,o,r){if(r.length){var n=o.radialAxis,i=o.angularAxis,a=T(t,o);return r.forEach(function(c){if(c&&c[0]&&c[0].trace){var p,f=c[0],x=f.trace,v=f.t,g=x._length,y=v.r,h=v.theta,m=v.opts,w=y.slice(),u=h.slice();for(p=0;p<y.length;p++)o.isPtInside({r:y[p],theta:h[p]})||(w[p]=NaN,u[p]=NaN);var S=new Array(2*g),_=Array(g),E=Array(g);for(p=0;p<g;p++){var L,C,P=w[p];if(A(P)){var I=n.c2g(P),U=i.c2g(u[p],x.thetaunit);L=I*Math.cos(U),C=I*Math.sin(U)}else L=C=NaN;_[p]=S[2*p]=L,E[p]=S[2*p+1]=C}v.tree=k(S),m.marker&&g>=s&&(m.marker.cluster=v.tree),m.marker&&(m.markerSel.positions=m.markerUnsel.positions=m.marker.positions=S),m.line&&S.length>1&&d.extendFlat(m.line,b.linePositions(t,x,S)),m.text&&(d.extendFlat(m.text,{positions:S},b.textPosition(t,x,m.text,m.marker)),d.extendFlat(m.textSel,{positions:S},b.textPosition(t,x,m.text,m.markerSel)),d.extendFlat(m.textUnsel,{positions:S},b.textPosition(t,x,m.text,m.markerUnsel))),m.fill&&!a.fill2d&&(a.fill2d=!0),m.marker&&!a.scatter2d&&(a.scatter2d=!0),m.line&&!a.line2d&&(a.line2d=!0),m.text&&!a.glText&&(a.glText=!0),a.lineOptions.push(m.line),a.fillOptions.push(m.fill),a.markerOptions.push(m.marker),a.markerSelectedOptions.push(m.markerSel),a.markerUnselectedOptions.push(m.markerUnsel),a.textOptions.push(m.text),a.textSelectedOptions.push(m.textSel),a.textUnselectedOptions.push(m.textUnsel),a.selectBatch.push([]),a.unselectBatch.push([]),v.x=_,v.y=E,v.rawx=_,v.rawy=E,v.r=y,v.theta=h,v.positions=S,v._scene=a,v.index=a.count,a.count++}}),l(t,o,r)}},$.exports.reglPrecompiled={}},48300:function($,R,e){"use strict";var k=e(5386).f,A=e(5386).s,l=e(1426).extendFlat,T=e(82196),b=e(9012),d=T.line;$.exports={mode:T.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:T.text,texttemplate:A({editType:"plot"},{keys:["real","imag","text"]}),hovertext:T.hovertext,line:{color:d.color,width:d.width,dash:d.dash,backoff:d.backoff,shape:l({},d.shape,{values:["linear","spline"]}),smoothing:d.smoothing,editType:"calc"},connectgaps:T.connectgaps,marker:T.marker,cliponaxis:l({},T.cliponaxis,{dflt:!1}),textposition:T.textposition,textfont:T.textfont,fill:l({},T.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:T.fillcolor,hoverinfo:l({},b.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:T.hoveron,hovertemplate:k(),selected:T.selected,unselected:T.unselected}},30621:function($,R,e){"use strict";var k=e(92770),A=e(50606).BADNUM,l=e(36922),T=e(75225),b=e(66279),d=e(47761).calcMarkerSize;$.exports=function(s,t){for(var o=s._fullLayout,r=t.subplot,i=o[r].imaginaryaxis,a=o[r].realaxis.makeCalcdata(t,"real"),c=i.makeCalcdata(t,"imag"),p=t._length,f=new Array(p),x=0;x<p;x++){var v=a[x],g=c[x],y=f[x]={};k(v)&&k(g)?(y.real=v,y.imag=g):y.real=A}return d(t,p),l(s,t),T(f,t),b(f,t),f}},65269:function($,R,e){"use strict";var k=e(71828),A=e(34098),l=e(49508),T=e(11058),b=e(94039),d=e(82410),s=e(28908),t=e(47581).PTS_LINESONLY,o=e(48300);$.exports=function(r,n,i,a){function c(x,v){return k.coerce(r,n,o,x,v)}var v,y,h,m,w,p=(v=n,m=(y=c)("real"),w=y("imag"),m&&w&&(h=Math.min(m.length,w.length)),v._length=h,h);if(p){c("mode",p<t?"lines+markers":"lines"),c("text"),c("hovertext"),"fills"!==n.hoveron&&c("hovertemplate"),A.hasLines(n)&&(T(r,n,i,a,c,{backoff:!0}),b(r,n,c),c("connectgaps")),A.hasMarkers(n)&&l(r,n,i,a,c,{gradient:!0}),A.hasText(n)&&(c("texttemplate"),d(r,n,a,c));var f=[];(A.hasMarkers(n)||A.hasText(n))&&(c("cliponaxis"),c("marker.maxdisplayed"),f.push("points")),c("fill"),"none"!==n.fill&&(s(r,n,i,c),A.hasLines(n)||b(r,n,c)),"tonext"!==n.fill&&"toself"!==n.fill||f.push("fills"),c("hoveron",f.join("+")||"points"),k.coerceSelectionMarkerOpacity(n,c)}else n.visible=!1}},62047:function($,R,e){"use strict";var k=e(89298);$.exports=function(A,l,T){var b={},d=T[l.subplot]._subplot;return b.realLabel=k.tickText(d.radialAxis,A.real,!0).text,b.imagLabel=k.tickText(d.angularAxis,A.imag,!0).text,b}},11350:function($,R,e){"use strict";var k=e(33720);function A(l,T,b,d){var s=b.radialAxis,t=b.angularAxis;s._hovertitle="real",t._hovertitle="imag";var o={};o[T.subplot]={_subplot:b};var r=T._module.formatLabels(l,T,o);d.realLabel=r.realLabel,d.imagLabel=r.imagLabel;var i=[];function a(p,f){i.push(p._hovertitle+": "+f)}if(!T.hovertemplate){var c=(l.hi||T.hoverinfo).split("+");-1!==c.indexOf("all")&&(c=["real","imag","text"]),-1!==c.indexOf("real")&&a(s,d.realLabel),-1!==c.indexOf("imag")&&a(t,d.imagLabel),-1!==c.indexOf("text")&&d.text&&(i.push(d.text),delete d.text),d.extraText=i.join("<br>")}}$.exports={hoverPoints:function(l,T,b,d){var s=k(l,T,b,d);if(s&&!1!==s[0].index){var t=s[0];if(void 0===t.index)return s;var o=l.subplot,r=t.cd[t.index],n=t.trace;if(o.isPtInside(r))return t.xLabelVal=void 0,t.yLabelVal=void 0,A(r,n,o,t),t.hovertemplate=n.hovertemplate,s}},makeHoverPointText:A}},85956:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e(7504),categories:["smith","symbols","showLegend","scatter-like"],attributes:e(48300),supplyDefaults:e(65269),colorbar:e(4898),formatLabels:e(62047),calc:e(30621),plot:e(12480),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(11350).hoverPoints,selectPoints:e(98002),meta:{}}},12480:function($,R,e){"use strict";var k=e(32663),A=e(50606).BADNUM,l=e(23893).smith;$.exports=function(T,b,d){for(var s=b.layers.frontplot.select("g.scatterlayer"),t=b.xaxis,o=b.yaxis,r={xaxis:t,yaxis:o,plot:b.framework,layerClipId:b._hasClipOnAxisFalse?b.clipIds.forTraces:null},n=0;n<d.length;n++)for(var i=d[n],a=0;a<i.length;a++){0===a&&(i[0].trace._xA=t,i[0].trace._yA=o);var c=i[a],p=c.real;if(p===A)c.x=c.y=A;else{var f=l([p,c.imag]);c.x=f[0],c.y=f[1]}}k(T,r,d,s)}},50413:function($,R,e){"use strict";var k=e(5386).f,A=e(5386).s,l=e(82196),T=e(9012),b=e(50693),d=e(79952).P,s=e(1426).extendFlat,t=l.marker,o=l.line,r=t.line;$.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:s({},l.mode,{dflt:"markers"}),text:s({},l.text,{}),texttemplate:A({editType:"plot"},{keys:["a","b","c","text"]}),hovertext:s({},l.hovertext,{}),line:{color:o.color,width:o.width,dash:d,backoff:o.backoff,shape:s({},o.shape,{values:["linear","spline"]}),smoothing:o.smoothing,editType:"calc"},connectgaps:l.connectgaps,cliponaxis:l.cliponaxis,fill:s({},l.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:l.fillcolor,marker:s({symbol:t.symbol,opacity:t.opacity,angle:t.angle,angleref:t.angleref,standoff:t.standoff,maxdisplayed:t.maxdisplayed,size:t.size,sizeref:t.sizeref,sizemin:t.sizemin,sizemode:t.sizemode,line:s({width:r.width,editType:"calc"},b("marker.line")),gradient:t.gradient,editType:"calc"},b("marker")),textfont:l.textfont,textposition:l.textposition,selected:l.selected,unselected:l.unselected,hoverinfo:s({},T.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:l.hoveron,hovertemplate:k()}},54337:function($,R,e){"use strict";var k=e(92770),A=e(36922),l=e(75225),T=e(66279),b=e(47761).calcMarkerSize,d=["a","b","c"],s={a:["b","c"],b:["a","c"],c:["a","b"]};$.exports=function(t,o){var r,n,i,a,c,p,f=t._fullLayout[o.subplot].sum,x=o.sum||f,v={a:o.a,b:o.b,c:o.c};for(r=0;r<d.length;r++)if(!v[i=d[r]]){for(c=v[s[i][0]],p=v[s[i][1]],a=new Array(c.length),n=0;n<c.length;n++)a[n]=x-c[n]-p[n];v[i]=a}var g,y,h,m,S=o._length,_=new Array(S);for(r=0;r<S;r++)y=v.b[r],h=v.c[r],k(g=v.a[r])&&k(y)&&k(h)?(1!=(m=f/((g=+g)+(y=+y)+(h=+h)))&&(g*=m,y*=m,h*=m),_[r]={x:h-y,y:g,a:g,b:y,c:h}):_[r]={x:!1,y:!1};return b(o,S),A(t,o),l(_,o),T(_,o),_}},46008:function($,R,e){"use strict";var k=e(71828),A=e(47581),l=e(34098),T=e(49508),b=e(11058),d=e(94039),s=e(82410),t=e(28908),o=e(50413);$.exports=function(r,n,i,a){function c(y,h){return k.coerce(r,n,o,y,h)}var p,f=c("a"),x=c("b"),v=c("c");if(f?(p=f.length,x?(p=Math.min(p,x.length),v&&(p=Math.min(p,v.length))):p=v?Math.min(p,v.length):0):x&&v&&(p=Math.min(x.length,v.length)),p){n._length=p,c("sum"),c("text"),c("hovertext"),"fills"!==n.hoveron&&c("hovertemplate"),c("mode",p<A.PTS_LINESONLY?"lines+markers":"lines"),l.hasLines(n)&&(b(r,n,i,a,c,{backoff:!0}),d(r,n,c),c("connectgaps")),l.hasMarkers(n)&&T(r,n,i,a,c,{gradient:!0}),l.hasText(n)&&(c("texttemplate"),s(r,n,a,c));var g=[];(l.hasMarkers(n)||l.hasText(n))&&(c("cliponaxis"),c("marker.maxdisplayed"),g.push("points")),c("fill"),"none"!==n.fill&&(t(r,n,i,c),l.hasLines(n)||d(r,n,c)),"tonext"!==n.fill&&"toself"!==n.fill||g.push("fills"),c("hoveron",g.join("+")||"points"),k.coerceSelectionMarkerOpacity(n,c)}else n.visible=!1}},4524:function($){"use strict";$.exports=function(R,e,k,A,l){if(e.xa&&(R.xaxis=e.xa),e.ya&&(R.yaxis=e.ya),A[l]){var T=A[l];R.a=T.a,R.b=T.b,R.c=T.c}else R.a=e.a,R.b=e.b,R.c=e.c;return R}},93645:function($,R,e){"use strict";var k=e(89298);$.exports=function(A,l,T){var b={},d=T[l.subplot]._subplot;return b.aLabel=k.tickText(d.aaxis,A.a,!0).text,b.bLabel=k.tickText(d.baxis,A.b,!0).text,b.cLabel=k.tickText(d.caxis,A.c,!0).text,b}},47250:function($,R,e){"use strict";var k=e(33720);$.exports=function(A,l,T,b){var d=k(A,l,T,b);if(d&&!1!==d[0].index){var s=d[0];if(void 0===s.index){var o=A.xa._length,r=o*(1-s.y0/A.ya._length)/2,n=o-r;return s.x0=Math.max(Math.min(s.x0,n),r),s.x1=Math.max(Math.min(s.x1,n),r),d}var i=s.cd[s.index],a=s.trace,c=s.subplot;s.a=i.a,s.b=i.b,s.c=i.c,s.xLabelVal=void 0,s.yLabelVal=void 0;var p={};p[a.subplot]={_subplot:c};var f=a._module.formatLabels(i,a,p);s.aLabel=f.aLabel,s.bLabel=f.bLabel,s.cLabel=f.cLabel;var v=[];if(!a.hovertemplate){var g=(i.hi||a.hoverinfo).split("+");-1!==g.indexOf("all")&&(g=["a","b","c"]),-1!==g.indexOf("a")&&y(c.aaxis,s.aLabel),-1!==g.indexOf("b")&&y(c.baxis,s.bLabel),-1!==g.indexOf("c")&&y(c.caxis,s.cLabel)}return s.extraText=v.join("<br>"),s.hovertemplate=a.hovertemplate,d}function y(h,m){v.push(h._hovertitle+": "+m)}}},52979:function($,R,e){"use strict";$.exports={attributes:e(50413),supplyDefaults:e(46008),colorbar:e(4898),formatLabels:e(93645),calc:e(54337),plot:e(7507),style:e(16296).style,styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(47250),selectPoints:e(98002),eventData:e(4524),moduleType:"trace",name:"scatterternary",basePlotModule:e(61639),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},7507:function($,R,e){"use strict";var k=e(32663);$.exports=function(A,l,T){var b=l.plotContainer;b.select(".scatterlayer").selectAll("*").remove();for(var d=l.xaxis,s=l.yaxis,t={xaxis:d,yaxis:s,plot:b,layerClipId:l._hasClipOnAxisFalse?l.clipIdRelative:null},o=l.layers.frontplot.select("g.scatterlayer"),r=0;r<T.length;r++){var n=T[r];n.length&&(n[0].trace._xA=d,n[0].trace._yA=s)}k(A,t,T,o)}},46880:function($,R,e){"use strict";var k=e(82196),A=e(50693),l=e(12663).axisHoverFormat,T=e(5386).f,b=e(42341),d=e(85555).idRegex,s=e(44467).templatedArray,t=e(1426).extendFlat,o=k.marker,r=o.line,n=t(A("marker.line",{editTypeOverride:"calc"}),{width:t({},r.width,{editType:"calc"}),editType:"calc"}),i=t(A("marker"),{symbol:o.symbol,angle:o.angle,size:t({},o.size,{editType:"markerSize"}),sizeref:o.sizeref,sizemin:o.sizemin,sizemode:o.sizemode,opacity:o.opacity,colorbar:o.colorbar,line:n,editType:"calc"});function a(c){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:d[c],editType:"plot"}}}i.color.editType=i.cmin.editType=i.cmax.editType="style",$.exports={dimensions:s("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:t({},b.text,{}),hovertext:t({},b.hovertext,{}),hovertemplate:T(),xhoverformat:l("x"),yhoverformat:l("y"),marker:i,xaxes:a("x"),yaxes:a("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:b.selected.marker,editType:"calc"},unselected:{marker:b.unselected.marker,editType:"calc"},opacity:b.opacity}},65017:function($,R,e){"use strict";var k=e(73972),A=e(83312);$.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:e(46880),supplyDefaults:e(25784),colorbar:e(4898),calc:e(87625),plot:e(79410),hoverPoints:e(8567).hoverPoints,selectPoints:e(8689),editStyle:e(28801),meta:{}},k.register(A)},16947:function($,R,e){"use strict";var k=e(46075),A=e(73972),l=e(79749),T=e(27659).a0,b=e(93612),d=e(41675).getFromId,s=e(89298).shouldShowZeroLine,t="splom",o={};function r(i,a,c){for(var f=a._visibleDims,x=c.viewOpts.ranges=new Array(c.matrixOptions.data.length),v=0;v<f.length;v++){var g=f[v],y=x[v]=new Array(4),h=d(i,a._diag[g][0]);h&&(y[0]=h.r2l(h.range[0]),y[2]=h.r2l(h.range[1]));var m=d(i,a._diag[g][1]);m&&(y[1]=m.r2l(m.range[0]),y[3]=m.r2l(m.range[1]))}c.selectBatch.length||c.unselectBatch.length?c.matrix.update({ranges:x},{ranges:x}):c.matrix.update({ranges:x})}function n(i){var a=i._fullLayout,c=a._glcanvas.data()[0].regl,p=a._splomGrid;p||(p=a._splomGrid=k(c)),p.update(function(f){var x,v=f._context.plotGlPixelRatio,g=f._fullLayout,y=g._size,h=[0,0,g.width*v,g.height*v],m={};function w(j,J,G,V,W,X){G*=v,V*=v,W*=v,X*=v;var K=J[j+"color"],re=J[j+"width"],ee=String(K+re);ee in m?m[ee].data.push(NaN,NaN,G,V,W,X):m[ee]={data:[G,V,W,X],join:"rect",thickness:re*v,color:K,viewport:h,range:h,overlay:!1}}for(x in g._splomSubplots){var u,S,_=g._plots[x],E=_.xaxis,L=_.yaxis,C=E._gridVals,P=L._gridVals,I=E._offset,U=E._length,z=L._length,H=y.b+L.domain[0]*y.h,F=-L._m,N=-F*L.r2l(L.range[0],L.calendar);if(E.showgrid)for(x=0;x<C.length;x++)u=I+E.l2p(C[x].x),w("grid",E,u,H,u,H+z);if(L.showgrid)for(x=0;x<P.length;x++)w("grid",L,I,S=H+N+F*P[x].x,I+U,S);s(f,E,L)&&(u=I+E.l2p(0),w("zeroline",E,u,H,u,H+z)),s(f,L,E)&&w("zeroline",L,I,S=H+N+0,I+U,S)}var B=[];for(x in m)B.push(m[x]);return B}(i))}$.exports={name:t,attr:b.attr,attrRegex:b.attrRegex,layoutAttributes:b.layoutAttributes,supplyLayoutDefaults:b.supplyLayoutDefaults,drawFramework:b.drawFramework,plot:function(i){var a=i._fullLayout,c=A.getModule(t),p=T(i.calcdata,c)[0];l(i,["ANGLE_instanced_arrays","OES_element_index_uint"],o)&&(a._hasOnlyLargeSploms&&n(i),c.plot(i,{},p))},drag:function(i){var a=i.calcdata,c=i._fullLayout;c._hasOnlyLargeSploms&&n(i);for(var p=0;p<a.length;p++){var f=a[p][0].trace,x=c._splomScenes[f.uid];"splom"===f.type&&x&&x.matrix&&r(i,f,x)}},updateGrid:n,clean:function(i,a,c,p){var f,x={};if(p._splomScenes){for(f=0;f<i.length;f++){var v=i[f];"splom"===v.type&&(x[v.uid]=1)}for(f=0;f<c.length;f++){var g=c[f];if(!x[g.uid]){var y=p._splomScenes[g.uid];y&&y.destroy&&y.destroy(),p._splomScenes[g.uid]=null,delete p._splomScenes[g.uid]}}}0===Object.keys(p._splomScenes||{}).length&&delete p._splomScenes,p._splomGrid&&!a._hasOnlyLargeSploms&&p._hasOnlyLargeSploms&&(p._splomGrid.destroy(),p._splomGrid=null,delete p._splomGrid),b.clean(i,a,c,p)},updateFx:b.updateFx,toSVG:b.toSVG,reglPrecompiled:o}},87625:function($,R,e){"use strict";var k=e(71828),A=e(41675),l=e(47761).calcMarkerSize,T=e(47761).calcAxisExpansion,b=e(36922),d=e(19635).markerSelection,s=e(19635).markerStyle,t=e(10164),o=e(50606).BADNUM,r=e(78232).TOO_MANY_POINTS;$.exports=function(n,i){var a,c,p,f,x,v,g=i.dimensions,y=i._length,h={},m=h.cdata=[],w=h.data=[],u=i._visibleDims=[];function S(E,L){for(var C=E.makeCalcdata({v:L.values,vcalendar:i.calendar},"v"),P=0;P<C.length;P++)C[P]=C[P]===o?NaN:C[P];m.push(C),w.push("log"===E.type?k.simpleMap(C,E.c2l):C)}for(a=0;a<g.length;a++)if((p=g[a]).visible){if(f=A.getFromId(n,i._diag[a][0]),x=A.getFromId(n,i._diag[a][1]),f&&x&&f.type!==x.type){k.log("Skipping splom dimension "+a+" with conflicting axis types");continue}f?(S(f,p),x&&"category"===x.type&&(x._categories=f._categories.slice())):S(x,p),u.push(a)}for(b(n,i),k.extendFlat(h,s(n,i)),v=m.length*y>r?h.sizeAvg||Math.max(h.size,3):l(i,y),c=0;c<u.length;c++)p=g[a=u[c]],f=A.getFromId(n,i._diag[a][0])||{},x=A.getFromId(n,i._diag[a][1])||{},T(n,i,f,x,m[c],m[c],v);var _=t(n,i);return _.matrix||(_.matrix=!0),_.matrixOptions=h,_.selectedOptions=d(n,i,i.selected),_.unselectedOptions=d(n,i,i.unselected),[{x:!1,y:!1,t:{},trace:i}]}},25784:function($,R,e){"use strict";var k=e(71828),A=e(85501),l=e(46880),T=e(34098),b=e(49508),d=e(94397),s=e(68645).isOpenSymbol;function t(o,r){function n(a,c){return k.coerce(o,r,l.dimensions,a,c)}n("label");var i=n("values");i&&i.length?n("visible"):r.visible=!1,n("axis.type"),n("axis.matches")}$.exports=function(o,r,n,i){function a(y,h){return k.coerce(o,r,l,y,h)}var c=A(o,r,{name:"dimensions",handleItemDefaults:t}),p=a("diagonal.visible"),f=a("showupperhalf"),x=a("showlowerhalf");if(d(r,c,"values")&&(p||f||x)){a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),b(o,r,n,i,a,{noAngleRef:!0,noStandOff:!0});var v=s(r.marker.symbol),g=T.isBubble(r);a("marker.line.width",v||g?1:0),function(y,h,m,w){var u,S,_=h.dimensions,E=_.length,L=h.showupperhalf,C=h.showlowerhalf,P=h.diagonal.visible,I=new Array(E),U=new Array(E);for(u=0;u<E;u++){var z=u?u+1:"";I[u]="x"+z,U[u]="y"+z}var H=w("xaxes",I),F=w("yaxes",U),N=h._diag=new Array(E);h._xaxes={},h._yaxes={};var B=[],j=[];function J(oe,ce,me,de){if(oe){var he=oe.charAt(0),ve=m._splomAxes[he];if(h["_"+he+"axes"][oe]=1,de.push(oe),!(oe in ve)){var Pe=ve[oe]={};me&&(Pe.label=me.label||"",me.visible&&me.axis&&(me.axis.type&&(Pe.type=me.axis.type),me.axis.matches&&(Pe.matches=ce)))}}}var G=!P&&!C,V=!P&&!L;for(h._axesDim={},u=0;u<E;u++){var W=_[u],X=0===u,K=u===E-1,re=X&&G||K&&V?void 0:H[u],ee=X&&V||K&&G?void 0:F[u];J(re,ee,W,B),J(ee,re,W,j),N[u]=[re,ee],h._axesDim[re]=u,h._axesDim[ee]=u}for(u=0;u<B.length;u++)for(S=0;S<j.length;S++){var ie=B[u]+j[S];u>S&&L||u<S&&C?m._splomSubplots[ie]=1:u!==S||!P&&C&&L||(m._splomSubplots[ie]=1)}(!C||!P&&L&&C)&&(m._splomGridDflt.xside="bottom",m._splomGridDflt.yside="left")}(0,r,i,a),k.coerceSelectionMarkerOpacity(r,a)}else r.visible=!1}},28801:function($,R,e){"use strict";var k=e(71828),A=e(36922),l=e(19635).markerStyle;$.exports=function(T,b){var d=b.trace,s=T._fullLayout._splomScenes[d.uid];if(s){A(T,d),k.extendFlat(s.matrixOptions,l(T,d));var t=k.extendFlat({},s.matrixOptions,s.viewOpts);s.matrix.update(t,null)}}},35948:function($,R){"use strict";R.getDimIndex=function(e,k){for(var A=k._id,l={x:0,y:1}[A.charAt(0)],T=e._visibleDims,b=0;b<T.length;b++)if(e._diag[T[b]][l]===A)return b;return!1}},8567:function($,R,e){"use strict";var k=e(35948),A=e(20794).calcHover;$.exports={hoverPoints:function(l,T,b){var d=l.cd[0].trace,s=l.scene.matrixOptions.cdata,t=l.xa,o=l.ya,r=t.c2p(T),n=o.c2p(b),i=l.distance,a=k.getDimIndex(d,t),c=k.getDimIndex(d,o);if(!1===a||!1===c)return[l];for(var p,f,x=s[a],v=s[c],g=i,y=0;y<x.length;y++){var m=v[y],w=t.c2p(x[y])-r,u=o.c2p(m)-n,S=Math.sqrt(w*w+u*u);S<g&&(g=f=S,p=y)}return l.index=p,l.distance=g,l.dxy=f,void 0===p?[l]:[A(l,x,v,d)]}}},6419:function($,R,e){"use strict";var k=e(65017);k.basePlotModule=e(16947),$.exports=k},79410:function($,R,e){"use strict";var k=e(60487),A=e(71828),l=e(41675),T=e(64505).selectMode;function b(d,s){var t,o,r,n,i,a=d._fullLayout,c=a._size,p=s.trace,f=s.t,x=a._splomScenes[p.uid],v=x.matrixOptions,g=v.cdata,y=a._glcanvas.data()[0].regl,h=a.dragmode;if(0!==g.length){v.lower=p.showupperhalf,v.upper=p.showlowerhalf,v.diagonal=p.diagonal.visible;var m=p._visibleDims,w=g.length,u=x.viewOpts={};for(u.ranges=new Array(w),u.domains=new Array(w),i=0;i<m.length;i++){r=m[i];var S=u.ranges[i]=new Array(4),_=u.domains[i]=new Array(4);(t=l.getFromId(d,p._diag[r][0]))&&(S[0]=t._rl[0],S[2]=t._rl[1],_[0]=t.domain[0],_[2]=t.domain[1]),(o=l.getFromId(d,p._diag[r][1]))&&(S[1]=o._rl[0],S[3]=o._rl[1],_[1]=o.domain[0],_[3]=o.domain[1])}var E=d._context.plotGlPixelRatio,L=c.l*E,C=c.b*E;u.viewport=[L,C,c.w*E+L,c.h*E+C],!0===x.matrix&&(x.matrix=k(y));var U=a.clickmode.indexOf("select")>-1,z=!0;if(T(h)||p.selectedpoints||U){var H=p._length;if(p.selectedpoints){x.selectBatch=p.selectedpoints;var F=p.selectedpoints,N={};for(r=0;r<F.length;r++)N[F[r]]=!0;var B=[];for(r=0;r<H;r++)N[r]||B.push(r);x.unselectBatch=B}var j=f.xpx=new Array(w),J=f.ypx=new Array(w);for(i=0;i<m.length;i++){if(t=l.getFromId(d,p._diag[r=m[i]][0]))for(j[i]=new Array(H),n=0;n<H;n++)j[i][n]=t.c2p(g[i][n]);if(o=l.getFromId(d,p._diag[r][1]))for(J[i]=new Array(H),n=0;n<H;n++)J[i][n]=o.c2p(g[i][n])}if(x.selectBatch.length||x.unselectBatch.length){var G=A.extendFlat({},v,x.unselectedOptions,u),V=A.extendFlat({},v,x.selectedOptions,u);x.matrix.update(G,V),z=!1}}else f.xpx=f.ypx=null;if(z){var W=A.extendFlat({},v,u);x.matrix.update(W,null)}}}$.exports=function(d,s,t){if(t.length)for(var o=0;o<t.length;o++)b(d,t[o][0])}},10164:function($,R,e){"use strict";var k=e(71828);$.exports=function(A,l){var T=A._fullLayout,b=l.uid,d=T._splomScenes;d||(d=T._splomScenes={});var s={dirty:!0,selectBatch:[],unselectBatch:[]},t=d[l.uid];return t||((t=d[b]=k.extendFlat({},s,{matrix:!1,selectBatch:[],unselectBatch:[]})).draw=function(){t.matrix&&t.matrix.draw&&(t.selectBatch.length||t.unselectBatch.length?t.matrix.draw(t.unselectBatch,t.selectBatch):t.matrix.draw()),t.dirty=!1},t.destroy=function(){t.matrix&&t.matrix.destroy&&t.matrix.destroy(),t.matrixOptions=null,t.selectBatch=null,t.unselectBatch=null,t=null}),t.dirty||k.extendFlat(t,s),t}},8689:function($,R,e){"use strict";var k=e(71828),A=k.pushUnique,l=e(34098),T=e(35948);$.exports=function(b,d){var s=b.cd,t=s[0].trace,o=s[0].t,r=b.scene,n=r.matrixOptions.cdata,i=b.xaxis,a=b.yaxis,c=[];if(!r)return c;var p=!l.hasMarkers(t)&&!l.hasText(t);if(!0!==t.visible||p)return c;var f=T.getDimIndex(t,i),x=T.getDimIndex(t,a);if(!1===f||!1===x)return c;var v=o.xpx[f],g=o.ypx[x],y=n[f],h=n[x],m=(b.scene.selectBatch||[]).slice(),w=[];if(!1!==d&&!d.degenerate)for(var u=0;u<y.length;u++)d.contains([v[u],g[u]],null,u,b)?(c.push({pointNumber:u,x:y[u],y:h[u]}),A(m,u)):-1!==m.indexOf(u)?A(m,u):w.push(u);var S=r.matrixOptions;return m.length||w.length?r.selectBatch.length||r.unselectBatch.length||r.matrix.update(r.unselectedOptions,k.extendFlat({},S,r.selectedOptions,r.viewOpts)):r.matrix.update(S,null),r.selectBatch=m,r.unselectBatch=w,c}},21850:function($,R,e){"use strict";var k=e(50693),A=e(12663).axisHoverFormat,l=e(5386).f,T=e(2418),b=e(9012),d=e(1426).extendFlat,s={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:l({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),uhoverformat:A("u",1),vhoverformat:A("v",1),whoverformat:A("w",1),xhoverformat:A("x"),yhoverformat:A("y"),zhoverformat:A("z"),showlegend:d({},b.showlegend,{dflt:!1})};d(s,k("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"})),["opacity","lightposition","lighting"].forEach(function(t){s[t]=T[t]}),s.hoverinfo=d({},b.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"}),s.transforms=void 0,$.exports=s},88489:function($,R,e){"use strict";var k=e(71828),A=e(78803);function l(d){var s,t,o,r,n,i,a,c,p,f,x,v,g=d._x,y=d._y,h=d._z,m=d._len,w=-1/0,u=1/0,S=-1/0,_=1/0,E=-1/0,L=1/0,C="";for(m&&(a=g[0],p=y[0],x=h[0]),m>1&&(c=g[m-1],f=y[m-1],v=h[m-1]),s=0;s<m;s++)w=Math.max(w,g[s]),u=Math.min(u,g[s]),S=Math.max(S,y[s]),_=Math.min(_,y[s]),E=Math.max(E,h[s]),L=Math.min(L,h[s]),r||g[s]===a||(r=!0,C+="x"),n||y[s]===p||(n=!0,C+="y"),i||h[s]===x||(i=!0,C+="z");r||(C+="x"),n||(C+="y"),i||(C+="z");var P=T(d._x),I=T(d._y),U=T(d._z);C=(C=(C=C.replace("x",(a>c?"-":"+")+"x")).replace("y",(p>f?"-":"+")+"y")).replace("z",(x>v?"-":"+")+"z");var z=function(){m=0,P=[],I=[],U=[]};(!m||m<P.length*I.length*U.length)&&z();var H=function(he){return"x"===he?g:"y"===he?y:h},F=function(he){return"x"===he?P:"y"===he?I:U},N=function(he){return he[m-1]<he[0]?-1:1},B=H(C[1]),j=H(C[3]),J=H(C[5]),G=F(C[1]).length,V=F(C[3]).length,W=F(C[5]).length,X=!1,K=function(he,ve,Pe){return G*(V*he+ve)+Pe},re=N(H(C[1])),ee=N(H(C[3])),ie=N(H(C[5]));for(s=0;s<W-1;s++){for(t=0;t<V-1;t++){for(o=0;o<G-1;o++){var oe=K(s,t,o),ce=K(s,t,o+1),me=K(s,t+1,o),de=K(s+1,t,o);if(B[oe]*re<B[ce]*re&&j[oe]*ee<j[me]*ee&&J[oe]*ie<J[de]*ie||(X=!0),X)break}if(X)break}if(X)break}return X&&(k.warn("Encountered arbitrary coordinates! Unable to input data grid."),z()),{xMin:u,yMin:_,zMin:L,xMax:w,yMax:S,zMax:E,Xs:P,Ys:I,Zs:U,len:m,fill:C}}function T(d){return k.distinctVals(d).vals}function b(d,s){if(void 0===s&&(s=d.length),k.isTypedArray(d))return d.subarray(0,s);for(var t=[],o=0;o<s;o++)t[o]=+d[o];return t}$.exports={calc:function(d,s){s._len=Math.min(s.u.length,s.v.length,s.w.length,s.x.length,s.y.length,s.z.length),s._u=b(s.u,s._len),s._v=b(s.v,s._len),s._w=b(s.w,s._len),s._x=b(s.x,s._len),s._y=b(s.y,s._len),s._z=b(s.z,s._len);var t=l(s);s._gridFill=t.fill,s._Xs=t.Xs,s._Ys=t.Ys,s._Zs=t.Zs,s._len=t.len;var o,r,n,i=0;s.starts&&(o=b(s.starts.x||[]),r=b(s.starts.y||[]),n=b(s.starts.z||[]),i=Math.min(o.length,r.length,n.length)),s._startsX=o||[],s._startsY=r||[],s._startsZ=n||[];var a,c=0,p=1/0;for(a=0;a<s._len;a++){var f=s._u[a],x=s._v[a],v=s._w[a],g=Math.sqrt(f*f+x*x+v*v);c=Math.max(c,g),p=Math.min(p,g)}for(A(d,s,{vals:[p,c],containerStr:"",cLetter:"c"}),a=0;a<i;a++){var y=o[a];t.xMax=Math.max(t.xMax,y),t.xMin=Math.min(t.xMin,y);var h=r[a];t.yMax=Math.max(t.yMax,h),t.yMin=Math.min(t.yMin,h);var m=n[a];t.zMax=Math.max(t.zMax,m),t.zMin=Math.min(t.zMin,m)}s._slen=i,s._normMax=c,s._xbnds=[t.xMin,t.xMax],s._ybnds=[t.yMin,t.yMax],s._zbnds=[t.zMin,t.zMax]},filter:b,processGrid:l}},90154:function($,R,e){"use strict";var k=e(9330).gl_streamtube3d,A=k.createTubeMesh,l=e(71828),T=e(81697).parseColorScale,b=e(21081).extractOpts,d=e(90060),s={xaxis:0,yaxis:1,zaxis:2};function t(a,c){this.scene=a,this.uid=c,this.mesh=null,this.data=null}var o=t.prototype;function r(a){var c=a.length;return c>2?a.slice(1,c-1):2===c?[(a[0]+a[1])/2]:a}function n(a){var c=a.length;return 1===c?[.5,.5]:[a[1]-a[0],a[c-1]-a[c-2]]}function i(a,c){var p=a.fullSceneLayout,f=a.dataScale,x=c._len,v={};function g(G,V){var W=p[V],X=f[s[V]];return l.simpleMap(G,function(K){return W.d2l(K)*X})}if(v.vectors=d(g(c._u,"xaxis"),g(c._v,"yaxis"),g(c._w,"zaxis"),x),!x)return{positions:[],cells:[]};var y=g(c._Xs,"xaxis"),h=g(c._Ys,"yaxis"),m=g(c._Zs,"zaxis");if(v.meshgrid=[y,h,m],v.gridFill=c._gridFill,c._slen)v.startingPositions=d(g(c._startsX,"xaxis"),g(c._startsY,"yaxis"),g(c._startsZ,"zaxis"));else{for(var w=h[0],u=r(y),S=r(m),_=new Array(u.length*S.length),E=0,L=0;L<u.length;L++)for(var C=0;C<S.length;C++)_[E++]=[u[L],w,S[C]];v.startingPositions=_}v.colormap=T(c),v.tubeSize=c.sizeref,v.maxLength=c.maxdisplayed;var P=g(c._xbnds,"xaxis"),I=g(c._ybnds,"yaxis"),U=g(c._zbnds,"zaxis"),z=n(y),H=n(h),F=n(m),B=k(v,[[P[0]-z[0],I[0]-H[0],U[0]-F[0]],[P[1]+z[1],I[1]+H[1],U[1]+F[1]]]),j=b(c);B.vertexIntensityBounds=[j.min/c._normMax,j.max/c._normMax];var J=c.lightposition;return B.lightPosition=[J.x,J.y,J.z],B.ambient=c.lighting.ambient,B.diffuse=c.lighting.diffuse,B.specular=c.lighting.specular,B.roughness=c.lighting.roughness,B.fresnel=c.lighting.fresnel,B.opacity=c.opacity,c._pad=B.tubeScale*c.sizeref*2,B}o.handlePick=function(a){var c=this.scene.fullSceneLayout,p=this.scene.dataScale;function f(g,y){var m=p[s[y]];return c[y].l2c(g)/m}if(a.object===this.mesh){var x=a.data.position,v=a.data.velocity;return a.traceCoordinate=[f(x[0],"xaxis"),f(x[1],"yaxis"),f(x[2],"zaxis"),f(v[0],"xaxis"),f(v[1],"yaxis"),f(v[2],"zaxis"),a.data.intensity*this.data._normMax,a.data.divergence],a.textLabel=this.data.hovertext||this.data.text,!0}},o.update=function(a){this.data=a;var c=i(this.scene,a);this.mesh.update(c)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},$.exports=function(a,c){var p=a.glplot.gl,f=i(a,c),x=A(p,f),v=new t(a,c.uid);return v.mesh=x,v.data=c,x._trace=v,a.glplot.add(x),v}},22459:function($,R,e){"use strict";var k=e(71828),A=e(1586),l=e(21850);$.exports=function(T,b,d,s){function t(p,f){return k.coerce(T,b,l,p,f)}var o=t("u"),r=t("v"),n=t("w"),i=t("x"),a=t("y"),c=t("z");o&&o.length&&r&&r.length&&n&&n.length&&i&&i.length&&a&&a.length&&c&&c.length?(t("starts.x"),t("starts.y"),t("starts.z"),t("maxdisplayed"),t("sizeref"),t("lighting.ambient"),t("lighting.diffuse"),t("lighting.specular"),t("lighting.roughness"),t("lighting.fresnel"),t("lightposition.x"),t("lightposition.y"),t("lightposition.z"),A(T,b,s,t,{prefix:"",cLetter:"c"}),t("text"),t("hovertext"),t("hovertemplate"),t("uhoverformat"),t("vhoverformat"),t("whoverformat"),t("xhoverformat"),t("yhoverformat"),t("zhoverformat"),b._length=null):b.visible=!1}},61510:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"streamtube",basePlotModule:e(58547),categories:["gl3d","showLegend"],attributes:e(21850),supplyDefaults:e(22459),colorbar:{min:"cmin",max:"cmax"},calc:e(88489).calc,plot:e(90154),eventData:function(k,A){return k.tubex=k.x,k.tubey=k.y,k.tubez=k.z,k.tubeu=A.traceCoordinate[3],k.tubev=A.traceCoordinate[4],k.tubew=A.traceCoordinate[5],k.norm=A.traceCoordinate[6],k.divergence=A.traceCoordinate[7],delete k.x,delete k.y,delete k.z,k},meta:{}}},57564:function($,R,e){"use strict";var k=e(9012),A=e(5386).f,l=e(5386).s,T=e(50693),b=e(27670).Y,d=e(34e3),s=e(7055),t=e(1426).extendFlat;$.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:t({colors:{valType:"data_array",editType:"calc"},line:{color:t({},d.marker.line.color,{dflt:null}),width:t({},d.marker.line.width,{dflt:1}),editType:"calc"},editType:"calc"},T("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:d.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:l({editType:"plot"},{keys:s.eventDataKeys.concat(["label","value"])}),hovertext:d.hovertext,hoverinfo:t({},k.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:A({},{keys:s.eventDataKeys}),textfont:d.textfont,insidetextorientation:d.insidetextorientation,insidetextfont:d.insidetextfont,outsidetextfont:t({},d.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:d.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:b({name:"sunburst",trace:!0,editType:"calc"})}},66888:function($,R,e){"use strict";var k=e(74875);R.name="sunburst",R.plot=function(A,l,T,b){k.plotBasePlot(R.name,A,l,T,b)},R.clean=function(A,l,T,b){k.cleanBasePlot(R.name,A,l,T,b)}},52147:function($,R,e){"use strict";var k=e(674),A=e(92770),l=e(71828),T=e(21081).makeColorScaleFuncFromTrace,b=e(32354).makePullColorFn,d=e(32354).generateExtendedColors,s=e(21081).calc,t=e(50606).ALMOST_EQUAL,o={},r={},n={};function i(a,c,p){var f=0,x=a.children;if(x){for(var v=x.length,g=0;g<v;g++)f+=i(x[g],c,p);p.branches&&f++}else p.leaves&&f++;return a.value=a.data.data.value=f,c._values||(c._values=[]),c._values[a.data.data.i]=f,f}R.calc=function(a,c){var p,f,x,v,g,y,h=a._fullLayout,m=c.ids,w=l.isArrayOrTypedArray(m),u=c.labels,S=c.parents,_=c.values,E=l.isArrayOrTypedArray(_),L=[],C={},P={},I=function(ie){return ie||"number"==typeof ie},U=function(ie){return!E||A(_[ie])&&_[ie]>=0};w?(p=Math.min(m.length,S.length),f=function(ie){return I(m[ie])&&U(ie)},x=function(ie){return String(m[ie])}):(p=Math.min(u.length,S.length),f=function(ie){return I(u[ie])&&U(ie)},x=function(ie){return String(u[ie])}),E&&(p=Math.min(p,_.length));for(var z=0;z<p;z++)if(f(z)){var H=x(z),F=I(S[z])?String(S[z]):"",N={i:z,id:H,pid:F,label:I(u[z])?String(u[z]):""};E&&(N.v=+_[z]),L.push(N),g=H,C[v=F]?C[v].push(g):C[v]=[g],P[g]=1}if(C[""]){if(C[""].length>1){for(var B=l.randstr(),j=0;j<L.length;j++)""===L[j].pid&&(L[j].pid=B);L.unshift({hasMultipleRoots:!0,id:B,pid:"",label:""})}}else{var J,G=[];for(J in C)P[J]||G.push(J);if(1!==G.length)return l.warn(["Multiple implied roots, cannot build",c.type,"hierarchy of",c.name+".","These roots include:",G.join(", ")].join(" "));L.unshift({hasImpliedRoot:!0,id:J=G[0],pid:"",label:J})}try{y=k.stratify().id(function(ie){return ie.id}).parentId(function(ie){return ie.pid})(L)}catch(ie){return l.warn(["Failed to build",c.type,"hierarchy of",c.name+".","Error:",ie.message].join(" "))}var V=k.hierarchy(y),W=!1;if(E)switch(c.branchvalues){case"remainder":V.sum(function(ie){return ie.data.v});break;case"total":V.each(function(ie){var oe=ie.data.data,ce=oe.v;if(ie.children){var me=ie.children.reduce(function(de,he){return de+he.data.data.v},0);if((oe.hasImpliedRoot||oe.hasMultipleRoots)&&(ce=me),ce<me*t)return W=!0,l.warn(["Total value for node",ie.data.data.id,"of",c.name,"is smaller than the sum of its children.","\nparent value =",ce,"\nchildren sum =",me].join(" "))}ie.value=ce})}else i(V,c,{branches:-1!==c.count.indexOf("branches"),leaves:-1!==c.count.indexOf("leaves")});if(!W){var X,K;c.sort&&V.sort(function(ie,oe){return oe.value-ie.value});var re=c.marker.colors||[];return c._hasColorscale?(!!re.length||(re=E?c.values:c._values),s(a,c,{vals:re,containerStr:"marker",cLetter:"c"}),K=T(c.marker)):X=b(h["_"+c.type+"colormap"]),V.each(function(ie){var oe=ie.data.data;oe.color=c._hasColorscale?K(re[oe.i]):X(re[oe.i],oe.id)}),L[0].hierarchy=V,L}},R._runCrossTraceCalc=function(a,c){var p=c._fullLayout,f=c.calcdata,x=p[a+"colorway"],v=p["_"+a+"colormap"];p["extend"+a+"colors"]&&(x=d(x,"icicle"===a?n:"treemap"===a?r:o));var g,y=0;function h(u){var S=u.data.data,_=S.id;!1===S.color&&(v[_]?S.color=v[_]:u.parent?u.parent.parent?S.color=u.parent.data.data.color:(v[_]=S.color=x[y%x.length],y++):S.color=g)}for(var m=0;m<f.length;m++){var w=f[m][0];w.trace.type===a&&w.hierarchy&&(g=w.trace.root.color,w.hierarchy.each(h))}},R.crossTraceCalc=function(a){return R._runCrossTraceCalc("sunburst",a)}},7055:function($){"use strict";$.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}},17094:function($,R,e){"use strict";var k=e(71828),A=e(57564),l=e(27670).c,T=e(90769).handleText,b=e(21081),d=b.hasColorscale,s=b.handleDefaults;$.exports=function(t,o,r,n){function i(v,g){return k.coerce(t,o,A,v,g)}var a=i("labels"),c=i("parents");if(a&&a.length&&c&&c.length){var p=i("values");i(p&&p.length?"branchvalues":"count"),i("level"),i("maxdepth"),i("marker.line.width")&&i("marker.line.color",n.paper_bgcolor),i("marker.colors");var f=o._hasColorscale=d(t,"marker","colors")||(t.marker||{}).coloraxis;f&&s(t,o,n,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",f?1:.7);var x=i("text");i("texttemplate"),o.texttemplate||i("textinfo",Array.isArray(x)?"text+label":"label"),i("hovertext"),i("hovertemplate"),T(t,o,n,i,"auto",{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("insidetextorientation"),i("sort"),i("rotation"),i("root.color"),l(o,n,i),o._length=null}else o.visible=!1}},83523:function($,R,e){"use strict";var k=e(39898),A=e(73972),l=e(23469).appendArrayPointValue,T=e(30211),b=e(71828),d=e(11086),s=e(2791),t=e(53581).formatPieValue;function o(r,n,i){for(var a=r.data.data,c={curveNumber:n.index,pointNumber:a.i,data:n._input,fullData:n},p=0;p<i.length;p++){var f=i[p];f in r&&(c[f]=r[f])}return"parentString"in r&&!s.isHierarchyRoot(r)&&(c.parent=r.parentString),l(c,n,a.i),c}$.exports=function(r,n,i,a,c){var p=a[0],f=p.trace,x=p.hierarchy,v="sunburst"===f.type,g="treemap"===f.type||"icicle"===f.type;"_hasHoverLabel"in f||(f._hasHoverLabel=!1),"_hasHoverEvent"in f||(f._hasHoverEvent=!1),r.on("mouseover",function(y){var h=i._fullLayout;if(!i._dragging&&!1!==h.hovermode){var m,w=i._fullData[f.index],u=y.data.data,S=u.i,_=s.isHierarchyRoot(y),E=s.getParent(x,y),L=s.getValue(y),C=function(re){return b.castOption(w,S,re)},P=C("hovertemplate"),I=T.castHoverinfo(w,h,S),U=h.separators;if(P||I&&"none"!==I&&"skip"!==I){var z,H;v&&(z=p.cx+y.pxmid[0]*(1-y.rInscribed),H=p.cy+y.pxmid[1]*(1-y.rInscribed)),g&&(z=y._hoverX,H=y._hoverY);var F,N={},B=[],j=[],J=function(re){return-1!==B.indexOf(re)};I&&(B="all"===I?w._module.attributes.hoverinfo.flags:I.split("+")),N.label=u.label,J("label")&&N.label&&j.push(N.label),u.hasOwnProperty("v")&&(N.value=u.v,N.valueLabel=t(N.value,U),J("value")&&j.push(N.valueLabel)),N.currentPath=y.currentPath=s.getPath(y.data),J("current path")&&!_&&j.push(N.currentPath);var G=[],V=function(){-1===G.indexOf(F)&&(j.push(F),G.push(F))};N.percentParent=y.percentParent=L/s.getValue(E),N.parent=y.parentString=s.getPtLabel(E),J("percent parent")&&(F=s.formatPercent(N.percentParent,U)+" of "+N.parent,V()),N.percentEntry=y.percentEntry=L/s.getValue(n),N.entry=y.entry=s.getPtLabel(n),!J("percent entry")||_||y.onPathbar||(F=s.formatPercent(N.percentEntry,U)+" of "+N.entry,V()),N.percentRoot=y.percentRoot=L/s.getValue(x),N.root=y.root=s.getPtLabel(x),J("percent root")&&!_&&(F=s.formatPercent(N.percentRoot,U)+" of "+N.root,V()),N.text=C("hovertext")||C("text"),J("text")&&b.isValidTextValue(F=N.text)&&j.push(F),m=[o(y,w,c.eventDataKeys)];var W={trace:w,y:H,_x0:y._x0,_x1:y._x1,_y0:y._y0,_y1:y._y1,text:j.join("<br>"),name:P||J("name")?w.name:void 0,color:C("hoverlabel.bgcolor")||u.color,borderColor:C("hoverlabel.bordercolor"),fontFamily:C("hoverlabel.font.family"),fontSize:C("hoverlabel.font.size"),fontColor:C("hoverlabel.font.color"),nameLength:C("hoverlabel.namelength"),textAlign:C("hoverlabel.align"),hovertemplate:P,hovertemplateLabels:N,eventData:m};v&&(W.x0=z-y.rInscribed*y.rpx1,W.x1=z+y.rInscribed*y.rpx1,W.idealAlign=y.pxmid[0]<0?"left":"right"),g&&(W.x=z,W.idealAlign=z<0?"left":"right");var X=[];T.loneHover(W,{container:h._hoverlayer.node(),outerContainer:h._paper.node(),gd:i,inOut_bbox:X}),m[0].bbox=X[0],f._hasHoverLabel=!0}if(g){var K=r.select("path.surface");c.styleOne(K,y,w,{hovered:!0})}f._hasHoverEvent=!0,i.emit("plotly_hover",{points:m||[o(y,w,c.eventDataKeys)],event:k.event})}}),r.on("mouseout",function(y){var h=i._fullLayout,m=i._fullData[f.index],w=k.select(this).datum();if(f._hasHoverEvent&&(y.originalEvent=k.event,i.emit("plotly_unhover",{points:[o(w,m,c.eventDataKeys)],event:k.event}),f._hasHoverEvent=!1),f._hasHoverLabel&&(T.loneUnhover(h._hoverlayer.node()),f._hasHoverLabel=!1),g){var u=r.select("path.surface");c.styleOne(u,w,m,{hovered:!1})}}),r.on("click",function(y){var h=i._fullLayout,m=i._fullData[f.index],w=v&&(s.isHierarchyRoot(y)||s.isLeaf(y)),u=s.getPtId(y),S=s.isEntry(y)?s.findEntryWithChild(x,u):s.findEntryWithLevel(x,u),_=s.getPtId(S),E={points:[o(y,m,c.eventDataKeys)],event:k.event};w||(E.nextLevel=_);var L=d.triggerHandler(i,"plotly_"+f.type+"click",E);if(!1!==L&&h.hovermode&&(i._hoverdata=[o(y,m,c.eventDataKeys)],T.click(i,k.event)),!w&&!1!==L&&!i._dragging&&!i._transitioning){A.call("_storeDirectGUIEdit",m,h._tracePreGUI[m.uid],{level:m.level});var C={data:[{level:_}],traces:[f.index]},P={frame:{redraw:!1,duration:c.transitionTime},transition:{duration:c.transitionTime,easing:c.transitionEasing},mode:"immediate",fromcurrent:!0};T.loneUnhover(h._hoverlayer.node()),A.call("animate",i,C,P)}})}},2791:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(6964),T=e(53581);function b(d){return d.data.data.pid}R.findEntryWithLevel=function(d,s){var t;return s&&d.eachAfter(function(o){if(R.getPtId(o)===s)return t=o.copy()}),t||d},R.findEntryWithChild=function(d,s){var t;return d.eachAfter(function(o){for(var r=o.children||[],n=0;n<r.length;n++)if(R.getPtId(r[n])===s)return t=o.copy()}),t||d},R.isEntry=function(d){return!d.parent},R.isLeaf=function(d){return!d.children},R.getPtId=function(d){return d.data.data.id},R.getPtLabel=function(d){return d.data.data.label},R.getValue=function(d){return d.value},R.isHierarchyRoot=function(d){return""===b(d)},R.setSliceCursor=function(d,s,t){var o=t.isTransitioning;if(!o){var r=d.datum();o=t.hideOnRoot&&R.isHierarchyRoot(r)||t.hideOnLeaves&&R.isLeaf(r)}l(d,o?null:"pointer")},R.getInsideTextFontKey=function(d,s,t,o,r){var i=t.data.data.i;return k.castOption(s,i,((r||{}).onPathbar?"pathbar.textfont":"insidetextfont")+"."+d)||k.castOption(s,i,"textfont."+d)||o.size},R.getOutsideTextFontKey=function(d,s,t,o){var r=t.data.data.i;return k.castOption(s,r,"outsidetextfont."+d)||k.castOption(s,r,"textfont."+d)||o.size},R.isOutsideText=function(d,s){return!d._hasColorscale&&R.isHierarchyRoot(s)},R.determineTextFont=function(d,s,t,o){return R.isOutsideText(d,s)?{color:R.getOutsideTextFontKey("color",r=d,n=s,i=t),family:R.getOutsideTextFontKey("family",r,n,i),size:R.getOutsideTextFontKey("size",r,n,i)}:function(r,n,i,a){var p=n.data.data,f=p.i,x=k.castOption(r,f,((a||{}).onPathbar?"pathbar.textfont":"insidetextfont")+".color");return!x&&r._input.textfont&&(x=k.castOption(r._input,f,"textfont.color")),{color:x||A.contrast(p.color),family:R.getInsideTextFontKey("family",r,n,i,a),size:R.getInsideTextFontKey("size",r,n,i,a)}}(d,s,t,o);var r,n,i},R.hasTransition=function(d){return!!(d&&d.duration>0)},R.getMaxDepth=function(d){return d.maxdepth>=0?d.maxdepth:1/0},R.isHeader=function(d,s){return!(R.isLeaf(d)||d.depth===s._maxDepth-1)},R.getParent=function(d,s){return R.findEntryWithLevel(d,b(s))},R.listPath=function(d,s){var t=d.parent;if(!t)return[];var o=s?[t.data[s]]:[t];return R.listPath(t,s).concat(o)},R.getPath=function(d){return R.listPath(d,"label").join("/")+"/"},R.formatValue=T.formatPieValue,R.formatPercent=function(d,s){var t=k.formatPercent(d,0);return"0%"===t&&(t=T.formatPiePercent(d,s)),t}},87619:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"sunburst",basePlotModule:e(66888),categories:[],animatable:!0,attributes:e(57564),layoutAttributes:e(2654),supplyDefaults:e(17094),supplyLayoutDefaults:e(57034),calc:e(52147).calc,crossTraceCalc:e(52147).crossTraceCalc,plot:e(24714).plot,style:e(29969).style,colorbar:e(4898),meta:{}}},2654:function($){"use strict";$.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},57034:function($,R,e){"use strict";var k=e(71828),A=e(2654);$.exports=function(l,T){function b(d,s){return k.coerce(l,T,A,d,s)}b("sunburstcolorway",T.colorway),b("extendsunburstcolors")}},24714:function($,R,e){"use strict";var k=e(39898),A=e(674),l=e(29502).sX,T=e(91424),b=e(71828),d=e(63893),s=e(72597),t=s.recordMinTextSize,o=s.clearMinTextSize,r=e(14575),n=e(53581).getRotationAngle,i=r.computeTransform,a=r.transformInsideText,c=e(29969).styleOne,p=e(16688).resizeText,f=e(83523),x=e(7055),v=e(2791);function g(h,m,w,u){var S=h._context.staticPlot,_=h._fullLayout,E=!_.uniformtext.mode&&v.hasTransition(u),L=k.select(w).selectAll("g.slice"),C=m[0],P=C.trace,U=v.findEntryWithLevel(C.hierarchy,P.level),z=v.getMaxDepth(P),H=_._size,F=P.domain,B=H.h*(F.y[1]-F.y[0]),j=.5*Math.min(H.w*(F.x[1]-F.x[0]),B),J=C.cx=H.l+H.w*(F.x[1]+F.x[0])/2,G=C.cy=H.t+H.h*(1-F.y[0])-B/2;if(!U)return L.remove();var V=null,W={};E&&L.each(function(Te){W[v.getPtId(Te)]={rpx0:Te.rpx0,rpx1:Te.rpx1,x0:Te.x0,x1:Te.x1,transform:Te.transform},!V&&v.isEntry(Te)&&(V=Te)});var Te,X=(Te=U,A.partition().size([2*Math.PI,Te.height+1])(Te)).descendants(),K=U.height+1,re=0,ee=z;C.hasMultipleRoots&&v.isHierarchyRoot(U)&&(X=X.slice(1),K-=1,re=1,ee+=1),X=X.filter(function(Te){return Te.y1<=ee});var ie=n(P.rotation);ie&&X.forEach(function(Te){Te.x0+=ie,Te.x1+=ie});var oe=Math.min(K,z),ce=function(Te){return(Te-re)/oe*j},me=function(Te,Q){return[Te*Math.cos(Q),-Te*Math.sin(Q)]},de=function(Te){return b.pathAnnulus(Te.rpx0,Te.rpx1,Te.x0,Te.x1,J,G)},he=function(Te){return J+y(Te)[0]*(Te.transform.rCenter||0)+(Te.transform.x||0)},ve=function(Te){return G+y(Te)[1]*(Te.transform.rCenter||0)+(Te.transform.y||0)};(L=L.data(X,v.getPtId)).enter().append("g").classed("slice",!0),E?L.exit().transition().each(function(){var Te=k.select(this);Te.select("path.surface").transition().attrTween("d",function(Q){var se=function(fe){var ye,Me=v.getPtId(fe),Ie=W[Me],Ce=W[v.getPtId(U)];if(Ce){var Re=(fe.x1>Ce.x1?2*Math.PI:0)+ie;ye=fe.rpx1<Ce.rpx1?{x0:fe.x0,x1:fe.x1,rpx0:0,rpx1:0}:{x0:Re,x1:Re,rpx0:fe.rpx0,rpx1:fe.rpx1}}else{var le,ge=v.getPtId(fe.parent);L.each(function(nt){if(v.getPtId(nt)===ge)return le=nt});var _e,Fe=le.children;Fe.forEach(function(nt,tt){if(v.getPtId(nt)===Me)return _e=tt});var Ve=Fe.length,He=l(le.x0,le.x1);ye={rpx0:j,rpx1:j,x0:He(_e/Ve),x1:He((_e+1)/Ve)}}return l(Ie,ye)}(Q);return function(fe){return de(se(fe))}}),Te.select("g.slicetext").attr("opacity",0)}).remove():L.exit().remove(),L.order();var Pe=null;if(E&&V){var xe=v.getPtId(V);L.each(function(Te){null===Pe&&v.getPtId(Te)===xe&&(Pe=Te.x1)})}var ke=L;function Ae(Te){var Q=Te.parent,se=W[v.getPtId(Q)],fe={};if(se){var ye=Q.children,Me=ye.indexOf(Te),Ie=ye.length,Ce=l(se.x0,se.x1);fe.x0=Ce(Me/Ie),fe.x1=Ce(Me/Ie)}else fe.x0=fe.x1=0;return fe}E&&(ke=ke.transition().each("end",function(){var Te=k.select(this);v.setSliceCursor(Te,h,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),ke.each(function(Te){var Re,Q=k.select(this),se=b.ensureSingle(Q,"path","surface",function(Re){Re.style("pointer-events",S?"none":"all")});Te.rpx0=ce(Te.y0),Te.rpx1=ce(Te.y1),Te.xmid=(Te.x0+Te.x1)/2,Te.pxmid=me(Te.rpx1,Te.xmid),Te.midangle=-(Te.xmid-Math.PI/2),Te.startangle=-(Te.x0-Math.PI/2),Te.stopangle=-(Te.x1-Math.PI/2),Te.halfangle=.5*Math.min(b.angleDelta(Te.x0,Te.x1)||Math.PI,Math.PI),Te.ring=1-Te.rpx0/Te.rpx1,Te.rInscribed=0===(Re=Te).rpx0&&b.isFullCircle([Re.x0,Re.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(Re.halfangle)),Re.ring/2)),E?se.transition().attrTween("d",function(Re){var le=function(ge){var _e,Fe=W[v.getPtId(ge)],Ve={x0:ge.x0,x1:ge.x1,rpx0:ge.rpx0,rpx1:ge.rpx1};if(Fe)_e=Fe;else if(V)if(ge.parent)if(Pe){var He=(ge.x1>Pe?2*Math.PI:0)+ie;_e={x0:He,x1:He}}else b.extendFlat(_e={rpx0:j,rpx1:j},Ae(ge));else _e={rpx0:0,rpx1:0};else _e={x0:ie,x1:ie};return l(_e,Ve)}(Re);return function(ge){return de(le(ge))}}):se.attr("d",de),Q.call(f,U,h,m,{eventDataKeys:x.eventDataKeys,transitionTime:x.CLICK_TRANSITION_TIME,transitionEasing:x.CLICK_TRANSITION_EASING}).call(v.setSliceCursor,h,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:h._transitioning}),se.call(c,Te,P);var fe=b.ensureSingle(Q,"g","slicetext"),ye=b.ensureSingle(fe,"text","",function(Re){Re.attr("data-notex",1)}),Me=b.ensureUniformFontSize(h,v.determineTextFont(P,Te,_.font));ye.text(R.formatSliceLabel(Te,U,P,m,_)).classed("slicetext",!0).attr("text-anchor","middle").call(T.font,Me).call(d.convertToTspans,h);var Ie=T.bBox(ye.node());Te.transform=a(Ie,Te,C),Te.transform.targetX=he(Te),Te.transform.targetY=ve(Te);var Ce=function(Re,le){var ge=Re.transform;return i(ge,le),ge.fontSize=Me.size,t(P.type,ge,_),b.getTextTransform(ge)};E?ye.transition().attrTween("transform",function(Re){var le=function(ge){var _e,Fe=W[v.getPtId(ge)],Ve=ge.transform;if(Fe)_e=Fe;else if(_e={rpx1:ge.rpx1,transform:{textPosAngle:Ve.textPosAngle,scale:0,rotate:Ve.rotate,rCenter:Ve.rCenter,x:Ve.x,y:Ve.y}},V)if(ge.parent)if(Pe){var He=ge.x1>Pe?2*Math.PI:0;_e.x0=_e.x1=He}else b.extendFlat(_e,Ae(ge));else _e.x0=_e.x1=ie;else _e.x0=_e.x1=ie;var nt=l(_e.transform.textPosAngle,ge.transform.textPosAngle),tt=l(_e.rpx1,ge.rpx1),ot=l(_e.x0,ge.x0),dt=l(_e.x1,ge.x1),kt=l(_e.transform.scale,Ve.scale),mt=l(_e.transform.rotate,Ve.rotate),wt=0===Ve.rCenter?3:0===_e.transform.rCenter?1/3:1,Lt=l(_e.transform.rCenter,Ve.rCenter);return function(Ct){var It=tt(Ct),Ut=ot(Ct),Rt=dt(Ct),Ge=Lt(Math.pow(Ct,wt)),We={pxmid:me(It,(Ut+Rt)/2),rpx1:It,transform:{textPosAngle:nt(Ct),rCenter:Ge,x:Ve.x,y:Ve.y}};return t(P.type,Ve,_),{transform:{targetX:he(We),targetY:ve(We),scale:kt(Ct),rotate:mt(Ct),rCenter:Ge}}}}(Re);return function(ge){return Ce(le(ge),Ie)}}):ye.attr("transform",Ce(Te,Ie))})}function y(h){return w=h.transform.textPosAngle,[(m=h.rpx1)*Math.sin(w),-m*Math.cos(w)];var m,w}R.plot=function(h,m,w,u){var S,_,E=h._fullLayout,L=E._sunburstlayer,C=!w,P=!E.uniformtext.mode&&v.hasTransition(w);o("sunburst",E),(S=L.selectAll("g.trace.sunburst").data(m,function(I){return I[0].trace.uid})).enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),S.order(),P?(u&&(_=u()),k.transition().duration(w.duration).ease(w.easing).each("end",function(){_&&_()}).each("interrupt",function(){_&&_()}).each(function(){L.selectAll("g.trace").each(function(I){g(h,I,this,w)})})):(S.each(function(I){g(h,I,this,w)}),E.uniformtext.mode&&p(h,E._sunburstlayer.selectAll(".trace"),"sunburst")),C&&S.exit().remove()},R.formatSliceLabel=function(h,m,w,u,S){var _=w.texttemplate,E=w.textinfo;if(!(_||E&&"none"!==E))return"";var L=S.separators,P=h.data.data,I=u[0].hierarchy,U=v.isHierarchyRoot(h),z=v.getParent(I,h),H=v.getValue(h);if(!_){var F,N=E.split("+"),B=function(ee){return-1!==N.indexOf(ee)},j=[];if(B("label")&&P.label&&j.push(P.label),P.hasOwnProperty("v")&&B("value")&&j.push(v.formatValue(P.v,L)),!U){B("current path")&&j.push(v.getPath(h.data));var J=0;B("percent parent")&&J++,B("percent entry")&&J++,B("percent root")&&J++;var G=J>1;if(J){var V,W=function(ee){F=v.formatPercent(V,L),G&&(F+=" of "+ee),j.push(F)};B("percent parent")&&!U&&(V=H/v.getValue(z),W("parent")),B("percent entry")&&(V=H/v.getValue(m),W("entry")),B("percent root")&&(V=H/v.getValue(I),W("root"))}}return B("text")&&(F=b.castOption(w,P.i,"text"),b.isValidTextValue(F)&&j.push(F)),j.join("<br>")}var X=b.castOption(w,P.i,"texttemplate");if(!X)return"";var K={};P.label&&(K.label=P.label),P.hasOwnProperty("v")&&(K.value=P.v,K.valueLabel=v.formatValue(P.v,L)),K.currentPath=v.getPath(h.data),U||(K.percentParent=H/v.getValue(z),K.percentParentLabel=v.formatPercent(K.percentParent,L),K.parent=v.getPtLabel(z)),K.percentEntry=H/v.getValue(m),K.percentEntryLabel=v.formatPercent(K.percentEntry,L),K.entry=v.getPtLabel(m),K.percentRoot=H/v.getValue(I),K.percentRootLabel=v.formatPercent(K.percentRoot,L),K.root=v.getPtLabel(I),P.hasOwnProperty("color")&&(K.color=P.color);var re=b.castOption(w,P.i,"text");return(b.isValidTextValue(re)||""===re)&&(K.text=re),K.customdata=b.castOption(w,P.i,"customdata"),b.texttemplateString(X,K,S._d3locale,K,w._meta||{})}},29969:function($,R,e){"use strict";var k=e(39898),A=e(7901),l=e(71828),T=e(72597).resizeText;function b(d,s,t){var o=s.data.data,r=!s.children,n=o.i,i=l.castOption(t,n,"marker.line.color")||A.defaultLine,a=l.castOption(t,n,"marker.line.width")||0;d.style("stroke-width",a).call(A.fill,o.color).call(A.stroke,i).style("opacity",r?t.leaf.opacity:null)}$.exports={style:function(d){var s=d._fullLayout._sunburstlayer.selectAll(".trace");T(d,s,"sunburst"),s.each(function(t){var o=k.select(this),r=t[0].trace;o.style("opacity",r.opacity),o.selectAll("path.surface").each(function(n){k.select(this).call(b,n,r)})})},styleOne:b}},54532:function($,R,e){"use strict";var k=e(7901),A=e(50693),l=e(12663).axisHoverFormat,T=e(5386).f,b=e(9012),d=e(1426).extendFlat,s=e(30962).overrideAll;function t(r){return{show:{valType:"boolean",dflt:!1},start:{valType:"number",dflt:null,editType:"plot"},end:{valType:"number",dflt:null,editType:"plot"},size:{valType:"number",dflt:null,min:0,editType:"plot"},project:{x:{valType:"boolean",dflt:!1},y:{valType:"boolean",dflt:!1},z:{valType:"boolean",dflt:!1}},color:{valType:"color",dflt:k.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:k.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var o=$.exports=s(d({z:{valType:"data_array"},x:{valType:"data_array"},y:{valType:"data_array"},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:T(),xhoverformat:l("x"),yhoverformat:l("y"),zhoverformat:l("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},A("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:t(),y:t(),z:t()},hidesurface:{valType:"boolean",dflt:!1},lightposition:{x:{valType:"number",min:-1e5,max:1e5,dflt:10},y:{valType:"number",min:-1e5,max:1e5,dflt:1e4},z:{valType:"number",min:-1e5,max:1e5,dflt:0}},lighting:{ambient:{valType:"number",min:0,max:1,dflt:.8},diffuse:{valType:"number",min:0,max:1,dflt:.8},specular:{valType:"number",min:0,max:2,dflt:.05},roughness:{valType:"number",min:0,max:1,dflt:.5},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},_deprecated:{zauto:d({},A.zauto,{}),zmin:d({},A.zmin,{}),zmax:d({},A.zmax,{})},hoverinfo:d({},b.hoverinfo),showlegend:d({},b.showlegend,{dflt:!1})}),"calc","nested");o.x.editType=o.y.editType=o.z.editType="calc+clearAxisTypes",o.transforms=void 0},18396:function($,R,e){"use strict";var k=e(78803);$.exports=function(A,l){k(A,l,l.surfacecolor?{vals:l.surfacecolor,containerStr:"",cLetter:"c"}:{vals:l.z,containerStr:"",cLetter:"c"})}},43768:function($,R,e){"use strict";var k=e(9330).gl_surface3d,A=e(9330).ndarray,l=e(9330).ndarray_linear_interpolate.d2,T=e(824),b=e(43907),d=e(71828).isArrayOrTypedArray,s=e(81697).parseColorScale,t=e(78614),o=e(21081).extractOpts;function r(w,u,S){this.scene=w,this.uid=S,this.surface=u,this.data=null,this.showContour=[!1,!1,!1],this.contourStart=[null,null,null],this.contourEnd=[null,null,null],this.contourSize=[0,0,0],this.minValues=[1/0,1/0,1/0],this.maxValues=[-1/0,-1/0,-1/0],this.dataScaleX=1,this.dataScaleY=1,this.refineData=!0,this.objectOffset=[0,0,0]}var n=r.prototype;n.getXat=function(w,u,S,_){var E=d(this.data.x)?d(this.data.x[0])?this.data.x[u][w]:this.data.x[w]:w;return void 0===S?E:_.d2l(E,0,S)},n.getYat=function(w,u,S,_){var E=d(this.data.y)?d(this.data.y[0])?this.data.y[u][w]:this.data.y[u]:u;return void 0===S?E:_.d2l(E,0,S)},n.getZat=function(w,u,S,_){var E=this.data.z[u][w];return null===E&&this.data.connectgaps&&this.data._interpolatedZ&&(E=this.data._interpolatedZ[u][w]),void 0===S?E:_.d2l(E,0,S)},n.handlePick=function(w){if(w.object===this.surface){var S=(w.data.index[1]-1)/this.dataScaleY-1,_=Math.max(Math.min(Math.round((w.data.index[0]-1)/this.dataScaleX-1),this.data.z[0].length-1),0),E=Math.max(Math.min(Math.round(S),this.data._ylength-1),0);w.index=[_,E],w.traceCoordinate=[this.getXat(_,E),this.getYat(_,E),this.getZat(_,E)],w.dataCoordinate=[this.getXat(_,E,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(_,E,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(_,E,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var L=0;L<3;L++)null!=w.dataCoordinate[L]&&(w.dataCoordinate[L]*=this.scene.dataScale[L]);var C=this.data.hovertext||this.data.text;return w.textLabel=Array.isArray(C)&&C[E]&&void 0!==C[E][_]?C[E][_]:C||"",w.data.dataCoordinate=w.dataCoordinate.slice(),this.surface.highlight(w.data),this.scene.glplot.spikes.position=w.dataCoordinate,!0}};var i=[2,3,5,7,11,13,17,19,23,29,31,37,41,43,47,53,59,61,67,71,73,79,83,89,97,101,103,107,109,113,127,131,137,139,149,151,157,163,167,173,179,181,191,193,197,199,211,223,227,229,233,239,241,251,257,263,269,271,277,281,283,293,307,311,313,317,331,337,347,349,353,359,367,373,379,383,389,397,401,409,419,421,431,433,439,443,449,457,461,463,467,479,487,491,499,503,509,521,523,541,547,557,563,569,571,577,587,593,599,601,607,613,617,619,631,641,643,647,653,659,661,673,677,683,691,701,709,719,727,733,739,743,751,757,761,769,773,787,797,809,811,821,823,827,829,839,853,857,859,863,877,881,883,887,907,911,919,929,937,941,947,953,967,971,977,983,991,997,1009,1013,1019,1021,1031,1033,1039,1049,1051,1061,1063,1069,1087,1091,1093,1097,1103,1109,1117,1123,1129,1151,1153,1163,1171,1181,1187,1193,1201,1213,1217,1223,1229,1231,1237,1249,1259,1277,1279,1283,1289,1291,1297,1301,1303,1307,1319,1321,1327,1361,1367,1373,1381,1399,1409,1423,1427,1429,1433,1439,1447,1451,1453,1459,1471,1481,1483,1487,1489,1493,1499,1511,1523,1531,1543,1549,1553,1559,1567,1571,1579,1583,1597,1601,1607,1609,1613,1619,1621,1627,1637,1657,1663,1667,1669,1693,1697,1699,1709,1721,1723,1733,1741,1747,1753,1759,1777,1783,1787,1789,1801,1811,1823,1831,1847,1861,1867,1871,1873,1877,1879,1889,1901,1907,1913,1931,1933,1949,1951,1973,1979,1987,1993,1997,1999,2003,2011,2017,2027,2029,2039,2053,2063,2069,2081,2083,2087,2089,2099,2111,2113,2129,2131,2137,2141,2143,2153,2161,2179,2203,2207,2213,2221,2237,2239,2243,2251,2267,2269,2273,2281,2287,2293,2297,2309,2311,2333,2339,2341,2347,2351,2357,2371,2377,2381,2383,2389,2393,2399,2411,2417,2423,2437,2441,2447,2459,2467,2473,2477,2503,2521,2531,2539,2543,2549,2551,2557,2579,2591,2593,2609,2617,2621,2633,2647,2657,2659,2663,2671,2677,2683,2687,2689,2693,2699,2707,2711,2713,2719,2729,2731,2741,2749,2753,2767,2777,2789,2791,2797,2801,2803,2819,2833,2837,2843,2851,2857,2861,2879,2887,2897,2903,2909,2917,2927,2939,2953,2957,2963,2969,2971,2999];function a(w,u){if(w<u)return 0;for(var S=0;0===Math.floor(w%u);)w/=u,S++;return S}function c(w){for(var u=[],S=0;S<i.length;S++)u.push(a(w,i[S]));return u}function p(w){for(var u=c(w),S=w,_=0;_<i.length;_++)if(u[_]>0){S=i[_];break}return S}function f(w,u){if(!(w<1||u<1)){for(var S=c(w),_=c(u),E=1,L=0;L<i.length;L++)E*=Math.pow(i[L],Math.max(S[L],_[L]));return E}}n.calcXnums=function(w){var u,S=[];for(u=1;u<w;u++){var _=this.getXat(u-1,0),E=this.getXat(u,0);S[u-1]=E!==_&&null!=_&&null!=E?Math.abs(E-_):0}var L=0;for(u=1;u<w;u++)L+=S[u-1];for(u=1;u<w;u++)S[u-1]=0===S[u-1]?1:Math.round(L/S[u-1]);return S},n.calcYnums=function(w){var u,S=[];for(u=1;u<w;u++){var _=this.getYat(0,u-1),E=this.getYat(0,u);S[u-1]=E!==_&&null!=_&&null!=E?Math.abs(E-_):0}var L=0;for(u=1;u<w;u++)L+=S[u-1];for(u=1;u<w;u++)S[u-1]=0===S[u-1]?1:Math.round(L/S[u-1]);return S};var x=[1,2,4,6,12,24,36,48,60,120,180,240,360,720,840,1260],v=x[9],g=x[13];function y(w,u,S){var _=S[8]+S[2]*u[0]+S[5]*u[1];return w[0]=(S[6]+S[0]*u[0]+S[3]*u[1])/_,w[1]=(S[7]+S[1]*u[0]+S[4]*u[1])/_,w}function h(w,u,S){return function(_,E,L,C){for(var P=[0,0],I=_.shape[0],U=_.shape[1],z=0;z<I;z++)for(var H=0;H<U;H++)L(P,[z,H],C),_.set(z,H,l(E,P[0],P[1]))}(w,u,y,S),w}function m(w,u){for(var S=!1,_=0;_<w.length;_++)if(u===w[_]){S=!0;break}!1===S&&w.push(u)}n.estimateScale=function(w,u){for(var S=1+function(E){if(0!==E.length){for(var L=1,C=0;C<E.length;C++)L=f(L,E[C]);return L}}(0===u?this.calcXnums(w):this.calcYnums(w));S<v;)S*=2;for(;S>g;)S--,S/=p(S),++S<v&&(S=g);var _=Math.round(S/w);return _>1?_:1},n.refineCoords=function(w){for(var u=this.dataScaleX,S=this.dataScaleY,_=w[0].shape[0],E=w[0].shape[1],L=0|Math.floor(w[0].shape[0]*u+1),C=0|Math.floor(w[0].shape[1]*S+1),P=1+_+1,I=1+E+1,U=A(new Float32Array(P*I),[P,I]),z=[1/u,0,0,0,1/S,0,0,0,1],H=0;H<w.length;++H){this.surface.padField(U,w[H]);var F=A(new Float32Array(L*C),[L,C]);h(F,U,z),w[H]=F}},n.setContourLevels=function(){var w,u,_=[[],[],[]],E=[!1,!1,!1],L=!1;for(w=0;w<3;++w)if(this.showContour[w]&&(L=!0,this.contourSize[w]>0&&null!==this.contourStart[w]&&null!==this.contourEnd[w]&&this.contourEnd[w]>this.contourStart[w]))for(E[w]=!0,u=this.contourStart[w];u<this.contourEnd[w];u+=this.contourSize[w])m(_[w],u*this.scene.dataScale[w]);if(L){var C=[[],[],[]];for(w=0;w<3;++w)this.showContour[w]&&(C[w]=E[w]?_[w]:this.scene.contourLevels[w]);this.surface.update({levels:C})}},n.update=function(w){var u,S,_,E,L=this.scene,C=L.fullSceneLayout,P=this.surface,I=s(w),U=L.dataScale,z=w.z[0].length,H=w._ylength,F=L.contourLevels;this.data=w;var N=[];for(u=0;u<3;u++)for(N[u]=[],S=0;S<z;S++)N[u][S]=[];for(S=0;S<z;S++)for(_=0;_<H;_++)N[0][S][_]=this.getXat(S,_,w.xcalendar,C.xaxis),N[1][S][_]=this.getYat(S,_,w.ycalendar,C.yaxis),N[2][S][_]=this.getZat(S,_,w.zcalendar,C.zaxis);if(w.connectgaps)for(w._emptypoints=b(N[2]),T(N[2],w._emptypoints),w._interpolatedZ=[],S=0;S<z;S++)for(w._interpolatedZ[S]=[],_=0;_<H;_++)w._interpolatedZ[S][_]=N[2][S][_];for(u=0;u<3;u++)for(S=0;S<z;S++)for(_=0;_<H;_++)null==(E=N[u][S][_])?N[u][S][_]=NaN:E=N[u][S][_]*=U[u];for(u=0;u<3;u++)for(S=0;S<z;S++)for(_=0;_<H;_++)null!=(E=N[u][S][_])&&(this.minValues[u]>E&&(this.minValues[u]=E),this.maxValues[u]<E&&(this.maxValues[u]=E));for(u=0;u<3;u++)this.objectOffset[u]=.5*(this.minValues[u]+this.maxValues[u]);for(u=0;u<3;u++)for(S=0;S<z;S++)for(_=0;_<H;_++)null!=(E=N[u][S][_])&&(N[u][S][_]-=this.objectOffset[u]);var B=[A(new Float32Array(z*H),[z,H]),A(new Float32Array(z*H),[z,H]),A(new Float32Array(z*H),[z,H])];for(u=0;u<3;u++)for(S=0;S<z;S++)for(_=0;_<H;_++)B[u].set(S,_,N[u][S][_]);N=[];var j={colormap:I,levels:[[],[],[]],showContour:[!0,!0,!0],showSurface:!w.hidesurface,contourProject:[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],contourWidth:[1,1,1],contourColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],contourTint:[1,1,1],dynamicColor:[[1,1,1,1],[1,1,1,1],[1,1,1,1]],dynamicWidth:[1,1,1],dynamicTint:[1,1,1],opacityscale:w.opacityscale,opacity:w.opacity},J=o(w);if(j.intensityBounds=[J.min,J.max],w.surfacecolor){var G=A(new Float32Array(z*H),[z,H]);for(S=0;S<z;S++)for(_=0;_<H;_++)G.set(S,_,w.surfacecolor[_][S]);B.push(G)}else j.intensityBounds[0]*=U[2],j.intensityBounds[1]*=U[2];(g<B[0].shape[0]||g<B[0].shape[1])&&(this.refineData=!1),!0===this.refineData&&(this.dataScaleX=this.estimateScale(B[0].shape[0],0),this.dataScaleY=this.estimateScale(B[0].shape[1],1),1===this.dataScaleX&&1===this.dataScaleY||this.refineCoords(B)),w.surfacecolor&&(j.intensity=B.pop());var K,re,ee,V=[!0,!0,!0],W=["x","y","z"];for(u=0;u<3;++u){var X=w.contours[W[u]];V[u]=X.highlight,j.showContour[u]=X.show||X.highlight,j.showContour[u]&&(j.contourProject[u]=[X.project.x,X.project.y,X.project.z],X.show?(this.showContour[u]=!0,j.levels[u]=F[u],P.highlightColor[u]=j.contourColor[u]=t(X.color),P.highlightTint[u]=j.contourTint[u]=X.usecolormap?0:1,j.contourWidth[u]=X.width,this.contourStart[u]=X.start,this.contourEnd[u]=X.end,this.contourSize[u]=X.size):(this.showContour[u]=!1,this.contourStart[u]=null,this.contourEnd[u]=null,this.contourSize[u]=0),X.highlight&&(j.dynamicColor[u]=t(X.highlightcolor),j.dynamicWidth[u]=X.highlightwidth))}(re=(K=I)[0].rgb)[0]===(ee=K[K.length-1].rgb)[0]&&re[1]===ee[1]&&re[2]===ee[2]&&re[3]===ee[3]&&(j.vertexColor=!0),j.objectOffset=this.objectOffset,j.coords=B,P.update(j),P.visible=w.visible,P.enableDynamic=V,P.enableHighlight=V,P.snapToData=!0,"lighting"in w&&(P.ambientLight=w.lighting.ambient,P.diffuseLight=w.lighting.diffuse,P.specularLight=w.lighting.specular,P.roughness=w.lighting.roughness,P.fresnel=w.lighting.fresnel),"lightposition"in w&&(P.lightPosition=[w.lightposition.x,w.lightposition.y,w.lightposition.z])},n.dispose=function(){this.scene.glplot.remove(this.surface),this.surface.dispose()},$.exports=function(w,u){var _=k({gl:w.glplot.gl}),E=new r(w,_,u.uid);return _._trace=E,E.update(u),w.glplot.add(_),E}},91831:function($,R,e){"use strict";var k=e(73972),A=e(71828),l=e(1586),T=e(54532);function b(s,t,o,r){var n=r("opacityscale");"max"===n?t.opacityscale=[[0,.1],[1,1]]:"min"===n?t.opacityscale=[[0,1],[1,.1]]:"extremes"===n?t.opacityscale=function(i,a){for(var c=[],p=0;p<32;p++){var f=p/31,x=.1+.9*(1-Math.pow(Math.sin(1*f*Math.PI),2));c.push([f,Math.max(0,Math.min(1,x))])}return c}():function(i){var a=0;if(!Array.isArray(i)||i.length<2||!i[0]||!i[i.length-1]||0!=+i[0][0]||1!=+i[i.length-1][0])return!1;for(var c=0;c<i.length;c++){var p=i[c];if(2!==p.length||+p[0]<a)return!1;a=+p[0]}return!0}(n)||(t.opacityscale=void 0)}function d(s,t,o){t in s&&!(o in s)&&(s[o]=s[t])}$.exports={supplyDefaults:function(s,t,o,r){var n,i;function a(m,w){return A.coerce(s,t,T,m,w)}var c=a("x"),p=a("y"),f=a("z");if(!f||!f.length||c&&c.length<1||p&&p.length<1)t.visible=!1;else{t._xlength=Array.isArray(c)&&A.isArrayOrTypedArray(c[0])?f.length:f[0].length,t._ylength=f.length,k.getComponentMethod("calendars","handleTraceDefaults")(s,t,["x","y","z"],r),a("text"),a("hovertext"),a("hovertemplate"),a("xhoverformat"),a("yhoverformat"),a("zhoverformat"),["lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lightposition.x","lightposition.y","lightposition.z","hidesurface","connectgaps","opacity"].forEach(function(m){a(m)});var x=a("surfacecolor"),v=["x","y","z"];for(n=0;n<3;++n){var g="contours."+v[n],y=a(g+".show"),h=a(g+".highlight");if(y||h)for(i=0;i<3;++i)a(g+".project."+v[i]);y&&(a(g+".color"),a(g+".width"),a(g+".usecolormap")),h&&(a(g+".highlightcolor"),a(g+".highlightwidth")),a(g+".start"),a(g+".end"),a(g+".size")}x||(d(s,"zmin","cmin"),d(s,"zmax","cmax"),d(s,"zauto","cauto")),l(s,t,r,a,{prefix:"",cLetter:"c"}),b(0,t,0,a),t._length=null}},opacityscaleDefaults:b}},93601:function($,R,e){"use strict";$.exports={attributes:e(54532),supplyDefaults:e(91831).supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:e(18396),plot:e(43768),moduleType:"trace",name:"surface",basePlotModule:e(58547),categories:["gl3d","2dMap","showLegend"],meta:{}}},44464:function($,R,e){"use strict";var k=e(50215),A=e(1426).extendFlat,l=e(30962).overrideAll,T=e(41940),b=e(27670).Y,d=e(12663).descriptionOnlyNumbers;($.exports=l({domain:b({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:d("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:A({},k.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:A({},T({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:d("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:A({},k.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:A({},T({arrayOk:!0}))}},"calc","from-root")).transforms=void 0},99469:function($,R,e){"use strict";var k=e(27659).a0,A=e(36736),l="table";R.name=l,R.plot=function(T){var b=k(T.calcdata,l)[0];b.length&&A(T,b)},R.clean=function(T,b,d,s){var t=s._has&&s._has(l),o=b._has&&b._has(l);t&&!o&&s._paperdiv.selectAll(".table").remove()}},76333:function($,R,e){"use strict";var k=e(28984).wrap;$.exports=function(){return k({})}},49850:function($){"use strict";$.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"<br>",maxDimensionCount:60,overdrag:45,releaseTransitionDuration:120,releaseTransitionEase:"cubic-out",scrollbarCaptureWidth:18,scrollbarHideDelay:1e3,scrollbarHideDuration:1e3,scrollbarOffset:5,scrollbarWidth:8,transitionDuration:100,transitionEase:"cubic-out",uplift:5,wrapSpacer:" ",wrapSplitCharacter:" ",cn:{table:"table",tableControlView:"table-control-view",scrollBackground:"scroll-background",yColumn:"y-column",columnBlock:"column-block",scrollAreaClip:"scroll-area-clip",scrollAreaClipRect:"scroll-area-clip-rect",columnBoundary:"column-boundary",columnBoundaryClippath:"column-boundary-clippath",columnBoundaryRect:"column-boundary-rect",columnCells:"column-cells",columnCell:"column-cell",cellRect:"cell-rect",cellText:"cell-text",cellTextHolder:"cell-text-holder",scrollbarKit:"scrollbar-kit",scrollbar:"scrollbar",scrollbarSlider:"scrollbar-slider",scrollbarGlyph:"scrollbar-glyph",scrollbarCaptureZone:"scrollbar-capture-zone"}}},51018:function($,R,e){"use strict";var k=e(49850),A=e(1426).extendFlat,l=e(92770);function T(n){if(Array.isArray(n)){for(var i=0,a=0;a<n.length;a++)i=Math.max(i,T(n[a]));return i}return n}function b(n,i){return n+i}function d(n){var i,a=n.slice(),c=1/0,p=0;for(i=0;i<a.length;i++)Array.isArray(a[i])||(a[i]=[a[i]]),c=Math.min(c,a[i].length),p=Math.max(p,a[i].length);if(c!==p)for(i=0;i<a.length;i++){var f=p-a[i].length;f&&(a[i]=a[i].concat(s(f)))}return a}function s(n){for(var i=new Array(n),a=0;a<n;a++)i[a]="";return i}function t(n){return n.calcdata.columns.reduce(function(i,a){return a.xIndex<n.xIndex?i+a.columnWidth:i},0)}function o(n,i){return Object.keys(n).map(function(a){return A({},n[a],{auxiliaryBlocks:i})})}function r(n,i){for(var a,c={},p=0,f=0,x={firstRowIndex:null,lastRowIndex:null,rows:[]},v=0,g=0,y=0;y<n.length;y++)x.rows.push({rowIndex:y,rowHeight:a=n[y]}),((f+=a)>=i||y===n.length-1)&&(c[p]=x,x.key=g++,x.firstRowIndex=v,x.lastRowIndex=y,x={firstRowIndex:null,lastRowIndex:null,rows:[]},p+=f,v=y+1,f=0);return c}$.exports=function(n,i){var a=d(i.cells.values),c=function(U){return U.slice(i.header.values.length,U.length)},p=d(i.header.values);p.length&&!p[0].length&&(p[0]=[""],p=d(p));var f=p.concat(c(a).map(function(){return s((p[0]||[""]).length)})),x=i.domain,v=Math.floor(n._fullLayout._size.w*(x.x[1]-x.x[0])),g=Math.floor(n._fullLayout._size.h*(x.y[1]-x.y[0])),y=i.header.values.length?f[0].map(function(){return i.header.height}):[k.emptyHeaderHeight],h=a.length?a[0].map(function(){return i.cells.height}):[],m=y.reduce(b,0),w=r(h,g-m+k.uplift),u=o(r(y,m),[]),S=o(w,u),_={},E=i._fullInput.columnorder.concat(c(a.map(function(U,z){return z}))),L=f.map(function(U,z){var H=Array.isArray(i.columnwidth)?i.columnwidth[Math.min(z,i.columnwidth.length-1)]:i.columnwidth;return l(H)?Number(H):1}),C=L.reduce(b,0);L=L.map(function(U){return U/C*v});var P=Math.max(T(i.header.line.width),T(i.cells.line.width)),I={key:i.uid+n._context.staticPlot,translateX:x.x[0]*n._fullLayout._size.w,translateY:n._fullLayout._size.h*(1-x.y[1]),size:n._fullLayout._size,width:v,maxLineWidth:P,height:g,columnOrder:E,groupHeight:g,rowBlocks:S,headerRowBlocks:u,scrollY:0,cells:A({},i.cells,{values:a}),headerCells:A({},i.header,{values:f}),gdColumns:f.map(function(U){return U[0]}),gdColumnsOriginalOrder:f.map(function(U){return U[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:f.map(function(U,z){return _[U]=(_[U]||0)+1,{key:U+"__"+_[U],label:U,specIndex:z,xIndex:E[z],xScale:t,x:void 0,calcdata:void 0,columnWidth:L[z]}})};return I.columns.forEach(function(U){U.calcdata=I,U.x=t(U)}),I}},56269:function($,R,e){"use strict";var k=e(1426).extendFlat;R.splitToPanels=function(A){var l=[0,0],T=k({},A,{key:"header",type:"header",page:0,prevPages:l,currentRepaint:[null,null],dragHandle:!0,values:A.calcdata.headerCells.values[A.specIndex],rowBlocks:A.calcdata.headerRowBlocks,calcdata:k({},A.calcdata,{cells:A.calcdata.headerCells})});return[k({},A,{key:"cells1",type:"cells",page:0,prevPages:l,currentRepaint:[null,null],dragHandle:!1,values:A.calcdata.cells.values[A.specIndex],rowBlocks:A.calcdata.rowBlocks}),k({},A,{key:"cells2",type:"cells",page:1,prevPages:l,currentRepaint:[null,null],dragHandle:!1,values:A.calcdata.cells.values[A.specIndex],rowBlocks:A.calcdata.rowBlocks}),T]},R.splitToCells=function(A){var T,b,d,l=[d=(b=(T=A).rowBlocks[T.page])?b.rows[0].rowIndex:0,b?d+b.rows.length:0];return(A.values||[]).slice(l[0],l[1]).map(function(T,b){return{keyWithinBlock:b+("string"==typeof T&&T.match(/[<$&> ]/)?"_keybuster_"+Math.random():""),key:l[0]+b,column:A,calcdata:A.calcdata,page:A.page,rowBlocks:A.rowBlocks,value:T}})}},39754:function($,R,e){"use strict";var k=e(71828),A=e(44464),l=e(27670).c;$.exports=function(T,b,d,s){function t(o,r){return k.coerce(T,b,A,o,r)}l(b,s,t),t("columnwidth"),t("header.values"),t("header.format"),t("header.align"),t("header.prefix"),t("header.suffix"),t("header.height"),t("header.line.width"),t("header.line.color"),t("header.fill.color"),k.coerceFont(t,"header.font",k.extendFlat({},s.font)),function(o,r){for(var i=o.header.values.length,a=(o.columnorder||[]).slice(0,i),c=a.slice().sort(function(x,v){return x-v}),p=a.map(function(x){return c.indexOf(x)}),f=p.length;f<i;f++)p.push(f);r("columnorder",p)}(b,t),t("cells.values"),t("cells.format"),t("cells.align"),t("cells.prefix"),t("cells.suffix"),t("cells.height"),t("cells.line.width"),t("cells.line.color"),t("cells.fill.color"),k.coerceFont(t,"cells.font",k.extendFlat({},s.font)),b._length=null}},96595:function($,R,e){"use strict";$.exports={attributes:e(44464),supplyDefaults:e(39754),calc:e(76333),plot:e(36736),moduleType:"trace",name:"table",basePlotModule:e(99469),categories:["noOpacity"],meta:{}}},36736:function($,R,e){"use strict";var k=e(49850),A=e(39898),l=e(71828).numberFormat,T=e(28984),b=e(91424),d=e(63893),s=e(71828).raiseToTop,t=e(71828).strTranslate,o=e(71828).cancelTransition,r=e(51018),n=e(56269),i=e(7901);function a(B){return Math.ceil(B.calcdata.maxLineWidth/2)}function c(B,j){return"clip"+B._fullLayout._uid+"_scrollAreaBottomClip_"+j.key}function p(B,j){return"clip"+B._fullLayout._uid+"_columnBoundaryClippath_"+j.calcdata.key+"_"+j.specIndex}function f(B){return[].concat.apply([],B.map(function(j){return j})).map(function(j){return j.__data__})}function x(B,j,J){var G=B.selectAll("."+k.cn.scrollbarKit).data(T.repeat,T.keyFun);G.enter().append("g").classed(k.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),G.each(function(re){var oe,ee=re.scrollbarState;ee.totalHeight=z(oe=re.rowBlocks,oe.length-1)+(oe.length?H(oe[oe.length-1],1/0):1),ee.scrollableAreaHeight=re.groupHeight-S(re),ee.currentlyVisibleHeight=Math.min(ee.totalHeight,ee.scrollableAreaHeight),ee.ratio=ee.currentlyVisibleHeight/ee.totalHeight,ee.barLength=Math.max(ee.ratio*ee.currentlyVisibleHeight,k.goldenRatio*k.scrollbarWidth),ee.barWiggleRoom=ee.currentlyVisibleHeight-ee.barLength,ee.wiggleRoom=Math.max(0,ee.totalHeight-ee.scrollableAreaHeight),ee.topY=0===ee.barWiggleRoom?0:re.scrollY/ee.wiggleRoom*ee.barWiggleRoom,ee.bottomY=ee.topY+ee.barLength,ee.dragMultiplier=ee.wiggleRoom/ee.barWiggleRoom}).attr("transform",function(re){return t(re.width+k.scrollbarWidth/2+k.scrollbarOffset,S(re))});var V=G.selectAll("."+k.cn.scrollbar).data(T.repeat,T.keyFun);V.enter().append("g").classed(k.cn.scrollbar,!0);var W=V.selectAll("."+k.cn.scrollbarSlider).data(T.repeat,T.keyFun);W.enter().append("g").classed(k.cn.scrollbarSlider,!0),W.attr("transform",function(re){return t(0,re.scrollbarState.topY||0)});var X=W.selectAll("."+k.cn.scrollbarGlyph).data(T.repeat,T.keyFun);X.enter().append("line").classed(k.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",k.scrollbarWidth).attr("stroke-linecap","round").attr("y1",k.scrollbarWidth/2),X.attr("y2",function(re){return re.scrollbarState.barLength-k.scrollbarWidth/2}).attr("stroke-opacity",function(re){return re.columnDragInProgress||!re.scrollbarState.barWiggleRoom||J?0:.4}),X.transition().delay(0).duration(0),X.transition().delay(k.scrollbarHideDelay).duration(k.scrollbarHideDuration).attr("stroke-opacity",0);var K=V.selectAll("."+k.cn.scrollbarCaptureZone).data(T.repeat,T.keyFun);K.enter().append("line").classed(k.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",k.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(re){var ee=A.event.y,ie=this.getBoundingClientRect(),oe=re.scrollbarState,ce=ee-ie.top,me=A.scale.linear().domain([0,oe.scrollableAreaHeight]).range([0,oe.totalHeight]).clamp(!0);oe.topY<=ce&&ce<=oe.bottomY||E(j,B,null,me(ce-oe.barLength/2))(re)}).call(A.behavior.drag().origin(function(re){return A.event.stopPropagation(),re.scrollbarState.scrollbarScrollInProgress=!0,re}).on("drag",E(j,B)).on("dragend",function(){})),K.attr("y2",function(re){return re.scrollbarState.scrollableAreaHeight}),j._context.staticPlot&&(X.remove(),K.remove())}function v(B,j,J,G){var ie,W=function(ee){var ie=ee.selectAll("."+k.cn.columnCell).data(n.splitToCells,function(oe){return oe.keyWithinBlock});return ie.enter().append("g").classed(k.cn.columnCell,!0),ie.exit().remove(),ie}(((ie=J.selectAll("."+k.cn.columnCells).data(T.repeat,T.keyFun)).enter().append("g").classed(k.cn.columnCells,!0),ie.exit().remove(),ie));W.each(function(ie,oe){var ce=ie.calcdata.cells.font,me=ie.column.specIndex,de={size:h(ce.size,me,oe),color:h(ce.color,me,oe),family:h(ce.family,me,oe)};ie.rowNumber=ie.key,ie.align=h(ie.calcdata.cells.align,me,oe),ie.cellBorderWidth=h(ie.calcdata.cells.line.width,me,oe),ie.font=de});var X=function(ee){var ie=ee.selectAll("."+k.cn.cellRect).data(T.repeat,function(oe){return oe.keyWithinBlock});return ie.enter().append("rect").classed(k.cn.cellRect,!0),ie}(W);!function(ee){ee.attr("width",function(ie){return ie.column.columnWidth}).attr("stroke-width",function(ie){return ie.cellBorderWidth}).each(function(ie){var oe=A.select(this);i.stroke(oe,h(ie.calcdata.cells.line.color,ie.column.specIndex,ie.rowNumber)),i.fill(oe,h(ie.calcdata.cells.fill.color,ie.column.specIndex,ie.rowNumber))})}(X);var K=function(ee){var ie=ee.selectAll("."+k.cn.cellTextHolder).data(T.repeat,function(oe){return oe.keyWithinBlock});return ie.enter().append("g").classed(k.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),ie}(W),re=function(ee){var ie=ee.selectAll("."+k.cn.cellText).data(T.repeat,function(oe){return oe.keyWithinBlock});return ie.enter().append("text").classed(k.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){A.event.stopPropagation()}),ie}(K);(function(ee){ee.each(function(ie){b.font(A.select(this),ie.font)})})(re),g(re,j,G,B),U(W)}function g(B,j,J,G){B.text(function(V){var W=V.column.specIndex,X=V.rowNumber,K=V.value,re="string"==typeof K,ee=re&&K.match(/<br>/i),ie=!re||ee;V.mayHaveMarkup=re&&K.match(/[<&>]/);var oe,ce="string"==typeof(oe=K)&&oe.match(k.latexCheck);V.latex=ce;var me,de,he=ce?"":h(V.calcdata.cells.prefix,W,X)||"",ve=ce?"":h(V.calcdata.cells.suffix,W,X)||"",Pe=ce?null:h(V.calcdata.cells.format,W,X)||null,xe=he+(Pe?l(Pe)(V.value):V.value)+ve;if(V.wrappingNeeded=!V.wrapped&&!ie&&!ce&&(me=y(xe)),V.cellHeightMayIncrease=ee||ce||V.mayHaveMarkup||(void 0===me?y(xe):me),V.needsConvertToTspans=V.mayHaveMarkup||V.wrappingNeeded||V.latex,V.wrappingNeeded){var ke=(" "===k.wrapSplitCharacter?xe.replace(/<a href=/gi,"<a_href="):xe).split(k.wrapSplitCharacter),Ae=" "===k.wrapSplitCharacter?ke.map(function(Te){return Te.replace(/<a_href=/gi,"<a href=")}):ke;V.fragments=Ae.map(function(Te){return{text:Te,width:null}}),V.fragments.push({fragment:k.wrapSpacer,width:null}),de=Ae.join(k.lineBreaker)+k.lineBreaker+k.wrapSpacer}else delete V.fragments,de=xe;return de}).attr("dy",function(V){return V.needsConvertToTspans?0:"0.75em"}).each(function(V){var W=this,X=A.select(W);V.needsConvertToTspans?d.convertToTspans(X,G,(V.wrappingNeeded?C:P)(J,W,j,G,V)):A.select(W.parentNode).attr("transform",function(re){return t(I(re),k.cellPad)}).attr("text-anchor",function(re){return{left:"start",center:"middle",right:"end"}[re.align]})})}function y(B){return-1!==B.indexOf(k.wrapSplitCharacter)}function h(B,j,J){if(Array.isArray(B)){var G=B[Math.min(j,B.length-1)];return Array.isArray(G)?G[Math.min(J,G.length-1)]:G}return B}function m(B,j,J){B.transition().ease(k.releaseTransitionEase).duration(k.releaseTransitionDuration).attr("transform",t(j.x,J))}function w(B){return"cells"===B.type}function u(B){return"header"===B.type}function S(B){return(B.rowBlocks.length?B.rowBlocks[0].auxiliaryBlocks:[]).reduce(function(j,J){return j+H(J,1/0)},0)}function _(B,j,J){var G=f(j)[0];if(void 0!==G){var V=G.rowBlocks,W=G.calcdata,X=z(V,V.length),K=G.calcdata.groupHeight-S(G),re=W.scrollY=Math.max(0,Math.min(X-K,W.scrollY)),ee=function(ie,oe,ce){for(var me=[],de=0,he=0;he<ie.length;he++){for(var ve=ie[he],Pe=ve.rows,xe=0,ke=0;ke<Pe.length;ke++)xe+=Pe[ke].rowHeight;ve.allRowsHeight=xe,oe<de+xe&&oe+ce>de&&me.push(he),de+=xe}return me}(V,re,K);1===ee.length&&(ee[0]===V.length-1?ee.unshift(ee[0]-1):ee.push(ee[0]+1)),ee[0]%2&&ee.reverse(),j.each(function(ie,oe){ie.page=ee[oe],ie.scrollY=re}),j.attr("transform",function(ie){var oe=z(ie.rowBlocks,ie.page)-ie.scrollY;return t(0,oe)}),B&&(L(B,J,j,ee,G.prevPages,G,0),L(B,J,j,ee,G.prevPages,G,1),x(J,B))}}function E(B,j,J,G){return function(V){var W=V.calcdata?V.calcdata:V,X=j.filter(function(ie){return W.key===ie.key}),re=W.scrollY;W.scrollY=void 0===G?W.scrollY+(J||W.scrollbarState.dragMultiplier)*A.event.dy:G;var ee=X.selectAll("."+k.cn.yColumn).selectAll("."+k.cn.columnBlock).filter(w);return _(B,ee,X),W.scrollY===re}}function L(B,j,J,G,V,W,X){G[X]!==V[X]&&(clearTimeout(W.currentRepaint[X]),W.currentRepaint[X]=setTimeout(function(){var K=J.filter(function(re,ee){return ee===X&&G[ee]!==V[ee]});v(B,j,K,J),V[X]=G[X]}))}function C(B,j,J,G){return function(){var V=A.select(j.parentNode);V.each(function(W){var X=W.fragments;V.selectAll("tspan.line").each(function(de,he){X[he].width=this.getComputedTextLength()});var K,re,ee=X[X.length-1].width,ie=X.slice(0,-1),oe=[],ce=0,me=W.column.columnWidth-2*k.cellPad;for(W.value="";ie.length;)ce+(re=(K=ie.shift()).width+ee)>me&&(W.value+=oe.join(k.wrapSpacer)+k.lineBreaker,oe=[],ce=0),oe.push(K.text),ce+=re;ce&&(W.value+=oe.join(k.wrapSpacer)),W.wrapped=!0}),V.selectAll("tspan.line").remove(),g(V.select("."+k.cn.cellText),J,B,G),A.select(j.parentNode.parentNode).call(U)}}function P(B,j,J,G,V){return function(){if(!V.settledY){var W=A.select(j.parentNode),X=N(V),K=V.key-X.firstRowIndex,re=X.rows[K].rowHeight,ee=V.cellHeightMayIncrease?j.parentNode.getBoundingClientRect().height+2*k.cellPad:re,ie=Math.max(ee,re);ie-X.rows[K].rowHeight&&(X.rows[K].rowHeight=ie,B.selectAll("."+k.cn.columnCell).call(U),_(null,B.filter(w),0),x(J,G,!0)),W.attr("transform",function(){var ce=this.parentNode.getBoundingClientRect(),me=A.select(this.parentNode).select("."+k.cn.cellRect).node().getBoundingClientRect(),de=this.transform.baseVal.consolidate(),he=me.top-ce.top+(de?de.matrix.f:k.cellPad);return t(I(V,A.select(this.parentNode).select("."+k.cn.cellTextHolder).node().getBoundingClientRect().width),he)}),V.settledY=!0}}}function I(B,j){switch(B.align){case"left":default:return k.cellPad;case"right":return B.column.columnWidth-(j||0)-k.cellPad;case"center":return(B.column.columnWidth-(j||0))/2}}function U(B){B.attr("transform",function(j){var J=j.rowBlocks[0].auxiliaryBlocks.reduce(function(V,W){return V+H(W,1/0)},0),G=H(N(j),j.key);return t(0,G+J)}).selectAll("."+k.cn.cellRect).attr("height",function(j){return(J=N(j),G=j.key,J.rows[G-J.firstRowIndex]).rowHeight;var J,G})}function z(B,j){for(var J=0,G=j-1;G>=0;G--)J+=F(B[G]);return J}function H(B,j){for(var J=0,G=0;G<B.rows.length&&B.rows[G].rowIndex<j;G++)J+=B.rows[G].rowHeight;return J}function F(B){var j=B.allRowsHeight;if(void 0!==j)return j;for(var J=0,G=0;G<B.rows.length;G++)J+=B.rows[G].rowHeight;return B.allRowsHeight=J,J}function N(B){return B.rowBlocks[B.page]}$.exports=function(B,j){var J=!B._context.staticPlot,G=B._fullLayout._paper.selectAll("."+k.cn.table).data(j.map(function(ve){var Pe=T.unwrap(ve).trace;return r(B,Pe)}),T.keyFun);G.exit().remove(),G.enter().append("g").classed(k.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),G.attr("width",function(ve){return ve.width+ve.size.l+ve.size.r}).attr("height",function(ve){return ve.height+ve.size.t+ve.size.b}).attr("transform",function(ve){return t(ve.translateX,ve.translateY)});var V=G.selectAll("."+k.cn.tableControlView).data(T.repeat,T.keyFun),W=V.enter().append("g").classed(k.cn.tableControlView,!0).style("box-sizing","content-box");if(J){var X="onwheel"in document?"wheel":"mousewheel";W.on("mousemove",function(ve){V.filter(function(Pe){return ve===Pe}).call(x,B)}).on(X,function(ve){ve.scrollbarState.wheeling||(ve.scrollbarState.wheeling=!0,E(B,V,null,ve.scrollY+A.event.deltaY)(ve)||(A.event.stopPropagation(),A.event.preventDefault()),ve.scrollbarState.wheeling=!1)}).call(x,B,!0)}V.attr("transform",function(ve){return t(ve.size.l,ve.size.t)});var K=V.selectAll("."+k.cn.scrollBackground).data(T.repeat,T.keyFun);K.enter().append("rect").classed(k.cn.scrollBackground,!0).attr("fill","none"),K.attr("width",function(ve){return ve.width}).attr("height",function(ve){return ve.height}),V.each(function(ve){b.setClipUrl(A.select(this),c(B,ve),B)});var re=V.selectAll("."+k.cn.yColumn).data(function(ve){return ve.columns},T.keyFun);re.enter().append("g").classed(k.cn.yColumn,!0),re.exit().remove(),re.attr("transform",function(ve){return t(ve.x,0)}),J&&re.call(A.behavior.drag().origin(function(ve){return m(A.select(this),ve,-k.uplift),s(this),ve.calcdata.columnDragInProgress=!0,x(V.filter(function(Pe){return ve.calcdata.key===Pe.key}),B),ve}).on("drag",function(ve){var Pe=A.select(this),xe=function(ke){return(ve===ke?A.event.x:ke.x)+ke.columnWidth/2};ve.x=Math.max(-k.overdrag,Math.min(ve.calcdata.width+k.overdrag-ve.columnWidth,A.event.x)),f(re).filter(function(ke){return ke.calcdata.key===ve.calcdata.key}).sort(function(ke,Ae){return xe(ke)-xe(Ae)}).forEach(function(ke,Ae){ke.xIndex=Ae,ke.x=ve===ke?ke.x:ke.xScale(ke)}),re.filter(function(ke){return ve!==ke}).transition().ease(k.transitionEase).duration(k.transitionDuration).attr("transform",function(ke){return t(ke.x,0)}),Pe.call(o).attr("transform",t(ve.x,-k.uplift))}).on("dragend",function(ve){var ke,Ae,Te,Q,Pe=A.select(this),xe=ve.calcdata;ve.x=ve.xScale(ve),ve.calcdata.columnDragInProgress=!1,m(Pe,ve,0),ke=B,Ae=xe,Te=xe.columns.map(function(ke){return ke.xIndex}),Q=Ae.gdColumnsOriginalOrder,Ae.gdColumns.sort(function(se,fe){return Te[Q.indexOf(se)]-Te[Q.indexOf(fe)]}),Ae.columnorder=Te,ke.emit("plotly_restyle")})),re.each(function(ve){b.setClipUrl(A.select(this),p(B,ve),B)});var ee=re.selectAll("."+k.cn.columnBlock).data(n.splitToPanels,T.keyFun);ee.enter().append("g").classed(k.cn.columnBlock,!0).attr("id",function(ve){return ve.key}),ee.style("cursor",function(ve){return ve.dragHandle?"ew-resize":ve.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var ie=ee.filter(u),oe=ee.filter(w);J&&oe.call(A.behavior.drag().origin(function(ve){return A.event.stopPropagation(),ve}).on("drag",E(B,V,-1)).on("dragend",function(){})),v(B,V,ie,ee),v(B,V,oe,ee);var ce=V.selectAll("."+k.cn.scrollAreaClip).data(T.repeat,T.keyFun);ce.enter().append("clipPath").classed(k.cn.scrollAreaClip,!0).attr("id",function(ve){return c(B,ve)});var me=ce.selectAll("."+k.cn.scrollAreaClipRect).data(T.repeat,T.keyFun);me.enter().append("rect").classed(k.cn.scrollAreaClipRect,!0).attr("x",-k.overdrag).attr("y",-k.uplift).attr("fill","none"),me.attr("width",function(ve){return ve.width+2*k.overdrag}).attr("height",function(ve){return ve.height+k.uplift}),re.selectAll("."+k.cn.columnBoundary).data(T.repeat,T.keyFun).enter().append("g").classed(k.cn.columnBoundary,!0);var de=re.selectAll("."+k.cn.columnBoundaryClippath).data(T.repeat,T.keyFun);de.enter().append("clipPath").classed(k.cn.columnBoundaryClippath,!0),de.attr("id",function(ve){return p(B,ve)});var he=de.selectAll("."+k.cn.columnBoundaryRect).data(T.repeat,T.keyFun);he.enter().append("rect").classed(k.cn.columnBoundaryRect,!0).attr("fill","none"),he.attr("width",function(ve){return ve.columnWidth+2*a(ve)}).attr("height",function(ve){return ve.calcdata.height+2*a(ve)+k.uplift}).attr("x",function(ve){return-a(ve)}).attr("y",function(ve){return-a(ve)}),_(null,oe,V)}},45802:function($,R,e){"use strict";var k=e(5386).f,A=e(5386).s,l=e(50693),T=e(27670).Y,b=e(34e3),d=e(57564),s=e(43473),t=e(1426).extendFlat;$.exports={labels:d.labels,parents:d.parents,values:d.values,branchvalues:d.branchvalues,count:d.count,level:d.level,maxdepth:d.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:t({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:d.marker.colors,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:d.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},l("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:t({},b.textfont,{}),editType:"calc"},text:b.text,textinfo:d.textinfo,texttemplate:A({editType:"plot"},{keys:s.eventDataKeys.concat(["label","value"])}),hovertext:b.hovertext,hoverinfo:d.hoverinfo,hovertemplate:k({},{keys:s.eventDataKeys}),textfont:b.textfont,insidetextfont:b.insidetextfont,outsidetextfont:t({},b.outsidetextfont,{}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"top left",editType:"plot"},sort:b.sort,root:d.root,domain:T({name:"treemap",trace:!0,editType:"calc"})}},78018:function($,R,e){"use strict";var k=e(74875);R.name="treemap",R.plot=function(A,l,T,b){k.plotBasePlot(R.name,A,l,T,b)},R.clean=function(A,l,T,b){k.cleanBasePlot(R.name,A,l,T,b)}},65039:function($,R,e){"use strict";var k=e(52147);R.y=function(A,l){return k.calc(A,l)},R.T=function(A){return k._runCrossTraceCalc("treemap",A)}},43473:function($){"use strict";$.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},91174:function($,R,e){"use strict";var k=e(71828),A=e(45802),l=e(7901),T=e(27670).c,b=e(90769).handleText,d=e(97313).TEXTPAD,s=e(21081),t=s.hasColorscale,o=s.handleDefaults;$.exports=function(r,n,i,a){function c(w,u){return k.coerce(r,n,A,w,u)}var p=c("labels"),f=c("parents");if(p&&p.length&&f&&f.length){var x=c("values");c(x&&x.length?"branchvalues":"count"),c("level"),c("maxdepth"),"squarify"===c("tiling.packing")&&c("tiling.squarifyratio"),c("tiling.flip"),c("tiling.pad");var v=c("text");c("texttemplate"),n.texttemplate||c("textinfo",Array.isArray(v)?"text+label":"label"),c("hovertext"),c("hovertemplate");var g=c("pathbar.visible");b(r,n,a,c,"auto",{hasPathbar:g,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),c("textposition");var y=-1!==n.textposition.indexOf("bottom");c("marker.line.width")&&c("marker.line.color",a.paper_bgcolor);var h=c("marker.colors");(n._hasColorscale=t(r,"marker","colors")||(r.marker||{}).coloraxis)?o(r,n,a,c,{prefix:"marker.",cLetter:"c"}):c("marker.depthfade",!(h||[]).length);var m=2*n.textfont.size;c("marker.pad.t",y?m/4:m),c("marker.pad.l",m/4),c("marker.pad.r",m/4),c("marker.pad.b",y?m:m/4),c("marker.cornerradius"),n._hovered={marker:{line:{width:2,color:l.contrast(a.paper_bgcolor)}}},g&&(c("pathbar.thickness",n.pathbar.textfont.size+2*d),c("pathbar.side"),c("pathbar.edgeshape")),c("sort"),c("root.color"),T(n,a,c),n._length=null}else n.visible=!1}},80694:function($,R,e){"use strict";var k=e(39898),A=e(2791),l=e(72597).clearMinTextSize,T=e(16688).resizeText,b=e(46650);$.exports=function(d,s,t,o,r){var n,i,a=r.type,c=r.drawDescendants,p=d._fullLayout,f=p["_"+a+"layer"],x=!t;l(a,p),(n=f.selectAll("g.trace."+a).data(s,function(v){return v[0].trace.uid})).enter().append("g").classed("trace",!0).classed(a,!0),n.order(),!p.uniformtext.mode&&A.hasTransition(t)?(o&&(i=o()),k.transition().duration(t.duration).ease(t.easing).each("end",function(){i&&i()}).each("interrupt",function(){i&&i()}).each(function(){f.selectAll("g.trace").each(function(v){b(d,v,this,t,c)})})):(n.each(function(v){b(d,v,this,t,c)}),p.uniformtext.mode&&T(d,f.selectAll(".trace"),a)),x&&n.exit().remove()}},66209:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(91424),T=e(63893),b=e(37210),d=e(96362).styleOne,s=e(43473),t=e(2791),o=e(83523),r=!0;$.exports=function(n,i,a,c,p){var f=p.barDifY,x=p.width,v=p.height,g=p.viewX,y=p.viewY,h=p.pathSlice,m=p.toMoveInsideSlice,w=p.strTransform,u=p.hasTransition,S=p.handleSlicesExit,_=p.makeUpdateSliceInterpolator,E=p.makeUpdateTextInterpolator,L={},C=n._context.staticPlot,P=n._fullLayout,I=i[0],U=I.trace,z=I.hierarchy,H=x/U._entryDepth,F=t.listPath(a.data,"id"),N=b(z.copy(),[x,v],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();(N=N.filter(function(j){var J=F.indexOf(j.data.id);return-1!==J&&(j.x0=H*J,j.x1=H*(J+1),j.y0=f,j.y1=f+v,j.onPathbar=!0,!0)})).reverse(),(c=c.data(N,t.getPtId)).enter().append("g").classed("pathbar",!0),S(c,r,L,[x,v],h),c.order();var B=c;u&&(B=B.transition().each("end",function(){var j=k.select(this);t.setSliceCursor(j,n,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),B.each(function(j){j._x0=g(j.x0),j._x1=g(j.x1),j._y0=y(j.y0),j._y1=y(j.y1),j._hoverX=g(j.x1-Math.min(x,v)/2),j._hoverY=y(j.y1-v/2);var J=k.select(this),G=A.ensureSingle(J,"path","surface",function(K){K.style("pointer-events",C?"none":"all")});u?G.transition().attrTween("d",function(K){var re=_(K,r,L,[x,v]);return function(ee){return h(re(ee))}}):G.attr("d",h),J.call(o,a,n,i,{styleOne:d,eventDataKeys:s.eventDataKeys,transitionTime:s.CLICK_TRANSITION_TIME,transitionEasing:s.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,n,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:n._transitioning}),G.call(d,j,U,{hovered:!1}),j._text=(t.getPtLabel(j)||"").split("<br>").join(" ")||"";var V=A.ensureSingle(J,"g","slicetext"),W=A.ensureSingle(V,"text","",function(K){K.attr("data-notex",1)}),X=A.ensureUniformFontSize(n,t.determineTextFont(U,j,P.font,{onPathbar:!0}));W.text(j._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(l.font,X).call(T.convertToTspans,n),j.textBB=l.bBox(W.node()),j.transform=m(j,{fontSize:X.size,onPathbar:!0}),j.transform.fontSize=X.size,u?W.transition().attrTween("transform",function(K){var re=E(K,r,L,[x,v]);return function(ee){return w(re(ee))}}):W.attr("transform",w(j))})}},52583:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(91424),T=e(63893),b=e(37210),d=e(96362).styleOne,s=e(43473),t=e(2791),o=e(83523),r=e(24714).formatSliceLabel,n=!1;$.exports=function(i,a,c,p,f){var x=f.width,v=f.height,g=f.viewX,y=f.viewY,h=f.pathSlice,m=f.toMoveInsideSlice,w=f.strTransform,u=f.hasTransition,S=f.handleSlicesExit,_=f.makeUpdateSliceInterpolator,E=f.makeUpdateTextInterpolator,L=f.prevEntry,C=i._context.staticPlot,P=i._fullLayout,I=a[0].trace,U=-1!==I.textposition.indexOf("left"),z=-1!==I.textposition.indexOf("right"),H=-1!==I.textposition.indexOf("bottom"),F=!H&&!I.marker.pad.t||H&&!I.marker.pad.b,N=b(c,[x,v],{packing:I.tiling.packing,squarifyratio:I.tiling.squarifyratio,flipX:I.tiling.flip.indexOf("x")>-1,flipY:I.tiling.flip.indexOf("y")>-1,pad:{inner:I.tiling.pad,top:I.marker.pad.t,left:I.marker.pad.l,right:I.marker.pad.r,bottom:I.marker.pad.b}}).descendants(),B=1/0,j=-1/0;N.forEach(function(X){var K=X.depth;K>=I._maxDepth?(X.x0=X.x1=(X.x0+X.x1)/2,X.y0=X.y1=(X.y0+X.y1)/2):(B=Math.min(B,K),j=Math.max(j,K))}),p=p.data(N,t.getPtId),I._maxVisibleLayers=isFinite(j)?j-B+1:0,p.enter().append("g").classed("slice",!0),S(p,n,{},[x,v],h),p.order();var J=null;if(u&&L){var G=t.getPtId(L);p.each(function(X){null===J&&t.getPtId(X)===G&&(J={x0:X.x0,x1:X.x1,y0:X.y0,y1:X.y1})})}var V=function(){return J||{x0:0,x1:x,y0:0,y1:v}},W=p;return u&&(W=W.transition().each("end",function(){var X=k.select(this);t.setSliceCursor(X,i,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),W.each(function(X){var K=t.isHeader(X,I);X._x0=g(X.x0),X._x1=g(X.x1),X._y0=y(X.y0),X._y1=y(X.y1),X._hoverX=g(X.x1-I.marker.pad.r),X._hoverY=y(H?X.y1-I.marker.pad.b/2:X.y0+I.marker.pad.t/2);var re=k.select(this),ee=A.ensureSingle(re,"path","surface",function(me){me.style("pointer-events",C?"none":"all")});u?ee.transition().attrTween("d",function(me){var de=_(me,n,V(),[x,v]);return function(he){return h(de(he))}}):ee.attr("d",h),re.call(o,c,i,a,{styleOne:d,eventDataKeys:s.eventDataKeys,transitionTime:s.CLICK_TRANSITION_TIME,transitionEasing:s.CLICK_TRANSITION_EASING}).call(t.setSliceCursor,i,{isTransitioning:i._transitioning}),ee.call(d,X,I,{hovered:!1}),X._text=X.x0===X.x1||X.y0===X.y1?"":K?F?"":t.getPtLabel(X)||"":r(X,c,I,a,P)||"";var ie=A.ensureSingle(re,"g","slicetext"),oe=A.ensureSingle(ie,"text","",function(me){me.attr("data-notex",1)}),ce=A.ensureUniformFontSize(i,t.determineTextFont(I,X,P.font));oe.text(X._text||" ").classed("slicetext",!0).attr("text-anchor",z?"end":U||K?"start":"middle").call(l.font,ce).call(T.convertToTspans,i),X.textBB=l.bBox(oe.node()),X.transform=m(X,{fontSize:ce.size,isHeader:K}),X.transform.fontSize=ce.size,u?oe.transition().attrTween("transform",function(me){var de=E(me,n,V(),[x,v]);return function(he){return w(de(he))}}):oe.attr("transform",w(X))}),J}},14102:function($){"use strict";$.exports=function R(e,k,A){var l;A.swapXY&&(l=e.x0,e.x0=e.y0,e.y0=l,l=e.x1,e.x1=e.y1,e.y1=l),A.flipX&&(l=e.x0,e.x0=k[0]-e.x1,e.x1=k[0]-l),A.flipY&&(l=e.y0,e.y0=k[1]-e.y1,e.y1=k[1]-l);var T=e.children;if(T)for(var b=0;b<T.length;b++)R(T[b],k,A)}},70954:function($,R,e){"use strict";$.exports={moduleType:"trace",name:"treemap",basePlotModule:e(78018),categories:[],animatable:!0,attributes:e(45802),layoutAttributes:e(55479),supplyDefaults:e(91174),supplyLayoutDefaults:e(77182),calc:e(65039).y,crossTraceCalc:e(65039).T,plot:e(5893),style:e(96362).style,colorbar:e(4898),meta:{}}},55479:function($){"use strict";$.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},77182:function($,R,e){"use strict";var k=e(71828),A=e(55479);$.exports=function(l,T){function b(d,s){return k.coerce(l,T,A,d,s)}b("treemapcolorway",T.colorway),b("extendtreemapcolors")}},37210:function($,R,e){"use strict";var k=e(674),A=e(14102);$.exports=function(l,T,b){var d,s=b.flipX,t=b.flipY,o="dice-slice"===b.packing,r=b.pad[t?"bottom":"top"],n=b.pad[s?"right":"left"],i=b.pad[s?"left":"right"],a=b.pad[t?"top":"bottom"];o&&(d=n,n=r,r=d,d=i,i=a,a=d);var c=k.treemap().tile(function(p,f){switch(p){case"squarify":return k.treemapSquarify.ratio(f);case"binary":return k.treemapBinary;case"dice":return k.treemapDice;case"slice":return k.treemapSlice;default:return k.treemapSliceDice}}(b.packing,b.squarifyratio)).paddingInner(b.pad.inner).paddingLeft(n).paddingRight(i).paddingTop(r).paddingBottom(a).size(o?[T[1],T[0]]:T)(l);return(o||s||t)&&A(c,T,{swapXY:o,flipX:s,flipY:t}),c}},5893:function($,R,e){"use strict";var k=e(80694),A=e(52583);$.exports=function(l,T,b,d){return k(l,T,b,d,{type:"treemap",drawDescendants:A})}},46650:function($,R,e){"use strict";var k=e(39898),A=e(29502).sX,l=e(2791),T=e(71828),b=e(97313).TEXTPAD,d=e(17295).toMoveInsideBar,s=e(72597).recordMinTextSize,t=e(43473),o=e(66209);function r(n){return l.isHierarchyRoot(n)?"":l.getPtId(n)}$.exports=function(n,i,a,c,p){var f=n._fullLayout,x=i[0],v=x.trace,g="icicle"===v.type,y=x.hierarchy,h=l.findEntryWithLevel(y,v.level),m=k.select(a),w=m.selectAll("g.pathbar"),u=m.selectAll("g.slice");if(!h)return w.remove(),void u.remove();var S=l.isHierarchyRoot(h),_=!f.uniformtext.mode&&l.hasTransition(c),E=l.getMaxDepth(v),L=f._size,C=v.domain,P=L.w*(C.x[1]-C.x[0]),I=L.h*(C.y[1]-C.y[0]),U=P,z=v.pathbar.thickness,H=v.marker.line.width+t.gapWithPathbar,F=v.pathbar.visible?v.pathbar.side.indexOf("bottom")>-1?I+H:-(z+H):0,N={x0:U,x1:U,y0:F,y1:F+z},B=function(le,ge,_e){var Fe=v.tiling.pad,Ve=function(ot){return ot-Fe<=ge.x0},He=function(ot){return ot+Fe>=ge.x1},nt=function(ot){return ot-Fe<=ge.y0},tt=function(ot){return ot+Fe>=ge.y1};return le.x0===ge.x0&&le.x1===ge.x1&&le.y0===ge.y0&&le.y1===ge.y1?{x0:le.x0,x1:le.x1,y0:le.y0,y1:le.y1}:{x0:Ve(le.x0-Fe)?0:He(le.x0-Fe)?_e[0]:le.x0,x1:Ve(le.x1+Fe)?0:He(le.x1+Fe)?_e[0]:le.x1,y0:nt(le.y0-Fe)?0:tt(le.y0-Fe)?_e[1]:le.y0,y1:nt(le.y1+Fe)?0:tt(le.y1+Fe)?_e[1]:le.y1}},j=null,J={},G={},V=null,W=function(le,ge){return ge?J[r(le)]:G[r(le)]};x.hasMultipleRoots&&S&&E++,v._maxDepth=E,v._backgroundColor=f.paper_bgcolor,v._entryDepth=h.data.depth,v._atRootLevel=S;var X=-P/2+L.l+L.w*(C.x[1]+C.x[0])/2,K=-I/2+L.t+L.h*(1-(C.y[1]+C.y[0])/2),re=function(le){return X+le},ee=function(le){return K+le},ie=ee(0),oe=re(0),ce=function(le){return oe+le},me=function(le){return ie+le};function de(le,ge){return le+","+ge}var he=ce(0),ve=function(le){le.x=Math.max(he,le.x)},Pe=v.pathbar.edgeshape,xe=v[g?"tiling":"marker"].pad,ke=function(le){return-1!==v.textposition.indexOf(le)},Ae=ke("top"),Te=ke("left"),Q=ke("right"),se=ke("bottom"),fe=function(le,ge){var _e=le.x0,Fe=le.x1,Ve=le.y0,He=le.y1,nt=le.textBB,tt=Ae||ge.isHeader&&!se?"start":se?"end":"middle",ot=ke("right"),dt=ke("left")||ge.onPathbar?-1:ot?1:0;if(ge.isHeader){if((_e+=(g?xe:xe.l)-b)>=(Fe-=(g?xe:xe.r)-b)){var kt=(_e+Fe)/2;_e=kt,Fe=kt}var mt;se?Ve<(mt=He-(g?xe:xe.b))&&mt<He&&(Ve=mt):Ve<(mt=Ve+(g?xe:xe.t))&&mt<He&&(He=mt)}var wt=d(_e,Fe,Ve,He,nt,{isHorizontal:!1,constrained:!0,angle:0,anchor:tt,leftToRight:dt});return wt.fontSize=ge.fontSize,wt.targetX=re(wt.targetX),wt.targetY=ee(wt.targetY),isNaN(wt.targetX)||isNaN(wt.targetY)?{}:(_e!==Fe&&Ve!==He&&s(v.type,wt,f),{scale:wt.scale,rotate:wt.rotate,textX:wt.textX,textY:wt.textY,anchorX:wt.anchorX,anchorY:wt.anchorY,targetX:wt.targetX,targetY:wt.targetY})},ye=function(le,ge){for(var _e,Fe=0,Ve=le;!_e&&Fe<E;)Fe++,(Ve=Ve.parent)?_e=W(Ve,ge):Fe=E;return _e||{}},Me=function(le,ge,_e,Fe,Ve){var He,nt=W(le,ge);if(nt)He=nt;else if(ge)He=N;else if(j)if(le.parent){var tt=V||_e;tt&&!ge?He=B(le,tt,Fe):T.extendFlat(He={},ye(le,ge))}else He=T.extendFlat({},le),g&&("h"===Ve.orientation?Ve.flipX?He.x0=le.x1:He.x1=0:Ve.flipY?He.y0=le.y1:He.y1=0);else He={};return A(He,{x0:le.x0,x1:le.x1,y0:le.y0,y1:le.y1})},Ie=function(le,ge,_e,Fe){var ot,kt,mt,Ve=W(le,ge),He={},nt=(ot=le,kt=_e,mt=Fe,ge?J[r(y)]||N:ot.data.depth-h.data.depth<E?B(ot,G[v.level]||kt,mt):{});T.extendFlat(He,{transform:fe({x0:nt.x0,x1:nt.x1,y0:nt.y0,y1:nt.y1,textBB:le.textBB,_text:le._text},{isHeader:l.isHeader(le,v)})}),Ve?He=Ve:le.parent&&T.extendFlat(He,ye(le,ge));var tt=le.transform;return le.x0!==le.x1&&le.y0!==le.y1&&s(v.type,tt,f),A(He,{transform:{scale:tt.scale,rotate:tt.rotate,textX:tt.textX,textY:tt.textY,anchorX:tt.anchorX,anchorY:tt.anchorY,targetX:tt.targetX,targetY:tt.targetY}})},Ce=function(le,ge,_e,Fe,Ve){var He=Fe[0],nt=Fe[1];_?le.exit().transition().each(function(){var tt=k.select(this);tt.select("path.surface").transition().attrTween("d",function(ot){var dt=function(kt,mt,wt,Lt){var Ct,It=W(kt,mt);if(mt)Ct=N;else{var Ut=W(h,mt);Ct=Ut?B(kt,Ut,Lt):{}}return A(It,Ct)}(ot,ge,0,[He,nt]);return function(kt){return Ve(dt(kt))}}),tt.select("g.slicetext").attr("opacity",0)}).remove():le.exit().remove()},Re=function(le){var ge=le.transform;return le.x0!==le.x1&&le.y0!==le.y1&&s(v.type,ge,f),T.getTextTransform({textX:ge.textX,textY:ge.textY,anchorX:ge.anchorX,anchorY:ge.anchorY,targetX:ge.targetX,targetY:ge.targetY,scale:ge.scale,rotate:ge.rotate})};_&&(w.each(function(le){J[r(le)]={x0:le.x0,x1:le.x1,y0:le.y0,y1:le.y1},le.transform&&(J[r(le)].transform={textX:le.transform.textX,textY:le.transform.textY,anchorX:le.transform.anchorX,anchorY:le.transform.anchorY,targetX:le.transform.targetX,targetY:le.transform.targetY,scale:le.transform.scale,rotate:le.transform.rotate})}),u.each(function(le){G[r(le)]={x0:le.x0,x1:le.x1,y0:le.y0,y1:le.y1},le.transform&&(G[r(le)].transform={textX:le.transform.textX,textY:le.transform.textY,anchorX:le.transform.anchorX,anchorY:le.transform.anchorY,targetX:le.transform.targetX,targetY:le.transform.targetY,scale:le.transform.scale,rotate:le.transform.rotate}),!j&&l.isEntry(le)&&(j=le)})),V=p(n,i,h,u,{width:P,height:I,viewX:re,viewY:ee,pathSlice:function(le){var ge=re(le.x0),_e=re(le.x1),Fe=ee(le.y0),Ve=ee(le.y1),He=_e-ge,nt=Ve-Fe;if(!He||!nt)return"";var ot=Math.min(v.marker.cornerradius||0,He/2,nt/2);ot&&le.data&&le.data.data&&le.data.data.label&&(Ae&&(ot=Math.min(ot,xe.t)),Te&&(ot=Math.min(ot,xe.l)),Q&&(ot=Math.min(ot,xe.r)),se&&(ot=Math.min(ot,xe.b)));var dt=function(kt,mt){return ot?"a"+de(ot,ot)+" 0 0 1 "+de(kt,mt):""};return"M"+de(ge,Fe+ot)+dt(ot,-ot)+"L"+de(_e-ot,Fe)+dt(ot,ot)+"L"+de(_e,Ve-ot)+dt(-ot,ot)+"L"+de(ge+ot,Ve)+dt(-ot,-ot)+"Z"},toMoveInsideSlice:fe,prevEntry:j,makeUpdateSliceInterpolator:Me,makeUpdateTextInterpolator:Ie,handleSlicesExit:Ce,hasTransition:_,strTransform:Re}),v.pathbar.visible?o(n,i,h,w,{barDifY:F,width:U,height:z,viewX:ce,viewY:me,pathSlice:function(le){var ge=ce(Math.max(Math.min(le.x0,le.x0),0)),_e=ce(Math.min(Math.max(le.x1,le.x1),U)),Fe=me(le.y0),Ve=me(le.y1),He=z/2,nt={},tt={};nt.x=ge,tt.x=_e,nt.y=tt.y=(Fe+Ve)/2;var ot={x:ge,y:Fe},dt={x:_e,y:Fe},kt={x:_e,y:Ve},mt={x:ge,y:Ve};return">"===Pe?(ot.x-=He,dt.x-=He,kt.x-=He,mt.x-=He):"/"===Pe?(kt.x-=He,mt.x-=He,nt.x-=He/2,tt.x-=He/2):"\\"===Pe?(ot.x-=He,dt.x-=He,nt.x-=He/2,tt.x-=He/2):"<"===Pe&&(nt.x-=He,tt.x-=He),ve(ot),ve(mt),ve(nt),ve(dt),ve(kt),ve(tt),"M"+de(ot.x,ot.y)+"L"+de(dt.x,dt.y)+"L"+de(tt.x,tt.y)+"L"+de(kt.x,kt.y)+"L"+de(mt.x,mt.y)+"L"+de(nt.x,nt.y)+"Z"},toMoveInsideSlice:fe,makeUpdateSliceInterpolator:Me,makeUpdateTextInterpolator:Ie,handleSlicesExit:Ce,hasTransition:_,strTransform:Re}):w.remove()}},96362:function($,R,e){"use strict";var k=e(39898),A=e(7901),l=e(71828),T=e(2791),b=e(72597).resizeText;function d(s,t,o,r){var n,i,a=(r||{}).hovered,c=t.data.data,p=c.i,f=c.color,x=T.isHierarchyRoot(t),v=1;if(a)n=o._hovered.marker.line.color,i=o._hovered.marker.line.width;else if(x&&f===o.root.color)v=100,n="rgba(0,0,0,0)",i=0;else if(n=l.castOption(o,p,"marker.line.color")||A.defaultLine,i=l.castOption(o,p,"marker.line.width")||0,!o._hasColorscale&&!t.onPathbar){var g=o.marker.depthfade;if(g){var y,h=A.combine(A.addOpacity(o._backgroundColor,.75),f);if(!0===g){var m=T.getMaxDepth(o);y=isFinite(m)?T.isLeaf(t)?0:o._maxVisibleLayers-(t.data.depth-o._entryDepth):t.data.height+1}else y=t.data.depth-o._entryDepth,o._atRootLevel||y++;if(y>0)for(var w=0;w<y;w++)f=A.combine(A.addOpacity(h,.5*w/y),f)}}s.style("stroke-width",i).call(A.fill,f).call(A.stroke,n).style("opacity",v)}$.exports={style:function(s){var t=s._fullLayout._treemaplayer.selectAll(".trace");b(s,t,"treemap"),t.each(function(o){var r=k.select(this),n=o[0].trace;r.style("opacity",n.opacity),r.selectAll("path.surface").each(function(i){k.select(this).call(d,i,n,{hovered:!1})})})},styleOne:d}},68875:function($,R,e){"use strict";var k=e(53522),A=e(1426).extendFlat,l=e(12663).axisHoverFormat;$.exports={y:k.y,x:k.x,x0:k.x0,y0:k.y0,xhoverformat:l("x"),yhoverformat:l("y"),name:A({},k.name,{}),orientation:A({},k.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:k.fillcolor,points:A({},k.boxpoints,{}),jitter:A({},k.jitter,{}),pointpos:A({},k.pointpos,{}),width:A({},k.width,{}),marker:k.marker,text:k.text,hovertext:k.hovertext,hovertemplate:k.hovertemplate,quartilemethod:k.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:k.offsetgroup,alignmentgroup:k.alignmentgroup,selected:k.selected,unselected:k.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"}}},38603:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(48518),T=e(60168),b=e(50606).BADNUM;function d(t,o,r){var n=o.max-o.min;if(!n)return t.bandwidth?t.bandwidth:0;if(t.bandwidth)return Math.max(t.bandwidth,n/1e4);var c,i=r.length,a=k.stdev(r,i-1,o.mean);return Math.max((c=i,1.059*Math.min(a,(o.q3-o.q1)/1.349)*Math.pow(c,-.2)),n/100)}function s(t,o,r,n){var i,a=t.spanmode,c=t.span||[],f=[o.min-2*n,o.max+2*n];function x(g){var y=c[g],h="multicategory"===r.type?r.r2c(y):r.d2c(y,0,t[o.valLetter+"calendar"]);return h===b?f[g]:h}var v={type:"linear",range:i="soft"===a?f:"hard"===a?[o.min,o.max]:[x(0),x(1)]};return A.setConvert(v),v.cleanRange(),i}$.exports=function(t,o){var r=l(t,o);if(r[0].t.empty)return r;for(var n=t._fullLayout,i=A.getFromId(t,o["h"===o.orientation?"xaxis":"yaxis"]),a=1/0,c=-1/0,p=0,f=0,x=0;x<r.length;x++){var v=r[x],g=v.pts.map(T.extractVal),y=v.bandwidth=d(o,v,g),h=v.span=s(o,v,i,y);if(v.min===v.max&&0===y)h=v.span=[v.min,v.max],v.density=[{v:1,t:h[0]}],v.bandwidth=y,p=Math.max(p,1);else{var m=h[1]-h[0],w=Math.ceil(m/(y/3)),u=m/w;if(!isFinite(u)||!isFinite(w))return k.error("Something went wrong with computing the violin span"),r[0].t.empty=!0,r;var S=T.makeKDE(v,o,g);v.density=new Array(w);for(var _=0,E=h[0];E<h[1]+u/2;_++,E+=u){var L=S(E);v.density[_]={v:L,t:E},p=Math.max(p,L)}}f=Math.max(f,g.length),a=Math.min(a,h[0]),c=Math.max(c,h[1])}var C=A.findExtremes(i,[a,c],{padded:!0});if(o._extremes[i._id]=C,o.width)r[0].t.maxKDE=p;else{var P=n._violinScaleGroupStats,I=o.scalegroup,U=P[I];U?(U.maxKDE=Math.max(U.maxKDE,p),U.maxCount=Math.max(U.maxCount,f)):P[I]={maxKDE:p,maxCount:f}}return r[0].t.labels.kde=k._(t,"kde:"),r}},86403:function($,R,e){"use strict";var k=e(37188).setPositionOffset,A=["v","h"];$.exports=function(l,T){for(var b=l.calcdata,d=T.xaxis,s=T.yaxis,t=0;t<A.length;t++){for(var o=A[t],r="h"===o?s:d,n=[],i=0;i<b.length;i++){var a=b[i],p=a[0].trace;!0!==p.visible||"violin"!==p.type||a[0].t.empty||p.orientation!==o||p.xaxis!==d._id||p.yaxis!==s._id||n.push(i)}k("violin",l,n,r)}}},15899:function($,R,e){"use strict";var k=e(71828),A=e(7901),l=e(36411),T=e(68875);$.exports=function(b,d,s,t){function o(m,w){return k.coerce(b,d,T,m,w)}function r(m,w){return k.coerce2(b,d,T,m,w)}if(l.handleSampleDefaults(b,d,o,t),!1!==d.visible){o("bandwidth"),o("side"),o("width")||(o("scalegroup",d.name),o("scalemode"));var n,i=o("span");Array.isArray(i)&&(n="manual"),o("spanmode",n);var a=o("line.color",(b.marker||{}).color||s),c=o("line.width"),p=o("fillcolor",A.addOpacity(d.line.color,.5));l.handlePointsDefaults(b,d,o,{prefix:""});var f=r("box.width"),x=r("box.fillcolor",p),v=r("box.line.color",a),g=r("box.line.width",c);o("box.visible",!!(f||x||v||g))||(d.box={visible:!1});var y=r("meanline.color",a),h=r("meanline.width",c);o("meanline.visible",!(!y&&!h))||(d.meanline={visible:!1}),o("quartilemethod")}}},60168:function($,R,e){"use strict";var k=e(71828),A=function(l){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*l*l)};R.makeKDE=function(l,T,b){var d=b.length,s=A,t=l.bandwidth,o=1/(d*t);return function(r){for(var n=0,i=0;i<d;i++)n+=s((r-b[i])/t);return o*n}},R.getPositionOnKdePath=function(l,T,b){var d,s;"h"===T.orientation?(d="y",s="x"):(d="x",s="y");var t=k.findPointOnPath(l.path,b,s,{pathLength:l.pathLength}),o=l.posCenterPx,r=t[d];return[r,"both"===T.side?2*o-r:o]},R.getKdeValue=function(l,T,b){var d=l.pts.map(R.extractVal);return R.makeKDE(l,T,d)(b)/l.posDensityScale},R.extractVal=function(l){return l.v}},57634:function($,R,e){"use strict";var k=e(7901),A=e(71828),l=e(89298),T=e(41868),b=e(60168);$.exports=function(d,s,t,o,r){r||(r={});var n,i,a=r.hoverLayer,c=d.cd,p=c[0].trace,f=p.hoveron,x=-1!==f.indexOf("violins"),v=-1!==f.indexOf("kde"),g=[];if(x||v){var y=T.hoverOnBoxes(d,s,t,o);if(v&&y.length>0){var h,m,w,u,S,_=d.xa,E=d.ya;"h"===p.orientation?(S=s,h="y",w=E,m="x",u=_):(S=t,h="x",w=_,m="y",u=E);var L=c[d.index];if(S>=L.span[0]&&S<=L.span[1]){var C=A.extendFlat({},d),P=u.c2p(S,!0),I=b.getKdeValue(L,p,S),U=b.getPositionOnKdePath(L,p,P),z=w._offset,H=w._length;C[h+"0"]=U[0],C[h+"1"]=U[1],C[m+"0"]=C[m+"1"]=P,C[m+"Label"]=m+": "+l.hoverLabelText(u,S,p[m+"hoverformat"])+", "+c[0].t.labels.kde+" "+I.toFixed(3);for(var F=0,N=0;N<y.length;N++)if("med"===y[N].attr){F=N;break}C.spikeDistance=y[F].spikeDistance;var B=h+"Spike";C[B]=y[F][B],y[F].spikeDistance=void 0,y[F][B]=void 0,C.hovertemplate=!1,g.push(C),(i={})[h+"1"]=A.constrain(z+U[0],z,z+H),i[h+"2"]=A.constrain(z+U[1],z,z+H),i[m+"1"]=i[m+"2"]=u._offset+P}}x&&(g=g.concat(y))}-1!==f.indexOf("points")&&(n=T.hoverOnPoints(d,s,t));var j=a.selectAll(".violinline-"+p.uid).data(i?[0]:[]);return j.enter().append("line").classed("violinline-"+p.uid,!0).attr("stroke-width",1.5),j.exit().remove(),j.attr(i).call(k.stroke,d.color),"closest"===o?n?[n]:g:(n&&g.push(n),g)}},47462:function($,R,e){"use strict";$.exports={attributes:e(68875),layoutAttributes:e(9228),supplyDefaults:e(15899),crossTraceDefaults:e(36411).crossTraceDefaults,supplyLayoutDefaults:e(33598),calc:e(38603),crossTraceCalc:e(86403),plot:e(28443),style:e(31847),styleOnSelect:e(16296).styleOnSelect,hoverPoints:e(57634),selectPoints:e(24626),moduleType:"trace",name:"violin",basePlotModule:e(93612),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}},9228:function($,R,e){"use strict";var k=e(40094),A=e(71828).extendFlat;$.exports={violinmode:A({},k.boxmode,{}),violingap:A({},k.boxgap,{}),violingroupgap:A({},k.boxgroupgap,{})}},33598:function($,R,e){"use strict";var k=e(71828),A=e(9228),l=e(4199);$.exports=function(T,b,d){l._supply(T,b,d,function(s,t){return k.coerce(T,b,A,s,t)},"violin")}},28443:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(91424),T=e(86047),b=e(34621),d=e(60168);$.exports=function(s,t,o,r){var n=s._fullLayout,i=t.xaxis,a=t.yaxis;function c(p,f){var x=b(p,{xaxis:i,yaxis:a,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return l.smoothopen(x[0],1)}A.makeTraceGroups(r,o,"trace violins").each(function(p){var f=k.select(this),x=p[0],v=x.t,g=x.trace;if(!0!==g.visible||v.empty)f.remove();else{var y=v.bPos,h=v.bdPos,m=t[v.valLetter+"axis"],w=t[v.posLetter+"axis"],u="both"===g.side,S=u||"positive"===g.side,_=u||"negative"===g.side,E=f.selectAll("path.violin").data(A.identity);E.enter().append("path").style("vector-effect","non-scaling-stroke").attr("class","violin"),E.exit().remove(),E.each(function(F){var N,B,j,J,G,V,W,X,K=k.select(this),re=F.density,ee=re.length,ie=w.c2l(F.pos+y,!0),oe=w.l2p(ie);if(g.width)N=v.maxKDE/h;else{var ce=n._violinScaleGroupStats[g.scalegroup];N="count"===g.scalemode?ce.maxKDE/h*(ce.maxCount/F.pts.length):ce.maxKDE/h}if(S){for(W=new Array(ee),G=0;G<ee;G++)(X=W[G]={})[v.posLetter]=ie+re[G].v/N,X[v.valLetter]=m.c2l(re[G].t,!0);B=c(W,g)}if(_){for(W=new Array(ee),V=0,G=ee-1;V<ee;V++,G--)(X=W[V]={})[v.posLetter]=ie-re[G].v/N,X[v.valLetter]=m.c2l(re[G].t,!0);j=c(W,g)}if(u)J=B+"L"+j.substr(1)+"Z";else{var me=[oe,m.c2p(re[0].t)],de=[oe,m.c2p(re[ee-1].t)];"h"===g.orientation&&(me.reverse(),de.reverse()),J=S?"M"+me+"L"+B.substr(1)+"L"+de:"M"+de+"L"+j.substr(1)+"L"+me}K.attr("d",J),F.posCenterPx=oe,F.posDensityScale=N*h,F.path=K.node(),F.pathLength=F.path.getTotalLength()/(u?2:1)});var L,C,P,I=g.box,U=I.width,z=(I.line||{}).width;u?(L=h*U,C=0):S?(L=[0,h*U/2],C=z*{x:1,y:-1}[v.posLetter]):(L=[h*U/2,0],C=z*{x:-1,y:1}[v.posLetter]),T.plotBoxAndWhiskers(f,{pos:w,val:m},g,{bPos:y,bdPos:L,bPosPxOffset:C}),T.plotBoxMean(f,{pos:w,val:m},g,{bPos:y,bdPos:L,bPosPxOffset:C}),!g.box.visible&&g.meanline.visible&&(P=A.identity);var H=f.selectAll("path.meanline").data(P||[]);H.enter().append("path").attr("class","meanline").style("fill","none").style("vector-effect","non-scaling-stroke"),H.exit().remove(),H.each(function(F){var N=m.c2p(F.mean,!0),B=d.getPositionOnKdePath(F,g,N);k.select(this).attr("d","h"===g.orientation?"M"+N+","+B[0]+"V"+B[1]:"M"+B[0]+","+N+"H"+B[1])}),T.plotPoints(f,{x:i,y:a},g,v)}})}},31847:function($,R,e){"use strict";var k=e(39898),A=e(7901),l=e(16296).stylePoints;$.exports=function(T){var b=k.select(T).selectAll("g.trace.violins");b.style("opacity",function(d){return d[0].trace.opacity}),b.each(function(d){var s=d[0].trace,t=k.select(this),o=s.box||{},r=o.line||{},n=s.meanline||{},i=n.width;t.selectAll("path.violin").style("stroke-width",s.line.width+"px").call(A.stroke,s.line.color).call(A.fill,s.fillcolor),t.selectAll("path.box").style("stroke-width",r.width+"px").call(A.stroke,r.color).call(A.fill,o.fillcolor);var a={"stroke-width":i+"px","stroke-dasharray":2*i+"px,"+i+"px"};t.selectAll("path.mean").style(a).call(A.stroke,n.color),t.selectAll("path.meanline").style(a).call(A.stroke,n.color),l(t,s,T)})}},16336:function($,R,e){"use strict";var k=e(50693),A=e(16249),l=e(54532),T=e(9012),b=e(1426).extendFlat,d=e(30962).overrideAll,s=$.exports=d(b({x:A.x,y:A.y,z:A.z,value:A.value,isomin:A.isomin,isomax:A.isomax,surface:A.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:A.slices,caps:A.caps,text:A.text,hovertext:A.hovertext,xhoverformat:A.xhoverformat,yhoverformat:A.yhoverformat,zhoverformat:A.zhoverformat,valuehoverformat:A.valuehoverformat,hovertemplate:A.hovertemplate},k("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:A.colorbar,opacity:A.opacity,opacityscale:l.opacityscale,lightposition:A.lightposition,lighting:A.lighting,flatshading:A.flatshading,contour:A.contour,hoverinfo:b({},T.hoverinfo),showlegend:b({},T.showlegend,{dflt:!1})}),"calc","nested");s.x.editType=s.y.editType=s.z.editType=s.value.editType="calc+clearAxisTypes",s.transforms=void 0},64809:function($,R,e){"use strict";var k=e(9330).gl_mesh3d,A=e(81697).parseColorScale,l=e(78614),T=e(21081).extractOpts,b=e(90060),d=e(22674).findNearestOnAxis,s=e(22674).generateIsoMeshes;function t(r,n,i){this.scene=r,this.uid=i,this.mesh=n,this.name="",this.data=null,this.showContour=!1}var o=t.prototype;o.handlePick=function(r){if(r.object===this.mesh){var n=r.data.index,a=this.data._meshY[n],c=this.data._meshZ[n],p=this.data._Ys.length,f=this.data._Zs.length,x=d(this.data._meshX[n],this.data._Xs).id,v=d(a,this.data._Ys).id,g=d(c,this.data._Zs).id,y=r.index=g+f*v+f*p*x;r.traceCoordinate=[this.data._meshX[y],this.data._meshY[y],this.data._meshZ[y],this.data._value[y]];var h=this.data.hovertext||this.data.text;return Array.isArray(h)&&void 0!==h[y]?r.textLabel=h[y]:h&&(r.textLabel=h),!0}},o.update=function(r){var n=this.scene,i=n.fullSceneLayout;function a(f,x,v,g){return x.map(function(y){return f.d2l(y,0,g)*v})}this.data=s(r);var c={positions:b(a(i.xaxis,r._meshX,n.dataScale[0],r.xcalendar),a(i.yaxis,r._meshY,n.dataScale[1],r.ycalendar),a(i.zaxis,r._meshZ,n.dataScale[2],r.zcalendar)),cells:b(r._meshI,r._meshJ,r._meshK),lightPosition:[r.lightposition.x,r.lightposition.y,r.lightposition.z],ambient:r.lighting.ambient,diffuse:r.lighting.diffuse,specular:r.lighting.specular,roughness:r.lighting.roughness,fresnel:r.lighting.fresnel,vertexNormalsEpsilon:r.lighting.vertexnormalsepsilon,faceNormalsEpsilon:r.lighting.facenormalsepsilon,opacity:r.opacity,opacityscale:r.opacityscale,contourEnable:r.contour.show,contourColor:l(r.contour.color).slice(0,3),contourWidth:r.contour.width,useFacetNormals:r.flatshading},p=T(r);c.vertexIntensity=r._meshIntensity,c.vertexIntensityBounds=[p.min,p.max],c.colormap=A(r),this.mesh.update(c)},o.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()},$.exports=function(r,n){var a=k({gl:r.glplot.gl}),c=new t(r,a,n.uid);return a._trace=c,c.update(n),r.glplot.add(a),c}},47651:function($,R,e){"use strict";var k=e(71828),A=e(16336),l=e(82738).supplyIsoDefaults,T=e(91831).opacityscaleDefaults;$.exports=function(b,d,s,t){function o(r,n){return k.coerce(b,d,A,r,n)}l(b,d,s,t,o),T(b,d,t,o)}},17659:function($,R,e){"use strict";$.exports={attributes:e(16336),supplyDefaults:e(47651),calc:e(56959),colorbar:{min:"cmin",max:"cmax"},plot:e(64809),moduleType:"trace",name:"volume",basePlotModule:e(58547),categories:["gl3d","showLegend"],meta:{}}},43037:function($,R,e){"use strict";var k=e(1486),A=e(82196).line,l=e(9012),T=e(12663).axisHoverFormat,b=e(5386).f,d=e(5386).s,s=e(48334),t=e(1426).extendFlat,o=e(7901);function r(n){return{marker:{color:t({},k.marker.color,{arrayOk:!1,editType:"style"}),line:{color:t({},k.marker.line.color,{arrayOk:!1,editType:"style"}),width:t({},k.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}$.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:k.x,x0:k.x0,dx:k.dx,y:k.y,y0:k.y0,dy:k.dy,xperiod:k.xperiod,yperiod:k.yperiod,xperiod0:k.xperiod0,yperiod0:k.yperiod0,xperiodalignment:k.xperiodalignment,yperiodalignment:k.yperiodalignment,xhoverformat:T("x"),yhoverformat:T("y"),hovertext:k.hovertext,hovertemplate:b({},{keys:s.eventDataKeys}),hoverinfo:t({},l.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:d({editType:"plot"},{keys:s.eventDataKeys.concat(["label"])}),text:k.text,textposition:k.textposition,insidetextanchor:k.insidetextanchor,textangle:k.textangle,textfont:k.textfont,insidetextfont:k.insidetextfont,outsidetextfont:k.outsidetextfont,constraintext:k.constraintext,cliponaxis:k.cliponaxis,orientation:k.orientation,offset:k.offset,width:k.width,increasing:r(),decreasing:r(),totals:r(),connector:{line:{color:t({},A.color,{dflt:o.defaultLine}),width:t({},A.width,{editType:"plot"}),dash:A.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:k.offsetgroup,alignmentgroup:k.alignmentgroup}},52752:function($,R,e){"use strict";var k=e(89298),A=e(42973),l=e(71828).mergeArray,T=e(66279),b=e(50606).BADNUM;function d(t){return"a"===t||"absolute"===t}function s(t){return"t"===t||"total"===t}$.exports=function(t,o){var r,n,i,a,c,p,f=k.getFromId(t,o.xaxis||"x"),x=k.getFromId(t,o.yaxis||"y");"h"===o.orientation?(r=f.makeCalcdata(o,"x"),i=x.makeCalcdata(o,"y"),a=A(o,x,"y",i),c=!!o.yperiodalignment,p="y"):(r=x.makeCalcdata(o,"y"),i=f.makeCalcdata(o,"x"),a=A(o,f,"x",i),c=!!o.xperiodalignment,p="x"),n=a.vals;for(var v,g=Math.min(n.length,r.length),y=new Array(g),h=0,m=!1,w=0;w<g;w++){var u=r[w]||0,S=!1;(r[w]!==b||s(o.measure[w])||d(o.measure[w]))&&w+1<g&&(r[w+1]!==b||s(o.measure[w+1])||d(o.measure[w+1]))&&(S=!0);var _=y[w]={i:w,p:n[w],s:u,rawS:u,cNext:S};d(o.measure[w])?(h=_.s,_.isSum=!0,_.dir="totals",_.s=h):s(o.measure[w])?(_.isSum=!0,_.dir="totals",_.s=h):(_.isSum=!1,_.dir=_.rawS<0?"decreasing":"increasing",_.s=h+(v=_.s),h+=v),"totals"===_.dir&&(m=!0),c&&(y[w].orig_p=i[w],y[w][p+"End"]=a.ends[w],y[w][p+"Start"]=a.starts[w]),o.ids&&(_.id=String(o.ids[w])),_.v=(o.base||0)+h}return y.length&&(y[0].hasTotals=m),l(o.text,y,"tx"),l(o.hovertext,y,"htx"),T(y,o),y}},48334:function($){"use strict";$.exports={eventDataKeys:["initial","delta","final"]}},70766:function($,R,e){"use strict";var k=e(11661).setGroupPositions;$.exports=function(A,l){var T,b,d=A._fullLayout,s=A._fullData,t=A.calcdata,o=l.xaxis,r=l.yaxis,n=[],i=[],a=[];for(b=0;b<s.length;b++){var c=s[b];!0===c.visible&&c.xaxis===o._id&&c.yaxis===r._id&&"waterfall"===c.type&&(T=t[b],"h"===c.orientation?a.push(T):i.push(T),n.push(T))}var p={mode:d.waterfallmode,norm:d.waterfallnorm,gap:d.waterfallgap,groupgap:d.waterfallgroupgap};for(k(A,o,r,i,p),k(A,r,o,a,p),b=0;b<n.length;b++){T=n[b];for(var f=0;f<T.length;f++){var x=T[f];!1===x.isSum&&(x.s0+=0===f?0:T[f-1].s),f+1<T.length&&(T[f].nextP0=T[f+1].p0,T[f].nextS0=T[f+1].s0)}}}},83266:function($,R,e){"use strict";var k=e(71828),A=e(26125),l=e(90769).handleText,T=e(67513),b=e(73927),d=e(43037),s=e(7901),t=e(22372),o=t.INCREASING.COLOR,r=t.DECREASING.COLOR;function n(i,a,c){i(a+".marker.color",c),i(a+".marker.line.color",s.defaultLine),i(a+".marker.line.width")}$.exports={supplyDefaults:function(i,a,c,p){function f(v,g){return k.coerce(i,a,d,v,g)}if(T(i,a,p,f)){b(i,a,p,f),f("xhoverformat"),f("yhoverformat"),f("measure"),f("orientation",a.x&&!a.y?"h":"v"),f("base"),f("offset"),f("width"),f("text"),f("hovertext"),f("hovertemplate");var x=f("textposition");l(i,a,p,f,x,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),"none"!==a.textposition&&(f("texttemplate"),a.texttemplate||f("textinfo")),n(f,"increasing",o),n(f,"decreasing",r),n(f,"totals","#4499FF"),f("connector.visible")&&(f("connector.mode"),f("connector.line.width")&&(f("connector.line.color"),f("connector.line.dash")))}else a.visible=!1},crossTraceDefaults:function(i,a){var c,p;function f(v){return k.coerce(p._input,p,d,v)}if("group"===a.waterfallmode)for(var x=0;x<i.length;x++)c=(p=i[x])._input,A(c,p,a,f)}}},58593:function($){"use strict";$.exports=function(R,e){return R.x="xVal"in e?e.xVal:e.x,R.y="yVal"in e?e.yVal:e.y,"initial"in e&&(R.initial=e.initial),"delta"in e&&(R.delta=e.delta),"final"in e&&(R.final=e.final),e.xa&&(R.xaxis=e.xa),e.ya&&(R.yaxis=e.ya),R}},61326:function($,R,e){"use strict";var k=e(89298).hoverLabelText,A=e(7901).opacity,l=e(95423).hoverOnBars,T=e(22372),b=T.INCREASING.SYMBOL,d=T.DECREASING.SYMBOL;$.exports=function(s,t,o,r,n){var C,P,I,U,i=l(s,t,o,r,n);if(i){var a=i.cd,c=a[0].trace,p="h"===c.orientation,f=p?"x":"y",x=p?s.xa:s.ya,v=a[i.index],g=v.isSum?v.b+v.s:v.rawS;if(!v.isSum){i.initial=v.b+v.s-g,i.delta=g,i.final=i.initial+i.delta;var y=_(Math.abs(i.delta));i.deltaLabel=g<0?"("+y+")":y,i.finalLabel=_(i.final),i.initialLabel=_(i.initial)}var h=v.hi||c.hoverinfo,m=[];if(h&&"none"!==h&&"skip"!==h){var w="all"===h,u=h.split("+"),S=function(E){return w||-1!==u.indexOf(E)};v.isSum||(!S("final")||S(p?"x":"y")||m.push(i.finalLabel),S("delta")&&m.push(g<0?i.deltaLabel+" "+d:i.deltaLabel+" "+b),S("initial")&&m.push("Initial: "+i.initialLabel))}return m.length&&(i.extraText=m.join("<br>")),i.color=(I=(C=c[v.dir].marker).line.color,U=C.line.width,A(P=C.color)?P:A(I)&&U?I:void 0),[i]}function _(E){return k(x,E,c[f+"hoverformat"])}}},19990:function($,R,e){"use strict";$.exports={attributes:e(43037),layoutAttributes:e(13494),supplyDefaults:e(83266).supplyDefaults,crossTraceDefaults:e(83266).crossTraceDefaults,supplyLayoutDefaults:e(5176),calc:e(52752),crossTraceCalc:e(70766),plot:e(30436),style:e(55750).style,hoverPoints:e(61326),eventData:e(58593),selectPoints:e(81974),moduleType:"trace",name:"waterfall",basePlotModule:e(93612),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},13494:function($){"use strict";$.exports={waterfallmode:{valType:"enumerated",values:["group","overlay"],dflt:"group",editType:"calc"},waterfallgap:{valType:"number",min:0,max:1,editType:"calc"},waterfallgroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"}}},5176:function($,R,e){"use strict";var k=e(71828),A=e(13494);$.exports=function(l,T,b){var d=!1;function s(r,n){return k.coerce(l,T,A,r,n)}for(var t=0;t<b.length;t++){var o=b[t];if(o.visible&&"waterfall"===o.type){d=!0;break}}d&&(s("waterfallmode"),s("waterfallgap",.2),s("waterfallgroupgap"))}},30436:function($,R,e){"use strict";var k=e(39898),A=e(71828),l=e(91424),T=e(50606).BADNUM,b=e(17295),d=e(72597).clearMinTextSize;$.exports=function(s,t,o,r){var i,a,f,x,n=s._fullLayout;d("waterfall",n),b.plot(s,t,o,r,{mode:n.waterfallmode,norm:n.waterfallmode,gap:n.waterfallgap,groupgap:n.waterfallgroupgap}),i=s,f=(a=t).xaxis,x=a.yaxis,A.makeTraceGroups(r,o,"trace bars").each(function(v){var g=k.select(this),y=v[0].trace,h=A.ensureSingle(g,"g","lines");if(y.connector&&y.connector.visible){var m="h"===y.orientation,w=y.connector.mode,u=h.selectAll("g.line").data(A.identity);u.enter().append("g").classed("line",!0),u.exit().remove();var S=u.size();u.each(function(_,E){if(E===S-1||_.cNext){var L=(z=f,H=x,B=[],J=(F=m)?H:z,(N=[])[0]=(j=F?z:H).c2p((U=_).s0,!0),B[0]=J.c2p(U.p0,!0),N[1]=j.c2p(U.s1,!0),B[1]=J.c2p(U.p1,!0),N[2]=j.c2p(U.nextS0,!0),B[2]=J.c2p(U.nextP0,!0),F?[N,B]:[B,N]),C=L[0],P=L[1],I="";C[0]!==T&&P[0]!==T&&C[1]!==T&&P[1]!==T&&("spanning"===w&&!_.isSum&&E>0&&(I+=m?"M"+C[0]+","+P[1]+"V"+P[0]:"M"+C[1]+","+P[0]+"H"+C[0]),"between"!==w&&(_.isSum||E<S-1)&&(I+=m?"M"+C[1]+","+P[0]+"V"+P[1]:"M"+C[0]+","+P[1]+"H"+C[1]),C[2]!==T&&P[2]!==T&&(I+=m?"M"+C[1]+","+P[1]+"V"+P[2]:"M"+C[1]+","+P[1]+"H"+C[2])),""===I&&(I="M0,0Z"),A.ensureSingle(k.select(this),"path").attr("d",I).call(l.setClipUrl,a.layerClipId,i)}var U,z,H,F,N,B,j,J})}else h.remove()})}},55750:function($,R,e){"use strict";var k=e(39898),A=e(91424),l=e(7901),T=e(37822).DESELECTDIM,b=e(16688),d=e(72597).resizeText,s=b.styleTextPoints;$.exports={style:function(t,o,r){var n=r||k.select(t).selectAll("g.waterfalllayer").selectAll("g.trace");d(t,n,"waterfall"),n.style("opacity",function(i){return i[0].trace.opacity}),n.each(function(i){var a=k.select(this),c=i[0].trace;a.selectAll(".point > path").each(function(p){if(!p.isBlank){var f=c[p.dir].marker;k.select(this).call(l.fill,f.color).call(l.stroke,f.line.color).call(A.dashLine,f.line.dash,f.line.width).style("opacity",c.selectedpoints&&!p.selected?T:1)}}),s(a,c,t),a.selectAll(".lines").each(function(){var p=c.connector.line;A.lineGroupStyle(k.select(this).selectAll("path"),p.width,p.color,p.dash)})})}}},82887:function($,R,e){"use strict";var k=e(89298),A=e(71828),l=e(86281),T=e(79344).p,b=e(50606).BADNUM;R.moduleType="transform",R.name="aggregate";var d=R.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"},s=d.aggregations;function t(i,a,c,p){if(p.enabled){for(var f=p.target,x=A.nestedProperty(a,f),v=x.get(),g=function(m,w){var S=w.d2c,_=w.c2d;switch(m.func){case"count":return o;case"first":return r;case"last":return n;case"sum":return function(E,L){for(var C=0,P=0;P<L.length;P++){var I=S(E[L[P]]);I!==b&&(C+=I)}return _(C)};case"avg":return function(E,L){for(var C=0,P=0,I=0;I<L.length;I++){var U=S(E[L[I]]);U!==b&&(C+=U,P++)}return P?_(C/P):b};case"min":return function(E,L){for(var C=1/0,P=0;P<L.length;P++){var I=S(E[L[P]]);I!==b&&(C=Math.min(C,I))}return C===1/0?b:_(C)};case"max":return function(E,L){for(var C=-1/0,P=0;P<L.length;P++){var I=S(E[L[P]]);I!==b&&(C=Math.max(C,I))}return C===-1/0?b:_(C)};case"range":return function(E,L){for(var C=1/0,P=-1/0,I=0;I<L.length;I++){var U=S(E[L[I]]);U!==b&&(C=Math.min(C,U),P=Math.max(P,U))}return P===-1/0||C===1/0?b:_(P-C)};case"change":return function(E,L){var C=S(E[L[0]]),P=S(E[L[L.length-1]]);return C===b||P===b?b:_(P-C)};case"median":return function(E,L){for(var C=[],P=0;P<L.length;P++){var I=S(E[L[P]]);I!==b&&C.push(I)}if(!C.length)return b;C.sort(A.sorterAsc);var U=(C.length-1)/2;return _((C[Math.floor(U)]+C[Math.ceil(U)])/2)};case"mode":return function(E,L){for(var C={},P=0,I=b,U=0;U<L.length;U++){var z=S(E[L[U]]);if(z!==b){var H=C[z]=(C[z]||0)+1;H>P&&(P=H,I=z)}}return P?_(I):b};case"rms":return function(E,L){for(var C=0,P=0,I=0;I<L.length;I++){var U=S(E[L[I]]);U!==b&&(C+=U*U,P++)}return P?_(Math.sqrt(C/P)):b};case"stddev":return function(E,L){var C,P=0,I=0,U=1,z=b;for(C=0;C<L.length&&z===b;C++)z=S(E[L[C]]);if(z===b)return b;for(;C<L.length;C++){var H=S(E[L[C]]);if(H!==b){var F=H-z;P+=F,I+=F*F,U++}}var N="sample"===m.funcmode?U-1:U;return N?Math.sqrt((I-P*P/U)/N):0}}}(p,k.getDataConversions(i,a,f,v)),y=new Array(c.length),h=0;h<c.length;h++)y[h]=g(v,c[h]);x.set(y),"count"===p.func&&A.pushUnique(a._arrayAttrs,f)}}function o(i,a){return a.length}function r(i,a){return i[a[0]]}function n(i,a){return i[a[a.length-1]]}R.supplyDefaults=function(i,a){var c,p={};function f(_,E){return A.coerce(i,p,d,_,E)}if(!f("enabled"))return p;var x=l.findArrayAttributes(a),v={};for(c=0;c<x.length;c++)v[x[c]]=1;var g=f("groups");if(!Array.isArray(g)){if(!v[g])return p.enabled=!1,p;v[g]=0}var y,h=i.aggregations||[],m=p.aggregations=new Array(h.length);function w(_,E){return A.coerce(h[c],y,s,_,E)}for(c=0;c<h.length;c++){y={_index:c};var u=w("target"),S=w("func");w("enabled")&&u&&(v[u]||"count"===S&&void 0===v[u])?("stddev"===S&&w("funcmode"),v[u]=0,m[c]=y):m[c]={enabled:!1,_index:c}}for(c=0;c<x.length;c++)v[x[c]]&&m.push({target:x[c],func:s.func.dflt,enabled:!0,_index:-1});return p},R.calcTransform=function(i,a,c){if(c.enabled){var p=c.groups,f=A.getTargetArray(a,{target:p});if(f){var x,v,g,h={},m={},w=[],u=T(a.transforms,c),S=f.length;for(a._length&&(S=Math.min(S,a._length)),x=0;x<S;x++)void 0===(g=h[v=f[x]])?(h[v]=w.length,w.push([x]),m[h[v]]=u(x)):(w[g].push(x),m[h[v]]=(m[h[v]]||[]).concat(u(x)));c._indexToPoints=m;var _=c.aggregations;for(x=0;x<_.length;x++)t(i,a,w,_[x]);"string"==typeof p&&t(i,a,w,{target:p,func:"first",enabled:!0}),a._length=w.length}}}},14382:function($,R,e){"use strict";var k=e(71828),A=e(73972),l=e(89298),T=e(79344).p,b=e(74808),d=b.COMPARISON_OPS,s=b.INTERVAL_OPS,t=b.SET_OPS;R.moduleType="transform",R.name="filter",R.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(d).concat(s).concat(t),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},preservegaps:{valType:"boolean",dflt:!1,editType:"calc"},editType:"calc"},R.supplyDefaults=function(o){var r={};function n(c,p){return k.coerce(o,r,R.attributes,c,p)}if(n("enabled")){var i=n("target");if(k.isArrayOrTypedArray(i)&&0===i.length)return r.enabled=!1,r;n("preservegaps"),n("operation"),n("value");var a=A.getComponentMethod("calendars","handleDefaults");a(o,r,"valuecalendar",null),a(o,r,"targetcalendar",null)}return r},R.calcTransform=function(o,r,n){if(n.enabled){var i=k.getTargetArray(r,n);if(i){var a=n.target,c=i.length;r._length&&(c=Math.min(c,r._length));var p=n.targetcalendar,f=r._arrayAttrs,x=n.preservegaps;if("string"==typeof a){var v=k.nestedProperty(r,a+"calendar").get();v&&(p=v)}var g,y,h=function(L,C,P){var I=L.operation,U=L.value,z=Array.isArray(U);function H(j){return-1!==j.indexOf(I)}var F,N=function(j){return C(j,0,L.valuecalendar)},B=function(j){return C(j,0,P)};switch(H(d)?F=N(z?U[0]:U):H(s)?F=z?[N(U[0]),N(U[1])]:[N(U),N(U)]:H(t)&&(F=z?U.map(N):[N(U)]),I){case"=":return function(j){return B(j)===F};case"!=":return function(j){return B(j)!==F};case"<":return function(j){return B(j)<F};case"<=":return function(j){return B(j)<=F};case">":return function(j){return B(j)>F};case">=":return function(j){return B(j)>=F};case"[]":return function(j){var J=B(j);return J>=F[0]&&J<=F[1]};case"()":return function(j){var J=B(j);return J>F[0]&&J<F[1]};case"[)":return function(j){var J=B(j);return J>=F[0]&&J<F[1]};case"(]":return function(j){var J=B(j);return J>F[0]&&J<=F[1]};case"][":return function(j){var J=B(j);return J<=F[0]||J>=F[1]};case")(":return function(j){var J=B(j);return J<F[0]||J>F[1]};case"](":return function(j){var J=B(j);return J<=F[0]||J>F[1]};case")[":return function(j){var J=B(j);return J<F[0]||J>=F[1]};case"{}":return function(j){return-1!==F.indexOf(B(j))};case"}{":return function(j){return-1===F.indexOf(B(j))}}}(n,l.getDataToCoordFunc(o,r,a,i),p),m={},w={},u=0;x?(g=function(L){m[L.astr]=k.extendDeep([],L.get()),L.set(new Array(c))},y=function(L,C){var P=m[L.astr][C];L.get()[C]=P}):(g=function(L){m[L.astr]=k.extendDeep([],L.get()),L.set([])},y=function(L,C){var P=m[L.astr][C];L.get().push(P)}),E(g);for(var S=T(r.transforms,n),_=0;_<c;_++)h(i[_])?(E(y,_),w[u++]=S(_)):x&&u++;n._indexToPoints=w,r._length=u}}function E(L,C){for(var P=0;P<f.length;P++)L(k.nestedProperty(r,f[P]),C)}}},43102:function($,R,e){"use strict";var k=e(71828),A=e(86281),l=e(74875),T=e(79344).p;function b(d,s){var t,o,r,n,i,a,c,p,f,x,v=s.transform,g=s.transformIndex,y=d.transforms[g].groups,h=T(d.transforms,v);if(!k.isArrayOrTypedArray(y)||0===y.length)return[d];var m=k.filterUnique(y),w=new Array(m.length),u=y.length,S=A.findArrayAttributes(d),_=v.styles||[],E={};for(t=0;t<_.length;t++)E[_[t].target]=_[t].value;v.styles&&(x=k.keyedContainer(v,"styles","target","value.name"));var L={},C={};for(t=0;t<m.length;t++){L[a=m[t]]=t,C[a]=0,(c=w[t]=k.extendDeepNoArrays({},d))._group=a,c.transforms[g]._indexToPoints={};var P=null;for(x&&(P=x.get(a)),c.name=P||""===P?P:k.templateString(v.nameformat,{trace:d.name,group:a}),p=c.transforms,c.transforms=[],o=0;o<p.length;o++)c.transforms[o]=k.extendDeepNoArrays({},p[o]);for(o=0;o<S.length;o++)k.nestedProperty(c,S[o]).set([])}for(r=0;r<S.length;r++){for(n=S[r],o=0,f=[];o<m.length;o++)f[o]=k.nestedProperty(w[o],n).get();for(i=k.nestedProperty(d,n).get(),o=0;o<u;o++)f[L[y[o]]].push(i[o])}for(o=0;o<u;o++)(c=w[L[y[o]]]).transforms[g]._indexToPoints[C[y[o]]]=h(o),C[y[o]]++;for(t=0;t<m.length;t++)a=m[t],l.clearExpandedTraceDefaultColors(c=w[t]),c=k.extendDeepNoArrays(c,E[a]||{});return w}R.moduleType="transform",R.name="groupby",R.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"},R.supplyDefaults=function(d,s,t){var o,r={};function n(f,x){return k.coerce(d,r,R.attributes,f,x)}if(!n("enabled"))return r;n("groups"),n("nameformat",t._dataLength>1?"%{group} (%{trace})":"%{group}");var i=d.styles,a=r.styles=[];if(i)for(o=0;o<i.length;o++){var c=a[o]={};k.coerce(i[o],a[o],R.attributes.styles,"target");var p=k.coerce(i[o],a[o],R.attributes.styles,"value");k.isPlainObject(p)?c.value=k.extendDeep({},p):p&&delete c.value}return r},R.transform=function(d,s){var t,o,r,n=[];for(o=0;o<d.length;o++)for(t=b(d[o],s),r=0;r<t.length;r++)n.push(t[r]);return n}},79344:function($,R){"use strict";R.p=function(e,k){for(var A,l,T=0;T<e.length&&(A=e[T])!==k;T++)A._indexToPoints&&!1!==A.enabled&&(l=A._indexToPoints);return l?function(d){return l[d]}:function(d){return[d]}}},32275:function($,R,e){"use strict";var k=e(71828),A=e(89298),l=e(79344).p,T=e(50606).BADNUM;R.moduleType="transform",R.name="sort",R.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"},R.supplyDefaults=function(b){var d={};function s(t,o){return k.coerce(b,d,R.attributes,t,o)}return s("enabled")&&(s("target"),s("order")),d},R.calcTransform=function(b,d,s){if(s.enabled){var t=k.getTargetArray(d,s);if(t){var o=s.target,r=t.length;d._length&&(r=Math.min(r,d._length));var n,i,a=d._arrayAttrs,c=function(y,h,m,w){var u,S=new Array(w),_=new Array(w);for(u=0;u<w;u++)S[u]={v:h[u],i:u};for(S.sort(function(E,L){switch(E.order){case"ascending":return function(C,P){var I=L(C.v),U=L(P.v);return I===T?1:U===T?-1:I-U};case"descending":return function(C,P){var I=L(C.v),U=L(P.v);return I===T?1:U===T?-1:U-I}}}(y,m)),u=0;u<w;u++)_[u]=S[u].i;return _}(s,t,A.getDataToCoordFunc(b,d,o,t),r),p=l(d.transforms,s),f={};for(n=0;n<a.length;n++){var x=k.nestedProperty(d,a[n]),v=x.get(),g=new Array(r);for(i=0;i<r;i++)g[i]=v[c[i]];x.set(g)}for(i=0;i<r;i++)f[i]=p(c[i]);s._indexToPoints=f,d._length=r}}}},11506:function($,R){"use strict";R.version="2.18.0"},9330:function($,R,e){var k,A=e(90386);k=function(){return function(){var l={7386:function(d,s,t){d.exports={alpha_shape:t(2350),convex_hull:t(5537),delaunay_triangulate:t(4419),gl_cone3d:t(1140),gl_error3d:t(3110),gl_heatmap2d:t(6386),gl_line3d:t(6086),gl_mesh3d:t(8116),gl_plot2d:t(2117),gl_plot3d:t(1059),gl_pointcloud2d:t(8271),gl_scatter3d:t(2182),gl_select_box:t(6623),gl_spikes2d:t(3050),gl_streamtube3d:t(7307),gl_surface3d:t(3754),ndarray:t(5050),ndarray_linear_interpolate:t(3581)}},2146:function(d,s,t){"use strict";function n(le,ge){return(n=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(_e,Fe){return _e.__proto__=Fe,_e})(le,ge)}function a(le){if(void 0===le)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return le}function c(le){return(c=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(ge){return ge.__proto__||Object.getPrototypeOf(ge)})(le)}function p(le){return(p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(ge){return typeof ge}:function(ge){return ge&&"function"==typeof Symbol&&ge.constructor===Symbol&&ge!==Symbol.prototype?"symbol":typeof ge})(le)}var f=t(3910),x=t(3187),v="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;s.lW=h,s.h2=50;var g=2147483647;function y(le){if(le>g)throw new RangeError('The value "'+le+'" is invalid for option "size"');var ge=new Uint8Array(le);return Object.setPrototypeOf(ge,h.prototype),ge}function h(le,ge,_e){if("number"==typeof le){if("string"==typeof ge)throw new TypeError('The "string" argument must be of type string. Received type number');return u(le)}return m(le,ge,_e)}function m(le,ge,_e){if("string"==typeof le)return function(He,nt){if("string"==typeof nt&&""!==nt||(nt="utf8"),!h.isEncoding(nt))throw new TypeError("Unknown encoding: "+nt);var tt=0|L(He,nt),ot=y(tt),dt=ot.write(He,nt);return dt!==tt&&(ot=ot.slice(0,dt)),ot}(le,ge);if(ArrayBuffer.isView(le))return function(He){if(ye(He,Uint8Array)){var nt=new Uint8Array(He);return _(nt.buffer,nt.byteOffset,nt.byteLength)}return S(He)}(le);if(null==le)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+p(le));if(ye(le,ArrayBuffer)||le&&ye(le.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(ye(le,SharedArrayBuffer)||le&&ye(le.buffer,SharedArrayBuffer)))return _(le,ge,_e);if("number"==typeof le)throw new TypeError('The "value" argument must not be of type number. Received type number');var Fe=le.valueOf&&le.valueOf();if(null!=Fe&&Fe!==le)return h.from(Fe,ge,_e);var Ve=function(He){if(h.isBuffer(He)){var nt=0|E(He.length),tt=y(nt);return 0===tt.length||He.copy(tt,0,0,nt),tt}return void 0!==He.length?"number"!=typeof He.length||Me(He.length)?y(0):S(He):"Buffer"===He.type&&Array.isArray(He.data)?S(He.data):void 0}(le);if(Ve)return Ve;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof le[Symbol.toPrimitive])return h.from(le[Symbol.toPrimitive]("string"),ge,_e);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+p(le))}function w(le){if("number"!=typeof le)throw new TypeError('"size" argument must be of type number');if(le<0)throw new RangeError('The value "'+le+'" is invalid for option "size"')}function u(le){return w(le),y(le<0?0:0|E(le))}function S(le){for(var ge=le.length<0?0:0|E(le.length),_e=y(ge),Fe=0;Fe<ge;Fe+=1)_e[Fe]=255&le[Fe];return _e}function _(le,ge,_e){if(ge<0||le.byteLength<ge)throw new RangeError('"offset" is outside of buffer bounds');if(le.byteLength<ge+(_e||0))throw new RangeError('"length" is outside of buffer bounds');var Fe;return Fe=void 0===ge&&void 0===_e?new Uint8Array(le):void 0===_e?new Uint8Array(le,ge):new Uint8Array(le,ge,_e),Object.setPrototypeOf(Fe,h.prototype),Fe}function E(le){if(le>=g)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+g.toString(16)+" bytes");return 0|le}function L(le,ge){if(h.isBuffer(le))return le.length;if(ArrayBuffer.isView(le)||ye(le,ArrayBuffer))return le.byteLength;if("string"!=typeof le)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+p(le));var _e=le.length,Fe=arguments.length>2&&!0===arguments[2];if(!Fe&&0===_e)return 0;for(var Ve=!1;;)switch(ge){case"ascii":case"latin1":case"binary":return _e;case"utf8":case"utf-8":return Q(le).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*_e;case"hex":return _e>>>1;case"base64":return se(le).length;default:if(Ve)return Fe?-1:Q(le).length;ge=(""+ge).toLowerCase(),Ve=!0}}function C(le,ge,_e){var Fe=!1;if((void 0===ge||ge<0)&&(ge=0),ge>this.length||((void 0===_e||_e>this.length)&&(_e=this.length),_e<=0)||(_e>>>=0)<=(ge>>>=0))return"";for(le||(le="utf8");;)switch(le){case"hex":return X(this,ge,_e);case"utf8":case"utf-8":return J(this,ge,_e);case"ascii":return V(this,ge,_e);case"latin1":case"binary":return W(this,ge,_e);case"base64":return j(this,ge,_e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return K(this,ge,_e);default:if(Fe)throw new TypeError("Unknown encoding: "+le);le=(le+"").toLowerCase(),Fe=!0}}function P(le,ge,_e){var Fe=le[ge];le[ge]=le[_e],le[_e]=Fe}function I(le,ge,_e,Fe,Ve){if(0===le.length)return-1;if("string"==typeof _e?(Fe=_e,_e=0):_e>2147483647?_e=2147483647:_e<-2147483648&&(_e=-2147483648),Me(_e=+_e)&&(_e=Ve?0:le.length-1),_e<0&&(_e=le.length+_e),_e>=le.length){if(Ve)return-1;_e=le.length-1}else if(_e<0){if(!Ve)return-1;_e=0}if("string"==typeof ge&&(ge=h.from(ge,Fe)),h.isBuffer(ge))return 0===ge.length?-1:U(le,ge,_e,Fe,Ve);if("number"==typeof ge)return ge&=255,"function"==typeof Uint8Array.prototype.indexOf?Ve?Uint8Array.prototype.indexOf.call(le,ge,_e):Uint8Array.prototype.lastIndexOf.call(le,ge,_e):U(le,[ge],_e,Fe,Ve);throw new TypeError("val must be string, number or Buffer")}function U(le,ge,_e,Fe,Ve){var He,nt=1,tt=le.length,ot=ge.length;if(void 0!==Fe&&("ucs2"===(Fe=String(Fe).toLowerCase())||"ucs-2"===Fe||"utf16le"===Fe||"utf-16le"===Fe)){if(le.length<2||ge.length<2)return-1;nt=2,tt/=2,ot/=2,_e/=2}function dt(Lt,Ct){return 1===nt?Lt[Ct]:Lt.readUInt16BE(Ct*nt)}if(Ve){var kt=-1;for(He=_e;He<tt;He++)if(dt(le,He)===dt(ge,-1===kt?0:He-kt)){if(-1===kt&&(kt=He),He-kt+1===ot)return kt*nt}else-1!==kt&&(He-=He-kt),kt=-1}else for(_e+ot>tt&&(_e=tt-ot),He=_e;He>=0;He--){for(var mt=!0,wt=0;wt<ot;wt++)if(dt(le,He+wt)!==dt(ge,wt)){mt=!1;break}if(mt)return He}return-1}function z(le,ge,_e,Fe){_e=Number(_e)||0;var Ve=le.length-_e;Fe?(Fe=Number(Fe))>Ve&&(Fe=Ve):Fe=Ve;var He,nt=ge.length;for(Fe>nt/2&&(Fe=nt/2),He=0;He<Fe;++He){var tt=parseInt(ge.substr(2*He,2),16);if(Me(tt))return He;le[_e+He]=tt}return He}function H(le,ge,_e,Fe){return fe(Q(ge,le.length-_e),le,_e,Fe)}function F(le,ge,_e,Fe){return fe(function(Ve){for(var He=[],nt=0;nt<Ve.length;++nt)He.push(255&Ve.charCodeAt(nt));return He}(ge),le,_e,Fe)}function N(le,ge,_e,Fe){return fe(se(ge),le,_e,Fe)}function B(le,ge,_e,Fe){return fe(function(Ve,He){for(var nt,tt,dt=[],kt=0;kt<Ve.length&&!((He-=2)<0);++kt)tt=(nt=Ve.charCodeAt(kt))>>8,dt.push(nt%256),dt.push(tt);return dt}(ge,le.length-_e),le,_e,Fe)}function j(le,ge,_e){return f.fromByteArray(0===ge&&_e===le.length?le:le.slice(ge,_e))}function J(le,ge,_e){_e=Math.min(le.length,_e);for(var Fe=[],Ve=ge;Ve<_e;){var He=le[Ve],nt=null,tt=He>239?4:He>223?3:He>191?2:1;if(Ve+tt<=_e){var ot=void 0,dt=void 0,kt=void 0,mt=void 0;switch(tt){case 1:He<128&&(nt=He);break;case 2:128==(192&(ot=le[Ve+1]))&&(mt=(31&He)<<6|63&ot)>127&&(nt=mt);break;case 3:dt=le[Ve+2],128==(192&(ot=le[Ve+1]))&&128==(192&dt)&&(mt=(15&He)<<12|(63&ot)<<6|63&dt)>2047&&(mt<55296||mt>57343)&&(nt=mt);break;case 4:dt=le[Ve+2],kt=le[Ve+3],128==(192&(ot=le[Ve+1]))&&128==(192&dt)&&128==(192&kt)&&(mt=(15&He)<<18|(63&ot)<<12|(63&dt)<<6|63&kt)>65535&&mt<1114112&&(nt=mt)}}null===nt?(nt=65533,tt=1):nt>65535&&(Fe.push((nt-=65536)>>>10&1023|55296),nt=56320|1023&nt),Fe.push(nt),Ve+=tt}return function(wt){var Lt=wt.length;if(Lt<=G)return String.fromCharCode.apply(String,wt);for(var Ct="",It=0;It<Lt;)Ct+=String.fromCharCode.apply(String,wt.slice(It,It+=G));return Ct}(Fe)}(h.TYPED_ARRAY_SUPPORT=function(){try{var le=new Uint8Array(1),ge={foo:function(){return 42}};return Object.setPrototypeOf(ge,Uint8Array.prototype),Object.setPrototypeOf(le,ge),42===le.foo()}catch{return!1}}())||typeof console>"u"||"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(h.prototype,"parent",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.buffer}}),Object.defineProperty(h.prototype,"offset",{enumerable:!0,get:function(){if(h.isBuffer(this))return this.byteOffset}}),h.poolSize=8192,h.from=function(le,ge,_e){return m(le,ge,_e)},Object.setPrototypeOf(h.prototype,Uint8Array.prototype),Object.setPrototypeOf(h,Uint8Array),h.alloc=function(le,ge,_e){return Ve=ge,He=_e,w(Fe=le),Fe<=0?y(Fe):void 0!==Ve?"string"==typeof He?y(Fe).fill(Ve,He):y(Fe).fill(Ve):y(Fe);var Fe,Ve,He},h.allocUnsafe=function(le){return u(le)},h.allocUnsafeSlow=function(le){return u(le)},h.isBuffer=function(le){return null!=le&&!0===le._isBuffer&&le!==h.prototype},h.compare=function(le,ge){if(ye(le,Uint8Array)&&(le=h.from(le,le.offset,le.byteLength)),ye(ge,Uint8Array)&&(ge=h.from(ge,ge.offset,ge.byteLength)),!h.isBuffer(le)||!h.isBuffer(ge))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(le===ge)return 0;for(var _e=le.length,Fe=ge.length,Ve=0,He=Math.min(_e,Fe);Ve<He;++Ve)if(le[Ve]!==ge[Ve]){_e=le[Ve],Fe=ge[Ve];break}return _e<Fe?-1:Fe<_e?1:0},h.isEncoding=function(le){switch(String(le).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}},h.concat=function(le,ge){if(!Array.isArray(le))throw new TypeError('"list" argument must be an Array of Buffers');if(0===le.length)return h.alloc(0);var _e;if(void 0===ge)for(ge=0,_e=0;_e<le.length;++_e)ge+=le[_e].length;var Fe=h.allocUnsafe(ge),Ve=0;for(_e=0;_e<le.length;++_e){var He=le[_e];if(ye(He,Uint8Array))Ve+He.length>Fe.length?(h.isBuffer(He)||(He=h.from(He)),He.copy(Fe,Ve)):Uint8Array.prototype.set.call(Fe,He,Ve);else{if(!h.isBuffer(He))throw new TypeError('"list" argument must be an Array of Buffers');He.copy(Fe,Ve)}Ve+=He.length}return Fe},h.byteLength=L,h.prototype._isBuffer=!0,h.prototype.swap16=function(){var le=this.length;if(le%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var ge=0;ge<le;ge+=2)P(this,ge,ge+1);return this},h.prototype.swap32=function(){var le=this.length;if(le%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var ge=0;ge<le;ge+=4)P(this,ge,ge+3),P(this,ge+1,ge+2);return this},h.prototype.swap64=function(){var le=this.length;if(le%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var ge=0;ge<le;ge+=8)P(this,ge,ge+7),P(this,ge+1,ge+6),P(this,ge+2,ge+5),P(this,ge+3,ge+4);return this},h.prototype.toString=function(){var le=this.length;return 0===le?"":0===arguments.length?J(this,0,le):C.apply(this,arguments)},h.prototype.toLocaleString=h.prototype.toString,h.prototype.equals=function(le){if(!h.isBuffer(le))throw new TypeError("Argument must be a Buffer");return this===le||0===h.compare(this,le)},h.prototype.inspect=function(){var le="",ge=s.h2;return le=this.toString("hex",0,ge).replace(/(.{2})/g,"$1 ").trim(),this.length>ge&&(le+=" ... "),"<Buffer "+le+">"},v&&(h.prototype[v]=h.prototype.inspect),h.prototype.compare=function(le,ge,_e,Fe,Ve){if(ye(le,Uint8Array)&&(le=h.from(le,le.offset,le.byteLength)),!h.isBuffer(le))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+p(le));if(void 0===ge&&(ge=0),void 0===_e&&(_e=le?le.length:0),void 0===Fe&&(Fe=0),void 0===Ve&&(Ve=this.length),ge<0||_e>le.length||Fe<0||Ve>this.length)throw new RangeError("out of range index");if(Fe>=Ve&&ge>=_e)return 0;if(Fe>=Ve)return-1;if(ge>=_e)return 1;if(this===le)return 0;for(var He=(Ve>>>=0)-(Fe>>>=0),nt=(_e>>>=0)-(ge>>>=0),tt=Math.min(He,nt),ot=this.slice(Fe,Ve),dt=le.slice(ge,_e),kt=0;kt<tt;++kt)if(ot[kt]!==dt[kt]){He=ot[kt],nt=dt[kt];break}return He<nt?-1:nt<He?1:0},h.prototype.includes=function(le,ge,_e){return-1!==this.indexOf(le,ge,_e)},h.prototype.indexOf=function(le,ge,_e){return I(this,le,ge,_e,!0)},h.prototype.lastIndexOf=function(le,ge,_e){return I(this,le,ge,_e,!1)},h.prototype.write=function(le,ge,_e,Fe){if(void 0===ge)Fe="utf8",_e=this.length,ge=0;else if(void 0===_e&&"string"==typeof ge)Fe=ge,_e=this.length,ge=0;else{if(!isFinite(ge))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");ge>>>=0,isFinite(_e)?(_e>>>=0,void 0===Fe&&(Fe="utf8")):(Fe=_e,_e=void 0)}var Ve=this.length-ge;if((void 0===_e||_e>Ve)&&(_e=Ve),le.length>0&&(_e<0||ge<0)||ge>this.length)throw new RangeError("Attempt to write outside buffer bounds");Fe||(Fe="utf8");for(var He=!1;;)switch(Fe){case"hex":return z(this,le,ge,_e);case"utf8":case"utf-8":return H(this,le,ge,_e);case"ascii":case"latin1":case"binary":return F(this,le,ge,_e);case"base64":return N(this,le,ge,_e);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return B(this,le,ge,_e);default:if(He)throw new TypeError("Unknown encoding: "+Fe);Fe=(""+Fe).toLowerCase(),He=!0}},h.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var G=4096;function V(le,ge,_e){var Fe="";_e=Math.min(le.length,_e);for(var Ve=ge;Ve<_e;++Ve)Fe+=String.fromCharCode(127&le[Ve]);return Fe}function W(le,ge,_e){var Fe="";_e=Math.min(le.length,_e);for(var Ve=ge;Ve<_e;++Ve)Fe+=String.fromCharCode(le[Ve]);return Fe}function X(le,ge,_e){var Fe=le.length;(!ge||ge<0)&&(ge=0),(!_e||_e<0||_e>Fe)&&(_e=Fe);for(var Ve="",He=ge;He<_e;++He)Ve+=Ie[le[He]];return Ve}function K(le,ge,_e){for(var Fe=le.slice(ge,_e),Ve="",He=0;He<Fe.length-1;He+=2)Ve+=String.fromCharCode(Fe[He]+256*Fe[He+1]);return Ve}function re(le,ge,_e){if(le%1!=0||le<0)throw new RangeError("offset is not uint");if(le+ge>_e)throw new RangeError("Trying to access beyond buffer length")}function ee(le,ge,_e,Fe,Ve,He){if(!h.isBuffer(le))throw new TypeError('"buffer" argument must be a Buffer instance');if(ge>Ve||ge<He)throw new RangeError('"value" argument is out of bounds');if(_e+Fe>le.length)throw new RangeError("Index out of range")}function ie(le,ge,_e,Fe,Ve){xe(ge,Fe,Ve,le,_e,7);var He=Number(ge&BigInt(4294967295));le[_e++]=He,le[_e++]=He>>=8,le[_e++]=He>>=8,le[_e++]=He>>=8;var nt=Number(ge>>BigInt(32)&BigInt(4294967295));return le[_e++]=nt,le[_e++]=nt>>=8,le[_e++]=nt>>=8,le[_e++]=nt>>=8,_e}function oe(le,ge,_e,Fe,Ve){xe(ge,Fe,Ve,le,_e,7);var He=Number(ge&BigInt(4294967295));le[_e+7]=He,le[_e+6]=He>>=8,le[_e+5]=He>>=8,le[_e+4]=He>>=8;var nt=Number(ge>>BigInt(32)&BigInt(4294967295));return le[_e+3]=nt,le[_e+2]=nt>>=8,le[_e+1]=nt>>=8,le[_e]=nt>>=8,_e+8}function ce(le,ge,_e,Fe,Ve,He){if(_e+Fe>le.length)throw new RangeError("Index out of range");if(_e<0)throw new RangeError("Index out of range")}function me(le,ge,_e,Fe,Ve){return ge=+ge,_e>>>=0,Ve||ce(le,0,_e,4),x.write(le,ge,_e,Fe,23,4),_e+4}function de(le,ge,_e,Fe,Ve){return ge=+ge,_e>>>=0,Ve||ce(le,0,_e,8),x.write(le,ge,_e,Fe,52,8),_e+8}h.prototype.slice=function(le,ge){var _e=this.length;(le=~~le)<0?(le+=_e)<0&&(le=0):le>_e&&(le=_e),(ge=void 0===ge?_e:~~ge)<0?(ge+=_e)<0&&(ge=0):ge>_e&&(ge=_e),ge<le&&(ge=le);var Fe=this.subarray(le,ge);return Object.setPrototypeOf(Fe,h.prototype),Fe},h.prototype.readUintLE=h.prototype.readUIntLE=function(le,ge,_e){le>>>=0,ge>>>=0,_e||re(le,ge,this.length);for(var Fe=this[le],Ve=1,He=0;++He<ge&&(Ve*=256);)Fe+=this[le+He]*Ve;return Fe},h.prototype.readUintBE=h.prototype.readUIntBE=function(le,ge,_e){le>>>=0,ge>>>=0,_e||re(le,ge,this.length);for(var Fe=this[le+--ge],Ve=1;ge>0&&(Ve*=256);)Fe+=this[le+--ge]*Ve;return Fe},h.prototype.readUint8=h.prototype.readUInt8=function(le,ge){return le>>>=0,ge||re(le,1,this.length),this[le]},h.prototype.readUint16LE=h.prototype.readUInt16LE=function(le,ge){return le>>>=0,ge||re(le,2,this.length),this[le]|this[le+1]<<8},h.prototype.readUint16BE=h.prototype.readUInt16BE=function(le,ge){return le>>>=0,ge||re(le,2,this.length),this[le]<<8|this[le+1]},h.prototype.readUint32LE=h.prototype.readUInt32LE=function(le,ge){return le>>>=0,ge||re(le,4,this.length),(this[le]|this[le+1]<<8|this[le+2]<<16)+16777216*this[le+3]},h.prototype.readUint32BE=h.prototype.readUInt32BE=function(le,ge){return le>>>=0,ge||re(le,4,this.length),16777216*this[le]+(this[le+1]<<16|this[le+2]<<8|this[le+3])},h.prototype.readBigUInt64LE=Ce(function(le){ke(le>>>=0,"offset");var ge=this[le],_e=this[le+7];void 0!==ge&&void 0!==_e||Ae(le,this.length-8);var Fe=ge+this[++le]*Math.pow(2,8)+this[++le]*Math.pow(2,16)+this[++le]*Math.pow(2,24),Ve=this[++le]+this[++le]*Math.pow(2,8)+this[++le]*Math.pow(2,16)+_e*Math.pow(2,24);return BigInt(Fe)+(BigInt(Ve)<<BigInt(32))}),h.prototype.readBigUInt64BE=Ce(function(le){ke(le>>>=0,"offset");var ge=this[le],_e=this[le+7];void 0!==ge&&void 0!==_e||Ae(le,this.length-8);var Fe=ge*Math.pow(2,24)+this[++le]*Math.pow(2,16)+this[++le]*Math.pow(2,8)+this[++le],Ve=this[++le]*Math.pow(2,24)+this[++le]*Math.pow(2,16)+this[++le]*Math.pow(2,8)+_e;return(BigInt(Fe)<<BigInt(32))+BigInt(Ve)}),h.prototype.readIntLE=function(le,ge,_e){le>>>=0,ge>>>=0,_e||re(le,ge,this.length);for(var Fe=this[le],Ve=1,He=0;++He<ge&&(Ve*=256);)Fe+=this[le+He]*Ve;return Fe>=(Ve*=128)&&(Fe-=Math.pow(2,8*ge)),Fe},h.prototype.readIntBE=function(le,ge,_e){le>>>=0,ge>>>=0,_e||re(le,ge,this.length);for(var Fe=ge,Ve=1,He=this[le+--Fe];Fe>0&&(Ve*=256);)He+=this[le+--Fe]*Ve;return He>=(Ve*=128)&&(He-=Math.pow(2,8*ge)),He},h.prototype.readInt8=function(le,ge){return le>>>=0,ge||re(le,1,this.length),128&this[le]?-1*(255-this[le]+1):this[le]},h.prototype.readInt16LE=function(le,ge){le>>>=0,ge||re(le,2,this.length);var _e=this[le]|this[le+1]<<8;return 32768&_e?4294901760|_e:_e},h.prototype.readInt16BE=function(le,ge){le>>>=0,ge||re(le,2,this.length);var _e=this[le+1]|this[le]<<8;return 32768&_e?4294901760|_e:_e},h.prototype.readInt32LE=function(le,ge){return le>>>=0,ge||re(le,4,this.length),this[le]|this[le+1]<<8|this[le+2]<<16|this[le+3]<<24},h.prototype.readInt32BE=function(le,ge){return le>>>=0,ge||re(le,4,this.length),this[le]<<24|this[le+1]<<16|this[le+2]<<8|this[le+3]},h.prototype.readBigInt64LE=Ce(function(le){ke(le>>>=0,"offset");var ge=this[le],_e=this[le+7];void 0!==ge&&void 0!==_e||Ae(le,this.length-8);var Fe=this[le+4]+this[le+5]*Math.pow(2,8)+this[le+6]*Math.pow(2,16)+(_e<<24);return(BigInt(Fe)<<BigInt(32))+BigInt(ge+this[++le]*Math.pow(2,8)+this[++le]*Math.pow(2,16)+this[++le]*Math.pow(2,24))}),h.prototype.readBigInt64BE=Ce(function(le){ke(le>>>=0,"offset");var ge=this[le],_e=this[le+7];void 0!==ge&&void 0!==_e||Ae(le,this.length-8);var Fe=(ge<<24)+this[++le]*Math.pow(2,16)+this[++le]*Math.pow(2,8)+this[++le];return(BigInt(Fe)<<BigInt(32))+BigInt(this[++le]*Math.pow(2,24)+this[++le]*Math.pow(2,16)+this[++le]*Math.pow(2,8)+_e)}),h.prototype.readFloatLE=function(le,ge){return le>>>=0,ge||re(le,4,this.length),x.read(this,le,!0,23,4)},h.prototype.readFloatBE=function(le,ge){return le>>>=0,ge||re(le,4,this.length),x.read(this,le,!1,23,4)},h.prototype.readDoubleLE=function(le,ge){return le>>>=0,ge||re(le,8,this.length),x.read(this,le,!0,52,8)},h.prototype.readDoubleBE=function(le,ge){return le>>>=0,ge||re(le,8,this.length),x.read(this,le,!1,52,8)},h.prototype.writeUintLE=h.prototype.writeUIntLE=function(le,ge,_e,Fe){le=+le,ge>>>=0,_e>>>=0,Fe||ee(this,le,ge,_e,Math.pow(2,8*_e)-1,0);var Ve=1,He=0;for(this[ge]=255&le;++He<_e&&(Ve*=256);)this[ge+He]=le/Ve&255;return ge+_e},h.prototype.writeUintBE=h.prototype.writeUIntBE=function(le,ge,_e,Fe){le=+le,ge>>>=0,_e>>>=0,Fe||ee(this,le,ge,_e,Math.pow(2,8*_e)-1,0);var Ve=_e-1,He=1;for(this[ge+Ve]=255&le;--Ve>=0&&(He*=256);)this[ge+Ve]=le/He&255;return ge+_e},h.prototype.writeUint8=h.prototype.writeUInt8=function(le,ge,_e){return le=+le,ge>>>=0,_e||ee(this,le,ge,1,255,0),this[ge]=255&le,ge+1},h.prototype.writeUint16LE=h.prototype.writeUInt16LE=function(le,ge,_e){return le=+le,ge>>>=0,_e||ee(this,le,ge,2,65535,0),this[ge]=255&le,this[ge+1]=le>>>8,ge+2},h.prototype.writeUint16BE=h.prototype.writeUInt16BE=function(le,ge,_e){return le=+le,ge>>>=0,_e||ee(this,le,ge,2,65535,0),this[ge]=le>>>8,this[ge+1]=255&le,ge+2},h.prototype.writeUint32LE=h.prototype.writeUInt32LE=function(le,ge,_e){return le=+le,ge>>>=0,_e||ee(this,le,ge,4,4294967295,0),this[ge+3]=le>>>24,this[ge+2]=le>>>16,this[ge+1]=le>>>8,this[ge]=255&le,ge+4},h.prototype.writeUint32BE=h.prototype.writeUInt32BE=function(le,ge,_e){return le=+le,ge>>>=0,_e||ee(this,le,ge,4,4294967295,0),this[ge]=le>>>24,this[ge+1]=le>>>16,this[ge+2]=le>>>8,this[ge+3]=255&le,ge+4},h.prototype.writeBigUInt64LE=Ce(function(le){return ie(this,le,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeBigUInt64BE=Ce(function(le){return oe(this,le,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),h.prototype.writeIntLE=function(le,ge,_e,Fe){if(le=+le,ge>>>=0,!Fe){var Ve=Math.pow(2,8*_e-1);ee(this,le,ge,_e,Ve-1,-Ve)}var He=0,nt=1,tt=0;for(this[ge]=255&le;++He<_e&&(nt*=256);)le<0&&0===tt&&0!==this[ge+He-1]&&(tt=1),this[ge+He]=(le/nt>>0)-tt&255;return ge+_e},h.prototype.writeIntBE=function(le,ge,_e,Fe){if(le=+le,ge>>>=0,!Fe){var Ve=Math.pow(2,8*_e-1);ee(this,le,ge,_e,Ve-1,-Ve)}var He=_e-1,nt=1,tt=0;for(this[ge+He]=255&le;--He>=0&&(nt*=256);)le<0&&0===tt&&0!==this[ge+He+1]&&(tt=1),this[ge+He]=(le/nt>>0)-tt&255;return ge+_e},h.prototype.writeInt8=function(le,ge,_e){return le=+le,ge>>>=0,_e||ee(this,le,ge,1,127,-128),le<0&&(le=255+le+1),this[ge]=255&le,ge+1},h.prototype.writeInt16LE=function(le,ge,_e){return le=+le,ge>>>=0,_e||ee(this,le,ge,2,32767,-32768),this[ge]=255&le,this[ge+1]=le>>>8,ge+2},h.prototype.writeInt16BE=function(le,ge,_e){return le=+le,ge>>>=0,_e||ee(this,le,ge,2,32767,-32768),this[ge]=le>>>8,this[ge+1]=255&le,ge+2},h.prototype.writeInt32LE=function(le,ge,_e){return le=+le,ge>>>=0,_e||ee(this,le,ge,4,2147483647,-2147483648),this[ge]=255&le,this[ge+1]=le>>>8,this[ge+2]=le>>>16,this[ge+3]=le>>>24,ge+4},h.prototype.writeInt32BE=function(le,ge,_e){return le=+le,ge>>>=0,_e||ee(this,le,ge,4,2147483647,-2147483648),le<0&&(le=4294967295+le+1),this[ge]=le>>>24,this[ge+1]=le>>>16,this[ge+2]=le>>>8,this[ge+3]=255&le,ge+4},h.prototype.writeBigInt64LE=Ce(function(le){return ie(this,le,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeBigInt64BE=Ce(function(le){return oe(this,le,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),h.prototype.writeFloatLE=function(le,ge,_e){return me(this,le,ge,!0,_e)},h.prototype.writeFloatBE=function(le,ge,_e){return me(this,le,ge,!1,_e)},h.prototype.writeDoubleLE=function(le,ge,_e){return de(this,le,ge,!0,_e)},h.prototype.writeDoubleBE=function(le,ge,_e){return de(this,le,ge,!1,_e)},h.prototype.copy=function(le,ge,_e,Fe){if(!h.isBuffer(le))throw new TypeError("argument should be a Buffer");if(_e||(_e=0),Fe||0===Fe||(Fe=this.length),ge>=le.length&&(ge=le.length),ge||(ge=0),Fe>0&&Fe<_e&&(Fe=_e),Fe===_e||0===le.length||0===this.length)return 0;if(ge<0)throw new RangeError("targetStart out of bounds");if(_e<0||_e>=this.length)throw new RangeError("Index out of range");if(Fe<0)throw new RangeError("sourceEnd out of bounds");Fe>this.length&&(Fe=this.length),le.length-ge<Fe-_e&&(Fe=le.length-ge+_e);var Ve=Fe-_e;return this===le&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(ge,_e,Fe):Uint8Array.prototype.set.call(le,this.subarray(_e,Fe),ge),Ve},h.prototype.fill=function(le,ge,_e,Fe){if("string"==typeof le){if("string"==typeof ge?(Fe=ge,ge=0,_e=this.length):"string"==typeof _e&&(Fe=_e,_e=this.length),void 0!==Fe&&"string"!=typeof Fe)throw new TypeError("encoding must be a string");if("string"==typeof Fe&&!h.isEncoding(Fe))throw new TypeError("Unknown encoding: "+Fe);if(1===le.length){var Ve=le.charCodeAt(0);("utf8"===Fe&&Ve<128||"latin1"===Fe)&&(le=Ve)}}else"number"==typeof le?le&=255:"boolean"==typeof le&&(le=Number(le));if(ge<0||this.length<ge||this.length<_e)throw new RangeError("Out of range index");if(_e<=ge)return this;var He;if(ge>>>=0,_e=void 0===_e?this.length:_e>>>0,le||(le=0),"number"==typeof le)for(He=ge;He<_e;++He)this[He]=le;else{var nt=h.isBuffer(le)?le:h.from(le,Fe),tt=nt.length;if(0===tt)throw new TypeError('The value "'+le+'" is invalid for argument "value"');for(He=0;He<_e-ge;++He)this[He+ge]=nt[He%tt]}return this};var he={};function ve(le,ge,_e){he[le]=function(Fe){!function(kt,mt){if("function"!=typeof mt&&null!==mt)throw new TypeError("Super expression must either be null or a function");kt.prototype=Object.create(mt&&mt.prototype,{constructor:{value:kt,writable:!0,configurable:!0}}),Object.defineProperty(kt,"prototype",{writable:!1}),mt&&n(kt,mt)}(dt,Fe);var Ve,He,nt,tt,ot=(nt=dt,tt=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var kt,mt=c(nt);if(tt){var wt=c(this).constructor;kt=Reflect.construct(mt,arguments,wt)}else kt=mt.apply(this,arguments);return function i(le,ge){if(ge&&("object"===p(ge)||"function"==typeof ge))return ge;if(void 0!==ge)throw new TypeError("Derived constructors may only return object or undefined");return a(le)}(this,kt)});function dt(){var kt;return function o(le,ge){if(!(le instanceof ge))throw new TypeError("Cannot call a class as a function")}(this,dt),kt=ot.call(this),Object.defineProperty(a(kt),"message",{value:ge.apply(a(kt),arguments),writable:!0,configurable:!0}),kt.name="".concat(kt.name," [").concat(le,"]"),delete kt.name,kt}return Ve=dt,(He=[{key:"code",get:function(){return le},set:function(kt){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:kt,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(le,"]: ").concat(this.message)}}])&&function r(le,ge){for(var _e=0;_e<ge.length;_e++){var Fe=ge[_e];Fe.enumerable=Fe.enumerable||!1,Fe.configurable=!0,"value"in Fe&&(Fe.writable=!0),Object.defineProperty(le,Fe.key,Fe)}}(Ve.prototype,He),Object.defineProperty(Ve,"prototype",{writable:!1}),dt}(_e)}function Pe(le){for(var ge="",_e=le.length,Fe="-"===le[0]?1:0;_e>=Fe+4;_e-=3)ge="_".concat(le.slice(_e-3,_e)).concat(ge);return"".concat(le.slice(0,_e)).concat(ge)}function xe(le,ge,_e,Fe,Ve,He){if(le>_e||le<ge){var nt,tt="bigint"==typeof ge?"n":"";throw nt=He>3?0===ge||ge===BigInt(0)?">= 0".concat(tt," and < 2").concat(tt," ** ").concat(8*(He+1)).concat(tt):">= -(2".concat(tt," ** ").concat(8*(He+1)-1).concat(tt,") and < 2 ** ")+"".concat(8*(He+1)-1).concat(tt):">= ".concat(ge).concat(tt," and <= ").concat(_e).concat(tt),new he.ERR_OUT_OF_RANGE("value",nt,le)}var ot,dt,kt;ot=Fe,kt=He,ke(dt=Ve,"offset"),void 0!==ot[dt]&&void 0!==ot[dt+kt]||Ae(dt,ot.length-(kt+1))}function ke(le,ge){if("number"!=typeof le)throw new he.ERR_INVALID_ARG_TYPE(ge,"number",le)}function Ae(le,ge,_e){throw Math.floor(le)!==le?(ke(le,_e),new he.ERR_OUT_OF_RANGE(_e||"offset","an integer",le)):ge<0?new he.ERR_BUFFER_OUT_OF_BOUNDS:new he.ERR_OUT_OF_RANGE(_e||"offset",">= ".concat(_e?1:0," and <= ").concat(ge),le)}ve("ERR_BUFFER_OUT_OF_BOUNDS",function(le){return le?"".concat(le," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),ve("ERR_INVALID_ARG_TYPE",function(le,ge){return'The "'.concat(le,'" argument must be of type number. Received type ').concat(p(ge))},TypeError),ve("ERR_OUT_OF_RANGE",function(le,ge,_e){var Fe='The value of "'.concat(le,'" is out of range.'),Ve=_e;return Number.isInteger(_e)&&Math.abs(_e)>Math.pow(2,32)?Ve=Pe(String(_e)):"bigint"==typeof _e&&(Ve=String(_e),(_e>Math.pow(BigInt(2),BigInt(32))||_e<-Math.pow(BigInt(2),BigInt(32)))&&(Ve=Pe(Ve)),Ve+="n"),Fe+" It must be ".concat(ge,". Received ").concat(Ve)},RangeError);var Te=/[^+/0-9A-Za-z-_]/g;function Q(le,ge){var _e;ge=ge||1/0;for(var Fe=le.length,Ve=null,He=[],nt=0;nt<Fe;++nt){if((_e=le.charCodeAt(nt))>55295&&_e<57344){if(!Ve){if(_e>56319){(ge-=3)>-1&&He.push(239,191,189);continue}if(nt+1===Fe){(ge-=3)>-1&&He.push(239,191,189);continue}Ve=_e;continue}if(_e<56320){(ge-=3)>-1&&He.push(239,191,189),Ve=_e;continue}_e=65536+(Ve-55296<<10|_e-56320)}else Ve&&(ge-=3)>-1&&He.push(239,191,189);if(Ve=null,_e<128){if((ge-=1)<0)break;He.push(_e)}else if(_e<2048){if((ge-=2)<0)break;He.push(_e>>6|192,63&_e|128)}else if(_e<65536){if((ge-=3)<0)break;He.push(_e>>12|224,_e>>6&63|128,63&_e|128)}else{if(!(_e<1114112))throw new Error("Invalid code point");if((ge-=4)<0)break;He.push(_e>>18|240,_e>>12&63|128,_e>>6&63|128,63&_e|128)}}return He}function se(le){return f.toByteArray(function(ge){if((ge=(ge=ge.split("=")[0]).trim().replace(Te,"")).length<2)return"";for(;ge.length%4!=0;)ge+="=";return ge}(le))}function fe(le,ge,_e,Fe){var Ve;for(Ve=0;Ve<Fe&&!(Ve+_e>=ge.length||Ve>=le.length);++Ve)ge[Ve+_e]=le[Ve];return Ve}function ye(le,ge){return le instanceof ge||null!=le&&null!=le.constructor&&null!=le.constructor.name&&le.constructor.name===ge.name}function Me(le){return le!=le}var Ie=function(){for(var le="0123456789abcdef",ge=new Array(256),_e=0;_e<16;++_e)for(var Fe=16*_e,Ve=0;Ve<16;++Ve)ge[Fe+Ve]=le[_e]+le[Ve];return ge}();function Ce(le){return typeof BigInt>"u"?Re:le}function Re(){throw new Error("BigInt not supported")}},3910:function(d,s){"use strict";s.byteLength=function(f){var x=c(f),g=x[1];return 3*(x[0]+g)/4-g},s.toByteArray=function(f){var x,v,E,g=c(f),y=g[0],h=g[1],m=new r(3*(y+(E=h))/4-E),w=0,u=h>0?y-4:y;for(v=0;v<u;v+=4)x=o[f.charCodeAt(v)]<<18|o[f.charCodeAt(v+1)]<<12|o[f.charCodeAt(v+2)]<<6|o[f.charCodeAt(v+3)],m[w++]=x>>16&255,m[w++]=x>>8&255,m[w++]=255&x;return 2===h&&(x=o[f.charCodeAt(v)]<<2|o[f.charCodeAt(v+1)]>>4,m[w++]=255&x),1===h&&(x=o[f.charCodeAt(v)]<<10|o[f.charCodeAt(v+1)]<<4|o[f.charCodeAt(v+2)]>>2,m[w++]=x>>8&255,m[w++]=255&x),m},s.fromByteArray=function(f){for(var x,v=f.length,g=v%3,y=[],h=16383,m=0,w=v-g;m<w;m+=h)y.push(p(f,m,m+h>w?w:m+h));return 1===g?y.push(t[(x=f[v-1])>>2]+t[x<<4&63]+"=="):2===g&&y.push(t[(x=(f[v-2]<<8)+f[v-1])>>10]+t[x>>4&63]+t[x<<2&63]+"="),y.join("")};for(var t=[],o=[],r=typeof Uint8Array<"u"?Uint8Array:Array,n="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=0;i<64;++i)t[i]=n[i],o[n.charCodeAt(i)]=i;function c(f){var x=f.length;if(x%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var v=f.indexOf("=");return-1===v&&(v=x),[v,v===x?0:4-v%4]}function p(f,x,v){for(var y,h=[],m=x;m<v;m+=3)h.push(t[(y=(f[m]<<16&16711680)+(f[m+1]<<8&65280)+(255&f[m+2]))>>18&63]+t[y>>12&63]+t[y>>6&63]+t[63&y]);return h.join("")}o["-".charCodeAt(0)]=62,o["_".charCodeAt(0)]=63},3187:function(d,s){s.read=function(t,o,r,n,i){var a,c,p=8*i-n-1,f=(1<<p)-1,x=f>>1,v=-7,g=r?i-1:0,y=r?-1:1,h=t[o+g];for(g+=y,a=h&(1<<-v)-1,h>>=-v,v+=p;v>0;a=256*a+t[o+g],g+=y,v-=8);for(c=a&(1<<-v)-1,a>>=-v,v+=n;v>0;c=256*c+t[o+g],g+=y,v-=8);if(0===a)a=1-x;else{if(a===f)return c?NaN:1/0*(h?-1:1);c+=Math.pow(2,n),a-=x}return(h?-1:1)*c*Math.pow(2,a-n)},s.write=function(t,o,r,n,i,a){var c,p,f,x=8*a-i-1,v=(1<<x)-1,g=v>>1,y=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,h=n?0:a-1,m=n?1:-1,w=o<0||0===o&&1/o<0?1:0;for(o=Math.abs(o),isNaN(o)||o===1/0?(p=isNaN(o)?1:0,c=v):(c=Math.floor(Math.log(o)/Math.LN2),o*(f=Math.pow(2,-c))<1&&(c--,f*=2),(o+=c+g>=1?y/f:y*Math.pow(2,1-g))*f>=2&&(c++,f/=2),c+g>=v?(p=0,c=v):c+g>=1?(p=(o*f-1)*Math.pow(2,i),c+=g):(p=o*Math.pow(2,g-1)*Math.pow(2,i),c=0));i>=8;t[r+h]=255&p,h+=m,p/=256,i-=8);for(c=c<<i|p,x+=i;x>0;t[r+h]=255&c,h+=m,c/=256,x-=8);t[r+h-m]|=128*w}},1152:function(d,s,t){"use strict";d.exports=function(c){var p=(c=c||{}).eye||[0,0,1],f=c.center||[0,0,0],x=c.up||[0,1,0],v=c.distanceLimits||[0,1/0],g=c.mode||"turntable",y=o(),h=r(),m=n();return y.setDistanceLimits(v[0],v[1]),y.lookAt(0,p,f,x),h.setDistanceLimits(v[0],v[1]),h.lookAt(0,p,f,x),m.setDistanceLimits(v[0],v[1]),m.lookAt(0,p,f,x),new i({turntable:y,orbit:h,matrix:m},g)};var o=t(3440),r=t(7774),n=t(9298);function i(c,p){this._controllerNames=Object.keys(c),this._controllerList=this._controllerNames.map(function(f){return c[f]}),this._mode=p,this._active=c[p],this._active||(this._mode="turntable",this._active=c.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 a=i.prototype;a.flush=function(c){for(var p=this._controllerList,f=0;f<p.length;++f)p[f].flush(c)},a.idle=function(c){for(var p=this._controllerList,f=0;f<p.length;++f)p[f].idle(c)},a.lookAt=function(c,p,f,x){for(var v=this._controllerList,g=0;g<v.length;++g)v[g].lookAt(c,p,f,x)},a.rotate=function(c,p,f,x){for(var v=this._controllerList,g=0;g<v.length;++g)v[g].rotate(c,p,f,x)},a.pan=function(c,p,f,x){for(var v=this._controllerList,g=0;g<v.length;++g)v[g].pan(c,p,f,x)},a.translate=function(c,p,f,x){for(var v=this._controllerList,g=0;g<v.length;++g)v[g].translate(c,p,f,x)},a.setMatrix=function(c,p){for(var f=this._controllerList,x=0;x<f.length;++x)f[x].setMatrix(c,p)},a.setDistanceLimits=function(c,p){for(var f=this._controllerList,x=0;x<f.length;++x)f[x].setDistanceLimits(c,p)},a.setDistance=function(c,p){for(var f=this._controllerList,x=0;x<f.length;++x)f[x].setDistance(c,p)},a.recalcMatrix=function(c){this._active.recalcMatrix(c)},a.getDistance=function(c){return this._active.getDistance(c)},a.getDistanceLimits=function(c){return this._active.getDistanceLimits(c)},a.lastT=function(){return this._active.lastT()},a.setMode=function(c){if(c!==this._mode){var p=this._controllerNames.indexOf(c);if(!(p<0)){var f=this._active,x=this._controllerList[p],v=Math.max(f.lastT(),x.lastT());f.recalcMatrix(v),x.setMatrix(v,f.computedMatrix),this._active=x,this._mode=c,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}}},a.getMode=function(){return this._mode}},8126:function(d,s,t){"use strict";var o=typeof WeakMap>"u"?t(5346):WeakMap,r=t(5827),n=t(2944),i=new o;d.exports=function(a){var c=i.get(a),p=c&&(c._triangleBuffer.handle||c._triangleBuffer.buffer);if(!p||!a.isBuffer(p)){var f=r(a,new Float32Array([-1,-1,-1,4,4,-1]));(c=n(a,[{buffer:f,type:a.FLOAT,size:2}]))._triangleBuffer=f,i.set(a,c)}c.bind(),a.drawArrays(a.TRIANGLES,0,3),c.unbind()}},8008:function(d,s,t){var o=t(4930);d.exports=function(r,n,i){n="number"==typeof n?n:1,i=i||": ";var a=r.split(/\r?\n/),c=String(a.length+n-1).length;return a.map(function(p,f){var x=f+n,v=String(x).length;return o(x,c-v)+i+p}).join("\n")}},2153:function(d,s,t){"use strict";d.exports=function(n){var i=n.length;if(0===i)return[];if(1===i)return[0];for(var a=n[0].length,c=[n[0]],p=[0],f=1;f<i;++f)if(c.push(n[f]),r(c,a)){if(p.push(f),p.length===a+1)return p}else c.pop();return p};var o=t(417);function r(n,i){for(var a=new Array(i+1),c=0;c<n.length;++c)a[c]=n[c];for(c=0;c<=n.length;++c){for(var p=n.length;p<=i;++p){for(var f=new Array(i),x=0;x<i;++x)f[x]=Math.pow(p+1-c,x);a[p]=f}if(o.apply(void 0,a))return!0}return!1}},4653:function(d,s,t){"use strict";d.exports=function(n,i){return o(i).filter(function(a){for(var c=new Array(a.length),p=0;p<a.length;++p)c[p]=i[a[p]];return r(c)*n<1})};var o=t(4419),r=t(1778)},2350:function(d,s,t){d.exports=function(n,i){return r(o(n,i))};var o=t(4653),r=t(8691)},7896:function(d){d.exports=function(s){return atob(s)}},957:function(d,s,t){"use strict";d.exports=function(n,i){for(var a=i.length,c=new Array(a+1),p=0;p<a;++p){for(var f=new Array(a+1),x=0;x<=a;++x)f[x]=n[x][p];c[p]=f}for(c[a]=new Array(a+1),p=0;p<=a;++p)c[a][p]=1;var v=new Array(a+1);for(p=0;p<a;++p)v[p]=i[p];v[a]=1;var g=o(c,v),y=r(g[a+1]);0===y&&(y=1);var h=new Array(a+1);for(p=0;p<=a;++p)h[p]=r(g[p])/y;return h};var o=t(6606);function r(n){for(var i=0,a=0;a<n.length;++a)i+=n[a];return i}},1539:function(d,s,t){"use strict";var o=t(8524);d.exports=function(r,n){return o(r[0].mul(n[1]).add(n[0].mul(r[1])),r[1].mul(n[1]))}},8846:function(d){"use strict";d.exports=function(s,t){return s[0].mul(t[1]).cmp(t[0].mul(s[1]))}},9189:function(d,s,t){"use strict";var o=t(8524);d.exports=function(r,n){return o(r[0].mul(n[1]),r[1].mul(n[0]))}},5125:function(d,s,t){"use strict";var o=t(234),r=t(3218),n=t(5514),i=t(2813),a=t(8524),c=t(9189);d.exports=function p(f,x){if(o(f))return x?c(f,p(x)):[f[0].clone(),f[1].clone()];var v,g,y=0;if(r(f))v=f.clone();else if("string"==typeof f)v=i(f);else{if(0===f)return[n(0),n(1)];if(f===Math.floor(f))v=n(f);else{for(;f!==Math.floor(f);)f*=Math.pow(2,256),y-=256;v=n(f)}}if(o(x))v.mul(x[1]),g=x[0].clone();else if(r(x))g=x.clone();else if("string"==typeof x)g=i(x);else if(x)if(x===Math.floor(x))g=n(x);else{for(;x!==Math.floor(x);)x*=Math.pow(2,256),y+=256;g=n(x)}else g=n(1);return y>0?v=v.ushln(y):y<0&&(g=g.ushln(-y)),a(v,g)}},234:function(d,s,t){"use strict";var o=t(3218);d.exports=function(r){return Array.isArray(r)&&2===r.length&&o(r[0])&&o(r[1])}},4275:function(d,s,t){"use strict";var o=t(1928);d.exports=function(r){return r.cmp(new o(0))}},9958:function(d,s,t){"use strict";var o=t(4275);d.exports=function(r){var n=r.length,i=r.words,a=0;if(1===n)a=i[0];else if(2===n)a=i[0]+67108864*i[1];else for(var c=0;c<n;c++)a+=i[c]*Math.pow(67108864,c);return o(r)*a}},1112:function(d,s,t){"use strict";var o=t(8362),r=t(2288).countTrailingZeros;d.exports=function(n){var i=r(o.lo(n));if(i<32)return i;var a=r(o.hi(n));return a>20?52:a+32}},3218:function(d,s,t){"use strict";t(1928),d.exports=function(o){return o&&"object"==typeof o&&!!o.words}},5514:function(d,s,t){"use strict";var o=t(1928),r=t(8362);d.exports=function(n){var i=r.exponent(n);return i<52?new o(n):new o(n*Math.pow(2,52-i)).ushln(i-52)}},8524:function(d,s,t){"use strict";var o=t(5514),r=t(4275);d.exports=function(n,i){var a=r(n),c=r(i);if(0===a)return[o(0),o(1)];if(0===c)return[o(0),o(0)];c<0&&(n=n.neg(),i=i.neg());var p=n.gcd(i);return p.cmpn(1)?[n.div(p),i.div(p)]:[n,i]}},2813:function(d,s,t){"use strict";var o=t(1928);d.exports=function(r){return new o(r)}},3962:function(d,s,t){"use strict";var o=t(8524);d.exports=function(r,n){return o(r[0].mul(n[0]),r[1].mul(n[1]))}},4951:function(d,s,t){"use strict";var o=t(4275);d.exports=function(r){return o(r[0])*o(r[1])}},4354:function(d,s,t){"use strict";var o=t(8524);d.exports=function(r,n){return o(r[0].mul(n[1]).sub(r[1].mul(n[0])),r[1].mul(n[1]))}},7999:function(d,s,t){"use strict";var o=t(9958),r=t(1112);d.exports=function(n){var i=n[0],a=n[1];if(0===i.cmpn(0))return 0;var c=i.abs().divmod(a.abs()),f=o(c.div),x=c.mod,v=i.negative!==a.negative?-1:1;if(0===x.cmpn(0))return v*f;if(f){var g=r(f)+4,y=o(x.ushln(g).divRound(a));return v*(f+y*Math.pow(2,-g))}var h=a.bitLength()-x.bitLength()+53;return y=o(x.ushln(h).divRound(a)),h<1023?v*y*Math.pow(2,-h):v*(y*=Math.pow(2,-1023))*Math.pow(2,1023-h)}},5070:function(d){"use strict";function s(a,c,p,f,x){for(var v=x+1;f<=x;){var g=f+x>>>1,y=a[g];(void 0!==p?p(y,c):y-c)>=0?(v=g,x=g-1):f=g+1}return v}function t(a,c,p,f,x){for(var v=x+1;f<=x;){var g=f+x>>>1,y=a[g];(void 0!==p?p(y,c):y-c)>0?(v=g,x=g-1):f=g+1}return v}function o(a,c,p,f,x){for(var v=f-1;f<=x;){var g=f+x>>>1,y=a[g];(void 0!==p?p(y,c):y-c)<0?(v=g,f=g+1):x=g-1}return v}function r(a,c,p,f,x){for(var v=f-1;f<=x;){var g=f+x>>>1,y=a[g];(void 0!==p?p(y,c):y-c)<=0?(v=g,f=g+1):x=g-1}return v}function n(a,c,p,f,x){for(;f<=x;){var v=f+x>>>1,g=a[v],y=void 0!==p?p(g,c):g-c;if(0===y)return v;y<=0?f=v+1:x=v-1}return-1}function i(a,c,p,f,x,v){return"function"==typeof p?v(a,c,p,void 0===f?0:0|f,void 0===x?a.length-1:0|x):v(a,c,void 0,void 0===p?0:0|p,void 0===f?a.length-1:0|f)}d.exports={ge:function(a,c,p,f,x){return i(a,c,p,f,x,s)},gt:function(a,c,p,f,x){return i(a,c,p,f,x,t)},lt:function(a,c,p,f,x){return i(a,c,p,f,x,o)},le:function(a,c,p,f,x){return i(a,c,p,f,x,r)},eq:function(a,c,p,f,x){return i(a,c,p,f,x,n)}}},2288:function(d,s){"use strict";function t(r){var n=32;return(r&=-r)&&n--,65535&r&&(n-=16),16711935&r&&(n-=8),252645135&r&&(n-=4),858993459&r&&(n-=2),1431655765&r&&(n-=1),n}s.INT_BITS=32,s.INT_MAX=2147483647,s.INT_MIN=-2147483648,s.sign=function(r){return(r>0)-(r<0)},s.abs=function(r){var n=r>>31;return(r^n)-n},s.min=function(r,n){return n^(r^n)&-(r<n)},s.max=function(r,n){return r^(r^n)&-(r<n)},s.isPow2=function(r){return!(r&r-1||!r)},s.log2=function(r){var n,i;return n=(r>65535)<<4,n|=i=((r>>>=n)>255)<<3,n|=i=((r>>>=i)>15)<<2,(n|=i=((r>>>=i)>3)<<1)|(r>>>=i)>>1},s.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},s.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},s.countTrailingZeros=t,s.nextPow2=function(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,1+((r|=r>>>8)|r>>>16)},s.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},s.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var o=new Array(256);(function(r){for(var n=0;n<256;++n){var i=n,a=n,c=7;for(i>>>=1;i;i>>>=1)a<<=1,a|=1&i,--c;r[n]=a<<c&255}})(o),s.reverse=function(r){return o[255&r]<<24|o[r>>>8&255]<<16|o[r>>>16&255]<<8|o[r>>>24&255]},s.interleave2=function(r,n){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n&=65535)|n<<8))|n<<4))|n<<2))|n<<1))<<1},s.deinterleave2=function(r,n){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>n&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},s.interleave3=function(r,n,i){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<1)|(i=1227133513&((i=3272356035&((i=251719695&((i=4278190335&((i&=1023)|i<<16))|i<<8))|i<<4))|i<<2))<<2},s.deinterleave3=function(r,n){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>n&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},s.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>t(r)+1}},1928:function(d,s,t){!function(o,r){"use strict";function n(z,H){if(!z)throw new Error(H||"Assertion failed")}function i(z,H){z.super_=H;var F=function(){};F.prototype=H.prototype,z.prototype=new F,z.prototype.constructor=z}function a(z,H,F){if(a.isBN(z))return z;this.negative=0,this.words=null,this.length=0,this.red=null,null!==z&&("le"!==H&&"be"!==H||(F=H,H=10),this._init(z||0,H||10,F||"be"))}var c;"object"==typeof o?o.exports=a:r.BN=a,a.BN=a,a.wordSize=26;try{c=typeof window<"u"&&void 0!==window.Buffer?window.Buffer:t(6601).Buffer}catch{}function p(z,H){var F=z.charCodeAt(H);return F>=65&&F<=70?F-55:F>=97&&F<=102?F-87:F-48&15}function f(z,H,F){var N=p(z,F);return F-1>=H&&(N|=p(z,F-1)<<4),N}function x(z,H,F,N){for(var B=0,j=Math.min(z.length,F),J=H;J<j;J++){var G=z.charCodeAt(J)-48;B*=N,B+=G>=49?G-49+10:G>=17?G-17+10:G}return B}a.isBN=function(z){return z instanceof a||null!==z&&"object"==typeof z&&z.constructor.wordSize===a.wordSize&&Array.isArray(z.words)},a.max=function(z,H){return z.cmp(H)>0?z:H},a.min=function(z,H){return z.cmp(H)<0?z:H},a.prototype._init=function(z,H,F){if("number"==typeof z)return this._initNumber(z,H,F);if("object"==typeof z)return this._initArray(z,H,F);"hex"===H&&(H=16),n(H===(0|H)&&H>=2&&H<=36);var N=0;"-"===(z=z.toString().replace(/\s+/g,""))[0]&&(N++,this.negative=1),N<z.length&&(16===H?this._parseHex(z,N,F):(this._parseBase(z,H,N),"le"===F&&this._initArray(this.toArray(),H,F)))},a.prototype._initNumber=function(z,H,F){z<0&&(this.negative=1,z=-z),z<67108864?(this.words=[67108863&z],this.length=1):z<4503599627370496?(this.words=[67108863&z,z/67108864&67108863],this.length=2):(n(z<9007199254740992),this.words=[67108863&z,z/67108864&67108863,1],this.length=3),"le"===F&&this._initArray(this.toArray(),H,F)},a.prototype._initArray=function(z,H,F){if(n("number"==typeof z.length),z.length<=0)return this.words=[0],this.length=1,this;this.length=Math.ceil(z.length/3),this.words=new Array(this.length);for(var N=0;N<this.length;N++)this.words[N]=0;var B,j,J=0;if("be"===F)for(N=z.length-1,B=0;N>=0;N-=3)this.words[B]|=(j=z[N]|z[N-1]<<8|z[N-2]<<16)<<J&67108863,this.words[B+1]=j>>>26-J&67108863,(J+=24)>=26&&(J-=26,B++);else if("le"===F)for(N=0,B=0;N<z.length;N+=3)this.words[B]|=(j=z[N]|z[N+1]<<8|z[N+2]<<16)<<J&67108863,this.words[B+1]=j>>>26-J&67108863,(J+=24)>=26&&(J-=26,B++);return this.strip()},a.prototype._parseHex=function(z,H,F){this.length=Math.ceil((z.length-H)/6),this.words=new Array(this.length);for(var N=0;N<this.length;N++)this.words[N]=0;var B,j=0,J=0;if("be"===F)for(N=z.length-1;N>=H;N-=2)B=f(z,H,N)<<j,this.words[J]|=67108863&B,j>=18?(j-=18,this.words[J+=1]|=B>>>26):j+=8;else for(N=(z.length-H)%2==0?H+1:H;N<z.length;N+=2)B=f(z,H,N)<<j,this.words[J]|=67108863&B,j>=18?(j-=18,this.words[J+=1]|=B>>>26):j+=8;this.strip()},a.prototype._parseBase=function(z,H,F){this.words=[0],this.length=1;for(var N=0,B=1;B<=67108863;B*=H)N++;N--,B=B/H|0;for(var j=z.length-F,J=j%N,G=Math.min(j,j-J)+F,V=0,W=F;W<G;W+=N)V=x(z,W,W+N,H),this.imuln(B),this.words[0]+V<67108864?this.words[0]+=V:this._iaddn(V);if(0!==J){var X=1;for(V=x(z,W,z.length,H),W=0;W<J;W++)X*=H;this.imuln(X),this.words[0]+V<67108864?this.words[0]+=V:this._iaddn(V)}this.strip()},a.prototype.copy=function(z){z.words=new Array(this.length);for(var H=0;H<this.length;H++)z.words[H]=this.words[H];z.length=this.length,z.negative=this.negative,z.red=this.red},a.prototype.clone=function(){var z=new a(null);return this.copy(z),z},a.prototype._expand=function(z){for(;this.length<z;)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 v=["","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"],g=[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],y=[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 h(z,H,F){F.negative=H.negative^z.negative;var N=z.length+H.length|0;F.length=N,N=N-1|0;var B=0|z.words[0],j=0|H.words[0],J=B*j,V=J/67108864|0;F.words[0]=67108863&J;for(var W=1;W<N;W++){for(var X=V>>>26,K=67108863&V,re=Math.min(W,H.length-1),ee=Math.max(0,W-z.length+1);ee<=re;ee++)X+=(J=(B=0|z.words[W-ee|0])*(j=0|H.words[ee])+K)/67108864|0,K=67108863&J;F.words[W]=0|K,V=0|X}return 0!==V?F.words[W]=0|V:F.length--,F.strip()}a.prototype.toString=function(z,H){var F;if(H=0|H||1,16===(z=z||10)||"hex"===z){F="";for(var N=0,B=0,j=0;j<this.length;j++){var J=this.words[j],G=(16777215&(J<<N|B)).toString(16);F=0!=(B=J>>>24-N&16777215)||j!==this.length-1?v[6-G.length]+G+F:G+F,(N+=2)>=26&&(N-=26,j--)}for(0!==B&&(F=B.toString(16)+F);F.length%H!=0;)F="0"+F;return 0!==this.negative&&(F="-"+F),F}if(z===(0|z)&&z>=2&&z<=36){var V=g[z],W=y[z];F="";var X=this.clone();for(X.negative=0;!X.isZero();){var K=X.modn(W).toString(z);F=(X=X.idivn(W)).isZero()?K+F:v[V-K.length]+K+F}for(this.isZero()&&(F="0"+F);F.length%H!=0;)F="0"+F;return 0!==this.negative&&(F="-"+F),F}n(!1,"Base should be between 2 and 36")},a.prototype.toNumber=function(){var z=this.words[0];return 2===this.length?z+=67108864*this.words[1]:3===this.length&&1===this.words[2]?z+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-z:z},a.prototype.toJSON=function(){return this.toString(16)},a.prototype.toBuffer=function(z,H){return n(void 0!==c),this.toArrayLike(c,z,H)},a.prototype.toArray=function(z,H){return this.toArrayLike(Array,z,H)},a.prototype.toArrayLike=function(z,H,F){var N=this.byteLength(),B=F||Math.max(1,N);n(N<=B,"byte array longer than desired length"),n(B>0,"Requested array length <= 0"),this.strip();var j,J,G="le"===H,V=new z(B),W=this.clone();if(G){for(J=0;!W.isZero();J++)j=W.andln(255),W.iushrn(8),V[J]=j;for(;J<B;J++)V[J]=0}else{for(J=0;J<B-N;J++)V[J]=0;for(J=0;!W.isZero();J++)j=W.andln(255),W.iushrn(8),V[B-J-1]=j}return V},a.prototype._countBits=Math.clz32?function(z){return 32-Math.clz32(z)}:function(z){var H=z,F=0;return H>=4096&&(F+=13,H>>>=13),H>=64&&(F+=7,H>>>=7),H>=8&&(F+=4,H>>>=4),H>=2&&(F+=2,H>>>=2),F+H},a.prototype._zeroBits=function(z){if(0===z)return 26;var H=z,F=0;return!(8191&H)&&(F+=13,H>>>=13),!(127&H)&&(F+=7,H>>>=7),!(15&H)&&(F+=4,H>>>=4),!(3&H)&&(F+=2,H>>>=2),!(1&H)&&F++,F},a.prototype.bitLength=function(){var H=this._countBits(this.words[this.length-1]);return 26*(this.length-1)+H},a.prototype.zeroBits=function(){if(this.isZero())return 0;for(var z=0,H=0;H<this.length;H++){var F=this._zeroBits(this.words[H]);if(z+=F,26!==F)break}return z},a.prototype.byteLength=function(){return Math.ceil(this.bitLength()/8)},a.prototype.toTwos=function(z){return 0!==this.negative?this.abs().inotn(z).iaddn(1):this.clone()},a.prototype.fromTwos=function(z){return this.testn(z-1)?this.notn(z).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(z){for(;this.length<z.length;)this.words[this.length++]=0;for(var H=0;H<z.length;H++)this.words[H]=this.words[H]|z.words[H];return this.strip()},a.prototype.ior=function(z){return n(0==(this.negative|z.negative)),this.iuor(z)},a.prototype.or=function(z){return this.length>z.length?this.clone().ior(z):z.clone().ior(this)},a.prototype.uor=function(z){return this.length>z.length?this.clone().iuor(z):z.clone().iuor(this)},a.prototype.iuand=function(z){var H;H=this.length>z.length?z:this;for(var F=0;F<H.length;F++)this.words[F]=this.words[F]&z.words[F];return this.length=H.length,this.strip()},a.prototype.iand=function(z){return n(0==(this.negative|z.negative)),this.iuand(z)},a.prototype.and=function(z){return this.length>z.length?this.clone().iand(z):z.clone().iand(this)},a.prototype.uand=function(z){return this.length>z.length?this.clone().iuand(z):z.clone().iuand(this)},a.prototype.iuxor=function(z){var H,F;this.length>z.length?(H=this,F=z):(H=z,F=this);for(var N=0;N<F.length;N++)this.words[N]=H.words[N]^F.words[N];if(this!==H)for(;N<H.length;N++)this.words[N]=H.words[N];return this.length=H.length,this.strip()},a.prototype.ixor=function(z){return n(0==(this.negative|z.negative)),this.iuxor(z)},a.prototype.xor=function(z){return this.length>z.length?this.clone().ixor(z):z.clone().ixor(this)},a.prototype.uxor=function(z){return this.length>z.length?this.clone().iuxor(z):z.clone().iuxor(this)},a.prototype.inotn=function(z){n("number"==typeof z&&z>=0);var H=0|Math.ceil(z/26),F=z%26;this._expand(H),F>0&&H--;for(var N=0;N<H;N++)this.words[N]=67108863&~this.words[N];return F>0&&(this.words[N]=~this.words[N]&67108863>>26-F),this.strip()},a.prototype.notn=function(z){return this.clone().inotn(z)},a.prototype.setn=function(z,H){n("number"==typeof z&&z>=0);var F=z/26|0,N=z%26;return this._expand(F+1),this.words[F]=H?this.words[F]|1<<N:this.words[F]&~(1<<N),this.strip()},a.prototype.iadd=function(z){var H,F,N;if(0!==this.negative&&0===z.negative)return this.negative=0,H=this.isub(z),this.negative^=1,this._normSign();if(0===this.negative&&0!==z.negative)return z.negative=0,H=this.isub(z),z.negative=1,H._normSign();this.length>z.length?(F=this,N=z):(F=z,N=this);for(var B=0,j=0;j<N.length;j++)this.words[j]=67108863&(H=(0|F.words[j])+(0|N.words[j])+B),B=H>>>26;for(;0!==B&&j<F.length;j++)this.words[j]=67108863&(H=(0|F.words[j])+B),B=H>>>26;if(this.length=F.length,0!==B)this.words[this.length]=B,this.length++;else if(F!==this)for(;j<F.length;j++)this.words[j]=F.words[j];return this},a.prototype.add=function(z){var H;return 0!==z.negative&&0===this.negative?(z.negative=0,H=this.sub(z),z.negative^=1,H):0===z.negative&&0!==this.negative?(this.negative=0,H=z.sub(this),this.negative=1,H):this.length>z.length?this.clone().iadd(z):z.clone().iadd(this)},a.prototype.isub=function(z){if(0!==z.negative){z.negative=0;var H=this.iadd(z);return z.negative=1,H._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(z),this.negative=1,this._normSign();var F,N,B=this.cmp(z);if(0===B)return this.negative=0,this.length=1,this.words[0]=0,this;B>0?(F=this,N=z):(F=z,N=this);for(var j=0,J=0;J<N.length;J++)j=(H=(0|F.words[J])-(0|N.words[J])+j)>>26,this.words[J]=67108863&H;for(;0!==j&&J<F.length;J++)j=(H=(0|F.words[J])+j)>>26,this.words[J]=67108863&H;if(0===j&&J<F.length&&F!==this)for(;J<F.length;J++)this.words[J]=F.words[J];return this.length=Math.max(this.length,J),F!==this&&(this.negative=1),this.strip()},a.prototype.sub=function(z){return this.clone().isub(z)};var m=function(z,H,F){var N,B,j,J=z.words,G=H.words,V=F.words,W=0,X=0|J[0],K=8191&X,re=X>>>13,ee=0|J[1],ie=8191&ee,oe=ee>>>13,ce=0|J[2],me=8191&ce,de=ce>>>13,he=0|J[3],ve=8191&he,Pe=he>>>13,xe=0|J[4],ke=8191&xe,Ae=xe>>>13,Te=0|J[5],Q=8191&Te,se=Te>>>13,fe=0|J[6],ye=8191&fe,Me=fe>>>13,Ie=0|J[7],Ce=8191&Ie,Re=Ie>>>13,le=0|J[8],ge=8191&le,_e=le>>>13,Fe=0|J[9],Ve=8191&Fe,He=Fe>>>13,nt=0|G[0],tt=8191&nt,ot=nt>>>13,dt=0|G[1],kt=8191&dt,mt=dt>>>13,wt=0|G[2],Lt=8191&wt,Ct=wt>>>13,It=0|G[3],Ut=8191&It,Rt=It>>>13,Ge=0|G[4],We=8191&Ge,Be=Ge>>>13,Ye=0|G[5],rt=8191&Ye,Se=Ye>>>13,ze=0|G[6],Ke=8191&ze,st=ze>>>13,ct=0|G[7],Tt=8191&ct,Et=ct>>>13,At=0|G[8],ht=8191&At,pt=At>>>13,gt=0|G[9],Pt=8191&gt,Ot=gt>>>13;F.negative=z.negative^H.negative,F.length=19;var Ht=(W+(N=Math.imul(K,tt))|0)+((8191&(B=(B=Math.imul(K,ot))+Math.imul(re,tt)|0))<<13)|0;W=((j=Math.imul(re,ot))+(B>>>13)|0)+(Ht>>>26)|0,Ht&=67108863,N=Math.imul(ie,tt),B=(B=Math.imul(ie,ot))+Math.imul(oe,tt)|0,j=Math.imul(oe,ot);var jt=(W+(N=N+Math.imul(K,kt)|0)|0)+((8191&(B=(B=B+Math.imul(K,mt)|0)+Math.imul(re,kt)|0))<<13)|0;W=((j=j+Math.imul(re,mt)|0)+(B>>>13)|0)+(jt>>>26)|0,jt&=67108863,N=Math.imul(me,tt),B=(B=Math.imul(me,ot))+Math.imul(de,tt)|0,j=Math.imul(de,ot),N=N+Math.imul(ie,kt)|0,B=(B=B+Math.imul(ie,mt)|0)+Math.imul(oe,kt)|0,j=j+Math.imul(oe,mt)|0;var Nt=(W+(N=N+Math.imul(K,Lt)|0)|0)+((8191&(B=(B=B+Math.imul(K,Ct)|0)+Math.imul(re,Lt)|0))<<13)|0;W=((j=j+Math.imul(re,Ct)|0)+(B>>>13)|0)+(Nt>>>26)|0,Nt&=67108863,N=Math.imul(ve,tt),B=(B=Math.imul(ve,ot))+Math.imul(Pe,tt)|0,j=Math.imul(Pe,ot),N=N+Math.imul(me,kt)|0,B=(B=B+Math.imul(me,mt)|0)+Math.imul(de,kt)|0,j=j+Math.imul(de,mt)|0,N=N+Math.imul(ie,Lt)|0,B=(B=B+Math.imul(ie,Ct)|0)+Math.imul(oe,Lt)|0,j=j+Math.imul(oe,Ct)|0;var Gt=(W+(N=N+Math.imul(K,Ut)|0)|0)+((8191&(B=(B=B+Math.imul(K,Rt)|0)+Math.imul(re,Ut)|0))<<13)|0;W=((j=j+Math.imul(re,Rt)|0)+(B>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,N=Math.imul(ke,tt),B=(B=Math.imul(ke,ot))+Math.imul(Ae,tt)|0,j=Math.imul(Ae,ot),N=N+Math.imul(ve,kt)|0,B=(B=B+Math.imul(ve,mt)|0)+Math.imul(Pe,kt)|0,j=j+Math.imul(Pe,mt)|0,N=N+Math.imul(me,Lt)|0,B=(B=B+Math.imul(me,Ct)|0)+Math.imul(de,Lt)|0,j=j+Math.imul(de,Ct)|0,N=N+Math.imul(ie,Ut)|0,B=(B=B+Math.imul(ie,Rt)|0)+Math.imul(oe,Ut)|0,j=j+Math.imul(oe,Rt)|0;var un=(W+(N=N+Math.imul(K,We)|0)|0)+((8191&(B=(B=B+Math.imul(K,Be)|0)+Math.imul(re,We)|0))<<13)|0;W=((j=j+Math.imul(re,Be)|0)+(B>>>13)|0)+(un>>>26)|0,un&=67108863,N=Math.imul(Q,tt),B=(B=Math.imul(Q,ot))+Math.imul(se,tt)|0,j=Math.imul(se,ot),N=N+Math.imul(ke,kt)|0,B=(B=B+Math.imul(ke,mt)|0)+Math.imul(Ae,kt)|0,j=j+Math.imul(Ae,mt)|0,N=N+Math.imul(ve,Lt)|0,B=(B=B+Math.imul(ve,Ct)|0)+Math.imul(Pe,Lt)|0,j=j+Math.imul(Pe,Ct)|0,N=N+Math.imul(me,Ut)|0,B=(B=B+Math.imul(me,Rt)|0)+Math.imul(de,Ut)|0,j=j+Math.imul(de,Rt)|0,N=N+Math.imul(ie,We)|0,B=(B=B+Math.imul(ie,Be)|0)+Math.imul(oe,We)|0,j=j+Math.imul(oe,Be)|0;var pn=(W+(N=N+Math.imul(K,rt)|0)|0)+((8191&(B=(B=B+Math.imul(K,Se)|0)+Math.imul(re,rt)|0))<<13)|0;W=((j=j+Math.imul(re,Se)|0)+(B>>>13)|0)+(pn>>>26)|0,pn&=67108863,N=Math.imul(ye,tt),B=(B=Math.imul(ye,ot))+Math.imul(Me,tt)|0,j=Math.imul(Me,ot),N=N+Math.imul(Q,kt)|0,B=(B=B+Math.imul(Q,mt)|0)+Math.imul(se,kt)|0,j=j+Math.imul(se,mt)|0,N=N+Math.imul(ke,Lt)|0,B=(B=B+Math.imul(ke,Ct)|0)+Math.imul(Ae,Lt)|0,j=j+Math.imul(Ae,Ct)|0,N=N+Math.imul(ve,Ut)|0,B=(B=B+Math.imul(ve,Rt)|0)+Math.imul(Pe,Ut)|0,j=j+Math.imul(Pe,Rt)|0,N=N+Math.imul(me,We)|0,B=(B=B+Math.imul(me,Be)|0)+Math.imul(de,We)|0,j=j+Math.imul(de,Be)|0,N=N+Math.imul(ie,rt)|0,B=(B=B+Math.imul(ie,Se)|0)+Math.imul(oe,rt)|0,j=j+Math.imul(oe,Se)|0;var Kt=(W+(N=N+Math.imul(K,Ke)|0)|0)+((8191&(B=(B=B+Math.imul(K,st)|0)+Math.imul(re,Ke)|0))<<13)|0;W=((j=j+Math.imul(re,st)|0)+(B>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,N=Math.imul(Ce,tt),B=(B=Math.imul(Ce,ot))+Math.imul(Re,tt)|0,j=Math.imul(Re,ot),N=N+Math.imul(ye,kt)|0,B=(B=B+Math.imul(ye,mt)|0)+Math.imul(Me,kt)|0,j=j+Math.imul(Me,mt)|0,N=N+Math.imul(Q,Lt)|0,B=(B=B+Math.imul(Q,Ct)|0)+Math.imul(se,Lt)|0,j=j+Math.imul(se,Ct)|0,N=N+Math.imul(ke,Ut)|0,B=(B=B+Math.imul(ke,Rt)|0)+Math.imul(Ae,Ut)|0,j=j+Math.imul(Ae,Rt)|0,N=N+Math.imul(ve,We)|0,B=(B=B+Math.imul(ve,Be)|0)+Math.imul(Pe,We)|0,j=j+Math.imul(Pe,Be)|0,N=N+Math.imul(me,rt)|0,B=(B=B+Math.imul(me,Se)|0)+Math.imul(de,rt)|0,j=j+Math.imul(de,Se)|0,N=N+Math.imul(ie,Ke)|0,B=(B=B+Math.imul(ie,st)|0)+Math.imul(oe,Ke)|0,j=j+Math.imul(oe,st)|0;var wn=(W+(N=N+Math.imul(K,Tt)|0)|0)+((8191&(B=(B=B+Math.imul(K,Et)|0)+Math.imul(re,Tt)|0))<<13)|0;W=((j=j+Math.imul(re,Et)|0)+(B>>>13)|0)+(wn>>>26)|0,wn&=67108863,N=Math.imul(ge,tt),B=(B=Math.imul(ge,ot))+Math.imul(_e,tt)|0,j=Math.imul(_e,ot),N=N+Math.imul(Ce,kt)|0,B=(B=B+Math.imul(Ce,mt)|0)+Math.imul(Re,kt)|0,j=j+Math.imul(Re,mt)|0,N=N+Math.imul(ye,Lt)|0,B=(B=B+Math.imul(ye,Ct)|0)+Math.imul(Me,Lt)|0,j=j+Math.imul(Me,Ct)|0,N=N+Math.imul(Q,Ut)|0,B=(B=B+Math.imul(Q,Rt)|0)+Math.imul(se,Ut)|0,j=j+Math.imul(se,Rt)|0,N=N+Math.imul(ke,We)|0,B=(B=B+Math.imul(ke,Be)|0)+Math.imul(Ae,We)|0,j=j+Math.imul(Ae,Be)|0,N=N+Math.imul(ve,rt)|0,B=(B=B+Math.imul(ve,Se)|0)+Math.imul(Pe,rt)|0,j=j+Math.imul(Pe,Se)|0,N=N+Math.imul(me,Ke)|0,B=(B=B+Math.imul(me,st)|0)+Math.imul(de,Ke)|0,j=j+Math.imul(de,st)|0,N=N+Math.imul(ie,Tt)|0,B=(B=B+Math.imul(ie,Et)|0)+Math.imul(oe,Tt)|0,j=j+Math.imul(oe,Et)|0;var Bn=(W+(N=N+Math.imul(K,ht)|0)|0)+((8191&(B=(B=B+Math.imul(K,pt)|0)+Math.imul(re,ht)|0))<<13)|0;W=((j=j+Math.imul(re,pt)|0)+(B>>>13)|0)+(Bn>>>26)|0,Bn&=67108863,N=Math.imul(Ve,tt),B=(B=Math.imul(Ve,ot))+Math.imul(He,tt)|0,j=Math.imul(He,ot),N=N+Math.imul(ge,kt)|0,B=(B=B+Math.imul(ge,mt)|0)+Math.imul(_e,kt)|0,j=j+Math.imul(_e,mt)|0,N=N+Math.imul(Ce,Lt)|0,B=(B=B+Math.imul(Ce,Ct)|0)+Math.imul(Re,Lt)|0,j=j+Math.imul(Re,Ct)|0,N=N+Math.imul(ye,Ut)|0,B=(B=B+Math.imul(ye,Rt)|0)+Math.imul(Me,Ut)|0,j=j+Math.imul(Me,Rt)|0,N=N+Math.imul(Q,We)|0,B=(B=B+Math.imul(Q,Be)|0)+Math.imul(se,We)|0,j=j+Math.imul(se,Be)|0,N=N+Math.imul(ke,rt)|0,B=(B=B+Math.imul(ke,Se)|0)+Math.imul(Ae,rt)|0,j=j+Math.imul(Ae,Se)|0,N=N+Math.imul(ve,Ke)|0,B=(B=B+Math.imul(ve,st)|0)+Math.imul(Pe,Ke)|0,j=j+Math.imul(Pe,st)|0,N=N+Math.imul(me,Tt)|0,B=(B=B+Math.imul(me,Et)|0)+Math.imul(de,Tt)|0,j=j+Math.imul(de,Et)|0,N=N+Math.imul(ie,ht)|0,B=(B=B+Math.imul(ie,pt)|0)+Math.imul(oe,ht)|0,j=j+Math.imul(oe,pt)|0;var vn=(W+(N=N+Math.imul(K,Pt)|0)|0)+((8191&(B=(B=B+Math.imul(K,Ot)|0)+Math.imul(re,Pt)|0))<<13)|0;W=((j=j+Math.imul(re,Ot)|0)+(B>>>13)|0)+(vn>>>26)|0,vn&=67108863,N=Math.imul(Ve,kt),B=(B=Math.imul(Ve,mt))+Math.imul(He,kt)|0,j=Math.imul(He,mt),N=N+Math.imul(ge,Lt)|0,B=(B=B+Math.imul(ge,Ct)|0)+Math.imul(_e,Lt)|0,j=j+Math.imul(_e,Ct)|0,N=N+Math.imul(Ce,Ut)|0,B=(B=B+Math.imul(Ce,Rt)|0)+Math.imul(Re,Ut)|0,j=j+Math.imul(Re,Rt)|0,N=N+Math.imul(ye,We)|0,B=(B=B+Math.imul(ye,Be)|0)+Math.imul(Me,We)|0,j=j+Math.imul(Me,Be)|0,N=N+Math.imul(Q,rt)|0,B=(B=B+Math.imul(Q,Se)|0)+Math.imul(se,rt)|0,j=j+Math.imul(se,Se)|0,N=N+Math.imul(ke,Ke)|0,B=(B=B+Math.imul(ke,st)|0)+Math.imul(Ae,Ke)|0,j=j+Math.imul(Ae,st)|0,N=N+Math.imul(ve,Tt)|0,B=(B=B+Math.imul(ve,Et)|0)+Math.imul(Pe,Tt)|0,j=j+Math.imul(Pe,Et)|0,N=N+Math.imul(me,ht)|0,B=(B=B+Math.imul(me,pt)|0)+Math.imul(de,ht)|0,j=j+Math.imul(de,pt)|0;var cn=(W+(N=N+Math.imul(ie,Pt)|0)|0)+((8191&(B=(B=B+Math.imul(ie,Ot)|0)+Math.imul(oe,Pt)|0))<<13)|0;W=((j=j+Math.imul(oe,Ot)|0)+(B>>>13)|0)+(cn>>>26)|0,cn&=67108863,N=Math.imul(Ve,Lt),B=(B=Math.imul(Ve,Ct))+Math.imul(He,Lt)|0,j=Math.imul(He,Ct),N=N+Math.imul(ge,Ut)|0,B=(B=B+Math.imul(ge,Rt)|0)+Math.imul(_e,Ut)|0,j=j+Math.imul(_e,Rt)|0,N=N+Math.imul(Ce,We)|0,B=(B=B+Math.imul(Ce,Be)|0)+Math.imul(Re,We)|0,j=j+Math.imul(Re,Be)|0,N=N+Math.imul(ye,rt)|0,B=(B=B+Math.imul(ye,Se)|0)+Math.imul(Me,rt)|0,j=j+Math.imul(Me,Se)|0,N=N+Math.imul(Q,Ke)|0,B=(B=B+Math.imul(Q,st)|0)+Math.imul(se,Ke)|0,j=j+Math.imul(se,st)|0,N=N+Math.imul(ke,Tt)|0,B=(B=B+Math.imul(ke,Et)|0)+Math.imul(Ae,Tt)|0,j=j+Math.imul(Ae,Et)|0,N=N+Math.imul(ve,ht)|0,B=(B=B+Math.imul(ve,pt)|0)+Math.imul(Pe,ht)|0,j=j+Math.imul(Pe,pt)|0;var dn=(W+(N=N+Math.imul(me,Pt)|0)|0)+((8191&(B=(B=B+Math.imul(me,Ot)|0)+Math.imul(de,Pt)|0))<<13)|0;W=((j=j+Math.imul(de,Ot)|0)+(B>>>13)|0)+(dn>>>26)|0,dn&=67108863,N=Math.imul(Ve,Ut),B=(B=Math.imul(Ve,Rt))+Math.imul(He,Ut)|0,j=Math.imul(He,Rt),N=N+Math.imul(ge,We)|0,B=(B=B+Math.imul(ge,Be)|0)+Math.imul(_e,We)|0,j=j+Math.imul(_e,Be)|0,N=N+Math.imul(Ce,rt)|0,B=(B=B+Math.imul(Ce,Se)|0)+Math.imul(Re,rt)|0,j=j+Math.imul(Re,Se)|0,N=N+Math.imul(ye,Ke)|0,B=(B=B+Math.imul(ye,st)|0)+Math.imul(Me,Ke)|0,j=j+Math.imul(Me,st)|0,N=N+Math.imul(Q,Tt)|0,B=(B=B+Math.imul(Q,Et)|0)+Math.imul(se,Tt)|0,j=j+Math.imul(se,Et)|0,N=N+Math.imul(ke,ht)|0,B=(B=B+Math.imul(ke,pt)|0)+Math.imul(Ae,ht)|0,j=j+Math.imul(Ae,pt)|0;var sn=(W+(N=N+Math.imul(ve,Pt)|0)|0)+((8191&(B=(B=B+Math.imul(ve,Ot)|0)+Math.imul(Pe,Pt)|0))<<13)|0;W=((j=j+Math.imul(Pe,Ot)|0)+(B>>>13)|0)+(sn>>>26)|0,sn&=67108863,N=Math.imul(Ve,We),B=(B=Math.imul(Ve,Be))+Math.imul(He,We)|0,j=Math.imul(He,Be),N=N+Math.imul(ge,rt)|0,B=(B=B+Math.imul(ge,Se)|0)+Math.imul(_e,rt)|0,j=j+Math.imul(_e,Se)|0,N=N+Math.imul(Ce,Ke)|0,B=(B=B+Math.imul(Ce,st)|0)+Math.imul(Re,Ke)|0,j=j+Math.imul(Re,st)|0,N=N+Math.imul(ye,Tt)|0,B=(B=B+Math.imul(ye,Et)|0)+Math.imul(Me,Tt)|0,j=j+Math.imul(Me,Et)|0,N=N+Math.imul(Q,ht)|0,B=(B=B+Math.imul(Q,pt)|0)+Math.imul(se,ht)|0,j=j+Math.imul(se,pt)|0;var hn=(W+(N=N+Math.imul(ke,Pt)|0)|0)+((8191&(B=(B=B+Math.imul(ke,Ot)|0)+Math.imul(Ae,Pt)|0))<<13)|0;W=((j=j+Math.imul(Ae,Ot)|0)+(B>>>13)|0)+(hn>>>26)|0,hn&=67108863,N=Math.imul(Ve,rt),B=(B=Math.imul(Ve,Se))+Math.imul(He,rt)|0,j=Math.imul(He,Se),N=N+Math.imul(ge,Ke)|0,B=(B=B+Math.imul(ge,st)|0)+Math.imul(_e,Ke)|0,j=j+Math.imul(_e,st)|0,N=N+Math.imul(Ce,Tt)|0,B=(B=B+Math.imul(Ce,Et)|0)+Math.imul(Re,Tt)|0,j=j+Math.imul(Re,Et)|0,N=N+Math.imul(ye,ht)|0,B=(B=B+Math.imul(ye,pt)|0)+Math.imul(Me,ht)|0,j=j+Math.imul(Me,pt)|0;var En=(W+(N=N+Math.imul(Q,Pt)|0)|0)+((8191&(B=(B=B+Math.imul(Q,Ot)|0)+Math.imul(se,Pt)|0))<<13)|0;W=((j=j+Math.imul(se,Ot)|0)+(B>>>13)|0)+(En>>>26)|0,En&=67108863,N=Math.imul(Ve,Ke),B=(B=Math.imul(Ve,st))+Math.imul(He,Ke)|0,j=Math.imul(He,st),N=N+Math.imul(ge,Tt)|0,B=(B=B+Math.imul(ge,Et)|0)+Math.imul(_e,Tt)|0,j=j+Math.imul(_e,Et)|0,N=N+Math.imul(Ce,ht)|0,B=(B=B+Math.imul(Ce,pt)|0)+Math.imul(Re,ht)|0,j=j+Math.imul(Re,pt)|0;var Mn=(W+(N=N+Math.imul(ye,Pt)|0)|0)+((8191&(B=(B=B+Math.imul(ye,Ot)|0)+Math.imul(Me,Pt)|0))<<13)|0;W=((j=j+Math.imul(Me,Ot)|0)+(B>>>13)|0)+(Mn>>>26)|0,Mn&=67108863,N=Math.imul(Ve,Tt),B=(B=Math.imul(Ve,Et))+Math.imul(He,Tt)|0,j=Math.imul(He,Et),N=N+Math.imul(ge,ht)|0,B=(B=B+Math.imul(ge,pt)|0)+Math.imul(_e,ht)|0,j=j+Math.imul(_e,pt)|0;var Rn=(W+(N=N+Math.imul(Ce,Pt)|0)|0)+((8191&(B=(B=B+Math.imul(Ce,Ot)|0)+Math.imul(Re,Pt)|0))<<13)|0;W=((j=j+Math.imul(Re,Ot)|0)+(B>>>13)|0)+(Rn>>>26)|0,Rn&=67108863,N=Math.imul(Ve,ht),B=(B=Math.imul(Ve,pt))+Math.imul(He,ht)|0,j=Math.imul(He,pt);var Nn=(W+(N=N+Math.imul(ge,Pt)|0)|0)+((8191&(B=(B=B+Math.imul(ge,Ot)|0)+Math.imul(_e,Pt)|0))<<13)|0;W=((j=j+Math.imul(_e,Ot)|0)+(B>>>13)|0)+(Nn>>>26)|0,Nn&=67108863;var Fn=(W+(N=Math.imul(Ve,Pt))|0)+((8191&(B=(B=Math.imul(Ve,Ot))+Math.imul(He,Pt)|0))<<13)|0;return W=((j=Math.imul(He,Ot))+(B>>>13)|0)+(Fn>>>26)|0,Fn&=67108863,V[0]=Ht,V[1]=jt,V[2]=Nt,V[3]=Gt,V[4]=un,V[5]=pn,V[6]=Kt,V[7]=wn,V[8]=Bn,V[9]=vn,V[10]=cn,V[11]=dn,V[12]=sn,V[13]=hn,V[14]=En,V[15]=Mn,V[16]=Rn,V[17]=Nn,V[18]=Fn,0!==W&&(V[19]=W,F.length++),F};function w(z,H,F){return(new u).mulp(z,H,F)}function u(z,H){this.x=z,this.y=H}Math.imul||(m=h),a.prototype.mulTo=function(z,H){var N=this.length+z.length;return 10===this.length&&10===z.length?m(this,z,H):N<63?h(this,z,H):N<1024?function(B,j,J){J.negative=j.negative^B.negative,J.length=B.length+j.length;for(var G=0,V=0,W=0;W<J.length-1;W++){var X=V;V=0;for(var K=67108863&G,re=Math.min(W,j.length-1),ee=Math.max(0,W-B.length+1);ee<=re;ee++){var oe=(0|B.words[W-ee])*(0|j.words[ee]),ce=67108863&oe;K=67108863&(ce=ce+K|0),V+=(X=(X=X+(oe/67108864|0)|0)+(ce>>>26)|0)>>>26,X&=67108863}J.words[W]=K,G=X,X=V}return 0!==G?J.words[W]=G:J.length--,J.strip()}(this,z,H):w(this,z,H)},u.prototype.makeRBT=function(z){for(var H=new Array(z),F=a.prototype._countBits(z)-1,N=0;N<z;N++)H[N]=this.revBin(N,F,z);return H},u.prototype.revBin=function(z,H,F){if(0===z||z===F-1)return z;for(var N=0,B=0;B<H;B++)N|=(1&z)<<H-B-1,z>>=1;return N},u.prototype.permute=function(z,H,F,N,B,j){for(var J=0;J<j;J++)N[J]=H[z[J]],B[J]=F[z[J]]},u.prototype.transform=function(z,H,F,N,B,j){this.permute(j,z,H,F,N,B);for(var J=1;J<B;J<<=1)for(var G=J<<1,V=Math.cos(2*Math.PI/G),W=Math.sin(2*Math.PI/G),X=0;X<B;X+=G)for(var K=V,re=W,ee=0;ee<J;ee++){var ie=F[X+ee],oe=N[X+ee],ce=F[X+ee+J],me=N[X+ee+J],de=K*ce-re*me;me=K*me+re*ce,F[X+ee]=ie+(ce=de),N[X+ee]=oe+me,F[X+ee+J]=ie-ce,N[X+ee+J]=oe-me,ee!==G&&(de=V*K-W*re,re=V*re+W*K,K=de)}},u.prototype.guessLen13b=function(z,H){var F=1|Math.max(H,z),N=1&F,B=0;for(F=F/2|0;F;F>>>=1)B++;return 1<<B+1+N},u.prototype.conjugate=function(z,H,F){if(!(F<=1))for(var N=0;N<F/2;N++){var B=z[N];z[N]=z[F-N-1],z[F-N-1]=B,B=H[N],H[N]=-H[F-N-1],H[F-N-1]=-B}},u.prototype.normalize13b=function(z,H){for(var F=0,N=0;N<H/2;N++){var B=8192*Math.round(z[2*N+1]/H)+Math.round(z[2*N]/H)+F;z[N]=67108863&B,F=B<67108864?0:B/67108864|0}return z},u.prototype.convert13b=function(z,H,F,N){for(var B=0,j=0;j<H;j++)F[2*j]=8191&(B+=0|z[j]),F[2*j+1]=8191&(B>>>=13),B>>>=13;for(j=2*H;j<N;++j)F[j]=0;n(0===B),n(0==(-8192&B))},u.prototype.stub=function(z){for(var H=new Array(z),F=0;F<z;F++)H[F]=0;return H},u.prototype.mulp=function(z,H,F){var N=2*this.guessLen13b(z.length,H.length),B=this.makeRBT(N),j=this.stub(N),J=new Array(N),G=new Array(N),V=new Array(N),W=new Array(N),X=new Array(N),K=new Array(N),re=F.words;re.length=N,this.convert13b(z.words,z.length,J,N),this.convert13b(H.words,H.length,W,N),this.transform(J,j,G,V,N,B),this.transform(W,j,X,K,N,B);for(var ee=0;ee<N;ee++){var ie=G[ee]*X[ee]-V[ee]*K[ee];V[ee]=G[ee]*K[ee]+V[ee]*X[ee],G[ee]=ie}return this.conjugate(G,V,N),this.transform(G,V,re,j,N,B),this.conjugate(re,j,N),this.normalize13b(re,N),F.negative=z.negative^H.negative,F.length=z.length+H.length,F.strip()},a.prototype.mul=function(z){var H=new a(null);return H.words=new Array(this.length+z.length),this.mulTo(z,H)},a.prototype.mulf=function(z){var H=new a(null);return H.words=new Array(this.length+z.length),w(this,z,H)},a.prototype.imul=function(z){return this.clone().mulTo(z,this)},a.prototype.imuln=function(z){n("number"==typeof z),n(z<67108864);for(var H=0,F=0;F<this.length;F++){var N=(0|this.words[F])*z,B=(67108863&N)+(67108863&H);H>>=26,H+=N/67108864|0,H+=B>>>26,this.words[F]=67108863&B}return 0!==H&&(this.words[F]=H,this.length++),this},a.prototype.muln=function(z){return this.clone().imuln(z)},a.prototype.sqr=function(){return this.mul(this)},a.prototype.isqr=function(){return this.imul(this.clone())},a.prototype.pow=function(z){var H=function(j){for(var J=new Array(j.bitLength()),G=0;G<J.length;G++){var W=G%26;J[G]=(j.words[G/26|0]&1<<W)>>>W}return J}(z);if(0===H.length)return new a(1);for(var F=this,N=0;N<H.length&&0===H[N];N++,F=F.sqr());if(++N<H.length)for(var B=F.sqr();N<H.length;N++,B=B.sqr())0!==H[N]&&(F=F.mul(B));return F},a.prototype.iushln=function(z){n("number"==typeof z&&z>=0);var H,F=z%26,N=(z-F)/26,B=67108863>>>26-F<<26-F;if(0!==F){var j=0;for(H=0;H<this.length;H++){var J=this.words[H]&B;this.words[H]=(0|this.words[H])-J<<F|j,j=J>>>26-F}j&&(this.words[H]=j,this.length++)}if(0!==N){for(H=this.length-1;H>=0;H--)this.words[H+N]=this.words[H];for(H=0;H<N;H++)this.words[H]=0;this.length+=N}return this.strip()},a.prototype.ishln=function(z){return n(0===this.negative),this.iushln(z)},a.prototype.iushrn=function(z,H,F){var N;n("number"==typeof z&&z>=0),N=H?(H-H%26)/26:0;var B=z%26,j=Math.min((z-B)/26,this.length),J=67108863^67108863>>>B<<B,G=F;if(N-=j,N=Math.max(0,N),G){for(var V=0;V<j;V++)G.words[V]=this.words[V];G.length=j}if(0!==j)if(this.length>j)for(this.length-=j,V=0;V<this.length;V++)this.words[V]=this.words[V+j];else this.words[0]=0,this.length=1;var W=0;for(V=this.length-1;V>=0&&(0!==W||V>=N);V--){var X=0|this.words[V];this.words[V]=W<<26-B|X>>>B,W=X&J}return G&&0!==W&&(G.words[G.length++]=W),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},a.prototype.ishrn=function(z,H,F){return n(0===this.negative),this.iushrn(z,H,F)},a.prototype.shln=function(z){return this.clone().ishln(z)},a.prototype.ushln=function(z){return this.clone().iushln(z)},a.prototype.shrn=function(z){return this.clone().ishrn(z)},a.prototype.ushrn=function(z){return this.clone().iushrn(z)},a.prototype.testn=function(z){n("number"==typeof z&&z>=0);var H=z%26,F=(z-H)/26;return!(this.length<=F||!(this.words[F]&1<<H))},a.prototype.imaskn=function(z){n("number"==typeof z&&z>=0);var H=z%26,F=(z-H)/26;return n(0===this.negative,"imaskn works only with positive numbers"),this.length<=F?this:(0!==H&&F++,this.length=Math.min(F,this.length),0!==H&&(this.words[this.length-1]&=67108863^67108863>>>H<<H),this.strip())},a.prototype.maskn=function(z){return this.clone().imaskn(z)},a.prototype.iaddn=function(z){return n("number"==typeof z),n(z<67108864),z<0?this.isubn(-z):0!==this.negative?1===this.length&&(0|this.words[0])<z?(this.words[0]=z-(0|this.words[0]),this.negative=0,this):(this.negative=0,this.isubn(z),this.negative=1,this):this._iaddn(z)},a.prototype._iaddn=function(z){this.words[0]+=z;for(var H=0;H<this.length&&this.words[H]>=67108864;H++)this.words[H]-=67108864,H===this.length-1?this.words[H+1]=1:this.words[H+1]++;return this.length=Math.max(this.length,H+1),this},a.prototype.isubn=function(z){if(n("number"==typeof z),n(z<67108864),z<0)return this.iaddn(-z);if(0!==this.negative)return this.negative=0,this.iaddn(z),this.negative=1,this;if(this.words[0]-=z,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var H=0;H<this.length&&this.words[H]<0;H++)this.words[H]+=67108864,this.words[H+1]-=1;return this.strip()},a.prototype.addn=function(z){return this.clone().iaddn(z)},a.prototype.subn=function(z){return this.clone().isubn(z)},a.prototype.iabs=function(){return this.negative=0,this},a.prototype.abs=function(){return this.clone().iabs()},a.prototype._ishlnsubmul=function(z,H,F){var N,B;this._expand(z.length+F);var J=0;for(N=0;N<z.length;N++){B=(0|this.words[N+F])+J;var G=(0|z.words[N])*H;J=((B-=67108863&G)>>26)-(G/67108864|0),this.words[N+F]=67108863&B}for(;N<this.length-F;N++)J=(B=(0|this.words[N+F])+J)>>26,this.words[N+F]=67108863&B;if(0===J)return this.strip();for(n(-1===J),J=0,N=0;N<this.length;N++)J=(B=-(0|this.words[N])+J)>>26,this.words[N]=67108863&B;return this.negative=1,this.strip()},a.prototype._wordDiv=function(z,H){var F,N=this.clone(),B=z,j=0|B.words[B.length-1];0!=(F=26-this._countBits(j))&&(B=B.ushln(F),N.iushln(F),j=0|B.words[B.length-1]);var J,G=N.length-B.length;if("mod"!==H){(J=new a(null)).length=G+1,J.words=new Array(J.length);for(var V=0;V<J.length;V++)J.words[V]=0}var W=N.clone()._ishlnsubmul(B,1,G);0===W.negative&&(N=W,J&&(J.words[G]=1));for(var X=G-1;X>=0;X--){var K=67108864*(0|N.words[B.length+X])+(0|N.words[B.length+X-1]);for(K=Math.min(K/j|0,67108863),N._ishlnsubmul(B,K,X);0!==N.negative;)K--,N.negative=0,N._ishlnsubmul(B,1,X),N.isZero()||(N.negative^=1);J&&(J.words[X]=K)}return J&&J.strip(),N.strip(),"div"!==H&&0!==F&&N.iushrn(F),{div:J||null,mod:N}},a.prototype.divmod=function(z,H,F){return n(!z.isZero()),this.isZero()?{div:new a(0),mod:new a(0)}:0!==this.negative&&0===z.negative?(j=this.neg().divmod(z,H),"mod"!==H&&(N=j.div.neg()),"div"!==H&&(B=j.mod.neg(),F&&0!==B.negative&&B.iadd(z)),{div:N,mod:B}):0===this.negative&&0!==z.negative?(j=this.divmod(z.neg(),H),"mod"!==H&&(N=j.div.neg()),{div:N,mod:j.mod}):this.negative&z.negative?(j=this.neg().divmod(z.neg(),H),"div"!==H&&(B=j.mod.neg(),F&&0!==B.negative&&B.isub(z)),{div:j.div,mod:B}):z.length>this.length||this.cmp(z)<0?{div:new a(0),mod:this}:1===z.length?"div"===H?{div:this.divn(z.words[0]),mod:null}:"mod"===H?{div:null,mod:new a(this.modn(z.words[0]))}:{div:this.divn(z.words[0]),mod:new a(this.modn(z.words[0]))}:this._wordDiv(z,H);var N,B,j},a.prototype.div=function(z){return this.divmod(z,"div",!1).div},a.prototype.mod=function(z){return this.divmod(z,"mod",!1).mod},a.prototype.umod=function(z){return this.divmod(z,"mod",!0).mod},a.prototype.divRound=function(z){var H=this.divmod(z);if(H.mod.isZero())return H.div;var F=0!==H.div.negative?H.mod.isub(z):H.mod,N=z.ushrn(1),B=z.andln(1),j=F.cmp(N);return j<0||1===B&&0===j?H.div:0!==H.div.negative?H.div.isubn(1):H.div.iaddn(1)},a.prototype.modn=function(z){n(z<=67108863);for(var H=67108864%z,F=0,N=this.length-1;N>=0;N--)F=(H*F+(0|this.words[N]))%z;return F},a.prototype.idivn=function(z){n(z<=67108863);for(var H=0,F=this.length-1;F>=0;F--){var N=(0|this.words[F])+67108864*H;this.words[F]=N/z|0,H=N%z}return this.strip()},a.prototype.divn=function(z){return this.clone().idivn(z)},a.prototype.egcd=function(z){n(0===z.negative),n(!z.isZero());var H=this,F=z.clone();H=0!==H.negative?H.umod(z):H.clone();for(var N=new a(1),B=new a(0),j=new a(0),J=new a(1),G=0;H.isEven()&&F.isEven();)H.iushrn(1),F.iushrn(1),++G;for(var V=F.clone(),W=H.clone();!H.isZero();){for(var X=0,K=1;!(H.words[0]&K)&&X<26;++X,K<<=1);if(X>0)for(H.iushrn(X);X-- >0;)(N.isOdd()||B.isOdd())&&(N.iadd(V),B.isub(W)),N.iushrn(1),B.iushrn(1);for(var re=0,ee=1;!(F.words[0]&ee)&&re<26;++re,ee<<=1);if(re>0)for(F.iushrn(re);re-- >0;)(j.isOdd()||J.isOdd())&&(j.iadd(V),J.isub(W)),j.iushrn(1),J.iushrn(1);H.cmp(F)>=0?(H.isub(F),N.isub(j),B.isub(J)):(F.isub(H),j.isub(N),J.isub(B))}return{a:j,b:J,gcd:F.iushln(G)}},a.prototype._invmp=function(z){n(0===z.negative),n(!z.isZero());var H=this,F=z.clone();H=0!==H.negative?H.umod(z):H.clone();for(var N,B=new a(1),j=new a(0),J=F.clone();H.cmpn(1)>0&&F.cmpn(1)>0;){for(var G=0,V=1;!(H.words[0]&V)&&G<26;++G,V<<=1);if(G>0)for(H.iushrn(G);G-- >0;)B.isOdd()&&B.iadd(J),B.iushrn(1);for(var W=0,X=1;!(F.words[0]&X)&&W<26;++W,X<<=1);if(W>0)for(F.iushrn(W);W-- >0;)j.isOdd()&&j.iadd(J),j.iushrn(1);H.cmp(F)>=0?(H.isub(F),B.isub(j)):(F.isub(H),j.isub(B))}return(N=0===H.cmpn(1)?B:j).cmpn(0)<0&&N.iadd(z),N},a.prototype.gcd=function(z){if(this.isZero())return z.abs();if(z.isZero())return this.abs();var H=this.clone(),F=z.clone();H.negative=0,F.negative=0;for(var N=0;H.isEven()&&F.isEven();N++)H.iushrn(1),F.iushrn(1);for(;;){for(;H.isEven();)H.iushrn(1);for(;F.isEven();)F.iushrn(1);var B=H.cmp(F);if(B<0){var j=H;H=F,F=j}else if(0===B||0===F.cmpn(1))break;H.isub(F)}return F.iushln(N)},a.prototype.invm=function(z){return this.egcd(z).a.umod(z)},a.prototype.isEven=function(){return 0==(1&this.words[0])},a.prototype.isOdd=function(){return 1==(1&this.words[0])},a.prototype.andln=function(z){return this.words[0]&z},a.prototype.bincn=function(z){n("number"==typeof z);var H=z%26,F=(z-H)/26,N=1<<H;if(this.length<=F)return this._expand(F+1),this.words[F]|=N,this;for(var B=N,j=F;0!==B&&j<this.length;j++){var J=0|this.words[j];B=(J+=B)>>>26,this.words[j]=J&=67108863}return 0!==B&&(this.words[j]=B,this.length++),this},a.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},a.prototype.cmpn=function(z){var H,F=z<0;if(0!==this.negative&&!F)return-1;if(0===this.negative&&F)return 1;if(this.strip(),this.length>1)H=1;else{F&&(z=-z),n(z<=67108863,"Number is too big");var N=0|this.words[0];H=N===z?0:N<z?-1:1}return 0!==this.negative?0|-H:H},a.prototype.cmp=function(z){if(0!==this.negative&&0===z.negative)return-1;if(0===this.negative&&0!==z.negative)return 1;var H=this.ucmp(z);return 0!==this.negative?0|-H:H},a.prototype.ucmp=function(z){if(this.length>z.length)return 1;if(this.length<z.length)return-1;for(var H=0,F=this.length-1;F>=0;F--){var N=0|this.words[F],B=0|z.words[F];if(N!==B){N<B?H=-1:N>B&&(H=1);break}}return H},a.prototype.gtn=function(z){return 1===this.cmpn(z)},a.prototype.gt=function(z){return 1===this.cmp(z)},a.prototype.gten=function(z){return this.cmpn(z)>=0},a.prototype.gte=function(z){return this.cmp(z)>=0},a.prototype.ltn=function(z){return-1===this.cmpn(z)},a.prototype.lt=function(z){return-1===this.cmp(z)},a.prototype.lten=function(z){return this.cmpn(z)<=0},a.prototype.lte=function(z){return this.cmp(z)<=0},a.prototype.eqn=function(z){return 0===this.cmpn(z)},a.prototype.eq=function(z){return 0===this.cmp(z)},a.red=function(z){return new I(z)},a.prototype.toRed=function(z){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),z.convertTo(this)._forceRed(z)},a.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},a.prototype._forceRed=function(z){return this.red=z,this},a.prototype.forceRed=function(z){return n(!this.red,"Already a number in reduction context"),this._forceRed(z)},a.prototype.redAdd=function(z){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,z)},a.prototype.redIAdd=function(z){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,z)},a.prototype.redSub=function(z){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,z)},a.prototype.redISub=function(z){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,z)},a.prototype.redShl=function(z){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,z)},a.prototype.redMul=function(z){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,z),this.red.mul(this,z)},a.prototype.redIMul=function(z){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,z),this.red.imul(this,z)},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(z){return n(this.red&&!z.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,z)};var S={k256:null,p224:null,p192:null,p25519:null};function _(z,H){this.name=z,this.p=new a(H,16),this.n=this.p.bitLength(),this.k=new a(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function E(){_.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function L(){_.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function C(){_.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function P(){_.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function I(z){if("string"==typeof z){var H=a._prime(z);this.m=H.p,this.prime=H}else n(z.gtn(1),"modulus must be greater than 1"),this.m=z,this.prime=null}function U(z){I.call(this,z),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)}_.prototype._tmp=function(){var z=new a(null);return z.words=new Array(Math.ceil(this.n/13)),z},_.prototype.ireduce=function(z){var H,F=z;do{this.split(F,this.tmp),H=(F=(F=this.imulK(F)).iadd(this.tmp)).bitLength()}while(H>this.n);var N=H<this.n?-1:F.ucmp(this.p);return 0===N?(F.words[0]=0,F.length=1):N>0?F.isub(this.p):void 0!==F.strip?F.strip():F._strip(),F},_.prototype.split=function(z,H){z.iushrn(this.n,0,H)},_.prototype.imulK=function(z){return z.imul(this.k)},i(E,_),E.prototype.split=function(z,H){for(var F=4194303,N=Math.min(z.length,9),B=0;B<N;B++)H.words[B]=z.words[B];if(H.length=N,z.length<=9)return z.words[0]=0,void(z.length=1);var j=z.words[9];for(H.words[H.length++]=j&F,B=10;B<z.length;B++){var J=0|z.words[B];z.words[B-10]=(J&F)<<4|j>>>22,j=J}z.words[B-10]=j>>>=22,z.length-=0===j&&z.length>10?10:9},E.prototype.imulK=function(z){z.words[z.length]=0,z.words[z.length+1]=0,z.length+=2;for(var H=0,F=0;F<z.length;F++){var N=0|z.words[F];z.words[F]=67108863&(H+=977*N),H=64*N+(H/67108864|0)}return 0===z.words[z.length-1]&&(z.length--,0===z.words[z.length-1]&&z.length--),z},i(L,_),i(C,_),i(P,_),P.prototype.imulK=function(z){for(var H=0,F=0;F<z.length;F++){var N=19*(0|z.words[F])+H,B=67108863&N;N>>>=26,z.words[F]=B,H=N}return 0!==H&&(z.words[z.length++]=H),z},a._prime=function(z){if(S[z])return S[z];var H;if("k256"===z)H=new E;else if("p224"===z)H=new L;else if("p192"===z)H=new C;else{if("p25519"!==z)throw new Error("Unknown prime "+z);H=new P}return S[z]=H,H},I.prototype._verify1=function(z){n(0===z.negative,"red works only with positives"),n(z.red,"red works only with red numbers")},I.prototype._verify2=function(z,H){n(0==(z.negative|H.negative),"red works only with positives"),n(z.red&&z.red===H.red,"red works only with red numbers")},I.prototype.imod=function(z){return this.prime?this.prime.ireduce(z)._forceRed(this):z.umod(this.m)._forceRed(this)},I.prototype.neg=function(z){return z.isZero()?z.clone():this.m.sub(z)._forceRed(this)},I.prototype.add=function(z,H){this._verify2(z,H);var F=z.add(H);return F.cmp(this.m)>=0&&F.isub(this.m),F._forceRed(this)},I.prototype.iadd=function(z,H){this._verify2(z,H);var F=z.iadd(H);return F.cmp(this.m)>=0&&F.isub(this.m),F},I.prototype.sub=function(z,H){this._verify2(z,H);var F=z.sub(H);return F.cmpn(0)<0&&F.iadd(this.m),F._forceRed(this)},I.prototype.isub=function(z,H){this._verify2(z,H);var F=z.isub(H);return F.cmpn(0)<0&&F.iadd(this.m),F},I.prototype.shl=function(z,H){return this._verify1(z),this.imod(z.ushln(H))},I.prototype.imul=function(z,H){return this._verify2(z,H),this.imod(z.imul(H))},I.prototype.mul=function(z,H){return this._verify2(z,H),this.imod(z.mul(H))},I.prototype.isqr=function(z){return this.imul(z,z.clone())},I.prototype.sqr=function(z){return this.mul(z,z)},I.prototype.sqrt=function(z){if(z.isZero())return z.clone();var H=this.m.andln(3);if(n(H%2==1),3===H){var F=this.m.add(new a(1)).iushrn(2);return this.pow(z,F)}for(var N=this.m.subn(1),B=0;!N.isZero()&&0===N.andln(1);)B++,N.iushrn(1);n(!N.isZero());var j=new a(1).toRed(this),J=j.redNeg(),G=this.m.subn(1).iushrn(1),V=this.m.bitLength();for(V=new a(2*V*V).toRed(this);0!==this.pow(V,G).cmp(J);)V.redIAdd(J);for(var W=this.pow(V,N),X=this.pow(z,N.addn(1).iushrn(1)),K=this.pow(z,N),re=B;0!==K.cmp(j);){for(var ee=K,ie=0;0!==ee.cmp(j);ie++)ee=ee.redSqr();n(ie<re);var oe=this.pow(W,new a(1).iushln(re-ie-1));X=X.redMul(oe),W=oe.redSqr(),K=K.redMul(W),re=ie}return X},I.prototype.invm=function(z){var H=z._invmp(this.m);return 0!==H.negative?(H.negative=0,this.imod(H).redNeg()):this.imod(H)},I.prototype.pow=function(z,H){if(H.isZero())return new a(1).toRed(this);if(0===H.cmpn(1))return z.clone();var F=new Array(16);F[0]=new a(1).toRed(this),F[1]=z;for(var N=2;N<F.length;N++)F[N]=this.mul(F[N-1],z);var B=F[0],j=0,J=0,G=H.bitLength()%26;for(0===G&&(G=26),N=H.length-1;N>=0;N--){for(var V=H.words[N],W=G-1;W>=0;W--){var X=V>>W&1;B!==F[0]&&(B=this.sqr(B)),0!==X||0!==j?(j<<=1,j|=X,(4==++J||0===N&&0===W)&&(B=this.mul(B,F[j]),J=0,j=0)):J=0}G=26}return B},I.prototype.convertTo=function(z){var H=z.umod(this.m);return H===z?H.clone():H},I.prototype.convertFrom=function(z){var H=z.clone();return H.red=null,H},a.mont=function(z){return new U(z)},i(U,I),U.prototype.convertTo=function(z){return this.imod(z.ushln(this.shift))},U.prototype.convertFrom=function(z){var H=this.imod(z.mul(this.rinv));return H.red=null,H},U.prototype.imul=function(z,H){if(z.isZero()||H.isZero())return z.words[0]=0,z.length=1,z;var F=z.imul(H),N=F.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=F.isub(N).iushrn(this.shift),j=B;return B.cmp(this.m)>=0?j=B.isub(this.m):B.cmpn(0)<0&&(j=B.iadd(this.m)),j._forceRed(this)},U.prototype.mul=function(z,H){if(z.isZero()||H.isZero())return new a(0)._forceRed(this);var F=z.mul(H),N=F.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),B=F.isub(N).iushrn(this.shift),j=B;return B.cmp(this.m)>=0?j=B.isub(this.m):B.cmpn(0)<0&&(j=B.iadd(this.m)),j._forceRed(this)},U.prototype.invm=function(z){return this.imod(z._invmp(this.m).mul(this.r2))._forceRed(this)}}(d=t.nmd(d),this)},2692:function(d){"use strict";d.exports=function(s){var t,o,r,n=s.length,i=0;for(t=0;t<n;++t)i+=s[t].length;var a=new Array(i),c=0;for(t=0;t<n;++t){var p=s[t],f=p.length;for(o=0;o<f;++o){var x=a[c++]=new Array(f-1),v=0;for(r=0;r<f;++r)r!==o&&(x[v++]=p[r]);if(1&o){var g=x[1];x[1]=x[0],x[0]=g}}}return a}},2569:function(d,s,t){"use strict";d.exports=function(g,y,h){switch(arguments.length){case 1:return function x(g){return o=[],p(g,g,f,!0),o}(g);case 2:return"function"==typeof y?p(g,g,y,!0):function v(g,y){return o=[],p(g,y,f,!1),o}(g,y);case 3:return p(g,y,h,!1);default:throw new Error("box-intersect: Invalid arguments")}};var o,r=t(5306),n=t(1390),i=t(2337);function a(g,y){for(var h=0;h<g;++h)if(!(y[h]<=y[h+g]))return!0;return!1}function c(g,y,h,m){for(var w=0,u=0,S=0,_=g.length;S<_;++S){var E=g[S];if(!a(y,E)){for(var L=0;L<2*y;++L)h[w++]=E[L];m[u++]=S}}return u}function p(g,y,h,m){var w=g.length,u=y.length;if(!(w<=0||u<=0)){var S=g[0].length>>>1;if(!(S<=0)){var _,E=r.mallocDouble(2*S*w),L=r.mallocInt32(w);if((w=c(g,S,E,L))>0){if(1===S&&m)n.init(w),_=n.sweepComplete(S,h,0,w,E,L,0,w,E,L);else{var C=r.mallocDouble(2*S*u),P=r.mallocInt32(u);(u=c(y,S,C,P))>0&&(n.init(w+u),_=1===S?n.sweepBipartite(S,h,0,w,E,L,0,u,C,P):i(S,h,m,w,E,L,u,C,P),r.free(C),r.free(P))}r.free(E),r.free(L)}return _}}}function f(g,y){o.push([g,y])}},7333:function(d,s){"use strict";function t(o){return o?function(r,n,i,a,c,p,f,x,v,g,y){return c-a>v-x?function(h,m,w,u,S,_,E,L,C,P,I){for(var U=2*h,z=u,H=U*u;z<S;++z,H+=U){var F=_[m+H],N=_[m+H+h],B=E[z];e:for(var j=L,J=U*L;j<C;++j,J+=U){var W=I[j];if(!(P[m+J+h]<F||N<P[m+J])){for(var X=m+1;X<h;++X)if(_[X+h+H]<P[X+J]||P[X+h+J]<_[X+H])continue e;var oe=w(B,W);if(void 0!==oe)return oe}}}}(r,n,i,a,c,p,f,x,v,g,y):function(h,m,w,u,S,_,E,L,C,P,I){for(var U=2*h,z=L,H=U*L;z<C;++z,H+=U){var F=P[m+H],N=P[m+H+h],B=I[z];e:for(var j=u,J=U*u;j<S;++j,J+=U){var W=E[j];if(!(N<_[m+J]||_[m+J+h]<F)){for(var X=m+1;X<h;++X)if(_[X+h+J]<P[X+H]||P[X+h+H]<_[X+J])continue e;var oe=w(W,B);if(void 0!==oe)return oe}}}}(r,n,i,a,c,p,f,x,v,g,y)}:function(r,n,i,a,c,p,f,x,v,g,y,h){return p-c>g-v?a?function(m,w,u,S,_,E,L,C,P,I,U){for(var z=2*m,H=S,F=z*S;H<_;++H,F+=z){var N=E[w+F],B=E[w+F+m],j=L[H];e:for(var J=C,G=z*C;J<P;++J,G+=z){var V=I[w+G],W=U[J];if(!(V<=N||B<V)){for(var X=w+1;X<m;++X)if(E[X+m+F]<I[X+G]||I[X+m+G]<E[X+F])continue e;var oe=u(W,j);if(void 0!==oe)return oe}}}}(r,n,i,c,p,f,x,v,g,y,h):function(m,w,u,S,_,E,L,C,P,I,U){for(var z=2*m,H=S,F=z*S;H<_;++H,F+=z){var N=E[w+F],B=E[w+F+m],j=L[H];e:for(var J=C,G=z*C;J<P;++J,G+=z){var V=I[w+G],W=U[J];if(!(V<N||B<V)){for(var X=w+1;X<m;++X)if(E[X+m+F]<I[X+G]||I[X+m+G]<E[X+F])continue e;var oe=u(j,W);if(void 0!==oe)return oe}}}}(r,n,i,c,p,f,x,v,g,y,h):a?function(m,w,u,S,_,E,L,C,P,I,U){for(var z=2*m,H=C,F=z*C;H<P;++H,F+=z){var N=I[w+F],B=U[H];e:for(var j=S,J=z*S;j<_;++j,J+=z){var W=L[j];if(!(N<=E[w+J]||E[w+J+m]<N)){for(var X=w+1;X<m;++X)if(E[X+m+J]<I[X+F]||I[X+m+F]<E[X+J])continue e;var oe=u(B,W);if(void 0!==oe)return oe}}}}(r,n,i,c,p,f,x,v,g,y,h):function(m,w,u,S,_,E,L,C,P,I,U){for(var z=2*m,H=C,F=z*C;H<P;++H,F+=z){var N=I[w+F],B=U[H];e:for(var j=S,J=z*S;j<_;++j,J+=z){var W=L[j];if(!(N<E[w+J]||E[w+J+m]<N)){for(var X=w+1;X<m;++X)if(E[X+m+J]<I[X+F]||I[X+m+F]<E[X+J])continue e;var oe=u(W,B);if(void 0!==oe)return oe}}}}(r,n,i,c,p,f,x,v,g,y,h)}}s.partial=t(!1),s.full=t(!0)},2337:function(d,s,t){"use strict";d.exports=function(L,C,P,I,U,z,H,F,N){!function(Ie,Ce){var Re=8*r.log2(Ce+1)*(Ie+1)|0,le=r.nextPow2(6*Re);w.length<le&&(o.free(w),w=o.mallocInt32(le));var ge=r.nextPow2(2*Re);u.length<ge&&(o.free(u),u=o.mallocDouble(ge))}(L,I+H);var B,j=0,J=2*L;for(S(j++,0,0,I,0,H,P?16:0,-1/0,1/0),P||S(j++,0,0,H,0,I,1,-1/0,1/0);j>0;){var G=6*(j-=1),V=w[G],W=w[G+1],X=w[G+2],K=w[G+3],re=w[G+4],ee=w[G+5],ie=2*j,oe=u[ie],ce=u[ie+1],me=1&ee,de=!!(16&ee),he=U,ve=z,Pe=F,xe=N;if(me&&(he=F,ve=N,Pe=U,xe=z),!(2&ee&&(X=g(L,V,W,X,he,ve,ce),W>=X)||4&ee&&(W=y(L,V,W,X,he,ve,oe))>=X)){var ke=X-W,Ae=re-K;if(de){if(L*ke*(ke+Ae)<4194304){if(void 0!==(B=c.scanComplete(L,V,C,W,X,he,ve,K,re,Pe,xe)))return B;continue}}else{if(L*Math.min(ke,Ae)<128){if(void 0!==(B=i(L,V,C,me,W,X,he,ve,K,re,Pe,xe)))return B;continue}if(L*ke*Ae<4194304){if(void 0!==(B=c.scanBipartite(L,V,C,me,W,X,he,ve,K,re,Pe,xe)))return B;continue}}var Te=x(L,V,W,X,he,ve,oe,ce);if(W<Te)if(L*(Te-W)<128){if(void 0!==(B=a(L,V+1,C,W,Te,he,ve,K,re,Pe,xe)))return B}else if(V===L-2){if(void 0!==(B=me?c.sweepBipartite(L,C,K,re,Pe,xe,W,Te,he,ve):c.sweepBipartite(L,C,W,Te,he,ve,K,re,Pe,xe)))return B}else S(j++,V+1,W,Te,K,re,me,-1/0,1/0),S(j++,V+1,K,re,W,Te,1^me,-1/0,1/0);if(Te<X){var Q=p(L,V,K,re,Pe,xe),se=Pe[J*Q+V],fe=v(L,V,Q,re,Pe,xe,se);if(fe<re&&S(j++,V,Te,X,fe,re,(4|me)+(de?16:0),se,ce),K<Q&&S(j++,V,Te,X,K,Q,(2|me)+(de?16:0),oe,se),Q+1===fe){if(void 0!==(B=de?E(L,V,C,Te,X,he,ve,Q,Pe,xe[Q]):_(L,V,C,me,Te,X,he,ve,Q,Pe,xe[Q])))return B}else if(Q<fe){var ye;if(de){if(Te<(ye=h(L,V,Te,X,he,ve,se))){var Me=v(L,V,Te,ye,he,ve,se);if(V===L-2){if(Te<Me&&void 0!==(B=c.sweepComplete(L,C,Te,Me,he,ve,Q,fe,Pe,xe))||Me<ye&&void 0!==(B=c.sweepBipartite(L,C,Me,ye,he,ve,Q,fe,Pe,xe)))return B}else Te<Me&&S(j++,V+1,Te,Me,Q,fe,16,-1/0,1/0),Me<ye&&(S(j++,V+1,Me,ye,Q,fe,0,-1/0,1/0),S(j++,V+1,Q,fe,Me,ye,1,-1/0,1/0))}}else Te<(ye=me?m(L,V,Te,X,he,ve,se):h(L,V,Te,X,he,ve,se))&&(V===L-2?B=me?c.sweepBipartite(L,C,Q,fe,Pe,xe,Te,ye,he,ve):c.sweepBipartite(L,C,Te,ye,he,ve,Q,fe,Pe,xe):(S(j++,V+1,Te,ye,Q,fe,me,-1/0,1/0),S(j++,V+1,Q,fe,Te,ye,1^me,-1/0,1/0)))}}}}};var o=t(5306),r=t(2288),n=t(7333),i=n.partial,a=n.full,c=t(1390),p=t(2464),f=t(122),x=f("!(lo>=p0)&&!(p1>=hi)"),v=f("lo===p0"),g=f("lo<p0"),y=f("hi<=p0"),h=f("lo<=p0&&p0<=hi"),m=f("lo<p0&&p0<=hi"),w=o.mallocInt32(1024),u=o.mallocDouble(1024);function S(L,C,P,I,U,z,H,F,N){var B=6*L;w[B]=C,w[B+1]=P,w[B+2]=I,w[B+3]=U,w[B+4]=z,w[B+5]=H;var j=2*L;u[j]=F,u[j+1]=N}function _(L,C,P,I,U,z,H,F,N,B,j){var J=2*L,G=N*J,V=B[G+C];e:for(var W=U,X=U*J;W<z;++W,X+=J){var K=H[X+C],re=H[X+C+L];if(!(V<K||re<V||I&&V===K)){for(var ee,ie=F[W],oe=C+1;oe<L;++oe)if(K=H[X+oe],(re=H[X+oe+L])<B[G+oe]||B[G+oe+L]<K)continue e;if(void 0!==(ee=I?P(j,ie):P(ie,j)))return ee}}}function E(L,C,P,I,U,z,H,F,N,B){var j=2*L,J=F*j,G=N[J+C];e:for(var V=I,W=I*j;V<U;++V,W+=j){var X=H[V];if(X!==B){var K=z[W+C],re=z[W+C+L];if(!(G<K||re<G)){for(var ee=C+1;ee<L;++ee)if(K=z[W+ee],(re=z[W+ee+L])<N[J+ee]||N[J+ee+L]<K)continue e;var ce=P(X,B);if(void 0!==ce)return ce}}}}},2464:function(d,s,t){"use strict";d.exports=function(n,i,a,c,p,f){if(c<=a+1)return a;for(var x=a,v=c,g=c+a>>>1,y=2*n,h=g,m=p[y*g+i];x<v;){if(v-x<8){r(n,i,x,v,p,f),m=p[y*g+i];break}var w=v-x,u=Math.random()*w+x|0,S=p[y*u+i],_=Math.random()*w+x|0,E=p[y*_+i],L=Math.random()*w+x|0,C=p[y*L+i];S<=E?C>=E?(h=_,m=E):S>=C?(h=u,m=S):(h=L,m=C):E>=C?(h=_,m=E):C>=S?(h=u,m=S):(h=L,m=C);for(var P=y*(v-1),I=y*h,U=0;U<y;++U,++P,++I){var z=p[P];p[P]=p[I],p[I]=z}var H=f[v-1];for(f[v-1]=f[h],f[h]=H,P=y*(v-1),I=y*(h=o(n,i,x,v-1,p,f,m)),U=0;U<y;++U,++P,++I)z=p[P],p[P]=p[I],p[I]=z;if(H=f[v-1],f[v-1]=f[h],f[h]=H,g<h){for(v=h-1;x<v&&p[y*(v-1)+i]===m;)v-=1;v+=1}else{if(!(h<g))break;for(x=h+1;x<v&&p[y*x+i]===m;)x+=1}}return o(n,i,a,g,p,f,p[y*g+i])};var o=t(122)("lo<p0");function r(n,i,a,c,p,f){for(var x=2*n,v=x*(a+1)+i,g=a+1;g<c;++g,v+=x)for(var y=p[v],h=g,m=x*(g-1);h>a&&p[m+i]>y;--h,m-=x){for(var w=m,u=m+x,S=0;S<x;++S,++w,++u){var _=p[w];p[w]=p[u],p[u]=_}var E=f[h];f[h]=f[h-1],f[h-1]=E}}},122:function(d){"use strict";d.exports=function(t){return s[t]};var s={"lo===p0":function(t,o,r,n,i,a,c){for(var p=2*t,f=p*r,x=f,v=r,g=o,y=r;n>y;++y,f+=p)if(i[f+g]===c)if(v===y)v+=1,x+=p;else{for(var h=0;p>h;++h){var m=i[f+h];i[f+h]=i[x],i[x++]=m}var w=a[y];a[y]=a[v],a[v++]=w}return v},"lo<p0":function(t,o,r,n,i,a,c){for(var p=2*t,f=p*r,x=f,v=r,g=o,y=r;n>y;++y,f+=p)if(i[f+g]<c)if(v===y)v+=1,x+=p;else{for(var h=0;p>h;++h){var m=i[f+h];i[f+h]=i[x],i[x++]=m}var w=a[y];a[y]=a[v],a[v++]=w}return v},"lo<=p0":function(t,o,r,n,i,a,c){for(var p=2*t,f=p*r,x=f,v=r,g=t+o,y=r;n>y;++y,f+=p)if(i[f+g]<=c)if(v===y)v+=1,x+=p;else{for(var h=0;p>h;++h){var m=i[f+h];i[f+h]=i[x],i[x++]=m}var w=a[y];a[y]=a[v],a[v++]=w}return v},"hi<=p0":function(t,o,r,n,i,a,c){for(var p=2*t,f=p*r,x=f,v=r,g=t+o,y=r;n>y;++y,f+=p)if(i[f+g]<=c)if(v===y)v+=1,x+=p;else{for(var h=0;p>h;++h){var m=i[f+h];i[f+h]=i[x],i[x++]=m}var w=a[y];a[y]=a[v],a[v++]=w}return v},"lo<p0&&p0<=hi":function(t,o,r,n,i,a,c){for(var p=2*t,f=p*r,x=f,v=r,g=o,y=t+o,h=r;n>h;++h,f+=p)if(i[f+g]<c&&c<=i[f+y])if(v===h)v+=1,x+=p;else{for(var u=0;p>u;++u){var S=i[f+u];i[f+u]=i[x],i[x++]=S}var _=a[h];a[h]=a[v],a[v++]=_}return v},"lo<=p0&&p0<=hi":function(t,o,r,n,i,a,c){for(var p=2*t,f=p*r,x=f,v=r,g=o,y=t+o,h=r;n>h;++h,f+=p)if(i[f+g]<=c&&c<=i[f+y])if(v===h)v+=1,x+=p;else{for(var u=0;p>u;++u){var S=i[f+u];i[f+u]=i[x],i[x++]=S}var _=a[h];a[h]=a[v],a[v++]=_}return v},"!(lo>=p0)&&!(p1>=hi)":function(t,o,r,n,i,a,c,p){for(var f=2*t,x=f*r,v=x,g=r,y=o,h=t+o,m=r;n>m;++m,x+=f)if(!(i[x+y]>=c||p>=i[x+h]))if(g===m)g+=1,v+=f;else{for(var S=0;f>S;++S){var _=i[x+S];i[x+S]=i[v],i[v++]=_}var E=a[m];a[m]=a[g],a[g++]=E}return g}}},309:function(d){"use strict";function s(p,f,x){for(var v=2*(p+1),g=p+1;g<=f;++g){for(var y=x[v++],h=x[v++],m=g,w=v-2;m-- >p;){var u=x[w-2],S=x[w-1];if(u<y||u===y&&S<h)break;x[w]=u,x[w+1]=S,w-=2}x[w]=y,x[w+1]=h}}function t(p,f,x){var v=x[p*=2],g=x[p+1];x[p]=x[f*=2],x[p+1]=x[f+1],x[f]=v,x[f+1]=g}function o(p,f,x){x[p*=2]=x[f*=2],x[p+1]=x[f+1]}function r(p,f,x,v){x*=2;var g=v[p*=2],y=v[p+1];v[p]=v[f*=2],v[p+1]=v[f+1],v[f]=v[x],v[f+1]=v[x+1],v[x]=g,v[x+1]=y}function n(p,f,x,v,g){g[p*=2]=g[f*=2],g[f]=x,g[p+1]=g[f+1],g[f+1]=v}function i(p,f,x){var v=x[p*=2],g=x[f*=2];return!(v<g)&&(v!==g||x[p+1]>x[f+1])}function a(p,f,x,v){var g=v[p*=2];return g<f||g===f&&v[p+1]<x}function c(p,f,x){var v=(f-p+1)/6|0,g=p+v,y=f-v,h=p+f>>1,m=h-v,w=h+v,u=g,S=m,_=h,E=w,L=y,C=p+1,P=f-1,I=0;i(u,S,x)&&(I=u,u=S,S=I),i(E,L,x)&&(I=E,E=L,L=I),i(u,_,x)&&(I=u,u=_,_=I),i(S,_,x)&&(I=S,S=_,_=I),i(u,E,x)&&(I=u,u=E,E=I),i(_,E,x)&&(I=_,_=E,E=I),i(S,L,x)&&(I=S,S=L,L=I),i(S,_,x)&&(I=S,S=_,_=I),i(E,L,x)&&(I=E,E=L,L=I);for(var U=x[2*S],z=x[2*S+1],H=x[2*E],F=x[2*E+1],N=2*u,B=2*_,j=2*L,J=2*g,G=2*h,V=2*y,W=0;W<2;++W){var K=x[B+W],re=x[j+W];x[J+W]=x[N+W],x[G+W]=K,x[V+W]=re}o(m,p,x),o(w,f,x);for(var ee=C;ee<=P;++ee)if(a(ee,U,z,x))ee!==C&&t(ee,C,x),++C;else if(!a(ee,H,F,x))for(;;){if(a(P,H,F,x)){a(P,U,z,x)?(r(ee,C,P,x),++C,--P):(t(ee,P,x),--P);break}if(--P<ee)break}n(p,C-1,U,z,x),n(f,P+1,H,F,x),C-2-p<=32?s(p,C-2,x):c(p,C-2,x),f-(P+2)<=32?s(P+2,f,x):c(P+2,f,x),P-C<=32?s(C,P,x):c(C,P,x)}d.exports=function(p,f){f<=128?s(0,f-1,p):c(0,f-1,p)}},1390:function(d,s,t){"use strict";d.exports={init:function(w){var u=r.nextPow2(w);c.length<u&&(o.free(c),c=o.mallocInt32(u)),p.length<u&&(o.free(p),p=o.mallocInt32(u)),f.length<u&&(o.free(f),f=o.mallocInt32(u)),x.length<u&&(o.free(x),x=o.mallocInt32(u)),v.length<u&&(o.free(v),v=o.mallocInt32(u)),g.length<u&&(o.free(g),g=o.mallocInt32(u));var S=8*u;y.length<S&&(o.free(y),y=o.mallocDouble(S))},sweepBipartite:function(w,u,S,_,E,L,C,P,I,U){for(var z=0,H=2*w,F=w-1,N=H-1,B=S;B<_;++B){var j=L[B],J=H*B;y[z++]=E[J+F],y[z++]=-(j+1),y[z++]=E[J+N],y[z++]=j}for(B=C;B<P;++B){j=U[B]+i;var G=H*B;y[z++]=I[G+F],y[z++]=-j,y[z++]=I[G+N],y[z++]=j}var V=z>>>1;n(y,V);var W=0,X=0;for(B=0;B<V;++B){var K=0|y[2*B+1];if(K>=i)h(f,x,X--,K=K-i|0);else if(K>=0)h(c,p,W--,K);else if(K<=-268435456){K=-K-i|0;for(var re=0;re<W;++re)if(void 0!==(ee=u(c[re],K)))return ee;m(f,x,X++,K)}else{for(K=-K-1|0,re=0;re<X;++re){var ee;if(void 0!==(ee=u(K,f[re])))return ee}m(c,p,W++,K)}}},sweepComplete:function(w,u,S,_,E,L,C,P,I,U){for(var z=0,H=2*w,F=w-1,N=H-1,B=S;B<_;++B){var j=L[B]+1<<1,J=H*B;y[z++]=E[J+F],y[z++]=-j,y[z++]=E[J+N],y[z++]=j}for(B=C;B<P;++B){j=U[B]+1<<1;var G=H*B;y[z++]=I[G+F],y[z++]=1|-j,y[z++]=I[G+N],y[z++]=1|j}var V=z>>>1;n(y,V);var W=0,X=0,K=0;for(B=0;B<V;++B){var re=0|y[2*B+1],ee=1&re;if(B<V-1&&re>>1==y[2*B+3]>>1&&(ee=2,B+=1),re<0){for(var ie=-(re>>1)-1,oe=0;oe<K;++oe)if(void 0!==(ce=u(v[oe],ie)))return ce;if(0!==ee)for(oe=0;oe<W;++oe)if(void 0!==(ce=u(c[oe],ie)))return ce;if(1!==ee)for(oe=0;oe<X;++oe){var ce;if(void 0!==(ce=u(f[oe],ie)))return ce}0===ee?m(c,p,W++,ie):1===ee?m(f,x,X++,ie):2===ee&&m(v,g,K++,ie)}else ie=(re>>1)-1,0===ee?h(c,p,W--,ie):1===ee?h(f,x,X--,ie):2===ee&&h(v,g,K--,ie)}},scanBipartite:function(w,u,S,_,E,L,C,P,I,U,z,H){var F=0,N=2*w,B=u,j=u+w,J=1,G=1;_?G=i:J=i;for(var V=E;V<L;++V){var W=V+J,X=N*V;y[F++]=C[X+B],y[F++]=-W,y[F++]=C[X+j],y[F++]=W}for(V=I;V<U;++V)W=V+G,y[F++]=z[N*V+B],y[F++]=-W;var re=F>>>1;n(y,re);var ee=0;for(V=0;V<re;++V){var ie=0|y[2*V+1];if(ie<0){var oe=!1;if((W=-ie)>=i?(oe=!_,W-=i):(oe=!!_,W-=1),oe)m(c,p,ee++,W);else{var ce=H[W],me=N*W,de=z[me+u+1],he=z[me+u+1+w];e:for(var ve=0;ve<ee;++ve){var Pe=c[ve],xe=N*Pe;if(!(he<C[xe+u+1]||C[xe+u+1+w]<de)){for(var ke=u+2;ke<w;++ke)if(z[me+ke+w]<C[xe+ke]||C[xe+ke+w]<z[me+ke])continue e;var Ae,Te=P[Pe];if(void 0!==(Ae=_?S(ce,Te):S(Te,ce)))return Ae}}}}else h(c,p,ee--,ie-J)}},scanComplete:function(w,u,S,_,E,L,C,P,I,U,z){for(var H=0,F=2*w,N=u,B=u+w,j=_;j<E;++j){var J=j+i,G=F*j;y[H++]=L[G+N],y[H++]=-J,y[H++]=L[G+B],y[H++]=J}for(j=P;j<I;++j)J=j+1,y[H++]=U[F*j+N],y[H++]=-J;var W=H>>>1;n(y,W);var X=0;for(j=0;j<W;++j){var K=0|y[2*j+1];if(K<0)if((J=-K)>=i)c[X++]=J-i;else{var re=z[J-=1],ee=F*J,ie=U[ee+u+1],oe=U[ee+u+1+w];e:for(var ce=0;ce<X;++ce){var me=c[ce],de=C[me];if(de===re)break;var he=F*me;if(!(oe<L[he+u+1]||L[he+u+1+w]<ie)){for(var ve=u+2;ve<w;++ve)if(U[ee+ve+w]<L[he+ve]||L[he+ve+w]<U[ee+ve])continue e;var Pe=S(de,re);if(void 0!==Pe)return Pe}}}else{for(J=K-i,ce=X-1;ce>=0;--ce)if(c[ce]===J){for(ve=ce+1;ve<X;++ve)c[ve-1]=c[ve];break}--X}}}};var o=t(5306),r=t(2288),n=t(309),i=1<<28,a=1024,c=o.mallocInt32(a),p=o.mallocInt32(a),f=o.mallocInt32(a),x=o.mallocInt32(a),v=o.mallocInt32(a),g=o.mallocInt32(a),y=o.mallocDouble(8192);function h(w,u,S,_){var E=u[_],L=w[S-1];w[E]=L,u[L]=E}function m(w,u,S,_){w[S]=_,u[_]=S}},7761:function(d,s,t){"use strict";var o=t(9971),r=t(743),n=t(2161),i=t(7098);function a(f){return[Math.min(f[0],f[1]),Math.max(f[0],f[1])]}function c(f,x){return f[0]-x[0]||f[1]-x[1]}function p(f,x,v){return x in f?f[x]:v}d.exports=function(f,x,v){Array.isArray(x)?(v=v||{},x=x||[]):(v=x||{},x=[]);var g=!!p(v,"delaunay",!0),y=!!p(v,"interior",!0),h=!!p(v,"exterior",!0),m=!!p(v,"infinity",!1);if(!y&&!h||0===f.length)return[];var w=o(f,x);if(g||y!==h||m){for(var u=r(f.length,x.map(a).sort(c)),S=0;S<w.length;++S){var _=w[S];u.addTriangle(_[0],_[1],_[2])}return g&&n(f,u),h?y?m?i(u,0,m):u.cells():i(u,1,m):i(u,-1)}return w}},2161:function(d,s,t){"use strict";var o=t(2227)[4];function r(n,i,a,c,p,f){var x=i.opposite(c,p);if(!(x<0)){if(p<c){var v=c;c=p,p=v,v=f,f=x,x=v}i.isConstraint(c,p)||o(n[c],n[p],n[f],n[x])<0&&a.push(c,p)}}t(5070),d.exports=function(n,i){for(var a=[],c=n.length,p=i.stars,f=0;f<c;++f)for(var x=p[f],v=1;v<x.length;v+=2)if(!((m=x[v])<f||i.isConstraint(f,m))){for(var g=x[v-1],y=-1,h=1;h<x.length;h+=2)if(x[h-1]===m){y=x[h];break}y<0||o(n[f],n[m],n[g],n[y])<0&&a.push(f,m)}for(;a.length>0;){for(var m=a.pop(),w=(g=-1,y=-1,x=p[f=a.pop()],1);w<x.length;w+=2){var u=x[w-1],S=x[w];u===m?y=S:S===m&&(g=u)}g<0||y<0||o(n[f],n[m],n[g],n[y])>=0||(i.flip(f,m),r(n,i,a,g,f,y),r(n,i,a,f,y,g),r(n,i,a,y,m,g),r(n,i,a,m,g,y))}}},7098:function(d,s,t){"use strict";var o,r=t(5070);function n(a,c,p,f,x,v,g){this.cells=a,this.neighbor=c,this.flags=f,this.constraint=p,this.active=x,this.next=v,this.boundary=g}function i(a,c){return a[0]-c[0]||a[1]-c[1]||a[2]-c[2]}d.exports=function(a,c,p){var f=function(C,P){for(var I=C.cells(),U=I.length,z=0;z<U;++z){var H=(K=I[z])[0],F=K[1],N=K[2];F<N?F<H&&(K[0]=F,K[1]=N,K[2]=H):N<H&&(K[0]=N,K[1]=H,K[2]=F)}I.sort(i);var B=new Array(U);for(z=0;z<B.length;++z)B[z]=0;var j=[],J=[],G=new Array(3*U),V=new Array(3*U),W=null;P&&(W=[]);var X=new n(I,G,V,B,j,J,W);for(z=0;z<U;++z)for(var K=I[z],re=0;re<3;++re){var ee=G[3*z+re]=X.locate(F=K[(re+1)%3],H=K[re],C.opposite(F,H)),ie=V[3*z+re]=C.isConstraint(H,F);ee<0&&(ie?J.push(z):(j.push(z),B[z]=1),P&&W.push([F,H,-1]))}return X}(a,p);if(0===c)return p?f.cells.concat(f.boundary):f.cells;for(var x=1,v=f.active,g=f.next,y=f.flags,h=f.cells,m=f.constraint,w=f.neighbor;v.length>0||g.length>0;){for(;v.length>0;){var u=v.pop();if(y[u]!==-x){y[u]=x;for(var S=0;S<3;++S){var _=w[3*u+S];_>=0&&0===y[_]&&(m[3*u+S]?g.push(_):(v.push(_),y[_]=x))}}}var E=g;g=v,v=E,g.length=0,x=-x}var L=function(C,P,I){for(var U=0,z=0;z<C.length;++z)P[z]===I&&(C[U++]=C[z]);return C.length=U,C}(h,y,c);return p?L.concat(f.boundary):L},n.prototype.locate=(o=[0,0,0],function(a,c,p){var f=a,x=c,v=p;return c<p?c<a&&(f=c,x=p,v=a):p<a&&(f=p,x=a,v=c),f<0?-1:(o[0]=f,o[1]=x,o[2]=v,r.eq(this.cells,o,i))})},9971:function(d,s,t){"use strict";var o=t(5070),r=t(417)[3];function n(g,y,h,m,w){this.a=g,this.b=y,this.idx=h,this.lowerIds=m,this.upperIds=w}function i(g,y,h,m){this.a=g,this.b=y,this.type=h,this.idx=m}function a(g,y){var h=g.a[0]-y.a[0]||g.a[1]-y.a[1]||g.type-y.type;return h||(0!==g.type&&(h=r(g.a,g.b,y.b))?h:g.idx-y.idx)}function c(g,y){return r(g.a,g.b,y)}function p(g,y,h,m,w){for(var u=o.lt(y,m,c),S=o.gt(y,m,c),_=u;_<S;++_){for(var E=y[_],L=E.lowerIds,C=L.length;C>1&&r(h[L[C-2]],h[L[C-1]],m)>0;)g.push([L[C-1],L[C-2],w]),C-=1;L.length=C,L.push(w);var P=E.upperIds;for(C=P.length;C>1&&r(h[P[C-2]],h[P[C-1]],m)<0;)g.push([P[C-2],P[C-1],w]),C-=1;P.length=C,P.push(w)}}function f(g,y){var h;return(h=g.a[0]<y.a[0]?r(g.a,g.b,y.a):r(y.b,y.a,g.a))?h:(h=y.b[0]<g.b[0]?r(g.a,g.b,y.b):r(y.b,y.a,g.b))||g.idx-y.idx}function x(g,y,h){var m=o.le(g,h,f),w=g[m],u=w.upperIds,S=u[u.length-1];w.upperIds=[S],g.splice(m+1,0,new n(h.a,h.b,h.idx,[S],u))}function v(g,y,h){var m=h.a;h.a=h.b,h.b=m;var w=o.eq(g,h,f);g[w-1].upperIds=g[w].upperIds,g.splice(w,1)}d.exports=function(g,y){for(var h=g.length,m=y.length,w=[],u=0;u<h;++u)w.push(new i(g[u],null,0,u));for(u=0;u<m;++u){var S=y[u],_=g[S[0]],E=g[S[1]];_[0]<E[0]?w.push(new i(_,E,2,u),new i(E,_,1,u)):_[0]>E[0]&&w.push(new i(E,_,2,u),new i(_,E,1,u))}w.sort(a);for(var L=w[0].a[0]-(1+Math.abs(w[0].a[0]))*Math.pow(2,-52),C=[new n([L,1],[L,0],-1,[],[],[],[])],P=[],I=(u=0,w.length);u<I;++u){var U=w[u],z=U.type;0===z?p(P,C,g,U.a,U.idx):2===z?x(C,0,U):v(C,0,U)}return P}},743:function(d,s,t){"use strict";var o=t(5070);function r(a,c){this.stars=a,this.edges=c}d.exports=function(a,c){for(var p=new Array(a),f=0;f<a;++f)p[f]=[];return new r(p,c)};var n=r.prototype;function i(a,c,p){for(var f=1,x=a.length;f<x;f+=2)if(a[f-1]===c&&a[f]===p)return a[f-1]=a[x-2],a[f]=a[x-1],void(a.length=x-2)}n.isConstraint=function(){var a=[0,0];function c(p,f){return p[0]-f[0]||p[1]-f[1]}return function(p,f){return a[0]=Math.min(p,f),a[1]=Math.max(p,f),o.eq(this.edges,a,c)>=0}}(),n.removeTriangle=function(a,c,p){var f=this.stars;i(f[a],c,p),i(f[c],p,a),i(f[p],a,c)},n.addTriangle=function(a,c,p){var f=this.stars;f[a].push(c,p),f[c].push(p,a),f[p].push(a,c)},n.opposite=function(a,c){for(var p=this.stars[c],f=1,x=p.length;f<x;f+=2)if(p[f]===a)return p[f-1];return-1},n.flip=function(a,c){var p=this.opposite(a,c),f=this.opposite(c,a);this.removeTriangle(a,c,p),this.removeTriangle(c,a,f),this.addTriangle(a,f,p),this.addTriangle(c,p,f)},n.edges=function(){for(var a=this.stars,c=[],p=0,f=a.length;p<f;++p)for(var x=a[p],v=0,g=x.length;v<g;v+=2)c.push([x[v],x[v+1]]);return c},n.cells=function(){for(var a=this.stars,c=[],p=0,f=a.length;p<f;++p)for(var x=a[p],v=0,g=x.length;v<g;v+=2){var y=x[v],h=x[v+1];p<Math.min(y,h)&&c.push([p,y,h])}return c}},9887:function(d){"use strict";d.exports=function(s){for(var t=1,o=1;o<s.length;++o)for(var r=0;r<o;++r)if(s[o]<s[r])t=-t;else if(s[r]===s[o])return 0;return t}},9243:function(d,s,t){"use strict";var o=t(3094),r=t(6606);function n(c,p){for(var f=0,x=c.length,v=0;v<x;++v)f+=c[v]*p[v];return f}function i(c){var p=c.length;if(0===p)return[];var f=o([c.length+1,c.length+1],1),x=o([c.length+1],1);f[p][p]=0;for(var v=0;v<p;++v){for(var g=0;g<=v;++g)f[g][v]=f[v][g]=2*n(c[v],c[g]);x[v]=n(c[v],c[v])}var y=r(f,x),h=0,m=y[p+1];for(v=0;v<m.length;++v)h+=m[v];var w=new Array(p);for(v=0;v<p;++v){m=y[v];var u=0;for(g=0;g<m.length;++g)u+=m[g];w[v]=u/h}return w}function a(c){if(0===c.length)return[];for(var p=c[0].length,f=o([p]),x=i(c),v=0;v<c.length;++v)for(var g=0;g<p;++g)f[g]+=c[v][g]*x[v];return f}a.barycenetric=i,d.exports=a},1778:function(d,s,t){d.exports=function(r){for(var n=o(r),i=0,a=0;a<r.length;++a)for(var c=r[a],p=0;p<n.length;++p)i+=Math.pow(c[p]-n[p],2);return Math.sqrt(i/r.length)};var o=t(9243)},197:function(d,s,t){"use strict";d.exports=function(S,_,E){var L,z,F,N;if(E){L=_;for(var C=new Array(_.length),P=0;P<_.length;++P){var I=_[P];C[P]=[I[0],I[1],E[P]]}_=C}for(var U=(F=!!E,void 0,w(_,N=y(z=S,[],g(z)),F),!!N);u(S,_,!!E);)U=!0;if(E&&U)for(L.length=0,E.length=0,P=0;P<_.length;++P)L.push([(I=_[P])[0],I[1]]),E.push(I[2]);return U};var o=t(1731),r=t(2569),n=t(4434),i=t(5125),a=t(8846),c=t(7999),p=t(2826),f=t(8551),x=t(5528);function v(S){var _=c(S);return[f(_,-1/0),f(_,1/0)]}function g(S){for(var _=new Array(S.length),E=0;E<S.length;++E){var L=S[E];_[E]=[f(L[0],-1/0),f(L[1],-1/0),f(L[0],1/0),f(L[1],1/0)]}return _}function y(S,_,E){for(var L=_.length,C=new o(L),P=[],I=0;I<_.length;++I){var U=_[I],z=v(U[0]),H=v(U[1]);P.push([f(z[0],-1/0),f(H[0],-1/0),f(z[1],1/0),f(H[1],1/0)])}r(P,function(J,G){C.link(J,G)});var F=!0,N=new Array(L);for(I=0;I<L;++I)(j=C.find(I))!==I&&(F=!1,S[j]=[Math.min(S[I][0],S[j][0]),Math.min(S[I][1],S[j][1])]);if(F)return null;var B=0;for(I=0;I<L;++I){var j;(j=C.find(I))===I?(N[I]=B,S[B++]=S[I]):N[I]=-1}for(S.length=B,I=0;I<L;++I)N[I]<0&&(N[I]=N[C.find(I)]);return N}function h(S,_){return S[0]-_[0]||S[1]-_[1]}function m(S,_){return S[0]-_[0]||S[1]-_[1]||(S[2]<_[2]?-1:S[2]>_[2]?1:0)}function w(S,_,E){if(0!==S.length){if(_)for(var L=0;L<S.length;++L){var C=_[(I=S[L])[0]],P=_[I[1]];I[0]=Math.min(C,P),I[1]=Math.max(C,P)}else for(L=0;L<S.length;++L){var I;C=(I=S[L])[0],P=I[1],I[0]=Math.min(C,P),I[1]=Math.max(C,P)}S.sort(E?m:h);var U=1;for(L=1;L<S.length;++L){var z=S[L-1],H=S[L];(H[0]!==z[0]||H[1]!==z[1]||E&&H[2]!==z[2])&&(S[U++]=H)}S.length=U}}function u(S,_,E){var z,H,N,L=function(z,H){for(var F=new Array(H.length),N=0;N<H.length;++N){var B=H[N],j=z[B[0]],J=z[B[1]];F[N]=[f(Math.min(j[0],J[0]),-1/0),f(Math.min(j[1],J[1]),-1/0),f(Math.max(j[0],J[0]),1/0),f(Math.max(j[1],J[1]),1/0)]}return F}(S,_),C=(z=S,H=_,N=[],r(L,function(B,j){var J=H[B],G=H[j];J[0]!==G[0]&&J[0]!==G[1]&&J[1]!==G[0]&&J[1]!==G[1]&&n(z[J[0]],z[J[1]],z[G[0]],z[G[1]])&&N.push([B,j])}),N),P=function(z,H,F,N){var B=[];return r(F,N,function(j,J){var G=H[j];if(G[0]!==J&&G[1]!==J){var V=z[J];n(z[G[0]],z[G[1]],V,V)&&B.push([j,J])}}),B}(S,_,L,g(S)),I=function(z,H,F,N,B){var j,J,G=z.map(function(Ae){return[i(Ae[0]),i(Ae[1])]});for(j=0;j<F.length;++j){var V=F[j],W=V[1],X=H[J=V[0]],K=H[W],re=x(p(z[X[0]]),p(z[X[1]]),p(z[K[0]]),p(z[K[1]]));if(re){var ee=z.length;z.push([c(re[0]),c(re[1])]),G.push(re),N.push([J,ee],[W,ee])}}for(N.sort(function(Ae,Te){if(Ae[0]!==Te[0])return Ae[0]-Te[0];var Q=G[Ae[1]],se=G[Te[1]];return a(Q[0],se[0])||a(Q[1],se[1])}),j=N.length-1;j>=0;--j){var ie=H[J=(xe=N[j])[0]],oe=ie[0],ce=ie[1],me=z[oe],de=z[ce];if((me[0]-de[0]||me[1]-de[1])<0){var he=oe;oe=ce,ce=he}ie[0]=oe;var ve,Pe=ie[1]=xe[1];for(B&&(ve=ie[2]);j>0&&N[j-1][0]===J;){var xe,ke=(xe=N[--j])[1];H.push(B?[Pe,ke,ve]:[Pe,ke]),Pe=ke}H.push(B?[Pe,ce,ve]:[Pe,ce])}return G}(S,_,C,P,E),U=y(S,I);return w(_,U,E),!!U||C.length>0||P.length>0}},5528:function(d,s,t){"use strict";d.exports=function(x,v,g,y){var h=a(v,x),m=a(y,g),w=f(h,m);if(0===i(w))return null;var u=f(m,a(x,g)),S=r(u,w),_=p(h,S);return c(x,_)};var o=t(3962),r=t(9189),n=t(4354),i=t(4951),a=t(6695),c=t(7584),p=t(4469);function f(x,v){return n(o(x[0],v[1]),o(x[1],v[0]))}},5692:function(d){d.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]}]}},9156:function(d,s,t){"use strict";var o=t(5692),r=t(3578);function n(c){return[c[0]/255,c[1]/255,c[2]/255,c[3]]}function i(c){for(var p,f="#",x=0;x<3;++x)f+=("00"+(p=(p=c[x]).toString(16))).substr(p.length);return f}function a(c){return"rgba("+c.join(",")+")"}d.exports=function(c){var p,f,x,v,g,y,h,m,w,u;if(c||(c={}),m=(c.nshades||72)-1,h=c.format||"hex",(y=c.colormap)||(y="jet"),"string"==typeof y){if(y=y.toLowerCase(),!o[y])throw Error(y+" not a supported colorscale");g=o[y]}else{if(!Array.isArray(y))throw Error("unsupported colormap option",y);g=y.slice()}if(g.length>m+1)throw new Error(y+" map requires nshades to be at least size "+g.length);w=Array.isArray(c.alpha)?2!==c.alpha.length?[1,1]:c.alpha.slice():"number"==typeof c.alpha?[c.alpha,c.alpha]:[1,1],p=g.map(function(C){return Math.round(C.index*m)}),w[0]=Math.min(Math.max(w[0],0),1),w[1]=Math.min(Math.max(w[1],0),1);var S=g.map(function(C,P){var I=g[P].index,U=g[P].rgb.slice();return 4===U.length&&U[3]>=0&&U[3]<=1||(U[3]=w[0]+(w[1]-w[0])*I),U}),_=[];for(u=0;u<p.length-1;++u){v=p[u+1]-p[u],f=S[u],x=S[u+1];for(var E=0;E<v;E++){var L=E/v;_.push([Math.round(r(f[0],x[0],L)),Math.round(r(f[1],x[1],L)),Math.round(r(f[2],x[2],L)),r(f[3],x[3],L)])}}return _.push(g[g.length-1].rgb.concat(w[1])),"hex"===h?_=_.map(i):"rgbaString"===h?_=_.map(a):"float"===h&&(_=_.map(n)),_}},9398:function(d,s,t){"use strict";d.exports=function(p,f,x,v){var g=o(f,x,v);if(0===g){var y=r(o(p,f,x)),h=r(o(p,f,v));if(y===h){if(0===y){var m=c(p,f,x);return m===c(p,f,v)?0:m?1:-1}return 0}return 0===h?y>0||c(p,f,v)?-1:1:0===y?h>0||c(p,f,x)?1:-1:r(h-y)}var w=o(p,f,x);return w>0?g>0&&o(p,f,v)>0?1:-1:w<0?g>0||o(p,f,v)>0?1:-1:o(p,f,v)>0||c(p,f,x)?1:-1};var o=t(417),r=t(7538),n=t(87),i=t(2019),a=t(9662);function c(p,f,x){var v=n(p[0],-f[0]),g=n(p[1],-f[1]),y=n(x[0],-f[0]),h=n(x[1],-f[1]),m=a(i(v,y),i(g,h));return m[m.length-1]>=0}},7538:function(d){"use strict";d.exports=function(s){return s<0?-1:s>0?1:0}},9209:function(d){d.exports=function(o,r){var n=o.length,i=o.length-r.length;if(i)return i;switch(n){case 0:return 0;case 1:return o[0]-r[0];case 2:return o[0]+o[1]-r[0]-r[1]||s(o[0],o[1])-s(r[0],r[1]);case 3:var a=o[0]+o[1],c=r[0]+r[1];if(i=a+o[2]-(c+r[2]))return i;var p=s(o[0],o[1]),f=s(r[0],r[1]);return s(p,o[2])-s(f,r[2])||s(p+o[2],a)-s(f+r[2],c);case 4:var x=o[0],v=o[1],g=o[2],y=o[3],h=r[0],m=r[1],w=r[2],u=r[3];return x+v+g+y-(h+m+w+u)||s(x,v,g,y)-s(h,m,w,u,h)||s(x+v,x+g,x+y,v+g,v+y,g+y)-s(h+m,h+w,h+u,m+w,m+u,w+u)||s(x+v+g,x+v+y,x+g+y,v+g+y)-s(h+m+w,h+m+u,h+w+u,m+w+u);default:for(var S=o.slice().sort(t),_=r.slice().sort(t),E=0;E<n;++E)if(i=S[E]-_[E])return i;return 0}};var s=Math.min;function t(o,r){return o-r}},1284:function(d,s,t){"use strict";var o=t(9209),r=t(9887);d.exports=function(n,i){return o(n,i)||r(n)-r(i)}},5537:function(d,s,t){"use strict";var o=t(8950),r=t(8722),n=t(3332);d.exports=function(i){var a=i.length;if(0===a)return[];if(1===a)return[[0]];var c=i[0].length;return 0===c?[]:1===c?o(i):2===c?r(i):n(i,c)}},8950:function(d){"use strict";d.exports=function(s){for(var t=0,o=0,r=1;r<s.length;++r)s[r][0]<s[t][0]&&(t=r),s[r][0]>s[o][0]&&(o=r);return t<o?[[t],[o]]:t>o?[[o],[t]]:[[t]]}},8722:function(d,s,t){"use strict";d.exports=function(r){var n=o(r),i=n.length;if(i<=2)return[];for(var a=new Array(i),c=n[i-1],p=0;p<i;++p){var f=n[p];a[p]=[c,f],c=f}return a};var o=t(3266)},3332:function(d,s,t){"use strict";d.exports=function(n,i){try{return o(n,!0)}catch{var a=r(n);if(a.length<=i)return[];var c=function(f,x){for(var v=f.length,g=new Array(v),y=0;y<x.length;++y)g[y]=f[x[y]];var h=x.length;for(y=0;y<v;++y)x.indexOf(y)<0&&(g[h++]=f[y]);return g}(n,a);return function(f,x){for(var v=f.length,g=x.length,y=0;y<v;++y)for(var h=f[y],m=0;m<h.length;++m){var w=h[m];if(w<g)h[m]=x[w];else{w-=g;for(var u=0;u<g;++u)w>=x[u]&&(w+=1);h[m]=w}}return f}(o(c,!0),a)}};var o=t(2183),r=t(2153)},9680:function(d){"use strict";d.exports=function(s,t,o,r,n,i){var a=n-1,c=n*n,p=a*a,f=(1+2*n)*p,x=n*p,v=c*(3-2*n),g=c*a;if(s.length){i||(i=new Array(s.length));for(var y=s.length-1;y>=0;--y)i[y]=f*s[y]+x*t[y]+v*o[y]+g*r[y];return i}return f*s+x*t+v*o+g*r},d.exports.derivative=function(s,t,o,r,n,i){var a=6*n*n-6*n,c=3*n*n-4*n+1,p=-6*n*n+6*n,f=3*n*n-2*n;if(s.length){i||(i=new Array(s.length));for(var x=s.length-1;x>=0;--x)i[x]=a*s[x]+c*t[x]+p*o[x]+f*r[x];return i}return a*s+c*t+p*o[x]+f*r}},4419:function(d,s,t){"use strict";var o=t(2183),r=t(1215);function n(a,c){this.point=a,this.index=c}function i(a,c){for(var p=a.point,f=c.point,x=p.length,v=0;v<x;++v){var g=f[v]-p[v];if(g)return g}return 0}d.exports=function(a,c){var p=a.length;if(0===p)return[];var f=a[0].length;if(f<1)return[];if(1===f)return function(I,U,z){if(1===I)return z?[[-1,0]]:[];var H=U.map(function(J,G){return[J[0],G]});H.sort(function(J,G){return J[0]-G[0]});for(var F=new Array(I-1),N=1;N<I;++N)F[N-1]=[H[N-1][1],H[N][1]];return z&&F.push([-1,F[0][1]],[F[I-1][1],-1]),F}(p,a,c);for(var x=new Array(p),v=1,g=0;g<p;++g){for(var y=a[g],h=new Array(f+1),m=0,w=0;w<f;++w){var u=y[w];h[w]=u,m+=u*u}h[f]=m,x[g]=new n(h,g),v=Math.max(m,v)}r(x,i),p=x.length;var S=new Array(p+f+1),_=new Array(p+f+1),E=(f+1)*(f+1)*v,L=new Array(f+1);for(g=0;g<=f;++g)L[g]=0;for(L[f]=E,S[0]=L.slice(),_[0]=-1,g=0;g<=f;++g)(h=L.slice())[g]=1,S[g+1]=h,_[g+1]=-1;for(g=0;g<p;++g){var C=x[g];S[g+f+1]=C.point,_[g+f+1]=C.index}var P=o(S,!1);if(P=P.filter(c?function(I){for(var U=0,z=0;z<=f;++z){var H=_[I[z]];if(H<0&&++U>=2)return!1;I[z]=H}return!0}:function(I){for(var U=0;U<=f;++U){var z=_[I[U]];if(z<0)return!1;I[U]=z}return!0}),1&f)for(g=0;g<P.length;++g)h=(C=P[g])[0],C[0]=C[1],C[1]=h;return P}},8362:function(d){var s=!1;if(typeof Float64Array<"u"){var t=new Float64Array(1),o=new Uint32Array(t.buffer);t[0]=1,s=!0,1072693248===o[1]?(d.exports=function(n){return t[0]=n,[o[0],o[1]]},d.exports.pack=function(n,i){return o[0]=n,o[1]=i,t[0]},d.exports.lo=function(n){return t[0]=n,o[0]},d.exports.hi=function(n){return t[0]=n,o[1]}):1072693248===o[0]?(d.exports=function(n){return t[0]=n,[o[1],o[0]]},d.exports.pack=function(n,i){return o[1]=n,o[0]=i,t[0]},d.exports.lo=function(n){return t[0]=n,o[1]},d.exports.hi=function(n){return t[0]=n,o[0]}):s=!1}if(!s){var r=new Buffer(8);d.exports=function(n){return r.writeDoubleLE(n,0,!0),[r.readUInt32LE(0,!0),r.readUInt32LE(4,!0)]},d.exports.pack=function(n,i){return r.writeUInt32LE(n,0,!0),r.writeUInt32LE(i,4,!0),r.readDoubleLE(0,!0)},d.exports.lo=function(n){return r.writeDoubleLE(n,0,!0),r.readUInt32LE(0,!0)},d.exports.hi=function(n){return r.writeDoubleLE(n,0,!0),r.readUInt32LE(4,!0)}}d.exports.sign=function(n){return d.exports.hi(n)>>>31},d.exports.exponent=function(n){return(d.exports.hi(n)<<1>>>21)-1023},d.exports.fraction=function(n){var i=d.exports.lo(n),a=d.exports.hi(n),c=1048575&a;return 2146435072&a&&(c+=1048576),[i,c]},d.exports.denormalized=function(n){return!(2146435072&d.exports.hi(n))}},3094:function(d){"use strict";function s(t,o,r){var n=0|t[r];if(n<=0)return[];var i,a=new Array(n);if(r===t.length-1)for(i=0;i<n;++i)a[i]=o;else for(i=0;i<n;++i)a[i]=s(t,o,r+1);return a}d.exports=function(t,o){switch(void 0===o&&(o=0),typeof t){case"number":if(t>0)return function(r,n){var i,a;for(i=new Array(r),a=0;a<r;++a)i[a]=n;return i}(0|t,o);break;case"object":if("number"==typeof t.length)return s(t,o,0)}return[]}},8348:function(d,s,t){"use strict";d.exports=function(r,n){var i=r.length;if("number"!=typeof n){n=0;for(var a=0;a<i;++a){var c=r[a];n=Math.max(n,c[0],c[1])}n=1+(0|n)}n|=0;var p=new Array(n);for(a=0;a<n;++a)p[a]=[];for(a=0;a<i;++a)p[(c=r[a])[0]].push(c[1]),p[c[1]].push(c[0]);for(var f=0;f<n;++f)o(p[f],function(x,v){return x-v});return p};var o=t(1215)},5795:function(d){"use strict";d.exports=function(s,t,o){var r=t||0,n=o||1;return[[s[12]+s[0],s[13]+s[1],s[14]+s[2],s[15]+s[3]],[s[12]-s[0],s[13]-s[1],s[14]-s[2],s[15]-s[3]],[s[12]+s[4],s[13]+s[5],s[14]+s[6],s[15]+s[7]],[s[12]-s[4],s[13]-s[5],s[14]-s[6],s[15]-s[7]],[r*s[12]+s[8],r*s[13]+s[9],r*s[14]+s[10],r*s[15]+s[11]],[n*s[12]-s[8],n*s[13]-s[9],n*s[14]-s[10],n*s[15]-s[11]]]}},8444:function(d,s,t){"use strict";d.exports=function(p,f,x){switch(arguments.length){case 0:return new i([0],[0],0);case 1:return"number"==typeof p?new i(v=c(p),v,0):new i(p,c(p.length),0);case 2:if("number"==typeof f){var v=c(p.length);return new i(p,v,+f)}x=0;case 3:if(p.length!==f.length)throw new Error("state and velocity lengths must match");return new i(p,f,x)}};var o=t(9680),r=t(5070);function n(p,f,x){return Math.min(f,Math.max(p,x))}function i(p,f,x){this.dimension=p.length,this.bounds=[new Array(this.dimension),new Array(this.dimension)];for(var v=0;v<this.dimension;++v)this.bounds[0][v]=-1/0,this.bounds[1][v]=1/0;this._state=p.slice().reverse(),this._velocity=f.slice().reverse(),this._time=[x],this._scratch=[p.slice(),p.slice(),p.slice(),p.slice(),p.slice()]}var a=i.prototype;function c(p){for(var f=new Array(p),x=0;x<p;++x)f[x]=0;return f}a.flush=function(p){var f=r.gt(this._time,p)-1;f<=0||(this._time.splice(0,f),this._state.splice(0,f*this.dimension),this._velocity.splice(0,f*this.dimension))},a.curve=function(p){var f=this._time,x=f.length,v=r.le(f,p),g=this._scratch[0],y=this._state,h=this._velocity,m=this.dimension,w=this.bounds;if(v<0)for(var u=m-1,S=0;S<m;++S,--u)g[S]=y[u];else if(v>=x-1){u=y.length-1;var _=p-f[x-1];for(S=0;S<m;++S,--u)g[S]=y[u]+_*h[u]}else{u=m*(v+1)-1;var E=f[v],L=f[v+1]-E||1,C=this._scratch[1],P=this._scratch[2],I=this._scratch[3],U=this._scratch[4],z=!0;for(S=0;S<m;++S,--u)C[S]=y[u],I[S]=h[u]*L,P[S]=y[u+m],U[S]=h[u+m]*L,z=z&&C[S]===P[S]&&I[S]===U[S]&&0===I[S];if(z)for(S=0;S<m;++S)g[S]=C[S];else o(C,I,P,U,(p-E)/L,g)}var H=w[0],F=w[1];for(S=0;S<m;++S)g[S]=n(H[S],F[S],g[S]);return g},a.dcurve=function(p){var f=this._time,x=f.length,v=r.le(f,p),g=this._scratch[0],y=this._state,h=this._velocity,m=this.dimension;if(v>=x-1)for(var w=y.length-1,u=0;u<m;++u,--w)g[u]=h[w];else{w=m*(v+1)-1;var S=f[v],_=f[v+1]-S||1,E=this._scratch[1],L=this._scratch[2],C=this._scratch[3],P=this._scratch[4],I=!0;for(u=0;u<m;++u,--w)E[u]=y[w],C[u]=h[w]*_,L[u]=y[w+m],P[u]=h[w+m]*_,I=I&&E[u]===L[u]&&C[u]===P[u]&&0===C[u];if(I)for(u=0;u<m;++u)g[u]=0;else for(o.derivative(E,C,L,P,(p-S)/_,g),u=0;u<m;++u)g[u]/=_}return g},a.lastT=function(){var p=this._time;return p[p.length-1]},a.stable=function(){for(var p=this._velocity,f=p.length,x=this.dimension-1;x>=0;--x)if(p[--f])return!1;return!0},a.jump=function(p){var f=this.lastT(),x=this.dimension;if(!(p<f||arguments.length!==x+1)){var v=this._state,g=this._velocity,y=v.length-this.dimension,h=this.bounds,m=h[0],w=h[1];this._time.push(f,p);for(var u=0;u<2;++u)for(var S=0;S<x;++S)v.push(v[y++]),g.push(0);for(this._time.push(p),S=x;S>0;--S)v.push(n(m[S-1],w[S-1],arguments[S])),g.push(0)}},a.push=function(p){var f=this.lastT(),x=this.dimension;if(!(p<f||arguments.length!==x+1)){var v=this._state,g=this._velocity,y=v.length-this.dimension,h=p-f,m=this.bounds,w=m[0],u=m[1],S=h>1e-6?1/h:0;this._time.push(p);for(var _=x;_>0;--_){var E=n(w[_-1],u[_-1],arguments[_]);v.push(E),g.push((E-v[y++])*S)}}},a.set=function(p){var f=this.dimension;if(!(p<this.lastT()||arguments.length!==f+1)){var x=this._state,v=this._velocity,g=this.bounds,y=g[0],h=g[1];this._time.push(p);for(var m=f;m>0;--m)x.push(n(y[m-1],h[m-1],arguments[m])),v.push(0)}},a.move=function(p){var f=this.lastT(),x=this.dimension;if(!(p<=f||arguments.length!==x+1)){var v=this._state,g=this._velocity,y=v.length-this.dimension,h=this.bounds,m=h[0],w=h[1],u=p-f,S=u>1e-6?1/u:0;this._time.push(p);for(var _=x;_>0;--_){var E=arguments[_];v.push(n(m[_-1],w[_-1],v[y++]+E)),g.push(E*S)}}},a.idle=function(p){var f=this.lastT();if(!(p<f)){var x=this.dimension,v=this._state,g=this._velocity,y=v.length-x,h=this.bounds,m=h[0],w=h[1],u=p-f;this._time.push(p);for(var S=x-1;S>=0;--S)v.push(n(m[S],w[S],v[y]+u*g[y])),g.push(0),y+=1}}},7080:function(d){"use strict";function s(y,h,m,w,u,S){this._color=y,this.key=h,this.value=m,this.left=w,this.right=u,this._count=S}function t(y){return new s(y._color,y.key,y.value,y.left,y.right,y._count)}function o(y,h){return new s(y,h.key,h.value,h.left,h.right,h._count)}function r(y){y._count=1+(y.left?y.left._count:0)+(y.right?y.right._count:0)}function n(y,h){this._compare=y,this.root=h}d.exports=function(y){return new n(y||g,null)};var i=n.prototype;function a(y,h){var m;return h.left&&(m=a(y,h.left))?m:(m=y(h.key,h.value))||(h.right?a(y,h.right):void 0)}function c(y,h,m,w){var u;return h(y,w.key)<=0&&(w.left&&(u=c(y,h,m,w.left))||(u=m(w.key,w.value)))?u:w.right?c(y,h,m,w.right):void 0}function p(y,h,m,w,u){var S,_=m(y,u.key),E=m(h,u.key);return _<=0&&(u.left&&(S=p(y,h,m,w,u.left))||E>0&&(S=w(u.key,u.value)))?S:E>0&&u.right?p(y,h,m,w,u.right):void 0}function f(y,h){this.tree=y,this._stack=h}Object.defineProperty(i,"keys",{get:function(){var y=[];return this.forEach(function(h,m){y.push(h)}),y}}),Object.defineProperty(i,"values",{get:function(){var y=[];return this.forEach(function(h,m){y.push(m)}),y}}),Object.defineProperty(i,"length",{get:function(){return this.root?this.root._count:0}}),i.insert=function(y,h){for(var m=this._compare,w=this.root,u=[],S=[];w;){var _=m(y,w.key);u.push(w),S.push(_),w=_<=0?w.left:w.right}u.push(new s(0,y,h,null,null,1));for(var E=u.length-2;E>=0;--E)w=u[E],u[E]=S[E]<=0?new s(w._color,w.key,w.value,u[E+1],w.right,w._count+1):new s(w._color,w.key,w.value,w.left,u[E+1],w._count+1);for(E=u.length-1;E>1;--E){var L=u[E-1];if(w=u[E],1===L._color||1===w._color)break;var C=u[E-2];if(C.left===L)if(L.left===w){if(!(P=C.right)||0!==P._color){C._color=0,C.left=L.right,L._color=1,L.right=C,u[E-2]=L,u[E-1]=w,r(C),r(L),E>=3&&((I=u[E-3]).left===C?I.left=L:I.right=L);break}L._color=1,C.right=o(1,P),C._color=0,E-=1}else{if(!(P=C.right)||0!==P._color){L.right=w.left,C._color=0,C.left=w.right,w._color=1,w.left=L,w.right=C,u[E-2]=w,u[E-1]=L,r(C),r(L),r(w),E>=3&&((I=u[E-3]).left===C?I.left=w:I.right=w);break}L._color=1,C.right=o(1,P),C._color=0,E-=1}else if(L.right===w){if(!(P=C.left)||0!==P._color){C._color=0,C.right=L.left,L._color=1,L.left=C,u[E-2]=L,u[E-1]=w,r(C),r(L),E>=3&&((I=u[E-3]).right===C?I.right=L:I.left=L);break}L._color=1,C.left=o(1,P),C._color=0,E-=1}else{var P;if(!(P=C.left)||0!==P._color){var I;L.left=w.right,C._color=0,C.right=w.left,w._color=1,w.right=L,w.left=C,u[E-2]=w,u[E-1]=L,r(C),r(L),r(w),E>=3&&((I=u[E-3]).right===C?I.right=w:I.left=w);break}L._color=1,C.left=o(1,P),C._color=0,E-=1}}return u[0]._color=1,new n(m,u[0])},i.forEach=function(y,h,m){if(this.root)switch(arguments.length){case 1:return a(y,this.root);case 2:return c(h,this._compare,y,this.root);case 3:return this._compare(h,m)>=0?void 0:p(h,m,this._compare,y,this.root)}},Object.defineProperty(i,"begin",{get:function(){for(var y=[],h=this.root;h;)y.push(h),h=h.left;return new f(this,y)}}),Object.defineProperty(i,"end",{get:function(){for(var y=[],h=this.root;h;)y.push(h),h=h.right;return new f(this,y)}}),i.at=function(y){if(y<0)return new f(this,[]);for(var h=this.root,m=[];;){if(m.push(h),h.left){if(y<h.left._count){h=h.left;continue}y-=h.left._count}if(!y)return new f(this,m);if(y-=1,!h.right||y>=h.right._count)break;h=h.right}return new f(this,[])},i.ge=function(y){for(var h=this._compare,m=this.root,w=[],u=0;m;){var S=h(y,m.key);w.push(m),S<=0&&(u=w.length),m=S<=0?m.left:m.right}return w.length=u,new f(this,w)},i.gt=function(y){for(var h=this._compare,m=this.root,w=[],u=0;m;){var S=h(y,m.key);w.push(m),S<0&&(u=w.length),m=S<0?m.left:m.right}return w.length=u,new f(this,w)},i.lt=function(y){for(var h=this._compare,m=this.root,w=[],u=0;m;){var S=h(y,m.key);w.push(m),S>0&&(u=w.length),m=S<=0?m.left:m.right}return w.length=u,new f(this,w)},i.le=function(y){for(var h=this._compare,m=this.root,w=[],u=0;m;){var S=h(y,m.key);w.push(m),S>=0&&(u=w.length),m=S<0?m.left:m.right}return w.length=u,new f(this,w)},i.find=function(y){for(var h=this._compare,m=this.root,w=[];m;){var u=h(y,m.key);if(w.push(m),0===u)return new f(this,w);m=u<=0?m.left:m.right}return new f(this,[])},i.remove=function(y){var h=this.find(y);return h?h.remove():this},i.get=function(y){for(var h=this._compare,m=this.root;m;){var w=h(y,m.key);if(0===w)return m.value;m=w<=0?m.left:m.right}};var x=f.prototype;function v(y,h){y.key=h.key,y.value=h.value,y.left=h.left,y.right=h.right,y._color=h._color,y._count=h._count}function g(y,h){return y<h?-1:y>h?1:0}Object.defineProperty(x,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(x,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),x.clone=function(){return new f(this.tree,this._stack.slice())},x.remove=function(){var y=this._stack;if(0===y.length)return this.tree;var h=new Array(y.length),m=y[y.length-1];h[h.length-1]=new s(m._color,m.key,m.value,m.left,m.right,m._count);for(var w=y.length-2;w>=0;--w)h[w]=(m=y[w]).left===y[w+1]?new s(m._color,m.key,m.value,h[w+1],m.right,m._count):new s(m._color,m.key,m.value,m.left,h[w+1],m._count);if((m=h[h.length-1]).left&&m.right){var u=h.length;for(m=m.left;m.right;)h.push(m),m=m.right;var S=h[u-1];for(h.push(new s(m._color,S.key,S.value,m.left,m.right,m._count)),h[u-1].key=m.key,h[u-1].value=m.value,w=h.length-2;w>=u;--w)h[w]=new s((m=h[w])._color,m.key,m.value,m.left,h[w+1],m._count);h[u-1].left=h[u]}if(0===(m=h[h.length-1])._color){var _=h[h.length-2];for(_.left===m?_.left=null:_.right===m&&(_.right=null),h.pop(),w=0;w<h.length;++w)h[w]._count--;return new n(this.tree._compare,h[0])}if(m.left||m.right){for(m.left?v(m,m.left):m.right&&v(m,m.right),m._color=1,w=0;w<h.length-1;++w)h[w]._count--;return new n(this.tree._compare,h[0])}if(1===h.length)return new n(this.tree._compare,null);for(w=0;w<h.length;++w)h[w]._count--;var E=h[h.length-2];return function(L){for(var C,P,I,U,z=L.length-1;z>=0;--z){if(C=L[z],0===z)return void(C._color=1);if((P=L[z-1]).left===C){if((I=P.right).right&&0===I.right._color)return U=(I=P.right=t(I)).right=t(I.right),P.right=I.left,I.left=P,I.right=U,I._color=P._color,C._color=1,P._color=1,U._color=1,r(P),r(I),z>1&&((H=L[z-2]).left===P?H.left=I:H.right=I),void(L[z-1]=I);if(I.left&&0===I.left._color)return U=(I=P.right=t(I)).left=t(I.left),P.right=U.left,I.left=U.right,U.left=P,U.right=I,U._color=P._color,P._color=1,I._color=1,C._color=1,r(P),r(I),r(U),z>1&&((H=L[z-2]).left===P?H.left=U:H.right=U),void(L[z-1]=U);if(1===I._color){if(0===P._color)return P._color=1,void(P.right=o(0,I));P.right=o(0,I);continue}I=t(I),P.right=I.left,I.left=P,I._color=P._color,P._color=0,r(P),r(I),z>1&&((H=L[z-2]).left===P?H.left=I:H.right=I),L[z-1]=I,L[z]=P,z+1<L.length?L[z+1]=C:L.push(C),z+=2}else{if((I=P.left).left&&0===I.left._color)return U=(I=P.left=t(I)).left=t(I.left),P.left=I.right,I.right=P,I.left=U,I._color=P._color,C._color=1,P._color=1,U._color=1,r(P),r(I),z>1&&((H=L[z-2]).right===P?H.right=I:H.left=I),void(L[z-1]=I);if(I.right&&0===I.right._color)return U=(I=P.left=t(I)).right=t(I.right),P.left=U.right,I.right=U.left,U.right=P,U.left=I,U._color=P._color,P._color=1,I._color=1,C._color=1,r(P),r(I),r(U),z>1&&((H=L[z-2]).right===P?H.right=U:H.left=U),void(L[z-1]=U);if(1===I._color){if(0===P._color)return P._color=1,void(P.left=o(0,I));P.left=o(0,I);continue}var H;I=t(I),P.left=I.right,I.right=P,I._color=P._color,P._color=0,r(P),r(I),z>1&&((H=L[z-2]).right===P?H.right=I:H.left=I),L[z-1]=I,L[z]=P,z+1<L.length?L[z+1]=C:L.push(C),z+=2}}}(h),E.left===m?E.left=null:E.right=null,new n(this.tree._compare,h[0])},Object.defineProperty(x,"key",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(x,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(x,"index",{get:function(){var y=0,h=this._stack;if(0===h.length){var m=this.tree.root;return m?m._count:0}h[h.length-1].left&&(y=h[h.length-1].left._count);for(var w=h.length-2;w>=0;--w)h[w+1]===h[w].right&&(++y,h[w].left&&(y+=h[w].left._count));return y},enumerable:!0}),x.next=function(){var y=this._stack;if(0!==y.length){var h=y[y.length-1];if(h.right)for(h=h.right;h;)y.push(h),h=h.left;else for(y.pop();y.length>0&&y[y.length-1].right===h;)h=y[y.length-1],y.pop()}},Object.defineProperty(x,"hasNext",{get:function(){var y=this._stack;if(0===y.length)return!1;if(y[y.length-1].right)return!0;for(var h=y.length-1;h>0;--h)if(y[h-1].left===y[h])return!0;return!1}}),x.update=function(y){var h=this._stack;if(0===h.length)throw new Error("Can't update empty node!");var m=new Array(h.length),w=h[h.length-1];m[m.length-1]=new s(w._color,w.key,y,w.left,w.right,w._count);for(var u=h.length-2;u>=0;--u)m[u]=(w=h[u]).left===h[u+1]?new s(w._color,w.key,w.value,m[u+1],w.right,w._count):new s(w._color,w.key,w.value,w.left,m[u+1],w._count);return new n(this.tree._compare,m[0])},x.prev=function(){var y=this._stack;if(0!==y.length){var h=y[y.length-1];if(h.left)for(h=h.left;h;)y.push(h),h=h.right;else for(y.pop();y.length>0&&y[y.length-1].left===h;)h=y[y.length-1],y.pop()}},Object.defineProperty(x,"hasPrev",{get:function(){var y=this._stack;if(0===y.length)return!1;if(y[y.length-1].left)return!0;for(var h=y.length-1;h>0;--h)if(y[h-1].right===y[h])return!0;return!1}})},7453:function(d,s,t){"use strict";d.exports=function(_,E){var L=new f(_);return L.update(E),L};var o=t(9557),r=t(1681),n=t(1011),i=t(2864),a=t(8468),c=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function p(_,E){return _[0]=E[0],_[1]=E[1],_[2]=E[2],_}function f(_){this.gl=_,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=n(_)}var x=f.prototype;function v(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}x.update=function(_){function E(J,G,V){if(V in _){var W,X=_[V],K=this[V];this[V]=W=(J?Array.isArray(X)&&Array.isArray(X[0]):Array.isArray(X))?[G(X[0]),G(X[1]),G(X[2])]:[G(X),G(X),G(X)];for(var re=0;re<3;++re)if(W[re]!==K[re])return!0}return!1}_=_||{};var L,C=E.bind(this,!1,Number),P=E.bind(this,!1,Boolean),I=E.bind(this,!1,String),U=E.bind(this,!0,function(J){if(Array.isArray(J)){if(3===J.length)return[+J[0],+J[1],+J[2],1];if(4===J.length)return[+J[0],+J[1],+J[2],+J[3]]}return[0,0,0,1]}),z=!1,H=!1;if("bounds"in _)for(var F=_.bounds,N=0;N<2;++N)for(var B=0;B<3;++B)F[N][B]!==this.bounds[N][B]&&(H=!0),this.bounds[N][B]=F[N][B];if("ticks"in _)for(L=_.ticks,z=!0,this.autoTicks=!1,N=0;N<3;++N)this.tickSpacing[N]=0;else C("tickSpacing")&&(this.autoTicks=!0,H=!0);if(this._firstInit&&("ticks"in _||"tickSpacing"in _||(this.autoTicks=!0),H=!0,z=!0,this._firstInit=!1),H&&this.autoTicks&&(L=a.create(this.bounds,this.tickSpacing),z=!0),z){for(N=0;N<3;++N)L[N].sort(function(J,G){return J.x-G.x});a.equal(L,this.ticks)?z=!1:this.ticks=L}P("tickEnable"),I("tickFont")&&(z=!0),C("tickSize"),C("tickAngle"),C("tickPad"),U("tickColor");var j=I("labels");I("labelFont")&&(j=!0),P("labelEnable"),C("labelSize"),C("labelPad"),U("labelColor"),P("lineEnable"),P("lineMirror"),C("lineWidth"),U("lineColor"),P("lineTickEnable"),P("lineTickMirror"),C("lineTickLength"),C("lineTickWidth"),U("lineTickColor"),P("gridEnable"),C("gridWidth"),U("gridColor"),P("zeroEnable"),U("zeroLineColor"),C("zeroLineWidth"),P("backgroundEnable"),U("backgroundColor"),this._text?this._text&&(j||z)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=o(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&z&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=r(this.gl,this.bounds,this.ticks))};var g=[new v,new v,new v];function y(_,E,L,C,P){for(var I=_.primalOffset,U=_.primalMinor,z=_.mirrorOffset,H=_.mirrorMinor,F=C[E],N=0;N<3;++N)if(E!==N){var B=I,j=z,J=U,G=H;F&1<<N&&(B=z,j=I,J=H,G=U),B[N]=L[0][N],j[N]=L[1][N],P[N]>0?(J[N]=-1,G[N]=0):(J[N]=0,G[N]=1)}}var h=[0,0,0],m={model:c,view:c,projection:c,_ortho:!1};x.isOpaque=function(){return!0},x.isTransparent=function(){return!1},x.drawTransparent=function(_){};var w=[0,0,0],u=[0,0,0],S=[0,0,0];x.draw=function(_){for(var E=this.gl,L=(_=_||m).model||c,C=_.view||c,P=_.projection||c,I=this.bounds,U=_._ortho||!1,z=i(L,C,P,I,U),H=z.cubeEdges,F=z.axis,G=(U?2:1)*this.pixelRatio*(P[3]*C[12]+P[7]*C[13]+P[11]*C[14]+P[15]*C[15])/E.drawingBufferHeight,V=0;V<3;++V)this.lastCubeProps.cubeEdges[V]=H[V],this.lastCubeProps.axis[V]=F[V];var W=g;for(V=0;V<3;++V)y(g[V],V,this.bounds,H,F);E=this.gl;var X,K,re,fe,ye,Me,Ie,Ce,Re,le,ge,_e,ee=h;for(V=0;V<3;++V)ee[V]=this.backgroundEnable[V]?F[V]:0;for(this._background.draw(L,C,P,I,ee,this.backgroundColor),this._lines.bind(L,C,P,this),V=0;V<3;++V){var ie=[0,0,0];ie[V]=F[V]>0?I[1][V]:I[0][V];for(var oe=0;oe<2;++oe){var ce=(V+1+oe)%3,me=(V+1+(1^oe))%3;this.gridEnable[ce]&&this._lines.drawGrid(ce,me,this.bounds,ie,this.gridColor[ce],this.gridWidth[ce]*this.pixelRatio)}for(oe=0;oe<2;++oe)ce=(V+1+oe)%3,this.zeroEnable[me=(V+1+(1^oe))%3]&&Math.min(I[0][me],I[1][me])<=0&&Math.max(I[0][me],I[1][me])>=0&&this._lines.drawZero(ce,me,this.bounds,ie,this.zeroLineColor[me],this.zeroLineWidth[me]*this.pixelRatio)}for(V=0;V<3;++V){this.lineEnable[V]&&this._lines.drawAxisLine(V,this.bounds,W[V].primalOffset,this.lineColor[V],this.lineWidth[V]*this.pixelRatio),this.lineMirror[V]&&this._lines.drawAxisLine(V,this.bounds,W[V].mirrorOffset,this.lineColor[V],this.lineWidth[V]*this.pixelRatio);var de=p(w,W[V].primalMinor),he=p(u,W[V].mirrorMinor),ve=this.lineTickLength;for(oe=0;oe<3;++oe){var Pe=G/L[5*oe];de[oe]*=ve[oe]*Pe,he[oe]*=ve[oe]*Pe}this.lineTickEnable[V]&&this._lines.drawAxisTicks(V,W[V].primalOffset,de,this.lineTickColor[V],this.lineTickWidth[V]*this.pixelRatio),this.lineTickMirror[V]&&this._lines.drawAxisTicks(V,W[V].mirrorOffset,he,this.lineTickColor[V],this.lineTickWidth[V]*this.pixelRatio)}function xe(fe){(re=[0,0,0])[fe]=1}for(this._lines.unbind(),this._text.bind(L,C,P,this.pixelRatio),V=0;V<3;++V){var Ae=W[V].primalMinor,Te=W[V].mirrorMinor,Q=p(S,W[V].primalOffset);for(oe=0;oe<3;++oe)this.lineTickEnable[V]&&(Q[oe]+=G*Ae[oe]*Math.max(this.lineTickLength[oe],0)/L[5*oe]);var se=[0,0,0];if(se[V]=1,this.tickEnable[V]){for(-3600===this.tickAngle[V]?(this.tickAngle[V]=0,this.tickAlign[V]="auto"):this.tickAlign[V]=-1,X[0]="auto"===(X=[this.tickAlign[V],.5,K=1])[0]?0:parseInt(""+X[0]),re=[0,0,0],void 0,void 0,void 0,void 0,void 0,void 0,le=(ye=Ae)[Ce=((fe=V)+2)%3],ge=(Me=Te)[Ie=(fe+1)%3],_e=Me[Ce],(Re=ye[Ie])>0&&_e>0||Re>0&&_e<0||Re<0&&_e>0||Re<0&&_e<0?xe(Ie):(le>0&&ge>0||le>0&&ge<0||le<0&&ge>0||le<0&&ge<0)&&xe(Ce),oe=0;oe<3;++oe)Q[oe]+=G*Ae[oe]*this.tickPad[oe]/L[5*oe];this._text.drawTicks(V,this.tickSize[V],this.tickAngle[V],Q,this.tickColor[V],se,re,X)}if(this.labelEnable[V]){for(K=0,re=[0,0,0],this.labels[V].length>4&&(xe(V),K=1),X[0]="auto"===(X=[this.labelAlign[V],.5,K])[0]?0:parseInt(""+X[0]),oe=0;oe<3;++oe)Q[oe]+=G*Ae[oe]*this.labelPad[oe]/L[5*oe];Q[V]+=.5*(I[0][V]+I[1][V]),this._text.drawLabel(V,this.labelSize[V],this.labelAngle[V],Q,this.labelColor[V],[0,0,0],re,X)}}this._text.unbind()},x.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null}},1011:function(d,s,t){"use strict";d.exports=function(c){for(var p=[],f=[],x=0,v=0;v<3;++v)for(var g=(v+1)%3,y=(v+2)%3,h=[0,0,0],m=[0,0,0],w=-1;w<=1;w+=2){f.push(x,x+2,x+1,x+1,x+2,x+3),h[v]=w,m[v]=w;for(var u=-1;u<=1;u+=2){h[g]=u;for(var S=-1;S<=1;S+=2)h[y]=S,p.push(h[0],h[1],h[2],m[0],m[1],m[2]),x+=1}var _=g;g=y,y=_}var E=o(c,new Float32Array(p)),L=o(c,new Uint16Array(f),c.ELEMENT_ARRAY_BUFFER),C=r(c,[{buffer:E,type:c.FLOAT,size:3,offset:0,stride:24},{buffer:E,type:c.FLOAT,size:3,offset:12,stride:24}],L),P=n(c);return P.attributes.position.location=0,P.attributes.normal.location=1,new i(c,E,C,P)};var o=t(5827),r=t(2944),n=t(1943).bg;function i(c,p,f,x){this.gl=c,this.buffer=p,this.vao=f,this.shader=x}var a=i.prototype;a.draw=function(c,p,f,x,v,g){for(var y=!1,h=0;h<3;++h)y=y||v[h];if(y){var m=this.gl;m.enable(m.POLYGON_OFFSET_FILL),m.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:c,view:p,projection:f,bounds:x,enable:v,colors:g},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),m.disable(m.POLYGON_OFFSET_FILL)}},a.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},2864:function(d,s,t){"use strict";d.exports=function(u,S,_,E,L){r(a,S,u),r(a,_,a);for(var C=0,P=0;P<2;++P){f[2]=E[P][2];for(var I=0;I<2;++I){f[1]=E[I][1];for(var U=0;U<2;++U)f[0]=E[U][0],v(c[C],f,a),C+=1}}var z=-1;for(P=0;P<8;++P){for(var H=c[P][3],F=0;F<3;++F)p[P][F]=c[P][F]/H;L&&(p[P][2]*=-1),H<0&&(z<0||p[P][2]<p[z][2])&&(z=P)}if(z<0){z=0;for(var N=0;N<3;++N){for(var B=(N+2)%3,j=(N+1)%3,J=-1,G=-1,V=0;V<2;++V){var W=(K=V<<N)+(V<<B)+(1-V<<j),X=K+(1-V<<B)+(V<<j);i(p[K],p[W],p[X],x)<0||(V?J=1:G=1)}if(J<0||G<0)G>J&&(z|=1<<N);else{for(V=0;V<2;++V){W=(K=V<<N)+(V<<B)+(1-V<<j);var K,re=y([c[K],c[W],c[X=K+(1-V<<B)+(V<<j)],c[K+(1<<B)+(1<<j)]]);V?J=re:G=re}G>J&&(z|=1<<N)}}}var ee=7^z,ie=-1;for(P=0;P<8;++P)P!==z&&P!==ee&&(ie<0||p[ie][1]>p[P][1])&&(ie=P);var oe=-1;for(P=0;P<3;++P)(me=ie^1<<P)!==z&&me!==ee&&(oe<0&&(oe=me),(j=p[me])[0]<p[oe][0]&&(oe=me));var ce=-1;for(P=0;P<3;++P){var me;(me=ie^1<<P)!==z&&me!==ee&&me!==oe&&(ce<0&&(ce=me),(j=p[me])[0]>p[ce][0]&&(ce=me))}var de=h;de[0]=de[1]=de[2]=0,de[o.log2(oe^ie)]=ie&oe,de[o.log2(ie^ce)]=ie&ce;var he=7^ce;he===z||he===ee?de[o.log2(ce^(he=7^oe))]=he&ce:de[o.log2(oe^he)]=he&oe;var ve=m,Pe=z;for(N=0;N<3;++N)ve[N]=Pe&1<<N?-1:1;return w};var o=t(2288),r=t(104),n=t(4670),i=t(417),a=new Array(16),c=new Array(8),p=new Array(8),f=new Array(3),x=[0,0,0];function v(u,S,_){for(var E=0;E<4;++E){u[E]=_[12+E];for(var L=0;L<3;++L)u[E]+=S[L]*_[4*L+E]}}!function(){for(var u=0;u<8;++u)c[u]=[1,1,1,1],p[u]=[1,1,1]}();var g=[[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 y(u){for(var S=0;S<g.length;++S)if((u=n.positive(u,g[S])).length<3)return 0;var _=u[0],E=_[0]/_[3],L=_[1]/_[3],C=0;for(S=1;S+1<u.length;++S){var P=u[S],I=u[S+1];C+=Math.abs((P[0]/P[3]-E)*(I[1]/I[3]-L)-(P[1]/P[3]-L)*(I[0]/I[3]-E))}return C}var h=[1,1,1],m=[0,0,0],w={cubeEdges:h,axis:m}},1681:function(d,s,t){"use strict";d.exports=function(h,m,w){var u=[],S=[0,0,0],_=[0,0,0],E=[0,0,0],L=[0,0,0];u.push(0,0,1,0,1,1,0,0,-1,0,0,-1,0,1,1,0,1,-1);for(var C=0;C<3;++C){for(var P=u.length/3|0,I=0;I<w[C].length;++I){var U=+w[C][I].x;u.push(U,0,1,U,1,1,U,0,-1,U,0,-1,U,1,1,U,1,-1)}var z=u.length/3|0;S[C]=P,_[C]=z-P,P=u.length/3|0;for(var H=0;H<w[C].length;++H)u.push(U=+w[C][H].x,0,1,U,1,1,U,0,-1,U,0,-1,U,1,1,U,1,-1);z=u.length/3|0,E[C]=P,L[C]=z-P}var F=o(h,new Float32Array(u)),N=r(h,[{buffer:F,type:h.FLOAT,size:3,stride:0,offset:0}]),B=n(h);return B.attributes.position.location=0,new g(h,F,N,B,_,S,L,E)};var o=t(5827),r=t(2944),n=t(1943).j,i=[0,0,0],a=[0,0,0],c=[0,0,0],p=[0,0,0],f=[1,1];function x(h){return h[0]=h[1]=h[2]=0,h}function v(h,m){return h[0]=m[0],h[1]=m[1],h[2]=m[2],h}function g(h,m,w,u,S,_,E,L){this.gl=h,this.vertBuffer=m,this.vao=w,this.shader=u,this.tickCount=S,this.tickOffset=_,this.gridCount=E,this.gridOffset=L}var y=g.prototype;y.bind=function(h,m,w){this.shader.bind(),this.shader.uniforms.model=h,this.shader.uniforms.view=m,this.shader.uniforms.projection=w,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.screenShape=f,this.vao.bind()},y.unbind=function(){this.vao.unbind()},y.drawAxisLine=function(h,m,w,u,S){var _=x(a);this.shader.uniforms.majorAxis=a,_[h]=m[1][h]-m[0][h],this.shader.uniforms.minorAxis=_;var E,L=v(p,w);L[h]+=m[0][h],this.shader.uniforms.offset=L,this.shader.uniforms.lineWidth=S,this.shader.uniforms.color=u,(E=x(c))[(h+2)%3]=1,this.shader.uniforms.screenAxis=E,this.vao.draw(this.gl.TRIANGLES,6),(E=x(c))[(h+1)%3]=1,this.shader.uniforms.screenAxis=E,this.vao.draw(this.gl.TRIANGLES,6)},y.drawAxisTicks=function(h,m,w,u,S){if(this.tickCount[h]){var _=x(i);_[h]=1,this.shader.uniforms.majorAxis=_,this.shader.uniforms.offset=m,this.shader.uniforms.minorAxis=w,this.shader.uniforms.color=u,this.shader.uniforms.lineWidth=S;var E=x(c);E[h]=1,this.shader.uniforms.screenAxis=E,this.vao.draw(this.gl.TRIANGLES,this.tickCount[h],this.tickOffset[h])}},y.drawGrid=function(h,m,w,u,S,_){if(this.gridCount[h]){var E=x(a);E[m]=w[1][m]-w[0][m],this.shader.uniforms.minorAxis=E;var L=v(p,u);L[m]+=w[0][m],this.shader.uniforms.offset=L;var C=x(i);C[h]=1,this.shader.uniforms.majorAxis=C;var P=x(c);P[h]=1,this.shader.uniforms.screenAxis=P,this.shader.uniforms.lineWidth=_,this.shader.uniforms.color=S,this.vao.draw(this.gl.TRIANGLES,this.gridCount[h],this.gridOffset[h])}},y.drawZero=function(h,m,w,u,S,_){var E=x(a);this.shader.uniforms.majorAxis=E,E[h]=w[1][h]-w[0][h],this.shader.uniforms.minorAxis=E;var L=v(p,u);L[h]+=w[0][h],this.shader.uniforms.offset=L;var C=x(c);C[m]=1,this.shader.uniforms.screenAxis=C,this.shader.uniforms.lineWidth=_,this.shader.uniforms.color=S,this.vao.draw(this.gl.TRIANGLES,6)},y.dispose=function(){this.vao.dispose(),this.vertBuffer.dispose(),this.shader.dispose()}},1943:function(d,s,t){"use strict";var o=t(6832),r=t(5158),n=o(["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"]),i=o(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = color;\n}"]);s.j=function(x){return r(x,n,i,null,[{name:"position",type:"vec3"}])};var a=o(["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}"]),c=o(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = color;\n}"]);s.f=function(x){return r(x,a,c,null,[{name:"position",type:"vec3"}])};var p=o(["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}"]),f=o(["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}"]);s.bg=function(x){return r(x,p,f,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(d,s,t){"use strict";d.exports=function(v,g,y,h,m,w){var u=o(v),S=r(v,[{buffer:u,size:3}]),_=i(v);_.attributes.position.location=0;var E=new p(v,_,u,S);return E.update(g,y,h,m,w),E};var o=t(5827),r=t(2944),n=t(875),i=t(1943).f,a=window||A.global||{},c=a.__TEXT_CACHE||{};function p(v,g,y,h){this.gl=v,this.shader=g,this.buffer=y,this.vao=h,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}a.__TEXT_CACHE={};var f=p.prototype,x=[0,0];f.bind=function(v,g,y,h){this.vao.bind(),this.shader.bind();var m=this.shader.uniforms;m.model=v,m.view=g,m.projection=y,m.pixelScale=h,x[0]=this.gl.drawingBufferWidth,x[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=x},f.unbind=function(){this.vao.unbind()},f.update=function(v,g,y,h,m){var w=[];function u(U,z,H,F,N,B){var j=c[H];j||(j=c[H]={});var J=j[z];J||(J=j[z]=function(oe,ce){try{return n(oe,ce)}catch(me){return console.warn('error vectorizing text:"'+oe+'" error:',me),{cells:[],positions:[]}}}(z,{triangles:!0,font:H,textAlign:"center",textBaseline:"middle",lineSpacing:N,styletags:B}));for(var G=(F||12)/12,V=J.positions,W=J.cells,X=0,K=W.length;X<K;++X)for(var re=W[X],ee=2;ee>=0;--ee){var ie=V[re[ee]];w.push(G*ie[0],-G*ie[1],U)}}for(var S=[0,0,0],_=[0,0,0],E=[0,0,0],L=[0,0,0],C={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},P=0;P<3;++P){E[P]=w.length/3|0,u(.5*(v[0][P]+v[1][P]),g[P],y[P],12,1.25,C),L[P]=(w.length/3|0)-E[P],S[P]=w.length/3|0;for(var I=0;I<h[P].length;++I)h[P][I].text&&u(h[P][I].x,h[P][I].text,h[P][I].font||m,h[P][I].fontSize||12,1.25,C);_[P]=(w.length/3|0)-S[P]}this.buffer.update(w),this.tickOffset=S,this.tickCount=_,this.labelOffset=E,this.labelCount=L},f.drawTicks=function(v,g,y,h,m,w,u,S){this.tickCount[v]&&(this.shader.uniforms.axis=w,this.shader.uniforms.color=m,this.shader.uniforms.angle=y,this.shader.uniforms.scale=g,this.shader.uniforms.offset=h,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=S,this.vao.draw(this.gl.TRIANGLES,this.tickCount[v],this.tickOffset[v]))},f.drawLabel=function(v,g,y,h,m,w,u,S){this.labelCount[v]&&(this.shader.uniforms.axis=w,this.shader.uniforms.color=m,this.shader.uniforms.angle=y,this.shader.uniforms.scale=g,this.shader.uniforms.offset=h,this.shader.uniforms.alignDir=u,this.shader.uniforms.alignOpt=S,this.vao.draw(this.gl.TRIANGLES,this.labelCount[v],this.labelOffset[v]))},f.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()}},8468:function(d,s){"use strict";function t(o,r){var n=o+"",i=n.indexOf("."),a=0;i>=0&&(a=n.length-i-1);var c=Math.pow(10,a),p=Math.round(o*r*c),f=p+"";if(f.indexOf("e")>=0)return f;var x=p/c,v=p%c;p<0?(x=0|-Math.ceil(x),v=0|-v):(x=0|Math.floor(x),v|=0);var g=""+x;if(p<0&&(g="-"+g),a){for(var y=""+v;y.length<a;)y="0"+y;return g+"."+y}return g}s.create=function(o,r){for(var n=[],i=0;i<3;++i){for(var a=[],c=0;c*r[i]<=o[1][i];++c)a.push({x:c*r[i],text:t(r[i],c)});for(c=-1;c*r[i]>=o[0][i];--c)a.push({x:c*r[i],text:t(r[i],c)});n.push(a)}return n},s.equal=function(o,r){for(var n=0;n<3;++n){if(o[n].length!==r[n].length)return!1;for(var i=0;i<o[n].length;++i){var a=o[n][i],c=r[n][i];if(a.x!==c.x||a.text!==c.text||a.font!==c.font||a.fontColor!==c.fontColor||a.fontSize!==c.fontSize||a.dx!==c.dx||a.dy!==c.dy)return!1}}return!0}},2771:function(d,s,t){"use strict";d.exports=function(w,u,S,_,E){var L=u.model||p,C=u.view||p,P=u.projection||p,I=u._ortho||!1,U=w.bounds,z=(E=E||n(L,C,P,U,I)).axis;i(f,C,L),i(f,P,f);for(var H=h,F=0;F<3;++F)H[F].lo=1/0,H[F].hi=-1/0,H[F].pixelsPerDataUnit=1/0;var N=o(a(f,f));a(f,f);for(var B=0;B<3;++B){var j=(B+1)%3,J=(B+2)%3,G=m;e:for(F=0;F<2;++F){var V=[];if(z[B]<0!=!!F){G[B]=U[F][B];for(var W=0;W<2;++W){G[j]=U[W^F][j];for(var X=0;X<2;++X)G[J]=U[X^W^F][J],V.push(G.slice())}var K=I?5:4;for(W=K;W===K;++W){if(0===V.length)continue e;V=r.positive(V,N[W])}for(W=0;W<V.length;++W){var re=y(m,f,J=V[W],S,_);for(X=0;X<3;++X)H[X].lo=Math.min(H[X].lo,J[X]),H[X].hi=Math.max(H[X].hi,J[X]),X!==B&&(H[X].pixelsPerDataUnit=Math.min(H[X].pixelsPerDataUnit,Math.abs(re[X])))}}}}return H};var o=t(5795),r=t(4670),n=t(2864),i=t(104),a=t(2142),c=t(6342),p=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),f=new Float32Array(16);function x(w,u,S){this.lo=w,this.hi=u,this.pixelsPerDataUnit=S}var v=[0,0,0,1],g=[0,0,0,1];function y(w,u,S,_,E){for(var L=0;L<3;++L){for(var C=v,P=g,I=0;I<3;++I)P[I]=C[I]=S[I];P[3]=C[3]=1,P[L]+=1,c(P,P,u),P[3]<0&&(w[L]=1/0),C[L]-=1,c(C,C,u),C[3]<0&&(w[L]=1/0);var U=(C[0]/C[3]-P[0]/P[3])*_,z=(C[1]/C[3]-P[1]/P[3])*E;w[L]=.25*Math.sqrt(U*U+z*z)}return w}var h=[new x(1/0,-1/0,1/0),new x(1/0,-1/0,1/0),new x(1/0,-1/0,1/0)],m=[0,0,0]},5827:function(d,s,t){"use strict";var o=t(5306),r=t(7498),n=t(5050),i=["uint8","uint8_clamped","uint16","uint32","int8","int16","int32","float32"];function a(x,v,g,y,h){this.gl=x,this.type=v,this.handle=g,this.length=y,this.usage=h}var c=a.prototype;function p(x,v,g,y,h,m){var w=h.length*h.BYTES_PER_ELEMENT;if(m<0)return x.bufferData(v,h,y),w;if(w+m>g)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return x.bufferSubData(v,m,h),g}c.bind=function(){this.gl.bindBuffer(this.type,this.handle)},c.unbind=function(){this.gl.bindBuffer(this.type,null)},c.dispose=function(){this.gl.deleteBuffer(this.handle)},c.update=function(x,v){if("number"!=typeof v&&(v=-1),this.bind(),"object"==typeof x&&void 0!==x.shape){var g=x.dtype;if(i.indexOf(g)<0&&(g="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER&&(g=gl.getExtension("OES_element_index_uint")&&"uint16"!==g?"uint32":"uint16"),g===x.dtype&&function(w,u){for(var S=1,_=u.length-1;_>=0;--_){if(u[_]!==S)return!1;S*=w[_]}return!0}(x.shape,x.stride))this.length=p(this.gl,this.type,this.length,this.usage,0===x.offset&&x.data.length===x.shape[0]?x.data:x.data.subarray(x.offset,x.shape[0]),v);else{var y=o.malloc(x.size,g),h=n(y,x.shape);r.assign(h,x),this.length=p(this.gl,this.type,this.length,this.usage,v<0?y:y.subarray(0,x.size),v),o.free(y)}}else if(Array.isArray(x)){var m;m=function f(x,v){for(var g=o.malloc(x.length,v),y=x.length,h=0;h<y;++h)g[h]=x[h];return g}(x,this.type===this.gl.ELEMENT_ARRAY_BUFFER?"uint16":"float32"),this.length=p(this.gl,this.type,this.length,this.usage,v<0?m:m.subarray(0,x.length),v),o.free(m)}else if("object"==typeof x&&"number"==typeof x.length)this.length=p(this.gl,this.type,this.length,this.usage,x,v);else{if("number"!=typeof x&&void 0!==x)throw new Error("gl-buffer: Invalid data type");if(v>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");(x|=0)<=0&&(x=1),this.gl.bufferData(this.type,0|x,this.usage),this.length=x}},d.exports=function(x,v,g,y){if(y=y||x.DYNAMIC_DRAW,(g=g||x.ARRAY_BUFFER)!==x.ARRAY_BUFFER&&g!==x.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(y!==x.DYNAMIC_DRAW&&y!==x.STATIC_DRAW&&y!==x.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 h=x.createBuffer(),m=new a(x,g,h,0,y);return m.update(v),m}},1140:function(d,s,t){"use strict";var o=t(2858);d.exports=function(n,i){var a=n.positions,c=n.vectors,p={positions:[],vertexIntensity:[],vertexIntensityBounds:n.vertexIntensityBounds,vectors:[],cells:[],coneOffset:n.coneOffset,colormap:n.colormap};if(0===n.positions.length)return i&&(i[0]=[0,0,0],i[1]=[0,0,0]),p;for(var f=0,x=1/0,v=-1/0,g=1/0,y=-1/0,h=1/0,m=-1/0,w=null,u=null,S=[],_=1/0,E=!1,L=0;L<a.length;L++){var C=a[L];x=Math.min(C[0],x),v=Math.max(C[0],v),g=Math.min(C[1],g),y=Math.max(C[1],y),h=Math.min(C[2],h),m=Math.max(C[2],m);var P=c[L];if(o.length(P)>f&&(f=o.length(P)),L){var I=2*o.distance(w,C)/(o.length(u)+o.length(P));I?(_=Math.min(_,I),E=!1):E=!0}E||(w=C,u=P),S.push(P)}var z=[v,y,m];i&&(i[0]=[x,g,h],i[1]=z),0===f&&(f=1);var H=1/f;isFinite(_)||(_=1),p.vectorScale=_;var F=n.coneSize||.5;n.absoluteConeSize&&(F=n.absoluteConeSize*H),p.coneScale=F,L=0;for(var N=0;L<a.length;L++)for(var B=(C=a[L])[0],j=C[1],J=C[2],G=S[L],V=o.length(G)*H,W=0;W<8;W++){p.positions.push([B,j,J,N++]),p.positions.push([B,j,J,N++]),p.positions.push([B,j,J,N++]),p.positions.push([B,j,J,N++]),p.positions.push([B,j,J,N++]),p.positions.push([B,j,J,N++]),p.vectors.push(G),p.vectors.push(G),p.vectors.push(G),p.vectors.push(G),p.vectors.push(G),p.vectors.push(G),p.vertexIntensity.push(V,V,V),p.vertexIntensity.push(V,V,V);var X=p.positions.length;p.cells.push([X-6,X-5,X-4],[X-3,X-2,X-1])}return p};var r=t(7234);d.exports.createMesh=t(5028),d.exports.createConeMesh=function(n,i){return d.exports.createMesh(n,i,{shaders:r,traceType:"cone"})}},5028:function(d,s,t){"use strict";var o=t(5158),r=t(5827),n=t(2944),i=t(8931),a=t(104),c=t(7437),p=t(5050),f=t(9156),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function v(m,w,u,S,_,E,L,C,P,I,U){this.gl=m,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=w,this.dirty=!0,this.triShader=u,this.pickShader=S,this.trianglePositions=_,this.triangleVectors=E,this.triangleColors=C,this.triangleUVs=P,this.triangleIds=L,this.triangleVAO=I,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=U,this.tubeScale=1,this.coneScale=2,this.vectorScale=1,this.coneOffset=.25,this._model=x,this._view=x,this._projection=x,this._resolution=[1,1]}var g=v.prototype;g.isOpaque=function(){return this.opacity>=1},g.isTransparent=function(){return this.opacity<1},g.pickSlots=1,g.setPickBase=function(m){this.pickId=m},g.update=function(m){m=m||{};var w=this.gl;this.dirty=!0,"lightPosition"in m&&(this.lightPosition=m.lightPosition),"opacity"in m&&(this.opacity=m.opacity),"ambient"in m&&(this.ambientLight=m.ambient),"diffuse"in m&&(this.diffuseLight=m.diffuse),"specular"in m&&(this.specularLight=m.specular),"roughness"in m&&(this.roughness=m.roughness),"fresnel"in m&&(this.fresnel=m.fresnel),void 0!==m.tubeScale&&(this.tubeScale=m.tubeScale),void 0!==m.vectorScale&&(this.vectorScale=m.vectorScale),void 0!==m.coneScale&&(this.coneScale=m.coneScale),void 0!==m.coneOffset&&(this.coneOffset=m.coneOffset),m.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=w.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=w.LINEAR,this.texture.setPixels(function(ie){for(var oe=f({colormap:ie,nshades:256,format:"rgba"}),ce=new Uint8Array(1024),me=0;me<256;++me){for(var de=oe[me],he=0;he<3;++he)ce[4*me+he]=de[he];ce[4*me+3]=255*de[3]}return p(ce,[256,256,4],[4,0,1])}(m.colormap)),this.texture.generateMipmap());var u=m.cells,S=m.positions,_=m.vectors;if(S&&u&&_){var E=[],L=[],C=[],P=[],I=[];this.cells=u,this.positions=S,this.vectors=_;var U=m.meshColor||[1,1,1,1],z=m.vertexIntensity,H=1/0,F=-1/0;if(z)if(m.vertexIntensityBounds)H=+m.vertexIntensityBounds[0],F=+m.vertexIntensityBounds[1];else for(var N=0;N<z.length;++N){var B=z[N];H=Math.min(H,B),F=Math.max(F,B)}else for(N=0;N<S.length;++N)B=S[N][2],H=Math.min(H,B),F=Math.max(F,B);for(this.intensity=z||function(ie){for(var oe=ie.length,ce=new Array(oe),me=0;me<oe;++me)ce[me]=ie[me][2];return ce}(S),this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],N=0;N<S.length;++N)for(var j=S[N],J=0;J<3;++J)!isNaN(j[J])&&isFinite(j[J])&&(this.bounds[0][J]=Math.min(this.bounds[0][J],j[J]),this.bounds[1][J]=Math.max(this.bounds[1][J],j[J]));var G=0;e:for(N=0;N<u.length;++N){var V=u[N];if(3===V.length){for(J=0;J<3;++J){j=S[X=V[J]];for(var W=0;W<3;++W)if(isNaN(j[W])||!isFinite(j[W]))continue e}for(J=0;J<3;++J){var X;j=S[X=V[2-J]],E.push(j[0],j[1],j[2],j[3]);var K=_[X];L.push(K[0],K[1],K[2],K[3]||0);var re;C.push(U[0],U[1],U[2],3===U.length?1:U[3]),P.push((re=z?[(z[X]-H)/(F-H),0]:[(j[2]-H)/(F-H),0])[0],re[1]),I.push(N)}G+=1}}this.triangleCount=G,this.trianglePositions.update(E),this.triangleVectors.update(L),this.triangleColors.update(C),this.triangleUVs.update(P),this.triangleIds.update(new Uint32Array(I))}},g.drawTransparent=g.draw=function(m){for(var w=this.gl,u=(m=m||{}).model||x,S=m.view||x,_=m.projection||x,E=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],L=0;L<3;++L)E[0][L]=Math.max(E[0][L],this.clipBounds[0][L]),E[1][L]=Math.min(E[1][L],this.clipBounds[1][L]);var C={model:u,view:S,projection:_,inverseModel:x.slice(),clipBounds:E,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};C.inverseModel=c(C.inverseModel,C.model),w.disable(w.CULL_FACE),this.texture.bind(0);var P=new Array(16);for(a(P,C.view,C.model),a(P,C.projection,P),c(P,P),L=0;L<3;++L)C.eyePosition[L]=P[12+L]/P[15];var I=P[15];for(L=0;L<3;++L)I+=this.lightPosition[L]*P[4*L+3];for(L=0;L<3;++L){for(var U=P[12+L],z=0;z<3;++z)U+=P[4*z+L]*this.lightPosition[z];C.lightPosition[L]=U/I}if(this.triangleCount>0){var H=this.triShader;H.bind(),H.uniforms=C,this.triangleVAO.bind(),w.drawArrays(w.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()}},g.drawPick=function(m){for(var w=this.gl,u=(m=m||{}).model||x,S=m.view||x,_=m.projection||x,E=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],L=0;L<3;++L)E[0][L]=Math.max(E[0][L],this.clipBounds[0][L]),E[1][L]=Math.min(E[1][L],this.clipBounds[1][L]);this._model=[].slice.call(u),this._view=[].slice.call(S),this._projection=[].slice.call(_),this._resolution=[w.drawingBufferWidth,w.drawingBufferHeight];var C={model:u,view:S,projection:_,clipBounds:E,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},P=this.pickShader;P.bind(),P.uniforms=C,this.triangleCount>0&&(this.triangleVAO.bind(),w.drawArrays(w.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind())},g.pick=function(m){if(!m||m.id!==this.pickId)return null;var w=m.value[0]+256*m.value[1]+65536*m.value[2],u=this.cells[w],S=this.positions[u[1]].slice(0,3),_={position:S,dataCoordinate:S,index:Math.floor(u[1]/48)};return"cone"===this.traceType?_.index=Math.floor(u[1]/48):"streamtube"===this.traceType&&(_.intensity=this.intensity[u[1]],_.velocity=this.vectors[u[1]].slice(0,3),_.divergence=this.vectors[u[1]][3],_.index=w),_},g.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()},d.exports=function(m,w,u){var S=u.shaders;1===arguments.length&&(m=(w=m).gl);var _=function y(m,w){var u=o(m,w.meshShader.vertex,w.meshShader.fragment,null,w.meshShader.attributes);return u.attributes.position.location=0,u.attributes.color.location=2,u.attributes.uv.location=3,u.attributes.vector.location=4,u}(m,S),E=function h(m,w){var u=o(m,w.pickShader.vertex,w.pickShader.fragment,null,w.pickShader.attributes);return u.attributes.position.location=0,u.attributes.id.location=1,u.attributes.vector.location=4,u}(m,S),L=i(m,p(new Uint8Array([255,255,255,255]),[1,1,4]));L.generateMipmap(),L.minFilter=m.LINEAR_MIPMAP_LINEAR,L.magFilter=m.LINEAR;var C=r(m),P=r(m),I=r(m),U=r(m),z=r(m),F=new v(m,L,_,E,C,P,z,I,U,n(m,[{buffer:C,type:m.FLOAT,size:4},{buffer:z,type:m.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:I,type:m.FLOAT,size:4},{buffer:U,type:m.FLOAT,size:2},{buffer:P,type:m.FLOAT,size:4}]),u.traceType||"cone");return F.update(w),F}},7234:function(d,s,t){var o=t(6832),r=o(["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"]),n=o(["#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"]),i=o(["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"]),a=o(["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}"]);s.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},s.pickShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}},1950:function(d){d.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"}},6603:function(d,s,t){var o=t(1950);d.exports=function(r){return o[r]}},3110:function(d,s,t){"use strict";d.exports=function(v){var g=v.gl,y=o(g),h=r(g,[{buffer:y,type:g.FLOAT,size:3,offset:0,stride:40},{buffer:y,type:g.FLOAT,size:4,offset:12,stride:40},{buffer:y,type:g.FLOAT,size:3,offset:28,stride:40}]),m=n(g);m.attributes.position.location=0,m.attributes.color.location=1,m.attributes.offset.location=2;var w=new a(g,y,h,m);return w.update(v),w};var o=t(5827),r=t(2944),n=t(7667),i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function a(v,g,y,h){this.gl=v,this.shader=h,this.buffer=g,this.vao=y,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 c=a.prototype;function p(v,g){for(var y=0;y<3;++y)v[0][y]=Math.min(v[0][y],g[y]),v[1][y]=Math.max(v[1][y],g[y])}c.isOpaque=function(){return!this.hasAlpha},c.isTransparent=function(){return this.hasAlpha},c.drawTransparent=c.draw=function(v){var g=this.gl,y=this.shader.uniforms;this.shader.bind();var h=y.view=v.view||i,m=y.projection=v.projection||i;y.model=v.model||i,y.clipBounds=this.clipBounds,y.opacity=this.opacity;var E=(v._ortho?2:1)*this.pixelRatio*(m[3]*h[12]+m[7]*h[13]+m[11]*h[14]+m[15]*h[15])/g.drawingBufferHeight;this.vao.bind();for(var L=0;L<3;++L)g.lineWidth(this.lineWidth[L]*this.pixelRatio),y.capSize=this.capSize[L]*E,this.lineCount[L]&&g.drawArrays(g.LINES,this.lineOffset[L],this.lineCount[L]);this.vao.unbind()};var f=function(){for(var v=new Array(3),g=0;g<3;++g){for(var y=[],h=1;h<=2;++h)for(var m=-1;m<=1;m+=2){var w=[0,0,0];w[(h+g)%3]=m,y.push(w)}v[g]=y}return v}();function x(v,g,y,h){for(var m=f[h],w=0;w<m.length;++w){var u=m[w];v.push(g[0],g[1],g[2],y[0],y[1],y[2],y[3],u[0],u[1],u[2])}return m.length}c.update=function(v){"lineWidth"in(v=v||{})&&(this.lineWidth=v.lineWidth,Array.isArray(this.lineWidth)||(this.lineWidth=[this.lineWidth,this.lineWidth,this.lineWidth])),"capSize"in v&&(this.capSize=v.capSize,Array.isArray(this.capSize)||(this.capSize=[this.capSize,this.capSize,this.capSize])),this.hasAlpha=!1,"opacity"in v&&(this.opacity=+v.opacity,this.opacity<1&&(this.hasAlpha=!0));var g=v.color||[[0,0,0],[0,0,0],[0,0,0]],y=v.position,h=v.error;if(Array.isArray(g[0])||(g=[g,g,g]),y&&h){var m=[],w=y.length,u=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]=u;e:for(var _=0;_<w;++_){for(var E=y[_],L=0;L<3;++L)if(isNaN(E[L])||!isFinite(E[L]))continue e;var C,P=h[_],I=g[S];Array.isArray(I[0])&&(I=g[_]),3===I.length?I=[I[0],I[1],I[2],1]:4===I.length&&(I=[I[0],I[1],I[2],I[3]],!this.hasAlpha&&I[3]<1&&(this.hasAlpha=!0)),isNaN(P[0][S])||isNaN(P[1][S])||(P[0][S]<0&&((C=E.slice())[S]+=P[0][S],m.push(E[0],E[1],E[2],I[0],I[1],I[2],I[3],0,0,0,C[0],C[1],C[2],I[0],I[1],I[2],I[3],0,0,0),p(this.bounds,C),u+=2+x(m,C,I,S)),P[1][S]>0&&((C=E.slice())[S]+=P[1][S],m.push(E[0],E[1],E[2],I[0],I[1],I[2],I[3],0,0,0,C[0],C[1],C[2],I[0],I[1],I[2],I[3],0,0,0),p(this.bounds,C),u+=2+x(m,C,I,S)))}this.lineCount[S]=u-this.lineOffset[S]}this.buffer.update(m)}},c.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()}},7667:function(d,s,t){"use strict";var o=t(6832),r=t(5158),n=o(["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}"]),i=o(["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}"]);d.exports=function(a){return r(a,n,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(d,s,t){"use strict";var o=t(8931);d.exports=function(w,u,S,_){r||(r=w.FRAMEBUFFER_UNSUPPORTED,n=w.FRAMEBUFFER_INCOMPLETE_ATTACHMENT,i=w.FRAMEBUFFER_INCOMPLETE_DIMENSIONS,a=w.FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT);var E=w.getExtension("WEBGL_draw_buffers");if(!c&&E&&function(H,F){var N=H.getParameter(F.MAX_COLOR_ATTACHMENTS_WEBGL);c=new Array(N+1);for(var B=0;B<=N;++B){for(var j=new Array(N),J=0;J<B;++J)j[J]=H.COLOR_ATTACHMENT0+J;for(J=B;J<N;++J)j[J]=H.NONE;c[B]=j}}(w,E),Array.isArray(u)&&(_=S,S=0|u[1],u=0|u[0]),"number"!=typeof u)throw new Error("gl-fbo: Missing shape parameter");var L=w.getParameter(w.MAX_RENDERBUFFER_SIZE);if(u<0||u>L||S<0||S>L)throw new Error("gl-fbo: Parameters are too large for FBO");var C=1;if("color"in(_=_||{})){if((C=Math.max(0|_.color,0))<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(C>1){if(!E)throw new Error("gl-fbo: Multiple draw buffer extension not supported");if(C>w.getParameter(E.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+C+" draw buffers")}}var P=w.UNSIGNED_BYTE,I=w.getExtension("OES_texture_float");if(_.float&&C>0){if(!I)throw new Error("gl-fbo: Context does not support floating point textures");P=w.FLOAT}else _.preferFloat&&C>0&&I&&(P=w.FLOAT);var U=!0;"depth"in _&&(U=!!_.depth);var z=!1;return"stencil"in _&&(z=!!_.stencil),new y(w,u,S,P,C,U,z,E)};var r,n,i,a,c=null;function p(w){return[w.getParameter(w.FRAMEBUFFER_BINDING),w.getParameter(w.RENDERBUFFER_BINDING),w.getParameter(w.TEXTURE_BINDING_2D)]}function f(w,u){w.bindFramebuffer(w.FRAMEBUFFER,u[0]),w.bindRenderbuffer(w.RENDERBUFFER,u[1]),w.bindTexture(w.TEXTURE_2D,u[2])}function x(w){switch(w){case r:throw new Error("gl-fbo: Framebuffer unsupported");case n:throw new Error("gl-fbo: Framebuffer incomplete attachment");case i:throw new Error("gl-fbo: Framebuffer incomplete dimensions");case a:throw new Error("gl-fbo: Framebuffer incomplete missing attachment");default:throw new Error("gl-fbo: Framebuffer failed for unspecified reason")}}function v(w,u,S,_,E,L){if(!_)return null;var C=o(w,u,S,E,_);return C.magFilter=w.NEAREST,C.minFilter=w.NEAREST,C.mipSamples=1,C.bind(),w.framebufferTexture2D(w.FRAMEBUFFER,L,w.TEXTURE_2D,C.handle,0),C}function g(w,u,S,_,E){var L=w.createRenderbuffer();return w.bindRenderbuffer(w.RENDERBUFFER,L),w.renderbufferStorage(w.RENDERBUFFER,_,u,S),w.framebufferRenderbuffer(w.FRAMEBUFFER,E,w.RENDERBUFFER,L),L}function y(w,u,S,_,E,L,C,P){this.gl=w,this._shape=[0|u,0|S],this._destroyed=!1,this._ext=P,this.color=new Array(E);for(var I=0;I<E;++I)this.color[I]=null;this._color_rb=null,this.depth=null,this._depth_rb=null,this._colorType=_,this._useDepth=L,this._useStencil=C;var U=this,z=[0|u,0|S];Object.defineProperties(z,{0:{get:function(){return U._shape[0]},set:function(H){return U.width=H}},1:{get:function(){return U._shape[1]},set:function(H){return U.height=H}}}),this._shapeVector=z,function(H){var F=p(H.gl),N=H.gl,B=H.handle=N.createFramebuffer(),j=H._shape[0],J=H._shape[1],G=H.color.length,V=H._ext,W=H._useStencil,X=H._useDepth,K=H._colorType;N.bindFramebuffer(N.FRAMEBUFFER,B);for(var re=0;re<G;++re)H.color[re]=v(N,j,J,K,N.RGBA,N.COLOR_ATTACHMENT0+re);0===G?(H._color_rb=g(N,j,J,N.RGBA4,N.COLOR_ATTACHMENT0),V&&V.drawBuffersWEBGL(c[0])):G>1&&V.drawBuffersWEBGL(c[G]);var ee=N.getExtension("WEBGL_depth_texture");ee?W?H.depth=v(N,j,J,ee.UNSIGNED_INT_24_8_WEBGL,N.DEPTH_STENCIL,N.DEPTH_STENCIL_ATTACHMENT):X&&(H.depth=v(N,j,J,N.UNSIGNED_SHORT,N.DEPTH_COMPONENT,N.DEPTH_ATTACHMENT)):X&&W?H._depth_rb=g(N,j,J,N.DEPTH_STENCIL,N.DEPTH_STENCIL_ATTACHMENT):X?H._depth_rb=g(N,j,J,N.DEPTH_COMPONENT16,N.DEPTH_ATTACHMENT):W&&(H._depth_rb=g(N,j,J,N.STENCIL_INDEX,N.STENCIL_ATTACHMENT));var ie=N.checkFramebufferStatus(N.FRAMEBUFFER);if(ie!==N.FRAMEBUFFER_COMPLETE){for(H._destroyed=!0,N.bindFramebuffer(N.FRAMEBUFFER,null),N.deleteFramebuffer(H.handle),H.handle=null,H.depth&&(H.depth.dispose(),H.depth=null),H._depth_rb&&(N.deleteRenderbuffer(H._depth_rb),H._depth_rb=null),re=0;re<H.color.length;++re)H.color[re].dispose(),H.color[re]=null;H._color_rb&&(N.deleteRenderbuffer(H._color_rb),H._color_rb=null),f(N,F),x(ie)}f(N,F)}(this)}var h=y.prototype;function m(w,u,S){if(w._destroyed)throw new Error("gl-fbo: Can't resize destroyed FBO");if(w._shape[0]!==u||w._shape[1]!==S){var _=w.gl,E=_.getParameter(_.MAX_RENDERBUFFER_SIZE);if(u<0||u>E||S<0||S>E)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");w._shape[0]=u,w._shape[1]=S;for(var L=p(_),C=0;C<w.color.length;++C)w.color[C].shape=w._shape;w._color_rb&&(_.bindRenderbuffer(_.RENDERBUFFER,w._color_rb),_.renderbufferStorage(_.RENDERBUFFER,_.RGBA4,w._shape[0],w._shape[1])),w.depth&&(w.depth.shape=w._shape),w._depth_rb&&(_.bindRenderbuffer(_.RENDERBUFFER,w._depth_rb),w._useDepth&&w._useStencil?_.renderbufferStorage(_.RENDERBUFFER,_.DEPTH_STENCIL,w._shape[0],w._shape[1]):w._useDepth?_.renderbufferStorage(_.RENDERBUFFER,_.DEPTH_COMPONENT16,w._shape[0],w._shape[1]):w._useStencil&&_.renderbufferStorage(_.RENDERBUFFER,_.STENCIL_INDEX,w._shape[0],w._shape[1])),_.bindFramebuffer(_.FRAMEBUFFER,w.handle);var P=_.checkFramebufferStatus(_.FRAMEBUFFER);P!==_.FRAMEBUFFER_COMPLETE&&(w.dispose(),f(_,L),x(P)),f(_,L)}}Object.defineProperties(h,{shape:{get:function(){return this._destroyed?[0,0]:this._shapeVector},set:function(w){if(Array.isArray(w)||(w=[0|w,0|w]),2!==w.length)throw new Error("gl-fbo: Shape vector must be length 2");var u=0|w[0],S=0|w[1];return m(this,u,S),[u,S]},enumerable:!1},width:{get:function(){return this._destroyed?0:this._shape[0]},set:function(w){return m(this,w|=0,this._shape[1]),w},enumerable:!1},height:{get:function(){return this._destroyed?0:this._shape[1]},set:function(w){return m(this,this._shape[0],w|=0),w},enumerable:!1}}),h.bind=function(){if(!this._destroyed){var w=this.gl;w.bindFramebuffer(w.FRAMEBUFFER,this.handle),w.viewport(0,0,this._shape[0],this._shape[1])}},h.dispose=function(){if(!this._destroyed){this._destroyed=!0;var w=this.gl;w.deleteFramebuffer(this.handle),this.handle=null,this.depth&&(this.depth.dispose(),this.depth=null),this._depth_rb&&(w.deleteRenderbuffer(this._depth_rb),this._depth_rb=null);for(var u=0;u<this.color.length;++u)this.color[u].dispose(),this.color[u]=null;this._color_rb&&(w.deleteRenderbuffer(this._color_rb),this._color_rb=null)}}},3530:function(d,s,t){var o=t(8974).sprintf,r=t(6603),n=t(9365),i=t(8008);d.exports=function(a,c,p){"use strict";var f=n(c)||"of unknown name (see npm glsl-shader-name)",x="unknown type";void 0!==p&&(x=p===r.FRAGMENT_SHADER?"fragment":"vertex");for(var v=o("Error compiling %s shader %s:\n",x,f),g=o("%s%s",v,a),y=a.split("\n"),h={},m=0;m<y.length;m++){var w=y[m];if(""!==w&&"\0"!==w){var u=parseInt(w.split(":")[2]);if(isNaN(u))throw new Error(o("Could not parse error: %s",w));h[u]=w}}var S=i(c).split("\n");for(m=0;m<S.length;m++)if((h[m+3]||h[m+2]||h[m+1])&&(v+=S[m]+"\n",h[m+1])){var _=h[m+1];_=_.substr(_.split(":",3).join(":").length+1).trim(),v+=o("^^^ %s\n\n",_)}return{long:v.trim(),short:g.trim()}}},6386:function(d,s,t){"use strict";d.exports=function(g,y){var h=g.gl,m=new p(g,i(h,c.vertex,c.fragment),i(h,c.pickVertex,c.pickFragment),a(h),a(h),a(h),a(h));return m.update(y),g.addObject(m),m};var o=t(5070),r=t(9560),n=t(5306),i=t(5158),a=t(5827),c=t(1292);function p(g,y,h,m,w,u,S){this.plot=g,this.shader=y,this.pickShader=h,this.positionBuffer=m,this.weightBuffer=w,this.colorBuffer=u,this.idBuffer=S,this.xData=[],this.yData=[],this.shape=[0,0],this.bounds=[1/0,1/0,-1/0,-1/0],this.pickOffset=0}var f,g,y,x=p.prototype,v=[0,0,1,0,0,1,1,0,1,1,0,1];x.draw=(f=[1,0,0,0,1,0,0,0,1],function(){var g=this.plot,y=this.shader,h=this.bounds,m=this.numVertices;if(!(m<=0)){var w=g.gl,u=g.dataBox,_=h[3]-h[1],E=u[2]-u[0],L=u[3]-u[1];f[0]=2*(h[2]-h[0])/E,f[4]=2*_/L,f[6]=2*(h[0]-u[0])/E-1,f[7]=2*(h[1]-u[1])/L-1,y.bind();var C=y.uniforms;C.viewTransform=f,C.shape=this.shape;var P=y.attributes;this.positionBuffer.bind(),P.position.pointer(),this.weightBuffer.bind(),P.weight.pointer(w.UNSIGNED_BYTE,!1),this.colorBuffer.bind(),P.color.pointer(w.UNSIGNED_BYTE,!0),w.drawArrays(w.TRIANGLES,0,m)}}),x.drawPick=(g=[1,0,0,0,1,0,0,0,1],y=[0,0,0,0],function(h){var m=this.plot,w=this.pickShader,u=this.bounds,S=this.numVertices;if(!(S<=0)){var _=m.gl,E=m.dataBox,C=u[3]-u[1],P=E[2]-E[0],I=E[3]-E[1];g[0]=2*(u[2]-u[0])/P,g[4]=2*C/I,g[6]=2*(u[0]-E[0])/P-1,g[7]=2*(u[1]-E[1])/I-1;for(var U=0;U<4;++U)y[U]=h>>8*U&255;this.pickOffset=h,w.bind();var z=w.uniforms;z.viewTransform=g,z.pickOffset=y,z.shape=this.shape;var H=w.attributes;return this.positionBuffer.bind(),H.position.pointer(),this.weightBuffer.bind(),H.weight.pointer(_.UNSIGNED_BYTE,!1),this.idBuffer.bind(),H.pickId.pointer(_.UNSIGNED_BYTE,!1),_.drawArrays(_.TRIANGLES,0,S),h+this.shape[0]*this.shape[1]}}),x.pick=function(g,y,h){var m=this.pickOffset;if(h<m||h>=m+this.shape[0]*this.shape[1])return null;var u=h-m;return{object:this,pointId:u,dataCoord:[this.xData[u%this.shape[0]],this.yData[u/this.shape[0]|0]]}},x.update=function(g){var y=(g=g||{}).shape||[0,0],h=g.x||r(y[0]),m=g.y||r(y[1]),w=g.z||new Float32Array(y[0]*y[1]),u=!1!==g.zsmooth;this.xData=h,this.yData=m;var S,_,E,L,C=g.colorLevels||[0],P=g.colorValues||[0,0,0,1],I=C.length,U=this.bounds;u?(S=U[0]=h[0],_=U[1]=m[0],E=U[2]=h[h.length-1],L=U[3]=m[m.length-1]):(S=U[0]=h[0]+(h[1]-h[0])/2,_=U[1]=m[0]+(m[1]-m[0])/2,E=U[2]=h[h.length-1]+(h[h.length-1]-h[h.length-2])/2,L=U[3]=m[m.length-1]+(m[m.length-1]-m[m.length-2])/2);var z=1/(E-S),H=1/(L-_),F=y[0],N=y[1];this.shape=[F,N];var B=(u?(F-1)*(N-1):F*N)*(v.length>>>1);this.numVertices=B;for(var j=n.mallocUint8(4*B),J=n.mallocFloat32(2*B),G=n.mallocUint8(2*B),V=n.mallocUint32(B),W=0,X=u?F-1:F,K=u?N-1:N,re=0;re<K;++re){var ee,ie;u?(ee=H*(m[re]-_),ie=H*(m[re+1]-_)):(ee=re<N-1?H*(m[re]-(m[re+1]-m[re])/2-_):H*(m[re]-(m[re]-m[re-1])/2-_),ie=re<N-1?H*(m[re]+(m[re+1]-m[re])/2-_):H*(m[re]+(m[re]-m[re-1])/2-_));for(var oe=0;oe<X;++oe){var ce,me;u?(ce=z*(h[oe]-S),me=z*(h[oe+1]-S)):(ce=oe<F-1?z*(h[oe]-(h[oe+1]-h[oe])/2-S):z*(h[oe]-(h[oe]-h[oe-1])/2-S),me=oe<F-1?z*(h[oe]+(h[oe+1]-h[oe])/2-S):z*(h[oe]+(h[oe]-h[oe-1])/2-S));for(var de=0;de<v.length;de+=2){var he,ve,Pe,xe,ke=v[de],Ae=v[de+1],Te=w[u?(re+Ae)*F+(oe+ke):re*F+oe],Q=o.le(C,Te);if(Q<0)he=P[0],ve=P[1],Pe=P[2],xe=P[3];else if(Q===I-1)he=P[4*I-4],ve=P[4*I-3],Pe=P[4*I-2],xe=P[4*I-1];else{var se=(Te-C[Q])/(C[Q+1]-C[Q]),fe=1-se,ye=4*Q,Me=4*(Q+1);he=fe*P[ye]+se*P[Me],ve=fe*P[ye+1]+se*P[Me+1],Pe=fe*P[ye+2]+se*P[Me+2],xe=fe*P[ye+3]+se*P[Me+3]}j[4*W]=255*he,j[4*W+1]=255*ve,j[4*W+2]=255*Pe,j[4*W+3]=255*xe,J[2*W]=.5*ce+.5*me,J[2*W+1]=.5*ee+.5*ie,G[2*W]=ke,G[2*W+1]=Ae,V[W]=re*F+oe,W+=1}}}this.positionBuffer.update(J),this.weightBuffer.update(G),this.colorBuffer.update(j),this.idBuffer.update(V),n.free(J),n.free(j),n.free(G),n.free(V)},x.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.positionBuffer.dispose(),this.weightBuffer.dispose(),this.colorBuffer.dispose(),this.idBuffer.dispose(),this.plot.removeObject(this)}},1292:function(d,s,t){"use strict";var o=t(6832);d.exports={fragment:o(["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:o(["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:o(["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:o(["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"])}},248:function(d,s,t){var o=t(6832),r=t(5158),n=o(["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"]),i=o(["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"]),a=o(["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}"]),c=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];s.createShader=function(p){return r(p,n,i,null,c)},s.createPickShader=function(p){return r(p,n,a,null,c)}},6086:function(d,s,t){"use strict";d.exports=function(S){var _=S.gl||S.scene&&S.scene.gl,E=x(_);E.attributes.position.location=0,E.attributes.nextPosition.location=1,E.attributes.arcLength.location=2,E.attributes.lineWidth.location=3,E.attributes.color.location=4;var L=v(_);L.attributes.position.location=0,L.attributes.nextPosition.location=1,L.attributes.arcLength.location=2,L.attributes.lineWidth.location=3,L.attributes.color.location=4;for(var C=o(_),P=r(_,[{buffer:C,size:3,offset:0,stride:48},{buffer:C,size:3,offset:12,stride:48},{buffer:C,size:1,offset:24,stride:48},{buffer:C,size:1,offset:28,stride:48},{buffer:C,size:4,offset:32,stride:48}]),I=p(new Array(1024),[256,1,4]),U=0;U<1024;++U)I.data[U]=255;var z=n(_,I);z.wrap=_.REPEAT;var H=new w(_,E,L,C,P,z);return H.update(S),H};var o=t(5827),r=t(2944),n=t(8931),i=new Uint8Array(4),a=new Float32Array(i.buffer),c=t(5070),p=t(5050),f=t(248),x=f.createShader,v=f.createPickShader,g=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function y(S,_){for(var E=0,L=0;L<3;++L){var C=S[L]-_[L];E+=C*C}return Math.sqrt(E)}function h(S){for(var _=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)_[0][E]=Math.max(S[0][E],_[0][E]),_[1][E]=Math.min(S[1][E],_[1][E]);return _}function m(S,_,E,L){this.arcLength=S,this.position=_,this.index=E,this.dataCoordinate=L}function w(S,_,E,L,C,P){this.gl=S,this.shader=_,this.pickShader=E,this.buffer=L,this.vao=C,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=P,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var u=w.prototype;u.isTransparent=function(){return this.hasAlpha},u.isOpaque=function(){return!this.hasAlpha},u.pickSlots=1,u.setPickBase=function(S){this.pickId=S},u.drawTransparent=u.draw=function(S){if(this.vertexCount){var _=this.gl,E=this.shader,L=this.vao;E.bind(),E.uniforms={model:S.model||g,view:S.view||g,projection:S.projection||g,clipBounds:h(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[_.drawingBufferWidth,_.drawingBufferHeight],pixelRatio:this.pixelRatio},L.bind(),L.draw(_.TRIANGLE_STRIP,this.vertexCount),L.unbind()}},u.drawPick=function(S){if(this.vertexCount){var _=this.gl,E=this.pickShader,L=this.vao;E.bind(),E.uniforms={model:S.model||g,view:S.view||g,projection:S.projection||g,pickId:this.pickId,clipBounds:h(this.clipBounds),screenShape:[_.drawingBufferWidth,_.drawingBufferHeight],pixelRatio:this.pixelRatio},L.bind(),L.draw(_.TRIANGLE_STRIP,this.vertexCount),L.unbind()}},u.update=function(S){var _,E;this.dirty=!0;var L=!!S.connectGaps;"dashScale"in S&&(this.dashScale=S.dashScale),this.hasAlpha=!1,"opacity"in S&&(this.opacity=+S.opacity,this.opacity<1&&(this.hasAlpha=!0));var C=[],P=[],I=[],U=0,z=0,H=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],F=S.position||S.positions;if(F){var N=S.color||S.colors||[0,0,0,1],B=S.lineWidth||1,j=!1;e:for(_=1;_<F.length;++_){var J,G,V,W=F[_-1],X=F[_];for(P.push(U),I.push(W.slice()),E=0;E<3;++E){if(isNaN(W[E])||isNaN(X[E])||!isFinite(W[E])||!isFinite(X[E])){if(!L&&C.length>0){for(var K=0;K<24;++K)C.push(C[C.length-12]);z+=2,j=!0}continue e}H[0][E]=Math.min(H[0][E],W[E],X[E]),H[1][E]=Math.max(H[1][E],W[E],X[E])}Array.isArray(N[0])?(J=N.length>_-1?N[_-1]:N.length>0?N[N.length-1]:[0,0,0,1],G=N.length>_?N[_]:N.length>0?N[N.length-1]:[0,0,0,1]):J=G=N,3===J.length&&(J=[J[0],J[1],J[2],1]),3===G.length&&(G=[G[0],G[1],G[2],1]),!this.hasAlpha&&J[3]<1&&(this.hasAlpha=!0),V=Array.isArray(B)?B.length>_-1?B[_-1]:B.length>0?B[B.length-1]:[0,0,0,1]:B;var re=U;if(U+=y(W,X),j){for(E=0;E<2;++E)C.push(W[0],W[1],W[2],X[0],X[1],X[2],re,V,J[0],J[1],J[2],J[3]);z+=2,j=!1}C.push(W[0],W[1],W[2],X[0],X[1],X[2],re,V,J[0],J[1],J[2],J[3],W[0],W[1],W[2],X[0],X[1],X[2],re,-V,J[0],J[1],J[2],J[3],X[0],X[1],X[2],W[0],W[1],W[2],U,-V,G[0],G[1],G[2],G[3],X[0],X[1],X[2],W[0],W[1],W[2],U,V,G[0],G[1],G[2],G[3]),z+=4}}if(this.buffer.update(C),P.push(U),I.push(F[F.length-1].slice()),this.bounds=H,this.vertexCount=z,this.points=I,this.arcLength=P,"dashes"in S){var ee=S.dashes.slice();for(ee.unshift(0),_=1;_<ee.length;++_)ee[_]=ee[_-1]+ee[_];var ie=p(new Array(1024),[256,1,4]);for(_=0;_<256;++_){for(E=0;E<4;++E)ie.set(_,0,E,0);1&c.le(ee,ee[ee.length-1]*_/255)?ie.set(_,0,0,0):ie.set(_,0,0,255)}this.texture.setPixels(ie)}},u.dispose=function(){this.shader.dispose(),this.vao.dispose(),this.buffer.dispose()},u.pick=function(S){if(!S||S.id!==this.pickId)return null;var F,N,B,_=(F=S.value[0],N=S.value[1],B=S.value[2],i[0]=0,i[1]=B,i[2]=N,i[3]=F,a[0]),E=c.le(this.arcLength,_);if(E<0)return null;if(E===this.arcLength.length-1)return new m(this.arcLength[this.arcLength.length-1],this.points[this.points.length-1].slice(),E);for(var L=this.points[E],C=this.points[Math.min(E+1,this.points.length-1)],P=(_-this.arcLength[E])/(this.arcLength[E+1]-this.arcLength[E]),I=1-P,U=[0,0,0],z=0;z<3;++z)U[z]=I*L[z]+P*C[z];var H=Math.min(P<.5?E:E+1,this.points.length-1);return new m(_,U,H,this.points[H])}},7332:function(d){d.exports=function(s){var t=new Float32Array(16);return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t[4]=s[4],t[5]=s[5],t[6]=s[6],t[7]=s[7],t[8]=s[8],t[9]=s[9],t[10]=s[10],t[11]=s[11],t[12]=s[12],t[13]=s[13],t[14]=s[14],t[15]=s[15],t}},9823:function(d){d.exports=function(){var s=new Float32Array(16);return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}},7787:function(d){d.exports=function(s){var t=s[0],o=s[1],r=s[2],n=s[3],i=s[4],a=s[5],c=s[6],p=s[7],f=s[8],x=s[9],v=s[10],g=s[11],y=s[12],h=s[13],m=s[14],w=s[15];return(t*a-o*i)*(v*w-g*m)-(t*c-r*i)*(x*w-g*h)+(t*p-n*i)*(x*m-v*h)+(o*c-r*a)*(f*w-g*y)-(o*p-n*a)*(f*m-v*y)+(r*p-n*c)*(f*h-x*y)}},5950:function(d){d.exports=function(s,t){var o=t[0],r=t[1],n=t[2],i=t[3],a=o+o,c=r+r,p=n+n,f=o*a,x=r*a,v=r*c,g=n*a,y=n*c,h=n*p,m=i*a,w=i*c,u=i*p;return s[0]=1-v-h,s[1]=x+u,s[2]=g-w,s[3]=0,s[4]=x-u,s[5]=1-f-h,s[6]=y+m,s[7]=0,s[8]=g+w,s[9]=y-m,s[10]=1-f-v,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}},7280:function(d){d.exports=function(s,t,o){var r=t[0],n=t[1],i=t[2],a=t[3],c=r+r,p=n+n,f=i+i,x=r*c,v=r*p,g=r*f,y=n*p,h=n*f,m=i*f,w=a*c,u=a*p,S=a*f;return s[0]=1-(y+m),s[1]=v+S,s[2]=g-u,s[3]=0,s[4]=v-S,s[5]=1-(x+m),s[6]=h+w,s[7]=0,s[8]=g+u,s[9]=h-w,s[10]=1-(x+y),s[11]=0,s[12]=o[0],s[13]=o[1],s[14]=o[2],s[15]=1,s}},9947:function(d){d.exports=function(s){return s[0]=1,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=1,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=1,s[11]=0,s[12]=0,s[13]=0,s[14]=0,s[15]=1,s}},7437:function(d){d.exports=function(s,t){var o=t[0],r=t[1],n=t[2],i=t[3],a=t[4],c=t[5],p=t[6],f=t[7],x=t[8],v=t[9],g=t[10],y=t[11],h=t[12],m=t[13],w=t[14],u=t[15],S=o*c-r*a,_=o*p-n*a,E=o*f-i*a,L=r*p-n*c,C=r*f-i*c,P=n*f-i*p,I=x*m-v*h,U=x*w-g*h,z=x*u-y*h,H=v*w-g*m,F=v*u-y*m,N=g*u-y*w,B=S*N-_*F+E*H+L*z-C*U+P*I;return B?(s[0]=(c*N-p*F+f*H)*(B=1/B),s[1]=(n*F-r*N-i*H)*B,s[2]=(m*P-w*C+u*L)*B,s[3]=(g*C-v*P-y*L)*B,s[4]=(p*z-a*N-f*U)*B,s[5]=(o*N-n*z+i*U)*B,s[6]=(w*E-h*P-u*_)*B,s[7]=(x*P-g*E+y*_)*B,s[8]=(a*F-c*z+f*I)*B,s[9]=(r*z-o*F-i*I)*B,s[10]=(h*C-m*E+u*S)*B,s[11]=(v*E-x*C-y*S)*B,s[12]=(c*U-a*H-p*I)*B,s[13]=(o*H-r*U+n*I)*B,s[14]=(m*_-h*L-w*S)*B,s[15]=(x*L-v*_+g*S)*B,s):null}},3012:function(d,s,t){var o=t(9947);d.exports=function(r,n,i,a){var c,p,f,x,v,g,y,h,m,w,u=n[0],S=n[1],_=n[2],E=a[0],L=a[1],C=a[2],P=i[0],I=i[1],U=i[2];return Math.abs(u-P)<1e-6&&Math.abs(S-I)<1e-6&&Math.abs(_-U)<1e-6?o(r):(y=u-P,h=S-I,m=_-U,c=L*(m*=w=1/Math.sqrt(y*y+h*h+m*m))-C*(h*=w),p=C*(y*=w)-E*m,f=E*h-L*y,(w=Math.sqrt(c*c+p*p+f*f))?(c*=w=1/w,p*=w,f*=w):(c=0,p=0,f=0),x=h*f-m*p,v=m*c-y*f,g=y*p-h*c,(w=Math.sqrt(x*x+v*v+g*g))?(x*=w=1/w,v*=w,g*=w):(x=0,v=0,g=0),r[0]=c,r[1]=x,r[2]=y,r[3]=0,r[4]=p,r[5]=v,r[6]=h,r[7]=0,r[8]=f,r[9]=g,r[10]=m,r[11]=0,r[12]=-(c*u+p*S+f*_),r[13]=-(x*u+v*S+g*_),r[14]=-(y*u+h*S+m*_),r[15]=1,r)}},104:function(d){d.exports=function(s,t,o){var r=t[0],n=t[1],i=t[2],a=t[3],c=t[4],p=t[5],f=t[6],x=t[7],v=t[8],g=t[9],y=t[10],h=t[11],m=t[12],w=t[13],u=t[14],S=t[15],_=o[0],E=o[1],L=o[2],C=o[3];return s[0]=_*r+E*c+L*v+C*m,s[1]=_*n+E*p+L*g+C*w,s[2]=_*i+E*f+L*y+C*u,s[3]=_*a+E*x+L*h+C*S,s[4]=(_=o[4])*r+(E=o[5])*c+(L=o[6])*v+(C=o[7])*m,s[5]=_*n+E*p+L*g+C*w,s[6]=_*i+E*f+L*y+C*u,s[7]=_*a+E*x+L*h+C*S,s[8]=(_=o[8])*r+(E=o[9])*c+(L=o[10])*v+(C=o[11])*m,s[9]=_*n+E*p+L*g+C*w,s[10]=_*i+E*f+L*y+C*u,s[11]=_*a+E*x+L*h+C*S,s[12]=(_=o[12])*r+(E=o[13])*c+(L=o[14])*v+(C=o[15])*m,s[13]=_*n+E*p+L*g+C*w,s[14]=_*i+E*f+L*y+C*u,s[15]=_*a+E*x+L*h+C*S,s}},5268:function(d){d.exports=function(s,t,o,r,n,i,a){var c=1/(t-o),p=1/(r-n),f=1/(i-a);return s[0]=-2*c,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=-2*p,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=2*f,s[11]=0,s[12]=(t+o)*c,s[13]=(n+r)*p,s[14]=(a+i)*f,s[15]=1,s}},1120:function(d){d.exports=function(s,t,o,r,n){var i=1/Math.tan(t/2),a=1/(r-n);return s[0]=i/o,s[1]=0,s[2]=0,s[3]=0,s[4]=0,s[5]=i,s[6]=0,s[7]=0,s[8]=0,s[9]=0,s[10]=(n+r)*a,s[11]=-1,s[12]=0,s[13]=0,s[14]=2*n*r*a,s[15]=0,s}},4422:function(d){d.exports=function(s,t,o,r){var n,i,a,c,p,f,x,v,g,y,h,m,w,u,S,_,E,L,C,P,I,U,z,H,F=r[0],N=r[1],B=r[2],j=Math.sqrt(F*F+N*N+B*B);return Math.abs(j)<1e-6?null:(F*=j=1/j,N*=j,B*=j,n=Math.sin(o),a=1-(i=Math.cos(o)),p=t[1],f=t[2],x=t[3],g=t[5],y=t[6],h=t[7],w=t[9],u=t[10],S=t[11],C=F*N*a-B*n,P=N*N*a+i,I=B*N*a+F*n,U=F*B*a+N*n,z=N*B*a-F*n,H=B*B*a+i,s[0]=(c=t[0])*(_=F*F*a+i)+(v=t[4])*(E=N*F*a+B*n)+(m=t[8])*(L=B*F*a-N*n),s[1]=p*_+g*E+w*L,s[2]=f*_+y*E+u*L,s[3]=x*_+h*E+S*L,s[4]=c*C+v*P+m*I,s[5]=p*C+g*P+w*I,s[6]=f*C+y*P+u*I,s[7]=x*C+h*P+S*I,s[8]=c*U+v*z+m*H,s[9]=p*U+g*z+w*H,s[10]=f*U+y*z+u*H,s[11]=x*U+h*z+S*H,t!==s&&(s[12]=t[12],s[13]=t[13],s[14]=t[14],s[15]=t[15]),s)}},6109:function(d){d.exports=function(s,t,o){var r=Math.sin(o),n=Math.cos(o),i=t[4],a=t[5],c=t[6],p=t[7],f=t[8],x=t[9],v=t[10],g=t[11];return t!==s&&(s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s[12]=t[12],s[13]=t[13],s[14]=t[14],s[15]=t[15]),s[4]=i*n+f*r,s[5]=a*n+x*r,s[6]=c*n+v*r,s[7]=p*n+g*r,s[8]=f*n-i*r,s[9]=x*n-a*r,s[10]=v*n-c*r,s[11]=g*n-p*r,s}},7115:function(d){d.exports=function(s,t,o){var r=Math.sin(o),n=Math.cos(o),i=t[0],a=t[1],c=t[2],p=t[3],f=t[8],x=t[9],v=t[10],g=t[11];return t!==s&&(s[4]=t[4],s[5]=t[5],s[6]=t[6],s[7]=t[7],s[12]=t[12],s[13]=t[13],s[14]=t[14],s[15]=t[15]),s[0]=i*n-f*r,s[1]=a*n-x*r,s[2]=c*n-v*r,s[3]=p*n-g*r,s[8]=i*r+f*n,s[9]=a*r+x*n,s[10]=c*r+v*n,s[11]=p*r+g*n,s}},5240:function(d){d.exports=function(s,t,o){var r=Math.sin(o),n=Math.cos(o),i=t[0],a=t[1],c=t[2],p=t[3],f=t[4],x=t[5],v=t[6],g=t[7];return t!==s&&(s[8]=t[8],s[9]=t[9],s[10]=t[10],s[11]=t[11],s[12]=t[12],s[13]=t[13],s[14]=t[14],s[15]=t[15]),s[0]=i*n+f*r,s[1]=a*n+x*r,s[2]=c*n+v*r,s[3]=p*n+g*r,s[4]=f*n-i*r,s[5]=x*n-a*r,s[6]=v*n-c*r,s[7]=g*n-p*r,s}},3668:function(d){d.exports=function(s,t,o){var r=o[0],n=o[1],i=o[2];return s[0]=t[0]*r,s[1]=t[1]*r,s[2]=t[2]*r,s[3]=t[3]*r,s[4]=t[4]*n,s[5]=t[5]*n,s[6]=t[6]*n,s[7]=t[7]*n,s[8]=t[8]*i,s[9]=t[9]*i,s[10]=t[10]*i,s[11]=t[11]*i,s[12]=t[12],s[13]=t[13],s[14]=t[14],s[15]=t[15],s}},998:function(d){d.exports=function(s,t,o){var r,n,i,a,c,p,f,x,v,g,y,h,m=o[0],w=o[1],u=o[2];return t===s?(s[12]=t[0]*m+t[4]*w+t[8]*u+t[12],s[13]=t[1]*m+t[5]*w+t[9]*u+t[13],s[14]=t[2]*m+t[6]*w+t[10]*u+t[14],s[15]=t[3]*m+t[7]*w+t[11]*u+t[15]):(n=t[1],i=t[2],a=t[3],c=t[4],p=t[5],f=t[6],x=t[7],v=t[8],g=t[9],y=t[10],h=t[11],s[0]=r=t[0],s[1]=n,s[2]=i,s[3]=a,s[4]=c,s[5]=p,s[6]=f,s[7]=x,s[8]=v,s[9]=g,s[10]=y,s[11]=h,s[12]=r*m+c*w+v*u+t[12],s[13]=n*m+p*w+g*u+t[13],s[14]=i*m+f*w+y*u+t[14],s[15]=a*m+x*w+h*u+t[15]),s}},2142:function(d){d.exports=function(s,t){if(s===t){var o=t[1],r=t[2],n=t[3],i=t[6],a=t[7],c=t[11];s[1]=t[4],s[2]=t[8],s[3]=t[12],s[4]=o,s[6]=t[9],s[7]=t[13],s[8]=r,s[9]=i,s[11]=t[14],s[12]=n,s[13]=a,s[14]=c}else s[0]=t[0],s[1]=t[4],s[2]=t[8],s[3]=t[12],s[4]=t[1],s[5]=t[5],s[6]=t[9],s[7]=t[13],s[8]=t[2],s[9]=t[6],s[10]=t[10],s[11]=t[14],s[12]=t[3],s[13]=t[7],s[14]=t[11],s[15]=t[15];return s}},4340:function(d,s,t){"use strict";var o=t(957),r=t(7309);function n(c,p){for(var f=[0,0,0,0],x=0;x<4;++x)for(var v=0;v<4;++v)f[v]+=c[4*x+v]*p[x];return f}function i(c,p,f,x,v){for(var g=n(x,n(f,n(p,[c[0],c[1],c[2],1]))),y=0;y<3;++y)g[y]/=g[3];return[.5*v[0]*(1+g[0]),.5*v[1]*(1-g[1])]}function a(c,p){for(var f=[0,0,0],x=0;x<c.length;++x)for(var v=c[x],g=p[x],y=0;y<3;++y)f[y]+=g*v[y];return f}d.exports=function(c,p,f,x,v,g){if(1===c.length)return[0,c[0].slice()];for(var y=new Array(c.length),h=0;h<c.length;++h)y[h]=i(c[h],f,x,v,g);var m=0,w=1/0;for(h=0;h<y.length;++h){for(var u=0,S=0;S<2;++S)u+=Math.pow(y[h][S]-p[S],2);u<w&&(w=u,m=h)}var _=function(L,C){if(2===L.length){for(var P=0,I=0,U=0;U<2;++U)P+=Math.pow(C[U]-L[0][U],2),I+=Math.pow(C[U]-L[1][U],2);return(P=Math.sqrt(P))+(I=Math.sqrt(I))<1e-6?[1,0]:[I/(P+I),P/(I+P)]}if(3===L.length){var z=[0,0];return r(L[0],L[1],L[2],C,z),o(L,z)}return[]}(y,p),E=0;for(h=0;h<3;++h){if(_[h]<-.001||_[h]>1.0001)return null;E+=_[h]}return Math.abs(E-1)>.001?null:[m,a(c,_),_]}},2056:function(d,s,t){var o=t(6832),r=o(["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"]),n=o(["#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"]),i=o(["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}"]),a=o(["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}"]),c=o(["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}"]),p=o(["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}"]),f=o(["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}"]),x=o(["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}"]),v=o(["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}"]),g=o(["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}"]),y=o(["precision highp float;\n#define GLSLIFY 1\n\nuniform vec3 contourColor;\n\nvoid main() {\n  gl_FragColor = vec4(contourColor, 1.0);\n}\n"]);s.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},s.wireShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},s.pointShader={vertex:c,fragment:p,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},s.pickShader={vertex:f,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},s.pointPickShader={vertex:v,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},s.contourShader={vertex:g,fragment:y,attributes:[{name:"position",type:"vec3"}]}},8116:function(d,s,t){"use strict";var o=t(5158),r=t(5827),n=t(2944),i=t(8931),a=t(115),c=t(104),p=t(7437),f=t(5050),x=t(9156),v=t(7212),g=t(5306),y=t(2056),h=t(4340),m=y.meshShader,w=y.wireShader,u=y.pointShader,S=y.pickShader,_=y.pointPickShader,E=y.contourShader,L=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function C(j,J,G,V,W,X,K,re,ee,ie,oe,ce,me,de,he,ve,Pe,xe,ke,Ae,Te,Q,se,fe,ye,Me,Ie){this.gl=j,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=J,this.dirty=!0,this.triShader=G,this.lineShader=V,this.pointShader=W,this.pickShader=X,this.pointPickShader=K,this.contourShader=re,this.trianglePositions=ee,this.triangleColors=oe,this.triangleNormals=me,this.triangleUVs=ce,this.triangleIds=ie,this.triangleVAO=de,this.triangleCount=0,this.lineWidth=1,this.edgePositions=he,this.edgeColors=Pe,this.edgeUVs=xe,this.edgeIds=ve,this.edgeVAO=ke,this.edgeCount=0,this.pointPositions=Ae,this.pointColors=Q,this.pointUVs=se,this.pointSizes=fe,this.pointIds=Te,this.pointVAO=ye,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Me,this.contourVAO=Ie,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=L,this._view=L,this._projection=L,this._resolution=[1,1]}var P=C.prototype;function I(j,J){if(!J||!J.length)return 1;for(var G=0;G<J.length;++G){if(J.length<2)return 1;if(J[G][0]===j)return J[G][1];if(J[G][0]>j&&G>0){var V=(J[G][0]-j)/(J[G][0]-J[G-1][0]);return J[G][1]*(1-V)+V*J[G-1][1]}}return 1}P.isOpaque=function(){return!this.hasAlpha},P.isTransparent=function(){return this.hasAlpha},P.pickSlots=1,P.setPickBase=function(j){this.pickId=j},P.highlight=function(j){if(j&&this.contourEnable){for(var J=v(this.cells,this.intensity,j.intensity),G=J.cells,V=J.vertexIds,W=J.vertexWeights,X=G.length,K=g.mallocFloat32(6*X),re=0,ee=0;ee<X;++ee)for(var ie=G[ee],oe=0;oe<2;++oe){var ce=ie[0];2===ie.length&&(ce=ie[oe]);for(var he=W[ce],ve=1-he,Pe=this.positions[V[ce][0]],xe=this.positions[V[ce][1]],ke=0;ke<3;++ke)K[re++]=he*Pe[ke]+ve*xe[ke]}this.contourCount=re/3|0,this.contourPositions.update(K.subarray(0,re)),g.free(K)}else this.contourCount=0},P.update=function(j){j=j||{};var J=this.gl;this.dirty=!0,"contourEnable"in j&&(this.contourEnable=j.contourEnable),"contourColor"in j&&(this.contourColor=j.contourColor),"lineWidth"in j&&(this.lineWidth=j.lineWidth),"lightPosition"in j&&(this.lightPosition=j.lightPosition),this.hasAlpha=!1,"opacity"in j&&(this.opacity=j.opacity,this.opacity<1&&(this.hasAlpha=!0)),"opacityscale"in j&&(this.opacityscale=j.opacityscale,this.hasAlpha=!0),"ambient"in j&&(this.ambientLight=j.ambient),"diffuse"in j&&(this.diffuseLight=j.diffuse),"specular"in j&&(this.specularLight=j.specular),"roughness"in j&&(this.roughness=j.roughness),"fresnel"in j&&(this.fresnel=j.fresnel),j.texture?(this.texture.dispose(),this.texture=i(J,j.texture)):j.colormap&&(this.texture.shape=[256,256],this.texture.minFilter=J.LINEAR_MIPMAP_LINEAR,this.texture.magFilter=J.LINEAR,this.texture.setPixels(function(Rt,Ge){for(var We=x({colormap:Rt,nshades:256,format:"rgba"}),Be=new Uint8Array(1024),Ye=0;Ye<256;++Ye){for(var rt=We[Ye],Se=0;Se<3;++Se)Be[4*Ye+Se]=rt[Se];Be[4*Ye+3]=Ge?255*I(Ye/255,Ge):255*rt[3]}return f(Be,[256,256,4],[4,0,1])}(j.colormap,this.opacityscale)),this.texture.generateMipmap());var G=j.cells,V=j.positions;if(V&&G){var W=[],X=[],K=[],re=[],ee=[],ie=[],oe=[],ce=[],me=[],de=[],he=[],ve=[],Pe=[],xe=[];this.cells=G,this.positions=V;var ke=j.vertexNormals,Ae=j.cellNormals,Te=void 0===j.vertexNormalsEpsilon?1e-6:j.vertexNormalsEpsilon;j.useFacetNormals&&!Ae&&(Ae=a.faceNormals(G,V,void 0===j.faceNormalsEpsilon?1e-6:j.faceNormalsEpsilon)),Ae||ke||(ke=a.vertexNormals(G,V,Te));var se=j.vertexColors,fe=j.cellColors,ye=j.meshColor||[1,1,1,1],Me=j.vertexUVs,Ie=j.vertexIntensity,Ce=j.cellUVs,Re=j.cellIntensity,le=1/0,ge=-1/0;if(!Me&&!Ce)if(Ie)if(j.vertexIntensityBounds)le=+j.vertexIntensityBounds[0],ge=+j.vertexIntensityBounds[1];else for(var _e=0;_e<Ie.length;++_e){var Fe=Ie[_e];le=Math.min(le,Fe),ge=Math.max(ge,Fe)}else if(Re)if(j.cellIntensityBounds)le=+j.cellIntensityBounds[0],ge=+j.cellIntensityBounds[1];else for(_e=0;_e<Re.length;++_e)Fe=Re[_e],le=Math.min(le,Fe),ge=Math.max(ge,Fe);else for(_e=0;_e<V.length;++_e)Fe=V[_e][2],le=Math.min(le,Fe),ge=Math.max(ge,Fe);this.intensity=Ie||Re||function(Rt){for(var Ge=Rt.length,We=new Array(Ge),Be=0;Be<Ge;++Be)We[Be]=Rt[Be][2];return We}(V),this.pickVertex=!(Re||fe);var Ve=j.pointSizes,He=j.pointSize||1;for(this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],_e=0;_e<V.length;++_e)for(var nt=V[_e],tt=0;tt<3;++tt)!isNaN(nt[tt])&&isFinite(nt[tt])&&(this.bounds[0][tt]=Math.min(this.bounds[0][tt],nt[tt]),this.bounds[1][tt]=Math.max(this.bounds[1][tt],nt[tt]));var ot=0,dt=0,kt=0;e:for(_e=0;_e<G.length;++_e){var mt=G[_e];switch(mt.length){case 1:for(nt=V[Lt=mt[0]],tt=0;tt<3;++tt)if(isNaN(nt[tt])||!isFinite(nt[tt]))continue e;de.push(nt[0],nt[1],nt[2]),Ct=se?se[Lt]:fe?fe[_e]:ye,this.opacityscale&&Ie?X.push(Ct[0],Ct[1],Ct[2],this.opacity*I((Ie[Lt]-le)/(ge-le),this.opacityscale)):3===Ct.length?he.push(Ct[0],Ct[1],Ct[2],this.opacity):(he.push(Ct[0],Ct[1],Ct[2],Ct[3]*this.opacity),Ct[3]<1&&(this.hasAlpha=!0)),ve.push((It=Me?Me[Lt]:Ie?[(Ie[Lt]-le)/(ge-le),0]:Ce?Ce[_e]:Re?[(Re[_e]-le)/(ge-le),0]:[(nt[2]-le)/(ge-le),0])[0],It[1]),Pe.push(Ve?Ve[Lt]:He),xe.push(_e),kt+=1;break;case 2:for(tt=0;tt<2;++tt){nt=V[Lt=mt[tt]];for(var wt=0;wt<3;++wt)if(isNaN(nt[wt])||!isFinite(nt[wt]))continue e}for(tt=0;tt<2;++tt)nt=V[Lt=mt[tt]],ie.push(nt[0],nt[1],nt[2]),Ct=se?se[Lt]:fe?fe[_e]:ye,this.opacityscale&&Ie?X.push(Ct[0],Ct[1],Ct[2],this.opacity*I((Ie[Lt]-le)/(ge-le),this.opacityscale)):3===Ct.length?oe.push(Ct[0],Ct[1],Ct[2],this.opacity):(oe.push(Ct[0],Ct[1],Ct[2],Ct[3]*this.opacity),Ct[3]<1&&(this.hasAlpha=!0)),ce.push((It=Me?Me[Lt]:Ie?[(Ie[Lt]-le)/(ge-le),0]:Ce?Ce[_e]:Re?[(Re[_e]-le)/(ge-le),0]:[(nt[2]-le)/(ge-le),0])[0],It[1]),me.push(_e);dt+=1;break;case 3:for(tt=0;tt<3;++tt)for(nt=V[Lt=mt[tt]],wt=0;wt<3;++wt)if(isNaN(nt[wt])||!isFinite(nt[wt]))continue e;for(tt=0;tt<3;++tt){var Lt,Ct,It,Ut;nt=V[Lt=mt[2-tt]],W.push(nt[0],nt[1],nt[2]),(Ct=se?se[Lt]:fe?fe[_e]:ye)?this.opacityscale&&Ie?X.push(Ct[0],Ct[1],Ct[2],this.opacity*I((Ie[Lt]-le)/(ge-le),this.opacityscale)):3===Ct.length?X.push(Ct[0],Ct[1],Ct[2],this.opacity):(X.push(Ct[0],Ct[1],Ct[2],Ct[3]*this.opacity),Ct[3]<1&&(this.hasAlpha=!0)):X.push(.5,.5,.5,1),re.push((It=Me?Me[Lt]:Ie?[(Ie[Lt]-le)/(ge-le),0]:Ce?Ce[_e]:Re?[(Re[_e]-le)/(ge-le),0]:[(nt[2]-le)/(ge-le),0])[0],It[1]),K.push((Ut=ke?ke[Lt]:Ae[_e])[0],Ut[1],Ut[2]),ee.push(_e)}ot+=1}}this.pointCount=kt,this.edgeCount=dt,this.triangleCount=ot,this.pointPositions.update(de),this.pointColors.update(he),this.pointUVs.update(ve),this.pointSizes.update(Pe),this.pointIds.update(new Uint32Array(xe)),this.edgePositions.update(ie),this.edgeColors.update(oe),this.edgeUVs.update(ce),this.edgeIds.update(new Uint32Array(me)),this.trianglePositions.update(W),this.triangleColors.update(X),this.triangleUVs.update(re),this.triangleNormals.update(K),this.triangleIds.update(new Uint32Array(ee))}},P.drawTransparent=P.draw=function(j){for(var J=this.gl,G=(j=j||{}).model||L,V=j.view||L,W=j.projection||L,X=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],K=0;K<3;++K)X[0][K]=Math.max(X[0][K],this.clipBounds[0][K]),X[1][K]=Math.min(X[1][K],this.clipBounds[1][K]);var re={model:G,view:V,projection:W,inverseModel:L.slice(),clipBounds:X,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};re.inverseModel=p(re.inverseModel,re.model),J.disable(J.CULL_FACE),this.texture.bind(0);var ee=new Array(16);for(c(ee,re.view,re.model),c(ee,re.projection,ee),p(ee,ee),K=0;K<3;++K)re.eyePosition[K]=ee[12+K]/ee[15];var ie,oe=ee[15];for(K=0;K<3;++K)oe+=this.lightPosition[K]*ee[4*K+3];for(K=0;K<3;++K){for(var ce=ee[12+K],me=0;me<3;++me)ce+=ee[4*me+K]*this.lightPosition[me];re.lightPosition[K]=ce/oe}this.triangleCount>0&&((ie=this.triShader).bind(),ie.uniforms=re,this.triangleVAO.bind(),J.drawArrays(J.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&this.lineWidth>0&&((ie=this.lineShader).bind(),ie.uniforms=re,this.edgeVAO.bind(),J.lineWidth(this.lineWidth*this.pixelRatio),J.drawArrays(J.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((ie=this.pointShader).bind(),ie.uniforms=re,this.pointVAO.bind(),J.drawArrays(J.POINTS,0,this.pointCount),this.pointVAO.unbind()),this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0&&((ie=this.contourShader).bind(),ie.uniforms=re,this.contourVAO.bind(),J.drawArrays(J.LINES,0,this.contourCount),this.contourVAO.unbind())},P.drawPick=function(j){for(var J=this.gl,G=(j=j||{}).model||L,V=j.view||L,W=j.projection||L,X=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],K=0;K<3;++K)X[0][K]=Math.max(X[0][K],this.clipBounds[0][K]),X[1][K]=Math.min(X[1][K],this.clipBounds[1][K]);this._model=[].slice.call(G),this._view=[].slice.call(V),this._projection=[].slice.call(W),this._resolution=[J.drawingBufferWidth,J.drawingBufferHeight];var re,ee={model:G,view:V,projection:W,clipBounds:X,pickId:this.pickId/255};(re=this.pickShader).bind(),re.uniforms=ee,this.triangleCount>0&&(this.triangleVAO.bind(),J.drawArrays(J.TRIANGLES,0,3*this.triangleCount),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),J.lineWidth(this.lineWidth*this.pixelRatio),J.drawArrays(J.LINES,0,2*this.edgeCount),this.edgeVAO.unbind()),this.pointCount>0&&((re=this.pointPickShader).bind(),re.uniforms=ee,this.pointVAO.bind(),J.drawArrays(J.POINTS,0,this.pointCount),this.pointVAO.unbind())},P.pick=function(j){if(!j||j.id!==this.pickId)return null;for(var J=j.value[0]+256*j.value[1]+65536*j.value[2],G=this.cells[J],V=this.positions,W=new Array(G.length),X=0;X<G.length;++X)W[X]=V[G[X]];var K=j.coord[0],re=j.coord[1];if(!this.pickVertex){var ee=this.positions[G[0]],ie=this.positions[G[1]],oe=this.positions[G[2]];return{_cellCenter:!0,position:[K,re],index:J,cell:G,cellId:J,intensity:this.intensity[J],dataCoordinate:[(ee[0]+ie[0]+oe[0])/3,(ee[1]+ie[1]+oe[1])/3,(ee[2]+ie[2]+oe[2])/3]}}var me=h(W,[K*this.pixelRatio,this._resolution[1]-re*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!me)return null;var de=me[2],he=0;for(X=0;X<G.length;++X)he+=de[X]*this.intensity[G[X]];return{position:me[1],index:G[me[0]],cell:G,cellId:J,intensity:he,dataCoordinate:this.positions[G[me[0]]]}},P.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()},d.exports=function(j,J){if(1===arguments.length&&(j=(J=j).gl),!(j.getExtension("OES_standard_derivatives")||j.getExtension("MOZ_OES_standard_derivatives")||j.getExtension("WEBKIT_OES_standard_derivatives")))throw new Error("derivatives not supported");var V=function U(j){var J=o(j,m.vertex,m.fragment);return J.attributes.position.location=0,J.attributes.color.location=2,J.attributes.uv.location=3,J.attributes.normal.location=4,J}(j),W=function z(j){var J=o(j,w.vertex,w.fragment);return J.attributes.position.location=0,J.attributes.color.location=2,J.attributes.uv.location=3,J}(j),X=function H(j){var J=o(j,u.vertex,u.fragment);return J.attributes.position.location=0,J.attributes.color.location=2,J.attributes.uv.location=3,J.attributes.pointSize.location=4,J}(j),K=function F(j){var J=o(j,S.vertex,S.fragment);return J.attributes.position.location=0,J.attributes.id.location=1,J}(j),re=function N(j){var J=o(j,_.vertex,_.fragment);return J.attributes.position.location=0,J.attributes.id.location=1,J.attributes.pointSize.location=4,J}(j),ee=function B(j){var J=o(j,E.vertex,E.fragment);return J.attributes.position.location=0,J}(j),ie=i(j,f(new Uint8Array([255,255,255,255]),[1,1,4]));ie.generateMipmap(),ie.minFilter=j.LINEAR_MIPMAP_LINEAR,ie.magFilter=j.LINEAR;var oe=r(j),ce=r(j),me=r(j),de=r(j),he=r(j),ve=n(j,[{buffer:oe,type:j.FLOAT,size:3},{buffer:he,type:j.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:ce,type:j.FLOAT,size:4},{buffer:me,type:j.FLOAT,size:2},{buffer:de,type:j.FLOAT,size:3}]),Pe=r(j),xe=r(j),ke=r(j),Ae=r(j),Te=n(j,[{buffer:Pe,type:j.FLOAT,size:3},{buffer:Ae,type:j.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:xe,type:j.FLOAT,size:4},{buffer:ke,type:j.FLOAT,size:2}]),Q=r(j),se=r(j),fe=r(j),ye=r(j),Me=r(j),Ie=n(j,[{buffer:Q,type:j.FLOAT,size:3},{buffer:Me,type:j.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:se,type:j.FLOAT,size:4},{buffer:fe,type:j.FLOAT,size:2},{buffer:ye,type:j.FLOAT,size:1}]),Ce=r(j),le=new C(j,ie,V,W,X,K,re,ee,oe,he,ce,me,de,ve,Pe,Ae,xe,ke,Te,Q,Me,se,fe,ye,Ie,Ce,n(j,[{buffer:Ce,type:j.FLOAT,size:3}]));return le.update(J),le}},4554:function(d,s,t){"use strict";d.exports=function(f){var x=f.gl;return new i(f,o(x,[0,0,0,1,1,0,1,1]),r(x,n.boxVert,n.lineFrag))};var o=t(5827),r=t(5158),n=t(2709);function i(f,x,v){this.plot=f,this.vbo=x,this.shader=v}var a,c,p=i.prototype;p.bind=function(){var f=this.shader;this.vbo.bind(),this.shader.bind(),f.attributes.coord.pointer(),f.uniforms.screenBox=this.plot.screenBox},p.drawBox=(a=[0,0],c=[0,0],function(f,x,v,g,y){var m=this.shader,w=this.plot.gl;a[0]=f,a[1]=x,c[0]=v,c[1]=g,m.uniforms.lo=a,m.uniforms.hi=c,m.uniforms.color=y,w.drawArrays(w.TRIANGLE_STRIP,0,4)}),p.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},3016:function(d,s,t){"use strict";d.exports=function(h){var m=h.gl;return new a(h,o(m),r(m,i.gridVert,i.gridFrag),r(m,i.tickVert,i.gridFrag))};var o=t(5827),r=t(5158),n=t(5070),i=t(2709);function a(h,m,w,u){this.plot=h,this.vbo=m,this.shader=w,this.tickShader=u,this.ticks=[[],[]]}function c(h,m){return h-m}var p,f,x,v,g,h,m,w,u,S,_,y=a.prototype;y.draw=(p=[0,0],f=[0,0],x=[0,0],function(){for(var h=this.plot,m=this.vbo,w=this.shader,u=this.ticks,S=h.gl,_=h._tickBounds,E=h.dataBox,L=h.viewBox,C=h.gridLineWidth,P=h.gridLineColor,I=h.gridLineEnable,U=h.pixelRatio,z=0;z<2;++z){var H=_[z],N=.5*(E[z+2]+E[z]),B=E[z+2]-E[z];f[z]=2*(_[z+2]-H)/B,p[z]=2*(H-N)/B}w.bind(),m.bind(),w.attributes.dataCoord.pointer(),w.uniforms.dataShift=p,w.uniforms.dataScale=f;var j=0;for(z=0;z<2;++z){x[0]=x[1]=0,x[z]=1,w.uniforms.dataAxis=x,w.uniforms.lineWidth=C[z]/(L[z+2]-L[z])*U,w.uniforms.color=P[z];var J=6*u[z].length;I[z]&&J&&S.drawArrays(S.TRIANGLES,j,J),j+=J}}),y.drawTickMarks=(h=[0,0],m=[0,0],w=[1,0],u=[0,1],S=[0,0],_=[0,0],function(){for(var E=this.plot,L=this.vbo,C=this.tickShader,P=this.ticks,I=E.gl,U=E._tickBounds,z=E.dataBox,H=E.viewBox,F=E.pixelRatio,N=E.screenBox,B=N[2]-N[0],j=N[3]-N[1],J=H[2]-H[0],G=H[3]-H[1],V=0;V<2;++V){var W=U[V],K=.5*(z[V+2]+z[V]),re=z[V+2]-z[V];m[V]=2*(U[V+2]-W)/re,h[V]=2*(W-K)/re}m[0]*=J/B,h[0]*=J/B,m[1]*=G/j,h[1]*=G/j,C.bind(),L.bind(),C.attributes.dataCoord.pointer();var ee=C.uniforms;ee.dataShift=h,ee.dataScale=m;var ie=E.tickMarkLength,oe=E.tickMarkWidth,ce=E.tickMarkColor,me=6*P[0].length,de=Math.min(n.ge(P[0],(z[0]-U[0])/(U[2]-U[0]),c),P[0].length),he=Math.min(n.gt(P[0],(z[2]-U[0])/(U[2]-U[0]),c),P[0].length),ve=0+6*de,Pe=6*Math.max(0,he-de),xe=Math.min(n.ge(P[1],(z[1]-U[1])/(U[3]-U[1]),c),P[1].length),ke=Math.min(n.gt(P[1],(z[3]-U[1])/(U[3]-U[1]),c),P[1].length),Ae=me+6*xe,Te=6*Math.max(0,ke-xe);S[0]=2*(H[0]-ie[1])/B-1,S[1]=(H[3]+H[1])/j-1,_[0]=ie[1]*F/B,_[1]=oe[1]*F/j,Te&&(ee.color=ce[1],ee.tickScale=_,ee.dataAxis=u,ee.screenOffset=S,I.drawArrays(I.TRIANGLES,Ae,Te)),S[0]=(H[2]+H[0])/B-1,S[1]=2*(H[1]-ie[0])/j-1,_[0]=oe[0]*F/B,_[1]=ie[0]*F/j,Pe&&(ee.color=ce[0],ee.tickScale=_,ee.dataAxis=w,ee.screenOffset=S,I.drawArrays(I.TRIANGLES,ve,Pe)),S[0]=2*(H[2]+ie[3])/B-1,S[1]=(H[3]+H[1])/j-1,_[0]=ie[3]*F/B,_[1]=oe[3]*F/j,Te&&(ee.color=ce[3],ee.tickScale=_,ee.dataAxis=u,ee.screenOffset=S,I.drawArrays(I.TRIANGLES,Ae,Te)),S[0]=(H[2]+H[0])/B-1,S[1]=2*(H[3]+ie[2])/j-1,_[0]=oe[2]*F/B,_[1]=ie[2]*F/j,Pe&&(ee.color=ce[2],ee.tickScale=_,ee.dataAxis=w,ee.screenOffset=S,I.drawArrays(I.TRIANGLES,ve,Pe))}),y.update=(v=[1,1,-1,-1,1,-1],g=[1,-1,1,1,-1,-1],function(h){for(var m=h.ticks,w=h.bounds,u=new Float32Array(18*(m[0].length+m[1].length)),S=0,_=[[],[]],E=0;E<2;++E)for(var L=_[E],C=m[E],P=w[E],I=w[E+2],U=0;U<C.length;++U){var z=(C[U].x-P)/(I-P);L.push(z);for(var H=0;H<6;++H)u[S++]=z,u[S++]=v[H],u[S++]=g[H]}this.ticks=_,this.vbo.update(u)}),y.dispose=function(){this.vbo.dispose(),this.shader.dispose(),this.tickShader.dispose()}},1154:function(d,s,t){"use strict";d.exports=function(f){var x=f.gl;return new i(f,o(x,[-1,-1,-1,1,1,-1,1,1]),r(x,n.lineVert,n.lineFrag))};var o=t(5827),r=t(5158),n=t(2709);function i(f,x,v){this.plot=f,this.vbo=x,this.shader=v}var a,c,p=i.prototype;p.bind=function(){var f=this.shader;this.vbo.bind(),this.shader.bind(),f.attributes.coord.pointer(),f.uniforms.screenBox=this.plot.screenBox},p.drawLine=(a=[0,0],c=[0,0],function(f,x,v,g,y,h){var m=this.plot,w=this.shader,u=m.gl;a[0]=f,a[1]=x,c[0]=v,c[1]=g,w.uniforms.start=a,w.uniforms.end=c,w.uniforms.width=y*m.pixelRatio,w.uniforms.color=h,u.drawArrays(u.TRIANGLE_STRIP,0,4)}),p.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},2709:function(d,s,t){"use strict";var o=t(6832),r=o(["precision lowp float;\n#define GLSLIFY 1\nuniform vec4 color;\nvoid main() {\n  gl_FragColor = vec4(color.xyz * color.w, color.w);\n}\n"]);d.exports={lineVert:o(["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:r,textVert:o(["#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:r,gridVert:o(["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:r,boxVert:o(["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:o(["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"])}},5613:function(d,s,t){"use strict";d.exports=function(m){var w=m.gl;return new c(m,o(w),r(w,a.textVert,a.textFrag))};var o=t(5827),r=t(5158),n=t(6946),i=t(5070),a=t(2709);function c(m,w,u){this.plot=m,this.vbo=w,this.shader=u,this.tickOffset=[[],[]],this.tickX=[[],[]],this.labelOffset=[0,0],this.labelCount=[0,0]}var p,f,x,v,g,y,m,w,h=c.prototype;h.drawTicks=(p=[0,0],f=[0,0],x=[0,0],function(m){var w=this.plot,u=this.shader,S=this.tickX[m],_=this.tickOffset[m],E=w.gl,L=w.viewBox,C=w.dataBox,P=w.screenBox,I=w.pixelRatio,U=w.tickEnable,z=w.tickPad,H=w.tickColor,F=w.tickAngle,N=w.labelEnable,B=w.labelPad,j=w.labelColor,J=w.labelAngle,G=this.labelOffset[m],V=this.labelCount[m],W=i.lt(S,C[m]),X=i.le(S,C[m+2]);p[0]=p[1]=0,p[m]=1,f[m]=(L[2+m]+L[m])/(P[2+m]-P[m])-1;var K=2/P[2+(1^m)]-P[1^m];f[1^m]=K*L[1^m]-1,U[m]&&(f[1^m]-=K*I*z[m],W<X&&_[X]>_[W]&&(u.uniforms.dataAxis=p,u.uniforms.screenOffset=f,u.uniforms.color=H[m],u.uniforms.angle=F[m],E.drawArrays(E.TRIANGLES,_[W],_[X]-_[W]))),N[m]&&V&&(f[1^m]-=K*I*B[m],u.uniforms.dataAxis=x,u.uniforms.screenOffset=f,u.uniforms.color=j[m],u.uniforms.angle=J[m],E.drawArrays(E.TRIANGLES,G,V)),f[1^m]=K*L[2+(1^m)]-1,U[m+2]&&(f[1^m]+=K*I*z[m+2],W<X&&_[X]>_[W]&&(u.uniforms.dataAxis=p,u.uniforms.screenOffset=f,u.uniforms.color=H[m+2],u.uniforms.angle=F[m+2],E.drawArrays(E.TRIANGLES,_[W],_[X]-_[W]))),N[m+2]&&V&&(f[1^m]+=K*I*B[m+2],u.uniforms.dataAxis=x,u.uniforms.screenOffset=f,u.uniforms.color=j[m+2],u.uniforms.angle=J[m+2],E.drawArrays(E.TRIANGLES,G,V))}),h.drawTitle=(m=[0,0],w=[0,0],function(){var u=this.plot,S=this.shader,_=u.gl,E=u.screenBox,L=u.titleCenter,C=u.titleAngle,P=u.titleColor,I=u.pixelRatio;if(this.titleCount){for(var U=0;U<2;++U)w[U]=2*(L[U]*I-E[U])/(E[2+U]-E[U])-1;S.bind(),S.uniforms.dataAxis=m,S.uniforms.screenOffset=w,S.uniforms.angle=C,S.uniforms.color=P,_.drawArrays(_.TRIANGLES,this.titleOffset,this.titleCount)}}),h.bind=(v=[0,0],g=[0,0],y=[0,0],function(){var m=this.plot,w=this.shader,u=m._tickBounds,S=m.dataBox,_=m.screenBox,E=m.viewBox;w.bind();for(var L=0;L<2;++L){var C=u[L],I=.5*(S[L+2]+S[L]),U=S[L+2]-S[L],H=E[L+2]-E[L],N=_[L+2]-_[L];g[L]=2*(u[L+2]-C)/U*H/N,v[L]=2*(C-I)/U*H/N}y[1]=2*m.pixelRatio/(_[3]-_[1]),y[0]=y[1]*(_[3]-_[1])/(_[2]-_[0]),w.uniforms.dataScale=g,w.uniforms.dataShift=v,w.uniforms.textScale=y,this.vbo.bind(),w.attributes.textCoordinate.pointer()}),h.update=function(m){var w,u,S,_,E,L=[],C=m.ticks,P=m.bounds;for(E=0;E<2;++E){var I=[Math.floor(L.length/3)],U=[-1/0],z=C[E];for(w=0;w<z.length;++w){var H=z[w],F=H.x,B=H.font||"sans-serif";_=H.fontSize||12;for(var j=1/(P[E+2]-P[E]),J=P[E],G=H.text.split("\n"),V=0;V<G.length;V++)for(S=n(B,G[V]).data,u=0;u<S.length;u+=2)L.push(S[u]*_,-S[u+1]*_-V*_*1.2,(F-J)*j);I.push(Math.floor(L.length/3)),U.push(F)}this.tickOffset[E]=I,this.tickX[E]=U}for(E=0;E<2;++E){for(this.labelOffset[E]=Math.floor(L.length/3),S=n(m.labelFont[E],m.labels[E],{textAlign:"center"}).data,_=m.labelSize[E],w=0;w<S.length;w+=2)L.push(S[w]*_,-S[w+1]*_,0);this.labelCount[E]=Math.floor(L.length/3)-this.labelOffset[E]}for(this.titleOffset=Math.floor(L.length/3),S=n(m.titleFont,m.title).data,_=m.titleSize,w=0;w<S.length;w+=2)L.push(S[w]*_,-S[w+1]*_,0);this.titleCount=Math.floor(L.length/3)-this.titleOffset,this.vbo.update(L)},h.dispose=function(){this.vbo.dispose(),this.shader.dispose()}},2117:function(d,s,t){"use strict";d.exports=function(v){var g=v.gl,y=new c(g,o(g,[g.drawingBufferWidth,g.drawingBufferHeight]));return y.grid=r(y),y.text=n(y),y.line=i(y),y.box=a(y),y.update(v),y};var o=t(2611),r=t(3016),n=t(5613),i=t(1154),a=t(4554);function c(v,g){this.gl=v,this.pickBuffer=g,this.screenBox=[0,0,v.drawingBufferWidth,v.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 p=c.prototype;function f(v){for(var g=v.slice(),y=0;y<g.length;++y)g[y]=g[y].slice();return g}function x(v,g){return v.x-g.x}p.setDirty=function(){this.dirty=this.pickDirty=!0},p.setOverlayDirty=function(){this.dirty=!0},p.nextDepthValue=function(){return this._depthCounter++/65536},p.draw=function(){var v=this.gl,g=this.screenBox,y=this.viewBox,h=this.dataBox,m=this.pixelRatio,w=this.grid,u=this.line,S=this.text,_=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,v.bindFramebuffer(v.FRAMEBUFFER,null),v.enable(v.SCISSOR_TEST),v.disable(v.DEPTH_TEST),v.depthFunc(v.LESS),v.depthMask(!1),v.enable(v.BLEND),v.blendEquation(v.FUNC_ADD,v.FUNC_ADD),v.blendFunc(v.ONE,v.ONE_MINUS_SRC_ALPHA),this.borderColor){v.scissor(g[0],g[1],g[2]-g[0],g[3]-g[1]);var E=this.borderColor;v.clearColor(E[0]*E[3],E[1]*E[3],E[2]*E[3],E[3]),v.clear(v.COLOR_BUFFER_BIT|v.DEPTH_BUFFER_BIT)}v.scissor(y[0],y[1],y[2]-y[0],y[3]-y[1]),v.viewport(y[0],y[1],y[2]-y[0],y[3]-y[1]);var L=this.backgroundColor;v.clearColor(L[0]*L[3],L[1]*L[3],L[2]*L[3],L[3]),v.clear(v.COLOR_BUFFER_BIT),w.draw();var C=this.zeroLineEnable,P=this.zeroLineColor,I=this.zeroLineWidth;if(C[0]||C[1]){u.bind();for(var U=0;U<2;++U)if(C[U]&&h[U]<=0&&h[U+2]>=0){var z=g[U]-h[U]*(g[U+2]-g[U])/(h[U+2]-h[U]);0===U?u.drawLine(z,g[1],z,g[3],I[U],P[U]):u.drawLine(g[0],z,g[2],z,I[U],P[U])}}for(U=0;U<_.length;++U)_[U].draw();v.viewport(g[0],g[1],g[2]-g[0],g[3]-g[1]),v.scissor(g[0],g[1],g[2]-g[0],g[3]-g[1]),this.grid.drawTickMarks(),u.bind();var H=this.borderLineEnable,F=this.borderLineWidth,N=this.borderLineColor;for(H[1]&&u.drawLine(y[0],y[1]-.5*F[1]*m,y[0],y[3]+.5*F[3]*m,F[1],N[1]),H[0]&&u.drawLine(y[0]-.5*F[0]*m,y[1],y[2]+.5*F[2]*m,y[1],F[0],N[0]),H[3]&&u.drawLine(y[2],y[1]-.5*F[1]*m,y[2],y[3]+.5*F[3]*m,F[3],N[3]),H[2]&&u.drawLine(y[0]-.5*F[0]*m,y[3],y[2]+.5*F[2]*m,y[3],F[2],N[2]),S.bind(),U=0;U<2;++U)S.drawTicks(U);this.titleEnable&&S.drawTitle();var B=this.overlays;for(U=0;U<B.length;++U)B[U].draw();v.disable(v.SCISSOR_TEST),v.disable(v.BLEND),v.depthMask(!0)}},p.drawPick=function(){if(!this.static){var v=this.pickBuffer;this._pickTimeout=null,v.begin();for(var g=1,y=this.objects,h=0;h<y.length;++h)g=y[h].drawPick(g);v.end()}},p.pick=function(v,g){if(!this.static){var y=this.pixelRatio,h=this.pickPixelRatio,m=this.viewBox,w=0|Math.round((v-m[0]/y)*h),u=0|Math.round((g-m[1]/y)*h),S=this.pickBuffer.query(w,u,this.pickRadius);if(!S)return null;for(var _=S.id+(S.value[0]<<8)+(S.value[1]<<16)+(S.value[2]<<24),E=this.objects,L=0;L<E.length;++L){var C=E[L].pick(w,u,_);if(C)return C}return null}},p.setScreenBox=function(v){var g=this.screenBox,y=this.pixelRatio;g[0]=0|Math.round(v[0]*y),g[1]=0|Math.round(v[1]*y),g[2]=0|Math.round(v[2]*y),g[3]=0|Math.round(v[3]*y),this.setDirty()},p.setDataBox=function(v){var g=this.dataBox;(g[0]!==v[0]||g[1]!==v[1]||g[2]!==v[2]||g[3]!==v[3])&&(g[0]=v[0],g[1]=v[1],g[2]=v[2],g[3]=v[3],this.setDirty())},p.setViewBox=function(v){var g=this.pixelRatio,y=this.viewBox;y[0]=0|Math.round(v[0]*g),y[1]=0|Math.round(v[1]*g),y[2]=0|Math.round(v[2]*g),y[3]=0|Math.round(v[3]*g);var h=this.pickPixelRatio;this.pickBuffer.shape=[0|Math.round((v[2]-v[0])*h),0|Math.round((v[3]-v[1])*h)],this.setDirty()},p.update=function(v){var g=this.gl;this.pixelRatio=(v=v||{}).pixelRatio||1;var y=this.pixelRatio;this.pickPixelRatio=Math.max(y,1),this.setScreenBox(v.screenBox||[0,0,g.drawingBufferWidth/y,g.drawingBufferHeight/y]),this.setViewBox(v.viewBox||[.125*(this.screenBox[2]-this.screenBox[0])/y,.125*(this.screenBox[3]-this.screenBox[1])/y,.875*(this.screenBox[2]-this.screenBox[0])/y,.875*(this.screenBox[3]-this.screenBox[1])/y]);var h=this.viewBox,m=(h[2]-h[0])/(h[3]-h[1]);this.setDataBox(v.dataBox||[-10,-10/m,10,10/m]),this.borderColor=!1!==v.borderColor&&(v.borderColor||[0,0,0,0]).slice(),this.backgroundColor=(v.backgroundColor||[0,0,0,0]).slice(),this.gridLineEnable=(v.gridLineEnable||[!0,!0]).slice(),this.gridLineWidth=(v.gridLineWidth||[1,1]).slice(),this.gridLineColor=f(v.gridLineColor||[[.5,.5,.5,1],[.5,.5,.5,1]]),this.zeroLineEnable=(v.zeroLineEnable||[!0,!0]).slice(),this.zeroLineWidth=(v.zeroLineWidth||[4,4]).slice(),this.zeroLineColor=f(v.zeroLineColor||[[0,0,0,1],[0,0,0,1]]),this.tickMarkLength=(v.tickMarkLength||[0,0,0,0]).slice(),this.tickMarkWidth=(v.tickMarkWidth||[0,0,0,0]).slice(),this.tickMarkColor=f(v.tickMarkColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.titleCenter=(v.titleCenter||[.5*(h[0]+h[2])/y,(h[3]+120)/y]).slice(),this.titleEnable=!("titleEnable"in v)||!!v.titleEnable,this.titleAngle=v.titleAngle||0,this.titleColor=(v.titleColor||[0,0,0,1]).slice(),this.labelPad=(v.labelPad||[15,15,15,15]).slice(),this.labelAngle=(v.labelAngle||[0,Math.PI/2,0,3*Math.PI/2]).slice(),this.labelEnable=(v.labelEnable||[!0,!0,!0,!0]).slice(),this.labelColor=f(v.labelColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.tickPad=(v.tickPad||[15,15,15,15]).slice(),this.tickAngle=(v.tickAngle||[0,0,0,0]).slice(),this.tickEnable=(v.tickEnable||[!0,!0,!0,!0]).slice(),this.tickColor=f(v.tickColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]),this.borderLineEnable=(v.borderLineEnable||[!0,!0,!0,!0]).slice(),this.borderLineWidth=(v.borderLineWidth||[2,2,2,2]).slice(),this.borderLineColor=f(v.borderLineColor||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]);var w=v.ticks||[[],[]],u=this._tickBounds;u[0]=u[1]=1/0,u[2]=u[3]=-1/0;for(var S=0;S<2;++S){var _=w[S].slice(0);0!==_.length&&(_.sort(x),u[S]=Math.min(u[S],_[0].x),u[S+2]=Math.max(u[S+2],_[_.length-1].x))}this.grid.update({bounds:u,ticks:w}),this.text.update({bounds:u,ticks:w,labels:v.labels||["x","y"],labelSize:v.labelSize||[12,12],labelFont:v.labelFont||["sans-serif","sans-serif"],title:v.title||"",titleSize:v.titleSize||18,titleFont:v.titleFont||"sans-serif"}),this.static=!!v.static,this.setDirty()},p.dispose=function(){this.box.dispose(),this.grid.dispose(),this.text.dispose(),this.line.dispose();for(var v=this.objects.length-1;v>=0;--v)this.objects[v].dispose();for(this.objects.length=0,v=this.overlays.length-1;v>=0;--v)this.overlays[v].dispose();this.overlays.length=0,this.gl=null},p.addObject=function(v){this.objects.indexOf(v)<0&&(this.objects.push(v),this.setDirty())},p.removeObject=function(v){for(var g=this.objects,y=0;y<g.length;++y)if(g[y]===v){g.splice(y,1),this.setDirty();break}},p.addOverlay=function(v){this.overlays.indexOf(v)<0&&(this.overlays.push(v),this.setOverlayDirty())},p.removeOverlay=function(v){for(var g=this.overlays,y=0;y<g.length;++y)if(g[y]===v){g.splice(y,1),this.setOverlayDirty();break}}},4296:function(d,s,t){"use strict";d.exports=function(p,f){p=p||document.body;var x=[.01,1/0];"distanceLimits"in(f=f||{})&&(x[0]=f.distanceLimits[0],x[1]=f.distanceLimits[1]),"zoomMin"in f&&(x[0]=f.zoomMin),"zoomMax"in f&&(x[1]=f.zoomMax);var v=r({center:f.center||[0,0,0],up:f.up||[0,1,0],eye:f.eye||[0,0,10],mode:f.mode||"orbit",distanceLimits:x}),g=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],y=0,h=p.clientWidth,m=p.clientHeight,w={keyBindingMode:"rotate",enableWheel:!0,view:v,element:p,delay:f.delay||16,rotateSpeed:f.rotateSpeed||1,zoomSpeed:f.zoomSpeed||1,translateSpeed:f.translateSpeed||1,flipX:!!f.flipX,flipY:!!f.flipY,modes:v.modes,_ortho:f._ortho||f.projection&&"orthographic"===f.projection.type||!1,tick:function(){var u=o(),S=this.delay,_=u-2*S;v.idle(u-S),v.recalcMatrix(_),v.flush(u-(100+2*S));for(var E=!0,L=v.computedMatrix,C=0;C<16;++C)E=E&&g[C]===L[C],g[C]=L[C];var P=p.clientWidth===h&&p.clientHeight===m;return h=p.clientWidth,m=p.clientHeight,E?!P:(y=Math.exp(v.computedRadius[0]),!0)},lookAt:function(u,S,_){v.lookAt(v.lastT(),u,S,_)},rotate:function(u,S,_){v.rotate(v.lastT(),u,S,_)},pan:function(u,S,_){v.pan(v.lastT(),u,S,_)},translate:function(u,S,_){v.translate(v.lastT(),u,S,_)}};return Object.defineProperties(w,{matrix:{get:function(){return v.computedMatrix},set:function(u){return v.setMatrix(v.lastT(),u),v.computedMatrix},enumerable:!0},mode:{get:function(){return v.getMode()},set:function(u){var S=v.computedUp.slice(),_=v.computedEye.slice(),E=v.computedCenter.slice();if(v.setMode(u),"turntable"===u){var L=o();v._active.lookAt(L,_,E,S),v._active.lookAt(L+500,_,E,[0,0,1]),v._active.flush(L)}return v.getMode()},enumerable:!0},center:{get:function(){return v.computedCenter},set:function(u){return v.lookAt(v.lastT(),null,u),v.computedCenter},enumerable:!0},eye:{get:function(){return v.computedEye},set:function(u){return v.lookAt(v.lastT(),u),v.computedEye},enumerable:!0},up:{get:function(){return v.computedUp},set:function(u){return v.lookAt(v.lastT(),null,null,u),v.computedUp},enumerable:!0},distance:{get:function(){return y},set:function(u){return v.setDistance(v.lastT(),u),u},enumerable:!0},distanceLimits:{get:function(){return v.getDistanceLimits(x)},set:function(u){return v.setDistanceLimits(u),u},enumerable:!0}}),p.addEventListener("contextmenu",function(u){return u.preventDefault(),!1}),w._lastX=-1,w._lastY=-1,w._lastMods={shift:!1,control:!1,alt:!1,meta:!1},w.enableMouseListeners=function(){function u(S,_,E,L){var C=w.keyBindingMode;if(!1!==C){var P="rotate"===C,I="pan"===C,U="zoom"===C,z=!!L.control,H=!!L.alt,F=!!L.shift,N=!!(1&S),B=!!(2&S),j=!!(4&S),J=1/p.clientHeight,G=J*(_-w._lastX),V=J*(E-w._lastY),W=w.flipX?1:-1,X=w.flipY?1:-1,K=Math.PI*w.rotateSpeed,re=o();if(-1!==w._lastX&&-1!==w._lastY&&((P&&N&&!z&&!H&&!F||N&&!z&&!H&&F)&&v.rotate(re,W*K*G,-X*K*V,0),(I&&N&&!z&&!H&&!F||B||N&&z&&!H&&!F)&&v.pan(re,-w.translateSpeed*G*y,w.translateSpeed*V*y,0),U&&N&&!z&&!H&&!F||j||N&&!z&&H&&!F)){var ee=-w.zoomSpeed*V/window.innerHeight*(re-v.lastT())*100;v.pan(re,0,0,y*(Math.exp(ee)-1))}return w._lastX=_,w._lastY=E,w._lastMods=L,!0}}w.mouseListener=n(p,u),p.addEventListener("touchstart",function(S){var _=a(S.changedTouches[0],p);u(0,_[0],_[1],w._lastMods),u(1,_[0],_[1],w._lastMods)},!!c&&{passive:!0}),p.addEventListener("touchmove",function(S){var _=a(S.changedTouches[0],p);u(1,_[0],_[1],w._lastMods),S.preventDefault()},!!c&&{passive:!1}),p.addEventListener("touchend",function(S){u(0,w._lastX,w._lastY,w._lastMods)},!!c&&{passive:!0}),w.wheelListener=i(p,function(S,_){if(!1!==w.keyBindingMode&&w.enableWheel){var E=w.flipX?1:-1,L=w.flipY?1:-1,C=o();if(Math.abs(S)>Math.abs(_))v.rotate(C,0,0,-S*E*Math.PI*w.rotateSpeed/window.innerWidth);else if(!w._ortho){var P=-w.zoomSpeed*L*_/window.innerHeight*(C-v.lastT())/20;v.pan(C,0,0,y*(Math.exp(P)-1))}}},!0)},w.enableMouseListeners(),w};var o=t(8161),r=t(1152),n=t(6145),i=t(6475),a=t(2565),c=t(5233)},8245:function(d,s,t){var o=t(6832),r=t(5158),n=o(["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}"]),i=o(["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}"]);d.exports=function(a){return r(a,n,i,null,[{name:"position",type:"vec2"}])}},1059:function(d,s,t){"use strict";var o=t(4296),r=t(7453),n=t(2771),i=t(6496),a=t(2611),c=t(4234),p=t(8126),f=t(6145),x=t(1120),v=t(5268),g=t(8245),y=t(2861)({tablet:!0,featureDetect:!0});function h(){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 m(u){var S=Math.round(Math.log(Math.abs(u))/Math.log(10));if(S<0){var _=Math.round(Math.pow(10,-S));return Math.ceil(u*_)/_}return S>0?(_=Math.round(Math.pow(10,S)),Math.ceil(u/_)*_):Math.ceil(u)}function w(u){return"boolean"!=typeof u||u}d.exports={createScene:function(u){(u=u||{}).camera=u.camera||{};var S=u.canvas;S||(S=document.createElement("canvas"),u.container?u.container.appendChild(S):document.body.appendChild(S));var _=u.gl;if(_||(u.glOptions&&(y=!!u.glOptions.preserveDrawingBuffer),_=function(Pe,xe){var ke=null;try{(ke=Pe.getContext("webgl",xe))||(ke=Pe.getContext("experimental-webgl",xe))}catch{return null}return ke}(S,u.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:y})),!_)throw new Error("webgl not supported");var E=u.bounds||[[-10,-10,-10],[10,10,10]],L=new h,C=c(_,_.drawingBufferWidth,_.drawingBufferHeight,{preferFloat:!y}),P=g(_),I=u.cameraObject&&!0===u.cameraObject._ortho||u.camera.projection&&"orthographic"===u.camera.projection.type||!1,U={eye:u.camera.eye||[2,0,0],center:u.camera.center||[0,0,0],up:u.camera.up||[0,1,0],zoomMin:u.camera.zoomMax||.1,zoomMax:u.camera.zoomMin||100,mode:u.camera.mode||"turntable",_ortho:I},z=u.axes||{},H=r(_,z);H.enable=!z.disable;var N=i(_,u.spikes||{}),B=[],j=[],J=[],G=[],V=!0,W=!0,X={view:null,projection:new Array(16),model:new Array(16),_ortho:!1},K=(W=!0,[_.drawingBufferWidth,_.drawingBufferHeight]),re=u.cameraObject||o(S,U),ee={gl:_,contextLost:!1,pixelRatio:u.pixelRatio||1,canvas:S,selection:L,camera:re,axes:H,axesPixels:null,spikes:N,bounds:E,objects:B,shape:K,aspect:u.aspectRatio||[1,1,1],pickRadius:u.pickRadius||10,zNear:u.zNear||.01,zFar:u.zFar||1e3,fovy:u.fovy||Math.PI/4,clearColor:u.clearColor||[0,0,0,0],autoResize:w(u.autoResize),autoBounds:w(u.autoBounds),autoScale:!!u.autoScale,autoCenter:w(u.autoCenter),clipToBounds:w(u.clipToBounds),snapToData:!!u.snapToData,onselect:u.onselect||null,onrender:u.onrender||null,onclick:u.onclick||null,cameraParams:X,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(Pe){this.aspect[0]=Pe.x,this.aspect[1]=Pe.y,this.aspect[2]=Pe.z,W=!0},setBounds:function(Pe,xe){this.bounds[0][Pe]=xe.min,this.bounds[1][Pe]=xe.max},setClearColor:function(Pe){this.clearColor=Pe},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)}},ie=[_.drawingBufferWidth/ee.pixelRatio|0,_.drawingBufferHeight/ee.pixelRatio|0];function oe(){if(!ee._stopped&&ee.autoResize){var Pe=S.parentNode,xe=1,ke=1;Pe&&Pe!==document.body?(xe=Pe.clientWidth,ke=Pe.clientHeight):(xe=window.innerWidth,ke=window.innerHeight);var Ae=0|Math.ceil(xe*ee.pixelRatio),Te=0|Math.ceil(ke*ee.pixelRatio);if(Ae!==S.width||Te!==S.height){S.width=Ae,S.height=Te;var Q=S.style;Q.position=Q.position||"absolute",Q.left="0px",Q.top="0px",Q.width=xe+"px",Q.height=ke+"px",V=!0}}}function ce(){for(var Pe=B.length,xe=G.length,ke=0;ke<xe;++ke)J[ke]=0;e:for(ke=0;ke<Pe;++ke){var Ae=B[ke],Te=Ae.pickSlots;if(Te){for(var Q=0;Q<xe;++Q)if(J[Q]+Te<255){j[ke]=Q,Ae.setPickBase(J[Q]+1),J[Q]+=Te;continue e}var se=a(_,K);j[ke]=xe,G.push(se),J.push(Te),Ae.setPickBase(1),xe+=1}else j[ke]=-1}for(;xe>0&&0===J[xe-1];)J.pop(),G.pop().dispose()}function me(){if(ee.contextLost)return!0;_.isContextLost()&&(ee.contextLost=!0,ee.mouseListener.enabled=!1,ee.selection.object=null,ee.oncontextloss&&ee.oncontextloss())}ee.autoResize&&oe(),window.addEventListener("resize",oe),ee.update=function(Pe){ee._stopped||(Pe=Pe||{},V=!0,W=!0)},ee.add=function(Pe){ee._stopped||(Pe.axes=H,B.push(Pe),j.push(-1),V=!0,W=!0,ce())},ee.remove=function(Pe){if(!ee._stopped){var xe=B.indexOf(Pe);xe<0||(B.splice(xe,1),j.pop(),V=!0,W=!0,ce())}},ee.dispose=function(){if(!ee._stopped&&(ee._stopped=!0,window.removeEventListener("resize",oe),S.removeEventListener("webglcontextlost",me),ee.mouseListener.enabled=!1,!ee.contextLost)){H.dispose(),N.dispose();for(var Pe=0;Pe<B.length;++Pe)B[Pe].dispose();for(C.dispose(),Pe=0;Pe<G.length;++Pe)G[Pe].dispose();P.dispose(),_=null,H=null,N=null,B=[]}},ee._mouseRotating=!1,ee._prevButtons=0,ee.enableMouseListeners=function(){ee.mouseListener=f(S,function(Pe,xe,ke){if(!ee._stopped){var Ae=G.length,Te=B.length,Q=L.object;L.distance=1/0,L.mouse[0]=xe,L.mouse[1]=ke,L.object=null,L.screen=null,L.dataCoordinate=L.dataPosition=null;var se=!1;if(Pe&&ee._prevButtons)ee._mouseRotating=!0;else{ee._mouseRotating&&(W=!0),ee._mouseRotating=!1;for(var fe=0;fe<Ae;++fe){var ye=G[fe].query(xe,ie[1]-ke-1,ee.pickRadius);if(ye){if(ye.distance>L.distance)continue;for(var Me=0;Me<Te;++Me){var Ie=B[Me];if(j[Me]===fe){var Ce=Ie.pick(ye);Ce&&(L.buttons=Pe,L.screen=ye.coord,L.distance=ye.distance,L.object=Ie,L.index=Ce.distance,L.dataPosition=Ce.position,L.dataCoordinate=Ce.dataCoordinate,L.data=Ce,se=!0)}}}}}Q&&Q!==L.object&&(Q.highlight&&Q.highlight(null),V=!0),L.object&&(L.object.highlight&&L.object.highlight(L.data),V=!0),(se=se||L.object!==Q)&&ee.onselect&&ee.onselect(L),1&Pe&&!(1&ee._prevButtons)&&ee.onclick&&ee.onclick(L),ee._prevButtons=Pe}})},S.addEventListener("webglcontextlost",me);var de=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],he=[de[0].slice(),de[1].slice()];function ve(){if(!me()){oe();var Pe=ee.camera.tick();X.view=ee.camera.matrix,V=V||Pe,W=W||Pe,H.pixelRatio=ee.pixelRatio,N.pixelRatio=ee.pixelRatio;var xe=B.length,ke=de[0],Ae=de[1];ke[0]=ke[1]=ke[2]=1/0,Ae[0]=Ae[1]=Ae[2]=-1/0;for(var Te=0;Te<xe;++Te){(Fe=B[Te]).pixelRatio=ee.pixelRatio,Fe.axes=ee.axes,V=V||!!Fe.dirty,W=W||!!Fe.dirty;var Q=Fe.bounds;if(Q)for(var se=Q[0],fe=Q[1],ye=0;ye<3;++ye)ke[ye]=Math.min(ke[ye],se[ye]),Ae[ye]=Math.max(Ae[ye],fe[ye])}var Me=ee.bounds;if(ee.autoBounds)for(ye=0;ye<3;++ye){if(Ae[ye]<ke[ye])ke[ye]=-1,Ae[ye]=1;else{ke[ye]===Ae[ye]&&(ke[ye]-=1,Ae[ye]+=1);var Ie=.05*(Ae[ye]-ke[ye]);ke[ye]=ke[ye]-Ie,Ae[ye]=Ae[ye]+Ie}Me[0][ye]=ke[ye],Me[1][ye]=Ae[ye]}var Ce=!1;for(ye=0;ye<3;++ye)Ce=Ce||he[0][ye]!==Me[0][ye]||he[1][ye]!==Me[1][ye],he[0][ye]=Me[0][ye],he[1][ye]=Me[1][ye];if(W=W||Ce,V=V||Ce){if(Ce){var Re=[0,0,0];for(Te=0;Te<3;++Te)Re[Te]=m((Me[1][Te]-Me[0][Te])/10);H.update(H.autoTicks?{bounds:Me,tickSpacing:Re}:{bounds:Me})}var le=_.drawingBufferWidth,ge=_.drawingBufferHeight;for(K[0]=le,K[1]=ge,ie[0]=0|Math.max(le/ee.pixelRatio,1),ie[1]=0|Math.max(ge/ee.pixelRatio,1),function(Ve,He){var nt=Ve.bounds,tt=Ve.cameraParams,ot=tt.projection,dt=tt.model,wt=Ve.zNear,Lt=Ve.zFar,Ct=Ve.fovy,It=Ve.gl.drawingBufferWidth/Ve.gl.drawingBufferHeight;He?(v(ot,-It,It,-1,1,wt,Lt),tt._ortho=!0):(x(ot,Ct,It,wt,Lt),tt._ortho=!1);for(var Ut=0;Ut<16;++Ut)dt[Ut]=0;dt[15]=1;var Rt=0;for(Ut=0;Ut<3;++Ut)Rt=Math.max(Rt,nt[1][Ut]-nt[0][Ut]);for(Ut=0;Ut<3;++Ut)dt[5*Ut]=Ve.autoScale?Ve.aspect[Ut]/(nt[1][Ut]-nt[0][Ut]):1/Rt,Ve.autoCenter&&(dt[12+Ut]=.5*-dt[5*Ut]*(nt[0][Ut]+nt[1][Ut]))}(ee,I),Te=0;Te<xe;++Te)(Fe=B[Te]).axesBounds=Me,ee.clipToBounds&&(Fe.clipBounds=Me);L.object&&(N.position=ee.snapToData?L.dataCoordinate:L.dataPosition,N.bounds=Me),W&&(W=!1,function(){if(!me()){_.colorMask(!0,!0,!0,!0),_.depthMask(!0),_.disable(_.BLEND),_.enable(_.DEPTH_TEST),_.depthFunc(_.LEQUAL);for(var Ve=B.length,He=G.length,nt=0;nt<He;++nt){var tt=G[nt];tt.shape=ie,tt.begin();for(var ot=0;ot<Ve;++ot)if(j[ot]===nt){var dt=B[ot];dt.drawPick&&(dt.pixelRatio=1,dt.drawPick(X))}tt.end()}}}()),ee.axesPixels=n(ee.axes,X,le,ge),ee.onrender&&ee.onrender(),_.bindFramebuffer(_.FRAMEBUFFER,null),_.viewport(0,0,le,ge),ee.clearRGBA(),_.depthMask(!0),_.colorMask(!0,!0,!0,!0),_.enable(_.DEPTH_TEST),_.depthFunc(_.LEQUAL),_.disable(_.BLEND),_.disable(_.CULL_FACE);var _e=!1;for(H.enable&&(_e=_e||H.isTransparent(),H.draw(X)),N.axes=H,L.object&&N.draw(X),_.disable(_.CULL_FACE),Te=0;Te<xe;++Te)(Fe=B[Te]).axes=H,Fe.pixelRatio=ee.pixelRatio,Fe.isOpaque&&Fe.isOpaque()&&Fe.draw(X),Fe.isTransparent&&Fe.isTransparent()&&(_e=!0);if(_e){for(C.shape=K,C.bind(),_.clear(_.DEPTH_BUFFER_BIT),_.colorMask(!1,!1,!1,!1),_.depthMask(!0),_.depthFunc(_.LESS),H.enable&&H.isTransparent()&&H.drawTransparent(X),Te=0;Te<xe;++Te)(Fe=B[Te]).isOpaque&&Fe.isOpaque()&&Fe.draw(X);for(_.enable(_.BLEND),_.blendEquation(_.FUNC_ADD),_.blendFunc(_.ONE,_.ONE_MINUS_SRC_ALPHA),_.colorMask(!0,!0,!0,!0),_.depthMask(!1),_.clearColor(0,0,0,0),_.clear(_.COLOR_BUFFER_BIT),H.isTransparent()&&H.drawTransparent(X),Te=0;Te<xe;++Te){var Fe;(Fe=B[Te]).isTransparent&&Fe.isTransparent()&&Fe.drawTransparent(X)}_.bindFramebuffer(_.FRAMEBUFFER,null),_.blendFunc(_.ONE,_.ONE_MINUS_SRC_ALPHA),_.disable(_.DEPTH_TEST),P.bind(),C.color[0].bind(0),P.uniforms.accumBuffer=0,p(_),_.disable(_.BLEND)}for(V=!1,Te=0;Te<xe;++Te)B[Te].dirty=!1}}}return ee.enableMouseListeners(),function Pe(){ee._stopped||ee.contextLost||(ve(),requestAnimationFrame(Pe))}(),ee.redraw=function(){ee._stopped||(V=!0,ve())},ee},createCamera:o}},8023:function(d,s,t){var o=t(6832);s.pointVertex=o(["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}"]),s.pointFragment=o(["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"]),s.pickVertex=o(["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"]),s.pickFragment=o(["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"])},8271:function(d,s,t){"use strict";var o=t(5158),r=t(5827),n=t(5306),i=t(8023);function a(x,v,g,y,h){this.plot=x,this.offsetBuffer=v,this.pickBuffer=g,this.shader=y,this.pickShader=h,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}d.exports=function(x,v){var g=x.gl,y=new a(x,r(g),r(g),o(g,i.pointVertex,i.pointFragment),o(g,i.pickVertex,i.pickFragment));return y.update(v),x.addObject(y),y};var c,p,f=a.prototype;f.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},f.update=function(x){var v;function g(_,E){return _ in x?x[_]:E}x=x||{},this.sizeMin=g("sizeMin",.5),this.sizeMax=g("sizeMax",20),this.color=g("color",[1,0,0,1]).slice(),this.areaRatio=g("areaRatio",1),this.borderColor=g("borderColor",[0,0,0,1]).slice(),this.blend=g("blend",!1);var y=x.positions.length>>>1,h=x.positions instanceof Float32Array,m=x.idToIndex instanceof Int32Array&&x.idToIndex.length>=y,w=x.positions,u=h?w:n.mallocFloat32(w.length),S=m?x.idToIndex:n.mallocInt32(y);if(h||u.set(w),!m)for(u.set(w),v=0;v<y;v++)S[v]=v;this.points=w,this.offsetBuffer.update(u),this.pickBuffer.update(S),h||n.free(u),m||n.free(S),this.pointCount=y,this.pickOffset=0},f.unifiedDraw=(c=[1,0,0,0,1,0,0,0,1],p=[0,0,0,0],function(x){var v=void 0!==x,g=v?this.pickShader:this.shader,y=this.plot.gl,h=this.plot.dataBox;if(0===this.pointCount)return x;var m=h[2]-h[0],w=h[3]-h[1],u=function(L,C){var P,I=0,U=L.length>>>1;for(P=0;P<U;P++){var z=L[2*P],H=L[2*P+1];z>=C[0]&&z<=C[2]&&H>=C[1]&&H<=C[3]&&I++}return I}(this.points,h),S=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(u,.33333)));c[0]=2/m,c[4]=2/w,c[6]=-2*h[0]/m-1,c[7]=-2*h[1]/w-1,this.offsetBuffer.bind(),g.bind(),g.attributes.position.pointer(),g.uniforms.matrix=c,g.uniforms.color=this.color,g.uniforms.borderColor=this.borderColor,g.uniforms.pointCloud=S<5,g.uniforms.pointSize=S,g.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),v&&(p[0]=255&x,p[1]=x>>8&255,p[2]=x>>16&255,p[3]=x>>24&255,this.pickBuffer.bind(),g.attributes.pickId.pointer(y.UNSIGNED_BYTE),g.uniforms.pickOffset=p,this.pickOffset=x);var _=y.getParameter(y.BLEND),E=y.getParameter(y.DITHER);return _&&!this.blend&&y.disable(y.BLEND),E&&y.disable(y.DITHER),y.drawArrays(y.POINTS,0,this.pointCount),_&&!this.blend&&y.enable(y.BLEND),E&&y.enable(y.DITHER),x+this.pointCount}),f.draw=f.unifiedDraw,f.drawPick=f.unifiedDraw,f.pick=function(x,v,g){var y=this.pickOffset;if(g<y||g>=y+this.pointCount)return null;var m=g-y,w=this.points;return{object:this,pointId:m,dataCoord:[w[2*m],w[2*m+1]]}}},6093:function(d){d.exports=function(s,t,o,r){var n,i,a,c,p,f=t[0],x=t[1],v=t[2],g=t[3],y=o[0],h=o[1],m=o[2],w=o[3];return(i=f*y+x*h+v*m+g*w)<0&&(i=-i,y=-y,h=-h,m=-m,w=-w),1-i>1e-6?(n=Math.acos(i),a=Math.sin(n),c=Math.sin((1-r)*n)/a,p=Math.sin(r*n)/a):(c=1-r,p=r),s[0]=c*f+p*y,s[1]=c*x+p*h,s[2]=c*v+p*m,s[3]=c*g+p*w,s}},8240:function(d){"use strict";d.exports=function(s){return s||0===s?s.toString():""}},4123:function(d,s,t){"use strict";var o=t(875);d.exports=function(n,i,a){var c=r[i];if(c||(c=r[i]={}),n in c)return c[n];var p={textAlign:"center",textBaseline:"middle",lineHeight:1,font:i,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},triangles:!0},f=o(n,p);p.triangles=!1;var x,v,g=o(n,p);if(a&&1!==a){for(x=0;x<f.positions.length;++x)for(v=0;v<f.positions[x].length;++v)f.positions[x][v]/=a;for(x=0;x<g.positions.length;++x)for(v=0;v<g.positions[x].length;++v)g.positions[x][v]/=a}var y=[[1/0,1/0],[-1/0,-1/0]],h=g.positions.length;for(x=0;x<h;++x){var m=g.positions[x];for(v=0;v<2;++v)y[0][v]=Math.min(y[0][v],m[v]),y[1][v]=Math.max(y[1][v],m[v])}return c[n]=[f,g,y]};var r={}},9282:function(d,s,t){var o=t(5158),r=t(6832),n=r(["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}"]),i=r(["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}"]),a=r(["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"]),c=r(["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"]),p=r(["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}"]),f=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],x={vertex:n,fragment:c,attributes:f},v={vertex:i,fragment:c,attributes:f},g={vertex:a,fragment:c,attributes:f},y={vertex:n,fragment:p,attributes:f},h={vertex:i,fragment:p,attributes:f},m={vertex:a,fragment:p,attributes:f};function w(u,S){var _=o(u,S),E=_.attributes;return E.position.location=0,E.color.location=1,E.glyph.location=2,E.id.location=3,_}s.createPerspective=function(u){return w(u,x)},s.createOrtho=function(u){return w(u,v)},s.createProject=function(u){return w(u,g)},s.createPickPerspective=function(u){return w(u,y)},s.createPickOrtho=function(u){return w(u,h)},s.createPickProject=function(u){return w(u,m)}},2182:function(d,s,t){"use strict";var o=t(3596),r=t(5827),n=t(2944),i=t(5306),a=t(104),c=t(9282),p=t(4123),f=t(8240),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function v(j,J){var G=j[0],V=j[1],W=j[2],X=j[3];return j[0]=J[0]*G+J[4]*V+J[8]*W+J[12]*X,j[1]=J[1]*G+J[5]*V+J[9]*W+J[13]*X,j[2]=J[2]*G+J[6]*V+J[10]*W+J[14]*X,j[3]=J[3]*G+J[7]*V+J[11]*W+J[15]*X,j}function g(j,J,G,V){return v(V,V),v(V,V),v(V,V)}function y(j,J){this.index=j,this.dataCoordinate=this.position=J}function h(j){return!0===j||j>1?1:j}function m(j,J,G,V,W,X,K,re,ee,ie,oe,ce){this.gl=j,this.pixelRatio=1,this.shader=J,this.orthoShader=G,this.projectShader=V,this.pointBuffer=W,this.colorBuffer=X,this.glyphBuffer=K,this.idBuffer=re,this.vao=ee,this.vertexCount=0,this.lineVertexCount=0,this.opacity=1,this.hasAlpha=!1,this.lineWidth=0,this.projectScale=[.6666666666666666,.6666666666666666,.6666666666666666],this.projectOpacity=[1,1,1],this.projectHasAlpha=!1,this.pickId=0,this.pickPerspectiveShader=ie,this.pickOrthoShader=oe,this.pickProjectShader=ce,this.points=[],this._selectResult=new y(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}d.exports=function(j){var J=j.gl,G=c.createPerspective(J),V=c.createOrtho(J),W=c.createProject(J),X=c.createPickPerspective(J),K=c.createPickOrtho(J),re=c.createPickProject(J),ee=r(J),ie=r(J),oe=r(J),ce=r(J),me=new m(J,G,V,W,ee,ie,oe,ce,n(J,[{buffer:ee,size:3,type:J.FLOAT},{buffer:ie,size:4,type:J.FLOAT},{buffer:oe,size:2,type:J.FLOAT},{buffer:ce,size:4,type:J.UNSIGNED_BYTE,normalized:!0}]),X,K,re);return me.update(j),me};var w=m.prototype;w.pickSlots=1,w.setPickBase=function(j){this.pickId=j},w.isTransparent=function(){if(this.hasAlpha)return!0;for(var j=0;j<3;++j)if(this.axesProject[j]&&this.projectHasAlpha)return!0;return!1},w.isOpaque=function(){if(!this.hasAlpha)return!0;for(var j=0;j<3;++j)if(this.axesProject[j]&&!this.projectHasAlpha)return!0;return!1};var u=[0,0],S=[0,0,0],_=[0,0,0],E=[0,0,0,1],L=[0,0,0,1],C=x.slice(),P=[0,0,0],I=[[0,0,0],[0,0,0]];function U(j){return j[0]=j[1]=j[2]=0,j}function z(j,J){return j[0]=J[0],j[1]=J[1],j[2]=J[2],j[3]=1,j}function H(j,J,G,V){return j[0]=J[0],j[1]=J[1],j[2]=J[2],j[G]=V,j}var F=[[-1e8,-1e8,-1e8],[1e8,1e8,1e8]];function N(j,J,G,V,W,X,K){var re=G.gl;if((X===G.projectHasAlpha||K)&&function(ie,oe,ce,me){var de,he=oe.axesProject,ve=oe.gl,Pe=ie.uniforms,xe=ce.model||x,ke=ce.view||x,Ae=ce.projection||x,Te=oe.axesBounds,Q=function(nt){for(var tt=I,ot=0;ot<2;++ot)for(var dt=0;dt<3;++dt)tt[ot][dt]=Math.max(Math.min(nt[ot][dt],1e8),-1e8);return tt}(oe.clipBounds);de=oe.axes&&oe.axes.lastCubeProps?oe.axes.lastCubeProps.axis:[1,1,1],u[0]=2/ve.drawingBufferWidth,u[1]=2/ve.drawingBufferHeight,ie.bind(),Pe.view=ke,Pe.projection=Ae,Pe.screenSize=u,Pe.highlightId=oe.highlightId,Pe.highlightScale=oe.highlightScale,Pe.clipBounds=Q,Pe.pickGroup=oe.pickId/255,Pe.pixelRatio=me;for(var se=0;se<3;++se)if(he[se]){Pe.scale=oe.projectScale[se],Pe.opacity=oe.projectOpacity[se];for(var fe=C,ye=0;ye<16;++ye)fe[ye]=0;for(ye=0;ye<4;++ye)fe[5*ye]=1;fe[5*se]=0,fe[12+se]=de[se]<0?Te[0][se]:Te[1][se],a(fe,xe,fe),Pe.model=fe;var Me=(se+1)%3,Ie=(se+2)%3,Ce=U(S),Re=U(_);Ce[Me]=1,Re[Ie]=1;var le=g(0,0,0,z(E,Ce)),ge=g(0,0,0,z(L,Re));if(Math.abs(le[1])>Math.abs(ge[1])){var _e=le;le=ge,ge=_e,_e=Ce,Ce=Re,Re=_e;var Fe=Me;Me=Ie,Ie=Fe}le[0]<0&&(Ce[Me]=-1),ge[1]>0&&(Re[Ie]=-1);var Ve=0,He=0;for(ye=0;ye<4;++ye)Ve+=Math.pow(xe[4*Me+ye],2),He+=Math.pow(xe[4*Ie+ye],2);Ce[Me]/=Math.sqrt(Ve),Re[Ie]/=Math.sqrt(He),Pe.axes[0]=Ce,Pe.axes[1]=Re,Pe.fragClipBounds[0]=H(P,Q[0],se,-1e8),Pe.fragClipBounds[1]=H(P,Q[1],se,1e8),oe.vao.bind(),oe.vao.draw(ve.TRIANGLES,oe.vertexCount),oe.lineWidth>0&&(ve.lineWidth(oe.lineWidth*me),oe.vao.draw(ve.LINES,oe.lineVertexCount,oe.vertexCount)),oe.vao.unbind()}}(J,G,V,W),X===G.hasAlpha||K){j.bind();var ee=j.uniforms;ee.model=V.model||x,ee.view=V.view||x,ee.projection=V.projection||x,u[0]=2/re.drawingBufferWidth,u[1]=2/re.drawingBufferHeight,ee.screenSize=u,ee.highlightId=G.highlightId,ee.highlightScale=G.highlightScale,ee.fragClipBounds=F,ee.clipBounds=G.axes.bounds,ee.opacity=G.opacity,ee.pickGroup=G.pickId/255,ee.pixelRatio=W,G.vao.bind(),G.vao.draw(re.TRIANGLES,G.vertexCount),G.lineWidth>0&&(re.lineWidth(G.lineWidth*W),G.vao.draw(re.LINES,G.lineVertexCount,G.vertexCount)),G.vao.unbind()}}function B(j,J,G,V){var W;W=Array.isArray(j)?J<j.length?j[J]:void 0:j,W=f(W);var X=!0;o(W)&&(W="\u25bc",X=!1);var K=p(W,G,V);return{mesh:K[0],lines:K[1],bounds:K[2],visible:X}}w.draw=function(j){N(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,j,this.pixelRatio,!1,!1)},w.drawTransparent=function(j){N(this.useOrtho?this.orthoShader:this.shader,this.projectShader,this,j,this.pixelRatio,!0,!1)},w.drawPick=function(j){N(this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader,this.pickProjectShader,this,j,1,!0,!0)},w.pick=function(j){if(!j||j.id!==this.pickId)return null;var J=j.value[2]+(j.value[1]<<8)+(j.value[0]<<16);if(J>=this.pointCount||J<0)return null;var G=this.points[J],V=this._selectResult;V.index=J;for(var W=0;W<3;++W)V.position[W]=V.dataCoordinate[W]=G[W];return V},w.highlight=function(j){if(j){var J=j.index;this.highlightId=[(255&J)/255,(J>>8&255)/255,(J>>16&255)/255,0]}else this.highlightId=[1,1,1,1]},w.update=function(j){if("perspective"in(j=j||{})&&(this.useOrtho=!j.perspective),"orthographic"in j&&(this.useOrtho=!!j.orthographic),"lineWidth"in j&&(this.lineWidth=j.lineWidth),"project"in j)if(Array.isArray(j.project))this.axesProject=j.project;else{var J=!!j.project;this.axesProject=[J,J,J]}if("projectScale"in j)if(Array.isArray(j.projectScale))this.projectScale=j.projectScale.slice();else{var G=+j.projectScale;this.projectScale=[G,G,G]}if(this.projectHasAlpha=!1,"projectOpacity"in j){this.projectOpacity=Array.isArray(j.projectOpacity)?j.projectOpacity.slice():[G=+j.projectOpacity,G,G];for(var V=0;V<3;++V)this.projectOpacity[V]=h(this.projectOpacity[V]),this.projectOpacity[V]<1&&(this.projectHasAlpha=!0)}this.hasAlpha=!1,"opacity"in j&&(this.opacity=h(j.opacity),this.opacity<1&&(this.hasAlpha=!0)),this.dirty=!0;var W,X,K=j.position,re=j.font||"normal",ee=j.alignment||[0,0];if(2===ee.length)W=ee[0],X=ee[1];else for(W=[],X=[],V=0;V<ee.length;++V)W[V]=ee[V][0],X[V]=ee[V][1];var ie=[1/0,1/0,1/0],oe=[-1/0,-1/0,-1/0],ce=j.glyph,me=j.color,de=j.size,he=j.angle,ve=j.lineColor,Pe=-1,xe=0,ke=0,Ae=0;if(K.length){Ae=K.length;e:for(V=0;V<Ae;++V){for(var Te=K[V],Q=0;Q<3;++Q)if(isNaN(Te[Q])||!isFinite(Te[Q]))continue e;var se=(tt=B(ce,V,re,this.pixelRatio)).mesh,fe=tt.lines,ye=tt.bounds;xe+=3*se.cells.length,ke+=2*fe.edges.length}}var Me=xe+ke,Ie=i.mallocFloat(3*Me),Ce=i.mallocFloat(4*Me),Re=i.mallocFloat(2*Me),le=i.mallocUint32(Me);if(Me>0){var ge=0,_e=xe,Fe=[0,0,0,1],Ve=[0,0,0,1],He=Array.isArray(me)&&Array.isArray(me[0]),nt=Array.isArray(ve)&&Array.isArray(ve[0]);e:for(V=0;V<Ae;++V){for(Pe+=1,Te=K[V],Q=0;Q<3;++Q){if(isNaN(Te[Q])||!isFinite(Te[Q]))continue e;oe[Q]=Math.max(oe[Q],Te[Q]),ie[Q]=Math.min(ie[Q],Te[Q])}se=(tt=B(ce,V,re,this.pixelRatio)).mesh,fe=tt.lines,ye=tt.bounds;var tt,ot=tt.visible;if(ot)if(Array.isArray(me)){if(3===(dt=He?V<me.length?me[V]:[0,0,0,0]:me).length){for(Q=0;Q<3;++Q)Fe[Q]=dt[Q];Fe[3]=1}else if(4===dt.length){for(Q=0;Q<4;++Q)Fe[Q]=dt[Q];!this.hasAlpha&&dt[3]<1&&(this.hasAlpha=!0)}}else Fe[0]=Fe[1]=Fe[2]=0,Fe[3]=1;else Fe=[1,1,1,0];if(ot)if(Array.isArray(ve)){var dt;if(3===(dt=nt?V<ve.length?ve[V]:[0,0,0,0]:ve).length){for(Q=0;Q<3;++Q)Ve[Q]=dt[Q];Ve[Q]=1}else if(4===dt.length){for(Q=0;Q<4;++Q)Ve[Q]=dt[Q];!this.hasAlpha&&dt[3]<1&&(this.hasAlpha=!0)}}else Ve[0]=Ve[1]=Ve[2]=0,Ve[3]=1;else Ve=[1,1,1,0];var kt=.5;ot?Array.isArray(de)?kt=V<de.length?+de[V]:12:de?kt=+de:this.useOrtho&&(kt=12):kt=0;var mt=0;Array.isArray(he)?mt=V<he.length?+he[V]:0:he&&(mt=+he);var wt=Math.cos(mt),Lt=Math.sin(mt);for(Te=K[V],Q=0;Q<3;++Q)oe[Q]=Math.max(oe[Q],Te[Q]),ie[Q]=Math.min(ie[Q],Te[Q]);var Ct=W,It=X;Ct=0,Array.isArray(W)?Ct=V<W.length?W[V]:0:W&&(Ct=W),It=0,Array.isArray(X)?It=V<X.length?X[V]:0:X&&(It=X);var Ut=[Ct*=Ct>0?1-ye[0][0]:Ct<0?1+ye[1][0]:1,It*=It>0?1-ye[0][1]:It<0?1+ye[1][1]:1],Rt=se.cells||[],Ge=se.positions||[];for(Q=0;Q<Rt.length;++Q)for(var We=Rt[Q],Be=0;Be<3;++Be){for(var Ye=0;Ye<3;++Ye)Ie[3*ge+Ye]=Te[Ye];for(Ye=0;Ye<4;++Ye)Ce[4*ge+Ye]=Fe[Ye];le[ge]=Pe;var rt=Ge[We[Be]];Re[2*ge]=kt*(wt*rt[0]-Lt*rt[1]+Ut[0]),Re[2*ge+1]=kt*(Lt*rt[0]+wt*rt[1]+Ut[1]),ge+=1}for(Rt=fe.edges,Ge=fe.positions,Q=0;Q<Rt.length;++Q)for(We=Rt[Q],Be=0;Be<2;++Be){for(Ye=0;Ye<3;++Ye)Ie[3*_e+Ye]=Te[Ye];for(Ye=0;Ye<4;++Ye)Ce[4*_e+Ye]=Ve[Ye];le[_e]=Pe,Re[2*_e]=kt*(wt*(rt=Ge[We[Be]])[0]-Lt*rt[1]+Ut[0]),Re[2*_e+1]=kt*(Lt*rt[0]+wt*rt[1]+Ut[1]),_e+=1}}}this.bounds=[ie,oe],this.points=K,this.pointCount=K.length,this.vertexCount=xe,this.lineVertexCount=ke,this.pointBuffer.update(Ie),this.colorBuffer.update(Ce),this.glyphBuffer.update(Re),this.idBuffer.update(le),i.free(Ie),i.free(Ce),i.free(Re),i.free(le)},w.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()}},1884:function(d,s,t){"use strict";var o=t(6832);s.boxVertex=o(["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"]),s.boxFragment=o(["precision mediump float;\n#define GLSLIFY 1\n\nuniform vec4 color;\n\nvoid main() {\n  gl_FragColor = color;\n}\n"])},6623:function(d,s,t){"use strict";var o=t(5158),r=t(5827),n=t(1884);function i(c,p,f){this.plot=c,this.boxBuffer=p,this.boxShader=f,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}d.exports=function(c,p){var f=c.gl,x=new i(c,r(f,[0,0,0,1,1,0,1,1]),o(f,n.boxVertex,n.boxFragment));return x.update(p),c.addOverlay(x),x};var a=i.prototype;a.draw=function(){if(this.enabled){var c=this.plot,p=this.selectBox,f=this.borderWidth,x=this.innerColor,v=this.outerColor,g=this.borderColor,y=c.box,h=c.screenBox,m=c.dataBox,w=c.viewBox,u=c.pixelRatio,S=(p[0]-m[0])*(w[2]-w[0])/(m[2]-m[0])+w[0],_=(p[1]-m[1])*(w[3]-w[1])/(m[3]-m[1])+w[1],E=(p[2]-m[0])*(w[2]-w[0])/(m[2]-m[0])+w[0],L=(p[3]-m[1])*(w[3]-w[1])/(m[3]-m[1])+w[1];if(S=Math.max(S,w[0]),_=Math.max(_,w[1]),E=Math.min(E,w[2]),L=Math.min(L,w[3]),!(E<S||L<_)){y.bind();var C=h[2]-h[0],P=h[3]-h[1];if(this.outerFill&&(y.drawBox(0,0,C,_,v),y.drawBox(0,_,S,L,v),y.drawBox(0,L,C,P,v),y.drawBox(E,_,C,L,v)),this.innerFill&&y.drawBox(S,_,E,L,x),f>0){var I=f*u;y.drawBox(S-I,_-I,E+I,_+I,g),y.drawBox(S-I,L-I,E+I,L+I,g),y.drawBox(S-I,_-I,S+I,L+I,g),y.drawBox(E-I,_-I,E+I,L+I,g)}}}},a.update=function(c){this.innerFill=!!(c=c||{}).innerFill,this.outerFill=!!c.outerFill,this.innerColor=(c.innerColor||[0,0,0,.5]).slice(),this.outerColor=(c.outerColor||[0,0,0,.5]).slice(),this.borderColor=(c.borderColor||[0,0,0,1]).slice(),this.borderWidth=c.borderWidth||0,this.selectBox=(c.selectBox||this.selectBox).slice()},a.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)}},2611:function(d,s,t){"use strict";d.exports=function(f,x){var v=x[0],g=x[1];return new c(f,o(f,v,g,{}),r.mallocUint8(v*g*4))};var o=t(4234),r=t(5306),n=t(5050),i=t(2288).nextPow2;function a(f,x,v,g,y){this.coord=[f,x],this.id=v,this.value=g,this.distance=y}function c(f,x,v){this.gl=f,this.fbo=x,this.buffer=v,this._readTimeout=null;var g=this;this._readCallback=function(){g.gl&&(x.bind(),f.readPixels(0,0,x.shape[0],x.shape[1],f.RGBA,f.UNSIGNED_BYTE,g.buffer),g._readTimeout=null)}}var p=c.prototype;Object.defineProperty(p,"shape",{get:function(){return this.gl?this.fbo.shape.slice():[0,0]},set:function(f){if(this.gl){this.fbo.shape=f;var x=this.fbo.shape[0],v=this.fbo.shape[1];if(v*x*4>this.buffer.length){r.free(this.buffer);for(var g=this.buffer=r.mallocUint8(i(v*x*4)),y=0;y<v*x*4;++y)g[y]=255}return f}}}),p.begin=function(){var f=this.gl;f&&(this.fbo.bind(),f.clearColor(1,1,1,1),f.clear(f.COLOR_BUFFER_BIT|f.DEPTH_BUFFER_BIT))},p.end=function(){var f=this.gl;f&&(f.bindFramebuffer(f.FRAMEBUFFER,null),this._readTimeout||clearTimeout(this._readTimeout),this._readTimeout=setTimeout(this._readCallback,1))},p.query=function(f,x,v){if(!this.gl)return null;var g=this.fbo.shape.slice();f|=0,x|=0,"number"!=typeof v&&(v=1);var y=0|Math.min(Math.max(f-v,0),g[0]),h=0|Math.min(Math.max(f+v,0),g[0]),m=0|Math.min(Math.max(x-v,0),g[1]),w=0|Math.min(Math.max(x+v,0),g[1]);if(h<=y||w<=m)return null;var u=[h-y,w-m],S=n(this.buffer,[u[0],u[1],4],[4,4*g[0],1],4*(y+g[0]*m)),_=function(C,P,I){for(var U=1e8,z=-1,H=-1,F=C.shape[0],N=C.shape[1],B=0;B<F;B++)for(var j=0;j<N;j++){var J=C.get(B,j,0),G=C.get(B,j,1),V=C.get(B,j,2),W=C.get(B,j,3);if(J<255||G<255||V<255||W<255){var X=P-B,K=I-j,re=X*X+K*K;re<U&&(U=re,z=B,H=j)}}return[z,H,U]}(S.hi(u[0],u[1],1),v,v),E=_[0],L=_[1];return E<0||Math.pow(this.radius,2)<_[2]?null:new a(E+y|0,L+m|0,S.get(E,L,0),[S.get(E,L,1),S.get(E,L,2),S.get(E,L,3)],Math.sqrt(_[2]))},p.dispose=function(){this.gl&&(this.fbo.dispose(),r.free(this.buffer),this.gl=null,this._readTimeout&&clearTimeout(this._readTimeout))}},5158:function(d,s,t){"use strict";var o=t(9016),r=t(4280),n=t(3984),i=t(1628),a=t(2631),c=t(9068);function p(v){this.gl=v,this.gl.lastAttribCount=0,this._vref=this._fref=this._relink=this.vertShader=this.fragShader=this.program=this.attributes=this.uniforms=this.types=null}var f=p.prototype;function x(v,g){return v.name<g.name?-1:1}f.bind=function(){var v;this.program||this._relink();var g=this.gl.getProgramParameter(this.program,this.gl.ACTIVE_ATTRIBUTES),y=this.gl.lastAttribCount;if(g>y)for(v=y;v<g;v++)this.gl.enableVertexAttribArray(v);else if(y>g)for(v=g;v<y;v++)this.gl.disableVertexAttribArray(v);this.gl.lastAttribCount=g,this.gl.useProgram(this.program)},f.dispose=function(){for(var v=this.gl.lastAttribCount,g=0;g<v;g++)this.gl.disableVertexAttribArray(g);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},f.update=function(v,g,y,h){if(!g||1===arguments.length){var m=v;v=m.vertex,g=m.fragment,y=m.uniforms,h=m.attributes}var w=this,u=w.gl,S=w._vref;w._vref=i.shader(u,u.VERTEX_SHADER,v),S&&S.dispose(),w.vertShader=w._vref.shader;var _=this._fref;if(w._fref=i.shader(u,u.FRAGMENT_SHADER,g),_&&_.dispose(),w.fragShader=w._fref.shader,!y||!h){var E=u.createProgram();if(u.attachShader(E,w.fragShader),u.attachShader(E,w.vertShader),u.linkProgram(E),!u.getProgramParameter(E,u.LINK_STATUS)){var L=u.getProgramInfoLog(E);throw new c(L,"Error linking program:"+L)}y=y||a.uniforms(u,E),h=h||a.attributes(u,E),u.deleteProgram(E)}(h=h.slice()).sort(x);var C,P=[],I=[],U=[];for(C=0;C<h.length;++C){var z=h[C];if(z.type.indexOf("mat")>=0){for(var H=0|z.type.charAt(z.type.length-1),F=new Array(H),N=0;N<H;++N)F[N]=U.length,I.push(z.name+"["+N+"]"),"number"==typeof z.location?U.push(z.location+N):Array.isArray(z.location)&&z.location.length===H&&"number"==typeof z.location[N]?U.push(0|z.location[N]):U.push(-1);P.push({name:z.name,type:z.type,locations:F})}else P.push({name:z.name,type:z.type,locations:[U.length]}),I.push(z.name),U.push("number"==typeof z.location?0|z.location:-1)}var B=0;for(C=0;C<U.length;++C)if(U[C]<0){for(;U.indexOf(B)>=0;)B+=1;U[C]=B}var j=new Array(y.length);function J(){w.program=i.program(u,w._vref,w._fref,I,U);for(var G=0;G<y.length;++G)j[G]=u.getUniformLocation(w.program,y[G].name)}J(),w._relink=J,w.types={uniforms:n(y),attributes:n(h)},w.attributes=r(u,w,P,U),Object.defineProperty(w,"uniforms",o(u,w,y,j))},d.exports=function(v,g,y,h,m){var w=new p(v);return w.update(g,y,h,m),w}},9068:function(d){function s(t,o,r){this.shortMessage=o||"",this.longMessage=r||"",this.rawError=t||"",this.message="gl-shader: "+(o||t||"")+(r?"\n"+r:""),this.stack=(new Error).stack}(s.prototype=new Error).name="GLError",s.prototype.constructor=s,d.exports=s},4280:function(d,s,t){"use strict";d.exports=function(p,f,x,v){for(var g={},y=0,h=x.length;y<h;++y){var m=x[y],w=m.name,u=m.type,S=m.locations;switch(u){case"bool":case"int":case"float":a(p,f,S[0],v,1,g,w);break;default:if(u.indexOf("vec")>=0){if((_=u.charCodeAt(u.length-1)-48)<2||_>4)throw new o("","Invalid data type for attribute "+w+": "+u);a(p,f,S[0],v,_,g,w)}else{if(!(u.indexOf("mat")>=0))throw new o("","Unknown data type for attribute "+w+": "+u);var _;if((_=u.charCodeAt(u.length-1)-48)<2||_>4)throw new o("","Invalid data type for attribute "+w+": "+u);c(p,f,S,v,_,g,w)}}}return g};var o=t(9068);function r(p,f,x,v,g,y){this._gl=p,this._wrapper=f,this._index=x,this._locations=v,this._dimension=g,this._constFunc=y}var n=r.prototype;n.pointer=function(p,f,x,v){var g=this,y=g._gl,h=g._locations[g._index];y.vertexAttribPointer(h,g._dimension,p||y.FLOAT,!!f,x||0,v||0),y.enableVertexAttribArray(h)},n.set=function(p,f,x,v){return this._constFunc(this._locations[this._index],p,f,x,v)},Object.defineProperty(n,"location",{get:function(){return this._locations[this._index]},set:function(p){return p!==this._locations[this._index]&&(this._locations[this._index]=0|p,this._wrapper.program=null),0|p}});var i=[function(p,f,x){return void 0===x.length?p.vertexAttrib1f(f,x):p.vertexAttrib1fv(f,x)},function(p,f,x,v){return void 0===x.length?p.vertexAttrib2f(f,x,v):p.vertexAttrib2fv(f,x)},function(p,f,x,v,g){return void 0===x.length?p.vertexAttrib3f(f,x,v,g):p.vertexAttrib3fv(f,x)},function(p,f,x,v,g,y){return void 0===x.length?p.vertexAttrib4f(f,x,v,g,y):p.vertexAttrib4fv(f,x)}];function a(p,f,x,v,g,y,h){var m=i[g],w=new r(p,f,x,v,g,m);Object.defineProperty(y,h,{set:function(u){return p.disableVertexAttribArray(v[x]),m(p,v[x],u),u},get:function(){return w},enumerable:!0})}function c(p,f,x,v,g,y,h){for(var m=new Array(g),w=new Array(g),u=0;u<g;++u)a(p,f,x[u],v,g,m,u),w[u]=m[u];Object.defineProperty(m,"location",{set:function(E){if(Array.isArray(E))for(var L=0;L<g;++L)w[L].location=E[L];else for(L=0;L<g;++L)w[L].location=E+L;return E},get:function(){for(var E=new Array(g),L=0;L<g;++L)E[L]=v[x[L]];return E},enumerable:!0}),m.pointer=function(E,L,C,P){E=E||p.FLOAT,L=!!L,C=C||g*g,P=P||0;for(var I=0;I<g;++I){var U=v[x[I]];p.vertexAttribPointer(U,g,E,L,C,P+I*g),p.enableVertexAttribArray(U)}};var S=new Array(g),_=p["vertexAttrib"+g+"fv"];Object.defineProperty(y,h,{set:function(E){for(var L=0;L<g;++L){var C=v[x[L]];if(p.disableVertexAttribArray(C),Array.isArray(E[0]))_.call(p,C,E[L]);else{for(var P=0;P<g;++P)S[P]=E[g*L+P];_.call(p,C,S)}}return E},get:function(){return m},enumerable:!0})}},9016:function(d,s,t){"use strict";var o=t(3984),r=t(9068);function n(a){return function(){return a}}function i(a,c){for(var p=new Array(a),f=0;f<a;++f)p[f]=c;return p}d.exports=function(a,c,p,f){function x(m){return function(w){for(var u=v("",m),S=0;S<u.length;++S){var _=u[S],E=_[0],L=_[1];if(f[L]){var C=w;if("string"==typeof E&&(0===E.indexOf(".")||0===E.indexOf("["))){var P=E;if(0===E.indexOf(".")&&(P=E.slice(1)),P.indexOf("]")===P.length-1){var I=P.indexOf("["),U=P.slice(0,I),z=P.slice(I+1,P.length-1);C=U?w[U][z]:w[z]}else C=w[P]}var H,F=p[L].type;switch(F){case"bool":case"int":case"sampler2D":case"samplerCube":a.uniform1i(f[L],C);break;case"float":a.uniform1f(f[L],C);break;default:var N=F.indexOf("vec");if(!(0<=N&&N<=1&&F.length===4+N)){if(0===F.indexOf("mat")&&4===F.length){if((H=F.charCodeAt(F.length-1)-48)<2||H>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+F);a["uniformMatrix"+H+"fv"](f[L],!1,C);break}throw new r("","Unknown uniform data type for "+name+": "+F)}if((H=F.charCodeAt(F.length-1)-48)<2||H>4)throw new r("","Invalid data type");switch(F.charAt(0)){case"b":case"i":a["uniform"+H+"iv"](f[L],C);break;case"v":a["uniform"+H+"fv"](f[L],C);break;default:throw new r("","Unrecognized data type for vector "+name+": "+F)}}}}}}function v(m,w){if("object"!=typeof w)return[[m,w]];var u=[];for(var S in w){var _=w[S],E=m;parseInt(S)+""===S?E+="["+S+"]":E+="."+S,"object"==typeof _?u.push.apply(u,v(E,_)):u.push([E,_])}return u}function g(m,w,u){if("object"==typeof u){var S=y(u);Object.defineProperty(m,w,{get:n(S),set:x(u),enumerable:!0,configurable:!1})}else f[u]?Object.defineProperty(m,w,{get:(_=u,function(E,L,C){return E.getUniform(L.program,C[_])}),set:x(u),enumerable:!0,configurable:!1}):m[w]=function(E){switch(E){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":case"float":return 0;default:var L=E.indexOf("vec");if(0<=L&&L<=1&&E.length===4+L){if((C=E.charCodeAt(E.length-1)-48)<2||C>4)throw new r("","Invalid data type");return"b"===E.charAt(0)?i(C,!1):i(C,0)}if(0===E.indexOf("mat")&&4===E.length){var C;if((C=E.charCodeAt(E.length-1)-48)<2||C>4)throw new r("","Invalid uniform dimension type for matrix "+name+": "+E);return i(C*C,0)}throw new r("","Unknown uniform data type for "+name+": "+E)}}(p[u].type);var _}function y(m){var w;if(Array.isArray(m)){w=new Array(m.length);for(var u=0;u<m.length;++u)g(w,u,m[u])}else for(var S in w={},m)g(w,S,m[S]);return w}var h=o(p,!0);return{get:n(y(h)),set:x(h),enumerable:!0,configurable:!0}}},3984:function(d){"use strict";d.exports=function(s,t){for(var o={},r=0;r<s.length;++r)for(var n=s[r].name.split("."),i=o,a=0;a<n.length;++a){var c=n[a].split("[");if(c.length>1){c[0]in i||(i[c[0]]=[]),i=i[c[0]];for(var p=1;p<c.length;++p){var f=parseInt(c[p]);p<c.length-1||a<n.length-1?(f in i||(i[f]=p<c.length-1?[]:{}),i=i[f]):i[f]=t?r:s[r].type}}else a<n.length-1?(c[0]in i||(i[c[0]]={}),i=i[c[0]]):i[c[0]]=t?r:s[r].type}return o}},2631:function(d,s){"use strict";s.uniforms=function(n,i){for(var a=n.getProgramParameter(i,n.ACTIVE_UNIFORMS),c=[],p=0;p<a;++p){var f=n.getActiveUniform(i,p);if(f){var x=r(n,f.type);if(f.size>1)for(var v=0;v<f.size;++v)c.push({name:f.name.replace("[0]","["+v+"]"),type:x});else c.push({name:f.name,type:x})}}return c},s.attributes=function(n,i){for(var a=n.getProgramParameter(i,n.ACTIVE_ATTRIBUTES),c=[],p=0;p<a;++p){var f=n.getActiveAttrib(i,p);f&&c.push({name:f.name,type:r(n,f.type)})}return c};var t={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"},o=null;function r(n,i){if(!o){var a=Object.keys(t);o={};for(var c=0;c<a.length;++c){var p=a[c];o[n[p]]=t[p]}}return o[i]}},1628:function(d,s,t){"use strict";s.shader=function(x,v,g){return f(x).getShaderReference(v,g)},s.program=function(x,v,g,y,h){return f(x).getProgram(v,g,y,h)};var o=t(9068),r=t(3530),n=new(typeof WeakMap>"u"?t(4037):WeakMap),i=0;function a(x,v,g,y,h,m,w){this.id=x,this.src=v,this.type=g,this.shader=y,this.count=m,this.programs=[],this.cache=w}function c(x){this.gl=x,this.shaders=[{},{}],this.programs={}}a.prototype.dispose=function(){if(0==--this.count){for(var x=this.cache,v=x.gl,g=this.programs,y=0,h=g.length;y<h;++y){var m=x.programs[g[y]];m&&(delete x.programs[y],v.deleteProgram(m))}v.deleteShader(this.shader),delete x.shaders[this.type===v.FRAGMENT_SHADER|0][this.src]}};var p=c.prototype;function f(x){var v=n.get(x);return v||(v=new c(x),n.set(x,v)),v}p.getShaderReference=function(x,v){var g=this.gl,y=this.shaders[x===g.FRAGMENT_SHADER|0],h=y[v];if(h&&g.isShader(h.shader))h.count+=1;else{var m=function(w,u,S){var _=w.createShader(u);if(w.shaderSource(_,S),w.compileShader(_),!w.getShaderParameter(_,w.COMPILE_STATUS)){var E=w.getShaderInfoLog(_);try{var L=r(E,S,u)}catch(C){throw console.warn("Failed to format compiler error: "+C),new o(E,"Error compiling shader:\n"+E)}throw new o(E,L.short,L.long)}return _}(g,x,v);h=y[v]=new a(i++,v,x,m,[],1,this)}return h},p.getProgram=function(x,v,g,y){var h=[x.id,v.id,g.join(":"),y.join(":")].join("@"),m=this.programs[h];return m&&this.gl.isProgram(m)||(this.programs[h]=m=function(w,u,S,_,E){var L=w.createProgram();w.attachShader(L,u),w.attachShader(L,S);for(var C=0;C<_.length;++C)w.bindAttribLocation(L,E[C],_[C]);if(w.linkProgram(L),!w.getProgramParameter(L,w.LINK_STATUS)){var P=w.getProgramInfoLog(L);throw new o(P,"Error linking program: "+P)}return L}(this.gl,x.shader,v.shader,g,y),x.programs.push(h),v.programs.push(h)),m}},3050:function(d){"use strict";function s(o){this.plot=o,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]}d.exports=function(o,r){var n=new s(o);return n.update(r),o.addOverlay(n),n};var t=s.prototype;t.update=function(o){this.enable=((o=o||{}).enable||[!0,!0,!1,!1]).slice(),this.width=(o.width||[1,1,1,1]).slice(),this.color=(o.color||[[0,0,0,1],[0,0,0,1],[0,0,0,1],[0,0,0,1]]).map(function(r){return r.slice()}),this.center=(o.center||[1/0,1/0]).slice(),this.plot.setOverlayDirty()},t.draw=function(){var o=this.enable,r=this.width,n=this.color,i=this.center,a=this.plot,c=a.line,p=a.dataBox,f=a.viewBox;if(c.bind(),p[0]<=i[0]&&i[0]<=p[2]&&p[1]<=i[1]&&i[1]<=p[3]){var x=f[0]+(i[0]-p[0])/(p[2]-p[0])*(f[2]-f[0]),v=f[1]+(i[1]-p[1])/(p[3]-p[1])*(f[3]-f[1]);o[0]&&c.drawLine(x,v,f[0],v,r[0],n[0]),o[1]&&c.drawLine(x,v,x,f[1],r[1],n[1]),o[2]&&c.drawLine(x,v,f[2],v,r[2],n[2]),o[3]&&c.drawLine(x,v,x,f[3],r[3],n[3])}},t.dispose=function(){this.plot.removeOverlay(this)}},3540:function(d,s,t){"use strict";var o=t(6832),r=t(5158),n=o(["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"]),i=o(["precision mediump float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n  gl_FragColor = fragColor;\n}"]);d.exports=function(a){return r(a,n,i,null,[{name:"position",type:"vec3"},{name:"color",type:"vec3"},{name:"weight",type:"float"}])}},6496:function(d,s,t){"use strict";var o=t(5827),r=t(2944),n=t(3540);d.exports=function(v,g){var y=[];function h(_,E,L,C,P,I){var U=[_,E,L,0,0,0,1];U[C+3]=1,U[C]=P,y.push.apply(y,U),U[6]=-1,y.push.apply(y,U),U[C]=I,y.push.apply(y,U),y.push.apply(y,U),U[6]=1,y.push.apply(y,U),U[C]=P,y.push.apply(y,U)}h(0,0,0,0,0,1),h(0,0,0,1,0,1),h(0,0,0,2,0,1),h(1,0,0,1,-1,1),h(1,0,0,2,-1,1),h(0,1,0,0,-1,1),h(0,1,0,2,-1,1),h(0,0,1,0,-1,1),h(0,0,1,1,-1,1);var m=o(v,y),w=r(v,[{type:v.FLOAT,buffer:m,size:3,offset:0,stride:28},{type:v.FLOAT,buffer:m,size:3,offset:12,stride:28},{type:v.FLOAT,buffer:m,size:1,offset:24,stride:28}]),u=n(v);u.attributes.position.location=0,u.attributes.color.location=1,u.attributes.weight.location=2;var S=new a(v,m,w,u);return S.update(g),S};var i=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function a(v,g,y,h){this.gl=v,this.buffer=g,this.vao=y,this.shader=h,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 c=a.prototype,p=[0,0,0],f=[0,0,0],x=[0,0];c.isTransparent=function(){return!1},c.drawTransparent=function(v){},c.draw=function(v){var g=this.gl,y=this.vao,h=this.shader;y.bind(),h.bind();var m,w=v.model||i,u=v.view||i,S=v.projection||i;this.axes&&(m=this.axes.lastCubeProps.axis);for(var _=p,E=f,L=0;L<3;++L)m&&m[L]<0?(_[L]=this.bounds[0][L],E[L]=this.bounds[1][L]):(_[L]=this.bounds[1][L],E[L]=this.bounds[0][L]);for(x[0]=g.drawingBufferWidth,x[1]=g.drawingBufferHeight,h.uniforms.model=w,h.uniforms.view=u,h.uniforms.projection=S,h.uniforms.coordinates=[this.position,_,E],h.uniforms.colors=this.colors,h.uniforms.screenShape=x,L=0;L<3;++L)h.uniforms.lineWidth=this.lineWidth[L]*this.pixelRatio,this.enabled[L]&&(y.draw(g.TRIANGLES,6,6*L),this.drawSides[L]&&y.draw(g.TRIANGLES,12,18+12*L));y.unbind()},c.update=function(v){v&&("bounds"in v&&(this.bounds=v.bounds),"position"in v&&(this.position=v.position),"lineWidth"in v&&(this.lineWidth=v.lineWidth),"colors"in v&&(this.colors=v.colors),"enabled"in v&&(this.enabled=v.enabled),"drawSides"in v&&(this.drawSides=v.drawSides))},c.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()}},9578:function(d,s,t){var o=t(6832),r=o(["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"]),n=o(["#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"]),i=o(["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"]),a=o(["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}"]);s.meshShader={vertex:r,fragment:n,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},s.pickShader={vertex:i,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(d,s,t){"use strict";var o=t(2858),r=t(4020),n=["xyz","xzy","yxz","yzx","zxy","zyx"],i=function(x,v){var g,y=x.length;for(g=0;g<y;g++){var h=x[g];if(h===v)return g;if(h>v)return g-1}return g},a=function(x,v,g){return x<v?v:x>g?g:x},c=function(x){var v=1/0;x.sort(function(m,w){return m-w});for(var g=x.length,y=1;y<g;y++){var h=Math.abs(x[y]-x[y-1]);h<v&&(v=h)}return v};d.exports=function(x,v){var g=x.startingPositions,y=x.maxLength||1e3,h=x.tubeSize||1,m=x.absoluteTubeSize,w=x.gridFill||"+x+y+z",u={};-1!==w.indexOf("-x")&&(u.reversedX=!0),-1!==w.indexOf("-y")&&(u.reversedY=!0),-1!==w.indexOf("-z")&&(u.reversedZ=!0),u.filled=n.indexOf(w.replace(/-/g,"").replace(/\+/g,""));var ve,Pe,xe,ke,S=x.getVelocity||function(ve){return function(Pe,xe,ke){var Ae=xe.vectors,Te=xe.meshgrid,Q=Pe[0],se=Pe[1],fe=Pe[2],ye=Te[0].length,Me=Te[1].length,Ie=Te[2].length,Ce=i(Te[0],Q),Re=i(Te[1],se),le=i(Te[2],fe),ge=Ce+1,_e=Re+1,Fe=le+1;if(Ce=a(Ce,0,ye-1),ge=a(ge,0,ye-1),Re=a(Re,0,Me-1),_e=a(_e,0,Me-1),le=a(le,0,Ie-1),Fe=a(Fe,0,Ie-1),Ce<0||Re<0||le<0||ge>ye-1||_e>Me-1||Fe>Ie-1)return o.create();var Ve,He,nt,tt,ot,dt,kt=Te[0][Ce],wt=Te[1][Re],Ct=Te[2][le],It=(Q-kt)/(Te[0][ge]-kt),Ut=(se-wt)/(Te[1][_e]-wt),Rt=(fe-Ct)/(Te[2][Fe]-Ct);switch(isFinite(It)||(It=.5),isFinite(Ut)||(Ut=.5),isFinite(Rt)||(Rt=.5),ke.reversedX&&(Ce=ye-1-Ce,ge=ye-1-ge),ke.reversedY&&(Re=Me-1-Re,_e=Me-1-_e),ke.reversedZ&&(le=Ie-1-le,Fe=Ie-1-Fe),ke.filled){case 5:ot=le,dt=Fe,nt=Re*Ie,tt=_e*Ie,Ve=Ce*Ie*Me,He=ge*Ie*Me;break;case 4:ot=le,dt=Fe,Ve=Ce*Ie,He=ge*Ie,nt=Re*Ie*ye,tt=_e*Ie*ye;break;case 3:nt=Re,tt=_e,ot=le*Me,dt=Fe*Me,Ve=Ce*Me*Ie,He=ge*Me*Ie;break;case 2:nt=Re,tt=_e,Ve=Ce*Me,He=ge*Me,ot=le*Me*ye,dt=Fe*Me*ye;break;case 1:Ve=Ce,He=ge,ot=le*ye,dt=Fe*ye,nt=Re*ye*Ie,tt=_e*ye*Ie;break;default:Ve=Ce,He=ge,nt=Re*ye,tt=_e*ye,ot=le*ye*Me,dt=Fe*ye*Me}var Ge=Ae[Ve+nt+ot],We=Ae[Ve+nt+dt],Be=Ae[Ve+tt+ot],Ye=Ae[Ve+tt+dt],rt=Ae[He+nt+ot],Se=Ae[He+nt+dt],ze=Ae[He+tt+ot],Ke=Ae[He+tt+dt],st=o.create(),ct=o.create(),Tt=o.create(),Et=o.create();o.lerp(st,Ge,rt,It),o.lerp(ct,We,Se,It),o.lerp(Tt,Be,ze,It),o.lerp(Et,Ye,Ke,It);var At=o.create(),ht=o.create();o.lerp(At,st,Tt,Ut),o.lerp(ht,ct,Et,Ut);var pt=o.create();return o.lerp(pt,At,ht,Rt),pt}(ve,x,u)},_=x.getDivergence||function(ve,Pe){var xe=o.create(),ke=1e-4;o.add(xe,ve,[ke,0,0]);var Ae=S(xe);o.subtract(Ae,Ae,Pe),o.scale(Ae,Ae,1/ke),o.add(xe,ve,[0,ke,0]);var Te=S(xe);o.subtract(Te,Te,Pe),o.scale(Te,Te,1/ke),o.add(xe,ve,[0,0,ke]);var Q=S(xe);return o.subtract(Q,Q,Pe),o.scale(Q,Q,1/ke),o.add(xe,Ae,Te),o.add(xe,xe,Q),xe},E=[],L=v[0][0],C=v[0][1],P=v[0][2],I=v[1][0],U=v[1][1],z=v[1][2],F=10*o.distance(v[0],v[1])/y,N=F*F,B=1,j=0,J=g.length;J>1&&(B=function(ve){for(var Pe=[],xe=[],ke=[],Ae={},Te={},Q={},se=ve.length,fe=0;fe<se;fe++){var ye=ve[fe],Me=ye[0],Ie=ye[1],Ce=ye[2];Ae[Me]||(Pe.push(Me),Ae[Me]=!0),Te[Ie]||(xe.push(Ie),Te[Ie]=!0),Q[Ce]||(ke.push(Ce),Q[Ce]=!0)}var Re=c(Pe),le=c(xe),ge=c(ke),_e=Math.min(Re,le,ge);return isFinite(_e)?_e:1}(g));for(var G=0;G<J;G++){var V=o.create();o.copy(V,g[G]);var W=[V],X=[],K=S(V),re=V;X.push(K);var ee=[],ie=_(V,K),oe=o.length(ie);isFinite(oe)&&oe>j&&(j=oe),ee.push(oe),E.push({points:W,velocities:X,divergences:ee});for(var ce=0;ce<100*y&&W.length<y&&(void 0,void 0,void 0,xe=(ve=V)[1],ke=ve[2],!((Pe=ve[0])<L||Pe>I||xe<C||xe>U||ke<P||ke>z));){ce++;var me=o.clone(K),de=o.squaredLength(me);if(0===de)break;de>N&&o.scale(me,me,F/Math.sqrt(de)),o.add(me,me,V),K=S(me),o.squaredDistance(re,me)-N>-1e-4*N&&(W.push(me),re=me,X.push(K),ie=_(me,K),oe=o.length(ie),isFinite(oe)&&oe>j&&(j=oe),ee.push(oe)),V=me}}var he=function(ve,Pe,xe,ke){for(var Ae=0,Te=0;Te<ve.length;Te++)for(var Q=ve[Te].velocities,se=0;se<Q.length;se++)Ae=Math.max(Ae,o.length(Q[se]));var fe=ve.map(function(Ve){return function(He,nt,tt,ot){for(var dt=He.points,kt=He.velocities,mt=He.divergences,wt=[],Lt=[],Ct=[],It=[],Ut=[],Rt=[],Ge=0,We=0,Be=r.create(),Ye=r.create(),rt=0;rt<dt.length;rt++){var Se=dt[rt],ze=kt[rt],Ke=mt[rt];0===nt&&(Ke=.05*tt),We=o.length(ze)/ot,Be=r.create(),o.copy(Be,ze),Be[3]=Ke;for(var st=0;st<8;st++)Ut[st]=[Se[0],Se[1],Se[2],st];if(It.length>0)for(st=0;st<8;st++){var ct=(st+1)%8;wt.push(It[st],Ut[st],Ut[ct],Ut[ct],It[ct],It[st]),Ct.push(Ye,Be,Be,Be,Ye,Ye),Rt.push(Ge,We,We,We,Ge,Ge);var Tt=wt.length;Lt.push([Tt-6,Tt-5,Tt-4],[Tt-3,Tt-2,Tt-1])}var Et=It;It=Ut,Ut=Et;var At=Ye;Ye=Be,Be=At;var ht=Ge;Ge=We,We=ht}return{positions:wt,cells:Lt,vectors:Ct,vertexIntensity:Rt}}(Ve,xe,ke,Ae)}),ye=[],Me=[],Ie=[],Ce=[];for(Te=0;Te<fe.length;Te++){var Re=fe[Te],le=ye.length;for(ye=ye.concat(Re.positions),Ie=Ie.concat(Re.vectors),Ce=Ce.concat(Re.vertexIntensity),se=0;se<Re.cells.length;se++){var ge=Re.cells[se],_e=[];Me.push(_e);for(var Fe=0;Fe<ge.length;Fe++)_e.push(ge[Fe]+le)}}return{positions:ye,cells:Me,vectors:Ie,vertexIntensity:Ce,colormap:Pe}}(E,x.colormap,j,B);return m?he.tubeScale=m:(0===j&&(j=1),he.tubeScale=.5*h*B/j),he};var p=t(9578),f=t(1140).createMesh;d.exports.createTubeMesh=function(x,v){return f(x,v,{shaders:p,traceType:"streamtube"})}},9054:function(d,s,t){var o=t(5158),r=t(6832),n=r(["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"]),i=r(["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 \u2014 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"]),a=r(["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"]),c=r(["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"]);s.createShader=function(p){var f=o(p,n,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},s.createPickShader=function(p){var f=o(p,n,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f.attributes.normal.location=2,f},s.createContourShader=function(p){var f=o(p,a,i,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f},s.createPickContourShader=function(p){var f=o(p,a,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return f.attributes.uv.location=0,f.attributes.f.location=1,f}},3754:function(d,s,t){"use strict";d.exports=function(re){var ee=re.gl,ie=u(ee),oe=_(ee),ce=S(ee),me=E(ee),de=r(ee),he=n(ee,[{buffer:de,size:4,stride:40,offset:0},{buffer:de,size:3,stride:40,offset:16},{buffer:de,size:3,stride:40,offset:28}]),ve=r(ee),Pe=n(ee,[{buffer:ve,size:4,stride:20,offset:0},{buffer:ve,size:1,stride:20,offset:16}]),xe=r(ee),ke=n(ee,[{buffer:xe,size:2,type:ee.FLOAT}]),Ae=i(ee,1,256,ee.RGBA,ee.UNSIGNED_BYTE);Ae.minFilter=ee.LINEAR,Ae.magFilter=ee.LINEAR;var Te=new U(ee,[0,0],[[0,0,0],[0,0,0]],ie,oe,de,he,Ae,ce,me,ve,Pe,xe,ke,[0,0,0]),Q={levels:[[],[],[]]};for(var se in re)Q[se]=re[se];return Q.colormap=Q.colormap||"jet",Te.update(Q),Te};var o=t(2288),r=t(5827),n=t(2944),i=t(8931),a=t(5306),c=t(9156),p=t(7498),f=t(7382),x=t(5050),v=t(4162),g=t(104),y=t(7437),h=t(5070),m=t(9144),w=t(9054),u=w.createShader,S=w.createContourShader,_=w.createPickShader,E=w.createPickContourShader,L=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],C=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],P=[[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 I(re,ee,ie,oe,ce){this.position=re,this.index=ee,this.uv=ie,this.level=oe,this.dataCoordinate=ce}function U(re,ee,ie,oe,ce,me,de,he,ve,Pe,xe,ke,Ae,Te,Q){this.gl=re,this.shape=ee,this.bounds=ie,this.objectOffset=Q,this.intensityBounds=[],this._shader=oe,this._pickShader=ce,this._coordinateBuffer=me,this._vao=de,this._colorMap=he,this._contourShader=ve,this._contourPickShader=Pe,this._contourBuffer=xe,this._contourVAO=ke,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new I([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Ae,this._dynamicVAO=Te,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=[x(a.mallocFloat(1024),[0,0]),x(a.mallocFloat(1024),[0,0]),x(a.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}!function(){for(var re=0;re<3;++re){var ee=P[re],ie=(re+2)%3;ee[(re+1)%3+0]=1,ee[ie+3]=1,ee[re+6]=1}}();var z=U.prototype;z.genColormap=function(re,ee){var ie=!1,oe=f([c({colormap:re,nshades:256,format:"rgba"}).map(function(ce,me){var de=ee?function(he,ve){if(!ve||!ve.length)return 1;for(var Pe=0;Pe<ve.length;++Pe){if(ve.length<2)return 1;if(ve[Pe][0]===he)return ve[Pe][1];if(ve[Pe][0]>he&&Pe>0){var xe=(ve[Pe][0]-he)/(ve[Pe][0]-ve[Pe-1][0]);return ve[Pe][1]*(1-xe)+xe*ve[Pe-1][1]}}return 1}(me/255,ee):ce[3];return de<1&&(ie=!0),[ce[0],ce[1],ce[2],255*de]})]);return p.divseq(oe,255),this.hasAlphaScale=ie,oe},z.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},z.isOpaque=function(){return!this.isTransparent()},z.pickSlots=1,z.setPickBase=function(re){this.pickId=re};var H=[0,0,0],F={showSurface:!1,showContour:!1,projections:[L.slice(),L.slice(),L.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function N(re,ee){var ie,oe,ce,me=ee.axes&&ee.axes.lastCubeProps.axis||H,de=ee.showSurface,he=ee.showContour;for(ie=0;ie<3;++ie)for(de=de||ee.surfaceProject[ie],oe=0;oe<3;++oe)he=he||ee.contourProject[ie][oe];for(ie=0;ie<3;++ie){var ve=F.projections[ie];for(oe=0;oe<16;++oe)ve[oe]=0;for(oe=0;oe<4;++oe)ve[5*oe]=1;ve[5*ie]=0,ve[12+ie]=ee.axesBounds[+(me[ie]>0)][ie],g(ve,re.model,ve);var Pe=F.clipBounds[ie];for(ce=0;ce<2;++ce)for(oe=0;oe<3;++oe)Pe[ce][oe]=re.clipBounds[ce][oe];Pe[0][ie]=-1e8,Pe[1][ie]=1e8}return F.showSurface=de,F.showContour=he,F}var B={model:L,view:L,projection:L,inverseModel:L.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},j=L.slice(),J=[1,0,0,0,1,0,0,0,1];function G(re,ee){re=re||{};var ie=this.gl;ie.disable(ie.CULL_FACE),this._colorMap.bind(0);var oe=B;oe.model=re.model||L,oe.view=re.view||L,oe.projection=re.projection||L,oe.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],oe.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],oe.objectOffset=this.objectOffset,oe.contourColor=this.contourColor[0],oe.inverseModel=y(oe.inverseModel,oe.model);for(var ce=0;ce<2;++ce)for(var me=oe.clipBounds[ce],de=0;de<3;++de)me[de]=Math.min(Math.max(this.clipBounds[ce][de],-1e8),1e8);oe.kambient=this.ambientLight,oe.kdiffuse=this.diffuseLight,oe.kspecular=this.specularLight,oe.roughness=this.roughness,oe.fresnel=this.fresnel,oe.opacity=this.opacity,oe.height=0,oe.permutation=J,oe.vertexColor=this.vertexColor;var he=j;for(g(he,oe.view,oe.model),g(he,oe.projection,he),y(he,he),ce=0;ce<3;++ce)oe.eyePosition[ce]=he[12+ce]/he[15];var ve=he[15];for(ce=0;ce<3;++ce)ve+=this.lightPosition[ce]*he[4*ce+3];for(ce=0;ce<3;++ce){var Pe=he[12+ce];for(de=0;de<3;++de)Pe+=he[4*de+ce]*this.lightPosition[de];oe.lightPosition[ce]=Pe/ve}var xe=N(oe,this);if(xe.showSurface){for(this._shader.bind(),this._shader.uniforms=oe,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ie.TRIANGLES,this._vertexCount),ce=0;ce<3;++ce)this.surfaceProject[ce]&&this.vertexCount&&(this._shader.uniforms.model=xe.projections[ce],this._shader.uniforms.clipBounds=xe.clipBounds[ce],this._vao.draw(ie.TRIANGLES,this._vertexCount));this._vao.unbind()}if(xe.showContour){var ke=this._contourShader;oe.kambient=1,oe.kdiffuse=0,oe.kspecular=0,oe.opacity=1,ke.bind(),ke.uniforms=oe;var Ae=this._contourVAO;for(Ae.bind(),ce=0;ce<3;++ce)for(ke.uniforms.permutation=P[ce],ie.lineWidth(this.contourWidth[ce]*this.pixelRatio),de=0;de<this.contourLevels[ce].length;++de)de===this.highlightLevel[ce]?(ke.uniforms.contourColor=this.highlightColor[ce],ke.uniforms.contourTint=this.highlightTint[ce]):0!==de&&de-1!==this.highlightLevel[ce]||(ke.uniforms.contourColor=this.contourColor[ce],ke.uniforms.contourTint=this.contourTint[ce]),this._contourCounts[ce][de]&&(ke.uniforms.height=this.contourLevels[ce][de],Ae.draw(ie.LINES,this._contourCounts[ce][de],this._contourOffsets[ce][de]));for(ce=0;ce<3;++ce)for(ke.uniforms.model=xe.projections[ce],ke.uniforms.clipBounds=xe.clipBounds[ce],de=0;de<3;++de)if(this.contourProject[ce][de]){ke.uniforms.permutation=P[de],ie.lineWidth(this.contourWidth[de]*this.pixelRatio);for(var Te=0;Te<this.contourLevels[de].length;++Te)Te===this.highlightLevel[de]?(ke.uniforms.contourColor=this.highlightColor[de],ke.uniforms.contourTint=this.highlightTint[de]):0!==Te&&Te-1!==this.highlightLevel[de]||(ke.uniforms.contourColor=this.contourColor[de],ke.uniforms.contourTint=this.contourTint[de]),this._contourCounts[de][Te]&&(ke.uniforms.height=this.contourLevels[de][Te],Ae.draw(ie.LINES,this._contourCounts[de][Te],this._contourOffsets[de][Te]))}for(Ae.unbind(),(Ae=this._dynamicVAO).bind(),ce=0;ce<3;++ce)if(0!==this._dynamicCounts[ce])for(ke.uniforms.model=oe.model,ke.uniforms.clipBounds=oe.clipBounds,ke.uniforms.permutation=P[ce],ie.lineWidth(this.dynamicWidth[ce]*this.pixelRatio),ke.uniforms.contourColor=this.dynamicColor[ce],ke.uniforms.contourTint=this.dynamicTint[ce],ke.uniforms.height=this.dynamicLevel[ce],Ae.draw(ie.LINES,this._dynamicCounts[ce],this._dynamicOffsets[ce]),de=0;de<3;++de)this.contourProject[de][ce]&&(ke.uniforms.model=xe.projections[de],ke.uniforms.clipBounds=xe.clipBounds[de],Ae.draw(ie.LINES,this._dynamicCounts[ce],this._dynamicOffsets[ce]));Ae.unbind()}}z.draw=function(re){return G.call(this,re,!1)},z.drawTransparent=function(re){return G.call(this,re,!0)};var V={model:L,view:L,projection:L,inverseModel:L,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 W(re,ee){return Array.isArray(re)?[ee(re[0]),ee(re[1]),ee(re[2])]:[ee(re),ee(re),ee(re)]}function X(re){return Array.isArray(re)?3===re.length?[re[0],re[1],re[2],1]:[re[0],re[1],re[2],re[3]]:[0,0,0,1]}function K(re){if(Array.isArray(re)){if(Array.isArray(re))return[X(re[0]),X(re[1]),X(re[2])];var ee=X(re);return[ee.slice(),ee.slice(),ee.slice()]}}z.drawPick=function(re){re=re||{};var ee=this.gl;ee.disable(ee.CULL_FACE);var ie=V;ie.model=re.model||L,ie.view=re.view||L,ie.projection=re.projection||L,ie.shape=this._field[2].shape,ie.pickId=this.pickId/255,ie.lowerBound=this.bounds[0],ie.upperBound=this.bounds[1],ie.objectOffset=this.objectOffset,ie.permutation=J;for(var oe=0;oe<2;++oe)for(var ce=ie.clipBounds[oe],me=0;me<3;++me)ce[me]=Math.min(Math.max(this.clipBounds[oe][me],-1e8),1e8);var de=N(ie,this);if(de.showSurface){for(this._pickShader.bind(),this._pickShader.uniforms=ie,this._vao.bind(),this._vao.draw(ee.TRIANGLES,this._vertexCount),oe=0;oe<3;++oe)this.surfaceProject[oe]&&(this._pickShader.uniforms.model=de.projections[oe],this._pickShader.uniforms.clipBounds=de.clipBounds[oe],this._vao.draw(ee.TRIANGLES,this._vertexCount));this._vao.unbind()}if(de.showContour){var he=this._contourPickShader;he.bind(),he.uniforms=ie;var ve=this._contourVAO;for(ve.bind(),me=0;me<3;++me)for(ee.lineWidth(this.contourWidth[me]*this.pixelRatio),he.uniforms.permutation=P[me],oe=0;oe<this.contourLevels[me].length;++oe)this._contourCounts[me][oe]&&(he.uniforms.height=this.contourLevels[me][oe],ve.draw(ee.LINES,this._contourCounts[me][oe],this._contourOffsets[me][oe]));for(oe=0;oe<3;++oe)for(he.uniforms.model=de.projections[oe],he.uniforms.clipBounds=de.clipBounds[oe],me=0;me<3;++me)if(this.contourProject[oe][me]){he.uniforms.permutation=P[me],ee.lineWidth(this.contourWidth[me]*this.pixelRatio);for(var Pe=0;Pe<this.contourLevels[me].length;++Pe)this._contourCounts[me][Pe]&&(he.uniforms.height=this.contourLevels[me][Pe],ve.draw(ee.LINES,this._contourCounts[me][Pe],this._contourOffsets[me][Pe]))}ve.unbind()}},z.pick=function(re){if(!re||re.id!==this.pickId)return null;var ee=this._field[2].shape,ie=this._pickResult,oe=ee[0]*(re.value[0]+(re.value[2]>>4)/16)/255,ce=Math.floor(oe),me=oe-ce,de=ee[1]*(re.value[1]+(15&re.value[2])/16)/255,he=Math.floor(de),ve=de-he;ce+=1,he+=1;var Pe=ie.position;Pe[0]=Pe[1]=Pe[2]=0;for(var xe=0;xe<2;++xe)for(var ke=xe?me:1-me,Ae=0;Ae<2;++Ae)for(var Te=ce+xe,Q=he+Ae,se=ke*(Ae?ve:1-ve),fe=0;fe<3;++fe)Pe[fe]+=this._field[fe].get(Te,Q)*se;for(var ye=this._pickResult.level,Me=0;Me<3;++Me)if(ye[Me]=h.le(this.contourLevels[Me],Pe[Me]),ye[Me]<0)this.contourLevels[Me].length>0&&(ye[Me]=0);else if(ye[Me]<this.contourLevels[Me].length-1){var Ce=this.contourLevels[Me][ye[Me]+1];Math.abs(this.contourLevels[Me][ye[Me]]-Pe[Me])>Math.abs(Ce-Pe[Me])&&(ye[Me]+=1)}for(ie.index[0]=me<.5?ce:ce+1,ie.index[1]=ve<.5?he:he+1,ie.uv[0]=oe/ee[0],ie.uv[1]=de/ee[1],fe=0;fe<3;++fe)ie.dataCoordinate[fe]=this._field[fe].get(ie.index[0],ie.index[1]);return ie},z.padField=function(re,ee){var ie=ee.shape.slice(),oe=re.shape.slice();p.assign(re.lo(1,1).hi(ie[0],ie[1]),ee),p.assign(re.lo(1).hi(ie[0],1),ee.hi(ie[0],1)),p.assign(re.lo(1,oe[1]-1).hi(ie[0],1),ee.lo(0,ie[1]-1).hi(ie[0],1)),p.assign(re.lo(0,1).hi(1,ie[1]),ee.hi(1)),p.assign(re.lo(oe[0]-1,1).hi(1,ie[1]),ee.lo(ie[0]-1)),re.set(0,0,ee.get(0,0)),re.set(0,oe[1]-1,ee.get(0,ie[1]-1)),re.set(oe[0]-1,0,ee.get(ie[0]-1,0)),re.set(oe[0]-1,oe[1]-1,ee.get(ie[0]-1,ie[1]-1))},z.update=function(re){this.objectOffset=(re=re||{}).objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in re&&(this.contourWidth=W(re.contourWidth,Number)),"showContour"in re&&(this.showContour=W(re.showContour,Boolean)),"showSurface"in re&&(this.showSurface=!!re.showSurface),"contourTint"in re&&(this.contourTint=W(re.contourTint,Boolean)),"contourColor"in re&&(this.contourColor=K(re.contourColor)),"contourProject"in re&&(this.contourProject=W(re.contourProject,function(vn){return W(vn,Boolean)})),"surfaceProject"in re&&(this.surfaceProject=re.surfaceProject),"dynamicColor"in re&&(this.dynamicColor=K(re.dynamicColor)),"dynamicTint"in re&&(this.dynamicTint=W(re.dynamicTint,Number)),"dynamicWidth"in re&&(this.dynamicWidth=W(re.dynamicWidth,Number)),"opacity"in re&&(this.opacity=re.opacity),"opacityscale"in re&&(this.opacityscale=re.opacityscale),"colorBounds"in re&&(this.colorBounds=re.colorBounds),"vertexColor"in re&&(this.vertexColor=re.vertexColor?1:0),"colormap"in re&&this._colorMap.setPixels(this.genColormap(re.colormap,this.opacityscale));var ee=re.field||re.coords&&re.coords[2]||null,ie=!1;if(ee||(ee=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 re||"coords"in re){var oe=(ee.shape[0]+2)*(ee.shape[1]+2);oe>this._field[2].data.length&&(a.freeFloat(this._field[2].data),this._field[2].data=a.mallocFloat(o.nextPow2(oe))),this._field[2]=x(this._field[2].data,[ee.shape[0]+2,ee.shape[1]+2]),this.padField(this._field[2],ee),this.shape=ee.shape.slice();for(var ce=this.shape,me=0;me<2;++me)this._field[2].size>this._field[me].data.length&&(a.freeFloat(this._field[me].data),this._field[me].data=a.mallocFloat(this._field[2].size)),this._field[me]=x(this._field[me].data,[ce[0]+2,ce[1]+2]);if(re.coords){var de=re.coords;if(!Array.isArray(de)||3!==de.length)throw new Error("gl-surface: invalid coordinates for x/y");for(me=0;me<2;++me){var he=de[me];for(Ae=0;Ae<2;++Ae)if(he.shape[Ae]!==ce[Ae])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[me],he)}}else if(re.ticks){var ve=re.ticks;if(!Array.isArray(ve)||2!==ve.length)throw new Error("gl-surface: invalid ticks");for(me=0;me<2;++me){var Pe=ve[me];if((Array.isArray(Pe)||Pe.length)&&(Pe=x(Pe)),Pe.shape[0]!==ce[me])throw new Error("gl-surface: invalid tick length");var xe=x(Pe.data,ce);xe.stride[me]=Pe.stride[0],xe.stride[1^me]=0,this.padField(this._field[me],xe)}}else{for(me=0;me<2;++me){var ke=[0,0];ke[me]=1,this._field[me]=x(this._field[me].data,[ce[0]+2,ce[1]+2],ke,0)}this._field[0].set(0,0,0);for(var Ae=0;Ae<ce[0];++Ae)this._field[0].set(Ae+1,0,Ae);for(this._field[0].set(ce[0]+1,0,ce[0]-1),this._field[1].set(0,0,0),Ae=0;Ae<ce[1];++Ae)this._field[1].set(0,Ae+1,Ae);this._field[1].set(0,ce[1]+1,ce[1]-1)}var Te=this._field,Q=x(a.mallocFloat(3*Te[2].size*2),[3,ce[0]+2,ce[1]+2,2]);for(me=0;me<3;++me)m(Q.pick(me),Te[me],"mirror");var se=x(a.mallocFloat(3*Te[2].size),[ce[0]+2,ce[1]+2,3]);for(me=0;me<ce[0]+2;++me)for(Ae=0;Ae<ce[1]+2;++Ae){var fe=Q.get(0,me,Ae,0),ye=Q.get(0,me,Ae,1),Me=Q.get(1,me,Ae,0),Ie=Q.get(1,me,Ae,1),Ce=Q.get(2,me,Ae,0),Re=Q.get(2,me,Ae,1),le=Me*Re-Ie*Ce,ge=Ce*ye-Re*fe,_e=fe*Ie-ye*Me,Fe=Math.sqrt(le*le+ge*ge+_e*_e);Fe<1e-8?(Fe=Math.max(Math.abs(le),Math.abs(ge),Math.abs(_e)))<1e-8?(_e=1,ge=le=0,Fe=1):Fe=1/Fe:Fe=1/Math.sqrt(Fe),se.set(me,Ae,0,le*Fe),se.set(me,Ae,1,ge*Fe),se.set(me,Ae,2,_e*Fe)}a.free(Q.data);var Ve=[1/0,1/0,1/0],He=[-1/0,-1/0,-1/0],nt=1/0,tt=-1/0,dt=a.mallocFloat(o.nextPow2((ce[0]-1)*(ce[1]-1)*6*10)),kt=0,mt=0;for(me=0;me<ce[0]-1;++me)e:for(Ae=0;Ae<ce[1]-1;++Ae){for(var wt=0;wt<2;++wt)for(var Lt=0;Lt<2;++Lt)for(var Ct=0;Ct<3;++Ct){var It=this._field[Ct].get(1+me+wt,1+Ae+Lt);if(isNaN(It)||!isFinite(It))continue e}for(Ct=0;Ct<6;++Ct){var Ut=me+C[Ct][0],Rt=Ae+C[Ct][1],Ge=this._field[0].get(Ut+1,Rt+1),We=this._field[1].get(Ut+1,Rt+1);It=this._field[2].get(Ut+1,Rt+1),le=se.get(Ut+1,Rt+1,0),ge=se.get(Ut+1,Rt+1,1),_e=se.get(Ut+1,Rt+1,2),re.intensity&&(Be=re.intensity.get(Ut,Rt));var Be=re.intensity?re.intensity.get(Ut,Rt):It+this.objectOffset[2];dt[kt++]=Ut,dt[kt++]=Rt,dt[kt++]=Ge,dt[kt++]=We,dt[kt++]=It,dt[kt++]=0,dt[kt++]=Be,dt[kt++]=le,dt[kt++]=ge,dt[kt++]=_e,Ve[0]=Math.min(Ve[0],Ge+this.objectOffset[0]),Ve[1]=Math.min(Ve[1],We+this.objectOffset[1]),Ve[2]=Math.min(Ve[2],It+this.objectOffset[2]),nt=Math.min(nt,Be),He[0]=Math.max(He[0],Ge+this.objectOffset[0]),He[1]=Math.max(He[1],We+this.objectOffset[1]),He[2]=Math.max(He[2],It+this.objectOffset[2]),tt=Math.max(tt,Be),mt+=1}}for(re.intensityBounds&&(nt=+re.intensityBounds[0],tt=+re.intensityBounds[1]),me=6;me<kt;me+=10)dt[me]=(dt[me]-nt)/(tt-nt);this._vertexCount=mt,this._coordinateBuffer.update(dt.subarray(0,kt)),a.freeFloat(dt),a.free(se.data),this.bounds=[Ve,He],this.intensity=re.intensity||this._field[2],this.intensityBounds[0]===nt&&this.intensityBounds[1]===tt||(ie=!0),this.intensityBounds=[nt,tt]}if("levels"in re){var Ye=re.levels;for(Ye=Array.isArray(Ye[0])?Ye.slice():[[],[],Ye],me=0;me<3;++me)Ye[me]=Ye[me].slice(),Ye[me].sort(function(vn,cn){return vn-cn});for(me=0;me<3;++me)for(Ae=0;Ae<Ye[me].length;++Ae)Ye[me][Ae]-=this.objectOffset[me];e:for(me=0;me<3;++me){if(Ye[me].length!==this.contourLevels[me].length){ie=!0;break}for(Ae=0;Ae<Ye[me].length;++Ae)if(Ye[me][Ae]!==this.contourLevels[me][Ae]){ie=!0;break e}}this.contourLevels=Ye}if(ie){Te=this._field,ce=this.shape;for(var rt=[],Se=0;Se<3;++Se){var ze=this.contourLevels[Se],Ke=[],st=[],ct=[0,0,0];for(me=0;me<ze.length;++me){var Tt=v(this._field[Se],ze[me]);Ke.push(rt.length/5|0),mt=0;e:for(Ae=0;Ae<Tt.cells.length;++Ae){var Et=Tt.cells[Ae];for(Ct=0;Ct<2;++Ct){var At=Tt.positions[Et[Ct]],ht=At[0],pt=0|Math.floor(ht),gt=ht-pt,Pt=At[1],Ot=0|Math.floor(Pt),Ht=Pt-Ot,jt=!1;t:for(var Nt=0;Nt<3;++Nt){ct[Nt]=0;var Gt=(Se+Nt+1)%3;for(wt=0;wt<2;++wt){var un=wt?gt:1-gt;for(Ut=0|Math.min(Math.max(pt+wt,0),ce[0]),Lt=0;Lt<2;++Lt){var pn=Lt?Ht:1-Ht;if(Rt=0|Math.min(Math.max(Ot+Lt,0),ce[1]),It=Nt<2?this._field[Gt].get(Ut,Rt):(this.intensity.get(Ut,Rt)-this.intensityBounds[0])/(this.intensityBounds[1]-this.intensityBounds[0]),!isFinite(It)||isNaN(It)){jt=!0;break t}ct[Nt]+=un*pn*It}}}if(jt){if(Ct>0){for(var wn=0;wn<5;++wn)rt.pop();mt-=1}continue e}rt.push(ct[0],ct[1],At[0],At[1],ct[2]),mt+=1}}st.push(mt)}this._contourOffsets[Se]=Ke,this._contourCounts[Se]=st}var Bn=a.mallocFloat(rt.length);for(me=0;me<rt.length;++me)Bn[me]=rt[me];this._contourBuffer.update(Bn),a.freeFloat(Bn)}},z.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 re=0;re<3;++re)a.freeFloat(this._field[re].data)},z.highlight=function(re){var ee,ie;if(!re)return this._dynamicCounts=[0,0,0],this.dyanamicLevel=[NaN,NaN,NaN],void(this.highlightLevel=[-1,-1,-1]);for(ee=0;ee<3;++ee)this.highlightLevel[ee]=this.enableHighlight[ee]?re.level[ee]:-1;for(ie=this.snapToData?re.dataCoordinate:re.position,ee=0;ee<3;++ee)ie[ee]-=this.objectOffset[ee];if(this.enableDynamic[0]&&ie[0]!==this.dynamicLevel[0]||this.enableDynamic[1]&&ie[1]!==this.dynamicLevel[1]||this.enableDynamic[2]&&ie[2]!==this.dynamicLevel[2]){for(var oe=0,ce=this.shape,me=a.mallocFloat(12*ce[0]*ce[1]),de=0;de<3;++de)if(this.enableDynamic[de]){this.dynamicLevel[de]=ie[de];var xe=this._field[(de+1)%3],ke=this._field[(de+2)%3],Ae=v(this._field[de],ie[de]),Te=Ae.cells,Q=Ae.positions;for(this._dynamicOffsets[de]=oe,ee=0;ee<Te.length;++ee)for(var se=Te[ee],fe=0;fe<2;++fe){var ye=Q[se[fe]],Me=+ye[0],Ie=0|Me,Ce=0|Math.min(Ie+1,ce[0]),Re=Me-Ie,le=1-Re,ge=+ye[1],_e=0|ge,Fe=0|Math.min(_e+1,ce[1]),Ve=ge-_e,He=1-Ve,nt=le*He,tt=le*Ve,ot=Re*He,dt=Re*Ve,kt=nt*xe.get(Ie,_e)+tt*xe.get(Ie,Fe)+ot*xe.get(Ce,_e)+dt*xe.get(Ce,Fe),mt=nt*ke.get(Ie,_e)+tt*ke.get(Ie,Fe)+ot*ke.get(Ce,_e)+dt*ke.get(Ce,Fe);if(isNaN(kt)||isNaN(mt)){fe&&(oe-=1);break}me[2*oe+0]=kt,me[2*oe+1]=mt,oe+=1}this._dynamicCounts[de]=oe-this._dynamicOffsets[de]}else this.dynamicLevel[de]=NaN,this._dynamicCounts[de]=0;this._dynamicBuffer.update(me.subarray(0,2*oe)),a.freeFloat(me)}}},8931:function(d,s,t){"use strict";var o=t(5050),r=t(7498),n=t(5306);d.exports=function(_){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(i||function p(_){i=[_.LINEAR,_.NEAREST_MIPMAP_LINEAR,_.LINEAR_MIPMAP_NEAREST,_.LINEAR_MIPMAP_NEAREST],a=[_.NEAREST,_.LINEAR,_.NEAREST_MIPMAP_NEAREST,_.NEAREST_MIPMAP_LINEAR,_.LINEAR_MIPMAP_NEAREST,_.LINEAR_MIPMAP_LINEAR],c=[_.REPEAT,_.CLAMP_TO_EDGE,_.MIRRORED_REPEAT]}(_),"number"==typeof arguments[1])return w(_,arguments[1],arguments[2],arguments[3]||_.RGBA,arguments[4]||_.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return w(_,0|arguments[1][0],0|arguments[1][1],arguments[2]||_.RGBA,arguments[3]||_.UNSIGNED_BYTE);if("object"==typeof arguments[1]){var E=arguments[1],L=f(E)?E:E.raw;if(L)return function u(_,E,L,C,P,I){var U=m(_);return _.texImage2D(_.TEXTURE_2D,0,P,P,I,E),new g(_,U,L,C,P,I)}(_,L,0|E.width,0|E.height,arguments[2]||_.RGBA,arguments[3]||_.UNSIGNED_BYTE);if(E.shape&&E.data&&E.stride)return function S(_,E){var L=E.dtype,C=E.shape.slice(),P=_.getParameter(_.MAX_TEXTURE_SIZE);if(C[0]<0||C[0]>P||C[1]<0||C[1]>P)throw new Error("gl-texture2d: Invalid texture size");var I=h(C,E.stride.slice()),U=0;"float32"===L?U=_.FLOAT:"float64"===L?(U=_.FLOAT,I=!1,L="float32"):"uint8"===L?U=_.UNSIGNED_BYTE:(U=_.UNSIGNED_BYTE,I=!1,L="uint8");var z,H,F=0;if(2===C.length)F=_.LUMINANCE,E=o(E.data,C=[C[0],C[1],1],[E.stride[0],E.stride[1],1],E.offset);else{if(3!==C.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===C[2])F=_.ALPHA;else if(2===C[2])F=_.LUMINANCE_ALPHA;else if(3===C[2])F=_.RGB;else{if(4!==C[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");F=_.RGBA}}U!==_.FLOAT||_.getExtension("OES_texture_float")||(U=_.UNSIGNED_BYTE,I=!1);var N=E.size;if(I)z=0===E.offset&&E.data.length===N?E.data:E.data.subarray(E.offset,E.offset+N);else{var B=[C[2],C[2]*C[0],1];H=n.malloc(N,L);var j=o(H,C,B,0);"float32"!==L&&"float64"!==L||U!==_.UNSIGNED_BYTE?r.assign(j,E):x(j,E),z=H.subarray(0,N)}var J=m(_);return _.texImage2D(_.TEXTURE_2D,0,F,C[0],C[1],0,F,U,z),I||n.free(H),new g(_,J,C[0],C[1],F,U)}(_,E)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")};var i=null,a=null,c=null;function f(_){return typeof HTMLCanvasElement<"u"&&_ instanceof HTMLCanvasElement||typeof HTMLImageElement<"u"&&_ instanceof HTMLImageElement||typeof HTMLVideoElement<"u"&&_ instanceof HTMLVideoElement||typeof ImageData<"u"&&_ instanceof ImageData}var x=function(_,E){r.muls(_,E,255)};function v(_,E,L){var C=_.gl,P=C.getParameter(C.MAX_TEXTURE_SIZE);if(E<0||E>P||L<0||L>P)throw new Error("gl-texture2d: Invalid texture size");return _._shape=[E,L],_.bind(),C.texImage2D(C.TEXTURE_2D,0,_.format,E,L,0,_.format,_.type,null),_._mipLevels=[0],_}function g(_,E,L,C,P,I){this.gl=_,this.handle=E,this.format=P,this.type=I,this._shape=[L,C],this._mipLevels=[0],this._magFilter=_.NEAREST,this._minFilter=_.NEAREST,this._wrapS=_.CLAMP_TO_EDGE,this._wrapT=_.CLAMP_TO_EDGE,this._anisoSamples=1;var U=this,z=[this._wrapS,this._wrapT];Object.defineProperties(z,[{get:function(){return U._wrapS},set:function(F){return U.wrapS=F}},{get:function(){return U._wrapT},set:function(F){return U.wrapT=F}}]),this._wrapVector=z;var H=[this._shape[0],this._shape[1]];Object.defineProperties(H,[{get:function(){return U._shape[0]},set:function(F){return U.width=F}},{get:function(){return U._shape[1]},set:function(F){return U.height=F}}]),this._shapeVector=H}var y=g.prototype;function h(_,E){return 3===_.length?1===E[2]&&E[1]===_[0]*_[2]&&E[0]===_[2]:1===E[0]&&E[1]===_[0]}function m(_){var E=_.createTexture();return _.bindTexture(_.TEXTURE_2D,E),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_MIN_FILTER,_.NEAREST),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_MAG_FILTER,_.NEAREST),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_WRAP_S,_.CLAMP_TO_EDGE),_.texParameteri(_.TEXTURE_2D,_.TEXTURE_WRAP_T,_.CLAMP_TO_EDGE),E}function w(_,E,L,C,P){var I=_.getParameter(_.MAX_TEXTURE_SIZE);if(E<0||E>I||L<0||L>I)throw new Error("gl-texture2d: Invalid texture shape");if(P===_.FLOAT&&!_.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var U=m(_);return _.texImage2D(_.TEXTURE_2D,0,C,E,L,0,C,P,null),new g(_,U,E,L,C,P)}Object.defineProperties(y,{minFilter:{get:function(){return this._minFilter},set:function(_){this.bind();var E=this.gl;if(this.type===E.FLOAT&&i.indexOf(_)>=0&&(E.getExtension("OES_texture_float_linear")||(_=E.NEAREST)),a.indexOf(_)<0)throw new Error("gl-texture2d: Unknown filter mode "+_);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,_),this._minFilter=_}},magFilter:{get:function(){return this._magFilter},set:function(_){this.bind();var E=this.gl;if(this.type===E.FLOAT&&i.indexOf(_)>=0&&(E.getExtension("OES_texture_float_linear")||(_=E.NEAREST)),a.indexOf(_)<0)throw new Error("gl-texture2d: Unknown filter mode "+_);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,_),this._magFilter=_}},mipSamples:{get:function(){return this._anisoSamples},set:function(_){var E=this._anisoSamples;if(this._anisoSamples=0|Math.max(_,1),E!==this._anisoSamples){var L=this.gl.getExtension("EXT_texture_filter_anisotropic");L&&this.gl.texParameterf(this.gl.TEXTURE_2D,L.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(_){if(this.bind(),c.indexOf(_)<0)throw new Error("gl-texture2d: Unknown wrap mode "+_);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,_),this._wrapS=_}},wrapT:{get:function(){return this._wrapT},set:function(_){if(this.bind(),c.indexOf(_)<0)throw new Error("gl-texture2d: Unknown wrap mode "+_);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,_),this._wrapT=_}},wrap:{get:function(){return this._wrapVector},set:function(_){if(Array.isArray(_)||(_=[_,_]),2!==_.length)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var E=0;E<2;++E)if(c.indexOf(_[E])<0)throw new Error("gl-texture2d: Unknown wrap mode "+_);this._wrapS=_[0],this._wrapT=_[1];var L=this.gl;return this.bind(),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_S,this._wrapS),L.texParameteri(L.TEXTURE_2D,L.TEXTURE_WRAP_T,this._wrapT),_}},shape:{get:function(){return this._shapeVector},set:function(_){if(Array.isArray(_)){if(2!==_.length)throw new Error("gl-texture2d: Invalid texture shape")}else _=[0|_,0|_];return v(this,0|_[0],0|_[1]),[0|_[0],0|_[1]]}},width:{get:function(){return this._shape[0]},set:function(_){return v(this,_|=0,this._shape[1]),_}},height:{get:function(){return this._shape[1]},set:function(_){return v(this,this._shape[0],_|=0),_}}}),y.bind=function(_){var E=this.gl;return void 0!==_&&E.activeTexture(E.TEXTURE0+(0|_)),E.bindTexture(E.TEXTURE_2D,this.handle),void 0!==_?0|_:E.getParameter(E.ACTIVE_TEXTURE)-E.TEXTURE0},y.dispose=function(){this.gl.deleteTexture(this.handle)},y.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var _=Math.min(this._shape[0],this._shape[1]),E=0;_>0;++E,_>>>=1)this._mipLevels.indexOf(E)<0&&this._mipLevels.push(E)},y.setPixels=function(_,E,L,C){var P=this.gl;this.bind(),Array.isArray(E)?(C=L,L=0|E[1],E=0|E[0]):(E=E||0,L=L||0),C=C||0;var I=f(_)?_:_.raw;if(I)this._mipLevels.indexOf(C)<0?(P.texImage2D(P.TEXTURE_2D,0,this.format,this.format,this.type,I),this._mipLevels.push(C)):P.texSubImage2D(P.TEXTURE_2D,C,E,L,this.format,this.type,I);else{if(!(_.shape&&_.stride&&_.data))throw new Error("gl-texture2d: Unsupported data type");if(_.shape.length<2||E+_.shape[1]>this._shape[1]>>>C||L+_.shape[0]>this._shape[0]>>>C||E<0||L<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");!function(U,z,H,F,N,B,j,J){var G=J.dtype,V=J.shape.slice();if(V.length<2||V.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var W=0,X=0,K=h(V,J.stride.slice());if("float32"===G?W=U.FLOAT:"float64"===G?(W=U.FLOAT,K=!1,G="float32"):"uint8"===G?W=U.UNSIGNED_BYTE:(W=U.UNSIGNED_BYTE,K=!1,G="uint8"),2===V.length)X=U.LUMINANCE,J=o(J.data,V=[V[0],V[1],1],[J.stride[0],J.stride[1],1],J.offset);else{if(3!==V.length)throw new Error("gl-texture2d: Invalid shape for texture");if(1===V[2])X=U.ALPHA;else if(2===V[2])X=U.LUMINANCE_ALPHA;else if(3===V[2])X=U.RGB;else{if(4!==V[2])throw new Error("gl-texture2d: Invalid shape for pixel coords");X=U.RGBA}}if(X!==U.LUMINANCE&&X!==U.ALPHA||N!==U.LUMINANCE&&N!==U.ALPHA||(X=N),X!==N)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var re=J.size,ee=j.indexOf(F)<0;if(ee&&j.push(F),W===B&&K)0===J.offset&&J.data.length===re?ee?U.texImage2D(U.TEXTURE_2D,F,N,V[0],V[1],0,N,B,J.data):U.texSubImage2D(U.TEXTURE_2D,F,z,H,V[0],V[1],N,B,J.data):ee?U.texImage2D(U.TEXTURE_2D,F,N,V[0],V[1],0,N,B,J.data.subarray(J.offset,J.offset+re)):U.texSubImage2D(U.TEXTURE_2D,F,z,H,V[0],V[1],N,B,J.data.subarray(J.offset,J.offset+re));else{var ie;ie=B===U.FLOAT?n.mallocFloat32(re):n.mallocUint8(re);var oe=o(ie,V,[V[2],V[2]*V[0],1]);W===U.FLOAT&&B===U.UNSIGNED_BYTE?x(oe,J):r.assign(oe,J),ee?U.texImage2D(U.TEXTURE_2D,F,N,V[0],V[1],0,N,B,ie.subarray(0,re)):U.texSubImage2D(U.TEXTURE_2D,F,z,H,V[0],V[1],N,B,ie.subarray(0,re)),B===U.FLOAT?n.freeFloat32(ie):n.freeUint8(ie)}}(P,E,L,C,this.format,this.type,this._mipLevels,_)}}},3056:function(d){"use strict";d.exports=function(s,t,o){t?t.bind():s.bindBuffer(s.ELEMENT_ARRAY_BUFFER,null);var r=0|s.getParameter(s.MAX_VERTEX_ATTRIBS);if(o){if(o.length>r)throw new Error("gl-vao: Too many vertex attributes");for(var n=0;n<o.length;++n){var i=o[n];if(i.buffer){var c=i.size||4,p=i.type||s.FLOAT,f=!!i.normalized,x=i.stride||0,v=i.offset||0;i.buffer.bind(),s.enableVertexAttribArray(n),s.vertexAttribPointer(n,c,p,f,x,v)}else{if("number"==typeof i)s.vertexAttrib1f(n,i);else if(1===i.length)s.vertexAttrib1f(n,i[0]);else if(2===i.length)s.vertexAttrib2f(n,i[0],i[1]);else if(3===i.length)s.vertexAttrib3f(n,i[0],i[1],i[2]);else{if(4!==i.length)throw new Error("gl-vao: Invalid vertex attribute");s.vertexAttrib4f(n,i[0],i[1],i[2],i[3])}s.disableVertexAttribArray(n)}}for(;n<r;++n)s.disableVertexAttribArray(n)}else for(s.bindBuffer(s.ARRAY_BUFFER,null),n=0;n<r;++n)s.disableVertexAttribArray(n)}},7220:function(d,s,t){"use strict";var o=t(3056);function r(n){this.gl=n,this._elements=null,this._attributes=null,this._elementsType=n.UNSIGNED_SHORT}r.prototype.bind=function(){o(this.gl,this._elements,this._attributes)},r.prototype.update=function(n,i,a){this._elements=i,this._attributes=n,this._elementsType=a||this.gl.UNSIGNED_SHORT},r.prototype.dispose=function(){},r.prototype.unbind=function(){},r.prototype.draw=function(n,i,a){a=a||0;var c=this.gl;this._elements?c.drawElements(n,i,this._elementsType,a):c.drawArrays(n,a,i)},d.exports=function(n){return new r(n)}},3778:function(d,s,t){"use strict";var o=t(3056);function r(i,a,c,p,f,x){this.location=i,this.dimension=a,this.a=c,this.b=p,this.c=f,this.d=x}function n(i,a,c){this.gl=i,this._ext=a,this.handle=c,this._attribs=[],this._useElements=!1,this._elementsType=i.UNSIGNED_SHORT}r.prototype.bind=function(i){switch(this.dimension){case 1:i.vertexAttrib1f(this.location,this.a);break;case 2:i.vertexAttrib2f(this.location,this.a,this.b);break;case 3:i.vertexAttrib3f(this.location,this.a,this.b,this.c);break;case 4:i.vertexAttrib4f(this.location,this.a,this.b,this.c,this.d)}},n.prototype.bind=function(){this._ext.bindVertexArrayOES(this.handle);for(var i=0;i<this._attribs.length;++i)this._attribs[i].bind(this.gl)},n.prototype.unbind=function(){this._ext.bindVertexArrayOES(null)},n.prototype.dispose=function(){this._ext.deleteVertexArrayOES(this.handle)},n.prototype.update=function(i,a,c){if(this.bind(),o(this.gl,a,i),this.unbind(),this._attribs.length=0,i)for(var p=0;p<i.length;++p){var f=i[p];"number"==typeof f?this._attribs.push(new r(p,1,f)):Array.isArray(f)&&this._attribs.push(new r(p,f.length,f[0],f[1],f[2],f[3]))}this._useElements=!!a,this._elementsType=c||this.gl.UNSIGNED_SHORT},n.prototype.draw=function(i,a,c){c=c||0;var p=this.gl;this._useElements?p.drawElements(i,a,this._elementsType,c):p.drawArrays(i,c,a)},d.exports=function(i,a){return new n(i,a,a.createVertexArrayOES())}},2944:function(d,s,t){"use strict";var o=t(3778),r=t(7220);function n(i){this.bindVertexArrayOES=i.bindVertexArray.bind(i),this.createVertexArrayOES=i.createVertexArray.bind(i),this.deleteVertexArrayOES=i.deleteVertexArray.bind(i)}d.exports=function(i,a,c,p){var f,x=i.createVertexArray?new n(i):i.getExtension("OES_vertex_array_object");return(f=x?o(i,x):r(i)).update(a,c,p),f}},2598:function(d){d.exports=function(s,t,o){return s[0]=t[0]+o[0],s[1]=t[1]+o[1],s[2]=t[2]+o[2],s}},5879:function(d,s,t){d.exports=function(i,a){var c=o(i[0],i[1],i[2]),p=o(a[0],a[1],a[2]);r(c,c),r(p,p);var f=n(c,p);return f>1?0:Math.acos(f)};var o=t(5415),r=t(899),n=t(9305)},8827:function(d){d.exports=function(s,t){return s[0]=Math.ceil(t[0]),s[1]=Math.ceil(t[1]),s[2]=Math.ceil(t[2]),s}},7622:function(d){d.exports=function(s){var t=new Float32Array(3);return t[0]=s[0],t[1]=s[1],t[2]=s[2],t}},8782:function(d){d.exports=function(s,t){return s[0]=t[0],s[1]=t[1],s[2]=t[2],s}},8501:function(d){d.exports=function(){var s=new Float32Array(3);return s[0]=0,s[1]=0,s[2]=0,s}},903:function(d){d.exports=function(s,t,o){var r=t[0],n=t[1],i=t[2],a=o[0],c=o[1],p=o[2];return s[0]=n*p-i*c,s[1]=i*a-r*p,s[2]=r*c-n*a,s}},5981:function(d,s,t){d.exports=t(8288)},8288:function(d){d.exports=function(s,t){var o=t[0]-s[0],r=t[1]-s[1],n=t[2]-s[2];return Math.sqrt(o*o+r*r+n*n)}},8629:function(d,s,t){d.exports=t(7979)},7979:function(d){d.exports=function(s,t,o){return s[0]=t[0]/o[0],s[1]=t[1]/o[1],s[2]=t[2]/o[2],s}},9305:function(d){d.exports=function(s,t){return s[0]*t[0]+s[1]*t[1]+s[2]*t[2]}},154:function(d){d.exports=1e-6},4932:function(d,s,t){d.exports=function(r,n){var i=r[0],a=r[1],c=r[2],p=n[0],f=n[1],x=n[2];return Math.abs(i-p)<=o*Math.max(1,Math.abs(i),Math.abs(p))&&Math.abs(a-f)<=o*Math.max(1,Math.abs(a),Math.abs(f))&&Math.abs(c-x)<=o*Math.max(1,Math.abs(c),Math.abs(x))};var o=t(154)},5777:function(d){d.exports=function(s,t){return s[0]===t[0]&&s[1]===t[1]&&s[2]===t[2]}},3306:function(d){d.exports=function(s,t){return s[0]=Math.floor(t[0]),s[1]=Math.floor(t[1]),s[2]=Math.floor(t[2]),s}},7447:function(d,s,t){d.exports=function(r,n,i,a,c,p){var f,x;for(n||(n=3),i||(i=0),x=a?Math.min(a*n+i,r.length):r.length,f=i;f<x;f+=n)o[0]=r[f],o[1]=r[f+1],o[2]=r[f+2],c(o,o,p),r[f]=o[0],r[f+1]=o[1],r[f+2]=o[2];return r};var o=t(8501)()},5415:function(d){d.exports=function(s,t,o){var r=new Float32Array(3);return r[0]=s,r[1]=t,r[2]=o,r}},2858:function(d,s,t){d.exports={EPSILON:t(154),create:t(8501),clone:t(7622),angle:t(5879),fromValues:t(5415),copy:t(8782),set:t(831),equals:t(4932),exactEquals:t(5777),add:t(2598),subtract:t(911),sub:t(8921),multiply:t(105),mul:t(5733),divide:t(7979),div:t(8629),min:t(3605),max:t(1716),floor:t(3306),ceil:t(8827),round:t(1624),scale:t(5685),scaleAndAdd:t(6722),distance:t(8288),dist:t(5981),squaredDistance:t(6403),sqrDist:t(5294),length:t(4693),len:t(1468),squaredLength:t(4337),sqrLen:t(3303),negate:t(435),inverse:t(2073),normalize:t(899),dot:t(9305),cross:t(903),lerp:t(1868),random:t(6660),transformMat4:t(3255),transformMat3:t(9908),transformQuat:t(6568),rotateX:t(392),rotateY:t(3222),rotateZ:t(3388),forEach:t(7447)}},2073:function(d){d.exports=function(s,t){return s[0]=1/t[0],s[1]=1/t[1],s[2]=1/t[2],s}},1468:function(d,s,t){d.exports=t(4693)},4693:function(d){d.exports=function(s){var t=s[0],o=s[1],r=s[2];return Math.sqrt(t*t+o*o+r*r)}},1868:function(d){d.exports=function(s,t,o,r){var n=t[0],i=t[1],a=t[2];return s[0]=n+r*(o[0]-n),s[1]=i+r*(o[1]-i),s[2]=a+r*(o[2]-a),s}},1716:function(d){d.exports=function(s,t,o){return s[0]=Math.max(t[0],o[0]),s[1]=Math.max(t[1],o[1]),s[2]=Math.max(t[2],o[2]),s}},3605:function(d){d.exports=function(s,t,o){return s[0]=Math.min(t[0],o[0]),s[1]=Math.min(t[1],o[1]),s[2]=Math.min(t[2],o[2]),s}},5733:function(d,s,t){d.exports=t(105)},105:function(d){d.exports=function(s,t,o){return s[0]=t[0]*o[0],s[1]=t[1]*o[1],s[2]=t[2]*o[2],s}},435:function(d){d.exports=function(s,t){return s[0]=-t[0],s[1]=-t[1],s[2]=-t[2],s}},899:function(d){d.exports=function(s,t){var o=t[0],r=t[1],n=t[2],i=o*o+r*r+n*n;return i>0&&(i=1/Math.sqrt(i),s[0]=t[0]*i,s[1]=t[1]*i,s[2]=t[2]*i),s}},6660:function(d){d.exports=function(s,t){t=t||1;var o=2*Math.random()*Math.PI,r=2*Math.random()-1,n=Math.sqrt(1-r*r)*t;return s[0]=Math.cos(o)*n,s[1]=Math.sin(o)*n,s[2]=r*t,s}},392:function(d){d.exports=function(s,t,o,r){var n=o[1],i=o[2],a=t[1]-n,c=t[2]-i,p=Math.sin(r),f=Math.cos(r);return s[0]=t[0],s[1]=n+a*f-c*p,s[2]=i+a*p+c*f,s}},3222:function(d){d.exports=function(s,t,o,r){var n=o[0],i=o[2],a=t[0]-n,c=t[2]-i,p=Math.sin(r),f=Math.cos(r);return s[0]=n+c*p+a*f,s[1]=t[1],s[2]=i+c*f-a*p,s}},3388:function(d){d.exports=function(s,t,o,r){var n=o[0],i=o[1],a=t[0]-n,c=t[1]-i,p=Math.sin(r),f=Math.cos(r);return s[0]=n+a*f-c*p,s[1]=i+a*p+c*f,s[2]=t[2],s}},1624:function(d){d.exports=function(s,t){return s[0]=Math.round(t[0]),s[1]=Math.round(t[1]),s[2]=Math.round(t[2]),s}},5685:function(d){d.exports=function(s,t,o){return s[0]=t[0]*o,s[1]=t[1]*o,s[2]=t[2]*o,s}},6722:function(d){d.exports=function(s,t,o,r){return s[0]=t[0]+o[0]*r,s[1]=t[1]+o[1]*r,s[2]=t[2]+o[2]*r,s}},831:function(d){d.exports=function(s,t,o,r){return s[0]=t,s[1]=o,s[2]=r,s}},5294:function(d,s,t){d.exports=t(6403)},3303:function(d,s,t){d.exports=t(4337)},6403:function(d){d.exports=function(s,t){var o=t[0]-s[0],r=t[1]-s[1],n=t[2]-s[2];return o*o+r*r+n*n}},4337:function(d){d.exports=function(s){var t=s[0],o=s[1],r=s[2];return t*t+o*o+r*r}},8921:function(d,s,t){d.exports=t(911)},911:function(d){d.exports=function(s,t,o){return s[0]=t[0]-o[0],s[1]=t[1]-o[1],s[2]=t[2]-o[2],s}},9908:function(d){d.exports=function(s,t,o){var r=t[0],n=t[1],i=t[2];return s[0]=r*o[0]+n*o[3]+i*o[6],s[1]=r*o[1]+n*o[4]+i*o[7],s[2]=r*o[2]+n*o[5]+i*o[8],s}},3255:function(d){d.exports=function(s,t,o){var r=t[0],n=t[1],i=t[2],a=o[3]*r+o[7]*n+o[11]*i+o[15];return s[0]=(o[0]*r+o[4]*n+o[8]*i+o[12])/(a=a||1),s[1]=(o[1]*r+o[5]*n+o[9]*i+o[13])/a,s[2]=(o[2]*r+o[6]*n+o[10]*i+o[14])/a,s}},6568:function(d){d.exports=function(s,t,o){var r=t[0],n=t[1],i=t[2],a=o[0],c=o[1],p=o[2],f=o[3],x=f*r+c*i-p*n,v=f*n+p*r-a*i,g=f*i+a*n-c*r,y=-a*r-c*n-p*i;return s[0]=x*f+y*-a+v*-p-g*-c,s[1]=v*f+y*-c+g*-a-x*-p,s[2]=g*f+y*-p+x*-c-v*-a,s}},3433:function(d){d.exports=function(s,t,o){return s[0]=t[0]+o[0],s[1]=t[1]+o[1],s[2]=t[2]+o[2],s[3]=t[3]+o[3],s}},1413:function(d){d.exports=function(s){var t=new Float32Array(4);return t[0]=s[0],t[1]=s[1],t[2]=s[2],t[3]=s[3],t}},3470:function(d){d.exports=function(s,t){return s[0]=t[0],s[1]=t[1],s[2]=t[2],s[3]=t[3],s}},5313:function(d){d.exports=function(){var s=new Float32Array(4);return s[0]=0,s[1]=0,s[2]=0,s[3]=0,s}},5446:function(d){d.exports=function(s,t){var o=t[0]-s[0],r=t[1]-s[1],n=t[2]-s[2],i=t[3]-s[3];return Math.sqrt(o*o+r*r+n*n+i*i)}},205:function(d){d.exports=function(s,t,o){return s[0]=t[0]/o[0],s[1]=t[1]/o[1],s[2]=t[2]/o[2],s[3]=t[3]/o[3],s}},4242:function(d){d.exports=function(s,t){return s[0]*t[0]+s[1]*t[1]+s[2]*t[2]+s[3]*t[3]}},5680:function(d){d.exports=function(s,t,o,r){var n=new Float32Array(4);return n[0]=s,n[1]=t,n[2]=o,n[3]=r,n}},4020:function(d,s,t){d.exports={create:t(5313),clone:t(1413),fromValues:t(5680),copy:t(3470),set:t(6453),add:t(3433),subtract:t(2705),multiply:t(746),divide:t(205),min:t(2170),max:t(3030),scale:t(5510),scaleAndAdd:t(4224),distance:t(5446),squaredDistance:t(1542),length:t(8177),squaredLength:t(9037),negate:t(6459),inverse:t(8057),normalize:t(381),dot:t(4242),lerp:t(8746),random:t(3770),transformMat4:t(6342),transformQuat:t(5022)}},8057:function(d){d.exports=function(s,t){return s[0]=1/t[0],s[1]=1/t[1],s[2]=1/t[2],s[3]=1/t[3],s}},8177:function(d){d.exports=function(s){var t=s[0],o=s[1],r=s[2],n=s[3];return Math.sqrt(t*t+o*o+r*r+n*n)}},8746:function(d){d.exports=function(s,t,o,r){var n=t[0],i=t[1],a=t[2],c=t[3];return s[0]=n+r*(o[0]-n),s[1]=i+r*(o[1]-i),s[2]=a+r*(o[2]-a),s[3]=c+r*(o[3]-c),s}},3030:function(d){d.exports=function(s,t,o){return s[0]=Math.max(t[0],o[0]),s[1]=Math.max(t[1],o[1]),s[2]=Math.max(t[2],o[2]),s[3]=Math.max(t[3],o[3]),s}},2170:function(d){d.exports=function(s,t,o){return s[0]=Math.min(t[0],o[0]),s[1]=Math.min(t[1],o[1]),s[2]=Math.min(t[2],o[2]),s[3]=Math.min(t[3],o[3]),s}},746:function(d){d.exports=function(s,t,o){return s[0]=t[0]*o[0],s[1]=t[1]*o[1],s[2]=t[2]*o[2],s[3]=t[3]*o[3],s}},6459:function(d){d.exports=function(s,t){return s[0]=-t[0],s[1]=-t[1],s[2]=-t[2],s[3]=-t[3],s}},381:function(d){d.exports=function(s,t){var o=t[0],r=t[1],n=t[2],i=t[3],a=o*o+r*r+n*n+i*i;return a>0&&(a=1/Math.sqrt(a),s[0]=o*a,s[1]=r*a,s[2]=n*a,s[3]=i*a),s}},3770:function(d,s,t){var o=t(381),r=t(5510);d.exports=function(n,i){return i=i||1,n[0]=Math.random(),n[1]=Math.random(),n[2]=Math.random(),n[3]=Math.random(),o(n,n),r(n,n,i),n}},5510:function(d){d.exports=function(s,t,o){return s[0]=t[0]*o,s[1]=t[1]*o,s[2]=t[2]*o,s[3]=t[3]*o,s}},4224:function(d){d.exports=function(s,t,o,r){return s[0]=t[0]+o[0]*r,s[1]=t[1]+o[1]*r,s[2]=t[2]+o[2]*r,s[3]=t[3]+o[3]*r,s}},6453:function(d){d.exports=function(s,t,o,r,n){return s[0]=t,s[1]=o,s[2]=r,s[3]=n,s}},1542:function(d){d.exports=function(s,t){var o=t[0]-s[0],r=t[1]-s[1],n=t[2]-s[2],i=t[3]-s[3];return o*o+r*r+n*n+i*i}},9037:function(d){d.exports=function(s){var t=s[0],o=s[1],r=s[2],n=s[3];return t*t+o*o+r*r+n*n}},2705:function(d){d.exports=function(s,t,o){return s[0]=t[0]-o[0],s[1]=t[1]-o[1],s[2]=t[2]-o[2],s[3]=t[3]-o[3],s}},6342:function(d){d.exports=function(s,t,o){var r=t[0],n=t[1],i=t[2],a=t[3];return s[0]=o[0]*r+o[4]*n+o[8]*i+o[12]*a,s[1]=o[1]*r+o[5]*n+o[9]*i+o[13]*a,s[2]=o[2]*r+o[6]*n+o[10]*i+o[14]*a,s[3]=o[3]*r+o[7]*n+o[11]*i+o[15]*a,s}},5022:function(d){d.exports=function(s,t,o){var r=t[0],n=t[1],i=t[2],a=o[0],c=o[1],p=o[2],f=o[3],x=f*r+c*i-p*n,v=f*n+p*r-a*i,g=f*i+a*n-c*r,y=-a*r-c*n-p*i;return s[0]=x*f+y*-a+v*-p-g*-c,s[1]=v*f+y*-c+g*-a-x*-p,s[2]=g*f+y*-p+x*-c-v*-a,s[3]=t[3],s}},9365:function(d,s,t){var o=t(8096),r=t(7896);d.exports=function(n){for(var i=Array.isArray(n)?n:o(n),a=0;a<i.length;a++){var c=i[a];if("preprocessor"===c.type){var p=c.data.match(/\#define\s+SHADER_NAME(_B64)?\s+(.+)$/);if(p&&p[2]){var x=p[2];return(p[1]?r(x):x).trim()}}}}},3193:function(d,s,t){d.exports=function(x){var v,g,y,h=0,m=0,w=c,u=[],S=[],_=1,E=0,L=0,C=!1,P=!1,I="",U=n,z=o;"300 es"===(x=x||{}).version&&(U=a,z=i);var H={},F={};for(h=0;h<U.length;h++)H[U[h]]=!0;for(h=0;h<z.length;h++)F[z[h]]=!0;return function(ie){return S=[],null!==ie?function(oe){var ce;for(h=0,oe.toString&&(oe=oe.toString()),I+=oe.replace(/\r\n/g,"\n"),y=I.length;v=I[h],h<y;){switch(ce=h,w){case 0:h="/"===v&&"*"===g?(u.push(v),N(u.join("")),w=c,h+1):(u.push(v),g=v,h+1);break;case 1:case 2:h="\r"!==v&&"\n"!==v||"\\"===g?(u.push(v),g=v,h+1):(N(u.join("")),w=c,h);break;case 3:h=V();break;case 4:h="."===v||/[eE]/.test(v)?(u.push(v),w=5,g=v,h+1):"x"===v&&1===u.length&&"0"===u[0]?(w=11,u.push(v),g=v,h+1):/[^\d]/.test(v)?(N(u.join("")),w=c,h):(u.push(v),g=v,h+1);break;case 11:h=/[^a-fA-F0-9]/.test(v)?(N(u.join("")),w=c,h):(u.push(v),g=v,h+1);break;case 5:"f"===v&&(u.push(v),g=v,h+=1),h=/[eE]/.test(v)?(u.push(v),g=v,h+1):("-"!==v&&"+"!==v||!/[eE]/.test(g))&&/[^\d]/.test(v)?(N(u.join("")),w=c,h):(u.push(v),g=v,h+1);break;case p:h=ee();break;case 9:h=/[^\s]/g.test(v)?(N(u.join("")),w=c,h):(u.push(v),g=v,h+1);break;case c:u=u.length?[]:u,h="/"===g&&"*"===v?(L=m+h-1,w=0,g=v,h+1):"/"===g&&"/"===v?(L=m+h-1,w=1,g=v,h+1):"#"===v?(w=2,L=m+h,h):/\s/.test(v)?(w=9,L=m+h,h):(C=/\d/.test(v),P=/[^\w_]/.test(v),L=m+h,w=C?4:P?3:p,h)}ce!==h&&("\n"===I[ce]?(E=0,++_):++E)}return m+=h,I=I.slice(h),S}(ie):(u.length&&N(u.join("")),w=10,N("(eof)"),S)};function N(ie){ie.length&&S.push({type:f[w],data:ie,position:L,line:_,column:E})}function V(){if("."===g&&/\d/.test(v))return w=5,h;if("/"===g&&"*"===v)return w=0,h;if("/"===g&&"/"===v)return w=1,h;if("."===v&&u.length){for(;W(u););return w=5,h}if(";"===v||")"===v||"("===v){if(u.length)for(;W(u););return N(v),w=c,h+1}var ie=2===u.length&&"="!==v;if(/[\w_\d\s]/.test(v)||ie){for(;W(u););return w=c,h}return u.push(v),g=v,h+1}function W(ie){for(var oe,ce,me=0;;){if(oe=r.indexOf(ie.slice(0,ie.length+me).join("")),ce=r[oe],-1===oe){if(me--+ie.length>0)continue;ce=ie.slice(0,1).join("")}return N(ce),L+=ce.length,(u=u.slice(ce.length)).length}}function ee(){if(/[^\d\w_]/.test(v)){var ie=u.join("");return w=F[ie]?8:H[ie]?7:6,N(u.join("")),w=c,h}return u.push(v),g=v,h+1}};var o=t(399),r=t(9746),n=t(9525),i=t(9458),a=t(3585),c=999,p=9999,f=["block-comment","line-comment","preprocessor","operator","integer","float","ident","builtin","keyword","whitespace","eof","integer"]},3585:function(d,s,t){var o=t(9525);o=o.slice().filter(function(r){return!/^(gl\_|texture)/.test(r)}),d.exports=o.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"])},9525:function(d){d.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"]},9458:function(d,s,t){var o=t(399);d.exports=o.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"])},399:function(d){d.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"]},9746:function(d){d.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]},8096:function(d,s,t){var o=t(3193);d.exports=function(r,n){var i=o(n),a=[];return(a=a.concat(i(r))).concat(i(null))}},6832:function(d){d.exports=function(s){"string"==typeof s&&(s=[s]);for(var t=[].slice.call(arguments,1),o=[],r=0;r<s.length-1;r++)o.push(s[r],t[r]||"");return o.push(s[r]),o.join("")}},5233:function(d,s,t){"use strict";var o=t(4846);d.exports=o&&function(){var r=!1;try{var n=Object.defineProperty({},"passive",{get:function(){r=!0}});window.addEventListener("test",null,n),window.removeEventListener("test",null,n)}catch{r=!1}return r}()},2183:function(d,s,t){"use strict";d.exports=function(x,v){var g=x.length;if(0===g)throw new Error("Must have at least d+1 points");var y=x[0].length;if(g<=y)throw new Error("Must input at least d+1 points");var h=x.slice(0,y+1),m=o.apply(void 0,h);if(0===m)throw new Error("Input not in general position");for(var w=new Array(y+1),u=0;u<=y;++u)w[u]=u;m<0&&(w[0]=1,w[1]=0);var S=new n(w,new Array(y+1),!1),_=S.adjacent,E=new Array(y+2);for(u=0;u<=y;++u){for(var L=w.slice(),C=0;C<=y;++C)C===u&&(L[C]=-1);var P=L[0];L[0]=L[1],L[1]=P;var I=new n(L,new Array(y+1),!0);_[u]=I,E[u]=I}for(E[y+1]=S,u=0;u<=y;++u){L=_[u].vertices;var U=_[u].adjacent;for(C=0;C<=y;++C){var z=L[C];if(z<0)U[C]=S;else for(var H=0;H<=y;++H)_[H].vertices.indexOf(z)<0&&(U[C]=_[H])}}var F=new p(y,h,E),N=!!v;for(u=y+1;u<g;++u)F.insert(x[u],N);return F.boundary()};var o=t(417),r=t(8211).H;function n(x,v,g){this.vertices=x,this.adjacent=v,this.boundary=g,this.lastVisited=-1}function i(x,v,g){this.vertices=x,this.cell=v,this.index=g}function a(x,v){return r(x.vertices,v.vertices)}n.prototype.flip=function(){var x=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=x;var v=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=v};var c=[];function p(x,v,g){this.dimension=x,this.vertices=v,this.simplices=g,this.interior=g.filter(function(w){return!w.boundary}),this.tuple=new Array(x+1);for(var y=0;y<=x;++y)this.tuple[y]=this.vertices[y];var h,w,m=c[x];m||(m=c[x]=((h=o[x+1])||(h=o),w=h,function(){return w.apply(this,this.tuple)})),this.orient=m}var f=p.prototype;f.handleBoundaryDegeneracy=function(x,v){var g=this.dimension,y=this.vertices.length-1,h=this.tuple,m=this.vertices,w=[x];for(x.lastVisited=-y;w.length>0;)for(var u=(x=w.pop()).adjacent,S=0;S<=g;++S){var _=u[S];if(_.boundary&&!(_.lastVisited<=-y)){for(var E=_.vertices,L=0;L<=g;++L){var C=E[L];h[L]=C<0?v:m[C]}var P=this.orient();if(P>0)return _;_.lastVisited=-y,0===P&&w.push(_)}}return null},f.walk=function(x,v){var g=this.vertices.length-1,y=this.dimension,h=this.vertices,m=this.tuple,w=v?this.interior.length*Math.random()|0:this.interior.length-1,u=this.interior[w];e:for(;!u.boundary;){for(var S=u.vertices,_=u.adjacent,E=0;E<=y;++E)m[E]=h[S[E]];for(u.lastVisited=g,E=0;E<=y;++E){var L=_[E];if(!(L.lastVisited>=g)){var C=m[E];m[E]=x;var P=this.orient();if(m[E]=C,P<0){u=L;continue e}L.lastVisited=L.boundary?-g:g}}return}return u},f.addPeaks=function(x,v){var g=this.vertices.length-1,y=this.dimension,h=this.vertices,m=this.tuple,w=this.interior,u=this.simplices,S=[v];v.lastVisited=g,v.vertices[v.vertices.indexOf(-1)]=g,v.boundary=!1,w.push(v);for(var _=[];S.length>0;){var E=(v=S.pop()).vertices,L=v.adjacent,C=E.indexOf(g);if(!(C<0))for(var P=0;P<=y;++P)if(P!==C){var I=L[P];if(I.boundary&&!(I.lastVisited>=g)){var U=I.vertices;if(I.lastVisited!==-g){for(var z=0,H=0;H<=y;++H)U[H]<0?(z=H,m[H]=x):m[H]=h[U[H]];if(this.orient()>0){U[z]=g,I.boundary=!1,w.push(I),S.push(I),I.lastVisited=g;continue}I.lastVisited=-g}var F=I.adjacent,N=E.slice(),B=L.slice(),j=new n(N,B,!0);u.push(j);var J=F.indexOf(v);if(!(J<0))for(F[J]=j,B[C]=I,N[P]=-1,B[P]=v,L[P]=j,j.flip(),H=0;H<=y;++H){var G=N[H];if(!(G<0||G===g)){for(var V=new Array(y-1),W=0,X=0;X<=y;++X){var K=N[X];K<0||X===H||(V[W++]=K)}_.push(new i(V,j,H))}}}}}for(_.sort(a),P=0;P+1<_.length;P+=2){var re=_[P],ee=_[P+1];re.index<0||ee.index<0||(re.cell.adjacent[re.index]=ee.cell,ee.cell.adjacent[ee.index]=re.cell)}},f.insert=function(x,v){var g=this.vertices;g.push(x);var y=this.walk(x,v);if(y){for(var h=this.dimension,m=this.tuple,w=0;w<=h;++w){var u=y.vertices[w];m[w]=u<0?x:g[u]}var S=this.orient(m);S<0||(0!==S||(y=this.handleBoundaryDegeneracy(y,x)))&&this.addPeaks(x,y)}},f.boundary=function(){for(var x=this.dimension,v=[],g=this.simplices,y=g.length,h=0;h<y;++h){var m=g[h];if(m.boundary){for(var w=new Array(x),u=m.vertices,S=0,_=0,E=0;E<=x;++E)u[E]>=0?w[S++]=u[E]:_=1&E;if(_===(1&x)){var L=w[0];w[0]=w[1],w[1]=L}v.push(w)}}return v}},9014:function(d,s,t){"use strict";var o=t(5070);function r(S,_,E,L,C){this.mid=S,this.left=_,this.right=E,this.leftPoints=L,this.rightPoints=C,this.count=(_?_.count:0)+(E?E.count:0)+L.length}d.exports=function(S){return new w(S&&0!==S.length?m(S):null)};var n=r.prototype;function i(S,_){S.mid=_.mid,S.left=_.left,S.right=_.right,S.leftPoints=_.leftPoints,S.rightPoints=_.rightPoints,S.count=_.count}function a(S,_){var E=m(_);S.mid=E.mid,S.left=E.left,S.right=E.right,S.leftPoints=E.leftPoints,S.rightPoints=E.rightPoints,S.count=E.count}function c(S,_){var E=S.intervals([]);E.push(_),a(S,E)}function p(S,_){var E=S.intervals([]),L=E.indexOf(_);return L<0?0:(E.splice(L,1),a(S,E),1)}function f(S,_,E){for(var L=0;L<S.length&&S[L][0]<=_;++L){var C=E(S[L]);if(C)return C}}function x(S,_,E){for(var L=S.length-1;L>=0&&S[L][1]>=_;--L){var C=E(S[L]);if(C)return C}}function v(S,_){for(var E=0;E<S.length;++E){var L=_(S[E]);if(L)return L}}function g(S,_){return S-_}function y(S,_){return S[0]-_[0]||S[1]-_[1]}function h(S,_){return S[1]-_[1]||S[0]-_[0]}function m(S){if(0===S.length)return null;for(var _=[],E=0;E<S.length;++E)_.push(S[E][0],S[E][1]);_.sort(g);var L=_[_.length>>1],C=[],P=[],I=[];for(E=0;E<S.length;++E){var U=S[E];U[1]<L?C.push(U):L<U[0]?P.push(U):I.push(U)}var z=I,H=I.slice();return z.sort(y),H.sort(h),new r(L,m(C),m(P),z,H)}function w(S){this.root=S}n.intervals=function(S){return S.push.apply(S,this.leftPoints),this.left&&this.left.intervals(S),this.right&&this.right.intervals(S),S},n.insert=function(S){var _=this.count-this.leftPoints.length;if(this.count+=1,S[1]<this.mid)this.left?4*(this.left.count+1)>3*(_+1)?c(this,S):this.left.insert(S):this.left=m([S]);else if(S[0]>this.mid)this.right?4*(this.right.count+1)>3*(_+1)?c(this,S):this.right.insert(S):this.right=m([S]);else{var E=o.ge(this.leftPoints,S,y),L=o.ge(this.rightPoints,S,h);this.leftPoints.splice(E,0,S),this.rightPoints.splice(L,0,S)}},n.remove=function(S){var _=this.count-this.leftPoints;if(S[1]<this.mid)return this.left?4*(this.right?this.right.count:0)>3*(_-1)?p(this,S):2===(P=this.left.remove(S))?(this.left=null,this.count-=1,1):(1===P&&(this.count-=1),P):0;if(S[0]>this.mid)return this.right?4*(this.left?this.left.count:0)>3*(_-1)?p(this,S):2===(P=this.right.remove(S))?(this.right=null,this.count-=1,1):(1===P&&(this.count-=1),P):0;if(1===this.count)return this.leftPoints[0]===S?2:0;if(1===this.leftPoints.length&&this.leftPoints[0]===S){if(this.left&&this.right){for(var E=this,L=this.left;L.right;)E=L,L=L.right;if(E===this)L.right=this.right;else{var C=this.left,P=this.right;E.count-=L.count,E.right=L.left,L.left=C,L.right=P}i(this,L),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else i(this,this.left?this.left:this.right);return 1}for(C=o.ge(this.leftPoints,S,y);C<this.leftPoints.length&&this.leftPoints[C][0]===S[0];++C)if(this.leftPoints[C]===S)for(this.count-=1,this.leftPoints.splice(C,1),P=o.ge(this.rightPoints,S,h);P<this.rightPoints.length&&this.rightPoints[P][1]===S[1];++P)if(this.rightPoints[P]===S)return this.rightPoints.splice(P,1),1;return 0},n.queryPoint=function(S,_){return S<this.mid?this.left&&(E=this.left.queryPoint(S,_))?E:f(this.leftPoints,S,_):S>this.mid?this.right&&(E=this.right.queryPoint(S,_))?E:x(this.rightPoints,S,_):v(this.leftPoints,_);var E},n.queryInterval=function(S,_,E){var L;return S<this.mid&&this.left&&(L=this.left.queryInterval(S,_,E))||_>this.mid&&this.right&&(L=this.right.queryInterval(S,_,E))?L:_<this.mid?f(this.leftPoints,_,E):S>this.mid?x(this.rightPoints,S,E):v(this.leftPoints,E)};var u=w.prototype;u.insert=function(S){this.root?this.root.insert(S):this.root=new r(S[0],null,null,[S],[S])},u.remove=function(S){if(this.root){var _=this.root.remove(S);return 2===_&&(this.root=null),0!==_}return!1},u.queryPoint=function(S,_){if(this.root)return this.root.queryPoint(S,_)},u.queryInterval=function(S,_,E){if(S<=_&&this.root)return this.root.queryInterval(S,_,E)},Object.defineProperty(u,"count",{get:function(){return this.root?this.root.count:0}}),Object.defineProperty(u,"intervals",{get:function(){return this.root?this.root.intervals([]):[]}})},9560:function(d){"use strict";d.exports=function(s){for(var t=new Array(s),o=0;o<s;++o)t[o]=o;return t}},4846:function(d){d.exports=!0},4780:function(d){function s(t){return!!t.constructor&&"function"==typeof t.constructor.isBuffer&&t.constructor.isBuffer(t)}d.exports=function(t){return null!=t&&(s(t)||"function"==typeof(o=t).readFloatLE&&"function"==typeof o.slice&&s(o.slice(0,0))||!!t._isBuffer);var o}},2861:function(d){"use strict";d.exports=o,d.exports.isMobile=o,d.exports.default=o;var s=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,t=/(android|bb\d+|meego).+mobile|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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino|android|ipad|playbook|silk/i;function o(r){r||(r={});var n=r.ua;if(n||typeof navigator>"u"||(n=navigator.userAgent),n&&n.headers&&"string"==typeof n.headers["user-agent"]&&(n=n.headers["user-agent"]),"string"!=typeof n)return!1;var i=r.tablet?t.test(n):s.test(n);return!i&&r.tablet&&r.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==n.indexOf("Macintosh")&&-1!==n.indexOf("Safari")&&(i=!0),i}},3596:function(d){"use strict";d.exports=function(s){for(var t,o=s.length,r=0;r<o;r++)if(((t=s.charCodeAt(r))<9||t>13)&&32!==t&&133!==t&&160!==t&&5760!==t&&6158!==t&&(t<8192||t>8205)&&8232!==t&&8233!==t&&8239!==t&&8287!==t&&8288!==t&&12288!==t&&65279!==t)return!1;return!0}},3578:function(d){d.exports=function(s,t,o){return s*(1-o)+t*o}},7191:function(d,s,t){var o=t(4690),r=t(9823),n=t(7332),i=t(7787),a=t(7437),c=t(2142),p={length:t(4693),normalize:t(899),dot:t(9305),cross:t(903)},f=r(),x=r(),v=[0,0,0,0],g=[[0,0,0],[0,0,0],[0,0,0]],y=[0,0,0];function h(m,w,u,S,_){m[0]=w[0]*S+u[0]*_,m[1]=w[1]*S+u[1]*_,m[2]=w[2]*S+u[2]*_}d.exports=function(m,w,u,S,_,E){if(w||(w=[0,0,0]),u||(u=[0,0,0]),S||(S=[0,0,0]),_||(_=[0,0,0,1]),E||(E=[0,0,0,1]),!o(f,m)||(n(x,f),x[3]=0,x[7]=0,x[11]=0,x[15]=1,Math.abs(i(x)<1e-8)))return!1;var L,C,P,I,U,z,H,X,K,F=f[3],N=f[7],B=f[11],j=f[12],J=f[13],G=f[14],V=f[15];if(0!==F||0!==N||0!==B){if(v[0]=F,v[1]=N,v[2]=B,v[3]=V,!a(x,x))return!1;c(x,x),I=(C=v)[0],(L=_)[0]=(P=x)[0]*I+P[4]*(U=C[1])+P[8]*(z=C[2])+P[12]*(H=C[3]),L[1]=P[1]*I+P[5]*U+P[9]*z+P[13]*H,L[2]=P[2]*I+P[6]*U+P[10]*z+P[14]*H,L[3]=P[3]*I+P[7]*U+P[11]*z+P[15]*H}else _[0]=_[1]=_[2]=0,_[3]=1;if(w[0]=j,w[1]=J,w[2]=G,(X=g)[0][0]=(K=f)[0],X[0][1]=K[1],X[0][2]=K[2],X[1][0]=K[4],X[1][1]=K[5],X[1][2]=K[6],X[2][0]=K[8],X[2][1]=K[9],X[2][2]=K[10],u[0]=p.length(g[0]),p.normalize(g[0],g[0]),S[0]=p.dot(g[0],g[1]),h(g[1],g[1],g[0],1,-S[0]),u[1]=p.length(g[1]),p.normalize(g[1],g[1]),S[0]/=u[1],S[1]=p.dot(g[0],g[2]),h(g[2],g[2],g[0],1,-S[1]),S[2]=p.dot(g[1],g[2]),h(g[2],g[2],g[1],1,-S[2]),u[2]=p.length(g[2]),p.normalize(g[2],g[2]),S[1]/=u[2],S[2]/=u[2],p.cross(y,g[1],g[2]),p.dot(g[0],y)<0)for(var W=0;W<3;W++)u[W]*=-1,g[W][0]*=-1,g[W][1]*=-1,g[W][2]*=-1;return E[0]=.5*Math.sqrt(Math.max(1+g[0][0]-g[1][1]-g[2][2],0)),E[1]=.5*Math.sqrt(Math.max(1-g[0][0]+g[1][1]-g[2][2],0)),E[2]=.5*Math.sqrt(Math.max(1-g[0][0]-g[1][1]+g[2][2],0)),E[3]=.5*Math.sqrt(Math.max(1+g[0][0]+g[1][1]+g[2][2],0)),g[2][1]>g[1][2]&&(E[0]=-E[0]),g[0][2]>g[2][0]&&(E[1]=-E[1]),g[1][0]>g[0][1]&&(E[2]=-E[2]),!0}},4690:function(d){d.exports=function(s,t){var o=t[15];if(0===o)return!1;for(var r=1/o,n=0;n<16;n++)s[n]=t[n]*r;return!0}},7649:function(d,s,t){var o=t(1868),r=t(1102),n=t(7191),i=t(7787),a=t(1116),c=x(),p=x(),f=x();function x(){return{translate:v(),scale:v(1),skew:v(),perspective:[0,0,0,1],quaternion:[0,0,0,1]}}function v(g){return[g||0,g||0,g||0]}d.exports=function(g,y,h,m){if(0===i(y)||0===i(h))return!1;var w=n(y,c.translate,c.scale,c.skew,c.perspective,c.quaternion),u=n(h,p.translate,p.scale,p.skew,p.perspective,p.quaternion);return!(!w||!u||(o(f.translate,c.translate,p.translate,m),o(f.skew,c.skew,p.skew,m),o(f.scale,c.scale,p.scale,m),o(f.perspective,c.perspective,p.perspective,m),a(f.quaternion,c.quaternion,p.quaternion,m),r(g,f.translate,f.scale,f.skew,f.perspective,f.quaternion),0))}},1102:function(d,s,t){var o={identity:t(9947),translate:t(998),multiply:t(104),create:t(9823),scale:t(3668),fromRotationTranslation:t(7280)},r=(o.create(),o.create());d.exports=function(n,i,a,c,p,f){return o.identity(n),o.fromRotationTranslation(n,f,i),n[3]=p[0],n[7]=p[1],n[11]=p[2],n[15]=p[3],o.identity(r),0!==c[2]&&(r[9]=c[2],o.multiply(n,n,r)),0!==c[1]&&(r[9]=0,r[8]=c[1],o.multiply(n,n,r)),0!==c[0]&&(r[8]=0,r[4]=c[0],o.multiply(n,n,r)),o.scale(n,n,a),n}},9298:function(d,s,t){"use strict";var o=t(5070),r=t(7649),n=t(7437),i=t(6109),a=t(7115),c=t(5240),p=t(3012),f=t(998),x=(t(3668),t(899)),v=[0,0,0];function g(m){this._components=m.slice(),this._time=[0],this.prevMatrix=m.slice(),this.nextMatrix=m.slice(),this.computedMatrix=m.slice(),this.computedInverse=m.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]}d.exports=function(m){return new g((m=m||{}).matrix||[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])};var y=g.prototype;y.recalcMatrix=function(m){var w=this._time,u=o.le(w,m),S=this.computedMatrix;if(!(u<0)){var _=this._components;if(u===w.length-1)for(var E=16*u,L=0;L<16;++L)S[L]=_[E++];else{var C=w[u+1]-w[u],P=(E=16*u,this.prevMatrix),I=!0;for(L=0;L<16;++L)P[L]=_[E++];var U=this.nextMatrix;for(L=0;L<16;++L)U[L]=_[E++],I=I&&P[L]===U[L];if(C<1e-6||I)for(L=0;L<16;++L)S[L]=P[L];else r(S,P,U,(m-w[u])/C)}var z=this.computedUp;z[0]=S[1],z[1]=S[5],z[2]=S[9],x(z,z);var H=this.computedInverse;n(H,S);var F=this.computedEye,N=H[15];F[0]=H[12]/N,F[1]=H[13]/N,F[2]=H[14]/N;var B=this.computedCenter,j=Math.exp(this.computedRadius[0]);for(L=0;L<3;++L)B[L]=F[L]-S[2+4*L]*j}},y.idle=function(m){if(!(m<this.lastT())){for(var w=this._components,u=w.length-16,S=0;S<16;++S)w.push(w[u++]);this._time.push(m)}},y.flush=function(m){var w=o.gt(this._time,m)-2;w<0||(this._time.splice(0,w),this._components.splice(0,16*w))},y.lastT=function(){return this._time[this._time.length-1]},y.lookAt=function(m,w,u,S){this.recalcMatrix(m),this.setMatrix(m,p(this.computedMatrix,w=w||this.computedEye,u=u||v,S=S||this.computedUp));for(var _=0,E=0;E<3;++E)_+=Math.pow(u[E]-w[E],2);_=Math.log(Math.sqrt(_)),this.computedRadius[0]=_},y.rotate=function(m,w,u,S){this.recalcMatrix(m);var _=this.computedInverse;w&&a(_,_,w),u&&i(_,_,u),S&&c(_,_,S),this.setMatrix(m,n(this.computedMatrix,_))};var h=[0,0,0];y.pan=function(m,w,u,S){h[0]=-(w||0),h[1]=-(u||0),h[2]=-(S||0),this.recalcMatrix(m);var _=this.computedInverse;f(_,_,h),this.setMatrix(m,n(_,_))},y.translate=function(m,w,u,S){h[0]=w||0,h[1]=u||0,h[2]=S||0,this.recalcMatrix(m);var _=this.computedMatrix;f(_,_,h),this.setMatrix(m,_)},y.setMatrix=function(m,w){if(!(m<this.lastT())){this._time.push(m);for(var u=0;u<16;++u)this._components.push(w[u])}},y.setDistance=function(m,w){this.computedRadius[0]=w},y.setDistanceLimits=function(m,w){var u=this._limits;u[0]=m,u[1]=w},y.getDistanceLimits=function(m){var w=this._limits;return m?(m[0]=w[0],m[1]=w[1],m):w}},3266:function(d,s,t){"use strict";d.exports=function(r){var n=r.length;if(n<3){for(var i=new Array(n),a=0;a<n;++a)i[a]=a;return 2===n&&r[0][0]===r[1][0]&&r[0][1]===r[1][1]?[0]:i}var c=new Array(n);for(a=0;a<n;++a)c[a]=a;c.sort(function(w,u){return r[w][0]-r[u][0]||r[w][1]-r[u][1]});var p=[c[0],c[1]],f=[c[0],c[1]];for(a=2;a<n;++a){for(var x=c[a],v=r[x],g=p.length;g>1&&o(r[p[g-2]],r[p[g-1]],v)<=0;)g-=1,p.pop();for(p.push(x),g=f.length;g>1&&o(r[f[g-2]],r[f[g-1]],v)>=0;)g-=1,f.pop();f.push(x)}i=new Array(f.length+p.length-2);for(var y=0,h=(a=0,p.length);a<h;++a)i[y++]=p[a];for(var m=f.length-2;m>0;--m)i[y++]=f[m];return i};var o=t(417)[3]},6145:function(d,s,t){"use strict";d.exports=function(r,n){n||(n=r,r=window);var i=0,a=0,c=0,p={shift:!1,alt:!1,control:!1,meta:!1},f=!1;function x(E){var L=!1;return"altKey"in E&&(L=L||E.altKey!==p.alt,p.alt=!!E.altKey),"shiftKey"in E&&(L=L||E.shiftKey!==p.shift,p.shift=!!E.shiftKey),"ctrlKey"in E&&(L=L||E.ctrlKey!==p.control,p.control=!!E.ctrlKey),"metaKey"in E&&(L=L||E.metaKey!==p.meta,p.meta=!!E.metaKey),L}function v(E,L){var C=o.x(L),P=o.y(L);"buttons"in L&&(E=0|L.buttons),(E!==i||C!==a||P!==c||x(L))&&(i=0|E,a=C||0,c=P||0,n&&n(i,a,c,p))}function g(E){v(0,E)}function y(){(i||a||c||p.shift||p.alt||p.meta||p.control)&&(a=c=0,i=0,p.shift=p.alt=p.control=p.meta=!1,n&&n(0,0,0,p))}function h(E){x(E)&&n&&n(i,a,c,p)}function m(E){0===o.buttons(E)?v(0,E):v(i,E)}function w(E){v(i|o.buttons(E),E)}function u(E){v(i&~o.buttons(E),E)}function S(){f||(f=!0,r.addEventListener("mousemove",m),r.addEventListener("mousedown",w),r.addEventListener("mouseup",u),r.addEventListener("mouseleave",g),r.addEventListener("mouseenter",g),r.addEventListener("mouseout",g),r.addEventListener("mouseover",g),r.addEventListener("blur",y),r.addEventListener("keyup",h),r.addEventListener("keydown",h),r.addEventListener("keypress",h),r!==window&&(window.addEventListener("blur",y),window.addEventListener("keyup",h),window.addEventListener("keydown",h),window.addEventListener("keypress",h)))}S();var _={element:r};return Object.defineProperties(_,{enabled:{get:function(){return f},set:function(E){E?S():f&&(f=!1,r.removeEventListener("mousemove",m),r.removeEventListener("mousedown",w),r.removeEventListener("mouseup",u),r.removeEventListener("mouseleave",g),r.removeEventListener("mouseenter",g),r.removeEventListener("mouseout",g),r.removeEventListener("mouseover",g),r.removeEventListener("blur",y),r.removeEventListener("keyup",h),r.removeEventListener("keydown",h),r.removeEventListener("keypress",h),r!==window&&(window.removeEventListener("blur",y),window.removeEventListener("keyup",h),window.removeEventListener("keydown",h),window.removeEventListener("keypress",h)))},enumerable:!0},buttons:{get:function(){return i},enumerable:!0},x:{get:function(){return a},enumerable:!0},y:{get:function(){return c},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),_};var o=t(4110)},2565:function(d){var s={left:0,top:0};d.exports=function(t,o,r){o=o||t.currentTarget||t.srcElement,Array.isArray(r)||(r=[0,0]);var n,i=t.clientX||0,a=t.clientY||0,c=(n=o)===window||n===document||n===document.body?s:n.getBoundingClientRect();return r[0]=i-c.left,r[1]=a-c.top,r}},4110:function(d,s){"use strict";function t(o){return o.target||o.srcElement||window}s.buttons=function(o){if("object"==typeof o){if("buttons"in o)return o.buttons;if("which"in o){if(2===(r=o.which))return 4;if(3===r)return 2;if(r>0)return 1<<r-1}else if("button"in o){var r;if(1===(r=o.button))return 4;if(2===r)return 2;if(r>=0)return 1<<r}}return 0},s.element=t,s.x=function(o){if("object"==typeof o){if("offsetX"in o)return o.offsetX;var r=t(o).getBoundingClientRect();return o.clientX-r.left}return 0},s.y=function(o){if("object"==typeof o){if("offsetY"in o)return o.offsetY;var r=t(o).getBoundingClientRect();return o.clientY-r.top}return 0}},6475:function(d,s,t){"use strict";var o=t(14);d.exports=function(r,n,i){"function"==typeof r&&(i=!!n,n=r,r=window);var a=o("ex",r),c=function(p){i&&p.preventDefault();var f=p.deltaX||0,x=p.deltaY||0,v=p.deltaZ||0,g=1;switch(p.deltaMode){case 1:g=a;break;case 2:g=window.innerHeight}if(x*=g,v*=g,(f*=g)||x||v)return n(f,x,v,p)};return r.addEventListener("wheel",c),c}},9284:function(d,s,t){"use strict";var o=t(5306);d.exports=function(n){function i(v){throw new Error("ndarray-extract-contour: "+v)}"object"!=typeof n&&i("Must specify arguments");var a=n.order;Array.isArray(a)||i("Must specify order");var v,g,y,u,c=n.arrayArguments||1;c<1&&i("Must have at least one array argument"),(n.scalarArguments||0)<0&&i("Scalar arg count must be > 0"),"function"!=typeof n.vertex&&i("Must specify vertex creation function"),"function"!=typeof n.cell&&i("Must specify cell creation function"),"function"!=typeof n.phase&&i("Must specify phase function");for(var p=n.getters||[],f=new Array(c),x=0;x<c;++x)f[x]=p.indexOf(x)>=0;return v=n.vertex,g=n.cell,y=n.phase,u=[f,a].join(","),(0,r[u])(v,g,y,o.mallocUint32,o.freeUint32)};var r={"false,0,1":function(n,i,a,c,p){return function(f,x,v,g){var y,h=0|f.shape[0],m=0|f.shape[1],w=f.data,S=0|f.stride[0],_=0|f.stride[1],E=0|f.offset,L=0|-S,C=0,P=0|-_,I=0,U=-S-_|0,z=0,H=0|S,F=_-S*h|0,N=0,B=0,j=0,J=2*h|0,G=c(J),V=c(J),W=0,X=0,K=-1,re=-1,ee=0,ie=0|-h,oe=0|h,ce=0,me=-h-1|0,de=h-1|0,he=0,ve=0,Pe=0;for(N=0;N<h;++N)G[W++]=a(w[E],x,v,g),E+=H;if(E+=F,m>0){if(B=1,G[W++]=a(w[E],x,v,g),E+=H,h>0)for(N=1,X=G[W]=a(y=w[E],x,v,g),ce=G[W+ie],he=G[W+me],X===(ee=G[W+K])&&X===ce&&X===he||(n(N,B,y,C=w[E+L],I=w[E+P],z=w[E+U],X,ee,ce,he,x,v,g),ve=V[W]=j++),W+=1,E+=H,N=2;N<h;++N)X=G[W]=a(y=w[E],x,v,g),ce=G[W+ie],he=G[W+me],X===(ee=G[W+K])&&X===ce&&X===he||(n(N,B,y,C=w[E+L],I=w[E+P],z=w[E+U],X,ee,ce,he,x,v,g),ve=V[W]=j++,he!==ee&&i(V[W+K],ve,z,C,he,ee,x,v,g)),W+=1,E+=H;for(E+=F,W=0,Pe=K,K=re,re=Pe,Pe=ie,ie=oe,oe=Pe,Pe=me,me=de,de=Pe,B=2;B<m;++B){if(G[W++]=a(w[E],x,v,g),E+=H,h>0)for(N=1,X=G[W]=a(y=w[E],x,v,g),ce=G[W+ie],he=G[W+me],X===(ee=G[W+K])&&X===ce&&X===he||(n(N,B,y,C=w[E+L],I=w[E+P],z=w[E+U],X,ee,ce,he,x,v,g),ve=V[W]=j++,he!==ce&&i(V[W+ie],ve,I,z,ce,he,x,v,g)),W+=1,E+=H,N=2;N<h;++N)X=G[W]=a(y=w[E],x,v,g),ce=G[W+ie],he=G[W+me],X===(ee=G[W+K])&&X===ce&&X===he||(n(N,B,y,C=w[E+L],I=w[E+P],z=w[E+U],X,ee,ce,he,x,v,g),ve=V[W]=j++,he!==ce&&i(V[W+ie],ve,I,z,ce,he,x,v,g),he!==ee&&i(V[W+K],ve,z,C,he,ee,x,v,g)),W+=1,E+=H;1&B&&(W=0),Pe=K,K=re,re=Pe,Pe=ie,ie=oe,oe=Pe,Pe=me,me=de,de=Pe,E+=F}}p(V),p(G)}},"false,1,0":function(n,i,a,c,p){return function(f,x,v,g){var y,h=0|f.shape[0],m=0|f.shape[1],w=f.data,S=0|f.stride[0],_=0|f.stride[1],E=0|f.offset,L=0|-S,C=0,P=0|-_,I=0,U=-S-_|0,z=0,H=0|_,F=S-_*m|0,N=0,B=0,j=0,J=2*m|0,G=c(J),V=c(J),W=0,X=0,K=-1,re=-1,ee=0,ie=0|-m,oe=0|m,ce=0,me=-m-1|0,de=m-1|0,he=0,ve=0,Pe=0;for(B=0;B<m;++B)G[W++]=a(w[E],x,v,g),E+=H;if(E+=F,h>0){if(N=1,G[W++]=a(w[E],x,v,g),E+=H,m>0)for(B=1,X=G[W]=a(y=w[E],x,v,g),ee=G[W+K],he=G[W+me],X===(ce=G[W+ie])&&X===ee&&X===he||(n(N,B,y,C=w[E+L],I=w[E+P],z=w[E+U],X,ce,ee,he,x,v,g),ve=V[W]=j++),W+=1,E+=H,B=2;B<m;++B)X=G[W]=a(y=w[E],x,v,g),ee=G[W+K],he=G[W+me],X===(ce=G[W+ie])&&X===ee&&X===he||(n(N,B,y,C=w[E+L],I=w[E+P],z=w[E+U],X,ce,ee,he,x,v,g),ve=V[W]=j++,he!==ee&&i(V[W+K],ve,I,z,ee,he,x,v,g)),W+=1,E+=H;for(E+=F,W=0,Pe=ie,ie=oe,oe=Pe,Pe=K,K=re,re=Pe,Pe=me,me=de,de=Pe,N=2;N<h;++N){if(G[W++]=a(w[E],x,v,g),E+=H,m>0)for(B=1,X=G[W]=a(y=w[E],x,v,g),ee=G[W+K],he=G[W+me],X===(ce=G[W+ie])&&X===ee&&X===he||(n(N,B,y,C=w[E+L],I=w[E+P],z=w[E+U],X,ce,ee,he,x,v,g),ve=V[W]=j++,he!==ce&&i(V[W+ie],ve,z,C,he,ce,x,v,g)),W+=1,E+=H,B=2;B<m;++B)X=G[W]=a(y=w[E],x,v,g),ee=G[W+K],he=G[W+me],X===(ce=G[W+ie])&&X===ee&&X===he||(n(N,B,y,C=w[E+L],I=w[E+P],z=w[E+U],X,ce,ee,he,x,v,g),ve=V[W]=j++,he!==ee&&i(V[W+K],ve,I,z,ee,he,x,v,g),he!==ce&&i(V[W+ie],ve,z,C,he,ce,x,v,g)),W+=1,E+=H;1&N&&(W=0),Pe=ie,ie=oe,oe=Pe,Pe=K,K=re,re=Pe,Pe=me,me=de,de=Pe,E+=F}}p(V),p(G)}}}},9144:function(d,s,t){"use strict";var o=t(3094),r={zero:function(h,m,w,u){var S=h[0];u|=0;var _=0,E=w[0];for(_=0;_<S;++_)m[u]=0,u+=E},fdTemplate1:function(h,m,w,u,S,_,E){var L=h[0],C=w[0],P=-1*C,I=C;u|=0,E|=0;var U=0,z=C,H=_[0];for(U=0;U<L;++U)S[E]=.5*(m[u+P]-m[u+I]),u+=z,E+=H},fdTemplate2:function(h,m,w,u,S,_,E,L,C,P){var I=h[0],U=h[1],z=w[0],H=w[1],N=_[1],j=C[1],J=-1*z,G=z,V=-1*H,W=H;u|=0,E|=0,P|=0;var X=0,K=0,re=H,ee=z-U*H,ie=N,oe=_[0]-U*N,ce=j,me=C[0]-U*j;for(K=0;K<I;++K){for(X=0;X<U;++X)S[E]=.5*(m[u+J]-m[u+G]),L[P]=.5*(m[u+V]-m[u+W]),u+=re,E+=ie,P+=ce;u+=ee,E+=oe,P+=me}}},n={cdiff:function(h){var m={};return function(w,u,S){var _=w.dtype,E=w.order,L=u.dtype,C=u.order,P=S.dtype,I=S.order,U=[_,E.join(),L,C.join(),P,I.join()].join(),z=m[U];return z||(m[U]=z=h([_,E,L,C,P,I])),z(w.shape.slice(0),w.data,w.stride,0|w.offset,u.data,u.stride,0|u.offset,S.data,S.stride,0|S.offset)}},zero:function(h){var m={};return function(w){var u=w.dtype,S=w.order,_=[u,S.join()].join(),E=m[_];return E||(m[_]=E=h([u,S])),E(w.shape.slice(0),w.data,w.stride,0|w.offset)}},fdTemplate1:function(h){var m={};return function(w,u){var S=w.dtype,_=w.order,E=u.dtype,L=u.order,C=[S,_.join(),E,L.join()].join(),P=m[C];return P||(m[C]=P=h([S,_,E,L])),P(w.shape.slice(0),w.data,w.stride,0|w.offset,u.data,u.stride,0|u.offset)}},fdTemplate2:function(h){var m={};return function(w,u,S){var _=w.dtype,E=w.order,L=u.dtype,C=u.order,P=S.dtype,I=S.order,U=[_,E.join(),L,C.join(),P,I.join()].join(),z=m[U];return z||(m[U]=z=h([_,E,L,C,P,I])),z(w.shape.slice(0),w.data,w.stride,0|w.offset,u.data,u.stride,0|u.offset,S.data,S.stride,0|S.offset)}}};function i(h){return(0,n[h.funcName])(a.bind(void 0,h))}function a(h){return r[h.funcName]}function c(h){return i({funcName:h.funcName})}var p={},f={},x=c({funcName:"cdiff"}),v=c({funcName:"zero"});function g(h){return h in p?p[h]:p[h]=c({funcName:"fdTemplate"+h})}function y(h,m,w,u){return function(S,_){var E=_.shape.slice();return E[0]>2&&E[1]>2&&u(_.pick(-1,-1).lo(1,1).hi(E[0]-2,E[1]-2),S.pick(-1,-1,0).lo(1,1).hi(E[0]-2,E[1]-2),S.pick(-1,-1,1).lo(1,1).hi(E[0]-2,E[1]-2)),E[1]>2&&(w(_.pick(0,-1).lo(1).hi(E[1]-2),S.pick(0,-1,1).lo(1).hi(E[1]-2)),m(S.pick(0,-1,0).lo(1).hi(E[1]-2))),E[1]>2&&(w(_.pick(E[0]-1,-1).lo(1).hi(E[1]-2),S.pick(E[0]-1,-1,1).lo(1).hi(E[1]-2)),m(S.pick(E[0]-1,-1,0).lo(1).hi(E[1]-2))),E[0]>2&&(w(_.pick(-1,0).lo(1).hi(E[0]-2),S.pick(-1,0,0).lo(1).hi(E[0]-2)),m(S.pick(-1,0,1).lo(1).hi(E[0]-2))),E[0]>2&&(w(_.pick(-1,E[1]-1).lo(1).hi(E[0]-2),S.pick(-1,E[1]-1,0).lo(1).hi(E[0]-2)),m(S.pick(-1,E[1]-1,1).lo(1).hi(E[0]-2))),S.set(0,0,0,0),S.set(0,0,1,0),S.set(E[0]-1,0,0,0),S.set(E[0]-1,0,1,0),S.set(0,E[1]-1,0,0),S.set(0,E[1]-1,1,0),S.set(E[0]-1,E[1]-1,0,0),S.set(E[0]-1,E[1]-1,1,0),S}}d.exports=function(h,m,w){return Array.isArray(w)||(w=o(m.dimension,"string"==typeof w?w:"clamp")),0===m.size?h:0===m.dimension?(h.set(0),h):function(u){var S=u.join();if(C=f[S])return C;for(var _=u.length,E=[x,v],L=1;L<=_;++L)E.push(g(L));var C=y.apply(void 0,E);return f[S]=C,C}(w)(h,m)}},3581:function(d){"use strict";function s(n,i){var a=Math.floor(i),c=i-a,f=0<=a+1&&a+1<n.shape[0];return(1-c)*(0<=a&&a<n.shape[0]?+n.get(a):0)+c*(f?+n.get(a+1):0)}function t(n,i,a){var c=Math.floor(i),p=i-c,f=0<=c&&c<n.shape[0],x=0<=c+1&&c+1<n.shape[0],v=Math.floor(a),g=a-v,y=0<=v&&v<n.shape[1],h=0<=v+1&&v+1<n.shape[1],m=f&&y?n.get(c,v):0,w=f&&h?n.get(c,v+1):0;return(1-g)*((1-p)*m+p*(x&&y?n.get(c+1,v):0))+g*((1-p)*w+p*(x&&h?n.get(c+1,v+1):0))}function o(n,i,a,c){var p=Math.floor(i),f=i-p,x=0<=p&&p<n.shape[0],v=0<=p+1&&p+1<n.shape[0],g=Math.floor(a),y=a-g,h=0<=g&&g<n.shape[1],m=0<=g+1&&g+1<n.shape[1],w=Math.floor(c),u=c-w,S=0<=w&&w<n.shape[2],_=0<=w+1&&w+1<n.shape[2],E=x&&h&&S?n.get(p,g,w):0,L=x&&m&&S?n.get(p,g+1,w):0,C=v&&h&&S?n.get(p+1,g,w):0,P=v&&m&&S?n.get(p+1,g+1,w):0,I=x&&h&&_?n.get(p,g,w+1):0,U=x&&m&&_?n.get(p,g+1,w+1):0;return(1-u)*((1-y)*((1-f)*E+f*C)+y*((1-f)*L+f*P))+u*((1-y)*((1-f)*I+f*(v&&h&&_?n.get(p+1,g,w+1):0))+y*((1-f)*U+f*(v&&m&&_?n.get(p+1,g+1,w+1):0)))}function r(n){var i,a,c=0|n.shape.length,p=new Array(c),f=new Array(c),x=new Array(c),v=new Array(c);for(i=0;i<c;++i)a=+arguments[i+1],p[i]=Math.floor(a),f[i]=a-p[i],x[i]=0<=p[i]&&p[i]<n.shape[i],v[i]=0<=p[i]+1&&p[i]+1<n.shape[i];var g,y,h,m=0;e:for(i=0;i<1<<c;++i){for(y=1,h=n.offset,g=0;g<c;++g)if(i&1<<g){if(!v[g])continue e;y*=f[g],h+=n.stride[g]*(p[g]+1)}else{if(!x[g])continue e;y*=1-f[g],h+=n.stride[g]*p[g]}m+=y*n.data[h]}return m}d.exports=function(n,i,a,c){switch(n.shape.length){case 0:return 0;case 1:return s(n,i);case 2:return t(n,i,a);case 3:return o(n,i,a,c);default:return r.apply(void 0,arguments)}},d.exports.d1=s,d.exports.d2=t,d.exports.d3=o},7498:function(d,s){"use strict";var t={"float64,2,1,0":function(){return function(a,c,p,f,x){var v=a[0],g=a[1],y=a[2],m=p[1],w=p[2];f|=0;var u=0,S=0,_=0,E=w,L=m-y*w,C=p[0]-g*m;for(_=0;_<v;++_){for(S=0;S<g;++S){for(u=0;u<y;++u)c[f]/=x,f+=E;f+=L}f+=C}}},"uint8,2,0,1,float64,2,1,0":function(){return function(a,c,p,f,x,v,g,y){for(var h=a[0],m=a[1],w=a[2],u=p[0],S=p[1],_=p[2],E=v[0],L=v[1],C=v[2],P=f|=0,I=g|=0,U=0|a[0];U>0;){U<64?(h=U,U=0):(h=64,U-=64);for(var z=0|a[1];z>0;){z<64?(m=z,z=0):(m=64,z-=64),f=P+U*u+z*S,g=I+U*E+z*L;var H=0,F=0,N=0,B=_,j=u-w*_,J=S-h*u,G=C,V=E-w*C,W=L-h*E;for(N=0;N<m;++N){for(F=0;F<h;++F){for(H=0;H<w;++H)c[f]=x[g]*y,f+=B,g+=G;f+=j,g+=V}f+=J,g+=W}}}}},"float32,1,0,float32,1,0":function(){return function(a,c,p,f,x,v,g){var y=a[0],h=a[1],w=p[1],S=v[1];f|=0,g|=0;var _=0,E=0,L=w,C=p[0]-h*w,P=S,I=v[0]-h*S;for(E=0;E<y;++E){for(_=0;_<h;++_)c[f]=x[g],f+=L,g+=P;f+=C,g+=I}}},"float32,1,0,float32,0,1":function(){return function(a,c,p,f,x,v,g){for(var y=a[0],h=a[1],m=p[0],w=p[1],u=v[0],S=v[1],_=f|=0,E=g|=0,L=0|a[1];L>0;){L<64?(h=L,L=0):(h=64,L-=64);for(var C=0|a[0];C>0;){C<64?(y=C,C=0):(y=64,C-=64),f=_+L*w+C*m,g=E+L*S+C*u;var P=0,I=0,U=w,z=m-h*w,H=S,F=u-h*S;for(I=0;I<y;++I){for(P=0;P<h;++P)c[f]=x[g],f+=U,g+=H;f+=z,g+=F}}}}},"uint8,2,0,1,uint8,1,2,0":function(){return function(a,c,p,f,x,v,g){for(var y=a[0],h=a[1],m=a[2],w=p[0],u=p[1],S=p[2],_=v[0],E=v[1],L=v[2],C=f|=0,P=g|=0,I=0|a[2];I>0;){I<64?(m=I,I=0):(m=64,I-=64);for(var U=0|a[0];U>0;){U<64?(y=U,U=0):(y=64,U-=64);for(var z=0|a[1];z>0;){z<64?(h=z,z=0):(h=64,z-=64),f=C+I*S+U*w+z*u,g=P+I*L+U*_+z*E;var H=0,F=0,N=0,B=S,j=w-m*S,J=u-y*w,G=L,V=_-m*L,W=E-y*_;for(N=0;N<h;++N){for(F=0;F<y;++F){for(H=0;H<m;++H)c[f]=x[g],f+=B,g+=G;f+=j,g+=V}f+=J,g+=W}}}}}},"uint8,2,0,1,array,2,0,1":function(){return function(a,c,p,f,x,v,g){var y=a[0],h=a[1],m=a[2],w=p[0],S=p[2],_=v[0],L=v[2];f|=0,g|=0;var C=0,P=0,I=0,U=S,z=w-m*S,H=p[1]-y*w,F=L,N=_-m*L,B=v[1]-y*_;for(I=0;I<h;++I){for(P=0;P<y;++P){for(C=0;C<m;++C)c[f]=x[g],f+=U,g+=F;f+=z,g+=N}f+=H,g+=B}}}},o=function(a,c){var p=c.join(",");return(0,t[p])()},r={mul:function(a){var c={};return function(p,f,x){var v=p.dtype,g=p.order,y=f.dtype,h=f.order,m=x.dtype,w=x.order,u=[v,g.join(),y,h.join(),m,w.join()].join(),S=c[u];return S||(c[u]=S=a([v,g,y,h,m,w])),S(p.shape.slice(0),p.data,p.stride,0|p.offset,f.data,f.stride,0|f.offset,x.data,x.stride,0|x.offset)}},muls:function(a){var c={};return function(p,f,x){var v=p.dtype,g=p.order,y=f.dtype,h=f.order,m=[v,g.join(),y,h.join()].join(),w=c[m];return w||(c[m]=w=a([v,g,y,h])),w(p.shape.slice(0),p.data,p.stride,0|p.offset,f.data,f.stride,0|f.offset,x)}},mulseq:function(a){var c={};return function(p,f){var x=p.dtype,v=p.order,g=[x,v.join()].join(),y=c[g];return y||(c[g]=y=a([x,v])),y(p.shape.slice(0),p.data,p.stride,0|p.offset,f)}},div:function(a){var c={};return function(p,f,x){var v=p.dtype,g=p.order,y=f.dtype,h=f.order,m=x.dtype,w=x.order,u=[v,g.join(),y,h.join(),m,w.join()].join(),S=c[u];return S||(c[u]=S=a([v,g,y,h,m,w])),S(p.shape.slice(0),p.data,p.stride,0|p.offset,f.data,f.stride,0|f.offset,x.data,x.stride,0|x.offset)}},divs:function(a){var c={};return function(p,f,x){var v=p.dtype,g=p.order,y=f.dtype,h=f.order,m=[v,g.join(),y,h.join()].join(),w=c[m];return w||(c[m]=w=a([v,g,y,h])),w(p.shape.slice(0),p.data,p.stride,0|p.offset,f.data,f.stride,0|f.offset,x)}},divseq:function(a){var c={};return function(p,f){var x=p.dtype,v=p.order,g=[x,v.join()].join(),y=c[g];return y||(c[g]=y=a([x,v])),y(p.shape.slice(0),p.data,p.stride,0|p.offset,f)}},assign:function(a){var c={};return function(p,f){var x=p.dtype,v=p.order,g=f.dtype,y=f.order,h=[x,v.join(),g,y.join()].join(),m=c[h];return m||(c[h]=m=a([x,v,g,y])),m(p.shape.slice(0),p.data,p.stride,0|p.offset,f.data,f.stride,0|f.offset)}}};function n(a){return(0,r[(c={funcName:a.funcName}).funcName])(o.bind(void 0,c));var c}var i={mul:"*",div:"/"};(function(){for(var a in i)s[a]=n({funcName:a}),s[a+"s"]=n({funcName:a+"s"}),s[a+"seq"]=n({funcName:a+"seq"})})(),s.assign=n({funcName:"assign"})},7382:function(d,s,t){"use strict";var o=t(5050),r=t(9262);d.exports=function(n,i){for(var a=[],c=n,p=1;Array.isArray(c);)a.push(c.length),p*=c.length,c=c[0];return 0===a.length?o():(i||(i=o(new Float64Array(p),a)),r(i,n),i)}},9262:function(d){"use strict";var s,t;d.exports=(s=function(){return function(s,t,o,r,n){var i=s[0],a=s[1],c=s[2],f=o[1],x=o[2],v=[0,0,0];r|=0;var g=0,y=0,h=0,m=x,w=f-c*x,u=o[0]-a*f;for(h=0;h<i;++h){for(y=0;y<a;++y){for(g=0;g<c;++g){var S,_=n;for(S=0;S<v.length-1;++S)_=_[v[S]];t[r]=_[v[v.length-1]],r+=m,++v[2]}r+=w,v[2]-=c,++v[1]}r+=u,v[1]-=a,++v[0]}}}.bind(void 0,{funcName:"convert"}),t={},function(o,r){var n=o.dtype,i=o.order,a=[n,i.join()].join(),c=t[a];return c||(t[a]=c=s([n,i])),c(o.shape.slice(0),o.data,o.stride,0|o.offset,r)})},8139:function(d,s,t){"use strict";var o=t(5306);function r(c){return"uint32"===c?[o.mallocUint32,o.freeUint32]:null}var n={"uint32,1,0":function(c,p){return function(f,x,v,g,y,h,m,w,u,S,_){var E,L,C,P,I,U,z,H,F=f*y+g,N=c(w);for(E=f+1;E<=x;++E){for(L=E,C=F+=y,I=0,U=F,P=0;P<w;++P)N[I++]=v[U],U+=u;e:for(;L-- >f;){I=0,U=C-y;t:for(P=0;P<w;++P){if((z=v[U])<(H=N[I]))break e;if(z>H)break t;U+=S,I+=_}for(I=C,U=C-y,P=0;P<w;++P)v[I]=v[U],I+=u,U+=u;C-=y}for(I=C,U=0,P=0;P<w;++P)v[I]=N[U++],I+=u}p(N)}}},i={"uint32,1,0":function(c,p,f){return function x(v,g,y,h,m,w,u,S,_,E,L){var C,P,U,z,H,F,N,B,j,J,G,V,W,X,K,re,ee,ie,oe,ce,me,de,he,ve,Pe=(g-v+1)/6|0,xe=v+Pe,ke=g-Pe,Ae=v+g>>1,Te=Ae-Pe,Q=Ae+Pe,se=xe,fe=Te,ye=Ae,Me=Q,Ie=ke,Ce=v+1,Re=g-1,le=!0,ge=0,_e=0,Fe=0,Ve=S,He=p(Ve),nt=p(Ve);J=m*se,G=m*fe,ve=h;e:for(j=0;j<S;++j){if((Fe=y[F=J+ve]-y[N=G+ve])>0){P=se,se=fe,fe=P;break e}if(Fe<0)break e;ve+=E}J=m*Me,G=m*Ie,ve=h;e:for(j=0;j<S;++j){if((Fe=y[F=J+ve]-y[N=G+ve])>0){P=Me,Me=Ie,Ie=P;break e}if(Fe<0)break e;ve+=E}J=m*se,G=m*ye,ve=h;e:for(j=0;j<S;++j){if((Fe=y[F=J+ve]-y[N=G+ve])>0){P=se,se=ye,ye=P;break e}if(Fe<0)break e;ve+=E}J=m*fe,G=m*ye,ve=h;e:for(j=0;j<S;++j){if((Fe=y[F=J+ve]-y[N=G+ve])>0){P=fe,fe=ye,ye=P;break e}if(Fe<0)break e;ve+=E}J=m*se,G=m*Me,ve=h;e:for(j=0;j<S;++j){if((Fe=y[F=J+ve]-y[N=G+ve])>0){P=se,se=Me,Me=P;break e}if(Fe<0)break e;ve+=E}J=m*ye,G=m*Me,ve=h;e:for(j=0;j<S;++j){if((Fe=y[F=J+ve]-y[N=G+ve])>0){P=ye,ye=Me,Me=P;break e}if(Fe<0)break e;ve+=E}J=m*fe,G=m*Ie,ve=h;e:for(j=0;j<S;++j){if((Fe=y[F=J+ve]-y[N=G+ve])>0){P=fe,fe=Ie,Ie=P;break e}if(Fe<0)break e;ve+=E}J=m*fe,G=m*ye,ve=h;e:for(j=0;j<S;++j){if((Fe=y[F=J+ve]-y[N=G+ve])>0){P=fe,fe=ye,ye=P;break e}if(Fe<0)break e;ve+=E}J=m*Me,G=m*Ie,ve=h;e:for(j=0;j<S;++j){if((Fe=y[F=J+ve]-y[N=G+ve])>0){P=Me,Me=Ie,Ie=P;break e}if(Fe<0)break e;ve+=E}for(J=m*se,G=m*fe,V=m*ye,W=m*Me,X=m*Ie,K=m*xe,re=m*Ae,ee=m*ke,he=0,ve=h,j=0;j<S;++j)F=J+ve,B=V+ve,ie=W+ve,oe=X+ve,ce=K+ve,me=re+ve,de=ee+ve,He[he]=y[N=G+ve],nt[he]=y[ie],le=le&&He[he]===nt[he],U=y[B],z=y[oe],y[ce]=y[F],y[me]=U,y[de]=z,++he,ve+=_;for(J=m*Te,G=m*v,ve=h,j=0;j<S;++j)y[F=J+ve]=y[N=G+ve],ve+=_;for(J=m*Q,G=m*g,ve=h,j=0;j<S;++j)y[F=J+ve]=y[N=G+ve],ve+=_;if(le)for(H=Ce;H<=Re;++H){for(F=h+H*m,he=0,j=0;j<S&&0==(Fe=y[F]-He[he]);++j)he+=L,F+=E;if(0!==Fe)if(Fe<0){if(H!==Ce)for(J=m*H,G=m*Ce,ve=h,j=0;j<S;++j)C=y[F=J+ve],y[F]=y[N=G+ve],y[N]=C,ve+=_;++Ce}else for(;;){for(F=h+Re*m,he=0,j=0;j<S&&0==(Fe=y[F]-He[he]);++j)he+=L,F+=E;if(!(Fe>0)){if(Fe<0){for(J=m*H,G=m*Ce,V=m*Re,ve=h,j=0;j<S;++j)B=V+ve,C=y[F=J+ve],y[F]=y[N=G+ve],y[N]=y[B],y[B]=C,ve+=_;++Ce,--Re;break}for(J=m*H,G=m*Re,ve=h,j=0;j<S;++j)C=y[F=J+ve],y[F]=y[N=G+ve],y[N]=C,ve+=_;--Re;break}Re--}}else for(H=Ce;H<=Re;++H){for(F=h+H*m,he=0,j=0;j<S&&0==(ge=y[F]-He[he]);++j)he+=L,F+=E;if(ge<0){if(H!==Ce)for(J=m*H,G=m*Ce,ve=h,j=0;j<S;++j)C=y[F=J+ve],y[F]=y[N=G+ve],y[N]=C,ve+=_;++Ce}else{for(F=h+H*m,he=0,j=0;j<S&&0==(_e=y[F]-nt[he]);++j)he+=L,F+=E;if(_e>0)for(;;){for(F=h+Re*m,he=0,j=0;j<S&&0==(Fe=y[F]-nt[he]);++j)he+=L,F+=E;if(!(Fe>0)){for(F=h+Re*m,he=0,j=0;j<S&&0==(Fe=y[F]-He[he]);++j)he+=L,F+=E;if(Fe<0){for(J=m*H,G=m*Ce,V=m*Re,ve=h,j=0;j<S;++j)B=V+ve,C=y[F=J+ve],y[F]=y[N=G+ve],y[N]=y[B],y[B]=C,ve+=_;++Ce,--Re}else{for(J=m*H,G=m*Re,ve=h,j=0;j<S;++j)C=y[F=J+ve],y[F]=y[N=G+ve],y[N]=C,ve+=_;--Re}break}if(--Re<H)break}}}for(J=m*v,G=m*(Ce-1),he=0,ve=h,j=0;j<S;++j)y[F=J+ve]=y[N=G+ve],y[N]=He[he],++he,ve+=_;for(J=m*g,G=m*(Re+1),he=0,ve=h,j=0;j<S;++j)y[F=J+ve]=y[N=G+ve],y[N]=nt[he],++he,ve+=_;if(Ce-2-v<=32?c(v,Ce-2,y,h,m,w,u,S,_,E,L):x(v,Ce-2,y,h,m,w,u,S,_,E,L),g-(Re+2)<=32?c(Re+2,g,y,h,m,w,u,S,_,E,L):x(Re+2,g,y,h,m,w,u,S,_,E,L),le)return f(He),void f(nt);if(Ce<xe&&Re>ke){e:for(;;){for(F=h+Ce*m,he=0,ve=h,j=0;j<S;++j){if(y[F]!==He[he])break e;++he,F+=_}++Ce}e:for(;;){for(F=h+Re*m,he=0,ve=h,j=0;j<S;++j){if(y[F]!==nt[he])break e;++he,F+=_}--Re}for(H=Ce;H<=Re;++H){for(F=h+H*m,he=0,j=0;j<S&&0==(ge=y[F]-He[he]);++j)he+=L,F+=E;if(0===ge){if(H!==Ce)for(J=m*H,G=m*Ce,ve=h,j=0;j<S;++j)C=y[F=J+ve],y[F]=y[N=G+ve],y[N]=C,ve+=_;++Ce}else{for(F=h+H*m,he=0,j=0;j<S&&0==(_e=y[F]-nt[he]);++j)he+=L,F+=E;if(0===_e)for(;;){for(F=h+Re*m,he=0,j=0;j<S&&0==(Fe=y[F]-nt[he]);++j)he+=L,F+=E;if(0!==Fe){for(F=h+Re*m,he=0,j=0;j<S&&0==(Fe=y[F]-He[he]);++j)he+=L,F+=E;if(Fe<0){for(J=m*H,G=m*Ce,V=m*Re,ve=h,j=0;j<S;++j)B=V+ve,C=y[F=J+ve],y[F]=y[N=G+ve],y[N]=y[B],y[B]=C,ve+=_;++Ce,--Re}else{for(J=m*H,G=m*Re,ve=h,j=0;j<S;++j)C=y[F=J+ve],y[F]=y[N=G+ve],y[N]=C,ve+=_;--Re}break}if(--Re<H)break}}}}f(He),f(nt),Re-Ce<=32?c(Ce,Re,y,h,m,w,u,S,_,E,L):x(Ce,Re,y,h,m,w,u,S,_,E,L)}}},a={"uint32,1,0":function(c,p){return function(f){var x=f.data,v=0|f.offset,g=f.shape,y=f.stride,h=0|y[0],m=0|g[0],w=0|y[1],u=0|g[1],S=w,_=w;m<=32?c(0,m-1,x,v,h,w,m,u,S,_,1):p(0,m-1,x,v,h,w,m,u,S,_,1)}}};d.exports=function(c,p){var y,h,m,w,u,f=[p,c].join(","),x=a[f],v=(y=c,m=r(h=p),w=[h,y].join(","),u=n[w],m?u(m[0],m[1]):u()),g=function(y,h,m){var w=r(h),u=[h,y].join(","),S=i[u];return y.length>1&&w?S(m,w[0],w[1]):S(m)}(c,p,v);return x(v,g)}},8729:function(d,s,t){"use strict";var o=t(8139),r={};d.exports=function(n){var i=n.order,a=n.dtype,c=[i,a].join(":"),p=r[c];return p||(r[c]=p=o(i,a)),p(n),n}},5050:function(d,s,t){var o=t(4780),r=typeof Float64Array<"u";function n(f,x){return f[0]-x[0]}function i(){var f,x=this.stride,v=new Array(x.length);for(f=0;f<v.length;++f)v[f]=[Math.abs(x[f]),f];v.sort(n);var g=new Array(v.length);for(f=0;f<g.length;++f)g[f]=v[f][1];return g}var a={T:function(f){function x(g){this.data=g}var v=x.prototype;return v.dtype=f,v.index=function(){return-1},v.size=0,v.dimension=-1,v.shape=v.stride=v.order=[],v.lo=v.hi=v.transpose=v.step=function(){return new x(this.data)},v.get=v.set=function(){},v.pick=function(){return null},function(g){return new x(g)}},0:function(f,x){function v(y,h){this.data=y,this.offset=h}var g=v.prototype;return g.dtype=f,g.index=function(){return this.offset},g.dimension=0,g.size=1,g.shape=g.stride=g.order=[],g.lo=g.hi=g.transpose=g.step=function(){return new v(this.data,this.offset)},g.pick=function(){return x(this.data)},g.valueOf=g.get=function(){return"generic"===f?this.data.get(this.offset):this.data[this.offset]},g.set=function(y){return"generic"===f?this.data.set(this.offset,y):this.data[this.offset]=y},function(y,h,m,w){return new v(y,w)}},1:function(f,x,v){function g(h,m,w,u){this.data=h,this.shape=[m],this.stride=[w],this.offset=0|u}var y=g.prototype;return y.dtype=f,y.dimension=1,Object.defineProperty(y,"size",{get:function(){return this.shape[0]}}),y.order=[0],y.set=function(h,m){return"generic"===f?this.data.set(this.offset+this.stride[0]*h,m):this.data[this.offset+this.stride[0]*h]=m},y.get=function(h){return"generic"===f?this.data.get(this.offset+this.stride[0]*h):this.data[this.offset+this.stride[0]*h]},y.index=function(h){return this.offset+this.stride[0]*h},y.hi=function(h){return new g(this.data,"number"!=typeof h||h<0?this.shape[0]:0|h,this.stride[0],this.offset)},y.lo=function(h){var m=this.offset,w=0,u=this.shape[0],S=this.stride[0];return"number"==typeof h&&h>=0&&(m+=S*(w=0|h),u-=w),new g(this.data,u,S,m)},y.step=function(h){var m=this.shape[0],w=this.stride[0],u=this.offset,S=0,_=Math.ceil;return"number"==typeof h&&((S=0|h)<0?(u+=w*(m-1),m=_(-m/S)):m=_(m/S),w*=S),new g(this.data,m,w,u)},y.transpose=function(h){return new g(this.data,this.shape[h=void 0===h?0:0|h],this.stride[h],this.offset)},y.pick=function(h){var m=[],w=[],u=this.offset;return"number"==typeof h&&h>=0?u=u+this.stride[0]*h|0:(m.push(this.shape[0]),w.push(this.stride[0])),(0,x[m.length+1])(this.data,m,w,u)},function(h,m,w,u){return new g(h,m[0],w[0],u)}},2:function(f,x,v){function g(h,m,w,u,S,_){this.data=h,this.shape=[m,w],this.stride=[u,S],this.offset=0|_}var y=g.prototype;return y.dtype=f,y.dimension=2,Object.defineProperty(y,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(y,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),y.set=function(h,m,w){return"generic"===f?this.data.set(this.offset+this.stride[0]*h+this.stride[1]*m,w):this.data[this.offset+this.stride[0]*h+this.stride[1]*m]=w},y.get=function(h,m){return"generic"===f?this.data.get(this.offset+this.stride[0]*h+this.stride[1]*m):this.data[this.offset+this.stride[0]*h+this.stride[1]*m]},y.index=function(h,m){return this.offset+this.stride[0]*h+this.stride[1]*m},y.hi=function(h,m){return new g(this.data,"number"!=typeof h||h<0?this.shape[0]:0|h,"number"!=typeof m||m<0?this.shape[1]:0|m,this.stride[0],this.stride[1],this.offset)},y.lo=function(h,m){var w=this.offset,u=0,S=this.shape[0],_=this.shape[1],E=this.stride[0],L=this.stride[1];return"number"==typeof h&&h>=0&&(w+=E*(u=0|h),S-=u),"number"==typeof m&&m>=0&&(w+=L*(u=0|m),_-=u),new g(this.data,S,_,E,L,w)},y.step=function(h,m){var w=this.shape[0],u=this.shape[1],S=this.stride[0],_=this.stride[1],E=this.offset,L=0,C=Math.ceil;return"number"==typeof h&&((L=0|h)<0?(E+=S*(w-1),w=C(-w/L)):w=C(w/L),S*=L),"number"==typeof m&&((L=0|m)<0?(E+=_*(u-1),u=C(-u/L)):u=C(u/L),_*=L),new g(this.data,w,u,S,_,E)},y.transpose=function(h,m){var w=this.shape,u=this.stride;return new g(this.data,w[h=void 0===h?0:0|h],w[m=void 0===m?1:0|m],u[h],u[m],this.offset)},y.pick=function(h,m){var w=[],u=[],S=this.offset;return"number"==typeof h&&h>=0?S=S+this.stride[0]*h|0:(w.push(this.shape[0]),u.push(this.stride[0])),"number"==typeof m&&m>=0?S=S+this.stride[1]*m|0:(w.push(this.shape[1]),u.push(this.stride[1])),(0,x[w.length+1])(this.data,w,u,S)},function(h,m,w,u){return new g(h,m[0],m[1],w[0],w[1],u)}},3:function(f,x,v){function g(h,m,w,u,S,_,E,L){this.data=h,this.shape=[m,w,u],this.stride=[S,_,E],this.offset=0|L}var y=g.prototype;return y.dtype=f,y.dimension=3,Object.defineProperty(y,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(y,"order",{get:function(){var h=Math.abs(this.stride[0]),m=Math.abs(this.stride[1]),w=Math.abs(this.stride[2]);return h>m?m>w?[2,1,0]:h>w?[1,2,0]:[1,0,2]:h>w?[2,0,1]:w>m?[0,1,2]:[0,2,1]}}),y.set=function(h,m,w,u){return"generic"===f?this.data.set(this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w,u):this.data[this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w]=u},y.get=function(h,m,w){return"generic"===f?this.data.get(this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w):this.data[this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w]},y.index=function(h,m,w){return this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w},y.hi=function(h,m,w){return new g(this.data,"number"!=typeof h||h<0?this.shape[0]:0|h,"number"!=typeof m||m<0?this.shape[1]:0|m,"number"!=typeof w||w<0?this.shape[2]:0|w,this.stride[0],this.stride[1],this.stride[2],this.offset)},y.lo=function(h,m,w){var u=this.offset,S=0,_=this.shape[0],E=this.shape[1],L=this.shape[2],C=this.stride[0],P=this.stride[1],I=this.stride[2];return"number"==typeof h&&h>=0&&(u+=C*(S=0|h),_-=S),"number"==typeof m&&m>=0&&(u+=P*(S=0|m),E-=S),"number"==typeof w&&w>=0&&(u+=I*(S=0|w),L-=S),new g(this.data,_,E,L,C,P,I,u)},y.step=function(h,m,w){var u=this.shape[0],S=this.shape[1],_=this.shape[2],E=this.stride[0],L=this.stride[1],C=this.stride[2],P=this.offset,I=0,U=Math.ceil;return"number"==typeof h&&((I=0|h)<0?(P+=E*(u-1),u=U(-u/I)):u=U(u/I),E*=I),"number"==typeof m&&((I=0|m)<0?(P+=L*(S-1),S=U(-S/I)):S=U(S/I),L*=I),"number"==typeof w&&((I=0|w)<0?(P+=C*(_-1),_=U(-_/I)):_=U(_/I),C*=I),new g(this.data,u,S,_,E,L,C,P)},y.transpose=function(h,m,w){var u=this.shape,S=this.stride;return new g(this.data,u[h=void 0===h?0:0|h],u[m=void 0===m?1:0|m],u[w=void 0===w?2:0|w],S[h],S[m],S[w],this.offset)},y.pick=function(h,m,w){var u=[],S=[],_=this.offset;return"number"==typeof h&&h>=0?_=_+this.stride[0]*h|0:(u.push(this.shape[0]),S.push(this.stride[0])),"number"==typeof m&&m>=0?_=_+this.stride[1]*m|0:(u.push(this.shape[1]),S.push(this.stride[1])),"number"==typeof w&&w>=0?_=_+this.stride[2]*w|0:(u.push(this.shape[2]),S.push(this.stride[2])),(0,x[u.length+1])(this.data,u,S,_)},function(h,m,w,u){return new g(h,m[0],m[1],m[2],w[0],w[1],w[2],u)}},4:function(f,x,v){function g(h,m,w,u,S,_,E,L,C,P){this.data=h,this.shape=[m,w,u,S],this.stride=[_,E,L,C],this.offset=0|P}var y=g.prototype;return y.dtype=f,y.dimension=4,Object.defineProperty(y,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(y,"order",{get:v}),y.set=function(h,m,w,u,S){return"generic"===f?this.data.set(this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w+this.stride[3]*u,S):this.data[this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w+this.stride[3]*u]=S},y.get=function(h,m,w,u){return"generic"===f?this.data.get(this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w+this.stride[3]*u):this.data[this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w+this.stride[3]*u]},y.index=function(h,m,w,u){return this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w+this.stride[3]*u},y.hi=function(h,m,w,u){return new g(this.data,"number"!=typeof h||h<0?this.shape[0]:0|h,"number"!=typeof m||m<0?this.shape[1]:0|m,"number"!=typeof w||w<0?this.shape[2]:0|w,"number"!=typeof u||u<0?this.shape[3]:0|u,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},y.lo=function(h,m,w,u){var S=this.offset,_=0,E=this.shape[0],L=this.shape[1],C=this.shape[2],P=this.shape[3],I=this.stride[0],U=this.stride[1],z=this.stride[2],H=this.stride[3];return"number"==typeof h&&h>=0&&(S+=I*(_=0|h),E-=_),"number"==typeof m&&m>=0&&(S+=U*(_=0|m),L-=_),"number"==typeof w&&w>=0&&(S+=z*(_=0|w),C-=_),"number"==typeof u&&u>=0&&(S+=H*(_=0|u),P-=_),new g(this.data,E,L,C,P,I,U,z,H,S)},y.step=function(h,m,w,u){var S=this.shape[0],_=this.shape[1],E=this.shape[2],L=this.shape[3],C=this.stride[0],P=this.stride[1],I=this.stride[2],U=this.stride[3],z=this.offset,H=0,F=Math.ceil;return"number"==typeof h&&((H=0|h)<0?(z+=C*(S-1),S=F(-S/H)):S=F(S/H),C*=H),"number"==typeof m&&((H=0|m)<0?(z+=P*(_-1),_=F(-_/H)):_=F(_/H),P*=H),"number"==typeof w&&((H=0|w)<0?(z+=I*(E-1),E=F(-E/H)):E=F(E/H),I*=H),"number"==typeof u&&((H=0|u)<0?(z+=U*(L-1),L=F(-L/H)):L=F(L/H),U*=H),new g(this.data,S,_,E,L,C,P,I,U,z)},y.transpose=function(h,m,w,u){var S=this.shape,_=this.stride;return new g(this.data,S[h=void 0===h?0:0|h],S[m=void 0===m?1:0|m],S[w=void 0===w?2:0|w],S[u=void 0===u?3:0|u],_[h],_[m],_[w],_[u],this.offset)},y.pick=function(h,m,w,u){var S=[],_=[],E=this.offset;return"number"==typeof h&&h>=0?E=E+this.stride[0]*h|0:(S.push(this.shape[0]),_.push(this.stride[0])),"number"==typeof m&&m>=0?E=E+this.stride[1]*m|0:(S.push(this.shape[1]),_.push(this.stride[1])),"number"==typeof w&&w>=0?E=E+this.stride[2]*w|0:(S.push(this.shape[2]),_.push(this.stride[2])),"number"==typeof u&&u>=0?E=E+this.stride[3]*u|0:(S.push(this.shape[3]),_.push(this.stride[3])),(0,x[S.length+1])(this.data,S,_,E)},function(h,m,w,u){return new g(h,m[0],m[1],m[2],m[3],w[0],w[1],w[2],w[3],u)}},5:function(f,x,v){function g(h,m,w,u,S,_,E,L,C,P,I,U){this.data=h,this.shape=[m,w,u,S,_],this.stride=[E,L,C,P,I],this.offset=0|U}var y=g.prototype;return y.dtype=f,y.dimension=5,Object.defineProperty(y,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(y,"order",{get:v}),y.set=function(h,m,w,u,S,_){return"generic"===f?this.data.set(this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w+this.stride[3]*u+this.stride[4]*S,_):this.data[this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w+this.stride[3]*u+this.stride[4]*S]=_},y.get=function(h,m,w,u,S){return"generic"===f?this.data.get(this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w+this.stride[3]*u+this.stride[4]*S):this.data[this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w+this.stride[3]*u+this.stride[4]*S]},y.index=function(h,m,w,u,S){return this.offset+this.stride[0]*h+this.stride[1]*m+this.stride[2]*w+this.stride[3]*u+this.stride[4]*S},y.hi=function(h,m,w,u,S){return new g(this.data,"number"!=typeof h||h<0?this.shape[0]:0|h,"number"!=typeof m||m<0?this.shape[1]:0|m,"number"!=typeof w||w<0?this.shape[2]:0|w,"number"!=typeof u||u<0?this.shape[3]:0|u,"number"!=typeof S||S<0?this.shape[4]:0|S,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},y.lo=function(h,m,w,u,S){var _=this.offset,E=0,L=this.shape[0],C=this.shape[1],P=this.shape[2],I=this.shape[3],U=this.shape[4],z=this.stride[0],H=this.stride[1],F=this.stride[2],N=this.stride[3],B=this.stride[4];return"number"==typeof h&&h>=0&&(_+=z*(E=0|h),L-=E),"number"==typeof m&&m>=0&&(_+=H*(E=0|m),C-=E),"number"==typeof w&&w>=0&&(_+=F*(E=0|w),P-=E),"number"==typeof u&&u>=0&&(_+=N*(E=0|u),I-=E),"number"==typeof S&&S>=0&&(_+=B*(E=0|S),U-=E),new g(this.data,L,C,P,I,U,z,H,F,N,B,_)},y.step=function(h,m,w,u,S){var _=this.shape[0],E=this.shape[1],L=this.shape[2],C=this.shape[3],P=this.shape[4],I=this.stride[0],U=this.stride[1],z=this.stride[2],H=this.stride[3],F=this.stride[4],N=this.offset,B=0,j=Math.ceil;return"number"==typeof h&&((B=0|h)<0?(N+=I*(_-1),_=j(-_/B)):_=j(_/B),I*=B),"number"==typeof m&&((B=0|m)<0?(N+=U*(E-1),E=j(-E/B)):E=j(E/B),U*=B),"number"==typeof w&&((B=0|w)<0?(N+=z*(L-1),L=j(-L/B)):L=j(L/B),z*=B),"number"==typeof u&&((B=0|u)<0?(N+=H*(C-1),C=j(-C/B)):C=j(C/B),H*=B),"number"==typeof S&&((B=0|S)<0?(N+=F*(P-1),P=j(-P/B)):P=j(P/B),F*=B),new g(this.data,_,E,L,C,P,I,U,z,H,F,N)},y.transpose=function(h,m,w,u,S){var _=this.shape,E=this.stride;return new g(this.data,_[h=void 0===h?0:0|h],_[m=void 0===m?1:0|m],_[w=void 0===w?2:0|w],_[u=void 0===u?3:0|u],_[S=void 0===S?4:0|S],E[h],E[m],E[w],E[u],E[S],this.offset)},y.pick=function(h,m,w,u,S){var _=[],E=[],L=this.offset;return"number"==typeof h&&h>=0?L=L+this.stride[0]*h|0:(_.push(this.shape[0]),E.push(this.stride[0])),"number"==typeof m&&m>=0?L=L+this.stride[1]*m|0:(_.push(this.shape[1]),E.push(this.stride[1])),"number"==typeof w&&w>=0?L=L+this.stride[2]*w|0:(_.push(this.shape[2]),E.push(this.stride[2])),"number"==typeof u&&u>=0?L=L+this.stride[3]*u|0:(_.push(this.shape[3]),E.push(this.stride[3])),"number"==typeof S&&S>=0?L=L+this.stride[4]*S|0:(_.push(this.shape[4]),E.push(this.stride[4])),(0,x[_.length+1])(this.data,_,E,L)},function(h,m,w,u){return new g(h,m[0],m[1],m[2],m[3],m[4],w[0],w[1],w[2],w[3],w[4],u)}}};function c(f,x){var v=-1===x?"T":String(x),g=a[v];return-1===x?g(f):0===x?g(f,p[f][0]):g(f,p[f],i)}var p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};d.exports=function(f,x,v,g){if(void 0===f)return(0,p.array[0])([]);"number"==typeof f&&(f=[f]),void 0===x&&(x=[f.length]);var y=x.length;if(void 0===v){v=new Array(y);for(var h=y-1,m=1;h>=0;--h)v[h]=m,m*=x[h]}if(void 0===g)for(g=0,h=0;h<y;++h)v[h]<0&&(g-=(x[h]-1)*v[h]);for(var w=function(S){if(o(S))return"buffer";if(r)switch(Object.prototype.toString.call(S)){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(S)?"array":"generic"}(f),u=p[w];u.length<=y+1;)u.push(c(w,u.length-1));return(0,u[y+1])(f,x,v,g)}},8551:function(d,s,t){"use strict";var o=t(8362),r=Math.pow(2,-1074),n=-1>>>0;d.exports=function(i,a){if(isNaN(i)||isNaN(a))return NaN;if(i===a)return i;if(0===i)return a<0?-r:r;var c=o.hi(i),p=o.lo(i);return a>i==i>0?p===n?(c+=1,p=0):p+=1:0===p?(p=n,c-=1):p-=1,o.pack(p,c)}},115:function(d,s){s.vertexNormals=function(t,o,r){for(var n=o.length,i=new Array(n),a=void 0===r?1e-6:r,c=0;c<n;++c)i[c]=[0,0,0];for(c=0;c<t.length;++c)for(var p=t[c],x=p[p.length-1],v=p[0],g=0;g<p.length;++g){for(var y=o[x],h=o[x=v],m=o[v=p[(g+1)%p.length]],w=new Array(3),u=0,S=new Array(3),_=0,E=0;E<3;++E)w[E]=y[E]-h[E],u+=w[E]*w[E],S[E]=m[E]-h[E],_+=S[E]*S[E];if(u*_>a){var L=i[x],C=1/Math.sqrt(u*_);for(E=0;E<3;++E){var P=(E+1)%3,I=(E+2)%3;L[E]+=C*(S[P]*w[I]-S[I]*w[P])}}}for(c=0;c<n;++c){L=i[c];var U=0;for(E=0;E<3;++E)U+=L[E]*L[E];if(U>a)for(C=1/Math.sqrt(U),E=0;E<3;++E)L[E]*=C;else for(E=0;E<3;++E)L[E]=0}return i},s.faceNormals=function(t,o,r){for(var n=t.length,i=new Array(n),a=void 0===r?1e-6:r,c=0;c<n;++c){for(var p=t[c],f=new Array(3),x=0;x<3;++x)f[x]=o[p[x]];var v=new Array(3),g=new Array(3);for(x=0;x<3;++x)v[x]=f[1][x]-f[0][x],g[x]=f[2][x]-f[0][x];var y=new Array(3),h=0;for(x=0;x<3;++x){var m=(x+1)%3,w=(x+2)%3;y[x]=v[m]*g[w]-v[w]*g[m],h+=y[x]*y[x]}for(h=h>a?1/Math.sqrt(h):0,x=0;x<3;++x)y[x]*=h;i[c]=y}return i}},567:function(d){"use strict";d.exports=function(s,t,o,r,n,i,a,c,p,f){var x=t+i+f;if(v>0){var v=Math.sqrt(x+1);s[0]=.5*(a-p)/v,s[1]=.5*(c-r)/v,s[2]=.5*(o-i)/v,s[3]=.5*v}else{var g=Math.max(t,i,f);v=Math.sqrt(2*g-x+1),t>=g?(s[0]=.5*v,s[1]=.5*(n+o)/v,s[2]=.5*(c+r)/v,s[3]=.5*(a-p)/v):i>=g?(s[0]=.5*(o+n)/v,s[1]=.5*v,s[2]=.5*(p+a)/v,s[3]=.5*(c-r)/v):(s[0]=.5*(r+c)/v,s[1]=.5*(a+p)/v,s[2]=.5*v,s[3]=.5*(o-n)/v)}return s}},7774:function(d,s,t){"use strict";d.exports=function(g){var y=(g=g||{}).center||[0,0,0],h=g.rotation||[0,0,0,1],m=g.radius||1;y=[].slice.call(y,0,3),f(h=[].slice.call(h,0,4),h);var w=new x(h,y,Math.log(m));return w.setDistanceLimits(g.zoomMin,g.zoomMax),("eye"in g||"up"in g)&&w.lookAt(0,g.eye,g.center,g.up),w};var o=t(8444),r=t(3012),n=t(5950),i=t(7437),a=t(567);function c(g,y,h){return Math.sqrt(Math.pow(g,2)+Math.pow(y,2)+Math.pow(h,2))}function p(g,y,h,m){return Math.sqrt(Math.pow(g,2)+Math.pow(y,2)+Math.pow(h,2)+Math.pow(m,2))}function f(g,y){var h=y[0],m=y[1],w=y[2],u=y[3],S=p(h,m,w,u);S>1e-6?(g[0]=h/S,g[1]=m/S,g[2]=w/S,g[3]=u/S):(g[0]=g[1]=g[2]=0,g[3]=1)}function x(g,y,h){this.radius=o([h]),this.center=o(y),this.rotation=o(g),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 v=x.prototype;v.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},v.recalcMatrix=function(g){this.radius.curve(g),this.center.curve(g),this.rotation.curve(g);var y=this.computedRotation;f(y,y);var h=this.computedMatrix;n(h,y);var m=this.computedCenter,w=this.computedEye,u=this.computedUp,S=Math.exp(this.computedRadius[0]);w[0]=m[0]+S*h[2],w[1]=m[1]+S*h[6],w[2]=m[2]+S*h[10],u[0]=h[1],u[1]=h[5],u[2]=h[9];for(var _=0;_<3;++_){for(var E=0,L=0;L<3;++L)E+=h[_+4*L]*w[L];h[12+_]=-E}},v.getMatrix=function(g,y){this.recalcMatrix(g);var h=this.computedMatrix;if(y){for(var m=0;m<16;++m)y[m]=h[m];return y}return h},v.idle=function(g){this.center.idle(g),this.radius.idle(g),this.rotation.idle(g)},v.flush=function(g){this.center.flush(g),this.radius.flush(g),this.rotation.flush(g)},v.pan=function(g,y,h,m){y=y||0,h=h||0,m=m||0,this.recalcMatrix(g);var w=this.computedMatrix,u=w[1],S=w[5],_=w[9],E=c(u,S,_),L=w[0],C=w[4],P=w[8],I=L*(u/=E)+C*(S/=E)+P*(_/=E),U=c(L-=u*I,C-=S*I,P-=_*I),z=w[2],H=w[6],F=w[10],N=z*u+H*S+F*_,B=z*(L/=U)+H*(C/=U)+F*(P/=U),j=c(z-=N*u+B*L,H-=N*S+B*C,F-=N*_+B*P);z/=j,H/=j,F/=j,this.center.move(g,L*y+u*h,C*y+S*h,P*y+_*h);var W=Math.exp(this.computedRadius[0]);W=Math.max(1e-4,W+m),this.radius.set(g,Math.log(W))},v.rotate=function(g,y,h,m){this.recalcMatrix(g);var w=this.computedMatrix,P=w[2],I=w[6],U=w[10],z=(y=y||0)*w[0]+(h=h||0)*w[1],H=y*w[4]+h*w[5],F=y*w[8]+h*w[9],N=-(I*F-U*H),B=-(U*z-P*F),j=-(P*H-I*z),J=Math.sqrt(Math.max(0,1-Math.pow(N,2)-Math.pow(B,2)-Math.pow(j,2))),G=p(N,B,j,J);G>1e-6?(N/=G,B/=G,j/=G,J/=G):(N=B=j=0,J=1);var V=this.computedRotation,W=V[0],X=V[1],K=V[2],re=V[3],ee=W*J+re*N+X*j-K*B,ie=X*J+re*B+K*N-W*j,oe=K*J+re*j+W*B-X*N,ce=re*J-W*N-X*B-K*j;if(m){N=P,B=I,j=U;var me=Math.sin(m)/c(N,B,j);N*=me,B*=me,j*=me,ce=ce*(J=Math.cos(y))-(ee=ee*J+ce*N+ie*j-oe*B)*N-(ie=ie*J+ce*B+oe*N-ee*j)*B-(oe=oe*J+ce*j+ee*B-ie*N)*j}var de=p(ee,ie,oe,ce);de>1e-6?(ee/=de,ie/=de,oe/=de,ce/=de):(ee=ie=oe=0,ce=1),this.rotation.set(g,ee,ie,oe,ce)},v.lookAt=function(g,y,h,m){this.recalcMatrix(g);var w=this.computedMatrix;r(w,y=y||this.computedEye,h=h||this.computedCenter,m=m||this.computedUp);var u=this.computedRotation;a(u,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),f(u,u),this.rotation.set(g,u[0],u[1],u[2],u[3]);for(var S=0,_=0;_<3;++_)S+=Math.pow(h[_]-y[_],2);this.radius.set(g,.5*Math.log(Math.max(S,1e-6))),this.center.set(g,h[0],h[1],h[2])},v.translate=function(g,y,h,m){this.center.move(g,y||0,h||0,m||0)},v.setMatrix=function(g,y){var h=this.computedRotation;a(h,y[0],y[1],y[2],y[4],y[5],y[6],y[8],y[9],y[10]),f(h,h),this.rotation.set(g,h[0],h[1],h[2],h[3]);var m=this.computedMatrix;i(m,y);var w=m[15];if(Math.abs(w)>1e-6){var u=m[12]/w,S=m[13]/w,_=m[14]/w;this.recalcMatrix(g);var E=Math.exp(this.computedRadius[0]);this.center.set(g,u-m[2]*E,S-m[6]*E,_-m[10]*E),this.radius.idle(g)}else this.center.idle(g),this.radius.idle(g)},v.setDistance=function(g,y){y>0&&this.radius.set(g,Math.log(y))},v.setDistanceLimits=function(g,y){g=g>0?Math.log(g):-1/0,y=y>0?Math.log(y):1/0,y=Math.max(y,g),this.radius.bounds[0][0]=g,this.radius.bounds[1][0]=y},v.getDistanceLimits=function(g){var y=this.radius.bounds;return g?(g[0]=Math.exp(y[0][0]),g[1]=Math.exp(y[1][0]),g):[Math.exp(y[0][0]),Math.exp(y[1][0])]},v.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]}},v.fromJSON=function(g){var y=this.lastT(),h=g.center;h&&this.center.set(y,h[0],h[1],h[2]);var m=g.rotation;m&&this.rotation.set(y,m[0],m[1],m[2],m[3]);var w=g.distance;w&&w>0&&this.radius.set(y,Math.log(w)),this.setDistanceLimits(g.zoomMin,g.zoomMax)}},4930:function(d,s,t){"use strict";var o=t(6184);d.exports=function(r,n,i){return o(i=void 0!==i?i+"":" ",n)+r}},4405:function(d){d.exports=function(s,t){t||(t=[0,""]),s=String(s);var o=parseFloat(s,10);return t[0]=o,t[1]=s.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},4166:function(d,s,t){"use strict";d.exports=function(r,n){for(var i=0|n.length,a=r.length,c=[new Array(i),new Array(i)],p=0;p<i;++p)c[0][p]=[],c[1][p]=[];for(p=0;p<a;++p){var f=r[p];c[0][f[0]].push(f),c[1][f[1]].push(f)}var _,x=[];for(p=0;p<i;++p)c[0][p].length+c[1][p].length===0&&x.push([p]);function v(S,_){var E=c[_][S[_]];E.splice(E.indexOf(S),1)}function g(S,_,E){for(var L,C,P,I=0;I<2;++I)if(c[I][_].length>0){L=c[I][_][0],P=I;break}C=L[1^P];for(var U=0;U<2;++U)for(var z=c[U][_],H=0;H<z.length;++H){var F=z[H],N=F[1^U];o(n[S],n[_],n[C],n[N])>0&&(L=F,C=N,P=U)}return E||L&&v(L,P),C}function y(S,_){var E=c[_][S][0],L=[S];v(E,_);for(var C=E[1^_];;){for(;C!==S;)L.push(C),C=g(L[L.length-2],C,!1);if(c[0][S].length+c[1][S].length===0)break;var P=L[L.length-1],I=S,U=L[1],z=g(P,I,!0);if(o(n[P],n[I],n[U],n[z])<0)break;L.push(S),C=g(P,I)}return L}for(p=0;p<i;++p)for(var m=0;m<2;++m){for(var w=[];c[m][p].length>0;){var u=y(p,m);(_=u)[1]===_[_.length-1]?w.push.apply(w,u):(w.length>0&&x.push(w),w=u)}w.length>0&&x.push(w)}return x};var o=t(9398)},3959:function(d,s,t){"use strict";d.exports=function(r,n){for(var i=o(r,n.length),a=new Array(n.length),c=new Array(n.length),p=[],f=0;f<n.length;++f){var x=i[f].length;c[f]=x,a[f]=!0,x<=1&&p.push(f)}for(;p.length>0;){var v=p.pop();a[v]=!1;var g=i[v];for(f=0;f<g.length;++f){var y=g[f];0==--c[y]&&p.push(y)}}var h=new Array(n.length),m=[];for(f=0;f<n.length;++f)a[f]?(h[f]=v=m.length,m.push(n[f])):h[f]=-1;var w=[];for(f=0;f<r.length;++f){var u=r[f];a[u[0]]&&a[u[1]]&&w.push([h[u[0]],h[u[1]]])}return[w,m]};var o=t(8348)},8040:function(d,s,t){"use strict";d.exports=function(x,v){for(var g=p(x,v),y=(v=g[1]).length,h=o(x=g[0],v.length),m=0;m<y;++m)if(h[m].length%2==1)throw new Error("planar-graph-to-polyline: graph must be manifold");var w=r(x,v),u=(w=w.filter(function(Pe){for(var xe=Pe.length,ke=[0],Ae=0;Ae<xe;++Ae){var Te=v[Pe[Ae]],Q=v[Pe[(Ae+1)%xe]],se=i(-Te[0],Te[1]),fe=i(-Te[0],Q[1]),ye=i(Q[0],Te[1]),Me=i(Q[0],Q[1]);ke=a(ke,a(a(se,fe),a(ye,Me)))}return ke[ke.length-1]>0})).length,S=new Array(u),_=new Array(u);for(m=0;m<u;++m){S[m]=m;var E=new Array(u),L=w[m].map(function(Pe){return v[Pe]}),C=n([L]),P=0;e:for(var I=0;I<u;++I)if(E[I]=0,m!==I){for(var U=(he=w[I]).length,z=0;z<U;++z){var H=C(v[he[z]]);if(0!==H){H<0&&(E[I]=1,P+=1);continue e}}E[I]=1,P+=1}_[m]=[P,m,E]}for(_.sort(function(Pe,xe){return xe[0]-Pe[0]}),m=0;m<u;++m){var F=(E=_[m])[1],N=E[2];for(I=0;I<u;++I)N[I]&&(S[I]=F)}var B=function(Pe){for(var xe=new Array(Pe),ke=0;ke<Pe;++ke)xe[ke]=[];return xe}(u);for(m=0;m<u;++m)B[m].push(S[m]),B[S[m]].push(m);var j={},J=f(y,!1);for(m=0;m<u;++m)for(U=(he=w[m]).length,I=0;I<U;++I){var G=he[I],V=he[(I+1)%U],W=Math.min(G,V)+":"+Math.max(G,V);if(W in j){var X=j[W];B[X].push(m),B[m].push(X),J[G]=J[V]=!0}else j[W]=m}function K(Pe){for(var xe=Pe.length,ke=0;ke<xe;++ke)if(!J[Pe[ke]])return!1;return!0}var re=[],ee=f(u,-1);for(m=0;m<u;++m)S[m]!==m||K(w[m])?ee[m]=-1:(re.push(m),ee[m]=0);for(g=[];re.length>0;){var ie=re.pop(),oe=B[ie];c(oe,function(Pe,xe){return Pe-xe});var ce,me=oe.length,de=ee[ie];if(0===de){var he=w[ie];ce=[he]}for(m=0;m<me;++m){var ve=oe[m];ee[ve]>=0||(ee[ve]=1^de,re.push(ve),0===de&&(K(he=w[ve])||(he.reverse(),ce.push(he))))}0===de&&g.push(ce)}return g};var o=t(8348),r=t(4166),n=t(211),i=t(9660),a=t(9662),c=t(1215),p=t(3959);function f(x,v){for(var g=new Array(x),y=0;y<x;++y)g[y]=v;return g}},211:function(d,s,t){d.exports=function(f){for(var x=f.length,v=[],g=[],y=0;y<x;++y)for(var h=f[y],m=h.length,w=m-1,u=0;u<m;w=u++){var S=h[w],_=h[u];S[0]===_[0]?g.push([S,_]):v.push([S,_])}if(0===v.length)return 0===g.length?p:(E=c(g),function(P){return E(P[0],P[1])?0:1});var E,P,I,L=r(v),C=(P=L.slabs,I=L.coordinates,function(U){var z=i.le(I,U[0]);if(z<0)return 1;var H=P[z];if(!H){if(!(z>0&&I[z]===U[0]))return 1;H=P[z-1]}for(var F=1;H;){var N=H.key,B=o(U,N[0],N[1]);if(N[0][0]<N[1][0])if(B<0)H=H.left;else{if(!(B>0))return 0;F=-1,H=H.right}else if(B>0)H=H.left;else{if(!(B<0))return 0;F=1,H=H.right}}return F});return 0===g.length?C:function(P,I){return function(U){return P(U[0],U[1])?0:I(U)}}(c(g),C)};var o=t(417)[3],r=t(4385),n=t(9014),i=t(5070);function a(){return!0}function c(f){for(var x={},v=0;v<f.length;++v){var g=f[v],y=g[0][0],h=g[0][1],m=g[1][1],w=[Math.min(h,m),Math.max(h,m)];y in x?x[y].push(w):x[y]=[w]}var E,u={},S=Object.keys(x);for(v=0;v<S.length;++v)u[S[v]]=n(x[S[v]]);return E=u,function(L,C){var P=E[L];return!!P&&!!P.queryPoint(C,a)}}function p(f){return 1}},7309:function(d){"use strict";var s=new Float64Array(4),t=new Float64Array(4),o=new Float64Array(4);d.exports=function(r,n,i,a,c){s.length<a.length&&(s=new Float64Array(a.length),t=new Float64Array(a.length),o=new Float64Array(a.length));for(var p=0;p<a.length;++p)s[p]=r[p]-a[p],t[p]=n[p]-r[p],o[p]=i[p]-r[p];var f=0,x=0,v=0,g=0,y=0,h=0;for(p=0;p<a.length;++p){var m=t[p],w=o[p],u=s[p];f+=m*m,x+=m*w,v+=w*w,g+=u*m,y+=u*w,h+=u*u}var S,_,E,L,C,P=Math.abs(f*v-x*x),I=x*y-v*g,U=x*g-f*y;if(I+U<=P)if(I<0)U<0&&g<0?(U=0,-g>=f?(I=1,S=f+2*g+h):S=g*(I=-g/f)+h):(I=0,y>=0?(U=0,S=h):-y>=v?(U=1,S=v+2*y+h):S=y*(U=-y/v)+h);else if(U<0)U=0,g>=0?(I=0,S=h):-g>=f?(I=1,S=f+2*g+h):S=g*(I=-g/f)+h;else{var z=1/P;S=(I*=z)*(f*I+x*(U*=z)+2*g)+U*(x*I+v*U+2*y)+h}else I<0?(E=v+y)>(_=x+g)?(L=E-_)>=(C=f-2*x+v)?(I=1,U=0,S=f+2*g+h):S=(I=L/C)*(f*I+x*(U=1-I)+2*g)+U*(x*I+v*U+2*y)+h:(I=0,E<=0?(U=1,S=v+2*y+h):y>=0?(U=0,S=h):S=y*(U=-y/v)+h):U<0?(E=f+g)>(_=x+y)?(L=E-_)>=(C=f-2*x+v)?(U=1,I=0,S=v+2*y+h):S=(I=1-(U=L/C))*(f*I+x*U+2*g)+U*(x*I+v*U+2*y)+h:(U=0,E<=0?(I=1,S=f+2*g+h):g>=0?(I=0,S=h):S=g*(I=-g/f)+h):(L=v+y-x-g)<=0?(I=0,U=1,S=v+2*y+h):L>=(C=f-2*x+v)?(I=1,U=0,S=f+2*g+h):S=(I=L/C)*(f*I+x*(U=1-I)+2*g)+U*(x*I+v*U+2*y)+h;var H=1-I-U;for(p=0;p<a.length;++p)c[p]=H*r[p]+I*n[p]+U*i[p];return S<0?0:S}},1116:function(d,s,t){d.exports=t(6093)},7584:function(d,s,t){"use strict";var o=t(1539);d.exports=function(r,n){for(var i=r.length,a=new Array(i),c=0;c<i;++c)a[c]=o(r[c],n[c]);return a}},2826:function(d,s,t){"use strict";d.exports=function(r){for(var n=new Array(r.length),i=0;i<r.length;++i)n[i]=o(r[i]);return n};var o=t(5125)},4469:function(d,s,t){"use strict";var o=t(5125),r=t(3962);d.exports=function(n,i){for(var a=o(i),c=n.length,p=new Array(c),f=0;f<c;++f)p[f]=r(n[f],a);return p}},6695:function(d,s,t){"use strict";var o=t(4354);d.exports=function(r,n){for(var i=r.length,a=new Array(i),c=0;c<i;++c)a[c]=o(r[c],n[c]);return a}},7037:function(d,s,t){"use strict";var o=t(9209),r=t(1284),n=t(9887);d.exports=function(i){i.sort(r);for(var a=i.length,c=0,p=0;p<a;++p){var f=i[p],x=n(f);if(0!==x){if(c>0){var v=i[c-1];if(0===o(f,v)&&n(v)!==x){c-=1;continue}}i[c++]=f}}return i.length=c,i}},6184:function(d){"use strict";var s,t="";d.exports=function(o,r){if("string"!=typeof o)throw new TypeError("expected a string");if(1===r)return o;if(2===r)return o+o;var n=o.length*r;if(s!==o||void 0===s)s=o,t="";else if(t.length>=n)return t.substr(0,n);for(;n>t.length&&r>1;)1&r&&(t+=o),r>>=1,o+=o;return t=(t+=o).substr(0,n)}},8161:function(d,s,t){d.exports=t.g.performance&&t.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(d){"use strict";d.exports=function(s){for(var t=s.length,o=s[s.length-1],r=t,n=t-2;n>=0;--n){var i=o,a=s[n];(p=a-((o=i+a)-i))&&(s[--r]=o,o=p)}var c=0;for(n=r;n<t;++n){var p;(p=(a=o)-((o=(i=s[n])+a)-i))&&(s[c++]=p)}return s[c++]=o,s.length=c,s}},8167:function(d,s,t){"use strict";var o=t(9660),r=t(9662),n=t(8289),i=t(402);function a(y,h,m,w){return function(u){return w(y(m(u[0][0],u[1][1]),m(-u[0][1],u[1][0])))}}function c(y,h,m,w){return function(u){return w(y(h(y(m(u[1][1],u[2][2]),m(-u[1][2],u[2][1])),u[0][0]),y(h(y(m(u[1][0],u[2][2]),m(-u[1][2],u[2][0])),-u[0][1]),h(y(m(u[1][0],u[2][1]),m(-u[1][1],u[2][0])),u[0][2]))))}}function p(y,h,m,w){return function(u){return w(y(y(h(y(h(y(m(u[2][2],u[3][3]),m(-u[2][3],u[3][2])),u[1][1]),y(h(y(m(u[2][1],u[3][3]),m(-u[2][3],u[3][1])),-u[1][2]),h(y(m(u[2][1],u[3][2]),m(-u[2][2],u[3][1])),u[1][3]))),u[0][0]),h(y(h(y(m(u[2][2],u[3][3]),m(-u[2][3],u[3][2])),u[1][0]),y(h(y(m(u[2][0],u[3][3]),m(-u[2][3],u[3][0])),-u[1][2]),h(y(m(u[2][0],u[3][2]),m(-u[2][2],u[3][0])),u[1][3]))),-u[0][1])),y(h(y(h(y(m(u[2][1],u[3][3]),m(-u[2][3],u[3][1])),u[1][0]),y(h(y(m(u[2][0],u[3][3]),m(-u[2][3],u[3][0])),-u[1][1]),h(y(m(u[2][0],u[3][1]),m(-u[2][1],u[3][0])),u[1][3]))),u[0][2]),h(y(h(y(m(u[2][1],u[3][2]),m(-u[2][2],u[3][1])),u[1][0]),y(h(y(m(u[2][0],u[3][2]),m(-u[2][2],u[3][0])),-u[1][1]),h(y(m(u[2][0],u[3][1]),m(-u[2][1],u[3][0])),u[1][2]))),-u[0][3]))))}}function f(y,h,m,w){return function(u){return w(y(y(h(y(y(h(y(h(y(m(u[3][3],u[4][4]),m(-u[3][4],u[4][3])),u[2][2]),y(h(y(m(u[3][2],u[4][4]),m(-u[3][4],u[4][2])),-u[2][3]),h(y(m(u[3][2],u[4][3]),m(-u[3][3],u[4][2])),u[2][4]))),u[1][1]),h(y(h(y(m(u[3][3],u[4][4]),m(-u[3][4],u[4][3])),u[2][1]),y(h(y(m(u[3][1],u[4][4]),m(-u[3][4],u[4][1])),-u[2][3]),h(y(m(u[3][1],u[4][3]),m(-u[3][3],u[4][1])),u[2][4]))),-u[1][2])),y(h(y(h(y(m(u[3][2],u[4][4]),m(-u[3][4],u[4][2])),u[2][1]),y(h(y(m(u[3][1],u[4][4]),m(-u[3][4],u[4][1])),-u[2][2]),h(y(m(u[3][1],u[4][2]),m(-u[3][2],u[4][1])),u[2][4]))),u[1][3]),h(y(h(y(m(u[3][2],u[4][3]),m(-u[3][3],u[4][2])),u[2][1]),y(h(y(m(u[3][1],u[4][3]),m(-u[3][3],u[4][1])),-u[2][2]),h(y(m(u[3][1],u[4][2]),m(-u[3][2],u[4][1])),u[2][3]))),-u[1][4]))),u[0][0]),h(y(y(h(y(h(y(m(u[3][3],u[4][4]),m(-u[3][4],u[4][3])),u[2][2]),y(h(y(m(u[3][2],u[4][4]),m(-u[3][4],u[4][2])),-u[2][3]),h(y(m(u[3][2],u[4][3]),m(-u[3][3],u[4][2])),u[2][4]))),u[1][0]),h(y(h(y(m(u[3][3],u[4][4]),m(-u[3][4],u[4][3])),u[2][0]),y(h(y(m(u[3][0],u[4][4]),m(-u[3][4],u[4][0])),-u[2][3]),h(y(m(u[3][0],u[4][3]),m(-u[3][3],u[4][0])),u[2][4]))),-u[1][2])),y(h(y(h(y(m(u[3][2],u[4][4]),m(-u[3][4],u[4][2])),u[2][0]),y(h(y(m(u[3][0],u[4][4]),m(-u[3][4],u[4][0])),-u[2][2]),h(y(m(u[3][0],u[4][2]),m(-u[3][2],u[4][0])),u[2][4]))),u[1][3]),h(y(h(y(m(u[3][2],u[4][3]),m(-u[3][3],u[4][2])),u[2][0]),y(h(y(m(u[3][0],u[4][3]),m(-u[3][3],u[4][0])),-u[2][2]),h(y(m(u[3][0],u[4][2]),m(-u[3][2],u[4][0])),u[2][3]))),-u[1][4]))),-u[0][1])),y(h(y(y(h(y(h(y(m(u[3][3],u[4][4]),m(-u[3][4],u[4][3])),u[2][1]),y(h(y(m(u[3][1],u[4][4]),m(-u[3][4],u[4][1])),-u[2][3]),h(y(m(u[3][1],u[4][3]),m(-u[3][3],u[4][1])),u[2][4]))),u[1][0]),h(y(h(y(m(u[3][3],u[4][4]),m(-u[3][4],u[4][3])),u[2][0]),y(h(y(m(u[3][0],u[4][4]),m(-u[3][4],u[4][0])),-u[2][3]),h(y(m(u[3][0],u[4][3]),m(-u[3][3],u[4][0])),u[2][4]))),-u[1][1])),y(h(y(h(y(m(u[3][1],u[4][4]),m(-u[3][4],u[4][1])),u[2][0]),y(h(y(m(u[3][0],u[4][4]),m(-u[3][4],u[4][0])),-u[2][1]),h(y(m(u[3][0],u[4][1]),m(-u[3][1],u[4][0])),u[2][4]))),u[1][3]),h(y(h(y(m(u[3][1],u[4][3]),m(-u[3][3],u[4][1])),u[2][0]),y(h(y(m(u[3][0],u[4][3]),m(-u[3][3],u[4][0])),-u[2][1]),h(y(m(u[3][0],u[4][1]),m(-u[3][1],u[4][0])),u[2][3]))),-u[1][4]))),u[0][2]),y(h(y(y(h(y(h(y(m(u[3][2],u[4][4]),m(-u[3][4],u[4][2])),u[2][1]),y(h(y(m(u[3][1],u[4][4]),m(-u[3][4],u[4][1])),-u[2][2]),h(y(m(u[3][1],u[4][2]),m(-u[3][2],u[4][1])),u[2][4]))),u[1][0]),h(y(h(y(m(u[3][2],u[4][4]),m(-u[3][4],u[4][2])),u[2][0]),y(h(y(m(u[3][0],u[4][4]),m(-u[3][4],u[4][0])),-u[2][2]),h(y(m(u[3][0],u[4][2]),m(-u[3][2],u[4][0])),u[2][4]))),-u[1][1])),y(h(y(h(y(m(u[3][1],u[4][4]),m(-u[3][4],u[4][1])),u[2][0]),y(h(y(m(u[3][0],u[4][4]),m(-u[3][4],u[4][0])),-u[2][1]),h(y(m(u[3][0],u[4][1]),m(-u[3][1],u[4][0])),u[2][4]))),u[1][2]),h(y(h(y(m(u[3][1],u[4][2]),m(-u[3][2],u[4][1])),u[2][0]),y(h(y(m(u[3][0],u[4][2]),m(-u[3][2],u[4][0])),-u[2][1]),h(y(m(u[3][0],u[4][1]),m(-u[3][1],u[4][0])),u[2][2]))),-u[1][4]))),-u[0][3]),h(y(y(h(y(h(y(m(u[3][2],u[4][3]),m(-u[3][3],u[4][2])),u[2][1]),y(h(y(m(u[3][1],u[4][3]),m(-u[3][3],u[4][1])),-u[2][2]),h(y(m(u[3][1],u[4][2]),m(-u[3][2],u[4][1])),u[2][3]))),u[1][0]),h(y(h(y(m(u[3][2],u[4][3]),m(-u[3][3],u[4][2])),u[2][0]),y(h(y(m(u[3][0],u[4][3]),m(-u[3][3],u[4][0])),-u[2][2]),h(y(m(u[3][0],u[4][2]),m(-u[3][2],u[4][0])),u[2][3]))),-u[1][1])),y(h(y(h(y(m(u[3][1],u[4][3]),m(-u[3][3],u[4][1])),u[2][0]),y(h(y(m(u[3][0],u[4][3]),m(-u[3][3],u[4][0])),-u[2][1]),h(y(m(u[3][0],u[4][1]),m(-u[3][1],u[4][0])),u[2][3]))),u[1][2]),h(y(h(y(m(u[3][1],u[4][2]),m(-u[3][2],u[4][1])),u[2][0]),y(h(y(m(u[3][0],u[4][2]),m(-u[3][2],u[4][0])),-u[2][1]),h(y(m(u[3][0],u[4][1]),m(-u[3][1],u[4][0])),u[2][2]))),-u[1][3]))),u[0][4])))))}}function x(y){return(2===y?a:3===y?c:4===y?p:5===y?f:void 0)(r,n,o,i)}var v=[function(){return[0]},function(y){return[y[0][0]]}];function g(y,h,m,w,u,S,_,E){return function(L){switch(L.length){case 0:return y(L);case 1:return h(L);case 2:return m(L);case 3:return w(L);case 4:return u(L);case 5:return S(L)}var C=_[L.length];return C||(C=_[L.length]=E(L.length)),C(L)}}!function(){for(;v.length<6;)v.push(x(v.length));d.exports=g.apply(void 0,v.concat([v,x]));for(var y=0;y<v.length;++y)d.exports[y]=v[y]}()},9130:function(d,s,t){"use strict";var o=t(9660),r=t(9662);d.exports=function(n,i){for(var a=o(n[0],i[0]),c=1;c<n.length;++c)a=r(a,o(n[c],i[c]));return a}},2227:function(d,s,t){"use strict";var o=t(9660),r=t(9662),n=t(4078),i=t(8289);function a(h){return(3===h?c:4===h?p:5===h?f:x)(r,n,o,i)}function c(h,m,w,u){return function(S,_,E){var L=w(S[0],S[0]),C=u(L,_[0]),P=u(L,E[0]),I=w(_[0],_[0]),U=u(I,S[0]),z=u(I,E[0]),H=w(E[0],E[0]),F=u(H,S[0]),N=u(H,_[0]),B=h(m(N,z),m(U,C)),j=m(F,P),J=m(B,j);return J[J.length-1]}}function p(h,m,w,u){return function(S,_,E,L){var C=h(w(S[0],S[0]),w(S[1],S[1])),P=u(C,_[0]),I=u(C,E[0]),U=u(C,L[0]),z=h(w(_[0],_[0]),w(_[1],_[1])),H=u(z,S[0]),F=u(z,E[0]),N=u(z,L[0]),B=h(w(E[0],E[0]),w(E[1],E[1])),j=u(B,S[0]),J=u(B,_[0]),G=u(B,L[0]),V=h(w(L[0],L[0]),w(L[1],L[1])),W=u(V,S[0]),X=u(V,_[0]),K=u(V,E[0]),re=h(h(u(m(K,G),_[1]),h(u(m(X,N),-E[1]),u(m(J,F),L[1]))),h(u(m(X,N),S[1]),h(u(m(W,U),-_[1]),u(m(H,P),L[1])))),ee=h(h(u(m(K,G),S[1]),h(u(m(W,U),-E[1]),u(m(j,I),L[1]))),h(u(m(J,F),S[1]),h(u(m(j,I),-_[1]),u(m(H,P),E[1])))),ie=m(re,ee);return ie[ie.length-1]}}function f(h,m,w,u){return function(S,_,E,L,C){var P=h(w(S[0],S[0]),h(w(S[1],S[1]),w(S[2],S[2]))),I=u(P,_[0]),U=u(P,E[0]),z=u(P,L[0]),H=u(P,C[0]),F=h(w(_[0],_[0]),h(w(_[1],_[1]),w(_[2],_[2]))),N=u(F,S[0]),B=u(F,E[0]),j=u(F,L[0]),J=u(F,C[0]),G=h(w(E[0],E[0]),h(w(E[1],E[1]),w(E[2],E[2]))),V=u(G,S[0]),W=u(G,_[0]),X=u(G,L[0]),K=u(G,C[0]),re=h(w(L[0],L[0]),h(w(L[1],L[1]),w(L[2],L[2]))),ee=u(re,S[0]),ie=u(re,_[0]),oe=u(re,E[0]),ce=u(re,C[0]),me=h(w(C[0],C[0]),h(w(C[1],C[1]),w(C[2],C[2]))),de=u(me,S[0]),he=u(me,_[0]),ve=u(me,E[0]),Pe=u(me,L[0]),xe=h(h(h(u(h(u(m(Pe,ce),E[1]),h(u(m(ve,K),-L[1]),u(m(oe,X),C[1]))),_[2]),h(u(h(u(m(Pe,ce),_[1]),h(u(m(he,J),-L[1]),u(m(ie,j),C[1]))),-E[2]),u(h(u(m(ve,K),_[1]),h(u(m(he,J),-E[1]),u(m(W,B),C[1]))),L[2]))),h(u(h(u(m(oe,X),_[1]),h(u(m(ie,j),-E[1]),u(m(W,B),L[1]))),-C[2]),h(u(h(u(m(Pe,ce),_[1]),h(u(m(he,J),-L[1]),u(m(ie,j),C[1]))),S[2]),u(h(u(m(Pe,ce),S[1]),h(u(m(de,H),-L[1]),u(m(ee,z),C[1]))),-_[2])))),h(h(u(h(u(m(he,J),S[1]),h(u(m(de,H),-_[1]),u(m(N,I),C[1]))),L[2]),h(u(h(u(m(ie,j),S[1]),h(u(m(ee,z),-_[1]),u(m(N,I),L[1]))),-C[2]),u(h(u(m(oe,X),_[1]),h(u(m(ie,j),-E[1]),u(m(W,B),L[1]))),S[2]))),h(u(h(u(m(oe,X),S[1]),h(u(m(ee,z),-E[1]),u(m(V,U),L[1]))),-_[2]),h(u(h(u(m(ie,j),S[1]),h(u(m(ee,z),-_[1]),u(m(N,I),L[1]))),E[2]),u(h(u(m(W,B),S[1]),h(u(m(V,U),-_[1]),u(m(N,I),E[1]))),-L[2]))))),ke=h(h(h(u(h(u(m(Pe,ce),E[1]),h(u(m(ve,K),-L[1]),u(m(oe,X),C[1]))),S[2]),u(h(u(m(Pe,ce),S[1]),h(u(m(de,H),-L[1]),u(m(ee,z),C[1]))),-E[2])),h(u(h(u(m(ve,K),S[1]),h(u(m(de,H),-E[1]),u(m(V,U),C[1]))),L[2]),u(h(u(m(oe,X),S[1]),h(u(m(ee,z),-E[1]),u(m(V,U),L[1]))),-C[2]))),h(h(u(h(u(m(ve,K),_[1]),h(u(m(he,J),-E[1]),u(m(W,B),C[1]))),S[2]),u(h(u(m(ve,K),S[1]),h(u(m(de,H),-E[1]),u(m(V,U),C[1]))),-_[2])),h(u(h(u(m(he,J),S[1]),h(u(m(de,H),-_[1]),u(m(N,I),C[1]))),E[2]),u(h(u(m(W,B),S[1]),h(u(m(V,U),-_[1]),u(m(N,I),E[1]))),-C[2])))),Ae=m(xe,ke);return Ae[Ae.length-1]}}function x(h,m,w,u){return function(S,_,E,L,C,P){var I=h(h(w(S[0],S[0]),w(S[1],S[1])),h(w(S[2],S[2]),w(S[3],S[3]))),U=u(I,_[0]),z=u(I,E[0]),H=u(I,L[0]),F=u(I,C[0]),N=u(I,P[0]),B=h(h(w(_[0],_[0]),w(_[1],_[1])),h(w(_[2],_[2]),w(_[3],_[3]))),j=u(B,S[0]),J=u(B,E[0]),G=u(B,L[0]),V=u(B,C[0]),W=u(B,P[0]),X=h(h(w(E[0],E[0]),w(E[1],E[1])),h(w(E[2],E[2]),w(E[3],E[3]))),K=u(X,S[0]),re=u(X,_[0]),ee=u(X,L[0]),ie=u(X,C[0]),oe=u(X,P[0]),ce=h(h(w(L[0],L[0]),w(L[1],L[1])),h(w(L[2],L[2]),w(L[3],L[3]))),me=u(ce,S[0]),de=u(ce,_[0]),he=u(ce,E[0]),ve=u(ce,C[0]),Pe=u(ce,P[0]),xe=h(h(w(C[0],C[0]),w(C[1],C[1])),h(w(C[2],C[2]),w(C[3],C[3]))),ke=u(xe,S[0]),Ae=u(xe,_[0]),Te=u(xe,E[0]),Q=u(xe,L[0]),se=u(xe,P[0]),fe=h(h(w(P[0],P[0]),w(P[1],P[1])),h(w(P[2],P[2]),w(P[3],P[3]))),ye=u(fe,S[0]),Me=u(fe,_[0]),Ie=u(fe,E[0]),Ce=u(fe,L[0]),Re=u(fe,C[0]),le=h(h(h(u(h(h(u(h(u(m(Re,se),L[1]),h(u(m(Ce,Pe),-C[1]),u(m(Q,ve),P[1]))),E[2]),u(h(u(m(Re,se),E[1]),h(u(m(Ie,oe),-C[1]),u(m(Te,ie),P[1]))),-L[2])),h(u(h(u(m(Ce,Pe),E[1]),h(u(m(Ie,oe),-L[1]),u(m(he,ee),P[1]))),C[2]),u(h(u(m(Q,ve),E[1]),h(u(m(Te,ie),-L[1]),u(m(he,ee),C[1]))),-P[2]))),_[3]),h(u(h(h(u(h(u(m(Re,se),L[1]),h(u(m(Ce,Pe),-C[1]),u(m(Q,ve),P[1]))),_[2]),u(h(u(m(Re,se),_[1]),h(u(m(Me,W),-C[1]),u(m(Ae,V),P[1]))),-L[2])),h(u(h(u(m(Ce,Pe),_[1]),h(u(m(Me,W),-L[1]),u(m(de,G),P[1]))),C[2]),u(h(u(m(Q,ve),_[1]),h(u(m(Ae,V),-L[1]),u(m(de,G),C[1]))),-P[2]))),-E[3]),u(h(h(u(h(u(m(Re,se),E[1]),h(u(m(Ie,oe),-C[1]),u(m(Te,ie),P[1]))),_[2]),u(h(u(m(Re,se),_[1]),h(u(m(Me,W),-C[1]),u(m(Ae,V),P[1]))),-E[2])),h(u(h(u(m(Ie,oe),_[1]),h(u(m(Me,W),-E[1]),u(m(re,J),P[1]))),C[2]),u(h(u(m(Te,ie),_[1]),h(u(m(Ae,V),-E[1]),u(m(re,J),C[1]))),-P[2]))),L[3]))),h(h(u(h(h(u(h(u(m(Ce,Pe),E[1]),h(u(m(Ie,oe),-L[1]),u(m(he,ee),P[1]))),_[2]),u(h(u(m(Ce,Pe),_[1]),h(u(m(Me,W),-L[1]),u(m(de,G),P[1]))),-E[2])),h(u(h(u(m(Ie,oe),_[1]),h(u(m(Me,W),-E[1]),u(m(re,J),P[1]))),L[2]),u(h(u(m(he,ee),_[1]),h(u(m(de,G),-E[1]),u(m(re,J),L[1]))),-P[2]))),-C[3]),u(h(h(u(h(u(m(Q,ve),E[1]),h(u(m(Te,ie),-L[1]),u(m(he,ee),C[1]))),_[2]),u(h(u(m(Q,ve),_[1]),h(u(m(Ae,V),-L[1]),u(m(de,G),C[1]))),-E[2])),h(u(h(u(m(Te,ie),_[1]),h(u(m(Ae,V),-E[1]),u(m(re,J),C[1]))),L[2]),u(h(u(m(he,ee),_[1]),h(u(m(de,G),-E[1]),u(m(re,J),L[1]))),-C[2]))),P[3])),h(u(h(h(u(h(u(m(Re,se),L[1]),h(u(m(Ce,Pe),-C[1]),u(m(Q,ve),P[1]))),_[2]),u(h(u(m(Re,se),_[1]),h(u(m(Me,W),-C[1]),u(m(Ae,V),P[1]))),-L[2])),h(u(h(u(m(Ce,Pe),_[1]),h(u(m(Me,W),-L[1]),u(m(de,G),P[1]))),C[2]),u(h(u(m(Q,ve),_[1]),h(u(m(Ae,V),-L[1]),u(m(de,G),C[1]))),-P[2]))),S[3]),u(h(h(u(h(u(m(Re,se),L[1]),h(u(m(Ce,Pe),-C[1]),u(m(Q,ve),P[1]))),S[2]),u(h(u(m(Re,se),S[1]),h(u(m(ye,N),-C[1]),u(m(ke,F),P[1]))),-L[2])),h(u(h(u(m(Ce,Pe),S[1]),h(u(m(ye,N),-L[1]),u(m(me,H),P[1]))),C[2]),u(h(u(m(Q,ve),S[1]),h(u(m(ke,F),-L[1]),u(m(me,H),C[1]))),-P[2]))),-_[3])))),h(h(h(u(h(h(u(h(u(m(Re,se),_[1]),h(u(m(Me,W),-C[1]),u(m(Ae,V),P[1]))),S[2]),u(h(u(m(Re,se),S[1]),h(u(m(ye,N),-C[1]),u(m(ke,F),P[1]))),-_[2])),h(u(h(u(m(Me,W),S[1]),h(u(m(ye,N),-_[1]),u(m(j,U),P[1]))),C[2]),u(h(u(m(Ae,V),S[1]),h(u(m(ke,F),-_[1]),u(m(j,U),C[1]))),-P[2]))),L[3]),u(h(h(u(h(u(m(Ce,Pe),_[1]),h(u(m(Me,W),-L[1]),u(m(de,G),P[1]))),S[2]),u(h(u(m(Ce,Pe),S[1]),h(u(m(ye,N),-L[1]),u(m(me,H),P[1]))),-_[2])),h(u(h(u(m(Me,W),S[1]),h(u(m(ye,N),-_[1]),u(m(j,U),P[1]))),L[2]),u(h(u(m(de,G),S[1]),h(u(m(me,H),-_[1]),u(m(j,U),L[1]))),-P[2]))),-C[3])),h(u(h(h(u(h(u(m(Q,ve),_[1]),h(u(m(Ae,V),-L[1]),u(m(de,G),C[1]))),S[2]),u(h(u(m(Q,ve),S[1]),h(u(m(ke,F),-L[1]),u(m(me,H),C[1]))),-_[2])),h(u(h(u(m(Ae,V),S[1]),h(u(m(ke,F),-_[1]),u(m(j,U),C[1]))),L[2]),u(h(u(m(de,G),S[1]),h(u(m(me,H),-_[1]),u(m(j,U),L[1]))),-C[2]))),P[3]),u(h(h(u(h(u(m(Ce,Pe),E[1]),h(u(m(Ie,oe),-L[1]),u(m(he,ee),P[1]))),_[2]),u(h(u(m(Ce,Pe),_[1]),h(u(m(Me,W),-L[1]),u(m(de,G),P[1]))),-E[2])),h(u(h(u(m(Ie,oe),_[1]),h(u(m(Me,W),-E[1]),u(m(re,J),P[1]))),L[2]),u(h(u(m(he,ee),_[1]),h(u(m(de,G),-E[1]),u(m(re,J),L[1]))),-P[2]))),S[3]))),h(h(u(h(h(u(h(u(m(Ce,Pe),E[1]),h(u(m(Ie,oe),-L[1]),u(m(he,ee),P[1]))),S[2]),u(h(u(m(Ce,Pe),S[1]),h(u(m(ye,N),-L[1]),u(m(me,H),P[1]))),-E[2])),h(u(h(u(m(Ie,oe),S[1]),h(u(m(ye,N),-E[1]),u(m(K,z),P[1]))),L[2]),u(h(u(m(he,ee),S[1]),h(u(m(me,H),-E[1]),u(m(K,z),L[1]))),-P[2]))),-_[3]),u(h(h(u(h(u(m(Ce,Pe),_[1]),h(u(m(Me,W),-L[1]),u(m(de,G),P[1]))),S[2]),u(h(u(m(Ce,Pe),S[1]),h(u(m(ye,N),-L[1]),u(m(me,H),P[1]))),-_[2])),h(u(h(u(m(Me,W),S[1]),h(u(m(ye,N),-_[1]),u(m(j,U),P[1]))),L[2]),u(h(u(m(de,G),S[1]),h(u(m(me,H),-_[1]),u(m(j,U),L[1]))),-P[2]))),E[3])),h(u(h(h(u(h(u(m(Ie,oe),_[1]),h(u(m(Me,W),-E[1]),u(m(re,J),P[1]))),S[2]),u(h(u(m(Ie,oe),S[1]),h(u(m(ye,N),-E[1]),u(m(K,z),P[1]))),-_[2])),h(u(h(u(m(Me,W),S[1]),h(u(m(ye,N),-_[1]),u(m(j,U),P[1]))),E[2]),u(h(u(m(re,J),S[1]),h(u(m(K,z),-_[1]),u(m(j,U),E[1]))),-P[2]))),-L[3]),u(h(h(u(h(u(m(he,ee),_[1]),h(u(m(de,G),-E[1]),u(m(re,J),L[1]))),S[2]),u(h(u(m(he,ee),S[1]),h(u(m(me,H),-E[1]),u(m(K,z),L[1]))),-_[2])),h(u(h(u(m(de,G),S[1]),h(u(m(me,H),-_[1]),u(m(j,U),L[1]))),E[2]),u(h(u(m(re,J),S[1]),h(u(m(K,z),-_[1]),u(m(j,U),E[1]))),-L[2]))),P[3]))))),ge=h(h(h(u(h(h(u(h(u(m(Re,se),L[1]),h(u(m(Ce,Pe),-C[1]),u(m(Q,ve),P[1]))),E[2]),u(h(u(m(Re,se),E[1]),h(u(m(Ie,oe),-C[1]),u(m(Te,ie),P[1]))),-L[2])),h(u(h(u(m(Ce,Pe),E[1]),h(u(m(Ie,oe),-L[1]),u(m(he,ee),P[1]))),C[2]),u(h(u(m(Q,ve),E[1]),h(u(m(Te,ie),-L[1]),u(m(he,ee),C[1]))),-P[2]))),S[3]),h(u(h(h(u(h(u(m(Re,se),L[1]),h(u(m(Ce,Pe),-C[1]),u(m(Q,ve),P[1]))),S[2]),u(h(u(m(Re,se),S[1]),h(u(m(ye,N),-C[1]),u(m(ke,F),P[1]))),-L[2])),h(u(h(u(m(Ce,Pe),S[1]),h(u(m(ye,N),-L[1]),u(m(me,H),P[1]))),C[2]),u(h(u(m(Q,ve),S[1]),h(u(m(ke,F),-L[1]),u(m(me,H),C[1]))),-P[2]))),-E[3]),u(h(h(u(h(u(m(Re,se),E[1]),h(u(m(Ie,oe),-C[1]),u(m(Te,ie),P[1]))),S[2]),u(h(u(m(Re,se),S[1]),h(u(m(ye,N),-C[1]),u(m(ke,F),P[1]))),-E[2])),h(u(h(u(m(Ie,oe),S[1]),h(u(m(ye,N),-E[1]),u(m(K,z),P[1]))),C[2]),u(h(u(m(Te,ie),S[1]),h(u(m(ke,F),-E[1]),u(m(K,z),C[1]))),-P[2]))),L[3]))),h(h(u(h(h(u(h(u(m(Ce,Pe),E[1]),h(u(m(Ie,oe),-L[1]),u(m(he,ee),P[1]))),S[2]),u(h(u(m(Ce,Pe),S[1]),h(u(m(ye,N),-L[1]),u(m(me,H),P[1]))),-E[2])),h(u(h(u(m(Ie,oe),S[1]),h(u(m(ye,N),-E[1]),u(m(K,z),P[1]))),L[2]),u(h(u(m(he,ee),S[1]),h(u(m(me,H),-E[1]),u(m(K,z),L[1]))),-P[2]))),-C[3]),u(h(h(u(h(u(m(Q,ve),E[1]),h(u(m(Te,ie),-L[1]),u(m(he,ee),C[1]))),S[2]),u(h(u(m(Q,ve),S[1]),h(u(m(ke,F),-L[1]),u(m(me,H),C[1]))),-E[2])),h(u(h(u(m(Te,ie),S[1]),h(u(m(ke,F),-E[1]),u(m(K,z),C[1]))),L[2]),u(h(u(m(he,ee),S[1]),h(u(m(me,H),-E[1]),u(m(K,z),L[1]))),-C[2]))),P[3])),h(u(h(h(u(h(u(m(Re,se),E[1]),h(u(m(Ie,oe),-C[1]),u(m(Te,ie),P[1]))),_[2]),u(h(u(m(Re,se),_[1]),h(u(m(Me,W),-C[1]),u(m(Ae,V),P[1]))),-E[2])),h(u(h(u(m(Ie,oe),_[1]),h(u(m(Me,W),-E[1]),u(m(re,J),P[1]))),C[2]),u(h(u(m(Te,ie),_[1]),h(u(m(Ae,V),-E[1]),u(m(re,J),C[1]))),-P[2]))),S[3]),u(h(h(u(h(u(m(Re,se),E[1]),h(u(m(Ie,oe),-C[1]),u(m(Te,ie),P[1]))),S[2]),u(h(u(m(Re,se),S[1]),h(u(m(ye,N),-C[1]),u(m(ke,F),P[1]))),-E[2])),h(u(h(u(m(Ie,oe),S[1]),h(u(m(ye,N),-E[1]),u(m(K,z),P[1]))),C[2]),u(h(u(m(Te,ie),S[1]),h(u(m(ke,F),-E[1]),u(m(K,z),C[1]))),-P[2]))),-_[3])))),h(h(h(u(h(h(u(h(u(m(Re,se),_[1]),h(u(m(Me,W),-C[1]),u(m(Ae,V),P[1]))),S[2]),u(h(u(m(Re,se),S[1]),h(u(m(ye,N),-C[1]),u(m(ke,F),P[1]))),-_[2])),h(u(h(u(m(Me,W),S[1]),h(u(m(ye,N),-_[1]),u(m(j,U),P[1]))),C[2]),u(h(u(m(Ae,V),S[1]),h(u(m(ke,F),-_[1]),u(m(j,U),C[1]))),-P[2]))),E[3]),u(h(h(u(h(u(m(Ie,oe),_[1]),h(u(m(Me,W),-E[1]),u(m(re,J),P[1]))),S[2]),u(h(u(m(Ie,oe),S[1]),h(u(m(ye,N),-E[1]),u(m(K,z),P[1]))),-_[2])),h(u(h(u(m(Me,W),S[1]),h(u(m(ye,N),-_[1]),u(m(j,U),P[1]))),E[2]),u(h(u(m(re,J),S[1]),h(u(m(K,z),-_[1]),u(m(j,U),E[1]))),-P[2]))),-C[3])),h(u(h(h(u(h(u(m(Te,ie),_[1]),h(u(m(Ae,V),-E[1]),u(m(re,J),C[1]))),S[2]),u(h(u(m(Te,ie),S[1]),h(u(m(ke,F),-E[1]),u(m(K,z),C[1]))),-_[2])),h(u(h(u(m(Ae,V),S[1]),h(u(m(ke,F),-_[1]),u(m(j,U),C[1]))),E[2]),u(h(u(m(re,J),S[1]),h(u(m(K,z),-_[1]),u(m(j,U),E[1]))),-C[2]))),P[3]),u(h(h(u(h(u(m(Q,ve),E[1]),h(u(m(Te,ie),-L[1]),u(m(he,ee),C[1]))),_[2]),u(h(u(m(Q,ve),_[1]),h(u(m(Ae,V),-L[1]),u(m(de,G),C[1]))),-E[2])),h(u(h(u(m(Te,ie),_[1]),h(u(m(Ae,V),-E[1]),u(m(re,J),C[1]))),L[2]),u(h(u(m(he,ee),_[1]),h(u(m(de,G),-E[1]),u(m(re,J),L[1]))),-C[2]))),S[3]))),h(h(u(h(h(u(h(u(m(Q,ve),E[1]),h(u(m(Te,ie),-L[1]),u(m(he,ee),C[1]))),S[2]),u(h(u(m(Q,ve),S[1]),h(u(m(ke,F),-L[1]),u(m(me,H),C[1]))),-E[2])),h(u(h(u(m(Te,ie),S[1]),h(u(m(ke,F),-E[1]),u(m(K,z),C[1]))),L[2]),u(h(u(m(he,ee),S[1]),h(u(m(me,H),-E[1]),u(m(K,z),L[1]))),-C[2]))),-_[3]),u(h(h(u(h(u(m(Q,ve),_[1]),h(u(m(Ae,V),-L[1]),u(m(de,G),C[1]))),S[2]),u(h(u(m(Q,ve),S[1]),h(u(m(ke,F),-L[1]),u(m(me,H),C[1]))),-_[2])),h(u(h(u(m(Ae,V),S[1]),h(u(m(ke,F),-_[1]),u(m(j,U),C[1]))),L[2]),u(h(u(m(de,G),S[1]),h(u(m(me,H),-_[1]),u(m(j,U),L[1]))),-C[2]))),E[3])),h(u(h(h(u(h(u(m(Te,ie),_[1]),h(u(m(Ae,V),-E[1]),u(m(re,J),C[1]))),S[2]),u(h(u(m(Te,ie),S[1]),h(u(m(ke,F),-E[1]),u(m(K,z),C[1]))),-_[2])),h(u(h(u(m(Ae,V),S[1]),h(u(m(ke,F),-_[1]),u(m(j,U),C[1]))),E[2]),u(h(u(m(re,J),S[1]),h(u(m(K,z),-_[1]),u(m(j,U),E[1]))),-C[2]))),-L[3]),u(h(h(u(h(u(m(he,ee),_[1]),h(u(m(de,G),-E[1]),u(m(re,J),L[1]))),S[2]),u(h(u(m(he,ee),S[1]),h(u(m(me,H),-E[1]),u(m(K,z),L[1]))),-_[2])),h(u(h(u(m(de,G),S[1]),h(u(m(me,H),-_[1]),u(m(j,U),L[1]))),E[2]),u(h(u(m(re,J),S[1]),h(u(m(K,z),-_[1]),u(m(j,U),E[1]))),-L[2]))),C[3]))))),_e=m(le,ge);return _e[_e.length-1]}}var v=[function(){return 0},function(){return 0},function(){return 0}];function g(h){var m=v[h.length];return m||(m=v[h.length]=a(h.length)),m.apply(void 0,h)}function y(h,m,w,u,S,_,E,L){return function(C,P,I,U,z,H){switch(arguments.length){case 0:case 1:return 0;case 2:return u(C,P);case 3:return S(C,P,I);case 4:return _(C,P,I,U);case 5:return E(C,P,I,U,z);case 6:return L(C,P,I,U,z,H)}for(var F=new Array(arguments.length),N=0;N<arguments.length;++N)F[N]=arguments[N];return h(F)}}!function(){for(;v.length<=6;)v.push(a(v.length));d.exports=y.apply(void 0,[g].concat(v));for(var h=0;h<=6;++h)d.exports[h]=v[h]}()},6606:function(d,s,t){"use strict";var o=t(8167);function r(v){return(2===v?n:3===v?i:4===v?a:5===v?c:p)(v<6?o[v]:o)}function n(v){return function(g,y){return[v([[+y[0],+g[0][1]],[+y[1],+g[1][1]]]),v([[+g[0][0],+y[0]],[+g[1][0],+y[1]]]),v(g)]}}function i(v){return function(g,y){return[v([[+y[0],+g[0][1],+g[0][2]],[+y[1],+g[1][1],+g[1][2]],[+y[2],+g[2][1],+g[2][2]]]),v([[+g[0][0],+y[0],+g[0][2]],[+g[1][0],+y[1],+g[1][2]],[+g[2][0],+y[2],+g[2][2]]]),v([[+g[0][0],+g[0][1],+y[0]],[+g[1][0],+g[1][1],+y[1]],[+g[2][0],+g[2][1],+y[2]]]),v(g)]}}function a(v){return function(g,y){return[v([[+y[0],+g[0][1],+g[0][2],+g[0][3]],[+y[1],+g[1][1],+g[1][2],+g[1][3]],[+y[2],+g[2][1],+g[2][2],+g[2][3]],[+y[3],+g[3][1],+g[3][2],+g[3][3]]]),v([[+g[0][0],+y[0],+g[0][2],+g[0][3]],[+g[1][0],+y[1],+g[1][2],+g[1][3]],[+g[2][0],+y[2],+g[2][2],+g[2][3]],[+g[3][0],+y[3],+g[3][2],+g[3][3]]]),v([[+g[0][0],+g[0][1],+y[0],+g[0][3]],[+g[1][0],+g[1][1],+y[1],+g[1][3]],[+g[2][0],+g[2][1],+y[2],+g[2][3]],[+g[3][0],+g[3][1],+y[3],+g[3][3]]]),v([[+g[0][0],+g[0][1],+g[0][2],+y[0]],[+g[1][0],+g[1][1],+g[1][2],+y[1]],[+g[2][0],+g[2][1],+g[2][2],+y[2]],[+g[3][0],+g[3][1],+g[3][2],+y[3]]]),v(g)]}}function c(v){return function(g,y){return[v([[+y[0],+g[0][1],+g[0][2],+g[0][3],+g[0][4]],[+y[1],+g[1][1],+g[1][2],+g[1][3],+g[1][4]],[+y[2],+g[2][1],+g[2][2],+g[2][3],+g[2][4]],[+y[3],+g[3][1],+g[3][2],+g[3][3],+g[3][4]],[+y[4],+g[4][1],+g[4][2],+g[4][3],+g[4][4]]]),v([[+g[0][0],+y[0],+g[0][2],+g[0][3],+g[0][4]],[+g[1][0],+y[1],+g[1][2],+g[1][3],+g[1][4]],[+g[2][0],+y[2],+g[2][2],+g[2][3],+g[2][4]],[+g[3][0],+y[3],+g[3][2],+g[3][3],+g[3][4]],[+g[4][0],+y[4],+g[4][2],+g[4][3],+g[4][4]]]),v([[+g[0][0],+g[0][1],+y[0],+g[0][3],+g[0][4]],[+g[1][0],+g[1][1],+y[1],+g[1][3],+g[1][4]],[+g[2][0],+g[2][1],+y[2],+g[2][3],+g[2][4]],[+g[3][0],+g[3][1],+y[3],+g[3][3],+g[3][4]],[+g[4][0],+g[4][1],+y[4],+g[4][3],+g[4][4]]]),v([[+g[0][0],+g[0][1],+g[0][2],+y[0],+g[0][4]],[+g[1][0],+g[1][1],+g[1][2],+y[1],+g[1][4]],[+g[2][0],+g[2][1],+g[2][2],+y[2],+g[2][4]],[+g[3][0],+g[3][1],+g[3][2],+y[3],+g[3][4]],[+g[4][0],+g[4][1],+g[4][2],+y[4],+g[4][4]]]),v([[+g[0][0],+g[0][1],+g[0][2],+g[0][3],+y[0]],[+g[1][0],+g[1][1],+g[1][2],+g[1][3],+y[1]],[+g[2][0],+g[2][1],+g[2][2],+g[2][3],+y[2]],[+g[3][0],+g[3][1],+g[3][2],+g[3][3],+y[3]],[+g[4][0],+g[4][1],+g[4][2],+g[4][3],+y[4]]]),v(g)]}}function p(v){return function(g,y){return[v([[+y[0],+g[0][1],+g[0][2],+g[0][3],+g[0][4],+g[0][5]],[+y[1],+g[1][1],+g[1][2],+g[1][3],+g[1][4],+g[1][5]],[+y[2],+g[2][1],+g[2][2],+g[2][3],+g[2][4],+g[2][5]],[+y[3],+g[3][1],+g[3][2],+g[3][3],+g[3][4],+g[3][5]],[+y[4],+g[4][1],+g[4][2],+g[4][3],+g[4][4],+g[4][5]],[+y[5],+g[5][1],+g[5][2],+g[5][3],+g[5][4],+g[5][5]]]),v([[+g[0][0],+y[0],+g[0][2],+g[0][3],+g[0][4],+g[0][5]],[+g[1][0],+y[1],+g[1][2],+g[1][3],+g[1][4],+g[1][5]],[+g[2][0],+y[2],+g[2][2],+g[2][3],+g[2][4],+g[2][5]],[+g[3][0],+y[3],+g[3][2],+g[3][3],+g[3][4],+g[3][5]],[+g[4][0],+y[4],+g[4][2],+g[4][3],+g[4][4],+g[4][5]],[+g[5][0],+y[5],+g[5][2],+g[5][3],+g[5][4],+g[5][5]]]),v([[+g[0][0],+g[0][1],+y[0],+g[0][3],+g[0][4],+g[0][5]],[+g[1][0],+g[1][1],+y[1],+g[1][3],+g[1][4],+g[1][5]],[+g[2][0],+g[2][1],+y[2],+g[2][3],+g[2][4],+g[2][5]],[+g[3][0],+g[3][1],+y[3],+g[3][3],+g[3][4],+g[3][5]],[+g[4][0],+g[4][1],+y[4],+g[4][3],+g[4][4],+g[4][5]],[+g[5][0],+g[5][1],+y[5],+g[5][3],+g[5][4],+g[5][5]]]),v([[+g[0][0],+g[0][1],+g[0][2],+y[0],+g[0][4],+g[0][5]],[+g[1][0],+g[1][1],+g[1][2],+y[1],+g[1][4],+g[1][5]],[+g[2][0],+g[2][1],+g[2][2],+y[2],+g[2][4],+g[2][5]],[+g[3][0],+g[3][1],+g[3][2],+y[3],+g[3][4],+g[3][5]],[+g[4][0],+g[4][1],+g[4][2],+y[4],+g[4][4],+g[4][5]],[+g[5][0],+g[5][1],+g[5][2],+y[5],+g[5][4],+g[5][5]]]),v([[+g[0][0],+g[0][1],+g[0][2],+g[0][3],+y[0],+g[0][5]],[+g[1][0],+g[1][1],+g[1][2],+g[1][3],+y[1],+g[1][5]],[+g[2][0],+g[2][1],+g[2][2],+g[2][3],+y[2],+g[2][5]],[+g[3][0],+g[3][1],+g[3][2],+g[3][3],+y[3],+g[3][5]],[+g[4][0],+g[4][1],+g[4][2],+g[4][3],+y[4],+g[4][5]],[+g[5][0],+g[5][1],+g[5][2],+g[5][3],+y[5],+g[5][5]]]),v([[+g[0][0],+g[0][1],+g[0][2],+g[0][3],+g[0][4],+y[0]],[+g[1][0],+g[1][1],+g[1][2],+g[1][3],+g[1][4],+y[1]],[+g[2][0],+g[2][1],+g[2][2],+g[2][3],+g[2][4],+y[2]],[+g[3][0],+g[3][1],+g[3][2],+g[3][3],+g[3][4],+y[3]],[+g[4][0],+g[4][1],+g[4][2],+g[4][3],+g[4][4],+y[4]],[+g[5][0],+g[5][1],+g[5][2],+g[5][3],+g[5][4],+y[5]]]),v(g)]}}var f=[function(){return[[0]]},function(v,g){return[[g[0]],[v[0][0]]]}];function x(v,g,y,h,m,w,u,S){return function(_,E){switch(_.length){case 0:return v(_,E);case 1:return g(_,E);case 2:return y(_,E);case 3:return h(_,E);case 4:return m(_,E);case 5:return w(_,E)}var L=u[_.length];return L||(L=u[_.length]=S(_.length)),L(_,E)}}!function(){for(;f.length<6;)f.push(r(f.length));d.exports=x.apply(void 0,f.concat([f,r]));for(var v=0;v<6;++v)d.exports[v]=f[v]}()},417:function(d,s,t){"use strict";var o=t(9660),r=t(9662),n=t(8289),i=t(4078);function a(m,w,u,S){return function(_,E,L){var C=m(m(w(E[1],L[0]),w(-L[1],E[0])),m(w(_[1],E[0]),w(-E[1],_[0]))),P=m(w(_[1],L[0]),w(-L[1],_[0])),I=S(C,P);return I[I.length-1]}}function c(m,w,u,S){return function(_,E,L,C){var P=m(m(u(m(w(L[1],C[0]),w(-C[1],L[0])),E[2]),m(u(m(w(E[1],C[0]),w(-C[1],E[0])),-L[2]),u(m(w(E[1],L[0]),w(-L[1],E[0])),C[2]))),m(u(m(w(E[1],C[0]),w(-C[1],E[0])),_[2]),m(u(m(w(_[1],C[0]),w(-C[1],_[0])),-E[2]),u(m(w(_[1],E[0]),w(-E[1],_[0])),C[2])))),I=m(m(u(m(w(L[1],C[0]),w(-C[1],L[0])),_[2]),m(u(m(w(_[1],C[0]),w(-C[1],_[0])),-L[2]),u(m(w(_[1],L[0]),w(-L[1],_[0])),C[2]))),m(u(m(w(E[1],L[0]),w(-L[1],E[0])),_[2]),m(u(m(w(_[1],L[0]),w(-L[1],_[0])),-E[2]),u(m(w(_[1],E[0]),w(-E[1],_[0])),L[2])))),U=S(P,I);return U[U.length-1]}}function p(m,w,u,S){return function(_,E,L,C,P){var I=m(m(m(u(m(u(m(w(C[1],P[0]),w(-P[1],C[0])),L[2]),m(u(m(w(L[1],P[0]),w(-P[1],L[0])),-C[2]),u(m(w(L[1],C[0]),w(-C[1],L[0])),P[2]))),E[3]),m(u(m(u(m(w(C[1],P[0]),w(-P[1],C[0])),E[2]),m(u(m(w(E[1],P[0]),w(-P[1],E[0])),-C[2]),u(m(w(E[1],C[0]),w(-C[1],E[0])),P[2]))),-L[3]),u(m(u(m(w(L[1],P[0]),w(-P[1],L[0])),E[2]),m(u(m(w(E[1],P[0]),w(-P[1],E[0])),-L[2]),u(m(w(E[1],L[0]),w(-L[1],E[0])),P[2]))),C[3]))),m(u(m(u(m(w(L[1],C[0]),w(-C[1],L[0])),E[2]),m(u(m(w(E[1],C[0]),w(-C[1],E[0])),-L[2]),u(m(w(E[1],L[0]),w(-L[1],E[0])),C[2]))),-P[3]),m(u(m(u(m(w(C[1],P[0]),w(-P[1],C[0])),E[2]),m(u(m(w(E[1],P[0]),w(-P[1],E[0])),-C[2]),u(m(w(E[1],C[0]),w(-C[1],E[0])),P[2]))),_[3]),u(m(u(m(w(C[1],P[0]),w(-P[1],C[0])),_[2]),m(u(m(w(_[1],P[0]),w(-P[1],_[0])),-C[2]),u(m(w(_[1],C[0]),w(-C[1],_[0])),P[2]))),-E[3])))),m(m(u(m(u(m(w(E[1],P[0]),w(-P[1],E[0])),_[2]),m(u(m(w(_[1],P[0]),w(-P[1],_[0])),-E[2]),u(m(w(_[1],E[0]),w(-E[1],_[0])),P[2]))),C[3]),m(u(m(u(m(w(E[1],C[0]),w(-C[1],E[0])),_[2]),m(u(m(w(_[1],C[0]),w(-C[1],_[0])),-E[2]),u(m(w(_[1],E[0]),w(-E[1],_[0])),C[2]))),-P[3]),u(m(u(m(w(L[1],C[0]),w(-C[1],L[0])),E[2]),m(u(m(w(E[1],C[0]),w(-C[1],E[0])),-L[2]),u(m(w(E[1],L[0]),w(-L[1],E[0])),C[2]))),_[3]))),m(u(m(u(m(w(L[1],C[0]),w(-C[1],L[0])),_[2]),m(u(m(w(_[1],C[0]),w(-C[1],_[0])),-L[2]),u(m(w(_[1],L[0]),w(-L[1],_[0])),C[2]))),-E[3]),m(u(m(u(m(w(E[1],C[0]),w(-C[1],E[0])),_[2]),m(u(m(w(_[1],C[0]),w(-C[1],_[0])),-E[2]),u(m(w(_[1],E[0]),w(-E[1],_[0])),C[2]))),L[3]),u(m(u(m(w(E[1],L[0]),w(-L[1],E[0])),_[2]),m(u(m(w(_[1],L[0]),w(-L[1],_[0])),-E[2]),u(m(w(_[1],E[0]),w(-E[1],_[0])),L[2]))),-C[3]))))),U=m(m(m(u(m(u(m(w(C[1],P[0]),w(-P[1],C[0])),L[2]),m(u(m(w(L[1],P[0]),w(-P[1],L[0])),-C[2]),u(m(w(L[1],C[0]),w(-C[1],L[0])),P[2]))),_[3]),u(m(u(m(w(C[1],P[0]),w(-P[1],C[0])),_[2]),m(u(m(w(_[1],P[0]),w(-P[1],_[0])),-C[2]),u(m(w(_[1],C[0]),w(-C[1],_[0])),P[2]))),-L[3])),m(u(m(u(m(w(L[1],P[0]),w(-P[1],L[0])),_[2]),m(u(m(w(_[1],P[0]),w(-P[1],_[0])),-L[2]),u(m(w(_[1],L[0]),w(-L[1],_[0])),P[2]))),C[3]),u(m(u(m(w(L[1],C[0]),w(-C[1],L[0])),_[2]),m(u(m(w(_[1],C[0]),w(-C[1],_[0])),-L[2]),u(m(w(_[1],L[0]),w(-L[1],_[0])),C[2]))),-P[3]))),m(m(u(m(u(m(w(L[1],P[0]),w(-P[1],L[0])),E[2]),m(u(m(w(E[1],P[0]),w(-P[1],E[0])),-L[2]),u(m(w(E[1],L[0]),w(-L[1],E[0])),P[2]))),_[3]),u(m(u(m(w(L[1],P[0]),w(-P[1],L[0])),_[2]),m(u(m(w(_[1],P[0]),w(-P[1],_[0])),-L[2]),u(m(w(_[1],L[0]),w(-L[1],_[0])),P[2]))),-E[3])),m(u(m(u(m(w(E[1],P[0]),w(-P[1],E[0])),_[2]),m(u(m(w(_[1],P[0]),w(-P[1],_[0])),-E[2]),u(m(w(_[1],E[0]),w(-E[1],_[0])),P[2]))),L[3]),u(m(u(m(w(E[1],L[0]),w(-L[1],E[0])),_[2]),m(u(m(w(_[1],L[0]),w(-L[1],_[0])),-E[2]),u(m(w(_[1],E[0]),w(-E[1],_[0])),L[2]))),-P[3])))),z=S(I,U);return z[z.length-1]}}function f(m){return(3===m?a:4===m?c:p)(r,o,n,i)}var x=f(3),v=f(4),g=[function(){return 0},function(){return 0},function(m,w){return w[0]-m[0]},function(m,w,u){var S,_=(m[1]-u[1])*(w[0]-u[0]),E=(m[0]-u[0])*(w[1]-u[1]),L=_-E;if(_>0){if(E<=0)return L;S=_+E}else{if(!(_<0)||E>=0)return L;S=-(_+E)}var C=33306690738754716e-32*S;return L>=C||L<=-C?L:x(m,w,u)},function(m,w,u,S){var _=m[0]-S[0],E=w[0]-S[0],L=u[0]-S[0],C=m[1]-S[1],P=w[1]-S[1],I=u[1]-S[1],U=m[2]-S[2],z=w[2]-S[2],H=u[2]-S[2],F=E*I,N=L*P,B=L*C,j=_*I,J=_*P,G=E*C,V=U*(F-N)+z*(B-j)+H*(J-G),W=7771561172376103e-31*((Math.abs(F)+Math.abs(N))*Math.abs(U)+(Math.abs(B)+Math.abs(j))*Math.abs(z)+(Math.abs(J)+Math.abs(G))*Math.abs(H));return V>W||-V>W?V:v(m,w,u,S)}];function y(m){var w=g[m.length];return w||(w=g[m.length]=f(m.length)),w.apply(void 0,m)}function h(m,w,u,S,_,E,L){return function(C,P,I,U,z){switch(arguments.length){case 0:case 1:return 0;case 2:return S(C,P);case 3:return _(C,P,I);case 4:return E(C,P,I,U);case 5:return L(C,P,I,U,z)}for(var H=new Array(arguments.length),F=0;F<arguments.length;++F)H[F]=arguments[F];return m(H)}}!function(){for(;g.length<=5;)g.push(f(g.length));d.exports=h.apply(void 0,[y].concat(g));for(var m=0;m<=5;++m)d.exports[m]=g[m]}()},2019:function(d,s,t){"use strict";var o=t(9662),r=t(8289);d.exports=function(n,i){if(1===n.length)return r(i,n[0]);if(1===i.length)return r(n,i[0]);if(0===n.length||0===i.length)return[0];var a=[0];if(n.length<i.length)for(var c=0;c<n.length;++c)a=o(a,r(i,n[c]));else for(c=0;c<i.length;++c)a=o(a,r(n,i[c]));return a}},8289:function(d,s,t){"use strict";var o=t(9660),r=t(87);d.exports=function(n,i){var a=n.length;if(1===a){var c=o(n[0],i);return c[0]?c:[c[1]]}var p=new Array(2*a),f=[.1,.1],x=[.1,.1],v=0;o(n[0],i,f),f[0]&&(p[v++]=f[0]);for(var g=1;g<a;++g){o(n[g],i,x),r(f[1],x[0],f),f[0]&&(p[v++]=f[0]);var h=x[1],m=f[1],w=h+m,u=m-(w-h);f[1]=w,u&&(p[v++]=u)}return f[1]&&(p[v++]=f[1]),0===v&&(p[v++]=0),p.length=v,p}},4434:function(d,s,t){"use strict";d.exports=function(r,n,i,a){var c=o(r,i,a),p=o(n,i,a);if(c>0&&p>0||c<0&&p<0)return!1;var f=o(i,r,n),x=o(a,r,n);return!(f>0&&x>0||f<0&&x<0)&&(0!==c||0!==p||0!==f||0!==x||function(v,g,y,h){for(var m=0;m<2;++m){var w=v[m],u=g[m],S=Math.min(w,u),_=Math.max(w,u),E=y[m],L=h[m],C=Math.min(E,L);if(Math.max(E,L)<S||_<C)return!1}return!0}(r,n,i,a))};var o=t(417)[3]},4078:function(d){"use strict";d.exports=function(s,t){var C,P,I,U,z,o=0|s.length,r=0|t.length;if(1===o&&1===r)return(z=(C=s[0])-((I=C+(P=-t[0]))-(U=I-C))+(P-U))?[z,I]:[I];var n,i,a=new Array(o+r),c=0,p=0,f=0,x=Math.abs,v=s[p],g=x(v),y=-t[f],h=x(y);g<h?(i=v,(p+=1)<o&&(g=x(v=s[p]))):(i=y,(f+=1)<r&&(h=x(y=-t[f]))),p<o&&g<h||f>=r?(n=v,(p+=1)<o&&(g=x(v=s[p]))):(n=y,(f+=1)<r&&(h=x(y=-t[f])));for(var m,w,u=n+i,S=u-n,_=i-S,E=_,L=u;p<o&&f<r;)g<h?(n=v,(p+=1)<o&&(g=x(v=s[p]))):(n=y,(f+=1)<r&&(h=x(y=-t[f]))),(_=(i=E)-(S=(u=n+i)-n))&&(a[c++]=_),E=L-((m=L+u)-(w=m-L))+(u-w),L=m;for(;p<o;)(_=(i=E)-(S=(u=(n=v)+i)-n))&&(a[c++]=_),E=L-((m=L+u)-(w=m-L))+(u-w),L=m,(p+=1)<o&&(v=s[p]);for(;f<r;)(_=(i=E)-(S=(u=(n=y)+i)-n))&&(a[c++]=_),E=L-((m=L+u)-(w=m-L))+(u-w),L=m,(f+=1)<r&&(y=-t[f]);return E&&(a[c++]=E),L&&(a[c++]=L),c||(a[c++]=0),a.length=c,a}},9662:function(d){"use strict";d.exports=function(s,t){var C,P,I,U,z,o=0|s.length,r=0|t.length;if(1===o&&1===r)return(z=(C=s[0])-((I=C+(P=t[0]))-(U=I-C))+(P-U))?[z,I]:[I];var n,i,a=new Array(o+r),c=0,p=0,f=0,x=Math.abs,v=s[p],g=x(v),y=t[f],h=x(y);g<h?(i=v,(p+=1)<o&&(g=x(v=s[p]))):(i=y,(f+=1)<r&&(h=x(y=t[f]))),p<o&&g<h||f>=r?(n=v,(p+=1)<o&&(g=x(v=s[p]))):(n=y,(f+=1)<r&&(h=x(y=t[f])));for(var m,w,u=n+i,S=u-n,_=i-S,E=_,L=u;p<o&&f<r;)g<h?(n=v,(p+=1)<o&&(g=x(v=s[p]))):(n=y,(f+=1)<r&&(h=x(y=t[f]))),(_=(i=E)-(S=(u=n+i)-n))&&(a[c++]=_),E=L-((m=L+u)-(w=m-L))+(u-w),L=m;for(;p<o;)(_=(i=E)-(S=(u=(n=v)+i)-n))&&(a[c++]=_),E=L-((m=L+u)-(w=m-L))+(u-w),L=m,(p+=1)<o&&(v=s[p]);for(;f<r;)(_=(i=E)-(S=(u=(n=y)+i)-n))&&(a[c++]=_),E=L-((m=L+u)-(w=m-L))+(u-w),L=m,(f+=1)<r&&(y=t[f]);return E&&(a[c++]=E),L&&(a[c++]=L),c||(a[c++]=0),a.length=c,a}},8691:function(d,s,t){"use strict";d.exports=function(n){return r(o(n))};var o=t(2692),r=t(7037)},7212:function(d,s,t){"use strict";d.exports=function(a,c,p,f){if(p=p||0,void 0===f&&(f=function(u){for(var S=u.length,_=0,E=0;E<S;++E)_=0|Math.max(_,u[E].length);return _-1}(a)),0===a.length||f<1)return{cells:[],vertexIds:[],vertexWeights:[]};var x=function(u,S){for(var _=u.length,E=r.mallocUint8(_),L=0;L<_;++L)E[L]=u[L]<S|0;return E}(c,+p),v=function(u,S){for(var _=u.length,L=r.mallocUint32(2*(S*(S+1)/2*_|0)),C=0,P=0;P<_;++P)for(var I=u[P],U=(S=I.length,0);U<S;++U)for(var z=0;z<U;++z){var H=I[z],F=I[U];L[C++]=0|Math.min(H,F),L[C++]=0|Math.max(H,F)}n(o(L,[C/2|0,2]));var N=2;for(P=2;P<C;P+=2)L[P-2]===L[P]&&L[P-1]===L[P+1]||(L[N++]=L[P],L[N++]=L[P+1]);return o(L,[N/2|0,2])}(a,f),g=function(u,S,_,E){for(var L=u.data,C=u.shape[0],P=r.mallocDouble(C),I=0,U=0;U<C;++U){var z=L[2*U],H=L[2*U+1];if(_[z]!==_[H]){var F=S[z],N=S[H];L[2*I]=z,L[2*I+1]=H,P[I++]=(N-E)/(N-F)}}return u.shape[0]=I,o(P,[I])}(v,c,x,+p),y=function(u,S){var _=r.mallocInt32(2*S),E=u.shape[0],L=u.data;_[0]=0;for(var C=0,P=0;P<E;++P){var I=L[2*P];if(I!==C){for(_[2*C+1]=P;++C<I;)_[2*C]=P,_[2*C+1]=P;_[2*C]=P}}for(_[2*C+1]=E;++C<S;)_[2*C]=_[2*C+1]=E;return _}(v,0|c.length),h=i(f)(a,v.data,y,x),m=function(u){for(var S=0|u.shape[0],_=u.data,E=new Array(S),L=0;L<S;++L)E[L]=[_[2*L],_[2*L+1]];return E}(v),w=[].slice.call(g.data,0,g.shape[0]);return r.free(x),r.free(v.data),r.free(g.data),r.free(y),{cells:h,vertexIds:m,vertexWeights:w}};var o=t(5050),r=t(5306),n=t(8729),i=t(1168)},1168:function(d){"use strict";d.exports=function(t){return s[t]()};var s=[function(){return function(t,o,r,n){for(var i=t.length,a=0;a<i;++a);return[]}},function(){function t(o,r,n,i){for(var a=0|Math.min(n,i),c=0|Math.max(n,i),p=o[2*a],f=o[2*a+1];p<f;){var x=p+f>>1,v=r[2*x+1];if(v===c)return x;c<v?f=x:p=x+1}return p}return function(o,r,n,i){for(var a=o.length,c=[],p=0;p<a;++p){var f=o[p];if(2===f.length){var x=(i[f[0]]<<0)+(i[f[1]]<<1);if(0===x||3===x)continue;switch(x){case 0:case 3:break;case 1:c.push([t(n,r,f[0],f[1])]);break;case 2:c.push([t(n,r,f[1],f[0])])}}}return c}},function(){function t(o,r,n,i){for(var a=0|Math.min(n,i),c=0|Math.max(n,i),p=o[2*a],f=o[2*a+1];p<f;){var x=p+f>>1,v=r[2*x+1];if(v===c)return x;c<v?f=x:p=x+1}return p}return function(o,r,n,i){for(var a=o.length,c=[],p=0;p<a;++p){var f=o[p],x=f.length;if(3===x){if(0==(v=(i[f[0]]<<0)+(i[f[1]]<<1)+(i[f[2]]<<2))||7===v)continue;switch(v){case 0:case 7:break;case 1:c.push([t(n,r,f[0],f[2]),t(n,r,f[0],f[1])]);break;case 2:c.push([t(n,r,f[1],f[0]),t(n,r,f[1],f[2])]);break;case 3:c.push([t(n,r,f[0],f[2]),t(n,r,f[1],f[2])]);break;case 4:c.push([t(n,r,f[2],f[1]),t(n,r,f[2],f[0])]);break;case 5:c.push([t(n,r,f[2],f[1]),t(n,r,f[0],f[1])]);break;case 6:c.push([t(n,r,f[1],f[0]),t(n,r,f[2],f[0])])}}else if(2===x){var v;if(0==(v=(i[f[0]]<<0)+(i[f[1]]<<1))||3===v)continue;switch(v){case 0:case 3:break;case 1:c.push([t(n,r,f[0],f[1])]);break;case 2:c.push([t(n,r,f[1],f[0])])}}}return c}},function(){function t(o,r,n,i){for(var a=0|Math.min(n,i),c=0|Math.max(n,i),p=o[2*a],f=o[2*a+1];p<f;){var x=p+f>>1,v=r[2*x+1];if(v===c)return x;c<v?f=x:p=x+1}return p}return function(o,r,n,i){for(var a=o.length,c=[],p=0;p<a;++p){var f=o[p],x=f.length;if(4===x){if(0==(v=(i[f[0]]<<0)+(i[f[1]]<<1)+(i[f[2]]<<2)+(i[f[3]]<<3))||15===v)continue;switch(v){case 0:case 15:break;case 1:c.push([t(n,r,f[0],f[1]),t(n,r,f[0],f[2]),t(n,r,f[0],f[3])]);break;case 2:c.push([t(n,r,f[1],f[2]),t(n,r,f[1],f[0]),t(n,r,f[1],f[3])]);break;case 3:c.push([t(n,r,f[1],f[2]),t(n,r,f[0],f[2]),t(n,r,f[0],f[3])],[t(n,r,f[1],f[3]),t(n,r,f[1],f[2]),t(n,r,f[0],f[3])]);break;case 4:c.push([t(n,r,f[2],f[0]),t(n,r,f[2],f[1]),t(n,r,f[2],f[3])]);break;case 5:c.push([t(n,r,f[0],f[1]),t(n,r,f[2],f[1]),t(n,r,f[0],f[3])],[t(n,r,f[2],f[1]),t(n,r,f[2],f[3]),t(n,r,f[0],f[3])]);break;case 6:c.push([t(n,r,f[2],f[0]),t(n,r,f[1],f[0]),t(n,r,f[1],f[3])],[t(n,r,f[2],f[3]),t(n,r,f[2],f[0]),t(n,r,f[1],f[3])]);break;case 7:c.push([t(n,r,f[0],f[3]),t(n,r,f[1],f[3]),t(n,r,f[2],f[3])]);break;case 8:c.push([t(n,r,f[3],f[1]),t(n,r,f[3],f[0]),t(n,r,f[3],f[2])]);break;case 9:c.push([t(n,r,f[3],f[1]),t(n,r,f[0],f[1]),t(n,r,f[0],f[2])],[t(n,r,f[3],f[2]),t(n,r,f[3],f[1]),t(n,r,f[0],f[2])]);break;case 10:c.push([t(n,r,f[1],f[0]),t(n,r,f[3],f[0]),t(n,r,f[1],f[2])],[t(n,r,f[3],f[0]),t(n,r,f[3],f[2]),t(n,r,f[1],f[2])]);break;case 11:c.push([t(n,r,f[1],f[2]),t(n,r,f[0],f[2]),t(n,r,f[3],f[2])]);break;case 12:c.push([t(n,r,f[3],f[0]),t(n,r,f[2],f[0]),t(n,r,f[2],f[1])],[t(n,r,f[3],f[1]),t(n,r,f[3],f[0]),t(n,r,f[2],f[1])]);break;case 13:c.push([t(n,r,f[0],f[1]),t(n,r,f[2],f[1]),t(n,r,f[3],f[1])]);break;case 14:c.push([t(n,r,f[2],f[0]),t(n,r,f[1],f[0]),t(n,r,f[3],f[0])])}}else if(3===x){if(0==(v=(i[f[0]]<<0)+(i[f[1]]<<1)+(i[f[2]]<<2))||7===v)continue;switch(v){case 0:case 7:break;case 1:c.push([t(n,r,f[0],f[2]),t(n,r,f[0],f[1])]);break;case 2:c.push([t(n,r,f[1],f[0]),t(n,r,f[1],f[2])]);break;case 3:c.push([t(n,r,f[0],f[2]),t(n,r,f[1],f[2])]);break;case 4:c.push([t(n,r,f[2],f[1]),t(n,r,f[2],f[0])]);break;case 5:c.push([t(n,r,f[2],f[1]),t(n,r,f[0],f[1])]);break;case 6:c.push([t(n,r,f[1],f[0]),t(n,r,f[2],f[0])])}}else if(2===x){var v;if(0==(v=(i[f[0]]<<0)+(i[f[1]]<<1))||3===v)continue;switch(v){case 0:case 3:break;case 1:c.push([t(n,r,f[0],f[1])]);break;case 2:c.push([t(n,r,f[1],f[0])])}}}return c}}]},8211:function(d,s,t){"use strict";t(2288),t(1731),s.H=function(o,r){var n=o.length,i=o.length-r.length,a=Math.min;if(i)return i;switch(n){case 0:return 0;case 1:return o[0]-r[0];case 2:return(f=o[0]+o[1]-r[0]-r[1])||a(o[0],o[1])-a(r[0],r[1]);case 3:var c=o[0]+o[1],p=r[0]+r[1];if(f=c+o[2]-(p+r[2]))return f;var f,x=a(o[0],o[1]),v=a(r[0],r[1]);return(f=a(x,o[2])-a(v,r[2]))||a(x+o[2],c)-a(v+r[2],p);default:var g=o.slice(0);g.sort();var y=r.slice(0);y.sort();for(var h=0;h<n;++h)if(i=g[h]-y[h])return i;return 0}}},9392:function(d,s){"use strict";function t(r){var n=32;return(r&=-r)&&n--,65535&r&&(n-=16),16711935&r&&(n-=8),252645135&r&&(n-=4),858993459&r&&(n-=2),1431655765&r&&(n-=1),n}s.INT_BITS=32,s.INT_MAX=2147483647,s.INT_MIN=-2147483648,s.sign=function(r){return(r>0)-(r<0)},s.abs=function(r){var n=r>>31;return(r^n)-n},s.min=function(r,n){return n^(r^n)&-(r<n)},s.max=function(r,n){return r^(r^n)&-(r<n)},s.isPow2=function(r){return!(r&r-1||!r)},s.log2=function(r){var n,i;return n=(r>65535)<<4,n|=i=((r>>>=n)>255)<<3,n|=i=((r>>>=i)>15)<<2,(n|=i=((r>>>=i)>3)<<1)|(r>>>=i)>>1},s.log10=function(r){return r>=1e9?9:r>=1e8?8:r>=1e7?7:r>=1e6?6:r>=1e5?5:r>=1e4?4:r>=1e3?3:r>=100?2:r>=10?1:0},s.popCount=function(r){return 16843009*((r=(858993459&(r-=r>>>1&1431655765))+(r>>>2&858993459))+(r>>>4)&252645135)>>>24},s.countTrailingZeros=t,s.nextPow2=function(r){return r+=0===r,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,1+((r|=r>>>8)|r>>>16)},s.prevPow2=function(r){return r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,(r|=r>>>16)-(r>>>1)},s.parity=function(r){return r^=r>>>16,r^=r>>>8,r^=r>>>4,27030>>>(r&=15)&1};var o=new Array(256);(function(r){for(var n=0;n<256;++n){var i=n,a=n,c=7;for(i>>>=1;i;i>>>=1)a<<=1,a|=1&i,--c;r[n]=a<<c&255}})(o),s.reverse=function(r){return o[255&r]<<24|o[r>>>8&255]<<16|o[r>>>16&255]<<8|o[r>>>24&255]},s.interleave2=function(r,n){return(r=1431655765&((r=858993459&((r=252645135&((r=16711935&((r&=65535)|r<<8))|r<<4))|r<<2))|r<<1))|(n=1431655765&((n=858993459&((n=252645135&((n=16711935&((n&=65535)|n<<8))|n<<4))|n<<2))|n<<1))<<1},s.deinterleave2=function(r,n){return(r=65535&((r=16711935&((r=252645135&((r=858993459&((r=r>>>n&1431655765)|r>>>1))|r>>>2))|r>>>4))|r>>>16))<<16>>16},s.interleave3=function(r,n,i){return r=1227133513&((r=3272356035&((r=251719695&((r=4278190335&((r&=1023)|r<<16))|r<<8))|r<<4))|r<<2),(r|=(n=1227133513&((n=3272356035&((n=251719695&((n=4278190335&((n&=1023)|n<<16))|n<<8))|n<<4))|n<<2))<<1)|(i=1227133513&((i=3272356035&((i=251719695&((i=4278190335&((i&=1023)|i<<16))|i<<8))|i<<4))|i<<2))<<2},s.deinterleave3=function(r,n){return(r=1023&((r=4278190335&((r=251719695&((r=3272356035&((r=r>>>n&1227133513)|r>>>2))|r>>>4))|r>>>8))|r>>>16))<<22>>22},s.nextCombination=function(r){var n=r|r-1;return n+1|(~n&-~n)-1>>>t(r)+1}},6656:function(d,s,t){"use strict";var o=t(9392),r=t(9521);function n(v,g){var y=v.length,h=v.length-g.length,m=Math.min;if(h)return h;switch(y){case 0:return 0;case 1:return v[0]-g[0];case 2:return(S=v[0]+v[1]-g[0]-g[1])||m(v[0],v[1])-m(g[0],g[1]);case 3:var w=v[0]+v[1],u=g[0]+g[1];if(S=w+v[2]-(u+g[2]))return S;var S,_=m(v[0],v[1]),E=m(g[0],g[1]);return(S=m(_,v[2])-m(E,g[2]))||m(_+v[2],w)-m(E+g[2],u);default:var L=v.slice(0);L.sort();var C=g.slice(0);C.sort();for(var P=0;P<y;++P)if(h=L[P]-C[P])return h;return 0}}function i(v,g){return n(v[0],g[0])}function a(v,g){if(g){for(var y=v.length,h=new Array(y),m=0;m<y;++m)h[m]=[v[m],g[m]];for(h.sort(i),m=0;m<y;++m)v[m]=h[m][0],g[m]=h[m][1];return v}return v.sort(n),v}function c(v){if(0===v.length)return[];for(var g=1,y=v.length,h=1;h<y;++h){var m=v[h];if(n(m,v[h-1])){if(h===g){g++;continue}v[g++]=m}}return v.length=g,v}function p(v,g){for(var y=0,h=v.length-1,m=-1;y<=h;){var w=y+h>>1,u=n(v[w],g);u<=0?(0===u&&(m=w),y=w+1):u>0&&(h=w-1)}return m}function f(v,g){for(var y=new Array(v.length),h=0,m=y.length;h<m;++h)y[h]=[];for(var w=[],u=(h=0,g.length);h<u;++h)for(var S=g[h],_=S.length,E=1,L=1<<_;E<L;++E){w.length=o.popCount(E);for(var C=0,P=0;P<_;++P)E&1<<P&&(w[C++]=S[P]);var I=p(v,w);if(!(I<0))for(;y[I++].push(h),!(I>=v.length||0!==n(v[I],w)););}return y}function x(v,g){if(g<0)return[];for(var y=[],h=(1<<g+1)-1,m=0;m<v.length;++m)for(var w=v[m],u=h;u<1<<w.length;u=o.nextCombination(u)){for(var S=new Array(g+1),_=0,E=0;E<w.length;++E)u&1<<E&&(S[_++]=w[E]);y.push(S)}return a(y)}s.dimension=function(v){for(var g=0,y=Math.max,h=0,m=v.length;h<m;++h)g=y(g,v[h].length);return g-1},s.countVertices=function(v){for(var g=-1,y=Math.max,h=0,m=v.length;h<m;++h)for(var w=v[h],u=0,S=w.length;u<S;++u)g=y(g,w[u]);return g+1},s.cloneCells=function(v){for(var g=new Array(v.length),y=0,h=v.length;y<h;++y)g[y]=v[y].slice(0);return g},s.compareCells=n,s.normalize=a,s.unique=c,s.findCell=p,s.incidence=f,s.dual=function(v,g){if(!g)return f(c(x(v,0)),v);for(var y=new Array(g),h=0;h<g;++h)y[h]=[];h=0;for(var m=v.length;h<m;++h)for(var w=v[h],u=0,S=w.length;u<S;++u)y[w[u]].push(h);return y},s.explode=function(v){for(var g=[],y=0,h=v.length;y<h;++y)for(var m=v[y],w=0|m.length,u=1,S=1<<w;u<S;++u){for(var _=[],E=0;E<w;++E)u>>>E&1&&_.push(m[E]);g.push(_)}return a(g)},s.skeleton=x,s.boundary=function(v){for(var g=[],y=0,h=v.length;y<h;++y)for(var m=v[y],w=0,u=m.length;w<u;++w){for(var S=new Array(m.length-1),_=0,E=0;_<u;++_)_!==w&&(S[E++]=m[_]);g.push(S)}return a(g)},s.connectedComponents=function(v,g){return g?function(y,h){for(var m=new r(h),w=0;w<y.length;++w)for(var u=y[w],S=0;S<u.length;++S)for(var _=S+1;_<u.length;++_)m.link(u[S],u[_]);var E=[],L=m.ranks;for(w=0;w<L.length;++w)L[w]=-1;for(w=0;w<y.length;++w){var C=m.find(y[w][0]);L[C]<0?(L[C]=E.length,E.push([y[w].slice(0)])):E[L[C]].push(y[w].slice(0))}return E}(v,g):function(y){for(var h=c(a(x(y,0))),m=new r(h.length),w=0;w<y.length;++w)for(var u=y[w],S=0;S<u.length;++S)for(var _=p(h,[u[S]]),E=S+1;E<u.length;++E)m.link(_,p(h,[u[E]]));var L=[],C=m.ranks;for(w=0;w<C.length;++w)C[w]=-1;for(w=0;w<y.length;++w){var P=m.find(p(h,[y[w][0]]));C[P]<0?(C[P]=L.length,L.push([y[w].slice(0)])):L[C[P]].push(y[w].slice(0))}return L}(v)}},9521:function(d){"use strict";function s(t){this.roots=new Array(t),this.ranks=new Array(t);for(var o=0;o<t;++o)this.roots[o]=o,this.ranks[o]=0}d.exports=s,s.prototype.length=function(){return this.roots.length},s.prototype.makeSet=function(){var t=this.roots.length;return this.roots.push(t),this.ranks.push(0),t},s.prototype.find=function(t){for(var o=this.roots;o[t]!==t;){var r=o[t];o[t]=o[r],t=r}return t},s.prototype.link=function(t,o){var r=this.find(t),n=this.find(o);if(r!==n){var i=this.ranks,a=this.roots,c=i[r],p=i[n];c<p?a[r]=n:p<c?a[n]=r:(a[n]=r,++i[r])}}},8243:function(d,s,t){"use strict";d.exports=function(n,i,a){for(var c=i.length,p=n.length,f=new Array(c),x=new Array(c),v=new Array(c),g=new Array(c),y=0;y<c;++y)f[y]=x[y]=-1,v[y]=1/0,g[y]=!1;for(y=0;y<p;++y){var h=n[y];if(2!==h.length)throw new Error("Input must be a graph");var m=h[1],w=h[0];x[w]=-1!==x[w]?-2:m,f[m]=-1!==f[m]?-2:w}function u(G){if(g[G])return 1/0;var W,X,K=f[G],re=x[G];return K<0||re<0?1/0:(W=i[K],X=i[re],Math.abs(o(i[G],W,X))/Math.sqrt(Math.pow(W[0]-X[0],2)+Math.pow(W[1]-X[1],2)))}function S(G,V){var W=z[G],X=z[V];z[G]=X,z[V]=W,H[W]=V,H[X]=G}function _(G){return v[z[G]]}function E(G){return 1&G?G-1>>1:(G>>1)-1}function L(G){for(var V=_(G);;){var W=V,X=2*G+1,K=2*(G+1),re=G;if(X<F){var ee=_(X);ee<W&&(re=X,W=ee)}if(K<F&&_(K)<W&&(re=K),re===G)return G;S(G,re),G=re}}function C(G){for(var V=_(G);G>0;){var W=E(G);if(!(W>=0&&V<_(W)))return G;S(G,W),G=W}}function P(){if(F>0){var G=z[0];return S(0,F-1),F-=1,L(0),G}return-1}function I(G,V){var W=z[G];return v[W]===V?G:(v[W]=-1/0,C(G),P(),v[W]=V,C((F+=1)-1))}function U(G){if(!g[G]){g[G]=!0;var V=f[G],W=x[G];f[W]>=0&&(f[W]=V),x[V]>=0&&(x[V]=W),H[V]>=0&&I(H[V],u(V)),H[W]>=0&&I(H[W],u(W))}}var z=[],H=new Array(c);for(y=0;y<c;++y)(v[y]=u(y))<1/0?(H[y]=z.length,z.push(y)):H[y]=-1;var F=z.length;for(y=F>>1;y>=0;--y)L(y);for(;;){var N=P();if(N<0||v[N]>a)break;U(N)}var B=[];for(y=0;y<c;++y)g[y]||(H[y]=B.length,B.push(i[y].slice()));function j(G,V){if(G[V]<0)return V;var W=V,X=V;do{var K=G[X];if(!g[X]||K<0||K===X||(K=G[X=K],!g[X]||K<0||K===X))break;X=K,W=G[W]}while(W!==X);for(var re=V;re!==X;re=G[re])G[re]=X;return X}var J=[];return n.forEach(function(G){var V=j(f,G[0]),W=j(x,G[1]);if(V>=0&&W>=0&&V!==W){var X=H[V],K=H[W];X!==K&&J.push([X,K])}}),r.unique(r.normalize(J)),{positions:B,edges:J}};var o=t(417),r=t(6656)},6638:function(d,s,t){"use strict";d.exports=function(n,i){var a,c,p,f;if(i[0][0]<i[1][0])a=i[0],c=i[1];else{if(!(i[0][0]>i[1][0]))return r(i,n);a=i[1],c=i[0]}if(n[0][0]<n[1][0])p=n[0],f=n[1];else{if(!(n[0][0]>n[1][0]))return-r(n,i);p=n[1],f=n[0]}var x=o(a,c,f),v=o(a,c,p);if(x<0){if(v<=0)return x}else if(x>0){if(v>=0)return x}else if(v)return v;if(x=o(f,p,c),v=o(f,p,a),x<0){if(v<=0)return x}else if(x>0){if(v>=0)return x}else if(v)return v;return c[0]-f[0]};var o=t(417);function r(n,i){var a,c,p,f;if(i[0][0]<i[1][0])a=i[0],c=i[1];else{if(!(i[0][0]>i[1][0])){var x=Math.min(n[0][1],n[1][1]),v=Math.max(n[0][1],n[1][1]),g=Math.min(i[0][1],i[1][1]),y=Math.max(i[0][1],i[1][1]);return v<g?v-g:x>y?x-y:v-y}a=i[1],c=i[0]}n[0][1]<n[1][1]?(p=n[0],f=n[1]):(p=n[1],f=n[0]);var h=o(c,a,p);return h||(h=o(c,a,f))||f-c}},4385:function(d,s,t){"use strict";d.exports=function(v){for(var g=v.length,y=2*g,h=new Array(y),m=0;m<g;++m){var w=v[m],u=w[0][0]<w[1][0];h[2*m]=new x(w[0][0],w,u,m),h[2*m+1]=new x(w[1][0],w,!u,m)}h.sort(function(U,z){var H=U.x-z.x;return H||(H=U.create-z.create)||Math.min(U.segment[0][1],U.segment[1][1])-Math.min(z.segment[0][1],z.segment[1][1])});var S=r(i),_=[],E=[],L=[];for(m=0;m<y;){for(var C=h[m].x,P=[];m<y;){var I=h[m];if(I.x!==C)break;m+=1,I.segment[0][0]===I.x&&I.segment[1][0]===I.x?I.create&&(I.segment[0][1]<I.segment[1][1]?(P.push(new f(I.segment[0][1],I.index,!0,!0)),P.push(new f(I.segment[1][1],I.index,!1,!1))):(P.push(new f(I.segment[1][1],I.index,!0,!1)),P.push(new f(I.segment[0][1],I.index,!1,!0)))):S=I.create?S.insert(I.segment,I.index):S.remove(I.segment)}_.push(S.root),E.push(C),L.push(P)}return new a(_,E,L)};var o=t(5070),r=t(7080),n=t(417),i=t(6638);function a(v,g,y){this.slabs=v,this.coordinates=g,this.horizontal=y}function c(v,g){return v.y-g}function p(v,g){for(var y=null;v;){var h,m,w=v.key;w[0][0]<w[1][0]?(h=w[0],m=w[1]):(h=w[1],m=w[0]);var u=n(h,m,g);if(u<0)v=v.left;else if(u>0)if(g[0]!==w[1][0])y=v,v=v.right;else{if(S=p(v.right,g))return S;v=v.left}else{if(g[0]!==w[1][0])return v;var S;if(S=p(v.right,g))return S;v=v.left}}return y}function f(v,g,y,h){this.y=v,this.index=g,this.start=y,this.closed=h}function x(v,g,y,h){this.x=v,this.segment=g,this.create=y,this.index=h}a.prototype.castUp=function(v){var g=o.le(this.coordinates,v[0]);if(g<0)return-1;var y=p(this.slabs[g],v),h=-1;if(y&&(h=y.value),this.coordinates[g]===v[0]){var m=null;if(y&&(m=y.key),g>0){var w=p(this.slabs[g-1],v);w&&(m?i(w.key,m)>0&&(m=w.key,h=w.value):(h=w.value,m=w.key))}var u=this.horizontal[g];if(u.length>0){var S=o.ge(u,v[1],c);if(S<u.length){var _=u[S];if(v[1]===_.y){if(_.closed)return _.index;for(;S<u.length-1&&u[S+1].y===v[1];)if((_=u[S+=1]).closed)return _.index;if(_.y===v[1]&&!_.start){if((S+=1)>=u.length)return h;_=u[S]}}if(_.start)if(m){var E=n(m[0],m[1],[v[0],_.y]);m[0][0]>m[1][0]&&(E=-E),E>0&&(h=_.index)}else h=_.index;else _.y!==v[1]&&(h=_.index)}}}return h}},4670:function(d,s,t){"use strict";var o=t(9130),r=t(9662);function n(a,c){var p=r(o(a,c),[c[c.length-1]]);return p[p.length-1]}function i(a,c,p,f){var x=-c/(f-c);x<0?x=0:x>1&&(x=1);for(var v=1-x,g=a.length,y=new Array(g),h=0;h<g;++h)y[h]=x*a[h]+v*p[h];return y}d.exports=function(a,c){for(var p=[],f=[],x=n(a[a.length-1],c),v=a[a.length-1],g=a[0],y=0;y<a.length;++y,v=g){var h=n(g=a[y],c);if(x<0&&h>0||x>0&&h<0){var m=i(v,h,g,x);p.push(m),f.push(m.slice())}h<0?f.push(g.slice()):h>0?p.push(g.slice()):(p.push(g.slice()),f.push(g.slice())),x=h}return{positive:p,negative:f}},d.exports.positive=function(a,c){for(var p=[],f=n(a[a.length-1],c),x=a[a.length-1],v=a[0],g=0;g<a.length;++g,x=v){var y=n(v=a[g],c);(f<0&&y>0||f>0&&y<0)&&p.push(i(x,y,v,f)),y>=0&&p.push(v.slice()),f=y}return p},d.exports.negative=function(a,c){for(var p=[],f=n(a[a.length-1],c),x=a[a.length-1],v=a[0],g=0;g<a.length;++g,x=v){var y=n(v=a[g],c);(f<0&&y>0||f>0&&y<0)&&p.push(i(x,y,v,f)),y<=0&&p.push(v.slice()),f=y}return p}},8974:function(d,s,t){var o;!function(){"use strict";var r={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 n(f){return function a(f,x){var v,g,y,h,m,w,u,S,_,E=1,L=f.length,C="";for(g=0;g<L;g++)if("string"==typeof f[g])C+=f[g];else if("object"==typeof f[g]){if((h=f[g]).keys)for(v=x[E],y=0;y<h.keys.length;y++){if(null==v)throw new Error(n('[sprintf] Cannot access property "%s" of undefined value "%s"',h.keys[y],h.keys[y-1]));v=v[h.keys[y]]}else v=h.param_no?x[h.param_no]:x[E++];if(r.not_type.test(h.type)&&r.not_primitive.test(h.type)&&v instanceof Function&&(v=v()),r.numeric_arg.test(h.type)&&"number"!=typeof v&&isNaN(v))throw new TypeError(n("[sprintf] expecting number but found %T",v));switch(r.number.test(h.type)&&(S=v>=0),h.type){case"b":v=parseInt(v,10).toString(2);break;case"c":v=String.fromCharCode(parseInt(v,10));break;case"d":case"i":v=parseInt(v,10);break;case"j":v=JSON.stringify(v,null,h.width?parseInt(h.width):0);break;case"e":v=h.precision?parseFloat(v).toExponential(h.precision):parseFloat(v).toExponential();break;case"f":v=h.precision?parseFloat(v).toFixed(h.precision):parseFloat(v);break;case"g":v=h.precision?String(Number(v.toPrecision(h.precision))):parseFloat(v);break;case"o":v=(parseInt(v,10)>>>0).toString(8);break;case"s":v=String(v),v=h.precision?v.substring(0,h.precision):v;break;case"t":v=String(!!v),v=h.precision?v.substring(0,h.precision):v;break;case"T":v=Object.prototype.toString.call(v).slice(8,-1).toLowerCase(),v=h.precision?v.substring(0,h.precision):v;break;case"u":v=parseInt(v,10)>>>0;break;case"v":v=v.valueOf(),v=h.precision?v.substring(0,h.precision):v;break;case"x":v=(parseInt(v,10)>>>0).toString(16);break;case"X":v=(parseInt(v,10)>>>0).toString(16).toUpperCase()}r.json.test(h.type)?C+=v:(!r.number.test(h.type)||S&&!h.sign?_="":(_=S?"+":"-",v=v.toString().replace(r.sign,"")),w=h.pad_char?"0"===h.pad_char?"0":h.pad_char.charAt(1):" ",u=h.width-(_+v).length,m=h.width&&u>0?w.repeat(u):"",C+=h.align?_+v+m:"0"===w?_+m+v:m+_+v)}return C}(function p(f){if(c[f])return c[f];for(var x,v=f,g=[],y=0;v;){if(null!==(x=r.text.exec(v)))g.push(x[0]);else if(null!==(x=r.modulo.exec(v)))g.push("%");else{if(null===(x=r.placeholder.exec(v)))throw new SyntaxError("[sprintf] unexpected placeholder");if(x[2]){y|=1;var h=[],m=x[2],w=[];if(null===(w=r.key.exec(m)))throw new SyntaxError("[sprintf] failed to parse named argument key");for(h.push(w[1]);""!==(m=m.substring(w[0].length));)if(null!==(w=r.key_access.exec(m)))h.push(w[1]);else{if(null===(w=r.index_access.exec(m)))throw new SyntaxError("[sprintf] failed to parse named argument key");h.push(w[1])}x[2]=h}else y|=2;if(3===y)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");g.push({placeholder:x[0],param_no:x[1],keys:x[2],sign:x[3],pad_char:x[4],align:x[5],width:x[6],precision:x[7],type:x[8]})}v=v.substring(x[0].length)}return c[f]=g}(f),arguments)}function i(f,x){return n.apply(null,[f].concat(x||[]))}var c=Object.create(null);s.sprintf=n,s.vsprintf=i,typeof window<"u"&&(window.sprintf=n,window.vsprintf=i,void 0===(o=function(){return{sprintf:n,vsprintf:i}}.call(s,t,s,d))||(d.exports=o))}()},4162:function(d,s,t){"use strict";d.exports=function(a,c){if(a.dimension<=0)return{positions:[],cells:[]};if(1===a.dimension)return function(x,v){for(var g=r(x,v),y=g.length,h=new Array(y),m=new Array(y),w=0;w<y;++w)h[w]=[g[w]],m[w]=[w];return{positions:h,cells:m}}(a,c);var p=a.order.join()+"-"+a.dtype,f=i[p];return c=+c||0,f||(f=i[p]=function(x,v){var y=n[x.length+"d"];if(y)return y(o,x,v)}(a.order,a.dtype)),f(a,c)};var o=t(9284),r=t(9584),n={"2d":function(a,c,p){var f=a({order:c,scalarArguments:3,getters:"generic"===p?[0]:void 0,phase:function(x,v,g,y){return x>y|0},vertex:function(x,v,g,y,h,m,w,u,S,_,E,L,C){var P=(w<<0)+(u<<1)+(S<<2)+(_<<3)|0;if(0!==P&&15!==P)switch(P){case 0:case 15:E.push([x-.5,v-.5]);break;case 1:E.push([x-.25-.25*(y+g-2*C)/(g-y),v-.25-.25*(h+g-2*C)/(g-h)]);break;case 2:E.push([x-.75-.25*(-y-g+2*C)/(y-g),v-.25-.25*(m+y-2*C)/(y-m)]);break;case 3:E.push([x-.5,v-.5-.5*(h+g+m+y-4*C)/(g-h+y-m)]);break;case 4:E.push([x-.25-.25*(m+h-2*C)/(h-m),v-.75-.25*(-h-g+2*C)/(h-g)]);break;case 5:E.push([x-.5-.5*(y+g+m+h-4*C)/(g-y+h-m),v-.5]);break;case 6:E.push([x-.5-.25*(-y-g+m+h)/(y-g+h-m),v-.5-.25*(-h-g+m+y)/(h-g+y-m)]);break;case 7:E.push([x-.75-.25*(m+h-2*C)/(h-m),v-.75-.25*(m+y-2*C)/(y-m)]);break;case 8:E.push([x-.75-.25*(-m-h+2*C)/(m-h),v-.75-.25*(-m-y+2*C)/(m-y)]);break;case 9:E.push([x-.5-.25*(y+g+-m-h)/(g-y+m-h),v-.5-.25*(h+g+-m-y)/(g-h+m-y)]);break;case 10:E.push([x-.5-.5*(-y-g-m-h+4*C)/(y-g+m-h),v-.5]);break;case 11:E.push([x-.25-.25*(-m-h+2*C)/(m-h),v-.75-.25*(h+g-2*C)/(g-h)]);break;case 12:E.push([x-.5,v-.5-.5*(-h-g-m-y+4*C)/(h-g+m-y)]);break;case 13:E.push([x-.75-.25*(y+g-2*C)/(g-y),v-.25-.25*(-m-y+2*C)/(m-y)]);break;case 14:E.push([x-.25-.25*(-y-g+2*C)/(y-g),v-.25-.25*(-h-g+2*C)/(h-g)])}},cell:function(x,v,g,y,h,m,w,u,S){u.push(h?[x,v]:[v,x])}});return function(x,v){var g=[],y=[];return f(x,g,y,v),{positions:g,cells:y}}}},i={}},6946:function(d,s,t){"use strict";d.exports=function i(a,c,p){p=p||{};var f=n[a];f||(f=n[a]={" ":{data:new Float32Array(0),shape:.2}});var x=f[c];if(!x)if(c.length<=1||!/\d/.test(c))x=f[c]=function(L){for(var C=L.cells,P=L.positions,I=new Float32Array(6*C.length),U=0,z=0,H=0;H<C.length;++H)for(var F=C[H],N=0;N<3;++N){var B=P[F[N]];I[U++]=B[0],I[U++]=B[1]+1.4,z=Math.max(B[0],z)}return{data:I,shape:z}}(o(c,{triangles:!0,font:a,textAlign:p.textAlign||"left",textBaseline:"alphabetic",styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}}));else{for(var v=c.split(/(\d|\s)/),g=new Array(v.length),y=0,h=0,m=0;m<v.length;++m)g[m]=i(a,v[m]),y+=g[m].data.length,h+=g[m].shape,m>0&&(h+=.02);var w=new Float32Array(y),u=0,S=-.5*h;for(m=0;m<g.length;++m){for(var _=g[m].data,E=0;E<_.length;E+=2)w[u++]=_[E]+S,w[u++]=_[E+1];S+=g[m].shape+.02}x=f[c]={data:w,shape:h}}return x};var o=t(875),r=window||A.global||{},n=r.__TEXT_CACHE||{};r.__TEXT_CACHE={}},14:function(d,s,t){"use strict";var o=t(4405);function r(i,a){var c=o(getComputedStyle(i).getPropertyValue(a));return c[0]*n(c[1],i)}function n(i,a){switch(a=a||document.body,i=(i||"px").trim().toLowerCase(),a!==window&&a!==document||(a=document.body),i){case"%":return a.clientHeight/100;case"ch":case"ex":return function(c,p){var f=document.createElement("div");f.style["font-size"]="128"+c,p.appendChild(f);var x=r(f,"font-size")/128;return p.removeChild(f),x}(i,a);case"em":return r(a,"font-size");case"rem":return r(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 96;case"cm":return 37.79527559055118;case"mm":return 3.7795275590551185;case"pt":return 1.3333333333333333;case"pc":return 16}return 1}d.exports=n},3440:function(d,s,t){"use strict";d.exports=function(h){var m=(h=h||{}).center||[0,0,0],w=h.up||[0,1,0],u=h.right||x(w),S=h.radius||1,_=h.theta||0,E=h.phi||0;if(m=[].slice.call(m,0,3),w=[].slice.call(w,0,3),a(w,w),u=[].slice.call(u,0,3),a(u,u),"eye"in h){var L=h.eye,C=[L[0]-m[0],L[1]-m[1],L[2]-m[2]];i(u,C,w),p(u[0],u[1],u[2])<1e-6?u=x(w):a(u,u),S=p(C[0],C[1],C[2]);var P=c(w,C)/S,I=c(u,C)/S;E=Math.acos(P),_=Math.acos(I)}return S=Math.log(S),new v(h.zoomMin,h.zoomMax,m,w,u,S,_,E)};var o=t(8444),r=t(7437),n=t(4422),i=t(903),a=t(899),c=t(9305);function p(h,m,w){return Math.sqrt(Math.pow(h,2)+Math.pow(m,2)+Math.pow(w,2))}function f(h){return Math.min(1,Math.max(-1,h))}function x(h){var m=Math.abs(h[0]),w=Math.abs(h[1]),u=Math.abs(h[2]),S=[0,0,0];m>Math.max(w,u)?S[2]=1:w>Math.max(m,u)?S[0]=1:S[1]=1;for(var _=0,E=0,L=0;L<3;++L)_+=h[L]*h[L],E+=S[L]*h[L];for(L=0;L<3;++L)S[L]-=E/_*h[L];return a(S,S),S}function v(h,m,w,u,S,_,E,L){this.center=o(w),this.up=o(u),this.right=o(S),this.radius=o([_]),this.angle=o([E,L]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(h,m),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 C=0;C<16;++C)this.computedMatrix[C]=.5;this.recalcMatrix(0)}var g=v.prototype;g.setDistanceLimits=function(h,m){h=h>0?Math.log(h):-1/0,m=m>0?Math.log(m):1/0,m=Math.max(m,h),this.radius.bounds[0][0]=h,this.radius.bounds[1][0]=m},g.getDistanceLimits=function(h){var m=this.radius.bounds[0];return h?(h[0]=Math.exp(m[0][0]),h[1]=Math.exp(m[1][0]),h):[Math.exp(m[0][0]),Math.exp(m[1][0])]},g.recalcMatrix=function(h){this.center.curve(h),this.up.curve(h),this.right.curve(h),this.radius.curve(h),this.angle.curve(h);for(var m=this.computedUp,w=this.computedRight,u=0,S=0,_=0;_<3;++_)S+=m[_]*w[_],u+=m[_]*m[_];var E=Math.sqrt(u),L=0;for(_=0;_<3;++_)w[_]-=m[_]*S/u,L+=w[_]*w[_],m[_]/=E;var C=Math.sqrt(L);for(_=0;_<3;++_)w[_]/=C;var P=this.computedToward;i(P,m,w),a(P,P);var I=Math.exp(this.computedRadius[0]),U=this.computedAngle[0],z=this.computedAngle[1],H=Math.cos(U),F=Math.sin(U),N=Math.cos(z),B=Math.sin(z),j=this.computedCenter,J=H*N,G=F*N,V=B,W=-H*B,X=-F*B,K=N,re=this.computedEye,ee=this.computedMatrix;for(_=0;_<3;++_){var ie=J*w[_]+G*P[_]+V*m[_];ee[4*_+1]=W*w[_]+X*P[_]+K*m[_],ee[4*_+2]=ie,ee[4*_+3]=0}var oe=ee[1],ce=ee[5],me=ee[9],de=ee[2],he=ee[6],ve=ee[10],Pe=ce*ve-me*he,xe=me*de-oe*ve,ke=oe*he-ce*de,Ae=p(Pe,xe,ke);for(xe/=Ae,ke/=Ae,ee[0]=Pe/=Ae,ee[4]=xe,ee[8]=ke,_=0;_<3;++_)re[_]=j[_]+ee[2+4*_]*I;for(_=0;_<3;++_){L=0;for(var Te=0;Te<3;++Te)L+=ee[_+4*Te]*re[Te];ee[12+_]=-L}ee[15]=1},g.getMatrix=function(h,m){this.recalcMatrix(h);var w=this.computedMatrix;if(m){for(var u=0;u<16;++u)m[u]=w[u];return m}return w};var y=[0,0,0];g.rotate=function(h,m,w,u){if(this.angle.move(h,m,w),u){this.recalcMatrix(h);var S=this.computedMatrix;y[0]=S[2],y[1]=S[6],y[2]=S[10];for(var _=this.computedUp,E=this.computedRight,L=this.computedToward,C=0;C<3;++C)S[4*C]=_[C],S[4*C+1]=E[C],S[4*C+2]=L[C];for(n(S,S,u,y),C=0;C<3;++C)_[C]=S[4*C],E[C]=S[4*C+1];this.up.set(h,_[0],_[1],_[2]),this.right.set(h,E[0],E[1],E[2])}},g.pan=function(h,m,w,u){m=m||0,w=w||0,u=u||0,this.recalcMatrix(h);var S=this.computedMatrix,_=(Math.exp(this.computedRadius[0]),S[1]),E=S[5],L=S[9],C=p(_,E,L),P=S[0],I=S[4],U=S[8],z=P*(_/=C)+I*(E/=C)+U*(L/=C),H=p(P-=_*z,I-=E*z,U-=L*z),F=(P/=H)*m+_*w,N=(I/=H)*m+E*w,B=(U/=H)*m+L*w;this.center.move(h,F,N,B);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+u),this.radius.set(h,Math.log(j))},g.translate=function(h,m,w,u){this.center.move(h,m||0,w||0,u||0)},g.setMatrix=function(h,m,w,u){var S=1;"number"==typeof w&&(S=0|w),(S<0||S>3)&&(S=1);var _=(S+2)%3;m||(this.recalcMatrix(h),m=this.computedMatrix);var E=m[S],L=m[S+4],C=m[S+8];if(u){var P=Math.abs(E),I=Math.abs(L),U=Math.abs(C),z=Math.max(P,I,U);P===z?(E=E<0?-1:1,L=C=0):U===z?(C=C<0?-1:1,E=L=0):(L=L<0?-1:1,E=C=0)}else{var H=p(E,L,C);E/=H,L/=H,C/=H}var F,N,B=m[_],j=m[_+4],J=m[_+8],G=B*E+j*L+J*C,V=p(B-=E*G,j-=L*G,J-=C*G),W=L*(J/=V)-C*(j/=V),X=C*(B/=V)-E*J,K=E*j-L*B,re=p(W,X,K);if(W/=re,X/=re,K/=re,this.center.jump(h,ye,Me,Ie),this.radius.idle(h),this.up.jump(h,E,L,C),this.right.jump(h,B,j,J),2===S){var ee=m[1],ie=m[5],oe=m[9];F=Pe<0?-Math.PI/2:Math.PI/2,N=Math.atan2(ee*W+ie*X+oe*K,ee*B+ie*j+oe*J)}else{var de=m[2],he=m[6],ve=m[10],Pe=de*E+he*L+ve*C,xe=de*B+he*j+ve*J,ke=de*W+he*X+ve*K;F=Math.asin(f(Pe)),N=Math.atan2(ke,xe)}this.angle.jump(h,N,F),this.recalcMatrix(h);var Ae=m[2],Te=m[6],Q=m[10],se=this.computedMatrix;r(se,m);var fe=se[15],ye=se[12]/fe,Me=se[13]/fe,Ie=se[14]/fe,Ce=Math.exp(this.computedRadius[0]);this.center.jump(h,ye-Ae*Ce,Me-Te*Ce,Ie-Q*Ce)},g.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},g.idle=function(h){this.center.idle(h),this.up.idle(h),this.right.idle(h),this.radius.idle(h),this.angle.idle(h)},g.flush=function(h){this.center.flush(h),this.up.flush(h),this.right.flush(h),this.radius.flush(h),this.angle.flush(h)},g.setDistance=function(h,m){m>0&&this.radius.set(h,Math.log(m))},g.lookAt=function(h,m,w,u){this.recalcMatrix(h),m=m||this.computedEye,w=w||this.computedCenter;var S=(u=u||this.computedUp)[0],_=u[1],E=u[2],L=p(S,_,E);if(!(L<1e-6)){S/=L,_/=L,E/=L;var C=m[0]-w[0],P=m[1]-w[1],I=m[2]-w[2],U=p(C,P,I);if(!(U<1e-6)){C/=U,P/=U,I/=U;var z=this.computedRight,H=z[0],F=z[1],N=z[2],B=S*H+_*F+E*N,j=p(H-=B*S,F-=B*_,N-=B*E);if(!(j<.01&&(j=p(H=_*I-E*P,F=E*C-S*I,N=S*P-_*C))<1e-6)){H/=j,F/=j,N/=j,this.up.set(h,S,_,E),this.right.set(h,H,F,N),this.center.set(h,w[0],w[1],w[2]),this.radius.set(h,Math.log(U));var J=_*N-E*F,G=E*H-S*N,V=S*F-_*H,W=p(J,G,V),K=H*C+F*P+N*I,re=(J/=W)*C+(G/=W)*P+(V/=W)*I,ee=Math.asin(f(S*C+_*P+E*I)),ie=Math.atan2(re,K),oe=this.angle._state,ce=oe[oe.length-1],me=oe[oe.length-2];ce%=2*Math.PI;var de=Math.abs(ce+2*Math.PI-ie),he=Math.abs(ce-ie),ve=Math.abs(ce-2*Math.PI-ie);de<he&&(ce+=2*Math.PI),ve<he&&(ce-=2*Math.PI),this.angle.jump(this.angle.lastT(),ce,me),this.angle.set(h,ie,ee)}}}}},9660:function(d){"use strict";d.exports=function(t,o,r){var n=t*o,i=s*t,a=i-(i-t),c=t-a,p=s*o,f=p-(p-o),x=o-f,v=c*x-(n-a*f-c*f-a*x);return r?(r[0]=v,r[1]=n,r):[v,n]};var s=+(Math.pow(2,27)+1)},87:function(d){"use strict";d.exports=function(s,t,o){var r=s+t,n=r-s,i=t-n,a=s-(r-n);return o?(o[0]=a+i,o[1]=r,o):[a+i,r]}},5306:function(d,s,t){"use strict";var o=t(2288),r=t(3094),n=t(2146).lW;t.g.__TYPEDARRAY_POOL||(t.g.__TYPEDARRAY_POOL={UINT8:r([32,0]),UINT16:r([32,0]),UINT32:r([32,0]),BIGUINT64:r([32,0]),INT8:r([32,0]),INT16:r([32,0]),INT32:r([32,0]),BIGINT64:r([32,0]),FLOAT:r([32,0]),DOUBLE:r([32,0]),DATA:r([32,0]),UINT8C:r([32,0]),BUFFER:r([32,0])});var i=typeof Uint8ClampedArray<"u",a=typeof BigUint64Array<"u",c=typeof BigInt64Array<"u",p=t.g.__TYPEDARRAY_POOL;p.UINT8C||(p.UINT8C=r([32,0])),p.BIGUINT64||(p.BIGUINT64=r([32,0])),p.BIGINT64||(p.BIGINT64=r([32,0])),p.BUFFER||(p.BUFFER=r([32,0]));var f=p.DATA,x=p.BUFFER;function v(z){if(z){var F=o.log2(z.length||z.byteLength);f[F].push(z)}}function g(z){z=o.nextPow2(z);var H=o.log2(z),F=f[H];return F.length>0?F.pop():new ArrayBuffer(z)}function y(z){return new Uint8Array(g(z),0,z)}function h(z){return new Uint16Array(g(2*z),0,z)}function m(z){return new Uint32Array(g(4*z),0,z)}function w(z){return new Int8Array(g(z),0,z)}function u(z){return new Int16Array(g(2*z),0,z)}function S(z){return new Int32Array(g(4*z),0,z)}function _(z){return new Float32Array(g(4*z),0,z)}function E(z){return new Float64Array(g(8*z),0,z)}function L(z){return i?new Uint8ClampedArray(g(z),0,z):y(z)}function C(z){return a?new BigUint64Array(g(8*z),0,z):null}function P(z){return c?new BigInt64Array(g(8*z),0,z):null}function I(z){return new DataView(g(z),0,z)}function U(z){z=o.nextPow2(z);var H=o.log2(z),F=x[H];return F.length>0?F.pop():new n(z)}s.free=function(z){if(n.isBuffer(z))x[o.log2(z.length)].push(z);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(z)&&(z=z.buffer),!z)return;var F=0|o.log2(z.length||z.byteLength);f[F].push(z)}},s.freeUint8=s.freeUint16=s.freeUint32=s.freeBigUint64=s.freeInt8=s.freeInt16=s.freeInt32=s.freeBigInt64=s.freeFloat32=s.freeFloat=s.freeFloat64=s.freeDouble=s.freeUint8Clamped=s.freeDataView=function(z){v(z.buffer)},s.freeArrayBuffer=v,s.freeBuffer=function(z){x[o.log2(z.length)].push(z)},s.malloc=function(z,H){if(void 0===H||"arraybuffer"===H)return g(z);switch(H){case"uint8":return y(z);case"uint16":return h(z);case"uint32":return m(z);case"int8":return w(z);case"int16":return u(z);case"int32":return S(z);case"float":case"float32":return _(z);case"double":case"float64":return E(z);case"uint8_clamped":return L(z);case"bigint64":return P(z);case"biguint64":return C(z);case"buffer":return U(z);case"data":case"dataview":return I(z);default:return null}return null},s.mallocArrayBuffer=g,s.mallocUint8=y,s.mallocUint16=h,s.mallocUint32=m,s.mallocInt8=w,s.mallocInt16=u,s.mallocInt32=S,s.mallocFloat32=s.mallocFloat=_,s.mallocFloat64=s.mallocDouble=E,s.mallocUint8Clamped=L,s.mallocBigUint64=C,s.mallocBigInt64=P,s.mallocDataView=I,s.mallocBuffer=U,s.clearCache=function(){for(var z=0;z<32;++z)p.UINT8[z].length=0,p.UINT16[z].length=0,p.UINT32[z].length=0,p.INT8[z].length=0,p.INT16[z].length=0,p.INT32[z].length=0,p.FLOAT[z].length=0,p.DOUBLE[z].length=0,p.BIGUINT64[z].length=0,p.BIGINT64[z].length=0,p.UINT8C[z].length=0,f[z].length=0,x[z].length=0}},1731:function(d){"use strict";function s(o){this.roots=new Array(o),this.ranks=new Array(o);for(var r=0;r<o;++r)this.roots[r]=r,this.ranks[r]=0}d.exports=s;var t=s.prototype;Object.defineProperty(t,"length",{get:function(){return this.roots.length}}),t.makeSet=function(){var o=this.roots.length;return this.roots.push(o),this.ranks.push(0),o},t.find=function(o){for(var r=o,n=this.roots;n[o]!==o;)o=n[o];for(;n[r]!==o;){var i=n[r];n[r]=o,r=i}return o},t.link=function(o,r){var n=this.find(o),i=this.find(r);if(n!==i){var a=this.ranks,c=this.roots,p=a[n],f=a[i];p<f?c[n]=i:f<p?c[i]=n:(c[i]=n,++a[n])}}},1215:function(d){"use strict";d.exports=function(s,t,o){return 0===s.length?s:t?(o||s.sort(t),function(r,n){for(var i=1,a=r.length,c=r[0],p=r[0],f=1;f<a;++f)if(p=c,n(c=r[f],p)){if(f===i){i++;continue}r[i++]=c}return r.length=i,r}(s,t)):(o||s.sort(),function(r){for(var n=1,i=r.length,a=r[0],c=r[0],p=1;p<i;++p,c=a)if(c=a,(a=r[p])!==c){if(p===n){n++;continue}r[n++]=a}return r.length=n,r}(s))}},875:function(d,s,t){"use strict";d.exports=function(i,a){return"object"==typeof a&&null!==a||(a={}),o(i,a.canvas||r,a.context||n,a)};var o=t(712),r=null,n=null;typeof document<"u"&&((r=document.createElement("canvas")).width=8192,r.height=1024,n=r.getContext("2d"))},712:function(d,s,t){d.exports=function(h,m,w,u){var S=64,_=1.25,E={breaklines:!1,bolds:!1,italics:!1,subscripts:!1,superscripts:!1};return u&&(u.size&&u.size>0&&(S=u.size),u.lineSpacing&&u.lineSpacing>0&&(_=u.lineSpacing),u.styletags&&u.styletags.breaklines&&(E.breaklines=!!u.styletags.breaklines),u.styletags&&u.styletags.bolds&&(E.bolds=!!u.styletags.bolds),u.styletags&&u.styletags.italics&&(E.italics=!!u.styletags.italics),u.styletags&&u.styletags.subscripts&&(E.subscripts=!!u.styletags.subscripts),u.styletags&&u.styletags.superscripts&&(E.superscripts=!!u.styletags.superscripts)),w.font=[u.fontStyle,u.fontVariant,u.fontWeight,S+"px",u.font].filter(function(L){return L}).join(" "),w.textAlign="start",w.textBaseline="alphabetic",w.direction="ltr",y(function(L,C,P,I,U,z){P=(P=P.replace(/\n/g,"")).replace(/\<br\>/g,!0===z.breaklines?"\n":" ");var H="",F=[];for(J=0;J<P.length;++J)F[J]=H;!0===z.bolds&&(F=x("b",p,P,F)),!0===z.italics&&(F=x("i",f,P,F)),!0===z.superscripts&&(F=x("sup","+1",P,F)),!0===z.subscripts&&(F=x("sub","-1",P,F));var N=[],B="";for(J=0;J<P.length;++J)null!==F[J]&&(B+=P[J],N.push(F[J]));var j,J,G,V,W,X=B.split("\n"),K=X.length,re=Math.round(U*I),ee=I,ie=2*I,oe=0,ce=K*re+ie;L.height<ce&&(L.height=ce),C.fillStyle="#000",C.fillRect(0,0,L.width,L.height),C.fillStyle="#fff";var me=0,de="";function he(){if(""!==de){var se=C.measureText(de).width;C.fillText(de,ee+G,ie+V),G+=se}}function ve(){return Math.round(W)+"px "}function Pe(se,fe){var ye=""+C.font;if(!0===z.subscripts){var Me=se.indexOf("-"),Ie=fe.indexOf("-"),Ce=Me>-1?parseInt(se[1+Me]):0,Re=Ie>-1?parseInt(fe[1+Ie]):0;Ce!==Re&&(ye=ye.replace(ve(),"?px "),W*=Math.pow(.75,Re-Ce),ye=ye.replace("?px ",ve())),V+=.25*re*(Re-Ce)}if(!0===z.superscripts){var le=se.indexOf("+"),ge=fe.indexOf("+"),_e=le>-1?parseInt(se[1+le]):0,Fe=ge>-1?parseInt(fe[1+ge]):0;_e!==Fe&&(ye=ye.replace(ve(),"?px "),W*=Math.pow(.75,Fe-_e),ye=ye.replace("?px ",ve())),V-=.25*re*(Fe-_e)}if(!0===z.bolds){var Ve=se.indexOf(p)>-1,He=fe.indexOf(p)>-1;!Ve&&He&&(ye=nt?ye.replace("italic ","italic bold "):"bold "+ye),Ve&&!He&&(ye=ye.replace("bold ",""))}if(!0===z.italics){var nt=se.indexOf(f)>-1,tt=fe.indexOf(f)>-1;!nt&&tt&&(ye="italic "+ye),nt&&!tt&&(ye=ye.replace("italic ",""))}C.font=ye}for(j=0;j<K;++j){var xe=X[j]+"\n";for(G=0,V=j*re,W=I,de="",J=0;J<xe.length;++J){var ke=J+me<N.length?N[J+me]:N[N.length-1];H===ke?de+=xe[J]:(he(),de=xe[J],void 0!==ke&&(Pe(H,ke),H=ke))}he(),me+=xe.length;var Ae=0|Math.round(G+2*ee);oe<Ae&&(oe=Ae)}var Te=oe,Q=ie+re*K;return r(C.getImageData(0,0,Te,Q).data,[Q,Te,4]).pick(-1,-1,0).transpose(1,0)}(m,w,h,S,_,E),u,S)},d.exports.processPixels=y;var o=t(4162),r=t(5050),n=t(8243),i=t(197),a=t(7761),c=t(8040),p="b|",f="i|";function x(h,m,w,u){for(var S="<"+h+">",_="</"+h+">",E=S.length,L=_.length,C="+"===m[0]||"-"===m[0],P=0,I=-L;P>-1&&-1!==(P=w.indexOf(S,P))&&-1!==(I=w.indexOf(_,P+E))&&!(I<=P);){for(var U=P;U<I+L;++U)if(U<P+E||U>=I)u[U]=null,w=w.substr(0,U)+" "+w.substr(U+1);else if(null!==u[U]){var z=u[U].indexOf(m[0]);-1===z?u[U]+=m:C&&(u[U]=u[U].substr(0,z+1)+(1+parseInt(u[U][z+1]))+u[U].substr(z+2))}var H=P+E,F=w.substr(H,I-H).indexOf(S);P=-1!==F?F:I+L}return u}function g(h,m,w,u){var S=function v(h,m){var w=o(h,128);return m?n(w.cells,w.positions,.25):{edges:w.cells,positions:w.positions}}(h,u),_=function(j,J,G){for(var V=J.textAlign||"start",W=J.textBaseline||"alphabetic",X=[1<<30,1<<30],K=[0,0],re=j.length,ee=0;ee<re;++ee)for(var ie=j[ee],oe=0;oe<2;++oe)X[oe]=0|Math.min(X[oe],ie[oe]),K[oe]=0|Math.max(K[oe],ie[oe]);var ce=0;switch(V){case"center":ce=-.5*(X[0]+K[0]);break;case"right":case"end":ce=-K[0];break;case"left":case"start":ce=-X[0];break;default:throw new Error("vectorize-text: Unrecognized textAlign: '"+V+"'")}var me=0;switch(W){case"hanging":case"top":me=-X[1];break;case"middle":me=-.5*(X[1]+K[1]);break;case"alphabetic":case"ideographic":me=-3*G;break;case"bottom":me=-K[1];break;default:throw new Error("vectorize-text: Unrecoginized textBaseline: '"+W+"'")}var de=1/G;return"lineHeight"in J?de*=+J.lineHeight:"width"in J?de=J.width/(K[0]-X[0]):"height"in J&&(de=J.height/(K[1]-X[1])),j.map(function(he){return[de*(he[0]+ce),de*(he[1]+me)]})}(S.positions,m,w),E=S.edges,L="ccw"===m.orientation;if(i(_,E),m.polygons||m.polygon||m.polyline){for(var C=c(E,_),P=new Array(C.length),I=0;I<C.length;++I){for(var U=C[I],z=new Array(U.length),H=0;H<U.length;++H){for(var F=U[H],N=new Array(F.length),B=0;B<F.length;++B)N[B]=_[F[B]].slice();L&&N.reverse(),z[H]=N}P[I]=z}return P}return m.triangles||m.triangulate||m.triangle?{cells:a(_,E,{delaunay:!1,exterior:!1,interior:!0}),positions:_}:{edges:E,positions:_}}function y(h,m,w){try{return g(h,m,w,!0)}catch{}try{return g(h,m,w,!1)}catch{}return m.polygons||m.polyline||m.polygon?[]:m.triangles||m.triangulate||m.triangle?{cells:[],positions:[]}:{edges:[],positions:[]}}},5346:function(d){!function(){"use strict";if(typeof ses>"u"||!ses.ok||ses.ok()){typeof ses<"u"&&(ses.weakMapPermitHostObjects=m);var s=!1;if("function"==typeof WeakMap){var t=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var o=new t,r=Object.freeze({});if(o.set(r,1),1===o.get(r))return void(d.exports=WeakMap);s=!0}}var n=Object.getOwnPropertyNames,i=Object.defineProperty,a=Object.isExtensible,c="weakmap:",p="weakmap:ident:"+Math.random()+"___";if(typeof crypto<"u"&&"function"==typeof crypto.getRandomValues&&"function"==typeof ArrayBuffer&&"function"==typeof Uint8Array){var f=new ArrayBuffer(25),x=new Uint8Array(f);crypto.getRandomValues(x),p="weakmap:rand:"+Array.prototype.map.call(x,function(E){return(E%36).toString(36)}).join("")+"___"}if(i(Object,"getOwnPropertyNames",{value:function(E){return n(E).filter(w)}}),"getPropertyNames"in Object){var v=Object.getPropertyNames;i(Object,"getPropertyNames",{value:function(E){return v(E).filter(w)}})}!function(){var E=Object.freeze;i(Object,"freeze",{value:function(P){return u(P),E(P)}});var L=Object.seal;i(Object,"seal",{value:function(P){return u(P),L(P)}});var C=Object.preventExtensions;i(Object,"preventExtensions",{value:function(P){return u(P),C(P)}})}();var g=!1,y=0,h=function(){this instanceof h||_();var E=[],L=[],C=y++;return Object.create(h.prototype,{get___:{value:S(function(P,I){var U,z=u(P);return z?C in z?z[C]:I:(U=E.indexOf(P))>=0?L[U]:I})},has___:{value:S(function(P){var I=u(P);return I?C in I:E.indexOf(P)>=0})},set___:{value:S(function(P,I){var U,z=u(P);return z?z[C]=I:(U=E.indexOf(P))>=0?L[U]=I:(L[U=E.length]=I,E[U]=P),this})},delete___:{value:S(function(P){var I,U,z=u(P);return z?C in z&&delete z[C]:!((I=E.indexOf(P))<0||(U=E.length-1,E[I]=void 0,L[I]=L[U],E[I]=E[U],E.length=U,L.length=U,0))})}})};h.prototype=Object.create(Object.prototype,{get:{value:function(E,L){return this.get___(E,L)},writable:!0,configurable:!0},has:{value:function(E){return this.has___(E)},writable:!0,configurable:!0},set:{value:function(E,L){return this.set___(E,L)},writable:!0,configurable:!0},delete:{value:function(E){return this.delete___(E)},writable:!0,configurable:!0}}),"function"==typeof t?function(){function E(){this instanceof h||_();var L,C=new t,P=void 0,I=!1;return L=s?function(U,z){return C.set(U,z),C.has(U)||(P||(P=new h),P.set(U,z)),this}:function(U,z){if(I)try{C.set(U,z)}catch{P||(P=new h),P.set___(U,z)}else C.set(U,z);return this},Object.create(h.prototype,{get___:{value:S(function(U,z){return P?C.has(U)?C.get(U):P.get___(U,z):C.get(U,z)})},has___:{value:S(function(U){return C.has(U)||!!P&&P.has___(U)})},set___:{value:S(L)},delete___:{value:S(function(U){var z=!!C.delete(U);return P&&P.delete___(U)||z})},permitHostObjects___:{value:S(function(U){if(U!==m)throw new Error("bogus call to permitHostObjects___");I=!0})}})}s&&typeof Proxy<"u"&&(Proxy=void 0),E.prototype=h.prototype,d.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),d.exports=h)}function m(E){E.permitHostObjects___&&E.permitHostObjects___(m)}function w(E){return!(E.substr(0,c.length)==c&&"___"===E.substr(E.length-3))}function u(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var L=E[p];if(L&&L.key===E)return L;if(a(E)){L={key:E};try{return i(E,p,{value:L,writable:!1,enumerable:!1,configurable:!1}),L}catch{return}}}function S(E){return E.prototype=null,Object.freeze(E)}function _(){g||typeof console>"u"||(g=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}}()},9222:function(d,s,t){var o=t(7178);d.exports=function(){var r={};return function(n){if(("object"!=typeof n||null===n)&&"function"!=typeof n)throw new Error("Weakmap-shim: Key must be object");var i=n.valueOf(r);return i&&i.identity===r?i:o(n,r)}}},7178:function(d){d.exports=function(s,t){var o={identity:t},r=s.valueOf;return Object.defineProperty(s,"valueOf",{value:function(n){return n!==t?r.apply(this,arguments):o},writable:!0}),o}},4037:function(d,s,t){var o=t(9222);d.exports=function(){var r=o();return{get:function(n,i){var a=r(n);return a.hasOwnProperty("value")?a.value:i},set:function(n,i){return r(n).value=i,this},has:function(n){return"value"in r(n)},delete:function(n){return delete r(n).value}}}},6183:function(d){"use strict";var s,t;d.exports=(s=function(){return function(s,t,o,r,n,i){var a=s[0],c=o[0],p=[0],f=c;r|=0;var x=0,v=c;for(x=0;x<a;++x){var g=t[r]-i,y=t[r+f]-i;g>=0!=y>=0&&n.push(p[0]+.5+.5*(g+y)/(g-y)),r+=v,++p[0]}}}.bind(void 0,{funcName:"zeroCrossings"}),t={},function(o,r,n){var i=o.dtype,a=o.order,c=[i,a.join()].join(),p=t[c];return p||(t[c]=p=s([i,a])),p(o.shape.slice(0),o.data,o.stride,0|o.offset,r,n)})},9584:function(d,s,t){"use strict";d.exports=function(r,n){var i=[];return n=+n||0,o(r.hi(r.shape[0]-1),i,n),i};var o=t(6183)},6601:function(){}},T={};function b(d){var s=T[d];if(void 0!==s)return s.exports;var t=T[d]={id:d,loaded:!1,exports:{}};return l[d].call(t.exports,t,t.exports,b),t.loaded=!0,t.exports}return b.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),b.nmd=function(d){return d.paths=[],d.children||(d.children=[]),d},b(7386)}()},$.exports=k()},12856:function($,R,e){"use strict";function l(Q,se){return(l=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(fe,ye){return fe.__proto__=ye,fe})(Q,se)}function b(Q){if(void 0===Q)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Q}function d(Q){return(d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(se){return se.__proto__||Object.getPrototypeOf(se)})(Q)}function s(Q){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(se){return typeof se}:function(se){return se&&"function"==typeof Symbol&&se.constructor===Symbol&&se!==Symbol.prototype?"symbol":typeof se})(Q)}var t=e(95341),o=e(95280),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;R.Buffer=a,R.SlowBuffer=function(Q){return+Q!=Q&&(Q=0),a.alloc(+Q)},R.INSPECT_MAX_BYTES=50;var n=2147483647;function i(Q){if(Q>n)throw new RangeError('The value "'+Q+'" is invalid for option "size"');var se=new Uint8Array(Q);return Object.setPrototypeOf(se,a.prototype),se}function a(Q,se,fe){if("number"==typeof Q){if("string"==typeof se)throw new TypeError('The "string" argument must be of type string. Received type number');return f(Q)}return c(Q,se,fe)}function c(Q,se,fe){if("string"==typeof Q)return function(Ie,Ce){if("string"==typeof Ce&&""!==Ce||(Ce="utf8"),!a.isEncoding(Ce))throw new TypeError("Unknown encoding: "+Ce);var Re=0|y(Ie,Ce),le=i(Re),ge=le.write(Ie,Ce);return ge!==Re&&(le=le.slice(0,ge)),le}(Q,se);if(ArrayBuffer.isView(Q))return function(Ie){if(Pe(Ie,Uint8Array)){var Ce=new Uint8Array(Ie);return v(Ce.buffer,Ce.byteOffset,Ce.byteLength)}return x(Ie)}(Q);if(null==Q)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+s(Q));if(Pe(Q,ArrayBuffer)||Q&&Pe(Q.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pe(Q,SharedArrayBuffer)||Q&&Pe(Q.buffer,SharedArrayBuffer)))return v(Q,se,fe);if("number"==typeof Q)throw new TypeError('The "value" argument must not be of type number. Received type number');var ye=Q.valueOf&&Q.valueOf();if(null!=ye&&ye!==Q)return a.from(ye,se,fe);var Me=function(Ie){if(a.isBuffer(Ie)){var Ce=0|g(Ie.length),Re=i(Ce);return 0===Re.length||Ie.copy(Re,0,0,Ce),Re}return void 0!==Ie.length?"number"!=typeof Ie.length||xe(Ie.length)?i(0):x(Ie):"Buffer"===Ie.type&&Array.isArray(Ie.data)?x(Ie.data):void 0}(Q);if(Me)return Me;if(typeof Symbol<"u"&&null!=Symbol.toPrimitive&&"function"==typeof Q[Symbol.toPrimitive])return a.from(Q[Symbol.toPrimitive]("string"),se,fe);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+s(Q))}function p(Q){if("number"!=typeof Q)throw new TypeError('"size" argument must be of type number');if(Q<0)throw new RangeError('The value "'+Q+'" is invalid for option "size"')}function f(Q){return p(Q),i(Q<0?0:0|g(Q))}function x(Q){for(var se=Q.length<0?0:0|g(Q.length),fe=i(se),ye=0;ye<se;ye+=1)fe[ye]=255&Q[ye];return fe}function v(Q,se,fe){if(se<0||Q.byteLength<se)throw new RangeError('"offset" is outside of buffer bounds');if(Q.byteLength<se+(fe||0))throw new RangeError('"length" is outside of buffer bounds');var ye;return ye=void 0===se&&void 0===fe?new Uint8Array(Q):void 0===fe?new Uint8Array(Q,se):new Uint8Array(Q,se,fe),Object.setPrototypeOf(ye,a.prototype),ye}function g(Q){if(Q>=n)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+n.toString(16)+" bytes");return 0|Q}function y(Q,se){if(a.isBuffer(Q))return Q.length;if(ArrayBuffer.isView(Q)||Pe(Q,ArrayBuffer))return Q.byteLength;if("string"!=typeof Q)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+s(Q));var fe=Q.length,ye=arguments.length>2&&!0===arguments[2];if(!ye&&0===fe)return 0;for(var Me=!1;;)switch(se){case"ascii":case"latin1":case"binary":return fe;case"utf8":case"utf-8":return de(Q).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*fe;case"hex":return fe>>>1;case"base64":return he(Q).length;default:if(Me)return ye?-1:de(Q).length;se=(""+se).toLowerCase(),Me=!0}}function h(Q,se,fe){var ye=!1;if((void 0===se||se<0)&&(se=0),se>this.length||((void 0===fe||fe>this.length)&&(fe=this.length),fe<=0)||(fe>>>=0)<=(se>>>=0))return"";for(Q||(Q="utf8");;)switch(Q){case"hex":return F(this,se,fe);case"utf8":case"utf-8":return I(this,se,fe);case"ascii":return z(this,se,fe);case"latin1":case"binary":return H(this,se,fe);case"base64":return P(this,se,fe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N(this,se,fe);default:if(ye)throw new TypeError("Unknown encoding: "+Q);Q=(Q+"").toLowerCase(),ye=!0}}function m(Q,se,fe){var ye=Q[se];Q[se]=Q[fe],Q[fe]=ye}function w(Q,se,fe,ye,Me){if(0===Q.length)return-1;if("string"==typeof fe?(ye=fe,fe=0):fe>2147483647?fe=2147483647:fe<-2147483648&&(fe=-2147483648),xe(fe=+fe)&&(fe=Me?0:Q.length-1),fe<0&&(fe=Q.length+fe),fe>=Q.length){if(Me)return-1;fe=Q.length-1}else if(fe<0){if(!Me)return-1;fe=0}if("string"==typeof se&&(se=a.from(se,ye)),a.isBuffer(se))return 0===se.length?-1:u(Q,se,fe,ye,Me);if("number"==typeof se)return se&=255,"function"==typeof Uint8Array.prototype.indexOf?Me?Uint8Array.prototype.indexOf.call(Q,se,fe):Uint8Array.prototype.lastIndexOf.call(Q,se,fe):u(Q,[se],fe,ye,Me);throw new TypeError("val must be string, number or Buffer")}function u(Q,se,fe,ye,Me){var Ie,Ce=1,Re=Q.length,le=se.length;if(void 0!==ye&&("ucs2"===(ye=String(ye).toLowerCase())||"ucs-2"===ye||"utf16le"===ye||"utf-16le"===ye)){if(Q.length<2||se.length<2)return-1;Ce=2,Re/=2,le/=2,fe/=2}function ge(He,nt){return 1===Ce?He[nt]:He.readUInt16BE(nt*Ce)}if(Me){var _e=-1;for(Ie=fe;Ie<Re;Ie++)if(ge(Q,Ie)===ge(se,-1===_e?0:Ie-_e)){if(-1===_e&&(_e=Ie),Ie-_e+1===le)return _e*Ce}else-1!==_e&&(Ie-=Ie-_e),_e=-1}else for(fe+le>Re&&(fe=Re-le),Ie=fe;Ie>=0;Ie--){for(var Fe=!0,Ve=0;Ve<le;Ve++)if(ge(Q,Ie+Ve)!==ge(se,Ve)){Fe=!1;break}if(Fe)return Ie}return-1}function S(Q,se,fe,ye){fe=Number(fe)||0;var Me=Q.length-fe;ye?(ye=Number(ye))>Me&&(ye=Me):ye=Me;var Ie,Ce=se.length;for(ye>Ce/2&&(ye=Ce/2),Ie=0;Ie<ye;++Ie){var Re=parseInt(se.substr(2*Ie,2),16);if(xe(Re))return Ie;Q[fe+Ie]=Re}return Ie}function _(Q,se,fe,ye){return ve(de(se,Q.length-fe),Q,fe,ye)}function E(Q,se,fe,ye){return ve(function(Me){for(var Ie=[],Ce=0;Ce<Me.length;++Ce)Ie.push(255&Me.charCodeAt(Ce));return Ie}(se),Q,fe,ye)}function L(Q,se,fe,ye){return ve(he(se),Q,fe,ye)}function C(Q,se,fe,ye){return ve(function(Me,Ie){for(var Ce,Re,ge=[],_e=0;_e<Me.length&&!((Ie-=2)<0);++_e)Re=(Ce=Me.charCodeAt(_e))>>8,ge.push(Ce%256),ge.push(Re);return ge}(se,Q.length-fe),Q,fe,ye)}function P(Q,se,fe){return t.fromByteArray(0===se&&fe===Q.length?Q:Q.slice(se,fe))}function I(Q,se,fe){fe=Math.min(Q.length,fe);for(var ye=[],Me=se;Me<fe;){var Ie=Q[Me],Ce=null,Re=Ie>239?4:Ie>223?3:Ie>191?2:1;if(Me+Re<=fe){var le=void 0,ge=void 0,_e=void 0,Fe=void 0;switch(Re){case 1:Ie<128&&(Ce=Ie);break;case 2:128==(192&(le=Q[Me+1]))&&(Fe=(31&Ie)<<6|63&le)>127&&(Ce=Fe);break;case 3:ge=Q[Me+2],128==(192&(le=Q[Me+1]))&&128==(192&ge)&&(Fe=(15&Ie)<<12|(63&le)<<6|63&ge)>2047&&(Fe<55296||Fe>57343)&&(Ce=Fe);break;case 4:ge=Q[Me+2],_e=Q[Me+3],128==(192&(le=Q[Me+1]))&&128==(192&ge)&&128==(192&_e)&&(Fe=(15&Ie)<<18|(63&le)<<12|(63&ge)<<6|63&_e)>65535&&Fe<1114112&&(Ce=Fe)}}null===Ce?(Ce=65533,Re=1):Ce>65535&&(ye.push((Ce-=65536)>>>10&1023|55296),Ce=56320|1023&Ce),ye.push(Ce),Me+=Re}return function(Ve){var He=Ve.length;if(He<=U)return String.fromCharCode.apply(String,Ve);for(var nt="",tt=0;tt<He;)nt+=String.fromCharCode.apply(String,Ve.slice(tt,tt+=U));return nt}(ye)}R.kMaxLength=n,(a.TYPED_ARRAY_SUPPORT=function(){try{var Q=new Uint8Array(1),se={foo:function(){return 42}};return Object.setPrototypeOf(se,Uint8Array.prototype),Object.setPrototypeOf(Q,se),42===Q.foo()}catch{return!1}}())||typeof console>"u"||"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(a.prototype,"parent",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.buffer}}),Object.defineProperty(a.prototype,"offset",{enumerable:!0,get:function(){if(a.isBuffer(this))return this.byteOffset}}),a.poolSize=8192,a.from=function(Q,se,fe){return c(Q,se,fe)},Object.setPrototypeOf(a.prototype,Uint8Array.prototype),Object.setPrototypeOf(a,Uint8Array),a.alloc=function(Q,se,fe){return Me=se,Ie=fe,p(ye=Q),ye<=0?i(ye):void 0!==Me?"string"==typeof Ie?i(ye).fill(Me,Ie):i(ye).fill(Me):i(ye);var ye,Me,Ie},a.allocUnsafe=function(Q){return f(Q)},a.allocUnsafeSlow=function(Q){return f(Q)},a.isBuffer=function(Q){return null!=Q&&!0===Q._isBuffer&&Q!==a.prototype},a.compare=function(Q,se){if(Pe(Q,Uint8Array)&&(Q=a.from(Q,Q.offset,Q.byteLength)),Pe(se,Uint8Array)&&(se=a.from(se,se.offset,se.byteLength)),!a.isBuffer(Q)||!a.isBuffer(se))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Q===se)return 0;for(var fe=Q.length,ye=se.length,Me=0,Ie=Math.min(fe,ye);Me<Ie;++Me)if(Q[Me]!==se[Me]){fe=Q[Me],ye=se[Me];break}return fe<ye?-1:ye<fe?1:0},a.isEncoding=function(Q){switch(String(Q).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}},a.concat=function(Q,se){if(!Array.isArray(Q))throw new TypeError('"list" argument must be an Array of Buffers');if(0===Q.length)return a.alloc(0);var fe;if(void 0===se)for(se=0,fe=0;fe<Q.length;++fe)se+=Q[fe].length;var ye=a.allocUnsafe(se),Me=0;for(fe=0;fe<Q.length;++fe){var Ie=Q[fe];if(Pe(Ie,Uint8Array))Me+Ie.length>ye.length?(a.isBuffer(Ie)||(Ie=a.from(Ie)),Ie.copy(ye,Me)):Uint8Array.prototype.set.call(ye,Ie,Me);else{if(!a.isBuffer(Ie))throw new TypeError('"list" argument must be an Array of Buffers');Ie.copy(ye,Me)}Me+=Ie.length}return ye},a.byteLength=y,a.prototype._isBuffer=!0,a.prototype.swap16=function(){var Q=this.length;if(Q%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var se=0;se<Q;se+=2)m(this,se,se+1);return this},a.prototype.swap32=function(){var Q=this.length;if(Q%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var se=0;se<Q;se+=4)m(this,se,se+3),m(this,se+1,se+2);return this},a.prototype.swap64=function(){var Q=this.length;if(Q%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var se=0;se<Q;se+=8)m(this,se,se+7),m(this,se+1,se+6),m(this,se+2,se+5),m(this,se+3,se+4);return this},a.prototype.toString=function(){var Q=this.length;return 0===Q?"":0===arguments.length?I(this,0,Q):h.apply(this,arguments)},a.prototype.toLocaleString=a.prototype.toString,a.prototype.equals=function(Q){if(!a.isBuffer(Q))throw new TypeError("Argument must be a Buffer");return this===Q||0===a.compare(this,Q)},a.prototype.inspect=function(){var Q="",se=R.INSPECT_MAX_BYTES;return Q=this.toString("hex",0,se).replace(/(.{2})/g,"$1 ").trim(),this.length>se&&(Q+=" ... "),"<Buffer "+Q+">"},r&&(a.prototype[r]=a.prototype.inspect),a.prototype.compare=function(Q,se,fe,ye,Me){if(Pe(Q,Uint8Array)&&(Q=a.from(Q,Q.offset,Q.byteLength)),!a.isBuffer(Q))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+s(Q));if(void 0===se&&(se=0),void 0===fe&&(fe=Q?Q.length:0),void 0===ye&&(ye=0),void 0===Me&&(Me=this.length),se<0||fe>Q.length||ye<0||Me>this.length)throw new RangeError("out of range index");if(ye>=Me&&se>=fe)return 0;if(ye>=Me)return-1;if(se>=fe)return 1;if(this===Q)return 0;for(var Ie=(Me>>>=0)-(ye>>>=0),Ce=(fe>>>=0)-(se>>>=0),Re=Math.min(Ie,Ce),le=this.slice(ye,Me),ge=Q.slice(se,fe),_e=0;_e<Re;++_e)if(le[_e]!==ge[_e]){Ie=le[_e],Ce=ge[_e];break}return Ie<Ce?-1:Ce<Ie?1:0},a.prototype.includes=function(Q,se,fe){return-1!==this.indexOf(Q,se,fe)},a.prototype.indexOf=function(Q,se,fe){return w(this,Q,se,fe,!0)},a.prototype.lastIndexOf=function(Q,se,fe){return w(this,Q,se,fe,!1)},a.prototype.write=function(Q,se,fe,ye){if(void 0===se)ye="utf8",fe=this.length,se=0;else if(void 0===fe&&"string"==typeof se)ye=se,fe=this.length,se=0;else{if(!isFinite(se))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");se>>>=0,isFinite(fe)?(fe>>>=0,void 0===ye&&(ye="utf8")):(ye=fe,fe=void 0)}var Me=this.length-se;if((void 0===fe||fe>Me)&&(fe=Me),Q.length>0&&(fe<0||se<0)||se>this.length)throw new RangeError("Attempt to write outside buffer bounds");ye||(ye="utf8");for(var Ie=!1;;)switch(ye){case"hex":return S(this,Q,se,fe);case"utf8":case"utf-8":return _(this,Q,se,fe);case"ascii":case"latin1":case"binary":return E(this,Q,se,fe);case"base64":return L(this,Q,se,fe);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return C(this,Q,se,fe);default:if(Ie)throw new TypeError("Unknown encoding: "+ye);ye=(""+ye).toLowerCase(),Ie=!0}},a.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var U=4096;function z(Q,se,fe){var ye="";fe=Math.min(Q.length,fe);for(var Me=se;Me<fe;++Me)ye+=String.fromCharCode(127&Q[Me]);return ye}function H(Q,se,fe){var ye="";fe=Math.min(Q.length,fe);for(var Me=se;Me<fe;++Me)ye+=String.fromCharCode(Q[Me]);return ye}function F(Q,se,fe){var ye=Q.length;(!se||se<0)&&(se=0),(!fe||fe<0||fe>ye)&&(fe=ye);for(var Me="",Ie=se;Ie<fe;++Ie)Me+=ke[Q[Ie]];return Me}function N(Q,se,fe){for(var ye=Q.slice(se,fe),Me="",Ie=0;Ie<ye.length-1;Ie+=2)Me+=String.fromCharCode(ye[Ie]+256*ye[Ie+1]);return Me}function B(Q,se,fe){if(Q%1!=0||Q<0)throw new RangeError("offset is not uint");if(Q+se>fe)throw new RangeError("Trying to access beyond buffer length")}function j(Q,se,fe,ye,Me,Ie){if(!a.isBuffer(Q))throw new TypeError('"buffer" argument must be a Buffer instance');if(se>Me||se<Ie)throw new RangeError('"value" argument is out of bounds');if(fe+ye>Q.length)throw new RangeError("Index out of range")}function J(Q,se,fe,ye,Me){ie(se,ye,Me,Q,fe,7);var Ie=Number(se&BigInt(4294967295));Q[fe++]=Ie,Q[fe++]=Ie>>=8,Q[fe++]=Ie>>=8,Q[fe++]=Ie>>=8;var Ce=Number(se>>BigInt(32)&BigInt(4294967295));return Q[fe++]=Ce,Q[fe++]=Ce>>=8,Q[fe++]=Ce>>=8,Q[fe++]=Ce>>=8,fe}function G(Q,se,fe,ye,Me){ie(se,ye,Me,Q,fe,7);var Ie=Number(se&BigInt(4294967295));Q[fe+7]=Ie,Q[fe+6]=Ie>>=8,Q[fe+5]=Ie>>=8,Q[fe+4]=Ie>>=8;var Ce=Number(se>>BigInt(32)&BigInt(4294967295));return Q[fe+3]=Ce,Q[fe+2]=Ce>>=8,Q[fe+1]=Ce>>=8,Q[fe]=Ce>>=8,fe+8}function V(Q,se,fe,ye,Me,Ie){if(fe+ye>Q.length)throw new RangeError("Index out of range");if(fe<0)throw new RangeError("Index out of range")}function W(Q,se,fe,ye,Me){return se=+se,fe>>>=0,Me||V(Q,0,fe,4),o.write(Q,se,fe,ye,23,4),fe+4}function X(Q,se,fe,ye,Me){return se=+se,fe>>>=0,Me||V(Q,0,fe,8),o.write(Q,se,fe,ye,52,8),fe+8}a.prototype.slice=function(Q,se){var fe=this.length;(Q=~~Q)<0?(Q+=fe)<0&&(Q=0):Q>fe&&(Q=fe),(se=void 0===se?fe:~~se)<0?(se+=fe)<0&&(se=0):se>fe&&(se=fe),se<Q&&(se=Q);var ye=this.subarray(Q,se);return Object.setPrototypeOf(ye,a.prototype),ye},a.prototype.readUintLE=a.prototype.readUIntLE=function(Q,se,fe){Q>>>=0,se>>>=0,fe||B(Q,se,this.length);for(var ye=this[Q],Me=1,Ie=0;++Ie<se&&(Me*=256);)ye+=this[Q+Ie]*Me;return ye},a.prototype.readUintBE=a.prototype.readUIntBE=function(Q,se,fe){Q>>>=0,se>>>=0,fe||B(Q,se,this.length);for(var ye=this[Q+--se],Me=1;se>0&&(Me*=256);)ye+=this[Q+--se]*Me;return ye},a.prototype.readUint8=a.prototype.readUInt8=function(Q,se){return Q>>>=0,se||B(Q,1,this.length),this[Q]},a.prototype.readUint16LE=a.prototype.readUInt16LE=function(Q,se){return Q>>>=0,se||B(Q,2,this.length),this[Q]|this[Q+1]<<8},a.prototype.readUint16BE=a.prototype.readUInt16BE=function(Q,se){return Q>>>=0,se||B(Q,2,this.length),this[Q]<<8|this[Q+1]},a.prototype.readUint32LE=a.prototype.readUInt32LE=function(Q,se){return Q>>>=0,se||B(Q,4,this.length),(this[Q]|this[Q+1]<<8|this[Q+2]<<16)+16777216*this[Q+3]},a.prototype.readUint32BE=a.prototype.readUInt32BE=function(Q,se){return Q>>>=0,se||B(Q,4,this.length),16777216*this[Q]+(this[Q+1]<<16|this[Q+2]<<8|this[Q+3])},a.prototype.readBigUInt64LE=Ae(function(Q){oe(Q>>>=0,"offset");var se=this[Q],fe=this[Q+7];void 0!==se&&void 0!==fe||ce(Q,this.length-8);var ye=se+this[++Q]*Math.pow(2,8)+this[++Q]*Math.pow(2,16)+this[++Q]*Math.pow(2,24),Me=this[++Q]+this[++Q]*Math.pow(2,8)+this[++Q]*Math.pow(2,16)+fe*Math.pow(2,24);return BigInt(ye)+(BigInt(Me)<<BigInt(32))}),a.prototype.readBigUInt64BE=Ae(function(Q){oe(Q>>>=0,"offset");var se=this[Q],fe=this[Q+7];void 0!==se&&void 0!==fe||ce(Q,this.length-8);var ye=se*Math.pow(2,24)+this[++Q]*Math.pow(2,16)+this[++Q]*Math.pow(2,8)+this[++Q],Me=this[++Q]*Math.pow(2,24)+this[++Q]*Math.pow(2,16)+this[++Q]*Math.pow(2,8)+fe;return(BigInt(ye)<<BigInt(32))+BigInt(Me)}),a.prototype.readIntLE=function(Q,se,fe){Q>>>=0,se>>>=0,fe||B(Q,se,this.length);for(var ye=this[Q],Me=1,Ie=0;++Ie<se&&(Me*=256);)ye+=this[Q+Ie]*Me;return ye>=(Me*=128)&&(ye-=Math.pow(2,8*se)),ye},a.prototype.readIntBE=function(Q,se,fe){Q>>>=0,se>>>=0,fe||B(Q,se,this.length);for(var ye=se,Me=1,Ie=this[Q+--ye];ye>0&&(Me*=256);)Ie+=this[Q+--ye]*Me;return Ie>=(Me*=128)&&(Ie-=Math.pow(2,8*se)),Ie},a.prototype.readInt8=function(Q,se){return Q>>>=0,se||B(Q,1,this.length),128&this[Q]?-1*(255-this[Q]+1):this[Q]},a.prototype.readInt16LE=function(Q,se){Q>>>=0,se||B(Q,2,this.length);var fe=this[Q]|this[Q+1]<<8;return 32768&fe?4294901760|fe:fe},a.prototype.readInt16BE=function(Q,se){Q>>>=0,se||B(Q,2,this.length);var fe=this[Q+1]|this[Q]<<8;return 32768&fe?4294901760|fe:fe},a.prototype.readInt32LE=function(Q,se){return Q>>>=0,se||B(Q,4,this.length),this[Q]|this[Q+1]<<8|this[Q+2]<<16|this[Q+3]<<24},a.prototype.readInt32BE=function(Q,se){return Q>>>=0,se||B(Q,4,this.length),this[Q]<<24|this[Q+1]<<16|this[Q+2]<<8|this[Q+3]},a.prototype.readBigInt64LE=Ae(function(Q){oe(Q>>>=0,"offset");var se=this[Q],fe=this[Q+7];void 0!==se&&void 0!==fe||ce(Q,this.length-8);var ye=this[Q+4]+this[Q+5]*Math.pow(2,8)+this[Q+6]*Math.pow(2,16)+(fe<<24);return(BigInt(ye)<<BigInt(32))+BigInt(se+this[++Q]*Math.pow(2,8)+this[++Q]*Math.pow(2,16)+this[++Q]*Math.pow(2,24))}),a.prototype.readBigInt64BE=Ae(function(Q){oe(Q>>>=0,"offset");var se=this[Q],fe=this[Q+7];void 0!==se&&void 0!==fe||ce(Q,this.length-8);var ye=(se<<24)+this[++Q]*Math.pow(2,16)+this[++Q]*Math.pow(2,8)+this[++Q];return(BigInt(ye)<<BigInt(32))+BigInt(this[++Q]*Math.pow(2,24)+this[++Q]*Math.pow(2,16)+this[++Q]*Math.pow(2,8)+fe)}),a.prototype.readFloatLE=function(Q,se){return Q>>>=0,se||B(Q,4,this.length),o.read(this,Q,!0,23,4)},a.prototype.readFloatBE=function(Q,se){return Q>>>=0,se||B(Q,4,this.length),o.read(this,Q,!1,23,4)},a.prototype.readDoubleLE=function(Q,se){return Q>>>=0,se||B(Q,8,this.length),o.read(this,Q,!0,52,8)},a.prototype.readDoubleBE=function(Q,se){return Q>>>=0,se||B(Q,8,this.length),o.read(this,Q,!1,52,8)},a.prototype.writeUintLE=a.prototype.writeUIntLE=function(Q,se,fe,ye){Q=+Q,se>>>=0,fe>>>=0,ye||j(this,Q,se,fe,Math.pow(2,8*fe)-1,0);var Me=1,Ie=0;for(this[se]=255&Q;++Ie<fe&&(Me*=256);)this[se+Ie]=Q/Me&255;return se+fe},a.prototype.writeUintBE=a.prototype.writeUIntBE=function(Q,se,fe,ye){Q=+Q,se>>>=0,fe>>>=0,ye||j(this,Q,se,fe,Math.pow(2,8*fe)-1,0);var Me=fe-1,Ie=1;for(this[se+Me]=255&Q;--Me>=0&&(Ie*=256);)this[se+Me]=Q/Ie&255;return se+fe},a.prototype.writeUint8=a.prototype.writeUInt8=function(Q,se,fe){return Q=+Q,se>>>=0,fe||j(this,Q,se,1,255,0),this[se]=255&Q,se+1},a.prototype.writeUint16LE=a.prototype.writeUInt16LE=function(Q,se,fe){return Q=+Q,se>>>=0,fe||j(this,Q,se,2,65535,0),this[se]=255&Q,this[se+1]=Q>>>8,se+2},a.prototype.writeUint16BE=a.prototype.writeUInt16BE=function(Q,se,fe){return Q=+Q,se>>>=0,fe||j(this,Q,se,2,65535,0),this[se]=Q>>>8,this[se+1]=255&Q,se+2},a.prototype.writeUint32LE=a.prototype.writeUInt32LE=function(Q,se,fe){return Q=+Q,se>>>=0,fe||j(this,Q,se,4,4294967295,0),this[se+3]=Q>>>24,this[se+2]=Q>>>16,this[se+1]=Q>>>8,this[se]=255&Q,se+4},a.prototype.writeUint32BE=a.prototype.writeUInt32BE=function(Q,se,fe){return Q=+Q,se>>>=0,fe||j(this,Q,se,4,4294967295,0),this[se]=Q>>>24,this[se+1]=Q>>>16,this[se+2]=Q>>>8,this[se+3]=255&Q,se+4},a.prototype.writeBigUInt64LE=Ae(function(Q){return J(this,Q,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeBigUInt64BE=Ae(function(Q){return G(this,Q,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,BigInt(0),BigInt("0xffffffffffffffff"))}),a.prototype.writeIntLE=function(Q,se,fe,ye){if(Q=+Q,se>>>=0,!ye){var Me=Math.pow(2,8*fe-1);j(this,Q,se,fe,Me-1,-Me)}var Ie=0,Ce=1,Re=0;for(this[se]=255&Q;++Ie<fe&&(Ce*=256);)Q<0&&0===Re&&0!==this[se+Ie-1]&&(Re=1),this[se+Ie]=(Q/Ce>>0)-Re&255;return se+fe},a.prototype.writeIntBE=function(Q,se,fe,ye){if(Q=+Q,se>>>=0,!ye){var Me=Math.pow(2,8*fe-1);j(this,Q,se,fe,Me-1,-Me)}var Ie=fe-1,Ce=1,Re=0;for(this[se+Ie]=255&Q;--Ie>=0&&(Ce*=256);)Q<0&&0===Re&&0!==this[se+Ie+1]&&(Re=1),this[se+Ie]=(Q/Ce>>0)-Re&255;return se+fe},a.prototype.writeInt8=function(Q,se,fe){return Q=+Q,se>>>=0,fe||j(this,Q,se,1,127,-128),Q<0&&(Q=255+Q+1),this[se]=255&Q,se+1},a.prototype.writeInt16LE=function(Q,se,fe){return Q=+Q,se>>>=0,fe||j(this,Q,se,2,32767,-32768),this[se]=255&Q,this[se+1]=Q>>>8,se+2},a.prototype.writeInt16BE=function(Q,se,fe){return Q=+Q,se>>>=0,fe||j(this,Q,se,2,32767,-32768),this[se]=Q>>>8,this[se+1]=255&Q,se+2},a.prototype.writeInt32LE=function(Q,se,fe){return Q=+Q,se>>>=0,fe||j(this,Q,se,4,2147483647,-2147483648),this[se]=255&Q,this[se+1]=Q>>>8,this[se+2]=Q>>>16,this[se+3]=Q>>>24,se+4},a.prototype.writeInt32BE=function(Q,se,fe){return Q=+Q,se>>>=0,fe||j(this,Q,se,4,2147483647,-2147483648),Q<0&&(Q=4294967295+Q+1),this[se]=Q>>>24,this[se+1]=Q>>>16,this[se+2]=Q>>>8,this[se+3]=255&Q,se+4},a.prototype.writeBigInt64LE=Ae(function(Q){return J(this,Q,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeBigInt64BE=Ae(function(Q){return G(this,Q,arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),a.prototype.writeFloatLE=function(Q,se,fe){return W(this,Q,se,!0,fe)},a.prototype.writeFloatBE=function(Q,se,fe){return W(this,Q,se,!1,fe)},a.prototype.writeDoubleLE=function(Q,se,fe){return X(this,Q,se,!0,fe)},a.prototype.writeDoubleBE=function(Q,se,fe){return X(this,Q,se,!1,fe)},a.prototype.copy=function(Q,se,fe,ye){if(!a.isBuffer(Q))throw new TypeError("argument should be a Buffer");if(fe||(fe=0),ye||0===ye||(ye=this.length),se>=Q.length&&(se=Q.length),se||(se=0),ye>0&&ye<fe&&(ye=fe),ye===fe||0===Q.length||0===this.length)return 0;if(se<0)throw new RangeError("targetStart out of bounds");if(fe<0||fe>=this.length)throw new RangeError("Index out of range");if(ye<0)throw new RangeError("sourceEnd out of bounds");ye>this.length&&(ye=this.length),Q.length-se<ye-fe&&(ye=Q.length-se+fe);var Me=ye-fe;return this===Q&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(se,fe,ye):Uint8Array.prototype.set.call(Q,this.subarray(fe,ye),se),Me},a.prototype.fill=function(Q,se,fe,ye){if("string"==typeof Q){if("string"==typeof se?(ye=se,se=0,fe=this.length):"string"==typeof fe&&(ye=fe,fe=this.length),void 0!==ye&&"string"!=typeof ye)throw new TypeError("encoding must be a string");if("string"==typeof ye&&!a.isEncoding(ye))throw new TypeError("Unknown encoding: "+ye);if(1===Q.length){var Me=Q.charCodeAt(0);("utf8"===ye&&Me<128||"latin1"===ye)&&(Q=Me)}}else"number"==typeof Q?Q&=255:"boolean"==typeof Q&&(Q=Number(Q));if(se<0||this.length<se||this.length<fe)throw new RangeError("Out of range index");if(fe<=se)return this;var Ie;if(se>>>=0,fe=void 0===fe?this.length:fe>>>0,Q||(Q=0),"number"==typeof Q)for(Ie=se;Ie<fe;++Ie)this[Ie]=Q;else{var Ce=a.isBuffer(Q)?Q:a.from(Q,ye),Re=Ce.length;if(0===Re)throw new TypeError('The value "'+Q+'" is invalid for argument "value"');for(Ie=0;Ie<fe-se;++Ie)this[Ie+se]=Ce[Ie%Re]}return this};var K={};function re(Q,se,fe){K[Q]=function(ye){!function(_e,Fe){if("function"!=typeof Fe&&null!==Fe)throw new TypeError("Super expression must either be null or a function");_e.prototype=Object.create(Fe&&Fe.prototype,{constructor:{value:_e,writable:!0,configurable:!0}}),Object.defineProperty(_e,"prototype",{writable:!1}),Fe&&l(_e,Fe)}(ge,ye);var Me,Ie,Ce,Re,le=(Ce=ge,Re=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}(),function(){var _e,Fe=d(Ce);if(Re){var Ve=d(this).constructor;_e=Reflect.construct(Fe,arguments,Ve)}else _e=Fe.apply(this,arguments);return function T(Q,se){if(se&&("object"===s(se)||"function"==typeof se))return se;if(void 0!==se)throw new TypeError("Derived constructors may only return object or undefined");return b(Q)}(this,_e)});function ge(){var _e;return function k(Q,se){if(!(Q instanceof se))throw new TypeError("Cannot call a class as a function")}(this,ge),_e=le.call(this),Object.defineProperty(b(_e),"message",{value:se.apply(b(_e),arguments),writable:!0,configurable:!0}),_e.name="".concat(_e.name," [").concat(Q,"]"),delete _e.name,_e}return Me=ge,(Ie=[{key:"code",get:function(){return Q},set:function(_e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:_e,writable:!0})}},{key:"toString",value:function(){return"".concat(this.name," [").concat(Q,"]: ").concat(this.message)}}])&&function A(Q,se){for(var fe=0;fe<se.length;fe++){var ye=se[fe];ye.enumerable=ye.enumerable||!1,ye.configurable=!0,"value"in ye&&(ye.writable=!0),Object.defineProperty(Q,ye.key,ye)}}(Me.prototype,Ie),Object.defineProperty(Me,"prototype",{writable:!1}),ge}(fe)}function ee(Q){for(var se="",fe=Q.length,ye="-"===Q[0]?1:0;fe>=ye+4;fe-=3)se="_".concat(Q.slice(fe-3,fe)).concat(se);return"".concat(Q.slice(0,fe)).concat(se)}function ie(Q,se,fe,ye,Me,Ie){if(Q>fe||Q<se){var Ce,Re="bigint"==typeof se?"n":"";throw Ce=Ie>3?0===se||se===BigInt(0)?">= 0".concat(Re," and < 2").concat(Re," ** ").concat(8*(Ie+1)).concat(Re):">= -(2".concat(Re," ** ").concat(8*(Ie+1)-1).concat(Re,") and < 2 ** ")+"".concat(8*(Ie+1)-1).concat(Re):">= ".concat(se).concat(Re," and <= ").concat(fe).concat(Re),new K.ERR_OUT_OF_RANGE("value",Ce,Q)}var le,ge,_e;le=ye,_e=Ie,oe(ge=Me,"offset"),void 0!==le[ge]&&void 0!==le[ge+_e]||ce(ge,le.length-(_e+1))}function oe(Q,se){if("number"!=typeof Q)throw new K.ERR_INVALID_ARG_TYPE(se,"number",Q)}function ce(Q,se,fe){throw Math.floor(Q)!==Q?(oe(Q,fe),new K.ERR_OUT_OF_RANGE(fe||"offset","an integer",Q)):se<0?new K.ERR_BUFFER_OUT_OF_BOUNDS:new K.ERR_OUT_OF_RANGE(fe||"offset",">= ".concat(fe?1:0," and <= ").concat(se),Q)}re("ERR_BUFFER_OUT_OF_BOUNDS",function(Q){return Q?"".concat(Q," is outside of buffer bounds"):"Attempt to access memory outside buffer bounds"},RangeError),re("ERR_INVALID_ARG_TYPE",function(Q,se){return'The "'.concat(Q,'" argument must be of type number. Received type ').concat(s(se))},TypeError),re("ERR_OUT_OF_RANGE",function(Q,se,fe){var ye='The value of "'.concat(Q,'" is out of range.'),Me=fe;return Number.isInteger(fe)&&Math.abs(fe)>Math.pow(2,32)?Me=ee(String(fe)):"bigint"==typeof fe&&(Me=String(fe),(fe>Math.pow(BigInt(2),BigInt(32))||fe<-Math.pow(BigInt(2),BigInt(32)))&&(Me=ee(Me)),Me+="n"),ye+" It must be ".concat(se,". Received ").concat(Me)},RangeError);var me=/[^+/0-9A-Za-z-_]/g;function de(Q,se){var fe;se=se||1/0;for(var ye=Q.length,Me=null,Ie=[],Ce=0;Ce<ye;++Ce){if((fe=Q.charCodeAt(Ce))>55295&&fe<57344){if(!Me){if(fe>56319){(se-=3)>-1&&Ie.push(239,191,189);continue}if(Ce+1===ye){(se-=3)>-1&&Ie.push(239,191,189);continue}Me=fe;continue}if(fe<56320){(se-=3)>-1&&Ie.push(239,191,189),Me=fe;continue}fe=65536+(Me-55296<<10|fe-56320)}else Me&&(se-=3)>-1&&Ie.push(239,191,189);if(Me=null,fe<128){if((se-=1)<0)break;Ie.push(fe)}else if(fe<2048){if((se-=2)<0)break;Ie.push(fe>>6|192,63&fe|128)}else if(fe<65536){if((se-=3)<0)break;Ie.push(fe>>12|224,fe>>6&63|128,63&fe|128)}else{if(!(fe<1114112))throw new Error("Invalid code point");if((se-=4)<0)break;Ie.push(fe>>18|240,fe>>12&63|128,fe>>6&63|128,63&fe|128)}}return Ie}function he(Q){return t.toByteArray(function(se){if((se=(se=se.split("=")[0]).trim().replace(me,"")).length<2)return"";for(;se.length%4!=0;)se+="=";return se}(Q))}function ve(Q,se,fe,ye){var Me;for(Me=0;Me<ye&&!(Me+fe>=se.length||Me>=Q.length);++Me)se[Me+fe]=Q[Me];return Me}function Pe(Q,se){return Q instanceof se||null!=Q&&null!=Q.constructor&&null!=Q.constructor.name&&Q.constructor.name===se.name}function xe(Q){return Q!=Q}var ke=function(){for(var Q="0123456789abcdef",se=new Array(256),fe=0;fe<16;++fe)for(var ye=16*fe,Me=0;Me<16;++Me)se[ye+Me]=Q[fe]+Q[Me];return se}();function Ae(Q){return typeof BigInt>"u"?Te:Q}function Te(){throw new Error("BigInt not supported")}},35791:function($){"use strict";$.exports=A,$.exports.isMobile=A,$.exports.default=A;var R=/(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|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,e=/CrOS/,k=/android|ipad|playbook|silk/i;function A(l){l||(l={});var T=l.ua;if(T||typeof navigator>"u"||(T=navigator.userAgent),T&&T.headers&&"string"==typeof T.headers["user-agent"]&&(T=T.headers["user-agent"]),"string"!=typeof T)return!1;var b=R.test(T)&&!e.test(T)||!!l.tablet&&k.test(T);return!b&&l.tablet&&l.featureDetect&&navigator&&navigator.maxTouchPoints>1&&-1!==T.indexOf("Macintosh")&&-1!==T.indexOf("Safari")&&(b=!0),b}},86781:function($,R,e){"use strict";e.r(R),e.d(R,{sankeyCenter:function(){return r},sankeyCircular:function(){return E},sankeyJustify:function(){return o},sankeyLeft:function(){return s},sankeyRight:function(){return t}});var k=e(33064),A=e(15140),l=e(45879),T=e(2502),b=e.n(T);function d(he){return he.target.depth}function s(he){return he.depth}function t(he,ve){return ve-1-he.height}function o(he,ve){return he.sourceLinks.length?he.depth:ve-1}function r(he){return he.targetLinks.length?he.depth:he.sourceLinks.length?(0,k.VV)(he.sourceLinks,d)-1:0}function n(he){return function(){return he}}var i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(he){return typeof he}:function(he){return he&&"function"==typeof Symbol&&he.constructor===Symbol&&he!==Symbol.prototype?"symbol":typeof he};function a(he,ve){return p(he.source,ve.source)||he.index-ve.index}function c(he,ve){return p(he.target,ve.target)||he.index-ve.index}function p(he,ve){return he.partOfCycle===ve.partOfCycle?he.y0-ve.y0:"top"===he.circularLinkType||"bottom"===ve.circularLinkType?-1:1}function f(he){return he.value}function x(he){return(he.y0+he.y1)/2}function v(he){return x(he.source)}function g(he){return x(he.target)}function y(he){return he.index}function h(he){return he.nodes}function m(he){return he.links}function w(he,ve){var Pe=he.get(ve);if(!Pe)throw new Error("missing: "+ve);return Pe}function u(he,ve){return ve(he)}var S=25,_=10;function E(){var he,ve,Pe=0,xe=0,ke=1,Ae=1,Te=24,Q=y,se=o,fe=h,ye=m,Me=32,Ie=2,Ce=null;function Re(){var He={nodes:fe.apply(null,arguments),links:ye.apply(null,arguments)};(function le(He){He.nodes.forEach(function(tt,ot){tt.index=ot,tt.sourceLinks=[],tt.targetLinks=[]});var nt=(0,A.UI)(He.nodes,Q);He.links.forEach(function(tt,ot){tt.index=ot;var dt=tt.source,kt=tt.target;"object"!==(void 0===dt?"undefined":i(dt))&&(dt=tt.source=w(nt,dt)),"object"!==(void 0===kt?"undefined":i(kt))&&(kt=tt.target=w(nt,kt)),dt.sourceLinks.push(tt),kt.targetLinks.push(tt)})})(He),function L(he,ve,Pe){var xe=0;if(null===Pe){for(var ke=[],Ae=0;Ae<he.links.length;Ae++){var Te=he.links[Ae],Q=Te.source.index,se=Te.target.index;ke[Q]||(ke[Q]=[]),ke[se]||(ke[se]=[]),-1===ke[Q].indexOf(se)&&ke[Q].push(se)}var fe=b()(ke);fe.sort(function(Ie,Ce){return Ie.length-Ce.length});var ye={};for(Ae=0;Ae<fe.length;Ae++){var Me=fe[Ae].slice(-2);ye[Me[0]]||(ye[Me[0]]={}),ye[Me[0]][Me[1]]=!0}he.links.forEach(function(Ie){var Ce=Ie.target.index,Re=Ie.source.index;Ce===Re||ye[Re]&&ye[Re][Ce]?(Ie.circular=!0,Ie.circularLinkID=xe,xe+=1):Ie.circular=!1})}else he.links.forEach(function(Ie){Ie.source[Pe]<Ie.target[Pe]?Ie.circular=!1:(Ie.circular=!0,Ie.circularLinkID=xe,xe+=1)})}(He,0,Ce),function ge(He){He.nodes.forEach(function(nt){nt.partOfCycle=!1,nt.value=Math.max((0,k.Sm)(nt.sourceLinks,f),(0,k.Sm)(nt.targetLinks,f)),nt.sourceLinks.forEach(function(tt){tt.circular&&(nt.partOfCycle=!0,nt.circularLinkType=tt.circularLinkType)}),nt.targetLinks.forEach(function(tt){tt.circular&&(nt.partOfCycle=!0,nt.circularLinkType=tt.circularLinkType)})})}(He),function _e(He){var nt,tt,ot;for(nt=He.nodes,tt=[],ot=0;nt.length;++ot,nt=tt,tt=[])nt.forEach(function(dt){dt.depth=ot,dt.sourceLinks.forEach(function(kt){tt.indexOf(kt.target)<0&&!kt.circular&&tt.push(kt.target)})});for(nt=He.nodes,tt=[],ot=0;nt.length;++ot,nt=tt,tt=[])nt.forEach(function(dt){dt.height=ot,dt.targetLinks.forEach(function(kt){tt.indexOf(kt.source)<0&&!kt.circular&&tt.push(kt.source)})});He.nodes.forEach(function(dt){dt.column=Math.floor(se.call(null,dt,ot))})}(He),C(He,Q),function Fe(He,nt,tt){var ot=(0,A.b1)().key(function(Lt){return Lt.column}).sortKeys(k.j2).entries(He.nodes).map(function(Lt){return Lt.values});(function(Lt){if(ve){var Ct=1/0;ot.forEach(function(Ge){var We=Ae*ve/(Ge.length+1);Ct=We<Ct?We:Ct}),he=Ct}var It=(0,k.VV)(ot,function(Ge){return(Ae-xe-(Ge.length-1)*he)/(0,k.Sm)(Ge,f)});It*=.3,He.links.forEach(function(Ge){Ge.width=Ge.value*It});var Ge,We,Be,Ye,rt,Se,Ut=(We=0,Be=0,Ye=0,rt=0,Se=(0,k.Fp)((Ge=He).nodes,function(ze){return ze.column}),Ge.links.forEach(function(ze){ze.circular&&("top"==ze.circularLinkType?We+=ze.width:Be+=ze.width,0==ze.target.column&&(rt+=ze.width),ze.source.column==Se&&(Ye+=ze.width))}),{top:We=We>0?We+S+_:We,bottom:Be=Be>0?Be+S+_:Be,left:rt=rt>0?rt+S+_:rt,right:Ye=Ye>0?Ye+S+_:Ye}),Rt=function(Ge,We){var Be=(0,k.Fp)(Ge.nodes,function(Ke){return Ke.column}),Ye=ke-Pe,rt=Ae-xe,Se=Ye/(Ye+We.right+We.left),ze=rt/(rt+We.top+We.bottom);return Pe=Pe*Se+We.left,ke=0==We.right?ke:ke*Se,xe=xe*ze+We.top,Ae*=ze,Ge.nodes.forEach(function(Ke){Ke.x0=Pe+Ke.column*((ke-Pe-Te)/Be),Ke.x1=Ke.x0+Te}),ze}(He,Ut);It*=Rt,He.links.forEach(function(Ge){Ge.width=Ge.value*It}),ot.forEach(function(Ge){var We=Ge.length;Ge.forEach(function(Be,Ye){Be.depth==ot.length-1&&1==We||0==Be.depth&&1==We?(Be.y0=Ae/2-Be.value*It,Be.y1=Be.y0+Be.value*It):Be.partOfCycle?0==I(Be,Lt)?(Be.y0=Ae/2+Ye,Be.y1=Be.y0+Be.value*It):"top"==Be.circularLinkType?(Be.y0=xe+Ye,Be.y1=Be.y0+Be.value*It):(Be.y0=Ae-Be.value*It-Ye,Be.y1=Be.y0+Be.value*It):0==Ut.top||0==Ut.bottom?(Be.y0=(Ae-xe)/We*Ye,Be.y1=Be.y0+Be.value*It):(Be.y0=(Ae-xe)/2-We/2+Ye,Be.y1=Be.y0+Be.value*It)})})})(tt),wt();for(var dt=1,kt=nt;kt>0;--kt)mt(dt*=.99,tt),wt();function mt(Lt,Ct){var It=ot.length;ot.forEach(function(Ut){var Rt=Ut.length,Ge=Ut[0].depth;Ut.forEach(function(We){var Be;if((We.sourceLinks.length||We.targetLinks.length)&&!(We.partOfCycle&&I(We,Ct)>0))if(0==Ge&&1==Rt)We.y0=Ae/2-(Be=We.y1-We.y0)/2,We.y1=Ae/2+Be/2;else if(Ge==It-1&&1==Rt)We.y0=Ae/2-(Be=We.y1-We.y0)/2,We.y1=Ae/2+Be/2;else{var Ye=(0,k.J6)(We.sourceLinks,g),rt=(0,k.J6)(We.targetLinks,v),Se=((Ye&&rt?(Ye+rt)/2:Ye||rt)-x(We))*Lt;We.y0+=Se,We.y1+=Se}})})}function wt(){ot.forEach(function(Lt){var Ct,It,Ut,Rt=xe,Ge=Lt.length;for(Lt.sort(p),Ut=0;Ut<Ge;++Ut)(It=Rt-(Ct=Lt[Ut]).y0)>0&&(Ct.y0+=It,Ct.y1+=It),Rt=Ct.y1+he;if((It=Rt-he-Ae)>0)for(Rt=Ct.y0-=It,Ct.y1-=It,Ut=Ge-2;Ut>=0;--Ut)(It=(Ct=Lt[Ut]).y1+he-Rt)>0&&(Ct.y0-=It,Ct.y1-=It),Rt=Ct.y0})}}(He,Me,Q),Ve(He);for(var tt=0;tt<4;tt++)ee(He,Ae,Q),ie(He,0,Q),K(He,xe,Ae,Q),ee(He,Ae,Q),ie(He,0,Q);return function de(he,ve,Pe){var xe=he.nodes,ke=he.links,Ae=!1,Te=!1;if(ke.forEach(function(fe){"top"==fe.circularLinkType?Ae=!0:"bottom"==fe.circularLinkType&&(Te=!0)}),0==Ae||0==Te){var Q=(0,k.VV)(xe,function(fe){return fe.y0}),se=(Pe-ve)/((0,k.Fp)(xe,function(fe){return fe.y1})-Q);xe.forEach(function(fe){var ye=(fe.y1-fe.y0)*se;fe.y0=(fe.y0-Q)*se,fe.y1=fe.y0+ye}),ke.forEach(function(fe){fe.y0=(fe.y0-Q)*se,fe.y1=(fe.y1-Q)*se,fe.width=fe.width*se})}}(He,xe,Ae),H(He,Ie,Ae,Q),He}function Ve(He){He.nodes.forEach(function(nt){nt.sourceLinks.sort(c),nt.targetLinks.sort(a)}),He.nodes.forEach(function(nt){var tt=nt.y0,ot=tt,dt=nt.y1,kt=dt;nt.sourceLinks.forEach(function(mt){mt.circular?(mt.y0=dt-mt.width/2,dt-=mt.width):(mt.y0=tt+mt.width/2,tt+=mt.width)}),nt.targetLinks.forEach(function(mt){mt.circular?(mt.y1=kt-mt.width/2,kt-=mt.width):(mt.y1=ot+mt.width/2,ot+=mt.width)})})}return Re.nodeId=function(He){return arguments.length?(Q="function"==typeof He?He:n(He),Re):Q},Re.nodeAlign=function(He){return arguments.length?(se="function"==typeof He?He:n(He),Re):se},Re.nodeWidth=function(He){return arguments.length?(Te=+He,Re):Te},Re.nodePadding=function(He){return arguments.length?(he=+He,Re):he},Re.nodes=function(He){return arguments.length?(fe="function"==typeof He?He:n(He),Re):fe},Re.links=function(He){return arguments.length?(ye="function"==typeof He?He:n(He),Re):ye},Re.size=function(He){return arguments.length?(Pe=xe=0,ke=+He[0],Ae=+He[1],Re):[ke-Pe,Ae-xe]},Re.extent=function(He){return arguments.length?(Pe=+He[0][0],ke=+He[1][0],xe=+He[0][1],Ae=+He[1][1],Re):[[Pe,xe],[ke,Ae]]},Re.iterations=function(He){return arguments.length?(Me=+He,Re):Me},Re.circularLinkGap=function(He){return arguments.length?(Ie=+He,Re):Ie},Re.nodePaddingRatio=function(He){return arguments.length?(ve=+He,Re):ve},Re.sortNodes=function(He){return arguments.length?(Ce=He,Re):Ce},Re.update=function(He){return C(He,Q),Ve(He),He.links.forEach(function(nt){nt.circular&&(nt.circularLinkType=nt.y0+nt.y1<Ae?"top":"bottom",nt.source.circularLinkType=nt.circularLinkType,nt.target.circularLinkType=nt.circularLinkType)}),ee(He,Ae,Q,!1),ie(He,0,Q),H(He,Ie,Ae,Q),He},Re}function C(he,ve){var Pe=0,xe=0;he.links.forEach(function(ke){ke.circular&&(ke.circularLinkType=ke.source.circularLinkType||ke.target.circularLinkType?ke.source.circularLinkType?ke.source.circularLinkType:ke.target.circularLinkType:Pe<xe?"top":"bottom","top"==ke.circularLinkType?Pe+=1:xe+=1,he.nodes.forEach(function(Ae){u(Ae,ve)!=u(ke.source,ve)&&u(Ae,ve)!=u(ke.target,ve)||(Ae.circularLinkType=ke.circularLinkType)}))}),he.links.forEach(function(ke){ke.circular&&(ke.source.circularLinkType==ke.target.circularLinkType&&(ke.circularLinkType=ke.source.circularLinkType),me(ke,ve)&&(ke.circularLinkType=ke.source.circularLinkType))})}function P(he){var ve=Math.abs(he.y1-he.y0),Pe=Math.abs(he.target.x0-he.source.x1);return Math.atan(Pe/ve)}function I(he,ve){var Pe=0;he.sourceLinks.forEach(function(ke){Pe=ke.circular&&!me(ke,ve)?Pe+1:Pe});var xe=0;return he.targetLinks.forEach(function(ke){xe=ke.circular&&!me(ke,ve)?xe+1:xe}),Pe+xe}function U(he){var Pe=0;he.source.sourceLinks.forEach(function(Ae){Pe=Ae.circular?Pe+1:Pe});var ke=0;return he.target.targetLinks.forEach(function(Ae){ke=Ae.circular?ke+1:ke}),!(Pe>1||ke>1)}function z(he,ve,Pe){return he.sort(F),he.forEach(function(xe,ke){var Ae,Te,Q=0;if(me(xe,Pe)&&U(xe))xe.circularPathData.verticalBuffer=Q+xe.width/2;else{for(var se=0;se<ke;se++)if(!((Ae=he[ke]).source.column<(Te=he[se]).target.column||Ae.target.column>Te.source.column)){var fe=he[se].circularPathData.verticalBuffer+he[se].width/2+ve;Q=fe>Q?fe:Q}xe.circularPathData.verticalBuffer=Q+xe.width/2}}),he}function H(he,ve,Pe,xe){var ke=(0,k.VV)(he.links,function(Ae){return Ae.source.y0});he.links.forEach(function(Ae){Ae.circular&&(Ae.circularPathData={})}),z(he.links.filter(function(Ae){return"top"==Ae.circularLinkType}),ve,xe),z(he.links.filter(function(Ae){return"bottom"==Ae.circularLinkType}),ve,xe),he.links.forEach(function(Ae){if(Ae.circular){if(Ae.circularPathData.arcRadius=Ae.width+_,Ae.circularPathData.leftNodeBuffer=5,Ae.circularPathData.rightNodeBuffer=5,Ae.circularPathData.sourceWidth=Ae.source.x1-Ae.source.x0,Ae.circularPathData.sourceX=Ae.source.x0+Ae.circularPathData.sourceWidth,Ae.circularPathData.targetX=Ae.target.x0,Ae.circularPathData.sourceY=Ae.y0,Ae.circularPathData.targetY=Ae.y1,me(Ae,xe)&&U(Ae))Ae.circularPathData.leftSmallArcRadius=_+Ae.width/2,Ae.circularPathData.leftLargeArcRadius=_+Ae.width/2,Ae.circularPathData.rightSmallArcRadius=_+Ae.width/2,Ae.circularPathData.rightLargeArcRadius=_+Ae.width/2,"bottom"==Ae.circularLinkType?(Ae.circularPathData.verticalFullExtent=Ae.source.y1+S+Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.rightLargeArcRadius):(Ae.circularPathData.verticalFullExtent=Ae.source.y0-S-Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.rightLargeArcRadius);else{var Te=Ae.source.column,Q=Ae.circularLinkType,se=he.links.filter(function(Me){return Me.source.column==Te&&Me.circularLinkType==Q});se.sort("bottom"==Ae.circularLinkType?B:N);var fe=0;se.forEach(function(Me,Ie){Me.circularLinkID==Ae.circularLinkID&&(Ae.circularPathData.leftSmallArcRadius=_+Ae.width/2+fe,Ae.circularPathData.leftLargeArcRadius=_+Ae.width/2+Ie*ve+fe),fe+=Me.width}),Te=Ae.target.column,(se=he.links.filter(function(Me){return Me.target.column==Te&&Me.circularLinkType==Q})).sort("bottom"==Ae.circularLinkType?J:j),fe=0,se.forEach(function(Me,Ie){Me.circularLinkID==Ae.circularLinkID&&(Ae.circularPathData.rightSmallArcRadius=_+Ae.width/2+fe,Ae.circularPathData.rightLargeArcRadius=_+Ae.width/2+Ie*ve+fe),fe+=Me.width}),"bottom"==Ae.circularLinkType?(Ae.circularPathData.verticalFullExtent=Math.max(Pe,Ae.source.y1,Ae.target.y1)+S+Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent-Ae.circularPathData.rightLargeArcRadius):(Ae.circularPathData.verticalFullExtent=ke-S-Ae.circularPathData.verticalBuffer,Ae.circularPathData.verticalLeftInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.leftLargeArcRadius,Ae.circularPathData.verticalRightInnerExtent=Ae.circularPathData.verticalFullExtent+Ae.circularPathData.rightLargeArcRadius)}Ae.circularPathData.leftInnerExtent=Ae.circularPathData.sourceX+Ae.circularPathData.leftNodeBuffer,Ae.circularPathData.rightInnerExtent=Ae.circularPathData.targetX-Ae.circularPathData.rightNodeBuffer,Ae.circularPathData.leftFullExtent=Ae.circularPathData.sourceX+Ae.circularPathData.leftLargeArcRadius+Ae.circularPathData.leftNodeBuffer,Ae.circularPathData.rightFullExtent=Ae.circularPathData.targetX-Ae.circularPathData.rightLargeArcRadius-Ae.circularPathData.rightNodeBuffer}if(Ae.circular)Ae.path="top"==(Me=Ae).circularLinkType?"M"+Me.circularPathData.sourceX+" "+Me.circularPathData.sourceY+" L"+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.sourceY+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftSmallArcRadius+" 0 0 0 "+Me.circularPathData.leftFullExtent+" "+(Me.circularPathData.sourceY-Me.circularPathData.leftSmallArcRadius)+" L"+Me.circularPathData.leftFullExtent+" "+Me.circularPathData.verticalLeftInnerExtent+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftLargeArcRadius+" 0 0 0 "+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.verticalFullExtent+" L"+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.verticalFullExtent+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightLargeArcRadius+" 0 0 0 "+Me.circularPathData.rightFullExtent+" "+Me.circularPathData.verticalRightInnerExtent+" L"+Me.circularPathData.rightFullExtent+" "+(Me.circularPathData.targetY-Me.circularPathData.rightSmallArcRadius)+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightSmallArcRadius+" 0 0 0 "+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.targetY+" L"+Me.circularPathData.targetX+" "+Me.circularPathData.targetY:"M"+Me.circularPathData.sourceX+" "+Me.circularPathData.sourceY+" L"+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.sourceY+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftSmallArcRadius+" 0 0 1 "+Me.circularPathData.leftFullExtent+" "+(Me.circularPathData.sourceY+Me.circularPathData.leftSmallArcRadius)+" L"+Me.circularPathData.leftFullExtent+" "+Me.circularPathData.verticalLeftInnerExtent+" A"+Me.circularPathData.leftLargeArcRadius+" "+Me.circularPathData.leftLargeArcRadius+" 0 0 1 "+Me.circularPathData.leftInnerExtent+" "+Me.circularPathData.verticalFullExtent+" L"+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.verticalFullExtent+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightLargeArcRadius+" 0 0 1 "+Me.circularPathData.rightFullExtent+" "+Me.circularPathData.verticalRightInnerExtent+" L"+Me.circularPathData.rightFullExtent+" "+(Me.circularPathData.targetY+Me.circularPathData.rightSmallArcRadius)+" A"+Me.circularPathData.rightLargeArcRadius+" "+Me.circularPathData.rightSmallArcRadius+" 0 0 1 "+Me.circularPathData.rightInnerExtent+" "+Me.circularPathData.targetY+" L"+Me.circularPathData.targetX+" "+Me.circularPathData.targetY;else{var ye=(0,l.h5)().source(function(Me){return[Me.source.x0+(Me.source.x1-Me.source.x0),Me.y0]}).target(function(Me){return[Me.target.x0,Me.y1]});Ae.path=ye(Ae)}var Me})}function F(he,ve){return G(he)==G(ve)?"bottom"==he.circularLinkType?B(he,ve):N(he,ve):G(ve)-G(he)}function N(he,ve){return he.y0-ve.y0}function B(he,ve){return ve.y0-he.y0}function j(he,ve){return he.y1-ve.y1}function J(he,ve){return ve.y1-he.y1}function G(he){return he.target.column-he.source.column}function V(he){return he.target.x0-he.source.x1}function W(he,ve){var Pe=P(he),xe=V(ve)/Math.tan(Pe);return"up"==ce(he)?he.y1+xe:he.y1-xe}function X(he,ve){var Pe=P(he),xe=V(ve)/Math.tan(Pe);return"up"==ce(he)?he.y1-xe:he.y1+xe}function K(he,ve,Pe,xe){he.links.forEach(function(ke){if(!ke.circular&&ke.target.column-ke.source.column>1){var Ae=ke.source.column+1,Te=ke.target.column-1,Q=1,se=Te-Ae+1;for(Q=1;Ae<=Te;Ae++,Q++)he.nodes.forEach(function(fe){if(fe.column==Ae){var ye,Me=Q/(se+1),Ie=Math.pow(1-Me,3),Ce=3*Me*Math.pow(1-Me,2),Re=3*Math.pow(Me,2)*(1-Me),le=Math.pow(Me,3),ge=Ie*ke.y0+Ce*ke.y0+Re*ke.y1+le*ke.y1,_e=ge-ke.width/2,Fe=ge+ke.width/2;_e>fe.y0&&_e<fe.y1?(ye=fe.y1-_e+10,fe=re(fe,ye="bottom"==fe.circularLinkType?ye:-ye,ve,Pe),he.nodes.forEach(function(Ve){var He,nt;u(Ve,xe)!=u(fe,xe)&&Ve.column==fe.column&&((He=fe).y0>(nt=Ve).y0&&He.y0<nt.y1||He.y1>nt.y0&&He.y1<nt.y1||He.y0<nt.y0&&He.y1>nt.y1)&&re(Ve,ye,ve,Pe)})):(Fe>fe.y0&&Fe<fe.y1||_e<fe.y0&&Fe>fe.y1)&&(fe=re(fe,ye=Fe-fe.y0+10,ve,Pe),he.nodes.forEach(function(Ve){u(Ve,xe)!=u(fe,xe)&&Ve.column==fe.column&&Ve.y0<fe.y1&&Ve.y1>fe.y1&&re(Ve,ye,ve,Pe)}))}})}})}function re(he,ve,Pe,xe){return he.y0+ve>=Pe&&he.y1+ve<=xe&&(he.y0=he.y0+ve,he.y1=he.y1+ve,he.targetLinks.forEach(function(ke){ke.y1=ke.y1+ve}),he.sourceLinks.forEach(function(ke){ke.y0=ke.y0+ve})),he}function ee(he,ve,Pe,xe){he.nodes.forEach(function(ke){xe&&ke.y+(ke.y1-ke.y0)>ve&&(ke.y=ke.y-(ke.y+(ke.y1-ke.y0)-ve));var Ae=he.links.filter(function(se){return u(se.source,Pe)==u(ke,Pe)}),Te=Ae.length;Te>1&&Ae.sort(function(se,fe){if(!se.circular&&!fe.circular){if(se.target.column==fe.target.column||!oe(se,fe))return se.y1-fe.y1;if(se.target.column>fe.target.column){var ye=X(fe,se);return se.y1-ye}if(fe.target.column>se.target.column)return X(se,fe)-fe.y1}return se.circular&&!fe.circular?"top"==se.circularLinkType?-1:1:fe.circular&&!se.circular?"top"==fe.circularLinkType?1:-1:se.circular&&fe.circular?se.circularLinkType===fe.circularLinkType&&"top"==se.circularLinkType?se.target.column===fe.target.column?se.target.y1-fe.target.y1:fe.target.column-se.target.column:se.circularLinkType===fe.circularLinkType&&"bottom"==se.circularLinkType?se.target.column===fe.target.column?fe.target.y1-se.target.y1:se.target.column-fe.target.column:"top"==se.circularLinkType?-1:1:void 0});var Q=ke.y0;Ae.forEach(function(se){se.y0=Q+se.width/2,Q+=se.width}),Ae.forEach(function(se,fe){if("bottom"==se.circularLinkType){for(var ye=fe+1,Me=0;ye<Te;ye++)Me+=Ae[ye].width;se.y0=ke.y1-Me-se.width/2}})})}function ie(he,ve,Pe){he.nodes.forEach(function(xe){var ke=he.links.filter(function(Q){return u(Q.target,Pe)==u(xe,Pe)}),Ae=ke.length;Ae>1&&ke.sort(function(Q,se){if(!Q.circular&&!se.circular){if(Q.source.column==se.source.column||!oe(Q,se))return Q.y0-se.y0;if(se.source.column<Q.source.column){var fe=W(se,Q);return Q.y0-fe}if(Q.source.column<se.source.column)return W(Q,se)-se.y0}return Q.circular&&!se.circular?"top"==Q.circularLinkType?-1:1:se.circular&&!Q.circular?"top"==se.circularLinkType?1:-1:Q.circular&&se.circular?Q.circularLinkType===se.circularLinkType&&"top"==Q.circularLinkType?Q.source.column===se.source.column?Q.source.y1-se.source.y1:Q.source.column-se.source.column:Q.circularLinkType===se.circularLinkType&&"bottom"==Q.circularLinkType?Q.source.column===se.source.column?Q.source.y1-se.source.y1:se.source.column-Q.source.column:"top"==Q.circularLinkType?-1:1:void 0});var Te=xe.y0;ke.forEach(function(Q){Q.y1=Te+Q.width/2,Te+=Q.width}),ke.forEach(function(Q,se){if("bottom"==Q.circularLinkType){for(var fe=se+1,ye=0;fe<Ae;fe++)ye+=ke[fe].width;Q.y1=xe.y1-ye-Q.width/2}})})}function oe(he,ve){return ce(he)==ce(ve)}function ce(he){return he.y0-he.y1>0?"up":"down"}function me(he,ve){return u(he.source,ve)==u(he.target,ve)}},30838:function($,R,e){"use strict";e.r(R),e.d(R,{sankey:function(){return y},sankeyCenter:function(){return s},sankeyJustify:function(){return d},sankeyLeft:function(){return T},sankeyLinkHorizontal:function(){return u},sankeyRight:function(){return b}});var k=e(33064),A=e(15140);function l(S){return S.target.depth}function T(S){return S.depth}function b(S,_){return _-1-S.height}function d(S,_){return S.sourceLinks.length?S.depth:_-1}function s(S){return S.targetLinks.length?S.depth:S.sourceLinks.length?(0,k.VV)(S.sourceLinks,l)-1:0}function t(S){return function(){return S}}function o(S,_){return n(S.source,_.source)||S.index-_.index}function r(S,_){return n(S.target,_.target)||S.index-_.index}function n(S,_){return S.y0-_.y0}function i(S){return S.value}function a(S){return(S.y0+S.y1)/2}function c(S){return a(S.source)*S.value}function p(S){return a(S.target)*S.value}function f(S){return S.index}function x(S){return S.nodes}function v(S){return S.links}function g(S,_){var E=S.get(_);if(!E)throw new Error("missing: "+_);return E}function y(){var S=0,_=0,E=1,L=1,C=24,P=8,I=f,U=d,z=x,H=v,F=32;function N(){var W={nodes:z.apply(null,arguments),links:H.apply(null,arguments)};return function B(W){W.nodes.forEach(function(K,re){K.index=re,K.sourceLinks=[],K.targetLinks=[]});var X=(0,A.UI)(W.nodes,I);W.links.forEach(function(K,re){K.index=re;var ee=K.source,ie=K.target;"object"!=typeof ee&&(ee=K.source=g(X,ee)),"object"!=typeof ie&&(ie=K.target=g(X,ie)),ee.sourceLinks.push(K),ie.targetLinks.push(K)})}(W),function j(W){W.nodes.forEach(function(X){X.value=Math.max((0,k.Sm)(X.sourceLinks,i),(0,k.Sm)(X.targetLinks,i))})}(W),function J(W){var X,K,re;for(X=W.nodes,K=[],re=0;X.length;++re,X=K,K=[])X.forEach(function(ie){ie.depth=re,ie.sourceLinks.forEach(function(oe){K.indexOf(oe.target)<0&&K.push(oe.target)})});for(X=W.nodes,K=[],re=0;X.length;++re,X=K,K=[])X.forEach(function(ie){ie.height=re,ie.targetLinks.forEach(function(oe){K.indexOf(oe.source)<0&&K.push(oe.source)})});var ee=(E-S-C)/(re-1);W.nodes.forEach(function(ie){ie.x1=(ie.x0=S+Math.max(0,Math.min(re-1,Math.floor(U.call(null,ie,re))))*ee)+C})}(W),function G(W){var X=(0,A.b1)().key(function(ce){return ce.x0}).sortKeys(k.j2).entries(W.nodes).map(function(ce){return ce.values});(function(){var ce=(0,k.Fp)(X,function(he){return he.length}),me=.6666666666666666*(L-_)/(ce-1);P>me&&(P=me);var de=(0,k.VV)(X,function(he){return(L-_-(he.length-1)*P)/(0,k.Sm)(he,i)});X.forEach(function(he){he.forEach(function(ve,Pe){ve.y1=(ve.y0=Pe)+ve.value*de})}),W.links.forEach(function(he){he.width=he.value*de})})(),oe();for(var K=1,re=F;re>0;--re)ie(K*=.99),oe(),ee(K),oe();function ee(ce){X.forEach(function(me){me.forEach(function(de){if(de.targetLinks.length){var he=((0,k.Sm)(de.targetLinks,c)/(0,k.Sm)(de.targetLinks,i)-a(de))*ce;de.y0+=he,de.y1+=he}})})}function ie(ce){X.slice().reverse().forEach(function(me){me.forEach(function(de){if(de.sourceLinks.length){var he=((0,k.Sm)(de.sourceLinks,p)/(0,k.Sm)(de.sourceLinks,i)-a(de))*ce;de.y0+=he,de.y1+=he}})})}function oe(){X.forEach(function(ce){var me,de,he,ve=_,Pe=ce.length;for(ce.sort(n),he=0;he<Pe;++he)(de=ve-(me=ce[he]).y0)>0&&(me.y0+=de,me.y1+=de),ve=me.y1+P;if((de=ve-P-L)>0)for(ve=me.y0-=de,me.y1-=de,he=Pe-2;he>=0;--he)(de=(me=ce[he]).y1+P-ve)>0&&(me.y0-=de,me.y1-=de),ve=me.y0})}}(W),V(W),W}function V(W){W.nodes.forEach(function(X){X.sourceLinks.sort(r),X.targetLinks.sort(o)}),W.nodes.forEach(function(X){var K=X.y0,re=K;X.sourceLinks.forEach(function(ee){ee.y0=K+ee.width/2,K+=ee.width}),X.targetLinks.forEach(function(ee){ee.y1=re+ee.width/2,re+=ee.width})})}return N.update=function(W){return V(W),W},N.nodeId=function(W){return arguments.length?(I="function"==typeof W?W:t(W),N):I},N.nodeAlign=function(W){return arguments.length?(U="function"==typeof W?W:t(W),N):U},N.nodeWidth=function(W){return arguments.length?(C=+W,N):C},N.nodePadding=function(W){return arguments.length?(P=+W,N):P},N.nodes=function(W){return arguments.length?(z="function"==typeof W?W:t(W),N):z},N.links=function(W){return arguments.length?(H="function"==typeof W?W:t(W),N):H},N.size=function(W){return arguments.length?(S=_=0,E=+W[0],L=+W[1],N):[E-S,L-_]},N.extent=function(W){return arguments.length?(S=+W[0][0],E=+W[1][0],_=+W[0][1],L=+W[1][1],N):[[S,_],[E,L]]},N.iterations=function(W){return arguments.length?(F=+W,N):F},N}var h=e(45879);function m(S){return[S.source.x1,S.y0]}function w(S){return[S.target.x0,S.y1]}function u(){return(0,h.h5)().source(m).target(w)}},39898:function($,R,e){var k,A;(function(){var l={version:"3.8.0"},T=[].slice,b=function(te){return T.call(te)},d=self.document;function s(te){return te&&(te.ownerDocument||te.document||te).documentElement}function t(te){return te&&(te.ownerDocument&&te.ownerDocument.defaultView||te.document&&te||te.defaultView)}if(d)try{b(d.documentElement.childNodes)}catch{b=function(ue){for(var we=ue.length,Oe=new Array(we);we--;)Oe[we]=ue[we];return Oe}}if(Date.now||(Date.now=function(){return+new Date}),d)try{d.createElement("DIV").style.setProperty("opacity",0,"")}catch{var o=this.Element.prototype,r=o.setAttribute,n=o.setAttributeNS,i=this.CSSStyleDeclaration.prototype,a=i.setProperty;o.setAttribute=function(ue,we){r.call(this,ue,we+"")},o.setAttributeNS=function(ue,we,Oe){n.call(this,ue,we,Oe+"")},i.setProperty=function(ue,we,Oe){a.call(this,ue,we+"",Oe)}}function c(te,ue){return te<ue?-1:te>ue?1:te>=ue?0:NaN}function p(te){return null===te?NaN:+te}function f(te){return!isNaN(te)}function x(te){return{left:function(ue,we,Oe,De){for(arguments.length<3&&(Oe=0),arguments.length<4&&(De=ue.length);Oe<De;){var Ue=Oe+De>>>1;te(ue[Ue],we)<0?Oe=Ue+1:De=Ue}return Oe},right:function(ue,we,Oe,De){for(arguments.length<3&&(Oe=0),arguments.length<4&&(De=ue.length);Oe<De;){var Ue=Oe+De>>>1;te(ue[Ue],we)>0?De=Ue:Oe=Ue+1}return Oe}}}l.ascending=c,l.descending=function(te,ue){return ue<te?-1:ue>te?1:ue>=te?0:NaN},l.min=function(te,ue){var we,Oe,De=-1,Ue=te.length;if(1===arguments.length){for(;++De<Ue;)if(null!=(Oe=te[De])&&Oe>=Oe){we=Oe;break}for(;++De<Ue;)null!=(Oe=te[De])&&we>Oe&&(we=Oe)}else{for(;++De<Ue;)if(null!=(Oe=ue.call(te,te[De],De))&&Oe>=Oe){we=Oe;break}for(;++De<Ue;)null!=(Oe=ue.call(te,te[De],De))&&we>Oe&&(we=Oe)}return we},l.max=function(te,ue){var we,Oe,De=-1,Ue=te.length;if(1===arguments.length){for(;++De<Ue;)if(null!=(Oe=te[De])&&Oe>=Oe){we=Oe;break}for(;++De<Ue;)null!=(Oe=te[De])&&Oe>we&&(we=Oe)}else{for(;++De<Ue;)if(null!=(Oe=ue.call(te,te[De],De))&&Oe>=Oe){we=Oe;break}for(;++De<Ue;)null!=(Oe=ue.call(te,te[De],De))&&Oe>we&&(we=Oe)}return we},l.extent=function(te,ue){var we,Oe,De,Ue=-1,Ze=te.length;if(1===arguments.length){for(;++Ue<Ze;)if(null!=(Oe=te[Ue])&&Oe>=Oe){we=De=Oe;break}for(;++Ue<Ze;)null!=(Oe=te[Ue])&&(we>Oe&&(we=Oe),De<Oe&&(De=Oe))}else{for(;++Ue<Ze;)if(null!=(Oe=ue.call(te,te[Ue],Ue))&&Oe>=Oe){we=De=Oe;break}for(;++Ue<Ze;)null!=(Oe=ue.call(te,te[Ue],Ue))&&(we>Oe&&(we=Oe),De<Oe&&(De=Oe))}return[we,De]},l.sum=function(te,ue){var we,Oe=0,De=te.length,Ue=-1;if(1===arguments.length)for(;++Ue<De;)f(we=+te[Ue])&&(Oe+=we);else for(;++Ue<De;)f(we=+ue.call(te,te[Ue],Ue))&&(Oe+=we);return Oe},l.mean=function(te,ue){var we,Oe=0,De=te.length,Ue=-1,Ze=De;if(1===arguments.length)for(;++Ue<De;)f(we=p(te[Ue]))?Oe+=we:--Ze;else for(;++Ue<De;)f(we=p(ue.call(te,te[Ue],Ue)))?Oe+=we:--Ze;if(Ze)return Oe/Ze},l.quantile=function(te,ue){var we=(te.length-1)*ue+1,Oe=Math.floor(we),De=+te[Oe-1],Ue=we-Oe;return Ue?De+Ue*(te[Oe]-De):De},l.median=function(te,ue){var we,Oe=[],De=te.length,Ue=-1;if(1===arguments.length)for(;++Ue<De;)f(we=p(te[Ue]))&&Oe.push(we);else for(;++Ue<De;)f(we=p(ue.call(te,te[Ue],Ue)))&&Oe.push(we);if(Oe.length)return l.quantile(Oe.sort(c),.5)},l.variance=function(te,ue){var we,Oe,De=te.length,Ue=0,Ze=0,Je=-1,it=0;if(1===arguments.length)for(;++Je<De;)f(we=p(te[Je]))&&(Ze+=(Oe=we-Ue)*(we-(Ue+=Oe/++it)));else for(;++Je<De;)f(we=p(ue.call(te,te[Je],Je)))&&(Ze+=(Oe=we-Ue)*(we-(Ue+=Oe/++it)));if(it>1)return Ze/(it-1)},l.deviation=function(){var te=l.variance.apply(this,arguments);return te&&Math.sqrt(te)};var v=x(c);function g(te){return te.length}l.bisectLeft=v.left,l.bisect=l.bisectRight=v.right,l.bisector=function(te){return x(1===te.length?function(ue,we){return c(te(ue),we)}:te)},l.shuffle=function(te,ue,we){(Ue=arguments.length)<3&&(we=te.length,Ue<2&&(ue=0));for(var Oe,De,Ue=we-ue;Ue;)De=Math.random()*Ue--|0,Oe=te[Ue+ue],te[Ue+ue]=te[De+ue],te[De+ue]=Oe;return te},l.permute=function(te,ue){for(var we=ue.length,Oe=new Array(we);we--;)Oe[we]=te[ue[we]];return Oe},l.pairs=function(te){for(var ue=0,we=te.length-1,Oe=te[0],De=new Array(we<0?0:we);ue<we;)De[ue]=[Oe,Oe=te[++ue]];return De},l.transpose=function(te){if(!(De=te.length))return[];for(var ue=-1,we=l.min(te,g),Oe=new Array(we);++ue<we;)for(var De,Ue=-1,Ze=Oe[ue]=new Array(De);++Ue<De;)Ze[Ue]=te[Ue][ue];return Oe},l.zip=function(){return l.transpose(arguments)},l.keys=function(te){var ue=[];for(var we in te)ue.push(we);return ue},l.values=function(te){var ue=[];for(var we in te)ue.push(te[we]);return ue},l.entries=function(te){var ue=[];for(var we in te)ue.push({key:we,value:te[we]});return ue},l.merge=function(te){for(var ue,we,Oe,De=te.length,Ue=-1,Ze=0;++Ue<De;)Ze+=te[Ue].length;for(we=new Array(Ze);--De>=0;)for(ue=(Oe=te[De]).length;--ue>=0;)we[--Ze]=Oe[ue];return we};var y=Math.abs;function m(te,ue){for(var we in ue)Object.defineProperty(te.prototype,we,{value:ue[we],enumerable:!1})}function w(){this._=Object.create(null)}function u(te){return"__proto__"==(te+="")||"\0"===te[0]?"\0"+te:te}function S(te){return"\0"===(te+="")[0]?te.slice(1):te}function _(te){return u(te)in this._}function E(te){return(te=u(te))in this._&&delete this._[te]}function L(){var te=[];for(var ue in this._)te.push(S(ue));return te}function C(){var te=0;for(var ue in this._)++te;return te}function P(){for(var te in this._)return!1;return!0}function I(){this._=Object.create(null)}function U(te){return te}function z(te,ue,we){return function(){var Oe=we.apply(ue,arguments);return Oe===ue?te:Oe}}function H(te,ue){if(ue in te)return ue;ue=ue.charAt(0).toUpperCase()+ue.slice(1);for(var we=0,Oe=F.length;we<Oe;++we){var De=F[we]+ue;if(De in te)return De}}l.range=function(te,ue,we){if(arguments.length<3&&(we=1,arguments.length<2&&(ue=te,te=0)),(ue-te)/we==1/0)throw new Error("infinite range");var Oe,De=[],Ue=function h(te){for(var ue=1;te*ue%1;)ue*=10;return ue}(y(we)),Ze=-1;if(te*=Ue,ue*=Ue,(we*=Ue)<0)for(;(Oe=te+we*++Ze)>ue;)De.push(Oe/Ue);else for(;(Oe=te+we*++Ze)<ue;)De.push(Oe/Ue);return De},l.map=function(te,ue){var we=new w;if(te instanceof w)te.forEach(function(Je,it){we.set(Je,it)});else if(Array.isArray(te)){var Oe,De=-1,Ue=te.length;if(1===arguments.length)for(;++De<Ue;)we.set(De,te[De]);else for(;++De<Ue;)we.set(ue.call(te,Oe=te[De],De),Oe)}else for(var Ze in te)we.set(Ze,te[Ze]);return we},m(w,{has:_,get:function(te){return this._[u(te)]},set:function(te,ue){return this._[u(te)]=ue},remove:E,keys:L,values:function(){var te=[];for(var ue in this._)te.push(this._[ue]);return te},entries:function(){var te=[];for(var ue in this._)te.push({key:S(ue),value:this._[ue]});return te},size:C,empty:P,forEach:function(te){for(var ue in this._)te.call(this,S(ue),this._[ue])}}),l.nest=function(){var te,ue,we={},Oe=[],De=[];function Ue(Je,it,ut){if(ut>=Oe.length)return ue?ue.call(we,it):te?it.sort(te):it;for(var St,Dt,Ft,Yt,ln=-1,Xt=it.length,en=Oe[ut++],Jt=new w;++ln<Xt;)(Yt=Jt.get(St=en(Dt=it[ln])))?Yt.push(Dt):Jt.set(St,[Dt]);return Je?(Dt=Je(),Ft=function(bn,gn){Dt.set(bn,Ue(Je,gn,ut))}):(Dt={},Ft=function(bn,gn){Dt[bn]=Ue(Je,gn,ut)}),Jt.forEach(Ft),Dt}function Ze(Je,it){if(it>=Oe.length)return Je;var ut=[],St=De[it++];return Je.forEach(function(Dt,Ft){ut.push({key:Dt,values:Ze(Ft,it)})}),St?ut.sort(function(Dt,Ft){return St(Dt.key,Ft.key)}):ut}return we.map=function(Je,it){return Ue(it,Je,0)},we.entries=function(Je){return Ze(Ue(l.map,Je,0),0)},we.key=function(Je){return Oe.push(Je),we},we.sortKeys=function(Je){return De[Oe.length-1]=Je,we},we.sortValues=function(Je){return te=Je,we},we.rollup=function(Je){return ue=Je,we},we},l.set=function(te){var ue=new I;if(te)for(var we=0,Oe=te.length;we<Oe;++we)ue.add(te[we]);return ue},m(I,{has:_,add:function(te){return this._[u(te+="")]=!0,te},remove:E,values:L,size:C,empty:P,forEach:function(te){for(var ue in this._)te.call(this,S(ue))}}),l.behavior={},l.rebind=function(te,ue){for(var we,Oe=1,De=arguments.length;++Oe<De;)te[we=arguments[Oe]]=z(te,ue,ue[we]);return te};var F=["webkit","ms","moz","Moz","o","O"];function N(){}function B(){}function j(te){var ue=[],we=new w;function Oe(){for(var De,Ue=ue,Ze=-1,Je=Ue.length;++Ze<Je;)(De=Ue[Ze].on)&&De.apply(this,arguments);return te}return Oe.on=function(De,Ue){var Ze,Je=we.get(De);return arguments.length<2?Je&&Je.on:(Je&&(Je.on=null,ue=ue.slice(0,Ze=ue.indexOf(Je)).concat(ue.slice(Ze+1)),we.remove(De)),Ue&&ue.push(we.set(De,{on:Ue})),te)},Oe}function J(){l.event.preventDefault()}function G(){for(var te,ue=l.event;te=ue.sourceEvent;)ue=te;return ue}function V(te){for(var ue=new B,we=0,Oe=arguments.length;++we<Oe;)ue[arguments[we]]=j(ue);return ue.of=function(De,Ue){return function(Ze){try{var Je=Ze.sourceEvent=l.event;Ze.target=te,l.event=Ze,ue[Ze.type].apply(De,Ue)}finally{l.event=Je}}},ue}l.dispatch=function(){for(var te=new B,ue=-1,we=arguments.length;++ue<we;)te[arguments[ue]]=j(te);return te},B.prototype.on=function(te,ue){var we=te.indexOf("."),Oe="";if(we>=0&&(Oe=te.slice(we+1),te=te.slice(0,we)),te)return arguments.length<2?this[te].on(Oe):this[te].on(Oe,ue);if(2===arguments.length){if(null==ue)for(te in this)this.hasOwnProperty(te)&&this[te].on(Oe,null);return this}},l.event=null,l.requote=function(te){return te.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,X={}.__proto__?function(te,ue){te.__proto__=ue}:function(te,ue){for(var we in ue)te[we]=ue[we]};function K(te){return X(te,oe),te}var re=function(te,ue){return ue.querySelector(te)},ee=function(te,ue){return ue.querySelectorAll(te)},ie=function(te,ue){var we=te.matches||te[H(te,"matchesSelector")];return(ie=function(Oe,De){return we.call(Oe,De)})(te,ue)};"function"==typeof Sizzle&&(re=function(te,ue){return Sizzle(te,ue)[0]||null},ee=Sizzle,ie=Sizzle.matchesSelector),l.selection=function(){return l.select(d.documentElement)};var oe=l.selection.prototype=[];function ce(te){return"function"==typeof te?te:function(){return re(te,this)}}function me(te){return"function"==typeof te?te:function(){return ee(te,this)}}oe.select=function(te){var ue,we,Oe,De,Ue=[];te=ce(te);for(var Ze=-1,Je=this.length;++Ze<Je;){Ue.push(ue=[]),ue.parentNode=(Oe=this[Ze]).parentNode;for(var it=-1,ut=Oe.length;++it<ut;)(De=Oe[it])?(ue.push(we=te.call(De,De.__data__,it,Ze)),we&&"__data__"in De&&(we.__data__=De.__data__)):ue.push(null)}return K(Ue)},oe.selectAll=function(te){var ue,we,Oe=[];te=me(te);for(var De=-1,Ue=this.length;++De<Ue;)for(var Ze=this[De],Je=-1,it=Ze.length;++Je<it;)(we=Ze[Je])&&(Oe.push(ue=b(te.call(we,we.__data__,Je,De))),ue.parentNode=we);return K(Oe)};var de="http://www.w3.org/1999/xhtml",he={svg:"http://www.w3.org/2000/svg",xhtml:de,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function ve(te,ue){return te=l.ns.qualify(te),null==ue?te.local?function(){this.removeAttributeNS(te.space,te.local)}:function(){this.removeAttribute(te)}:"function"==typeof ue?te.local?function(){var we=ue.apply(this,arguments);null==we?this.removeAttributeNS(te.space,te.local):this.setAttributeNS(te.space,te.local,we)}:function(){var we=ue.apply(this,arguments);null==we?this.removeAttribute(te):this.setAttribute(te,we)}:te.local?function(){this.setAttributeNS(te.space,te.local,ue)}:function(){this.setAttribute(te,ue)}}function Pe(te){return te.trim().replace(/\s+/g," ")}function xe(te){return new RegExp("(?:^|\\s+)"+l.requote(te)+"(?:\\s+|$)","g")}function ke(te){return(te+"").trim().split(/^|\s+/)}function Ae(te,ue){var we=(te=ke(te).map(Te)).length;return"function"==typeof ue?function(){for(var Oe=-1,De=ue.apply(this,arguments);++Oe<we;)te[Oe](this,De)}:function(){for(var Oe=-1;++Oe<we;)te[Oe](this,ue)}}function Te(te){var ue=xe(te);return function(we,Oe){if(De=we.classList)return Oe?De.add(te):De.remove(te);var De=we.getAttribute("class")||"";Oe?(ue.lastIndex=0,ue.test(De)||we.setAttribute("class",Pe(De+" "+te))):we.setAttribute("class",Pe(De.replace(ue," ")))}}function Q(te,ue,we){return null==ue?function(){this.style.removeProperty(te)}:"function"==typeof ue?function(){var Oe=ue.apply(this,arguments);null==Oe?this.style.removeProperty(te):this.style.setProperty(te,Oe,we)}:function(){this.style.setProperty(te,ue,we)}}function se(te,ue){return null==ue?function(){delete this[te]}:"function"==typeof ue?function(){var we=ue.apply(this,arguments);null==we?delete this[te]:this[te]=we}:function(){this[te]=ue}}function fe(te){return"function"==typeof te?te:(te=l.ns.qualify(te)).local?function(){return this.ownerDocument.createElementNS(te.space,te.local)}:function(){var ue=this.ownerDocument,we=this.namespaceURI;return we===de&&ue.documentElement.namespaceURI===de?ue.createElement(te):ue.createElementNS(we,te)}}function ye(){var te=this.parentNode;te&&te.removeChild(this)}function Me(te){return{__data__:te}}function Ie(te){return function(){return ie(this,te)}}function Ce(te){return arguments.length||(te=c),function(ue,we){return ue&&we?te(ue.__data__,we.__data__):!ue-!we}}function Re(te,ue){for(var we=0,Oe=te.length;we<Oe;we++)for(var De,Ue=te[we],Ze=0,Je=Ue.length;Ze<Je;Ze++)(De=Ue[Ze])&&ue(De,Ze,we);return te}function le(te){return X(te,ge),te}l.ns={prefix:he,qualify:function(te){var ue=te.indexOf(":"),we=te;return ue>=0&&"xmlns"!==(we=te.slice(0,ue))&&(te=te.slice(ue+1)),he.hasOwnProperty(we)?{space:he[we],local:te}:te}},oe.attr=function(te,ue){if(arguments.length<2){if("string"==typeof te){var we=this.node();return(te=l.ns.qualify(te)).local?we.getAttributeNS(te.space,te.local):we.getAttribute(te)}for(ue in te)this.each(ve(ue,te[ue]));return this}return this.each(ve(te,ue))},oe.classed=function(te,ue){if(arguments.length<2){if("string"==typeof te){var we=this.node(),Oe=(te=ke(te)).length,De=-1;if(ue=we.classList){for(;++De<Oe;)if(!ue.contains(te[De]))return!1}else for(ue=we.getAttribute("class");++De<Oe;)if(!xe(te[De]).test(ue))return!1;return!0}for(ue in te)this.each(Ae(ue,te[ue]));return this}return this.each(Ae(te,ue))},oe.style=function(te,ue,we){var Oe=arguments.length;if(Oe<3){if("string"!=typeof te){for(we in Oe<2&&(ue=""),te)this.each(Q(we,te[we],ue));return this}if(Oe<2){var De=this.node();return t(De).getComputedStyle(De,null).getPropertyValue(te)}we=""}return this.each(Q(te,ue,we))},oe.property=function(te,ue){if(arguments.length<2){if("string"==typeof te)return this.node()[te];for(ue in te)this.each(se(ue,te[ue]));return this}return this.each(se(te,ue))},oe.text=function(te){return arguments.length?this.each("function"==typeof te?function(){var ue=te.apply(this,arguments);this.textContent=ue??""}:null==te?function(){this.textContent=""}:function(){this.textContent=te}):this.node().textContent},oe.html=function(te){return arguments.length?this.each("function"==typeof te?function(){var ue=te.apply(this,arguments);this.innerHTML=ue??""}:null==te?function(){this.innerHTML=""}:function(){this.innerHTML=te}):this.node().innerHTML},oe.append=function(te){return te=fe(te),this.select(function(){return this.appendChild(te.apply(this,arguments))})},oe.insert=function(te,ue){return te=fe(te),ue=ce(ue),this.select(function(){return this.insertBefore(te.apply(this,arguments),ue.apply(this,arguments)||null)})},oe.remove=function(){return this.each(ye)},oe.data=function(te,ue){var we,Oe,De=-1,Ue=this.length;if(!arguments.length){for(te=new Array(Ue=(we=this[0]).length);++De<Ue;)(Oe=we[De])&&(te[De]=Oe.__data__);return te}function Ze(St,Dt){var Ft,Yt,ln,Xt=St.length,en=Dt.length,Jt=Math.min(Xt,en),bn=new Array(en),gn=new Array(en),Qt=new Array(Xt);if(ue){var Pn,Dn=new w,Xn=new Array(Xt);for(Ft=-1;++Ft<Xt;)(Yt=St[Ft])&&(Dn.has(Pn=ue.call(Yt,Yt.__data__,Ft))?Qt[Ft]=Yt:Dn.set(Pn,Yt),Xn[Ft]=Pn);for(Ft=-1;++Ft<en;)(Yt=Dn.get(Pn=ue.call(Dt,ln=Dt[Ft],Ft)))?!0!==Yt&&(bn[Ft]=Yt,Yt.__data__=ln):gn[Ft]=Me(ln),Dn.set(Pn,!0);for(Ft=-1;++Ft<Xt;)Ft in Xn&&!0!==Dn.get(Xn[Ft])&&(Qt[Ft]=St[Ft])}else{for(Ft=-1;++Ft<Jt;)ln=Dt[Ft],(Yt=St[Ft])?(Yt.__data__=ln,bn[Ft]=Yt):gn[Ft]=Me(ln);for(;Ft<en;++Ft)gn[Ft]=Me(Dt[Ft]);for(;Ft<Xt;++Ft)Qt[Ft]=St[Ft]}gn.update=bn,gn.parentNode=bn.parentNode=Qt.parentNode=St.parentNode,Je.push(gn),it.push(bn),ut.push(Qt)}var Je=le([]),it=K([]),ut=K([]);if("function"==typeof te)for(;++De<Ue;)Ze(we=this[De],te.call(we,we.parentNode.__data__,De));else for(;++De<Ue;)Ze(we=this[De],te);return it.enter=function(){return Je},it.exit=function(){return ut},it},oe.datum=function(te){return arguments.length?this.property("__data__",te):this.property("__data__")},oe.filter=function(te){var ue,we,Oe,De=[];"function"!=typeof te&&(te=Ie(te));for(var Ue=0,Ze=this.length;Ue<Ze;Ue++){De.push(ue=[]),ue.parentNode=(we=this[Ue]).parentNode;for(var Je=0,it=we.length;Je<it;Je++)(Oe=we[Je])&&te.call(Oe,Oe.__data__,Je,Ue)&&ue.push(Oe)}return K(De)},oe.order=function(){for(var te=-1,ue=this.length;++te<ue;)for(var we,Oe=this[te],De=Oe.length-1,Ue=Oe[De];--De>=0;)(we=Oe[De])&&(Ue&&Ue!==we.nextSibling&&Ue.parentNode.insertBefore(we,Ue),Ue=we);return this},oe.sort=function(te){te=Ce.apply(this,arguments);for(var ue=-1,we=this.length;++ue<we;)this[ue].sort(te);return this.order()},oe.each=function(te){return Re(this,function(ue,we,Oe){te.call(ue,ue.__data__,we,Oe)})},oe.call=function(te){var ue=b(arguments);return te.apply(ue[0]=this,ue),this},oe.empty=function(){return!this.node()},oe.node=function(){for(var te=0,ue=this.length;te<ue;te++)for(var we=this[te],Oe=0,De=we.length;Oe<De;Oe++){var Ue=we[Oe];if(Ue)return Ue}return null},oe.size=function(){var te=0;return Re(this,function(){++te}),te};var ge=[];function Fe(te,ue,we){var Oe="__on"+te,De=te.indexOf("."),Ue=He;De>0&&(te=te.slice(0,De));var Ze=Ve.get(te);function Je(){var it=this[Oe];it&&(this.removeEventListener(te,it,it.$),delete this[Oe])}return Ze&&(te=Ze,Ue=nt),De?ue?function(){var it=Ue(ue,b(arguments));Je.call(this),this.addEventListener(te,this[Oe]=it,it.$=we),it._=ue}:Je:ue?N:function(){var it,ut=new RegExp("^__on([^.]+)"+l.requote(te)+"$");for(var St in this)if(it=St.match(ut)){var Dt=this[St];this.removeEventListener(it[1],Dt,Dt.$),delete this[St]}}}l.selection.enter=le,l.selection.enter.prototype=ge,ge.append=oe.append,ge.empty=oe.empty,ge.node=oe.node,ge.call=oe.call,ge.size=oe.size,ge.select=function(te){for(var ue,we,Oe,De,Ue,Ze=[],Je=-1,it=this.length;++Je<it;){Oe=(De=this[Je]).update,Ze.push(ue=[]),ue.parentNode=De.parentNode;for(var ut=-1,St=De.length;++ut<St;)(Ue=De[ut])?(ue.push(Oe[ut]=we=te.call(De.parentNode,Ue.__data__,ut,Je)),we.__data__=Ue.__data__):ue.push(null)}return K(Ze)},ge.insert=function(te,ue){return arguments.length<2&&(ue=function _e(te){var ue,we;return function(Oe,De,Ue){var Ze,Je=te[Ue].update,it=Je.length;for(Ue!=we&&(we=Ue,ue=0),De>=ue&&(ue=De+1);!(Ze=Je[ue])&&++ue<it;);return Ze}}(this)),oe.insert.call(this,te,ue)},l.select=function(te){var ue;return"string"==typeof te?(ue=[re(te,d)]).parentNode=d.documentElement:(ue=[te]).parentNode=s(te),K([ue])},l.selectAll=function(te){var ue;return"string"==typeof te?(ue=b(ee(te,d))).parentNode=d.documentElement:(ue=b(te)).parentNode=null,K([ue])},oe.on=function(te,ue,we){var Oe=arguments.length;if(Oe<3){if("string"!=typeof te){for(we in Oe<2&&(ue=!1),te)this.each(Fe(we,te[we],ue));return this}if(Oe<2)return(Oe=this.node()["__on"+te])&&Oe._;we=!1}return this.each(Fe(te,ue,we))};var Ve=l.map({mouseenter:"mouseover",mouseleave:"mouseout"});function He(te,ue){return function(we){var Oe=l.event;l.event=we,ue[0]=this.__data__;try{te.apply(this,ue)}finally{l.event=Oe}}}function nt(te,ue){var we=He(te,ue);return function(Oe){var Ue=Oe.relatedTarget;Ue&&(Ue===this||8&Ue.compareDocumentPosition(this))||we.call(this,Oe)}}d&&Ve.forEach(function(te){"on"+te in d&&Ve.remove(te)});var tt,ot=0;function dt(te){var ue=".dragsuppress-"+ ++ot,we="click"+ue,Oe=l.select(t(te)).on("touchmove"+ue,J).on("dragstart"+ue,J).on("selectstart"+ue,J);if(null==tt&&(tt=!("onselectstart"in te)&&H(te.style,"userSelect")),tt){var De=s(te).style,Ue=De[tt];De[tt]="none"}return function(Ze){if(Oe.on(ue,null),tt&&(De[tt]=Ue),Ze){var Je=function(){Oe.on(we,null)};Oe.on(we,function(){J(),Je()},!0),setTimeout(Je,0)}}}l.mouse=function(te){return mt(te,G())};var kt=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function mt(te,ue){ue.changedTouches&&(ue=ue.changedTouches[0]);var we=te.ownerSVGElement||te;if(we.createSVGPoint){var Oe=we.createSVGPoint();if(kt<0){var De=t(te);if(De.scrollX||De.scrollY){var Ue=(we=l.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important"))[0][0].getScreenCTM();kt=!(Ue.f||Ue.e),we.remove()}}return kt?(Oe.x=ue.pageX,Oe.y=ue.pageY):(Oe.x=ue.clientX,Oe.y=ue.clientY),[(Oe=Oe.matrixTransform(te.getScreenCTM().inverse())).x,Oe.y]}var Ze=te.getBoundingClientRect();return[ue.clientX-Ze.left-te.clientLeft,ue.clientY-Ze.top-te.clientTop]}function wt(){return l.event.changedTouches[0].identifier}l.touch=function(te,ue,we){if(arguments.length<3&&(we=ue,ue=G().changedTouches),ue)for(var Oe,De=0,Ue=ue.length;De<Ue;++De)if((Oe=ue[De]).identifier===we)return mt(te,Oe)},l.behavior.drag=function(){var te=V(De,"drag","dragstart","dragend"),ue=null,we=Ue(N,l.mouse,t,"mousemove","mouseup"),Oe=Ue(wt,l.touch,U,"touchmove","touchend");function De(){this.on("mousedown.drag",we).on("touchstart.drag",Oe)}function Ue(Ze,Je,it,ut,St){return function(){var Dt,Yt=l.event.target.correspondingElement||l.event.target,ln=this.parentNode,Xt=te.of(this,arguments),en=0,Jt=Ze(),bn=".drag"+(null==Jt?"":"-"+Jt),gn=l.select(it(Yt)).on(ut+bn,function Dn(){var Jn,gr,vr=Je(ln,Jt);vr&&(en|=(Jn=vr[0]-Pn[0])|(gr=vr[1]-Pn[1]),Pn=vr,Xt({type:"drag",x:vr[0]+Dt[0],y:vr[1]+Dt[1],dx:Jn,dy:gr}))}).on(St+bn,function Xn(){Je(ln,Jt)&&(gn.on(ut+bn,null).on(St+bn,null),Qt(en),Xt({type:"dragend"}))}),Qt=dt(Yt),Pn=Je(ln,Jt);Dt=ue?[(Dt=ue.apply(this,arguments)).x-Pn[0],Dt.y-Pn[1]]:[0,0],Xt({type:"dragstart"})}}return De.origin=function(Ze){return arguments.length?(ue=Ze,De):ue},l.rebind(De,te,"on")},l.touches=function(te,ue){return arguments.length<2&&(ue=G().touches),ue?b(ue).map(function(we){var Oe=mt(te,we);return Oe.identifier=we.identifier,Oe}):[]};var Lt=1e-6,Ct=Math.PI,It=2*Ct,Ut=It-Lt,Rt=Ct/2,Ge=Ct/180,We=180/Ct;function Be(te){return te>1?Rt:te<-1?-Rt:Math.asin(te)}function Ye(te){return((te=Math.exp(te))+1/te)/2}var rt=Math.SQRT2;l.interpolateZoom=function(te,ue){var we,Oe,De=te[0],Ue=te[1],Ze=te[2],ut=ue[2],St=ue[0]-De,Dt=ue[1]-Ue,Ft=St*St+Dt*Dt;if(Ft<1e-12)Oe=Math.log(ut/Ze)/rt,we=function(bn){return[De+bn*St,Ue+bn*Dt,Ze*Math.exp(rt*bn*Oe)]};else{var Yt=Math.sqrt(Ft),ln=(ut*ut-Ze*Ze+4*Ft)/(2*Ze*2*Yt),Xt=(ut*ut-Ze*Ze-4*Ft)/(2*ut*2*Yt),en=Math.log(Math.sqrt(ln*ln+1)-ln),Jt=Math.log(Math.sqrt(Xt*Xt+1)-Xt);Oe=(Jt-en)/rt,we=function(bn){var gn,Xn,Qt=bn*Oe,Pn=Ye(en),Dn=Ze/(2*Yt)*(Pn*(gn=rt*Qt+en,((gn=Math.exp(2*gn))-1)/(gn+1))-(Xn=en,((Xn=Math.exp(Xn))-1/Xn)/2));return[De+Dn*St,Ue+Dn*Dt,Ze*Pn/Ye(rt*Qt+en)]}}return we.duration=1e3*Oe,we},l.behavior.zoom=function(){var te,ue,we,Oe,De,Ue,Ze,Je,it,ut={x:0,y:0,k:1},St=[960,500],Dt=Ke,Ft=250,Yt=0,ln="mousedown.zoom",Xt="mousemove.zoom",en="mouseup.zoom",Jt="touchstart.zoom",bn=V(gn,"zoomstart","zoom","zoomend");function gn(hr){hr.on(ln,dr).on(ze+".zoom",Vr).on("dblclick.zoom",Hr).on(Jt,kr)}function Qt(hr){return[(hr[0]-ut.x)/ut.k,(hr[1]-ut.y)/ut.k]}function Pn(hr){ut.k=Math.max(Dt[0],Math.min(Dt[1],hr))}function Dn(hr,Ar){var Dr;ut.x+=hr[0]-(Ar=[(Dr=Ar)[0]*ut.k+ut.x,Dr[1]*ut.k+ut.y])[0],ut.y+=hr[1]-Ar[1]}function Xn(hr,Ar,Dr,zr){hr.__chart__={x:ut.x,y:ut.y,k:ut.k},Pn(Math.pow(2,zr)),Dn(ue=Ar,Dr),hr=l.select(hr),Ft>0&&(hr=hr.transition().duration(Ft)),hr.call(gn.event)}function Jn(){Ze&&Ze.domain(Ue.range().map(function(hr){return(hr-ut.x)/ut.k}).map(Ue.invert)),it&&it.domain(Je.range().map(function(hr){return(hr-ut.y)/ut.k}).map(Je.invert))}function gr(hr){Yt++||hr({type:"zoomstart"})}function vr(hr){Jn(),hr({type:"zoom",scale:ut.k,translate:[ut.x,ut.y]})}function sr(hr){--Yt||(hr({type:"zoomend"}),ue=null)}function dr(){var hr=this,Ar=bn.of(hr,arguments),Dr=0,zr=l.select(t(hr)).on(Xt,function $r(){Dr=1,Dn(l.mouse(hr),Wr),vr(Ar)}).on(en,function ui(){zr.on(Xt,null).on(en,null),Zr(Dr),sr(Ar)}),Wr=Qt(l.mouse(hr)),Zr=dt(hr);fi.call(hr),gr(Ar)}function kr(){var hr,Ar=this,Dr=bn.of(Ar,arguments),zr={},Wr=0,Zr=".zoom-"+l.event.changedTouches[0].identifier,$r="touchmove"+Zr,ui="touchend"+Zr,yi=[],hi=l.select(Ar),si=dt(Ar);function ci(){var Fi=l.touches(Ar);return hr=ut.k,Fi.forEach(function(Br){Br.identifier in zr&&(zr[Br.identifier]=Qt(Br))}),Fi}function pi(){var Fi=l.event.target;l.select(Fi).on($r,Si).on(ui,Mo),yi.push(Fi);for(var Br=l.event.changedTouches,Gi=0,Qi=Br.length;Gi<Qi;++Gi)zr[Br[Gi].identifier]=null;var ki=ci(),Ga=Date.now();if(1===ki.length){if(Ga-De<500){var Yr=ki[0];Xn(Ar,Yr,zr[Yr.identifier],Math.floor(Math.log(ut.k)/Math.LN2)+1),J()}De=Ga}else if(ki.length>1){var Bi=ki[1],ha=(Yr=ki[0])[0]-Bi[0],Ds=Yr[1]-Bi[1];Wr=ha*ha+Ds*Ds}}function Si(){var Fi,Br,Gi,Qi,ki=l.touches(Ar);fi.call(Ar);for(var Ga=0,Yr=ki.length;Ga<Yr;++Ga,Qi=null)if(Qi=zr[(Gi=ki[Ga]).identifier]){if(Br)break;Fi=Gi,Br=Qi}if(Qi){var Bi=(Bi=Gi[0]-Fi[0])*Bi+(Bi=Gi[1]-Fi[1])*Bi,ha=Wr&&Math.sqrt(Bi/Wr);Fi=[(Fi[0]+Gi[0])/2,(Fi[1]+Gi[1])/2],Br=[(Br[0]+Qi[0])/2,(Br[1]+Qi[1])/2],Pn(ha*hr)}De=null,Dn(Fi,Br),vr(Dr)}function Mo(){if(l.event.touches.length){for(var Fi=l.event.changedTouches,Br=0,Gi=Fi.length;Br<Gi;++Br)delete zr[Fi[Br].identifier];for(var Qi in zr)return void ci()}l.selectAll(yi).on(Zr,null),hi.on(ln,dr).on(Jt,kr),si(),sr(Dr)}pi(),gr(Dr),hi.on(ln,null).on(Jt,pi)}function Vr(){var hr=bn.of(this,arguments);Oe?clearTimeout(Oe):(fi.call(this),te=Qt(ue=we||l.mouse(this)),gr(hr)),Oe=setTimeout(function(){Oe=null,sr(hr)},50),J(),Pn(Math.pow(2,.002*Se())*ut.k),Dn(ue,te),vr(hr)}function Hr(){var hr=l.mouse(this),Ar=Math.log(ut.k)/Math.LN2;Xn(this,hr,Qt(hr),l.event.shiftKey?Math.ceil(Ar)-1:Math.floor(Ar)+1)}return ze||(ze="onwheel"in d?(Se=function(){return-l.event.deltaY*(l.event.deltaMode?120:1)},"wheel"):"onmousewheel"in d?(Se=function(){return l.event.wheelDelta},"mousewheel"):(Se=function(){return-l.event.detail},"MozMousePixelScroll")),gn.event=function(hr){hr.each(function(){var Ar=bn.of(this,arguments),Dr=ut;$e?l.select(this).transition().each("start.zoom",function(){ut=this.__chart__||{x:0,y:0,k:1},gr(Ar)}).tween("zoom:zoom",function(){var zr=St[0],Zr=ue?ue[0]:zr/2,$r=ue?ue[1]:St[1]/2,ui=l.interpolateZoom([(Zr-ut.x)/ut.k,($r-ut.y)/ut.k,zr/ut.k],[(Zr-Dr.x)/Dr.k,($r-Dr.y)/Dr.k,zr/Dr.k]);return function(yi){var hi=ui(yi),si=zr/hi[2];this.__chart__=ut={x:Zr-hi[0]*si,y:$r-hi[1]*si,k:si},vr(Ar)}}).each("interrupt.zoom",function(){sr(Ar)}).each("end.zoom",function(){sr(Ar)}):(this.__chart__=ut,gr(Ar),vr(Ar),sr(Ar))})},gn.translate=function(hr){return arguments.length?(ut={x:+hr[0],y:+hr[1],k:ut.k},Jn(),gn):[ut.x,ut.y]},gn.scale=function(hr){return arguments.length?(ut={x:ut.x,y:ut.y,k:null},Pn(+hr),Jn(),gn):ut.k},gn.scaleExtent=function(hr){return arguments.length?(Dt=null==hr?Ke:[+hr[0],+hr[1]],gn):Dt},gn.center=function(hr){return arguments.length?(we=hr&&[+hr[0],+hr[1]],gn):we},gn.size=function(hr){return arguments.length?(St=hr&&[+hr[0],+hr[1]],gn):St},gn.duration=function(hr){return arguments.length?(Ft=+hr,gn):Ft},gn.x=function(hr){return arguments.length?(Ze=hr,Ue=hr.copy(),ut={x:0,y:0,k:1},gn):Ze},gn.y=function(hr){return arguments.length?(it=hr,Je=hr.copy(),ut={x:0,y:0,k:1},gn):it},l.rebind(gn,bn,"on")};var Se,ze,Ke=[0,1/0];function st(){}function ct(te,ue,we){return this instanceof ct?(this.h=+te,this.s=+ue,void(this.l=+we)):arguments.length<2?te instanceof ct?new ct(te.h,te.s,te.l):sn(""+te,hn,ct):new ct(te,ue,we)}l.color=st,st.prototype.toString=function(){return this.rgb()+""},l.hsl=ct;var Tt=ct.prototype=new st;function Et(te,ue,we){var Oe,De;function Ue(Ze){return Math.round(255*((Je=Ze)>360?Je-=360:Je<0&&(Je+=360),Je<60?Oe+(De-Oe)*Je/60:Je<180?De:Je<240?Oe+(De-Oe)*(240-Je)/60:Oe));var Je}return te=isNaN(te)?0:(te%=360)<0?te+360:te,ue=isNaN(ue)||ue<0?0:ue>1?1:ue,Oe=2*(we=we<0?0:we>1?1:we)-(De=we<=.5?we*(1+ue):we+ue-we*ue),new wn(Ue(te+120),Ue(te),Ue(te-120))}function At(te,ue,we){return this instanceof At?(this.h=+te,this.c=+ue,void(this.l=+we)):arguments.length<2?te instanceof At?new At(te.h,te.c,te.l):function Gt(te,ue,we){return te>0?new At(Math.atan2(we,ue)*We,Math.sqrt(ue*ue+we*we),te):new At(NaN,NaN,te)}(te instanceof gt?te.l:(te=En((te=l.rgb(te)).r,te.g,te.b)).l,te.a,te.b):new At(te,ue,we)}Tt.brighter=function(te){return te=Math.pow(.7,arguments.length?te:1),new ct(this.h,this.s,this.l/te)},Tt.darker=function(te){return te=Math.pow(.7,arguments.length?te:1),new ct(this.h,this.s,te*this.l)},Tt.rgb=function(){return Et(this.h,this.s,this.l)},l.hcl=At;var ht=At.prototype=new st;function pt(te,ue,we){return isNaN(te)&&(te=0),isNaN(ue)&&(ue=0),new gt(we,Math.cos(te*=Ge)*ue,Math.sin(te)*ue)}function gt(te,ue,we){return this instanceof gt?(this.l=+te,this.a=+ue,void(this.b=+we)):arguments.length<2?te instanceof gt?new gt(te.l,te.a,te.b):te instanceof At?pt(te.h,te.c,te.l):En((te=wn(te)).r,te.g,te.b):new gt(te,ue,we)}ht.brighter=function(te){return new At(this.h,this.c,Math.min(100,this.l+Pt*(arguments.length?te:1)))},ht.darker=function(te){return new At(this.h,this.c,Math.max(0,this.l-Pt*(arguments.length?te:1)))},ht.rgb=function(){return pt(this.h,this.c,this.l).rgb()},l.lab=gt;var Pt=18,Ot=.95047,Ht=1.08883,jt=gt.prototype=new st;function Nt(te,ue,we){var Oe=(te+16)/116,De=Oe+ue/500,Ue=Oe-we/200;return new wn(Kt(3.2404542*(De=un(De)*Ot)-1.5371385*(Oe=1*un(Oe))-.4985314*(Ue=un(Ue)*Ht)),Kt(-.969266*De+1.8760108*Oe+.041556*Ue),Kt(.0556434*De-.2040259*Oe+1.0572252*Ue))}function un(te){return te>.206893034?te*te*te:(te-.13793103448275862)/7.787037}function pn(te){return te>.008856?Math.pow(te,.3333333333333333):7.787037*te+.13793103448275862}function Kt(te){return Math.round(255*(te<=.00304?12.92*te:1.055*Math.pow(te,.4166666666666667)-.055))}function wn(te,ue,we){return this instanceof wn?(this.r=~~te,this.g=~~ue,void(this.b=~~we)):arguments.length<2?te instanceof wn?new wn(te.r,te.g,te.b):sn(""+te,wn,Et):new wn(te,ue,we)}function Bn(te){return new wn(te>>16,te>>8&255,255&te)}function vn(te){return Bn(te)+""}jt.brighter=function(te){return new gt(Math.min(100,this.l+Pt*(arguments.length?te:1)),this.a,this.b)},jt.darker=function(te){return new gt(Math.max(0,this.l-Pt*(arguments.length?te:1)),this.a,this.b)},jt.rgb=function(){return Nt(this.l,this.a,this.b)},l.rgb=wn;var cn=wn.prototype=new st;function dn(te){return te<16?"0"+Math.max(0,te).toString(16):Math.min(255,te).toString(16)}function sn(te,ue,we){var Oe,De,Ue,Ze=0,Je=0,it=0;if(Oe=/([a-z]+)\((.*)\)/.exec(te=te.toLowerCase()))switch(De=Oe[2].split(","),Oe[1]){case"hsl":return we(parseFloat(De[0]),parseFloat(De[1])/100,parseFloat(De[2])/100);case"rgb":return ue(Rn(De[0]),Rn(De[1]),Rn(De[2]))}return(Ue=Nn.get(te))?ue(Ue.r,Ue.g,Ue.b):(null==te||"#"!==te.charAt(0)||isNaN(Ue=parseInt(te.slice(1),16))||(4===te.length?(Ze=(3840&Ue)>>4,Ze|=Ze>>4,Je=240&Ue,Je|=Je>>4,it=15&Ue,it|=it<<4):7===te.length&&(Ze=(16711680&Ue)>>16,Je=(65280&Ue)>>8,it=255&Ue)),ue(Ze,Je,it))}function hn(te,ue,we){var Oe,De,Ue=Math.min(te/=255,ue/=255,we/=255),Ze=Math.max(te,ue,we),Je=Ze-Ue,it=(Ze+Ue)/2;return Je?(De=it<.5?Je/(Ze+Ue):Je/(2-Ze-Ue),Oe=te==Ze?(ue-we)/Je+(ue<we?6:0):ue==Ze?(we-te)/Je+2:(te-ue)/Je+4,Oe*=60):(Oe=NaN,De=it>0&&it<1?0:Oe),new ct(Oe,De,it)}function En(te,ue,we){var Oe=pn((.4124564*(te=Mn(te))+.3575761*(ue=Mn(ue))+.1804375*(we=Mn(we)))/Ot),De=pn((.2126729*te+.7151522*ue+.072175*we)/1);return gt(116*De-16,500*(Oe-De),200*(De-pn((.0193339*te+.119192*ue+.9503041*we)/Ht)))}function Mn(te){return(te/=255)<=.04045?te/12.92:Math.pow((te+.055)/1.055,2.4)}function Rn(te){var ue=parseFloat(te);return"%"===te.charAt(te.length-1)?Math.round(2.55*ue):ue}cn.brighter=function(te){te=Math.pow(.7,arguments.length?te:1);var ue=this.r,we=this.g,Oe=this.b;return ue||we||Oe?(ue&&ue<30&&(ue=30),we&&we<30&&(we=30),Oe&&Oe<30&&(Oe=30),new wn(Math.min(255,ue/te),Math.min(255,we/te),Math.min(255,Oe/te))):new wn(30,30,30)},cn.darker=function(te){return new wn((te=Math.pow(.7,arguments.length?te:1))*this.r,te*this.g,te*this.b)},cn.hsl=function(){return hn(this.r,this.g,this.b)},cn.toString=function(){return"#"+dn(this.r)+dn(this.g)+dn(this.b)};var Nn=l.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 Fn(te){return"function"==typeof te?te:function(){return te}}function rr(te){return function(ue,we,Oe){return 2===arguments.length&&"function"==typeof we&&(Oe=we,we=null),$n(ue,we,te,Oe)}}function $n(te,ue,we,Oe){var St,De={},Ue=l.dispatch("beforesend","progress","load","error"),Ze={},Je=new XMLHttpRequest,it=null;function ut(){var St,Ft,Yt,Dt=Je.status;if(!Dt&&((Yt=(Ft=Je).responseType)&&"text"!==Yt?Ft.response:Ft.responseText)||Dt>=200&&Dt<300||304===Dt){try{St=we.call(De,Je)}catch(Ft){return void Ue.error.call(De,Ft)}Ue.load.call(De,St)}else Ue.error.call(De,Je)}return self.XDomainRequest&&!("withCredentials"in Je)&&/^(http(s)?:)?\/\//.test(te)&&(Je=new XDomainRequest),"onload"in Je?Je.onload=Je.onerror=ut:Je.onreadystatechange=function(){Je.readyState>3&&ut()},Je.onprogress=function(St){var Dt=l.event;l.event=St;try{Ue.progress.call(De,Je)}finally{l.event=Dt}},De.header=function(St,Dt){return St=(St+"").toLowerCase(),arguments.length<2?Ze[St]:(null==Dt?delete Ze[St]:Ze[St]=Dt+"",De)},De.mimeType=function(St){return arguments.length?(ue=null==St?null:St+"",De):ue},De.responseType=function(St){return arguments.length?(it=St,De):it},De.response=function(St){return we=St,De},["get","post"].forEach(function(St){De[St]=function(){return De.send.apply(De,[St].concat(b(arguments)))}}),De.send=function(St,Dt,Ft){if(2===arguments.length&&"function"==typeof Dt&&(Ft=Dt,Dt=null),Je.open(St,te,!0),null==ue||"accept"in Ze||(Ze.accept=ue+",*/*"),Je.setRequestHeader)for(var Yt in Ze)Je.setRequestHeader(Yt,Ze[Yt]);return null!=ue&&Je.overrideMimeType&&Je.overrideMimeType(ue),null!=it&&(Je.responseType=it),null!=Ft&&De.on("error",Ft).on("load",function(ln){Ft(null,ln)}),Ue.beforesend.call(De,Je),Je.send(Dt??null),De},De.abort=function(){return Je.abort(),De},l.rebind(De,Ue,"on"),null==Oe?De:De.get(1===(St=Oe).length?function(Dt,Ft){St(null==Dt?Ft:null)}:St)}Nn.forEach(function(te,ue){Nn.set(te,Bn(ue))}),l.functor=Fn,l.xhr=rr(U),l.dsv=function(te,ue){var we=new RegExp('["'+te+"\n]"),Oe=te.charCodeAt(0);function De(ut,St,Dt){arguments.length<3&&(Dt=St,St=null);var Ft=$n(ut,ue,null==St?Ue:Ze(St),Dt);return Ft.row=function(Yt){return arguments.length?Ft.response(null==(St=Yt)?Ue:Ze(Yt)):St},Ft}function Ue(ut){return De.parse(ut.responseText)}function Ze(ut){return function(St){return De.parse(St.responseText,ut)}}function Je(ut){return ut.map(it).join(te)}function it(ut){return we.test(ut)?'"'+ut.replace(/\"/g,'""')+'"':ut}return De.parse=function(ut,St){var Dt;return De.parseRows(ut,function(Ft,Yt){if(Dt)return Dt(Ft,Yt-1);var ln=function(Xt){for(var en={},Jt=Ft.length,bn=0;bn<Jt;++bn)en[Ft[bn]]=Xt[bn];return en};Dt=St?function(Xt,en){return St(ln(Xt),en)}:ln})},De.parseRows=function(ut,St){var Dt,Ft,Yt={},ln={},Xt=[],en=ut.length,Jt=0,bn=0;function gn(){if(Jt>=en)return ln;if(Ft)return Ft=!1,Yt;var Pn=Jt;if(34===ut.charCodeAt(Pn)){for(var Dn=Pn;Dn++<en;)if(34===ut.charCodeAt(Dn)){if(34!==ut.charCodeAt(Dn+1))break;++Dn}return Jt=Dn+2,13===(Xn=ut.charCodeAt(Dn+1))?(Ft=!0,10===ut.charCodeAt(Dn+2)&&++Jt):10===Xn&&(Ft=!0),ut.slice(Pn+1,Dn).replace(/""/g,'"')}for(;Jt<en;){var Xn,Jn=1;if(10===(Xn=ut.charCodeAt(Jt++)))Ft=!0;else if(13===Xn)Ft=!0,10===ut.charCodeAt(Jt)&&(++Jt,++Jn);else if(Xn!==Oe)continue;return ut.slice(Pn,Jt-Jn)}return ut.slice(Pn)}for(;(Dt=gn())!==ln;){for(var Qt=[];Dt!==Yt&&Dt!==ln;)Qt.push(Dt),Dt=gn();St&&null==(Qt=St(Qt,bn++))||Xt.push(Qt)}return Xt},De.format=function(ut){if(Array.isArray(ut[0]))return De.formatRows(ut);var St=new I,Dt=[];return ut.forEach(function(Ft){for(var Yt in Ft)St.has(Yt)||Dt.push(St.add(Yt))}),[Dt.map(it).join(te)].concat(ut.map(function(Ft){return Dt.map(function(Yt){return it(Ft[Yt])}).join(te)})).join("\n")},De.formatRows=function(ut){return ut.map(Je).join("\n")},De},l.csv=l.dsv(",","text/csv"),l.tsv=l.dsv("\t","text/tab-separated-values");var mr,fr,Zn,qn,ur=this[H(this,"requestAnimationFrame")]||function(te){setTimeout(te,17)};function Zt(te,ue,we){var Oe=arguments.length;Oe<2&&(ue=0),Oe<3&&(we=Date.now());var Ue={c:te,t:we+ue,n:null};return fr?fr.n=Ue:mr=Ue,fr=Ue,Zn||(qn=clearTimeout(qn),Zn=1,ur(nn)),Ue}function nn(){var te=zn(),ue=_n()-te;ue>24?(isFinite(ue)&&(clearTimeout(qn),qn=setTimeout(nn,ue)),Zn=0):(Zn=1,ur(nn))}function zn(){for(var te=Date.now(),ue=mr;ue;)te>=ue.t&&ue.c(te-ue.t)&&(ue.c=null),ue=ue.n;return te}function _n(){for(var te,ue=mr,we=1/0;ue;)ue.c?(ue.t<we&&(we=ue.t),ue=(te=ue).n):ue=te?te.n=ue.n:mr=ue.n;return fr=te,we}function Cn(te){return te[0]}function Un(te){return te[1]}function Gn(te){for(var ue,we,Oe,De=te.length,Ue=[0,1],Ze=2,Je=2;Je<De;Je++){for(;Ze>1&&((we=te[Ue[Ze-1]])[0]-(ue=te[Ue[Ze-2]])[0])*((Oe=te[Je])[1]-ue[1])-(we[1]-ue[1])*(Oe[0]-ue[0])<=0;)--Ze;Ue[Ze++]=Je}return Ue.slice(0,Ze)}function ar(te,ue){return te[0]-ue[0]||te[1]-ue[1]}l.timer=function(){Zt.apply(this,arguments)},l.timer.flush=function(){zn(),_n()},l.round=function(te,ue){return ue?Math.round(te*(ue=Math.pow(10,ue)))/ue:Math.round(te)},l.geom={},l.geom.hull=function(te){var ue=Cn,we=Un;if(arguments.length)return Oe(te);function Oe(De){if(De.length<3)return[];var Ue,Ze=Fn(ue),Je=Fn(we),it=De.length,ut=[],St=[];for(Ue=0;Ue<it;Ue++)ut.push([+Ze.call(this,De[Ue],Ue),+Je.call(this,De[Ue],Ue),Ue]);for(ut.sort(ar),Ue=0;Ue<it;Ue++)St.push([ut[Ue][0],-ut[Ue][1]]);var Dt=Gn(ut),Ft=Gn(St),Yt=Ft[0]===Dt[0],ln=Ft[Ft.length-1]===Dt[Dt.length-1],Xt=[];for(Ue=Dt.length-1;Ue>=0;--Ue)Xt.push(De[ut[Dt[Ue]][2]]);for(Ue=+Yt;Ue<Ft.length-ln;++Ue)Xt.push(De[ut[Ft[Ue]][2]]);return Xt}return Oe.x=function(De){return arguments.length?(ue=De,Oe):ue},Oe.y=function(De){return arguments.length?(we=De,Oe):we},Oe},l.geom.polygon=function(te){return X(te,yr),te};var yr=l.geom.polygon.prototype=[];function $t(te,ue,we){return(we[0]-ue[0])*(te[1]-ue[1])<(we[1]-ue[1])*(te[0]-ue[0])}function kn(te,ue,we,Oe){var De=te[0],Ue=we[0],Ze=ue[0]-De,Je=Oe[0]-Ue,it=te[1],ut=we[1],St=ue[1]-it,Dt=Oe[1]-ut,Ft=(Je*(it-ut)-Dt*(De-Ue))/(Dt*Ze-Je*St);return[De+Ft*Ze,it+Ft*St]}function zt(te){var ue=te[0],we=te[te.length-1];return!(ue[0]-we[0]||ue[1]-we[1])}yr.area=function(){for(var te,ue=-1,we=this.length,Oe=this[we-1],De=0;++ue<we;)De+=(te=Oe)[1]*(Oe=this[ue])[0]-te[0]*Oe[1];return.5*De},yr.centroid=function(te){var ue,we,Oe=-1,De=this.length,Ue=0,Ze=0,Je=this[De-1];for(arguments.length||(te=-1/(6*this.area()));++Oe<De;)Ue+=((ue=Je)[0]+(Je=this[Oe])[0])*(we=ue[0]*Je[1]-Je[0]*ue[1]),Ze+=(ue[1]+Je[1])*we;return[Ue*te,Ze*te]},yr.clip=function(te){for(var ue,we,Oe,De,Ue,Ze,Je=zt(te),it=-1,ut=this.length-zt(this),St=this[ut-1];++it<ut;){for(ue=te.slice(),te.length=0,De=this[it],Ue=ue[(Oe=ue.length-Je)-1],we=-1;++we<Oe;)$t(Ze=ue[we],St,De)?($t(Ue,St,De)||te.push(kn(Ue,Ze,St,De)),te.push(Ze)):$t(Ue,St,De)&&te.push(kn(Ue,Ze,St,De)),Ue=Ze;Je&&te.push(te[0]),St=De}return te};var Wt,tn,Sn,An,Tn,an=[],mn=[];function on(){li(this),this.edge=this.site=this.circle=null}function fn(te){var ue=an.pop()||new on;return ue.site=te,ue}function yn(te){lr(te),Sn.remove(te),an.push(te),li(te)}function Ln(te){var ue=te.circle,we=ue.x,Oe=ue.cy,De={x:we,y:Oe},Ue=te.P,Ze=te.N,Je=[te];yn(te);for(var it=Ue;it.circle&&y(we-it.circle.x)<Lt&&y(Oe-it.circle.cy)<Lt;)Ue=it.P,Je.unshift(it),yn(it),it=Ue;Je.unshift(it),lr(it);for(var ut=Ze;ut.circle&&y(we-ut.circle.x)<Lt&&y(Oe-ut.circle.cy)<Lt;)Ze=ut.N,Je.push(ut),yn(ut),ut=Ze;Je.push(ut),lr(ut);var St,Dt=Je.length;for(St=1;St<Dt;++St)cr((ut=Je[St]).edge,(it=Je[St-1]).site,ut.site,De);(ut=Je[Dt-1]).edge=Sr((it=Je[0]).site,ut.site,null,De),ir(it),ir(ut)}function Hn(te){for(var ue,we,Oe,De,Ue=te.x,Ze=te.y,Je=Sn._;Je;)if((Oe=Wn(Je,Ze)-Ue)>Lt)Je=Je.L;else{if(!((De=Ue-Kn(Je,Ze))>Lt)){Oe>-Lt?(ue=Je.P,we=Je):De>-Lt?(ue=Je,we=Je.N):ue=we=Je;break}if(!Je.R){ue=Je;break}Je=Je.R}var it=fn(te);if(Sn.insert(ue,it),ue||we){if(ue===we)return lr(ue),we=fn(ue.site),Sn.insert(it,we),it.edge=we.edge=Sr(ue.site,it.site),ir(ue),void ir(we);if(we){lr(ue),lr(we);var ut=ue.site,St=ut.x,Dt=ut.y,Ft=te.x-St,Yt=te.y-Dt,ln=we.site,Xt=ln.x-St,en=ln.y-Dt,Jt=2*(Ft*en-Yt*Xt),bn=Ft*Ft+Yt*Yt,gn=Xt*Xt+en*en,Qt={x:(en*bn-Yt*gn)/Jt+St,y:(Ft*gn-Xt*bn)/Jt+Dt};cr(we.edge,ut,ln,Qt),it.edge=Sr(ut,te,null,Qt),we.edge=Sr(te,ln,null,Qt),ir(ue),ir(we)}else it.edge=Sr(ue.site,it.site)}}function Wn(te,ue){var we=te.site,Oe=we.x,De=we.y,Ue=De-ue;if(!Ue)return Oe;var Ze=te.P;if(!Ze)return-1/0;var Je=(we=Ze.site).x,it=we.y,ut=it-ue;if(!ut)return Je;var St=Je-Oe,Dt=1/Ue-1/ut,Ft=St/ut;return Dt?(-Ft+Math.sqrt(Ft*Ft-2*Dt*(St*St/(-2*ut)-it+ut/2+De-Ue/2)))/Dt+Oe:(Oe+Je)/2}function Kn(te,ue){var we=te.N;if(we)return Wn(we,ue);var Oe=te.site;return Oe.y===ue?Oe.x:1/0}function nr(te){this.site=te,this.edges=[]}function er(te,ue){return ue.angle-te.angle}function or(){li(this),this.x=this.y=this.arc=this.site=this.cy=null}function ir(te){var ue=te.P,we=te.N;if(ue&&we){var Oe=ue.site,De=te.site,Ue=we.site;if(Oe!==Ue){var Ze=De.x,Je=De.y,it=Oe.x-Ze,ut=Oe.y-Je,St=Ue.x-Ze,Dt=2*(it*(en=Ue.y-Je)-ut*St);if(!(Dt>=-1e-12)){var Ft=it*it+ut*ut,Yt=St*St+en*en,ln=(en*Ft-ut*Yt)/Dt,Xt=(it*Yt-St*Ft)/Dt,en=Xt+Je,Jt=mn.pop()||new or;Jt.arc=te,Jt.site=De,Jt.x=ln+Ze,Jt.y=en+Math.sqrt(ln*ln+Xt*Xt),Jt.cy=en,te.circle=Jt;for(var bn=null,gn=Tn._;gn;)if(Jt.y<gn.y||Jt.y===gn.y&&Jt.x<=gn.x){if(!gn.L){bn=gn.P;break}gn=gn.L}else{if(!gn.R){bn=gn;break}gn=gn.R}Tn.insert(bn,Jt),bn||(An=Jt)}}}}function lr(te){var ue=te.circle;ue&&(ue.P||(An=ue.N),Tn.remove(ue),mn.push(ue),li(ue),te.circle=null)}function br(te,ue){var we=te.b;if(we)return!0;var Oe,De,Ue=te.a,Ze=ue[0][0],Je=ue[1][0],it=ue[0][1],ut=ue[1][1],St=te.l,Dt=te.r,Ft=St.x,Yt=St.y,ln=Dt.x,Xt=Dt.y,en=(Ft+ln)/2;if(Xt===Yt){if(en<Ze||en>=Je)return;if(Ft>ln){if(Ue){if(Ue.y>=ut)return}else Ue={x:en,y:it};we={x:en,y:ut}}else{if(Ue){if(Ue.y<it)return}else Ue={x:en,y:ut};we={x:en,y:it}}}else if(De=(Yt+Xt)/2-(Oe=(Ft-ln)/(Xt-Yt))*en,Oe<-1||Oe>1)if(Ft>ln){if(Ue){if(Ue.y>=ut)return}else Ue={x:(it-De)/Oe,y:it};we={x:(ut-De)/Oe,y:ut}}else{if(Ue){if(Ue.y<it)return}else Ue={x:(ut-De)/Oe,y:ut};we={x:(it-De)/Oe,y:it}}else if(Yt<Xt){if(Ue){if(Ue.x>=Je)return}else Ue={x:Ze,y:Oe*Ze+De};we={x:Je,y:Oe*Je+De}}else{if(Ue){if(Ue.x<Ze)return}else Ue={x:Je,y:Oe*Je+De};we={x:Ze,y:Oe*Ze+De}}return te.a=Ue,te.b=we,!0}function Ur(te,ue){this.l=te,this.r=ue,this.a=this.b=null}function Sr(te,ue,we,Oe){var De=new Ur(te,ue);return Wt.push(De),we&&cr(De,te,ue,we),Oe&&cr(De,ue,te,Oe),tn[te.i].edges.push(new Lr(De,te,ue)),tn[ue.i].edges.push(new Lr(De,ue,te)),De}function cr(te,ue,we,Oe){te.a||te.b?te.l===we?te.b=Oe:te.a=Oe:(te.a=Oe,te.l=ue,te.r=we)}function Lr(te,ue,we){var Oe=te.a,De=te.b;this.edge=te,this.site=ue,this.angle=we?Math.atan2(we.y-ue.y,we.x-ue.x):te.l===ue?Math.atan2(De.x-Oe.x,Oe.y-De.y):Math.atan2(Oe.x-De.x,De.y-Oe.y)}function Rr(){this._=null}function li(te){te.U=te.C=te.L=te.R=te.P=te.N=null}function Mi(te,ue){var we=ue,Oe=ue.R,De=we.U;De?De.L===we?De.L=Oe:De.R=Oe:te._=Oe,Oe.U=De,we.U=Oe,we.R=Oe.L,we.R&&(we.R.U=we),Oe.L=we}function Pi(te,ue){var we=ue,Oe=ue.L,De=we.U;De?De.L===we?De.L=Oe:De.R=Oe:te._=Oe,Oe.U=De,we.U=Oe,we.L=Oe.R,we.L&&(we.L.U=we),Oe.R=we}function Ea(te){for(;te.L;)te=te.L;return te}function Ui(te,ue){var we,Oe,De,Ue=te.sort(vi).pop();for(Wt=[],tn=new Array(te.length),Sn=new Rr,Tn=new Rr;;)if(De=An,Ue&&(!De||Ue.y<De.y||Ue.y===De.y&&Ue.x<De.x))Ue.x===we&&Ue.y===Oe||(tn[Ue.i]=new nr(Ue),Hn(Ue),we=Ue.x,Oe=Ue.y),Ue=te.pop();else{if(!De)break;Ln(De.arc)}ue&&(function(Je){for(var it,ut,St,Dt,Ft,Yt=Wt,ln=(ut=Je[0][0],St=Je[0][1],Dt=Je[1][0],Ft=Je[1][1],function(en){var Jt,bn=en.a,gn=en.b,Qt=bn.x,Pn=bn.y,Dn=0,Xn=1,Jn=gn.x-Qt,gr=gn.y-Pn;if(Jt=ut-Qt,Jn||!(Jt>0)){if(Jt/=Jn,Jn<0){if(Jt<Dn)return;Jt<Xn&&(Xn=Jt)}else if(Jn>0){if(Jt>Xn)return;Jt>Dn&&(Dn=Jt)}if(Jt=Dt-Qt,Jn||!(Jt<0)){if(Jt/=Jn,Jn<0){if(Jt>Xn)return;Jt>Dn&&(Dn=Jt)}else if(Jn>0){if(Jt<Dn)return;Jt<Xn&&(Xn=Jt)}if(Jt=St-Pn,gr||!(Jt>0)){if(Jt/=gr,gr<0){if(Jt<Dn)return;Jt<Xn&&(Xn=Jt)}else if(gr>0){if(Jt>Xn)return;Jt>Dn&&(Dn=Jt)}if(Jt=Ft-Pn,gr||!(Jt<0)){if(Jt/=gr,gr<0){if(Jt>Xn)return;Jt>Dn&&(Dn=Jt)}else if(gr>0){if(Jt<Dn)return;Jt<Xn&&(Xn=Jt)}return Dn>0&&(en.a={x:Qt+Dn*Jn,y:Pn+Dn*gr}),Xn<1&&(en.b={x:Qt+Xn*Jn,y:Pn+Xn*gr}),en}}}}}),Xt=Yt.length;Xt--;)(!br(it=Yt[Xt],Je)||!ln(it)||y(it.a.x-it.b.x)<Lt&&y(it.a.y-it.b.y)<Lt)&&(it.a=it.b=null,Yt.splice(Xt,1))}(ue),function(Je){for(var it,ut,St,Dt,Ft,Yt,ln,Xt,en,Jt,bn=Je[0][0],gn=Je[1][0],Qt=Je[0][1],Pn=Je[1][1],Dn=tn,Xn=Dn.length;Xn--;)if((Ft=Dn[Xn])&&Ft.prepare())for(Xt=(ln=Ft.edges).length,Yt=0;Yt<Xt;)St=(Jt=ln[Yt].end()).x,Dt=Jt.y,it=(en=ln[++Yt%Xt].start()).x,ut=en.y,(y(St-it)>Lt||y(Dt-ut)>Lt)&&(ln.splice(Yt,0,new Lr((Jn=Ft.site,gr=Jt,vr=y(St-bn)<Lt&&Pn-Dt>Lt?{x:bn,y:y(it-bn)<Lt?ut:Pn}:y(Dt-Pn)<Lt&&gn-St>Lt?{x:y(ut-Pn)<Lt?it:gn,y:Pn}:y(St-gn)<Lt&&Dt-Qt>Lt?{x:gn,y:y(it-gn)<Lt?ut:Qt}:y(Dt-Qt)<Lt&&St-bn>Lt?{x:y(ut-Qt)<Lt?it:bn,y:Qt}:null,sr=void 0,(sr=new Ur(Jn,null)).a=gr,sr.b=vr,Wt.push(sr),sr),Ft.site,null)),++Xt);var Jn,gr,vr,sr}(ue));var Ze={cells:tn,edges:Wt};return Sn=Tn=Wt=tn=null,Ze}function vi(te,ue){return ue.y-te.y||ue.x-te.x}nr.prototype.prepare=function(){for(var te,ue=this.edges,we=ue.length;we--;)(te=ue[we].edge).b&&te.a||ue.splice(we,1);return ue.sort(er),ue.length},Lr.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}},Rr.prototype={insert:function(te,ue){var we,Oe,De;if(te){if(ue.P=te,ue.N=te.N,te.N&&(te.N.P=ue),te.N=ue,te.R){for(te=te.R;te.L;)te=te.L;te.L=ue}else te.R=ue;we=te}else this._?(te=Ea(this._),ue.P=null,ue.N=te,te.P=te.L=ue,we=te):(ue.P=ue.N=null,this._=ue,we=null);for(ue.L=ue.R=null,ue.U=we,ue.C=!0,te=ue;we&&we.C;)we===(Oe=we.U).L?(De=Oe.R)&&De.C?(we.C=De.C=!1,Oe.C=!0,te=Oe):(te===we.R&&(Mi(this,we),we=(te=we).U),we.C=!1,Oe.C=!0,Pi(this,Oe)):(De=Oe.L)&&De.C?(we.C=De.C=!1,Oe.C=!0,te=Oe):(te===we.L&&(Pi(this,we),we=(te=we).U),we.C=!1,Oe.C=!0,Mi(this,Oe)),we=te.U;this._.C=!1},remove:function(te){te.N&&(te.N.P=te.P),te.P&&(te.P.N=te.N),te.N=te.P=null;var ue,we,Oe,De=te.U,Ue=te.L,Ze=te.R;if(we=Ue?Ze?Ea(Ze):Ue:Ze,De?De.L===te?De.L=we:De.R=we:this._=we,Ue&&Ze?(Oe=we.C,we.C=te.C,we.L=Ue,Ue.U=we,we!==Ze?(De=we.U,we.U=te.U,De.L=te=we.R,we.R=Ze,Ze.U=we):(we.U=De,De=we,te=we.R)):(Oe=te.C,te=we),te&&(te.U=De),!Oe)if(te&&te.C)te.C=!1;else{do{if(te===this._)break;if(te===De.L){if((ue=De.R).C&&(ue.C=!1,De.C=!0,Mi(this,De),ue=De.R),ue.L&&ue.L.C||ue.R&&ue.R.C){ue.R&&ue.R.C||(ue.L.C=!1,ue.C=!0,Pi(this,ue),ue=De.R),ue.C=De.C,De.C=ue.R.C=!1,Mi(this,De),te=this._;break}}else if((ue=De.L).C&&(ue.C=!1,De.C=!0,Pi(this,De),ue=De.L),ue.L&&ue.L.C||ue.R&&ue.R.C){ue.L&&ue.L.C||(ue.R.C=!1,ue.C=!0,Mi(this,ue),ue=De.L),ue.C=De.C,De.C=ue.L.C=!1,Pi(this,De),te=this._;break}ue.C=!0,te=De,De=De.U}while(!te.C);te&&(te.C=!1)}}},l.geom.voronoi=function(te){var ue=Cn,we=Un,Oe=ue,De=we,Ue=La;if(te)return Ze(te);function Ze(it){var ut=new Array(it.length),St=Ue[0][0],Dt=Ue[0][1],Ft=Ue[1][0],Yt=Ue[1][1];return Ui(Je(it),Ue).cells.forEach(function(ln,Xt){var en=ln.edges,Jt=ln.site;(ut[Xt]=en.length?en.map(function(bn){var gn=bn.start();return[gn.x,gn.y]}):Jt.x>=St&&Jt.x<=Ft&&Jt.y>=Dt&&Jt.y<=Yt?[[St,Yt],[Ft,Yt],[Ft,Dt],[St,Dt]]:[]).point=it[Xt]}),ut}function Je(it){return it.map(function(ut,St){return{x:Math.round(Oe(ut,St)/Lt)*Lt,y:Math.round(De(ut,St)/Lt)*Lt,i:St}})}return Ze.links=function(it){return Ui(Je(it)).edges.filter(function(ut){return ut.l&&ut.r}).map(function(ut){return{source:it[ut.l.i],target:it[ut.r.i]}})},Ze.triangles=function(it){var ut=[];return Ui(Je(it)).cells.forEach(function(St,Dt){for(var Ft,Yt,ln,Xt,en=St.site,Jt=St.edges.sort(er),bn=-1,gn=Jt.length,Qt=Jt[gn-1].edge,Pn=Qt.l===en?Qt.r:Qt.l;++bn<gn;)Ft=Pn,Pn=(Qt=Jt[bn].edge).l===en?Qt.r:Qt.l,Dt<Ft.i&&Dt<Pn.i&&((Yt=en).x-(Xt=Pn).x)*((ln=Ft).y-Yt.y)-(Yt.x-ln.x)*(Xt.y-Yt.y)<0&&ut.push([it[Dt],it[Ft.i],it[Pn.i]])}),ut},Ze.x=function(it){return arguments.length?(Oe=Fn(ue=it),Ze):ue},Ze.y=function(it){return arguments.length?(De=Fn(we=it),Ze):we},Ze.clipExtent=function(it){return arguments.length?(Ue=it??La,Ze):Ue===La?null:Ue},Ze.size=function(it){return arguments.length?Ze.clipExtent(it&&[[0,0],it]):Ue===La?null:Ue&&Ue[1]},Ze};var La=[[-1e6,-1e6],[1e6,1e6]];function to(te){return te.x}function qo(te){return te.y}function Go(te,ue,we,Oe,De,Ue){if(!te(ue,we,Oe,De,Ue)){var Ze=.5*(we+De),Je=.5*(Oe+Ue),it=ue.nodes;it[0]&&Go(te,it[0],we,Oe,Ze,Je),it[1]&&Go(te,it[1],Ze,Oe,De,Je),it[2]&&Go(te,it[2],we,Je,Ze,Ue),it[3]&&Go(te,it[3],Ze,Je,De,Ue)}}function Us(te,ue){te=l.rgb(te),ue=l.rgb(ue);var we=te.r,Oe=te.g,De=te.b,Ue=ue.r-we,Ze=ue.g-Oe,Je=ue.b-De;return function(it){return"#"+dn(Math.round(we+Ue*it))+dn(Math.round(Oe+Ze*it))+dn(Math.round(De+Je*it))}}function Zo(te,ue){var we,Oe={},De={};for(we in te)we in ue?Oe[we]=ma(te[we],ue[we]):De[we]=te[we];for(we in ue)we in te||(De[we]=ue[we]);return function(Ue){for(we in Oe)De[we]=Oe[we](Ue);return De}}function Ta(te,ue){return te=+te,ue=+ue,function(we){return te*(1-we)+ue*we}}function Vs(te,ue){var we,Oe,De,Ue=zi.lastIndex=ss.lastIndex=0,Ze=-1,Je=[],it=[];for(te+="",ue+="";(we=zi.exec(te))&&(Oe=ss.exec(ue));)(De=Oe.index)>Ue&&(De=ue.slice(Ue,De),Je[Ze]?Je[Ze]+=De:Je[++Ze]=De),(we=we[0])===(Oe=Oe[0])?Je[Ze]?Je[Ze]+=Oe:Je[++Ze]=Oe:(Je[++Ze]=null,it.push({i:Ze,x:Ta(we,Oe)})),Ue=ss.lastIndex;return Ue<ue.length&&(De=ue.slice(Ue),Je[Ze]?Je[Ze]+=De:Je[++Ze]=De),Je.length<2?it[0]?(ue=it[0].x,function(ut){return ue(ut)+""}):function(){return ue}:(ue=it.length,function(ut){for(var St,Dt=0;Dt<ue;++Dt)Je[(St=it[Dt]).i]=St.x(ut);return Je.join("")})}l.geom.delaunay=function(te){return l.geom.voronoi().triangles(te)},l.geom.quadtree=function(te,ue,we,Oe,De){var Ue,Ze=Cn,Je=Un;if(Ue=arguments.length)return Ze=to,Je=qo,3===Ue&&(De=we,Oe=ue,we=ue=0),it(te);function it(ut){var St,Dt,Ft,Yt,ln,Xt,en,Jt,bn,gn=Fn(Ze),Qt=Fn(Je);if(null!=ue)Xt=ue,en=we,Jt=Oe,bn=De;else if(Jt=bn=-(Xt=en=1/0),Dt=[],Ft=[],ln=ut.length,Ue)for(Yt=0;Yt<ln;++Yt)(St=ut[Yt]).x<Xt&&(Xt=St.x),St.y<en&&(en=St.y),St.x>Jt&&(Jt=St.x),St.y>bn&&(bn=St.y),Dt.push(St.x),Ft.push(St.y);else for(Yt=0;Yt<ln;++Yt){var Pn=+gn(St=ut[Yt],Yt),Dn=+Qt(St,Yt);Pn<Xt&&(Xt=Pn),Dn<en&&(en=Dn),Pn>Jt&&(Jt=Pn),Dn>bn&&(bn=Dn),Dt.push(Pn),Ft.push(Dn)}var Xn=Jt-Xt,Jn=bn-en;function gr(dr,kr,Vr,Hr,hr,Ar,Dr,zr){if(!isNaN(Vr)&&!isNaN(Hr))if(dr.leaf){var Wr=dr.x,Zr=dr.y;if(null!=Wr)if(y(Wr-Vr)+y(Zr-Hr)<.01)vr(dr,kr,Vr,Hr,hr,Ar,Dr,zr);else{var $r=dr.point;dr.x=dr.y=dr.point=null,vr(dr,$r,Wr,Zr,hr,Ar,Dr,zr),vr(dr,kr,Vr,Hr,hr,Ar,Dr,zr)}else dr.x=Vr,dr.y=Hr,dr.point=kr}else vr(dr,kr,Vr,Hr,hr,Ar,Dr,zr)}function vr(dr,kr,Vr,Hr,hr,Ar,Dr,zr){var Wr=.5*(hr+Dr),Zr=.5*(Ar+zr),$r=Vr>=Wr,ui=Hr>=Zr,yi=ui<<1|$r;dr.leaf=!1,$r?hr=Wr:Dr=Wr,ui?Ar=Zr:zr=Zr,gr(dr=dr.nodes[yi]||(dr.nodes[yi]={leaf:!0,nodes:[],point:null,x:null,y:null}),kr,Vr,Hr,hr,Ar,Dr,zr)}Xn>Jn?bn=en+Xn:Jt=Xt+Jn;var sr={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(dr){gr(sr,dr,+gn(dr,++Yt),+Qt(dr,Yt),Xt,en,Jt,bn)},visit:function(dr){Go(dr,sr,Xt,en,Jt,bn)},find:function(dr){return function il(te,ue,we,Oe,De,Ue,Ze){var Je,it=1/0;return function ut(St,Dt,Ft,Yt,ln){if(!(Dt>Ue||Ft>Ze||Yt<Oe||ln<De)){if(Xt=St.point){var Xt,en=ue-St.x,Jt=we-St.y,bn=en*en+Jt*Jt;if(bn<it){var gn=Math.sqrt(it=bn);Oe=ue-gn,De=we-gn,Ue=ue+gn,Ze=we+gn,Je=Xt}}for(var Qt=St.nodes,Pn=.5*(Dt+Yt),Dn=.5*(Ft+ln),Xn=(we>=Dn)<<1|ue>=Pn,Jn=Xn+4;Xn<Jn;++Xn)if(St=Qt[3&Xn])switch(3&Xn){case 0:ut(St,Dt,Ft,Pn,Dn);break;case 1:ut(St,Pn,Ft,Yt,Dn);break;case 2:ut(St,Dt,Dn,Pn,ln);break;case 3:ut(St,Pn,Dn,Yt,ln)}}}(te,Oe,De,Ue,Ze),Je}(sr,dr[0],dr[1],Xt,en,Jt,bn)}};if(Yt=-1,null==ue){for(;++Yt<ln;)gr(sr,ut[Yt],Dt[Yt],Ft[Yt],Xt,en,Jt,bn);--Yt}else ut.forEach(sr.add);return Dt=Ft=ut=St=null,sr}return it.x=function(ut){return arguments.length?(Ze=ut,it):Ze},it.y=function(ut){return arguments.length?(Je=ut,it):Je},it.extent=function(ut){return arguments.length?(null==ut?ue=we=Oe=De=null:(ue=+ut[0][0],we=+ut[0][1],Oe=+ut[1][0],De=+ut[1][1]),it):null==ue?null:[[ue,we],[Oe,De]]},it.size=function(ut){return arguments.length?(null==ut?ue=we=Oe=De=null:(ue=we=0,Oe=+ut[0],De=+ut[1]),it):null==ue?null:[Oe-ue,De-we]},it},l.interpolateRgb=Us,l.interpolateObject=Zo,l.interpolateNumber=Ta,l.interpolateString=Vs;var zi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,ss=new RegExp(zi.source,"g");function ma(te,ue){for(var we,Oe=l.interpolators.length;--Oe>=0&&!(we=l.interpolators[Oe](te,ue)););return we}function ka(te,ue){var we,Oe=[],De=[],Ue=te.length,Ze=ue.length,Je=Math.min(te.length,ue.length);for(we=0;we<Je;++we)Oe.push(ma(te[we],ue[we]));for(;we<Ue;++we)De[we]=te[we];for(;we<Ze;++we)De[we]=ue[we];return function(it){for(we=0;we<Je;++we)De[we]=Oe[we](it);return De}}l.interpolate=ma,l.interpolators=[function(te,ue){var we=typeof ue;return("string"===we?Nn.has(ue.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(ue)?Us:Vs:ue instanceof st?Us:Array.isArray(ue)?ka:"object"===we&&isNaN(ue)?Zo:Ta)(te,ue)}],l.interpolateArray=ka;var vo=function(){return U},Qr=l.map({linear:vo,poly:function(te){return function(ue){return Math.pow(ue,te)}},quad:function(){return ls},cubic:function(){return al},sin:function(){return ol},exp:function(){return sl},circle:function(){return ml},elastic:function(te,ue){var we;return arguments.length<2&&(ue=.45),arguments.length?we=ue/It*Math.asin(1/te):(te=1,we=ue/4),function(Oe){return 1+te*Math.pow(2,-10*Oe)*Math.sin((Oe-we)*It/ue)}},back:function(te){return te||(te=1.70158),function(ue){return ue*ue*((te+1)*ue-te)}},bounce:function(){return Hs}}),mo=l.map({in:U,out:Ua,"in-out":Ya,"out-in":function(te){return Ya(Ua(te))}});function Ua(te){return function(ue){return 1-te(1-ue)}}function Ya(te){return function(ue){return.5*(ue<.5?te(2*ue):2-te(2-2*ue))}}function ls(te){return te*te}function al(te){return te*te*te}function no(te){if(te<=0)return 0;if(te>=1)return 1;var ue=te*te,we=ue*te;return 4*(te<.5?we:3*(te-ue)+we-.75)}function ol(te){return 1-Math.cos(te*Rt)}function sl(te){return Math.pow(2,10*(te-1))}function ml(te){return 1-Math.sqrt(1-te*te)}function Hs(te){return te<.36363636363636365?7.5625*te*te:te<.7272727272727273?7.5625*(te-=.5454545454545454)*te+.75:te<.9090909090909091?7.5625*(te-=.8181818181818182)*te+.9375:7.5625*(te-=.9545454545454546)*te+.984375}function ll(te,ue){return ue-=te,function(we){return Math.round(te+ue*we)}}function qs(te){var ue,we,Oe,De=[te.a,te.b],Ue=[te.c,te.d],Ze=io(De),Je=ro(De,Ue),it=io(((ue=Ue)[0]+=(Oe=-Je)*(we=De)[0],ue[1]+=Oe*we[1],ue))||0;De[0]*Ue[1]<Ue[0]*De[1]&&(De[0]*=-1,De[1]*=-1,Ze*=-1,Je*=-1),this.rotate=(Ze?Math.atan2(De[1],De[0]):Math.atan2(-Ue[0],Ue[1]))*We,this.translate=[te.e,te.f],this.scale=[Ze,it],this.skew=it?Math.atan2(Je,it)*We:0}function ro(te,ue){return te[0]*ue[0]+te[1]*ue[1]}function io(te){var ue=Math.sqrt(ro(te,te));return ue&&(te[0]/=ue,te[1]/=ue),ue}l.ease=function(te){var ue=te.indexOf("-"),we=ue>=0?te.slice(0,ue):te,Oe=ue>=0?te.slice(ue+1):"in";return we=Qr.get(we)||vo,function Ca(te){return function(ue){return ue<=0?0:ue>=1?1:te(ue)}}((Oe=mo.get(Oe)||U)(we.apply(null,T.call(arguments,1))))},l.interpolateHcl=function(te,ue){te=l.hcl(te),ue=l.hcl(ue);var we=te.h,Oe=te.c,De=te.l,Ue=ue.h-we,Ze=ue.c-Oe,Je=ue.l-De;return isNaN(Ze)&&(Ze=0,Oe=isNaN(Oe)?ue.c:Oe),isNaN(Ue)?(Ue=0,we=isNaN(we)?ue.h:we):Ue>180?Ue-=360:Ue<-180&&(Ue+=360),function(it){return pt(we+Ue*it,Oe+Ze*it,De+Je*it)+""}},l.interpolateHsl=function(te,ue){te=l.hsl(te),ue=l.hsl(ue);var we=te.h,Oe=te.s,De=te.l,Ue=ue.h-we,Ze=ue.s-Oe,Je=ue.l-De;return isNaN(Ze)&&(Ze=0,Oe=isNaN(Oe)?ue.s:Oe),isNaN(Ue)?(Ue=0,we=isNaN(we)?ue.h:we):Ue>180?Ue-=360:Ue<-180&&(Ue+=360),function(it){return Et(we+Ue*it,Oe+Ze*it,De+Je*it)+""}},l.interpolateLab=function(te,ue){te=l.lab(te),ue=l.lab(ue);var we=te.l,Oe=te.a,De=te.b,Ue=ue.l-we,Ze=ue.a-Oe,Je=ue.b-De;return function(it){return Nt(we+Ue*it,Oe+Ze*it,De+Je*it)+""}},l.interpolateRound=ll,l.transform=function(te){var ue=d.createElementNS(l.ns.prefix.svg,"g");return(l.transform=function(we){if(null!=we){ue.setAttribute("transform",we);var Oe=ue.transform.baseVal.consolidate()}return new qs(Oe?Oe.matrix:Wo)})(te)},qs.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var Wo={a:1,b:0,c:0,d:1,e:0,f:0};function ao(te){return te.length?te.pop()+",":""}function Gs(te,ue){var De,Ue,Ze,we=[],Oe=[];return te=l.transform(te),ue=l.transform(ue),function(De,Ue,Ze,Je){if(De[0]!==Ue[0]||De[1]!==Ue[1]){var it=Ze.push("translate(",null,",",null,")");Je.push({i:it-4,x:Ta(De[0],Ue[0])},{i:it-2,x:Ta(De[1],Ue[1])})}else(Ue[0]||Ue[1])&&Ze.push("translate("+Ue+")")}(te.translate,ue.translate,we,Oe),Ze=we,(De=te.rotate)!==(Ue=ue.rotate)?(De-Ue>180?Ue+=360:Ue-De>180&&(De+=360),Oe.push({i:Ze.push(ao(Ze)+"rotate(",null,")")-2,x:Ta(De,Ue)})):Ue&&Ze.push(ao(Ze)+"rotate("+Ue+")"),function(De,Ue,Ze,Je){De!==Ue?Je.push({i:Ze.push(ao(Ze)+"skewX(",null,")")-2,x:Ta(De,Ue)}):Ue&&Ze.push(ao(Ze)+"skewX("+Ue+")")}(te.skew,ue.skew,we,Oe),function(De,Ue,Ze,Je){if(De[0]!==Ue[0]||De[1]!==Ue[1]){var it=Ze.push(ao(Ze)+"scale(",null,",",null,")");Je.push({i:it-4,x:Ta(De[0],Ue[0])},{i:it-2,x:Ta(De[1],Ue[1])})}else 1===Ue[0]&&1===Ue[1]||Ze.push(ao(Ze)+"scale("+Ue+")")}(te.scale,ue.scale,we,Oe),te=ue=null,function(De){for(var Ue,Ze=-1,Je=Oe.length;++Ze<Je;)we[(Ue=Oe[Ze]).i]=Ue.x(De);return we.join("")}}function Zs(te,ue){return ue=(ue-=te=+te)||1/ue,function(we){return(we-te)/ue}}function Co(te,ue){return ue=(ue-=te=+te)||1/ue,function(we){return Math.max(0,Math.min(1,(we-te)/ue))}}function Ms(te){for(var ue=te.source,we=te.target,Oe=function(Ze,Je){if(Ze===Je)return Ze;for(var it=yo(Ze),ut=yo(Je),St=it.pop(),Dt=ut.pop(),Ft=null;St===Dt;)Ft=St,St=it.pop(),Dt=ut.pop();return Ft}(ue,we),De=[ue];ue!==Oe;)De.push(ue=ue.parent);for(var Ue=De.length;we!==Oe;)De.splice(Ue,0,we),we=we.parent;return De}function yo(te){for(var ue=[],we=te.parent;null!=we;)ue.push(te),te=we,we=we.parent;return ue.push(te),ue}function Yo(te){te.fixed|=2}function Po(te){te.fixed&=-7}function oo(te){te.fixed|=4,te.px=te.x,te.py=te.y}function ei(te){te.fixed&=-5}function xo(te,ue,we){var Oe=0,De=0;if(te.charge=0,!te.leaf)for(var Ue,Ze=te.nodes,Je=Ze.length,it=-1;++it<Je;)null!=(Ue=Ze[it])&&(xo(Ue,ue,we),te.charge+=Ue.charge,Oe+=Ue.charge*Ue.cx,De+=Ue.charge*Ue.cy);if(te.point){te.leaf||(te.point.x+=Math.random()-.5,te.point.y+=Math.random()-.5);var ut=ue*we[te.point.index];te.charge+=te.pointCharge=ut,Oe+=ut*te.point.x,De+=ut*te.point.y}te.cx=Oe/te.charge,te.cy=De/te.charge}l.interpolateTransform=Gs,l.layout={},l.layout.bundle=function(){return function(te){for(var ue=[],we=-1,Oe=te.length;++we<Oe;)ue.push(Ms(te[we]));return ue}},l.layout.chord=function(){var te,ue,we,Oe,De,Ue,Ze,Je={},it=0;function ut(){var Dt,Ft,Yt,ln,Xt,en={},Jt=[],bn=l.range(Oe),gn=[];for(te=[],ue=[],Dt=0,ln=-1;++ln<Oe;){for(Ft=0,Xt=-1;++Xt<Oe;)Ft+=we[ln][Xt];Jt.push(Ft),gn.push(l.range(Oe)),Dt+=Ft}for(De&&bn.sort(function(sr,dr){return De(Jt[sr],Jt[dr])}),Ue&&gn.forEach(function(sr,dr){sr.sort(function(kr,Vr){return Ue(we[dr][kr],we[dr][Vr])})}),Dt=(It-it*Oe)/Dt,Ft=0,ln=-1;++ln<Oe;){for(Yt=Ft,Xt=-1;++Xt<Oe;){var Qt=bn[ln],Pn=gn[Qt][Xt],Dn=we[Qt][Pn],Xn=Ft,Jn=Ft+=Dn*Dt;en[Qt+"-"+Pn]={index:Qt,subindex:Pn,startAngle:Xn,endAngle:Jn,value:Dn}}ue[Qt]={index:Qt,startAngle:Yt,endAngle:Ft,value:Jt[Qt]},Ft+=it}for(ln=-1;++ln<Oe;)for(Xt=ln-1;++Xt<Oe;){var gr=en[ln+"-"+Xt],vr=en[Xt+"-"+ln];(gr.value||vr.value)&&te.push(gr.value<vr.value?{source:vr,target:gr}:{source:gr,target:vr})}Ze&&St()}function St(){te.sort(function(Dt,Ft){return Ze((Dt.source.value+Dt.target.value)/2,(Ft.source.value+Ft.target.value)/2)})}return Je.matrix=function(Dt){return arguments.length?(Oe=(we=Dt)&&we.length,te=ue=null,Je):we},Je.padding=function(Dt){return arguments.length?(it=Dt,te=ue=null,Je):it},Je.sortGroups=function(Dt){return arguments.length?(De=Dt,te=ue=null,Je):De},Je.sortSubgroups=function(Dt){return arguments.length?(Ue=Dt,te=null,Je):Ue},Je.sortChords=function(Dt){return arguments.length?(Ze=Dt,te&&St(),Je):Ze},Je.chords=function(){return te||ut(),te},Je.groups=function(){return ue||ut(),ue},Je},l.layout.force=function(){var te,ue,we,Oe,De,Ue,Ze={},Je=l.dispatch("start","tick","end"),it=[1,1],ut=.9,St=yl,Dt=Ss,Ft=-30,Yt=us,ln=.1,Xt=.64,en=[],Jt=[];function bn(Qt){return function(Pn,Dn,Xn,Jn){if(Pn.point!==Qt){var gr=Pn.cx-Qt.x,vr=Pn.cy-Qt.y,sr=Jn-Dn,dr=gr*gr+vr*vr;if(sr*sr/Xt<dr){if(dr<Yt){var kr=Pn.charge/dr;Qt.px-=gr*kr,Qt.py-=vr*kr}return!0}Pn.point&&dr&&dr<Yt&&(Qt.px-=gr*(kr=Pn.pointCharge/dr),Qt.py-=vr*kr)}return!Pn.charge}}function gn(Qt){Qt.px=l.event.x,Qt.py=l.event.y,Ze.resume()}return Ze.tick=function(){if((we*=.99)<.005)return te=null,Je.end({type:"end",alpha:we=0}),!0;var Qt,Pn,Dn,Xn,Jn,gr,vr,sr,dr,kr=en.length,Vr=Jt.length;for(Pn=0;Pn<Vr;++Pn)Xn=(Dn=Jt[Pn]).source,(gr=(sr=(Jn=Dn.target).x-Xn.x)*sr+(dr=Jn.y-Xn.y)*dr)&&(sr*=gr=we*De[Pn]*((gr=Math.sqrt(gr))-Oe[Pn])/gr,dr*=gr,Jn.x-=sr*(vr=Xn.weight+Jn.weight?Xn.weight/(Xn.weight+Jn.weight):.5),Jn.y-=dr*vr,Xn.x+=sr*(vr=1-vr),Xn.y+=dr*vr);if((vr=we*ln)&&(sr=it[0]/2,dr=it[1]/2,Pn=-1,vr))for(;++Pn<kr;)(Dn=en[Pn]).x+=(sr-Dn.x)*vr,Dn.y+=(dr-Dn.y)*vr;if(Ft)for(xo(Qt=l.geom.quadtree(en),we,Ue),Pn=-1;++Pn<kr;)(Dn=en[Pn]).fixed||Qt.visit(bn(Dn));for(Pn=-1;++Pn<kr;)(Dn=en[Pn]).fixed?(Dn.x=Dn.px,Dn.y=Dn.py):(Dn.x-=(Dn.px-(Dn.px=Dn.x))*ut,Dn.y-=(Dn.py-(Dn.py=Dn.y))*ut);Je.tick({type:"tick",alpha:we})},Ze.nodes=function(Qt){return arguments.length?(en=Qt,Ze):en},Ze.links=function(Qt){return arguments.length?(Jt=Qt,Ze):Jt},Ze.size=function(Qt){return arguments.length?(it=Qt,Ze):it},Ze.linkDistance=function(Qt){return arguments.length?(St="function"==typeof Qt?Qt:+Qt,Ze):St},Ze.distance=Ze.linkDistance,Ze.linkStrength=function(Qt){return arguments.length?(Dt="function"==typeof Qt?Qt:+Qt,Ze):Dt},Ze.friction=function(Qt){return arguments.length?(ut=+Qt,Ze):ut},Ze.charge=function(Qt){return arguments.length?(Ft="function"==typeof Qt?Qt:+Qt,Ze):Ft},Ze.chargeDistance=function(Qt){return arguments.length?(Yt=Qt*Qt,Ze):Math.sqrt(Yt)},Ze.gravity=function(Qt){return arguments.length?(ln=+Qt,Ze):ln},Ze.theta=function(Qt){return arguments.length?(Xt=Qt*Qt,Ze):Math.sqrt(Xt)},Ze.alpha=function(Qt){return arguments.length?(Qt=+Qt,we?Qt>0?we=Qt:(te.c=null,te.t=NaN,te=null,Je.end({type:"end",alpha:we=0})):Qt>0&&(Je.start({type:"start",alpha:we=Qt}),te=Zt(Ze.tick)),Ze):we},Ze.start=function(){var Qt,Pn,Dn,Xn=en.length,Jn=Jt.length,gr=it[0],vr=it[1];for(Qt=0;Qt<Xn;++Qt)(Dn=en[Qt]).index=Qt,Dn.weight=0;for(Qt=0;Qt<Jn;++Qt)"number"==typeof(Dn=Jt[Qt]).source&&(Dn.source=en[Dn.source]),"number"==typeof Dn.target&&(Dn.target=en[Dn.target]),++Dn.source.weight,++Dn.target.weight;for(Qt=0;Qt<Xn;++Qt)Dn=en[Qt],isNaN(Dn.x)&&(Dn.x=sr("x",gr)),isNaN(Dn.y)&&(Dn.y=sr("y",vr)),isNaN(Dn.px)&&(Dn.px=Dn.x),isNaN(Dn.py)&&(Dn.py=Dn.y);if(Oe=[],"function"==typeof St)for(Qt=0;Qt<Jn;++Qt)Oe[Qt]=+St.call(this,Jt[Qt],Qt);else for(Qt=0;Qt<Jn;++Qt)Oe[Qt]=St;if(De=[],"function"==typeof Dt)for(Qt=0;Qt<Jn;++Qt)De[Qt]=+Dt.call(this,Jt[Qt],Qt);else for(Qt=0;Qt<Jn;++Qt)De[Qt]=Dt;if(Ue=[],"function"==typeof Ft)for(Qt=0;Qt<Xn;++Qt)Ue[Qt]=+Ft.call(this,en[Qt],Qt);else for(Qt=0;Qt<Xn;++Qt)Ue[Qt]=Ft;function sr(dr,kr){if(!Pn){for(Pn=new Array(Xn),Ar=0;Ar<Xn;++Ar)Pn[Ar]=[];for(Ar=0;Ar<Jn;++Ar){var Vr=Jt[Ar];Pn[Vr.source.index].push(Vr.target),Pn[Vr.target.index].push(Vr.source)}}for(var Hr,hr=Pn[Qt],Ar=-1,Dr=hr.length;++Ar<Dr;)if(!isNaN(Hr=hr[Ar][dr]))return Hr;return Math.random()*kr}return Ze.resume()},Ze.resume=function(){return Ze.alpha(.1)},Ze.stop=function(){return Ze.alpha(0)},Ze.drag=function(){if(ue||(ue=l.behavior.drag().origin(U).on("dragstart.force",Yo).on("drag.force",gn).on("dragend.force",Po)),!arguments.length)return ue;this.on("mouseover.force",oo).on("mouseout.force",ei).call(ue)},l.rebind(Ze,Je,"on")};var yl=20,Ss=1,us=1/0;function Oo(te,ue){return l.rebind(te,ue,"sort","children","value"),te.nodes=te,te.links=fs,te}function Xo(te,ue){for(var we=[te];null!=(te=we.pop());)if(ue(te),(De=te.children)&&(Oe=De.length))for(var Oe,De;--Oe>=0;)we.push(De[Oe])}function Pa(te,ue){for(var we=[te],Oe=[];null!=(te=we.pop());)if(Oe.push(te),(Ue=te.children)&&(De=Ue.length))for(var De,Ue,Ze=-1;++Ze<De;)we.push(Ue[Ze]);for(;null!=(te=Oe.pop());)ue(te)}function Ws(te){return te.children}function cs(te){return te.value}function Jo(te,ue){return ue.value-te.value}function fs(te){return l.merge(te.map(function(ue){return(ue.children||[]).map(function(we){return{source:ue,target:we}})}))}l.layout.hierarchy=function(){var te=Jo,ue=Ws,we=cs;function Oe(De){var Ue,Ze=[De],Je=[];for(De.depth=0;null!=(Ue=Ze.pop());)if(Je.push(Ue),(ut=ue.call(Oe,Ue,Ue.depth))&&(it=ut.length)){for(var it,ut,St;--it>=0;)Ze.push(St=ut[it]),St.parent=Ue,St.depth=Ue.depth+1;we&&(Ue.value=0),Ue.children=ut}else we&&(Ue.value=+we.call(Oe,Ue,Ue.depth)||0),delete Ue.children;return Pa(De,function(Dt){var Ft,Yt;te&&(Ft=Dt.children)&&Ft.sort(te),we&&(Yt=Dt.parent)&&(Yt.value+=Dt.value)}),Je}return Oe.sort=function(De){return arguments.length?(te=De,Oe):te},Oe.children=function(De){return arguments.length?(ue=De,Oe):ue},Oe.value=function(De){return arguments.length?(we=De,Oe):we},Oe.revalue=function(De){return we&&(Xo(De,function(Ue){Ue.children&&(Ue.value=0)}),Pa(De,function(Ue){var Ze;Ue.children||(Ue.value=+we.call(Oe,Ue,Ue.depth)||0),(Ze=Ue.parent)&&(Ze.value+=Ue.value)})),De},Oe},l.layout.partition=function(){var te=l.layout.hierarchy(),ue=[1,1];function we(Ue,Ze,Je,it){var ut=Ue.children;if(Ue.x=Ze,Ue.y=Ue.depth*it,Ue.dx=Je,Ue.dy=it,ut&&(St=ut.length)){var St,Dt,Ft,Yt=-1;for(Je=Ue.value?Je/Ue.value:0;++Yt<St;)we(Dt=ut[Yt],Ze,Ft=Dt.value*Je,it),Ze+=Ft}}function Oe(Ue){var Ze=Ue.children,Je=0;if(Ze&&(it=Ze.length))for(var it,ut=-1;++ut<it;)Je=Math.max(Je,Oe(Ze[ut]));return 1+Je}function De(Ue,Ze){var Je=te.call(this,Ue,Ze);return we(Je[0],0,ue[0],ue[1]/Oe(Je[0])),Je}return De.size=function(Ue){return arguments.length?(ue=Ue,De):ue},Oo(De,te)},l.layout.pie=function(){var te=Number,ue=Io,we=0,Oe=It,De=0;function Ue(Ze){var Je,it=Ze.length,ut=Ze.map(function(bn,gn){return+te.call(Ue,bn,gn)}),St=+("function"==typeof we?we.apply(this,arguments):we),Dt=("function"==typeof Oe?Oe.apply(this,arguments):Oe)-St,Ft=Math.min(Math.abs(Dt)/it,+("function"==typeof De?De.apply(this,arguments):De)),Yt=Ft*(Dt<0?-1:1),ln=l.sum(ut),Xt=ln?(Dt-it*Yt)/ln:0,en=l.range(it),Jt=[];return null!=ue&&en.sort(ue===Io?function(bn,gn){return ut[gn]-ut[bn]}:function(bn,gn){return ue(Ze[bn],Ze[gn])}),en.forEach(function(bn){Jt[bn]={data:Ze[bn],value:Je=ut[bn],startAngle:St,endAngle:St+=Je*Xt+Yt,padAngle:Ft}}),Jt}return Ue.value=function(Ze){return arguments.length?(te=Ze,Ue):te},Ue.sort=function(Ze){return arguments.length?(ue=Ze,Ue):ue},Ue.startAngle=function(Ze){return arguments.length?(we=Ze,Ue):we},Ue.endAngle=function(Ze){return arguments.length?(Oe=Ze,Ue):Oe},Ue.padAngle=function(Ze){return arguments.length?(De=Ze,Ue):De},Ue};var Io={};function Ro(te){return te.x}function Ko(te){return te.y}function hs(te,ue,we){te.y0=ue,te.y=we}l.layout.stack=function(){var te=U,ue=ds,we=gs,Oe=hs,De=Ro,Ue=Ko;function Ze(Je,it){if(!(Ft=Je.length))return Je;var ut=Je.map(function(bn,gn){return te.call(Ze,bn,gn)}),St=ut.map(function(bn){return bn.map(function(gn,Qt){return[De.call(Ze,gn,Qt),Ue.call(Ze,gn,Qt)]})}),Dt=ue.call(Ze,St,it);ut=l.permute(ut,Dt),St=l.permute(St,Dt);var Ft,Yt,ln,Xt,en=we.call(Ze,St,it),Jt=ut[0].length;for(ln=0;ln<Jt;++ln)for(Oe.call(Ze,ut[0][ln],Xt=en[ln],St[0][ln][1]),Yt=1;Yt<Ft;++Yt)Oe.call(Ze,ut[Yt][ln],Xt+=St[Yt-1][ln][1],St[Yt][ln][1]);return Je}return Ze.values=function(Je){return arguments.length?(te=Je,Ze):te},Ze.order=function(Je){return arguments.length?(ue="function"==typeof Je?Je:ps.get(Je)||ds,Ze):ue},Ze.offset=function(Je){return arguments.length?(we="function"==typeof Je?Je:Oa.get(Je)||gs,Ze):we},Ze.x=function(Je){return arguments.length?(De=Je,Ze):De},Ze.y=function(Je){return arguments.length?(Ue=Je,Ze):Ue},Ze.out=function(Je){return arguments.length?(Oe=Je,Ze):Oe},Ze};var ps=l.map({"inside-out":function(te){var ue,we,Oe=te.length,De=te.map(Ys),Ue=te.map(bo),Ze=l.range(Oe).sort(function(Dt,Ft){return De[Dt]-De[Ft]}),Je=0,it=0,ut=[],St=[];for(ue=0;ue<Oe;++ue)we=Ze[ue],Je<it?(Je+=Ue[we],ut.push(we)):(it+=Ue[we],St.push(we));return St.reverse().concat(ut)},reverse:function(te){return l.range(te.length).reverse()},default:ds}),Oa=l.map({silhouette:function(te){var ue,we,Oe,De=te.length,Ue=te[0].length,Ze=[],Je=0,it=[];for(we=0;we<Ue;++we){for(ue=0,Oe=0;ue<De;ue++)Oe+=te[ue][we][1];Oe>Je&&(Je=Oe),Ze.push(Oe)}for(we=0;we<Ue;++we)it[we]=(Je-Ze[we])/2;return it},wiggle:function(te){var ue,we,Oe,De,Ue,Ze,Je,it,ut,St=te.length,Dt=te[0],Ft=Dt.length,Yt=[];for(Yt[0]=it=ut=0,we=1;we<Ft;++we){for(ue=0,De=0;ue<St;++ue)De+=te[ue][we][1];for(ue=0,Ue=0,Je=Dt[we][0]-Dt[we-1][0];ue<St;++ue){for(Oe=0,Ze=(te[ue][we][1]-te[ue][we-1][1])/(2*Je);Oe<ue;++Oe)Ze+=(te[Oe][we][1]-te[Oe][we-1][1])/Je;Ue+=Ze*te[ue][we][1]}Yt[we]=it-=De?Ue/De*Je:0,it<ut&&(ut=it)}for(we=0;we<Ft;++we)Yt[we]-=ut;return Yt},expand:function(te){var ue,we,Oe,De=te.length,Ue=te[0].length,Ze=1/De,Je=[];for(we=0;we<Ue;++we){for(ue=0,Oe=0;ue<De;ue++)Oe+=te[ue][we][1];if(Oe)for(ue=0;ue<De;ue++)te[ue][we][1]/=Oe;else for(ue=0;ue<De;ue++)te[ue][we][1]=Ze}for(we=0;we<Ue;++we)Je[we]=0;return Je},zero:gs});function ds(te){return l.range(te.length)}function gs(te){for(var ue=-1,we=te[0].length,Oe=[];++ue<we;)Oe[ue]=0;return Oe}function Ys(te){for(var ue,we=1,Oe=0,De=te[0][1],Ue=te.length;we<Ue;++we)(ue=te[we][1])>De&&(Oe=we,De=ue);return Oe}function bo(te){return te.reduce(Es,0)}function Es(te,ue){return te+ue[1]}function vs(te,ue){return Xs(te,Math.ceil(Math.log(ue.length)/Math.LN2+1))}function Xs(te,ue){for(var we=-1,Oe=+te[0],De=(te[1]-Oe)/ue,Ue=[];++we<=ue;)Ue[we]=De*we+Oe;return Ue}function ms(te){return[l.min(te),l.max(te)]}function $o(te,ue){return te.value-ue.value}function zo(te,ue){var we=te._pack_next;te._pack_next=ue,ue._pack_prev=te,ue._pack_next=we,we._pack_prev=ue}function Do(te,ue){te._pack_next=ue,ue._pack_prev=te}function ai(te,ue){var we=ue.x-te.x,Oe=ue.y-te.y,De=te.r+ue.r;return.999*De*De>we*we+Oe*Oe}function _o(te){if((ue=te.children)&&(it=ue.length)){var ue,we,Oe,De,Ue,Ze,Je,it,ut=1/0,St=-1/0,Dt=1/0,Ft=-1/0;if(ue.forEach(wo),(we=ue[0]).x=-we.r,we.y=0,gn(we),it>1&&((Oe=ue[1]).x=Oe.r,Oe.y=0,gn(Oe),it>2))for(Kr(we,Oe,De=ue[2]),gn(De),zo(we,De),we._pack_prev=De,zo(De,Oe),Oe=we._pack_next,Ue=3;Ue<it;Ue++){Kr(we,Oe,De=ue[Ue]);var Yt=0,ln=1,Xt=1;for(Ze=Oe._pack_next;Ze!==Oe;Ze=Ze._pack_next,ln++)if(ai(Ze,De)){Yt=1;break}if(1==Yt)for(Je=we._pack_prev;Je!==Ze._pack_prev&&!ai(Je,De);Je=Je._pack_prev,Xt++);Yt?(ln<Xt||ln==Xt&&Oe.r<we.r?Do(we,Oe=Ze):Do(we=Je,Oe),Ue--):(zo(we,De),Oe=De,gn(De))}var en=(ut+St)/2,Jt=(Dt+Ft)/2,bn=0;for(Ue=0;Ue<it;Ue++)(De=ue[Ue]).x-=en,De.y-=Jt,bn=Math.max(bn,De.r+Math.sqrt(De.x*De.x+De.y*De.y));te.r=bn,ue.forEach(Zi)}function gn(Qt){ut=Math.min(Qt.x-Qt.r,ut),St=Math.max(Qt.x+Qt.r,St),Dt=Math.min(Qt.y-Qt.r,Dt),Ft=Math.max(Qt.y+Qt.r,Ft)}}function wo(te){te._pack_next=te._pack_prev=te}function Zi(te){delete te._pack_next,delete te._pack_prev}function Xr(te,ue,we,Oe){var De=te.children;if(te.x=ue+=Oe*te.x,te.y=we+=Oe*te.y,te.r*=Oe,De)for(var Ue=-1,Ze=De.length;++Ue<Ze;)Xr(De[Ue],ue,we,Oe)}function Kr(te,ue,we){var Oe=te.r+we.r,De=ue.x-te.x,Ue=ue.y-te.y;if(Oe&&(De||Ue)){var Ze=ue.r+we.r,Je=De*De+Ue*Ue,it=.5+((Oe*=Oe)-(Ze*=Ze))/(2*Je),ut=Math.sqrt(Math.max(0,2*Ze*(Oe+Je)-(Oe-=Je)*Oe-Ze*Ze))/(2*Je);we.x=te.x+it*De+ut*Ue,we.y=te.y+it*Ue-ut*De}else we.x=te.x+Oe,we.y=te.y}function so(te,ue){return te.parent==ue.parent?1:2}function Xa(te){var ue=te.children;return ue.length?ue[0]:te.t}function Ls(te){var ue,we=te.children;return(ue=we.length)?we[ue-1]:te.t}function Js(te,ue,we){var Oe=we/(ue.i-te.i);ue.c-=Oe,ue.s+=we,te.c+=Oe,ue.z+=we,ue.m+=we}function Fo(te,ue,we){return te.a.parent===ue.parent?te.a:we}function Ks(te){var ue=te.children;return ue&&ue.length?Ks(ue[0]):te}function Bo(te){var ue,we=te.children;return we&&(ue=we.length)?Bo(we[ue-1]):te}function lo(te){return{x:te.x,y:te.y,dx:te.dx,dy:te.dy}}function No(te,ue){var we=te.x+ue[3],Oe=te.y+ue[0],De=te.dx-ue[1]-ue[3],Ue=te.dy-ue[0]-ue[2];return De<0&&(we+=De/2,De=0),Ue<0&&(Oe+=Ue/2,Ue=0),{x:we,y:Oe,dx:De,dy:Ue}}function mi(te){var ue=te[0],we=te[te.length-1];return ue<we?[ue,we]:[we,ue]}function Ja(te){return te.rangeExtent?te.rangeExtent():mi(te.range())}function jo(te,ue,we,Oe){var De=we(te[0],te[1]),Ue=Oe(ue[0],ue[1]);return function(Ze){return Ue(De(Ze))}}function Ii(te,ue){var we,Oe=0,De=te.length-1,Ue=te[Oe],Ze=te[De];return Ze<Ue&&(we=Oe,Oe=De,De=we,we=Ue,Ue=Ze,Ze=we),te[Oe]=ue.floor(Ue),te[De]=ue.ceil(Ze),te}function Wi(te){return te?{floor:function(ue){return Math.floor(ue/te)*te},ceil:function(ue){return Math.ceil(ue/te)*te}}:Yi}l.layout.histogram=function(){var te=!0,ue=Number,we=ms,Oe=vs;function De(Ue,Ze){for(var Je,it,ut=[],St=Ue.map(ue,this),Dt=we.call(this,St,Ze),Ft=Oe.call(this,Dt,St,Ze),Yt=(Ze=-1,St.length),ln=Ft.length-1,Xt=te?1:1/Yt;++Ze<ln;)(Je=ut[Ze]=[]).dx=Ft[Ze+1]-(Je.x=Ft[Ze]),Je.y=0;if(ln>0)for(Ze=-1;++Ze<Yt;)(it=St[Ze])>=Dt[0]&&it<=Dt[1]&&((Je=ut[l.bisect(Ft,it,1,ln)-1]).y+=Xt,Je.push(Ue[Ze]));return ut}return De.value=function(Ue){return arguments.length?(ue=Ue,De):ue},De.range=function(Ue){return arguments.length?(we=Fn(Ue),De):we},De.bins=function(Ue){return arguments.length?(Oe="number"==typeof Ue?function(Ze){return Xs(Ze,Ue)}:Fn(Ue),De):Oe},De.frequency=function(Ue){return arguments.length?(te=!!Ue,De):te},De},l.layout.pack=function(){var te,ue=l.layout.hierarchy().sort($o),we=0,Oe=[1,1];function De(Ue,Ze){var Je=ue.call(this,Ue,Ze),it=Je[0],ut=Oe[0],St=Oe[1],Dt=null==te?Math.sqrt:"function"==typeof te?te:function(){return te};if(it.x=it.y=0,Pa(it,function(Yt){Yt.r=+Dt(Yt.value)}),Pa(it,_o),we){var Ft=we*(te?1:Math.max(2*it.r/ut,2*it.r/St))/2;Pa(it,function(Yt){Yt.r+=Ft}),Pa(it,_o),Pa(it,function(Yt){Yt.r-=Ft})}return Xr(it,ut/2,St/2,te?1:1/Math.max(2*it.r/ut,2*it.r/St)),Je}return De.size=function(Ue){return arguments.length?(Oe=Ue,De):Oe},De.radius=function(Ue){return arguments.length?(te=null==Ue||"function"==typeof Ue?Ue:+Ue,De):te},De.padding=function(Ue){return arguments.length?(we=+Ue,De):we},Oo(De,ue)},l.layout.tree=function(){var te=l.layout.hierarchy().sort(null).value(null),ue=so,we=[1,1],Oe=null;function De(it,ut){var St=te.call(this,it,ut),Dt=St[0],Ft=function(gn){for(var Qt,Pn={A:null,children:[gn]},Dn=[Pn];null!=(Qt=Dn.pop());)for(var Xn,Jn=Qt.children,gr=0,vr=Jn.length;gr<vr;++gr)Dn.push((Jn[gr]=Xn={_:Jn[gr],parent:Qt,children:(Xn=Jn[gr].children)&&Xn.slice()||[],A:null,a:null,z:0,m:0,c:0,s:0,t:null,i:gr}).a=Xn);return Pn.children[0]}(Dt);if(Pa(Ft,Ue),Ft.parent.m=-Ft.z,Xo(Ft,Ze),Oe)Xo(Dt,Je);else{var Yt=Dt,ln=Dt,Xt=Dt;Xo(Dt,function(gn){gn.x<Yt.x&&(Yt=gn),gn.x>ln.x&&(ln=gn),gn.depth>Xt.depth&&(Xt=gn)});var en=ue(Yt,ln)/2-Yt.x,Jt=we[0]/(ln.x+ue(ln,Yt)/2+en),bn=we[1]/(Xt.depth||1);Xo(Dt,function(gn){gn.x=(gn.x+en)*Jt,gn.y=gn.depth*bn})}return St}function Ue(it){var ut=it.children,St=it.parent.children,Dt=it.i?St[it.i-1]:null;if(ut.length){!function(Yt){for(var ln,Xt=0,en=0,Jt=Yt.children,bn=Jt.length;--bn>=0;)(ln=Jt[bn]).z+=Xt,ln.m+=Xt,Xt+=ln.s+(en+=ln.c)}(it);var Ft=(ut[0].z+ut[ut.length-1].z)/2;Dt?(it.z=Dt.z+ue(it._,Dt._),it.m=it.z-Ft):it.z=Ft}else Dt&&(it.z=Dt.z+ue(it._,Dt._));it.parent.A=function(Yt,ln,Xt){if(ln){for(var en,Jt=Yt,bn=Yt,gn=ln,Qt=Jt.parent.children[0],Pn=Jt.m,Dn=bn.m,Xn=gn.m,Jn=Qt.m;gn=Ls(gn),Jt=Xa(Jt),gn&&Jt;)Qt=Xa(Qt),(bn=Ls(bn)).a=Yt,(en=gn.z+Xn-Jt.z-Pn+ue(gn._,Jt._))>0&&(Js(Fo(gn,Yt,Xt),Yt,en),Pn+=en,Dn+=en),Xn+=gn.m,Pn+=Jt.m,Jn+=Qt.m,Dn+=bn.m;gn&&!Ls(bn)&&(bn.t=gn,bn.m+=Xn-Dn),Jt&&!Xa(Qt)&&(Qt.t=Jt,Qt.m+=Pn-Jn,Xt=Yt)}return Xt}(it,Dt,it.parent.A||St[0])}function Ze(it){it._.x=it.z+it.parent.m,it.m+=it.parent.m}function Je(it){it.x*=we[0],it.y=it.depth*we[1]}return De.separation=function(it){return arguments.length?(ue=it,De):ue},De.size=function(it){return arguments.length?(Oe=null==(we=it)?Je:null,De):Oe?null:we},De.nodeSize=function(it){return arguments.length?(Oe=null==(we=it)?null:Je,De):Oe?we:null},Oo(De,te)},l.layout.cluster=function(){var te=l.layout.hierarchy().sort(null).value(null),ue=so,we=[1,1],Oe=!1;function De(Ue,Ze){var Je,it=te.call(this,Ue,Ze),ut=it[0],St=0;Pa(ut,function(Xt){var Jt,en=Xt.children;en&&en.length?(Xt.x=(Jt=en).reduce(function(bn,gn){return bn+gn.x},0)/Jt.length,Xt.y=function(Jt){return 1+l.max(Jt,function(bn){return bn.y})}(en)):(Xt.x=Je?St+=ue(Xt,Je):0,Xt.y=0,Je=Xt)});var Dt=Ks(ut),Ft=Bo(ut),Yt=Dt.x-ue(Dt,Ft)/2,ln=Ft.x+ue(Ft,Dt)/2;return Pa(ut,Oe?function(Xt){Xt.x=(Xt.x-ut.x)*we[0],Xt.y=(ut.y-Xt.y)*we[1]}:function(Xt){Xt.x=(Xt.x-Yt)/(ln-Yt)*we[0],Xt.y=(1-(ut.y?Xt.y/ut.y:1))*we[1]}),it}return De.separation=function(Ue){return arguments.length?(ue=Ue,De):ue},De.size=function(Ue){return arguments.length?(Oe=null==(we=Ue),De):Oe?null:we},De.nodeSize=function(Ue){return arguments.length?(Oe=null!=(we=Ue),De):Oe?we:null},Oo(De,te)},l.layout.treemap=function(){var te,ue=l.layout.hierarchy(),we=Math.round,Oe=[1,1],De=null,Ue=lo,Ze=!1,Je="squarify",it=.5*(1+Math.sqrt(5));function ut(Xt,en){for(var Jt,bn,gn=-1,Qt=Xt.length;++gn<Qt;)bn=(Jt=Xt[gn]).value*(en<0?0:en),Jt.area=isNaN(bn)||bn<=0?0:bn}function St(Xt){var en=Xt.children;if(en&&en.length){var Jt,bn,gn,Qt=Ue(Xt),Pn=[],Dn=en.slice(),Xn=1/0,Jn="slice"===Je?Qt.dx:"dice"===Je?Qt.dy:"slice-dice"===Je?1&Xt.depth?Qt.dy:Qt.dx:Math.min(Qt.dx,Qt.dy);for(ut(Dn,Qt.dx*Qt.dy/Xt.value),Pn.area=0;(gn=Dn.length)>0;)Pn.push(Jt=Dn[gn-1]),Pn.area+=Jt.area,"squarify"!==Je||(bn=Ft(Pn,Jn))<=Xn?(Dn.pop(),Xn=bn):(Pn.area-=Pn.pop().area,Yt(Pn,Jn,Qt,!1),Jn=Math.min(Qt.dx,Qt.dy),Pn.length=Pn.area=0,Xn=1/0);Pn.length&&(Yt(Pn,Jn,Qt,!0),Pn.length=Pn.area=0),en.forEach(St)}}function Dt(Xt){var en=Xt.children;if(en&&en.length){var Jt,bn=Ue(Xt),gn=en.slice(),Qt=[];for(ut(gn,bn.dx*bn.dy/Xt.value),Qt.area=0;Jt=gn.pop();)Qt.push(Jt),Qt.area+=Jt.area,null!=Jt.z&&(Yt(Qt,Jt.z?bn.dx:bn.dy,bn,!gn.length),Qt.length=Qt.area=0);en.forEach(Dt)}}function Ft(Xt,en){for(var Jt,bn=Xt.area,gn=0,Qt=1/0,Pn=-1,Dn=Xt.length;++Pn<Dn;)(Jt=Xt[Pn].area)&&(Jt<Qt&&(Qt=Jt),Jt>gn&&(gn=Jt));return en*=en,(bn*=bn)?Math.max(en*gn*it/bn,bn/(en*Qt*it)):1/0}function Yt(Xt,en,Jt,bn){var gn,Qt=-1,Pn=Xt.length,Dn=Jt.x,Xn=Jt.y,Jn=en?we(Xt.area/en):0;if(en==Jt.dx){for((bn||Jn>Jt.dy)&&(Jn=Jt.dy);++Qt<Pn;)(gn=Xt[Qt]).x=Dn,gn.y=Xn,gn.dy=Jn,Dn+=gn.dx=Math.min(Jt.x+Jt.dx-Dn,Jn?we(gn.area/Jn):0);gn.z=!0,gn.dx+=Jt.x+Jt.dx-Dn,Jt.y+=Jn,Jt.dy-=Jn}else{for((bn||Jn>Jt.dx)&&(Jn=Jt.dx);++Qt<Pn;)(gn=Xt[Qt]).x=Dn,gn.y=Xn,gn.dx=Jn,Xn+=gn.dy=Math.min(Jt.y+Jt.dy-Xn,Jn?we(gn.area/Jn):0);gn.z=!1,gn.dy+=Jt.y+Jt.dy-Xn,Jt.x+=Jn,Jt.dx-=Jn}}function ln(Xt){var en=te||ue(Xt),Jt=en[0];return Jt.x=Jt.y=0,Jt.value?(Jt.dx=Oe[0],Jt.dy=Oe[1]):Jt.dx=Jt.dy=0,te&&ue.revalue(Jt),ut([Jt],Jt.dx*Jt.dy/Jt.value),(te?Dt:St)(Jt),Ze&&(te=en),en}return ln.size=function(Xt){return arguments.length?(Oe=Xt,ln):Oe},ln.padding=function(Xt){return arguments.length?(Ue=null==(De=Xt)?lo:"function"==(bn=typeof Xt)?function en(gn){var Qt=Xt.call(ln,gn,gn.depth);return null==Qt?lo(gn):No(gn,"number"==typeof Qt?[Qt,Qt,Qt,Qt]:Qt)}:("number"===bn&&(Xt=[Xt,Xt,Xt,Xt]),function Jt(gn){return No(gn,Xt)}),ln):De;var bn},ln.round=function(Xt){return arguments.length?(we=Xt?Math.round:Number,ln):we!=Number},ln.sticky=function(Xt){return arguments.length?(Ze=Xt,te=null,ln):Ze},ln.ratio=function(Xt){return arguments.length?(it=Xt,ln):it},ln.mode=function(Xt){return arguments.length?(Je=Xt+"",ln):Je},Oo(ln,ue)},l.random={normal:function(te,ue){var we=arguments.length;return we<2&&(ue=1),we<1&&(te=0),function(){var Oe,De,Ue;do{Ue=(Oe=2*Math.random()-1)*Oe+(De=2*Math.random()-1)*De}while(!Ue||Ue>1);return te+ue*Oe*Math.sqrt(-2*Math.log(Ue)/Ue)}},logNormal:function(){var te=l.random.normal.apply(l,arguments);return function(){return Math.exp(te())}},bates:function(te){var ue=l.random.irwinHall(te);return function(){return ue()/te}},irwinHall:function(te){return function(){for(var ue=0,we=0;we<te;we++)ue+=Math.random();return ue}}},l.scale={};var Yi={floor:U,ceil:U};function qi(te,ue,we,Oe){var De=[],Ue=[],Ze=0,Je=Math.min(te.length,ue.length)-1;for(te[Je]<te[0]&&(te=te.slice().reverse(),ue=ue.slice().reverse());++Ze<=Je;)De.push(we(te[Ze-1],te[Ze])),Ue.push(Oe(ue[Ze-1],ue[Ze]));return function(it){var ut=l.bisect(te,it,1,Je)-1;return Ue[ut](De[ut](it))}}function sa(te,ue,we,Oe){var De,Ue;function Ze(){var it=Math.min(te.length,ue.length)>2?qi:jo,ut=Oe?Co:Zs;return De=it(te,ue,ut,we),Ue=it(ue,te,ut,ma),Je}function Je(it){return De(it)}return Je.invert=function(it){return Ue(it)},Je.domain=function(it){return arguments.length?(te=it.map(Number),Ze()):te},Je.range=function(it){return arguments.length?(ue=it,Ze()):ue},Je.rangeRound=function(it){return Je.range(it).interpolate(ll)},Je.clamp=function(it){return arguments.length?(Oe=it,Ze()):Oe},Je.interpolate=function(it){return arguments.length?(we=it,Ze()):we},Je.ticks=function(it){return ya(te,it)},Je.tickFormat=function(it,ut){return d3_scale_linearTickFormat(te,it,ut)},Je.nice=function(it){return Ia(te,it),Ze()},Je.copy=function(){return sa(te,ue,we,Oe)},Ze()}function To(te,ue){return l.rebind(te,ue,"range","rangeRound","interpolate","clamp")}function Ia(te,ue){return Ii(te,Wi(Di(te,ue)[2])),Ii(te,Wi(Di(te,ue)[2])),te}function Di(te,ue){null==ue&&(ue=10);var we=mi(te),Oe=we[1]-we[0],De=Math.pow(10,Math.floor(Math.log(Oe/ue)/Math.LN10)),Ue=ue/Oe*De;return Ue<=.15?De*=10:Ue<=.35?De*=5:Ue<=.75&&(De*=2),we[0]=Math.ceil(we[0]/De)*De,we[1]=Math.floor(we[1]/De)*De+.5*De,we[2]=De,we}function ya(te,ue){return l.range.apply(l,Di(te,ue))}function Cs(te,ue,we,Oe){function De(Je){return(we?Math.log(Je<0?0:Je):-Math.log(Je>0?0:-Je))/Math.log(ue)}function Ue(Je){return we?Math.pow(ue,Je):-Math.pow(ue,-Je)}function Ze(Je){return te(De(Je))}return Ze.invert=function(Je){return Ue(te.invert(Je))},Ze.domain=function(Je){return arguments.length?(we=Je[0]>=0,te.domain((Oe=Je.map(Number)).map(De)),Ze):Oe},Ze.base=function(Je){return arguments.length?(ue=+Je,te.domain(Oe.map(De)),Ze):ue},Ze.nice=function(){var Je=Ii(Oe.map(De),we?Math:Ps);return te.domain(Je),Oe=Je.map(Ue),Ze},Ze.ticks=function(){var Je=mi(Oe),it=[],ut=Je[0],St=Je[1],Dt=Math.floor(De(ut)),Ft=Math.ceil(De(St)),Yt=ue%1?2:ue;if(isFinite(Ft-Dt)){if(we){for(;Dt<Ft;Dt++)for(var ln=1;ln<Yt;ln++)it.push(Ue(Dt)*ln);it.push(Ue(Dt))}else for(it.push(Ue(Dt));Dt++<Ft;)for(ln=Yt-1;ln>0;ln--)it.push(Ue(Dt)*ln);for(Dt=0;it[Dt]<ut;Dt++);for(Ft=it.length;it[Ft-1]>St;Ft--);it=it.slice(Dt,Ft)}return it},Ze.copy=function(){return Cs(te.copy(),ue,we,Oe)},To(Ze,te)}l.scale.linear=function(){return sa([0,1],[0,1],ma,!1)},l.scale.log=function(){return Cs(l.scale.linear().domain([0,1]),10,!0,[1,10])};var Ps={floor:function(te){return-Math.ceil(-te)},ceil:function(te){return-Math.floor(-te)}};function ia(te,ue,we){var Oe=_r(ue),De=_r(1/ue);function Ue(Ze){return te(Oe(Ze))}return Ue.invert=function(Ze){return De(te.invert(Ze))},Ue.domain=function(Ze){return arguments.length?(te.domain((we=Ze.map(Number)).map(Oe)),Ue):we},Ue.ticks=function(Ze){return ya(we,Ze)},Ue.tickFormat=function(Ze,Je){return d3_scale_linearTickFormat(we,Ze,Je)},Ue.nice=function(Ze){return Ue.domain(Ia(we,Ze))},Ue.exponent=function(Ze){return arguments.length?(Oe=_r(ue=Ze),De=_r(1/ue),te.domain(we.map(Oe)),Ue):ue},Ue.copy=function(){return ia(te.copy(),ue,we)},To(Ue,te)}function _r(te){return function(ue){return ue<0?-Math.pow(-ue,te):Math.pow(ue,te)}}function Uo(te,ue){var we,Oe,De;function Ue(Je){return Oe[((we.get(Je)||("range"===ue.t?we.set(Je,te.push(Je)):NaN))-1)%Oe.length]}function Ze(Je,it){return l.range(te.length).map(function(ut){return Je+it*ut})}return Ue.domain=function(Je){if(!arguments.length)return te;te=[],we=new w;for(var it,ut=-1,St=Je.length;++ut<St;)we.has(it=Je[ut])||we.set(it,te.push(it));return Ue[ue.t].apply(Ue,ue.a)},Ue.range=function(Je){return arguments.length?(Oe=Je,De=0,ue={t:"range",a:arguments},Ue):Oe},Ue.rangePoints=function(Je,it){arguments.length<2&&(it=0);var ut=Je[0],St=Je[1],Dt=te.length<2?(ut=(ut+St)/2,0):(St-ut)/(te.length-1+it);return Oe=Ze(ut+Dt*it/2,Dt),De=0,ue={t:"rangePoints",a:arguments},Ue},Ue.rangeRoundPoints=function(Je,it){arguments.length<2&&(it=0);var ut=Je[0],St=Je[1],Dt=te.length<2?(ut=St=Math.round((ut+St)/2),0):(St-ut)/(te.length-1+it)|0;return Oe=Ze(ut+Math.round(Dt*it/2+(St-ut-(te.length-1+it)*Dt)/2),Dt),De=0,ue={t:"rangeRoundPoints",a:arguments},Ue},Ue.rangeBands=function(Je,it,ut){arguments.length<2&&(it=0),arguments.length<3&&(ut=it);var St=Je[1]<Je[0],Dt=Je[St-0],Yt=(Je[1-St]-Dt)/(te.length-it+2*ut);return Oe=Ze(Dt+Yt*ut,Yt),St&&Oe.reverse(),De=Yt*(1-it),ue={t:"rangeBands",a:arguments},Ue},Ue.rangeRoundBands=function(Je,it,ut){arguments.length<2&&(it=0),arguments.length<3&&(ut=it);var St=Je[1]<Je[0],Dt=Je[St-0],Ft=Je[1-St],Yt=Math.floor((Ft-Dt)/(te.length-it+2*ut));return Oe=Ze(Dt+Math.round((Ft-Dt-(te.length-it)*Yt)/2),Yt),St&&Oe.reverse(),De=Math.round(Yt*(1-it)),ue={t:"rangeRoundBands",a:arguments},Ue},Ue.rangeBand=function(){return De},Ue.rangeExtent=function(){return mi(ue.a[0])},Ue.copy=function(){return Uo(te,ue)},Ue.domain(te)}l.scale.pow=function(){return ia(l.scale.linear(),1,[0,1])},l.scale.sqrt=function(){return l.scale.pow().exponent(.5)},l.scale.ordinal=function(){return Uo([],{t:"range",a:[[]]})},l.scale.category10=function(){return l.scale.ordinal().range(la)},l.scale.category20=function(){return l.scale.ordinal().range(Os)},l.scale.category20b=function(){return l.scale.ordinal().range(Qo)},l.scale.category20c=function(){return l.scale.ordinal().range(es)};var la=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(vn),Os=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(vn),Qo=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(vn),es=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(vn);function ts(te,ue){var we;function Oe(){var Ue=0,Ze=ue.length;for(we=[];++Ue<Ze;)we[Ue-1]=l.quantile(te,Ue/Ze);return De}function De(Ue){if(!isNaN(Ue=+Ue))return ue[l.bisect(we,Ue)]}return De.domain=function(Ue){return arguments.length?(te=Ue.map(p).filter(f).sort(c),Oe()):te},De.range=function(Ue){return arguments.length?(ue=Ue,Oe()):ue},De.quantiles=function(){return we},De.invertExtent=function(Ue){return(Ue=ue.indexOf(Ue))<0?[NaN,NaN]:[Ue>0?we[Ue-1]:te[0],Ue<we.length?we[Ue]:te[te.length-1]]},De.copy=function(){return ts(te,ue)},Oe()}function wr(te,ue,we){var Oe,De;function Ue(Je){return we[Math.max(0,Math.min(De,Math.floor(Oe*(Je-te))))]}function Ze(){return Oe=we.length/(ue-te),De=we.length-1,Ue}return Ue.domain=function(Je){return arguments.length?(te=+Je[0],ue=+Je[Je.length-1],Ze()):[te,ue]},Ue.range=function(Je){return arguments.length?(we=Je,Ze()):we},Ue.invertExtent=function(Je){return[Je=(Je=we.indexOf(Je))<0?NaN:Je/Oe+te,Je+1/Oe]},Ue.copy=function(){return wr(te,ue,we)},Ze()}function ns(te,ue){function we(Oe){if(Oe<=Oe)return ue[l.bisect(te,Oe)]}return we.domain=function(Oe){return arguments.length?(te=Oe,we):te},we.range=function(Oe){return arguments.length?(ue=Oe,we):ue},we.invertExtent=function(Oe){return Oe=ue.indexOf(Oe),[te[Oe-1],te[Oe]]},we.copy=function(){return ns(te,ue)},we}function Ra(te){function ue(we){return+we}return ue.invert=ue,ue.domain=ue.range=function(we){return arguments.length?(te=we.map(ue),ue):te},ue.ticks=function(we){return ya(te,we)},ue.tickFormat=function(we,Oe){return d3_scale_linearTickFormat(te,we,Oe)},ue.copy=function(){return Ra(te)},ue}function Is(){return 0}l.scale.quantile=function(){return ts([],[])},l.scale.quantize=function(){return wr(0,1,[0,1])},l.scale.threshold=function(){return ns([.5],[0,1])},l.scale.identity=function(){return Ra([0,1])},l.svg={},l.svg.arc=function(){var te=Xi,ue=Vo,we=Is,Oe=ys,De=uo,Ue=xa,Ze=ko;function Je(){var ut=Math.max(0,+te.apply(this,arguments)),St=Math.max(0,+ue.apply(this,arguments)),Dt=De.apply(this,arguments)-Rt,Ft=Ue.apply(this,arguments)-Rt,Yt=Math.abs(Ft-Dt),ln=Dt>Ft?0:1;if(St<ut&&(Xt=St,St=ut,ut=Xt),Yt>=Ut)return it(St,ln)+(ut?it(ut,1-ln):"")+"Z";var Xt,en,Jt,bn,gn,Qt,Pn,Dn,Xn,Jn,gr,vr,sr=0,dr=0,kr=[];if((bn=(+Ze.apply(this,arguments)||0)/2)&&(Jt=Oe===ys?Math.sqrt(ut*ut+St*St):+Oe.apply(this,arguments),ln||(dr*=-1),St&&(dr=Be(Jt/St*Math.sin(bn))),ut&&(sr=Be(Jt/ut*Math.sin(bn)))),St){gn=St*Math.cos(Dt+dr),Qt=St*Math.sin(Dt+dr),Pn=St*Math.cos(Ft-dr),Dn=St*Math.sin(Ft-dr);var Vr=Math.abs(Ft-Dt-2*dr)<=Ct?0:1;if(dr&&Va(gn,Qt,Pn,Dn)===ln^Vr){var Hr=(Dt+Ft)/2;gn=St*Math.cos(Hr),Qt=St*Math.sin(Hr),Pn=Dn=null}}else gn=Qt=0;if(ut){Xn=ut*Math.cos(Ft-sr),Jn=ut*Math.sin(Ft-sr),gr=ut*Math.cos(Dt+sr),vr=ut*Math.sin(Dt+sr);var hr=Math.abs(Dt-Ft+2*sr)<=Ct?0:1;if(sr&&Va(Xn,Jn,gr,vr)===1-ln^hr){var Ar=(Dt+Ft)/2;Xn=ut*Math.cos(Ar),Jn=ut*Math.sin(Ar),gr=vr=null}}else Xn=Jn=0;if(Yt>Lt&&(Xt=Math.min(Math.abs(St-ut)/2,+we.apply(this,arguments)))>.001){en=ut<St^ln?0:1;var Dr=Xt,zr=Xt;if(Yt<Ct){var Wr=null==gr?[Xn,Jn]:null==Pn?[gn,Qt]:kn([gn,Qt],[gr,vr],[Pn,Dn],[Xn,Jn]),Zr=gn-Wr[0],$r=Qt-Wr[1],ui=Pn-Wr[0],yi=Dn-Wr[1],hi=1/Math.sin(Math.acos((Zr*ui+$r*yi)/(Math.sqrt(Zr*Zr+$r*$r)*Math.sqrt(ui*ui+yi*yi)))/2),si=Math.sqrt(Wr[0]*Wr[0]+Wr[1]*Wr[1]);zr=Math.min(Xt,(ut-si)/(hi-1)),Dr=Math.min(Xt,(St-si)/(hi+1))}if(null!=Pn){var ci=za(null==gr?[Xn,Jn]:[gr,vr],[gn,Qt],St,Dr,ln),pi=za([Pn,Dn],[Xn,Jn],St,Dr,ln);Xt===Dr?kr.push("M",ci[0],"A",Dr,",",Dr," 0 0,",en," ",ci[1],"A",St,",",St," 0 ",1-ln^Va(ci[1][0],ci[1][1],pi[1][0],pi[1][1]),",",ln," ",pi[1],"A",Dr,",",Dr," 0 0,",en," ",pi[0]):kr.push("M",ci[0],"A",Dr,",",Dr," 0 1,",en," ",pi[0])}else kr.push("M",gn,",",Qt);if(null!=gr){var Si=za([gn,Qt],[gr,vr],ut,-zr,ln),Mo=za([Xn,Jn],null==Pn?[gn,Qt]:[Pn,Dn],ut,-zr,ln);Xt===zr?kr.push("L",Mo[0],"A",zr,",",zr," 0 0,",en," ",Mo[1],"A",ut,",",ut," 0 ",ln^Va(Mo[1][0],Mo[1][1],Si[1][0],Si[1][1]),",",1-ln," ",Si[1],"A",zr,",",zr," 0 0,",en," ",Si[0]):kr.push("L",Mo[0],"A",zr,",",zr," 0 0,",en," ",Si[0])}else kr.push("L",Xn,",",Jn)}else kr.push("M",gn,",",Qt),null!=Pn&&kr.push("A",St,",",St," 0 ",Vr,",",ln," ",Pn,",",Dn),kr.push("L",Xn,",",Jn),null!=gr&&kr.push("A",ut,",",ut," 0 ",hr,",",1-ln," ",gr,",",vr);return kr.push("Z"),kr.join("")}function it(ut,St){return"M0,"+ut+"A"+ut+","+ut+" 0 1,"+St+" 0,"+-ut+"A"+ut+","+ut+" 0 1,"+St+" 0,"+ut}return Je.innerRadius=function(ut){return arguments.length?(te=Fn(ut),Je):te},Je.outerRadius=function(ut){return arguments.length?(ue=Fn(ut),Je):ue},Je.cornerRadius=function(ut){return arguments.length?(we=Fn(ut),Je):we},Je.padRadius=function(ut){return arguments.length?(Oe=ut==ys?ys:Fn(ut),Je):Oe},Je.startAngle=function(ut){return arguments.length?(De=Fn(ut),Je):De},Je.endAngle=function(ut){return arguments.length?(Ue=Fn(ut),Je):Ue},Je.padAngle=function(ut){return arguments.length?(Ze=Fn(ut),Je):Ze},Je.centroid=function(){var ut=(+te.apply(this,arguments)+ +ue.apply(this,arguments))/2,St=(+De.apply(this,arguments)+ +Ue.apply(this,arguments))/2-Rt;return[Math.cos(St)*ut,Math.sin(St)*ut]},Je};var ys="auto";function Xi(te){return te.innerRadius}function Vo(te){return te.outerRadius}function uo(te){return te.startAngle}function xa(te){return te.endAngle}function ko(te){return te&&te.padAngle}function Va(te,ue,we,Oe){return(te-we)*ue-(ue-Oe)*te>0?0:1}function za(te,ue,we,Oe,De){var Ue=te[0]-ue[0],Ze=te[1]-ue[1],Je=(De?Oe:-Oe)/Math.sqrt(Ue*Ue+Ze*Ze),it=Je*Ze,ut=-Je*Ue,St=te[0]+it,Dt=te[1]+ut,Ft=ue[0]+it,Yt=ue[1]+ut,ln=(St+Ft)/2,Xt=(Dt+Yt)/2,en=Ft-St,Jt=Yt-Dt,bn=en*en+Jt*Jt,gn=we-Oe,Qt=St*Yt-Ft*Dt,Pn=(Jt<0?-1:1)*Math.sqrt(Math.max(0,gn*gn*bn-Qt*Qt)),Dn=(Qt*Jt-en*Pn)/bn,Xn=(-Qt*en-Jt*Pn)/bn,Jn=(Qt*Jt+en*Pn)/bn,gr=(-Qt*en+Jt*Pn)/bn,vr=Dn-ln,sr=Xn-Xt,dr=Jn-ln,kr=gr-Xt;return vr*vr+sr*sr>dr*dr+kr*kr&&(Dn=Jn,Xn=gr),[[Dn-it,Xn-ut],[Dn*we/gn,Xn*we/gn]]}function Ho(){return!0}function Ji(te){var ue=Cn,we=Un,Oe=Ho,De=ri,Ue=De.key,Ze=.7;function Je(it){var ut,St=[],Dt=[],Ft=-1,Yt=it.length,ln=Fn(ue),Xt=Fn(we);function en(){St.push("M",De(te(Dt),Ze))}for(;++Ft<Yt;)Oe.call(this,ut=it[Ft],Ft)?Dt.push([+ln.call(this,ut,Ft),+Xt.call(this,ut,Ft)]):Dt.length&&(en(),Dt=[]);return Dt.length&&en(),St.length?St.join(""):null}return Je.x=function(it){return arguments.length?(ue=it,Je):ue},Je.y=function(it){return arguments.length?(we=it,Je):we},Je.defined=function(it){return arguments.length?(Oe=it,Je):Oe},Je.interpolate=function(it){return arguments.length?(Ue="function"==typeof it?De=it:(De=Da.get(it)||ri).key,Je):Ue},Je.tension=function(it){return arguments.length?(Ze=it,Je):Ze},Je}l.svg.line=function(){return Ji(U)};var Da=l.map({linear:ri,"linear-closed":xs,step:function(te){for(var ue=0,we=te.length,Oe=te[0],De=[Oe[0],",",Oe[1]];++ue<we;)De.push("H",(Oe[0]+(Oe=te[ue])[0])/2,"V",Oe[1]);return we>1&&De.push("H",Oe[0]),De.join("")},"step-before":Aa,"step-after":Fa,basis:ni,"basis-open":function(te){if(te.length<4)return ri(te);for(var ue,we=[],Oe=-1,De=te.length,Ue=[0],Ze=[0];++Oe<3;)Ue.push((ue=te[Oe])[0]),Ze.push(ue[1]);for(we.push(Vi($a,Ue)+","+Vi($a,Ze)),--Oe;++Oe<De;)ue=te[Oe],Ue.shift(),Ue.push(ue[0]),Ze.shift(),Ze.push(ue[1]),Ao(we,Ue,Ze);return we.join("")},"basis-closed":function(te){for(var ue,we,Oe=-1,De=te.length,Ue=De+4,Ze=[],Je=[];++Oe<4;)Ze.push((we=te[Oe%De])[0]),Je.push(we[1]);for(ue=[Vi($a,Ze),",",Vi($a,Je)],--Oe;++Oe<Ue;)we=te[Oe%De],Ze.shift(),Ze.push(we[0]),Je.shift(),Je.push(we[1]),Ao(ue,Ze,Je);return ue.join("")},bundle:function(te,ue){var we=te.length-1;if(we)for(var Oe,De,Ue=te[0][0],Ze=te[0][1],Je=te[we][0]-Ue,it=te[we][1]-Ze,ut=-1;++ut<=we;)(Oe=te[ut])[0]=ue*Oe[0]+(1-ue)*(Ue+(De=ut/we)*Je),Oe[1]=ue*Oe[1]+(1-ue)*(Ze+De*it);return ni(te)},cardinal:function(te,ue){return te.length<3?ri(te):te[0]+Ka(te,ua(te,ue))},"cardinal-open":function(te,ue){return te.length<4?ri(te):te[1]+Ka(te.slice(1,-1),ua(te,ue))},"cardinal-closed":function(te,ue){return te.length<3?xs(te):te[0]+Ka((te.push(te[0]),te),ua([te[te.length-2]].concat(te,[te[1]]),ue))},monotone:function(te){return te.length<3?ri(te):te[0]+Ka(te,function(ue){for(var we,Oe,De,Ue,Ze=[],Je=function(St){for(var Dt=0,Ft=St.length-1,Yt=[],ln=St[0],Xt=St[1],en=Yt[0]=co(ln,Xt);++Dt<Ft;)Yt[Dt]=(en+(en=co(ln=Xt,Xt=St[Dt+1])))/2;return Yt[Dt]=en,Yt}(ue),it=-1,ut=ue.length-1;++it<ut;)we=co(ue[it],ue[it+1]),y(we)<Lt?Je[it]=Je[it+1]=0:(Ue=(Oe=Je[it]/we)*Oe+(De=Je[it+1]/we)*De)>9&&(Ue=3*we/Math.sqrt(Ue),Je[it]=Ue*Oe,Je[it+1]=Ue*De);for(it=-1;++it<=ut;)Ue=(ue[Math.min(ut,it+1)][0]-ue[Math.max(0,it-1)][0])/(6*(1+Je[it]*Je[it])),Ze.push([Ue||0,Je[it]*Ue||0]);return Ze}(te))}});function ri(te){return te.length>1?te.join("L"):te+"Z"}function xs(te){return te.join("L")+"Z"}function Aa(te){for(var ue=0,we=te.length,Oe=te[0],De=[Oe[0],",",Oe[1]];++ue<we;)De.push("V",(Oe=te[ue])[1],"H",Oe[0]);return De.join("")}function Fa(te){for(var ue=0,we=te.length,Oe=te[0],De=[Oe[0],",",Oe[1]];++ue<we;)De.push("H",(Oe=te[ue])[0],"V",Oe[1]);return De.join("")}function Ka(te,ue){if(ue.length<1||te.length!=ue.length&&te.length!=ue.length+2)return ri(te);var we=te.length!=ue.length,Oe="",De=te[0],Ue=te[1],Ze=ue[0],Je=Ze,it=1;if(we&&(Oe+="Q"+(Ue[0]-2*Ze[0]/3)+","+(Ue[1]-2*Ze[1]/3)+","+Ue[0]+","+Ue[1],De=te[1],it=2),ue.length>1){Ue=te[it],it++,Oe+="C"+(De[0]+Ze[0])+","+(De[1]+Ze[1])+","+(Ue[0]-(Je=ue[1])[0])+","+(Ue[1]-Je[1])+","+Ue[0]+","+Ue[1];for(var ut=2;ut<ue.length;ut++,it++)Oe+="S"+((Ue=te[it])[0]-(Je=ue[ut])[0])+","+(Ue[1]-Je[1])+","+Ue[0]+","+Ue[1]}if(we){var St=te[it];Oe+="Q"+(Ue[0]+2*Je[0]/3)+","+(Ue[1]+2*Je[1]/3)+","+St[0]+","+St[1]}return Oe}function ua(te,ue){for(var we,Oe=[],De=(1-ue)/2,Ue=te[0],Ze=te[1],Je=1,it=te.length;++Je<it;)we=Ue,Ue=Ze,Oe.push([De*((Ze=te[Je])[0]-we[0]),De*(Ze[1]-we[1])]);return Oe}function ni(te){if(te.length<3)return ri(te);var ue=1,we=te.length,Oe=te[0],De=Oe[0],Ue=Oe[1],Ze=[De,De,De,(Oe=te[1])[0]],Je=[Ue,Ue,Ue,Oe[1]],it=[De,",",Ue,"L",Vi($a,Ze),",",Vi($a,Je)];for(te.push(te[we-1]);++ue<=we;)Oe=te[ue],Ze.shift(),Ze.push(Oe[0]),Je.shift(),Je.push(Oe[1]),Ao(it,Ze,Je);return te.pop(),it.push("L",Oe),it.join("")}function Vi(te,ue){return te[0]*ue[0]+te[1]*ue[1]+te[2]*ue[2]+te[3]*ue[3]}Da.forEach(function(te,ue){ue.key=te,ue.closed=/-closed$/.test(te)});var Ha=[0,2/3,1/3,0],ca=[0,1/3,2/3,0],$a=[0,1/6,2/3,1/6];function Ao(te,ue,we){te.push("C",Vi(Ha,ue),",",Vi(Ha,we),",",Vi(ca,ue),",",Vi(ca,we),",",Vi($a,ue),",",Vi($a,we))}function co(te,ue){return(ue[1]-te[1])/(ue[0]-te[0])}function Ki(te){for(var ue,we,Oe,De=-1,Ue=te.length;++De<Ue;)we=(ue=te[De])[0],Oe=ue[1]-Rt,ue[0]=we*Math.cos(Oe),ue[1]=we*Math.sin(Oe);return te}function Ba(te){var ue=Cn,we=Cn,Oe=0,De=Un,Ue=Ho,Ze=ri,Je=Ze.key,it=Ze,ut="L",St=.7;function Dt(Ft){var Yt,ln,Xt,en=[],Jt=[],bn=[],gn=-1,Qt=Ft.length,Pn=Fn(ue),Dn=Fn(Oe),Xn=ue===we?function(){return ln}:Fn(we),Jn=Oe===De?function(){return Xt}:Fn(De);function gr(){en.push("M",Ze(te(bn),St),ut,it(te(Jt.reverse()),St),"Z")}for(;++gn<Qt;)Ue.call(this,Yt=Ft[gn],gn)?(Jt.push([ln=+Pn.call(this,Yt,gn),Xt=+Dn.call(this,Yt,gn)]),bn.push([+Xn.call(this,Yt,gn),+Jn.call(this,Yt,gn)])):Jt.length&&(gr(),Jt=[],bn=[]);return Jt.length&&gr(),en.length?en.join(""):null}return Dt.x=function(Ft){return arguments.length?(ue=we=Ft,Dt):we},Dt.x0=function(Ft){return arguments.length?(ue=Ft,Dt):ue},Dt.x1=function(Ft){return arguments.length?(we=Ft,Dt):we},Dt.y=function(Ft){return arguments.length?(Oe=De=Ft,Dt):De},Dt.y0=function(Ft){return arguments.length?(Oe=Ft,Dt):Oe},Dt.y1=function(Ft){return arguments.length?(De=Ft,Dt):De},Dt.defined=function(Ft){return arguments.length?(Ue=Ft,Dt):Ue},Dt.interpolate=function(Ft){return arguments.length?(Je="function"==typeof Ft?Ze=Ft:(Ze=Da.get(Ft)||ri).key,it=Ze.reverse||Ze,ut=Ze.closed?"M":"L",Dt):Je},Dt.tension=function(Ft){return arguments.length?(St=Ft,Dt):St},Dt}function Mr(te){return te.source}function Or(te){return te.target}function rs(te){return te.radius}function fo(te){return[te.x,te.y]}function $i(){return 64}function Rs(){return"circle"}function fa(te){var ue=Math.sqrt(te/Ct);return"M0,"+ue+"A"+ue+","+ue+" 0 1,1 0,"+-ue+"A"+ue+","+ue+" 0 1,1 0,"+ue+"Z"}l.svg.line.radial=function(){var te=Ji(Ki);return te.radius=te.x,delete te.x,te.angle=te.y,delete te.y,te},Aa.reverse=Fa,Fa.reverse=Aa,l.svg.area=function(){return Ba(U)},l.svg.area.radial=function(){var te=Ba(Ki);return te.radius=te.x,delete te.x,te.innerRadius=te.x0,delete te.x0,te.outerRadius=te.x1,delete te.x1,te.angle=te.y,delete te.y,te.startAngle=te.y0,delete te.y0,te.endAngle=te.y1,delete te.y1,te},l.svg.chord=function(){var te=Mr,ue=Or,we=rs,Oe=uo,De=xa;function Ue(ut,St){var Dt,Ft,Yt=Ze(this,te,ut,St),ln=Ze(this,ue,ut,St);return"M"+Yt.p0+Je(Yt.r,Yt.p1,Yt.a1-Yt.a0)+((Dt=Yt).a0==(Ft=ln).a0&&Dt.a1==Ft.a1?it(0,0,0,Yt.p0):it(0,0,0,ln.p0)+Je(ln.r,ln.p1,ln.a1-ln.a0)+it(0,0,0,Yt.p0))+"Z"}function Ze(ut,St,Dt,Ft){var Yt=St.call(ut,Dt,Ft),ln=we.call(ut,Yt,Ft),Xt=Oe.call(ut,Yt,Ft)-Rt,en=De.call(ut,Yt,Ft)-Rt;return{r:ln,a0:Xt,a1:en,p0:[ln*Math.cos(Xt),ln*Math.sin(Xt)],p1:[ln*Math.cos(en),ln*Math.sin(en)]}}function Je(ut,St,Dt){return"A"+ut+","+ut+" 0 "+ +(Dt>Ct)+",1 "+St}function it(ut,St,Dt,Ft){return"Q 0,0 "+Ft}return Ue.radius=function(ut){return arguments.length?(we=Fn(ut),Ue):we},Ue.source=function(ut){return arguments.length?(te=Fn(ut),Ue):te},Ue.target=function(ut){return arguments.length?(ue=Fn(ut),Ue):ue},Ue.startAngle=function(ut){return arguments.length?(Oe=Fn(ut),Ue):Oe},Ue.endAngle=function(ut){return arguments.length?(De=Fn(ut),Ue):De},Ue},l.svg.diagonal=function(){var te=Mr,ue=Or,we=fo;function Oe(De,Ue){var Ze=te.call(this,De,Ue),Je=ue.call(this,De,Ue),it=(Ze.y+Je.y)/2,ut=[Ze,{x:Ze.x,y:it},{x:Je.x,y:it},Je];return"M"+(ut=ut.map(we))[0]+"C"+ut[1]+" "+ut[2]+" "+ut[3]}return Oe.source=function(De){return arguments.length?(te=Fn(De),Oe):te},Oe.target=function(De){return arguments.length?(ue=Fn(De),Oe):ue},Oe.projection=function(De){return arguments.length?(we=De,Oe):we},Oe},l.svg.diagonal.radial=function(){var te=l.svg.diagonal(),ue=fo,we=te.projection;return te.projection=function(Oe){return arguments.length?we(function qa(te){return function(){var ue=te.apply(this,arguments),we=ue[0],Oe=ue[1]-Rt;return[we*Math.cos(Oe),we*Math.sin(Oe)]}}(ue=Oe)):ue},te},l.svg.symbol=function(){var te=Rs,ue=$i;function we(Oe,De){return(is.get(te.call(this,Oe,De))||fa)(ue.call(this,Oe,De))}return we.type=function(Oe){return arguments.length?(te=Fn(Oe),we):te},we.size=function(Oe){return arguments.length?(ue=Fn(Oe),we):ue},we};var is=l.map({circle:fa,cross:function(te){var ue=Math.sqrt(te/5)/2;return"M"+-3*ue+","+-ue+"H"+-ue+"V"+-3*ue+"H"+ue+"V"+-ue+"H"+3*ue+"V"+ue+"H"+ue+"V"+3*ue+"H"+-ue+"V"+ue+"H"+-3*ue+"Z"},diamond:function(te){var ue=Math.sqrt(te/(2*oi)),we=ue*oi;return"M0,"+-ue+"L"+we+",0 0,"+ue+" "+-we+",0Z"},square:function(te){var ue=Math.sqrt(te)/2;return"M"+-ue+","+-ue+"L"+ue+","+-ue+" "+ue+","+ue+" "+-ue+","+ue+"Z"},"triangle-down":function(te){var ue=Math.sqrt(te/ho),we=ue*ho/2;return"M0,"+we+"L"+ue+","+-we+" "+-ue+","+-we+"Z"},"triangle-up":function(te){var ue=Math.sqrt(te/ho),we=ue*ho/2;return"M0,"+-we+"L"+ue+","+we+" "+-ue+","+we+"Z"}});l.svg.symbolTypes=is.keys();var ho=Math.sqrt(3),oi=Math.tan(30*Ge);oe.transition=function(te){for(var ue,we,Oe=$e||++bt,De=Y(te),Ue=[],Ze=at||{time:Date.now(),ease:no,delay:0,duration:250},Je=-1,it=this.length;++Je<it;){Ue.push(ue=[]);for(var ut=this[Je],St=-1,Dt=ut.length;++St<Dt;)(we=ut[St])&&q(we,St,De,Oe,Ze),ue.push(we)}return Xe(Ue,De,Oe)},oe.interrupt=function(te){return this.each(null==te?fi:zs(Y(te)))};var fi=zs(Y());function zs(te){return function(){var ue,we,Oe;(ue=this[te])&&(Oe=ue[we=ue.active])&&(Oe.timer.c=null,Oe.timer.t=NaN,--ue.count?delete ue[we]:delete this[te],ue.active+=.5,Oe.event&&Oe.event.interrupt.call(this,this.__data__,Oe.index))}}function Xe(te,ue,we){return X(te,ft),te.namespace=ue,te.id=we,te}var $e,at,ft=[],bt=0;function yt(te,ue,we,Oe){var De=te.id,Ue=te.namespace;return Re(te,"function"==typeof we?function(Ze,Je,it){Ze[Ue][De].tween.set(ue,Oe(we.call(Ze,Ze.__data__,Je,it)))}:(we=Oe(we),function(Ze){Ze[Ue][De].tween.set(ue,we)}))}function D(te){return null==te&&(te=""),function(){this.textContent=te}}function Y(te){return null==te?"__transition__":"__transition_"+te+"__"}function q(te,ue,we,Oe,De){var Ue,Ze,Je,it,ut,St=te[we]||(te[we]={active:0,count:0}),Dt=St[Oe];function Ft(ln){var Xt=St.active,en=St[Xt];for(var Jt in en&&(en.timer.c=null,en.timer.t=NaN,--St.count,delete St[Xt],en.event&&en.event.interrupt.call(te,te.__data__,en.index)),St)if(+Jt<Oe){var bn=St[Jt];bn.timer.c=null,bn.timer.t=NaN,--St.count,delete St[Jt]}Ze.c=Yt,Zt(function(){return Ze.c&&Yt(ln||1)&&(Ze.c=null,Ze.t=NaN),1},0,Ue),St.active=Oe,Dt.event&&Dt.event.start.call(te,te.__data__,ue),ut=[],Dt.tween.forEach(function(gn,Qt){(Qt=Qt.call(te,te.__data__,ue))&&ut.push(Qt)}),it=Dt.ease,Je=Dt.duration}function Yt(ln){for(var Xt=ln/Je,en=it(Xt),Jt=ut.length;Jt>0;)ut[--Jt].call(te,en);if(Xt>=1)return Dt.event&&Dt.event.end.call(te,te.__data__,ue),--St.count?delete St[Oe]:delete te[we],1}Dt||(Ze=Zt(function(ln){var Xt=Dt.delay;if(Ze.t=Xt+Ue,Xt<=ln)return Ft(ln-Xt);Ze.c=Ft},0,Ue=De.time),Dt=St[Oe]={tween:new w,time:Ue,timer:Ze,delay:De.delay,duration:De.duration,ease:De.ease,index:ue},De=null,++St.count)}ft.call=oe.call,ft.empty=oe.empty,ft.node=oe.node,ft.size=oe.size,l.transition=function(te,ue){return te&&te.transition?$e?te.transition(ue):te:l.selection().transition(te)},l.transition.prototype=ft,ft.select=function(te){var ue,we,Oe,De=this.id,Ue=this.namespace,Ze=[];te=ce(te);for(var Je=-1,it=this.length;++Je<it;){Ze.push(ue=[]);for(var ut=this[Je],St=-1,Dt=ut.length;++St<Dt;)(Oe=ut[St])&&(we=te.call(Oe,Oe.__data__,St,Je))?("__data__"in Oe&&(we.__data__=Oe.__data__),q(we,St,Ue,De,Oe[Ue][De]),ue.push(we)):ue.push(null)}return Xe(Ze,Ue,De)},ft.selectAll=function(te){var ue,we,Oe,De,Ue,Ze=this.id,Je=this.namespace,it=[];te=me(te);for(var ut=-1,St=this.length;++ut<St;)for(var Dt=this[ut],Ft=-1,Yt=Dt.length;++Ft<Yt;)if(Oe=Dt[Ft]){Ue=Oe[Je][Ze],we=te.call(Oe,Oe.__data__,Ft,ut),it.push(ue=[]);for(var ln=-1,Xt=we.length;++ln<Xt;)(De=we[ln])&&q(De,ln,Je,Ze,Ue),ue.push(De)}return Xe(it,Je,Ze)},ft.filter=function(te){var ue,we,Oe=[];"function"!=typeof te&&(te=Ie(te));for(var De=0,Ue=this.length;De<Ue;De++){Oe.push(ue=[]);for(var Ze,Je=0,it=(Ze=this[De]).length;Je<it;Je++)(we=Ze[Je])&&te.call(we,we.__data__,Je,De)&&ue.push(we)}return Xe(Oe,this.namespace,this.id)},ft.tween=function(te,ue){var we=this.id,Oe=this.namespace;return arguments.length<2?this.node()[Oe][we].tween.get(te):Re(this,null==ue?function(De){De[Oe][we].tween.remove(te)}:function(De){De[Oe][we].tween.set(te,ue)})},ft.attr=function(te,ue){if(arguments.length<2){for(ue in te)this.attr(ue,te[ue]);return this}var we="transform"==te?Gs:ma,Oe=l.ns.qualify(te);function De(){this.removeAttribute(Oe)}function Ue(){this.removeAttributeNS(Oe.space,Oe.local)}return yt(this,"attr."+te,ue,Oe.local?function Je(it){return null==it?Ue:(it+="",function(){var ut,St=this.getAttributeNS(Oe.space,Oe.local);return St!==it&&(ut=we(St,it),function(Dt){this.setAttributeNS(Oe.space,Oe.local,ut(Dt))})})}:function Ze(it){return null==it?De:(it+="",function(){var ut,St=this.getAttribute(Oe);return St!==it&&(ut=we(St,it),function(Dt){this.setAttribute(Oe,ut(Dt))})})})},ft.attrTween=function(te,ue){var we=l.ns.qualify(te);return this.tween("attr."+te,we.local?function(Oe,De){var Ue=ue.call(this,Oe,De,this.getAttributeNS(we.space,we.local));return Ue&&function(Ze){this.setAttributeNS(we.space,we.local,Ue(Ze))}}:function(Oe,De){var Ue=ue.call(this,Oe,De,this.getAttribute(we));return Ue&&function(Ze){this.setAttribute(we,Ue(Ze))}})},ft.style=function(te,ue,we){var Oe=arguments.length;if(Oe<3){if("string"!=typeof te){for(we in Oe<2&&(ue=""),te)this.style(we,te[we],ue);return this}we=""}function De(){this.style.removeProperty(te)}return yt(this,"style."+te,ue,function Ue(Ze){return null==Ze?De:(Ze+="",function(){var Je,it=t(this).getComputedStyle(this,null).getPropertyValue(te);return it!==Ze&&(Je=ma(it,Ze),function(ut){this.style.setProperty(te,Je(ut),we)})})})},ft.styleTween=function(te,ue,we){return arguments.length<3&&(we=""),this.tween("style."+te,function Oe(De,Ue){var Ze=ue.call(this,De,Ue,t(this).getComputedStyle(this,null).getPropertyValue(te));return Ze&&function(Je){this.style.setProperty(te,Ze(Je),we)}})},ft.text=function(te){return yt(this,"text",te,D)},ft.remove=function(){var te=this.namespace;return this.each("end.transition",function(){var ue;this[te].count<2&&(ue=this.parentNode)&&ue.removeChild(this)})},ft.ease=function(te){var ue=this.id,we=this.namespace;return arguments.length<1?this.node()[we][ue].ease:("function"!=typeof te&&(te=l.ease.apply(l,arguments)),Re(this,function(Oe){Oe[we][ue].ease=te}))},ft.delay=function(te){var ue=this.id,we=this.namespace;return arguments.length<1?this.node()[we][ue].delay:Re(this,"function"==typeof te?function(Oe,De,Ue){Oe[we][ue].delay=+te.call(Oe,Oe.__data__,De,Ue)}:(te=+te,function(Oe){Oe[we][ue].delay=te}))},ft.duration=function(te){var ue=this.id,we=this.namespace;return arguments.length<1?this.node()[we][ue].duration:Re(this,"function"==typeof te?function(Oe,De,Ue){Oe[we][ue].duration=Math.max(1,te.call(Oe,Oe.__data__,De,Ue))}:(te=Math.max(1,te),function(Oe){Oe[we][ue].duration=te}))},ft.each=function(te,ue){var we=this.id,Oe=this.namespace;if(arguments.length<2){var De=at,Ue=$e;try{$e=we,Re(this,function(Ze,Je,it){at=Ze[Oe][we],te.call(Ze,Ze.__data__,Je,it)})}finally{at=De,$e=Ue}}else Re(this,function(Ze){var Je=Ze[Oe][we];(Je.event||(Je.event=l.dispatch("start","end","interrupt"))).on(te,ue)});return this},ft.transition=function(){for(var te,ue,we,Oe=this.id,De=++bt,Ue=this.namespace,Ze=[],Je=0,it=this.length;Je<it;Je++){Ze.push(te=[]);for(var ut,St=0,Dt=(ut=this[Je]).length;St<Dt;St++)(ue=ut[St])&&q(ue,St,Ue,De,{time:(we=ue[Ue][Oe]).time,ease:we.ease,delay:we.delay+we.duration,duration:we.duration}),te.push(ue)}return Xe(Ze,Ue,De)},l.svg.axis=function(){var te,ue=l.scale.linear(),we=ne,Oe=6,De=6,Ue=3,Ze=[10],Je=null;function it(ut){ut.each(function(){var St,Dt=l.select(this),Ft=this.__chart__||ue,Yt=this.__chart__=ue.copy(),ln=Je??(Yt.ticks?Yt.ticks.apply(Yt,Ze):Yt.domain()),Xt=te??(Yt.tickFormat?Yt.tickFormat.apply(Yt,Ze):U),en=Dt.selectAll(".tick").data(ln,Yt),Jt=en.enter().insert("g",".domain").attr("class","tick").style("opacity",Lt),bn=l.transition(en.exit()).style("opacity",Lt).remove(),gn=l.transition(en.order()).style("opacity",1),Qt=Math.max(Oe,0)+Ue,Pn=Ja(Yt),Dn=Dt.selectAll(".domain").data([0]),Xn=(Dn.enter().append("path").attr("class","domain"),l.transition(Dn));Jt.append("line"),Jt.append("text");var Jn,gr,vr,sr,dr=Jt.select("line"),kr=gn.select("line"),Vr=en.select("text").text(Xt),Hr=Jt.select("text"),hr=gn.select("text"),Ar="top"===we||"left"===we?-1:1;if("bottom"===we||"top"===we?(St=Le,Jn="x",vr="y",gr="x2",sr="y2",Vr.attr("dy",Ar<0?"0em":".71em").style("text-anchor","middle"),Xn.attr("d","M"+Pn[0]+","+Ar*De+"V0H"+Pn[1]+"V"+Ar*De)):(St=Ne,Jn="y",vr="x",gr="y2",sr="x2",Vr.attr("dy",".32em").style("text-anchor",Ar<0?"end":"start"),Xn.attr("d","M"+Ar*De+","+Pn[0]+"H0V"+Pn[1]+"H"+Ar*De)),dr.attr(sr,Ar*Oe),Hr.attr(vr,Ar*Qt),kr.attr(gr,0).attr(sr,Ar*Oe),hr.attr(Jn,0).attr(vr,Ar*Qt),Yt.rangeBand){var Dr=Yt,zr=Dr.rangeBand()/2;Ft=Yt=function(Wr){return Dr(Wr)+zr}}else Ft.rangeBand?Ft=Yt:bn.call(St,Yt,Ft);Jt.call(St,Ft,Yt),gn.call(St,Yt,Yt)})}return it.scale=function(ut){return arguments.length?(ue=ut,it):ue},it.orient=function(ut){return arguments.length?(we=ut in pe?ut+"":ne,it):we},it.ticks=function(){return arguments.length?(Ze=b(arguments),it):Ze},it.tickValues=function(ut){return arguments.length?(Je=ut,it):Je},it.tickFormat=function(ut){return arguments.length?(te=ut,it):te},it.tickSize=function(ut){var St=arguments.length;return St?(Oe=+ut,De=+arguments[St-1],it):Oe},it.innerTickSize=function(ut){return arguments.length?(Oe=+ut,it):Oe},it.outerTickSize=function(ut){return arguments.length?(De=+ut,it):De},it.tickPadding=function(ut){return arguments.length?(Ue=+ut,it):Ue},it.tickSubdivide=function(){return arguments.length&&it},it};var ne="bottom",pe={top:1,right:1,bottom:1,left:1};function Le(te,ue,we){te.attr("transform",function(Oe){var De=ue(Oe);return"translate("+(isFinite(De)?De:we(Oe))+",0)"})}function Ne(te,ue,we){te.attr("transform",function(Oe){var De=ue(Oe);return"translate(0,"+(isFinite(De)?De:we(Oe))+")"})}l.svg.brush=function(){var te,ue,we=V(St,"brushstart","brush","brushend"),Oe=null,De=null,Ue=[0,0],Ze=[0,0],Je=!0,it=!0,ut=et[0];function St(Xt){Xt.each(function(){var en=l.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",ln).on("touchstart.brush",ln),Jt=en.selectAll(".background").data([0]);Jt.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),en.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var bn=en.selectAll(".resize").data(ut,U);bn.exit().remove(),bn.enter().append("g").attr("class",function(Dn){return"resize "+Dn}).style("cursor",function(Dn){return qe[Dn]}).append("rect").attr("x",function(Dn){return/[ew]$/.test(Dn)?-3:null}).attr("y",function(Dn){return/^[ns]/.test(Dn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),bn.style("display",St.empty()?"none":null);var gn,Qt=l.transition(en),Pn=l.transition(Jt);Oe&&(gn=Ja(Oe),Pn.attr("x",gn[0]).attr("width",gn[1]-gn[0]),Ft(Qt)),De&&(gn=Ja(De),Pn.attr("y",gn[0]).attr("height",gn[1]-gn[0]),Yt(Qt)),Dt(Qt)})}function Dt(Xt){Xt.selectAll(".resize").attr("transform",function(en){return"translate("+Ue[+/e$/.test(en)]+","+Ze[+/^s/.test(en)]+")"})}function Ft(Xt){Xt.select(".extent").attr("x",Ue[0]),Xt.selectAll(".extent,.n>rect,.s>rect").attr("width",Ue[1]-Ue[0])}function Yt(Xt){Xt.select(".extent").attr("y",Ze[0]),Xt.selectAll(".extent,.e>rect,.w>rect").attr("height",Ze[1]-Ze[0])}function ln(){var Xt,en,Jt=this,bn=l.select(l.event.target),gn=we.of(Jt,arguments),Qt=l.select(Jt),Pn=bn.datum(),Dn=!/^(n|s)$/.test(Pn)&&Oe,Xn=!/^(e|w)$/.test(Pn)&&De,Jn=bn.classed("extent"),gr=dt(Jt),vr=l.mouse(Jt),sr=l.select(t(Jt)).on("keydown.brush",function Vr(){32==l.event.keyCode&&(Jn||(Xt=null,vr[0]-=Ue[1],vr[1]-=Ze[1],Jn=2),J())}).on("keyup.brush",function Hr(){32==l.event.keyCode&&2==Jn&&(vr[0]+=Ue[1],vr[1]+=Ze[1],Jn=0,J())});if(l.event.changedTouches?sr.on("touchmove.brush",hr).on("touchend.brush",Dr):sr.on("mousemove.brush",hr).on("mouseup.brush",Dr),Qt.interrupt().selectAll("*").interrupt(),Jn)vr[0]=Ue[0]-vr[0],vr[1]=Ze[0]-vr[1];else if(Pn){var dr=+/w$/.test(Pn),kr=+/^n/.test(Pn);en=[Ue[1-dr]-vr[0],Ze[1-kr]-vr[1]],vr[0]=Ue[dr],vr[1]=Ze[kr]}else l.event.altKey&&(Xt=vr.slice());function hr(){var zr=l.mouse(Jt),Wr=!1;en&&(zr[0]+=en[0],zr[1]+=en[1]),Jn||(l.event.altKey?(Xt||(Xt=[(Ue[0]+Ue[1])/2,(Ze[0]+Ze[1])/2]),vr[0]=Ue[+(zr[0]<Xt[0])],vr[1]=Ze[+(zr[1]<Xt[1])]):Xt=null),Dn&&Ar(zr,Oe,0)&&(Ft(Qt),Wr=!0),Xn&&Ar(zr,De,1)&&(Yt(Qt),Wr=!0),Wr&&(Dt(Qt),gn({type:"brush",mode:Jn?"move":"resize"}))}function Ar(zr,Wr,Zr){var $r,ui,yi=Ja(Wr),hi=yi[0],si=yi[1],ci=vr[Zr],pi=Zr?Ze:Ue,Si=pi[1]-pi[0];if(Jn&&(hi-=ci,si-=Si+ci),$r=(Zr?it:Je)?Math.max(hi,Math.min(si,zr[Zr])):zr[Zr],Jn?ui=($r+=ci)+Si:(Xt&&(ci=Math.max(hi,Math.min(si,2*Xt[Zr]-$r))),ci<$r?(ui=$r,$r=ci):ui=ci),pi[0]!=$r||pi[1]!=ui)return Zr?ue=null:te=null,pi[0]=$r,pi[1]=ui,!0}function Dr(){hr(),Qt.style("pointer-events","all").selectAll(".resize").style("display",St.empty()?"none":null),l.select("body").style("cursor",null),sr.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),gr(),gn({type:"brushend"})}Qt.style("pointer-events","none").selectAll(".resize").style("display",null),l.select("body").style("cursor",bn.style("cursor")),gn({type:"brushstart"}),hr()}return St.event=function(Xt){Xt.each(function(){var en=we.of(this,arguments),Jt={x:Ue,y:Ze,i:te,j:ue},bn=this.__chart__||Jt;this.__chart__=Jt,$e?l.select(this).transition().each("start.brush",function(){te=bn.i,ue=bn.j,Ue=bn.x,Ze=bn.y,en({type:"brushstart"})}).tween("brush:brush",function(){var gn=ka(Ue,Jt.x),Qt=ka(Ze,Jt.y);return te=ue=null,function(Pn){Ue=Jt.x=gn(Pn),Ze=Jt.y=Qt(Pn),en({type:"brush",mode:"resize"})}}).each("end.brush",function(){te=Jt.i,ue=Jt.j,en({type:"brush",mode:"resize"}),en({type:"brushend"})}):(en({type:"brushstart"}),en({type:"brush",mode:"resize"}),en({type:"brushend"}))})},St.x=function(Xt){return arguments.length?(ut=et[!(Oe=Xt)<<1|!De],St):Oe},St.y=function(Xt){return arguments.length?(ut=et[!Oe<<1|!(De=Xt)],St):De},St.clamp=function(Xt){return arguments.length?(Oe&&De?(Je=!!Xt[0],it=!!Xt[1]):Oe?Je=!!Xt:De&&(it=!!Xt),St):Oe&&De?[Je,it]:Oe?Je:De?it:null},St.extent=function(Xt){var en,Jt,bn,gn,Qt;return arguments.length?(Oe&&(en=Xt[0],Jt=Xt[1],De&&(en=en[0],Jt=Jt[0]),te=[en,Jt],Oe.invert&&(en=Oe(en),Jt=Oe(Jt)),Jt<en&&(Qt=en,en=Jt,Jt=Qt),en==Ue[0]&&Jt==Ue[1]||(Ue=[en,Jt])),De&&(bn=Xt[0],gn=Xt[1],Oe&&(bn=bn[1],gn=gn[1]),ue=[bn,gn],De.invert&&(bn=De(bn),gn=De(gn)),gn<bn&&(Qt=bn,bn=gn,gn=Qt),bn==Ze[0]&&gn==Ze[1]||(Ze=[bn,gn])),St):(Oe&&(te?(en=te[0],Jt=te[1]):(en=Ue[0],Jt=Ue[1],Oe.invert&&(en=Oe.invert(en),Jt=Oe.invert(Jt)),Jt<en&&(Qt=en,en=Jt,Jt=Qt))),De&&(ue?(bn=ue[0],gn=ue[1]):(bn=Ze[0],gn=Ze[1],De.invert&&(bn=De.invert(bn),gn=De.invert(gn)),gn<bn&&(Qt=bn,bn=gn,gn=Qt))),Oe&&De?[[en,bn],[Jt,gn]]:Oe?[en,Jt]:De&&[bn,gn])},St.clear=function(){return St.empty()||(Ue=[0,0],Ze=[0,0],te=ue=null),St},St.empty=function(){return!!Oe&&Ue[0]==Ue[1]||!!De&&Ze[0]==Ze[1]},l.rebind(St,we,"on")};var qe={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},et=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]];function vt(te){return JSON.parse(te.responseText)}function xt(te){var ue=d.createRange();return ue.selectNode(d.body),ue.createContextualFragment(te.responseText)}l.text=rr(function(te){return te.responseText}),l.json=function(te,ue){return $n(te,"application/json",vt,ue)},l.html=function(te,ue){return $n(te,"text/html",xt,ue)},l.xml=rr(function(te){return te.responseXML}),this.d3=l,void 0===(A="function"==typeof(k=l)?k.call(R,e,R,$):k)||($.exports=A)}).apply(self)},88294:function($,R,e){"use strict";$.exports=e(62849)},62849:function($,R,e){"use strict";var k=e(91358),A=e(53435),l=e(18863),T=e(21527),b=e(71299),d=e(46775),s=e(30120),t=e(64941),o=e(90660),r=e(27084);function n(i,a){for(var c=a[0],p=a[1],f=1/(a[2]-c),x=1/(a[3]-p),v=new Array(i.length),g=0,y=i.length/2;g<y;g++)v[2*g]=A((i[2*g]-c)*f,0,1),v[2*g+1]=A((i[2*g+1]-p)*x,0,1);return v}$.exports=function(i,a){a||(a={}),i=s(i,"float64"),a=b(a,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var c=d(a.maxDepth,255),p=d(a.bounds,T(i,2));p[0]===p[2]&&p[2]++,p[1]===p[3]&&p[3]++;var f,x=n(i,p),v=i.length>>>1;a.dtype||(a.dtype="array"),"string"==typeof a.dtype?f=new(o(a.dtype))(v):a.dtype&&(f=a.dtype,Array.isArray(f)&&(f.length=v));for(var g=0;g<v;++g)f[g]=g;var y=[],h=[],m=[],w=[];!function U(z,H,F,N,B,j){if(!N.length)return null;var J=y[B]||(y[B]=[]),G=m[B]||(m[B]=[]),V=h[B]||(h[B]=[]),W=J.length;if(++B>c||j>1073741824){for(var X=0;X<N.length;X++)J.push(N[X]),G.push(j),V.push(null,null,null,null);return W}if(J.push(N[0]),G.push(j),N.length<=1)return V.push(null,null,null,null),W;for(var K=.5*F,re=z+K,ee=H+K,ie=[],oe=[],ce=[],me=[],de=1,he=N.length;de<he;de++){var ve=N[de],xe=x[2*ve+1];x[2*ve]<re?xe<ee?ie.push(ve):oe.push(ve):xe<ee?ce.push(ve):me.push(ve)}return V.push(U(z,H,K,ie,B,j<<=2),U(z,ee,K,oe,B,j+1),U(re,H,K,ce,B,j+2),U(re,ee,K,me,B,j+3)),W}(0,0,1,f,0,1);for(var u=0,S=0;S<y.length;S++){var _=y[S];if(f.set)f.set(_,u);else for(var E=0,L=_.length;E<L;E++)f[E+u]=_[E];var C=u+y[S].length;w[S]=[u,C],u=C}return f.range=function(){for(var U,z=[],H=arguments.length;H--;)z[H]=arguments[H];if(t(z[z.length-1])){var F=z.pop();z.length||null==F.x&&null==F.l&&null==F.left||(z=[F],U={}),U=b(F,{level:"level maxLevel",d:"d diam diameter r radius px pxSize pixel pixelSize maxD size minSize",lod:"lod details ranges offsets"})}else U={};z.length||(z=p);var N,B=l.apply(void 0,z),j=[Math.min(B.x,B.x+B.width),Math.min(B.y,B.y+B.height),Math.max(B.x,B.x+B.width),Math.max(B.y,B.y+B.height)],J=j[0],G=j[1],V=j[2],W=j[3],X=n([J,G,V,W],p),K=X[0],re=X[1],ee=X[2],ie=X[3],oe=d(U.level,y.length);if(null!=U.d&&("number"==typeof U.d?N=[U.d,U.d]:U.d.length&&(N=U.d),oe=Math.min(Math.max(Math.ceil(-r(Math.abs(N[0])/(p[2]-p[0]))),Math.ceil(-r(Math.abs(N[1])/(p[3]-p[1])))),oe)),oe=Math.min(oe,y.length),U.lod)return function P(U,z,H,F,N){for(var B=[],j=0;j<N;j++){var J=m[j],G=w[j][0],V=I(U,z,j),W=I(H,F,j),X=k.ge(J,V),K=k.gt(J,W,X,J.length-1);B[j]=[X+G,K+G]}return B}(K,re,ee,ie,oe);var ce=[];return function me(he,ve,Pe,xe,ke,Ae){if(null!==ke&&null!==Ae&&!(K>he+Pe||re>ve+Pe||ee<he||ie<ve||xe>=oe||ke===Ae)){var Te=y[xe];void 0===Ae&&(Ae=Te.length);for(var Q=ke;Q<Ae;Q++){var se=Te[Q],fe=i[2*se],ye=i[2*se+1];fe>=J&&fe<=V&&ye>=G&&ye<=W&&ce.push(se)}var Me=h[xe],Ie=Me[4*ke+0],Ce=Me[4*ke+1],Re=Me[4*ke+2],le=Me[4*ke+3],ge=function de(he,ve){for(var Pe=null,xe=0;null===Pe;)if(Pe=he[4*ve+xe],++xe>he.length)return null;return Pe}(Me,ke+1),_e=.5*Pe,Fe=xe+1;me(he,ve,_e,Fe,Ie,Ce||Re||le||ge),me(he,ve+_e,_e,Fe,Ce,Re||le||ge),me(he+_e,ve,_e,Fe,Re,le||ge),me(he+_e,ve+_e,_e,Fe,le,ge)}}(0,0,1,0,0,1),ce},f;function I(U,z,H){for(var F=1,N=.5,B=.5,j=.5,J=0;J<H;J++)F<<=2,F+=U<N?z<B?0:1:z<B?2:3,j*=.5,N+=U<N?-j:j,B+=z<B?-j:j;return F}}},30774:function($,R,e){"use strict";Object.defineProperty(R,"__esModule",{value:!0});var k=e(60302),A=6378137;function l(d){var s=0;if(d&&d.length>0){s+=Math.abs(T(d[0]));for(var t=1;t<d.length;t++)s-=Math.abs(T(d[t]))}return s}function T(d){var s,t,o,r,n,i,a=0,c=d.length;if(c>2){for(i=0;i<c;i++)i===c-2?(o=c-2,r=c-1,n=0):i===c-1?(o=c-1,r=0,n=1):(o=i,r=i+1,n=i+2),s=d[o],t=d[r],a+=(b(d[n][0])-b(s[0]))*Math.sin(b(t[1]));a=a*A*A/2}return a}function b(d){return d*Math.PI/180}R.default=function(d){return k.geomReduce(d,function(s,t){return s+function(o){var r,n=0;switch(o.type){case"Polygon":return l(o.coordinates);case"MultiPolygon":for(r=0;r<o.coordinates.length;r++)n+=l(o.coordinates[r]);return n;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0}return 0}(t)},0)}},23132:function($,R){"use strict";function e(i,a,c){void 0===c&&(c={});var p={type:"Feature"};return(0===c.id||c.id)&&(p.id=c.id),c.bbox&&(p.bbox=c.bbox),p.properties=a||{},p.geometry=i,p}function k(i,a,c){if(void 0===c&&(c={}),!i)throw new Error("coordinates is required");if(!Array.isArray(i))throw new Error("coordinates must be an Array");if(i.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!n(i[0])||!n(i[1]))throw new Error("coordinates must contain numbers");return e({type:"Point",coordinates:i},a,c)}function A(i,a,c){void 0===c&&(c={});for(var p=0,f=i;p<f.length;p++){var x=f[p];if(x.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var v=0;v<x[x.length-1].length;v++)if(x[x.length-1][v]!==x[0][v])throw new Error("First and last Position are not equivalent.")}return e({type:"Polygon",coordinates:i},a,c)}function l(i,a,c){if(void 0===c&&(c={}),i.length<2)throw new Error("coordinates must be an array of two or more positions");return e({type:"LineString",coordinates:i},a,c)}function T(i,a){void 0===a&&(a={});var c={type:"FeatureCollection"};return a.id&&(c.id=a.id),a.bbox&&(c.bbox=a.bbox),c.features=i,c}function b(i,a,c){return void 0===c&&(c={}),e({type:"MultiLineString",coordinates:i},a,c)}function d(i,a,c){return void 0===c&&(c={}),e({type:"MultiPoint",coordinates:i},a,c)}function s(i,a,c){return void 0===c&&(c={}),e({type:"MultiPolygon",coordinates:i},a,c)}function t(i,a){void 0===a&&(a="kilometers");var c=R.factors[a];if(!c)throw new Error(a+" units is invalid");return i*c}function o(i,a){void 0===a&&(a="kilometers");var c=R.factors[a];if(!c)throw new Error(a+" units is invalid");return i/c}function r(i){return i%(2*Math.PI)*180/Math.PI}function n(i){return!isNaN(i)&&null!==i&&!Array.isArray(i)}Object.defineProperty(R,"__esModule",{value:!0}),R.earthRadius=6371008.8,R.factors={centimeters:100*R.earthRadius,centimetres:100*R.earthRadius,degrees:R.earthRadius/111325,feet:3.28084*R.earthRadius,inches:39.37*R.earthRadius,kilometers:R.earthRadius/1e3,kilometres:R.earthRadius/1e3,meters:R.earthRadius,metres:R.earthRadius,miles:R.earthRadius/1609.344,millimeters:1e3*R.earthRadius,millimetres:1e3*R.earthRadius,nauticalmiles:R.earthRadius/1852,radians:1,yards:1.0936*R.earthRadius},R.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/R.earthRadius,yards:1.0936133},R.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},R.feature=e,R.geometry=function(i,a,c){switch(void 0===c&&(c={}),i){case"Point":return k(a).geometry;case"LineString":return l(a).geometry;case"Polygon":return A(a).geometry;case"MultiPoint":return d(a).geometry;case"MultiLineString":return b(a).geometry;case"MultiPolygon":return s(a).geometry;default:throw new Error(i+" is invalid")}},R.point=k,R.points=function(i,a,c){return void 0===c&&(c={}),T(i.map(function(p){return k(p,a)}),c)},R.polygon=A,R.polygons=function(i,a,c){return void 0===c&&(c={}),T(i.map(function(p){return A(p,a)}),c)},R.lineString=l,R.lineStrings=function(i,a,c){return void 0===c&&(c={}),T(i.map(function(p){return l(p,a)}),c)},R.featureCollection=T,R.multiLineString=b,R.multiPoint=d,R.multiPolygon=s,R.geometryCollection=function(i,a,c){return void 0===c&&(c={}),e({type:"GeometryCollection",geometries:i},a,c)},R.round=function(i,a){if(void 0===a&&(a=0),a&&!(a>=0))throw new Error("precision must be a positive number");var c=Math.pow(10,a||0);return Math.round(i*c)/c},R.radiansToLength=t,R.lengthToRadians=o,R.lengthToDegrees=function(i,a){return r(o(i,a))},R.bearingToAzimuth=function(i){var a=i%360;return a<0&&(a+=360),a},R.radiansToDegrees=r,R.degreesToRadians=function(i){return i%360*Math.PI/180},R.convertLength=function(i,a,c){if(void 0===a&&(a="kilometers"),void 0===c&&(c="kilometers"),!(i>=0))throw new Error("length must be a positive number");return t(o(i,a),c)},R.convertArea=function(i,a,c){if(void 0===a&&(a="meters"),void 0===c&&(c="kilometers"),!(i>=0))throw new Error("area must be a positive number");var p=R.areaFactors[a];if(!p)throw new Error("invalid original units");var f=R.areaFactors[c];if(!f)throw new Error("invalid final units");return i/p*f},R.isNumber=n,R.isObject=function(i){return!!i&&i.constructor===Object},R.validateBBox=function(i){if(!i)throw new Error("bbox is required");if(!Array.isArray(i))throw new Error("bbox must be an Array");if(4!==i.length&&6!==i.length)throw new Error("bbox must be an Array of 4 or 6 numbers");i.forEach(function(a){if(!n(a))throw new Error("bbox must only contain numbers")})},R.validateId=function(i){if(!i)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof i))throw new Error("id must be a number or a string")}},60302:function($,R,e){"use strict";Object.defineProperty(R,"__esModule",{value:!0});var k=e(23132);function A(o,r,n){if(null!==o)for(var i,a,c,p,f,x,v,g,y=0,h=0,m=o.type,w="FeatureCollection"===m,u="Feature"===m,S=w?o.features.length:1,_=0;_<S;_++){f=(g=!!(v=w?o.features[_].geometry:u?o.geometry:o)&&"GeometryCollection"===v.type)?v.geometries.length:1;for(var E=0;E<f;E++){var L=0,C=0;if(null!==(p=g?v.geometries[E]:v)){x=p.coordinates;var P=p.type;switch(y=!n||"Polygon"!==P&&"MultiPolygon"!==P?0:1,P){case null:break;case"Point":if(!1===r(x,h,_,L,C))return!1;h++,L++;break;case"LineString":case"MultiPoint":for(i=0;i<x.length;i++){if(!1===r(x[i],h,_,L,C))return!1;h++,"MultiPoint"===P&&L++}"LineString"===P&&L++;break;case"Polygon":case"MultiLineString":for(i=0;i<x.length;i++){for(a=0;a<x[i].length-y;a++){if(!1===r(x[i][a],h,_,L,C))return!1;h++}"MultiLineString"===P&&L++,"Polygon"===P&&C++}"Polygon"===P&&L++;break;case"MultiPolygon":for(i=0;i<x.length;i++){for(C=0,a=0;a<x[i].length;a++){for(c=0;c<x[i][a].length-y;c++){if(!1===r(x[i][a][c],h,_,L,C))return!1;h++}C++}L++}break;case"GeometryCollection":for(i=0;i<p.geometries.length;i++)if(!1===A(p.geometries[i],r,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function l(o,r){var n;switch(o.type){case"FeatureCollection":for(n=0;n<o.features.length&&!1!==r(o.features[n].properties,n);n++);break;case"Feature":r(o.properties,0)}}function T(o,r){if("Feature"===o.type)r(o,0);else if("FeatureCollection"===o.type)for(var n=0;n<o.features.length&&!1!==r(o.features[n],n);n++);}function b(o,r){var n,i,a,c,p,f,x,v,g,y,h=0,m="FeatureCollection"===o.type,w="Feature"===o.type,u=m?o.features.length:1;for(n=0;n<u;n++){for(v=m?o.features[n].properties:w?o.properties:{},g=m?o.features[n].bbox:w?o.bbox:void 0,y=m?o.features[n].id:w?o.id:void 0,p=(x=!!(f=m?o.features[n].geometry:w?o.geometry:o)&&"GeometryCollection"===f.type)?f.geometries.length:1,a=0;a<p;a++)if(null!==(c=x?f.geometries[a]:f))switch(c.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===r(c,h,v,g,y))return!1;break;case"GeometryCollection":for(i=0;i<c.geometries.length;i++)if(!1===r(c.geometries[i],h,v,g,y))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===r(null,h,v,g,y))return!1;h++}}function d(o,r){b(o,function(n,i,a,c,p){var f,x=null===n?null:n.type;switch(x){case null:case"Point":case"LineString":case"Polygon":return!1!==r(k.feature(n,a,{bbox:c,id:p}),i,0)&&void 0}switch(x){case"MultiPoint":f="Point";break;case"MultiLineString":f="LineString";break;case"MultiPolygon":f="Polygon"}for(var v=0;v<n.coordinates.length;v++)if(!1===r(k.feature({type:f,coordinates:n.coordinates[v]},a),i,v))return!1})}function s(o,r){d(o,function(n,i,a){var c=0;if(n.geometry){var p=n.geometry.type;if("Point"!==p&&"MultiPoint"!==p){var f,x=0,v=0,g=0;return!1!==A(n,function(y,h,m,w,u){if(void 0===f||i>x||w>v||u>g)return f=y,x=i,v=w,g=u,void(c=0);var S=k.lineString([f,y],n.properties);if(!1===r(S,i,a,u,c))return!1;c++,f=y})&&void 0}}})}function t(o,r){if(!o)throw new Error("geojson is required");d(o,function(n,i,a){if(null!==n.geometry){var p=n.geometry.coordinates;switch(n.geometry.type){case"LineString":if(!1===r(n,i,a,0,0))return!1;break;case"Polygon":for(var f=0;f<p.length;f++)if(!1===r(k.lineString(p[f],n.properties),i,a,f))return!1}}})}R.coordEach=A,R.coordReduce=function(o,r,n,i){var a=n;return A(o,function(c,p,f,x,v){a=0===p&&void 0===n?c:r(a,c,p,f,x,v)},i),a},R.propEach=l,R.propReduce=function(o,r,n){var i=n;return l(o,function(a,c){i=0===c&&void 0===n?a:r(i,a,c)}),i},R.featureEach=T,R.featureReduce=function(o,r,n){var i=n;return T(o,function(a,c){i=0===c&&void 0===n?a:r(i,a,c)}),i},R.coordAll=function(o){var r=[];return A(o,function(n){r.push(n)}),r},R.geomEach=b,R.geomReduce=function(o,r,n){var i=n;return b(o,function(a,c,p,f,x){i=0===c&&void 0===n?a:r(i,a,c,p,f,x)}),i},R.flattenEach=d,R.flattenReduce=function(o,r,n){var i=n;return d(o,function(a,c,p){i=0===c&&0===p&&void 0===n?a:r(i,a,c,p)}),i},R.segmentEach=s,R.segmentReduce=function(o,r,n){var i=n,a=!1;return s(o,function(c,p,f,x,v){i=!1===a&&void 0===n?c:r(i,c,p,f,x,v),a=!0}),i},R.lineEach=t,R.lineReduce=function(o,r,n){var i=n;return t(o,function(a,c,p,f){i=0===c&&void 0===n?a:r(i,a,c,p,f)}),i},R.findSegment=function(o,r){if(!k.isObject(r=r||{}))throw new Error("options is invalid");var n,i=r.featureIndex||0,a=r.multiFeatureIndex||0,c=r.geometryIndex||0,p=r.segmentIndex||0,f=r.properties;switch(o.type){case"FeatureCollection":i<0&&(i=o.features.length+i),f=f||o.features[i].properties,n=o.features[i].geometry;break;case"Feature":f=f||o.properties,n=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=o;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var x=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return p<0&&(p=x.length+p-1),k.lineString([x[p],x[p+1]],f,r);case"Polygon":return c<0&&(c=x.length+c),p<0&&(p=x[c].length+p-1),k.lineString([x[c][p],x[c][p+1]],f,r);case"MultiLineString":return a<0&&(a=x.length+a),p<0&&(p=x[a].length+p-1),k.lineString([x[a][p],x[a][p+1]],f,r);case"MultiPolygon":return a<0&&(a=x.length+a),c<0&&(c=x[a].length+c),p<0&&(p=x[a][c].length-p-1),k.lineString([x[a][c][p],x[a][c][p+1]],f,r)}throw new Error("geojson is invalid")},R.findPoint=function(o,r){if(!k.isObject(r=r||{}))throw new Error("options is invalid");var n,i=r.featureIndex||0,a=r.multiFeatureIndex||0,c=r.geometryIndex||0,p=r.coordIndex||0,f=r.properties;switch(o.type){case"FeatureCollection":i<0&&(i=o.features.length+i),f=f||o.features[i].properties,n=o.features[i].geometry;break;case"Feature":f=f||o.properties,n=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=o;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var x=n.coordinates;switch(n.type){case"Point":return k.point(x,f,r);case"MultiPoint":return a<0&&(a=x.length+a),k.point(x[a],f,r);case"LineString":return p<0&&(p=x.length+p),k.point(x[p],f,r);case"Polygon":return c<0&&(c=x.length+c),p<0&&(p=x[c].length+p),k.point(x[c][p],f,r);case"MultiLineString":return a<0&&(a=x.length+a),p<0&&(p=x[a].length+p),k.point(x[a][p],f,r);case"MultiPolygon":return a<0&&(a=x.length+a),c<0&&(c=x[a].length+c),p<0&&(p=x[a][c].length-p),k.point(x[a][c][p],f,r)}throw new Error("geojson is invalid")}},85268:function($,R,e){"use strict";Object.defineProperty(R,"__esModule",{value:!0});var k=e(27138);function A(l){var T=[1/0,1/0,-1/0,-1/0];return k.coordEach(l,function(b){T[0]>b[0]&&(T[0]=b[0]),T[1]>b[1]&&(T[1]=b[1]),T[2]<b[0]&&(T[2]=b[0]),T[3]<b[1]&&(T[3]=b[1])}),T}A.default=A,R.default=A},94228:function($,R){"use strict";function e(i,a,c){void 0===c&&(c={});var p={type:"Feature"};return(0===c.id||c.id)&&(p.id=c.id),c.bbox&&(p.bbox=c.bbox),p.properties=a||{},p.geometry=i,p}function k(i,a,c){if(void 0===c&&(c={}),!i)throw new Error("coordinates is required");if(!Array.isArray(i))throw new Error("coordinates must be an Array");if(i.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!n(i[0])||!n(i[1]))throw new Error("coordinates must contain numbers");return e({type:"Point",coordinates:i},a,c)}function A(i,a,c){void 0===c&&(c={});for(var p=0,f=i;p<f.length;p++){var x=f[p];if(x.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var v=0;v<x[x.length-1].length;v++)if(x[x.length-1][v]!==x[0][v])throw new Error("First and last Position are not equivalent.")}return e({type:"Polygon",coordinates:i},a,c)}function l(i,a,c){if(void 0===c&&(c={}),i.length<2)throw new Error("coordinates must be an array of two or more positions");return e({type:"LineString",coordinates:i},a,c)}function T(i,a){void 0===a&&(a={});var c={type:"FeatureCollection"};return a.id&&(c.id=a.id),a.bbox&&(c.bbox=a.bbox),c.features=i,c}function b(i,a,c){return void 0===c&&(c={}),e({type:"MultiLineString",coordinates:i},a,c)}function d(i,a,c){return void 0===c&&(c={}),e({type:"MultiPoint",coordinates:i},a,c)}function s(i,a,c){return void 0===c&&(c={}),e({type:"MultiPolygon",coordinates:i},a,c)}function t(i,a){void 0===a&&(a="kilometers");var c=R.factors[a];if(!c)throw new Error(a+" units is invalid");return i*c}function o(i,a){void 0===a&&(a="kilometers");var c=R.factors[a];if(!c)throw new Error(a+" units is invalid");return i/c}function r(i){return i%(2*Math.PI)*180/Math.PI}function n(i){return!isNaN(i)&&null!==i&&!Array.isArray(i)}Object.defineProperty(R,"__esModule",{value:!0}),R.earthRadius=6371008.8,R.factors={centimeters:100*R.earthRadius,centimetres:100*R.earthRadius,degrees:R.earthRadius/111325,feet:3.28084*R.earthRadius,inches:39.37*R.earthRadius,kilometers:R.earthRadius/1e3,kilometres:R.earthRadius/1e3,meters:R.earthRadius,metres:R.earthRadius,miles:R.earthRadius/1609.344,millimeters:1e3*R.earthRadius,millimetres:1e3*R.earthRadius,nauticalmiles:R.earthRadius/1852,radians:1,yards:1.0936*R.earthRadius},R.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/R.earthRadius,yards:1.0936133},R.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},R.feature=e,R.geometry=function(i,a,c){switch(void 0===c&&(c={}),i){case"Point":return k(a).geometry;case"LineString":return l(a).geometry;case"Polygon":return A(a).geometry;case"MultiPoint":return d(a).geometry;case"MultiLineString":return b(a).geometry;case"MultiPolygon":return s(a).geometry;default:throw new Error(i+" is invalid")}},R.point=k,R.points=function(i,a,c){return void 0===c&&(c={}),T(i.map(function(p){return k(p,a)}),c)},R.polygon=A,R.polygons=function(i,a,c){return void 0===c&&(c={}),T(i.map(function(p){return A(p,a)}),c)},R.lineString=l,R.lineStrings=function(i,a,c){return void 0===c&&(c={}),T(i.map(function(p){return l(p,a)}),c)},R.featureCollection=T,R.multiLineString=b,R.multiPoint=d,R.multiPolygon=s,R.geometryCollection=function(i,a,c){return void 0===c&&(c={}),e({type:"GeometryCollection",geometries:i},a,c)},R.round=function(i,a){if(void 0===a&&(a=0),a&&!(a>=0))throw new Error("precision must be a positive number");var c=Math.pow(10,a||0);return Math.round(i*c)/c},R.radiansToLength=t,R.lengthToRadians=o,R.lengthToDegrees=function(i,a){return r(o(i,a))},R.bearingToAzimuth=function(i){var a=i%360;return a<0&&(a+=360),a},R.radiansToDegrees=r,R.degreesToRadians=function(i){return i%360*Math.PI/180},R.convertLength=function(i,a,c){if(void 0===a&&(a="kilometers"),void 0===c&&(c="kilometers"),!(i>=0))throw new Error("length must be a positive number");return t(o(i,a),c)},R.convertArea=function(i,a,c){if(void 0===a&&(a="meters"),void 0===c&&(c="kilometers"),!(i>=0))throw new Error("area must be a positive number");var p=R.areaFactors[a];if(!p)throw new Error("invalid original units");var f=R.areaFactors[c];if(!f)throw new Error("invalid final units");return i/p*f},R.isNumber=n,R.isObject=function(i){return!!i&&i.constructor===Object},R.validateBBox=function(i){if(!i)throw new Error("bbox is required");if(!Array.isArray(i))throw new Error("bbox must be an Array");if(4!==i.length&&6!==i.length)throw new Error("bbox must be an Array of 4 or 6 numbers");i.forEach(function(a){if(!n(a))throw new Error("bbox must only contain numbers")})},R.validateId=function(i){if(!i)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof i))throw new Error("id must be a number or a string")}},27138:function($,R,e){"use strict";Object.defineProperty(R,"__esModule",{value:!0});var k=e(94228);function A(o,r,n){if(null!==o)for(var i,a,c,p,f,x,v,g,y=0,h=0,m=o.type,w="FeatureCollection"===m,u="Feature"===m,S=w?o.features.length:1,_=0;_<S;_++){f=(g=!!(v=w?o.features[_].geometry:u?o.geometry:o)&&"GeometryCollection"===v.type)?v.geometries.length:1;for(var E=0;E<f;E++){var L=0,C=0;if(null!==(p=g?v.geometries[E]:v)){x=p.coordinates;var P=p.type;switch(y=!n||"Polygon"!==P&&"MultiPolygon"!==P?0:1,P){case null:break;case"Point":if(!1===r(x,h,_,L,C))return!1;h++,L++;break;case"LineString":case"MultiPoint":for(i=0;i<x.length;i++){if(!1===r(x[i],h,_,L,C))return!1;h++,"MultiPoint"===P&&L++}"LineString"===P&&L++;break;case"Polygon":case"MultiLineString":for(i=0;i<x.length;i++){for(a=0;a<x[i].length-y;a++){if(!1===r(x[i][a],h,_,L,C))return!1;h++}"MultiLineString"===P&&L++,"Polygon"===P&&C++}"Polygon"===P&&L++;break;case"MultiPolygon":for(i=0;i<x.length;i++){for(C=0,a=0;a<x[i].length;a++){for(c=0;c<x[i][a].length-y;c++){if(!1===r(x[i][a][c],h,_,L,C))return!1;h++}C++}L++}break;case"GeometryCollection":for(i=0;i<p.geometries.length;i++)if(!1===A(p.geometries[i],r,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function l(o,r){var n;switch(o.type){case"FeatureCollection":for(n=0;n<o.features.length&&!1!==r(o.features[n].properties,n);n++);break;case"Feature":r(o.properties,0)}}function T(o,r){if("Feature"===o.type)r(o,0);else if("FeatureCollection"===o.type)for(var n=0;n<o.features.length&&!1!==r(o.features[n],n);n++);}function b(o,r){var n,i,a,c,p,f,x,v,g,y,h=0,m="FeatureCollection"===o.type,w="Feature"===o.type,u=m?o.features.length:1;for(n=0;n<u;n++){for(v=m?o.features[n].properties:w?o.properties:{},g=m?o.features[n].bbox:w?o.bbox:void 0,y=m?o.features[n].id:w?o.id:void 0,p=(x=!!(f=m?o.features[n].geometry:w?o.geometry:o)&&"GeometryCollection"===f.type)?f.geometries.length:1,a=0;a<p;a++)if(null!==(c=x?f.geometries[a]:f))switch(c.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===r(c,h,v,g,y))return!1;break;case"GeometryCollection":for(i=0;i<c.geometries.length;i++)if(!1===r(c.geometries[i],h,v,g,y))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===r(null,h,v,g,y))return!1;h++}}function d(o,r){b(o,function(n,i,a,c,p){var f,x=null===n?null:n.type;switch(x){case null:case"Point":case"LineString":case"Polygon":return!1!==r(k.feature(n,a,{bbox:c,id:p}),i,0)&&void 0}switch(x){case"MultiPoint":f="Point";break;case"MultiLineString":f="LineString";break;case"MultiPolygon":f="Polygon"}for(var v=0;v<n.coordinates.length;v++)if(!1===r(k.feature({type:f,coordinates:n.coordinates[v]},a),i,v))return!1})}function s(o,r){d(o,function(n,i,a){var c=0;if(n.geometry){var p=n.geometry.type;if("Point"!==p&&"MultiPoint"!==p){var f,x=0,v=0,g=0;return!1!==A(n,function(y,h,m,w,u){if(void 0===f||i>x||w>v||u>g)return f=y,x=i,v=w,g=u,void(c=0);var S=k.lineString([f,y],n.properties);if(!1===r(S,i,a,u,c))return!1;c++,f=y})&&void 0}}})}function t(o,r){if(!o)throw new Error("geojson is required");d(o,function(n,i,a){if(null!==n.geometry){var p=n.geometry.coordinates;switch(n.geometry.type){case"LineString":if(!1===r(n,i,a,0,0))return!1;break;case"Polygon":for(var f=0;f<p.length;f++)if(!1===r(k.lineString(p[f],n.properties),i,a,f))return!1}}})}R.coordEach=A,R.coordReduce=function(o,r,n,i){var a=n;return A(o,function(c,p,f,x,v){a=0===p&&void 0===n?c:r(a,c,p,f,x,v)},i),a},R.propEach=l,R.propReduce=function(o,r,n){var i=n;return l(o,function(a,c){i=0===c&&void 0===n?a:r(i,a,c)}),i},R.featureEach=T,R.featureReduce=function(o,r,n){var i=n;return T(o,function(a,c){i=0===c&&void 0===n?a:r(i,a,c)}),i},R.coordAll=function(o){var r=[];return A(o,function(n){r.push(n)}),r},R.geomEach=b,R.geomReduce=function(o,r,n){var i=n;return b(o,function(a,c,p,f,x){i=0===c&&void 0===n?a:r(i,a,c,p,f,x)}),i},R.flattenEach=d,R.flattenReduce=function(o,r,n){var i=n;return d(o,function(a,c,p){i=0===c&&0===p&&void 0===n?a:r(i,a,c,p)}),i},R.segmentEach=s,R.segmentReduce=function(o,r,n){var i=n,a=!1;return s(o,function(c,p,f,x,v){i=!1===a&&void 0===n?c:r(i,c,p,f,x,v),a=!0}),i},R.lineEach=t,R.lineReduce=function(o,r,n){var i=n;return t(o,function(a,c,p,f){i=0===c&&void 0===n?a:r(i,a,c,p,f)}),i},R.findSegment=function(o,r){if(!k.isObject(r=r||{}))throw new Error("options is invalid");var n,i=r.featureIndex||0,a=r.multiFeatureIndex||0,c=r.geometryIndex||0,p=r.segmentIndex||0,f=r.properties;switch(o.type){case"FeatureCollection":i<0&&(i=o.features.length+i),f=f||o.features[i].properties,n=o.features[i].geometry;break;case"Feature":f=f||o.properties,n=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=o;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var x=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return p<0&&(p=x.length+p-1),k.lineString([x[p],x[p+1]],f,r);case"Polygon":return c<0&&(c=x.length+c),p<0&&(p=x[c].length+p-1),k.lineString([x[c][p],x[c][p+1]],f,r);case"MultiLineString":return a<0&&(a=x.length+a),p<0&&(p=x[a].length+p-1),k.lineString([x[a][p],x[a][p+1]],f,r);case"MultiPolygon":return a<0&&(a=x.length+a),c<0&&(c=x[a].length+c),p<0&&(p=x[a][c].length-p-1),k.lineString([x[a][c][p],x[a][c][p+1]],f,r)}throw new Error("geojson is invalid")},R.findPoint=function(o,r){if(!k.isObject(r=r||{}))throw new Error("options is invalid");var n,i=r.featureIndex||0,a=r.multiFeatureIndex||0,c=r.geometryIndex||0,p=r.coordIndex||0,f=r.properties;switch(o.type){case"FeatureCollection":i<0&&(i=o.features.length+i),f=f||o.features[i].properties,n=o.features[i].geometry;break;case"Feature":f=f||o.properties,n=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=o;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var x=n.coordinates;switch(n.type){case"Point":return k.point(x,f,r);case"MultiPoint":return a<0&&(a=x.length+a),k.point(x[a],f,r);case"LineString":return p<0&&(p=x.length+p),k.point(x[p],f,r);case"Polygon":return c<0&&(c=x.length+c),p<0&&(p=x[c].length+p),k.point(x[c][p],f,r);case"MultiLineString":return a<0&&(a=x.length+a),p<0&&(p=x[a].length+p),k.point(x[a][p],f,r);case"MultiPolygon":return a<0&&(a=x.length+a),c<0&&(c=x[a].length+c),p<0&&(p=x[a][c].length-p),k.point(x[a][c][p],f,r)}throw new Error("geojson is invalid")}},29261:function($,R,e){"use strict";Object.defineProperty(R,"__esModule",{value:!0});var k=e(88553),A=e(64182);R.default=function(l,T){void 0===T&&(T={});var b=0,d=0,s=0;return k.coordEach(l,function(t){b+=t[0],d+=t[1],s++}),A.point([b/s,d/s],T.properties)}},64182:function($,R){"use strict";function e(i,a,c){void 0===c&&(c={});var p={type:"Feature"};return(0===c.id||c.id)&&(p.id=c.id),c.bbox&&(p.bbox=c.bbox),p.properties=a||{},p.geometry=i,p}function k(i,a,c){return void 0===c&&(c={}),e({type:"Point",coordinates:i},a,c)}function A(i,a,c){void 0===c&&(c={});for(var p=0,f=i;p<f.length;p++){var x=f[p];if(x.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");for(var v=0;v<x[x.length-1].length;v++)if(x[x.length-1][v]!==x[0][v])throw new Error("First and last Position are not equivalent.")}return e({type:"Polygon",coordinates:i},a,c)}function l(i,a,c){if(void 0===c&&(c={}),i.length<2)throw new Error("coordinates must be an array of two or more positions");return e({type:"LineString",coordinates:i},a,c)}function T(i,a){void 0===a&&(a={});var c={type:"FeatureCollection"};return a.id&&(c.id=a.id),a.bbox&&(c.bbox=a.bbox),c.features=i,c}function b(i,a,c){return void 0===c&&(c={}),e({type:"MultiLineString",coordinates:i},a,c)}function d(i,a,c){return void 0===c&&(c={}),e({type:"MultiPoint",coordinates:i},a,c)}function s(i,a,c){return void 0===c&&(c={}),e({type:"MultiPolygon",coordinates:i},a,c)}function t(i,a){void 0===a&&(a="kilometers");var c=R.factors[a];if(!c)throw new Error(a+" units is invalid");return i*c}function o(i,a){void 0===a&&(a="kilometers");var c=R.factors[a];if(!c)throw new Error(a+" units is invalid");return i/c}function r(i){return i%(2*Math.PI)*180/Math.PI}function n(i){return!isNaN(i)&&null!==i&&!Array.isArray(i)&&!/^\s*$/.test(i)}Object.defineProperty(R,"__esModule",{value:!0}),R.earthRadius=6371008.8,R.factors={centimeters:100*R.earthRadius,centimetres:100*R.earthRadius,degrees:R.earthRadius/111325,feet:3.28084*R.earthRadius,inches:39.37*R.earthRadius,kilometers:R.earthRadius/1e3,kilometres:R.earthRadius/1e3,meters:R.earthRadius,metres:R.earthRadius,miles:R.earthRadius/1609.344,millimeters:1e3*R.earthRadius,millimetres:1e3*R.earthRadius,nauticalmiles:R.earthRadius/1852,radians:1,yards:R.earthRadius/1.0936},R.unitsFactors={centimeters:100,centimetres:100,degrees:8982708286548395e-21,feet:3.28084,inches:39.37,kilometers:.001,kilometres:.001,meters:1,metres:1,miles:.0006213711922373339,millimeters:1e3,millimetres:1e3,nauticalmiles:.0005399568034557236,radians:1/R.earthRadius,yards:.91441111923921},R.areaFactors={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,millimeters:1e6,millimetres:1e6,yards:1.195990046},R.feature=e,R.geometry=function(i,a,c){switch(void 0===c&&(c={}),i){case"Point":return k(a).geometry;case"LineString":return l(a).geometry;case"Polygon":return A(a).geometry;case"MultiPoint":return d(a).geometry;case"MultiLineString":return b(a).geometry;case"MultiPolygon":return s(a).geometry;default:throw new Error(i+" is invalid")}},R.point=k,R.points=function(i,a,c){return void 0===c&&(c={}),T(i.map(function(p){return k(p,a)}),c)},R.polygon=A,R.polygons=function(i,a,c){return void 0===c&&(c={}),T(i.map(function(p){return A(p,a)}),c)},R.lineString=l,R.lineStrings=function(i,a,c){return void 0===c&&(c={}),T(i.map(function(p){return l(p,a)}),c)},R.featureCollection=T,R.multiLineString=b,R.multiPoint=d,R.multiPolygon=s,R.geometryCollection=function(i,a,c){return void 0===c&&(c={}),e({type:"GeometryCollection",geometries:i},a,c)},R.round=function(i,a){if(void 0===a&&(a=0),a&&!(a>=0))throw new Error("precision must be a positive number");var c=Math.pow(10,a||0);return Math.round(i*c)/c},R.radiansToLength=t,R.lengthToRadians=o,R.lengthToDegrees=function(i,a){return r(o(i,a))},R.bearingToAzimuth=function(i){var a=i%360;return a<0&&(a+=360),a},R.radiansToDegrees=r,R.degreesToRadians=function(i){return i%360*Math.PI/180},R.convertLength=function(i,a,c){if(void 0===a&&(a="kilometers"),void 0===c&&(c="kilometers"),!(i>=0))throw new Error("length must be a positive number");return t(o(i,a),c)},R.convertArea=function(i,a,c){if(void 0===a&&(a="meters"),void 0===c&&(c="kilometers"),!(i>=0))throw new Error("area must be a positive number");var p=R.areaFactors[a];if(!p)throw new Error("invalid original units");var f=R.areaFactors[c];if(!f)throw new Error("invalid final units");return i/p*f},R.isNumber=n,R.isObject=function(i){return!!i&&i.constructor===Object},R.validateBBox=function(i){if(!i)throw new Error("bbox is required");if(!Array.isArray(i))throw new Error("bbox must be an Array");if(4!==i.length&&6!==i.length)throw new Error("bbox must be an Array of 4 or 6 numbers");i.forEach(function(a){if(!n(a))throw new Error("bbox must only contain numbers")})},R.validateId=function(i){if(!i)throw new Error("id is required");if(-1===["string","number"].indexOf(typeof i))throw new Error("id must be a number or a string")},R.radians2degrees=function(){throw new Error("method has been renamed to `radiansToDegrees`")},R.degrees2radians=function(){throw new Error("method has been renamed to `degreesToRadians`")},R.distanceToDegrees=function(){throw new Error("method has been renamed to `lengthToDegrees`")},R.distanceToRadians=function(){throw new Error("method has been renamed to `lengthToRadians`")},R.radiansToDistance=function(){throw new Error("method has been renamed to `radiansToLength`")},R.bearingToAngle=function(){throw new Error("method has been renamed to `bearingToAzimuth`")},R.convertDistance=function(){throw new Error("method has been renamed to `convertLength`")}},88553:function($,R,e){"use strict";Object.defineProperty(R,"__esModule",{value:!0});var k=e(64182);function A(o,r,n){if(null!==o)for(var i,a,c,p,f,x,v,g,y=0,h=0,m=o.type,w="FeatureCollection"===m,u="Feature"===m,S=w?o.features.length:1,_=0;_<S;_++){f=(g=!!(v=w?o.features[_].geometry:u?o.geometry:o)&&"GeometryCollection"===v.type)?v.geometries.length:1;for(var E=0;E<f;E++){var L=0,C=0;if(null!==(p=g?v.geometries[E]:v)){x=p.coordinates;var P=p.type;switch(y=!n||"Polygon"!==P&&"MultiPolygon"!==P?0:1,P){case null:break;case"Point":if(!1===r(x,h,_,L,C))return!1;h++,L++;break;case"LineString":case"MultiPoint":for(i=0;i<x.length;i++){if(!1===r(x[i],h,_,L,C))return!1;h++,"MultiPoint"===P&&L++}"LineString"===P&&L++;break;case"Polygon":case"MultiLineString":for(i=0;i<x.length;i++){for(a=0;a<x[i].length-y;a++){if(!1===r(x[i][a],h,_,L,C))return!1;h++}"MultiLineString"===P&&L++,"Polygon"===P&&C++}"Polygon"===P&&L++;break;case"MultiPolygon":for(i=0;i<x.length;i++){for(C=0,a=0;a<x[i].length;a++){for(c=0;c<x[i][a].length-y;c++){if(!1===r(x[i][a][c],h,_,L,C))return!1;h++}C++}L++}break;case"GeometryCollection":for(i=0;i<p.geometries.length;i++)if(!1===A(p.geometries[i],r,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function l(o,r){var n;switch(o.type){case"FeatureCollection":for(n=0;n<o.features.length&&!1!==r(o.features[n].properties,n);n++);break;case"Feature":r(o.properties,0)}}function T(o,r){if("Feature"===o.type)r(o,0);else if("FeatureCollection"===o.type)for(var n=0;n<o.features.length&&!1!==r(o.features[n],n);n++);}function b(o,r){var n,i,a,c,p,f,x,v,g,y,h=0,m="FeatureCollection"===o.type,w="Feature"===o.type,u=m?o.features.length:1;for(n=0;n<u;n++){for(v=m?o.features[n].properties:w?o.properties:{},g=m?o.features[n].bbox:w?o.bbox:void 0,y=m?o.features[n].id:w?o.id:void 0,p=(x=!!(f=m?o.features[n].geometry:w?o.geometry:o)&&"GeometryCollection"===f.type)?f.geometries.length:1,a=0;a<p;a++)if(null!==(c=x?f.geometries[a]:f))switch(c.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===r(c,h,v,g,y))return!1;break;case"GeometryCollection":for(i=0;i<c.geometries.length;i++)if(!1===r(c.geometries[i],h,v,g,y))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===r(null,h,v,g,y))return!1;h++}}function d(o,r){b(o,function(n,i,a,c,p){var f,x=null===n?null:n.type;switch(x){case null:case"Point":case"LineString":case"Polygon":return!1!==r(k.feature(n,a,{bbox:c,id:p}),i,0)&&void 0}switch(x){case"MultiPoint":f="Point";break;case"MultiLineString":f="LineString";break;case"MultiPolygon":f="Polygon"}for(var v=0;v<n.coordinates.length;v++)if(!1===r(k.feature({type:f,coordinates:n.coordinates[v]},a),i,v))return!1})}function s(o,r){d(o,function(n,i,a){var c=0;if(n.geometry){var p=n.geometry.type;if("Point"!==p&&"MultiPoint"!==p){var f,x=0,v=0,g=0;return!1!==A(n,function(y,h,m,w,u){if(void 0===f||i>x||w>v||u>g)return f=y,x=i,v=w,g=u,void(c=0);var S=k.lineString([f,y],n.properties);if(!1===r(S,i,a,u,c))return!1;c++,f=y})&&void 0}}})}function t(o,r){if(!o)throw new Error("geojson is required");d(o,function(n,i,a){if(null!==n.geometry){var p=n.geometry.coordinates;switch(n.geometry.type){case"LineString":if(!1===r(n,i,a,0,0))return!1;break;case"Polygon":for(var f=0;f<p.length;f++)if(!1===r(k.lineString(p[f],n.properties),i,a,f))return!1}}})}R.coordEach=A,R.coordReduce=function(o,r,n,i){var a=n;return A(o,function(c,p,f,x,v){a=0===p&&void 0===n?c:r(a,c,p,f,x,v)},i),a},R.propEach=l,R.propReduce=function(o,r,n){var i=n;return l(o,function(a,c){i=0===c&&void 0===n?a:r(i,a,c)}),i},R.featureEach=T,R.featureReduce=function(o,r,n){var i=n;return T(o,function(a,c){i=0===c&&void 0===n?a:r(i,a,c)}),i},R.coordAll=function(o){var r=[];return A(o,function(n){r.push(n)}),r},R.geomEach=b,R.geomReduce=function(o,r,n){var i=n;return b(o,function(a,c,p,f,x){i=0===c&&void 0===n?a:r(i,a,c,p,f,x)}),i},R.flattenEach=d,R.flattenReduce=function(o,r,n){var i=n;return d(o,function(a,c,p){i=0===c&&0===p&&void 0===n?a:r(i,a,c,p)}),i},R.segmentEach=s,R.segmentReduce=function(o,r,n){var i=n,a=!1;return s(o,function(c,p,f,x,v){i=!1===a&&void 0===n?c:r(i,c,p,f,x,v),a=!0}),i},R.lineEach=t,R.lineReduce=function(o,r,n){var i=n;return t(o,function(a,c,p,f){i=0===c&&void 0===n?a:r(i,a,c,p,f)}),i},R.findSegment=function(o,r){if(!k.isObject(r=r||{}))throw new Error("options is invalid");var n,i=r.featureIndex||0,a=r.multiFeatureIndex||0,c=r.geometryIndex||0,p=r.segmentIndex||0,f=r.properties;switch(o.type){case"FeatureCollection":i<0&&(i=o.features.length+i),f=f||o.features[i].properties,n=o.features[i].geometry;break;case"Feature":f=f||o.properties,n=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=o;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var x=n.coordinates;switch(n.type){case"Point":case"MultiPoint":return null;case"LineString":return p<0&&(p=x.length+p-1),k.lineString([x[p],x[p+1]],f,r);case"Polygon":return c<0&&(c=x.length+c),p<0&&(p=x[c].length+p-1),k.lineString([x[c][p],x[c][p+1]],f,r);case"MultiLineString":return a<0&&(a=x.length+a),p<0&&(p=x[a].length+p-1),k.lineString([x[a][p],x[a][p+1]],f,r);case"MultiPolygon":return a<0&&(a=x.length+a),c<0&&(c=x[a].length+c),p<0&&(p=x[a][c].length-p-1),k.lineString([x[a][c][p],x[a][c][p+1]],f,r)}throw new Error("geojson is invalid")},R.findPoint=function(o,r){if(!k.isObject(r=r||{}))throw new Error("options is invalid");var n,i=r.featureIndex||0,a=r.multiFeatureIndex||0,c=r.geometryIndex||0,p=r.coordIndex||0,f=r.properties;switch(o.type){case"FeatureCollection":i<0&&(i=o.features.length+i),f=f||o.features[i].properties,n=o.features[i].geometry;break;case"Feature":f=f||o.properties,n=o.geometry;break;case"Point":case"MultiPoint":return null;case"LineString":case"Polygon":case"MultiLineString":case"MultiPolygon":n=o;break;default:throw new Error("geojson is invalid")}if(null===n)return null;var x=n.coordinates;switch(n.type){case"Point":return k.point(x,f,r);case"MultiPoint":return a<0&&(a=x.length+a),k.point(x[a],f,r);case"LineString":return p<0&&(p=x.length+p),k.point(x[p],f,r);case"Polygon":return c<0&&(c=x.length+c),p<0&&(p=x[c].length+p),k.point(x[c][p],f,r);case"MultiLineString":return a<0&&(a=x.length+a),p<0&&(p=x[a].length+p),k.point(x[a][p],f,r);case"MultiPolygon":return a<0&&(a=x.length+a),c<0&&(c=x[a].length+c),p<0&&(p=x[a][c].length-p),k.point(x[a][c][p],f,r)}throw new Error("geojson is invalid")}},65185:function($){$.exports=function(R){var e=0,k=0,A=0,l=0;return R.map(function(T){var b=(T=T.slice())[0],d=b.toUpperCase();if(b!=d)switch(T[0]=d,b){case"a":T[6]+=A,T[7]+=l;break;case"v":T[1]+=l;break;case"h":T[1]+=A;break;default:for(var s=1;s<T.length;)T[s++]+=A,T[s++]+=l}switch(d){case"Z":A=e,l=k;break;case"H":A=T[1];break;case"V":l=T[1];break;case"M":A=e=T[1],l=k=T[2];break;default:A=T[T.length-2],l=T[T.length-1]}return T})}},21527:function($){"use strict";$.exports=function(R,e){if(!R||null==R.length)throw Error("Argument should be an array");e=null==e?1:Math.floor(e);for(var k=Array(2*e),A=0;A<e;A++){for(var l=-1/0,T=1/0,b=A,d=R.length;b<d;b+=e)R[b]>l&&(l=R[b]),R[b]<T&&(T=R[b]);k[A]=T,k[e+A]=l}return k}},24696:function($){$.exports=function(e,k,A){if(e.filter)return e.filter(k,A);if(null==e)throw new TypeError;if("function"!=typeof k)throw new TypeError;for(var l=[],T=0;T<e.length;T++)if(R.call(e,T)){var b=e[T];k.call(A,b,T,e)&&l.push(b)}return l};var R=Object.prototype.hasOwnProperty},6851:function($){"use strict";$.exports=function(R,e,k){if("function"==typeof Array.prototype.findIndex)return R.findIndex(e,k);if("function"!=typeof e)throw new TypeError("predicate must be a function");var A=Object(R),l=A.length;if(0===l)return-1;for(var T=0;T<l;T++)if(e.call(k,A[T],T,A))return T;return-1}},54:function($,R,e){"use strict";var k=e(21527);$.exports=function(A,l,T){if(!A||null==A.length)throw Error("Argument should be an array");null==l&&(l=1),null==T&&(T=k(A,l));for(var b=0;b<l;b++){var d=T[l+b],s=T[b],t=b,o=A.length;if(d===1/0&&s===-1/0)for(t=b;t<o;t+=l)A[t]=A[t]===d?1:A[t]===s?0:.5;else if(d===1/0)for(t=b;t<o;t+=l)A[t]=A[t]===d?1:0;else if(s===-1/0)for(t=b;t<o;t+=l)A[t]=A[t]===s?0:1;else{var r=d-s;for(t=b;t<o;t+=l)isNaN(A[t])||(A[t]=0===r?.5:(A[t]-s)/r)}}return A}},57471:function($){$.exports=function(R,e){var k="number"==typeof R,A="number"==typeof e;k&&!A?(e=R,R=0):k||A||(R=0,e=0);var l=(e|=0)-(R|=0);if(l<0)throw new Error("array length must be positive");for(var T=new Array(l),b=0,d=R;b<l;b++,d++)T[b]=d;return T}},32791:function($,R,e){"use strict";var k=e(90386);function A(H){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(F){return typeof F}:function(F){return F&&"function"==typeof Symbol&&F.constructor===Symbol&&F!==Symbol.prototype?"symbol":typeof F})(H)}var l,T,b=e(79616).codes,d=b.ERR_AMBIGUOUS_ARGUMENT,s=b.ERR_INVALID_ARG_TYPE,t=b.ERR_INVALID_ARG_VALUE,o=b.ERR_INVALID_RETURN_VALUE,r=b.ERR_MISSING_ARGS,n=e(73894),i=e(43827).inspect,a=e(43827).types,c=a.isPromise,p=a.isRegExp,f=Object.assign?Object.assign:e(73523).assign,x=Object.is?Object.is:e(64003);function v(){var H=e(74061);l=H.isDeepEqual,T=H.isDeepStrictEqual}var g=!1,y=$.exports=u,h={};function m(H){throw H.message instanceof Error?H.message:new n(H)}function w(H,F,N,B){if(!N){var j=!1;if(0===F)j=!0,B="No value argument passed to `assert.ok()`";else if(B instanceof Error)throw B;var J=new n({actual:N,expected:!0,message:B,operator:"==",stackStartFn:H});throw J.generatedMessage=j,J}}function u(){for(var H=arguments.length,F=new Array(H),N=0;N<H;N++)F[N]=arguments[N];w.apply(void 0,[u,F.length].concat(F))}y.fail=function H(F,N,B,j,J){var G,V=arguments.length;if(0===V?G="Failed":1===V?(B=F,F=void 0):(!1===g&&(g=!0,(k.emitWarning?k.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===V&&(j="!=")),B instanceof Error)throw B;var X={actual:F,expected:N,operator:void 0===j?"fail":j,stackStartFn:J||H};void 0!==B&&(X.message=B);var K=new n(X);throw G&&(K.message=G,K.generatedMessage=!0),K},y.AssertionError=n,y.ok=u,y.equal=function H(F,N,B){if(arguments.length<2)throw new r("actual","expected");F!=N&&m({actual:F,expected:N,message:B,operator:"==",stackStartFn:H})},y.notEqual=function H(F,N,B){if(arguments.length<2)throw new r("actual","expected");F==N&&m({actual:F,expected:N,message:B,operator:"!=",stackStartFn:H})},y.deepEqual=function H(F,N,B){if(arguments.length<2)throw new r("actual","expected");void 0===l&&v(),l(F,N)||m({actual:F,expected:N,message:B,operator:"deepEqual",stackStartFn:H})},y.notDeepEqual=function H(F,N,B){if(arguments.length<2)throw new r("actual","expected");void 0===l&&v(),l(F,N)&&m({actual:F,expected:N,message:B,operator:"notDeepEqual",stackStartFn:H})},y.deepStrictEqual=function H(F,N,B){if(arguments.length<2)throw new r("actual","expected");void 0===l&&v(),T(F,N)||m({actual:F,expected:N,message:B,operator:"deepStrictEqual",stackStartFn:H})},y.notDeepStrictEqual=function H(F,N,B){if(arguments.length<2)throw new r("actual","expected");void 0===l&&v(),T(F,N)&&m({actual:F,expected:N,message:B,operator:"notDeepStrictEqual",stackStartFn:H})},y.strictEqual=function H(F,N,B){if(arguments.length<2)throw new r("actual","expected");x(F,N)||m({actual:F,expected:N,message:B,operator:"strictEqual",stackStartFn:H})},y.notStrictEqual=function H(F,N,B){if(arguments.length<2)throw new r("actual","expected");x(F,N)&&m({actual:F,expected:N,message:B,operator:"notStrictEqual",stackStartFn:H})};var S=function H(F,N,B){var j=this;(function(J,G){if(!(J instanceof G))throw new TypeError("Cannot call a class as a function")})(this,H),N.forEach(function(J){J in F&&(j[J]=void 0!==B&&"string"==typeof B[J]&&p(F[J])&&F[J].test(B[J])?B[J]:F[J])})};function E(H,F,N,B){if("function"!=typeof F){if(p(F))return F.test(H);if(2===arguments.length)throw new s("expected",["Function","RegExp"],F);if("object"!==A(H)||null===H){var j=new n({actual:H,expected:F,message:N,operator:"deepStrictEqual",stackStartFn:B});throw j.operator=B.name,j}var J=Object.keys(F);if(F instanceof Error)J.push("name","message");else if(0===J.length)throw new t("error",F,"may not be an empty object");return void 0===l&&v(),J.forEach(function(G){"string"==typeof H[G]&&p(F[G])&&F[G].test(H[G])||function _(H,F,N,B,j,J){if(!(N in H)||!T(H[N],F[N])){if(!B){var G=new S(H,j),V=new S(F,j,H),W=new n({actual:G,expected:V,operator:"deepStrictEqual",stackStartFn:J});throw W.actual=H,W.expected=F,W.operator=J.name,W}m({actual:H,expected:F,message:B,operator:J.name,stackStartFn:J})}}(H,F,G,N,J,B)}),!0}return void 0!==F.prototype&&H instanceof F||!Error.isPrototypeOf(F)&&!0===F.call({},H)}function L(H){if("function"!=typeof H)throw new s("fn","Function",H);try{H()}catch(F){return F}return h}function C(H){return c(H)||null!==H&&"object"===A(H)&&"function"==typeof H.then&&"function"==typeof H.catch}function P(H){return Promise.resolve().then(function(){var F;if("function"==typeof H){if(!C(F=H()))throw new o("instance of Promise","promiseFn",F)}else{if(!C(H))throw new s("promiseFn",["Function","Promise"],H);F=H}return Promise.resolve().then(function(){return F}).then(function(){return h}).catch(function(N){return N})})}function I(H,F,N,B){if("string"==typeof N){if(4===arguments.length)throw new s("error",["Object","Error","Function","RegExp"],N);if("object"===A(F)&&null!==F){if(F.message===N)throw new d("error/message",'The error message "'.concat(F.message,'" is identical to the message.'))}else if(F===N)throw new d("error/message",'The error "'.concat(F,'" is identical to the message.'));B=N,N=void 0}else if(null!=N&&"object"!==A(N)&&"function"!=typeof N)throw new s("error",["Object","Error","Function","RegExp"],N);if(F===h){var j="";N&&N.name&&(j+=" (".concat(N.name,")")),j+=B?": ".concat(B):".",m({actual:void 0,expected:N,operator:H.name,message:"Missing expected ".concat("rejects"===H.name?"rejection":"exception").concat(j),stackStartFn:H})}if(N&&!E(F,N,B,H))throw F}function U(H,F,N,B){if(F!==h){if("string"==typeof N&&(B=N,N=void 0),!N||E(F,N)){var j=B?": ".concat(B):".";m({actual:F,expected:N,operator:H.name,message:"Got unwanted ".concat("doesNotReject"===H.name?"rejection":"exception").concat(j,"\n")+'Actual message: "'.concat(F&&F.message,'"'),stackStartFn:H})}throw F}}function z(){for(var H=arguments.length,F=new Array(H),N=0;N<H;N++)F[N]=arguments[N];w.apply(void 0,[z,F.length].concat(F))}y.throws=function H(F){for(var N=arguments.length,B=new Array(N>1?N-1:0),j=1;j<N;j++)B[j-1]=arguments[j];I.apply(void 0,[H,L(F)].concat(B))},y.rejects=function H(F){for(var N=arguments.length,B=new Array(N>1?N-1:0),j=1;j<N;j++)B[j-1]=arguments[j];return P(F).then(function(J){return I.apply(void 0,[H,J].concat(B))})},y.doesNotThrow=function H(F){for(var N=arguments.length,B=new Array(N>1?N-1:0),j=1;j<N;j++)B[j-1]=arguments[j];U.apply(void 0,[H,L(F)].concat(B))},y.doesNotReject=function H(F){for(var N=arguments.length,B=new Array(N>1?N-1:0),j=1;j<N;j++)B[j-1]=arguments[j];return P(F).then(function(J){return U.apply(void 0,[H,J].concat(B))})},y.ifError=function H(F){if(null!=F){var N="ifError got unwanted exception: ";"object"===A(F)&&"string"==typeof F.message?N+=0===F.message.length&&F.constructor?F.constructor.name:F.message:N+=i(F);var B=new n({actual:F,expected:null,operator:"ifError",message:N,stackStartFn:H}),j=F.stack;if("string"==typeof j){var J=j.split("\n");J.shift();for(var G=B.stack.split("\n"),V=0;V<J.length;V++){var W=G.indexOf(J[V]);if(-1!==W){G=G.slice(0,W);break}}B.stack="".concat(G.join("\n"),"\n").concat(J.join("\n"))}throw B}},y.strict=f(z,y,{equal:y.strictEqual,deepEqual:y.deepStrictEqual,notEqual:y.notStrictEqual,notDeepEqual:y.notDeepStrictEqual}),y.strict.strict=y.strict},73894:function($,R,e){"use strict";var k=e(90386);function A(w,u,S){return u in w?Object.defineProperty(w,u,{value:S,enumerable:!0,configurable:!0,writable:!0}):w[u]=S,w}function T(w,u){return!u||"object"!==n(u)&&"function"!=typeof u?b(w):u}function b(w){if(void 0===w)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return w}function d(w){var u="function"==typeof Map?new Map:void 0;return d=function(S){if(null===S||-1===Function.toString.call(S).indexOf("[native code]"))return S;if("function"!=typeof S)throw new TypeError("Super expression must either be null or a function");if(void 0!==u){if(u.has(S))return u.get(S);u.set(S,E)}function E(){return t(S,arguments,r(this).constructor)}return E.prototype=Object.create(S.prototype,{constructor:{value:E,enumerable:!1,writable:!0,configurable:!0}}),o(E,S)},d(w)}function t(w,u,S){return(t=function s(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}()?Reflect.construct:function(_,E,L){var C=[null];C.push.apply(C,E);var P=new(Function.bind.apply(_,C));return L&&o(P,L.prototype),P}).apply(null,arguments)}function o(w,u){return(o=Object.setPrototypeOf||function(S,_){return S.__proto__=_,S})(w,u)}function r(w){return(r=Object.setPrototypeOf?Object.getPrototypeOf:function(u){return u.__proto__||Object.getPrototypeOf(u)})(w)}function n(w){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(w)}var i=e(43827).inspect,a=e(79616).codes.ERR_INVALID_ARG_TYPE;function c(w,u,S){return(void 0===S||S>w.length)&&(S=w.length),w.substring(S-u.length,S)===u}var p="",f="",x="",v="",g={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 y(w){var u=Object.keys(w),S=Object.create(Object.getPrototypeOf(w));return u.forEach(function(_){S[_]=w[_]}),Object.defineProperty(S,"message",{value:w.message}),S}function h(w){return i(w,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}var m=function(w){function u(E){var L;if(function(G,V){if(!(G instanceof V))throw new TypeError("Cannot call a class as a function")}(this,u),"object"!==n(E)||null===E)throw new a("options","Object",E);var C=E.message,P=E.operator,I=E.stackStartFn,U=E.actual,z=E.expected,H=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=C)L=T(this,r(u).call(this,String(C)));else if(k.stderr&&k.stderr.isTTY&&(k.stderr&&k.stderr.getColorDepth&&1!==k.stderr.getColorDepth()?(p="\x1b[34m",f="\x1b[32m",v="\x1b[39m",x="\x1b[31m"):(p="",f="",v="",x="")),"object"===n(U)&&null!==U&&"object"===n(z)&&null!==z&&"stack"in U&&U instanceof Error&&"stack"in z&&z instanceof Error&&(U=y(U),z=y(z)),"deepStrictEqual"===P||"strictEqual"===P)L=T(this,r(u).call(this,function(G,V,W){var X="",K="",re=0,ee="",ie=!1,oe=h(G),ce=oe.split("\n"),me=h(V).split("\n"),de=0,he="";if("strictEqual"===W&&"object"===n(G)&&"object"===n(V)&&null!==G&&null!==V&&(W="strictEqualObject"),1===ce.length&&1===me.length&&ce[0]!==me[0]){var ve=ce[0].length+me[0].length;if(ve<=10){if(!("object"===n(G)&&null!==G||"object"===n(V)&&null!==V||0===G&&0===V))return"".concat(g[W],"\n\n")+"".concat(ce[0]," !== ").concat(me[0],"\n")}else if("strictEqualObject"!==W&&ve<(k.stderr&&k.stderr.isTTY?k.stderr.columns:80)){for(;ce[0][de]===me[0][de];)de++;de>2&&(he="\n  ".concat(function(Ce,Re){if(Re=Math.floor(Re),0==Ce.length||0==Re)return"";var le=Ce.length*Re;for(Re=Math.floor(Math.log(Re)/Math.log(2));Re;)Ce+=Ce,Re--;return Ce+Ce.substring(0,le-Ce.length)}(" ",de),"^"),de=0)}}for(var Pe=ce[ce.length-1],xe=me[me.length-1];Pe===xe&&(de++<2?ee="\n  ".concat(Pe).concat(ee):X=Pe,ce.pop(),me.pop(),0!==ce.length&&0!==me.length);)Pe=ce[ce.length-1],xe=me[me.length-1];var ke=Math.max(ce.length,me.length);if(0===ke){var Ae=oe.split("\n");if(Ae.length>30)for(Ae[26]="".concat(p,"...").concat(v);Ae.length>27;)Ae.pop();return"".concat(g.notIdentical,"\n\n").concat(Ae.join("\n"),"\n")}de>3&&(ee="\n".concat(p,"...").concat(v).concat(ee),ie=!0),""!==X&&(ee="\n  ".concat(X).concat(ee),X="");var Te=0,Q=g[W]+"\n".concat(f,"+ actual").concat(v," ").concat(x,"- expected").concat(v),se=" ".concat(p,"...").concat(v," Lines skipped");for(de=0;de<ke;de++){var fe=de-re;if(ce.length<de+1)fe>1&&de>2&&(fe>4?(K+="\n".concat(p,"...").concat(v),ie=!0):fe>3&&(K+="\n  ".concat(me[de-2]),Te++),K+="\n  ".concat(me[de-1]),Te++),re=de,X+="\n".concat(x,"-").concat(v," ").concat(me[de]),Te++;else if(me.length<de+1)fe>1&&de>2&&(fe>4?(K+="\n".concat(p,"...").concat(v),ie=!0):fe>3&&(K+="\n  ".concat(ce[de-2]),Te++),K+="\n  ".concat(ce[de-1]),Te++),re=de,K+="\n".concat(f,"+").concat(v," ").concat(ce[de]),Te++;else{var ye=me[de],Me=ce[de],Ie=Me!==ye&&(!c(Me,",")||Me.slice(0,-1)!==ye);Ie&&c(ye,",")&&ye.slice(0,-1)===Me&&(Ie=!1,Me+=","),Ie?(fe>1&&de>2&&(fe>4?(K+="\n".concat(p,"...").concat(v),ie=!0):fe>3&&(K+="\n  ".concat(ce[de-2]),Te++),K+="\n  ".concat(ce[de-1]),Te++),re=de,K+="\n".concat(f,"+").concat(v," ").concat(Me),X+="\n".concat(x,"-").concat(v," ").concat(ye),Te+=2):(K+=X,X="",1!==fe&&0!==de||(K+="\n  ".concat(Me),Te++))}if(Te>20&&de<ke-2)return"".concat(Q).concat(se,"\n").concat(K,"\n").concat(p,"...").concat(v).concat(X,"\n")+"".concat(p,"...").concat(v)}return"".concat(Q).concat(ie?se:"","\n").concat(K).concat(X).concat(ee).concat(he)}(U,z,P)));else if("notDeepStrictEqual"===P||"notStrictEqual"===P){var F=g[P],N=h(U).split("\n");if("notStrictEqual"===P&&"object"===n(U)&&null!==U&&(F=g.notStrictEqualObject),N.length>30)for(N[26]="".concat(p,"...").concat(v);N.length>27;)N.pop();L=T(this,1===N.length?r(u).call(this,"".concat(F," ").concat(N[0])):r(u).call(this,"".concat(F,"\n\n").concat(N.join("\n"),"\n")))}else{var B=h(U),j="",J=g[P];"notDeepEqual"===P||"notEqual"===P?(B="".concat(g[P],"\n\n").concat(B)).length>1024&&(B="".concat(B.slice(0,1021),"...")):(j="".concat(h(z)),B.length>512&&(B="".concat(B.slice(0,509),"...")),j.length>512&&(j="".concat(j.slice(0,509),"...")),"deepEqual"===P||"equal"===P?B="".concat(J,"\n\n").concat(B,"\n\nshould equal\n\n"):j=" ".concat(P," ").concat(j)),L=T(this,r(u).call(this,"".concat(B).concat(j)))}return Error.stackTraceLimit=H,L.generatedMessage=!C,Object.defineProperty(b(L),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),L.code="ERR_ASSERTION",L.actual=U,L.expected=z,L.operator=P,Error.captureStackTrace&&Error.captureStackTrace(b(L),I),L.name="AssertionError",T(L)}var _;return function(E,L){if("function"!=typeof L&&null!==L)throw new TypeError("Super expression must either be null or a function");E.prototype=Object.create(L&&L.prototype,{constructor:{value:E,writable:!0,configurable:!0}}),L&&o(E,L)}(u,w),_=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:i.custom,value:function(E,L){return i(this,function(C){for(var P=1;P<arguments.length;P++){var I=null!=arguments[P]?arguments[P]:{},U=Object.keys(I);"function"==typeof Object.getOwnPropertySymbols&&(U=U.concat(Object.getOwnPropertySymbols(I).filter(function(z){return Object.getOwnPropertyDescriptor(I,z).enumerable}))),U.forEach(function(z){A(C,z,I[z])})}return C}({},L,{customInspect:!1,depth:0}))}}],_&&function l(w,u){for(var S=0;S<u.length;S++){var _=u[S];_.enumerable=_.enumerable||!1,_.configurable=!0,"value"in _&&(_.writable=!0),Object.defineProperty(w,_.key,_)}}(u.prototype,_),u}(d(Error));$.exports=m},79616:function($,R,e){"use strict";function k(o){return(k="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(r){return typeof r}:function(r){return r&&"function"==typeof Symbol&&r.constructor===Symbol&&r!==Symbol.prototype?"symbol":typeof r})(o)}function A(o){return(A=Object.setPrototypeOf?Object.getPrototypeOf:function(r){return r.__proto__||Object.getPrototypeOf(r)})(o)}function l(o,r){return(l=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n})(o,r)}var T,b,d={};function s(o,r,n){n||(n=Error);var i=function(a){function c(p,f,x){var v,g,y,h;return function(g,y){if(!(g instanceof y))throw new TypeError("Cannot call a class as a function")}(this,c),(v=function(g,y){return!y||"object"!==k(y)&&"function"!=typeof y?function(h){if(void 0===h)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}(g):y}(this,A(c).call(this,(g=p,y=f,h=x,"string"==typeof r?r:r(g,y,h))))).code=o,v}return function(p,f){if("function"!=typeof f&&null!==f)throw new TypeError("Super expression must either be null or a function");p.prototype=Object.create(f&&f.prototype,{constructor:{value:p,writable:!0,configurable:!0}}),f&&l(p,f)}(c,a),c}(n);d[o]=i}function t(o,r){if(Array.isArray(o)){var n=o.length;return o=o.map(function(i){return String(i)}),n>2?"one of ".concat(r," ").concat(o.slice(0,n-1).join(", "),", or ")+o[n-1]:2===n?"one of ".concat(r," ").concat(o[0]," or ").concat(o[1]):"of ".concat(r," ").concat(o[0])}return"of ".concat(r," ").concat(String(o))}s("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),s("ERR_INVALID_ARG_TYPE",function(o,r,n){var i,c,p,f,v,y;if(void 0===T&&(T=e(32791)),T("string"==typeof o,"'name' must be a string"),"string"==typeof r&&("not ","not "===r.substr(0,4))?(i="must not be",r=r.replace(/^not /,"")):i="must be",v=o," argument",(void 0===y||y>v.length)&&(y=v.length)," argument"===v.substring(y-9,y))c="The ".concat(o," ").concat(i," ").concat(t(r,"type"));else{var x=("number"!=typeof f&&(f=0),f+1>(p=o).length||-1===p.indexOf(".",f)?"argument":"property");c='The "'.concat(o,'" ').concat(x," ").concat(i," ").concat(t(r,"type"))}return c+". Received type ".concat(k(n))},TypeError),s("ERR_INVALID_ARG_VALUE",function(o,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===b&&(b=e(43827));var i=b.inspect(r);return i.length>128&&(i="".concat(i.slice(0,128),"...")),"The argument '".concat(o,"' ").concat(n,". Received ").concat(i)},TypeError,RangeError),s("ERR_INVALID_RETURN_VALUE",function(o,r,n){var i;return i=n&&n.constructor&&n.constructor.name?"instance of ".concat(n.constructor.name):"type ".concat(k(n)),"Expected ".concat(o,' to be returned from the "').concat(r,'"')+" function but got ".concat(i,".")},TypeError),s("ERR_MISSING_ARGS",function(){for(var o=arguments.length,r=new Array(o),n=0;n<o;n++)r[n]=arguments[n];void 0===T&&(T=e(32791)),T(r.length>0,"At least one arg needs to be specified");var i="The ",a=r.length;switch(r=r.map(function(c){return'"'.concat(c,'"')}),a){case 1:i+="".concat(r[0]," argument");break;case 2:i+="".concat(r[0]," and ").concat(r[1]," arguments");break;default:i+=r.slice(0,a-1).join(", "),i+=", and ".concat(r[a-1]," arguments")}return"".concat(i," must be specified")},TypeError),$.exports.codes=d},74061:function($,R,e){"use strict";function k(V,W){return function(X){if(Array.isArray(X))return X}(V)||function(X,K){var re=[],ee=!0,ie=!1,oe=void 0;try{for(var ce,me=X[Symbol.iterator]();!(ee=(ce=me.next()).done)&&(re.push(ce.value),!K||re.length!==K);ee=!0);}catch(de){ie=!0,oe=de}finally{try{ee||null==me.return||me.return()}finally{if(ie)throw oe}}return re}(V,W)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function A(V){return(A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(W){return typeof W}:function(W){return W&&"function"==typeof Symbol&&W.constructor===Symbol&&W!==Symbol.prototype?"symbol":typeof W})(V)}var l=void 0!==/a/g.flags,T=function(V){var W=[];return V.forEach(function(X){return W.push(X)}),W},b=function(V){var W=[];return V.forEach(function(X,K){return W.push([K,X])}),W},d=Object.is?Object.is:e(64003),s=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},t=Number.isNaN?Number.isNaN:e(15567);function o(V){return V.call.bind(V)}var r=o(Object.prototype.hasOwnProperty),n=o(Object.prototype.propertyIsEnumerable),i=o(Object.prototype.toString),a=e(43827).types,c=a.isAnyArrayBuffer,p=a.isArrayBufferView,f=a.isDate,x=a.isMap,v=a.isRegExp,g=a.isSet,y=a.isNativeError,h=a.isBoxedPrimitive,m=a.isNumberObject,w=a.isStringObject,u=a.isBooleanObject,S=a.isBigIntObject,_=a.isSymbolObject,E=a.isFloat32Array,L=a.isFloat64Array;function C(V){if(0===V.length||V.length>10)return!0;for(var W=0;W<V.length;W++){var X=V.charCodeAt(W);if(X<48||X>57)return!0}return 10===V.length&&V>=Math.pow(2,32)}function P(V){return Object.keys(V).filter(C).concat(s(V).filter(Object.prototype.propertyIsEnumerable.bind(V)))}function I(V,W){if(V===W)return 0;for(var X=V.length,K=W.length,re=0,ee=Math.min(X,K);re<ee;++re)if(V[re]!==W[re]){X=V[re],K=W[re];break}return X<K?-1:K<X?1:0}function U(V,W,X,K){if(V===W)return 0!==V||!X||d(V,W);if(X){if("object"!==A(V))return"number"==typeof V&&t(V)&&t(W);if("object"!==A(W)||null===V||null===W||Object.getPrototypeOf(V)!==Object.getPrototypeOf(W))return!1}else{if(null===V||"object"!==A(V))return(null===W||"object"!==A(W))&&V==W;if(null===W||"object"!==A(W))return!1}var re,ee,ie,oe,Pe,xe,ce=i(V);if(ce!==i(W))return!1;if(Array.isArray(V)){if(V.length!==W.length)return!1;var me=P(V),de=P(W);return me.length===de.length&&H(V,W,X,K,1,me)}if("[object Object]"===ce&&(!x(V)&&x(W)||!g(V)&&g(W)))return!1;if(f(V)){if(!f(W)||Date.prototype.getTime.call(V)!==Date.prototype.getTime.call(W))return!1}else if(v(V)){if(!v(W)||(ie=V,oe=W,!(l?ie.source===oe.source&&ie.flags===oe.flags:RegExp.prototype.toString.call(ie)===RegExp.prototype.toString.call(oe))))return!1}else if(y(V)||V instanceof Error){if(V.message!==W.message||V.name!==W.name)return!1}else{if(p(V)){if(X||!E(V)&&!L(V)){if((Pe=V).byteLength!==(xe=W).byteLength||0!==I(new Uint8Array(Pe.buffer,Pe.byteOffset,Pe.byteLength),new Uint8Array(xe.buffer,xe.byteOffset,xe.byteLength)))return!1}else if(!function(Pe,xe){if(Pe.byteLength!==xe.byteLength)return!1;for(var ke=0;ke<Pe.byteLength;ke++)if(Pe[ke]!==xe[ke])return!1;return!0}(V,W))return!1;var he=P(V),ve=P(W);return he.length===ve.length&&H(V,W,X,K,0,he)}if(g(V))return!(!g(W)||V.size!==W.size)&&H(V,W,X,K,2);if(x(V))return!(!x(W)||V.size!==W.size)&&H(V,W,X,K,3);if(c(V)){if((re=V).byteLength!==(ee=W).byteLength||0!==I(new Uint8Array(re),new Uint8Array(ee)))return!1}else if(h(V)&&!function(Pe,xe){return m(Pe)?m(xe)&&d(Number.prototype.valueOf.call(Pe),Number.prototype.valueOf.call(xe)):w(Pe)?w(xe)&&String.prototype.valueOf.call(Pe)===String.prototype.valueOf.call(xe):u(Pe)?u(xe)&&Boolean.prototype.valueOf.call(Pe)===Boolean.prototype.valueOf.call(xe):S(Pe)?S(xe)&&BigInt.prototype.valueOf.call(Pe)===BigInt.prototype.valueOf.call(xe):_(xe)&&Symbol.prototype.valueOf.call(Pe)===Symbol.prototype.valueOf.call(xe)}(V,W))return!1}return H(V,W,X,K,0)}function z(V,W){return W.filter(function(X){return n(V,X)})}function H(V,W,X,K,re,ee){if(5===arguments.length){ee=Object.keys(V);var ie=Object.keys(W);if(ee.length!==ie.length)return!1}for(var oe=0;oe<ee.length;oe++)if(!r(W,ee[oe]))return!1;if(X&&5===arguments.length){var ce=s(V);if(0!==ce.length){var me=0;for(oe=0;oe<ce.length;oe++){var de=ce[oe];if(n(V,de)){if(!n(W,de))return!1;ee.push(de),me++}else if(n(W,de))return!1}var he=s(W);if(ce.length!==he.length&&z(W,he).length!==me)return!1}else{var ve=s(W);if(0!==ve.length&&0!==z(W,ve).length)return!1}}if(0===ee.length&&(0===re||1===re&&0===V.length||0===V.size))return!0;if(void 0===K)K={val1:new Map,val2:new Map,position:0};else{var Pe=K.val1.get(V);if(void 0!==Pe){var xe=K.val2.get(W);if(void 0!==xe)return Pe===xe}K.position++}K.val1.set(V,K.position),K.val2.set(W,K.position);var ke=function G(V,W,X,K,re,ee){var ie=0;if(2===ee){if(!function(de,he,ve,Pe){for(var xe=null,ke=T(de),Ae=0;Ae<ke.length;Ae++){var Te=ke[Ae];if("object"===A(Te)&&null!==Te)null===xe&&(xe=new Set),xe.add(Te);else if(!he.has(Te)){if(ve||!B(de,he,Te))return!1;null===xe&&(xe=new Set),xe.add(Te)}}if(null!==xe){for(var Q=T(he),se=0;se<Q.length;se++){var fe=Q[se];if("object"===A(fe)&&null!==fe){if(!F(xe,fe,ve,Pe))return!1}else if(!ve&&!de.has(fe)&&!F(xe,fe,ve,Pe))return!1}return 0===xe.size}return!0}(V,W,X,re))return!1}else if(3===ee){if(!function(de,he,ve,Pe){for(var xe=null,ke=b(de),Ae=0;Ae<ke.length;Ae++){var Te=k(ke[Ae],2),Q=Te[0],se=Te[1];if("object"===A(Q)&&null!==Q)null===xe&&(xe=new Set),xe.add(Q);else{var fe=he.get(Q);if(void 0===fe&&!he.has(Q)||!U(se,fe,ve,Pe)){if(ve||!j(de,he,Q,se,Pe))return!1;null===xe&&(xe=new Set),xe.add(Q)}}}if(null!==xe){for(var ye=b(he),Me=0;Me<ye.length;Me++){var Ie=k(ye[Me],2),Ce=(Q=Ie[0],Ie[1]);if("object"===A(Q)&&null!==Q){if(!J(xe,de,Q,Ce,ve,Pe))return!1}else if(!(ve||de.has(Q)&&U(de.get(Q),Ce,!1,Pe)||J(xe,de,Q,Ce,!1,Pe)))return!1}return 0===xe.size}return!0}(V,W,X,re))return!1}else if(1===ee)for(;ie<V.length;ie++){if(!r(V,ie)){if(r(W,ie))return!1;for(var oe=Object.keys(V);ie<oe.length;ie++){var ce=oe[ie];if(!r(W,ce)||!U(V[ce],W[ce],X,re))return!1}return oe.length===Object.keys(W).length}if(!r(W,ie)||!U(V[ie],W[ie],X,re))return!1}for(ie=0;ie<K.length;ie++){var me=K[ie];if(!U(V[me],W[me],X,re))return!1}return!0}(V,W,X,ee,K,re);return K.val1.delete(V),K.val2.delete(W),ke}function F(V,W,X,K){for(var re=T(V),ee=0;ee<re.length;ee++){var ie=re[ee];if(U(W,ie,X,K))return V.delete(ie),!0}return!1}function N(V){switch(A(V)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":V=+V;case"number":if(t(V))return!1}return!0}function B(V,W,X){var K=N(X);return K??(W.has(K)&&!V.has(K))}function j(V,W,X,K,re){var ee=N(X);if(null!=ee)return ee;var ie=W.get(ee);return!(void 0===ie&&!W.has(ee)||!U(K,ie,!1,re))&&!V.has(ee)&&U(K,ie,!1,re)}function J(V,W,X,K,re,ee){for(var ie=T(V),oe=0;oe<ie.length;oe++){var ce=ie[oe];if(U(X,ce,re,ee)&&U(K,W.get(ce),re,ee))return V.delete(ce),!0}return!1}$.exports={isDeepEqual:function(V,W){return U(V,W,!1)},isDeepStrictEqual:function(V,W){return U(V,W,!0)}}},95341:function($,R){"use strict";R.byteLength=function(t){var o=d(t),n=o[1];return 3*(o[0]+n)/4-n},R.toByteArray=function(t){var o,r,g,n=d(t),i=n[0],a=n[1],c=new A(3*(i+(g=a))/4-g),p=0,f=a>0?i-4:i;for(r=0;r<f;r+=4)o=k[t.charCodeAt(r)]<<18|k[t.charCodeAt(r+1)]<<12|k[t.charCodeAt(r+2)]<<6|k[t.charCodeAt(r+3)],c[p++]=o>>16&255,c[p++]=o>>8&255,c[p++]=255&o;return 2===a&&(o=k[t.charCodeAt(r)]<<2|k[t.charCodeAt(r+1)]>>4,c[p++]=255&o),1===a&&(o=k[t.charCodeAt(r)]<<10|k[t.charCodeAt(r+1)]<<4|k[t.charCodeAt(r+2)]>>2,c[p++]=o>>8&255,c[p++]=255&o),c},R.fromByteArray=function(t){for(var o,r=t.length,n=r%3,i=[],a=16383,c=0,p=r-n;c<p;c+=a)i.push(s(t,c,c+a>p?p:c+a));return 1===n?i.push(e[(o=t[r-1])>>2]+e[o<<4&63]+"=="):2===n&&i.push(e[(o=(t[r-2]<<8)+t[r-1])>>10]+e[o>>4&63]+e[o<<2&63]+"="),i.join("")};for(var e=[],k=[],A=typeof Uint8Array<"u"?Uint8Array:Array,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",T=0;T<64;++T)e[T]=l[T],k[l.charCodeAt(T)]=T;function d(t){var o=t.length;if(o%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=t.indexOf("=");return-1===r&&(r=o),[r,r===o?0:4-r%4]}function s(t,o,r){for(var i,a=[],c=o;c<r;c+=3)a.push(e[(i=(t[c]<<16&16711680)+(t[c+1]<<8&65280)+(255&t[c+2]))>>18&63]+e[i>>12&63]+e[i>>6&63]+e[63&i]);return a.join("")}k["-".charCodeAt(0)]=62,k["_".charCodeAt(0)]=63},91358:function($){"use strict";function R(b,d,s,t,o){for(var r=o+1;t<=o;){var n=t+o>>>1,i=b[n];(void 0!==s?s(i,d):i-d)>=0?(r=n,o=n-1):t=n+1}return r}function e(b,d,s,t,o){for(var r=o+1;t<=o;){var n=t+o>>>1,i=b[n];(void 0!==s?s(i,d):i-d)>0?(r=n,o=n-1):t=n+1}return r}function k(b,d,s,t,o){for(var r=t-1;t<=o;){var n=t+o>>>1,i=b[n];(void 0!==s?s(i,d):i-d)<0?(r=n,t=n+1):o=n-1}return r}function A(b,d,s,t,o){for(var r=t-1;t<=o;){var n=t+o>>>1,i=b[n];(void 0!==s?s(i,d):i-d)<=0?(r=n,t=n+1):o=n-1}return r}function l(b,d,s,t,o){for(;t<=o;){var r=t+o>>>1,n=b[r],i=void 0!==s?s(n,d):n-d;if(0===i)return r;i<=0?t=r+1:o=r-1}return-1}function T(b,d,s,t,o,r){return"function"==typeof s?r(b,d,s,void 0===t?0:0|t,void 0===o?b.length-1:0|o):r(b,d,void 0,void 0===s?0:0|s,void 0===t?b.length-1:0|t)}$.exports={ge:function(b,d,s,t,o){return T(b,d,s,t,o,R)},gt:function(b,d,s,t,o){return T(b,d,s,t,o,e)},lt:function(b,d,s,t,o){return T(b,d,s,t,o,k)},le:function(b,d,s,t,o){return T(b,d,s,t,o,A)},eq:function(b,d,s,t,o){return T(b,d,s,t,o,l)}}},13547:function($,R){"use strict";function e(A){var l=32;return(A&=-A)&&l--,65535&A&&(l-=16),16711935&A&&(l-=8),252645135&A&&(l-=4),858993459&A&&(l-=2),1431655765&A&&(l-=1),l}R.INT_BITS=32,R.INT_MAX=2147483647,R.INT_MIN=-2147483648,R.sign=function(A){return(A>0)-(A<0)},R.abs=function(A){var l=A>>31;return(A^l)-l},R.min=function(A,l){return l^(A^l)&-(A<l)},R.max=function(A,l){return A^(A^l)&-(A<l)},R.isPow2=function(A){return!(A&A-1||!A)},R.log2=function(A){var l,T;return l=(A>65535)<<4,l|=T=((A>>>=l)>255)<<3,l|=T=((A>>>=T)>15)<<2,(l|=T=((A>>>=T)>3)<<1)|(A>>>=T)>>1},R.log10=function(A){return A>=1e9?9:A>=1e8?8:A>=1e7?7:A>=1e6?6:A>=1e5?5:A>=1e4?4:A>=1e3?3:A>=100?2:A>=10?1:0},R.popCount=function(A){return 16843009*((A=(858993459&(A-=A>>>1&1431655765))+(A>>>2&858993459))+(A>>>4)&252645135)>>>24},R.countTrailingZeros=e,R.nextPow2=function(A){return A+=0===A,--A,A|=A>>>1,A|=A>>>2,A|=A>>>4,1+((A|=A>>>8)|A>>>16)},R.prevPow2=function(A){return A|=A>>>1,A|=A>>>2,A|=A>>>4,A|=A>>>8,(A|=A>>>16)-(A>>>1)},R.parity=function(A){return A^=A>>>16,A^=A>>>8,A^=A>>>4,27030>>>(A&=15)&1};var k=new Array(256);(function(A){for(var l=0;l<256;++l){var T=l,b=l,d=7;for(T>>>=1;T;T>>>=1)b<<=1,b|=1&T,--d;A[l]=b<<d&255}})(k),R.reverse=function(A){return k[255&A]<<24|k[A>>>8&255]<<16|k[A>>>16&255]<<8|k[A>>>24&255]},R.interleave2=function(A,l){return(A=1431655765&((A=858993459&((A=252645135&((A=16711935&((A&=65535)|A<<8))|A<<4))|A<<2))|A<<1))|(l=1431655765&((l=858993459&((l=252645135&((l=16711935&((l&=65535)|l<<8))|l<<4))|l<<2))|l<<1))<<1},R.deinterleave2=function(A,l){return(A=65535&((A=16711935&((A=252645135&((A=858993459&((A=A>>>l&1431655765)|A>>>1))|A>>>2))|A>>>4))|A>>>16))<<16>>16},R.interleave3=function(A,l,T){return A=1227133513&((A=3272356035&((A=251719695&((A=4278190335&((A&=1023)|A<<16))|A<<8))|A<<4))|A<<2),(A|=(l=1227133513&((l=3272356035&((l=251719695&((l=4278190335&((l&=1023)|l<<16))|l<<8))|l<<4))|l<<2))<<1)|(T=1227133513&((T=3272356035&((T=251719695&((T=4278190335&((T&=1023)|T<<16))|T<<8))|T<<4))|T<<2))<<2},R.deinterleave3=function(A,l){return(A=1023&((A=4278190335&((A=251719695&((A=3272356035&((A=A>>>l&1227133513)|A>>>2))|A>>>4))|A>>>8))|A>>>16))<<22>>22},R.nextCombination=function(A){var l=A|A-1;return l+1|(~l&-~l)-1>>>e(A)+1}},44781:function($,R,e){"use strict";var k=e(53435);$.exports=function(b,d){d||(d={});var s,t,o,r,n,i,c,f,x,v=null==d.cutoff?.25:d.cutoff,g=null==d.radius?8:d.radius,y=d.channel||0;if(ArrayBuffer.isView(b)||Array.isArray(b)){if(!d.width||!d.height)throw Error("For raw data width and height should be provided by options");s=d.width,t=d.height,r=b,i=d.stride?d.stride:Math.floor(b.length/s/t)}else window.HTMLCanvasElement&&b instanceof window.HTMLCanvasElement?(r=(c=b).getContext("2d").getImageData(0,0,s=c.width,t=c.height).data,i=4):window.CanvasRenderingContext2D&&b instanceof window.CanvasRenderingContext2D?(s=(c=b.canvas).width,r=b.getImageData(0,0,s,t=c.height).data,i=4):window.ImageData&&b instanceof window.ImageData&&(s=b.width,t=b.height,r=b.data,i=4);if(o=Math.max(s,t),window.Uint8ClampedArray&&r instanceof window.Uint8ClampedArray||window.Uint8Array&&r instanceof window.Uint8Array)for(n=r,r=Array(s*t),f=0,x=n.length;f<x;f++)r[f]=n[f*i+y]/255;else if(1!==i)throw Error("Raw data can have only 1 value per pixel");var h=Array(s*t),m=Array(s*t),w=Array(o),u=Array(o),S=Array(o+1),_=Array(o);for(f=0,x=s*t;f<x;f++){var E=r[f];h[f]=1===E?0:0===E?A:Math.pow(Math.max(0,.5-E),2),m[f]=1===E?A:0===E?0:Math.pow(Math.max(0,E-.5),2)}l(h,s,t,w,u,_,S),l(m,s,t,w,u,_,S);var L=window.Float32Array?new Float32Array(s*t):new Array(s*t);for(f=0,x=s*t;f<x;f++)L[f]=k(1-((h[f]-m[f])/g+v),0,1);return L};var A=1e20;function l(b,d,s,t,o,r,n){for(var i=0;i<d;i++){for(var a=0;a<s;a++)t[a]=b[a*d+i];for(T(t,o,r,n,s),a=0;a<s;a++)b[a*d+i]=o[a]}for(a=0;a<s;a++){for(i=0;i<d;i++)t[i]=b[a*d+i];for(T(t,o,r,n,d),i=0;i<d;i++)b[a*d+i]=Math.sqrt(o[i])}}function T(b,d,s,t,o){s[0]=0,t[0]=-A,t[1]=+A;for(var r=1,n=0;r<o;r++){for(var i=(b[r]+r*r-(b[s[n]]+s[n]*s[n]))/(2*r-2*s[n]);i<=t[n];)n--,i=(b[r]+r*r-(b[s[n]]+s[n]*s[n]))/(2*r-2*s[n]);s[++n]=r,t[n]=i,t[n+1]=+A}for(r=0,n=0;r<o;r++){for(;t[n+1]<r;)n++;d[r]=(r-s[n])*(r-s[n])+b[s[n]]}}},68222:function($,R,e){"use strict";var k=e(77575),A=e(68318),l=A("%Function.prototype.apply%"),T=A("%Function.prototype.call%"),b=A("%Reflect.apply%",!0)||k.call(T,l),d=A("%Object.defineProperty%",!0);if(d)try{d({},"a",{value:1})}catch{d=null}$.exports=function(){return b(k,T,arguments)};var s=function(){return b(k,l,arguments)};d?d($.exports,"apply",{value:s}):$.exports.apply=s},53435:function($){$.exports=function(R,e,k){return e<k?R<e?e:R>k?k:R:R<k?k:R>e?e:R}},6475:function($,R,e){"use strict";var k=e(53435);function A(l,T){null==T&&(T=!0);var b=l[0],d=l[1],s=l[2],t=l[3];return null==t&&(t=T?1:255),T&&(b*=255,d*=255,s*=255,t*=255),16777216*(b=255&k(b,0,255))+((d=255&k(d,0,255))<<16)+((s=255&k(s,0,255))<<8)+(255&k(t,0,255))}$.exports=A,$.exports.to=A,$.exports.from=function(l,T){var b=(l=+l)>>>24,d=(16711680&l)>>>16,s=(65280&l)>>>8,t=255&l;return!1===T?[b,d,s,t]:[b/255,d/255,s/255,t/255]}},76857:function($){"use strict";$.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]}},25075:function($,R,e){"use strict";var k=e(36652),A=e(53435),l=e(90660);$.exports=function(T,b){"float"!==b&&b||(b="array"),"uint"===b&&(b="uint8"),"uint_clamped"===b&&(b="uint8_clamped");var t,d=new(l(b))(4),s="uint8"!==b&&"uint8_clamped"!==b;return T.length&&"string"!=typeof T||((T=k(T))[0]/=255,T[1]/=255,T[2]/=255),(t=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)?(d[0]=T[0],d[1]=T[1],d[2]=T[2],d[3]=null!=T[3]?T[3]:255,s&&(d[0]/=255,d[1]/=255,d[2]/=255,d[3]/=255),d):(s?(d[0]=T[0],d[1]=T[1],d[2]=T[2],d[3]=null!=T[3]?T[3]:1):(d[0]=A(Math.floor(255*T[0]),0,255),d[1]=A(Math.floor(255*T[1]),0,255),d[2]=A(Math.floor(255*T[2]),0,255),d[3]=null==T[3]?255:A(Math.floor(255*T[3]),0,255)),d)}},90736:function($,R,e){"use strict";var k=e(76857),A=e(10973),l=e(46775);$.exports=function(b){var d,s,t=[],o=1;if("string"==typeof b)if(k[b])t=k[b].slice(),s="rgb";else if("transparent"===b)o=0,s="rgb",t=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(b)){var r=(a=b.slice(1)).length;o=1,r<=4?(t=[parseInt(a[0]+a[0],16),parseInt(a[1]+a[1],16),parseInt(a[2]+a[2],16)],4===r&&(o=parseInt(a[3]+a[3],16)/255)):(t=[parseInt(a[0]+a[1],16),parseInt(a[2]+a[3],16),parseInt(a[4]+a[5],16)],8===r&&(o=parseInt(a[6]+a[7],16)/255)),t[0]||(t[0]=0),t[1]||(t[1]=0),t[2]||(t[2]=0),s="rgb"}else if(d=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(b)){var n=d[1],i="rgb"===n,a=n.replace(/a$/,"");s=a,r="cmyk"===a?4:"gray"===a?1:3,t=d[2].trim().split(/\s*,\s*/).map(function(p,f){if(/%$/.test(p))return f===r?parseFloat(p)/100:"rgb"===a?255*parseFloat(p)/100:parseFloat(p);if("h"===a[f]){if(/deg$/.test(p))return parseFloat(p);if(void 0!==T[p])return T[p]}return parseFloat(p)}),n===a&&t.push(1),o=i||void 0===t[r]?1:t[r],t=t.slice(0,r)}else b.length>10&&/[0-9](?:\s|\/)/.test(b)&&(t=b.match(/([0-9]+)/g).map(function(p){return parseFloat(p)}),s=b.match(/([a-z])/gi).join("").toLowerCase());else if(isNaN(b))if(A(b)){var c=l(b.r,b.red,b.R,null);null!==c?(s="rgb",t=[c,l(b.g,b.green,b.G),l(b.b,b.blue,b.B)]):(s="hsl",t=[l(b.h,b.hue,b.H),l(b.s,b.saturation,b.S),l(b.l,b.lightness,b.L,b.b,b.brightness)]),o=l(b.a,b.alpha,b.opacity,1),null!=b.opacity&&(o/=100)}else(Array.isArray(b)||e.g.ArrayBuffer&&ArrayBuffer.isView&&ArrayBuffer.isView(b))&&(t=[b[0],b[1],b[2]],s="rgb",o=4===b.length?b[3]:1);else s="rgb",t=[b>>>16,(65280&b)>>>8,255&b];return{space:s,values:t,alpha:o}};var T={red:0,orange:60,yellow:120,green:180,blue:240,purple:300}},36652:function($,R,e){"use strict";var k=e(90736),A=e(80009),l=e(53435);$.exports=function(T){var b,d=k(T);return d.space?((b=Array(3))[0]=l(d.values[0],0,255),b[1]=l(d.values[1],0,255),b[2]=l(d.values[2],0,255),"h"===d.space[0]&&(b=A.rgb(b)),b.push(l(d.alpha,0,1)),b):[]}},80009:function($,R,e){"use strict";var k=e(6866);$.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(A){var l,T,b,d,s,t=A[0]/360,o=A[1]/100,r=A[2]/100;if(0===o)return[s=255*r,s,s];l=2*r-(T=r<.5?r*(1+o):r+o-r*o),d=[0,0,0];for(var n=0;n<3;n++)(b=t+.3333333333333333*-(n-1))<0?b++:b>1&&b--,d[n]=255*(s=6*b<1?l+6*(T-l)*b:2*b<1?T:3*b<2?l+(T-l)*(.6666666666666666-b)*6:l);return d}},k.hsl=function(A){var l,T,b=A[0]/255,d=A[1]/255,s=A[2]/255,t=Math.min(b,d,s),o=Math.max(b,d,s),r=o-t;return o===t?l=0:b===o?l=(d-s)/r:d===o?l=2+(s-b)/r:s===o&&(l=4+(b-d)/r),(l=Math.min(60*l,360))<0&&(l+=360),T=(t+o)/2,[l,100*(o===t?0:T<=.5?r/(o+t):r/(2-o-t)),100*T]}},6866:function($){"use strict";$.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},24138:function($){$.exports={AFG:"afghan",ALA:"\\b\\wland",ALB:"albania",DZA:"algeria",ASM:"^(?=.*americ).*samoa",AND:"andorra",AGO:"angola",AIA:"anguill?a",ATA:"antarctica",ATG:"antigua",ARG:"argentin",ARM:"armenia",ABW:"^(?!.*bonaire).*\\baruba",AUS:"australia",AUT:"^(?!.*hungary).*austria|\\baustri.*\\bemp",AZE:"azerbaijan",BHS:"bahamas",BHR:"bahrain",BGD:"bangladesh|^(?=.*east).*paki?stan",BRB:"barbados",BLR:"belarus|byelo",BEL:"^(?!.*luxem).*belgium",BLZ:"belize|^(?=.*british).*honduras",BEN:"benin|dahome",BMU:"bermuda",BTN:"bhutan",BOL:"bolivia",BES:"^(?=.*bonaire).*eustatius|^(?=.*carib).*netherlands|\\bbes.?islands",BIH:"herzegovina|bosnia",BWA:"botswana|bechuana",BVT:"bouvet",BRA:"brazil",IOT:"british.?indian.?ocean",BRN:"brunei",BGR:"bulgaria",BFA:"burkina|\\bfaso|upper.?volta",BDI:"burundi",CPV:"verde",KHM:"cambodia|kampuchea|khmer",CMR:"cameroon",CAN:"canada",CYM:"cayman",CAF:"\\bcentral.african.republic",TCD:"\\bchad",CHL:"\\bchile",CHN:"^(?!.*\\bmac)(?!.*\\bhong)(?!.*\\btai)(?!.*\\brep).*china|^(?=.*peo)(?=.*rep).*china",CXR:"christmas",CCK:"\\bcocos|keeling",COL:"colombia",COM:"comoro",COG:"^(?!.*\\bdem)(?!.*\\bd[\\.]?r)(?!.*kinshasa)(?!.*zaire)(?!.*belg)(?!.*l.opoldville)(?!.*free).*\\bcongo",COK:"\\bcook",CRI:"costa.?rica",CIV:"ivoire|ivory",HRV:"croatia",CUB:"\\bcuba",CUW:"^(?!.*bonaire).*\\bcura(c|\xe7)ao",CYP:"cyprus",CSK:"czechoslovakia",CZE:"^(?=.*rep).*czech|czechia|bohemia",COD:"\\bdem.*congo|congo.*\\bdem|congo.*\\bd[\\.]?r|\\bd[\\.]?r.*congo|belgian.?congo|congo.?free.?state|kinshasa|zaire|l.opoldville|drc|droc|rdc",DNK:"denmark",DJI:"djibouti",DMA:"dominica(?!n)",DOM:"dominican.rep",ECU:"ecuador",EGY:"egypt",SLV:"el.?salvador",GNQ:"guine.*eq|eq.*guine|^(?=.*span).*guinea",ERI:"eritrea",EST:"estonia",ETH:"ethiopia|abyssinia",FLK:"falkland|malvinas",FRO:"faroe|faeroe",FJI:"fiji",FIN:"finland",FRA:"^(?!.*\\bdep)(?!.*martinique).*france|french.?republic|\\bgaul",GUF:"^(?=.*french).*guiana",PYF:"french.?polynesia|tahiti",ATF:"french.?southern",GAB:"gabon",GMB:"gambia",GEO:"^(?!.*south).*georgia",DDR:"german.?democratic.?republic|democratic.?republic.*germany|east.germany",DEU:"^(?!.*east).*germany|^(?=.*\\bfed.*\\brep).*german",GHA:"ghana|gold.?coast",GIB:"gibraltar",GRC:"greece|hellenic|hellas",GRL:"greenland",GRD:"grenada",GLP:"guadeloupe",GUM:"\\bguam",GTM:"guatemala",GGY:"guernsey",GIN:"^(?!.*eq)(?!.*span)(?!.*bissau)(?!.*portu)(?!.*new).*guinea",GNB:"bissau|^(?=.*portu).*guinea",GUY:"guyana|british.?guiana",HTI:"haiti",HMD:"heard.*mcdonald",VAT:"holy.?see|vatican|papal.?st",HND:"^(?!.*brit).*honduras",HKG:"hong.?kong",HUN:"^(?!.*austr).*hungary",ISL:"iceland",IND:"india(?!.*ocea)",IDN:"indonesia",IRN:"\\biran|persia",IRQ:"\\biraq|mesopotamia",IRL:"(^ireland)|(^republic.*ireland)",IMN:"^(?=.*isle).*\\bman",ISR:"israel",ITA:"italy",JAM:"jamaica",JPN:"japan",JEY:"jersey",JOR:"jordan",KAZ:"kazak",KEN:"kenya|british.?east.?africa|east.?africa.?prot",KIR:"kiribati",PRK:"^(?=.*democrat|people|north|d.*p.*.r).*\\bkorea|dprk|korea.*(d.*p.*r)",KWT:"kuwait",KGZ:"kyrgyz|kirghiz",LAO:"\\blaos?\\b",LVA:"latvia",LBN:"lebanon",LSO:"lesotho|basuto",LBR:"liberia",LBY:"libya",LIE:"liechtenstein",LTU:"lithuania",LUX:"^(?!.*belg).*luxem",MAC:"maca(o|u)",MDG:"madagascar|malagasy",MWI:"malawi|nyasa",MYS:"malaysia",MDV:"maldive",MLI:"\\bmali\\b",MLT:"\\bmalta",MHL:"marshall",MTQ:"martinique",MRT:"mauritania",MUS:"mauritius",MYT:"\\bmayotte",MEX:"\\bmexic",FSM:"fed.*micronesia|micronesia.*fed",MCO:"monaco",MNG:"mongolia",MNE:"^(?!.*serbia).*montenegro",MSR:"montserrat",MAR:"morocco|\\bmaroc",MOZ:"mozambique",MMR:"myanmar|burma",NAM:"namibia",NRU:"nauru",NPL:"nepal",NLD:"^(?!.*\\bant)(?!.*\\bcarib).*netherlands",ANT:"^(?=.*\\bant).*(nether|dutch)",NCL:"new.?caledonia",NZL:"new.?zealand",NIC:"nicaragua",NER:"\\bniger(?!ia)",NGA:"nigeria",NIU:"niue",NFK:"norfolk",MNP:"mariana",NOR:"norway",OMN:"\\boman|trucial",PAK:"^(?!.*east).*paki?stan",PLW:"palau",PSE:"palestin|\\bgaza|west.?bank",PAN:"panama",PNG:"papua|new.?guinea",PRY:"paraguay",PER:"peru",PHL:"philippines",PCN:"pitcairn",POL:"poland",PRT:"portugal",PRI:"puerto.?rico",QAT:"qatar",KOR:"^(?!.*d.*p.*r)(?!.*democrat)(?!.*people)(?!.*north).*\\bkorea(?!.*d.*p.*r)",MDA:"moldov|b(a|e)ssarabia",REU:"r(e|\xe9)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|\xe9)lemy",SHN:"helena",KNA:"kitts|\\bnevis",LCA:"\\blucia",MAF:"^(?=.*collectivity).*martin|^(?=.*france).*martin(?!ique)|^(?=.*french).*martin(?!ique)",SPM:"miquelon",VCT:"vincent",WSM:"^(?!.*amer).*samoa",SMR:"san.?marino",STP:"\\bs(a|\xe3)o.?tom(e|\xe9)",SAU:"\\bsa\\w*.?arabia",SEN:"senegal",SRB:"^(?!.*monte).*serbia",SYC:"seychell",SLE:"sierra",SGP:"singapore",SXM:"^(?!.*martin)(?!.*saba).*maarten",SVK:"^(?!.*cze).*slovak",SVN:"slovenia",SLB:"solomon",SOM:"somali",ZAF:"south.africa|s\\\\..?africa",SGS:"south.?georgia|sandwich",SSD:"\\bs\\w*.?sudan",ESP:"spain",LKA:"sri.?lanka|ceylon",SDN:"^(?!.*\\bs(?!u)).*sudan",SUR:"surinam|dutch.?guiana",SJM:"svalbard",SWZ:"swaziland",SWE:"sweden",CHE:"switz|swiss",SYR:"syria",TWN:"taiwan|taipei|formosa|^(?!.*peo)(?=.*rep).*china",TJK:"tajik",THA:"thailand|\\bsiam",MKD:"macedonia|fyrom",TLS:"^(?=.*leste).*timor|^(?=.*east).*timor",TGO:"togo",TKL:"tokelau",TON:"tonga",TTO:"trinidad|tobago",TUN:"tunisia",TUR:"turkey",TKM:"turkmen",TCA:"turks",TUV:"tuvalu",UGA:"uganda",UKR:"ukrain",ARE:"emirates|^u\\.?a\\.?e\\.?$|united.?arab.?em",GBR:"united.?kingdom|britain|^u\\.?k\\.?$",TZA:"tanzania",USA:"united.?states\\b(?!.*islands)|\\bu\\.?s\\.?a\\.?\\b|^\\s*u\\.?s\\.?\\b(?!.*islands)",UMI:"minor.?outlying.?is",URY:"uruguay",UZB:"uzbek",VUT:"vanuatu|new.?hebrides",VEN:"venezuela",VNM:"^(?!.*republic).*viet.?nam|^(?=.*socialist).*viet.?nam",VGB:"^(?=.*\\bu\\.?\\s?k).*virgin|^(?=.*brit).*virgin|^(?=.*kingdom).*virgin",VIR:"^(?=.*\\bu\\.?\\s?s).*virgin|^(?=.*states).*virgin",WLF:"futuna|wallis",ESH:"western.sahara",YEM:"^(?!.*arab)(?!.*north)(?!.*sana)(?!.*peo)(?!.*dem)(?!.*south)(?!.*aden)(?!.*\\bp\\.?d\\.?r).*yemen",YMD:"^(?=.*peo).*yemen|^(?!.*rep)(?=.*dem).*yemen|^(?=.*south).*yemen|^(?=.*aden).*yemen|^(?=.*\\bp\\.?d\\.?r).*yemen",YUG:"yugoslavia",ZMB:"zambia|northern.?rhodesia",EAZ:"zanzibar",ZWE:"zimbabwe|^(?!.*northern).*rhodesia"}},72791:function($,R,e){"use strict";$.exports={parse:e(41004),stringify:e(53313)}},63625:function($,R,e){"use strict";var k=e(40402);$.exports={isSize:function(A){return/^[\d\.]/.test(A)||-1!==A.indexOf("/")||-1!==k.indexOf(A)}}},41004:function($,R,e){"use strict";var k=e(90448),A=e(38732),l=e(41901),T=e(15659),b=e(96209),d=e(83794),s=e(99011),t=e(63625).isSize;$.exports=r;var o=r.cache={};function r(i){if("string"!=typeof i)throw new Error("Font argument must be a string.");if(o[i])return o[i];if(""===i)throw new Error("Cannot parse an empty string.");if(-1!==l.indexOf(i))return o[i]={system:i};for(var a,c={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},p=s(i,/\s+/);a=p.shift();){if(-1!==A.indexOf(a))return["style","variant","weight","stretch"].forEach(function(x){c[x]=a}),o[i]=c;if(-1===b.indexOf(a))if("normal"!==a&&"small-caps"!==a)if(-1===d.indexOf(a)){if(-1===T.indexOf(a)){if(t(a)){var f=s(a,"/");if(c.size=f[0],null!=f[1]?c.lineHeight=n(f[1]):"/"===p[0]&&(p.shift(),c.lineHeight=n(p.shift())),!p.length)throw new Error("Missing required font-family.");return c.family=s(p.join(" "),/\s*,\s*/).map(k),o[i]=c}throw new Error("Unknown or unsupported font token: "+a)}c.weight=a}else c.stretch=a;else c.variant=a;else c.style=a}throw new Error("Missing required font-size.")}function n(i){var a=parseFloat(i);return a.toString()===i?a:i}},53313:function($,R,e){"use strict";var k=e(71299),A=e(63625).isSize,l=i(e(38732)),T=i(e(41901)),b=i(e(15659)),d=i(e(96209)),s=i(e(83794)),t={normal:1,"small-caps":1},o={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},r="serif";function n(a,c){if(a&&!c[a]&&!l[a])throw Error("Unknown keyword `"+a+"`");return a}function i(a){for(var c={},p=0;p<a.length;p++)c[a[p]]=1;return c}$.exports=function(a){if((a=k(a,{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 a.system&&n(a.system,T),a.system;if(n(a.style,d),n(a.variant,t),n(a.weight,b),n(a.stretch,s),null==a.size&&(a.size="1rem"),"number"==typeof a.size&&(a.size+="px"),!A)throw Error("Bad size value `"+a.size+"`");a.family||(a.family=r),Array.isArray(a.family)&&(a.family.length||(a.family=[r]),a.family=a.family.map(function(p){return o[p]?p:'"'+p+'"'}).join(", "));var c=[];return c.push(a.style),a.variant!==a.style&&c.push(a.variant),a.weight!==a.variant&&a.weight!==a.style&&c.push(a.weight),a.stretch!==a.weight&&a.stretch!==a.variant&&a.stretch!==a.style&&c.push(a.stretch),c.push(a.size+(null==a.lineHeight||"normal"===a.lineHeight||a.lineHeight+""=="1"?"":"/"+a.lineHeight)),c.push(a.family),c.filter(Boolean).join(" ")}},55174:function($,R,e){"use strict";var k,A=e(24582),l=e(10424),T=e(82527),b=e(19012),d=e(21780),s=e(16906),t=Function.prototype.bind,o=Object.defineProperty,r=Object.prototype.hasOwnProperty;k=function(n,i,a){var c,p=l(i)&&T(i.value);return delete(c=b(i)).writable,delete c.value,c.get=function(){return!a.overwriteDefinition&&r.call(this,n)?p:(i.value=t.call(p,a.resolveContext?a.resolveContext(this):this),o(this,n,i),this[n])},c},$.exports=function(n){var i=d(arguments[1]);return A(i.resolveContext)&&T(i.resolveContext),s(n,function(a,c){return k(c,a,i)})}},62072:function($,R,e){"use strict";var k=e(24582),A=e(84985),l=e(95879),T=e(21780),b=e(66741),d=$.exports=function(s,t){var o,r,n,i,a;return arguments.length<2||"string"!=typeof s?(i=t,t=s,s=null):i=arguments[2],k(s)?(o=b.call(s,"c"),r=b.call(s,"e"),n=b.call(s,"w")):(o=n=!0,r=!1),a={value:t,configurable:o,enumerable:r,writable:n},i?l(T(i),a):a};d.gs=function(s,t,o){var r,n,i,a;return"string"!=typeof s?(i=o,o=t,t=s,s=null):i=arguments[3],k(t)?A(t)?k(o)?A(o)||(i=o,o=void 0):o=void 0:(i=t,t=o=void 0):t=void 0,k(s)?(r=b.call(s,"c"),n=b.call(s,"e")):(r=!0,n=!1),a={get:t,set:o,configurable:r,enumerable:n},i?l(T(i),a):a}},33064:function($,R,e){"use strict";function k(i,a){return i<a?-1:i>a?1:i>=a?0:NaN}var A,l;function b(i,a){var c,p,f=i.length,x=-1;if(null==a){for(;++x<f;)if(null!=(c=i[x])&&c>=c)for(p=c;++x<f;)null!=(c=i[x])&&c>p&&(p=c)}else for(;++x<f;)if(null!=(c=a(i[x],x,i))&&c>=c)for(p=c;++x<f;)null!=(c=a(i[x],x,i))&&c>p&&(p=c);return p}function d(i){return null===i?NaN:+i}function s(i,a){var c,p=i.length,f=p,x=-1,v=0;if(null==a)for(;++x<p;)isNaN(c=d(i[x]))?--f:v+=c;else for(;++x<p;)isNaN(c=d(a(i[x],x,i)))?--f:v+=c;if(f)return v/f}function t(i){for(var a,c,p,f=i.length,x=-1,v=0;++x<f;)v+=i[x].length;for(c=new Array(v);--f>=0;)for(a=(p=i[f]).length;--a>=0;)c[--v]=p[a];return c}function o(i,a){var c,p,f=i.length,x=-1;if(null==a){for(;++x<f;)if(null!=(c=i[x])&&c>=c)for(p=c;++x<f;)null!=(c=i[x])&&p>c&&(p=c)}else for(;++x<f;)if(null!=(c=a(i[x],x,i))&&c>=c)for(p=c;++x<f;)null!=(c=a(i[x],x,i))&&p>c&&(p=c);return p}function r(i,a,c){i=+i,a=+a,c=(f=arguments.length)<2?(a=i,i=0,1):f<3?1:+c;for(var p=-1,f=0|Math.max(0,Math.ceil((a-i)/c)),x=new Array(f);++p<f;)x[p]=i+p*c;return x}function n(i,a){var c,p=i.length,f=-1,x=0;if(null==a)for(;++f<p;)(c=+i[f])&&(x+=c);else for(;++f<p;)(c=+a(i[f],f,i))&&(x+=c);return x}e.d(R,{j2:function(){return k},Fp:function(){return b},J6:function(){return s},TS:function(){return t},VV:function(){return o},w6:function(){return r},Sm:function(){return n}}),1===(A=k).length&&(l=A,A=function(i,a){return k(l(i),a)}),Math.sqrt(50),Math.sqrt(10),Math.sqrt(2)},15140:function($,R,e){"use strict";e.d(R,{UI:function(){return T},b1:function(){return b}});var k="$";function A(){}function l(i,a){var c=new A;if(i instanceof A)i.each(function(g,y){c.set(y,g)});else if(Array.isArray(i)){var p,f=-1,x=i.length;if(null==a)for(;++f<x;)c.set(f,i[f]);else for(;++f<x;)c.set(a(p=i[f],f,i),p)}else if(i)for(var v in i)c.set(v,i[v]);return c}A.prototype=l.prototype={constructor:A,has:function(i){return k+i in this},get:function(i){return this[k+i]},set:function(i,a){return this[k+i]=a,this},remove:function(i){var a=k+i;return a in this&&delete this[a]},clear:function(){for(var i in this)i[0]===k&&delete this[i]},keys:function(){var i=[];for(var a in this)a[0]===k&&i.push(a.slice(1));return i},values:function(){var i=[];for(var a in this)a[0]===k&&i.push(this[a]);return i},entries:function(){var i=[];for(var a in this)a[0]===k&&i.push({key:a.slice(1),value:this[a]});return i},size:function(){var i=0;for(var a in this)a[0]===k&&++i;return i},empty:function(){for(var i in this)if(i[0]===k)return!1;return!0},each:function(i){for(var a in this)a[0]===k&&i(this[a],a.slice(1),this)}};var T=l;function b(){var i,a,c,p=[],f=[];function x(g,y,h,m){if(y>=p.length)return null!=i&&g.sort(i),null!=a?a(g):g;for(var w,u,S,_=-1,E=g.length,L=p[y++],C=T(),P=h();++_<E;)(S=C.get(w=L(u=g[_])+""))?S.push(u):C.set(w,[u]);return C.each(function(I,U){m(P,U,x(I,y,h,m))}),P}function v(g,y){if(++y>p.length)return g;var h,m=f[y-1];return null!=a&&y>=p.length?h=g.entries():(h=[],g.each(function(w,u){h.push({key:u,values:v(w,y)})})),null!=m?h.sort(function(w,u){return m(w.key,u.key)}):h}return c={object:function(g){return x(g,0,d,s)},map:function(g){return x(g,0,t,o)},entries:function(g){return v(x(g,0,t,o),0)},key:function(g){return p.push(g),c},sortKeys:function(g){return f[p.length-1]=g,c},sortValues:function(g){return i=g,c},rollup:function(g){return a=g,c}}}function d(){return{}}function s(i,a,c){i[a]=c}function t(){return T()}function o(i,a,c){i.set(a,c)}function r(){}var n=T.prototype;r.prototype=function(i,a){var c=new r;if(i instanceof r)i.each(function(x){c.add(x)});else if(i){var p=-1,f=i.length;if(null==a)for(;++p<f;)c.add(i[p]);else for(;++p<f;)c.add(a(i[p],p,i))}return c}.prototype={constructor:r,has:n.has,add:function(i){return this[k+(i+="")]=i,this},remove:n.remove,clear:n.clear,values:n.keys,size:n.size,empty:n.empty,each:n.each}},49887:function($,R,e){"use strict";function k(de,he){var ve;function Pe(){var xe,ke,Ae=ve.length,Te=0,Q=0;for(xe=0;xe<Ae;++xe)Te+=(ke=ve[xe]).x,Q+=ke.y;for(Te=Te/Ae-de,Q=Q/Ae-he,xe=0;xe<Ae;++xe)(ke=ve[xe]).x-=Te,ke.y-=Q}return null==de&&(de=0),null==he&&(he=0),Pe.initialize=function(xe){ve=xe},Pe.x=function(xe){return arguments.length?(de=+xe,Pe):de},Pe.y=function(xe){return arguments.length?(he=+xe,Pe):he},Pe}function A(de){return function(){return de}}function l(){return 1e-6*(Math.random()-.5)}function T(de,he,ve,Pe){if(isNaN(he)||isNaN(ve))return de;var xe,ke,Ae,Te,Q,se,fe,ye,Me,Ie=de._root,Ce={data:Pe},Re=de._x0,le=de._y0,ge=de._x1,_e=de._y1;if(!Ie)return de._root=Ce,de;for(;Ie.length;)if((se=he>=(ke=(Re+ge)/2))?Re=ke:ge=ke,(fe=ve>=(Ae=(le+_e)/2))?le=Ae:_e=Ae,xe=Ie,!(Ie=Ie[ye=fe<<1|se]))return xe[ye]=Ce,de;if(Te=+de._x.call(null,Ie.data),Q=+de._y.call(null,Ie.data),he===Te&&ve===Q)return Ce.next=Ie,xe?xe[ye]=Ce:de._root=Ce,de;do{xe=xe?xe[ye]=new Array(4):de._root=new Array(4),(se=he>=(ke=(Re+ge)/2))?Re=ke:ge=ke,(fe=ve>=(Ae=(le+_e)/2))?le=Ae:_e=Ae}while((ye=fe<<1|se)==(Me=(Q>=Ae)<<1|Te>=ke));return xe[Me]=Ie,xe[ye]=Ce,de}function b(de,he,ve,Pe,xe){this.node=de,this.x0=he,this.y0=ve,this.x1=Pe,this.y1=xe}function d(de){return de[0]}function s(de){return de[1]}function t(de,he,ve){var Pe=new o(he??d,ve??s,NaN,NaN,NaN,NaN);return null==de?Pe:Pe.addAll(de)}function o(de,he,ve,Pe,xe,ke){this._x=de,this._y=he,this._x0=ve,this._y0=Pe,this._x1=xe,this._y1=ke,this._root=void 0}function r(de){for(var he={data:de.data},ve=he;de=de.next;)ve=ve.next={data:de.data};return he}e.r(R),e.d(R,{forceCenter:function(){return k},forceCollide:function(){return c},forceLink:function(){return v},forceManyBody:function(){return ie},forceRadial:function(){return oe},forceSimulation:function(){return ee},forceX:function(){return ce},forceY:function(){return me}});var n=t.prototype=o.prototype;function i(de){return de.x+de.vx}function a(de){return de.y+de.vy}function c(de){var he,ve,Pe=1,xe=1;function ke(){for(var Q,se,fe,ye,Me,Ie,Ce,Re=he.length,le=0;le<xe;++le)for(se=t(he,i,a).visitAfter(Ae),Q=0;Q<Re;++Q)Ce=(Ie=ve[(fe=he[Q]).index])*Ie,ye=fe.x+fe.vx,Me=fe.y+fe.vy,se.visit(ge);function ge(_e,Fe,Ve,He,nt){var tt=_e.data,ot=_e.r,dt=Ie+ot;if(!tt)return Fe>ye+dt||He<ye-dt||Ve>Me+dt||nt<Me-dt;if(tt.index>fe.index){var kt=ye-tt.x-tt.vx,mt=Me-tt.y-tt.vy,wt=kt*kt+mt*mt;wt<dt*dt&&(0===kt&&(wt+=(kt=l())*kt),0===mt&&(wt+=(mt=l())*mt),wt=(dt-(wt=Math.sqrt(wt)))/wt*Pe,fe.vx+=(kt*=wt)*(dt=(ot*=ot)/(Ce+ot)),fe.vy+=(mt*=wt)*dt,tt.vx-=kt*(dt=1-dt),tt.vy-=mt*dt)}}}function Ae(Q){if(Q.data)return Q.r=ve[Q.data.index];for(var se=Q.r=0;se<4;++se)Q[se]&&Q[se].r>Q.r&&(Q.r=Q[se].r)}function Te(){if(he){var Q,se,fe=he.length;for(ve=new Array(fe),Q=0;Q<fe;++Q)ve[(se=he[Q]).index]=+de(se,Q,he)}}return"function"!=typeof de&&(de=A(null==de?1:+de)),ke.initialize=function(Q){he=Q,Te()},ke.iterations=function(Q){return arguments.length?(xe=+Q,ke):xe},ke.strength=function(Q){return arguments.length?(Pe=+Q,ke):Pe},ke.radius=function(Q){return arguments.length?(de="function"==typeof Q?Q:A(+Q),Te(),ke):de},ke}n.copy=function(){var de,he,ve=new o(this._x,this._y,this._x0,this._y0,this._x1,this._y1),Pe=this._root;if(!Pe)return ve;if(!Pe.length)return ve._root=r(Pe),ve;for(de=[{source:Pe,target:ve._root=new Array(4)}];Pe=de.pop();)for(var xe=0;xe<4;++xe)(he=Pe.source[xe])&&(he.length?de.push({source:he,target:Pe.target[xe]=new Array(4)}):Pe.target[xe]=r(he));return ve},n.add=function(de){var he=+this._x.call(null,de),ve=+this._y.call(null,de);return T(this.cover(he,ve),he,ve,de)},n.addAll=function(de){var he,ve,Pe,xe,ke=de.length,Ae=new Array(ke),Te=new Array(ke),Q=1/0,se=1/0,fe=-1/0,ye=-1/0;for(ve=0;ve<ke;++ve)isNaN(Pe=+this._x.call(null,he=de[ve]))||isNaN(xe=+this._y.call(null,he))||(Ae[ve]=Pe,Te[ve]=xe,Pe<Q&&(Q=Pe),Pe>fe&&(fe=Pe),xe<se&&(se=xe),xe>ye&&(ye=xe));if(Q>fe||se>ye)return this;for(this.cover(Q,se).cover(fe,ye),ve=0;ve<ke;++ve)T(this,Ae[ve],Te[ve],de[ve]);return this},n.cover=function(de,he){if(isNaN(de=+de)||isNaN(he=+he))return this;var ve=this._x0,Pe=this._y0,xe=this._x1,ke=this._y1;if(isNaN(ve))xe=(ve=Math.floor(de))+1,ke=(Pe=Math.floor(he))+1;else{for(var Ae,Te,Q=xe-ve,se=this._root;ve>de||de>=xe||Pe>he||he>=ke;)switch(Te=(he<Pe)<<1|de<ve,(Ae=new Array(4))[Te]=se,se=Ae,Q*=2,Te){case 0:xe=ve+Q,ke=Pe+Q;break;case 1:ve=xe-Q,ke=Pe+Q;break;case 2:xe=ve+Q,Pe=ke-Q;break;case 3:ve=xe-Q,Pe=ke-Q}this._root&&this._root.length&&(this._root=se)}return this._x0=ve,this._y0=Pe,this._x1=xe,this._y1=ke,this},n.data=function(){var de=[];return this.visit(function(he){if(!he.length)do{de.push(he.data)}while(he=he.next)}),de},n.extent=function(de){return arguments.length?this.cover(+de[0][0],+de[0][1]).cover(+de[1][0],+de[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},n.find=function(de,he,ve){var Pe,xe,ke,Ae,Te,Q,se,fe=this._x0,ye=this._y0,Me=this._x1,Ie=this._y1,Ce=[],Re=this._root;for(Re&&Ce.push(new b(Re,fe,ye,Me,Ie)),null==ve?ve=1/0:(fe=de-ve,ye=he-ve,Me=de+ve,Ie=he+ve,ve*=ve);Q=Ce.pop();)if(!(!(Re=Q.node)||(xe=Q.x0)>Me||(ke=Q.y0)>Ie||(Ae=Q.x1)<fe||(Te=Q.y1)<ye))if(Re.length){var le=(xe+Ae)/2,ge=(ke+Te)/2;Ce.push(new b(Re[3],le,ge,Ae,Te),new b(Re[2],xe,ge,le,Te),new b(Re[1],le,ke,Ae,ge),new b(Re[0],xe,ke,le,ge)),(se=(he>=ge)<<1|de>=le)&&(Q=Ce[Ce.length-1],Ce[Ce.length-1]=Ce[Ce.length-1-se],Ce[Ce.length-1-se]=Q)}else{var _e=de-+this._x.call(null,Re.data),Fe=he-+this._y.call(null,Re.data),Ve=_e*_e+Fe*Fe;if(Ve<ve){var He=Math.sqrt(ve=Ve);fe=de-He,ye=he-He,Me=de+He,Ie=he+He,Pe=Re.data}}return Pe},n.remove=function(de){if(isNaN(ke=+this._x.call(null,de))||isNaN(Ae=+this._y.call(null,de)))return this;var he,ve,Pe,xe,ke,Ae,Te,Q,se,fe,ye,Me,Ie=this._root,Ce=this._x0,Re=this._y0,le=this._x1,ge=this._y1;if(!Ie)return this;if(Ie.length)for(;;){if((se=ke>=(Te=(Ce+le)/2))?Ce=Te:le=Te,(fe=Ae>=(Q=(Re+ge)/2))?Re=Q:ge=Q,he=Ie,!(Ie=Ie[ye=fe<<1|se]))return this;if(!Ie.length)break;(he[ye+1&3]||he[ye+2&3]||he[ye+3&3])&&(ve=he,Me=ye)}for(;Ie.data!==de;)if(Pe=Ie,!(Ie=Ie.next))return this;return(xe=Ie.next)&&delete Ie.next,Pe?(xe?Pe.next=xe:delete Pe.next,this):he?(xe?he[ye]=xe:delete he[ye],(Ie=he[0]||he[1]||he[2]||he[3])&&Ie===(he[3]||he[2]||he[1]||he[0])&&!Ie.length&&(ve?ve[Me]=Ie:this._root=Ie),this):(this._root=xe,this)},n.removeAll=function(de){for(var he=0,ve=de.length;he<ve;++he)this.remove(de[he]);return this},n.root=function(){return this._root},n.size=function(){var de=0;return this.visit(function(he){if(!he.length)do{++de}while(he=he.next)}),de},n.visit=function(de){var he,ve,Pe,xe,ke,Ae,Te=[],Q=this._root;for(Q&&Te.push(new b(Q,this._x0,this._y0,this._x1,this._y1));he=Te.pop();)if(!de(Q=he.node,Pe=he.x0,xe=he.y0,ke=he.x1,Ae=he.y1)&&Q.length){var se=(Pe+ke)/2,fe=(xe+Ae)/2;(ve=Q[3])&&Te.push(new b(ve,se,fe,ke,Ae)),(ve=Q[2])&&Te.push(new b(ve,Pe,fe,se,Ae)),(ve=Q[1])&&Te.push(new b(ve,se,xe,ke,fe)),(ve=Q[0])&&Te.push(new b(ve,Pe,xe,se,fe))}return this},n.visitAfter=function(de){var he,ve=[],Pe=[];for(this._root&&ve.push(new b(this._root,this._x0,this._y0,this._x1,this._y1));he=ve.pop();){var xe=he.node;if(xe.length){var ke,Ae=he.x0,Te=he.y0,Q=he.x1,se=he.y1,fe=(Ae+Q)/2,ye=(Te+se)/2;(ke=xe[0])&&ve.push(new b(ke,Ae,Te,fe,ye)),(ke=xe[1])&&ve.push(new b(ke,fe,Te,Q,ye)),(ke=xe[2])&&ve.push(new b(ke,Ae,ye,fe,se)),(ke=xe[3])&&ve.push(new b(ke,fe,ye,Q,se))}Pe.push(he)}for(;he=Pe.pop();)de(he.node,he.x0,he.y0,he.x1,he.y1);return this},n.x=function(de){return arguments.length?(this._x=de,this):this._x},n.y=function(de){return arguments.length?(this._y=de,this):this._y};var p=e(15140);function f(de){return de.index}function x(de,he){var ve=de.get(he);if(!ve)throw new Error("missing: "+he);return ve}function v(de){var he,ve,Pe,xe,ke,Ae=f,Te=function(Ce){return 1/Math.min(xe[Ce.source.index],xe[Ce.target.index])},Q=A(30),se=1;function fe(Ce){for(var Re=0,le=de.length;Re<se;++Re)for(var ge,_e,Fe,Ve,He,nt,tt,ot=0;ot<le;++ot)_e=(ge=de[ot]).source,Ve=(Fe=ge.target).x+Fe.vx-_e.x-_e.vx||l(),He=Fe.y+Fe.vy-_e.y-_e.vy||l(),Ve*=nt=((nt=Math.sqrt(Ve*Ve+He*He))-ve[ot])/nt*Ce*he[ot],He*=nt,Fe.vx-=Ve*(tt=ke[ot]),Fe.vy-=He*tt,_e.vx+=Ve*(tt=1-tt),_e.vy+=He*tt}function ye(){if(Pe){var Ce,Re,le=Pe.length,ge=de.length,_e=(0,p.UI)(Pe,Ae);for(Ce=0,xe=new Array(le);Ce<ge;++Ce)(Re=de[Ce]).index=Ce,"object"!=typeof Re.source&&(Re.source=x(_e,Re.source)),"object"!=typeof Re.target&&(Re.target=x(_e,Re.target)),xe[Re.source.index]=(xe[Re.source.index]||0)+1,xe[Re.target.index]=(xe[Re.target.index]||0)+1;for(Ce=0,ke=new Array(ge);Ce<ge;++Ce)ke[Ce]=xe[(Re=de[Ce]).source.index]/(xe[Re.source.index]+xe[Re.target.index]);he=new Array(ge),Me(),ve=new Array(ge),Ie()}}function Me(){if(Pe)for(var Ce=0,Re=de.length;Ce<Re;++Ce)he[Ce]=+Te(de[Ce],Ce,de)}function Ie(){if(Pe)for(var Ce=0,Re=de.length;Ce<Re;++Ce)ve[Ce]=+Q(de[Ce],Ce,de)}return null==de&&(de=[]),fe.initialize=function(Ce){Pe=Ce,ye()},fe.links=function(Ce){return arguments.length?(de=Ce,ye(),fe):de},fe.id=function(Ce){return arguments.length?(Ae=Ce,fe):Ae},fe.iterations=function(Ce){return arguments.length?(se=+Ce,fe):se},fe.strength=function(Ce){return arguments.length?(Te="function"==typeof Ce?Ce:A(+Ce),Me(),fe):Te},fe.distance=function(Ce){return arguments.length?(Q="function"==typeof Ce?Ce:A(+Ce),Ie(),fe):Q},fe}var g={value:function(){}};function y(){for(var de,he=0,ve=arguments.length,Pe={};he<ve;++he){if(!(de=arguments[he]+"")||de in Pe||/[\s.]/.test(de))throw new Error("illegal type: "+de);Pe[de]=[]}return new h(Pe)}function h(de){this._=de}function w(de,he){for(var ve,Pe=0,xe=de.length;Pe<xe;++Pe)if((ve=de[Pe]).name===he)return ve.value}function u(de,he,ve){for(var Pe=0,xe=de.length;Pe<xe;++Pe)if(de[Pe].name===he){de[Pe]=g,de=de.slice(0,Pe).concat(de.slice(Pe+1));break}return null!=ve&&de.push({name:he,value:ve}),de}h.prototype=y.prototype={constructor:h,on:function(de,he){var ve,Pe=this._,xe=function m(de,he){return de.trim().split(/^|\s+/).map(function(ve){var Pe="",xe=ve.indexOf(".");if(xe>=0&&(Pe=ve.slice(xe+1),ve=ve.slice(0,xe)),ve&&!he.hasOwnProperty(ve))throw new Error("unknown type: "+ve);return{type:ve,name:Pe}})}(de+"",Pe),ke=-1,Ae=xe.length;if(!(arguments.length<2)){if(null!=he&&"function"!=typeof he)throw new Error("invalid callback: "+he);for(;++ke<Ae;)if(ve=(de=xe[ke]).type)Pe[ve]=u(Pe[ve],de.name,he);else if(null==he)for(ve in Pe)Pe[ve]=u(Pe[ve],de.name,null);return this}for(;++ke<Ae;)if((ve=(de=xe[ke]).type)&&(ve=w(Pe[ve],de.name)))return ve},copy:function(){var de={},he=this._;for(var ve in he)de[ve]=he[ve].slice();return new h(de)},call:function(de,he){if((ve=arguments.length-2)>0)for(var ve,Pe,xe=new Array(ve),ke=0;ke<ve;++ke)xe[ke]=arguments[ke+2];if(!this._.hasOwnProperty(de))throw new Error("unknown type: "+de);for(ke=0,ve=(Pe=this._[de]).length;ke<ve;++ke)Pe[ke].value.apply(he,xe)},apply:function(de,he,ve){if(!this._.hasOwnProperty(de))throw new Error("unknown type: "+de);for(var Pe=this._[de],xe=0,ke=Pe.length;xe<ke;++xe)Pe[xe].value.apply(he,ve)}};var S,_,E=y,L=0,C=0,P=0,I=0,U=0,z=0,H="object"==typeof performance&&performance.now?performance:Date,F="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(de){setTimeout(de,17)};function N(){return U||(F(B),U=H.now()+z)}function B(){U=0}function j(){this._call=this._time=this._next=null}function J(de,he,ve){var Pe=new j;return Pe.restart(de,he,ve),Pe}function G(){U=(I=H.now())+z,L=C=0;try{!function(){N(),++L;for(var de,he=S;he;)(de=U-he._time)>=0&&he._call.call(null,de),he=he._next;--L}()}finally{L=0,function(){for(var de,he,ve=S,Pe=1/0;ve;)ve._call?(Pe>ve._time&&(Pe=ve._time),de=ve,ve=ve._next):(he=ve._next,ve._next=null,ve=de?de._next=he:S=he);_=de,W(Pe)}(),U=0}}function V(){var de=H.now(),he=de-I;he>1e3&&(z-=he,I=de)}function W(de){L||(C&&(C=clearTimeout(C)),de-U>24?(de<1/0&&(C=setTimeout(G,de-H.now()-z)),P&&(P=clearInterval(P))):(P||(I=H.now(),P=setInterval(V,1e3)),L=1,F(G)))}function X(de){return de.x}function K(de){return de.y}j.prototype=J.prototype={constructor:j,restart:function(de,he,ve){if("function"!=typeof de)throw new TypeError("callback is not a function");ve=(null==ve?N():+ve)+(null==he?0:+he),this._next||_===this||(_?_._next=this:S=this,_=this),this._call=de,this._time=ve,W()},stop:function(){this._call&&(this._call=null,this._time=1/0,W())}};var re=Math.PI*(3-Math.sqrt(5));function ee(de){var he,ve=1,Pe=.001,xe=1-Math.pow(Pe,1/300),ke=0,Ae=.6,Te=(0,p.UI)(),Q=J(fe),se=E("tick","end");function fe(){ye(),se.call("tick",he),ve<Pe&&(Q.stop(),se.call("end",he))}function ye(Ce){var Re,le,ge=de.length;void 0===Ce&&(Ce=1);for(var _e=0;_e<Ce;++_e)for(ve+=(ke-ve)*xe,Te.each(function(Fe){Fe(ve)}),Re=0;Re<ge;++Re)null==(le=de[Re]).fx?le.x+=le.vx*=Ae:(le.x=le.fx,le.vx=0),null==le.fy?le.y+=le.vy*=Ae:(le.y=le.fy,le.vy=0);return he}function Me(){for(var Ce,Re=0,le=de.length;Re<le;++Re){if((Ce=de[Re]).index=Re,null!=Ce.fx&&(Ce.x=Ce.fx),null!=Ce.fy&&(Ce.y=Ce.fy),isNaN(Ce.x)||isNaN(Ce.y)){var ge=10*Math.sqrt(Re),_e=Re*re;Ce.x=ge*Math.cos(_e),Ce.y=ge*Math.sin(_e)}(isNaN(Ce.vx)||isNaN(Ce.vy))&&(Ce.vx=Ce.vy=0)}}function Ie(Ce){return Ce.initialize&&Ce.initialize(de),Ce}return null==de&&(de=[]),Me(),he={tick:ye,restart:function(){return Q.restart(fe),he},stop:function(){return Q.stop(),he},nodes:function(Ce){return arguments.length?(de=Ce,Me(),Te.each(Ie),he):de},alpha:function(Ce){return arguments.length?(ve=+Ce,he):ve},alphaMin:function(Ce){return arguments.length?(Pe=+Ce,he):Pe},alphaDecay:function(Ce){return arguments.length?(xe=+Ce,he):+xe},alphaTarget:function(Ce){return arguments.length?(ke=+Ce,he):ke},velocityDecay:function(Ce){return arguments.length?(Ae=1-Ce,he):1-Ae},force:function(Ce,Re){return arguments.length>1?(null==Re?Te.remove(Ce):Te.set(Ce,Ie(Re)),he):Te.get(Ce)},find:function(Ce,Re,le){var ge,_e,Fe,Ve,He,nt=0,tt=de.length;for(null==le?le=1/0:le*=le,nt=0;nt<tt;++nt)(Fe=(ge=Ce-(Ve=de[nt]).x)*ge+(_e=Re-Ve.y)*_e)<le&&(He=Ve,le=Fe);return He},on:function(Ce,Re){return arguments.length>1?(se.on(Ce,Re),he):se.on(Ce)}}}function ie(){var de,he,ve,Pe,xe=A(-30),ke=1,Ae=1/0,Te=.81;function Q(Me){var Ie,Ce=de.length,Re=t(de,X,K).visitAfter(fe);for(ve=Me,Ie=0;Ie<Ce;++Ie)he=de[Ie],Re.visit(ye)}function se(){if(de){var Me,Ie,Ce=de.length;for(Pe=new Array(Ce),Me=0;Me<Ce;++Me)Pe[(Ie=de[Me]).index]=+xe(Ie,Me,de)}}function fe(Me){var Ie,Ce,Re,le,ge,_e=0,Fe=0;if(Me.length){for(Re=le=ge=0;ge<4;++ge)(Ie=Me[ge])&&(Ce=Math.abs(Ie.value))&&(_e+=Ie.value,Fe+=Ce,Re+=Ce*Ie.x,le+=Ce*Ie.y);Me.x=Re/Fe,Me.y=le/Fe}else{(Ie=Me).x=Ie.data.x,Ie.y=Ie.data.y;do{_e+=Pe[Ie.data.index]}while(Ie=Ie.next)}Me.value=_e}function ye(Me,Ie,Ce,Re){if(!Me.value)return!0;var le=Me.x-he.x,ge=Me.y-he.y,_e=Re-Ie,Fe=le*le+ge*ge;if(_e*_e/Te<Fe)return Fe<Ae&&(0===le&&(Fe+=(le=l())*le),0===ge&&(Fe+=(ge=l())*ge),Fe<ke&&(Fe=Math.sqrt(ke*Fe)),he.vx+=le*Me.value*ve/Fe,he.vy+=ge*Me.value*ve/Fe),!0;if(!(Me.length||Fe>=Ae)){(Me.data!==he||Me.next)&&(0===le&&(Fe+=(le=l())*le),0===ge&&(Fe+=(ge=l())*ge),Fe<ke&&(Fe=Math.sqrt(ke*Fe)));do{Me.data!==he&&(he.vx+=le*(_e=Pe[Me.data.index]*ve/Fe),he.vy+=ge*_e)}while(Me=Me.next)}}return Q.initialize=function(Me){de=Me,se()},Q.strength=function(Me){return arguments.length?(xe="function"==typeof Me?Me:A(+Me),se(),Q):xe},Q.distanceMin=function(Me){return arguments.length?(ke=Me*Me,Q):Math.sqrt(ke)},Q.distanceMax=function(Me){return arguments.length?(Ae=Me*Me,Q):Math.sqrt(Ae)},Q.theta=function(Me){return arguments.length?(Te=Me*Me,Q):Math.sqrt(Te)},Q}function oe(de,he,ve){var Pe,xe,ke,Ae=A(.1);function Te(se){for(var fe=0,ye=Pe.length;fe<ye;++fe){var Me=Pe[fe],Ie=Me.x-he||1e-6,Ce=Me.y-ve||1e-6,Re=Math.sqrt(Ie*Ie+Ce*Ce),le=(ke[fe]-Re)*xe[fe]*se/Re;Me.vx+=Ie*le,Me.vy+=Ce*le}}function Q(){if(Pe){var se,fe=Pe.length;for(xe=new Array(fe),ke=new Array(fe),se=0;se<fe;++se)ke[se]=+de(Pe[se],se,Pe),xe[se]=isNaN(ke[se])?0:+Ae(Pe[se],se,Pe)}}return"function"!=typeof de&&(de=A(+de)),null==he&&(he=0),null==ve&&(ve=0),Te.initialize=function(se){Pe=se,Q()},Te.strength=function(se){return arguments.length?(Ae="function"==typeof se?se:A(+se),Q(),Te):Ae},Te.radius=function(se){return arguments.length?(de="function"==typeof se?se:A(+se),Q(),Te):de},Te.x=function(se){return arguments.length?(he=+se,Te):he},Te.y=function(se){return arguments.length?(ve=+se,Te):ve},Te}function ce(de){var he,ve,Pe,xe=A(.1);function ke(Te){for(var Q,se=0,fe=he.length;se<fe;++se)(Q=he[se]).vx+=(Pe[se]-Q.x)*ve[se]*Te}function Ae(){if(he){var Te,Q=he.length;for(ve=new Array(Q),Pe=new Array(Q),Te=0;Te<Q;++Te)ve[Te]=isNaN(Pe[Te]=+de(he[Te],Te,he))?0:+xe(he[Te],Te,he)}}return"function"!=typeof de&&(de=A(null==de?0:+de)),ke.initialize=function(Te){he=Te,Ae()},ke.strength=function(Te){return arguments.length?(xe="function"==typeof Te?Te:A(+Te),Ae(),ke):xe},ke.x=function(Te){return arguments.length?(de="function"==typeof Te?Te:A(+Te),Ae(),ke):de},ke}function me(de){var he,ve,Pe,xe=A(.1);function ke(Te){for(var Q,se=0,fe=he.length;se<fe;++se)(Q=he[se]).vy+=(Pe[se]-Q.y)*ve[se]*Te}function Ae(){if(he){var Te,Q=he.length;for(ve=new Array(Q),Pe=new Array(Q),Te=0;Te<Q;++Te)ve[Te]=isNaN(Pe[Te]=+de(he[Te],Te,he))?0:+xe(he[Te],Te,he)}}return"function"!=typeof de&&(de=A(null==de?0:+de)),ke.initialize=function(Te){he=Te,Ae()},ke.strength=function(Te){return arguments.length?(xe="function"==typeof Te?Te:A(+Te),Ae(),ke):xe},ke.y=function(Te){return arguments.length?(de="function"==typeof Te?Te:A(+Te),Ae(),ke):de},ke}},60721:function($,R,e){"use strict";function k(c,p){if((f=(c=p?c.toExponential(p-1):c.toExponential()).indexOf("e"))<0)return null;var f,x=c.slice(0,f);return[x.length>1?x[0]+x.slice(2):x,+c.slice(f+1)]}e.d(R,{WU:function(){return r},FF:function(){return a}});var A,l=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function T(c){if(!(p=l.exec(c)))throw new Error("invalid format: "+c);var p;return new b({fill:p[1],align:p[2],sign:p[3],symbol:p[4],zero:p[5],width:p[6],comma:p[7],precision:p[8]&&p[8].slice(1),trim:p[9],type:p[10]})}function b(c){this.fill=void 0===c.fill?" ":c.fill+"",this.align=void 0===c.align?">":c.align+"",this.sign=void 0===c.sign?"-":c.sign+"",this.symbol=void 0===c.symbol?"":c.symbol+"",this.zero=!!c.zero,this.width=void 0===c.width?void 0:+c.width,this.comma=!!c.comma,this.precision=void 0===c.precision?void 0:+c.precision,this.trim=!!c.trim,this.type=void 0===c.type?"":c.type+""}function d(c,p){var f=k(c,p);if(!f)return c+"";var x=f[0],v=f[1];return v<0?"0."+new Array(-v).join("0")+x:x.length>v+1?x.slice(0,v+1)+"."+x.slice(v+1):x+new Array(v-x.length+2).join("0")}T.prototype=b.prototype,b.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 s={"%":function(c,p){return(100*c).toFixed(p)},b:function(c){return Math.round(c).toString(2)},c:function(c){return c+""},d:function(c){return Math.abs(c=Math.round(c))>=1e21?c.toLocaleString("en").replace(/,/g,""):c.toString(10)},e:function(c,p){return c.toExponential(p)},f:function(c,p){return c.toFixed(p)},g:function(c,p){return c.toPrecision(p)},o:function(c){return Math.round(c).toString(8)},p:function(c,p){return d(100*c,p)},r:d,s:function(c,p){var f=k(c,p);if(!f)return c+"";var x=f[0],v=f[1],g=v-(A=3*Math.max(-8,Math.min(8,Math.floor(v/3))))+1,y=x.length;return g===y?x:g>y?x+new Array(g-y+1).join("0"):g>0?x.slice(0,g)+"."+x.slice(g):"0."+new Array(1-g).join("0")+k(c,Math.max(0,p+g-1))[0]},X:function(c){return Math.round(c).toString(16).toUpperCase()},x:function(c){return Math.round(c).toString(16)}};function t(c){return c}var o,r,n=Array.prototype.map,i=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function a(c){var p,f,_,x=void 0===c.grouping||void 0===c.thousands?t:(p=n.call(c.grouping,Number),f=c.thousands+"",function(_,E){for(var L=_.length,C=[],P=0,I=p[0],U=0;L>0&&I>0&&(U+I+1>E&&(I=Math.max(1,E-U)),C.push(_.substring(L-=I,L+I)),!((U+=I+1)>E));)I=p[P=(P+1)%p.length];return C.reverse().join(f)}),v=void 0===c.currency?"":c.currency[0]+"",g=void 0===c.currency?"":c.currency[1]+"",y=void 0===c.decimal?".":c.decimal+"",h=void 0===c.numerals?t:(_=n.call(c.numerals,String),function(E){return E.replace(/[0-9]/g,function(L){return _[+L]})}),m=void 0===c.percent?"%":c.percent+"",w=void 0===c.minus?"-":c.minus+"",u=void 0===c.nan?"NaN":c.nan+"";function S(_){var E=(_=T(_)).fill,L=_.align,C=_.sign,P=_.symbol,I=_.zero,U=_.width,z=_.comma,H=_.precision,F=_.trim,N=_.type;"n"===N?(z=!0,N="g"):s[N]||(void 0===H&&(H=12),F=!0,N="g"),(I||"0"===E&&"="===L)&&(I=!0,E="0",L="=");var B="$"===P?v:"#"===P&&/[boxX]/.test(N)?"0"+N.toLowerCase():"",j="$"===P?g:/[%p]/.test(N)?m:"",J=s[N],G=/[defgprs%]/.test(N);function V(W){var X,K,re,ee=B,ie=j;if("c"===N)ie=J(W)+ie,W="";else{var oe=(W=+W)<0||1/W<0;if(W=isNaN(W)?u:J(Math.abs(W),H),F&&(W=function(de){e:for(var he,ve=de.length,Pe=1,xe=-1;Pe<ve;++Pe)switch(de[Pe]){case".":xe=he=Pe;break;case"0":0===xe&&(xe=Pe),he=Pe;break;default:if(!+de[Pe])break e;xe>0&&(xe=0)}return xe>0?de.slice(0,xe)+de.slice(he+1):de}(W)),oe&&0==+W&&"+"!==C&&(oe=!1),ee=(oe?"("===C?C:w:"-"===C||"("===C?"":C)+ee,ie=("s"===N?i[8+A/3]:"")+ie+(oe&&"("===C?")":""),G)for(X=-1,K=W.length;++X<K;)if(48>(re=W.charCodeAt(X))||re>57){ie=(46===re?y+W.slice(X+1):W.slice(X))+ie,W=W.slice(0,X);break}}z&&!I&&(W=x(W,1/0));var ce=ee.length+W.length+ie.length,me=ce<U?new Array(U-ce+1).join(E):"";switch(z&&I&&(W=x(me+W,me.length?U-ie.length:1/0),me=""),L){case"<":W=ee+W+ie+me;break;case"=":W=ee+me+W+ie;break;case"^":W=me.slice(0,ce=me.length>>1)+ee+W+ie+me.slice(ce);break;default:W=me+ee+W+ie}return h(W)}return H=void 0===H?6:/[gprs]/.test(N)?Math.max(1,Math.min(21,H)):Math.max(0,Math.min(20,H)),V.toString=function(){return _+""},V}return{format:S,formatPrefix:function(_,E){var L,C=S(((_=T(_)).type="f",_)),P=3*Math.max(-8,Math.min(8,Math.floor((L=E,((L=k(Math.abs(L)))?L[1]:NaN)/3)))),I=Math.pow(10,-P),U=i[8+P/3];return function(z){return C(I*z)+U}}}}o=a({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"}),r=o.format},65704:function($,R,e){"use strict";e.r(R),e.d(R,{geoAiry:function(){return z},geoAiryRaw:function(){return U},geoAitoff:function(){return F},geoAitoffRaw:function(){return H},geoArmadillo:function(){return B},geoArmadilloRaw:function(){return N},geoAugust:function(){return J},geoAugustRaw:function(){return j},geoBaker:function(){return X},geoBakerRaw:function(){return W},geoBerghaus:function(){return ee},geoBerghausRaw:function(){return re},geoBertin1953:function(){return Pe},geoBertin1953Raw:function(){return ve},geoBoggs:function(){return ye},geoBoggsRaw:function(){return fe},geoBonne:function(){return le},geoBonneRaw:function(){return Re},geoBottomley:function(){return _e},geoBottomleyRaw:function(){return ge},geoBromley:function(){return Ve},geoBromleyRaw:function(){return Fe},geoChamberlin:function(){return Lt},geoChamberlinAfrica:function(){return wt},geoChamberlinRaw:function(){return kt},geoCollignon:function(){return It},geoCollignonRaw:function(){return Ct},geoCraig:function(){return Rt},geoCraigRaw:function(){return Ut},geoCraster:function(){return Be},geoCrasterRaw:function(){return We},geoCylindricalEqualArea:function(){return rt},geoCylindricalEqualAreaRaw:function(){return Ye},geoCylindricalStereographic:function(){return ze},geoCylindricalStereographicRaw:function(){return Se},geoEckert1:function(){return st},geoEckert1Raw:function(){return Ke},geoEckert2:function(){return Tt},geoEckert2Raw:function(){return ct},geoEckert3:function(){return At},geoEckert3Raw:function(){return Et},geoEckert4:function(){return pt},geoEckert4Raw:function(){return ht},geoEckert5:function(){return Pt},geoEckert5Raw:function(){return gt},geoEckert6:function(){return Ht},geoEckert6Raw:function(){return Ot},geoEisenlohr:function(){return Gt},geoEisenlohrRaw:function(){return Nt},geoFahey:function(){return Kt},geoFaheyRaw:function(){return pn},geoFoucaut:function(){return Bn},geoFoucautRaw:function(){return wn},geoFoucautSinusoidal:function(){return cn},geoFoucautSinusoidalRaw:function(){return vn},geoGilbert:function(){return Mn},geoGingery:function(){return rr},geoGingeryRaw:function(){return Rn},geoGinzburg4:function(){return fr},geoGinzburg4Raw:function(){return mr},geoGinzburg5:function(){return qn},geoGinzburg5Raw:function(){return Zn},geoGinzburg6:function(){return Zt},geoGinzburg6Raw:function(){return ur},geoGinzburg8:function(){return zn},geoGinzburg8Raw:function(){return nn},geoGinzburg9:function(){return Cn},geoGinzburg9Raw:function(){return _n},geoGringorten:function(){return ar},geoGringortenQuincuncial:function(){return Cs},geoGringortenRaw:function(){return Gn},geoGuyou:function(){return zt},geoGuyouRaw:function(){return kn},geoHammer:function(){return me},geoHammerRaw:function(){return oe},geoHammerRetroazimuthal:function(){return An},geoHammerRetroazimuthalRaw:function(){return tn},geoHealpix:function(){return Wn},geoHealpixRaw:function(){return fn},geoHill:function(){return nr},geoHillRaw:function(){return Kn},geoHomolosine:function(){return Ur},geoHomolosineRaw:function(){return br},geoHufnagel:function(){return cr},geoHufnagelRaw:function(){return Sr},geoHyperelliptical:function(){return Mi},geoHyperellipticalRaw:function(){return li},geoInterrupt:function(){return vi},geoInterruptedBoggs:function(){return to},geoInterruptedHomolosine:function(){return Go},geoInterruptedMollweide:function(){return Us},geoInterruptedMollweideHemispheres:function(){return Ta},geoInterruptedQuarticAuthalic:function(){return Ro},geoInterruptedSinuMollweide:function(){return zi},geoInterruptedSinusoidal:function(){return ma},geoKavrayskiy7:function(){return vo},geoKavrayskiy7Raw:function(){return ka},geoLagrange:function(){return mo},geoLagrangeRaw:function(){return Qr},geoLarrivee:function(){return Ya},geoLarriveeRaw:function(){return Ua},geoLaskowski:function(){return al},geoLaskowskiRaw:function(){return ls},geoLittrow:function(){return ol},geoLittrowRaw:function(){return no},geoLoximuthal:function(){return ml},geoLoximuthalRaw:function(){return sl},geoMiller:function(){return ll},geoMillerRaw:function(){return Hs},geoModifiedStereographic:function(){return Po},geoModifiedStereographicAlaska:function(){return Zs},geoModifiedStereographicGs48:function(){return Co},geoModifiedStereographicGs50:function(){return Ms},geoModifiedStereographicLee:function(){return Yo},geoModifiedStereographicMiller:function(){return yo},geoModifiedStereographicRaw:function(){return qs},geoMollweide:function(){return Te},geoMollweideRaw:function(){return Ae},geoMtFlatPolarParabolic:function(){return yl},geoMtFlatPolarParabolicRaw:function(){return xo},geoMtFlatPolarQuartic:function(){return us},geoMtFlatPolarQuarticRaw:function(){return Ss},geoMtFlatPolarSinusoidal:function(){return Xo},geoMtFlatPolarSinusoidalRaw:function(){return Oo},geoNaturalEarth:function(){return Pa.Z},geoNaturalEarth2:function(){return cs},geoNaturalEarth2Raw:function(){return Ws},geoNaturalEarthRaw:function(){return Pa.K},geoNellHammer:function(){return fs},geoNellHammerRaw:function(){return Jo},geoNicolosi:function(){return hs},geoNicolosiRaw:function(){return Ko},geoPatterson:function(){return Es},geoPattersonRaw:function(){return bo},geoPeirceQuincuncial:function(){return Ps},geoPierceQuincuncial:function(){return Ps},geoPolyconic:function(){return Xs},geoPolyconicRaw:function(){return vs},geoPolyhedral:function(){return _o},geoPolyhedralButterfly:function(){return Ls},geoPolyhedralCollignon:function(){return Ks},geoPolyhedralWaterman:function(){return Bo},geoProject:function(){return jo},geoQuantize:function(){return ia},geoQuincuncial:function(){return ya},geoRectangularPolyconic:function(){return Uo},geoRectangularPolyconicRaw:function(){return _r},geoRobinson:function(){return Qo},geoRobinsonRaw:function(){return Os},geoSatellite:function(){return ts},geoSatelliteRaw:function(){return es},geoSinuMollweide:function(){return lr},geoSinuMollweideRaw:function(){return ir},geoSinusoidal:function(){return Ce},geoSinusoidalRaw:function(){return Ie},geoStitch:function(){return Ho},geoTimes:function(){return Da},geoTimesRaw:function(){return Ji},geoTwoPointAzimuthal:function(){return Fa},geoTwoPointAzimuthalRaw:function(){return xs},geoTwoPointAzimuthalUsa:function(){return Aa},geoTwoPointEquidistant:function(){return ni},geoTwoPointEquidistantRaw:function(){return Ka},geoTwoPointEquidistantUsa:function(){return ua},geoVanDerGrinten:function(){return Ha},geoVanDerGrinten2:function(){return $a},geoVanDerGrinten2Raw:function(){return ca},geoVanDerGrinten3:function(){return co},geoVanDerGrinten3Raw:function(){return Ao},geoVanDerGrinten4:function(){return Ba},geoVanDerGrinten4Raw:function(){return Ki},geoVanDerGrintenRaw:function(){return Vi},geoWagner:function(){return Or},geoWagner4:function(){return Rs},geoWagner4Raw:function(){return $i},geoWagner6:function(){return is},geoWagner6Raw:function(){return fa},geoWagner7:function(){return rs},geoWagnerRaw:function(){return Mr},geoWiechel:function(){return oi},geoWiechelRaw:function(){return ho},geoWinkel3:function(){return zs},geoWinkel3Raw:function(){return fi}});var k=e(15002),A=Math.abs,l=Math.atan,T=Math.atan2,b=Math.cos,d=Math.exp,s=Math.floor,t=Math.log,o=Math.max,r=Math.min,n=Math.pow,i=Math.round,a=Math.sign||function(Xe){return Xe>0?1:Xe<0?-1:0},c=Math.sin,p=Math.tan,f=1e-6,x=1e-12,v=Math.PI,g=v/2,y=v/4,h=Math.SQRT1_2,m=C(2),w=C(v),u=2*v,S=180/v,_=v/180;function E(Xe){return Xe>1?g:Xe<-1?-g:Math.asin(Xe)}function L(Xe){return Xe>1?0:Xe<-1?v:Math.acos(Xe)}function C(Xe){return Xe>0?Math.sqrt(Xe):0}function P(Xe){return(d(Xe)-d(-Xe))/2}function I(Xe){return(d(Xe)+d(-Xe))/2}function U(Xe){var $e=p(Xe/2),at=2*t(b(Xe/2))/($e*$e);function ft(bt,yt){var D=b(bt),Y=b(yt),q=c(yt),ne=Y*D,pe=-((1-ne?t((1+ne)/2)/(1-ne):-.5)+at/(1+ne));return[pe*Y*c(bt),pe*q]}return ft.invert=function(bt,yt){var D,Y=C(bt*bt+yt*yt),q=-Xe/2,ne=50;if(!Y)return[0,0];do{var pe=q/2,Le=b(pe),Ne=c(pe),qe=Ne/Le,et=-t(A(Le));q-=D=(2/qe*et-at*qe-Y)/(-et/(Ne*Ne)+1-at/(2*Le*Le))*(Le<0?.7:1)}while(A(D)>f&&--ne>0);var vt=c(q);return[T(bt*vt,Y*b(q)),E(yt*vt/Y)]},ft}function z(){var Xe=g,$e=(0,k.r)(U),at=$e(Xe);return at.radius=function(ft){return arguments.length?$e(Xe=ft*_):Xe*S},at.scale(179.976).clipAngle(147)}function H(Xe,$e){var bt,at=b($e),ft=(bt=L(at*b(Xe/=2)))?bt/Math.sin(bt):1;return[2*at*c(Xe)*ft,c($e)*ft]}function F(){return(0,k.Z)(H).scale(152.63)}function N(Xe){var $e=c(Xe),at=b(Xe),ft=Xe>=0?1:-1,bt=p(ft*Xe),yt=(1+$e-at)/2;function D(Y,q){var ne=b(q),pe=b(Y/=2);return[(1+ne)*c(Y),(ft*q>-T(pe,bt)-.001?0:10*-ft)+yt+c(q)*at-(1+ne)*$e*pe]}return D.invert=function(Y,q){var ne=0,pe=0,Le=50;do{var Ne=b(ne),qe=c(ne),et=b(pe),vt=c(pe),xt=1+et,te=xt*qe-Y,ue=yt+vt*at-xt*$e*Ne-q,we=xt*Ne/2,Oe=-qe*vt,De=$e*xt*qe/2,Ue=at*et+$e*Ne*vt,Ze=Oe*De-Ue*we,Je=(ue*Oe-te*Ue)/Ze/2,it=(te*De-ue*we)/Ze;A(it)>2&&(it/=2),ne-=Je,pe-=it}while((A(Je)>f||A(it)>f)&&--Le>0);return ft*pe>-T(b(ne),bt)-.001?[2*ne,pe]:null},D}function B(){var Xe=20*_,$e=Xe>=0?1:-1,at=p($e*Xe),ft=(0,k.r)(N),bt=ft(Xe),yt=bt.stream;return bt.parallel=function(D){return arguments.length?(at=p(($e=(Xe=D*_)>=0?1:-1)*Xe),ft(Xe)):Xe*S},bt.stream=function(D){var Y=bt.rotate(),q=yt(D),ne=(bt.rotate([0,0]),yt(D)),pe=bt.precision();return bt.rotate(Y),q.sphere=function(){ne.polygonStart(),ne.lineStart();for(var Le=-180*$e;$e*Le<180;Le+=90*$e)ne.point(Le,90*$e);if(Xe)for(;$e*(Le-=3*$e*pe)>=-180;)ne.point(Le,$e*-T(b(Le*_/2),at)*S);ne.lineEnd(),ne.polygonEnd()},q},bt.scale(218.695).center([0,28.0974])}function j(Xe,$e){var at=p($e/2),ft=C(1-at*at),bt=1+ft*b(Xe/=2),yt=c(Xe)*ft/bt,D=at/bt,Y=yt*yt,q=D*D;return[1.3333333333333333*yt*(3+Y-3*q),1.3333333333333333*D*(3+3*Y-q)]}function J(){return(0,k.Z)(j).scale(66.1603)}H.invert=function(Xe,$e){if(!(Xe*Xe+4*$e*$e>v*v+f)){var at=Xe,ft=$e,bt=25;do{var yt,D=c(at),Y=c(at/2),q=b(at/2),ne=c(ft),pe=b(ft),Le=c(2*ft),Ne=ne*ne,qe=pe*pe,et=Y*Y,vt=1-qe*q*q,xt=vt?L(pe*q)*C(yt=1/vt):yt=0,te=2*xt*pe*Y-Xe,ue=xt*ne-$e,we=yt*(qe*et+xt*pe*q*Ne),Oe=yt*(.5*D*Le-2*xt*ne*Y),De=.25*yt*(Le*Y-xt*ne*qe*D),Ue=yt*(Ne*q+xt*et*pe),Ze=Oe*De-Ue*we;if(!Ze)break;var Je=(ue*Oe-te*Ue)/Ze,it=(te*De-ue*we)/Ze;at-=Je,ft-=it}while((A(Je)>f||A(it)>f)&&--bt>0);return[at,ft]}},j.invert=function(Xe,$e){if($e*=.375,!(Xe*=.375)&&A($e)>1)return null;var ne,at=1+Xe*Xe+$e*$e,ft=C((at-C(at*at-4*$e*$e))/2),bt=E(ft)/3,yt=ft?(ne=A($e/ft),t(ne+C(ne*ne-1))/3):function(ne){return t(ne+C(ne*ne+1))}(A(Xe))/3,D=b(bt),Y=I(yt),q=Y*Y-D*D;return[2*a(Xe)*T(P(yt)*D,.25-q),2*a($e)*T(Y*c(bt),.25+q)]};var G=C(8),V=t(1+m);function W(Xe,$e){var at=A($e);return at<y?[Xe,t(p(y+$e/2))]:[Xe*b(at)*(2*m-1/c(at)),a($e)*(2*m*(at-y)-t(p(at/2)))]}function X(){return(0,k.Z)(W).scale(112.314)}W.invert=function(Xe,$e){if((ft=A($e))<V)return[Xe,2*l(d($e))-g];var at,ft,bt=y,yt=25;do{var D=b(bt/2),Y=p(bt/2);bt-=at=(G*(bt-y)-t(Y)-ft)/(G-D*D/(2*Y))}while(A(at)>x&&--yt>0);return[Xe/(b(bt)*(G-1/c(bt))),a($e)*bt]};var K=e(17889);function re(Xe){var $e=2*v/Xe;function at(ft,bt){var yt=(0,K.N)(ft,bt);if(A(ft)>g){var D=T(yt[1],yt[0]),Y=C(yt[0]*yt[0]+yt[1]*yt[1]),q=$e*i((D-g)/$e)+g,ne=T(c(D-=q),2-b(D));D=q+E(v/Y*c(ne))-ne,yt[0]=Y*b(D),yt[1]=Y*c(D)}return yt}return at.invert=function(ft,bt){var yt=C(ft*ft+bt*bt);if(yt>g){var D=T(bt,ft),Y=$e*i((D-g)/$e)+g,q=D>Y?-1:1,ne=yt*b(Y-D),pe=1/p(q*L((ne-v)/C(v*(v-2*ne)+yt*yt)));D=Y+2*l((pe+q*C(pe*pe-3))/3),ft=yt*b(D),bt=yt*c(D)}return K.N.invert(ft,bt)},at}function ee(){var Xe=5,$e=(0,k.r)(re),at=$e(Xe),ft=at.stream,bt=.01,yt=-b(bt*_),D=c(bt*_);return at.lobes=function(Y){return arguments.length?$e(Xe=+Y):Xe},at.stream=function(Y){var q=at.rotate(),ne=ft(Y),pe=(at.rotate([0,0]),ft(Y));return at.rotate(q),ne.sphere=function(){pe.polygonStart(),pe.lineStart();for(var Le=0,Ne=360/Xe,qe=2*v/Xe,et=90-180/Xe,vt=g;Le<Xe;++Le,et-=Ne,vt-=qe)pe.point(T(D*b(vt),yt)*S,E(D*c(vt))*S),et<-90?(pe.point(-90,-180-et-bt),pe.point(-90,-180-et+bt)):(pe.point(90,et+bt),pe.point(90,et-bt));pe.lineEnd(),pe.polygonEnd()},ne},at.scale(87.8076).center([0,17.1875]).clipAngle(179.999)}var ie=e(12956);function oe(Xe,$e){if(arguments.length<2&&($e=Xe),1===$e)return ie.l;if($e===1/0)return ce;function at(ft,bt){var yt=(0,ie.l)(ft/$e,bt);return yt[0]*=Xe,yt}return at.invert=function(ft,bt){var yt=ie.l.invert(ft/Xe,bt);return yt[0]*=$e,yt},at}function ce(Xe,$e){return[Xe*b($e)/b($e/=2),2*c($e)]}function me(){var Xe=2,$e=(0,k.r)(oe),at=$e(Xe);return at.coefficient=function(ft){return arguments.length?$e(Xe=+ft):Xe},at.scale(169.529)}function de(Xe,$e,at){var ft,bt,yt,D=100;at=void 0===at?0:+at,$e=+$e;do{(bt=Xe(at))===(yt=Xe(at+f))&&(yt=bt+f),at-=ft=-1e-6*(bt-$e)/(bt-yt)}while(D-- >0&&A(ft)>f);return D<0?NaN:at}function he(Xe,$e,at){return void 0===$e&&($e=40),void 0===at&&(at=x),function(ft,bt,yt,D){var Y,q,ne;yt=void 0===yt?0:+yt,D=void 0===D?0:+D;for(var pe=0;pe<$e;pe++){var Le=Xe(yt,D),Ne=Le[0]-ft,qe=Le[1]-bt;if(A(Ne)<at&&A(qe)<at)break;var et=Ne*Ne+qe*qe;if(et>Y)yt-=q/=2,D-=ne/=2;else{Y=et;var vt=(yt>0?-1:1)*at,xt=(D>0?-1:1)*at,te=Xe(yt+vt,D),ue=Xe(yt,D+xt),we=(te[0]-Le[0])/vt,Oe=(te[1]-Le[1])/vt,De=(ue[0]-Le[0])/xt,Ue=(ue[1]-Le[1])/xt,Ze=Ue*we-Oe*De,Je=(A(Ze)<.5?.5:1)/Ze;if(yt+=q=(qe*De-Ne*Ue)*Je,D+=ne=(Ne*Oe-qe*we)*Je,A(q)<at&&A(ne)<at)break}}return[yt,D]}}function ve(){var Xe=oe(1.68,2);function $e(at,ft){if(at+ft<-1.4){var bt=(at-ft+1.6)*(at+ft+1.4)/8;at+=bt,ft-=.8*bt*c(ft+v/2)}var yt=Xe(at,ft),D=(1-b(at*ft))/12;return yt[1]<0&&(yt[0]*=1+D),yt[1]>0&&(yt[1]*=1+D/1.5*yt[0]*yt[0]),yt}return $e.invert=he($e),$e}function Pe(){return(0,k.Z)(ve()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function xe(Xe,$e){var at,ft=Xe*c($e),bt=30;do{$e-=at=($e+c($e)-ft)/(1+b($e))}while(A(at)>f&&--bt>0);return $e/2}function ke(Xe,$e,at){function ft(bt,yt){return[Xe*bt*b(yt=xe(at,yt)),$e*c(yt)]}return ft.invert=function(bt,yt){return yt=E(yt/$e),[bt/(Xe*b(yt)),E((2*yt+c(2*yt))/at)]},ft}ce.invert=function(Xe,$e){var at=2*E($e/2);return[Xe*b(at/2)/b(at),at]};var Ae=ke(m/g,m,v);function Te(){return(0,k.Z)(Ae).scale(169.529)}var Q=2.00276,se=1.11072;function fe(Xe,$e){var at=xe(v,$e);return[Q*Xe/(1/b($e)+se/b(at)),($e+m*c(at))/Q]}function ye(){return(0,k.Z)(fe).scale(160.857)}function Me(Xe){var $e=0,at=(0,k.r)(Xe),ft=at($e);return ft.parallel=function(bt){return arguments.length?at($e=bt*_):$e*S},ft}function Ie(Xe,$e){return[Xe*b($e),$e]}function Ce(){return(0,k.Z)(Ie).scale(152.63)}function Re(Xe){if(!Xe)return Ie;var $e=1/p(Xe);function at(ft,bt){var yt=$e+Xe-bt,D=yt&&ft*b(bt)/yt;return[yt*c(D),$e-yt*b(D)]}return at.invert=function(ft,bt){var yt=C(ft*ft+(bt=$e-bt)*bt),D=$e+Xe-yt;return[yt/b(D)*T(ft,bt),D]},at}function le(){return Me(Re).scale(123.082).center([0,26.1441]).parallel(45)}function ge(Xe){function $e(at,ft){var bt=g-ft,yt=bt&&at*Xe*c(bt)/bt;return[bt*c(yt)/Xe,g-bt*b(yt)]}return $e.invert=function(at,ft){var bt=at*Xe,yt=g-ft,D=C(bt*bt+yt*yt),Y=T(bt,yt);return[(D?D/c(D):1)*Y/Xe,g-D]},$e}function _e(){var Xe=.5,$e=(0,k.r)(ge),at=$e(Xe);return at.fraction=function(ft){return arguments.length?$e(Xe=+ft):Xe},at.scale(158.837)}fe.invert=function(Xe,$e){var at,ft,bt=Q*$e,yt=$e<0?-y:y,D=25;do{ft=bt-m*c(yt),yt-=at=(c(2*yt)+2*yt-v*c(ft))/(2*b(2*yt)+2+v*b(ft)*m*b(yt))}while(A(at)>f&&--D>0);return ft=bt-m*c(yt),[Xe*(1/b(ft)+se/b(yt))/Q,ft]},Ie.invert=function(Xe,$e){return[Xe/b($e),$e]};var Fe=ke(1,4/v,v);function Ve(){return(0,k.Z)(Fe).scale(152.63)}var He=e(66624),nt=e(49386);function tt(Xe,$e,at,ft,bt,yt){var D,Y=b(yt);if(A(Xe)>1||A(yt)>1)D=L(at*bt+$e*ft*Y);else{var q=c(Xe/2),ne=c(yt/2);D=2*E(C(q*q+$e*ft*ne*ne))}return A(D)>f?[D,T(ft*c(yt),$e*bt-at*ft*Y)]:[0,0]}function ot(Xe,$e,at){return L((Xe*Xe+$e*$e-at*at)/(2*Xe*$e))}function dt(Xe){return Xe-2*v*s((Xe+v)/(2*v))}function kt(Xe,$e,at){for(var ft,bt=[[Xe[0],Xe[1],c(Xe[1]),b(Xe[1])],[$e[0],$e[1],c($e[1]),b($e[1])],[at[0],at[1],c(at[1]),b(at[1])]],yt=bt[2],D=0;D<3;++D,yt=ft)yt.v=tt((ft=bt[D])[1]-yt[1],yt[3],yt[2],ft[3],ft[2],ft[0]-yt[0]),yt.point=[0,0];var Y=ot(bt[0].v[0],bt[2].v[0],bt[1].v[0]),q=ot(bt[0].v[0],bt[1].v[0],bt[2].v[0]),ne=v-Y;bt[2].point[1]=0,bt[0].point[0]=-(bt[1].point[0]=bt[0].v[0]/2);var pe=[bt[2].point[0]=bt[0].point[0]+bt[2].v[0]*b(Y),2*(bt[0].point[1]=bt[1].point[1]=bt[2].v[0]*c(Y))];return function(Le,Ne){var qe,et=c(Ne),vt=b(Ne),xt=new Array(3);for(qe=0;qe<3;++qe){var te=bt[qe];if(xt[qe]=tt(Ne-te[1],te[3],te[2],vt,et,Le-te[0]),!xt[qe][0])return te.point;xt[qe][1]=dt(xt[qe][1]-te.v[1])}var ue=pe.slice();for(qe=0;qe<3;++qe){var Oe=ot(bt[qe].v[0],xt[qe][0],xt[2==qe?0:qe+1][0]);xt[qe][1]<0&&(Oe=-Oe),qe?1==qe?(ue[0]-=xt[qe][0]*b(Oe=q-Oe),ue[1]-=xt[qe][0]*c(Oe)):(ue[0]+=xt[qe][0]*b(Oe=ne-Oe),ue[1]+=xt[qe][0]*c(Oe)):(ue[0]+=xt[qe][0]*b(Oe),ue[1]-=xt[qe][0]*c(Oe))}return ue[0]/=3,ue[1]/=3,ue}}function mt(Xe){return Xe[0]*=_,Xe[1]*=_,Xe}function wt(){return Lt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Lt(Xe,$e,at){var ft=(0,He.Z)({type:"MultiPoint",coordinates:[Xe,$e,at]}),bt=[-ft[0],-ft[1]],yt=(0,nt.Z)(bt),D=kt(mt(yt(Xe)),mt(yt($e)),mt(yt(at)));D.invert=he(D);var Y=(0,k.Z)(D).rotate(bt),q=Y.center;return delete Y.rotate,Y.center=function(ne){return arguments.length?q(yt(ne)):yt.invert(q())},Y.clipAngle(90)}function Ct(Xe,$e){var at=C(1-c($e));return[2/w*Xe*at,w*(1-at)]}function It(){return(0,k.Z)(Ct).scale(95.6464).center([0,30])}function Ut(Xe){var $e=p(Xe);function at(ft,bt){return[ft,(ft?ft/c(ft):1)*(c(bt)*b(ft)-$e*b(bt))]}return at.invert=$e?function(ft,bt){ft&&(bt*=c(ft)/ft);var yt=b(ft);return[ft,2*T(C(yt*yt+$e*$e-bt*bt)-yt,$e-bt)]}:function(ft,bt){return[ft,E(ft?bt*p(ft)/ft:bt)]},at}function Rt(){return Me(Ut).scale(249.828).clipAngle(90)}Ct.invert=function(Xe,$e){var at=(at=$e/w-1)*at;return[at>0?Xe*C(v/at)/2:0,E(1-at)]};var Ge=C(3);function We(Xe,$e){return[Ge*Xe*(2*b(2*$e/3)-1)/w,Ge*w*c($e/3)]}function Be(){return(0,k.Z)(We).scale(156.19)}function Ye(Xe){var $e=b(Xe);function at(ft,bt){return[ft*$e,c(bt)/$e]}return at.invert=function(ft,bt){return[ft/$e,E(bt*$e)]},at}function rt(){return Me(Ye).parallel(38.58).scale(195.044)}function Se(Xe){var $e=b(Xe);function at(ft,bt){return[ft*$e,(1+$e)*p(bt/2)]}return at.invert=function(ft,bt){return[ft/$e,2*l(bt/(1+$e))]},at}function ze(){return Me(Se).scale(124.75)}function Ke(Xe,$e){var at=C(8/(3*v));return[at*Xe*(1-A($e)/v),at*$e]}function st(){return(0,k.Z)(Ke).scale(165.664)}function ct(Xe,$e){var at=C(4-3*c(A($e)));return[2/C(6*v)*Xe*at,a($e)*C(2*v/3)*(2-at)]}function Tt(){return(0,k.Z)(ct).scale(165.664)}function Et(Xe,$e){var at=C(v*(4+v));return[2/at*Xe*(1+C(1-4*$e*$e/(v*v))),4/at*$e]}function At(){return(0,k.Z)(Et).scale(180.739)}function ht(Xe,$e){var at=(2+g)*c($e);$e/=2;for(var ft=0,bt=1/0;ft<10&&A(bt)>f;ft++){var yt=b($e);$e-=bt=($e+c($e)*(yt+2)-at)/(2*yt*(1+yt))}return[2/C(v*(4+v))*Xe*(1+b($e)),2*C(v/(4+v))*c($e)]}function pt(){return(0,k.Z)(ht).scale(180.739)}function gt(Xe,$e){return[Xe*(1+b($e))/C(2+v),2*$e/C(2+v)]}function Pt(){return(0,k.Z)(gt).scale(173.044)}function Ot(Xe,$e){for(var at=(1+g)*c($e),ft=0,bt=1/0;ft<10&&A(bt)>f;ft++)$e-=bt=($e+c($e)-at)/(1+b($e));return at=C(2+v),[Xe*(1+b($e))/at,2*$e/at]}function Ht(){return(0,k.Z)(Ot).scale(173.044)}We.invert=function(Xe,$e){var at=3*E($e/(Ge*w));return[w*Xe/(Ge*(2*b(2*at/3)-1)),at]},Ke.invert=function(Xe,$e){var at=C(8/(3*v)),ft=$e/at;return[Xe/(at*(1-A(ft)/v)),ft]},ct.invert=function(Xe,$e){var at=2-A($e)/C(2*v/3);return[Xe*C(6*v)/(2*at),a($e)*E((4-at*at)/3)]},Et.invert=function(Xe,$e){var at=C(v*(4+v))/2;return[Xe*at/(1+C(1-$e*$e*(4+v)/(4*v))),$e*at/2]},ht.invert=function(Xe,$e){var at=$e*C((4+v)/v)/2,ft=E(at),bt=b(ft);return[Xe/(2/C(v*(4+v))*(1+bt)),E((ft+at*(bt+2))/(2+g))]},gt.invert=function(Xe,$e){var at=C(2+v),ft=$e*at/2;return[at*Xe/(1+b(ft)),ft]},Ot.invert=function(Xe,$e){var at=1+g,ft=C(at/2);return[2*Xe*ft/(1+b($e*=ft)),E(($e+c($e))/at)]};var jt=3+2*m;function Nt(Xe,$e){var at=c(Xe/=2),ft=b(Xe),bt=C(b($e)),yt=b($e/=2),D=c($e)/(yt+m*ft*bt),Y=C(2/(1+D*D)),q=C((m*yt+(ft+at)*bt)/(m*yt+(ft-at)*bt));return[jt*(Y*(q-1/q)-2*t(q)),jt*(Y*D*(q+1/q)-2*l(D))]}function Gt(){return(0,k.Z)(Nt).scale(62.5271)}Nt.invert=function(Xe,$e){if(!(at=j.invert(Xe/1.2,1.065*$e)))return null;var at,ft=at[0],bt=at[1],yt=20;Xe/=jt,$e/=jt;do{var D=ft/2,Y=bt/2,q=c(D),ne=b(D),pe=c(Y),Le=b(Y),Ne=b(bt),qe=C(Ne),et=pe/(Le+m*ne*qe),vt=et*et,xt=C(2/(1+vt)),te=(m*Le+(ne+q)*qe)/(m*Le+(ne-q)*qe),ue=C(te),we=ue-1/ue,Oe=ue+1/ue,De=xt*we-2*t(ue)-Xe,Ue=xt*et*Oe-2*l(et)-$e,Ze=pe&&h*qe*q*vt/pe,Je=(m*ne*Le+qe)/(2*(Le+m*ne*qe)*(Le+m*ne*qe)*qe),it=-.5*et*xt*xt*xt,ut=it*Ze,St=it*Je,Dt=(Dt=2*Le+m*qe*(ne-q))*Dt*ue,Ft=(m*ne*Le*qe+Ne)/Dt,Yt=-m*q*pe/(qe*Dt),ln=we*ut-2*Ft/ue+xt*(Ft+Ft/te),Xt=we*St-2*Yt/ue+xt*(Yt+Yt/te),en=et*Oe*ut-2*Ze/(1+vt)+xt*Oe*Ze+xt*et*(Ft-Ft/te),Jt=et*Oe*St-2*Je/(1+vt)+xt*Oe*Je+xt*et*(Yt-Yt/te),bn=Xt*en-Jt*ln;if(!bn)break;var gn=(Ue*Xt-De*Jt)/bn,Qt=(De*en-Ue*ln)/bn;ft-=gn,bt=o(-g,r(g,bt-Qt))}while((A(gn)>f||A(Qt)>f)&&--yt>0);return A(A(bt)-g)<f?[0,bt]:yt&&[ft,bt]};var un=b(35*_);function pn(Xe,$e){var at=p($e/2);return[Xe*un*C(1-at*at),(1+un)*at]}function Kt(){return(0,k.Z)(pn).scale(137.152)}function wn(Xe,$e){var at=$e/2,ft=b(at);return[2*Xe/w*b($e)*ft*ft,w*p(at)]}function Bn(){return(0,k.Z)(wn).scale(135.264)}function vn(Xe){var $e=1-Xe,at=bt(v,0)[0]-bt(-v,0)[0],ft=C(2*(bt(0,g)[1]-bt(0,-g)[1])/at);function bt(Y,q){var ne=b(q),pe=c(q);return[ne/($e+Xe*ne)*Y,$e*q+Xe*pe]}function yt(Y,q){var ne=bt(Y,q);return[ne[0]*ft,ne[1]/ft]}function D(Y){return yt(0,Y)[1]}return yt.invert=function(Y,q){var ne=de(D,q);return[Y/ft*(Xe+$e/b(ne)),ne]},yt}function cn(){var Xe=.5,$e=(0,k.r)(vn),at=$e(Xe);return at.alpha=function(ft){return arguments.length?$e(Xe=+ft):Xe},at.scale(168.725)}pn.invert=function(Xe,$e){var at=$e/(1+un);return[Xe&&Xe/(un*C(1-at*at)),2*l(at)]},wn.invert=function(Xe,$e){var at=l($e/w),ft=b(at),bt=2*at;return[Xe*w/2/(b(bt)*ft*ft),bt]};var dn=e(57962),sn=e(97492);function hn(Xe){return[Xe[0]/2,E(p(Xe[1]/2*_))*S]}function En(Xe){return[2*Xe[0],2*l(c(Xe[1]*_))*S]}function Mn(Xe){null==Xe&&(Xe=dn.Z);var $e=Xe(),at=(0,sn.Z)().scale(S).precision(0).clipAngle(null).translate([0,0]);function ft(yt){return $e(hn(yt))}function bt(yt){ft[yt]=function(){return arguments.length?($e[yt].apply($e,arguments),ft):$e[yt]()}}return $e.invert&&(ft.invert=function(yt){return En($e.invert(yt))}),ft.stream=function(yt){var D=$e.stream(yt),Y=at.stream({point:function(q,ne){D.point(q/2,E(p(-ne/2*_))*S)},lineStart:function(){D.lineStart()},lineEnd:function(){D.lineEnd()},polygonStart:function(){D.polygonStart()},polygonEnd:function(){D.polygonEnd()}});return Y.sphere=D.sphere,Y},ft.rotate=function(yt){return arguments.length?(at.rotate(yt),ft):at.rotate()},ft.center=function(yt){return arguments.length?($e.center(hn(yt)),ft):En($e.center())},bt("angle"),bt("clipAngle"),bt("clipExtent"),bt("fitExtent"),bt("fitHeight"),bt("fitSize"),bt("fitWidth"),bt("scale"),bt("translate"),bt("precision"),ft.scale(249.5)}function Rn(Xe,$e){var at=2*v/$e,ft=Xe*Xe;function bt(yt,D){var Y=(0,K.N)(yt,D),q=Y[0],ne=Y[1],pe=q*q+ne*ne;if(pe>ft){var Le=C(pe),Ne=T(ne,q),qe=at*i(Ne/at),et=Ne-qe,vt=Xe*b(et),xt=(Xe*c(et)-et*c(vt))/(g-vt),te=Nn(et,xt),ue=(v-Xe)/Fn(te,vt,v);q=Le;var we,Oe=50;do{q-=we=(Xe+Fn(te,vt,q)*ue-Le)/(te(q)*ue)}while(A(we)>f&&--Oe>0);ne=et*c(q),q<g&&(ne-=xt*(q-g));var De=c(qe),Ue=b(qe);Y[0]=q*Ue-ne*De,Y[1]=q*De+ne*Ue}return Y}return bt.invert=function(yt,D){var Y=yt*yt+D*D;if(Y>ft){var q=C(Y),ne=T(D,yt),pe=at*i(ne/at),Le=ne-pe;yt=q*b(Le),D=q*c(Le);for(var Ne=yt-g,qe=c(yt),et=D/qe,vt=yt<g?1/0:0,xt=10;;){var te=Xe*c(et),ue=Xe*b(et),we=c(ue),Oe=g-ue,De=(te-et*we)/Oe,Ue=Nn(et,De);if(A(vt)<x||! --xt)break;et-=vt=(et*qe-De*Ne-D)/(qe-2*Ne*(Oe*(ue+et*te*b(ue)-we)-te*(te-et*we))/(Oe*Oe))}yt=(q=Xe+Fn(Ue,ue,yt)*(v-Xe)/Fn(Ue,ue,v))*b(ne=pe+et),D=q*c(ne)}return K.N.invert(yt,D)},bt}function Nn(Xe,$e){return function(at){var ft=Xe*b(at);return at<g&&(ft-=$e),C(1+ft*ft)}}function Fn(Xe,$e,at){for(var ft=(at-$e)/50,bt=Xe($e)+Xe(at),yt=1,D=$e;yt<50;++yt)bt+=2*Xe(D+=ft);return.5*bt*ft}function rr(){var Xe=6,$e=30*_,at=b($e),ft=c($e),bt=(0,k.r)(Rn),yt=bt($e,Xe),D=yt.stream,Y=-b(.01*_),q=c(.01*_);return yt.radius=function(ne){return arguments.length?(at=b($e=ne*_),ft=c($e),bt($e,Xe)):$e*S},yt.lobes=function(ne){return arguments.length?bt($e,Xe=+ne):Xe},yt.stream=function(ne){var pe=yt.rotate(),Le=D(ne),Ne=(yt.rotate([0,0]),D(ne));return yt.rotate(pe),Le.sphere=function(){Ne.polygonStart(),Ne.lineStart();for(var qe=0,et=2*v/Xe,vt=0;qe<Xe;++qe,vt-=et)Ne.point(T(q*b(vt),Y)*S,E(q*c(vt))*S),Ne.point(T(ft*b(vt-et/2),at)*S,E(ft*c(vt-et/2))*S);Ne.lineEnd(),Ne.polygonEnd()},Le},yt.rotate([90,-40]).scale(91.7095).clipAngle(179.999)}function $n(Xe,$e,at,ft,bt,yt,D,Y){function q(ne,pe){if(!pe)return[Xe*ne/v,0];var Le=pe*pe,Ne=Xe+Le*($e+Le*(at+Le*ft)),qe=pe*(bt-1+Le*(yt-Y+Le*D)),et=(Ne*Ne+qe*qe)/(2*qe),vt=ne*E(Ne/et)/v;return[et*c(vt),pe*(1+Le*Y)+et*(1-b(vt))]}return arguments.length<8&&(Y=0),q.invert=function(ne,pe){var Le,Ne,qe=v*ne/Xe,et=pe,vt=50;do{var xt=et*et,te=Xe+xt*($e+xt*(at+xt*ft)),ue=et*(bt-1+xt*(yt-Y+xt*D)),we=te*te+ue*ue,Oe=2*ue,De=we/Oe,Ue=De*De,Ze=E(te/De)/v,Je=qe*Ze,it=te*te,ut=(2*$e+xt*(4*at+6*xt*ft))*et,St=bt+xt*(3*yt+5*xt*D),Dt=(2*(te*ut+ue*(St-1))*Oe-we*(2*(St-1)))/(Oe*Oe),Ft=b(Je),Yt=c(Je),ln=De*Ft,Xt=De*Yt,en=qe/v*(1/C(1-it/Ue))*(ut*De-te*Dt)/Ue,Jt=Xt-ne,bn=et*(1+xt*Y)+De-ln-pe,gn=Dt*Yt+ln*en,Qt=ln*Ze,Pn=1+Dt-(Dt*Ft-Xt*en),Dn=Xt*Ze,Xn=gn*Dn-Pn*Qt;if(!Xn)break;qe-=Le=(bn*gn-Jt*Pn)/Xn,et-=Ne=(Jt*Dn-bn*Qt)/Xn}while((A(Le)>f||A(Ne)>f)&&--vt>0);return[qe,et]},q}var mr=$n(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function fr(){return(0,k.Z)(mr).scale(149.995)}var Zn=$n(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function qn(){return(0,k.Z)(Zn).scale(153.93)}var ur=$n(5/6*v,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Zt(){return(0,k.Z)(ur).scale(130.945)}function nn(Xe,$e){var at=Xe*Xe,ft=$e*$e;return[Xe*(1-.162388*ft)*(.87-952426e-9*at*at),$e*(1+ft/12)]}function zn(){return(0,k.Z)(nn).scale(131.747)}nn.invert=function(Xe,$e){var at,ft=Xe,bt=$e,yt=50;do{var D=bt*bt;bt-=at=(bt*(1+D/12)-$e)/(1+D/4)}while(A(at)>f&&--yt>0);yt=50,Xe/=1-.162388*D;do{var Y=(Y=ft*ft)*Y;ft-=at=(ft*(.87-952426e-9*Y)-Xe)/(.87-.00476213*Y)}while(A(at)>f&&--yt>0);return[ft,bt]};var _n=$n(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Cn(){return(0,k.Z)(_n).scale(131.087)}function Un(Xe){var $e=Xe(g,0)[0]-Xe(-g,0)[0];function at(ft,bt){var yt=ft>0?-.5:.5,D=Xe(ft+yt*v,bt);return D[0]-=yt*$e,D}return Xe.invert&&(at.invert=function(ft,bt){var yt=ft>0?-.5:.5,D=Xe.invert(ft+yt*$e,bt),Y=D[0]-yt*v;return Y<-v?Y+=2*v:Y>v&&(Y-=2*v),D[0]=Y,D}),at}function Gn(Xe,$e){var at=a(Xe),ft=a($e),bt=b($e),yt=b(Xe)*bt,D=c(Xe)*bt,Y=c(ft*$e);Xe=A(T(D,Y)),$e=E(yt),A(Xe-g)>f&&(Xe%=g);var q=function(ne,pe){if(pe===g)return[0,0];var Le,Ne,qe=c(pe),et=qe*qe,vt=et*et,xt=1+vt,te=1+3*vt,ue=1-vt,we=E(1/C(xt)),Oe=ue+et*xt*we,De=(1-qe)/Oe,Ue=C(De),Ze=De*xt,Je=C(Ze),it=Ue*ue;if(0===ne)return[0,-(it+et*Je)];var ut,St=b(pe),Dt=1/St,Ft=2*qe*St,Yt=(-Oe*St-(-3*et+we*te)*Ft*(1-qe))/(Oe*Oe),ln=-Dt*Ft,Xt=-Dt*(et*xt*Yt+De*te*Ft),en=-2*Dt*(ue*(.5*Yt/Ue)-2*et*Ue*Ft),Jt=4*ne/v;if(ne>.222*v||pe<v/4&&ne>.175*v){if(Le=(it+et*C(Ze*(1+vt)-it*it))/(1+vt),ne>v/4)return[Le,Le];var bn=Le,gn=.5*Le;Le=.5*(gn+bn),Ne=50;do{var Qt=Le*(en+ln*C(Ze-Le*Le))+Xt*E(Le/Je)-Jt;if(!Qt)break;Qt<0?gn=Le:bn=Le,Le=.5*(gn+bn)}while(A(bn-gn)>f&&--Ne>0)}else{Le=f,Ne=25;do{var Pn=Le*Le,Dn=C(Ze-Pn),Xn=en+ln*Dn,Jn=Le*Xn+Xt*E(Le/Je)-Jt;Le-=ut=Dn?Jn/(Xn+(Xt-ln*Pn)/Dn):0}while(A(ut)>f&&--Ne>0)}return[Le,-it-et*C(Ze-Le*Le)]}(Xe>v/4?g-Xe:Xe,$e);return Xe>v/4&&(Y=q[0],q[0]=-q[1],q[1]=-Y),q[0]*=at,q[1]*=-ft,q}function ar(){return(0,k.Z)(Un(Gn)).scale(239.75)}function yr(Xe,$e){var at,ft,bt,yt,D,Y;if($e<f)return[(yt=c(Xe))-(at=$e*(Xe-yt*(ft=b(Xe)))/4)*ft,ft+at*yt,1-$e*yt*yt/2,Xe-at];if($e>=.999999)return at=(1-$e)/4,bt=1/(ft=I(Xe)),[(yt=((Y=d(2*(Y=Xe)))-1)/(Y+1))+at*((D=ft*P(Xe))-Xe)/(ft*ft),bt-at*yt*bt*(D-Xe),bt+at*yt*bt*(D+Xe),2*l(d(Xe))-g+at*(D-Xe)/ft];var q=[1,0,0,0,0,0,0,0,0],ne=[C($e),0,0,0,0,0,0,0,0],pe=0;for(ft=C(1-$e),D=1;A(ne[pe]/q[pe])>f&&pe<8;)at=q[pe++],ne[pe]=(at-ft)/2,q[pe]=(at+ft)/2,ft=C(at*ft),D*=2;bt=D*q[pe]*Xe;do{bt=(E(yt=ne[pe]*c(ft=bt)/q[pe])+bt)/2}while(--pe);return[c(bt),yt=b(bt),yt/b(bt-ft),bt]}function $t(Xe,$e){if(!$e)return Xe;if(1===$e)return t(p(Xe/2+y));for(var at=1,ft=C(1-$e),bt=C($e),yt=0;A(bt)>f;yt++){if(Xe%v){var D=l(ft*p(Xe)/at);D<0&&(D+=v),Xe+=D+~~(Xe/v)*v}else Xe+=Xe;bt=(at+ft)/2,ft=C(at*ft),bt=((at=bt)-ft)/2}return Xe/(n(2,yt)*at)}function kn(Xe,$e){var ne,pe,Le,Ne,qe,at=(m-1)/(m+1),ft=C(1-at*at),bt=$t(g,ft*ft),yt=t(p(v/4+A($e)/2)),D=d(-1*yt)/C(at),Y=(ne=D*b(-1*Xe),Ne=(pe=D*c(-1*Xe))+1,[.5*((ne>=0?g:-g)-T(qe=1-(Le=ne*ne)-pe*pe,2*ne)),-.25*t(qe*qe+4*Le)+.5*t(Ne*Ne+Le)]),q=function(ne,pe,Le){var Ne=A(ne),qe=P(A(pe));if(Ne){var et=1/c(Ne),vt=1/(p(Ne)*p(Ne)),xt=-(vt+Le*(qe*qe*et*et)-1+Le),te=(-xt+C(xt*xt-(Le-1)*vt*4))/2;return[$t(l(1/C(te)),Le)*a(ne),$t(l(C((te/vt-1)/Le)),1-Le)*a(pe)]}return[0,$t(l(qe),1-Le)*a(pe)]}(Y[0],Y[1],ft*ft);return[-q[1],($e>=0?1:-1)*(.5*bt-q[0])]}function zt(){return(0,k.Z)(Un(kn)).scale(151.496)}Gn.invert=function(Xe,$e){A(Xe)>1&&(Xe=2*a(Xe)-Xe),A($e)>1&&($e=2*a($e)-$e);var at=a(Xe),ft=a($e),bt=-at*Xe,yt=-ft*$e,D=yt/bt<1,Y=function(Le,Ne){for(var qe=0,et=1,vt=.5,xt=50;;){var te=vt*vt,ue=C(vt),we=E(1/C(1+te)),Oe=1-te+vt*(1+te)*we,De=(1-ue)/Oe,Ue=C(De),Ze=De*(1+te),Je=Ue*(1-te),it=C(Ze-Le*Le),ut=Ne+Je+vt*it;if(A(et-qe)<x||0==--xt||0===ut)break;ut>0?qe=vt:et=vt,vt=.5*(qe+et)}if(!xt)return null;var St=E(ue),Dt=b(St),Ft=1/Dt,Yt=2*ue*Dt,ln=(-Oe*Dt-(-3*vt+we*(1+3*te))*Yt*(1-ue))/(Oe*Oe);return[v/4*(Le*(-2*Ft*(.5*ln/Ue*(1-te)-2*vt*Ue*Yt)+-Ft*Yt*it)+-Ft*(vt*(1+te)*ln+De*(1+3*te)*Yt)*E(Le/C(Ze))),St]}(D?yt:bt,D?bt:yt),q=Y[0],ne=Y[1],pe=b(ne);return D&&(q=-g-q),[at*(T(c(q)*pe,-c(ne))+v),ft*E(b(q)*pe)]},kn.invert=function(Xe,$e){var at,ft,bt,yt,D,Y,Ne,qe,et,q=(m-1)/(m+1),ne=C(1-q*q),pe=(ft=-Xe,bt=ne*ne,(at=.5*$t(g,ne*ne)-$e)?(yt=yr(at,bt),ft?(Y=(D=yr(ft,1-bt))[1]*D[1]+bt*yt[0]*yt[0]*D[0]*D[0],[[yt[0]*D[2]/Y,yt[1]*yt[2]*D[0]*D[1]/Y],[yt[1]*D[1]/Y,-yt[0]*yt[2]*D[0]*D[2]/Y],[yt[2]*D[1]*D[2]/Y,-bt*yt[0]*yt[1]*D[0]/Y]]):[[yt[0],0],[yt[1],0],[yt[2],0]]):[[0,(D=yr(ft,1-bt))[0]/D[1]],[1/D[1],0],[D[2]/D[1],0]]),Le=[((Ne=pe[0])[0]*(qe=pe[1])[0]+Ne[1]*qe[1])/(et=qe[0]*qe[0]+qe[1]*qe[1]),(Ne[1]*qe[0]-Ne[0]*qe[1])/et];return[T(Le[1],Le[0])/-1,2*l(d(-.5*t(q*Le[0]*Le[0]+q*Le[1]*Le[1])))-g]};var Wt=e(7613);function tn(Xe){var $e=c(Xe),at=b(Xe),ft=Sn(Xe);function bt(yt,D){var Y=ft(yt,D);yt=Y[0];var q=c(D=Y[1]),ne=b(D),pe=b(yt),Le=L($e*q+at*ne*pe),Ne=c(Le),qe=A(Ne)>f?Le/Ne:1;return[qe*at*c(yt),(A(yt)>g?qe:-qe)*($e*ne-at*q*pe)]}return ft.invert=Sn(-Xe),bt.invert=function(yt,D){var Y=C(yt*yt+D*D),q=-c(Y),ne=b(Y),pe=Y*ne,Le=-D*q,Ne=Y*$e,qe=C(pe*pe+Le*Le-Ne*Ne),et=T(pe*Ne+Le*qe,Le*Ne-pe*qe),vt=(Y>g?-1:1)*T(yt*q,Y*b(et)*ne+D*c(et)*q);return ft.invert(vt,et)},bt}function Sn(Xe){var $e=c(Xe),at=b(Xe);return function(ft,bt){var yt=b(bt),D=b(ft)*yt,Y=c(ft)*yt,q=c(bt);return[T(Y,D*at-q*$e),E(q*at+D*$e)]}}function An(){var Xe=0,$e=(0,k.r)(tn),at=$e(Xe),ft=at.rotate,bt=at.stream,yt=(0,Wt.Z)();return at.parallel=function(D){if(!arguments.length)return Xe*S;var Y=at.rotate();return $e(Xe=D*_).rotate(Y)},at.rotate=function(D){return arguments.length?(ft.call(at,[D[0],D[1]-Xe*S]),yt.center([-D[0],-D[1]]),at):((D=ft.call(at))[1]+=Xe*S,D)},at.stream=function(D){return(D=bt(D)).sphere=function(){D.polygonStart();var Y,q=yt.radius(89.99)().coordinates[0],ne=q.length-1,pe=-1;for(D.lineStart();++pe<ne;)D.point((Y=q[pe])[0],Y[1]);for(D.lineEnd(),ne=(q=yt.radius(90.01)().coordinates[0]).length-1,D.lineStart();--pe>=0;)D.point((Y=q[pe])[0],Y[1]);D.lineEnd(),D.polygonEnd()},D},at.scale(79.4187).parallel(45).clipAngle(179.999)}var Tn=e(33064),an=e(72736),mn=E(1-1/3)*S,on=Ye(0);function fn(Xe){var $e=mn*_,at=Ct(v,$e)[0]-Ct(-v,$e)[0],ft=on(0,$e)[1],bt=Ct(0,$e)[1],yt=w-bt,D=u/Xe,Y=4/u,q=ft+yt*yt*4/u;function ne(pe,Le){var Ne,qe=A(Le);if(qe>$e){var et=r(Xe-1,o(0,s((pe+v)/D)));(Ne=Ct(pe+=v*(Xe-1)/Xe-et*D,qe))[0]=Ne[0]*u/at-u*(Xe-1)/(2*Xe)+et*u/Xe,Ne[1]=ft+4*(Ne[1]-bt)*yt/u,Le<0&&(Ne[1]=-Ne[1])}else Ne=on(pe,Le);return Ne[0]*=Y,Ne[1]/=q,Ne}return ne.invert=function(pe,Le){pe/=Y;var Ne=A(Le*=q);if(Ne>ft){var qe=r(Xe-1,o(0,s((pe+v)/D))),et=Ct.invert(pe=(pe+v*(Xe-1)/Xe-qe*D)*at/u,.25*(Ne-ft)*u/yt+bt);return et[0]-=v*(Xe-1)/Xe-qe*D,Le<0&&(et[1]=-et[1]),et}return on.invert(pe,Le)},ne}function yn(Xe,$e){return[Xe,1&$e?89.999999:mn]}function Ln(Xe,$e){return[Xe,1&$e?-89.999999:-mn]}function Hn(Xe){return[.999999*Xe[0],Xe[1]]}function Wn(){var Xe=4,$e=(0,k.r)(fn),at=$e(Xe),ft=at.stream;return at.lobes=function(bt){return arguments.length?$e(Xe=+bt):Xe},at.stream=function(bt){var yt=at.rotate(),D=ft(bt),Y=(at.rotate([0,0]),ft(bt));return at.rotate(yt),D.sphere=function(){var q,ne;(0,an.Z)((ne=[].concat((0,Tn.w6)(-180,180+(q=180/Xe)/2,q).map(yn),(0,Tn.w6)(180,-180-q/2,-q).map(Ln)),{type:"Polygon",coordinates:[180===q?ne.map(Hn):ne]}),Y)},D},at.scale(239.75)}function Kn(Xe){var $e,at=1+Xe,ft=E(c(1/at)),bt=2*C(v/($e=v+4*ft*at)),yt=.5*bt*(at+C(Xe*(2+Xe))),D=Xe*Xe,Y=at*at;function q(ne,pe){var Le,Ne,qe=1-c(pe);if(qe&&qe<2){var et,vt=g-pe,xt=25;do{var te=c(vt),ue=b(vt),we=ft+T(te,at-ue),Oe=1+Y-2*at*ue;vt-=et=(vt-D*ft-at*te+Oe*we-.5*qe*$e)/(2*at*te*we)}while(A(et)>x&&--xt>0);Le=bt*C(Oe),Ne=ne*we/v}else Le=bt*(Xe+qe),Ne=ne*ft/v;return[Le*c(Ne),yt-Le*b(Ne)]}return q.invert=function(ne,pe){var Le=ne*ne+(pe-=yt)*pe,Ne=(1+Y-Le/(bt*bt))/(2*at),qe=L(Ne),et=c(qe),vt=ft+T(et,at-Ne);return[E(ne/C(Le))*v/vt,E(1-2*(qe-D*ft-at*et+(1+Y-2*at*Ne)*vt)/$e)]},q}function nr(){var Xe=1,$e=(0,k.r)(Kn),at=$e(Xe);return at.ratio=function(ft){return arguments.length?$e(Xe=+ft):Xe},at.scale(167.774).center([0,18.67])}var er=.7109889596207567,or=.0528035274542;function ir(Xe,$e){return $e>-er?((Xe=Ae(Xe,$e))[1]+=or,Xe):Ie(Xe,$e)}function lr(){return(0,k.Z)(ir).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function br(Xe,$e){return A($e)>er?((Xe=Ae(Xe,$e))[1]-=$e>0?or:-or,Xe):Ie(Xe,$e)}function Ur(){return(0,k.Z)(br).scale(152.63)}function Sr(Xe,$e,at,ft){var bt=C(4*v/(2*at+(1+Xe-$e/2)*c(2*at)+(Xe+$e)/2*c(4*at)+$e/2*c(6*at))),yt=C(ft*c(at)*C((1+Xe*b(2*at)+$e*b(4*at))/(1+Xe+$e))),D=at*q(1);function Y(Le){return C(1+Xe*b(2*Le)+$e*b(4*Le))}function q(Le){var Ne=Le*at;return(2*Ne+(1+Xe-$e/2)*c(2*Ne)+(Xe+$e)/2*c(4*Ne)+$e/2*c(6*Ne))/at}function ne(Le){return Y(Le)*c(Le)}var pe=function(Le,Ne){var qe=at*de(q,D*c(Ne)/at,Ne/v);isNaN(qe)&&(qe=at*a(Ne));var et=bt*Y(qe);return[et*yt*Le/v*b(qe),et/yt*c(qe)]};return pe.invert=function(Le,Ne){var qe=de(ne,Ne*yt/bt);return[Le*v/(b(qe)*bt*yt*Y(qe)),E(at*q(qe/at)/D)]},0===at&&(bt=C(ft/v),(pe=function(Le,Ne){return[Le*bt,c(Ne)/bt]}).invert=function(Le,Ne){return[Le/bt,E(Ne*bt)]}),pe}function cr(){var Xe=1,$e=0,at=45*_,ft=2,bt=(0,k.r)(Sr),yt=bt(Xe,$e,at,ft);return yt.a=function(D){return arguments.length?bt(Xe=+D,$e,at,ft):Xe},yt.b=function(D){return arguments.length?bt(Xe,$e=+D,at,ft):$e},yt.psiMax=function(D){return arguments.length?bt(Xe,$e,at=+D*_,ft):at*S},yt.ratio=function(D){return arguments.length?bt(Xe,$e,at,ft=+D):ft},yt.scale(180.739)}function Lr(Xe,$e,at,ft,bt,yt,D,Y,q,ne,pe){if(pe.nanEncountered)return NaN;var Le,Ne,qe,et,vt,xt,te,ue,we,Oe;if(Ne=Xe($e+.25*(Le=at-$e)),qe=Xe(at-.25*Le),isNaN(Ne))pe.nanEncountered=!0;else{if(!isNaN(qe))return Oe=((xt=(et=Le*(ft+4*Ne+bt)/12)+(vt=Le*(bt+4*qe+yt)/12))-D)/15,ne>q?(pe.maxDepthCount++,xt+Oe):Math.abs(Oe)<Y?xt+Oe:(ue=Lr(Xe,$e,te=$e+.5*Le,ft,Ne,bt,et,.5*Y,q,ne+1,pe),isNaN(ue)?(pe.nanEncountered=!0,NaN):(we=Lr(Xe,te,at,bt,qe,yt,vt,.5*Y,q,ne+1,pe),isNaN(we)?(pe.nanEncountered=!0,NaN):ue+we));pe.nanEncountered=!0}}function Rr(Xe,$e,at,ft,bt){void 0===ft&&(ft=1e-8),void 0===bt&&(bt=20);var yt=Xe($e),D=Xe(.5*($e+at)),Y=Xe(at);return Lr(Xe,$e,at,yt,D,Y,(yt+4*D+Y)*(at-$e)/6,ft,bt,1,{maxDepthCount:0,nanEncountered:!1})}function li(Xe,$e,at){function ft(qe){return Xe+(1-Xe)*n(1-n(qe,$e),1/$e)}function bt(qe){return Rr(ft,0,qe,1e-4)}for(var yt=1/bt(1),D=1e3,Y=1.00000001*yt,q=[],ne=0;ne<=D;ne++)q.push(bt(ne/D)*Y);function pe(qe){var et=0,vt=D,xt=500;do{q[xt]>qe?vt=xt:et=xt,xt=et+vt>>1}while(xt>et);var te=q[xt+1]-q[xt];return te&&(te=(qe-q[xt+1])/te),(xt+1+te)/D}var Le=2*pe(1)/v*yt/at,Ne=function(qe,et){var vt=pe(A(c(et))),xt=ft(vt)*qe;return vt/=Le,[xt,et>=0?vt:-vt]};return Ne.invert=function(qe,et){var vt;return A(et*=Le)<1&&(vt=a(et)*E(bt(A(et))*yt)),[qe/ft(A(et)),vt]},Ne}function Mi(){var Xe=0,$e=2.5,at=1.183136,ft=(0,k.r)(li),bt=ft(Xe,$e,at);return bt.alpha=function(yt){return arguments.length?ft(Xe=+yt,$e,at):Xe},bt.k=function(yt){return arguments.length?ft(Xe,$e=+yt,at):$e},bt.gamma=function(yt){return arguments.length?ft(Xe,$e,at=+yt):at},bt.scale(152.63)}function Pi(Xe,$e){return A(Xe[0]-$e[0])<f&&A(Xe[1]-$e[1])<f}function Ea(Xe,$e){for(var at,ft,bt,yt=-1,D=Xe.length,Y=Xe[0],q=[];++yt<D;){ft=((at=Xe[yt])[0]-Y[0])/$e,bt=(at[1]-Y[1])/$e;for(var ne=0;ne<$e;++ne)q.push([Y[0]+ne*ft,Y[1]+ne*bt]);Y=at}return q.push(at),q}function vi(Xe,$e,at){var ft,bt;function yt(q,ne){for(var pe=ne<0?-1:1,Le=$e[+(ne<0)],Ne=0,qe=Le.length-1;Ne<qe&&q>Le[Ne][2][0];++Ne);var et=Xe(q-Le[Ne][1][0],ne);return et[0]+=Xe(Le[Ne][1][0],pe*ne>pe*Le[Ne][0][1]?Le[Ne][0][1]:ne)[0],et}at?yt.invert=at(yt):Xe.invert&&(yt.invert=function(q,ne){for(var pe=bt[+(ne<0)],Le=$e[+(ne<0)],Ne=0,qe=pe.length;Ne<qe;++Ne){var et=pe[Ne];if(et[0][0]<=q&&q<et[1][0]&&et[0][1]<=ne&&ne<et[1][1]){var vt=Xe.invert(q-Xe(Le[Ne][1][0],0)[0],ne);return vt[0]+=Le[Ne][1][0],Pi(yt(vt[0],vt[1]),[q,ne])?vt:null}}});var D=(0,k.Z)(yt),Y=D.stream;return D.stream=function(q){var ne=D.rotate(),pe=Y(q),Le=(D.rotate([0,0]),Y(q));return D.rotate(ne),pe.sphere=function(){(0,an.Z)(ft,Le)},pe},D.lobes=function(q){return arguments.length?(ft=function Ui(Xe){var $e,at,bt,yt,Y,q=[],ne=Xe[0].length;for(Y=0;Y<ne;++Y)at=($e=Xe[0][Y])[0][0],q.push(Ea([[at+f,$e[0][1]+f],[at+f,(bt=$e[1][1])-f],[(yt=$e[2][0])-f,bt-f],[yt-f,$e[2][1]+f]],30));for(Y=Xe[1].length-1;Y>=0;--Y)at=($e=Xe[1][Y])[0][0],q.push(Ea([[(yt=$e[2][0])-f,$e[2][1]-f],[yt-f,(bt=$e[1][1])+f],[at+f,bt+f],[at+f,$e[0][1]-f]],30));return{type:"Polygon",coordinates:[(0,Tn.TS)(q)]}}(q),$e=q.map(function(ne){return ne.map(function(pe){return[[pe[0][0]*_,pe[0][1]*_],[pe[1][0]*_,pe[1][1]*_],[pe[2][0]*_,pe[2][1]*_]]})}),bt=$e.map(function(ne){return ne.map(function(pe){var Le,Ne=Xe(pe[0][0],pe[0][1])[0],qe=Xe(pe[2][0],pe[2][1])[0],et=Xe(pe[1][0],pe[0][1])[1],vt=Xe(pe[1][0],pe[1][1])[1];return et>vt&&(Le=et,et=vt,vt=Le),[[Ne,et],[qe,vt]]})}),D):$e.map(function(ne){return ne.map(function(pe){return[[pe[0][0]*S,pe[0][1]*S],[pe[1][0]*S,pe[1][1]*S],[pe[2][0]*S,pe[2][1]*S]]})})},null!=$e&&D.lobes($e),D}ir.invert=function(Xe,$e){return $e>-er?Ae.invert(Xe,$e-or):Ie.invert(Xe,$e)},br.invert=function(Xe,$e){return A($e)>er?Ae.invert(Xe,$e+($e>0?or:-or)):Ie.invert(Xe,$e)};var La=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function to(){return vi(fe,La).scale(160.857)}var qo=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Go(){return vi(br,qo).scale(152.63)}var il=[[[[-180,0],[-100,90],[-40,0]],[[-40,0],[30,90],[180,0]]],[[[-180,0],[-160,-90],[-100,0]],[[-100,0],[-60,-90],[-20,0]],[[-20,0],[20,-90],[80,0]],[[80,0],[140,-90],[180,0]]]];function Us(){return vi(Ae,il).scale(169.529)}var Zo=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ta(){return vi(Ae,Zo).scale(169.529).rotate([20,0])}var Vs=[[[[-180,35],[-30,90],[0,35]],[[0,35],[30,90],[180,35]]],[[[-180,-10],[-102,-90],[-65,-10]],[[-65,-10],[5,-90],[77,-10]],[[77,-10],[103,-90],[180,-10]]]];function zi(){return vi(ir,Vs,he).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var ss=[[[[-180,0],[-110,90],[-40,0]],[[-40,0],[0,90],[40,0]],[[40,0],[110,90],[180,0]]],[[[-180,0],[-110,-90],[-40,0]],[[-40,0],[0,-90],[40,0]],[[40,0],[110,-90],[180,0]]]];function ma(){return vi(Ie,ss).scale(152.63).rotate([-20,0])}function ka(Xe,$e){return[3/u*Xe*C(v*v/3-$e*$e),$e]}function vo(){return(0,k.Z)(ka).scale(158.837)}function Qr(Xe){function $e(at,ft){if(A(A(ft)-g)<f)return[0,ft<0?-2:2];var bt=c(ft),yt=n((1+bt)/(1-bt),Xe/2),D=.5*(yt+1/yt)+b(at*=Xe);return[2*c(at)/D,(yt-1/yt)/D]}return $e.invert=function(at,ft){var bt=A(ft);if(A(bt-2)<f)return at?null:[0,a(ft)*g];if(bt>2)return null;var yt=(at/=2)*at,D=(ft/=2)*ft,Y=2*ft/(1+yt+D);return Y=n((1+Y)/(1-Y),1/Xe),[T(2*at,1-yt-D)/Xe,E((Y-1)/(Y+1))]},$e}function mo(){var Xe=.5,$e=(0,k.r)(Qr),at=$e(Xe);return at.spacing=function(ft){return arguments.length?$e(Xe=+ft):Xe},at.scale(124.75)}ka.invert=function(Xe,$e){return[u/3*Xe/C(v*v/3-$e*$e),$e]};var Ca=v/m;function Ua(Xe,$e){return[Xe*(1+C(b($e)))/2,$e/(b($e/2)*b(Xe/6))]}function Ya(){return(0,k.Z)(Ua).scale(97.2672)}function ls(Xe,$e){var at=Xe*Xe,ft=$e*$e;return[Xe*(.975534+ft*(-.0143059*at-.119161+-.0547009*ft)),$e*(1.00384+at*(.0802894+-.02855*ft+199025e-9*at)+ft*(.0998909+-.0491032*ft))]}function al(){return(0,k.Z)(ls).scale(139.98)}function no(Xe,$e){return[c(Xe)/b($e),p($e)*b(Xe)]}function ol(){return(0,k.Z)(no).scale(144.049).clipAngle(89.999)}function sl(Xe){var $e=b(Xe),at=p(y+Xe/2);function ft(bt,yt){var D=yt-Xe,Y=A(D)<f?bt*$e:A(Y=y+yt/2)<f||A(A(Y)-g)<f?0:bt*D/t(p(Y)/at);return[Y,D]}return ft.invert=function(bt,yt){var D,Y=yt+Xe;return[A(yt)<f?bt/$e:A(D=y+Y/2)<f||A(A(D)-g)<f?0:bt*t(p(D)/at)/yt,Y]},ft}function ml(){return Me(sl).parallel(40).scale(158.837)}function Hs(Xe,$e){return[Xe,1.25*t(p(y+.4*$e))]}function ll(){return(0,k.Z)(Hs).scale(108.318)}function qs(Xe){var $e=Xe.length-1;function at(ft,bt){for(var yt,D=b(bt),Y=2/(1+D*b(ft)),q=Y*D*c(ft),ne=Y*c(bt),pe=$e,Le=Xe[pe],Ne=Le[0],qe=Le[1];--pe>=0;)Ne=(Le=Xe[pe])[0]+q*(yt=Ne)-ne*qe,qe=Le[1]+q*qe+ne*yt;return[Ne=q*(yt=Ne)-ne*qe,qe=q*qe+ne*yt]}return at.invert=function(ft,bt){var yt=20,D=ft,Y=bt;do{for(var q,ne=$e,pe=Xe[ne],Le=pe[0],Ne=pe[1],qe=0,et=0;--ne>=0;)qe=Le+D*(q=qe)-Y*et,et=Ne+D*et+Y*q,Le=(pe=Xe[ne])[0]+D*(q=Le)-Y*Ne,Ne=pe[1]+D*Ne+Y*q;var vt,xt,te=(qe=Le+D*(q=qe)-Y*et)*qe+(et=Ne+D*et+Y*q)*et;D-=vt=((Le=D*(q=Le)-Y*Ne-ft)*qe+(Ne=D*Ne+Y*q-bt)*et)/te,Y-=xt=(Ne*qe-Le*et)/te}while(A(vt)+A(xt)>1e-12&&--yt>0);if(yt){var ue=C(D*D+Y*Y),we=2*l(.5*ue),Oe=c(we);return[T(D*Oe,ue*b(we)),ue?E(Y*Oe/ue):0]}},at}Ua.invert=function(Xe,$e){var at=A(Xe),ft=A($e),bt=f,yt=g;ft<Ca?yt*=ft/Ca:bt+=6*L(Ca/ft);for(var D=0;D<25;D++){var Y=c(yt),q=C(b(yt)),ne=c(yt/2),pe=b(yt/2),Le=c(bt/6),Ne=b(bt/6),qe=.5*bt*(1+q)-at,et=yt/(pe*Ne)-ft,vt=q?-.25*bt*Y/q:0,xt=.5*(1+q),te=(1+.5*yt*ne/pe)/(pe*Ne),ue=yt/pe*(Le/6)/(Ne*Ne),we=vt*ue-te*xt,Oe=(qe*ue-et*xt)/we,De=(et*vt-qe*te)/we;if(yt-=Oe,bt-=De,A(Oe)<f&&A(De)<f)break}return[Xe<0?-bt:bt,$e<0?-yt:yt]},ls.invert=function(Xe,$e){var at=a(Xe)*v,ft=$e/2,bt=50;do{var yt=at*at,D=ft*ft,Y=at*ft,q=at*(.975534+D*(-.0143059*yt-.119161+-.0547009*D))-Xe,ne=ft*(1.00384+yt*(.0802894+-.02855*D+199025e-9*yt)+D*(.0998909+-.0491032*D))-$e,pe=.975534-D*(.119161+3*yt*.0143059+.0547009*D),Le=-Y*(.238322+.2188036*D+.0286118*yt),Ne=Y*(.1605788+7961e-7*yt+-.0571*D),qe=1.00384+yt*(.0802894+199025e-9*yt)+D*(3*(.0998909-.02855*yt)-.245516*D),et=Le*Ne-qe*pe,vt=(ne*Le-q*qe)/et,xt=(q*Ne-ne*pe)/et;at-=vt,ft-=xt}while((A(vt)>f||A(xt)>f)&&--bt>0);return bt&&[at,ft]},no.invert=function(Xe,$e){var at=Xe*Xe,ft=$e*$e+1,bt=at+ft,yt=Xe?h*C((bt-C(bt*bt-4*at))/at):1/C(ft);return[E(Xe*yt),a($e)*L(yt)]},Hs.invert=function(Xe,$e){return[Xe,2.5*l(d(.8*$e))-.625*v]};var ro=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],io=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Wo=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],ao=[[.9245,0],[0,0],[.01943,0]],Gs=[[.721316,0],[0,0],[-.00881625,-.00617325]];function Zs(){return Po(ro,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function Co(){return Po(io,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Ms(){return Po(Wo,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function yo(){return Po(ao,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Yo(){return Po(Gs,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function Po(Xe,$e){var at=(0,k.Z)(qs(Xe)).rotate($e).clipAngle(90),ft=(0,nt.Z)($e),bt=at.center;return delete at.rotate,at.center=function(yt){return arguments.length?bt(ft(yt)):ft.invert(bt())},at}var oo=C(6),ei=C(7);function xo(Xe,$e){var at=E(7*c($e)/(3*oo));return[oo*Xe*(2*b(2*at/3)-1)/ei,9*c(at/3)/ei]}function yl(){return(0,k.Z)(xo).scale(164.859)}function Ss(Xe,$e){for(var at,ft=(1+h)*c($e),bt=$e,yt=0;yt<25&&(bt-=at=(c(bt/2)+c(bt)-ft)/(.5*b(bt/2)+b(bt)),!(A(at)<f));yt++);return[Xe*(1+2*b(bt)/b(bt/2))/(3*m),2*C(3)*c(bt/2)/C(2+m)]}function us(){return(0,k.Z)(Ss).scale(188.209)}function Oo(Xe,$e){for(var at,ft=C(6/(4+v)),bt=(1+v/4)*c($e),yt=$e/2,D=0;D<25&&(yt-=at=(yt/2+c(yt)-bt)/(.5+b(yt)),!(A(at)<f));D++);return[ft*(.5+b(yt))*Xe/1.5,ft*yt]}function Xo(){return(0,k.Z)(Oo).scale(166.518)}xo.invert=function(Xe,$e){var at=3*E($e*ei/9);return[Xe*ei/(oo*(2*b(2*at/3)-1)),E(3*c(at)*oo/7)]},Ss.invert=function(Xe,$e){var at=$e*C(2+m)/(2*C(3)),ft=2*E(at);return[3*m*Xe/(1+2*b(ft)/b(ft/2)),E((at+c(ft))/(1+h))]},Oo.invert=function(Xe,$e){var at=C(6/(4+v)),ft=$e/at;return A(A(ft)-g)<f&&(ft=ft<0?-g:g),[1.5*Xe/(at*(.5+b(ft))),E((ft/2+c(ft))/(1+v/4))]};var Pa=e(26867);function Ws(Xe,$e){var at=$e*$e,ft=at*at,bt=at*ft;return[Xe*(.84719-.13063*at+bt*bt*(.05494*at-.04515-.02326*ft+.00331*bt)),$e*(1.01183+ft*ft*(.01926*at-.02625-.00396*ft))]}function cs(){return(0,k.Z)(Ws).scale(175.295)}function Jo(Xe,$e){return[Xe*(1+b($e))/2,2*($e-p($e/2))]}function fs(){return(0,k.Z)(Jo).scale(152.63)}Ws.invert=function(Xe,$e){var at,ft,bt,yt,D=$e,Y=25;do{D-=at=(D*(1.01183+(bt=(ft=D*D)*ft)*bt*(.01926*ft-.02625-.00396*bt))-$e)/(1.01183+bt*bt*(.21186*ft-.23625+-.05148*bt))}while(A(at)>x&&--Y>0);return[Xe/(.84719-.13063*(ft=D*D)+(yt=ft*(bt=ft*ft))*yt*(.05494*ft-.04515-.02326*bt+.00331*yt)),D]},Jo.invert=function(Xe,$e){for(var at=$e/2,ft=0,bt=1/0;ft<10&&A(bt)>f;++ft){var yt=b($e/2);$e-=bt=($e-p($e/2)-at)/(1-.5/(yt*yt))}return[2*Xe/(1+b($e)),$e]};var Io=[[[[-180,0],[-90,90],[0,0]],[[0,0],[90,90],[180,0]]],[[[-180,0],[-90,-90],[0,0]],[[0,0],[90,-90],[180,0]]]];function Ro(){return vi(oe(1/0),Io).rotate([20,0]).scale(152.63)}function Ko(Xe,$e){var at=c($e),ft=b($e),bt=a(Xe);if(0===Xe||A($e)===g)return[0,$e];if(0===$e)return[Xe,0];if(A(Xe)===g)return[Xe*ft,g*at];var yt=v/(2*Xe)-2*Xe/v,D=2*$e/v,Y=(1-D*D)/(at-D),q=yt*yt,ne=Y*Y,pe=1+q/ne,Le=1+ne/q,Ne=(yt*at/Y-yt/2)/pe,qe=(ne*at/q+Y/2)/Le,et=qe*qe-(ne*at*at/q+Y*at-1)/Le;return[g*(Ne+C(Ne*Ne+ft*ft/pe)*bt),g*(qe+C(et<0?0:et)*a(-$e*yt)*bt)]}function hs(){return(0,k.Z)(Ko).scale(127.267)}Ko.invert=function(Xe,$e){var at=(Xe/=g)*Xe,ft=at+($e/=g)*$e,bt=v*v;return[Xe?(ft-1+C((1-ft)*(1-ft)+4*at))/(2*Xe)*g:0,de(function(yt){return ft*(v*c(yt)-2*yt)*v+4*yt*yt*($e-c(yt))+2*v*yt-bt*$e},0)]};var ps=1.0148,Oa=.23185,ds=-.14499,gs=.02406,Ys=1.790857183;function bo(Xe,$e){var at=$e*$e;return[Xe,$e*(ps+at*at*(Oa+at*(ds+gs*at)))]}function Es(){return(0,k.Z)(bo).scale(139.319)}function vs(Xe,$e){if(A($e)<f)return[Xe,0];var at=p($e),ft=Xe*c($e);return[c(ft)/at,$e+(1-b(ft))/at]}function Xs(){return(0,k.Z)(vs).scale(103.74)}bo.invert=function(Xe,$e){$e>Ys?$e=Ys:$e<-1.790857183&&($e=-1.790857183);var at,ft=$e;do{var bt=ft*ft;ft-=at=(ft*(ps+bt*bt*(Oa+bt*(ds+gs*bt)))-$e)/(1.0148+bt*bt*(1.1592500000000001+bt*(.21654*bt-1.01493)))}while(A(at)>f);return[Xe,ft]},vs.invert=function(Xe,$e){if(A($e)<f)return[Xe,0];var at,ft=Xe*Xe+$e*$e,bt=.5*$e,yt=10;do{var D=p(bt),Y=1/b(bt),q=ft-2*$e*bt+bt*bt;bt-=at=(D*q+2*(bt-$e))/(2+q*Y*Y+2*(bt-$e)*D)}while(A(at)>f&&--yt>0);return D=p(bt),[(A($e)<A(bt+1/D)?E(Xe*D):a($e)*a(Xe)*(L(A(Xe*D))+g))/c(bt),bt]};var ms=e(77338),$o=e(83074);function zo(Xe,$e){return[Xe[0]*$e[0]+Xe[1]*$e[3],Xe[0]*$e[1]+Xe[1]*$e[4],Xe[0]*$e[2]+Xe[1]*$e[5]+Xe[2],Xe[3]*$e[0]+Xe[4]*$e[3],Xe[3]*$e[1]+Xe[4]*$e[4],Xe[3]*$e[2]+Xe[4]*$e[5]+Xe[5]]}function Do(Xe,$e){return[Xe[0]-$e[0],Xe[1]-$e[1]]}function ai(Xe){return C(Xe[0]*Xe[0]+Xe[1]*Xe[1])}function _o(Xe,$e,at){function ft(Y,q){var ne,pe=$e(Y,q),Le=pe.project([Y*S,q*S]);return(ne=pe.transform)?[ne[0]*Le[0]+ne[1]*Le[1]+ne[2],-(ne[3]*Le[0]+ne[4]*Le[1]+ne[5])]:(Le[1]=-Le[1],Le)}function bt(Y,q){var xt,te,ne=Y.project.invert,pe=Y.transform,Le=q;if(pe&&(Le=[(pe=[(te=1/((xt=pe)[0]*xt[4]-xt[1]*xt[3]))*xt[4],-te*xt[1],te*(xt[1]*xt[5]-xt[2]*xt[4]),-te*xt[3],te*xt[0],te*(xt[2]*xt[3]-xt[0]*xt[5])])[0]*Le[0]+pe[1]*Le[1]+pe[2],pe[3]*Le[0]+pe[4]*Le[1]+pe[5]]),ne&&Y===function(xt){return $e(xt[0]*_,xt[1]*_)}(Ne=ne(Le)))return Ne;for(var Ne,qe=Y.children,et=0,vt=qe&&qe.length;et<vt;++et)if(Ne=bt(qe[et],q))return Ne}(function Y(q,ne){if(q.edges=function(De){for(var Ue=De.length,Ze=[],Je=De[Ue-1],it=0;it<Ue;++it)Ze.push([Je,Je=De[it]]);return Ze}(q.face),ne.face){var pe=q.shared=function(De,Ue){for(var Ze,Je,it=De.length,ut=null,St=0;St<it;++St){Ze=De[St];for(var Dt=Ue.length;--Dt>=0;)if(Ze[0]===(Je=Ue[Dt])[0]&&Ze[1]===Je[1]){if(ut)return[ut,Ze];ut=Ze}}}(q.face,ne.face),Le=(vt=pe.map(ne.project),xt=pe.map(q.project),te=Do(vt[1],vt[0]),ue=Do(xt[1],xt[0]),we=T((De=te)[0]*(Ue=ue)[1]-De[1]*Ue[0],De[0]*Ue[0]+De[1]*Ue[1]),Oe=ai(te)/ai(ue),zo([1,0,vt[0][0],0,1,vt[0][1]],zo([Oe,0,0,0,Oe,0],zo([b(we),c(we),0,-c(we),b(we),0],[1,0,-xt[0][0],0,1,-xt[0][1]]))));q.transform=ne.transform?zo(ne.transform,Le):Le;for(var Ne=ne.edges,qe=0,et=Ne.length;qe<et;++qe)Zi(pe[0],Ne[qe][1])&&Zi(pe[1],Ne[qe][0])&&(Ne[qe]=q),Zi(pe[0],Ne[qe][0])&&Zi(pe[1],Ne[qe][1])&&(Ne[qe]=q);for(qe=0,et=(Ne=q.edges).length;qe<et;++qe)Zi(pe[0],Ne[qe][0])&&Zi(pe[1],Ne[qe][1])&&(Ne[qe]=ne),Zi(pe[0],Ne[qe][1])&&Zi(pe[1],Ne[qe][0])&&(Ne[qe]=ne)}else q.transform=ne.transform;var De,Ue,vt,xt,te,ue,we,Oe;return q.children&&q.children.forEach(function(De){Y(De,q)}),q})(Xe,{transform:null}),Xr(Xe)&&(ft.invert=function(Y,q){var ne=bt(Xe,[Y,-q]);return ne&&(ne[0]*=_,ne[1]*=_,ne)});var yt=(0,k.Z)(ft),D=yt.stream;return yt.stream=function(Y){var q=yt.rotate(),ne=D(Y),pe=(yt.rotate([0,0]),D(Y));return yt.rotate(q),ne.sphere=function(){pe.polygonStart(),pe.lineStart(),wo(pe,Xe),pe.lineEnd(),pe.polygonEnd()},ne},yt.angle(null==at?-30:at*S)}function wo(Xe,$e,at){var ft,bt,yt=$e.edges,D=yt.length,Y={type:"MultiPoint",coordinates:$e.face},q=$e.face.filter(function(vt){return 90!==A(vt[1])}),ne=(0,ms.Z)({type:"MultiPoint",coordinates:q}),pe=!1,Le=-1,Ne=ne[1][0]-ne[0][0],qe=180===Ne||360===Ne?[(ne[0][0]+ne[1][0])/2,(ne[0][1]+ne[1][1])/2]:(0,He.Z)(Y);if(at)for(;++Le<D&&yt[Le]!==at;);++Le;for(var et=0;et<D;++et)bt=yt[(et+Le)%D],Array.isArray(bt)?(pe||(Xe.point((ft=(0,$o.Z)(bt[0],qe)(f))[0],ft[1]),pe=!0),Xe.point((ft=(0,$o.Z)(bt[1],qe)(f))[0],ft[1])):(pe=!1,bt!==at&&wo(Xe,bt,$e))}function Zi(Xe,$e){return Xe&&$e&&Xe[0]===$e[0]&&Xe[1]===$e[1]}function Xr(Xe){return Xe.project.invert||Xe.children&&Xe.children.some(Xr)}var Kr=e(98936),so=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],Xa=[[0,2,1],[0,3,2],[5,1,2],[5,2,3],[0,1,4],[0,4,3],[5,4,1],[5,3,4]].map(function(Xe){return Xe.map(function($e){return so[$e]})});function Ls(Xe){Xe=Xe||function(at){var ft=(0,He.Z)({type:"MultiPoint",coordinates:at});return(0,Kr.Z)().scale(1).translate([0,0]).rotate([-ft[0],-ft[1]])};var $e=Xa.map(function(at){return{face:at,project:Xe(at)}});return[-1,0,0,1,0,1,4,5].forEach(function(at,ft){var bt=$e[at];bt&&(bt.children||(bt.children=[])).push($e[ft])}),_o($e[0],function(at,ft){return $e[at<-v/2?ft<0?6:4:at<0?ft<0?2:0:at<v/2?ft<0?3:1:ft<0?7:5]}).angle(-30).scale(101.858).center([0,45])}var Js=2/C(3);function Fo(Xe,$e){var at=Ct(Xe,$e);return[at[0]*Js,at[1]]}function Ks(Xe){Xe=Xe||function(at){var ft=(0,He.Z)({type:"MultiPoint",coordinates:at});return(0,k.Z)(Fo).translate([0,0]).scale(1).rotate(ft[1]>0?[-ft[0],0]:[180-ft[0],180])};var $e=Xa.map(function(at){return{face:at,project:Xe(at)}});return[-1,0,0,1,0,1,4,5].forEach(function(at,ft){var bt=$e[at];bt&&(bt.children||(bt.children=[])).push($e[ft])}),_o($e[0],function(at,ft){return $e[at<-v/2?ft<0?6:4:at<0?ft<0?2:0:at<v/2?ft<0?3:1:ft<0?7:5]}).angle(-30).scale(121.906).center([0,48.5904])}function Bo(Xe){Xe=Xe||function(yt){var D=6===yt.length?(0,He.Z)({type:"MultiPoint",coordinates:yt}):yt[0];return(0,Kr.Z)().scale(1).translate([0,0]).rotate([-D[0],-D[1]])};var $e=Xa.map(function(yt){for(var D,Y=yt.map(mi),q=Y.length,ne=Y[q-1],pe=[],Le=0;Le<q;++Le)pe.push(No([.9486832980505138*ne[0]+.31622776601683794*(D=Y[Le])[0],.9486832980505138*ne[1]+.31622776601683794*D[1],.9486832980505138*ne[2]+.31622776601683794*D[2]]),No([.9486832980505138*D[0]+.31622776601683794*ne[0],.9486832980505138*D[1]+.31622776601683794*ne[1],.9486832980505138*D[2]+.31622776601683794*ne[2]])),ne=D;return pe}),at=[],ft=[-1,0,0,1,0,1,4,5];$e.forEach(function(yt,D){for(var Y,q,ne=Xa[D],pe=ne.length,Le=at[D]=[],Ne=0;Ne<pe;++Ne)$e.push([ne[Ne],yt[(2*Ne+2)%(2*pe)],yt[(2*Ne+1)%(2*pe)]]),ft.push(D),Le.push((Y=mi(yt[(2*Ne+2)%(2*pe)]),q=mi(yt[(2*Ne+1)%(2*pe)]),[Y[1]*q[2]-Y[2]*q[1],Y[2]*q[0]-Y[0]*q[2],Y[0]*q[1]-Y[1]*q[0]]))});var bt=$e.map(function(yt){return{project:Xe(yt),face:yt}});return ft.forEach(function(yt,D){var Y=bt[yt];Y&&(Y.children||(Y.children=[])).push(bt[D])}),_o(bt[0],function(yt,D){var Y=b(D),q=[Y*b(yt),Y*c(yt),c(D)],ne=yt<-v/2?D<0?6:4:yt<0?D<0?2:0:yt<v/2?D<0?3:1:D<0?7:5,pe=at[ne];return bt[lo(pe[0],q)<0?8+3*ne:lo(pe[1],q)<0?8+3*ne+1:lo(pe[2],q)<0?8+3*ne+2:ne]}).angle(-30).scale(110.625).center([0,45])}function lo(Xe,$e){for(var at=0,ft=Xe.length,bt=0;at<ft;++at)bt+=Xe[at]*$e[at];return bt}function No(Xe){return[T(Xe[1],Xe[0])*S,E(o(-1,r(1,Xe[2])))*S]}function mi(Xe){var $e=Xe[0]*_,at=Xe[1]*_,ft=b(at);return[ft*b($e),ft*c($e),c(at)]}function Ja(){}function jo(Xe,$e){var at,ft=$e.stream;if(!ft)throw new Error("invalid projection");switch(Xe&&Xe.type){case"Feature":at=Wi;break;case"FeatureCollection":at=Ii;break;default:at=Yi}return at(Xe,ft)}function Ii(Xe,$e){return{type:"FeatureCollection",features:Xe.features.map(function(at){return Wi(at,$e)})}}function Wi(Xe,$e){return{type:"Feature",id:Xe.id,properties:Xe.properties,geometry:Yi(Xe.geometry,$e)}}function Yi(Xe,$e){if(!Xe)return null;if("GeometryCollection"===Xe.type)return bt=$e,{type:"GeometryCollection",geometries:Xe.geometries.map(function(yt){return Yi(yt,bt)})};var bt,at;switch(Xe.type){case"Point":case"MultiPoint":at=To;break;case"LineString":case"MultiLineString":at=Ia;break;case"Polygon":case"MultiPolygon":case"Sphere":at=Di;break;default:return null}return(0,an.Z)(Xe,$e(at)),at.result()}Fo.invert=function(Xe,$e){return Ct.invert(Xe/Js,$e)};var qi=[],sa=[],To={point:function(Xe,$e){qi.push([Xe,$e])},result:function(){var Xe=qi.length?qi.length<2?{type:"Point",coordinates:qi[0]}:{type:"MultiPoint",coordinates:qi}:null;return qi=[],Xe}},Ia={lineStart:Ja,point:function(Xe,$e){qi.push([Xe,$e])},lineEnd:function(){qi.length&&(sa.push(qi),qi=[])},result:function(){var Xe=sa.length?sa.length<2?{type:"LineString",coordinates:sa[0]}:{type:"MultiLineString",coordinates:sa}:null;return sa=[],Xe}},Di={polygonStart:Ja,lineStart:Ja,point:function(Xe,$e){qi.push([Xe,$e])},lineEnd:function(){var Xe=qi.length;if(Xe){do{qi.push(qi[0].slice())}while(++Xe<4);sa.push(qi),qi=[]}},polygonEnd:Ja,result:function(){if(!sa.length)return null;var Xe=[],$e=[];return sa.forEach(function(at){!function(ft){if((bt=ft.length)<4)return!1;for(var bt,yt=0,D=ft[bt-1][1]*ft[0][0]-ft[bt-1][0]*ft[0][1];++yt<bt;)D+=ft[yt-1][1]*ft[yt][0]-ft[yt-1][0]*ft[yt][1];return D<=0}(at)?$e.push(at):Xe.push([at])}),$e.forEach(function(at){var ft=at[0];Xe.some(function(bt){if(function(yt,D){for(var Y=D[0],q=D[1],ne=!1,pe=0,Le=yt.length,Ne=Le-1;pe<Le;Ne=pe++){var qe=yt[pe],et=qe[0],vt=qe[1],xt=yt[Ne],ue=xt[1];vt>q^ue>q&&Y<(xt[0]-et)*(q-vt)/(ue-vt)+et&&(ne=!ne)}return ne}(bt[0],ft))return bt.push(at),!0})||Xe.push([at])}),sa=[],Xe.length?Xe.length>1?{type:"MultiPolygon",coordinates:Xe}:{type:"Polygon",coordinates:Xe[0]}:null}};function ya(Xe){var $e=Xe(g,0)[0]-Xe(-g,0)[0];function at(ft,bt){var yt=A(ft)<g,D=Xe(yt?ft:ft>0?ft-v:ft+v,bt),Y=(D[0]-D[1])*h,q=(D[0]+D[1])*h;if(yt)return[Y,q];var ne=$e*h,pe=Y>0^q>0?-1:1;return[pe*Y-a(q)*ne,pe*q-a(Y)*ne]}return Xe.invert&&(at.invert=function(ft,bt){var yt=(ft+bt)*h,D=(bt-ft)*h,Y=A(yt)<.5*$e&&A(D)<.5*$e;if(!Y){var q=$e*h,ne=yt>0^D>0?-1:1,pe=-ne*ft+(D>0?1:-1)*q,Le=-ne*bt+(yt>0?1:-1)*q;yt=(-pe-Le)*h,D=(pe-Le)*h}var Ne=Xe.invert(yt,D);return Y||(Ne[0]+=yt>0?v:-v),Ne}),(0,k.Z)(at).rotate([-90,-90,45]).clipAngle(179.999)}function Cs(){return ya(Gn).scale(176.423)}function Ps(){return ya(kn).scale(111.48)}function ia(Xe,$e){if(!(0<=($e=+$e)&&$e<=20))throw new Error("invalid digits");function at(ne){var pe=ne.length,Le=2,Ne=new Array(pe);for(Ne[0]=+ne[0].toFixed($e),Ne[1]=+ne[1].toFixed($e);Le<pe;)Ne[Le]=ne[Le],++Le;return Ne}function ft(ne){return ne.map(at)}function bt(ne){for(var pe=at(ne[0]),Le=[pe],Ne=1;Ne<ne.length;Ne++){var qe=at(ne[Ne]);(qe.length>2||qe[0]!=pe[0]||qe[1]!=pe[1])&&(Le.push(qe),pe=qe)}return 1===Le.length&&ne.length>1&&Le.push(at(ne[ne.length-1])),Le}function yt(ne){return ne.map(bt)}function D(ne){if(null==ne)return ne;var pe;switch(ne.type){case"GeometryCollection":pe={type:"GeometryCollection",geometries:ne.geometries.map(D)};break;case"Point":pe={type:"Point",coordinates:at(ne.coordinates)};break;case"MultiPoint":pe={type:ne.type,coordinates:ft(ne.coordinates)};break;case"LineString":pe={type:ne.type,coordinates:bt(ne.coordinates)};break;case"MultiLineString":case"Polygon":pe={type:ne.type,coordinates:yt(ne.coordinates)};break;case"MultiPolygon":pe={type:"MultiPolygon",coordinates:ne.coordinates.map(yt)};break;default:return ne}return null!=ne.bbox&&(pe.bbox=ne.bbox),pe}function Y(ne){var pe={type:"Feature",properties:ne.properties,geometry:D(ne.geometry)};return null!=ne.id&&(pe.id=ne.id),null!=ne.bbox&&(pe.bbox=ne.bbox),pe}if(null!=Xe)switch(Xe.type){case"Feature":return Y(Xe);case"FeatureCollection":var q={type:"FeatureCollection",features:Xe.features.map(Y)};return null!=Xe.bbox&&(q.bbox=Xe.bbox),q;default:return D(Xe)}return Xe}function _r(Xe){var $e=c(Xe);function at(ft,bt){var yt=$e?p(ft*$e/2)/$e:ft/2;if(!bt)return[2*yt,-Xe];var D=2*l(yt*c(bt)),Y=1/p(bt);return[c(D)*Y,bt+(1-b(D))*Y-Xe]}return at.invert=function(ft,bt){if(A(bt+=Xe)<f)return[$e?2*l($e*ft/2)/$e:ft,0];var yt,D=ft*ft+bt*bt,Y=0,q=10;do{var ne=p(Y),pe=1/b(Y),Le=D-2*bt*Y+Y*Y;Y-=yt=(ne*Le+2*(Y-bt))/(2+Le*pe*pe+2*(Y-bt)*ne)}while(A(yt)>f&&--q>0);var Ne=ft*(ne=p(Y)),qe=p(A(bt)<A(Y+1/ne)?.5*E(Ne):.5*L(Ne)+v/4)/c(Y);return[$e?2*l($e*qe)/$e:2*qe,Y]},at}function Uo(){return Me(_r).scale(131.215)}var la=[[.9986,-.062],[1,0],[.9986,.062],[.9954,.124],[.99,.186],[.9822,.248],[.973,.31],[.96,.372],[.9427,.434],[.9216,.4958],[.8962,.5571],[.8679,.6176],[.835,.6769],[.7986,.7346],[.7597,.7903],[.7186,.8435],[.6732,.8936],[.6213,.9394],[.5722,.9761],[.5322,1]];function Os(Xe,$e){var at,ft=r(18,36*A($e)/v),bt=s(ft),yt=ft-bt,D=(at=la[bt])[0],Y=at[1],q=(at=la[++bt])[0],ne=at[1],pe=(at=la[r(19,++bt)])[0],Le=at[1];return[Xe*(q+yt*(pe-D)/2+yt*yt*(pe-2*q+D)/2),($e>0?g:-g)*(ne+yt*(Le-Y)/2+yt*yt*(Le-2*ne+Y)/2)]}function Qo(){return(0,k.Z)(Os).scale(152.63)}function es(Xe,$e){var at=function(D){function Y(q,ne){var pe=b(ne),Le=(D-1)/(D-pe*b(q));return[Le*pe*c(q),Le*c(ne)]}return Y.invert=function(q,ne){var pe=q*q+ne*ne,Le=C(pe),Ne=(D-C(1-pe*(D+1)/(D-1)))/((D-1)/Le+Le/(D-1));return[T(q*Ne,Le*C(1-Ne*Ne)),Le?E(ne*Ne/Le):0]},Y}(Xe);if(!$e)return at;var ft=b($e),bt=c($e);function yt(D,Y){var q=at(D,Y),ne=q[1],pe=ne*bt/(Xe-1)+ft;return[q[0]*ft/pe,ne/pe]}return yt.invert=function(D,Y){var q=(Xe-1)/(Xe-1-Y*bt);return at.invert(q*D,q*Y*ft)},yt}function ts(){var Xe=2,$e=0,at=(0,k.r)(es),ft=at(Xe,$e);return ft.distance=function(bt){return arguments.length?at(Xe=+bt,$e):Xe},ft.tilt=function(bt){return arguments.length?at(Xe,$e=bt*_):$e*S},ft.scale(432.147).clipAngle(L(1/Xe)*S-1e-6)}la.forEach(function(Xe){Xe[1]*=1.0144}),Os.invert=function(Xe,$e){var at=$e/g,ft=90*at,bt=r(18,A(ft/5)),yt=o(0,s(bt));do{var D=la[yt][1],Y=la[yt+1][1],q=la[r(19,yt+2)][1],ne=q-D,pe=q-2*Y+D,Le=2*(A(at)-Y)/ne,Ne=pe/ne,qe=Le*(1-Ne*Le*(1-2*Ne*Le));if(qe>=0||1===yt){ft=($e>=0?5:-5)*(qe+bt);var et,vt=50;do{qe=(bt=r(18,A(ft)/5))-(yt=s(bt)),D=la[yt][1],Y=la[yt+1][1],q=la[r(19,yt+2)][1],ft-=(et=($e>=0?g:-g)*(Y+qe*(q-D)/2+qe*qe*(q-2*Y+D)/2)-$e)*S}while(A(et)>x&&--vt>0);break}}while(--yt>=0);var xt=la[yt][0],te=la[yt+1][0],ue=la[r(19,yt+2)][0];return[Xe/(te+qe*(ue-xt)/2+qe*qe*(ue-2*te+xt)/2),ft*_]};var wr=-179.9999,ns=179.9999,Ra=-89.9999,Is=89.9999;function ys(Xe){return Xe.length>0}function Xi(Xe){return-90===Xe||90===Xe?[0,Xe]:[-180,($e=Xe,Math.floor(1e4*$e)/1e4)];var $e}function Vo(Xe){var $e=Xe[0],at=Xe[1],ft=!1;return $e<=wr?($e=-180,ft=!0):$e>=ns&&($e=180,ft=!0),at<=Ra?(at=-90,ft=!0):at>=Is&&(at=90,ft=!0),ft?[$e,at]:Xe}function uo(Xe){return Xe.map(Vo)}function xa(Xe,$e,at){for(var ft=0,bt=Xe.length;ft<bt;++ft){var yt=Xe[ft].slice();at.push({index:-1,polygon:$e,ring:yt});for(var D=0,Y=yt.length;D<Y;++D){var q=yt[D],ne=q[0],pe=q[1];if(ne<=wr||ne>=ns||pe<=Ra||pe>=Is){yt[D]=Vo(q);for(var Le=D+1;Le<Y;++Le){var Ne=yt[Le],qe=Ne[0],et=Ne[1];if(qe>wr&&qe<ns&&et>Ra&&et<Is)break}if(Le===D+1)continue;if(D){var vt={index:-1,polygon:$e,ring:yt.slice(0,D+1)};vt.ring[vt.ring.length-1]=Xi(pe),at[at.length-1]=vt}else at.pop();if(Le>=Y)break;at.push({index:-1,polygon:$e,ring:yt=yt.slice(Le-1)}),yt[0]=Xi(yt[0][1]),D=-1,Y=yt.length}}}}function ko(Xe){var $e,at,ft,bt,yt,D,Y=Xe.length,q={},ne={};for($e=0;$e<Y;++$e)(ft=(at=Xe[$e]).ring[0])[0]!==(yt=at.ring[at.ring.length-1])[0]||ft[1]!==yt[1]?(at.index=$e,q[ft]=ne[yt]=at):(at.polygon.push(at.ring),Xe[$e]=null);for($e=0;$e<Y;++$e)if(at=Xe[$e]){if(bt=ne[ft=at.ring[0]],D=q[yt=at.ring[at.ring.length-1]],delete q[ft],delete ne[yt],ft[0]===yt[0]&&ft[1]===yt[1]){at.polygon.push(at.ring);continue}bt?(delete ne[ft],delete q[bt.ring[0]],bt.ring.pop(),Xe[bt.index]=null,at={index:-1,polygon:bt.polygon,ring:bt.ring.concat(at.ring)},bt===D?at.polygon.push(at.ring):(at.index=Y++,Xe.push(q[at.ring[0]]=ne[at.ring[at.ring.length-1]]=at))):D?(delete q[yt],delete ne[D.ring[D.ring.length-1]],at.ring.pop(),at={index:Y++,polygon:D.polygon,ring:at.ring.concat(D.ring)},Xe[D.index]=null,Xe.push(q[at.ring[0]]=ne[at.ring[at.ring.length-1]]=at)):(at.ring.push(at.ring[0]),at.polygon.push(at.ring))}}function Va(Xe){var $e={type:"Feature",geometry:za(Xe.geometry)};return null!=Xe.id&&($e.id=Xe.id),null!=Xe.bbox&&($e.bbox=Xe.bbox),null!=Xe.properties&&($e.properties=Xe.properties),$e}function za(Xe){if(null==Xe)return Xe;var $e,at,ft,bt;switch(Xe.type){case"GeometryCollection":$e={type:"GeometryCollection",geometries:Xe.geometries.map(za)};break;case"Point":$e={type:"Point",coordinates:Vo(Xe.coordinates)};break;case"MultiPoint":case"LineString":$e={type:Xe.type,coordinates:uo(Xe.coordinates)};break;case"MultiLineString":$e={type:"MultiLineString",coordinates:Xe.coordinates.map(uo)};break;case"Polygon":var yt=[];xa(Xe.coordinates,yt,at=[]),ko(at),$e={type:"Polygon",coordinates:yt};break;case"MultiPolygon":at=[],ft=-1,bt=Xe.coordinates.length;for(var D=new Array(bt);++ft<bt;)xa(Xe.coordinates[ft],D[ft]=[],at);ko(at),$e={type:"MultiPolygon",coordinates:D.filter(ys)};break;default:return Xe}return null!=Xe.bbox&&($e.bbox=Xe.bbox),$e}function Ho(Xe){if(null==Xe)return Xe;switch(Xe.type){case"Feature":return Va(Xe);case"FeatureCollection":var $e={type:"FeatureCollection",features:Xe.features.map(Va)};return null!=Xe.bbox&&($e.bbox=Xe.bbox),$e;default:return za(Xe)}}function Ji(Xe,$e){var at=p($e/2),ft=c(y*at);return[Xe*(.74482-.34588*ft*ft),1.70711*at]}function Da(){return(0,k.Z)(Ji).scale(146.153)}function ri(Xe,$e,at){var ft=(0,$o.Z)($e,at),bt=ft(.5),yt=(0,nt.Z)([-bt[0],-bt[1]])($e),D=ft.distance/2,Y=-E(c(yt[1]*_)/c(D)),q=[-bt[0],-bt[1],-(yt[0]>0?v-Y:Y)*S],ne=(0,k.Z)(Xe(D)).rotate(q),pe=(0,nt.Z)(q),Le=ne.center;return delete ne.rotate,ne.center=function(Ne){return arguments.length?Le(pe(Ne)):pe.invert(Le())},ne.clipAngle(90)}function xs(Xe){var $e=b(Xe);function at(ft,bt){var yt=(0,Kr.M)(ft,bt);return yt[0]*=$e,yt}return at.invert=function(ft,bt){return Kr.M.invert(ft/$e,bt)},at}function Aa(){return Fa([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Fa(Xe,$e){return ri(xs,Xe,$e)}function Ka(Xe){if(!(Xe*=2))return K.N;var $e=-Xe/2,at=-$e,ft=Xe*Xe,bt=p(at),yt=.5/c(at);function D(Y,q){var ne=L(b(q)*b(Y-$e)),pe=L(b(q)*b(Y-at));return[((ne*=ne)-(pe*=pe))/(2*Xe),(q<0?-1:1)*C(4*ft*pe-(ft-ne+pe)*(ft-ne+pe))/(2*Xe)]}return D.invert=function(Y,q){var ne,pe,Le=q*q,Ne=b(C(Le+(ne=Y+$e)*ne)),qe=b(C(Le+(ne=Y+at)*ne));return[T(pe=Ne-qe,ne=(Ne+qe)*bt),(q<0?-1:1)*L(C(ne*ne+pe*pe)*yt)]},D}function ua(){return ni([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function ni(Xe,$e){return ri(Ka,Xe,$e)}function Vi(Xe,$e){if(A($e)<f)return[Xe,0];var at=A($e/g),ft=E(at);if(A(Xe)<f||A(A($e)-g)<f)return[0,a($e)*v*p(ft/2)];var bt=b(ft),yt=A(v/Xe-Xe/v)/2,D=yt*yt,Y=bt/(at+bt-1),q=Y*(2/at-1),ne=q*q,pe=ne+D,Le=Y-ne,Ne=D+Y;return[a(Xe)*v*(yt*Le+C(D*Le*Le-pe*(Y*Y-ne)))/pe,a($e)*v*(q*Ne-yt*C((D+1)*pe-Ne*Ne))/pe]}function Ha(){return(0,k.Z)(Vi).scale(79.4183)}function ca(Xe,$e){if(A($e)<f)return[Xe,0];var at=A($e/g),ft=E(at);if(A(Xe)<f||A(A($e)-g)<f)return[0,a($e)*v*p(ft/2)];var bt=b(ft),yt=A(v/Xe-Xe/v)/2,D=yt*yt,Y=bt*(C(1+D)-yt*bt)/(1+D*at*at);return[a(Xe)*v*Y,a($e)*v*C(1-Y*(2*yt+Y))]}function $a(){return(0,k.Z)(ca).scale(79.4183)}function Ao(Xe,$e){if(A($e)<f)return[Xe,0];var at=$e/g,ft=E(at);if(A(Xe)<f||A(A($e)-g)<f)return[0,v*p(ft/2)];var bt=(v/Xe-Xe/v)/2,yt=at/(1+b(ft));return[v*(a(Xe)*C(bt*bt+1-yt*yt)-bt),v*yt]}function co(){return(0,k.Z)(Ao).scale(79.4183)}function Ki(Xe,$e){if(!$e)return[Xe,0];var at=A($e);if(!Xe||at===g)return[0,$e];var ft=at/g,bt=ft*ft,yt=(8*ft-bt*(bt+2)-5)/(2*bt*(ft-1)),D=yt*yt,Y=ft*yt,q=bt+D+2*Y,ne=ft+3*yt,pe=Xe/g,Le=pe+1/pe,Ne=a(A(Xe)-g)*C(Le*Le-4),qe=Ne*Ne,et=(Ne*(q+D-1)+2*C(q*(bt+D*qe-1)+(1-bt)*(bt*(ne*ne+4*D)+12*Y*D+4*D*D)))/(4*q+qe);return[a(Xe)*g*et,a($e)*g*C(1+Ne*A(et)-et*et)]}function Ba(){return(0,k.Z)(Ki).scale(127.16)}function Mr(Xe,$e,at,ft){var bt=v/3;Xe=o(Xe,f),$e=o($e,f),Xe=r(Xe,g),$e=r($e,v-f),at=o(at,0),at=r(at,99.999999);var yt=(ft=o(ft,f))/100,D=L((at/100+1)*b(bt))/bt,Y=c(Xe)/c(D*g),q=$e/v,ne=C(yt*c(Xe/2)/c($e/2));return function(pe,Le,Ne,qe,et){function vt(xt,te){var ue=Ne*c(qe*te),we=C(1-ue*ue),Oe=C(2/(1+we*b(xt*=et)));return[pe*we*Oe*c(xt),Le*ue*Oe]}return vt.invert=function(xt,te){var ue=xt/pe,we=te/Le,Oe=C(ue*ue+we*we),De=2*E(Oe/2);return[T(xt*p(De),pe*Oe)/et,Oe&&E(te*c(De)/(Le*Ne*Oe))/qe]},vt}(ne/C(q*Y*D),1/(ne*C(q*Y*D)),Y,D,q)}function Or(){var Xe=65*_,$e=60*_,at=20,ft=200,bt=(0,k.r)(Mr),yt=bt(Xe,$e,at,ft);return yt.poleline=function(D){return arguments.length?bt(Xe=+D*_,$e,at,ft):Xe*S},yt.parallels=function(D){return arguments.length?bt(Xe,$e=+D*_,at,ft):$e*S},yt.inflation=function(D){return arguments.length?bt(Xe,$e,at=+D,ft):at},yt.ratio=function(D){return arguments.length?bt(Xe,$e,at,ft=+D):ft},yt.scale(163.775)}function rs(){return Or().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}Ji.invert=function(Xe,$e){var at=$e/1.70711,ft=c(y*at);return[Xe/(.74482-.34588*ft*ft),2*l(at)]},Vi.invert=function(Xe,$e){if(A($e)<f)return[Xe,0];if(A(Xe)<f)return[0,g*c(2*l($e/v))];var at=(Xe/=v)*Xe,ft=($e/=v)*$e,bt=at+ft,yt=bt*bt,D=-A($e)*(1+bt),Y=D-2*ft+at,q=-2*D+1+2*ft+yt,ne=ft/q+(2*Y*Y*Y/(q*q*q)-9*D*Y/(q*q))/27,pe=(D-Y*Y/(3*q))/q,Le=2*C(-pe/3),Ne=L(3*ne/(pe*Le))/3;return[v*(bt-1+C(1+2*(at-ft)+yt))/(2*Xe),a($e)*v*(-Le*b(Ne+v/3)-Y/(3*q))]},ca.invert=function(Xe,$e){if(!Xe)return[0,g*c(2*l($e/v))];var at=A(Xe/v),ft=(1-at*at-($e/=v)*$e)/(2*at),bt=C(ft*ft+1);return[a(Xe)*v*(bt-ft),a($e)*g*c(2*T(C((1-2*ft*at)*(ft+bt)-at),C(bt+ft+at)))]},Ao.invert=function(Xe,$e){if(!$e)return[Xe,0];var at=$e/v,ft=(v*v*(1-at*at)-Xe*Xe)/(2*v*Xe);return[Xe?v*(a(Xe)*C(ft*ft+1)-ft):0,g*c(2*l(at))]},Ki.invert=function(Xe,$e){var at;if(!Xe||!$e)return[Xe,$e];$e/=v;var ft=a(Xe)*Xe/g,bt=(ft*ft-1+4*$e*$e)/A(ft),yt=bt*bt,D=2*$e,Y=50;do{var q=D*D,ne=(8*D-q*(q+2)-5)/(2*q*(D-1)),pe=(3*D-q*D-10)/(2*q*D),Le=ne*ne,Ne=D*ne,qe=D+ne,et=qe*qe,vt=D+3*ne,xt=-2*qe*(4*Ne*Le+(1-4*q+3*q*q)*(1+pe)+Le*(14*q-6-yt+(8*q-8-2*yt)*pe)+Ne*(12*q-8+(10*q-10-yt)*pe)),te=C(et*(q+Le*yt-1)+(1-q)*(q*(vt*vt+4*Le)+Le*(12*Ne+4*Le)));D-=at=(bt*(et+Le-1)+2*te-ft*(4*et+yt))/(bt*(2*ne*pe+2*qe*(1+pe))+xt/te-8*qe*(bt*(-1+Le+et)+2*te)*(1+pe)/(yt+4*et))}while(at>f&&--Y>0);return[a(Xe)*(C(bt*bt+4)+bt)*v/4,g*D]};var fo=4*v+3*C(3),qa=2*C(2*v*C(3)/fo),$i=ke(qa*C(3)/v,qa,fo/6);function Rs(){return(0,k.Z)($i).scale(176.84)}function fa(Xe,$e){return[Xe*C(1-3*$e*$e/(v*v)),$e]}function is(){return(0,k.Z)(fa).scale(152.63)}function ho(Xe,$e){var at=b($e),ft=b(Xe)*at,bt=1-ft,yt=b(Xe=T(c(Xe)*at,-c($e))),D=c(Xe);return[D*(at=C(1-ft*ft))-yt*bt,-yt*at-D*bt]}function oi(){return(0,k.Z)(ho).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function fi(Xe,$e){var at=H(Xe,$e);return[(at[0]+Xe/g)/2,(at[1]+$e)/2]}function zs(){return(0,k.Z)(fi).scale(158.837)}fa.invert=function(Xe,$e){return[Xe/C(1-3*$e*$e/(v*v)),$e]},ho.invert=function(Xe,$e){var at=(Xe*Xe+$e*$e)/-2,ft=C(-at*(2+at)),bt=$e*at+Xe*ft,yt=Xe*at-$e*ft,D=C(yt*yt+bt*bt);return[T(ft*bt,D*(1+at)),D?-E(ft*yt/D):0]},fi.invert=function(Xe,$e){var at=Xe,ft=$e,bt=25;do{var yt,D=b(ft),Y=c(ft),q=c(2*ft),ne=Y*Y,pe=D*D,Le=c(at),Ne=b(at/2),qe=c(at/2),et=qe*qe,vt=1-pe*Ne*Ne,xt=vt?L(D*Ne)*C(yt=1/vt):yt=0,te=.5*(2*xt*D*qe+at/g)-Xe,ue=.5*(xt*Y+ft)-$e,we=.5*yt*(pe*et+xt*D*Ne*ne)+.5/g,Oe=yt*(Le*q/4-xt*Y*qe),De=.125*yt*(q*qe-xt*Y*pe*Le),Ue=.5*yt*(ne*Ne+xt*et*D)+.5,Ze=Oe*De-Ue*we,Je=(ue*Oe-te*Ue)/Ze,it=(te*De-ue*we)/Ze;at-=Je,ft-=it}while((A(Je)>f||A(it)>f)&&--bt>0);return[at,ft]}},33940:function($,R,e){"use strict";function k(){return new A}function A(){this.reset()}e.d(R,{Z:function(){return k}}),A.prototype={constructor:A,reset:function(){this.s=this.t=0},add:function(b){T(l,b,this.t),T(this,l.s,this.s),this.s?this.t+=l.t:this.s=l.t},valueOf:function(){return this.s}};var l=new A;function T(b,d,s){var t=b.s=d+s,o=t-d;b.t=d-(t-o)+(s-o)}},97860:function($,R,e){"use strict";e.d(R,{L9:function(){return r},ZP:function(){return x},gL:function(){return i}});var k,A,l,T,b,d=e(33940),s=e(39695),t=e(73182),o=e(72736),r=(0,d.Z)(),n=(0,d.Z)(),i={point:t.Z,lineStart:t.Z,lineEnd:t.Z,polygonStart:function(){r.reset(),i.lineStart=a,i.lineEnd=c},polygonEnd:function(){var v=+r;n.add(v<0?s.BZ+v:v),this.lineStart=this.lineEnd=this.point=t.Z},sphere:function(){n.add(s.BZ)}};function a(){i.point=p}function c(){f(k,A)}function p(v,g){i.point=f,k=v,A=g,l=v*=s.uR,T=(0,s.mC)(g=(g*=s.uR)/2+s.pu),b=(0,s.O$)(g)}function f(v,g){g=(g*=s.uR)/2+s.pu;var y=(v*=s.uR)-l,h=y>=0?1:-1,m=h*y,w=(0,s.mC)(g),u=(0,s.O$)(g),S=b*u,_=T*w+S*(0,s.mC)(m),E=S*h*(0,s.O$)(m);r.add((0,s.fv)(E,_)),l=v,T=w,b=u}function x(v){return n.reset(),(0,o.Z)(v,i),2*n}},77338:function($,R,e){"use strict";e.d(R,{Z:function(){return L}});var k,A,l,T,b,d,s,t,o,r,n=e(33940),i=e(97860),a=e(7620),c=e(39695),p=e(72736),f=(0,n.Z)(),x={point:v,lineStart:y,lineEnd:h,polygonStart:function(){x.point=m,x.lineStart=w,x.lineEnd=u,f.reset(),i.gL.polygonStart()},polygonEnd:function(){i.gL.polygonEnd(),x.point=v,x.lineStart=y,x.lineEnd=h,i.L9<0?(k=-(l=180),A=-(T=90)):f>c.Ho?T=90:f<-c.Ho&&(A=-90),r[0]=k,r[1]=l},sphere:function(){k=-(l=180),A=-(T=90)}};function v(C,P){o.push(r=[k=C,l=C]),P<A&&(A=P),P>T&&(T=P)}function g(C,P){var I=(0,a.Og)([C*c.uR,P*c.uR]);if(t){var U=(0,a.T5)(t,I),H=(0,a.T5)([U[1],-U[0],0],U);(0,a.iJ)(H),H=(0,a.Y1)(H);var F,N=C-b,B=N>0?1:-1,j=H[0]*c.RW*B,J=(0,c.Wn)(N)>180;J^(B*b<j&&j<B*C)?(F=H[1]*c.RW)>T&&(T=F):J^(B*b<(j=(j+360)%360-180)&&j<B*C)?(F=-H[1]*c.RW)<A&&(A=F):(P<A&&(A=P),P>T&&(T=P)),J?C<b?S(k,C)>S(k,l)&&(l=C):S(C,l)>S(k,l)&&(k=C):l>=k?(C<k&&(k=C),C>l&&(l=C)):C>b?S(k,C)>S(k,l)&&(l=C):S(C,l)>S(k,l)&&(k=C)}else o.push(r=[k=C,l=C]);P<A&&(A=P),P>T&&(T=P),t=I,b=C}function y(){x.point=g}function h(){r[0]=k,r[1]=l,x.point=v,t=null}function m(C,P){if(t){var I=C-b;f.add((0,c.Wn)(I)>180?I+(I>0?360:-360):I)}else d=C,s=P;i.gL.point(C,P),g(C,P)}function w(){i.gL.lineStart()}function u(){m(d,s),i.gL.lineEnd(),(0,c.Wn)(f)>c.Ho&&(k=-(l=180)),r[0]=k,r[1]=l,t=null}function S(C,P){return(P-=C)<0?P+360:P}function _(C,P){return C[0]-P[0]}function E(C,P){return C[0]<=C[1]?C[0]<=P&&P<=C[1]:P<C[0]||C[1]<P}function L(C){var P,I,U,z,H,F,N;if(T=l=-(k=A=1/0),o=[],(0,p.Z)(C,x),I=o.length){for(o.sort(_),P=1,H=[U=o[0]];P<I;++P)E(U,(z=o[P])[0])||E(U,z[1])?(S(U[0],z[1])>S(U[0],U[1])&&(U[1]=z[1]),S(z[0],U[1])>S(U[0],U[1])&&(U[0]=z[0])):H.push(U=z);for(F=-1/0,P=0,U=H[I=H.length-1];P<=I;U=z,++P)(N=S(U[1],(z=H[P])[0]))>F&&(F=N,k=z[0],l=U[1])}return o=r=null,k===1/0||A===1/0?[[NaN,NaN],[NaN,NaN]]:[[k,A],[l,T]]}},7620:function($,R,e){"use strict";e.d(R,{Og:function(){return l},T:function(){return s},T5:function(){return b},Y1:function(){return A},iJ:function(){return t},j9:function(){return T},s0:function(){return d}});var k=e(39695);function A(o){return[(0,k.fv)(o[1],o[0]),(0,k.ZR)(o[2])]}function l(o){var r=o[0],n=o[1],i=(0,k.mC)(n);return[i*(0,k.mC)(r),i*(0,k.O$)(r),(0,k.O$)(n)]}function T(o,r){return o[0]*r[0]+o[1]*r[1]+o[2]*r[2]}function b(o,r){return[o[1]*r[2]-o[2]*r[1],o[2]*r[0]-o[0]*r[2],o[0]*r[1]-o[1]*r[0]]}function d(o,r){o[0]+=r[0],o[1]+=r[1],o[2]+=r[2]}function s(o,r){return[o[0]*r,o[1]*r,o[2]*r]}function t(o){var r=(0,k._b)(o[0]*o[0]+o[1]*o[1]+o[2]*o[2]);o[0]/=r,o[1]/=r,o[2]/=r}},66624:function($,R,e){"use strict";e.d(R,{Z:function(){return I}});var k,A,l,T,b,d,s,t,o,r,n,i,a,c,p,f,x=e(39695),v=e(73182),g=e(72736),y={sphere:v.Z,point:h,lineStart:w,lineEnd:_,polygonStart:function(){y.lineStart=E,y.lineEnd=L},polygonEnd:function(){y.lineStart=w,y.lineEnd=_}};function h(U,z){U*=x.uR;var H=(0,x.mC)(z*=x.uR);m(H*(0,x.mC)(U),H*(0,x.O$)(U),(0,x.O$)(z))}function m(U,z,H){++k,l+=(U-l)/k,T+=(z-T)/k,b+=(H-b)/k}function w(){y.point=u}function u(U,z){U*=x.uR;var H=(0,x.mC)(z*=x.uR);c=H*(0,x.mC)(U),p=H*(0,x.O$)(U),f=(0,x.O$)(z),y.point=S,m(c,p,f)}function S(U,z){U*=x.uR;var H=(0,x.mC)(z*=x.uR),F=H*(0,x.mC)(U),N=H*(0,x.O$)(U),B=(0,x.O$)(z),j=(0,x.fv)((0,x._b)((j=p*B-f*N)*j+(j=f*F-c*B)*j+(j=c*N-p*F)*j),c*F+p*N+f*B);A+=j,d+=j*(c+(c=F)),s+=j*(p+(p=N)),t+=j*(f+(f=B)),m(c,p,f)}function _(){y.point=h}function E(){y.point=C}function L(){P(i,a),y.point=h}function C(U,z){i=U,a=z,U*=x.uR,z*=x.uR,y.point=P;var H=(0,x.mC)(z);c=H*(0,x.mC)(U),p=H*(0,x.O$)(U),f=(0,x.O$)(z),m(c,p,f)}function P(U,z){U*=x.uR;var H=(0,x.mC)(z*=x.uR),F=H*(0,x.mC)(U),N=H*(0,x.O$)(U),B=(0,x.O$)(z),j=p*B-f*N,J=f*F-c*B,G=c*N-p*F,V=(0,x._b)(j*j+J*J+G*G),W=(0,x.ZR)(V),X=V&&-W/V;o+=X*j,r+=X*J,n+=X*G,A+=W,d+=W*(c+(c=F)),s+=W*(p+(p=N)),t+=W*(f+(f=B)),m(c,p,f)}function I(U){k=A=l=T=b=d=s=t=o=r=n=0,(0,g.Z)(U,y);var z=o,H=r,F=n,N=z*z+H*H+F*F;return N<x.aW&&(z=d,H=s,F=t,A<x.Ho&&(z=l,H=T,F=b),(N=z*z+H*H+F*F)<x.aW)?[NaN,NaN]:[(0,x.fv)(H,z)*x.RW,(0,x.ZR)(F/(0,x._b)(N))*x.RW]}},7613:function($,R,e){"use strict";e.d(R,{m:function(){return b},Z:function(){return s}});var k=e(7620);function A(t){return function(){return t}}var l=e(39695),T=e(49386);function b(t,o,r,n,i,a){if(r){var c=(0,l.mC)(o),p=(0,l.O$)(o),f=n*r;null==i?(i=o+n*l.BZ,a=o-f/2):(i=d(c,i),a=d(c,a),(n>0?i<a:i>a)&&(i+=n*l.BZ));for(var x,v=i;n>0?v>a:v<a;v-=f)x=(0,k.Y1)([c,-p*(0,l.mC)(v),-p*(0,l.O$)(v)]),t.point(x[0],x[1])}}function d(t,o){(o=(0,k.Og)(o))[0]-=t,(0,k.iJ)(o);var r=(0,l.Kh)(-o[1]);return((-o[2]<0?-r:r)+l.BZ-l.Ho)%l.BZ}function s(){var t,o,r=A([0,0]),n=A(90),i=A(6),a={point:function(p,f){t.push(p=o(p,f)),p[0]*=l.RW,p[1]*=l.RW}};function c(){var p=r.apply(this,arguments),f=n.apply(this,arguments)*l.uR,x=i.apply(this,arguments)*l.uR;return t=[],o=(0,T.I)(-p[0]*l.uR,-p[1]*l.uR,0).invert,b(a,f,x,1),p={type:"Polygon",coordinates:[t]},t=o=null,p}return c.center=function(p){return arguments.length?(r="function"==typeof p?p:A([+p[0],+p[1]]),c):r},c.radius=function(p){return arguments.length?(n="function"==typeof p?p:A(+p),c):n},c.precision=function(p){return arguments.length?(i="function"==typeof p?p:A(+p),c):i},c}},87070:function($,R,e){"use strict";var k=e(97023),A=e(39695);R.Z=(0,k.Z)(function(){return!0},function(l){var T,b=NaN,d=NaN,s=NaN;return{lineStart:function(){l.lineStart(),T=1},point:function(t,o){var i,a,c,p,f,x,v,r=t>0?A.pi:-A.pi,n=(0,A.Wn)(t-b);(0,A.Wn)(n-A.pi)<A.Ho?(l.point(b,d=(d+o)/2>0?A.ou:-A.ou),l.point(s,d),l.lineEnd(),l.lineStart(),l.point(r,d),l.point(t,d),T=0):s!==r&&n>=A.pi&&((0,A.Wn)(b-s)<A.Ho&&(b-=s*A.Ho),(0,A.Wn)(t-r)<A.Ho&&(t-=r*A.Ho),a=d,p=o,v=(0,A.O$)((i=b)-(c=t)),d=(0,A.Wn)(v)>A.Ho?(0,A.z4)(((0,A.O$)(a)*(x=(0,A.mC)(p))*(0,A.O$)(c)-(0,A.O$)(p)*(f=(0,A.mC)(a))*(0,A.O$)(i))/(f*x*v)):(a+p)/2,l.point(s,d),l.lineEnd(),l.lineStart(),l.point(r,d),T=0),l.point(b=t,d=o),s=r},lineEnd:function(){l.lineEnd(),b=d=NaN},clean:function(){return 2-T}}},function(l,T,b,d){var s;if(null==l)d.point(-A.pi,s=b*A.ou),d.point(0,s),d.point(A.pi,s),d.point(A.pi,0),d.point(A.pi,-s),d.point(0,-s),d.point(-A.pi,-s),d.point(-A.pi,0),d.point(-A.pi,s);else if((0,A.Wn)(l[0]-T[0])>A.Ho){var t=l[0]<T[0]?A.pi:-A.pi;d.point(-t,s=b*t/2),d.point(0,s),d.point(t,s)}else d.point(T[0],T[1])},[-A.pi,-A.ou])},85272:function($,R,e){"use strict";e.d(R,{Z:function(){return A}});var k=e(73182);function A(){var l,T=[];return{point:function(b,d,s){l.push([b,d,s])},lineStart:function(){T.push(l=[])},lineEnd:k.Z,rejoin:function(){T.length>1&&T.push(T.pop().concat(T.shift()))},result:function(){var b=T;return T=[],l=null,b}}}},1457:function($,R,e){"use strict";e.d(R,{Z:function(){return d}});var k=e(7620),A=e(7613),l=e(39695),T=e(67108),b=e(97023);function d(s){var t=(0,l.mC)(s),o=6*l.uR,r=t>0,n=(0,l.Wn)(t)>l.Ho;function i(p,f){return(0,l.mC)(p)*(0,l.mC)(f)>t}function a(p,f,x){var v=(0,k.Og)(p),g=(0,k.Og)(f),y=[1,0,0],h=(0,k.T5)(v,g),m=(0,k.j9)(h,h),w=h[0],u=m-w*w;if(!u)return!x&&p;var S=t*m/u,_=-t*w/u,E=(0,k.T5)(y,h),L=(0,k.T)(y,S),C=(0,k.T)(h,_);(0,k.s0)(L,C);var P=E,I=(0,k.j9)(L,P),U=(0,k.j9)(P,P),z=I*I-U*((0,k.j9)(L,L)-1);if(!(z<0)){var H=(0,l._b)(z),F=(0,k.T)(P,(-I-H)/U);if((0,k.s0)(F,L),F=(0,k.Y1)(F),!x)return F;var N,B=p[0],j=f[0],J=p[1],G=f[1];j<B&&(N=B,B=j,j=N);var V=j-B,W=(0,l.Wn)(V-l.pi)<l.Ho;if(!W&&G<J&&(N=J,J=G,G=N),W||V<l.Ho?W?J+G>0^F[1]<((0,l.Wn)(F[0]-B)<l.Ho?J:G):J<=F[1]&&F[1]<=G:V>l.pi^(B<=F[0]&&F[0]<=j)){var X=(0,k.T)(P,(-I+H)/U);return(0,k.s0)(X,L),[F,(0,k.Y1)(X)]}}}function c(p,f){var x=r?s:l.pi-s,v=0;return p<-x?v|=1:p>x&&(v|=2),f<-x?v|=4:f>x&&(v|=8),v}return(0,b.Z)(i,function(p){var f,x,v,g,y;return{lineStart:function(){g=v=!1,y=1},point:function(h,m){var w,u=[h,m],S=i(h,m),_=r?S?0:c(h,m):S?c(h+(h<0?l.pi:-l.pi),m):0;if(!f&&(g=v=S)&&p.lineStart(),S!==v&&(!(w=a(f,u))||(0,T.Z)(f,w)||(0,T.Z)(u,w))&&(u[2]=1),S!==v)y=0,S?(p.lineStart(),w=a(u,f),p.point(w[0],w[1])):(w=a(f,u),p.point(w[0],w[1],2),p.lineEnd()),f=w;else if(n&&f&&r^S){var E;_&x||!(E=a(u,f,!0))||(y=0,r?(p.lineStart(),p.point(E[0][0],E[0][1]),p.point(E[1][0],E[1][1]),p.lineEnd()):(p.point(E[1][0],E[1][1]),p.lineEnd(),p.lineStart(),p.point(E[0][0],E[0][1],3)))}!S||f&&(0,T.Z)(f,u)||p.point(u[0],u[1]),f=u,v=S,x=_},lineEnd:function(){v&&p.lineEnd(),f=null},clean:function(){return y|(g&&v)<<1}}},function(p,f,x,v){(0,A.m)(v,s,o,x,p,f)},r?[0,-s]:[-l.pi,s-l.pi])}},97023:function($,R,e){"use strict";e.d(R,{Z:function(){return d}});var k=e(85272),A=e(46225),l=e(39695),T=e(23071),b=e(33064);function d(o,r,n,i){return function(a){var c,p,f,x=r(a),v=(0,k.Z)(),g=r(v),y=!1,h={point:m,lineStart:u,lineEnd:S,polygonStart:function(){h.point=_,h.lineStart=E,h.lineEnd=L,p=[],c=[]},polygonEnd:function(){h.point=m,h.lineStart=u,h.lineEnd=S,p=(0,b.TS)(p);var C=(0,T.Z)(c,i);p.length?(y||(a.polygonStart(),y=!0),(0,A.Z)(p,t,C,n,a)):C&&(y||(a.polygonStart(),y=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),y&&(a.polygonEnd(),y=!1),p=c=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function m(C,P){o(C,P)&&a.point(C,P)}function w(C,P){x.point(C,P)}function u(){h.point=w,x.lineStart()}function S(){h.point=m,x.lineEnd()}function _(C,P){f.push([C,P]),g.point(C,P)}function E(){g.lineStart(),f=[]}function L(){_(f[0][0],f[0][1]),g.lineEnd();var C,P,I,U,z=g.clean(),H=v.result(),F=H.length;if(f.pop(),c.push(f),f=null,F)if(1&z){if((P=(I=H[0]).length-1)>0){for(y||(a.polygonStart(),y=!0),a.lineStart(),C=0;C<P;++C)a.point((U=I[C])[0],U[1]);a.lineEnd()}}else F>1&&2&z&&H.push(H.pop().concat(H.shift())),p.push(H.filter(s))}return h}}function s(o){return o.length>1}function t(o,r){return((o=o.x)[0]<0?o[1]-l.ou-l.Ho:l.ou-o[1])-((r=r.x)[0]<0?r[1]-l.ou-l.Ho:l.ou-r[1])}},87605:function($,R,e){"use strict";e.d(R,{Z:function(){return s}});var k=e(39695),A=e(85272),l=e(46225),T=e(33064),b=1e9,d=-b;function s(t,o,r,n){function i(x,v){return t<=x&&x<=r&&o<=v&&v<=n}function a(x,v,g,y){var h=0,m=0;if(null==x||(h=c(x,g))!==(m=c(v,g))||f(x,v)<0^g>0)do{y.point(0===h||3===h?t:r,h>1?n:o)}while((h=(h+g+4)%4)!==m);else y.point(v[0],v[1])}function c(x,v){return(0,k.Wn)(x[0]-t)<k.Ho?v>0?0:3:(0,k.Wn)(x[0]-r)<k.Ho?v>0?2:1:(0,k.Wn)(x[1]-o)<k.Ho?v>0?1:0:v>0?3:2}function p(x,v){return f(x.x,v.x)}function f(x,v){var g=c(x,1),y=c(v,1);return g!==y?g-y:0===g?v[1]-x[1]:1===g?x[0]-v[0]:2===g?x[1]-v[1]:v[0]-x[0]}return function(x){var v,g,y,h,m,w,u,S,_,E,L,C=x,P=(0,A.Z)(),I={point:U,lineStart:function(){I.point=z,g&&g.push(y=[]),E=!0,_=!1,u=S=NaN},lineEnd:function(){v&&(z(h,m),w&&_&&P.rejoin(),v.push(P.result())),I.point=U,_&&C.lineEnd()},polygonStart:function(){C=P,v=[],g=[],L=!0},polygonEnd:function(){var H=function(){for(var B=0,j=0,J=g.length;j<J;++j)for(var G,V,W=g[j],X=1,K=W.length,re=W[0],ee=re[0],ie=re[1];X<K;++X)G=ee,V=ie,ee=(re=W[X])[0],ie=re[1],V<=n?ie>n&&(ee-G)*(n-V)>(ie-V)*(t-G)&&++B:ie<=n&&(ee-G)*(n-V)<(ie-V)*(t-G)&&--B;return B}(),F=L&&H,N=(v=(0,T.TS)(v)).length;(F||N)&&(x.polygonStart(),F&&(x.lineStart(),a(null,null,1,x),x.lineEnd()),N&&(0,l.Z)(v,p,H,a,x),x.polygonEnd()),C=x,v=g=y=null}};function U(H,F){i(H,F)&&C.point(H,F)}function z(H,F){var N=i(H,F);if(g&&y.push([H,F]),E)h=H,m=F,w=N,E=!1,N&&(C.lineStart(),C.point(H,F));else if(N&&_)C.point(H,F);else{var B=[u=Math.max(d,Math.min(b,u)),S=Math.max(d,Math.min(b,S))],j=[H=Math.max(d,Math.min(b,H)),F=Math.max(d,Math.min(b,F))];!function(J,G,V,W,X,K){var re,ee=J[0],ie=J[1],oe=0,ce=1,me=G[0]-ee,de=G[1]-ie;if(re=V-ee,me||!(re>0)){if(re/=me,me<0){if(re<oe)return;re<ce&&(ce=re)}else if(me>0){if(re>ce)return;re>oe&&(oe=re)}if(re=X-ee,me||!(re<0)){if(re/=me,me<0){if(re>ce)return;re>oe&&(oe=re)}else if(me>0){if(re<oe)return;re<ce&&(ce=re)}if(re=W-ie,de||!(re>0)){if(re/=de,de<0){if(re<oe)return;re<ce&&(ce=re)}else if(de>0){if(re>ce)return;re>oe&&(oe=re)}if(re=K-ie,de||!(re<0)){if(re/=de,de<0){if(re>ce)return;re>oe&&(oe=re)}else if(de>0){if(re<oe)return;re<ce&&(ce=re)}return oe>0&&(J[0]=ee+oe*me,J[1]=ie+oe*de),ce<1&&(G[0]=ee+ce*me,G[1]=ie+ce*de),!0}}}}}(B,j,t,o,r,n)?N&&(C.lineStart(),C.point(H,F),L=!1):(_||(C.lineStart(),C.point(B[0],B[1])),C.point(j[0],j[1]),N||C.lineEnd(),L=!1)}u=H,S=F,_=N}return I}}},46225:function($,R,e){"use strict";e.d(R,{Z:function(){return T}});var k=e(67108),A=e(39695);function l(d,s,t,o){this.x=d,this.z=s,this.o=t,this.e=o,this.v=!1,this.n=this.p=null}function T(d,s,t,o,r){var n,i,a=[],c=[];if(d.forEach(function(y){if(!((h=y.length-1)<=0)){var h,m,w=y[0],u=y[h];if((0,k.Z)(w,u)){if(!w[2]&&!u[2]){for(r.lineStart(),n=0;n<h;++n)r.point((w=y[n])[0],w[1]);return void r.lineEnd()}u[0]+=2*A.Ho}a.push(m=new l(w,y,null,!0)),c.push(m.o=new l(w,null,m,!1)),a.push(m=new l(u,y,null,!1)),c.push(m.o=new l(u,null,m,!0))}}),a.length){for(c.sort(s),b(a),b(c),n=0,i=c.length;n<i;++n)c[n].e=t=!t;for(var p,f,x=a[0];;){for(var v=x,g=!0;v.v;)if((v=v.n)===x)return;p=v.z,r.lineStart();do{if(v.v=v.o.v=!0,v.e){if(g)for(n=0,i=p.length;n<i;++n)r.point((f=p[n])[0],f[1]);else o(v.x,v.n.x,1,r);v=v.n}else{if(g)for(n=(p=v.p.z).length-1;n>=0;--n)r.point((f=p[n])[0],f[1]);else o(v.x,v.p.x,-1,r);v=v.p}p=(v=v.o).z,g=!g}while(!v.v);r.lineEnd()}}}function b(d){if(s=d.length){for(var s,t,o=0,r=d[0];++o<s;)r.n=t=d[o],t.p=r,r=t;r.n=t=d[0],t.p=r}}},96059:function($,R,e){"use strict";function k(A,l){function T(b,d){return b=A(b,d),l(b[0],b[1])}return A.invert&&l.invert&&(T.invert=function(b,d){return(b=l.invert(b,d))&&A.invert(b[0],b[1])}),T}e.d(R,{Z:function(){return k}})},8593:function($,R,e){"use strict";function k(A){return A}e.d(R,{Z:function(){return k}})},27362:function($,R,e){"use strict";e.r(R),e.d(R,{geoAlbers:function(){return At},geoAlbersUsa:function(){return pt},geoArea:function(){return k.ZP},geoAzimuthalEqualArea:function(){return gt.Z},geoAzimuthalEqualAreaRaw:function(){return gt.l},geoAzimuthalEquidistant:function(){return Pt.Z},geoAzimuthalEquidistantRaw:function(){return Pt.N},geoBounds:function(){return A.Z},geoCentroid:function(){return l.Z},geoCircle:function(){return T.Z},geoClipAntimeridian:function(){return b.Z},geoClipCircle:function(){return d.Z},geoClipExtent:function(){return t},geoClipRectangle:function(){return s.Z},geoConicConformal:function(){return pn},geoConicConformalRaw:function(){return un},geoConicEqualArea:function(){return Et},geoConicEqualAreaRaw:function(){return Tt},geoConicEquidistant:function(){return Bn},geoConicEquidistantRaw:function(){return wn},geoContains:function(){return H},geoDistance:function(){return S},geoEqualEarth:function(){return Mn},geoEqualEarthRaw:function(){return En},geoEquirectangular:function(){return Kt.Z},geoEquirectangularRaw:function(){return Kt.k},geoGnomonic:function(){return Rn.Z},geoGnomonicRaw:function(){return Rn.M},geoGraticule:function(){return j},geoGraticule10:function(){return J},geoIdentity:function(){return Fn},geoInterpolate:function(){return K.Z},geoLength:function(){return m},geoMercator:function(){return jt},geoMercatorRaw:function(){return Ht},geoNaturalEarth1:function(){return rr.Z},geoNaturalEarth1Raw:function(){return rr.K},geoOrthographic:function(){return $n.Z},geoOrthographicRaw:function(){return $n.I},geoPath:function(){return Ke},geoProjection:function(){return st.Z},geoProjectionMutator:function(){return st.r},geoRotation:function(){return Ot.Z},geoStereographic:function(){return Zn},geoStereographicRaw:function(){return fr},geoStream:function(){return f.Z},geoTransform:function(){return Nn.Z},geoTransverseMercator:function(){return ur},geoTransverseMercatorRaw:function(){return qn}});var k=e(97860),A=e(77338),l=e(66624),T=e(7613),b=e(87070),d=e(1457),s=e(87605);function t(){var Zt,nn,zn,_n=0,Cn=0,Un=960,Gn=500;return zn={stream:function(ar){return Zt&&nn===ar?Zt:Zt=(0,s.Z)(_n,Cn,Un,Gn)(nn=ar)},extent:function(ar){return arguments.length?(_n=+ar[0][0],Cn=+ar[0][1],Un=+ar[1][0],Gn=+ar[1][1],Zt=nn=null,zn):[[_n,Cn],[Un,Gn]]}}}var o,r,n,i=e(23071),a=e(33940),c=e(39695),p=e(73182),f=e(72736),x=(0,a.Z)(),v={sphere:p.Z,point:p.Z,lineStart:function(){v.point=y,v.lineEnd=g},lineEnd:p.Z,polygonStart:p.Z,polygonEnd:p.Z};function g(){v.point=v.lineEnd=p.Z}function y(Zt,nn){o=Zt*=c.uR,r=(0,c.O$)(nn*=c.uR),n=(0,c.mC)(nn),v.point=h}function h(Zt,nn){Zt*=c.uR;var zn=(0,c.O$)(nn*=c.uR),_n=(0,c.mC)(nn),Cn=(0,c.Wn)(Zt-o),Un=(0,c.mC)(Cn),Gn=_n*(0,c.O$)(Cn),ar=n*zn-r*_n*Un,yr=r*zn+n*_n*Un;x.add((0,c.fv)((0,c._b)(Gn*Gn+ar*ar),yr)),o=Zt,r=zn,n=_n}function m(Zt){return x.reset(),(0,f.Z)(Zt,v),+x}var w=[null,null],u={type:"LineString",coordinates:w};function S(Zt,nn){return w[0]=Zt,w[1]=nn,m(u)}var _={Feature:function(Zt,nn){return L(Zt.geometry,nn)},FeatureCollection:function(Zt,nn){for(var zn=Zt.features,_n=-1,Cn=zn.length;++_n<Cn;)if(L(zn[_n].geometry,nn))return!0;return!1}},E={Sphere:function(){return!0},Point:function(Zt,nn){return C(Zt.coordinates,nn)},MultiPoint:function(Zt,nn){for(var zn=Zt.coordinates,_n=-1,Cn=zn.length;++_n<Cn;)if(C(zn[_n],nn))return!0;return!1},LineString:function(Zt,nn){return P(Zt.coordinates,nn)},MultiLineString:function(Zt,nn){for(var zn=Zt.coordinates,_n=-1,Cn=zn.length;++_n<Cn;)if(P(zn[_n],nn))return!0;return!1},Polygon:function(Zt,nn){return I(Zt.coordinates,nn)},MultiPolygon:function(Zt,nn){for(var zn=Zt.coordinates,_n=-1,Cn=zn.length;++_n<Cn;)if(I(zn[_n],nn))return!0;return!1},GeometryCollection:function(Zt,nn){for(var zn=Zt.geometries,_n=-1,Cn=zn.length;++_n<Cn;)if(L(zn[_n],nn))return!0;return!1}};function L(Zt,nn){return!(!Zt||!E.hasOwnProperty(Zt.type))&&E[Zt.type](Zt,nn)}function C(Zt,nn){return 0===S(Zt,nn)}function P(Zt,nn){for(var zn,_n,Cn,Un=0,Gn=Zt.length;Un<Gn;Un++){if(0===(_n=S(Zt[Un],nn))||Un>0&&(Cn=S(Zt[Un],Zt[Un-1]))>0&&zn<=Cn&&_n<=Cn&&(zn+_n-Cn)*(1-Math.pow((zn-_n)/Cn,2))<c.aW*Cn)return!0;zn=_n}return!1}function I(Zt,nn){return!!(0,i.Z)(Zt.map(U),z(nn))}function U(Zt){return(Zt=Zt.map(z)).pop(),Zt}function z(Zt){return[Zt[0]*c.uR,Zt[1]*c.uR]}function H(Zt,nn){return(Zt&&_.hasOwnProperty(Zt.type)?_[Zt.type]:L)(Zt,nn)}var F=e(33064);function N(Zt,nn,zn){var _n=(0,F.w6)(Zt,nn-c.Ho,zn).concat(nn);return function(Cn){return _n.map(function(Un){return[Cn,Un]})}}function B(Zt,nn,zn){var _n=(0,F.w6)(Zt,nn-c.Ho,zn).concat(nn);return function(Cn){return _n.map(function(Un){return[Un,Cn]})}}function j(){var Zt,nn,zn,_n,Cn,Un,Gn,ar,yr,$t,kn,zt,Wt=10,tn=Wt,Sn=90,An=360,Tn=2.5;function an(){return{type:"MultiLineString",coordinates:mn()}}function mn(){return(0,F.w6)((0,c.mD)(_n/Sn)*Sn,zn,Sn).map(kn).concat((0,F.w6)((0,c.mD)(ar/An)*An,Gn,An).map(zt)).concat((0,F.w6)((0,c.mD)(nn/Wt)*Wt,Zt,Wt).filter(function(on){return(0,c.Wn)(on%Sn)>c.Ho}).map(yr)).concat((0,F.w6)((0,c.mD)(Un/tn)*tn,Cn,tn).filter(function(on){return(0,c.Wn)(on%An)>c.Ho}).map($t))}return an.lines=function(){return mn().map(function(on){return{type:"LineString",coordinates:on}})},an.outline=function(){return{type:"Polygon",coordinates:[kn(_n).concat(zt(Gn).slice(1),kn(zn).reverse().slice(1),zt(ar).reverse().slice(1))]}},an.extent=function(on){return arguments.length?an.extentMajor(on).extentMinor(on):an.extentMinor()},an.extentMajor=function(on){return arguments.length?(ar=+on[0][1],Gn=+on[1][1],(_n=+on[0][0])>(zn=+on[1][0])&&(on=_n,_n=zn,zn=on),ar>Gn&&(on=ar,ar=Gn,Gn=on),an.precision(Tn)):[[_n,ar],[zn,Gn]]},an.extentMinor=function(on){return arguments.length?(Un=+on[0][1],Cn=+on[1][1],(nn=+on[0][0])>(Zt=+on[1][0])&&(on=nn,nn=Zt,Zt=on),Un>Cn&&(on=Un,Un=Cn,Cn=on),an.precision(Tn)):[[nn,Un],[Zt,Cn]]},an.step=function(on){return arguments.length?an.stepMajor(on).stepMinor(on):an.stepMinor()},an.stepMajor=function(on){return arguments.length?(Sn=+on[0],An=+on[1],an):[Sn,An]},an.stepMinor=function(on){return arguments.length?(Wt=+on[0],tn=+on[1],an):[Wt,tn]},an.precision=function(on){return arguments.length?(Tn=+on,yr=N(Un,Cn,90),$t=B(nn,Zt,Tn),kn=N(ar,Gn,90),zt=B(_n,zn,Tn),an):Tn},an.extentMajor([[-180,-90+c.Ho],[180,90-c.Ho]]).extentMinor([[-180,-80-c.Ho],[180,80+c.Ho]])}function J(){return j()()}var G,V,W,X,K=e(83074),re=e(8593),ee=(0,a.Z)(),ie=(0,a.Z)(),oe={point:p.Z,lineStart:p.Z,lineEnd:p.Z,polygonStart:function(){oe.lineStart=ce,oe.lineEnd=he},polygonEnd:function(){oe.lineStart=oe.lineEnd=oe.point=p.Z,ee.add((0,c.Wn)(ie)),ie.reset()},result:function(){var Zt=ee/2;return ee.reset(),Zt}};function ce(){oe.point=me}function me(Zt,nn){oe.point=de,G=W=Zt,V=X=nn}function de(Zt,nn){ie.add(X*Zt-W*nn),W=Zt,X=nn}function he(){de(G,V)}var ve,Pe,xe,ke,Ae=oe,Te=e(3559),Q=0,se=0,fe=0,ye=0,Me=0,Ie=0,Ce=0,Re=0,le=0,ge={point:_e,lineStart:Fe,lineEnd:nt,polygonStart:function(){ge.lineStart=tt,ge.lineEnd=ot},polygonEnd:function(){ge.point=_e,ge.lineStart=Fe,ge.lineEnd=nt},result:function(){var Zt=le?[Ce/le,Re/le]:Ie?[ye/Ie,Me/Ie]:fe?[Q/fe,se/fe]:[NaN,NaN];return Q=se=fe=ye=Me=Ie=Ce=Re=le=0,Zt}};function _e(Zt,nn){Q+=Zt,se+=nn,++fe}function Fe(){ge.point=Ve}function Ve(Zt,nn){ge.point=He,_e(xe=Zt,ke=nn)}function He(Zt,nn){var zn=Zt-xe,_n=nn-ke,Cn=(0,c._b)(zn*zn+_n*_n);ye+=Cn*(xe+Zt)/2,Me+=Cn*(ke+nn)/2,Ie+=Cn,_e(xe=Zt,ke=nn)}function nt(){ge.point=_e}function tt(){ge.point=dt}function ot(){kt(ve,Pe)}function dt(Zt,nn){ge.point=kt,_e(ve=xe=Zt,Pe=ke=nn)}function kt(Zt,nn){var zn=Zt-xe,_n=nn-ke,Cn=(0,c._b)(zn*zn+_n*_n);ye+=Cn*(xe+Zt)/2,Me+=Cn*(ke+nn)/2,Ie+=Cn,Ce+=(Cn=ke*Zt-xe*nn)*(xe+Zt),Re+=Cn*(ke+nn),le+=3*Cn,_e(xe=Zt,ke=nn)}var mt=ge;function wt(Zt){this._context=Zt}wt.prototype={_radius:4.5,pointRadius:function(Zt){return this._radius=Zt,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(Zt,nn){switch(this._point){case 0:this._context.moveTo(Zt,nn),this._point=1;break;case 1:this._context.lineTo(Zt,nn);break;default:this._context.moveTo(Zt+this._radius,nn),this._context.arc(Zt,nn,this._radius,0,c.BZ)}},result:p.Z};var Lt,Ct,It,Ut,Rt,Ge=(0,a.Z)(),We={point:p.Z,lineStart:function(){We.point=Be},lineEnd:function(){Lt&&Ye(Ct,It),We.point=p.Z},polygonStart:function(){Lt=!0},polygonEnd:function(){Lt=null},result:function(){var Zt=+Ge;return Ge.reset(),Zt}};function Be(Zt,nn){We.point=Ye,Ct=Ut=Zt,It=Rt=nn}function Ye(Zt,nn){Ge.add((0,c._b)((Ut-=Zt)*Ut+(Rt-=nn)*Rt)),Ut=Zt,Rt=nn}var rt=We;function Se(){this._string=[]}function ze(Zt){return"m0,"+Zt+"a"+Zt+","+Zt+" 0 1,1 0,"+-2*Zt+"a"+Zt+","+Zt+" 0 1,1 0,"+2*Zt+"z"}function Ke(Zt,nn){var zn,_n,Cn=4.5;function Un(Gn){return Gn&&("function"==typeof Cn&&_n.pointRadius(+Cn.apply(this,arguments)),(0,f.Z)(Gn,zn(_n))),_n.result()}return Un.area=function(Gn){return(0,f.Z)(Gn,zn(Ae)),Ae.result()},Un.measure=function(Gn){return(0,f.Z)(Gn,zn(rt)),rt.result()},Un.bounds=function(Gn){return(0,f.Z)(Gn,zn(Te.Z)),Te.Z.result()},Un.centroid=function(Gn){return(0,f.Z)(Gn,zn(mt)),mt.result()},Un.projection=function(Gn){return arguments.length?(zn=null==Gn?(Zt=null,re.Z):(Zt=Gn).stream,Un):Zt},Un.context=function(Gn){return arguments.length?(_n=null==Gn?(nn=null,new Se):new wt(nn=Gn),"function"!=typeof Cn&&_n.pointRadius(Cn),Un):nn},Un.pointRadius=function(Gn){return arguments.length?(Cn="function"==typeof Gn?Gn:(_n.pointRadius(+Gn),+Gn),Un):Cn},Un.projection(Zt).context(nn)}Se.prototype={_radius:4.5,_circle:ze(4.5),pointRadius:function(Zt){return(Zt=+Zt)!==this._radius&&(this._radius=Zt,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(Zt,nn){switch(this._point){case 0:this._string.push("M",Zt,",",nn),this._point=1;break;case 1:this._string.push("L",Zt,",",nn);break;default:null==this._circle&&(this._circle=ze(this._radius)),this._string.push("M",Zt,",",nn,this._circle)}},result:function(){if(this._string.length){var Zt=this._string.join("");return this._string=[],Zt}return null}};var st=e(15002);function ct(Zt){var nn=0,zn=c.pi/3,_n=(0,st.r)(Zt),Cn=_n(nn,zn);return Cn.parallels=function(Un){return arguments.length?_n(nn=Un[0]*c.uR,zn=Un[1]*c.uR):[nn*c.RW,zn*c.RW]},Cn}function Tt(Zt,nn){var zn=(0,c.O$)(Zt),_n=(zn+(0,c.O$)(nn))/2;if((0,c.Wn)(_n)<c.Ho)return function(ar){var yr=(0,c.mC)(ar);function $t(kn,zt){return[kn*yr,(0,c.O$)(zt)/yr]}return $t.invert=function(kn,zt){return[kn/yr,(0,c.ZR)(zt*yr)]},$t}(Zt);var Cn=1+zn*(2*_n-zn),Un=(0,c._b)(Cn)/_n;function Gn(ar,yr){var $t=(0,c._b)(Cn-2*_n*(0,c.O$)(yr))/_n;return[$t*(0,c.O$)(ar*=_n),Un-$t*(0,c.mC)(ar)]}return Gn.invert=function(ar,yr){var $t=Un-yr,kn=(0,c.fv)(ar,(0,c.Wn)($t))*(0,c.Xx)($t);return $t*_n<0&&(kn-=c.pi*(0,c.Xx)(ar)*(0,c.Xx)($t)),[kn/_n,(0,c.ZR)((Cn-(ar*ar+$t*$t)*_n*_n)/(2*_n))]},Gn}function Et(){return ct(Tt).scale(155.424).center([0,33.6442])}function At(){return Et().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}var ht=e(47589);function pt(){var Zt,nn,zn,_n,Cn,Un,Gn=At(),ar=Et().rotate([154,0]).center([-2,58.5]).parallels([55,65]),yr=Et().rotate([157,0]).center([-3,19.9]).parallels([8,18]),$t={point:function(Wt,tn){Un=[Wt,tn]}};function kn(Wt){var tn=Wt[0],Sn=Wt[1];return Un=null,zn.point(tn,Sn),Un||(_n.point(tn,Sn),Un)||(Cn.point(tn,Sn),Un)}function zt(){return Zt=nn=null,kn}return kn.invert=function(Wt){var tn=Gn.scale(),Sn=Gn.translate(),An=(Wt[0]-Sn[0])/tn,Tn=(Wt[1]-Sn[1])/tn;return(Tn>=.12&&Tn<.234&&An>=-.425&&An<-.214?ar:Tn>=.166&&Tn<.234&&An>=-.214&&An<-.115?yr:Gn).invert(Wt)},kn.stream=function(Wt){return Zt&&nn===Wt?Zt:(tn=[Gn.stream(nn=Wt),ar.stream(Wt),yr.stream(Wt)],Sn=tn.length,Zt={point:function(An,Tn){for(var an=-1;++an<Sn;)tn[an].point(An,Tn)},sphere:function(){for(var An=-1;++An<Sn;)tn[An].sphere()},lineStart:function(){for(var An=-1;++An<Sn;)tn[An].lineStart()},lineEnd:function(){for(var An=-1;++An<Sn;)tn[An].lineEnd()},polygonStart:function(){for(var An=-1;++An<Sn;)tn[An].polygonStart()},polygonEnd:function(){for(var An=-1;++An<Sn;)tn[An].polygonEnd()}});var tn,Sn},kn.precision=function(Wt){return arguments.length?(Gn.precision(Wt),ar.precision(Wt),yr.precision(Wt),zt()):Gn.precision()},kn.scale=function(Wt){return arguments.length?(Gn.scale(Wt),ar.scale(.35*Wt),yr.scale(Wt),kn.translate(Gn.translate())):Gn.scale()},kn.translate=function(Wt){if(!arguments.length)return Gn.translate();var tn=Gn.scale(),Sn=+Wt[0],An=+Wt[1];return zn=Gn.translate(Wt).clipExtent([[Sn-.455*tn,An-.238*tn],[Sn+.455*tn,An+.238*tn]]).stream($t),_n=ar.translate([Sn-.307*tn,An+.201*tn]).clipExtent([[Sn-.425*tn+c.Ho,An+.12*tn+c.Ho],[Sn-.214*tn-c.Ho,An+.234*tn-c.Ho]]).stream($t),Cn=yr.translate([Sn-.205*tn,An+.212*tn]).clipExtent([[Sn-.214*tn+c.Ho,An+.166*tn+c.Ho],[Sn-.115*tn-c.Ho,An+.234*tn-c.Ho]]).stream($t),zt()},kn.fitExtent=function(Wt,tn){return(0,ht.qg)(kn,Wt,tn)},kn.fitSize=function(Wt,tn){return(0,ht.mF)(kn,Wt,tn)},kn.fitWidth=function(Wt,tn){return(0,ht.V6)(kn,Wt,tn)},kn.fitHeight=function(Wt,tn){return(0,ht.rf)(kn,Wt,tn)},kn.scale(1070)}var gt=e(12956),Pt=e(17889),Ot=e(49386);function Ht(Zt,nn){return[Zt,(0,c.cM)((0,c.OR)((c.ou+nn)/2))]}function jt(){return Nt(Ht).scale(961/c.BZ)}function Nt(Zt){var nn,zn,_n,Cn=(0,st.Z)(Zt),Un=Cn.center,Gn=Cn.scale,ar=Cn.translate,yr=Cn.clipExtent,$t=null;function kn(){var zt=c.pi*Gn(),Wt=Cn((0,Ot.Z)(Cn.rotate()).invert([0,0]));return yr(null==$t?[[Wt[0]-zt,Wt[1]-zt],[Wt[0]+zt,Wt[1]+zt]]:Zt===Ht?[[Math.max(Wt[0]-zt,$t),nn],[Math.min(Wt[0]+zt,zn),_n]]:[[$t,Math.max(Wt[1]-zt,nn)],[zn,Math.min(Wt[1]+zt,_n)]])}return Cn.scale=function(zt){return arguments.length?(Gn(zt),kn()):Gn()},Cn.translate=function(zt){return arguments.length?(ar(zt),kn()):ar()},Cn.center=function(zt){return arguments.length?(Un(zt),kn()):Un()},Cn.clipExtent=function(zt){return arguments.length?(null==zt?$t=nn=zn=_n=null:($t=+zt[0][0],nn=+zt[0][1],zn=+zt[1][0],_n=+zt[1][1]),kn()):null==$t?null:[[$t,nn],[zn,_n]]},kn()}function Gt(Zt){return(0,c.OR)((c.ou+Zt)/2)}function un(Zt,nn){var zn=(0,c.mC)(Zt),_n=Zt===nn?(0,c.O$)(Zt):(0,c.cM)(zn/(0,c.mC)(nn))/(0,c.cM)(Gt(nn)/Gt(Zt)),Cn=zn*(0,c.sQ)(Gt(Zt),_n)/_n;if(!_n)return Ht;function Un(Gn,ar){Cn>0?ar<-c.ou+c.Ho&&(ar=-c.ou+c.Ho):ar>c.ou-c.Ho&&(ar=c.ou-c.Ho);var yr=Cn/(0,c.sQ)(Gt(ar),_n);return[yr*(0,c.O$)(_n*Gn),Cn-yr*(0,c.mC)(_n*Gn)]}return Un.invert=function(Gn,ar){var yr=Cn-ar,$t=(0,c.Xx)(_n)*(0,c._b)(Gn*Gn+yr*yr),kn=(0,c.fv)(Gn,(0,c.Wn)(yr))*(0,c.Xx)(yr);return yr*_n<0&&(kn-=c.pi*(0,c.Xx)(Gn)*(0,c.Xx)(yr)),[kn/_n,2*(0,c.z4)((0,c.sQ)(Cn/$t,1/_n))-c.ou]},Un}function pn(){return ct(un).scale(109.5).parallels([30,30])}Ht.invert=function(Zt,nn){return[Zt,2*(0,c.z4)((0,c.Qq)(nn))-c.ou]};var Kt=e(97492);function wn(Zt,nn){var zn=(0,c.mC)(Zt),_n=Zt===nn?(0,c.O$)(Zt):(zn-(0,c.mC)(nn))/(nn-Zt),Cn=zn/_n+Zt;if((0,c.Wn)(_n)<c.Ho)return Kt.k;function Un(Gn,ar){var yr=Cn-ar,$t=_n*Gn;return[yr*(0,c.O$)($t),Cn-yr*(0,c.mC)($t)]}return Un.invert=function(Gn,ar){var yr=Cn-ar,$t=(0,c.fv)(Gn,(0,c.Wn)(yr))*(0,c.Xx)(yr);return yr*_n<0&&($t-=c.pi*(0,c.Xx)(Gn)*(0,c.Xx)(yr)),[$t/_n,Cn-(0,c.Xx)(_n)*(0,c._b)(Gn*Gn+yr*yr)]},Un}function Bn(){return ct(wn).scale(131.154).center([0,13.9389])}var vn=1.340264,cn=-.081106,dn=893e-6,sn=.003796,hn=(0,c._b)(3)/2;function En(Zt,nn){var zn=(0,c.ZR)(hn*(0,c.O$)(nn)),_n=zn*zn,Cn=_n*_n*_n;return[Zt*(0,c.mC)(zn)/(hn*(vn+3*cn*_n+Cn*(7*dn+9*sn*_n))),zn*(vn+cn*_n+Cn*(dn+sn*_n))]}function Mn(){return(0,st.Z)(En).scale(177.158)}En.invert=function(Zt,nn){for(var zn,_n=nn,Cn=_n*_n,Un=Cn*Cn*Cn,Gn=0;Gn<12&&(Un=(Cn=(_n-=zn=(_n*(vn+cn*Cn+Un*(dn+sn*Cn))-nn)/(vn+3*cn*Cn+Un*(7*dn+9*sn*Cn)))*_n)*Cn*Cn,!((0,c.Wn)(zn)<c.aW));++Gn);return[hn*Zt*(vn+3*cn*Cn+Un*(7*dn+9*sn*Cn))/(0,c.mC)(_n),(0,c.ZR)((0,c.O$)(_n)/hn)]};var Rn=e(98936),Nn=e(64684);function Fn(){var Zt,nn,zn,_n,Cn,Un,Gn,ar=1,yr=0,$t=0,kn=1,zt=1,Wt=0,tn=null,Sn=1,An=1,Tn=(0,Nn.l)({point:function(fn,yn){var Ln=on([fn,yn]);this.stream.point(Ln[0],Ln[1])}}),an=re.Z;function mn(){return Sn=ar*kn,An=ar*zt,Un=Gn=null,on}function on(fn){var yn=fn[0]*Sn,Ln=fn[1]*An;if(Wt){var Hn=Ln*Zt-yn*nn;yn=yn*Zt+Ln*nn,Ln=Hn}return[yn+yr,Ln+$t]}return on.invert=function(fn){var yn=fn[0]-yr,Ln=fn[1]-$t;if(Wt){var Hn=Ln*Zt+yn*nn;yn=yn*Zt-Ln*nn,Ln=Hn}return[yn/Sn,Ln/An]},on.stream=function(fn){return Un&&Gn===fn?Un:Un=Tn(an(Gn=fn))},on.postclip=function(fn){return arguments.length?(an=fn,tn=zn=_n=Cn=null,mn()):an},on.clipExtent=function(fn){return arguments.length?(an=null==fn?(tn=zn=_n=Cn=null,re.Z):(0,s.Z)(tn=+fn[0][0],zn=+fn[0][1],_n=+fn[1][0],Cn=+fn[1][1]),mn()):null==tn?null:[[tn,zn],[_n,Cn]]},on.scale=function(fn){return arguments.length?(ar=+fn,mn()):ar},on.translate=function(fn){return arguments.length?(yr=+fn[0],$t=+fn[1],mn()):[yr,$t]},on.angle=function(fn){return arguments.length?(nn=(0,c.O$)(Wt=fn%360*c.uR),Zt=(0,c.mC)(Wt),mn()):Wt*c.RW},on.reflectX=function(fn){return arguments.length?(kn=fn?-1:1,mn()):kn<0},on.reflectY=function(fn){return arguments.length?(zt=fn?-1:1,mn()):zt<0},on.fitExtent=function(fn,yn){return(0,ht.qg)(on,fn,yn)},on.fitSize=function(fn,yn){return(0,ht.mF)(on,fn,yn)},on.fitWidth=function(fn,yn){return(0,ht.V6)(on,fn,yn)},on.fitHeight=function(fn,yn){return(0,ht.rf)(on,fn,yn)},on}var rr=e(26867),$n=e(57962),mr=e(25382);function fr(Zt,nn){var zn=(0,c.mC)(nn),_n=1+(0,c.mC)(Zt)*zn;return[zn*(0,c.O$)(Zt)/_n,(0,c.O$)(nn)/_n]}function Zn(){return(0,st.Z)(fr).scale(250).clipAngle(142)}function qn(Zt,nn){return[(0,c.cM)((0,c.OR)((c.ou+nn)/2)),-Zt]}function ur(){var Zt=Nt(qn),nn=Zt.center,zn=Zt.rotate;return Zt.center=function(_n){return arguments.length?nn([-_n[1],_n[0]]):[(_n=nn())[1],-_n[0]]},Zt.rotate=function(_n){return arguments.length?zn([_n[0],_n[1],_n.length>2?_n[2]+90:90]):[(_n=zn())[0],_n[1],_n[2]-90]},zn([0,0,90]).scale(159.155)}fr.invert=(0,mr.O)(function(Zt){return 2*(0,c.z4)(Zt)}),qn.invert=function(Zt,nn){return[-nn,2*(0,c.z4)((0,c.Qq)(Zt))-c.ou]}},83074:function($,R,e){"use strict";e.d(R,{Z:function(){return A}});var k=e(39695);function A(l,T){var b=l[0]*k.uR,d=l[1]*k.uR,s=T[0]*k.uR,t=T[1]*k.uR,o=(0,k.mC)(d),r=(0,k.O$)(d),n=(0,k.mC)(t),i=(0,k.O$)(t),a=o*(0,k.mC)(b),c=o*(0,k.O$)(b),p=n*(0,k.mC)(s),f=n*(0,k.O$)(s),x=2*(0,k.ZR)((0,k._b)((0,k.Jy)(t-d)+o*n*(0,k.Jy)(s-b))),v=(0,k.O$)(x),g=x?function(y){var h=(0,k.O$)(y*=x)/v,m=(0,k.O$)(x-y)/v,w=m*a+h*p,u=m*c+h*f,S=m*r+h*i;return[(0,k.fv)(u,w)*k.RW,(0,k.fv)(S,(0,k._b)(w*w+u*u))*k.RW]}:function(){return[b*k.RW,d*k.RW]};return g.distance=x,g}},39695:function($,R,e){"use strict";e.d(R,{BZ:function(){return d},Ho:function(){return k},Jy:function(){return w},Kh:function(){return h},O$:function(){return x},OR:function(){return y},Qq:function(){return c},RW:function(){return s},Wn:function(){return o},Xx:function(){return v},ZR:function(){return m},_b:function(){return g},aW:function(){return A},cM:function(){return p},fv:function(){return n},mC:function(){return i},mD:function(){return a},ou:function(){return T},pi:function(){return l},pu:function(){return b},sQ:function(){return f},uR:function(){return t},z4:function(){return r}});var k=1e-6,A=1e-12,l=Math.PI,T=l/2,b=l/4,d=2*l,s=180/l,t=l/180,o=Math.abs,r=Math.atan,n=Math.atan2,i=Math.cos,a=Math.ceil,c=Math.exp,p=Math.log,f=Math.pow,x=Math.sin,v=Math.sign||function(u){return u>0?1:u<0?-1:0},g=Math.sqrt,y=Math.tan;function h(u){return u>1?0:u<-1?l:Math.acos(u)}function m(u){return u>1?T:u<-1?-T:Math.asin(u)}function w(u){return(u=x(u/2))*u}},73182:function($,R,e){"use strict";function k(){}e.d(R,{Z:function(){return k}})},3559:function($,R,e){"use strict";var k=e(73182),A=1/0,l=A,T=-A,b=T;R.Z={point:function(s,t){s<A&&(A=s),s>T&&(T=s),t<l&&(l=t),t>b&&(b=t)},lineStart:k.Z,lineEnd:k.Z,polygonStart:k.Z,polygonEnd:k.Z,result:function(){var s=[[A,l],[T,b]];return T=b=-(l=A=1/0),s}}},67108:function($,R,e){"use strict";e.d(R,{Z:function(){return A}});var k=e(39695);function A(l,T){return(0,k.Wn)(l[0]-T[0])<k.Ho&&(0,k.Wn)(l[1]-T[1])<k.Ho}},23071:function($,R,e){"use strict";e.d(R,{Z:function(){return d}});var k=e(33940),A=e(7620),l=e(39695),T=(0,k.Z)();function b(s){return(0,l.Wn)(s[0])<=l.pi?s[0]:(0,l.Xx)(s[0])*(((0,l.Wn)(s[0])+l.pi)%l.BZ-l.pi)}function d(s,t){var o=b(t),r=t[1],n=(0,l.O$)(r),i=[(0,l.O$)(o),-(0,l.mC)(o),0],a=0,c=0;T.reset(),1===n?r=l.ou+l.Ho:-1===n&&(r=-l.ou-l.Ho);for(var p=0,f=s.length;p<f;++p)if(v=(x=s[p]).length)for(var x,v,g=x[v-1],y=b(g),h=g[1]/2+l.pu,m=(0,l.O$)(h),w=(0,l.mC)(h),u=0;u<v;++u,y=_,m=L,w=C,g=S){var S=x[u],_=b(S),E=S[1]/2+l.pu,L=(0,l.O$)(E),C=(0,l.mC)(E),P=_-y,I=P>=0?1:-1,U=I*P,z=U>l.pi,H=m*L;if(T.add((0,l.fv)(H*I*(0,l.O$)(U),w*C+H*(0,l.mC)(U))),a+=z?P+I*l.BZ:P,z^y>=o^_>=o){var F=(0,A.T5)((0,A.Og)(g),(0,A.Og)(S));(0,A.iJ)(F);var N=(0,A.T5)(i,F);(0,A.iJ)(N);var B=(z^P>=0?-1:1)*(0,l.ZR)(N[2]);(r>B||r===B&&(F[0]||F[1]))&&(c+=z^P>=0?1:-1)}}return(a<-l.Ho||a<l.Ho&&T<-l.Ho)^1&c}},25382:function($,R,e){"use strict";e.d(R,{O:function(){return l},W:function(){return A}});var k=e(39695);function A(T){return function(b,d){var s=(0,k.mC)(b),t=(0,k.mC)(d),o=T(s*t);return[o*t*(0,k.O$)(b),o*(0,k.O$)(d)]}}function l(T){return function(b,d){var s=(0,k._b)(b*b+d*d),t=T(s),o=(0,k.O$)(t),r=(0,k.mC)(t);return[(0,k.fv)(b*o,s*r),(0,k.ZR)(s&&d*o/s)]}}},12956:function($,R,e){"use strict";e.d(R,{Z:function(){return b},l:function(){return T}});var k=e(39695),A=e(25382),l=e(15002),T=(0,A.W)(function(d){return(0,k._b)(2/(1+d))});function b(){return(0,l.Z)(T).scale(124.75).clipAngle(179.999)}T.invert=(0,A.O)(function(d){return 2*(0,k.ZR)(d/2)})},17889:function($,R,e){"use strict";e.d(R,{N:function(){return T},Z:function(){return b}});var k=e(39695),A=e(25382),l=e(15002),T=(0,A.W)(function(d){return(d=(0,k.Kh)(d))&&d/(0,k.O$)(d)});function b(){return(0,l.Z)(T).scale(79.4188).clipAngle(179.999)}T.invert=(0,A.O)(function(d){return d})},97492:function($,R,e){"use strict";e.d(R,{Z:function(){return l},k:function(){return A}});var k=e(15002);function A(T,b){return[T,b]}function l(){return(0,k.Z)(A).scale(152.63)}A.invert=A},47589:function($,R,e){"use strict";e.d(R,{V6:function(){return d},mF:function(){return b},qg:function(){return T},rf:function(){return s}});var k=e(72736),A=e(3559);function l(t,o,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=n&&t.clipExtent(null),(0,k.Z)(r,t.stream(A.Z)),o(A.Z.result()),null!=n&&t.clipExtent(n),t}function T(t,o,r){return l(t,function(n){var i=o[1][0]-o[0][0],a=o[1][1]-o[0][1],c=Math.min(i/(n[1][0]-n[0][0]),a/(n[1][1]-n[0][1])),p=+o[0][0]+(i-c*(n[1][0]+n[0][0]))/2,f=+o[0][1]+(a-c*(n[1][1]+n[0][1]))/2;t.scale(150*c).translate([p,f])},r)}function b(t,o,r){return T(t,[[0,0],o],r)}function d(t,o,r){return l(t,function(n){var i=+o,a=i/(n[1][0]-n[0][0]),c=(i-a*(n[1][0]+n[0][0]))/2,p=-a*n[0][1];t.scale(150*a).translate([c,p])},r)}function s(t,o,r){return l(t,function(n){var i=+o,a=i/(n[1][1]-n[0][1]),c=-a*n[0][0],p=(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([c,p])},r)}},98936:function($,R,e){"use strict";e.d(R,{M:function(){return T},Z:function(){return b}});var k=e(39695),A=e(25382),l=e(15002);function T(d,s){var t=(0,k.mC)(s),o=(0,k.mC)(d)*t;return[t*(0,k.O$)(d)/o,(0,k.O$)(s)/o]}function b(){return(0,l.Z)(T).scale(144.049).clipAngle(60)}T.invert=(0,A.O)(k.z4)},15002:function($,R,e){"use strict";e.d(R,{Z:function(){return f},r:function(){return x}});var k=e(87070),A=e(1457),l=e(87605),T=e(96059),b=e(8593),d=e(39695),s=e(49386),t=e(64684),o=e(47589),r=e(7620),n=(0,d.mC)(30*d.uR);function i(v,g){return+g?function(y,h){function m(w,u,S,_,E,L,C,P,I,U,z,H,F,N){var B=C-w,j=P-u,J=B*B+j*j;if(J>4*h&&F--){var G=_+U,V=E+z,W=L+H,X=(0,d._b)(G*G+V*V+W*W),K=(0,d.ZR)(W/=X),re=(0,d.Wn)((0,d.Wn)(W)-1)<d.Ho||(0,d.Wn)(S-I)<d.Ho?(S+I)/2:(0,d.fv)(V,G),ee=y(re,K),ie=ee[0],oe=ee[1],ce=ie-w,me=oe-u,de=j*ce-B*me;(de*de/J>h||(0,d.Wn)((B*ce+j*me)/J-.5)>.3||_*U+E*z+L*H<n)&&(m(w,u,S,_,E,L,ie,oe,re,G/=X,V/=X,W,F,N),N.point(ie,oe),m(ie,oe,re,G,V,W,C,P,I,U,z,H,F,N))}}return function(w){var u,S,_,E,L,C,P,I,U,z,H,F,N={point:B,lineStart:j,lineEnd:G,polygonStart:function(){w.polygonStart(),N.lineStart=V},polygonEnd:function(){w.polygonEnd(),N.lineStart=j}};function B(K,re){K=y(K,re),w.point(K[0],K[1])}function j(){I=NaN,N.point=J,w.lineStart()}function J(K,re){var ee=(0,r.Og)([K,re]),ie=y(K,re);m(I,U,P,z,H,F,I=ie[0],U=ie[1],P=K,z=ee[0],H=ee[1],F=ee[2],16,w),w.point(I,U)}function G(){N.point=B,w.lineEnd()}function V(){j(),N.point=W,N.lineEnd=X}function W(K,re){J(u=K,re),S=I,_=U,E=z,L=H,C=F,N.point=J}function X(){m(I,U,P,z,H,F,S,_,u,E,L,C,16,w),N.lineEnd=G,G()}return N}}(v,g):(y=v,(0,t.l)({point:function(h,m){h=y(h,m),this.stream.point(h[0],h[1])}}));var y}var a=(0,t.l)({point:function(v,g){this.stream.point(v*d.uR,g*d.uR)}});function c(v,g,y,h,m){function w(u,S){return[g+v*(u*=h),y-v*(S*=m)]}return w.invert=function(u,S){return[(u-g)/v*h,(y-S)/v*m]},w}function p(v,g,y,h,m,w){var u=(0,d.mC)(w),S=(0,d.O$)(w),_=u*v,E=S*v,L=u/v,C=S/v,P=(S*y-u*g)/v,I=(S*g+u*y)/v;function U(z,H){return[_*(z*=h)-E*(H*=m)+g,y-E*z-_*H]}return U.invert=function(z,H){return[h*(L*z-C*H+P),m*(I-C*z-L*H)]},U}function f(v){return x(function(){return v})()}function x(v){var g,y,h,m,w,u,S,_,E,L,C=150,P=480,I=250,U=0,z=0,H=0,F=0,N=0,B=0,j=1,J=1,G=null,V=k.Z,W=null,X=b.Z,K=.5;function re(ce){return _(ce[0]*d.uR,ce[1]*d.uR)}function ee(ce){return(ce=_.invert(ce[0],ce[1]))&&[ce[0]*d.RW,ce[1]*d.RW]}function ie(){var ce=p(C,0,0,j,J,B).apply(null,g(U,z)),me=(B?p:c)(C,P-ce[0],I-ce[1],j,J,B);return y=(0,s.I)(H,F,N),S=(0,T.Z)(g,me),_=(0,T.Z)(y,S),u=i(S,K),oe()}function oe(){return E=L=null,re}return re.stream=function(ce){return E&&L===ce?E:E=a((me=y,(0,t.l)({point:function(de,he){var ve=me(de,he);return this.stream.point(ve[0],ve[1])}}))(V(u(X(L=ce)))));var me},re.preclip=function(ce){return arguments.length?(V=ce,G=void 0,oe()):V},re.postclip=function(ce){return arguments.length?(X=ce,W=h=m=w=null,oe()):X},re.clipAngle=function(ce){return arguments.length?(V=+ce?(0,A.Z)(G=ce*d.uR):(G=null,k.Z),oe()):G*d.RW},re.clipExtent=function(ce){return arguments.length?(X=null==ce?(W=h=m=w=null,b.Z):(0,l.Z)(W=+ce[0][0],h=+ce[0][1],m=+ce[1][0],w=+ce[1][1]),oe()):null==W?null:[[W,h],[m,w]]},re.scale=function(ce){return arguments.length?(C=+ce,ie()):C},re.translate=function(ce){return arguments.length?(P=+ce[0],I=+ce[1],ie()):[P,I]},re.center=function(ce){return arguments.length?(U=ce[0]%360*d.uR,z=ce[1]%360*d.uR,ie()):[U*d.RW,z*d.RW]},re.rotate=function(ce){return arguments.length?(H=ce[0]%360*d.uR,F=ce[1]%360*d.uR,N=ce.length>2?ce[2]%360*d.uR:0,ie()):[H*d.RW,F*d.RW,N*d.RW]},re.angle=function(ce){return arguments.length?(B=ce%360*d.uR,ie()):B*d.RW},re.reflectX=function(ce){return arguments.length?(j=ce?-1:1,ie()):j<0},re.reflectY=function(ce){return arguments.length?(J=ce?-1:1,ie()):J<0},re.precision=function(ce){return arguments.length?(u=i(S,K=ce*ce),oe()):(0,d._b)(K)},re.fitExtent=function(ce,me){return(0,o.qg)(re,ce,me)},re.fitSize=function(ce,me){return(0,o.mF)(re,ce,me)},re.fitWidth=function(ce,me){return(0,o.V6)(re,ce,me)},re.fitHeight=function(ce,me){return(0,o.rf)(re,ce,me)},function(){return g=v.apply(this,arguments),re.invert=g.invert&&ee,ie()}}},26867:function($,R,e){"use strict";e.d(R,{K:function(){return l},Z:function(){return T}});var k=e(15002),A=e(39695);function l(b,d){var s=d*d,t=s*s;return[b*(.8707-.131979*s+t*(t*(.003971*s-.001529*t)-.013791)),d*(1.007226+s*(.015085+t*(.028874*s-.044475-.005916*t)))]}function T(){return(0,k.Z)(l).scale(175.295)}l.invert=function(b,d){var s,t=d,o=25;do{var r=t*t,n=r*r;t-=s=(t*(1.007226+r*(.015085+n*(.028874*r-.044475-.005916*n)))-d)/(1.007226+r*(.045255+n*(.259866*r-.311325-.06507600000000001*n)))}while((0,A.Wn)(s)>A.Ho&&--o>0);return[b/(.8707+(r=t*t)*(r*(r*r*r*(.003971-.001529*r)-.013791)-.131979)),t]}},57962:function($,R,e){"use strict";e.d(R,{I:function(){return T},Z:function(){return b}});var k=e(39695),A=e(25382),l=e(15002);function T(d,s){return[(0,k.mC)(s)*(0,k.O$)(d),(0,k.O$)(s)]}function b(){return(0,l.Z)(T).scale(249.5).clipAngle(90+k.Ho)}T.invert=(0,A.O)(k.ZR)},49386:function($,R,e){"use strict";e.d(R,{I:function(){return T},Z:function(){return t}});var k=e(96059),A=e(39695);function l(o,r){return[(0,A.Wn)(o)>A.pi?o+Math.round(-o/A.BZ)*A.BZ:o,r]}function T(o,r,n){return(o%=A.BZ)?r||n?(0,k.Z)(d(o),s(r,n)):d(o):r||n?s(r,n):l}function b(o){return function(r,n){return[(r+=o)>A.pi?r-A.BZ:r<-A.pi?r+A.BZ:r,n]}}function d(o){var r=b(o);return r.invert=b(-o),r}function s(o,r){var n=(0,A.mC)(o),i=(0,A.O$)(o),a=(0,A.mC)(r),c=(0,A.O$)(r);function p(f,x){var v=(0,A.mC)(x),g=(0,A.mC)(f)*v,y=(0,A.O$)(f)*v,h=(0,A.O$)(x),m=h*n+g*i;return[(0,A.fv)(y*a-m*c,g*n-h*i),(0,A.ZR)(m*a+y*c)]}return p.invert=function(f,x){var v=(0,A.mC)(x),g=(0,A.mC)(f)*v,y=(0,A.O$)(f)*v,h=(0,A.O$)(x),m=h*a-y*c;return[(0,A.fv)(y*a+h*c,g*n+m*i),(0,A.ZR)(m*n-g*i)]},p}function t(o){function r(n){return(n=o(n[0]*A.uR,n[1]*A.uR))[0]*=A.RW,n[1]*=A.RW,n}return o=T(o[0]*A.uR,o[1]*A.uR,o.length>2?o[2]*A.uR:0),r.invert=function(n){return(n=o.invert(n[0]*A.uR,n[1]*A.uR))[0]*=A.RW,n[1]*=A.RW,n},r}l.invert=l},72736:function($,R,e){"use strict";function k(s,t){s&&l.hasOwnProperty(s.type)&&l[s.type](s,t)}e.d(R,{Z:function(){return d}});var A={Feature:function(s,t){k(s.geometry,t)},FeatureCollection:function(s,t){for(var o=s.features,r=-1,n=o.length;++r<n;)k(o[r].geometry,t)}},l={Sphere:function(s,t){t.sphere()},Point:function(s,t){t.point((s=s.coordinates)[0],s[1],s[2])},MultiPoint:function(s,t){for(var o=s.coordinates,r=-1,n=o.length;++r<n;)t.point((s=o[r])[0],s[1],s[2])},LineString:function(s,t){T(s.coordinates,t,0)},MultiLineString:function(s,t){for(var o=s.coordinates,r=-1,n=o.length;++r<n;)T(o[r],t,0)},Polygon:function(s,t){b(s.coordinates,t)},MultiPolygon:function(s,t){for(var o=s.coordinates,r=-1,n=o.length;++r<n;)b(o[r],t)},GeometryCollection:function(s,t){for(var o=s.geometries,r=-1,n=o.length;++r<n;)k(o[r],t)}};function T(s,t,o){var r,n=-1,i=s.length-o;for(t.lineStart();++n<i;)t.point((r=s[n])[0],r[1],r[2]);t.lineEnd()}function b(s,t){var o=-1,r=s.length;for(t.polygonStart();++o<r;)T(s[o],t,1);t.polygonEnd()}function d(s,t){s&&A.hasOwnProperty(s.type)?A[s.type](s,t):k(s,t)}},64684:function($,R,e){"use strict";function k(T){return{stream:A(T)}}function A(T){return function(b){var d=new l;for(var s in T)d[s]=T[s];return d.stream=b,d}}function l(){}e.d(R,{Z:function(){return k},l:function(){return A}}),l.prototype={constructor:l,point:function(T,b){this.stream.point(T,b)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}}},674:function($,R,e){"use strict";function k(Te,Q){return Te.parent===Q.parent?1:2}function A(Te,Q){return Te+Q.x}function l(Te,Q){return Math.max(Te,Q.y)}function T(){var Te=k,Q=1,se=1,fe=!1;function ye(Me){var Ie,Ce=0;Me.eachAfter(function(Fe){var He,Ve=Fe.children;Ve?(Fe.x=(He=Ve).reduce(A,0)/He.length,Fe.y=function(He){return 1+He.reduce(l,0)}(Ve)):(Fe.x=Ie?Ce+=Te(Fe,Ie):0,Fe.y=0,Ie=Fe)});var Re=function(Fe){for(var Ve;Ve=Fe.children;)Fe=Ve[0];return Fe}(Me),le=function(Fe){for(var Ve;Ve=Fe.children;)Fe=Ve[Ve.length-1];return Fe}(Me),ge=Re.x-Te(Re,le)/2,_e=le.x+Te(le,Re)/2;return Me.eachAfter(fe?function(Fe){Fe.x=(Fe.x-Me.x)*Q,Fe.y=(Me.y-Fe.y)*se}:function(Fe){Fe.x=(Fe.x-ge)/(_e-ge)*Q,Fe.y=(1-(Me.y?Fe.y/Me.y:1))*se})}return ye.separation=function(Me){return arguments.length?(Te=Me,ye):Te},ye.size=function(Me){return arguments.length?(fe=!1,Q=+Me[0],se=+Me[1],ye):fe?null:[Q,se]},ye.nodeSize=function(Me){return arguments.length?(fe=!0,Q=+Me[0],se=+Me[1],ye):fe?[Q,se]:null},ye}function b(Te){var Q=0,se=Te.children,fe=se&&se.length;if(fe)for(;--fe>=0;)Q+=se[fe].value;else Q=1;Te.value=Q}function d(Te,Q){var se,fe,ye,Me,Ie,Ce=new r(Te),Re=+Te.value&&(Ce.value=Te.value),le=[Ce];for(null==Q&&(Q=s);se=le.pop();)if(Re&&(se.value=+se.data.value),(ye=Q(se.data))&&(Ie=ye.length))for(se.children=new Array(Ie),Me=Ie-1;Me>=0;--Me)le.push(fe=se.children[Me]=new r(ye[Me])),fe.parent=se,fe.depth=se.depth+1;return Ce.eachBefore(o)}function s(Te){return Te.children}function t(Te){Te.data=Te.data.data}function o(Te){var Q=0;do{Te.height=Q}while((Te=Te.parent)&&Te.height<++Q)}function r(Te){this.data=Te,this.depth=this.height=0,this.parent=null}e.r(R),e.d(R,{cluster:function(){return T},hierarchy:function(){return d},pack:function(){return I},packEnclose:function(){return i},packSiblings:function(){return S},partition:function(){return B},stratify:function(){return W},tree:function(){return ce},treemap:function(){return Pe},treemapBinary:function(){return xe},treemapDice:function(){return N},treemapResquarify:function(){return Ae},treemapSlice:function(){return me},treemapSliceDice:function(){return ke},treemapSquarify:function(){return ve}}),r.prototype=d.prototype={constructor:r,count:function(){return this.eachAfter(b)},each:function(Te){var Q,se,fe,ye,Me=this,Ie=[Me];do{for(Q=Ie.reverse(),Ie=[];Me=Q.pop();)if(Te(Me),se=Me.children)for(fe=0,ye=se.length;fe<ye;++fe)Ie.push(se[fe])}while(Ie.length);return this},eachAfter:function(Te){for(var Q,se,fe,ye=this,Me=[ye],Ie=[];ye=Me.pop();)if(Ie.push(ye),Q=ye.children)for(se=0,fe=Q.length;se<fe;++se)Me.push(Q[se]);for(;ye=Ie.pop();)Te(ye);return this},eachBefore:function(Te){for(var Q,se,fe=this,ye=[fe];fe=ye.pop();)if(Te(fe),Q=fe.children)for(se=Q.length-1;se>=0;--se)ye.push(Q[se]);return this},sum:function(Te){return this.eachAfter(function(Q){for(var se=+Te(Q.data)||0,fe=Q.children,ye=fe&&fe.length;--ye>=0;)se+=fe[ye].value;Q.value=se})},sort:function(Te){return this.eachBefore(function(Q){Q.children&&Q.children.sort(Te)})},path:function(Te){for(var Q=this,se=function(Me,Ie){if(Me===Ie)return Me;var Ce=Me.ancestors(),Re=Ie.ancestors(),le=null;for(Me=Ce.pop(),Ie=Re.pop();Me===Ie;)le=Me,Me=Ce.pop(),Ie=Re.pop();return le}(Q,Te),fe=[Q];Q!==se;)fe.push(Q=Q.parent);for(var ye=fe.length;Te!==se;)fe.splice(ye,0,Te),Te=Te.parent;return fe},ancestors:function(){for(var Te=this,Q=[Te];Te=Te.parent;)Q.push(Te);return Q},descendants:function(){var Te=[];return this.each(function(Q){Te.push(Q)}),Te},leaves:function(){var Te=[];return this.eachBefore(function(Q){Q.children||Te.push(Q)}),Te},links:function(){var Te=this,Q=[];return Te.each(function(se){se!==Te&&Q.push({source:se.parent,target:se})}),Q},copy:function(){return d(this).eachBefore(t)}};var n=Array.prototype.slice;function i(Te){for(var Q,se,fe=0,ye=(Te=function(Ie){for(var Ce,Re,le=Ie.length;le;)Re=Math.random()*le--|0,Ce=Ie[le],Ie[le]=Ie[Re],Ie[Re]=Ce;return Ie}(n.call(Te))).length,Me=[];fe<ye;)Q=Te[fe],se&&p(se,Q)?++fe:(se=x(Me=a(Me,Q)),fe=0);return se}function a(Te,Q){var se,fe;if(f(Q,Te))return[Q];for(se=0;se<Te.length;++se)if(c(Q,Te[se])&&f(v(Te[se],Q),Te))return[Te[se],Q];for(se=0;se<Te.length-1;++se)for(fe=se+1;fe<Te.length;++fe)if(c(v(Te[se],Te[fe]),Q)&&c(v(Te[se],Q),Te[fe])&&c(v(Te[fe],Q),Te[se])&&f(g(Te[se],Te[fe],Q),Te))return[Te[se],Te[fe],Q];throw new Error}function c(Te,Q){var se=Te.r-Q.r,fe=Q.x-Te.x,ye=Q.y-Te.y;return se<0||se*se<fe*fe+ye*ye}function p(Te,Q){var se=Te.r-Q.r+1e-6,fe=Q.x-Te.x,ye=Q.y-Te.y;return se>0&&se*se>fe*fe+ye*ye}function f(Te,Q){for(var se=0;se<Q.length;++se)if(!p(Te,Q[se]))return!1;return!0}function x(Te){switch(Te.length){case 1:return{x:(Q=Te[0]).x,y:Q.y,r:Q.r};case 2:return v(Te[0],Te[1]);case 3:return g(Te[0],Te[1],Te[2])}var Q}function v(Te,Q){var se=Te.x,fe=Te.y,ye=Te.r,Me=Q.x,Ie=Q.y,Ce=Q.r,Re=Me-se,le=Ie-fe,ge=Ce-ye,_e=Math.sqrt(Re*Re+le*le);return{x:(se+Me+Re/_e*ge)/2,y:(fe+Ie+le/_e*ge)/2,r:(_e+ye+Ce)/2}}function g(Te,Q,se){var fe=Te.x,ye=Te.y,Me=Te.r,Ie=Q.x,Ce=Q.y,Re=Q.r,le=se.x,ge=se.y,_e=se.r,Fe=fe-Ie,Ve=fe-le,He=ye-Ce,nt=ye-ge,tt=Re-Me,ot=_e-Me,dt=fe*fe+ye*ye-Me*Me,kt=dt-Ie*Ie-Ce*Ce+Re*Re,mt=dt-le*le-ge*ge+_e*_e,wt=Ve*He-Fe*nt,Lt=(He*mt-nt*kt)/(2*wt)-fe,Ct=(nt*tt-He*ot)/wt,It=(Ve*kt-Fe*mt)/(2*wt)-ye,Ut=(Fe*ot-Ve*tt)/wt,Rt=Ct*Ct+Ut*Ut-1,Ge=2*(Me+Lt*Ct+It*Ut),We=Lt*Lt+It*It-Me*Me,Be=-(Rt?(Ge+Math.sqrt(Ge*Ge-4*Rt*We))/(2*Rt):We/Ge);return{x:fe+Lt+Ct*Be,y:ye+It+Ut*Be,r:Be}}function y(Te,Q,se){var fe,ye,Me,Ie,Ce=Te.x-Q.x,Re=Te.y-Q.y,le=Ce*Ce+Re*Re;le?(ye=Q.r+se.r,Ie=Te.r+se.r,(ye*=ye)>(Ie*=Ie)?(fe=(le+Ie-ye)/(2*le),Me=Math.sqrt(Math.max(0,Ie/le-fe*fe)),se.x=Te.x-fe*Ce-Me*Re,se.y=Te.y-fe*Re+Me*Ce):(fe=(le+ye-Ie)/(2*le),Me=Math.sqrt(Math.max(0,ye/le-fe*fe)),se.x=Q.x+fe*Ce-Me*Re,se.y=Q.y+fe*Re+Me*Ce)):(se.x=Q.x+se.r,se.y=Q.y)}function h(Te,Q){var se=Te.r+Q.r-1e-6,fe=Q.x-Te.x,ye=Q.y-Te.y;return se>0&&se*se>fe*fe+ye*ye}function m(Te){var Q=Te._,se=Te.next._,fe=Q.r+se.r,ye=(Q.x*se.r+se.x*Q.r)/fe,Me=(Q.y*se.r+se.y*Q.r)/fe;return ye*ye+Me*Me}function w(Te){this._=Te,this.next=null,this.previous=null}function u(Te){if(!(ye=Te.length))return 0;var Q,se,fe,ye,Me,Ie,Ce,Re,le,ge,_e;if((Q=Te[0]).x=0,Q.y=0,!(ye>1))return Q.r;if(Q.x=-(se=Te[1]).r,se.x=Q.r,se.y=0,!(ye>2))return Q.r+se.r;y(se,Q,fe=Te[2]),Q=new w(Q),se=new w(se),fe=new w(fe),Q.next=fe.previous=se,se.next=Q.previous=fe,fe.next=se.previous=Q;e:for(Ce=3;Ce<ye;++Ce){y(Q._,se._,fe=Te[Ce]),fe=new w(fe),Re=se.next,le=Q.previous,ge=se._.r,_e=Q._.r;do{if(ge<=_e){if(h(Re._,fe._)){Q.next=se=Re,se.previous=Q,--Ce;continue e}ge+=Re._.r,Re=Re.next}else{if(h(le._,fe._)){(Q=le).next=se,se.previous=Q,--Ce;continue e}_e+=le._.r,le=le.previous}}while(Re!==le.next);for(fe.previous=Q,fe.next=se,Q.next=se.previous=se=fe,Me=m(Q);(fe=fe.next)!==se;)(Ie=m(fe))<Me&&(Q=fe,Me=Ie);se=Q.next}for(Q=[se._],fe=se;(fe=fe.next)!==se;)Q.push(fe._);for(fe=i(Q),Ce=0;Ce<ye;++Ce)(Q=Te[Ce]).x-=fe.x,Q.y-=fe.y;return fe.r}function S(Te){return u(Te),Te}function E(Te){if("function"!=typeof Te)throw new Error;return Te}function L(){return 0}function C(Te){return function(){return Te}}function P(Te){return Math.sqrt(Te.value)}function I(){var Te=null,Q=1,se=1,fe=L;function ye(Me){return Me.x=Q/2,Me.y=se/2,Te?Me.eachBefore(U(Te)).eachAfter(z(fe,.5)).eachBefore(H(1)):Me.eachBefore(U(P)).eachAfter(z(L,1)).eachAfter(z(fe,Me.r/Math.min(Q,se))).eachBefore(H(Math.min(Q,se)/(2*Me.r))),Me}return ye.radius=function(Me){return arguments.length?(Te=function _(Te){return null==Te?null:E(Te)}(Me),ye):Te},ye.size=function(Me){return arguments.length?(Q=+Me[0],se=+Me[1],ye):[Q,se]},ye.padding=function(Me){return arguments.length?(fe="function"==typeof Me?Me:C(+Me),ye):fe},ye}function U(Te){return function(Q){Q.children||(Q.r=Math.max(0,+Te(Q)||0))}}function z(Te,Q){return function(se){if(fe=se.children){var fe,ye,Me,Ie=fe.length,Ce=Te(se)*Q||0;if(Ce)for(ye=0;ye<Ie;++ye)fe[ye].r+=Ce;if(Me=u(fe),Ce)for(ye=0;ye<Ie;++ye)fe[ye].r-=Ce;se.r=Me+Ce}}}function H(Te){return function(Q){var se=Q.parent;Q.r*=Te,se&&(Q.x=se.x+Te*Q.x,Q.y=se.y+Te*Q.y)}}function F(Te){Te.x0=Math.round(Te.x0),Te.y0=Math.round(Te.y0),Te.x1=Math.round(Te.x1),Te.y1=Math.round(Te.y1)}function N(Te,Q,se,fe,ye){for(var Me,Ie=Te.children,Ce=-1,Re=Ie.length,le=Te.value&&(fe-Q)/Te.value;++Ce<Re;)(Me=Ie[Ce]).y0=se,Me.y1=ye,Me.x0=Q,Me.x1=Q+=Me.value*le}function B(){var Te=1,Q=1,se=0,fe=!1;function ye(Me){var Ce,Re,Ie=Me.height+1;return Me.x0=Me.y0=se,Me.x1=Te,Me.y1=Q/Ie,Me.eachBefore((Ce=Q,Re=Ie,function(le){le.children&&N(le,le.x0,Ce*(le.depth+1)/Re,le.x1,Ce*(le.depth+2)/Re);var ge=le.x0,_e=le.y0,Fe=le.x1-se,Ve=le.y1-se;Fe<ge&&(ge=Fe=(ge+Fe)/2),Ve<_e&&(_e=Ve=(_e+Ve)/2),le.x0=ge,le.y0=_e,le.x1=Fe,le.y1=Ve})),fe&&Me.eachBefore(F),Me}return ye.round=function(Me){return arguments.length?(fe=!!Me,ye):fe},ye.size=function(Me){return arguments.length?(Te=+Me[0],Q=+Me[1],ye):[Te,Q]},ye.padding=function(Me){return arguments.length?(se=+Me,ye):se},ye}var j={depth:-1},J={};function G(Te){return Te.id}function V(Te){return Te.parentId}function W(){var Te=G,Q=V;function se(fe){var ye,Me,Ie,Ce,Re,le,ge,_e=fe.length,Fe=new Array(_e),Ve={};for(Me=0;Me<_e;++Me)Re=Fe[Me]=new r(ye=fe[Me]),null!=(le=Te(ye,Me,fe))&&(le+="")&&(Ve[ge="$"+(Re.id=le)]=ge in Ve?J:Re);for(Me=0;Me<_e;++Me)if(Re=Fe[Me],null!=(le=Q(fe[Me],Me,fe))&&(le+="")){if(!(Ce=Ve["$"+le]))throw new Error("missing: "+le);if(Ce===J)throw new Error("ambiguous: "+le);Ce.children?Ce.children.push(Re):Ce.children=[Re],Re.parent=Ce}else{if(Ie)throw new Error("multiple roots");Ie=Re}if(!Ie)throw new Error("no root");if(Ie.parent=j,Ie.eachBefore(function(He){He.depth=He.parent.depth+1,--_e}).eachBefore(o),Ie.parent=null,_e>0)throw new Error("cycle");return Ie}return se.id=function(fe){return arguments.length?(Te=E(fe),se):Te},se.parentId=function(fe){return arguments.length?(Q=E(fe),se):Q},se}function X(Te,Q){return Te.parent===Q.parent?1:2}function K(Te){var Q=Te.children;return Q?Q[0]:Te.t}function re(Te){var Q=Te.children;return Q?Q[Q.length-1]:Te.t}function ee(Te,Q,se){var fe=se/(Q.i-Te.i);Q.c-=fe,Q.s+=se,Te.c+=fe,Q.z+=se,Q.m+=se}function ie(Te,Q,se){return Te.a.parent===Q.parent?Te.a:se}function oe(Te,Q){this._=Te,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=Q}function ce(){var Te=X,Q=1,se=1,fe=null;function ye(Re){var le=function(ot){for(var dt,kt,mt,wt,Lt,Ct=new oe(ot,0),It=[Ct];dt=It.pop();)if(mt=dt._.children)for(dt.children=new Array(Lt=mt.length),wt=Lt-1;wt>=0;--wt)It.push(kt=dt.children[wt]=new oe(mt[wt],wt)),kt.parent=dt;return(Ct.parent=new oe(null,0)).children=[Ct],Ct}(Re);if(le.eachAfter(Me),le.parent.m=-le.z,le.eachBefore(Ie),fe)Re.eachBefore(Ce);else{var ge=Re,_e=Re,Fe=Re;Re.eachBefore(function(ot){ot.x<ge.x&&(ge=ot),ot.x>_e.x&&(_e=ot),ot.depth>Fe.depth&&(Fe=ot)});var Ve=ge===_e?1:Te(ge,_e)/2,He=Ve-ge.x,nt=Q/(_e.x+Ve+He),tt=se/(Fe.depth||1);Re.eachBefore(function(ot){ot.x=(ot.x+He)*nt,ot.y=ot.depth*tt})}return Re}function Me(Re){var le=Re.children,ge=Re.parent.children,_e=Re.i?ge[Re.i-1]:null;if(le){!function(Ve){for(var He,nt=0,tt=0,ot=Ve.children,dt=ot.length;--dt>=0;)(He=ot[dt]).z+=nt,He.m+=nt,nt+=He.s+(tt+=He.c)}(Re);var Fe=(le[0].z+le[le.length-1].z)/2;_e?(Re.z=_e.z+Te(Re._,_e._),Re.m=Re.z-Fe):Re.z=Fe}else _e&&(Re.z=_e.z+Te(Re._,_e._));Re.parent.A=function(Ve,He,nt){if(He){for(var tt,ot=Ve,dt=Ve,kt=He,mt=ot.parent.children[0],wt=ot.m,Lt=dt.m,Ct=kt.m,It=mt.m;kt=re(kt),ot=K(ot),kt&&ot;)mt=K(mt),(dt=re(dt)).a=Ve,(tt=kt.z+Ct-ot.z-wt+Te(kt._,ot._))>0&&(ee(ie(kt,Ve,nt),Ve,tt),wt+=tt,Lt+=tt),Ct+=kt.m,wt+=ot.m,It+=mt.m,Lt+=dt.m;kt&&!re(dt)&&(dt.t=kt,dt.m+=Ct-Lt),ot&&!K(mt)&&(mt.t=ot,mt.m+=wt-It,nt=Ve)}return nt}(Re,_e,Re.parent.A||ge[0])}function Ie(Re){Re._.x=Re.z+Re.parent.m,Re.m+=Re.parent.m}function Ce(Re){Re.x*=Q,Re.y=Re.depth*se}return ye.separation=function(Re){return arguments.length?(Te=Re,ye):Te},ye.size=function(Re){return arguments.length?(fe=!1,Q=+Re[0],se=+Re[1],ye):fe?null:[Q,se]},ye.nodeSize=function(Re){return arguments.length?(fe=!0,Q=+Re[0],se=+Re[1],ye):fe?[Q,se]:null},ye}function me(Te,Q,se,fe,ye){for(var Me,Ie=Te.children,Ce=-1,Re=Ie.length,le=Te.value&&(ye-se)/Te.value;++Ce<Re;)(Me=Ie[Ce]).x0=Q,Me.x1=fe,Me.y0=se,Me.y1=se+=Me.value*le}oe.prototype=Object.create(r.prototype);var de=(1+Math.sqrt(5))/2;function he(Te,Q,se,fe,ye,Me){for(var Ie,Ce,Re,le,ge,_e,Fe,Ve,He,nt,tt,ot=[],dt=Q.children,kt=0,mt=0,wt=dt.length,Lt=Q.value;kt<wt;){Re=ye-se,le=Me-fe;do{ge=dt[mt++].value}while(!ge&&mt<wt);for(_e=Fe=ge,tt=ge*ge*(nt=Math.max(le/Re,Re/le)/(Lt*Te)),He=Math.max(Fe/tt,tt/_e);mt<wt;++mt){if(ge+=Ce=dt[mt].value,Ce<_e&&(_e=Ce),Ce>Fe&&(Fe=Ce),tt=ge*ge*nt,(Ve=Math.max(Fe/tt,tt/_e))>He){ge-=Ce;break}He=Ve}ot.push(Ie={value:ge,dice:Re<le,children:dt.slice(kt,mt)}),Ie.dice?N(Ie,se,fe,ye,Lt?fe+=le*ge/Lt:Me):me(Ie,se,fe,Lt?se+=Re*ge/Lt:ye,Me),Lt-=ge,kt=mt}return ot}var ve=function Te(Q){function se(fe,ye,Me,Ie,Ce){he(Q,fe,ye,Me,Ie,Ce)}return se.ratio=function(fe){return Te((fe=+fe)>1?fe:1)},se}(de);function Pe(){var Te=ve,Q=!1,se=1,fe=1,ye=[0],Me=L,Ie=L,Ce=L,Re=L,le=L;function ge(Fe){return Fe.x0=Fe.y0=0,Fe.x1=se,Fe.y1=fe,Fe.eachBefore(_e),ye=[0],Q&&Fe.eachBefore(F),Fe}function _e(Fe){var Ve=ye[Fe.depth],He=Fe.x0+Ve,nt=Fe.y0+Ve,tt=Fe.x1-Ve,ot=Fe.y1-Ve;tt<He&&(He=tt=(He+tt)/2),ot<nt&&(nt=ot=(nt+ot)/2),Fe.x0=He,Fe.y0=nt,Fe.x1=tt,Fe.y1=ot,Fe.children&&(Ve=ye[Fe.depth+1]=Me(Fe)/2,He+=le(Fe)-Ve,nt+=Ie(Fe)-Ve,(tt-=Ce(Fe)-Ve)<He&&(He=tt=(He+tt)/2),(ot-=Re(Fe)-Ve)<nt&&(nt=ot=(nt+ot)/2),Te(Fe,He,nt,tt,ot))}return ge.round=function(Fe){return arguments.length?(Q=!!Fe,ge):Q},ge.size=function(Fe){return arguments.length?(se=+Fe[0],fe=+Fe[1],ge):[se,fe]},ge.tile=function(Fe){return arguments.length?(Te=E(Fe),ge):Te},ge.padding=function(Fe){return arguments.length?ge.paddingInner(Fe).paddingOuter(Fe):ge.paddingInner()},ge.paddingInner=function(Fe){return arguments.length?(Me="function"==typeof Fe?Fe:C(+Fe),ge):Me},ge.paddingOuter=function(Fe){return arguments.length?ge.paddingTop(Fe).paddingRight(Fe).paddingBottom(Fe).paddingLeft(Fe):ge.paddingTop()},ge.paddingTop=function(Fe){return arguments.length?(Ie="function"==typeof Fe?Fe:C(+Fe),ge):Ie},ge.paddingRight=function(Fe){return arguments.length?(Ce="function"==typeof Fe?Fe:C(+Fe),ge):Ce},ge.paddingBottom=function(Fe){return arguments.length?(Re="function"==typeof Fe?Fe:C(+Fe),ge):Re},ge.paddingLeft=function(Fe){return arguments.length?(le="function"==typeof Fe?Fe:C(+Fe),ge):le},ge}function xe(Te,Q,se,fe,ye){var Me,Ie,Ce=Te.children,Re=Ce.length,le=new Array(Re+1);for(le[0]=Ie=Me=0;Me<Re;++Me)le[Me+1]=Ie+=Ce[Me].value;!function ge(_e,Fe,Ve,He,nt,tt,ot){if(_e>=Fe-1){var dt=Ce[_e];return dt.x0=He,dt.y0=nt,dt.x1=tt,void(dt.y1=ot)}for(var kt=le[_e],mt=Ve/2+kt,wt=_e+1,Lt=Fe-1;wt<Lt;){var Ct=wt+Lt>>>1;le[Ct]<mt?wt=Ct+1:Lt=Ct}mt-le[wt-1]<le[wt]-mt&&_e+1<wt&&--wt;var It=le[wt]-kt,Ut=Ve-It;if(tt-He>ot-nt){var Rt=(He*Ut+tt*It)/Ve;ge(_e,wt,It,He,nt,Rt,ot),ge(wt,Fe,Ut,Rt,nt,tt,ot)}else{var Ge=(nt*Ut+ot*It)/Ve;ge(_e,wt,It,He,nt,tt,Ge),ge(wt,Fe,Ut,He,Ge,tt,ot)}}(0,Re,Te.value,Q,se,fe,ye)}function ke(Te,Q,se,fe,ye){(1&Te.depth?me:N)(Te,Q,se,fe,ye)}var Ae=function Te(Q){function se(fe,ye,Me,Ie,Ce){if((Re=fe._squarify)&&Re.ratio===Q)for(var Re,le,ge,_e,Fe,Ve=-1,He=Re.length,nt=fe.value;++Ve<He;){for(ge=(le=Re[Ve]).children,_e=le.value=0,Fe=ge.length;_e<Fe;++_e)le.value+=ge[_e].value;le.dice?N(le,ye,Me,Ie,Me+=(Ce-Me)*le.value/nt):me(le,ye,Me,ye+=(Ie-ye)*le.value/nt,Ce),nt-=le.value}else fe._squarify=Re=he(Q,fe,ye,Me,Ie,Ce),Re.ratio=Q}return se.ratio=function(fe){return Te((fe=+fe)>1?fe:1)},se}(de)},29502:function($,R,e){"use strict";function k(ee,ie,oe){ee.prototype=ie.prototype=oe,oe.constructor=ee}function A(ee,ie){var oe=Object.create(ee.prototype);for(var ce in ie)oe[ce]=ie[ce];return oe}function l(){}e.d(R,{sX:function(){return re},k4:function(){return J}});var T=.7,b=1/T,d="\\s*([+-]?\\d+)\\s*",s="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",t="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",o=/^#([0-9a-f]{3,8})$/,r=new RegExp("^rgb\\("+[d,d,d]+"\\)$"),n=new RegExp("^rgb\\("+[t,t,t]+"\\)$"),i=new RegExp("^rgba\\("+[d,d,d,s]+"\\)$"),a=new RegExp("^rgba\\("+[t,t,t,s]+"\\)$"),c=new RegExp("^hsl\\("+[s,t,t]+"\\)$"),p=new RegExp("^hsla\\("+[s,t,t,s]+"\\)$"),f={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 x(){return this.rgb().formatHex()}function v(){return this.rgb().formatRgb()}function g(ee){var ie,oe;return ee=(ee+"").trim().toLowerCase(),(ie=o.exec(ee))?(oe=ie[1].length,ie=parseInt(ie[1],16),6===oe?y(ie):3===oe?new u(ie>>8&15|ie>>4&240,ie>>4&15|240&ie,(15&ie)<<4|15&ie,1):8===oe?h(ie>>24&255,ie>>16&255,ie>>8&255,(255&ie)/255):4===oe?h(ie>>12&15|ie>>8&240,ie>>8&15|ie>>4&240,ie>>4&15|240&ie,((15&ie)<<4|15&ie)/255):null):(ie=r.exec(ee))?new u(ie[1],ie[2],ie[3],1):(ie=n.exec(ee))?new u(255*ie[1]/100,255*ie[2]/100,255*ie[3]/100,1):(ie=i.exec(ee))?h(ie[1],ie[2],ie[3],ie[4]):(ie=a.exec(ee))?h(255*ie[1]/100,255*ie[2]/100,255*ie[3]/100,ie[4]):(ie=c.exec(ee))?L(ie[1],ie[2]/100,ie[3]/100,1):(ie=p.exec(ee))?L(ie[1],ie[2]/100,ie[3]/100,ie[4]):f.hasOwnProperty(ee)?y(f[ee]):"transparent"===ee?new u(NaN,NaN,NaN,0):null}function y(ee){return new u(ee>>16&255,ee>>8&255,255&ee,1)}function h(ee,ie,oe,ce){return ce<=0&&(ee=ie=oe=NaN),new u(ee,ie,oe,ce)}function w(ee,ie,oe,ce){return 1===arguments.length?function m(ee){return ee instanceof l||(ee=g(ee)),ee?new u((ee=ee.rgb()).r,ee.g,ee.b,ee.opacity):new u}(ee):new u(ee,ie,oe,ce??1)}function u(ee,ie,oe,ce){this.r=+ee,this.g=+ie,this.b=+oe,this.opacity=+ce}function S(){return"#"+E(this.r)+E(this.g)+E(this.b)}function _(){var ee=this.opacity;return(1===(ee=isNaN(ee)?1:Math.max(0,Math.min(1,ee)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===ee?")":", "+ee+")")}function E(ee){return((ee=Math.max(0,Math.min(255,Math.round(ee)||0)))<16?"0":"")+ee.toString(16)}function L(ee,ie,oe,ce){return ce<=0?ee=ie=oe=NaN:oe<=0||oe>=1?ee=ie=NaN:ie<=0&&(ee=NaN),new P(ee,ie,oe,ce)}function C(ee){if(ee instanceof P)return new P(ee.h,ee.s,ee.l,ee.opacity);if(ee instanceof l||(ee=g(ee)),!ee)return new P;if(ee instanceof P)return ee;var ie=(ee=ee.rgb()).r/255,oe=ee.g/255,ce=ee.b/255,me=Math.min(ie,oe,ce),de=Math.max(ie,oe,ce),he=NaN,ve=de-me,Pe=(de+me)/2;return ve?(he=ie===de?(oe-ce)/ve+6*(oe<ce):oe===de?(ce-ie)/ve+2:(ie-oe)/ve+4,ve/=Pe<.5?de+me:2-de-me,he*=60):ve=Pe>0&&Pe<1?0:he,new P(he,ve,Pe,ee.opacity)}function P(ee,ie,oe,ce){this.h=+ee,this.s=+ie,this.l=+oe,this.opacity=+ce}function I(ee,ie,oe){return 255*(ee<60?ie+(oe-ie)*ee/60:ee<180?oe:ee<240?ie+(oe-ie)*(240-ee)/60:ie)}function U(ee,ie,oe,ce,me){var de=ee*ee,he=de*ee;return((1-3*ee+3*de-he)*ie+(4-6*de+3*he)*oe+(1+3*ee+3*de-3*he)*ce+he*me)/6}function z(ee){return function(){return ee}}function H(ee,ie){var ce,me,oe=ie-ee;return oe?(ce=ee,me=oe,function(de){return ce+de*me}):z(isNaN(ee)?ie:ee)}k(l,g,{copy:function(ee){return Object.assign(new this.constructor,this,ee)},displayable:function(){return this.rgb().displayable()},hex:x,formatHex:x,formatHsl:function(){return C(this).formatHsl()},formatRgb:v,toString:v}),k(u,w,A(l,{brighter:function(ee){return ee=null==ee?b:Math.pow(b,ee),new u(this.r*ee,this.g*ee,this.b*ee,this.opacity)},darker:function(ee){return ee=null==ee?T:Math.pow(T,ee),new u(this.r*ee,this.g*ee,this.b*ee,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:S,formatHex:S,formatRgb:_,toString:_})),k(P,function(ee,ie,oe,ce){return 1===arguments.length?C(ee):new P(ee,ie,oe,ce??1)},A(l,{brighter:function(ee){return ee=null==ee?b:Math.pow(b,ee),new P(this.h,this.s,this.l*ee,this.opacity)},darker:function(ee){return ee=null==ee?T:Math.pow(T,ee),new P(this.h,this.s,this.l*ee,this.opacity)},rgb:function(){var ee=this.h%360+360*(this.h<0),ie=isNaN(ee)||isNaN(this.s)?0:this.s,oe=this.l,ce=oe+(oe<.5?oe:1-oe)*ie,me=2*oe-ce;return new u(I(ee>=240?ee-240:ee+120,me,ce),I(ee,me,ce),I(ee<120?ee+240:ee-120,me,ce),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var ee=this.opacity;return(1===(ee=isNaN(ee)?1:Math.max(0,Math.min(1,ee)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===ee?")":", "+ee+")")}}));var F=function ee(ie){var me,oe=1==(me=+(me=ie))?H:function(de,he){return he-de?(ve=de,Pe=he,xe=me,ve=Math.pow(ve,xe),Pe=Math.pow(Pe,xe)-ve,xe=1/xe,function(ke){return Math.pow(ve+ke*Pe,xe)}):z(isNaN(de)?he:de);var ve,Pe,xe};function ce(me,de){var he=oe((me=w(me)).r,(de=w(de)).r),ve=oe(me.g,de.g),Pe=oe(me.b,de.b),xe=H(me.opacity,de.opacity);return function(ke){return me.r=he(ke),me.g=ve(ke),me.b=Pe(ke),me.opacity=xe(ke),me+""}}return ce.gamma=ee,ce}(1);function N(ee){return function(ie){var oe,ce,me=ie.length,de=new Array(me),he=new Array(me),ve=new Array(me);for(oe=0;oe<me;++oe)ce=w(ie[oe]),de[oe]=ce.r||0,he[oe]=ce.g||0,ve[oe]=ce.b||0;return de=ee(de),he=ee(he),ve=ee(ve),ce.opacity=1,function(Pe){return ce.r=de(Pe),ce.g=he(Pe),ce.b=ve(Pe),ce+""}}}function B(ee,ie){var oe,ce=ie?ie.length:0,me=ee?Math.min(ce,ee.length):0,de=new Array(me),he=new Array(ce);for(oe=0;oe<me;++oe)de[oe]=re(ee[oe],ie[oe]);for(;oe<ce;++oe)he[oe]=ie[oe];return function(ve){for(oe=0;oe<me;++oe)he[oe]=de[oe](ve);return he}}function j(ee,ie){var oe=new Date;return ee=+ee,ie=+ie,function(ce){return oe.setTime(ee*(1-ce)+ie*ce),oe}}function J(ee,ie){return ee=+ee,ie=+ie,function(oe){return ee*(1-oe)+ie*oe}}function G(ee,ie){var oe,ce={},me={};for(oe in null!==ee&&"object"==typeof ee||(ee={}),null!==ie&&"object"==typeof ie||(ie={}),ie)oe in ee?ce[oe]=re(ee[oe],ie[oe]):me[oe]=ie[oe];return function(de){for(oe in ce)me[oe]=ce[oe](de);return me}}N(function(ee){var ie=ee.length-1;return function(oe){var ce=oe<=0?oe=0:oe>=1?(oe=1,ie-1):Math.floor(oe*ie),me=ee[ce],de=ee[ce+1];return U((oe-ce/ie)*ie,ce>0?ee[ce-1]:2*me-de,me,de,ce<ie-1?ee[ce+2]:2*de-me)}}),N(function(ee){var ie=ee.length;return function(oe){var ce=Math.floor(((oe%=1)<0?++oe:oe)*ie);return U((oe-ce/ie)*ie,ee[(ce+ie-1)%ie],ee[ce%ie],ee[(ce+1)%ie],ee[(ce+2)%ie])}});var V=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,W=new RegExp(V.source,"g");function X(ee,ie){var oe,ce,me,xe,de=V.lastIndex=W.lastIndex=0,he=-1,ve=[],Pe=[];for(ee+="",ie+="";(oe=V.exec(ee))&&(ce=W.exec(ie));)(me=ce.index)>de&&(me=ie.slice(de,me),ve[he]?ve[he]+=me:ve[++he]=me),(oe=oe[0])===(ce=ce[0])?ve[he]?ve[he]+=ce:ve[++he]=ce:(ve[++he]=null,Pe.push({i:he,x:J(oe,ce)})),de=W.lastIndex;return de<ie.length&&(me=ie.slice(de),ve[he]?ve[he]+=me:ve[++he]=me),ve.length<2?Pe[0]?(xe=Pe[0].x,function(ke){return xe(ke)+""}):function(xe){return function(){return xe}}(ie):(ie=Pe.length,function(xe){for(var ke,Ae=0;Ae<ie;++Ae)ve[(ke=Pe[Ae]).i]=ke.x(xe);return ve.join("")})}function K(ee,ie){ie||(ie=[]);var oe,ce=ee?Math.min(ie.length,ee.length):0,me=ie.slice();return function(de){for(oe=0;oe<ce;++oe)me[oe]=ee[oe]*(1-de)+ie[oe]*de;return me}}function re(ee,ie){var oe,ce,me=typeof ie;return null==ie||"boolean"===me?z(ie):("number"===me?J:"string"===me?(oe=g(ie))?(ie=oe,F):X:ie instanceof g?F:ie instanceof Date?j:(ce=ie,!ArrayBuffer.isView(ce)||ce instanceof DataView?Array.isArray(ie)?B:"function"!=typeof ie.valueOf&&"function"!=typeof ie.toString||isNaN(ie)?G:J:K))(ee,ie)}},45879:function($,R,e){"use strict";e.d(R,{h5:function(){return p}});var k=Math.PI,A=2*k,l=1e-6,T=A-l;function b(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function d(){return new b}b.prototype=d.prototype={constructor:b,moveTo:function(f,x){this._+="M"+(this._x0=this._x1=+f)+","+(this._y0=this._y1=+x)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(f,x){this._+="L"+(this._x1=+f)+","+(this._y1=+x)},quadraticCurveTo:function(f,x,v,g){this._+="Q"+ +f+","+ +x+","+(this._x1=+v)+","+(this._y1=+g)},bezierCurveTo:function(f,x,v,g,y,h){this._+="C"+ +f+","+ +x+","+ +v+","+ +g+","+(this._x1=+y)+","+(this._y1=+h)},arcTo:function(f,x,v,g,y){var h=this._x1,m=this._y1,w=(v=+v)-(f=+f),u=(g=+g)-(x=+x),S=h-f,_=m-x,E=S*S+_*_;if((y=+y)<0)throw new Error("negative radius: "+y);if(null===this._x1)this._+="M"+(this._x1=f)+","+(this._y1=x);else if(E>l)if(Math.abs(_*w-u*S)>l&&y){var L=v-h,C=g-m,P=w*w+u*u,I=L*L+C*C,U=Math.sqrt(P),z=Math.sqrt(E),H=y*Math.tan((k-Math.acos((P+E-I)/(2*U*z)))/2),F=H/z,N=H/U;Math.abs(F-1)>l&&(this._+="L"+(f+F*S)+","+(x+F*_)),this._+="A"+y+","+y+",0,0,"+ +(_*L>S*C)+","+(this._x1=f+N*w)+","+(this._y1=x+N*u)}else this._+="L"+(this._x1=f)+","+(this._y1=x)},arc:function(f,x,v,g,y,h){f=+f,x=+x,h=!!h;var m=(v=+v)*Math.cos(g),w=v*Math.sin(g),u=f+m,S=x+w,_=1^h,E=h?g-y:y-g;if(v<0)throw new Error("negative radius: "+v);null===this._x1?this._+="M"+u+","+S:(Math.abs(this._x1-u)>l||Math.abs(this._y1-S)>l)&&(this._+="L"+u+","+S),v&&(E<0&&(E=E%A+A),E>T?this._+="A"+v+","+v+",0,1,"+_+","+(f-m)+","+(x-w)+"A"+v+","+v+",0,1,"+_+","+(this._x1=u)+","+(this._y1=S):E>l&&(this._+="A"+v+","+v+",0,"+ +(E>=k)+","+_+","+(this._x1=f+v*Math.cos(y))+","+(this._y1=x+v*Math.sin(y))))},rect:function(f,x,v,g){this._+="M"+(this._x0=this._x1=+f)+","+(this._y0=this._y1=+x)+"h"+ +v+"v"+ +g+"h"+-v+"Z"},toString:function(){return this._}};var s=d,t=Array.prototype.slice;function o(f){return function(){return f}}function r(f){return f[0]}function n(f){return f[1]}function i(f){return f.source}function a(f){return f.target}function c(f,x,v,g,y){f.moveTo(x,v),f.bezierCurveTo(x=(x+g)/2,v,x,y,g,y)}function p(){return function(f){var x=i,v=a,g=r,y=n,h=null;function m(){var w,u=t.call(arguments),S=x.apply(this,u),_=v.apply(this,u);if(h||(h=w=s()),f(h,+g.apply(this,(u[0]=S,u)),+y.apply(this,u),+g.apply(this,(u[0]=_,u)),+y.apply(this,u)),w)return h=null,w+""||null}return m.source=function(w){return arguments.length?(x=w,m):x},m.target=function(w){return arguments.length?(v=w,m):v},m.x=function(w){return arguments.length?(g="function"==typeof w?w:o(+w),m):g},m.y=function(w){return arguments.length?(y="function"==typeof w?w:o(+w),m):y},m.context=function(w){return arguments.length?(h=w??null,m):h},m}(c)}},84096:function($,R,e){"use strict";e.d(R,{i$:function(){return i},Dq:function(){return r},g0:function(){return a}});var k=e(58176),A=e(48480),l=e(59879),T=e(82301),b=e(34823),d=e(79791);function s(wt){if(0<=wt.y&&wt.y<100){var Lt=new Date(-1,wt.m,wt.d,wt.H,wt.M,wt.S,wt.L);return Lt.setFullYear(wt.y),Lt}return new Date(wt.y,wt.m,wt.d,wt.H,wt.M,wt.S,wt.L)}function t(wt){if(0<=wt.y&&wt.y<100){var Lt=new Date(Date.UTC(-1,wt.m,wt.d,wt.H,wt.M,wt.S,wt.L));return Lt.setUTCFullYear(wt.y),Lt}return new Date(Date.UTC(wt.y,wt.m,wt.d,wt.H,wt.M,wt.S,wt.L))}function o(wt,Lt,Ct){return{y:wt,m:Lt,d:Ct,H:0,M:0,S:0,L:0}}function r(wt){var Lt=wt.dateTime,Ct=wt.date,It=wt.time,Ut=wt.periods,Rt=wt.days,Ge=wt.shortDays,We=wt.months,Be=wt.shortMonths,Ye=y(Ut),rt=h(Ut),Se=y(Rt),ze=h(Rt),Ke=y(Ge),st=h(Ge),ct=y(We),Tt=h(We),Et=y(Be),At=h(Be),ht={a:function(jt){return Ge[jt.getDay()]},A:function(jt){return Rt[jt.getDay()]},b:function(jt){return Be[jt.getMonth()]},B:function(jt){return We[jt.getMonth()]},c:null,d:W,e:W,f:ie,H:X,I:K,j:re,L:ee,m:oe,M:ce,p:function(jt){return Ut[+(jt.getHours()>=12)]},q:function(jt){return 1+~~(jt.getMonth()/3)},Q:kt,s:mt,S:me,u:de,U:he,V:ve,w:Pe,W:xe,x:null,X:null,y:ke,Y:Ae,Z:Te,"%":dt},pt={a:function(jt){return Ge[jt.getUTCDay()]},A:function(jt){return Rt[jt.getUTCDay()]},b:function(jt){return Be[jt.getUTCMonth()]},B:function(jt){return We[jt.getUTCMonth()]},c:null,d:Q,e:Q,f:Ie,H:se,I:fe,j:ye,L:Me,m:Ce,M:Re,p:function(jt){return Ut[+(jt.getUTCHours()>=12)]},q:function(jt){return 1+~~(jt.getUTCMonth()/3)},Q:kt,s:mt,S:le,u:ge,U:_e,V:Fe,w:Ve,W:He,x:null,X:null,y:nt,Y:tt,Z:ot,"%":dt},gt={a:function(jt,Nt,Gt){var un=Ke.exec(Nt.slice(Gt));return un?(jt.w=st[un[0].toLowerCase()],Gt+un[0].length):-1},A:function(jt,Nt,Gt){var un=Se.exec(Nt.slice(Gt));return un?(jt.w=ze[un[0].toLowerCase()],Gt+un[0].length):-1},b:function(jt,Nt,Gt){var un=Et.exec(Nt.slice(Gt));return un?(jt.m=At[un[0].toLowerCase()],Gt+un[0].length):-1},B:function(jt,Nt,Gt){var un=ct.exec(Nt.slice(Gt));return un?(jt.m=Tt[un[0].toLowerCase()],Gt+un[0].length):-1},c:function(jt,Nt,Gt){return Ht(jt,Lt,Nt,Gt)},d:U,e:U,f:j,H,I:H,j:z,L:B,m:I,M:F,p:function(jt,Nt,Gt){var un=Ye.exec(Nt.slice(Gt));return un?(jt.p=rt[un[0].toLowerCase()],Gt+un[0].length):-1},q:P,Q:G,s:V,S:N,u:w,U:u,V:S,w:m,W:_,x:function(jt,Nt,Gt){return Ht(jt,Ct,Nt,Gt)},X:function(jt,Nt,Gt){return Ht(jt,It,Nt,Gt)},y:L,Y:E,Z:C,"%":J};function Pt(jt,Nt){return function(Gt){var un,pn,Kt,wn=[],Bn=-1,vn=0,cn=jt.length;for(Gt instanceof Date||(Gt=new Date(+Gt));++Bn<cn;)37===jt.charCodeAt(Bn)&&(wn.push(jt.slice(vn,Bn)),null!=(pn=c[un=jt.charAt(++Bn)])?un=jt.charAt(++Bn):pn="e"===un?" ":"0",(Kt=Nt[un])&&(un=Kt(Gt,pn)),wn.push(un),vn=Bn+1);return wn.push(jt.slice(vn,Bn)),wn.join("")}}function Ot(jt,Nt){return function(Gt){var un,pn,Kt=o(1900,void 0,1);if(Ht(Kt,jt,Gt+="",0)!=Gt.length)return null;if("Q"in Kt)return new Date(Kt.Q);if("s"in Kt)return new Date(1e3*Kt.s+("L"in Kt?Kt.L:0));if(Nt&&!("Z"in Kt)&&(Kt.Z=0),"p"in Kt&&(Kt.H=Kt.H%12+12*Kt.p),void 0===Kt.m&&(Kt.m="q"in Kt?Kt.q:0),"V"in Kt){if(Kt.V<1||Kt.V>53)return null;"w"in Kt||(Kt.w=1),"Z"in Kt?(pn=(un=t(o(Kt.y,0,1))).getUTCDay(),un=pn>4||0===pn?k.l6.ceil(un):(0,k.l6)(un),un=A.Z.offset(un,7*(Kt.V-1)),Kt.y=un.getUTCFullYear(),Kt.m=un.getUTCMonth(),Kt.d=un.getUTCDate()+(Kt.w+6)%7):(pn=(un=s(o(Kt.y,0,1))).getDay(),un=pn>4||0===pn?l.wA.ceil(un):(0,l.wA)(un),un=T.Z.offset(un,7*(Kt.V-1)),Kt.y=un.getFullYear(),Kt.m=un.getMonth(),Kt.d=un.getDate()+(Kt.w+6)%7)}else("W"in Kt||"U"in Kt)&&("w"in Kt||(Kt.w="u"in Kt?Kt.u%7:"W"in Kt?1:0),pn="Z"in Kt?t(o(Kt.y,0,1)).getUTCDay():s(o(Kt.y,0,1)).getDay(),Kt.m=0,Kt.d="W"in Kt?(Kt.w+6)%7+7*Kt.W-(pn+5)%7:Kt.w+7*Kt.U-(pn+6)%7);return"Z"in Kt?(Kt.H+=Kt.Z/100|0,Kt.M+=Kt.Z%100,t(Kt)):s(Kt)}}function Ht(jt,Nt,Gt,un){for(var pn,Kt,wn=0,Bn=Nt.length,vn=Gt.length;wn<Bn;){if(un>=vn)return-1;if(37===(pn=Nt.charCodeAt(wn++))){if(pn=Nt.charAt(wn++),!(Kt=gt[pn in c?Nt.charAt(wn++):pn])||(un=Kt(jt,Gt,un))<0)return-1}else if(pn!=Gt.charCodeAt(un++))return-1}return un}return ht.x=Pt(Ct,ht),ht.X=Pt(It,ht),ht.c=Pt(Lt,ht),pt.x=Pt(Ct,pt),pt.X=Pt(It,pt),pt.c=Pt(Lt,pt),{format:function(jt){var Nt=Pt(jt+="",ht);return Nt.toString=function(){return jt},Nt},parse:function(jt){var Nt=Ot(jt+="",!1);return Nt.toString=function(){return jt},Nt},utcFormat:function(jt){var Nt=Pt(jt+="",pt);return Nt.toString=function(){return jt},Nt},utcParse:function(jt){var Nt=Ot(jt+="",!0);return Nt.toString=function(){return jt},Nt}}}var n,i,a,c={"-":"",_:" ",0:"0"},p=/^\s*\d+/,f=/^%/,x=/[\\^$*+?|[\]().{}]/g;function v(wt,Lt,Ct){var It=wt<0?"-":"",Ut=(It?-wt:wt)+"",Rt=Ut.length;return It+(Rt<Ct?new Array(Ct-Rt+1).join(Lt)+Ut:Ut)}function g(wt){return wt.replace(x,"\\$&")}function y(wt){return new RegExp("^(?:"+wt.map(g).join("|")+")","i")}function h(wt){for(var Lt={},Ct=-1,It=wt.length;++Ct<It;)Lt[wt[Ct].toLowerCase()]=Ct;return Lt}function m(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+1));return It?(wt.w=+It[0],Ct+It[0].length):-1}function w(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+1));return It?(wt.u=+It[0],Ct+It[0].length):-1}function u(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+2));return It?(wt.U=+It[0],Ct+It[0].length):-1}function S(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+2));return It?(wt.V=+It[0],Ct+It[0].length):-1}function _(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+2));return It?(wt.W=+It[0],Ct+It[0].length):-1}function E(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+4));return It?(wt.y=+It[0],Ct+It[0].length):-1}function L(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+2));return It?(wt.y=+It[0]+(+It[0]>68?1900:2e3),Ct+It[0].length):-1}function C(wt,Lt,Ct){var It=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(Lt.slice(Ct,Ct+6));return It?(wt.Z=It[1]?0:-(It[2]+(It[3]||"00")),Ct+It[0].length):-1}function P(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+1));return It?(wt.q=3*It[0]-3,Ct+It[0].length):-1}function I(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+2));return It?(wt.m=It[0]-1,Ct+It[0].length):-1}function U(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+2));return It?(wt.d=+It[0],Ct+It[0].length):-1}function z(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+3));return It?(wt.m=0,wt.d=+It[0],Ct+It[0].length):-1}function H(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+2));return It?(wt.H=+It[0],Ct+It[0].length):-1}function F(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+2));return It?(wt.M=+It[0],Ct+It[0].length):-1}function N(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+2));return It?(wt.S=+It[0],Ct+It[0].length):-1}function B(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+3));return It?(wt.L=+It[0],Ct+It[0].length):-1}function j(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct,Ct+6));return It?(wt.L=Math.floor(It[0]/1e3),Ct+It[0].length):-1}function J(wt,Lt,Ct){var It=f.exec(Lt.slice(Ct,Ct+1));return It?Ct+It[0].length:-1}function G(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct));return It?(wt.Q=+It[0],Ct+It[0].length):-1}function V(wt,Lt,Ct){var It=p.exec(Lt.slice(Ct));return It?(wt.s=+It[0],Ct+It[0].length):-1}function W(wt,Lt){return v(wt.getDate(),Lt,2)}function X(wt,Lt){return v(wt.getHours(),Lt,2)}function K(wt,Lt){return v(wt.getHours()%12||12,Lt,2)}function re(wt,Lt){return v(1+T.Z.count((0,b.Z)(wt),wt),Lt,3)}function ee(wt,Lt){return v(wt.getMilliseconds(),Lt,3)}function ie(wt,Lt){return ee(wt,Lt)+"000"}function oe(wt,Lt){return v(wt.getMonth()+1,Lt,2)}function ce(wt,Lt){return v(wt.getMinutes(),Lt,2)}function me(wt,Lt){return v(wt.getSeconds(),Lt,2)}function de(wt){var Lt=wt.getDay();return 0===Lt?7:Lt}function he(wt,Lt){return v(l.OM.count((0,b.Z)(wt)-1,wt),Lt,2)}function ve(wt,Lt){var Ct=wt.getDay();return wt=Ct>=4||0===Ct?(0,l.bL)(wt):l.bL.ceil(wt),v(l.bL.count((0,b.Z)(wt),wt)+(4===(0,b.Z)(wt).getDay()),Lt,2)}function Pe(wt){return wt.getDay()}function xe(wt,Lt){return v(l.wA.count((0,b.Z)(wt)-1,wt),Lt,2)}function ke(wt,Lt){return v(wt.getFullYear()%100,Lt,2)}function Ae(wt,Lt){return v(wt.getFullYear()%1e4,Lt,4)}function Te(wt){var Lt=wt.getTimezoneOffset();return(Lt>0?"-":(Lt*=-1,"+"))+v(Lt/60|0,"0",2)+v(Lt%60,"0",2)}function Q(wt,Lt){return v(wt.getUTCDate(),Lt,2)}function se(wt,Lt){return v(wt.getUTCHours(),Lt,2)}function fe(wt,Lt){return v(wt.getUTCHours()%12||12,Lt,2)}function ye(wt,Lt){return v(1+A.Z.count((0,d.Z)(wt),wt),Lt,3)}function Me(wt,Lt){return v(wt.getUTCMilliseconds(),Lt,3)}function Ie(wt,Lt){return Me(wt,Lt)+"000"}function Ce(wt,Lt){return v(wt.getUTCMonth()+1,Lt,2)}function Re(wt,Lt){return v(wt.getUTCMinutes(),Lt,2)}function le(wt,Lt){return v(wt.getUTCSeconds(),Lt,2)}function ge(wt){var Lt=wt.getUTCDay();return 0===Lt?7:Lt}function _e(wt,Lt){return v(k.Ox.count((0,d.Z)(wt)-1,wt),Lt,2)}function Fe(wt,Lt){var Ct=wt.getUTCDay();return wt=Ct>=4||0===Ct?(0,k.hB)(wt):k.hB.ceil(wt),v(k.hB.count((0,d.Z)(wt),wt)+(4===(0,d.Z)(wt).getUTCDay()),Lt,2)}function Ve(wt){return wt.getUTCDay()}function He(wt,Lt){return v(k.l6.count((0,d.Z)(wt)-1,wt),Lt,2)}function nt(wt,Lt){return v(wt.getUTCFullYear()%100,Lt,2)}function tt(wt,Lt){return v(wt.getUTCFullYear()%1e4,Lt,4)}function ot(){return"+0000"}function dt(){return"%"}function kt(wt){return+wt}function mt(wt){return Math.floor(+wt/1e3)}n=r({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"]}),i=n.format,a=n.utcFormat},82301:function($,R,e){"use strict";e.d(R,{a:function(){return T}});var k=e(30052),A=e(54263),l=(0,k.Z)(function(b){b.setHours(0,0,0,0)},function(b,d){b.setDate(b.getDate()+d)},function(b,d){return(d-b-(d.getTimezoneOffset()-b.getTimezoneOffset())*A.yB)/A.UD},function(b){return b.getDate()-1});R.Z=l;var T=l.range},54263:function($,R,e){"use strict";e.d(R,{UD:function(){return T},Y2:function(){return l},Ym:function(){return k},iM:function(){return b},yB:function(){return A}});var k=1e3,A=6e4,l=36e5,T=864e5,b=6048e5},81041:function($,R,e){"use strict";e.r(R),e.d(R,{timeDay:function(){return p.Z},timeDays:function(){return p.a},timeFriday:function(){return f.mC},timeFridays:function(){return f.b$},timeHour:function(){return a},timeHours:function(){return c},timeInterval:function(){return k.Z},timeMillisecond:function(){return l},timeMilliseconds:function(){return T},timeMinute:function(){return r},timeMinutes:function(){return n},timeMonday:function(){return f.wA},timeMondays:function(){return f.bJ},timeMonth:function(){return v},timeMonths:function(){return g},timeSaturday:function(){return f.EY},timeSaturdays:function(){return f.Ff},timeSecond:function(){return s},timeSeconds:function(){return t},timeSunday:function(){return f.OM},timeSundays:function(){return f.vm},timeThursday:function(){return f.bL},timeThursdays:function(){return f.$t},timeTuesday:function(){return f.sy},timeTuesdays:function(){return f.aU},timeWednesday:function(){return f.zg},timeWednesdays:function(){return f.Ld},timeWeek:function(){return f.OM},timeWeeks:function(){return f.vm},timeYear:function(){return y.Z},timeYears:function(){return y.g},utcDay:function(){return E.Z},utcDays:function(){return E.y},utcFriday:function(){return L.QQ},utcFridays:function(){return L.fz},utcHour:function(){return S},utcHours:function(){return _},utcMillisecond:function(){return l},utcMilliseconds:function(){return T},utcMinute:function(){return m},utcMinutes:function(){return w},utcMonday:function(){return L.l6},utcMondays:function(){return L.$3},utcMonth:function(){return P},utcMonths:function(){return I},utcSaturday:function(){return L.g4},utcSaturdays:function(){return L.Q_},utcSecond:function(){return s},utcSeconds:function(){return t},utcSunday:function(){return L.Ox},utcSundays:function(){return L.SU},utcThursday:function(){return L.hB},utcThursdays:function(){return L.xj},utcTuesday:function(){return L.J1},utcTuesdays:function(){return L.DK},utcWednesday:function(){return L.b3},utcWednesdays:function(){return L.uy},utcWeek:function(){return L.Ox},utcWeeks:function(){return L.SU},utcYear:function(){return U.Z},utcYears:function(){return U.D}});var k=e(30052),A=(0,k.Z)(function(){},function(z,H){z.setTime(+z+H)},function(z,H){return H-z});A.every=function(z){return z=Math.floor(z),isFinite(z)&&z>0?z>1?(0,k.Z)(function(H){H.setTime(Math.floor(H/z)*z)},function(H,F){H.setTime(+H+F*z)},function(H,F){return(F-H)/z}):A:null};var l=A,T=A.range,b=e(54263),d=(0,k.Z)(function(z){z.setTime(z-z.getMilliseconds())},function(z,H){z.setTime(+z+H*b.Ym)},function(z,H){return(H-z)/b.Ym},function(z){return z.getUTCSeconds()}),s=d,t=d.range,o=(0,k.Z)(function(z){z.setTime(z-z.getMilliseconds()-z.getSeconds()*b.Ym)},function(z,H){z.setTime(+z+H*b.yB)},function(z,H){return(H-z)/b.yB},function(z){return z.getMinutes()}),r=o,n=o.range,i=(0,k.Z)(function(z){z.setTime(z-z.getMilliseconds()-z.getSeconds()*b.Ym-z.getMinutes()*b.yB)},function(z,H){z.setTime(+z+H*b.Y2)},function(z,H){return(H-z)/b.Y2},function(z){return z.getHours()}),a=i,c=i.range,p=e(82301),f=e(59879),x=(0,k.Z)(function(z){z.setDate(1),z.setHours(0,0,0,0)},function(z,H){z.setMonth(z.getMonth()+H)},function(z,H){return H.getMonth()-z.getMonth()+12*(H.getFullYear()-z.getFullYear())},function(z){return z.getMonth()}),v=x,g=x.range,y=e(34823),h=(0,k.Z)(function(z){z.setUTCSeconds(0,0)},function(z,H){z.setTime(+z+H*b.yB)},function(z,H){return(H-z)/b.yB},function(z){return z.getUTCMinutes()}),m=h,w=h.range,u=(0,k.Z)(function(z){z.setUTCMinutes(0,0,0)},function(z,H){z.setTime(+z+H*b.Y2)},function(z,H){return(H-z)/b.Y2},function(z){return z.getUTCHours()}),S=u,_=u.range,E=e(48480),L=e(58176),C=(0,k.Z)(function(z){z.setUTCDate(1),z.setUTCHours(0,0,0,0)},function(z,H){z.setUTCMonth(z.getUTCMonth()+H)},function(z,H){return H.getUTCMonth()-z.getUTCMonth()+12*(H.getUTCFullYear()-z.getUTCFullYear())},function(z){return z.getUTCMonth()}),P=C,I=C.range,U=e(79791)},30052:function($,R,e){"use strict";e.d(R,{Z:function(){return l}});var k=new Date,A=new Date;function l(T,b,d,s){function t(o){return T(o=0===arguments.length?new Date:new Date(+o)),o}return t.floor=function(o){return T(o=new Date(+o)),o},t.ceil=function(o){return T(o=new Date(o-1)),b(o,1),T(o),o},t.round=function(o){var r=t(o),n=t.ceil(o);return o-r<n-o?r:n},t.offset=function(o,r){return b(o=new Date(+o),null==r?1:Math.floor(r)),o},t.range=function(o,r,n){var i,a=[];if(o=t.ceil(o),n=null==n?1:Math.floor(n),!(o<r&&n>0))return a;do{a.push(i=new Date(+o)),b(o,n),T(o)}while(i<o&&o<r);return a},t.filter=function(o){return l(function(r){if(r>=r)for(;T(r),!o(r);)r.setTime(r-1)},function(r,n){if(r>=r)if(n<0)for(;++n<=0;)for(;b(r,-1),!o(r););else for(;--n>=0;)for(;b(r,1),!o(r););})},d&&(t.count=function(o,r){return k.setTime(+o),A.setTime(+r),T(k),T(A),Math.floor(d(k,A))},t.every=function(o){return o=Math.floor(o),isFinite(o)&&o>0?o>1?t.filter(s?function(r){return s(r)%o==0}:function(r){return t.count(0,r)%o==0}):t:null}),t}},48480:function($,R,e){"use strict";e.d(R,{y:function(){return T}});var k=e(30052),A=e(54263),l=(0,k.Z)(function(b){b.setUTCHours(0,0,0,0)},function(b,d){b.setUTCDate(b.getUTCDate()+d)},function(b,d){return(d-b)/A.UD},function(b){return b.getUTCDate()-1});R.Z=l;var T=l.range},58176:function($,R,e){"use strict";e.d(R,{$3:function(){return i},DK:function(){return a},J1:function(){return d},Ox:function(){return T},QQ:function(){return o},Q_:function(){return x},SU:function(){return n},b3:function(){return s},fz:function(){return f},g4:function(){return r},hB:function(){return t},l6:function(){return b},uy:function(){return c},xj:function(){return p}});var k=e(30052),A=e(54263);function l(v){return(0,k.Z)(function(g){g.setUTCDate(g.getUTCDate()-(g.getUTCDay()+7-v)%7),g.setUTCHours(0,0,0,0)},function(g,y){g.setUTCDate(g.getUTCDate()+7*y)},function(g,y){return(y-g)/A.iM})}var T=l(0),b=l(1),d=l(2),s=l(3),t=l(4),o=l(5),r=l(6),n=T.range,i=b.range,a=d.range,c=s.range,p=t.range,f=o.range,x=r.range},79791:function($,R,e){"use strict";e.d(R,{D:function(){return l}});var k=e(30052),A=(0,k.Z)(function(T){T.setUTCMonth(0,1),T.setUTCHours(0,0,0,0)},function(T,b){T.setUTCFullYear(T.getUTCFullYear()+b)},function(T,b){return b.getUTCFullYear()-T.getUTCFullYear()},function(T){return T.getUTCFullYear()});A.every=function(T){return isFinite(T=Math.floor(T))&&T>0?(0,k.Z)(function(b){b.setUTCFullYear(Math.floor(b.getUTCFullYear()/T)*T),b.setUTCMonth(0,1),b.setUTCHours(0,0,0,0)},function(b,d){b.setUTCFullYear(b.getUTCFullYear()+d*T)}):null},R.Z=A;var l=A.range},59879:function($,R,e){"use strict";e.d(R,{$t:function(){return p},EY:function(){return r},Ff:function(){return x},Ld:function(){return c},OM:function(){return T},aU:function(){return a},b$:function(){return f},bJ:function(){return i},bL:function(){return t},mC:function(){return o},sy:function(){return d},vm:function(){return n},wA:function(){return b},zg:function(){return s}});var k=e(30052),A=e(54263);function l(v){return(0,k.Z)(function(g){g.setDate(g.getDate()-(g.getDay()+7-v)%7),g.setHours(0,0,0,0)},function(g,y){g.setDate(g.getDate()+7*y)},function(g,y){return(y-g-(y.getTimezoneOffset()-g.getTimezoneOffset())*A.yB)/A.iM})}var T=l(0),b=l(1),d=l(2),s=l(3),t=l(4),o=l(5),r=l(6),n=T.range,i=b.range,a=d.range,c=s.range,p=t.range,f=o.range,x=r.range},34823:function($,R,e){"use strict";e.d(R,{g:function(){return l}});var k=e(30052),A=(0,k.Z)(function(T){T.setMonth(0,1),T.setHours(0,0,0,0)},function(T,b){T.setFullYear(T.getFullYear()+b)},function(T,b){return b.getFullYear()-T.getFullYear()},function(T){return T.getFullYear()});A.every=function(T){return isFinite(T=Math.floor(T))&&T>0?(0,k.Z)(function(b){b.setFullYear(Math.floor(b.getFullYear()/T)*T),b.setMonth(0,1),b.setHours(0,0,0,0)},function(b,d){b.setFullYear(b.getFullYear()+d*T)}):null},R.Z=A;var l=A.range},17045:function($,R,e){"use strict";var k=e(8709),A="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),l=Object.prototype.toString,T=Array.prototype.concat,b=Object.defineProperty,d=b&&function(){var o={};try{for(var r in b(o,"x",{enumerable:!1,value:o}),o)return!1;return o.x===o}catch{return!1}}(),s=function(o,r,n,i){var a;(!(r in o)||"function"==typeof(a=i)&&"[object Function]"===l.call(a)&&i())&&(d?b(o,r,{configurable:!0,enumerable:!1,value:n,writable:!0}):o[r]=n)},t=function(o,r){var n=arguments.length>2?arguments[2]:{},i=k(r);A&&(i=T.call(i,Object.getOwnPropertySymbols(r)));for(var a=0;a<i.length;a+=1)s(o,i[a],r[i[a]],n[i[a]])};t.supportsDescriptors=!!d,$.exports=t},46775:function($){$.exports=function(){for(var R=0;R<arguments.length;R++)if(void 0!==arguments[R])return arguments[R]}},53545:function($){"use strict";$.exports=k;var R=(k.canvas=document.createElement("canvas")).getContext("2d"),e=A([32,126]);function k(l,T){Array.isArray(l)&&(l=l.join(", "));var b,d={},s=16,t=.05;T&&(2===T.length&&"number"==typeof T[0]?b=A(T):Array.isArray(T)?b=T:(T.o?b=A(T.o):T.pairs&&(b=T.pairs),T.fontSize&&(s=T.fontSize),null!=T.threshold&&(t=T.threshold))),b||(b=e),R.font=s+"px "+l;for(var o=0;o<b.length;o++){var r=b[o],n=R.measureText(r[0]).width+R.measureText(r[1]).width,i=R.measureText(r).width;Math.abs(n-i)>s*t&&(d[r]=(i-n)/s*1e3)}return d}function A(l){for(var T=[],b=l[0];b<=l[1];b++)for(var d=String.fromCharCode(b),s=l[0];s<l[1];s++){var t=d+String.fromCharCode(s);T.push(t)}return T}k.createPairs=A,k.ascii=e},31457:function($,R,e){var k=e(65185),A=e(18625),l={M:"moveTo",C:"bezierCurveTo"};$.exports=function(T,b){T.beginPath(),A(k(b)).forEach(function(d){var s=d[0],t=d.slice(1);T[l[s]].apply(T,t)}),T.closePath()}},90660:function($){$.exports=function(R){switch(R){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}}},12129:function($){"use strict";function R(e,k,A){var l=0|e[A];if(l<=0)return[];var T,b=new Array(l);if(A===e.length-1)for(T=0;T<l;++T)b[T]=k;else for(T=0;T<l;++T)b[T]=R(e,k,A+1);return b}$.exports=function(e,k){switch(void 0===k&&(k=0),typeof e){case"number":if(e>0)return function(A,l){var T,b;for(T=new Array(A),b=0;b<A;++b)T[b]=l;return T}(0|e,k);break;case"object":if("number"==typeof e.length)return R(e,k,0)}return[]}},11474:function($){"use strict";function R(S,_,E){E=E||2;var L,C,P,I,U,z,H,F=_&&_.length,N=F?_[0]*E:S.length,B=e(S,0,N,E,!0),j=[];if(!B||B.next===B.prev)return j;if(F&&(B=function(G,V,W,X){var K,re,ee,ie=[];for(K=0,re=V.length;K<re;K++)(ee=e(G,V[K]*X,K<re-1?V[K+1]*X:G.length,X,!1))===ee.next&&(ee.steiner=!0),ie.push(n(ee));for(ie.sort(s),K=0;K<ie.length;K++)t(ie[K],W),W=k(W,W.next);return W}(S,_,B,E)),S.length>80*E){L=P=S[0],C=I=S[1];for(var J=E;J<N;J+=E)(U=S[J])<L&&(L=U),(z=S[J+1])<C&&(C=z),U>P&&(P=U),z>I&&(I=z);H=0!==(H=Math.max(P-L,I-C))?1/H:0}return A(B,j,E,L,C,H),j}function e(S,_,E,L,C){var P,I;if(C===u(S,_,E,L)>0)for(P=_;P<E;P+=L)I=h(P,S[P],S[P+1],I);else for(P=E-L;P>=_;P-=L)I=h(P,S[P],S[P+1],I);return I&&p(I,I.next)&&(m(I),I=I.next),I}function k(S,_){if(!S)return S;_||(_=S);var E,L=S;do{if(E=!1,L.steiner||!p(L,L.next)&&0!==c(L.prev,L,L.next))L=L.next;else{if(m(L),(L=_=L.prev)===L.next)break;E=!0}}while(E||L!==_);return _}function A(S,_,E,L,C,P,I){if(S){!I&&P&&function(F,N,B,j){var J=F;do{null===J.z&&(J.z=r(J.x,J.y,N,B,j)),J.prevZ=J.prev,J.nextZ=J.next,J=J.next}while(J!==F);J.prevZ.nextZ=null,J.prevZ=null,function(G){var V,W,X,K,re,ee,ie,oe,ce=1;do{for(W=G,G=null,re=null,ee=0;W;){for(ee++,X=W,ie=0,V=0;V<ce&&(ie++,X=X.nextZ);V++);for(oe=ce;ie>0||oe>0&&X;)0!==ie&&(0===oe||!X||W.z<=X.z)?(K=W,W=W.nextZ,ie--):(K=X,X=X.nextZ,oe--),re?re.nextZ=K:G=K,K.prevZ=re,re=K;W=X}re.nextZ=null,ce*=2}while(ee>1)}(J)}(S,L,C,P);for(var U,z,H=S;S.prev!==S.next;)if(U=S.prev,z=S.next,P?T(S,L,C,P):l(S))_.push(U.i/E),_.push(S.i/E),_.push(z.i/E),m(S),S=z.next,H=z.next;else if((S=z)===H){I?1===I?A(S=b(k(S),_,E),_,E,L,C,P,2):2===I&&d(S,_,E,L,C,P):A(k(S),_,E,L,C,P,1);break}}}function l(S){var _=S.prev,E=S,L=S.next;if(c(_,E,L)>=0)return!1;for(var C=S.next.next;C!==S.prev;){if(i(_.x,_.y,E.x,E.y,L.x,L.y,C.x,C.y)&&c(C.prev,C,C.next)>=0)return!1;C=C.next}return!0}function T(S,_,E,L){var C=S.prev,P=S,I=S.next;if(c(C,P,I)>=0)return!1;for(var H=C.x>P.x?C.x>I.x?C.x:I.x:P.x>I.x?P.x:I.x,F=C.y>P.y?C.y>I.y?C.y:I.y:P.y>I.y?P.y:I.y,N=r(C.x<P.x?C.x<I.x?C.x:I.x:P.x<I.x?P.x:I.x,C.y<P.y?C.y<I.y?C.y:I.y:P.y<I.y?P.y:I.y,_,E,L),B=r(H,F,_,E,L),j=S.prevZ,J=S.nextZ;j&&j.z>=N&&J&&J.z<=B;){if(j!==S.prev&&j!==S.next&&i(C.x,C.y,P.x,P.y,I.x,I.y,j.x,j.y)&&c(j.prev,j,j.next)>=0||(j=j.prevZ,J!==S.prev&&J!==S.next&&i(C.x,C.y,P.x,P.y,I.x,I.y,J.x,J.y)&&c(J.prev,J,J.next)>=0))return!1;J=J.nextZ}for(;j&&j.z>=N;){if(j!==S.prev&&j!==S.next&&i(C.x,C.y,P.x,P.y,I.x,I.y,j.x,j.y)&&c(j.prev,j,j.next)>=0)return!1;j=j.prevZ}for(;J&&J.z<=B;){if(J!==S.prev&&J!==S.next&&i(C.x,C.y,P.x,P.y,I.x,I.y,J.x,J.y)&&c(J.prev,J,J.next)>=0)return!1;J=J.nextZ}return!0}function b(S,_,E){var L=S;do{var C=L.prev,P=L.next.next;!p(C,P)&&f(C,L,L.next,P)&&g(C,P)&&g(P,C)&&(_.push(C.i/E),_.push(L.i/E),_.push(P.i/E),m(L),m(L.next),L=S=P),L=L.next}while(L!==S);return k(L)}function d(S,_,E,L,C,P){var I=S;do{for(var U=I.next.next;U!==I.prev;){if(I.i!==U.i&&a(I,U)){var z=y(I,U);return I=k(I,I.next),z=k(z,z.next),A(I,_,E,L,C,P),void A(z,_,E,L,C,P)}U=U.next}I=I.next}while(I!==S)}function s(S,_){return S.x-_.x}function t(S,_){if(_=function(L,C){var P,I=C,U=L.x,z=L.y,H=-1/0;do{if(z<=I.y&&z>=I.next.y&&I.next.y!==I.y){var F=I.x+(z-I.y)*(I.next.x-I.x)/(I.next.y-I.y);if(F<=U&&F>H){if(H=F,F===U){if(z===I.y)return I;if(z===I.next.y)return I.next}P=I.x<I.next.x?I:I.next}}I=I.next}while(I!==C);if(!P)return null;if(U===H)return P;var N,B=P,j=P.x,J=P.y,G=1/0;I=P;do{U>=I.x&&I.x>=j&&U!==I.x&&i(z<J?U:H,z,j,J,z<J?H:U,z,I.x,I.y)&&(N=Math.abs(z-I.y)/(U-I.x),g(I,L)&&(N<G||N===G&&(I.x>P.x||I.x===P.x&&o(P,I)))&&(P=I,G=N)),I=I.next}while(I!==B);return P}(S,_)){var E=y(_,S);k(_,_.next),k(E,E.next)}}function o(S,_){return c(S.prev,S,_.prev)<0&&c(_.next,S,S.next)<0}function r(S,_,E,L,C){return(S=1431655765&((S=858993459&((S=252645135&((S=16711935&((S=32767*(S-E)*C)|S<<8))|S<<4))|S<<2))|S<<1))|(_=1431655765&((_=858993459&((_=252645135&((_=16711935&((_=32767*(_-L)*C)|_<<8))|_<<4))|_<<2))|_<<1))<<1}function n(S){var _=S,E=S;do{(_.x<E.x||_.x===E.x&&_.y<E.y)&&(E=_),_=_.next}while(_!==S);return E}function i(S,_,E,L,C,P,I,U){return(C-I)*(_-U)-(S-I)*(P-U)>=0&&(S-I)*(L-U)-(E-I)*(_-U)>=0&&(E-I)*(P-U)-(C-I)*(L-U)>=0}function a(S,_){return S.next.i!==_.i&&S.prev.i!==_.i&&!function(E,L){var C=E;do{if(C.i!==E.i&&C.next.i!==E.i&&C.i!==L.i&&C.next.i!==L.i&&f(C,C.next,E,L))return!0;C=C.next}while(C!==E);return!1}(S,_)&&(g(S,_)&&g(_,S)&&function(E,L){var C=E,P=!1,I=(E.x+L.x)/2,U=(E.y+L.y)/2;do{C.y>U!=C.next.y>U&&C.next.y!==C.y&&I<(C.next.x-C.x)*(U-C.y)/(C.next.y-C.y)+C.x&&(P=!P),C=C.next}while(C!==E);return P}(S,_)&&(c(S.prev,S,_.prev)||c(S,_.prev,_))||p(S,_)&&c(S.prev,S,S.next)>0&&c(_.prev,_,_.next)>0)}function c(S,_,E){return(_.y-S.y)*(E.x-_.x)-(_.x-S.x)*(E.y-_.y)}function p(S,_){return S.x===_.x&&S.y===_.y}function f(S,_,E,L){var C=v(c(S,_,E)),P=v(c(S,_,L)),I=v(c(E,L,S)),U=v(c(E,L,_));return C!==P&&I!==U||!(0!==C||!x(S,E,_))||!(0!==P||!x(S,L,_))||!(0!==I||!x(E,S,L))||!(0!==U||!x(E,_,L))}function x(S,_,E){return _.x<=Math.max(S.x,E.x)&&_.x>=Math.min(S.x,E.x)&&_.y<=Math.max(S.y,E.y)&&_.y>=Math.min(S.y,E.y)}function v(S){return S>0?1:S<0?-1:0}function g(S,_){return c(S.prev,S,S.next)<0?c(S,_,S.next)>=0&&c(S,S.prev,_)>=0:c(S,_,S.prev)<0||c(S,S.next,_)<0}function y(S,_){var E=new w(S.i,S.x,S.y),L=new w(_.i,_.x,_.y),C=S.next,P=_.prev;return S.next=_,_.prev=S,E.next=C,C.prev=E,L.next=E,E.prev=L,P.next=L,L.prev=P,L}function h(S,_,E,L){var C=new w(S,_,E);return L?(C.next=L.next,C.prev=L,L.next.prev=C,L.next=C):(C.prev=C,C.next=C),C}function m(S){S.next.prev=S.prev,S.prev.next=S.next,S.prevZ&&(S.prevZ.nextZ=S.nextZ),S.nextZ&&(S.nextZ.prevZ=S.prevZ)}function w(S,_,E){this.i=S,this.x=_,this.y=E,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function u(S,_,E,L){for(var C=0,P=_,I=E-L;P<E;P+=L)C+=(S[I]-S[P])*(S[P+1]+S[I+1]),I=P;return C}$.exports=R,$.exports.default=R,R.deviation=function(S,_,E,L){var C=_&&_.length,I=Math.abs(u(S,0,C?_[0]*E:S.length,E));if(C)for(var U=0,z=_.length;U<z;U++)I-=Math.abs(u(S,_[U]*E,U<z-1?_[U+1]*E:S.length,E));var N=0;for(U=0;U<L.length;U+=3){var B=L[U]*E,j=L[U+1]*E,J=L[U+2]*E;N+=Math.abs((S[B]-S[J])*(S[j+1]-S[B+1])-(S[B]-S[j])*(S[J+1]-S[B+1]))}return 0===I&&0===N?0:Math.abs((N-I)/I)},R.flatten=function(S){for(var _=S[0][0].length,E={vertices:[],holes:[],dimensions:_},L=0,C=0;C<S.length;C++){for(var P=0;P<S[C].length;P++)for(var I=0;I<_;I++)E.vertices.push(S[C][P][I]);C>0&&E.holes.push(L+=S[C-1].length)}return E}},2502:function($,R,e){var k=e(68664);$.exports=function(A,l){var T,b=[],d=[],s=[],t={},o=[];function r(g){s[g]=!1,t.hasOwnProperty(g)&&Object.keys(t[g]).forEach(function(y){delete t[g][y],s[y]&&r(y)})}function n(g){var y,h,m=!1;for(d.push(g),s[g]=!0,y=0;y<o[g].length;y++)(h=o[g][y])===T?(i(T,d),m=!0):s[h]||(m=n(h));if(m)r(g);else for(y=0;y<o[g].length;y++){var w=t[h=o[g][y]];w||(t[h]=w={}),w[h]=!0}return d.pop(),m}function i(g,y){var h=[].concat(y).concat(g);l?l(n):b.push(h)}function a(g){!function(E){for(var L=0;L<A.length;L++)L<E&&(A[L]=[]),A[L]=A[L].filter(function(C){return C>=E})}(g);for(var y,h=k(A).components.filter(function(E){return E.length>1}),m=1/0,w=0;w<h.length;w++)for(var u=0;u<h[w].length;u++)h[w][u]<m&&(m=h[w][u],y=w);var S=h[y];return!!S&&{leastVertex:m,adjList:A.map(function(E,L){return-1===S.indexOf(L)?[]:E.filter(function(C){return-1!==S.indexOf(C)})})}}T=0;for(var c=A.length;T<c;){var p=a(T);if(T=p.leastVertex,o=p.adjList){for(var f=0;f<o.length;f++)for(var x=0;x<o[f].length;x++){var v=o[f][x];s[+v]=!1,t[v]={}}n(T),T+=1}else T=c}return l?void 0:b}},72943:function($,R,e){"use strict";var k,A=TypeError,l=Object.getOwnPropertyDescriptor;if(l)try{l({},"")}catch{l=null}var T=function(){throw new A},b=l?function(){try{return T}catch{try{return l(arguments,"callee").get}catch{return T}}}():T,d=e(57877)(),s=Object.getPrototypeOf||function(f){return f.__proto__},t=k,o=typeof Uint8Array>"u"?k:s(Uint8Array),r={"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?k:ArrayBuffer,"%ArrayBufferPrototype%":typeof ArrayBuffer>"u"?k:ArrayBuffer.prototype,"%ArrayIteratorPrototype%":d?s([][Symbol.iterator]()):k,"%ArrayPrototype%":Array.prototype,"%ArrayProto_entries%":Array.prototype.entries,"%ArrayProto_forEach%":Array.prototype.forEach,"%ArrayProto_keys%":Array.prototype.keys,"%ArrayProto_values%":Array.prototype.values,"%AsyncFromSyncIteratorPrototype%":k,"%AsyncFunction%":void 0,"%AsyncFunctionPrototype%":k,"%AsyncGenerator%":k,"%AsyncGeneratorFunction%":void 0,"%AsyncGeneratorPrototype%":k,"%AsyncIteratorPrototype%":t&&d&&Symbol.asyncIterator?t[Symbol.asyncIterator]():k,"%Atomics%":typeof Atomics>"u"?k:Atomics,"%Boolean%":Boolean,"%BooleanPrototype%":Boolean.prototype,"%DataView%":typeof DataView>"u"?k:DataView,"%DataViewPrototype%":typeof DataView>"u"?k:DataView.prototype,"%Date%":Date,"%DatePrototype%":Date.prototype,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%ErrorPrototype%":Error.prototype,"%eval%":eval,"%EvalError%":EvalError,"%EvalErrorPrototype%":EvalError.prototype,"%Float32Array%":typeof Float32Array>"u"?k:Float32Array,"%Float32ArrayPrototype%":typeof Float32Array>"u"?k:Float32Array.prototype,"%Float64Array%":typeof Float64Array>"u"?k:Float64Array,"%Float64ArrayPrototype%":typeof Float64Array>"u"?k:Float64Array.prototype,"%Function%":Function,"%FunctionPrototype%":Function.prototype,"%Generator%":k,"%GeneratorFunction%":void 0,"%GeneratorPrototype%":k,"%Int8Array%":typeof Int8Array>"u"?k:Int8Array,"%Int8ArrayPrototype%":typeof Int8Array>"u"?k:Int8Array.prototype,"%Int16Array%":typeof Int16Array>"u"?k:Int16Array,"%Int16ArrayPrototype%":typeof Int16Array>"u"?k:Int8Array.prototype,"%Int32Array%":typeof Int32Array>"u"?k:Int32Array,"%Int32ArrayPrototype%":typeof Int32Array>"u"?k:Int32Array.prototype,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":d?s(s([][Symbol.iterator]())):k,"%JSON%":"object"==typeof JSON?JSON:k,"%JSONParse%":"object"==typeof JSON?JSON.parse:k,"%Map%":typeof Map>"u"?k:Map,"%MapIteratorPrototype%":typeof Map<"u"&&d?s((new Map)[Symbol.iterator]()):k,"%MapPrototype%":typeof Map>"u"?k:Map.prototype,"%Math%":Math,"%Number%":Number,"%NumberPrototype%":Number.prototype,"%Object%":Object,"%ObjectPrototype%":Object.prototype,"%ObjProto_toString%":Object.prototype.toString,"%ObjProto_valueOf%":Object.prototype.valueOf,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?k:Promise,"%PromisePrototype%":typeof Promise>"u"?k:Promise.prototype,"%PromiseProto_then%":typeof Promise>"u"?k:Promise.prototype.then,"%Promise_all%":typeof Promise>"u"?k:Promise.all,"%Promise_reject%":typeof Promise>"u"?k:Promise.reject,"%Promise_resolve%":typeof Promise>"u"?k:Promise.resolve,"%Proxy%":typeof Proxy>"u"?k:Proxy,"%RangeError%":RangeError,"%RangeErrorPrototype%":RangeError.prototype,"%ReferenceError%":ReferenceError,"%ReferenceErrorPrototype%":ReferenceError.prototype,"%Reflect%":typeof Reflect>"u"?k:Reflect,"%RegExp%":RegExp,"%RegExpPrototype%":RegExp.prototype,"%Set%":typeof Set>"u"?k:Set,"%SetIteratorPrototype%":typeof Set<"u"&&d?s((new Set)[Symbol.iterator]()):k,"%SetPrototype%":typeof Set>"u"?k:Set.prototype,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?k:SharedArrayBuffer,"%SharedArrayBufferPrototype%":typeof SharedArrayBuffer>"u"?k:SharedArrayBuffer.prototype,"%String%":String,"%StringIteratorPrototype%":d?s(""[Symbol.iterator]()):k,"%StringPrototype%":String.prototype,"%Symbol%":d?Symbol:k,"%SymbolPrototype%":d?Symbol.prototype:k,"%SyntaxError%":SyntaxError,"%SyntaxErrorPrototype%":SyntaxError.prototype,"%ThrowTypeError%":b,"%TypedArray%":o,"%TypedArrayPrototype%":o?o.prototype:k,"%TypeError%":A,"%TypeErrorPrototype%":A.prototype,"%Uint8Array%":typeof Uint8Array>"u"?k:Uint8Array,"%Uint8ArrayPrototype%":typeof Uint8Array>"u"?k:Uint8Array.prototype,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?k:Uint8ClampedArray,"%Uint8ClampedArrayPrototype%":typeof Uint8ClampedArray>"u"?k:Uint8ClampedArray.prototype,"%Uint16Array%":typeof Uint16Array>"u"?k:Uint16Array,"%Uint16ArrayPrototype%":typeof Uint16Array>"u"?k:Uint16Array.prototype,"%Uint32Array%":typeof Uint32Array>"u"?k:Uint32Array,"%Uint32ArrayPrototype%":typeof Uint32Array>"u"?k:Uint32Array.prototype,"%URIError%":URIError,"%URIErrorPrototype%":URIError.prototype,"%WeakMap%":typeof WeakMap>"u"?k:WeakMap,"%WeakMapPrototype%":typeof WeakMap>"u"?k:WeakMap.prototype,"%WeakSet%":typeof WeakSet>"u"?k:WeakSet,"%WeakSetPrototype%":typeof WeakSet>"u"?k:WeakSet.prototype},n=e(77575).call(Function.call,String.prototype.replace),i=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,a=/\\(\\)?/g;$.exports=function(f,x){if("string"!=typeof f||0===f.length)throw new TypeError("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof x)throw new TypeError('"allowMissing" argument must be a boolean');for(var v=function(f){var x=[];return n(f,i,function(v,g,y,h){x[x.length]=y?n(h,a,"$1"):g||v}),x}(f),g=function(f,x){if(!(f in r))throw new SyntaxError("intrinsic "+f+" does not exist!");if(void 0===r[f]&&!x)throw new A("intrinsic "+f+" exists, but is not available. Please file an issue!");return r[f]}("%"+(v.length>0?v[0]:"")+"%",x),y=1;y<v.length;y+=1)if(null!=g)if(l&&y+1>=v.length){var h=l(g,v[y]);if(!x&&!(v[y]in g))throw new A("base intrinsic for "+f+" exists, but the property is not available.");g=h?h.get||h.value:g[v[y]]}else g=g[v[y]];return g}},84671:function($,R,e){"use strict";var k=e(77575),A=e(72943)("%Function%"),l=A.apply,T=A.call;$.exports=function(){return k.apply(T,arguments)},$.exports.apply=function(){return k.apply(l,arguments)}},92978:function($,R,e){"use strict";var k=e(72943),A=e(84671),l=A(k("String.prototype.indexOf"));$.exports=function(T,b){var d=k(T,!!b);return"function"==typeof d&&l(T,".prototype.")?A(d):d}},67295:function($,R,e){"use strict";var k=e(72943)("%Object.getOwnPropertyDescriptor%");if(k)try{k([],"length")}catch{k=null}$.exports=k},16134:function($,R,e){"use strict";var k=e(36672);$.exports=function(){return k(this).length=0,this}},4892:function($,R,e){"use strict";$.exports=e(64404)()?Array.from:e(49441)},64404:function($){"use strict";$.exports=function(){var R,e,k=Array.from;return"function"==typeof k&&!(!(e=k(R=["raz","dwa"]))||e===R||"dwa"!==e[1])}},49441:function($,R,e){"use strict";var k=e(8260).iterator,A=e(73051),l=e(33717),T=e(35976),b=e(78513),d=e(36672),s=e(95296),t=e(87963),o=Array.isArray,r=Function.prototype.call,n={configurable:!0,enumerable:!0,writable:!0,value:null},i=Object.defineProperty;$.exports=function(a){var c,p,f,x,v,g,y,h,m,w,u=arguments[1],S=arguments[2];if(a=Object(d(a)),s(u)&&b(u),this&&this!==Array&&l(this))c=this;else{if(!u){if(A(a))return 1!==(v=a.length)?Array.apply(null,a):((x=new Array(1))[0]=a[0],x);if(o(a)){for(x=new Array(v=a.length),p=0;p<v;++p)x[p]=a[p];return x}}x=[]}if(!o(a))if(void 0!==(m=a[k])){for(y=b(m).call(a),c&&(x=new c),h=y.next(),p=0;!h.done;)w=u?r.call(u,S,h.value,p):h.value,c?(n.value=w,i(x,p,n)):x[p]=w,h=y.next(),++p;v=p}else if(t(a)){for(v=a.length,c&&(x=new c),p=0,f=0;p<v;++p)w=a[p],p+1<v&&(g=w.charCodeAt(0))>=55296&&g<=56319&&(w+=a[++p]),w=u?r.call(u,S,w,f):w,c?(n.value=w,i(x,f,n)):x[f]=w,++f;v=f}if(void 0===v)for(v=T(a.length),c&&(x=new c(v)),p=0;p<v;++p)w=u?r.call(u,S,a[p],p):a[p],c?(n.value=w,i(x,p,n)):x[p]=w;return c&&(n.value=null,x.length=v),x}},73051:function($){"use strict";var R=Object.prototype.toString,e=R.call(function(){return arguments}());$.exports=function(k){return R.call(k)===e}},33717:function($){"use strict";var R=Object.prototype.toString,e=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);$.exports=function(k){return"function"==typeof k&&e(R.call(k))}},52345:function($){"use strict";$.exports=function(){}},9953:function($,R,e){"use strict";$.exports=e(90436)()?Math.sign:e(6069)},90436:function($){"use strict";$.exports=function(){var R=Math.sign;return"function"==typeof R&&1===R(10)&&-1===R(-20)}},6069:function($){"use strict";$.exports=function(R){return R=Number(R),isNaN(R)||0===R?R:R>0?1:-1}},56247:function($,R,e){"use strict";var k=e(9953),A=Math.abs,l=Math.floor;$.exports=function(T){return isNaN(T)?0:0!==(T=Number(T))&&isFinite(T)?k(T)*l(A(T)):T}},35976:function($,R,e){"use strict";var k=e(56247),A=Math.max;$.exports=function(l){return A(0,k(l))}},67260:function($,R,e){"use strict";var k=e(78513),A=e(36672),l=Function.prototype.bind,T=Function.prototype.call,b=Object.keys,d=Object.prototype.propertyIsEnumerable;$.exports=function(s,t){return function(o,r){var n,i=arguments[2],a=arguments[3];return o=Object(A(o)),k(r),n=b(o),a&&n.sort("function"==typeof a?l.call(a,o):void 0),"function"!=typeof s&&(s=n[s]),T.call(s,n,function(c,p){return d.call(o,c)?T.call(r,i,o[c],c,o,p):t})}}},95879:function($,R,e){"use strict";$.exports=e(73583)()?Object.assign:e(34205)},73583:function($){"use strict";$.exports=function(){var R,e=Object.assign;return"function"==typeof e&&(e(R={foo:"raz"},{bar:"dwa"},{trzy:"trzy"}),R.foo+R.bar+R.trzy==="razdwatrzy")}},34205:function($,R,e){"use strict";var k=e(68700),A=e(36672),l=Math.max;$.exports=function(T,b){var d,s,t,o=l(arguments.length,2);for(T=Object(A(T)),t=function(r){try{T[r]=b[r]}catch(n){d||(d=n)}},s=1;s<o;++s)k(b=arguments[s]).forEach(t);if(void 0!==d)throw d;return T}},19012:function($,R,e){"use strict";var k=e(4892),A=e(95879),l=e(36672);$.exports=function(T){var b=Object(l(T)),d=arguments[1],s=Object(arguments[2]);if(b!==T&&!d)return b;var t={};return d?k(d,function(o){(s.ensure||o in T)&&(t[o]=T[o])}):A(t,T),t}},52818:function($,R,e){"use strict";var k,A,l,T,b=Object.create;e(33247)()||(k=e(51882)),$.exports=k?1!==k.level?b:(A={},l={},T={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(d){l[d]="__proto__"!==d?T:{configurable:!0,enumerable:!1,writable:!0,value:void 0}}),Object.defineProperties(A,l),Object.defineProperty(k,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:A}),function(d,s){return b(null===d?A:d,s)}):b},96437:function($,R,e){"use strict";$.exports=e(67260)("forEach")},99611:function($,R,e){"use strict";var k=e(95296),A={function:!0,object:!0};$.exports=function(l){return k(l)&&A[typeof l]||!1}},95296:function($,R,e){"use strict";var k=e(52345)();$.exports=function(A){return A!==k&&null!==A}},68700:function($,R,e){"use strict";$.exports=e(13895)()?Object.keys:e(25217)},13895:function($){"use strict";$.exports=function(){try{return Object.keys("primitive"),!0}catch{return!1}}},25217:function($,R,e){"use strict";var k=e(95296),A=Object.keys;$.exports=function(l){return A(k(l)?Object(l):l)}},16906:function($,R,e){"use strict";var k=e(78513),A=e(96437),l=Function.prototype.call;$.exports=function(T,b){var d={},s=arguments[2];return k(b),A(T,function(t,o,r,n){d[o]=l.call(b,s,t,o,r,n)}),d}},21780:function($,R,e){"use strict";var k=e(95296),A=Array.prototype.forEach,l=Object.create;$.exports=function(b){var d=l(null);return A.call(arguments,function(s){k(s)&&function(b,d){var s;for(s in b)d[s]=b[s]}(Object(s),d)}),d}},1496:function($,R,e){"use strict";$.exports=e(33247)()?Object.setPrototypeOf:e(51882)},33247:function($){"use strict";var R=Object.create,e=Object.getPrototypeOf,k={};$.exports=function(){var A=Object.setPrototypeOf;return"function"==typeof A&&e(A((arguments[0]||R)(null),k))===k}},51882:function($,R,e){"use strict";var k,A,l,T,b=e(99611),d=e(36672),s=Object.prototype.isPrototypeOf,t=Object.defineProperty,o={configurable:!0,enumerable:!1,writable:!0,value:void 0};k=function(r,n){if(d(r),null===n||b(n))return r;throw new TypeError("Prototype must be null or an object")},$.exports=(A=function(){var r,n=Object.create(null),i={},a=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(a){try{(r=a.set).call(n,i)}catch{}if(Object.getPrototypeOf(n)===i)return{set:r,level:2}}return n.__proto__=i,Object.getPrototypeOf(n)===i?{level:2}:((n={}).__proto__=i,Object.getPrototypeOf(n)===i&&{level:1})}())?(2===A.level?A.set?(T=A.set,l=function(r,n){return T.call(k(r,n),n),r}):l=function(r,n){return k(r,n).__proto__=n,r}:l=function r(n,i){var a;return k(n,i),(a=s.call(r.nullPolyfill,n))&&delete r.nullPolyfill.__proto__,null===i&&(i=r.nullPolyfill),n.__proto__=i,a&&t(r.nullPolyfill,"__proto__",o),n},Object.defineProperty(l,"level",{configurable:!1,enumerable:!1,writable:!1,value:A.level})):null,e(52818)},78513:function($){"use strict";$.exports=function(R){if("function"!=typeof R)throw new TypeError(R+" is not a function");return R}},98976:function($,R,e){"use strict";var k=e(99611);$.exports=function(A){if(!k(A))throw new TypeError(A+" is not an Object");return A}},36672:function($,R,e){"use strict";var k=e(95296);$.exports=function(A){if(!k(A))throw new TypeError("Cannot use null or undefined");return A}},66741:function($,R,e){"use strict";$.exports=e(17557)()?String.prototype.contains:e(60381)},17557:function($){"use strict";var R="razdwatrzy";$.exports=function(){return"function"==typeof R.contains&&!0===R.contains("dwa")&&!1===R.contains("foo")}},60381:function($){"use strict";var R=String.prototype.indexOf;$.exports=function(e){return R.call(this,e,arguments[1])>-1}},87963:function($){"use strict";var R=Object.prototype.toString,e=R.call("");$.exports=function(k){return"string"==typeof k||k&&"object"==typeof k&&(k instanceof String||R.call(k)===e)||!1}},43043:function($){"use strict";var R=Object.create(null),e=Math.random;$.exports=function(){var k;do{k=e().toString(36).slice(2)}while(R[k]);return k}},32411:function($,R,e){"use strict";var k,A=e(1496),l=e(66741),T=e(62072),b=e(8260),d=e(95426),s=Object.defineProperty;k=$.exports=function(t,o){if(!(this instanceof k))throw new TypeError("Constructor requires 'new'");d.call(this,t),o=o?l.call(o,"key+value")?"key+value":l.call(o,"key")?"key":"value":"value",s(this,"__kind__",T("",o))},A&&A(k,d),delete k.prototype.constructor,k.prototype=Object.create(d.prototype,{_resolve:T(function(t){return"value"===this.__kind__?this.__list__[t]:"key+value"===this.__kind__?[t,this.__list__[t]]:t})}),s(k.prototype,b.toStringTag,T("c","Array Iterator"))},27515:function($,R,e){"use strict";var k=e(73051),A=e(78513),l=e(87963),T=e(66661),b=Array.isArray,d=Function.prototype.call,s=Array.prototype.some;$.exports=function(t,o){var r,n,i,a,c,p,f,x,v=arguments[2];if(b(t)||k(t)?r="array":l(t)?r="string":t=T(t),A(o),i=function(){a=!0},"array"!==r)if("string"!==r)for(n=t.next();!n.done;){if(d.call(o,v,n.value,i),a)return;n=t.next()}else for(p=t.length,c=0;c<p&&(f=t[c],c+1<p&&(x=f.charCodeAt(0))>=55296&&x<=56319&&(f+=t[++c]),d.call(o,v,f,i),!a);++c);else s.call(t,function(g){return d.call(o,v,g,i),a})}},66661:function($,R,e){"use strict";var k=e(73051),A=e(87963),l=e(32411),T=e(259),b=e(58095),d=e(8260).iterator;$.exports=function(s){return"function"==typeof b(s)[d]?s[d]():k(s)?new l(s):A(s)?new T(s):new l(s)}},95426:function($,R,e){"use strict";var k,A=e(16134),l=e(95879),T=e(78513),b=e(36672),d=e(62072),s=e(55174),t=e(8260),o=Object.defineProperty,r=Object.defineProperties;$.exports=k=function(n,i){if(!(this instanceof k))throw new TypeError("Constructor requires 'new'");r(this,{__list__:d("w",b(n)),__context__:d("w",i),__nextIndex__:d("w",0)}),i&&(T(i.on),i.on("_add",this._onAdd),i.on("_delete",this._onDelete),i.on("_clear",this._onClear))},delete k.prototype.constructor,r(k.prototype,l({_next:d(function(){var n;if(this.__list__)return this.__redo__&&void 0!==(n=this.__redo__.shift())?n:this.__nextIndex__<this.__list__.length?this.__nextIndex__++:void this._unBind()}),next:d(function(){return this._createResult(this._next())}),_createResult:d(function(n){return void 0===n?{done:!0,value:void 0}:{done:!1,value:this._resolve(n)}}),_resolve:d(function(n){return this.__list__[n]}),_unBind:d(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:d(function(){return"[object "+(this[t.toStringTag]||"Object")+"]"})},s({_onAdd:d(function(n){n>=this.__nextIndex__||(++this.__nextIndex__,this.__redo__?(this.__redo__.forEach(function(i,a){i>=n&&(this.__redo__[a]=++i)},this),this.__redo__.push(n)):o(this,"__redo__",d("c",[n])))}),_onDelete:d(function(n){var i;n>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(-1!==(i=this.__redo__.indexOf(n))&&this.__redo__.splice(i,1),this.__redo__.forEach(function(a,c){a>n&&(this.__redo__[c]=--a)},this)))}),_onClear:d(function(){this.__redo__&&A.call(this.__redo__),this.__nextIndex__=0})}))),o(k.prototype,t.iterator,d(function(){return this}))},35940:function($,R,e){"use strict";var k=e(73051),A=e(95296),l=e(87963),T=e(8260).iterator,b=Array.isArray;$.exports=function(d){return!(!A(d)||!b(d)&&!l(d)&&!k(d)&&"function"!=typeof d[T])}},259:function($,R,e){"use strict";var k,A=e(1496),l=e(62072),T=e(8260),b=e(95426),d=Object.defineProperty;k=$.exports=function(s){if(!(this instanceof k))throw new TypeError("Constructor requires 'new'");s=String(s),b.call(this,s),d(this,"__length__",l("",s.length))},A&&A(k,b),delete k.prototype.constructor,k.prototype=Object.create(b.prototype,{_next:l(function(){if(this.__list__)return this.__nextIndex__<this.__length__?this.__nextIndex__++:void this._unBind()}),_resolve:l(function(s){var t,o=this.__list__[s];return this.__nextIndex__===this.__length__?o:(t=o.charCodeAt(0))>=55296&&t<=56319?o+this.__list__[this.__nextIndex__++]:o})}),d(k.prototype,T.toStringTag,l("c","String Iterator"))},58095:function($,R,e){"use strict";var k=e(35940);$.exports=function(A){if(!k(A))throw new TypeError(A+" is not iterable");return A}},73523:function($){"use strict";function R(e,k){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var A=Object(e),l=1;l<arguments.length;l++){var T=arguments[l];if(null!=T)for(var b=Object.keys(Object(T)),d=0,s=b.length;d<s;d++){var t=b[d],o=Object.getOwnPropertyDescriptor(T,t);void 0!==o&&o.enumerable&&(A[t]=T[t])}}return A}$.exports={assign:R,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:R})}}},8260:function($,R,e){"use strict";$.exports=e(69711)()?e(94908).Symbol:e(18415)},69711:function($,R,e){"use strict";var k=e(94908),A={object:!0,symbol:!0};$.exports=function(){var l,T=k.Symbol;if("function"!=typeof T)return!1;l=T("test symbol");try{String(l)}catch{return!1}return!!A[typeof T.iterator]&&!!A[typeof T.toPrimitive]&&!!A[typeof T.toStringTag]}},82276:function($){"use strict";$.exports=function(R){return!!R&&("symbol"==typeof R||!!R.constructor&&"Symbol"===R.constructor.name&&"Symbol"===R[R.constructor.toStringTag])}},29366:function($,R,e){"use strict";var k=e(62072),l=Object.defineProperty,T=Object.prototype,b=(0,Object.create)(null);$.exports=function(d){for(var s,t,o=0;b[d+(o||"")];)++o;return b[d+=o||""]=!0,l(T,s="@@"+d,k.gs(null,function(r){t||(t=!0,l(this,s,k(r)),t=!1)})),s}},92842:function($,R,e){"use strict";var k=e(62072),A=e(94908).Symbol;$.exports=function(l){return Object.defineProperties(l,{hasInstance:k("",A&&A.hasInstance||l("hasInstance")),isConcatSpreadable:k("",A&&A.isConcatSpreadable||l("isConcatSpreadable")),iterator:k("",A&&A.iterator||l("iterator")),match:k("",A&&A.match||l("match")),replace:k("",A&&A.replace||l("replace")),search:k("",A&&A.search||l("search")),species:k("",A&&A.species||l("species")),split:k("",A&&A.split||l("split")),toPrimitive:k("",A&&A.toPrimitive||l("toPrimitive")),toStringTag:k("",A&&A.toStringTag||l("toStringTag")),unscopables:k("",A&&A.unscopables||l("unscopables"))})}},13304:function($,R,e){"use strict";var k=e(62072),A=e(53308),l=Object.create(null);$.exports=function(T){return Object.defineProperties(T,{for:k(function(b){return l[b]?l[b]:l[b]=T(String(b))}),keyFor:k(function(b){var d;for(d in A(b),l)if(l[d]===b)return d})})}},18415:function($,R,e){"use strict";var k,A,l,T=e(62072),b=e(53308),d=e(94908).Symbol,s=e(29366),t=e(92842),o=e(13304),r=Object.create,n=Object.defineProperties,i=Object.defineProperty;if("function"==typeof d)try{String(d()),l=!0}catch{}else d=null;A=function(a){if(this instanceof A)throw new TypeError("Symbol is not a constructor");return k(a)},$.exports=k=function a(c){var p;if(this instanceof a)throw new TypeError("Symbol is not a constructor");return l?d(c):(p=r(A.prototype),c=void 0===c?"":String(c),n(p,{__description__:T("",c),__name__:T("",s(c))}))},t(k),o(k),n(A.prototype,{constructor:T(k),toString:T("",function(){return this.__name__})}),n(k.prototype,{toString:T(function(){return"Symbol ("+b(this).__description__+")"}),valueOf:T(function(){return b(this)})}),i(k.prototype,k.toPrimitive,T("",function(){var a=b(this);return"symbol"==typeof a?a:a.toString()})),i(k.prototype,k.toStringTag,T("c","Symbol")),i(A.prototype,k.toStringTag,T("c",k.prototype[k.toStringTag])),i(A.prototype,k.toPrimitive,T("c",k.prototype[k.toPrimitive]))},53308:function($,R,e){"use strict";var k=e(82276);$.exports=function(A){if(!k(A))throw new TypeError(A+" is not a symbol");return A}},83522:function($,R,e){"use strict";$.exports=e(96402)()?WeakMap:e(329)},96402:function($){"use strict";$.exports=function(){var R,e;if("function"!=typeof WeakMap)return!1;try{R=new WeakMap([[e={},"one"],[{},"two"],[{},"three"]])}catch{return!1}return"[object WeakMap]"===String(R)&&"function"==typeof R.set&&R.set({},1)===R&&"function"==typeof R.delete&&"function"==typeof R.has&&"one"===R.get(e)}},96416:function($){"use strict";$.exports="function"==typeof WeakMap&&"[object WeakMap]"===Object.prototype.toString.call(new WeakMap)},329:function($,R,e){"use strict";var k,A=e(95296),l=e(1496),T=e(98976),b=e(36672),d=e(43043),s=e(62072),t=e(66661),o=e(27515),r=e(8260).toStringTag,n=e(96416),i=Array.isArray,a=Object.defineProperty,c=Object.prototype.hasOwnProperty,p=Object.getPrototypeOf;$.exports=k=function(){var f,x=arguments[0];if(!(this instanceof k))throw new TypeError("Constructor requires 'new'");return f=n&&l&&WeakMap!==k?l(new WeakMap,p(this)):this,A(x)&&(i(x)||(x=t(x))),a(f,"__weakMapData__",s("c","$weakMap$"+d())),x&&o(x,function(v){b(v),f.set(v[0],v[1])}),f},n&&(l&&l(k,WeakMap),k.prototype=Object.create(WeakMap.prototype,{constructor:s(k)})),Object.defineProperties(k.prototype,{delete:s(function(f){return!!c.call(T(f),this.__weakMapData__)&&(delete f[this.__weakMapData__],!0)}),get:s(function(f){if(c.call(T(f),this.__weakMapData__))return f[this.__weakMapData__]}),has:s(function(f){return c.call(T(f),this.__weakMapData__)}),set:s(function(f,x){return a(T(f),this.__weakMapData__,s("c",x)),this}),toString:s(function(){return"[object WeakMap]"})}),a(k.prototype,r,s("c","WeakMap"))},15398:function($){"use strict";var R,e="object"==typeof Reflect?Reflect:null,k=e&&"function"==typeof e.apply?e.apply:function(c,p,f){return Function.prototype.apply.call(c,p,f)};R=e&&"function"==typeof e.ownKeys?e.ownKeys:Object.getOwnPropertySymbols?function(c){return Object.getOwnPropertyNames(c).concat(Object.getOwnPropertySymbols(c))}:function(c){return Object.getOwnPropertyNames(c)};var A=Number.isNaN||function(c){return c!=c};function l(){l.init.call(this)}$.exports=l,$.exports.once=function(c,p){return new Promise(function(f,x){function v(y){c.removeListener(p,g),x(y)}function g(){"function"==typeof c.removeListener&&c.removeListener("error",v),f([].slice.call(arguments))}var y;a(c,p,g,{once:!0}),"error"!==p&&("function"==typeof(y=c).on&&a(y,"error",v,{once:!0}))})},l.EventEmitter=l,l.prototype._events=void 0,l.prototype._eventsCount=0,l.prototype._maxListeners=void 0;var T=10;function b(c){if("function"!=typeof c)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof c)}function d(c){return void 0===c._maxListeners?l.defaultMaxListeners:c._maxListeners}function s(c,p,f,x){var v,g,y;if(b(f),void 0===(g=c._events)?(g=c._events=Object.create(null),c._eventsCount=0):(void 0!==g.newListener&&(c.emit("newListener",p,f.listener?f.listener:f),g=c._events),y=g[p]),void 0===y)y=g[p]=f,++c._eventsCount;else if("function"==typeof y?y=g[p]=x?[f,y]:[y,f]:x?y.unshift(f):y.push(f),(v=d(c))>0&&y.length>v&&!y.warned){y.warned=!0;var m=new Error("Possible EventEmitter memory leak detected. "+y.length+" "+String(p)+" listeners added. Use emitter.setMaxListeners() to increase limit");m.name="MaxListenersExceededWarning",m.emitter=c,m.type=p,m.count=y.length,console&&console.warn&&console.warn(m)}return c}function t(){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 o(c,p,f){var x={fired:!1,wrapFn:void 0,target:c,type:p,listener:f},v=t.bind(x);return v.listener=f,x.wrapFn=v,v}function r(c,p,f){var x=c._events;if(void 0===x)return[];var v=x[p];return void 0===v?[]:"function"==typeof v?f?[v.listener||v]:[v]:f?function(g){for(var y=new Array(g.length),h=0;h<y.length;++h)y[h]=g[h].listener||g[h];return y}(v):i(v,v.length)}function n(c){var p=this._events;if(void 0!==p){var f=p[c];if("function"==typeof f)return 1;if(void 0!==f)return f.length}return 0}function i(c,p){for(var f=new Array(p),x=0;x<p;++x)f[x]=c[x];return f}function a(c,p,f,x){if("function"==typeof c.on)x.once?c.once(p,f):c.on(p,f);else{if("function"!=typeof c.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof c);c.addEventListener(p,function v(g){x.once&&c.removeEventListener(p,v),f(g)})}}Object.defineProperty(l,"defaultMaxListeners",{enumerable:!0,get:function(){return T},set:function(c){if("number"!=typeof c||c<0||A(c))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+c+".");T=c}}),l.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},l.prototype.setMaxListeners=function(c){if("number"!=typeof c||c<0||A(c))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+c+".");return this._maxListeners=c,this},l.prototype.getMaxListeners=function(){return d(this)},l.prototype.emit=function(c){for(var p=[],f=1;f<arguments.length;f++)p.push(arguments[f]);var x="error"===c,v=this._events;if(void 0!==v)x=x&&void 0===v.error;else if(!x)return!1;if(x){var g;if(p.length>0&&(g=p[0]),g instanceof Error)throw g;var y=new Error("Unhandled error."+(g?" ("+g.message+")":""));throw y.context=g,y}var h=v[c];if(void 0===h)return!1;if("function"==typeof h)k(h,this,p);else{var m=h.length,w=i(h,m);for(f=0;f<m;++f)k(w[f],this,p)}return!0},l.prototype.on=l.prototype.addListener=function(c,p){return s(this,c,p,!1)},l.prototype.prependListener=function(c,p){return s(this,c,p,!0)},l.prototype.once=function(c,p){return b(p),this.on(c,o(this,c,p)),this},l.prototype.prependOnceListener=function(c,p){return b(p),this.prependListener(c,o(this,c,p)),this},l.prototype.off=l.prototype.removeListener=function(c,p){var f,x,v,g,y;if(b(p),void 0===(x=this._events))return this;if(void 0===(f=x[c]))return this;if(f===p||f.listener===p)0==--this._eventsCount?this._events=Object.create(null):(delete x[c],x.removeListener&&this.emit("removeListener",c,f.listener||p));else if("function"!=typeof f){for(v=-1,g=f.length-1;g>=0;g--)if(f[g]===p||f[g].listener===p){y=f[g].listener,v=g;break}if(v<0)return this;0===v?f.shift():function(h,m){for(;m+1<h.length;m++)h[m]=h[m+1];h.pop()}(f,v),1===f.length&&(x[c]=f[0]),void 0!==x.removeListener&&this.emit("removeListener",c,y||p)}return this},l.prototype.removeAllListeners=function(c){var p,f,x;if(void 0===(f=this._events))return this;if(void 0===f.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==f[c]&&(0==--this._eventsCount?this._events=Object.create(null):delete f[c]),this;if(0===arguments.length){var v,g=Object.keys(f);for(x=0;x<g.length;++x)"removeListener"!==(v=g[x])&&this.removeAllListeners(v);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(p=f[c]))this.removeListener(c,p);else if(void 0!==p)for(x=p.length-1;x>=0;x--)this.removeListener(c,p[x]);return this},l.prototype.listeners=function(c){return r(this,c,!0)},l.prototype.rawListeners=function(c){return r(this,c,!1)},l.listenerCount=function(c,p){return"function"==typeof c.listenerCount?c.listenerCount(p):n.call(c,p)},l.prototype.listenerCount=n,l.prototype.eventNames=function(){return this._eventsCount>0?R(this._events):[]}},60774:function($){var R=function(){if("object"==typeof self&&self)return self;if("object"==typeof window&&window)return window;throw new Error("Unable to resolve global `this`")};$.exports=function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch{return R()}try{return __global__||R()}finally{delete Object.prototype.__global__}}()},94908:function($,R,e){"use strict";$.exports=e(51152)()?globalThis:e(60774)},51152:function($){"use strict";$.exports=function(){return"object"==typeof globalThis&&!!globalThis&&globalThis.Array===Array}},92770:function($,R,e){"use strict";var k=e(18546);$.exports=function(A){var l=typeof A;if("string"===l){var T=A;if(0==(A=+A)&&k(T))return!1}else if("number"!==l)return!1;return A-A<1}},30120:function($,R,e){var k=e(90660);$.exports=function(A,l,T){if(!A)throw new TypeError("must specify data as first parameter");if(T=0|+(T||0),Array.isArray(A)&&A[0]&&"number"==typeof A[0][0]){var b,d,s,t,o=A[0].length,r=A.length*o;l&&"string"!=typeof l||(l=new(k(l||"float32"))(r+T));var n=l.length-T;if(r!==n)throw new Error("source length "+r+" ("+o+"x"+A.length+") does not match destination length "+n);for(b=0,s=T;b<A.length;b++)for(d=0;d<o;d++)l[s++]=null===A[b][d]?NaN:A[b][d]}else if(l&&"string"!=typeof l)l.set(A,T);else{var i=k(l||"float32");if(Array.isArray(A)||"array"===l)for(b=0,s=T,t=(l=new i(A.length+T)).length;s<t;s++,b++)l[s]=null===A[b]?NaN:A[b];else 0===T?l=new i(A):(l=new i(A.length+T)).set(A,T)}return l}},68016:function($,R,e){"use strict";var k=e(53313),A=[32,126];$.exports=function(l){var T=(l=l||{}).shape?l.shape:l.canvas?[l.canvas.width,l.canvas.height]:[512,512],b=l.canvas||document.createElement("canvas"),d=l.font,s="number"==typeof l.step?[l.step,l.step]:l.step||[32,32],t=l.chars||A;if(d&&"string"!=typeof d&&(d=k(d)),Array.isArray(t)){if(2===t.length&&"number"==typeof t[0]&&"number"==typeof t[1]){for(var o=[],r=t[0],n=0;r<=t[1];r++)o[n++]=String.fromCharCode(r);t=o}}else t=String(t).split("");T=T.slice(),b.width=T[0],b.height=T[1];var i=b.getContext("2d");i.fillStyle="#000",i.fillRect(0,0,b.width,b.height),i.font=d,i.textAlign="center",i.textBaseline="middle",i.fillStyle="#fff";var a=s[0]/2,c=s[1]/2;for(r=0;r<t.length;r++)i.fillText(t[r],a,c),(a+=s[0])>T[0]-s[0]/2&&(a=s[0]/2,c+=s[1]);return b}},32879:function($){"use strict";function R(l,T){T||(T={}),("string"==typeof l||Array.isArray(l))&&(T.family=l);var b=Array.isArray(T.family)?T.family.join(", "):T.family;if(!b)throw Error("`family` must be defined");var d=T.size||T.fontSize||T.em||48,t=(l=[T.style||T.fontStyle||"",T.weight||T.fontWeight||"",d].join(" ")+"px "+b,T.origin||"top");if(R.cache[b]&&d<=R.cache[b].em)return e(R.cache[b],t);var o=T.canvas||R.canvas,r=o.getContext("2d"),n={upper:void 0!==T.upper?T.upper:"H",lower:void 0!==T.lower?T.lower:"x",descent:void 0!==T.descent?T.descent:"p",ascent:void 0!==T.ascent?T.ascent:"h",tittle:void 0!==T.tittle?T.tittle:"i",overshoot:void 0!==T.overshoot?T.overshoot:"O"},i=Math.ceil(1.5*d);o.height=i,o.width=.5*i,r.font=l;var a="H",c={top:0};r.clearRect(0,0,i,i),r.textBaseline="top",r.fillStyle="black",r.fillText(a,0,0);var p=k(r.getImageData(0,0,i,i));r.clearRect(0,0,i,i),r.textBaseline="bottom",r.fillText(a,0,i);var f=k(r.getImageData(0,0,i,i));c.lineHeight=c.bottom=i-f+p,r.clearRect(0,0,i,i),r.textBaseline="alphabetic",r.fillText(a,0,i);var x=i-k(r.getImageData(0,0,i,i))-1+p;c.baseline=c.alphabetic=x,r.clearRect(0,0,i,i),r.textBaseline="middle",r.fillText(a,0,.5*i);var v=k(r.getImageData(0,0,i,i));c.median=c.middle=i-v-1+p-.5*i,r.clearRect(0,0,i,i),r.textBaseline="hanging",r.fillText(a,0,.5*i);var g=k(r.getImageData(0,0,i,i));c.hanging=i-g-1+p-.5*i,r.clearRect(0,0,i,i),r.textBaseline="ideographic",r.fillText(a,0,i);var y=k(r.getImageData(0,0,i,i));if(c.ideographic=i-y-1+p,n.upper&&(r.clearRect(0,0,i,i),r.textBaseline="top",r.fillText(n.upper,0,0),c.upper=k(r.getImageData(0,0,i,i)),c.capHeight=c.baseline-c.upper),n.lower&&(r.clearRect(0,0,i,i),r.textBaseline="top",r.fillText(n.lower,0,0),c.lower=k(r.getImageData(0,0,i,i)),c.xHeight=c.baseline-c.lower),n.tittle&&(r.clearRect(0,0,i,i),r.textBaseline="top",r.fillText(n.tittle,0,0),c.tittle=k(r.getImageData(0,0,i,i))),n.ascent&&(r.clearRect(0,0,i,i),r.textBaseline="top",r.fillText(n.ascent,0,0),c.ascent=k(r.getImageData(0,0,i,i))),n.descent&&(r.clearRect(0,0,i,i),r.textBaseline="top",r.fillText(n.descent,0,0),c.descent=A(r.getImageData(0,0,i,i))),n.overshoot){r.clearRect(0,0,i,i),r.textBaseline="top",r.fillText(n.overshoot,0,0);var h=A(r.getImageData(0,0,i,i));c.overshoot=h-x}for(var m in c)c[m]/=d;return c.em=d,R.cache[b]=c,e(c,t)}function e(l,T){var b={};for(var d in"string"==typeof T&&(T=l[T]),l)"em"!==d&&(b[d]=l[d]-T);return b}function k(l){for(var T=l.height,b=l.data,d=3;d<b.length;d+=4)if(0!==b[d])return Math.floor(.25*(d-3)/T)}function A(l){for(var T=l.height,b=l.data,d=b.length-1;d>0;d-=4)if(0!==b[d])return Math.floor(.25*(d-3)/T)}$.exports=R,R.canvas=document.createElement("canvas"),R.cache={}},86165:function($){var R=Object.prototype.hasOwnProperty,e=Object.prototype.toString;$.exports=function(k,A,l){if("[object Function]"!==e.call(A))throw new TypeError("iterator must be a function");var T=k.length;if(T===+T)for(var b=0;b<T;b++)A.call(l,k[b],b,k);else for(var d in k)R.call(k,d)&&A.call(l,k[d],d,k)}},73047:function($){"use strict";var e=Array.prototype.slice,k=Object.prototype.toString;$.exports=function(l){var T=this;if("function"!=typeof T||"[object Function]"!==k.call(T))throw new TypeError("Function.prototype.bind called on incompatible "+T);for(var b,d=e.call(arguments,1),t=Math.max(0,T.length-d.length),o=[],r=0;r<t;r++)o.push("$"+r);if(b=Function("binder","return function ("+o.join(",")+"){ return binder.apply(this,arguments); }")(function(){if(this instanceof b){var i=T.apply(this,d.concat(e.call(arguments)));return Object(i)===i?i:this}return T.apply(l,d.concat(e.call(arguments)))}),T.prototype){var n=function(){};n.prototype=T.prototype,b.prototype=new n,n.prototype=null}return b}},77575:function($,R,e){"use strict";var k=e(73047);$.exports=Function.prototype.bind||k},86249:function($){$.exports=function(R,e){if("string"!=typeof R)throw new TypeError("must specify type string");if(e=e||{},typeof document>"u"&&!e.canvas)return null;var k=e.canvas||document.createElement("canvas");"number"==typeof e.width&&(k.width=e.width),"number"==typeof e.height&&(k.height=e.height);var A,l=e;try{var T=[R];0===R.indexOf("webgl")&&T.push("experimental-"+R);for(var b=0;b<T.length;b++)if(A=k.getContext(T[b],l))return A}catch{A=null}return A||null}},68318:function($,R,e){"use strict";var k,A=SyntaxError,l=Function,T=TypeError,b=function(E){try{return Function('"use strict"; return ('+E+").constructor;")()}catch{}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch{d=null}var s=function(){throw new T},t=d?function(){try{return s}catch{try{return d(arguments,"callee").get}catch{return s}}}():s,o=e(57877)(),r=Object.getPrototypeOf||function(E){return E.__proto__},n=b("async function* () {}"),i=n?n.prototype:k,a=i?i.prototype:k,c=typeof Uint8Array>"u"?k:r(Uint8Array),p={"%AggregateError%":typeof AggregateError>"u"?k:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?k:ArrayBuffer,"%ArrayIteratorPrototype%":o?r([][Symbol.iterator]()):k,"%AsyncFromSyncIteratorPrototype%":k,"%AsyncFunction%":b("async function () {}"),"%AsyncGenerator%":i,"%AsyncGeneratorFunction%":n,"%AsyncIteratorPrototype%":a?r(a):k,"%Atomics%":typeof Atomics>"u"?k:Atomics,"%BigInt%":typeof BigInt>"u"?k:BigInt,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?k:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?k:Float32Array,"%Float64Array%":typeof Float64Array>"u"?k:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?k:FinalizationRegistry,"%Function%":l,"%GeneratorFunction%":b("function* () {}"),"%Int8Array%":typeof Int8Array>"u"?k:Int8Array,"%Int16Array%":typeof Int16Array>"u"?k:Int16Array,"%Int32Array%":typeof Int32Array>"u"?k:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":o?r(r([][Symbol.iterator]())):k,"%JSON%":"object"==typeof JSON?JSON:k,"%Map%":typeof Map>"u"?k:Map,"%MapIteratorPrototype%":typeof Map<"u"&&o?r((new Map)[Symbol.iterator]()):k,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?k:Promise,"%Proxy%":typeof Proxy>"u"?k:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?k:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?k:Set,"%SetIteratorPrototype%":typeof Set<"u"&&o?r((new Set)[Symbol.iterator]()):k,"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?k:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":o?r(""[Symbol.iterator]()):k,"%Symbol%":o?Symbol:k,"%SyntaxError%":A,"%ThrowTypeError%":t,"%TypedArray%":c,"%TypeError%":T,"%Uint8Array%":typeof Uint8Array>"u"?k:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?k:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?k:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?k:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?k:WeakMap,"%WeakRef%":typeof WeakRef>"u"?k:WeakRef,"%WeakSet%":typeof WeakSet>"u"?k:WeakSet},f={"%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"]},x=e(77575),v=e(35065),g=x.call(Function.call,Array.prototype.concat),y=x.call(Function.apply,Array.prototype.splice),h=x.call(Function.call,String.prototype.replace),m=x.call(Function.call,String.prototype.slice),w=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,u=/\\(\\)?/g;$.exports=function(E,L){if("string"!=typeof E||0===E.length)throw new T("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof L)throw new T('"allowMissing" argument must be a boolean');var C=function(E){var L=m(E,0,1),C=m(E,-1);if("%"===L&&"%"!==C)throw new A("invalid intrinsic syntax, expected closing `%`");if("%"===C&&"%"!==L)throw new A("invalid intrinsic syntax, expected opening `%`");var P=[];return h(E,w,function(I,U,z,H){P[P.length]=z?h(H,u,"$1"):U||I}),P}(E),P=C.length>0?C[0]:"",I=function(E,L){var C,P=E;if(v(f,P)&&(P="%"+(C=f[P])[0]+"%"),v(p,P)){var I=p[P];if(void 0===I&&!L)throw new T("intrinsic "+E+" exists, but is not available. Please file an issue!");return{alias:C,name:P,value:I}}throw new A("intrinsic "+E+" does not exist!")}("%"+P+"%",L),U=I.name,z=I.value,H=!1,F=I.alias;F&&(P=F[0],y(C,g([0,1],F)));for(var N=1,B=!0;N<C.length;N+=1){var j=C[N],J=m(j,0,1),G=m(j,-1);if(('"'===J||"'"===J||"`"===J||'"'===G||"'"===G||"`"===G)&&J!==G)throw new A("property names with quotes must have matching quotes");if("constructor"!==j&&B||(H=!0),v(p,U="%"+(P+="."+j)+"%"))z=p[U];else if(null!=z){if(!(j in z)){if(!L)throw new T("base intrinsic for "+E+" exists, but the property is not available.");return}if(d&&N+1>=C.length){var V=d(z,j);z=(B=!!V)&&"get"in V&&!("originalValue"in V.get)?V.get:z[j]}else B=v(z,j),z=z[j];B&&!H&&(p[U]=z)}}return z}},85400:function($){$.exports=function(R,e){var k=e[0],A=e[1],l=e[2],T=e[3],b=e[4],d=e[5],s=e[6],t=e[7],o=e[8],r=e[9],n=e[10],i=e[11],a=e[12],c=e[13],p=e[14],f=e[15];return R[0]=d*(n*f-i*p)-r*(s*f-t*p)+c*(s*i-t*n),R[1]=-(A*(n*f-i*p)-r*(l*f-T*p)+c*(l*i-T*n)),R[2]=A*(s*f-t*p)-d*(l*f-T*p)+c*(l*t-T*s),R[3]=-(A*(s*i-t*n)-d*(l*i-T*n)+r*(l*t-T*s)),R[4]=-(b*(n*f-i*p)-o*(s*f-t*p)+a*(s*i-t*n)),R[5]=k*(n*f-i*p)-o*(l*f-T*p)+a*(l*i-T*n),R[6]=-(k*(s*f-t*p)-b*(l*f-T*p)+a*(l*t-T*s)),R[7]=k*(s*i-t*n)-b*(l*i-T*n)+o*(l*t-T*s),R[8]=b*(r*f-i*c)-o*(d*f-t*c)+a*(d*i-t*r),R[9]=-(k*(r*f-i*c)-o*(A*f-T*c)+a*(A*i-T*r)),R[10]=k*(d*f-t*c)-b*(A*f-T*c)+a*(A*t-T*d),R[11]=-(k*(d*i-t*r)-b*(A*i-T*r)+o*(A*t-T*d)),R[12]=-(b*(r*p-n*c)-o*(d*p-s*c)+a*(d*n-s*r)),R[13]=k*(r*p-n*c)-o*(A*p-l*c)+a*(A*n-l*r),R[14]=-(k*(d*p-s*c)-b*(A*p-l*c)+a*(A*s-l*d)),R[15]=k*(d*n-s*r)-b*(A*n-l*r)+o*(A*s-l*d),R}},42331:function($){$.exports=function(R){var e=new Float32Array(16);return e[0]=R[0],e[1]=R[1],e[2]=R[2],e[3]=R[3],e[4]=R[4],e[5]=R[5],e[6]=R[6],e[7]=R[7],e[8]=R[8],e[9]=R[9],e[10]=R[10],e[11]=R[11],e[12]=R[12],e[13]=R[13],e[14]=R[14],e[15]=R[15],e}},31042:function($){$.exports=function(R,e){return R[0]=e[0],R[1]=e[1],R[2]=e[2],R[3]=e[3],R[4]=e[4],R[5]=e[5],R[6]=e[6],R[7]=e[7],R[8]=e[8],R[9]=e[9],R[10]=e[10],R[11]=e[11],R[12]=e[12],R[13]=e[13],R[14]=e[14],R[15]=e[15],R}},11902:function($){$.exports=function(){var R=new Float32Array(16);return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}},89887:function($){$.exports=function(R){var e=R[0],k=R[1],A=R[2],l=R[3],T=R[4],b=R[5],d=R[6],s=R[7],t=R[8],o=R[9],r=R[10],n=R[11],i=R[12],a=R[13],c=R[14],p=R[15];return(e*b-k*T)*(r*p-n*c)-(e*d-A*T)*(o*p-n*a)+(e*s-l*T)*(o*c-r*a)+(k*d-A*b)*(t*p-n*i)-(k*s-l*b)*(t*c-r*i)+(A*s-l*d)*(t*a-o*i)}},27812:function($){$.exports=function(R,e){var k=e[0],A=e[1],l=e[2],T=e[3],b=k+k,d=A+A,s=l+l,t=k*b,o=A*b,r=A*d,n=l*b,i=l*d,a=l*s,c=T*b,p=T*d,f=T*s;return R[0]=1-r-a,R[1]=o+f,R[2]=n-p,R[3]=0,R[4]=o-f,R[5]=1-t-a,R[6]=i+c,R[7]=0,R[8]=n+p,R[9]=i-c,R[10]=1-t-r,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}},34045:function($){$.exports=function(R,e,k){var A,l,T,b=k[0],d=k[1],s=k[2],t=Math.sqrt(b*b+d*d+s*s);return Math.abs(t)<1e-6?null:(b*=t=1/t,d*=t,s*=t,A=Math.sin(e),T=1-(l=Math.cos(e)),R[0]=b*b*T+l,R[1]=d*b*T+s*A,R[2]=s*b*T-d*A,R[3]=0,R[4]=b*d*T-s*A,R[5]=d*d*T+l,R[6]=s*d*T+b*A,R[7]=0,R[8]=b*s*T+d*A,R[9]=d*s*T-b*A,R[10]=s*s*T+l,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R)}},45973:function($){$.exports=function(R,e,k){var A=e[0],l=e[1],T=e[2],b=e[3],d=A+A,s=l+l,t=T+T,o=A*d,r=A*s,n=A*t,i=l*s,a=l*t,c=T*t,p=b*d,f=b*s,x=b*t;return R[0]=1-(i+c),R[1]=r+x,R[2]=n-f,R[3]=0,R[4]=r-x,R[5]=1-(o+c),R[6]=a+p,R[7]=0,R[8]=n+f,R[9]=a-p,R[10]=1-(o+i),R[11]=0,R[12]=k[0],R[13]=k[1],R[14]=k[2],R[15]=1,R}},81472:function($){$.exports=function(R,e){return R[0]=e[0],R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=e[1],R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=e[2],R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}},14669:function($){$.exports=function(R,e){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=e[0],R[13]=e[1],R[14]=e[2],R[15]=1,R}},75262:function($){$.exports=function(R,e){var k=Math.sin(e),A=Math.cos(e);return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=A,R[6]=k,R[7]=0,R[8]=0,R[9]=-k,R[10]=A,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}},331:function($){$.exports=function(R,e){var k=Math.sin(e),A=Math.cos(e);return R[0]=A,R[1]=0,R[2]=-k,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=k,R[9]=0,R[10]=A,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}},11049:function($){$.exports=function(R,e){var k=Math.sin(e),A=Math.cos(e);return R[0]=A,R[1]=k,R[2]=0,R[3]=0,R[4]=-k,R[5]=A,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}},75195:function($){$.exports=function(R,e,k,A,l,T,b){var d=1/(k-e),s=1/(l-A),t=1/(T-b);return R[0]=2*T*d,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=2*T*s,R[6]=0,R[7]=0,R[8]=(k+e)*d,R[9]=(l+A)*s,R[10]=(b+T)*t,R[11]=-1,R[12]=0,R[13]=0,R[14]=b*T*2*t,R[15]=0,R}},71551:function($){$.exports=function(R){return R[0]=1,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=1,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=1,R[11]=0,R[12]=0,R[13]=0,R[14]=0,R[15]=1,R}},79576:function($,R,e){$.exports={create:e(11902),clone:e(42331),copy:e(31042),identity:e(71551),transpose:e(88654),invert:e(95874),adjoint:e(85400),determinant:e(89887),multiply:e(91362),translate:e(31283),scale:e(10789),rotate:e(65074),rotateX:e(35545),rotateY:e(94918),rotateZ:e(15692),fromRotation:e(34045),fromRotationTranslation:e(45973),fromScaling:e(81472),fromTranslation:e(14669),fromXRotation:e(75262),fromYRotation:e(331),fromZRotation:e(11049),fromQuat:e(27812),frustum:e(75195),perspective:e(7864),perspectiveFromFieldOfView:e(35279),ortho:e(60378),lookAt:e(65551),str:e(6726)}},95874:function($){$.exports=function(R,e){var k=e[0],A=e[1],l=e[2],T=e[3],b=e[4],d=e[5],s=e[6],t=e[7],o=e[8],r=e[9],n=e[10],i=e[11],a=e[12],c=e[13],p=e[14],f=e[15],x=k*d-A*b,v=k*s-l*b,g=k*t-T*b,y=A*s-l*d,h=A*t-T*d,m=l*t-T*s,w=o*c-r*a,u=o*p-n*a,S=o*f-i*a,_=r*p-n*c,E=r*f-i*c,L=n*f-i*p,C=x*L-v*E+g*_+y*S-h*u+m*w;return C?(R[0]=(d*L-s*E+t*_)*(C=1/C),R[1]=(l*E-A*L-T*_)*C,R[2]=(c*m-p*h+f*y)*C,R[3]=(n*h-r*m-i*y)*C,R[4]=(s*S-b*L-t*u)*C,R[5]=(k*L-l*S+T*u)*C,R[6]=(p*g-a*m-f*v)*C,R[7]=(o*m-n*g+i*v)*C,R[8]=(b*E-d*S+t*w)*C,R[9]=(A*S-k*E-T*w)*C,R[10]=(a*h-c*g+f*x)*C,R[11]=(r*g-o*h-i*x)*C,R[12]=(d*u-b*_-s*w)*C,R[13]=(k*_-A*u+l*w)*C,R[14]=(c*v-a*y-p*x)*C,R[15]=(o*y-r*v+n*x)*C,R):null}},65551:function($,R,e){var k=e(71551);$.exports=function(A,l,T,b){var d,s,t,o,r,n,i,a,c,p,f=l[0],x=l[1],v=l[2],g=b[0],y=b[1],h=b[2],m=T[0],w=T[1],u=T[2];return Math.abs(f-m)<1e-6&&Math.abs(x-w)<1e-6&&Math.abs(v-u)<1e-6?k(A):(i=f-m,a=x-w,c=v-u,d=y*(c*=p=1/Math.sqrt(i*i+a*a+c*c))-h*(a*=p),s=h*(i*=p)-g*c,t=g*a-y*i,(p=Math.sqrt(d*d+s*s+t*t))?(d*=p=1/p,s*=p,t*=p):(d=0,s=0,t=0),o=a*t-c*s,r=c*d-i*t,n=i*s-a*d,(p=Math.sqrt(o*o+r*r+n*n))?(o*=p=1/p,r*=p,n*=p):(o=0,r=0,n=0),A[0]=d,A[1]=o,A[2]=i,A[3]=0,A[4]=s,A[5]=r,A[6]=a,A[7]=0,A[8]=t,A[9]=n,A[10]=c,A[11]=0,A[12]=-(d*f+s*x+t*v),A[13]=-(o*f+r*x+n*v),A[14]=-(i*f+a*x+c*v),A[15]=1,A)}},91362:function($){$.exports=function(R,e,k){var A=e[0],l=e[1],T=e[2],b=e[3],d=e[4],s=e[5],t=e[6],o=e[7],r=e[8],n=e[9],i=e[10],a=e[11],c=e[12],p=e[13],f=e[14],x=e[15],v=k[0],g=k[1],y=k[2],h=k[3];return R[0]=v*A+g*d+y*r+h*c,R[1]=v*l+g*s+y*n+h*p,R[2]=v*T+g*t+y*i+h*f,R[3]=v*b+g*o+y*a+h*x,R[4]=(v=k[4])*A+(g=k[5])*d+(y=k[6])*r+(h=k[7])*c,R[5]=v*l+g*s+y*n+h*p,R[6]=v*T+g*t+y*i+h*f,R[7]=v*b+g*o+y*a+h*x,R[8]=(v=k[8])*A+(g=k[9])*d+(y=k[10])*r+(h=k[11])*c,R[9]=v*l+g*s+y*n+h*p,R[10]=v*T+g*t+y*i+h*f,R[11]=v*b+g*o+y*a+h*x,R[12]=(v=k[12])*A+(g=k[13])*d+(y=k[14])*r+(h=k[15])*c,R[13]=v*l+g*s+y*n+h*p,R[14]=v*T+g*t+y*i+h*f,R[15]=v*b+g*o+y*a+h*x,R}},60378:function($){$.exports=function(R,e,k,A,l,T,b){var d=1/(e-k),s=1/(A-l),t=1/(T-b);return R[0]=-2*d,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=-2*s,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=2*t,R[11]=0,R[12]=(e+k)*d,R[13]=(l+A)*s,R[14]=(b+T)*t,R[15]=1,R}},7864:function($){$.exports=function(R,e,k,A,l){var T=1/Math.tan(e/2),b=1/(A-l);return R[0]=T/k,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=T,R[6]=0,R[7]=0,R[8]=0,R[9]=0,R[10]=(l+A)*b,R[11]=-1,R[12]=0,R[13]=0,R[14]=2*l*A*b,R[15]=0,R}},35279:function($){$.exports=function(R,e,k,A){var l=Math.tan(e.upDegrees*Math.PI/180),T=Math.tan(e.downDegrees*Math.PI/180),b=Math.tan(e.leftDegrees*Math.PI/180),d=Math.tan(e.rightDegrees*Math.PI/180),s=2/(b+d),t=2/(l+T);return R[0]=s,R[1]=0,R[2]=0,R[3]=0,R[4]=0,R[5]=t,R[6]=0,R[7]=0,R[8]=-(b-d)*s*.5,R[9]=(l-T)*t*.5,R[10]=A/(k-A),R[11]=-1,R[12]=0,R[13]=0,R[14]=A*k/(k-A),R[15]=0,R}},65074:function($){$.exports=function(R,e,k,A){var l,T,b,d,s,t,o,r,n,i,a,c,p,f,x,v,g,y,h,m,w,u,S,_,E=A[0],L=A[1],C=A[2],P=Math.sqrt(E*E+L*L+C*C);return Math.abs(P)<1e-6?null:(E*=P=1/P,L*=P,C*=P,l=Math.sin(k),b=1-(T=Math.cos(k)),s=e[1],t=e[2],o=e[3],n=e[5],i=e[6],a=e[7],p=e[9],f=e[10],x=e[11],h=E*L*b-C*l,m=L*L*b+T,w=C*L*b+E*l,u=E*C*b+L*l,S=L*C*b-E*l,_=C*C*b+T,R[0]=(d=e[0])*(v=E*E*b+T)+(r=e[4])*(g=L*E*b+C*l)+(c=e[8])*(y=C*E*b-L*l),R[1]=s*v+n*g+p*y,R[2]=t*v+i*g+f*y,R[3]=o*v+a*g+x*y,R[4]=d*h+r*m+c*w,R[5]=s*h+n*m+p*w,R[6]=t*h+i*m+f*w,R[7]=o*h+a*m+x*w,R[8]=d*u+r*S+c*_,R[9]=s*u+n*S+p*_,R[10]=t*u+i*S+f*_,R[11]=o*u+a*S+x*_,e!==R&&(R[12]=e[12],R[13]=e[13],R[14]=e[14],R[15]=e[15]),R)}},35545:function($){$.exports=function(R,e,k){var A=Math.sin(k),l=Math.cos(k),T=e[4],b=e[5],d=e[6],s=e[7],t=e[8],o=e[9],r=e[10],n=e[11];return e!==R&&(R[0]=e[0],R[1]=e[1],R[2]=e[2],R[3]=e[3],R[12]=e[12],R[13]=e[13],R[14]=e[14],R[15]=e[15]),R[4]=T*l+t*A,R[5]=b*l+o*A,R[6]=d*l+r*A,R[7]=s*l+n*A,R[8]=t*l-T*A,R[9]=o*l-b*A,R[10]=r*l-d*A,R[11]=n*l-s*A,R}},94918:function($){$.exports=function(R,e,k){var A=Math.sin(k),l=Math.cos(k),T=e[0],b=e[1],d=e[2],s=e[3],t=e[8],o=e[9],r=e[10],n=e[11];return e!==R&&(R[4]=e[4],R[5]=e[5],R[6]=e[6],R[7]=e[7],R[12]=e[12],R[13]=e[13],R[14]=e[14],R[15]=e[15]),R[0]=T*l-t*A,R[1]=b*l-o*A,R[2]=d*l-r*A,R[3]=s*l-n*A,R[8]=T*A+t*l,R[9]=b*A+o*l,R[10]=d*A+r*l,R[11]=s*A+n*l,R}},15692:function($){$.exports=function(R,e,k){var A=Math.sin(k),l=Math.cos(k),T=e[0],b=e[1],d=e[2],s=e[3],t=e[4],o=e[5],r=e[6],n=e[7];return e!==R&&(R[8]=e[8],R[9]=e[9],R[10]=e[10],R[11]=e[11],R[12]=e[12],R[13]=e[13],R[14]=e[14],R[15]=e[15]),R[0]=T*l+t*A,R[1]=b*l+o*A,R[2]=d*l+r*A,R[3]=s*l+n*A,R[4]=t*l-T*A,R[5]=o*l-b*A,R[6]=r*l-d*A,R[7]=n*l-s*A,R}},10789:function($){$.exports=function(R,e,k){var A=k[0],l=k[1],T=k[2];return R[0]=e[0]*A,R[1]=e[1]*A,R[2]=e[2]*A,R[3]=e[3]*A,R[4]=e[4]*l,R[5]=e[5]*l,R[6]=e[6]*l,R[7]=e[7]*l,R[8]=e[8]*T,R[9]=e[9]*T,R[10]=e[10]*T,R[11]=e[11]*T,R[12]=e[12],R[13]=e[13],R[14]=e[14],R[15]=e[15],R}},6726:function($){$.exports=function(R){return"mat4("+R[0]+", "+R[1]+", "+R[2]+", "+R[3]+", "+R[4]+", "+R[5]+", "+R[6]+", "+R[7]+", "+R[8]+", "+R[9]+", "+R[10]+", "+R[11]+", "+R[12]+", "+R[13]+", "+R[14]+", "+R[15]+")"}},31283:function($){$.exports=function(R,e,k){var A,l,T,b,d,s,t,o,r,n,i,a,c=k[0],p=k[1],f=k[2];return e===R?(R[12]=e[0]*c+e[4]*p+e[8]*f+e[12],R[13]=e[1]*c+e[5]*p+e[9]*f+e[13],R[14]=e[2]*c+e[6]*p+e[10]*f+e[14],R[15]=e[3]*c+e[7]*p+e[11]*f+e[15]):(l=e[1],T=e[2],b=e[3],d=e[4],s=e[5],t=e[6],o=e[7],r=e[8],n=e[9],i=e[10],a=e[11],R[0]=A=e[0],R[1]=l,R[2]=T,R[3]=b,R[4]=d,R[5]=s,R[6]=t,R[7]=o,R[8]=r,R[9]=n,R[10]=i,R[11]=a,R[12]=A*c+d*p+r*f+e[12],R[13]=l*c+s*p+n*f+e[13],R[14]=T*c+t*p+i*f+e[14],R[15]=b*c+o*p+a*f+e[15]),R}},88654:function($){$.exports=function(R,e){if(R===e){var k=e[1],A=e[2],l=e[3],T=e[6],b=e[7],d=e[11];R[1]=e[4],R[2]=e[8],R[3]=e[12],R[4]=k,R[6]=e[9],R[7]=e[13],R[8]=A,R[9]=T,R[11]=e[14],R[12]=l,R[13]=b,R[14]=d}else R[0]=e[0],R[1]=e[4],R[2]=e[8],R[3]=e[12],R[4]=e[1],R[5]=e[5],R[6]=e[9],R[7]=e[13],R[8]=e[2],R[9]=e[6],R[10]=e[10],R[11]=e[14],R[12]=e[3],R[13]=e[7],R[14]=e[11],R[15]=e[15];return R}},42505:function($,R,e){"use strict";var k=e(72791),A=e(71299),l=e(98580),T=e(12018),b=e(83522),d=e(25075),s=e(68016),t=e(58404),o=e(18863),r=e(10973),n=e(25677),i=e(75686),a=e(53545),c=e(56131),p=e(32879),f=e(30120),x=e(13547).nextPow2,v=new b,g=!1;if(document.body){var y=document.body.appendChild(document.createElement("div"));y.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(y).fontStretch&&(g=!0),document.body.removeChild(y)}var h=function(m){var w;this.gl="function"==typeof(w=m)&&w._gl&&w.prop&&w.texture&&w.buffer?(m={regl:m}).regl._gl:T(m),this.shader=v.get(this.gl),this.regl=this.shader?this.shader.regl:m.regl||l({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(),v.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(r(m)?m:{})};h.prototype.createShader=function(){var m=this.regl,w=m({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:m.prop("count"),offset:m.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:m.this("sizeBuffer")},width:{offset:0,stride:8,buffer:m.this("sizeBuffer")},char:m.this("charBuffer"),position:m.this("position")},uniforms:{atlasSize:function(u,S){return[S.atlas.width,S.atlas.height]},atlasDim:function(u,S){return[S.atlas.cols,S.atlas.rows]},atlas:function(u,S){return S.atlas.texture},charStep:function(u,S){return S.atlas.step},em:function(u,S){return S.atlas.em},color:m.prop("color"),opacity:m.prop("opacity"),viewport:m.this("viewportArray"),scale:m.this("scale"),align:m.prop("align"),baseline:m.prop("baseline"),translate:m.this("translate"),positionOffset:m.prop("positionOffset")},primitive:"points",viewport:m.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:m,draw:w,atlas:{}}},h.prototype.update=function(m){var w=this;if("string"==typeof m)m={text:m};else if(!m)return;null!=(m=A(m,{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&&(this.opacity=Array.isArray(m.opacity)?m.opacity.map(function(Q){return parseFloat(Q)}):parseFloat(m.opacity)),null!=m.viewport&&(this.viewport=o(m.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!=m.kerning&&(this.kerning=m.kerning),null!=m.offset&&("number"==typeof m.offset&&(m.offset=[m.offset,0]),this.positionOffset=f(m.offset)),m.direction&&(this.direction=m.direction),m.range&&(this.range=m.range,this.scale=[1/(m.range[2]-m.range[0]),1/(m.range[3]-m.range[1])],this.translate=[-m.range[0],-m.range[1]]),m.scale&&(this.scale=m.scale),m.translate&&(this.translate=m.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),this.font.length||m.font||(m.font=h.baseFontSize+"px sans-serif");var u,S=!1,_=!1;if(m.font&&(Array.isArray(m.font)?m.font:[m.font]).forEach(function(Q,se){if("string"==typeof Q)try{Q=k.parse(Q)}catch{Q=k.parse(h.baseFontSize+"px "+Q)}else Q=k.parse(k.stringify(Q));var fe=k.stringify({size:h.baseFontSize,family:Q.family,stretch:g?Q.stretch:void 0,variant:Q.variant,weight:Q.weight,style:Q.style}),ye=n(Q.size),Me=Math.round(ye[0]*i(ye[1]));if(Me!==w.fontSize[se]&&(_=!0,w.fontSize[se]=Me),!(w.font[se]&&fe==w.font[se].baseString||(S=!0,w.font[se]=h.fonts[fe],w.font[se]))){var Ie=Q.family.join(", "),Ce=[Q.style];Q.style!=Q.variant&&Ce.push(Q.variant),Q.variant!=Q.weight&&Ce.push(Q.weight),g&&Q.weight!=Q.stretch&&Ce.push(Q.stretch),w.font[se]={baseString:fe,family:Ie,weight:Q.weight,stretch:Q.stretch,style:Q.style,variant:Q.variant,width:{},kerning:{},metrics:p(Ie,{origin:"top",fontSize:h.baseFontSize,fontStyle:Ce.join(" ")})},h.fonts[fe]=w.font[se]}}),(S||_)&&this.font.forEach(function(Q,se){var fe=k.stringify({size:w.fontSize[se],family:Q.family,stretch:g?Q.stretch:void 0,variant:Q.variant,weight:Q.weight,style:Q.style});w.fontAtlas[se]=w.shader.atlas[fe],w.fontAtlas[se]||(w.shader.atlas[fe]=w.fontAtlas[se]={fontString:fe,step:2*Math.ceil(w.fontSize[se]*Q.metrics.bottom*.5),em:w.fontSize[se],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:w.regl.texture()}),null==m.text&&(m.text=w.text)}),"string"==typeof m.text&&m.position&&m.position.length>2){for(var E=Array(.5*m.position.length),L=0;L<E.length;L++)E[L]=m.text;m.text=E}if(null!=m.text||S){if(this.textOffsets=[0],Array.isArray(m.text)){this.count=m.text[0].length,this.counts=[this.count];for(var C=1;C<m.text.length;C++)this.textOffsets[C]=this.textOffsets[C-1]+m.text[C-1].length,this.count+=m.text[C].length,this.counts.push(m.text[C].length);this.text=m.text.join("")}else this.text=m.text,this.count=this.text.length,this.counts=[this.count];u=[],this.font.forEach(function(Q,se){h.atlasContext.font=Q.baseString;for(var fe=w.fontAtlas[se],ye=0;ye<w.text.length;ye++){var Me=w.text.charAt(ye);if(null==fe.ids[Me]&&(fe.ids[Me]=fe.chars.length,fe.chars.push(Me),u.push(Me)),null==Q.width[Me]&&(Q.width[Me]=h.atlasContext.measureText(Me).width/h.baseFontSize,w.kerning)){var Ie=[];for(var Ce in Q.width)Ie.push(Ce+Me,Me+Ce);c(Q.kerning,a(Q.family,{pairs:Ie}))}}})}if(m.position)if(m.position.length>2){for(var P=!m.position[0].length,I=t.mallocFloat(2*this.count),U=0,z=0;U<this.counts.length;U++){var H=this.counts[U];if(P)for(var F=0;F<H;F++)I[z++]=m.position[2*U],I[z++]=m.position[2*U+1];else for(var N=0;N<H;N++)I[z++]=m.position[U][0],I[z++]=m.position[U][1]}this.position.call?this.position({type:"float",data:I}):this.position=this.regl.buffer({type:"float",data:I}),t.freeFloat(I)}else this.position.destroy&&this.position.destroy(),this.position={constant:m.position};if(m.text||S){var B=t.mallocUint8(this.count),j=t.mallocFloat(2*this.count);this.textWidth=[];for(var J=0,G=0;J<this.counts.length;J++){for(var V=this.counts[J],W=this.font[J]||this.font[0],X=this.fontAtlas[J]||this.fontAtlas[0],K=0;K<V;K++){var re=this.text.charAt(G),ee=this.text.charAt(G-1);if(B[G]=X.ids[re],j[2*G]=W.width[re],K){var ce=j[2*G-1]+.5*j[2*G-2]+.5*j[2*G];if(this.kerning){var me=W.kerning[ee+re];me&&(ce+=.001*me)}j[2*G+1]=ce}else j[2*G+1]=.5*j[2*G];G++}this.textWidth.push(j.length?.5*j[2*G-2]+j[2*G-1]:0)}m.align||(m.align=this.align),this.charBuffer({data:B,type:"uint8",usage:"stream"}),this.sizeBuffer({data:j,type:"float",usage:"stream"}),t.freeUint8(B),t.freeFloat(j),u.length&&this.font.forEach(function(Q,se){var fe=w.fontAtlas[se],ye=fe.step,Me=Math.floor(h.maxAtlasSize/ye),Ie=Math.min(Me,fe.chars.length),Ce=Math.ceil(fe.chars.length/Ie),Re=x(Ie*ye),le=x(Ce*ye);fe.width=Re,fe.height=le,fe.rows=Ce,fe.cols=Ie,fe.em&&fe.texture({data:s({canvas:h.atlasCanvas,font:fe.fontString,chars:fe.chars,shape:[Re,le],step:[ye,ye]})})})}if(m.align&&(this.align=m.align,this.alignOffset=this.textWidth.map(function(Q,se){var fe=Array.isArray(w.align)?w.align.length>1?w.align[se]:w.align[0]:w.align;if("number"==typeof fe)return fe;switch(fe){case"right":case"end":return-Q;case"center":case"centre":case"middle":return.5*-Q}return 0})),null==this.baseline&&null==m.baseline&&(m.baseline=0),null!=m.baseline&&(this.baseline=m.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Q,se){var fe=(w.font[se]||w.font[0]).metrics,ye=0;return-1*((ye+=.5*fe.bottom)+("number"==typeof Q?Q-fe.baseline:-fe[Q]))})),null!=m.color)if(m.color||(m.color="transparent"),"string"!=typeof m.color&&isNaN(m.color)){var de;if("number"==typeof m.color[0]&&m.color.length>this.counts.length){var he=m.color.length;de=t.mallocUint8(he);for(var ve=(m.color.subarray||m.color.slice).bind(m.color),Pe=0;Pe<he;Pe+=4)de.set(d(ve(Pe,Pe+4),"uint8"),Pe)}else{var xe=m.color.length;de=t.mallocUint8(4*xe);for(var ke=0;ke<xe;ke++)de.set(d(m.color[ke]||0,"uint8"),4*ke)}this.color=de}else this.color=d(m.color,"uint8");if(m.position||m.text||m.color||m.baseline||m.align||m.font||m.offset||m.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 Ae=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(Ae);for(var Te=0;Te<this.batch.length;Te++)this.batch[Te]={count:this.counts.length>1?this.counts[Te]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[Te]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(4*Te,4*Te+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[Te]:this.opacity,baseline:null!=this.baselineOffset[Te]?this.baselineOffset[Te]:this.baselineOffset[0],align:this.align?null!=this.alignOffset[Te]?this.alignOffset[Te]:this.alignOffset[0]:0,atlas:this.fontAtlas[Te]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(2*Te,2*Te+2):this.positionOffset}}else this.batch=this.count?[{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}]:[]},h.prototype.destroy=function(){},h.prototype.kerning=!0,h.prototype.position={constant:new Float32Array(2)},h.prototype.translate=null,h.prototype.scale=null,h.prototype.font=null,h.prototype.text="",h.prototype.positionOffset=[0,0],h.prototype.opacity=1,h.prototype.color=new Uint8Array([0,0,0,255]),h.prototype.alignOffset=[0,0],h.maxAtlasSize=1024,h.atlasCanvas=document.createElement("canvas"),h.atlasContext=h.atlasCanvas.getContext("2d",{alpha:!1}),h.baseFontSize=64,h.fonts={},$.exports=h},12018:function($,R,e){"use strict";var k=e(71299);function A(b){if(b.container)if(b.container==document.body)document.body.style.width||(b.canvas.width=b.width||b.pixelRatio*e.g.innerWidth),document.body.style.height||(b.canvas.height=b.height||b.pixelRatio*e.g.innerHeight);else{var d=b.container.getBoundingClientRect();b.canvas.width=b.width||d.right-d.left,b.canvas.height=b.height||d.bottom-d.top}}function l(b){return"function"==typeof b.getContext&&"width"in b&&"height"in b}function T(){var b=document.createElement("canvas");return b.style.position="absolute",b.style.top=0,b.style.left=0,b}$.exports=function(b){var d,t;if(b?"string"==typeof b&&(b={container:b}):b={},(b=l(b)||"string"==typeof(d=b).nodeName&&"function"==typeof d.appendChild&&"function"==typeof d.getBoundingClientRect?{container:b}:(t=b,"function"==typeof t.drawArrays||"function"==typeof t.drawElements?{gl:b}:k(b,{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||(b.pixelRatio=e.g.pixelRatio||1),b.gl)return b.gl;if(b.canvas&&(b.container=b.canvas.parentNode),b.container){if("string"==typeof b.container){var s=document.querySelector(b.container);if(!s)throw Error("Element "+b.container+" is not found");b.container=s}l(b.container)?(b.canvas=b.container,b.container=b.canvas.parentNode):b.canvas||(b.canvas=T(),b.container.appendChild(b.canvas),A(b))}else if(!b.canvas){if(typeof document>"u")throw Error("Not DOM environment. Use headless-gl.");b.container=document.body||document.documentElement,b.canvas=T(),b.container.appendChild(b.canvas),A(b)}return b.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(t){try{b.gl=b.canvas.getContext(t,b.attrs)}catch{}return b.gl}),b.gl}},56068:function($){$.exports=function(R){"string"==typeof R&&(R=[R]);for(var e=[].slice.call(arguments,1),k=[],A=0;A<R.length-1;A++)k.push(R[A],e[A]||"");return k.push(R[A]),k.join("")}},57035:function($,R,e){"use strict";var k,A=e(54404);k="function"==typeof e.g.matchMedia?!e.g.matchMedia("(hover: none)").matches:A,$.exports=k},38520:function($,R,e){"use strict";var k=e(54404);$.exports=k&&function(){var A=!1;try{var l=Object.defineProperty({},"passive",{get:function(){A=!0}});window.addEventListener("test",null,l),window.removeEventListener("test",null,l)}catch{A=!1}return A}()},57877:function($,R,e){"use strict";var k=typeof Symbol<"u"&&Symbol,A=e(35638);$.exports=function(){return"function"==typeof k&&"function"==typeof Symbol&&"symbol"==typeof k("foo")&&"symbol"==typeof Symbol("bar")&&A()}},35638:function($){"use strict";$.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var R={},e=Symbol("test"),k=Object(e);if("string"==typeof e||"[object Symbol]"!==Object.prototype.toString.call(e)||"[object Symbol]"!==Object.prototype.toString.call(k))return!1;for(e in R[e]=42,R)return!1;if("function"==typeof Object.keys&&0!==Object.keys(R).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(R).length)return!1;var A=Object.getOwnPropertySymbols(R);if(1!==A.length||A[0]!==e||!Object.prototype.propertyIsEnumerable.call(R,e))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var l=Object.getOwnPropertyDescriptor(R,e);if(42!==l.value||!0!==l.enumerable)return!1}return!0}},84543:function($,R,e){"use strict";var k=e(35638);$.exports=function(){return k()&&!!Symbol.toStringTag}},35065:function($,R,e){"use strict";var k=e(77575);$.exports=k.call(Function.call,Object.prototype.hasOwnProperty)},95280:function($,R){R.read=function(e,k,A,l,T){var b,d,s=8*T-l-1,t=(1<<s)-1,o=t>>1,r=-7,n=A?T-1:0,i=A?-1:1,a=e[k+n];for(n+=i,b=a&(1<<-r)-1,a>>=-r,r+=s;r>0;b=256*b+e[k+n],n+=i,r-=8);for(d=b&(1<<-r)-1,b>>=-r,r+=l;r>0;d=256*d+e[k+n],n+=i,r-=8);if(0===b)b=1-o;else{if(b===t)return d?NaN:1/0*(a?-1:1);d+=Math.pow(2,l),b-=o}return(a?-1:1)*d*Math.pow(2,b-l)},R.write=function(e,k,A,l,T,b){var d,s,t,o=8*b-T-1,r=(1<<o)-1,n=r>>1,i=23===T?Math.pow(2,-24)-Math.pow(2,-77):0,a=l?0:b-1,c=l?1:-1,p=k<0||0===k&&1/k<0?1:0;for(k=Math.abs(k),isNaN(k)||k===1/0?(s=isNaN(k)?1:0,d=r):(d=Math.floor(Math.log(k)/Math.LN2),k*(t=Math.pow(2,-d))<1&&(d--,t*=2),(k+=d+n>=1?i/t:i*Math.pow(2,1-n))*t>=2&&(d++,t/=2),d+n>=r?(s=0,d=r):d+n>=1?(s=(k*t-1)*Math.pow(2,T),d+=n):(s=k*Math.pow(2,n-1)*Math.pow(2,T),d=0));T>=8;e[A+a]=255&s,a+=c,s/=256,T-=8);for(d=d<<T|s,o+=T;o>0;e[A+a]=255&d,a+=c,d/=256,o-=8);e[A+a-c]|=128*p}},42018:function($){$.exports="function"==typeof Object.create?function(R,e){e&&(R.super_=e,R.prototype=Object.create(e.prototype,{constructor:{value:R,enumerable:!1,writable:!0,configurable:!0}}))}:function(R,e){if(e){R.super_=e;var k=function(){};k.prototype=e.prototype,R.prototype=new k,R.prototype.constructor=R}}},47216:function($){"use strict";var R="function"==typeof Symbol&&"symbol"==typeof Symbol.toStringTag,e=Object.prototype.toString,k=function(T){return!(R&&T&&"object"==typeof T&&Symbol.toStringTag in T)&&"[object Arguments]"===e.call(T)},A=function(T){return!!k(T)||null!==T&&"object"==typeof T&&"number"==typeof T.length&&T.length>=0&&"[object Array]"!==e.call(T)&&"[object Function]"===e.call(T.callee)},l=function(){return k(arguments)}();k.isLegacyArguments=A,$.exports=l?k:A},54404:function($){$.exports=!0},65481:function($,R,e){"use strict";var k,A=Object.prototype.toString,l=Function.prototype.toString,T=/^\s*(?:function)?\*/,b=e(84543)(),d=Object.getPrototypeOf;$.exports=function(s){if("function"!=typeof s)return!1;if(T.test(l.call(s)))return!0;if(!b)return"[object GeneratorFunction]"===A.call(s);if(!d)return!1;if(void 0===k){var t=function(){if(!b)return!1;try{return Function("return function*() {}")()}catch{}}();k=!!t&&d(t)}return d(s)===k}},62683:function($){"use strict";$.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},64274:function($){"use strict";$.exports=function(R){return R!=R}},15567:function($,R,e){"use strict";var k=e(68222),A=e(17045),l=e(64274),T=e(14922),b=e(22442),d=k(T(),Number);A(d,{getPolyfill:T,implementation:l,shim:b}),$.exports=d},14922:function($,R,e){"use strict";var k=e(64274);$.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:k}},22442:function($,R,e){"use strict";var k=e(17045),A=e(14922);$.exports=function(){var l=A();return k(Number,{isNaN:l},{isNaN:function(){return Number.isNaN!==l}}),l}},64941:function($){"use strict";$.exports=function(R){var e=typeof R;return null!==R&&("object"===e||"function"===e)}},10973:function($){"use strict";var R=Object.prototype.toString;$.exports=function(e){var k;return"[object Object]"===R.call(e)&&(null===(k=Object.getPrototypeOf(e))||k===Object.getPrototypeOf({}))}},18546:function($){"use strict";$.exports=function(R){for(var e,k=R.length,A=0;A<k;A++)if(((e=R.charCodeAt(A))<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}},89546:function($){"use strict";$.exports=function(R){return"string"==typeof R&&(R=R.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(R)&&/[\dz]$/i.test(R)&&R.length>4))}},9187:function($,R,e){"use strict";var k=e(86165),A=e(72077),l=e(92978),T=l("Object.prototype.toString"),b=e(57877)()&&"symbol"==typeof Symbol.toStringTag,d=A(),s=l("Array.prototype.indexOf",!0)||function(i,a){for(var c=0;c<i.length;c+=1)if(i[c]===a)return c;return-1},t=l("String.prototype.slice"),o={},r=e(67295),n=Object.getPrototypeOf;b&&r&&n&&k(d,function(i){var a=new e.g[i];if(!(Symbol.toStringTag in a))throw new EvalError("this engine has support for Symbol.toStringTag, but "+i+" does not have the property! Please report this.");var c=n(a),p=r(c,Symbol.toStringTag);if(!p){var f=n(c);p=r(f,Symbol.toStringTag)}o[i]=p.get}),$.exports=function(i){if(!i||"object"!=typeof i)return!1;if(!b){var a=t(T(i),8,-1);return s(d,a)>-1}return!!r&&(c=i,p=!1,k(o,function(f,x){if(!p)try{p=f.call(c)===x}catch{}}),p);var c,p}},44517:function($){$.exports=function(){"use strict";var R,e,k;function A(l,T){if(R)if(e){var b="var sharedChunk = {}; ("+R+")(sharedChunk); ("+e+")(sharedChunk);",d={};R(d),(k=T(d)).workerUrl=window.URL.createObjectURL(new Blob([b],{type:"text/javascript"}))}else e=T;else R=T}return A(0,function(l){function T(M,O){return M(O={exports:{}},O.exports),O.exports}var b="1.10.1",d=s;function s(M,O,Z,ae){this.cx=3*M,this.bx=3*(Z-M)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*O,this.by=3*(ae-O)-this.cy,this.ay=1-this.cy-this.by,this.p1x=M,this.p1y=ae,this.p2x=Z,this.p2y=ae}s.prototype.sampleCurveX=function(M){return((this.ax*M+this.bx)*M+this.cx)*M},s.prototype.sampleCurveY=function(M){return((this.ay*M+this.by)*M+this.cy)*M},s.prototype.sampleCurveDerivativeX=function(M){return(3*this.ax*M+2*this.bx)*M+this.cx},s.prototype.solveCurveX=function(M,O){var Z,ae,be,Ee,je;for(void 0===O&&(O=1e-6),be=M,je=0;je<8;je++){if(Ee=this.sampleCurveX(be)-M,Math.abs(Ee)<O)return be;var Qe=this.sampleCurveDerivativeX(be);if(Math.abs(Qe)<1e-6)break;be-=Ee/Qe}if((be=M)<(Z=0))return Z;if(be>(ae=1))return ae;for(;Z<ae;){if(Ee=this.sampleCurveX(be),Math.abs(Ee-M)<O)return be;M>Ee?Z=be:ae=be,be=.5*(ae-Z)+Z}return be},s.prototype.solve=function(M,O){return this.sampleCurveY(this.solveCurveX(M,O))};var t=o;function o(M,O){this.x=M,this.y=O}function r(M,O,Z,ae){var be=new d(M,O,Z,ae);return function(Ee){return be.solve(Ee)}}o.prototype={clone:function(){return new o(this.x,this.y)},add:function(M){return this.clone()._add(M)},sub:function(M){return this.clone()._sub(M)},multByPoint:function(M){return this.clone()._multByPoint(M)},divByPoint:function(M){return this.clone()._divByPoint(M)},mult:function(M){return this.clone()._mult(M)},div:function(M){return this.clone()._div(M)},rotate:function(M){return this.clone()._rotate(M)},rotateAround:function(M,O){return this.clone()._rotateAround(M,O)},matMult:function(M){return this.clone()._matMult(M)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(M){return this.x===M.x&&this.y===M.y},dist:function(M){return Math.sqrt(this.distSqr(M))},distSqr:function(M){var O=M.x-this.x,Z=M.y-this.y;return O*O+Z*Z},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(M){return Math.atan2(this.y-M.y,this.x-M.x)},angleWith:function(M){return this.angleWithSep(M.x,M.y)},angleWithSep:function(M,O){return Math.atan2(this.x*O-this.y*M,this.x*M+this.y*O)},_matMult:function(M){var Z=M[2]*this.x+M[3]*this.y;return this.x=M[0]*this.x+M[1]*this.y,this.y=Z,this},_add:function(M){return this.x+=M.x,this.y+=M.y,this},_sub:function(M){return this.x-=M.x,this.y-=M.y,this},_mult:function(M){return this.x*=M,this.y*=M,this},_div:function(M){return this.x/=M,this.y/=M,this},_multByPoint:function(M){return this.x*=M.x,this.y*=M.y,this},_divByPoint:function(M){return this.x/=M.x,this.y/=M.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var M=this.y;return this.y=this.x,this.x=-M,this},_rotate:function(M){var O=Math.cos(M),Z=Math.sin(M),be=Z*this.x+O*this.y;return this.x=O*this.x-Z*this.y,this.y=be,this},_rotateAround:function(M,O){var Z=Math.cos(M),ae=Math.sin(M),Ee=O.y+ae*(this.x-O.x)+Z*(this.y-O.y);return this.x=O.x+Z*(this.x-O.x)-ae*(this.y-O.y),this.y=Ee,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},o.convert=function(M){return M instanceof o?M:Array.isArray(M)?new o(M[0],M[1]):M};var n=r(.25,.1,.25,1);function i(M,O,Z){return Math.min(Z,Math.max(O,M))}function a(M,O,Z){var ae=Z-O,be=((M-O)%ae+ae)%ae+O;return be===O?Z:be}function c(M){for(var O=[],Z=arguments.length-1;Z-- >0;)O[Z]=arguments[Z+1];for(var ae=0,be=O;ae<be.length;ae+=1){var Ee=be[ae];for(var je in Ee)M[je]=Ee[je]}return M}var p=1;function f(){return p++}function x(){return function M(O){return O?(O^16*Math.random()>>O/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,M)}()}function v(M){return!!M&&/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(M)}function g(M,O){M.forEach(function(Z){O[Z]&&(O[Z]=O[Z].bind(O))})}function y(M,O){return-1!==M.indexOf(O,M.length-O.length)}function h(M,O,Z){var ae={};for(var be in M)ae[be]=O.call(Z||this,M[be],be,M);return ae}function m(M,O,Z){var ae={};for(var be in M)O.call(Z||this,M[be],be,M)&&(ae[be]=M[be]);return ae}function w(M){return Array.isArray(M)?M.map(w):"object"==typeof M&&M?h(M,w):M}var u={};function S(M){u[M]||(typeof console<"u"&&console.warn(M),u[M]=!0)}function _(M,O,Z){return(Z.y-M.y)*(O.x-M.x)>(O.y-M.y)*(Z.x-M.x)}function E(M){for(var O=0,Z=0,ae=M.length,be=ae-1,Ee=void 0,je=void 0;Z<ae;be=Z++)O+=((je=M[be]).x-(Ee=M[Z]).x)*(Ee.y+je.y);return O}function L(){return typeof WorkerGlobalScope<"u"&&typeof self<"u"&&self instanceof WorkerGlobalScope}function C(M){var O={};if(M.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,function(ae,be,Ee,je){var Qe=Ee||je;return O[be]=!Qe||Qe.toLowerCase(),""}),O["max-age"]){var Z=parseInt(O["max-age"],10);isNaN(Z)?delete O["max-age"]:O["max-age"]=Z}return O}var P=null;function I(M){if(null==P){var O=M.navigator?M.navigator.userAgent:null;P=!!M.safari||!(!O||!(/\b(iPad|iPhone|iPod)\b/.test(O)||O.match("Safari")&&!O.match("Chrome")))}return P}function U(M){try{var O=self[M];return O.setItem("_mapbox_test_",1),O.removeItem("_mapbox_test_"),!0}catch{return!1}}var z,H,F,N,B=self.performance&&self.performance.now?self.performance.now.bind(self.performance):Date.now.bind(Date),j=self.requestAnimationFrame||self.mozRequestAnimationFrame||self.webkitRequestAnimationFrame||self.msRequestAnimationFrame,J=self.cancelAnimationFrame||self.mozCancelAnimationFrame||self.webkitCancelAnimationFrame||self.msCancelAnimationFrame,G={now:B,frame:function(M){var O=j(M);return{cancel:function(){return J(O)}}},getImageData:function(M,O){void 0===O&&(O=0);var Z=self.document.createElement("canvas"),ae=Z.getContext("2d");if(!ae)throw new Error("failed to create canvas 2d context");return Z.width=M.width,Z.height=M.height,ae.drawImage(M,0,0,M.width,M.height),ae.getImageData(-O,-O,M.width+2*O,M.height+2*O)},resolveURL:function(M){return z||(z=self.document.createElement("a")),z.href=M,z.href},hardwareConcurrency:self.navigator.hardwareConcurrency||4,get devicePixelRatio(){return self.devicePixelRatio},get prefersReducedMotion(){return!!self.matchMedia&&(null==H&&(H=self.matchMedia("(prefers-reduced-motion: reduce)")),H.matches)}},V={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?0===this.API_URL.indexOf("https://api.mapbox.cn")?"https://events.mapbox.cn/events/v2":0===this.API_URL.indexOf("https://api.mapbox.com")?"https://events.mapbox.com/events/v2":null:null},FEEDBACK_URL:"https://apps.mapbox.com/feedback",REQUIRE_ACCESS_TOKEN:!0,ACCESS_TOKEN:null,MAX_PARALLEL_IMAGE_REQUESTS:16},W={supported:!1,testSupport:function(M){!X&&N&&(K?re(M):F=M)}},X=!1,K=!1;function re(M){var O=M.createTexture();M.bindTexture(M.TEXTURE_2D,O);try{if(M.texImage2D(M.TEXTURE_2D,0,M.RGBA,M.RGBA,M.UNSIGNED_BYTE,N),M.isContextLost())return;W.supported=!0}catch{}M.deleteTexture(O),X=!0}self.document&&((N=self.document.createElement("img")).onload=function(){F&&re(F),F=null,K=!0},N.onerror=function(){X=!0,F=null},N.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");var ee="01",ie=function(M,O){this._transformRequestFn=M,this._customAccessToken=O,this._createSkuToken()};function oe(M){return 0===M.indexOf("mapbox:")}ie.prototype._createSkuToken=function(){var M=function(){for(var O="",Z=0;Z<10;Z++)O+="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"[Math.floor(62*Math.random())];return{token:["1",ee,O].join(""),tokenExpiresAt:Date.now()+432e5}}();this._skuToken=M.token,this._skuTokenExpiresAt=M.tokenExpiresAt},ie.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},ie.prototype.transformRequest=function(M,O){return this._transformRequestFn&&this._transformRequestFn(M,O)||{url:M}},ie.prototype.normalizeStyleURL=function(M,O){if(!oe(M))return M;var Z=he(M);return Z.path="/styles/v1"+Z.path,this._makeAPIURL(Z,this._customAccessToken||O)},ie.prototype.normalizeGlyphsURL=function(M,O){if(!oe(M))return M;var Z=he(M);return Z.path="/fonts/v1"+Z.path,this._makeAPIURL(Z,this._customAccessToken||O)},ie.prototype.normalizeSourceURL=function(M,O){if(!oe(M))return M;var Z=he(M);return Z.path="/v4/"+Z.authority+".json",Z.params.push("secure"),this._makeAPIURL(Z,this._customAccessToken||O)},ie.prototype.normalizeSpriteURL=function(M,O,Z,ae){var be=he(M);return oe(M)?(be.path="/styles/v1"+be.path+"/sprite"+O+Z,this._makeAPIURL(be,this._customAccessToken||ae)):(be.path+=""+O+Z,ve(be))},ie.prototype.normalizeTileURL=function(M,O){if(this._isSkuTokenExpired()&&this._createSkuToken(),M&&!oe(M))return M;var Z=he(M);Z.path=Z.path.replace(/(\.(png|jpg)\d*)(?=$)/,(G.devicePixelRatio>=2||512===O?"@2x":"")+(W.supported?".webp":"$1")),Z.path=Z.path.replace(/^.+\/v4\//,"/"),Z.path="/v4"+Z.path;var Ee=this._customAccessToken||function(je){for(var Qe=0,lt=je;Qe<lt.length;Qe+=1){var _t=lt[Qe].match(/^access_token=(.*)$/);if(_t)return _t[1]}return null}(Z.params)||V.ACCESS_TOKEN;return V.REQUIRE_ACCESS_TOKEN&&Ee&&this._skuToken&&Z.params.push("sku="+this._skuToken),this._makeAPIURL(Z,Ee)},ie.prototype.canonicalizeTileURL=function(M,O){var Z=he(M);if(!Z.path.match(/(^\/v4\/)/)||!Z.path.match(/\.[\w]+$/))return M;var ae="mapbox://tiles/";ae+=Z.path.replace("/v4/","");var be=Z.params;return O&&(be=be.filter(function(Ee){return!Ee.match(/^access_token=/)})),be.length&&(ae+="?"+be.join("&")),ae},ie.prototype.canonicalizeTileset=function(M,O){for(var Z=!!O&&oe(O),ae=[],be=0,Ee=M.tiles||[];be<Ee.length;be+=1){var je=Ee[be];me(je)?ae.push(this.canonicalizeTileURL(je,Z)):ae.push(je)}return ae},ie.prototype._makeAPIURL=function(M,O){var Z="See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes",ae=he(V.API_URL);if(M.protocol=ae.protocol,M.authority=ae.authority,"/"!==ae.path&&(M.path=""+ae.path+M.path),!V.REQUIRE_ACCESS_TOKEN)return ve(M);if(!(O=O||V.ACCESS_TOKEN))throw new Error("An API access token is required to use Mapbox GL. "+Z);if("s"===O[0])throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+Z);return M.params=M.params.filter(function(be){return-1===be.indexOf("access_token")}),M.params.push("access_token="+O),ve(M)};var ce=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function me(M){return ce.test(M)}var de=/^(\w+):\/\/([^/?]*)(\/[^?]+)?\??(.+)?/;function he(M){var O=M.match(de);if(!O)throw new Error("Unable to parse URL object");return{protocol:O[1],authority:O[2],path:O[3]||"/",params:O[4]?O[4].split("&"):[]}}function ve(M){var O=M.params.length?"?"+M.params.join("&"):"";return M.protocol+"://"+M.authority+M.path+O}var Pe="mapbox.eventData";function xe(M){if(!M)return null;var Z=M.split(".");if(!Z||3!==Z.length)return null;try{return JSON.parse(decodeURIComponent(self.atob(Z[1]).split("").map(function(ae){return"%"+("00"+ae.charCodeAt(0).toString(16)).slice(-2)}).join("")))}catch{return null}}var ke=function(M){this.type=M,this.anonId=null,this.eventData={},this.queue=[],this.pendingRequest=null};ke.prototype.getStorageKey=function(M){var O,ae=xe(V.ACCESS_TOKEN);return O=ae&&ae.u?self.btoa(encodeURIComponent(ae.u).replace(/%([0-9A-F]{2})/g,function(be,Ee){return String.fromCharCode(+("0x"+Ee))})):V.ACCESS_TOKEN||"",M?Pe+"."+M+":"+O:Pe+":"+O},ke.prototype.fetchEventData=function(){var M=U("localStorage"),O=this.getStorageKey(),Z=this.getStorageKey("uuid");if(M)try{var ae=self.localStorage.getItem(O);ae&&(this.eventData=JSON.parse(ae));var be=self.localStorage.getItem(Z);be&&(this.anonId=be)}catch{S("Unable to read from LocalStorage")}},ke.prototype.saveEventData=function(){var M=U("localStorage"),O=this.getStorageKey(),Z=this.getStorageKey("uuid");if(M)try{self.localStorage.setItem(Z,this.anonId),Object.keys(this.eventData).length>=1&&self.localStorage.setItem(O,JSON.stringify(this.eventData))}catch{S("Unable to write to LocalStorage")}},ke.prototype.processRequests=function(M){},ke.prototype.postEvent=function(M,O,Z,ae){var be=this;if(V.EVENTS_URL){var Ee=he(V.EVENTS_URL);Ee.params.push("access_token="+(ae||V.ACCESS_TOKEN||""));var je={event:this.type,created:new Date(M).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:b,skuId:ee,userId:this.anonId},Qe=O?c(je,O):je,lt={url:ve(Ee),headers:{"Content-Type":"text/plain"},body:JSON.stringify([Qe])};this.pendingRequest=Ct(lt,function(_t){be.pendingRequest=null,Z(_t),be.saveEventData(),be.processRequests(ae)})}},ke.prototype.queueRequest=function(M,O){this.queue.push(M),this.processRequests(O)};var Ae,Te,Q=function(M){function O(){M.call(this,"map.load"),this.success={},this.skuToken=""}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.postMapLoadEvent=function(Z,ae,be,Ee){this.skuToken=be,(V.EVENTS_URL&&Ee||V.ACCESS_TOKEN&&Array.isArray(Z)&&Z.some(function(je){return oe(je)||me(je)}))&&this.queueRequest({id:ae,timestamp:Date.now()},Ee)},O.prototype.processRequests=function(Z){var ae=this;if(!this.pendingRequest&&0!==this.queue.length){var be=this.queue.shift(),Ee=be.id,je=be.timestamp;Ee&&this.success[Ee]||(this.anonId||this.fetchEventData(),v(this.anonId)||(this.anonId=x()),this.postEvent(je,{skuToken:this.skuToken},function(Qe){Qe||Ee&&(ae.success[Ee]=!0)},Z))}},O}(ke),se=function(M){function O(Z){M.call(this,"appUserTurnstile"),this._customAccessToken=Z}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.postTurnstileEvent=function(Z,ae){V.EVENTS_URL&&V.ACCESS_TOKEN&&Array.isArray(Z)&&Z.some(function(be){return oe(be)||me(be)})&&this.queueRequest(Date.now(),ae)},O.prototype.processRequests=function(Z){var ae=this;if(!this.pendingRequest&&0!==this.queue.length){this.anonId&&this.eventData.lastSuccess&&this.eventData.tokenU||this.fetchEventData();var be=xe(V.ACCESS_TOKEN),Ee=be?be.u:V.ACCESS_TOKEN,je=Ee!==this.eventData.tokenU;v(this.anonId)||(this.anonId=x(),je=!0);var Qe=this.queue.shift();if(this.eventData.lastSuccess){var lt=new Date(this.eventData.lastSuccess),_t=new Date(Qe),Mt=(Qe-this.eventData.lastSuccess)/864e5;je=je||Mt>=1||Mt<-1||lt.getDate()!==_t.getDate()}else je=!0;if(!je)return this.processRequests();this.postEvent(Qe,{"enabled.telemetry":!1},function(Bt){Bt||(ae.eventData.lastSuccess=Qe,ae.eventData.tokenU=Ee)},Z)}},O}(ke),fe=new se,ye=fe.postTurnstileEvent.bind(fe),Me=new Q,Ie=Me.postMapLoadEvent.bind(Me),Ce="mapbox-tiles",Re=500,le=50;function ge(){self.caches&&!Ae&&(Ae=self.caches.open(Ce))}function Fe(M){var O=M.indexOf("?");return O<0?M:M.slice(0,O)}var He,nt=1/0;function tt(){return null==He&&(He=self.OffscreenCanvas&&new self.OffscreenCanvas(1,1).getContext("2d")&&"function"==typeof self.createImageBitmap),He}var ot={Unknown:"Unknown",Style:"Style",Source:"Source",Tile:"Tile",Glyphs:"Glyphs",SpriteImage:"SpriteImage",SpriteJSON:"SpriteJSON",Image:"Image"};"function"==typeof Object.freeze&&Object.freeze(ot);var dt=function(M){function O(Z,ae,be){401===ae&&me(be)&&(Z+=": you may have provided an invalid Mapbox access token. See https://www.mapbox.com/api-documentation/#access-tokens-and-token-scopes"),M.call(this,Z),this.status=ae,this.url=be,this.name=this.constructor.name,this.message=Z}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.toString=function(){return this.name+": "+this.message+" ("+this.status+"): "+this.url},O}(Error),kt=L()?function(){return self.worker&&self.worker.referrer}:function(){return("blob:"===self.location.protocol?self.parent:self).location.href};var It,Ut,wt=function(M,O){if(!(/^file:/.test(Z=M.url)||/^file:/.test(kt())&&!/^\w+:/.test(Z))){if(self.fetch&&self.Request&&self.AbortController&&self.Request.prototype.hasOwnProperty("signal"))return function mt(M,O){var Z,ae=new self.AbortController,be=new self.Request(M.url,{method:M.method||"GET",body:M.body,credentials:M.credentials,headers:M.headers,referrer:kt(),signal:ae.signal}),Ee=!1,je=!1,Qe=(Z=be.url).indexOf("sku=")>0&&me(Z);"json"===M.type&&be.headers.set("Accept","application/json");var lt=function(Mt,Bt,qt){if(!je){if(Mt&&"SecurityError"!==Mt.message&&S(Mt),Bt&&qt)return _t(Bt);var Vt=Date.now();self.fetch(be).then(function(rn){if(rn.ok){var xn=Qe?rn.clone():null;return _t(rn,xn,Vt)}return O(new dt(rn.statusText,rn.status,M.url))}).catch(function(rn){20!==rn.code&&O(new Error(rn.message))})}},_t=function(Mt,Bt,qt){("arrayBuffer"===M.type?Mt.arrayBuffer():"json"===M.type?Mt.json():Mt.text()).then(function(Vt){je||(Bt&&qt&&function _e(M,O,Z){if(ge(),Ae){var ae={status:O.status,statusText:O.statusText,headers:new self.Headers};O.headers.forEach(function(Ee,je){return ae.headers.set(je,Ee)});var be=C(O.headers.get("Cache-Control")||"");be["no-store"]||(be["max-age"]&&ae.headers.set("Expires",new Date(Z+1e3*be["max-age"]).toUTCString()),new Date(ae.headers.get("Expires")).getTime()-Z<42e4||function(Ee,je){if(void 0===Te)try{new Response(new ReadableStream),Te=!0}catch{Te=!1}Te?je(Ee.body):Ee.blob().then(je)}(O,function(Ee){var je=new self.Response(Ee,ae);ge(),Ae&&Ae.then(function(Qe){return Qe.put(Fe(M.url),je)}).catch(function(Qe){return S(Qe.message)})}))}}(be,Bt,qt),Ee=!0,O(null,Vt,Mt.headers.get("Cache-Control"),Mt.headers.get("Expires")))}).catch(function(Vt){je||O(new Error(Vt.message))})};return Qe?function Ve(M,O){if(ge(),!Ae)return O(null);var Z=Fe(M.url);Ae.then(function(ae){ae.match(Z).then(function(be){var Ee=function(je){if(!je)return!1;var Qe=new Date(je.headers.get("Expires")||0),lt=C(je.headers.get("Cache-Control")||"");return Qe>Date.now()&&!lt["no-cache"]}(be);ae.delete(Z),Ee&&ae.put(Z,be.clone()),O(null,be,Ee)}).catch(O)}).catch(O)}(be,lt):lt(null,null),{cancel:function(){je=!0,Ee||ae.abort()}}}(M,O);if(L()&&self.worker&&self.worker.actor)return self.worker.actor.send("getResource",M,O,void 0,!0)}var Z;return function(ae,be){var Ee=new self.XMLHttpRequest;for(var je in Ee.open(ae.method||"GET",ae.url,!0),"arrayBuffer"===ae.type&&(Ee.responseType="arraybuffer"),ae.headers)Ee.setRequestHeader(je,ae.headers[je]);return"json"===ae.type&&(Ee.responseType="text",Ee.setRequestHeader("Accept","application/json")),Ee.withCredentials="include"===ae.credentials,Ee.onerror=function(){be(new Error(Ee.statusText))},Ee.onload=function(){if((Ee.status>=200&&Ee.status<300||0===Ee.status)&&null!==Ee.response){var Qe=Ee.response;if("json"===ae.type)try{Qe=JSON.parse(Ee.response)}catch(lt){return be(lt)}be(null,Qe,Ee.getResponseHeader("Cache-Control"),Ee.getResponseHeader("Expires"))}else be(new dt(Ee.statusText,Ee.status,ae.url))},Ee.send(ae.body),{cancel:function(){return Ee.abort()}}}(M,O)},Lt=function(M,O){return wt(c(M,{type:"arrayBuffer"}),O)},Ct=function(M,O){return wt(c(M,{method:"POST"}),O)};It=[],Ut=0;var Rt=function(M,O){if(W.supported&&(M.headers||(M.headers={}),M.headers.accept="image/webp,*/*"),Ut>=V.MAX_PARALLEL_IMAGE_REQUESTS){var Z={requestParameters:M,callback:O,cancelled:!1,cancel:function(){this.cancelled=!0}};return It.push(Z),Z}Ut++;var ae=!1,be=function(){if(!ae)for(ae=!0,Ut--;It.length&&Ut<V.MAX_PARALLEL_IMAGE_REQUESTS;){var je=It.shift();je.cancelled||(je.cancel=Rt(je.requestParameters,je.callback).cancel)}},Ee=Lt(M,function(je,Qe,lt,_t){var Bt,qt;be(),je?O(je):Qe&&(tt()?(Bt=O,qt=new self.Blob([new Uint8Array(Qe)],{type:"image/png"}),self.createImageBitmap(qt).then(function(Vt){Bt(null,Vt)}).catch(function(Vt){Bt(new Error("Could not load image because of "+Vt.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})):function(Mt,Bt,qt,Vt){var rn=new self.Image,xn=self.URL;rn.onload=function(){Bt(null,rn),xn.revokeObjectURL(rn.src)},rn.onerror=function(){return Bt(new Error("Could not load image. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))};var In=new self.Blob([new Uint8Array(Mt)],{type:"image/png"});rn.cacheControl=qt,rn.expires=Vt,rn.src=Mt.byteLength?xn.createObjectURL(In):"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII="}(Qe,O,lt,_t))});return{cancel:function(){Ee.cancel(),be()}}};function Ge(M,O,Z){Z[M]&&-1!==Z[M].indexOf(O)||(Z[M]=Z[M]||[],Z[M].push(O))}function We(M,O,Z){if(Z&&Z[M]){var ae=Z[M].indexOf(O);-1!==ae&&Z[M].splice(ae,1)}}var Be=function(M,O){void 0===O&&(O={}),c(this,O),this.type=M},Ye=function(M){function O(Z,ae){void 0===ae&&(ae={}),M.call(this,"error",c({error:Z},ae))}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O}(Be),rt=function(){};rt.prototype.on=function(M,O){return this._listeners=this._listeners||{},Ge(M,O,this._listeners),this},rt.prototype.off=function(M,O){return We(M,O,this._listeners),We(M,O,this._oneTimeListeners),this},rt.prototype.once=function(M,O){return this._oneTimeListeners=this._oneTimeListeners||{},Ge(M,O,this._oneTimeListeners),this},rt.prototype.fire=function(M,O){"string"==typeof M&&(M=new Be(M,O||{}));var Z=M.type;if(this.listens(Z)){M.target=this;for(var ae=0,be=this._listeners&&this._listeners[Z]?this._listeners[Z].slice():[];ae<be.length;ae+=1)be[ae].call(this,M);for(var Ee=0,je=this._oneTimeListeners&&this._oneTimeListeners[Z]?this._oneTimeListeners[Z].slice():[];Ee<je.length;Ee+=1){var Qe=je[Ee];We(Z,Qe,this._oneTimeListeners),Qe.call(this,M)}var lt=this._eventedParent;lt&&(c(M,"function"==typeof this._eventedParentData?this._eventedParentData():this._eventedParentData),lt.fire(M))}else M instanceof Ye&&console.error(M.error);return this},rt.prototype.listens=function(M){return this._listeners&&this._listeners[M]&&this._listeners[M].length>0||this._oneTimeListeners&&this._oneTimeListeners[M]&&this._oneTimeListeners[M].length>0||this._eventedParent&&this._eventedParent.listens(M)},rt.prototype.setEventedParent=function(M,O){return this._eventedParent=M,this._eventedParentData=O,this};var Se={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},light:{type:"light"},sources:{required:!0,type:"sources"},sprite:{type:"string"},glyphs:{type:"string"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{}},default:"mapbox"},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-join":{type:"enum",values:{bevel:{},round:{},miter:{}},default:"miter",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-miter-limit":{type:"number",default:2,requires:[{"line-join":"miter"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-ignore-placement":{type:"boolean",default:!1,requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-optional":{type:"boolean",default:!1,requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-size":{type:"number",default:1,minimum:0,units:"factor of the original icon size",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-text-fit":{type:"enum",values:{none:{},width:{},height:{},both:{}},default:"none",requires:["icon-image","text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-text-fit-padding":{type:"array",value:"number",length:4,default:[0,0,0,0],units:"pixels",requires:["icon-image","text-field",{"icon-text-fit":["both","width","height"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-image":{type:"resolvedImage",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-keep-upright":{type:"boolean",default:!1,requires:["icon-image",{"icon-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-offset":{type:"array",value:"number",length:2,default:[0,0],requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"icon-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-pitch-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotation-alignment":{type:"enum",values:{map:{},viewport:{},auto:{}},default:"auto",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-field":{type:"formatted",default:"",tokens:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-font":{type:"array",value:"string",default:["Open Sans Regular","Arial Unicode MS Regular"],requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-size":{type:"number",default:16,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-width":{type:"number",default:10,minimum:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-line-height":{type:"number",default:1.2,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-letter-spacing":{type:"number",default:0,units:"ems",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-justify":{type:"enum",values:{auto:{},left:{},center:{},right:{}},default:"center",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-radial-offset":{type:"number",units:"ems",default:0,requires:["text-field"],"property-type":"data-driven",expression:{interpolated:!0,parameters:["zoom","feature"]}},"text-variable-anchor":{type:"array",value:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-anchor":{type:"enum",values:{center:{},left:{},right:{},top:{},bottom:{},"top-left":{},"top-right":{},"bottom-left":{},"bottom-right":{}},default:"center",requires:["text-field",{"!":"text-variable-anchor"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-max-angle":{type:"number",default:45,units:"degrees",requires:["text-field",{"symbol-placement":["line","line-center"]}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-writing-mode":{type:"array",value:"enum",values:{horizontal:{},vertical:{}},requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-rotate":{type:"number",default:0,period:360,units:"degrees",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-padding":{type:"number",default:2,minimum:0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-keep-upright":{type:"boolean",default:!0,requires:["text-field",{"text-rotation-alignment":"map"},{"symbol-placement":["line","line-center"]}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-transform":{type:"enum",values:{none:{},uppercase:{},lowercase:{}},default:"none",requires:["text-field"],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-offset":{type:"array",value:"number",units:"ems",length:2,default:[0,0],requires:["text-field",{"!":"text-radial-offset"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"text-allow-overlap":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-ignore-placement":{type:"boolean",default:!1,requires:["text-field"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-optional":{type:"boolean",default:!1,requires:["text-field","icon-image"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},filter:{type:"array",value:"*"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"*",minimum:1},expression_name:{type:"enum",values:{let:{group:"Variable binding"},var:{group:"Variable binding"},literal:{group:"Types"},array:{group:"Types"},at:{group:"Lookup"},in:{group:"Lookup"},"index-of":{group:"Lookup"},slice:{group:"Lookup"},case:{group:"Decision"},match:{group:"Decision"},coalesce:{group:"Decision"},step:{group:"Ramps, scales, curves"},interpolate:{group:"Ramps, scales, curves"},"interpolate-hcl":{group:"Ramps, scales, curves"},"interpolate-lab":{group:"Ramps, scales, curves"},ln2:{group:"Math"},pi:{group:"Math"},e:{group:"Math"},typeof:{group:"Types"},string:{group:"Types"},number:{group:"Types"},boolean:{group:"Types"},object:{group:"Types"},collator:{group:"Types"},format:{group:"Types"},image:{group:"Types"},"number-format":{group:"Types"},"to-string":{group:"Types"},"to-number":{group:"Types"},"to-boolean":{group:"Types"},"to-rgba":{group:"Color"},"to-color":{group:"Types"},rgb:{group:"Color"},rgba:{group:"Color"},get:{group:"Lookup"},has:{group:"Lookup"},length:{group:"Lookup"},properties:{group:"Feature data"},"feature-state":{group:"Feature data"},"geometry-type":{group:"Feature data"},id:{group:"Feature data"},zoom:{group:"Zoom"},"heatmap-density":{group:"Heatmap"},"line-progress":{group:"Feature data"},accumulated:{group:"Feature data"},"+":{group:"Math"},"*":{group:"Math"},"-":{group:"Math"},"/":{group:"Math"},"%":{group:"Math"},"^":{group:"Math"},sqrt:{group:"Math"},log10:{group:"Math"},ln:{group:"Math"},log2:{group:"Math"},sin:{group:"Math"},cos:{group:"Math"},tan:{group:"Math"},asin:{group:"Math"},acos:{group:"Math"},atan:{group:"Math"},min:{group:"Math"},max:{group:"Math"},round:{group:"Math"},abs:{group:"Math"},ceil:{group:"Math"},floor:{group:"Math"},distance:{group:"Math"},"==":{group:"Decision"},"!=":{group:"Decision"},">":{group:"Decision"},"<":{group:"Decision"},">=":{group:"Decision"},"<=":{group:"Decision"},all:{group:"Decision"},any:{group:"Decision"},"!":{group:"Decision"},within:{group:"Decision"},"is-supported-script":{group:"String"},upcase:{group:"String"},downcase:{group:"String"},concat:{group:"String"},"resolved-locale":{group:"String"}}},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"number",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-anchor":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-exaggeration":{type:"number",default:.5,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-shadow-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"color",default:"#FFFFFF",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-accent-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}}},ze=function(M,O,Z,ae){this.message=(M?M+": ":"")+Z,ae&&(this.identifier=ae),null!=O&&O.__line__&&(this.line=O.__line__)};function Ke(M){var Z=M.value;return Z?[new ze(M.key,Z,"constants have been deprecated as of v8")]:[]}function st(M){for(var O=[],Z=arguments.length-1;Z-- >0;)O[Z]=arguments[Z+1];for(var ae=0,be=O;ae<be.length;ae+=1){var Ee=be[ae];for(var je in Ee)M[je]=Ee[je]}return M}function ct(M){return M instanceof Number||M instanceof String||M instanceof Boolean?M.valueOf():M}function Tt(M){if(Array.isArray(M))return M.map(Tt);if(M instanceof Object&&!(M instanceof Number||M instanceof String||M instanceof Boolean)){var O={};for(var Z in M)O[Z]=Tt(M[Z]);return O}return ct(M)}var Et=function(M){function O(Z,ae){M.call(this,ae),this.message=ae,this.key=Z}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O}(Error),At=function(M,O){void 0===O&&(O=[]),this.parent=M,this.bindings={};for(var Z=0,ae=O;Z<ae.length;Z+=1){var be=ae[Z];this.bindings[be[0]]=be[1]}};At.prototype.concat=function(M){return new At(this,M)},At.prototype.get=function(M){if(this.bindings[M])return this.bindings[M];if(this.parent)return this.parent.get(M);throw new Error(M+" not found in scope.")},At.prototype.has=function(M){return!!this.bindings[M]||!!this.parent&&this.parent.has(M)};var ht={kind:"null"},pt={kind:"number"},gt={kind:"string"},Pt={kind:"boolean"},Ot={kind:"color"},Ht={kind:"object"},jt={kind:"value"},Nt={kind:"collator"},Gt={kind:"formatted"},un={kind:"resolvedImage"};function pn(M,O){return{kind:"array",itemType:M,N:O}}function Kt(M){if("array"===M.kind){var O=Kt(M.itemType);return"number"==typeof M.N?"array<"+O+", "+M.N+">":"value"===M.itemType.kind?"array":"array<"+O+">"}return M.kind}var wn=[ht,pt,gt,Pt,Ot,Gt,Ht,pn(jt),un];function Bn(M,O){if("error"===O.kind)return null;if("array"===M.kind){if("array"===O.kind&&(0===O.N&&"value"===O.itemType.kind||!Bn(M.itemType,O.itemType))&&("number"!=typeof M.N||M.N===O.N))return null}else{if(M.kind===O.kind)return null;if("value"===M.kind)for(var Z=0,ae=wn;Z<ae.length;Z+=1)if(!Bn(ae[Z],O))return null}return"Expected "+Kt(M)+" but found "+Kt(O)+" instead."}function vn(M,O){return O.some(function(Z){return Z.kind===M.kind})}function cn(M,O){return O.some(function(Z){return"null"===Z?null===M:"array"===Z?Array.isArray(M):"object"===Z?M&&!Array.isArray(M)&&"object"==typeof M:Z===typeof M})}var sn=T(function(M,O){var Z={transparent:[0,0,0,0],aliceblue:[240,248,255,1],antiquewhite:[250,235,215,1],aqua:[0,255,255,1],aquamarine:[127,255,212,1],azure:[240,255,255,1],beige:[245,245,220,1],bisque:[255,228,196,1],black:[0,0,0,1],blanchedalmond:[255,235,205,1],blue:[0,0,255,1],blueviolet:[138,43,226,1],brown:[165,42,42,1],burlywood:[222,184,135,1],cadetblue:[95,158,160,1],chartreuse:[127,255,0,1],chocolate:[210,105,30,1],coral:[255,127,80,1],cornflowerblue:[100,149,237,1],cornsilk:[255,248,220,1],crimson:[220,20,60,1],cyan:[0,255,255,1],darkblue:[0,0,139,1],darkcyan:[0,139,139,1],darkgoldenrod:[184,134,11,1],darkgray:[169,169,169,1],darkgreen:[0,100,0,1],darkgrey:[169,169,169,1],darkkhaki:[189,183,107,1],darkmagenta:[139,0,139,1],darkolivegreen:[85,107,47,1],darkorange:[255,140,0,1],darkorchid:[153,50,204,1],darkred:[139,0,0,1],darksalmon:[233,150,122,1],darkseagreen:[143,188,143,1],darkslateblue:[72,61,139,1],darkslategray:[47,79,79,1],darkslategrey:[47,79,79,1],darkturquoise:[0,206,209,1],darkviolet:[148,0,211,1],deeppink:[255,20,147,1],deepskyblue:[0,191,255,1],dimgray:[105,105,105,1],dimgrey:[105,105,105,1],dodgerblue:[30,144,255,1],firebrick:[178,34,34,1],floralwhite:[255,250,240,1],forestgreen:[34,139,34,1],fuchsia:[255,0,255,1],gainsboro:[220,220,220,1],ghostwhite:[248,248,255,1],gold:[255,215,0,1],goldenrod:[218,165,32,1],gray:[128,128,128,1],green:[0,128,0,1],greenyellow:[173,255,47,1],grey:[128,128,128,1],honeydew:[240,255,240,1],hotpink:[255,105,180,1],indianred:[205,92,92,1],indigo:[75,0,130,1],ivory:[255,255,240,1],khaki:[240,230,140,1],lavender:[230,230,250,1],lavenderblush:[255,240,245,1],lawngreen:[124,252,0,1],lemonchiffon:[255,250,205,1],lightblue:[173,216,230,1],lightcoral:[240,128,128,1],lightcyan:[224,255,255,1],lightgoldenrodyellow:[250,250,210,1],lightgray:[211,211,211,1],lightgreen:[144,238,144,1],lightgrey:[211,211,211,1],lightpink:[255,182,193,1],lightsalmon:[255,160,122,1],lightseagreen:[32,178,170,1],lightskyblue:[135,206,250,1],lightslategray:[119,136,153,1],lightslategrey:[119,136,153,1],lightsteelblue:[176,196,222,1],lightyellow:[255,255,224,1],lime:[0,255,0,1],limegreen:[50,205,50,1],linen:[250,240,230,1],magenta:[255,0,255,1],maroon:[128,0,0,1],mediumaquamarine:[102,205,170,1],mediumblue:[0,0,205,1],mediumorchid:[186,85,211,1],mediumpurple:[147,112,219,1],mediumseagreen:[60,179,113,1],mediumslateblue:[123,104,238,1],mediumspringgreen:[0,250,154,1],mediumturquoise:[72,209,204,1],mediumvioletred:[199,21,133,1],midnightblue:[25,25,112,1],mintcream:[245,255,250,1],mistyrose:[255,228,225,1],moccasin:[255,228,181,1],navajowhite:[255,222,173,1],navy:[0,0,128,1],oldlace:[253,245,230,1],olive:[128,128,0,1],olivedrab:[107,142,35,1],orange:[255,165,0,1],orangered:[255,69,0,1],orchid:[218,112,214,1],palegoldenrod:[238,232,170,1],palegreen:[152,251,152,1],paleturquoise:[175,238,238,1],palevioletred:[219,112,147,1],papayawhip:[255,239,213,1],peachpuff:[255,218,185,1],peru:[205,133,63,1],pink:[255,192,203,1],plum:[221,160,221,1],powderblue:[176,224,230,1],purple:[128,0,128,1],rebeccapurple:[102,51,153,1],red:[255,0,0,1],rosybrown:[188,143,143,1],royalblue:[65,105,225,1],saddlebrown:[139,69,19,1],salmon:[250,128,114,1],sandybrown:[244,164,96,1],seagreen:[46,139,87,1],seashell:[255,245,238,1],sienna:[160,82,45,1],silver:[192,192,192,1],skyblue:[135,206,235,1],slateblue:[106,90,205,1],slategray:[112,128,144,1],slategrey:[112,128,144,1],snow:[255,250,250,1],springgreen:[0,255,127,1],steelblue:[70,130,180,1],tan:[210,180,140,1],teal:[0,128,128,1],thistle:[216,191,216,1],tomato:[255,99,71,1],turquoise:[64,224,208,1],violet:[238,130,238,1],wheat:[245,222,179,1],white:[255,255,255,1],whitesmoke:[245,245,245,1],yellow:[255,255,0,1],yellowgreen:[154,205,50,1]};function ae(lt){return(lt=Math.round(lt))<0?0:lt>255?255:lt}function Ee(lt){return ae("%"===lt[lt.length-1]?parseFloat(lt)/100*255:parseInt(lt))}function je(lt){return function be(lt){return lt<0?0:lt>1?1:lt}("%"===lt[lt.length-1]?parseFloat(lt)/100:parseFloat(lt))}function Qe(lt,_t,Mt){return Mt<0?Mt+=1:Mt>1&&(Mt-=1),6*Mt<1?lt+(_t-lt)*Mt*6:2*Mt<1?_t:3*Mt<2?lt+(_t-lt)*(2/3-Mt)*6:lt}try{O.parseCSSColor=function(lt){var _t,Mt=lt.replace(/ /g,"").toLowerCase();if(Mt in Z)return Z[Mt].slice();if("#"===Mt[0])return 4===Mt.length?(_t=parseInt(Mt.substr(1),16))>=0&&_t<=4095?[(3840&_t)>>4|(3840&_t)>>8,240&_t|(240&_t)>>4,15&_t|(15&_t)<<4,1]:null:7===Mt.length&&(_t=parseInt(Mt.substr(1),16))>=0&&_t<=16777215?[(16711680&_t)>>16,(65280&_t)>>8,255&_t,1]:null;var Bt=Mt.indexOf("("),qt=Mt.indexOf(")");if(-1!==Bt&&qt+1===Mt.length){var Vt=Mt.substr(0,Bt),rn=Mt.substr(Bt+1,qt-(Bt+1)).split(","),xn=1;switch(Vt){case"rgba":if(4!==rn.length)return null;xn=je(rn.pop());case"rgb":return 3!==rn.length?null:[Ee(rn[0]),Ee(rn[1]),Ee(rn[2]),xn];case"hsla":if(4!==rn.length)return null;xn=je(rn.pop());case"hsl":if(3!==rn.length)return null;var In=(parseFloat(rn[0])%360+360)%360/360,On=je(rn[1]),jn=je(rn[2]),Vn=jn<=.5?jn*(On+1):jn+On-jn*On,Yn=2*jn-Vn;return[ae(255*Qe(Yn,Vn,In+1/3)),ae(255*Qe(Yn,Vn,In)),ae(255*Qe(Yn,Vn,In-1/3)),xn];default:return null}}return null}}catch{}}).parseCSSColor,hn=function(M,O,Z,ae){void 0===ae&&(ae=1),this.r=M,this.g=O,this.b=Z,this.a=ae};hn.parse=function(M){if(M){if(M instanceof hn)return M;if("string"==typeof M){var O=sn(M);if(O)return new hn(O[0]/255*O[3],O[1]/255*O[3],O[2]/255*O[3],O[3])}}},hn.prototype.toString=function(){var M=this.toArray(),Z=M[1],ae=M[2],be=M[3];return"rgba("+Math.round(M[0])+","+Math.round(Z)+","+Math.round(ae)+","+be+")"},hn.prototype.toArray=function(){var M=this,be=M.a;return 0===be?[0,0,0,0]:[255*M.r/be,255*M.g/be,255*M.b/be,be]},hn.black=new hn(0,0,0,1),hn.white=new hn(1,1,1,1),hn.transparent=new hn(0,0,0,0),hn.red=new hn(1,0,0,1);var En=function(M,O,Z){this.sensitivity=M?O?"variant":"case":O?"accent":"base",this.locale=Z,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};En.prototype.compare=function(M,O){return this.collator.compare(M,O)},En.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Mn=function(M,O,Z,ae,be){this.text=M,this.image=O,this.scale=Z,this.fontStack=ae,this.textColor=be},Rn=function(M){this.sections=M};Rn.fromString=function(M){return new Rn([new Mn(M,null,null,null,null)])},Rn.prototype.isEmpty=function(){return 0===this.sections.length||!this.sections.some(function(M){return 0!==M.text.length||M.image&&0!==M.image.name.length})},Rn.factory=function(M){return M instanceof Rn?M:Rn.fromString(M)},Rn.prototype.toString=function(){return 0===this.sections.length?"":this.sections.map(function(M){return M.text}).join("")},Rn.prototype.serialize=function(){for(var M=["format"],O=0,Z=this.sections;O<Z.length;O+=1){var ae=Z[O];if(ae.image)M.push(["image",ae.image.name]);else{M.push(ae.text);var be={};ae.fontStack&&(be["text-font"]=["literal",ae.fontStack.split(",")]),ae.scale&&(be["font-scale"]=ae.scale),ae.textColor&&(be["text-color"]=["rgba"].concat(ae.textColor.toArray())),M.push(be)}}return M};var Nn=function(M){this.name=M.name,this.available=M.available};function Fn(M,O,Z,ae){return"number"==typeof M&&M>=0&&M<=255&&"number"==typeof O&&O>=0&&O<=255&&"number"==typeof Z&&Z>=0&&Z<=255?void 0===ae||"number"==typeof ae&&ae>=0&&ae<=1?null:"Invalid rgba value ["+[M,O,Z,ae].join(", ")+"]: 'a' must be between 0 and 1.":"Invalid rgba value ["+("number"==typeof ae?[M,O,Z,ae]:[M,O,Z]).join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}function rr(M){if(null===M||"string"==typeof M||"boolean"==typeof M||"number"==typeof M||M instanceof hn||M instanceof En||M instanceof Rn||M instanceof Nn)return!0;if(Array.isArray(M)){for(var O=0,Z=M;O<Z.length;O+=1)if(!rr(Z[O]))return!1;return!0}if("object"==typeof M){for(var ae in M)if(!rr(M[ae]))return!1;return!0}return!1}function $n(M){if(null===M)return ht;if("string"==typeof M)return gt;if("boolean"==typeof M)return Pt;if("number"==typeof M)return pt;if(M instanceof hn)return Ot;if(M instanceof En)return Nt;if(M instanceof Rn)return Gt;if(M instanceof Nn)return un;if(Array.isArray(M)){for(var O,Z=M.length,ae=0,be=M;ae<be.length;ae+=1){var Ee=$n(be[ae]);if(O){if(O===Ee)continue;O=jt;break}O=Ee}return pn(O||jt,Z)}return Ht}function mr(M){var O=typeof M;return null===M?"":"string"===O||"number"===O||"boolean"===O?String(M):M instanceof hn||M instanceof Rn||M instanceof Nn?M.toString():JSON.stringify(M)}Nn.prototype.toString=function(){return this.name},Nn.fromString=function(M){return M?new Nn({name:M,available:!1}):null},Nn.prototype.serialize=function(){return["image",this.name]};var fr=function(M,O){this.type=M,this.value=O};fr.parse=function(M,O){if(2!==M.length)return O.error("'literal' expression requires exactly one argument, but found "+(M.length-1)+" instead.");if(!rr(M[1]))return O.error("invalid value");var Z=M[1],ae=$n(Z),be=O.expectedType;return"array"!==ae.kind||0!==ae.N||!be||"array"!==be.kind||"number"==typeof be.N&&0!==be.N||(ae=be),new fr(ae,Z)},fr.prototype.evaluate=function(){return this.value},fr.prototype.eachChild=function(){},fr.prototype.outputDefined=function(){return!0},fr.prototype.serialize=function(){return"array"===this.type.kind||"object"===this.type.kind?["literal",this.value]:this.value instanceof hn?["rgba"].concat(this.value.toArray()):this.value instanceof Rn?this.value.serialize():this.value};var Zn=function(M){this.name="ExpressionEvaluationError",this.message=M};Zn.prototype.toJSON=function(){return this.message};var qn={string:gt,number:pt,boolean:Pt,object:Ht},ur=function(M,O){this.type=M,this.args=O};ur.parse=function(M,O){if(M.length<2)return O.error("Expected at least one argument.");var Z,ae=1,be=M[0];if("array"===be){var Ee,je;if(M.length>2){var Qe=M[1];if("string"!=typeof Qe||!(Qe in qn)||"object"===Qe)return O.error('The item type argument of "array" must be one of string, number, boolean',1);Ee=qn[Qe],ae++}else Ee=jt;if(M.length>3){if(null!==M[2]&&("number"!=typeof M[2]||M[2]<0||M[2]!==Math.floor(M[2])))return O.error('The length argument to "array" must be a positive integer literal',2);je=M[2],ae++}Z=pn(Ee,je)}else Z=qn[be];for(var lt=[];ae<M.length;ae++){var _t=O.parse(M[ae],ae,jt);if(!_t)return null;lt.push(_t)}return new ur(Z,lt)},ur.prototype.evaluate=function(M){for(var O=0;O<this.args.length;O++){var Z=this.args[O].evaluate(M);if(!Bn(this.type,$n(Z)))return Z;if(O===this.args.length-1)throw new Zn("Expected value to be of type "+Kt(this.type)+", but found "+Kt($n(Z))+" instead.")}return null},ur.prototype.eachChild=function(M){this.args.forEach(M)},ur.prototype.outputDefined=function(){return this.args.every(function(M){return M.outputDefined()})},ur.prototype.serialize=function(){var M=this.type,O=[M.kind];if("array"===M.kind){var Z=M.itemType;if("string"===Z.kind||"number"===Z.kind||"boolean"===Z.kind){O.push(Z.kind);var ae=M.N;("number"==typeof ae||this.args.length>1)&&O.push(ae)}}return O.concat(this.args.map(function(be){return be.serialize()}))};var Zt=function(M){this.type=Gt,this.sections=M};Zt.parse=function(M,O){if(M.length<2)return O.error("Expected at least one argument.");var Z=M[1];if(!Array.isArray(Z)&&"object"==typeof Z)return O.error("First argument must be an image or text section.");for(var ae=[],be=!1,Ee=1;Ee<=M.length-1;++Ee){var je=M[Ee];if(be&&"object"==typeof je&&!Array.isArray(je)){be=!1;var Qe=null;if(je["font-scale"]&&!(Qe=O.parse(je["font-scale"],1,pt)))return null;var lt=null;if(je["text-font"]&&!(lt=O.parse(je["text-font"],1,pn(gt))))return null;var _t=null;if(je["text-color"]&&!(_t=O.parse(je["text-color"],1,Ot)))return null;var Mt=ae[ae.length-1];Mt.scale=Qe,Mt.font=lt,Mt.textColor=_t}else{var Bt=O.parse(M[Ee],1,jt);if(!Bt)return null;var qt=Bt.type.kind;if("string"!==qt&&"value"!==qt&&"null"!==qt&&"resolvedImage"!==qt)return O.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");be=!0,ae.push({content:Bt,scale:null,font:null,textColor:null})}}return new Zt(ae)},Zt.prototype.evaluate=function(M){return new Rn(this.sections.map(function(O){var Z=O.content.evaluate(M);return $n(Z)===un?new Mn("",Z,null,null,null):new Mn(mr(Z),null,O.scale?O.scale.evaluate(M):null,O.font?O.font.evaluate(M).join(","):null,O.textColor?O.textColor.evaluate(M):null)}))},Zt.prototype.eachChild=function(M){for(var O=0,Z=this.sections;O<Z.length;O+=1){var ae=Z[O];M(ae.content),ae.scale&&M(ae.scale),ae.font&&M(ae.font),ae.textColor&&M(ae.textColor)}},Zt.prototype.outputDefined=function(){return!1},Zt.prototype.serialize=function(){for(var M=["format"],O=0,Z=this.sections;O<Z.length;O+=1){var ae=Z[O];M.push(ae.content.serialize());var be={};ae.scale&&(be["font-scale"]=ae.scale.serialize()),ae.font&&(be["text-font"]=ae.font.serialize()),ae.textColor&&(be["text-color"]=ae.textColor.serialize()),M.push(be)}return M};var nn=function(M){this.type=un,this.input=M};nn.parse=function(M,O){if(2!==M.length)return O.error("Expected two arguments.");var Z=O.parse(M[1],1,gt);return Z?new nn(Z):O.error("No image name provided.")},nn.prototype.evaluate=function(M){var O=this.input.evaluate(M),Z=Nn.fromString(O);return Z&&M.availableImages&&(Z.available=M.availableImages.indexOf(O)>-1),Z},nn.prototype.eachChild=function(M){M(this.input)},nn.prototype.outputDefined=function(){return!1},nn.prototype.serialize=function(){return["image",this.input.serialize()]};var zn={"to-boolean":Pt,"to-color":Ot,"to-number":pt,"to-string":gt},_n=function(M,O){this.type=M,this.args=O};_n.parse=function(M,O){if(M.length<2)return O.error("Expected at least one argument.");var Z=M[0];if(("to-boolean"===Z||"to-string"===Z)&&2!==M.length)return O.error("Expected one argument.");for(var ae=zn[Z],be=[],Ee=1;Ee<M.length;Ee++){var je=O.parse(M[Ee],Ee,jt);if(!je)return null;be.push(je)}return new _n(ae,be)},_n.prototype.evaluate=function(M){if("boolean"===this.type.kind)return!!this.args[0].evaluate(M);if("color"===this.type.kind){for(var O,Z,ae=0,be=this.args;ae<be.length;ae+=1){if(Z=null,(O=be[ae].evaluate(M))instanceof hn)return O;if("string"==typeof O){var Ee=M.parseColor(O);if(Ee)return Ee}else if(Array.isArray(O)&&!(Z=O.length<3||O.length>4?"Invalid rbga value "+JSON.stringify(O)+": expected an array containing either three or four numeric values.":Fn(O[0],O[1],O[2],O[3])))return new hn(O[0]/255,O[1]/255,O[2]/255,O[3])}throw new Zn(Z||"Could not parse color from value '"+("string"==typeof O?O:String(JSON.stringify(O)))+"'")}if("number"===this.type.kind){for(var je=null,Qe=0,lt=this.args;Qe<lt.length;Qe+=1){if(null===(je=lt[Qe].evaluate(M)))return 0;var _t=Number(je);if(!isNaN(_t))return _t}throw new Zn("Could not convert "+JSON.stringify(je)+" to number.")}return"formatted"===this.type.kind?Rn.fromString(mr(this.args[0].evaluate(M))):"resolvedImage"===this.type.kind?Nn.fromString(mr(this.args[0].evaluate(M))):mr(this.args[0].evaluate(M))},_n.prototype.eachChild=function(M){this.args.forEach(M)},_n.prototype.outputDefined=function(){return this.args.every(function(M){return M.outputDefined()})},_n.prototype.serialize=function(){if("formatted"===this.type.kind)return new Zt([{content:this.args[0],scale:null,font:null,textColor:null}]).serialize();if("resolvedImage"===this.type.kind)return new nn(this.args[0]).serialize();var M=["to-"+this.type.kind];return this.eachChild(function(O){M.push(O.serialize())}),M};var Cn=["Unknown","Point","LineString","Polygon"],Un=function(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache={},this.availableImages=null,this.canonical=null};Un.prototype.id=function(){return this.feature&&"id"in this.feature?this.feature.id:null},Un.prototype.geometryType=function(){return this.feature?"number"==typeof this.feature.type?Cn[this.feature.type]:this.feature.type:null},Un.prototype.geometry=function(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null},Un.prototype.canonicalID=function(){return this.canonical},Un.prototype.properties=function(){return this.feature&&this.feature.properties||{}},Un.prototype.parseColor=function(M){var O=this._parseColorCache[M];return O||(O=this._parseColorCache[M]=hn.parse(M)),O};var Gn=function(M,O,Z,ae){this.name=M,this.type=O,this._evaluate=Z,this.args=ae};Gn.prototype.evaluate=function(M){return this._evaluate(M,this.args)},Gn.prototype.eachChild=function(M){this.args.forEach(M)},Gn.prototype.outputDefined=function(){return!1},Gn.prototype.serialize=function(){return[this.name].concat(this.args.map(function(M){return M.serialize()}))},Gn.parse=function(M,O){var Z,ae=M[0],be=Gn.definitions[ae];if(!be)return O.error('Unknown expression "'+ae+'". If you wanted a literal array, use ["literal", [...]].',0);for(var Ee=Array.isArray(be)?be[0]:be.type,je=Array.isArray(be)?[[be[1],be[2]]]:be.overloads,Qe=je.filter(function(jr){var Pr=jr[0];return!Array.isArray(Pr)||Pr.length===M.length-1}),lt=null,_t=0,Mt=Qe;_t<Mt.length;_t+=1){var Bt=Mt[_t],qt=Bt[0],Vt=Bt[1];lt=new ir(O.registry,O.path,null,O.scope);for(var rn=[],xn=!1,In=1;In<M.length;In++){var On=M[In],jn=Array.isArray(qt)?qt[In-1]:qt.type,Vn=lt.parse(On,1+rn.length,jn);if(!Vn){xn=!0;break}rn.push(Vn)}if(!xn)if(Array.isArray(qt)&&qt.length!==rn.length)lt.error("Expected "+qt.length+" arguments, but found "+rn.length+" instead.");else{for(var Yn=0;Yn<rn.length;Yn++){var Qn=Array.isArray(qt)?qt[Yn]:qt.type,tr=rn[Yn];lt.concat(Yn+1).checkSubtype(Qn,tr.type)}if(0===lt.errors.length)return new Gn(ae,Ee,Vt,rn)}}if(1===Qe.length)(Z=O.errors).push.apply(Z,lt.errors);else{for(var xr=(Qe.length?Qe:je).map(function(jr){return Pr=jr[0],Array.isArray(Pr)?"("+Pr.map(Kt).join(", ")+")":"("+Kt(Pr.type)+"...)";var Pr}).join(" | "),pr=[],Tr=1;Tr<M.length;Tr++){var Er=O.parse(M[Tr],1+pr.length);if(!Er)return null;pr.push(Kt(Er.type))}O.error("Expected arguments of type "+xr+", but found ("+pr.join(", ")+") instead.")}return null},Gn.register=function(M,O){for(var Z in Gn.definitions=O,O)M[Z]=Gn};var ar=function(M,O,Z){this.type=Nt,this.locale=Z,this.caseSensitive=M,this.diacriticSensitive=O};ar.parse=function(M,O){if(2!==M.length)return O.error("Expected one argument.");var Z=M[1];if("object"!=typeof Z||Array.isArray(Z))return O.error("Collator options argument must be an object.");var ae=O.parse(void 0!==Z["case-sensitive"]&&Z["case-sensitive"],1,Pt);if(!ae)return null;var be=O.parse(void 0!==Z["diacritic-sensitive"]&&Z["diacritic-sensitive"],1,Pt);if(!be)return null;var Ee=null;return Z.locale&&!(Ee=O.parse(Z.locale,1,gt))?null:new ar(ae,be,Ee)},ar.prototype.evaluate=function(M){return new En(this.caseSensitive.evaluate(M),this.diacriticSensitive.evaluate(M),this.locale?this.locale.evaluate(M):null)},ar.prototype.eachChild=function(M){M(this.caseSensitive),M(this.diacriticSensitive),this.locale&&M(this.locale)},ar.prototype.outputDefined=function(){return!1},ar.prototype.serialize=function(){var M={};return M["case-sensitive"]=this.caseSensitive.serialize(),M["diacritic-sensitive"]=this.diacriticSensitive.serialize(),this.locale&&(M.locale=this.locale.serialize()),["collator",M]};var yr=8192;function $t(M,O){M[0]=Math.min(M[0],O[0]),M[1]=Math.min(M[1],O[1]),M[2]=Math.max(M[2],O[0]),M[3]=Math.max(M[3],O[1])}function kn(M,O){return!(M[0]<=O[0]||M[2]>=O[2]||M[1]<=O[1]||M[3]>=O[3])}function zt(M,O){var ae=(180+M[0])/360,be=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M[1]*Math.PI/360)))/360,Ee=Math.pow(2,O.z);return[Math.round(ae*Ee*yr),Math.round(be*Ee*yr)]}function Wt(M,O,Z){return O[1]>M[1]!=Z[1]>M[1]&&M[0]<(Z[0]-O[0])*(M[1]-O[1])/(Z[1]-O[1])+O[0]}function tn(M,O){for(var Z=!1,ae=0,be=O.length;ae<be;ae++)for(var Ee=O[ae],je=0,Qe=Ee.length;je<Qe-1;je++){if((Bt=(lt=M)[0]-(_t=Ee[je])[0])*(rn=lt[1]-(Mt=Ee[je+1])[1])-(Vt=lt[0]-Mt[0])*(qt=lt[1]-_t[1])==0&&Bt*Vt<=0&&qt*rn<=0)return!1;Wt(M,Ee[je],Ee[je+1])&&(Z=!Z)}var lt,_t,Mt,Bt,qt,Vt,rn;return Z}function Sn(M,O){for(var Z=0;Z<O.length;Z++)if(tn(M,O[Z]))return!0;return!1}function An(M,O,Z,ae){var lt=ae[0]-Z[0],_t=ae[1]-Z[1],Mt=(M[0]-Z[0])*_t-lt*(M[1]-Z[1]),Bt=(O[0]-Z[0])*_t-lt*(O[1]-Z[1]);return Mt>0&&Bt<0||Mt<0&&Bt>0}function Tn(M,O,Z){for(var ae=0,be=Z;ae<be.length;ae+=1)for(var Ee=be[ae],je=0;je<Ee.length-1;++je)if((Bt=[(Mt=Ee[je+1])[0]-(_t=Ee[je])[0],Mt[1]-_t[1]])[0]*(qt=[(lt=O)[0]-(Qe=M)[0],lt[1]-Qe[1]])[1]-Bt[1]*qt[0]!=0&&An(Qe,lt,_t,Mt)&&An(_t,Mt,Qe,lt))return!0;var Qe,lt,_t,Mt,Bt,qt;return!1}function an(M,O){for(var Z=0;Z<M.length;++Z)if(!tn(M[Z],O))return!1;for(var ae=0;ae<M.length-1;++ae)if(Tn(M[ae],M[ae+1],O))return!1;return!0}function mn(M,O){for(var Z=0;Z<O.length;Z++)if(an(M,O[Z]))return!0;return!1}function on(M,O,Z){for(var ae=[],be=0;be<M.length;be++){for(var Ee=[],je=0;je<M[be].length;je++){var Qe=zt(M[be][je],Z);$t(O,Qe),Ee.push(Qe)}ae.push(Ee)}return ae}function fn(M,O,Z){for(var ae=[],be=0;be<M.length;be++){var Ee=on(M[be],O,Z);ae.push(Ee)}return ae}function yn(M,O,Z,ae){if(M[0]<Z[0]||M[0]>Z[2]){var be=.5*ae,Ee=M[0]-Z[0]>be?-ae:Z[0]-M[0]>be?ae:0;0===Ee&&(Ee=M[0]-Z[2]>be?-ae:Z[2]-M[0]>be?ae:0),M[0]+=Ee}$t(O,M)}function Ln(M,O,Z,ae){for(var be=Math.pow(2,ae.z)*yr,Ee=[ae.x*yr,ae.y*yr],je=[],Qe=0,lt=M;Qe<lt.length;Qe+=1)for(var _t=0,Mt=lt[Qe];_t<Mt.length;_t+=1){var Bt=Mt[_t],qt=[Bt.x+Ee[0],Bt.y+Ee[1]];yn(qt,O,Z,be),je.push(qt)}return je}function Hn(M,O,Z,ae){for(var be=Math.pow(2,ae.z)*yr,Ee=[ae.x*yr,ae.y*yr],je=[],Qe=0,lt=M;Qe<lt.length;Qe+=1){for(var _t=[],Mt=0,Bt=lt[Qe];Mt<Bt.length;Mt+=1){var qt=Bt[Mt],Vt=[qt.x+Ee[0],qt.y+Ee[1]];$t(O,Vt),_t.push(Vt)}je.push(_t)}if(O[2]-O[0]<=be/2){(jn=O)[0]=jn[1]=1/0,jn[2]=jn[3]=-1/0;for(var rn=0,xn=je;rn<xn.length;rn+=1)for(var In=0,On=xn[rn];In<On.length;In+=1)yn(On[In],O,Z,be)}var jn;return je}var Wn=function(M,O){this.type=Pt,this.geojson=M,this.geometries=O};function Kn(M){if(M instanceof Gn&&("get"===M.name&&1===M.args.length||"feature-state"===M.name||"has"===M.name&&1===M.args.length||"properties"===M.name||"geometry-type"===M.name||"id"===M.name||/^filter-/.test(M.name))||M instanceof Wn)return!1;var O=!0;return M.eachChild(function(Z){O&&!Kn(Z)&&(O=!1)}),O}function nr(M){if(M instanceof Gn&&"feature-state"===M.name)return!1;var O=!0;return M.eachChild(function(Z){O&&!nr(Z)&&(O=!1)}),O}function er(M,O){if(M instanceof Gn&&O.indexOf(M.name)>=0)return!1;var Z=!0;return M.eachChild(function(ae){Z&&!er(ae,O)&&(Z=!1)}),Z}Wn.parse=function(M,O){if(2!==M.length)return O.error("'within' expression requires exactly one argument, but found "+(M.length-1)+" instead.");if(rr(M[1])){var Z=M[1];if("FeatureCollection"===Z.type)for(var ae=0;ae<Z.features.length;++ae){var be=Z.features[ae].geometry.type;if("Polygon"===be||"MultiPolygon"===be)return new Wn(Z,Z.features[ae].geometry)}else if("Feature"===Z.type){var Ee=Z.geometry.type;if("Polygon"===Ee||"MultiPolygon"===Ee)return new Wn(Z,Z.geometry)}else if("Polygon"===Z.type||"MultiPolygon"===Z.type)return new Wn(Z,Z)}return O.error("'within' expression requires valid geojson object that contains polygon geometry type.")},Wn.prototype.evaluate=function(M){if(null!=M.geometry()&&null!=M.canonicalID()){if("Point"===M.geometryType())return function(O,Z){var ae=[1/0,1/0,-1/0,-1/0],be=[1/0,1/0,-1/0,-1/0],Ee=O.canonicalID();if("Polygon"===Z.type){var je=on(Z.coordinates,be,Ee),Qe=Ln(O.geometry(),ae,be,Ee);if(!kn(ae,be))return!1;for(var lt=0,_t=Qe;lt<_t.length;lt+=1)if(!tn(_t[lt],je))return!1}if("MultiPolygon"===Z.type){var Mt=fn(Z.coordinates,be,Ee),Bt=Ln(O.geometry(),ae,be,Ee);if(!kn(ae,be))return!1;for(var qt=0,Vt=Bt;qt<Vt.length;qt+=1)if(!Sn(Vt[qt],Mt))return!1}return!0}(M,this.geometries);if("LineString"===M.geometryType())return function(O,Z){var ae=[1/0,1/0,-1/0,-1/0],be=[1/0,1/0,-1/0,-1/0],Ee=O.canonicalID();if("Polygon"===Z.type){var je=on(Z.coordinates,be,Ee),Qe=Hn(O.geometry(),ae,be,Ee);if(!kn(ae,be))return!1;for(var lt=0,_t=Qe;lt<_t.length;lt+=1)if(!an(_t[lt],je))return!1}if("MultiPolygon"===Z.type){var Mt=fn(Z.coordinates,be,Ee),Bt=Hn(O.geometry(),ae,be,Ee);if(!kn(ae,be))return!1;for(var qt=0,Vt=Bt;qt<Vt.length;qt+=1)if(!mn(Vt[qt],Mt))return!1}return!0}(M,this.geometries)}return!1},Wn.prototype.eachChild=function(){},Wn.prototype.outputDefined=function(){return!0},Wn.prototype.serialize=function(){return["within",this.geojson]};var or=function(M,O){this.type=O.type,this.name=M,this.boundExpression=O};or.parse=function(M,O){if(2!==M.length||"string"!=typeof M[1])return O.error("'var' expression requires exactly one string literal argument.");var Z=M[1];return O.scope.has(Z)?new or(Z,O.scope.get(Z)):O.error('Unknown variable "'+Z+'". Make sure "'+Z+'" has been bound in an enclosing "let" expression before using it.',1)},or.prototype.evaluate=function(M){return this.boundExpression.evaluate(M)},or.prototype.eachChild=function(){},or.prototype.outputDefined=function(){return!1},or.prototype.serialize=function(){return["var",this.name]};var ir=function(M,O,Z,ae,be){void 0===O&&(O=[]),void 0===ae&&(ae=new At),void 0===be&&(be=[]),this.registry=M,this.path=O,this.key=O.map(function(Ee){return"["+Ee+"]"}).join(""),this.scope=ae,this.errors=be,this.expectedType=Z};function lr(M){if(M instanceof or)return lr(M.boundExpression);if(M instanceof Gn&&"error"===M.name||M instanceof ar||M instanceof Wn)return!1;var O=M instanceof _n||M instanceof ur,Z=!0;return M.eachChild(function(ae){Z=O?Z&&lr(ae):Z&&ae instanceof fr}),!!Z&&Kn(M)&&er(M,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"])}function br(M,O){for(var Z,be=M.length-1,Ee=0,je=be,Qe=0;Ee<=je;)if((Z=M[Qe=Math.floor((Ee+je)/2)])<=O){if(Qe===be||O<M[Qe+1])return Qe;Ee=Qe+1}else{if(!(Z>O))throw new Zn("Input is not a number.");je=Qe-1}return 0}ir.prototype.parse=function(M,O,Z,ae,be){return void 0===be&&(be={}),O?this.concat(O,Z,ae)._parse(M,be):this._parse(M,be)},ir.prototype._parse=function(M,O){function Z(_t,Mt,Bt){return"assert"===Bt?new ur(Mt,[_t]):"coerce"===Bt?new _n(Mt,[_t]):_t}if(null!==M&&"string"!=typeof M&&"boolean"!=typeof M&&"number"!=typeof M||(M=["literal",M]),Array.isArray(M)){if(0===M.length)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var ae=M[0];if("string"!=typeof ae)return this.error("Expression name must be a string, but found "+typeof ae+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var be=this.registry[ae];if(be){var Ee=be.parse(M,this);if(!Ee)return null;if(this.expectedType){var je=this.expectedType,Qe=Ee.type;if("string"!==je.kind&&"number"!==je.kind&&"boolean"!==je.kind&&"object"!==je.kind&&"array"!==je.kind||"value"!==Qe.kind)if("color"!==je.kind&&"formatted"!==je.kind&&"resolvedImage"!==je.kind||"value"!==Qe.kind&&"string"!==Qe.kind){if(this.checkSubtype(je,Qe))return null}else Ee=Z(Ee,je,O.typeAnnotation||"coerce");else Ee=Z(Ee,je,O.typeAnnotation||"assert")}if(!(Ee instanceof fr)&&"resolvedImage"!==Ee.type.kind&&lr(Ee)){var lt=new Un;try{Ee=new fr(Ee.type,Ee.evaluate(lt))}catch(_t){return this.error(_t.message),null}}return Ee}return this.error('Unknown expression "'+ae+'". If you wanted a literal array, use ["literal", [...]].',0)}return this.error(void 0===M?"'undefined' value invalid. Use null instead.":"object"==typeof M?'Bare objects invalid. Use ["literal", {...}] instead.':"Expected an array, but found "+typeof M+" instead.")},ir.prototype.concat=function(M,O,Z){var ae="number"==typeof M?this.path.concat(M):this.path,be=Z?this.scope.concat(Z):this.scope;return new ir(this.registry,ae,O||null,be,this.errors)},ir.prototype.error=function(M){for(var O=[],Z=arguments.length-1;Z-- >0;)O[Z]=arguments[Z+1];var ae=""+this.key+O.map(function(be){return"["+be+"]"}).join("");this.errors.push(new Et(ae,M))},ir.prototype.checkSubtype=function(M,O){var Z=Bn(M,O);return Z&&this.error(Z),Z};var Ur=function(M,O,Z){this.type=M,this.input=O,this.labels=[],this.outputs=[];for(var ae=0,be=Z;ae<be.length;ae+=1){var Ee=be[ae],Qe=Ee[1];this.labels.push(Ee[0]),this.outputs.push(Qe)}};function Sr(M,O,Z){return M*(1-Z)+O*Z}Ur.parse=function(M,O){if(M.length-1<4)return O.error("Expected at least 4 arguments, but found only "+(M.length-1)+".");if((M.length-1)%2!=0)return O.error("Expected an even number of arguments.");var Z=O.parse(M[1],1,pt);if(!Z)return null;var ae=[],be=null;O.expectedType&&"value"!==O.expectedType.kind&&(be=O.expectedType);for(var Ee=1;Ee<M.length;Ee+=2){var je=1===Ee?-1/0:M[Ee],Qe=M[Ee+1],lt=Ee,_t=Ee+1;if("number"!=typeof je)return O.error('Input/output pairs for "step" expressions must be defined using literal numeric values (not computed expressions) for the input values.',lt);if(ae.length&&ae[ae.length-1][0]>=je)return O.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',lt);var Mt=O.parse(Qe,_t,be);if(!Mt)return null;be=be||Mt.type,ae.push([je,Mt])}return new Ur(be,Z,ae)},Ur.prototype.evaluate=function(M){var O=this.labels,Z=this.outputs;if(1===O.length)return Z[0].evaluate(M);var ae=this.input.evaluate(M);if(ae<=O[0])return Z[0].evaluate(M);var be=O.length;return ae>=O[be-1]?Z[be-1].evaluate(M):Z[br(O,ae)].evaluate(M)},Ur.prototype.eachChild=function(M){M(this.input);for(var O=0,Z=this.outputs;O<Z.length;O+=1)M(Z[O])},Ur.prototype.outputDefined=function(){return this.outputs.every(function(M){return M.outputDefined()})},Ur.prototype.serialize=function(){for(var M=["step",this.input.serialize()],O=0;O<this.labels.length;O++)O>0&&M.push(this.labels[O]),M.push(this.outputs[O].serialize());return M};var cr=Object.freeze({__proto__:null,number:Sr,color:function(M,O,Z){return new hn(Sr(M.r,O.r,Z),Sr(M.g,O.g,Z),Sr(M.b,O.b,Z),Sr(M.a,O.a,Z))},array:function(M,O,Z){return M.map(function(ae,be){return Sr(ae,O[be],Z)})}}),li=4/29,Mi=6/29,Pi=3*Mi*Mi,Ea=Math.PI/180,Ui=180/Math.PI;function vi(M){return M>.008856451679035631?Math.pow(M,.3333333333333333):M/Pi+li}function La(M){return M>Mi?M*M*M:Pi*(M-li)}function to(M){return 255*(M<=.0031308?12.92*M:1.055*Math.pow(M,.4166666666666667)-.055)}function qo(M){return(M/=255)<=.04045?M/12.92:Math.pow((M+.055)/1.055,2.4)}function Go(M){var O=qo(M.r),Z=qo(M.g),ae=qo(M.b),be=vi((.4124564*O+.3575761*Z+.1804375*ae)/.95047),Ee=vi((.2126729*O+.7151522*Z+.072175*ae)/1);return{l:116*Ee-16,a:500*(be-Ee),b:200*(Ee-vi((.0193339*O+.119192*Z+.9503041*ae)/1.08883)),alpha:M.a}}function il(M){var O=(M.l+16)/116,Z=isNaN(M.a)?O:O+M.a/500,ae=isNaN(M.b)?O:O-M.b/200;return O=1*La(O),Z=.95047*La(Z),ae=1.08883*La(ae),new hn(to(3.2404542*Z-1.5371385*O-.4985314*ae),to(-.969266*Z+1.8760108*O+.041556*ae),to(.0556434*Z-.2040259*O+1.0572252*ae),M.alpha)}function Us(M,O,Z){var ae=O-M;return M+Z*(ae>180||ae<-180?ae-360*Math.round(ae/360):ae)}var Zo={forward:Go,reverse:il,interpolate:function(M,O,Z){return{l:Sr(M.l,O.l,Z),a:Sr(M.a,O.a,Z),b:Sr(M.b,O.b,Z),alpha:Sr(M.alpha,O.alpha,Z)}}},Ta={forward:function(M){var O=Go(M),Z=O.l,ae=O.a,be=O.b,Ee=Math.atan2(be,ae)*Ui;return{h:Ee<0?Ee+360:Ee,c:Math.sqrt(ae*ae+be*be),l:Z,alpha:M.a}},reverse:function(M){var O=M.h*Ea,Z=M.c;return il({l:M.l,a:Math.cos(O)*Z,b:Math.sin(O)*Z,alpha:M.alpha})},interpolate:function(M,O,Z){return{h:Us(M.h,O.h,Z),c:Sr(M.c,O.c,Z),l:Sr(M.l,O.l,Z),alpha:Sr(M.alpha,O.alpha,Z)}}},Vs=Object.freeze({__proto__:null,lab:Zo,hcl:Ta}),zi=function(M,O,Z,ae,be){this.type=M,this.operator=O,this.interpolation=Z,this.input=ae,this.labels=[],this.outputs=[];for(var Ee=0,je=be;Ee<je.length;Ee+=1){var Qe=je[Ee],_t=Qe[1];this.labels.push(Qe[0]),this.outputs.push(_t)}};function ss(M,O,Z,ae){var be=ae-Z,Ee=M-Z;return 0===be?0:1===O?Ee/be:(Math.pow(O,Ee)-1)/(Math.pow(O,be)-1)}zi.interpolationFactor=function(M,O,Z,ae){var be=0;if("exponential"===M.name)be=ss(O,M.base,Z,ae);else if("linear"===M.name)be=ss(O,1,Z,ae);else if("cubic-bezier"===M.name){var Ee=M.controlPoints;be=new d(Ee[0],Ee[1],Ee[2],Ee[3]).solve(ss(O,1,Z,ae))}return be},zi.parse=function(M,O){var Z=M[0],ae=M[1],be=M[2],Ee=M.slice(3);if(!Array.isArray(ae)||0===ae.length)return O.error("Expected an interpolation type expression.",1);if("linear"===ae[0])ae={name:"linear"};else if("exponential"===ae[0]){var je=ae[1];if("number"!=typeof je)return O.error("Exponential interpolation requires a numeric base.",1,1);ae={name:"exponential",base:je}}else{if("cubic-bezier"!==ae[0])return O.error("Unknown interpolation type "+String(ae[0]),1,0);var Qe=ae.slice(1);if(4!==Qe.length||Qe.some(function(In){return"number"!=typeof In||In<0||In>1}))return O.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ae={name:"cubic-bezier",controlPoints:Qe}}if(M.length-1<4)return O.error("Expected at least 4 arguments, but found only "+(M.length-1)+".");if((M.length-1)%2!=0)return O.error("Expected an even number of arguments.");if(!(be=O.parse(be,2,pt)))return null;var lt=[],_t=null;"interpolate-hcl"===Z||"interpolate-lab"===Z?_t=Ot:O.expectedType&&"value"!==O.expectedType.kind&&(_t=O.expectedType);for(var Mt=0;Mt<Ee.length;Mt+=2){var Bt=Ee[Mt],qt=Ee[Mt+1],Vt=Mt+3,rn=Mt+4;if("number"!=typeof Bt)return O.error('Input/output pairs for "interpolate" expressions must be defined using literal numeric values (not computed expressions) for the input values.',Vt);if(lt.length&&lt[lt.length-1][0]>=Bt)return O.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',Vt);var xn=O.parse(qt,rn,_t);if(!xn)return null;_t=_t||xn.type,lt.push([Bt,xn])}return"number"===_t.kind||"color"===_t.kind||"array"===_t.kind&&"number"===_t.itemType.kind&&"number"==typeof _t.N?new zi(_t,Z,ae,be,lt):O.error("Type "+Kt(_t)+" is not interpolatable.")},zi.prototype.evaluate=function(M){var O=this.labels,Z=this.outputs;if(1===O.length)return Z[0].evaluate(M);var ae=this.input.evaluate(M);if(ae<=O[0])return Z[0].evaluate(M);var be=O.length;if(ae>=O[be-1])return Z[be-1].evaluate(M);var Ee=br(O,ae),lt=zi.interpolationFactor(this.interpolation,ae,O[Ee],O[Ee+1]),_t=Z[Ee].evaluate(M),Mt=Z[Ee+1].evaluate(M);return"interpolate"===this.operator?cr[this.type.kind.toLowerCase()](_t,Mt,lt):"interpolate-hcl"===this.operator?Ta.reverse(Ta.interpolate(Ta.forward(_t),Ta.forward(Mt),lt)):Zo.reverse(Zo.interpolate(Zo.forward(_t),Zo.forward(Mt),lt))},zi.prototype.eachChild=function(M){M(this.input);for(var O=0,Z=this.outputs;O<Z.length;O+=1)M(Z[O])},zi.prototype.outputDefined=function(){return this.outputs.every(function(M){return M.outputDefined()})},zi.prototype.serialize=function(){var M;M="linear"===this.interpolation.name?["linear"]:"exponential"===this.interpolation.name?1===this.interpolation.base?["linear"]:["exponential",this.interpolation.base]:["cubic-bezier"].concat(this.interpolation.controlPoints);for(var O=[this.operator,M,this.input.serialize()],Z=0;Z<this.labels.length;Z++)O.push(this.labels[Z],this.outputs[Z].serialize());return O};var ma=function(M,O){this.type=M,this.args=O};ma.parse=function(M,O){if(M.length<2)return O.error("Expectected at least one argument.");var Z=null,ae=O.expectedType;ae&&"value"!==ae.kind&&(Z=ae);for(var be=[],Ee=0,je=M.slice(1);Ee<je.length;Ee+=1){var lt=O.parse(je[Ee],1+be.length,Z,void 0,{typeAnnotation:"omit"});if(!lt)return null;Z=Z||lt.type,be.push(lt)}var _t=ae&&be.some(function(Mt){return Bn(ae,Mt.type)});return new ma(_t?jt:Z,be)},ma.prototype.evaluate=function(M){for(var O,Z=null,ae=0,be=0,Ee=this.args;be<Ee.length&&(ae++,(Z=Ee[be].evaluate(M))&&Z instanceof Nn&&!Z.available&&(O||(O=Z.name),Z=null,ae===this.args.length&&(Z=O)),null===Z);be+=1);return Z},ma.prototype.eachChild=function(M){this.args.forEach(M)},ma.prototype.outputDefined=function(){return this.args.every(function(M){return M.outputDefined()})},ma.prototype.serialize=function(){var M=["coalesce"];return this.eachChild(function(O){M.push(O.serialize())}),M};var ka=function(M,O){this.type=O.type,this.bindings=[].concat(M),this.result=O};ka.prototype.evaluate=function(M){return this.result.evaluate(M)},ka.prototype.eachChild=function(M){for(var O=0,Z=this.bindings;O<Z.length;O+=1)M(Z[O][1]);M(this.result)},ka.parse=function(M,O){if(M.length<4)return O.error("Expected at least 3 arguments, but found "+(M.length-1)+" instead.");for(var Z=[],ae=1;ae<M.length-1;ae+=2){var be=M[ae];if("string"!=typeof be)return O.error("Expected string, but found "+typeof be+" instead.",ae);if(/[^a-zA-Z0-9_]/.test(be))return O.error("Variable names must contain only alphanumeric characters or '_'.",ae);var Ee=O.parse(M[ae+1],ae+1);if(!Ee)return null;Z.push([be,Ee])}var je=O.parse(M[M.length-1],M.length-1,O.expectedType,Z);return je?new ka(Z,je):null},ka.prototype.outputDefined=function(){return this.result.outputDefined()},ka.prototype.serialize=function(){for(var M=["let"],O=0,Z=this.bindings;O<Z.length;O+=1){var ae=Z[O];M.push(ae[0],ae[1].serialize())}return M.push(this.result.serialize()),M};var vo=function(M,O,Z){this.type=M,this.index=O,this.input=Z};vo.parse=function(M,O){if(3!==M.length)return O.error("Expected 2 arguments, but found "+(M.length-1)+" instead.");var Z=O.parse(M[1],1,pt),ae=O.parse(M[2],2,pn(O.expectedType||jt));return Z&&ae?new vo(ae.type.itemType,Z,ae):null},vo.prototype.evaluate=function(M){var O=this.index.evaluate(M),Z=this.input.evaluate(M);if(O<0)throw new Zn("Array index out of bounds: "+O+" < 0.");if(O>=Z.length)throw new Zn("Array index out of bounds: "+O+" > "+(Z.length-1)+".");if(O!==Math.floor(O))throw new Zn("Array index must be an integer, but found "+O+" instead.");return Z[O]},vo.prototype.eachChild=function(M){M(this.index),M(this.input)},vo.prototype.outputDefined=function(){return!1},vo.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var Qr=function(M,O){this.type=Pt,this.needle=M,this.haystack=O};Qr.parse=function(M,O){if(3!==M.length)return O.error("Expected 2 arguments, but found "+(M.length-1)+" instead.");var Z=O.parse(M[1],1,jt),ae=O.parse(M[2],2,jt);return Z&&ae?vn(Z.type,[Pt,gt,pt,ht,jt])?new Qr(Z,ae):O.error("Expected first argument to be of type boolean, string, number or null, but found "+Kt(Z.type)+" instead"):null},Qr.prototype.evaluate=function(M){var O=this.needle.evaluate(M),Z=this.haystack.evaluate(M);if(!Z)return!1;if(!cn(O,["boolean","string","number","null"]))throw new Zn("Expected first argument to be of type boolean, string, number or null, but found "+Kt($n(O))+" instead.");if(!cn(Z,["string","array"]))throw new Zn("Expected second argument to be of type array or string, but found "+Kt($n(Z))+" instead.");return Z.indexOf(O)>=0},Qr.prototype.eachChild=function(M){M(this.needle),M(this.haystack)},Qr.prototype.outputDefined=function(){return!0},Qr.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var mo=function(M,O,Z){this.type=pt,this.needle=M,this.haystack=O,this.fromIndex=Z};mo.parse=function(M,O){if(M.length<=2||M.length>=5)return O.error("Expected 3 or 4 arguments, but found "+(M.length-1)+" instead.");var Z=O.parse(M[1],1,jt),ae=O.parse(M[2],2,jt);if(!Z||!ae)return null;if(!vn(Z.type,[Pt,gt,pt,ht,jt]))return O.error("Expected first argument to be of type boolean, string, number or null, but found "+Kt(Z.type)+" instead");if(4===M.length){var be=O.parse(M[3],3,pt);return be?new mo(Z,ae,be):null}return new mo(Z,ae)},mo.prototype.evaluate=function(M){var O=this.needle.evaluate(M),Z=this.haystack.evaluate(M);if(!cn(O,["boolean","string","number","null"]))throw new Zn("Expected first argument to be of type boolean, string, number or null, but found "+Kt($n(O))+" instead.");if(!cn(Z,["string","array"]))throw new Zn("Expected second argument to be of type array or string, but found "+Kt($n(Z))+" instead.");if(this.fromIndex){var ae=this.fromIndex.evaluate(M);return Z.indexOf(O,ae)}return Z.indexOf(O)},mo.prototype.eachChild=function(M){M(this.needle),M(this.haystack),this.fromIndex&&M(this.fromIndex)},mo.prototype.outputDefined=function(){return!1},mo.prototype.serialize=function(){if(null!=this.fromIndex&&void 0!==this.fromIndex){var M=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),M]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Ca=function(M,O,Z,ae,be,Ee){this.inputType=M,this.type=O,this.input=Z,this.cases=ae,this.outputs=be,this.otherwise=Ee};Ca.parse=function(M,O){if(M.length<5)return O.error("Expected at least 4 arguments, but found only "+(M.length-1)+".");if(M.length%2!=1)return O.error("Expected an even number of arguments.");var Z,ae;O.expectedType&&"value"!==O.expectedType.kind&&(ae=O.expectedType);for(var be={},Ee=[],je=2;je<M.length-1;je+=2){var Qe=M[je],lt=M[je+1];Array.isArray(Qe)||(Qe=[Qe]);var _t=O.concat(je);if(0===Qe.length)return _t.error("Expected at least one branch label.");for(var Mt=0,Bt=Qe;Mt<Bt.length;Mt+=1){var qt=Bt[Mt];if("number"!=typeof qt&&"string"!=typeof qt)return _t.error("Branch labels must be numbers or strings.");if("number"==typeof qt&&Math.abs(qt)>Number.MAX_SAFE_INTEGER)return _t.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if("number"==typeof qt&&Math.floor(qt)!==qt)return _t.error("Numeric branch labels must be integer values.");if(Z){if(_t.checkSubtype(Z,$n(qt)))return null}else Z=$n(qt);if(void 0!==be[String(qt)])return _t.error("Branch labels must be unique.");be[String(qt)]=Ee.length}var Vt=O.parse(lt,je,ae);if(!Vt)return null;ae=ae||Vt.type,Ee.push(Vt)}var rn=O.parse(M[1],1,jt);if(!rn)return null;var xn=O.parse(M[M.length-1],M.length-1,ae);return xn?"value"!==rn.type.kind&&O.concat(1).checkSubtype(Z,rn.type)?null:new Ca(Z,ae,rn,be,Ee,xn):null},Ca.prototype.evaluate=function(M){var O=this.input.evaluate(M);return($n(O)===this.inputType&&this.outputs[this.cases[O]]||this.otherwise).evaluate(M)},Ca.prototype.eachChild=function(M){M(this.input),this.outputs.forEach(M),M(this.otherwise)},Ca.prototype.outputDefined=function(){return this.outputs.every(function(M){return M.outputDefined()})&&this.otherwise.outputDefined()},Ca.prototype.serialize=function(){for(var M=this,O=["match",this.input.serialize()],Z=[],ae={},be=0,Ee=Object.keys(this.cases).sort();be<Ee.length;be+=1){var je=Ee[be];void 0===(Bt=ae[this.cases[je]])?(ae[this.cases[je]]=Z.length,Z.push([this.cases[je],[je]])):Z[Bt][1].push(je)}for(var Qe=function(Vt){return"number"===M.inputType.kind?Number(Vt):Vt},lt=0,_t=Z;lt<_t.length;lt+=1){var Mt=_t[lt],Bt=Mt[0],qt=Mt[1];O.push(1===qt.length?Qe(qt[0]):qt.map(Qe)),O.push(this.outputs[outputIndex$1].serialize())}return O.push(this.otherwise.serialize()),O};var Ua=function(M,O,Z){this.type=M,this.branches=O,this.otherwise=Z};Ua.parse=function(M,O){if(M.length<4)return O.error("Expected at least 3 arguments, but found only "+(M.length-1)+".");if(M.length%2!=0)return O.error("Expected an odd number of arguments.");var Z;O.expectedType&&"value"!==O.expectedType.kind&&(Z=O.expectedType);for(var ae=[],be=1;be<M.length-1;be+=2){var Ee=O.parse(M[be],be,Pt);if(!Ee)return null;var je=O.parse(M[be+1],be+1,Z);if(!je)return null;ae.push([Ee,je]),Z=Z||je.type}var Qe=O.parse(M[M.length-1],M.length-1,Z);return Qe?new Ua(Z,ae,Qe):null},Ua.prototype.evaluate=function(M){for(var O=0,Z=this.branches;O<Z.length;O+=1){var ae=Z[O],Ee=ae[1];if(ae[0].evaluate(M))return Ee.evaluate(M)}return this.otherwise.evaluate(M)},Ua.prototype.eachChild=function(M){for(var O=0,Z=this.branches;O<Z.length;O+=1){var ae=Z[O],Ee=ae[1];M(ae[0]),M(Ee)}M(this.otherwise)},Ua.prototype.outputDefined=function(){return this.branches.every(function(M){return M[1].outputDefined()})&&this.otherwise.outputDefined()},Ua.prototype.serialize=function(){var M=["case"];return this.eachChild(function(O){M.push(O.serialize())}),M};var Ya=function(M,O,Z,ae){this.type=M,this.input=O,this.beginIndex=Z,this.endIndex=ae};function ls(M,O){return"=="===M||"!="===M?"boolean"===O.kind||"string"===O.kind||"number"===O.kind||"null"===O.kind||"value"===O.kind:"string"===O.kind||"number"===O.kind||"value"===O.kind}function al(M,O,Z,ae){return 0===ae.compare(O,Z)}function no(M,O,Z){var ae="=="!==M&&"!="!==M;return function(){function be(Ee,je,Qe){this.type=Pt,this.lhs=Ee,this.rhs=je,this.collator=Qe,this.hasUntypedArgument="value"===Ee.type.kind||"value"===je.type.kind}return be.parse=function(Ee,je){if(3!==Ee.length&&4!==Ee.length)return je.error("Expected two or three arguments.");var Qe=Ee[0],lt=je.parse(Ee[1],1,jt);if(!lt)return null;if(!ls(Qe,lt.type))return je.concat(1).error('"'+Qe+"\" comparisons are not supported for type '"+Kt(lt.type)+"'.");var _t=je.parse(Ee[2],2,jt);if(!_t)return null;if(!ls(Qe,_t.type))return je.concat(2).error('"'+Qe+"\" comparisons are not supported for type '"+Kt(_t.type)+"'.");if(lt.type.kind!==_t.type.kind&&"value"!==lt.type.kind&&"value"!==_t.type.kind)return je.error("Cannot compare types '"+Kt(lt.type)+"' and '"+Kt(_t.type)+"'.");ae&&("value"===lt.type.kind&&"value"!==_t.type.kind?lt=new ur(_t.type,[lt]):"value"!==lt.type.kind&&"value"===_t.type.kind&&(_t=new ur(lt.type,[_t])));var Mt=null;if(4===Ee.length){if("string"!==lt.type.kind&&"string"!==_t.type.kind&&"value"!==lt.type.kind&&"value"!==_t.type.kind)return je.error("Cannot use collator to compare non-string types.");if(!(Mt=je.parse(Ee[3],3,Nt)))return null}return new be(lt,_t,Mt)},be.prototype.evaluate=function(Ee){var je=this.lhs.evaluate(Ee),Qe=this.rhs.evaluate(Ee);if(ae&&this.hasUntypedArgument){var lt=$n(je),_t=$n(Qe);if(lt.kind!==_t.kind||"string"!==lt.kind&&"number"!==lt.kind)throw new Zn('Expected arguments for "'+M+'" to be (string, string) or (number, number), but found ('+lt.kind+", "+_t.kind+") instead.")}if(this.collator&&!ae&&this.hasUntypedArgument){var Mt=$n(je),Bt=$n(Qe);if("string"!==Mt.kind||"string"!==Bt.kind)return O(Ee,je,Qe)}return this.collator?Z(Ee,je,Qe,this.collator.evaluate(Ee)):O(Ee,je,Qe)},be.prototype.eachChild=function(Ee){Ee(this.lhs),Ee(this.rhs),this.collator&&Ee(this.collator)},be.prototype.outputDefined=function(){return!0},be.prototype.serialize=function(){var Ee=[M];return this.eachChild(function(je){Ee.push(je.serialize())}),Ee},be}()}Ya.parse=function(M,O){if(M.length<=2||M.length>=5)return O.error("Expected 3 or 4 arguments, but found "+(M.length-1)+" instead.");var Z=O.parse(M[1],1,jt),ae=O.parse(M[2],2,pt);if(!Z||!ae)return null;if(!vn(Z.type,[pn(jt),gt,jt]))return O.error("Expected first argument to be of type array or string, but found "+Kt(Z.type)+" instead");if(4===M.length){var be=O.parse(M[3],3,pt);return be?new Ya(Z.type,Z,ae,be):null}return new Ya(Z.type,Z,ae)},Ya.prototype.evaluate=function(M){var O=this.input.evaluate(M),Z=this.beginIndex.evaluate(M);if(!cn(O,["string","array"]))throw new Zn("Expected first argument to be of type array or string, but found "+Kt($n(O))+" instead.");if(this.endIndex){var ae=this.endIndex.evaluate(M);return O.slice(Z,ae)}return O.slice(Z)},Ya.prototype.eachChild=function(M){M(this.input),M(this.beginIndex),this.endIndex&&M(this.endIndex)},Ya.prototype.outputDefined=function(){return!1},Ya.prototype.serialize=function(){if(null!=this.endIndex&&void 0!==this.endIndex){var M=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),M]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};var ol=no("==",function(M,O,Z){return O===Z},al),sl=no("!=",function(M,O,Z){return O!==Z},function(M,O,Z,ae){return!al(0,O,Z,ae)}),ml=no("<",function(M,O,Z){return O<Z},function(M,O,Z,ae){return ae.compare(O,Z)<0}),Hs=no(">",function(M,O,Z){return O>Z},function(M,O,Z,ae){return ae.compare(O,Z)>0}),ll=no("<=",function(M,O,Z){return O<=Z},function(M,O,Z,ae){return ae.compare(O,Z)<=0}),qs=no(">=",function(M,O,Z){return O>=Z},function(M,O,Z,ae){return ae.compare(O,Z)>=0}),ro=function(M,O,Z,ae,be){this.type=gt,this.number=M,this.locale=O,this.currency=Z,this.minFractionDigits=ae,this.maxFractionDigits=be};ro.parse=function(M,O){if(3!==M.length)return O.error("Expected two arguments.");var Z=O.parse(M[1],1,pt);if(!Z)return null;var ae=M[2];if("object"!=typeof ae||Array.isArray(ae))return O.error("NumberFormat options argument must be an object.");var be=null;if(ae.locale&&!(be=O.parse(ae.locale,1,gt)))return null;var Ee=null;if(ae.currency&&!(Ee=O.parse(ae.currency,1,gt)))return null;var je=null;if(ae["min-fraction-digits"]&&!(je=O.parse(ae["min-fraction-digits"],1,pt)))return null;var Qe=null;return ae["max-fraction-digits"]&&!(Qe=O.parse(ae["max-fraction-digits"],1,pt))?null:new ro(Z,be,Ee,je,Qe)},ro.prototype.evaluate=function(M){return new Intl.NumberFormat(this.locale?this.locale.evaluate(M):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(M):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(M):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(M):void 0}).format(this.number.evaluate(M))},ro.prototype.eachChild=function(M){M(this.number),this.locale&&M(this.locale),this.currency&&M(this.currency),this.minFractionDigits&&M(this.minFractionDigits),this.maxFractionDigits&&M(this.maxFractionDigits)},ro.prototype.outputDefined=function(){return!1},ro.prototype.serialize=function(){var M={};return this.locale&&(M.locale=this.locale.serialize()),this.currency&&(M.currency=this.currency.serialize()),this.minFractionDigits&&(M["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(M["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),M]};var io=function(M){this.type=pt,this.input=M};io.parse=function(M,O){if(2!==M.length)return O.error("Expected 1 argument, but found "+(M.length-1)+" instead.");var Z=O.parse(M[1],1);return Z?"array"!==Z.type.kind&&"string"!==Z.type.kind&&"value"!==Z.type.kind?O.error("Expected argument of type string or array, but found "+Kt(Z.type)+" instead."):new io(Z):null},io.prototype.evaluate=function(M){var O=this.input.evaluate(M);if("string"==typeof O||Array.isArray(O))return O.length;throw new Zn("Expected value to be of type string or array, but found "+Kt($n(O))+" instead.")},io.prototype.eachChild=function(M){M(this.input)},io.prototype.outputDefined=function(){return!1},io.prototype.serialize=function(){var M=["length"];return this.eachChild(function(O){M.push(O.serialize())}),M};var Wo={"==":ol,"!=":sl,">":Hs,"<":ml,">=":qs,"<=":ll,array:ur,at:vo,boolean:ur,case:Ua,coalesce:ma,collator:ar,format:Zt,image:nn,in:Qr,"index-of":mo,interpolate:zi,"interpolate-hcl":zi,"interpolate-lab":zi,length:io,let:ka,literal:fr,match:Ca,number:ur,"number-format":ro,object:ur,slice:Ya,step:Ur,string:ur,"to-boolean":_n,"to-color":_n,"to-number":_n,"to-string":_n,var:or,within:Wn};function ao(M,O){var Z=O[0],ae=O[1],be=O[2],Ee=O[3];Z=Z.evaluate(M),ae=ae.evaluate(M),be=be.evaluate(M);var je=Ee?Ee.evaluate(M):1,Qe=Fn(Z,ae,be,je);if(Qe)throw new Zn(Qe);return new hn(Z/255*je,ae/255*je,be/255*je,je)}function Gs(M,O){return M in O}function Zs(M,O){var Z=O[M];return void 0===Z?null:Z}function Co(M){return{type:M}}function Ms(M){return{result:"success",value:M}}function yo(M){return{result:"error",value:M}}function Yo(M){return"data-driven"===M["property-type"]||"cross-faded-data-driven"===M["property-type"]}function Po(M){return!!M.expression&&M.expression.parameters.indexOf("zoom")>-1}function oo(M){return!!M.expression&&M.expression.interpolated}function ei(M){return M instanceof Number?"number":M instanceof String?"string":M instanceof Boolean?"boolean":Array.isArray(M)?"array":null===M?"null":typeof M}function xo(M){return"object"==typeof M&&null!==M&&!Array.isArray(M)}function yl(M){return M}function Ss(M,O){var Z,ae,be,Ee="color"===O.type,je=M.stops&&"object"==typeof M.stops[0][0],lt=je||!(je||void 0!==M.property),_t=M.type||(oo(O)?"exponential":"interval");if(Ee&&((M=st({},M)).stops&&(M.stops=M.stops.map(function(pr){return[pr[0],hn.parse(pr[1])]})),M.default=hn.parse(M.default?M.default:O.default)),M.colorSpace&&"rgb"!==M.colorSpace&&!Vs[M.colorSpace])throw new Error("Unknown color space: "+M.colorSpace);if("exponential"===_t)Z=Pa;else if("interval"===_t)Z=Xo;else if("categorical"===_t){Z=Oo,ae=Object.create(null);for(var Mt=0,Bt=M.stops;Mt<Bt.length;Mt+=1){var qt=Bt[Mt];ae[qt[0]]=qt[1]}be=typeof M.stops[0][0]}else{if("identity"!==_t)throw new Error('Unknown function type "'+_t+'"');Z=Ws}if(je){for(var Vt={},rn=[],xn=0;xn<M.stops.length;xn++){var In=M.stops[xn],On=In[0].zoom;void 0===Vt[On]&&(Vt[On]={zoom:On,type:M.type,property:M.property,default:M.default,stops:[]},rn.push(On)),Vt[On].stops.push([In[0].value,In[1]])}for(var jn=[],Vn=0,Yn=rn;Vn<Yn.length;Vn+=1){var Qn=Yn[Vn];jn.push([Vt[Qn].zoom,Ss(Vt[Qn],O)])}var tr={name:"linear"};return{kind:"composite",interpolationType:tr,interpolationFactor:zi.interpolationFactor.bind(void 0,tr),zoomStops:jn.map(function(pr){return pr[0]}),evaluate:function(pr,Tr){var Er=pr.zoom;return Pa({stops:jn,base:M.base},O,Er).evaluate(Er,Tr)}}}if(lt){var xr="exponential"===_t?{name:"exponential",base:void 0!==M.base?M.base:1}:null;return{kind:"camera",interpolationType:xr,interpolationFactor:zi.interpolationFactor.bind(void 0,xr),zoomStops:M.stops.map(function(pr){return pr[0]}),evaluate:function(pr){return Z(M,O,pr.zoom,ae,be)}}}return{kind:"source",evaluate:function(pr,Tr){var Er=Tr&&Tr.properties?Tr.properties[M.property]:void 0;return void 0===Er?us(M.default,O.default):Z(M,O,Er,ae,be)}}}function us(M,O,Z){return void 0!==M?M:void 0!==O?O:void 0!==Z?Z:void 0}function Oo(M,O,Z,ae,be){return us(typeof Z===be?ae[Z]:void 0,M.default,O.default)}function Xo(M,O,Z){if("number"!==ei(Z))return us(M.default,O.default);var ae=M.stops.length;if(1===ae||Z<=M.stops[0][0])return M.stops[0][1];if(Z>=M.stops[ae-1][0])return M.stops[ae-1][1];var be=br(M.stops.map(function(Ee){return Ee[0]}),Z);return M.stops[be][1]}function Pa(M,O,Z){var ae=void 0!==M.base?M.base:1;if("number"!==ei(Z))return us(M.default,O.default);var be=M.stops.length;if(1===be||Z<=M.stops[0][0])return M.stops[0][1];if(Z>=M.stops[be-1][0])return M.stops[be-1][1];var qt,Vt,xn,In,Ee=br(M.stops.map(function(Bt){return Bt[0]}),Z),je=(qt=ae,In=Z-(Vt=M.stops[Ee][0]),0==(xn=M.stops[Ee+1][0]-Vt)?0:1===qt?In/xn:(Math.pow(qt,In)-1)/(Math.pow(qt,xn)-1)),Qe=M.stops[Ee][1],lt=M.stops[Ee+1][1],_t=cr[O.type]||yl;if(M.colorSpace&&"rgb"!==M.colorSpace){var Mt=Vs[M.colorSpace];_t=function(Bt,qt){return Mt.reverse(Mt.interpolate(Mt.forward(Bt),Mt.forward(qt),je))}}return"function"==typeof Qe.evaluate?{evaluate:function(){for(var Bt=[],qt=arguments.length;qt--;)Bt[qt]=arguments[qt];var Vt=Qe.evaluate.apply(void 0,Bt),rn=lt.evaluate.apply(void 0,Bt);if(void 0!==Vt&&void 0!==rn)return _t(Vt,rn,je)}}:_t(Qe,lt,je)}function Ws(M,O,Z){return"color"===O.type?Z=hn.parse(Z):"formatted"===O.type?Z=Rn.fromString(Z.toString()):"resolvedImage"===O.type?Z=Nn.fromString(Z.toString()):ei(Z)===O.type||"enum"===O.type&&O.values[Z]||(Z=void 0),us(Z,M.default,O.default)}Gn.register(Wo,{error:[{kind:"error"},[gt],function(M,O){throw new Zn(O[0].evaluate(M))}],typeof:[gt,[jt],function(M,O){return Kt($n(O[0].evaluate(M)))}],"to-rgba":[pn(pt,4),[Ot],function(M,O){return O[0].evaluate(M).toArray()}],rgb:[Ot,[pt,pt,pt],ao],rgba:[Ot,[pt,pt,pt,pt],ao],has:{type:Pt,overloads:[[[gt],function(M,O){return Gs(O[0].evaluate(M),M.properties())}],[[gt,Ht],function(M,O){var ae=O[1];return Gs(O[0].evaluate(M),ae.evaluate(M))}]]},get:{type:jt,overloads:[[[gt],function(M,O){return Zs(O[0].evaluate(M),M.properties())}],[[gt,Ht],function(M,O){var ae=O[1];return Zs(O[0].evaluate(M),ae.evaluate(M))}]]},"feature-state":[jt,[gt],function(M,O){return Zs(O[0].evaluate(M),M.featureState||{})}],properties:[Ht,[],function(M){return M.properties()}],"geometry-type":[gt,[],function(M){return M.geometryType()}],id:[jt,[],function(M){return M.id()}],zoom:[pt,[],function(M){return M.globals.zoom}],"heatmap-density":[pt,[],function(M){return M.globals.heatmapDensity||0}],"line-progress":[pt,[],function(M){return M.globals.lineProgress||0}],accumulated:[jt,[],function(M){return void 0===M.globals.accumulated?null:M.globals.accumulated}],"+":[pt,Co(pt),function(M,O){for(var Z=0,ae=0,be=O;ae<be.length;ae+=1)Z+=be[ae].evaluate(M);return Z}],"*":[pt,Co(pt),function(M,O){for(var Z=1,ae=0,be=O;ae<be.length;ae+=1)Z*=be[ae].evaluate(M);return Z}],"-":{type:pt,overloads:[[[pt,pt],function(M,O){var ae=O[1];return O[0].evaluate(M)-ae.evaluate(M)}],[[pt],function(M,O){return-O[0].evaluate(M)}]]},"/":[pt,[pt,pt],function(M,O){var ae=O[1];return O[0].evaluate(M)/ae.evaluate(M)}],"%":[pt,[pt,pt],function(M,O){var ae=O[1];return O[0].evaluate(M)%ae.evaluate(M)}],ln2:[pt,[],function(){return Math.LN2}],pi:[pt,[],function(){return Math.PI}],e:[pt,[],function(){return Math.E}],"^":[pt,[pt,pt],function(M,O){var ae=O[1];return Math.pow(O[0].evaluate(M),ae.evaluate(M))}],sqrt:[pt,[pt],function(M,O){return Math.sqrt(O[0].evaluate(M))}],log10:[pt,[pt],function(M,O){return Math.log(O[0].evaluate(M))/Math.LN10}],ln:[pt,[pt],function(M,O){return Math.log(O[0].evaluate(M))}],log2:[pt,[pt],function(M,O){return Math.log(O[0].evaluate(M))/Math.LN2}],sin:[pt,[pt],function(M,O){return Math.sin(O[0].evaluate(M))}],cos:[pt,[pt],function(M,O){return Math.cos(O[0].evaluate(M))}],tan:[pt,[pt],function(M,O){return Math.tan(O[0].evaluate(M))}],asin:[pt,[pt],function(M,O){return Math.asin(O[0].evaluate(M))}],acos:[pt,[pt],function(M,O){return Math.acos(O[0].evaluate(M))}],atan:[pt,[pt],function(M,O){return Math.atan(O[0].evaluate(M))}],min:[pt,Co(pt),function(M,O){return Math.min.apply(Math,O.map(function(Z){return Z.evaluate(M)}))}],max:[pt,Co(pt),function(M,O){return Math.max.apply(Math,O.map(function(Z){return Z.evaluate(M)}))}],abs:[pt,[pt],function(M,O){return Math.abs(O[0].evaluate(M))}],round:[pt,[pt],function(M,O){var Z=O[0].evaluate(M);return Z<0?-Math.round(-Z):Math.round(Z)}],floor:[pt,[pt],function(M,O){return Math.floor(O[0].evaluate(M))}],ceil:[pt,[pt],function(M,O){return Math.ceil(O[0].evaluate(M))}],"filter-==":[Pt,[gt,jt],function(M,O){var Z=O[0],ae=O[1];return M.properties()[Z.value]===ae.value}],"filter-id-==":[Pt,[jt],function(M,O){var Z=O[0];return M.id()===Z.value}],"filter-type-==":[Pt,[gt],function(M,O){var Z=O[0];return M.geometryType()===Z.value}],"filter-<":[Pt,[gt,jt],function(M,O){var Z=O[0],ae=O[1],be=M.properties()[Z.value],Ee=ae.value;return typeof be==typeof Ee&&be<Ee}],"filter-id-<":[Pt,[jt],function(M,O){var Z=O[0],ae=M.id(),be=Z.value;return typeof ae==typeof be&&ae<be}],"filter->":[Pt,[gt,jt],function(M,O){var Z=O[0],ae=O[1],be=M.properties()[Z.value],Ee=ae.value;return typeof be==typeof Ee&&be>Ee}],"filter-id->":[Pt,[jt],function(M,O){var Z=O[0],ae=M.id(),be=Z.value;return typeof ae==typeof be&&ae>be}],"filter-<=":[Pt,[gt,jt],function(M,O){var Z=O[0],ae=O[1],be=M.properties()[Z.value],Ee=ae.value;return typeof be==typeof Ee&&be<=Ee}],"filter-id-<=":[Pt,[jt],function(M,O){var Z=O[0],ae=M.id(),be=Z.value;return typeof ae==typeof be&&ae<=be}],"filter->=":[Pt,[gt,jt],function(M,O){var Z=O[0],ae=O[1],be=M.properties()[Z.value],Ee=ae.value;return typeof be==typeof Ee&&be>=Ee}],"filter-id->=":[Pt,[jt],function(M,O){var Z=O[0],ae=M.id(),be=Z.value;return typeof ae==typeof be&&ae>=be}],"filter-has":[Pt,[jt],function(M,O){return O[0].value in M.properties()}],"filter-has-id":[Pt,[],function(M){return null!==M.id()&&void 0!==M.id()}],"filter-type-in":[Pt,[pn(gt)],function(M,O){return O[0].value.indexOf(M.geometryType())>=0}],"filter-id-in":[Pt,[pn(jt)],function(M,O){return O[0].value.indexOf(M.id())>=0}],"filter-in-small":[Pt,[gt,pn(jt)],function(M,O){var Z=O[0];return O[1].value.indexOf(M.properties()[Z.value])>=0}],"filter-in-large":[Pt,[gt,pn(jt)],function(M,O){var Z=O[0],ae=O[1];return function(be,Ee,je,Qe){for(;je<=Qe;){var lt=je+Qe>>1;if(Ee[lt]===be)return!0;Ee[lt]>be?Qe=lt-1:je=lt+1}return!1}(M.properties()[Z.value],ae.value,0,ae.value.length-1)}],all:{type:Pt,overloads:[[[Pt,Pt],function(M,O){var ae=O[1];return O[0].evaluate(M)&&ae.evaluate(M)}],[Co(Pt),function(M,O){for(var Z=0,ae=O;Z<ae.length;Z+=1)if(!ae[Z].evaluate(M))return!1;return!0}]]},any:{type:Pt,overloads:[[[Pt,Pt],function(M,O){var ae=O[1];return O[0].evaluate(M)||ae.evaluate(M)}],[Co(Pt),function(M,O){for(var Z=0,ae=O;Z<ae.length;Z+=1)if(ae[Z].evaluate(M))return!0;return!1}]]},"!":[Pt,[Pt],function(M,O){return!O[0].evaluate(M)}],"is-supported-script":[Pt,[gt],function(M,O){var ae=M.globals&&M.globals.isSupportedScript;return!ae||ae(O[0].evaluate(M))}],upcase:[gt,[gt],function(M,O){return O[0].evaluate(M).toUpperCase()}],downcase:[gt,[gt],function(M,O){return O[0].evaluate(M).toLowerCase()}],concat:[gt,Co(jt),function(M,O){return O.map(function(Z){return mr(Z.evaluate(M))}).join("")}],"resolved-locale":[gt,[Nt],function(M,O){return O[0].evaluate(M).resolvedLocale()}]});var cs=function(M,O){var Z;this.expression=M,this._warningHistory={},this._evaluator=new Un,this._defaultValue=O?"color"===(Z=O).type&&xo(Z.default)?new hn(0,0,0,0):"color"===Z.type?hn.parse(Z.default)||null:void 0===Z.default?null:Z.default:null,this._enumValues=O&&"enum"===O.type?O.values:null};function Jo(M){return Array.isArray(M)&&M.length>0&&"string"==typeof M[0]&&M[0]in Wo}function fs(M,O){var be,Ee,Z=new ir(Wo,[],O?(Ee={color:Ot,string:gt,number:pt,enum:gt,boolean:Pt,formatted:Gt,resolvedImage:un},"array"===(be=O).type?pn(Ee[be.value]||jt,be.length):Ee[be.type]):void 0),ae=Z.parse(M,void 0,void 0,void 0,O&&"string"===O.type?{typeAnnotation:"coerce"}:void 0);return ae?Ms(new cs(ae,O)):yo(Z.errors)}cs.prototype.evaluateWithoutErrorHandling=function(M,O,Z,ae,be,Ee){return this._evaluator.globals=M,this._evaluator.feature=O,this._evaluator.featureState=Z,this._evaluator.canonical=ae,this._evaluator.availableImages=be||null,this._evaluator.formattedSection=Ee,this.expression.evaluate(this._evaluator)},cs.prototype.evaluate=function(M,O,Z,ae,be,Ee){this._evaluator.globals=M,this._evaluator.feature=O||null,this._evaluator.featureState=Z||null,this._evaluator.canonical=ae,this._evaluator.availableImages=be||null,this._evaluator.formattedSection=Ee||null;try{var je=this.expression.evaluate(this._evaluator);if(null==je||"number"==typeof je&&je!=je)return this._defaultValue;if(this._enumValues&&!(je in this._enumValues))throw new Zn("Expected value to be one of "+Object.keys(this._enumValues).map(function(Qe){return JSON.stringify(Qe)}).join(", ")+", but found "+JSON.stringify(je)+" instead.");return je}catch(Qe){return this._warningHistory[Qe.message]||(this._warningHistory[Qe.message]=!0,typeof console<"u"&&console.warn(Qe.message)),this._defaultValue}};var Io=function(M,O){this.kind=M,this._styleExpression=O,this.isStateDependent="constant"!==M&&!nr(O.expression)};Io.prototype.evaluateWithoutErrorHandling=function(M,O,Z,ae,be,Ee){return this._styleExpression.evaluateWithoutErrorHandling(M,O,Z,ae,be,Ee)},Io.prototype.evaluate=function(M,O,Z,ae,be,Ee){return this._styleExpression.evaluate(M,O,Z,ae,be,Ee)};var Ro=function(M,O,Z,ae){this.kind=M,this.zoomStops=Z,this._styleExpression=O,this.isStateDependent="camera"!==M&&!nr(O.expression),this.interpolationType=ae};function Ko(M,O){if("error"===(M=fs(M,O)).result)return M;var Z=M.value.expression,ae=Kn(Z);if(!ae&&!Yo(O))return yo([new Et("","data expressions not supported")]);var be=er(Z,["zoom"]);if(!be&&!Po(O))return yo([new Et("","zoom expressions not supported")]);var Ee=ps(Z);return Ee||be?Ee instanceof Et?yo([Ee]):Ee instanceof zi&&!oo(O)?yo([new Et("",'"interpolate" expressions cannot be used with this property')]):Ms(Ee?new Ro(ae?"camera":"composite",M.value,Ee.labels,Ee instanceof zi?Ee.interpolation:void 0):new Io(ae?"constant":"source",M.value)):yo([new Et("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}Ro.prototype.evaluateWithoutErrorHandling=function(M,O,Z,ae,be,Ee){return this._styleExpression.evaluateWithoutErrorHandling(M,O,Z,ae,be,Ee)},Ro.prototype.evaluate=function(M,O,Z,ae,be,Ee){return this._styleExpression.evaluate(M,O,Z,ae,be,Ee)},Ro.prototype.interpolationFactor=function(M,O,Z){return this.interpolationType?zi.interpolationFactor(this.interpolationType,M,O,Z):0};var hs=function(M,O){this._parameters=M,this._specification=O,st(this,Ss(this._parameters,this._specification))};function ps(M){var O=null;if(M instanceof ka)O=ps(M.result);else if(M instanceof ma)for(var Z=0,ae=M.args;Z<ae.length&&!(O=ps(ae[Z]));Z+=1);else(M instanceof Ur||M instanceof zi)&&M.input instanceof Gn&&"zoom"===M.input.name&&(O=M);return O instanceof Et||M.eachChild(function(Ee){var je=ps(Ee);je instanceof Et?O=je:!O&&je?O=new Et("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):O&&je&&O!==je&&(O=new Et("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))}),O}function Oa(M){var O=M.key,Z=M.value,ae=M.valueSpec||{},be=M.objectElementValidators||{},Ee=M.style,je=M.styleSpec,Qe=[],lt=ei(Z);if("object"!==lt)return[new ze(O,Z,"object expected, "+lt+" found")];for(var _t in Z){var Mt=_t.split(".")[0],Bt=ae[Mt]||ae["*"],qt=void 0;if(be[Mt])qt=be[Mt];else if(ae[Mt])qt=mi;else if(be["*"])qt=be["*"];else{if(!ae["*"]){Qe.push(new ze(O,Z[_t],'unknown property "'+_t+'"'));continue}qt=mi}Qe=Qe.concat(qt({key:(O&&O+".")+_t,value:Z[_t],valueSpec:Bt,style:Ee,styleSpec:je,object:Z,objectKey:_t},Z))}for(var Vt in ae)be[Vt]||ae[Vt].required&&void 0===ae[Vt].default&&void 0===Z[Vt]&&Qe.push(new ze(O,Z,'missing required property "'+Vt+'"'));return Qe}function ds(M){var O=M.value,Z=M.valueSpec,ae=M.style,be=M.styleSpec,Ee=M.key,je=M.arrayElementValidator||mi;if("array"!==ei(O))return[new ze(Ee,O,"array expected, "+ei(O)+" found")];if(Z.length&&O.length!==Z.length)return[new ze(Ee,O,"array length "+Z.length+" expected, length "+O.length+" found")];if(Z["min-length"]&&O.length<Z["min-length"])return[new ze(Ee,O,"array length at least "+Z["min-length"]+" expected, length "+O.length+" found")];var Qe={type:Z.value,values:Z.values};be.$version<7&&(Qe.function=Z.function),"object"===ei(Z.value)&&(Qe=Z.value);for(var lt=[],_t=0;_t<O.length;_t++)lt=lt.concat(je({array:O,arrayIndex:_t,value:O[_t],valueSpec:Qe,style:ae,styleSpec:be,key:Ee+"["+_t+"]"}));return lt}function gs(M){var O=M.key,Z=M.value,ae=M.valueSpec,be=ei(Z);return"number"===be&&Z!=Z&&(be="NaN"),"number"!==be?[new ze(O,Z,"number expected, "+be+" found")]:"minimum"in ae&&Z<ae.minimum?[new ze(O,Z,Z+" is less than the minimum value "+ae.minimum)]:"maximum"in ae&&Z>ae.maximum?[new ze(O,Z,Z+" is greater than the maximum value "+ae.maximum)]:[]}function Ys(M){var O,Z,ae,be=M.valueSpec,Ee=ct(M.value.type),je={},Qe="categorical"!==Ee&&void 0===M.value.property,lt=!Qe,_t="array"===ei(M.value.stops)&&"array"===ei(M.value.stops[0])&&"object"===ei(M.value.stops[0][0]),Mt=Oa({key:M.key,value:M.value,valueSpec:M.styleSpec.function,style:M.style,styleSpec:M.styleSpec,objectElementValidators:{stops:function(Vt){if("identity"===Ee)return[new ze(Vt.key,Vt.value,'identity function may not have a "stops" property')];var rn=[],xn=Vt.value;return rn=rn.concat(ds({key:Vt.key,value:xn,valueSpec:Vt.valueSpec,style:Vt.style,styleSpec:Vt.styleSpec,arrayElementValidator:Bt})),"array"===ei(xn)&&0===xn.length&&rn.push(new ze(Vt.key,xn,"array must have at least one stop")),rn},default:function(Vt){return mi({key:Vt.key,value:Vt.value,valueSpec:be,style:Vt.style,styleSpec:Vt.styleSpec})}}});return"identity"===Ee&&Qe&&Mt.push(new ze(M.key,M.value,'missing required property "property"')),"identity"===Ee||M.value.stops||Mt.push(new ze(M.key,M.value,'missing required property "stops"')),"exponential"===Ee&&M.valueSpec.expression&&!oo(M.valueSpec)&&Mt.push(new ze(M.key,M.value,"exponential functions not supported")),M.styleSpec.$version>=8&&(lt&&!Yo(M.valueSpec)?Mt.push(new ze(M.key,M.value,"property functions not supported")):Qe&&!Po(M.valueSpec)&&Mt.push(new ze(M.key,M.value,"zoom functions not supported"))),"categorical"!==Ee&&!_t||void 0!==M.value.property||Mt.push(new ze(M.key,M.value,'"property" property is required')),Mt;function Bt(Vt){var rn=[],xn=Vt.value,In=Vt.key;if("array"!==ei(xn))return[new ze(In,xn,"array expected, "+ei(xn)+" found")];if(2!==xn.length)return[new ze(In,xn,"array length 2 expected, length "+xn.length+" found")];if(_t){if("object"!==ei(xn[0]))return[new ze(In,xn,"object expected, "+ei(xn[0])+" found")];if(void 0===xn[0].zoom)return[new ze(In,xn,"object stop key must have zoom")];if(void 0===xn[0].value)return[new ze(In,xn,"object stop key must have value")];if(ae&&ae>ct(xn[0].zoom))return[new ze(In,xn[0].zoom,"stop zoom values must appear in ascending order")];ct(xn[0].zoom)!==ae&&(ae=ct(xn[0].zoom),Z=void 0,je={}),rn=rn.concat(Oa({key:In+"[0]",value:xn[0],valueSpec:{zoom:{}},style:Vt.style,styleSpec:Vt.styleSpec,objectElementValidators:{zoom:gs,value:qt}}))}else rn=rn.concat(qt({key:In+"[0]",value:xn[0],valueSpec:{},style:Vt.style,styleSpec:Vt.styleSpec},xn));return Jo(Tt(xn[1]))?rn.concat([new ze(In+"[1]",xn[1],"expressions are not allowed in function stops.")]):rn.concat(mi({key:In+"[1]",value:xn[1],valueSpec:be,style:Vt.style,styleSpec:Vt.styleSpec}))}function qt(Vt,rn){var xn=ei(Vt.value),In=ct(Vt.value),On=null!==Vt.value?Vt.value:rn;if(O){if(xn!==O)return[new ze(Vt.key,On,xn+" stop domain type must match previous stop domain type "+O)]}else O=xn;if("number"!==xn&&"string"!==xn&&"boolean"!==xn)return[new ze(Vt.key,On,"stop domain value must be a number, string, or boolean")];if("number"!==xn&&"categorical"!==Ee){var jn="number expected, "+xn+" found";return Yo(be)&&void 0===Ee&&(jn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new ze(Vt.key,On,jn)]}return"categorical"!==Ee||"number"!==xn||isFinite(In)&&Math.floor(In)===In?"categorical"!==Ee&&"number"===xn&&void 0!==Z&&In<Z?[new ze(Vt.key,On,"stop domain values must appear in ascending order")]:(Z=In,"categorical"===Ee&&In in je?[new ze(Vt.key,On,"stop domain values must be unique")]:(je[In]=!0,[])):[new ze(Vt.key,On,"integer expected, found "+In)]}}function bo(M){var O=("property"===M.expressionContext?Ko:fs)(Tt(M.value),M.valueSpec);if("error"===O.result)return O.value.map(function(ae){return new ze(""+M.key+ae.key,M.value,ae.message)});var Z=O.value.expression||O.value._styleExpression.expression;if("property"===M.expressionContext&&"text-font"===M.propertyKey&&!Z.outputDefined())return[new ze(M.key,M.value,'Invalid data expression for "'+M.propertyKey+'". Output values must be contained as literals within the expression.')];if("property"===M.expressionContext&&"layout"===M.propertyType&&!nr(Z))return[new ze(M.key,M.value,'"feature-state" data expressions are not supported with layout properties.')];if("filter"===M.expressionContext&&!nr(Z))return[new ze(M.key,M.value,'"feature-state" data expressions are not supported with filters.')];if(M.expressionContext&&0===M.expressionContext.indexOf("cluster")){if(!er(Z,["zoom","feature-state"]))return[new ze(M.key,M.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if("cluster-initial"===M.expressionContext&&!Kn(Z))return[new ze(M.key,M.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Es(M){var O=M.key,Z=M.value,ae=M.valueSpec,be=[];return Array.isArray(ae.values)?-1===ae.values.indexOf(ct(Z))&&be.push(new ze(O,Z,"expected one of ["+ae.values.join(", ")+"], "+JSON.stringify(Z)+" found")):-1===Object.keys(ae.values).indexOf(ct(Z))&&be.push(new ze(O,Z,"expected one of ["+Object.keys(ae.values).join(", ")+"], "+JSON.stringify(Z)+" found")),be}function vs(M){if(!0===M||!1===M)return!0;if(!Array.isArray(M)||0===M.length)return!1;switch(M[0]){case"has":return M.length>=2&&"$id"!==M[1]&&"$type"!==M[1];case"in":return M.length>=3&&("string"!=typeof M[1]||Array.isArray(M[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return 3!==M.length||Array.isArray(M[1])||Array.isArray(M[2]);case"any":case"all":for(var O=0,Z=M.slice(1);O<Z.length;O+=1){var ae=Z[O];if(!vs(ae)&&"boolean"!=typeof ae)return!1}return!0;default:return!0}}hs.deserialize=function(M){return new hs(M._parameters,M._specification)},hs.serialize=function(M){return{_parameters:M._parameters,_specification:M._specification}};var Xs={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function ms(M){if(null==M)return{filter:function(){return!0},needGeometry:!1};vs(M)||(M=Do(M));var O=fs(M,Xs);if("error"===O.result)throw new Error(O.value.map(function(Z){return Z.key+": "+Z.message}).join(", "));return{filter:function(Z,ae,be){return O.value.evaluate(Z,ae,{},be)},needGeometry:zo(M)}}function $o(M,O){return M<O?-1:M>O?1:0}function zo(M){if(!Array.isArray(M))return!1;if("within"===M[0])return!0;for(var O=1;O<M.length;O++)if(zo(M[O]))return!0;return!1}function Do(M){if(!M)return!0;var O,Z=M[0];return M.length<=1?"any"!==Z:"=="===Z?ai(M[1],M[2],"=="):"!="===Z?Zi(ai(M[1],M[2],"==")):"<"===Z||">"===Z||"<="===Z||">="===Z?ai(M[1],M[2],Z):"any"===Z?(O=M.slice(1),["any"].concat(O.map(Do))):"all"===Z?["all"].concat(M.slice(1).map(Do)):"none"===Z?["all"].concat(M.slice(1).map(Do).map(Zi)):"in"===Z?_o(M[1],M.slice(2)):"!in"===Z?Zi(_o(M[1],M.slice(2))):"has"===Z?wo(M[1]):"!has"===Z?Zi(wo(M[1])):"within"!==Z||M}function ai(M,O,Z){switch(M){case"$type":return["filter-type-"+Z,O];case"$id":return["filter-id-"+Z,O];default:return["filter-"+Z,M,O]}}function _o(M,O){if(0===O.length)return!1;switch(M){case"$type":return["filter-type-in",["literal",O]];case"$id":return["filter-id-in",["literal",O]];default:return O.length>200&&!O.some(function(Z){return typeof Z!=typeof O[0]})?["filter-in-large",M,["literal",O.sort($o)]]:["filter-in-small",M,["literal",O]]}}function wo(M){switch(M){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",M]}}function Zi(M){return["!",M]}function Xr(M){return vs(Tt(M.value))?bo(st({},M,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Kr(M)}function Kr(M){var O=M.value,Z=M.key;if("array"!==ei(O))return[new ze(Z,O,"array expected, "+ei(O)+" found")];var ae,be=M.styleSpec,Ee=[];if(O.length<1)return[new ze(Z,O,"filter array must have at least 1 element")];switch(Ee=Ee.concat(Es({key:Z+"[0]",value:O[0],valueSpec:be.filter_operator,style:M.style,styleSpec:M.styleSpec})),ct(O[0])){case"<":case"<=":case">":case">=":O.length>=2&&"$type"===ct(O[1])&&Ee.push(new ze(Z,O,'"$type" cannot be use with operator "'+O[0]+'"'));case"==":case"!=":3!==O.length&&Ee.push(new ze(Z,O,'filter array for operator "'+O[0]+'" must have 3 elements'));case"in":case"!in":O.length>=2&&"string"!==(ae=ei(O[1]))&&Ee.push(new ze(Z+"[1]",O[1],"string expected, "+ae+" found"));for(var je=2;je<O.length;je++)ae=ei(O[je]),"$type"===ct(O[1])?Ee=Ee.concat(Es({key:Z+"["+je+"]",value:O[je],valueSpec:be.geometry_type,style:M.style,styleSpec:M.styleSpec})):"string"!==ae&&"number"!==ae&&"boolean"!==ae&&Ee.push(new ze(Z+"["+je+"]",O[je],"string, number, or boolean expected, "+ae+" found"));break;case"any":case"all":case"none":for(var Qe=1;Qe<O.length;Qe++)Ee=Ee.concat(Kr({key:Z+"["+Qe+"]",value:O[Qe],style:M.style,styleSpec:M.styleSpec}));break;case"has":case"!has":ae=ei(O[1]),2!==O.length?Ee.push(new ze(Z,O,'filter array for "'+O[0]+'" operator must have 2 elements')):"string"!==ae&&Ee.push(new ze(Z+"[1]",O[1],"string expected, "+ae+" found"));break;case"within":ae=ei(O[1]),2!==O.length?Ee.push(new ze(Z,O,'filter array for "'+O[0]+'" operator must have 2 elements')):"object"!==ae&&Ee.push(new ze(Z+"[1]",O[1],"object expected, "+ae+" found"))}return Ee}function so(M,O){var Z=M.key,ae=M.style,be=M.styleSpec,Ee=M.value,je=M.objectKey,Qe=be[O+"_"+M.layerType];if(!Qe)return[];var lt=je.match(/^(.*)-transition$/);if("paint"===O&&lt&&Qe[lt[1]]&&Qe[lt[1]].transition)return mi({key:Z,value:Ee,valueSpec:be.transition,style:ae,styleSpec:be});var _t,Mt=M.valueSpec||Qe[je];if(!Mt)return[new ze(Z,Ee,'unknown property "'+je+'"')];if("string"===ei(Ee)&&Yo(Mt)&&!Mt.tokens&&(_t=/^{([^}]+)}$/.exec(Ee)))return[new ze(Z,Ee,'"'+je+'" does not support interpolation syntax\nUse an identity property function instead: `{ "type": "identity", "property": '+JSON.stringify(_t[1])+" }`.")];var Bt=[];return"symbol"===M.layerType&&("text-field"===je&&ae&&!ae.glyphs&&Bt.push(new ze(Z,Ee,'use of "text-field" requires a style "glyphs" property')),"text-font"===je&&xo(Tt(Ee))&&"identity"===ct(Ee.type)&&Bt.push(new ze(Z,Ee,'"text-font" does not support identity functions'))),Bt.concat(mi({key:M.key,value:Ee,valueSpec:Mt,style:ae,styleSpec:be,expressionContext:"property",propertyType:O,propertyKey:je}))}function Xa(M){return so(M,"paint")}function Ls(M){return so(M,"layout")}function Js(M){var O=[],Z=M.value,ae=M.key,be=M.style,Ee=M.styleSpec;Z.type||Z.ref||O.push(new ze(ae,Z,'either "type" or "ref" is required'));var je,Qe=ct(Z.type),lt=ct(Z.ref);if(Z.id)for(var _t=ct(Z.id),Mt=0;Mt<M.arrayIndex;Mt++){var Bt=be.layers[Mt];ct(Bt.id)===_t&&O.push(new ze(ae,Z.id,'duplicate layer id "'+Z.id+'", previously used at line '+Bt.id.__line__))}if("ref"in Z)["type","source","source-layer","filter","layout"].forEach(function(rn){rn in Z&&O.push(new ze(ae,Z[rn],'"'+rn+'" is prohibited for ref layers'))}),be.layers.forEach(function(rn){ct(rn.id)===lt&&(je=rn)}),je?je.ref?O.push(new ze(ae,Z.ref,"ref cannot reference another ref layer")):Qe=ct(je.type):O.push(new ze(ae,Z.ref,'ref layer "'+lt+'" not found'));else if("background"!==Qe)if(Z.source){var qt=be.sources&&be.sources[Z.source],Vt=qt&&ct(qt.type);qt?"vector"===Vt&&"raster"===Qe?O.push(new ze(ae,Z.source,'layer "'+Z.id+'" requires a raster source')):"raster"===Vt&&"raster"!==Qe?O.push(new ze(ae,Z.source,'layer "'+Z.id+'" requires a vector source')):"vector"!==Vt||Z["source-layer"]?"raster-dem"===Vt&&"hillshade"!==Qe?O.push(new ze(ae,Z.source,"raster-dem source can only be used with layer type 'hillshade'.")):"line"!==Qe||!Z.paint||!Z.paint["line-gradient"]||"geojson"===Vt&&qt.lineMetrics||O.push(new ze(ae,Z,'layer "'+Z.id+'" specifies a line-gradient, which requires a GeoJSON source with `lineMetrics` enabled.')):O.push(new ze(ae,Z,'layer "'+Z.id+'" must specify a "source-layer"')):O.push(new ze(ae,Z.source,'source "'+Z.source+'" not found'))}else O.push(new ze(ae,Z,'missing required property "source"'));return O=O.concat(Oa({key:ae,value:Z,valueSpec:Ee.layer,style:M.style,styleSpec:M.styleSpec,objectElementValidators:{"*":function(){return[]},type:function(){return mi({key:ae+".type",value:Z.type,valueSpec:Ee.layer.type,style:M.style,styleSpec:M.styleSpec,object:Z,objectKey:"type"})},filter:Xr,layout:function(rn){return Oa({layer:Z,key:rn.key,value:rn.value,style:rn.style,styleSpec:rn.styleSpec,objectElementValidators:{"*":function(xn){return Ls(st({layerType:Qe},xn))}}})},paint:function(rn){return Oa({layer:Z,key:rn.key,value:rn.value,style:rn.style,styleSpec:rn.styleSpec,objectElementValidators:{"*":function(xn){return Xa(st({layerType:Qe},xn))}}})}}}))}function Fo(M){var O=M.value,Z=M.key,ae=ei(O);return"string"!==ae?[new ze(Z,O,"string expected, "+ae+" found")]:[]}var Ks={promoteId:function(M){var O=M.key,Z=M.value;if("string"===ei(Z))return Fo({key:O,value:Z});var ae=[];for(var be in Z)ae.push.apply(ae,Fo({key:O+"."+be,value:Z[be]}));return ae}};function Bo(M){var O=M.value,Z=M.key,ae=M.styleSpec,be=M.style;if(!O.type)return[new ze(Z,O,'"type" is required')];var Ee,je=ct(O.type);switch(je){case"vector":case"raster":case"raster-dem":return Oa({key:Z,value:O,valueSpec:ae["source_"+je.replace("-","_")],style:M.style,styleSpec:ae,objectElementValidators:Ks});case"geojson":if(Ee=Oa({key:Z,value:O,valueSpec:ae.source_geojson,style:be,styleSpec:ae,objectElementValidators:Ks}),O.cluster)for(var Qe in O.clusterProperties){var lt=O.clusterProperties[Qe],_t=lt[0],Bt="string"==typeof _t?[_t,["accumulated"],["get",Qe]]:_t;Ee.push.apply(Ee,bo({key:Z+"."+Qe+".map",value:lt[1],expressionContext:"cluster-map"})),Ee.push.apply(Ee,bo({key:Z+"."+Qe+".reduce",value:Bt,expressionContext:"cluster-reduce"}))}return Ee;case"video":return Oa({key:Z,value:O,valueSpec:ae.source_video,style:be,styleSpec:ae});case"image":return Oa({key:Z,value:O,valueSpec:ae.source_image,style:be,styleSpec:ae});case"canvas":return[new ze(Z,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return Es({key:Z+".type",value:O.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]},style:be,styleSpec:ae})}}function lo(M){var O=M.value,Z=M.styleSpec,ae=Z.light,be=M.style,Ee=[],je=ei(O);if(void 0===O)return Ee;if("object"!==je)return Ee.concat([new ze("light",O,"object expected, "+je+" found")]);for(var Qe in O){var lt=Qe.match(/^(.*)-transition$/);Ee=Ee.concat(lt&&ae[lt[1]]&&ae[lt[1]].transition?mi({key:Qe,value:O[Qe],valueSpec:Z.transition,style:be,styleSpec:Z}):ae[Qe]?mi({key:Qe,value:O[Qe],valueSpec:ae[Qe],style:be,styleSpec:Z}):[new ze(Qe,O[Qe],'unknown property "'+Qe+'"')])}return Ee}var No={"*":function(){return[]},array:ds,boolean:function(M){var O=M.value,Z=M.key,ae=ei(O);return"boolean"!==ae?[new ze(Z,O,"boolean expected, "+ae+" found")]:[]},number:gs,color:function(M){var O=M.key,Z=M.value,ae=ei(Z);return"string"!==ae?[new ze(O,Z,"color expected, "+ae+" found")]:null===sn(Z)?[new ze(O,Z,'color expected, "'+Z+'" found')]:[]},constants:Ke,enum:Es,filter:Xr,function:Ys,layer:Js,object:Oa,source:Bo,light:lo,string:Fo,formatted:function(M){return 0===Fo(M).length?[]:bo(M)},resolvedImage:function(M){return 0===Fo(M).length?[]:bo(M)}};function mi(M){var O=M.value,Z=M.valueSpec,ae=M.styleSpec;return Z.expression&&xo(ct(O))?Ys(M):Z.expression&&Jo(Tt(O))?bo(M):Z.type&&No[Z.type]?No[Z.type](M):Oa(st({},M,{valueSpec:Z.type?ae[Z.type]:Z}))}function Ja(M){var O=M.value,Z=M.key,ae=Fo(M);return ae.length||(-1===O.indexOf("{fontstack}")&&ae.push(new ze(Z,O,'"glyphs" url must include a "{fontstack}" token')),-1===O.indexOf("{range}")&&ae.push(new ze(Z,O,'"glyphs" url must include a "{range}" token'))),ae}function jo(M,O){void 0===O&&(O=Se);var Z=[];return Z=Z.concat(mi({key:"",value:M,valueSpec:O.$root,styleSpec:O,style:M,objectElementValidators:{glyphs:Ja,"*":function(){return[]}}})),M.constants&&(Z=Z.concat(Ke({key:"constants",value:M.constants,style:M,styleSpec:O}))),Ii(Z)}function Ii(M){return[].concat(M).sort(function(O,Z){return O.line-Z.line})}function Wi(M){return function(){for(var O=[],Z=arguments.length;Z--;)O[Z]=arguments[Z];return Ii(M.apply(this,O))}}jo.source=Wi(Bo),jo.light=Wi(lo),jo.layer=Wi(Js),jo.filter=Wi(Xr),jo.paintProperty=Wi(Xa),jo.layoutProperty=Wi(Ls);var Yi=jo,qi=Yi.light,sa=Yi.paintProperty,To=Yi.layoutProperty;function Ia(M,O){var Z=!1;if(O&&O.length)for(var ae=0,be=O;ae<be.length;ae+=1)M.fire(new Ye(new Error(be[ae].message))),Z=!0;return Z}var Di=ya;function ya(M,O,Z){var ae=this.cells=[];if(M instanceof ArrayBuffer){this.arrayBuffer=M;var be=new Int32Array(this.arrayBuffer);M=be[0],this.d=(O=be[1])+2*(Z=be[2]);for(var Ee=0;Ee<this.d*this.d;Ee++){var je=be[3+Ee],Qe=be[3+Ee+1];ae.push(je===Qe?null:be.subarray(je,Qe))}var _t=be[3+ae.length+1];this.keys=be.subarray(be[3+ae.length],_t),this.bboxes=be.subarray(_t),this.insert=this._insertReadonly}else{this.d=O+2*Z;for(var Mt=0;Mt<this.d*this.d;Mt++)ae.push([]);this.keys=[],this.bboxes=[]}this.n=O,this.extent=M,this.padding=Z,this.scale=O/M,this.uid=0;var Bt=Z/O*M;this.min=-Bt,this.max=M+Bt}ya.prototype.insert=function(M,O,Z,ae,be){this._forEachCell(O,Z,ae,be,this._insertCell,this.uid++),this.keys.push(M),this.bboxes.push(O),this.bboxes.push(Z),this.bboxes.push(ae),this.bboxes.push(be)},ya.prototype._insertReadonly=function(){throw"Cannot insert into a GridIndex created from an ArrayBuffer."},ya.prototype._insertCell=function(M,O,Z,ae,be,Ee){this.cells[be].push(Ee)},ya.prototype.query=function(M,O,Z,ae,be){var Ee=this.min,je=this.max;if(M<=Ee&&O<=Ee&&je<=Z&&je<=ae&&!be)return Array.prototype.slice.call(this.keys);var Qe=[];return this._forEachCell(M,O,Z,ae,this._queryCell,Qe,{},be),Qe},ya.prototype._queryCell=function(M,O,Z,ae,be,Ee,je,Qe){var lt=this.cells[be];if(null!==lt)for(var _t=this.keys,Mt=this.bboxes,Bt=0;Bt<lt.length;Bt++){var qt=lt[Bt];if(void 0===je[qt]){var Vt=4*qt;(Qe?Qe(Mt[Vt+0],Mt[Vt+1],Mt[Vt+2],Mt[Vt+3]):M<=Mt[Vt+2]&&O<=Mt[Vt+3]&&Z>=Mt[Vt+0]&&ae>=Mt[Vt+1])?(je[qt]=!0,Ee.push(_t[qt])):je[qt]=!1}}},ya.prototype._forEachCell=function(M,O,Z,ae,be,Ee,je,Qe){for(var lt=this._convertToCellCoord(M),_t=this._convertToCellCoord(O),Mt=this._convertToCellCoord(Z),Bt=this._convertToCellCoord(ae),qt=lt;qt<=Mt;qt++)for(var Vt=_t;Vt<=Bt;Vt++){var rn=this.d*Vt+qt;if((!Qe||Qe(this._convertFromCellCoord(qt),this._convertFromCellCoord(Vt),this._convertFromCellCoord(qt+1),this._convertFromCellCoord(Vt+1)))&&be.call(this,M,O,Z,ae,rn,Ee,je,Qe))return}},ya.prototype._convertFromCellCoord=function(M){return(M-this.padding)/this.scale},ya.prototype._convertToCellCoord=function(M){return Math.max(0,Math.min(this.d-1,Math.floor(M*this.scale)+this.padding))},ya.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var M=this.cells,O=3+this.cells.length+1+1,Z=0,ae=0;ae<this.cells.length;ae++)Z+=this.cells[ae].length;var be=new Int32Array(O+Z+this.keys.length+this.bboxes.length);be[0]=this.extent,be[1]=this.n,be[2]=this.padding;for(var Ee=O,je=0;je<M.length;je++){var Qe=M[je];be[3+je]=Ee,be.set(Qe,Ee),Ee+=Qe.length}return be[3+M.length]=Ee,be.set(this.keys,Ee),be[3+M.length+1]=Ee+=this.keys.length,be.set(this.bboxes,Ee),Ee+=this.bboxes.length,be.buffer};var Cs=self.ImageData,Ps=self.ImageBitmap,ia={};function _r(M,O,Z){void 0===Z&&(Z={}),Object.defineProperty(O,"_classRegistryKey",{value:M,writeable:!1}),ia[M]={klass:O,omit:Z.omit||[],shallow:Z.shallow||[]}}for(var Uo in _r("Object",Object),Di.serialize=function(M,O){var Z=M.toArrayBuffer();return O&&O.push(Z),{buffer:Z}},Di.deserialize=function(M){return new Di(M.buffer)},_r("Grid",Di),_r("Color",hn),_r("Error",Error),_r("ResolvedImage",Nn),_r("StylePropertyFunction",hs),_r("StyleExpression",cs,{omit:["_evaluator"]}),_r("ZoomDependentExpression",Ro),_r("ZoomConstantExpression",Io),_r("CompoundExpression",Gn,{omit:["_evaluate"]}),Wo)Wo[Uo]._classRegistryKey||_r("Expression_"+Uo,Wo[Uo]);function la(M){return M&&typeof ArrayBuffer<"u"&&(M instanceof ArrayBuffer||M.constructor&&"ArrayBuffer"===M.constructor.name)}function Os(M){return Ps&&M instanceof Ps}function Qo(M,O){if(null==M||"boolean"==typeof M||"number"==typeof M||"string"==typeof M||M instanceof Boolean||M instanceof Number||M instanceof String||M instanceof Date||M instanceof RegExp)return M;if(la(M)||Os(M))return O&&O.push(M),M;if(ArrayBuffer.isView(M)){var Z=M;return O&&O.push(Z.buffer),Z}if(M instanceof Cs)return O&&O.push(M.data.buffer),M;if(Array.isArray(M)){for(var ae=[],be=0,Ee=M;be<Ee.length;be+=1)ae.push(Qo(Ee[be],O));return ae}if("object"==typeof M){var Qe=M.constructor,lt=Qe._classRegistryKey;if(!lt)throw new Error("can't serialize object of unregistered class");var _t=Qe.serialize?Qe.serialize(M,O):{};if(!Qe.serialize){for(var Mt in M)if(M.hasOwnProperty(Mt)&&!(ia[lt].omit.indexOf(Mt)>=0)){var Bt=M[Mt];_t[Mt]=ia[lt].shallow.indexOf(Mt)>=0?Bt:Qo(Bt,O)}M instanceof Error&&(_t.message=M.message)}if(_t.$name)throw new Error("$name property is reserved for worker serialization logic.");return"Object"!==lt&&(_t.$name=lt),_t}throw new Error("can't serialize object of type "+typeof M)}function es(M){if(null==M||"boolean"==typeof M||"number"==typeof M||"string"==typeof M||M instanceof Boolean||M instanceof Number||M instanceof String||M instanceof Date||M instanceof RegExp||la(M)||Os(M)||ArrayBuffer.isView(M)||M instanceof Cs)return M;if(Array.isArray(M))return M.map(es);if("object"==typeof M){var O=M.$name||"Object",Z=ia[O].klass;if(!Z)throw new Error("can't deserialize unregistered class "+O);if(Z.deserialize)return Z.deserialize(M);for(var ae=Object.create(Z.prototype),be=0,Ee=Object.keys(M);be<Ee.length;be+=1){var je=Ee[be];if("$name"!==je){var Qe=M[je];ae[je]=ia[O].shallow.indexOf(je)>=0?Qe:es(Qe)}}return ae}throw new Error("can't deserialize object of type "+typeof M)}var ts=function(){this.first=!0};ts.prototype.update=function(M,O){var Z=Math.floor(M);return this.first?(this.first=!1,this.lastIntegerZoom=Z,this.lastIntegerZoomTime=0,this.lastZoom=M,this.lastFloorZoom=Z,!0):(this.lastFloorZoom>Z?(this.lastIntegerZoom=Z+1,this.lastIntegerZoomTime=O):this.lastFloorZoom<Z&&(this.lastIntegerZoom=Z,this.lastIntegerZoomTime=O),M!==this.lastZoom&&(this.lastZoom=M,this.lastFloorZoom=Z,!0))};var wr={"Latin-1 Supplement":function(M){return M>=128&&M<=255},Arabic:function(M){return M>=1536&&M<=1791},"Arabic Supplement":function(M){return M>=1872&&M<=1919},"Arabic Extended-A":function(M){return M>=2208&&M<=2303},"Hangul Jamo":function(M){return M>=4352&&M<=4607},"Unified Canadian Aboriginal Syllabics":function(M){return M>=5120&&M<=5759},Khmer:function(M){return M>=6016&&M<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(M){return M>=6320&&M<=6399},"General Punctuation":function(M){return M>=8192&&M<=8303},"Letterlike Symbols":function(M){return M>=8448&&M<=8527},"Number Forms":function(M){return M>=8528&&M<=8591},"Miscellaneous Technical":function(M){return M>=8960&&M<=9215},"Control Pictures":function(M){return M>=9216&&M<=9279},"Optical Character Recognition":function(M){return M>=9280&&M<=9311},"Enclosed Alphanumerics":function(M){return M>=9312&&M<=9471},"Geometric Shapes":function(M){return M>=9632&&M<=9727},"Miscellaneous Symbols":function(M){return M>=9728&&M<=9983},"Miscellaneous Symbols and Arrows":function(M){return M>=11008&&M<=11263},"CJK Radicals Supplement":function(M){return M>=11904&&M<=12031},"Kangxi Radicals":function(M){return M>=12032&&M<=12255},"Ideographic Description Characters":function(M){return M>=12272&&M<=12287},"CJK Symbols and Punctuation":function(M){return M>=12288&&M<=12351},Hiragana:function(M){return M>=12352&&M<=12447},Katakana:function(M){return M>=12448&&M<=12543},Bopomofo:function(M){return M>=12544&&M<=12591},"Hangul Compatibility Jamo":function(M){return M>=12592&&M<=12687},Kanbun:function(M){return M>=12688&&M<=12703},"Bopomofo Extended":function(M){return M>=12704&&M<=12735},"CJK Strokes":function(M){return M>=12736&&M<=12783},"Katakana Phonetic Extensions":function(M){return M>=12784&&M<=12799},"Enclosed CJK Letters and Months":function(M){return M>=12800&&M<=13055},"CJK Compatibility":function(M){return M>=13056&&M<=13311},"CJK Unified Ideographs Extension A":function(M){return M>=13312&&M<=19903},"Yijing Hexagram Symbols":function(M){return M>=19904&&M<=19967},"CJK Unified Ideographs":function(M){return M>=19968&&M<=40959},"Yi Syllables":function(M){return M>=40960&&M<=42127},"Yi Radicals":function(M){return M>=42128&&M<=42191},"Hangul Jamo Extended-A":function(M){return M>=43360&&M<=43391},"Hangul Syllables":function(M){return M>=44032&&M<=55215},"Hangul Jamo Extended-B":function(M){return M>=55216&&M<=55295},"Private Use Area":function(M){return M>=57344&&M<=63743},"CJK Compatibility Ideographs":function(M){return M>=63744&&M<=64255},"Arabic Presentation Forms-A":function(M){return M>=64336&&M<=65023},"Vertical Forms":function(M){return M>=65040&&M<=65055},"CJK Compatibility Forms":function(M){return M>=65072&&M<=65103},"Small Form Variants":function(M){return M>=65104&&M<=65135},"Arabic Presentation Forms-B":function(M){return M>=65136&&M<=65279},"Halfwidth and Fullwidth Forms":function(M){return M>=65280&&M<=65519}};function ns(M){for(var O=0,Z=M;O<Z.length;O+=1)if(Ra(Z[O].charCodeAt(0)))return!0;return!1}function Ra(M){return!(746!==M&&747!==M&&(M<4352||!(wr["Bopomofo Extended"](M)||wr.Bopomofo(M)||wr["CJK Compatibility Forms"](M)&&!(M>=65097&&M<=65103)||wr["CJK Compatibility Ideographs"](M)||wr["CJK Compatibility"](M)||wr["CJK Radicals Supplement"](M)||wr["CJK Strokes"](M)||!(!wr["CJK Symbols and Punctuation"](M)||M>=12296&&M<=12305||M>=12308&&M<=12319||12336===M)||wr["CJK Unified Ideographs Extension A"](M)||wr["CJK Unified Ideographs"](M)||wr["Enclosed CJK Letters and Months"](M)||wr["Hangul Compatibility Jamo"](M)||wr["Hangul Jamo Extended-A"](M)||wr["Hangul Jamo Extended-B"](M)||wr["Hangul Jamo"](M)||wr["Hangul Syllables"](M)||wr.Hiragana(M)||wr["Ideographic Description Characters"](M)||wr.Kanbun(M)||wr["Kangxi Radicals"](M)||wr["Katakana Phonetic Extensions"](M)||wr.Katakana(M)&&12540!==M||!(!wr["Halfwidth and Fullwidth Forms"](M)||65288===M||65289===M||65293===M||M>=65306&&M<=65310||65339===M||65341===M||65343===M||M>=65371&&M<=65503||65507===M||M>=65512&&M<=65519)||!(!wr["Small Form Variants"](M)||M>=65112&&M<=65118||M>=65123&&M<=65126)||wr["Unified Canadian Aboriginal Syllabics"](M)||wr["Unified Canadian Aboriginal Syllabics Extended"](M)||wr["Vertical Forms"](M)||wr["Yijing Hexagram Symbols"](M)||wr["Yi Syllables"](M)||wr["Yi Radicals"](M))))}function Is(M){return!(Ra(M)||(O=M,wr["Latin-1 Supplement"](O)&&(167===O||169===O||174===O||177===O||188===O||189===O||190===O||215===O||247===O)||wr["General Punctuation"](O)&&(8214===O||8224===O||8225===O||8240===O||8241===O||8251===O||8252===O||8258===O||8263===O||8264===O||8265===O||8273===O)||wr["Letterlike Symbols"](O)||wr["Number Forms"](O)||wr["Miscellaneous Technical"](O)&&(O>=8960&&O<=8967||O>=8972&&O<=8991||O>=8996&&O<=9e3||9003===O||O>=9085&&O<=9114||O>=9150&&O<=9165||9167===O||O>=9169&&O<=9179||O>=9186&&O<=9215)||wr["Control Pictures"](O)&&9251!==O||wr["Optical Character Recognition"](O)||wr["Enclosed Alphanumerics"](O)||wr["Geometric Shapes"](O)||wr["Miscellaneous Symbols"](O)&&!(O>=9754&&O<=9759)||wr["Miscellaneous Symbols and Arrows"](O)&&(O>=11026&&O<=11055||O>=11088&&O<=11097||O>=11192&&O<=11243)||wr["CJK Symbols and Punctuation"](O)||wr.Katakana(O)||wr["Private Use Area"](O)||wr["CJK Compatibility Forms"](O)||wr["Small Form Variants"](O)||wr["Halfwidth and Fullwidth Forms"](O)||8734===O||8756===O||8757===O||O>=9984&&O<=10087||O>=10102&&O<=10131||65532===O||65533===O));var O}function ys(M){return wr.Arabic(M)||wr["Arabic Supplement"](M)||wr["Arabic Extended-A"](M)||wr["Arabic Presentation Forms-A"](M)||wr["Arabic Presentation Forms-B"](M)}function Xi(M){return M>=1424&&M<=2303||wr["Arabic Presentation Forms-A"](M)||wr["Arabic Presentation Forms-B"](M)}function Vo(M,O){return!(!O&&Xi(M)||M>=2304&&M<=3583||M>=3840&&M<=4255||wr.Khmer(M))}function uo(M){for(var O=0,Z=M;O<Z.length;O+=1)if(Xi(Z[O].charCodeAt(0)))return!0;return!1}var xa="deferred",ko="loading",Va="loaded",Ho=null,Ji="unavailable",Da=null,ri=function(M){M&&"string"==typeof M&&M.indexOf("NetworkError")>-1&&(Ji="error"),Ho&&Ho(M)};function xs(){Aa.fire(new Be("pluginStateChange",{pluginStatus:Ji,pluginURL:Da}))}var Aa=new rt,Fa=function(){return Ji},Ka=function(){if(Ji!==xa||!Da)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Ji=ko,xs(),Da&&Lt({url:Da},function(M){M?ri(M):(Ji=Va,xs())})},ua={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Ji===Va||null!=ua.applyArabicShaping},isLoading:function(){return Ji===ko},setState:function(M){Ji=M.pluginStatus,Da=M.pluginURL},isParsed:function(){return null!=ua.applyArabicShaping&&null!=ua.processBidirectionalText&&null!=ua.processStyledBidirectionalText},getPluginURL:function(){return Da}},ni=function(M,O){this.zoom=M,O?(this.now=O.now,this.fadeDuration=O.fadeDuration,this.zoomHistory=O.zoomHistory,this.transition=O.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new ts,this.transition={})};ni.prototype.isSupportedScript=function(M){return function(O,Z){for(var ae=0,be=O;ae<be.length;ae+=1)if(!Vo(be[ae].charCodeAt(0),Z))return!1;return!0}(M,ua.isLoaded())},ni.prototype.crossFadingFactor=function(){return 0===this.fadeDuration?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},ni.prototype.getCrossfadeParameters=function(){var M=this.zoom,O=M-Math.floor(M),Z=this.crossFadingFactor();return M>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:O+(1-O)*Z}:{fromScale:.5,toScale:1,t:1-(1-Z)*O}};var Vi=function(M,O){this.property=M,this.value=O,this.expression=function(Z,ae){if(xo(Z))return new hs(Z,ae);if(Jo(Z)){var be=Ko(Z,ae);if("error"===be.result)throw new Error(be.value.map(function(je){return je.key+": "+je.message}).join(", "));return be.value}var Ee=Z;return"string"==typeof Z&&"color"===ae.type&&(Ee=hn.parse(Z)),{kind:"constant",evaluate:function(){return Ee}}}(void 0===O?M.specification.default:O,M.specification)};Vi.prototype.isDataDriven=function(){return"source"===this.expression.kind||"composite"===this.expression.kind},Vi.prototype.possiblyEvaluate=function(M,O,Z){return this.property.possiblyEvaluate(this,M,O,Z)};var Ha=function(M){this.property=M,this.value=new Vi(M,void 0)};Ha.prototype.transitioned=function(M,O){return new $a(this.property,this.value,O,c({},M.transition,this.transition),M.now)},Ha.prototype.untransitioned=function(){return new $a(this.property,this.value,null,{},0)};var ca=function(M){this._properties=M,this._values=Object.create(M.defaultTransitionablePropertyValues)};ca.prototype.getValue=function(M){return w(this._values[M].value.value)},ca.prototype.setValue=function(M,O){this._values.hasOwnProperty(M)||(this._values[M]=new Ha(this._values[M].property)),this._values[M].value=new Vi(this._values[M].property,null===O?void 0:w(O))},ca.prototype.getTransition=function(M){return w(this._values[M].transition)},ca.prototype.setTransition=function(M,O){this._values.hasOwnProperty(M)||(this._values[M]=new Ha(this._values[M].property)),this._values[M].transition=w(O)||void 0},ca.prototype.serialize=function(){for(var M={},O=0,Z=Object.keys(this._values);O<Z.length;O+=1){var ae=Z[O],be=this.getValue(ae);void 0!==be&&(M[ae]=be);var Ee=this.getTransition(ae);void 0!==Ee&&(M[ae+"-transition"]=Ee)}return M},ca.prototype.transitioned=function(M,O){for(var Z=new Ao(this._properties),ae=0,be=Object.keys(this._values);ae<be.length;ae+=1){var Ee=be[ae];Z._values[Ee]=this._values[Ee].transitioned(M,O._values[Ee])}return Z},ca.prototype.untransitioned=function(){for(var M=new Ao(this._properties),O=0,Z=Object.keys(this._values);O<Z.length;O+=1){var ae=Z[O];M._values[ae]=this._values[ae].untransitioned()}return M};var $a=function(M,O,Z,ae,be){this.property=M,this.value=O,this.begin=be+ae.delay||0,this.end=this.begin+ae.duration||0,M.specification.transition&&(ae.delay||ae.duration)&&(this.prior=Z)};$a.prototype.possiblyEvaluate=function(M,O,Z){var ae=M.now||0,be=this.value.possiblyEvaluate(M,O,Z),Ee=this.prior;if(Ee){if(ae>this.end)return this.prior=null,be;if(this.value.isDataDriven())return this.prior=null,be;if(ae<this.begin)return Ee.possiblyEvaluate(M,O,Z);var je=(ae-this.begin)/(this.end-this.begin);return this.property.interpolate(Ee.possiblyEvaluate(M,O,Z),be,function(Qe){if(Qe<=0)return 0;if(Qe>=1)return 1;var lt=Qe*Qe,_t=lt*Qe;return 4*(Qe<.5?_t:3*(Qe-lt)+_t-.75)}(je))}return be};var Ao=function(M){this._properties=M,this._values=Object.create(M.defaultTransitioningPropertyValues)};Ao.prototype.possiblyEvaluate=function(M,O,Z){for(var ae=new Ba(this._properties),be=0,Ee=Object.keys(this._values);be<Ee.length;be+=1){var je=Ee[be];ae._values[je]=this._values[je].possiblyEvaluate(M,O,Z)}return ae},Ao.prototype.hasTransition=function(){for(var M=0,O=Object.keys(this._values);M<O.length;M+=1)if(this._values[O[M]].prior)return!0;return!1};var co=function(M){this._properties=M,this._values=Object.create(M.defaultPropertyValues)};co.prototype.getValue=function(M){return w(this._values[M].value)},co.prototype.setValue=function(M,O){this._values[M]=new Vi(this._values[M].property,null===O?void 0:w(O))},co.prototype.serialize=function(){for(var M={},O=0,Z=Object.keys(this._values);O<Z.length;O+=1){var ae=Z[O],be=this.getValue(ae);void 0!==be&&(M[ae]=be)}return M},co.prototype.possiblyEvaluate=function(M,O,Z){for(var ae=new Ba(this._properties),be=0,Ee=Object.keys(this._values);be<Ee.length;be+=1){var je=Ee[be];ae._values[je]=this._values[je].possiblyEvaluate(M,O,Z)}return ae};var Ki=function(M,O,Z){this.property=M,this.value=O,this.parameters=Z};Ki.prototype.isConstant=function(){return"constant"===this.value.kind},Ki.prototype.constantOr=function(M){return"constant"===this.value.kind?this.value.value:M},Ki.prototype.evaluate=function(M,O,Z,ae){return this.property.evaluate(this.value,this.parameters,M,O,Z,ae)};var Ba=function(M){this._properties=M,this._values=Object.create(M.defaultPossiblyEvaluatedValues)};Ba.prototype.get=function(M){return this._values[M]};var Mr=function(M){this.specification=M};Mr.prototype.possiblyEvaluate=function(M,O){return M.expression.evaluate(O)},Mr.prototype.interpolate=function(M,O,Z){var ae=cr[this.specification.type];return ae?ae(M,O,Z):M};var Or=function(M,O){this.specification=M,this.overrides=O};Or.prototype.possiblyEvaluate=function(M,O,Z,ae){return new Ki(this,"constant"===M.expression.kind||"camera"===M.expression.kind?{kind:"constant",value:M.expression.evaluate(O,null,{},Z,ae)}:M.expression,O)},Or.prototype.interpolate=function(M,O,Z){if("constant"!==M.value.kind||"constant"!==O.value.kind)return M;if(void 0===M.value.value||void 0===O.value.value)return new Ki(this,{kind:"constant",value:void 0},M.parameters);var ae=cr[this.specification.type];return ae?new Ki(this,{kind:"constant",value:ae(M.value.value,O.value.value,Z)},M.parameters):M},Or.prototype.evaluate=function(M,O,Z,ae,be,Ee){return"constant"===M.kind?M.value:M.evaluate(O,Z,ae,be,Ee)};var rs=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.possiblyEvaluate=function(Z,ae,be,Ee){if(void 0===Z.value)return new Ki(this,{kind:"constant",value:void 0},ae);if("constant"===Z.expression.kind){var je=Z.expression.evaluate(ae,null,{},be,Ee),Qe="resolvedImage"===Z.property.specification.type&&"string"!=typeof je?je.name:je,lt=this._calculate(Qe,Qe,Qe,ae);return new Ki(this,{kind:"constant",value:lt},ae)}if("camera"===Z.expression.kind){var _t=this._calculate(Z.expression.evaluate({zoom:ae.zoom-1}),Z.expression.evaluate({zoom:ae.zoom}),Z.expression.evaluate({zoom:ae.zoom+1}),ae);return new Ki(this,{kind:"constant",value:_t},ae)}return new Ki(this,Z.expression,ae)},O.prototype.evaluate=function(Z,ae,be,Ee,je,Qe){if("source"===Z.kind){var lt=Z.evaluate(ae,be,Ee,je,Qe);return this._calculate(lt,lt,lt,ae)}return"composite"===Z.kind?this._calculate(Z.evaluate({zoom:Math.floor(ae.zoom)-1},be,Ee),Z.evaluate({zoom:Math.floor(ae.zoom)},be,Ee),Z.evaluate({zoom:Math.floor(ae.zoom)+1},be,Ee),ae):Z.value},O.prototype._calculate=function(Z,ae,be,Ee){return Ee.zoom>Ee.zoomHistory.lastIntegerZoom?{from:Z,to:ae}:{from:be,to:ae}},O.prototype.interpolate=function(Z){return Z},O}(Or),fo=function(M){this.specification=M};fo.prototype.possiblyEvaluate=function(M,O,Z,ae){if(void 0!==M.value){if("constant"===M.expression.kind){var be=M.expression.evaluate(O,null,{},Z,ae);return this._calculate(be,be,be,O)}return this._calculate(M.expression.evaluate(new ni(Math.floor(O.zoom-1),O)),M.expression.evaluate(new ni(Math.floor(O.zoom),O)),M.expression.evaluate(new ni(Math.floor(O.zoom+1),O)),O)}},fo.prototype._calculate=function(M,O,Z,ae){return ae.zoom>ae.zoomHistory.lastIntegerZoom?{from:M,to:O}:{from:Z,to:O}},fo.prototype.interpolate=function(M){return M};var qa=function(M){this.specification=M};qa.prototype.possiblyEvaluate=function(M,O,Z,ae){return!!M.expression.evaluate(O,null,{},Z,ae)},qa.prototype.interpolate=function(){return!1};var $i=function(M){for(var O in this.properties=M,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[],M){var Z=M[O];Z.specification.overridable&&this.overridableProperties.push(O);var ae=this.defaultPropertyValues[O]=new Vi(Z,void 0),be=this.defaultTransitionablePropertyValues[O]=new Ha(Z);this.defaultTransitioningPropertyValues[O]=be.untransitioned(),this.defaultPossiblyEvaluatedValues[O]=ae.possiblyEvaluate({})}};_r("DataDrivenProperty",Or),_r("DataConstantProperty",Mr),_r("CrossFadedDataDrivenProperty",rs),_r("CrossFadedProperty",fo),_r("ColorRampProperty",qa);var Rs="-transition",fa=function(M){function O(Z,ae){if(M.call(this),this.id=Z.id,this.type=Z.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},"custom"!==Z.type&&(this.metadata=Z.metadata,this.minzoom=Z.minzoom,this.maxzoom=Z.maxzoom,"background"!==Z.type&&(this.source=Z.source,this.sourceLayer=Z["source-layer"],this.filter=Z.filter),ae.layout&&(this._unevaluatedLayout=new co(ae.layout)),ae.paint)){for(var be in this._transitionablePaint=new ca(ae.paint),Z.paint)this.setPaintProperty(be,Z.paint[be],{validate:!1});for(var Ee in Z.layout)this.setLayoutProperty(Ee,Z.layout[Ee],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ba(ae.paint)}}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},O.prototype.getLayoutProperty=function(Z){return"visibility"===Z?this.visibility:this._unevaluatedLayout.getValue(Z)},O.prototype.setLayoutProperty=function(Z,ae,be){void 0===be&&(be={}),null!=ae&&this._validate(To,"layers."+this.id+".layout."+Z,Z,ae,be)||("visibility"!==Z?this._unevaluatedLayout.setValue(Z,ae):this.visibility=ae)},O.prototype.getPaintProperty=function(Z){return y(Z,Rs)?this._transitionablePaint.getTransition(Z.slice(0,-11)):this._transitionablePaint.getValue(Z)},O.prototype.setPaintProperty=function(Z,ae,be){if(void 0===be&&(be={}),null!=ae&&this._validate(sa,"layers."+this.id+".paint."+Z,Z,ae,be))return!1;if(y(Z,Rs))return this._transitionablePaint.setTransition(Z.slice(0,-11),ae||void 0),!1;var je=this._transitionablePaint._values[Z],Qe="cross-faded-data-driven"===je.property.specification["property-type"],lt=je.value.isDataDriven(),_t=je.value;this._transitionablePaint.setValue(Z,ae),this._handleSpecialPaintPropertyUpdate(Z);var Mt=this._transitionablePaint._values[Z].value;return Mt.isDataDriven()||lt||Qe||this._handleOverridablePaintPropertyUpdate(Z,_t,Mt)},O.prototype._handleSpecialPaintPropertyUpdate=function(Z){},O.prototype._handleOverridablePaintPropertyUpdate=function(Z,ae,be){return!1},O.prototype.isHidden=function(Z){return!!(this.minzoom&&Z<this.minzoom)||!!(this.maxzoom&&Z>=this.maxzoom)||"none"===this.visibility},O.prototype.updateTransitions=function(Z){this._transitioningPaint=this._transitionablePaint.transitioned(Z,this._transitioningPaint)},O.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},O.prototype.recalculate=function(Z,ae){Z.getCrossfadeParameters&&(this._crossfadeParameters=Z.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(Z,void 0,ae)),this.paint=this._transitioningPaint.possiblyEvaluate(Z,void 0,ae)},O.prototype.serialize=function(){var Z={id:this.id,type:this.type,source:this.source,"source-layer":this.sourceLayer,metadata:this.metadata,minzoom:this.minzoom,maxzoom:this.maxzoom,filter:this.filter,layout:this._unevaluatedLayout&&this._unevaluatedLayout.serialize(),paint:this._transitionablePaint&&this._transitionablePaint.serialize()};return this.visibility&&(Z.layout=Z.layout||{},Z.layout.visibility=this.visibility),m(Z,function(ae,be){return!(void 0===ae||"layout"===be&&!Object.keys(ae).length||"paint"===be&&!Object.keys(ae).length)})},O.prototype._validate=function(Z,ae,be,Ee,je){return void 0===je&&(je={}),(!je||!1!==je.validate)&&Ia(this,Z.call(Yi,{key:ae,layerType:this.type,objectKey:be,value:Ee,styleSpec:Se,style:{glyphs:!0,sprite:!0}}))},O.prototype.is3D=function(){return!1},O.prototype.isTileClipped=function(){return!1},O.prototype.hasOffscreenPass=function(){return!1},O.prototype.resize=function(){},O.prototype.isStateDependent=function(){for(var Z in this.paint._values){var ae=this.paint.get(Z);if(ae instanceof Ki&&Yo(ae.property.specification)&&("source"===ae.value.kind||"composite"===ae.value.kind)&&ae.value.isStateDependent)return!0}return!1},O}(rt),is={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},ho=function(M,O){this._structArray=M,this._pos1=O*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},oi=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};function fi(M,O){void 0===O&&(O=1);var Z=0,ae=0;return{members:M.map(function(be){var je=is[be.type].BYTES_PER_ELEMENT,Qe=Z=zs(Z,Math.max(O,je)),lt=be.components||1;return ae=Math.max(ae,je),Z+=je*lt,{name:be.name,type:be.type,components:lt,offset:Qe}}),size:zs(Z,Math.max(ae,O)),alignment:O}}function zs(M,O){return Math.ceil(M/O)*O}oi.serialize=function(M,O){return M._trim(),O&&(M.isTransferred=!0,O.push(M.arrayBuffer)),{length:M.length,arrayBuffer:M.arrayBuffer}},oi.deserialize=function(M){var O=Object.create(this.prototype);return O.arrayBuffer=M.arrayBuffer,O.length=M.length,O.capacity=M.arrayBuffer.byteLength/O.bytesPerElement,O._refreshViews(),O},oi.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},oi.prototype.clear=function(){this.length=0},oi.prototype.resize=function(M){this.reserve(M),this.length=M},oi.prototype.reserve=function(M){if(M>this.capacity){this.capacity=Math.max(M,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var O=this.uint8;this._refreshViews(),O&&this.uint8.set(O)}},oi.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};var Xe=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae){var be=this.length;return this.resize(be+1),this.emplace(be,Z,ae)},O.prototype.emplace=function(Z,ae,be){var Ee=2*Z;return this.int16[Ee+0]=ae,this.int16[Ee+1]=be,Z},O}(oi);Xe.prototype.bytesPerElement=4,_r("StructArrayLayout2i4",Xe);var $e=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee){var je=this.length;return this.resize(je+1),this.emplace(je,Z,ae,be,Ee)},O.prototype.emplace=function(Z,ae,be,Ee,je){var Qe=4*Z;return this.int16[Qe+0]=ae,this.int16[Qe+1]=be,this.int16[Qe+2]=Ee,this.int16[Qe+3]=je,Z},O}(oi);$e.prototype.bytesPerElement=8,_r("StructArrayLayout4i8",$e);var at=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee,je,Qe){var lt=this.length;return this.resize(lt+1),this.emplace(lt,Z,ae,be,Ee,je,Qe)},O.prototype.emplace=function(Z,ae,be,Ee,je,Qe,lt){var _t=6*Z;return this.int16[_t+0]=ae,this.int16[_t+1]=be,this.int16[_t+2]=Ee,this.int16[_t+3]=je,this.int16[_t+4]=Qe,this.int16[_t+5]=lt,Z},O}(oi);at.prototype.bytesPerElement=12,_r("StructArrayLayout2i4i12",at);var ft=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee,je,Qe){var lt=this.length;return this.resize(lt+1),this.emplace(lt,Z,ae,be,Ee,je,Qe)},O.prototype.emplace=function(Z,ae,be,Ee,je,Qe,lt){var _t=4*Z,Mt=8*Z;return this.int16[_t+0]=ae,this.int16[_t+1]=be,this.uint8[Mt+4]=Ee,this.uint8[Mt+5]=je,this.uint8[Mt+6]=Qe,this.uint8[Mt+7]=lt,Z},O}(oi);ft.prototype.bytesPerElement=8,_r("StructArrayLayout2i4ub8",ft);var bt=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt){var qt=this.length;return this.resize(qt+1),this.emplace(qt,Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt)},O.prototype.emplace=function(Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt){var Vt=9*Z,rn=18*Z;return this.uint16[Vt+0]=ae,this.uint16[Vt+1]=be,this.uint16[Vt+2]=Ee,this.uint16[Vt+3]=je,this.uint16[Vt+4]=Qe,this.uint16[Vt+5]=lt,this.uint16[Vt+6]=_t,this.uint16[Vt+7]=Mt,this.uint8[rn+16]=Bt,this.uint8[rn+17]=qt,Z},O}(oi);bt.prototype.bytesPerElement=18,_r("StructArrayLayout8ui2ub18",bt);var yt=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt){var rn=this.length;return this.resize(rn+1),this.emplace(rn,Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt)},O.prototype.emplace=function(Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt,rn){var xn=12*Z;return this.int16[xn+0]=ae,this.int16[xn+1]=be,this.int16[xn+2]=Ee,this.int16[xn+3]=je,this.uint16[xn+4]=Qe,this.uint16[xn+5]=lt,this.uint16[xn+6]=_t,this.uint16[xn+7]=Mt,this.int16[xn+8]=Bt,this.int16[xn+9]=qt,this.int16[xn+10]=Vt,this.int16[xn+11]=rn,Z},O}(oi);yt.prototype.bytesPerElement=24,_r("StructArrayLayout4i4ui4i24",yt);var D=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,Z,ae,be)},O.prototype.emplace=function(Z,ae,be,Ee){var je=3*Z;return this.float32[je+0]=ae,this.float32[je+1]=be,this.float32[je+2]=Ee,Z},O}(oi);D.prototype.bytesPerElement=12,_r("StructArrayLayout3f12",D);var Y=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z){var ae=this.length;return this.resize(ae+1),this.emplace(ae,Z)},O.prototype.emplace=function(Z,ae){return this.uint32[1*Z+0]=ae,Z},O}(oi);Y.prototype.bytesPerElement=4,_r("StructArrayLayout1ul4",Y);var q=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee,je,Qe,lt,_t,Mt){var Bt=this.length;return this.resize(Bt+1),this.emplace(Bt,Z,ae,be,Ee,je,Qe,lt,_t,Mt)},O.prototype.emplace=function(Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt){var qt=10*Z,Vt=5*Z;return this.int16[qt+0]=ae,this.int16[qt+1]=be,this.int16[qt+2]=Ee,this.int16[qt+3]=je,this.int16[qt+4]=Qe,this.int16[qt+5]=lt,this.uint32[Vt+3]=_t,this.uint16[qt+8]=Mt,this.uint16[qt+9]=Bt,Z},O}(oi);q.prototype.bytesPerElement=20,_r("StructArrayLayout6i1ul2ui20",q);var ne=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee,je,Qe){var lt=this.length;return this.resize(lt+1),this.emplace(lt,Z,ae,be,Ee,je,Qe)},O.prototype.emplace=function(Z,ae,be,Ee,je,Qe,lt){var _t=6*Z;return this.int16[_t+0]=ae,this.int16[_t+1]=be,this.int16[_t+2]=Ee,this.int16[_t+3]=je,this.int16[_t+4]=Qe,this.int16[_t+5]=lt,Z},O}(oi);ne.prototype.bytesPerElement=12,_r("StructArrayLayout2i2i2i12",ne);var pe=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee,je){var Qe=this.length;return this.resize(Qe+1),this.emplace(Qe,Z,ae,be,Ee,je)},O.prototype.emplace=function(Z,ae,be,Ee,je,Qe){var lt=4*Z,_t=8*Z;return this.float32[lt+0]=ae,this.float32[lt+1]=be,this.float32[lt+2]=Ee,this.int16[_t+6]=je,this.int16[_t+7]=Qe,Z},O}(oi);pe.prototype.bytesPerElement=16,_r("StructArrayLayout2f1f2i16",pe);var Le=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee){var je=this.length;return this.resize(je+1),this.emplace(je,Z,ae,be,Ee)},O.prototype.emplace=function(Z,ae,be,Ee,je){var Qe=12*Z,lt=3*Z;return this.uint8[Qe+0]=ae,this.uint8[Qe+1]=be,this.float32[lt+1]=Ee,this.float32[lt+2]=je,Z},O}(oi);Le.prototype.bytesPerElement=12,_r("StructArrayLayout2ub2f12",Le);var Ne=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,Z,ae,be)},O.prototype.emplace=function(Z,ae,be,Ee){var je=3*Z;return this.uint16[je+0]=ae,this.uint16[je+1]=be,this.uint16[je+2]=Ee,Z},O}(oi);Ne.prototype.bytesPerElement=6,_r("StructArrayLayout3ui6",Ne);var qe=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt,rn,xn,In,On,jn){var Vn=this.length;return this.resize(Vn+1),this.emplace(Vn,Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt,rn,xn,In,On,jn)},O.prototype.emplace=function(Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt,rn,xn,In,On,jn,Vn){var Yn=24*Z,Qn=12*Z,tr=48*Z;return this.int16[Yn+0]=ae,this.int16[Yn+1]=be,this.uint16[Yn+2]=Ee,this.uint16[Yn+3]=je,this.uint32[Qn+2]=Qe,this.uint32[Qn+3]=lt,this.uint32[Qn+4]=_t,this.uint16[Yn+10]=Mt,this.uint16[Yn+11]=Bt,this.uint16[Yn+12]=qt,this.float32[Qn+7]=Vt,this.float32[Qn+8]=rn,this.uint8[tr+36]=xn,this.uint8[tr+37]=In,this.uint8[tr+38]=On,this.uint32[Qn+10]=jn,this.int16[Yn+22]=Vn,Z},O}(oi);qe.prototype.bytesPerElement=48,_r("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",qe);var et=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt,rn,xn,In,On,jn,Vn,Yn,Qn,tr,xr,pr,Tr,Er,jr,Pr,Nr){var Ir=this.length;return this.resize(Ir+1),this.emplace(Ir,Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt,rn,xn,In,On,jn,Vn,Yn,Qn,tr,xr,pr,Tr,Er,jr,Pr,Nr)},O.prototype.emplace=function(Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt,rn,xn,In,On,jn,Vn,Yn,Qn,tr,xr,pr,Tr,Er,jr,Pr,Nr,Ir){var Cr=34*Z,Jr=17*Z;return this.int16[Cr+0]=ae,this.int16[Cr+1]=be,this.int16[Cr+2]=Ee,this.int16[Cr+3]=je,this.int16[Cr+4]=Qe,this.int16[Cr+5]=lt,this.int16[Cr+6]=_t,this.int16[Cr+7]=Mt,this.uint16[Cr+8]=Bt,this.uint16[Cr+9]=qt,this.uint16[Cr+10]=Vt,this.uint16[Cr+11]=rn,this.uint16[Cr+12]=xn,this.uint16[Cr+13]=In,this.uint16[Cr+14]=On,this.uint16[Cr+15]=jn,this.uint16[Cr+16]=Vn,this.uint16[Cr+17]=Yn,this.uint16[Cr+18]=Qn,this.uint16[Cr+19]=tr,this.uint16[Cr+20]=xr,this.uint16[Cr+21]=pr,this.uint16[Cr+22]=Tr,this.uint32[Jr+12]=Er,this.float32[Jr+13]=jr,this.float32[Jr+14]=Pr,this.float32[Jr+15]=Nr,this.float32[Jr+16]=Ir,Z},O}(oi);et.prototype.bytesPerElement=68,_r("StructArrayLayout8i15ui1ul4f68",et);var vt=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z){var ae=this.length;return this.resize(ae+1),this.emplace(ae,Z)},O.prototype.emplace=function(Z,ae){return this.float32[1*Z+0]=ae,Z},O}(oi);vt.prototype.bytesPerElement=4,_r("StructArrayLayout1f4",vt);var xt=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,Z,ae,be)},O.prototype.emplace=function(Z,ae,be,Ee){var je=3*Z;return this.int16[je+0]=ae,this.int16[je+1]=be,this.int16[je+2]=Ee,Z},O}(oi);xt.prototype.bytesPerElement=6,_r("StructArrayLayout3i6",xt);var te=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,Z,ae,be)},O.prototype.emplace=function(Z,ae,be,Ee){var Qe=4*Z;return this.uint32[2*Z+0]=ae,this.uint16[Qe+2]=be,this.uint16[Qe+3]=Ee,Z},O}(oi);te.prototype.bytesPerElement=8,_r("StructArrayLayout1ul2ui8",te);var ue=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae){var be=this.length;return this.resize(be+1),this.emplace(be,Z,ae)},O.prototype.emplace=function(Z,ae,be){var Ee=2*Z;return this.uint16[Ee+0]=ae,this.uint16[Ee+1]=be,Z},O}(oi);ue.prototype.bytesPerElement=4,_r("StructArrayLayout2ui4",ue);var we=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z){var ae=this.length;return this.resize(ae+1),this.emplace(ae,Z)},O.prototype.emplace=function(Z,ae){return this.uint16[1*Z+0]=ae,Z},O}(oi);we.prototype.bytesPerElement=2,_r("StructArrayLayout1ui2",we);var Oe=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae){var be=this.length;return this.resize(be+1),this.emplace(be,Z,ae)},O.prototype.emplace=function(Z,ae,be){var Ee=2*Z;return this.float32[Ee+0]=ae,this.float32[Ee+1]=be,Z},O}(oi);Oe.prototype.bytesPerElement=8,_r("StructArrayLayout2f8",Oe);var De=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},O.prototype.emplaceBack=function(Z,ae,be,Ee){var je=this.length;return this.resize(je+1),this.emplace(je,Z,ae,be,Ee)},O.prototype.emplace=function(Z,ae,be,Ee,je){var Qe=4*Z;return this.float32[Qe+0]=ae,this.float32[Qe+1]=be,this.float32[Qe+2]=Ee,this.float32[Qe+3]=je,Z},O}(oi);De.prototype.bytesPerElement=16,_r("StructArrayLayout4f16",De);var Ue=function(M){function O(){M.apply(this,arguments)}M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O;var Z={anchorPointX:{configurable:!0},anchorPointY:{configurable:!0},x1:{configurable:!0},y1:{configurable:!0},x2:{configurable:!0},y2:{configurable:!0},featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0},anchorPoint:{configurable:!0}};return Z.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},Z.x1.get=function(){return this._structArray.int16[this._pos2+2]},Z.y1.get=function(){return this._structArray.int16[this._pos2+3]},Z.x2.get=function(){return this._structArray.int16[this._pos2+4]},Z.y2.get=function(){return this._structArray.int16[this._pos2+5]},Z.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Z.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},Z.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Z.anchorPoint.get=function(){return new t(this.anchorPointX,this.anchorPointY)},Object.defineProperties(O.prototype,Z),O}(ho);Ue.prototype.size=20;var Ze=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.get=function(Z){return new Ue(this,Z)},O}(q);_r("CollisionBoxArray",Ze);var Je=function(M){function O(){M.apply(this,arguments)}M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O;var Z={anchorX:{configurable:!0},anchorY:{configurable:!0},glyphStartIndex:{configurable:!0},numGlyphs:{configurable:!0},vertexStartIndex:{configurable:!0},lineStartIndex:{configurable:!0},lineLength:{configurable:!0},segment:{configurable:!0},lowerSize:{configurable:!0},upperSize:{configurable:!0},lineOffsetX:{configurable:!0},lineOffsetY:{configurable:!0},writingMode:{configurable:!0},placedOrientation:{configurable:!0},hidden:{configurable:!0},crossTileID:{configurable:!0},associatedIconIndex:{configurable:!0}};return Z.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Z.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Z.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},Z.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},Z.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},Z.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},Z.segment.get=function(){return this._structArray.uint16[this._pos2+10]},Z.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},Z.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},Z.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},Z.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},Z.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},Z.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},Z.placedOrientation.set=function(ae){this._structArray.uint8[this._pos1+37]=ae},Z.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},Z.hidden.set=function(ae){this._structArray.uint8[this._pos1+38]=ae},Z.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},Z.crossTileID.set=function(ae){this._structArray.uint32[this._pos4+10]=ae},Z.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(O.prototype,Z),O}(ho);Je.prototype.size=48;var it=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.get=function(Z){return new Je(this,Z)},O}(qe);_r("PlacedSymbolArray",it);var ut=function(M){function O(){M.apply(this,arguments)}M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O;var Z={anchorX:{configurable:!0},anchorY:{configurable:!0},rightJustifiedTextSymbolIndex:{configurable:!0},centerJustifiedTextSymbolIndex:{configurable:!0},leftJustifiedTextSymbolIndex:{configurable:!0},verticalPlacedTextSymbolIndex:{configurable:!0},placedIconSymbolIndex:{configurable:!0},verticalPlacedIconSymbolIndex:{configurable:!0},key:{configurable:!0},textBoxStartIndex:{configurable:!0},textBoxEndIndex:{configurable:!0},verticalTextBoxStartIndex:{configurable:!0},verticalTextBoxEndIndex:{configurable:!0},iconBoxStartIndex:{configurable:!0},iconBoxEndIndex:{configurable:!0},verticalIconBoxStartIndex:{configurable:!0},verticalIconBoxEndIndex:{configurable:!0},featureIndex:{configurable:!0},numHorizontalGlyphVertices:{configurable:!0},numVerticalGlyphVertices:{configurable:!0},numIconVertices:{configurable:!0},numVerticalIconVertices:{configurable:!0},useRuntimeCollisionCircles:{configurable:!0},crossTileID:{configurable:!0},textBoxScale:{configurable:!0},textOffset0:{configurable:!0},textOffset1:{configurable:!0},collisionCircleDiameter:{configurable:!0}};return Z.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},Z.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},Z.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},Z.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},Z.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},Z.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},Z.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},Z.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},Z.key.get=function(){return this._structArray.uint16[this._pos2+8]},Z.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},Z.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},Z.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},Z.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},Z.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},Z.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},Z.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},Z.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},Z.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},Z.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},Z.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},Z.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},Z.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},Z.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},Z.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},Z.crossTileID.set=function(ae){this._structArray.uint32[this._pos4+12]=ae},Z.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},Z.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},Z.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},Z.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(O.prototype,Z),O}(ho);ut.prototype.size=68;var St=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.get=function(Z){return new ut(this,Z)},O}(et);_r("SymbolInstanceArray",St);var Dt=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.getoffsetX=function(Z){return this.float32[1*Z+0]},O}(vt);_r("GlyphOffsetArray",Dt);var Ft=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.getx=function(Z){return this.int16[3*Z+0]},O.prototype.gety=function(Z){return this.int16[3*Z+1]},O.prototype.gettileUnitDistanceFromAnchor=function(Z){return this.int16[3*Z+2]},O}(xt);_r("SymbolLineVertexArray",Ft);var Yt=function(M){function O(){M.apply(this,arguments)}M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O;var Z={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return Z.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},Z.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},Z.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(O.prototype,Z),O}(ho);Yt.prototype.size=8;var ln=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.get=function(Z){return new Yt(this,Z)},O}(te);_r("FeatureIndexArray",ln);var Xt=fi([{name:"a_pos",components:2,type:"Int16"}],4).members,en=function(M){void 0===M&&(M=[]),this.segments=M};function Jt(M,O){return 256*(M=i(Math.floor(M),0,255))+i(Math.floor(O),0,255)}en.prototype.prepareSegment=function(M,O,Z,ae){var be=this.segments[this.segments.length-1];return M>en.MAX_VERTEX_ARRAY_LENGTH&&S("Max vertices per segment is "+en.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+M),(!be||be.vertexLength+M>en.MAX_VERTEX_ARRAY_LENGTH||be.sortKey!==ae)&&(be={vertexOffset:O.length,primitiveOffset:Z.length,vertexLength:0,primitiveLength:0},void 0!==ae&&(be.sortKey=ae),this.segments.push(be)),be},en.prototype.get=function(){return this.segments},en.prototype.destroy=function(){for(var M=0,O=this.segments;M<O.length;M+=1){var Z=O[M];for(var ae in Z.vaos)Z.vaos[ae].destroy()}},en.simpleSegment=function(M,O,Z,ae){return new en([{vertexOffset:M,primitiveOffset:O,vertexLength:Z,primitiveLength:ae,vaos:{},sortKey:0}])},en.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,_r("SegmentVector",en);var bn=fi([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint8"},{name:"a_pixel_ratio_to",components:1,type:"Uint8"}]),gn=T(function(M){M.exports=function(O,Z){var ae,be,Ee,je,Qe,lt,_t,Mt;for(be=O.length-(ae=3&O.length),Ee=Z,Qe=3432918353,lt=461845907,Mt=0;Mt<be;)_t=255&O.charCodeAt(Mt)|(255&O.charCodeAt(++Mt))<<8|(255&O.charCodeAt(++Mt))<<16|(255&O.charCodeAt(++Mt))<<24,++Mt,Ee=27492+(65535&(je=5*(65535&(Ee=(Ee^=_t=(65535&(_t=(_t=(65535&_t)*Qe+(((_t>>>16)*Qe&65535)<<16)&4294967295)<<15|_t>>>17))*lt+(((_t>>>16)*lt&65535)<<16)&4294967295)<<13|Ee>>>19))+((5*(Ee>>>16)&65535)<<16)&4294967295))+((58964+(je>>>16)&65535)<<16);switch(_t=0,ae){case 3:_t^=(255&O.charCodeAt(Mt+2))<<16;case 2:_t^=(255&O.charCodeAt(Mt+1))<<8;case 1:Ee^=_t=(65535&(_t=(_t=(65535&(_t^=255&O.charCodeAt(Mt)))*Qe+(((_t>>>16)*Qe&65535)<<16)&4294967295)<<15|_t>>>17))*lt+(((_t>>>16)*lt&65535)<<16)&4294967295}return Ee^=O.length,Ee=2246822507*(65535&(Ee^=Ee>>>16))+((2246822507*(Ee>>>16)&65535)<<16)&4294967295,Ee=3266489909*(65535&(Ee^=Ee>>>13))+((3266489909*(Ee>>>16)&65535)<<16)&4294967295,(Ee^=Ee>>>16)>>>0}}),Qt=T(function(M){M.exports=function(O,Z){for(var ae,be=O.length,Ee=Z^be,je=0;be>=4;)ae=1540483477*(65535&(ae=255&O.charCodeAt(je)|(255&O.charCodeAt(++je))<<8|(255&O.charCodeAt(++je))<<16|(255&O.charCodeAt(++je))<<24))+((1540483477*(ae>>>16)&65535)<<16),Ee=1540483477*(65535&Ee)+((1540483477*(Ee>>>16)&65535)<<16)^(ae=1540483477*(65535&(ae^=ae>>>24))+((1540483477*(ae>>>16)&65535)<<16)),be-=4,++je;switch(be){case 3:Ee^=(255&O.charCodeAt(je+2))<<16;case 2:Ee^=(255&O.charCodeAt(je+1))<<8;case 1:Ee=1540483477*(65535&(Ee^=255&O.charCodeAt(je)))+((1540483477*(Ee>>>16)&65535)<<16)}return Ee=1540483477*(65535&(Ee^=Ee>>>13))+((1540483477*(Ee>>>16)&65535)<<16),(Ee^=Ee>>>15)>>>0}}),Pn=gn,Xn=Qt;Pn.murmur3=gn,Pn.murmur2=Xn;var Jn=function(){this.ids=[],this.positions=[],this.indexed=!1};Jn.prototype.add=function(M,O,Z,ae){this.ids.push(vr(M)),this.positions.push(O,Z,ae)},Jn.prototype.getPositions=function(M){for(var O=vr(M),Z=0,ae=this.ids.length-1;Z<ae;){var be=Z+ae>>1;this.ids[be]>=O?ae=be:Z=be+1}for(var Ee=[];this.ids[Z]===O;)Ee.push({index:this.positions[3*Z],start:this.positions[3*Z+1],end:this.positions[3*Z+2]}),Z++;return Ee},Jn.serialize=function(M,O){var Z=new Float64Array(M.ids),ae=new Uint32Array(M.positions);return sr(Z,ae,0,Z.length-1),O&&O.push(Z.buffer,ae.buffer),{ids:Z,positions:ae}},Jn.deserialize=function(M){var O=new Jn;return O.ids=M.ids,O.positions=M.positions,O.indexed=!0,O};var gr=Math.pow(2,53)-1;function vr(M){var O=+M;return!isNaN(O)&&O<=gr?O:Pn(String(M))}function sr(M,O,Z,ae){for(;Z<ae;){for(var be=M[Z+ae>>1],Ee=Z-1,je=ae+1;;){do{Ee++}while(M[Ee]<be);do{je--}while(M[je]>be);if(Ee>=je)break;dr(M,Ee,je),dr(O,3*Ee,3*je),dr(O,3*Ee+1,3*je+1),dr(O,3*Ee+2,3*je+2)}je-Z<ae-je?(sr(M,O,Z,je),Z=je+1):(sr(M,O,je+1,ae),ae=je)}}function dr(M,O,Z){var ae=M[O];M[O]=M[Z],M[Z]=ae}_r("FeaturePositionMap",Jn);var kr=function(M,O){this.gl=M.gl,this.location=O},Vr=function(M){function O(Z,ae){M.call(this,Z,ae),this.current=0}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.set=function(Z){this.current!==Z&&(this.current=Z,this.gl.uniform1i(this.location,Z))},O}(kr),Hr=function(M){function O(Z,ae){M.call(this,Z,ae),this.current=0}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.set=function(Z){this.current!==Z&&(this.current=Z,this.gl.uniform1f(this.location,Z))},O}(kr),hr=function(M){function O(Z,ae){M.call(this,Z,ae),this.current=[0,0]}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.set=function(Z){Z[0]===this.current[0]&&Z[1]===this.current[1]||(this.current=Z,this.gl.uniform2f(this.location,Z[0],Z[1]))},O}(kr),Ar=function(M){function O(Z,ae){M.call(this,Z,ae),this.current=[0,0,0]}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.set=function(Z){Z[0]===this.current[0]&&Z[1]===this.current[1]&&Z[2]===this.current[2]||(this.current=Z,this.gl.uniform3f(this.location,Z[0],Z[1],Z[2]))},O}(kr),Dr=function(M){function O(Z,ae){M.call(this,Z,ae),this.current=[0,0,0,0]}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.set=function(Z){Z[0]===this.current[0]&&Z[1]===this.current[1]&&Z[2]===this.current[2]&&Z[3]===this.current[3]||(this.current=Z,this.gl.uniform4f(this.location,Z[0],Z[1],Z[2],Z[3]))},O}(kr),zr=function(M){function O(Z,ae){M.call(this,Z,ae),this.current=hn.transparent}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.set=function(Z){Z.r===this.current.r&&Z.g===this.current.g&&Z.b===this.current.b&&Z.a===this.current.a||(this.current=Z,this.gl.uniform4f(this.location,Z.r,Z.g,Z.b,Z.a))},O}(kr),Wr=new Float32Array(16),Zr=function(M){function O(Z,ae){M.call(this,Z,ae),this.current=Wr}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.set=function(Z){if(Z[12]!==this.current[12]||Z[0]!==this.current[0])return this.current=Z,void this.gl.uniformMatrix4fv(this.location,!1,Z);for(var ae=1;ae<16;ae++)if(Z[ae]!==this.current[ae]){this.current=Z,this.gl.uniformMatrix4fv(this.location,!1,Z);break}},O}(kr);function $r(M){return[Jt(255*M.r,255*M.g),Jt(255*M.b,255*M.a)]}var ui=function(M,O,Z){this.value=M,this.uniformNames=O.map(function(ae){return"u_"+ae}),this.type=Z};ui.prototype.setUniform=function(M,O,Z){M.set(Z.constantOr(this.value))},ui.prototype.getBinding=function(M,O,Z){return"color"===this.type?new zr(M,O):new Hr(M,O)};var yi=function(M,O){this.uniformNames=O.map(function(Z){return"u_"+Z}),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1};yi.prototype.setConstantPatternPositions=function(M,O){this.pixelRatioFrom=O.pixelRatio,this.pixelRatioTo=M.pixelRatio,this.patternFrom=O.tlbr,this.patternTo=M.tlbr},yi.prototype.setUniform=function(M,O,Z,ae){var be="u_pattern_to"===ae?this.patternTo:"u_pattern_from"===ae?this.patternFrom:"u_pixel_ratio_to"===ae?this.pixelRatioTo:"u_pixel_ratio_from"===ae?this.pixelRatioFrom:null;be&&M.set(be)},yi.prototype.getBinding=function(M,O,Z){return"u_pattern"===Z.substr(0,9)?new Dr(M,O):new Hr(M,O)};var hi=function(M,O,Z,ae){this.expression=M,this.type=Z,this.maxValue=0,this.paintVertexAttributes=O.map(function(be){return{name:"a_"+be,type:"Float32",components:"color"===Z?2:1,offset:0}}),this.paintVertexArray=new ae};hi.prototype.populatePaintArray=function(M,O,Z,ae,be){var Ee=this.paintVertexArray.length,je=this.expression.evaluate(new ni(0),O,{},ae,[],be);this.paintVertexArray.resize(M),this._setPaintValue(Ee,M,je)},hi.prototype.updatePaintArray=function(M,O,Z,ae){var be=this.expression.evaluate({zoom:0},Z,ae);this._setPaintValue(M,O,be)},hi.prototype._setPaintValue=function(M,O,Z){if("color"===this.type)for(var ae=$r(Z),be=M;be<O;be++)this.paintVertexArray.emplace(be,ae[0],ae[1]);else{for(var Ee=M;Ee<O;Ee++)this.paintVertexArray.emplace(Ee,Z);this.maxValue=Math.max(this.maxValue,Math.abs(Z))}},hi.prototype.upload=function(M){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=M.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},hi.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()};var si=function(M,O,Z,ae,be,Ee){this.expression=M,this.uniformNames=O.map(function(je){return"u_"+je+"_t"}),this.type=Z,this.useIntegerZoom=ae,this.zoom=be,this.maxValue=0,this.paintVertexAttributes=O.map(function(je){return{name:"a_"+je,type:"Float32",components:"color"===Z?4:2,offset:0}}),this.paintVertexArray=new Ee};si.prototype.populatePaintArray=function(M,O,Z,ae,be){var Ee=this.expression.evaluate(new ni(this.zoom),O,{},ae,[],be),je=this.expression.evaluate(new ni(this.zoom+1),O,{},ae,[],be),Qe=this.paintVertexArray.length;this.paintVertexArray.resize(M),this._setPaintValue(Qe,M,Ee,je)},si.prototype.updatePaintArray=function(M,O,Z,ae){var be=this.expression.evaluate({zoom:this.zoom},Z,ae),Ee=this.expression.evaluate({zoom:this.zoom+1},Z,ae);this._setPaintValue(M,O,be,Ee)},si.prototype._setPaintValue=function(M,O,Z,ae){if("color"===this.type)for(var be=$r(Z),Ee=$r(ae),je=M;je<O;je++)this.paintVertexArray.emplace(je,be[0],be[1],Ee[0],Ee[1]);else{for(var Qe=M;Qe<O;Qe++)this.paintVertexArray.emplace(Qe,Z,ae);this.maxValue=Math.max(this.maxValue,Math.abs(Z),Math.abs(ae))}},si.prototype.upload=function(M){this.paintVertexArray&&this.paintVertexArray.arrayBuffer&&(this.paintVertexBuffer&&this.paintVertexBuffer.buffer?this.paintVertexBuffer.updateData(this.paintVertexArray):this.paintVertexBuffer=M.createVertexBuffer(this.paintVertexArray,this.paintVertexAttributes,this.expression.isStateDependent))},si.prototype.destroy=function(){this.paintVertexBuffer&&this.paintVertexBuffer.destroy()},si.prototype.setUniform=function(M,O){var Z=this.useIntegerZoom?Math.floor(O.zoom):O.zoom,ae=i(this.expression.interpolationFactor(Z,this.zoom,this.zoom+1),0,1);M.set(ae)},si.prototype.getBinding=function(M,O,Z){return new Hr(M,O)};var ci=function(M,O,Z,ae,be,Ee){this.expression=M,this.type=O,this.useIntegerZoom=Z,this.zoom=ae,this.layerId=Ee,this.zoomInPaintVertexArray=new be,this.zoomOutPaintVertexArray=new be};ci.prototype.populatePaintArray=function(M,O,Z){var ae=this.zoomInPaintVertexArray.length;this.zoomInPaintVertexArray.resize(M),this.zoomOutPaintVertexArray.resize(M),this._setPaintValues(ae,M,O.patterns&&O.patterns[this.layerId],Z)},ci.prototype.updatePaintArray=function(M,O,Z,ae,be){this._setPaintValues(M,O,Z.patterns&&Z.patterns[this.layerId],be)},ci.prototype._setPaintValues=function(M,O,Z,ae){if(ae&&Z){var Qe=ae[Z.min],lt=ae[Z.mid],_t=ae[Z.max];if(Qe&&lt&&_t)for(var Mt=M;Mt<O;Mt++)this.zoomInPaintVertexArray.emplace(Mt,lt.tl[0],lt.tl[1],lt.br[0],lt.br[1],Qe.tl[0],Qe.tl[1],Qe.br[0],Qe.br[1],lt.pixelRatio,Qe.pixelRatio),this.zoomOutPaintVertexArray.emplace(Mt,lt.tl[0],lt.tl[1],lt.br[0],lt.br[1],_t.tl[0],_t.tl[1],_t.br[0],_t.br[1],lt.pixelRatio,_t.pixelRatio)}},ci.prototype.upload=function(M){this.zoomInPaintVertexArray&&this.zoomInPaintVertexArray.arrayBuffer&&this.zoomOutPaintVertexArray&&this.zoomOutPaintVertexArray.arrayBuffer&&(this.zoomInPaintVertexBuffer=M.createVertexBuffer(this.zoomInPaintVertexArray,bn.members,this.expression.isStateDependent),this.zoomOutPaintVertexBuffer=M.createVertexBuffer(this.zoomOutPaintVertexArray,bn.members,this.expression.isStateDependent))},ci.prototype.destroy=function(){this.zoomOutPaintVertexBuffer&&this.zoomOutPaintVertexBuffer.destroy(),this.zoomInPaintVertexBuffer&&this.zoomInPaintVertexBuffer.destroy()};var pi=function(M,O,Z,ae){this.binders={},this.layoutAttributes=ae,this._buffers=[];var be=[];for(var Ee in M.paint._values)if(Z(Ee)){var je=M.paint.get(Ee);if(je instanceof Ki&&Yo(je.property.specification)){var Qe=Mo(Ee,M.type),lt=je.value,_t=je.property.specification.type,Mt=je.property.useIntegerZoom,Bt=je.property.specification["property-type"],qt="cross-faded"===Bt||"cross-faded-data-driven"===Bt;if("constant"===lt.kind)this.binders[Ee]=qt?new yi(lt.value,Qe):new ui(lt.value,Qe,_t),be.push("/u_"+Ee);else if("source"===lt.kind||qt){var Vt=Fi(Ee,_t,"source");this.binders[Ee]=qt?new ci(lt,_t,Mt,O,Vt,M.id):new hi(lt,Qe,_t,Vt),be.push("/a_"+Ee)}else{var rn=Fi(Ee,_t,"composite");this.binders[Ee]=new si(lt,Qe,_t,Mt,O,rn),be.push("/z_"+Ee)}}}this.cacheKey=be.sort().join("")};pi.prototype.getMaxValue=function(M){var O=this.binders[M];return O instanceof hi||O instanceof si?O.maxValue:0},pi.prototype.populatePaintArrays=function(M,O,Z,ae,be){for(var Ee in this.binders){var je=this.binders[Ee];(je instanceof hi||je instanceof si||je instanceof ci)&&je.populatePaintArray(M,O,Z,ae,be)}},pi.prototype.setConstantPatternPositions=function(M,O){for(var Z in this.binders){var ae=this.binders[Z];ae instanceof yi&&ae.setConstantPatternPositions(M,O)}},pi.prototype.updatePaintArrays=function(M,O,Z,ae,be){var Ee=!1;for(var je in M)for(var Qe=0,lt=O.getPositions(je);Qe<lt.length;Qe+=1){var _t=lt[Qe],Mt=Z.feature(_t.index);for(var Bt in this.binders){var qt=this.binders[Bt];if((qt instanceof hi||qt instanceof si||qt instanceof ci)&&!0===qt.expression.isStateDependent){var Vt=ae.paint.get(Bt);qt.expression=Vt.value,qt.updatePaintArray(_t.start,_t.end,Mt,M[je],be),Ee=!0}}}return Ee},pi.prototype.defines=function(){var M=[];for(var O in this.binders){var Z=this.binders[O];(Z instanceof ui||Z instanceof yi)&&M.push.apply(M,Z.uniformNames.map(function(ae){return"#define HAS_UNIFORM_"+ae}))}return M},pi.prototype.getPaintVertexBuffers=function(){return this._buffers},pi.prototype.getUniforms=function(M,O){var Z=[];for(var ae in this.binders){var be=this.binders[ae];if(be instanceof ui||be instanceof yi||be instanceof si)for(var Ee=0,je=be.uniformNames;Ee<je.length;Ee+=1){var Qe=je[Ee];if(O[Qe]){var lt=be.getBinding(M,O[Qe],Qe);Z.push({name:Qe,property:ae,binding:lt})}}}return Z},pi.prototype.setUniforms=function(M,O,Z,ae){for(var be=0,Ee=O;be<Ee.length;be+=1){var je=Ee[be],Qe=je.name,lt=je.property;this.binders[lt].setUniform(je.binding,ae,Z.get(lt),Qe)}},pi.prototype.updatePaintBuffers=function(M){for(var O in this._buffers=[],this.binders){var Z=this.binders[O];if(M&&Z instanceof ci){var ae=2===M.fromScale?Z.zoomInPaintVertexBuffer:Z.zoomOutPaintVertexBuffer;ae&&this._buffers.push(ae)}else(Z instanceof hi||Z instanceof si)&&Z.paintVertexBuffer&&this._buffers.push(Z.paintVertexBuffer)}},pi.prototype.upload=function(M){for(var O in this.binders){var Z=this.binders[O];(Z instanceof hi||Z instanceof si||Z instanceof ci)&&Z.upload(M)}this.updatePaintBuffers()},pi.prototype.destroy=function(){for(var M in this.binders){var O=this.binders[M];(O instanceof hi||O instanceof si||O instanceof ci)&&O.destroy()}};var Si=function(M,O,Z,ae){void 0===ae&&(ae=function(){return!0}),this.programConfigurations={};for(var be=0,Ee=O;be<Ee.length;be+=1){var je=Ee[be];this.programConfigurations[je.id]=new pi(je,Z,ae,M)}this.needsUpload=!1,this._featureMap=new Jn,this._bufferOffset=0};function Mo(M,O){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[M]||[M.replace(O+"-","").replace(/-/g,"_")]}function Fi(M,O,Z){var be={"line-pattern":{source:bt,composite:bt},"fill-pattern":{source:bt,composite:bt},"fill-extrusion-pattern":{source:bt,composite:bt}}[M];return be&&be[Z]||{color:{source:Oe,composite:De},number:{source:vt,composite:Oe}}[O][Z]}Si.prototype.populatePaintArrays=function(M,O,Z,ae,be,Ee){for(var je in this.programConfigurations)this.programConfigurations[je].populatePaintArrays(M,O,ae,be,Ee);void 0!==O.id&&this._featureMap.add(O.id,Z,this._bufferOffset,M),this._bufferOffset=M,this.needsUpload=!0},Si.prototype.updatePaintArrays=function(M,O,Z,ae){for(var be=0,Ee=Z;be<Ee.length;be+=1){var je=Ee[be];this.needsUpload=this.programConfigurations[je.id].updatePaintArrays(M,this._featureMap,O,je,ae)||this.needsUpload}},Si.prototype.get=function(M){return this.programConfigurations[M]},Si.prototype.upload=function(M){if(this.needsUpload){for(var O in this.programConfigurations)this.programConfigurations[O].upload(M);this.needsUpload=!1}},Si.prototype.destroy=function(){for(var M in this.programConfigurations)this.programConfigurations[M].destroy()},_r("ConstantBinder",ui),_r("CrossFadedConstantBinder",yi),_r("SourceExpressionBinder",hi),_r("CrossFadedCompositeBinder",ci),_r("CompositeExpressionBinder",si),_r("ProgramConfiguration",pi,{omit:["_buffers"]}),_r("ProgramConfigurationSet",Si);var Br=8192,Qi={min:-1*Math.pow(2,14),max:Math.pow(2,14)-1};function ki(M){for(var O=Br/M.extent,Z=M.loadGeometry(),ae=0;ae<Z.length;ae++)for(var be=Z[ae],Ee=0;Ee<be.length;Ee++){var je=be[Ee];je.x=Math.round(je.x*O),je.y=Math.round(je.y*O),(je.x<Qi.min||je.x>Qi.max||je.y<Qi.min||je.y>Qi.max)&&(S("Geometry exceeds allowed extent, reduce your vector tile buffer size"),je.x=i(je.x,Qi.min,Qi.max),je.y=i(je.y,Qi.min,Qi.max))}return Z}function Ga(M,O,Z,ae,be){M.emplaceBack(2*O+(ae+1)/2,2*Z+(be+1)/2)}var Yr=function(M){this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(O){return O.id}),this.index=M.index,this.hasPattern=!1,this.layoutVertexArray=new Xe,this.indexArray=new Ne,this.segments=new en,this.programConfigurations=new Si(Xt,M.layers,M.zoom),this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};function Bi(M,O){for(var Z=0;Z<M.length;Z++)if(cl(O,M[Z]))return!0;for(var ae=0;ae<O.length;ae++)if(cl(M,O[ae]))return!0;return!!Jl(M,O)}function ha(M,O,Z){return!!cl(M,O)||!!ul(O,M,Z)}function Ds(M,O){if(1===M.length)return xl(O,M[0]);for(var Z=0;Z<O.length;Z++)for(var ae=O[Z],be=0;be<ae.length;be++)if(cl(M,ae[be]))return!0;for(var Ee=0;Ee<M.length;Ee++)if(xl(O,M[Ee]))return!0;for(var je=0;je<O.length;je++)if(Jl(M,O[je]))return!0;return!1}function sc(M,O,Z){if(M.length>1){if(Jl(M,O))return!0;for(var ae=0;ae<O.length;ae++)if(ul(O[ae],M,Z))return!0}for(var be=0;be<M.length;be++)if(ul(M[be],O,Z))return!0;return!1}function Jl(M,O){if(0===M.length||0===O.length)return!1;for(var Z=0;Z<M.length-1;Z++)for(var ae=M[Z],be=M[Z+1],Ee=0;Ee<O.length-1;Ee++)if(lc(ae,be,O[Ee],O[Ee+1]))return!0;return!1}function lc(M,O,Z,ae){return _(M,Z,ae)!==_(O,Z,ae)&&_(M,O,Z)!==_(M,O,ae)}function ul(M,O,Z){var ae=Z*Z;if(1===O.length)return M.distSqr(O[0])<ae;for(var be=1;be<O.length;be++)if(_u(M,O[be-1],O[be])<ae)return!0;return!1}function _u(M,O,Z){var ae=O.distSqr(Z);if(0===ae)return M.distSqr(O);var be=((M.x-O.x)*(Z.x-O.x)+(M.y-O.y)*(Z.y-O.y))/ae;return M.distSqr(be<0?O:be>1?Z:Z.sub(O)._mult(be)._add(O))}function xl(M,O){for(var Z,ae,be,Ee=!1,je=0;je<M.length;je++)for(var Qe=0,lt=(Z=M[je]).length-1;Qe<Z.length;lt=Qe++)(ae=Z[Qe]).y>O.y!=(be=Z[lt]).y>O.y&&O.x<(be.x-ae.x)*(O.y-ae.y)/(be.y-ae.y)+ae.x&&(Ee=!Ee);return Ee}function cl(M,O){for(var Z=!1,ae=0,be=M.length-1;ae<M.length;be=ae++){var Ee=M[ae],je=M[be];Ee.y>O.y!=je.y>O.y&&O.x<(je.x-Ee.x)*(O.y-Ee.y)/(je.y-Ee.y)+Ee.x&&(Z=!Z)}return Z}function uc(M,O,Z){var ae=Z[0],be=Z[2];if(M.x<ae.x&&O.x<ae.x||M.x>be.x&&O.x>be.x||M.y<ae.y&&O.y<ae.y||M.y>be.y&&O.y>be.y)return!1;var Ee=_(M,O,Z[0]);return Ee!==_(M,O,Z[1])||Ee!==_(M,O,Z[2])||Ee!==_(M,O,Z[3])}function $s(M,O,Z){var ae=O.paint.get(M).value;return"constant"===ae.kind?ae.value:Z.programConfigurations.get(O.id).getMaxValue(M)}function wu(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1])}function Tu(M,O,Z,ae,be){if(!O[0]&&!O[1])return M;var Ee=t.convert(O)._mult(be);"viewport"===Z&&Ee._rotate(-ae);for(var je=[],Qe=0;Qe<M.length;Qe++)je.push(M[Qe].sub(Ee));return je}Yr.prototype.populate=function(M,O,Z){var ae=this.layers[0],be=[],Ee=null;"circle"===ae.type&&(Ee=ae.layout.get("circle-sort-key"));for(var je=0,Qe=M;je<Qe.length;je+=1){var lt=Qe[je],_t=lt.feature,Mt=lt.id,Bt=lt.index,qt=lt.sourceLayerIndex,Vt=this.layers[0]._featureFilter.needGeometry,rn={type:_t.type,id:Mt,properties:_t.properties,geometry:Vt?ki(_t):[]};if(this.layers[0]._featureFilter.filter(new ni(this.zoom),rn,Z)){Vt||(rn.geometry=ki(_t));var xn=Ee?Ee.evaluate(rn,{},Z):void 0;be.push({id:Mt,properties:_t.properties,type:_t.type,sourceLayerIndex:qt,index:Bt,geometry:rn.geometry,patterns:{},sortKey:xn})}}Ee&&be.sort(function(Tr,Er){return Tr.sortKey-Er.sortKey});for(var On=0,jn=be;On<jn.length;On+=1){var Vn=jn[On],Qn=Vn.geometry,tr=Vn.index,xr=Vn.sourceLayerIndex,pr=M[tr].feature;this.addFeature(Vn,Qn,tr,Z),O.featureIndex.insert(pr,Qn,tr,xr,this.index)}},Yr.prototype.update=function(M,O,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Z)},Yr.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},Yr.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},Yr.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,Xt),this.indexBuffer=M.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(M),this.uploaded=!0},Yr.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},Yr.prototype.addFeature=function(M,O,Z,ae){for(var be=0,Ee=O;be<Ee.length;be+=1)for(var je=0,Qe=Ee[be];je<Qe.length;je+=1){var lt=Qe[je],_t=lt.x,Mt=lt.y;if(!(_t<0||_t>=Br||Mt<0||Mt>=Br)){var Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,M.sortKey),qt=Bt.vertexLength;Ga(this.layoutVertexArray,_t,Mt,-1,-1),Ga(this.layoutVertexArray,_t,Mt,1,-1),Ga(this.layoutVertexArray,_t,Mt,1,1),Ga(this.layoutVertexArray,_t,Mt,-1,1),this.indexArray.emplaceBack(qt,qt+1,qt+2),this.indexArray.emplaceBack(qt,qt+3,qt+2),Bt.vertexLength+=4,Bt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Z,{},ae)},_r("CircleBucket",Yr,{omit:["layers"]});var Lh=new $i({"circle-sort-key":new Or(Se.layout_circle["circle-sort-key"])}),Ch={paint:new $i({"circle-radius":new Or(Se.paint_circle["circle-radius"]),"circle-color":new Or(Se.paint_circle["circle-color"]),"circle-blur":new Or(Se.paint_circle["circle-blur"]),"circle-opacity":new Or(Se.paint_circle["circle-opacity"]),"circle-translate":new Mr(Se.paint_circle["circle-translate"]),"circle-translate-anchor":new Mr(Se.paint_circle["circle-translate-anchor"]),"circle-pitch-scale":new Mr(Se.paint_circle["circle-pitch-scale"]),"circle-pitch-alignment":new Mr(Se.paint_circle["circle-pitch-alignment"]),"circle-stroke-width":new Or(Se.paint_circle["circle-stroke-width"]),"circle-stroke-color":new Or(Se.paint_circle["circle-stroke-color"]),"circle-stroke-opacity":new Or(Se.paint_circle["circle-stroke-opacity"])}),layout:Lh},So=typeof Float32Array<"u"?Float32Array:Array;function cc(M){return M[0]=1,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=1,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=1,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function Yc(M,O,Z){var ae=O[0],be=O[1],Ee=O[2],je=O[3],Qe=O[4],lt=O[5],_t=O[6],Mt=O[7],Bt=O[8],qt=O[9],Vt=O[10],rn=O[11],xn=O[12],In=O[13],On=O[14],jn=O[15],Vn=Z[0],Yn=Z[1],Qn=Z[2],tr=Z[3];return M[0]=Vn*ae+Yn*Qe+Qn*Bt+tr*xn,M[1]=Vn*be+Yn*lt+Qn*qt+tr*In,M[2]=Vn*Ee+Yn*_t+Qn*Vt+tr*On,M[3]=Vn*je+Yn*Mt+Qn*rn+tr*jn,M[4]=(Vn=Z[4])*ae+(Yn=Z[5])*Qe+(Qn=Z[6])*Bt+(tr=Z[7])*xn,M[5]=Vn*be+Yn*lt+Qn*qt+tr*In,M[6]=Vn*Ee+Yn*_t+Qn*Vt+tr*On,M[7]=Vn*je+Yn*Mt+Qn*rn+tr*jn,M[8]=(Vn=Z[8])*ae+(Yn=Z[9])*Qe+(Qn=Z[10])*Bt+(tr=Z[11])*xn,M[9]=Vn*be+Yn*lt+Qn*qt+tr*In,M[10]=Vn*Ee+Yn*_t+Qn*Vt+tr*On,M[11]=Vn*je+Yn*Mt+Qn*rn+tr*jn,M[12]=(Vn=Z[12])*ae+(Yn=Z[13])*Qe+(Qn=Z[14])*Bt+(tr=Z[15])*xn,M[13]=Vn*be+Yn*lt+Qn*qt+tr*In,M[14]=Vn*Ee+Yn*_t+Qn*Vt+tr*On,M[15]=Vn*je+Yn*Mt+Qn*rn+tr*jn,M}Math.hypot||(Math.hypot=function(){for(var M=arguments,O=0,Z=arguments.length;Z--;)O+=M[Z]*M[Z];return Math.sqrt(O)});var ku,M,Ph=Yc;function Au(M,O,Z){var ae=O[0],be=O[1],Ee=O[2],je=O[3];return M[0]=Z[0]*ae+Z[4]*be+Z[8]*Ee+Z[12]*je,M[1]=Z[1]*ae+Z[5]*be+Z[9]*Ee+Z[13]*je,M[2]=Z[2]*ae+Z[6]*be+Z[10]*Ee+Z[14]*je,M[3]=Z[3]*ae+Z[7]*be+Z[11]*Ee+Z[15]*je,M}ku=new So(3),So!=Float32Array&&(ku[0]=0,ku[1]=0,ku[2]=0),M=new So(4),So!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0,M[3]=0);var Rh=(function(){var M=new So(2);So!=Float32Array&&(M[0]=0,M[1]=0)}(),function(M){function O(Z){M.call(this,Z,Ch)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.createBucket=function(Z){return new Yr(Z)},O.prototype.queryRadius=function(Z){var ae=Z;return $s("circle-radius",this,ae)+$s("circle-stroke-width",this,ae)+wu(this.paint.get("circle-translate"))},O.prototype.queryIntersectsFeature=function(Z,ae,be,Ee,je,Qe,lt,_t){for(var Mt=Tu(Z,this.paint.get("circle-translate"),this.paint.get("circle-translate-anchor"),Qe.angle,lt),Bt=this.paint.get("circle-radius").evaluate(ae,be)+this.paint.get("circle-stroke-width").evaluate(ae,be),qt="map"===this.paint.get("circle-pitch-alignment"),Vt=qt?Mt:function(xr,pr){return xr.map(function(Tr){return Xc(Tr,pr)})}(Mt,_t),rn=qt?Bt*lt:Bt,xn=0,In=Ee;xn<In.length;xn+=1)for(var On=0,jn=In[xn];On<jn.length;On+=1){var Vn=jn[On],Yn=qt?Vn:Xc(Vn,_t),Qn=rn,tr=Au([],[Vn.x,Vn.y,0,1],_t);if("viewport"===this.paint.get("circle-pitch-scale")&&"map"===this.paint.get("circle-pitch-alignment")?Qn*=tr[3]/Qe.cameraToCenterDistance:"map"===this.paint.get("circle-pitch-scale")&&"viewport"===this.paint.get("circle-pitch-alignment")&&(Qn*=Qe.cameraToCenterDistance/tr[3]),ha(Vt,Yn,Qn))return!0}return!1},O}(fa));function Xc(M,O){var Z=Au([],[M.x,M.y,0,1],O);return new t(Z[0]/Z[3],Z[1]/Z[3])}var Jc=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O}(Yr);function fc(M,O,Z,ae){var be=O.width,Ee=O.height;if(ae){if(ae instanceof Uint8ClampedArray)ae=new Uint8Array(ae.buffer);else if(ae.length!==be*Ee*Z)throw new RangeError("mismatched image size")}else ae=new Uint8Array(be*Ee*Z);return M.width=be,M.height=Ee,M.data=ae,M}function Kc(M,O,Z){var ae=O.width,be=O.height;if(ae!==M.width||be!==M.height){var Ee=fc({},{width:ae,height:be},Z);hc(M,Ee,{x:0,y:0},{x:0,y:0},{width:Math.min(M.width,ae),height:Math.min(M.height,be)},Z),M.width=ae,M.height=be,M.data=Ee.data}}function hc(M,O,Z,ae,be,Ee){if(0===be.width||0===be.height)return O;if(be.width>M.width||be.height>M.height||Z.x>M.width-be.width||Z.y>M.height-be.height)throw new RangeError("out of range source coordinates for image copy");if(be.width>O.width||be.height>O.height||ae.x>O.width-be.width||ae.y>O.height-be.height)throw new RangeError("out of range destination coordinates for image copy");for(var je=M.data,Qe=O.data,lt=0;lt<be.height;lt++)for(var _t=((Z.y+lt)*M.width+Z.x)*Ee,Mt=((ae.y+lt)*O.width+ae.x)*Ee,Bt=0;Bt<be.width*Ee;Bt++)Qe[Mt+Bt]=je[_t+Bt];return O}_r("HeatmapBucket",Jc,{omit:["layers"]});var bl=function(M,O){fc(this,M,1,O)};bl.prototype.resize=function(M){Kc(this,M,1)},bl.prototype.clone=function(){return new bl({width:this.width,height:this.height},new Uint8Array(this.data))},bl.copy=function(M,O,Z,ae,be){hc(M,O,Z,ae,be,1)};var Qa=function(M,O){fc(this,M,4,O)};Qa.prototype.resize=function(M){Kc(this,M,4)},Qa.prototype.replace=function(M,O){O?this.data.set(M):this.data=M instanceof Uint8ClampedArray?new Uint8Array(M.buffer):M},Qa.prototype.clone=function(){return new Qa({width:this.width,height:this.height},new Uint8Array(this.data))},Qa.copy=function(M,O,Z,ae,be){hc(M,O,Z,ae,be,4)},_r("AlphaImage",bl),_r("RGBAImage",Qa);var zh={paint:new $i({"heatmap-radius":new Or(Se.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Or(Se.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new Mr(Se.paint_heatmap["heatmap-intensity"]),"heatmap-color":new qa(Se.paint_heatmap["heatmap-color"]),"heatmap-opacity":new Mr(Se.paint_heatmap["heatmap-opacity"])})};function $c(M,O){for(var Z=new Uint8Array(1024),ae={},be=0,Ee=0;be<256;be++,Ee+=4){ae[O]=be/255;var je=M.evaluate(ae);Z[Ee+0]=Math.floor(255*je.r/je.a),Z[Ee+1]=Math.floor(255*je.g/je.a),Z[Ee+2]=Math.floor(255*je.b/je.a),Z[Ee+3]=Math.floor(255*je.a)}return new Qa({width:256,height:1},Z)}var Dh=function(M){function O(Z){M.call(this,Z,zh),this._updateColorRamp()}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.createBucket=function(Z){return new Jc(Z)},O.prototype._handleSpecialPaintPropertyUpdate=function(Z){"heatmap-color"===Z&&this._updateColorRamp()},O.prototype._updateColorRamp=function(){this.colorRamp=$c(this._transitionablePaint._values["heatmap-color"].value.expression,"heatmapDensity"),this.colorRampTexture=null},O.prototype.resize=function(){this.heatmapFbo&&(this.heatmapFbo.destroy(),this.heatmapFbo=null)},O.prototype.queryRadius=function(){return 0},O.prototype.queryIntersectsFeature=function(){return!1},O.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("heatmap-opacity")&&"none"!==this.visibility},O}(fa),Fh={paint:new $i({"hillshade-illumination-direction":new Mr(Se.paint_hillshade["hillshade-illumination-direction"]),"hillshade-illumination-anchor":new Mr(Se.paint_hillshade["hillshade-illumination-anchor"]),"hillshade-exaggeration":new Mr(Se.paint_hillshade["hillshade-exaggeration"]),"hillshade-shadow-color":new Mr(Se.paint_hillshade["hillshade-shadow-color"]),"hillshade-highlight-color":new Mr(Se.paint_hillshade["hillshade-highlight-color"]),"hillshade-accent-color":new Mr(Se.paint_hillshade["hillshade-accent-color"])})},Bh=function(M){function O(Z){M.call(this,Z,Fh)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.hasOffscreenPass=function(){return 0!==this.paint.get("hillshade-exaggeration")&&"none"!==this.visibility},O}(fa),Qc=fi([{name:"a_pos",components:2,type:"Int16"}],4).members,pc=Mu,Nh=Mu;function Mu(M,O,Z){Z=Z||2;var ae,be,Ee,je,Qe,lt,_t,Mt=O&&O.length,Bt=Mt?O[0]*Z:M.length,qt=ef(M,0,Bt,Z,!0),Vt=[];if(!qt||qt.next===qt.prev)return Vt;if(Mt&&(qt=function(xn,In,On,jn){var Vn,Yn,Qn,tr=[];for(Vn=0,Yn=In.length;Vn<Yn;Vn++)(Qn=ef(xn,In[Vn]*jn,Vn<Yn-1?In[Vn+1]*jn:xn.length,jn,!1))===Qn.next&&(Qn.steiner=!0),tr.push(Wh(Qn));for(tr.sort(qh),Vn=0;Vn<tr.length;Vn++)Gh(tr[Vn],On),On=fl(On,On.next);return On}(M,O,qt,Z)),M.length>80*Z){ae=Ee=M[0],be=je=M[1];for(var rn=Z;rn<Bt;rn+=Z)(Qe=M[rn])<ae&&(ae=Qe),(lt=M[rn+1])<be&&(be=lt),Qe>Ee&&(Ee=Qe),lt>je&&(je=lt);_t=0!==(_t=Math.max(Ee-ae,je-be))?1/_t:0}return Kl(qt,Vt,Z,ae,be,_t),Vt}function ef(M,O,Z,ae,be){var Ee,je;if(be===vc(M,O,Z,ae)>0)for(Ee=O;Ee<Z;Ee+=ae)je=rf(Ee,M[Ee],M[Ee+1],je);else for(Ee=Z-ae;Ee>=O;Ee-=ae)je=rf(Ee,M[Ee],M[Ee+1],je);return je&&Su(je,je.next)&&(Ql(je),je=je.next),je}function fl(M,O){if(!M)return M;O||(O=M);var Z,ae=M;do{if(Z=!1,ae.steiner||!Su(ae,ae.next)&&0!==ea(ae.prev,ae,ae.next))ae=ae.next;else{if(Ql(ae),(ae=O=ae.prev)===ae.next)break;Z=!0}}while(Z||ae!==O);return O}function Kl(M,O,Z,ae,be,Ee,je){if(M){!je&&Ee&&function(Mt,Bt,qt,Vt){var rn=Mt;do{null===rn.z&&(rn.z=dc(rn.x,rn.y,Bt,qt,Vt)),rn.prevZ=rn.prev,rn.nextZ=rn.next,rn=rn.next}while(rn!==Mt);rn.prevZ.nextZ=null,rn.prevZ=null,function(xn){var In,On,jn,Vn,Yn,Qn,tr,xr,pr=1;do{for(On=xn,xn=null,Yn=null,Qn=0;On;){for(Qn++,jn=On,tr=0,In=0;In<pr&&(tr++,jn=jn.nextZ);In++);for(xr=pr;tr>0||xr>0&&jn;)0!==tr&&(0===xr||!jn||On.z<=jn.z)?(Vn=On,On=On.nextZ,tr--):(Vn=jn,jn=jn.nextZ,xr--),Yn?Yn.nextZ=Vn:xn=Vn,Vn.prevZ=Yn,Yn=Vn;On=jn}Yn.nextZ=null,pr*=2}while(Qn>1)}(rn)}(M,ae,be,Ee);for(var Qe,lt,_t=M;M.prev!==M.next;)if(Qe=M.prev,lt=M.next,Ee?Uh(M,ae,be,Ee):jh(M))O.push(Qe.i/Z),O.push(M.i/Z),O.push(lt.i/Z),Ql(M),M=lt.next,_t=lt.next;else if((M=lt)===_t){je?1===je?Kl(M=Vh(fl(M),O,Z),O,Z,ae,be,Ee,2):2===je&&Hh(M,O,Z,ae,be,Ee):Kl(fl(M),O,Z,ae,be,Ee,1);break}}}function jh(M){var O=M.prev,Z=M,ae=M.next;if(ea(O,Z,ae)>=0)return!1;for(var be=M.next.next;be!==M.prev;){if(Cl(O.x,O.y,Z.x,Z.y,ae.x,ae.y,be.x,be.y)&&ea(be.prev,be,be.next)>=0)return!1;be=be.next}return!0}function Uh(M,O,Z,ae){var be=M.prev,Ee=M,je=M.next;if(ea(be,Ee,je)>=0)return!1;for(var _t=be.x>Ee.x?be.x>je.x?be.x:je.x:Ee.x>je.x?Ee.x:je.x,Mt=be.y>Ee.y?be.y>je.y?be.y:je.y:Ee.y>je.y?Ee.y:je.y,Bt=dc(be.x<Ee.x?be.x<je.x?be.x:je.x:Ee.x<je.x?Ee.x:je.x,be.y<Ee.y?be.y<je.y?be.y:je.y:Ee.y<je.y?Ee.y:je.y,O,Z,ae),qt=dc(_t,Mt,O,Z,ae),Vt=M.prevZ,rn=M.nextZ;Vt&&Vt.z>=Bt&&rn&&rn.z<=qt;){if(Vt!==M.prev&&Vt!==M.next&&Cl(be.x,be.y,Ee.x,Ee.y,je.x,je.y,Vt.x,Vt.y)&&ea(Vt.prev,Vt,Vt.next)>=0||(Vt=Vt.prevZ,rn!==M.prev&&rn!==M.next&&Cl(be.x,be.y,Ee.x,Ee.y,je.x,je.y,rn.x,rn.y)&&ea(rn.prev,rn,rn.next)>=0))return!1;rn=rn.nextZ}for(;Vt&&Vt.z>=Bt;){if(Vt!==M.prev&&Vt!==M.next&&Cl(be.x,be.y,Ee.x,Ee.y,je.x,je.y,Vt.x,Vt.y)&&ea(Vt.prev,Vt,Vt.next)>=0)return!1;Vt=Vt.prevZ}for(;rn&&rn.z<=qt;){if(rn!==M.prev&&rn!==M.next&&Cl(be.x,be.y,Ee.x,Ee.y,je.x,je.y,rn.x,rn.y)&&ea(rn.prev,rn,rn.next)>=0)return!1;rn=rn.nextZ}return!0}function Vh(M,O,Z){var ae=M;do{var be=ae.prev,Ee=ae.next.next;!Su(be,Ee)&&tf(be,ae,ae.next,Ee)&&$l(be,Ee)&&$l(Ee,be)&&(O.push(be.i/Z),O.push(ae.i/Z),O.push(Ee.i/Z),Ql(ae),Ql(ae.next),ae=M=Ee),ae=ae.next}while(ae!==M);return fl(ae)}function Hh(M,O,Z,ae,be,Ee){var je=M;do{for(var Qe=je.next.next;Qe!==je.prev;){if(je.i!==Qe.i&&Yh(je,Qe)){var lt=nf(je,Qe);return je=fl(je,je.next),lt=fl(lt,lt.next),Kl(je,O,Z,ae,be,Ee),void Kl(lt,O,Z,ae,be,Ee)}Qe=Qe.next}je=je.next}while(je!==M)}function qh(M,O){return M.x-O.x}function Gh(M,O){if(O=function(ae,be){var Ee,je=be,Qe=ae.x,lt=ae.y,_t=-1/0;do{if(lt<=je.y&&lt>=je.next.y&&je.next.y!==je.y){var Mt=je.x+(lt-je.y)*(je.next.x-je.x)/(je.next.y-je.y);if(Mt<=Qe&&Mt>_t){if(_t=Mt,Mt===Qe){if(lt===je.y)return je;if(lt===je.next.y)return je.next}Ee=je.x<je.next.x?je:je.next}}je=je.next}while(je!==be);if(!Ee)return null;if(Qe===_t)return Ee;var Bt,qt=Ee,Vt=Ee.x,rn=Ee.y,xn=1/0;je=Ee;do{Qe>=je.x&&je.x>=Vt&&Qe!==je.x&&Cl(lt<rn?Qe:_t,lt,Vt,rn,lt<rn?_t:Qe,lt,je.x,je.y)&&(Bt=Math.abs(lt-je.y)/(Qe-je.x),$l(je,ae)&&(Bt<xn||Bt===xn&&(je.x>Ee.x||je.x===Ee.x&&Zh(Ee,je)))&&(Ee=je,xn=Bt)),je=je.next}while(je!==qt);return Ee}(M,O)){var Z=nf(O,M);fl(O,O.next),fl(Z,Z.next)}}function Zh(M,O){return ea(M.prev,M,O.prev)<0&&ea(O.next,M,M.next)<0}function dc(M,O,Z,ae,be){return(M=1431655765&((M=858993459&((M=252645135&((M=16711935&((M=32767*(M-Z)*be)|M<<8))|M<<4))|M<<2))|M<<1))|(O=1431655765&((O=858993459&((O=252645135&((O=16711935&((O=32767*(O-ae)*be)|O<<8))|O<<4))|O<<2))|O<<1))<<1}function Wh(M){var O=M,Z=M;do{(O.x<Z.x||O.x===Z.x&&O.y<Z.y)&&(Z=O),O=O.next}while(O!==M);return Z}function Cl(M,O,Z,ae,be,Ee,je,Qe){return(be-je)*(O-Qe)-(M-je)*(Ee-Qe)>=0&&(M-je)*(ae-Qe)-(Z-je)*(O-Qe)>=0&&(Z-je)*(Ee-Qe)-(be-je)*(ae-Qe)>=0}function Yh(M,O){return M.next.i!==O.i&&M.prev.i!==O.i&&!function(Z,ae){var be=Z;do{if(be.i!==Z.i&&be.next.i!==Z.i&&be.i!==ae.i&&be.next.i!==ae.i&&tf(be,be.next,Z,ae))return!0;be=be.next}while(be!==Z);return!1}(M,O)&&($l(M,O)&&$l(O,M)&&function(Z,ae){var be=Z,Ee=!1,je=(Z.x+ae.x)/2,Qe=(Z.y+ae.y)/2;do{be.y>Qe!=be.next.y>Qe&&be.next.y!==be.y&&je<(be.next.x-be.x)*(Qe-be.y)/(be.next.y-be.y)+be.x&&(Ee=!Ee),be=be.next}while(be!==Z);return Ee}(M,O)&&(ea(M.prev,M,O.prev)||ea(M,O.prev,O))||Su(M,O)&&ea(M.prev,M,M.next)>0&&ea(O.prev,O,O.next)>0)}function ea(M,O,Z){return(O.y-M.y)*(Z.x-O.x)-(O.x-M.x)*(Z.y-O.y)}function Su(M,O){return M.x===O.x&&M.y===O.y}function tf(M,O,Z,ae){var be=Lu(ea(M,O,Z)),Ee=Lu(ea(M,O,ae)),je=Lu(ea(Z,ae,M)),Qe=Lu(ea(Z,ae,O));return be!==Ee&&je!==Qe||!(0!==be||!Eu(M,Z,O))||!(0!==Ee||!Eu(M,ae,O))||!(0!==je||!Eu(Z,M,ae))||!(0!==Qe||!Eu(Z,O,ae))}function Eu(M,O,Z){return O.x<=Math.max(M.x,Z.x)&&O.x>=Math.min(M.x,Z.x)&&O.y<=Math.max(M.y,Z.y)&&O.y>=Math.min(M.y,Z.y)}function Lu(M){return M>0?1:M<0?-1:0}function $l(M,O){return ea(M.prev,M,M.next)<0?ea(M,O,M.next)>=0&&ea(M,M.prev,O)>=0:ea(M,O,M.prev)<0||ea(M,M.next,O)<0}function nf(M,O){var Z=new gc(M.i,M.x,M.y),ae=new gc(O.i,O.x,O.y),be=M.next,Ee=O.prev;return M.next=O,O.prev=M,Z.next=be,be.prev=Z,ae.next=Z,Z.prev=ae,Ee.next=ae,ae.prev=Ee,ae}function rf(M,O,Z,ae){var be=new gc(M,O,Z);return ae?(be.next=ae.next,be.prev=ae,ae.next.prev=be,ae.next=be):(be.prev=be,be.next=be),be}function Ql(M){M.next.prev=M.prev,M.prev.next=M.next,M.prevZ&&(M.prevZ.nextZ=M.nextZ),M.nextZ&&(M.nextZ.prevZ=M.prevZ)}function gc(M,O,Z){this.i=M,this.x=O,this.y=Z,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function vc(M,O,Z,ae){for(var be=0,Ee=O,je=Z-ae;Ee<Z;Ee+=ae)be+=(M[je]-M[Ee])*(M[Ee+1]+M[je+1]),je=Ee;return be}function Xh(M,O,Z,ae,be){af(M,O,Z||0,ae||M.length-1,be||Jh)}function af(M,O,Z,ae,be){for(;ae>Z;){if(ae-Z>600){var Ee=ae-Z+1,je=O-Z+1,Qe=Math.log(Ee),lt=.5*Math.exp(2*Qe/3),_t=.5*Math.sqrt(Qe*lt*(Ee-lt)/Ee)*(je-Ee/2<0?-1:1);af(M,O,Math.max(Z,Math.floor(O-je*lt/Ee+_t)),Math.min(ae,Math.floor(O+(Ee-je)*lt/Ee+_t)),be)}var Mt=M[O],Bt=Z,qt=ae;for(eu(M,Z,O),be(M[ae],Mt)>0&&eu(M,Z,ae);Bt<qt;){for(eu(M,Bt,qt),Bt++,qt--;be(M[Bt],Mt)<0;)Bt++;for(;be(M[qt],Mt)>0;)qt--}0===be(M[Z],Mt)?eu(M,Z,qt):eu(M,++qt,ae),qt<=O&&(Z=qt+1),O<=qt&&(ae=qt-1)}}function eu(M,O,Z){var ae=M[O];M[O]=M[Z],M[Z]=ae}function Jh(M,O){return M<O?-1:M>O?1:0}function mc(M,O){var Z=M.length;if(Z<=1)return[M];for(var ae,be,Ee=[],je=0;je<Z;je++){var Qe=E(M[je]);0!==Qe&&(M[je].area=Math.abs(Qe),void 0===be&&(be=Qe<0),be===Qe<0?(ae&&Ee.push(ae),ae=[M[je]]):ae.push(M[je]))}if(ae&&Ee.push(ae),O>1)for(var lt=0;lt<Ee.length;lt++)Ee[lt].length<=O||(Xh(Ee[lt],O,1,Ee[lt].length-1,Kh),Ee[lt]=Ee[lt].slice(0,O));return Ee}function Kh(M,O){return O.area-M.area}function yc(M,O,Z){for(var ae=Z.patternDependencies,be=!1,Ee=0,je=O;Ee<je.length;Ee+=1){var Qe=je[Ee].paint.get(M+"-pattern");Qe.isConstant()||(be=!0);var lt=Qe.constantOr(null);lt&&(be=!0,ae[lt.to]=!0,ae[lt.from]=!0)}return be}function xc(M,O,Z,ae,be){for(var Ee=be.patternDependencies,je=0,Qe=O;je<Qe.length;je+=1){var lt=Qe[je],_t=lt.paint.get(M+"-pattern").value;if("constant"!==_t.kind){var Mt=_t.evaluate({zoom:ae-1},Z,{},be.availableImages),Bt=_t.evaluate({zoom:ae},Z,{},be.availableImages),qt=_t.evaluate({zoom:ae+1},Z,{},be.availableImages);Bt=Bt&&Bt.name?Bt.name:Bt,qt=qt&&qt.name?qt.name:qt,Ee[Mt=Mt&&Mt.name?Mt.name:Mt]=!0,Ee[Bt]=!0,Ee[qt]=!0,Z.patterns[lt.id]={min:Mt,mid:Bt,max:qt}}}return Z}Mu.deviation=function(M,O,Z,ae){var be=O&&O.length,je=Math.abs(vc(M,0,be?O[0]*Z:M.length,Z));if(be)for(var Qe=0,lt=O.length;Qe<lt;Qe++)je-=Math.abs(vc(M,O[Qe]*Z,Qe<lt-1?O[Qe+1]*Z:M.length,Z));var Bt=0;for(Qe=0;Qe<ae.length;Qe+=3){var qt=ae[Qe]*Z,Vt=ae[Qe+1]*Z,rn=ae[Qe+2]*Z;Bt+=Math.abs((M[qt]-M[rn])*(M[Vt+1]-M[qt+1])-(M[qt]-M[Vt])*(M[rn+1]-M[qt+1]))}return 0===je&&0===Bt?0:Math.abs((Bt-je)/je)},Mu.flatten=function(M){for(var O=M[0][0].length,Z={vertices:[],holes:[],dimensions:O},ae=0,be=0;be<M.length;be++){for(var Ee=0;Ee<M[be].length;Ee++)for(var je=0;je<O;je++)Z.vertices.push(M[be][Ee][je]);be>0&&Z.holes.push(ae+=M[be-1].length)}return Z},pc.default=Nh;var bs=function(M){this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(O){return O.id}),this.index=M.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new Xe,this.indexArray=new Ne,this.indexArray2=new ue,this.programConfigurations=new Si(Qc,M.layers,M.zoom),this.segments=new en,this.segments2=new en,this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};bs.prototype.populate=function(M,O,Z){this.hasPattern=yc("fill",this.layers,O);for(var ae=this.layers[0].layout.get("fill-sort-key"),be=[],Ee=0,je=M;Ee<je.length;Ee+=1){var Qe=je[Ee],lt=Qe.feature,_t=Qe.id,Mt=Qe.index,Bt=Qe.sourceLayerIndex,qt=this.layers[0]._featureFilter.needGeometry,Vt={type:lt.type,id:_t,properties:lt.properties,geometry:qt?ki(lt):[]};if(this.layers[0]._featureFilter.filter(new ni(this.zoom),Vt,Z)){qt||(Vt.geometry=ki(lt));var rn=ae?ae.evaluate(Vt,{},Z,O.availableImages):void 0;be.push({id:_t,properties:lt.properties,type:lt.type,sourceLayerIndex:Bt,index:Mt,geometry:Vt.geometry,patterns:{},sortKey:rn})}}ae&&be.sort(function(Tr,Er){return Tr.sortKey-Er.sortKey});for(var In=0,On=be;In<On.length;In+=1){var jn=On[In],Yn=jn.geometry,Qn=jn.index,tr=jn.sourceLayerIndex;if(this.hasPattern){var xr=xc("fill",this.layers,jn,this.zoom,O);this.patternFeatures.push(xr)}else this.addFeature(jn,Yn,Qn,Z,{});O.featureIndex.insert(M[Qn].feature,Yn,Qn,tr,this.index)}},bs.prototype.update=function(M,O,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Z)},bs.prototype.addFeatures=function(M,O,Z){for(var ae=0,be=this.patternFeatures;ae<be.length;ae+=1){var Ee=be[ae];this.addFeature(Ee,Ee.geometry,Ee.index,O,Z)}},bs.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},bs.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},bs.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,Qc),this.indexBuffer=M.createIndexBuffer(this.indexArray),this.indexBuffer2=M.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(M),this.uploaded=!0},bs.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())},bs.prototype.addFeature=function(M,O,Z,ae,be){for(var Ee=0,je=mc(O,500);Ee<je.length;Ee+=1){for(var Qe=je[Ee],lt=0,_t=0,Mt=Qe;_t<Mt.length;_t+=1)lt+=Mt[_t].length;for(var Bt=this.segments.prepareSegment(lt,this.layoutVertexArray,this.indexArray),qt=Bt.vertexLength,Vt=[],rn=[],xn=0,In=Qe;xn<In.length;xn+=1){var On=In[xn];if(0!==On.length){On!==Qe[0]&&rn.push(Vt.length/2);var jn=this.segments2.prepareSegment(On.length,this.layoutVertexArray,this.indexArray2),Vn=jn.vertexLength;this.layoutVertexArray.emplaceBack(On[0].x,On[0].y),this.indexArray2.emplaceBack(Vn+On.length-1,Vn),Vt.push(On[0].x),Vt.push(On[0].y);for(var Yn=1;Yn<On.length;Yn++)this.layoutVertexArray.emplaceBack(On[Yn].x,On[Yn].y),this.indexArray2.emplaceBack(Vn+Yn-1,Vn+Yn),Vt.push(On[Yn].x),Vt.push(On[Yn].y);jn.vertexLength+=On.length,jn.primitiveLength+=On.length}}for(var Qn=pc(Vt,rn),tr=0;tr<Qn.length;tr+=3)this.indexArray.emplaceBack(qt+Qn[tr],qt+Qn[tr+1],qt+Qn[tr+2]);Bt.vertexLength+=lt,Bt.primitiveLength+=Qn.length/3}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Z,be,ae)},_r("FillBucket",bs,{omit:["layers","patternFeatures"]});var $h=new $i({"fill-sort-key":new Or(Se.layout_fill["fill-sort-key"])}),Qh={paint:new $i({"fill-antialias":new Mr(Se.paint_fill["fill-antialias"]),"fill-opacity":new Or(Se.paint_fill["fill-opacity"]),"fill-color":new Or(Se.paint_fill["fill-color"]),"fill-outline-color":new Or(Se.paint_fill["fill-outline-color"]),"fill-translate":new Mr(Se.paint_fill["fill-translate"]),"fill-translate-anchor":new Mr(Se.paint_fill["fill-translate-anchor"]),"fill-pattern":new rs(Se.paint_fill["fill-pattern"])}),layout:$h},ep=function(M){function O(Z){M.call(this,Z,Qh)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.recalculate=function(Z,ae){M.prototype.recalculate.call(this,Z,ae);var be=this.paint._values["fill-outline-color"];"constant"===be.value.kind&&void 0===be.value.value&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])},O.prototype.createBucket=function(Z){return new bs(Z)},O.prototype.queryRadius=function(){return wu(this.paint.get("fill-translate"))},O.prototype.queryIntersectsFeature=function(Z,ae,be,Ee,je,Qe,lt){return Ds(Tu(Z,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),Qe.angle,lt),Ee)},O.prototype.isTileClipped=function(){return!0},O}(fa),of=fi([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4).members,sf=Pl;function Pl(M,O,Z,ae,be){this.properties={},this.extent=Z,this.type=0,this._pbf=M,this._geometry=-1,this._keys=ae,this._values=be,M.readFields(tp,this,O)}function tp(M,O,Z){1==M?O.id=Z.readVarint():2==M?function(ae,be){for(var Ee=ae.readVarint()+ae.pos;ae.pos<Ee;){var je=be._keys[ae.readVarint()],Qe=be._values[ae.readVarint()];be.properties[je]=Qe}}(Z,O):3==M?O.type=Z.readVarint():4==M&&(O._geometry=Z.pos)}function np(M){for(var O,Z,ae=0,be=0,Ee=M.length,je=Ee-1;be<Ee;je=be++)ae+=((Z=M[je]).x-(O=M[be]).x)*(O.y+Z.y);return ae}Pl.types=["Unknown","Point","LineString","Polygon"],Pl.prototype.loadGeometry=function(){var M=this._pbf;M.pos=this._geometry;for(var O,Z=M.readVarint()+M.pos,ae=1,be=0,Ee=0,je=0,Qe=[];M.pos<Z;){if(be<=0){var lt=M.readVarint();ae=7&lt,be=lt>>3}if(be--,1===ae||2===ae)Ee+=M.readSVarint(),je+=M.readSVarint(),1===ae&&(O&&Qe.push(O),O=[]),O.push(new t(Ee,je));else{if(7!==ae)throw new Error("unknown command "+ae);O&&O.push(O[0].clone())}}return O&&Qe.push(O),Qe},Pl.prototype.bbox=function(){var M=this._pbf;M.pos=this._geometry;for(var O=M.readVarint()+M.pos,Z=1,ae=0,be=0,Ee=0,je=1/0,Qe=-1/0,lt=1/0,_t=-1/0;M.pos<O;){if(ae<=0){var Mt=M.readVarint();Z=7&Mt,ae=Mt>>3}if(ae--,1===Z||2===Z)(be+=M.readSVarint())<je&&(je=be),be>Qe&&(Qe=be),(Ee+=M.readSVarint())<lt&&(lt=Ee),Ee>_t&&(_t=Ee);else if(7!==Z)throw new Error("unknown command "+Z)}return[je,lt,Qe,_t]},Pl.prototype.toGeoJSON=function(M,O,Z){var ae,be,Ee=this.extent*Math.pow(2,Z),je=this.extent*M,Qe=this.extent*O,lt=this.loadGeometry(),_t=Pl.types[this.type];function Mt(Vt){for(var rn=0;rn<Vt.length;rn++){var xn=Vt[rn];Vt[rn]=[360*(xn.x+je)/Ee-180,360/Math.PI*Math.atan(Math.exp((180-360*(xn.y+Qe)/Ee)*Math.PI/180))-90]}}switch(this.type){case 1:var Bt=[];for(ae=0;ae<lt.length;ae++)Bt[ae]=lt[ae][0];Mt(lt=Bt);break;case 2:for(ae=0;ae<lt.length;ae++)Mt(lt[ae]);break;case 3:for(lt=function(Vt){var rn=Vt.length;if(rn<=1)return[Vt];for(var xn,In,On=[],jn=0;jn<rn;jn++){var Vn=np(Vt[jn]);0!==Vn&&(void 0===In&&(In=Vn<0),In===Vn<0?(xn&&On.push(xn),xn=[Vt[jn]]):xn.push(Vt[jn]))}return xn&&On.push(xn),On}(lt),ae=0;ae<lt.length;ae++)for(be=0;be<lt[ae].length;be++)Mt(lt[ae][be])}1===lt.length?lt=lt[0]:_t="Multi"+_t;var qt={type:"Feature",geometry:{type:_t,coordinates:lt},properties:this.properties};return"id"in this&&(qt.id=this.id),qt};var lf=uf;function uf(M,O){this.version=1,this.name=null,this.extent=4096,this.length=0,this._pbf=M,this._keys=[],this._values=[],this._features=[],M.readFields(rp,this,O),this.length=this._features.length}function rp(M,O,Z){15===M?O.version=Z.readVarint():1===M?O.name=Z.readString():5===M?O.extent=Z.readVarint():2===M?O._features.push(Z.pos):3===M?O._keys.push(Z.readString()):4===M&&O._values.push(function(ae){for(var be=null,Ee=ae.readVarint()+ae.pos;ae.pos<Ee;){var je=ae.readVarint()>>3;be=1===je?ae.readString():2===je?ae.readFloat():3===je?ae.readDouble():4===je?ae.readVarint64():5===je?ae.readVarint():6===je?ae.readSVarint():7===je?ae.readBoolean():null}return be}(Z))}function ip(M,O,Z){if(3===M){var ae=new lf(Z,Z.readVarint()+Z.pos);ae.length&&(O[ae.name]=ae)}}uf.prototype.feature=function(M){if(M<0||M>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[M];var O=this._pbf.readVarint()+this._pbf.pos;return new sf(this._pbf,O,this.extent,this._keys,this._values)};var Ol={VectorTile:function(M,O){this.layers=M.readFields(ip,{},O)},VectorTileFeature:sf,VectorTileLayer:lf},ap=Ol.VectorTileFeature.types,bc=Math.pow(2,13);function tu(M,O,Z,ae,be,Ee,je,Qe){M.emplaceBack(O,Z,2*Math.floor(ae*bc)+je,be*bc*2,Ee*bc*2,Math.round(Qe))}var _s=function(M){this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(O){return O.id}),this.index=M.index,this.hasPattern=!1,this.layoutVertexArray=new at,this.indexArray=new Ne,this.programConfigurations=new Si(of,M.layers,M.zoom),this.segments=new en,this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};function op(M,O){return M.x===O.x&&(M.x<0||M.x>Br)||M.y===O.y&&(M.y<0||M.y>Br)}_s.prototype.populate=function(M,O,Z){this.features=[],this.hasPattern=yc("fill-extrusion",this.layers,O);for(var ae=0,be=M;ae<be.length;ae+=1){var Ee=be[ae],je=Ee.feature,Qe=Ee.id,lt=Ee.index,_t=Ee.sourceLayerIndex,Mt=this.layers[0]._featureFilter.needGeometry,Bt={type:je.type,id:Qe,properties:je.properties,geometry:Mt?ki(je):[]};if(this.layers[0]._featureFilter.filter(new ni(this.zoom),Bt,Z)){var qt={id:Qe,sourceLayerIndex:_t,index:lt,geometry:Mt?Bt.geometry:ki(je),properties:je.properties,type:je.type,patterns:{}};void 0!==je.id&&(qt.id=je.id),this.hasPattern?this.features.push(xc("fill-extrusion",this.layers,qt,this.zoom,O)):this.addFeature(qt,qt.geometry,lt,Z,{}),O.featureIndex.insert(je,qt.geometry,lt,_t,this.index,!0)}}},_s.prototype.addFeatures=function(M,O,Z){for(var ae=0,be=this.features;ae<be.length;ae+=1){var Ee=be[ae];this.addFeature(Ee,Ee.geometry,Ee.index,O,Z)}},_s.prototype.update=function(M,O,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Z)},_s.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},_s.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},_s.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,of),this.indexBuffer=M.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(M),this.uploaded=!0},_s.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},_s.prototype.addFeature=function(M,O,Z,ae,be){for(var Ee=0,je=mc(O,500);Ee<je.length;Ee+=1){for(var Qe=je[Ee],lt=0,_t=0,Mt=Qe;_t<Mt.length;_t+=1)lt+=Mt[_t].length;for(var Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray),qt=0,Vt=Qe;qt<Vt.length;qt+=1){var rn=Vt[qt];if(0!==rn.length&&!((Jr=rn).every(function(qr){return qr.x<0})||Jr.every(function(qr){return qr.x>Br})||Jr.every(function(qr){return qr.y<0})||Jr.every(function(qr){return qr.y>Br})))for(var xn=0,In=0;In<rn.length;In++){var On=rn[In];if(In>=1){var jn=rn[In-1];if(!op(On,jn)){Bt.vertexLength+4>en.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Vn=On.sub(jn)._perp()._unit(),Yn=jn.dist(On);xn+Yn>32768&&(xn=0),tu(this.layoutVertexArray,On.x,On.y,Vn.x,Vn.y,0,0,xn),tu(this.layoutVertexArray,On.x,On.y,Vn.x,Vn.y,0,1,xn),tu(this.layoutVertexArray,jn.x,jn.y,Vn.x,Vn.y,0,0,xn+=Yn),tu(this.layoutVertexArray,jn.x,jn.y,Vn.x,Vn.y,0,1,xn);var Qn=Bt.vertexLength;this.indexArray.emplaceBack(Qn,Qn+2,Qn+1),this.indexArray.emplaceBack(Qn+1,Qn+2,Qn+3),Bt.vertexLength+=4,Bt.primitiveLength+=2}}}}if(Bt.vertexLength+lt>en.MAX_VERTEX_ARRAY_LENGTH&&(Bt=this.segments.prepareSegment(lt,this.layoutVertexArray,this.indexArray)),"Polygon"===ap[M.type]){for(var tr=[],xr=[],pr=Bt.vertexLength,Tr=0,Er=Qe;Tr<Er.length;Tr+=1){var jr=Er[Tr];if(0!==jr.length){jr!==Qe[0]&&xr.push(tr.length/2);for(var Pr=0;Pr<jr.length;Pr++){var Nr=jr[Pr];tu(this.layoutVertexArray,Nr.x,Nr.y,0,0,1,1,0),tr.push(Nr.x),tr.push(Nr.y)}}}for(var Ir=pc(tr,xr),Cr=0;Cr<Ir.length;Cr+=3)this.indexArray.emplaceBack(pr+Ir[Cr],pr+Ir[Cr+2],pr+Ir[Cr+1]);Bt.primitiveLength+=Ir.length/3,Bt.vertexLength+=lt}}var Jr;this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Z,be,ae)},_r("FillExtrusionBucket",_s,{omit:["layers","features"]});var sp={paint:new $i({"fill-extrusion-opacity":new Mr(Se["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Or(Se["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new Mr(Se["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new Mr(Se["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new rs(Se["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Or(Se["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Or(Se["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new Mr(Se["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})},lp=function(M){function O(Z){M.call(this,Z,sp)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.createBucket=function(Z){return new _s(Z)},O.prototype.queryRadius=function(){return wu(this.paint.get("fill-extrusion-translate"))},O.prototype.is3D=function(){return!0},O.prototype.queryIntersectsFeature=function(Z,ae,be,Ee,je,Qe,lt,_t){var Mt=Tu(Z,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),Qe.angle,lt),Bt=this.paint.get("fill-extrusion-height").evaluate(ae,be),qt=this.paint.get("fill-extrusion-base").evaluate(ae,be),Vt=function(xn,In,On,jn){for(var Vn=[],Yn=0,Qn=xn;Yn<Qn.length;Yn+=1){var tr=Qn[Yn],xr=[tr.x,tr.y,0,1];Au(xr,xr,In),Vn.push(new t(xr[0]/xr[3],xr[1]/xr[3]))}return Vn}(Mt,_t),rn=function(xn,In,On,jn){for(var Vn=[],Yn=[],Qn=jn[8]*In,tr=jn[9]*In,xr=jn[10]*In,pr=jn[11]*In,Tr=jn[8]*On,Er=jn[9]*On,jr=jn[10]*On,Pr=jn[11]*On,Nr=0,Ir=xn;Nr<Ir.length;Nr+=1){for(var Cr=[],Jr=[],qr=0,bi=Ir[Nr];qr<bi.length;qr+=1){var Fr=bi[qr],gi=Fr.x,Ti=Fr.y,Ai=jn[0]*gi+jn[4]*Ti+jn[12],Li=jn[1]*gi+jn[5]*Ti+jn[13],_i=jn[2]*gi+jn[6]*Ti+jn[14],ra=jn[3]*gi+jn[7]*Ti+jn[15],Oi=_i+xr,da=ra+pr,Sa=Ai+Tr,ba=Li+Er,Za=_i+jr,_a=ra+Pr,aa=new t((Ai+Qn)/da,(Li+tr)/da);aa.z=Oi/da,Cr.push(aa);var wa=new t(Sa/_a,ba/_a);wa.z=Za/_a,Jr.push(wa)}Vn.push(Cr),Yn.push(Jr)}return[Vn,Yn]}(Ee,qt,Bt,_t);return function(xn,In,On){var jn=1/0;Ds(On,In)&&(jn=cf(On,In[0]));for(var Vn=0;Vn<In.length;Vn++)for(var Yn=In[Vn],Qn=xn[Vn],tr=0;tr<Yn.length-1;tr++){var xr=Yn[tr],Er=[xr,Yn[tr+1],Qn[tr+1],Qn[tr],xr];Bi(On,Er)&&(jn=Math.min(jn,cf(On,Er)))}return jn!==1/0&&jn}(rn[0],rn[1],Vt)},O}(fa);function nu(M,O){return M.x*O.x+M.y*O.y}function cf(M,O){if(1===M.length){for(var Z,ae=0,be=O[ae++];!Z||be.equals(Z);)if(!(Z=O[ae++]))return 1/0;for(;ae<O.length;ae++){var Ee=O[ae],je=M[0],Qe=Z.sub(be),lt=Ee.sub(be),_t=je.sub(be),Mt=nu(Qe,Qe),Bt=nu(Qe,lt),qt=nu(lt,lt),Vt=nu(_t,Qe),rn=nu(_t,lt),xn=Mt*qt-Bt*Bt,In=(qt*Vt-Bt*rn)/xn,On=(Mt*rn-Bt*Vt)/xn,Vn=be.z*(1-In-On)+Z.z*In+Ee.z*On;if(isFinite(Vn))return Vn}return 1/0}for(var Yn=1/0,Qn=0,tr=O;Qn<tr.length;Qn+=1)Yn=Math.min(Yn,tr[Qn].z);return Yn}var ff=fi([{name:"a_pos_normal",components:2,type:"Int16"},{name:"a_data",components:4,type:"Uint8"}],4).members,up=Ol.VectorTileFeature.types,cp=Math.cos(Math.PI/180*37.5),hf=Math.pow(2,14)/.5,eo=function(M){this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(O){return O.id}),this.index=M.index,this.hasPattern=!1,this.patternFeatures=[],this.layoutVertexArray=new ft,this.indexArray=new Ne,this.programConfigurations=new Si(ff,M.layers,M.zoom),this.segments=new en,this.stateDependentLayerIds=this.layers.filter(function(O){return O.isStateDependent()}).map(function(O){return O.id})};eo.prototype.populate=function(M,O,Z){this.hasPattern=yc("line",this.layers,O);for(var ae=this.layers[0].layout.get("line-sort-key"),be=[],Ee=0,je=M;Ee<je.length;Ee+=1){var Qe=je[Ee],lt=Qe.feature,_t=Qe.id,Mt=Qe.index,Bt=Qe.sourceLayerIndex,qt=this.layers[0]._featureFilter.needGeometry,Vt={type:lt.type,id:_t,properties:lt.properties,geometry:qt?ki(lt):[]};if(this.layers[0]._featureFilter.filter(new ni(this.zoom),Vt,Z)){qt||(Vt.geometry=ki(lt));var rn=ae?ae.evaluate(Vt,{},Z):void 0;be.push({id:_t,properties:lt.properties,type:lt.type,sourceLayerIndex:Bt,index:Mt,geometry:Vt.geometry,patterns:{},sortKey:rn})}}ae&&be.sort(function(Tr,Er){return Tr.sortKey-Er.sortKey});for(var In=0,On=be;In<On.length;In+=1){var jn=On[In],Yn=jn.geometry,Qn=jn.index,tr=jn.sourceLayerIndex;if(this.hasPattern){var xr=xc("line",this.layers,jn,this.zoom,O);this.patternFeatures.push(xr)}else this.addFeature(jn,Yn,Qn,Z,{});O.featureIndex.insert(M[Qn].feature,Yn,Qn,tr,this.index)}},eo.prototype.update=function(M,O,Z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(M,O,this.stateDependentLayers,Z)},eo.prototype.addFeatures=function(M,O,Z){for(var ae=0,be=this.patternFeatures;ae<be.length;ae+=1){var Ee=be[ae];this.addFeature(Ee,Ee.geometry,Ee.index,O,Z)}},eo.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length},eo.prototype.uploadPending=function(){return!this.uploaded||this.programConfigurations.needsUpload},eo.prototype.upload=function(M){this.uploaded||(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,ff),this.indexBuffer=M.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(M),this.uploaded=!0},eo.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())},eo.prototype.addFeature=function(M,O,Z,ae,be){for(var Ee=this.layers[0].layout,je=Ee.get("line-join").evaluate(M,{}),Qe=Ee.get("line-cap"),lt=Ee.get("line-miter-limit"),_t=Ee.get("line-round-limit"),Mt=0,Bt=O;Mt<Bt.length;Mt+=1)this.addLine(Bt[Mt],M,je,Qe,lt,_t);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,M,Z,be,ae)},eo.prototype.addLine=function(M,O,Z,ae,be,Ee){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,O.properties&&O.properties.hasOwnProperty("mapbox_clip_start")&&O.properties.hasOwnProperty("mapbox_clip_end")){this.clipStart=+O.properties.mapbox_clip_start,this.clipEnd=+O.properties.mapbox_clip_end;for(var je=0;je<M.length-1;je++)this.totalDistance+=M[je].dist(M[je+1]);this.updateScaledDistance()}for(var Qe="Polygon"===up[O.type],lt=M.length;lt>=2&&M[lt-1].equals(M[lt-2]);)lt--;for(var _t=0;_t<lt-1&&M[_t].equals(M[_t+1]);)_t++;if(!(lt<(Qe?3:2))){"bevel"===Z&&(be=1.05);var Mt,Bt=this.overscaling<=16?122880/(512*this.overscaling):0,qt=this.segments.prepareSegment(10*lt,this.layoutVertexArray,this.indexArray),Vt=void 0,rn=void 0,xn=void 0,In=void 0;this.e1=this.e2=-1,Qe&&(In=M[_t].sub(Mt=M[lt-2])._unit()._perp());for(var On=_t;On<lt;On++)if(!(rn=On===lt-1?Qe?M[_t+1]:void 0:M[On+1])||!M[On].equals(rn)){In&&(xn=In),Mt&&(Vt=Mt),Mt=M[On],In=rn?rn.sub(Mt)._unit()._perp():xn;var jn=(xn=xn||In).add(In);0===jn.x&&0===jn.y||jn._unit();var Vn=xn.x*In.x+xn.y*In.y,Yn=jn.x*In.x+jn.y*In.y,Qn=0!==Yn?1/Yn:1/0,tr=2*Math.sqrt(2-2*Yn),xr=Yn<cp&&Vt&&rn,pr=xn.x*In.y-xn.y*In.x>0;if(xr&&On>_t){var Tr=Mt.dist(Vt);if(Tr>2*Bt){var Er=Mt.sub(Mt.sub(Vt)._mult(Bt/Tr)._round());this.updateDistance(Vt,Er),this.addCurrentVertex(Er,xn,0,0,qt),Vt=Er}}var jr=Vt&&rn,Pr=jr?Z:Qe?"butt":ae;if(jr&&"round"===Pr&&(Qn<Ee?Pr="miter":Qn<=2&&(Pr="fakeround")),"miter"===Pr&&Qn>be&&(Pr="bevel"),"bevel"===Pr&&(Qn>2&&(Pr="flipbevel"),Qn<be&&(Pr="miter")),Vt&&this.updateDistance(Vt,Mt),"miter"===Pr)jn._mult(Qn),this.addCurrentVertex(Mt,jn,0,0,qt);else if("flipbevel"===Pr){if(Qn>100)jn=In.mult(-1);else{var Nr=Qn*xn.add(In).mag()/xn.sub(In).mag();jn._perp()._mult(Nr*(pr?-1:1))}this.addCurrentVertex(Mt,jn,0,0,qt),this.addCurrentVertex(Mt,jn.mult(-1),0,0,qt)}else if("bevel"===Pr||"fakeround"===Pr){var Ir=-Math.sqrt(Qn*Qn-1),Cr=pr?Ir:0,Jr=pr?0:Ir;if(Vt&&this.addCurrentVertex(Mt,xn,Cr,Jr,qt),"fakeround"===Pr)for(var qr=Math.round(180*tr/Math.PI/20),bi=1;bi<qr;bi++){var Fr=bi/qr;if(.5!==Fr){var gi=Fr-.5;Fr+=Fr*gi*(Fr-1)*((1.0904+Vn*(Vn*(3.55645-1.43519*Vn)-3.2452))*gi*gi+(.848013+Vn*(.215638*Vn-1.06021)))}var Ti=In.sub(xn)._mult(Fr)._add(xn)._unit()._mult(pr?-1:1);this.addHalfVertex(Mt,Ti.x,Ti.y,!1,pr,0,qt)}rn&&this.addCurrentVertex(Mt,In,-Cr,-Jr,qt)}else if("butt"===Pr)this.addCurrentVertex(Mt,jn,0,0,qt);else if("square"===Pr){var Ai=Vt?1:-1;this.addCurrentVertex(Mt,jn,Ai,Ai,qt)}else"round"===Pr&&(Vt&&(this.addCurrentVertex(Mt,xn,0,0,qt),this.addCurrentVertex(Mt,xn,1,1,qt,!0)),rn&&(this.addCurrentVertex(Mt,In,-1,-1,qt,!0),this.addCurrentVertex(Mt,In,0,0,qt)));if(xr&&On<lt-1){var Li=Mt.dist(rn);if(Li>2*Bt){var _i=Mt.add(rn.sub(Mt)._mult(Bt/Li)._round());this.updateDistance(Mt,_i),this.addCurrentVertex(_i,In,0,0,qt),Mt=_i}}}}},eo.prototype.addCurrentVertex=function(M,O,Z,ae,be,Ee){void 0===Ee&&(Ee=!1);var lt=O.y*ae-O.x,_t=-O.y-O.x*ae;this.addHalfVertex(M,O.x+O.y*Z,O.y-O.x*Z,Ee,!1,Z,be),this.addHalfVertex(M,lt,_t,Ee,!0,-ae,be),this.distance>hf/2&&0===this.totalDistance&&(this.distance=0,this.addCurrentVertex(M,O,Z,ae,be,Ee))},eo.prototype.addHalfVertex=function(M,O,Z,ae,be,Ee,je){var _t=.5*this.scaledDistance;this.layoutVertexArray.emplaceBack((M.x<<1)+(ae?1:0),(M.y<<1)+(be?1:0),Math.round(63*O)+128,Math.round(63*Z)+128,1+(0===Ee?0:Ee<0?-1:1)|(63&_t)<<2,_t>>6);var Mt=je.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Mt),je.primitiveLength++),be?this.e2=Mt:this.e1=Mt},eo.prototype.updateScaledDistance=function(){this.scaledDistance=this.totalDistance>0?(this.clipStart+(this.clipEnd-this.clipStart)*this.distance/this.totalDistance)*(hf-1):this.distance},eo.prototype.updateDistance=function(M,O){this.distance+=M.dist(O),this.updateScaledDistance()},_r("LineBucket",eo,{omit:["layers","patternFeatures"]});var fp=new $i({"line-cap":new Mr(Se.layout_line["line-cap"]),"line-join":new Or(Se.layout_line["line-join"]),"line-miter-limit":new Mr(Se.layout_line["line-miter-limit"]),"line-round-limit":new Mr(Se.layout_line["line-round-limit"]),"line-sort-key":new Or(Se.layout_line["line-sort-key"])}),pf={paint:new $i({"line-opacity":new Or(Se.paint_line["line-opacity"]),"line-color":new Or(Se.paint_line["line-color"]),"line-translate":new Mr(Se.paint_line["line-translate"]),"line-translate-anchor":new Mr(Se.paint_line["line-translate-anchor"]),"line-width":new Or(Se.paint_line["line-width"]),"line-gap-width":new Or(Se.paint_line["line-gap-width"]),"line-offset":new Or(Se.paint_line["line-offset"]),"line-blur":new Or(Se.paint_line["line-blur"]),"line-dasharray":new fo(Se.paint_line["line-dasharray"]),"line-pattern":new rs(Se.paint_line["line-pattern"]),"line-gradient":new qa(Se.paint_line["line-gradient"])}),layout:fp},hp=function(M){function O(){M.apply(this,arguments)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.possiblyEvaluate=function(Z,ae){return ae=new ni(Math.floor(ae.zoom),{now:ae.now,fadeDuration:ae.fadeDuration,zoomHistory:ae.zoomHistory,transition:ae.transition}),M.prototype.possiblyEvaluate.call(this,Z,ae)},O.prototype.evaluate=function(Z,ae,be,Ee){return ae=c({},ae,{zoom:Math.floor(ae.zoom)}),M.prototype.evaluate.call(this,Z,ae,be,Ee)},O}(Or),df=new hp(pf.paint.properties["line-width"].specification);df.useIntegerZoom=!0;var pp=function(M){function O(Z){M.call(this,Z,pf)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype._handleSpecialPaintPropertyUpdate=function(Z){"line-gradient"===Z&&this._updateGradient()},O.prototype._updateGradient=function(){this.gradient=$c(this._transitionablePaint._values["line-gradient"].value.expression,"lineProgress"),this.gradientTexture=null},O.prototype.recalculate=function(Z,ae){M.prototype.recalculate.call(this,Z,ae),this.paint._values["line-floorwidth"]=df.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,Z)},O.prototype.createBucket=function(Z){return new eo(Z)},O.prototype.queryRadius=function(Z){var ae=Z,be=gf($s("line-width",this,ae),$s("line-gap-width",this,ae)),Ee=$s("line-offset",this,ae);return be/2+Math.abs(Ee)+wu(this.paint.get("line-translate"))},O.prototype.queryIntersectsFeature=function(Z,ae,be,Ee,je,Qe,lt){var _t=Tu(Z,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),Qe.angle,lt),Mt=lt/2*gf(this.paint.get("line-width").evaluate(ae,be),this.paint.get("line-gap-width").evaluate(ae,be)),Bt=this.paint.get("line-offset").evaluate(ae,be);return Bt&&(Ee=function(qt,Vt){for(var rn=[],xn=new t(0,0),In=0;In<qt.length;In++){for(var On=qt[In],jn=[],Vn=0;Vn<On.length;Vn++){var Qn=On[Vn],tr=On[Vn+1],xr=0===Vn?xn:Qn.sub(On[Vn-1])._unit()._perp(),pr=Vn===On.length-1?xn:tr.sub(Qn)._unit()._perp(),Tr=xr._add(pr)._unit();Tr._mult(1/(Tr.x*pr.x+Tr.y*pr.y)),jn.push(Tr._mult(Vt)._add(Qn))}rn.push(jn)}return rn}(Ee,Bt*lt)),function(qt,Vt,rn){for(var xn=0;xn<Vt.length;xn++){var In=Vt[xn];if(qt.length>=3)for(var On=0;On<In.length;On++)if(cl(qt,In[On]))return!0;if(sc(qt,In,rn))return!0}return!1}(_t,Ee,Mt)},O.prototype.isTileClipped=function(){return!0},O}(fa);function gf(M,O){return O>0?O+2*M:M}var _c=fi([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),dp=fi([{name:"a_projected_pos",components:3,type:"Float32"}],4),gp=(fi([{name:"a_fade_opacity",components:1,type:"Uint32"}],4),fi([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"}])),vf=(fi([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]),fi([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4)),vp=fi([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function mp(M,O,Z){return M.sections.forEach(function(ae){var be,je,Qe;ae.text=(be=ae.text,je=Z,"uppercase"===(Qe=O.layout.get("text-transform").evaluate(je,{}))?be=be.toLocaleUpperCase():"lowercase"===Qe&&(be=be.toLocaleLowerCase()),ua.applyArabicShaping&&(be=ua.applyArabicShaping(be)),be)}),M}fi([{name:"triangle",components:3,type:"Uint16"}]),fi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),fi([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",components:2,name:"textOffset"},{type:"Float32",name:"collisionCircleDiameter"}]),fi([{type:"Float32",name:"offsetX"}]),fi([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]);var ru={"!":"\ufe15","#":"\uff03",$:"\uff04","%":"\uff05","&":"\uff06","(":"\ufe35",")":"\ufe36","*":"\uff0a","+":"\uff0b",",":"\ufe10","-":"\ufe32",".":"\u30fb","/":"\uff0f",":":"\ufe13",";":"\ufe14","<":"\ufe3f","=":"\uff1d",">":"\ufe40","?":"\ufe16","@":"\uff20","[":"\ufe47","\\":"\uff3c","]":"\ufe48","^":"\uff3e",_:"\ufe33","`":"\uff40","{":"\ufe37","|":"\u2015","}":"\ufe38","~":"\uff5e","\xa2":"\uffe0","\xa3":"\uffe1","\xa5":"\uffe5","\xa6":"\uffe4","\xac":"\uffe2","\xaf":"\uffe3","\u2013":"\ufe32","\u2014":"\ufe31","\u2018":"\ufe43","\u2019":"\ufe44","\u201c":"\ufe41","\u201d":"\ufe42","\u2026":"\ufe19","\u2027":"\u30fb","\u20a9":"\uffe6","\u3001":"\ufe11","\u3002":"\ufe12","\u3008":"\ufe3f","\u3009":"\ufe40","\u300a":"\ufe3d","\u300b":"\ufe3e","\u300c":"\ufe41","\u300d":"\ufe42","\u300e":"\ufe43","\u300f":"\ufe44","\u3010":"\ufe3b","\u3011":"\ufe3c","\u3014":"\ufe39","\u3015":"\ufe3a","\u3016":"\ufe17","\u3017":"\ufe18","\uff01":"\ufe15","\uff08":"\ufe35","\uff09":"\ufe36","\uff0c":"\ufe10","\uff0d":"\ufe32","\uff0e":"\u30fb","\uff1a":"\ufe13","\uff1b":"\ufe14","\uff1c":"\ufe3f","\uff1e":"\ufe40","\uff1f":"\ufe16","\uff3b":"\ufe47","\uff3d":"\ufe48","\uff3f":"\ufe33","\uff5b":"\ufe37","\uff5c":"\u2015","\uff5d":"\ufe38","\uff5f":"\ufe35","\uff60":"\ufe36","\uff61":"\ufe12","\uff62":"\ufe41","\uff63":"\ufe42"},Ma=24,mf=function(M,O,Z,ae,be){var Ee,je,Qe=8*be-ae-1,lt=(1<<Qe)-1,_t=lt>>1,Mt=-7,Bt=Z?be-1:0,qt=Z?-1:1,Vt=M[O+Bt];for(Bt+=qt,Ee=Vt&(1<<-Mt)-1,Vt>>=-Mt,Mt+=Qe;Mt>0;Ee=256*Ee+M[O+Bt],Bt+=qt,Mt-=8);for(je=Ee&(1<<-Mt)-1,Ee>>=-Mt,Mt+=ae;Mt>0;je=256*je+M[O+Bt],Bt+=qt,Mt-=8);if(0===Ee)Ee=1-_t;else{if(Ee===lt)return je?NaN:1/0*(Vt?-1:1);je+=Math.pow(2,ae),Ee-=_t}return(Vt?-1:1)*je*Math.pow(2,Ee-ae)},yf=function(M,O,Z,ae,be,Ee){var je,Qe,lt,_t=8*Ee-be-1,Mt=(1<<_t)-1,Bt=Mt>>1,qt=23===be?Math.pow(2,-24)-Math.pow(2,-77):0,Vt=ae?0:Ee-1,rn=ae?1:-1,xn=O<0||0===O&&1/O<0?1:0;for(O=Math.abs(O),isNaN(O)||O===1/0?(Qe=isNaN(O)?1:0,je=Mt):(je=Math.floor(Math.log(O)/Math.LN2),O*(lt=Math.pow(2,-je))<1&&(je--,lt*=2),(O+=je+Bt>=1?qt/lt:qt*Math.pow(2,1-Bt))*lt>=2&&(je++,lt/=2),je+Bt>=Mt?(Qe=0,je=Mt):je+Bt>=1?(Qe=(O*lt-1)*Math.pow(2,be),je+=Bt):(Qe=O*Math.pow(2,Bt-1)*Math.pow(2,be),je=0));be>=8;M[Z+Vt]=255&Qe,Vt+=rn,Qe/=256,be-=8);for(je=je<<be|Qe,_t+=be;_t>0;M[Z+Vt]=255&je,Vt+=rn,je/=256,_t-=8);M[Z+Vt-rn]|=128*xn},Cu=wi;function wi(M){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(M)?M:new Uint8Array(M||0),this.pos=0,this.type=0,this.length=this.buf.length}wi.Varint=0,wi.Fixed64=1,wi.Bytes=2,wi.Fixed32=5;var wc=4294967296,xf=1/wc,bf=typeof TextDecoder>"u"?null:new TextDecoder("utf8");function Qs(M){return M.type===wi.Bytes?M.readVarint()+M.pos:M.pos+1}function _f(M,O,Z){var ae=O<=16383?1:O<=2097151?2:O<=268435455?3:Math.floor(Math.log(O)/(7*Math.LN2));Z.realloc(ae);for(var be=Z.pos-1;be>=M;be--)Z.buf[be+ae]=Z.buf[be]}function yp(M,O){for(var Z=0;Z<M.length;Z++)O.writeVarint(M[Z])}function xp(M,O){for(var Z=0;Z<M.length;Z++)O.writeSVarint(M[Z])}function bp(M,O){for(var Z=0;Z<M.length;Z++)O.writeFloat(M[Z])}function _p(M,O){for(var Z=0;Z<M.length;Z++)O.writeDouble(M[Z])}function wp(M,O){for(var Z=0;Z<M.length;Z++)O.writeBoolean(M[Z])}function Tp(M,O){for(var Z=0;Z<M.length;Z++)O.writeFixed32(M[Z])}function kp(M,O){for(var Z=0;Z<M.length;Z++)O.writeSFixed32(M[Z])}function Ap(M,O){for(var Z=0;Z<M.length;Z++)O.writeFixed64(M[Z])}function Mp(M,O){for(var Z=0;Z<M.length;Z++)O.writeSFixed64(M[Z])}function Pu(M,O){return(M[O]|M[O+1]<<8|M[O+2]<<16)+16777216*M[O+3]}function Rl(M,O,Z){M[Z]=O,M[Z+1]=O>>>8,M[Z+2]=O>>>16,M[Z+3]=O>>>24}function wf(M,O){return(M[O]|M[O+1]<<8|M[O+2]<<16)+(M[O+3]<<24)}function Sp(M,O,Z){1===M&&Z.readMessage(Ep,O)}function Ep(M,O,Z){if(3===M){var ae=Z.readMessage(Lp,{}),je=ae.width,Qe=ae.height,lt=ae.left,_t=ae.top,Mt=ae.advance;O.push({id:ae.id,bitmap:new bl({width:je+6,height:Qe+6},ae.bitmap),metrics:{width:je,height:Qe,left:lt,top:_t,advance:Mt}})}}function Lp(M,O,Z){1===M?O.id=Z.readVarint():2===M?O.bitmap=Z.readBytes():3===M?O.width=Z.readVarint():4===M?O.height=Z.readVarint():5===M?O.left=Z.readSVarint():6===M?O.top=Z.readSVarint():7===M&&(O.advance=Z.readVarint())}function Tf(M){for(var O=0,Z=0,ae=0,be=M;ae<be.length;ae+=1){var Ee=be[ae];O+=Ee.w*Ee.h,Z=Math.max(Z,Ee.w)}M.sort(function(xn,In){return In.h-xn.h});for(var je=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(O/.95)),Z),h:1/0}],Qe=0,lt=0,_t=0,Mt=M;_t<Mt.length;_t+=1)for(var Bt=Mt[_t],qt=je.length-1;qt>=0;qt--){var Vt=je[qt];if(!(Bt.w>Vt.w||Bt.h>Vt.h)){if(Bt.x=Vt.x,Bt.y=Vt.y,lt=Math.max(lt,Bt.y+Bt.h),Qe=Math.max(Qe,Bt.x+Bt.w),Bt.w===Vt.w&&Bt.h===Vt.h){var rn=je.pop();qt<je.length&&(je[qt]=rn)}else Bt.h===Vt.h?(Vt.x+=Bt.w,Vt.w-=Bt.w):Bt.w===Vt.w?(Vt.y+=Bt.h,Vt.h-=Bt.h):(je.push({x:Vt.x+Bt.w,y:Vt.y,w:Vt.w-Bt.w,h:Bt.h}),Vt.y+=Bt.h,Vt.h-=Bt.h);break}}return{w:Qe,h:lt,fill:O/(Qe*lt)||0}}wi.prototype={destroy:function(){this.buf=null},readFields:function(M,O,Z){for(Z=Z||this.length;this.pos<Z;){var ae=this.readVarint(),be=ae>>3,Ee=this.pos;this.type=7&ae,M(be,O,this),this.pos===Ee&&this.skip(ae)}return O},readMessage:function(M,O){return this.readFields(M,O,this.readVarint()+this.pos)},readFixed32:function(){var M=Pu(this.buf,this.pos);return this.pos+=4,M},readSFixed32:function(){var M=wf(this.buf,this.pos);return this.pos+=4,M},readFixed64:function(){var M=Pu(this.buf,this.pos)+Pu(this.buf,this.pos+4)*wc;return this.pos+=8,M},readSFixed64:function(){var M=Pu(this.buf,this.pos)+wf(this.buf,this.pos+4)*wc;return this.pos+=8,M},readFloat:function(){var M=mf(this.buf,this.pos,!0,23,4);return this.pos+=4,M},readDouble:function(){var M=mf(this.buf,this.pos,!0,52,8);return this.pos+=8,M},readVarint:function(M){var O,Z,ae=this.buf;return O=127&(Z=ae[this.pos++]),Z<128?O:(O|=(127&(Z=ae[this.pos++]))<<7,Z<128?O:(O|=(127&(Z=ae[this.pos++]))<<14,Z<128?O:(O|=(127&(Z=ae[this.pos++]))<<21,Z<128?O:function(be,Ee,je){var Qe,lt,_t=je.buf;if(Qe=(112&(lt=_t[je.pos++]))>>4,lt<128||(Qe|=(127&(lt=_t[je.pos++]))<<3,lt<128)||(Qe|=(127&(lt=_t[je.pos++]))<<10,lt<128)||(Qe|=(127&(lt=_t[je.pos++]))<<17,lt<128)||(Qe|=(127&(lt=_t[je.pos++]))<<24,lt<128)||(Qe|=(1&(lt=_t[je.pos++]))<<31,lt<128))return function Il(M,O,Z){return Z?4294967296*O+(M>>>0):4294967296*(O>>>0)+(M>>>0)}(be,Qe,Ee);throw new Error("Expected varint not more than 10 bytes")}(O|=(15&(Z=ae[this.pos]))<<28,M,this))))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var M=this.readVarint();return M%2==1?(M+1)/-2:M/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var M=this.readVarint()+this.pos,O=this.pos;return this.pos=M,M-O>=12&&bf?bf.decode(this.buf.subarray(O,M)):function(Z,ae,be){for(var Ee="",je=ae;je<be;){var Qe,lt,_t,Mt=Z[je],Bt=null,qt=Mt>239?4:Mt>223?3:Mt>191?2:1;if(je+qt>be)break;1===qt?Mt<128&&(Bt=Mt):2===qt?128==(192&(Qe=Z[je+1]))&&(Bt=(31&Mt)<<6|63&Qe)<=127&&(Bt=null):3===qt?(lt=Z[je+2],128==(192&(Qe=Z[je+1]))&&128==(192&lt)&&((Bt=(15&Mt)<<12|(63&Qe)<<6|63&lt)<=2047||Bt>=55296&&Bt<=57343)&&(Bt=null)):4===qt&&(lt=Z[je+2],_t=Z[je+3],128==(192&(Qe=Z[je+1]))&&128==(192&lt)&&128==(192&_t)&&((Bt=(15&Mt)<<18|(63&Qe)<<12|(63&lt)<<6|63&_t)<=65535||Bt>=1114112)&&(Bt=null)),null===Bt?(Bt=65533,qt=1):Bt>65535&&(Bt-=65536,Ee+=String.fromCharCode(Bt>>>10&1023|55296),Bt=56320|1023&Bt),Ee+=String.fromCharCode(Bt),je+=qt}return Ee}(this.buf,O,M)},readBytes:function(){var M=this.readVarint()+this.pos,O=this.buf.subarray(this.pos,M);return this.pos=M,O},readPackedVarint:function(M,O){if(this.type!==wi.Bytes)return M.push(this.readVarint(O));var Z=Qs(this);for(M=M||[];this.pos<Z;)M.push(this.readVarint(O));return M},readPackedSVarint:function(M){if(this.type!==wi.Bytes)return M.push(this.readSVarint());var O=Qs(this);for(M=M||[];this.pos<O;)M.push(this.readSVarint());return M},readPackedBoolean:function(M){if(this.type!==wi.Bytes)return M.push(this.readBoolean());var O=Qs(this);for(M=M||[];this.pos<O;)M.push(this.readBoolean());return M},readPackedFloat:function(M){if(this.type!==wi.Bytes)return M.push(this.readFloat());var O=Qs(this);for(M=M||[];this.pos<O;)M.push(this.readFloat());return M},readPackedDouble:function(M){if(this.type!==wi.Bytes)return M.push(this.readDouble());var O=Qs(this);for(M=M||[];this.pos<O;)M.push(this.readDouble());return M},readPackedFixed32:function(M){if(this.type!==wi.Bytes)return M.push(this.readFixed32());var O=Qs(this);for(M=M||[];this.pos<O;)M.push(this.readFixed32());return M},readPackedSFixed32:function(M){if(this.type!==wi.Bytes)return M.push(this.readSFixed32());var O=Qs(this);for(M=M||[];this.pos<O;)M.push(this.readSFixed32());return M},readPackedFixed64:function(M){if(this.type!==wi.Bytes)return M.push(this.readFixed64());var O=Qs(this);for(M=M||[];this.pos<O;)M.push(this.readFixed64());return M},readPackedSFixed64:function(M){if(this.type!==wi.Bytes)return M.push(this.readSFixed64());var O=Qs(this);for(M=M||[];this.pos<O;)M.push(this.readSFixed64());return M},skip:function(M){var O=7&M;if(O===wi.Varint)for(;this.buf[this.pos++]>127;);else if(O===wi.Bytes)this.pos=this.readVarint()+this.pos;else if(O===wi.Fixed32)this.pos+=4;else{if(O!==wi.Fixed64)throw new Error("Unimplemented type: "+O);this.pos+=8}},writeTag:function(M,O){this.writeVarint(M<<3|O)},realloc:function(M){for(var O=this.length||16;O<this.pos+M;)O*=2;if(O!==this.length){var Z=new Uint8Array(O);Z.set(this.buf),this.buf=Z,this.length=O}},finish:function(){return this.length=this.pos,this.pos=0,this.buf.subarray(0,this.length)},writeFixed32:function(M){this.realloc(4),Rl(this.buf,M,this.pos),this.pos+=4},writeSFixed32:function(M){this.realloc(4),Rl(this.buf,M,this.pos),this.pos+=4},writeFixed64:function(M){this.realloc(8),Rl(this.buf,-1&M,this.pos),Rl(this.buf,Math.floor(M*xf),this.pos+4),this.pos+=8},writeSFixed64:function(M){this.realloc(8),Rl(this.buf,-1&M,this.pos),Rl(this.buf,Math.floor(M*xf),this.pos+4),this.pos+=8},writeVarint:function(M){(M=+M||0)>268435455||M<0?function(O,Z){var ae,be,Ee,Qe;if(O>=0?(ae=O%4294967296|0,be=O/4294967296|0):(be=~(-O/4294967296),4294967295^(ae=~(-O%4294967296))?ae=ae+1|0:(ae=0,be=be+1|0)),O>=0x10000000000000000||O<-0x10000000000000000)throw new Error("Given varint doesn't fit into 10 bytes");Z.realloc(10),Ee=ae,(Qe=Z).buf[Qe.pos++]=127&Ee|128,Ee>>>=7,Qe.buf[Qe.pos++]=127&Ee|128,Ee>>>=7,Qe.buf[Qe.pos++]=127&Ee|128,Ee>>>=7,Qe.buf[Qe.pos++]=127&Ee|128,Qe.buf[Qe.pos]=127&(Ee>>>=7),function(Ee,je){var Qe=(7&Ee)<<4;je.buf[je.pos++]|=Qe|((Ee>>>=3)?128:0),Ee&&(je.buf[je.pos++]=127&Ee|((Ee>>>=7)?128:0),Ee&&(je.buf[je.pos++]=127&Ee|((Ee>>>=7)?128:0),Ee&&(je.buf[je.pos++]=127&Ee|((Ee>>>=7)?128:0),Ee&&(je.buf[je.pos++]=127&Ee|((Ee>>>=7)?128:0),Ee&&(je.buf[je.pos++]=127&Ee)))))}(be,Z)}(M,this):(this.realloc(4),this.buf[this.pos++]=127&M|(M>127?128:0),M<=127||(this.buf[this.pos++]=127&(M>>>=7)|(M>127?128:0),M<=127||(this.buf[this.pos++]=127&(M>>>=7)|(M>127?128:0),M<=127||(this.buf[this.pos++]=M>>>7&127))))},writeSVarint:function(M){this.writeVarint(M<0?2*-M-1:2*M)},writeBoolean:function(M){this.writeVarint(!!M)},writeString:function(M){M=String(M),this.realloc(4*M.length),this.pos++;var O=this.pos;this.pos=function(ae,be,Ee){for(var je,Qe,lt=0;lt<be.length;lt++){if((je=be.charCodeAt(lt))>55295&&je<57344){if(!Qe){je>56319||lt+1===be.length?(ae[Ee++]=239,ae[Ee++]=191,ae[Ee++]=189):Qe=je;continue}if(je<56320){ae[Ee++]=239,ae[Ee++]=191,ae[Ee++]=189,Qe=je;continue}je=Qe-55296<<10|je-56320|65536,Qe=null}else Qe&&(ae[Ee++]=239,ae[Ee++]=191,ae[Ee++]=189,Qe=null);je<128?ae[Ee++]=je:(je<2048?ae[Ee++]=je>>6|192:(je<65536?ae[Ee++]=je>>12|224:(ae[Ee++]=je>>18|240,ae[Ee++]=je>>12&63|128),ae[Ee++]=je>>6&63|128),ae[Ee++]=63&je|128)}return Ee}(this.buf,M,this.pos);var Z=this.pos-O;Z>=128&&_f(O,Z,this),this.pos=O-1,this.writeVarint(Z),this.pos+=Z},writeFloat:function(M){this.realloc(4),yf(this.buf,M,this.pos,!0,23,4),this.pos+=4},writeDouble:function(M){this.realloc(8),yf(this.buf,M,this.pos,!0,52,8),this.pos+=8},writeBytes:function(M){var O=M.length;this.writeVarint(O),this.realloc(O);for(var Z=0;Z<O;Z++)this.buf[this.pos++]=M[Z]},writeRawMessage:function(M,O){this.pos++;var Z=this.pos;M(O,this);var ae=this.pos-Z;ae>=128&&_f(Z,ae,this),this.pos=Z-1,this.writeVarint(ae),this.pos+=ae},writeMessage:function(M,O,Z){this.writeTag(M,wi.Bytes),this.writeRawMessage(O,Z)},writePackedVarint:function(M,O){O.length&&this.writeMessage(M,yp,O)},writePackedSVarint:function(M,O){O.length&&this.writeMessage(M,xp,O)},writePackedBoolean:function(M,O){O.length&&this.writeMessage(M,wp,O)},writePackedFloat:function(M,O){O.length&&this.writeMessage(M,bp,O)},writePackedDouble:function(M,O){O.length&&this.writeMessage(M,_p,O)},writePackedFixed32:function(M,O){O.length&&this.writeMessage(M,Tp,O)},writePackedSFixed32:function(M,O){O.length&&this.writeMessage(M,kp,O)},writePackedFixed64:function(M,O){O.length&&this.writeMessage(M,Ap,O)},writePackedSFixed64:function(M,O){O.length&&this.writeMessage(M,Mp,O)},writeBytesField:function(M,O){this.writeTag(M,wi.Bytes),this.writeBytes(O)},writeFixed32Field:function(M,O){this.writeTag(M,wi.Fixed32),this.writeFixed32(O)},writeSFixed32Field:function(M,O){this.writeTag(M,wi.Fixed32),this.writeSFixed32(O)},writeFixed64Field:function(M,O){this.writeTag(M,wi.Fixed64),this.writeFixed64(O)},writeSFixed64Field:function(M,O){this.writeTag(M,wi.Fixed64),this.writeSFixed64(O)},writeVarintField:function(M,O){this.writeTag(M,wi.Varint),this.writeVarint(O)},writeSVarintField:function(M,O){this.writeTag(M,wi.Varint),this.writeSVarint(O)},writeStringField:function(M,O){this.writeTag(M,wi.Bytes),this.writeString(O)},writeFloatField:function(M,O){this.writeTag(M,wi.Fixed32),this.writeFloat(O)},writeDoubleField:function(M,O){this.writeTag(M,wi.Fixed64),this.writeDouble(O)},writeBooleanField:function(M,O){this.writeVarintField(M,!!O)}};var Ou=function(M,O){var Z=O.pixelRatio,ae=O.version,be=O.stretchX,Ee=O.stretchY,je=O.content;this.paddedRect=M,this.pixelRatio=Z,this.stretchX=be,this.stretchY=Ee,this.content=je,this.version=ae},iu={tl:{configurable:!0},br:{configurable:!0},tlbr:{configurable:!0},displaySize:{configurable:!0}};iu.tl.get=function(){return[this.paddedRect.x+1,this.paddedRect.y+1]},iu.br.get=function(){return[this.paddedRect.x+this.paddedRect.w-1,this.paddedRect.y+this.paddedRect.h-1]},iu.tlbr.get=function(){return this.tl.concat(this.br)},iu.displaySize.get=function(){return[(this.paddedRect.w-2)/this.pixelRatio,(this.paddedRect.h-2)/this.pixelRatio]},Object.defineProperties(Ou.prototype,iu);var au=function(M,O){var Z={},ae={};this.haveRenderCallbacks=[];var be=[];this.addImages(M,Z,be),this.addImages(O,ae,be);var Ee=Tf(be),lt=new Qa({width:Ee.w||1,height:Ee.h||1});for(var _t in M){var Mt=M[_t],Bt=Z[_t].paddedRect;Qa.copy(Mt.data,lt,{x:0,y:0},{x:Bt.x+1,y:Bt.y+1},Mt.data)}for(var qt in O){var Vt=O[qt],rn=ae[qt].paddedRect,xn=rn.x+1,In=rn.y+1,On=Vt.data.width,jn=Vt.data.height;Qa.copy(Vt.data,lt,{x:0,y:0},{x:xn,y:In},Vt.data),Qa.copy(Vt.data,lt,{x:0,y:jn-1},{x:xn,y:In-1},{width:On,height:1}),Qa.copy(Vt.data,lt,{x:0,y:0},{x:xn,y:In+jn},{width:On,height:1}),Qa.copy(Vt.data,lt,{x:On-1,y:0},{x:xn-1,y:In},{width:1,height:jn}),Qa.copy(Vt.data,lt,{x:0,y:0},{x:xn+On,y:In},{width:1,height:jn})}this.image=lt,this.iconPositions=Z,this.patternPositions=ae};au.prototype.addImages=function(M,O,Z){for(var ae in M){var be=M[ae],Ee={x:0,y:0,w:be.data.width+2,h:be.data.height+2};Z.push(Ee),O[ae]=new Ou(Ee,be),be.hasRenderCallback&&this.haveRenderCallbacks.push(ae)}},au.prototype.patchUpdatedImages=function(M,O){for(var Z in M.dispatchRenderCallbacks(this.haveRenderCallbacks),M.updatedImages)this.patchUpdatedImage(this.iconPositions[Z],M.getImage(Z),O),this.patchUpdatedImage(this.patternPositions[Z],M.getImage(Z),O)},au.prototype.patchUpdatedImage=function(M,O,Z){if(M&&O&&M.version!==O.version){M.version=O.version;var ae=M.tl;Z.update(O.data,void 0,{x:ae[0],y:ae[1]})}},_r("ImagePosition",Ou),_r("ImageAtlas",au);var Eo={horizontal:1,vertical:2,horizontalOnly:3},zl=function(){this.scale=1,this.fontStack="",this.imageName=null};zl.forText=function(M,O){var Z=new zl;return Z.scale=M||1,Z.fontStack=O,Z},zl.forImage=function(M){var O=new zl;return O.imageName=M,O};var Na=function(){this.text="",this.sectionIndex=[],this.sections=[],this.imageSectionID=null};function Ru(M,O,Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt,rn,xn){var In,On=Na.fromFeature(M,be);Bt===Eo.vertical&&On.verticalizePunctuation();var jn=ua.processBidirectionalText,Vn=ua.processStyledBidirectionalText;if(jn&&1===On.sections.length){In=[];for(var Yn=0,Qn=jn(On.toString(),Tc(On,_t,Ee,O,ae,Vt,rn));Yn<Qn.length;Yn+=1){var tr=Qn[Yn],xr=new Na;xr.text=tr,xr.sections=On.sections;for(var pr=0;pr<tr.length;pr++)xr.sectionIndex.push(0);In.push(xr)}}else if(Vn){In=[];for(var Tr=0,Er=Vn(On.text,On.sectionIndex,Tc(On,_t,Ee,O,ae,Vt,rn));Tr<Er.length;Tr+=1){var jr=Er[Tr],Pr=new Na;Pr.text=jr[0],Pr.sectionIndex=jr[1],Pr.sections=On.sections,In.push(Pr)}}else In=function(Cr,Jr){for(var qr=[],bi=Cr.text,Fr=0,gi=0,Ti=Jr;gi<Ti.length;gi+=1){var Ai=Ti[gi];qr.push(Cr.substring(Fr,Ai)),Fr=Ai}return Fr<bi.length&&qr.push(Cr.substring(Fr,bi.length)),qr}(On,Tc(On,_t,Ee,O,ae,Vt,rn));var Nr=[],Ir={positionedLines:Nr,text:On.toString(),top:Mt[1],bottom:Mt[1],left:Mt[0],right:Mt[0],writingMode:Bt,iconsInText:!1,verticalizable:!1};return function(Cr,Jr,qr,bi,Fr,gi,Ti,Ai,Li,_i,ra,Oi){for(var da=0,Sa=-17,ba=0,Za=0,_a="right"===Ai?1:"left"===Ai?0:.5,aa=0,wa=0,ga=Fr;wa<ga.length;wa+=1){var oa=ga[wa];oa.trim();var Gr=oa.getMaxScale(),ti=(Gr-1)*Ma,Ni={positionedGlyphs:[],lineOffset:0};Cr.positionedLines[aa]=Ni;var xi=Ni.positionedGlyphs,Ri=0;if(oa.length()){for(var Ci=0;Ci<oa.length();Ci++){var ii=oa.getSection(Ci),ji=oa.getSectionIndex(Ci),Wa=oa.getCharCode(Ci),go=0,ja=null,ws=null,nl=null,va=Ma,Ts=!(Li===Eo.horizontal||!ra&&!Ra(Wa)||ra&&(zu[Wa]||ys(Wa)));if(ii.imageName){var as=bi[ii.imageName];if(!as)continue;nl=ii.imageName,Cr.iconsInText=Cr.iconsInText||!0,ws=as.paddedRect;var os=as.displaySize;ii.scale=ii.scale*Ma/Oi,go=ti+(Ma-os[1]*ii.scale),va=(ja={width:os[0],height:os[1],left:1,top:-3,advance:Ts?os[1]:os[0]}).advance;var kl=Ts?os[0]*ii.scale-Ma*Gr:os[1]*ii.scale-Ma*Gr;kl>0&&kl>Ri&&(Ri=kl)}else{var qu=qr[ii.fontStack],Al=qu&&qu[Wa];if(Al&&Al.rect)ws=Al.rect,ja=Al.metrics;else{var Gu=Jr[ii.fontStack],lu=Gu&&Gu[Wa];if(!lu)continue;ja=lu.metrics}go=(Gr-ii.scale)*Ma}Ts?(Cr.verticalizable=!0,xi.push({glyph:Wa,imageName:nl,x:da,y:Sa+go,vertical:Ts,scale:ii.scale,fontStack:ii.fontStack,sectionIndex:ji,metrics:ja,rect:ws}),da+=va*ii.scale+_i):(xi.push({glyph:Wa,imageName:nl,x:da,y:Sa+go,vertical:Ts,scale:ii.scale,fontStack:ii.fontStack,sectionIndex:ji,metrics:ja,rect:ws}),da+=ja.advance*ii.scale+_i)}0!==xi.length&&(ba=Math.max(da-_i,ba),Pp(xi,0,xi.length-1,_a,Ri)),da=0;var Zu=gi*Gr+Ri;Ni.lineOffset=Math.max(Ri,ti),Sa+=Zu,Za=Math.max(Zu,Za),++aa}else Sa+=gi,++aa}var Hl=Sa- -17,Wu=kc(Ti),Yu=Wu.horizontalAlign,uu=Wu.verticalAlign;(function(Rc,cu,Ml,ql,Xu,Ju,Gl,Ku,$u){var hu,fu=(cu-Ml)*Xu;hu=Ju!==Gl?-Ku*ql- -17:(-ql*$u+.5)*Gl;for(var Sl=0,pu=Rc;Sl<pu.length;Sl+=1)for(var El=0,du=pu[Sl].positionedGlyphs;El<du.length;El+=1){var gu=du[El];gu.x+=fu,gu.y+=hu}})(Cr.positionedLines,_a,Yu,uu,ba,Za,gi,Hl,Fr.length),Cr.top+=-uu*Hl,Cr.bottom=Cr.top+Hl,Cr.left+=-Yu*ba,Cr.right=Cr.left+ba}(Ir,O,Z,ae,In,je,Qe,lt,Bt,_t,qt,xn),!function(Cr){for(var Jr=0,qr=Cr;Jr<qr.length;Jr+=1)if(0!==qr[Jr].positionedGlyphs.length)return!1;return!0}(Nr)&&Ir}Na.fromFeature=function(M,O){for(var Z=new Na,ae=0;ae<M.sections.length;ae++){var be=M.sections[ae];be.image?Z.addImageSection(be):Z.addTextSection(be,O)}return Z},Na.prototype.length=function(){return this.text.length},Na.prototype.getSection=function(M){return this.sections[this.sectionIndex[M]]},Na.prototype.getSectionIndex=function(M){return this.sectionIndex[M]},Na.prototype.getCharCode=function(M){return this.text.charCodeAt(M)},Na.prototype.verticalizePunctuation=function(){this.text=function(M){for(var O="",Z=0;Z<M.length;Z++){var ae=M.charCodeAt(Z+1)||null,be=M.charCodeAt(Z-1)||null;ae&&Is(ae)&&!ru[M[Z+1]]||be&&Is(be)&&!ru[M[Z-1]]||!ru[M[Z]]?O+=M[Z]:O+=ru[M[Z]]}return O}(this.text)},Na.prototype.trim=function(){for(var M=0,O=0;O<this.text.length&&zu[this.text.charCodeAt(O)];O++)M++;for(var Z=this.text.length,ae=this.text.length-1;ae>=0&&ae>=M&&zu[this.text.charCodeAt(ae)];ae--)Z--;this.text=this.text.substring(M,Z),this.sectionIndex=this.sectionIndex.slice(M,Z)},Na.prototype.substring=function(M,O){var Z=new Na;return Z.text=this.text.substring(M,O),Z.sectionIndex=this.sectionIndex.slice(M,O),Z.sections=this.sections,Z},Na.prototype.toString=function(){return this.text},Na.prototype.getMaxScale=function(){var M=this;return this.sectionIndex.reduce(function(O,Z){return Math.max(O,M.sections[Z].scale)},0)},Na.prototype.addTextSection=function(M,O){this.text+=M.text,this.sections.push(zl.forText(M.scale,M.fontStack||O));for(var Z=this.sections.length-1,ae=0;ae<M.text.length;++ae)this.sectionIndex.push(Z)},Na.prototype.addImageSection=function(M){var O=M.image?M.image.name:"";if(0!==O.length){var Z=this.getNextImageSectionCharCode();Z?(this.text+=String.fromCharCode(Z),this.sections.push(zl.forImage(O)),this.sectionIndex.push(this.sections.length-1)):S("Reached maximum number of images 6401")}else S("Can't add FormattedSection with an empty image.")},Na.prototype.getNextImageSectionCharCode=function(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)};var zu={9:!0,10:!0,11:!0,12:!0,13:!0,32:!0},po={};function kf(M,O,Z,ae,be,Ee){if(O.imageName){var je=ae[O.imageName];return je?je.displaySize[0]*O.scale*Ma/Ee+be:0}var Qe=Z[O.fontStack],lt=Qe&&Qe[M];return lt?lt.metrics.advance*O.scale+be:0}function Af(M,O,Z,ae){var be=Math.pow(M-O,2);return ae?M<O?be/2:2*be:be+Math.abs(Z)*Z}function Cp(M,O,Z){var ae=0;return 10===M&&(ae-=1e4),Z&&(ae+=150),40!==M&&65288!==M||(ae+=50),41!==O&&65289!==O||(ae+=50),ae}function Mf(M,O,Z,ae,be,Ee){for(var je=null,Qe=Af(O,Z,be,Ee),lt=0,_t=ae;lt<_t.length;lt+=1){var Mt=_t[lt],Bt=Af(O-Mt.x,Z,be,Ee)+Mt.badness;Bt<=Qe&&(je=Mt,Qe=Bt)}return{index:M,x:O,priorBreak:je,badness:Qe}}function Sf(M){return M?Sf(M.priorBreak).concat(M.index):[]}function Tc(M,O,Z,ae,be,Ee,je){if("point"!==Ee)return[];if(!M)return[];for(var Qe=[],lt=function(In,On,jn,Vn,Yn,Qn){for(var tr=0,xr=0;xr<In.length();xr++){var pr=In.getSection(xr);tr+=kf(In.getCharCode(xr),pr,Vn,Yn,On,Qn)}return tr/Math.max(1,Math.ceil(tr/jn))}(M,O,Z,ae,be,je),_t=M.text.indexOf("\u200b")>=0,Mt=0,Bt=0;Bt<M.length();Bt++){var qt=M.getSection(Bt),Vt=M.getCharCode(Bt);if(zu[Vt]||(Mt+=kf(Vt,qt,ae,be,O,je)),Bt<M.length()-1){var rn=!((xn=Vt)<11904||!(wr["Bopomofo Extended"](xn)||wr.Bopomofo(xn)||wr["CJK Compatibility Forms"](xn)||wr["CJK Compatibility Ideographs"](xn)||wr["CJK Compatibility"](xn)||wr["CJK Radicals Supplement"](xn)||wr["CJK Strokes"](xn)||wr["CJK Symbols and Punctuation"](xn)||wr["CJK Unified Ideographs Extension A"](xn)||wr["CJK Unified Ideographs"](xn)||wr["Enclosed CJK Letters and Months"](xn)||wr["Halfwidth and Fullwidth Forms"](xn)||wr.Hiragana(xn)||wr["Ideographic Description Characters"](xn)||wr["Kangxi Radicals"](xn)||wr["Katakana Phonetic Extensions"](xn)||wr.Katakana(xn)||wr["Vertical Forms"](xn)||wr["Yi Radicals"](xn)||wr["Yi Syllables"](xn)));(po[Vt]||rn||qt.imageName)&&Qe.push(Mf(Bt+1,Mt,lt,Qe,Cp(Vt,M.getCharCode(Bt+1),rn&&_t),!1))}}var xn;return Sf(Mf(M.length(),Mt,lt,Qe,0,!0))}function kc(M){var O=.5,Z=.5;switch(M){case"right":case"top-right":case"bottom-right":O=1;break;case"left":case"top-left":case"bottom-left":O=0}switch(M){case"bottom":case"bottom-right":case"bottom-left":Z=1;break;case"top":case"top-right":case"top-left":Z=0}return{horizontalAlign:O,verticalAlign:Z}}function Pp(M,O,Z,ae,be){if(ae||be)for(var Ee=M[Z],Qe=(M[Z].x+Ee.metrics.advance*Ee.scale)*ae,lt=O;lt<=Z;lt++)M[lt].x-=Qe,M[lt].y+=be}function Ef(M,O,Z,ae,be,Ee){var je,Qe=M.image;if(Qe.content){var lt=Qe.content,_t=Qe.pixelRatio||1;je=[lt[0]/_t,lt[1]/_t,Qe.displaySize[0]-lt[2]/_t,Qe.displaySize[1]-lt[3]/_t]}var Mt,Bt,qt,Vt,rn=O.left*Ee,xn=O.right*Ee;"width"===Z||"both"===Z?(Vt=be[0]+rn-ae[3],Bt=be[0]+xn+ae[1]):Bt=(Vt=be[0]+(rn+xn-Qe.displaySize[0])/2)+Qe.displaySize[0];var In=O.top*Ee,On=O.bottom*Ee;return"height"===Z||"both"===Z?(Mt=be[1]+In-ae[0],qt=be[1]+On+ae[2]):qt=(Mt=be[1]+(In+On-Qe.displaySize[1])/2)+Qe.displaySize[1],{image:Qe,top:Mt,right:Bt,bottom:qt,left:Vt,collisionPadding:je}}po[10]=!0,po[32]=!0,po[38]=!0,po[40]=!0,po[41]=!0,po[43]=!0,po[45]=!0,po[47]=!0,po[173]=!0,po[183]=!0,po[8203]=!0,po[8208]=!0,po[8211]=!0,po[8231]=!0;var Dl=function(M){function O(Z,ae,be,Ee){M.call(this,Z,ae),this.angle=be,void 0!==Ee&&(this.segment=Ee)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.clone=function(){return new O(this.x,this.y,this.angle,this.segment)},O}(t);_r("Anchor",Dl);var Fs=128;function Ac(M,O){var Z=O.expression;if("constant"===Z.kind)return{kind:"constant",layoutSize:Z.evaluate(new ni(M+1))};if("source"===Z.kind)return{kind:"source"};for(var ae=Z.zoomStops,be=Z.interpolationType,Ee=0;Ee<ae.length&&ae[Ee]<=M;)Ee++;for(var je=Ee=Math.max(0,Ee-1);je<ae.length&&ae[je]<M+1;)je++;je=Math.min(ae.length-1,je);var Qe=ae[Ee],lt=ae[je];return"composite"===Z.kind?{kind:"composite",minZoom:Qe,maxZoom:lt,interpolationType:be}:{kind:"camera",minZoom:Qe,maxZoom:lt,minSize:Z.evaluate(new ni(Qe)),maxSize:Z.evaluate(new ni(lt)),interpolationType:be}}function Lf(M,O,Z){var ae=O.uSize,Ee=Z.lowerSize;return"source"===M.kind?Ee/Fs:"composite"===M.kind?Sr(Ee/Fs,Z.upperSize/Fs,O.uSizeT):ae}function Cf(M,O){var Z=0,ae=0;if("constant"===M.kind)ae=M.layoutSize;else if("source"!==M.kind){var be=M.interpolationType,Qe=be?i(zi.interpolationFactor(be,O,M.minZoom,M.maxZoom),0,1):0;"camera"===M.kind?ae=Sr(M.minSize,M.maxSize,Qe):Z=Qe}return{uSizeT:Z,uSize:ae}}var Op=Object.freeze({__proto__:null,getSizeData:Ac,evaluateSizeForFeature:Lf,evaluateSizeForZoom:Cf,SIZE_PACK_FACTOR:Fs});function Pf(M,O,Z,ae,be){if(void 0===O.segment)return!0;for(var Ee=O,je=O.segment+1,Qe=0;Qe>-Z/2;){if(--je<0)return!1;Qe-=M[je].dist(Ee),Ee=M[je]}Qe+=M[je].dist(M[je+1]),je++;for(var lt=[],_t=0;Qe<Z/2;){var Bt=M[je],qt=M[je+1];if(!qt)return!1;var Vt=M[je-1].angleTo(Bt)-Bt.angleTo(qt);for(Vt=Math.abs((Vt+3*Math.PI)%(2*Math.PI)-Math.PI),lt.push({distance:Qe,angleDelta:Vt}),_t+=Vt;Qe-lt[0].distance>ae;)_t-=lt.shift().angleDelta;if(_t>be)return!1;je++,Qe+=Bt.dist(qt)}return!0}function Of(M){for(var O=0,Z=0;Z<M.length-1;Z++)O+=M[Z].dist(M[Z+1]);return O}function If(M,O,Z){return M?.6*O*Z:0}function Rf(M,O){return Math.max(M?M.right-M.left:0,O?O.right-O.left:0)}function Ip(M,O,Z,ae,be,Ee){for(var je=If(Z,be,Ee),Qe=Rf(Z,ae)*Ee,lt=0,_t=Of(M)/2,Mt=0;Mt<M.length-1;Mt++){var Bt=M[Mt],qt=M[Mt+1],Vt=Bt.dist(qt);if(lt+Vt>_t){var rn=(_t-lt)/Vt,xn=Sr(Bt.x,qt.x,rn),In=Sr(Bt.y,qt.y,rn),On=new Dl(xn,In,qt.angleTo(Bt),Mt);return On._round(),!je||Pf(M,On,Qe,je,O)?On:void 0}lt+=Vt}}function Rp(M,O,Z,ae,be,Ee,je,Qe,lt){var _t=If(ae,Ee,je),Mt=Rf(ae,be),Bt=Mt*je,qt=0===M[0].x||M[0].x===lt||0===M[0].y||M[0].y===lt;return O-Bt<O/4&&(O=Bt+O/4),zf(M,qt?O/2*Qe%O:(Mt/2+2*Ee)*je*Qe%O,O,_t,Z,Bt,qt,!1,lt)}function zf(M,O,Z,ae,be,Ee,je,Qe,lt){for(var _t=Ee/2,Mt=Of(M),Bt=0,qt=O-Z,Vt=[],rn=0;rn<M.length-1;rn++){for(var xn=M[rn],In=M[rn+1],On=xn.dist(In),jn=In.angleTo(xn);qt+Z<Bt+On;){var Vn=((qt+=Z)-Bt)/On,Yn=Sr(xn.x,In.x,Vn),Qn=Sr(xn.y,In.y,Vn);if(Yn>=0&&Yn<lt&&Qn>=0&&Qn<lt&&qt-_t>=0&&qt+_t<=Mt){var tr=new Dl(Yn,Qn,jn,rn);tr._round(),ae&&!Pf(M,tr,Ee,ae,be)||Vt.push(tr)}}Bt+=On}return Qe||Vt.length||je||(Vt=zf(M,Bt/2,Z,ae,be,Ee,je,!0,lt)),Vt}function Df(M,O,Z,ae,be){for(var Ee=[],je=0;je<M.length;je++)for(var Qe=M[je],lt=void 0,_t=0;_t<Qe.length-1;_t++){var Mt=Qe[_t],Bt=Qe[_t+1];Mt.x<O&&Bt.x<O||(Mt.x<O?Mt=new t(O,Mt.y+(O-Mt.x)/(Bt.x-Mt.x)*(Bt.y-Mt.y))._round():Bt.x<O&&(Bt=new t(O,Mt.y+(O-Mt.x)/(Bt.x-Mt.x)*(Bt.y-Mt.y))._round()),Mt.y<Z&&Bt.y<Z||(Mt.y<Z?Mt=new t(Mt.x+(Z-Mt.y)/(Bt.y-Mt.y)*(Bt.x-Mt.x),Z)._round():Bt.y<Z&&(Bt=new t(Mt.x+(Z-Mt.y)/(Bt.y-Mt.y)*(Bt.x-Mt.x),Z)._round()),Mt.x>=ae&&Bt.x>=ae||(Mt.x>=ae?Mt=new t(ae,Mt.y+(ae-Mt.x)/(Bt.x-Mt.x)*(Bt.y-Mt.y))._round():Bt.x>=ae&&(Bt=new t(ae,Mt.y+(ae-Mt.x)/(Bt.x-Mt.x)*(Bt.y-Mt.y))._round()),Mt.y>=be&&Bt.y>=be||(Mt.y>=be?Mt=new t(Mt.x+(be-Mt.y)/(Bt.y-Mt.y)*(Bt.x-Mt.x),be)._round():Bt.y>=be&&(Bt=new t(Mt.x+(be-Mt.y)/(Bt.y-Mt.y)*(Bt.x-Mt.x),be)._round()),lt&&Mt.equals(lt[lt.length-1])||Ee.push(lt=[Mt]),lt.push(Bt)))))}return Ee}function Ff(M,O,Z,ae){var be=[],Ee=M.image,je=Ee.pixelRatio,Qe=Ee.paddedRect.w-2,lt=Ee.paddedRect.h-2,_t=M.right-M.left,Mt=M.bottom-M.top,Bt=Ee.stretchX||[[0,Qe]],qt=Ee.stretchY||[[0,lt]],Vt=function(gi,Ti){return gi+Ti[1]-Ti[0]},rn=Bt.reduce(Vt,0),xn=qt.reduce(Vt,0),In=Qe-rn,On=lt-xn,jn=0,Vn=rn,Yn=0,Qn=xn,tr=0,xr=In,pr=0,Tr=On;if(Ee.content&&ae){var Er=Ee.content;jn=Du(Bt,0,Er[0]),Yn=Du(qt,0,Er[1]),Vn=Du(Bt,Er[0],Er[2]),Qn=Du(qt,Er[1],Er[3]),tr=Er[0]-jn,pr=Er[1]-Yn,xr=Er[2]-Er[0]-Vn,Tr=Er[3]-Er[1]-Qn}var jr=function(gi,Ti,Ai,Li){var _i=Fu(gi.stretch-jn,Vn,_t,M.left),ra=Bu(gi.fixed-tr,xr,gi.stretch,rn),Oi=Fu(Ti.stretch-Yn,Qn,Mt,M.top),da=Bu(Ti.fixed-pr,Tr,Ti.stretch,xn),Sa=Fu(Ai.stretch-jn,Vn,_t,M.left),ba=Bu(Ai.fixed-tr,xr,Ai.stretch,rn),Za=Fu(Li.stretch-Yn,Qn,Mt,M.top),_a=Bu(Li.fixed-pr,Tr,Li.stretch,xn),aa=new t(_i,Oi),wa=new t(Sa,Oi),ga=new t(Sa,Za),oa=new t(_i,Za),Gr=new t(ra/je,da/je),ti=new t(ba/je,_a/je),Ni=O*Math.PI/180;if(Ni){var xi=Math.sin(Ni),Ri=Math.cos(Ni),Ci=[Ri,-xi,xi,Ri];aa._matMult(Ci),wa._matMult(Ci),oa._matMult(Ci),ga._matMult(Ci)}var ii=gi.stretch+gi.fixed,Wa=Ti.stretch+Ti.fixed;return{tl:aa,tr:wa,bl:oa,br:ga,tex:{x:Ee.paddedRect.x+1+ii,y:Ee.paddedRect.y+1+Wa,w:Ai.stretch+Ai.fixed-ii,h:Li.stretch+Li.fixed-Wa},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:Gr,pixelOffsetBR:ti,minFontScaleX:xr/je/_t,minFontScaleY:Tr/je/Mt,isSDF:Z}};if(ae&&(Ee.stretchX||Ee.stretchY))for(var Pr=Bf(Bt,In,rn),Nr=Bf(qt,On,xn),Ir=0;Ir<Pr.length-1;Ir++)for(var Cr=Pr[Ir],Jr=Pr[Ir+1],qr=0;qr<Nr.length-1;qr++)be.push(jr(Cr,Nr[qr],Jr,Nr[qr+1]));else be.push(jr({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Qe+1},{fixed:0,stretch:lt+1}));return be}function Du(M,O,Z){for(var ae=0,be=0,Ee=M;be<Ee.length;be+=1){var je=Ee[be];ae+=Math.max(O,Math.min(Z,je[1]))-Math.max(O,Math.min(Z,je[0]))}return ae}function Bf(M,O,Z){for(var ae=[{fixed:-1,stretch:0}],be=0,Ee=M;be<Ee.length;be+=1){var je=Ee[be],Qe=je[0],lt=je[1],_t=ae[ae.length-1];ae.push({fixed:Qe-_t.stretch,stretch:_t.stretch}),ae.push({fixed:Qe-_t.stretch,stretch:_t.stretch+(lt-Qe)})}return ae.push({fixed:O+1,stretch:Z}),ae}function Fu(M,O,Z,ae){return M/O*Z+ae}function Bu(M,O,Z,ae){return M-O*Z/ae}var Nu=function(M,O,Z,ae,be,Ee,je,Qe,lt,_t){if(this.boxStartIndex=M.length,lt){var Mt=Ee.top,Bt=Ee.bottom,qt=Ee.collisionPadding;qt&&(Mt-=qt[1],Bt+=qt[3]);var Vt=Bt-Mt;Vt>0&&(Vt=Math.max(10,Vt),this.circleDiameter=Vt)}else{var rn=Ee.top*je-Qe,xn=Ee.bottom*je+Qe,In=Ee.left*je-Qe,On=Ee.right*je+Qe,jn=Ee.collisionPadding;if(jn&&(In-=jn[0]*je,rn-=jn[1]*je,On+=jn[2]*je,xn+=jn[3]*je),_t){var Vn=new t(In,rn),Yn=new t(On,rn),Qn=new t(In,xn),tr=new t(On,xn),xr=_t*Math.PI/180;Vn._rotate(xr),Yn._rotate(xr),Qn._rotate(xr),tr._rotate(xr),In=Math.min(Vn.x,Yn.x,Qn.x,tr.x),On=Math.max(Vn.x,Yn.x,Qn.x,tr.x),rn=Math.min(Vn.y,Yn.y,Qn.y,tr.y),xn=Math.max(Vn.y,Yn.y,Qn.y,tr.y)}M.emplaceBack(O.x,O.y,In,rn,On,xn,Z,ae,be)}this.boxEndIndex=M.length},Fl=function(M,O){if(void 0===M&&(M=[]),void 0===O&&(O=zp),this.data=M,this.length=this.data.length,this.compare=O,this.length>0)for(var Z=(this.length>>1)-1;Z>=0;Z--)this._down(Z)};function zp(M,O){return M<O?-1:M>O?1:0}function Dp(M,O,Z){void 0===O&&(O=1),void 0===Z&&(Z=!1);for(var ae=1/0,be=1/0,Ee=-1/0,je=-1/0,Qe=M[0],lt=0;lt<Qe.length;lt++){var _t=Qe[lt];(!lt||_t.x<ae)&&(ae=_t.x),(!lt||_t.y<be)&&(be=_t.y),(!lt||_t.x>Ee)&&(Ee=_t.x),(!lt||_t.y>je)&&(je=_t.y)}var qt=Math.min(Ee-ae,je-be),Vt=qt/2,rn=new Fl([],Fp);if(0===qt)return new t(ae,be);for(var xn=ae;xn<Ee;xn+=qt)for(var In=be;In<je;In+=qt)rn.push(new Bl(xn+Vt,In+Vt,Vt,M));for(var On=function(Yn){for(var Qn=0,tr=0,xr=0,pr=Yn[0],Tr=0,Er=pr.length,jr=Er-1;Tr<Er;jr=Tr++){var Pr=pr[Tr],Nr=pr[jr],Ir=Pr.x*Nr.y-Nr.x*Pr.y;tr+=(Pr.x+Nr.x)*Ir,xr+=(Pr.y+Nr.y)*Ir,Qn+=3*Ir}return new Bl(tr/Qn,xr/Qn,0,Yn)}(M),jn=rn.length;rn.length;){var Vn=rn.pop();(Vn.d>On.d||!On.d)&&(On=Vn,Z&&console.log("found best %d after %d probes",Math.round(1e4*Vn.d)/1e4,jn)),Vn.max-On.d<=O||(rn.push(new Bl(Vn.p.x-(Vt=Vn.h/2),Vn.p.y-Vt,Vt,M)),rn.push(new Bl(Vn.p.x+Vt,Vn.p.y-Vt,Vt,M)),rn.push(new Bl(Vn.p.x-Vt,Vn.p.y+Vt,Vt,M)),rn.push(new Bl(Vn.p.x+Vt,Vn.p.y+Vt,Vt,M)),jn+=4)}return Z&&(console.log("num probes: "+jn),console.log("best distance: "+On.d)),On.p}function Fp(M,O){return O.max-M.max}function Bl(M,O,Z,ae){this.p=new t(M,O),this.h=Z,this.d=function(be,Ee){for(var je=!1,Qe=1/0,lt=0;lt<Ee.length;lt++)for(var _t=Ee[lt],Mt=0,Bt=_t.length,qt=Bt-1;Mt<Bt;qt=Mt++){var Vt=_t[Mt],rn=_t[qt];Vt.y>be.y!=rn.y>be.y&&be.x<(rn.x-Vt.x)*(be.y-Vt.y)/(rn.y-Vt.y)+Vt.x&&(je=!je),Qe=Math.min(Qe,_u(be,Vt,rn))}return(je?1:-1)*Math.sqrt(Qe)}(this.p,ae),this.max=this.d+this.h*Math.SQRT2}Fl.prototype.push=function(M){this.data.push(M),this.length++,this._up(this.length-1)},Fl.prototype.pop=function(){if(0!==this.length){var M=this.data[0],O=this.data.pop();return this.length--,this.length>0&&(this.data[0]=O,this._down(0)),M}},Fl.prototype.peek=function(){return this.data[0]},Fl.prototype._up=function(M){for(var O=this.data,Z=this.compare,ae=O[M];M>0;){var be=M-1>>1,Ee=O[be];if(Z(ae,Ee)>=0)break;O[M]=Ee,M=be}O[M]=ae},Fl.prototype._down=function(M){for(var O=this.data,Z=this.compare,ae=this.length>>1,be=O[M];M<ae;){var Ee=1+(M<<1),je=O[Ee],Qe=Ee+1;if(Qe<this.length&&Z(O[Qe],je)<0&&(Ee=Qe,je=O[Qe]),Z(je,be)>=0)break;O[M]=je,M=Ee}O[M]=be};var Mc=Number.POSITIVE_INFINITY;function Nf(M,O){return O[1]!==Mc?function(Z,ae,be){var Ee=0,je=0;switch(ae=Math.abs(ae),be=Math.abs(be),Z){case"top-right":case"top-left":case"top":je=be-7;break;case"bottom-right":case"bottom-left":case"bottom":je=7-be}switch(Z){case"top-right":case"bottom-right":case"right":Ee=-ae;break;case"top-left":case"bottom-left":case"left":Ee=ae}return[Ee,je]}(M,O[0],O[1]):function(Z,ae){var be=0,Ee=0;ae<0&&(ae=0);var je=ae/Math.sqrt(2);switch(Z){case"top-right":case"top-left":Ee=je-7;break;case"bottom-right":case"bottom-left":Ee=7-je;break;case"bottom":Ee=7-ae;break;case"top":Ee=ae-7}switch(Z){case"top-right":case"bottom-right":be=-je;break;case"top-left":case"bottom-left":be=je;break;case"left":be=ae;break;case"right":be=-ae}return[be,Ee]}(M,O[0])}function Sc(M){switch(M){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}var hl=32640;function jf(M,O,Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt,rn){var xn=function(Yn,Qn,tr,xr,pr,Tr,Er,jr){for(var Pr=xr.layout.get("text-rotate").evaluate(Tr,{})*Math.PI/180,Nr=[],Ir=0,Cr=Qn.positionedLines;Ir<Cr.length;Ir+=1)for(var Jr=Cr[Ir],qr=0,bi=Jr.positionedGlyphs;qr<bi.length;qr+=1){var Fr=bi[qr];if(Fr.rect){var gi=Fr.rect||{},Ti=4,Ai=!0,Li=1,_i=0,ra=(pr||jr)&&Fr.vertical,Oi=Fr.metrics.advance*Fr.scale/2;if(jr&&Qn.verticalizable&&(_i=Jr.lineOffset/2-(Fr.imageName?-(Ma-Fr.metrics.width*Fr.scale)/2:(Fr.scale-1)*Ma)),Fr.imageName){var ba=Er[Fr.imageName];Ai=ba.sdf,Ti=1/(Li=ba.pixelRatio)}var Za=pr?[Fr.x+Oi,Fr.y]:[0,0],_a=pr?[0,0]:[Fr.x+Oi+tr[0],Fr.y+tr[1]-_i],aa=[0,0];ra&&(aa=_a,_a=[0,0]);var wa=(Fr.metrics.left-Ti)*Fr.scale-Oi+_a[0],ga=(-Fr.metrics.top-Ti)*Fr.scale+_a[1],oa=wa+gi.w*Fr.scale/Li,Gr=ga+gi.h*Fr.scale/Li,ti=new t(wa,ga),Ni=new t(oa,ga),xi=new t(wa,Gr),Ri=new t(oa,Gr);if(ra){var Ci=new t(-Oi,Oi- -17),ii=-Math.PI/2,ji=12-Oi,go=new t(22-ji,-(Fr.imageName?ji:0)),ja=new(Function.prototype.bind.apply(t,[null].concat(aa)));ti._rotateAround(ii,Ci)._add(go)._add(ja),Ni._rotateAround(ii,Ci)._add(go)._add(ja),xi._rotateAround(ii,Ci)._add(go)._add(ja),Ri._rotateAround(ii,Ci)._add(go)._add(ja)}if(Pr){var ws=Math.sin(Pr),nl=Math.cos(Pr),va=[nl,-ws,ws,nl];ti._matMult(va),Ni._matMult(va),xi._matMult(va),Ri._matMult(va)}var Ts=new t(0,0),as=new t(0,0);Nr.push({tl:ti,tr:Ni,bl:xi,br:Ri,tex:gi,writingMode:Qn.writingMode,glyphOffset:Za,sectionIndex:Fr.sectionIndex,isSDF:Ai,pixelOffsetTL:Ts,pixelOffsetBR:as,minFontScaleX:0,minFontScaleY:0})}}return Nr}(0,Z,Qe,be,Ee,je,ae,M.allowVerticalPlacement),In=M.textSizeData,On=null;"source"===In.kind?(On=[Fs*be.layout.get("text-size").evaluate(je,{})])[0]>hl&&S(M.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'):"composite"===In.kind&&((On=[Fs*Vt.compositeTextSizes[0].evaluate(je,{},rn),Fs*Vt.compositeTextSizes[1].evaluate(je,{},rn)])[0]>hl||On[1]>hl)&&S(M.layerIds[0]+': Value for "text-size" is >= 255. Reduce your "text-size".'),M.addSymbols(M.text,xn,On,Qe,Ee,je,_t,O,lt.lineStartIndex,lt.lineLength,qt,rn);for(var jn=0,Vn=Mt;jn<Vn.length;jn+=1)Bt[Vn[jn]]=M.text.placedSymbolArray.length-1;return 4*xn.length}function Uf(M){for(var O in M)return M[O];return null}function Bp(M,O,Z,ae){var be=M.compareText;if(O in be){for(var Ee=be[O],je=Ee.length-1;je>=0;je--)if(ae.dist(Ee[je])<Z)return!0}else be[O]=[];return be[O].push(ae),!1}var Np=Ol.VectorTileFeature.types,jp=[{name:"a_fade_opacity",components:1,type:"Uint8",offset:0}];function ju(M,O,Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt){var Vt=Qe?Math.min(hl,Math.round(Qe[0])):0,rn=Qe?Math.min(hl,Math.round(Qe[1])):0;M.emplaceBack(O,Z,Math.round(32*ae),Math.round(32*be),Ee,je,(Vt<<1)+(lt?1:0),rn,16*_t,16*Mt,256*Bt,256*qt)}function Ec(M,O,Z){M.emplaceBack(O.x,O.y,Z),M.emplaceBack(O.x,O.y,Z),M.emplaceBack(O.x,O.y,Z),M.emplaceBack(O.x,O.y,Z)}function Up(M){for(var O=0,Z=M.sections;O<Z.length;O+=1)if(uo(Z[O].text))return!0;return!1}var Nl=function(M){this.layoutVertexArray=new yt,this.indexArray=new Ne,this.programConfigurations=M,this.segments=new en,this.dynamicLayoutVertexArray=new D,this.opacityVertexArray=new Y,this.placedSymbolArray=new it};Nl.prototype.isEmpty=function(){return 0===this.layoutVertexArray.length&&0===this.indexArray.length&&0===this.dynamicLayoutVertexArray.length&&0===this.opacityVertexArray.length},Nl.prototype.upload=function(M,O,Z,ae){this.isEmpty()||(Z&&(this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,_c.members),this.indexBuffer=M.createIndexBuffer(this.indexArray,O),this.dynamicLayoutVertexBuffer=M.createVertexBuffer(this.dynamicLayoutVertexArray,dp.members,!0),this.opacityVertexBuffer=M.createVertexBuffer(this.opacityVertexArray,jp,!0),this.opacityVertexBuffer.itemSize=1),(Z||ae)&&this.programConfigurations.upload(M))},Nl.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.dynamicLayoutVertexBuffer.destroy(),this.opacityVertexBuffer.destroy())},_r("SymbolBuffers",Nl);var ou=function(M,O,Z){this.layoutVertexArray=new M,this.layoutAttributes=O,this.indexArray=new Z,this.segments=new en,this.collisionVertexArray=new Le};ou.prototype.upload=function(M){this.layoutVertexBuffer=M.createVertexBuffer(this.layoutVertexArray,this.layoutAttributes),this.indexBuffer=M.createIndexBuffer(this.indexArray),this.collisionVertexBuffer=M.createVertexBuffer(this.collisionVertexArray,gp.members,!0)},ou.prototype.destroy=function(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.collisionVertexBuffer.destroy())},_r("CollisionBuffers",ou);var di=function(M){this.collisionBoxArray=M.collisionBoxArray,this.zoom=M.zoom,this.overscaling=M.overscaling,this.layers=M.layers,this.layerIds=this.layers.map(function(je){return je.id}),this.index=M.index,this.pixelRatio=M.pixelRatio,this.sourceLayerIndex=M.sourceLayerIndex,this.hasPattern=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[],this.placementInvProjMatrix=cc([]),this.placementViewportMatrix=cc([]);var O=this.layers[0]._unevaluatedLayout._values;this.textSizeData=Ac(this.zoom,O["text-size"]),this.iconSizeData=Ac(this.zoom,O["icon-size"]);var Z=this.layers[0].layout,ae=Z.get("symbol-sort-key"),be=Z.get("symbol-z-order");this.sortFeaturesByKey="viewport-y"!==be&&void 0!==ae.constantOr(1),this.sortFeaturesByY=("viewport-y"===be||"auto"===be&&!this.sortFeaturesByKey)&&(Z.get("text-allow-overlap")||Z.get("icon-allow-overlap")||Z.get("text-ignore-placement")||Z.get("icon-ignore-placement")),"point"===Z.get("symbol-placement")&&(this.writingModes=Z.get("text-writing-mode").map(function(je){return Eo[je]})),this.stateDependentLayerIds=this.layers.filter(function(je){return je.isStateDependent()}).map(function(je){return je.id}),this.sourceID=M.sourceID};di.prototype.createArrays=function(){this.text=new Nl(new Si(_c.members,this.layers,this.zoom,function(M){return/^text/.test(M)})),this.icon=new Nl(new Si(_c.members,this.layers,this.zoom,function(M){return/^icon/.test(M)})),this.glyphOffsetArray=new Dt,this.lineVertexArray=new Ft,this.symbolInstances=new St},di.prototype.calculateGlyphDependencies=function(M,O,Z,ae,be){for(var Ee=0;Ee<M.length;Ee++)if(O[M.charCodeAt(Ee)]=!0,(Z||ae)&&be){var je=ru[M.charAt(Ee)];je&&(O[je.charCodeAt(0)]=!0)}},di.prototype.populate=function(M,O,Z){var ae=this.layers[0],be=ae.layout,Ee=be.get("text-font"),je=be.get("text-field"),Qe=be.get("icon-image"),lt=("constant"!==je.value.kind||je.value.value instanceof Rn&&!je.value.value.isEmpty()||je.value.value.toString().length>0)&&("constant"!==Ee.value.kind||Ee.value.value.length>0),_t="constant"!==Qe.value.kind||!!Qe.value.value||Object.keys(Qe.parameters).length>0,Mt=be.get("symbol-sort-key");if(this.features=[],lt||_t){for(var Bt=O.iconDependencies,qt=O.glyphDependencies,Vt=O.availableImages,rn=new ni(this.zoom),xn=0,In=M;xn<In.length;xn+=1){var On=In[xn],jn=On.feature,Vn=On.id,Yn=On.index,Qn=On.sourceLayerIndex,tr=ae._featureFilter.needGeometry,xr={type:jn.type,id:Vn,properties:jn.properties,geometry:tr?ki(jn):[]};if(ae._featureFilter.filter(rn,xr,Z)){tr||(xr.geometry=ki(jn));var pr=void 0;if(lt){var Tr=ae.getValueAndResolveTokens("text-field",xr,Z,Vt),Er=Rn.factory(Tr);Up(Er)&&(this.hasRTLText=!0),(!this.hasRTLText||"unavailable"===Fa()||this.hasRTLText&&ua.isParsed())&&(pr=mp(Er,ae,xr))}var jr=void 0;if(_t){var Pr=ae.getValueAndResolveTokens("icon-image",xr,Z,Vt);jr=Pr instanceof Nn?Pr:Nn.fromString(Pr)}if(pr||jr){var Nr=this.sortFeaturesByKey?Mt.evaluate(xr,{},Z):void 0,Ir={id:Vn,text:pr,icon:jr,index:Yn,sourceLayerIndex:Qn,geometry:ki(jn),properties:jn.properties,type:Np[jn.type],sortKey:Nr};if(this.features.push(Ir),jr&&(Bt[jr.name]=!0),pr){var Cr=Ee.evaluate(xr,{},Z).join(","),Jr="map"===be.get("text-rotation-alignment")&&"point"!==be.get("symbol-placement");this.allowVerticalPlacement=this.writingModes&&this.writingModes.indexOf(Eo.vertical)>=0;for(var qr=0,bi=pr.sections;qr<bi.length;qr+=1){var Fr=bi[qr];if(Fr.image)Bt[Fr.image.name]=!0;else{var gi=ns(pr.toString()),Ti=Fr.fontStack||Cr,Ai=qt[Ti]=qt[Ti]||{};this.calculateGlyphDependencies(Fr.text,Ai,Jr,this.allowVerticalPlacement,gi)}}}}}}"line"===be.get("symbol-placement")&&(this.features=function(Li){var _i={},ra={},Oi=[],da=0;function Sa(Ri){Oi.push(Li[Ri]),da++}function ba(Ri,Ci,ii){var ji=ra[Ri];return delete ra[Ri],ra[Ci]=ji,Oi[ji].geometry[0].pop(),Oi[ji].geometry[0]=Oi[ji].geometry[0].concat(ii[0]),ji}function Za(Ri,Ci,ii){var ji=_i[Ci];return delete _i[Ci],_i[Ri]=ji,Oi[ji].geometry[0].shift(),Oi[ji].geometry[0]=ii[0].concat(Oi[ji].geometry[0]),ji}function _a(Ri,Ci,ii){var ji=ii?Ci[0][Ci[0].length-1]:Ci[0][0];return Ri+":"+ji.x+":"+ji.y}for(var aa=0;aa<Li.length;aa++){var wa=Li[aa],ga=wa.geometry,oa=wa.text?wa.text.toString():null;if(oa){var Gr=_a(oa,ga),ti=_a(oa,ga,!0);if(Gr in ra&&ti in _i&&ra[Gr]!==_i[ti]){var Ni=Za(Gr,ti,ga),xi=ba(Gr,ti,Oi[Ni].geometry);delete _i[Gr],delete ra[ti],ra[_a(oa,Oi[xi].geometry,!0)]=xi,Oi[Ni].geometry=null}else Gr in ra?ba(Gr,ti,ga):ti in _i?Za(Gr,ti,ga):(Sa(aa),_i[Gr]=da-1,ra[ti]=da-1)}else Sa(aa)}return Oi.filter(function(Ri){return Ri.geometry})}(this.features)),this.sortFeaturesByKey&&this.features.sort(function(Li,_i){return Li.sortKey-_i.sortKey})}},di.prototype.update=function(M,O,Z){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(M,O,this.layers,Z),this.icon.programConfigurations.updatePaintArrays(M,O,this.layers,Z))},di.prototype.isEmpty=function(){return 0===this.symbolInstances.length&&!this.hasRTLText},di.prototype.uploadPending=function(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload},di.prototype.upload=function(M){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(M),this.iconCollisionBox.upload(M)),this.text.upload(M,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(M,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0},di.prototype.destroyDebugData=function(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()},di.prototype.destroy=function(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()},di.prototype.addToLineVertexArray=function(M,O){var Z=this.lineVertexArray.length;if(void 0!==M.segment){for(var ae=M.dist(O[M.segment+1]),be=M.dist(O[M.segment]),Ee={},je=M.segment+1;je<O.length;je++)Ee[je]={x:O[je].x,y:O[je].y,tileUnitDistanceFromAnchor:ae},je<O.length-1&&(ae+=O[je+1].dist(O[je]));for(var Qe=M.segment||0;Qe>=0;Qe--)Ee[Qe]={x:O[Qe].x,y:O[Qe].y,tileUnitDistanceFromAnchor:be},Qe>0&&(be+=O[Qe-1].dist(O[Qe]));for(var lt=0;lt<O.length;lt++){var _t=Ee[lt];this.lineVertexArray.emplaceBack(_t.x,_t.y,_t.tileUnitDistanceFromAnchor)}}return{lineStartIndex:Z,lineLength:this.lineVertexArray.length-Z}},di.prototype.addSymbols=function(M,O,Z,ae,be,Ee,je,Qe,lt,_t,Mt,Bt){for(var qt=M.indexArray,Vt=M.layoutVertexArray,rn=M.segments.prepareSegment(4*O.length,Vt,qt,Ee.sortKey),xn=this.glyphOffsetArray.length,In=rn.vertexLength,On=this.allowVerticalPlacement&&je===Eo.vertical?Math.PI/2:0,jn=Ee.text&&Ee.text.sections,Vn=0;Vn<O.length;Vn++){var Yn=O[Vn],Qn=Yn.tl,tr=Yn.tr,xr=Yn.bl,pr=Yn.br,Tr=Yn.tex,Er=Yn.pixelOffsetTL,jr=Yn.pixelOffsetBR,Pr=Yn.minFontScaleX,Nr=Yn.minFontScaleY,Ir=Yn.glyphOffset,Cr=Yn.isSDF,Jr=Yn.sectionIndex,qr=rn.vertexLength,bi=Ir[1];ju(Vt,Qe.x,Qe.y,Qn.x,bi+Qn.y,Tr.x,Tr.y,Z,Cr,Er.x,Er.y,Pr,Nr),ju(Vt,Qe.x,Qe.y,tr.x,bi+tr.y,Tr.x+Tr.w,Tr.y,Z,Cr,jr.x,Er.y,Pr,Nr),ju(Vt,Qe.x,Qe.y,xr.x,bi+xr.y,Tr.x,Tr.y+Tr.h,Z,Cr,Er.x,jr.y,Pr,Nr),ju(Vt,Qe.x,Qe.y,pr.x,bi+pr.y,Tr.x+Tr.w,Tr.y+Tr.h,Z,Cr,jr.x,jr.y,Pr,Nr),Ec(M.dynamicLayoutVertexArray,Qe,On),qt.emplaceBack(qr,qr+1,qr+2),qt.emplaceBack(qr+1,qr+2,qr+3),rn.vertexLength+=4,rn.primitiveLength+=2,this.glyphOffsetArray.emplaceBack(Ir[0]),Vn!==O.length-1&&Jr===O[Vn+1].sectionIndex||M.programConfigurations.populatePaintArrays(Vt.length,Ee,Ee.index,{},Bt,jn&&jn[Jr])}M.placedSymbolArray.emplaceBack(Qe.x,Qe.y,xn,this.glyphOffsetArray.length-xn,In,lt,_t,Qe.segment,Z?Z[0]:0,Z?Z[1]:0,ae[0],ae[1],je,0,!1,0,Mt)},di.prototype._addCollisionDebugVertex=function(M,O,Z,ae,be,Ee){return O.emplaceBack(0,0),M.emplaceBack(Z.x,Z.y,ae,be,Math.round(Ee.x),Math.round(Ee.y))},di.prototype.addCollisionDebugVertices=function(M,O,Z,ae,be,Ee,je){var Qe=be.segments.prepareSegment(4,be.layoutVertexArray,be.indexArray),lt=Qe.vertexLength,_t=be.layoutVertexArray,Mt=be.collisionVertexArray,Bt=je.anchorX,qt=je.anchorY;this._addCollisionDebugVertex(_t,Mt,Ee,Bt,qt,new t(M,O)),this._addCollisionDebugVertex(_t,Mt,Ee,Bt,qt,new t(Z,O)),this._addCollisionDebugVertex(_t,Mt,Ee,Bt,qt,new t(Z,ae)),this._addCollisionDebugVertex(_t,Mt,Ee,Bt,qt,new t(M,ae)),Qe.vertexLength+=4;var Vt=be.indexArray;Vt.emplaceBack(lt,lt+1),Vt.emplaceBack(lt+1,lt+2),Vt.emplaceBack(lt+2,lt+3),Vt.emplaceBack(lt+3,lt),Qe.primitiveLength+=4},di.prototype.addDebugCollisionBoxes=function(M,O,Z,ae){for(var be=M;be<O;be++){var Ee=this.collisionBoxArray.get(be);this.addCollisionDebugVertices(Ee.x1,Ee.y1,Ee.x2,Ee.y2,ae?this.textCollisionBox:this.iconCollisionBox,Ee.anchorPoint,Z)}},di.prototype.generateCollisionDebugBuffers=function(){this.hasDebugData()&&this.destroyDebugData(),this.textCollisionBox=new ou(ne,vf.members,ue),this.iconCollisionBox=new ou(ne,vf.members,ue);for(var M=0;M<this.symbolInstances.length;M++){var O=this.symbolInstances.get(M);this.addDebugCollisionBoxes(O.textBoxStartIndex,O.textBoxEndIndex,O,!0),this.addDebugCollisionBoxes(O.verticalTextBoxStartIndex,O.verticalTextBoxEndIndex,O,!0),this.addDebugCollisionBoxes(O.iconBoxStartIndex,O.iconBoxEndIndex,O,!1),this.addDebugCollisionBoxes(O.verticalIconBoxStartIndex,O.verticalIconBoxEndIndex,O,!1)}},di.prototype._deserializeCollisionBoxesForSymbol=function(M,O,Z,ae,be,Ee,je,Qe,lt){for(var _t={},Mt=O;Mt<Z;Mt++){var Bt=M.get(Mt);_t.textBox={x1:Bt.x1,y1:Bt.y1,x2:Bt.x2,y2:Bt.y2,anchorPointX:Bt.anchorPointX,anchorPointY:Bt.anchorPointY},_t.textFeatureIndex=Bt.featureIndex;break}for(var qt=ae;qt<be;qt++){var Vt=M.get(qt);_t.verticalTextBox={x1:Vt.x1,y1:Vt.y1,x2:Vt.x2,y2:Vt.y2,anchorPointX:Vt.anchorPointX,anchorPointY:Vt.anchorPointY},_t.verticalTextFeatureIndex=Vt.featureIndex;break}for(var rn=Ee;rn<je;rn++){var xn=M.get(rn);_t.iconBox={x1:xn.x1,y1:xn.y1,x2:xn.x2,y2:xn.y2,anchorPointX:xn.anchorPointX,anchorPointY:xn.anchorPointY},_t.iconFeatureIndex=xn.featureIndex;break}for(var In=Qe;In<lt;In++){var On=M.get(In);_t.verticalIconBox={x1:On.x1,y1:On.y1,x2:On.x2,y2:On.y2,anchorPointX:On.anchorPointX,anchorPointY:On.anchorPointY},_t.verticalIconFeatureIndex=On.featureIndex;break}return _t},di.prototype.deserializeCollisionBoxes=function(M){this.collisionArrays=[];for(var O=0;O<this.symbolInstances.length;O++){var Z=this.symbolInstances.get(O);this.collisionArrays.push(this._deserializeCollisionBoxesForSymbol(M,Z.textBoxStartIndex,Z.textBoxEndIndex,Z.verticalTextBoxStartIndex,Z.verticalTextBoxEndIndex,Z.iconBoxStartIndex,Z.iconBoxEndIndex,Z.verticalIconBoxStartIndex,Z.verticalIconBoxEndIndex))}},di.prototype.hasTextData=function(){return this.text.segments.get().length>0},di.prototype.hasIconData=function(){return this.icon.segments.get().length>0},di.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},di.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},di.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},di.prototype.addIndicesForPlacedSymbol=function(M,O){for(var Z=M.placedSymbolArray.get(O),ae=Z.vertexStartIndex+4*Z.numGlyphs,be=Z.vertexStartIndex;be<ae;be+=4)M.indexArray.emplaceBack(be,be+1,be+2),M.indexArray.emplaceBack(be+1,be+2,be+3)},di.prototype.getSortedSymbolIndexes=function(M){if(this.sortedAngle===M&&void 0!==this.symbolInstanceIndexes)return this.symbolInstanceIndexes;for(var O=Math.sin(M),Z=Math.cos(M),ae=[],be=[],Ee=[],je=0;je<this.symbolInstances.length;++je){Ee.push(je);var Qe=this.symbolInstances.get(je);ae.push(0|Math.round(O*Qe.anchorX+Z*Qe.anchorY)),be.push(Qe.featureIndex)}return Ee.sort(function(lt,_t){return ae[lt]-ae[_t]||be[_t]-be[lt]}),Ee},di.prototype.addToSortKeyRanges=function(M,O){var Z=this.sortKeyRanges[this.sortKeyRanges.length-1];Z&&Z.sortKey===O?Z.symbolInstanceEnd=M+1:this.sortKeyRanges.push({sortKey:O,symbolInstanceStart:M,symbolInstanceEnd:M+1})},di.prototype.sortFeatures=function(M){var O=this;if(this.sortFeaturesByY&&this.sortedAngle!==M&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(M),this.sortedAngle=M,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var Z=0,ae=this.symbolInstanceIndexes;Z<ae.length;Z+=1){var Ee=this.symbolInstances.get(ae[Z]);this.featureSortOrder.push(Ee.featureIndex),[Ee.rightJustifiedTextSymbolIndex,Ee.centerJustifiedTextSymbolIndex,Ee.leftJustifiedTextSymbolIndex].forEach(function(je,Qe,lt){je>=0&&lt.indexOf(je)===Qe&&O.addIndicesForPlacedSymbol(O.text,je)}),Ee.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,Ee.verticalPlacedTextSymbolIndex),Ee.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ee.placedIconSymbolIndex),Ee.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,Ee.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}},_r("SymbolBucket",di,{omit:["layers","collisionBoxArray","features","compareText"]}),di.MAX_GLYPHS=65535,di.addDynamicAttributes=Ec;var Vp=new $i({"symbol-placement":new Mr(Se.layout_symbol["symbol-placement"]),"symbol-spacing":new Mr(Se.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new Mr(Se.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Or(Se.layout_symbol["symbol-sort-key"]),"symbol-z-order":new Mr(Se.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new Mr(Se.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new Mr(Se.layout_symbol["icon-ignore-placement"]),"icon-optional":new Mr(Se.layout_symbol["icon-optional"]),"icon-rotation-alignment":new Mr(Se.layout_symbol["icon-rotation-alignment"]),"icon-size":new Or(Se.layout_symbol["icon-size"]),"icon-text-fit":new Mr(Se.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new Mr(Se.layout_symbol["icon-text-fit-padding"]),"icon-image":new Or(Se.layout_symbol["icon-image"]),"icon-rotate":new Or(Se.layout_symbol["icon-rotate"]),"icon-padding":new Mr(Se.layout_symbol["icon-padding"]),"icon-keep-upright":new Mr(Se.layout_symbol["icon-keep-upright"]),"icon-offset":new Or(Se.layout_symbol["icon-offset"]),"icon-anchor":new Or(Se.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new Mr(Se.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new Mr(Se.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new Mr(Se.layout_symbol["text-rotation-alignment"]),"text-field":new Or(Se.layout_symbol["text-field"]),"text-font":new Or(Se.layout_symbol["text-font"]),"text-size":new Or(Se.layout_symbol["text-size"]),"text-max-width":new Or(Se.layout_symbol["text-max-width"]),"text-line-height":new Mr(Se.layout_symbol["text-line-height"]),"text-letter-spacing":new Or(Se.layout_symbol["text-letter-spacing"]),"text-justify":new Or(Se.layout_symbol["text-justify"]),"text-radial-offset":new Or(Se.layout_symbol["text-radial-offset"]),"text-variable-anchor":new Mr(Se.layout_symbol["text-variable-anchor"]),"text-anchor":new Or(Se.layout_symbol["text-anchor"]),"text-max-angle":new Mr(Se.layout_symbol["text-max-angle"]),"text-writing-mode":new Mr(Se.layout_symbol["text-writing-mode"]),"text-rotate":new Or(Se.layout_symbol["text-rotate"]),"text-padding":new Mr(Se.layout_symbol["text-padding"]),"text-keep-upright":new Mr(Se.layout_symbol["text-keep-upright"]),"text-transform":new Or(Se.layout_symbol["text-transform"]),"text-offset":new Or(Se.layout_symbol["text-offset"]),"text-allow-overlap":new Mr(Se.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new Mr(Se.layout_symbol["text-ignore-placement"]),"text-optional":new Mr(Se.layout_symbol["text-optional"])}),Lc={paint:new $i({"icon-opacity":new Or(Se.paint_symbol["icon-opacity"]),"icon-color":new Or(Se.paint_symbol["icon-color"]),"icon-halo-color":new Or(Se.paint_symbol["icon-halo-color"]),"icon-halo-width":new Or(Se.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Or(Se.paint_symbol["icon-halo-blur"]),"icon-translate":new Mr(Se.paint_symbol["icon-translate"]),"icon-translate-anchor":new Mr(Se.paint_symbol["icon-translate-anchor"]),"text-opacity":new Or(Se.paint_symbol["text-opacity"]),"text-color":new Or(Se.paint_symbol["text-color"],{runtimeType:Ot,getOverride:function(M){return M.textColor},hasOverride:function(M){return!!M.textColor}}),"text-halo-color":new Or(Se.paint_symbol["text-halo-color"]),"text-halo-width":new Or(Se.paint_symbol["text-halo-width"]),"text-halo-blur":new Or(Se.paint_symbol["text-halo-blur"]),"text-translate":new Mr(Se.paint_symbol["text-translate"]),"text-translate-anchor":new Mr(Se.paint_symbol["text-translate-anchor"])}),layout:Vp},jl=function(M){this.type=M.property.overrides?M.property.overrides.runtimeType:ht,this.defaultValue=M};jl.prototype.evaluate=function(M){if(M.formattedSection){var O=this.defaultValue.property.overrides;if(O&&O.hasOverride(M.formattedSection))return O.getOverride(M.formattedSection)}return M.feature&&M.featureState?this.defaultValue.evaluate(M.feature,M.featureState):this.defaultValue.property.specification.default},jl.prototype.eachChild=function(M){this.defaultValue.isConstant()||M(this.defaultValue.value._styleExpression.expression)},jl.prototype.outputDefined=function(){return!1},jl.prototype.serialize=function(){return null},_r("FormatSectionOverride",jl,{omit:["defaultValue"]});var Hp=function(M){function O(Z){M.call(this,Z,Lc)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.recalculate=function(Z,ae){if(M.prototype.recalculate.call(this,Z,ae),"auto"===this.layout.get("icon-rotation-alignment")&&(this.layout._values["icon-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-rotation-alignment")&&(this.layout._values["text-rotation-alignment"]="point"!==this.layout.get("symbol-placement")?"map":"viewport"),"auto"===this.layout.get("text-pitch-alignment")&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),"auto"===this.layout.get("icon-pitch-alignment")&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),"point"===this.layout.get("symbol-placement")){var be=this.layout.get("text-writing-mode");if(be){for(var Ee=[],je=0,Qe=be;je<Qe.length;je+=1){var lt=Qe[je];Ee.indexOf(lt)<0&&Ee.push(lt)}this.layout._values["text-writing-mode"]=Ee}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()},O.prototype.getValueAndResolveTokens=function(Z,ae,be,Ee){var lt,je=this.layout.get(Z).evaluate(ae,{},be,Ee),Qe=this._unevaluatedLayout._values[Z];return Qe.isDataDriven()||Jo(Qe.value)||!je?je:(lt=ae.properties,je.replace(/{([^{}]+)}/g,function(Mt,Bt){return Bt in lt?String(lt[Bt]):""}))},O.prototype.createBucket=function(Z){return new di(Z)},O.prototype.queryRadius=function(){return 0},O.prototype.queryIntersectsFeature=function(){return!1},O.prototype._setPaintOverrides=function(){for(var Z=0,ae=Lc.paint.overridableProperties;Z<ae.length;Z+=1){var be=ae[Z];if(O.hasPaintOverride(this.layout,be)){var Ee,je=this.paint.get(be),Qe=new jl(je),lt=new cs(Qe,je.property.specification);Ee="constant"===je.value.kind||"source"===je.value.kind?new Io("source",lt):new Ro("composite",lt,je.value.zoomStops,je.value._interpolationType),this.paint._values[be]=new Ki(je.property,Ee,je.parameters)}}},O.prototype._handleOverridablePaintPropertyUpdate=function(Z,ae,be){return!(!this.layout||ae.isDataDriven()||be.isDataDriven())&&O.hasPaintOverride(this.layout,Z)},O.hasPaintOverride=function(Z,ae){var be=Z.get("text-field"),Ee=Lc.paint.properties[ae],je=!1,Qe=function(Mt){for(var Bt=0,qt=Mt;Bt<qt.length;Bt+=1)if(Ee.overrides&&Ee.overrides.hasOverride(qt[Bt]))return void(je=!0)};if("constant"===be.value.kind&&be.value.value instanceof Rn)Qe(be.value.value.sections);else if("source"===be.value.kind){var lt=function(Mt){je||(Mt instanceof fr&&$n(Mt.value)===Gt?Qe(Mt.value.sections):Mt instanceof Zt?Qe(Mt.sections):Mt.eachChild(lt))},_t=be.value;_t._styleExpression&&lt(_t._styleExpression.expression)}return je},O}(fa),qp={paint:new $i({"background-color":new Mr(Se.paint_background["background-color"]),"background-pattern":new fo(Se.paint_background["background-pattern"]),"background-opacity":new Mr(Se.paint_background["background-opacity"])})},Gp=function(M){function O(Z){M.call(this,Z,qp)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O}(fa),Zp={paint:new $i({"raster-opacity":new Mr(Se.paint_raster["raster-opacity"]),"raster-hue-rotate":new Mr(Se.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new Mr(Se.paint_raster["raster-brightness-min"]),"raster-brightness-max":new Mr(Se.paint_raster["raster-brightness-max"]),"raster-saturation":new Mr(Se.paint_raster["raster-saturation"]),"raster-contrast":new Mr(Se.paint_raster["raster-contrast"]),"raster-resampling":new Mr(Se.paint_raster["raster-resampling"]),"raster-fade-duration":new Mr(Se.paint_raster["raster-fade-duration"])})},Wp=function(M){function O(Z){M.call(this,Z,Zp)}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O}(fa),Yp=function(M){function O(Z){M.call(this,Z,{}),this.implementation=Z}return M&&(O.__proto__=M),(O.prototype=Object.create(M&&M.prototype)).constructor=O,O.prototype.is3D=function(){return"3d"===this.implementation.renderingMode},O.prototype.hasOffscreenPass=function(){return void 0!==this.implementation.prerender},O.prototype.recalculate=function(){},O.prototype.updateTransitions=function(){},O.prototype.hasTransition=function(){},O.prototype.serialize=function(){},O.prototype.onAdd=function(Z){this.implementation.onAdd&&this.implementation.onAdd(Z,Z.painter.context.gl)},O.prototype.onRemove=function(Z){this.implementation.onRemove&&this.implementation.onRemove(Z,Z.painter.context.gl)},O}(fa),Xp={circle:Rh,heatmap:Dh,hillshade:Bh,fill:ep,"fill-extrusion":lp,line:pp,symbol:Hp,background:Gp,raster:Wp},Vf=self.HTMLImageElement,Hf=self.HTMLCanvasElement,qf=self.HTMLVideoElement,Gf=self.ImageData,Uu=self.ImageBitmap,_l=function(M,O,Z,ae){this.context=M,this.format=Z,this.texture=M.gl.createTexture(),this.update(O,ae)};_l.prototype.update=function(M,O,Z){var ae=M.width,be=M.height,Ee=!(this.size&&this.size[0]===ae&&this.size[1]===be||Z),je=this.context,Qe=je.gl;if(this.useMipmap=!(!O||!O.useMipmap),Qe.bindTexture(Qe.TEXTURE_2D,this.texture),je.pixelStoreUnpackFlipY.set(!1),je.pixelStoreUnpack.set(1),je.pixelStoreUnpackPremultiplyAlpha.set(this.format===Qe.RGBA&&(!O||!1!==O.premultiply)),Ee)this.size=[ae,be],M instanceof Vf||M instanceof Hf||M instanceof qf||M instanceof Gf||Uu&&M instanceof Uu?Qe.texImage2D(Qe.TEXTURE_2D,0,this.format,this.format,Qe.UNSIGNED_BYTE,M):Qe.texImage2D(Qe.TEXTURE_2D,0,this.format,ae,be,0,this.format,Qe.UNSIGNED_BYTE,M.data);else{var lt=Z||{x:0,y:0},_t=lt.x,Mt=lt.y;M instanceof Vf||M instanceof Hf||M instanceof qf||M instanceof Gf||Uu&&M instanceof Uu?Qe.texSubImage2D(Qe.TEXTURE_2D,0,_t,Mt,Qe.RGBA,Qe.UNSIGNED_BYTE,M):Qe.texSubImage2D(Qe.TEXTURE_2D,0,_t,Mt,ae,be,Qe.RGBA,Qe.UNSIGNED_BYTE,M.data)}this.useMipmap&&this.isSizePowerOfTwo()&&Qe.generateMipmap(Qe.TEXTURE_2D)},_l.prototype.bind=function(M,O,Z){var ae=this.context.gl;ae.bindTexture(ae.TEXTURE_2D,this.texture),Z!==ae.LINEAR_MIPMAP_NEAREST||this.isSizePowerOfTwo()||(Z=ae.LINEAR),M!==this.filter&&(ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_MAG_FILTER,M),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_MIN_FILTER,Z||M),this.filter=M),O!==this.wrap&&(ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_WRAP_S,O),ae.texParameteri(ae.TEXTURE_2D,ae.TEXTURE_WRAP_T,O),this.wrap=O)},_l.prototype.isSizePowerOfTwo=function(){return this.size[0]===this.size[1]&&Math.log(this.size[0])/Math.LN2%1==0},_l.prototype.destroy=function(){this.context.gl.deleteTexture(this.texture),this.texture=null};var Cc=function(M){var O=this;this._callback=M,this._triggered=!1,typeof MessageChannel<"u"&&(this._channel=new MessageChannel,this._channel.port2.onmessage=function(){O._triggered=!1,O._callback()})};Cc.prototype.trigger=function(){var M=this;this._triggered||(this._triggered=!0,this._channel?this._channel.port1.postMessage(!0):setTimeout(function(){M._triggered=!1,M._callback()},0))},Cc.prototype.remove=function(){delete this._channel,this._callback=function(){}};var Ul=function(M,O,Z){this.target=M,this.parent=O,this.mapId=Z,this.callbacks={},this.tasks={},this.taskQueue=[],this.cancelCallbacks={},g(["receive","process"],this),this.invoker=new Cc(this.process),this.target.addEventListener("message",this.receive,!1),this.globalScope=L()?M:self};function Zf(M,O,Z){var ae=2*Math.PI*6378137/256/Math.pow(2,Z);return[M*ae-2*Math.PI*6378137/2,O*ae-2*Math.PI*6378137/2]}Ul.prototype.send=function(M,O,Z,ae,be){var Ee=this;void 0===be&&(be=!1);var je=Math.round(1e18*Math.random()).toString(36).substring(0,10);Z&&(this.callbacks[je]=Z);var Qe=I(this.globalScope)?void 0:[];return this.target.postMessage({id:je,type:M,hasCallback:!!Z,targetMapId:ae,mustQueue:be,sourceMapId:this.mapId,data:Qo(O,Qe)},Qe),{cancel:function(){Z&&delete Ee.callbacks[je],Ee.target.postMessage({id:je,type:"<cancel>",targetMapId:ae,sourceMapId:Ee.mapId})}}},Ul.prototype.receive=function(M){var O=M.data,Z=O.id;if(Z&&(!O.targetMapId||this.mapId===O.targetMapId))if("<cancel>"===O.type){delete this.tasks[Z];var ae=this.cancelCallbacks[Z];delete this.cancelCallbacks[Z],ae&&ae()}else L()||O.mustQueue?(this.tasks[Z]=O,this.taskQueue.push(Z),this.invoker.trigger()):this.processTask(Z,O)},Ul.prototype.process=function(){if(this.taskQueue.length){var M=this.taskQueue.shift(),O=this.tasks[M];delete this.tasks[M],this.taskQueue.length&&this.invoker.trigger(),O&&this.processTask(M,O)}},Ul.prototype.processTask=function(M,O){var Z=this;if("<response>"===O.type){var ae=this.callbacks[M];delete this.callbacks[M],ae&&(O.error?ae(es(O.error)):ae(null,es(O.data)))}else{var be=!1,Ee=I(this.globalScope)?void 0:[],je=O.hasCallback?function(Mt,Bt){be=!0,delete Z.cancelCallbacks[M],Z.target.postMessage({id:M,type:"<response>",sourceMapId:Z.mapId,error:Mt?Qo(Mt):null,data:Qo(Bt,Ee)},Ee)}:function(Mt){be=!0},Qe=null,lt=es(O.data);if(this.parent[O.type])Qe=this.parent[O.type](O.sourceMapId,lt,je);else if(this.parent.getWorkerSource){var _t=O.type.split(".");Qe=this.parent.getWorkerSource(O.sourceMapId,_t[0],lt.source)[_t[1]](lt,je)}else je(new Error("Could not find function "+O.type));!be&&Qe&&Qe.cancel&&(this.cancelCallbacks[M]=Qe.cancel)}},Ul.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};var ta=function(M,O){M&&(O?this.setSouthWest(M).setNorthEast(O):4===M.length?this.setSouthWest([M[0],M[1]]).setNorthEast([M[2],M[3]]):this.setSouthWest(M[0]).setNorthEast(M[1]))};ta.prototype.setNorthEast=function(M){return this._ne=M instanceof Ei?new Ei(M.lng,M.lat):Ei.convert(M),this},ta.prototype.setSouthWest=function(M){return this._sw=M instanceof Ei?new Ei(M.lng,M.lat):Ei.convert(M),this},ta.prototype.extend=function(M){var O,Z,ae=this._sw,be=this._ne;if(M instanceof Ei)O=M,Z=M;else{if(!(M instanceof ta))return Array.isArray(M)?4===M.length||M.every(Array.isArray)?this.extend(ta.convert(M)):this.extend(Ei.convert(M)):this;if(Z=M._ne,!(O=M._sw)||!Z)return this}return ae||be?(ae.lng=Math.min(O.lng,ae.lng),ae.lat=Math.min(O.lat,ae.lat),be.lng=Math.max(Z.lng,be.lng),be.lat=Math.max(Z.lat,be.lat)):(this._sw=new Ei(O.lng,O.lat),this._ne=new Ei(Z.lng,Z.lat)),this},ta.prototype.getCenter=function(){return new Ei((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},ta.prototype.getSouthWest=function(){return this._sw},ta.prototype.getNorthEast=function(){return this._ne},ta.prototype.getNorthWest=function(){return new Ei(this.getWest(),this.getNorth())},ta.prototype.getSouthEast=function(){return new Ei(this.getEast(),this.getSouth())},ta.prototype.getWest=function(){return this._sw.lng},ta.prototype.getSouth=function(){return this._sw.lat},ta.prototype.getEast=function(){return this._ne.lng},ta.prototype.getNorth=function(){return this._ne.lat},ta.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},ta.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},ta.prototype.isEmpty=function(){return!(this._sw&&this._ne)},ta.prototype.contains=function(M){var O=Ei.convert(M),Z=O.lng,ae=O.lat,Ee=this._sw.lng<=Z&&Z<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ee=this._sw.lng>=Z&&Z>=this._ne.lng),this._sw.lat<=ae&&ae<=this._ne.lat&&Ee},ta.convert=function(M){return!M||M instanceof ta?M:new ta(M)};var Wf=6371008.8,Ei=function(M,O){if(isNaN(M)||isNaN(O))throw new Error("Invalid LngLat object: ("+M+", "+O+")");if(this.lng=+M,this.lat=+O,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};Ei.prototype.wrap=function(){return new Ei(a(this.lng,-180,180),this.lat)},Ei.prototype.toArray=function(){return[this.lng,this.lat]},Ei.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},Ei.prototype.distanceTo=function(M){var O=Math.PI/180,Z=this.lat*O,ae=M.lat*O,be=Math.sin(Z)*Math.sin(ae)+Math.cos(Z)*Math.cos(ae)*Math.cos((M.lng-this.lng)*O);return Wf*Math.acos(Math.min(be,1))},Ei.prototype.toBounds=function(M){void 0===M&&(M=0);var O=360*M/40075017,Z=O/Math.cos(Math.PI/180*this.lat);return new ta(new Ei(this.lng-Z,this.lat-O),new Ei(this.lng+Z,this.lat+O))},Ei.convert=function(M){if(M instanceof Ei)return M;if(Array.isArray(M)&&(2===M.length||3===M.length))return new Ei(Number(M[0]),Number(M[1]));if(!Array.isArray(M)&&"object"==typeof M&&null!==M)return new Ei(Number("lng"in M?M.lng:M.lon),Number(M.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, an object {lon: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]")};var Yf=2*Math.PI*Wf;function Xf(M){return Yf*Math.cos(M*Math.PI/180)}function Jf(M){return(180+M)/360}function Kf(M){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M*Math.PI/360)))/360}function $f(M,O){return M/Xf(O)}function Pc(M){return 360/Math.PI*Math.atan(Math.exp((180-360*M)*Math.PI/180))-90}var wl=function(M,O,Z){void 0===Z&&(Z=0),this.x=+M,this.y=+O,this.z=+Z};wl.fromLngLat=function(M,O){void 0===O&&(O=0);var Z=Ei.convert(M);return new wl(Jf(Z.lng),Kf(Z.lat),$f(O,Z.lat))},wl.prototype.toLngLat=function(){return new Ei(360*this.x-180,Pc(this.y))},wl.prototype.toAltitude=function(){return this.z*Xf(Pc(this.y))},wl.prototype.meterInMercatorCoordinateUnits=function(){return 1/Yf*(M=Pc(this.y),1/Math.cos(M*Math.PI/180));var M};var Tl=function(M,O,Z){this.z=M,this.x=O,this.y=Z,this.key=su(0,M,M,O,Z)};Tl.prototype.equals=function(M){return this.z===M.z&&this.x===M.x&&this.y===M.y},Tl.prototype.url=function(M,O){var Z,ae,be,Ee,je,Qe=(ae=this.y,be=this.z,Ee=Zf(256*(Z=this.x),256*(ae=Math.pow(2,be)-ae-1),be),je=Zf(256*(Z+1),256*(ae+1),be),Ee[0]+","+Ee[1]+","+je[0]+","+je[1]),lt=function(_t,Mt,Bt){for(var qt,Vt="",rn=_t;rn>0;rn--)Vt+=(Mt&(qt=1<<rn-1)?1:0)+(Bt&qt?2:0);return Vt}(this.z,this.x,this.y);return M[(this.x+this.y)%M.length].replace("{prefix}",(this.x%16).toString(16)+(this.y%16).toString(16)).replace("{z}",String(this.z)).replace("{x}",String(this.x)).replace("{y}",String("tms"===O?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",lt).replace("{bbox-epsg-3857}",Qe)},Tl.prototype.getTilePoint=function(M){var O=Math.pow(2,this.z);return new t((M.x*O-this.x)*Br,(M.y*O-this.y)*Br)},Tl.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Qf=function(M,O){this.wrap=M,this.canonical=O,this.key=su(M,O.z,O.z,O.x,O.y)},na=function(M,O,Z,ae,be){this.overscaledZ=M,this.wrap=O,this.canonical=new Tl(Z,+ae,+be),this.key=su(O,M,Z,ae,be)};function su(M,O,Z,ae,be){(M*=2)<0&&(M=-1*M-1);var Ee=1<<Z;return(Ee*Ee*M+Ee*be+ae).toString(36)+Z.toString(36)+O.toString(36)}na.prototype.equals=function(M){return this.overscaledZ===M.overscaledZ&&this.wrap===M.wrap&&this.canonical.equals(M.canonical)},na.prototype.scaledTo=function(M){var O=this.canonical.z-M;return M>this.canonical.z?new na(M,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new na(M,this.wrap,M,this.canonical.x>>O,this.canonical.y>>O)},na.prototype.calculateScaledKey=function(M,O){var Z=this.canonical.z-M;return M>this.canonical.z?su(this.wrap*+O,M,this.canonical.z,this.canonical.x,this.canonical.y):su(this.wrap*+O,M,M,this.canonical.x>>Z,this.canonical.y>>Z)},na.prototype.isChildOf=function(M){if(M.wrap!==this.wrap)return!1;var O=this.canonical.z-M.canonical.z;return 0===M.overscaledZ||M.overscaledZ<this.overscaledZ&&M.canonical.x===this.canonical.x>>O&&M.canonical.y===this.canonical.y>>O},na.prototype.children=function(M){if(this.overscaledZ>=M)return[new na(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var O=this.canonical.z+1,Z=2*this.canonical.x,ae=2*this.canonical.y;return[new na(O,this.wrap,O,Z,ae),new na(O,this.wrap,O,Z+1,ae),new na(O,this.wrap,O,Z,ae+1),new na(O,this.wrap,O,Z+1,ae+1)]},na.prototype.isLessThan=function(M){return this.wrap<M.wrap||!(this.wrap>M.wrap)&&(this.overscaledZ<M.overscaledZ||!(this.overscaledZ>M.overscaledZ)&&(this.canonical.x<M.canonical.x||!(this.canonical.x>M.canonical.x)&&this.canonical.y<M.canonical.y))},na.prototype.wrapped=function(){return new na(this.overscaledZ,0,this.canonical.z,this.canonical.x,this.canonical.y)},na.prototype.unwrapTo=function(M){return new na(this.overscaledZ,M,this.canonical.z,this.canonical.x,this.canonical.y)},na.prototype.overscaleFactor=function(){return Math.pow(2,this.overscaledZ-this.canonical.z)},na.prototype.toUnwrapped=function(){return new Qf(this.wrap,this.canonical)},na.prototype.toString=function(){return this.overscaledZ+"/"+this.canonical.x+"/"+this.canonical.y},na.prototype.getTilePoint=function(M){return this.canonical.getTilePoint(new wl(M.x-this.wrap,M.y))},_r("CanonicalTileID",Tl),_r("OverscaledTileID",na,{omit:["posMatrix"]});var el=function(M,O,Z){if(this.uid=M,O.height!==O.width)throw new RangeError("DEM tiles must be square");if(Z&&"mapbox"!==Z&&"terrarium"!==Z)return S('"'+Z+'" is not a valid encoding type. Valid types include "mapbox" and "terrarium".');this.stride=O.height;var ae=this.dim=O.height-2;this.data=new Uint32Array(O.data.buffer),this.encoding=Z||"mapbox";for(var be=0;be<ae;be++)this.data[this._idx(-1,be)]=this.data[this._idx(0,be)],this.data[this._idx(ae,be)]=this.data[this._idx(ae-1,be)],this.data[this._idx(be,-1)]=this.data[this._idx(be,0)],this.data[this._idx(be,ae)]=this.data[this._idx(be,ae-1)];this.data[this._idx(-1,-1)]=this.data[this._idx(0,0)],this.data[this._idx(ae,-1)]=this.data[this._idx(ae-1,0)],this.data[this._idx(-1,ae)]=this.data[this._idx(0,ae-1)],this.data[this._idx(ae,ae)]=this.data[this._idx(ae-1,ae-1)]};el.prototype.get=function(M,O){var Z=new Uint8Array(this.data.buffer),ae=4*this._idx(M,O);return("terrarium"===this.encoding?this._unpackTerrarium:this._unpackMapbox)(Z[ae],Z[ae+1],Z[ae+2])},el.prototype.getUnpackVector=function(){return"terrarium"===this.encoding?[256,1,.00390625,32768]:[6553.6,25.6,.1,1e4]},el.prototype._idx=function(M,O){if(M<-1||M>=this.dim+1||O<-1||O>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(O+1)*this.stride+(M+1)},el.prototype._unpackMapbox=function(M,O,Z){return(256*M*256+256*O+Z)/10-1e4},el.prototype._unpackTerrarium=function(M,O,Z){return 256*M+O+Z/256-32768},el.prototype.getPixels=function(){return new Qa({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},el.prototype.backfillBorder=function(M,O,Z){if(this.dim!==M.dim)throw new Error("dem dimension mismatch");var ae=O*this.dim,be=O*this.dim+this.dim,Ee=Z*this.dim,je=Z*this.dim+this.dim;switch(O){case-1:ae=be-1;break;case 1:be=ae+1}switch(Z){case-1:Ee=je-1;break;case 1:je=Ee+1}for(var Qe=-O*this.dim,lt=-Z*this.dim,_t=Ee;_t<je;_t++)for(var Mt=ae;Mt<be;Mt++)this.data[this._idx(Mt,_t)]=M.data[this._idx(Mt+Qe,_t+lt)]},_r("DEMData",el);var Vu=function(M){this._stringToNumber={},this._numberToString=[];for(var O=0;O<M.length;O++){var Z=M[O];this._stringToNumber[Z]=O,this._numberToString[O]=Z}};Vu.prototype.encode=function(M){return this._stringToNumber[M]},Vu.prototype.decode=function(M){return this._numberToString[M]};var Hu=function(M,O,Z,ae,be){this.type="Feature",this._vectorTileFeature=M,M._z=O,M._x=Z,M._y=ae,this.properties=M.properties,this.id=be},Oc={geometry:{configurable:!0}};Oc.geometry.get=function(){return void 0===this._geometry&&(this._geometry=this._vectorTileFeature.toGeoJSON(this._vectorTileFeature._x,this._vectorTileFeature._y,this._vectorTileFeature._z).geometry),this._geometry},Oc.geometry.set=function(M){this._geometry=M},Hu.prototype.toJSON=function(){var M={geometry:this.geometry};for(var O in this)"_geometry"!==O&&"_vectorTileFeature"!==O&&(M[O]=this[O]);return M},Object.defineProperties(Hu.prototype,Oc);var Vl=function(){this.state={},this.stateChanges={},this.deletedStates={}};Vl.prototype.updateState=function(M,O,Z){var ae=String(O);if(this.stateChanges[M]=this.stateChanges[M]||{},this.stateChanges[M][ae]=this.stateChanges[M][ae]||{},c(this.stateChanges[M][ae],Z),null===this.deletedStates[M])for(var be in this.deletedStates[M]={},this.state[M])be!==ae&&(this.deletedStates[M][be]=null);else if(this.deletedStates[M]&&null===this.deletedStates[M][ae])for(var Ee in this.deletedStates[M][ae]={},this.state[M][ae])Z[Ee]||(this.deletedStates[M][ae][Ee]=null);else for(var je in Z)this.deletedStates[M]&&this.deletedStates[M][ae]&&null===this.deletedStates[M][ae][je]&&delete this.deletedStates[M][ae][je]},Vl.prototype.removeFeatureState=function(M,O,Z){if(null!==this.deletedStates[M]){var ae=String(O);if(this.deletedStates[M]=this.deletedStates[M]||{},Z&&void 0!==O)null!==this.deletedStates[M][ae]&&(this.deletedStates[M][ae]=this.deletedStates[M][ae]||{},this.deletedStates[M][ae][Z]=null);else if(void 0!==O)if(this.stateChanges[M]&&this.stateChanges[M][ae])for(Z in this.deletedStates[M][ae]={},this.stateChanges[M][ae])this.deletedStates[M][ae][Z]=null;else this.deletedStates[M][ae]=null;else this.deletedStates[M]=null}},Vl.prototype.getState=function(M,O){var Z=String(O),Ee=c({},(this.state[M]||{})[Z],(this.stateChanges[M]||{})[Z]);if(null===this.deletedStates[M])return{};if(this.deletedStates[M]){var je=this.deletedStates[M][O];if(null===je)return{};for(var Qe in je)delete Ee[Qe]}return Ee},Vl.prototype.initializeTileState=function(M,O){M.setFeatureState(this.state,O)},Vl.prototype.coalesceChanges=function(M,O){var Z={};for(var ae in this.stateChanges){this.state[ae]=this.state[ae]||{};var be={};for(var Ee in this.stateChanges[ae])this.state[ae][Ee]||(this.state[ae][Ee]={}),c(this.state[ae][Ee],this.stateChanges[ae][Ee]),be[Ee]=this.state[ae][Ee];Z[ae]=be}for(var je in this.deletedStates){this.state[je]=this.state[je]||{};var Qe={};if(null===this.deletedStates[je])for(var lt in this.state[je])Qe[lt]={},this.state[je][lt]={};else for(var _t in this.deletedStates[je]){if(null===this.deletedStates[je][_t])this.state[je][_t]={};else for(var Mt=0,Bt=Object.keys(this.deletedStates[je][_t]);Mt<Bt.length;Mt+=1)delete this.state[je][_t][Bt[Mt]];Qe[_t]=this.state[je][_t]}Z[je]=Z[je]||{},c(Z[je],Qe)}if(this.stateChanges={},this.deletedStates={},0!==Object.keys(Z).length)for(var Vt in M)M[Vt].setFeatureState(Z,O)};var tl=function(M,O){this.tileID=M,this.x=M.canonical.x,this.y=M.canonical.y,this.z=M.canonical.z,this.grid=new Di(Br,16,0),this.grid3D=new Di(Br,16,0),this.featureIndexArray=new ln,this.promoteId=O};function eh(M,O,Z,ae,be){return h(M,function(Ee,je){var Qe=O instanceof Ba?O.get(je):null;return Qe&&Qe.evaluate?Qe.evaluate(Z,ae,be):Qe})}function th(M){for(var O=1/0,Z=1/0,ae=-1/0,be=-1/0,Ee=0,je=M;Ee<je.length;Ee+=1){var Qe=je[Ee];O=Math.min(O,Qe.x),Z=Math.min(Z,Qe.y),ae=Math.max(ae,Qe.x),be=Math.max(be,Qe.y)}return{minX:O,minY:Z,maxX:ae,maxY:be}}function Jp(M,O){return O-M}tl.prototype.insert=function(M,O,Z,ae,be,Ee){var je=this.featureIndexArray.length;this.featureIndexArray.emplaceBack(Z,ae,be);for(var Qe=Ee?this.grid3D:this.grid,lt=0;lt<O.length;lt++){for(var _t=O[lt],Mt=[1/0,1/0,-1/0,-1/0],Bt=0;Bt<_t.length;Bt++){var qt=_t[Bt];Mt[0]=Math.min(Mt[0],qt.x),Mt[1]=Math.min(Mt[1],qt.y),Mt[2]=Math.max(Mt[2],qt.x),Mt[3]=Math.max(Mt[3],qt.y)}Mt[0]<Br&&Mt[1]<Br&&Mt[2]>=0&&Mt[3]>=0&&Qe.insert(je,Mt[0],Mt[1],Mt[2],Mt[3])}},tl.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Ol.VectorTile(new Cu(this.rawTileData)).layers,this.sourceLayerCoder=new Vu(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},tl.prototype.query=function(M,O,Z,ae){var be=this;this.loadVTLayers();for(var Ee=M.params||{},je=Br/M.tileSize/M.scale,Qe=ms(Ee.filter),lt=M.queryGeometry,_t=M.queryPadding*je,Mt=th(lt),Bt=this.grid.query(Mt.minX-_t,Mt.minY-_t,Mt.maxX+_t,Mt.maxY+_t),qt=th(M.cameraQueryGeometry),Vt=0,rn=this.grid3D.query(qt.minX-_t,qt.minY-_t,qt.maxX+_t,qt.maxY+_t,function(Yn,Qn,tr,xr){return function(pr,Tr,Er,jr,Pr){for(var Nr=0,Ir=pr;Nr<Ir.length;Nr+=1){var Cr=Ir[Nr];if(Tr<=Cr.x&&Er<=Cr.y&&jr>=Cr.x&&Pr>=Cr.y)return!0}var Jr=[new t(Tr,Er),new t(Tr,Pr),new t(jr,Pr),new t(jr,Er)];if(pr.length>2)for(var qr=0,bi=Jr;qr<bi.length;qr+=1)if(cl(pr,bi[qr]))return!0;for(var Fr=0;Fr<pr.length-1;Fr++)if(uc(pr[Fr],pr[Fr+1],Jr))return!0;return!1}(M.cameraQueryGeometry,Yn-_t,Qn-_t,tr+_t,xr+_t)});Vt<rn.length;Vt+=1)Bt.push(rn[Vt]);Bt.sort(Jp);for(var In,On={},jn=function(Yn){var Qn=Bt[Yn];if(Qn!==In){In=Qn;var tr=be.featureIndexArray.get(Qn),xr=null;be.loadMatchingFeature(On,tr.bucketIndex,tr.sourceLayerIndex,tr.featureIndex,Qe,Ee.layers,Ee.availableImages,O,Z,ae,function(pr,Tr,Er){return xr||(xr=ki(pr)),Tr.queryIntersectsFeature(lt,pr,Er,xr,be.z,M.transform,je,M.pixelPosMatrix)})}},Vn=0;Vn<Bt.length;Vn++)jn(Vn);return On},tl.prototype.loadMatchingFeature=function(M,O,Z,ae,be,Ee,je,Qe,lt,_t,Mt){var Bt=this.bucketLayerIDs[O];if(!Ee||function(xr,pr){for(var Tr=0;Tr<xr.length;Tr++)if(pr.indexOf(xr[Tr])>=0)return!0;return!1}(Ee,Bt)){var qt=this.sourceLayerCoder.decode(Z),Vt=this.vtLayers[qt].feature(ae);if(be.filter(new ni(this.tileID.overscaledZ),Vt))for(var rn=this.getId(Vt,qt),xn=0;xn<Bt.length;xn++){var In=Bt[xn];if(!(Ee&&Ee.indexOf(In)<0)){var On=Qe[In];if(On){var jn={};void 0!==rn&&_t&&(jn=_t.getState(On.sourceLayer||"_geojsonTileLayer",rn));var Vn=lt[In];Vn.paint=eh(Vn.paint,On.paint,Vt,jn,je),Vn.layout=eh(Vn.layout,On.layout,Vt,jn,je);var Yn=!Mt||Mt(Vt,On,jn);if(Yn){var Qn=new Hu(Vt,this.z,this.x,this.y,rn);Qn.layer=Vn;var tr=M[In];void 0===tr&&(tr=M[In]=[]),tr.push({featureIndex:ae,feature:Qn,intersectionZ:Yn})}}}}}},tl.prototype.lookupSymbolFeatures=function(M,O,Z,ae,be,Ee,je,Qe){var lt={};this.loadVTLayers();for(var _t=ms(be),Mt=0,Bt=M;Mt<Bt.length;Mt+=1)this.loadMatchingFeature(lt,Z,ae,Bt[Mt],_t,Ee,je,Qe,O);return lt},tl.prototype.hasLayer=function(M){for(var O=0,Z=this.bucketLayerIDs;O<Z.length;O+=1)for(var ae=0,be=Z[O];ae<be.length;ae+=1)if(M===be[ae])return!0;return!1},tl.prototype.getId=function(M,O){var Z=M.id;return this.promoteId&&"boolean"==typeof(Z=M.properties["string"==typeof this.promoteId?this.promoteId:this.promoteId[O]])&&(Z=Number(Z)),Z},_r("FeatureIndex",tl,{omit:["rawTileData","sourceLayerCoder"]});var pa=function(M,O){this.tileID=M,this.uid=f(),this.uses=0,this.tileSize=O,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.expiredRequestCount=0,this.state="loading"};pa.prototype.registerFadeDuration=function(M){var O=M+this.timeAdded;O<G.now()||this.fadeEndTime&&O<this.fadeEndTime||(this.fadeEndTime=O)},pa.prototype.wasRequested=function(){return"errored"===this.state||"loaded"===this.state||"reloading"===this.state},pa.prototype.loadVectorData=function(M,O,Z){if(this.hasData()&&this.unloadVectorData(),this.state="loaded",M){for(var ae in M.featureIndex&&(this.latestFeatureIndex=M.featureIndex,M.rawTileData?(this.latestRawTileData=M.rawTileData,this.latestFeatureIndex.rawTileData=M.rawTileData):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData)),this.collisionBoxArray=M.collisionBoxArray,this.buckets=function(_t,Mt){var Bt={};if(!Mt)return Bt;for(var qt=function(){var xn=rn[Vt],In=xn.layerIds.map(function(Yn){return Mt.getLayer(Yn)}).filter(Boolean);if(0!==In.length){xn.layers=In,xn.stateDependentLayerIds&&(xn.stateDependentLayers=xn.stateDependentLayerIds.map(function(Yn){return In.filter(function(Qn){return Qn.id===Yn})[0]}));for(var On=0,jn=In;On<jn.length;On+=1)Bt[jn[On].id]=xn}},Vt=0,rn=_t;Vt<rn.length;Vt+=1)qt();return Bt}(M.buckets,O.style),this.hasSymbolBuckets=!1,this.buckets){var be=this.buckets[ae];if(be instanceof di){if(this.hasSymbolBuckets=!0,!Z)break;be.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(var Ee in this.buckets){var je=this.buckets[Ee];if(je instanceof di&&je.hasRTLText){this.hasRTLText=!0,ua.isLoading()||ua.isLoaded()||"deferred"!==Fa()||Ka();break}}for(var Qe in this.queryPadding=0,this.buckets){var lt=this.buckets[Qe];this.queryPadding=Math.max(this.queryPadding,O.style.getLayer(Qe).queryRadius(lt))}M.imageAtlas&&(this.imageAtlas=M.imageAtlas),M.glyphAtlasImage&&(this.glyphAtlasImage=M.glyphAtlasImage)}else this.collisionBoxArray=new Ze},pa.prototype.unloadVectorData=function(){for(var M in this.buckets)this.buckets[M].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.imageAtlas&&(this.imageAtlas=null),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.latestFeatureIndex=null,this.state="unloaded"},pa.prototype.getBucket=function(M){return this.buckets[M.id]},pa.prototype.upload=function(M){for(var O in this.buckets){var Z=this.buckets[O];Z.uploadPending()&&Z.upload(M)}var ae=M.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new _l(M,this.imageAtlas.image,ae.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new _l(M,this.glyphAtlasImage,ae.ALPHA),this.glyphAtlasImage=null)},pa.prototype.prepare=function(M){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(M,this.imageAtlasTexture)},pa.prototype.queryRenderedFeatures=function(M,O,Z,ae,be,Ee,je,Qe,lt,_t){return this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData?this.latestFeatureIndex.query({queryGeometry:ae,cameraQueryGeometry:be,scale:Ee,tileSize:this.tileSize,pixelPosMatrix:_t,transform:Qe,params:je,queryPadding:this.queryPadding*lt},M,O,Z):{}},pa.prototype.querySourceFeatures=function(M,O){var Z=this.latestFeatureIndex;if(Z&&Z.rawTileData){var ae=Z.loadVTLayers(),be=O?O.sourceLayer:"",Ee=ae._geojsonTileLayer||ae[be];if(Ee)for(var je=ms(O&&O.filter),Qe=this.tileID.canonical,lt=Qe.z,_t=Qe.x,Mt=Qe.y,Bt={z:lt,x:_t,y:Mt},qt=0;qt<Ee.length;qt++){var Vt=Ee.feature(qt);if(je.filter(new ni(this.tileID.overscaledZ),Vt)){var rn=Z.getId(Vt,be),xn=new Hu(Vt,lt,_t,Mt,rn);xn.tile=Bt,M.push(xn)}}}},pa.prototype.hasData=function(){return"loaded"===this.state||"reloading"===this.state||"expired"===this.state},pa.prototype.patternsLoaded=function(){return this.imageAtlas&&!!Object.keys(this.imageAtlas.patternPositions).length},pa.prototype.setExpiryData=function(M){var O=this.expirationTime;if(M.cacheControl){var Z=C(M.cacheControl);Z["max-age"]&&(this.expirationTime=Date.now()+1e3*Z["max-age"])}else M.expires&&(this.expirationTime=new Date(M.expires).getTime());if(this.expirationTime){var ae=Date.now(),be=!1;if(this.expirationTime>ae)be=!1;else if(O)if(this.expirationTime<O)be=!0;else{var Ee=this.expirationTime-O;Ee?this.expirationTime=ae+Math.max(Ee,3e4):be=!0}else be=!0;be?(this.expiredRequestCount++,this.state="expired"):this.expiredRequestCount=0}},pa.prototype.getExpiryTimeout=function(){if(this.expirationTime)return this.expiredRequestCount?1e3*(1<<Math.min(this.expiredRequestCount-1,31)):Math.min(this.expirationTime-(new Date).getTime(),Math.pow(2,31)-1)},pa.prototype.setFeatureState=function(M,O){if(this.latestFeatureIndex&&this.latestFeatureIndex.rawTileData&&0!==Object.keys(M).length){var Z=this.latestFeatureIndex.loadVTLayers();for(var ae in this.buckets)if(O.style.hasLayer(ae)){var be=this.buckets[ae],Ee=be.layers[0].sourceLayer||"_geojsonTileLayer",je=Z[Ee],Qe=M[Ee];if(je&&Qe&&0!==Object.keys(Qe).length){be.update(Qe,je,this.imageAtlas&&this.imageAtlas.patternPositions||{});var lt=O&&O.style&&O.style.getLayer(ae);lt&&(this.queryPadding=Math.max(this.queryPadding,lt.queryRadius(be)))}}}},pa.prototype.holdingForFade=function(){return void 0!==this.symbolFadeHoldUntil},pa.prototype.symbolFadeFinished=function(){return!this.symbolFadeHoldUntil||this.symbolFadeHoldUntil<G.now()},pa.prototype.clearFadeHold=function(){this.symbolFadeHoldUntil=void 0},pa.prototype.setHoldDuration=function(M){this.symbolFadeHoldUntil=G.now()+M},pa.prototype.setDependencies=function(M,O){for(var Z={},ae=0,be=O;ae<be.length;ae+=1)Z[be[ae]]=!0;this.dependencies[M]=Z},pa.prototype.hasDependency=function(M,O){for(var Z=0,ae=M;Z<ae.length;Z+=1){var Ee=this.dependencies[ae[Z]];if(Ee)for(var je=0,Qe=O;je<Qe.length;je+=1)if(Ee[Qe[je]])return!0}return!1};var pl=self.performance,nh=function(M){this._marks={start:[M.url,"start"].join("#"),end:[M.url,"end"].join("#"),measure:M.url.toString()},pl.mark(this._marks.start)};nh.prototype.finish=function(){pl.mark(this._marks.end);var M=pl.getEntriesByName(this._marks.measure);return 0===M.length&&(pl.measure(this._marks.measure,this._marks.start,this._marks.end),M=pl.getEntriesByName(this._marks.measure),pl.clearMarks(this._marks.start),pl.clearMarks(this._marks.end),pl.clearMeasures(this._marks.measure)),M},l.Actor=Ul,l.AlphaImage=bl,l.CanonicalTileID=Tl,l.CollisionBoxArray=Ze,l.Color=hn,l.DEMData=el,l.DataConstantProperty=Mr,l.DictionaryCoder=Vu,l.EXTENT=Br,l.ErrorEvent=Ye,l.EvaluationParameters=ni,l.Event=Be,l.Evented=rt,l.FeatureIndex=tl,l.FillBucket=bs,l.FillExtrusionBucket=_s,l.ImageAtlas=au,l.ImagePosition=Ou,l.LineBucket=eo,l.LngLat=Ei,l.LngLatBounds=ta,l.MercatorCoordinate=wl,l.ONE_EM=Ma,l.OverscaledTileID=na,l.Point=t,l.Point$1=t,l.Properties=$i,l.Protobuf=Cu,l.RGBAImage=Qa,l.RequestManager=ie,l.RequestPerformance=nh,l.ResourceType=ot,l.SegmentVector=en,l.SourceFeatureState=Vl,l.StructArrayLayout1ui2=we,l.StructArrayLayout2f1f2i16=pe,l.StructArrayLayout2i4=Xe,l.StructArrayLayout3ui6=Ne,l.StructArrayLayout4i8=$e,l.SymbolBucket=di,l.Texture=_l,l.Tile=pa,l.Transitionable=ca,l.Uniform1f=Hr,l.Uniform1i=Vr,l.Uniform2f=hr,l.Uniform3f=Ar,l.Uniform4f=Dr,l.UniformColor=zr,l.UniformMatrix4f=Zr,l.UnwrappedTileID=Qf,l.ValidationError=ze,l.WritingMode=Eo,l.ZoomHistory=ts,l.add=function(M,O,Z){return M[0]=O[0]+Z[0],M[1]=O[1]+Z[1],M[2]=O[2]+Z[2],M},l.addDynamicAttributes=Ec,l.asyncAll=function(M,O,Z){if(!M.length)return Z(null,[]);var ae=M.length,be=new Array(M.length),Ee=null;M.forEach(function(je,Qe){O(je,function(lt,_t){lt&&(Ee=lt),be[Qe]=_t,0==--ae&&Z(Ee,be)})})},l.bezier=r,l.bindAll=g,l.browser=G,l.cacheEntryPossiblyAdded=function(M){++nt>le&&(M.getActor().send("enforceCacheSizeLimit",Re),nt=0)},l.clamp=i,l.clearTileCache=function(M){var O=self.caches.delete(Ce);M&&O.catch(M).then(function(){return M()})},l.clipLine=Df,l.clone=function(M){var O=new So(16);return O[0]=M[0],O[1]=M[1],O[2]=M[2],O[3]=M[3],O[4]=M[4],O[5]=M[5],O[6]=M[6],O[7]=M[7],O[8]=M[8],O[9]=M[9],O[10]=M[10],O[11]=M[11],O[12]=M[12],O[13]=M[13],O[14]=M[14],O[15]=M[15],O},l.clone$1=w,l.clone$2=function(M){var O=new So(3);return O[0]=M[0],O[1]=M[1],O[2]=M[2],O},l.collisionCircleLayout=vp,l.config=V,l.create=function(){var M=new So(16);return So!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=0,M[12]=0,M[13]=0,M[14]=0),M[0]=1,M[5]=1,M[10]=1,M[15]=1,M},l.create$1=function(){var M=new So(9);return So!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[5]=0,M[6]=0,M[7]=0),M[0]=1,M[4]=1,M[8]=1,M},l.create$2=function(){var M=new So(4);return So!=Float32Array&&(M[1]=0,M[2]=0),M[0]=1,M[3]=1,M},l.createCommonjsModule=T,l.createExpression=fs,l.createLayout=fi,l.createStyleLayer=function(M){return"custom"===M.type?new Yp(M):new Xp[M.type](M)},l.cross=function(M,O,Z){var ae=O[0],be=O[1],Ee=O[2],je=Z[0],Qe=Z[1],lt=Z[2];return M[0]=be*lt-Ee*Qe,M[1]=Ee*je-ae*lt,M[2]=ae*Qe-be*je,M},l.deepEqual=function M(O,Z){if(Array.isArray(O)){if(!Array.isArray(Z)||O.length!==Z.length)return!1;for(var ae=0;ae<O.length;ae++)if(!M(O[ae],Z[ae]))return!1;return!0}if("object"==typeof O&&null!==O&&null!==Z){if("object"!=typeof Z||Object.keys(O).length!==Object.keys(Z).length)return!1;for(var be in O)if(!M(O[be],Z[be]))return!1;return!0}return O===Z},l.dot=function(M,O){return M[0]*O[0]+M[1]*O[1]+M[2]*O[2]},l.dot$1=function(M,O){return M[0]*O[0]+M[1]*O[1]+M[2]*O[2]+M[3]*O[3]},l.ease=n,l.emitValidationErrors=Ia,l.endsWith=y,l.enforceCacheSizeLimit=function(M){ge(),Ae&&Ae.then(function(O){O.keys().then(function(Z){for(var ae=0;ae<Z.length-M;ae++)O.delete(Z[ae])})})},l.evaluateSizeForFeature=Lf,l.evaluateSizeForZoom=Cf,l.evaluateVariableOffset=Nf,l.evented=Aa,l.extend=c,l.featureFilter=ms,l.filterObject=m,l.fromRotation=function(M,O){var Z=Math.sin(O),ae=Math.cos(O);return M[0]=ae,M[1]=Z,M[2]=0,M[3]=-Z,M[4]=ae,M[5]=0,M[6]=0,M[7]=0,M[8]=1,M},l.getAnchorAlignment=kc,l.getAnchorJustification=Sc,l.getArrayBuffer=Lt,l.getImage=Rt,l.getJSON=function(M,O){return wt(c(M,{type:"json"}),O)},l.getRTLTextPluginStatus=Fa,l.getReferrer=kt,l.getVideo=function(M,O){var Z,ae,be=self.document.createElement("video");be.muted=!0,be.onloadstart=function(){O(null,be)};for(var Ee=0;Ee<M.length;Ee++){var je=self.document.createElement("source");Z=M[Ee],ae=void 0,(ae=self.document.createElement("a")).href=Z,ae.protocol===self.document.location.protocol&&ae.host===self.document.location.host||(be.crossOrigin="Anonymous"),je.src=M[Ee],be.appendChild(je)}return{cancel:function(){}}},l.identity=cc,l.invert=function(M,O){var Z=O[0],ae=O[1],be=O[2],Ee=O[3],je=O[4],Qe=O[5],lt=O[6],_t=O[7],Mt=O[8],Bt=O[9],qt=O[10],Vt=O[11],rn=O[12],xn=O[13],In=O[14],On=O[15],jn=Z*Qe-ae*je,Vn=Z*lt-be*je,Yn=Z*_t-Ee*je,Qn=ae*lt-be*Qe,tr=ae*_t-Ee*Qe,xr=be*_t-Ee*lt,pr=Mt*xn-Bt*rn,Tr=Mt*In-qt*rn,Er=Mt*On-Vt*rn,jr=Bt*In-qt*xn,Pr=Bt*On-Vt*xn,Nr=qt*On-Vt*In,Ir=jn*Nr-Vn*Pr+Yn*jr+Qn*Er-tr*Tr+xr*pr;return Ir?(M[0]=(Qe*Nr-lt*Pr+_t*jr)*(Ir=1/Ir),M[1]=(be*Pr-ae*Nr-Ee*jr)*Ir,M[2]=(xn*xr-In*tr+On*Qn)*Ir,M[3]=(qt*tr-Bt*xr-Vt*Qn)*Ir,M[4]=(lt*Er-je*Nr-_t*Tr)*Ir,M[5]=(Z*Nr-be*Er+Ee*Tr)*Ir,M[6]=(In*Yn-rn*xr-On*Vn)*Ir,M[7]=(Mt*xr-qt*Yn+Vt*Vn)*Ir,M[8]=(je*Pr-Qe*Er+_t*pr)*Ir,M[9]=(ae*Er-Z*Pr-Ee*pr)*Ir,M[10]=(rn*tr-xn*Yn+On*jn)*Ir,M[11]=(Bt*Yn-Mt*tr-Vt*jn)*Ir,M[12]=(Qe*Tr-je*jr-lt*pr)*Ir,M[13]=(Z*jr-ae*Tr+be*pr)*Ir,M[14]=(xn*Vn-rn*Qn-In*jn)*Ir,M[15]=(Mt*Qn-Bt*Vn+qt*jn)*Ir,M):null},l.isChar=wr,l.isMapboxURL=oe,l.keysDifference=function(M,O){var Z=[];for(var ae in M)ae in O||Z.push(ae);return Z},l.makeRequest=wt,l.mapObject=h,l.mercatorXfromLng=Jf,l.mercatorYfromLat=Kf,l.mercatorZfromAltitude=$f,l.mul=Ph,l.multiply=Yc,l.mvt=Ol,l.normalize=function(M,O){var Z=O[0],ae=O[1],be=O[2],Ee=Z*Z+ae*ae+be*be;return Ee>0&&(Ee=1/Math.sqrt(Ee)),M[0]=O[0]*Ee,M[1]=O[1]*Ee,M[2]=O[2]*Ee,M},l.number=Sr,l.offscreenCanvasSupported=tt,l.ortho=function(M,O,Z,ae,be,Ee,je){var Qe=1/(O-Z),lt=1/(ae-be),_t=1/(Ee-je);return M[0]=-2*Qe,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=-2*lt,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=2*_t,M[11]=0,M[12]=(O+Z)*Qe,M[13]=(be+ae)*lt,M[14]=(je+Ee)*_t,M[15]=1,M},l.parseGlyphPBF=function(M){return new Cu(M).readFields(Sp,[])},l.pbf=Cu,l.performSymbolLayout=function(M,O,Z,ae,be,Ee,je){M.createArrays(),M.tilePixelRatio=Br/(512*M.overscaling),M.compareText={},M.iconsNeedLinear=!1;var lt=M.layers[0].layout,_t=M.layers[0]._unevaluatedLayout._values,Mt={};if("composite"===M.textSizeData.kind){var Bt=M.textSizeData,Vt=Bt.maxZoom;Mt.compositeTextSizes=[_t["text-size"].possiblyEvaluate(new ni(Bt.minZoom),je),_t["text-size"].possiblyEvaluate(new ni(Vt),je)]}if("composite"===M.iconSizeData.kind){var rn=M.iconSizeData,In=rn.maxZoom;Mt.compositeIconSizes=[_t["icon-size"].possiblyEvaluate(new ni(rn.minZoom),je),_t["icon-size"].possiblyEvaluate(new ni(In),je)]}Mt.layoutTextSize=_t["text-size"].possiblyEvaluate(new ni(M.zoom+1),je),Mt.layoutIconSize=_t["icon-size"].possiblyEvaluate(new ni(M.zoom+1),je),Mt.textMaxSize=_t["text-size"].possiblyEvaluate(new ni(18));for(var On=lt.get("text-line-height")*Ma,jn="map"===lt.get("text-rotation-alignment")&&"point"!==lt.get("symbol-placement"),Vn=lt.get("text-keep-upright"),Yn=lt.get("text-size"),Qn=function(){var pr=xr[tr],Tr=lt.get("text-font").evaluate(pr,{},je).join(","),Er=Yn.evaluate(pr,{},je),jr=Mt.layoutTextSize.evaluate(pr,{},je),Pr=Mt.layoutIconSize.evaluate(pr,{},je),Nr={horizontal:{},vertical:void 0},Ir=pr.text,Cr=[0,0];if(Ir){var Jr=Ir.toString(),qr=lt.get("text-letter-spacing").evaluate(pr,{},je)*Ma,bi=function(Gr){for(var ti=0,Ni=Gr;ti<Ni.length;ti+=1)if(xi=Ni[ti].charCodeAt(0),wr.Arabic(xi)||wr["Arabic Supplement"](xi)||wr["Arabic Extended-A"](xi)||wr["Arabic Presentation Forms-A"](xi)||wr["Arabic Presentation Forms-B"](xi))return!1;var xi;return!0}(Jr)?qr:0,Fr=lt.get("text-anchor").evaluate(pr,{},je),gi=lt.get("text-variable-anchor");if(!gi){var Ti=lt.get("text-radial-offset").evaluate(pr,{},je);Cr=Ti?Nf(Fr,[Ti*Ma,Mc]):lt.get("text-offset").evaluate(pr,{},je).map(function(Gr){return Gr*Ma})}var Ai=jn?"center":lt.get("text-justify").evaluate(pr,{},je),Li=lt.get("symbol-placement"),_i="point"===Li?lt.get("text-max-width").evaluate(pr,{},je)*Ma:0,ra=function(){M.allowVerticalPlacement&&ns(Jr)&&(Nr.vertical=Ru(Ir,O,Z,be,Tr,_i,On,Fr,"left",bi,Cr,Eo.vertical,!0,Li,jr,Er))};if(!jn&&gi){for(var Oi="auto"===Ai?gi.map(function(Gr){return Sc(Gr)}):[Ai],da=!1,Sa=0;Sa<Oi.length;Sa++){var ba=Oi[Sa];if(!Nr.horizontal[ba])if(da)Nr.horizontal[ba]=Nr.horizontal[0];else{var Za=Ru(Ir,O,Z,be,Tr,_i,On,"center",ba,bi,Cr,Eo.horizontal,!1,Li,jr,Er);Za&&(Nr.horizontal[ba]=Za,da=1===Za.positionedLines.length)}}ra()}else{"auto"===Ai&&(Ai=Sc(Fr));var _a=Ru(Ir,O,Z,be,Tr,_i,On,Fr,Ai,bi,Cr,Eo.horizontal,!1,Li,jr,Er);_a&&(Nr.horizontal[Ai]=_a),ra(),ns(Jr)&&jn&&Vn&&(Nr.vertical=Ru(Ir,O,Z,be,Tr,_i,On,Fr,Ai,bi,Cr,Eo.vertical,!1,Li,jr,Er))}}var Gr,ti,xi,Wa,ja,aa=void 0,wa=!1;if(pr.icon&&pr.icon.name){var ga=ae[pr.icon.name];ga&&(Gr=be[pr.icon.name],ti=lt.get("icon-offset").evaluate(pr,{},je),xi=kc(lt.get("icon-anchor").evaluate(pr,{},je)),aa={image:Gr,top:ja=ti[1]-Gr.displaySize[1]*xi.verticalAlign,bottom:ja+Gr.displaySize[1],left:Wa=ti[0]-Gr.displaySize[0]*xi.horizontalAlign,right:Wa+Gr.displaySize[0]},wa=ga.sdf,void 0===M.sdfIcons?M.sdfIcons=ga.sdf:M.sdfIcons!==ga.sdf&&S("Style sheet warning: Cannot mix SDF and non-SDF icons in one buffer"),(ga.pixelRatio!==M.pixelRatio||0!==lt.get("icon-rotate").constantOr(1))&&(M.iconsNeedLinear=!0))}var oa=Uf(Nr.horizontal)||Nr.vertical;M.iconsInText=!!oa&&oa.iconsInText,(oa||aa)&&function(Gr,ti,Ni,xi,Ri,Ci,ii,ji,Wa,go,ja){var ws=Ci.textMaxSize.evaluate(ti,{});void 0===ws&&(ws=ii);var nl,va=Gr.layers[0].layout,Ts=va.get("icon-offset").evaluate(ti,{},ja),as=Uf(Ni.horizontal),kl=ii/24,qu=Gr.tilePixelRatio*kl,Al=Gr.tilePixelRatio*ws/24,Gu=Gr.tilePixelRatio*ji,lu=Gr.tilePixelRatio*va.get("symbol-spacing"),Ic=va.get("text-padding")*Gr.tilePixelRatio,Zu=va.get("icon-padding")*Gr.tilePixelRatio,Hl=va.get("text-max-angle")/180*Math.PI,Wu="map"===va.get("text-rotation-alignment")&&"point"!==va.get("symbol-placement"),Yu="map"===va.get("icon-rotation-alignment")&&"point"!==va.get("symbol-placement"),uu=va.get("symbol-placement"),Rc=lu/2,cu=va.get("icon-text-fit");xi&&"none"!==cu&&(Gr.allowVerticalPlacement&&Ni.vertical&&(nl=Ef(xi,Ni.vertical,cu,va.get("icon-text-fit-padding"),Ts,kl)),as&&(xi=Ef(xi,as,cu,va.get("icon-text-fit-padding"),Ts,kl)));var Ml=function(Kp,vu){vu.x<0||vu.x>=Br||vu.y<0||vu.y>=Br||function(Hi,ks,$p,dl,jc,sh,Qu,Bs,ec,mu,tc,nc,Uc,lh,yu,uh,ch,fh,hh,ph,Lo,rc,dh,Ns,Qp){var gh,Ll,Zl,Wl,Yl,Xl=Hi.addToLineVertexArray(ks,$p),vh=0,mh=0,yh=0,xh=0,Vc=-1,Hc=-1,rl={},bh=Pn(""),qc=0,Gc=0;if(void 0===Bs._unevaluatedLayout.getValue("text-radial-offset")?(qc=(gh=Bs.layout.get("text-offset").evaluate(Lo,{},Ns).map(function(bu){return bu*Ma}))[0],Gc=gh[1]):(qc=Bs.layout.get("text-radial-offset").evaluate(Lo,{},Ns)*Ma,Gc=Mc),Hi.allowVerticalPlacement&&dl.vertical){var _h=Bs.layout.get("text-rotate").evaluate(Lo,{},Ns)+90;Wl=new Nu(ec,ks,mu,tc,nc,dl.vertical,Uc,lh,yu,_h),Qu&&(Yl=new Nu(ec,ks,mu,tc,nc,Qu,ch,fh,yu,_h))}if(jc){var Zc=Bs.layout.get("icon-rotate").evaluate(Lo,{}),wh="none"!==Bs.layout.get("icon-text-fit"),Th=Ff(jc,Zc,dh,wh),Wc=Qu?Ff(Qu,Zc,dh,wh):void 0;Zl=new Nu(ec,ks,mu,tc,nc,jc,ch,fh,!1,Zc),vh=4*Th.length;var kh=Hi.iconSizeData,xu=null;"source"===kh.kind?(xu=[Fs*Bs.layout.get("icon-size").evaluate(Lo,{})])[0]>hl&&S(Hi.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'):"composite"===kh.kind&&((xu=[Fs*rc.compositeIconSizes[0].evaluate(Lo,{},Ns),Fs*rc.compositeIconSizes[1].evaluate(Lo,{},Ns)])[0]>hl||xu[1]>hl)&&S(Hi.layerIds[0]+': Value for "icon-size" is >= 255. Reduce your "icon-size".'),Hi.addSymbols(Hi.icon,Th,xu,ph,hh,Lo,!1,ks,Xl.lineStartIndex,Xl.lineLength,-1,Ns),Vc=Hi.icon.placedSymbolArray.length-1,Wc&&(mh=4*Wc.length,Hi.addSymbols(Hi.icon,Wc,xu,ph,hh,Lo,Eo.vertical,ks,Xl.lineStartIndex,Xl.lineLength,-1,Ns),Hc=Hi.icon.placedSymbolArray.length-1)}for(var Ah in dl.horizontal){var ic=dl.horizontal[Ah];if(!Ll){bh=Pn(ic.text);var td=Bs.layout.get("text-rotate").evaluate(Lo,{},Ns);Ll=new Nu(ec,ks,mu,tc,nc,ic,Uc,lh,yu,td)}var Mh=1===ic.positionedLines.length;if(yh+=jf(Hi,ks,ic,sh,Bs,yu,Lo,uh,Xl,dl.vertical?Eo.horizontal:Eo.horizontalOnly,Mh?Object.keys(dl.horizontal):[Ah],rl,Vc,rc,Ns),Mh)break}dl.vertical&&(xh+=jf(Hi,ks,dl.vertical,sh,Bs,yu,Lo,uh,Xl,Eo.vertical,["vertical"],rl,Hc,rc,Ns));var nd=Ll?Ll.boxStartIndex:Hi.collisionBoxArray.length,rd=Ll?Ll.boxEndIndex:Hi.collisionBoxArray.length,id=Wl?Wl.boxStartIndex:Hi.collisionBoxArray.length,ad=Wl?Wl.boxEndIndex:Hi.collisionBoxArray.length,od=Zl?Zl.boxStartIndex:Hi.collisionBoxArray.length,sd=Zl?Zl.boxEndIndex:Hi.collisionBoxArray.length,ld=Yl?Yl.boxStartIndex:Hi.collisionBoxArray.length,ud=Yl?Yl.boxEndIndex:Hi.collisionBoxArray.length,js=-1,ac=function(bu,Eh){return bu&&bu.circleDiameter?Math.max(bu.circleDiameter,Eh):Eh};js=ac(Ll,js),js=ac(Wl,js),js=ac(Zl,js);var Sh=(js=ac(Yl,js))>-1?1:0;Sh&&(js*=Qp/Ma),Hi.glyphOffsetArray.length>=di.MAX_GLYPHS&&S("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),void 0!==Lo.sortKey&&Hi.addToSortKeyRanges(Hi.symbolInstances.length,Lo.sortKey),Hi.symbolInstances.emplaceBack(ks.x,ks.y,rl.right>=0?rl.right:-1,rl.center>=0?rl.center:-1,rl.left>=0?rl.left:-1,rl.vertical||-1,Vc,Hc,bh,nd,rd,id,ad,od,sd,ld,ud,mu,yh,xh,vh,mh,Sh,0,Uc,qc,Gc,js)}(Gr,vu,Kp,Ni,xi,Ri,nl,Gr.layers[0],Gr.collisionBoxArray,ti.index,ti.sourceLayerIndex,Gr.index,qu,Ic,Wu,Wa,Gu,Zu,Yu,Ts,ti,Ci,go,ja,ii)};if("line"===uu)for(var ql=0,Xu=Df(ti.geometry,0,0,Br,Br);ql<Xu.length;ql+=1)for(var Ju=Xu[ql],Gl=0,Ku=Rp(Ju,lu,Hl,Ni.vertical||as,xi,24,Al,Gr.overscaling,Br);Gl<Ku.length;Gl+=1){var $u=Ku[Gl];as&&Bp(Gr,as.text,Rc,$u)||Ml(Ju,$u)}else if("line-center"===uu)for(var fu=0,hu=ti.geometry;fu<hu.length;fu+=1){var Sl=hu[fu];if(Sl.length>1){var pu=Ip(Sl,Hl,Ni.vertical||as,xi,24,Al);pu&&Ml(Sl,pu)}}else if("Polygon"===ti.type)for(var El=0,du=mc(ti.geometry,0);El<du.length;El+=1){var gu=du[El],rh=Dp(gu,16);Ml(gu[0],new Dl(rh.x,rh.y,0))}else if("LineString"===ti.type)for(var zc=0,ih=ti.geometry;zc<ih.length;zc+=1){var Dc=ih[zc];Ml(Dc,new Dl(Dc[0].x,Dc[0].y,0))}else if("Point"===ti.type)for(var Fc=0,ah=ti.geometry;Fc<ah.length;Fc+=1)for(var Bc=0,oh=ah[Fc];Bc<oh.length;Bc+=1){var Nc=oh[Bc];Ml([Nc],new Dl(Nc.x,Nc.y,0))}}(M,pr,Nr,aa,ae,Mt,jr,Pr,Cr,wa,je)},tr=0,xr=M.features;tr<xr.length;tr+=1)Qn();Ee&&M.generateCollisionDebugBuffers()},l.perspective=function(M,O,Z,ae,be){var Ee,je=1/Math.tan(O/2);return M[0]=je/Z,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=je,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=-1,M[12]=0,M[13]=0,M[15]=0,null!=be&&be!==1/0?(M[10]=(be+ae)*(Ee=1/(ae-be)),M[14]=2*be*ae*Ee):(M[10]=-1,M[14]=-2*ae),M},l.pick=function(M,O){for(var Z={},ae=0;ae<O.length;ae++){var be=O[ae];be in M&&(Z[be]=M[be])}return Z},l.plugin=ua,l.polygonIntersectsPolygon=Bi,l.postMapLoadEvent=Ie,l.postTurnstileEvent=ye,l.potpack=Tf,l.refProperties=["type","source","source-layer","minzoom","maxzoom","filter","layout"],l.register=_r,l.registerForPluginStateChange=function(M){return M({pluginStatus:Ji,pluginURL:Da}),Aa.on("pluginStateChange",M),M},l.rotate=function(M,O,Z){var ae=O[0],be=O[1],Ee=O[2],je=O[3],Qe=Math.sin(Z),lt=Math.cos(Z);return M[0]=ae*lt+Ee*Qe,M[1]=be*lt+je*Qe,M[2]=ae*-Qe+Ee*lt,M[3]=be*-Qe+je*lt,M},l.rotateX=function(M,O,Z){var ae=Math.sin(Z),be=Math.cos(Z),Ee=O[4],je=O[5],Qe=O[6],lt=O[7],_t=O[8],Mt=O[9],Bt=O[10],qt=O[11];return O!==M&&(M[0]=O[0],M[1]=O[1],M[2]=O[2],M[3]=O[3],M[12]=O[12],M[13]=O[13],M[14]=O[14],M[15]=O[15]),M[4]=Ee*be+_t*ae,M[5]=je*be+Mt*ae,M[6]=Qe*be+Bt*ae,M[7]=lt*be+qt*ae,M[8]=_t*be-Ee*ae,M[9]=Mt*be-je*ae,M[10]=Bt*be-Qe*ae,M[11]=qt*be-lt*ae,M},l.rotateZ=function(M,O,Z){var ae=Math.sin(Z),be=Math.cos(Z),Ee=O[0],je=O[1],Qe=O[2],lt=O[3],_t=O[4],Mt=O[5],Bt=O[6],qt=O[7];return O!==M&&(M[8]=O[8],M[9]=O[9],M[10]=O[10],M[11]=O[11],M[12]=O[12],M[13]=O[13],M[14]=O[14],M[15]=O[15]),M[0]=Ee*be+_t*ae,M[1]=je*be+Mt*ae,M[2]=Qe*be+Bt*ae,M[3]=lt*be+qt*ae,M[4]=_t*be-Ee*ae,M[5]=Mt*be-je*ae,M[6]=Bt*be-Qe*ae,M[7]=qt*be-lt*ae,M},l.scale=function(M,O,Z){var ae=Z[0],be=Z[1],Ee=Z[2];return M[0]=O[0]*ae,M[1]=O[1]*ae,M[2]=O[2]*ae,M[3]=O[3]*ae,M[4]=O[4]*be,M[5]=O[5]*be,M[6]=O[6]*be,M[7]=O[7]*be,M[8]=O[8]*Ee,M[9]=O[9]*Ee,M[10]=O[10]*Ee,M[11]=O[11]*Ee,M[12]=O[12],M[13]=O[13],M[14]=O[14],M[15]=O[15],M},l.scale$1=function(M,O,Z){return M[0]=O[0]*Z,M[1]=O[1]*Z,M[2]=O[2]*Z,M[3]=O[3]*Z,M},l.scale$2=function(M,O,Z){return M[0]=O[0]*Z,M[1]=O[1]*Z,M[2]=O[2]*Z,M},l.setCacheLimits=function(M,O){Re=M,le=O},l.setRTLTextPlugin=function(M,O,Z){if(void 0===Z&&(Z=!1),Ji===xa||Ji===ko||Ji===Va)throw new Error("setRTLTextPlugin cannot be called multiple times.");Da=G.resolveURL(M),Ji=xa,Ho=O,xs(),Z||Ka()},l.sphericalToCartesian=function(M){var O=M[0],Z=M[1],ae=M[2];return Z+=90,Z*=Math.PI/180,ae*=Math.PI/180,{x:O*Math.cos(Z)*Math.sin(ae),y:O*Math.sin(Z)*Math.sin(ae),z:O*Math.cos(ae)}},l.sqrLen=function(M){var O=M[0],Z=M[1];return O*O+Z*Z},l.styleSpec=Se,l.sub=function(M,O,Z){return M[0]=O[0]-Z[0],M[1]=O[1]-Z[1],M[2]=O[2]-Z[2],M},l.symbolSize=Op,l.transformMat3=function(M,O,Z){var ae=O[0],be=O[1],Ee=O[2];return M[0]=ae*Z[0]+be*Z[3]+Ee*Z[6],M[1]=ae*Z[1]+be*Z[4]+Ee*Z[7],M[2]=ae*Z[2]+be*Z[5]+Ee*Z[8],M},l.transformMat4=Au,l.translate=function(M,O,Z){var ae,be,Ee,je,Qe,lt,_t,Mt,Bt,qt,Vt,rn,xn=Z[0],In=Z[1],On=Z[2];return O===M?(M[12]=O[0]*xn+O[4]*In+O[8]*On+O[12],M[13]=O[1]*xn+O[5]*In+O[9]*On+O[13],M[14]=O[2]*xn+O[6]*In+O[10]*On+O[14],M[15]=O[3]*xn+O[7]*In+O[11]*On+O[15]):(be=O[1],Ee=O[2],je=O[3],Qe=O[4],lt=O[5],_t=O[6],Mt=O[7],Bt=O[8],qt=O[9],Vt=O[10],rn=O[11],M[0]=ae=O[0],M[1]=be,M[2]=Ee,M[3]=je,M[4]=Qe,M[5]=lt,M[6]=_t,M[7]=Mt,M[8]=Bt,M[9]=qt,M[10]=Vt,M[11]=rn,M[12]=ae*xn+Qe*In+Bt*On+O[12],M[13]=be*xn+lt*In+qt*On+O[13],M[14]=Ee*xn+_t*In+Vt*On+O[14],M[15]=je*xn+Mt*In+rn*On+O[15]),M},l.triggerPluginCompletionEvent=ri,l.uniqueId=f,l.validateCustomStyleLayer=function(M){var O=[],Z=M.id;return void 0===Z&&O.push({message:"layers."+Z+': missing required property "id"'}),void 0===M.render&&O.push({message:"layers."+Z+': missing required method "render"'}),M.renderingMode&&"2d"!==M.renderingMode&&"3d"!==M.renderingMode&&O.push({message:"layers."+Z+': property "renderingMode" must be either "2d" or "3d"'}),O},l.validateLight=qi,l.validateStyle=Yi,l.values=function(M){var O=[];for(var Z in M)O.push(M[Z]);return O},l.vectorTile=Ol,l.version=b,l.warnOnce=S,l.webpSupported=W,l.window=self,l.wrap=a}),A(0,function(l){function T(Ge){var We=typeof Ge;if("number"===We||"boolean"===We||"string"===We||null==Ge)return JSON.stringify(Ge);if(Array.isArray(Ge)){for(var Be="[",Ye=0,rt=Ge;Ye<rt.length;Ye+=1)Be+=T(rt[Ye])+",";return Be+"]"}for(var Se=Object.keys(Ge).sort(),ze="{",Ke=0;Ke<Se.length;Ke++)ze+=JSON.stringify(Se[Ke])+":"+T(Ge[Se[Ke]])+",";return ze+"}"}function b(Ge){for(var We="",Be=0,Ye=l.refProperties;Be<Ye.length;Be+=1)We+="/"+T(Ge[Ye[Be]]);return We}var d=function(Ge){this.keyCache={},Ge&&this.replace(Ge)};d.prototype.replace=function(Ge){this._layerConfigs={},this._layers={},this.update(Ge,[])},d.prototype.update=function(Ge,We){for(var Be=this,Ye=0,rt=Ge;Ye<rt.length;Ye+=1){var Se=rt[Ye];this._layerConfigs[Se.id]=Se;var ze=this._layers[Se.id]=l.createStyleLayer(Se);ze._featureFilter=l.featureFilter(ze.filter),this.keyCache[Se.id]&&delete this.keyCache[Se.id]}for(var Ke=0,st=We;Ke<st.length;Ke+=1){var ct=st[Ke];delete this.keyCache[ct],delete this._layerConfigs[ct],delete this._layers[ct]}this.familiesBySource={};for(var Tt=0,Et=function(Ht,jt){for(var Nt={},Gt=0;Gt<Ht.length;Gt++){var un=jt&&jt[Ht[Gt].id]||b(Ht[Gt]);jt&&(jt[Ht[Gt].id]=un);var pn=Nt[un];pn||(pn=Nt[un]=[]),pn.push(Ht[Gt])}var Kt=[];for(var wn in Nt)Kt.push(Nt[wn]);return Kt}(l.values(this._layerConfigs),this.keyCache);Tt<Et.length;Tt+=1){var At=Et[Tt].map(function(Ht){return Be._layers[Ht.id]}),ht=At[0];if("none"!==ht.visibility){var pt=ht.source||"",gt=this.familiesBySource[pt];gt||(gt=this.familiesBySource[pt]={});var Pt=ht.sourceLayer||"_geojsonTileLayer",Ot=gt[Pt];Ot||(Ot=gt[Pt]=[]),Ot.push(At)}}};var s=function(Ge){var We={},Be=[];for(var Ye in Ge){var rt=Ge[Ye],Se=We[Ye]={};for(var ze in rt){var Ke=rt[+ze];if(Ke&&0!==Ke.bitmap.width&&0!==Ke.bitmap.height){var st={x:0,y:0,w:Ke.bitmap.width+2,h:Ke.bitmap.height+2};Be.push(st),Se[ze]={rect:st,metrics:Ke.metrics}}}}var ct=l.potpack(Be),At=new l.AlphaImage({width:ct.w||1,height:ct.h||1});for(var ht in Ge){var pt=Ge[ht];for(var gt in pt){var Pt=pt[+gt];if(Pt&&0!==Pt.bitmap.width&&0!==Pt.bitmap.height){var Ot=We[ht][gt].rect;l.AlphaImage.copy(Pt.bitmap,At,{x:0,y:0},{x:Ot.x+1,y:Ot.y+1},Pt.bitmap)}}}this.image=At,this.positions=We};l.register("GlyphAtlas",s);var t=function(Ge){this.tileID=new l.OverscaledTileID(Ge.tileID.overscaledZ,Ge.tileID.wrap,Ge.tileID.canonical.z,Ge.tileID.canonical.x,Ge.tileID.canonical.y),this.uid=Ge.uid,this.zoom=Ge.zoom,this.pixelRatio=Ge.pixelRatio,this.tileSize=Ge.tileSize,this.source=Ge.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=Ge.showCollisionBoxes,this.collectResourceTiming=!!Ge.collectResourceTiming,this.returnDependencies=!!Ge.returnDependencies,this.promoteId=Ge.promoteId};function o(Ge,We,Be){for(var Ye=new l.EvaluationParameters(We),rt=0,Se=Ge;rt<Se.length;rt+=1)Se[rt].recalculate(Ye,Be)}function r(Ge,We){var Be=l.getArrayBuffer(Ge.request,function(Ye,rt,Se,ze){Ye?We(Ye):rt&&We(null,{vectorTile:new l.vectorTile.VectorTile(new l.pbf(rt)),rawData:rt,cacheControl:Se,expires:ze})});return function(){Be.cancel(),We()}}t.prototype.parse=function(Ge,We,Be,Ye,rt){var Se=this;this.status="parsing",this.data=Ge,this.collisionBoxArray=new l.CollisionBoxArray;var ze=new l.DictionaryCoder(Object.keys(Ge.layers).sort()),Ke=new l.FeatureIndex(this.tileID,this.promoteId);Ke.bucketLayerIDs=[];var st,ct,Tt,Et,At={},ht={featureIndex:Ke,iconDependencies:{},patternDependencies:{},glyphDependencies:{},availableImages:Be},pt=We.familiesBySource[this.source];for(var gt in pt){var Pt=Ge.layers[gt];if(Pt){1===Pt.version&&l.warnOnce('Vector tile source "'+this.source+'" layer "'+gt+'" does not use vector tile spec v2 and therefore may have some rendering errors.');for(var Ot=ze.encode(gt),Ht=[],jt=0;jt<Pt.length;jt++){var Nt=Pt.feature(jt),Gt=Ke.getId(Nt,gt);Ht.push({feature:Nt,id:Gt,index:jt,sourceLayerIndex:Ot})}for(var un=0,pn=pt[gt];un<pn.length;un+=1){var Kt=pn[un],wn=Kt[0];wn.minzoom&&this.zoom<Math.floor(wn.minzoom)||wn.maxzoom&&this.zoom>=wn.maxzoom||"none"!==wn.visibility&&(o(Kt,this.zoom,Be),(At[wn.id]=wn.createBucket({index:Ke.bucketLayerIDs.length,layers:Kt,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Ot,sourceID:this.source})).populate(Ht,ht,this.tileID.canonical),Ke.bucketLayerIDs.push(Kt.map(function(sn){return sn.id})))}}}var Bn=l.mapObject(ht.glyphDependencies,function(sn){return Object.keys(sn).map(Number)});Object.keys(Bn).length?Ye.send("getGlyphs",{uid:this.uid,stacks:Bn},function(sn,hn){st||(st=sn,ct=hn,dn.call(Se))}):ct={};var vn=Object.keys(ht.iconDependencies);vn.length?Ye.send("getImages",{icons:vn,source:this.source,tileID:this.tileID,type:"icons"},function(sn,hn){st||(st=sn,Tt=hn,dn.call(Se))}):Tt={};var cn=Object.keys(ht.patternDependencies);function dn(){if(st)return rt(st);if(ct&&Tt&&Et){var sn=new s(ct),hn=new l.ImageAtlas(Tt,Et);for(var En in At){var Mn=At[En];Mn instanceof l.SymbolBucket?(o(Mn.layers,this.zoom,Be),l.performSymbolLayout(Mn,ct,sn.positions,Tt,hn.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):Mn.hasPattern&&(Mn instanceof l.LineBucket||Mn instanceof l.FillBucket||Mn instanceof l.FillExtrusionBucket)&&(o(Mn.layers,this.zoom,Be),Mn.addFeatures(ht,this.tileID.canonical,hn.patternPositions))}this.status="done",rt(null,{buckets:l.values(At).filter(function(Rn){return!Rn.isEmpty()}),featureIndex:Ke,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:sn.image,imageAtlas:hn,glyphMap:this.returnDependencies?ct:null,iconMap:this.returnDependencies?Tt:null,glyphPositions:this.returnDependencies?sn.positions:null})}}cn.length?Ye.send("getImages",{icons:cn,source:this.source,tileID:this.tileID,type:"patterns"},function(sn,hn){st||(st=sn,Et=hn,dn.call(Se))}):Et={},dn.call(this)};var n=function(Ge,We,Be,Ye){this.actor=Ge,this.layerIndex=We,this.availableImages=Be,this.loadVectorData=Ye||r,this.loading={},this.loaded={}};n.prototype.loadTile=function(Ge,We){var Be=this,Ye=Ge.uid;this.loading||(this.loading={});var rt=!!(Ge&&Ge.request&&Ge.request.collectResourceTiming)&&new l.RequestPerformance(Ge.request),Se=this.loading[Ye]=new t(Ge);Se.abort=this.loadVectorData(Ge,function(ze,Ke){if(delete Be.loading[Ye],ze||!Ke)return Se.status="done",Be.loaded[Ye]=Se,We(ze);var st=Ke.rawData,ct={};Ke.expires&&(ct.expires=Ke.expires),Ke.cacheControl&&(ct.cacheControl=Ke.cacheControl);var Tt={};if(rt){var Et=rt.finish();Et&&(Tt.resourceTiming=JSON.parse(JSON.stringify(Et)))}Se.vectorTile=Ke.vectorTile,Se.parse(Ke.vectorTile,Be.layerIndex,Be.availableImages,Be.actor,function(At,ht){if(At||!ht)return We(At);We(null,l.extend({rawTileData:st.slice(0)},ht,ct,Tt))}),Be.loaded=Be.loaded||{},Be.loaded[Ye]=Se})},n.prototype.reloadTile=function(Ge,We){var Be=this,Ye=this.loaded,rt=Ge.uid,Se=this;if(Ye&&Ye[rt]){var ze=Ye[rt];ze.showCollisionBoxes=Ge.showCollisionBoxes;var Ke=function(st,ct){var Tt=ze.reloadCallback;Tt&&(delete ze.reloadCallback,ze.parse(ze.vectorTile,Se.layerIndex,Be.availableImages,Se.actor,Tt)),We(st,ct)};"parsing"===ze.status?ze.reloadCallback=Ke:"done"===ze.status&&(ze.vectorTile?ze.parse(ze.vectorTile,this.layerIndex,this.availableImages,this.actor,Ke):Ke())}},n.prototype.abortTile=function(Ge,We){var Be=this.loading,Ye=Ge.uid;Be&&Be[Ye]&&Be[Ye].abort&&(Be[Ye].abort(),delete Be[Ye]),We()},n.prototype.removeTile=function(Ge,We){var Be=this.loaded,Ye=Ge.uid;Be&&Be[Ye]&&delete Be[Ye],We()};var i=l.window.ImageBitmap,a=function(){this.loaded={}};a.prototype.loadTile=function(Ge,We){var Be=Ge.uid,Ye=Ge.encoding,rt=Ge.rawImageData,Se=i&&rt instanceof i?this.getImageData(rt):rt,ze=new l.DEMData(Be,Se,Ye);this.loaded=this.loaded||{},this.loaded[Be]=ze,We(null,ze)},a.prototype.getImageData=function(Ge){this.offscreenCanvas&&this.offscreenCanvasContext||(this.offscreenCanvas=new OffscreenCanvas(Ge.width,Ge.height),this.offscreenCanvasContext=this.offscreenCanvas.getContext("2d")),this.offscreenCanvas.width=Ge.width,this.offscreenCanvas.height=Ge.height,this.offscreenCanvasContext.drawImage(Ge,0,0,Ge.width,Ge.height);var We=this.offscreenCanvasContext.getImageData(-1,-1,Ge.width+2,Ge.height+2);return this.offscreenCanvasContext.clearRect(0,0,this.offscreenCanvas.width,this.offscreenCanvas.height),new l.RGBAImage({width:We.width,height:We.height},We.data)},a.prototype.removeTile=function(Ge){var We=this.loaded,Be=Ge.uid;We&&We[Be]&&delete We[Be]};var c=function Ge(We,Be){var Ye,rt=We&&We.type;if("FeatureCollection"===rt)for(Ye=0;Ye<We.features.length;Ye++)Ge(We.features[Ye],Be);else if("GeometryCollection"===rt)for(Ye=0;Ye<We.geometries.length;Ye++)Ge(We.geometries[Ye],Be);else if("Feature"===rt)Ge(We.geometry,Be);else if("Polygon"===rt)p(We.coordinates,Be);else if("MultiPolygon"===rt)for(Ye=0;Ye<We.coordinates.length;Ye++)p(We.coordinates[Ye],Be);return We};function p(Ge,We){if(0!==Ge.length){f(Ge[0],We);for(var Be=1;Be<Ge.length;Be++)f(Ge[Be],!We)}}function f(Ge,We){for(var Be=0,Ye=0,rt=Ge.length,Se=rt-1;Ye<rt;Se=Ye++)Be+=(Ge[Ye][0]-Ge[Se][0])*(Ge[Se][1]+Ge[Ye][1]);Be>=0!=!!We&&Ge.reverse()}var x=l.vectorTile.VectorTileFeature.prototype.toGeoJSON,v=function(Ge){this._feature=Ge,this.extent=l.EXTENT,this.type=Ge.type,this.properties=Ge.tags,"id"in Ge&&!isNaN(Ge.id)&&(this.id=parseInt(Ge.id,10))};v.prototype.loadGeometry=function(){if(1===this._feature.type){for(var Ge=[],We=0,Be=this._feature.geometry;We<Be.length;We+=1){var Ye=Be[We];Ge.push([new l.Point$1(Ye[0],Ye[1])])}return Ge}for(var rt=[],Se=0,ze=this._feature.geometry;Se<ze.length;Se+=1){for(var Ke=[],st=0,ct=ze[Se];st<ct.length;st+=1){var Tt=ct[st];Ke.push(new l.Point$1(Tt[0],Tt[1]))}rt.push(Ke)}return rt},v.prototype.toGeoJSON=function(Ge,We,Be){return x.call(this,Ge,We,Be)};var g=function(Ge){this.layers={_geojsonTileLayer:this},this.name="_geojsonTileLayer",this.extent=l.EXTENT,this.length=Ge.length,this._features=Ge};g.prototype.feature=function(Ge){return new v(this._features[Ge])};var y=l.vectorTile.VectorTileFeature,h=m;function m(Ge,We){this.options=We||{},this.features=Ge,this.length=Ge.length}function w(Ge,We){this.id="number"==typeof Ge.id?Ge.id:void 0,this.type=Ge.type,this.rawGeometry=1===Ge.type?[Ge.geometry]:Ge.geometry,this.properties=Ge.tags,this.extent=We||4096}m.prototype.feature=function(Ge){return new w(this.features[Ge],this.options.extent)},w.prototype.loadGeometry=function(){var Ge=this.rawGeometry;this.geometry=[];for(var We=0;We<Ge.length;We++){for(var Be=Ge[We],Ye=[],rt=0;rt<Be.length;rt++)Ye.push(new l.Point$1(Be[rt][0],Be[rt][1]));this.geometry.push(Ye)}return this.geometry},w.prototype.bbox=function(){this.geometry||this.loadGeometry();for(var Ge=this.geometry,We=1/0,Be=-1/0,Ye=1/0,rt=-1/0,Se=0;Se<Ge.length;Se++)for(var ze=Ge[Se],Ke=0;Ke<ze.length;Ke++){var st=ze[Ke];We=Math.min(We,st.x),Be=Math.max(Be,st.x),Ye=Math.min(Ye,st.y),rt=Math.max(rt,st.y)}return[We,Ye,Be,rt]},w.prototype.toGeoJSON=y.prototype.toGeoJSON;var u=L,E=h;function L(Ge){var We=new l.pbf;return function(Be,Ye){for(var rt in Be.layers)Ye.writeMessage(3,C,Be.layers[rt])}(Ge,We),We.finish()}function C(Ge,We){var Be;We.writeVarintField(15,Ge.version||1),We.writeStringField(1,Ge.name||""),We.writeVarintField(5,Ge.extent||4096);var Ye={keys:[],values:[],keycache:{},valuecache:{}};for(Be=0;Be<Ge.length;Be++)Ye.feature=Ge.feature(Be),We.writeMessage(2,P,Ye);var rt=Ye.keys;for(Be=0;Be<rt.length;Be++)We.writeStringField(3,rt[Be]);var Se=Ye.values;for(Be=0;Be<Se.length;Be++)We.writeMessage(4,F,Se[Be])}function P(Ge,We){var Be=Ge.feature;void 0!==Be.id&&We.writeVarintField(1,Be.id),We.writeMessage(2,I,Ge),We.writeVarintField(3,Be.type),We.writeMessage(4,H,Be)}function I(Ge,We){var Be=Ge.feature,Ye=Ge.keys,rt=Ge.values,Se=Ge.keycache,ze=Ge.valuecache;for(var Ke in Be.properties){var st=Se[Ke];void 0===st&&(Ye.push(Ke),Se[Ke]=st=Ye.length-1),We.writeVarint(st);var ct=Be.properties[Ke],Tt=typeof ct;"string"!==Tt&&"boolean"!==Tt&&"number"!==Tt&&(ct=JSON.stringify(ct));var Et=Tt+":"+ct,At=ze[Et];void 0===At&&(rt.push(ct),ze[Et]=At=rt.length-1),We.writeVarint(At)}}function U(Ge,We){return(We<<3)+(7&Ge)}function z(Ge){return Ge<<1^Ge>>31}function H(Ge,We){for(var Be=Ge.loadGeometry(),Ye=Ge.type,rt=0,Se=0,ze=Be.length,Ke=0;Ke<ze;Ke++){var st=Be[Ke],ct=1;1===Ye&&(ct=st.length),We.writeVarint(U(1,ct));for(var Tt=3===Ye?st.length-1:st.length,Et=0;Et<Tt;Et++){1===Et&&1!==Ye&&We.writeVarint(U(2,Tt-1));var At=st[Et].x-rt,ht=st[Et].y-Se;We.writeVarint(z(At)),We.writeVarint(z(ht)),rt+=At,Se+=ht}3===Ye&&We.writeVarint(U(7,1))}}function F(Ge,We){var Be=typeof Ge;"string"===Be?We.writeStringField(1,Ge):"boolean"===Be?We.writeBooleanField(7,Ge):"number"===Be&&(Ge%1!=0?We.writeDoubleField(3,Ge):Ge<0?We.writeSVarintField(6,Ge):We.writeVarintField(5,Ge))}function N(Ge,We,Be,Ye,rt,Se){if(!(rt-Ye<=Be)){var ze=Ye+rt>>1;B(Ge,We,ze,Ye,rt,Se%2),N(Ge,We,Be,Ye,ze-1,Se+1),N(Ge,We,Be,ze+1,rt,Se+1)}}function B(Ge,We,Be,Ye,rt,Se){for(;rt>Ye;){if(rt-Ye>600){var ze=rt-Ye+1,Ke=Be-Ye+1,st=Math.log(ze),ct=.5*Math.exp(2*st/3),Tt=.5*Math.sqrt(st*ct*(ze-ct)/ze)*(Ke-ze/2<0?-1:1);B(Ge,We,Be,Math.max(Ye,Math.floor(Be-Ke*ct/ze+Tt)),Math.min(rt,Math.floor(Be+(ze-Ke)*ct/ze+Tt)),Se)}var Et=We[2*Be+Se],At=Ye,ht=rt;for(j(Ge,We,Ye,Be),We[2*rt+Se]>Et&&j(Ge,We,Ye,rt);At<ht;){for(j(Ge,We,At,ht),At++,ht--;We[2*At+Se]<Et;)At++;for(;We[2*ht+Se]>Et;)ht--}We[2*Ye+Se]===Et?j(Ge,We,Ye,ht):j(Ge,We,++ht,rt),ht<=Be&&(Ye=ht+1),Be<=ht&&(rt=ht-1)}}function j(Ge,We,Be,Ye){J(Ge,Be,Ye),J(We,2*Be,2*Ye),J(We,2*Be+1,2*Ye+1)}function J(Ge,We,Be){var Ye=Ge[We];Ge[We]=Ge[Be],Ge[Be]=Ye}function G(Ge,We,Be,Ye){var rt=Ge-Be,Se=We-Ye;return rt*rt+Se*Se}u.fromVectorTileJs=L,u.fromGeojsonVt=function(Ge,We){We=We||{};var Be={};for(var Ye in Ge)Be[Ye]=new h(Ge[Ye].features,We),Be[Ye].name=Ye,Be[Ye].version=We.version,Be[Ye].extent=We.extent;return L({layers:Be})},u.GeoJSONWrapper=E;var V=function(Ge){return Ge[0]},W=function(Ge){return Ge[1]},X=function(Ge,We,Be,Ye,rt){void 0===We&&(We=V),void 0===Be&&(Be=W),void 0===Ye&&(Ye=64),void 0===rt&&(rt=Float64Array),this.nodeSize=Ye,this.points=Ge;for(var Se=Ge.length<65536?Uint16Array:Uint32Array,ze=this.ids=new Se(Ge.length),Ke=this.coords=new rt(2*Ge.length),st=0;st<Ge.length;st++)ze[st]=st,Ke[2*st]=We(Ge[st]),Ke[2*st+1]=Be(Ge[st]);N(ze,Ke,Ye,0,ze.length-1,0)};X.prototype.range=function(Ge,We,Be,Ye){return function(rt,Se,ze,Ke,st,ct,Tt){for(var Et,At,ht=[0,rt.length-1,0],pt=[];ht.length;){var gt=ht.pop(),Pt=ht.pop(),Ot=ht.pop();if(Pt-Ot<=Tt)for(var Ht=Ot;Ht<=Pt;Ht++)At=Se[2*Ht+1],(Et=Se[2*Ht])>=ze&&Et<=st&&At>=Ke&&At<=ct&&pt.push(rt[Ht]);else{var jt=Math.floor((Ot+Pt)/2);At=Se[2*jt+1],(Et=Se[2*jt])>=ze&&Et<=st&&At>=Ke&&At<=ct&&pt.push(rt[jt]);var Nt=(gt+1)%2;(0===gt?ze<=Et:Ke<=At)&&(ht.push(Ot),ht.push(jt-1),ht.push(Nt)),(0===gt?st>=Et:ct>=At)&&(ht.push(jt+1),ht.push(Pt),ht.push(Nt))}}return pt}(this.ids,this.coords,Ge,We,Be,Ye,this.nodeSize)},X.prototype.within=function(Ge,We,Be){return function(Ye,rt,Se,ze,Ke,st){for(var ct=[0,Ye.length-1,0],Tt=[],Et=Ke*Ke;ct.length;){var At=ct.pop(),ht=ct.pop(),pt=ct.pop();if(ht-pt<=st)for(var gt=pt;gt<=ht;gt++)G(rt[2*gt],rt[2*gt+1],Se,ze)<=Et&&Tt.push(Ye[gt]);else{var Pt=Math.floor((pt+ht)/2),Ot=rt[2*Pt],Ht=rt[2*Pt+1];G(Ot,Ht,Se,ze)<=Et&&Tt.push(Ye[Pt]);var jt=(At+1)%2;(0===At?Se-Ke<=Ot:ze-Ke<=Ht)&&(ct.push(pt),ct.push(Pt-1),ct.push(jt)),(0===At?Se+Ke>=Ot:ze+Ke>=Ht)&&(ct.push(Pt+1),ct.push(ht),ct.push(jt))}}return Tt}(this.ids,this.coords,Ge,We,Be,this.nodeSize)};var K={minZoom:0,maxZoom:16,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:function(Ge){return Ge}},re=function(Ge){this.options=he(Object.create(K),Ge),this.trees=new Array(this.options.maxZoom+1)};function ee(Ge,We,Be,Ye,rt){return{x:Ge,y:We,zoom:1/0,id:Be,parentId:-1,numPoints:Ye,properties:rt}}function ie(Ge,We){var Be=Ge.geometry.coordinates,rt=Be[1];return{x:me(Be[0]),y:de(rt),zoom:1/0,index:We,parentId:-1}}function oe(Ge){return{type:"Feature",id:Ge.id,properties:ce(Ge),geometry:{type:"Point",coordinates:[(Ye=Ge.x,360*(Ye-.5)),(We=Ge.y,Be=(180-360*We)*Math.PI/180,360*Math.atan(Math.exp(Be))/Math.PI-90)]}};var We,Be,Ye}function ce(Ge){var We=Ge.numPoints,Be=We>=1e4?Math.round(We/1e3)+"k":We>=1e3?Math.round(We/100)/10+"k":We;return he(he({},Ge.properties),{cluster:!0,cluster_id:Ge.id,point_count:We,point_count_abbreviated:Be})}function me(Ge){return Ge/360+.5}function de(Ge){var We=Math.sin(Ge*Math.PI/180),Be=.5-.25*Math.log((1+We)/(1-We))/Math.PI;return Be<0?0:Be>1?1:Be}function he(Ge,We){for(var Be in We)Ge[Be]=We[Be];return Ge}function ve(Ge){return Ge.x}function Pe(Ge){return Ge.y}function xe(Ge,We,Be,Ye){for(var rt,Se=Ye,ze=Be-We>>1,Ke=Be-We,st=Ge[We],ct=Ge[We+1],Tt=Ge[Be],Et=Ge[Be+1],At=We+3;At<Be;At+=3){var ht=ke(Ge[At],Ge[At+1],st,ct,Tt,Et);if(ht>Se)rt=At,Se=ht;else if(ht===Se){var pt=Math.abs(At-ze);pt<Ke&&(rt=At,Ke=pt)}}Se>Ye&&(rt-We>3&&xe(Ge,We,rt,Ye),Ge[rt+2]=Se,Be-rt>3&&xe(Ge,rt,Be,Ye))}function ke(Ge,We,Be,Ye,rt,Se){var ze=rt-Be,Ke=Se-Ye;if(0!==ze||0!==Ke){var st=((Ge-Be)*ze+(We-Ye)*Ke)/(ze*ze+Ke*Ke);st>1?(Be=rt,Ye=Se):st>0&&(Be+=ze*st,Ye+=Ke*st)}return(ze=Ge-Be)*ze+(Ke=We-Ye)*Ke}function Ae(Ge,We,Be,Ye){var rt={id:void 0===Ge?null:Ge,type:We,geometry:Be,tags:Ye,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return function(Se){var ze=Se.geometry,Ke=Se.type;if("Point"===Ke||"MultiPoint"===Ke||"LineString"===Ke)Te(Se,ze);else if("Polygon"===Ke||"MultiLineString"===Ke)for(var st=0;st<ze.length;st++)Te(Se,ze[st]);else if("MultiPolygon"===Ke)for(st=0;st<ze.length;st++)for(var ct=0;ct<ze[st].length;ct++)Te(Se,ze[st][ct])}(rt),rt}function Te(Ge,We){for(var Be=0;Be<We.length;Be+=3)Ge.minX=Math.min(Ge.minX,We[Be]),Ge.minY=Math.min(Ge.minY,We[Be+1]),Ge.maxX=Math.max(Ge.maxX,We[Be]),Ge.maxY=Math.max(Ge.maxY,We[Be+1])}function Q(Ge,We,Be,Ye){if(We.geometry){var rt=We.geometry.coordinates,Se=We.geometry.type,ze=Math.pow(Be.tolerance/((1<<Be.maxZoom)*Be.extent),2),Ke=[],st=We.id;if(Be.promoteId?st=We.properties[Be.promoteId]:Be.generateId&&(st=Ye||0),"Point"===Se)se(rt,Ke);else if("MultiPoint"===Se)for(var ct=0;ct<rt.length;ct++)se(rt[ct],Ke);else if("LineString"===Se)fe(rt,Ke,ze,!1);else if("MultiLineString"===Se){if(Be.lineMetrics){for(ct=0;ct<rt.length;ct++)fe(rt[ct],Ke=[],ze,!1),Ge.push(Ae(st,"LineString",Ke,We.properties));return}ye(rt,Ke,ze,!1)}else if("Polygon"===Se)ye(rt,Ke,ze,!0);else{if("MultiPolygon"!==Se){if("GeometryCollection"===Se){for(ct=0;ct<We.geometry.geometries.length;ct++)Q(Ge,{id:st,geometry:We.geometry.geometries[ct],properties:We.properties},Be,Ye);return}throw new Error("Input data is not a valid GeoJSON object.")}for(ct=0;ct<rt.length;ct++){var Tt=[];ye(rt[ct],Tt,ze,!0),Ke.push(Tt)}}Ge.push(Ae(st,Se,Ke,We.properties))}}function se(Ge,We){We.push(Me(Ge[0])),We.push(Ie(Ge[1])),We.push(0)}function fe(Ge,We,Be,Ye){for(var rt,Se,ze=0,Ke=0;Ke<Ge.length;Ke++){var st=Me(Ge[Ke][0]),ct=Ie(Ge[Ke][1]);We.push(st),We.push(ct),We.push(0),Ke>0&&(ze+=Ye?(rt*ct-st*Se)/2:Math.sqrt(Math.pow(st-rt,2)+Math.pow(ct-Se,2))),rt=st,Se=ct}var Tt=We.length-3;We[2]=1,xe(We,0,Tt,Be),We[Tt+2]=1,We.size=Math.abs(ze),We.start=0,We.end=We.size}function ye(Ge,We,Be,Ye){for(var rt=0;rt<Ge.length;rt++){var Se=[];fe(Ge[rt],Se,Be,Ye),We.push(Se)}}function Me(Ge){return Ge/360+.5}function Ie(Ge){var We=Math.sin(Ge*Math.PI/180),Be=.5-.25*Math.log((1+We)/(1-We))/Math.PI;return Be<0?0:Be>1?1:Be}function Ce(Ge,We,Be,Ye,rt,Se,ze,Ke){if(Ye/=We,Se>=(Be/=We)&&ze<Ye)return Ge;if(ze<Be||Se>=Ye)return null;for(var st=[],ct=0;ct<Ge.length;ct++){var Tt=Ge[ct],Et=Tt.geometry,At=Tt.type,ht=0===rt?Tt.minX:Tt.minY,pt=0===rt?Tt.maxX:Tt.maxY;if(ht>=Be&&pt<Ye)st.push(Tt);else if(!(pt<Be||ht>=Ye)){var gt=[];if("Point"===At||"MultiPoint"===At)Re(Et,gt,Be,Ye,rt);else if("LineString"===At)le(Et,gt,Be,Ye,rt,!1,Ke.lineMetrics);else if("MultiLineString"===At)_e(Et,gt,Be,Ye,rt,!1);else if("Polygon"===At)_e(Et,gt,Be,Ye,rt,!0);else if("MultiPolygon"===At)for(var Pt=0;Pt<Et.length;Pt++){var Ot=[];_e(Et[Pt],Ot,Be,Ye,rt,!0),Ot.length&&gt.push(Ot)}if(gt.length){if(Ke.lineMetrics&&"LineString"===At){for(Pt=0;Pt<gt.length;Pt++)st.push(Ae(Tt.id,At,gt[Pt],Tt.tags));continue}"LineString"!==At&&"MultiLineString"!==At||(1===gt.length?(At="LineString",gt=gt[0]):At="MultiLineString"),"Point"!==At&&"MultiPoint"!==At||(At=3===gt.length?"Point":"MultiPoint"),st.push(Ae(Tt.id,At,gt,Tt.tags))}}}return st.length?st:null}function Re(Ge,We,Be,Ye,rt){for(var Se=0;Se<Ge.length;Se+=3){var ze=Ge[Se+rt];ze>=Be&&ze<=Ye&&(We.push(Ge[Se]),We.push(Ge[Se+1]),We.push(Ge[Se+2]))}}function le(Ge,We,Be,Ye,rt,Se,ze){for(var Ke,st,ct=ge(Ge),Tt=0===rt?Ve:He,Et=Ge.start,At=0;At<Ge.length-3;At+=3){var ht=Ge[At],pt=Ge[At+1],gt=Ge[At+2],Pt=Ge[At+3],Ot=Ge[At+4],Ht=0===rt?ht:pt,jt=0===rt?Pt:Ot,Nt=!1;ze&&(Ke=Math.sqrt(Math.pow(ht-Pt,2)+Math.pow(pt-Ot,2))),Ht<Be?jt>Be&&(st=Tt(ct,ht,pt,Pt,Ot,Be),ze&&(ct.start=Et+Ke*st)):Ht>Ye?jt<Ye&&(st=Tt(ct,ht,pt,Pt,Ot,Ye),ze&&(ct.start=Et+Ke*st)):Fe(ct,ht,pt,gt),jt<Be&&Ht>=Be&&(st=Tt(ct,ht,pt,Pt,Ot,Be),Nt=!0),jt>Ye&&Ht<=Ye&&(st=Tt(ct,ht,pt,Pt,Ot,Ye),Nt=!0),!Se&&Nt&&(ze&&(ct.end=Et+Ke*st),We.push(ct),ct=ge(Ge)),ze&&(Et+=Ke)}var Gt=Ge.length-3;ht=Ge[Gt],pt=Ge[Gt+1],gt=Ge[Gt+2],(Ht=0===rt?ht:pt)>=Be&&Ht<=Ye&&Fe(ct,ht,pt,gt),Gt=ct.length-3,Se&&Gt>=3&&(ct[Gt]!==ct[0]||ct[Gt+1]!==ct[1])&&Fe(ct,ct[0],ct[1],ct[2]),ct.length&&We.push(ct)}function ge(Ge){var We=[];return We.size=Ge.size,We.start=Ge.start,We.end=Ge.end,We}function _e(Ge,We,Be,Ye,rt,Se){for(var ze=0;ze<Ge.length;ze++)le(Ge[ze],We,Be,Ye,rt,Se,!1)}function Fe(Ge,We,Be,Ye){Ge.push(We),Ge.push(Be),Ge.push(Ye)}function Ve(Ge,We,Be,Ye,rt,Se){var ze=(Se-We)/(Ye-We);return Ge.push(Se),Ge.push(Be+(rt-Be)*ze),Ge.push(1),ze}function He(Ge,We,Be,Ye,rt,Se){var ze=(Se-Be)/(rt-Be);return Ge.push(We+(Ye-We)*ze),Ge.push(Se),Ge.push(1),ze}function nt(Ge,We){for(var Be=[],Ye=0;Ye<Ge.length;Ye++){var rt,Se=Ge[Ye],ze=Se.type;if("Point"===ze||"MultiPoint"===ze||"LineString"===ze)rt=tt(Se.geometry,We);else if("MultiLineString"===ze||"Polygon"===ze){rt=[];for(var Ke=0;Ke<Se.geometry.length;Ke++)rt.push(tt(Se.geometry[Ke],We))}else if("MultiPolygon"===ze)for(rt=[],Ke=0;Ke<Se.geometry.length;Ke++){for(var st=[],ct=0;ct<Se.geometry[Ke].length;ct++)st.push(tt(Se.geometry[Ke][ct],We));rt.push(st)}Be.push(Ae(Se.id,ze,rt,Se.tags))}return Be}function tt(Ge,We){var Be=[];Be.size=Ge.size,void 0!==Ge.start&&(Be.start=Ge.start,Be.end=Ge.end);for(var Ye=0;Ye<Ge.length;Ye+=3)Be.push(Ge[Ye]+We,Ge[Ye+1],Ge[Ye+2]);return Be}function ot(Ge,We){if(Ge.transformed)return Ge;var Be,Ye,rt,Se=1<<Ge.z,ze=Ge.x,Ke=Ge.y;for(Be=0;Be<Ge.features.length;Be++){var st=Ge.features[Be],ct=st.geometry,Tt=st.type;if(st.geometry=[],1===Tt)for(Ye=0;Ye<ct.length;Ye+=2)st.geometry.push(dt(ct[Ye],ct[Ye+1],We,Se,ze,Ke));else for(Ye=0;Ye<ct.length;Ye++){var Et=[];for(rt=0;rt<ct[Ye].length;rt+=2)Et.push(dt(ct[Ye][rt],ct[Ye][rt+1],We,Se,ze,Ke));st.geometry.push(Et)}}return Ge.transformed=!0,Ge}function dt(Ge,We,Be,Ye,rt,Se){return[Math.round(Be*(Ge*Ye-rt)),Math.round(Be*(We*Ye-Se))]}function kt(Ge,We,Be,Ye,rt){for(var Se=We===rt.maxZoom?0:rt.tolerance/((1<<We)*rt.extent),ze={features:[],numPoints:0,numSimplified:0,numFeatures:0,source:null,x:Be,y:Ye,z:We,transformed:!1,minX:2,minY:1,maxX:-1,maxY:0},Ke=0;Ke<Ge.length;Ke++){ze.numFeatures++,mt(ze,Ge[Ke],Se,rt);var st=Ge[Ke].minX,ct=Ge[Ke].minY,Tt=Ge[Ke].maxX,Et=Ge[Ke].maxY;st<ze.minX&&(ze.minX=st),ct<ze.minY&&(ze.minY=ct),Tt>ze.maxX&&(ze.maxX=Tt),Et>ze.maxY&&(ze.maxY=Et)}return ze}function mt(Ge,We,Be,Ye){var rt=We.geometry,Se=We.type,ze=[];if("Point"===Se||"MultiPoint"===Se)for(var Ke=0;Ke<rt.length;Ke+=3)ze.push(rt[Ke]),ze.push(rt[Ke+1]),Ge.numPoints++,Ge.numSimplified++;else if("LineString"===Se)wt(ze,rt,Ge,Be,!1,!1);else if("MultiLineString"===Se||"Polygon"===Se)for(Ke=0;Ke<rt.length;Ke++)wt(ze,rt[Ke],Ge,Be,"Polygon"===Se,0===Ke);else if("MultiPolygon"===Se)for(var st=0;st<rt.length;st++){var ct=rt[st];for(Ke=0;Ke<ct.length;Ke++)wt(ze,ct[Ke],Ge,Be,!0,0===Ke)}if(ze.length){var Tt=We.tags||null;if("LineString"===Se&&Ye.lineMetrics){for(var Et in Tt={},We.tags)Tt[Et]=We.tags[Et];Tt.mapbox_clip_start=rt.start/rt.size,Tt.mapbox_clip_end=rt.end/rt.size}var At={geometry:ze,type:"Polygon"===Se||"MultiPolygon"===Se?3:"LineString"===Se||"MultiLineString"===Se?2:1,tags:Tt};null!==We.id&&(At.id=We.id),Ge.features.push(At)}}function wt(Ge,We,Be,Ye,rt,Se){var ze=Ye*Ye;if(Ye>0&&We.size<(rt?ze:Ye))Be.numPoints+=We.length/3;else{for(var Ke=[],st=0;st<We.length;st+=3)(0===Ye||We[st+2]>ze)&&(Be.numSimplified++,Ke.push(We[st]),Ke.push(We[st+1])),Be.numPoints++;rt&&function(ct,Tt){for(var Et=0,At=0,ht=ct.length,pt=ht-2;At<ht;pt=At,At+=2)Et+=(ct[At]-ct[pt])*(ct[At+1]+ct[pt+1]);if(Et>0===Tt)for(At=0,ht=ct.length;At<ht/2;At+=2){var gt=ct[At],Pt=ct[At+1];ct[At]=ct[ht-2-At],ct[At+1]=ct[ht-1-At],ct[ht-2-At]=gt,ct[ht-1-At]=Pt}}(Ke,Se),Ge.push(Ke)}}function Lt(Ge,We){var Be=(We=this.options=function(rt,Se){for(var ze in Se)rt[ze]=Se[ze];return rt}(Object.create(this.options),We)).debug;if(Be&&console.time("preprocess data"),We.maxZoom<0||We.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(We.promoteId&&We.generateId)throw new Error("promoteId and generateId cannot be used together.");var rt,Se,ze,Ke,st,ct,Ye=function(rt,Se){var ze=[];if("FeatureCollection"===rt.type)for(var Ke=0;Ke<rt.features.length;Ke++)Q(ze,rt.features[Ke],Se,Ke);else Q(ze,"Feature"===rt.type?rt:{geometry:rt},Se);return ze}(Ge,We);this.tiles={},this.tileCoords=[],Be&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",We.indexMaxZoom,We.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),(rt=Ye,Se=We,ze=Se.buffer/Se.extent,Ke=rt,st=Ce(rt,1,-1-ze,ze,0,-1,2,Se),ct=Ce(rt,1,1-ze,2+ze,0,-1,2,Se),(st||ct)&&(Ke=Ce(rt,1,-ze,1+ze,0,-1,2,Se)||[],st&&(Ke=nt(st,1).concat(Ke)),ct&&(Ke=Ke.concat(nt(ct,-1)))),Ye=Ke).length&&this.splitTile(Ye,0,0,0),Be&&(Ye.length&&console.log("features: %d, points: %d",this.tiles[0].numFeatures,this.tiles[0].numPoints),console.timeEnd("generate tiles"),console.log("tiles generated:",this.total,JSON.stringify(this.stats)))}function Ct(Ge,We,Be){return 32*((1<<Ge)*Be+We)+Ge}function It(Ge,We){var Be=Ge.tileID.canonical;if(!this._geoJSONIndex)return We(null,null);var Ye=this._geoJSONIndex.getTile(Be.z,Be.x,Be.y);if(!Ye)return We(null,null);var rt=new g(Ye.features),Se=u(rt);0===Se.byteOffset&&Se.byteLength===Se.buffer.byteLength||(Se=new Uint8Array(Se)),We(null,{vectorTile:rt,rawData:Se.buffer})}re.prototype.load=function(Ge){var We=this.options,Be=We.log,Ye=We.minZoom,rt=We.maxZoom,Se=We.nodeSize;Be&&console.time("total time");var ze="prepare "+Ge.length+" points";Be&&console.time(ze),this.points=Ge;for(var Ke=[],st=0;st<Ge.length;st++)Ge[st].geometry&&Ke.push(ie(Ge[st],st));this.trees[rt+1]=new X(Ke,ve,Pe,Se,Float32Array),Be&&console.timeEnd(ze);for(var ct=rt;ct>=Ye;ct--){var Tt=+Date.now();Ke=this._cluster(Ke,ct),this.trees[ct]=new X(Ke,ve,Pe,Se,Float32Array),Be&&console.log("z%d: %d clusters in %dms",ct,Ke.length,+Date.now()-Tt)}return Be&&console.timeEnd("total time"),this},re.prototype.getClusters=function(Ge,We){var Be=((Ge[0]+180)%360+360)%360-180,Ye=Math.max(-90,Math.min(90,Ge[1])),rt=180===Ge[2]?180:((Ge[2]+180)%360+360)%360-180,Se=Math.max(-90,Math.min(90,Ge[3]));if(Ge[2]-Ge[0]>=360)Be=-180,rt=180;else if(Be>rt){var ze=this.getClusters([Be,Ye,180,Se],We),Ke=this.getClusters([-180,Ye,rt,Se],We);return ze.concat(Ke)}for(var st=this.trees[this._limitZoom(We)],ct=[],Tt=0,Et=st.range(me(Be),de(Se),me(rt),de(Ye));Tt<Et.length;Tt+=1){var ht=st.points[Et[Tt]];ct.push(ht.numPoints?oe(ht):this.points[ht.index])}return ct},re.prototype.getChildren=function(Ge){var We=this._getOriginId(Ge),Be=this._getOriginZoom(Ge),Ye="No cluster with the specified id.",rt=this.trees[Be];if(!rt)throw new Error(Ye);var Se=rt.points[We];if(!Se)throw new Error(Ye);for(var ze=this.options.radius/(this.options.extent*Math.pow(2,Be-1)),Ke=[],st=0,ct=rt.within(Se.x,Se.y,ze);st<ct.length;st+=1){var Et=rt.points[ct[st]];Et.parentId===Ge&&Ke.push(Et.numPoints?oe(Et):this.points[Et.index])}if(0===Ke.length)throw new Error(Ye);return Ke},re.prototype.getLeaves=function(Ge,We,Be){var Ye=[];return this._appendLeaves(Ye,Ge,We=We||10,Be=Be||0,0),Ye},re.prototype.getTile=function(Ge,We,Be){var Ye=this.trees[this._limitZoom(Ge)],rt=Math.pow(2,Ge),Se=this.options,Ke=Se.radius/Se.extent,st=(Be-Ke)/rt,ct=(Be+1+Ke)/rt,Tt={features:[]};return this._addTileFeatures(Ye.range((We-Ke)/rt,st,(We+1+Ke)/rt,ct),Ye.points,We,Be,rt,Tt),0===We&&this._addTileFeatures(Ye.range(1-Ke/rt,st,1,ct),Ye.points,rt,Be,rt,Tt),We===rt-1&&this._addTileFeatures(Ye.range(0,st,Ke/rt,ct),Ye.points,-1,Be,rt,Tt),Tt.features.length?Tt:null},re.prototype.getClusterExpansionZoom=function(Ge){for(var We=this._getOriginZoom(Ge)-1;We<=this.options.maxZoom;){var Be=this.getChildren(Ge);if(We++,1!==Be.length)break;Ge=Be[0].properties.cluster_id}return We},re.prototype._appendLeaves=function(Ge,We,Be,Ye,rt){for(var Se=0,ze=this.getChildren(We);Se<ze.length;Se+=1){var Ke=ze[Se],st=Ke.properties;if(st&&st.cluster?rt+st.point_count<=Ye?rt+=st.point_count:rt=this._appendLeaves(Ge,st.cluster_id,Be,Ye,rt):rt<Ye?rt++:Ge.push(Ke),Ge.length===Be)break}return rt},re.prototype._addTileFeatures=function(Ge,We,Be,Ye,rt,Se){for(var ze=0,Ke=Ge;ze<Ke.length;ze+=1){var st=We[Ke[ze]],ct=st.numPoints,Tt={type:1,geometry:[[Math.round(this.options.extent*(st.x*rt-Be)),Math.round(this.options.extent*(st.y*rt-Ye))]],tags:ct?ce(st):this.points[st.index].properties},Et=void 0;ct?Et=st.id:this.options.generateId?Et=st.index:this.points[st.index].id&&(Et=this.points[st.index].id),void 0!==Et&&(Tt.id=Et),Se.features.push(Tt)}},re.prototype._limitZoom=function(Ge){return Math.max(this.options.minZoom,Math.min(Ge,this.options.maxZoom+1))},re.prototype._cluster=function(Ge,We){for(var Be=[],Ye=this.options,ze=Ye.reduce,Ke=Ye.radius/(Ye.extent*Math.pow(2,We)),st=0;st<Ge.length;st++){var ct=Ge[st];if(!(ct.zoom<=We)){ct.zoom=We;for(var Tt=this.trees[We+1],Et=Tt.within(ct.x,ct.y,Ke),At=ct.numPoints||1,ht=ct.x*At,pt=ct.y*At,gt=ze&&At>1?this._map(ct,!0):null,Pt=(st<<5)+(We+1)+this.points.length,Ot=0,Ht=Et;Ot<Ht.length;Ot+=1){var Nt=Tt.points[Ht[Ot]];if(!(Nt.zoom<=We)){Nt.zoom=We;var Gt=Nt.numPoints||1;ht+=Nt.x*Gt,pt+=Nt.y*Gt,At+=Gt,Nt.parentId=Pt,ze&&(gt||(gt=this._map(ct,!0)),ze(gt,this._map(Nt)))}}1===At?Be.push(ct):(ct.parentId=Pt,Be.push(ee(ht/At,pt/At,Pt,At,gt)))}}return Be},re.prototype._getOriginId=function(Ge){return Ge-this.points.length>>5},re.prototype._getOriginZoom=function(Ge){return(Ge-this.points.length)%32},re.prototype._map=function(Ge,We){if(Ge.numPoints)return We?he({},Ge.properties):Ge.properties;var Be=this.points[Ge.index].properties,Ye=this.options.map(Be);return We&&Ye===Be?he({},Ye):Ye},Lt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Lt.prototype.splitTile=function(Ge,We,Be,Ye,rt,Se,ze){for(var Ke=[Ge,We,Be,Ye],st=this.options,ct=st.debug;Ke.length;){Ye=Ke.pop(),Be=Ke.pop(),We=Ke.pop(),Ge=Ke.pop();var Tt=1<<We,Et=Ct(We,Be,Ye),At=this.tiles[Et];if(!At&&(ct>1&&console.time("creation"),At=this.tiles[Et]=kt(Ge,We,Be,Ye,st),this.tileCoords.push({z:We,x:Be,y:Ye}),ct)){ct>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",We,Be,Ye,At.numFeatures,At.numPoints,At.numSimplified),console.timeEnd("creation"));var ht="z"+We;this.stats[ht]=(this.stats[ht]||0)+1,this.total++}if(At.source=Ge,rt){if(We===st.maxZoom||We===rt)continue;var pt=1<<rt-We;if(Be!==Math.floor(Se/pt)||Ye!==Math.floor(ze/pt))continue}else if(We===st.indexMaxZoom||At.numPoints<=st.indexMaxPoints)continue;if(At.source=null,0!==Ge.length){ct>1&&console.time("clipping");var gt,Pt,Ot,Ht,jt,Nt,Gt=.5*st.buffer/st.extent,un=.5-Gt,pn=.5+Gt,Kt=1+Gt;gt=Pt=Ot=Ht=null,jt=Ce(Ge,Tt,Be-Gt,Be+pn,0,At.minX,At.maxX,st),Nt=Ce(Ge,Tt,Be+un,Be+Kt,0,At.minX,At.maxX,st),Ge=null,jt&&(gt=Ce(jt,Tt,Ye-Gt,Ye+pn,1,At.minY,At.maxY,st),Pt=Ce(jt,Tt,Ye+un,Ye+Kt,1,At.minY,At.maxY,st),jt=null),Nt&&(Ot=Ce(Nt,Tt,Ye-Gt,Ye+pn,1,At.minY,At.maxY,st),Ht=Ce(Nt,Tt,Ye+un,Ye+Kt,1,At.minY,At.maxY,st),Nt=null),ct>1&&console.timeEnd("clipping"),Ke.push(gt||[],We+1,2*Be,2*Ye),Ke.push(Pt||[],We+1,2*Be,2*Ye+1),Ke.push(Ot||[],We+1,2*Be+1,2*Ye),Ke.push(Ht||[],We+1,2*Be+1,2*Ye+1)}}},Lt.prototype.getTile=function(Ge,We,Be){var Ye=this.options,rt=Ye.extent,Se=Ye.debug;if(Ge<0||Ge>24)return null;var ze=1<<Ge,Ke=Ct(Ge,We=(We%ze+ze)%ze,Be);if(this.tiles[Ke])return ot(this.tiles[Ke],rt);Se>1&&console.log("drilling down to z%d-%d-%d",Ge,We,Be);for(var st,ct=Ge,Tt=We,Et=Be;!st&&ct>0;)ct--,Tt=Math.floor(Tt/2),Et=Math.floor(Et/2),st=this.tiles[Ct(ct,Tt,Et)];return st&&st.source?(Se>1&&console.log("found parent tile z%d-%d-%d",ct,Tt,Et),Se>1&&console.time("drilling down"),this.splitTile(st.source,ct,Tt,Et,Ge,We,Be),Se>1&&console.timeEnd("drilling down"),this.tiles[Ke]?ot(this.tiles[Ke],rt):null):null};var Ut=function(Ge){function We(Be,Ye,rt,Se){Ge.call(this,Be,Ye,rt,It),Se&&(this.loadGeoJSON=Se)}return Ge&&(We.__proto__=Ge),(We.prototype=Object.create(Ge&&Ge.prototype)).constructor=We,We.prototype.loadData=function(Be,Ye){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),this._pendingCallback=Ye,this._pendingLoadDataParams=Be,this._state&&"Idle"!==this._state?this._state="NeedsLoadData":(this._state="Coalescing",this._loadData())},We.prototype._loadData=function(){var Be=this;if(this._pendingCallback&&this._pendingLoadDataParams){var Ye=this._pendingCallback,rt=this._pendingLoadDataParams;delete this._pendingCallback,delete this._pendingLoadDataParams;var Se=!!(rt&&rt.request&&rt.request.collectResourceTiming)&&new l.RequestPerformance(rt.request);this.loadGeoJSON(rt,function(ze,Ke){if(ze||!Ke)return Ye(ze);if("object"!=typeof Ke)return Ye(new Error("Input data given to '"+rt.source+"' is not a valid GeoJSON object."));c(Ke,!0);try{Be._geoJSONIndex=rt.cluster?new re(function(Tt){var Et=Tt.superclusterOptions,At=Tt.clusterProperties;if(!At||!Et)return Et;for(var ht={},pt={},gt={accumulated:null,zoom:0},Pt={properties:null},Ot=Object.keys(At),Ht=0,jt=Ot;Ht<jt.length;Ht+=1){var Nt=jt[Ht],Gt=At[Nt],un=Gt[0],Kt=l.createExpression(Gt[1]),wn=l.createExpression("string"==typeof un?[un,["accumulated"],["get",Nt]]:un);ht[Nt]=Kt.value,pt[Nt]=wn.value}return Et.map=function(Bn){Pt.properties=Bn;for(var vn={},cn=0,dn=Ot;cn<dn.length;cn+=1){var sn=dn[cn];vn[sn]=ht[sn].evaluate(gt,Pt)}return vn},Et.reduce=function(Bn,vn){Pt.properties=vn;for(var cn=0,dn=Ot;cn<dn.length;cn+=1){var sn=dn[cn];gt.accumulated=Bn[sn],Bn[sn]=pt[sn].evaluate(gt,Pt)}},Et}(rt)).load(Ke.features):new Lt(Tt=Ke,rt.geojsonVtOptions)}catch(Tt){return Ye(Tt)}var Tt;Be.loaded={};var st={};if(Se){var ct=Se.finish();ct&&(st.resourceTiming={},st.resourceTiming[rt.source]=JSON.parse(JSON.stringify(ct)))}Ye(null,st)})}},We.prototype.coalesce=function(){"Coalescing"===this._state?this._state="Idle":"NeedsLoadData"===this._state&&(this._state="Coalescing",this._loadData())},We.prototype.reloadTile=function(Be,Ye){var rt=this.loaded;return rt&&rt[Be.uid]?Ge.prototype.reloadTile.call(this,Be,Ye):this.loadTile(Be,Ye)},We.prototype.loadGeoJSON=function(Be,Ye){if(Be.request)l.getJSON(Be.request,Ye);else{if("string"!=typeof Be.data)return Ye(new Error("Input data given to '"+Be.source+"' is not a valid GeoJSON object."));try{return Ye(null,JSON.parse(Be.data))}catch{return Ye(new Error("Input data given to '"+Be.source+"' is not a valid GeoJSON object."))}}},We.prototype.removeSource=function(Be,Ye){this._pendingCallback&&this._pendingCallback(null,{abandoned:!0}),Ye()},We.prototype.getClusterExpansionZoom=function(Be,Ye){try{Ye(null,this._geoJSONIndex.getClusterExpansionZoom(Be.clusterId))}catch(rt){Ye(rt)}},We.prototype.getClusterChildren=function(Be,Ye){try{Ye(null,this._geoJSONIndex.getChildren(Be.clusterId))}catch(rt){Ye(rt)}},We.prototype.getClusterLeaves=function(Be,Ye){try{Ye(null,this._geoJSONIndex.getLeaves(Be.clusterId,Be.limit,Be.offset))}catch(rt){Ye(rt)}},We}(n),Rt=function(Ge){var We=this;this.self=Ge,this.actor=new l.Actor(Ge,this),this.layerIndexes={},this.availableImages={},this.workerSourceTypes={vector:n,geojson:Ut},this.workerSources={},this.demWorkerSources={},this.self.registerWorkerSource=function(Be,Ye){if(We.workerSourceTypes[Be])throw new Error('Worker source with name "'+Be+'" already registered.');We.workerSourceTypes[Be]=Ye},this.self.registerRTLTextPlugin=function(Be){if(l.plugin.isParsed())throw new Error("RTL text plugin already registered.");l.plugin.applyArabicShaping=Be.applyArabicShaping,l.plugin.processBidirectionalText=Be.processBidirectionalText,l.plugin.processStyledBidirectionalText=Be.processStyledBidirectionalText}};return Rt.prototype.setReferrer=function(Ge,We){this.referrer=We},Rt.prototype.setImages=function(Ge,We,Be){for(var Ye in this.availableImages[Ge]=We,this.workerSources[Ge]){var rt=this.workerSources[Ge][Ye];for(var Se in rt)rt[Se].availableImages=We}Be()},Rt.prototype.setLayers=function(Ge,We,Be){this.getLayerIndex(Ge).replace(We),Be()},Rt.prototype.updateLayers=function(Ge,We,Be){this.getLayerIndex(Ge).update(We.layers,We.removedIds),Be()},Rt.prototype.loadTile=function(Ge,We,Be){this.getWorkerSource(Ge,We.type,We.source).loadTile(We,Be)},Rt.prototype.loadDEMTile=function(Ge,We,Be){this.getDEMWorkerSource(Ge,We.source).loadTile(We,Be)},Rt.prototype.reloadTile=function(Ge,We,Be){this.getWorkerSource(Ge,We.type,We.source).reloadTile(We,Be)},Rt.prototype.abortTile=function(Ge,We,Be){this.getWorkerSource(Ge,We.type,We.source).abortTile(We,Be)},Rt.prototype.removeTile=function(Ge,We,Be){this.getWorkerSource(Ge,We.type,We.source).removeTile(We,Be)},Rt.prototype.removeDEMTile=function(Ge,We){this.getDEMWorkerSource(Ge,We.source).removeTile(We)},Rt.prototype.removeSource=function(Ge,We,Be){if(this.workerSources[Ge]&&this.workerSources[Ge][We.type]&&this.workerSources[Ge][We.type][We.source]){var Ye=this.workerSources[Ge][We.type][We.source];delete this.workerSources[Ge][We.type][We.source],void 0!==Ye.removeSource?Ye.removeSource(We,Be):Be()}},Rt.prototype.loadWorkerSource=function(Ge,We,Be){try{this.self.importScripts(We.url),Be()}catch(Ye){Be(Ye.toString())}},Rt.prototype.syncRTLPluginState=function(Ge,We,Be){try{l.plugin.setState(We);var Ye=l.plugin.getPluginURL();if(l.plugin.isLoaded()&&!l.plugin.isParsed()&&null!=Ye){this.self.importScripts(Ye);var rt=l.plugin.isParsed();Be(rt?void 0:new Error("RTL Text Plugin failed to import scripts from "+Ye),rt)}}catch(Se){Be(Se.toString())}},Rt.prototype.getAvailableImages=function(Ge){var We=this.availableImages[Ge];return We||(We=[]),We},Rt.prototype.getLayerIndex=function(Ge){var We=this.layerIndexes[Ge];return We||(We=this.layerIndexes[Ge]=new d),We},Rt.prototype.getWorkerSource=function(Ge,We,Be){var Ye=this;return this.workerSources[Ge]||(this.workerSources[Ge]={}),this.workerSources[Ge][We]||(this.workerSources[Ge][We]={}),this.workerSources[Ge][We][Be]||(this.workerSources[Ge][We][Be]=new this.workerSourceTypes[We]({send:function(Se,ze,Ke){Ye.actor.send(Se,ze,Ke,Ge)}},this.getLayerIndex(Ge),this.getAvailableImages(Ge))),this.workerSources[Ge][We][Be]},Rt.prototype.getDEMWorkerSource=function(Ge,We){return this.demWorkerSources[Ge]||(this.demWorkerSources[Ge]={}),this.demWorkerSources[Ge][We]||(this.demWorkerSources[Ge][We]=new a),this.demWorkerSources[Ge][We]},Rt.prototype.enforceCacheSizeLimit=function(Ge,We){l.enforceCacheSizeLimit(We)},typeof WorkerGlobalScope<"u"&&void 0!==l.window&&l.window instanceof WorkerGlobalScope&&(l.window.worker=new Rt(l.window)),Rt}),A(0,function(l){var T=l.createCommonjsModule(function(D){function Y(pe){return!q(pe)}function q(pe){return typeof window<"u"&&typeof document<"u"?Array.prototype&&Array.prototype.every&&Array.prototype.filter&&Array.prototype.forEach&&Array.prototype.indexOf&&Array.prototype.lastIndexOf&&Array.prototype.map&&Array.prototype.some&&Array.prototype.reduce&&Array.prototype.reduceRight&&Array.isArray?Function.prototype&&Function.prototype.bind?Object.keys&&Object.create&&Object.getPrototypeOf&&Object.getOwnPropertyNames&&Object.isSealed&&Object.isFrozen&&Object.isExtensible&&Object.getOwnPropertyDescriptor&&Object.defineProperty&&Object.defineProperties&&Object.seal&&Object.freeze&&Object.preventExtensions?"JSON"in window&&"parse"in JSON&&"stringify"in JSON?function(){if(!("Worker"in window&&"Blob"in window&&"URL"in window))return!1;var Ne,qe,et=new Blob([""],{type:"text/javascript"}),vt=URL.createObjectURL(et);try{qe=new Worker(vt),Ne=!0}catch{Ne=!1}return qe&&qe.terminate(),URL.revokeObjectURL(vt),Ne}()?"Uint8ClampedArray"in window?ArrayBuffer.isView?function(){var Ne=document.createElement("canvas");Ne.width=Ne.height=1;var qe=Ne.getContext("2d");if(!qe)return!1;var et=qe.getImageData(0,0,1,1);return et&&et.width===Ne.width}()?(void 0===ne[Le=pe&&pe.failIfMajorPerformanceCaveat]&&(ne[Le]=function(Ne){var vt,xt,te,qe=(vt=Ne,xt=document.createElement("canvas"),(te=Object.create(Y.webGLContextAttributes)).failIfMajorPerformanceCaveat=vt,xt.probablySupportsContext?xt.probablySupportsContext("webgl",te)||xt.probablySupportsContext("experimental-webgl",te):xt.supportsContext?xt.supportsContext("webgl",te)||xt.supportsContext("experimental-webgl",te):xt.getContext("webgl",te)||xt.getContext("experimental-webgl",te));if(!qe)return!1;var et=qe.createShader(qe.VERTEX_SHADER);return!(!et||qe.isContextLost())&&(qe.shaderSource(et,"void main() {}"),qe.compileShader(et),!0===qe.getShaderParameter(et,qe.COMPILE_STATUS))}(Le)),ne[Le]?void 0:"insufficient WebGL support"):"insufficient Canvas/getImageData support":"insufficient ArrayBuffer support":"insufficient Uint8ClampedArray support":"insufficient worker support":"insufficient JSON support":"insufficient Object support":"insufficient Function support":"insufficent Array support":"not a browser";var Le}D.exports?D.exports=Y:window&&(window.mapboxgl=window.mapboxgl||{},window.mapboxgl.supported=Y,window.mapboxgl.notSupportedReason=q);var ne={};Y.webGLContextAttributes={antialias:!1,alpha:!0,stencil:!0,depth:!0}}),b={create:function(D,Y,q){var ne=l.window.document.createElement(D);return void 0!==Y&&(ne.className=Y),q&&q.appendChild(ne),ne},createNS:function(D,Y){return l.window.document.createElementNS(D,Y)}},d=l.window.document.documentElement.style;function s(D){if(!d)return D[0];for(var Y=0;Y<D.length;Y++)if(D[Y]in d)return D[Y];return D[0]}var t,o=s(["userSelect","MozUserSelect","WebkitUserSelect","msUserSelect"]);b.disableDrag=function(){d&&o&&(t=d[o],d[o]="none")},b.enableDrag=function(){d&&o&&(d[o]=t)};var r=s(["transform","WebkitTransform"]);b.setTransform=function(D,Y){D.style[r]=Y};var n=!1;try{var i=Object.defineProperty({},"passive",{get:function(){n=!0}});l.window.addEventListener("test",i,i),l.window.removeEventListener("test",i,i)}catch{n=!1}b.addEventListener=function(D,Y,q,ne){void 0===ne&&(ne={}),D.addEventListener(Y,q,"passive"in ne&&n?ne:ne.capture)},b.removeEventListener=function(D,Y,q,ne){void 0===ne&&(ne={}),D.removeEventListener(Y,q,"passive"in ne&&n?ne:ne.capture)};var a=function(D){D.preventDefault(),D.stopPropagation(),l.window.removeEventListener("click",a,!0)};function c(D){var Y=D.userImage;return!!(Y&&Y.render&&Y.render())&&(D.data.replace(new Uint8Array(Y.data.buffer)),!0)}b.suppressClick=function(){l.window.addEventListener("click",a,!0),l.window.setTimeout(function(){l.window.removeEventListener("click",a,!0)},0)},b.mousePos=function(D,Y){var q=D.getBoundingClientRect();return new l.Point(Y.clientX-q.left-D.clientLeft,Y.clientY-q.top-D.clientTop)},b.touchPos=function(D,Y){for(var q=D.getBoundingClientRect(),ne=[],pe=0;pe<Y.length;pe++)ne.push(new l.Point(Y[pe].clientX-q.left-D.clientLeft,Y[pe].clientY-q.top-D.clientTop));return ne},b.mouseButton=function(D){return void 0!==l.window.InstallTrigger&&2===D.button&&D.ctrlKey&&l.window.navigator.platform.toUpperCase().indexOf("MAC")>=0?0:D.button},b.remove=function(D){D.parentNode&&D.parentNode.removeChild(D)};var p=function(D){function Y(){D.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new l.RGBAImage({width:1,height:1}),this.dirty=!0}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.isLoaded=function(){return this.loaded},Y.prototype.setLoaded=function(q){if(this.loaded!==q&&(this.loaded=q,q)){for(var ne=0,pe=this.requestors;ne<pe.length;ne+=1){var Le=pe[ne];this._notify(Le.ids,Le.callback)}this.requestors=[]}},Y.prototype.getImage=function(q){return this.images[q]},Y.prototype.addImage=function(q,ne){this._validate(q,ne)&&(this.images[q]=ne)},Y.prototype._validate=function(q,ne){var pe=!0;return this._validateStretch(ne.stretchX,ne.data&&ne.data.width)||(this.fire(new l.ErrorEvent(new Error('Image "'+q+'" has invalid "stretchX" value'))),pe=!1),this._validateStretch(ne.stretchY,ne.data&&ne.data.height)||(this.fire(new l.ErrorEvent(new Error('Image "'+q+'" has invalid "stretchY" value'))),pe=!1),this._validateContent(ne.content,ne)||(this.fire(new l.ErrorEvent(new Error('Image "'+q+'" has invalid "content" value'))),pe=!1),pe},Y.prototype._validateStretch=function(q,ne){if(!q)return!0;for(var pe=0,Le=0,Ne=q;Le<Ne.length;Le+=1){var qe=Ne[Le];if(qe[0]<pe||qe[1]<qe[0]||ne<qe[1])return!1;pe=qe[1]}return!0},Y.prototype._validateContent=function(q,ne){return!(q&&(4!==q.length||q[0]<0||ne.data.width<q[0]||q[1]<0||ne.data.height<q[1]||q[2]<0||ne.data.width<q[2]||q[3]<0||ne.data.height<q[3]||q[2]<q[0]||q[3]<q[1]))},Y.prototype.updateImage=function(q,ne){ne.version=this.images[q].version+1,this.images[q]=ne,this.updatedImages[q]=!0},Y.prototype.removeImage=function(q){var ne=this.images[q];delete this.images[q],delete this.patterns[q],ne.userImage&&ne.userImage.onRemove&&ne.userImage.onRemove()},Y.prototype.listImages=function(){return Object.keys(this.images)},Y.prototype.getImages=function(q,ne){var pe=!0;if(!this.isLoaded())for(var Le=0,Ne=q;Le<Ne.length;Le+=1)this.images[Ne[Le]]||(pe=!1);this.isLoaded()||pe?this._notify(q,ne):this.requestors.push({ids:q,callback:ne})},Y.prototype._notify=function(q,ne){for(var pe={},Le=0,Ne=q;Le<Ne.length;Le+=1){var qe=Ne[Le];this.images[qe]||this.fire(new l.Event("styleimagemissing",{id:qe}));var et=this.images[qe];et?pe[qe]={data:et.data.clone(),pixelRatio:et.pixelRatio,sdf:et.sdf,version:et.version,stretchX:et.stretchX,stretchY:et.stretchY,content:et.content,hasRenderCallback:!(!et.userImage||!et.userImage.render)}:l.warnOnce('Image "'+qe+'" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.')}ne(null,pe)},Y.prototype.getPixelSize=function(){var q=this.atlasImage;return{width:q.width,height:q.height}},Y.prototype.getPattern=function(q){var ne=this.patterns[q],pe=this.getImage(q);if(!pe)return null;if(ne&&ne.position.version===pe.version)return ne.position;if(ne)ne.position.version=pe.version;else{var Le={w:pe.data.width+2,h:pe.data.height+2,x:0,y:0},Ne=new l.ImagePosition(Le,pe);this.patterns[q]={bin:Le,position:Ne}}return this._updatePatternAtlas(),this.patterns[q].position},Y.prototype.bind=function(q){var ne=q.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new l.Texture(q,this.atlasImage,ne.RGBA),this.atlasTexture.bind(ne.LINEAR,ne.CLAMP_TO_EDGE)},Y.prototype._updatePatternAtlas=function(){var q=[];for(var ne in this.patterns)q.push(this.patterns[ne].bin);var pe=l.potpack(q),Le=pe.w,Ne=pe.h,qe=this.atlasImage;for(var et in qe.resize({width:Le||1,height:Ne||1}),this.patterns){var vt=this.patterns[et].bin,xt=vt.x+1,te=vt.y+1,ue=this.images[et].data,we=ue.width,Oe=ue.height;l.RGBAImage.copy(ue,qe,{x:0,y:0},{x:xt,y:te},{width:we,height:Oe}),l.RGBAImage.copy(ue,qe,{x:0,y:Oe-1},{x:xt,y:te-1},{width:we,height:1}),l.RGBAImage.copy(ue,qe,{x:0,y:0},{x:xt,y:te+Oe},{width:we,height:1}),l.RGBAImage.copy(ue,qe,{x:we-1,y:0},{x:xt-1,y:te},{width:1,height:Oe}),l.RGBAImage.copy(ue,qe,{x:0,y:0},{x:xt+we,y:te},{width:1,height:Oe})}this.dirty=!0},Y.prototype.beginFrame=function(){this.callbackDispatchedThisFrame={}},Y.prototype.dispatchRenderCallbacks=function(q){for(var ne=0,pe=q;ne<pe.length;ne+=1){var Le=pe[ne];if(!this.callbackDispatchedThisFrame[Le]){this.callbackDispatchedThisFrame[Le]=!0;var Ne=this.images[Le];c(Ne)&&this.updateImage(Le,Ne)}}},Y}(l.Evented),f=g,x=g,v=1e20;function g(D,Y,q,ne,pe,Le){this.fontSize=D||24,this.buffer=void 0===Y?3:Y,this.cutoff=ne||.25,this.fontFamily=pe||"sans-serif",this.fontWeight=Le||"normal",this.radius=q||8;var Ne=this.size=this.fontSize+2*this.buffer;this.canvas=document.createElement("canvas"),this.canvas.width=this.canvas.height=Ne,this.ctx=this.canvas.getContext("2d"),this.ctx.font=this.fontWeight+" "+this.fontSize+"px "+this.fontFamily,this.ctx.textBaseline="middle",this.ctx.fillStyle="black",this.gridOuter=new Float64Array(Ne*Ne),this.gridInner=new Float64Array(Ne*Ne),this.f=new Float64Array(Ne),this.d=new Float64Array(Ne),this.z=new Float64Array(Ne+1),this.v=new Int16Array(Ne),this.middle=Math.round(Ne/2*(navigator.userAgent.indexOf("Gecko/")>=0?1.2:1))}function y(D,Y,q,ne,pe,Le,Ne){for(var qe=0;qe<Y;qe++){for(var et=0;et<q;et++)ne[et]=D[et*Y+qe];for(h(ne,pe,Le,Ne,q),et=0;et<q;et++)D[et*Y+qe]=pe[et]}for(et=0;et<q;et++){for(qe=0;qe<Y;qe++)ne[qe]=D[et*Y+qe];for(h(ne,pe,Le,Ne,Y),qe=0;qe<Y;qe++)D[et*Y+qe]=Math.sqrt(pe[qe])}}function h(D,Y,q,ne,pe){q[0]=0,ne[0]=-v,ne[1]=+v;for(var Le=1,Ne=0;Le<pe;Le++){for(var qe=(D[Le]+Le*Le-(D[q[Ne]]+q[Ne]*q[Ne]))/(2*Le-2*q[Ne]);qe<=ne[Ne];)Ne--,qe=(D[Le]+Le*Le-(D[q[Ne]]+q[Ne]*q[Ne]))/(2*Le-2*q[Ne]);q[++Ne]=Le,ne[Ne]=qe,ne[Ne+1]=+v}for(Le=0,Ne=0;Le<pe;Le++){for(;ne[Ne+1]<Le;)Ne++;Y[Le]=(Le-q[Ne])*(Le-q[Ne])+D[q[Ne]]}}g.prototype.draw=function(D){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(D,this.buffer,this.middle);for(var Y=this.ctx.getImageData(0,0,this.size,this.size),q=new Uint8ClampedArray(this.size*this.size),ne=0;ne<this.size*this.size;ne++){var pe=Y.data[4*ne+3]/255;this.gridOuter[ne]=1===pe?0:0===pe?v:Math.pow(Math.max(0,.5-pe),2),this.gridInner[ne]=1===pe?v:0===pe?0:Math.pow(Math.max(0,pe-.5),2)}for(y(this.gridOuter,this.size,this.size,this.f,this.d,this.v,this.z),y(this.gridInner,this.size,this.size,this.f,this.d,this.v,this.z),ne=0;ne<this.size*this.size;ne++)q[ne]=Math.max(0,Math.min(255,Math.round(255-255*((this.gridOuter[ne]-this.gridInner[ne])/this.radius+this.cutoff))));return q},f.default=x;var m=function(D,Y){this.requestManager=D,this.localIdeographFontFamily=Y,this.entries={}};m.prototype.setURL=function(D){this.url=D},m.prototype.getGlyphs=function(D,Y){var q=this,ne=[];for(var pe in D)for(var Le=0,Ne=D[pe];Le<Ne.length;Le+=1)ne.push({stack:pe,id:Ne[Le]});l.asyncAll(ne,function(et,vt){var xt=et.stack,te=et.id,ue=q.entries[xt];ue||(ue=q.entries[xt]={glyphs:{},requests:{},ranges:{}});var we=ue.glyphs[te];if(void 0===we){if(we=q._tinySDF(ue,xt,te))return ue.glyphs[te]=we,void vt(null,{stack:xt,id:te,glyph:we});var Oe=Math.floor(te/256);if(256*Oe>65535)vt(new Error("glyphs > 65535 not supported"));else if(ue.ranges[Oe])vt(null,{stack:xt,id:te,glyph:we});else{var De=ue.requests[Oe];De||(De=ue.requests[Oe]=[],m.loadGlyphRange(xt,Oe,q.url,q.requestManager,function(Ue,Ze){if(Ze){for(var Je in Ze)q._doesCharSupportLocalGlyph(+Je)||(ue.glyphs[+Je]=Ze[+Je]);ue.ranges[Oe]=!0}for(var it=0,ut=De;it<ut.length;it+=1)(0,ut[it])(Ue,Ze);delete ue.requests[Oe]})),De.push(function(Ue,Ze){Ue?vt(Ue):Ze&&vt(null,{stack:xt,id:te,glyph:Ze[te]||null})})}}else vt(null,{stack:xt,id:te,glyph:we})},function(et,vt){if(et)Y(et);else if(vt){for(var xt={},te=0,ue=vt;te<ue.length;te+=1){var we=ue[te],Oe=we.stack,De=we.id,Ue=we.glyph;(xt[Oe]||(xt[Oe]={}))[De]=Ue&&{id:Ue.id,bitmap:Ue.bitmap.clone(),metrics:Ue.metrics}}Y(null,xt)}})},m.prototype._doesCharSupportLocalGlyph=function(D){return!!this.localIdeographFontFamily&&(l.isChar["CJK Unified Ideographs"](D)||l.isChar["Hangul Syllables"](D)||l.isChar.Hiragana(D)||l.isChar.Katakana(D))},m.prototype._tinySDF=function(D,Y,q){var ne=this.localIdeographFontFamily;if(ne&&this._doesCharSupportLocalGlyph(q)){var pe=D.tinySDF;if(!pe){var Le="400";/bold/i.test(Y)?Le="900":/medium/i.test(Y)?Le="500":/light/i.test(Y)&&(Le="200"),pe=D.tinySDF=new m.TinySDF(24,3,8,.25,ne,Le)}return{id:q,bitmap:new l.AlphaImage({width:30,height:30},pe.draw(String.fromCharCode(q))),metrics:{width:24,height:24,left:0,top:-8,advance:24}}}},m.loadGlyphRange=function(D,Y,q,ne,pe){var Le=256*Y,Ne=Le+255,qe=ne.transformRequest(ne.normalizeGlyphsURL(q).replace("{fontstack}",D).replace("{range}",Le+"-"+Ne),l.ResourceType.Glyphs);l.getArrayBuffer(qe,function(et,vt){if(et)pe(et);else if(vt){for(var xt={},te=0,ue=l.parseGlyphPBF(vt);te<ue.length;te+=1){var we=ue[te];xt[we.id]=we}pe(null,xt)}})},m.TinySDF=f;var w=function(){this.specification=l.styleSpec.light.position};w.prototype.possiblyEvaluate=function(D,Y){return l.sphericalToCartesian(D.expression.evaluate(Y))},w.prototype.interpolate=function(D,Y,q){return{x:l.number(D.x,Y.x,q),y:l.number(D.y,Y.y,q),z:l.number(D.z,Y.z,q)}};var u=new l.Properties({anchor:new l.DataConstantProperty(l.styleSpec.light.anchor),position:new w,color:new l.DataConstantProperty(l.styleSpec.light.color),intensity:new l.DataConstantProperty(l.styleSpec.light.intensity)}),_=function(D){function Y(q){D.call(this),this._transitionable=new l.Transitionable(u),this.setLight(q),this._transitioning=this._transitionable.untransitioned()}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getLight=function(){return this._transitionable.serialize()},Y.prototype.setLight=function(q,ne){if(void 0===ne&&(ne={}),!this._validate(l.validateLight,q,ne))for(var pe in q){var Le=q[pe];l.endsWith(pe,"-transition")?this._transitionable.setTransition(pe.slice(0,-11),Le):this._transitionable.setValue(pe,Le)}},Y.prototype.updateTransitions=function(q){this._transitioning=this._transitionable.transitioned(q,this._transitioning)},Y.prototype.hasTransition=function(){return this._transitioning.hasTransition()},Y.prototype.recalculate=function(q){this.properties=this._transitioning.possiblyEvaluate(q)},Y.prototype._validate=function(q,ne,pe){return(!pe||!1!==pe.validate)&&l.emitValidationErrors(this,q.call(l.validateStyle,l.extend({value:ne,style:{glyphs:!0,sprite:!0},styleSpec:l.styleSpec})))},Y}(l.Evented),E=function(D,Y){this.width=D,this.height=Y,this.nextRow=0,this.data=new Uint8Array(this.width*this.height),this.dashEntry={}};E.prototype.getDash=function(D,Y){var q=D.join(",")+String(Y);return this.dashEntry[q]||(this.dashEntry[q]=this.addDash(D,Y)),this.dashEntry[q]},E.prototype.getDashRanges=function(D,Y,q){var ne=[],pe=D.length%2==1?-D[D.length-1]*q:0,Le=D[0]*q,Ne=!0;ne.push({left:pe,right:Le,isDash:Ne,zeroLength:0===D[0]});for(var qe=D[0],et=1;et<D.length;et++){var vt=D[et];pe=qe*q,Le=(qe+=vt)*q,ne.push({left:pe,right:Le,isDash:Ne=!Ne,zeroLength:0===vt})}return ne},E.prototype.addRoundDash=function(D,Y,q){for(var ne=Y/2,pe=-q;pe<=q;pe++)for(var Ne=this.width*(this.nextRow+q+pe),qe=0,et=D[qe],vt=0;vt<this.width;vt++){vt/et.right>1&&(et=D[++qe]);var xt=Math.abs(vt-et.left),te=Math.abs(vt-et.right),ue=Math.min(xt,te),we=void 0,Oe=pe/q*(ne+1);if(et.isDash){var De=ne-Math.abs(Oe);we=Math.sqrt(ue*ue+De*De)}else we=ne-Math.sqrt(ue*ue+Oe*Oe);this.data[Ne+vt]=Math.max(0,Math.min(255,we+128))}},E.prototype.addRegularDash=function(D){for(var Y=D.length-1;Y>=0;--Y){var q=D[Y],ne=D[Y+1];q.zeroLength?D.splice(Y,1):ne&&ne.isDash===q.isDash&&(ne.left=q.left,D.splice(Y,1))}var pe=D[0],Le=D[D.length-1];pe.isDash===Le.isDash&&(pe.left=Le.left-this.width,Le.right=pe.right+this.width);for(var Ne=this.width*this.nextRow,qe=0,et=D[qe],vt=0;vt<this.width;vt++){vt/et.right>1&&(et=D[++qe]);var xt=Math.abs(vt-et.left),te=Math.abs(vt-et.right),ue=Math.min(xt,te);this.data[Ne+vt]=Math.max(0,Math.min(255,(et.isDash?ue:-ue)+128))}},E.prototype.addDash=function(D,Y){var q=Y?7:0,ne=2*q+1;if(this.nextRow+ne>this.height)return l.warnOnce("LineAtlas out of space"),null;for(var pe=0,Le=0;Le<D.length;Le++)pe+=D[Le];if(0!==pe){var Ne=this.width/pe,qe=this.getDashRanges(D,this.width,Ne);Y?this.addRoundDash(qe,Ne,q):this.addRegularDash(qe)}var et={y:(this.nextRow+q+.5)/this.height,height:2*q/this.height,width:pe};return this.nextRow+=ne,this.dirty=!0,et},E.prototype.bind=function(D){var Y=D.gl;this.texture?(Y.bindTexture(Y.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,Y.texSubImage2D(Y.TEXTURE_2D,0,0,0,this.width,this.height,Y.ALPHA,Y.UNSIGNED_BYTE,this.data))):(this.texture=Y.createTexture(),Y.bindTexture(Y.TEXTURE_2D,this.texture),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_WRAP_S,Y.REPEAT),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_WRAP_T,Y.REPEAT),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_MIN_FILTER,Y.LINEAR),Y.texParameteri(Y.TEXTURE_2D,Y.TEXTURE_MAG_FILTER,Y.LINEAR),Y.texImage2D(Y.TEXTURE_2D,0,Y.ALPHA,this.width,this.height,0,Y.ALPHA,Y.UNSIGNED_BYTE,this.data))};var L=function D(Y,q){this.workerPool=Y,this.actors=[],this.currentActor=0,this.id=l.uniqueId();for(var ne=this.workerPool.acquire(this.id),pe=0;pe<ne.length;pe++){var Ne=new D.Actor(ne[pe],q,this.id);Ne.name="Worker "+pe,this.actors.push(Ne)}};function C(D,Y,q){var ne=function(pe,Le){if(pe)return q(pe);if(Le){var Ne=l.pick(l.extend(Le,D),["tiles","minzoom","maxzoom","attribution","mapbox_logo","bounds","scheme","tileSize","encoding"]);Le.vector_layers&&(Ne.vectorLayers=Le.vector_layers,Ne.vectorLayerIds=Ne.vectorLayers.map(function(qe){return qe.id})),Ne.tiles=Y.canonicalizeTileset(Ne,D.url),q(null,Ne)}};return D.url?l.getJSON(Y.transformRequest(Y.normalizeSourceURL(D.url),l.ResourceType.Source),ne):l.browser.frame(function(){return ne(null,D)})}L.prototype.broadcast=function(D,Y,q){l.asyncAll(this.actors,function(ne,pe){ne.send(D,Y,pe)},q=q||function(){})},L.prototype.getActor=function(){return this.currentActor=(this.currentActor+1)%this.actors.length,this.actors[this.currentActor]},L.prototype.remove=function(){this.actors.forEach(function(D){D.remove()}),this.actors=[],this.workerPool.release(this.id)},L.Actor=l.Actor;var P=function(D,Y,q){this.bounds=l.LngLatBounds.convert(this.validateBounds(D)),this.minzoom=Y||0,this.maxzoom=q||24};P.prototype.validateBounds=function(D){return Array.isArray(D)&&4===D.length?[Math.max(-180,D[0]),Math.max(-90,D[1]),Math.min(180,D[2]),Math.min(90,D[3])]:[-180,-90,180,90]},P.prototype.contains=function(D){var Y=Math.pow(2,D.z),q=Math.floor(l.mercatorXfromLng(this.bounds.getWest())*Y),ne=Math.floor(l.mercatorYfromLat(this.bounds.getNorth())*Y),pe=Math.ceil(l.mercatorXfromLng(this.bounds.getEast())*Y),Le=Math.ceil(l.mercatorYfromLat(this.bounds.getSouth())*Y);return D.x>=q&&D.x<pe&&D.y>=ne&&D.y<Le};var I=function(D){function Y(q,ne,pe,Le){if(D.call(this),this.id=q,this.dispatcher=pe,this.type="vector",this.minzoom=0,this.maxzoom=22,this.scheme="xyz",this.tileSize=512,this.reparseOverscaled=!0,this.isTileClipped=!0,this._loaded=!1,l.extend(this,l.pick(ne,["url","scheme","tileSize","promoteId"])),this._options=l.extend({type:"vector"},ne),this._collectResourceTiming=ne.collectResourceTiming,512!==this.tileSize)throw new Error("vector tile sources must have a tileSize of 512");this.setEventedParent(Le)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.load=function(){var q=this;this._loaded=!1,this.fire(new l.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=C(this._options,this.map._requestManager,function(ne,pe){q._tileJSONRequest=null,q._loaded=!0,ne?q.fire(new l.ErrorEvent(ne)):pe&&(l.extend(q,pe),pe.bounds&&(q.tileBounds=new P(pe.bounds,q.minzoom,q.maxzoom)),l.postTurnstileEvent(pe.tiles,q.map._requestManager._customAccessToken),l.postMapLoadEvent(pe.tiles,q.map._getMapId(),q.map._requestManager._skuToken,q.map._requestManager._customAccessToken),q.fire(new l.Event("data",{dataType:"source",sourceDataType:"metadata"})),q.fire(new l.Event("data",{dataType:"source",sourceDataType:"content"})))})},Y.prototype.loaded=function(){return this._loaded},Y.prototype.hasTile=function(q){return!this.tileBounds||this.tileBounds.contains(q.canonical)},Y.prototype.onAdd=function(q){this.map=q,this.load()},Y.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},Y.prototype.serialize=function(){return l.extend({},this._options)},Y.prototype.loadTile=function(q,ne){var pe=this.map._requestManager.normalizeTileURL(q.tileID.canonical.url(this.tiles,this.scheme)),Le={request:this.map._requestManager.transformRequest(pe,l.ResourceType.Tile),uid:q.uid,tileID:q.tileID,zoom:q.tileID.overscaledZ,tileSize:this.tileSize*q.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:l.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};function Ne(qe,et){return delete q.request,q.aborted?ne(null):qe&&404!==qe.status?ne(qe):(et&&et.resourceTiming&&(q.resourceTiming=et.resourceTiming),this.map._refreshExpiredTiles&&et&&q.setExpiryData(et),q.loadVectorData(et,this.map.painter),l.cacheEntryPossiblyAdded(this.dispatcher),ne(null),void(q.reloadCallback&&(this.loadTile(q,q.reloadCallback),q.reloadCallback=null)))}Le.request.collectResourceTiming=this._collectResourceTiming,q.actor&&"expired"!==q.state?"loading"===q.state?q.reloadCallback=ne:q.request=q.actor.send("reloadTile",Le,Ne.bind(this)):(q.actor=this.dispatcher.getActor(),q.request=q.actor.send("loadTile",Le,Ne.bind(this)))},Y.prototype.abortTile=function(q){q.request&&(q.request.cancel(),delete q.request),q.actor&&q.actor.send("abortTile",{uid:q.uid,type:this.type,source:this.id},void 0)},Y.prototype.unloadTile=function(q){q.unloadVectorData(),q.actor&&q.actor.send("removeTile",{uid:q.uid,type:this.type,source:this.id},void 0)},Y.prototype.hasTransition=function(){return!1},Y}(l.Evented),U=function(D){function Y(q,ne,pe,Le){D.call(this),this.id=q,this.dispatcher=pe,this.setEventedParent(Le),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=l.extend({type:"raster"},ne),l.extend(this,l.pick(ne,["url","scheme","tileSize"]))}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.load=function(){var q=this;this._loaded=!1,this.fire(new l.Event("dataloading",{dataType:"source"})),this._tileJSONRequest=C(this._options,this.map._requestManager,function(ne,pe){q._tileJSONRequest=null,q._loaded=!0,ne?q.fire(new l.ErrorEvent(ne)):pe&&(l.extend(q,pe),pe.bounds&&(q.tileBounds=new P(pe.bounds,q.minzoom,q.maxzoom)),l.postTurnstileEvent(pe.tiles),l.postMapLoadEvent(pe.tiles,q.map._getMapId(),q.map._requestManager._skuToken),q.fire(new l.Event("data",{dataType:"source",sourceDataType:"metadata"})),q.fire(new l.Event("data",{dataType:"source",sourceDataType:"content"})))})},Y.prototype.loaded=function(){return this._loaded},Y.prototype.onAdd=function(q){this.map=q,this.load()},Y.prototype.onRemove=function(){this._tileJSONRequest&&(this._tileJSONRequest.cancel(),this._tileJSONRequest=null)},Y.prototype.serialize=function(){return l.extend({},this._options)},Y.prototype.hasTile=function(q){return!this.tileBounds||this.tileBounds.contains(q.canonical)},Y.prototype.loadTile=function(q,ne){var pe=this,Le=this.map._requestManager.normalizeTileURL(q.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);q.request=l.getImage(this.map._requestManager.transformRequest(Le,l.ResourceType.Tile),function(Ne,qe){if(delete q.request,q.aborted)q.state="unloaded",ne(null);else if(Ne)q.state="errored",ne(Ne);else if(qe){pe.map._refreshExpiredTiles&&q.setExpiryData(qe),delete qe.cacheControl,delete qe.expires;var et=pe.map.painter.context,vt=et.gl;q.texture=pe.map.painter.getTileTexture(qe.width),q.texture?q.texture.update(qe,{useMipmap:!0}):(q.texture=new l.Texture(et,qe,vt.RGBA,{useMipmap:!0}),q.texture.bind(vt.LINEAR,vt.CLAMP_TO_EDGE,vt.LINEAR_MIPMAP_NEAREST),et.extTextureFilterAnisotropic&&vt.texParameterf(vt.TEXTURE_2D,et.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,et.extTextureFilterAnisotropicMax)),q.state="loaded",l.cacheEntryPossiblyAdded(pe.dispatcher),ne(null)}})},Y.prototype.abortTile=function(q,ne){q.request&&(q.request.cancel(),delete q.request),ne()},Y.prototype.unloadTile=function(q,ne){q.texture&&this.map.painter.saveTileTexture(q.texture),ne()},Y.prototype.hasTransition=function(){return!1},Y}(l.Evented),z=function(D){function Y(q,ne,pe,Le){D.call(this,q,ne,pe,Le),this.type="raster-dem",this.maxzoom=22,this._options=l.extend({type:"raster-dem"},ne),this.encoding=ne.encoding||"mapbox"}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.serialize=function(){return{type:"raster-dem",url:this.url,tileSize:this.tileSize,tiles:this.tiles,bounds:this.bounds,encoding:this.encoding}},Y.prototype.loadTile=function(q,ne){var pe=this.map._requestManager.normalizeTileURL(q.tileID.canonical.url(this.tiles,this.scheme),this.tileSize);function Le(Ne,qe){Ne&&(q.state="errored",ne(Ne)),qe&&(q.dem=qe,q.needsHillshadePrepare=!0,q.state="loaded",ne(null))}q.request=l.getImage(this.map._requestManager.transformRequest(pe,l.ResourceType.Tile),function(Ne,qe){if(delete q.request,q.aborted)q.state="unloaded",ne(null);else if(Ne)q.state="errored",ne(Ne);else if(qe){this.map._refreshExpiredTiles&&q.setExpiryData(qe),delete qe.cacheControl,delete qe.expires;var et=l.window.ImageBitmap&&qe instanceof l.window.ImageBitmap&&l.offscreenCanvasSupported()?qe:l.browser.getImageData(qe,1),vt={uid:q.uid,coord:q.tileID,source:this.id,rawImageData:et,encoding:this.encoding};q.actor&&"expired"!==q.state||(q.actor=this.dispatcher.getActor(),q.actor.send("loadDEMTile",vt,Le.bind(this)))}}.bind(this)),q.neighboringTiles=this._getNeighboringTiles(q.tileID)},Y.prototype._getNeighboringTiles=function(q){var ne=q.canonical,pe=Math.pow(2,ne.z),Le=(ne.x-1+pe)%pe,Ne=0===ne.x?q.wrap-1:q.wrap,qe=(ne.x+1+pe)%pe,et=ne.x+1===pe?q.wrap+1:q.wrap,vt={};return vt[new l.OverscaledTileID(q.overscaledZ,Ne,ne.z,Le,ne.y).key]={backfilled:!1},vt[new l.OverscaledTileID(q.overscaledZ,et,ne.z,qe,ne.y).key]={backfilled:!1},ne.y>0&&(vt[new l.OverscaledTileID(q.overscaledZ,Ne,ne.z,Le,ne.y-1).key]={backfilled:!1},vt[new l.OverscaledTileID(q.overscaledZ,q.wrap,ne.z,ne.x,ne.y-1).key]={backfilled:!1},vt[new l.OverscaledTileID(q.overscaledZ,et,ne.z,qe,ne.y-1).key]={backfilled:!1}),ne.y+1<pe&&(vt[new l.OverscaledTileID(q.overscaledZ,Ne,ne.z,Le,ne.y+1).key]={backfilled:!1},vt[new l.OverscaledTileID(q.overscaledZ,q.wrap,ne.z,ne.x,ne.y+1).key]={backfilled:!1},vt[new l.OverscaledTileID(q.overscaledZ,et,ne.z,qe,ne.y+1).key]={backfilled:!1}),vt},Y.prototype.unloadTile=function(q){q.demTexture&&this.map.painter.saveTileTexture(q.demTexture),q.fbo&&(q.fbo.destroy(),delete q.fbo),q.dem&&delete q.dem,delete q.neighboringTiles,q.state="unloaded",q.actor&&q.actor.send("removeDEMTile",{uid:q.uid,source:this.id})},Y}(U),H=function(D){function Y(q,ne,pe,Le){D.call(this),this.id=q,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._loaded=!1,this.actor=pe.getActor(),this.setEventedParent(Le),this._data=ne.data,this._options=l.extend({},ne),this._collectResourceTiming=ne.collectResourceTiming,this._resourceTiming=[],void 0!==ne.maxzoom&&(this.maxzoom=ne.maxzoom),ne.type&&(this.type=ne.type),ne.attribution&&(this.attribution=ne.attribution),this.promoteId=ne.promoteId;var Ne=l.EXTENT/this.tileSize;this.workerOptions=l.extend({source:this.id,cluster:ne.cluster||!1,geojsonVtOptions:{buffer:(void 0!==ne.buffer?ne.buffer:128)*Ne,tolerance:(void 0!==ne.tolerance?ne.tolerance:.375)*Ne,extent:l.EXTENT,maxZoom:this.maxzoom,lineMetrics:ne.lineMetrics||!1,generateId:ne.generateId||!1},superclusterOptions:{maxZoom:void 0!==ne.clusterMaxZoom?Math.min(ne.clusterMaxZoom,this.maxzoom-1):this.maxzoom-1,extent:l.EXTENT,radius:(ne.clusterRadius||50)*Ne,log:!1,generateId:ne.generateId||!1},clusterProperties:ne.clusterProperties},ne.workerOptions)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.load=function(){var q=this;this.fire(new l.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(ne){if(ne)q.fire(new l.ErrorEvent(ne));else{var pe={dataType:"source",sourceDataType:"metadata"};q._collectResourceTiming&&q._resourceTiming&&q._resourceTiming.length>0&&(pe.resourceTiming=q._resourceTiming,q._resourceTiming=[]),q.fire(new l.Event("data",pe))}})},Y.prototype.onAdd=function(q){this.map=q,this.load()},Y.prototype.setData=function(q){var ne=this;return this._data=q,this.fire(new l.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(pe){if(pe)ne.fire(new l.ErrorEvent(pe));else{var Le={dataType:"source",sourceDataType:"content"};ne._collectResourceTiming&&ne._resourceTiming&&ne._resourceTiming.length>0&&(Le.resourceTiming=ne._resourceTiming,ne._resourceTiming=[]),ne.fire(new l.Event("data",Le))}}),this},Y.prototype.getClusterExpansionZoom=function(q,ne){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:q,source:this.id},ne),this},Y.prototype.getClusterChildren=function(q,ne){return this.actor.send("geojson.getClusterChildren",{clusterId:q,source:this.id},ne),this},Y.prototype.getClusterLeaves=function(q,ne,pe,Le){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:q,limit:ne,offset:pe},Le),this},Y.prototype._updateWorkerData=function(q){var ne=this;this._loaded=!1;var pe=l.extend({},this.workerOptions),Le=this._data;"string"==typeof Le?(pe.request=this.map._requestManager.transformRequest(l.browser.resolveURL(Le),l.ResourceType.Source),pe.request.collectResourceTiming=this._collectResourceTiming):pe.data=JSON.stringify(Le),this.actor.send(this.type+".loadData",pe,function(Ne,qe){ne._removed||qe&&qe.abandoned||(ne._loaded=!0,qe&&qe.resourceTiming&&qe.resourceTiming[ne.id]&&(ne._resourceTiming=qe.resourceTiming[ne.id].slice(0)),ne.actor.send(ne.type+".coalesce",{source:pe.source},null),q(Ne))})},Y.prototype.loaded=function(){return this._loaded},Y.prototype.loadTile=function(q,ne){var pe=this,Le=q.actor?"reloadTile":"loadTile";q.actor=this.actor,q.request=this.actor.send(Le,{type:this.type,uid:q.uid,tileID:q.tileID,zoom:q.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:l.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId},function(qe,et){return delete q.request,q.unloadVectorData(),q.aborted?ne(null):qe?ne(qe):(q.loadVectorData(et,pe.map.painter,"reloadTile"===Le),ne(null))})},Y.prototype.abortTile=function(q){q.request&&(q.request.cancel(),delete q.request),q.aborted=!0},Y.prototype.unloadTile=function(q){q.unloadVectorData(),this.actor.send("removeTile",{uid:q.uid,type:this.type,source:this.id})},Y.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},Y.prototype.serialize=function(){return l.extend({},this._options,{type:this.type,data:this._data})},Y.prototype.hasTransition=function(){return!1},Y}(l.Evented),F=l.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),N=function(D){function Y(q,ne,pe,Le){D.call(this),this.id=q,this.dispatcher=pe,this.coordinates=ne.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Le),this.options=ne}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.load=function(q,ne){var pe=this;this._loaded=!1,this.fire(new l.Event("dataloading",{dataType:"source"})),this.url=this.options.url,l.getImage(this.map._requestManager.transformRequest(this.url,l.ResourceType.Image),function(Le,Ne){pe._loaded=!0,Le?pe.fire(new l.ErrorEvent(Le)):Ne&&(pe.image=Ne,q&&(pe.coordinates=q),ne&&ne(),pe._finishLoading())})},Y.prototype.loaded=function(){return this._loaded},Y.prototype.updateImage=function(q){var ne=this;return this.image&&q.url?(this.options.url=q.url,this.load(q.coordinates,function(){ne.texture=null}),this):this},Y.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new l.Event("data",{dataType:"source",sourceDataType:"metadata"})))},Y.prototype.onAdd=function(q){this.map=q,this.load()},Y.prototype.setCoordinates=function(q){var ne=this;this.coordinates=q;var pe=q.map(l.MercatorCoordinate.fromLngLat);this.tileID=function(Ne){for(var qe=1/0,et=1/0,vt=-1/0,xt=-1/0,te=0,ue=Ne;te<ue.length;te+=1){var we=ue[te];qe=Math.min(qe,we.x),et=Math.min(et,we.y),vt=Math.max(vt,we.x),xt=Math.max(xt,we.y)}var Ue=Math.max(vt-qe,xt-et),Ze=Math.max(0,Math.floor(-Math.log(Ue)/Math.LN2)),Je=Math.pow(2,Ze);return new l.CanonicalTileID(Ze,Math.floor((qe+vt)/2*Je),Math.floor((et+xt)/2*Je))}(pe),this.minzoom=this.maxzoom=this.tileID.z;var Le=pe.map(function(Ne){return ne.tileID.getTilePoint(Ne)._round()});return this._boundsArray=new l.StructArrayLayout4i8,this._boundsArray.emplaceBack(Le[0].x,Le[0].y,0,0),this._boundsArray.emplaceBack(Le[1].x,Le[1].y,l.EXTENT,0),this._boundsArray.emplaceBack(Le[3].x,Le[3].y,0,l.EXTENT),this._boundsArray.emplaceBack(Le[2].x,Le[2].y,l.EXTENT,l.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new l.Event("data",{dataType:"source",sourceDataType:"content"})),this},Y.prototype.prepare=function(){if(0!==Object.keys(this.tiles).length&&this.image){var q=this.map.painter.context,ne=q.gl;for(var pe in this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,F.members)),this.boundsSegments||(this.boundsSegments=l.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new l.Texture(q,this.image,ne.RGBA),this.texture.bind(ne.LINEAR,ne.CLAMP_TO_EDGE)),this.tiles){var Le=this.tiles[pe];"loaded"!==Le.state&&(Le.state="loaded",Le.texture=this.texture)}}},Y.prototype.loadTile=function(q,ne){this.tileID&&this.tileID.equals(q.tileID.canonical)?(this.tiles[String(q.tileID.wrap)]=q,q.buckets={},ne(null)):(q.state="errored",ne(null))},Y.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},Y.prototype.hasTransition=function(){return!1},Y}(l.Evented),B=function(D){function Y(q,ne,pe,Le){D.call(this,q,ne,pe,Le),this.roundZoom=!0,this.type="video",this.options=ne}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.load=function(){var q=this;this._loaded=!1;var ne=this.options;this.urls=[];for(var pe=0,Le=ne.urls;pe<Le.length;pe+=1)this.urls.push(this.map._requestManager.transformRequest(Le[pe],l.ResourceType.Source).url);l.getVideo(this.urls,function(qe,et){q._loaded=!0,qe?q.fire(new l.ErrorEvent(qe)):et&&(q.video=et,q.video.loop=!0,q.video.addEventListener("playing",function(){q.map.triggerRepaint()}),q.map&&q.video.play(),q._finishLoading())})},Y.prototype.pause=function(){this.video&&this.video.pause()},Y.prototype.play=function(){this.video&&this.video.play()},Y.prototype.seek=function(q){if(this.video){var ne=this.video.seekable;q<ne.start(0)||q>ne.end(0)?this.fire(new l.ErrorEvent(new l.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+ne.start(0)+" and "+ne.end(0)+"-second mark."))):this.video.currentTime=q}},Y.prototype.getVideo=function(){return this.video},Y.prototype.onAdd=function(q){this.map||(this.map=q,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},Y.prototype.prepare=function(){if(!(0===Object.keys(this.tiles).length||this.video.readyState<2)){var q=this.map.painter.context,ne=q.gl;for(var pe in this.boundsBuffer||(this.boundsBuffer=q.createVertexBuffer(this._boundsArray,F.members)),this.boundsSegments||(this.boundsSegments=l.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(ne.LINEAR,ne.CLAMP_TO_EDGE),ne.texSubImage2D(ne.TEXTURE_2D,0,0,0,ne.RGBA,ne.UNSIGNED_BYTE,this.video)):(this.texture=new l.Texture(q,this.video,ne.RGBA),this.texture.bind(ne.LINEAR,ne.CLAMP_TO_EDGE)),this.tiles){var Le=this.tiles[pe];"loaded"!==Le.state&&(Le.state="loaded",Le.texture=this.texture)}}},Y.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},Y.prototype.hasTransition=function(){return this.video&&!this.video.paused},Y}(N),j=function(D){function Y(q,ne,pe,Le){D.call(this,q,ne,pe,Le),ne.coordinates?Array.isArray(ne.coordinates)&&4===ne.coordinates.length&&!ne.coordinates.some(function(Ne){return!Array.isArray(Ne)||2!==Ne.length||Ne.some(function(qe){return"number"!=typeof qe})})||this.fire(new l.ErrorEvent(new l.ValidationError("sources."+q,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new l.ErrorEvent(new l.ValidationError("sources."+q,null,'missing required property "coordinates"'))),ne.animate&&"boolean"!=typeof ne.animate&&this.fire(new l.ErrorEvent(new l.ValidationError("sources."+q,null,'optional "animate" property must be a boolean value'))),ne.canvas?"string"==typeof ne.canvas||ne.canvas instanceof l.window.HTMLCanvasElement||this.fire(new l.ErrorEvent(new l.ValidationError("sources."+q,null,'"canvas" must be either a string representing the ID of the canvas element from which to read, or an HTMLCanvasElement instance'))):this.fire(new l.ErrorEvent(new l.ValidationError("sources."+q,null,'missing required property "canvas"'))),this.options=ne,this.animate=void 0===ne.animate||ne.animate}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.load=function(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof l.window.HTMLCanvasElement?this.options.canvas:l.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new l.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())},Y.prototype.getCanvas=function(){return this.canvas},Y.prototype.onAdd=function(q){this.map=q,this.load(),this.canvas&&this.animate&&this.play()},Y.prototype.onRemove=function(){this.pause()},Y.prototype.prepare=function(){var q=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,q=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,q=!0),!this._hasInvalidDimensions()&&0!==Object.keys(this.tiles).length){var ne=this.map.painter.context,pe=ne.gl;for(var Le in this.boundsBuffer||(this.boundsBuffer=ne.createVertexBuffer(this._boundsArray,F.members)),this.boundsSegments||(this.boundsSegments=l.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(q||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new l.Texture(ne,this.canvas,pe.RGBA,{premultiply:!0}),this.tiles){var Ne=this.tiles[Le];"loaded"!==Ne.state&&(Ne.state="loaded",Ne.texture=this.texture)}}},Y.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},Y.prototype.hasTransition=function(){return this._playing},Y.prototype._hasInvalidDimensions=function(){for(var q=0,ne=[this.canvas.width,this.canvas.height];q<ne.length;q+=1){var pe=ne[q];if(isNaN(pe)||pe<=0)return!0}return!1},Y}(N),J={vector:I,raster:U,"raster-dem":z,geojson:H,video:B,image:N,canvas:j};function G(D,Y){var q=l.identity([]);return l.translate(q,q,[1,1,0]),l.scale(q,q,[.5*D.width,.5*D.height,1]),l.multiply(q,q,D.calculatePosMatrix(Y.toUnwrapped()))}function V(D,Y,q,ne,pe,Le){var Ne=function(De,Ue,Ze){if(De)for(var Je=0,it=De;Je<it.length;Je+=1){var ut=Ue[it[Je]];if(ut&&ut.source===Ze&&"fill-extrusion"===ut.type)return!0}else for(var St in Ue){var Dt=Ue[St];if(Dt.source===Ze&&"fill-extrusion"===Dt.type)return!0}return!1}(pe&&pe.layers,Y,D.id),qe=Le.maxPitchScaleFactor(),et=D.tilesIn(ne,qe,Ne);et.sort(W);for(var vt=[],xt=0,te=et;xt<te.length;xt+=1){var ue=te[xt];vt.push({wrappedTileID:ue.tileID.wrapped().key,queryResults:ue.tile.queryRenderedFeatures(Y,q,D._state,ue.queryGeometry,ue.cameraQueryGeometry,ue.scale,pe,Le,qe,G(D.transform,ue.tileID))})}var we=function(De){for(var Ue={},Ze={},Je=0,it=De;Je<it.length;Je+=1){var ut=it[Je],St=ut.queryResults,Dt=ut.wrappedTileID,Ft=Ze[Dt]=Ze[Dt]||{};for(var Yt in St)for(var ln=St[Yt],Xt=Ft[Yt]=Ft[Yt]||{},en=Ue[Yt]=Ue[Yt]||[],Jt=0,bn=ln;Jt<bn.length;Jt+=1){var gn=bn[Jt];Xt[gn.featureIndex]||(Xt[gn.featureIndex]=!0,en.push(gn))}}return Ue}(vt);for(var Oe in we)we[Oe].forEach(function(De){var Ue=De.feature,Ze=D.getFeatureState(Ue.layer["source-layer"],Ue.id);Ue.source=Ue.layer.source,Ue.layer["source-layer"]&&(Ue.sourceLayer=Ue.layer["source-layer"]),Ue.state=Ze});return we}function W(D,Y){var q=D.tileID,ne=Y.tileID;return q.overscaledZ-ne.overscaledZ||q.canonical.y-ne.canonical.y||q.wrap-ne.wrap||q.canonical.x-ne.canonical.x}var X=function(D,Y){this.max=D,this.onRemove=Y,this.reset()};X.prototype.reset=function(){for(var D in this.data)for(var Y=0,q=this.data[D];Y<q.length;Y+=1){var ne=q[Y];ne.timeout&&clearTimeout(ne.timeout),this.onRemove(ne.value)}return this.data={},this.order=[],this},X.prototype.add=function(D,Y,q){var ne=this,pe=D.wrapped().key;void 0===this.data[pe]&&(this.data[pe]=[]);var Le={value:Y,timeout:void 0};if(void 0!==q&&(Le.timeout=setTimeout(function(){ne.remove(D,Le)},q)),this.data[pe].push(Le),this.order.push(pe),this.order.length>this.max){var Ne=this._getAndRemoveByKey(this.order[0]);Ne&&this.onRemove(Ne)}return this},X.prototype.has=function(D){return D.wrapped().key in this.data},X.prototype.getAndRemove=function(D){return this.has(D)?this._getAndRemoveByKey(D.wrapped().key):null},X.prototype._getAndRemoveByKey=function(D){var Y=this.data[D].shift();return Y.timeout&&clearTimeout(Y.timeout),0===this.data[D].length&&delete this.data[D],this.order.splice(this.order.indexOf(D),1),Y.value},X.prototype.getByKey=function(D){var Y=this.data[D];return Y?Y[0].value:null},X.prototype.get=function(D){return this.has(D)?this.data[D.wrapped().key][0].value:null},X.prototype.remove=function(D,Y){if(!this.has(D))return this;var q=D.wrapped().key,ne=void 0===Y?0:this.data[q].indexOf(Y),pe=this.data[q][ne];return this.data[q].splice(ne,1),pe.timeout&&clearTimeout(pe.timeout),0===this.data[q].length&&delete this.data[q],this.onRemove(pe.value),this.order.splice(this.order.indexOf(q),1),this},X.prototype.setMaxSize=function(D){for(this.max=D;this.order.length>this.max;){var Y=this._getAndRemoveByKey(this.order[0]);Y&&this.onRemove(Y)}return this},X.prototype.filter=function(D){var Y=[];for(var q in this.data)for(var ne=0,pe=this.data[q];ne<pe.length;ne+=1){var Le=pe[ne];D(Le.value)||Y.push(Le)}for(var Ne=0,qe=Y;Ne<qe.length;Ne+=1){var et=qe[Ne];this.remove(et.value.tileID,et)}};var K=function(D,Y,q){this.context=D;var ne=D.gl;this.buffer=ne.createBuffer(),this.dynamicDraw=!!q,this.context.unbindVAO(),D.bindElementBuffer.set(this.buffer),ne.bufferData(ne.ELEMENT_ARRAY_BUFFER,Y.arrayBuffer,this.dynamicDraw?ne.DYNAMIC_DRAW:ne.STATIC_DRAW),this.dynamicDraw||delete Y.arrayBuffer};K.prototype.bind=function(){this.context.bindElementBuffer.set(this.buffer)},K.prototype.updateData=function(D){var Y=this.context.gl;this.context.unbindVAO(),this.bind(),Y.bufferSubData(Y.ELEMENT_ARRAY_BUFFER,0,D.arrayBuffer)},K.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var re={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"},ee=function(D,Y,q,ne){this.length=Y.length,this.attributes=q,this.itemSize=Y.bytesPerElement,this.dynamicDraw=ne,this.context=D;var pe=D.gl;this.buffer=pe.createBuffer(),D.bindVertexBuffer.set(this.buffer),pe.bufferData(pe.ARRAY_BUFFER,Y.arrayBuffer,this.dynamicDraw?pe.DYNAMIC_DRAW:pe.STATIC_DRAW),this.dynamicDraw||delete Y.arrayBuffer};ee.prototype.bind=function(){this.context.bindVertexBuffer.set(this.buffer)},ee.prototype.updateData=function(D){var Y=this.context.gl;this.bind(),Y.bufferSubData(Y.ARRAY_BUFFER,0,D.arrayBuffer)},ee.prototype.enableAttributes=function(D,Y){for(var q=0;q<this.attributes.length;q++){var pe=Y.attributes[this.attributes[q].name];void 0!==pe&&D.enableVertexAttribArray(pe)}},ee.prototype.setVertexAttribPointers=function(D,Y,q){for(var ne=0;ne<this.attributes.length;ne++){var pe=this.attributes[ne],Le=Y.attributes[pe.name];void 0!==Le&&D.vertexAttribPointer(Le,pe.components,D[re[pe.type]],!1,this.itemSize,pe.offset+this.itemSize*(q||0))}},ee.prototype.destroy=function(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)};var ie=function(D){this.gl=D.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1};ie.prototype.get=function(){return this.current},ie.prototype.set=function(D){},ie.prototype.getDefault=function(){return this.default},ie.prototype.setDefault=function(){this.set(this.default)};var oe=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return l.Color.transparent},Y.prototype.set=function(q){var ne=this.current;(q.r!==ne.r||q.g!==ne.g||q.b!==ne.b||q.a!==ne.a||this.dirty)&&(this.gl.clearColor(q.r,q.g,q.b,q.a),this.current=q,this.dirty=!1)},Y}(ie),ce=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return 1},Y.prototype.set=function(q){(q!==this.current||this.dirty)&&(this.gl.clearDepth(q),this.current=q,this.dirty=!1)},Y}(ie),me=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return 0},Y.prototype.set=function(q){(q!==this.current||this.dirty)&&(this.gl.clearStencil(q),this.current=q,this.dirty=!1)},Y}(ie),de=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return[!0,!0,!0,!0]},Y.prototype.set=function(q){var ne=this.current;(q[0]!==ne[0]||q[1]!==ne[1]||q[2]!==ne[2]||q[3]!==ne[3]||this.dirty)&&(this.gl.colorMask(q[0],q[1],q[2],q[3]),this.current=q,this.dirty=!1)},Y}(ie),he=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return!0},Y.prototype.set=function(q){(q!==this.current||this.dirty)&&(this.gl.depthMask(q),this.current=q,this.dirty=!1)},Y}(ie),ve=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return 255},Y.prototype.set=function(q){(q!==this.current||this.dirty)&&(this.gl.stencilMask(q),this.current=q,this.dirty=!1)},Y}(ie),Pe=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return{func:this.gl.ALWAYS,ref:0,mask:255}},Y.prototype.set=function(q){var ne=this.current;(q.func!==ne.func||q.ref!==ne.ref||q.mask!==ne.mask||this.dirty)&&(this.gl.stencilFunc(q.func,q.ref,q.mask),this.current=q,this.dirty=!1)},Y}(ie),xe=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){var q=this.gl;return[q.KEEP,q.KEEP,q.KEEP]},Y.prototype.set=function(q){var ne=this.current;(q[0]!==ne[0]||q[1]!==ne[1]||q[2]!==ne[2]||this.dirty)&&(this.gl.stencilOp(q[0],q[1],q[2]),this.current=q,this.dirty=!1)},Y}(ie),ke=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;q?ne.enable(ne.STENCIL_TEST):ne.disable(ne.STENCIL_TEST),this.current=q,this.dirty=!1}},Y}(ie),Ae=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return[0,1]},Y.prototype.set=function(q){var ne=this.current;(q[0]!==ne[0]||q[1]!==ne[1]||this.dirty)&&(this.gl.depthRange(q[0],q[1]),this.current=q,this.dirty=!1)},Y}(ie),Te=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;q?ne.enable(ne.DEPTH_TEST):ne.disable(ne.DEPTH_TEST),this.current=q,this.dirty=!1}},Y}(ie),Q=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return this.gl.LESS},Y.prototype.set=function(q){(q!==this.current||this.dirty)&&(this.gl.depthFunc(q),this.current=q,this.dirty=!1)},Y}(ie),se=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;q?ne.enable(ne.BLEND):ne.disable(ne.BLEND),this.current=q,this.dirty=!1}},Y}(ie),fe=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){var q=this.gl;return[q.ONE,q.ZERO]},Y.prototype.set=function(q){var ne=this.current;(q[0]!==ne[0]||q[1]!==ne[1]||this.dirty)&&(this.gl.blendFunc(q[0],q[1]),this.current=q,this.dirty=!1)},Y}(ie),ye=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return l.Color.transparent},Y.prototype.set=function(q){var ne=this.current;(q.r!==ne.r||q.g!==ne.g||q.b!==ne.b||q.a!==ne.a||this.dirty)&&(this.gl.blendColor(q.r,q.g,q.b,q.a),this.current=q,this.dirty=!1)},Y}(ie),Me=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return this.gl.FUNC_ADD},Y.prototype.set=function(q){(q!==this.current||this.dirty)&&(this.gl.blendEquation(q),this.current=q,this.dirty=!1)},Y}(ie),Ie=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;q?ne.enable(ne.CULL_FACE):ne.disable(ne.CULL_FACE),this.current=q,this.dirty=!1}},Y}(ie),Ce=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return this.gl.BACK},Y.prototype.set=function(q){(q!==this.current||this.dirty)&&(this.gl.cullFace(q),this.current=q,this.dirty=!1)},Y}(ie),Re=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return this.gl.CCW},Y.prototype.set=function(q){(q!==this.current||this.dirty)&&(this.gl.frontFace(q),this.current=q,this.dirty=!1)},Y}(ie),le=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(q){(q!==this.current||this.dirty)&&(this.gl.useProgram(q),this.current=q,this.dirty=!1)},Y}(ie),ge=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return this.gl.TEXTURE0},Y.prototype.set=function(q){(q!==this.current||this.dirty)&&(this.gl.activeTexture(q),this.current=q,this.dirty=!1)},Y}(ie),_e=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){var q=this.gl;return[0,0,q.drawingBufferWidth,q.drawingBufferHeight]},Y.prototype.set=function(q){var ne=this.current;(q[0]!==ne[0]||q[1]!==ne[1]||q[2]!==ne[2]||q[3]!==ne[3]||this.dirty)&&(this.gl.viewport(q[0],q[1],q[2],q[3]),this.current=q,this.dirty=!1)},Y}(ie),Fe=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;ne.bindFramebuffer(ne.FRAMEBUFFER,q),this.current=q,this.dirty=!1}},Y}(ie),Ve=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;ne.bindRenderbuffer(ne.RENDERBUFFER,q),this.current=q,this.dirty=!1}},Y}(ie),He=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;ne.bindTexture(ne.TEXTURE_2D,q),this.current=q,this.dirty=!1}},Y}(ie),nt=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;ne.bindBuffer(ne.ARRAY_BUFFER,q),this.current=q,this.dirty=!1}},Y}(ie),tt=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(q){var ne=this.gl;ne.bindBuffer(ne.ELEMENT_ARRAY_BUFFER,q),this.current=q,this.dirty=!1},Y}(ie),ot=function(D){function Y(q){D.call(this,q),this.vao=q.extVertexArrayObject}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return null},Y.prototype.set=function(q){this.vao&&(q!==this.current||this.dirty)&&(this.vao.bindVertexArrayOES(q),this.current=q,this.dirty=!1)},Y}(ie),dt=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return 4},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;ne.pixelStorei(ne.UNPACK_ALIGNMENT,q),this.current=q,this.dirty=!1}},Y}(ie),kt=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;ne.pixelStorei(ne.UNPACK_PREMULTIPLY_ALPHA_WEBGL,q),this.current=q,this.dirty=!1}},Y}(ie),mt=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return!1},Y.prototype.set=function(q){if(q!==this.current||this.dirty){var ne=this.gl;ne.pixelStorei(ne.UNPACK_FLIP_Y_WEBGL,q),this.current=q,this.dirty=!1}},Y}(ie),wt=function(D){function Y(q,ne){D.call(this,q),this.context=q,this.parent=ne}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getDefault=function(){return null},Y}(ie),Lt=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.setDirty=function(){this.dirty=!0},Y.prototype.set=function(q){if(q!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var ne=this.gl;ne.framebufferTexture2D(ne.FRAMEBUFFER,ne.COLOR_ATTACHMENT0,ne.TEXTURE_2D,q,0),this.current=q,this.dirty=!1}},Y}(wt),Ct=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.set=function(q){if(q!==this.current||this.dirty){this.context.bindFramebuffer.set(this.parent);var ne=this.gl;ne.framebufferRenderbuffer(ne.FRAMEBUFFER,ne.DEPTH_ATTACHMENT,ne.RENDERBUFFER,q),this.current=q,this.dirty=!1}},Y}(wt),It=function(D,Y,q,ne){this.context=D,this.width=Y,this.height=q;var Le=this.framebuffer=D.gl.createFramebuffer();this.colorAttachment=new Lt(D,Le),ne&&(this.depthAttachment=new Ct(D,Le))};It.prototype.destroy=function(){var D=this.context.gl,Y=this.colorAttachment.get();if(Y&&D.deleteTexture(Y),this.depthAttachment){var q=this.depthAttachment.get();q&&D.deleteRenderbuffer(q)}D.deleteFramebuffer(this.framebuffer)};var Ut=function(D,Y,q){this.func=D,this.mask=Y,this.range=q};Ut.ReadOnly=!1,Ut.ReadWrite=!0,Ut.disabled=new Ut(519,Ut.ReadOnly,[0,1]);var Ge=function(D,Y,q,ne,pe,Le){this.test=D,this.ref=Y,this.mask=q,this.fail=ne,this.depthFail=pe,this.pass=Le};Ge.disabled=new Ge({func:519,mask:0},0,0,7680,7680,7680);var We=function(D,Y,q){this.blendFunction=D,this.blendColor=Y,this.mask=q};We.disabled=new We(We.Replace=[1,0],l.Color.transparent,[!1,!1,!1,!1]),We.unblended=new We(We.Replace,l.Color.transparent,[!0,!0,!0,!0]),We.alphaBlended=new We([1,771],l.Color.transparent,[!0,!0,!0,!0]);var Be=function(D,Y,q){this.enable=D,this.mode=Y,this.frontFace=q};Be.disabled=new Be(!1,1029,2305),Be.backCCW=new Be(!0,1029,2305);var Ye=function(D){this.gl=D,this.extVertexArrayObject=this.gl.getExtension("OES_vertex_array_object"),this.clearColor=new oe(this),this.clearDepth=new ce(this),this.clearStencil=new me(this),this.colorMask=new de(this),this.depthMask=new he(this),this.stencilMask=new ve(this),this.stencilFunc=new Pe(this),this.stencilOp=new xe(this),this.stencilTest=new ke(this),this.depthRange=new Ae(this),this.depthTest=new Te(this),this.depthFunc=new Q(this),this.blend=new se(this),this.blendFunc=new fe(this),this.blendColor=new ye(this),this.blendEquation=new Me(this),this.cullFace=new Ie(this),this.cullFaceSide=new Ce(this),this.frontFace=new Re(this),this.program=new le(this),this.activeTexture=new ge(this),this.viewport=new _e(this),this.bindFramebuffer=new Fe(this),this.bindRenderbuffer=new Ve(this),this.bindTexture=new He(this),this.bindVertexBuffer=new nt(this),this.bindElementBuffer=new tt(this),this.bindVertexArrayOES=this.extVertexArrayObject&&new ot(this),this.pixelStoreUnpack=new dt(this),this.pixelStoreUnpackPremultiplyAlpha=new kt(this),this.pixelStoreUnpackFlipY=new mt(this),this.extTextureFilterAnisotropic=D.getExtension("EXT_texture_filter_anisotropic")||D.getExtension("MOZ_EXT_texture_filter_anisotropic")||D.getExtension("WEBKIT_EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=D.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.extTextureHalfFloat=D.getExtension("OES_texture_half_float"),this.extTextureHalfFloat&&(D.getExtension("OES_texture_half_float_linear"),this.extRenderToTextureHalfFloat=D.getExtension("EXT_color_buffer_half_float")),this.extTimerQuery=D.getExtension("EXT_disjoint_timer_query")};Ye.prototype.setDefault=function(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()},Ye.prototype.setDirty=function(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.extVertexArrayObject&&(this.bindVertexArrayOES.dirty=!0),this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0},Ye.prototype.createIndexBuffer=function(D,Y){return new K(this,D,Y)},Ye.prototype.createVertexBuffer=function(D,Y,q){return new ee(this,D,Y,q)},Ye.prototype.createRenderbuffer=function(D,Y,q){var ne=this.gl,pe=ne.createRenderbuffer();return this.bindRenderbuffer.set(pe),ne.renderbufferStorage(ne.RENDERBUFFER,D,Y,q),this.bindRenderbuffer.set(null),pe},Ye.prototype.createFramebuffer=function(D,Y,q){return new It(this,D,Y,q)},Ye.prototype.clear=function(D){var Y=D.color,q=D.depth,ne=this.gl,pe=0;Y&&(pe|=ne.COLOR_BUFFER_BIT,this.clearColor.set(Y),this.colorMask.set([!0,!0,!0,!0])),void 0!==q&&(pe|=ne.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(q),this.depthMask.set(!0)),ne.clear(pe)},Ye.prototype.setCullFace=function(D){!1===D.enable?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(D.mode),this.frontFace.set(D.frontFace))},Ye.prototype.setDepthMode=function(D){D.func!==this.gl.ALWAYS||D.mask?(this.depthTest.set(!0),this.depthFunc.set(D.func),this.depthMask.set(D.mask),this.depthRange.set(D.range)):this.depthTest.set(!1)},Ye.prototype.setStencilMode=function(D){D.test.func!==this.gl.ALWAYS||D.mask?(this.stencilTest.set(!0),this.stencilMask.set(D.mask),this.stencilOp.set([D.fail,D.depthFail,D.pass]),this.stencilFunc.set({func:D.test.func,ref:D.ref,mask:D.test.mask})):this.stencilTest.set(!1)},Ye.prototype.setColorMode=function(D){l.deepEqual(D.blendFunction,We.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(D.blendFunction),this.blendColor.set(D.blendColor)),this.colorMask.set(D.mask)},Ye.prototype.unbindVAO=function(){this.extVertexArrayObject&&this.bindVertexArrayOES.set(null)};var rt=function(D){function Y(q,ne,pe){var Le=this;D.call(this),this.id=q,this.dispatcher=pe,this.on("data",function(Ne){"source"===Ne.dataType&&"metadata"===Ne.sourceDataType&&(Le._sourceLoaded=!0),Le._sourceLoaded&&!Le._paused&&"source"===Ne.dataType&&"content"===Ne.sourceDataType&&(Le.reload(),Le.transform&&Le.update(Le.transform))}),this.on("error",function(){Le._sourceErrored=!0}),this._source=function(Ne,qe,et,vt){var xt=new J[qe.type](Ne,qe,et,vt);if(xt.id!==Ne)throw new Error("Expected Source id to be "+Ne+" instead of "+xt.id);return l.bindAll(["load","abort","unload","serialize","prepare"],xt),xt}(q,ne,pe,this),this._tiles={},this._cache=new X(0,this._unloadTile.bind(this)),this._timers={},this._cacheTimers={},this._maxTileCacheSize=null,this._loadedParentTiles={},this._coveredTiles={},this._state=new l.SourceFeatureState}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.onAdd=function(q){this.map=q,this._maxTileCacheSize=q?q._maxTileCacheSize:null,this._source&&this._source.onAdd&&this._source.onAdd(q)},Y.prototype.onRemove=function(q){this._source&&this._source.onRemove&&this._source.onRemove(q)},Y.prototype.loaded=function(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;for(var q in this._tiles){var ne=this._tiles[q];if("loaded"!==ne.state&&"errored"!==ne.state)return!1}return!0},Y.prototype.getSource=function(){return this._source},Y.prototype.pause=function(){this._paused=!0},Y.prototype.resume=function(){if(this._paused){var q=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,q&&this.reload(),this.transform&&this.update(this.transform)}},Y.prototype._loadTile=function(q,ne){return this._source.loadTile(q,ne)},Y.prototype._unloadTile=function(q){if(this._source.unloadTile)return this._source.unloadTile(q,function(){})},Y.prototype._abortTile=function(q){if(this._source.abortTile)return this._source.abortTile(q,function(){})},Y.prototype.serialize=function(){return this._source.serialize()},Y.prototype.prepare=function(q){for(var ne in this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._tiles,this.map?this.map.painter:null),this._tiles){var pe=this._tiles[ne];pe.upload(q),pe.prepare(this.map.style.imageManager)}},Y.prototype.getIds=function(){return l.values(this._tiles).map(function(q){return q.tileID}).sort(Se).map(function(q){return q.key})},Y.prototype.getRenderableIds=function(q){var ne=this,pe=[];for(var Le in this._tiles)this._isIdRenderable(Le,q)&&pe.push(this._tiles[Le]);return q?pe.sort(function(Ne,qe){var et=Ne.tileID,vt=qe.tileID,xt=new l.Point(et.canonical.x,et.canonical.y)._rotate(ne.transform.angle),te=new l.Point(vt.canonical.x,vt.canonical.y)._rotate(ne.transform.angle);return et.overscaledZ-vt.overscaledZ||te.y-xt.y||te.x-xt.x}).map(function(Ne){return Ne.tileID.key}):pe.map(function(Ne){return Ne.tileID}).sort(Se).map(function(Ne){return Ne.key})},Y.prototype.hasRenderableParent=function(q){var ne=this.findLoadedParent(q,0);return!!ne&&this._isIdRenderable(ne.tileID.key)},Y.prototype._isIdRenderable=function(q,ne){return this._tiles[q]&&this._tiles[q].hasData()&&!this._coveredTiles[q]&&(ne||!this._tiles[q].holdingForFade())},Y.prototype.reload=function(){if(this._paused)this._shouldReloadOnResume=!0;else for(var q in this._cache.reset(),this._tiles)"errored"!==this._tiles[q].state&&this._reloadTile(q,"reloading")},Y.prototype._reloadTile=function(q,ne){var pe=this._tiles[q];pe&&("loading"!==pe.state&&(pe.state=ne),this._loadTile(pe,this._tileLoaded.bind(this,pe,q,ne)))},Y.prototype._tileLoaded=function(q,ne,pe,Le){if(Le)return q.state="errored",void(404!==Le.status?this._source.fire(new l.ErrorEvent(Le,{tile:q})):this.update(this.transform));q.timeAdded=l.browser.now(),"expired"===pe&&(q.refreshedUponExpiration=!0),this._setTileReloadTimer(ne,q),"raster-dem"===this.getSource().type&&q.dem&&this._backfillDEM(q),this._state.initializeTileState(q,this.map?this.map.painter:null),this._source.fire(new l.Event("data",{dataType:"source",tile:q,coord:q.tileID}))},Y.prototype._backfillDEM=function(q){for(var ne=this.getRenderableIds(),pe=0;pe<ne.length;pe++){var Le=ne[pe];if(q.neighboringTiles&&q.neighboringTiles[Le]){var Ne=this.getTileByID(Le);qe(q,Ne),qe(Ne,q)}}function qe(et,vt){et.needsHillshadePrepare=!0;var xt=vt.tileID.canonical.x-et.tileID.canonical.x,te=vt.tileID.canonical.y-et.tileID.canonical.y,ue=Math.pow(2,et.tileID.canonical.z),we=vt.tileID.key;0===xt&&0===te||Math.abs(te)>1||(Math.abs(xt)>1&&(1===Math.abs(xt+ue)?xt+=ue:1===Math.abs(xt-ue)&&(xt-=ue)),vt.dem&&et.dem&&(et.dem.backfillBorder(vt.dem,xt,te),et.neighboringTiles&&et.neighboringTiles[we]&&(et.neighboringTiles[we].backfilled=!0)))}},Y.prototype.getTile=function(q){return this.getTileByID(q.key)},Y.prototype.getTileByID=function(q){return this._tiles[q]},Y.prototype._retainLoadedChildren=function(q,ne,pe,Le){for(var Ne in this._tiles){var qe=this._tiles[Ne];if(!(Le[Ne]||!qe.hasData()||qe.tileID.overscaledZ<=ne||qe.tileID.overscaledZ>pe)){for(var et=qe.tileID;qe&&qe.tileID.overscaledZ>ne+1;){var vt=qe.tileID.scaledTo(qe.tileID.overscaledZ-1);(qe=this._tiles[vt.key])&&qe.hasData()&&(et=vt)}for(var xt=et;xt.overscaledZ>ne;)if(q[(xt=xt.scaledTo(xt.overscaledZ-1)).key]){Le[et.key]=et;break}}}},Y.prototype.findLoadedParent=function(q,ne){if(q.key in this._loadedParentTiles){var pe=this._loadedParentTiles[q.key];return pe&&pe.tileID.overscaledZ>=ne?pe:null}for(var Le=q.overscaledZ-1;Le>=ne;Le--){var Ne=q.scaledTo(Le),qe=this._getLoadedTile(Ne);if(qe)return qe}},Y.prototype._getLoadedTile=function(q){var ne=this._tiles[q.key];return ne&&ne.hasData()?ne:this._cache.getByKey(q.wrapped().key)},Y.prototype.updateCacheSize=function(q){var ne=(Math.ceil(q.width/this._source.tileSize)+1)*(Math.ceil(q.height/this._source.tileSize)+1),pe=Math.floor(5*ne),Le="number"==typeof this._maxTileCacheSize?Math.min(this._maxTileCacheSize,pe):pe;this._cache.setMaxSize(Le)},Y.prototype.handleWrapJump=function(q){var pe=Math.round((q-(void 0===this._prevLng?q:this._prevLng))/360);if(this._prevLng=q,pe){var Le={};for(var Ne in this._tiles){var qe=this._tiles[Ne];qe.tileID=qe.tileID.unwrapTo(qe.tileID.wrap+pe),Le[qe.tileID.key]=qe}for(var et in this._tiles=Le,this._timers)clearTimeout(this._timers[et]),delete this._timers[et];for(var vt in this._tiles)this._setTileReloadTimer(vt,this._tiles[vt])}},Y.prototype.update=function(q){var ne=this;if(this.transform=q,this._sourceLoaded&&!this._paused){var pe;this.updateCacheSize(q),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={},this.used?this._source.tileID?pe=q.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(Ft){return new l.OverscaledTileID(Ft.canonical.z,Ft.wrap,Ft.canonical.z,Ft.canonical.x,Ft.canonical.y)}):(pe=q.coveringTiles({tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.maxzoom,roundZoom:this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled}),this._source.hasTile&&(pe=pe.filter(function(Ft){return ne._source.hasTile(Ft)}))):pe=[];var Le=q.coveringZoomLevel(this._source),Ne=Math.max(Le-Y.maxOverzooming,this._source.minzoom),qe=Math.max(Le+Y.maxUnderzooming,this._source.minzoom),et=this._updateRetainedTiles(pe,Le);if(ze(this._source.type)){for(var vt={},xt={},te=0,ue=Object.keys(et);te<ue.length;te+=1){var we=ue[te],Oe=et[we],De=this._tiles[we];if(De&&!(De.fadeEndTime&&De.fadeEndTime<=l.browser.now())){var Ue=this.findLoadedParent(Oe,Ne);Ue&&(this._addTile(Ue.tileID),vt[Ue.tileID.key]=Ue.tileID),xt[we]=Oe}}for(var Ze in this._retainLoadedChildren(xt,Le,qe,et),vt)et[Ze]||(this._coveredTiles[Ze]=!0,et[Ze]=vt[Ze])}for(var Je in et)this._tiles[Je].clearFadeHold();for(var it=0,ut=l.keysDifference(this._tiles,et);it<ut.length;it+=1){var St=ut[it],Dt=this._tiles[St];Dt.hasSymbolBuckets&&!Dt.holdingForFade()?Dt.setHoldDuration(this.map._fadeDuration):Dt.hasSymbolBuckets&&!Dt.symbolFadeFinished()||this._removeTile(St)}this._updateLoadedParentTileCache()}},Y.prototype.releaseSymbolFadeTiles=function(){for(var q in this._tiles)this._tiles[q].holdingForFade()&&this._removeTile(q)},Y.prototype._updateRetainedTiles=function(q,ne){for(var pe={},Le={},Ne=Math.max(ne-Y.maxOverzooming,this._source.minzoom),qe=Math.max(ne+Y.maxUnderzooming,this._source.minzoom),et={},vt=0,xt=q;vt<xt.length;vt+=1){var te=xt[vt],ue=this._addTile(te);pe[te.key]=te,ue.hasData()||ne<this._source.maxzoom&&(et[te.key]=te)}this._retainLoadedChildren(et,ne,qe,pe);for(var we=0,Oe=q;we<Oe.length;we+=1){var De=Oe[we],Ue=this._tiles[De.key];if(!Ue.hasData()){if(ne+1>this._source.maxzoom){var Ze=De.children(this._source.maxzoom)[0],Je=this.getTile(Ze);if(Je&&Je.hasData()){pe[Ze.key]=Ze;continue}}else{var it=De.children(this._source.maxzoom);if(pe[it[0].key]&&pe[it[1].key]&&pe[it[2].key]&&pe[it[3].key])continue}for(var ut=Ue.wasRequested(),St=De.overscaledZ-1;St>=Ne;--St){var Dt=De.scaledTo(St);if(Le[Dt.key]||(Le[Dt.key]=!0,!(Ue=this.getTile(Dt))&&ut&&(Ue=this._addTile(Dt)),Ue&&(pe[Dt.key]=Dt,ut=Ue.wasRequested(),Ue.hasData())))break}}}return pe},Y.prototype._updateLoadedParentTileCache=function(){for(var q in this._loadedParentTiles={},this._tiles){for(var ne=[],pe=void 0,Le=this._tiles[q].tileID;Le.overscaledZ>0;){if(Le.key in this._loadedParentTiles){pe=this._loadedParentTiles[Le.key];break}ne.push(Le.key);var Ne=Le.scaledTo(Le.overscaledZ-1);if(pe=this._getLoadedTile(Ne))break;Le=Ne}for(var qe=0,et=ne;qe<et.length;qe+=1)this._loadedParentTiles[et[qe]]=pe}},Y.prototype._addTile=function(q){var ne=this._tiles[q.key];if(ne)return ne;(ne=this._cache.getAndRemove(q))&&(this._setTileReloadTimer(q.key,ne),ne.tileID=q,this._state.initializeTileState(ne,this.map?this.map.painter:null),this._cacheTimers[q.key]&&(clearTimeout(this._cacheTimers[q.key]),delete this._cacheTimers[q.key],this._setTileReloadTimer(q.key,ne)));var pe=!!ne;return pe||(ne=new l.Tile(q,this._source.tileSize*q.overscaleFactor()),this._loadTile(ne,this._tileLoaded.bind(this,ne,q.key,ne.state))),ne?(ne.uses++,this._tiles[q.key]=ne,pe||this._source.fire(new l.Event("dataloading",{tile:ne,coord:ne.tileID,dataType:"source"})),ne):null},Y.prototype._setTileReloadTimer=function(q,ne){var pe=this;q in this._timers&&(clearTimeout(this._timers[q]),delete this._timers[q]);var Le=ne.getExpiryTimeout();Le&&(this._timers[q]=setTimeout(function(){pe._reloadTile(q,"expired"),delete pe._timers[q]},Le))},Y.prototype._removeTile=function(q){var ne=this._tiles[q];ne&&(ne.uses--,delete this._tiles[q],this._timers[q]&&(clearTimeout(this._timers[q]),delete this._timers[q]),ne.uses>0||(ne.hasData()&&"reloading"!==ne.state?this._cache.add(ne.tileID,ne,ne.getExpiryTimeout()):(ne.aborted=!0,this._abortTile(ne),this._unloadTile(ne))))},Y.prototype.clearTiles=function(){for(var q in this._shouldReloadOnResume=!1,this._paused=!1,this._tiles)this._removeTile(q);this._cache.reset()},Y.prototype.tilesIn=function(q,ne,pe){var Le=this,Ne=[],qe=this.transform;if(!qe)return Ne;for(var et=pe?qe.getCameraQueryGeometry(q):q,vt=q.map(function(St){return qe.pointCoordinate(St)}),xt=et.map(function(St){return qe.pointCoordinate(St)}),te=this.getIds(),ue=1/0,we=1/0,Oe=-1/0,De=-1/0,Ue=0,Ze=xt;Ue<Ze.length;Ue+=1){var Je=Ze[Ue];ue=Math.min(ue,Je.x),we=Math.min(we,Je.y),Oe=Math.max(Oe,Je.x),De=Math.max(De,Je.y)}for(var it=function(St){var Dt=Le._tiles[te[St]];if(!Dt.holdingForFade()){var Ft=Dt.tileID,Yt=Math.pow(2,qe.zoom-Dt.tileID.overscaledZ),ln=ne*Dt.queryPadding*l.EXTENT/Dt.tileSize/Yt,Xt=[Ft.getTilePoint(new l.MercatorCoordinate(ue,we)),Ft.getTilePoint(new l.MercatorCoordinate(Oe,De))];if(Xt[0].x-ln<l.EXTENT&&Xt[0].y-ln<l.EXTENT&&Xt[1].x+ln>=0&&Xt[1].y+ln>=0){var en=vt.map(function(bn){return Ft.getTilePoint(bn)}),Jt=xt.map(function(bn){return Ft.getTilePoint(bn)});Ne.push({tile:Dt,tileID:Ft,queryGeometry:en,cameraQueryGeometry:Jt,scale:Yt})}}},ut=0;ut<te.length;ut++)it(ut);return Ne},Y.prototype.getVisibleCoordinates=function(q){for(var ne=this,pe=this.getRenderableIds(q).map(function(et){return ne._tiles[et].tileID}),Le=0,Ne=pe;Le<Ne.length;Le+=1){var qe=Ne[Le];qe.posMatrix=this.transform.calculatePosMatrix(qe.toUnwrapped())}return pe},Y.prototype.hasTransition=function(){if(this._source.hasTransition())return!0;if(ze(this._source.type))for(var q in this._tiles){var ne=this._tiles[q];if(void 0!==ne.fadeEndTime&&ne.fadeEndTime>=l.browser.now())return!0}return!1},Y.prototype.setFeatureState=function(q,ne,pe){this._state.updateState(q=q||"_geojsonTileLayer",ne,pe)},Y.prototype.removeFeatureState=function(q,ne,pe){this._state.removeFeatureState(q=q||"_geojsonTileLayer",ne,pe)},Y.prototype.getFeatureState=function(q,ne){return this._state.getState(q=q||"_geojsonTileLayer",ne)},Y.prototype.setDependencies=function(q,ne,pe){var Le=this._tiles[q];Le&&Le.setDependencies(ne,pe)},Y.prototype.reloadTilesForDependencies=function(q,ne){for(var pe in this._tiles)this._tiles[pe].hasDependency(q,ne)&&this._reloadTile(pe,"reloading");this._cache.filter(function(Le){return!Le.hasDependency(q,ne)})},Y}(l.Evented);function Se(D,Y){var q=Math.abs(2*D.wrap)-+(D.wrap<0),ne=Math.abs(2*Y.wrap)-+(Y.wrap<0);return D.overscaledZ-Y.overscaledZ||ne-q||Y.canonical.y-D.canonical.y||Y.canonical.x-D.canonical.x}function ze(D){return"raster"===D||"image"===D||"video"===D}function Ke(){return new l.window.Worker(yt.workerUrl)}rt.maxOverzooming=10,rt.maxUnderzooming=3;var st="mapboxgl_preloaded_worker_pool",ct=function(){this.active={}};ct.prototype.acquire=function(D){if(!this.workers)for(this.workers=[];this.workers.length<ct.workerCount;)this.workers.push(new Ke);return this.active[D]=!0,this.workers.slice()},ct.prototype.release=function(D){delete this.active[D],0===this.numActive()&&(this.workers.forEach(function(Y){Y.terminate()}),this.workers=null)},ct.prototype.isPreloaded=function(){return!!this.active[st]},ct.prototype.numActive=function(){return Object.keys(this.active).length};var Tt,Et=Math.floor(l.browser.hardwareConcurrency/2);function At(){return Tt||(Tt=new ct),Tt}function ht(D,Y){var q={};for(var ne in D)"ref"!==ne&&(q[ne]=D[ne]);return l.refProperties.forEach(function(pe){pe in Y&&(q[pe]=Y[pe])}),q}function pt(D){D=D.slice();for(var Y=Object.create(null),q=0;q<D.length;q++)Y[D[q].id]=D[q];for(var ne=0;ne<D.length;ne++)"ref"in D[ne]&&(D[ne]=ht(D[ne],Y[D[ne].ref]));return D}ct.workerCount=Math.max(Math.min(Et,6),1);var gt={setStyle:"setStyle",addLayer:"addLayer",removeLayer:"removeLayer",setPaintProperty:"setPaintProperty",setLayoutProperty:"setLayoutProperty",setFilter:"setFilter",addSource:"addSource",removeSource:"removeSource",setGeoJSONSourceData:"setGeoJSONSourceData",setLayerZoomRange:"setLayerZoomRange",setLayerProperty:"setLayerProperty",setCenter:"setCenter",setZoom:"setZoom",setBearing:"setBearing",setPitch:"setPitch",setSprite:"setSprite",setGlyphs:"setGlyphs",setTransition:"setTransition",setLight:"setLight"};function Pt(D,Y,q){q.push({command:gt.addSource,args:[D,Y[D]]})}function Ot(D,Y,q){Y.push({command:gt.removeSource,args:[D]}),q[D]=!0}function Ht(D,Y,q,ne){Ot(D,q,ne),Pt(D,Y,q)}function jt(D,Y,q){var ne;for(ne in D[q])if(D[q].hasOwnProperty(ne)&&"data"!==ne&&!l.deepEqual(D[q][ne],Y[q][ne]))return!1;for(ne in Y[q])if(Y[q].hasOwnProperty(ne)&&"data"!==ne&&!l.deepEqual(D[q][ne],Y[q][ne]))return!1;return!0}function Nt(D,Y,q,ne,pe,Le){var Ne;for(Ne in Y=Y||{},D=D||{})D.hasOwnProperty(Ne)&&(l.deepEqual(D[Ne],Y[Ne])||q.push({command:Le,args:[ne,Ne,Y[Ne],pe]}));for(Ne in Y)Y.hasOwnProperty(Ne)&&!D.hasOwnProperty(Ne)&&(l.deepEqual(D[Ne],Y[Ne])||q.push({command:Le,args:[ne,Ne,Y[Ne],pe]}))}function Gt(D){return D.id}function un(D,Y){return D[Y.id]=Y,D}var Kt=function(D,Y){this.reset(D,Y)};Kt.prototype.reset=function(D,Y){this.points=D||[],this._distances=[0];for(var q=1;q<this.points.length;q++)this._distances[q]=this._distances[q-1]+this.points[q].dist(this.points[q-1]);this.length=this._distances[this._distances.length-1],this.padding=Math.min(Y||0,.5*this.length),this.paddedLength=this.length-2*this.padding},Kt.prototype.lerp=function(D){if(1===this.points.length)return this.points[0];D=l.clamp(D,0,1);for(var Y=1,q=this._distances[Y],ne=D*this.paddedLength+this.padding;q<ne&&Y<this._distances.length;)q=this._distances[++Y];var pe=Y-1,Le=this._distances[pe],Ne=q-Le,qe=Ne>0?(ne-Le)/Ne:0;return this.points[pe].mult(1-qe).add(this.points[Y].mult(qe))};var wn=function(D,Y,q){var ne=this.boxCells=[],pe=this.circleCells=[];this.xCellCount=Math.ceil(D/q),this.yCellCount=Math.ceil(Y/q);for(var Le=0;Le<this.xCellCount*this.yCellCount;Le++)ne.push([]),pe.push([]);this.circleKeys=[],this.boxKeys=[],this.bboxes=[],this.circles=[],this.width=D,this.height=Y,this.xScale=this.xCellCount/D,this.yScale=this.yCellCount/Y,this.boxUid=0,this.circleUid=0};function Bn(D,Y,q,ne,pe){var Le=l.create();return Y?(l.scale(Le,Le,[1/pe,1/pe,1]),q||l.rotateZ(Le,Le,ne.angle)):l.multiply(Le,ne.labelPlaneMatrix,D),Le}function vn(D,Y,q,ne,pe){if(Y){var Le=l.clone(D);return l.scale(Le,Le,[pe,pe,1]),q||l.rotateZ(Le,Le,-ne.angle),Le}return ne.glCoordMatrix}function cn(D,Y){var q=[D.x,D.y,0,1];mr(q,q,Y);var ne=q[3];return{point:new l.Point(q[0]/ne,q[1]/ne),signedDistanceFromCamera:ne}}function dn(D,Y){return.5+D/Y*.5}function sn(D,Y){var q=D[0]/D[3],ne=D[1]/D[3];return q>=-Y[0]&&q<=Y[0]&&ne>=-Y[1]&&ne<=Y[1]}function hn(D,Y,q,ne,pe,Le,Ne,qe){var et=ne?D.textSizeData:D.iconSizeData,vt=l.evaluateSizeForZoom(et,q.transform.zoom),xt=[256/q.width*2+1,256/q.height*2+1],te=ne?D.text.dynamicLayoutVertexArray:D.icon.dynamicLayoutVertexArray;te.clear();for(var ue=D.lineVertexArray,we=ne?D.text.placedSymbolArray:D.icon.placedSymbolArray,Oe=q.transform.width/q.transform.height,De=!1,Ue=0;Ue<we.length;Ue++){var Ze=we.get(Ue);if(Ze.hidden||Ze.writingMode===l.WritingMode.vertical&&!De)$n(Ze.numGlyphs,te);else{De=!1;var Je=[Ze.anchorX,Ze.anchorY,0,1];if(l.transformMat4(Je,Je,Y),sn(Je,xt)){var ut=dn(q.transform.cameraToCenterDistance,Je[3]),St=l.evaluateSizeForFeature(et,vt,Ze),Dt=Ne?St/ut:St*ut,Ft=new l.Point(Ze.anchorX,Ze.anchorY),Yt=cn(Ft,pe).point,ln={},Xt=Rn(Ze,Dt,!1,qe,Y,pe,Le,D.glyphOffsetArray,ue,te,Yt,Ft,ln,Oe);De=Xt.useVertical,(Xt.notEnoughRoom||De||Xt.needsFlipping&&Rn(Ze,Dt,!0,qe,Y,pe,Le,D.glyphOffsetArray,ue,te,Yt,Ft,ln,Oe).notEnoughRoom)&&$n(Ze.numGlyphs,te)}else $n(Ze.numGlyphs,te)}}ne?D.text.dynamicLayoutVertexBuffer.updateData(te):D.icon.dynamicLayoutVertexBuffer.updateData(te)}function En(D,Y,q,ne,pe,Le,Ne,qe,et,vt,xt){var te=qe.glyphStartIndex+qe.numGlyphs,ue=qe.lineStartIndex,we=qe.lineStartIndex+qe.lineLength,Oe=Y.getoffsetX(qe.glyphStartIndex),De=Y.getoffsetX(te-1),Ue=Fn(D*Oe,q,ne,pe,Le,Ne,qe.segment,ue,we,et,vt,xt);if(!Ue)return null;var Ze=Fn(D*De,q,ne,pe,Le,Ne,qe.segment,ue,we,et,vt,xt);return Ze?{first:Ue,last:Ze}:null}function Mn(D,Y,q,ne){return D===l.WritingMode.horizontal&&Math.abs(q.y-Y.y)>Math.abs(q.x-Y.x)*ne?{useVertical:!0}:(D===l.WritingMode.vertical?Y.y<q.y:Y.x>q.x)?{needsFlipping:!0}:null}function Rn(D,Y,q,ne,pe,Le,Ne,qe,et,vt,xt,te,ue,we){var Oe,De=Y/24,Ue=D.lineOffsetX*De,Ze=D.lineOffsetY*De;if(D.numGlyphs>1){var Je=D.glyphStartIndex+D.numGlyphs,it=D.lineStartIndex,ut=D.lineStartIndex+D.lineLength,St=En(De,qe,Ue,Ze,q,xt,te,D,et,Le,ue);if(!St)return{notEnoughRoom:!0};var Dt=cn(St.first.point,Ne).point,Ft=cn(St.last.point,Ne).point;if(ne&&!q){var Yt=Mn(D.writingMode,Dt,Ft,we);if(Yt)return Yt}Oe=[St.first];for(var ln=D.glyphStartIndex+1;ln<Je-1;ln++)Oe.push(Fn(De*qe.getoffsetX(ln),Ue,Ze,q,xt,te,D.segment,it,ut,et,Le,ue));Oe.push(St.last)}else{if(ne&&!q){var Xt=cn(te,pe).point,en=D.lineStartIndex+D.segment+1,Jt=new l.Point(et.getx(en),et.gety(en)),bn=cn(Jt,pe),gn=bn.signedDistanceFromCamera>0?bn.point:Nn(te,Jt,Xt,1,pe),Qt=Mn(D.writingMode,Xt,gn,we);if(Qt)return Qt}var Pn=Fn(De*qe.getoffsetX(D.glyphStartIndex),Ue,Ze,q,xt,te,D.segment,D.lineStartIndex,D.lineStartIndex+D.lineLength,et,Le,ue);if(!Pn)return{notEnoughRoom:!0};Oe=[Pn]}for(var Dn=0,Xn=Oe;Dn<Xn.length;Dn+=1){var Jn=Xn[Dn];l.addDynamicAttributes(vt,Jn.point,Jn.angle)}return{}}function Nn(D,Y,q,ne,pe){var Le=cn(D.add(D.sub(Y)._unit()),pe).point,Ne=q.sub(Le);return q.add(Ne._mult(ne/Ne.mag()))}function Fn(D,Y,q,ne,pe,Le,Ne,qe,et,vt,xt,te){var ue=ne?D-Y:D+Y,we=ue>0?1:-1,Oe=0;ne&&(we*=-1,Oe=Math.PI),we<0&&(Oe+=Math.PI);for(var De=we>0?qe+Ne:qe+Ne+1,Ue=pe,Ze=pe,Je=0,it=0,ut=Math.abs(ue),St=[];Je+it<=ut;){if((De+=we)<qe||De>=et)return null;if(Ze=Ue,St.push(Ue),void 0===(Ue=te[De])){var Dt=new l.Point(vt.getx(De),vt.gety(De)),Ft=cn(Dt,xt);if(Ft.signedDistanceFromCamera>0)Ue=te[De]=Ft.point;else{var Yt=De-we;Ue=Nn(0===Je?Le:new l.Point(vt.getx(Yt),vt.gety(Yt)),Dt,Ze,ut-Je+1,xt)}}Je+=it,it=Ze.dist(Ue)}var ln=(ut-Je)/it,Xt=Ue.sub(Ze),en=Xt.mult(ln)._add(Ze);en._add(Xt._unit()._perp()._mult(q*we));var Jt=Oe+Math.atan2(Ue.y-Ze.y,Ue.x-Ze.x);return St.push(en),{point:en,angle:Jt,path:St}}wn.prototype.keysLength=function(){return this.boxKeys.length+this.circleKeys.length},wn.prototype.insert=function(D,Y,q,ne,pe){this._forEachCell(Y,q,ne,pe,this._insertBoxCell,this.boxUid++),this.boxKeys.push(D),this.bboxes.push(Y),this.bboxes.push(q),this.bboxes.push(ne),this.bboxes.push(pe)},wn.prototype.insertCircle=function(D,Y,q,ne){this._forEachCell(Y-ne,q-ne,Y+ne,q+ne,this._insertCircleCell,this.circleUid++),this.circleKeys.push(D),this.circles.push(Y),this.circles.push(q),this.circles.push(ne)},wn.prototype._insertBoxCell=function(D,Y,q,ne,pe,Le){this.boxCells[pe].push(Le)},wn.prototype._insertCircleCell=function(D,Y,q,ne,pe,Le){this.circleCells[pe].push(Le)},wn.prototype._query=function(D,Y,q,ne,pe,Le){if(q<0||D>this.width||ne<0||Y>this.height)return!pe&&[];var Ne=[];if(D<=0&&Y<=0&&this.width<=q&&this.height<=ne){if(pe)return!0;for(var qe=0;qe<this.boxKeys.length;qe++)Ne.push({key:this.boxKeys[qe],x1:this.bboxes[4*qe],y1:this.bboxes[4*qe+1],x2:this.bboxes[4*qe+2],y2:this.bboxes[4*qe+3]});for(var et=0;et<this.circleKeys.length;et++){var vt=this.circles[3*et],xt=this.circles[3*et+1],te=this.circles[3*et+2];Ne.push({key:this.circleKeys[et],x1:vt-te,y1:xt-te,x2:vt+te,y2:xt+te})}return Le?Ne.filter(Le):Ne}return this._forEachCell(D,Y,q,ne,this._queryCell,Ne,{hitTest:pe,seenUids:{box:{},circle:{}}},Le),pe?Ne.length>0:Ne},wn.prototype._queryCircle=function(D,Y,q,ne,pe){var Le=D-q,Ne=D+q,qe=Y-q,et=Y+q;if(Ne<0||Le>this.width||et<0||qe>this.height)return!ne&&[];var vt=[];return this._forEachCell(Le,qe,Ne,et,this._queryCellCircle,vt,{hitTest:ne,circle:{x:D,y:Y,radius:q},seenUids:{box:{},circle:{}}},pe),ne?vt.length>0:vt},wn.prototype.query=function(D,Y,q,ne,pe){return this._query(D,Y,q,ne,!1,pe)},wn.prototype.hitTest=function(D,Y,q,ne,pe){return this._query(D,Y,q,ne,!0,pe)},wn.prototype.hitTestCircle=function(D,Y,q,ne){return this._queryCircle(D,Y,q,!0,ne)},wn.prototype._queryCell=function(D,Y,q,ne,pe,Le,Ne,qe){var et=Ne.seenUids,vt=this.boxCells[pe];if(null!==vt)for(var xt=this.bboxes,te=0,ue=vt;te<ue.length;te+=1){var we=ue[te];if(!et.box[we]){et.box[we]=!0;var Oe=4*we;if(D<=xt[Oe+2]&&Y<=xt[Oe+3]&&q>=xt[Oe+0]&&ne>=xt[Oe+1]&&(!qe||qe(this.boxKeys[we]))){if(Ne.hitTest)return Le.push(!0),!0;Le.push({key:this.boxKeys[we],x1:xt[Oe],y1:xt[Oe+1],x2:xt[Oe+2],y2:xt[Oe+3]})}}}var De=this.circleCells[pe];if(null!==De)for(var Ue=this.circles,Ze=0,Je=De;Ze<Je.length;Ze+=1){var it=Je[Ze];if(!et.circle[it]){et.circle[it]=!0;var ut=3*it;if(this._circleAndRectCollide(Ue[ut],Ue[ut+1],Ue[ut+2],D,Y,q,ne)&&(!qe||qe(this.circleKeys[it]))){if(Ne.hitTest)return Le.push(!0),!0;var St=Ue[ut],Dt=Ue[ut+1],Ft=Ue[ut+2];Le.push({key:this.circleKeys[it],x1:St-Ft,y1:Dt-Ft,x2:St+Ft,y2:Dt+Ft})}}}},wn.prototype._queryCellCircle=function(D,Y,q,ne,pe,Le,Ne,qe){var et=Ne.circle,vt=Ne.seenUids,xt=this.boxCells[pe];if(null!==xt)for(var te=this.bboxes,ue=0,we=xt;ue<we.length;ue+=1){var Oe=we[ue];if(!vt.box[Oe]){vt.box[Oe]=!0;var De=4*Oe;if(this._circleAndRectCollide(et.x,et.y,et.radius,te[De+0],te[De+1],te[De+2],te[De+3])&&(!qe||qe(this.boxKeys[Oe])))return Le.push(!0),!0}}var Ue=this.circleCells[pe];if(null!==Ue)for(var Ze=this.circles,Je=0,it=Ue;Je<it.length;Je+=1){var ut=it[Je];if(!vt.circle[ut]){vt.circle[ut]=!0;var St=3*ut;if(this._circlesCollide(Ze[St],Ze[St+1],Ze[St+2],et.x,et.y,et.radius)&&(!qe||qe(this.circleKeys[ut])))return Le.push(!0),!0}}},wn.prototype._forEachCell=function(D,Y,q,ne,pe,Le,Ne,qe){for(var et=this._convertToXCellCoord(D),vt=this._convertToYCellCoord(Y),xt=this._convertToXCellCoord(q),te=this._convertToYCellCoord(ne),ue=et;ue<=xt;ue++)for(var we=vt;we<=te;we++)if(pe.call(this,D,Y,q,ne,this.xCellCount*we+ue,Le,Ne,qe))return},wn.prototype._convertToXCellCoord=function(D){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(D*this.xScale)))},wn.prototype._convertToYCellCoord=function(D){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(D*this.yScale)))},wn.prototype._circlesCollide=function(D,Y,q,ne,pe,Le){var Ne=ne-D,qe=pe-Y,et=q+Le;return et*et>Ne*Ne+qe*qe},wn.prototype._circleAndRectCollide=function(D,Y,q,ne,pe,Le,Ne){var qe=(Le-ne)/2,et=Math.abs(D-(ne+qe));if(et>qe+q)return!1;var vt=(Ne-pe)/2,xt=Math.abs(Y-(pe+vt));if(xt>vt+q)return!1;if(et<=qe||xt<=vt)return!0;var te=et-qe,ue=xt-vt;return te*te+ue*ue<=q*q};var rr=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function $n(D,Y){for(var q=0;q<D;q++){var ne=Y.length;Y.resize(ne+4),Y.float32.set(rr,3*ne)}}function mr(D,Y,q){var ne=Y[0],pe=Y[1];return D[0]=q[0]*ne+q[4]*pe+q[12],D[1]=q[1]*ne+q[5]*pe+q[13],D[3]=q[3]*ne+q[7]*pe+q[15],D}var fr=100,Zn=function(D,Y,q){void 0===Y&&(Y=new wn(D.width+200,D.height+200,25)),void 0===q&&(q=new wn(D.width+200,D.height+200,25)),this.transform=D,this.grid=Y,this.ignoredGrid=q,this.pitchfactor=Math.cos(D._pitch)*D.cameraToCenterDistance,this.screenRightBoundary=D.width+fr,this.screenBottomBoundary=D.height+fr,this.gridRightBoundary=D.width+200,this.gridBottomBoundary=D.height+200};function qn(D,Y,q){return Y*(l.EXTENT/(D.tileSize*Math.pow(2,q-D.tileID.overscaledZ)))}Zn.prototype.placeCollisionBox=function(D,Y,q,ne,pe){var Le=this.projectAndGetPerspectiveRatio(ne,D.anchorPointX,D.anchorPointY),Ne=q*Le.perspectiveRatio,qe=D.x1*Ne+Le.point.x,et=D.y1*Ne+Le.point.y,vt=D.x2*Ne+Le.point.x,xt=D.y2*Ne+Le.point.y;return!this.isInsideGrid(qe,et,vt,xt)||!Y&&this.grid.hitTest(qe,et,vt,xt,pe)?{box:[],offscreen:!1}:{box:[qe,et,vt,xt],offscreen:this.isOffscreen(qe,et,vt,xt)}},Zn.prototype.placeCollisionCircles=function(D,Y,q,ne,pe,Le,Ne,qe,et,vt,xt,te,ue){var we=[],Oe=new l.Point(Y.anchorX,Y.anchorY),De=cn(Oe,Le),Ue=dn(this.transform.cameraToCenterDistance,De.signedDistanceFromCamera),Ze=(vt?pe/Ue:pe*Ue)/l.ONE_EM,Je=cn(Oe,Ne).point,it=En(Ze,ne,Y.lineOffsetX*Ze,Y.lineOffsetY*Ze,!1,Je,Oe,Y,q,Ne,{}),ut=!1,St=!1,Dt=!0;if(it){for(var Ft=.5*te*Ue+ue,Yt=new l.Point(-100,-100),ln=new l.Point(this.screenRightBoundary,this.screenBottomBoundary),Xt=new Kt,en=it.first,Jt=it.last,bn=[],gn=en.path.length-1;gn>=1;gn--)bn.push(en.path[gn]);for(var Qt=1;Qt<Jt.path.length;Qt++)bn.push(Jt.path[Qt]);var Pn=2.5*Ft;if(qe){var Dn=bn.map(function(yi){return cn(yi,qe)});bn=Dn.some(function(yi){return yi.signedDistanceFromCamera<=0})?[]:Dn.map(function(yi){return yi.point})}var Xn=[];if(bn.length>0){for(var Jn=bn[0].clone(),gr=bn[0].clone(),vr=1;vr<bn.length;vr++)Jn.x=Math.min(Jn.x,bn[vr].x),Jn.y=Math.min(Jn.y,bn[vr].y),gr.x=Math.max(gr.x,bn[vr].x),gr.y=Math.max(gr.y,bn[vr].y);Xn=Jn.x>=Yt.x&&gr.x<=ln.x&&Jn.y>=Yt.y&&gr.y<=ln.y?[bn]:gr.x<Yt.x||Jn.x>ln.x||gr.y<Yt.y||Jn.y>ln.y?[]:l.clipLine([bn],Yt.x,Yt.y,ln.x,ln.y)}for(var sr=0,dr=Xn;sr<dr.length;sr+=1){var Vr;Xt.reset(dr[sr],.25*Ft),Vr=Xt.length<=.5*Ft?1:Math.ceil(Xt.paddedLength/Pn)+1;for(var Hr=0;Hr<Vr;Hr++){var hr=Hr/Math.max(Vr-1,1),Ar=Xt.lerp(hr),Dr=Ar.x+fr,zr=Ar.y+fr;we.push(Dr,zr,Ft,0);var Wr=Dr-Ft,Zr=zr-Ft,$r=Dr+Ft,ui=zr+Ft;if(Dt=Dt&&this.isOffscreen(Wr,Zr,$r,ui),St=St||this.isInsideGrid(Wr,Zr,$r,ui),!D&&this.grid.hitTestCircle(Dr,zr,Ft,xt)&&(ut=!0,!et))return{circles:[],offscreen:!1,collisionDetected:ut}}}}return{circles:!et&&ut||!St?[]:we,offscreen:Dt,collisionDetected:ut}},Zn.prototype.queryRenderedSymbols=function(D){if(0===D.length||0===this.grid.keysLength()&&0===this.ignoredGrid.keysLength())return{};for(var Y=[],q=1/0,ne=1/0,pe=-1/0,Le=-1/0,Ne=0,qe=D;Ne<qe.length;Ne+=1){var et=qe[Ne],vt=new l.Point(et.x+fr,et.y+fr);q=Math.min(q,vt.x),ne=Math.min(ne,vt.y),pe=Math.max(pe,vt.x),Le=Math.max(Le,vt.y),Y.push(vt)}for(var xt={},te={},ue=0,we=this.grid.query(q,ne,pe,Le).concat(this.ignoredGrid.query(q,ne,pe,Le));ue<we.length;ue+=1){var Oe=we[ue],De=Oe.key;if(void 0===xt[De.bucketInstanceId]&&(xt[De.bucketInstanceId]={}),!xt[De.bucketInstanceId][De.featureIndex]){var Ue=[new l.Point(Oe.x1,Oe.y1),new l.Point(Oe.x2,Oe.y1),new l.Point(Oe.x2,Oe.y2),new l.Point(Oe.x1,Oe.y2)];l.polygonIntersectsPolygon(Y,Ue)&&(xt[De.bucketInstanceId][De.featureIndex]=!0,void 0===te[De.bucketInstanceId]&&(te[De.bucketInstanceId]=[]),te[De.bucketInstanceId].push(De.featureIndex))}}return te},Zn.prototype.insertCollisionBox=function(D,Y,q,ne,pe){(Y?this.ignoredGrid:this.grid).insert({bucketInstanceId:q,featureIndex:ne,collisionGroupID:pe},D[0],D[1],D[2],D[3])},Zn.prototype.insertCollisionCircles=function(D,Y,q,ne,pe){for(var Le=Y?this.ignoredGrid:this.grid,Ne={bucketInstanceId:q,featureIndex:ne,collisionGroupID:pe},qe=0;qe<D.length;qe+=4)Le.insertCircle(Ne,D[qe],D[qe+1],D[qe+2])},Zn.prototype.projectAndGetPerspectiveRatio=function(D,Y,q){var ne=[Y,q,0,1];return mr(ne,ne,D),{point:new l.Point((ne[0]/ne[3]+1)/2*this.transform.width+fr,(-ne[1]/ne[3]+1)/2*this.transform.height+fr),perspectiveRatio:.5+this.transform.cameraToCenterDistance/ne[3]*.5}},Zn.prototype.isOffscreen=function(D,Y,q,ne){return q<fr||D>=this.screenRightBoundary||ne<fr||Y>this.screenBottomBoundary},Zn.prototype.isInsideGrid=function(D,Y,q,ne){return q>=0&&D<this.gridRightBoundary&&ne>=0&&Y<this.gridBottomBoundary},Zn.prototype.getViewportMatrix=function(){var D=l.identity([]);return l.translate(D,D,[-100,-100,0]),D};var ur=function(D,Y,q,ne){this.opacity=D?Math.max(0,Math.min(1,D.opacity+(D.placed?Y:-Y))):ne&&q?1:0,this.placed=q};ur.prototype.isHidden=function(){return 0===this.opacity&&!this.placed};var Zt=function(D,Y,q,ne,pe){this.text=new ur(D?D.text:null,Y,q,pe),this.icon=new ur(D?D.icon:null,Y,ne,pe)};Zt.prototype.isHidden=function(){return this.text.isHidden()&&this.icon.isHidden()};var nn=function(D,Y,q){this.text=D,this.icon=Y,this.skipFade=q},zn=function(){this.invProjMatrix=l.create(),this.viewportMatrix=l.create(),this.circles=[]},_n=function(D,Y,q,ne,pe){this.bucketInstanceId=D,this.featureIndex=Y,this.sourceLayerIndex=q,this.bucketIndex=ne,this.tileID=pe},Cn=function(D){this.crossSourceCollisions=D,this.maxGroupID=0,this.collisionGroups={}};function Un(D,Y,q,ne,pe){var Le=l.getAnchorAlignment(D),Ne=-(Le.horizontalAlign-.5)*Y,qe=-(Le.verticalAlign-.5)*q,et=l.evaluateVariableOffset(D,ne);return new l.Point(Ne+et[0]*pe,qe+et[1]*pe)}function Gn(D,Y,q,ne,pe,Le){var Ne=D.x1,qe=D.x2,et=D.y1,vt=D.y2,xt=D.anchorPointX,te=D.anchorPointY,ue=new l.Point(Y,q);return ne&&ue._rotate(pe?Le:-Le),{x1:Ne+ue.x,y1:et+ue.y,x2:qe+ue.x,y2:vt+ue.y,anchorPointX:xt,anchorPointY:te}}Cn.prototype.get=function(D){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[D]){var Y=++this.maxGroupID;this.collisionGroups[D]={ID:Y,predicate:function(q){return q.collisionGroupID===Y}}}return this.collisionGroups[D]};var ar=function(D,Y,q,ne){this.transform=D.clone(),this.collisionIndex=new Zn(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=Y,this.retainedQueryData={},this.collisionGroups=new Cn(q),this.collisionCircleArrays={},this.prevPlacement=ne,ne&&(ne.prevPlacement=void 0),this.placedOrientations={}};function yr(D,Y,q,ne,pe){D.emplaceBack(Y?1:0,q?1:0,ne||0,pe||0),D.emplaceBack(Y?1:0,q?1:0,ne||0,pe||0),D.emplaceBack(Y?1:0,q?1:0,ne||0,pe||0),D.emplaceBack(Y?1:0,q?1:0,ne||0,pe||0)}ar.prototype.getBucketParts=function(D,Y,q,ne){var pe=q.getBucket(Y),Le=q.latestFeatureIndex;if(pe&&Le&&Y.id===pe.layerIds[0]){var Ne=q.collisionBoxArray,qe=pe.layers[0].layout,et=Math.pow(2,this.transform.zoom-q.tileID.overscaledZ),vt=q.tileSize/l.EXTENT,xt=this.transform.calculatePosMatrix(q.tileID.toUnwrapped()),te="map"===qe.get("text-pitch-alignment"),ue="map"===qe.get("text-rotation-alignment"),we=qn(q,1,this.transform.zoom),Oe=Bn(xt,te,ue,this.transform,we),De=null;if(te){var Ue=vn(xt,te,ue,this.transform,we);De=l.multiply([],this.transform.labelPlaneMatrix,Ue)}this.retainedQueryData[pe.bucketInstanceId]=new _n(pe.bucketInstanceId,Le,pe.sourceLayerIndex,pe.index,q.tileID);var Ze={bucket:pe,layout:qe,posMatrix:xt,textLabelPlaneMatrix:Oe,labelToScreenMatrix:De,scale:et,textPixelRatio:vt,holdingForFade:q.holdingForFade(),collisionBoxArray:Ne,partiallyEvaluatedTextSize:l.evaluateSizeForZoom(pe.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get(pe.sourceID)};if(ne)for(var Je=0,it=pe.sortKeyRanges;Je<it.length;Je+=1){var ut=it[Je];D.push({sortKey:ut.sortKey,symbolInstanceStart:ut.symbolInstanceStart,symbolInstanceEnd:ut.symbolInstanceEnd,parameters:Ze})}else D.push({symbolInstanceStart:0,symbolInstanceEnd:pe.symbolInstances.length,parameters:Ze})}},ar.prototype.attemptAnchorPlacement=function(D,Y,q,ne,pe,Le,Ne,qe,et,vt,xt,te,ue,we,Oe){var De,Ue=[te.textOffset0,te.textOffset1],Ze=Un(D,q,ne,Ue,pe),Je=this.collisionIndex.placeCollisionBox(Gn(Y,Ze.x,Ze.y,Le,Ne,this.transform.angle),xt,qe,et,vt.predicate);if(!Oe||0!==this.collisionIndex.placeCollisionBox(Gn(Oe,Ze.x,Ze.y,Le,Ne,this.transform.angle),xt,qe,et,vt.predicate).box.length)return Je.box.length>0?(this.prevPlacement&&this.prevPlacement.variableOffsets[te.crossTileID]&&this.prevPlacement.placements[te.crossTileID]&&this.prevPlacement.placements[te.crossTileID].text&&(De=this.prevPlacement.variableOffsets[te.crossTileID].anchor),this.variableOffsets[te.crossTileID]={textOffset:Ue,width:q,height:ne,anchor:D,textBoxScale:pe,prevAnchor:De},this.markUsedJustification(ue,D,te,we),ue.allowVerticalPlacement&&(this.markUsedOrientation(ue,we,te),this.placedOrientations[te.crossTileID]=we),{shift:Ze,placedGlyphBoxes:Je}):void 0},ar.prototype.placeLayerBucketPart=function(D,Y,q){var ne=this,pe=D.parameters,Le=pe.bucket,Ne=pe.layout,qe=pe.posMatrix,et=pe.textLabelPlaneMatrix,vt=pe.labelToScreenMatrix,xt=pe.textPixelRatio,te=pe.holdingForFade,ue=pe.collisionBoxArray,we=pe.partiallyEvaluatedTextSize,Oe=pe.collisionGroup,De=Ne.get("text-optional"),Ue=Ne.get("icon-optional"),Ze=Ne.get("text-allow-overlap"),Je=Ne.get("icon-allow-overlap"),it="map"===Ne.get("text-rotation-alignment"),ut="map"===Ne.get("text-pitch-alignment"),St="none"!==Ne.get("icon-text-fit"),Dt="viewport-y"===Ne.get("symbol-z-order"),Ft=Ze&&(Je||!Le.hasIconData()||Ue),Yt=Je&&(Ze||!Le.hasTextData()||De);!Le.collisionArrays&&ue&&Le.deserializeCollisionBoxes(ue);var ln=function(Qt,Pn){if(!Y[Qt.crossTileID])if(te)ne.placements[Qt.crossTileID]=new nn(!1,!1,!1);else{var Dn,Xn=!1,Jn=!1,gr=!0,vr=null,sr={box:null,offscreen:null},dr={box:null,offscreen:null},kr=null,Vr=null,Hr=0,hr=0,Ar=0;Pn.textFeatureIndex?Hr=Pn.textFeatureIndex:Qt.useRuntimeCollisionCircles&&(Hr=Qt.featureIndex),Pn.verticalTextFeatureIndex&&(hr=Pn.verticalTextFeatureIndex);var Dr=Pn.textBox;if(Dr){var zr=function(Yr){var Bi=l.WritingMode.horizontal;if(Le.allowVerticalPlacement&&!Yr&&ne.prevPlacement){var ha=ne.prevPlacement.placedOrientations[Qt.crossTileID];ha&&(ne.placedOrientations[Qt.crossTileID]=ha,ne.markUsedOrientation(Le,Bi=ha,Qt))}return Bi},Wr=function(Yr,Bi){if(Le.allowVerticalPlacement&&Qt.numVerticalGlyphVertices>0&&Pn.verticalTextBox)for(var ha=0,Ds=Le.writingModes;ha<Ds.length&&(Ds[ha]===l.WritingMode.vertical?(sr=Bi(),dr=sr):sr=Yr(),!(sr&&sr.box&&sr.box.length));ha+=1);else sr=Yr()};if(Ne.get("text-variable-anchor")){var Zr=Ne.get("text-variable-anchor");if(ne.prevPlacement&&ne.prevPlacement.variableOffsets[Qt.crossTileID]){var $r=ne.prevPlacement.variableOffsets[Qt.crossTileID];Zr.indexOf($r.anchor)>0&&(Zr=Zr.filter(function(Yr){return Yr!==$r.anchor})).unshift($r.anchor)}var ui=function(Yr,Bi,ha){for(var Ds=Yr.x2-Yr.x1,sc=Yr.y2-Yr.y1,Jl=Qt.textBoxScale,lc=St&&!Je?Bi:null,ul={box:[],offscreen:!1},_u=Ze?2*Zr.length:Zr.length,xl=0;xl<_u;++xl){var $s=ne.attemptAnchorPlacement(Zr[xl%Zr.length],Yr,Ds,sc,Jl,it,ut,xt,qe,Oe,xl>=Zr.length,Qt,Le,ha,lc);if($s&&(ul=$s.placedGlyphBoxes)&&ul.box&&ul.box.length){Xn=!0,vr=$s.shift;break}}return ul};Wr(function(){return ui(Dr,Pn.iconBox,l.WritingMode.horizontal)},function(){var Yr=Pn.verticalTextBox;return Le.allowVerticalPlacement&&!(sr&&sr.box&&sr.box.length)&&Qt.numVerticalGlyphVertices>0&&Yr?ui(Yr,Pn.verticalIconBox,l.WritingMode.vertical):{box:null,offscreen:null}}),sr&&(Xn=sr.box,gr=sr.offscreen);var yi=zr(sr&&sr.box);if(!Xn&&ne.prevPlacement){var hi=ne.prevPlacement.variableOffsets[Qt.crossTileID];hi&&(ne.variableOffsets[Qt.crossTileID]=hi,ne.markUsedJustification(Le,hi.anchor,Qt,yi))}}else{var si=function(Yr,Bi){var ha=ne.collisionIndex.placeCollisionBox(Yr,Ze,xt,qe,Oe.predicate);return ha&&ha.box&&ha.box.length&&(ne.markUsedOrientation(Le,Bi,Qt),ne.placedOrientations[Qt.crossTileID]=Bi),ha};Wr(function(){return si(Dr,l.WritingMode.horizontal)},function(){var Yr=Pn.verticalTextBox;return Le.allowVerticalPlacement&&Qt.numVerticalGlyphVertices>0&&Yr?si(Yr,l.WritingMode.vertical):{box:null,offscreen:null}}),zr(sr&&sr.box&&sr.box.length)}}if(Xn=(Dn=sr)&&Dn.box&&Dn.box.length>0,gr=Dn&&Dn.offscreen,Qt.useRuntimeCollisionCircles){var ci=Le.text.placedSymbolArray.get(Qt.centerJustifiedTextSymbolIndex),pi=l.evaluateSizeForFeature(Le.textSizeData,we,ci),Si=Ne.get("text-padding");kr=ne.collisionIndex.placeCollisionCircles(Ze,ci,Le.lineVertexArray,Le.glyphOffsetArray,pi,qe,et,vt,q,ut,Oe.predicate,Qt.collisionCircleDiameter,Si),Xn=Ze||kr.circles.length>0&&!kr.collisionDetected,gr=gr&&kr.offscreen}if(Pn.iconFeatureIndex&&(Ar=Pn.iconFeatureIndex),Pn.iconBox){var Fi=function(Yr){var Bi=St&&vr?Gn(Yr,vr.x,vr.y,it,ut,ne.transform.angle):Yr;return ne.collisionIndex.placeCollisionBox(Bi,Je,xt,qe,Oe.predicate)};Jn=dr&&dr.box&&dr.box.length&&Pn.verticalIconBox?(Vr=Fi(Pn.verticalIconBox)).box.length>0:(Vr=Fi(Pn.iconBox)).box.length>0,gr=gr&&Vr.offscreen}var Br=De||0===Qt.numHorizontalGlyphVertices&&0===Qt.numVerticalGlyphVertices,Gi=Ue||0===Qt.numIconVertices;if(Br||Gi?Gi?Br||(Jn=Jn&&Xn):Xn=Jn&&Xn:Jn=Xn=Jn&&Xn,Xn&&Dn&&Dn.box&&ne.collisionIndex.insertCollisionBox(Dn.box,Ne.get("text-ignore-placement"),Le.bucketInstanceId,dr&&dr.box&&hr?hr:Hr,Oe.ID),Jn&&Vr&&ne.collisionIndex.insertCollisionBox(Vr.box,Ne.get("icon-ignore-placement"),Le.bucketInstanceId,Ar,Oe.ID),kr&&(Xn&&ne.collisionIndex.insertCollisionCircles(kr.circles,Ne.get("text-ignore-placement"),Le.bucketInstanceId,Hr,Oe.ID),q)){var Qi=Le.bucketInstanceId,ki=ne.collisionCircleArrays[Qi];void 0===ki&&(ki=ne.collisionCircleArrays[Qi]=new zn);for(var Ga=0;Ga<kr.circles.length;Ga+=4)ki.circles.push(kr.circles[Ga+0]),ki.circles.push(kr.circles[Ga+1]),ki.circles.push(kr.circles[Ga+2]),ki.circles.push(kr.collisionDetected?1:0)}ne.placements[Qt.crossTileID]=new nn(Xn||Ft,Jn||Yt,gr||Le.justReloaded),Y[Qt.crossTileID]=!0}};if(Dt)for(var Xt=Le.getSortedSymbolIndexes(this.transform.angle),en=Xt.length-1;en>=0;--en){var Jt=Xt[en];ln(Le.symbolInstances.get(Jt),Le.collisionArrays[Jt])}else for(var bn=D.symbolInstanceStart;bn<D.symbolInstanceEnd;bn++)ln(Le.symbolInstances.get(bn),Le.collisionArrays[bn]);if(q&&Le.bucketInstanceId in this.collisionCircleArrays){var gn=this.collisionCircleArrays[Le.bucketInstanceId];l.invert(gn.invProjMatrix,qe),gn.viewportMatrix=this.collisionIndex.getViewportMatrix()}Le.justReloaded=!1},ar.prototype.markUsedJustification=function(D,Y,q,ne){var pe;pe=ne===l.WritingMode.vertical?q.verticalPlacedTextSymbolIndex:{left:q.leftJustifiedTextSymbolIndex,center:q.centerJustifiedTextSymbolIndex,right:q.rightJustifiedTextSymbolIndex}[l.getAnchorJustification(Y)];for(var Ne=0,qe=[q.leftJustifiedTextSymbolIndex,q.centerJustifiedTextSymbolIndex,q.rightJustifiedTextSymbolIndex,q.verticalPlacedTextSymbolIndex];Ne<qe.length;Ne+=1){var et=qe[Ne];et>=0&&(D.text.placedSymbolArray.get(et).crossTileID=pe>=0&&et!==pe?0:q.crossTileID)}},ar.prototype.markUsedOrientation=function(D,Y,q){for(var ne=Y===l.WritingMode.horizontal||Y===l.WritingMode.horizontalOnly?Y:0,pe=Y===l.WritingMode.vertical?Y:0,Le=0,Ne=[q.leftJustifiedTextSymbolIndex,q.centerJustifiedTextSymbolIndex,q.rightJustifiedTextSymbolIndex];Le<Ne.length;Le+=1)D.text.placedSymbolArray.get(Ne[Le]).placedOrientation=ne;q.verticalPlacedTextSymbolIndex&&(D.text.placedSymbolArray.get(q.verticalPlacedTextSymbolIndex).placedOrientation=pe)},ar.prototype.commit=function(D){this.commitTime=D,this.zoomAtLastRecencyCheck=this.transform.zoom;var Y=this.prevPlacement,q=!1;this.prevZoomAdjustment=Y?Y.zoomAdjustment(this.transform.zoom):0;var ne=Y?Y.symbolFadeChange(D):1,pe=Y?Y.opacities:{},Le=Y?Y.variableOffsets:{},Ne=Y?Y.placedOrientations:{};for(var qe in this.placements){var et=this.placements[qe],vt=pe[qe];vt?(this.opacities[qe]=new Zt(vt,ne,et.text,et.icon),q=q||et.text!==vt.text.placed||et.icon!==vt.icon.placed):(this.opacities[qe]=new Zt(null,ne,et.text,et.icon,et.skipFade),q=q||et.text||et.icon)}for(var xt in pe){var te=pe[xt];if(!this.opacities[xt]){var ue=new Zt(te,ne,!1,!1);ue.isHidden()||(this.opacities[xt]=ue,q=q||te.text.placed||te.icon.placed)}}for(var we in Le)this.variableOffsets[we]||!this.opacities[we]||this.opacities[we].isHidden()||(this.variableOffsets[we]=Le[we]);for(var Oe in Ne)this.placedOrientations[Oe]||!this.opacities[Oe]||this.opacities[Oe].isHidden()||(this.placedOrientations[Oe]=Ne[Oe]);q?this.lastPlacementChangeTime=D:"number"!=typeof this.lastPlacementChangeTime&&(this.lastPlacementChangeTime=Y?Y.lastPlacementChangeTime:D)},ar.prototype.updateLayerOpacities=function(D,Y){for(var q={},ne=0,pe=Y;ne<pe.length;ne+=1){var Le=pe[ne],Ne=Le.getBucket(D);Ne&&Le.latestFeatureIndex&&D.id===Ne.layerIds[0]&&this.updateBucketOpacities(Ne,q,Le.collisionBoxArray)}},ar.prototype.updateBucketOpacities=function(D,Y,q){var ne=this;D.hasTextData()&&D.text.opacityVertexArray.clear(),D.hasIconData()&&D.icon.opacityVertexArray.clear(),D.hasIconCollisionBoxData()&&D.iconCollisionBox.collisionVertexArray.clear(),D.hasTextCollisionBoxData()&&D.textCollisionBox.collisionVertexArray.clear();var pe=D.layers[0].layout,Le=new Zt(null,0,!1,!1,!0),Ne=pe.get("text-allow-overlap"),qe=pe.get("icon-allow-overlap"),et=pe.get("text-variable-anchor"),vt="map"===pe.get("text-rotation-alignment"),xt="map"===pe.get("text-pitch-alignment"),te="none"!==pe.get("icon-text-fit"),ue=new Zt(null,0,Ne&&(qe||!D.hasIconData()||pe.get("icon-optional")),qe&&(Ne||!D.hasTextData()||pe.get("text-optional")),!0);!D.collisionArrays&&q&&(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData())&&D.deserializeCollisionBoxes(q);for(var we=function(Ze,Je,it){for(var ut=0;ut<Je/4;ut++)Ze.opacityVertexArray.emplaceBack(it)},Oe=function(Ze){var Je=D.symbolInstances.get(Ze),it=Je.numHorizontalGlyphVertices,ut=Je.numVerticalGlyphVertices,St=Je.crossTileID,Ft=ne.opacities[St];Y[St]?Ft=Le:Ft||(ne.opacities[St]=Ft=ue),Y[St]=!0;var ln=Je.numIconVertices>0,Xt=ne.placedOrientations[Je.crossTileID],en=Xt===l.WritingMode.vertical,Jt=Xt===l.WritingMode.horizontal||Xt===l.WritingMode.horizontalOnly;if(it>0||ut>0){var bn=Tn(Ft.text);we(D.text,it,en?an:bn),we(D.text,ut,Jt?an:bn);var Pn=Ft.text.isHidden();[Je.rightJustifiedTextSymbolIndex,Je.centerJustifiedTextSymbolIndex,Je.leftJustifiedTextSymbolIndex].forEach(function(Ar){Ar>=0&&(D.text.placedSymbolArray.get(Ar).hidden=Pn||en?1:0)}),Je.verticalPlacedTextSymbolIndex>=0&&(D.text.placedSymbolArray.get(Je.verticalPlacedTextSymbolIndex).hidden=Pn||Jt?1:0);var Dn=ne.variableOffsets[Je.crossTileID];Dn&&ne.markUsedJustification(D,Dn.anchor,Je,Xt);var Xn=ne.placedOrientations[Je.crossTileID];Xn&&(ne.markUsedJustification(D,"left",Je,Xn),ne.markUsedOrientation(D,Xn,Je))}if(ln){var Jn=Tn(Ft.icon),gr=!(te&&Je.verticalPlacedIconSymbolIndex&&en);Je.placedIconSymbolIndex>=0&&(we(D.icon,Je.numIconVertices,gr?Jn:an),D.icon.placedSymbolArray.get(Je.placedIconSymbolIndex).hidden=Ft.icon.isHidden()),Je.verticalPlacedIconSymbolIndex>=0&&(we(D.icon,Je.numVerticalIconVertices,gr?an:Jn),D.icon.placedSymbolArray.get(Je.verticalPlacedIconSymbolIndex).hidden=Ft.icon.isHidden())}if(D.hasIconCollisionBoxData()||D.hasTextCollisionBoxData()){var dr=D.collisionArrays[Ze];if(dr){var kr=new l.Point(0,0);if(dr.textBox||dr.verticalTextBox){var Vr=!0;if(et){var Hr=ne.variableOffsets[St];Hr?(kr=Un(Hr.anchor,Hr.width,Hr.height,Hr.textOffset,Hr.textBoxScale),vt&&kr._rotate(xt?ne.transform.angle:-ne.transform.angle)):Vr=!1}dr.textBox&&yr(D.textCollisionBox.collisionVertexArray,Ft.text.placed,!Vr||en,kr.x,kr.y),dr.verticalTextBox&&yr(D.textCollisionBox.collisionVertexArray,Ft.text.placed,!Vr||Jt,kr.x,kr.y)}var hr=!(Jt||!dr.verticalIconBox);dr.iconBox&&yr(D.iconCollisionBox.collisionVertexArray,Ft.icon.placed,hr,te?kr.x:0,te?kr.y:0),dr.verticalIconBox&&yr(D.iconCollisionBox.collisionVertexArray,Ft.icon.placed,!hr,te?kr.x:0,te?kr.y:0)}}},De=0;De<D.symbolInstances.length;De++)Oe(De);if(D.sortFeatures(this.transform.angle),this.retainedQueryData[D.bucketInstanceId]&&(this.retainedQueryData[D.bucketInstanceId].featureSortOrder=D.featureSortOrder),D.hasTextData()&&D.text.opacityVertexBuffer&&D.text.opacityVertexBuffer.updateData(D.text.opacityVertexArray),D.hasIconData()&&D.icon.opacityVertexBuffer&&D.icon.opacityVertexBuffer.updateData(D.icon.opacityVertexArray),D.hasIconCollisionBoxData()&&D.iconCollisionBox.collisionVertexBuffer&&D.iconCollisionBox.collisionVertexBuffer.updateData(D.iconCollisionBox.collisionVertexArray),D.hasTextCollisionBoxData()&&D.textCollisionBox.collisionVertexBuffer&&D.textCollisionBox.collisionVertexBuffer.updateData(D.textCollisionBox.collisionVertexArray),D.bucketInstanceId in this.collisionCircleArrays){var Ue=this.collisionCircleArrays[D.bucketInstanceId];D.placementInvProjMatrix=Ue.invProjMatrix,D.placementViewportMatrix=Ue.viewportMatrix,D.collisionCircleArray=Ue.circles,delete this.collisionCircleArrays[D.bucketInstanceId]}},ar.prototype.symbolFadeChange=function(D){return 0===this.fadeDuration?1:(D-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment},ar.prototype.zoomAdjustment=function(D){return Math.max(0,(this.transform.zoom-D)/1.5)},ar.prototype.hasTransitions=function(D){return this.stale||D-this.lastPlacementChangeTime<this.fadeDuration},ar.prototype.stillRecent=function(D,Y){var q=this.zoomAtLastRecencyCheck===Y?1-this.zoomAdjustment(Y):1;return this.zoomAtLastRecencyCheck=Y,this.commitTime+this.fadeDuration*q>D},ar.prototype.setStale=function(){this.stale=!0};var $t=Math.pow(2,25),kn=Math.pow(2,24),zt=Math.pow(2,17),Wt=Math.pow(2,16),tn=Math.pow(2,9),Sn=Math.pow(2,8),An=Math.pow(2,1);function Tn(D){if(0===D.opacity&&!D.placed)return 0;if(1===D.opacity&&D.placed)return 4294967295;var Y=D.placed?1:0,q=Math.floor(127*D.opacity);return q*$t+Y*kn+q*zt+Y*Wt+q*tn+Y*Sn+q*An+Y}var an=0,mn=function(D){this._sortAcrossTiles="viewport-y"!==D.layout.get("symbol-z-order")&&void 0!==D.layout.get("symbol-sort-key").constantOr(1),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};mn.prototype.continuePlacement=function(D,Y,q,ne,pe){for(var Le=this._bucketParts;this._currentTileIndex<D.length;)if(Y.getBucketParts(Le,ne,D[this._currentTileIndex],this._sortAcrossTiles),this._currentTileIndex++,pe())return!0;for(this._sortAcrossTiles&&(this._sortAcrossTiles=!1,Le.sort(function(et,vt){return et.sortKey-vt.sortKey}));this._currentPartIndex<Le.length;)if(Y.placeLayerBucketPart(Le[this._currentPartIndex],this._seenCrossTileIDs,q),this._currentPartIndex++,pe())return!0;return!1};var on=function(D,Y,q,ne,pe,Le,Ne){this.placement=new ar(D,pe,Le,Ne),this._currentPlacementIndex=Y.length-1,this._forceFullPlacement=q,this._showCollisionBoxes=ne,this._done=!1};on.prototype.isDone=function(){return this._done},on.prototype.continuePlacement=function(D,Y,q){for(var ne=this,pe=l.browser.now(),Le=function(){var et=l.browser.now()-pe;return!ne._forceFullPlacement&&et>2};this._currentPlacementIndex>=0;){var Ne=Y[D[this._currentPlacementIndex]],qe=this.placement.collisionIndex.transform.zoom;if("symbol"===Ne.type&&(!Ne.minzoom||Ne.minzoom<=qe)&&(!Ne.maxzoom||Ne.maxzoom>qe)){if(this._inProgressLayer||(this._inProgressLayer=new mn(Ne)),this._inProgressLayer.continuePlacement(q[Ne.source],this.placement,this._showCollisionBoxes,Ne,Le))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},on.prototype.commit=function(D){return this.placement.commit(D),this.placement};var fn=512/l.EXTENT/2,yn=function(D,Y,q){this.tileID=D,this.indexedSymbolInstances={},this.bucketInstanceId=q;for(var ne=0;ne<Y.length;ne++){var pe=Y.get(ne),Le=pe.key;this.indexedSymbolInstances[Le]||(this.indexedSymbolInstances[Le]=[]),this.indexedSymbolInstances[Le].push({crossTileID:pe.crossTileID,coord:this.getScaledCoordinates(pe,D)})}};yn.prototype.getScaledCoordinates=function(D,Y){var ne=fn/Math.pow(2,Y.canonical.z-this.tileID.canonical.z);return{x:Math.floor((Y.canonical.x*l.EXTENT+D.anchorX)*ne),y:Math.floor((Y.canonical.y*l.EXTENT+D.anchorY)*ne)}},yn.prototype.findMatches=function(D,Y,q){for(var ne=this.tileID.canonical.z<Y.canonical.z?1:Math.pow(2,this.tileID.canonical.z-Y.canonical.z),pe=0;pe<D.length;pe++){var Le=D.get(pe);if(!Le.crossTileID){var Ne=this.indexedSymbolInstances[Le.key];if(Ne)for(var qe=this.getScaledCoordinates(Le,Y),et=0,vt=Ne;et<vt.length;et+=1){var xt=vt[et];if(Math.abs(xt.coord.x-qe.x)<=ne&&Math.abs(xt.coord.y-qe.y)<=ne&&!q[xt.crossTileID]){q[xt.crossTileID]=!0,Le.crossTileID=xt.crossTileID;break}}}}};var Ln=function(){this.maxCrossTileID=0};Ln.prototype.generate=function(){return++this.maxCrossTileID};var Hn=function(){this.indexes={},this.usedCrossTileIDs={},this.lng=0};Hn.prototype.handleWrapJump=function(D){var Y=Math.round((D-this.lng)/360);if(0!==Y)for(var q in this.indexes){var ne=this.indexes[q],pe={};for(var Le in ne){var Ne=ne[Le];Ne.tileID=Ne.tileID.unwrapTo(Ne.tileID.wrap+Y),pe[Ne.tileID.key]=Ne}this.indexes[q]=pe}this.lng=D},Hn.prototype.addBucket=function(D,Y,q){if(this.indexes[D.overscaledZ]&&this.indexes[D.overscaledZ][D.key]){if(this.indexes[D.overscaledZ][D.key].bucketInstanceId===Y.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(D.overscaledZ,this.indexes[D.overscaledZ][D.key])}for(var ne=0;ne<Y.symbolInstances.length;ne++)Y.symbolInstances.get(ne).crossTileID=0;this.usedCrossTileIDs[D.overscaledZ]||(this.usedCrossTileIDs[D.overscaledZ]={});var pe=this.usedCrossTileIDs[D.overscaledZ];for(var Le in this.indexes){var Ne=this.indexes[Le];if(Number(Le)>D.overscaledZ)for(var qe in Ne){var et=Ne[qe];et.tileID.isChildOf(D)&&et.findMatches(Y.symbolInstances,D,pe)}else{var vt=Ne[D.scaledTo(Number(Le)).key];vt&&vt.findMatches(Y.symbolInstances,D,pe)}}for(var xt=0;xt<Y.symbolInstances.length;xt++){var te=Y.symbolInstances.get(xt);te.crossTileID||(te.crossTileID=q.generate(),pe[te.crossTileID]=!0)}return void 0===this.indexes[D.overscaledZ]&&(this.indexes[D.overscaledZ]={}),this.indexes[D.overscaledZ][D.key]=new yn(D,Y.symbolInstances,Y.bucketInstanceId),!0},Hn.prototype.removeBucketCrossTileIDs=function(D,Y){for(var q in Y.indexedSymbolInstances)for(var ne=0,pe=Y.indexedSymbolInstances[q];ne<pe.length;ne+=1)delete this.usedCrossTileIDs[D][pe[ne].crossTileID]},Hn.prototype.removeStaleBuckets=function(D){var Y=!1;for(var q in this.indexes){var ne=this.indexes[q];for(var pe in ne)D[ne[pe].bucketInstanceId]||(this.removeBucketCrossTileIDs(q,ne[pe]),delete ne[pe],Y=!0)}return Y};var Wn=function(){this.layerIndexes={},this.crossTileIDs=new Ln,this.maxBucketInstanceId=0,this.bucketsInCurrentPlacement={}};Wn.prototype.addLayer=function(D,Y,q){var ne=this.layerIndexes[D.id];void 0===ne&&(ne=this.layerIndexes[D.id]=new Hn);var pe=!1,Le={};ne.handleWrapJump(q);for(var Ne=0,qe=Y;Ne<qe.length;Ne+=1){var et=qe[Ne],vt=et.getBucket(D);vt&&D.id===vt.layerIds[0]&&(vt.bucketInstanceId||(vt.bucketInstanceId=++this.maxBucketInstanceId),ne.addBucket(et.tileID,vt,this.crossTileIDs)&&(pe=!0),Le[vt.bucketInstanceId]=!0)}return ne.removeStaleBuckets(Le)&&(pe=!0),pe},Wn.prototype.pruneUnusedLayers=function(D){var Y={};for(var q in D.forEach(function(ne){Y[ne]=!0}),this.layerIndexes)Y[q]||delete this.layerIndexes[q]};var Kn=function(D,Y){return l.emitValidationErrors(D,Y&&Y.filter(function(q){return"source.canvas"!==q.identifier}))},nr=l.pick(gt,["addLayer","removeLayer","setPaintProperty","setLayoutProperty","setFilter","addSource","removeSource","setLayerZoomRange","setLight","setTransition","setGeoJSONSourceData"]),er=l.pick(gt,["setCenter","setZoom","setBearing","setPitch"]),or=function(){var D={},Y=l.styleSpec.$version;for(var q in l.styleSpec.$root){var pe,ne=l.styleSpec.$root[q];ne.required&&null!=(pe="version"===q?Y:"array"===ne.type?[]:{})&&(D[q]=pe)}return D}(),ir=function(D){function Y(q,ne){var pe=this;void 0===ne&&(ne={}),D.call(this),this.map=q,this.dispatcher=new L(At(),this),this.imageManager=new p,this.imageManager.setEventedParent(this),this.glyphManager=new m(q._requestManager,ne.localIdeographFontFamily),this.lineAtlas=new E(256,512),this.crossTileSymbolIndex=new Wn,this._layers={},this._serializedLayers={},this._order=[],this.sourceCaches={},this.zoomHistory=new l.ZoomHistory,this._loaded=!1,this._availableImages=[],this._resetUpdates(),this.dispatcher.broadcast("setReferrer",l.getReferrer());var Le=this;this._rtlTextPluginCallback=Y.registerForPluginStateChange(function(Ne){Le.dispatcher.broadcast("syncRTLPluginState",{pluginStatus:Ne.pluginStatus,pluginURL:Ne.pluginURL},function(et,vt){if(l.triggerPluginCompletionEvent(et),vt&&vt.every(function(te){return te}))for(var xt in Le.sourceCaches)Le.sourceCaches[xt].reload()})}),this.on("data",function(Ne){if("source"===Ne.dataType&&"metadata"===Ne.sourceDataType){var qe=pe.sourceCaches[Ne.sourceId];if(qe){var et=qe.getSource();if(et&&et.vectorLayerIds)for(var vt in pe._layers){var xt=pe._layers[vt];xt.source===et.id&&pe._validateLayer(xt)}}}})}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.loadURL=function(q,ne){var pe=this;void 0===ne&&(ne={}),this.fire(new l.Event("dataloading",{dataType:"style"}));var Le="boolean"==typeof ne.validate?ne.validate:!l.isMapboxURL(q);q=this.map._requestManager.normalizeStyleURL(q,ne.accessToken);var Ne=this.map._requestManager.transformRequest(q,l.ResourceType.Style);this._request=l.getJSON(Ne,function(qe,et){pe._request=null,qe?pe.fire(new l.ErrorEvent(qe)):et&&pe._load(et,Le)})},Y.prototype.loadJSON=function(q,ne){var pe=this;void 0===ne&&(ne={}),this.fire(new l.Event("dataloading",{dataType:"style"})),this._request=l.browser.frame(function(){pe._request=null,pe._load(q,!1!==ne.validate)})},Y.prototype.loadEmpty=function(){this.fire(new l.Event("dataloading",{dataType:"style"})),this._load(or,!1)},Y.prototype._load=function(q,ne){if(!ne||!Kn(this,l.validateStyle(q))){for(var pe in this._loaded=!0,this.stylesheet=q,q.sources)this.addSource(pe,q.sources[pe],{validate:!1});q.sprite?this._loadSprite(q.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(q.glyphs);var Le=pt(this.stylesheet.layers);this._order=Le.map(function(vt){return vt.id}),this._layers={},this._serializedLayers={};for(var Ne=0,qe=Le;Ne<qe.length;Ne+=1){var et=qe[Ne];(et=l.createStyleLayer(et)).setEventedParent(this,{layer:{id:et.id}}),this._layers[et.id]=et,this._serializedLayers[et.id]=et.serialize()}this.dispatcher.broadcast("setLayers",this._serializeLayers(this._order)),this.light=new _(this.stylesheet.light),this.fire(new l.Event("data",{dataType:"style"})),this.fire(new l.Event("style.load"))}},Y.prototype._loadSprite=function(q){var ne=this;this._spriteRequest=function(pe,Le,Ne){var qe,et,vt,xt=l.browser.devicePixelRatio>1?"@2x":"",te=l.getJSON(Le.transformRequest(Le.normalizeSpriteURL(pe,xt,".json"),l.ResourceType.SpriteJSON),function(Oe,De){te=null,vt||(vt=Oe,qe=De,we())}),ue=l.getImage(Le.transformRequest(Le.normalizeSpriteURL(pe,xt,".png"),l.ResourceType.SpriteImage),function(Oe,De){ue=null,vt||(vt=Oe,et=De,we())});function we(){if(vt)Ne(vt);else if(qe&&et){var Oe=l.browser.getImageData(et),De={};for(var Ue in qe){var Ze=qe[Ue],Je=Ze.width,it=Ze.height,ut=Ze.x,St=Ze.y,Dt=Ze.sdf,Ft=Ze.pixelRatio,Yt=Ze.stretchX,ln=Ze.stretchY,Xt=Ze.content,en=new l.RGBAImage({width:Je,height:it});l.RGBAImage.copy(Oe,en,{x:ut,y:St},{x:0,y:0},{width:Je,height:it}),De[Ue]={data:en,pixelRatio:Ft,sdf:Dt,stretchX:Yt,stretchY:ln,content:Xt}}Ne(null,De)}}return{cancel:function(){te&&(te.cancel(),te=null),ue&&(ue.cancel(),ue=null)}}}(q,this.map._requestManager,function(pe,Le){if(ne._spriteRequest=null,pe)ne.fire(new l.ErrorEvent(pe));else if(Le)for(var Ne in Le)ne.imageManager.addImage(Ne,Le[Ne]);ne.imageManager.setLoaded(!0),ne._availableImages=ne.imageManager.listImages(),ne.dispatcher.broadcast("setImages",ne._availableImages),ne.fire(new l.Event("data",{dataType:"style"}))})},Y.prototype._validateLayer=function(q){var ne=this.sourceCaches[q.source];if(ne){var pe=q.sourceLayer;if(pe){var Le=ne.getSource();("geojson"===Le.type||Le.vectorLayerIds&&-1===Le.vectorLayerIds.indexOf(pe))&&this.fire(new l.ErrorEvent(new Error('Source layer "'+pe+'" does not exist on source "'+Le.id+'" as specified by style layer "'+q.id+'"')))}}},Y.prototype.loaded=function(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(var q in this.sourceCaches)if(!this.sourceCaches[q].loaded())return!1;return!!this.imageManager.isLoaded()},Y.prototype._serializeLayers=function(q){for(var ne=[],pe=0,Le=q;pe<Le.length;pe+=1){var qe=this._layers[Le[pe]];"custom"!==qe.type&&ne.push(qe.serialize())}return ne},Y.prototype.hasTransitions=function(){if(this.light&&this.light.hasTransition())return!0;for(var q in this.sourceCaches)if(this.sourceCaches[q].hasTransition())return!0;for(var ne in this._layers)if(this._layers[ne].hasTransition())return!0;return!1},Y.prototype._checkLoaded=function(){if(!this._loaded)throw new Error("Style is not done loading")},Y.prototype.update=function(q){if(this._loaded){var ne=this._changed;if(this._changed){var pe=Object.keys(this._updatedLayers),Le=Object.keys(this._removedLayers);for(var Ne in(pe.length||Le.length)&&this._updateWorkerLayers(pe,Le),this._updatedSources){var qe=this._updatedSources[Ne];"reload"===qe?this._reloadSource(Ne):"clear"===qe&&this._clearSource(Ne)}for(var et in this._updateTilesForChangedImages(),this._updatedPaintProps)this._layers[et].updateTransitions(q);this.light.updateTransitions(q),this._resetUpdates()}for(var vt in this.sourceCaches)this.sourceCaches[vt].used=!1;for(var xt=0,te=this._order;xt<te.length;xt+=1){var we=this._layers[te[xt]];we.recalculate(q,this._availableImages),!we.isHidden(q.zoom)&&we.source&&(this.sourceCaches[we.source].used=!0)}this.light.recalculate(q),this.z=q.zoom,ne&&this.fire(new l.Event("data",{dataType:"style"}))}},Y.prototype._updateTilesForChangedImages=function(){var q=Object.keys(this._changedImages);if(q.length){for(var ne in this.sourceCaches)this.sourceCaches[ne].reloadTilesForDependencies(["icons","patterns"],q);this._changedImages={}}},Y.prototype._updateWorkerLayers=function(q,ne){this.dispatcher.broadcast("updateLayers",{layers:this._serializeLayers(q),removedIds:ne})},Y.prototype._resetUpdates=function(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={}},Y.prototype.setState=function(q){var ne=this;if(this._checkLoaded(),Kn(this,l.validateStyle(q)))return!1;(q=l.clone$1(q)).layers=pt(q.layers);var pe=function pn(D,Y){if(!D)return[{command:gt.setStyle,args:[Y]}];var q=[];try{if(!l.deepEqual(D.version,Y.version))return[{command:gt.setStyle,args:[Y]}];l.deepEqual(D.center,Y.center)||q.push({command:gt.setCenter,args:[Y.center]}),l.deepEqual(D.zoom,Y.zoom)||q.push({command:gt.setZoom,args:[Y.zoom]}),l.deepEqual(D.bearing,Y.bearing)||q.push({command:gt.setBearing,args:[Y.bearing]}),l.deepEqual(D.pitch,Y.pitch)||q.push({command:gt.setPitch,args:[Y.pitch]}),l.deepEqual(D.sprite,Y.sprite)||q.push({command:gt.setSprite,args:[Y.sprite]}),l.deepEqual(D.glyphs,Y.glyphs)||q.push({command:gt.setGlyphs,args:[Y.glyphs]}),l.deepEqual(D.transition,Y.transition)||q.push({command:gt.setTransition,args:[Y.transition]}),l.deepEqual(D.light,Y.light)||q.push({command:gt.setLight,args:[Y.light]});var ne={},pe=[];!function(Ne,qe,et,vt){var xt;for(xt in qe=qe||{},Ne=Ne||{})Ne.hasOwnProperty(xt)&&(qe.hasOwnProperty(xt)||Ot(xt,et,vt));for(xt in qe)qe.hasOwnProperty(xt)&&(Ne.hasOwnProperty(xt)?l.deepEqual(Ne[xt],qe[xt])||("geojson"===Ne[xt].type&&"geojson"===qe[xt].type&&jt(Ne,qe,xt)?et.push({command:gt.setGeoJSONSourceData,args:[xt,qe[xt].data]}):Ht(xt,qe,et,vt)):Pt(xt,qe,et))}(D.sources,Y.sources,pe,ne);var Le=[];D.layers&&D.layers.forEach(function(Ne){ne[Ne.source]?q.push({command:gt.removeLayer,args:[Ne.id]}):Le.push(Ne)}),q=q.concat(pe),function(Ne,qe,et){qe=qe||[];var vt,xt,te,ue,we,Oe,De,Ue=(Ne=Ne||[]).map(Gt),Ze=qe.map(Gt),Je=Ne.reduce(un,{}),it=qe.reduce(un,{}),ut=Ue.slice(),St=Object.create(null);for(vt=0,xt=0;vt<Ue.length;vt++)it.hasOwnProperty(te=Ue[vt])?xt++:(et.push({command:gt.removeLayer,args:[te]}),ut.splice(ut.indexOf(te,xt),1));for(vt=0,xt=0;vt<Ze.length;vt++)ut[ut.length-1-vt]!==(te=Ze[Ze.length-1-vt])&&(Je.hasOwnProperty(te)?(et.push({command:gt.removeLayer,args:[te]}),ut.splice(ut.lastIndexOf(te,ut.length-xt),1)):xt++,et.push({command:gt.addLayer,args:[it[te],Oe=ut[ut.length-vt]]}),ut.splice(ut.length-vt,0,te),St[te]=!0);for(vt=0;vt<Ze.length;vt++)if(ue=Je[te=Ze[vt]],we=it[te],!St[te]&&!l.deepEqual(ue,we))if(l.deepEqual(ue.source,we.source)&&l.deepEqual(ue["source-layer"],we["source-layer"])&&l.deepEqual(ue.type,we.type)){for(De in Nt(ue.layout,we.layout,et,te,null,gt.setLayoutProperty),Nt(ue.paint,we.paint,et,te,null,gt.setPaintProperty),l.deepEqual(ue.filter,we.filter)||et.push({command:gt.setFilter,args:[te,we.filter]}),l.deepEqual(ue.minzoom,we.minzoom)&&l.deepEqual(ue.maxzoom,we.maxzoom)||et.push({command:gt.setLayerZoomRange,args:[te,we.minzoom,we.maxzoom]}),ue)ue.hasOwnProperty(De)&&"layout"!==De&&"paint"!==De&&"filter"!==De&&"metadata"!==De&&"minzoom"!==De&&"maxzoom"!==De&&(0===De.indexOf("paint.")?Nt(ue[De],we[De],et,te,De.slice(6),gt.setPaintProperty):l.deepEqual(ue[De],we[De])||et.push({command:gt.setLayerProperty,args:[te,De,we[De]]}));for(De in we)we.hasOwnProperty(De)&&!ue.hasOwnProperty(De)&&"layout"!==De&&"paint"!==De&&"filter"!==De&&"metadata"!==De&&"minzoom"!==De&&"maxzoom"!==De&&(0===De.indexOf("paint.")?Nt(ue[De],we[De],et,te,De.slice(6),gt.setPaintProperty):l.deepEqual(ue[De],we[De])||et.push({command:gt.setLayerProperty,args:[te,De,we[De]]}))}else et.push({command:gt.removeLayer,args:[te]}),Oe=ut[ut.lastIndexOf(te)+1],et.push({command:gt.addLayer,args:[we,Oe]})}(Le,Y.layers,q)}catch(Ne){console.warn("Unable to compute style diff:",Ne),q=[{command:gt.setStyle,args:[Y]}]}return q}(this.serialize(),q).filter(function(Ne){return!(Ne.command in er)});if(0===pe.length)return!1;var Le=pe.filter(function(Ne){return!(Ne.command in nr)});if(Le.length>0)throw new Error("Unimplemented: "+Le.map(function(Ne){return Ne.command}).join(", ")+".");return pe.forEach(function(Ne){"setTransition"!==Ne.command&&ne[Ne.command].apply(ne,Ne.args)}),this.stylesheet=q,!0},Y.prototype.addImage=function(q,ne){if(this.getImage(q))return this.fire(new l.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(q,ne),this._availableImages=this.imageManager.listImages(),this._changedImages[q]=!0,this._changed=!0,this.fire(new l.Event("data",{dataType:"style"}))},Y.prototype.updateImage=function(q,ne){this.imageManager.updateImage(q,ne)},Y.prototype.getImage=function(q){return this.imageManager.getImage(q)},Y.prototype.removeImage=function(q){if(!this.getImage(q))return this.fire(new l.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(q),this._availableImages=this.imageManager.listImages(),this._changedImages[q]=!0,this._changed=!0,this.fire(new l.Event("data",{dataType:"style"}))},Y.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},Y.prototype.addSource=function(q,ne,pe){var Le=this;if(void 0===pe&&(pe={}),this._checkLoaded(),void 0!==this.sourceCaches[q])throw new Error("There is already a source with this ID");if(!ne.type)throw new Error("The type property must be defined, but the only the following properties were given: "+Object.keys(ne).join(", ")+".");if(!(["vector","raster","geojson","video","image"].indexOf(ne.type)>=0&&this._validate(l.validateStyle.source,"sources."+q,ne,null,pe))){this.map&&this.map._collectResourceTiming&&(ne.collectResourceTiming=!0);var Ne=this.sourceCaches[q]=new rt(q,ne,this.dispatcher);Ne.style=this,Ne.setEventedParent(this,function(){return{isSourceLoaded:Le.loaded(),source:Ne.serialize(),sourceId:q}}),Ne.onAdd(this.map),this._changed=!0}},Y.prototype.removeSource=function(q){if(this._checkLoaded(),void 0===this.sourceCaches[q])throw new Error("There is no source with this ID");for(var ne in this._layers)if(this._layers[ne].source===q)return this.fire(new l.ErrorEvent(new Error('Source "'+q+'" cannot be removed while layer "'+ne+'" is using it.')));var pe=this.sourceCaches[q];delete this.sourceCaches[q],delete this._updatedSources[q],pe.fire(new l.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:q})),pe.setEventedParent(null),pe.clearTiles(),pe.onRemove&&pe.onRemove(this.map),this._changed=!0},Y.prototype.setGeoJSONSourceData=function(q,ne){this._checkLoaded(),this.sourceCaches[q].getSource().setData(ne),this._changed=!0},Y.prototype.getSource=function(q){return this.sourceCaches[q]&&this.sourceCaches[q].getSource()},Y.prototype.addLayer=function(q,ne,pe){void 0===pe&&(pe={}),this._checkLoaded();var Le=q.id;if(this.getLayer(Le))this.fire(new l.ErrorEvent(new Error('Layer with id "'+Le+'" already exists on this map')));else{var Ne;if("custom"===q.type){if(Kn(this,l.validateCustomStyleLayer(q)))return;Ne=l.createStyleLayer(q)}else{if("object"==typeof q.source&&(this.addSource(Le,q.source),q=l.clone$1(q),q=l.extend(q,{source:Le})),this._validate(l.validateStyle.layer,"layers."+Le,q,{arrayIndex:-1},pe))return;Ne=l.createStyleLayer(q),this._validateLayer(Ne),Ne.setEventedParent(this,{layer:{id:Le}}),this._serializedLayers[Ne.id]=Ne.serialize()}var qe=ne?this._order.indexOf(ne):this._order.length;if(ne&&-1===qe)this.fire(new l.ErrorEvent(new Error('Layer with id "'+ne+'" does not exist on this map.')));else{if(this._order.splice(qe,0,Le),this._layerOrderChanged=!0,this._layers[Le]=Ne,this._removedLayers[Le]&&Ne.source&&"custom"!==Ne.type){var et=this._removedLayers[Le];delete this._removedLayers[Le],et.type!==Ne.type?this._updatedSources[Ne.source]="clear":(this._updatedSources[Ne.source]="reload",this.sourceCaches[Ne.source].pause())}this._updateLayer(Ne),Ne.onAdd&&Ne.onAdd(this.map)}}},Y.prototype.moveLayer=function(q,ne){if(this._checkLoaded(),this._changed=!0,this._layers[q]){if(q!==ne){var pe=this._order.indexOf(q);this._order.splice(pe,1);var Le=ne?this._order.indexOf(ne):this._order.length;ne&&-1===Le?this.fire(new l.ErrorEvent(new Error('Layer with id "'+ne+'" does not exist on this map.'))):(this._order.splice(Le,0,q),this._layerOrderChanged=!0)}}else this.fire(new l.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be moved.")))},Y.prototype.removeLayer=function(q){this._checkLoaded();var ne=this._layers[q];if(ne){ne.setEventedParent(null);var pe=this._order.indexOf(q);this._order.splice(pe,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[q]=ne,delete this._layers[q],delete this._serializedLayers[q],delete this._updatedLayers[q],delete this._updatedPaintProps[q],ne.onRemove&&ne.onRemove(this.map)}else this.fire(new l.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be removed.")))},Y.prototype.getLayer=function(q){return this._layers[q]},Y.prototype.hasLayer=function(q){return q in this._layers},Y.prototype.setLayerZoomRange=function(q,ne,pe){this._checkLoaded();var Le=this.getLayer(q);Le?Le.minzoom===ne&&Le.maxzoom===pe||(null!=ne&&(Le.minzoom=ne),null!=pe&&(Le.maxzoom=pe),this._updateLayer(Le)):this.fire(new l.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot have zoom extent.")))},Y.prototype.setFilter=function(q,ne,pe){void 0===pe&&(pe={}),this._checkLoaded();var Le=this.getLayer(q);if(Le){if(!l.deepEqual(Le.filter,ne))return null==ne?(Le.filter=void 0,void this._updateLayer(Le)):void(this._validate(l.validateStyle.filter,"layers."+Le.id+".filter",ne,null,pe)||(Le.filter=l.clone$1(ne),this._updateLayer(Le)))}else this.fire(new l.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be filtered.")))},Y.prototype.getFilter=function(q){return l.clone$1(this.getLayer(q).filter)},Y.prototype.setLayoutProperty=function(q,ne,pe,Le){void 0===Le&&(Le={}),this._checkLoaded();var Ne=this.getLayer(q);Ne?l.deepEqual(Ne.getLayoutProperty(ne),pe)||(Ne.setLayoutProperty(ne,pe,Le),this._updateLayer(Ne)):this.fire(new l.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be styled.")))},Y.prototype.getLayoutProperty=function(q,ne){var pe=this.getLayer(q);if(pe)return pe.getLayoutProperty(ne);this.fire(new l.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style.")))},Y.prototype.setPaintProperty=function(q,ne,pe,Le){void 0===Le&&(Le={}),this._checkLoaded();var Ne=this.getLayer(q);Ne?l.deepEqual(Ne.getPaintProperty(ne),pe)||(Ne.setPaintProperty(ne,pe,Le)&&this._updateLayer(Ne),this._changed=!0,this._updatedPaintProps[q]=!0):this.fire(new l.ErrorEvent(new Error("The layer '"+q+"' does not exist in the map's style and cannot be styled.")))},Y.prototype.getPaintProperty=function(q,ne){return this.getLayer(q).getPaintProperty(ne)},Y.prototype.setFeatureState=function(q,ne){this._checkLoaded();var pe=q.source,Le=q.sourceLayer,Ne=this.sourceCaches[pe];if(void 0!==Ne){var qe=Ne.getSource().type;"geojson"===qe&&Le?this.fire(new l.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):"vector"!==qe||Le?(void 0===q.id&&this.fire(new l.ErrorEvent(new Error("The feature id parameter must be provided."))),Ne.setFeatureState(Le,q.id,ne)):this.fire(new l.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new l.ErrorEvent(new Error("The source '"+pe+"' does not exist in the map's style.")))},Y.prototype.removeFeatureState=function(q,ne){this._checkLoaded();var pe=q.source,Le=this.sourceCaches[pe];if(void 0!==Le){var Ne=Le.getSource().type,qe="vector"===Ne?q.sourceLayer:void 0;"vector"!==Ne||qe?ne&&"string"!=typeof q.id&&"number"!=typeof q.id?this.fire(new l.ErrorEvent(new Error("A feature id is requred to remove its specific state property."))):Le.removeFeatureState(qe,q.id,ne):this.fire(new l.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new l.ErrorEvent(new Error("The source '"+pe+"' does not exist in the map's style.")))},Y.prototype.getFeatureState=function(q){this._checkLoaded();var ne=q.source,pe=q.sourceLayer,Le=this.sourceCaches[ne];if(void 0!==Le){if("vector"!==Le.getSource().type||pe)return void 0===q.id&&this.fire(new l.ErrorEvent(new Error("The feature id parameter must be provided."))),Le.getFeatureState(pe,q.id);this.fire(new l.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")))}else this.fire(new l.ErrorEvent(new Error("The source '"+ne+"' does not exist in the map's style.")))},Y.prototype.getTransition=function(){return l.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},Y.prototype.serialize=function(){return l.filterObject({version:this.stylesheet.version,name:this.stylesheet.name,metadata:this.stylesheet.metadata,light:this.stylesheet.light,center:this.stylesheet.center,zoom:this.stylesheet.zoom,bearing:this.stylesheet.bearing,pitch:this.stylesheet.pitch,sprite:this.stylesheet.sprite,glyphs:this.stylesheet.glyphs,transition:this.stylesheet.transition,sources:l.mapObject(this.sourceCaches,function(q){return q.serialize()}),layers:this._serializeLayers(this._order)},function(q){return void 0!==q})},Y.prototype._updateLayer=function(q){this._updatedLayers[q.id]=!0,q.source&&!this._updatedSources[q.source]&&"raster"!==this.sourceCaches[q.source].getSource().type&&(this._updatedSources[q.source]="reload",this.sourceCaches[q.source].pause()),this._changed=!0},Y.prototype._flattenAndSortRenderedFeatures=function(q){for(var ne=this,pe=function(Xt){return"fill-extrusion"===ne._layers[Xt].type},Le={},Ne=[],qe=this._order.length-1;qe>=0;qe--){var et=this._order[qe];if(pe(et)){Le[et]=qe;for(var vt=0,xt=q;vt<xt.length;vt+=1){var te=xt[vt][et];if(te)for(var ue=0,we=te;ue<we.length;ue+=1)Ne.push(we[ue])}}}Ne.sort(function(Xt,en){return en.intersectionZ-Xt.intersectionZ});for(var De=[],Ue=this._order.length-1;Ue>=0;Ue--){var Ze=this._order[Ue];if(pe(Ze))for(var Je=Ne.length-1;Je>=0;Je--){var it=Ne[Je].feature;if(Le[it.layer.id]<Ue)break;De.push(it),Ne.pop()}else for(var ut=0,St=q;ut<St.length;ut+=1){var Dt=St[ut][Ze];if(Dt)for(var Ft=0,Yt=Dt;Ft<Yt.length;Ft+=1)De.push(Yt[Ft].feature)}}return De},Y.prototype.queryRenderedFeatures=function(q,ne,pe){ne&&ne.filter&&this._validate(l.validateStyle.filter,"queryRenderedFeatures.filter",ne.filter,null,ne);var Le={};if(ne&&ne.layers){if(!Array.isArray(ne.layers))return this.fire(new l.ErrorEvent(new Error("parameters.layers must be an Array."))),[];for(var Ne=0,qe=ne.layers;Ne<qe.length;Ne+=1){var et=qe[Ne],vt=this._layers[et];if(!vt)return this.fire(new l.ErrorEvent(new Error("The layer '"+et+"' does not exist in the map's style and cannot be queried for features."))),[];Le[vt.source]=!0}}var xt=[];for(var te in ne.availableImages=this._availableImages,this.sourceCaches)ne.layers&&!Le[te]||xt.push(V(this.sourceCaches[te],this._layers,this._serializedLayers,q,ne,pe));return this.placement&&xt.push(function(ue,we,Oe,De,Ue,Ze,Je){for(var it={},ut=Ze.queryRenderedSymbols(De),St=[],Dt=0,Ft=Object.keys(ut).map(Number);Dt<Ft.length;Dt+=1)St.push(Je[Ft[Dt]]);St.sort(W);for(var ln=function(){var gn=en[Xt],Qt=gn.featureIndex.lookupSymbolFeatures(ut[gn.bucketInstanceId],we,gn.bucketIndex,gn.sourceLayerIndex,Ue.filter,Ue.layers,Ue.availableImages,ue);for(var Pn in Qt){var Dn=it[Pn]=it[Pn]||[],Xn=Qt[Pn];Xn.sort(function(sr,dr){var kr=gn.featureSortOrder;if(kr){var Vr=kr.indexOf(sr.featureIndex);return kr.indexOf(dr.featureIndex)-Vr}return dr.featureIndex-sr.featureIndex});for(var Jn=0,gr=Xn;Jn<gr.length;Jn+=1)Dn.push(gr[Jn])}},Xt=0,en=St;Xt<en.length;Xt+=1)ln();var Jt=function(gn){it[gn].forEach(function(Qt){var Pn=Qt.feature,Xn=Oe[ue[gn].source].getFeatureState(Pn.layer["source-layer"],Pn.id);Pn.source=Pn.layer.source,Pn.layer["source-layer"]&&(Pn.sourceLayer=Pn.layer["source-layer"]),Pn.state=Xn})};for(var bn in it)Jt(bn);return it}(this._layers,this._serializedLayers,this.sourceCaches,q,ne,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures(xt)},Y.prototype.querySourceFeatures=function(q,ne){ne&&ne.filter&&this._validate(l.validateStyle.filter,"querySourceFeatures.filter",ne.filter,null,ne);var pe=this.sourceCaches[q];return pe?function(Le,Ne){for(var qe=Le.getRenderableIds().map(function(we){return Le.getTileByID(we)}),et=[],vt={},xt=0;xt<qe.length;xt++){var te=qe[xt],ue=te.tileID.canonical.key;vt[ue]||(vt[ue]=!0,te.querySourceFeatures(et,Ne))}return et}(pe,ne):[]},Y.prototype.addSourceType=function(q,ne,pe){return Y.getSourceType(q)?pe(new Error('A source type called "'+q+'" already exists.')):(Y.setSourceType(q,ne),ne.workerSourceURL?void this.dispatcher.broadcast("loadWorkerSource",{name:q,url:ne.workerSourceURL},pe):pe(null,null))},Y.prototype.getLight=function(){return this.light.getLight()},Y.prototype.setLight=function(q,ne){void 0===ne&&(ne={}),this._checkLoaded();var pe=this.light.getLight(),Le=!1;for(var Ne in q)if(!l.deepEqual(q[Ne],pe[Ne])){Le=!0;break}if(Le){var qe={now:l.browser.now(),transition:l.extend({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(q,ne),this.light.updateTransitions(qe)}},Y.prototype._validate=function(q,ne,pe,Le,Ne){return void 0===Ne&&(Ne={}),(!Ne||!1!==Ne.validate)&&Kn(this,q.call(l.validateStyle,l.extend({key:ne,style:this.serialize(),value:pe,styleSpec:l.styleSpec},Le)))},Y.prototype._remove=function(){for(var q in this._request&&(this._request.cancel(),this._request=null),this._spriteRequest&&(this._spriteRequest.cancel(),this._spriteRequest=null),l.evented.off("pluginStateChange",this._rtlTextPluginCallback),this._layers)this._layers[q].setEventedParent(null);for(var ne in this.sourceCaches)this.sourceCaches[ne].clearTiles(),this.sourceCaches[ne].setEventedParent(null);this.imageManager.setEventedParent(null),this.setEventedParent(null),this.dispatcher.remove()},Y.prototype._clearSource=function(q){this.sourceCaches[q].clearTiles()},Y.prototype._reloadSource=function(q){this.sourceCaches[q].resume(),this.sourceCaches[q].reload()},Y.prototype._updateSources=function(q){for(var ne in this.sourceCaches)this.sourceCaches[ne].update(q)},Y.prototype._generateCollisionBoxes=function(){for(var q in this.sourceCaches)this._reloadSource(q)},Y.prototype._updatePlacement=function(q,ne,pe,Le,Ne){void 0===Ne&&(Ne=!1);for(var qe=!1,et=!1,vt={},xt=0,te=this._order;xt<te.length;xt+=1){var we=this._layers[te[xt]];if("symbol"===we.type){if(!vt[we.source]){var Oe=this.sourceCaches[we.source];vt[we.source]=Oe.getRenderableIds(!0).map(function(ut){return Oe.getTileByID(ut)}).sort(function(ut,St){return St.tileID.overscaledZ-ut.tileID.overscaledZ||(ut.tileID.isLessThan(St.tileID)?-1:1)})}var De=this.crossTileSymbolIndex.addLayer(we,vt[we.source],q.center.lng);qe=qe||De}}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),((Ne=Ne||this._layerOrderChanged||0===pe)||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(l.browser.now(),q.zoom))&&(this.pauseablePlacement=new on(q,this._order,Ne,ne,pe,Le,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,vt),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(l.browser.now()),et=!0),qe&&this.pauseablePlacement.placement.setStale()),et||qe)for(var Ue=0,Ze=this._order;Ue<Ze.length;Ue+=1){var it=this._layers[Ze[Ue]];"symbol"===it.type&&this.placement.updateLayerOpacities(it,vt[it.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(l.browser.now())},Y.prototype._releaseSymbolFadeTiles=function(){for(var q in this.sourceCaches)this.sourceCaches[q].releaseSymbolFadeTiles()},Y.prototype.getImages=function(q,ne,pe){this.imageManager.getImages(ne.icons,pe),this._updateTilesForChangedImages();var Le=this.sourceCaches[ne.source];Le&&Le.setDependencies(ne.tileID.key,ne.type,ne.icons)},Y.prototype.getGlyphs=function(q,ne,pe){this.glyphManager.getGlyphs(ne.stacks,pe)},Y.prototype.getResource=function(q,ne,pe){return l.makeRequest(ne,pe)},Y}(l.Evented);ir.getSourceType=function(D){return J[D]},ir.setSourceType=function(D,Y){J[D]=Y},ir.registerForPluginStateChange=l.registerForPluginStateChange;var lr=l.createLayout([{name:"a_pos",type:"Int16",components:2}]),br=Qr("#ifdef GL_ES\nprecision mediump float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif","#ifdef GL_ES\nprecision highp float;\n#else\n#if !defined(lowp)\n#define lowp\n#endif\n#if !defined(mediump)\n#define mediump\n#endif\n#if !defined(highp)\n#define highp\n#endif\n#endif\nvec2 unpack_float(const float packedValue) {int packedIntValue=int(packedValue);int v0=packedIntValue/256;return vec2(v0,packedIntValue-v0*256);}vec2 unpack_opacity(const float packedOpacity) {int intOpacity=int(packedOpacity)/2;return vec2(float(intOpacity)/127.0,mod(packedOpacity,2.0));}vec4 decode_color(const vec2 encodedColor) {return vec4(unpack_float(encodedColor[0])/255.0,unpack_float(encodedColor[1])/255.0\n);}float unpack_mix_vec2(const vec2 packedValue,const float t) {return mix(packedValue[0],packedValue[1],t);}vec4 unpack_mix_color(const vec4 packedColors,const float t) {vec4 minColor=decode_color(vec2(packedColors[0],packedColors[1]));vec4 maxColor=decode_color(vec2(packedColors[2],packedColors[3]));return mix(minColor,maxColor,t);}vec2 get_pattern_pos(const vec2 pixel_coord_upper,const vec2 pixel_coord_lower,const vec2 pattern_size,const float tile_units_to_pixels,const vec2 pos) {vec2 offset=mod(mod(mod(pixel_coord_upper,pattern_size)*256.0,pattern_size)*256.0+pixel_coord_lower,pattern_size);return (tile_units_to_pixels*pos+offset)/pattern_size;}"),Ur=Qr("uniform vec4 u_color;uniform float u_opacity;void main() {gl_FragColor=u_color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Sr=Qr("uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_mix)*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),cr=Qr("varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=v_data.xy;float extrude_length=length(extrude);lowp float antialiasblur=v_data.z;float antialiased_blur=-max(blur,antialiasblur);float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));gl_FragColor=opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;attribute vec2 a_pos;varying vec3 v_data;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define mediump float radius\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define highp vec4 stroke_color\n#pragma mapbox: define mediump float stroke_width\n#pragma mapbox: define lowp float stroke_opacity\nvoid main(void) {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize mediump float radius\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize highp vec4 stroke_color\n#pragma mapbox: initialize mediump float stroke_width\n#pragma mapbox: initialize lowp float stroke_opacity\nvec2 extrude=vec2(mod(a_pos,2.0)*2.0-1.0);vec2 circle_center=floor(a_pos*0.5);if (u_pitch_with_map) {vec2 corner_position=circle_center;if (u_scale_with_map) {corner_position+=extrude*(radius+stroke_width)*u_extrude_scale;} else {vec4 projected_center=u_matrix*vec4(circle_center,0,1);corner_position+=extrude*(radius+stroke_width)*u_extrude_scale*(projected_center.w/u_camera_to_center_distance);}gl_Position=u_matrix*vec4(corner_position,0,1);} else {gl_Position=u_matrix*vec4(circle_center,0,1);if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}lowp float antialiasblur=1.0/u_device_pixel_ratio/(radius+stroke_width);v_data=vec3(extrude.x,extrude.y,antialiasblur);}"),Lr=Qr("void main() {gl_FragColor=vec4(1.0);}","attribute vec2 a_pos;uniform mat4 u_matrix;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);}"),Rr=Qr("uniform highp float u_intensity;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#define GAUSS_COEF 0.3989422804014327\nvoid main() {\n#pragma mapbox: initialize highp float weight\nfloat d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);gl_FragColor=vec4(val,1.0,1.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;attribute vec2 a_pos;varying vec2 v_extrude;\n#pragma mapbox: define highp float weight\n#pragma mapbox: define mediump float radius\nconst highp float ZERO=1.0/255.0/16.0;\n#define GAUSS_COEF 0.3989422804014327\nvoid main(void) {\n#pragma mapbox: initialize highp float weight\n#pragma mapbox: initialize mediump float radius\nvec2 unscaled_extrude=vec2(mod(a_pos,2.0)*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec4 pos=vec4(floor(a_pos*0.5)+extrude,0,1);gl_Position=u_matrix*pos;}"),li=Qr("uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;varying vec2 v_pos;void main() {float t=texture2D(u_image,v_pos).r;vec4 color=texture2D(u_color_ramp,vec2(t,0.5));gl_FragColor=color*u_opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(0.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;attribute vec2 a_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),Mi=Qr("varying float v_placed;varying float v_notUsed;void main() {float alpha=0.5;gl_FragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {gl_FragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {gl_FragColor*=.1;}}","attribute vec2 a_pos;attribute vec2 a_anchor_pos;attribute vec2 a_extrude;attribute vec2 a_placed;attribute vec2 a_shift;uniform mat4 u_matrix;uniform vec2 u_extrude_scale;uniform float u_camera_to_center_distance;varying float v_placed;varying float v_notUsed;void main() {vec4 projectedPoint=u_matrix*vec4(a_anchor_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);gl_Position=u_matrix*vec4(a_pos,0.0,1.0);gl_Position.xy+=(a_extrude+a_shift)*u_extrude_scale*gl_Position.w*collision_perspective_ratio;v_placed=a_placed.x;v_notUsed=a_placed.y;}"),Pi=Qr("varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;void main() {float alpha=0.5*min(v_perspective_ratio,1.0);float stroke_radius=0.9*max(v_perspective_ratio,1.0);float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);gl_FragColor=color*alpha*opacity_t;}","attribute vec2 a_pos;attribute float a_radius;attribute vec2 a_flags;uniform mat4 u_matrix;uniform mat4 u_inv_matrix;uniform vec2 u_viewport_size;uniform float u_camera_to_center_distance;varying float v_radius;varying vec2 v_extrude;varying float v_perspective_ratio;varying float v_collision;vec3 toTilePosition(vec2 screenPos) {vec4 rayStart=u_inv_matrix*vec4(screenPos,-1.0,1.0);vec4 rayEnd  =u_inv_matrix*vec4(screenPos, 1.0,1.0);rayStart.xyz/=rayStart.w;rayEnd.xyz  /=rayEnd.w;highp float t=(0.0-rayStart.z)/(rayEnd.z-rayStart.z);return mix(rayStart.xyz,rayEnd.xyz,t);}void main() {vec2 quadCenterPos=a_pos;float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;vec3 tilePos=toTilePosition(quadCenterPos);vec4 clipPos=u_matrix*vec4(tilePos,1.0);highp float camera_to_anchor_distance=clipPos.w;highp float collision_perspective_ratio=clamp(0.5+0.5*(u_camera_to_center_distance/camera_to_anchor_distance),0.0,4.0);float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_perspective_ratio=collision_perspective_ratio;v_collision=collision;gl_Position=vec4(clipPos.xyz/clipPos.w,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),Ea=Qr("uniform highp vec4 u_color;uniform sampler2D u_overlay;varying vec2 v_uv;void main() {vec4 overlay_color=texture2D(u_overlay,v_uv);gl_FragColor=mix(u_color,overlay_color,overlay_color.a);}","attribute vec2 a_pos;varying vec2 v_uv;uniform mat4 u_matrix;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=u_matrix*vec4(a_pos*u_overlay_scale,0,1);}"),Ui=Qr("#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_FragColor=color*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);}"),vi=Qr("varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=outline_color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","attribute vec2 a_pos;uniform mat4 u_matrix;uniform vec2 u_world;varying vec2 v_pos;\n#pragma mapbox: define highp vec4 outline_color\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 outline_color\n#pragma mapbox: initialize lowp float opacity\ngl_Position=u_matrix*vec4(a_pos,0,1);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),La=Qr("uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);gl_FragColor=mix(color1,color2,u_fade)*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec2 v_pos;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;gl_Position=u_matrix*vec4(a_pos,0,1);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world;}"),to=Qr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);gl_FragColor=mix(color1,color2,u_fade)*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;attribute vec2 a_pos;varying vec2 v_pos_a;varying vec2 v_pos_b;\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=u_matrix*vec4(a_pos,0,1);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}"),qo=Qr("varying vec4 v_color;void main() {gl_FragColor=v_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec4 v_color;\n#pragma mapbox: define highp float base\n#pragma mapbox: define highp float height\n#pragma mapbox: define highp vec4 color\nvoid main() {\n#pragma mapbox: initialize highp float base\n#pragma mapbox: initialize highp float height\n#pragma mapbox: initialize highp vec4 color\nvec3 normal=a_normal_ed.xyz;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);gl_Position=u_matrix*vec4(a_pos,t > 0.0 ? height : base,1);float colorvalue=color.r*0.2126+color.g*0.7152+color.b*0.0722;v_color=vec4(0.0,0.0,0.0,1.0);vec4 ambientlight=vec4(0.03,0.03,0.03,1.0);color+=ambientlight;float directional=clamp(dot(normal/16384.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((1.0-colorvalue+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_color.r+=clamp(color.r*directional*u_lightcolor.r,mix(0.0,0.3,1.0-u_lightcolor.r),1.0);v_color.g+=clamp(color.g*directional*u_lightcolor.g,mix(0.0,0.3,1.0-u_lightcolor.g),1.0);v_color.b+=clamp(color.b*directional*u_lightcolor.b,mix(0.0,0.3,1.0-u_lightcolor.b),1.0);v_color*=u_opacity;}"),Go=Qr("uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(pattern_tl_a/u_texsize,pattern_br_a/u_texsize,imagecoord);vec4 color1=texture2D(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(pattern_tl_b/u_texsize,pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture2D(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);gl_FragColor=mixedColor*v_lighting;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_height_factor;uniform vec3 u_scale;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp float u_lightintensity;attribute vec2 a_pos;attribute vec4 a_normal_ed;varying vec2 v_pos_a;varying vec2 v_pos_b;varying vec4 v_lighting;\n#pragma mapbox: define lowp float base\n#pragma mapbox: define lowp float height\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float base\n#pragma mapbox: initialize lowp float height\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec3 normal=a_normal_ed.xyz;float edgedistance=a_normal_ed.w;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;base=max(0.0,base);height=max(0.0,height);float t=mod(normal.x,2.0);float z=t > 0.0 ? height : base;gl_Position=u_matrix*vec4(a_pos,z,1);vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0\n? a_pos\n: vec2(edgedistance,z*u_height_factor);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,pos);v_lighting=vec4(0.0,0.0,0.0,1.0);float directional=clamp(dot(normal/16383.0,u_lightpos),0.0,1.0);directional=mix((1.0-u_lightintensity),max((0.5+u_lightintensity),1.0),directional);if (normal.y !=0.0) {directional*=((1.0-u_vertical_gradient)+(u_vertical_gradient*clamp((t+base)*pow(height/150.0,0.5),mix(0.7,0.98,1.0-u_lightintensity),1.0)));}v_lighting.rgb+=clamp(directional*u_lightcolor,mix(vec3(0.0),vec3(0.3),1.0-u_lightcolor),vec3(1.0));v_lighting*=u_opacity;}"),il=Qr("#ifdef GL_ES\nprecision highp float;\n#endif\nuniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform float u_maxzoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture2D(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack)/4.0;}void main() {vec2 epsilon=1.0/u_dimension;float a=getElevation(v_pos+vec2(-epsilon.x,-epsilon.y),0.0);float b=getElevation(v_pos+vec2(0,-epsilon.y),0.0);float c=getElevation(v_pos+vec2(epsilon.x,-epsilon.y),0.0);float d=getElevation(v_pos+vec2(-epsilon.x,0),0.0);float e=getElevation(v_pos,0.0);float f=getElevation(v_pos+vec2(epsilon.x,0),0.0);float g=getElevation(v_pos+vec2(-epsilon.x,epsilon.y),0.0);float h=getElevation(v_pos+vec2(0,epsilon.y),0.0);float i=getElevation(v_pos+vec2(epsilon.x,epsilon.y),0.0);float exaggeration=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/ pow(2.0,(u_zoom-u_maxzoom)*exaggeration+19.2562-u_zoom);gl_FragColor=clamp(vec4(deriv.x/2.0+0.5,deriv.y/2.0+0.5,1.0,1.0),0.0,1.0);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_dimension;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_texture_pos/8192.0)*scale+epsilon;}"),Us=Qr("uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_latrange;uniform vec2 u_light;uniform vec4 u_shadow;uniform vec4 u_highlight;uniform vec4 u_accent;\n#define PI 3.141592653589793\nvoid main() {vec4 pixel=texture2D(u_image,v_pos);vec2 deriv=((pixel.rg*2.0)-1.0);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));float slope=atan(1.25*length(deriv)/scaleFactor);float aspect=deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);float intensity=u_light.x;float azimuth=u_light.y+PI;float base=1.875-intensity*1.75;float maxValue=0.5*PI;float scaledSlope=intensity !=0.5 ? ((pow(base,slope)-1.0)/(pow(base,maxValue)-1.0))*maxValue : slope;float accent=cos(scaledSlope);vec4 accent_color=(1.0-accent)*u_accent*clamp(intensity*2.0,0.0,1.0);float shade=abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);vec4 shade_color=mix(u_shadow,u_highlight,shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);gl_FragColor=accent_color*(1.0-shade_color.a)+shade_color;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos=a_texture_pos/8192.0;}"),Zo=Qr("uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_linesofar;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),Ta=Qr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);vec4 color=texture2D(u_image,vec2(v_lineprogress,0.5));gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define MAX_LINE_DISTANCE 32767.0\n#define scale 0.015873016\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp float v_lineprogress;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;v_lineprogress=(floor(a_data.z/4.0)+a_data.w*64.0)*2.0/MAX_LINE_DISTANCE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_width2=vec2(outset,inset);}"),Vs=Qr("uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\nvec2 pattern_tl_a=pattern_from.xy;vec2 pattern_br_a=pattern_from.zw;vec2 pattern_tl_b=pattern_to.xy;vec2 pattern_br_b=pattern_to.zw;float tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;vec2 pattern_size_a=vec2(display_size_a.x*fromScale/tileZoomRatio,display_size_a.y);vec2 pattern_size_b=vec2(display_size_b.x*toScale/tileZoomRatio,display_size_b.y);float aspect_a=display_size_a.y/v_width;float aspect_b=display_size_b.y/v_width;float dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float x_a=mod(v_linesofar/pattern_size_a.x*aspect_a,1.0);float x_b=mod(v_linesofar/pattern_size_b.x*aspect_b,1.0);float y=0.5*v_normal.y+0.5;vec2 texel_size=1.0/u_texsize;vec2 pos_a=mix(pattern_tl_a*texel_size-texel_size,pattern_br_a*texel_size+texel_size,vec2(x_a,y));vec2 pos_b=mix(pattern_tl_b*texel_size-texel_size,pattern_br_b*texel_size+texel_size,vec2(x_b,y));vec4 color=mix(texture2D(u_image,pos_a),texture2D(u_image,pos_b),u_fade);gl_FragColor=color*alpha*opacity;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;varying vec2 v_normal;varying vec2 v_width2;varying float v_linesofar;varying float v_gamma_scale;varying float v_width;\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\n#pragma mapbox: define lowp vec4 pattern_from\n#pragma mapbox: define lowp vec4 pattern_to\n#pragma mapbox: define lowp float pixel_ratio_from\n#pragma mapbox: define lowp float pixel_ratio_to\nvoid main() {\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\n#pragma mapbox: initialize mediump vec4 pattern_from\n#pragma mapbox: initialize mediump vec4 pattern_to\n#pragma mapbox: initialize lowp float pixel_ratio_from\n#pragma mapbox: initialize lowp float pixel_ratio_to\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}"),zi=Qr("uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform float u_sdfgamma;uniform float u_mix;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat dist=length(v_normal)*v_width2.s;float blur2=(blur+1.0/u_device_pixel_ratio)*v_gamma_scale;float alpha=clamp(min(dist-(v_width2.t-blur2),v_width2.s-dist)/blur2,0.0,1.0);float sdfdist_a=texture2D(u_image,v_tex_a).a;float sdfdist_b=texture2D(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);alpha*=smoothstep(0.5-u_sdfgamma/floorwidth,0.5+u_sdfgamma/floorwidth,sdfdist);gl_FragColor=color*(alpha*opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","\n#define scale 0.015873016\n#define LINE_DISTANCE_SCALE 2.0\nattribute vec2 a_pos_normal;attribute vec4 a_data;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_patternscale_a;uniform float u_tex_y_a;uniform vec2 u_patternscale_b;uniform float u_tex_y_b;uniform vec2 u_units_to_pixels;varying vec2 v_normal;varying vec2 v_width2;varying vec2 v_tex_a;varying vec2 v_tex_b;varying float v_gamma_scale;\n#pragma mapbox: define highp vec4 color\n#pragma mapbox: define lowp float blur\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define mediump float gapwidth\n#pragma mapbox: define lowp float offset\n#pragma mapbox: define mediump float width\n#pragma mapbox: define lowp float floorwidth\nvoid main() {\n#pragma mapbox: initialize highp vec4 color\n#pragma mapbox: initialize lowp float blur\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize mediump float gapwidth\n#pragma mapbox: initialize lowp float offset\n#pragma mapbox: initialize mediump float width\n#pragma mapbox: initialize lowp float floorwidth\nfloat ANTIALIASING=1.0/u_device_pixel_ratio/2.0;vec2 a_extrude=a_data.xy-128.0;float a_direction=mod(a_data.z,4.0)-1.0;float a_linesofar=(floor(a_data.z/4.0)+a_data.w*64.0)*LINE_DISTANCE_SCALE;vec2 pos=floor(a_pos_normal*0.5);mediump vec2 normal=a_pos_normal-2.0*pos;normal.y=normal.y*2.0-1.0;v_normal=normal;gapwidth=gapwidth/2.0;float halfwidth=width/2.0;offset=-1.0*offset;float inset=gapwidth+(gapwidth > 0.0 ? ANTIALIASING : 0.0);float outset=gapwidth+halfwidth*(gapwidth > 0.0 ? 2.0 : 1.0)+(halfwidth==0.0 ? 0.0 : ANTIALIASING);mediump vec2 dist=outset*a_extrude*scale;mediump float u=0.5*a_direction;mediump float t=1.0-abs(u);mediump vec2 offset2=offset*a_extrude*scale*normal.y*mat2(t,-u,u,t);vec4 projected_extrude=u_matrix*vec4(dist/u_ratio,0.0,0.0);gl_Position=u_matrix*vec4(pos+offset2/u_ratio,0.0,1.0)+projected_extrude;float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length(projected_extrude.xy/gl_Position.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective;v_tex_a=vec2(a_linesofar*u_patternscale_a.x/floorwidth,normal.y*u_patternscale_a.y+u_tex_y_a);v_tex_b=vec2(a_linesofar*u_patternscale_b.x/floorwidth,normal.y*u_patternscale_b.y+u_tex_y_b);v_width2=vec2(outset,inset);}"),ss=Qr("uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;varying vec2 v_pos0;varying vec2 v_pos1;uniform float u_brightness_low;uniform float u_brightness_high;uniform float u_saturation_factor;uniform float u_contrast_factor;uniform vec3 u_spin_weights;void main() {vec4 color0=texture2D(u_image0,v_pos0);vec4 color1=texture2D(u_image1,v_pos1);if (color0.a > 0.0) {color0.rgb=color0.rgb/color0.a;}if (color1.a > 0.0) {color1.rgb=color1.rgb/color1.a;}vec4 color=mix(color0,color1,u_fade_t);color.a*=u_opacity;vec3 rgb=color.rgb;rgb=vec3(dot(rgb,u_spin_weights.xyz),dot(rgb,u_spin_weights.zxy),dot(rgb,u_spin_weights.yzx));float average=(color.r+color.g+color.b)/3.0;rgb+=(average-rgb)*u_saturation_factor;rgb=(rgb-0.5)*u_contrast_factor+0.5;vec3 u_high_vec=vec3(u_brightness_low,u_brightness_low,u_brightness_low);vec3 u_low_vec=vec3(u_brightness_high,u_brightness_high,u_brightness_high);gl_FragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","uniform mat4 u_matrix;uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;attribute vec2 a_pos;attribute vec2 a_texture_pos;varying vec2 v_pos0;varying vec2 v_pos1;void main() {gl_Position=u_matrix*vec4(a_pos,0,1);v_pos0=(((a_texture_pos/8192.0)-0.5)/u_buffer_scale )+0.5;v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}"),ma=Qr("uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nlowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform highp float u_camera_to_center_distance;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform float u_fade_change;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;varying vec2 v_tex;varying float v_fade_opacity;\n#pragma mapbox: define lowp float opacity\nvoid main() {\n#pragma mapbox: initialize lowp float opacity\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;vec2 a_minFontScale=a_pixeloffset.zw/256.0;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0),0.0,1.0);v_tex=a_tex/u_texsize;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;v_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));}"),ka=Qr("#define SDF_PX 8.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat EDGE_GAMMA=0.105/u_device_pixel_ratio;vec2 tex=v_data0.xy;float gamma_scale=v_data1.x;float size=v_data1.y;float fade_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec4 a_pixeloffset;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;varying vec2 v_data0;varying vec3 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);vec2 a_pxoffset=a_pixeloffset.xy;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=u_is_text ? size/24.0 : size;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale+a_pxoffset),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,interpolated_fade_opacity);}"),vo=Qr("#define SDF_PX 8.0\n#define SDF 1.0\n#define ICON 0.0\nuniform bool u_is_halo;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nfloat fade_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;lowp float alpha=opacity*fade_opacity;gl_FragColor=texture2D(u_texture_icon,tex_icon)*alpha;\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\nreturn;}vec2 tex=v_data0.xy;float EDGE_GAMMA=0.105/u_device_pixel_ratio;float gamma_scale=v_data1.x;float size=v_data1.y;float fontScale=size/24.0;lowp vec4 color=fill_color;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;if (u_is_halo) {color=halo_color;gamma=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);buff=(6.0-halo_width/fontScale)/SDF_PX;}lowp float dist=texture2D(u_texture,tex).a;highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);gl_FragColor=color*(alpha*opacity*fade_opacity);\n#ifdef OVERDRAW_INSPECTOR\ngl_FragColor=vec4(1.0);\n#endif\n}","const float PI=3.141592653589793;attribute vec4 a_pos_offset;attribute vec4 a_data;attribute vec3 a_projected_pos;attribute float a_fade_opacity;uniform bool u_is_size_zoom_constant;uniform bool u_is_size_feature_constant;uniform highp float u_size_t;uniform highp float u_size;uniform mat4 u_matrix;uniform mat4 u_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform highp float u_pitch;uniform bool u_rotate_symbol;uniform highp float u_aspect_ratio;uniform highp float u_camera_to_center_distance;uniform float u_fade_change;uniform vec2 u_texsize;uniform vec2 u_texsize_icon;varying vec4 v_data0;varying vec4 v_data1;\n#pragma mapbox: define highp vec4 fill_color\n#pragma mapbox: define highp vec4 halo_color\n#pragma mapbox: define lowp float opacity\n#pragma mapbox: define lowp float halo_width\n#pragma mapbox: define lowp float halo_blur\nvoid main() {\n#pragma mapbox: initialize highp vec4 fill_color\n#pragma mapbox: initialize highp vec4 halo_color\n#pragma mapbox: initialize lowp float opacity\n#pragma mapbox: initialize lowp float halo_width\n#pragma mapbox: initialize lowp float halo_blur\nvec2 a_pos=a_pos_offset.xy;vec2 a_offset=a_pos_offset.zw;vec2 a_tex=a_data.xy;vec2 a_size=a_data.zw;float a_size_min=floor(a_size[0]*0.5);float is_sdf=a_size[0]-2.0*a_size_min;highp float segment_angle=-a_projected_pos[2];float size;if (!u_is_size_zoom_constant && !u_is_size_feature_constant) {size=mix(a_size_min,a_size[1],u_size_t)/128.0;} else if (u_is_size_zoom_constant && !u_is_size_feature_constant) {size=a_size_min/128.0;} else {size=u_size;}vec4 projectedPoint=u_matrix*vec4(a_pos,0,1);highp float camera_to_anchor_distance=projectedPoint.w;highp float distance_ratio=u_pitch_with_map ?\ncamera_to_anchor_distance/u_camera_to_center_distance :\nu_camera_to_center_distance/camera_to_anchor_distance;highp float perspective_ratio=clamp(0.5+0.5*distance_ratio,0.0,4.0);size*=perspective_ratio;float fontScale=size/24.0;highp float symbol_rotation=0.0;if (u_rotate_symbol) {vec4 offsetProjectedPoint=u_matrix*vec4(a_pos+vec2(1,0),0,1);vec2 a=projectedPoint.xy/projectedPoint.w;vec2 b=offsetProjectedPoint.xy/offsetProjectedPoint.w;symbol_rotation=atan((b.y-a.y)/u_aspect_ratio,b.x-a.x);}highp float angle_sin=sin(segment_angle+symbol_rotation);highp float angle_cos=cos(segment_angle+symbol_rotation);mat2 rotation_matrix=mat2(angle_cos,-1.0*angle_sin,angle_sin,angle_cos);vec4 projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy,0.0,1.0);gl_Position=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale),0.0,1.0);float gamma_scale=gl_Position.w;vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(1.0,fade_opacity[0]+fade_change));v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,interpolated_fade_opacity,is_sdf);}");function Qr(D,Y){var q=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,ne={};return{fragmentSource:D=D.replace(q,function(pe,Le,Ne,qe,et){return ne[et]=!0,"define"===Le?"\n#ifndef HAS_UNIFORM_u_"+et+"\nvarying "+Ne+" "+qe+" "+et+";\n#else\nuniform "+Ne+" "+qe+" u_"+et+";\n#endif\n":"\n#ifdef HAS_UNIFORM_u_"+et+"\n    "+Ne+" "+qe+" "+et+" = u_"+et+";\n#endif\n"}),vertexSource:Y=Y.replace(q,function(pe,Le,Ne,qe,et){var vt="float"===qe?"vec2":"vec4",xt=et.match(/color/)?"color":vt;return ne[et]?"define"===Le?"\n#ifndef HAS_UNIFORM_u_"+et+"\nuniform lowp float u_"+et+"_t;\nattribute "+Ne+" "+vt+" a_"+et+";\nvarying "+Ne+" "+qe+" "+et+";\n#else\nuniform "+Ne+" "+qe+" u_"+et+";\n#endif\n":"vec4"===xt?"\n#ifndef HAS_UNIFORM_u_"+et+"\n    "+et+" = a_"+et+";\n#else\n    "+Ne+" "+qe+" "+et+" = u_"+et+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+et+"\n    "+et+" = unpack_mix_"+xt+"(a_"+et+", u_"+et+"_t);\n#else\n    "+Ne+" "+qe+" "+et+" = u_"+et+";\n#endif\n":"define"===Le?"\n#ifndef HAS_UNIFORM_u_"+et+"\nuniform lowp float u_"+et+"_t;\nattribute "+Ne+" "+vt+" a_"+et+";\n#else\nuniform "+Ne+" "+qe+" u_"+et+";\n#endif\n":"vec4"===xt?"\n#ifndef HAS_UNIFORM_u_"+et+"\n    "+Ne+" "+qe+" "+et+" = a_"+et+";\n#else\n    "+Ne+" "+qe+" "+et+" = u_"+et+";\n#endif\n":"\n#ifndef HAS_UNIFORM_u_"+et+"\n    "+Ne+" "+qe+" "+et+" = unpack_mix_"+xt+"(a_"+et+", u_"+et+"_t);\n#else\n    "+Ne+" "+qe+" "+et+" = u_"+et+";\n#endif\n"})}}var mo=Object.freeze({__proto__:null,prelude:br,background:Ur,backgroundPattern:Sr,circle:cr,clippingMask:Lr,heatmap:Rr,heatmapTexture:li,collisionBox:Mi,collisionCircle:Pi,debug:Ea,fill:Ui,fillOutline:vi,fillOutlinePattern:La,fillPattern:to,fillExtrusion:qo,fillExtrusionPattern:Go,hillshadePrepare:il,hillshade:Us,line:Zo,lineGradient:Ta,linePattern:Vs,lineSDF:zi,raster:ss,symbolIcon:ma,symbolSDF:ka,symbolTextAndIcon:vo}),Ca=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};Ca.prototype.bind=function(D,Y,q,ne,pe,Le,Ne,qe){this.context=D;for(var et=this.boundPaintVertexBuffers.length!==ne.length,vt=0;!et&&vt<ne.length;vt++)this.boundPaintVertexBuffers[vt]!==ne[vt]&&(et=!0);D.extVertexArrayObject&&this.vao&&this.boundProgram===Y&&this.boundLayoutVertexBuffer===q&&!et&&this.boundIndexBuffer===pe&&this.boundVertexOffset===Le&&this.boundDynamicVertexBuffer===Ne&&this.boundDynamicVertexBuffer2===qe?(D.bindVertexArrayOES.set(this.vao),Ne&&Ne.bind(),pe&&pe.dynamicDraw&&pe.bind(),qe&&qe.bind()):this.freshBind(Y,q,ne,pe,Le,Ne,qe)},Ca.prototype.freshBind=function(D,Y,q,ne,pe,Le,Ne){var qe,et=D.numAttributes,vt=this.context,xt=vt.gl;if(vt.extVertexArrayObject)this.vao&&this.destroy(),this.vao=vt.extVertexArrayObject.createVertexArrayOES(),vt.bindVertexArrayOES.set(this.vao),qe=0,this.boundProgram=D,this.boundLayoutVertexBuffer=Y,this.boundPaintVertexBuffers=q,this.boundIndexBuffer=ne,this.boundVertexOffset=pe,this.boundDynamicVertexBuffer=Le,this.boundDynamicVertexBuffer2=Ne;else{qe=vt.currentNumAttributes||0;for(var te=et;te<qe;te++)xt.disableVertexAttribArray(te)}Y.enableAttributes(xt,D);for(var ue=0,we=q;ue<we.length;ue+=1)we[ue].enableAttributes(xt,D);Le&&Le.enableAttributes(xt,D),Ne&&Ne.enableAttributes(xt,D),Y.bind(),Y.setVertexAttribPointers(xt,D,pe);for(var Oe=0,De=q;Oe<De.length;Oe+=1){var Ue=De[Oe];Ue.bind(),Ue.setVertexAttribPointers(xt,D,pe)}Le&&(Le.bind(),Le.setVertexAttribPointers(xt,D,pe)),ne&&ne.bind(),Ne&&(Ne.bind(),Ne.setVertexAttribPointers(xt,D,pe)),vt.currentNumAttributes=et},Ca.prototype.destroy=function(){this.vao&&(this.context.extVertexArrayObject.deleteVertexArrayOES(this.vao),this.vao=null)};var Ua=function(D,Y,q,ne,pe){var Le=D.gl;this.program=Le.createProgram();var Ne=q?q.defines():[];pe&&Ne.push("#define OVERDRAW_INSPECTOR;");var qe=Ne.concat(br.fragmentSource,Y.fragmentSource).join("\n"),et=Ne.concat(br.vertexSource,Y.vertexSource).join("\n"),vt=Le.createShader(Le.FRAGMENT_SHADER);if(Le.isContextLost())this.failedToCreate=!0;else{Le.shaderSource(vt,qe),Le.compileShader(vt),Le.attachShader(this.program,vt);var xt=Le.createShader(Le.VERTEX_SHADER);if(Le.isContextLost())this.failedToCreate=!0;else{Le.shaderSource(xt,et),Le.compileShader(xt),Le.attachShader(this.program,xt);for(var te=q?q.layoutAttributes:[],ue=0;ue<te.length;ue++)Le.bindAttribLocation(this.program,ue,te[ue].name);Le.linkProgram(this.program),Le.deleteShader(xt),Le.deleteShader(vt),this.numAttributes=Le.getProgramParameter(this.program,Le.ACTIVE_ATTRIBUTES),this.attributes={};for(var we={},Oe=0;Oe<this.numAttributes;Oe++){var De=Le.getActiveAttrib(this.program,Oe);De&&(this.attributes[De.name]=Le.getAttribLocation(this.program,De.name))}for(var Ue=Le.getProgramParameter(this.program,Le.ACTIVE_UNIFORMS),Ze=0;Ze<Ue;Ze++){var Je=Le.getActiveUniform(this.program,Ze);Je&&(we[Je.name]=Le.getUniformLocation(this.program,Je.name))}this.fixedUniforms=ne(D,we),this.binderUniforms=q?q.getUniforms(D,we):[]}}};function Ya(D,Y,q){var ne=1/qn(q,1,Y.transform.tileZoom),pe=Math.pow(2,q.tileID.overscaledZ),Le=q.tileSize*Math.pow(2,Y.transform.tileZoom)/pe,Ne=Le*(q.tileID.canonical.x+q.tileID.wrap*pe),qe=Le*q.tileID.canonical.y;return{u_image:0,u_texsize:q.imageAtlasTexture.size,u_scale:[ne,D.fromScale,D.toScale],u_fade:D.t,u_pixel_coord_upper:[Ne>>16,qe>>16],u_pixel_coord_lower:[65535&Ne,65535&qe]}}Ua.prototype.draw=function(D,Y,q,ne,pe,Le,Ne,qe,et,vt,xt,te,ue,we,Oe,De){var Ue,Ze=D.gl;if(!this.failedToCreate){for(var Je in D.program.set(this.program),D.setDepthMode(q),D.setStencilMode(ne),D.setColorMode(pe),D.setCullFace(Le),this.fixedUniforms)this.fixedUniforms[Je].set(Ne[Je]);we&&we.setUniforms(D,this.binderUniforms,te,{zoom:ue});for(var it=(Ue={},Ue[Ze.LINES]=2,Ue[Ze.TRIANGLES]=3,Ue[Ze.LINE_STRIP]=1,Ue)[Y],ut=0,St=xt.get();ut<St.length;ut+=1){var Dt=St[ut],Ft=Dt.vaos||(Dt.vaos={});(Ft[qe]||(Ft[qe]=new Ca)).bind(D,this,et,we?we.getPaintVertexBuffers():[],vt,Dt.vertexOffset,Oe,De),Ze.drawElements(Y,Dt.primitiveLength*it,Ze.UNSIGNED_SHORT,Dt.primitiveOffset*it*2)}}};var ls=function(D,Y,q,ne){var pe=Y.style.light,Le=pe.properties.get("position"),Ne=[Le.x,Le.y,Le.z],qe=l.create$1();"viewport"===pe.properties.get("anchor")&&l.fromRotation(qe,-Y.transform.angle),l.transformMat3(Ne,Ne,qe);var et=pe.properties.get("color");return{u_matrix:D,u_lightpos:Ne,u_lightintensity:pe.properties.get("intensity"),u_lightcolor:[et.r,et.g,et.b],u_vertical_gradient:+q,u_opacity:ne}},al=function(D,Y,q,ne,pe,Le,Ne){return l.extend(ls(D,Y,q,ne),Ya(Le,Y,Ne),{u_height_factor:-Math.pow(2,pe.overscaledZ)/Ne.tileSize/8})},no=function(D){return{u_matrix:D}},ol=function(D,Y,q,ne){return l.extend(no(D),Ya(q,Y,ne))},sl=function(D,Y){return{u_matrix:D,u_world:Y}},ml=function(D,Y,q,ne,pe){return l.extend(ol(D,Y,q,ne),{u_world:pe})},Hs=function(D,Y,q,ne){var pe,Le,Ne=D.transform;if("map"===ne.paint.get("circle-pitch-alignment")){var qe=qn(q,1,Ne.zoom);pe=!0,Le=[qe,qe]}else pe=!1,Le=Ne.pixelsToGLUnits;return{u_camera_to_center_distance:Ne.cameraToCenterDistance,u_scale_with_map:+("map"===ne.paint.get("circle-pitch-scale")),u_matrix:D.translatePosMatrix(Y.posMatrix,q,ne.paint.get("circle-translate"),ne.paint.get("circle-translate-anchor")),u_pitch_with_map:+pe,u_device_pixel_ratio:l.browser.devicePixelRatio,u_extrude_scale:Le}},ll=function(D,Y,q){var ne=qn(q,1,Y.zoom),pe=Math.pow(2,Y.zoom-q.tileID.overscaledZ),Le=q.tileID.overscaleFactor();return{u_matrix:D,u_camera_to_center_distance:Y.cameraToCenterDistance,u_pixels_to_tile_units:ne,u_extrude_scale:[Y.pixelsToGLUnits[0]/(ne*pe),Y.pixelsToGLUnits[1]/(ne*pe)],u_overscale_factor:Le}},qs=function(D,Y,q){return{u_matrix:D,u_inv_matrix:Y,u_camera_to_center_distance:q.cameraToCenterDistance,u_viewport_size:[q.width,q.height]}},ro=function(D,Y,q){return void 0===q&&(q=1),{u_matrix:D,u_color:Y,u_overlay:0,u_overlay_scale:q}},io=function(D){return{u_matrix:D}},Wo=function(D,Y,q,ne){return{u_matrix:D,u_extrude_scale:qn(Y,1,q),u_intensity:ne}},ao=function(D,Y,q){var ne=D.transform;return{u_matrix:yo(D,Y,q),u_ratio:1/qn(Y,1,ne.zoom),u_device_pixel_ratio:l.browser.devicePixelRatio,u_units_to_pixels:[1/ne.pixelsToGLUnits[0],1/ne.pixelsToGLUnits[1]]}},Gs=function(D,Y,q){return l.extend(ao(D,Y,q),{u_image:0})},Zs=function(D,Y,q,ne){var pe=D.transform,Le=Ms(Y,pe);return{u_matrix:yo(D,Y,q),u_texsize:Y.imageAtlasTexture.size,u_ratio:1/qn(Y,1,pe.zoom),u_device_pixel_ratio:l.browser.devicePixelRatio,u_image:0,u_scale:[Le,ne.fromScale,ne.toScale],u_fade:ne.t,u_units_to_pixels:[1/pe.pixelsToGLUnits[0],1/pe.pixelsToGLUnits[1]]}},Co=function(D,Y,q,ne,pe){var Ne=D.lineAtlas,qe=Ms(Y,D.transform),et="round"===q.layout.get("line-cap"),vt=Ne.getDash(ne.from,et),xt=Ne.getDash(ne.to,et),te=vt.width*pe.fromScale,ue=xt.width*pe.toScale;return l.extend(ao(D,Y,q),{u_patternscale_a:[qe/te,-vt.height/2],u_patternscale_b:[qe/ue,-xt.height/2],u_sdfgamma:Ne.width/(256*Math.min(te,ue)*l.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:vt.y,u_tex_y_b:xt.y,u_mix:pe.t})};function Ms(D,Y){return 1/qn(D,1,Y.tileZoom)}function yo(D,Y,q){return D.translatePosMatrix(Y.tileID.posMatrix,Y,q.paint.get("line-translate"),q.paint.get("line-translate-anchor"))}var Yo=function(D,Y,q,ne,pe){return{u_matrix:D,u_tl_parent:Y,u_scale_parent:q,u_buffer_scale:1,u_fade_t:ne.mix,u_opacity:ne.opacity*pe.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:pe.paint.get("raster-brightness-min"),u_brightness_high:pe.paint.get("raster-brightness-max"),u_saturation_factor:(Ne=pe.paint.get("raster-saturation"),Ne>0?1-1/(1.001-Ne):-Ne),u_contrast_factor:(Le=pe.paint.get("raster-contrast"),Le>0?1/(1-Le):1+Le),u_spin_weights:Po(pe.paint.get("raster-hue-rotate"))};var Le,Ne};function Po(D){D*=Math.PI/180;var Y=Math.sin(D),q=Math.cos(D);return[(2*q+1)/3,(-Math.sqrt(3)*Y-q+1)/3,(Math.sqrt(3)*Y-q+1)/3]}var oo,ei=function(D,Y,q,ne,pe,Le,Ne,qe,et,vt){var xt=pe.transform;return{u_is_size_zoom_constant:+("constant"===D||"source"===D),u_is_size_feature_constant:+("constant"===D||"camera"===D),u_size_t:Y?Y.uSizeT:0,u_size:Y?Y.uSize:0,u_camera_to_center_distance:xt.cameraToCenterDistance,u_pitch:xt.pitch/360*2*Math.PI,u_rotate_symbol:+q,u_aspect_ratio:xt.width/xt.height,u_fade_change:pe.options.fadeDuration?pe.symbolFadeChange:1,u_matrix:Le,u_label_plane_matrix:Ne,u_coord_matrix:qe,u_is_text:+et,u_pitch_with_map:+ne,u_texsize:vt,u_texture:0}},xo=function(D,Y,q,ne,pe,Le,Ne,qe,et,vt,xt){var te=pe.transform;return l.extend(ei(D,Y,q,ne,pe,Le,Ne,qe,et,vt),{u_gamma_scale:ne?Math.cos(te._pitch)*te.cameraToCenterDistance:1,u_device_pixel_ratio:l.browser.devicePixelRatio,u_is_halo:+xt})},yl=function(D,Y,q,ne,pe,Le,Ne,qe,et,vt){return l.extend(xo(D,Y,q,ne,pe,Le,Ne,qe,!0,et,!0),{u_texsize_icon:vt,u_texture_icon:1})},Ss=function(D,Y,q){return{u_matrix:D,u_opacity:Y,u_color:q}},us=function(D,Y,q,ne,pe,Le){return l.extend((qe=Le,vt=pe,xt=(et=q).imageManager.getPattern((Ne=ne).from.toString()),te=et.imageManager.getPattern(Ne.to.toString()),we=(ue=et.imageManager.getPixelSize()).width,Oe=ue.height,De=Math.pow(2,vt.tileID.overscaledZ),Ze=(Ue=vt.tileSize*Math.pow(2,et.transform.tileZoom)/De)*(vt.tileID.canonical.x+vt.tileID.wrap*De),Je=Ue*vt.tileID.canonical.y,{u_image:0,u_pattern_tl_a:xt.tl,u_pattern_br_a:xt.br,u_pattern_tl_b:te.tl,u_pattern_br_b:te.br,u_texsize:[we,Oe],u_mix:qe.t,u_pattern_size_a:xt.displaySize,u_pattern_size_b:te.displaySize,u_scale_a:qe.fromScale,u_scale_b:qe.toScale,u_tile_units_to_pixels:1/qn(vt,1,et.transform.tileZoom),u_pixel_coord_upper:[Ze>>16,Je>>16],u_pixel_coord_lower:[65535&Ze,65535&Je]}),{u_matrix:D,u_opacity:Y});var Ne,qe,et,vt,xt,te,ue,we,Oe,De,Ue,Ze,Je},Oo={fillExtrusion:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_lightpos:new l.Uniform3f(D,Y.u_lightpos),u_lightintensity:new l.Uniform1f(D,Y.u_lightintensity),u_lightcolor:new l.Uniform3f(D,Y.u_lightcolor),u_vertical_gradient:new l.Uniform1f(D,Y.u_vertical_gradient),u_opacity:new l.Uniform1f(D,Y.u_opacity)}},fillExtrusionPattern:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_lightpos:new l.Uniform3f(D,Y.u_lightpos),u_lightintensity:new l.Uniform1f(D,Y.u_lightintensity),u_lightcolor:new l.Uniform3f(D,Y.u_lightcolor),u_vertical_gradient:new l.Uniform1f(D,Y.u_vertical_gradient),u_height_factor:new l.Uniform1f(D,Y.u_height_factor),u_image:new l.Uniform1i(D,Y.u_image),u_texsize:new l.Uniform2f(D,Y.u_texsize),u_pixel_coord_upper:new l.Uniform2f(D,Y.u_pixel_coord_upper),u_pixel_coord_lower:new l.Uniform2f(D,Y.u_pixel_coord_lower),u_scale:new l.Uniform3f(D,Y.u_scale),u_fade:new l.Uniform1f(D,Y.u_fade),u_opacity:new l.Uniform1f(D,Y.u_opacity)}},fill:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix)}},fillPattern:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_image:new l.Uniform1i(D,Y.u_image),u_texsize:new l.Uniform2f(D,Y.u_texsize),u_pixel_coord_upper:new l.Uniform2f(D,Y.u_pixel_coord_upper),u_pixel_coord_lower:new l.Uniform2f(D,Y.u_pixel_coord_lower),u_scale:new l.Uniform3f(D,Y.u_scale),u_fade:new l.Uniform1f(D,Y.u_fade)}},fillOutline:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_world:new l.Uniform2f(D,Y.u_world)}},fillOutlinePattern:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_world:new l.Uniform2f(D,Y.u_world),u_image:new l.Uniform1i(D,Y.u_image),u_texsize:new l.Uniform2f(D,Y.u_texsize),u_pixel_coord_upper:new l.Uniform2f(D,Y.u_pixel_coord_upper),u_pixel_coord_lower:new l.Uniform2f(D,Y.u_pixel_coord_lower),u_scale:new l.Uniform3f(D,Y.u_scale),u_fade:new l.Uniform1f(D,Y.u_fade)}},circle:function(D,Y){return{u_camera_to_center_distance:new l.Uniform1f(D,Y.u_camera_to_center_distance),u_scale_with_map:new l.Uniform1i(D,Y.u_scale_with_map),u_pitch_with_map:new l.Uniform1i(D,Y.u_pitch_with_map),u_extrude_scale:new l.Uniform2f(D,Y.u_extrude_scale),u_device_pixel_ratio:new l.Uniform1f(D,Y.u_device_pixel_ratio),u_matrix:new l.UniformMatrix4f(D,Y.u_matrix)}},collisionBox:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_camera_to_center_distance:new l.Uniform1f(D,Y.u_camera_to_center_distance),u_pixels_to_tile_units:new l.Uniform1f(D,Y.u_pixels_to_tile_units),u_extrude_scale:new l.Uniform2f(D,Y.u_extrude_scale),u_overscale_factor:new l.Uniform1f(D,Y.u_overscale_factor)}},collisionCircle:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_inv_matrix:new l.UniformMatrix4f(D,Y.u_inv_matrix),u_camera_to_center_distance:new l.Uniform1f(D,Y.u_camera_to_center_distance),u_viewport_size:new l.Uniform2f(D,Y.u_viewport_size)}},debug:function(D,Y){return{u_color:new l.UniformColor(D,Y.u_color),u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_overlay:new l.Uniform1i(D,Y.u_overlay),u_overlay_scale:new l.Uniform1f(D,Y.u_overlay_scale)}},clippingMask:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix)}},heatmap:function(D,Y){return{u_extrude_scale:new l.Uniform1f(D,Y.u_extrude_scale),u_intensity:new l.Uniform1f(D,Y.u_intensity),u_matrix:new l.UniformMatrix4f(D,Y.u_matrix)}},heatmapTexture:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_world:new l.Uniform2f(D,Y.u_world),u_image:new l.Uniform1i(D,Y.u_image),u_color_ramp:new l.Uniform1i(D,Y.u_color_ramp),u_opacity:new l.Uniform1f(D,Y.u_opacity)}},hillshade:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_image:new l.Uniform1i(D,Y.u_image),u_latrange:new l.Uniform2f(D,Y.u_latrange),u_light:new l.Uniform2f(D,Y.u_light),u_shadow:new l.UniformColor(D,Y.u_shadow),u_highlight:new l.UniformColor(D,Y.u_highlight),u_accent:new l.UniformColor(D,Y.u_accent)}},hillshadePrepare:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_image:new l.Uniform1i(D,Y.u_image),u_dimension:new l.Uniform2f(D,Y.u_dimension),u_zoom:new l.Uniform1f(D,Y.u_zoom),u_maxzoom:new l.Uniform1f(D,Y.u_maxzoom),u_unpack:new l.Uniform4f(D,Y.u_unpack)}},line:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_ratio:new l.Uniform1f(D,Y.u_ratio),u_device_pixel_ratio:new l.Uniform1f(D,Y.u_device_pixel_ratio),u_units_to_pixels:new l.Uniform2f(D,Y.u_units_to_pixels)}},lineGradient:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_ratio:new l.Uniform1f(D,Y.u_ratio),u_device_pixel_ratio:new l.Uniform1f(D,Y.u_device_pixel_ratio),u_units_to_pixels:new l.Uniform2f(D,Y.u_units_to_pixels),u_image:new l.Uniform1i(D,Y.u_image)}},linePattern:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_texsize:new l.Uniform2f(D,Y.u_texsize),u_ratio:new l.Uniform1f(D,Y.u_ratio),u_device_pixel_ratio:new l.Uniform1f(D,Y.u_device_pixel_ratio),u_image:new l.Uniform1i(D,Y.u_image),u_units_to_pixels:new l.Uniform2f(D,Y.u_units_to_pixels),u_scale:new l.Uniform3f(D,Y.u_scale),u_fade:new l.Uniform1f(D,Y.u_fade)}},lineSDF:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_ratio:new l.Uniform1f(D,Y.u_ratio),u_device_pixel_ratio:new l.Uniform1f(D,Y.u_device_pixel_ratio),u_units_to_pixels:new l.Uniform2f(D,Y.u_units_to_pixels),u_patternscale_a:new l.Uniform2f(D,Y.u_patternscale_a),u_patternscale_b:new l.Uniform2f(D,Y.u_patternscale_b),u_sdfgamma:new l.Uniform1f(D,Y.u_sdfgamma),u_image:new l.Uniform1i(D,Y.u_image),u_tex_y_a:new l.Uniform1f(D,Y.u_tex_y_a),u_tex_y_b:new l.Uniform1f(D,Y.u_tex_y_b),u_mix:new l.Uniform1f(D,Y.u_mix)}},raster:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_tl_parent:new l.Uniform2f(D,Y.u_tl_parent),u_scale_parent:new l.Uniform1f(D,Y.u_scale_parent),u_buffer_scale:new l.Uniform1f(D,Y.u_buffer_scale),u_fade_t:new l.Uniform1f(D,Y.u_fade_t),u_opacity:new l.Uniform1f(D,Y.u_opacity),u_image0:new l.Uniform1i(D,Y.u_image0),u_image1:new l.Uniform1i(D,Y.u_image1),u_brightness_low:new l.Uniform1f(D,Y.u_brightness_low),u_brightness_high:new l.Uniform1f(D,Y.u_brightness_high),u_saturation_factor:new l.Uniform1f(D,Y.u_saturation_factor),u_contrast_factor:new l.Uniform1f(D,Y.u_contrast_factor),u_spin_weights:new l.Uniform3f(D,Y.u_spin_weights)}},symbolIcon:function(D,Y){return{u_is_size_zoom_constant:new l.Uniform1i(D,Y.u_is_size_zoom_constant),u_is_size_feature_constant:new l.Uniform1i(D,Y.u_is_size_feature_constant),u_size_t:new l.Uniform1f(D,Y.u_size_t),u_size:new l.Uniform1f(D,Y.u_size),u_camera_to_center_distance:new l.Uniform1f(D,Y.u_camera_to_center_distance),u_pitch:new l.Uniform1f(D,Y.u_pitch),u_rotate_symbol:new l.Uniform1i(D,Y.u_rotate_symbol),u_aspect_ratio:new l.Uniform1f(D,Y.u_aspect_ratio),u_fade_change:new l.Uniform1f(D,Y.u_fade_change),u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_label_plane_matrix:new l.UniformMatrix4f(D,Y.u_label_plane_matrix),u_coord_matrix:new l.UniformMatrix4f(D,Y.u_coord_matrix),u_is_text:new l.Uniform1i(D,Y.u_is_text),u_pitch_with_map:new l.Uniform1i(D,Y.u_pitch_with_map),u_texsize:new l.Uniform2f(D,Y.u_texsize),u_texture:new l.Uniform1i(D,Y.u_texture)}},symbolSDF:function(D,Y){return{u_is_size_zoom_constant:new l.Uniform1i(D,Y.u_is_size_zoom_constant),u_is_size_feature_constant:new l.Uniform1i(D,Y.u_is_size_feature_constant),u_size_t:new l.Uniform1f(D,Y.u_size_t),u_size:new l.Uniform1f(D,Y.u_size),u_camera_to_center_distance:new l.Uniform1f(D,Y.u_camera_to_center_distance),u_pitch:new l.Uniform1f(D,Y.u_pitch),u_rotate_symbol:new l.Uniform1i(D,Y.u_rotate_symbol),u_aspect_ratio:new l.Uniform1f(D,Y.u_aspect_ratio),u_fade_change:new l.Uniform1f(D,Y.u_fade_change),u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_label_plane_matrix:new l.UniformMatrix4f(D,Y.u_label_plane_matrix),u_coord_matrix:new l.UniformMatrix4f(D,Y.u_coord_matrix),u_is_text:new l.Uniform1i(D,Y.u_is_text),u_pitch_with_map:new l.Uniform1i(D,Y.u_pitch_with_map),u_texsize:new l.Uniform2f(D,Y.u_texsize),u_texture:new l.Uniform1i(D,Y.u_texture),u_gamma_scale:new l.Uniform1f(D,Y.u_gamma_scale),u_device_pixel_ratio:new l.Uniform1f(D,Y.u_device_pixel_ratio),u_is_halo:new l.Uniform1i(D,Y.u_is_halo)}},symbolTextAndIcon:function(D,Y){return{u_is_size_zoom_constant:new l.Uniform1i(D,Y.u_is_size_zoom_constant),u_is_size_feature_constant:new l.Uniform1i(D,Y.u_is_size_feature_constant),u_size_t:new l.Uniform1f(D,Y.u_size_t),u_size:new l.Uniform1f(D,Y.u_size),u_camera_to_center_distance:new l.Uniform1f(D,Y.u_camera_to_center_distance),u_pitch:new l.Uniform1f(D,Y.u_pitch),u_rotate_symbol:new l.Uniform1i(D,Y.u_rotate_symbol),u_aspect_ratio:new l.Uniform1f(D,Y.u_aspect_ratio),u_fade_change:new l.Uniform1f(D,Y.u_fade_change),u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_label_plane_matrix:new l.UniformMatrix4f(D,Y.u_label_plane_matrix),u_coord_matrix:new l.UniformMatrix4f(D,Y.u_coord_matrix),u_is_text:new l.Uniform1i(D,Y.u_is_text),u_pitch_with_map:new l.Uniform1i(D,Y.u_pitch_with_map),u_texsize:new l.Uniform2f(D,Y.u_texsize),u_texsize_icon:new l.Uniform2f(D,Y.u_texsize_icon),u_texture:new l.Uniform1i(D,Y.u_texture),u_texture_icon:new l.Uniform1i(D,Y.u_texture_icon),u_gamma_scale:new l.Uniform1f(D,Y.u_gamma_scale),u_device_pixel_ratio:new l.Uniform1f(D,Y.u_device_pixel_ratio),u_is_halo:new l.Uniform1i(D,Y.u_is_halo)}},background:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_opacity:new l.Uniform1f(D,Y.u_opacity),u_color:new l.UniformColor(D,Y.u_color)}},backgroundPattern:function(D,Y){return{u_matrix:new l.UniformMatrix4f(D,Y.u_matrix),u_opacity:new l.Uniform1f(D,Y.u_opacity),u_image:new l.Uniform1i(D,Y.u_image),u_pattern_tl_a:new l.Uniform2f(D,Y.u_pattern_tl_a),u_pattern_br_a:new l.Uniform2f(D,Y.u_pattern_br_a),u_pattern_tl_b:new l.Uniform2f(D,Y.u_pattern_tl_b),u_pattern_br_b:new l.Uniform2f(D,Y.u_pattern_br_b),u_texsize:new l.Uniform2f(D,Y.u_texsize),u_mix:new l.Uniform1f(D,Y.u_mix),u_pattern_size_a:new l.Uniform2f(D,Y.u_pattern_size_a),u_pattern_size_b:new l.Uniform2f(D,Y.u_pattern_size_b),u_scale_a:new l.Uniform1f(D,Y.u_scale_a),u_scale_b:new l.Uniform1f(D,Y.u_scale_b),u_pixel_coord_upper:new l.Uniform2f(D,Y.u_pixel_coord_upper),u_pixel_coord_lower:new l.Uniform2f(D,Y.u_pixel_coord_lower),u_tile_units_to_pixels:new l.Uniform1f(D,Y.u_tile_units_to_pixels)}}};function Xo(D,Y,q,ne,pe,Le,Ne){for(var qe=D.context,et=qe.gl,vt=D.useProgram("collisionBox"),xt=[],te=0,ue=0,we=0;we<ne.length;we++){var Oe=ne[we],De=Y.getTile(Oe),Ue=De.getBucket(q);if(Ue){var Ze=Oe.posMatrix;0===pe[0]&&0===pe[1]||(Ze=D.translatePosMatrix(Oe.posMatrix,De,pe,Le));var Je=Ne?Ue.textCollisionBox:Ue.iconCollisionBox,it=Ue.collisionCircleArray;if(it.length>0){var ut=l.create(),St=Ze;l.mul(ut,Ue.placementInvProjMatrix,D.transform.glCoordMatrix),l.mul(ut,ut,Ue.placementViewportMatrix),xt.push({circleArray:it,circleOffset:ue,transform:St,invTransform:ut}),ue=te+=it.length/4}Je&&vt.draw(qe,et.LINES,Ut.disabled,Ge.disabled,D.colorModeForRenderPass(),Be.disabled,ll(Ze,D.transform,De),q.id,Je.layoutVertexBuffer,Je.indexBuffer,Je.segments,null,D.transform.zoom,null,null,Je.collisionVertexBuffer)}}if(Ne&&xt.length){var Dt=D.useProgram("collisionCircle"),Ft=new l.StructArrayLayout2f1f2i16;Ft.resize(4*te),Ft._trim();for(var Yt=0,ln=0,Xt=xt;ln<Xt.length;ln+=1)for(var en=Xt[ln],Jt=0;Jt<en.circleArray.length/4;Jt++){var bn=4*Jt,gn=en.circleArray[bn+0],Qt=en.circleArray[bn+1],Pn=en.circleArray[bn+2],Dn=en.circleArray[bn+3];Ft.emplace(Yt++,gn,Qt,Pn,Dn,0),Ft.emplace(Yt++,gn,Qt,Pn,Dn,1),Ft.emplace(Yt++,gn,Qt,Pn,Dn,2),Ft.emplace(Yt++,gn,Qt,Pn,Dn,3)}(!oo||oo.length<2*te)&&(oo=function(kr){var Vr=2*kr,Hr=new l.StructArrayLayout3ui6;Hr.resize(Vr),Hr._trim();for(var hr=0;hr<Vr;hr++){var Ar=6*hr;Hr.uint16[Ar+0]=4*hr+0,Hr.uint16[Ar+1]=4*hr+1,Hr.uint16[Ar+2]=4*hr+2,Hr.uint16[Ar+3]=4*hr+2,Hr.uint16[Ar+4]=4*hr+3,Hr.uint16[Ar+5]=4*hr+0}return Hr}(te));for(var Xn=qe.createIndexBuffer(oo,!0),Jn=qe.createVertexBuffer(Ft,l.collisionCircleLayout.members,!0),gr=0,vr=xt;gr<vr.length;gr+=1){var sr=vr[gr],dr=qs(sr.transform,sr.invTransform,D.transform);Dt.draw(qe,et.TRIANGLES,Ut.disabled,Ge.disabled,D.colorModeForRenderPass(),Be.disabled,dr,q.id,Jn,Xn,l.SegmentVector.simpleSegment(0,2*sr.circleOffset,sr.circleArray.length,sr.circleArray.length/2),null,D.transform.zoom,null,null,null)}Jn.destroy(),Xn.destroy()}}var Pa=l.identity(new Float32Array(16));function Ws(D,Y,q,ne,pe,Le){var Ne=l.getAnchorAlignment(D),qe=-(Ne.horizontalAlign-.5)*Y,et=-(Ne.verticalAlign-.5)*q,vt=l.evaluateVariableOffset(D,ne);return new l.Point((qe/pe+vt[0])*Le,(et/pe+vt[1])*Le)}function cs(D,Y,q,ne,pe,Le,Ne,qe,et,vt,xt){var te=D.text.placedSymbolArray,ue=D.text.dynamicLayoutVertexArray,we=D.icon.dynamicLayoutVertexArray,Oe={};ue.clear();for(var De=0;De<te.length;De++){var Ue=te.get(De),Je=Ue.hidden||!Ue.crossTileID||D.allowVerticalPlacement&&!Ue.placedOrientation?null:ne[Ue.crossTileID];if(Je){var it=new l.Point(Ue.anchorX,Ue.anchorY),ut=cn(it,q?qe:Ne),St=dn(Le.cameraToCenterDistance,ut.signedDistanceFromCamera),Dt=pe.evaluateSizeForFeature(D.textSizeData,vt,Ue)*St/l.ONE_EM;q&&(Dt*=D.tilePixelRatio/et);for(var ln=Ws(Je.anchor,Je.width,Je.height,Je.textOffset,Je.textBoxScale,Dt),Xt=q?cn(it.add(ln),Ne).point:ut.point.add(Y?ln.rotate(-Le.angle):ln),en=D.allowVerticalPlacement&&Ue.placedOrientation===l.WritingMode.vertical?Math.PI/2:0,Jt=0;Jt<Ue.numGlyphs;Jt++)l.addDynamicAttributes(ue,Xt,en);xt&&Ue.associatedIconIndex>=0&&(Oe[Ue.associatedIconIndex]={shiftedAnchor:Xt,angle:en})}else $n(Ue.numGlyphs,ue)}if(xt){we.clear();for(var bn=D.icon.placedSymbolArray,gn=0;gn<bn.length;gn++){var Qt=bn.get(gn);if(Qt.hidden)$n(Qt.numGlyphs,we);else{var Pn=Oe[gn];if(Pn)for(var Dn=0;Dn<Qt.numGlyphs;Dn++)l.addDynamicAttributes(we,Pn.shiftedAnchor,Pn.angle);else $n(Qt.numGlyphs,we)}}D.icon.dynamicLayoutVertexBuffer.updateData(we)}D.text.dynamicLayoutVertexBuffer.updateData(ue)}function Jo(D,Y,q){return q.iconsInText&&Y?"symbolTextAndIcon":D?"symbolSDF":"symbolIcon"}function fs(D,Y,q,ne,pe,Le,Ne,qe,et,vt,xt,te){for(var ue=D.context,we=ue.gl,Oe=D.transform,De="map"===qe,Ue="map"===et,Ze=De&&"point"!==q.layout.get("symbol-placement"),Je=De&&!Ue&&!Ze,it=void 0!==q.layout.get("symbol-sort-key").constantOr(1),ut=D.depthModeForSublayer(0,Ut.ReadOnly),St=q.layout.get("text-variable-anchor"),Dt=[],Ft=0,Yt=ne;Ft<Yt.length;Ft+=1){var ln=Yt[Ft],Xt=Y.getTile(ln),en=Xt.getBucket(q);if(en){var Jt=pe?en.text:en.icon;if(Jt&&Jt.segments.get().length){var bn=Jt.programConfigurations.get(q.id),gn=pe||en.sdfIcons,Qt=pe?en.textSizeData:en.iconSizeData,Pn=Ue||0!==Oe.pitch,Dn=D.useProgram(Jo(gn,pe,en),bn),Xn=l.evaluateSizeForZoom(Qt,Oe.zoom),Jn=void 0,gr=[0,0],vr=void 0,sr=void 0,dr=null,kr=void 0;if(pe)vr=Xt.glyphAtlasTexture,sr=we.LINEAR,Jn=Xt.glyphAtlasTexture.size,en.iconsInText&&(gr=Xt.imageAtlasTexture.size,dr=Xt.imageAtlasTexture,kr=Pn||D.options.rotating||D.options.zooming||"composite"===Qt.kind||"camera"===Qt.kind?we.LINEAR:we.NEAREST);else{var Hr=1!==q.layout.get("icon-size").constantOr(0)||en.iconsNeedLinear;vr=Xt.imageAtlasTexture,sr=gn||D.options.rotating||D.options.zooming||Hr||Pn?we.LINEAR:we.NEAREST,Jn=Xt.imageAtlasTexture.size}var hr=qn(Xt,1,D.transform.zoom),Ar=Bn(ln.posMatrix,Ue,De,D.transform,hr),Dr=vn(ln.posMatrix,Ue,De,D.transform,hr),zr=St&&en.hasTextData(),Wr="none"!==q.layout.get("icon-text-fit")&&zr&&en.hasIconData();Ze&&hn(en,ln.posMatrix,D,pe,Ar,Dr,Ue,vt);var Zr=D.translatePosMatrix(ln.posMatrix,Xt,Le,Ne),$r=Ze||pe&&St||Wr?Pa:Ar,ui=D.translatePosMatrix(Dr,Xt,Le,Ne,!0),yi=gn&&0!==q.paint.get(pe?"text-halo-width":"icon-halo-width").constantOr(1),hi={program:Dn,buffers:Jt,uniformValues:gn?en.iconsInText?yl(Qt.kind,Xn,Je,Ue,D,Zr,$r,ui,Jn,gr):xo(Qt.kind,Xn,Je,Ue,D,Zr,$r,ui,pe,Jn,!0):ei(Qt.kind,Xn,Je,Ue,D,Zr,$r,ui,pe,Jn),atlasTexture:vr,atlasTextureIcon:dr,atlasInterpolation:sr,atlasInterpolationIcon:kr,isSDF:gn,hasHalo:yi};if(it)for(var si=0,ci=Jt.segments.get();si<ci.length;si+=1){var pi=ci[si];Dt.push({segments:new l.SegmentVector([pi]),sortKey:pi.sortKey,state:hi})}else Dt.push({segments:Jt.segments,sortKey:0,state:hi})}}}it&&Dt.sort(function(Qi,ki){return Qi.sortKey-ki.sortKey});for(var Si=0,Mo=Dt;Si<Mo.length;Si+=1){var Fi=Mo[Si],Br=Fi.state;if(ue.activeTexture.set(we.TEXTURE0),Br.atlasTexture.bind(Br.atlasInterpolation,we.CLAMP_TO_EDGE),Br.atlasTextureIcon&&(ue.activeTexture.set(we.TEXTURE1),Br.atlasTextureIcon&&Br.atlasTextureIcon.bind(Br.atlasInterpolationIcon,we.CLAMP_TO_EDGE)),Br.isSDF){var Gi=Br.uniformValues;Br.hasHalo&&(Gi.u_is_halo=1,Io(Br.buffers,Fi.segments,q,D,Br.program,ut,xt,te,Gi)),Gi.u_is_halo=0}Io(Br.buffers,Fi.segments,q,D,Br.program,ut,xt,te,Br.uniformValues)}}function Io(D,Y,q,ne,pe,Le,Ne,qe,et){var vt=ne.context;pe.draw(vt,vt.gl.TRIANGLES,Le,Ne,qe,Be.disabled,et,q.id,D.layoutVertexBuffer,D.indexBuffer,Y,q.paint,ne.transform.zoom,D.programConfigurations.get(q.id),D.dynamicLayoutVertexBuffer,D.opacityVertexBuffer)}function Ro(D,Y,q,ne,pe,Le,Ne){var qe,et,vt,xt,te,ue=D.context.gl,we=q.paint.get("fill-pattern"),Oe=we&&we.constantOr(1),De=q.getCrossfadeParameters();Ne?(et=Oe&&!q.getPaintProperty("fill-outline-color")?"fillOutlinePattern":"fillOutline",qe=ue.LINES):(et=Oe?"fillPattern":"fill",qe=ue.TRIANGLES);for(var Ue=0,Ze=ne;Ue<Ze.length;Ue+=1){var Je=Ze[Ue],it=Y.getTile(Je);if(!Oe||it.patternsLoaded()){var ut=it.getBucket(q);if(ut){var St=ut.programConfigurations.get(q.id),Dt=D.useProgram(et,St);Oe&&(D.context.activeTexture.set(ue.TEXTURE0),it.imageAtlasTexture.bind(ue.LINEAR,ue.CLAMP_TO_EDGE),St.updatePaintBuffers(De));var Ft=we.constantOr(null);if(Ft&&it.imageAtlas){var Yt=it.imageAtlas,ln=Yt.patternPositions[Ft.to.toString()],Xt=Yt.patternPositions[Ft.from.toString()];ln&&Xt&&St.setConstantPatternPositions(ln,Xt)}var en=D.translatePosMatrix(Je.posMatrix,it,q.paint.get("fill-translate"),q.paint.get("fill-translate-anchor"));if(Ne){xt=ut.indexBuffer2,te=ut.segments2;var Jt=[ue.drawingBufferWidth,ue.drawingBufferHeight];vt="fillOutlinePattern"===et&&Oe?ml(en,D,De,it,Jt):sl(en,Jt)}else xt=ut.indexBuffer,te=ut.segments,vt=Oe?ol(en,D,De,it):no(en);Dt.draw(D.context,qe,pe,D.stencilModeForClipping(Je),Le,Be.disabled,vt,q.id,ut.layoutVertexBuffer,xt,te,q.paint,D.transform.zoom,St)}}}}function Ko(D,Y,q,ne,pe,Le,Ne){for(var qe=D.context,et=qe.gl,vt=q.paint.get("fill-extrusion-pattern"),xt=vt.constantOr(1),te=q.getCrossfadeParameters(),ue=q.paint.get("fill-extrusion-opacity"),we=0,Oe=ne;we<Oe.length;we+=1){var De=Oe[we],Ue=Y.getTile(De),Ze=Ue.getBucket(q);if(Ze){var Je=Ze.programConfigurations.get(q.id),it=D.useProgram(xt?"fillExtrusionPattern":"fillExtrusion",Je);xt&&(D.context.activeTexture.set(et.TEXTURE0),Ue.imageAtlasTexture.bind(et.LINEAR,et.CLAMP_TO_EDGE),Je.updatePaintBuffers(te));var ut=vt.constantOr(null);if(ut&&Ue.imageAtlas){var St=Ue.imageAtlas,Dt=St.patternPositions[ut.to.toString()],Ft=St.patternPositions[ut.from.toString()];Dt&&Ft&&Je.setConstantPatternPositions(Dt,Ft)}var Yt=D.translatePosMatrix(De.posMatrix,Ue,q.paint.get("fill-extrusion-translate"),q.paint.get("fill-extrusion-translate-anchor")),ln=q.paint.get("fill-extrusion-vertical-gradient"),Xt=xt?al(Yt,D,ln,ue,De,te,Ue):ls(Yt,D,ln,ue);it.draw(qe,qe.gl.TRIANGLES,pe,Le,Ne,Be.backCCW,Xt,q.id,Ze.layoutVertexBuffer,Ze.indexBuffer,Ze.segments,q.paint,D.transform.zoom,Je)}}}function hs(D,Y,q,ne,pe,Le){var Ne=D.context,qe=Ne.gl,et=Y.fbo;if(et){var vt=D.useProgram("hillshade");Ne.activeTexture.set(qe.TEXTURE0),qe.bindTexture(qe.TEXTURE_2D,et.colorAttachment.get());var xt=function(te,ue,we){var Oe=we.paint.get("hillshade-shadow-color"),De=we.paint.get("hillshade-highlight-color"),Ue=we.paint.get("hillshade-accent-color"),Ze=we.paint.get("hillshade-illumination-direction")*(Math.PI/180);"viewport"===we.paint.get("hillshade-illumination-anchor")&&(Ze-=te.transform.angle);var Je,it,ut,St=!te.options.moving;return{u_matrix:te.transform.calculatePosMatrix(ue.tileID.toUnwrapped(),St),u_image:0,u_latrange:(Je=ue.tileID,it=Math.pow(2,Je.canonical.z),ut=Je.canonical.y,[new l.MercatorCoordinate(0,ut/it).toLngLat().lat,new l.MercatorCoordinate(0,(ut+1)/it).toLngLat().lat]),u_light:[we.paint.get("hillshade-exaggeration"),Ze],u_shadow:Oe,u_highlight:De,u_accent:Ue}}(D,Y,q);vt.draw(Ne,qe.TRIANGLES,ne,pe,Le,Be.disabled,xt,q.id,D.rasterBoundsBuffer,D.quadTriangleIndexBuffer,D.rasterBoundsSegments)}}function ps(D,Y,q,ne,pe,Le,Ne){var Ue,Ze,Je,it,ut,qe=D.context,et=qe.gl,vt=Y.dem;if(vt&&vt.data){var xt=vt.dim,te=vt.stride,ue=vt.getPixels();if(qe.activeTexture.set(et.TEXTURE1),qe.pixelStoreUnpackPremultiplyAlpha.set(!1),Y.demTexture=Y.demTexture||D.getTileTexture(te),Y.demTexture){var we=Y.demTexture;we.update(ue,{premultiply:!1}),we.bind(et.NEAREST,et.CLAMP_TO_EDGE)}else Y.demTexture=new l.Texture(qe,ue,et.RGBA,{premultiply:!1}),Y.demTexture.bind(et.NEAREST,et.CLAMP_TO_EDGE);qe.activeTexture.set(et.TEXTURE0);var Oe=Y.fbo;if(!Oe){var De=new l.Texture(qe,{width:xt,height:xt,data:null},et.RGBA);De.bind(et.LINEAR,et.CLAMP_TO_EDGE),(Oe=Y.fbo=qe.createFramebuffer(xt,xt,!0)).colorAttachment.set(De.texture)}qe.bindFramebuffer.set(Oe.framebuffer),qe.viewport.set([0,0,xt,xt]),D.useProgram("hillshadePrepare").draw(qe,et.TRIANGLES,pe,Le,Ne,Be.disabled,(Ue=Y.tileID,Je=ne,it=(Ze=vt).stride,ut=l.create(),l.ortho(ut,0,l.EXTENT,-l.EXTENT,0,0,1),l.translate(ut,ut,[0,-l.EXTENT,0]),{u_matrix:ut,u_image:1,u_dimension:[it,it],u_zoom:Ue.overscaledZ,u_maxzoom:Je,u_unpack:Ze.getUnpackVector()}),q.id,D.rasterBoundsBuffer,D.quadTriangleIndexBuffer,D.rasterBoundsSegments),Y.needsHillshadePrepare=!1}}function Oa(D,Y,q,ne,pe){var Le=ne.paint.get("raster-fade-duration");if(Le>0){var Ne=l.browser.now(),qe=(Ne-D.timeAdded)/Le,et=Y?(Ne-Y.timeAdded)/Le:-1,vt=q.getSource(),xt=pe.coveringZoomLevel({tileSize:vt.tileSize,roundZoom:vt.roundZoom}),te=!Y||Math.abs(Y.tileID.overscaledZ-xt)>Math.abs(D.tileID.overscaledZ-xt),ue=te&&D.refreshedUponExpiration?1:l.clamp(te?qe:1-et,0,1);return D.refreshedUponExpiration&&qe>=1&&(D.refreshedUponExpiration=!1),Y?{opacity:1,mix:1-ue}:{opacity:ue,mix:0}}return{opacity:1,mix:0}}var ds=new l.Color(1,0,0,1),gs=new l.Color(0,1,0,1),Ys=new l.Color(0,0,1,1),bo=new l.Color(1,0,1,1),Es=new l.Color(0,1,1,1);function Xs(D,Y,q,ne){$o(D,0,Y+q/2,D.transform.width,q,ne)}function ms(D,Y,q,ne){$o(D,Y-q/2,0,q,D.transform.height,ne)}function $o(D,Y,q,ne,pe,Le){var Ne=D.context,qe=Ne.gl;qe.enable(qe.SCISSOR_TEST),qe.scissor(Y*l.browser.devicePixelRatio,q*l.browser.devicePixelRatio,ne*l.browser.devicePixelRatio,pe*l.browser.devicePixelRatio),Ne.clear({color:Le}),qe.disable(qe.SCISSOR_TEST)}function zo(D,Y,q){var ne=D.context,pe=ne.gl,Le=q.posMatrix,Ne=D.useProgram("debug"),qe=Ut.disabled,et=Ge.disabled,vt=D.colorModeForRenderPass();ne.activeTexture.set(pe.TEXTURE0),D.emptyTexture.bind(pe.LINEAR,pe.CLAMP_TO_EDGE),Ne.draw(ne,pe.LINE_STRIP,qe,et,vt,Be.disabled,ro(Le,l.Color.red),"$debug",D.debugBuffer,D.tileBorderIndexBuffer,D.debugSegments);var te=Y.getTileByID(q.key).latestRawTileData,we=Math.floor((te&&te.byteLength||0)/1024),Oe=Y.getTile(q).tileSize,De=512/Math.min(Oe,512)*(q.overscaledZ/D.transform.zoom)*.5,Ue=q.canonical.toString();q.overscaledZ!==q.canonical.z&&(Ue+=" => "+q.overscaledZ),function(Ze,Je){Ze.initDebugOverlayCanvas();var it=Ze.debugOverlayCanvas,ut=Ze.context.gl,St=Ze.debugOverlayCanvas.getContext("2d");St.clearRect(0,0,it.width,it.height),St.shadowColor="white",St.shadowBlur=2,St.lineWidth=1.5,St.strokeStyle="white",St.textBaseline="top",St.font="bold 36px Open Sans, sans-serif",St.fillText(Je,5,5),St.strokeText(Je,5,5),Ze.debugOverlayTexture.update(it),Ze.debugOverlayTexture.bind(ut.LINEAR,ut.CLAMP_TO_EDGE)}(D,Ue+" "+we+"kb"),Ne.draw(ne,pe.TRIANGLES,qe,et,We.alphaBlended,Be.disabled,ro(Le,l.Color.transparent,De),"$debug",D.debugBuffer,D.quadTriangleIndexBuffer,D.debugSegments)}var Do={symbol:function(D,Y,q,ne,pe){if("translucent"===D.renderPass){var Le=Ge.disabled,Ne=D.colorModeForRenderPass();q.layout.get("text-variable-anchor")&&function(qe,et,vt,xt,te,ue,we){for(var Oe=et.transform,De="map"===te,Ue="map"===ue,Ze=0,Je=qe;Ze<Je.length;Ze+=1){var it=Je[Ze],ut=xt.getTile(it),St=ut.getBucket(vt);if(St&&St.text&&St.text.segments.get().length){var Ft=l.evaluateSizeForZoom(St.textSizeData,Oe.zoom),Yt=qn(ut,1,et.transform.zoom),ln=Bn(it.posMatrix,Ue,De,et.transform,Yt),Xt="none"!==vt.layout.get("icon-text-fit")&&St.hasIconData();if(Ft){var en=Math.pow(2,Oe.zoom-ut.tileID.overscaledZ);cs(St,De,Ue,we,l.symbolSize,Oe,ln,it.posMatrix,en,Ft,Xt)}}}}(ne,D,q,Y,q.layout.get("text-rotation-alignment"),q.layout.get("text-pitch-alignment"),pe),0!==q.paint.get("icon-opacity").constantOr(1)&&fs(D,Y,q,ne,!1,q.paint.get("icon-translate"),q.paint.get("icon-translate-anchor"),q.layout.get("icon-rotation-alignment"),q.layout.get("icon-pitch-alignment"),q.layout.get("icon-keep-upright"),Le,Ne),0!==q.paint.get("text-opacity").constantOr(1)&&fs(D,Y,q,ne,!0,q.paint.get("text-translate"),q.paint.get("text-translate-anchor"),q.layout.get("text-rotation-alignment"),q.layout.get("text-pitch-alignment"),q.layout.get("text-keep-upright"),Le,Ne),Y.map.showCollisionBoxes&&(Xo(D,Y,q,ne,q.paint.get("text-translate"),q.paint.get("text-translate-anchor"),!0),Xo(D,Y,q,ne,q.paint.get("icon-translate"),q.paint.get("icon-translate-anchor"),!1))}},circle:function(D,Y,q,ne){if("translucent"===D.renderPass){var pe=q.paint.get("circle-opacity"),Le=q.paint.get("circle-stroke-width"),Ne=q.paint.get("circle-stroke-opacity"),qe=void 0!==q.layout.get("circle-sort-key").constantOr(1);if(0!==pe.constantOr(1)||0!==Le.constantOr(1)&&0!==Ne.constantOr(1)){for(var et=D.context,vt=et.gl,xt=D.depthModeForSublayer(0,Ut.ReadOnly),te=Ge.disabled,ue=D.colorModeForRenderPass(),we=[],Oe=0;Oe<ne.length;Oe++){var De=ne[Oe],Ue=Y.getTile(De),Ze=Ue.getBucket(q);if(Ze){var Je=Ze.programConfigurations.get(q.id),it={programConfiguration:Je,program:D.useProgram("circle",Je),layoutVertexBuffer:Ze.layoutVertexBuffer,indexBuffer:Ze.indexBuffer,uniformValues:Hs(D,De,Ue,q)};if(qe)for(var ut=0,St=Ze.segments.get();ut<St.length;ut+=1){var Dt=St[ut];we.push({segments:new l.SegmentVector([Dt]),sortKey:Dt.sortKey,state:it})}else we.push({segments:Ze.segments,sortKey:0,state:it})}}qe&&we.sort(function(Dn,Xn){return Dn.sortKey-Xn.sortKey});for(var Ft=0,Yt=we;Ft<Yt.length;Ft+=1){var ln=Yt[Ft],Xt=ln.state;Xt.program.draw(et,vt.TRIANGLES,xt,te,ue,Be.disabled,Xt.uniformValues,q.id,Xt.layoutVertexBuffer,Xt.indexBuffer,ln.segments,q.paint,D.transform.zoom,Xt.programConfiguration)}}}},heatmap:function(D,Y,q,ne){if(0!==q.paint.get("heatmap-opacity"))if("offscreen"===D.renderPass){var pe=D.context,Le=pe.gl,Ne=Ge.disabled,qe=new We([Le.ONE,Le.ONE],l.Color.transparent,[!0,!0,!0,!0]);(function(De,Ue,Ze){var Je=De.gl;De.activeTexture.set(Je.TEXTURE1),De.viewport.set([0,0,Ue.width/4,Ue.height/4]);var St,Dt,Ft,Yt,ln,it=Ze.heatmapFbo;if(it)Je.bindTexture(Je.TEXTURE_2D,it.colorAttachment.get()),De.bindFramebuffer.set(it.framebuffer);else{var ut=Je.createTexture();Je.bindTexture(Je.TEXTURE_2D,ut),Je.texParameteri(Je.TEXTURE_2D,Je.TEXTURE_WRAP_S,Je.CLAMP_TO_EDGE),Je.texParameteri(Je.TEXTURE_2D,Je.TEXTURE_WRAP_T,Je.CLAMP_TO_EDGE),Je.texParameteri(Je.TEXTURE_2D,Je.TEXTURE_MIN_FILTER,Je.LINEAR),Je.texParameteri(Je.TEXTURE_2D,Je.TEXTURE_MAG_FILTER,Je.LINEAR),Ft=ut,Yt=it=Ze.heatmapFbo=De.createFramebuffer(Ue.width/4,Ue.height/4,!1),(ln=(St=De).gl).texImage2D(ln.TEXTURE_2D,0,ln.RGBA,(Dt=Ue).width/4,Dt.height/4,0,ln.RGBA,St.extRenderToTextureHalfFloat?St.extTextureHalfFloat.HALF_FLOAT_OES:ln.UNSIGNED_BYTE,null),Yt.colorAttachment.set(Ft)}})(pe,D,q),pe.clear({color:l.Color.transparent});for(var et=0;et<ne.length;et++){var vt=ne[et];if(!Y.hasRenderableParent(vt)){var xt=Y.getTile(vt),te=xt.getBucket(q);if(te){var ue=te.programConfigurations.get(q.id);D.useProgram("heatmap",ue).draw(pe,Le.TRIANGLES,Ut.disabled,Ne,qe,Be.disabled,Wo(vt.posMatrix,xt,D.transform.zoom,q.paint.get("heatmap-intensity")),q.id,te.layoutVertexBuffer,te.indexBuffer,te.segments,q.paint,D.transform.zoom,ue)}}}pe.viewport.set([0,0,D.width,D.height])}else"translucent"===D.renderPass&&(D.context.setColorMode(D.colorModeForRenderPass()),function(De,Ue){var Ze=De.context,Je=Ze.gl,it=Ue.heatmapFbo;if(it){Ze.activeTexture.set(Je.TEXTURE0),Je.bindTexture(Je.TEXTURE_2D,it.colorAttachment.get()),Ze.activeTexture.set(Je.TEXTURE1);var ut=Ue.colorRampTexture;ut||(ut=Ue.colorRampTexture=new l.Texture(Ze,Ue.colorRamp,Je.RGBA)),ut.bind(Je.LINEAR,Je.CLAMP_TO_EDGE),De.useProgram("heatmapTexture").draw(Ze,Je.TRIANGLES,Ut.disabled,Ge.disabled,De.colorModeForRenderPass(),Be.disabled,function(St,Dt,Ft,Yt){var ln=l.create();l.ortho(ln,0,St.width,St.height,0,0,1);var Xt=St.context.gl;return{u_matrix:ln,u_world:[Xt.drawingBufferWidth,Xt.drawingBufferHeight],u_image:0,u_color_ramp:1,u_opacity:Dt.paint.get("heatmap-opacity")}}(De,Ue),Ue.id,De.viewportBuffer,De.quadTriangleIndexBuffer,De.viewportSegments,Ue.paint,De.transform.zoom)}}(D,q))},line:function(D,Y,q,ne){if("translucent"===D.renderPass){var pe=q.paint.get("line-opacity"),Le=q.paint.get("line-width");if(0!==pe.constantOr(1)&&0!==Le.constantOr(1)){var Ne=D.depthModeForSublayer(0,Ut.ReadOnly),qe=D.colorModeForRenderPass(),et=q.paint.get("line-dasharray"),vt=q.paint.get("line-pattern"),xt=vt.constantOr(1),te=q.paint.get("line-gradient"),ue=q.getCrossfadeParameters(),we=xt?"linePattern":et?"lineSDF":te?"lineGradient":"line",Oe=D.context,De=Oe.gl,Ue=!0;if(te){Oe.activeTexture.set(De.TEXTURE0);var Ze=q.gradientTexture;if(!q.gradient)return;Ze||(Ze=q.gradientTexture=new l.Texture(Oe,q.gradient,De.RGBA)),Ze.bind(De.LINEAR,De.CLAMP_TO_EDGE)}for(var Je=0,it=ne;Je<it.length;Je+=1){var ut=it[Je],St=Y.getTile(ut);if(!xt||St.patternsLoaded()){var Dt=St.getBucket(q);if(Dt){var Ft=Dt.programConfigurations.get(q.id),Yt=D.context.program.get(),ln=D.useProgram(we,Ft),Xt=Ue||ln.program!==Yt,en=vt.constantOr(null);if(en&&St.imageAtlas){var Jt=St.imageAtlas,bn=Jt.patternPositions[en.to.toString()],gn=Jt.patternPositions[en.from.toString()];bn&&gn&&Ft.setConstantPatternPositions(bn,gn)}var Qt=xt?Zs(D,St,q,ue):et?Co(D,St,q,et,ue):te?Gs(D,St,q):ao(D,St,q);xt?(Oe.activeTexture.set(De.TEXTURE0),St.imageAtlasTexture.bind(De.LINEAR,De.CLAMP_TO_EDGE),Ft.updatePaintBuffers(ue)):et&&(Xt||D.lineAtlas.dirty)&&(Oe.activeTexture.set(De.TEXTURE0),D.lineAtlas.bind(Oe)),ln.draw(Oe,De.TRIANGLES,Ne,D.stencilModeForClipping(ut),qe,Be.disabled,Qt,q.id,Dt.layoutVertexBuffer,Dt.indexBuffer,Dt.segments,q.paint,D.transform.zoom,Ft),Ue=!1}}}}}},fill:function(D,Y,q,ne){var pe=q.paint.get("fill-color"),Le=q.paint.get("fill-opacity");if(0!==Le.constantOr(1)){var Ne=D.colorModeForRenderPass(),qe=q.paint.get("fill-pattern"),et=D.opaquePassEnabledForLayer()&&!qe.constantOr(1)&&1===pe.constantOr(l.Color.transparent).a&&1===Le.constantOr(0)?"opaque":"translucent";if(D.renderPass===et){var vt=D.depthModeForSublayer(1,"opaque"===D.renderPass?Ut.ReadWrite:Ut.ReadOnly);Ro(D,Y,q,ne,vt,Ne,!1)}if("translucent"===D.renderPass&&q.paint.get("fill-antialias")){var xt=D.depthModeForSublayer(q.getPaintProperty("fill-outline-color")?2:0,Ut.ReadOnly);Ro(D,Y,q,ne,xt,Ne,!0)}}},"fill-extrusion":function(D,Y,q,ne){var pe=q.paint.get("fill-extrusion-opacity");if(0!==pe&&"translucent"===D.renderPass){var Le=new Ut(D.context.gl.LEQUAL,Ut.ReadWrite,D.depthRangeFor3D);if(1!==pe||q.paint.get("fill-extrusion-pattern").constantOr(1))Ko(D,Y,q,ne,Le,Ge.disabled,We.disabled),Ko(D,Y,q,ne,Le,D.stencilModeFor3D(),D.colorModeForRenderPass());else{var Ne=D.colorModeForRenderPass();Ko(D,Y,q,ne,Le,Ge.disabled,Ne)}}},hillshade:function(D,Y,q,ne){if("offscreen"===D.renderPass||"translucent"===D.renderPass){for(var pe=D.context,Le=Y.getSource().maxzoom,Ne=D.depthModeForSublayer(0,Ut.ReadOnly),qe=D.colorModeForRenderPass(),et="translucent"===D.renderPass?D.stencilConfigForOverlap(ne):[{},ne],vt=et[0],xt=0,te=et[1];xt<te.length;xt+=1){var ue=te[xt],we=Y.getTile(ue);we.needsHillshadePrepare&&"offscreen"===D.renderPass?ps(D,we,q,Le,Ne,Ge.disabled,qe):"translucent"===D.renderPass&&hs(D,we,q,Ne,vt[ue.overscaledZ],qe)}pe.viewport.set([0,0,D.width,D.height])}},raster:function(D,Y,q,ne){if("translucent"===D.renderPass&&0!==q.paint.get("raster-opacity")&&ne.length)for(var pe=D.context,Le=pe.gl,Ne=Y.getSource(),qe=D.useProgram("raster"),et=D.colorModeForRenderPass(),vt=Ne instanceof N?[{},ne]:D.stencilConfigForOverlap(ne),xt=vt[0],te=vt[1],ue=te[te.length-1].overscaledZ,we=!D.options.moving,Oe=0,De=te;Oe<De.length;Oe+=1){var Ue=De[Oe],Ze=D.depthModeForSublayer(Ue.overscaledZ-ue,1===q.paint.get("raster-opacity")?Ut.ReadWrite:Ut.ReadOnly,Le.LESS),Je=Y.getTile(Ue),it=D.transform.calculatePosMatrix(Ue.toUnwrapped(),we);Je.registerFadeDuration(q.paint.get("raster-fade-duration"));var ut=Y.findLoadedParent(Ue,0),St=Oa(Je,ut,Y,q,D.transform),Dt=void 0,Ft=void 0,Yt="nearest"===q.paint.get("raster-resampling")?Le.NEAREST:Le.LINEAR;pe.activeTexture.set(Le.TEXTURE0),Je.texture.bind(Yt,Le.CLAMP_TO_EDGE,Le.LINEAR_MIPMAP_NEAREST),pe.activeTexture.set(Le.TEXTURE1),ut?(ut.texture.bind(Yt,Le.CLAMP_TO_EDGE,Le.LINEAR_MIPMAP_NEAREST),Dt=Math.pow(2,ut.tileID.overscaledZ-Je.tileID.overscaledZ),Ft=[Je.tileID.canonical.x*Dt%1,Je.tileID.canonical.y*Dt%1]):Je.texture.bind(Yt,Le.CLAMP_TO_EDGE,Le.LINEAR_MIPMAP_NEAREST);var ln=Yo(it,Ft||[0,0],Dt||1,St,q);Ne instanceof N?qe.draw(pe,Le.TRIANGLES,Ze,Ge.disabled,et,Be.disabled,ln,q.id,Ne.boundsBuffer,D.quadTriangleIndexBuffer,Ne.boundsSegments):qe.draw(pe,Le.TRIANGLES,Ze,xt[Ue.overscaledZ],et,Be.disabled,ln,q.id,D.rasterBoundsBuffer,D.quadTriangleIndexBuffer,D.rasterBoundsSegments)}},background:function(D,Y,q){var ne=q.paint.get("background-color"),pe=q.paint.get("background-opacity");if(0!==pe){var Le=D.context,Ne=Le.gl,qe=D.transform,et=qe.tileSize,vt=q.paint.get("background-pattern");if(!D.isPatternMissing(vt)){var xt=!vt&&1===ne.a&&1===pe&&D.opaquePassEnabledForLayer()?"opaque":"translucent";if(D.renderPass===xt){var te=Ge.disabled,ue=D.depthModeForSublayer(0,"opaque"===xt?Ut.ReadWrite:Ut.ReadOnly),we=D.colorModeForRenderPass(),Oe=D.useProgram(vt?"backgroundPattern":"background"),De=qe.coveringTiles({tileSize:et});vt&&(Le.activeTexture.set(Ne.TEXTURE0),D.imageManager.bind(D.context));for(var Ue=q.getCrossfadeParameters(),Ze=0,Je=De;Ze<Je.length;Ze+=1){var it=Je[Ze],ut=D.transform.calculatePosMatrix(it.toUnwrapped()),St=vt?us(ut,pe,D,vt,{tileID:it,tileSize:et},Ue):Ss(ut,pe,ne);Oe.draw(Le,Ne.TRIANGLES,ue,te,we,Be.disabled,St,q.id,D.tileExtentBuffer,D.quadTriangleIndexBuffer,D.tileExtentSegments)}}}}},debug:function(D,Y,q){for(var ne=0;ne<q.length;ne++)zo(D,Y,q[ne])},custom:function(D,Y,q){var ne=D.context,pe=q.implementation;if("offscreen"===D.renderPass){var Le=pe.prerender;Le&&(D.setCustomLayerDefaults(),ne.setColorMode(D.colorModeForRenderPass()),Le.call(pe,ne.gl,D.transform.customLayerMatrix()),ne.setDirty(),D.setBaseState())}else if("translucent"===D.renderPass){D.setCustomLayerDefaults(),ne.setColorMode(D.colorModeForRenderPass()),ne.setStencilMode(Ge.disabled);var Ne="3d"===pe.renderingMode?new Ut(D.context.gl.LEQUAL,Ut.ReadWrite,D.depthRangeFor3D):D.depthModeForSublayer(0,Ut.ReadOnly);ne.setDepthMode(Ne),pe.render(ne.gl,D.transform.customLayerMatrix()),ne.setDirty(),D.setBaseState(),ne.bindFramebuffer.set(null)}}},ai=function(D,Y){this.context=new Ye(D),this.transform=Y,this._tileTextures={},this.setup(),this.numSublayers=rt.maxUnderzooming+rt.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new Wn,this.gpuTimers={}};ai.prototype.resize=function(D,Y){if(this.width=D*l.browser.devicePixelRatio,this.height=Y*l.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var q=0,ne=this.style._order;q<ne.length;q+=1)this.style._layers[ne[q]].resize()},ai.prototype.setup=function(){var D=this.context,Y=new l.StructArrayLayout2i4;Y.emplaceBack(0,0),Y.emplaceBack(l.EXTENT,0),Y.emplaceBack(0,l.EXTENT),Y.emplaceBack(l.EXTENT,l.EXTENT),this.tileExtentBuffer=D.createVertexBuffer(Y,lr.members),this.tileExtentSegments=l.SegmentVector.simpleSegment(0,0,4,2);var q=new l.StructArrayLayout2i4;q.emplaceBack(0,0),q.emplaceBack(l.EXTENT,0),q.emplaceBack(0,l.EXTENT),q.emplaceBack(l.EXTENT,l.EXTENT),this.debugBuffer=D.createVertexBuffer(q,lr.members),this.debugSegments=l.SegmentVector.simpleSegment(0,0,4,5);var ne=new l.StructArrayLayout4i8;ne.emplaceBack(0,0,0,0),ne.emplaceBack(l.EXTENT,0,l.EXTENT,0),ne.emplaceBack(0,l.EXTENT,0,l.EXTENT),ne.emplaceBack(l.EXTENT,l.EXTENT,l.EXTENT,l.EXTENT),this.rasterBoundsBuffer=D.createVertexBuffer(ne,F.members),this.rasterBoundsSegments=l.SegmentVector.simpleSegment(0,0,4,2);var pe=new l.StructArrayLayout2i4;pe.emplaceBack(0,0),pe.emplaceBack(1,0),pe.emplaceBack(0,1),pe.emplaceBack(1,1),this.viewportBuffer=D.createVertexBuffer(pe,lr.members),this.viewportSegments=l.SegmentVector.simpleSegment(0,0,4,2);var Le=new l.StructArrayLayout1ui2;Le.emplaceBack(0),Le.emplaceBack(1),Le.emplaceBack(3),Le.emplaceBack(2),Le.emplaceBack(0),this.tileBorderIndexBuffer=D.createIndexBuffer(Le);var Ne=new l.StructArrayLayout3ui6;Ne.emplaceBack(0,1,2),Ne.emplaceBack(2,1,3),this.quadTriangleIndexBuffer=D.createIndexBuffer(Ne),this.emptyTexture=new l.Texture(D,{width:1,height:1,data:new Uint8Array([0,0,0,0])},D.gl.RGBA);var qe=this.context.gl;this.stencilClearMode=new Ge({func:qe.ALWAYS,mask:0},0,255,qe.ZERO,qe.ZERO,qe.ZERO)},ai.prototype.clearStencil=function(){var D=this.context,Y=D.gl;this.nextStencilID=1,this.currentStencilSource=void 0;var q=l.create();l.ortho(q,0,this.width,this.height,0,0,1),l.scale(q,q,[Y.drawingBufferWidth,Y.drawingBufferHeight,0]),this.useProgram("clippingMask").draw(D,Y.TRIANGLES,Ut.disabled,this.stencilClearMode,We.disabled,Be.disabled,io(q),"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)},ai.prototype._renderTileClippingMasks=function(D,Y){if(this.currentStencilSource!==D.source&&D.isTileClipped()&&Y&&Y.length){this.currentStencilSource=D.source;var q=this.context,ne=q.gl;this.nextStencilID+Y.length>256&&this.clearStencil(),q.setColorMode(We.disabled),q.setDepthMode(Ut.disabled);var pe=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Le=0,Ne=Y;Le<Ne.length;Le+=1){var qe=Ne[Le],et=this._tileClippingMaskIDs[qe.key]=this.nextStencilID++;pe.draw(q,ne.TRIANGLES,Ut.disabled,new Ge({func:ne.ALWAYS,mask:0},et,255,ne.KEEP,ne.KEEP,ne.REPLACE),We.disabled,Be.disabled,io(qe.posMatrix),"$clipping",this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}}},ai.prototype.stencilModeFor3D=function(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();var D=this.nextStencilID++,Y=this.context.gl;return new Ge({func:Y.NOTEQUAL,mask:255},D,255,Y.KEEP,Y.KEEP,Y.REPLACE)},ai.prototype.stencilModeForClipping=function(D){var Y=this.context.gl;return new Ge({func:Y.EQUAL,mask:255},this._tileClippingMaskIDs[D.key],0,Y.KEEP,Y.KEEP,Y.REPLACE)},ai.prototype.stencilConfigForOverlap=function(D){var Y,q=this.context.gl,ne=D.sort(function(et,vt){return vt.overscaledZ-et.overscaledZ}),pe=ne[ne.length-1].overscaledZ,Le=ne[0].overscaledZ-pe+1;if(Le>1){this.currentStencilSource=void 0,this.nextStencilID+Le>256&&this.clearStencil();for(var Ne={},qe=0;qe<Le;qe++)Ne[qe+pe]=new Ge({func:q.GEQUAL,mask:255},qe+this.nextStencilID,255,q.KEEP,q.KEEP,q.REPLACE);return this.nextStencilID+=Le,[Ne,ne]}return[(Y={},Y[pe]=Ge.disabled,Y),ne]},ai.prototype.colorModeForRenderPass=function(){var D=this.context.gl;if(this._showOverdrawInspector){var Y=.125;return new We([D.CONSTANT_COLOR,D.ONE],new l.Color(Y,Y,Y,0),[!0,!0,!0,!0])}return"opaque"===this.renderPass?We.unblended:We.alphaBlended},ai.prototype.depthModeForSublayer=function(D,Y,q){if(!this.opaquePassEnabledForLayer())return Ut.disabled;var ne=1-((1+this.currentLayer)*this.numSublayers+D)*this.depthEpsilon;return new Ut(q||this.context.gl.LEQUAL,Y,[ne,ne])},ai.prototype.opaquePassEnabledForLayer=function(){return this.currentLayer<this.opaquePassCutoff},ai.prototype.render=function(D,Y){var q=this;this.style=D,this.options=Y,this.lineAtlas=D.lineAtlas,this.imageManager=D.imageManager,this.glyphManager=D.glyphManager,this.symbolFadeChange=D.placement.symbolFadeChange(l.browser.now()),this.imageManager.beginFrame();var ne=this.style._order,pe=this.style.sourceCaches;for(var Le in pe){var Ne=pe[Le];Ne.used&&Ne.prepare(this.context)}var qe,et,vt={},xt={},te={};for(var ue in pe){var we=pe[ue];vt[ue]=we.getVisibleCoordinates(),xt[ue]=vt[ue].slice().reverse(),te[ue]=we.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(var Oe=0;Oe<ne.length;Oe++)if(this.style._layers[ne[Oe]].is3D()){this.opaquePassCutoff=Oe;break}this.renderPass="offscreen";for(var Ue=0,Ze=ne;Ue<Ze.length;Ue+=1){var it=this.style._layers[Ze[Ue]];if(it.hasOffscreenPass()&&!it.isHidden(this.transform.zoom)){var ut=xt[it.source];("custom"===it.type||ut.length)&&this.renderLayer(this,pe[it.source],it,ut)}}for(this.context.bindFramebuffer.set(null),this.context.clear({color:Y.showOverdrawInspector?l.Color.black:l.Color.transparent,depth:1}),this.clearStencil(),this._showOverdrawInspector=Y.showOverdrawInspector,this.depthRangeFor3D=[0,1-(D._order.length+2)*this.numSublayers*this.depthEpsilon],this.renderPass="opaque",this.currentLayer=ne.length-1;this.currentLayer>=0;this.currentLayer--){var St=this.style._layers[ne[this.currentLayer]],Dt=pe[St.source],Ft=vt[St.source];this._renderTileClippingMasks(St,Ft),this.renderLayer(this,Dt,St,Ft)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer<ne.length;this.currentLayer++){var Yt=this.style._layers[ne[this.currentLayer]],ln=pe[Yt.source],Xt=("symbol"===Yt.type?te:xt)[Yt.source];this._renderTileClippingMasks(Yt,vt[Yt.source]),this.renderLayer(this,ln,Yt,Xt)}this.options.showTileBoundaries&&(l.values(this.style._layers).forEach(function(en){en.source&&!en.isHidden(q.transform.zoom)&&(en.source!==(et&&et.id)&&(et=q.style.sourceCaches[en.source]),(!qe||qe.getSource().maxzoom<et.getSource().maxzoom)&&(qe=et))}),qe&&Do.debug(this,qe,qe.getVisibleCoordinates())),this.options.showPadding&&function vs(D){var Y=D.transform.padding;Xs(D,D.transform.height-(Y.top||0),3,ds),Xs(D,Y.bottom||0,3,gs),ms(D,Y.left||0,3,Ys),ms(D,D.transform.width-(Y.right||0),3,bo);var ne,pe,Le,Ne,q=D.transform.centerPoint;$o(ne=D,(pe=q.x)-1,(Le=D.transform.height-q.y)-10,2,20,Ne=Es),$o(ne,pe-10,Le-1,20,2,Ne)}(this),this.context.setDefault()},ai.prototype.renderLayer=function(D,Y,q,ne){q.isHidden(this.transform.zoom)||("background"===q.type||"custom"===q.type||ne.length)&&(this.id=q.id,this.gpuTimingStart(q),Do[q.type](D,Y,q,ne,this.style.placement.variableOffsets),this.gpuTimingEnd())},ai.prototype.gpuTimingStart=function(D){if(this.options.gpuTiming){var Y=this.context.extTimerQuery,q=this.gpuTimers[D.id];q||(q=this.gpuTimers[D.id]={calls:0,cpuTime:0,query:Y.createQueryEXT()}),q.calls++,Y.beginQueryEXT(Y.TIME_ELAPSED_EXT,q.query)}},ai.prototype.gpuTimingEnd=function(){if(this.options.gpuTiming){var D=this.context.extTimerQuery;D.endQueryEXT(D.TIME_ELAPSED_EXT)}},ai.prototype.collectGpuTimers=function(){var D=this.gpuTimers;return this.gpuTimers={},D},ai.prototype.queryGpuTimers=function(D){var Y={};for(var q in D){var ne=D[q],pe=this.context.extTimerQuery,Le=pe.getQueryObjectEXT(ne.query,pe.QUERY_RESULT_EXT)/1e6;pe.deleteQueryEXT(ne.query),Y[q]=Le}return Y},ai.prototype.translatePosMatrix=function(D,Y,q,ne,pe){if(!q[0]&&!q[1])return D;var Le=pe?"map"===ne?this.transform.angle:0:"viewport"===ne?-this.transform.angle:0;if(Le){var Ne=Math.sin(Le),qe=Math.cos(Le);q=[q[0]*qe-q[1]*Ne,q[0]*Ne+q[1]*qe]}var et=[pe?q[0]:qn(Y,q[0],this.transform.zoom),pe?q[1]:qn(Y,q[1],this.transform.zoom),0],vt=new Float32Array(16);return l.translate(vt,D,et),vt},ai.prototype.saveTileTexture=function(D){var Y=this._tileTextures[D.size[0]];Y?Y.push(D):this._tileTextures[D.size[0]]=[D]},ai.prototype.getTileTexture=function(D){var Y=this._tileTextures[D];return Y&&Y.length>0?Y.pop():null},ai.prototype.isPatternMissing=function(D){if(!D)return!1;if(!D.from||!D.to)return!0;var Y=this.imageManager.getPattern(D.from.toString()),q=this.imageManager.getPattern(D.to.toString());return!Y||!q},ai.prototype.useProgram=function(D,Y){this.cache=this.cache||{};var q=""+D+(Y?Y.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[q]||(this.cache[q]=new Ua(this.context,mo[D],Y,Oo[D],this._showOverdrawInspector)),this.cache[q]},ai.prototype.setCustomLayerDefaults=function(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()},ai.prototype.setBaseState=function(){var D=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(D.FUNC_ADD)},ai.prototype.initDebugOverlayCanvas=function(){null==this.debugOverlayCanvas&&(this.debugOverlayCanvas=l.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new l.Texture(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))},ai.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var _o=function(D,Y){this.points=D,this.planes=Y};_o.fromInvProjectionMatrix=function(D,Y,q){var ne=Math.pow(2,q),pe=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map(function(Ne){return l.transformMat4([],Ne,D)}).map(function(Ne){return l.scale$1([],Ne,1/Ne[3]/Y*ne)}),Le=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]].map(function(Ne){var qe=l.sub([],pe[Ne[0]],pe[Ne[1]]),et=l.sub([],pe[Ne[2]],pe[Ne[1]]),vt=l.normalize([],l.cross([],qe,et)),xt=-l.dot(vt,pe[Ne[1]]);return vt.concat(xt)});return new _o(pe,Le)};var wo=function(D,Y){this.min=D,this.max=Y,this.center=l.scale$2([],l.add([],this.min,this.max),.5)};wo.prototype.quadrant=function(D){for(var Y=[D%2==0,D<2],q=l.clone$2(this.min),ne=l.clone$2(this.max),pe=0;pe<Y.length;pe++)q[pe]=Y[pe]?this.min[pe]:this.center[pe],ne[pe]=Y[pe]?this.center[pe]:this.max[pe];return ne[2]=this.max[2],new wo(q,ne)},wo.prototype.distanceX=function(D){return Math.max(Math.min(this.max[0],D[0]),this.min[0])-D[0]},wo.prototype.distanceY=function(D){return Math.max(Math.min(this.max[1],D[1]),this.min[1])-D[1]},wo.prototype.intersects=function(D){for(var Y=[[this.min[0],this.min[1],0,1],[this.max[0],this.min[1],0,1],[this.max[0],this.max[1],0,1],[this.min[0],this.max[1],0,1]],q=!0,ne=0;ne<D.planes.length;ne++){for(var pe=D.planes[ne],Le=0,Ne=0;Ne<Y.length;Ne++)Le+=l.dot$1(pe,Y[Ne])>=0;if(0===Le)return 0;Le!==Y.length&&(q=!1)}if(q)return 2;for(var qe=0;qe<3;qe++){for(var et=Number.MAX_VALUE,vt=-Number.MAX_VALUE,xt=0;xt<D.points.length;xt++){var te=D.points[xt][qe]-this.min[qe];et=Math.min(et,te),vt=Math.max(vt,te)}if(vt<0||et>this.max[qe]-this.min[qe])return 0}return 1};var Zi=function(D,Y,q,ne){if(void 0===D&&(D=0),void 0===Y&&(Y=0),void 0===q&&(q=0),void 0===ne&&(ne=0),isNaN(D)||D<0||isNaN(Y)||Y<0||isNaN(q)||q<0||isNaN(ne)||ne<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=D,this.bottom=Y,this.left=q,this.right=ne};Zi.prototype.interpolate=function(D,Y,q){return null!=Y.top&&null!=D.top&&(this.top=l.number(D.top,Y.top,q)),null!=Y.bottom&&null!=D.bottom&&(this.bottom=l.number(D.bottom,Y.bottom,q)),null!=Y.left&&null!=D.left&&(this.left=l.number(D.left,Y.left,q)),null!=Y.right&&null!=D.right&&(this.right=l.number(D.right,Y.right,q)),this},Zi.prototype.getCenter=function(D,Y){var q=l.clamp((this.left+D-this.right)/2,0,D),ne=l.clamp((this.top+Y-this.bottom)/2,0,Y);return new l.Point(q,ne)},Zi.prototype.equals=function(D){return this.top===D.top&&this.bottom===D.bottom&&this.left===D.left&&this.right===D.right},Zi.prototype.clone=function(){return new Zi(this.top,this.bottom,this.left,this.right)},Zi.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Xr=function(D,Y,q,ne,pe){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=void 0===pe||pe,this._minZoom=D||0,this._maxZoom=Y||22,this._minPitch=q??0,this._maxPitch=ne??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new l.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new Zi,this._posMatrixCache={},this._alignedPosMatrixCache={}},Kr={minZoom:{configurable:!0},maxZoom:{configurable:!0},minPitch:{configurable:!0},maxPitch:{configurable:!0},renderWorldCopies:{configurable:!0},worldSize:{configurable:!0},centerOffset:{configurable:!0},size:{configurable:!0},bearing:{configurable:!0},pitch:{configurable:!0},fov:{configurable:!0},zoom:{configurable:!0},center:{configurable:!0},padding:{configurable:!0},centerPoint:{configurable:!0},unmodified:{configurable:!0},point:{configurable:!0}};Xr.prototype.clone=function(){var D=new Xr(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return D.tileSize=this.tileSize,D.latRange=this.latRange,D.width=this.width,D.height=this.height,D._center=this._center,D.zoom=this.zoom,D.angle=this.angle,D._fov=this._fov,D._pitch=this._pitch,D._unmodified=this._unmodified,D._edgeInsets=this._edgeInsets.clone(),D._calcMatrices(),D},Kr.minZoom.get=function(){return this._minZoom},Kr.minZoom.set=function(D){this._minZoom!==D&&(this._minZoom=D,this.zoom=Math.max(this.zoom,D))},Kr.maxZoom.get=function(){return this._maxZoom},Kr.maxZoom.set=function(D){this._maxZoom!==D&&(this._maxZoom=D,this.zoom=Math.min(this.zoom,D))},Kr.minPitch.get=function(){return this._minPitch},Kr.minPitch.set=function(D){this._minPitch!==D&&(this._minPitch=D,this.pitch=Math.max(this.pitch,D))},Kr.maxPitch.get=function(){return this._maxPitch},Kr.maxPitch.set=function(D){this._maxPitch!==D&&(this._maxPitch=D,this.pitch=Math.min(this.pitch,D))},Kr.renderWorldCopies.get=function(){return this._renderWorldCopies},Kr.renderWorldCopies.set=function(D){void 0===D?D=!0:null===D&&(D=!1),this._renderWorldCopies=D},Kr.worldSize.get=function(){return this.tileSize*this.scale},Kr.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Kr.size.get=function(){return new l.Point(this.width,this.height)},Kr.bearing.get=function(){return-this.angle/Math.PI*180},Kr.bearing.set=function(D){var Y=-l.wrap(D,-180,180)*Math.PI/180;this.angle!==Y&&(this._unmodified=!1,this.angle=Y,this._calcMatrices(),this.rotationMatrix=l.create$2(),l.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Kr.pitch.get=function(){return this._pitch/Math.PI*180},Kr.pitch.set=function(D){var Y=l.clamp(D,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==Y&&(this._unmodified=!1,this._pitch=Y,this._calcMatrices())},Kr.fov.get=function(){return this._fov/Math.PI*180},Kr.fov.set=function(D){D=Math.max(.01,Math.min(60,D)),this._fov!==D&&(this._unmodified=!1,this._fov=D/180*Math.PI,this._calcMatrices())},Kr.zoom.get=function(){return this._zoom},Kr.zoom.set=function(D){var Y=Math.min(Math.max(D,this.minZoom),this.maxZoom);this._zoom!==Y&&(this._unmodified=!1,this._zoom=Y,this.scale=this.zoomScale(Y),this.tileZoom=Math.floor(Y),this.zoomFraction=Y-this.tileZoom,this._constrain(),this._calcMatrices())},Kr.center.get=function(){return this._center},Kr.center.set=function(D){D.lat===this._center.lat&&D.lng===this._center.lng||(this._unmodified=!1,this._center=D,this._constrain(),this._calcMatrices())},Kr.padding.get=function(){return this._edgeInsets.toJSON()},Kr.padding.set=function(D){this._edgeInsets.equals(D)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,D,1),this._calcMatrices())},Kr.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Xr.prototype.isPaddingEqual=function(D){return this._edgeInsets.equals(D)},Xr.prototype.interpolatePadding=function(D,Y,q){this._unmodified=!1,this._edgeInsets.interpolate(D,Y,q),this._constrain(),this._calcMatrices()},Xr.prototype.coveringZoomLevel=function(D){var Y=(D.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/D.tileSize));return Math.max(0,Y)},Xr.prototype.getVisibleUnwrappedCoordinates=function(D){var Y=[new l.UnwrappedTileID(0,D)];if(this._renderWorldCopies)for(var q=this.pointCoordinate(new l.Point(0,0)),ne=this.pointCoordinate(new l.Point(this.width,0)),pe=this.pointCoordinate(new l.Point(this.width,this.height)),Le=this.pointCoordinate(new l.Point(0,this.height)),Ne=Math.floor(Math.min(q.x,ne.x,pe.x,Le.x)),qe=Math.floor(Math.max(q.x,ne.x,pe.x,Le.x)),et=Ne-1;et<=qe+1;et++)0!==et&&Y.push(new l.UnwrappedTileID(et,D));return Y},Xr.prototype.coveringTiles=function(D){var Y=this.coveringZoomLevel(D),q=Y;if(void 0!==D.minzoom&&Y<D.minzoom)return[];void 0!==D.maxzoom&&Y>D.maxzoom&&(Y=D.maxzoom);var ne=l.MercatorCoordinate.fromLngLat(this.center),pe=Math.pow(2,Y),Le=[pe*ne.x,pe*ne.y,0],Ne=_o.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,Y),qe=D.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(qe=Y);var et=function(Xt){return{aabb:new wo([Xt*pe,0,0],[(Xt+1)*pe,pe,0]),zoom:0,x:0,y:0,wrap:Xt,fullyVisible:!1}},vt=[],xt=[],te=Y,ue=D.reparseOverscaled?q:Y;if(this._renderWorldCopies)for(var we=1;we<=3;we++)vt.push(et(-we)),vt.push(et(we));for(vt.push(et(0));vt.length>0;){var Oe=vt.pop(),De=Oe.x,Ue=Oe.y,Ze=Oe.fullyVisible;if(!Ze){var Je=Oe.aabb.intersects(Ne);if(0===Je)continue;Ze=2===Je}var it=Oe.aabb.distanceX(Le),ut=Oe.aabb.distanceY(Le),St=Math.max(Math.abs(it),Math.abs(ut));if(Oe.zoom===te||St>3+(1<<te-Oe.zoom)-2&&Oe.zoom>=qe)xt.push({tileID:new l.OverscaledTileID(Oe.zoom===te?ue:Oe.zoom,Oe.wrap,Oe.zoom,De,Ue),distanceSq:l.sqrLen([Le[0]-.5-De,Le[1]-.5-Ue])});else for(var Ft=0;Ft<4;Ft++){var Yt=(De<<1)+Ft%2,ln=(Ue<<1)+(Ft>>1);vt.push({aabb:Oe.aabb.quadrant(Ft),zoom:Oe.zoom+1,x:Yt,y:ln,wrap:Oe.wrap,fullyVisible:Ze})}}return xt.sort(function(Xt,en){return Xt.distanceSq-en.distanceSq}).map(function(Xt){return Xt.tileID})},Xr.prototype.resize=function(D,Y){this.width=D,this.height=Y,this.pixelsToGLUnits=[2/D,-2/Y],this._constrain(),this._calcMatrices()},Kr.unmodified.get=function(){return this._unmodified},Xr.prototype.zoomScale=function(D){return Math.pow(2,D)},Xr.prototype.scaleZoom=function(D){return Math.log(D)/Math.LN2},Xr.prototype.project=function(D){var Y=l.clamp(D.lat,-this.maxValidLatitude,this.maxValidLatitude);return new l.Point(l.mercatorXfromLng(D.lng)*this.worldSize,l.mercatorYfromLat(Y)*this.worldSize)},Xr.prototype.unproject=function(D){return new l.MercatorCoordinate(D.x/this.worldSize,D.y/this.worldSize).toLngLat()},Kr.point.get=function(){return this.project(this.center)},Xr.prototype.setLocationAtPoint=function(D,Y){var q=this.pointCoordinate(Y),ne=this.pointCoordinate(this.centerPoint),pe=this.locationCoordinate(D),Le=new l.MercatorCoordinate(pe.x-(q.x-ne.x),pe.y-(q.y-ne.y));this.center=this.coordinateLocation(Le),this._renderWorldCopies&&(this.center=this.center.wrap())},Xr.prototype.locationPoint=function(D){return this.coordinatePoint(this.locationCoordinate(D))},Xr.prototype.pointLocation=function(D){return this.coordinateLocation(this.pointCoordinate(D))},Xr.prototype.locationCoordinate=function(D){return l.MercatorCoordinate.fromLngLat(D)},Xr.prototype.coordinateLocation=function(D){return D.toLngLat()},Xr.prototype.pointCoordinate=function(D){var Y=[D.x,D.y,0,1],q=[D.x,D.y,1,1];l.transformMat4(Y,Y,this.pixelMatrixInverse),l.transformMat4(q,q,this.pixelMatrixInverse);var ne=Y[3],pe=q[3],qe=Y[1]/ne,et=q[1]/pe,vt=Y[2]/ne,xt=q[2]/pe,te=vt===xt?0:(0-vt)/(xt-vt);return new l.MercatorCoordinate(l.number(Y[0]/ne,q[0]/pe,te)/this.worldSize,l.number(qe,et,te)/this.worldSize)},Xr.prototype.coordinatePoint=function(D){var Y=[D.x*this.worldSize,D.y*this.worldSize,0,1];return l.transformMat4(Y,Y,this.pixelMatrix),new l.Point(Y[0]/Y[3],Y[1]/Y[3])},Xr.prototype.getBounds=function(){return(new l.LngLatBounds).extend(this.pointLocation(new l.Point(0,0))).extend(this.pointLocation(new l.Point(this.width,0))).extend(this.pointLocation(new l.Point(this.width,this.height))).extend(this.pointLocation(new l.Point(0,this.height)))},Xr.prototype.getMaxBounds=function(){return this.latRange&&2===this.latRange.length&&this.lngRange&&2===this.lngRange.length?new l.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]]):null},Xr.prototype.setMaxBounds=function(D){D?(this.lngRange=[D.getWest(),D.getEast()],this.latRange=[D.getSouth(),D.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Xr.prototype.calculatePosMatrix=function(D,Y){void 0===Y&&(Y=!1);var q=D.key,ne=Y?this._alignedPosMatrixCache:this._posMatrixCache;if(ne[q])return ne[q];var pe=D.canonical,Le=this.worldSize/this.zoomScale(pe.z),Ne=pe.x+Math.pow(2,pe.z)*D.wrap,qe=l.identity(new Float64Array(16));return l.translate(qe,qe,[Ne*Le,pe.y*Le,0]),l.scale(qe,qe,[Le/l.EXTENT,Le/l.EXTENT,1]),l.multiply(qe,Y?this.alignedProjMatrix:this.projMatrix,qe),ne[q]=new Float32Array(qe),ne[q]},Xr.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Xr.prototype._constrain=function(){if(this.center&&this.width&&this.height&&!this._constraining){this._constraining=!0;var D,Y,q,ne,pe=-90,Le=90,Ne=-180,qe=180,et=this.size,vt=this._unmodified;if(this.latRange){var xt=this.latRange;pe=l.mercatorYfromLat(xt[1])*this.worldSize,D=(Le=l.mercatorYfromLat(xt[0])*this.worldSize)-pe<et.y?et.y/(Le-pe):0}if(this.lngRange){var te=this.lngRange;Ne=l.mercatorXfromLng(te[0])*this.worldSize,Y=(qe=l.mercatorXfromLng(te[1])*this.worldSize)-Ne<et.x?et.x/(qe-Ne):0}var ue=this.point,we=Math.max(Y||0,D||0);if(we)return this.center=this.unproject(new l.Point(Y?(qe+Ne)/2:ue.x,D?(Le+pe)/2:ue.y)),this.zoom+=this.scaleZoom(we),this._unmodified=vt,void(this._constraining=!1);if(this.latRange){var Oe=ue.y,De=et.y/2;Oe-De<pe&&(ne=pe+De),Oe+De>Le&&(ne=Le-De)}if(this.lngRange){var Ue=ue.x,Ze=et.x/2;Ue-Ze<Ne&&(q=Ne+Ze),Ue+Ze>qe&&(q=qe-Ze)}void 0===q&&void 0===ne||(this.center=this.unproject(new l.Point(void 0!==q?q:ue.x,void 0!==ne?ne:ue.y))),this._unmodified=vt,this._constraining=!1}},Xr.prototype._calcMatrices=function(){if(this.height){var Y=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(this._fov/2)*this.height;var q=Math.PI/2+this._pitch,ne=this._fov*(.5+Y.y/this.height),pe=Math.sin(ne)*this.cameraToCenterDistance/Math.sin(l.clamp(Math.PI-q-ne,.01,Math.PI-.01)),Le=this.point,Ne=Le.x,qe=Le.y,et=1.01*(Math.cos(Math.PI/2-this._pitch)*pe+this.cameraToCenterDistance),vt=this.height/50,xt=new Float64Array(16);l.perspective(xt,this._fov,this.width/this.height,vt,et),xt[8]=2*-Y.x/this.width,xt[9]=2*Y.y/this.height,l.scale(xt,xt,[1,-1,1]),l.translate(xt,xt,[0,0,-this.cameraToCenterDistance]),l.rotateX(xt,xt,this._pitch),l.rotateZ(xt,xt,this.angle),l.translate(xt,xt,[-Ne,-qe,0]),this.mercatorMatrix=l.scale([],xt,[this.worldSize,this.worldSize,this.worldSize]),l.scale(xt,xt,[1,1,l.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=xt,this.invProjMatrix=l.invert([],this.projMatrix);var te=this.width%2/2,ue=this.height%2/2,we=Math.cos(this.angle),Oe=Math.sin(this.angle),De=Ne-Math.round(Ne)+we*te+Oe*ue,Ue=qe-Math.round(qe)+we*ue+Oe*te,Ze=new Float64Array(xt);if(l.translate(Ze,Ze,[De>.5?De-1:De,Ue>.5?Ue-1:Ue,0]),this.alignedProjMatrix=Ze,xt=l.create(),l.scale(xt,xt,[this.width/2,-this.height/2,1]),l.translate(xt,xt,[1,-1,0]),this.labelPlaneMatrix=xt,xt=l.create(),l.scale(xt,xt,[1,-1,1]),l.translate(xt,xt,[-1,-1,0]),l.scale(xt,xt,[2/this.width,2/this.height,1]),this.glCoordMatrix=xt,this.pixelMatrix=l.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),!(xt=l.invert(new Float64Array(16),this.pixelMatrix)))throw new Error("failed to invert matrix");this.pixelMatrixInverse=xt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Xr.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var D=this.pointCoordinate(new l.Point(0,0)),Y=[D.x*this.worldSize,D.y*this.worldSize,0,1];return l.transformMat4(Y,Y,this.pixelMatrix)[3]/this.cameraToCenterDistance},Xr.prototype.getCameraPoint=function(){var Y=Math.tan(this._pitch)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new l.Point(0,Y))},Xr.prototype.getCameraQueryGeometry=function(D){var Y=this.getCameraPoint();if(1===D.length)return[D[0],Y];for(var q=Y.x,ne=Y.y,pe=Y.x,Le=Y.y,Ne=0,qe=D;Ne<qe.length;Ne+=1){var et=qe[Ne];q=Math.min(q,et.x),ne=Math.min(ne,et.y),pe=Math.max(pe,et.x),Le=Math.max(Le,et.y)}return[new l.Point(q,ne),new l.Point(pe,ne),new l.Point(pe,Le),new l.Point(q,Le),new l.Point(q,ne)]},Object.defineProperties(Xr.prototype,Kr);var so=function(D){var Y,ne,pe,Le;this._hashName=D&&encodeURIComponent(D),l.bindAll(["_getCurrentHash","_onHashChange","_updateHash"],this),this._updateHash=(Y=this._updateHashUnthrottled.bind(this),ne=!1,pe=null,Le=function(){pe=null,ne&&(Y(),pe=setTimeout(Le,300),ne=!1)},function(){return ne=!0,pe||Le(),pe})};so.prototype.addTo=function(D){return this._map=D,l.window.addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this},so.prototype.remove=function(){return l.window.removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),delete this._map,this},so.prototype.getHashString=function(D){var Y=this._map.getCenter(),q=Math.round(100*this._map.getZoom())/100,ne=Math.ceil((q*Math.LN2+Math.log(512/360/.5))/Math.LN10),pe=Math.pow(10,ne),Le=Math.round(Y.lng*pe)/pe,Ne=Math.round(Y.lat*pe)/pe,qe=this._map.getBearing(),et=this._map.getPitch(),vt="";if(vt+=D?"/"+Le+"/"+Ne+"/"+q:q+"/"+Ne+"/"+Le,(qe||et)&&(vt+="/"+Math.round(10*qe)/10),et&&(vt+="/"+Math.round(et)),this._hashName){var xt=this._hashName,te=!1,ue=l.window.location.hash.slice(1).split("&").map(function(we){var Oe=we.split("=")[0];return Oe===xt?(te=!0,Oe+"="+vt):we}).filter(function(we){return we});return te||ue.push(xt+"="+vt),"#"+ue.join("&")}return"#"+vt},so.prototype._getCurrentHash=function(){var D,Y=this,q=l.window.location.hash.replace("#","");return this._hashName?(q.split("&").map(function(ne){return ne.split("=")}).forEach(function(ne){ne[0]===Y._hashName&&(D=ne)}),(D&&D[1]||"").split("/")):q.split("/")},so.prototype._onHashChange=function(){var D=this._getCurrentHash();if(D.length>=3&&!D.some(function(q){return isNaN(q)})){var Y=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(D[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+D[2],+D[1]],zoom:+D[0],bearing:Y,pitch:+(D[4]||0)}),!0}return!1},so.prototype._updateHashUnthrottled=function(){var D=this.getHashString();try{l.window.history.replaceState(l.window.history.state,"",D)}catch{}};var Xa={linearity:.3,easing:l.bezier(0,0,.3,1)},Ls=l.extend({deceleration:2500,maxSpeed:1400},Xa),Js=l.extend({deceleration:20,maxSpeed:1400},Xa),Fo=l.extend({deceleration:1e3,maxSpeed:360},Xa),Ks=l.extend({deceleration:1e3,maxSpeed:90},Xa),Bo=function(D){this._map=D,this.clear()};function lo(D,Y){(!D.duration||D.duration<Y.duration)&&(D.duration=Y.duration,D.easing=Y.easing)}function No(D,Y,q){var ne=q.maxSpeed,pe=q.linearity,Le=q.deceleration,Ne=l.clamp(D*pe/(Y/1e3),-ne,ne),qe=Math.abs(Ne)/(Le*pe);return{easing:q.easing,duration:1e3*qe,amount:Ne*(qe/2)}}Bo.prototype.clear=function(){this._inertiaBuffer=[]},Bo.prototype.record=function(D){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:l.browser.now(),settings:D})},Bo.prototype._drainInertiaBuffer=function(){for(var D=this._inertiaBuffer,Y=l.browser.now();D.length>0&&Y-D[0].time>160;)D.shift()},Bo.prototype._onMoveEnd=function(D){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var Y={zoom:0,bearing:0,pitch:0,pan:new l.Point(0,0),pinchAround:void 0,around:void 0},q=0,ne=this._inertiaBuffer;q<ne.length;q+=1){var pe=ne[q].settings;Y.zoom+=pe.zoomDelta||0,Y.bearing+=pe.bearingDelta||0,Y.pitch+=pe.pitchDelta||0,pe.panDelta&&Y.pan._add(pe.panDelta),pe.around&&(Y.around=pe.around),pe.pinchAround&&(Y.pinchAround=pe.pinchAround)}var Le=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,Ne={};if(Y.pan.mag()){var qe=No(Y.pan.mag(),Le,l.extend({},Ls,D||{}));Ne.offset=Y.pan.mult(qe.amount/Y.pan.mag()),Ne.center=this._map.transform.center,lo(Ne,qe)}if(Y.zoom){var et=No(Y.zoom,Le,Js);Ne.zoom=this._map.transform.zoom+et.amount,lo(Ne,et)}if(Y.bearing){var vt=No(Y.bearing,Le,Fo);Ne.bearing=this._map.transform.bearing+l.clamp(vt.amount,-179,179),lo(Ne,vt)}if(Y.pitch){var xt=No(Y.pitch,Le,Ks);Ne.pitch=this._map.transform.pitch+xt.amount,lo(Ne,xt)}if(Ne.zoom||Ne.bearing){var te=void 0===Y.pinchAround?Y.around:Y.pinchAround;Ne.around=te?this._map.unproject(te):this._map.getCenter()}return this.clear(),l.extend(Ne,{noMoveStart:!0})}};var mi=function(D){function Y(ne,pe,Le,Ne){void 0===Ne&&(Ne={});var qe=b.mousePos(pe.getCanvasContainer(),Le),et=pe.unproject(qe);D.call(this,ne,l.extend({point:qe,lngLat:et,originalEvent:Le},Ne)),this._defaultPrevented=!1,this.target=pe}D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y;var q={defaultPrevented:{configurable:!0}};return Y.prototype.preventDefault=function(){this._defaultPrevented=!0},q.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(Y.prototype,q),Y}(l.Event),Ja=function(D){function Y(ne,pe,Le){var Ne="touchend"===ne?Le.changedTouches:Le.touches,qe=b.touchPos(pe.getCanvasContainer(),Ne),et=qe.map(function(te){return pe.unproject(te)}),vt=qe.reduce(function(te,ue,we,Oe){return te.add(ue.div(Oe.length))},new l.Point(0,0)),xt=pe.unproject(vt);D.call(this,ne,{points:qe,point:vt,lngLats:et,lngLat:xt,originalEvent:Le}),this._defaultPrevented=!1}D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y;var q={defaultPrevented:{configurable:!0}};return Y.prototype.preventDefault=function(){this._defaultPrevented=!0},q.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(Y.prototype,q),Y}(l.Event),jo=function(D){function Y(ne,pe,Le){D.call(this,ne,{originalEvent:Le}),this._defaultPrevented=!1}D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y;var q={defaultPrevented:{configurable:!0}};return Y.prototype.preventDefault=function(){this._defaultPrevented=!0},q.defaultPrevented.get=function(){return this._defaultPrevented},Object.defineProperties(Y.prototype,q),Y}(l.Event),Ii=function(D,Y){this._map=D,this._clickTolerance=Y.clickTolerance};Ii.prototype.reset=function(){delete this._mousedownPos},Ii.prototype.wheel=function(D){return this._firePreventable(new jo(D.type,this._map,D))},Ii.prototype.mousedown=function(D,Y){return this._mousedownPos=Y,this._firePreventable(new mi(D.type,this._map,D))},Ii.prototype.mouseup=function(D){this._map.fire(new mi(D.type,this._map,D))},Ii.prototype.click=function(D,Y){this._mousedownPos&&this._mousedownPos.dist(Y)>=this._clickTolerance||this._map.fire(new mi(D.type,this._map,D))},Ii.prototype.dblclick=function(D){return this._firePreventable(new mi(D.type,this._map,D))},Ii.prototype.mouseover=function(D){this._map.fire(new mi(D.type,this._map,D))},Ii.prototype.mouseout=function(D){this._map.fire(new mi(D.type,this._map,D))},Ii.prototype.touchstart=function(D){return this._firePreventable(new Ja(D.type,this._map,D))},Ii.prototype.touchmove=function(D){this._map.fire(new Ja(D.type,this._map,D))},Ii.prototype.touchend=function(D){this._map.fire(new Ja(D.type,this._map,D))},Ii.prototype.touchcancel=function(D){this._map.fire(new Ja(D.type,this._map,D))},Ii.prototype._firePreventable=function(D){if(this._map.fire(D),D.defaultPrevented)return{}},Ii.prototype.isEnabled=function(){return!0},Ii.prototype.isActive=function(){return!1},Ii.prototype.enable=function(){},Ii.prototype.disable=function(){};var Wi=function(D){this._map=D};Wi.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},Wi.prototype.mousemove=function(D){this._map.fire(new mi(D.type,this._map,D))},Wi.prototype.mousedown=function(){this._delayContextMenu=!0},Wi.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new mi("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},Wi.prototype.contextmenu=function(D){this._delayContextMenu?this._contextMenuEvent=D:this._map.fire(new mi(D.type,this._map,D)),this._map.listens("contextmenu")&&D.preventDefault()},Wi.prototype.isEnabled=function(){return!0},Wi.prototype.isActive=function(){return!1},Wi.prototype.enable=function(){},Wi.prototype.disable=function(){};var Yi=function(D,Y){this._map=D,this._el=D.getCanvasContainer(),this._container=D.getContainer(),this._clickTolerance=Y.clickTolerance||1};function qi(D,Y){for(var q={},ne=0;ne<D.length;ne++)q[D[ne].identifier]=Y[ne];return q}Yi.prototype.isEnabled=function(){return!!this._enabled},Yi.prototype.isActive=function(){return!!this._active},Yi.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Yi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Yi.prototype.mousedown=function(D,Y){this.isEnabled()&&D.shiftKey&&0===D.button&&(b.disableDrag(),this._startPos=this._lastPos=Y,this._active=!0)},Yi.prototype.mousemoveWindow=function(D,Y){if(this._active){var q=Y;if(!(this._lastPos.equals(q)||!this._box&&q.dist(this._startPos)<this._clickTolerance)){var ne=this._startPos;this._lastPos=q,this._box||(this._box=b.create("div","mapboxgl-boxzoom",this._container),this._container.classList.add("mapboxgl-crosshair"),this._fireEvent("boxzoomstart",D));var pe=Math.min(ne.x,q.x),Le=Math.max(ne.x,q.x),Ne=Math.min(ne.y,q.y),qe=Math.max(ne.y,q.y);b.setTransform(this._box,"translate("+pe+"px,"+Ne+"px)"),this._box.style.width=Le-pe+"px",this._box.style.height=qe-Ne+"px"}}},Yi.prototype.mouseupWindow=function(D,Y){var q=this;if(this._active&&0===D.button){var ne=this._startPos,pe=Y;if(this.reset(),b.suppressClick(),ne.x!==pe.x||ne.y!==pe.y)return this._map.fire(new l.Event("boxzoomend",{originalEvent:D})),{cameraAnimation:function(Le){return Le.fitScreenCoordinates(ne,pe,q._map.getBearing(),{linear:!0})}};this._fireEvent("boxzoomcancel",D)}},Yi.prototype.keydown=function(D){this._active&&27===D.keyCode&&(this.reset(),this._fireEvent("boxzoomcancel",D))},Yi.prototype.reset=function(){this._active=!1,this._container.classList.remove("mapboxgl-crosshair"),this._box&&(b.remove(this._box),this._box=null),b.enableDrag(),delete this._startPos,delete this._lastPos},Yi.prototype._fireEvent=function(D,Y){return this._map.fire(new l.Event(D,{originalEvent:Y}))};var sa=function(D){this.reset(),this.numTouches=D.numTouches};sa.prototype.reset=function(){delete this.centroid,delete this.startTime,delete this.touches,this.aborted=!1},sa.prototype.touchstart=function(D,Y,q){(this.centroid||q.length>this.numTouches)&&(this.aborted=!0),this.aborted||(void 0===this.startTime&&(this.startTime=D.timeStamp),q.length===this.numTouches&&(this.centroid=function(ne){for(var pe=new l.Point(0,0),Le=0,Ne=ne;Le<Ne.length;Le+=1)pe._add(Ne[Le]);return pe.div(ne.length)}(Y),this.touches=qi(q,Y)))},sa.prototype.touchmove=function(D,Y,q){if(!this.aborted&&this.centroid){var ne=qi(q,Y);for(var pe in this.touches){var Ne=ne[pe];(!Ne||Ne.dist(this.touches[pe])>30)&&(this.aborted=!0)}}},sa.prototype.touchend=function(D,Y,q){if((!this.centroid||D.timeStamp-this.startTime>500)&&(this.aborted=!0),0===q.length){var ne=!this.aborted&&this.centroid;if(this.reset(),ne)return ne}};var To=function(D){this.singleTap=new sa(D),this.numTaps=D.numTaps,this.reset()};To.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},To.prototype.touchstart=function(D,Y,q){this.singleTap.touchstart(D,Y,q)},To.prototype.touchmove=function(D,Y,q){this.singleTap.touchmove(D,Y,q)},To.prototype.touchend=function(D,Y,q){var ne=this.singleTap.touchend(D,Y,q);if(ne){var pe=D.timeStamp-this.lastTime<500,Le=!this.lastTap||this.lastTap.dist(ne)<30;if(pe&&Le||this.reset(),this.count++,this.lastTime=D.timeStamp,this.lastTap=ne,this.count===this.numTaps)return this.reset(),ne}};var Ia=function(){this._zoomIn=new To({numTouches:1,numTaps:2}),this._zoomOut=new To({numTouches:2,numTaps:1}),this.reset()};Ia.prototype.reset=function(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()},Ia.prototype.touchstart=function(D,Y,q){this._zoomIn.touchstart(D,Y,q),this._zoomOut.touchstart(D,Y,q)},Ia.prototype.touchmove=function(D,Y,q){this._zoomIn.touchmove(D,Y,q),this._zoomOut.touchmove(D,Y,q)},Ia.prototype.touchend=function(D,Y,q){var ne=this,pe=this._zoomIn.touchend(D,Y,q),Le=this._zoomOut.touchend(D,Y,q);return pe?(this._active=!0,D.preventDefault(),setTimeout(function(){return ne.reset()},0),{cameraAnimation:function(Ne){return Ne.easeTo({duration:300,zoom:Ne.getZoom()+1,around:Ne.unproject(pe)},{originalEvent:D})}}):Le?(this._active=!0,D.preventDefault(),setTimeout(function(){return ne.reset()},0),{cameraAnimation:function(Ne){return Ne.easeTo({duration:300,zoom:Ne.getZoom()-1,around:Ne.unproject(Le)},{originalEvent:D})}}):void 0},Ia.prototype.touchcancel=function(){this.reset()},Ia.prototype.enable=function(){this._enabled=!0},Ia.prototype.disable=function(){this._enabled=!1,this.reset()},Ia.prototype.isEnabled=function(){return this._enabled},Ia.prototype.isActive=function(){return this._active};var Di=function(D){this.reset(),this._clickTolerance=D.clickTolerance||1};Di.prototype.reset=function(){this._active=!1,this._moved=!1,delete this._lastPoint,delete this._eventButton},Di.prototype._correctButton=function(D,Y){return!1},Di.prototype._move=function(D,Y){return{}},Di.prototype.mousedown=function(D,Y){if(!this._lastPoint){var q=b.mouseButton(D);this._correctButton(D,q)&&(this._lastPoint=Y,this._eventButton=q)}},Di.prototype.mousemoveWindow=function(D,Y){var q=this._lastPoint;if(q&&(D.preventDefault(),this._moved||!(Y.dist(q)<this._clickTolerance)))return this._moved=!0,this._lastPoint=Y,this._move(q,Y)},Di.prototype.mouseupWindow=function(D){b.mouseButton(D)===this._eventButton&&(this._moved&&b.suppressClick(),this.reset())},Di.prototype.enable=function(){this._enabled=!0},Di.prototype.disable=function(){this._enabled=!1,this.reset()},Di.prototype.isEnabled=function(){return this._enabled},Di.prototype.isActive=function(){return this._active};var ya=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.mousedown=function(q,ne){D.prototype.mousedown.call(this,q,ne),this._lastPoint&&(this._active=!0)},Y.prototype._correctButton=function(q,ne){return 0===ne&&!q.ctrlKey},Y.prototype._move=function(q,ne){return{around:ne,panDelta:ne.sub(q)}},Y}(Di),Cs=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype._correctButton=function(q,ne){return 0===ne&&q.ctrlKey||2===ne},Y.prototype._move=function(q,ne){var pe=.8*(ne.x-q.x);if(pe)return this._active=!0,{bearingDelta:pe}},Y.prototype.contextmenu=function(q){q.preventDefault()},Y}(Di),Ps=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype._correctButton=function(q,ne){return 0===ne&&q.ctrlKey||2===ne},Y.prototype._move=function(q,ne){var pe=-.5*(ne.y-q.y);if(pe)return this._active=!0,{pitchDelta:pe}},Y.prototype.contextmenu=function(q){q.preventDefault()},Y}(Di),ia=function(D){this._minTouches=1,this._clickTolerance=D.clickTolerance||1,this.reset()};ia.prototype.reset=function(){this._active=!1,this._touches={},this._sum=new l.Point(0,0)},ia.prototype.touchstart=function(D,Y,q){return this._calculateTransform(D,Y,q)},ia.prototype.touchmove=function(D,Y,q){if(this._active)return D.preventDefault(),this._calculateTransform(D,Y,q)},ia.prototype.touchend=function(D,Y,q){this._calculateTransform(D,Y,q),this._active&&q.length<this._minTouches&&this.reset()},ia.prototype.touchcancel=function(){this.reset()},ia.prototype._calculateTransform=function(D,Y,q){q.length>0&&(this._active=!0);var ne=qi(q,Y),pe=new l.Point(0,0),Le=new l.Point(0,0),Ne=0;for(var qe in ne){var et=ne[qe],vt=this._touches[qe];vt&&(pe._add(et),Le._add(et.sub(vt)),Ne++,ne[qe]=et)}if(this._touches=ne,!(Ne<this._minTouches)&&Le.mag()){var xt=Le.div(Ne);if(this._sum._add(xt),!(this._sum.mag()<this._clickTolerance))return{around:pe.div(Ne),panDelta:xt}}},ia.prototype.enable=function(){this._enabled=!0},ia.prototype.disable=function(){this._enabled=!1,this.reset()},ia.prototype.isEnabled=function(){return this._enabled},ia.prototype.isActive=function(){return this._active};var _r=function(){this.reset()};function Uo(D,Y,q){for(var ne=0;ne<D.length;ne++)if(D[ne].identifier===q)return Y[ne]}function la(D,Y){return Math.log(D/Y)/Math.LN2}_r.prototype.reset=function(){this._active=!1,delete this._firstTwoTouches},_r.prototype._start=function(D){},_r.prototype._move=function(D,Y,q){return{}},_r.prototype.touchstart=function(D,Y,q){this._firstTwoTouches||q.length<2||(this._firstTwoTouches=[q[0].identifier,q[1].identifier],this._start([Y[0],Y[1]]))},_r.prototype.touchmove=function(D,Y,q){if(this._firstTwoTouches){D.preventDefault();var ne=this._firstTwoTouches,Le=ne[1],Ne=Uo(q,Y,ne[0]),qe=Uo(q,Y,Le);if(Ne&&qe){var et=this._aroundCenter?null:Ne.add(qe).div(2);return this._move([Ne,qe],et,D)}}},_r.prototype.touchend=function(D,Y,q){if(this._firstTwoTouches){var ne=this._firstTwoTouches,Le=ne[1],Ne=Uo(q,Y,ne[0]),qe=Uo(q,Y,Le);Ne&&qe||(this._active&&b.suppressClick(),this.reset())}},_r.prototype.touchcancel=function(){this.reset()},_r.prototype.enable=function(D){this._enabled=!0,this._aroundCenter=!!D&&"center"===D.around},_r.prototype.disable=function(){this._enabled=!1,this.reset()},_r.prototype.isEnabled=function(){return this._enabled},_r.prototype.isActive=function(){return this._active};var Os=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.reset=function(){D.prototype.reset.call(this),delete this._distance,delete this._startDistance},Y.prototype._start=function(q){this._startDistance=this._distance=q[0].dist(q[1])},Y.prototype._move=function(q,ne){var pe=this._distance;if(this._distance=q[0].dist(q[1]),this._active||!(Math.abs(la(this._distance,this._startDistance))<.1))return this._active=!0,{zoomDelta:la(this._distance,pe),pinchAround:ne}},Y}(_r);function Qo(D,Y){return 180*D.angleWith(Y)/Math.PI}var es=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.reset=function(){D.prototype.reset.call(this),delete this._minDiameter,delete this._startVector,delete this._vector},Y.prototype._start=function(q){this._startVector=this._vector=q[0].sub(q[1]),this._minDiameter=q[0].dist(q[1])},Y.prototype._move=function(q,ne){var pe=this._vector;if(this._vector=q[0].sub(q[1]),this._active||!this._isBelowThreshold(this._vector))return this._active=!0,{bearingDelta:Qo(this._vector,pe),pinchAround:ne}},Y.prototype._isBelowThreshold=function(q){this._minDiameter=Math.min(this._minDiameter,q.mag());var ne=25/(Math.PI*this._minDiameter)*360,pe=Qo(q,this._startVector);return Math.abs(pe)<ne},Y}(_r);function ts(D){return Math.abs(D.y)>Math.abs(D.x)}var wr=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.reset=function(){D.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},Y.prototype._start=function(q){this._lastPoints=q,ts(q[0].sub(q[1]))&&(this._valid=!1)},Y.prototype._move=function(q,ne,pe){var Le=q[0].sub(this._lastPoints[0]),Ne=q[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Le,Ne,pe.timeStamp),this._valid)return this._lastPoints=q,this._active=!0,{pitchDelta:(Le.y+Ne.y)/2*-.5}},Y.prototype.gestureBeginsVertically=function(q,ne,pe){if(void 0!==this._valid)return this._valid;var Le=q.mag()>=2,Ne=ne.mag()>=2;if(Le||Ne){if(!Le||!Ne)return void 0===this._firstMove&&(this._firstMove=pe),pe-this._firstMove<100&&void 0;var qe=q.y>0==ne.y>0;return ts(q)&&ts(ne)&&qe}},Y}(_r),ns={panStep:100,bearingStep:15,pitchStep:10},Ra=function(){var D=ns;this._panStep=D.panStep,this._bearingStep=D.bearingStep,this._pitchStep=D.pitchStep};function Is(D){return D*(2-D)}Ra.prototype.reset=function(){this._active=!1},Ra.prototype.keydown=function(D){var Y=this;if(!(D.altKey||D.ctrlKey||D.metaKey)){var q=0,ne=0,pe=0,Le=0,Ne=0;switch(D.keyCode){case 61:case 107:case 171:case 187:q=1;break;case 189:case 109:case 173:q=-1;break;case 37:D.shiftKey?ne=-1:(D.preventDefault(),Le=-1);break;case 39:D.shiftKey?ne=1:(D.preventDefault(),Le=1);break;case 38:D.shiftKey?pe=1:(D.preventDefault(),Ne=-1);break;case 40:D.shiftKey?pe=-1:(D.preventDefault(),Ne=1);break;default:return}return{cameraAnimation:function(qe){var et=qe.getZoom();qe.easeTo({duration:300,easeId:"keyboardHandler",easing:Is,zoom:q?Math.round(et)+q*(D.shiftKey?2:1):et,bearing:qe.getBearing()+ne*Y._bearingStep,pitch:qe.getPitch()+pe*Y._pitchStep,offset:[-Le*Y._panStep,-Ne*Y._panStep],center:qe.getCenter()},{originalEvent:D})}}}},Ra.prototype.enable=function(){this._enabled=!0},Ra.prototype.disable=function(){this._enabled=!1,this.reset()},Ra.prototype.isEnabled=function(){return this._enabled},Ra.prototype.isActive=function(){return this._active};var ys=4.000244140625,Xi=function(D,Y){this._map=D,this._el=D.getCanvasContainer(),this._handler=Y,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=.0022222222222222222,l.bindAll(["_onWheel","_onTimeout","_onScrollFrame","_onScrollFinished"],this)};Xi.prototype.setZoomRate=function(D){this._defaultZoomRate=D},Xi.prototype.setWheelZoomRate=function(D){this._wheelZoomRate=D},Xi.prototype.isEnabled=function(){return!!this._enabled},Xi.prototype.isActive=function(){return!!this._active||void 0!==this._finishTimeout},Xi.prototype.isZooming=function(){return!!this._zooming},Xi.prototype.enable=function(D){this.isEnabled()||(this._enabled=!0,this._aroundCenter=D&&"center"===D.around)},Xi.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Xi.prototype.wheel=function(D){if(this.isEnabled()){var Y=D.deltaMode===l.window.WheelEvent.DOM_DELTA_LINE?40*D.deltaY:D.deltaY,q=l.browser.now(),ne=q-(this._lastWheelEventTime||0);this._lastWheelEventTime=q,0!==Y&&Y%ys==0?this._type="wheel":0!==Y&&Math.abs(Y)<4?this._type="trackpad":ne>400?(this._type=null,this._lastValue=Y,this._timeout=setTimeout(this._onTimeout,40,D)):this._type||(this._type=Math.abs(ne*Y)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,Y+=this._lastValue)),D.shiftKey&&Y&&(Y/=4),this._type&&(this._lastWheelEvent=D,this._delta-=Y,this._active||this._start(D)),D.preventDefault()}},Xi.prototype._onTimeout=function(D){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(D)},Xi.prototype._start=function(D){if(this._delta){this._frameId&&(this._frameId=null),this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);var Y=b.mousePos(this._el,D);this._around=l.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(Y)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},Xi.prototype.renderFrame=function(){return this._onScrollFrame()},Xi.prototype._onScrollFrame=function(){var D=this;if(this._frameId&&(this._frameId=null,this.isActive())){var Y=this._map.transform;if(0!==this._delta){var q="wheel"===this._type&&Math.abs(this._delta)>ys?this._wheelZoomRate:this._defaultZoomRate,ne=2/(1+Math.exp(-Math.abs(this._delta*q)));this._delta<0&&0!==ne&&(ne=1/ne);var pe="number"==typeof this._targetZoom?Y.zoomScale(this._targetZoom):Y.scale;this._targetZoom=Math.min(Y.maxZoom,Math.max(Y.minZoom,Y.scaleZoom(pe*ne))),"wheel"===this._type&&(this._startZoom=Y.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Le,Ne="number"==typeof this._targetZoom?this._targetZoom:Y.zoom,qe=this._startZoom,et=this._easing,vt=!1;if("wheel"===this._type&&qe&&et){var xt=Math.min((l.browser.now()-this._lastWheelEventTime)/200,1),te=et(xt);Le=l.number(qe,Ne,te),xt<1?this._frameId||(this._frameId=!0):vt=!0}else Le=Ne,vt=!0;return this._active=!0,vt&&(this._active=!1,this._finishTimeout=setTimeout(function(){D._zooming=!1,D._handler._triggerRenderFrame(),delete D._targetZoom,delete D._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!vt,zoomDelta:Le-Y.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},Xi.prototype._smoothOutEasing=function(D){var Y=l.ease;if(this._prevEase){var q=this._prevEase,ne=(l.browser.now()-q.start)/q.duration,pe=q.easing(ne+.01)-q.easing(ne),Le=.27/Math.sqrt(pe*pe+1e-4)*.01,Ne=Math.sqrt(.0729-Le*Le);Y=l.bezier(Le,Ne,.25,1)}return this._prevEase={start:l.browser.now(),duration:D,easing:Y},Y},Xi.prototype.reset=function(){this._active=!1};var Vo=function(D,Y){this._clickZoom=D,this._tapZoom=Y};Vo.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},Vo.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},Vo.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},Vo.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var uo=function(){this.reset()};uo.prototype.reset=function(){this._active=!1},uo.prototype.dblclick=function(D,Y){return D.preventDefault(),{cameraAnimation:function(q){q.easeTo({duration:300,zoom:q.getZoom()+(D.shiftKey?-1:1),around:q.unproject(Y)},{originalEvent:D})}}},uo.prototype.enable=function(){this._enabled=!0},uo.prototype.disable=function(){this._enabled=!1,this.reset()},uo.prototype.isEnabled=function(){return this._enabled},uo.prototype.isActive=function(){return this._active};var xa=function(){this._tap=new To({numTouches:1,numTaps:1}),this.reset()};xa.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},xa.prototype.touchstart=function(D,Y,q){this._swipePoint||(this._tapTime&&D.timeStamp-this._tapTime>500&&this.reset(),this._tapTime?q.length>0&&(this._swipePoint=Y[0],this._swipeTouch=q[0].identifier):this._tap.touchstart(D,Y,q))},xa.prototype.touchmove=function(D,Y,q){if(this._tapTime){if(this._swipePoint){if(q[0].identifier!==this._swipeTouch)return;var ne=Y[0],pe=ne.y-this._swipePoint.y;return this._swipePoint=ne,D.preventDefault(),this._active=!0,{zoomDelta:pe/128}}}else this._tap.touchmove(D,Y,q)},xa.prototype.touchend=function(D,Y,q){this._tapTime?this._swipePoint&&0===q.length&&this.reset():this._tap.touchend(D,Y,q)&&(this._tapTime=D.timeStamp)},xa.prototype.touchcancel=function(){this.reset()},xa.prototype.enable=function(){this._enabled=!0},xa.prototype.disable=function(){this._enabled=!1,this.reset()},xa.prototype.isEnabled=function(){return this._enabled},xa.prototype.isActive=function(){return this._active};var ko=function(D,Y,q){this._el=D,this._mousePan=Y,this._touchPan=q};ko.prototype.enable=function(D){this._inertiaOptions=D||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},ko.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},ko.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},ko.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var Va=function(D,Y,q){this._pitchWithRotate=D.pitchWithRotate,this._mouseRotate=Y,this._mousePitch=q};Va.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},Va.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},Va.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},Va.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var za=function(D,Y,q,ne){this._el=D,this._touchZoom=Y,this._touchRotate=q,this._tapDragZoom=ne,this._rotationDisabled=!1,this._enabled=!0};za.prototype.enable=function(D){this._touchZoom.enable(D),this._rotationDisabled||this._touchRotate.enable(D),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},za.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},za.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},za.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},za.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},za.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Ho=function(D){return D.zoom||D.drag||D.pitch||D.rotate},Ji=function(D){function Y(){D.apply(this,arguments)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y}(l.Event);function Da(D){return D.panDelta&&D.panDelta.mag()||D.zoomDelta||D.bearingDelta||D.pitchDelta}var ri=function(D,Y){this._map=D,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new Bo(D),this._bearingSnap=Y.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(Y),l.bindAll(["handleEvent","handleWindowEvent"],this);var q=this._el;this._listeners=[[q,"touchstart",{passive:!1}],[q,"touchmove",{passive:!1}],[q,"touchend",void 0],[q,"touchcancel",void 0],[q,"mousedown",void 0],[q,"mousemove",void 0],[q,"mouseup",void 0],[l.window.document,"mousemove",{capture:!0}],[l.window.document,"mouseup",void 0],[q,"mouseover",void 0],[q,"mouseout",void 0],[q,"dblclick",void 0],[q,"click",void 0],[q,"keydown",{capture:!1}],[q,"keyup",void 0],[q,"wheel",{passive:!1}],[q,"contextmenu",void 0],[l.window,"blur",void 0]];for(var ne=0,pe=this._listeners;ne<pe.length;ne+=1){var Le=pe[ne],Ne=Le[0];b.addEventListener(Ne,Le[1],Ne===l.window.document?this.handleWindowEvent:this.handleEvent,Le[2])}};ri.prototype.destroy=function(){for(var D=0,Y=this._listeners;D<Y.length;D+=1){var q=Y[D],ne=q[0];b.removeEventListener(ne,q[1],ne===l.window.document?this.handleWindowEvent:this.handleEvent,q[2])}},ri.prototype._addDefaultHandlers=function(D){var Y=this._map,q=Y.getCanvasContainer();this._add("mapEvent",new Ii(Y,D));var ne=Y.boxZoom=new Yi(Y,D);this._add("boxZoom",ne);var pe=new Ia,Le=new uo;Y.doubleClickZoom=new Vo(Le,pe),this._add("tapZoom",pe),this._add("clickZoom",Le);var Ne=new xa;this._add("tapDragZoom",Ne);var qe=Y.touchPitch=new wr;this._add("touchPitch",qe);var et=new Cs(D),vt=new Ps(D);Y.dragRotate=new Va(D,et,vt),this._add("mouseRotate",et,["mousePitch"]),this._add("mousePitch",vt,["mouseRotate"]);var xt=new ya(D),te=new ia(D);Y.dragPan=new ko(q,xt,te),this._add("mousePan",xt),this._add("touchPan",te,["touchZoom","touchRotate"]);var ue=new es,we=new Os;Y.touchZoomRotate=new za(q,we,ue,Ne),this._add("touchRotate",ue,["touchPan","touchZoom"]),this._add("touchZoom",we,["touchPan","touchRotate"]);var Oe=Y.scrollZoom=new Xi(Y,this);this._add("scrollZoom",Oe,["mousePan"]);var De=Y.keyboard=new Ra;this._add("keyboard",De),this._add("blockableMapEvent",new Wi(Y));for(var Ue=0,Ze=["boxZoom","doubleClickZoom","tapDragZoom","touchPitch","dragRotate","dragPan","touchZoomRotate","scrollZoom","keyboard"];Ue<Ze.length;Ue+=1){var Je=Ze[Ue];D.interactive&&D[Je]&&Y[Je].enable(D[Je])}},ri.prototype._add=function(D,Y,q){this._handlers.push({handlerName:D,handler:Y,allowed:q}),this._handlersById[D]=Y},ri.prototype.stop=function(){if(!this._updatingCamera){for(var D=0,Y=this._handlers;D<Y.length;D+=1)Y[D].handler.reset();this._inertia.clear(),this._fireEvents({},{}),this._changes=[]}},ri.prototype.isActive=function(){for(var D=0,Y=this._handlers;D<Y.length;D+=1)if(Y[D].handler.isActive())return!0;return!1},ri.prototype.isZooming=function(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()},ri.prototype.isRotating=function(){return!!this._eventsInProgress.rotate},ri.prototype.isMoving=function(){return!!Ho(this._eventsInProgress)||this.isZooming()},ri.prototype._blockedByActive=function(D,Y,q){for(var ne in D)if(ne!==q&&(!Y||Y.indexOf(ne)<0))return!0;return!1},ri.prototype.handleWindowEvent=function(D){this.handleEvent(D,D.type+"Window")},ri.prototype._getMapTouches=function(D){for(var Y=[],q=0,ne=D;q<ne.length;q+=1){var pe=ne[q];this._el.contains(pe.target)&&Y.push(pe)}return Y},ri.prototype.handleEvent=function(D,Y){if("blur"!==D.type){this._updatingCamera=!0;for(var q="renderFrame"===D.type?void 0:D,ne={needsRenderFrame:!1},pe={},Le={},Ne=D.touches?this._getMapTouches(D.touches):void 0,qe=Ne?b.touchPos(this._el,Ne):b.mousePos(this._el,D),et=0,vt=this._handlers;et<vt.length;et+=1){var xt=vt[et],te=xt.handlerName,ue=xt.handler,we=xt.allowed;if(ue.isEnabled()){var Oe=void 0;this._blockedByActive(Le,we,te)?ue.reset():ue[Y||D.type]&&(Oe=ue[Y||D.type](D,qe,Ne),this.mergeHandlerResult(ne,pe,Oe,te,q),Oe&&Oe.needsRenderFrame&&this._triggerRenderFrame()),(Oe||ue.isActive())&&(Le[te]=ue)}}var De={};for(var Ue in this._previousActiveHandlers)Le[Ue]||(De[Ue]=q);this._previousActiveHandlers=Le,(Object.keys(De).length||Da(ne))&&(this._changes.push([ne,pe,De]),this._triggerRenderFrame()),(Object.keys(Le).length||Da(ne))&&this._map._stop(!0),this._updatingCamera=!1;var Ze=ne.cameraAnimation;Ze&&(this._inertia.clear(),this._fireEvents({},{}),this._changes=[],Ze(this._map))}else this.stop()},ri.prototype.mergeHandlerResult=function(D,Y,q,ne,pe){if(q){l.extend(D,q);var Le={handlerName:ne,originalEvent:q.originalEvent||pe};void 0!==q.zoomDelta&&(Y.zoom=Le),void 0!==q.panDelta&&(Y.drag=Le),void 0!==q.pitchDelta&&(Y.pitch=Le),void 0!==q.bearingDelta&&(Y.rotate=Le)}},ri.prototype._applyChanges=function(){for(var D={},Y={},q={},ne=0,pe=this._changes;ne<pe.length;ne+=1){var Le=pe[ne],Ne=Le[0],qe=Le[1],et=Le[2];Ne.panDelta&&(D.panDelta=(D.panDelta||new l.Point(0,0))._add(Ne.panDelta)),Ne.zoomDelta&&(D.zoomDelta=(D.zoomDelta||0)+Ne.zoomDelta),Ne.bearingDelta&&(D.bearingDelta=(D.bearingDelta||0)+Ne.bearingDelta),Ne.pitchDelta&&(D.pitchDelta=(D.pitchDelta||0)+Ne.pitchDelta),void 0!==Ne.around&&(D.around=Ne.around),void 0!==Ne.pinchAround&&(D.pinchAround=Ne.pinchAround),Ne.noInertia&&(D.noInertia=Ne.noInertia),l.extend(Y,qe),l.extend(q,et)}this._updateMapTransform(D,Y,q),this._changes=[]},ri.prototype._updateMapTransform=function(D,Y,q){var ne=this._map,pe=ne.transform;if(!Da(D))return this._fireEvents(Y,q);var Le=D.panDelta,Ne=D.zoomDelta,qe=D.bearingDelta,et=D.pitchDelta,vt=D.around,xt=D.pinchAround;void 0!==xt&&(vt=xt),ne._stop(!0),vt=vt||ne.transform.centerPoint;var te=pe.pointLocation(Le?vt.sub(Le):vt);qe&&(pe.bearing+=qe),et&&(pe.pitch+=et),Ne&&(pe.zoom+=Ne),pe.setLocationAtPoint(te,vt),this._map._update(),D.noInertia||this._inertia.record(D),this._fireEvents(Y,q)},ri.prototype._fireEvents=function(D,Y){var q=this,ne=Ho(this._eventsInProgress),pe=Ho(D),Le={};for(var Ne in D)this._eventsInProgress[Ne]||(Le[Ne+"start"]=D[Ne].originalEvent),this._eventsInProgress[Ne]=D[Ne];for(var et in!ne&&pe&&this._fireEvent("movestart",pe.originalEvent),Le)this._fireEvent(et,Le[et]);for(var vt in D.rotate&&(this._bearingChanged=!0),pe&&this._fireEvent("move",pe.originalEvent),D)this._fireEvent(vt,D[vt].originalEvent);var te,ue={};for(var we in this._eventsInProgress){var Oe=this._eventsInProgress[we],De=Oe.handlerName,Ue=Oe.originalEvent;this._handlersById[De].isActive()||(delete this._eventsInProgress[we],ue[we+"end"]=te=Y[De]||Ue)}for(var Ze in ue)this._fireEvent(Ze,ue[Ze]);var Je=Ho(this._eventsInProgress);if((ne||pe)&&!Je){this._updatingCamera=!0;var it=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),ut=function(St){return 0!==St&&-q._bearingSnap<St&&St<q._bearingSnap};it?(ut(it.bearing||this._map.getBearing())&&(it.bearing=0),this._map.easeTo(it,{originalEvent:te})):(this._map.fire(new l.Event("moveend",{originalEvent:te})),ut(this._map.getBearing())&&this._map.resetNorth()),this._bearingChanged=!1,this._updatingCamera=!1}},ri.prototype._fireEvent=function(D,Y){this._map.fire(new l.Event(D,Y?{originalEvent:Y}:{}))},ri.prototype._triggerRenderFrame=function(){var D=this;void 0===this._frameId&&(this._frameId=this._map._requestRenderFrame(function(Y){delete D._frameId,D.handleEvent(new Ji("renderFrame",{timeStamp:Y})),D._applyChanges()}))};var xs=function(D){function Y(q,ne){D.call(this),this._moving=!1,this._zooming=!1,this.transform=q,this._bearingSnap=ne.bearingSnap,l.bindAll(["_renderFrameCallback"],this)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.getCenter=function(){return new l.LngLat(this.transform.center.lng,this.transform.center.lat)},Y.prototype.setCenter=function(q,ne){return this.jumpTo({center:q},ne)},Y.prototype.panBy=function(q,ne,pe){return q=l.Point.convert(q).mult(-1),this.panTo(this.transform.center,l.extend({offset:q},ne),pe)},Y.prototype.panTo=function(q,ne,pe){return this.easeTo(l.extend({center:q},ne),pe)},Y.prototype.getZoom=function(){return this.transform.zoom},Y.prototype.setZoom=function(q,ne){return this.jumpTo({zoom:q},ne),this},Y.prototype.zoomTo=function(q,ne,pe){return this.easeTo(l.extend({zoom:q},ne),pe)},Y.prototype.zoomIn=function(q,ne){return this.zoomTo(this.getZoom()+1,q,ne),this},Y.prototype.zoomOut=function(q,ne){return this.zoomTo(this.getZoom()-1,q,ne),this},Y.prototype.getBearing=function(){return this.transform.bearing},Y.prototype.setBearing=function(q,ne){return this.jumpTo({bearing:q},ne),this},Y.prototype.getPadding=function(){return this.transform.padding},Y.prototype.setPadding=function(q,ne){return this.jumpTo({padding:q},ne),this},Y.prototype.rotateTo=function(q,ne,pe){return this.easeTo(l.extend({bearing:q},ne),pe)},Y.prototype.resetNorth=function(q,ne){return this.rotateTo(0,l.extend({duration:1e3},q),ne),this},Y.prototype.resetNorthPitch=function(q,ne){return this.easeTo(l.extend({bearing:0,pitch:0,duration:1e3},q),ne),this},Y.prototype.snapToNorth=function(q,ne){return Math.abs(this.getBearing())<this._bearingSnap?this.resetNorth(q,ne):this},Y.prototype.getPitch=function(){return this.transform.pitch},Y.prototype.setPitch=function(q,ne){return this.jumpTo({pitch:q},ne),this},Y.prototype.cameraForBounds=function(q,ne){return q=l.LngLatBounds.convert(q),this._cameraForBoxAndBearing(q.getNorthWest(),q.getSouthEast(),0,ne)},Y.prototype._cameraForBoxAndBearing=function(q,ne,pe,Le){var Ne={top:0,bottom:0,right:0,left:0};if("number"==typeof(Le=l.extend({padding:Ne,offset:[0,0],maxZoom:this.transform.maxZoom},Le)).padding){var qe=Le.padding;Le.padding={top:qe,bottom:qe,right:qe,left:qe}}Le.padding=l.extend(Ne,Le.padding);var et=this.transform,vt=et.padding,xt=et.project(l.LngLat.convert(q)),te=et.project(l.LngLat.convert(ne)),ue=xt.rotate(-pe*Math.PI/180),we=te.rotate(-pe*Math.PI/180),Oe=new l.Point(Math.max(ue.x,we.x),Math.max(ue.y,we.y)),De=new l.Point(Math.min(ue.x,we.x),Math.min(ue.y,we.y)),Ue=Oe.sub(De),Ze=(et.width-(vt.left+vt.right+Le.padding.left+Le.padding.right))/Ue.x,Je=(et.height-(vt.top+vt.bottom+Le.padding.top+Le.padding.bottom))/Ue.y;if(!(Je<0||Ze<0)){var it=Math.min(et.scaleZoom(et.scale*Math.min(Ze,Je)),Le.maxZoom),ut=l.Point.convert(Le.offset),Ft=new l.Point(ut.x+(Le.padding.left-Le.padding.right)/2,ut.y+(Le.padding.top-Le.padding.bottom)/2).mult(et.scale/et.zoomScale(it));return{center:et.unproject(xt.add(te).div(2).sub(Ft)),zoom:it,bearing:pe}}l.warnOnce("Map cannot fit within canvas with the given bounds, padding, and/or offset.")},Y.prototype.fitBounds=function(q,ne,pe){return this._fitInternal(this.cameraForBounds(q,ne),ne,pe)},Y.prototype.fitScreenCoordinates=function(q,ne,pe,Le,Ne){return this._fitInternal(this._cameraForBoxAndBearing(this.transform.pointLocation(l.Point.convert(q)),this.transform.pointLocation(l.Point.convert(ne)),pe,Le),Le,Ne)},Y.prototype._fitInternal=function(q,ne,pe){return q?(delete(ne=l.extend(q,ne)).padding,ne.linear?this.easeTo(ne,pe):this.flyTo(ne,pe)):this},Y.prototype.jumpTo=function(q,ne){this.stop();var pe=this.transform,Le=!1,Ne=!1,qe=!1;return"zoom"in q&&pe.zoom!==+q.zoom&&(Le=!0,pe.zoom=+q.zoom),void 0!==q.center&&(pe.center=l.LngLat.convert(q.center)),"bearing"in q&&pe.bearing!==+q.bearing&&(Ne=!0,pe.bearing=+q.bearing),"pitch"in q&&pe.pitch!==+q.pitch&&(qe=!0,pe.pitch=+q.pitch),null==q.padding||pe.isPaddingEqual(q.padding)||(pe.padding=q.padding),this.fire(new l.Event("movestart",ne)).fire(new l.Event("move",ne)),Le&&this.fire(new l.Event("zoomstart",ne)).fire(new l.Event("zoom",ne)).fire(new l.Event("zoomend",ne)),Ne&&this.fire(new l.Event("rotatestart",ne)).fire(new l.Event("rotate",ne)).fire(new l.Event("rotateend",ne)),qe&&this.fire(new l.Event("pitchstart",ne)).fire(new l.Event("pitch",ne)).fire(new l.Event("pitchend",ne)),this.fire(new l.Event("moveend",ne))},Y.prototype.easeTo=function(q,ne){var pe=this;this._stop(!1,q.easeId),(!1===(q=l.extend({offset:[0,0],duration:500,easing:l.ease},q)).animate||!q.essential&&l.browser.prefersReducedMotion)&&(q.duration=0);var Le=this.transform,Ne=this.getZoom(),qe=this.getBearing(),et=this.getPitch(),vt=this.getPadding(),xt="zoom"in q?+q.zoom:Ne,te="bearing"in q?this._normalizeBearing(q.bearing,qe):qe,ue="pitch"in q?+q.pitch:et,we="padding"in q?q.padding:Le.padding,Oe=l.Point.convert(q.offset),De=Le.centerPoint.add(Oe),Ue=Le.pointLocation(De),Ze=l.LngLat.convert(q.center||Ue);this._normalizeCenter(Ze);var Je,it,ut=Le.project(Ue),St=Le.project(Ze).sub(ut),Dt=Le.zoomScale(xt-Ne);q.around&&(Je=l.LngLat.convert(q.around),it=Le.locationPoint(Je));var Ft={moving:this._moving,zooming:this._zooming,rotating:this._rotating,pitching:this._pitching};return this._zooming=this._zooming||xt!==Ne,this._rotating=this._rotating||qe!==te,this._pitching=this._pitching||ue!==et,this._padding=!Le.isPaddingEqual(we),this._easeId=q.easeId,this._prepareEase(ne,q.noMoveStart,Ft),clearTimeout(this._easeEndTimeoutID),this._ease(function(Yt){if(pe._zooming&&(Le.zoom=l.number(Ne,xt,Yt)),pe._rotating&&(Le.bearing=l.number(qe,te,Yt)),pe._pitching&&(Le.pitch=l.number(et,ue,Yt)),pe._padding&&(Le.interpolatePadding(vt,we,Yt),De=Le.centerPoint.add(Oe)),Je)Le.setLocationAtPoint(Je,it);else{var ln=Le.zoomScale(Le.zoom-Ne),Xt=xt>Ne?Math.min(2,Dt):Math.max(.5,Dt),en=Math.pow(Xt,1-Yt),Jt=Le.unproject(ut.add(St.mult(Yt*en)).mult(ln));Le.setLocationAtPoint(Le.renderWorldCopies?Jt.wrap():Jt,De)}pe._fireMoveEvents(ne)},function(Yt){pe._afterEase(ne,Yt)},q),this},Y.prototype._prepareEase=function(q,ne,pe){void 0===pe&&(pe={}),this._moving=!0,ne||pe.moving||this.fire(new l.Event("movestart",q)),this._zooming&&!pe.zooming&&this.fire(new l.Event("zoomstart",q)),this._rotating&&!pe.rotating&&this.fire(new l.Event("rotatestart",q)),this._pitching&&!pe.pitching&&this.fire(new l.Event("pitchstart",q))},Y.prototype._fireMoveEvents=function(q){this.fire(new l.Event("move",q)),this._zooming&&this.fire(new l.Event("zoom",q)),this._rotating&&this.fire(new l.Event("rotate",q)),this._pitching&&this.fire(new l.Event("pitch",q))},Y.prototype._afterEase=function(q,ne){if(!this._easeId||!ne||this._easeId!==ne){delete this._easeId;var pe=this._zooming,Le=this._rotating,Ne=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,pe&&this.fire(new l.Event("zoomend",q)),Le&&this.fire(new l.Event("rotateend",q)),Ne&&this.fire(new l.Event("pitchend",q)),this.fire(new l.Event("moveend",q))}},Y.prototype.flyTo=function(q,ne){var pe=this;if(!q.essential&&l.browser.prefersReducedMotion){var Le=l.pick(q,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Le,ne)}this.stop(),q=l.extend({offset:[0,0],speed:1.2,curve:1.42,easing:l.ease},q);var Ne=this.transform,qe=this.getZoom(),et=this.getBearing(),vt=this.getPitch(),xt=this.getPadding(),te="zoom"in q?l.clamp(+q.zoom,Ne.minZoom,Ne.maxZoom):qe,ue="bearing"in q?this._normalizeBearing(q.bearing,et):et,we="pitch"in q?+q.pitch:vt,Oe="padding"in q?q.padding:Ne.padding,De=Ne.zoomScale(te-qe),Ue=l.Point.convert(q.offset),Ze=Ne.centerPoint.add(Ue),Je=Ne.pointLocation(Ze),it=l.LngLat.convert(q.center||Je);this._normalizeCenter(it);var ut=Ne.project(Je),St=Ne.project(it).sub(ut),Dt=q.curve,Ft=Math.max(Ne.width,Ne.height),Yt=Ft/De,ln=St.mag();if("minZoom"in q){var Xt=l.clamp(Math.min(q.minZoom,qe,te),Ne.minZoom,Ne.maxZoom),en=Ft/Ne.zoomScale(Xt-qe);Dt=Math.sqrt(en/ln*2)}var Jt=Dt*Dt;function bn(sr){var dr=(Yt*Yt-Ft*Ft+(sr?-1:1)*Jt*Jt*ln*ln)/(2*(sr?Yt:Ft)*Jt*ln);return Math.log(Math.sqrt(dr*dr+1)-dr)}function gn(sr){return(Math.exp(sr)-Math.exp(-sr))/2}function Qt(sr){return(Math.exp(sr)+Math.exp(-sr))/2}var Pn=bn(0),Dn=function(sr){return Qt(Pn)/Qt(Pn+Dt*sr)},Xn=function(sr){return Ft*((Qt(Pn)*(gn(dr=Pn+Dt*sr)/Qt(dr))-gn(Pn))/Jt)/ln;var dr},Jn=(bn(1)-Pn)/Dt;if(Math.abs(ln)<1e-6||!isFinite(Jn)){if(Math.abs(Ft-Yt)<1e-6)return this.easeTo(q,ne);var gr=Yt<Ft?-1:1;Jn=Math.abs(Math.log(Yt/Ft))/Dt,Xn=function(){return 0},Dn=function(sr){return Math.exp(gr*Dt*sr)}}return q.duration="duration"in q?+q.duration:1e3*Jn/("screenSpeed"in q?+q.screenSpeed/Dt:+q.speed),q.maxDuration&&q.duration>q.maxDuration&&(q.duration=0),this._zooming=!0,this._rotating=et!==ue,this._pitching=we!==vt,this._padding=!Ne.isPaddingEqual(Oe),this._prepareEase(ne,!1),this._ease(function(sr){var dr=sr*Jn,kr=1/Dn(dr);Ne.zoom=1===sr?te:qe+Ne.scaleZoom(kr),pe._rotating&&(Ne.bearing=l.number(et,ue,sr)),pe._pitching&&(Ne.pitch=l.number(vt,we,sr)),pe._padding&&(Ne.interpolatePadding(xt,Oe,sr),Ze=Ne.centerPoint.add(Ue));var Vr=1===sr?it:Ne.unproject(ut.add(St.mult(Xn(dr))).mult(kr));Ne.setLocationAtPoint(Ne.renderWorldCopies?Vr.wrap():Vr,Ze),pe._fireMoveEvents(ne)},function(){return pe._afterEase(ne)},q),this},Y.prototype.isEasing=function(){return!!this._easeFrameId},Y.prototype.stop=function(){return this._stop()},Y.prototype._stop=function(q,ne){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var pe=this._onEaseEnd;delete this._onEaseEnd,pe.call(this,ne)}if(!q){var Le=this.handlers;Le&&Le.stop()}return this},Y.prototype._ease=function(q,ne,pe){!1===pe.animate||0===pe.duration?(q(1),ne()):(this._easeStart=l.browser.now(),this._easeOptions=pe,this._onEaseFrame=q,this._onEaseEnd=ne,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},Y.prototype._renderFrameCallback=function(){var q=Math.min((l.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(q)),q<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},Y.prototype._normalizeBearing=function(q,ne){q=l.wrap(q,-180,180);var pe=Math.abs(q-ne);return Math.abs(q-360-ne)<pe&&(q-=360),Math.abs(q+360-ne)<pe&&(q+=360),q},Y.prototype._normalizeCenter=function(q){var ne=this.transform;if(ne.renderWorldCopies&&!ne.lngRange){var pe=q.lng-ne.center.lng;q.lng+=pe>180?-360:pe<-180?360:0}},Y}(l.Evented),Aa=function(D){void 0===D&&(D={}),this.options=D,l.bindAll(["_updateEditLink","_updateData","_updateCompact"],this)};Aa.prototype.getDefaultPosition=function(){return"bottom-right"},Aa.prototype.onAdd=function(D){var Y=this.options&&this.options.compact;return this._map=D,this._container=b.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._innerContainer=b.create("div","mapboxgl-ctrl-attrib-inner",this._container),Y&&this._container.classList.add("mapboxgl-compact"),this._updateAttributions(),this._updateEditLink(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("moveend",this._updateEditLink),void 0===Y&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Aa.prototype.onRemove=function(){b.remove(this._container),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("moveend",this._updateEditLink),this._map.off("resize",this._updateCompact),this._map=void 0,this._attribHTML=void 0},Aa.prototype._updateEditLink=function(){var D=this._editLink;D||(D=this._editLink=this._container.querySelector(".mapbox-improve-map"));var Y=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||l.config.ACCESS_TOKEN}];if(D){var q=Y.reduce(function(ne,pe,Le){return pe.value&&(ne+=pe.key+"="+pe.value+(Le<Y.length-1?"&":"")),ne},"?");D.href=l.config.FEEDBACK_URL+"/"+q+(this._map._hash?this._map._hash.getHashString(!0):""),D.rel="noopener nofollow"}},Aa.prototype._updateData=function(D){!D||"metadata"!==D.sourceDataType&&"style"!==D.dataType||(this._updateAttributions(),this._updateEditLink())},Aa.prototype._updateAttributions=function(){if(this._map.style){var D=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?D=D.concat(this.options.customAttribution.map(function(qe){return"string"!=typeof qe?"":qe})):"string"==typeof this.options.customAttribution&&D.push(this.options.customAttribution)),this._map.style.stylesheet){var Y=this._map.style.stylesheet;this.styleOwner=Y.owner,this.styleId=Y.id}var q=this._map.style.sourceCaches;for(var ne in q){var pe=q[ne];if(pe.used){var Le=pe.getSource();Le.attribution&&D.indexOf(Le.attribution)<0&&D.push(Le.attribution)}}D.sort(function(qe,et){return qe.length-et.length});var Ne=(D=D.filter(function(qe,et){for(var vt=et+1;vt<D.length;vt++)if(D[vt].indexOf(qe)>=0)return!1;return!0})).join(" | ");Ne!==this._attribHTML&&(this._attribHTML=Ne,D.length?(this._innerContainer.innerHTML=Ne,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Aa.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact")};var Fa=function(){l.bindAll(["_updateLogo"],this),l.bindAll(["_updateCompact"],this)};Fa.prototype.onAdd=function(D){this._map=D,this._container=b.create("div","mapboxgl-ctrl");var Y=b.create("a","mapboxgl-ctrl-logo");return Y.target="_blank",Y.rel="noopener nofollow",Y.href="https://www.mapbox.com/",Y.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),Y.setAttribute("rel","noopener nofollow"),this._container.appendChild(Y),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},Fa.prototype.onRemove=function(){b.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},Fa.prototype.getDefaultPosition=function(){return"bottom-left"},Fa.prototype._updateLogo=function(D){D&&"metadata"!==D.sourceDataType||(this._container.style.display=this._logoRequired()?"block":"none")},Fa.prototype._logoRequired=function(){if(this._map.style){var D=this._map.style.sourceCaches;for(var Y in D)if(D[Y].getSource().mapbox_logo)return!0;return!1}},Fa.prototype._updateCompact=function(){var D=this._container.children;if(D.length){var Y=D[0];this._map.getCanvasContainer().offsetWidth<250?Y.classList.add("mapboxgl-compact"):Y.classList.remove("mapboxgl-compact")}};var Ka=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};Ka.prototype.add=function(D){var Y=++this._id;return this._queue.push({callback:D,id:Y,cancelled:!1}),Y},Ka.prototype.remove=function(D){for(var Y=this._currentlyRunning,q=0,ne=Y?this._queue.concat(Y):this._queue;q<ne.length;q+=1){var pe=ne[q];if(pe.id===D)return void(pe.cancelled=!0)}},Ka.prototype.run=function(D){void 0===D&&(D=0);var Y=this._currentlyRunning=this._queue;this._queue=[];for(var q=0,ne=Y;q<ne.length;q+=1){var pe=ne[q];if(!pe.cancelled&&(pe.callback(D),this._cleared))break}this._cleared=!1,this._currentlyRunning=!1},Ka.prototype.clear=function(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]};var ua={"FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"Mapbox logo","NavigationControl.ResetBearing":"Reset bearing to north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm"},ni=l.window.HTMLImageElement,Vi=l.window.HTMLElement,Ha=l.window.ImageBitmap,$a={center:[0,0],zoom:0,bearing:0,pitch:0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,interactive:!0,scrollZoom:!0,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,bearingSnap:7,clickTolerance:3,pitchWithRotate:!0,hash:!1,attributionControl:!0,failIfMajorPerformanceCaveat:!1,preserveDrawingBuffer:!1,trackResize:!0,renderWorldCopies:!0,refreshExpiredTiles:!0,maxTileCacheSize:null,localIdeographFontFamily:"sans-serif",transformRequest:null,accessToken:null,fadeDuration:300,crossSourceCollisions:!0},Ao=function(D){function Y(ne){var pe=this;if(null!=(ne=l.extend({},$a,ne)).minZoom&&null!=ne.maxZoom&&ne.minZoom>ne.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(null!=ne.minPitch&&null!=ne.maxPitch&&ne.minPitch>ne.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(null!=ne.minPitch&&ne.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(null!=ne.maxPitch&&ne.maxPitch>60)throw new Error("maxPitch must be less than or equal to 60");var Le=new Xr(ne.minZoom,ne.maxZoom,ne.minPitch,ne.maxPitch,ne.renderWorldCopies);if(D.call(this,Le,ne),this._interactive=ne.interactive,this._maxTileCacheSize=ne.maxTileCacheSize,this._failIfMajorPerformanceCaveat=ne.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=ne.preserveDrawingBuffer,this._antialias=ne.antialias,this._trackResize=ne.trackResize,this._bearingSnap=ne.bearingSnap,this._refreshExpiredTiles=ne.refreshExpiredTiles,this._fadeDuration=ne.fadeDuration,this._crossSourceCollisions=ne.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=ne.collectResourceTiming,this._renderTaskQueue=new Ka,this._controls=[],this._mapId=l.uniqueId(),this._locale=l.extend({},ua,ne.locale),this._requestManager=new l.RequestManager(ne.transformRequest,ne.accessToken),"string"==typeof ne.container){if(this._container=l.window.document.getElementById(ne.container),!this._container)throw new Error("Container '"+ne.container+"' not found.")}else{if(!(ne.container instanceof Vi))throw new Error("Invalid type: 'container' must be a String or HTMLElement.");this._container=ne.container}if(ne.maxBounds&&this.setMaxBounds(ne.maxBounds),l.bindAll(["_onWindowOnline","_onWindowResize","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),void 0===this.painter)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return pe._update(!1)}),this.on("moveend",function(){return pe._update(!1)}),this.on("zoom",function(){return pe._update(!0)}),void 0!==l.window&&(l.window.addEventListener("online",this._onWindowOnline,!1),l.window.addEventListener("resize",this._onWindowResize,!1)),this.handlers=new ri(this,ne),this._hash=ne.hash&&new so("string"==typeof ne.hash&&ne.hash||void 0).addTo(this),this._hash&&this._hash._onHashChange()||(this.jumpTo({center:ne.center,zoom:ne.zoom,bearing:ne.bearing,pitch:ne.pitch}),ne.bounds&&(this.resize(),this.fitBounds(ne.bounds,l.extend({},ne.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=ne.localIdeographFontFamily,ne.style&&this.setStyle(ne.style,{localIdeographFontFamily:ne.localIdeographFontFamily}),ne.attributionControl&&this.addControl(new Aa({customAttribution:ne.customAttribution})),this.addControl(new Fa,ne.logoPosition),this.on("style.load",function(){pe.transform.unmodified&&pe.jumpTo(pe.style.stylesheet)}),this.on("data",function(qe){pe._update("style"===qe.dataType),pe.fire(new l.Event(qe.dataType+"data",qe))}),this.on("dataloading",function(qe){pe.fire(new l.Event(qe.dataType+"dataloading",qe))})}D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y;var q={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return Y.prototype._getMapId=function(){return this._mapId},Y.prototype.addControl=function(ne,pe){if(void 0===pe&&ne.getDefaultPosition&&(pe=ne.getDefaultPosition()),void 0===pe&&(pe="top-right"),!ne||!ne.onAdd)return this.fire(new l.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Le=ne.onAdd(this);this._controls.push(ne);var Ne=this._controlPositions[pe];return-1!==pe.indexOf("bottom")?Ne.insertBefore(Le,Ne.firstChild):Ne.appendChild(Le),this},Y.prototype.removeControl=function(ne){if(!ne||!ne.onRemove)return this.fire(new l.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var pe=this._controls.indexOf(ne);return pe>-1&&this._controls.splice(pe,1),ne.onRemove(this),this},Y.prototype.resize=function(ne){var pe=this._containerDimensions(),Le=pe[0],Ne=pe[1];this._resizeCanvas(Le,Ne),this.transform.resize(Le,Ne),this.painter.resize(Le,Ne);var qe=!this._moving;return qe&&(this.stop(),this.fire(new l.Event("movestart",ne)).fire(new l.Event("move",ne))),this.fire(new l.Event("resize",ne)),qe&&this.fire(new l.Event("moveend",ne)),this},Y.prototype.getBounds=function(){return this.transform.getBounds()},Y.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},Y.prototype.setMaxBounds=function(ne){return this.transform.setMaxBounds(l.LngLatBounds.convert(ne)),this._update()},Y.prototype.setMinZoom=function(ne){if((ne=ne??-2)>=-2&&ne<=this.transform.maxZoom)return this.transform.minZoom=ne,this._update(),this.getZoom()<ne&&this.setZoom(ne),this;throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")},Y.prototype.getMinZoom=function(){return this.transform.minZoom},Y.prototype.setMaxZoom=function(ne){if((ne=ne??22)>=this.transform.minZoom)return this.transform.maxZoom=ne,this._update(),this.getZoom()>ne&&this.setZoom(ne),this;throw new Error("maxZoom must be greater than the current minZoom")},Y.prototype.getMaxZoom=function(){return this.transform.maxZoom},Y.prototype.setMinPitch=function(ne){if((ne=ne??0)<0)throw new Error("minPitch must be greater than or equal to 0");if(ne>=0&&ne<=this.transform.maxPitch)return this.transform.minPitch=ne,this._update(),this.getPitch()<ne&&this.setPitch(ne),this;throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")},Y.prototype.getMinPitch=function(){return this.transform.minPitch},Y.prototype.setMaxPitch=function(ne){if((ne=ne??60)>60)throw new Error("maxPitch must be less than or equal to 60");if(ne>=this.transform.minPitch)return this.transform.maxPitch=ne,this._update(),this.getPitch()>ne&&this.setPitch(ne),this;throw new Error("maxPitch must be greater than the current minPitch")},Y.prototype.getMaxPitch=function(){return this.transform.maxPitch},Y.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},Y.prototype.setRenderWorldCopies=function(ne){return this.transform.renderWorldCopies=ne,this._update()},Y.prototype.project=function(ne){return this.transform.locationPoint(l.LngLat.convert(ne))},Y.prototype.unproject=function(ne){return this.transform.pointLocation(l.Point.convert(ne))},Y.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},Y.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},Y.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},Y.prototype._createDelegatedListener=function(ne,pe,Le){var Ne,qe=this;if("mouseenter"===ne||"mouseover"===ne){var et=!1;return{layer:pe,listener:Le,delegates:{mousemove:function(xt){var te=qe.getLayer(pe)?qe.queryRenderedFeatures(xt.point,{layers:[pe]}):[];te.length?et||(et=!0,Le.call(qe,new mi(ne,qe,xt.originalEvent,{features:te}))):et=!1},mouseout:function(){et=!1}}}}if("mouseleave"===ne||"mouseout"===ne){var vt=!1;return{layer:pe,listener:Le,delegates:{mousemove:function(xt){(qe.getLayer(pe)?qe.queryRenderedFeatures(xt.point,{layers:[pe]}):[]).length?vt=!0:vt&&(vt=!1,Le.call(qe,new mi(ne,qe,xt.originalEvent)))},mouseout:function(xt){vt&&(vt=!1,Le.call(qe,new mi(ne,qe,xt.originalEvent)))}}}}return{layer:pe,listener:Le,delegates:(Ne={},Ne[ne]=function(xt){var te=qe.getLayer(pe)?qe.queryRenderedFeatures(xt.point,{layers:[pe]}):[];te.length&&(xt.features=te,Le.call(qe,xt),delete xt.features)},Ne)}},Y.prototype.on=function(ne,pe,Le){if(void 0===Le)return D.prototype.on.call(this,ne,pe);var Ne=this._createDelegatedListener(ne,pe,Le);for(var qe in this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[ne]=this._delegatedListeners[ne]||[],this._delegatedListeners[ne].push(Ne),Ne.delegates)this.on(qe,Ne.delegates[qe]);return this},Y.prototype.once=function(ne,pe,Le){if(void 0===Le)return D.prototype.once.call(this,ne,pe);var Ne=this._createDelegatedListener(ne,pe,Le);for(var qe in Ne.delegates)this.once(qe,Ne.delegates[qe]);return this},Y.prototype.off=function(ne,pe,Le){var Ne=this;return void 0===Le?D.prototype.off.call(this,ne,pe):(this._delegatedListeners&&this._delegatedListeners[ne]&&function(qe){for(var et=qe[ne],vt=0;vt<et.length;vt++){var xt=et[vt];if(xt.layer===pe&&xt.listener===Le){for(var te in xt.delegates)Ne.off(te,xt.delegates[te]);return et.splice(vt,1),Ne}}}(this._delegatedListeners),this)},Y.prototype.queryRenderedFeatures=function(ne,pe){if(!this.style)return[];var Le;if(void 0!==pe||void 0===ne||ne instanceof l.Point||Array.isArray(ne)||(pe=ne,ne=void 0),pe=pe||{},(ne=ne||[[0,0],[this.transform.width,this.transform.height]])instanceof l.Point||"number"==typeof ne[0])Le=[l.Point.convert(ne)];else{var Ne=l.Point.convert(ne[0]),qe=l.Point.convert(ne[1]);Le=[Ne,new l.Point(qe.x,Ne.y),qe,new l.Point(Ne.x,qe.y),Ne]}return this.style.queryRenderedFeatures(Le,pe,this.transform)},Y.prototype.querySourceFeatures=function(ne,pe){return this.style.querySourceFeatures(ne,pe)},Y.prototype.setStyle=function(ne,pe){return!1!==(pe=l.extend({},{localIdeographFontFamily:this._localIdeographFontFamily},pe)).diff&&pe.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&ne?(this._diffStyle(ne,pe),this):(this._localIdeographFontFamily=pe.localIdeographFontFamily,this._updateStyle(ne,pe))},Y.prototype._getUIString=function(ne){var pe=this._locale[ne];if(null==pe)throw new Error("Missing UI string '"+ne+"'");return pe},Y.prototype._updateStyle=function(ne,pe){return this.style&&(this.style.setEventedParent(null),this.style._remove()),ne?(this.style=new ir(this,pe||{}),this.style.setEventedParent(this,{style:this.style}),"string"==typeof ne?this.style.loadURL(ne):this.style.loadJSON(ne),this):(delete this.style,this)},Y.prototype._lazyInitEmptyStyle=function(){this.style||(this.style=new ir(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())},Y.prototype._diffStyle=function(ne,pe){var Le=this;if("string"==typeof ne){var Ne=this._requestManager.normalizeStyleURL(ne),qe=this._requestManager.transformRequest(Ne,l.ResourceType.Style);l.getJSON(qe,function(et,vt){et?Le.fire(new l.ErrorEvent(et)):vt&&Le._updateDiff(vt,pe)})}else"object"==typeof ne&&this._updateDiff(ne,pe)},Y.prototype._updateDiff=function(ne,pe){try{this.style.setState(ne)&&this._update(!0)}catch(Le){l.warnOnce("Unable to perform style diff: "+(Le.message||Le.error||Le)+".  Rebuilding the style from scratch."),this._updateStyle(ne,pe)}},Y.prototype.getStyle=function(){if(this.style)return this.style.serialize()},Y.prototype.isStyleLoaded=function(){return this.style?this.style.loaded():l.warnOnce("There is no style added to the map.")},Y.prototype.addSource=function(ne,pe){return this._lazyInitEmptyStyle(),this.style.addSource(ne,pe),this._update(!0)},Y.prototype.isSourceLoaded=function(ne){var pe=this.style&&this.style.sourceCaches[ne];if(void 0!==pe)return pe.loaded();this.fire(new l.ErrorEvent(new Error("There is no source with ID '"+ne+"'")))},Y.prototype.areTilesLoaded=function(){var ne=this.style&&this.style.sourceCaches;for(var pe in ne){var Le=ne[pe]._tiles;for(var Ne in Le){var qe=Le[Ne];if("loaded"!==qe.state&&"errored"!==qe.state)return!1}}return!0},Y.prototype.addSourceType=function(ne,pe,Le){return this._lazyInitEmptyStyle(),this.style.addSourceType(ne,pe,Le)},Y.prototype.removeSource=function(ne){return this.style.removeSource(ne),this._update(!0)},Y.prototype.getSource=function(ne){return this.style.getSource(ne)},Y.prototype.addImage=function(ne,pe,Le){void 0===Le&&(Le={});var Ne=Le.pixelRatio;void 0===Ne&&(Ne=1);var qe=Le.sdf;void 0===qe&&(qe=!1);var et=Le.stretchX,vt=Le.stretchY,xt=Le.content;if(this._lazyInitEmptyStyle(),pe instanceof ni||Ha&&pe instanceof Ha){var te=l.browser.getImageData(pe);this.style.addImage(ne,{data:new l.RGBAImage({width:te.width,height:te.height},te.data),pixelRatio:Ne,stretchX:et,stretchY:vt,content:xt,sdf:qe,version:0})}else{if(void 0===pe.width||void 0===pe.height)return this.fire(new l.ErrorEvent(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));var Je=pe;this.style.addImage(ne,{data:new l.RGBAImage({width:pe.width,height:pe.height},new Uint8Array(pe.data)),pixelRatio:Ne,stretchX:et,stretchY:vt,content:xt,sdf:qe,version:0,userImage:Je}),Je.onAdd&&Je.onAdd(this,ne)}},Y.prototype.updateImage=function(ne,pe){var Le=this.style.getImage(ne);if(!Le)return this.fire(new l.ErrorEvent(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));var Ne=pe instanceof ni||Ha&&pe instanceof Ha?l.browser.getImageData(pe):pe,qe=Ne.width,et=Ne.height,vt=Ne.data;return void 0===qe||void 0===et?this.fire(new l.ErrorEvent(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`"))):qe!==Le.data.width||et!==Le.data.height?this.fire(new l.ErrorEvent(new Error("The width and height of the updated image must be that same as the previous version of the image"))):(Le.data.replace(vt,!(pe instanceof ni||Ha&&pe instanceof Ha)),void this.style.updateImage(ne,Le))},Y.prototype.hasImage=function(ne){return ne?!!this.style.getImage(ne):(this.fire(new l.ErrorEvent(new Error("Missing required image id"))),!1)},Y.prototype.removeImage=function(ne){this.style.removeImage(ne)},Y.prototype.loadImage=function(ne,pe){l.getImage(this._requestManager.transformRequest(ne,l.ResourceType.Image),pe)},Y.prototype.listImages=function(){return this.style.listImages()},Y.prototype.addLayer=function(ne,pe){return this._lazyInitEmptyStyle(),this.style.addLayer(ne,pe),this._update(!0)},Y.prototype.moveLayer=function(ne,pe){return this.style.moveLayer(ne,pe),this._update(!0)},Y.prototype.removeLayer=function(ne){return this.style.removeLayer(ne),this._update(!0)},Y.prototype.getLayer=function(ne){return this.style.getLayer(ne)},Y.prototype.setLayerZoomRange=function(ne,pe,Le){return this.style.setLayerZoomRange(ne,pe,Le),this._update(!0)},Y.prototype.setFilter=function(ne,pe,Le){return void 0===Le&&(Le={}),this.style.setFilter(ne,pe,Le),this._update(!0)},Y.prototype.getFilter=function(ne){return this.style.getFilter(ne)},Y.prototype.setPaintProperty=function(ne,pe,Le,Ne){return void 0===Ne&&(Ne={}),this.style.setPaintProperty(ne,pe,Le,Ne),this._update(!0)},Y.prototype.getPaintProperty=function(ne,pe){return this.style.getPaintProperty(ne,pe)},Y.prototype.setLayoutProperty=function(ne,pe,Le,Ne){return void 0===Ne&&(Ne={}),this.style.setLayoutProperty(ne,pe,Le,Ne),this._update(!0)},Y.prototype.getLayoutProperty=function(ne,pe){return this.style.getLayoutProperty(ne,pe)},Y.prototype.setLight=function(ne,pe){return void 0===pe&&(pe={}),this._lazyInitEmptyStyle(),this.style.setLight(ne,pe),this._update(!0)},Y.prototype.getLight=function(){return this.style.getLight()},Y.prototype.setFeatureState=function(ne,pe){return this.style.setFeatureState(ne,pe),this._update()},Y.prototype.removeFeatureState=function(ne,pe){return this.style.removeFeatureState(ne,pe),this._update()},Y.prototype.getFeatureState=function(ne){return this.style.getFeatureState(ne)},Y.prototype.getContainer=function(){return this._container},Y.prototype.getCanvasContainer=function(){return this._canvasContainer},Y.prototype.getCanvas=function(){return this._canvas},Y.prototype._containerDimensions=function(){var ne=0,pe=0;return this._container&&(ne=this._container.clientWidth||400,pe=this._container.clientHeight||300),[ne,pe]},Y.prototype._detectMissingCSS=function(){"rgb(250, 128, 114)"!==l.window.getComputedStyle(this._missingCSSCanary).getPropertyValue("background-color")&&l.warnOnce("This page appears to be missing CSS declarations for Mapbox GL JS, which may cause the map to display incorrectly. Please ensure your page includes mapbox-gl.css, as described in https://www.mapbox.com/mapbox-gl-js/api/.")},Y.prototype._setupContainer=function(){var ne=this._container;ne.classList.add("mapboxgl-map"),(this._missingCSSCanary=b.create("div","mapboxgl-canary",ne)).style.visibility="hidden",this._detectMissingCSS();var pe=this._canvasContainer=b.create("div","mapboxgl-canvas-container",ne);this._interactive&&pe.classList.add("mapboxgl-interactive"),this._canvas=b.create("canvas","mapboxgl-canvas",pe),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex","0"),this._canvas.setAttribute("aria-label","Map");var Le=this._containerDimensions();this._resizeCanvas(Le[0],Le[1]);var Ne=this._controlContainer=b.create("div","mapboxgl-control-container",ne),qe=this._controlPositions={};["top-left","top-right","bottom-left","bottom-right"].forEach(function(et){qe[et]=b.create("div","mapboxgl-ctrl-"+et,Ne)})},Y.prototype._resizeCanvas=function(ne,pe){var Le=l.browser.devicePixelRatio||1;this._canvas.width=Le*ne,this._canvas.height=Le*pe,this._canvas.style.width=ne+"px",this._canvas.style.height=pe+"px"},Y.prototype._setupPainter=function(){var ne=l.extend({},T.webGLContextAttributes,{failIfMajorPerformanceCaveat:this._failIfMajorPerformanceCaveat,preserveDrawingBuffer:this._preserveDrawingBuffer,antialias:this._antialias||!1}),pe=this._canvas.getContext("webgl",ne)||this._canvas.getContext("experimental-webgl",ne);pe?(this.painter=new ai(pe,this.transform),l.webpSupported.testSupport(pe)):this.fire(new l.ErrorEvent(new Error("Failed to initialize WebGL")))},Y.prototype._contextLost=function(ne){ne.preventDefault(),this._frame&&(this._frame.cancel(),this._frame=null),this.fire(new l.Event("webglcontextlost",{originalEvent:ne}))},Y.prototype._contextRestored=function(ne){this._setupPainter(),this.resize(),this._update(),this.fire(new l.Event("webglcontextrestored",{originalEvent:ne}))},Y.prototype.loaded=function(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()},Y.prototype._update=function(ne){return this.style?(this._styleDirty=this._styleDirty||ne,this._sourcesDirty=!0,this.triggerRepaint(),this):this},Y.prototype._requestRenderFrame=function(ne){return this._update(),this._renderTaskQueue.add(ne)},Y.prototype._cancelRenderFrame=function(ne){this._renderTaskQueue.remove(ne)},Y.prototype._render=function(ne){var pe,Le=this,Ne=0,qe=this.painter.context.extTimerQuery;if(this.listens("gpu-timing-frame")&&(pe=qe.createQueryEXT(),qe.beginQueryEXT(qe.TIME_ELAPSED_EXT,pe),Ne=l.browser.now()),this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(ne),!this._removed){var et=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;var vt=this.transform.zoom,xt=l.browser.now();this.style.zoomHistory.update(vt,xt);var te=new l.EvaluationParameters(vt,{now:xt,fadeDuration:this._fadeDuration,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),ue=te.crossFadingFactor();1===ue&&ue===this._crossFadingFactor||(et=!0,this._crossFadingFactor=ue),this.style.update(te)}if(this.style&&this._sourcesDirty&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this._placementDirty=this.style&&this.style._updatePlacement(this.painter.transform,this.showCollisionBoxes,this._fadeDuration,this._crossSourceCollisions),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:this._fadeDuration,showPadding:this.showPadding,gpuTiming:!!this.listens("gpu-timing-layer")}),this.fire(new l.Event("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new l.Event("load"))),this.style&&(this.style.hasTransitions()||et)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles(),this.listens("gpu-timing-frame")){var we=l.browser.now()-Ne;qe.endQueryEXT(qe.TIME_ELAPSED_EXT,pe),setTimeout(function(){var De=qe.getQueryObjectEXT(pe,qe.QUERY_RESULT_EXT)/1e6;qe.deleteQueryEXT(pe),Le.fire(new l.Event("gpu-timing-frame",{cpuTime:we,gpuTime:De}))},50)}if(this.listens("gpu-timing-layer")){var Oe=this.painter.collectGpuTimers();setTimeout(function(){var De=Le.painter.queryGpuTimers(Oe);Le.fire(new l.Event("gpu-timing-layer",{layerTimes:De}))},50)}return this._sourcesDirty||this._styleDirty||this._placementDirty||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&(this._fullyLoaded||(this._fullyLoaded=!0),this.fire(new l.Event("idle"))),this}},Y.prototype.remove=function(){this._hash&&this._hash.remove();for(var ne=0,pe=this._controls;ne<pe.length;ne+=1)pe[ne].onRemove(this);this._controls=[],this._frame&&(this._frame.cancel(),this._frame=null),this._renderTaskQueue.clear(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),void 0!==l.window&&(l.window.removeEventListener("resize",this._onWindowResize,!1),l.window.removeEventListener("online",this._onWindowOnline,!1));var Le=this.painter.context.gl.getExtension("WEBGL_lose_context");Le&&Le.loseContext(),co(this._canvasContainer),co(this._controlContainer),co(this._missingCSSCanary),this._container.classList.remove("mapboxgl-map"),this._removed=!0,this.fire(new l.Event("remove"))},Y.prototype.triggerRepaint=function(){var ne=this;this.style&&!this._frame&&(this._frame=l.browser.frame(function(pe){ne._frame=null,ne._render(pe)}))},Y.prototype._onWindowOnline=function(){this._update()},Y.prototype._onWindowResize=function(ne){this._trackResize&&this.resize({originalEvent:ne})._update()},q.showTileBoundaries.get=function(){return!!this._showTileBoundaries},q.showTileBoundaries.set=function(ne){this._showTileBoundaries!==ne&&(this._showTileBoundaries=ne,this._update())},q.showPadding.get=function(){return!!this._showPadding},q.showPadding.set=function(ne){this._showPadding!==ne&&(this._showPadding=ne,this._update())},q.showCollisionBoxes.get=function(){return!!this._showCollisionBoxes},q.showCollisionBoxes.set=function(ne){this._showCollisionBoxes!==ne&&(this._showCollisionBoxes=ne,ne?this.style._generateCollisionBoxes():this._update())},q.showOverdrawInspector.get=function(){return!!this._showOverdrawInspector},q.showOverdrawInspector.set=function(ne){this._showOverdrawInspector!==ne&&(this._showOverdrawInspector=ne,this._update())},q.repaint.get=function(){return!!this._repaint},q.repaint.set=function(ne){this._repaint!==ne&&(this._repaint=ne,this.triggerRepaint())},q.vertices.get=function(){return!!this._vertices},q.vertices.set=function(ne){this._vertices=ne,this._update()},Y.prototype._setCacheLimits=function(ne,pe){l.setCacheLimits(ne,pe)},q.version.get=function(){return l.version},Object.defineProperties(Y.prototype,q),Y}(xs);function co(D){D.parentNode&&D.parentNode.removeChild(D)}var Ki={showCompass:!0,showZoom:!0,visualizePitch:!1},Ba=function(D){var Y=this;this.options=l.extend({},Ki,D),this._container=b.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._container.addEventListener("contextmenu",function(q){return q.preventDefault()}),this.options.showZoom&&(l.bindAll(["_setButtonTitle","_updateZoomButtons"],this),this._zoomInButton=this._createButton("mapboxgl-ctrl-zoom-in",function(q){return Y._map.zoomIn({},{originalEvent:q})}),b.create("span","mapboxgl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden",!0),this._zoomOutButton=this._createButton("mapboxgl-ctrl-zoom-out",function(q){return Y._map.zoomOut({},{originalEvent:q})}),b.create("span","mapboxgl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden",!0)),this.options.showCompass&&(l.bindAll(["_rotateCompassArrow"],this),this._compass=this._createButton("mapboxgl-ctrl-compass",function(q){Y.options.visualizePitch?Y._map.resetNorthPitch({},{originalEvent:q}):Y._map.resetNorth({},{originalEvent:q})}),this._compassIcon=b.create("span","mapboxgl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden",!0))};Ba.prototype._updateZoomButtons=function(){var D=this._map.getZoom();this._zoomInButton.disabled=D===this._map.getMaxZoom(),this._zoomOutButton.disabled=D===this._map.getMinZoom()},Ba.prototype._rotateCompassArrow=function(){var D=this.options.visualizePitch?"scale("+1/Math.pow(Math.cos(this._map.transform.pitch*(Math.PI/180)),.5)+") rotateX("+this._map.transform.pitch+"deg) rotateZ("+this._map.transform.angle*(180/Math.PI)+"deg)":"rotate("+this._map.transform.angle*(180/Math.PI)+"deg)";this._compassIcon.style.transform=D},Ba.prototype.onAdd=function(D){return this._map=D,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new Mr(this._map,this._compass,this.options.visualizePitch)),this._container},Ba.prototype.onRemove=function(){b.remove(this._container),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map},Ba.prototype._createButton=function(D,Y){var q=b.create("button",D,this._container);return q.type="button",q.addEventListener("click",Y),q},Ba.prototype._setButtonTitle=function(D,Y){var q=this._map._getUIString("NavigationControl."+Y);D.title=q,D.setAttribute("aria-label",q)};var Mr=function(D,Y,q){void 0===q&&(q=!1),this._clickTolerance=10,this.element=Y,this.mouseRotate=new Cs({clickTolerance:D.dragRotate._mouseRotate._clickTolerance}),this.map=D,q&&(this.mousePitch=new Ps({clickTolerance:D.dragRotate._mousePitch._clickTolerance})),l.bindAll(["mousedown","mousemove","mouseup","touchstart","touchmove","touchend","reset"],this),b.addEventListener(Y,"mousedown",this.mousedown),b.addEventListener(Y,"touchstart",this.touchstart,{passive:!1}),b.addEventListener(Y,"touchmove",this.touchmove),b.addEventListener(Y,"touchend",this.touchend),b.addEventListener(Y,"touchcancel",this.reset)};function Or(D,Y,q){if(D=new l.LngLat(D.lng,D.lat),Y){var ne=new l.LngLat(D.lng-360,D.lat),pe=new l.LngLat(D.lng+360,D.lat),Le=q.locationPoint(D).distSqr(Y);q.locationPoint(ne).distSqr(Y)<Le?D=ne:q.locationPoint(pe).distSqr(Y)<Le&&(D=pe)}for(;Math.abs(D.lng-q.center.lng)>180;){var Ne=q.locationPoint(D);if(Ne.x>=0&&Ne.y>=0&&Ne.x<=q.width&&Ne.y<=q.height)break;D.lng>q.center.lng?D.lng-=360:D.lng+=360}return D}Mr.prototype.down=function(D,Y){this.mouseRotate.mousedown(D,Y),this.mousePitch&&this.mousePitch.mousedown(D,Y),b.disableDrag()},Mr.prototype.move=function(D,Y){var q=this.map,ne=this.mouseRotate.mousemoveWindow(D,Y);if(ne&&ne.bearingDelta&&q.setBearing(q.getBearing()+ne.bearingDelta),this.mousePitch){var pe=this.mousePitch.mousemoveWindow(D,Y);pe&&pe.pitchDelta&&q.setPitch(q.getPitch()+pe.pitchDelta)}},Mr.prototype.off=function(){var D=this.element;b.removeEventListener(D,"mousedown",this.mousedown),b.removeEventListener(D,"touchstart",this.touchstart,{passive:!1}),b.removeEventListener(D,"touchmove",this.touchmove),b.removeEventListener(D,"touchend",this.touchend),b.removeEventListener(D,"touchcancel",this.reset),this.offTemp()},Mr.prototype.offTemp=function(){b.enableDrag(),b.removeEventListener(l.window,"mousemove",this.mousemove),b.removeEventListener(l.window,"mouseup",this.mouseup)},Mr.prototype.mousedown=function(D){this.down(l.extend({},D,{ctrlKey:!0,preventDefault:function(){return D.preventDefault()}}),b.mousePos(this.element,D)),b.addEventListener(l.window,"mousemove",this.mousemove),b.addEventListener(l.window,"mouseup",this.mouseup)},Mr.prototype.mousemove=function(D){this.move(D,b.mousePos(this.element,D))},Mr.prototype.mouseup=function(D){this.mouseRotate.mouseupWindow(D),this.mousePitch&&this.mousePitch.mouseupWindow(D),this.offTemp()},Mr.prototype.touchstart=function(D){1!==D.targetTouches.length?this.reset():(this._startPos=this._lastPos=b.touchPos(this.element,D.targetTouches)[0],this.down({type:"mousedown",button:0,ctrlKey:!0,preventDefault:function(){return D.preventDefault()}},this._startPos))},Mr.prototype.touchmove=function(D){1!==D.targetTouches.length?this.reset():(this._lastPos=b.touchPos(this.element,D.targetTouches)[0],this.move({preventDefault:function(){return D.preventDefault()}},this._lastPos))},Mr.prototype.touchend=function(D){0===D.targetTouches.length&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos)<this._clickTolerance&&this.element.click(),this.reset()},Mr.prototype.reset=function(){this.mouseRotate.reset(),this.mousePitch&&this.mousePitch.reset(),delete this._startPos,delete this._lastPos,this.offTemp()};var rs={center:"translate(-50%,-50%)",top:"translate(-50%,0)","top-left":"translate(0,0)","top-right":"translate(-100%,0)",bottom:"translate(-50%,-100%)","bottom-left":"translate(0,-100%)","bottom-right":"translate(-100%,-100%)",left:"translate(0,-50%)",right:"translate(-100%,-50%)"};function fo(D,Y,q){var ne=D.classList;for(var pe in rs)ne.remove("mapboxgl-"+q+"-anchor-"+pe);ne.add("mapboxgl-"+q+"-anchor-"+Y)}var qa,$i=function(D){function Y(q,ne){var pe=this;if(D.call(this),(q instanceof l.window.HTMLElement||ne)&&(q=l.extend({element:q},ne)),l.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=q&&q.anchor||"center",this._color=q&&q.color||"#3FB1CE",this._draggable=q&&q.draggable||!1,this._state="inactive",this._rotation=q&&q.rotation||0,this._rotationAlignment=q&&q.rotationAlignment||"auto",this._pitchAlignment=q&&q.pitchAlignment&&"auto"!==q.pitchAlignment?q.pitchAlignment:this._rotationAlignment,q&&q.element)this._element=q.element,this._offset=l.Point.convert(q&&q.offset||[0,0]);else{this._defaultMarker=!0,this._element=b.create("div"),this._element.setAttribute("aria-label","Map marker");var Le=b.createNS("http://www.w3.org/2000/svg","svg");Le.setAttributeNS(null,"display","block"),Le.setAttributeNS(null,"height","41px"),Le.setAttributeNS(null,"width","27px"),Le.setAttributeNS(null,"viewBox","0 0 27 41");var Ne=b.createNS("http://www.w3.org/2000/svg","g");Ne.setAttributeNS(null,"stroke","none"),Ne.setAttributeNS(null,"stroke-width","1"),Ne.setAttributeNS(null,"fill","none"),Ne.setAttributeNS(null,"fill-rule","evenodd");var qe=b.createNS("http://www.w3.org/2000/svg","g");qe.setAttributeNS(null,"fill-rule","nonzero");var et=b.createNS("http://www.w3.org/2000/svg","g");et.setAttributeNS(null,"transform","translate(3.0, 29.0)"),et.setAttributeNS(null,"fill","#000000");for(var vt=0,xt=[{rx:"10.5",ry:"5.25002273"},{rx:"10.5",ry:"5.25002273"},{rx:"9.5",ry:"4.77275007"},{rx:"8.5",ry:"4.29549936"},{rx:"7.5",ry:"3.81822308"},{rx:"6.5",ry:"3.34094679"},{rx:"5.5",ry:"2.86367051"},{rx:"4.5",ry:"2.38636864"}];vt<xt.length;vt+=1){var te=xt[vt],ue=b.createNS("http://www.w3.org/2000/svg","ellipse");ue.setAttributeNS(null,"opacity","0.04"),ue.setAttributeNS(null,"cx","10.5"),ue.setAttributeNS(null,"cy","5.80029008"),ue.setAttributeNS(null,"rx",te.rx),ue.setAttributeNS(null,"ry",te.ry),et.appendChild(ue)}var we=b.createNS("http://www.w3.org/2000/svg","g");we.setAttributeNS(null,"fill",this._color);var Oe=b.createNS("http://www.w3.org/2000/svg","path");Oe.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),we.appendChild(Oe);var De=b.createNS("http://www.w3.org/2000/svg","g");De.setAttributeNS(null,"opacity","0.25"),De.setAttributeNS(null,"fill","#000000");var Ue=b.createNS("http://www.w3.org/2000/svg","path");Ue.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),De.appendChild(Ue);var Ze=b.createNS("http://www.w3.org/2000/svg","g");Ze.setAttributeNS(null,"transform","translate(6.0, 7.0)"),Ze.setAttributeNS(null,"fill","#FFFFFF");var Je=b.createNS("http://www.w3.org/2000/svg","g");Je.setAttributeNS(null,"transform","translate(8.0, 8.0)");var it=b.createNS("http://www.w3.org/2000/svg","circle");it.setAttributeNS(null,"fill","#000000"),it.setAttributeNS(null,"opacity","0.25"),it.setAttributeNS(null,"cx","5.5"),it.setAttributeNS(null,"cy","5.5"),it.setAttributeNS(null,"r","5.4999962");var ut=b.createNS("http://www.w3.org/2000/svg","circle");ut.setAttributeNS(null,"fill","#FFFFFF"),ut.setAttributeNS(null,"cx","5.5"),ut.setAttributeNS(null,"cy","5.5"),ut.setAttributeNS(null,"r","5.4999962"),Je.appendChild(it),Je.appendChild(ut),qe.appendChild(et),qe.appendChild(we),qe.appendChild(De),qe.appendChild(Ze),qe.appendChild(Je),Le.appendChild(qe),this._element.appendChild(Le),this._offset=l.Point.convert(q&&q.offset||[0,-14])}this._element.classList.add("mapboxgl-marker"),this._element.addEventListener("dragstart",function(St){St.preventDefault()}),this._element.addEventListener("mousedown",function(St){St.preventDefault()}),this._element.addEventListener("focus",function(){var St=pe._map.getContainer();St.scrollTop=0,St.scrollLeft=0}),fo(this._element,this._anchor,"marker"),this._popup=null}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.addTo=function(q){return this.remove(),this._map=q,q.getCanvasContainer().appendChild(this._element),q.on("move",this._update),q.on("moveend",this._update),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this},Y.prototype.remove=function(){return this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),b.remove(this._element),this._popup&&this._popup.remove(),this},Y.prototype.getLngLat=function(){return this._lngLat},Y.prototype.setLngLat=function(q){return this._lngLat=l.LngLat.convert(q),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this},Y.prototype.getElement=function(){return this._element},Y.prototype.setPopup=function(q){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),q){if(!("offset"in q.options)){var pe=Math.sqrt(Math.pow(13.5,2)/2);q.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[pe,-1*(24.6+pe)],"bottom-right":[-pe,-1*(24.6+pe)],left:[13.5,-24.6],right:[-13.5,-24.6]}:this._offset}this._popup=q,this._lngLat&&this._popup.setLngLat(this._lngLat),this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this},Y.prototype._onKeyPress=function(q){var ne=q.code,pe=q.charCode||q.keyCode;"Space"!==ne&&"Enter"!==ne&&32!==pe&&13!==pe||this.togglePopup()},Y.prototype._onMapClick=function(q){var ne=q.originalEvent.target,pe=this._element;this._popup&&(ne===pe||pe.contains(ne))&&this.togglePopup()},Y.prototype.getPopup=function(){return this._popup},Y.prototype.togglePopup=function(){var q=this._popup;return q?(q.isOpen()?q.remove():q.addTo(this._map),this):this},Y.prototype._update=function(q){if(this._map){this._map.transform.renderWorldCopies&&(this._lngLat=Or(this._lngLat,this._pos,this._map.transform)),this._pos=this._map.project(this._lngLat)._add(this._offset);var ne="";"viewport"===this._rotationAlignment||"auto"===this._rotationAlignment?ne="rotateZ("+this._rotation+"deg)":"map"===this._rotationAlignment&&(ne="rotateZ("+(this._rotation-this._map.getBearing())+"deg)");var pe="";"viewport"===this._pitchAlignment||"auto"===this._pitchAlignment?pe="rotateX(0deg)":"map"===this._pitchAlignment&&(pe="rotateX("+this._map.getPitch()+"deg)"),q&&"moveend"!==q.type||(this._pos=this._pos.round()),b.setTransform(this._element,rs[this._anchor]+" translate("+this._pos.x+"px, "+this._pos.y+"px) "+pe+" "+ne)}},Y.prototype.getOffset=function(){return this._offset},Y.prototype.setOffset=function(q){return this._offset=l.Point.convert(q),this._update(),this},Y.prototype._onMove=function(q){this._pos=q.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none","pending"===this._state&&(this._state="active",this.fire(new l.Event("dragstart"))),this.fire(new l.Event("drag"))},Y.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),"active"===this._state&&this.fire(new l.Event("dragend")),this._state="inactive"},Y.prototype._addDragHandler=function(q){this._element.contains(q.originalEvent.target)&&(q.preventDefault(),this._positionDelta=q.point.sub(this._pos).add(this._offset),this._state="pending",this._map.on("mousemove",this._onMove),this._map.on("touchmove",this._onMove),this._map.once("mouseup",this._onUp),this._map.once("touchend",this._onUp))},Y.prototype.setDraggable=function(q){return this._draggable=!!q,this._map&&(q?(this._map.on("mousedown",this._addDragHandler),this._map.on("touchstart",this._addDragHandler)):(this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler))),this},Y.prototype.isDraggable=function(){return this._draggable},Y.prototype.setRotation=function(q){return this._rotation=q||0,this._update(),this},Y.prototype.getRotation=function(){return this._rotation},Y.prototype.setRotationAlignment=function(q){return this._rotationAlignment=q||"auto",this._update(),this},Y.prototype.getRotationAlignment=function(){return this._rotationAlignment},Y.prototype.setPitchAlignment=function(q){return this._pitchAlignment=q&&"auto"!==q?q:this._rotationAlignment,this._update(),this},Y.prototype.getPitchAlignment=function(){return this._pitchAlignment},Y}(l.Evented),Rs={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},fa=0,is=!1,ho=function(D){function Y(q){D.call(this),this.options=l.extend({},Rs,q),l.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.onAdd=function(q){return this._map=q,this._container=b.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),ne=this._setupUI,void 0!==qa?ne(qa):void 0!==l.window.navigator.permissions?l.window.navigator.permissions.query({name:"geolocation"}).then(function(pe){ne(qa="denied"!==pe.state)}):ne(qa=!!l.window.navigator.geolocation),this._container;var ne},Y.prototype.onRemove=function(){void 0!==this._geolocationWatchID&&(l.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0),this.options.showUserLocation&&this._userLocationDotMarker&&this._userLocationDotMarker.remove(),this.options.showAccuracyCircle&&this._accuracyCircleMarker&&this._accuracyCircleMarker.remove(),b.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,fa=0,is=!1},Y.prototype._isOutOfMapMaxBounds=function(q){var ne=this._map.getMaxBounds(),pe=q.coords;return ne&&(pe.longitude<ne.getWest()||pe.longitude>ne.getEast()||pe.latitude<ne.getSouth()||pe.latitude>ne.getNorth())},Y.prototype._setErrorState=function(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting")}},Y.prototype._onSuccess=function(q){if(this._map){if(this._isOutOfMapMaxBounds(q))return this._setErrorState(),this.fire(new l.Event("outofmaxbounds",q)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=q,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background")}this.options.showUserLocation&&"OFF"!==this._watchState&&this._updateMarker(q),this.options.trackUserLocation&&"ACTIVE_LOCK"!==this._watchState||this._updateCamera(q),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new l.Event("geolocate",q)),this._finish()}},Y.prototype._updateCamera=function(q){var ne=new l.LngLat(q.coords.longitude,q.coords.latitude),pe=q.coords.accuracy,Le=this._map.getBearing(),Ne=l.extend({bearing:Le},this.options.fitBoundsOptions);this._map.fitBounds(ne.toBounds(pe),Ne,{geolocateSource:!0})},Y.prototype._updateMarker=function(q){if(q){var ne=new l.LngLat(q.coords.longitude,q.coords.latitude);this._accuracyCircleMarker.setLngLat(ne).addTo(this._map),this._userLocationDotMarker.setLngLat(ne).addTo(this._map),this._accuracy=q.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},Y.prototype._updateCircleRadius=function(){var q=this._map._container.clientHeight/2,ne=this._map.unproject([0,q]),pe=this._map.unproject([1,q]),Le=ne.distanceTo(pe),Ne=Math.ceil(2*this._accuracy/Le);this._circleElement.style.width=Ne+"px",this._circleElement.style.height=Ne+"px"},Y.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},Y.prototype._onError=function(q){if(this._map){if(this.options.trackUserLocation)if(1===q.code){this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;var ne=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=ne,this._geolocateButton.setAttribute("aria-label",ne),void 0!==this._geolocationWatchID&&this._clearWatch()}else{if(3===q.code&&is)return;this._setErrorState()}"OFF"!==this._watchState&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new l.Event("error",q)),this._finish()}},Y.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},Y.prototype._setupUI=function(q){var ne=this;if(this._container.addEventListener("contextmenu",function(Ne){return Ne.preventDefault()}),this._geolocateButton=b.create("button","mapboxgl-ctrl-geolocate",this._container),b.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",!1===q){l.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var pe=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=pe,this._geolocateButton.setAttribute("aria-label",pe)}else{var Le=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Le,this._geolocateButton.setAttribute("aria-label",Le)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=b.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new $i(this._dotElement),this._circleElement=b.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new $i({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onZoom)),this._geolocateButton.addEventListener("click",this.trigger.bind(this)),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",function(Ne){Ne.geolocateSource||"ACTIVE_LOCK"!==ne._watchState||Ne.originalEvent&&"resize"===Ne.originalEvent.type||(ne._watchState="BACKGROUND",ne._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),ne._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),ne.fire(new l.Event("trackuserlocationend")))})},Y.prototype.trigger=function(){if(!this._setup)return l.warnOnce("Geolocate control triggered before added to a map"),!1;if(this.options.trackUserLocation){switch(this._watchState){case"OFF":this._watchState="WAITING_ACTIVE",this.fire(new l.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":fa--,is=!1,this._watchState="OFF",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background-error"),this.fire(new l.Event("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new l.Event("trackuserlocationstart"))}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active");break;case"ACTIVE_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-active-error");break;case"BACKGROUND":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background");break;case"BACKGROUND_ERROR":this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background-error")}if("OFF"===this._watchState&&void 0!==this._geolocationWatchID)this._clearWatch();else if(void 0===this._geolocationWatchID){var q;this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),++fa>1?(q={maximumAge:6e5,timeout:0},is=!0):(q=this.options.positionOptions,is=!1),this._geolocationWatchID=l.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,q)}}else l.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},Y.prototype._clearWatch=function(){l.window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)},Y}(l.Evented),oi={maxWidth:100,unit:"metric"},fi=function(D){this.options=l.extend({},oi,D),l.bindAll(["_onMove","setUnit"],this)};function zs(D,Y,q){var ne=q&&q.maxWidth||100,pe=D._container.clientHeight/2,Le=D.unproject([0,pe]),Ne=D.unproject([ne,pe]),qe=Le.distanceTo(Ne);if(q&&"imperial"===q.unit){var et=3.2808*qe;et>5280?Xe(Y,ne,et/5280,D._getUIString("ScaleControl.Miles")):Xe(Y,ne,et,D._getUIString("ScaleControl.Feet"))}else q&&"nautical"===q.unit?Xe(Y,ne,qe/1852,D._getUIString("ScaleControl.NauticalMiles")):qe>=1e3?Xe(Y,ne,qe/1e3,D._getUIString("ScaleControl.Kilometers")):Xe(Y,ne,qe,D._getUIString("ScaleControl.Meters"))}function Xe(D,Y,q,ne){var pe,Le,Ne,vt,xt,qe=(pe=q,(Le=Math.pow(10,(""+Math.floor(pe)).length-1))*((Ne=pe/Le)>=10?10:Ne>=5?5:Ne>=3?3:Ne>=2?2:Ne>=1?1:(vt=Ne,xt=Math.pow(10,Math.ceil(-Math.log(vt)/Math.LN10)),Math.round(vt*xt)/xt)));D.style.width=Y*(qe/q)+"px",D.innerHTML=qe+"&nbsp;"+ne}fi.prototype.getDefaultPosition=function(){return"bottom-left"},fi.prototype._onMove=function(){zs(this._map,this._container,this.options)},fi.prototype.onAdd=function(D){return this._map=D,this._container=b.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",D.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},fi.prototype.onRemove=function(){b.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},fi.prototype.setUnit=function(D){this.options.unit=D,zs(this._map,this._container,this.options)};var $e=function(D){this._fullscreen=!1,D&&D.container&&(D.container instanceof l.window.HTMLElement?this._container=D.container:l.warnOnce("Full screen control 'container' must be a DOM element.")),l.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in l.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in l.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in l.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in l.window.document&&(this._fullscreenchange="MSFullscreenChange")};$e.prototype.onAdd=function(D){return this._map=D,this._container||(this._container=this._map.getContainer()),this._controlContainer=b.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",l.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},$e.prototype.onRemove=function(){b.remove(this._controlContainer),this._map=null,l.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},$e.prototype._checkFullscreenSupport=function(){return!!(l.window.document.fullscreenEnabled||l.window.document.mozFullScreenEnabled||l.window.document.msFullscreenEnabled||l.window.document.webkitFullscreenEnabled)},$e.prototype._setupUI=function(){var D=this._fullscreenButton=b.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);b.create("span","mapboxgl-ctrl-icon",D).setAttribute("aria-hidden",!0),D.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),l.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},$e.prototype._updateTitle=function(){var D=this._getTitle();this._fullscreenButton.setAttribute("aria-label",D),this._fullscreenButton.title=D},$e.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},$e.prototype._isFullscreen=function(){return this._fullscreen},$e.prototype._changeIcon=function(){(l.window.document.fullscreenElement||l.window.document.mozFullScreenElement||l.window.document.webkitFullscreenElement||l.window.document.msFullscreenElement)===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},$e.prototype._onClickFullscreen=function(){this._isFullscreen()?l.window.document.exitFullscreen?l.window.document.exitFullscreen():l.window.document.mozCancelFullScreen?l.window.document.mozCancelFullScreen():l.window.document.msExitFullscreen?l.window.document.msExitFullscreen():l.window.document.webkitCancelFullScreen&&l.window.document.webkitCancelFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.mozRequestFullScreen?this._container.mozRequestFullScreen():this._container.msRequestFullscreen?this._container.msRequestFullscreen():this._container.webkitRequestFullscreen&&this._container.webkitRequestFullscreen()};var at={closeButton:!0,closeOnClick:!0,className:"",maxWidth:"240px"},ft=function(D){function Y(q){D.call(this),this.options=l.extend(Object.create(at),q),l.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return D&&(Y.__proto__=D),(Y.prototype=Object.create(D&&D.prototype)).constructor=Y,Y.prototype.addTo=function(q){return this._map&&this.remove(),this._map=q,this.options.closeOnClick&&this._map.on("click",this._onClose),this.options.closeOnMove&&this._map.on("move",this._onClose),this._map.on("remove",this.remove),this._update(),this._trackPointer?(this._map.on("mousemove",this._onMouseMove),this._map.on("mouseup",this._onMouseUp),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")):this._map.on("move",this._update),this.fire(new l.Event("open")),this},Y.prototype.isOpen=function(){return!!this._map},Y.prototype.remove=function(){return this._content&&b.remove(this._content),this._container&&(b.remove(this._container),delete this._container),this._map&&(this._map.off("move",this._update),this._map.off("move",this._onClose),this._map.off("click",this._onClose),this._map.off("remove",this.remove),this._map.off("mousemove",this._onMouseMove),this._map.off("mouseup",this._onMouseUp),this._map.off("drag",this._onDrag),delete this._map),this.fire(new l.Event("close")),this},Y.prototype.getLngLat=function(){return this._lngLat},Y.prototype.setLngLat=function(q){return this._lngLat=l.LngLat.convert(q),this._pos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._onMouseMove),this._container&&this._container.classList.remove("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.remove("mapboxgl-track-pointer")),this},Y.prototype.trackPointer=function(){return this._trackPointer=!0,this._pos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._onMouseMove),this._map.on("drag",this._onDrag),this._container&&this._container.classList.add("mapboxgl-popup-track-pointer"),this._map._canvasContainer.classList.add("mapboxgl-track-pointer")),this},Y.prototype.getElement=function(){return this._container},Y.prototype.setText=function(q){return this.setDOMContent(l.window.document.createTextNode(q))},Y.prototype.setHTML=function(q){var ne,pe=l.window.document.createDocumentFragment(),Le=l.window.document.createElement("body");for(Le.innerHTML=q;ne=Le.firstChild;)pe.appendChild(ne);return this.setDOMContent(pe)},Y.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},Y.prototype.setMaxWidth=function(q){return this.options.maxWidth=q,this._update(),this},Y.prototype.setDOMContent=function(q){return this._createContent(),this._content.appendChild(q),this._update(),this},Y.prototype.addClassName=function(q){this._container&&this._container.classList.add(q)},Y.prototype.removeClassName=function(q){this._container&&this._container.classList.remove(q)},Y.prototype.toggleClassName=function(q){if(this._container)return this._container.classList.toggle(q)},Y.prototype._createContent=function(){this._content&&b.remove(this._content),this._content=b.create("div","mapboxgl-popup-content",this._container),this.options.closeButton&&(this._closeButton=b.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="&#215;",this._closeButton.addEventListener("click",this._onClose))},Y.prototype._onMouseUp=function(q){this._update(q.point)},Y.prototype._onMouseMove=function(q){this._update(q.point)},Y.prototype._onDrag=function(q){this._update(q.point)},Y.prototype._update=function(q){var ne=this;if(this._map&&(this._lngLat||this._trackPointer)&&this._content&&(this._container||(this._container=b.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=b.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(ue){return ne._container.classList.add(ue)}),this._trackPointer&&this._container.classList.add("mapboxgl-popup-track-pointer")),this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._map.transform.renderWorldCopies&&!this._trackPointer&&(this._lngLat=Or(this._lngLat,this._pos,this._map.transform)),!this._trackPointer||q)){var Le=this._pos=this._trackPointer&&q?q:this._map.project(this._lngLat),Ne=this.options.anchor,qe=bt(this.options.offset);if(!Ne){var et,vt=this._container.offsetWidth,xt=this._container.offsetHeight;et=Le.y+qe.bottom.y<xt?["top"]:Le.y>this._map.transform.height-xt?["bottom"]:[],Le.x<vt/2?et.push("left"):Le.x>this._map.transform.width-vt/2&&et.push("right"),Ne=0===et.length?"bottom":et.join("-")}var te=Le.add(qe[Ne]).round();b.setTransform(this._container,rs[Ne]+" translate("+te.x+"px,"+te.y+"px)"),fo(this._container,Ne,"popup")}},Y.prototype._onClose=function(){this.remove()},Y}(l.Evented);function bt(D){if(D){if("number"==typeof D){var Y=Math.round(Math.sqrt(.5*Math.pow(D,2)));return{center:new l.Point(0,0),top:new l.Point(0,D),"top-left":new l.Point(Y,Y),"top-right":new l.Point(-Y,Y),bottom:new l.Point(0,-D),"bottom-left":new l.Point(Y,-Y),"bottom-right":new l.Point(-Y,-Y),left:new l.Point(D,0),right:new l.Point(-D,0)}}if(D instanceof l.Point||Array.isArray(D)){var q=l.Point.convert(D);return{center:q,top:q,"top-left":q,"top-right":q,bottom:q,"bottom-left":q,"bottom-right":q,left:q,right:q}}return{center:l.Point.convert(D.center||[0,0]),top:l.Point.convert(D.top||[0,0]),"top-left":l.Point.convert(D["top-left"]||[0,0]),"top-right":l.Point.convert(D["top-right"]||[0,0]),bottom:l.Point.convert(D.bottom||[0,0]),"bottom-left":l.Point.convert(D["bottom-left"]||[0,0]),"bottom-right":l.Point.convert(D["bottom-right"]||[0,0]),left:l.Point.convert(D.left||[0,0]),right:l.Point.convert(D.right||[0,0])}}return bt(new l.Point(0,0))}var yt={version:l.version,supported:T,setRTLTextPlugin:l.setRTLTextPlugin,getRTLTextPluginStatus:l.getRTLTextPluginStatus,Map:Ao,NavigationControl:Ba,GeolocateControl:ho,AttributionControl:Aa,ScaleControl:fi,FullscreenControl:$e,Popup:ft,Marker:$i,Style:ir,LngLat:l.LngLat,LngLatBounds:l.LngLatBounds,Point:l.Point,MercatorCoordinate:l.MercatorCoordinate,Evented:l.Evented,config:l.config,prewarm:function(){At().acquire(st)},clearPrewarmedResources:function(){var D=Tt;D&&(D.isPreloaded()&&1===D.numActive()?(D.release(st),Tt=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},get accessToken(){return l.config.ACCESS_TOKEN},set accessToken(D){l.config.ACCESS_TOKEN=D},get baseApiUrl(){return l.config.API_URL},set baseApiUrl(D){l.config.API_URL=D},get workerCount(){return ct.workerCount},set workerCount(D){ct.workerCount=D},get maxParallelImageRequests(){return l.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(D){l.config.MAX_PARALLEL_IMAGE_REQUESTS=D},clearStorage:function(D){l.clearTileCache(D)},workerUrl:""};return yt}),k}()},27084:function($){"use strict";$.exports=Math.log2||function(R){return Math.log(R)*Math.LOG2E}},16825:function($,R,e){"use strict";$.exports=function(A,l){l||(l=A,A=window);var T=0,b=0,d=0,s={shift:!1,alt:!1,control:!1,meta:!1},t=!1;function o(g){var y=!1;return"altKey"in g&&(y=y||g.altKey!==s.alt,s.alt=!!g.altKey),"shiftKey"in g&&(y=y||g.shiftKey!==s.shift,s.shift=!!g.shiftKey),"ctrlKey"in g&&(y=y||g.ctrlKey!==s.control,s.control=!!g.ctrlKey),"metaKey"in g&&(y=y||g.metaKey!==s.meta,s.meta=!!g.metaKey),y}function r(g,y){var h=k.x(y),m=k.y(y);"buttons"in y&&(g=0|y.buttons),(g!==T||h!==b||m!==d||o(y))&&(T=0|g,b=h||0,d=m||0,l&&l(T,b,d,s))}function n(g){r(0,g)}function i(){(T||b||d||s.shift||s.alt||s.meta||s.control)&&(b=d=0,T=0,s.shift=s.alt=s.control=s.meta=!1,l&&l(0,0,0,s))}function a(g){o(g)&&l&&l(T,b,d,s)}function c(g){0===k.buttons(g)?r(0,g):r(T,g)}function p(g){r(T|k.buttons(g),g)}function f(g){r(T&~k.buttons(g),g)}function x(){t||(t=!0,A.addEventListener("mousemove",c),A.addEventListener("mousedown",p),A.addEventListener("mouseup",f),A.addEventListener("mouseleave",n),A.addEventListener("mouseenter",n),A.addEventListener("mouseout",n),A.addEventListener("mouseover",n),A.addEventListener("blur",i),A.addEventListener("keyup",a),A.addEventListener("keydown",a),A.addEventListener("keypress",a),A!==window&&(window.addEventListener("blur",i),window.addEventListener("keyup",a),window.addEventListener("keydown",a),window.addEventListener("keypress",a)))}x();var v={element:A};return Object.defineProperties(v,{enabled:{get:function(){return t},set:function(g){g?x():t&&(t=!1,A.removeEventListener("mousemove",c),A.removeEventListener("mousedown",p),A.removeEventListener("mouseup",f),A.removeEventListener("mouseleave",n),A.removeEventListener("mouseenter",n),A.removeEventListener("mouseout",n),A.removeEventListener("mouseover",n),A.removeEventListener("blur",i),A.removeEventListener("keyup",a),A.removeEventListener("keydown",a),A.removeEventListener("keypress",a),A!==window&&(window.removeEventListener("blur",i),window.removeEventListener("keyup",a),window.removeEventListener("keydown",a),window.removeEventListener("keypress",a)))},enumerable:!0},buttons:{get:function(){return T},enumerable:!0},x:{get:function(){return b},enumerable:!0},y:{get:function(){return d},enumerable:!0},mods:{get:function(){return s},enumerable:!0}}),v};var k=e(74311)},48956:function($){var R={left:0,top:0};$.exports=function(e,k,A){k=k||e.currentTarget||e.srcElement,Array.isArray(A)||(A=[0,0]);var l,T=e.clientX||0,b=e.clientY||0,d=(l=k)===window||l===document||l===document.body?R:l.getBoundingClientRect();return A[0]=T-d.left,A[1]=b-d.top,A}},74311:function($,R){"use strict";function e(k){return k.target||k.srcElement||window}R.buttons=function(k){if("object"==typeof k){if("buttons"in k)return k.buttons;if("which"in k){if(2===(A=k.which))return 4;if(3===A)return 2;if(A>0)return 1<<A-1}else if("button"in k){var A;if(1===(A=k.button))return 4;if(2===A)return 2;if(A>=0)return 1<<A}}return 0},R.element=e,R.x=function(k){if("object"==typeof k){if("offsetX"in k)return k.offsetX;var A=e(k).getBoundingClientRect();return k.clientX-A.left}return 0},R.y=function(k){if("object"==typeof k){if("offsetY"in k)return k.offsetY;var A=e(k).getBoundingClientRect();return k.clientY-A.top}return 0}},1195:function($,R,e){"use strict";var k=e(75686);$.exports=function(A,l,T){"function"==typeof A&&(T=!!l,l=A,A=window);var b=k("ex",A),d=function(s){T&&s.preventDefault();var t=s.deltaX||0,o=s.deltaY||0,r=s.deltaZ||0,n=1;switch(s.deltaMode){case 1:n=b;break;case 2:n=window.innerHeight}if(o*=n,r*=n,(t*=n)||o||r)return l(t,o,r,s)};return A.addEventListener("wheel",d),d}},7417:function($,R,e){var k,A,l;(l=void 0!==e.g?e.g:this)[A="Promise"]=l[A]||function(){"use strict";var b,d,s,t=Object.prototype.toString,o=typeof setImmediate<"u"?function(h){return setImmediate(h)}:setTimeout;try{Object.defineProperty({},"x",{}),b=function(h,m,w,u){return Object.defineProperty(h,m,{value:w,writable:!0,configurable:!1!==u})}}catch{b=function(m,w,u){return m[w]=u,m}}function r(h,m){s.add(h,m),d||(d=o(s.drain))}function n(h){var m,w=typeof h;return null==h||"object"!=w&&"function"!=w||(m=h.then),"function"==typeof m&&m}function i(){for(var h=0;h<this.chain.length;h++)a(this,1===this.state?this.chain[h].success:this.chain[h].failure,this.chain[h]);this.chain.length=0}function a(h,m,w){var u,S;try{!1===m?w.reject(h.msg):(u=!0===m?h.msg:m.call(void 0,h.msg))===w.promise?w.reject(TypeError("Promise-chain cycle")):(S=n(u))?S.call(u,w.resolve,w.reject):w.resolve(u)}catch(_){w.reject(_)}}function c(h){var m,w=this;if(!w.triggered){w.triggered=!0,w.def&&(w=w.def);try{(m=n(h))?r(function(){var u=new x(w);try{m.call(h,function(){c.apply(u,arguments)},function(){p.apply(u,arguments)})}catch(S){p.call(u,S)}}):(w.msg=h,w.state=1,w.chain.length>0&&r(i,w))}catch(u){p.call(new x(w),u)}}}function p(h){var m=this;m.triggered||(m.triggered=!0,m.def&&(m=m.def),m.msg=h,m.state=2,m.chain.length>0&&r(i,m))}function f(h,m,w,u){for(var S=0;S<m.length;S++)!function(_){h.resolve(m[_]).then(function(E){w(_,E)},u)}(S)}function x(h){this.def=h,this.triggered=!1}function v(h){this.promise=h,this.state=0,this.triggered=!1,this.chain=[],this.msg=void 0}function g(h){if("function"!=typeof h)throw TypeError("Not a function");if(0!==this.__NPO__)throw TypeError("Not a promise");this.__NPO__=1;var m=new v(this);this.then=function(w,u){var S={success:"function"!=typeof w||w,failure:"function"==typeof u&&u};return S.promise=new this.constructor(function(_,E){if("function"!=typeof _||"function"!=typeof E)throw TypeError("Not a function");S.resolve=_,S.reject=E}),m.chain.push(S),0!==m.state&&r(i,m),S.promise},this.catch=function(w){return this.then(void 0,w)};try{h.call(void 0,function(w){c.call(m,w)},function(w){p.call(m,w)})}catch(w){p.call(m,w)}}s=function(){var h,m,w;function u(S,_){this.fn=S,this.self=_,this.next=void 0}return{add:function(S,_){w=new u(S,_),m?m.next=w:h=w,m=w,w=void 0},drain:function(){var S=h;for(h=m=d=void 0;S;)S.fn.call(S.self),S=S.next}}}();var y=b({},"constructor",g,!1);return g.prototype=y,b(y,"__NPO__",0,!1),b(g,"resolve",function(h){return h&&"object"==typeof h&&1===h.__NPO__?h:new this(function(m,w){if("function"!=typeof m||"function"!=typeof w)throw TypeError("Not a function");m(h)})}),b(g,"reject",function(h){return new this(function(m,w){if("function"!=typeof m||"function"!=typeof w)throw TypeError("Not a function");w(h)})}),b(g,"all",function(h){var m=this;return"[object Array]"!=t.call(h)?m.reject(TypeError("Not an array")):0===h.length?m.resolve([]):new m(function(w,u){if("function"!=typeof w||"function"!=typeof u)throw TypeError("Not a function");var S=h.length,_=Array(S),E=0;f(m,h,function(L,C){_[L]=C,++E===S&&w(_)},u)})}),b(g,"race",function(h){var m=this;return"[object Array]"!=t.call(h)?m.reject(TypeError("Not an array")):new m(function(w,u){if("function"!=typeof w||"function"!=typeof u)throw TypeError("Not a function");f(m,h,function(S,_){w(_)},u)})}),g}(),$.exports?$.exports=l[A]:void 0===(k=function(){return l[A]}.call(R,e,R,$))||($.exports=k)},18625:function($){var R=Math.PI,e=b(120);function k(d,s,t,o){return["C",d,s,t,o,t,o]}function A(d,s,t,o,r,n){return["C",d/3+.6666666666666666*t,s/3+.6666666666666666*o,r/3+.6666666666666666*t,n/3+.6666666666666666*o,r,n]}function l(d,s,t,o,r,n,i,a,c,p){if(p)S=p[0],_=p[1],w=p[2],u=p[3];else{var f=T(d,s,-r);s=f.y;var x=((d=f.x)-(a=(f=T(a,c,-r)).x))/2,v=(s-(c=f.y))/2,g=x*x/(t*t)+v*v/(o*o);g>1&&(t*=g=Math.sqrt(g),o*=g);var y=t*t,h=o*o,m=(n==i?-1:1)*Math.sqrt(Math.abs((y*h-y*v*v-h*x*x)/(y*v*v+h*x*x)));m==1/0&&(m=1);var w=m*t*v/o+(d+a)/2,u=m*-o*x/t+(s+c)/2,S=Math.asin(((s-u)/o).toFixed(9)),_=Math.asin(((c-u)/o).toFixed(9));(S=d<w?R-S:S)<0&&(S=2*R+S),(_=a<w?R-_:_)<0&&(_=2*R+_),i&&S>_&&(S-=2*R),!i&&_>S&&(_-=2*R)}if(Math.abs(_-S)>e){var E=_,L=a,C=c;_=S+e*(i&&_>S?1:-1);var P=l(a=w+t*Math.cos(_),c=u+o*Math.sin(_),t,o,r,0,i,L,C,[_,E,w,u])}var I=Math.tan((_-S)/4),U=4/3*t*I,z=4/3*o*I,H=[2*d-(d+U*Math.sin(S)),2*s-(s-z*Math.cos(S)),a+U*Math.sin(_),c-z*Math.cos(_),a,c];if(p)return H;P&&(H=H.concat(P));for(var F=0;F<H.length;){var N=T(H[F],H[F+1],r);H[F++]=N.x,H[F++]=N.y}return H}function T(d,s,t){return{x:d*Math.cos(t)-s*Math.sin(t),y:d*Math.sin(t)+s*Math.cos(t)}}function b(d){return d*(R/180)}$.exports=function(d){for(var s,t=[],o=0,r=0,n=0,i=0,a=null,c=null,p=0,f=0,x=0,v=d.length;x<v;x++){var g=d[x],y=g[0];switch(y){case"M":n=g[1],i=g[2];break;case"A":(g=l(p,f,g[1],g[2],b(g[3]),g[4],g[5],g[6],g[7])).unshift("C"),g.length>7&&(t.push(g.splice(0,7)),g.unshift("C"));break;case"S":var h=p,m=f;"C"!=s&&"S"!=s||(h+=h-o,m+=m-r),g=["C",h,m,g[1],g[2],g[3],g[4]];break;case"T":"Q"==s||"T"==s?(a=2*p-a,c=2*f-c):(a=p,c=f),g=A(p,f,a,c,g[1],g[2]);break;case"Q":a=g[1],c=g[2],g=A(p,f,g[1],g[2],g[3],g[4]);break;case"L":g=k(p,f,g[1],g[2]);break;case"H":g=k(p,f,g[1],f);break;case"V":g=k(p,f,p,g[1]);break;case"Z":g=k(p,f,n,i)}s=y,p=g[g.length-2],f=g[g.length-1],g.length>4?(o=g[g.length-4],r=g[g.length-3]):(o=p,r=f),t.push(g)}return t}},56131:function($){"use strict";var R=Object.getOwnPropertySymbols,e=Object.prototype.hasOwnProperty,k=Object.prototype.propertyIsEnumerable;$.exports=function(){try{if(!Object.assign)return!1;var l=new String("abc");if(l[5]="de","5"===Object.getOwnPropertyNames(l)[0])return!1;for(var T={},b=0;b<10;b++)T["_"+String.fromCharCode(b)]=b;if("0123456789"!==Object.getOwnPropertyNames(T).map(function(s){return T[s]}).join(""))return!1;var d={};return"abcdefghijklmnopqrst".split("").forEach(function(s){d[s]=s}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},d)).join("")}catch{return!1}}()?Object.assign:function(l,T){for(var b,d,s=function A(l){if(null==l)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(l)}(l),t=1;t<arguments.length;t++){for(var o in b=Object(arguments[t]))e.call(b,o)&&(s[o]=b[o]);if(R){d=R(b);for(var r=0;r<d.length;r++)k.call(b,d[r])&&(s[d[r]]=b[d[r]])}}return s}},65848:function($){"use strict";var R=function(e){return e!=e};$.exports=function(e,k){return 0===e&&0===k?1/e==1/k:e===k||!(!R(e)||!R(k))}},64003:function($,R,e){"use strict";var k=e(17045),A=e(68222),l=e(65848),T=e(27015),b=e(55572),d=A(T(),Object);k(d,{getPolyfill:T,implementation:l,shim:b}),$.exports=d},27015:function($,R,e){"use strict";var k=e(65848);$.exports=function(){return"function"==typeof Object.is?Object.is:k}},55572:function($,R,e){"use strict";var k=e(27015),A=e(17045);$.exports=function(){var l=k();return A(Object,{is:l},{is:function(){return Object.is!==l}}),l}},99019:function($,R,e){"use strict";var k;if(!Object.keys){var A=Object.prototype.hasOwnProperty,l=Object.prototype.toString,T=e(64178),b=Object.prototype.propertyIsEnumerable,d=!b.call({toString:null},"toString"),s=b.call(function(){},"prototype"),t=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],o=function(i){var a=i.constructor;return a&&a.prototype===i},r={$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},n=function(){if(typeof window>"u")return!1;for(var i in window)try{if(!r["$"+i]&&A.call(window,i)&&null!==window[i]&&"object"==typeof window[i])try{o(window[i])}catch{return!0}}catch{return!0}return!1}();k=function(i){var a=null!==i&&"object"==typeof i,c="[object Function]"===l.call(i),p=T(i),f=a&&"[object String]"===l.call(i),x=[];if(!a&&!c&&!p)throw new TypeError("Object.keys called on a non-object");var v=s&&c;if(f&&i.length>0&&!A.call(i,0))for(var g=0;g<i.length;++g)x.push(String(g));if(p&&i.length>0)for(var y=0;y<i.length;++y)x.push(String(y));else for(var h in i)v&&"prototype"===h||!A.call(i,h)||x.push(String(h));if(d)for(var m=function(u){if(typeof window>"u"||!n)return o(u);try{return o(u)}catch{return!1}}(i),w=0;w<t.length;++w)m&&"constructor"===t[w]||!A.call(i,t[w])||x.push(t[w]);return x}}$.exports=k},8709:function($,R,e){"use strict";var k=Array.prototype.slice,A=e(64178),l=Object.keys,T=l?function(d){return l(d)}:e(99019),b=Object.keys;T.shim=function(){if(Object.keys){var d=function(){var s=Object.keys(arguments);return s&&s.length===arguments.length}(1,2);d||(Object.keys=function(s){return A(s)?b(k.call(s)):b(s)})}else Object.keys=T;return Object.keys||T},$.exports=T},64178:function($){"use strict";var R=Object.prototype.toString;$.exports=function(e){var k=R.call(e),A="[object Arguments]"===k;return A||(A="[object Array]"!==k&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===R.call(e.callee)),A}},88641:function($){"use strict";function R(A,l){if("string"!=typeof A)return[A];var T=[A];"string"==typeof l||Array.isArray(l)?l={brackets:l}:l||(l={});var b=l.brackets?Array.isArray(l.brackets)?l.brackets:[l.brackets]:["{}","[]","()"],d=l.escape||"___",s=!!l.flat;b.forEach(function(o){var r=new RegExp(["\\",o[0],"[^\\",o[0],"\\",o[1],"]*\\",o[1]].join("")),n=[];function i(a,c,p){var f=T.push(a.slice(o[0].length,-o[1].length))-1;return n.push(f),d+f+d}T.forEach(function(a,c){for(var p,f=0;a!=p;)if(p=a,a=a.replace(r,i),f++>1e4)throw Error("References have circular dependency. Please, check them.");T[c]=a}),n=n.reverse(),T=T.map(function(a){return n.forEach(function(c){a=a.replace(new RegExp("(\\"+d+c+"\\"+d+")","g"),o[0]+"$1"+o[1])}),a})});var t=new RegExp("\\"+d+"([0-9]+)\\"+d);return s?T:function o(r,n,i){for(var a,c=[],p=0;a=t.exec(r);){if(p++>1e4)throw Error("Circular references in parenthesis");c.push(r.slice(0,a.index)),c.push(o(n[a[1]],n)),r=r.slice(a.index+a[0].length)}return c.push(r),c}(T[0],T)}function e(A,l){if(l&&l.flat){var T,b=l&&l.escape||"___",d=A[0];if(!d)return"";for(var s=new RegExp("\\"+b+"([0-9]+)\\"+b),t=0;d!=T;){if(t++>1e4)throw Error("Circular references in "+A);T=d,d=d.replace(s,o)}return d}return A.reduce(function r(n,i){return Array.isArray(i)&&(i=i.reduce(r,"")),n+i},"");function o(r,n){if(null==A[n])throw Error("Reference "+n+"is undefined");return A[n]}}function k(A,l){return Array.isArray(A)?e(A,l):R(A,l)}k.parse=R,k.stringify=e,$.exports=k},18863:function($,R,e){"use strict";var k=e(71299);$.exports=function(A){var l;return arguments.length>1&&(A=arguments),"string"==typeof A?A=A.split(/\s/).map(parseFloat):"number"==typeof A&&(A=[A]),A.length&&"number"==typeof A[0]?l=1===A.length?{width:A[0],height:A[0],x:0,y:0}:2===A.length?{width:A[0],height:A[1],x:0,y:0}:{x:A[0],y:A[1],width:A[2]-A[0]||0,height:A[3]-A[1]||0}:A&&((l={x:(A=k(A,{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:A.top||0}).width=null==A.width?A.right?A.right-l.x:0:A.width,l.height=null==A.height?A.bottom?A.bottom-l.y:0:A.height),l}},95616:function($){$.exports=function(A){var l=[];return A.replace(e,function(T,b,d){var o,s=b.toLowerCase();for(o=void 0,d=(o=d.match(k))?o.map(Number):[],"m"==s&&d.length>2&&(l.push([b].concat(d.splice(0,2))),s="l",b="m"==b?"l":"L");;){if(d.length==R[s])return d.unshift(b),l.push(d);if(d.length<R[s])throw new Error("malformed path data");l.push([b].concat(d.splice(0,R[s])))}}),l};var R={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=/([astvzqmhlc])([^astvzqmhlc]*)/gi,k=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi},25677:function($){$.exports=function(R,e){e||(e=[0,""]),R=String(R);var k=parseFloat(R,10);return e[0]=k,e[1]=R.match(/[\d.\-\+]*\s*(.*)/)[1]||"",e}},9748:function($,R,e){var k=e(90386);(function(){var A,l,T,b,d,s;typeof performance<"u"&&null!==performance&&performance.now?$.exports=function(){return performance.now()}:null!=k&&k.hrtime?($.exports=function(){return(A()-d)/1e6},l=k.hrtime,b=(A=function(){var t;return 1e9*(t=l())[0]+t[1]})(),s=1e9*k.uptime(),d=b-s):Date.now?($.exports=function(){return Date.now()-T},T=Date.now()):($.exports=function(){return(new Date).getTime()-T},T=(new Date).getTime())}).call(this)},71299:function($){"use strict";$.exports=function(k,A,l){var T,b,d={};if("string"==typeof A&&(A=e(A)),Array.isArray(A)){var s={};for(b=0;b<A.length;b++)s[A[b]]=!0;A=s}for(T in A)A[T]=e(A[T]);var t={};for(T in A){var o=A[T];if(Array.isArray(o))for(b=0;b<o.length;b++){var r=o[b];if(l&&(t[r]=!0),r in k){if(d[T]=k[r],l)for(var n=b;n<o.length;n++)t[o[n]]=!0;break}}else T in k&&(A[T]&&(d[T]=k[T]),l&&(t[T]=!0))}if(l)for(T in k)t[T]||(d[T]=k[T]);return d};var R={};function e(k){return R[k]?R[k]:("string"==typeof k&&(k=R[k]=k.split(/\s*,\s*|\s+/)),k)}},38258:function($){$.exports=function(R,e,k,A){var l=R[0],T=R[1],b=!1;void 0===k&&(k=0),void 0===A&&(A=e.length);for(var d=A-k,s=0,t=d-1;s<d;t=s++){var o=e[s+k][0],r=e[s+k][1],i=e[t+k][1];r>T!=i>T&&l<(e[t+k][0]-o)*(T-r)/(i-r)+o&&(b=!b)}return b}},52142:function($,R,e){var k,A=e(69444),l=e(29023),T=e(87263),b=e(11328),d=e(55968),s=e(10670),t=!1,o=l();function r(n,i,a){var c=k.segments(n),p=k.segments(i),f=a(k.combine(c,p));return k.polygon(f)}k={buildLog:function(n){return!0===n?t=A():!1===n&&(t=!1),!1!==t&&t.list},epsilon:function(n){return o.epsilon(n)},segments:function(n){var i=T(!0,o,t);return n.regions.forEach(i.addRegion),{segments:i.calculate(n.inverted),inverted:n.inverted}},combine:function(n,i){return{combined:T(!1,o,t).calculate(n.segments,n.inverted,i.segments,i.inverted),inverted1:n.inverted,inverted2:i.inverted}},selectUnion:function(n){return{segments:d.union(n.combined,t),inverted:n.inverted1||n.inverted2}},selectIntersect:function(n){return{segments:d.intersect(n.combined,t),inverted:n.inverted1&&n.inverted2}},selectDifference:function(n){return{segments:d.difference(n.combined,t),inverted:n.inverted1&&!n.inverted2}},selectDifferenceRev:function(n){return{segments:d.differenceRev(n.combined,t),inverted:!n.inverted1&&n.inverted2}},selectXor:function(n){return{segments:d.xor(n.combined,t),inverted:n.inverted1!==n.inverted2}},polygon:function(n){return{regions:b(n.segments,o,t),inverted:n.inverted}},polygonFromGeoJSON:function(n){return s.toPolygon(k,n)},polygonToGeoJSON:function(n){return s.fromPolygon(k,o,n)},union:function(n,i){return r(n,i,k.selectUnion)},intersect:function(n,i){return r(n,i,k.selectIntersect)},difference:function(n,i){return r(n,i,k.selectDifference)},differenceRev:function(n,i){return r(n,i,k.selectDifferenceRev)},xor:function(n,i){return r(n,i,k.selectXor)}},"object"==typeof window&&(window.PolyBool=k),$.exports=k},69444:function($){$.exports=function(){var R,e=0,k=!1;function A(l,T){return R.list.push({type:l,data:T?JSON.parse(JSON.stringify(T)):void 0}),R}return R={list:[],segmentId:function(){return e++},checkIntersection:function(l,T){return A("check",{seg1:l,seg2:T})},segmentChop:function(l,T){return A("div_seg",{seg:l,pt:T}),A("chop",{seg:l,pt:T})},statusRemove:function(l){return A("pop_seg",{seg:l})},segmentUpdate:function(l){return A("seg_update",{seg:l})},segmentNew:function(l,T){return A("new_seg",{seg:l,primary:T})},segmentRemove:function(l){return A("rem_seg",{seg:l})},tempStatus:function(l,T,b){return A("temp_status",{seg:l,above:T,below:b})},rewind:function(l){return A("rewind",{seg:l})},status:function(l,T,b){return A("status",{seg:l,above:T,below:b})},vert:function(l){return l===k?R:(k=l,A("vert",{x:l}))},log:function(l){return"string"!=typeof l&&(l=JSON.stringify(l,!1,"  ")),A("log",{txt:l})},reset:function(){return A("reset")},selected:function(l){return A("selected",{segs:l})},chainStart:function(l){return A("chain_start",{seg:l})},chainRemoveHead:function(l,T){return A("chain_rem_head",{index:l,pt:T})},chainRemoveTail:function(l,T){return A("chain_rem_tail",{index:l,pt:T})},chainNew:function(l,T){return A("chain_new",{pt1:l,pt2:T})},chainMatch:function(l){return A("chain_match",{index:l})},chainClose:function(l){return A("chain_close",{index:l})},chainAddHead:function(l,T){return A("chain_add_head",{index:l,pt:T})},chainAddTail:function(l,T){return A("chain_add_tail",{index:l,pt:T})},chainConnect:function(l,T){return A("chain_con",{index1:l,index2:T})},chainReverse:function(l){return A("chain_rev",{index:l})},chainJoin:function(l,T){return A("chain_join",{index1:l,index2:T})},done:function(){return A("done")}}}},29023:function($){$.exports=function(R){"number"!=typeof R&&(R=1e-10);var e={epsilon:function(k){return"number"==typeof k&&(R=k),R},pointAboveOrOnLine:function(k,A,l){var T=A[0],b=A[1];return(l[0]-T)*(k[1]-b)-(l[1]-b)*(k[0]-T)>=-R},pointBetween:function(k,A,l){var b=l[0]-A[0],s=l[1]-A[1],t=(k[0]-A[0])*b+(k[1]-A[1])*s;return!(t<R||t-(b*b+s*s)>-R)},pointsSameX:function(k,A){return Math.abs(k[0]-A[0])<R},pointsSameY:function(k,A){return Math.abs(k[1]-A[1])<R},pointsSame:function(k,A){return e.pointsSameX(k,A)&&e.pointsSameY(k,A)},pointsCompare:function(k,A){return e.pointsSameX(k,A)?e.pointsSameY(k,A)?0:k[1]<A[1]?-1:1:k[0]<A[0]?-1:1},pointsCollinear:function(k,A,l){return Math.abs((k[0]-A[0])*(A[1]-l[1])-(A[0]-l[0])*(k[1]-A[1]))<R},linesIntersect:function(k,A,l,T){var b=A[0]-k[0],d=A[1]-k[1],s=T[0]-l[0],t=T[1]-l[1],o=b*t-d*s;if(Math.abs(o)<R)return!1;var r=k[0]-l[0],n=k[1]-l[1],i=(s*n-t*r)/o,a=(b*n-d*r)/o,c={alongA:0,alongB:0,pt:[k[0]+i*b,k[1]+i*d]};return c.alongA=i<=-R?-2:i<R?-1:i-1<=-R?0:i-1<R?1:2,c.alongB=a<=-R?-2:a<R?-1:a-1<=-R?0:a-1<R?1:2,c},pointInsideRegion:function(k,A){for(var l=k[0],T=k[1],b=A[A.length-1][0],d=A[A.length-1][1],s=!1,t=0;t<A.length;t++){var o=A[t][0],r=A[t][1];r-T>R!=d-T>R&&(b-o)*(T-r)/(d-r)+o-l>R&&(s=!s),b=o,d=r}return s}};return e}},10670:function($){$.exports={toPolygon:function(e,k){function A(b){if(b.length<=0)return e.segments({inverted:!1,regions:[]});function d(o){var r=o.slice(0,o.length-1);return e.segments({inverted:!1,regions:[r]})}for(var s=d(b[0]),t=1;t<b.length;t++)s=e.selectDifference(e.combine(s,d(b[t])));return s}if("Polygon"===k.type)return e.polygon(A(k.coordinates));if("MultiPolygon"===k.type){for(var l=e.segments({inverted:!1,regions:[]}),T=0;T<k.coordinates.length;T++)l=e.selectUnion(e.combine(l,A(k.coordinates[T])));return e.polygon(l)}throw new Error("PolyBool: Cannot convert GeoJSON object to PolyBool polygon")},fromPolygon:function(e,k,A){function l(a,c){return k.pointInsideRegion([.5*(a[0][0]+a[1][0]),.5*(a[0][1]+a[1][1])],c)}function T(a){return{region:a,children:[]}}A=e.polygon(e.segments(A));var b=T(null);function d(a,c){for(var p=0;p<a.children.length;p++)if(l(c,(x=a.children[p]).region))return void d(x,c);var f=T(c);for(p=0;p<a.children.length;p++){var x;l((x=a.children[p]).region,c)&&(f.children.push(x),a.children.splice(p,1),p--)}a.children.push(f)}for(var s=0;s<A.regions.length;s++){var t=A.regions[s];t.length<3||d(b,t)}function o(a,c){for(var p=0,f=a[a.length-1][0],x=a[a.length-1][1],v=[],g=0;g<a.length;g++){var y=a[g][0],h=a[g][1];v.push([y,h]),p+=h*f-y*x,f=y,x=h}return p<0!==c&&v.reverse(),v.push([v[0][0],v[0][1]]),v}var r=[];function n(a){var c=[o(a.region,!1)];r.push(c);for(var p=0;p<a.children.length;p++)c.push(i(a.children[p]))}function i(a){for(var c=0;c<a.children.length;c++)n(a.children[c]);return o(a.region,!0)}for(s=0;s<b.children.length;s++)n(b.children[s]);return r.length<=0?{type:"Polygon",coordinates:[]}:1==r.length?{type:"Polygon",coordinates:r[0]}:{type:"MultiPolygon",coordinates:r}}}},87263:function($,R,e){var k=e(26859);$.exports=function(A,l,T){function b(n,i,a){return{id:T?T.segmentId():-1,start:n,end:i,myFill:{above:a.myFill.above,below:a.myFill.below},otherFill:null}}var d=k.create();function s(n,i){d.insertBefore(n,function(a){return c=n.isStart,f=i,x=a.isStart,g=a.other.pt,(0!==(y=l.pointsCompare(n.pt,v=a.pt))?y:l.pointsSame(f,g)?0:c!==x?c?1:-1:l.pointAboveOrOnLine(f,x?v:g,x?g:v)?1:-1)<0;var c,f,x,v,g,y})}function t(n,i){var c,f,a=(s(f=k.node({isStart:!0,pt:(c=n).start,seg:c,primary:i,other:null,status:null}),c.end),f);return function(c,p,f){var x=k.node({isStart:!1,pt:p.end,seg:p,primary:f,other:c,status:null});c.other=x,s(x,c.pt)}(a,n,i),a}function o(n,i){var c,p,a=b(i,n.seg.end,n.seg);return c=n,p=i,T&&T.segmentChop(c.seg,p),c.other.remove(),c.seg.end=p,c.other.pt=p,s(c.other,c.pt),t(a,n.primary)}function r(n,i){var a=k.create();function c(E){return a.findTransition(function(L){var C,P,I,U,z,H;return U=(C=E).seg.end,(l.pointsCollinear(I=C.seg.start,z=(P=L.ev).seg.start,H=P.seg.end)?l.pointsCollinear(U,z,H)||l.pointAboveOrOnLine(U,z,H)?1:-1:l.pointAboveOrOnLine(I,z,H)?1:-1)>0})}function p(E,L){var C=E.seg,P=L.seg,I=C.start,U=C.end,z=P.start,H=P.end;T&&T.checkIntersection(C,P);var F=l.linesIntersect(I,U,z,H);if(!1===F){if(!l.pointsCollinear(I,U,z)||l.pointsSame(I,H)||l.pointsSame(U,z))return!1;var N=l.pointsSame(I,z),B=l.pointsSame(U,H);if(N&&B)return L;var j=!N&&l.pointBetween(I,z,H),J=!B&&l.pointBetween(U,z,H);if(N)return J?o(L,U):o(E,H),L;j&&(B||(J?o(L,U):o(E,H)),o(L,I))}else 0===F.alongA&&(-1===F.alongB?o(E,z):0===F.alongB?o(E,F.pt):1===F.alongB&&o(E,H)),0===F.alongB&&(-1===F.alongA?o(L,I):0===F.alongA?o(L,F.pt):1===F.alongA&&o(L,U));return!1}for(var f=[];!d.isEmpty();){var x=d.getHead();if(T&&T.vert(x.pt[0]),x.isStart){let E=function(){if(g){var L=p(x,g);if(L)return L}return!!y&&p(x,y)};T&&T.segmentNew(x.seg,x.primary);var v=c(x),g=v.before?v.before.ev:null,y=v.after?v.after.ev:null;T&&T.tempStatus(x.seg,!!g&&g.seg,!!y&&y.seg);var h,m,w=E();if(w&&(A?(m=null===x.seg.myFill.below||x.seg.myFill.above!==x.seg.myFill.below)&&(w.seg.myFill.above=!w.seg.myFill.above):w.seg.otherFill=x.seg.myFill,T&&T.segmentUpdate(w.seg),x.other.remove(),x.remove()),d.getHead()!==x){T&&T.rewind(x.seg);continue}A?(m=null===x.seg.myFill.below||x.seg.myFill.above!==x.seg.myFill.below,x.seg.myFill.below=y?y.seg.myFill.above:n,x.seg.myFill.above=m?!x.seg.myFill.below:x.seg.myFill.below):null===x.seg.otherFill&&(x.seg.otherFill={above:h=y?x.primary===y.primary?y.seg.otherFill.above:y.seg.myFill.above:x.primary?i:n,below:h}),T&&T.status(x.seg,!!g&&g.seg,!!y&&y.seg),x.other.status=v.insert(k.node({ev:x}))}else{var u=x.status;if(null===u)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(a.exists(u.prev)&&a.exists(u.next)&&p(u.prev.ev,u.next.ev),T&&T.statusRemove(u.ev.seg),u.remove(),!x.primary){var S=x.seg.myFill;x.seg.myFill=x.seg.otherFill,x.seg.otherFill=S}f.push(x.seg)}d.getHead().remove()}return T&&T.done(),f}return A?{addRegion:function(n){for(var i,a,c,p=n[n.length-1],f=0;f<n.length;f++){var x=l.pointsCompare(i=p,p=n[f]);0!==x&&t((a=x<0?i:p,c=x<0?p:i,{id:T?T.segmentId():-1,start:a,end:c,myFill:{above:null,below:null},otherFill:null}),!0)}},calculate:function(n){return r(n,!1)}}:{calculate:function(n,i,a,c){return n.forEach(function(p){t(b(p.start,p.end,p),!0)}),a.forEach(function(p){t(b(p.start,p.end,p),!1)}),r(i,c)}}}},26859:function($){$.exports={create:function(){var R={root:{root:!0,next:null},exists:function(e){return null!==e&&e!==R.root},isEmpty:function(){return null===R.root.next},getHead:function(){return R.root.next},insertBefore:function(e,k){for(var A=R.root,l=R.root.next;null!==l;){if(k(l))return e.prev=l.prev,e.next=l,l.prev.next=e,void(l.prev=e);A=l,l=l.next}A.next=e,e.prev=A,e.next=null},findTransition:function(e){for(var k=R.root,A=R.root.next;null!==A&&!e(A);)k=A,A=A.next;return{before:k===R.root?null:k,after:A,insert:function(l){return l.prev=k,l.next=A,k.next=l,null!==A&&(A.prev=l),l}}}};return R},node:function(R){return R.prev=null,R.next=null,R.remove=function(){R.prev.next=R.next,R.next&&(R.next.prev=R.prev),R.prev=null,R.next=null},R}}},11328:function($){$.exports=function(R,e,k){var A=[],l=[];return R.forEach(function(T){var b=T.start,d=T.end;if(e.pointsSame(b,d))console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");else{k&&k.chainStart(T);for(var s={index:0,matches_head:!1,matches_pt1:!1},t={index:0,matches_head:!1,matches_pt1:!1},o=s,r=0;r<A.length;r++){var n=(f=A[r])[0],i=f[f.length-1];if(e.pointsSame(n,b)){if(u(r,!0,!0))break}else if(e.pointsSame(n,d)){if(u(r,!0,!1))break}else if(e.pointsSame(i,b)){if(u(r,!1,!0))break}else if(e.pointsSame(i,d)&&u(r,!1,!1))break}if(o===s)return A.push([b,d]),void(k&&k.chainNew(b,d));if(o===t){k&&k.chainMatch(s.index);var a=s.index,c=s.matches_pt1?d:b,p=s.matches_head,f=A[a],x=p?f[0]:f[f.length-1],v=p?f[1]:f[f.length-2],g=p?f[f.length-1]:f[0],y=p?f[f.length-2]:f[1];return e.pointsCollinear(v,x,c)&&(p?(k&&k.chainRemoveHead(s.index,c),f.shift()):(k&&k.chainRemoveTail(s.index,c),f.pop()),x=v),e.pointsSame(g,c)?(A.splice(a,1),e.pointsCollinear(y,g,x)&&(p?(k&&k.chainRemoveTail(s.index,x),f.pop()):(k&&k.chainRemoveHead(s.index,x),f.shift())),k&&k.chainClose(s.index),void l.push(f)):void(p?(k&&k.chainAddHead(s.index,c),f.unshift(c)):(k&&k.chainAddTail(s.index,c),f.push(c)))}var h=s.index,m=t.index;k&&k.chainConnect(h,m);var w=A[h].length<A[m].length;s.matches_head?t.matches_head?w?(S(h),_(h,m)):(S(m),_(m,h)):_(m,h):t.matches_head?_(h,m):w?(S(h),_(m,h)):(S(m),_(h,m))}function u(E,L,C){return o.index=E,o.matches_head=L,o.matches_pt1=C,o===s?(o=t,!1):(o=null,!0)}function S(E){k&&k.chainReverse(E),A[E].reverse()}function _(E,L){var C=A[E],P=A[L],I=C[C.length-1],U=C[C.length-2],z=P[0],H=P[1];e.pointsCollinear(U,I,z)&&(k&&k.chainRemoveTail(E,I),C.pop(),I=U),e.pointsCollinear(I,z,H)&&(k&&k.chainRemoveHead(L,z),P.shift()),k&&k.chainJoin(E,L),A[E]=C.concat(P),A.splice(L,1)}}),l}},55968:function($){function R(k,A,l){var T=[];return k.forEach(function(b){var d=(b.myFill.above?8:0)+(b.myFill.below?4:0)+(b.otherFill&&b.otherFill.above?2:0)+(b.otherFill&&b.otherFill.below?1:0);0!==A[d]&&T.push({id:l?l.segmentId():-1,start:b.start,end:b.end,myFill:{above:1===A[d],below:2===A[d]},otherFill:null})}),l&&l.selected(T),T}$.exports={union:function(k,A){return R(k,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],A)},intersect:function(k,A){return R(k,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],A)},difference:function(k,A){return R(k,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],A)},differenceRev:function(k,A){return R(k,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],A)},xor:function(k,A){return R(k,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],A)}}},14847:function($,R,e){"use strict";var k=e(21630).Transform,A=e(90715);function l(){k.call(this,{readableObjectMode:!0})}function T(b,d,s){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||"",this.name=this.constructor.name,this.message=b,d&&(this.code=d),s&&(this.statusCode=s)}(l.prototype=Object.create(k.prototype)).constructor=l,A(l.prototype),R.OF=function(b,d,s){for(var t=d,o=0;o<s.length;)if(b[t++]!==s[o++])return!1;return!0},R.eG=function(b,d){var s=[],t=0;if(d&&"hex"===d)for(;t<b.length;)s.push(parseInt(b.slice(t,t+2),16)),t+=2;else for(;t<b.length;t++)s.push(255&b.charCodeAt(t));return s},R.mP=function(b,d){return b[d]|b[d+1]<<8},R.n8=function(b,d){return b[d+1]|b[d]<<8},R.nm=function(b,d){return b[d]|b[d+1]<<8|b[d+2]<<16|16777216*b[d+3]},R.Ag=function(b,d){return b[d+3]|b[d+2]<<8|b[d+1]<<16|16777216*b[d]},(T.prototype=Object.create(Error.prototype)).constructor=T},71371:function($){"use strict";function R(A,l){var T=new Error(A);return T.code=l,T}function e(A){try{return decodeURIComponent(escape(A))}catch{return A}}function k(A,l,T){this.input=A.subarray(l,T),this.start=l;var b=String.fromCharCode.apply(null,this.input.subarray(0,4));if("II*\0"!==b&&"MM\0*"!==b)throw R("invalid TIFF signature","EBADDATA");this.big_endian="M"===b[0]}k.prototype.each=function(A){this.aborted=!1;var l=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:l}];this.ifds_to_read.length>0&&!this.aborted;){var T=this.ifds_to_read.shift();T.offset&&this.scan_ifd(T.id,T.offset,A)}},k.prototype.read_uint16=function(A){var l=this.input;if(A+2>l.length)throw R("unexpected EOF","EBADDATA");return this.big_endian?256*l[A]+l[A+1]:l[A]+256*l[A+1]},k.prototype.read_uint32=function(A){var l=this.input;if(A+4>l.length)throw R("unexpected EOF","EBADDATA");return this.big_endian?16777216*l[A]+65536*l[A+1]+256*l[A+2]+l[A+3]:l[A]+256*l[A+1]+65536*l[A+2]+16777216*l[A+3]},k.prototype.is_subifd_link=function(A,l){return 0===A&&34665===l||0===A&&34853===l||34665===A&&40965===l},k.prototype.exif_format_length=function(A){switch(A){case 1:case 2:case 6:case 7:return 1;case 3:case 8:return 2;case 4:case 9:case 11:return 4;case 5:case 10:case 12:return 8;default:return 0}},k.prototype.exif_format_read=function(A,l){var T;switch(A){case 1:case 2:return this.input[l];case 6:return(T=this.input[l])|33554430*(128&T);case 3:return this.read_uint16(l);case 8:return(T=this.read_uint16(l))|131070*(32768&T);case 4:return this.read_uint32(l);case 9:return 0|this.read_uint32(l);default:return null}},k.prototype.scan_ifd=function(A,l,T){var b=this.read_uint16(l);l+=2;for(var d=0;d<b;d++){var s=this.read_uint16(l),t=this.read_uint16(l+2),o=this.read_uint32(l+4),r=this.exif_format_length(t),n=o*r,i=n<=4?l+8:this.read_uint32(l+8),a=!1;if(i+n>this.input.length)throw R("unexpected EOF","EBADDATA");for(var c=[],p=i,f=0;f<o;f++,p+=r){var x=this.exif_format_read(t,p);if(null===x){c=null;break}c.push(x)}if(Array.isArray(c)&&2===t&&(c=e(String.fromCharCode.apply(null,c)))&&"\0"===c[c.length-1]&&(c=c.slice(0,-1)),this.is_subifd_link(A,s)&&Array.isArray(c)&&Number.isInteger(c[0])&&c[0]>0&&(this.ifds_to_read.push({id:s,offset:c[0]}),a=!0),!1===T({is_big_endian:this.big_endian,ifd:A,tag:s,format:t,count:o,entry_offset:l+this.start,data_length:n,data_offset:i+this.start,value:c,is_subifd_link:a}))return void(this.aborted=!0);l+=12}0===A&&this.ifds_to_read.push({id:1,offset:this.read_uint32(l)})},$.exports.ExifParser=k,$.exports.get_orientation=function(A){var l=0;try{return new k(A,0,A.length).each(function(T){if(0===T.ifd&&274===T.tag&&Array.isArray(T.value))return l=T.value[0],!1}),l}catch{return-1}}},76767:function($,R,e){"use strict";var k=e(14847).n8,A=e(14847).Ag;function l(o,r){if(o.length<4+r)return null;var n=A(o,r);return o.length<n+r||n<8?null:{boxtype:String.fromCharCode.apply(null,o.slice(r+4,r+8)),data:o.slice(r+8,r+n),end:r+n}}function T(o,r){for(var n=0;;){var i=l(o,n);if(!i)break;switch(i.boxtype){case"ispe":r.sizes.push({width:A(i.data,4),height:A(i.data,8)});break;case"irot":r.transforms.push({type:"irot",value:3&i.data[0]});break;case"imir":r.transforms.push({type:"imir",value:1&i.data[0]})}n=i.end}}function b(o,r,n){for(var i=0,a=0;a<n;a++)i=256*i+(o[r+a]||0);return i}function d(o,r){for(var n=o[4]>>4&15,i=15&o[4],a=o[5]>>4&15,c=k(o,6),p=8,f=0;f<c;f++){var x=k(o,p),v=k(o,p+=2),g=b(o,p+=2,a),y=k(o,p+=a);if(p+=2,0===v&&1===y){var h=b(o,p,n),m=b(o,p+n,i);r.item_loc[x]={length:m,offset:h+g}}p+=y*(n+i)}}function s(o,r){for(var n=k(o,4),i=6,a=0;a<n;a++){var c=l(o,i);if(!c)break;if("infe"===c.boxtype){for(var p=k(c.data,4),f="",x=8;x<c.data.length&&c.data[x];x++)f+=String.fromCharCode(c.data[x]);r.item_inf[f]=p}i=c.end}}function t(o,r){for(var n=0;;){var i=l(o,n);if(!i)break;"ipco"===i.boxtype&&T(i.data,r),n=i.end}}$.exports.unbox=l,$.exports.readSizeFromMeta=function(o){var r={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(function(x,v){for(var g=4;;){var y=l(x,g);if(!y)break;"iprp"===y.boxtype&&t(y.data,v),"iloc"===y.boxtype&&d(y.data,v),"iinf"===y.boxtype&&s(y.data,v),g=y.end}}(o,r),r.sizes.length){var n,i,a,c=(i=(n=r.sizes).reduce(function(x,v){return x.width>v.width||x.width===v.width&&x.height>v.height?x:v}),a=n.reduce(function(x,v){return x.height>v.height||x.height===v.height&&x.width>v.width?x:v}),i.width>a.height||i.width===a.height&&i.height>a.width?i:a),p=1;r.transforms.forEach(function(x){var v={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},g={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if("imir"===x.type&&(p=0===x.value?g[p]:v[p=v[p=g[p]]]),"irot"===x.type)for(var y=0;y<x.value;y++)p=v[p]});var f=null;return r.item_inf.Exif&&(f=r.item_loc[r.item_inf.Exif]),{width:c.width,height:c.height,orientation:r.transforms.length?p:null,variants:r.sizes,exif_location:f}}},$.exports.getMimeType=function(o){var r=String.fromCharCode.apply(null,o.slice(0,4)),n={};n[r]=!0;for(var i=8;i<o.length;i+=4)n[String.fromCharCode.apply(null,o.slice(i,i+4))]=!0;if(n.mif1||n.msf1||n.miaf)return"avif"===r||"avis"===r||"avio"===r?{type:"avif",mime:"image/avif"}:"heic"===r||"heix"===r?{type:"heic",mime:"image/heic"}:"hevc"===r||"hevx"===r?{type:"heic",mime:"image/heic-sequence"}:n.avif||n.avis?{type:"avif",mime:"image/avif"}:n.heic||n.heix||n.hevc||n.hevx||n.heis?n.msf1?{type:"heif",mime:"image/heif-sequence"}:{type:"heif",mime:"image/heif"}:{type:"avif",mime:"image/avif"}}},24461:function($,R,e){"use strict";var k=e(14847).eG,A=e(14847).OF,l=e(14847).Ag,T=e(76767),b=e(71371),d=k("ftyp");$.exports=function(s){if(A(s,4,d)){var t=T.unbox(s,0);if(t){var o=T.getMimeType(t.data);if(o){for(var r,n=t.end;;){var i=T.unbox(s,n);if(!i)break;if(n=i.end,"mdat"===i.boxtype)return;if("meta"===i.boxtype){r=i.data;break}}if(r){var a=T.readSizeFromMeta(r);if(a){var c={width:a.width,height:a.height,type:o.type,mime:o.mime,wUnits:"px",hUnits:"px"};if(a.variants.length>1&&(c.variants=a.variants),a.orientation&&(c.orientation=a.orientation),a.exif_location&&a.exif_location.offset+a.exif_location.length<=s.length){var p=l(s,a.exif_location.offset),f=s.slice(a.exif_location.offset+p+4,a.exif_location.offset+a.exif_location.length),x=b.get_orientation(f);x>0&&(c.orientation=x)}return c}}}}}}},2504:function($,R,e){"use strict";var k=e(14847).eG,A=e(14847).OF,l=e(14847).mP,T=k("BM");$.exports=function(b){if(!(b.length<26)&&A(b,0,T))return{width:l(b,18),height:l(b,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},47342:function($,R,e){"use strict";var k=e(14847).eG,A=e(14847).OF,l=e(14847).mP,T=k("GIF87a"),b=k("GIF89a");$.exports=function(d){if(!(d.length<10)&&(A(d,0,T)||A(d,0,b)))return{width:l(d,6),height:l(d,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},31355:function($,R,e){"use strict";var k=e(14847).mP;$.exports=function(A){var l=k(A,0),T=k(A,2),b=k(A,4);if(0===l&&1===T&&b){for(var d=[],s={width:0,height:0},t=0;t<b;t++){var o=A[6+16*t]||256,r=A[6+16*t+1]||256,n={width:o,height:r};d.push(n),(o>s.width||r>s.height)&&(s=n)}return{width:s.width,height:s.height,variants:d,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},54261:function($,R,e){"use strict";var k=e(14847).n8,A=e(14847).eG,l=e(14847).OF,T=e(71371),b=A("Exif\0\0");$.exports=function(d){if(!(d.length<2)&&255===d[0]&&216===d[1]&&255===d[2])for(var s=2;;){for(;;){if(d.length-s<2)return;if(255===d[s++])break}for(var t,o,r=d[s++];255===r;)r=d[s++];if(208<=r&&r<=217||1===r)t=0;else{if(!(192<=r&&r<=254)||d.length-s<2)return;t=k(d,s)-2,s+=2}if(217===r||218===r)return;if(225===r&&t>=10&&l(d,s,b)&&(o=T.get_orientation(d.slice(s+6,s+t))),t>=5&&192<=r&&r<=207&&196!==r&&200!==r&&204!==r){if(d.length-s<t)return;var n={width:k(d,s+3),height:k(d,s+1),type:"jpg",mime:"image/jpeg",wUnits:"px",hUnits:"px"};return o>0&&(n.orientation=o),n}s+=t}}},6303:function($,R,e){"use strict";var k=e(14847).eG,A=e(14847).OF,l=e(14847).Ag,T=k("\x89PNG\r\n\x1a\n"),b=k("IHDR");$.exports=function(d){if(!(d.length<24)&&A(d,0,T)&&A(d,12,b))return{width:l(d,16),height:l(d,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},38689:function($,R,e){"use strict";var k=e(14847).eG,A=e(14847).OF,l=e(14847).Ag,T=k("8BPS\0\x01");$.exports=function(b){if(!(b.length<22)&&A(b,0,T))return{width:l(b,18),height:l(b,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},6881:function($){"use strict";function R(s){return"number"==typeof s&&isFinite(s)&&s>0}var e=/<[-_.:a-zA-Z0-9][^>]*>/,k=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,A=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,l=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,T=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,b=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function d(s){return b.test(s)?s.match(b)[0]:"px"}$.exports=function(s){if(function(g){var y,h=0,m=g.length;for(239===g[0]&&187===g[1]&&191===g[2]&&(h=3);h<m&&(32===(y=g[h])||9===y||13===y||10===y);)h++;return h!==m&&60===g[h]}(s)){for(var t="",o=0;o<s.length;o++)t+=String.fromCharCode(s[o]);var r=(t.match(e)||[""])[0];if(k.test(r)){var n=(y=(g=r).match(A),h=g.match(l),m=g.match(T),{width:y&&(y[1]||y[2]),height:h&&(h[1]||h[2]),viewbox:m&&(m[1]||m[2])}),i=parseFloat(n.width),a=parseFloat(n.height);if(n.width&&n.height)return R(i)&&R(a)?{width:i,height:a,type:"svg",mime:"image/svg+xml",wUnits:d(n.width),hUnits:d(n.height)}:void 0;var c=(n.viewbox||"").split(" "),p={width:c[2],height:c[3]},f=parseFloat(p.width),x=parseFloat(p.height);if(R(f)&&R(x)&&d(p.width)===d(p.height)){var v=f/x;return n.width?R(i)?{width:i,height:i/v,type:"svg",mime:"image/svg+xml",wUnits:d(n.width),hUnits:d(n.width)}:void 0:n.height?R(a)?{width:a*v,height:a,type:"svg",mime:"image/svg+xml",wUnits:d(n.height),hUnits:d(n.height)}:void 0:{width:f,height:x,type:"svg",mime:"image/svg+xml",wUnits:d(p.width),hUnits:d(p.height)}}}}var g,y,h,m}},66278:function($,R,e){"use strict";var k=e(14847).eG,A=e(14847).OF,l=e(14847).mP,T=e(14847).n8,b=e(14847).nm,d=e(14847).Ag,s=k("II*\0"),t=k("MM\0*");function o(i,a,c){return c?T(i,a):l(i,a)}function r(i,a,c){return c?d(i,a):b(i,a)}function n(i,a,c){var p=o(i,a+2,c);return 1!==r(i,a+4,c)||3!==p&&4!==p?null:3===p?o(i,a+8,c):r(i,a+8,c)}$.exports=function(i){if(!(i.length<8)&&(A(i,0,s)||A(i,0,t))){var a=77===i[0],c=r(i,4,a)-8;if(!(c<0)){var p=c+8;if(!(i.length-p<2)){var f=12*o(i,p+0,a);if(!(f<=0||(p+=2,i.length-p<f))){var x,v,g,y;for(x=0;x<f;x+=12)256===(y=o(i,p+x,a))?v=n(i,p+x,a):257===y&&(g=n(i,p+x,a));return v&&g?{width:v,height:g,type:"tiff",mime:"image/tiff",wUnits:"px",hUnits:"px"}:void 0}}}}}},90784:function($,R,e){"use strict";var k=e(14847).eG,A=e(14847).OF,l=e(14847).mP,T=e(14847).nm,b=e(71371),d=k("RIFF"),s=k("WEBP");function t(n,i){if(157===n[i+3]&&1===n[i+4]&&42===n[i+5])return{width:16383&l(n,i+6),height:16383&l(n,i+8),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function o(n,i){if(47===n[i]){var a=T(n,i+1);return{width:1+(16383&a),height:1+(a>>14&16383),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function r(n,i){return{width:1+(n[i+6]<<16|n[i+5]<<8|n[i+4]),height:1+(n[i+9]<<i|n[i+8]<<8|n[i+7]),type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}$.exports=function(n){if(!(n.length<16)&&(A(n,0,d)||A(n,8,s))){var i=12,a=null,c=0,p=T(n,4)+8;if(!(p>n.length)){for(;i+8<p;)if(0!==n[i]){var f=String.fromCharCode.apply(null,n.slice(i,i+4)),x=T(n,i+4);"VP8 "===f&&x>=10?a=a||t(n,i+8):"VP8L"===f&&x>=9?a=a||o(n,i+8):"VP8X"===f&&x>=10?a=a||r(n,i+8):"EXIF"===f&&(c=b.get_orientation(n.slice(i+8,i+8+x)),i=1/0),i+=8+x}else i++;if(a)return c>0&&(a.orientation=c),a}}}},91497:function($,R,e){"use strict";$.exports={avif:e(24461),bmp:e(2504),gif:e(47342),ico:e(31355),jpeg:e(54261),png:e(6303),psd:e(38689),svg:e(6881),tiff:e(66278),webp:e(90784)}},33575:function($,R,e){"use strict";var k=e(91497);$.exports=function(A){return function(l){for(var T=Object.keys(k),b=0;b<T.length;b++){var d=k[T[b]](l);if(d)return d}return null}(A)},$.exports.parsers=k},90386:function($){var R,e,k=$.exports={};function A(){throw new Error("setTimeout has not been defined")}function l(){throw new Error("clearTimeout has not been defined")}function T(a){if(R===setTimeout)return setTimeout(a,0);if((R===A||!R)&&setTimeout)return R=setTimeout,setTimeout(a,0);try{return R(a,0)}catch{try{return R.call(null,a,0)}catch{return R.call(this,a,0)}}}!function(){try{R="function"==typeof setTimeout?setTimeout:A}catch{R=A}try{e="function"==typeof clearTimeout?clearTimeout:l}catch{e=l}}();var b,d=[],s=!1,t=-1;function o(){s&&b&&(s=!1,b.length?d=b.concat(d):t=-1,d.length&&r())}function r(){if(!s){var a=T(o);s=!0;for(var c=d.length;c;){for(b=d,d=[];++t<c;)b&&b[t].run();t=-1,c=d.length}b=null,s=!1,function(p){if(e===clearTimeout)return clearTimeout(p);if((e===l||!e)&&clearTimeout)return e=clearTimeout,clearTimeout(p);try{e(p)}catch{try{return e.call(null,p)}catch{return e.call(this,p)}}}(a)}}function n(a,c){this.fun=a,this.array=c}function i(){}k.nextTick=function(a){var c=new Array(arguments.length-1);if(arguments.length>1)for(var p=1;p<arguments.length;p++)c[p-1]=arguments[p];d.push(new n(a,c)),1!==d.length||s||T(r)},n.prototype.run=function(){this.fun.apply(null,this.array)},k.title="browser",k.browser=!0,k.env={},k.argv=[],k.version="",k.versions={},k.on=i,k.addListener=i,k.once=i,k.off=i,k.removeListener=i,k.removeAllListeners=i,k.emit=i,k.prependListener=i,k.prependOnceListener=i,k.listeners=function(a){return[]},k.binding=function(a){throw new Error("process.binding is not supported")},k.cwd=function(){return"/"},k.chdir=function(a){throw new Error("process.chdir is not supported")},k.umask=function(){return 0}},5877:function($,R,e){for(var k=e(9748),A=typeof window>"u"?e.g:window,l=["moz","webkit"],T="AnimationFrame",b=A["request"+T],d=A["cancel"+T]||A["cancelRequest"+T],s=0;!b&&s<l.length;s++)b=A[l[s]+"Request"+T],d=A[l[s]+"Cancel"+T]||A[l[s]+"CancelRequest"+T];if(!b||!d){var t=0,o=0,r=[];b=function(n){if(0===r.length){var i=k(),a=Math.max(0,16.666666666666668-(i-t));t=a+i,setTimeout(function(){var c=r.slice(0);r.length=0;for(var p=0;p<c.length;p++)if(!c[p].cancelled)try{c[p].callback(t)}catch(f){setTimeout(function(){throw f},0)}},Math.round(a))}return r.push({handle:++o,callback:n,cancelled:!1}),o},d=function(n){for(var i=0;i<r.length;i++)r[i].handle===n&&(r[i].cancelled=!0)}}$.exports=function(n){return b.call(A,n)},$.exports.cancel=function(){d.apply(A,arguments)},$.exports.polyfill=function(n){n||(n=A),n.requestAnimationFrame=b,n.cancelAnimationFrame=d}},3593:function($,R,e){"use strict";var k=e(21527),A=e(25075),l=e(93447),T=e(71299),b=e(56131),d=e(30120),s=e(57060),t=s.float32,o=s.fract32;$.exports=function(n,i){if("function"==typeof n?(i||(i={}),i.regl=n):i=n,i.length&&(i.positions=i),!(n=i.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");var a,c,p,f,x,v,g=n._gl,y={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},h=[];return f=n.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),c=n.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),p=n.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),x=n.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),v=n.buffer({usage:"static",type:"float",data:r}),S(i),a=n({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:n.prop("range"),lineWidth:n.prop("lineWidth"),capSize:n.prop("capSize"),opacity:n.prop("opacity"),scale:n.prop("scale"),translate:n.prop("translate"),scaleFract:n.prop("scaleFract"),translateFract:n.prop("translateFract"),viewport:function(E,L){return[L.viewport.x,L.viewport.y,E.viewportWidth,E.viewportHeight]}},attributes:{color:{buffer:f,offset:function(E,L){return 4*L.offset},divisor:1},position:{buffer:c,offset:function(E,L){return 8*L.offset},divisor:1},positionFract:{buffer:p,offset:function(E,L){return 8*L.offset},divisor:1},error:{buffer:x,offset:function(E,L){return 16*L.offset},divisor:1},direction:{buffer:v,stride:24,offset:0},lineOffset:{buffer:v,stride:24,offset:8},capOffset:{buffer:v,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:n.prop("viewport")},viewport:n.prop("viewport"),stencil:!1,instances:n.prop("count"),count:r.length}),b(m,{update:S,draw:w,destroy:_,regl:n,gl:g,canvas:g.canvas,groups:h}),m;function m(E){E?S(E):null===E&&_(),w()}function w(E){if("number"==typeof E)return u(E);E&&!Array.isArray(E)&&(E=[E]),n._refresh(),h.forEach(function(L,C){L&&(E&&(L.draw=!!E[C]),L.draw?u(C):L.draw=!0)})}function u(E){"number"==typeof E&&(E=h[E]),null!=E&&E&&E.count&&E.color&&E.opacity&&E.positions&&E.positions.length>1&&(E.scaleRatio=[E.scale[0]*E.viewport.width,E.scale[1]*E.viewport.height],a(E),E.after&&E.after(E))}function S(E){if(E){null!=E.length?"number"==typeof E[0]&&(E=[{positions:E}]):Array.isArray(E)||(E=[E]);var L=0,C=0;if(m.groups=h=E.map(function(N,B){var j=h[B];return N&&("function"==typeof N?N={after:N}:"number"==typeof N[0]&&(N={positions:N}),N=T(N,{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"}),j||(h[B]=j={id:B,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},N=b({},y,N)),l(j,N,[{lineWidth:function(J){return.5*+J},capSize:function(J){return.5*+J},opacity:parseFloat,errors:function(J){return J=d(J),C+=J.length,J},positions:function(J,G){return J=d(J,"float64"),G.count=Math.floor(J.length/2),G.bounds=k(J,2),G.offset=L,L+=G.count,J}},{color:function(J,G){var V=G.count;if(J||(J="transparent"),!Array.isArray(J)||"number"==typeof J[0]){var W=J;J=Array(V);for(var X=0;X<V;X++)J[X]=W}if(J.length<V)throw Error("Not enough colors");for(var K=new Uint8Array(4*V),re=0;re<V;re++){var ee=A(J[re],"uint8");K.set(ee,4*re)}return K},range:function(J,G,V){return J||(J=G.bounds),G.scale=[1/(J[2]-J[0]),1/(J[3]-J[1])],G.translate=[-J[0],-J[1]],G.scaleFract=o(G.scale),G.translateFract=o(G.translate),J},viewport:function(J){var G;return Array.isArray(J)?G={x:J[0],y:J[1],width:J[2]-J[0],height:J[3]-J[1]}:J?((G={x:J.x||J.left||0,y:J.y||J.top||0}).width=J.right?J.right-G.x:J.w||J.width||0,G.height=J.bottom?J.bottom-G.y:J.h||J.height||0):G={x:0,y:0,width:g.drawingBufferWidth,height:g.drawingBufferHeight},G}}])),j}),L||C){var P=h.reduce(function(N,B,j){return N+(B?B.count:0)},0),I=new Float64Array(2*P),U=new Uint8Array(4*P),z=new Float32Array(4*P);h.forEach(function(N,B){if(N){var j=N.positions,G=N.offset,W=N.errors;N.count&&(U.set(N.color,4*G),z.set(W,4*G),I.set(j,2*G))}});var H=t(I);c(H);var F=o(I,H);p(F),f(U),x(z)}}}function _(){c.destroy(),p.destroy(),f.destroy(),x.destroy(),v.destroy()}};var r=[[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]]},46075:function($,R,e){"use strict";var k=e(25075),A=e(21527),l=e(56131),T=e(56068),b=e(71299),d=e(30120),s=e(11474),t=e(54),o=e(57060),r=o.float32,n=o.fract32,i=e(83522),a=e(18863),c=e(6851);function p(f,x){if(!(this instanceof p))return new p(f,x);if("function"==typeof f?(x||(x={}),x.regl=f):x=f,x.length&&(x.positions=x),!(f=x.regl).hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=f._gl,this.regl=f,this.passes=[],this.shaders=p.shaders.has(f)?p.shaders.get(f):p.shaders.set(f,p.createShaders(f)).get(f),this.update(x)}$.exports=p,p.dashMult=2,p.maxPatternLength=256,p.precisionThreshold=3e6,p.maxPoints=1e4,p.maxLines=2048,p.shaders=new i,p.createShaders=function(f){var x,v=f.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),g={primitive:"triangle strip",instances:f.prop("count"),count:4,offset:0,uniforms:{miterMode:function(h,m){return"round"===m.join?2:1},miterLimit:f.prop("miterLimit"),scale:f.prop("scale"),scaleFract:f.prop("scaleFract"),translateFract:f.prop("translateFract"),translate:f.prop("translate"),thickness:f.prop("thickness"),dashTexture:f.prop("dashTexture"),opacity:f.prop("opacity"),pixelRatio:f.context("pixelRatio"),id:f.prop("id"),dashLength:f.prop("dashLength"),viewport:function(h,m){return[m.viewport.x,m.viewport.y,h.viewportWidth,h.viewportHeight]},depth:f.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(h,m){return!m.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:f.prop("viewport")},viewport:f.prop("viewport")},y=f(l({vert:T(["precision highp float;\n#define GLSLIFY 1\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:T(["precision highp float;\n#define GLSLIFY 1\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:v,divisor:0,stride:8,offset:0},lineTop:{buffer:v,divisor:0,stride:8,offset:4},aCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:f.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:f.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:f.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},g));try{x=f(l({cull:{enable:!0,face:"back"},vert:T(["precision highp float;\n#define GLSLIFY 1\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\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:T(["precision highp float;\n#define GLSLIFY 1\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:v,divisor:0,stride:8,offset:0},lineTop:{buffer:v,divisor:0,stride:8,offset:4},aColor:{buffer:f.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:f.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:f.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},g))}catch{x=y}return{fill:f({primitive:"triangle",elements:function(h,m){return m.triangles},offset:0,vert:T(["precision highp float;\n#define GLSLIFY 1\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:T(["precision highp float;\n#define GLSLIFY 1\n\nvarying vec4 fragColor;\n\nvoid main() {\n\tgl_FragColor = fragColor;\n}\n"]),uniforms:{scale:f.prop("scale"),color:f.prop("fill"),scaleFract:f.prop("scaleFract"),translateFract:f.prop("translateFract"),translate:f.prop("translate"),opacity:f.prop("opacity"),pixelRatio:f.context("pixelRatio"),id:f.prop("id"),viewport:function(h,m){return[m.viewport.x,m.viewport.y,h.viewportWidth,h.viewportHeight]}},attributes:{position:{buffer:f.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:f.prop("positionFractBuffer"),stride:8,offset:8}},blend:g.blend,depth:{enable:!1},scissor:g.scissor,stencil:g.stencil,viewport:g.viewport}),rect:y,miter:x}},p.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},p.prototype.render=function(){for(var f,x=[],v=arguments.length;v--;)x[v]=arguments[v];x.length&&(f=this).update.apply(f,x),this.draw()},p.prototype.draw=function(){for(var f=this,x=[],v=arguments.length;v--;)x[v]=arguments[v];return(x.length?x:this.passes).forEach(function(g,y){var h;if(g&&Array.isArray(g))return(h=f).draw.apply(h,g);"number"==typeof g&&(g=f.passes[g]),g&&g.count>1&&g.opacity&&(f.regl._refresh(),g.fill&&g.triangles&&g.triangles.length>2&&f.shaders.fill(g),g.thickness&&(g.scale[0]*g.viewport.width>p.precisionThreshold||g.scale[1]*g.viewport.height>p.precisionThreshold||"rect"===g.join||!g.join&&(g.thickness<=2||g.count>=p.maxPoints)?f.shaders.rect(g):f.shaders.miter(g)))}),this},p.prototype.update=function(f){var x=this;if(f){null!=f.length?"number"==typeof f[0]&&(f=[{positions:f}]):Array.isArray(f)||(f=[f]);var v=this.regl,g=this.gl;if(f.forEach(function(u,S){var _=x.passes[S];if(void 0!==u)if(null!==u){if("number"==typeof u[0]&&(u={positions:u}),u=b(u,{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"}),_||(x.passes[S]=_={id:S,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:v.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:v.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:v.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:v.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},u=l({},p.defaults,u)),null!=u.thickness&&(_.thickness=parseFloat(u.thickness)),null!=u.opacity&&(_.opacity=parseFloat(u.opacity)),null!=u.miterLimit&&(_.miterLimit=parseFloat(u.miterLimit)),null!=u.overlay&&(_.overlay=!!u.overlay,S<p.maxLines&&(_.depth=2*(p.maxLines-1-S%p.maxLines)/p.maxLines-1)),null!=u.join&&(_.join=u.join),null!=u.hole&&(_.hole=u.hole),null!=u.fill&&(_.fill=u.fill?k(u.fill,"uint8"):null),null!=u.viewport&&(_.viewport=a(u.viewport)),_.viewport||(_.viewport=a([g.drawingBufferWidth,g.drawingBufferHeight])),null!=u.close&&(_.close=u.close),null===u.positions&&(u.positions=[]),u.positions){var E,L;if(u.positions.x&&u.positions.y){var C=u.positions.x,P=u.positions.y;L=_.count=Math.max(C.length,P.length),E=new Float64Array(2*L);for(var I=0;I<L;I++)E[2*I]=C[I],E[2*I+1]=P[I]}else E=d(u.positions,"float64"),L=_.count=Math.floor(E.length/2);var U=_.bounds=A(E,2);if(_.fill){for(var z=[],H={},F=0,N=0,B=0,j=_.count;N<j;N++){var J=E[2*N],G=E[2*N+1];isNaN(J)||isNaN(G)||null==J||null==G?(J=E[2*F],G=E[2*F+1],H[N]=F):F=N,z[B++]=J,z[B++]=G}if(u.splitNull){_.count-1 in H||(H[_.count]=_.count-1);var V=Object.keys(H).map(Number).sort(function(mt,wt){return mt-wt}),W=[],X=0,K=null!=_.hole?_.hole[0]:null;if(null!=K){var re=c(V,function(mt){return mt>=K});(V=V.slice(0,re)).push(K)}for(var ee=function(mt){var wt=z.slice(2*X,2*V[mt]).concat(K?z.slice(2*K):[]),Lt=(_.hole||[]).map(function(It){return It-K+(V[mt]-X)}),Ct=s(wt,Lt);Ct=Ct.map(function(It){return It+X+(It+X<V[mt]?0:K-V[mt])}),W.push.apply(W,Ct),X=V[mt]+1},ie=0;ie<V.length;ie++)ee(ie);for(var oe=0,ce=W.length;oe<ce;oe++)null!=H[W[oe]]&&(W[oe]=H[W[oe]]);_.triangles=W}else{for(var me=s(z,_.hole||[]),de=0,he=me.length;de<he;de++)null!=H[me[de]]&&(me[de]=H[me[de]]);_.triangles=me}}var ve=new Float64Array(E);t(ve,2,U);var Pe=new Float64Array(2*L+6);_.close?E[0]===E[2*L-2]&&E[1]===E[2*L-1]?(Pe[0]=ve[2*L-4],Pe[1]=ve[2*L-3]):(Pe[0]=ve[2*L-2],Pe[1]=ve[2*L-1]):(Pe[0]=ve[0],Pe[1]=ve[1]),Pe.set(ve,2),_.close?E[0]===E[2*L-2]&&E[1]===E[2*L-1]?(Pe[2*L+2]=ve[2],Pe[2*L+3]=ve[3],_.count-=1):(Pe[2*L+2]=ve[0],Pe[2*L+3]=ve[1],Pe[2*L+4]=ve[2],Pe[2*L+5]=ve[3]):(Pe[2*L+2]=ve[2*L-2],Pe[2*L+3]=ve[2*L-1],Pe[2*L+4]=ve[2*L-2],Pe[2*L+5]=ve[2*L-1]);var xe=r(Pe);_.positionBuffer(xe);var ke=n(Pe,xe);_.positionFractBuffer(ke)}if(u.range?_.range=u.range:_.range||(_.range=_.bounds),(u.range||u.positions)&&_.count){var Ae=_.bounds,se=_.range[2]-_.range[0],fe=_.range[3]-_.range[1];_.scale=[(Ae[2]-Ae[0])/se,(Ae[3]-Ae[1])/fe],_.translate=[-_.range[0]/se+Ae[0]/se||0,-_.range[1]/fe+Ae[1]/fe||0],_.scaleFract=n(_.scale),_.translateFract=n(_.translate)}if(u.dashes){var ye,Me=0;if(!u.dashes||u.dashes.length<2)Me=1,ye=new Uint8Array([255,255,255,255,255,255,255,255]);else{Me=0;for(var Ie=0;Ie<u.dashes.length;++Ie)Me+=u.dashes[Ie];ye=new Uint8Array(Me*p.dashMult);for(var Ce=0,Re=255,le=0;le<2;le++)for(var ge=0;ge<u.dashes.length;++ge){for(var _e=0,Fe=u.dashes[ge]*p.dashMult*.5;_e<Fe;++_e)ye[Ce++]=Re;Re^=255}}_.dashLength=Me,_.dashTexture({channels:1,data:ye,width:ye.length,height:1,mag:"linear",min:"linear"},0,0)}if(u.color){var Ve=_.count,He=u.color;He||(He="transparent");var nt=new Uint8Array(4*Ve+4);if(Array.isArray(He)&&"number"!=typeof He[0]){for(var tt=0;tt<Ve;tt++){var ot=k(He[tt],"uint8");nt.set(ot,4*tt)}nt.set(k(He[0],"uint8"),4*Ve)}else for(var dt=k(He,"uint8"),kt=0;kt<Ve+1;kt++)nt.set(dt,4*kt);_.colorBuffer({usage:"dynamic",type:"uint8",data:nt})}}else x.passes[S]=null}),f.length<this.passes.length){for(var y=f.length;y<this.passes.length;y++){var h=this.passes[y];h&&(h.colorBuffer.destroy(),h.positionBuffer.destroy(),h.dashTexture.destroy())}this.passes.length=f.length}for(var m=[],w=0;w<this.passes.length;w++)null!==this.passes[w]&&m.push(this.passes[w]);return this.passes=m,this}},p.prototype.destroy=function(){return this.passes.forEach(function(f){f.colorBuffer.destroy(),f.positionBuffer.destroy(),f.dashTexture.destroy()}),this.passes.length=0,this}},11870:function($,R,e){"use strict";function k(g,y){return function(h){if(Array.isArray(h))return h}(g)||function(h,m){var w=null==h?null:typeof Symbol<"u"&&h[Symbol.iterator]||h["@@iterator"];if(null!=w){var u,S,_=[],E=!0,L=!1;try{for(w=w.call(h);!(E=(u=w.next()).done)&&(_.push(u.value),!m||_.length!==m);E=!0);}catch(C){L=!0,S=C}finally{try{E||null==w.return||w.return()}finally{if(L)throw S}}return _}}(g,y)||A(g,y)||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 A(g,y){if(g){if("string"==typeof g)return l(g,y);var h=Object.prototype.toString.call(g).slice(8,-1);return"Object"===h&&g.constructor&&(h=g.constructor.name),"Map"===h||"Set"===h?Array.from(g):"Arguments"===h||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(h)?l(g,y):void 0}}function l(g,y){(null==y||y>g.length)&&(y=g.length);for(var h=0,m=new Array(y);h<y;h++)m[h]=g[h];return m}var T=e(25075),b=e(21527),d=e(6475),s=e(88294),t=e(56131),o=e(56068),r=e(71299),n=e(93447),i=e(30120),a=e(62683),c=e(57060),p=e(18863),f=x;function x(g,y){var h=this;if(!(this instanceof x))return new x(g,y);"function"==typeof g?(y||(y={}),y.regl=g):(y=g,g=null),y&&y.length&&(y.positions=y);var m,w=(g=y.regl)._gl,u=[];this.tooManyColors=a,m=g.texture({data:new Uint8Array(1020),width:255,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),t(this,{regl:g,gl:w,groups:[],markerCache:[null],markerTextures:[null],palette:u,paletteIds:{},paletteTexture:m,maxColors:255,maxSize:100,canvas:w.canvas}),this.update(y);var S={uniforms:{constPointSize:!!y.constPointSize,opacity:g.prop("opacity"),paletteSize:function(L,C){return[h.tooManyColors?0:255,m.height]},pixelRatio:g.context("pixelRatio"),scale:g.prop("scale"),scaleFract:g.prop("scaleFract"),translate:g.prop("translate"),translateFract:g.prop("translateFract"),markerTexture:g.prop("markerTexture"),paletteTexture:m},attributes:{x:function(L,C){return C.xAttr||{buffer:C.positionBuffer,stride:8,offset:0}},y:function(L,C){return C.yAttr||{buffer:C.positionBuffer,stride:8,offset:4}},xFract:function(L,C){return C.xAttr?{constant:[0,0]}:{buffer:C.positionFractBuffer,stride:8,offset:0}},yFract:function(L,C){return C.yAttr?{constant:[0,0]}:{buffer:C.positionFractBuffer,stride:8,offset:4}},size:function(L,C){return C.size.length?{buffer:C.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(255*C.size/h.maxSize)]}},borderSize:function(L,C){return C.borderSize.length?{buffer:C.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(255*C.borderSize/h.maxSize)]}},colorId:function(L,C){return C.color.length?{buffer:C.colorBuffer,stride:h.tooManyColors?8:4,offset:0}:{constant:h.tooManyColors?u.slice(4*C.color,4*C.color+4):[C.color]}},borderColorId:function(L,C){return C.borderColor.length?{buffer:C.colorBuffer,stride:h.tooManyColors?8:4,offset:h.tooManyColors?4:2}:{constant:h.tooManyColors?u.slice(4*C.borderColor,4*C.borderColor+4):[C.borderColor]}},isActive:function(L,C){return!0===C.activation?{constant:[1]}:C.activation?C.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:g.prop("viewport")},viewport:g.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:g.prop("elements"),count:g.prop("count"),offset:g.prop("offset"),primitive:"points"},_=t({},S);_.frag=o(["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"]),_.vert=o(["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\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}"]),this.drawMarker=g(_);var E=t({},S);E.frag=o(["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"]),E.vert=o(["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\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"]),a&&(E.frag=E.frag.replace("smoothstep","smoothStep"),_.frag=_.frag.replace("smoothstep","smoothStep")),this.drawCircle=g(E)}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 g=this,y=arguments.length,h=new Array(y),m=0;m<y;m++)h[m]=arguments[m];var w=this.groups;if(1===h.length&&Array.isArray(h[0])&&(null===h[0][0]||Array.isArray(h[0][0]))&&(h=h[0]),this.regl._refresh(),h.length)for(var u=0;u<h.length;u++)this.drawItem(u,h[u]);else w.forEach(function(S,_){g.drawItem(_)});return this},x.prototype.drawItem=function(g,y){var h,m=this.groups,w=m[g];if("number"==typeof y&&(g=y,w=m[y],y=null),w&&w.count&&w.opacity){w.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,w,y));for(var u=[],S=1;S<w.activation.length;S++)w.activation[S]&&(!0===w.activation[S]||w.activation[S].data.length)&&u.push.apply(u,function(_){if(Array.isArray(_))return l(_)}(h=this.getMarkerDrawOptions(S,w,y))||function(_){if(typeof Symbol<"u"&&null!=_[Symbol.iterator]||null!=_["@@iterator"])return Array.from(_)}(h)||A(h)||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.")}());u.length&&this.drawMarker(u)}},x.prototype.getMarkerDrawOptions=function(g,y,h){var m=y.range,w=y.tree,u=y.viewport,S=y.activation,_=y.selectionBuffer,E=y.count;if(!w)return h?[t({},y,{markerTexture:this.markerTextures[g],activation:S[g],count:h.length,elements:h,offset:0})]:[t({},y,{markerTexture:this.markerTextures[g],activation:S[g],offset:0})];var L=[],C=w.range(m,{lod:!0,px:[(m[2]-m[0])/u.width,(m[3]-m[1])/u.height]});if(h){for(var P=S[g].data,I=new Uint8Array(E),U=0;U<h.length;U++){var z=h[U];I[z]=P?P[z]:1}_.subdata(I)}for(var H=C.length;H--;){var F=k(C[H],2),N=F[0];L.push(t({},y,{markerTexture:this.markerTextures[g],activation:h?_:S[g],offset:N,count:F[1]-N}))}return L},x.prototype.update=function(){for(var g=this,y=arguments.length,h=new Array(y),m=0;m<y;m++)h[m]=arguments[m];if(h.length){1===h.length&&Array.isArray(h[0])&&(h=h[0]);var w=this.groups,u=this.gl,S=this.regl,_=this.maxSize,E=this.maxColors,L=this.palette;this.groups=w=h.map(function(C,P){var I=w[P];if(void 0===C)return I;null===C?C={positions:null}:"function"==typeof C?C={ondraw:C}:"number"==typeof C[0]&&(C={positions:C}),null===(C=r(C,{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&&(C.positions=[]),null!=C.tooManyColors&&(g.tooManyColors=C.tooManyColors),I||(w[P]=I={id:P,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:S.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:S.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:S.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:S.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:S.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},C=t({},x.defaults,C)),C.positions&&!("marker"in C)&&(C.marker=I.marker,delete I.marker),C.marker&&!("positions"in C)&&(C.positions=I.positions,delete I.positions);var U=0,z=0;if(n(I,C,[{snap:!0,size:function(de,he){return null==de&&(de=x.defaults.size),U+=de&&de.length?1:0,de},borderSize:function(de,he){return null==de&&(de=x.defaults.borderSize),U+=de&&de.length?1:0,de},opacity:parseFloat,color:function(de,he){return null==de&&(de=x.defaults.color),de=g.updateColor(de),z++,de},borderColor:function(de,he){return null==de&&(de=x.defaults.borderColor),de=g.updateColor(de),z++,de},bounds:function(de,he,ve){return"range"in ve||(ve.range=null),de},positions:function(de,he,ve){var Pe=he.snap,xe=he.positionBuffer,ke=he.positionFractBuffer,Ae=he.selectionBuffer;if(de.x||de.y)return he.xAttr=de.x.length?{buffer:S.buffer(de.x),offset:0,stride:4,count:de.x.length}:{buffer:de.x.buffer,offset:4*de.x.offset||0,stride:4*(de.x.stride||1),count:de.x.count},he.yAttr=de.y.length?{buffer:S.buffer(de.y),offset:0,stride:4,count:de.y.length}:{buffer:de.y.buffer,offset:4*de.y.offset||0,stride:4*(de.y.stride||1),count:de.y.count},he.count=Math.max(he.xAttr.count,he.yAttr.count),de;de=i(de,"float64");var Te=he.count=Math.floor(de.length/2),Q=he.bounds=Te?b(de,2):null;if(ve.range||he.range||(delete he.range,ve.range=Q),ve.marker||he.marker||(delete he.marker,ve.marker=null),Pe&&(!0===Pe||Te>Pe)?he.tree=s(de,{bounds:Q}):Pe&&Pe.length&&(he.tree=Pe),he.tree){var se={primitive:"points",usage:"static",data:he.tree,type:"uint32"};he.elements?he.elements(se):he.elements=S.elements(se)}var fe=c.float32(de);return xe({data:fe,usage:"dynamic"}),ke({data:c.fract32(de,fe),usage:"dynamic"}),Ae({data:new Uint8Array(Te),type:"uint8",usage:"stream"}),de}},{marker:function(de,he,ve){var Pe=he.activation;if(Pe.forEach(function(fe){return fe&&fe.destroy&&fe.destroy()}),Pe.length=0,de&&"number"!=typeof de[0]){for(var xe=[],ke=0,Ae=Math.min(de.length,he.count);ke<Ae;ke++){var Te=g.addMarker(de[ke]);xe[Te]||(xe[Te]=new Uint8Array(he.count)),xe[Te][ke]=1}for(var Q=0;Q<xe.length;Q++)if(xe[Q]){var se={data:xe[Q],type:"uint8",usage:"static"};Pe[Q]?Pe[Q](se):Pe[Q]=S.buffer(se),Pe[Q].data=xe[Q]}}else Pe[g.addMarker(de)]=!0;return de},range:function(de,he,ve){var Pe=he.bounds;if(Pe)return de||(de=Pe),he.scale=[1/(de[2]-de[0]),1/(de[3]-de[1])],he.translate=[-de[0],-de[1]],he.scaleFract=c.fract(he.scale),he.translateFract=c.fract(he.translate),de},viewport:function(de){return p(de||[u.drawingBufferWidth,u.drawingBufferHeight])}}]),U){var F=I.count,N=I.size,B=I.borderSize,j=I.sizeBuffer,J=new Uint8Array(2*F);if(N.length||B.length)for(var G=0;G<F;G++)J[2*G]=Math.round(255*(null==N[G]?N:N[G])/_),J[2*G+1]=Math.round(255*(null==B[G]?B:B[G])/_);j({data:J,usage:"dynamic"})}if(z){var V,X=I.count,K=I.color,re=I.borderColor,ee=I.colorBuffer;if(g.tooManyColors){if(K.length||re.length){V=new Uint8Array(8*X);for(var ie=0;ie<X;ie++){var oe=K[ie];V[8*ie]=L[4*oe],V[8*ie+1]=L[4*oe+1],V[8*ie+2]=L[4*oe+2],V[8*ie+3]=L[4*oe+3];var ce=re[ie];V[8*ie+4]=L[4*ce],V[8*ie+5]=L[4*ce+1],V[8*ie+6]=L[4*ce+2],V[8*ie+7]=L[4*ce+3]}}}else if(K.length||re.length){V=new Uint8Array(4*X+2);for(var me=0;me<X;me++)null!=K[me]&&(V[4*me]=K[me]%E,V[4*me+1]=Math.floor(K[me]/E)),null!=re[me]&&(V[4*me+2]=re[me]%E,V[4*me+3]=Math.floor(re[me]/E))}ee({data:V||new Uint8Array(0),type:"uint8",usage:"dynamic"})}return I})}},x.prototype.addMarker=function(g){var y,h=this.markerTextures,m=this.regl,w=this.markerCache,u=null==g?0:w.indexOf(g);if(u>=0)return u;if(g instanceof Uint8Array||g instanceof Uint8ClampedArray)y=g;else{y=new Uint8Array(g.length);for(var S=0,_=g.length;S<_;S++)y[S]=255*g[S]}var E=Math.floor(Math.sqrt(y.length));return u=h.length,w.push(g),h.push(m.texture({channels:1,data:y,radius:E,mag:"linear",min:"linear"})),u},x.prototype.updateColor=function(g){var y=this.paletteIds,h=this.palette,m=this.maxColors;Array.isArray(g)||(g=[g]);var w=[];if("number"==typeof g[0]){var u=[];if(Array.isArray(g))for(var S=0;S<g.length;S+=4)u.push(g.slice(S,S+4));else for(var _=0;_<g.length;_+=4)u.push(g.subarray(_,_+4));g=u}for(var E=0;E<g.length;E++){var L=g[E];L=T(L,"uint8");var C=d(L,!1);if(null==y[C]){var P=h.length;y[C]=Math.floor(P/4),h[P]=L[0],h[P+1]=L[1],h[P+2]=L[2],h[P+3]=L[3]}w[E]=y[C]}return!this.tooManyColors&&h.length>4*m&&(this.tooManyColors=!0),this.updatePalette(h),1===w.length?w[0]:w},x.prototype.updatePalette=function(g){if(!this.tooManyColors){var y=this.maxColors,h=this.paletteTexture,m=Math.ceil(.25*g.length/y);if(m>1)for(var w=.25*(g=g.slice()).length%y;w<m*y;w++)g.push(0,0,0,0);h.height<m&&h.resize(y,m),h.subimage({width:Math.min(.25*g.length,y),height:m,data:g},0,0)}},x.prototype.destroy=function(){return this.groups.forEach(function(g){g.sizeBuffer.destroy(),g.positionBuffer.destroy(),g.positionFractBuffer.destroy(),g.colorBuffer.destroy(),g.activation.forEach(function(y){return y&&y.destroy&&y.destroy()}),g.selectionBuffer.destroy(),g.elements&&g.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(function(g){return g&&g.destroy&&g.destroy()}),this};var v=e(56131);$.exports=function(g,y){var h=new f(g,y),m=h.render.bind(h);return v(m,{render:m,update:h.update.bind(h),draw:h.draw.bind(h),destroy:h.destroy.bind(h),regl:h.regl,gl:h.gl,canvas:h.gl.canvas,groups:h.groups,markers:h.markerCache,palette:h.palette}),m}},60487:function($,R,e){"use strict";var k=e(11870),A=e(71299),l=e(21527),T=e(5877),b=e(57471),d=e(18863),s=e(30120);function t(i,a){if(!(this instanceof t))return new t(i,a);this.traces=[],this.passes={},this.regl=i,this.scatter=k(i),this.canvas=this.scatter.canvas}function o(i,a,c){return(null!=i.id?i.id:i)<<16|(255&a)<<8|255&c}function r(i,a,c){var p,f,x,v,g=i[a],y=i[c];return g.length>2?(p=g[1],f=g[3]):g.length?(p=g[0],f=g[1]):(p=g.y,f=g.y+g.height),y.length>2?(x=y[0],v=y[2]):y.length?(x=y[0],v=y[1]):(x=y.x,v=y.x+y.width),[x,p,v,f]}function n(i){if("number"==typeof i)return[i,i,i,i];if(2===i.length)return[i[0],i[1],i[0],i[1]];var a=d(i);return[a.x,a.y,a.x+a.width,a.y+a.height]}$.exports=t,t.prototype.render=function(){for(var i,a=this,c=[],p=arguments.length;p--;)c[p]=arguments[p];return c.length&&(i=this).update.apply(i,c),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?null==this.planned&&(this.planned=T(function(){a.draw(),a.dirty=!0,a.planned=null})):(this.draw(),this.dirty=!0,T(function(){a.dirty=!1})),this)},t.prototype.update=function(){for(var i,a=[],c=arguments.length;c--;)a[c]=arguments[c];if(a.length){for(var p=0;p<a.length;p++)this.updateItem(p,a[p]);this.traces=this.traces.filter(Boolean);for(var f=[],x=0,v=0;v<this.traces.length;v++){for(var g=this.traces[v],y=this.traces[v].passes,h=0;h<y.length;h++)f.push(this.passes[y[h]]);g.passOffset=x,x+=g.passes.length}return(i=this.scatter).update.apply(i,f),this}},t.prototype.updateItem=function(i,a){var c=this.regl;if(null===a)return this.traces[i]=null,this;if(!a)return this;var p,f=A(a,{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"}),x=this.traces[i]||(this.traces[i]={id:i,buffer:c.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),color:"black",marker:null,size:12,borderColor:"transparent",borderSize:1,viewport:d([c._gl.drawingBufferWidth,c._gl.drawingBufferHeight]),padding:[0,0,0,0],opacity:1,diagonal:!0,upper:!0,lower:!0});if(null!=f.color&&(x.color=f.color),null!=f.size&&(x.size=f.size),null!=f.marker&&(x.marker=f.marker),null!=f.borderColor&&(x.borderColor=f.borderColor),null!=f.borderSize&&(x.borderSize=f.borderSize),null!=f.opacity&&(x.opacity=f.opacity),f.viewport&&(x.viewport=d(f.viewport)),null!=f.diagonal&&(x.diagonal=f.diagonal),null!=f.upper&&(x.upper=f.upper),null!=f.lower&&(x.lower=f.lower),f.data){x.buffer(s(f.data)),x.columns=f.data.length,x.count=f.data[0].length,x.bounds=[];for(var v=0;v<x.columns;v++)x.bounds[v]=l(f.data[v],1)}f.range&&(x.range=f.range,p=x.range&&"number"!=typeof x.range[0]),f.domain&&(x.domain=f.domain);var g=!1;null!=f.padding&&(Array.isArray(f.padding)&&f.padding.length===x.columns&&"number"==typeof f.padding[f.padding.length-1]?(x.padding=f.padding.map(n),g=!0):x.padding=n(f.padding));var y=x.columns,h=x.count,m=x.viewport.width,w=x.viewport.height,u=x.viewport.x,S=x.viewport.y,_=m/y,E=w/y;x.passes=[];for(var L=0;L<y;L++)for(var C=0;C<y;C++)if((x.diagonal||C!==L)&&(x.upper||!(L>C))&&(x.lower||!(L<C))){var P=o(x.id,L,C),I=this.passes[P]||(this.passes[P]={});if(f.data&&(I.positions=f.transpose?{x:{buffer:x.buffer,offset:C,count:h,stride:y},y:{buffer:x.buffer,offset:L,count:h,stride:y}}:{x:{buffer:x.buffer,offset:C*h,count:h},y:{buffer:x.buffer,offset:L*h,count:h}},I.bounds=r(x.bounds,L,C)),f.domain||f.viewport||f.data){var U=g?r(x.padding,L,C):x.padding;if(x.domain){var z=r(x.domain,L,C);I.viewport=[u+z[0]*m+U[0],S+z[1]*w+U[1],u+z[2]*m-U[2],S+z[3]*w-U[3]]}else I.viewport=[u+C*_+_*U[0],S+L*E+E*U[1],u+(C+1)*_-_*U[2],S+(L+1)*E-E*U[3]]}f.color&&(I.color=x.color),f.size&&(I.size=x.size),f.marker&&(I.marker=x.marker),f.borderSize&&(I.borderSize=x.borderSize),f.borderColor&&(I.borderColor=x.borderColor),f.opacity&&(I.opacity=x.opacity),f.range&&(I.range=p?r(x.range,L,C):x.range||I.bounds),x.passes.push(P)}return this},t.prototype.draw=function(){for(var i,a=[],c=arguments.length;c--;)a[c]=arguments[c];if(a.length){for(var p=[],f=0;f<a.length;f++)if("number"==typeof a[f]){var x=this.traces[a[f]],g=x.passOffset;p.push.apply(p,b(g,g+x.passes.length))}else if(a[f].length){var y=a[f],h=this.traces[f],m=h.passes,w=h.passOffset;m=m.map(function(u,S){p[w+S]=y})}(i=this.scatter).draw.apply(i,p)}else this.scatter.draw();return this},t.prototype.destroy=function(){return this.traces.forEach(function(i){i.buffer&&i.buffer.destroy&&i.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this}},98580:function($){$.exports=function(){function R(Be,Ye){this.id=re++,this.type=Be,this.data=Ye}function e(Be){if(0===Be.length)return[];var Ye=Be.charAt(0),rt=Be.charAt(Be.length-1);if(1<Be.length&&Ye===rt&&('"'===Ye||"'"===Ye))return['"'+Be.substr(1,Be.length-2).replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];if(Ye=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Be))return e(Be.substr(0,Ye.index)).concat(e(Ye[1])).concat(e(Be.substr(Ye.index+Ye[0].length)));if(1===(Ye=Be.split(".")).length)return['"'+Be.replace(/\\/g,"\\\\").replace(/"/g,'\\"')+'"'];for(Be=[],rt=0;rt<Ye.length;++rt)Be=Be.concat(e(Ye[rt]));return Be}function k(Be){return"["+e(Be).join("][")+"]"}function A(Be){return"string"==typeof Be?Be.split():Be}function l(Be){return"string"==typeof Be?document.querySelector(Be):Be}function b(Be,Ye){for(var rt=Array(Be),Se=0;Se<Be;++Se)rt[Se]=Ye(Se);return rt}function d(Be){var Ye,rt;return Ye=(65535<Be)<<4,Ye|=rt=(255<(Be>>>=Ye))<<3,(Ye|=rt=(15<(Be>>>=rt))<<2)|(rt=(3<(Be>>>=rt))<<1)|Be>>>rt>>1}function s(){function Be(Se){e:{for(var ze=16;268435456>=ze;ze*=16)if(Se<=ze){Se=ze;break e}Se=0}return 0<(ze=rt[d(Se)>>2]).length?ze.pop():new ArrayBuffer(Se)}function Ye(Se){rt[d(Se.byteLength)>>2].push(Se)}var rt=b(8,function(){return[]});return{alloc:Be,free:Ye,allocType:function(Se,ze){var Ke=null;switch(Se){case 5120:Ke=new Int8Array(Be(ze),0,ze);break;case 5121:Ke=new Uint8Array(Be(ze),0,ze);break;case 5122:Ke=new Int16Array(Be(2*ze),0,ze);break;case 5123:Ke=new Uint16Array(Be(2*ze),0,ze);break;case 5124:Ke=new Int32Array(Be(4*ze),0,ze);break;case 5125:Ke=new Uint32Array(Be(4*ze),0,ze);break;case 5126:Ke=new Float32Array(Be(4*ze),0,ze);break;default:return null}return Ke.length!==ze?Ke.subarray(0,ze):Ke},freeType:function(Se){Ye(Se.buffer)}}}function t(Be){return!!Be&&"object"==typeof Be&&Array.isArray(Be.shape)&&Array.isArray(Be.stride)&&"number"==typeof Be.offset&&Be.shape.length===Be.stride.length&&(Array.isArray(Be.data)||de(Be.data))}function o(Be,Ye,rt,Se,ze,Ke){for(var st=0;st<Ye;++st)for(var ct=Be[st],Tt=0;Tt<rt;++Tt)for(var Et=ct[Tt],At=0;At<Se;++At)ze[Ke++]=Et[At]}function r(Be,Ye,rt,Se,ze){for(var Ke=1,st=rt+1;st<Ye.length;++st)Ke*=Ye[st];var ct=Ye[rt];if(Ye.length-rt==4){var Tt=Ye[rt+1],Et=Ye[rt+2];for(Ye=Ye[rt+3],st=0;st<ct;++st)o(Be[st],Tt,Et,Ye,Se,ze),ze+=Ke}else for(st=0;st<ct;++st)r(Be[st],Ye,rt+1,Se,ze),ze+=Ke}function n(Be){return 0|Pe[Object.prototype.toString.call(Be)]}function i(Be,Ye){for(var rt=0;rt<Ye.length;++rt)Be[rt]=Ye[rt]}function a(Be,Ye,rt,Se,ze,Ke,st){for(var ct=0,Tt=0;Tt<rt;++Tt)for(var Et=0;Et<Se;++Et)Be[ct++]=Ye[ze*Tt+Ke*Et+st]}function f(Be){for(var Ye=ce.allocType(5123,Be.length),rt=0;rt<Be.length;++rt)if(isNaN(Be[rt]))Ye[rt]=65535;else if(Be[rt]===1/0)Ye[rt]=31744;else if(Be[rt]===-1/0)Ye[rt]=64512;else{fe[0]=Be[rt];var Se=(Ke=ye[0])>>>31<<15,ze=(Ke<<1>>>24)-127,Ke=Ke>>13&1023;Ye[rt]=-24>ze?Se:-14>ze?Se+(Ke+1024>>-14-ze):15<ze?Se+31744:Se+(ze+15<<10)+Ke}return Ye}function x(Be){return Array.isArray(Be)||de(Be)}function v(Be){return"[object "+Be+"]"}function g(Be){return Array.isArray(Be)&&(0===Be.length||"number"==typeof Be[0])}function y(Be){return!(!Array.isArray(Be)||0===Be.length||!x(Be[0]))}function h(Be){return Object.prototype.toString.call(Be)}function m(Be){if(!Be)return!1;var Ye=h(Be);return 0<=He.indexOf(Ye)||g(Be)||y(Be)||t(Be)}function w(Be,Ye){36193===Be.type?(Be.data=f(Ye),ce.freeType(Ye)):Be.data=Ye}function u(Be,Ye,rt,Se,ze,Ke){if(Be=void 0!==tt[Be]?tt[Be]:Ce[Be]*nt[Ye],Ke&&(Be*=6),ze){for(Se=0;1<=rt;)Se+=Be*rt*rt,rt/=2;return Se}return Be*rt*Se}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 I(Be,Ye){return Be>>>Ye|Be<<32-Ye}function U(Be,Ye){var rt=(65535&Be)+(65535&Ye);return(Be>>16)+(Ye>>16)+(rt>>16)<<16|65535&rt}function z(Be){return Array.prototype.slice.call(Be)}function H(Be){return z(Be).join("")}function N(Be){return Array.isArray(Be)||de(Be)||t(Be)}function B(Be){return Be.sort(function(Ye,rt){return"viewport"===Ye?-1:"viewport"===rt?1:Ye<rt?-1:1})}function j(Be,Ye,rt,Se){this.thisDep=Be,this.contextDep=Ye,this.propDep=rt,this.append=Se}function J(Be){return Be&&!(Be.thisDep||Be.contextDep||Be.propDep)}function G(Be){return new j(!1,!1,!1,Be)}function V(Be,Ye){var rt=Be.type;if(0===rt)return new j(!0,1<=(rt=Be.data.length),2<=rt,Ye);if(4===rt)return new j((rt=Be.data).thisDep,rt.contextDep,rt.propDep,Ye);if(5===rt)return new j(!1,!1,!1,Ye);if(6===rt){for(var Se=rt=!1,ze=!1,Ke=0;Ke<Be.data.length;++Ke){var st=Be.data[Ke];1===st.type?ze=!0:2===st.type?Se=!0:3===st.type?rt=!0:0===st.type?(rt=!0,1<=(st=st.data)&&(Se=!0),2<=st&&(ze=!0)):4===st.type&&(rt=rt||st.data.thisDep,Se=Se||st.data.contextDep,ze=ze||st.data.propDep)}return new j(rt,Se,ze,Ye)}return new j(3===rt,2===rt,1===rt,Ye)}function W(Be,Ye,rt,Se,ze,Ke,st,ct,Tt,Et,At,ht,pt,gt,Pt,Ot){function Ht(zt){return zt.replace(".","_")}function jt(zt,Wt,tn){var Sn=Ht(zt);Un.push(zt),Cn[Sn]=_n[Sn]=!!tn,Gn[Sn]=Wt}function Nt(zt,Wt,tn){var Sn=Ht(zt);Un.push(zt),Array.isArray(tn)?(_n[Sn]=tn.slice(),Cn[Sn]=tn.slice()):_n[Sn]=Cn[Sn]=tn,ar[Sn]=Wt}function Gt(){var zt=function F(Be){function Ye(){var At=[],ht=[];return K(function(){At.push.apply(At,z(arguments))},{def:function(){var pt="v"+ze++;return ht.push(pt),0<arguments.length&&(At.push(pt,"="),At.push.apply(At,z(arguments)),At.push(";")),pt},toString:function(){return H([0<ht.length?"var "+ht.join(",")+";":"",H(At)])}})}function rt(){function At(Ot,Ht){pt(Ot,Ht,"=",ht.def(Ot,Ht),";")}var ht=Ye(),pt=Ye(),gt=ht.toString,Pt=pt.toString;return K(function(){ht.apply(ht,z(arguments))},{def:ht.def,entry:ht,exit:pt,save:At,set:function(Ot,Ht,jt){At(Ot,Ht),ht(Ot,Ht,"=",jt,";")},toString:function(){return gt()+Pt()}})}var Se=Be&&Be.cache,ze=0,Ke=[],st=[],ct=[],Tt=Ye(),Et={};return{global:Tt,link:function(At,ht){var pt=ht&&ht.stable;if(!pt)for(var gt=0;gt<st.length;++gt)if(st[gt]===At&&!ct[gt])return Ke[gt];return gt="g"+ze++,Ke.push(gt),st.push(At),ct.push(pt),gt},block:Ye,proc:function(At,ht){function pt(){var Ht="a"+gt.length;return gt.push(Ht),Ht}var gt=[];ht=ht||0;for(var Pt=0;Pt<ht;++Pt)pt();var Ot=(Pt=rt()).toString;return Et[At]=K(Pt,{arg:pt,toString:function(){return H(["function(",gt.join(),"){",Ot(),"}"])}})},scope:rt,cond:function(){var At=H(arguments),ht=rt(),pt=rt(),gt=ht.toString,Pt=pt.toString;return K(ht,{then:function(){return ht.apply(ht,z(arguments)),this},else:function(){return pt.apply(pt,z(arguments)),this},toString:function(){var Ot=Pt();return Ot&&(Ot="else{"+Ot+"}"),H(["if(",At,"){",gt(),"}",Ot])}})},compile:function(){var At=['"use strict";',Tt,"return {"];Object.keys(Et).forEach(function(gt){At.push('"',gt,'":',Et[gt].toString(),",")}),At.push("}");var ht,pt=H(At).replace(/;/g,";\n").replace(/}/g,"}\n").replace(/{/g,"{\n");return Se&&(ht=function(gt){for(var Pt,Ot="",Ht=0;Ht<gt.length;Ht++)Pt=gt.charCodeAt(Ht),Ot+="0123456789abcdef".charAt(Pt>>>4&15)+"0123456789abcdef".charAt(15&Pt);return Ot}(function(gt){for(var Pt=Array(gt.length>>2),Ot=0;Ot<Pt.length;Ot++)Pt[Ot]=0;for(Ot=0;Ot<8*gt.length;Ot+=8)Pt[Ot>>5]|=(255&gt.charCodeAt(Ot/8))<<24-Ot%32;var Ht,jt,Nt,Gt,un,pn,Kt,wn,Bn,vn,cn,dn=8*gt.length;for(gt=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225],Ot=Array(64),Pt[dn>>5]|=128<<24-dn%32,Pt[15+(dn+64>>9<<4)]=dn,wn=0;wn<Pt.length;wn+=16){for(dn=gt[0],Ht=gt[1],jt=gt[2],Nt=gt[3],Gt=gt[4],un=gt[5],pn=gt[6],Kt=gt[7],Bn=0;64>Bn;Bn++){var sn;16>Bn?Ot[Bn]=Pt[Bn+wn]:(vn=Bn,cn=U(cn=I(cn=Ot[Bn-2],17)^I(cn,19)^cn>>>10,Ot[Bn-7]),sn=I(sn=Ot[Bn-15],7)^I(sn,18)^sn>>>3,Ot[vn]=U(U(cn,sn),Ot[Bn-16])),vn=U(U(U(U(Kt,vn=I(vn=Gt,6)^I(vn,11)^I(vn,25)),Gt&un^~Gt&pn),wt[Bn]),Ot[Bn]),cn=U(Kt=I(Kt=dn,2)^I(Kt,13)^I(Kt,22),dn&Ht^dn&jt^Ht&jt),Kt=pn,pn=un,un=Gt,Gt=U(Nt,vn),Nt=jt,jt=Ht,Ht=dn,dn=U(vn,cn)}gt[0]=U(dn,gt[0]),gt[1]=U(Ht,gt[1]),gt[2]=U(jt,gt[2]),gt[3]=U(Nt,gt[3]),gt[4]=U(Gt,gt[4]),gt[5]=U(un,gt[5]),gt[6]=U(pn,gt[6]),gt[7]=U(Kt,gt[7])}for(Pt="",Ot=0;Ot<32*gt.length;Ot+=8)Pt+=String.fromCharCode(gt[Ot>>5]>>>24-Ot%32&255);return Pt}(function(gt){for(var Pt,Ot,Ht="",jt=-1;++jt<gt.length;)Pt=gt.charCodeAt(jt),Ot=jt+1<gt.length?gt.charCodeAt(jt+1):0,55296<=Pt&&56319>=Pt&&56320<=Ot&&57343>=Ot&&(Pt=65536+((1023&Pt)<<10)+(1023&Ot),jt++),127>=Pt?Ht+=String.fromCharCode(Pt):2047>=Pt?Ht+=String.fromCharCode(192|Pt>>>6&31,128|63&Pt):65535>=Pt?Ht+=String.fromCharCode(224|Pt>>>12&15,128|Pt>>>6&63,128|63&Pt):2097151>=Pt&&(Ht+=String.fromCharCode(240|Pt>>>18&7,128|Pt>>>12&63,128|Pt>>>6&63,128|63&Pt));return Ht}(pt))),Se[ht])?Se[ht].apply(null,st):(pt=Function.apply(null,Ke.concat(pt)),Se&&(Se[ht]=pt),pt.apply(null,st))}}}({cache:Pt}),Wt=zt.link,tn=zt.global;zt.id=kn++,zt.batchId="0";var Sn=Wt(yr),An=zt.shared={props:"a0"};Object.keys(yr).forEach(function(fn){An[fn]=tn.def(Sn,".",fn)});var Tn=zt.next={},an=zt.current={};Object.keys(ar).forEach(function(fn){Array.isArray(_n[fn])&&(Tn[fn]=tn.def(An.next,".",fn),an[fn]=tn.def(An.current,".",fn))});var mn=zt.constants={};Object.keys($t).forEach(function(fn){mn[fn]=tn.def(JSON.stringify($t[fn]))}),zt.invoke=function(fn,yn){switch(yn.type){case 0:var Ln=["this",An.context,An.props,zt.batchId];return fn.def(Wt(yn.data),".call(",Ln.slice(0,Math.max(yn.data.length+1,4)),")");case 1:return fn.def(An.props,yn.data);case 2:return fn.def(An.context,yn.data);case 3:return fn.def("this",yn.data);case 4:return yn.data.append(zt,fn),yn.data.ref;case 5:return yn.data.toString();case 6:return yn.data.map(function(Hn){return zt.invoke(fn,Hn)})}},zt.attribCache={};var on={};return zt.scopeAttrib=function(fn){if((fn=Ye.id(fn))in on)return on[fn];var yn=Et.scope[fn];return yn||(yn=Et.scope[fn]=new qn),on[fn]=Wt(yn)},zt}function vn(zt,Wt,tn){var Sn=zt.shared.context,An=zt.scope();Object.keys(tn).forEach(function(Tn){Wt.save(Sn,"."+Tn);var an=tn[Tn].append(zt,Wt);Array.isArray(an)?An(Sn,".",Tn,"=[",an.join(),"];"):An(Sn,".",Tn,"=",an,";")}),Wt(An)}function cn(zt,Wt,tn,Sn){var An,Tn=(mn=zt.shared).gl,an=mn.framebuffer;nn&&(An=Wt.def(mn.extensions,".webgl_draw_buffers"));var mn=(on=zt.constants).drawBuffer,on=on.backBuffer;zt=tn?tn.append(zt,Wt):Wt.def(an,".next"),Sn||Wt("if(",zt,"!==",an,".cur){"),Wt("if(",zt,"){",Tn,".bindFramebuffer(",36160,",",zt,".framebuffer);"),nn&&Wt(An,".drawBuffersWEBGL(",mn,"[",zt,".colorAttachments.length]);"),Wt("}else{",Tn,".bindFramebuffer(",36160,",null);"),nn&&Wt(An,".drawBuffersWEBGL(",on,");"),Wt("}",an,".cur=",zt,";"),Sn||Wt("}")}function dn(zt,Wt,tn){var Sn=zt.shared,An=Sn.gl,Tn=zt.current,an=zt.next,mn=Sn.current,on=Sn.next,fn=zt.cond(mn,".dirty");Un.forEach(function(yn){var Ln,Hn;if(!((yn=Ht(yn))in tn.state))if(yn in an){Ln=an[yn],Hn=Tn[yn];var Wn=b(_n[yn].length,function(Kn){return fn.def(Ln,"[",Kn,"]")});fn(zt.cond(Wn.map(function(Kn,nr){return Kn+"!=="+Hn+"["+nr+"]"}).join("||")).then(An,".",ar[yn],"(",Wn,");",Wn.map(function(Kn,nr){return Hn+"["+nr+"]="+Kn}).join(";"),";"))}else Ln=fn.def(on,".",yn),Wn=zt.cond(Ln,"!==",mn,".",yn),fn(Wn),yn in Gn?Wn(zt.cond(Ln).then(An,".enable(",Gn[yn],");").else(An,".disable(",Gn[yn],");"),mn,".",yn,"=",Ln,";"):Wn(An,".",ar[yn],"(",Ln,");",mn,".",yn,"=",Ln,";")}),0===Object.keys(tn.state).length&&fn(mn,".dirty=false;"),Wt(fn)}function sn(zt,Wt,tn,Sn){var An,Tn=zt.shared,an=zt.current,mn=Tn.current,on=Tn.gl;B(Object.keys(tn)).forEach(function(fn){var yn=tn[fn];if(!Sn||Sn(yn)){var Ln=yn.append(zt,Wt);if(Gn[fn]){var Hn=Gn[fn];J(yn)?(An=zt.link(Ln,{stable:!0}),Wt(zt.cond(An).then(on,".enable(",Hn,");").else(on,".disable(",Hn,");")),Wt(mn,".",fn,"=",An,";")):(Wt(zt.cond(Ln).then(on,".enable(",Hn,");").else(on,".disable(",Hn,");")),Wt(mn,".",fn,"=",Ln,";"))}else if(x(Ln)){var Wn=an[fn];Wt(on,".",ar[fn],"(",Ln,");",Ln.map(function(Kn,nr){return Wn+"["+nr+"]="+Kn}).join(";"),";")}else J(yn)?(An=zt.link(Ln,{stable:!0}),Wt(on,".",ar[fn],"(",An,");",mn,".",fn,"=",An,";")):Wt(on,".",ar[fn],"(",Ln,");",mn,".",fn,"=",Ln,";")}})}function hn(zt,Wt){Zt&&(zt.instancing=Wt.def(zt.shared.extensions,".angle_instanced_arrays"))}function En(zt,Wt,tn,Sn,An){function Tn(){return typeof performance>"u"?"Date.now()":"performance.now()"}function an(nr){nr(fn=Wt.def(),"=",Tn(),";"),"string"==typeof An?nr(Hn,".count+=",An,";"):nr(Hn,".count++;"),gt&&(Sn?nr(yn=Wt.def(),"=",Kn,".getNumPendingQueries();"):nr(Kn,".beginQuery(",Hn,");"))}function mn(nr){nr(Hn,".cpuTime+=",Tn(),"-",fn,";"),gt&&(Sn?nr(Kn,".pushScopeStats(",yn,",",Kn,".getNumPendingQueries(),",Hn,");"):nr(Kn,".endQuery();"))}function on(nr){var er=Wt.def(Wn,".profile");Wt(Wn,".profile=",nr,";"),Wt.exit(Wn,".profile=",er,";")}var fn,yn,Ln=zt.shared,Hn=zt.stats,Wn=Ln.current,Kn=Ln.timer;if(tn=tn.profile){if(J(tn))return void(tn.enable?(an(Wt),mn(Wt.exit),on("true")):on("false"));on(tn=tn.append(zt,Wt))}else tn=Wt.def(Wn,".profile");an(Ln=zt.block()),Wt("if(",tn,"){",Ln,"}"),mn(zt=zt.block()),Wt.exit("if(",tn,"){",zt,"}")}function Mn(zt,Wt,tn,Sn,An){var an=zt.shared;Sn.forEach(function(mn){var on,fn=mn.name,yn=tn.attributes[fn];if(yn){if(!An(yn))return;on=yn.append(zt,Wt)}else{if(!An(We))return;var Ln=zt.scopeAttrib(fn);on={},Object.keys(new qn).forEach(function(Hn){on[Hn]=Wt.def(Ln,".",Hn)})}!function Tn(mn,on,fn){function yn(){Wt("if(!",Kn,".buffer){",Hn,".enableVertexAttribArray(",Wn,");}");var ir,lr=fn.type;ir=fn.size?Wt.def(fn.size,"||",on):on,Wt("if(",Kn,".type!==",lr,"||",Kn,".size!==",ir,"||",or.map(function(br){return Kn+"."+br+"!=="+fn[br]}).join("||"),"){",Hn,".bindBuffer(",34962,",",nr,".buffer);",Hn,".vertexAttribPointer(",[Wn,ir,lr,fn.normalized,fn.stride,fn.offset],");",Kn,".type=",lr,";",Kn,".size=",ir,";",or.map(function(br){return Kn+"."+br+"="+fn[br]+";"}).join(""),"}"),Zt&&Wt("if(",Kn,".divisor!==",lr=fn.divisor,"){",zt.instancing,".vertexAttribDivisorANGLE(",[Wn,lr],");",Kn,".divisor=",lr,";}")}function Ln(){Wt("if(",Kn,".buffer){",Hn,".disableVertexAttribArray(",Wn,");",Kn,".buffer=null;","}if(",Lt.map(function(ir,lr){return Kn+"."+ir+"!=="+er[lr]}).join("||"),"){",Hn,".vertexAttrib4f(",Wn,",",er,");",Lt.map(function(ir,lr){return Kn+"."+ir+"="+er[lr]+";"}).join(""),"}")}var Hn=an.gl,Wn=Wt.def(mn,".location"),Kn=Wt.def(an.attributes,"[",Wn,"]"),nr=fn.buffer,er=[fn.x,fn.y,fn.z,fn.w],or=["buffer","normalized","offset","stride"];1===(mn=fn.state)?yn():2===mn?Ln():(Wt("if(",mn,"===",1,"){"),yn(),Wt("}else{"),Ln(),Wt("}"))}(zt.link(mn),function(Hn){switch(Hn){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}}(mn.info.type),on)})}function Rn(zt,Wt,tn,Sn,An,Tn){for(var an,mn=zt.shared,on=mn.gl,fn=0;fn<Sn.length;++fn){var yn,Ln=(Kn=Sn[fn]).name,Hn=Kn.info.type,Wn=tn.uniforms[Ln],Kn=zt.link(Kn)+".location";if(Wn){if(!An(Wn))continue;if(J(Wn)){if(Ln=Wn.value,35678===Hn||35680===Hn)Wt(on,".uniform1i(",Kn,",",(Hn=zt.link(Ln._texture||Ln.color[0]._texture))+".bind());"),Wt.exit(Hn,".unbind();");else if(35674===Hn||35675===Hn||35676===Hn)Wn=2,35675===Hn?Wn=3:35676===Hn&&(Wn=4),Wt(on,".uniformMatrix",Wn,"fv(",Kn,",false,",Ln=zt.global.def("new Float32Array(["+Array.prototype.slice.call(Ln)+"])"),");");else{switch(Hn){case 5126:an="1f";break;case 35664:an="2f";break;case 35665:an="3f";break;case 35666:an="4f";break;case 35670:case 5124:an="1i";break;case 35671:case 35667:an="2i";break;case 35672:case 35668:an="3i";break;case 35673:case 35669:an="4i"}Wt(on,".uniform",an,"(",Kn,",",x(Ln)?Array.prototype.slice.call(Ln):Ln,");")}continue}yn=Wn.append(zt,Wt)}else{if(!An(We))continue;yn=Wt.def(mn.uniforms,"[",Ye.id(Ln),"]")}switch(35678===Hn?Wt("if(",yn,"&&",yn,'._reglType==="framebuffer"){',yn,"=",yn,".color[0];","}"):35680===Hn&&Wt("if(",yn,"&&",yn,'._reglType==="framebufferCube"){',yn,"=",yn,".color[0];","}"),Ln=1,Hn){case 35678:case 35680:Hn=Wt.def(yn,"._texture"),Wt(on,".uniform1i(",Kn,",",Hn,".bind());"),Wt.exit(Hn,".unbind();");continue;case 5124:case 35670:an="1i";break;case 35667:case 35671:an="2i",Ln=2;break;case 35668:case 35672:an="3i",Ln=3;break;case 35669:case 35673:an="4i",Ln=4;break;case 5126:an="1f";break;case 35664:an="2f",Ln=2;break;case 35665:an="3f",Ln=3;break;case 35666:an="4f",Ln=4;break;case 35674:an="Matrix2fv";break;case 35675:an="Matrix3fv";break;case 35676:an="Matrix4fv"}if("M"===an.charAt(0)){Wt(on,".uniform",an,"(",Kn,","),Kn=Math.pow(Hn-35674+2,2);var nr=zt.global.def("new Float32Array(",Kn,")");Array.isArray(yn)?Wt("false,(",b(Kn,function(or){return nr+"["+or+"]="+yn[or]}),",",nr,")"):Wt("false,(Array.isArray(",yn,")||",yn," instanceof Float32Array)?",yn,":(",b(Kn,function(or){return nr+"["+or+"]="+yn+"["+or+"]"}),",",nr,")"),Wt(");")}else{if(1<Ln){Hn=[];var er=[];for(Wn=0;Wn<Ln;++Wn)Array.isArray(yn)?er.push(yn[Wn]):er.push(Wt.def(yn+"["+Wn+"]")),Tn&&Hn.push(Wt.def());Tn&&Wt("if(!",zt.batchId,"||",Hn.map(function(or,ir){return or+"!=="+er[ir]}).join("||"),"){",Hn.map(function(or,ir){return or+"="+er[ir]+";"}).join("")),Wt(on,".uniform",an,"(",Kn,",",er.join(","),");")}else Tn&&(Hn=Wt.def(),Wt("if(!",zt.batchId,"||",Hn,"!==",yn,"){",Hn,"=",yn,";")),Wt(on,".uniform",an,"(",Kn,",",yn,");");Tn&&Wt("}")}}}function Nn(zt,Wt,tn,Sn){function An(lr){var br=Hn[lr];return br?br.append(zt,br.contextDep&&Sn.contextDynamic||br.propDep?tn:Wt):Wt.def(Ln,".",lr)}function Tn(){function lr(){tn(on,".drawElementsInstancedANGLE(",[Kn,er,or,nr+"<<(("+or+"-5121)>>1)",mn],");")}function br(){tn(on,".drawArraysInstancedANGLE(",[Kn,nr,er,mn],");")}Wn&&"null"!==Wn?ir?lr():(tn("if(",Wn,"){"),lr(),tn("}else{"),br(),tn("}")):br()}function an(){function lr(){tn(yn+".drawElements("+[Kn,er,or,nr+"<<(("+or+"-5121)>>1)"]+");")}function br(){tn(yn+".drawArrays("+[Kn,nr,er]+");")}Wn&&"null"!==Wn?ir?lr():(tn("if(",Wn,"){"),lr(),tn("}else{"),br(),tn("}")):br()}var mn,on,lr,br,fn=zt.shared,yn=fn.gl,Ln=fn.draw,Hn=Sn.draw,Wn=(br=Wt,(lr=Hn.elements)?((lr.contextDep&&Sn.contextDynamic||lr.propDep)&&(br=tn),lr=lr.append(zt,br),Hn.elementsActive&&br("if("+lr+")"+yn+".bindBuffer(34963,"+lr+".buffer.buffer);")):(lr=br.def(),br(lr,"=",Ln,".","elements",";","if(",lr,"){",yn,".bindBuffer(",34963,",",lr,".buffer.buffer);}","else if(",fn.vao,".currentVAO){",lr,"=",zt.shared.elements+".getElements("+fn.vao,".currentVAO.elements);",zn?"":"if("+lr+")"+yn+".bindBuffer(34963,"+lr+".buffer.buffer);","}")),lr),Kn=An("primitive"),nr=An("offset"),er=function(){var lr=Hn.count,br=Wt;return lr?((lr.contextDep&&Sn.contextDynamic||lr.propDep)&&(br=tn),lr=lr.append(zt,br)):lr=br.def(Ln,".","count"),lr}();if("number"==typeof er){if(0===er)return}else tn("if(",er,"){"),tn.exit("}");Zt&&(mn=An("instances"),on=zt.instancing);var or=Wn+".type",ir=Hn.elements&&J(Hn.elements)&&!Hn.vaoActive;Zt&&("number"!=typeof mn||0<=mn)?"string"==typeof mn?(tn("if(",mn,">0){"),Tn(),tn("}else if(",mn,"<0){"),an(),tn("}")):Tn():an()}function Fn(zt,Wt,tn,Sn,An){return An=(Wt=Gt()).proc("body",An),Zt&&(Wt.instancing=An.def(Wt.shared.extensions,".angle_instanced_arrays")),zt(Wt,An,tn,Sn),Wt.compile().body}function rr(zt,Wt,tn,Sn){hn(zt,Wt),tn.useVAO?tn.drawVAO?Wt(zt.shared.vao,".setVAO(",tn.drawVAO.append(zt,Wt),");"):Wt(zt.shared.vao,".setVAO(",zt.shared.vao,".targetVAO);"):(Wt(zt.shared.vao,".setVAO(null);"),Mn(zt,Wt,tn,Sn.attributes,function(){return!0})),Rn(zt,Wt,tn,Sn.uniforms,function(){return!0},!1),Nn(zt,Wt,Wt,tn)}function $n(zt,Wt,tn,Sn){function An(){return!0}zt.batchId="a1",hn(zt,Wt),Mn(zt,Wt,tn,Sn.attributes,An),Rn(zt,Wt,tn,Sn.uniforms,An,!1),Nn(zt,Wt,Wt,tn)}function mr(zt,Wt,tn,Sn){function An(Ln){return Ln.contextDep&&an||Ln.propDep}function Tn(Ln){return!An(Ln)}hn(zt,Wt);var an=tn.contextDep,mn=Wt.def(),on=Wt.def();zt.shared.props=on,zt.batchId=mn;var fn=zt.scope(),yn=zt.scope();Wt(fn.entry,"for(",mn,"=0;",mn,"<","a1",";++",mn,"){",on,"=","a0","[",mn,"];",yn,"}",fn.exit),tn.needsContext&&vn(zt,yn,tn.context),tn.needsFramebuffer&&cn(zt,yn,tn.framebuffer),sn(zt,yn,tn.state,An),tn.profile&&An(tn.profile)&&En(zt,yn,tn,!1,!0),Sn?(tn.useVAO?tn.drawVAO?An(tn.drawVAO)?yn(zt.shared.vao,".setVAO(",tn.drawVAO.append(zt,yn),");"):fn(zt.shared.vao,".setVAO(",tn.drawVAO.append(zt,fn),");"):fn(zt.shared.vao,".setVAO(",zt.shared.vao,".targetVAO);"):(fn(zt.shared.vao,".setVAO(null);"),Mn(zt,fn,tn,Sn.attributes,Tn),Mn(zt,yn,tn,Sn.attributes,An)),Rn(zt,fn,tn,Sn.uniforms,Tn,!1),Rn(zt,yn,tn,Sn.uniforms,An,!0),Nn(zt,fn,yn,tn)):(Wt=zt.global.def("{}"),Sn=tn.shader.progVar.append(zt,yn),on=yn.def(Sn,".id"),fn=yn.def(Wt,"[",on,"]"),yn(zt.shared.gl,".useProgram(",Sn,".program);","if(!",fn,"){",fn,"=",Wt,"[",on,"]=",zt.link(function(Ln){return Fn($n,zt,tn,Ln,2)}),"(",Sn,");}",fn,".call(this,a0[",mn,"],",mn,");"))}function Zn(zt,Wt,tn){var Sn=Wt.static[tn];if(Sn&&function(yn){if("object"==typeof yn&&!x(yn)){for(var Ln=Object.keys(yn),Hn=0;Hn<Ln.length;++Hn)if(ee.isDynamic(yn[Ln[Hn]]))return!0;return!1}}(Sn)){var An=zt.global,Tn=Object.keys(Sn),an=!1,mn=!1,on=!1,fn=zt.global.def("{}");Tn.forEach(function(yn){var Ln=Sn[yn];if(ee.isDynamic(Ln))"function"==typeof Ln&&(Ln=Sn[yn]=ee.unbox(Ln)),yn=V(Ln,null),an=an||yn.thisDep,on=on||yn.propDep,mn=mn||yn.contextDep;else{switch(An(fn,".",yn,"="),typeof Ln){case"number":An(Ln);break;case"string":An('"',Ln,'"');break;case"object":Array.isArray(Ln)&&An("[",Ln.join(),"]");break;default:An(zt.link(Ln))}An(";")}}),Wt.dynamic[tn]=new ee.DynamicVariable(4,{thisDep:an,contextDep:mn,propDep:on,ref:fn,append:function(yn,Ln){Tn.forEach(function(Hn){var Wn=Sn[Hn];ee.isDynamic(Wn)&&(Wn=yn.invoke(Ln,Wn),Ln(fn,".",Hn,"=",Wn,";"))})}}),delete Wt.static[tn]}}var qn=Et.Record,ur={add:32774,subtract:32778,"reverse subtract":32779};rt.ext_blend_minmax&&(ur.min=32775,ur.max=32776);var Zt=rt.angle_instanced_arrays,nn=rt.webgl_draw_buffers,zn=rt.oes_vertex_array_object,_n={dirty:!0,profile:Ot.profile},Cn={},Un=[],Gn={},ar={};jt("dither",3024),jt("blend.enable",3042),Nt("blend.color","blendColor",[0,0,0,0]),Nt("blend.equation","blendEquationSeparate",[32774,32774]),Nt("blend.func","blendFuncSeparate",[1,0,1,0]),jt("depth.enable",2929,!0),Nt("depth.func","depthFunc",513),Nt("depth.range","depthRange",[0,1]),Nt("depth.mask","depthMask",!0),Nt("colorMask","colorMask",[!0,!0,!0,!0]),jt("cull.enable",2884),Nt("cull.face","cullFace",1029),Nt("frontFace","frontFace",2305),Nt("lineWidth","lineWidth",1),jt("polygonOffset.enable",32823),Nt("polygonOffset.offset","polygonOffset",[0,0]),jt("sample.alpha",32926),jt("sample.enable",32928),Nt("sample.coverage","sampleCoverage",[1,!1]),jt("stencil.enable",2960),Nt("stencil.mask","stencilMask",-1),Nt("stencil.func","stencilFunc",[519,0,-1]),Nt("stencil.opFront","stencilOpSeparate",[1028,7680,7680,7680]),Nt("stencil.opBack","stencilOpSeparate",[1029,7680,7680,7680]),jt("scissor.enable",3089),Nt("scissor.box","scissor",[0,0,Be.drawingBufferWidth,Be.drawingBufferHeight]),Nt("viewport","viewport",[0,0,Be.drawingBufferWidth,Be.drawingBufferHeight]);var yr={gl:Be,context:pt,strings:Ye,next:Cn,current:_n,draw:ht,elements:Ke,buffer:ze,shader:At,attributes:Et.state,vao:Et,uniforms:Tt,framebuffer:ct,extensions:rt,timer:gt,isBufferArgs:N},$t={primTypes:se,compareFuncs:Ut,blendFuncs:It,blendEquations:ur,stencilOps:Rt,glTypes:xe,orientationType:Ge};nn&&($t.backBuffer=[1029],$t.drawBuffer=b(Se.maxDrawbuffers,function(zt){return 0===zt?[0]:b(zt,function(Wt){return 36064+Wt})}));var kn=0;return{next:Cn,current:_n,procs:function(){var zt=Gt(),Wt=zt.proc("poll"),tn=zt.proc("refresh"),Sn=zt.block();Wt(Sn),tn(Sn);var An,Tn=(on=zt.shared).gl,an=on.next,mn=on.current;Sn(mn,".dirty=false;"),cn(zt,Wt),cn(zt,tn,null,!0),Zt&&(An=zt.link(Zt)),rt.oes_vertex_array_object&&tn(zt.link(rt.oes_vertex_array_object),".bindVertexArrayOES(null);");var on=tn.def(on.attributes),fn=tn.def(0),yn=zt.cond(fn,".buffer");yn.then(Tn,".enableVertexAttribArray(i);",Tn,".bindBuffer(",34962,",",fn,".buffer.buffer);",Tn,".vertexAttribPointer(i,",fn,".size,",fn,".type,",fn,".normalized,",fn,".stride,",fn,".offset);").else(Tn,".disableVertexAttribArray(i);",Tn,".vertexAttrib4f(i,",fn,".x,",fn,".y,",fn,".z,",fn,".w);",fn,".buffer=null;");var Ln=zt.link(Se.maxAttributes,{stable:!0});return tn("for(var i=0;i<",Ln,";++i){",fn,"=",on,"[i];",yn,"}"),Zt&&tn("for(var i=0;i<",Ln,";++i){",An,".vertexAttribDivisorANGLE(i,",on,"[i].divisor);","}"),tn(zt.shared.vao,".currentVAO=null;",zt.shared.vao,".setVAO(",zt.shared.vao,".targetVAO);"),Object.keys(Gn).forEach(function(Hn){var Wn=Gn[Hn],Kn=Sn.def(an,".",Hn),nr=zt.block();nr("if(",Kn,"){",Tn,".enable(",Wn,")}else{",Tn,".disable(",Wn,")}",mn,".",Hn,"=",Kn,";"),tn(nr),Wt("if(",Kn,"!==",mn,".",Hn,"){",nr,"}")}),Object.keys(ar).forEach(function(Hn){var Wn,Kn,nr=ar[Hn],er=_n[Hn],or=zt.block();or(Tn,".",nr,"("),x(er)?(nr=er.length,Wn=zt.global.def(an,".",Hn),Kn=zt.global.def(mn,".",Hn),or(b(nr,function(ir){return Wn+"["+ir+"]"}),");",b(nr,function(ir){return Kn+"["+ir+"]="+Wn+"["+ir+"];"}).join("")),Wt("if(",b(nr,function(ir){return Wn+"["+ir+"]!=="+Kn+"["+ir+"]"}).join("||"),"){",or,"}")):(Wn=Sn.def(an,".",Hn),Kn=Sn.def(mn,".",Hn),or(Wn,");",mn,".",Hn,"=",Wn,";"),Wt("if(",Wn,"!==",Kn,"){",or,"}")),tn(or)}),zt.compile()}(),compile:function(zt,Wt,tn,Sn,An){var Tn=Gt();Tn.stats=Tn.link(An),Object.keys(Wt.static).forEach(function(mn){Zn(Tn,Wt,mn)}),Ct.forEach(function(mn){Zn(Tn,zt,mn)});var an=function Bn(zt,Wt,tn,Sn,An){function Tn(nr){var er=mn[nr];er&&(fn[nr]=er)}var nr,or,ir,lr,an=function(nr,er){if("string"==typeof(or=nr.static).frag&&"string"==typeof or.vert){if(0<Object.keys(er.dynamic).length)return null;var or=er.static,ir=Object.keys(or);if(0<ir.length&&"number"==typeof or[ir[0]]){for(var lr=[],br=0;br<ir.length;++br)lr.push([0|or[ir[br]],ir[br]]);return lr}}return null}(zt,Wt),mn=function(nr,er,or){function ir(Sr){if(Sr in lr){var cr=lr[Sr];Sr=!0;var Lr,Rr,li=0|cr.x,Mi=0|cr.y;return"width"in cr?Lr=0|cr.width:Sr=!1,"height"in cr?Rr=0|cr.height:Sr=!1,new j(!Sr&&er&&er.thisDep,!Sr&&er&&er.contextDep,!Sr&&er&&er.propDep,function(Ea,Ui){var vi=Ea.shared.context,La=Lr;"width"in cr||(La=Ui.def(vi,".","framebufferWidth","-",li));var to=Rr;return"height"in cr||(to=Ui.def(vi,".","framebufferHeight","-",Mi)),[li,Mi,La,to]})}if(Sr in br){var Pi=br[Sr];return Sr=V(Pi,function(Ea,Ui){var vi=Ea.invoke(Ui,Pi),La=Ea.shared.context,to=Ui.def(vi,".x|0"),qo=Ui.def(vi,".y|0");return[to,qo,Ui.def('"width" in ',vi,"?",vi,".width|0:","(",La,".","framebufferWidth","-",to,")"),vi=Ui.def('"height" in ',vi,"?",vi,".height|0:","(",La,".","framebufferHeight","-",qo,")")]}),er&&(Sr.thisDep=Sr.thisDep||er.thisDep,Sr.contextDep=Sr.contextDep||er.contextDep,Sr.propDep=Sr.propDep||er.propDep),Sr}return er?new j(er.thisDep,er.contextDep,er.propDep,function(Ea,Ui){var vi=Ea.shared.context;return[0,0,Ui.def(vi,".","framebufferWidth"),Ui.def(vi,".","framebufferHeight")]}):null}var lr=nr.static,br=nr.dynamic;if(nr=ir("viewport")){var Ur=nr;nr=new j(nr.thisDep,nr.contextDep,nr.propDep,function(Sr,cr){var Lr=Ur.append(Sr,cr),Rr=Sr.shared.context;return cr.set(Rr,".viewportWidth",Lr[2]),cr.set(Rr,".viewportHeight",Lr[3]),Lr})}return{viewport:nr,scissor_box:ir("scissor.box")}}(zt,Ln=function un(zt,Wt){var tn=zt.static,Sn=zt.dynamic;if("framebuffer"in tn){var An=tn.framebuffer;return An?(An=ct.getFramebuffer(An),G(function(an,mn){var on=an.link(An),fn=an.shared;return mn.set(fn.framebuffer,".next",on),mn.set(fn=fn.context,".framebufferWidth",on+".width"),mn.set(fn,".framebufferHeight",on+".height"),on})):G(function(an,mn){var on=an.shared;return mn.set(on.framebuffer,".next","null"),mn.set(on=on.context,".framebufferWidth",on+".drawingBufferWidth"),mn.set(on,".framebufferHeight",on+".drawingBufferHeight"),"null"})}if("framebuffer"in Sn){var Tn=Sn.framebuffer;return V(Tn,function(an,mn){var on=an.invoke(mn,Tn),fn=an.shared,yn=fn.framebuffer;return on=mn.def(yn,".getFramebuffer(",on,")"),mn.set(yn,".next",on),mn.set(fn=fn.context,".framebufferWidth",on+"?"+on+".width:"+fn+".drawingBufferWidth"),mn.set(fn,".framebufferHeight",on+"?"+on+".height:"+fn+".drawingBufferHeight"),on})}return null}(zt)),on=function Kt(zt,Wt){function tn(Kn,nr){if(Kn in Sn){var er=0|Sn[Kn];return nr?Tn.offset=er:Tn.instances=er,G(function(ir,lr){return nr&&(ir.OFFSET=er),er})}if(Kn in An){var or=An[Kn];return V(or,function(ir,lr){var br=ir.invoke(lr,or);return nr&&(ir.OFFSET=br),br})}if(nr){if(on)return G(function(ir,lr){return ir.OFFSET=0});if(an)return new j(mn.thisDep,mn.contextDep,mn.propDep,function(ir,lr){return lr.def(ir.shared.vao+".currentVAO?"+ir.shared.vao+".currentVAO.offset:0")})}else if(an)return new j(mn.thisDep,mn.contextDep,mn.propDep,function(ir,lr){return lr.def(ir.shared.vao+".currentVAO?"+ir.shared.vao+".currentVAO.instances:-1")});return null}var Sn=zt.static,An=zt.dynamic,Tn={},an=!1,mn=function(){if("vao"in Sn){var Kn=Sn.vao;return null!==Kn&&null===Et.getVAO(Kn)&&(Kn=Et.createVAO(Kn)),an=!0,Tn.vao=Kn,G(function(er){var or=Et.getVAO(Kn);return or?er.link(or):"null"})}if("vao"in An){an=!0;var nr=An.vao;return V(nr,function(er,or){var ir=er.invoke(or,nr);return or.def(er.shared.vao+".getVAO("+ir+")")})}return null}(),on=!1,fn=function(){if("elements"in Sn){var Kn=Sn.elements;if(Tn.elements=Kn,N(Kn)){var nr=Tn.elements=Ke.create(Kn,!0);Kn=Ke.getElements(nr),on=!0}else Kn&&(Kn=Ke.getElements(Kn),on=!0);return(nr=G(function(or,ir){if(Kn){var lr=or.link(Kn);return or.ELEMENTS=lr}return or.ELEMENTS=null})).value=Kn,nr}if("elements"in An){on=!0;var er=An.elements;return V(er,function(or,ir){var lr=(br=or.shared).isBufferArgs,br=br.elements,Ur=or.invoke(ir,er),Sr=ir.def("null");return lr=ir.def(lr,"(",Ur,")"),Ur=or.cond(lr).then(Sr,"=",br,".createStream(",Ur,");").else(Sr,"=",br,".getElements(",Ur,");"),ir.entry(Ur),ir.exit(or.cond(lr).then(br,".destroyStream(",Sr,");")),or.ELEMENTS=Sr})}return an?new j(mn.thisDep,mn.contextDep,mn.propDep,function(or,ir){return ir.def(or.shared.vao+".currentVAO?"+or.shared.elements+".getElements("+or.shared.vao+".currentVAO.elements):null")}):null}(),yn=tn("offset",!0),Ln=function(){if("primitive"in Sn){var Kn=Sn.primitive;return Tn.primitive=Kn,G(function(er,or){return se[Kn]})}if("primitive"in An){var nr=An.primitive;return V(nr,function(er,or){var ir=er.constants.primTypes,lr=er.invoke(or,nr);return or.def(ir,"[",lr,"]")})}return on?J(fn)?G(fn.value?function(er,or){return or.def(er.ELEMENTS,".primType")}:function(){return 4}):new j(fn.thisDep,fn.contextDep,fn.propDep,function(er,or){var ir=er.ELEMENTS;return or.def(ir,"?",ir,".primType:",4)}):an?new j(mn.thisDep,mn.contextDep,mn.propDep,function(er,or){return or.def(er.shared.vao+".currentVAO?"+er.shared.vao+".currentVAO.primitive:4")}):null}(),Hn=function(){if("count"in Sn){var Kn=0|Sn.count;return Tn.count=Kn,G(function(){return Kn})}if("count"in An){var nr=An.count;return V(nr,function(er,or){return er.invoke(or,nr)})}return on?J(fn)?fn?yn?new j(yn.thisDep,yn.contextDep,yn.propDep,function(er,or){return or.def(er.ELEMENTS,".vertCount-",er.OFFSET)}):G(function(er,or){return or.def(er.ELEMENTS,".vertCount")}):G(function(){return-1}):new j(fn.thisDep||yn.thisDep,fn.contextDep||yn.contextDep,fn.propDep||yn.propDep,function(er,or){var ir=er.ELEMENTS;return er.OFFSET?or.def(ir,"?",ir,".vertCount-",er.OFFSET,":-1"):or.def(ir,"?",ir,".vertCount:-1")}):an?new j(mn.thisDep,mn.contextDep,mn.propDep,function(er,or){return or.def(er.shared.vao,".currentVAO?",er.shared.vao,".currentVAO.count:-1")}):null}(),Wn=tn("instances",!1);return{elements:fn,primitive:Ln,count:Hn,instances:Wn,offset:yn,vao:mn,vaoActive:an,elementsActive:on,static:Tn}}(zt),fn=(or=(nr=zt).static,ir=nr.dynamic,lr={},Un.forEach(function(br){function Ur(cr,Lr){if(br in or){var Rr=cr(or[br]);lr[Sr]=G(function(){return Rr})}else if(br in ir){var li=ir[br];lr[Sr]=V(li,function(Mi,Pi){return Lr(Mi,Pi,Mi.invoke(Pi,li))})}}var Sr=Ht(br);switch(br){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 Ur(function(cr){return cr},function(cr,Lr,Rr){return Rr});case"depth.func":return Ur(function(cr){return Ut[cr]},function(cr,Lr,Rr){return Lr.def(cr.constants.compareFuncs,"[",Rr,"]")});case"depth.range":return Ur(function(cr){return cr},function(cr,Lr,Rr){return[Lr.def("+",Rr,"[0]"),Lr=Lr.def("+",Rr,"[1]")]});case"blend.func":return Ur(function(cr){return[It["srcRGB"in cr?cr.srcRGB:cr.src],It["dstRGB"in cr?cr.dstRGB:cr.dst],It["srcAlpha"in cr?cr.srcAlpha:cr.src],It["dstAlpha"in cr?cr.dstAlpha:cr.dst]]},function(cr,Lr,Rr){function li(Ui,vi){return Lr.def('"',Ui,vi,'" in ',Rr,"?",Rr,".",Ui,vi,":",Rr,".",Ui)}cr=cr.constants.blendFuncs;var Mi=li("src","RGB"),Pi=li("dst","RGB"),Ea=(Mi=Lr.def(cr,"[",Mi,"]"),Lr.def(cr,"[",li("src","Alpha"),"]"));return[Mi,Pi=Lr.def(cr,"[",Pi,"]"),Ea,cr=Lr.def(cr,"[",li("dst","Alpha"),"]")]});case"blend.equation":return Ur(function(cr){return"string"==typeof cr?[ur[cr],ur[cr]]:"object"==typeof cr?[ur[cr.rgb],ur[cr.alpha]]:void 0},function(cr,Lr,Rr){var li=cr.constants.blendEquations,Mi=Lr.def(),Pi=Lr.def();return(cr=cr.cond("typeof ",Rr,'==="string"')).then(Mi,"=",Pi,"=",li,"[",Rr,"];"),cr.else(Mi,"=",li,"[",Rr,".rgb];",Pi,"=",li,"[",Rr,".alpha];"),Lr(cr),[Mi,Pi]});case"blend.color":return Ur(function(cr){return b(4,function(Lr){return+cr[Lr]})},function(cr,Lr,Rr){return b(4,function(li){return Lr.def("+",Rr,"[",li,"]")})});case"stencil.mask":return Ur(function(cr){return 0|cr},function(cr,Lr,Rr){return Lr.def(Rr,"|0")});case"stencil.func":return Ur(function(cr){return[Ut[cr.cmp||"keep"],cr.ref||0,"mask"in cr?cr.mask:-1]},function(cr,Lr,Rr){return[cr=Lr.def('"cmp" in ',Rr,"?",cr.constants.compareFuncs,"[",Rr,".cmp]",":",7680),Lr.def(Rr,".ref|0"),Lr=Lr.def('"mask" in ',Rr,"?",Rr,".mask|0:-1")]});case"stencil.opFront":case"stencil.opBack":return Ur(function(cr){return["stencil.opBack"===br?1029:1028,Rt[cr.fail||"keep"],Rt[cr.zfail||"keep"],Rt[cr.zpass||"keep"]]},function(cr,Lr,Rr){function li(Pi){return Lr.def('"',Pi,'" in ',Rr,"?",Mi,"[",Rr,".",Pi,"]:",7680)}var Mi=cr.constants.stencilOps;return["stencil.opBack"===br?1029:1028,li("fail"),li("zfail"),li("zpass")]});case"polygonOffset.offset":return Ur(function(cr){return[0|cr.factor,0|cr.units]},function(cr,Lr,Rr){return[Lr.def(Rr,".factor|0"),Lr=Lr.def(Rr,".units|0")]});case"cull.face":return Ur(function(cr){var Lr=0;return"front"===cr?Lr=1028:"back"===cr&&(Lr=1029),Lr},function(cr,Lr,Rr){return Lr.def(Rr,'==="front"?',1028,":",1029)});case"frontFace":return Ur(function(cr){return Ge[cr]},function(cr,Lr,Rr){return Lr.def(Rr+'==="cw"?2304:2305')});case"colorMask":return Ur(function(cr){return cr.map(function(Lr){return!!Lr})},function(cr,Lr,Rr){return b(4,function(li){return"!!"+Rr+"["+li+"]"})});case"sample.coverage":return Ur(function(cr){return["value"in cr?cr.value:1,!!cr.invert]},function(cr,Lr,Rr){return[Lr.def('"value" in ',Rr,"?+",Rr,".value:1"),Lr=Lr.def("!!",Rr,".invert")]})}}),lr),yn=function pn(zt,Wt,tn){function Sn(fn){if(fn in An){var yn=Ye.id(An[fn]);return(fn=G(function(){return yn})).id=yn,fn}if(fn in Tn){var Ln=Tn[fn];return V(Ln,function(Hn,Wn){var Kn=Hn.invoke(Wn,Ln);return Wn.def(Hn.shared.strings,".id(",Kn,")")})}return null}var An=zt.static,Tn=zt.dynamic,an=Sn("frag"),mn=Sn("vert"),on=null;return J(an)&&J(mn)?(on=At.program(mn.id,an.id,null,tn),zt=G(function(fn,yn){return fn.link(on)})):zt=new j(an&&an.thisDep||mn&&mn.thisDep,an&&an.contextDep||mn&&mn.contextDep,an&&an.propDep||mn&&mn.propDep,function(fn,yn){var Ln,Hn,Wn=fn.shared.shader;return Ln=an?an.append(fn,yn):yn.def(Wn,".","frag"),Hn=mn?mn.append(fn,yn):yn.def(Wn,".","vert"),yn.def(Wn+".program("+Hn+","+Ln+")")}),{frag:an,vert:mn,progVar:zt,program:on}}(zt,0,an);Tn("viewport"),Tn(Ht("scissor.box"));var Ln,Hn=0<Object.keys(fn).length;if((Ln={framebuffer:Ln,draw:on,shader:yn,state:fn,dirty:Hn,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}}).profile=function(nr){var er,or=nr.static;if(nr=nr.dynamic,"profile"in or){var ir=!!or.profile;(er=G(function(br,Ur){return ir})).enable=ir}else if("profile"in nr){var lr=nr.profile;er=V(lr,function(br,Ur){return br.invoke(Ur,lr)})}return er}(zt),Ln.uniforms=function(nr,er){var or=nr.static,ir=nr.dynamic,lr={};return Object.keys(or).forEach(function(br){var Ur,Sr=or[br];if("number"==typeof Sr||"boolean"==typeof Sr)Ur=G(function(){return Sr});else if("function"==typeof Sr){var cr=Sr._reglType;"texture2d"===cr||"textureCube"===cr?Ur=G(function(Lr){return Lr.link(Sr)}):"framebuffer"!==cr&&"framebufferCube"!==cr||(Ur=G(function(Lr){return Lr.link(Sr.color[0])}))}else x(Sr)&&(Ur=G(function(Lr){return Lr.global.def("[",b(Sr.length,function(Rr){return Sr[Rr]}),"]")}));Ur.value=Sr,lr[br]=Ur}),Object.keys(ir).forEach(function(br){var Ur=ir[br];lr[br]=V(Ur,function(Sr,cr){return Sr.invoke(cr,Ur)})}),lr}(tn),Ln.drawVAO=Ln.scopeVAO=on.vao,!Ln.drawVAO&&yn.program&&!an&&rt.angle_instanced_arrays&&on.static.elements){var Wn=!0;if(zt=yn.program.attributes.map(function(nr){return nr=Wt.static[nr],Wn=Wn&&!!nr,nr}),Wn&&0<zt.length){var Kn=Et.getVAO(Et.createVAO({attributes:zt,elements:on.static.elements}));Ln.drawVAO=new j(null,null,null,function(nr,er){return nr.link(Kn)}),Ln.useVAO=!0}}return an?Ln.useVAO=!0:Ln.attributes=function wn(zt,Wt){var tn=zt.static,Sn=zt.dynamic,An={};return Object.keys(tn).forEach(function(Tn){var an=tn[Tn],mn=Ye.id(Tn),on=new qn;if(N(an))on.state=1,on.buffer=ze.getBuffer(ze.create(an,34962,!1,!0)),on.type=0;else if(yn=ze.getBuffer(an))on.state=1,on.buffer=yn,on.type=0;else if("constant"in an){var fn=an.constant;on.buffer="null",on.state=2,"number"==typeof fn?on.x=fn:Lt.forEach(function(er,or){or<fn.length&&(on[er]=fn[or])})}else{var yn=N(an.buffer)?ze.getBuffer(ze.create(an.buffer,34962,!1,!0)):ze.getBuffer(an.buffer),Ln=0|an.offset,Hn=0|an.stride,Wn=0|an.size,Kn=!!an.normalized,nr=0;"type"in an&&(nr=xe[an.type]),an=0|an.divisor,on.buffer=yn,on.state=1,on.size=Wn,on.normalized=Kn,on.type=nr||yn.dtype,on.offset=Ln,on.stride=Hn,on.divisor=an}An[Tn]=G(function(er,or){var ir=er.attribCache;if(mn in ir)return ir[mn];var lr={isStream:!1};return Object.keys(on).forEach(function(br){lr[br]=on[br]}),on.buffer&&(lr.buffer=er.link(on.buffer),lr.type=lr.type||lr.buffer+".dtype"),ir[mn]=lr})}),Object.keys(Sn).forEach(function(Tn){var an=Sn[Tn];An[Tn]=V(an,function(mn,on){function fn(ir){on(Kn[ir],"=",yn,".",ir,"|0;")}var yn=mn.invoke(on,an),Ln=mn.shared,Hn=mn.constants,Wn=Ln.isBufferArgs,Kn=(Ln=Ln.buffer,{isStream:on.def(!1)}),nr=new qn;nr.state=1,Object.keys(nr).forEach(function(ir){Kn[ir]=on.def(""+nr[ir])});var er=Kn.buffer,or=Kn.type;return on("if(",Wn,"(",yn,")){",Kn.isStream,"=true;",er,"=",Ln,".createStream(",34962,",",yn,");",or,"=",er,".dtype;","}else{",er,"=",Ln,".getBuffer(",yn,");","if(",er,"){",or,"=",er,".dtype;",'}else if("constant" in ',yn,"){",Kn.state,"=",2,";","if(typeof "+yn+'.constant === "number"){',Kn[Lt[0]],"=",yn,".constant;",Lt.slice(1).map(function(ir){return Kn[ir]}).join("="),"=0;","}else{",Lt.map(function(ir,lr){return Kn[ir]+"="+yn+".constant.length>"+lr+"?"+yn+".constant["+lr+"]:0;"}).join(""),"}}else{","if(",Wn,"(",yn,".buffer)){",er,"=",Ln,".createStream(",34962,",",yn,".buffer);","}else{",er,"=",Ln,".getBuffer(",yn,".buffer);","}",or,'="type" in ',yn,"?",Hn.glTypes,"[",yn,".type]:",er,".dtype;",Kn.normalized,"=!!",yn,".normalized;"),fn("size"),fn("offset"),fn("stride"),fn("divisor"),on("}}"),on.exit("if(",Kn.isStream,"){",Ln,".destroyStream(",er,");","}"),Kn})}),An}(Wt),Ln.context=function(nr){var er=nr.static,or=nr.dynamic,ir={};return Object.keys(er).forEach(function(lr){var br=er[lr];ir[lr]=G(function(Ur,Sr){return"number"==typeof br||"boolean"==typeof br?""+br:Ur.link(br)})}),Object.keys(or).forEach(function(lr){var br=or[lr];ir[lr]=V(br,function(Ur,Sr){return Ur.invoke(Sr,br)})}),ir}(Sn),Ln}(zt,Wt,tn,Sn);return an.shader.program&&(an.shader.program.attributes.sort(function(mn,on){return mn.name<on.name?-1:1}),an.shader.program.uniforms.sort(function(mn,on){return mn.name<on.name?-1:1})),function(mn,on){var fn=mn.proc("draw",1);hn(mn,fn),vn(mn,fn,on.context),cn(mn,fn,on.framebuffer),dn(mn,fn,on),sn(mn,fn,on.state),En(mn,fn,on,!1,!0);var yn=on.shader.progVar.append(mn,fn);if(fn(mn.shared.gl,".useProgram(",yn,".program);"),on.shader.program)rr(mn,fn,on,on.shader.program);else{fn(mn.shared.vao,".setVAO(null);");var Ln=mn.global.def("{}"),Hn=fn.def(yn,".id"),Wn=fn.def(Ln,"[",Hn,"]");fn(mn.cond(Wn).then(Wn,".call(this,a0);").else(Wn,"=",Ln,"[",Hn,"]=",mn.link(function(Kn){return Fn(rr,mn,on,Kn,1)}),"(",yn,");",Wn,".call(this,a0);"))}0<Object.keys(on.state).length&&fn(mn.shared.current,".dirty=true;"),mn.shared.vao&&fn(mn.shared.vao,".setVAO(null);")}(Tn,an),function fr(zt,Wt){function tn(mn){var on=Wt.shader[mn];on&&(on=on.append(zt,Sn),isNaN(on)?Sn.set(An.shader,"."+mn,on):Sn.set(An.shader,"."+mn,zt.link(on,{stable:!0})))}var Sn=zt.proc("scope",3);zt.batchId="a2";var An=zt.shared,Tn=An.current;if(vn(zt,Sn,Wt.context),Wt.framebuffer&&Wt.framebuffer.append(zt,Sn),B(Object.keys(Wt.state)).forEach(function(mn){var on=Wt.state[mn],fn=on.append(zt,Sn);x(fn)?fn.forEach(function(yn,Ln){isNaN(yn)?Sn.set(zt.next[mn],"["+Ln+"]",yn):Sn.set(zt.next[mn],"["+Ln+"]",zt.link(yn,{stable:!0}))}):J(on)?Sn.set(An.next,"."+mn,zt.link(fn,{stable:!0})):Sn.set(An.next,"."+mn,fn)}),En(zt,Sn,Wt,!0,!0),["elements","offset","count","instances","primitive"].forEach(function(mn){var on=Wt.draw[mn];on&&(on=on.append(zt,Sn),isNaN(on)?Sn.set(An.draw,"."+mn,on):Sn.set(An.draw,"."+mn,zt.link(on),{stable:!0}))}),Object.keys(Wt.uniforms).forEach(function(mn){var on=Wt.uniforms[mn].append(zt,Sn);Array.isArray(on)&&(on="["+on.map(function(fn){return isNaN(fn)?fn:zt.link(fn,{stable:!0})})+"]"),Sn.set(An.uniforms,"["+zt.link(Ye.id(mn),{stable:!0})+"]",on)}),Object.keys(Wt.attributes).forEach(function(mn){var on=Wt.attributes[mn].append(zt,Sn),fn=zt.scopeAttrib(mn);Object.keys(new qn).forEach(function(yn){Sn.set(fn,"."+yn,on[yn])})}),Wt.scopeVAO){var an=Wt.scopeVAO.append(zt,Sn);isNaN(an)?Sn.set(An.vao,".targetVAO",an):Sn.set(An.vao,".targetVAO",zt.link(an,{stable:!0}))}tn("vert"),tn("frag"),0<Object.keys(Wt.state).length&&(Sn(Tn,".dirty=true;"),Sn.exit(Tn,".dirty=true;")),Sn("a1(",zt.shared.context,",a0,",zt.batchId,");")}(Tn,an),function(mn,on){function fn(er){return er.contextDep&&Ln||er.propDep}var yn=mn.proc("batch",2);mn.batchId="0",hn(mn,yn);var Ln=!1,Hn=!0;Object.keys(on.context).forEach(function(er){Ln=Ln||on.context[er].propDep}),Ln||(vn(mn,yn,on.context),Hn=!1);var Wn=!1;if((Kn=on.framebuffer)?(Kn.propDep?Ln=Wn=!0:Kn.contextDep&&Ln&&(Wn=!0),Wn||cn(mn,yn,Kn)):cn(mn,yn,null),on.state.viewport&&on.state.viewport.propDep&&(Ln=!0),dn(mn,yn,on),sn(mn,yn,on.state,function(er){return!fn(er)}),on.profile&&fn(on.profile)||En(mn,yn,on,!1,"a1"),on.contextDep=Ln,on.needsContext=Hn,on.needsFramebuffer=Wn,(Hn=on.shader.progVar).contextDep&&Ln||Hn.propDep)mr(mn,yn,on,null);else if(Hn=Hn.append(mn,yn),yn(mn.shared.gl,".useProgram(",Hn,".program);"),on.shader.program)mr(mn,yn,on,on.shader.program);else{yn(mn.shared.vao,".setVAO(null);");var Kn=mn.global.def("{}"),nr=(Wn=yn.def(Hn,".id"),yn.def(Kn,"[",Wn,"]"));yn(mn.cond(nr).then(nr,".call(this,a0,a1);").else(nr,"=",Kn,"[",Wn,"]=",mn.link(function(er){return Fn(mr,mn,on,er,2)}),"(",Hn,");",nr,".call(this,a0,a1);"))}0<Object.keys(on.state).length&&yn(mn.shared.current,".dirty=true;"),mn.shared.vao&&yn(mn.shared.vao,".setVAO(null);")}(Tn,an),K(Tn.compile(),{destroy:function(){an.shader.program.destroy()}})}}}function X(Be,Ye){for(var rt=0;rt<Be.length;++rt)if(Be[rt]===Ye)return rt;return-1}var K=function(Be,Ye){for(var rt=Object.keys(Ye),Se=0;Se<rt.length;++Se)Be[rt[Se]]=Ye[rt[Se]];return Be},re=0,ee={DynamicVariable:R,define:function(Be,Ye){return new R(Be,k(Ye+""))},isDynamic:function(Be){return"function"==typeof Be&&!Be._reglType||Be instanceof R},unbox:function Be(Ye,rt){return"function"==typeof Ye?new R(0,Ye):"number"==typeof Ye||"boolean"==typeof Ye?new R(5,Ye):Array.isArray(Ye)?new R(6,Ye.map(function(Se,ze){return Be(Se,rt+"["+ze+"]")})):Ye instanceof R?Ye:void 0},accessor:k},ie={next:"function"==typeof requestAnimationFrame?function(Be){return requestAnimationFrame(Be)}:function(Be){return setTimeout(Be,16)},cancel:"function"==typeof cancelAnimationFrame?function(Be){return cancelAnimationFrame(Be)}:clearTimeout},oe=typeof performance<"u"&&performance.now?function(){return performance.now()}:function(){return+new Date},ce=s();ce.zero=s();var de=function(Be){return Be instanceof Uint8Array||Be instanceof Uint16Array||Be instanceof Uint32Array||Be instanceof Int8Array||Be instanceof Int16Array||Be instanceof Int32Array||Be instanceof Float32Array||Be instanceof Float64Array||Be instanceof Uint8ClampedArray},he=function(Be){return Object.keys(Be).map(function(Ye){return Be[Ye]})},ve_shape=function(Be){for(var Ye=[];Be.length;Be=Be[0])Ye.push(Be.length);return Ye},ve_flatten=function(Be,Ye,rt,Se){var ze=1;if(Ye.length)for(var Ke=0;Ke<Ye.length;++Ke)ze*=Ye[Ke];else ze=0;switch(rt=Se||ce.allocType(rt,ze),Ye.length){case 0:break;case 1:for(Se=Ye[0],Ye=0;Ye<Se;++Ye)rt[Ye]=Be[Ye];break;case 2:for(Se=Ye[0],Ye=Ye[1],Ke=ze=0;Ke<Se;++Ke)for(var st=Be[Ke],ct=0;ct<Ye;++ct)rt[ze++]=st[ct];break;case 3:o(Be,Ye[0],Ye[1],Ye[2],rt,0);break;default:r(Be,Ye,0,rt,0)}return rt},Pe={"[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},xe={int8:5120,int16:5122,int32:5124,uint8:5121,uint16:5123,uint32:5125,float:5126,float32:5126},ke={dynamic:35048,stream:35040,static:35044},Ae=ve_flatten,Te=ve_shape,Q=[];Q[5120]=1,Q[5122]=2,Q[5124]=4,Q[5121]=1,Q[5123]=2,Q[5125]=4,Q[5126]=4;var se={points:0,point:0,lines:1,line:1,triangles:4,triangle:4,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},fe=new Float32Array(1),ye=new Uint32Array(fe.buffer),Me=[9984,9986,9985,9987],Ie=[0,6409,6410,6407,6408],Ce={};Ce[6409]=Ce[6406]=Ce[6402]=1,Ce[34041]=Ce[6410]=2,Ce[6407]=Ce[35904]=3,Ce[6408]=Ce[35906]=4;var Re=v("HTMLCanvasElement"),le=v("OffscreenCanvas"),ge=v("CanvasRenderingContext2D"),_e=v("ImageBitmap"),Fe=v("HTMLImageElement"),Ve=v("HTMLVideoElement"),He=Object.keys(Pe).concat([Re,le,ge,_e,Fe,Ve]),nt=[];nt[5121]=1,nt[5126]=4,nt[36193]=2,nt[5123]=2,nt[5125]=4;var tt=[];tt[32854]=2,tt[32855]=2,tt[36194]=2,tt[34041]=4,tt[33776]=.5,tt[33777]=.5,tt[33778]=1,tt[33779]=1,tt[35986]=.5,tt[35987]=1,tt[34798]=1,tt[35840]=.5,tt[35841]=.25,tt[35842]=.5,tt[35843]=.25,tt[36196]=.5;var ot=[];ot[32854]=2,ot[32855]=2,ot[36194]=2,ot[33189]=2,ot[36168]=1,ot[34041]=4,ot[35907]=4,ot[34836]=16,ot[34842]=8,ot[34843]=6;var kt=[];kt[6408]=4,kt[6407]=3;var mt=[];mt[5121]=1,mt[5126]=4,mt[36193]=2;var wt=[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],Lt=["x","y","z","w"],Ct="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),It={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},Ut={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},Rt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ge={cw:2304,ccw:2305},We=new j(!1,!1,!1,function(){});return function(Be){function Ye(){if(0===$n.length)un&&un.update(),qn=null;else{qn=ie.next(Ye),At();for(var Zt=$n.length-1;0<=Zt;--Zt){var nn=$n[Zt];nn&&nn(Bn,null,0)}gt.flush(),un&&un.update()}}function rt(){!qn&&0<$n.length&&(qn=ie.next(Ye))}function Se(){qn&&(ie.cancel(Ye),qn=null)}function ze(Zt){Zt.preventDefault(),Se(),mr.forEach(function(nn){nn()})}function Ke(Zt){gt.getError(),Ot.restore(),hn.restore(),cn.restore(),En.restore(),Mn.restore(),Rn.restore(),sn.restore(),un&&un.restore(),Nn.procs.refresh(),rt(),fr.forEach(function(nn){nn()})}function st(Zt){function nn(zt,Wt){var tn={},Sn={};return Object.keys(zt).forEach(function(An){var Tn=zt[An];if(ee.isDynamic(Tn))Sn[An]=ee.unbox(Tn,An);else{if(Wt&&Array.isArray(Tn))for(var an=0;an<Tn.length;++an)if(ee.isDynamic(Tn[an]))return void(Sn[An]=ee.unbox(Tn,An));tn[An]=Tn}}),{dynamic:Sn,static:tn}}var zn=nn(Zt.context||{},!0),_n=nn(Zt.uniforms||{},!0),Cn=nn(Zt.attributes||{},!1);Zt=nn(function(zt){function Wt(Sn){if(Sn in tn){var An=tn[Sn];delete tn[Sn],Object.keys(An).forEach(function(Tn){tn[Sn+"."+Tn]=An[Tn]})}}var tn=K({},zt);return delete tn.uniforms,delete tn.attributes,delete tn.context,delete tn.vao,"stencil"in tn&&tn.stencil.op&&(tn.stencil.opBack=tn.stencil.opFront=tn.stencil.op,delete tn.stencil.op),Wt("blend"),Wt("depth"),Wt("cull"),Wt("stencil"),Wt("polygonOffset"),Wt("scissor"),Wt("sample"),"vao"in zt&&(tn.vao=zt.vao),tn}(Zt),!1);var Un={gpuTime:0,cpuTime:0,count:0},Gn=Nn.compile(Zt,Cn,_n,zn,Un),ar=Gn.draw,yr=Gn.batch,$t=Gn.scope,kn=[];return K(function(zt,Wt){var tn;if("function"==typeof zt)return $t.call(this,null,zt,0);if("function"==typeof Wt)if("number"==typeof zt)for(tn=0;tn<zt;++tn)$t.call(this,null,Wt,tn);else{if(!Array.isArray(zt))return $t.call(this,zt,Wt,0);for(tn=0;tn<zt.length;++tn)$t.call(this,zt[tn],Wt,tn)}else if("number"==typeof zt){if(0<zt)return yr.call(this,function(Sn){for(;kn.length<Sn;)kn.push(null);return kn}(0|zt),0|zt)}else{if(!Array.isArray(zt))return ar.call(this,zt);if(zt.length)return yr.call(this,zt,zt.length)}},{stats:Un,destroy:function(){Gn.destroy()}})}function ct(Zt,nn){var zn=0;Nn.procs.poll();var _n=nn.color;_n&&(gt.clearColor(+_n[0]||0,+_n[1]||0,+_n[2]||0,+_n[3]||0),zn|=16384),"depth"in nn&&(gt.clearDepth(+nn.depth),zn|=256),"stencil"in nn&&(gt.clearStencil(0|nn.stencil),zn|=1024),gt.clear(zn)}function Tt(Zt){return $n.push(Zt),rt(),{cancel:function(){var nn=X($n,Zt);$n[nn]=function zn(){var _n=X($n,zn);$n[_n]=$n[$n.length-1],--$n.length,0>=$n.length&&Se()}}}}function Et(){var Zt=Fn.viewport,nn=Fn.scissor_box;Zt[0]=Zt[1]=nn[0]=nn[1]=0,Bn.viewportWidth=Bn.framebufferWidth=Bn.drawingBufferWidth=Zt[2]=nn[2]=gt.drawingBufferWidth,Bn.viewportHeight=Bn.framebufferHeight=Bn.drawingBufferHeight=Zt[3]=nn[3]=gt.drawingBufferHeight}function At(){Bn.tick+=1,Bn.time=pt(),Et(),Nn.procs.poll()}function ht(){En.refresh(),Et(),Nn.procs.refresh(),un&&un.update()}function pt(){return(oe()-pn)/1e3}if(!(Be=function T(Be){var Ye,rt,Se,ze,Ke=Be||{};Be={};var st=[],ct=[],Tt=typeof window>"u"?1:window.devicePixelRatio,Et=!1,At={},ht=function(gt){},pt=function(){};if("string"==typeof Ke?Ye=document.querySelector(Ke):"object"==typeof Ke&&("string"==typeof Ke.nodeName&&"function"==typeof Ke.appendChild&&"function"==typeof Ke.getBoundingClientRect?Ye=Ke:"function"==typeof Ke.drawArrays||"function"==typeof Ke.drawElements?Se=(ze=Ke).canvas:("gl"in Ke?ze=Ke.gl:"canvas"in Ke?Se=l(Ke.canvas):"container"in Ke&&(rt=l(Ke.container)),"attributes"in Ke&&(Be=Ke.attributes),"extensions"in Ke&&(st=A(Ke.extensions)),"optionalExtensions"in Ke&&(ct=A(Ke.optionalExtensions)),"onDone"in Ke&&(ht=Ke.onDone),"profile"in Ke&&(Et=!!Ke.profile),"pixelRatio"in Ke&&(Tt=+Ke.pixelRatio),"cachedCode"in Ke&&(At=Ke.cachedCode))),Ye&&("canvas"===Ye.nodeName.toLowerCase()?Se=Ye:rt=Ye),!ze){if(!Se){if(!(Ye=function(gt,Pt,Ot){function Ht(){var Gt=window.innerWidth,un=window.innerHeight;gt!==document.body&&(Gt=(un=Nt.getBoundingClientRect()).right-un.left,un=un.bottom-un.top),Nt.width=Ot*Gt,Nt.height=Ot*un}var jt,Nt=document.createElement("canvas");return K(Nt.style,{border:0,margin:0,padding:0,top:0,left:0,width:"100%",height:"100%"}),gt.appendChild(Nt),gt===document.body&&(Nt.style.position="absolute",K(gt.style,{margin:0,padding:0})),gt!==document.body&&"function"==typeof ResizeObserver?(jt=new ResizeObserver(function(){setTimeout(Ht)})).observe(gt):window.addEventListener("resize",Ht,!1),Ht(),{canvas:Nt,onDestroy:function(){jt?jt.disconnect():window.removeEventListener("resize",Ht),gt.removeChild(Nt)}}}(rt||document.body,0,Tt)))return null;Se=Ye.canvas,pt=Ye.onDestroy}void 0===Be.premultipliedAlpha&&(Be.premultipliedAlpha=!0),ze=function(gt,Pt){function Ot(Ht){try{return gt.getContext(Ht,Pt)}catch{return null}}return Ot("webgl")||Ot("experimental-webgl")||Ot("webgl-experimental")}(Se,Be)}return ze?{gl:ze,canvas:Se,container:rt,extensions:st,optionalExtensions:ct,pixelRatio:Tt,profile:Et,cachedCode:At,onDone:ht,onDestroy:pt}:(pt(),ht("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}(Be)))return null;var gt=Be.gl,Pt=gt.getContextAttributes();gt.isContextLost();var Ot=function(Zt,nn){function zn(Gn){var ar;Gn=Gn.toLowerCase();try{ar=_n[Gn]=Zt.getExtension(Gn)}catch{}return!!ar}for(var _n={},Cn=0;Cn<nn.extensions.length;++Cn){var Un=nn.extensions[Cn];if(!zn(Un))return nn.onDestroy(),nn.onDone('"'+Un+'" extension is not supported by the current WebGL context, try upgrading your system or a different browser'),null}return nn.optionalExtensions.forEach(zn),{extensions:_n,restore:function(){Object.keys(_n).forEach(function(Gn){if(_n[Gn]&&!zn(Gn))throw Error("(regl): error restoring extension "+Gn)})}}}(gt,Be);if(!Ot)return null;var Zt,nn,Ht=(Zt={"":0},nn=[""],{id:function(zn){var _n=Zt[zn];return _n||(_n=Zt[zn]=nn.length,nn.push(zn),_n)},str:function(zn){return nn[zn]}}),jt={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Nt=Be.cachedCode||{},Gt=Ot.extensions,un=function(Zt,nn){function zn(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function _n(kn,zt,Wt){var tn=Gn.pop()||new zn;tn.startQueryIndex=kn,tn.endQueryIndex=zt,tn.sum=0,tn.stats=Wt,ar.push(tn)}if(!nn.ext_disjoint_timer_query)return null;var Cn=[],Un=[],Gn=[],ar=[],yr=[],$t=[];return{beginQuery:function(kn){var zt=Cn.pop()||nn.ext_disjoint_timer_query.createQueryEXT();nn.ext_disjoint_timer_query.beginQueryEXT(35007,zt),Un.push(zt),_n(Un.length-1,Un.length,kn)},endQuery:function(){nn.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:_n,update:function(){var kn,zt;if(0!==(kn=Un.length)){$t.length=Math.max($t.length,kn+1),yr.length=Math.max(yr.length,kn+1),yr[0]=0;var Wt=$t[0]=0;for(zt=kn=0;zt<Un.length;++zt){var tn=Un[zt];nn.ext_disjoint_timer_query.getQueryObjectEXT(tn,34919)?(Wt+=nn.ext_disjoint_timer_query.getQueryObjectEXT(tn,34918),Cn.push(tn)):Un[kn++]=tn,yr[zt+1]=Wt,$t[zt+1]=kn}for(Un.length=kn,zt=kn=0;zt<ar.length;++zt){var Sn=(Wt=ar[zt]).startQueryIndex;Wt.sum+=yr[tn=Wt.endQueryIndex]-yr[Sn],(tn=$t[tn])===(Sn=$t[Sn])?(Wt.stats.gpuTime+=Wt.sum/1e6,Gn.push(Wt)):(Wt.startQueryIndex=Sn,Wt.endQueryIndex=tn,ar[kn++]=Wt)}ar.length=kn}},getNumPendingQueries:function(){return Un.length},clear:function(){Cn.push.apply(Cn,Un);for(var kn=0;kn<Cn.length;kn++)nn.ext_disjoint_timer_query.deleteQueryEXT(Cn[kn]);Un.length=0,Cn.length=0},restore:function(){Un.length=0,Cn.length=0}}}(0,Gt),pn=oe(),Kt=gt.drawingBufferWidth,wn=gt.drawingBufferHeight,Bn={tick:0,time:0,viewportWidth:Kt,viewportHeight:wn,framebufferWidth:Kt,framebufferHeight:wn,drawingBufferWidth:Kt,drawingBufferHeight:wn,pixelRatio:Be.pixelRatio},vn=(Kt={elements:null,primitive:4,count:-1,offset:0,instances:-1},function(Be,Ye){var rt=1;Ye.ext_texture_filter_anisotropic&&(rt=Be.getParameter(34047));var Se=1,ze=1;Ye.webgl_draw_buffers&&(Se=Be.getParameter(34852),ze=Be.getParameter(36063));var Ke=!!Ye.oes_texture_float;if(Ke){Ke=Be.createTexture(),Be.bindTexture(3553,Ke),Be.texImage2D(3553,0,6408,1,1,0,6408,5126,null);var st=Be.createFramebuffer();if(Be.bindFramebuffer(36160,st),Be.framebufferTexture2D(36160,36064,3553,Ke,0),Be.bindTexture(3553,null),36053!==Be.checkFramebufferStatus(36160))Ke=!1;else{Be.viewport(0,0,1,1),Be.clearColor(1,0,0,1),Be.clear(16384);var ct=ce.allocType(5126,4);Be.readPixels(0,0,1,1,6408,5126,ct),Be.getError()?Ke=!1:(Be.deleteFramebuffer(st),Be.deleteTexture(Ke),Ke=1===ct[0]),ce.freeType(ct)}}return ct=!0,typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent))||(ct=Be.createTexture(),st=ce.allocType(5121,36),Be.activeTexture(33984),Be.bindTexture(34067,ct),Be.texImage2D(34069,0,6408,3,3,0,6408,5121,st),ce.freeType(st),Be.bindTexture(34067,null),Be.deleteTexture(ct),ct=!Be.getError()),{colorBits:[Be.getParameter(3410),Be.getParameter(3411),Be.getParameter(3412),Be.getParameter(3413)],depthBits:Be.getParameter(3414),stencilBits:Be.getParameter(3415),subpixelBits:Be.getParameter(3408),extensions:Object.keys(Ye).filter(function(Tt){return!!Ye[Tt]}),maxAnisotropic:rt,maxDrawbuffers:Se,maxColorAttachments:ze,pointSizeDims:Be.getParameter(33901),lineWidthDims:Be.getParameter(33902),maxViewportDims:Be.getParameter(3386),maxCombinedTextureUnits:Be.getParameter(35661),maxCubeMapSize:Be.getParameter(34076),maxRenderbufferSize:Be.getParameter(34024),maxTextureUnits:Be.getParameter(34930),maxTextureSize:Be.getParameter(3379),maxAttributes:Be.getParameter(34921),maxVertexUniforms:Be.getParameter(36347),maxVertexTextureUnits:Be.getParameter(35660),maxVaryingVectors:Be.getParameter(36348),maxFragmentUniforms:Be.getParameter(36349),glsl:Be.getParameter(35724),renderer:Be.getParameter(7937),vendor:Be.getParameter(7936),version:Be.getParameter(7938),readFloat:Ke,npotTextureCube:ct}}(gt,Gt)),cn=function c(Be,Ye,rt,Se){function ze(ht){this.id=Tt++,this.buffer=Be.createBuffer(),this.type=ht,this.usage=35044,this.byteLength=0,this.dimension=1,this.dtype=5121,this.persistentData=null,rt.profile&&(this.stats={size:0})}function Ke(ht,pt,gt){ht.byteLength=pt.byteLength,Be.bufferData(ht.type,pt,gt)}function st(ht,pt,gt,Pt,Ot,Ht){if(ht.usage=gt,Array.isArray(pt)){if(ht.dtype=Pt||5126,0<pt.length)if(Array.isArray(pt[0])){Ot=Te(pt);for(var jt=Pt=1;jt<Ot.length;++jt)Pt*=Ot[jt];ht.dimension=Pt,Ke(ht,pt=Ae(pt,Ot,ht.dtype),gt),Ht?ht.persistentData=pt:ce.freeType(pt)}else"number"==typeof pt[0]?(ht.dimension=Ot,i(Ot=ce.allocType(ht.dtype,pt.length),pt),Ke(ht,Ot,gt),Ht?ht.persistentData=Ot:ce.freeType(Ot)):de(pt[0])&&(ht.dimension=pt[0].length,ht.dtype=Pt||n(pt[0])||5126,Ke(ht,pt=Ae(pt,[pt.length,pt[0].length],ht.dtype),gt),Ht?ht.persistentData=pt:ce.freeType(pt))}else if(de(pt))ht.dtype=Pt||n(pt),ht.dimension=Ot,Ke(ht,pt,gt),Ht&&(ht.persistentData=new Uint8Array(new Uint8Array(pt.buffer)));else if(t(pt)){var Nt=pt.stride,Gt=(jt=pt.offset,0),un=0,pn=0,Kt=0;1===(Ot=pt.shape).length?(Gt=Ot[0],un=1,pn=Nt[0],Kt=0):2===Ot.length&&(Gt=Ot[0],un=Ot[1],pn=Nt[0],Kt=Nt[1]),ht.dtype=Pt||n(pt.data)||5126,ht.dimension=un,a(Ot=ce.allocType(ht.dtype,Gt*un),pt.data,Gt,un,pn,Kt,jt),Ke(ht,Ot,gt),Ht?ht.persistentData=Ot:ce.freeType(Ot)}else pt instanceof ArrayBuffer&&(ht.dtype=5121,ht.dimension=Ot,Ke(ht,pt,gt),Ht&&(ht.persistentData=new Uint8Array(new Uint8Array(pt))))}function ct(ht){Ye.bufferCount--,Se(ht),Be.deleteBuffer(ht.buffer),ht.buffer=null,delete Et[ht.id]}var Tt=0,Et={};ze.prototype.bind=function(){Be.bindBuffer(this.type,this.buffer)},ze.prototype.destroy=function(){ct(this)};var At=[];return rt.profile&&(Ye.getTotalBufferSize=function(){var ht=0;return Object.keys(Et).forEach(function(pt){ht+=Et[pt].stats.size}),ht}),{create:function(ht,pt,gt,Pt){function Ot(jt){var Nt=35044,Gt=null,un=0,pn=0,Kt=1;return Array.isArray(jt)||de(jt)||t(jt)||jt instanceof ArrayBuffer?Gt=jt:"number"==typeof jt?un=0|jt:jt&&("data"in jt&&(Gt=jt.data),"usage"in jt&&(Nt=ke[jt.usage]),"type"in jt&&(pn=xe[jt.type]),"dimension"in jt&&(Kt=0|jt.dimension),"length"in jt&&(un=0|jt.length)),Ht.bind(),Gt?st(Ht,Gt,Nt,pn,Kt,Pt):(un&&Be.bufferData(Ht.type,un,Nt),Ht.dtype=pn||5121,Ht.usage=Nt,Ht.dimension=Kt,Ht.byteLength=un),rt.profile&&(Ht.stats.size=Ht.byteLength*Q[Ht.dtype]),Ot}Ye.bufferCount++;var Ht=new ze(pt);return Et[Ht.id]=Ht,gt||Ot(ht),Ot._reglType="buffer",Ot._buffer=Ht,Ot.subdata=function(jt,Nt){var Gt,un=0|(Nt||0);if(Ht.bind(),de(jt)||jt instanceof ArrayBuffer)Be.bufferSubData(Ht.type,un,jt);else if(Array.isArray(jt)){if(0<jt.length)if("number"==typeof jt[0]){var pn=ce.allocType(Ht.dtype,jt.length);i(pn,jt),Be.bufferSubData(Ht.type,un,pn),ce.freeType(pn)}else(Array.isArray(jt[0])||de(jt[0]))&&(Gt=Te(jt),pn=Ae(jt,Gt,Ht.dtype),Be.bufferSubData(Ht.type,un,pn),ce.freeType(pn))}else if(t(jt)){var Kt=jt.stride,wn=pn=0,Bn=0,vn=0;1===(Gt=jt.shape).length?(pn=Gt[0],wn=1,Bn=Kt[0],vn=0):2===Gt.length&&(pn=Gt[0],wn=Gt[1],Bn=Kt[0],vn=Kt[1]),Gt=Array.isArray(jt.data)?Ht.dtype:n(jt.data),a(Gt=ce.allocType(Gt,pn*wn),jt.data,pn,wn,Bn,vn,jt.offset),Be.bufferSubData(Ht.type,un,Gt),ce.freeType(Gt)}return Ot},rt.profile&&(Ot.stats=Ht.stats),Ot.destroy=function(){ct(Ht)},Ot},createStream:function(ht,pt){var gt=At.pop();return gt||(gt=new ze(ht)),gt.bind(),st(gt,pt,35040,0,1,!1),gt},destroyStream:function(ht){At.push(ht)},clear:function(){he(Et).forEach(ct),At.forEach(ct)},getBuffer:function(ht){return ht&&ht._buffer instanceof ze?ht._buffer:null},restore:function(){he(Et).forEach(function(ht){ht.buffer=Be.createBuffer(),Be.bindBuffer(ht.type,ht.buffer),Be.bufferData(ht.type,ht.persistentData||ht.byteLength,ht.usage)})},_initBuffer:st}}(gt,jt,Be,function(Zt){return sn.destroyBuffer(Zt)}),dn=function p(Be,Ye,rt,Se){function ze(ht){this.id=Tt++,ct[this.id]=this,this.buffer=ht,this.primType=4,this.type=this.vertCount=0}function Ke(ht,pt,gt,Pt,Ot,Ht,jt){var Nt;if(ht.buffer.bind(),pt?((Nt=jt)||de(pt)&&(!t(pt)||de(pt.data))||(Nt=Ye.oes_element_index_uint?5125:5123),rt._initBuffer(ht.buffer,pt,gt,Nt,3)):(Be.bufferData(34963,Ht,gt),ht.buffer.dtype=Nt||5121,ht.buffer.usage=gt,ht.buffer.dimension=3,ht.buffer.byteLength=Ht),Nt=jt,!jt){switch(ht.buffer.dtype){case 5121:case 5120:Nt=5121;break;case 5123:case 5122:Nt=5123;break;case 5125:case 5124:Nt=5125}ht.buffer.dtype=Nt}ht.type=Nt,0>(pt=Ot)&&(pt=ht.buffer.byteLength,5123===Nt?pt>>=1:5125===Nt&&(pt>>=2)),ht.vertCount=pt,pt=Pt,0>Pt&&(pt=4,1===(Pt=ht.buffer.dimension)&&(pt=0),2===Pt&&(pt=1),3===Pt&&(pt=4)),ht.primType=pt}function st(ht){Se.elementsCount--,delete ct[ht.id],ht.buffer.destroy(),ht.buffer=null}var ct={},Tt=0,Et={uint8:5121,uint16:5123};Ye.oes_element_index_uint&&(Et.uint32=5125),ze.prototype.bind=function(){this.buffer.bind()};var At=[];return{create:function(ht,pt){function gt(Ht){if(Ht)if("number"==typeof Ht)Pt(Ht),Ot.primType=4,Ot.vertCount=0|Ht,Ot.type=5121;else{var jt=null,Nt=35044,Gt=-1,un=-1,pn=0,Kt=0;Array.isArray(Ht)||de(Ht)||t(Ht)?jt=Ht:("data"in Ht&&(jt=Ht.data),"usage"in Ht&&(Nt=ke[Ht.usage]),"primitive"in Ht&&(Gt=se[Ht.primitive]),"count"in Ht&&(un=0|Ht.count),"type"in Ht&&(Kt=Et[Ht.type]),"length"in Ht?pn=0|Ht.length:(pn=un,5123===Kt||5122===Kt?pn*=2:5125!==Kt&&5124!==Kt||(pn*=4))),Ke(Ot,jt,Nt,Gt,un,pn,Kt)}else Pt(),Ot.primType=4,Ot.vertCount=0,Ot.type=5121;return gt}var Pt=rt.create(null,34963,!0),Ot=new ze(Pt._buffer);return Se.elementsCount++,gt(ht),gt._reglType="elements",gt._elements=Ot,gt.subdata=function(Ht,jt){return Pt.subdata(Ht,jt),gt},gt.destroy=function(){st(Ot)},gt},createStream:function(ht){var pt=At.pop();return pt||(pt=new ze(rt.create(null,34963,!0,!1)._buffer)),Ke(pt,ht,35040,-1,-1,0,0),pt},destroyStream:function(ht){At.push(ht)},getElements:function(ht){return"function"==typeof ht&&ht._elements instanceof ze?ht._elements:null},clear:function(){he(ct).forEach(st)}}}(gt,Gt,cn,jt),sn=function L(Be,Ye,rt,Se,ze,Ke,st){function ct(){this.id=++At,this.attributes=[],this.elements=null,this.ownsElements=!1,this.offset=this.count=0,this.instances=-1,this.primitive=4;var gt=Ye.oes_vertex_array_object;this.vao=gt?gt.createVertexArrayOES():null,ht[this.id]=this,this.buffers=[]}var Tt=rt.maxAttributes,Et=Array(Tt);for(rt=0;rt<Tt;++rt)Et[rt]=new E;var At=0,ht={},pt={Record:E,scope:{},state:Et,currentVAO:null,targetVAO:null,restore:Ye.oes_vertex_array_object?function(){Ye.oes_vertex_array_object&&he(ht).forEach(function(gt){gt.refresh()})}:function(){},createVAO:function(gt){function Pt(Ht){var jt;Array.isArray(Ht)?(jt=Ht,Ot.elements&&Ot.ownsElements&&Ot.elements.destroy(),Ot.elements=null,Ot.ownsElements=!1,Ot.offset=0,Ot.count=0,Ot.instances=-1,Ot.primitive=4):(Ht.elements?(jt=Ht.elements,Ot.ownsElements?("function"==typeof jt&&"elements"===jt._reglType?Ot.elements.destroy():Ot.elements(jt),Ot.ownsElements=!1):Ke.getElements(Ht.elements)?(Ot.elements=Ht.elements,Ot.ownsElements=!1):(Ot.elements=Ke.create(Ht.elements),Ot.ownsElements=!0)):(Ot.elements=null,Ot.ownsElements=!1),jt=Ht.attributes,Ot.offset=0,Ot.count=-1,Ot.instances=-1,Ot.primitive=4,Ot.elements&&(Ot.count=Ot.elements._elements.vertCount,Ot.primitive=Ot.elements._elements.primType),"offset"in Ht&&(Ot.offset=0|Ht.offset),"count"in Ht&&(Ot.count=0|Ht.count),"instances"in Ht&&(Ot.instances=0|Ht.instances),"primitive"in Ht&&(Ot.primitive=se[Ht.primitive])),Ht={};var Nt=Ot.attributes;Nt.length=jt.length;for(var Gt=0;Gt<jt.length;++Gt){var un,pn=jt[Gt],Kt=Nt[Gt]=new E,wn=pn.data||pn;Array.isArray(wn)||de(wn)||t(wn)?(Ot.buffers[Gt]&&(un=Ot.buffers[Gt],de(wn)&&un._buffer.byteLength>=wn.byteLength?un.subdata(wn):(un.destroy(),Ot.buffers[Gt]=null)),Ot.buffers[Gt]||(un=Ot.buffers[Gt]=ze.create(pn,34962,!1,!0)),Kt.buffer=ze.getBuffer(un),Kt.size=0|Kt.buffer.dimension,Kt.normalized=!1,Kt.type=Kt.buffer.dtype,Kt.offset=0,Kt.stride=0,Kt.divisor=0,Kt.state=1,Ht[Gt]=1):ze.getBuffer(pn)?(Kt.buffer=ze.getBuffer(pn),Kt.size=0|Kt.buffer.dimension,Kt.normalized=!1,Kt.type=Kt.buffer.dtype,Kt.offset=0,Kt.stride=0,Kt.divisor=0,Kt.state=1):ze.getBuffer(pn.buffer)?(Kt.buffer=ze.getBuffer(pn.buffer),Kt.size=0|(+pn.size||Kt.buffer.dimension),Kt.normalized=!!pn.normalized||!1,Kt.type="type"in pn?xe[pn.type]:Kt.buffer.dtype,Kt.offset=0|(pn.offset||0),Kt.stride=0|(pn.stride||0),Kt.divisor=0|(pn.divisor||0),Kt.state=1):"x"in pn&&(Kt.x=+pn.x||0,Kt.y=+pn.y||0,Kt.z=+pn.z||0,Kt.w=+pn.w||0,Kt.state=2)}for(un=0;un<Ot.buffers.length;++un)!Ht[un]&&Ot.buffers[un]&&(Ot.buffers[un].destroy(),Ot.buffers[un]=null);return Ot.refresh(),Pt}var Ot=new ct;return Se.vaoCount+=1,Pt.destroy=function(){for(var Ht=0;Ht<Ot.buffers.length;++Ht)Ot.buffers[Ht]&&Ot.buffers[Ht].destroy();Ot.buffers.length=0,Ot.ownsElements&&(Ot.elements.destroy(),Ot.elements=null,Ot.ownsElements=!1),Ot.destroy()},Pt._vao=Ot,Pt._reglType="vao",Pt(gt)},getVAO:function(gt){return"function"==typeof gt&&gt._vao?gt._vao:null},destroyBuffer:function(gt){for(var Pt=0;Pt<Et.length;++Pt){var Ot=Et[Pt];Ot.buffer===gt&&(Be.disableVertexAttribArray(Pt),Ot.buffer=null)}},setVAO:Ye.oes_vertex_array_object?function(gt){gt!==pt.currentVAO&&(Ye.oes_vertex_array_object.bindVertexArrayOES(gt?gt.vao:null),pt.currentVAO=gt)}:function(gt){if(gt!==pt.currentVAO){if(gt)gt.bindAttrs();else{for(var Pt=Ye.angle_instanced_arrays,Ot=0;Ot<Et.length;++Ot){var Ht=Et[Ot];Ht.buffer?(Be.enableVertexAttribArray(Ot),Ht.buffer.bind(),Be.vertexAttribPointer(Ot,Ht.size,Ht.type,Ht.normalized,Ht.stride,Ht.offfset),Pt&&Ht.divisor&&Pt.vertexAttribDivisorANGLE(Ot,Ht.divisor)):(Be.disableVertexAttribArray(Ot),Be.vertexAttrib4f(Ot,Ht.x,Ht.y,Ht.z,Ht.w))}Be.bindBuffer(34963,st.elements?st.elements.buffer.buffer:null)}pt.currentVAO=gt}},clear:Ye.oes_vertex_array_object?function(){he(ht).forEach(function(gt){gt.destroy()})}:function(){}};return ct.prototype.bindAttrs=function(){for(var gt=Ye.angle_instanced_arrays,Pt=this.attributes,Ot=0;Ot<Pt.length;++Ot){var Ht=Pt[Ot];Ht.buffer?(Be.enableVertexAttribArray(Ot),Be.bindBuffer(34962,Ht.buffer.buffer),Be.vertexAttribPointer(Ot,Ht.size,Ht.type,Ht.normalized,Ht.stride,Ht.offset),gt&&Ht.divisor&&gt.vertexAttribDivisorANGLE(Ot,Ht.divisor)):(Be.disableVertexAttribArray(Ot),Be.vertexAttrib4f(Ot,Ht.x,Ht.y,Ht.z,Ht.w))}for(gt=Pt.length;gt<Tt;++gt)Be.disableVertexAttribArray(gt);(gt=Ke.getElements(this.elements))?Be.bindBuffer(34963,gt.buffer.buffer):Be.bindBuffer(34963,null)},ct.prototype.refresh=function(){var gt=Ye.oes_vertex_array_object;gt&&(gt.bindVertexArrayOES(this.vao),this.bindAttrs(),pt.currentVAO=null,gt.bindVertexArrayOES(null))},ct.prototype.destroy=function(){if(this.vao){var gt=Ye.oes_vertex_array_object;this===pt.currentVAO&&(pt.currentVAO=null,gt.bindVertexArrayOES(null)),gt.deleteVertexArrayOES(this.vao),this.vao=null}this.ownsElements&&(this.elements.destroy(),this.elements=null,this.ownsElements=!1),ht[this.id]&&(delete ht[this.id],--Se.vaoCount)},pt}(gt,Gt,vn,jt,cn,dn,Kt),hn=function C(Be,Ye,rt,Se){function ze(Pt,Ot,Ht,jt){this.name=Pt,this.id=Ot,this.location=Ht,this.info=jt}function Ke(Pt,Ot){for(var Ht=0;Ht<Pt.length;++Ht)if(Pt[Ht].id===Ot.id)return void(Pt[Ht].location=Ot.location);Pt.push(Ot)}function st(Pt,Ot,Ht){if(!(Nt=(Ht=35632===Pt?Et:At)[Ot])){var jt=Ye.str(Ot),Nt=Be.createShader(Pt);Be.shaderSource(Nt,jt),Be.compileShader(Nt),Ht[Ot]=Nt}return Nt}function ct(Pt,Ot){this.id=gt++,this.fragId=Pt,this.vertId=Ot,this.program=null,this.uniforms=[],this.attributes=[],this.refCount=1,Se.profile&&(this.stats={uniformsCount:0,attributesCount:0})}function Tt(Pt,Ot,Ht){var jt;jt=st(35632,Pt.fragId);var Nt=st(35633,Pt.vertId);if(Ot=Pt.program=Be.createProgram(),Be.attachShader(Ot,jt),Be.attachShader(Ot,Nt),Ht)for(jt=0;jt<Ht.length;++jt)Be.bindAttribLocation(Ot,(Nt=Ht[jt])[0],Nt[1]);Be.linkProgram(Ot),Nt=Be.getProgramParameter(Ot,35718),Se.profile&&(Pt.stats.uniformsCount=Nt);var Gt=Pt.uniforms;for(jt=0;jt<Nt;++jt)if(Ht=Be.getActiveUniform(Ot,jt))if(1<Ht.size)for(var un=0;un<Ht.size;++un){var pn=Ht.name.replace("[0]","["+un+"]");Ke(Gt,new ze(pn,Ye.id(pn),Be.getUniformLocation(Ot,pn),Ht))}else Ke(Gt,new ze(Ht.name,Ye.id(Ht.name),Be.getUniformLocation(Ot,Ht.name),Ht));for(Nt=Be.getProgramParameter(Ot,35721),Se.profile&&(Pt.stats.attributesCount=Nt),Pt=Pt.attributes,jt=0;jt<Nt;++jt)(Ht=Be.getActiveAttrib(Ot,jt))&&Ke(Pt,new ze(Ht.name,Ye.id(Ht.name),Be.getAttribLocation(Ot,Ht.name),Ht))}var Et={},At={},ht={},pt=[],gt=0;return Se.profile&&(rt.getMaxUniformsCount=function(){var Pt=0;return pt.forEach(function(Ot){Ot.stats.uniformsCount>Pt&&(Pt=Ot.stats.uniformsCount)}),Pt},rt.getMaxAttributesCount=function(){var Pt=0;return pt.forEach(function(Ot){Ot.stats.attributesCount>Pt&&(Pt=Ot.stats.attributesCount)}),Pt}),{clear:function(){var Pt=Be.deleteShader.bind(Be);he(Et).forEach(Pt),Et={},he(At).forEach(Pt),At={},pt.forEach(function(Ot){Be.deleteProgram(Ot.program)}),pt.length=0,ht={},rt.shaderCount=0},program:function(Pt,Ot,Ht,jt){var Nt=ht[Ot];Nt||(Nt=ht[Ot]={});var Gt=Nt[Pt];if(Gt&&(Gt.refCount++,!jt))return Gt;var un=new ct(Ot,Pt);return rt.shaderCount++,Tt(un,Ht,jt),Gt||(Nt[Pt]=un),pt.push(un),K(un,{destroy:function(){if(un.refCount--,0>=un.refCount){Be.deleteProgram(un.program);var pn=pt.indexOf(un);pt.splice(pn,1),rt.shaderCount--}0>=Nt[un.vertId].refCount&&(Be.deleteShader(At[un.vertId]),delete At[un.vertId],delete ht[un.fragId][un.vertId]),Object.keys(ht[un.fragId]).length||(Be.deleteShader(Et[un.fragId]),delete Et[un.fragId],delete ht[un.fragId])}})},restore:function(){Et={},At={};for(var Pt=0;Pt<pt.length;++Pt)Tt(pt[Pt],null,pt[Pt].attributes.map(function(Ot){return[Ot.location,Ot.name]}))},shader:st,frag:-1,vert:-1}}(gt,Ht,jt,Be),En=function S(Be,Ye,rt,Se,ze,Ke,st){function ct(){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 Tt($t,kn){$t.internalformat=kn.internalformat,$t.format=kn.format,$t.type=kn.type,$t.compressed=kn.compressed,$t.premultiplyAlpha=kn.premultiplyAlpha,$t.flipY=kn.flipY,$t.unpackAlignment=kn.unpackAlignment,$t.colorSpace=kn.colorSpace,$t.width=kn.width,$t.height=kn.height,$t.channels=kn.channels}function Et($t,kn){if("object"==typeof kn&&kn){"premultiplyAlpha"in kn&&($t.premultiplyAlpha=kn.premultiplyAlpha),"flipY"in kn&&($t.flipY=kn.flipY),"alignment"in kn&&($t.unpackAlignment=kn.alignment),"colorSpace"in kn&&($t.colorSpace=Nn[kn.colorSpace]),"type"in kn&&($t.type=Fn[kn.type]);var zt=$t.width,Wt=$t.height,tn=$t.channels,Sn=!1;"shape"in kn?(zt=kn.shape[0],Wt=kn.shape[1],3===kn.shape.length&&(tn=kn.shape[2],Sn=!0)):("radius"in kn&&(zt=Wt=kn.radius),"width"in kn&&(zt=kn.width),"height"in kn&&(Wt=kn.height),"channels"in kn&&(tn=kn.channels,Sn=!0)),$t.width=0|zt,$t.height=0|Wt,$t.channels=0|tn,zt=!1,"format"in kn&&(Wt=$t.internalformat=rr[zt=kn.format],$t.format=zn[Wt],zt in Fn&&!("type"in kn)&&($t.type=Fn[zt]),zt in $n&&($t.compressed=!0),zt=!0),!Sn&&zt?$t.channels=Ce[$t.format]:Sn&&!zt&&$t.channels!==Ie[$t.format]&&($t.format=$t.internalformat=Ie[$t.channels])}}function At($t){Be.pixelStorei(37440,$t.flipY),Be.pixelStorei(37441,$t.premultiplyAlpha),Be.pixelStorei(37443,$t.colorSpace),Be.pixelStorei(3317,$t.unpackAlignment)}function ht(){ct.call(this),this.yOffset=this.xOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function pt($t,kn){var zt=null;if(m(kn)?zt=kn:kn&&(Et($t,kn),"x"in kn&&($t.xOffset=0|kn.x),"y"in kn&&($t.yOffset=0|kn.y),m(kn.data)&&(zt=kn.data)),kn.copy){var Wt=ze.viewportWidth,tn=ze.viewportHeight;$t.width=$t.width||Wt-$t.xOffset,$t.height=$t.height||tn-$t.yOffset,$t.needsCopy=!0}else if(zt){if(de(zt))$t.channels=$t.channels||4,$t.data=zt,"type"in kn||5121!==$t.type||($t.type=0|Pe[Object.prototype.toString.call(zt)]);else if(g(zt)){switch($t.channels=$t.channels||4,tn=(Wt=zt).length,$t.type){case 5121:case 5123:case 5125:case 5126:(tn=ce.allocType($t.type,tn)).set(Wt),$t.data=tn;break;case 36193:$t.data=f(Wt)}$t.alignment=1,$t.needsFree=!0}else if(t(zt)){Wt=zt.data,Array.isArray(Wt)||5121!==$t.type||($t.type=0|Pe[Object.prototype.toString.call(Wt)]);var Sn,An,Tn,an,mn=zt.stride;3===(tn=zt.shape).length?(Tn=tn[2],an=mn[2]):an=Tn=1,Sn=tn[0],An=tn[1],tn=mn[0],mn=mn[1],$t.alignment=1,$t.width=Sn,$t.height=An,$t.channels=Tn,$t.format=$t.internalformat=Ie[Tn],$t.needsFree=!0,Sn=an,zt=zt.offset;for(var on=ce.allocType(36193===$t.type?5126:$t.type,(Tn=$t.width)*(an=$t.height)*(An=$t.channels)),fn=0,yn=0;yn<an;++yn)for(var Ln=0;Ln<Tn;++Ln)for(var Hn=0;Hn<An;++Hn)on[fn++]=Wt[tn*Ln+mn*yn+Sn*Hn+zt];w($t,on)}else if(h(zt)===Re||h(zt)===le||h(zt)===ge)$t.element=h(zt)===Re||h(zt)===le?zt:zt.canvas,$t.width=$t.element.width,$t.height=$t.element.height,$t.channels=4;else if(h(zt)===_e)$t.element=zt,$t.width=zt.width,$t.height=zt.height,$t.channels=4;else if(h(zt)===Fe)$t.element=zt,$t.width=zt.naturalWidth,$t.height=zt.naturalHeight,$t.channels=4;else if(h(zt)===Ve)$t.element=zt,$t.width=zt.videoWidth,$t.height=zt.videoHeight,$t.channels=4;else if(y(zt)){for(Wt=$t.width||zt[0].length,tn=$t.height||zt.length,mn=$t.channels,mn=x(zt[0][0])?mn||zt[0][0].length:mn||1,Sn=ve_shape(zt),Tn=1,an=0;an<Sn.length;++an)Tn*=Sn[an];Tn=ce.allocType(36193===$t.type?5126:$t.type,Tn),ve_flatten(zt,Sn,"",Tn),w($t,Tn),$t.alignment=1,$t.width=Wt,$t.height=tn,$t.channels=mn,$t.format=$t.internalformat=Ie[mn],$t.needsFree=!0}}else $t.width=$t.width||1,$t.height=$t.height||1,$t.channels=$t.channels||4}function gt($t,kn,zt,Wt,tn){var Sn=$t.element,An=$t.data,Tn=$t.internalformat,an=$t.format,mn=$t.type,on=$t.width,fn=$t.height;At($t),Sn?Be.texSubImage2D(kn,tn,zt,Wt,an,mn,Sn):$t.compressed?Be.compressedTexSubImage2D(kn,tn,zt,Wt,Tn,on,fn,An):$t.needsCopy?(Se(),Be.copyTexSubImage2D(kn,tn,zt,Wt,$t.xOffset,$t.yOffset,on,fn)):Be.texSubImage2D(kn,tn,zt,Wt,on,fn,an,mn,An)}function Pt(){return _n.pop()||new ht}function Ot($t){$t.needsFree&&ce.freeType($t.data),ht.call($t),_n.push($t)}function Ht(){ct.call(this),this.genMipmaps=!1,this.mipmapHint=4352,this.mipmask=0,this.images=Array(16)}function jt($t,kn,zt){var Wt=$t.images[0]=Pt();$t.mipmask=1,Wt.width=$t.width=kn,Wt.height=$t.height=zt,Wt.channels=$t.channels=4}function Nt($t,kn){var zt=null;if(m(kn))Tt(zt=$t.images[0]=Pt(),$t),pt(zt,kn),$t.mipmask=1;else if(Et($t,kn),Array.isArray(kn.mipmap))for(var Wt=kn.mipmap,tn=0;tn<Wt.length;++tn)Tt(zt=$t.images[tn]=Pt(),$t),zt.width>>=tn,zt.height>>=tn,pt(zt,Wt[tn]),$t.mipmask|=1<<tn;else Tt(zt=$t.images[0]=Pt(),$t),pt(zt,kn),$t.mipmask=1;Tt($t,$t.images[0])}function Gt($t,kn){for(var zt=$t.images,Wt=0;Wt<zt.length&&zt[Wt];++Wt){var tn=zt[Wt],Sn=kn,An=Wt,Tn=tn.element,an=tn.data,mn=tn.internalformat,on=tn.format,fn=tn.type,yn=tn.width,Ln=tn.height;At(tn),Tn?Be.texImage2D(Sn,An,on,on,fn,Tn):tn.compressed?Be.compressedTexImage2D(Sn,An,mn,yn,Ln,0,an):tn.needsCopy?(Se(),Be.copyTexImage2D(Sn,An,on,tn.xOffset,tn.yOffset,yn,Ln,0)):Be.texImage2D(Sn,An,on,yn,Ln,0,on,fn,an||null)}}function un(){var $t=Cn.pop()||new Ht;ct.call($t);for(var kn=$t.mipmask=0;16>kn;++kn)$t.images[kn]=null;return $t}function pn($t){for(var kn=$t.images,zt=0;zt<kn.length;++zt)kn[zt]&&Ot(kn[zt]),kn[zt]=null;Cn.push($t)}function Kt(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function wn($t,kn){"min"in kn&&($t.minFilter=Rn[kn.min],0<=Me.indexOf($t.minFilter)&&!("faces"in kn)&&($t.genMipmaps=!0)),"mag"in kn&&($t.magFilter=Mn[kn.mag]);var zt=$t.wrapS,Wt=$t.wrapT;if("wrap"in kn){var tn=kn.wrap;"string"==typeof tn?zt=Wt=En[tn]:Array.isArray(tn)&&(zt=En[tn[0]],Wt=En[tn[1]])}else"wrapS"in kn&&(zt=En[kn.wrapS]),"wrapT"in kn&&(Wt=En[kn.wrapT]);if($t.wrapS=zt,$t.wrapT=Wt,"anisotropic"in kn&&($t.anisotropic=kn.anisotropic),"mipmap"in kn){switch(zt=!1,typeof kn.mipmap){case"string":$t.mipmapHint=hn[kn.mipmap],zt=$t.genMipmaps=!0;break;case"boolean":zt=$t.genMipmaps=kn.mipmap;break;case"object":$t.genMipmaps=!1,zt=!0}!zt||"min"in kn||($t.minFilter=9984)}}function Bn($t,kn){Be.texParameteri(kn,10241,$t.minFilter),Be.texParameteri(kn,10240,$t.magFilter),Be.texParameteri(kn,10242,$t.wrapS),Be.texParameteri(kn,10243,$t.wrapT),Ye.ext_texture_filter_anisotropic&&Be.texParameteri(kn,34046,$t.anisotropic),$t.genMipmaps&&(Be.hint(33170,$t.mipmapHint),Be.generateMipmap(kn))}function vn($t){ct.call(this),this.mipmask=0,this.internalformat=6408,this.id=Un++,this.refCount=1,this.target=$t,this.texture=Be.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Kt,st.profile&&(this.stats={size:0})}function cn($t){Be.activeTexture(33984),Be.bindTexture($t.target,$t.texture)}function dn(){var $t=yr[0];$t?Be.bindTexture($t.target,$t.texture):Be.bindTexture(3553,null)}function sn($t){var kn=$t.texture,zt=$t.unit,Wt=$t.target;0<=zt&&(Be.activeTexture(33984+zt),Be.bindTexture(Wt,null),yr[zt]=null),Be.deleteTexture(kn),$t.texture=null,$t.params=null,$t.pixels=null,$t.refCount=0,delete Gn[$t.id],Ke.textureCount--}var hn={"don't care":4352,"dont care":4352,nice:4354,fast:4353},En={repeat:10497,clamp:33071,mirror:33648},Mn={nearest:9728,linear:9729},Rn=K({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},Mn),Nn={none:0,browser:37444},Fn={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},rr={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},$n={};Ye.ext_srgb&&(rr.srgb=35904,rr.srgba=35906),Ye.oes_texture_float&&(Fn.float32=Fn.float=5126),Ye.oes_texture_half_float&&(Fn.float16=Fn["half float"]=36193),Ye.webgl_depth_texture&&(K(rr,{depth:6402,"depth stencil":34041}),K(Fn,{uint16:5123,uint32:5125,"depth stencil":34042})),Ye.webgl_compressed_texture_s3tc&&K($n,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),Ye.webgl_compressed_texture_atc&&K($n,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),Ye.webgl_compressed_texture_pvrtc&&K($n,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),Ye.webgl_compressed_texture_etc1&&($n["rgb etc1"]=36196);var mr=Array.prototype.slice.call(Be.getParameter(34467));Object.keys($n).forEach(function($t){var kn=$n[$t];0<=mr.indexOf(kn)&&(rr[$t]=kn)});var fr=Object.keys(rr);rt.textureFormats=fr;var Zn=[];Object.keys(rr).forEach(function($t){Zn[rr[$t]]=$t});var qn=[];Object.keys(Fn).forEach(function($t){qn[Fn[$t]]=$t});var ur=[];Object.keys(Mn).forEach(function($t){ur[Mn[$t]]=$t});var Zt=[];Object.keys(Rn).forEach(function($t){Zt[Rn[$t]]=$t});var nn=[];Object.keys(En).forEach(function($t){nn[En[$t]]=$t});var zn=fr.reduce(function($t,kn){var zt=rr[kn];return $t[zt]=6409===zt||6406===zt||6409===zt||6410===zt||6402===zt||34041===zt||Ye.ext_srgb&&(35904===zt||35906===zt)?zt:32855===zt||0<=kn.indexOf("rgba")?6408:6407,$t},{}),_n=[],Cn=[],Un=0,Gn={},ar=rt.maxTextureUnits,yr=Array(ar).map(function(){return null});return K(vn.prototype,{bind:function(){this.bindCount+=1;var $t=this.unit;if(0>$t){for(var kn=0;kn<ar;++kn){var zt=yr[kn];if(zt){if(0<zt.bindCount)continue;zt.unit=-1}yr[kn]=this,$t=kn;break}st.profile&&Ke.maxTextureUnits<$t+1&&(Ke.maxTextureUnits=$t+1),this.unit=$t,Be.activeTexture(33984+$t),Be.bindTexture(this.target,this.texture)}return $t},unbind:function(){--this.bindCount},decRef:function(){0>=--this.refCount&&sn(this)}}),st.profile&&(Ke.getTotalTextureSize=function(){var $t=0;return Object.keys(Gn).forEach(function(kn){$t+=Gn[kn].stats.size}),$t}),{create2D:function($t,kn){function zt(tn,Sn){var An=Wt.texInfo;Kt.call(An);var Tn=un();return"number"==typeof tn?jt(Tn,0|tn,"number"==typeof Sn?0|Sn:0|tn):tn?(wn(An,tn),Nt(Tn,tn)):jt(Tn,1,1),An.genMipmaps&&(Tn.mipmask=(Tn.width<<1)-1),Wt.mipmask=Tn.mipmask,Tt(Wt,Tn),Wt.internalformat=Tn.internalformat,zt.width=Tn.width,zt.height=Tn.height,cn(Wt),Gt(Tn,3553),Bn(An,3553),dn(),pn(Tn),st.profile&&(Wt.stats.size=u(Wt.internalformat,Wt.type,Tn.width,Tn.height,An.genMipmaps,!1)),zt.format=Zn[Wt.internalformat],zt.type=qn[Wt.type],zt.mag=ur[An.magFilter],zt.min=Zt[An.minFilter],zt.wrapS=nn[An.wrapS],zt.wrapT=nn[An.wrapT],zt}var Wt=new vn(3553);return Gn[Wt.id]=Wt,Ke.textureCount++,zt($t,kn),zt.subimage=function(tn,Sn,An,Tn){Sn|=0,An|=0,Tn|=0;var an=Pt();return Tt(an,Wt),an.width=0,an.height=0,pt(an,tn),an.width=an.width||(Wt.width>>Tn)-Sn,an.height=an.height||(Wt.height>>Tn)-An,cn(Wt),gt(an,3553,Sn,An,Tn),dn(),Ot(an),zt},zt.resize=function(tn,Sn){var An=0|tn,Tn=0|Sn||An;if(An===Wt.width&&Tn===Wt.height)return zt;zt.width=Wt.width=An,zt.height=Wt.height=Tn,cn(Wt);for(var an=0;Wt.mipmask>>an;++an){var mn=An>>an,on=Tn>>an;if(!mn||!on)break;Be.texImage2D(3553,an,Wt.format,mn,on,0,Wt.format,Wt.type,null)}return dn(),st.profile&&(Wt.stats.size=u(Wt.internalformat,Wt.type,An,Tn,!1,!1)),zt},zt._reglType="texture2d",zt._texture=Wt,st.profile&&(zt.stats=Wt.stats),zt.destroy=function(){Wt.decRef()},zt},createCube:function($t,kn,zt,Wt,tn,Sn){function An(mn,on,fn,yn,Ln,Hn){var Wn,Kn=Tn.texInfo;for(Kt.call(Kn),Wn=0;6>Wn;++Wn)an[Wn]=un();if("number"!=typeof mn&&mn){if("object"==typeof mn)if(on)Nt(an[0],mn),Nt(an[1],on),Nt(an[2],fn),Nt(an[3],yn),Nt(an[4],Ln),Nt(an[5],Hn);else if(wn(Kn,mn),Et(Tn,mn),"faces"in mn)for(mn=mn.faces,Wn=0;6>Wn;++Wn)Tt(an[Wn],Tn),Nt(an[Wn],mn[Wn]);else for(Wn=0;6>Wn;++Wn)Nt(an[Wn],mn)}else for(mn=0|mn||1,Wn=0;6>Wn;++Wn)jt(an[Wn],mn,mn);for(Tt(Tn,an[0]),Tn.mipmask=Kn.genMipmaps?(an[0].width<<1)-1:an[0].mipmask,Tn.internalformat=an[0].internalformat,An.width=an[0].width,An.height=an[0].height,cn(Tn),Wn=0;6>Wn;++Wn)Gt(an[Wn],34069+Wn);for(Bn(Kn,34067),dn(),st.profile&&(Tn.stats.size=u(Tn.internalformat,Tn.type,An.width,An.height,Kn.genMipmaps,!0)),An.format=Zn[Tn.internalformat],An.type=qn[Tn.type],An.mag=ur[Kn.magFilter],An.min=Zt[Kn.minFilter],An.wrapS=nn[Kn.wrapS],An.wrapT=nn[Kn.wrapT],Wn=0;6>Wn;++Wn)pn(an[Wn]);return An}var Tn=new vn(34067);Gn[Tn.id]=Tn,Ke.cubeCount++;var an=Array(6);return An($t,kn,zt,Wt,tn,Sn),An.subimage=function(mn,on,fn,yn,Ln){fn|=0,yn|=0,Ln|=0;var Hn=Pt();return Tt(Hn,Tn),Hn.width=0,Hn.height=0,pt(Hn,on),Hn.width=Hn.width||(Tn.width>>Ln)-fn,Hn.height=Hn.height||(Tn.height>>Ln)-yn,cn(Tn),gt(Hn,34069+mn,fn,yn,Ln),dn(),Ot(Hn),An},An.resize=function(mn){if((mn|=0)!==Tn.width){An.width=Tn.width=mn,An.height=Tn.height=mn,cn(Tn);for(var on=0;6>on;++on)for(var fn=0;Tn.mipmask>>fn;++fn)Be.texImage2D(34069+on,fn,Tn.format,mn>>fn,mn>>fn,0,Tn.format,Tn.type,null);return dn(),st.profile&&(Tn.stats.size=u(Tn.internalformat,Tn.type,An.width,An.height,!1,!0)),An}},An._reglType="textureCube",An._texture=Tn,st.profile&&(An.stats=Tn.stats),An.destroy=function(){Tn.decRef()},An},clear:function(){for(var $t=0;$t<ar;++$t)Be.activeTexture(33984+$t),Be.bindTexture(3553,null),yr[$t]=null;he(Gn).forEach(sn),Ke.cubeCount=0,Ke.textureCount=0},getTexture:function($t){return null},restore:function(){for(var $t=0;$t<ar;++$t){var kn=yr[$t];kn&&(kn.bindCount=0,kn.unit=-1,yr[$t]=null)}he(Gn).forEach(function(zt){zt.texture=Be.createTexture(),Be.bindTexture(zt.target,zt.texture);for(var Wt=0;32>Wt;++Wt)if(zt.mipmask&1<<Wt)if(3553===zt.target)Be.texImage2D(3553,Wt,zt.internalformat,zt.width>>Wt,zt.height>>Wt,0,zt.internalformat,zt.type,null);else for(var tn=0;6>tn;++tn)Be.texImage2D(34069+tn,Wt,zt.internalformat,zt.width>>Wt,zt.height>>Wt,0,zt.internalformat,zt.type,null);Bn(zt.texInfo,zt.target)})},refresh:function(){for(var $t=0;$t<ar;++$t){var kn=yr[$t];kn&&(kn.bindCount=0,kn.unit=-1,yr[$t]=null),Be.activeTexture(33984+$t),Be.bindTexture(3553,null),Be.bindTexture(34067,null)}}}}(gt,Gt,vn,function(){Nn.procs.poll()},Bn,jt,Be),Mn=function(Be,Ye,rt,Se,ze){function Ke(ht){this.id=Et++,this.refCount=1,this.renderbuffer=ht,this.format=32854,this.height=this.width=0,ze.profile&&(this.stats={size:0})}function st(ht){var pt=ht.renderbuffer;Be.bindRenderbuffer(36161,null),Be.deleteRenderbuffer(pt),ht.renderbuffer=null,ht.refCount=0,delete At[ht.id],Se.renderbufferCount--}var ct={rgba4:32854,rgb565:36194,"rgb5 a1":32855,depth:33189,stencil:36168,"depth stencil":34041};Ye.ext_srgb&&(ct.srgba=35907),Ye.ext_color_buffer_half_float&&(ct.rgba16f=34842,ct.rgb16f=34843),Ye.webgl_color_buffer_float&&(ct.rgba32f=34836);var Tt=[];Object.keys(ct).forEach(function(ht){Tt[ct[ht]]=ht});var Et=0,At={};return Ke.prototype.decRef=function(){0>=--this.refCount&&st(this)},ze.profile&&(Se.getTotalRenderbufferSize=function(){var ht=0;return Object.keys(At).forEach(function(pt){ht+=At[pt].stats.size}),ht}),{create:function(ht,pt){function gt(Ot,Ht){var jt=0,Nt=0,Gt=32854;if("object"==typeof Ot&&Ot?("shape"in Ot?(jt=0|(Nt=Ot.shape)[0],Nt=0|Nt[1]):("radius"in Ot&&(jt=Nt=0|Ot.radius),"width"in Ot&&(jt=0|Ot.width),"height"in Ot&&(Nt=0|Ot.height)),"format"in Ot&&(Gt=ct[Ot.format])):"number"==typeof Ot?(jt=0|Ot,Nt="number"==typeof Ht?0|Ht:jt):Ot||(jt=Nt=1),jt!==Pt.width||Nt!==Pt.height||Gt!==Pt.format)return gt.width=Pt.width=jt,gt.height=Pt.height=Nt,Pt.format=Gt,Be.bindRenderbuffer(36161,Pt.renderbuffer),Be.renderbufferStorage(36161,Gt,jt,Nt),ze.profile&&(Pt.stats.size=ot[Pt.format]*Pt.width*Pt.height),gt.format=Tt[Pt.format],gt}var Pt=new Ke(Be.createRenderbuffer());return At[Pt.id]=Pt,Se.renderbufferCount++,gt(ht,pt),gt.resize=function(Ot,Ht){var jt=0|Ot,Nt=0|Ht||jt;return jt===Pt.width&&Nt===Pt.height||(gt.width=Pt.width=jt,gt.height=Pt.height=Nt,Be.bindRenderbuffer(36161,Pt.renderbuffer),Be.renderbufferStorage(36161,Pt.format,jt,Nt),ze.profile&&(Pt.stats.size=ot[Pt.format]*Pt.width*Pt.height)),gt},gt._reglType="renderbuffer",gt._renderbuffer=Pt,ze.profile&&(gt.stats=Pt.stats),gt.destroy=function(){Pt.decRef()},gt},clear:function(){he(At).forEach(st)},restore:function(){he(At).forEach(function(ht){ht.renderbuffer=Be.createRenderbuffer(),Be.bindRenderbuffer(36161,ht.renderbuffer),Be.renderbufferStorage(36161,ht.format,ht.width,ht.height)}),Be.bindRenderbuffer(36161,null)}}}(gt,Gt,0,jt,Be),Rn=function _(Be,Ye,rt,Se,ze,Ke){function st(vn,cn,dn){this.target=vn,this.texture=cn,this.renderbuffer=dn;var sn=vn=0;cn?(vn=cn.width,sn=cn.height):dn&&(vn=dn.width,sn=dn.height),this.width=vn,this.height=sn}function ct(vn){vn&&(vn.texture&&vn.texture._texture.decRef(),vn.renderbuffer&&vn.renderbuffer._renderbuffer.decRef())}function Tt(vn,cn,dn){vn&&(vn.texture?vn.texture._texture.refCount+=1:vn.renderbuffer._renderbuffer.refCount+=1)}function Et(vn,cn){cn&&(cn.texture?Be.framebufferTexture2D(36160,vn,cn.target,cn.texture._texture.texture,0):Be.framebufferRenderbuffer(36160,vn,36161,cn.renderbuffer._renderbuffer.renderbuffer))}function At(vn){var cn=3553,dn=null,sn=null,hn=vn;return"object"==typeof vn&&(hn=vn.data,"target"in vn&&(cn=0|vn.target)),"texture2d"===(vn=hn._reglType)||"textureCube"===vn?dn=hn:"renderbuffer"===vn&&(sn=hn,cn=36161),new st(cn,dn,sn)}function ht(vn,cn,dn,sn,hn){return dn?((vn=Se.create2D({width:vn,height:cn,format:sn,type:hn}))._texture.refCount=0,new st(3553,vn,null)):((vn=ze.create({width:vn,height:cn,format:sn}))._renderbuffer.refCount=0,new st(36161,null,vn))}function pt(vn){return vn&&(vn.texture||vn.renderbuffer)}function gt(vn,cn,dn){vn&&(vn.texture?vn.texture.resize(cn,dn):vn.renderbuffer&&vn.renderbuffer.resize(cn,dn),vn.width=cn,vn.height=dn)}function Pt(){this.id=wn++,Bn[this.id]=this,this.framebuffer=Be.createFramebuffer(),this.height=this.width=0,this.colorAttachments=[],this.depthStencilAttachment=this.stencilAttachment=this.depthAttachment=null}function Ot(vn){vn.colorAttachments.forEach(ct),ct(vn.depthAttachment),ct(vn.stencilAttachment),ct(vn.depthStencilAttachment)}function Ht(vn){Be.deleteFramebuffer(vn.framebuffer),vn.framebuffer=null,Ke.framebufferCount--,delete Bn[vn.id]}function jt(vn){var cn;Be.bindFramebuffer(36160,vn.framebuffer);var dn=vn.colorAttachments;for(cn=0;cn<dn.length;++cn)Et(36064+cn,dn[cn]);for(cn=dn.length;cn<rt.maxColorAttachments;++cn)Be.framebufferTexture2D(36160,36064+cn,3553,null,0);Be.framebufferTexture2D(36160,33306,3553,null,0),Be.framebufferTexture2D(36160,36096,3553,null,0),Be.framebufferTexture2D(36160,36128,3553,null,0),Et(36096,vn.depthAttachment),Et(36128,vn.stencilAttachment),Et(33306,vn.depthStencilAttachment),Be.checkFramebufferStatus(36160),Be.isContextLost(),Be.bindFramebuffer(36160,Gt.next?Gt.next.framebuffer:null),Gt.cur=Gt.next,Be.getError()}function Nt(vn,cn){function dn(hn,En){var Mn,Rn=0,Nn=0,Fn=!0,rr=!0;Mn=null;var $n=!0,mr="rgba",fr="uint8",Zn=1,qn=null,ur=null,Zt=null,nn=!1;"number"==typeof hn?(Rn=0|hn,Nn=0|En||Rn):hn?("shape"in hn?(Rn=(Nn=hn.shape)[0],Nn=Nn[1]):("radius"in hn&&(Rn=Nn=hn.radius),"width"in hn&&(Rn=hn.width),"height"in hn&&(Nn=hn.height)),("color"in hn||"colors"in hn)&&(Mn=hn.color||hn.colors,Array.isArray(Mn)),Mn||("colorCount"in hn&&(Zn=0|hn.colorCount),"colorTexture"in hn&&($n=!!hn.colorTexture,mr="rgba4"),"colorType"in hn&&(fr=hn.colorType,!$n)&&("half float"===fr||"float16"===fr?mr="rgba16f":"float"!==fr&&"float32"!==fr||(mr="rgba32f")),"colorFormat"in hn&&(0<=un.indexOf(mr=hn.colorFormat)?$n=!0:0<=pn.indexOf(mr)&&($n=!1))),("depthTexture"in hn||"depthStencilTexture"in hn)&&(nn=!(!hn.depthTexture&&!hn.depthStencilTexture)),"depth"in hn&&("boolean"==typeof hn.depth?Fn=hn.depth:(qn=hn.depth,rr=!1)),"stencil"in hn&&("boolean"==typeof hn.stencil?rr=hn.stencil:(ur=hn.stencil,Fn=!1)),"depthStencil"in hn&&("boolean"==typeof hn.depthStencil?Fn=rr=hn.depthStencil:(Zt=hn.depthStencil,rr=Fn=!1))):Rn=Nn=1;var zn=null,_n=null,Cn=null,Un=null;if(Array.isArray(Mn))zn=Mn.map(At);else if(Mn)zn=[At(Mn)];else for(zn=Array(Zn),Mn=0;Mn<Zn;++Mn)zn[Mn]=ht(Rn,Nn,$n,mr,fr);for(Rn=Rn||zn[0].width,Nn=Nn||zn[0].height,qn?_n=At(qn):Fn&&!rr&&(_n=ht(Rn,Nn,nn,"depth","uint32")),ur?Cn=At(ur):rr&&!Fn&&(Cn=ht(Rn,Nn,!1,"stencil","uint8")),Zt?Un=At(Zt):!qn&&!ur&&rr&&Fn&&(Un=ht(Rn,Nn,nn,"depth stencil","depth stencil")),Fn=null,Mn=0;Mn<zn.length;++Mn)Tt(zn[Mn]),zn[Mn]&&zn[Mn].texture&&(rr=kt[zn[Mn].texture._texture.format]*mt[zn[Mn].texture._texture.type],null===Fn&&(Fn=rr));return Tt(_n),Tt(Cn),Tt(Un),Ot(sn),sn.width=Rn,sn.height=Nn,sn.colorAttachments=zn,sn.depthAttachment=_n,sn.stencilAttachment=Cn,sn.depthStencilAttachment=Un,dn.color=zn.map(pt),dn.depth=pt(_n),dn.stencil=pt(Cn),dn.depthStencil=pt(Un),dn.width=sn.width,dn.height=sn.height,jt(sn),dn}var sn=new Pt;return Ke.framebufferCount++,dn(vn,cn),K(dn,{resize:function(hn,En){var Mn=Math.max(0|hn,1),Rn=Math.max(0|En||Mn,1);if(Mn===sn.width&&Rn===sn.height)return dn;for(var Nn=sn.colorAttachments,Fn=0;Fn<Nn.length;++Fn)gt(Nn[Fn],Mn,Rn);return gt(sn.depthAttachment,Mn,Rn),gt(sn.stencilAttachment,Mn,Rn),gt(sn.depthStencilAttachment,Mn,Rn),sn.width=dn.width=Mn,sn.height=dn.height=Rn,jt(sn),dn},_reglType:"framebuffer",_framebuffer:sn,destroy:function(){Ht(sn),Ot(sn)},use:function(hn){Gt.setFBO({framebuffer:dn},hn)}})}var Gt={cur:null,next:null,dirty:!1,setFBO:null},un=["rgba"],pn=["rgba4","rgb565","rgb5 a1"];Ye.ext_srgb&&pn.push("srgba"),Ye.ext_color_buffer_half_float&&pn.push("rgba16f","rgb16f"),Ye.webgl_color_buffer_float&&pn.push("rgba32f");var Kt=["uint8"];Ye.oes_texture_half_float&&Kt.push("half float","float16"),Ye.oes_texture_float&&Kt.push("float","float32");var wn=0,Bn={};return K(Gt,{getFramebuffer:function(vn){return"function"==typeof vn&&"framebuffer"===vn._reglType&&(vn=vn._framebuffer)instanceof Pt?vn:null},create:Nt,createCube:function(vn){function cn(sn){var hn,En={color:null},Mn=0,Rn=null;hn="rgba";var Nn="uint8",Fn=1;if("number"==typeof sn?Mn=0|sn:sn?("shape"in sn?Mn=sn.shape[0]:("radius"in sn&&(Mn=0|sn.radius),"width"in sn?Mn=0|sn.width:"height"in sn&&(Mn=0|sn.height)),("color"in sn||"colors"in sn)&&(Rn=sn.color||sn.colors,Array.isArray(Rn)),Rn||("colorCount"in sn&&(Fn=0|sn.colorCount),"colorType"in sn&&(Nn=sn.colorType),"colorFormat"in sn&&(hn=sn.colorFormat)),"depth"in sn&&(En.depth=sn.depth),"stencil"in sn&&(En.stencil=sn.stencil),"depthStencil"in sn&&(En.depthStencil=sn.depthStencil)):Mn=1,Rn)if(Array.isArray(Rn))for(sn=[],hn=0;hn<Rn.length;++hn)sn[hn]=Rn[hn];else sn=[Rn];else for(sn=Array(Fn),Rn={radius:Mn,format:hn,type:Nn},hn=0;hn<Fn;++hn)sn[hn]=Se.createCube(Rn);for(En.color=Array(sn.length),hn=0;hn<sn.length;++hn)Fn=sn[hn],Mn=Mn||Fn.width,En.color[hn]={target:34069,data:sn[hn]};for(hn=0;6>hn;++hn){for(Fn=0;Fn<sn.length;++Fn)En.color[Fn].target=34069+hn;0<hn&&(En.depth=dn[0].depth,En.stencil=dn[0].stencil,En.depthStencil=dn[0].depthStencil),dn[hn]?dn[hn](En):dn[hn]=Nt(En)}return K(cn,{width:Mn,height:Mn,color:sn})}var dn=Array(6);return cn(vn),K(cn,{faces:dn,resize:function(sn){var hn=0|sn;if(hn===cn.width)return cn;var En=cn.color;for(sn=0;sn<En.length;++sn)En[sn].resize(hn);for(sn=0;6>sn;++sn)dn[sn].resize(hn);return cn.width=cn.height=hn,cn},_reglType:"framebufferCube",destroy:function(){dn.forEach(function(sn){sn.destroy()})}})},clear:function(){he(Bn).forEach(Ht)},restore:function(){Gt.cur=null,Gt.next=null,Gt.dirty=!0,he(Bn).forEach(function(vn){vn.framebuffer=Be.createFramebuffer(),jt(vn)})}})}(gt,Gt,vn,En,Mn,jt),Nn=W(gt,Ht,Gt,vn,cn,dn,0,Rn,{},sn,hn,Kt,Bn,un,Nt,Be),Fn=(Ht=function P(Be,Ye,rt,Se,ze,Ke,st){function ct(Tt){var Et;Et=null===Ye.next?5121:Ye.next.colorAttachments[0].texture._texture.type;var At=0,ht=0,pt=Se.framebufferWidth,gt=Se.framebufferHeight,Pt=null;return de(Tt)?Pt=Tt:Tt&&(At=0|Tt.x,ht=0|Tt.y,pt=0|(Tt.width||Se.framebufferWidth-At),gt=0|(Tt.height||Se.framebufferHeight-ht),Pt=Tt.data||null),rt(),Tt=pt*gt*4,Pt||(5121===Et?Pt=new Uint8Array(Tt):5126===Et&&(Pt=Pt||new Float32Array(Tt))),Be.pixelStorei(3333,4),Be.readPixels(At,ht,pt,gt,6408,Et,Pt),Pt}return function(Tt){return Tt&&"framebuffer"in Tt?(Ye.setFBO({framebuffer:(Et=Tt).framebuffer},function(){At=ct(Et)}),At):ct(Tt);var Et,At}}(gt,Rn,Nn.procs.poll,Bn),Nn.next),rr=gt.canvas,$n=[],mr=[],fr=[],Zn=[Be.onDestroy],qn=null;rr&&(rr.addEventListener("webglcontextlost",ze,!1),rr.addEventListener("webglcontextrestored",Ke,!1));var ur=Rn.setFBO=st({framebuffer:ee.define.call(null,1,"framebuffer")});return ht(),Pt=K(st,{clear:function(Zt){if("framebuffer"in Zt)if(Zt.framebuffer&&"framebufferCube"===Zt.framebuffer_reglType)for(var nn=0;6>nn;++nn)ur(K({framebuffer:Zt.framebuffer.faces[nn]},Zt),ct);else ur(Zt,ct);else ct(0,Zt)},prop:ee.define.bind(null,1),context:ee.define.bind(null,2),this:ee.define.bind(null,3),draw:st({}),buffer:function(Zt){return cn.create(Zt,34962,!1,!1)},elements:function(Zt){return dn.create(Zt,!1)},texture:En.create2D,cube:En.createCube,renderbuffer:Mn.create,framebuffer:Rn.create,framebufferCube:Rn.createCube,vao:sn.createVAO,attributes:Pt,frame:Tt,on:function(Zt,nn){var zn;switch(Zt){case"frame":return Tt(nn);case"lost":zn=mr;break;case"restore":zn=fr;break;case"destroy":zn=Zn}return zn.push(nn),{cancel:function(){for(var _n=0;_n<zn.length;++_n)if(zn[_n]===nn){zn[_n]=zn[zn.length-1],zn.pop();break}}}},limits:vn,hasExtension:function(Zt){return 0<=vn.extensions.indexOf(Zt.toLowerCase())},read:Ht,destroy:function(){$n.length=0,Se(),rr&&(rr.removeEventListener("webglcontextlost",ze),rr.removeEventListener("webglcontextrestored",Ke)),hn.clear(),Rn.clear(),Mn.clear(),sn.clear(),En.clear(),dn.clear(),cn.clear(),un&&un.clear(),Zn.forEach(function(Zt){Zt()})},_gl:gt,_refresh:ht,poll:function(){At(),un&&un.update()},now:pt,stats:jt,getCachedCode:function(){return Nt},preloadCachedCode:function(Zt){Object.entries(Zt).forEach(function(nn){Nt[nn[0]]=nn[1]})}}),Be.onDone(null,Pt),Pt}}()},71665:function($,R,e){var k=e(12856),A=k.Buffer;function l(b,d){for(var s in b)d[s]=b[s]}function T(b,d,s){return A(b,d,s)}A.from&&A.alloc&&A.allocUnsafe&&A.allocUnsafeSlow?$.exports=k:(l(k,R),R.Buffer=T),T.prototype=Object.create(A.prototype),l(A,T),T.from=function(b,d,s){if("number"==typeof b)throw new TypeError("Argument must not be a number");return A(b,d,s)},T.alloc=function(b,d,s){if("number"!=typeof b)throw new TypeError("Argument must be a number");var t=A(b);return void 0!==d?"string"==typeof s?t.fill(d,s):t.fill(d):t.fill(0),t},T.allocUnsafe=function(b){if("number"!=typeof b)throw new TypeError("Argument must be a number");return A(b)},T.allocUnsafeSlow=function(b){if("number"!=typeof b)throw new TypeError("Argument must be a number");return k.SlowBuffer(b)}},21630:function($,R,e){$.exports=A;var k=e(15398).EventEmitter;function A(){k.call(this)}e(42018)(A,k),A.Readable=e(40410),A.Writable=e(37493),A.Duplex=e(37865),A.Transform=e(74308),A.PassThrough=e(66897),A.finished=e(12726),A.pipeline=e(10168),A.Stream=A,A.prototype.pipe=function(l,T){var b=this;function d(a){l.writable&&!1===l.write(a)&&b.pause&&b.pause()}function s(){b.readable&&b.resume&&b.resume()}b.on("data",d),l.on("drain",s),l._isStdio||T&&!1===T.end||(b.on("end",o),b.on("close",r));var t=!1;function o(){t||(t=!0,l.end())}function r(){t||(t=!0,"function"==typeof l.destroy&&l.destroy())}function n(a){if(i(),0===k.listenerCount(this,"error"))throw a}function i(){b.removeListener("data",d),l.removeListener("drain",s),b.removeListener("end",o),b.removeListener("close",r),b.removeListener("error",n),l.removeListener("error",n),b.removeListener("end",i),b.removeListener("close",i),l.removeListener("close",i)}return b.on("error",n),l.on("error",n),b.on("end",i),b.on("close",i),l.on("close",i),l.emit("pipe",b),l}},74322:function($){"use strict";var R={};function e(A,l,T){T||(T=Error);var b=function(d){var s,t;function o(r,n,i){return d.call(this,"string"==typeof l?l:l(r,n,i))||this}return t=d,(s=o).prototype=Object.create(t.prototype),s.prototype.constructor=s,s.__proto__=t,o}(T);b.prototype.name=T.name,b.prototype.code=A,R[A]=b}function k(A,l){if(Array.isArray(A)){var T=A.length;return A=A.map(function(b){return String(b)}),T>2?"one of ".concat(l," ").concat(A.slice(0,T-1).join(", "),", or ")+A[T-1]:2===T?"one of ".concat(l," ").concat(A[0]," or ").concat(A[1]):"of ".concat(l," ").concat(A[0])}return"of ".concat(l," ").concat(String(A))}e("ERR_INVALID_OPT_VALUE",function(A,l){return'The value "'+l+'" is invalid for option "'+A+'"'},TypeError),e("ERR_INVALID_ARG_TYPE",function(A,l,T){var b,s,t,o,n,a;if("string"==typeof l&&("not ","not "===l.substr(0,4))?(b="must not be",l=l.replace(/^not /,"")):b="must be",n=A," argument",(void 0===a||a>n.length)&&(a=n.length)," argument"===n.substring(a-9,a))s="The ".concat(A," ").concat(b," ").concat(k(l,"type"));else{var r=("number"!=typeof o&&(o=0),o+1>(t=A).length||-1===t.indexOf(".",o)?"argument":"property");s='The "'.concat(A,'" ').concat(r," ").concat(b," ").concat(k(l,"type"))}return s+". Received type ".concat(typeof T)},TypeError),e("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),e("ERR_METHOD_NOT_IMPLEMENTED",function(A){return"The "+A+" method is not implemented"}),e("ERR_STREAM_PREMATURE_CLOSE","Premature close"),e("ERR_STREAM_DESTROYED",function(A){return"Cannot call "+A+" after a stream was destroyed"}),e("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),e("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),e("ERR_STREAM_WRITE_AFTER_END","write after end"),e("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),e("ERR_UNKNOWN_ENCODING",function(A){return"Unknown encoding: "+A},TypeError),e("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),$.exports.q=R},37865:function($,R,e){"use strict";var k=e(90386),A=Object.keys||function(n){var i=[];for(var a in n)i.push(a);return i};$.exports=t;var l=e(40410),T=e(37493);e(42018)(t,l);for(var b=A(T.prototype),d=0;d<b.length;d++){var s=b[d];t.prototype[s]||(t.prototype[s]=T.prototype[s])}function t(n){if(!(this instanceof t))return new t(n);l.call(this,n),T.call(this,n),this.allowHalfOpen=!0,n&&(!1===n.readable&&(this.readable=!1),!1===n.writable&&(this.writable=!1),!1===n.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",o)))}function o(){this._writableState.ended||k.nextTick(r,this)}function r(n){n.end()}Object.defineProperty(t.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(t.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(t.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(t.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(n){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=n,this._writableState.destroyed=n)}})},66897:function($,R,e){"use strict";$.exports=A;var k=e(74308);function A(l){if(!(this instanceof A))return new A(l);k.call(this,l)}e(42018)(A,k),A.prototype._transform=function(l,T,b){b(null,l)}},40410:function($,R,e){"use strict";var k,A=e(90386);$.exports=w,w.ReadableState=m,e(15398);var l,T=function(G,V){return G.listeners(V).length},b=e(71405),d=e(12856).Buffer,s=e.g.Uint8Array||function(){},t=e(40964);l=t&&t.debuglog?t.debuglog("stream"):function(){};var o,r,n,i=e(31125),a=e(65756),c=e(56306).getHighWaterMark,p=e(74322).q,f=p.ERR_INVALID_ARG_TYPE,x=p.ERR_STREAM_PUSH_AFTER_EOF,v=p.ERR_METHOD_NOT_IMPLEMENTED,g=p.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;e(42018)(w,b);var y=a.errorOrDestroy,h=["error","close","destroy","pause","resume"];function m(G,V,W){k=k||e(37865),"boolean"!=typeof W&&(W=V instanceof k),this.objectMode=!!(G=G||{}).objectMode,W&&(this.objectMode=this.objectMode||!!G.readableObjectMode),this.highWaterMark=c(this,G,"readableHighWaterMark",W),this.buffer=new i,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==G.emitClose,this.autoDestroy=!!G.autoDestroy,this.destroyed=!1,this.defaultEncoding=G.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,G.encoding&&(o||(o=e(68019).s),this.decoder=new o(G.encoding),this.encoding=G.encoding)}function w(G){if(k=k||e(37865),!(this instanceof w))return new w(G);this._readableState=new m(G,this,this instanceof k),this.readable=!0,G&&("function"==typeof G.read&&(this._read=G.read),"function"==typeof G.destroy&&(this._destroy=G.destroy)),b.call(this)}function u(G,V,W,X,K){l("readableAddChunk",V);var re,ie,oe,ce,me,ee=G._readableState;if(null===V)ee.reading=!1,function(ie,oe){if(l("onEofChunk"),!oe.ended){if(oe.decoder){var ce=oe.decoder.end();ce&&ce.length&&(oe.buffer.push(ce),oe.length+=oe.objectMode?1:ce.length)}oe.ended=!0,oe.sync?L(ie):(oe.needReadable=!1,oe.emittedReadable||(oe.emittedReadable=!0,C(ie)))}}(G,ee);else if(K||(ie=ee,d.isBuffer(me=oe=V)||me instanceof s||"string"==typeof oe||void 0===oe||ie.objectMode||(ce=new f("chunk",["string","Buffer","Uint8Array"],oe)),re=ce),re)y(G,re);else if(ee.objectMode||V&&V.length>0)if("string"==typeof V||ee.objectMode||Object.getPrototypeOf(V)===d.prototype||(V=function(ie){return d.from(ie)}(V)),X)ee.endEmitted?y(G,new g):S(G,ee,V,!0);else if(ee.ended)y(G,new x);else{if(ee.destroyed)return!1;ee.reading=!1,ee.decoder&&!W?(V=ee.decoder.write(V),ee.objectMode||0!==V.length?S(G,ee,V,!1):P(G,ee)):S(G,ee,V,!1)}else X||(ee.reading=!1,P(G,ee));return!ee.ended&&(ee.length<ee.highWaterMark||0===ee.length)}function S(G,V,W,X){V.flowing&&0===V.length&&!V.sync?(V.awaitDrain=0,G.emit("data",W)):(V.length+=V.objectMode?1:W.length,X?V.buffer.unshift(W):V.buffer.push(W),V.needReadable&&L(G)),P(G,V)}Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(G){this._readableState&&(this._readableState.destroyed=G)}}),w.prototype.destroy=a.destroy,w.prototype._undestroy=a.undestroy,w.prototype._destroy=function(G,V){V(G)},w.prototype.push=function(G,V){var W,X=this._readableState;return X.objectMode?W=!0:"string"==typeof G&&((V=V||X.defaultEncoding)!==X.encoding&&(G=d.from(G,V),V=""),W=!0),u(this,G,V,!1,W)},w.prototype.unshift=function(G){return u(this,G,null,!0,!1)},w.prototype.isPaused=function(){return!1===this._readableState.flowing},w.prototype.setEncoding=function(G){o||(o=e(68019).s);var V=new o(G);this._readableState.decoder=V,this._readableState.encoding=this._readableState.decoder.encoding;for(var W=this._readableState.buffer.head,X="";null!==W;)X+=V.write(W.data),W=W.next;return this._readableState.buffer.clear(),""!==X&&this._readableState.buffer.push(X),this._readableState.length=X.length,this};var _=1073741824;function E(G,V){return G<=0||0===V.length&&V.ended?0:V.objectMode?1:G!=G?V.flowing&&V.length?V.buffer.head.data.length:V.length:(G>V.highWaterMark&&(V.highWaterMark=((W=G)>=_?W=_:(W--,W|=W>>>1,W|=W>>>2,W|=W>>>4,W|=W>>>8,W|=W>>>16,W++),W)),G<=V.length?G:V.ended?V.length:(V.needReadable=!0,0));var W}function L(G){var V=G._readableState;l("emitReadable",V.needReadable,V.emittedReadable),V.needReadable=!1,V.emittedReadable||(l("emitReadable",V.flowing),V.emittedReadable=!0,A.nextTick(C,G))}function C(G){var V=G._readableState;l("emitReadable_",V.destroyed,V.length,V.ended),V.destroyed||!V.length&&!V.ended||(G.emit("readable"),V.emittedReadable=!1),V.needReadable=!V.flowing&&!V.ended&&V.length<=V.highWaterMark,F(G)}function P(G,V){V.readingMore||(V.readingMore=!0,A.nextTick(I,G,V))}function I(G,V){for(;!V.reading&&!V.ended&&(V.length<V.highWaterMark||V.flowing&&0===V.length);){var W=V.length;if(l("maybeReadMore read 0"),G.read(0),W===V.length)break}V.readingMore=!1}function U(G){var V=G._readableState;V.readableListening=G.listenerCount("readable")>0,V.resumeScheduled&&!V.paused?V.flowing=!0:G.listenerCount("data")>0&&G.resume()}function z(G){l("readable nexttick read 0"),G.read(0)}function H(G,V){l("resume",V.reading),V.reading||G.read(0),V.resumeScheduled=!1,G.emit("resume"),F(G),V.flowing&&!V.reading&&G.read(0)}function F(G){var V=G._readableState;for(l("flow",V.flowing);V.flowing&&null!==G.read(););}function N(G,V){return 0===V.length?null:(V.objectMode?W=V.buffer.shift():!G||G>=V.length?(W=V.decoder?V.buffer.join(""):1===V.buffer.length?V.buffer.first():V.buffer.concat(V.length),V.buffer.clear()):W=V.buffer.consume(G,V.decoder),W);var W}function B(G){var V=G._readableState;l("endReadable",V.endEmitted),V.endEmitted||(V.ended=!0,A.nextTick(j,V,G))}function j(G,V){if(l("endReadableNT",G.endEmitted,G.length),!G.endEmitted&&0===G.length&&(G.endEmitted=!0,V.readable=!1,V.emit("end"),G.autoDestroy)){var W=V._writableState;(!W||W.autoDestroy&&W.finished)&&V.destroy()}}function J(G,V){for(var W=0,X=G.length;W<X;W++)if(G[W]===V)return W;return-1}w.prototype.read=function(G){l("read",G),G=parseInt(G,10);var V=this._readableState,W=G;if(0!==G&&(V.emittedReadable=!1),0===G&&V.needReadable&&((0!==V.highWaterMark?V.length>=V.highWaterMark:V.length>0)||V.ended))return l("read: emitReadable",V.length,V.ended),0===V.length&&V.ended?B(this):L(this),null;if(0===(G=E(G,V))&&V.ended)return 0===V.length&&B(this),null;var X,K=V.needReadable;return l("need readable",K),(0===V.length||V.length-G<V.highWaterMark)&&l("length less than watermark",K=!0),V.ended||V.reading?l("reading or ended",K=!1):K&&(l("do read"),V.reading=!0,V.sync=!0,0===V.length&&(V.needReadable=!0),this._read(V.highWaterMark),V.sync=!1,V.reading||(G=E(W,V))),null===(X=G>0?N(G,V):null)?(V.needReadable=V.length<=V.highWaterMark,G=0):(V.length-=G,V.awaitDrain=0),0===V.length&&(V.ended||(V.needReadable=!0),W!==G&&V.ended&&B(this)),null!==X&&this.emit("data",X),X},w.prototype._read=function(G){y(this,new v("_read()"))},w.prototype.pipe=function(G,V){var W=this,X=this._readableState;switch(X.pipesCount){case 0:X.pipes=G;break;case 1:X.pipes=[X.pipes,G];break;default:X.pipes.push(G)}X.pipesCount+=1,l("pipe count=%d opts=%j",X.pipesCount,V);var K=V&&!1===V.end||G===A.stdout||G===A.stderr?he:re;function re(){l("onend"),G.end()}X.endEmitted?A.nextTick(K):W.once("end",K),G.on("unpipe",function ve(Pe,xe){l("onunpipe"),Pe===W&&xe&&!1===xe.hasUnpiped&&(xe.hasUnpiped=!0,l("cleanup"),G.removeListener("close",me),G.removeListener("finish",de),G.removeListener("drain",ee),G.removeListener("error",ce),G.removeListener("unpipe",ve),W.removeListener("end",re),W.removeListener("end",he),W.removeListener("data",oe),ie=!0,!X.awaitDrain||G._writableState&&!G._writableState.needDrain||ee())});var ve,ee=(ve=W,function(){var Pe=ve._readableState;l("pipeOnDrain",Pe.awaitDrain),Pe.awaitDrain&&Pe.awaitDrain--,0===Pe.awaitDrain&&T(ve,"data")&&(Pe.flowing=!0,F(ve))});G.on("drain",ee);var ie=!1;function oe(ve){l("ondata");var Pe=G.write(ve);l("dest.write",Pe),!1===Pe&&((1===X.pipesCount&&X.pipes===G||X.pipesCount>1&&-1!==J(X.pipes,G))&&!ie&&(l("false write response, pause",X.awaitDrain),X.awaitDrain++),W.pause())}function ce(ve){l("onerror",ve),he(),G.removeListener("error",ce),0===T(G,"error")&&y(G,ve)}function me(){G.removeListener("finish",de),he()}function de(){l("onfinish"),G.removeListener("close",me),he()}function he(){l("unpipe"),W.unpipe(G)}return W.on("data",oe),function(ve,Pe,xe){if("function"==typeof ve.prependListener)return ve.prependListener("error",xe);ve._events&&ve._events.error?Array.isArray(ve._events.error)?ve._events.error.unshift(xe):ve._events.error=[xe,ve._events.error]:ve.on("error",xe)}(G,0,ce),G.once("close",me),G.once("finish",de),G.emit("pipe",W),X.flowing||(l("pipe resume"),W.resume()),G},w.prototype.unpipe=function(G){var V=this._readableState,W={hasUnpiped:!1};if(0===V.pipesCount)return this;if(1===V.pipesCount)return G&&G!==V.pipes||(G||(G=V.pipes),V.pipes=null,V.pipesCount=0,V.flowing=!1,G&&G.emit("unpipe",this,W)),this;if(!G){var X=V.pipes,K=V.pipesCount;V.pipes=null,V.pipesCount=0,V.flowing=!1;for(var re=0;re<K;re++)X[re].emit("unpipe",this,{hasUnpiped:!1});return this}var ee=J(V.pipes,G);return-1===ee||(V.pipes.splice(ee,1),V.pipesCount-=1,1===V.pipesCount&&(V.pipes=V.pipes[0]),G.emit("unpipe",this,W)),this},w.prototype.addListener=w.prototype.on=function(G,V){var W=b.prototype.on.call(this,G,V),X=this._readableState;return"data"===G?(X.readableListening=this.listenerCount("readable")>0,!1!==X.flowing&&this.resume()):"readable"===G&&(X.endEmitted||X.readableListening||(X.readableListening=X.needReadable=!0,X.flowing=!1,X.emittedReadable=!1,l("on readable",X.length,X.reading),X.length?L(this):X.reading||A.nextTick(z,this))),W},w.prototype.removeListener=function(G,V){var W=b.prototype.removeListener.call(this,G,V);return"readable"===G&&A.nextTick(U,this),W},w.prototype.removeAllListeners=function(G){var V=b.prototype.removeAllListeners.apply(this,arguments);return"readable"!==G&&void 0!==G||A.nextTick(U,this),V},w.prototype.resume=function(){var W,G=this._readableState;return G.flowing||(l("resume"),G.flowing=!G.readableListening,this,(W=G).resumeScheduled||(W.resumeScheduled=!0,A.nextTick(H,this,W))),G.paused=!1,this},w.prototype.pause=function(){return l("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(l("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},w.prototype.wrap=function(G){var V=this,W=this._readableState,X=!1;for(var K in G.on("end",function(){if(l("wrapped end"),W.decoder&&!W.ended){var ee=W.decoder.end();ee&&ee.length&&V.push(ee)}V.push(null)}),G.on("data",function(ee){l("wrapped data"),W.decoder&&(ee=W.decoder.write(ee)),W.objectMode&&null==ee||(W.objectMode||ee&&ee.length)&&(V.push(ee)||(X=!0,G.pause()))}),G)void 0===this[K]&&"function"==typeof G[K]&&(this[K]=function(ee){return function(){return G[ee].apply(G,arguments)}}(K));for(var re=0;re<h.length;re++)G.on(h[re],this.emit.bind(this,h[re]));return this._read=function(ee){l("wrapped _read",ee),X&&(X=!1,G.resume())},this},"function"==typeof Symbol&&(w.prototype[Symbol.asyncIterator]=function(){return void 0===r&&(r=e(68221)),r(this)}),Object.defineProperty(w.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(w.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(w.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(G){this._readableState&&(this._readableState.flowing=G)}}),w._fromList=N,Object.defineProperty(w.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(w.from=function(G,V){return void 0===n&&(n=e(31748)),n(w,G,V)})},74308:function($,R,e){"use strict";$.exports=t;var k=e(74322).q,A=k.ERR_METHOD_NOT_IMPLEMENTED,l=k.ERR_MULTIPLE_CALLBACK,T=k.ERR_TRANSFORM_ALREADY_TRANSFORMING,b=k.ERR_TRANSFORM_WITH_LENGTH_0,d=e(37865);function s(n,i){var a=this._transformState;a.transforming=!1;var c=a.writecb;if(null===c)return this.emit("error",new l);a.writechunk=null,a.writecb=null,null!=i&&this.push(i),c(n);var p=this._readableState;p.reading=!1,(p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}function t(n){if(!(this instanceof t))return new t(n);d.call(this,n),this._transformState={afterTransform:s.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,n&&("function"==typeof n.transform&&(this._transform=n.transform),"function"==typeof n.flush&&(this._flush=n.flush)),this.on("prefinish",o)}function o(){var n=this;"function"!=typeof this._flush||this._readableState.destroyed?r(this,null,null):this._flush(function(i,a){r(n,i,a)})}function r(n,i,a){if(i)return n.emit("error",i);if(null!=a&&n.push(a),n._writableState.length)throw new b;if(n._transformState.transforming)throw new T;return n.push(null)}e(42018)(t,d),t.prototype.push=function(n,i){return this._transformState.needTransform=!1,d.prototype.push.call(this,n,i)},t.prototype._transform=function(n,i,a){a(new A("_transform()"))},t.prototype._write=function(n,i,a){var c=this._transformState;if(c.writecb=a,c.writechunk=n,c.writeencoding=i,!c.transforming){var p=this._readableState;(c.needTransform||p.needReadable||p.length<p.highWaterMark)&&this._read(p.highWaterMark)}},t.prototype._read=function(n){var i=this._transformState;null===i.writechunk||i.transforming?i.needTransform=!0:(i.transforming=!0,this._transform(i.writechunk,i.writeencoding,i.afterTransform))},t.prototype._destroy=function(n,i){d.prototype._destroy.call(this,n,function(a){i(a)})}},37493:function($,R,e){"use strict";var k,A=e(90386);function l(P){var I=this;this.next=null,this.entry=null,this.finish=function(){!function(U,z,H){var F=U.entry;for(U.entry=null;F;){var N=F.callback;z.pendingcb--,N(void 0),F=F.next}z.corkedRequestsFree.next=U}(I,P)}}$.exports=w,w.WritableState=m;var T,b={deprecate:e(20588)},d=e(71405),s=e(12856).Buffer,t=e.g.Uint8Array||function(){},o=e(65756),r=e(56306).getHighWaterMark,n=e(74322).q,i=n.ERR_INVALID_ARG_TYPE,a=n.ERR_METHOD_NOT_IMPLEMENTED,c=n.ERR_MULTIPLE_CALLBACK,p=n.ERR_STREAM_CANNOT_PIPE,f=n.ERR_STREAM_DESTROYED,x=n.ERR_STREAM_NULL_VALUES,v=n.ERR_STREAM_WRITE_AFTER_END,g=n.ERR_UNKNOWN_ENCODING,y=o.errorOrDestroy;function h(){}function m(P,I,U){k=k||e(37865),"boolean"!=typeof U&&(U=I instanceof k),this.objectMode=!!(P=P||{}).objectMode,U&&(this.objectMode=this.objectMode||!!P.writableObjectMode),this.highWaterMark=r(this,P,"writableHighWaterMark",U),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1,this.decodeStrings=!(!1===P.decodeStrings),this.defaultEncoding=P.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(H){!function(F,N){var V,B=F._writableState,j=B.sync,J=B.writecb;if("function"!=typeof J)throw new c;if((V=B).writing=!1,V.writecb=null,V.length-=V.writelen,V.writelen=0,N)!function(V,W,X,K,re){--W.pendingcb,X?(A.nextTick(re,K),A.nextTick(C,V,W),V._writableState.errorEmitted=!0,y(V,K)):(re(K),V._writableState.errorEmitted=!0,y(V,K),C(V,W))}(F,B,j,N,J);else{var G=E(B)||F.destroyed;G||B.corked||B.bufferProcessing||!B.bufferedRequest||_(F,B),j?A.nextTick(S,F,B,G,J):S(F,B,G,J)}}(I,H)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==P.emitClose,this.autoDestroy=!!P.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new l(this)}function w(P){var I=this instanceof(k=k||e(37865));if(!I&&!T.call(w,this))return new w(P);this._writableState=new m(P,this,I),this.writable=!0,P&&("function"==typeof P.write&&(this._write=P.write),"function"==typeof P.writev&&(this._writev=P.writev),"function"==typeof P.destroy&&(this._destroy=P.destroy),"function"==typeof P.final&&(this._final=P.final)),d.call(this)}function u(P,I,U,z,H,F,N){I.writelen=z,I.writecb=N,I.writing=!0,I.sync=!0,I.destroyed?I.onwrite(new f("write")):U?P._writev(H,I.onwrite):P._write(H,F,I.onwrite),I.sync=!1}function S(P,I,U,z){var H,F;U||(H=P,0===(F=I).length&&F.needDrain&&(F.needDrain=!1,H.emit("drain"))),I.pendingcb--,z(),C(P,I)}function _(P,I){I.bufferProcessing=!0;var U=I.bufferedRequest;if(P._writev&&U&&U.next){var H=new Array(I.bufferedRequestCount),F=I.corkedRequestsFree;F.entry=U;for(var N=0,B=!0;U;)H[N]=U,U.isBuf||(B=!1),U=U.next,N+=1;H.allBuffers=B,u(P,I,!0,I.length,H,"",F.finish),I.pendingcb++,I.lastBufferedRequest=null,F.next?(I.corkedRequestsFree=F.next,F.next=null):I.corkedRequestsFree=new l(I),I.bufferedRequestCount=0}else{for(;U;){var j=U.chunk;if(u(P,I,!1,I.objectMode?1:j.length,j,U.encoding,U.callback),U=U.next,I.bufferedRequestCount--,I.writing)break}null===U&&(I.lastBufferedRequest=null)}I.bufferedRequest=U,I.bufferProcessing=!1}function E(P){return P.ending&&0===P.length&&null===P.bufferedRequest&&!P.finished&&!P.writing}function L(P,I){P._final(function(U){I.pendingcb--,U&&y(P,U),I.prefinished=!0,P.emit("prefinish"),C(P,I)})}function C(P,I){var H,F,U=E(I);if(U&&(H=P,(F=I).prefinished||F.finalCalled||("function"!=typeof H._final||F.destroyed?(F.prefinished=!0,H.emit("prefinish")):(F.pendingcb++,F.finalCalled=!0,A.nextTick(L,H,F))),0===I.pendingcb&&(I.finished=!0,P.emit("finish"),I.autoDestroy))){var z=P._readableState;(!z||z.autoDestroy&&z.endEmitted)&&P.destroy()}return U}e(42018)(w,d),m.prototype.getBuffer=function(){for(var P=this.bufferedRequest,I=[];P;)I.push(P),P=P.next;return I},function(){try{Object.defineProperty(m.prototype,"buffer",{get:b.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch{}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(T=Function.prototype[Symbol.hasInstance],Object.defineProperty(w,Symbol.hasInstance,{value:function(P){return!!T.call(this,P)||this===w&&P&&P._writableState instanceof m}})):T=function(P){return P instanceof this},w.prototype.pipe=function(){y(this,new p)},w.prototype.write=function(P,I,U){var z,B,j,J,H=this._writableState,F=!1,N=!H.objectMode&&(s.isBuffer(z=P)||z instanceof t);return N&&!s.isBuffer(P)&&(P=s.from(P)),"function"==typeof I&&(U=I,I=null),N?I="buffer":I||(I=H.defaultEncoding),"function"!=typeof U&&(U=h),H.ending?(B=this,j=U,J=new v,y(B,J),A.nextTick(j,J)):(N||function(B,j,J,G){var V;return null===J?V=new x:"string"==typeof J||j.objectMode||(V=new i("chunk",["string","Buffer"],J)),!V||(y(B,V),A.nextTick(G,V),!1)}(this,H,P,U))&&(H.pendingcb++,F=function(B,j,J,G,V,W){if(!J){var X=(oe=G,(ie=j).objectMode||!1===ie.decodeStrings||"string"!=typeof oe||(oe=s.from(oe,V)),oe);G!==X&&(J=!0,V="buffer",G=X)}var ie,oe,K=j.objectMode?1:G.length;j.length+=K;var re=j.length<j.highWaterMark;if(re||(j.needDrain=!0),j.writing||j.corked){var ee=j.lastBufferedRequest;j.lastBufferedRequest={chunk:G,encoding:V,isBuf:J,callback:W,next:null},ee?ee.next=j.lastBufferedRequest:j.bufferedRequest=j.lastBufferedRequest,j.bufferedRequestCount+=1}else u(B,j,!1,K,G,V,W);return re}(this,H,N,P,I,U)),F},w.prototype.cork=function(){this._writableState.corked++},w.prototype.uncork=function(){var P=this._writableState;P.corked&&(P.corked--,P.writing||P.corked||P.bufferProcessing||!P.bufferedRequest||_(this,P))},w.prototype.setDefaultEncoding=function(P){if("string"==typeof P&&(P=P.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((P+"").toLowerCase())>-1))throw new g(P);return this._writableState.defaultEncoding=P,this},Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),w.prototype._write=function(P,I,U){U(new a("_write()"))},w.prototype._writev=null,w.prototype.end=function(P,I,U){var H,F,N,z=this._writableState;return"function"==typeof P?(U=P,P=null,I=null):"function"==typeof I&&(U=I,I=null),null!=P&&this.write(P,I),z.corked&&(z.corked=1,this.uncork()),z.ending||(H=this,N=U,(F=z).ending=!0,C(H,F),N&&(F.finished?A.nextTick(N):H.once("finish",N)),F.ended=!0,H.writable=!1),this},Object.defineProperty(w.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(w.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(P){this._writableState&&(this._writableState.destroyed=P)}}),w.prototype.destroy=o.destroy,w.prototype._undestroy=o.undestroy,w.prototype._destroy=function(P,I){I(P)}},68221:function($,R,e){"use strict";var k,A=e(90386);function l(x,v,g){return v in x?Object.defineProperty(x,v,{value:g,enumerable:!0,configurable:!0,writable:!0}):x[v]=g,x}var T=e(12726),b=Symbol("lastResolve"),d=Symbol("lastReject"),s=Symbol("error"),t=Symbol("ended"),o=Symbol("lastPromise"),r=Symbol("handlePromise"),n=Symbol("stream");function i(x,v){return{value:x,done:v}}function a(x){var v=x[b];if(null!==v){var g=x[n].read();null!==g&&(x[o]=null,x[b]=null,x[d]=null,v(i(g,!1)))}}function c(x){A.nextTick(a,x)}var p=Object.getPrototypeOf(function(){}),f=Object.setPrototypeOf((l(k={get stream(){return this[n]},next:function(){var x=this,v=this[s];if(null!==v)return Promise.reject(v);if(this[t])return Promise.resolve(i(void 0,!0));if(this[n].destroyed)return new Promise(function(m,w){A.nextTick(function(){x[s]?w(x[s]):m(i(void 0,!0))})});var g,m,w,y=this[o];if(y)g=new Promise((m=y,w=this,function(u,S){m.then(function(){w[t]?u(i(void 0,!0)):w[r](u,S)},S)}));else{var h=this[n].read();if(null!==h)return Promise.resolve(i(h,!1));g=new Promise(this[r])}return this[o]=g,g}},Symbol.asyncIterator,function(){return this}),l(k,"return",function(){var x=this;return new Promise(function(v,g){x[n].destroy(null,function(y){y?g(y):v(i(void 0,!0))})})}),k),p);$.exports=function(x){var v,g=Object.create(f,(l(v={},n,{value:x,writable:!0}),l(v,b,{value:null,writable:!0}),l(v,d,{value:null,writable:!0}),l(v,s,{value:null,writable:!0}),l(v,t,{value:x._readableState.endEmitted,writable:!0}),l(v,r,{value:function(y,h){var m=g[n].read();m?(g[o]=null,g[b]=null,g[d]=null,y(i(m,!1))):(g[b]=y,g[d]=h)},writable:!0}),v));return g[o]=null,T(x,function(y){if(y&&"ERR_STREAM_PREMATURE_CLOSE"!==y.code){var h=g[d];return null!==h&&(g[o]=null,g[b]=null,g[d]=null,h(y)),void(g[s]=y)}var m=g[b];null!==m&&(g[o]=null,g[b]=null,g[d]=null,m(i(void 0,!0))),g[t]=!0}),x.on("readable",c.bind(null,g)),g}},31125:function($,R,e){"use strict";function k(s,t){var o=Object.keys(s);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(s);t&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(s,n).enumerable})),o.push.apply(o,r)}return o}function A(s,t,o){return t in s?Object.defineProperty(s,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):s[t]=o,s}var T=e(12856).Buffer,b=e(69862).inspect,d=b&&b.custom||"inspect";$.exports=function(){function s(){(function(r,n){if(!(r instanceof n))throw new TypeError("Cannot call a class as a function")})(this,s),this.head=null,this.tail=null,this.length=0}var o;return o=[{key:"push",value:function(r){var n={data:r,next:null};this.length>0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};0===this.length&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(0!==this.length){var r=this.head.data;return this.head=1===this.length?this.tail=null:this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(0===this.length)return"";for(var n=this.head,i=""+n.data;n=n.next;)i+=r+n.data;return i}},{key:"concat",value:function(r){if(0===this.length)return T.alloc(0);for(var c=T.allocUnsafe(r>>>0),p=this.head,f=0;p;)T.prototype.copy.call(p.data,c,f),f+=p.data.length,p=p.next;return c}},{key:"consume",value:function(r,n){var i;return r<this.head.data.length?(i=this.head.data.slice(0,r),this.head.data=this.head.data.slice(r)):i=r===this.head.data.length?this.shift():n?this._getString(r):this._getBuffer(r),i}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(r){var n=this.head,i=1,a=n.data;for(r-=a.length;n=n.next;){var c=n.data,p=r>c.length?c.length:r;if(a+=p===c.length?c:c.slice(0,r),0==(r-=p)){p===c.length?(++i,this.head=n.next?n.next:this.tail=null):(this.head=n,n.data=c.slice(p));break}++i}return this.length-=i,a}},{key:"_getBuffer",value:function(r){var n=T.allocUnsafe(r),i=this.head,a=1;for(i.data.copy(n),r-=i.data.length;i=i.next;){var c=i.data,p=r>c.length?c.length:r;if(c.copy(n,n.length-r,0,p),0==(r-=p)){p===c.length?(++a,this.head=i.next?i.next:this.tail=null):(this.head=i,i.data=c.slice(p));break}++a}return this.length-=a,n}},{key:d,value:function(r,n){return b(this,function(i){for(var a=1;a<arguments.length;a++){var c=null!=arguments[a]?arguments[a]:{};a%2?k(Object(c),!0).forEach(function(p){A(i,p,c[p])}):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(c)):k(Object(c)).forEach(function(p){Object.defineProperty(i,p,Object.getOwnPropertyDescriptor(c,p))})}return i}({},n,{depth:0,customInspect:!1}))}}],o&&function l(s,t){for(var o=0;o<t.length;o++){var r=t[o];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(s,r.key,r)}}(s.prototype,o),s}()},65756:function($,R,e){"use strict";var k=e(90386);function A(b,d){T(b,d),l(b)}function l(b){b._writableState&&!b._writableState.emitClose||b._readableState&&!b._readableState.emitClose||b.emit("close")}function T(b,d){b.emit("error",d)}$.exports={destroy:function(b,d){var s=this;return this._readableState&&this._readableState.destroyed||this._writableState&&this._writableState.destroyed?(d?d(b):b&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,k.nextTick(T,this,b)):k.nextTick(T,this,b)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(b||null,function(r){!d&&r?s._writableState?s._writableState.errorEmitted?k.nextTick(l,s):(s._writableState.errorEmitted=!0,k.nextTick(A,s,r)):k.nextTick(A,s,r):d?(k.nextTick(l,s),d(r)):k.nextTick(l,s)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(b,d){var s=b._readableState,t=b._writableState;s&&s.autoDestroy||t&&t.autoDestroy?b.destroy(d):b.emit("error",d)}}},12726:function($,R,e){"use strict";var k=e(74322).q.ERR_STREAM_PREMATURE_CLOSE;function A(){}$.exports=function l(T,b,d){if("function"==typeof b)return l(T,null,b);var x,v;b||(b={}),x=d||A,v=!1,d=function(){if(!v){v=!0;for(var g=arguments.length,y=new Array(g),h=0;h<g;h++)y[h]=arguments[h];x.apply(this,y)}};var s=b.readable||!1!==b.readable&&T.readable,t=b.writable||!1!==b.writable&&T.writable,o=function(){T.writable||n()},r=T._writableState&&T._writableState.finished,n=function(){t=!1,r=!0,s||d.call(T)},i=T._readableState&&T._readableState.endEmitted,a=function(){s=!1,i=!0,t||d.call(T)},c=function(x){d.call(T,x)},p=function(){var x;return s&&!i?(T._readableState&&T._readableState.ended||(x=new k),d.call(T,x)):t&&!r?(T._writableState&&T._writableState.ended||(x=new k),d.call(T,x)):void 0},f=function(){T.req.on("finish",n)};return function(x){return x.setHeader&&"function"==typeof x.abort}(T)?(T.on("complete",n),T.on("abort",p),T.req?f():T.on("request",f)):t&&!T._writableState&&(T.on("end",o),T.on("close",o)),T.on("end",a),T.on("finish",n),!1!==b.error&&T.on("error",c),T.on("close",p),function(){T.removeListener("complete",n),T.removeListener("abort",p),T.removeListener("request",f),T.req&&T.req.removeListener("finish",n),T.removeListener("end",o),T.removeListener("close",o),T.removeListener("finish",n),T.removeListener("end",a),T.removeListener("error",c),T.removeListener("close",p)}}},31748:function($){$.exports=function(){throw new Error("Readable.from is not available in the browser")}},10168:function($,R,e){"use strict";var k,A=e(74322).q,l=A.ERR_MISSING_ARGS,T=A.ERR_STREAM_DESTROYED;function b(r){if(r)throw r}function s(r){r()}function t(r,n){return r.pipe(n)}$.exports=function(){for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];var a,c=function o(r){return r.length?"function"!=typeof r[r.length-1]?b:r.pop():b}(n);if(Array.isArray(n[0])&&(n=n[0]),n.length<2)throw new l("streams");var p=n.map(function(f,x){var v=x<n.length-1;return function d(r,n,i,a){var f,x;f=a,x=!1,a=function(){x||(x=!0,f.apply(void 0,arguments))};var c=!1;r.on("close",function(){c=!0}),void 0===k&&(k=e(12726)),k(r,{readable:n,writable:i},function(f){if(f)return a(f);c=!0,a()});var p=!1;return function(f){if(!c&&!p)return p=!0,function(x){return x.setHeader&&"function"==typeof x.abort}(r)?r.abort():"function"==typeof r.destroy?r.destroy():void a(f||new T("pipe"))}}(f,v,x>0,function(g){a||(a=g),g&&p.forEach(s),v||(p.forEach(s),c(a))})});return n.reduce(t)}},56306:function($,R,e){"use strict";var k=e(74322).q.ERR_INVALID_OPT_VALUE;$.exports={getHighWaterMark:function(A,l,T,b){var s,d=null!=(s=l).highWaterMark?s.highWaterMark:b?s[T]:null;if(null!=d){if(!isFinite(d)||Math.floor(d)!==d||d<0)throw new k(b?T:"highWaterMark",d);return Math.floor(d)}return A.objectMode?16:16384}}},71405:function($,R,e){$.exports=e(15398).EventEmitter},68019:function($,R,e){"use strict";var k=e(71665).Buffer,A=k.isEncoding||function(i){switch((i=""+i)&&i.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function l(i){var a;switch(this.encoding=function(c){var p=function(f){if(!f)return"utf8";for(var x;;)switch(f){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return f;default:if(x)return;f=(""+f).toLowerCase(),x=!0}}(c);if("string"!=typeof p&&(k.isEncoding===A||!A(c)))throw new Error("Unknown encoding: "+c);return p||c}(i),this.encoding){case"utf16le":this.text=d,this.end=s,a=4;break;case"utf8":this.fillLast=b,a=4;break;case"base64":this.text=t,this.end=o,a=3;break;default:return this.write=r,void(this.end=n)}this.lastNeed=0,this.lastTotal=0,this.lastChar=k.allocUnsafe(a)}function T(i){return i<=127?0:i>>5==6?2:i>>4==14?3:i>>3==30?4:i>>6==2?-1:-2}function b(i){var a=this.lastTotal-this.lastNeed,c=function(p,f,x){if(128!=(192&f[0]))return p.lastNeed=0,"\ufffd";if(p.lastNeed>1&&f.length>1){if(128!=(192&f[1]))return p.lastNeed=1,"\ufffd";if(p.lastNeed>2&&f.length>2&&128!=(192&f[2]))return p.lastNeed=2,"\ufffd"}}(this,i);return void 0!==c?c:this.lastNeed<=i.length?(i.copy(this.lastChar,a,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(i.copy(this.lastChar,a,0,i.length),void(this.lastNeed-=i.length))}function d(i,a){if((i.length-a)%2==0){var c=i.toString("utf16le",a);if(c){var p=c.charCodeAt(c.length-1);if(p>=55296&&p<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1],c.slice(0,-1)}return c}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=i[i.length-1],i.toString("utf16le",a,i.length-1)}function s(i){var a=i&&i.length?this.write(i):"";return this.lastNeed?a+this.lastChar.toString("utf16le",0,this.lastTotal-this.lastNeed):a}function t(i,a){var c=(i.length-a)%3;return 0===c?i.toString("base64",a):(this.lastNeed=3-c,this.lastTotal=3,1===c?this.lastChar[0]=i[i.length-1]:(this.lastChar[0]=i[i.length-2],this.lastChar[1]=i[i.length-1]),i.toString("base64",a,i.length-c))}function o(i){var a=i&&i.length?this.write(i):"";return this.lastNeed?a+this.lastChar.toString("base64",0,3-this.lastNeed):a}function r(i){return i.toString(this.encoding)}function n(i){return i&&i.length?this.write(i):""}R.s=l,l.prototype.write=function(i){if(0===i.length)return"";var a,c;if(this.lastNeed){if(void 0===(a=this.fillLast(i)))return"";c=this.lastNeed,this.lastNeed=0}else c=0;return c<i.length?a?a+this.text(i,c):this.text(i,c):a||""},l.prototype.end=function(i){var a=i&&i.length?this.write(i):"";return this.lastNeed?a+"\ufffd":a},l.prototype.text=function(i,a){var c=function(f,x,v){var g=x.length-1;if(g<v)return 0;var y=T(x[g]);return y>=0?(y>0&&(f.lastNeed=y-1),y):--g<v||-2===y?0:(y=T(x[g]))>=0?(y>0&&(f.lastNeed=y-2),y):--g<v||-2===y?0:(y=T(x[g]))>=0?(y>0&&(2===y?y=0:f.lastNeed=y-3),y):0}(this,i,a);if(!this.lastNeed)return i.toString("utf8",a);this.lastTotal=c;var p=i.length-(c-this.lastNeed);return i.copy(this.lastChar,0,p),i.toString("utf8",a,p)},l.prototype.fillLast=function(i){if(this.lastNeed<=i.length)return i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);i.copy(this.lastChar,this.lastTotal-this.lastNeed,0,i.length),this.lastNeed-=i.length}},90715:function($,R,e){var k=e(32791),A=e(41633)("stream-parser");function l(i){A("initializing parser stream"),i._parserBytesLeft=0,i._parserBuffers=[],i._parserBuffered=0,i._parserState=-1,i._parserCallback=null,"function"==typeof i.push&&(i._parserOutput=i.push.bind(i)),i._parserInit=!0}function T(i,a){k(!this._parserCallback,'there is already a "callback" set!'),k(isFinite(i)&&i>0,'can only buffer a finite number of bytes > 0, got "'+i+'"'),this._parserInit||l(this),A("buffering %o bytes",i),this._parserBytesLeft=i,this._parserCallback=a,this._parserState=0}function b(i,a){k(!this._parserCallback,'there is already a "callback" set!'),k(i>0,'can only skip > 0 bytes, got "'+i+'"'),this._parserInit||l(this),A("skipping %o bytes",i),this._parserBytesLeft=i,this._parserCallback=a,this._parserState=1}function d(i,a){k(!this._parserCallback,'There is already a "callback" set!'),k(i>0,'can only pass through > 0 bytes, got "'+i+'"'),this._parserInit||l(this),A("passing through %o bytes",i),this._parserBytesLeft=i,this._parserCallback=a,this._parserState=2}function s(i,a,c){this._parserInit||l(this),A("write(%o bytes)",i.length),"function"==typeof a&&(c=a),r(this,i,null,c)}function t(i,a,c){this._parserInit||l(this),A("transform(%o bytes)",i.length),"function"!=typeof a&&(a=this._parserOutput),r(this,i,a,c)}function o(i,a,c,p){if(i._parserBytesLeft-=a.length,A("%o bytes left for stream piece",i._parserBytesLeft),0===i._parserState?(i._parserBuffers.push(a),i._parserBuffered+=a.length):2===i._parserState&&c(a),0!==i._parserBytesLeft)return p;var f=i._parserCallback;if(f&&0===i._parserState&&i._parserBuffers.length>1&&(a=Buffer.concat(i._parserBuffers,i._parserBuffered)),0!==i._parserState&&(a=null),i._parserCallback=null,i._parserBuffered=0,i._parserState=-1,i._parserBuffers.splice(0),f){var x=[];a&&x.push(a),c&&x.push(c);var v=f.length>x.length;v&&x.push(n(p));var g=f.apply(i,x);if(!v||p===g)return p}}$.exports=function(i){var a=i&&"function"==typeof i._transform;if(!(a||i&&"function"==typeof i._write))throw new Error("must pass a Writable or Transform stream in");A("extending Parser into stream"),i._bytes=T,i._skipBytes=b,a&&(i._passthrough=d),a?i._transform=t:i._write=s};var r=n(function i(a,c,p,f){return a._parserBytesLeft<=0?f(new Error("got data but not currently parsing anything")):c.length<=a._parserBytesLeft?function(){return o(a,c,p,f)}:function(){var x=c.slice(0,a._parserBytesLeft);return o(a,x,p,function(v){return v?f(v):c.length>x.length?function(){return i(a,c.slice(x.length),p,f)}:void 0})}});function n(i){return function(){for(var a=i.apply(this,arguments);"function"==typeof a;)a=a();return a}}},41633:function($,R,e){var k=e(90386);function A(){var l;try{l=R.storage.debug}catch{}return!l&&void 0!==k&&"env"in k&&(l=k.env.DEBUG),l}(R=$.exports=e(74469)).log=function(){return"object"==typeof console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)},R.formatArgs=function(l){var T=this.useColors;if(l[0]=(T?"%c":"")+this.namespace+(T?" %c":" ")+l[0]+(T?"%c ":" ")+"+"+R.humanize(this.diff),T){var b="color: "+this.color;l.splice(1,0,b,"color: inherit");var d=0,s=0;l[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(d++,"%c"===t&&(s=d))}),l.splice(s,0,b)}},R.save=function(l){try{null==l?R.storage.removeItem("debug"):R.storage.debug=l}catch{}},R.load=A,R.useColors=function(){return!(typeof window>"u"||!window.process||"renderer"!==window.process.type)||typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},R.storage=typeof chrome<"u"&&void 0!==chrome.storage?chrome.storage.local:function(){try{return window.localStorage}catch{}}(),R.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],R.formatters.j=function(l){try{return JSON.stringify(l)}catch(T){return"[UnexpectedJSONParseError]: "+T.message}},R.enable(A())},74469:function($,R,e){var k;function A(l){function T(){if(T.enabled){var b=T,d=+new Date;b.diff=d-(k||d),b.prev=k,b.curr=d,k=d;for(var t=new Array(arguments.length),o=0;o<t.length;o++)t[o]=arguments[o];t[0]=R.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var r=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(i,a){if("%%"===i)return i;r++;var c=R.formatters[a];return"function"==typeof c&&(i=c.call(b,t[r]),t.splice(r,1),r--),i}),R.formatArgs.call(b,t),(T.log||R.log||console.log.bind(console)).apply(b,t)}}return T.namespace=l,T.enabled=R.enabled(l),T.useColors=R.useColors(),T.color=function(b){var d,s=0;for(d in b)s=(s<<5)-s+b.charCodeAt(d),s|=0;return R.colors[Math.abs(s)%R.colors.length]}(l),"function"==typeof R.init&&R.init(T),T}(R=$.exports=A.debug=A.default=A).coerce=function(l){return l instanceof Error?l.stack||l.message:l},R.disable=function(){R.enable("")},R.enable=function(l){R.save(l),R.names=[],R.skips=[];for(var T=("string"==typeof l?l:"").split(/[\s,]+/),b=T.length,d=0;d<b;d++)T[d]&&("-"===(l=T[d].replace(/\*/g,".*?"))[0]?R.skips.push(new RegExp("^"+l.substr(1)+"$")):R.names.push(new RegExp("^"+l+"$")))},R.enabled=function(l){var T,b;for(T=0,b=R.skips.length;T<b;T++)if(R.skips[T].test(l))return!1;for(T=0,b=R.names.length;T<b;T++)if(R.names[T].test(l))return!0;return!1},R.humanize=e(11375),R.names=[],R.skips=[],R.formatters={}},11375:function($){var R=1e3,e=60*R,k=60*e,A=24*k;function l(T,b,d){if(!(T<b))return T<1.5*b?Math.floor(T/b)+" "+d:Math.ceil(T/b)+" "+d+"s"}$.exports=function(T,b){b=b||{};var d,t,s=typeof T;if("string"===s&&T.length>0)return function(t){if(!((t=String(t)).length>100)){var o=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(t);if(o){var r=parseFloat(o[1]);switch((o[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*r;case"days":case"day":case"d":return r*A;case"hours":case"hour":case"hrs":case"hr":case"h":return r*k;case"minutes":case"minute":case"mins":case"min":case"m":return r*e;case"seconds":case"second":case"secs":case"sec":case"s":return r*R;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}(T);if("number"===s&&!1===isNaN(T))return b.long?l(d=T,A,"day")||l(d,k,"hour")||l(d,e,"minute")||l(d,R,"second")||d+" ms":(t=T)>=A?Math.round(t/A)+"d":t>=k?Math.round(t/k)+"h":t>=e?Math.round(t/e)+"m":t>=R?Math.round(t/R)+"s":t+"ms";throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(T))}},99011:function($,R,e){"use strict";var k=e(88641);$.exports=function(A,l,T){if(null==A)throw Error("First argument should be a string");if(null==l)throw Error("Separator should be a string or a RegExp");T?("string"==typeof T||Array.isArray(T))&&(T={ignore:T}):T={},null==T.escape&&(T.escape=!0),null==T.ignore?T.ignore=["[]","()","{}","<>",'""',"''","``","\u201c\u201d","\xab\xbb"]:("string"==typeof T.ignore&&(T.ignore=[T.ignore]),T.ignore=T.ignore.map(function(n){return 1===n.length&&(n+=n),n}));var b=k.parse(A,{flat:!0,brackets:T.ignore}),d=b[0].split(l);if(T.escape){for(var s=[],t=0;t<d.length;t++){var o=d[t];"\\"===o[o.length-1]&&"\\"!==o[o.length-2]?(s.push(o+l+d[t+1]),t++):s.push(o)}d=s}for(t=0;t<d.length;t++)b[0]=d[t],d[t]=k.stringify(b,{flat:!0});return d}},68664:function($){"use strict";$.exports=function(R){for(var e=R.length,k=new Array(e),A=new Array(e),l=new Array(e),T=new Array(e),b=new Array(e),d=new Array(e),s=0;s<e;++s)k[s]=-1,A[s]=0,l[s]=!1,T[s]=0,b[s]=-1,d[s]=[];var t,o=0,r=[],n=[];function i(p){var f=[p],x=[p];for(k[p]=A[p]=o,l[p]=!0,o+=1;x.length>0;){var v=R[p=x[x.length-1]];if(T[p]<v.length){for(var g=T[p];g<v.length;++g){var y=v[g];if(k[y]<0){k[y]=A[y]=o,l[y]=!0,o+=1,f.push(y),x.push(y);break}l[y]&&(A[p]=0|Math.min(A[p],A[y])),b[y]>=0&&d[p].push(b[y])}T[p]=g}else{if(A[p]===k[p]){var h=[],m=[],w=0;for(g=f.length-1;g>=0;--g){var u=f[g];if(l[u]=!1,h.push(u),m.push(d[u]),w+=d[u].length,b[u]=r.length,u===p){f.length=g;break}}r.push(h);var S=new Array(w);for(g=0;g<m.length;g++)for(var _=0;_<m[g].length;_++)S[--w]=m[g][_];n.push(S)}x.pop()}}}for(s=0;s<e;++s)k[s]<0&&i(s);for(s=0;s<n.length;s++){var a=n[s];if(0!==a.length){a.sort(function(p,f){return p-f}),t=[a[0]];for(var c=1;c<a.length;c++)a[c]!==a[c-1]&&t.push(a[c]);n[s]=t}}return{components:r,adjacencyList:n}}},7095:function($,R,e){"use strict";e.r(R);var k=2*Math.PI,A=function(b,d,s,t,o,r,n){var i=b.x,a=b.y;return{x:t*(i*=d)-o*(a*=s)+r,y:o*i+t*a+n}},l=function(b,d){var s=1.5707963267948966===d?.551915024494:-1.5707963267948966===d?-.551915024494:1.3333333333333333*Math.tan(d/4),t=Math.cos(b),o=Math.sin(b),r=Math.cos(b+d),n=Math.sin(b+d);return[{x:t-o*s,y:o+t*s},{x:r+n*s,y:n-r*s},{x:r,y:n}]},T=function(b,d,s,t){var o=b*s+d*t;return o>1&&(o=1),o<-1&&(o=-1),(b*t-d*s<0?-1:1)*Math.acos(o)};R.default=function(b){var d=b.px,s=b.py,t=b.cx,o=b.cy,r=b.rx,n=b.ry,i=b.xAxisRotation,a=void 0===i?0:i,c=b.largeArcFlag,p=void 0===c?0:c,f=b.sweepFlag,x=void 0===f?0:f,v=[];if(0===r||0===n)return[];var g=Math.sin(a*k/360),y=Math.cos(a*k/360),h=y*(d-t)/2+g*(s-o)/2,m=-g*(d-t)/2+y*(s-o)/2;if(0===h&&0===m)return[];r=Math.abs(r),n=Math.abs(n);var w=Math.pow(h,2)/Math.pow(r,2)+Math.pow(m,2)/Math.pow(n,2);w>1&&(r*=Math.sqrt(w),n*=Math.sqrt(w));var S=function(z,H){if(Array.isArray(z))return z;if(Symbol.iterator in Object(z))return function(F,N){var B=[],j=!0,J=!1,G=void 0;try{for(var V,W=F[Symbol.iterator]();!(j=(V=W.next()).done)&&(B.push(V.value),4!==B.length);j=!0);}catch(X){J=!0,G=X}finally{try{!j&&W.return&&W.return()}finally{if(J)throw G}}return B}(z);throw new TypeError("Invalid attempt to destructure non-iterable instance")}(function(z,H,F,N,B,j,J,G,V,W,X,K){var re=Math.pow(B,2),ee=Math.pow(j,2),ie=Math.pow(X,2),oe=Math.pow(K,2),ce=re*ee-re*oe-ee*ie;ce<0&&(ce=0),ce/=re*oe+ee*ie;var me=(ce=Math.sqrt(ce)*(J===G?-1:1))*B/j*K,de=ce*-j/B*X,he=W*me-V*de+(z+F)/2,ve=V*me+W*de+(H+N)/2,Pe=(X-me)/B,xe=(K-de)/j,ke=(-X-me)/B,Ae=(-K-de)/j,Te=T(1,0,Pe,xe),Q=T(Pe,xe,ke,Ae);return 0===G&&Q>0&&(Q-=k),1===G&&Q<0&&(Q+=k),[he,ve,Te,Q]}(d,s,t,o,r,n,p,x,g,y,h,m)),_=S[0],E=S[1],L=S[2],C=S[3],P=Math.abs(C)/(k/4);Math.abs(1-P)<1e-7&&(P=1);var I=Math.max(Math.ceil(P),1);C/=I;for(var U=0;U<I;U++)v.push(l(L,C)),L+=C;return v.map(function(z){var H=A(z[0],r,n,y,g,_,E),F=H.x,N=H.y,B=A(z[1],r,n,y,g,_,E),j=B.x,J=B.y,G=A(z[2],r,n,y,g,_,E);return{x1:F,y1:N,x2:j,y2:J,x:G.x,y:G.y}})}},1750:function($,R,e){"use strict";var k=e(95616),A=e(65185),l=e(29988),T=e(89546),b=e(32791);$.exports=function(d){if(Array.isArray(d)&&1===d.length&&"string"==typeof d[0]&&(d=d[0]),"string"==typeof d&&(b(T(d),"String is not an SVG path."),d=k(d)),b(Array.isArray(d),"Argument should be a string or an array of path segments."),d=A(d),!(d=l(d)).length)return[0,0,0,0];for(var s=[1/0,1/0,-1/0,-1/0],t=0,o=d.length;t<o;t++)for(var r=d[t].slice(1),n=0;n<r.length;n+=2)r[n+0]<s[0]&&(s[0]=r[n+0]),r[n+1]<s[1]&&(s[1]=r[n+1]),r[n+0]>s[2]&&(s[2]=r[n+0]),r[n+1]>s[3]&&(s[3]=r[n+1]);return s}},29988:function($,R,e){"use strict";$.exports=function(T){for(var b,d=[],s=0,t=0,o=0,r=0,n=null,i=null,a=0,c=0,p=0,f=T.length;p<f;p++){var x=T[p],v=x[0];switch(v){case"M":o=x[1],r=x[2];break;case"A":var g=k({px:a,py:c,cx:x[6],cy:x[7],rx:x[1],ry:x[2],xAxisRotation:x[3],largeArcFlag:x[4],sweepFlag:x[5]});if(!g.length)continue;for(var y,h=0;h<g.length;h++)x=["C",(y=g[h]).x1,y.y1,y.x2,y.y2,y.x,y.y],h<g.length-1&&d.push(x);break;case"S":var m=a,w=c;"C"!=b&&"S"!=b||(m+=m-s,w+=w-t),x=["C",m,w,x[1],x[2],x[3],x[4]];break;case"T":"Q"==b||"T"==b?(n=2*a-n,i=2*c-i):(n=a,i=c),x=l(a,c,n,i,x[1],x[2]);break;case"Q":n=x[1],i=x[2],x=l(a,c,x[1],x[2],x[3],x[4]);break;case"L":x=A(a,c,x[1],x[2]);break;case"H":x=A(a,c,x[1],c);break;case"V":x=A(a,c,a,x[1]);break;case"Z":x=A(a,c,o,r)}b=v,a=x[x.length-2],c=x[x.length-1],x.length>4?(s=x[x.length-4],t=x[x.length-3]):(s=a,t=c),d.push(x)}return d};var k=e(7095);function A(T,b,d,s){return["C",T,b,d,s,d,s]}function l(T,b,d,s,t,o){return["C",T/3+.6666666666666666*d,b/3+.6666666666666666*s,t/3+.6666666666666666*d,o/3+.6666666666666666*s,t,o]}},82019:function($,R,e){"use strict";var k,A=e(1750),l=e(95616),T=e(31457),b=e(89546),d=e(44781),s=document.createElement("canvas"),t=s.getContext("2d");$.exports=function(o,r){if(!b(o))throw Error("Argument should be valid svg path string");var n,i;r||(r={}),r.shape?(n=r.shape[0],i=r.shape[1]):(n=s.width=r.w||r.width||200,i=s.height=r.h||r.height||200);var a=Math.min(n,i),c=r.stroke||0,p=r.viewbox||r.viewBox||A(o),f=[n/(p[2]-p[0]),i/(p[3]-p[1])],x=Math.min(f[0]||0,f[1]||0)/2;if(t.fillStyle="black",t.fillRect(0,0,n,i),t.fillStyle="white",c&&("number"!=typeof c&&(c=1),t.strokeStyle=c>0?"white":"black",t.lineWidth=Math.abs(c)),t.translate(.5*n,.5*i),t.scale(x,x),function(){if(null!=k)return k;var y=document.createElement("canvas").getContext("2d");if(y.canvas.width=y.canvas.height=1,!window.Path2D)return k=!1;var h=new Path2D("M0,0h1v1h-1v-1Z");y.fillStyle="black",y.fill(h);var m=y.getImageData(0,0,1,1);return k=m&&m.data&&255===m.data[3]}()){var v=new Path2D(o);t.fill(v),c&&t.stroke(v)}else{var g=l(o);T(t,g),t.fill(),c&&t.stroke()}return t.setTransform(1,0,0,1,0,0),d(t,{cutoff:null!=r.cutoff?r.cutoff:.5,radius:null!=r.radius?r.radius:.5*a})}},84267:function($,R,e){var k;!function(A){var l=/^\s+/,T=/\s+$/,b=0,d=A.round,s=A.min,t=A.max,o=A.random;function r(X,K){if(K=K||{},(X=X||"")instanceof r)return X;if(!(this instanceof r))return new r(X,K);var ee,oe,ce,me,de,he,ve,Pe,xe,ke,re=(me={r:0,g:0,b:0},de=1,he=null,ve=null,Pe=null,xe=!1,ke=!1,"string"==typeof(ee=X)&&(ee=function(Ae){Ae=Ae.replace(l,"").replace(T,"").toLowerCase();var Te,Q=!1;if(L[Ae])Ae=L[Ae],Q=!0;else if("transparent"==Ae)return{r:0,g:0,b:0,a:0,format:"name"};return(Te=V.rgb.exec(Ae))?{r:Te[1],g:Te[2],b:Te[3]}:(Te=V.rgba.exec(Ae))?{r:Te[1],g:Te[2],b:Te[3],a:Te[4]}:(Te=V.hsl.exec(Ae))?{h:Te[1],s:Te[2],l:Te[3]}:(Te=V.hsla.exec(Ae))?{h:Te[1],s:Te[2],l:Te[3],a:Te[4]}:(Te=V.hsv.exec(Ae))?{h:Te[1],s:Te[2],v:Te[3]}:(Te=V.hsva.exec(Ae))?{h:Te[1],s:Te[2],v:Te[3],a:Te[4]}:(Te=V.hex8.exec(Ae))?{r:z(Te[1]),g:z(Te[2]),b:z(Te[3]),a:B(Te[4]),format:Q?"name":"hex8"}:(Te=V.hex6.exec(Ae))?{r:z(Te[1]),g:z(Te[2]),b:z(Te[3]),format:Q?"name":"hex"}:(Te=V.hex4.exec(Ae))?{r:z(Te[1]+""+Te[1]),g:z(Te[2]+""+Te[2]),b:z(Te[3]+""+Te[3]),a:B(Te[4]+""+Te[4]),format:Q?"name":"hex8"}:!!(Te=V.hex3.exec(Ae))&&{r:z(Te[1]+""+Te[1]),g:z(Te[2]+""+Te[2]),b:z(Te[3]+""+Te[3]),format:Q?"name":"hex"}}(ee)),"object"==typeof ee&&(W(ee.r)&&W(ee.g)&&W(ee.b)?(oe=ee.g,ce=ee.b,me={r:255*I(ee.r,255),g:255*I(oe,255),b:255*I(ce,255)},xe=!0,ke="%"===String(ee.r).substr(-1)?"prgb":"rgb"):W(ee.h)&&W(ee.s)&&W(ee.v)?(he=F(ee.s),ve=F(ee.v),me=function(Ae,Te,Q){Ae=6*I(Ae,360),Te=I(Te,100),Q=I(Q,100);var se=A.floor(Ae),fe=Ae-se,ye=Q*(1-Te),Me=Q*(1-fe*Te),Ie=Q*(1-(1-fe)*Te),Ce=se%6;return{r:255*[Q,Me,ye,ye,Ie,Q][Ce],g:255*[Ie,Q,Q,Me,ye,ye][Ce],b:255*[ye,ye,Ie,Q,Q,Me][Ce]}}(ee.h,he,ve),xe=!0,ke="hsv"):W(ee.h)&&W(ee.s)&&W(ee.l)&&(he=F(ee.s),Pe=F(ee.l),me=function(Ae,Te,Q){var se,fe,ye;function Me(Re,le,ge){return ge<0&&(ge+=1),ge>1&&(ge-=1),ge<1/6?Re+6*(le-Re)*ge:ge<.5?le:ge<2/3?Re+(le-Re)*(2/3-ge)*6:Re}if(Ae=I(Ae,360),Te=I(Te,100),Q=I(Q,100),0===Te)se=fe=ye=Q;else{var Ie=Q<.5?Q*(1+Te):Q+Te-Q*Te,Ce=2*Q-Ie;se=Me(Ce,Ie,Ae+1/3),fe=Me(Ce,Ie,Ae),ye=Me(Ce,Ie,Ae-1/3)}return{r:255*se,g:255*fe,b:255*ye}}(ee.h,he,Pe),xe=!0,ke="hsl"),ee.hasOwnProperty("a")&&(de=ee.a)),de=P(de),{ok:xe,format:ee.format||ke,r:s(255,t(me.r,0)),g:s(255,t(me.g,0)),b:s(255,t(me.b,0)),a:de});this._originalInput=X,this._r=re.r,this._g=re.g,this._b=re.b,this._a=re.a,this._roundA=d(100*this._a)/100,this._format=K.format||re.format,this._gradientType=K.gradientType,this._r<1&&(this._r=d(this._r)),this._g<1&&(this._g=d(this._g)),this._b<1&&(this._b=d(this._b)),this._ok=re.ok,this._tc_id=b++}function n(X,K,re){X=I(X,255),K=I(K,255),re=I(re,255);var ee,ie,oe=t(X,K,re),ce=s(X,K,re),me=(oe+ce)/2;if(oe==ce)ee=ie=0;else{var de=oe-ce;switch(ie=me>.5?de/(2-oe-ce):de/(oe+ce),oe){case X:ee=(K-re)/de+(K<re?6:0);break;case K:ee=(re-X)/de+2;break;case re:ee=(X-K)/de+4}ee/=6}return{h:ee,s:ie,l:me}}function i(X,K,re){X=I(X,255),K=I(K,255),re=I(re,255);var ee,ie,oe=t(X,K,re),ce=s(X,K,re),me=oe,de=oe-ce;if(ie=0===oe?0:de/oe,oe==ce)ee=0;else{switch(oe){case X:ee=(K-re)/de+(K<re?6:0);break;case K:ee=(re-X)/de+2;break;case re:ee=(X-K)/de+4}ee/=6}return{h:ee,s:ie,v:me}}function a(X,K,re,ee){var ie=[H(d(X).toString(16)),H(d(K).toString(16)),H(d(re).toString(16))];return ee&&ie[0].charAt(0)==ie[0].charAt(1)&&ie[1].charAt(0)==ie[1].charAt(1)&&ie[2].charAt(0)==ie[2].charAt(1)?ie[0].charAt(0)+ie[1].charAt(0)+ie[2].charAt(0):ie.join("")}function c(X,K,re,ee){return[H(N(ee)),H(d(X).toString(16)),H(d(K).toString(16)),H(d(re).toString(16))].join("")}function p(X,K){K=0===K?0:K||10;var re=r(X).toHsl();return re.s-=K/100,re.s=U(re.s),r(re)}function f(X,K){K=0===K?0:K||10;var re=r(X).toHsl();return re.s+=K/100,re.s=U(re.s),r(re)}function x(X){return r(X).desaturate(100)}function v(X,K){K=0===K?0:K||10;var re=r(X).toHsl();return re.l+=K/100,re.l=U(re.l),r(re)}function g(X,K){K=0===K?0:K||10;var re=r(X).toRgb();return re.r=t(0,s(255,re.r-d(-K/100*255))),re.g=t(0,s(255,re.g-d(-K/100*255))),re.b=t(0,s(255,re.b-d(-K/100*255))),r(re)}function y(X,K){K=0===K?0:K||10;var re=r(X).toHsl();return re.l-=K/100,re.l=U(re.l),r(re)}function h(X,K){var re=r(X).toHsl(),ee=(re.h+K)%360;return re.h=ee<0?360+ee:ee,r(re)}function m(X){var K=r(X).toHsl();return K.h=(K.h+180)%360,r(K)}function w(X){var K=r(X).toHsl(),re=K.h;return[r(X),r({h:(re+120)%360,s:K.s,l:K.l}),r({h:(re+240)%360,s:K.s,l:K.l})]}function u(X){var K=r(X).toHsl(),re=K.h;return[r(X),r({h:(re+90)%360,s:K.s,l:K.l}),r({h:(re+180)%360,s:K.s,l:K.l}),r({h:(re+270)%360,s:K.s,l:K.l})]}function S(X){var K=r(X).toHsl(),re=K.h;return[r(X),r({h:(re+72)%360,s:K.s,l:K.l}),r({h:(re+216)%360,s:K.s,l:K.l})]}function _(X,K,re){K=K||6,re=re||30;var ee=r(X).toHsl(),ie=360/re,oe=[r(X)];for(ee.h=(ee.h-(ie*K>>1)+720)%360;--K;)ee.h=(ee.h+ie)%360,oe.push(r(ee));return oe}function E(X,K){K=K||6;for(var re=r(X).toHsv(),ee=re.h,ie=re.s,oe=re.v,ce=[],me=1/K;K--;)ce.push(r({h:ee,s:ie,v:oe})),oe=(oe+me)%1;return ce}r.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 X=this.toRgb();return(299*X.r+587*X.g+114*X.b)/1e3},getLuminance:function(){var X,K,re,ee=this.toRgb();return K=ee.g/255,re=ee.b/255,.2126*((X=ee.r/255)<=.03928?X/12.92:A.pow((X+.055)/1.055,2.4))+.7152*(K<=.03928?K/12.92:A.pow((K+.055)/1.055,2.4))+.0722*(re<=.03928?re/12.92:A.pow((re+.055)/1.055,2.4))},setAlpha:function(X){return this._a=P(X),this._roundA=d(100*this._a)/100,this},toHsv:function(){var X=i(this._r,this._g,this._b);return{h:360*X.h,s:X.s,v:X.v,a:this._a}},toHsvString:function(){var X=i(this._r,this._g,this._b),K=d(360*X.h),re=d(100*X.s),ee=d(100*X.v);return 1==this._a?"hsv("+K+", "+re+"%, "+ee+"%)":"hsva("+K+", "+re+"%, "+ee+"%, "+this._roundA+")"},toHsl:function(){var X=n(this._r,this._g,this._b);return{h:360*X.h,s:X.s,l:X.l,a:this._a}},toHslString:function(){var X=n(this._r,this._g,this._b),K=d(360*X.h),re=d(100*X.s),ee=d(100*X.l);return 1==this._a?"hsl("+K+", "+re+"%, "+ee+"%)":"hsla("+K+", "+re+"%, "+ee+"%, "+this._roundA+")"},toHex:function(X){return a(this._r,this._g,this._b,X)},toHexString:function(X){return"#"+this.toHex(X)},toHex8:function(X){return re=this._g,ee=this._b,ie=this._a,oe=X,ce=[H(d(this._r).toString(16)),H(d(re).toString(16)),H(d(ee).toString(16)),H(N(ie))],oe&&ce[0].charAt(0)==ce[0].charAt(1)&&ce[1].charAt(0)==ce[1].charAt(1)&&ce[2].charAt(0)==ce[2].charAt(1)&&ce[3].charAt(0)==ce[3].charAt(1)?ce[0].charAt(0)+ce[1].charAt(0)+ce[2].charAt(0)+ce[3].charAt(0):ce.join("");var re,ee,ie,oe,ce},toHex8String:function(X){return"#"+this.toHex8(X)},toRgb:function(){return{r:d(this._r),g:d(this._g),b:d(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+d(this._r)+", "+d(this._g)+", "+d(this._b)+")":"rgba("+d(this._r)+", "+d(this._g)+", "+d(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:d(100*I(this._r,255))+"%",g:d(100*I(this._g,255))+"%",b:d(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+d(100*I(this._r,255))+"%, "+d(100*I(this._g,255))+"%, "+d(100*I(this._b,255))+"%)":"rgba("+d(100*I(this._r,255))+"%, "+d(100*I(this._g,255))+"%, "+d(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(C[a(this._r,this._g,this._b,!0)]||!1)},toFilter:function(X){var K="#"+c(this._r,this._g,this._b,this._a),re=K,ee=this._gradientType?"GradientType = 1, ":"";if(X){var ie=r(X);re="#"+c(ie._r,ie._g,ie._b,ie._a)}return"progid:DXImageTransform.Microsoft.gradient("+ee+"startColorstr="+K+",endColorstr="+re+")"},toString:function(X){var K=!!X;X=X||this._format;var re=!1;return K||!(this._a<1&&this._a>=0)||"hex"!==X&&"hex6"!==X&&"hex3"!==X&&"hex4"!==X&&"hex8"!==X&&"name"!==X?("rgb"===X&&(re=this.toRgbString()),"prgb"===X&&(re=this.toPercentageRgbString()),"hex"!==X&&"hex6"!==X||(re=this.toHexString()),"hex3"===X&&(re=this.toHexString(!0)),"hex4"===X&&(re=this.toHex8String(!0)),"hex8"===X&&(re=this.toHex8String()),"name"===X&&(re=this.toName()),"hsl"===X&&(re=this.toHslString()),"hsv"===X&&(re=this.toHsvString()),re||this.toHexString()):"name"===X&&0===this._a?this.toName():this.toRgbString()},clone:function(){return r(this.toString())},_applyModification:function(X,K){var re=X.apply(null,[this].concat([].slice.call(K)));return this._r=re._r,this._g=re._g,this._b=re._b,this.setAlpha(re._a),this},lighten:function(){return this._applyModification(v,arguments)},brighten:function(){return this._applyModification(g,arguments)},darken:function(){return this._applyModification(y,arguments)},desaturate:function(){return this._applyModification(p,arguments)},saturate:function(){return this._applyModification(f,arguments)},greyscale:function(){return this._applyModification(x,arguments)},spin:function(){return this._applyModification(h,arguments)},_applyCombination:function(X,K){return X.apply(null,[this].concat([].slice.call(K)))},analogous:function(){return this._applyCombination(_,arguments)},complement:function(){return this._applyCombination(m,arguments)},monochromatic:function(){return this._applyCombination(E,arguments)},splitcomplement:function(){return this._applyCombination(S,arguments)},triad:function(){return this._applyCombination(w,arguments)},tetrad:function(){return this._applyCombination(u,arguments)}},r.fromRatio=function(X,K){if("object"==typeof X){var re={};for(var ee in X)X.hasOwnProperty(ee)&&(re[ee]="a"===ee?X[ee]:F(X[ee]));X=re}return r(X,K)},r.equals=function(X,K){return!(!X||!K)&&r(X).toRgbString()==r(K).toRgbString()},r.random=function(){return r.fromRatio({r:o(),g:o(),b:o()})},r.mix=function(X,K,re){re=0===re?0:re||50;var ee=r(X).toRgb(),ie=r(K).toRgb(),oe=re/100;return r({r:(ie.r-ee.r)*oe+ee.r,g:(ie.g-ee.g)*oe+ee.g,b:(ie.b-ee.b)*oe+ee.b,a:(ie.a-ee.a)*oe+ee.a})},r.readability=function(X,K){var re=r(X),ee=r(K);return(A.max(re.getLuminance(),ee.getLuminance())+.05)/(A.min(re.getLuminance(),ee.getLuminance())+.05)},r.isReadable=function(X,K,re){var ee,ie,oe,ce,me,de=r.readability(X,K);switch(ie=!1,(oe=re,"AA"!==(ce=((oe=oe||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==ce&&(ce="AA"),"small"!==(me=(oe.size||"small").toLowerCase())&&"large"!==me&&(me="small"),ee={level:ce,size:me}).level+ee.size){case"AAsmall":case"AAAlarge":ie=de>=4.5;break;case"AAlarge":ie=de>=3;break;case"AAAsmall":ie=de>=7}return ie},r.mostReadable=function(X,K,re){var ee,ie,oe,ce,me=null,de=0;ie=(re=re||{}).includeFallbackColors,oe=re.level,ce=re.size;for(var he=0;he<K.length;he++)(ee=r.readability(X,K[he]))>de&&(de=ee,me=r(K[he]));return r.isReadable(X,me,{level:oe,size:ce})||!ie?me:(re.includeFallbackColors=!1,r.mostReadable(X,["#fff","#000"],re))};var L=r.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"},C=r.hexNames=function(X){var K={};for(var re in X)X.hasOwnProperty(re)&&(K[X[re]]=re);return K}(L);function P(X){return X=parseFloat(X),(isNaN(X)||X<0||X>1)&&(X=1),X}function I(X,K){var ee;"string"==typeof(ee=X)&&-1!=ee.indexOf(".")&&1===parseFloat(ee)&&(X="100%");var re=function(ee){return"string"==typeof ee&&-1!=ee.indexOf("%")}(X);return X=s(K,t(0,parseFloat(X))),re&&(X=parseInt(X*K,10)/100),A.abs(X-K)<1e-6?1:X%K/parseFloat(K)}function U(X){return s(1,t(0,X))}function z(X){return parseInt(X,16)}function H(X){return 1==X.length?"0"+X:""+X}function F(X){return X<=1&&(X=100*X+"%"),X}function N(X){return A.round(255*parseFloat(X)).toString(16)}function B(X){return z(X)/255}var j,J,G,V=(J="[\\s|\\(]+("+(j="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",G="[\\s|\\(]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")[,|\\s]+("+j+")\\s*\\)?",{CSS_UNIT:new RegExp(j),rgb:new RegExp("rgb"+J),rgba:new RegExp("rgba"+G),hsl:new RegExp("hsl"+J),hsla:new RegExp("hsla"+G),hsv:new RegExp("hsv"+J),hsva:new RegExp("hsva"+G),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 W(X){return!!V.CSS_UNIT.exec(X)}$.exports?$.exports=r:void 0===(k=function(){return r}.call(R,e,R,$))||($.exports=k)}(Math)},57060:function($){"use strict";$.exports=e,$.exports.float32=$.exports.float=e,$.exports.fract32=$.exports.fract=function(k,A){if(k.length){if(k instanceof Float32Array)return new Float32Array(k.length);A instanceof Float32Array||(A=e(k));for(var l=0,T=A.length;l<T;l++)A[l]=k[l]-A[l];return A}return e(k-e(k))};var R=new Float32Array(1);function e(k){return k.length?k instanceof Float32Array?k:new Float32Array(k):(R[0]=k,R[0])}},75686:function($,R,e){"use strict";var k=e(25677);function A(T,b){var d=k(getComputedStyle(T).getPropertyValue(b));return d[0]*l(d[1],T)}function l(T,b){switch(b=b||document.body,T=(T||"px").trim().toLowerCase(),b!==window&&b!==document||(b=document.body),T){case"%":return b.clientHeight/100;case"ch":case"ex":return function(d,s){var t=document.createElement("div");t.style["font-size"]="128"+d,s.appendChild(t);var o=A(t,"font-size")/128;return s.removeChild(t),o}(T,b);case"em":return A(b,"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 96;case"cm":return 37.79527559055118;case"mm":return 3.7795275590551185;case"pt":return 1.3333333333333333;case"pc":return 16}return 1}$.exports=l},96892:function($,R,e){"use strict";function k(T){return T}function A(T,b){return"string"==typeof b&&(b=T.objects[b]),"GeometryCollection"===b.type?{type:"FeatureCollection",features:b.geometries.map(function(d){return l(T,d)})}:l(T,b)}function l(T,b){var d=b.id,s=b.bbox,t=null==b.properties?{}:b.properties,o=function(r,n){var i=function(g){if(null==g)return k;var y,h,m=g.scale[0],w=g.scale[1],u=g.translate[0],S=g.translate[1];return function(_,E){E||(y=h=0);var L=2,C=_.length,P=new Array(C);for(P[0]=(y+=_[0])*m+u,P[1]=(h+=_[1])*w+S;L<C;)P[L]=_[L],++L;return P}}(r.transform),a=r.arcs;function c(g,y){y.length&&y.pop();for(var h=a[g<0?~g:g],m=0,w=h.length;m<w;++m)y.push(i(h[m],m));g<0&&function(u,S){for(var _,E=u.length,L=E-S;L<--E;)_=u[L],u[L++]=u[E],u[E]=_}(y,w)}function p(g){return i(g)}function f(g){for(var y=[],h=0,m=g.length;h<m;++h)c(g[h],y);return y.length<2&&y.push(y[0]),y}function x(g){for(var y=f(g);y.length<4;)y.push(y[0]);return y}function v(g){return g.map(x)}return function g(y){var h,m=y.type;switch(m){case"GeometryCollection":return{type:m,geometries:y.geometries.map(g)};case"Point":h=p(y.coordinates);break;case"MultiPoint":h=y.coordinates.map(p);break;case"LineString":h=f(y.arcs);break;case"MultiLineString":h=y.arcs.map(f);break;case"Polygon":h=v(y.arcs);break;case"MultiPolygon":h=y.arcs.map(v);break;default:return null}return{type:m,coordinates:h}}(n)}(T,b);return null==d&&null==s?{type:"Feature",properties:t,geometry:o}:null==s?{type:"Feature",id:d,properties:t,geometry:o}:{type:"Feature",id:d,bbox:s,properties:t,geometry:o}}e.d(R,{zL:function(){return A}})},73116:function($,R,e){"use strict";var k=e(24511);$.exports=function(A){if("function"!=typeof A||!hasOwnProperty.call(A,"length"))return!1;try{if("number"!=typeof A.length||"function"!=typeof A.call||"function"!=typeof A.apply)return!1}catch{return!1}return!k(A)}},69190:function($,R,e){"use strict";var k=e(24582),A=e(47403),l=e(9234),T=e(6048),b=function(d,s){return d.replace("%v",T(s))};$.exports=function(d,s,t){if(!A(t))throw new TypeError(b(s,d));if(!k(d)){if("default"in t)return t.default;if(t.isOptional)return null}var o=l(t.errorMessage);throw k(o)||(o=s),new TypeError(b(o,d))}},18497:function($){"use strict";$.exports=function(R){try{return R.toString()}catch{try{return String(R)}catch{return null}}}},6048:function($,R,e){"use strict";var k=e(18497),A=/[\n\r\u2028\u2029]/g;$.exports=function(l){var T=k(l);return null===T?"<Non-coercible to string value>":(T.length>100&&(T=T.slice(0,99)+"\u2026"),T=T.replace(A,function(b){switch(b){case"\n":return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}))}},47403:function($,R,e){"use strict";var k=e(24582),A={object:!0,function:!0,undefined:!0};$.exports=function(l){return!!k(l)&&hasOwnProperty.call(A,typeof l)}},82527:function($,R,e){"use strict";var k=e(69190),A=e(84985);$.exports=function(l){return A(l)?l:k(l,"%v is not a plain function",arguments[1])}},84985:function($,R,e){"use strict";var k=e(73116),A=/^\s*class[\s{/}]/,l=Function.prototype.toString;$.exports=function(T){return!!k(T)&&!A.test(l.call(T))}},24511:function($,R,e){"use strict";var k=e(47403);$.exports=function(A){if(!k(A))return!1;try{return!!A.constructor&&A.constructor.prototype===A}catch{return!1}}},9234:function($,R,e){"use strict";var k=e(24582),A=e(47403),l=Object.prototype.toString;$.exports=function(T){if(!k(T))return null;if(A(T)){var b=T.toString;if("function"!=typeof b||b===l)return null}try{return""+T}catch{return null}}},10424:function($,R,e){"use strict";var k=e(69190),A=e(24582);$.exports=function(l){return A(l)?l:k(l,"Cannot use %v",arguments[1])}},24582:function($){"use strict";$.exports=function(R){return null!=R}},58404:function($,R,e){"use strict";var k=e(13547),A=e(12129),l=e(12856).Buffer;e.g.__TYPEDARRAY_POOL||(e.g.__TYPEDARRAY_POOL={UINT8:A([32,0]),UINT16:A([32,0]),UINT32:A([32,0]),BIGUINT64:A([32,0]),INT8:A([32,0]),INT16:A([32,0]),INT32:A([32,0]),BIGINT64:A([32,0]),FLOAT:A([32,0]),DOUBLE:A([32,0]),DATA:A([32,0]),UINT8C:A([32,0]),BUFFER:A([32,0])});var T=typeof Uint8ClampedArray<"u",b=typeof BigUint64Array<"u",d=typeof BigInt64Array<"u",s=e.g.__TYPEDARRAY_POOL;s.UINT8C||(s.UINT8C=A([32,0])),s.BIGUINT64||(s.BIGUINT64=A([32,0])),s.BIGINT64||(s.BIGINT64=A([32,0])),s.BUFFER||(s.BUFFER=A([32,0]));var t=s.DATA,o=s.BUFFER;function r(S){if(S){var E=k.log2(S.length||S.byteLength);t[E].push(S)}}function n(S){S=k.nextPow2(S);var _=k.log2(S),E=t[_];return E.length>0?E.pop():new ArrayBuffer(S)}function i(S){return new Uint8Array(n(S),0,S)}function a(S){return new Uint16Array(n(2*S),0,S)}function c(S){return new Uint32Array(n(4*S),0,S)}function p(S){return new Int8Array(n(S),0,S)}function f(S){return new Int16Array(n(2*S),0,S)}function x(S){return new Int32Array(n(4*S),0,S)}function v(S){return new Float32Array(n(4*S),0,S)}function g(S){return new Float64Array(n(8*S),0,S)}function y(S){return T?new Uint8ClampedArray(n(S),0,S):i(S)}function h(S){return b?new BigUint64Array(n(8*S),0,S):null}function m(S){return d?new BigInt64Array(n(8*S),0,S):null}function w(S){return new DataView(n(S),0,S)}function u(S){S=k.nextPow2(S);var _=k.log2(S),E=o[_];return E.length>0?E.pop():new l(S)}R.free=function(S){if(l.isBuffer(S))o[k.log2(S.length)].push(S);else{if("[object ArrayBuffer]"!==Object.prototype.toString.call(S)&&(S=S.buffer),!S)return;var E=0|k.log2(S.length||S.byteLength);t[E].push(S)}},R.freeUint8=R.freeUint16=R.freeUint32=R.freeBigUint64=R.freeInt8=R.freeInt16=R.freeInt32=R.freeBigInt64=R.freeFloat32=R.freeFloat=R.freeFloat64=R.freeDouble=R.freeUint8Clamped=R.freeDataView=function(S){r(S.buffer)},R.freeArrayBuffer=r,R.freeBuffer=function(S){o[k.log2(S.length)].push(S)},R.malloc=function(S,_){if(void 0===_||"arraybuffer"===_)return n(S);switch(_){case"uint8":return i(S);case"uint16":return a(S);case"uint32":return c(S);case"int8":return p(S);case"int16":return f(S);case"int32":return x(S);case"float":case"float32":return v(S);case"double":case"float64":return g(S);case"uint8_clamped":return y(S);case"bigint64":return m(S);case"biguint64":return h(S);case"buffer":return u(S);case"data":case"dataview":return w(S);default:return null}return null},R.mallocArrayBuffer=n,R.mallocUint8=i,R.mallocUint16=a,R.mallocUint32=c,R.mallocInt8=p,R.mallocInt16=f,R.mallocInt32=x,R.mallocFloat32=R.mallocFloat=v,R.mallocFloat64=R.mallocDouble=g,R.mallocUint8Clamped=y,R.mallocBigUint64=h,R.mallocBigInt64=m,R.mallocDataView=w,R.mallocBuffer=u,R.clearCache=function(){for(var S=0;S<32;++S)s.UINT8[S].length=0,s.UINT16[S].length=0,s.UINT32[S].length=0,s.INT8[S].length=0,s.INT16[S].length=0,s.INT32[S].length=0,s.FLOAT[S].length=0,s.DOUBLE[S].length=0,s.BIGUINT64[S].length=0,s.BIGINT64[S].length=0,s.UINT8C[S].length=0,t[S].length=0,o[S].length=0}},90448:function($){var R=/[\'\"]/;$.exports=function(e){return e?(R.test(e.charAt(0))&&(e=e.substr(1)),R.test(e.charAt(e.length-1))&&(e=e.substr(0,e.length-1)),e):""}},93447:function($){"use strict";$.exports=function(R,e,k){Array.isArray(k)||(k=[].slice.call(arguments,2));for(var A=0,l=k.length;A<l;A++){var T=k[A];for(var b in T)if((void 0===e[b]||Array.isArray(e[b])||R[b]!==e[b])&&b in e){var d;if(!0===T[b])d=e[b];else if(!1===T[b]||"function"==typeof T[b]&&void 0===(d=T[b](e[b],R,e)))continue;R[b]=d}}return R}},20588:function($,R,e){function k(A){try{if(!e.g.localStorage)return!1}catch{return!1}var l=e.g.localStorage[A];return null!=l&&"true"===String(l).toLowerCase()}$.exports=function(A,l){if(k("noDeprecation"))return A;var T=!1;return function(){if(!T){if(k("throwDeprecation"))throw new Error(l);k("traceDeprecation")?console.trace(l):console.warn(l),T=!0}return A.apply(this,arguments)}}},45920:function($){$.exports=function(R){return R&&"object"==typeof R&&"function"==typeof R.copy&&"function"==typeof R.fill&&"function"==typeof R.readUInt8}},4936:function($,R,e){"use strict";var k=e(47216),A=e(65481),l=e(21099),T=e(9187);function b(I){return I.call.bind(I)}var d=typeof BigInt<"u",s=typeof Symbol<"u",t=b(Object.prototype.toString),o=b(Number.prototype.valueOf),r=b(String.prototype.valueOf),n=b(Boolean.prototype.valueOf);if(d)var i=b(BigInt.prototype.valueOf);if(s)var a=b(Symbol.prototype.valueOf);function c(I,U){if("object"!=typeof I)return!1;try{return U(I),!0}catch{return!1}}function p(I){return"[object Map]"===t(I)}function f(I){return"[object Set]"===t(I)}function x(I){return"[object WeakMap]"===t(I)}function v(I){return"[object WeakSet]"===t(I)}function g(I){return"[object ArrayBuffer]"===t(I)}function y(I){return typeof ArrayBuffer<"u"&&(g.working?g(I):I instanceof ArrayBuffer)}function h(I){return"[object DataView]"===t(I)}function m(I){return typeof DataView<"u"&&(h.working?h(I):I instanceof DataView)}R.isArgumentsObject=k,R.isGeneratorFunction=A,R.isTypedArray=T,R.isPromise=function(I){return typeof Promise<"u"&&I instanceof Promise||null!==I&&"object"==typeof I&&"function"==typeof I.then&&"function"==typeof I.catch},R.isArrayBufferView=function(I){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView?ArrayBuffer.isView(I):T(I)||m(I)},R.isUint8Array=function(I){return"Uint8Array"===l(I)},R.isUint8ClampedArray=function(I){return"Uint8ClampedArray"===l(I)},R.isUint16Array=function(I){return"Uint16Array"===l(I)},R.isUint32Array=function(I){return"Uint32Array"===l(I)},R.isInt8Array=function(I){return"Int8Array"===l(I)},R.isInt16Array=function(I){return"Int16Array"===l(I)},R.isInt32Array=function(I){return"Int32Array"===l(I)},R.isFloat32Array=function(I){return"Float32Array"===l(I)},R.isFloat64Array=function(I){return"Float64Array"===l(I)},R.isBigInt64Array=function(I){return"BigInt64Array"===l(I)},R.isBigUint64Array=function(I){return"BigUint64Array"===l(I)},p.working=typeof Map<"u"&&p(new Map),R.isMap=function(I){return typeof Map<"u"&&(p.working?p(I):I instanceof Map)},f.working=typeof Set<"u"&&f(new Set),R.isSet=function(I){return typeof Set<"u"&&(f.working?f(I):I instanceof Set)},x.working=typeof WeakMap<"u"&&x(new WeakMap),R.isWeakMap=function(I){return typeof WeakMap<"u"&&(x.working?x(I):I instanceof WeakMap)},v.working=typeof WeakSet<"u"&&v(new WeakSet),R.isWeakSet=function(I){return v(I)},g.working=typeof ArrayBuffer<"u"&&g(new ArrayBuffer),R.isArrayBuffer=y,h.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&h(new DataView(new ArrayBuffer(1),0,1)),R.isDataView=m;var w=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function u(I){return"[object SharedArrayBuffer]"===t(I)}function S(I){return void 0!==w&&(void 0===u.working&&(u.working=u(new w)),u.working?u(I):I instanceof w)}function _(I){return c(I,o)}function E(I){return c(I,r)}function L(I){return c(I,n)}function C(I){return d&&c(I,i)}function P(I){return s&&c(I,a)}R.isSharedArrayBuffer=S,R.isAsyncFunction=function(I){return"[object AsyncFunction]"===t(I)},R.isMapIterator=function(I){return"[object Map Iterator]"===t(I)},R.isSetIterator=function(I){return"[object Set Iterator]"===t(I)},R.isGeneratorObject=function(I){return"[object Generator]"===t(I)},R.isWebAssemblyCompiledModule=function(I){return"[object WebAssembly.Module]"===t(I)},R.isNumberObject=_,R.isStringObject=E,R.isBooleanObject=L,R.isBigIntObject=C,R.isSymbolObject=P,R.isBoxedPrimitive=function(I){return _(I)||E(I)||L(I)||C(I)||P(I)},R.isAnyArrayBuffer=function(I){return typeof Uint8Array<"u"&&(y(I)||S(I))},["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(I){Object.defineProperty(R,I,{enumerable:!1,value:function(){throw new Error(I+" is not supported in userland")}})})},43827:function($,R,e){var k=e(90386),A=Object.getOwnPropertyDescriptors||function(I){for(var U=Object.keys(I),z={},H=0;H<U.length;H++)z[U[H]]=Object.getOwnPropertyDescriptor(I,U[H]);return z},l=/%[sdj%]/g;R.format=function(I){if(!x(I)){for(var U=[],z=0;z<arguments.length;z++)U.push(s(arguments[z]));return U.join(" ")}z=1;for(var H=arguments,F=H.length,N=String(I).replace(l,function(j){if("%%"===j)return"%";if(z>=F)return j;switch(j){case"%s":return String(H[z++]);case"%d":return Number(H[z++]);case"%j":try{return JSON.stringify(H[z++])}catch{return"[Circular]"}default:return j}}),B=H[z];z<F;B=H[++z])p(B)||!y(B)?N+=" "+B:N+=" "+s(B);return N},R.deprecate=function(I,U){if(void 0!==k&&!0===k.noDeprecation)return I;if(void 0===k)return function(){return R.deprecate(I,U).apply(this,arguments)};var z=!1;return function(){if(!z){if(k.throwDeprecation)throw new Error(U);k.traceDeprecation?console.trace(U):console.error(U),z=!0}return I.apply(this,arguments)}};var T={},b=/^$/;if(k.env.NODE_DEBUG){var d=k.env.NODE_DEBUG;d=d.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),b=new RegExp("^"+d+"$","i")}function s(I,U){var z={seen:[],stylize:o};return arguments.length>=3&&(z.depth=arguments[2]),arguments.length>=4&&(z.colors=arguments[3]),c(U)?z.showHidden=U:U&&R._extend(z,U),v(z.showHidden)&&(z.showHidden=!1),v(z.depth)&&(z.depth=2),v(z.colors)&&(z.colors=!1),v(z.customInspect)&&(z.customInspect=!0),z.colors&&(z.stylize=t),r(z,I,z.depth)}function t(I,U){var z=s.styles[U];return z?"\x1b["+s.colors[z][0]+"m"+I+"\x1b["+s.colors[z][1]+"m":I}function o(I,U){return I}function r(I,U,z){if(I.customInspect&&U&&w(U.inspect)&&U.inspect!==R.inspect&&(!U.constructor||U.constructor.prototype!==U)){var H=U.inspect(z,I);return x(H)||(H=r(I,H,z)),H}var F=function(X,K){if(v(K))return X.stylize("undefined","undefined");if(x(K)){var re="'"+JSON.stringify(K).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return X.stylize(re,"string")}return f(K)?X.stylize(""+K,"number"):c(K)?X.stylize(""+K,"boolean"):p(K)?X.stylize("null","null"):void 0}(I,U);if(F)return F;var K,N=Object.keys(U),B=(K={},N.forEach(function(re,ee){K[re]=!0}),K);if(I.showHidden&&(N=Object.getOwnPropertyNames(U)),m(U)&&(N.indexOf("message")>=0||N.indexOf("description")>=0))return n(U);if(0===N.length){if(w(U))return I.stylize("[Function"+(U.name?": "+U.name:"")+"]","special");if(g(U))return I.stylize(RegExp.prototype.toString.call(U),"regexp");if(h(U))return I.stylize(Date.prototype.toString.call(U),"date");if(m(U))return n(U)}var J,G="",V=!1,W=["{","}"];return a(U)&&(V=!0,W=["[","]"]),w(U)&&(G=" [Function"+(U.name?": "+U.name:"")+"]"),g(U)&&(G=" "+RegExp.prototype.toString.call(U)),h(U)&&(G=" "+Date.prototype.toUTCString.call(U)),m(U)&&(G=" "+n(U)),0!==N.length||V&&0!=U.length?z<0?g(U)?I.stylize(RegExp.prototype.toString.call(U),"regexp"):I.stylize("[Object]","special"):(I.seen.push(U),J=V?function(X,K,re,ee,ie){for(var oe=[],ce=0,me=K.length;ce<me;++ce)L(K,String(ce))?oe.push(i(X,K,re,ee,String(ce),!0)):oe.push("");return ie.forEach(function(de){de.match(/^\d+$/)||oe.push(i(X,K,re,ee,de,!0))}),oe}(I,U,z,B,N):N.map(function(X){return i(I,U,z,B,X,V)}),I.seen.pop(),function(X,K,re){return X.reduce(function(ee,ie){return ie.indexOf("\n"),ee+ie.replace(/\u001b\[\d\d?m/g,"").length+1},0)>60?re[0]+(""===K?"":K+"\n ")+" "+X.join(",\n  ")+" "+re[1]:re[0]+K+" "+X.join(", ")+" "+re[1]}(J,G,W)):W[0]+G+W[1]}function n(I){return"["+Error.prototype.toString.call(I)+"]"}function i(I,U,z,H,F,N){var B,j,J;if((J=Object.getOwnPropertyDescriptor(U,F)||{value:U[F]}).get?j=I.stylize(J.set?"[Getter/Setter]":"[Getter]","special"):J.set&&(j=I.stylize("[Setter]","special")),L(H,F)||(B="["+F+"]"),j||(I.seen.indexOf(J.value)<0?(j=p(z)?r(I,J.value,null):r(I,J.value,z-1)).indexOf("\n")>-1&&(j=N?j.split("\n").map(function(G){return"  "+G}).join("\n").slice(2):"\n"+j.split("\n").map(function(G){return"   "+G}).join("\n")):j=I.stylize("[Circular]","special")),v(B)){if(N&&F.match(/^\d+$/))return j;(B=JSON.stringify(""+F)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(B=B.slice(1,-1),B=I.stylize(B,"name")):(B=B.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),B=I.stylize(B,"string"))}return B+": "+j}function a(I){return Array.isArray(I)}function c(I){return"boolean"==typeof I}function p(I){return null===I}function f(I){return"number"==typeof I}function x(I){return"string"==typeof I}function v(I){return void 0===I}function g(I){return y(I)&&"[object RegExp]"===u(I)}function y(I){return"object"==typeof I&&null!==I}function h(I){return y(I)&&"[object Date]"===u(I)}function m(I){return y(I)&&("[object Error]"===u(I)||I instanceof Error)}function w(I){return"function"==typeof I}function u(I){return Object.prototype.toString.call(I)}function S(I){return I<10?"0"+I.toString(10):I.toString(10)}R.debuglog=function(I){if(I=I.toUpperCase(),!T[I])if(b.test(I)){var U=k.pid;T[I]=function(){var z=R.format.apply(R,arguments);console.error("%s %d: %s",I,U,z)}}else T[I]=function(){};return T[I]},R.inspect=s,s.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]},s.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},R.types=e(4936),R.isArray=a,R.isBoolean=c,R.isNull=p,R.isNullOrUndefined=function(I){return null==I},R.isNumber=f,R.isString=x,R.isSymbol=function(I){return"symbol"==typeof I},R.isUndefined=v,R.isRegExp=g,R.types.isRegExp=g,R.isObject=y,R.isDate=h,R.types.isDate=h,R.isError=m,R.types.isNativeError=m,R.isFunction=w,R.isPrimitive=function(I){return null===I||"boolean"==typeof I||"number"==typeof I||"string"==typeof I||"symbol"==typeof I||void 0===I},R.isBuffer=e(45920);var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function L(I,U){return Object.prototype.hasOwnProperty.call(I,U)}R.log=function(){console.log("%s - %s",function E(){var I=new Date,U=[S(I.getHours()),S(I.getMinutes()),S(I.getSeconds())].join(":");return[I.getDate(),_[I.getMonth()],U].join(" ")}(),R.format.apply(R,arguments))},R.inherits=e(42018),R._extend=function(I,U){if(!U||!y(U))return I;for(var z=Object.keys(U),H=z.length;H--;)I[z[H]]=U[z[H]];return I};var C=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;function P(I,U){if(!I){var z=new Error("Promise was rejected with a falsy value");z.reason=I,I=z}return U(I)}R.promisify=function(I){if("function"!=typeof I)throw new TypeError('The "original" argument must be of type Function');if(C&&I[C]){var U;if("function"!=typeof(U=I[C]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(U,C,{value:U,enumerable:!1,writable:!1,configurable:!0}),U}function U(){for(var z,H,F=new Promise(function(j,J){z=j,H=J}),N=[],B=0;B<arguments.length;B++)N.push(arguments[B]);N.push(function(j,J){j?H(j):z(J)});try{I.apply(this,N)}catch(j){H(j)}return F}return Object.setPrototypeOf(U,Object.getPrototypeOf(I)),C&&Object.defineProperty(U,C,{value:U,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(U,A(I))},R.promisify.custom=C,R.callbackify=function(I){if("function"!=typeof I)throw new TypeError('The "original" argument must be of type Function');function U(){for(var z=[],H=0;H<arguments.length;H++)z.push(arguments[H]);var F=z.pop();if("function"!=typeof F)throw new TypeError("The last argument must be of type Function");var N=this,B=function(){return F.apply(N,arguments)};I.apply(this,z).then(function(j){k.nextTick(B.bind(null,null,j))},function(j){k.nextTick(P.bind(null,j,B))})}return Object.setPrototypeOf(U,Object.getPrototypeOf(I)),Object.defineProperties(U,A(I)),U}},40372:function($,R,e){var k=e(86249);$.exports=function(A){return k("webgl",A)}},21099:function($,R,e){"use strict";var k=e(86165),A=e(72077),l=e(92978),T=l("Object.prototype.toString"),b=e(57877)()&&"symbol"==typeof Symbol.toStringTag,d=A(),s=l("String.prototype.slice"),t={},o=e(67295),r=Object.getPrototypeOf;b&&o&&r&&k(d,function(i){if("function"==typeof e.g[i]){var a=new e.g[i];if(!(Symbol.toStringTag in a))throw new EvalError("this engine has support for Symbol.toStringTag, but "+i+" does not have the property! Please report this.");var c=r(a),p=o(c,Symbol.toStringTag);if(!p){var f=r(c);p=o(f,Symbol.toStringTag)}t[i]=p.get}});var n=e(9187);$.exports=function(i){return!!n(i)&&(b?(a=i,c=!1,k(t,function(p,f){if(!c)try{var x=p.call(a);x===f&&(c=x)}catch{}}),c):s(T(i),8,-1));var a,c}},3961:function($,R,e){var k=e(63489),A=e(56131),l=k.instance();function T(n){this.local=this.regionalOptions[n||""]||this.regionalOptions[""]}A(T.prototype=new k.baseCalendar,{name:"Chinese",jdEpoch:1721425.5,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(n,i){if("string"==typeof n){var a=n.match(d);return a?a[0]:""}var c=this._validateYear(n),p=n.month(),f=""+this.toChineseMonth(c,p);return i&&f.length<2&&(f="0"+f),this.isIntercalaryMonth(c,p)&&(f+="i"),f},monthNames:function(n){if("string"==typeof n){var i=n.match(s);return i?i[0]:""}var a=this._validateYear(n),c=n.month(),p=["\u4e00\u6708","\u4e8c\u6708","\u4e09\u6708","\u56db\u6708","\u4e94\u6708","\u516d\u6708","\u4e03\u6708","\u516b\u6708","\u4e5d\u6708","\u5341\u6708","\u5341\u4e00\u6708","\u5341\u4e8c\u6708"][this.toChineseMonth(a,c)-1];return this.isIntercalaryMonth(a,c)&&(p="\u95f0"+p),p},monthNamesShort:function(n){if("string"==typeof n){var i=n.match(t);return i?i[0]:""}var a=this._validateYear(n),c=n.month(),p=["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"][this.toChineseMonth(a,c)-1];return this.isIntercalaryMonth(a,c)&&(p="\u95f0"+p),p},parseMonth:function(n,i){n=this._validateYear(n);var a,c=parseInt(i);if(isNaN(c))"\u95f0"===i[0]&&(a=!0,i=i.substring(1)),"\u6708"===i[i.length-1]&&(i=i.substring(0,i.length-1)),c=1+["\u4e00","\u4e8c","\u4e09","\u56db","\u4e94","\u516d","\u4e03","\u516b","\u4e5d","\u5341","\u5341\u4e00","\u5341\u4e8c"].indexOf(i);else{var p=i[i.length-1];a="i"===p||"I"===p}return this.toMonthIndex(n,c,a)},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(n,i){if(n.year&&(n=n.year()),"number"!=typeof n||n<1888||n>2111)throw i.replace(/\{0\}/,this.local.name);return n},toMonthIndex:function(n,i,a){var c=this.intercalaryMonth(n);if(a&&i!==c||i<1||i>12)throw k.local.invalidMonth.replace(/\{0\}/,this.local.name);return c?!a&&i<=c?i-1:i:i-1},toChineseMonth:function(n,i){n.year&&(i=(n=n.year()).month());var a=this.intercalaryMonth(n);if(i<0||i>(a?12:11))throw k.local.invalidMonth.replace(/\{0\}/,this.local.name);return a?i<a?i+1:i:i+1},intercalaryMonth:function(n){return n=this._validateYear(n),o[n-o[0]]>>13},isIntercalaryMonth:function(n,i){n.year&&(i=(n=n.year()).month());var a=this.intercalaryMonth(n);return!!a&&a===i},leapYear:function(n){return 0!==this.intercalaryMonth(n)},weekOfYear:function(n,i,a){var c,p=this._validateYear(n,k.local.invalidyear),f=r[p-r[0]];(c=l.newDate(f>>9&4095,f>>5&15,31&f)).add(4-(c.dayOfWeek()||7),"d");var y=this.toJD(n,i,a)-c.toJD();return 1+Math.floor(y/7)},monthsInYear:function(n){return this.leapYear(n)?13:12},daysInMonth:function(n,i){n.year&&(i=n.month(),n=n.year()),n=this._validateYear(n);var a=o[n-o[0]];if(i>(a>>13?12:11))throw k.local.invalidMonth.replace(/\{0\}/,this.local.name);return a&1<<12-i?30:29},weekDay:function(n,i,a){return(this.dayOfWeek(n,i,a)||7)<6},toJD:function(n,i,a){var c=this._validate(n,f,a,k.local.invalidDate);n=this._validateYear(c.year()),i=c.month(),a=c.day();var p=this.isIntercalaryMonth(n,i),f=this.toChineseMonth(n,i),x=function(v,g,y,h,m){var w,u,S;if("object"==typeof v)u=v,w=g||{};else{var _;if(!("number"==typeof v&&v>=1888&&v<=2111))throw new Error("Lunar year outside range 1888-2111");if(!("number"==typeof g&&g>=1&&g<=12))throw new Error("Lunar month outside range 1 - 12");if(!("number"==typeof y&&y>=1&&y<=30))throw new Error("Lunar day outside range 1 - 30");"object"==typeof h?(_=!1,w=h):(_=!!h,w={}),u={year:v,month:g,day:y,isIntercalary:_}}S=u.day-1;var E,L=o[u.year-o[0]],C=L>>13;E=C&&(u.month>C||u.isIntercalary)?u.month:u.month-1;for(var P=0;P<E;P++)S+=L&1<<12-P?30:29;var I=r[u.year-r[0]],U=new Date(I>>9&4095,(I>>5&15)-1,(31&I)+S);return w.year=U.getFullYear(),w.month=1+U.getMonth(),w.day=U.getDate(),w}(n,f,a,p);return l.toJD(x.year,x.month,x.day)},fromJD:function(n){var i=l.fromJD(n),a=function(p,f,x,v){var g,y;if("object"==typeof p)g=p,y=f||{};else{if(!("number"==typeof p&&p>=1888&&p<=2111))throw new Error("Solar year outside range 1888-2111");if(!("number"==typeof f&&f>=1&&f<=12))throw new Error("Solar month outside range 1 - 12");if(!("number"==typeof x&&x>=1&&x<=31))throw new Error("Solar day outside range 1 - 31");g={year:p,month:f,day:x},y={}}var h=r[g.year-r[0]];y.year=(g.year<<9|g.month<<5|g.day)>=h?g.year:g.year-1,h=r[y.year-r[0]];var w,u=new Date(h>>9&4095,(h>>5&15)-1,31&h),S=new Date(g.year,g.month-1,g.day);w=Math.round((S-u)/864e5);var _,E=o[y.year-o[0]];for(_=0;_<13;_++){var L=E&1<<12-_?30:29;if(w<L)break;w-=L}var C=E>>13;return!C||_<C?(y.isIntercalary=!1,y.month=1+_):_===C?(y.isIntercalary=!0,y.month=_):(y.isIntercalary=!1,y.month=_),y.day=1+w,y}(i.year(),i.month(),i.day()),c=this.toMonthIndex(a.year,a.month,a.isIntercalary);return this.newDate(a.year,c,a.day)},fromString:function(n){var i=n.match(b),a=this._validateYear(+i[1]),f=this.toMonthIndex(a,+i[2],!!i[3]);return this.newDate(a,f,+i[4])},add:function(n,i,a){var c=n.year(),p=n.month(),f=this.isIntercalaryMonth(c,p),x=this.toChineseMonth(c,p),v=Object.getPrototypeOf(T.prototype).add.call(this,n,i,a);if("y"===a){var g=v.year(),y=v.month(),h=this.isIntercalaryMonth(g,x),m=this.toMonthIndex(g,x,!(!f||!h));m!==y&&v.month(m)}return v}});var b=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,d=/^\d?\d[iI]?/m,s=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?\u6708/m,t=/^\u95f0?\u5341?[\u4e00\u4e8c\u4e09\u56db\u4e94\u516d\u4e03\u516b\u4e5d]?/m;k.calendars.chinese=T;var o=[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],r=[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]},38751:function($,R,e){var k=e(63489);function l(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}e(56131)(l.prototype=new k.baseCalendar,{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 b=this._validate(T,this.minMonth,this.minDay,k.local.invalidYear);return(T=b.year()+(b.year()<0?1:0))%4==3||T%4==-1},monthsInYear:function(T){return this._validate(T,this.minMonth,this.minDay,k.local.invalidYear||k.regionalOptions[""].invalidYear),13},weekOfYear:function(T,b,d){var s=this.newDate(T,b,d);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(T,b){var d=this._validate(T,b,this.minDay,k.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(13===d.month()&&this.leapYear(d.year())?1:0)},weekDay:function(T,b,d){return(this.dayOfWeek(T,b,d)||7)<6},toJD:function(T,b,d){var s=this._validate(T,b,d,k.local.invalidDate);return(T=s.year())<0&&T++,s.day()+30*(s.month()-1)+365*(T-1)+Math.floor(T/4)+this.jdEpoch-1},fromJD:function(T){var b=Math.floor(T)+.5-this.jdEpoch,d=Math.floor((b-Math.floor((b+366)/1461))/365)+1;d<=0&&d--,b=Math.floor(T)+.5-this.newDate(d,1,1).toJD();var s=Math.floor(b/30)+1;return this.newDate(d,s,b-30*(s-1)+1)}}),k.calendars.coptic=l},86825:function($,R,e){var k=e(63489);function l(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}e(56131)(l.prototype=new k.baseCalendar,{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(b){return this._validate(b,this.minMonth,this.minDay,k.local.invalidYear),!1},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,k.local.invalidYear),13},daysInYear:function(b){return this._validate(b,this.minMonth,this.minDay,k.local.invalidYear),400},weekOfYear:function(b,d,s){var t=this.newDate(b,d,s);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/8)+1},daysInMonth:function(b,d){var s=this._validate(b,d,this.minDay,k.local.invalidMonth);return this.daysPerMonth[s.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(b,d,s){return(this._validate(b,d,s,k.local.invalidDate).day()+1)%8},weekDay:function(b,d,s){var t=this.dayOfWeek(b,d,s);return t>=2&&t<=6},extraInfo:function(b,d,s){var t=this._validate(b,d,s,k.local.invalidDate);return{century:T[Math.floor((t.year()-1)/100)+1]||""}},toJD:function(b,d,s){var t=this._validate(b,d,s,k.local.invalidDate);return b=t.year()+(t.year()<0?1:0),d=t.month(),(s=t.day())+(d>1?16:0)+(d>2?32*(d-2):0)+400*(b-1)+this.jdEpoch-1},fromJD:function(b){b=Math.floor(b+.5)-Math.floor(this.jdEpoch)-1;var d=Math.floor(b/400)+1;b-=400*(d-1),b+=b>15?16:0;var s=Math.floor(b/32)+1;return this.newDate(d<=0?d-1:d,s,b-32*(s-1)+1)}});var T={20:"Fruitbat",21:"Anchovy"};k.calendars.discworld=l},37715:function($,R,e){var k=e(63489);function l(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}e(56131)(l.prototype=new k.baseCalendar,{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 b=this._validate(T,this.minMonth,this.minDay,k.local.invalidYear);return(T=b.year()+(b.year()<0?1:0))%4==3||T%4==-1},monthsInYear:function(T){return this._validate(T,this.minMonth,this.minDay,k.local.invalidYear||k.regionalOptions[""].invalidYear),13},weekOfYear:function(T,b,d){var s=this.newDate(T,b,d);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(T,b){var d=this._validate(T,b,this.minDay,k.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(13===d.month()&&this.leapYear(d.year())?1:0)},weekDay:function(T,b,d){return(this.dayOfWeek(T,b,d)||7)<6},toJD:function(T,b,d){var s=this._validate(T,b,d,k.local.invalidDate);return(T=s.year())<0&&T++,s.day()+30*(s.month()-1)+365*(T-1)+Math.floor(T/4)+this.jdEpoch-1},fromJD:function(T){var b=Math.floor(T)+.5-this.jdEpoch,d=Math.floor((b-Math.floor((b+366)/1461))/365)+1;d<=0&&d--,b=Math.floor(T)+.5-this.newDate(d,1,1).toJD();var s=Math.floor(b/30)+1;return this.newDate(d,s,b-30*(s-1)+1)}}),k.calendars.ethiopian=l},99384:function($,R,e){var k=e(63489);function l(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}function T(b,d){return b-d*Math.floor(b/d)}e(56131)(l.prototype=new k.baseCalendar,{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(b){var d=this._validate(b,this.minMonth,this.minDay,k.local.invalidYear);return this._leapYear(d.year())},_leapYear:function(b){return T(7*(b=b<0?b+1:b)+1,19)<7},monthsInYear:function(b){return this._validate(b,this.minMonth,this.minDay,k.local.invalidYear),this._leapYear(b.year?b.year():b)?13:12},weekOfYear:function(b,d,s){var t=this.newDate(b,d,s);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(b){return b=this._validate(b,this.minMonth,this.minDay,k.local.invalidYear).year(),this.toJD(-1===b?1:b+1,7,1)-this.toJD(b,7,1)},daysInMonth:function(b,d){return b.year&&(d=b.month(),b=b.year()),this._validate(b,d,this.minDay,k.local.invalidMonth),12===d&&this.leapYear(b)||8===d&&5===T(this.daysInYear(b),10)?30:9===d&&3===T(this.daysInYear(b),10)?29:this.daysPerMonth[d-1]},weekDay:function(b,d,s){return 6!==this.dayOfWeek(b,d,s)},extraInfo:function(b,d,s){var t=this._validate(b,d,s,k.local.invalidDate);return{yearType:(this.leapYear(t)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(t)%10-3]}},toJD:function(b,d,s){var t=this._validate(b,d,s,k.local.invalidDate);b=t.year(),d=t.month(),s=t.day();var o=b<=0?b+1:b,r=this.jdEpoch+this._delay1(o)+this._delay2(o)+s+1;if(d<7){for(var n=7;n<=this.monthsInYear(b);n++)r+=this.daysInMonth(b,n);for(n=1;n<d;n++)r+=this.daysInMonth(b,n)}else for(n=7;n<d;n++)r+=this.daysInMonth(b,n);return r},_delay1:function(b){var d=Math.floor((235*b-234)/19),t=29*d+Math.floor((12084+13753*d)/25920);return T(3*(t+1),7)<3&&t++,t},_delay2:function(b){var d=this._delay1(b-1),s=this._delay1(b);return this._delay1(b+1)-s==356?2:s-d==382?1:0},fromJD:function(b){b=Math.floor(b)+.5;for(var d=Math.floor(98496*(b-this.jdEpoch)/35975351)-1;b>=this.toJD(-1===d?1:d+1,7,1);)d++;for(var s=b<this.toJD(d,1,1)?7:1;b>this.toJD(d,s,this.daysInMonth(d,s));)s++;var t=b-this.toJD(d,s,1)+1;return this.newDate(d,s,t)}}),k.calendars.hebrew=l},43805:function($,R,e){var k=e(63489);function l(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}e(56131)(l.prototype=new k.baseCalendar,{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\u012bs","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,k.local.invalidYear).year()+14)%30<11},weekOfYear:function(T,b,d){var s=this.newDate(T,b,d);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInYear:function(T){return this.leapYear(T)?355:354},daysInMonth:function(T,b){var d=this._validate(T,b,this.minDay,k.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(12===d.month()&&this.leapYear(d.year())?1:0)},weekDay:function(T,b,d){return 5!==this.dayOfWeek(T,b,d)},toJD:function(T,b,d){var s=this._validate(T,b,d,k.local.invalidDate);return T=s.year(),b=s.month(),T=T<=0?T+1:T,(d=s.day())+Math.ceil(29.5*(b-1))+354*(T-1)+Math.floor((3+11*T)/30)+this.jdEpoch-1},fromJD:function(T){T=Math.floor(T)+.5;var b=Math.floor((30*(T-this.jdEpoch)+10646)/10631);b=b<=0?b-1:b;var d=Math.min(12,Math.ceil((T-29-this.toJD(b,1,1))/29.5)+1),s=T-this.toJD(b,d,1)+1;return this.newDate(b,d,s)}}),k.calendars.islamic=l},88874:function($,R,e){var k=e(63489);function l(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}e(56131)(l.prototype=new k.baseCalendar,{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 b=this._validate(T,this.minMonth,this.minDay,k.local.invalidYear);return(T=b.year()<0?b.year()+1:b.year())%4==0},weekOfYear:function(T,b,d){var s=this.newDate(T,b,d);return s.add(4-(s.dayOfWeek()||7),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInMonth:function(T,b){var d=this._validate(T,b,this.minDay,k.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(2===d.month()&&this.leapYear(d.year())?1:0)},weekDay:function(T,b,d){return(this.dayOfWeek(T,b,d)||7)<6},toJD:function(T,b,d){var s=this._validate(T,b,d,k.local.invalidDate);return T=s.year(),b=s.month(),d=s.day(),T<0&&T++,b<=2&&(T--,b+=12),Math.floor(365.25*(T+4716))+Math.floor(30.6001*(b+1))+d-1524.5},fromJD:function(T){var b=Math.floor(T+.5)+1524,d=Math.floor((b-122.1)/365.25),s=Math.floor(365.25*d),t=Math.floor((b-s)/30.6001),o=t-Math.floor(t<14?1:13),r=d-Math.floor(o>2?4716:4715),n=b-s-Math.floor(30.6001*t);return r<=0&&r--,this.newDate(r,o,n)}}),k.calendars.julian=l},83290:function($,R,e){var k=e(63489);function l(d){this.local=this.regionalOptions[d||""]||this.regionalOptions[""]}function T(d,s){return d-s*Math.floor(d/s)}function b(d,s){return T(d-1,s)+1}e(56131)(l.prototype=new k.baseCalendar,{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(d){return this._validate(d,this.minMonth,this.minDay,k.local.invalidYear),!1},formatYear:function(d){d=this._validate(d,this.minMonth,this.minDay,k.local.invalidYear).year();var s=Math.floor(d/400);return d%=400,d+=d<0?400:0,s+"."+Math.floor(d/20)+"."+d%20},forYear:function(d){if((d=d.split(".")).length<3)throw"Invalid Mayan year";for(var s=0,t=0;t<d.length;t++){var o=parseInt(d[t],10);if(Math.abs(o)>19||t>0&&o<0)throw"Invalid Mayan year";s=20*s+o}return s},monthsInYear:function(d){return this._validate(d,this.minMonth,this.minDay,k.local.invalidYear),18},weekOfYear:function(d,s,t){return this._validate(d,s,t,k.local.invalidDate),0},daysInYear:function(d){return this._validate(d,this.minMonth,this.minDay,k.local.invalidYear),360},daysInMonth:function(d,s){return this._validate(d,s,this.minDay,k.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(d,s,t){return this._validate(d,s,t,k.local.invalidDate).day()},weekDay:function(d,s,t){return this._validate(d,s,t,k.local.invalidDate),!0},extraInfo:function(d,s,t){var o=this._validate(d,s,t,k.local.invalidDate).toJD(),r=this._toHaab(o),n=this._toTzolkin(o);return{haabMonthName:this.local.haabMonths[r[0]-1],haabMonth:r[0],haabDay:r[1],tzolkinDayName:this.local.tzolkinMonths[n[0]-1],tzolkinDay:n[0],tzolkinTrecena:n[1]}},_toHaab:function(d){var s=T(8+(d-=this.jdEpoch)+340,365);return[Math.floor(s/20)+1,T(s,20)]},_toTzolkin:function(d){return[b(20+(d-=this.jdEpoch),20),b(d+4,13)]},toJD:function(d,s,t){var o=this._validate(d,s,t,k.local.invalidDate);return o.day()+20*o.month()+360*o.year()+this.jdEpoch},fromJD:function(d){d=Math.floor(d)+.5-this.jdEpoch;var s=Math.floor(d/360);d%=360,d+=d<0?360:0;var t=Math.floor(d/20);return this.newDate(s,t,d%20)}}),k.calendars.mayan=l},29108:function($,R,e){var k=e(63489),A=e(56131);function l(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}l.prototype=new k.baseCalendar;var T=k.instance("gregorian");A(l.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(b){var d=this._validate(b,this.minMonth,this.minDay,k.local.invalidYear||k.regionalOptions[""].invalidYear);return T.leapYear(d.year()+(d.year()<1?1:0)+1469)},weekOfYear:function(b,d,s){var t=this.newDate(b,d,s);return t.add(1-(t.dayOfWeek()||7),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(b,d){var s=this._validate(b,d,this.minDay,k.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(12===s.month()&&this.leapYear(s.year())?1:0)},weekDay:function(b,d,s){return(this.dayOfWeek(b,d,s)||7)<6},toJD:function(b,d,s){var t=this._validate(b,d,s,k.local.invalidMonth);(b=t.year())<0&&b++;for(var o=t.day(),r=1;r<t.month();r++)o+=this.daysPerMonth[r-1];return o+T.toJD(b+1468,3,13)},fromJD:function(b){b=Math.floor(b+.5);for(var d=Math.floor((b-(this.jdEpoch-1))/366);b>=this.toJD(d+1,1,1);)d++;for(var s=b-Math.floor(this.toJD(d,1,1)+.5)+1,t=1;s>this.daysInMonth(d,t);)s-=this.daysInMonth(d,t),t++;return this.newDate(d,t,s)}}),k.calendars.nanakshahi=l},55422:function($,R,e){var k=e(63489);function l(T){this.local=this.regionalOptions[T||""]||this.regionalOptions[""]}e(56131)(l.prototype=new k.baseCalendar,{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,b,d){var s=this.newDate(T,b,d);return s.add(-s.dayOfWeek(),"d"),Math.floor((s.dayOfYear()-1)/7)+1},daysInYear:function(T){if(T=this._validate(T,this.minMonth,this.minDay,k.local.invalidYear).year(),void 0===this.NEPALI_CALENDAR_DATA[T])return this.daysPerYear;for(var b=0,d=this.minMonth;d<=12;d++)b+=this.NEPALI_CALENDAR_DATA[T][d];return b},daysInMonth:function(T,b){return T.year&&(b=T.month(),T=T.year()),this._validate(T,b,this.minDay,k.local.invalidMonth),void 0===this.NEPALI_CALENDAR_DATA[T]?this.daysPerMonth[b-1]:this.NEPALI_CALENDAR_DATA[T][b]},weekDay:function(T,b,d){return 6!==this.dayOfWeek(T,b,d)},toJD:function(T,b,d){var s=this._validate(T,b,d,k.local.invalidDate);T=s.year(),b=s.month(),d=s.day();var t=k.instance(),o=0,r=b,n=T;this._createMissingCalendarData(T);var i=T-(r>9||9===r&&d>=this.NEPALI_CALENDAR_DATA[n][0]?56:57);for(9!==b&&(o=d,r--);9!==r;)r<=0&&(r=12,n--),o+=this.NEPALI_CALENDAR_DATA[n][r],r--;return 9===b?(o+=d-this.NEPALI_CALENDAR_DATA[n][0])<0&&(o+=t.daysInYear(i)):o+=this.NEPALI_CALENDAR_DATA[n][9]-this.NEPALI_CALENDAR_DATA[n][0],t.newDate(i,1,1).add(o,"d").toJD()},fromJD:function(T){var b=k.instance().fromJD(T),d=b.year(),s=b.dayOfYear(),t=d+56;this._createMissingCalendarData(t);for(var o=9,n=this.NEPALI_CALENDAR_DATA[t][o]-this.NEPALI_CALENDAR_DATA[t][0]+1;s>n;)++o>12&&(o=1,t++),n+=this.NEPALI_CALENDAR_DATA[t][o];return this.newDate(t,o,this.NEPALI_CALENDAR_DATA[t][o]-(n-s))},_createMissingCalendarData:function(T){var b=this.daysPerMonth.slice(0);b.unshift(17);for(var d=T-1;d<T+2;d++)void 0===this.NEPALI_CALENDAR_DATA[d]&&(this.NEPALI_CALENDAR_DATA[d]=b)},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]}}),k.calendars.nepali=l},94320:function($,R,e){var k=e(63489);function l(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}function T(b,d){return b-d*Math.floor(b/d)}e(56131)(l.prototype=new k.baseCalendar,{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\xe6harshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Ch\xe6","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(b){var d=this._validate(b,this.minMonth,this.minDay,k.local.invalidYear);return 682*((d.year()-(d.year()>0?474:473))%2820+474+38)%2816<682},weekOfYear:function(b,d,s){var t=this.newDate(b,d,s);return t.add(-(t.dayOfWeek()+1)%7,"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInMonth:function(b,d){var s=this._validate(b,d,this.minDay,k.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(12===s.month()&&this.leapYear(s.year())?1:0)},weekDay:function(b,d,s){return 5!==this.dayOfWeek(b,d,s)},toJD:function(b,d,s){var t=this._validate(b,d,s,k.local.invalidDate);b=t.year(),d=t.month(),s=t.day();var o=b-(b>=0?474:473),r=474+T(o,2820);return s+(d<=7?31*(d-1):30*(d-1)+6)+Math.floor((682*r-110)/2816)+365*(r-1)+1029983*Math.floor(o/2820)+this.jdEpoch-1},fromJD:function(b){var d=(b=Math.floor(b)+.5)-this.toJD(475,1,1),s=Math.floor(d/1029983),t=T(d,1029983),o=2820;if(1029982!==t){var r=Math.floor(t/366),n=T(t,366);o=Math.floor((2134*r+2816*n+2815)/1028522)+r+1}var i=o+2820*s+474,a=b-this.toJD(i=i<=0?i-1:i,1,1)+1,c=a<=186?Math.ceil(a/31):Math.ceil((a-6)/30),p=b-this.toJD(i,c,1)+1;return this.newDate(i,c,p)}}),k.calendars.persian=l,k.calendars.jalali=l},31320:function($,R,e){var k=e(63489),A=e(56131),l=k.instance();function T(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}A(T.prototype=new k.baseCalendar,{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(b){var d=this._validate(b,this.minMonth,this.minDay,k.local.invalidYear);return b=this._t2gYear(d.year()),l.leapYear(b)},weekOfYear:function(b,d,s){var t=this._validate(b,this.minMonth,this.minDay,k.local.invalidYear);return b=this._t2gYear(t.year()),l.weekOfYear(b,t.month(),t.day())},daysInMonth:function(b,d){var s=this._validate(b,d,this.minDay,k.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(2===s.month()&&this.leapYear(s.year())?1:0)},weekDay:function(b,d,s){return(this.dayOfWeek(b,d,s)||7)<6},toJD:function(b,d,s){var t=this._validate(b,d,s,k.local.invalidDate);return b=this._t2gYear(t.year()),l.toJD(b,t.month(),t.day())},fromJD:function(b){var d=l.fromJD(b),s=this._g2tYear(d.year());return this.newDate(s,d.month(),d.day())},_t2gYear:function(b){return b+this.yearsOffset+(b>=-this.yearsOffset&&b<=-1?1:0)},_g2tYear:function(b){return b-this.yearsOffset-(b>=1&&b<=this.yearsOffset?1:0)}}),k.calendars.taiwan=T},51367:function($,R,e){var k=e(63489),A=e(56131),l=k.instance();function T(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}A(T.prototype=new k.baseCalendar,{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(b){var d=this._validate(b,this.minMonth,this.minDay,k.local.invalidYear);return b=this._t2gYear(d.year()),l.leapYear(b)},weekOfYear:function(b,d,s){var t=this._validate(b,this.minMonth,this.minDay,k.local.invalidYear);return b=this._t2gYear(t.year()),l.weekOfYear(b,t.month(),t.day())},daysInMonth:function(b,d){var s=this._validate(b,d,this.minDay,k.local.invalidMonth);return this.daysPerMonth[s.month()-1]+(2===s.month()&&this.leapYear(s.year())?1:0)},weekDay:function(b,d,s){return(this.dayOfWeek(b,d,s)||7)<6},toJD:function(b,d,s){var t=this._validate(b,d,s,k.local.invalidDate);return b=this._t2gYear(t.year()),l.toJD(b,t.month(),t.day())},fromJD:function(b){var d=l.fromJD(b),s=this._g2tYear(d.year());return this.newDate(s,d.month(),d.day())},_t2gYear:function(b){return b-this.yearsOffset-(b>=1&&b<=this.yearsOffset?1:0)},_g2tYear:function(b){return b+this.yearsOffset+(b>=-this.yearsOffset&&b<=-1?1:0)}}),k.calendars.thai=T},21457:function($,R,e){var k=e(63489);function l(b){this.local=this.regionalOptions[b||""]||this.regionalOptions[""]}e(56131)(l.prototype=new k.baseCalendar,{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\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(b){var d=this._validate(b,this.minMonth,this.minDay,k.local.invalidYear);return 355===this.daysInYear(d.year())},weekOfYear:function(b,d,s){var t=this.newDate(b,d,s);return t.add(-t.dayOfWeek(),"d"),Math.floor((t.dayOfYear()-1)/7)+1},daysInYear:function(b){for(var d=0,s=1;s<=12;s++)d+=this.daysInMonth(b,s);return d},daysInMonth:function(b,d){for(var s=this._validate(b,d,this.minDay,k.local.invalidMonth).toJD()-24e5+.5,t=0,o=0;o<T.length;o++){if(T[o]>s)return T[t]-T[t-1];t++}return 30},weekDay:function(b,d,s){return 5!==this.dayOfWeek(b,d,s)},toJD:function(b,d,s){var t=this._validate(b,d,s,k.local.invalidDate),o=12*(t.year()-1)+t.month()-15292;return t.day()+T[o-1]-1+24e5-.5},fromJD:function(b){for(var d=b-24e5+.5,s=0,t=0;t<T.length&&!(T[t]>d);t++)s++;var o=s+15292,r=Math.floor((o-1)/12);return this.newDate(r+1,o-12*r,d-T[s-1]+1)},isValid:function(b,d,s){var t=k.baseCalendar.prototype.isValid.apply(this,arguments);return t&&(t=(b=null!=b.year?b.year:b)>=1276&&b<=1500),t},_validate:function(b,d,s,t){var o=k.baseCalendar.prototype._validate.apply(this,arguments);if(o.year<1276||o.year>1500)throw t.replace(/\{0\}/,this.local.name);return o}}),k.calendars.ummalqura=l;var T=[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]},63489:function($,R,e){var k=e(56131);function A(){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 l(t,o,r,n){if(this._calendar=t,this._year=o,this._month=r,this._day=n,0===this._calendar._validateLevel&&!this._calendar.isValid(this._year,this._month,this._day))throw(s.local.invalidDate||s.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function T(t,o){return"000000".substring(0,o-(t=""+t).length)+t}function b(){this.shortYearCutoff="+10"}function d(t){this.local=this.regionalOptions[t]||this.regionalOptions[""]}k(A.prototype,{instance:function(t,o){t=(t||"gregorian").toLowerCase();var r=this._localCals[t+"-"+(o=o||"")];if(!r&&this.calendars[t]&&(r=new this.calendars[t](o),this._localCals[t+"-"+o]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,t);return r},newDate:function(t,o,r,n,i){return(n=(null!=t&&t.year?t.calendar():"string"==typeof n?this.instance(n,i):n)||this.instance()).newDate(t,o,r)},substituteDigits:function(t){return function(o){return(o+"").replace(/[0-9]/g,function(r){return t[r]})}},substituteChineseDigits:function(t,o){return function(r){for(var n="",i=0;r>0;){var a=r%10;n=(0===a?"":t[a]+o[i])+n,i++,r=Math.floor(r/10)}return 0===n.indexOf(t[1]+o[1])&&(n=n.substr(1)),n||t[0]}}}),k(l.prototype,{newDate:function(t,o,r){return this._calendar.newDate(t??this,o,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,o,r){if(!this._calendar.isValid(t,o,r))throw(s.local.invalidDate||s.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=t,this._month=o,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,o){return this._calendar.add(this,t,o)},set:function(t,o){return this._calendar.set(this,t,o)},compareTo:function(t){if(this._calendar.name!==t._calendar.name)throw(s.local.differentCalendars||s.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,t._calendar.local.name);var o=this._year!==t._year?this._year-t._year:this._month!==t._month?this.monthOfYear()-t.monthOfYear():this._day-t._day;return 0===o?0:o<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?"-":"")+T(Math.abs(this.year()),4)+"-"+T(this.month(),2)+"-"+T(this.day(),2)}}),k(b.prototype,{_validateLevel:0,newDate:function(t,o,r){return null==t?this.today():(t.year&&(this._validate(t,o,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),r=t.day(),o=t.month(),t=t.year()),new l(this,t,o,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(t){return this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear).year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(t){var o=this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear);return(o.year()<0?"-":"")+T(Math.abs(o.year()),4)},monthsInYear:function(t){return this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear),12},monthOfYear:function(t,o){var r=this._validate(t,o,this.minDay,s.local.invalidMonth||s.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(t,o){var r=(o+this.firstMonth-2*this.minMonth)%this.monthsInYear(t)+this.minMonth;return this._validate(t,r,this.minDay,s.local.invalidMonth||s.regionalOptions[""].invalidMonth),r},daysInYear:function(t){var o=this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear);return this.leapYear(o)?366:365},dayOfYear:function(t,o,r){var n=this._validate(t,o,r,s.local.invalidDate||s.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,o,r){var n=this._validate(t,o,r,s.local.invalidDate||s.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(t,o,r){return this._validate(t,o,r,s.local.invalidDate||s.regionalOptions[""].invalidDate),{}},add:function(t,o,r){return this._validate(t,this.minMonth,this.minDay,s.local.invalidDate||s.regionalOptions[""].invalidDate),this._correctAdd(t,this._add(t,o,r),o,r)},_add:function(t,o,r){if(this._validateLevel++,"d"===r||"w"===r){var n=t.toJD()+o*("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?o:0),c=t.monthOfYear()+("m"===r?o:0);i=t.day(),"y"===r?(t.month()!==this.fromMonthOfYear(a,c)&&(c=this.newDate(a,t.month(),this.minDay).monthOfYear()),c=Math.min(c,this.monthsInYear(a)),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,c)))):"m"===r&&(function(f){for(;c<f.minMonth;)a--,c+=f.monthsInYear(a);for(var x=f.monthsInYear(a);c>x-1+f.minMonth;)a++,c-=x,x=f.monthsInYear(a)}(this),i=Math.min(i,this.daysInMonth(a,this.fromMonthOfYear(a,c))));var p=[a,this.fromMonthOfYear(a,c),i];return this._validateLevel--,p}catch(f){throw this._validateLevel--,f}},_correctAdd:function(t,o,r,n){if(!(this.hasYearZero||"y"!==n&&"m"!==n||0!==o[0]&&t.year()>0==o[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];o=this._add(t,r*i[0]+(r<0?-1:1)*i[1],i[2])}return t.date(o[0],o[1],o[2])},set:function(t,o,r){this._validate(t,this.minMonth,this.minDay,s.local.invalidDate||s.regionalOptions[""].invalidDate);var n="y"===r?o:t.year(),i="m"===r?o:t.month(),a="d"===r?o:t.day();return"y"!==r&&"m"!==r||(a=Math.min(a,this.daysInMonth(n,i))),t.date(n,i,a)},isValid:function(t,o,r){this._validateLevel++;var n=this.hasYearZero||0!==t;if(n){var i=this.newDate(t,o,this.minDay);n=o>=this.minMonth&&o-this.minMonth<this.monthsInYear(i)&&r>=this.minDay&&r-this.minDay<this.daysInMonth(i)}return this._validateLevel--,n},toJSDate:function(t,o,r){var n=this._validate(t,o,r,s.local.invalidDate||s.regionalOptions[""].invalidDate);return s.instance().fromJD(this.toJD(n)).toJSDate()},fromJSDate:function(t){return this.fromJD(s.instance().fromJSDate(t).toJD())},_validate:function(t,o,r,n){if(t.year){if(0===this._validateLevel&&this.name!==t.calendar().name)throw(s.local.differentCalendars||s.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,o,r))throw n.replace(/\{0\}/,this.local.name);var i=this.newDate(t,o,r);return this._validateLevel--,i}catch(a){throw this._validateLevel--,a}}}),k(d.prototype=new b,{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 o=this._validate(t,this.minMonth,this.minDay,s.local.invalidYear||s.regionalOptions[""].invalidYear);return(t=o.year()+(o.year()<0?1:0))%4==0&&(t%100!=0||t%400==0)},weekOfYear:function(t,o,r){var n=this.newDate(t,o,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(t,o){var r=this._validate(t,o,this.minDay,s.local.invalidMonth||s.regionalOptions[""].invalidMonth);return this.daysPerMonth[r.month()-1]+(2===r.month()&&this.leapYear(r.year())?1:0)},weekDay:function(t,o,r){return(this.dayOfWeek(t,o,r)||7)<6},toJD:function(t,o,r){var n=this._validate(t,o,r,s.local.invalidDate||s.regionalOptions[""].invalidDate);t=n.year(),o=n.month(),r=n.day(),t<0&&t++,o<3&&(o+=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*(o+1))+r+a-1524.5},fromJD:function(t){var o=Math.floor(t+.5),r=Math.floor((o-1867216.25)/36524.25),n=1524+(r=o+1+r-Math.floor(r/4)),i=Math.floor((n-122.1)/365.25),a=Math.floor(365.25*i),c=Math.floor((n-a)/30.6001),p=n-a-Math.floor(30.6001*c),f=c-(c>13.5?13:1),x=i-(f>2.5?4716:4715);return x<=0&&x--,this.newDate(x,f,p)},toJSDate:function(t,o,r){var n=this._validate(t,o,r,s.local.invalidDate||s.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 s=$.exports=new A;s.cdate=l,s.baseCalendar=b,s.calendars.gregorian=d},94338:function($,R,e){var k=e(56131),A=e(63489);k(A.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"}),A.local=A.regionalOptions[""],k(A.cdate.prototype,{formatDate:function(l,T){return"string"!=typeof l&&(T=l,l=""),this._calendar.formatDate(l||"",this,T)}}),k(A.baseCalendar.prototype,{UNIX_EPOCH:A.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:A.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(l,T,b){if("string"!=typeof l&&(b=T,T=l,l=""),!T)return"";if(T.calendar()!==this)throw A.local.invalidFormat||A.regionalOptions[""].invalidFormat;l=l||this.local.dateFormat;for(var d,s,t,o=(b=b||{}).dayNamesShort||this.local.dayNamesShort,r=b.dayNames||this.local.dayNames,n=b.monthNumbers||this.local.monthNumbers,i=b.monthNamesShort||this.local.monthNamesShort,a=b.monthNames||this.local.monthNames,c=function(u,S){for(var _=1;w+_<l.length&&l.charAt(w+_)===u;)_++;return w+=_-1,Math.floor(_/(S||1))>1},p=function(u,S,_,E){var L=""+S;if(c(u,E))for(;L.length<_;)L="0"+L;return L},f=this,v=function(u,S){return S?"function"==typeof a?a.call(f,u):a[u.month()-f.minMonth]:"function"==typeof i?i.call(f,u):i[u.month()-f.minMonth]},g=this.local.digits,y=function(u){return b.localNumbers&&g?g(u):u},h="",m=!1,w=0;w<l.length;w++)if(m)"'"!==l.charAt(w)||c("'")?h+=l.charAt(w):m=!1;else switch(l.charAt(w)){case"d":h+=y(p("d",T.day(),2));break;case"D":h+=(d=T.dayOfWeek(),s=o,t=r,c("D")?t[d]:s[d]);break;case"o":h+=p("o",T.dayOfYear(),3);break;case"w":h+=p("w",T.weekOfYear(),2);break;case"m":h+=(u=T,"function"==typeof n?n.call(f,u,c("m")):y(p("m",u.month(),2)));break;case"M":h+=v(T,c("M"));break;case"y":h+=c("y",2)?T.year():(T.year()%100<10?"0":"")+T.year()%100;break;case"Y":c("Y",2),h+=T.formatYear();break;case"J":h+=T.toJD();break;case"@":h+=(T.toJD()-this.UNIX_EPOCH)*this.SECS_PER_DAY;break;case"!":h+=(T.toJD()-this.TICKS_EPOCH)*this.TICKS_PER_DAY;break;case"'":c("'")?h+="'":m=!0;break;default:h+=l.charAt(w)}var u;return h},parseDate:function(l,T,b){if(null==T)throw A.local.invalidArguments||A.regionalOptions[""].invalidArguments;if(""===(T="object"==typeof T?T.toString():T+""))return null;l=l||this.local.dateFormat;var d=(b=b||{}).shortYearCutoff||this.shortYearCutoff;d="string"!=typeof d?d:this.today().year()%100+parseInt(d,10);for(var s=b.dayNamesShort||this.local.dayNamesShort,t=b.dayNames||this.local.dayNames,o=b.parseMonth||this.local.parseMonth,r=b.monthNumbers||this.local.monthNumbers,n=b.monthNamesShort||this.local.monthNamesShort,i=b.monthNames||this.local.monthNames,a=-1,c=-1,p=-1,f=-1,x=-1,v=!1,g=!1,y=function(I,U){for(var z=1;L+z<l.length&&l.charAt(L+z)===I;)z++;return L+=z-1,Math.floor(z/(U||1))>1},h=function(I,U){var z=y(I,U),H=[2,3,z?4:2,z?4:2,10,11,20]["oyYJ@!".indexOf(I)+1],F=new RegExp("^-?\\d{1,"+H+"}"),N=T.substring(E).match(F);if(!N)throw(A.local.missingNumberAt||A.regionalOptions[""].missingNumberAt).replace(/\{0\}/,E);return E+=N[0].length,parseInt(N[0],10)},m=this,w=function(){if("function"==typeof r){y("m");var I=r.call(m,T.substring(E));return E+=I.length,I}return h("m")},u=function(I,U,z,H){for(var F=y(I,H)?z:U,N=0;N<F.length;N++)if(T.substr(E,F[N].length).toLowerCase()===F[N].toLowerCase())return E+=F[N].length,N+m.minMonth;throw(A.local.unknownNameAt||A.regionalOptions[""].unknownNameAt).replace(/\{0\}/,E)},S=function(){if("function"==typeof i){var I=y("M")?i.call(m,T.substring(E)):n.call(m,T.substring(E));return E+=I.length,I}return u("M",n,i)},_=function(){if(T.charAt(E)!==l.charAt(L))throw(A.local.unexpectedLiteralAt||A.regionalOptions[""].unexpectedLiteralAt).replace(/\{0\}/,E);E++},E=0,L=0;L<l.length;L++)if(g)"'"!==l.charAt(L)||y("'")?_():g=!1;else switch(l.charAt(L)){case"d":f=h("d");break;case"D":u("D",s,t);break;case"o":x=h("o");break;case"w":h("w");break;case"m":p=w();break;case"M":p=S();break;case"y":var C=L;v=!y("y",2),L=C,c=h("y",2);break;case"Y":c=h("Y",2);break;case"J":a=h("J")+.5,"."===T.charAt(E)&&(E++,h("J"));break;case"@":a=h("@")/this.SECS_PER_DAY+this.UNIX_EPOCH;break;case"!":a=h("!")/this.TICKS_PER_DAY+this.TICKS_EPOCH;break;case"*":E=T.length;break;case"'":y("'")?_():g=!0;break;default:_()}if(E<T.length)throw A.local.unexpectedText||A.regionalOptions[""].unexpectedText;if(-1===c?c=this.today().year():c<100&&v&&(c+=-1===d?1900:this.today().year()-this.today().year()%100-(c<=d?0:100)),"string"==typeof p&&(p=o.call(this,c,p)),x>-1){f=x;for(var P=this.daysInMonth(c,p=1);f>P;P=this.daysInMonth(c,p))p++,f-=P}return a>-1?this.fromJD(a):this.newDate(c,p,f)},determineDate:function(l,T,b,d,s){b&&"object"!=typeof b&&(s=d,d=b,b=null),"string"!=typeof d&&(s=d,d="");var t=this;return T=T?T.newDate():null,null==l?T:"string"==typeof l?function(o){try{return t.parseDate(d,o,s)}catch{}for(var r=((o=o.toLowerCase()).match(/^c/)&&b?b.newDate():null)||t.today(),n=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,i=n.exec(o);i;)r.add(parseInt(i[1],10),i[2]||"d"),i=n.exec(o);return r}(l):"number"==typeof l?isNaN(l)||l===1/0||l===-1/0?T:t.today().add(l,"d"):t.newDate(l)}})},69862:function(){},40964:function(){},72077:function($,R,e){"use strict";var k=e(24696);$.exports=function(){return k(["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],function(A){return"function"==typeof e.g[A]})}},40402:function($){"use strict";$.exports=JSON.parse('["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]')},83794:function($){"use strict";$.exports=JSON.parse('["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]')},96209:function($){"use strict";$.exports=JSON.parse('["normal","italic","oblique"]')},15659:function($){"use strict";$.exports=JSON.parse('["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]')},38732:function($){"use strict";$.exports=JSON.parse('["inherit","initial","unset"]')},41901:function($){"use strict";$.exports=JSON.parse('["caption","icon","menu","message-box","small-caption","status-bar"]')}},vl={};function As($){var R=vl[$];if(void 0!==R)return R.exports;var e=vl[$]={exports:{}};return oc[$].call(e.exports,e,e.exports,As),e.exports}return As.n=function($){var R=$&&$.__esModule?function(){return $.default}:function(){return $};return As.d(R,{a:R}),R},As.d=function($,R){for(var e in R)As.o(R,e)&&!As.o($,e)&&Object.defineProperty($,e,{enumerable:!0,get:R[e]})},As.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch{if("object"==typeof window)return window}}(),As.o=function($,R){return Object.prototype.hasOwnProperty.call($,R)},As.r=function($){typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty($,Symbol.toStringTag,{value:"Module"}),Object.defineProperty($,"__esModule",{value:!0})},As(27909)}()});