import{r as O0,p as B0,n as N0}from"./index-D9fGsswH.js";function U0(Cs,El){for(var $s=0;$sdi[Zi]})}}}return Object.freeze(Object.defineProperty(Cs,Symbol.toStringTag,{value:"Module"}))}var Ph={},Ov={};(function(Cs){function El(u){"@babel/helpers - typeof";return El=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(l){return typeof l}:function(l){return l&&typeof Symbol=="function"&&l.constructor===Symbol&&l!==Symbol.prototype?"symbol":typeof l},El(u)}Object.defineProperty(Cs,"__esModule",{value:!0}),Cs.default=c;var $s=te(O0),di=Zi(B0);function Zi(u){return u&&u.__esModule?u:{default:u}}function Cl(u){if(typeof WeakMap!="function")return null;var l=new WeakMap,y=new WeakMap;return(Cl=function(T){return T?y:l})(u)}function te(u,l){if(u&&u.__esModule)return u;if(u===null||El(u)!=="object"&&typeof u!="function")return{default:u};var y=Cl(l);if(y&&y.has(u))return y.get(u);var h={},T=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var f in u)if(f!=="default"&&Object.prototype.hasOwnProperty.call(u,f)){var n=T?Object.getOwnPropertyDescriptor(u,f):null;n&&(n.get||n.set)?Object.defineProperty(h,f,n):h[f]=u[f]}return h.default=u,y&&y.set(u,h),h}function X(u,l){if(!(u instanceof l))throw new TypeError("Cannot call a class as a function")}function e(u,l){for(var y=0;y"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function r(u){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(y){return y.__proto__||Object.getPrototypeOf(y)},r(u)}var t=["AfterExport","AfterPlot","Animated","AnimatingFrame","AnimationInterrupted","AutoSize","BeforeExport","BeforeHover","ButtonClicked","Click","ClickAnnotation","Deselect","DoubleClick","Framework","Hover","LegendClick","LegendDoubleClick","Relayout","Relayouting","Restyle","Redraw","Selected","Selecting","SliderChange","SliderEnd","SliderStart","SunburstClick","Transitioning","TransitionInterrupted","Unhover","WebGlContextLost"],s=["plotly_restyle","plotly_redraw","plotly_relayout","plotly_relayouting","plotly_doubleclick","plotly_animated","plotly_sunburstclick"],a=typeof window<"u";function c(u){var l=function(y){P(T,y);var h=L(T);function T(f){var n;return X(this,T),n=h.call(this,f),n.p=Promise.resolve(),n.resizeHandler=null,n.handlers={},n.syncWindowResize=n.syncWindowResize.bind(d(n)),n.syncEventHandlers=n.syncEventHandlers.bind(d(n)),n.attachUpdateEvents=n.attachUpdateEvents.bind(d(n)),n.getRef=n.getRef.bind(d(n)),n.handleUpdate=n.handleUpdate.bind(d(n)),n.figureCallback=n.figureCallback.bind(d(n)),n.updatePlotly=n.updatePlotly.bind(d(n)),n}return A(T,[{key:"updatePlotly",value:function(n,v,m){var b=this;this.p=this.p.then(function(){if(!b.unmounting){if(!b.el)throw new Error("Missing element reference");return u.react(b.el,{data:b.props.data,layout:b.props.layout,config:b.props.config,frames:b.props.frames})}}).then(function(){b.unmounting||(b.syncWindowResize(n),b.syncEventHandlers(),b.figureCallback(v),m&&b.attachUpdateEvents())}).catch(function(E){b.props.onError&&b.props.onError(E)})}},{key:"componentDidMount",value:function(){this.unmounting=!1,this.updatePlotly(!0,this.props.onInitialized,!0)}},{key:"componentDidUpdate",value:function(n){this.unmounting=!1;var v=n.frames&&n.frames.length?n.frames.length:0,m=this.props.frames&&this.props.frames.length?this.props.frames.length:0,b=!(n.layout===this.props.layout&&n.data===this.props.data&&n.config===this.props.config&&m===v),E=n.revision!==void 0,p=n.revision!==this.props.revision;!b&&(!E||E&&!p)||this.updatePlotly(!1,this.props.onUpdate,!1)}},{key:"componentWillUnmount",value:function(){this.unmounting=!0,this.figureCallback(this.props.onPurge),this.resizeHandler&&a&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null),this.removeUpdateEvents(),u.purge(this.el)}},{key:"attachUpdateEvents",value:function(){var n=this;!this.el||!this.el.removeListener||s.forEach(function(v){n.el.on(v,n.handleUpdate)})}},{key:"removeUpdateEvents",value:function(){var n=this;!this.el||!this.el.removeListener||s.forEach(function(v){n.el.removeListener(v,n.handleUpdate)})}},{key:"handleUpdate",value:function(){this.figureCallback(this.props.onUpdate)}},{key:"figureCallback",value:function(n){if(typeof n=="function"){var v=this.el,m=v.data,b=v.layout,E=this.el._transitionData?this.el._transitionData._frames:null,p={data:m,layout:b,frames:E};n(p,this.el)}}},{key:"syncWindowResize",value:function(n){var v=this;a&&(this.props.useResizeHandler&&!this.resizeHandler?(this.resizeHandler=function(){return u.Plots.resize(v.el)},window.addEventListener("resize",this.resizeHandler),n&&this.resizeHandler()):!this.props.useResizeHandler&&this.resizeHandler&&(window.removeEventListener("resize",this.resizeHandler),this.resizeHandler=null))}},{key:"getRef",value:function(n){this.el=n,this.props.debug&&a&&(window.gd=this.el)}},{key:"syncEventHandlers",value:function(){var n=this;t.forEach(function(v){var m=n.props["on"+v],b=n.handlers[v],E=!!b;m&&!E?n.addEventHandler(v,m):!m&&E?n.removeEventHandler(v):m&&E&&m!==b&&(n.removeEventHandler(v),n.addEventHandler(v,m))})}},{key:"addEventHandler",value:function(n,v){this.handlers[n]=v,this.el.on(this.getPlotlyEventName(n),this.handlers[n])}},{key:"removeEventHandler",value:function(n){this.el.removeListener(this.getPlotlyEventName(n),this.handlers[n]),delete this.handlers[n]}},{key:"getPlotlyEventName",value:function(n){return"plotly_"+n.toLowerCase()}},{key:"render",value:function(){return $s.default.createElement("div",{id:this.props.divId,style:this.props.style,ref:this.getRef,className:this.props.className})}}]),T}($s.Component);return l.propTypes={data:di.default.arrayOf(di.default.object),config:di.default.object,layout:di.default.object,frames:di.default.arrayOf(di.default.object),revision:di.default.number,onInitialized:di.default.func,onPurge:di.default.func,onError:di.default.func,onUpdate:di.default.func,debug:di.default.bool,style:di.default.object,className:di.default.string,useResizeHandler:di.default.bool,divId:di.default.string},t.forEach(function(y){l.propTypes["on"+y]=di.default.func}),l.defaultProps={debug:!1,useResizeHandler:!1,data:[],style:{position:"relative",display:"inline-block"}},l}})(Ov);var Bv={exports:{}};(function(Cs,El){(function(di,Zi){Cs.exports=Zi()})(self,function(){return function(){var $s={79288:function(te,X,e){var A=e(3400),P={"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 o in P){var L=o.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier");A.addStyleRule(L,P[o])}},86712:function(te,X,e){te.exports=e(84224)},37240:function(te,X,e){te.exports=e(51132)},29744:function(te,X,e){te.exports=e(94456)},29352:function(te,X,e){te.exports=e(67244)},96144:function(te,X,e){te.exports=e(97776)},53219:function(te,X,e){te.exports=e(61712)},4624:function(te,X,e){te.exports=e(95856)},54543:function(te,X,e){te.exports=e(54272)},45e3:function(te,X,e){te.exports=e(85404)},62300:function(te,X,e){te.exports=e(26048)},6920:function(te,X,e){te.exports=e(66240)},10264:function(te,X,e){te.exports=e(40448)},32016:function(te,X,e){te.exports=e(64884)},27528:function(te,X,e){te.exports=e(15088)},75556:function(te,X,e){te.exports=e(76744)},39204:function(te,X,e){te.exports=e(94704)},73996:function(te,X,e){te.exports=e(62396)},16489:function(te,X,e){te.exports=e(32028)},5e3:function(te,X,e){te.exports=e(81932)},77280:function(te,X,e){te.exports=e(45536)},33992:function(te,X,e){te.exports=e(42600)},17600:function(te,X,e){te.exports=e(21536)},49116:function(te,X,e){te.exports=e(65664)},46808:function(te,X,e){te.exports=e(29044)},36168:function(te,X,e){te.exports=e(48928)},13792:function(te,X,e){var A=e(32016);A.register([e(37240),e(29352),e(5e3),e(33992),e(17600),e(49116),e(6920),e(67484),e(79440),e(39204),e(83096),e(36168),e(20260),e(63560),e(65832),e(46808),e(73996),e(48824),e(89904),e(25120),e(13752),e(4340),e(62300),e(29800),e(8363),e(54543),e(86636),e(42192),e(32140),e(77280),e(89296),e(56816),e(70192),e(45e3),e(27528),e(84764),e(3920),e(50248),e(4624),e(69967),e(10264),e(86152),e(53219),e(81604),e(63796),e(29744),e(89336),e(86712),e(75556),e(16489),e(97312),e(96144)]),te.exports=A},3920:function(te,X,e){te.exports=e(43480)},25120:function(te,X,e){te.exports=e(6296)},4340:function(te,X,e){te.exports=e(7404)},86152:function(te,X,e){te.exports=e(65456)},56816:function(te,X,e){te.exports=e(22020)},89296:function(te,X,e){te.exports=e(29928)},20260:function(te,X,e){te.exports=e(75792)},32140:function(te,X,e){te.exports=e(156)},84764:function(te,X,e){te.exports=e(45499)},48824:function(te,X,e){te.exports=e(3296)},69967:function(te,X,e){te.exports=e(4184)},8363:function(te,X,e){te.exports=e(36952)},86636:function(te,X,e){te.exports=e(38983)},70192:function(te,X,e){te.exports=e(11572)},81604:function(te,X,e){te.exports=e(76924)},63796:function(te,X,e){te.exports=e(62944)},89336:function(te,X,e){te.exports=e(95443)},67484:function(te,X,e){te.exports=e(34864)},97312:function(te,X,e){te.exports=e(76272)},42192:function(te,X,e){te.exports=e(97924)},29800:function(te,X,e){te.exports=e(15436)},63560:function(te,X,e){te.exports=e(5621)},89904:function(te,X,e){te.exports=e(91304)},50248:function(te,X,e){te.exports=e(41724)},65832:function(te,X,e){te.exports=e(31991)},79440:function(te,X,e){te.exports=e(22869)},13752:function(te,X,e){te.exports=e(67776)},83096:function(te,X,e){te.exports=e(95952)},72196:function(te){te.exports=[{path:"",backoff:0},{path:"M-2.4,-3V3L0.6,0Z",backoff:.6},{path:"M-3.7,-2.5V2.5L1.3,0Z",backoff:1.3},{path:"M-4.45,-3L-1.65,-0.2V0.2L-4.45,3L1.55,0Z",backoff:1.55},{path:"M-2.2,-2.2L-0.2,-0.2V0.2L-2.2,2.2L-1.4,3L1.6,0L-1.4,-3Z",backoff:1.6},{path:"M-4.4,-2.1L-0.6,-0.2V0.2L-4.4,2.1L-4,3L2,0L-4,-3Z",backoff:2},{path:"M2,0A2,2 0 1,1 0,-2A2,2 0 0,1 2,0Z",backoff:0,noRotate:!0},{path:"M2,2V-2H-2V2Z",backoff:0,noRotate:!0}]},13916:function(te,X,e){var A=e(72196),P=e(25376),o=e(33816),L=e(31780).templatedArray;e(36208),te.exports=L("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:P({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:A.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:A.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",o.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",o.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",o.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",o.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:P({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc",_deprecated:{ref:{valType:"string",editType:"calc"}}})},90272:function(te,X,e){var A=e(3400),P=e(54460),o=e(23816).draw;te.exports=function(g){var r=g._fullLayout,t=A.filterVisible(r.annotations);if(t.length&&g._fullData.length)return A.syncOrAsync([o,L],g)};function L(d){var g=d._fullLayout;A.filterVisible(g.annotations).forEach(function(r){var t=P.getFromId(d,r.xref),s=P.getFromId(d,r.yref),a=P.getRefType(r.xref),c=P.getRefType(r.yref);r._extremes={},a==="range"&&M(r,t),c==="range"&&M(r,s)})}function M(d,g){var r=g._id,t=r.charAt(0),s=d[t],a=d["a"+t],c=d[t+"ref"],u=d["a"+t+"ref"],l=d["_"+t+"padplus"],y=d["_"+t+"padminus"],h={x:1,y:-1}[t]*d[t+"shift"],T=3*d.arrowsize*d.arrowwidth||0,f=T+h,n=T-h,v=3*d.startarrowsize*d.arrowwidth||0,m=v+h,b=v-h,E;if(u===c){var p=P.findExtremes(g,[g.r2c(s)],{ppadplus:f,ppadminus:n}),S=P.findExtremes(g,[g.r2c(a)],{ppadplus:Math.max(l,m),ppadminus:Math.max(y,b)});E={min:[p.min[0],S.min[0]],max:[p.max[0],S.max[0]]}}else m=a?m+a:m,b=a?b-a:b,E=P.findExtremes(g,[g.r2c(s)],{ppadplus:Math.max(l,f,m),ppadminus:Math.max(y,n,b)});d._extremes[r]=E}},42300:function(te,X,e){var A=e(3400),P=e(24040),o=e(31780).arrayEditor;te.exports={hasClickToShow:L,onClick:M};function L(r,t){var s=d(r,t);return s.on.length>0||s.explicitOff.length>0}function M(r,t){var s=d(r,t),a=s.on,c=s.off.concat(s.explicitOff),u={},l=r._fullLayout.annotations,y,h;if(a.length||c.length){for(y=0;y.6666666666666666?er="right":er="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[er]}for(var et=!1,st=["x","y"],Ze=0;Ze1)&&(it===nt?(Ve=lt.r2fraction(v["a"+Ke]),(Ve<0||Ve>1)&&(et=!0)):et=!0),Ce=lt._offset+lt.r2p(v[Ke]),Te=.5}else{var je=ke==="domain";Ke==="x"?(pe=v[Ke],Ce=je?lt._offset+lt._length*pe:Ce=w.l+w.w*pe):(pe=1-v[Ke],Ce=je?lt._offset+lt._length*pe:Ce=w.t+w.h*pe),Te=v.showarrow?.5:pe}if(v.showarrow){Oe.head=Ce;var at=v["a"+Ke];if(be=xt*Ne(.5,v.xanchor)-Je*Ne(.5,v.yanchor),it===nt){var ut=d.getRefType(it);ut==="domain"?(Ke==="y"&&(at=1-at),Oe.tail=lt._offset+lt._length*at):ut==="paper"?Ke==="y"?(at=1-at,Oe.tail=w.t+w.h*at):Oe.tail=w.l+w.w*at:Oe.tail=lt._offset+lt.r2p(at),ge=be}else Oe.tail=Ce+at,ge=be+at;Oe.text=Oe.tail+be;var Nt=S[Ke==="x"?"width":"height"];if(nt==="paper"&&(Oe.head=L.constrain(Oe.head,1,Nt-1)),it==="pixel"){var Vt=-Math.max(Oe.tail-3,Oe.text),gt=Math.min(Oe.tail+3,Oe.text)-Nt;Vt>0?(Oe.tail+=Vt,Oe.text+=Vt):gt>0&&(Oe.tail-=gt,Oe.text-=gt)}Oe.tail+=He,Oe.head+=He}else be=Pe*Ne(Te,Ue),ge=be,Oe.text=Ce+be;Oe.text+=He,be+=He,ge+=He,v["_"+Ke+"padplus"]=Pe/2+ge,v["_"+Ke+"padminus"]=Pe/2-ge,v["_"+Ke+"size"]=Pe,v["_"+Ke+"shift"]=be}if(et){oe.remove();return}var Ct=0,Yt=0;if(v.align!=="left"&&(Ct=(Se-Ae)*(v.align==="center"?.5:1)),v.valign!=="top"&&(Yt=(_e-ye)*(v.valign==="middle"?.5:1)),Le)me.select("svg").attr({x:re+Ct-1,y:re+Yt}).call(r.setClipUrl,J?z:null,n);else{var gr=re+Yt-ve.top,ht=re+Ct-ve.left;ie.call(s.positionText,ht,gr).call(r.setClipUrl,J?z:null,n)}ae.select("rect").call(r.setRect,re,re,Se,_e),H.call(r.setRect,Z/2,Z/2,ze-Z,Ie-Z),oe.call(r.setTranslate,Math.round(O.x.text-ze/2),Math.round(O.y.text-Ie/2)),V.attr({transform:"rotate("+F+","+O.x.text+","+O.y.text+")"});var Ht=function(cr,er){N.selectAll(".annotation-arrow-g").remove();var ct=O.x.head,qe=O.y.head,dt=O.x.tail+cr,bt=O.y.tail+er,Et=O.x.text+cr,Mt=O.y.text+er,_t=L.rotationXYMatrix(F,Et,Mt),It=L.apply2DTransform(_t),Gt=L.apply2DTransform2(_t),nr=+H.attr("width"),ar=+H.attr("height"),ir=Et-.5*nr,Be=ir+nr,Fe=Mt-.5*ar,Rt=Fe+ar,Lt=[[ir,Fe,ir,Rt],[ir,Rt,Be,Rt],[Be,Rt,Be,Fe],[Be,Fe,ir,Fe]].map(Gt);if(!Lt.reduce(function(Ar,sn){return Ar^!!L.segmentsIntersect(ct,qe,ct+1e6,qe+1e6,sn[0],sn[1],sn[2],sn[3])},!1)){Lt.forEach(function(Ar){var sn=L.segmentsIntersect(dt,bt,ct,qe,Ar[0],Ar[1],Ar[2],Ar[3]);sn&&(dt=sn.x,bt=sn.y)});var Ut=v.arrowwidth,Qt=v.arrowcolor,rr=v.arrowside,Kt=N.append("g").style({opacity:g.opacity(Qt)}).classed("annotation-arrow-g",!0),Dt=Kt.append("path").attr("d","M"+dt+","+bt+"L"+ct+","+qe).style("stroke-width",Ut+"px").call(g.stroke,g.rgb(Qt));if(l(Dt,rr,v),i.annotationPosition&&Dt.node().parentNode&&!b){var sr=ct,fr=qe;if(v.standoff){var vr=Math.sqrt(Math.pow(ct-dt,2)+Math.pow(qe-bt,2));sr+=v.standoff*(dt-ct)/vr,fr+=v.standoff*(bt-qe)/vr}var lr=Kt.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(dt-sr)+","+(bt-fr),transform:M(sr,fr)}).style("stroke-width",Ut+6+"px").call(g.stroke,"rgba(0,0,0,0)").call(g.fill,"rgba(0,0,0,0)"),Or,Sr;c.init({element:lr.node(),gd:n,prepFn:function(){var Ar=r.getTranslate(oe);Or=Ar.x,Sr=Ar.y,E&&E.autorange&&I(E._name+".autorange",!0),p&&p.autorange&&I(p._name+".autorange",!0)},moveFn:function(Ar,sn){var Jr=It(Or,Sr),bn=Jr[0]+Ar,xn=Jr[1]+sn;oe.call(r.setTranslate,bn,xn),B("x",T(E,Ar,"x",w,v)),B("y",T(p,sn,"y",w,v)),v.axref===v.xref&&B("ax",T(E,Ar,"ax",w,v)),v.ayref===v.yref&&B("ay",T(p,sn,"ay",w,v)),Kt.attr("transform",M(Ar,sn)),V.attr({transform:"rotate("+F+","+bn+","+xn+")"})},doneFn:function(){P.call("_guiRelayout",n,_());var Ar=document.querySelector(".js-notes-box-panel");Ar&&Ar.redraw(Ar.selectedObj)}})}}};if(v.showarrow&&Ht(0,0),j){var Wt;c.init({element:oe.node(),gd:n,prepFn:function(){Wt=V.attr("transform")},moveFn:function(cr,er){var ct="pointer";if(v.showarrow)v.axref===v.xref?B("ax",T(E,cr,"ax",w,v)):B("ax",v.ax+cr),v.ayref===v.yref?B("ay",T(p,er,"ay",w.w,v)):B("ay",v.ay+er),Ht(cr,er);else{if(b)return;var qe,dt;if(E)qe=T(E,cr,"x",w,v);else{var bt=v._xsize/w.w,Et=v.x+(v._xshift-v.xshift)/w.w-bt/2;qe=c.align(Et+cr/w.w,bt,0,1,v.xanchor)}if(p)dt=T(p,er,"y",w,v);else{var Mt=v._ysize/w.h,_t=v.y-(v._yshift+v.yshift)/w.h-Mt/2;dt=c.align(_t-er/w.h,Mt,0,1,v.yanchor)}B("x",qe),B("y",dt),(!E||!p)&&(ct=c.getCursor(E?.5:qe,p?.5:dt,v.xanchor,v.yanchor))}V.attr({transform:M(cr,er)+Wt}),a(oe,ct)},clickFn:function(cr,er){v.captureevents&&n.emit("plotly_clickannotation",q(er))},doneFn:function(){a(oe),P.call("_guiRelayout",n,_());var cr=document.querySelector(".js-notes-box-panel");cr&&cr.redraw(cr.selectedObj)}})}}i.annotationText?ie.call(s.makeEditable,{delegate:oe,gd:n}).call(ne).on("edit",function(de){v.text=de,this.call(ne),B("text",de),E&&E.autorange&&I(E._name+".autorange",!0),p&&p.autorange&&I(p._name+".autorange",!0),P.call("_guiRelayout",n,_())}):ie.call(ne)}},33652:function(te,X,e){var A=e(33428),P=e(76308),o=e(72196),L=e(3400),M=L.strScale,d=L.strRotate,g=L.strTranslate;te.exports=function(t,s,a){var c=t.node(),u=o[a.arrowhead||0],l=o[a.startarrowhead||0],y=(a.arrowwidth||1)*(a.arrowsize||1),h=(a.arrowwidth||1)*(a.startarrowsize||1),T=s.indexOf("start")>=0,f=s.indexOf("end")>=0,n=u.backoff*y+a.standoff,v=l.backoff*h+a.startstandoff,m,b,E,p;if(c.nodeName==="line"){m={x:+t.attr("x1"),y:+t.attr("y1")},b={x:+t.attr("x2"),y:+t.attr("y2")};var S=m.x-b.x,w=m.y-b.y;if(E=Math.atan2(w,S),p=E+Math.PI,n&&v&&n+v>Math.sqrt(S*S+w*w)){V();return}if(n){if(n*n>S*S+w*w){V();return}var i=n*Math.cos(E),C=n*Math.sin(E);b.x+=i,b.y+=C,t.attr({x2:b.x,y2:b.y})}if(v){if(v*v>S*S+w*w){V();return}var x=v*Math.cos(E),k=v*Math.sin(E);m.x-=x,m.y-=k,t.attr({x1:m.x,y1:m.y})}}else if(c.nodeName==="path"){var I=c.getTotalLength(),B="";if(I1){a=!0;break}}a?M.fullLayout._infolayer.select(".annotation-"+M.id+'[data-index="'+t+'"]').remove():(s._pdata=P(M.glplot.cameraParams,[d.xaxis.r2l(s.x)*g[0],d.yaxis.r2l(s.y)*g[1],d.zaxis.r2l(s.z)*g[2]]),A(M.graphDiv,s,t,M.id,s._xa,s._ya))}}},56864:function(te,X,e){var A=e(24040),P=e(3400);te.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:e(45899)}}},layoutAttributes:e(45899),handleDefaults:e(52808),includeBasePlot:o,convert:e(42456),draw:e(71836)};function o(L,M){var d=A.subplotsRegistry.gl3d;if(d)for(var g=d.attrRegex,r=Object.keys(L),t=0;t=0)))return t;if(l===3)c[l]>1&&(c[l]=1);else if(c[l]>=1)return t}var y=Math.round(c[0]*255)+", "+Math.round(c[1]*255)+", "+Math.round(c[2]*255);return u?"rgba("+y+", "+c[3]+")":"rgb("+y+")"}},42996:function(te,X,e){var A=e(94724),P=e(25376),o=e(92880).extendFlat,L=e(67824).overrideAll;te.exports=L({orientation:{valType:"enumerated",values:["h","v"],dflt:"v"},thicknessmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels"},thickness:{valType:"number",min:0,dflt:30},lenmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"fraction"},len:{valType:"number",min:0,dflt:1},x:{valType:"number"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["left","center","right"]},xpad:{valType:"number",min:0,dflt:10},y:{valType:"number"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},ypad:{valType:"number",min:0,dflt:10},outlinecolor:A.linecolor,outlinewidth:A.linewidth,bordercolor:A.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:A.minor.tickmode,nticks:A.nticks,tick0:A.tick0,dtick:A.dtick,tickvals:A.tickvals,ticktext:A.ticktext,ticks:o({},A.ticks,{dflt:""}),ticklabeloverflow:o({},A.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:A.ticklen,tickwidth:A.tickwidth,tickcolor:A.tickcolor,ticklabelstep:A.ticklabelstep,showticklabels:A.showticklabels,labelalias:A.labelalias,tickfont:P({}),tickangle:A.tickangle,tickformat:A.tickformat,tickformatstops:A.tickformatstops,tickprefix:A.tickprefix,showtickprefix:A.showtickprefix,ticksuffix:A.ticksuffix,showticksuffix:A.showticksuffix,separatethousands:A.separatethousands,exponentformat:A.exponentformat,minexponent:A.minexponent,showexponent:A.showexponent,title:{text:{valType:"string"},font:P({}),side:{valType:"enumerated",values:["right","top","bottom"]}},_deprecated:{title:{valType:"string"},titlefont:P({}),titleside:{valType:"enumerated",values:["right","top","bottom"],dflt:"top"}}},"colorbars","from-root")},63964:function(te){te.exports={cn:{colorbar:"colorbar",cbbg:"cbbg",cbfill:"cbfill",cbfills:"cbfills",cbline:"cbline",cblines:"cblines",cbaxis:"cbaxis",cbtitleunshift:"cbtitleunshift",cbtitle:"cbtitle",cboutline:"cboutline",crisp:"crisp",jsPlaceholder:"js-placeholder"}}},64013:function(te,X,e){var A=e(3400),P=e(31780),o=e(26332),L=e(25404),M=e(95936),d=e(42568),g=e(42996);te.exports=function(t,s,a){var c=P.newContainer(s,"colorbar"),u=t.colorbar||{};function l(O,F){return A.coerce(u,c,g,O,F)}var y=a.margin||{t:0,b:0,l:0,r:0},h=a.width-y.l-y.r,T=a.height-y.t-y.b,f=l("orientation"),n=f==="v",v=l("thicknessmode");l("thickness",v==="fraction"?30/(n?h:T):30);var m=l("lenmode");l("len",m==="fraction"?1:n?T:h);var b=l("yref"),E=l("xref"),p=b==="paper",S=E==="paper",w,i,C,x="left";n?(C="middle",x=S?"left":"right",w=S?1.02:1,i=.5):(C=p?"bottom":"top",x="center",w=.5,i=p?1.02:1),A.coerce(u,c,{x:{valType:"number",min:S?-2:0,max:S?3:1,dflt:w}},"x"),A.coerce(u,c,{y:{valType:"number",min:p?-2:0,max:p?3:1,dflt:i}},"y"),l("xanchor",x),l("xpad"),l("yanchor",C),l("ypad"),A.noneOrAll(u,c,["x","y"]),l("outlinecolor"),l("outlinewidth"),l("bordercolor"),l("borderwidth"),l("bgcolor");var k=A.coerce(u,c,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:n?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");l("ticklabeloverflow",k.indexOf("inside")!==-1?"hide past domain":"hide past div"),o(u,c,l,"linear");var I=a.font,B={noAutotickangles:!0,outerTicks:!1,font:I};k.indexOf("inside")!==-1&&(B.bgColor="black"),d(u,c,l,"linear",B),M(u,c,l,"linear",B),L(u,c,l,"linear",B),l("title.text",a._dfltTitle.colorbar);var _=c.showticklabels?c.tickfont:I,z=A.extendFlat({},_,{color:I.color,size:A.bigFont(_.size)});A.coerceFont(l,"title.font",z),l("title.side",n?"top":"right")}},37848:function(te,X,e){var A=e(33428),P=e(49760),o=e(7316),L=e(24040),M=e(54460),d=e(86476),g=e(3400),r=g.strTranslate,t=e(92880).extendFlat,s=e(93972),a=e(43616),c=e(76308),u=e(81668),l=e(72736),y=e(94288).flipScale,h=e(28336),T=e(37668),f=e(94724),n=e(84284),v=n.LINE_SPACING,m=n.FROM_TL,b=n.FROM_BR,E=e(63964).cn;function p(k){var I=k._fullLayout,B=I._infolayer.selectAll("g."+E.colorbar).data(S(k),function(_){return _._id});B.enter().append("g").attr("class",function(_){return _._id}).classed(E.colorbar,!0),B.each(function(_){var z=A.select(this);g.ensureSingle(z,"rect",E.cbbg),g.ensureSingle(z,"g",E.cbfills),g.ensureSingle(z,"g",E.cblines),g.ensureSingle(z,"g",E.cbaxis,function(F){F.classed(E.crisp,!0)}),g.ensureSingle(z,"g",E.cbtitleunshift,function(F){F.append("g").classed(E.cbtitle,!0)}),g.ensureSingle(z,"rect",E.cboutline);var O=w(z,_,k);O&&O.then&&(k._promises||[]).push(O),k._context.edits.colorbarPosition&&i(z,_,k)}),B.exit().each(function(_){o.autoMargin(k,_._id)}).remove(),B.order()}function S(k){var I=k._fullLayout,B=k.calcdata,_=[],z,O,F,N;function V(K){return t(K,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function j(){typeof N.calc=="function"?N.calc(k,F,z):(z._fillgradient=O.reversescale?y(O.colorscale):O.colorscale,z._zrange=[O[N.min],O[N.max]])}for(var $=0;$1){var Oe=Math.pow(10,Math.floor(Math.log(He)/Math.LN10));Pe*=Oe*g.roundUp(He/Oe,[2,5,10]),(Math.abs(ve.start)/ve.size+1e-6)%1<2e-6&&(xt.tick0=0)}xt.dtick=Pe}xt.domain=_?[lt+G/Y.h,lt+Ne-G/Y.h]:[lt+Z/Y.w,lt+Ne-Z/Y.w],xt.setScale(),k.attr("transform",r(Math.round(Y.l),Math.round(Y.t)));var Ce=k.select("."+E.cbtitleunshift).attr("transform",r(-Math.round(Y.l),-Math.round(Y.t))),ge=xt.ticklabelposition,pe=xt.title.font.size,Te=k.select("."+E.cbaxis),be,ke=0,Ve=0;function je(gt,Ct){var Yt={propContainer:xt,propName:I._propPrefix+"title",traceIndex:I._traceIndex,_meta:I._meta,placeholder:K._dfltTitle.colorbar,containerGroup:k.select("."+E.cbtitle)},gr=gt.charAt(0)==="h"?gt.substr(1):"h"+gt;k.selectAll("."+gr+",."+gr+"-math-group").remove(),u.draw(B,gt,t(Yt,Ct||{}))}function at(){if(_&&Je||!_&&!Je){var gt,Ct;de==="top"&&(gt=Z+Y.l+et*re,Ct=G+Y.t+st*(1-lt-Ne)+3+pe*.75),de==="bottom"&&(gt=Z+Y.l+et*re,Ct=G+Y.t+st*(1-lt)-3-pe*.25),de==="right"&&(Ct=G+Y.t+st*H+3+pe*.75,gt=Z+Y.l+et*lt),je(xt._id+"title",{attributes:{x:gt,y:Ct,"text-anchor":_?"start":"middle"}})}}function ut(){if(_&&!Je||!_&&Je){var gt=xt.position||0,Ct=xt._offset+xt._length/2,Yt,gr;if(de==="right")gr=Ct,Yt=Y.l+et*gt+10+pe*(xt.showticklabels?1:.5);else if(Yt=Ct,de==="bottom"&&(gr=Y.t+st*gt+10+(ge.indexOf("inside")===-1?xt.tickfont.size:0)+(xt.ticks!=="intside"&&I.ticklen||0)),de==="top"){var ht=le.text.split("
").length;gr=Y.t+st*gt+10-_e-v*pe*ht}je((_?"h":"v")+xt._id+"title",{avoid:{selection:A.select(B).selectAll("g."+xt._id+"tick"),side:de,offsetTop:_?0:Y.t,offsetLeft:_?Y.l:0,maxShift:_?K.width:K.height},attributes:{x:Yt,y:gr,"text-anchor":"middle"},transform:{rotate:_?-90:0,offset:0}})}}function Nt(){if(!_&&!Je||_&&Je){var gt=k.select("."+E.cbtitle),Ct=gt.select("text"),Yt=[-V/2,V/2],gr=gt.select(".h"+xt._id+"title-math-group").node(),ht=15.6;Ct.node()&&(ht=parseInt(Ct.node().style.fontSize,10)*v);var Ht;if(gr?(Ht=a.bBox(gr),Ve=Ht.width,ke=Ht.height,ke>ht&&(Yt[1]-=(ke-ht)/2)):Ct.node()&&!Ct.classed(E.jsPlaceholder)&&(Ht=a.bBox(Ct.node()),Ve=Ht.width,ke=Ht.height),_){if(ke){if(ke+=5,de==="top")xt.domain[1]-=ke/Y.h,Yt[1]*=-1;else{xt.domain[0]+=ke/Y.h;var Wt=l.lineCount(Ct);Yt[1]+=(1-Wt)*ht}gt.attr("transform",r(Yt[0],Yt[1])),xt.setScale()}}else Ve&&(de==="right"&&(xt.domain[0]+=(Ve+pe/2)/Y.w),gt.attr("transform",r(Yt[0],Yt[1])),xt.setScale())}k.selectAll("."+E.cbfills+",."+E.cblines).attr("transform",_?r(0,Math.round(Y.h*(1-xt.domain[1]))):r(Math.round(Y.w*xt.domain[0]),0)),Te.attr("transform",_?r(0,Math.round(-Y.t)):r(Math.round(-Y.l),0));var cr=k.select("."+E.cbfills).selectAll("rect."+E.cbfill).attr("style","").data(ye);cr.enter().append("rect").classed(E.cbfill,!0).attr("style",""),cr.exit().remove();var er=we.map(xt.c2p).map(Math.round).sort(function(Et,Mt){return Et-Mt});cr.each(function(Et,Mt){var _t=[Mt===0?we[0]:(ye[Mt]+ye[Mt-1])/2,Mt===ye.length-1?we[1]:(ye[Mt]+ye[Mt+1])/2].map(xt.c2p).map(Math.round);_&&(_t[1]=g.constrain(_t[1]+(_t[1]>_t[0])?1:-1,er[0],er[1]));var It=A.select(this).attr(_?"x":"y",Ze).attr(_?"y":"x",A.min(_t)).attr(_?"width":"height",Math.max(_e,2)).attr(_?"height":"width",Math.max(A.max(_t)-A.min(_t),2));if(I._fillgradient)a.gradient(It,B,I._id,_?"vertical":"horizontalreversed",I._fillgradient,"fill");else{var Gt=Le(Et).replace("e-","");It.attr("fill",P(Gt).toHexString())}});var ct=k.select("."+E.cblines).selectAll("path."+E.cbline).data(ne.color&&ne.width?Se:[]);ct.enter().append("path").classed(E.cbline,!0),ct.exit().remove(),ct.each(function(Et){var Mt=Ze,_t=Math.round(xt.c2p(Et))+ne.width/2%1;A.select(this).attr("d","M"+(_?Mt+","+_t:_t+","+Mt)+(_?"h":"v")+_e).call(a.lineGroupStyle,ne.width,me(Et),ne.dash)}),Te.selectAll("g."+xt._id+"tick,path").remove();var qe=Ze+_e+(V||0)/2-(I.ticks==="outside"?1:0),dt=M.calcTicks(xt),bt=M.getTickSigns(xt)[2];return M.drawTicks(B,xt,{vals:xt.ticks==="inside"?M.clipEnds(xt,dt):dt,layer:Te,path:M.makeTickPath(xt,qe,bt),transFn:M.makeTransTickFn(xt)}),M.drawLabels(B,xt,{vals:dt,layer:Te,transFn:M.makeTransTickLabelFn(xt),labelFns:M.makeLabelFns(xt,qe)})}function Vt(){var gt,Ct=_e+V/2;ge.indexOf("inside")===-1&&(gt=a.bBox(Te.node()),Ct+=_?gt.width:gt.height),be=Ce.select("text");var Yt=0,gr=_&&de==="top",ht=!_&&de==="right",Ht=0;if(be.node()&&!be.classed(E.jsPlaceholder)){var Wt,cr=Ce.select(".h"+xt._id+"title-math-group").node();cr&&(_&&Je||!_&&!Je)?(gt=a.bBox(cr),Yt=gt.width,Wt=gt.height):(gt=a.bBox(Ce.node()),Yt=gt.right-Y.l-(_?Ze:vt),Wt=gt.bottom-Y.t-(_?vt:Ze),!_&&de==="top"&&(Ct+=gt.height,Ht=gt.height)),ht&&(be.attr("transform",r(Yt/2+pe/2,0)),Yt*=2),Ct=Math.max(Ct,_?Yt:Wt)}var er=(_?Z:G)*2+Ct+j+V/2,ct=0;!_&&le.text&&oe==="bottom"&&H<=0&&(ct=er/2,er+=ct,Ht+=ct),K._hColorbarMoveTitle=ct,K._hColorbarMoveCBTitle=Ht;var qe=j+V,dt=(_?Ze:vt)-qe/2-(_?Z:0),bt=(_?vt:Ze)-(_?Ie:G+Ht-ct);k.select("."+E.cbbg).attr("x",dt).attr("y",bt).attr(_?"width":"height",Math.max(er-ct,2)).attr(_?"height":"width",Math.max(Ie+qe,2)).call(c.fill,$).call(c.stroke,I.bordercolor).style("stroke-width",j);var Et=ht?Math.max(Yt-10,0):0;k.selectAll("."+E.cboutline).attr("x",(_?Ze:vt+Z)+Et).attr("y",(_?vt+G-Ie:Ze)+(gr?ke:0)).attr(_?"width":"height",Math.max(_e,2)).attr(_?"height":"width",Math.max(Ie-(_?2*G+ke:2*Z+Et),2)).call(c.stroke,I.outlinecolor).style({fill:"none","stroke-width":V});var Mt=_?Ke*er:0,_t=_?0:(1-nt)*er-Ht;if(Mt=ae?Y.l-Mt:-Mt,_t=J?Y.t-_t:-_t,k.attr("transform",r(Mt,_t)),!_&&(j||P($).getAlpha()&&!P.equals(K.paper_bgcolor,$))){var It=Te.selectAll("text"),Gt=It[0].length,nr=k.select("."+E.cbbg).node(),ar=a.bBox(nr),ir=a.getTranslate(k),Be=2;It.each(function(fr,vr){var lr=0,Or=Gt-1;if(vr===lr||vr===Or){var Sr=a.bBox(this),Ar=a.getTranslate(this),sn;if(vr===Or){var Jr=Sr.right+Ar.x,bn=ar.right+ir.x+vt-j-Be+re;sn=bn-Jr,sn>0&&(sn=0)}else if(vr===lr){var xn=Sr.left+Ar.x,or=ar.left+ir.x+vt+j+Be;sn=or-xn,sn<0&&(sn=0)}sn&&(Gt<3?this.setAttribute("transform","translate("+sn+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var Fe={},Rt=m[q],Lt=b[q],Ut=m[oe],Qt=b[oe],rr=er-_e;_?(O==="pixels"?(Fe.y=H,Fe.t=Ie*Ut,Fe.b=Ie*Qt):(Fe.t=Fe.b=0,Fe.yt=H+z*Ut,Fe.yb=H-z*Qt),N==="pixels"?(Fe.x=re,Fe.l=er*Rt,Fe.r=er*Lt):(Fe.l=rr*Rt,Fe.r=rr*Lt,Fe.xl=re-F*Rt,Fe.xr=re+F*Lt)):(O==="pixels"?(Fe.x=re,Fe.l=Ie*Rt,Fe.r=Ie*Lt):(Fe.l=Fe.r=0,Fe.xl=re+z*Rt,Fe.xr=re-z*Lt),N==="pixels"?(Fe.y=1-H,Fe.t=er*Ut,Fe.b=er*Qt):(Fe.t=rr*Ut,Fe.b=rr*Qt,Fe.yt=H-F*Ut,Fe.yb=H+F*Qt));var Kt=I.y<.5?"b":"t",Dt=I.x<.5?"l":"r";B._fullLayout._reservedMargin[I._id]={};var sr={r:K.width-dt-Mt,l:dt+Fe.r,b:K.height-bt-_t,t:bt+Fe.b};ae&&J?o.autoMargin(B,I._id,Fe):ae?B._fullLayout._reservedMargin[I._id][Kt]=sr[Kt]:J||_?B._fullLayout._reservedMargin[I._id][Dt]=sr[Dt]:B._fullLayout._reservedMargin[I._id][Kt]=sr[Kt]}return g.syncOrAsync([o.previousPromises,at,Nt,ut,o.previousPromises,Vt],B)}function i(k,I,B){var _=I.orientation==="v",z=B._fullLayout,O=z._size,F,N,V;d.init({element:k.node(),gd:B,prepFn:function(){F=k.attr("transform"),s(k)},moveFn:function(j,$){k.attr("transform",F+r(j,$)),N=d.align((_?I._uFrac:I._vFrac)+j/O.w,_?I._thickFrac:I._lenFrac,0,1,I.xanchor),V=d.align((_?I._vFrac:1-I._uFrac)-$/O.h,_?I._lenFrac:I._thickFrac,0,1,I.yanchor);var q=d.getCursor(N,V,I.xanchor,I.yanchor);s(k,q)},doneFn:function(){if(s(k),N!==void 0&&V!==void 0){var j={};j[I._propPrefix+"x"]=N,j[I._propPrefix+"y"]=V,I._traceIndex!==void 0?L.call("_guiRestyle",B,j,I._traceIndex):L.call("_guiRelayout",B,j)}}})}function C(k,I,B){var _=I._levels,z=[],O=[],F,N,V=_.end+_.size/100,j=_.size,$=1.001*B[0]-.001*B[1],q=1.001*B[1]-.001*B[0];for(N=0;N<1e5&&(F=_.start+N*j,!(j>0?F>=V:F<=V));N++)F>$&&F0?F>=V:F<=V));N++)F>B[0]&&Fh-l?l=h-(y-h):y-h=0?n=r.colorscale.sequential:n=r.colorscale.sequentialminus,c._sync("colorscale",n)}}},95504:function(te,X,e){var A=e(3400),P=e(94288).hasColorscale,o=e(94288).extractOpts;te.exports=function(M,d){function g(l,y){var h=l["_"+y];h!==void 0&&(l[y]=h)}function r(l,y){var h=y.container?A.nestedProperty(l,y.container).get():l;if(h)if(h.coloraxis)h._colorAx=d[h.coloraxis];else{var T=o(h),f=T.auto;(f||T.min===void 0)&&g(h,y.min),(f||T.max===void 0)&&g(h,y.max),T.autocolorscale&&g(h,"colorscale")}}for(var t=0;t=0;n--,v++){var m=h[n];f[v]=[1-m[0],m[1]]}return f}function u(h,T){T=T||{};for(var f=h.domain,n=h.range,v=n.length,m=new Array(v),b=0;b1.3333333333333333-g?d:g}},67416:function(te,X,e){var A=e(3400),P=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];te.exports=function(L,M,d,g){return d==="left"?L=0:d==="center"?L=1:d==="right"?L=2:L=A.constrain(Math.floor(L*3),0,2),g==="bottom"?M=0:g==="middle"?M=1:g==="top"?M=2:M=A.constrain(Math.floor(M*3),0,2),P[M][L]}},72760:function(te,X){X.selectMode=function(e){return e==="lasso"||e==="select"},X.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"},X.openMode=function(e){return e==="drawline"||e==="drawopenpath"},X.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"},X.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"},X.selectingOrDrawing=function(e){return X.freeMode(e)||X.rectMode(e)}},86476:function(te,X,e){var A=e(29128),P=e(52264),o=e(89184),L=e(3400).removeElement,M=e(33816),d=te.exports={};d.align=e(78316),d.getCursor=e(67416);var g=e(2616);d.unhover=g.wrapped,d.unhoverRaw=g.raw,d.init=function(a){var c=a.gd,u=1,l=c._context.doubleClickDelay,y=a.element,h,T,f,n,v,m,b,E;c._mouseDownTime||(c._mouseDownTime=0),y.style.pointerEvents="all",y.onmousedown=w,o?(y._ontouchstart&&y.removeEventListener("touchstart",y._ontouchstart),y._ontouchstart=w,y.addEventListener("touchstart",w,{passive:!1})):y.ontouchstart=w;function p(x,k,I){return Math.abs(x)"u"&&typeof x.clientY>"u"&&(x.clientX=h,x.clientY=T),f=new Date().getTime(),f-c._mouseDownTimel&&(u=Math.max(u-1,1)),c._dragged)a.doneFn&&a.doneFn();else if(a.clickFn&&a.clickFn(u,m),!E){var k;try{k=new MouseEvent("click",x)}catch{var I=t(x);k=document.createEvent("MouseEvents"),k.initMouseEvent("click",x.bubbles,x.cancelable,x.view,x.detail,x.screenX,x.screenY,I[0],I[1],x.ctrlKey,x.altKey,x.shiftKey,x.metaKey,x.button,x.relatedTarget)}b.dispatchEvent(k)}c._dragging=!1,c._dragged=!1}};function r(){var s=document.createElement("div");s.className="dragcover";var a=s.style;return a.position="fixed",a.left=0,a.right=0,a.top=0,a.bottom=0,a.zIndex=999999999,a.background="none",document.body.appendChild(s),s}d.coverSlip=r;function t(s){return A(s.changedTouches?s.changedTouches[0]:s,document.body)}},2616:function(te,X,e){var A=e(95924),P=e(91200),o=e(52200).getGraphDiv,L=e(92456),M=te.exports={};M.wrapped=function(d,g,r){d=o(d),d._fullLayout&&P.clear(d._fullLayout._uid+L.HOVERID),M.raw(d,g,r)},M.raw=function(g,r){var t=g._fullLayout,s=g._hoverdata;r||(r={}),!(r.target&&!g._dragged&&A.triggerHandler(g,"plotly_beforehover",r)===!1)&&(t._hoverlayer.selectAll("g").remove(),t._hoverlayer.selectAll("line").remove(),t._hoverlayer.selectAll("circle").remove(),g._hoverdata=void 0,r.target&&s&&g.emit("plotly_unhover",{event:r,points:s}))}},98192:function(te,X){X.u={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"},X.c={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},fillmode:{valType:"enumerated",values:["replace","overlay"],dflt:"replace",editType:"style"},bgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgcolor:{valType:"color",arrayOk:!0,editType:"style"},fgopacity:{valType:"number",editType:"style",min:0,max:1},size:{valType:"number",min:0,dflt:8,arrayOk:!0,editType:"style"},solidity:{valType:"number",min:0,max:1,dflt:.3,arrayOk:!0,editType:"style"},editType:"style"}},43616:function(te,X,e){var A=e(33428),P=e(3400),o=P.numberFormat,L=e(38248),M=e(49760),d=e(24040),g=e(76308),r=e(8932),t=P.strTranslate,s=e(72736),a=e(9616),c=e(84284),u=c.LINE_SPACING,l=e(13448).DESELECTDIM,y=e(43028),h=e(7152),T=e(10624).appendArrayPointValue,f=te.exports={};f.font=function(ve,Ae,ye,Se){P.isPlainObject(Ae)&&(Se=Ae.color,ye=Ae.size,Ae=Ae.family),Ae&&ve.style("font-family",Ae),ye+1&&ve.style("font-size",ye+"px"),Se&&ve.call(g.fill,Se)},f.setPosition=function(ve,Ae,ye){ve.attr("x",Ae).attr("y",ye)},f.setSize=function(ve,Ae,ye){ve.attr("width",Ae).attr("height",ye)},f.setRect=function(ve,Ae,ye,Se,_e){ve.call(f.setPosition,Ae,ye).call(f.setSize,Se,_e)},f.translatePoint=function(ve,Ae,ye,Se){var _e=ye.c2p(ve.x),ze=Se.c2p(ve.y);if(L(_e)&&L(ze)&&Ae.node())Ae.node().nodeName==="text"?Ae.attr("x",_e).attr("y",ze):Ae.attr("transform",t(_e,ze));else return!1;return!0},f.translatePoints=function(ve,Ae,ye){ve.each(function(Se){var _e=A.select(this);f.translatePoint(Se,_e,Ae,ye)})},f.hideOutsideRangePoint=function(ve,Ae,ye,Se,_e,ze){Ae.attr("display",ye.isPtWithinRange(ve,_e)&&Se.isPtWithinRange(ve,ze)?null:"none")},f.hideOutsideRangePoints=function(ve,Ae){if(Ae._hasClipOnAxisFalse){var ye=Ae.xaxis,Se=Ae.yaxis;ve.each(function(_e){var ze=_e[0].trace,Ie=ze.xcalendar,Ne=ze.ycalendar,et=d.traceIs(ze,"bar-like")?".bartext":".point,.textpoint";ve.selectAll(et).each(function(st){f.hideOutsideRangePoint(st,A.select(this),ye,Se,Ie,Ne)})})}},f.crispRound=function(ve,Ae,ye){return!Ae||!L(Ae)?ye||0:ve._context.staticPlot?Ae:Ae<1?1:Math.round(Ae)},f.singleLineStyle=function(ve,Ae,ye,Se,_e){Ae.style("fill","none");var ze=(((ve||[])[0]||{}).trace||{}).line||{},Ie=ye||ze.width||0,Ne=_e||ze.dash||"";g.stroke(Ae,Se||ze.color),f.dashLine(Ae,Ne,Ie)},f.lineGroupStyle=function(ve,Ae,ye,Se){ve.style("fill","none").each(function(_e){var ze=(((_e||[])[0]||{}).trace||{}).line||{},Ie=Ae||ze.width||0,Ne=Se||ze.dash||"";A.select(this).call(g.stroke,ye||ze.color).call(f.dashLine,Ne,Ie)})},f.dashLine=function(ve,Ae,ye){ye=+ye||0,Ae=f.dashStyle(Ae,ye),ve.style({"stroke-dasharray":Ae,"stroke-width":ye+"px"})},f.dashStyle=function(ve,Ae){Ae=+Ae||1;var ye=Math.max(Ae,3);return ve==="solid"?ve="":ve==="dot"?ve=ye+"px,"+ye+"px":ve==="dash"?ve=3*ye+"px,"+3*ye+"px":ve==="longdash"?ve=5*ye+"px,"+5*ye+"px":ve==="dashdot"?ve=3*ye+"px,"+ye+"px,"+ye+"px,"+ye+"px":ve==="longdashdot"&&(ve=5*ye+"px,"+2*ye+"px,"+ye+"px,"+2*ye+"px"),ve};function n(ve,Ae,ye,Se){var _e=Ae.fillpattern,ze=Ae.fillgradient,Ie=_e&&f.getPatternAttr(_e.shape,0,"");if(Ie){var Ne=f.getPatternAttr(_e.bgcolor,0,null),et=f.getPatternAttr(_e.fgcolor,0,null),st=_e.fgopacity,Ze=f.getPatternAttr(_e.size,0,8),Ke=f.getPatternAttr(_e.solidity,0,.3),nt=Ae.uid;f.pattern(ve,"point",ye,nt,Ie,Ze,Ke,void 0,_e.fillmode,Ne,et,st)}else if(ze&&ze.type!=="none"){var it=ze.type,lt="scatterfill-"+Ae.uid;if(Se&&(lt="legendfill-"+Ae.uid),!Se&&(ze.start!==void 0||ze.stop!==void 0)){var vt,xt;it==="horizontal"?(vt={x:ze.start,y:0},xt={x:ze.stop,y:0}):it==="vertical"&&(vt={x:0,y:ze.start},xt={x:0,y:ze.stop}),vt.x=Ae._xA.c2p(vt.x===void 0?Ae._extremes.x.min[0].val:vt.x,!0),vt.y=Ae._yA.c2p(vt.y===void 0?Ae._extremes.y.min[0].val:vt.y,!0),xt.x=Ae._xA.c2p(xt.x===void 0?Ae._extremes.x.max[0].val:xt.x,!0),xt.y=Ae._yA.c2p(xt.y===void 0?Ae._extremes.y.max[0].val:xt.y,!0),ve.call(w,ye,lt,"linear",ze.colorscale,"fill",vt,xt,!0,!1)}else it==="horizontal"&&(it=it+"reversed"),ve.call(f.gradient,ye,lt,it,ze.colorscale,"fill")}else Ae.fillcolor&&ve.call(g.fill,Ae.fillcolor)}f.singleFillStyle=function(ve,Ae){var ye=A.select(ve.node()),Se=ye.data(),_e=((Se[0]||[])[0]||{}).trace||{};n(ve,_e,Ae,!1)},f.fillGroupStyle=function(ve,Ae,ye){ve.style("stroke-width",0).each(function(Se){var _e=A.select(this);Se[0].trace&&n(_e,Se[0].trace,Ae,ye)})};var v=e(71984);f.symbolNames=[],f.symbolFuncs=[],f.symbolBackOffs=[],f.symbolNeedLines={},f.symbolNoDot={},f.symbolNoFill={},f.symbolList=[],Object.keys(v).forEach(function(ve){var Ae=v[ve],ye=Ae.n;f.symbolList.push(ye,String(ye),ve,ye+100,String(ye+100),ve+"-open"),f.symbolNames[ye]=ve,f.symbolFuncs[ye]=Ae.f,f.symbolBackOffs[ye]=Ae.backoff||0,Ae.needLine&&(f.symbolNeedLines[ye]=!0),Ae.noDot?f.symbolNoDot[ye]=!0:f.symbolList.push(ye+200,String(ye+200),ve+"-dot",ye+300,String(ye+300),ve+"-open-dot"),Ae.noFill&&(f.symbolNoFill[ye]=!0)});var m=f.symbolNames.length,b="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";f.symbolNumber=function(ve){if(L(ve))ve=+ve;else if(typeof ve=="string"){var Ae=0;ve.indexOf("-open")>0&&(Ae=100,ve=ve.replace("-open","")),ve.indexOf("-dot")>0&&(Ae+=200,ve=ve.replace("-dot","")),ve=f.symbolNames.indexOf(ve),ve>=0&&(ve+=Ae)}return ve%100>=m||ve>=400?0:Math.floor(Math.max(ve,0))};function E(ve,Ae,ye,Se){var _e=ve%100;return f.symbolFuncs[_e](Ae,ye,Se)+(ve>=200?b:"")}var p=o("~f"),S={radial:{type:"radial"},radialreversed:{type:"radial",reversed:!0},horizontal:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0}},horizontalreversed:{type:"linear",start:{x:1,y:0},stop:{x:0,y:0},reversed:!0},vertical:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0}},verticalreversed:{type:"linear",start:{x:0,y:1},stop:{x:0,y:0},reversed:!0}};f.gradient=function(ve,Ae,ye,Se,_e,ze){var Ie=S[Se];return w(ve,Ae,ye,Ie.type,_e,ze,Ie.start,Ie.stop,!1,Ie.reversed)};function w(ve,Ae,ye,Se,_e,ze,Ie,Ne,et,st){var Ze=_e.length,Ke;Se==="linear"?Ke={node:"linearGradient",attrs:{x1:Ie.x,y1:Ie.y,x2:Ne.x,y2:Ne.y,gradientUnits:et?"userSpaceOnUse":"objectBoundingBox"},reversed:st}:Se==="radial"&&(Ke={node:"radialGradient",reversed:st});for(var nt=new Array(Ze),it=0;it=0&&ve.i===void 0&&(ve.i=ze.i),Ae.style("opacity",Se.selectedOpacityFn?Se.selectedOpacityFn(ve):ve.mo===void 0?Ie.opacity:ve.mo),Se.ms2mrc){var et;ve.ms==="various"||Ie.size==="various"?et=3:et=Se.ms2mrc(ve.ms),ve.mrc=et,Se.selectedSizeFn&&(et=ve.mrc=Se.selectedSizeFn(ve));var st=f.symbolNumber(ve.mx||Ie.symbol)||0;ve.om=st%200>=100;var Ze=Le(ve,ye),Ke=H(ve,ye);Ae.attr("d",E(st,et,Ze,Ke))}var nt=!1,it,lt,vt;if(ve.so)vt=Ne.outlierwidth,lt=Ne.outliercolor,it=Ie.outliercolor;else{var xt=(Ne||{}).width;vt=(ve.mlw+1||xt+1||(ve.trace?(ve.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in ve?lt=ve.mlcc=Se.lineScale(ve.mlc):P.isArrayOrTypedArray(Ne.color)?lt=g.defaultLine:lt=Ne.color,P.isArrayOrTypedArray(Ie.color)&&(it=g.defaultLine,nt=!0),"mc"in ve?it=ve.mcc=Se.markerScale(ve.mc):it=Ie.color||Ie.colors||"rgba(0,0,0,0)",Se.selectedColorFn&&(it=Se.selectedColorFn(ve))}if(ve.om)Ae.call(g.stroke,it).style({"stroke-width":(vt||1)+"px",fill:"none"});else{Ae.style("stroke-width",(ve.isBlank?0:vt)+"px");var Je=Ie.gradient,Pe=ve.mgt;Pe?nt=!0:Pe=Je&&Je.type,P.isArrayOrTypedArray(Pe)&&(Pe=Pe[0],S[Pe]||(Pe=0));var Ue=Ie.pattern,He=Ue&&f.getPatternAttr(Ue.shape,ve.i,"");if(Pe&&Pe!=="none"){var Oe=ve.mgc;Oe?nt=!0:Oe=Je.color;var Ce=ye.uid;nt&&(Ce+="-"+ve.i),f.gradient(Ae,_e,Ce,Pe,[[0,Oe],[1,it]],"fill")}else if(He){var ge=!1,pe=Ue.fgcolor;!pe&&ze&&ze.color&&(pe=ze.color,ge=!0);var Te=f.getPatternAttr(pe,ve.i,ze&&ze.color||null),be=f.getPatternAttr(Ue.bgcolor,ve.i,null),ke=Ue.fgopacity,Ve=f.getPatternAttr(Ue.size,ve.i,8),je=f.getPatternAttr(Ue.solidity,ve.i,.3);ge=ge||ve.mcc||P.isArrayOrTypedArray(Ue.shape)||P.isArrayOrTypedArray(Ue.bgcolor)||P.isArrayOrTypedArray(Ue.fgcolor)||P.isArrayOrTypedArray(Ue.size)||P.isArrayOrTypedArray(Ue.solidity);var at=ye.uid;ge&&(at+="-"+ve.i),f.pattern(Ae,"point",_e,at,He,Ve,je,ve.mcc,Ue.fillmode,be,Te,ke)}else P.isArrayOrTypedArray(it)?g.fill(Ae,it[ve.i]):g.fill(Ae,it);vt&&g.stroke(Ae,lt)}},f.makePointStyleFns=function(ve){var Ae={},ye=ve.marker;return Ae.markerScale=f.tryColorscale(ye,""),Ae.lineScale=f.tryColorscale(ye,"line"),d.traceIs(ve,"symbols")&&(Ae.ms2mrc=y.isBubble(ve)?h(ve):function(){return(ye.size||6)/2}),ve.selectedpoints&&P.extendFlat(Ae,f.makeSelectedPointStyleFns(ve)),Ae},f.makeSelectedPointStyleFns=function(ve){var Ae={},ye=ve.selected||{},Se=ve.unselected||{},_e=ve.marker||{},ze=ye.marker||{},Ie=Se.marker||{},Ne=_e.opacity,et=ze.opacity,st=Ie.opacity,Ze=et!==void 0,Ke=st!==void 0;(P.isArrayOrTypedArray(Ne)||Ze||Ke)&&(Ae.selectedOpacityFn=function(He){var Oe=He.mo===void 0?_e.opacity:He.mo;return He.selected?Ze?et:Oe:Ke?st:l*Oe});var nt=_e.color,it=ze.color,lt=Ie.color;(it||lt)&&(Ae.selectedColorFn=function(He){var Oe=He.mcc||nt;return He.selected?it||Oe:lt||Oe});var vt=_e.size,xt=ze.size,Je=Ie.size,Pe=xt!==void 0,Ue=Je!==void 0;return d.traceIs(ve,"symbols")&&(Pe||Ue)&&(Ae.selectedSizeFn=function(He){var Oe=He.mrc||vt/2;return He.selected?Pe?xt/2:Oe:Ue?Je/2:Oe}),Ae},f.makeSelectedTextStyleFns=function(ve){var Ae={},ye=ve.selected||{},Se=ve.unselected||{},_e=ve.textfont||{},ze=ye.textfont||{},Ie=Se.textfont||{},Ne=_e.color,et=ze.color,st=Ie.color;return Ae.selectedTextColorFn=function(Ze){var Ke=Ze.tc||Ne;return Ze.selected?et||Ke:st||(et?Ke:g.addOpacity(Ke,l))},Ae},f.selectedPointStyle=function(ve,Ae){if(!(!ve.size()||!Ae.selectedpoints)){var ye=f.makeSelectedPointStyleFns(Ae),Se=Ae.marker||{},_e=[];ye.selectedOpacityFn&&_e.push(function(ze,Ie){ze.style("opacity",ye.selectedOpacityFn(Ie))}),ye.selectedColorFn&&_e.push(function(ze,Ie){g.fill(ze,ye.selectedColorFn(Ie))}),ye.selectedSizeFn&&_e.push(function(ze,Ie){var Ne=Ie.mx||Se.symbol||0,et=ye.selectedSizeFn(Ie);ze.attr("d",E(f.symbolNumber(Ne),et,Le(Ie,Ae),H(Ie,Ae))),Ie.mrc2=et}),_e.length&&ve.each(function(ze){for(var Ie=A.select(this),Ne=0;Ne<_e.length;Ne++)_e[Ne](Ie,ze)})}},f.tryColorscale=function(ve,Ae){var ye=Ae?P.nestedProperty(ve,Ae).get():ve;if(ye){var Se=ye.color;if((ye.colorscale||ye._colorAx)&&P.isArrayOrTypedArray(Se))return r.makeColorScaleFuncFromTrace(ye)}return P.identity};var i={start:1,end:-1,middle:0,bottom:1,top:-1};function C(ve,Ae,ye,Se,_e){var ze=A.select(ve.node().parentNode),Ie=Ae.indexOf("top")!==-1?"top":Ae.indexOf("bottom")!==-1?"bottom":"middle",Ne=Ae.indexOf("left")!==-1?"end":Ae.indexOf("right")!==-1?"start":"middle",et=Se?Se/.8+1:0,st=(s.lineCount(ve)-1)*u+1,Ze=i[Ne]*et,Ke=ye*.75+i[Ie]*et+(i[Ie]-1)*st*ye/2;ve.attr("text-anchor",Ne),_e||ze.attr("transform",t(Ze,Ke))}function x(ve,Ae){var ye=ve.ts||Ae.textfont.size;return L(ye)&&ye>0?ye:0}f.textPointStyle=function(ve,Ae,ye){if(ve.size()){var Se;if(Ae.selectedpoints){var _e=f.makeSelectedTextStyleFns(Ae);Se=_e.selectedTextColorFn}var ze=Ae.texttemplate,Ie=ye._fullLayout;ve.each(function(Ne){var et=A.select(this),st=ze?P.extractOption(Ne,Ae,"txt","texttemplate"):P.extractOption(Ne,Ae,"tx","text");if(!st&&st!==0){et.remove();return}if(ze){var Ze=Ae._module.formatLabels,Ke=Ze?Ze(Ne,Ae,Ie):{},nt={};T(nt,Ae,Ne.i);var it=Ae._meta||{};st=P.texttemplateString(st,Ke,Ie._d3locale,nt,Ne,it)}var lt=Ne.tp||Ae.textposition,vt=x(Ne,Ae),xt=Se?Se(Ne):Ne.tc||Ae.textfont.color;et.call(f.font,Ne.tf||Ae.textfont.family,vt,xt).text(st).call(s.convertToTspans,ye).call(C,lt,vt,Ne.mrc)})}},f.selectedTextStyle=function(ve,Ae){if(!(!ve.size()||!Ae.selectedpoints)){var ye=f.makeSelectedTextStyleFns(Ae);ve.each(function(Se){var _e=A.select(this),ze=ye.selectedTextColorFn(Se),Ie=Se.tp||Ae.textposition,Ne=x(Se,Ae);g.fill(_e,ze);var et=d.traceIs(Ae,"bar-like");C(_e,Ie,Ne,Se.mrc2||Se.mrc,et)})}};var k=.5;f.smoothopen=function(ve,Ae){if(ve.length<3)return"M"+ve.join("L");var ye="M"+ve[0],Se=[],_e;for(_e=1;_e=et||He>=Ze&&He<=et)&&(Oe<=Ke&&Oe>=st||Oe>=Ke&&Oe<=st)&&(ve=[He,Oe])}return ve}f.applyBackoff=j,f.makeTester=function(){var ve=P.ensureSingleById(A.select("body"),"svg","js-plotly-tester",function(ye){ye.attr(a.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),Ae=P.ensureSingle(ve,"path","js-reference-point",function(ye){ye.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});f.tester=ve,f.testref=Ae},f.savedBBoxes={};var $=0,q=1e4;f.bBox=function(ve,Ae,ye){ye||(ye=oe(ve));var Se;if(ye){if(Se=f.savedBBoxes[ye],Se)return P.extendFlat({},Se)}else if(ve.childNodes.length===1){var _e=ve.childNodes[0];if(ye=oe(_e),ye){var ze=+_e.getAttribute("x")||0,Ie=+_e.getAttribute("y")||0,Ne=_e.getAttribute("transform");if(!Ne){var et=f.bBox(_e,!1,ye);return ze&&(et.left+=ze,et.right+=ze),Ie&&(et.top+=Ie,et.bottom+=Ie),et}if(ye+="~"+ze+"~"+Ie+"~"+Ne,Se=f.savedBBoxes[ye],Se)return P.extendFlat({},Se)}}var st,Ze;Ae?st=ve:(Ze=f.tester.node(),st=ve.cloneNode(!0),Ze.appendChild(st)),A.select(st).attr("transform",null).call(s.positionText,0,0);var Ke=st.getBoundingClientRect(),nt=f.testref.node().getBoundingClientRect();Ae||Ze.removeChild(st);var it={height:Ke.height,width:Ke.width,left:Ke.left-nt.left,top:Ke.top-nt.top,right:Ke.right-nt.left,bottom:Ke.bottom-nt.top};return $>=q&&(f.savedBBoxes={},$=0),ye&&(f.savedBBoxes[ye]=it),$++,P.extendFlat({},it)};function oe(ve){var Ae=ve.getAttribute("data-unformatted");if(Ae!==null)return Ae+ve.getAttribute("data-math")+ve.getAttribute("text-anchor")+ve.getAttribute("style")}f.setClipUrl=function(ve,Ae,ye){ve.attr("clip-path",Z(Ae,ye))};function Z(ve,Ae){if(!ve)return null;var ye=Ae._context,Se=ye._exportedPlot?"":ye._baseUrl||"";return Se?"url('"+Se+"#"+ve+"')":"url(#"+ve+")"}f.getTranslate=function(ve){var Ae=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,ye=ve.attr?"attr":"getAttribute",Se=ve[ye]("transform")||"",_e=Se.replace(Ae,function(ze,Ie,Ne){return[Ie,Ne].join(" ")}).split(" ");return{x:+_e[0]||0,y:+_e[1]||0}},f.setTranslate=function(ve,Ae,ye){var Se=/(\btranslate\(.*?\);?)/,_e=ve.attr?"attr":"getAttribute",ze=ve.attr?"attr":"setAttribute",Ie=ve[_e]("transform")||"";return Ae=Ae||0,ye=ye||0,Ie=Ie.replace(Se,"").trim(),Ie+=t(Ae,ye),Ie=Ie.trim(),ve[ze]("transform",Ie),Ie},f.getScale=function(ve){var Ae=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,ye=ve.attr?"attr":"getAttribute",Se=ve[ye]("transform")||"",_e=Se.replace(Ae,function(ze,Ie,Ne){return[Ie,Ne].join(" ")}).split(" ");return{x:+_e[0]||1,y:+_e[1]||1}},f.setScale=function(ve,Ae,ye){var Se=/(\bscale\(.*?\);?)/,_e=ve.attr?"attr":"getAttribute",ze=ve.attr?"attr":"setAttribute",Ie=ve[_e]("transform")||"";return Ae=Ae||1,ye=ye||1,Ie=Ie.replace(Se,"").trim(),Ie+="scale("+Ae+","+ye+")",Ie=Ie.trim(),ve[ze]("transform",Ie),Ie};var G=/\s*sc.*/;f.setPointGroupScale=function(ve,Ae,ye){if(Ae=Ae||1,ye=ye||1,!!ve){var Se=Ae===1&&ye===1?"":"scale("+Ae+","+ye+")";ve.each(function(){var _e=(this.getAttribute("transform")||"").replace(G,"");_e+=Se,_e=_e.trim(),this.setAttribute("transform",_e)})}};var re=/translate\([^)]*\)\s*$/;f.setTextPointsScale=function(ve,Ae,ye){ve&&ve.each(function(){var Se,_e=A.select(this),ze=_e.select("text");if(ze.node()){var Ie=parseFloat(ze.attr("x")||0),Ne=parseFloat(ze.attr("y")||0),et=(_e.attr("transform")||"").match(re);Ae===1&&ye===1?Se=[]:Se=[t(Ie,Ne),"scale("+Ae+","+ye+")",t(-Ie,-Ne)],et&&Se.push(et),_e.attr("transform",Se.join(""))}})};function H(ve,Ae){var ye;return ve&&(ye=ve.mf),ye===void 0&&(ye=Ae.marker&&Ae.marker.standoff||0),!Ae._geo&&!Ae._xA?-ye:ye}f.getMarkerStandoff=H;var J=Math.atan2,ae=Math.cos,K=Math.sin;function Y(ve,Ae){var ye=Ae[0],Se=Ae[1];return[ye*ae(ve)-Se*K(ve),ye*K(ve)+Se*ae(ve)]}var ie,ne,le,de,we,me;function Le(ve,Ae){var ye=ve.ma;ye===void 0&&(ye=Ae.marker.angle,(!ye||P.isArrayOrTypedArray(ye))&&(ye=0));var Se,_e,ze=Ae.marker.angleref;if(ze==="previous"||ze==="north"){if(Ae._geo){var Ie=Ae._geo.project(ve.lonlat);Se=Ie[0],_e=Ie[1]}else{var Ne=Ae._xA,et=Ae._yA;if(Ne&&et)Se=Ne.c2p(ve.x),_e=et.c2p(ve.y);else return 90}if(Ae._geo){var st=ve.lonlat[0],Ze=ve.lonlat[1],Ke=Ae._geo.project([st,Ze+1e-5]),nt=Ae._geo.project([st+1e-5,Ze]),it=J(nt[1]-_e,nt[0]-Se),lt=J(Ke[1]-_e,Ke[0]-Se),vt;if(ze==="north")vt=ye/180*Math.PI;else if(ze==="previous"){var xt=st/180*Math.PI,Je=Ze/180*Math.PI,Pe=ie/180*Math.PI,Ue=ne/180*Math.PI,He=Pe-xt,Oe=ae(Ue)*K(He),Ce=K(Ue)*ae(Je)-ae(Ue)*K(Je)*ae(He);vt=-J(Oe,Ce)-Math.PI,ie=st,ne=Ze}var ge=Y(it,[ae(vt),0]),pe=Y(lt,[K(vt),0]);ye=J(ge[1]+pe[1],ge[0]+pe[0])/Math.PI*180,ze==="previous"&&!(me===Ae.uid&&ve.i===we+1)&&(ye=null)}if(ze==="previous"&&!Ae._geo)if(me===Ae.uid&&ve.i===we+1&&L(Se)&&L(_e)){var Te=Se-le,be=_e-de,ke=Ae.line&&Ae.line.shape||"",Ve=ke.slice(ke.length-1);Ve==="h"&&(be=0),Ve==="v"&&(Te=0),ye+=J(be,Te)/Math.PI*180+90}else ye=null}return le=Se,de=_e,we=ve.i,me=Ae.uid,ye}f.getMarkerAngle=Le},71984:function(te,X,e){var A=e(21984),P=e(33428).round,o="M0,0Z",L=Math.sqrt(2),M=Math.sqrt(3),d=Math.PI,g=Math.cos,r=Math.sin;te.exports={circle:{n:0,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n="M"+f+",0A"+f+","+f+" 0 1,1 0,-"+f+"A"+f+","+f+" 0 0,1 "+f+",0Z";return T?l(h,T,n):n}},square:{n:1,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"H-"+f+"V-"+f+"H"+f+"Z")}},diamond:{n:2,f:function(y,h,T){if(t(h))return o;var f=P(y*1.3,2);return l(h,T,"M"+f+",0L0,"+f+"L-"+f+",0L0,-"+f+"Z")}},cross:{n:3,f:function(y,h,T){if(t(h))return o;var f=P(y*.4,2),n=P(y*1.2,2);return l(h,T,"M"+n+","+f+"H"+f+"V"+n+"H-"+f+"V"+f+"H-"+n+"V-"+f+"H-"+f+"V-"+n+"H"+f+"V-"+f+"H"+n+"Z")}},x:{n:4,f:function(y,h,T){if(t(h))return o;var f=P(y*.8/L,2),n="l"+f+","+f,v="l"+f+",-"+f,m="l-"+f+",-"+f,b="l-"+f+","+f;return l(h,T,"M0,"+f+n+v+m+v+m+b+m+b+n+b+n+"Z")}},"triangle-up":{n:5,f:function(y,h,T){if(t(h))return o;var f=P(y*2/M,2),n=P(y/2,2),v=P(y,2);return l(h,T,"M-"+f+","+n+"H"+f+"L0,-"+v+"Z")}},"triangle-down":{n:6,f:function(y,h,T){if(t(h))return o;var f=P(y*2/M,2),n=P(y/2,2),v=P(y,2);return l(h,T,"M-"+f+",-"+n+"H"+f+"L0,"+v+"Z")}},"triangle-left":{n:7,f:function(y,h,T){if(t(h))return o;var f=P(y*2/M,2),n=P(y/2,2),v=P(y,2);return l(h,T,"M"+n+",-"+f+"V"+f+"L-"+v+",0Z")}},"triangle-right":{n:8,f:function(y,h,T){if(t(h))return o;var f=P(y*2/M,2),n=P(y/2,2),v=P(y,2);return l(h,T,"M-"+n+",-"+f+"V"+f+"L"+v+",0Z")}},"triangle-ne":{n:9,f:function(y,h,T){if(t(h))return o;var f=P(y*.6,2),n=P(y*1.2,2);return l(h,T,"M-"+n+",-"+f+"H"+f+"V"+n+"Z")}},"triangle-se":{n:10,f:function(y,h,T){if(t(h))return o;var f=P(y*.6,2),n=P(y*1.2,2);return l(h,T,"M"+f+",-"+n+"V"+f+"H-"+n+"Z")}},"triangle-sw":{n:11,f:function(y,h,T){if(t(h))return o;var f=P(y*.6,2),n=P(y*1.2,2);return l(h,T,"M"+n+","+f+"H-"+f+"V-"+n+"Z")}},"triangle-nw":{n:12,f:function(y,h,T){if(t(h))return o;var f=P(y*.6,2),n=P(y*1.2,2);return l(h,T,"M-"+f+","+n+"V-"+f+"H"+n+"Z")}},pentagon:{n:13,f:function(y,h,T){if(t(h))return o;var f=P(y*.951,2),n=P(y*.588,2),v=P(-y,2),m=P(y*-.309,2),b=P(y*.809,2);return l(h,T,"M"+f+","+m+"L"+n+","+b+"H-"+n+"L-"+f+","+m+"L0,"+v+"Z")}},hexagon:{n:14,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y/2,2),v=P(y*M/2,2);return l(h,T,"M"+v+",-"+n+"V"+n+"L0,"+f+"L-"+v+","+n+"V-"+n+"L0,-"+f+"Z")}},hexagon2:{n:15,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y/2,2),v=P(y*M/2,2);return l(h,T,"M-"+n+","+v+"H"+n+"L"+f+",0L"+n+",-"+v+"H-"+n+"L-"+f+",0Z")}},octagon:{n:16,f:function(y,h,T){if(t(h))return o;var f=P(y*.924,2),n=P(y*.383,2);return l(h,T,"M-"+n+",-"+f+"H"+n+"L"+f+",-"+n+"V"+n+"L"+n+","+f+"H-"+n+"L-"+f+","+n+"V-"+n+"Z")}},star:{n:17,f:function(y,h,T){if(t(h))return o;var f=y*1.4,n=P(f*.225,2),v=P(f*.951,2),m=P(f*.363,2),b=P(f*.588,2),E=P(-f,2),p=P(f*-.309,2),S=P(f*.118,2),w=P(f*.809,2),i=P(f*.382,2);return l(h,T,"M"+n+","+p+"H"+v+"L"+m+","+S+"L"+b+","+w+"L0,"+i+"L-"+b+","+w+"L-"+m+","+S+"L-"+v+","+p+"H-"+n+"L0,"+E+"Z")}},hexagram:{n:18,f:function(y,h,T){if(t(h))return o;var f=P(y*.66,2),n=P(y*.38,2),v=P(y*.76,2);return l(h,T,"M-"+v+",0l-"+n+",-"+f+"h"+v+"l"+n+",-"+f+"l"+n+","+f+"h"+v+"l-"+n+","+f+"l"+n+","+f+"h-"+v+"l-"+n+","+f+"l-"+n+",-"+f+"h-"+v+"Z")}},"star-triangle-up":{n:19,f:function(y,h,T){if(t(h))return o;var f=P(y*M*.8,2),n=P(y*.8,2),v=P(y*1.6,2),m=P(y*4,2),b="A "+m+","+m+" 0 0 1 ";return l(h,T,"M-"+f+","+n+b+f+","+n+b+"0,-"+v+b+"-"+f+","+n+"Z")}},"star-triangle-down":{n:20,f:function(y,h,T){if(t(h))return o;var f=P(y*M*.8,2),n=P(y*.8,2),v=P(y*1.6,2),m=P(y*4,2),b="A "+m+","+m+" 0 0 1 ";return l(h,T,"M"+f+",-"+n+b+"-"+f+",-"+n+b+"0,"+v+b+f+",-"+n+"Z")}},"star-square":{n:21,f:function(y,h,T){if(t(h))return o;var f=P(y*1.1,2),n=P(y*2,2),v="A "+n+","+n+" 0 0 1 ";return l(h,T,"M-"+f+",-"+f+v+"-"+f+","+f+v+f+","+f+v+f+",-"+f+v+"-"+f+",-"+f+"Z")}},"star-diamond":{n:22,f:function(y,h,T){if(t(h))return o;var f=P(y*1.4,2),n=P(y*1.9,2),v="A "+n+","+n+" 0 0 1 ";return l(h,T,"M-"+f+",0"+v+"0,"+f+v+f+",0"+v+"0,-"+f+v+"-"+f+",0Z")}},"diamond-tall":{n:23,f:function(y,h,T){if(t(h))return o;var f=P(y*.7,2),n=P(y*1.4,2);return l(h,T,"M0,"+n+"L"+f+",0L0,-"+n+"L-"+f+",0Z")}},"diamond-wide":{n:24,f:function(y,h,T){if(t(h))return o;var f=P(y*1.4,2),n=P(y*.7,2);return l(h,T,"M0,"+n+"L"+f+",0L0,-"+n+"L-"+f+",0Z")}},hourglass:{n:25,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"H-"+f+"L"+f+",-"+f+"H-"+f+"Z")},noDot:!0},bowtie:{n:26,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"V-"+f+"L-"+f+","+f+"V-"+f+"Z")},noDot:!0},"circle-cross":{n:27,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M0,"+f+"V-"+f+"M"+f+",0H-"+f+"M"+f+",0A"+f+","+f+" 0 1,1 0,-"+f+"A"+f+","+f+" 0 0,1 "+f+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y/L,2);return l(h,T,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+f+",0A"+f+","+f+" 0 1,1 0,-"+f+"A"+f+","+f+" 0 0,1 "+f+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M0,"+f+"V-"+f+"M"+f+",0H-"+f+"M"+f+","+f+"H-"+f+"V-"+f+"H"+f+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"L-"+f+",-"+f+"M"+f+",-"+f+"L-"+f+","+f+"M"+f+","+f+"H-"+f+"V-"+f+"H"+f+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(y,h,T){if(t(h))return o;var f=P(y*1.3,2);return l(h,T,"M"+f+",0L0,"+f+"L-"+f+",0L0,-"+f+"ZM0,-"+f+"V"+f+"M-"+f+",0H"+f)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(y,h,T){if(t(h))return o;var f=P(y*1.3,2),n=P(y*.65,2);return l(h,T,"M"+f+",0L0,"+f+"L-"+f+",0L0,-"+f+"ZM-"+n+",-"+n+"L"+n+","+n+"M-"+n+","+n+"L"+n+",-"+n)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(y,h,T){if(t(h))return o;var f=P(y*1.4,2);return l(h,T,"M0,"+f+"V-"+f+"M"+f+",0H-"+f)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"L-"+f+",-"+f+"M"+f+",-"+f+"L-"+f+","+f)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(y,h,T){if(t(h))return o;var f=P(y*1.2,2),n=P(y*.85,2);return l(h,T,"M0,"+f+"V-"+f+"M"+f+",0H-"+f+"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(y,h,T){if(t(h))return o;var f=P(y/2,2),n=P(y,2);return l(h,T,"M"+f+","+n+"V-"+n+"M"+(f-n)+",-"+n+"V"+n+"M"+n+","+f+"H-"+n+"M-"+n+","+(f-n)+"H"+n)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(y,h,T){if(t(h))return o;var f=P(y*1.2,2),n=P(y*1.6,2),v=P(y*.8,2);return l(h,T,"M-"+f+","+v+"L0,0M"+f+","+v+"L0,0M0,-"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(y,h,T){if(t(h))return o;var f=P(y*1.2,2),n=P(y*1.6,2),v=P(y*.8,2);return l(h,T,"M-"+f+",-"+v+"L0,0M"+f+",-"+v+"L0,0M0,"+n+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(y,h,T){if(t(h))return o;var f=P(y*1.2,2),n=P(y*1.6,2),v=P(y*.8,2);return l(h,T,"M"+v+","+f+"L0,0M"+v+",-"+f+"L0,0M-"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(y,h,T){if(t(h))return o;var f=P(y*1.2,2),n=P(y*1.6,2),v=P(y*.8,2);return l(h,T,"M-"+v+","+f+"L0,0M-"+v+",-"+f+"L0,0M"+n+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(y,h,T){if(t(h))return o;var f=P(y*1.4,2);return l(h,T,"M"+f+",0H-"+f)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(y,h,T){if(t(h))return o;var f=P(y*1.4,2);return l(h,T,"M0,"+f+"V-"+f)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+",-"+f+"L-"+f+","+f)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(y,h,T){if(t(h))return o;var f=P(y,2);return l(h,T,"M"+f+","+f+"L-"+f+",-"+f)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y*2,2);return l(h,T,"M0,0L-"+f+","+n+"H"+f+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y*2,2);return l(h,T,"M0,0L-"+f+",-"+n+"H"+f+"Z")},noDot:!0},"arrow-left":{n:47,f:function(y,h,T){if(t(h))return o;var f=P(y*2,2),n=P(y,2);return l(h,T,"M0,0L"+f+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-right":{n:48,f:function(y,h,T){if(t(h))return o;var f=P(y*2,2),n=P(y,2);return l(h,T,"M0,0L-"+f+",-"+n+"V"+n+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y*2,2);return l(h,T,"M-"+f+",0H"+f+"M0,0L-"+f+","+n+"H"+f+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(y,h,T){if(t(h))return o;var f=P(y,2),n=P(y*2,2);return l(h,T,"M-"+f+",0H"+f+"M0,0L-"+f+",-"+n+"H"+f+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(y,h,T){if(t(h))return o;var f=P(y*2,2),n=P(y,2);return l(h,T,"M0,-"+n+"V"+n+"M0,0L"+f+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(y,h,T){if(t(h))return o;var f=P(y*2,2),n=P(y,2);return l(h,T,"M0,-"+n+"V"+n+"M0,0L-"+f+",-"+n+"V"+n+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(y,h,T){if(t(h))return o;var f=d/2.5,n=2*y*g(f),v=2*y*r(f);return l(h,T,"M0,0L"+-n+","+v+"L"+n+","+v+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(y,h,T){if(t(h))return o;var f=d/4,n=2*y*g(f),v=2*y*r(f);return l(h,T,"M0,0L"+-n+","+v+"A "+2*y+","+2*y+" 0 0 1 "+n+","+v+"Z")},backoff:.4,noDot:!0}};function t(y){return y===null}var s,a,c,u;function l(y,h,T){if((!y||y%360===0)&&!h)return T;if(c===y&&u===h&&s===T)return a;c=y,u=h,s=T;function f(I,B){var _=g(I),z=r(I),O=B[0],F=B[1]+(h||0);return[O*_-F*z,O*z+F*_]}for(var n=y/180*d,v=0,m=0,b=A(T),E="",p=0;p0,y=g._context.staticPlot;r.each(function(h){var T=h[0].trace,f=T.error_x||{},n=T.error_y||{},v;T.ids&&(v=function(p){return p.id});var m=L.hasMarkers(T)&&T.marker.maxdisplayed>0;!n.visible&&!f.visible&&(h=[]);var b=A.select(this).selectAll("g.errorbar").data(h,v);if(b.exit().remove(),!!h.length){f.visible||b.selectAll("path.xerror").remove(),n.visible||b.selectAll("path.yerror").remove(),b.style("opacity",1);var E=b.enter().append("g").classed("errorbar",!0);l&&E.style("opacity",0).transition().duration(s.duration).style("opacity",1),o.setClipUrl(b,t.layerClipId,g),b.each(function(p){var S=A.select(this),w=M(p,c,u);if(!(m&&!p.vis)){var i,C=S.select("path.yerror");if(n.visible&&P(w.x)&&P(w.yh)&&P(w.ys)){var x=n.width;i="M"+(w.x-x)+","+w.yh+"h"+2*x+"m-"+x+",0V"+w.ys,w.noYS||(i+="m-"+x+",0h"+2*x),a=!C.size(),a?C=S.append("path").style("vector-effect",y?"none":"non-scaling-stroke").classed("yerror",!0):l&&(C=C.transition().duration(s.duration).ease(s.easing)),C.attr("d",i)}else C.remove();var k=S.select("path.xerror");if(f.visible&&P(w.y)&&P(w.xh)&&P(w.xs)){var I=(f.copy_ystyle?n:f).width;i="M"+w.xh+","+(w.y-I)+"v"+2*I+"m0,-"+I+"H"+w.xs,w.noXS||(i+="m0,-"+I+"v"+2*I),a=!k.size(),a?k=S.append("path").style("vector-effect",y?"none":"non-scaling-stroke").classed("xerror",!0):l&&(k=k.transition().duration(s.duration).ease(s.easing)),k.attr("d",i)}else k.remove()}})}})};function M(d,g,r){var t={x:g.c2p(d.x),y:r.c2p(d.y)};return d.yh!==void 0&&(t.yh=r.c2p(d.yh),t.ys=r.c2p(d.ys),P(t.ys)||(t.noYS=!0,t.ys=r.c2p(d.ys,!0))),d.xh!==void 0&&(t.xh=g.c2p(d.xh),t.xs=g.c2p(d.xs),P(t.xs)||(t.noXS=!0,t.xs=g.c2p(d.xs,!0))),t}},92036:function(te,X,e){var A=e(33428),P=e(76308);te.exports=function(L){L.each(function(M){var d=M[0].trace,g=d.error_y||{},r=d.error_x||{},t=A.select(this);t.selectAll("path.yerror").style("stroke-width",g.thickness+"px").call(P.stroke,g.color),r.copy_ystyle&&(r=g),t.selectAll("path.xerror").style("stroke-width",r.thickness+"px").call(P.stroke,r.color)})}},55756:function(te,X,e){var A=e(25376),P=e(65460).hoverlabel,o=e(92880).extendFlat;te.exports={hoverlabel:{bgcolor:o({},P.bgcolor,{arrayOk:!0}),bordercolor:o({},P.bordercolor,{arrayOk:!0}),font:A({arrayOk:!0,editType:"none"}),align:o({},P.align,{arrayOk:!0}),namelength:o({},P.namelength,{arrayOk:!0}),editType:"none"}}},55056:function(te,X,e){var A=e(3400),P=e(24040);te.exports=function(M){var d=M.calcdata,g=M._fullLayout;function r(u){return function(l){return A.coerceHoverinfo({hoverinfo:l},{_module:u._module},g)}}for(var t=0;t=0&&t.indexAe[0]._length||je<0||je>ye[0]._length)return c.unhoverRaw(J,ae)}if(ae.pointerX=Ve+Ae[0]._offset,ae.pointerY=je+ye[0]._offset,"xval"in ae?nt=y.flat(ne,ae.xval):nt=y.p2c(Ae,Ve),"yval"in ae?it=y.flat(ne,ae.yval):it=y.p2c(ye,je),!P(nt[0])||!P(it[0]))return L.warn("Fx.hover failed",ae,J),c.unhoverRaw(J,ae)}var Nt=1/0;function Vt(or,Lr){for(vt=0;vtpe&&(Ze.splice(0,pe),Nt=Ze[0].distance),me&&st!==0&&Ze.length===0){ge.distance=st,ge.index=!1;var ln=Je._module.hoverPoints(ge,Oe,Ce,"closest",{hoverLayer:le._hoverlayer});if(ln&&(ln=ln.filter(function(Jn){return Jn.spikeDistance<=st})),ln&&ln.length){var Mn,Dn=ln.filter(function(Jn){return Jn.xa.showspikes&&Jn.xa.spikesnap!=="hovered data"});if(Dn.length){var Kn=Dn[0];P(Kn.x0)&&P(Kn.y0)&&(Mn=Ct(Kn),(!Te.vLinePoint||Te.vLinePoint.spikeDistance>Mn.spikeDistance)&&(Te.vLinePoint=Mn))}var sa=ln.filter(function(Jn){return Jn.ya.showspikes&&Jn.ya.spikesnap!=="hovered data"});if(sa.length){var na=sa[0];P(na.x0)&&P(na.y0)&&(Mn=Ct(na),(!Te.hLinePoint||Te.hLinePoint.spikeDistance>Mn.spikeDistance)&&(Te.hLinePoint=Mn))}}}}}Vt();function gt(or,Lr,Br){for(var _r=null,Qr=1/0,un,ln=0;ln0&&Math.abs(or.distance)Et-1;ir--)ar(Ze[ir]);Ze=It,ht()}var Be=J._hoverdata,Fe=[],Rt=G(J),Lt=re(J);for(lt=0;lt1||Ze.length>1)||Ne==="closest"&&be&&Ze.length>1,sn=a.combine(le.plot_bgcolor||a.background,le.paper_bgcolor),Jr=I(Ze,{gd:J,hovermode:Ne,rotateLabels:Ar,bgColor:sn,container:le._hoverlayer,outerContainer:le._paper.node(),commonLabelOpts:le.hoverlabel,hoverdistance:le.hoverdistance}),bn=Jr.hoverLabels;if(y.isUnifiedHover(Ne)||(_(bn,Ar,le,Jr.commonLabelBoundingBox),F(bn,Ar,le._invScaleX,le._invScaleY)),ie&&ie.tagName){var xn=l.getComponentMethod("annotations","hasClickToShow")(J,Fe);t(A.select(ie),xn?"pointer":"")}!ie||Y||!j(J,ae,Be)||(Be&&J.emit("plotly_unhover",{event:ae,points:Be}),J.emit("plotly_hover",{event:ae,points:J._hoverdata,xaxes:Ae,yaxes:ye,xvals:nt,yvals:it}))}function x(J){return[J.trace.index,J.index,J.x0,J.y0,J.name,J.attr,J.xa?J.xa._id:"",J.ya?J.ya._id:""].join(",")}var k=/([\s\S]*)<\/extra>/;function I(J,ae){var K=ae.gd,Y=K._fullLayout,ie=ae.hovermode,ne=ae.rotateLabels,le=ae.bgColor,de=ae.container,we=ae.outerContainer,me=ae.commonLabelOpts||{};if(J.length===0)return[[]];var Le=ae.fontFamily||h.HOVERFONT,ve=ae.fontSize||h.HOVERFONTSIZE,Ae=J[0],ye=Ae.xa,Se=Ae.ya,_e=ie.charAt(0),ze=_e+"Label",Ie=Ae[ze];if(Ie===void 0&&ye.type==="multicategory")for(var Ne=0;NeY.width-Ut&&(Qt=Y.width-Ut),_t.attr("d","M"+(Fe-Qt)+",0L"+(Fe-Qt+p)+","+Lt+p+"H"+Ut+"v"+Lt+(S*2+Be.height)+"H"+-Ut+"V"+Lt+p+"H"+(Fe-Qt-p)+"Z"),Fe=Qt,Pe.minX=Fe-Ut,Pe.maxX=Fe+Ut,ye.side==="top"?(Pe.minY=Rt-(S*2+Be.height),Pe.maxY=Rt-S):(Pe.minY=Rt+S,Pe.maxY=Rt+(S*2+Be.height))}else{var rr,Kt,Dt;Se.side==="right"?(rr="start",Kt=1,Dt="",Fe=ye._offset+ye._length):(rr="end",Kt=-1,Dt="-",Fe=ye._offset),Rt=Se._offset+(Ae.y0+Ae.y1)/2,It.attr("text-anchor",rr),_t.attr("d","M0,0L"+Dt+p+","+p+"V"+(S+Be.height/2)+"h"+Dt+(S*2+Be.width)+"V-"+(S+Be.height/2)+"H"+Dt+p+"V-"+p+"Z"),Pe.minY=Rt-(S+Be.height/2),Pe.maxY=Rt+(S+Be.height/2),Se.side==="right"?(Pe.minX=Fe+p,Pe.maxX=Fe+p+(S*2+Be.width)):(Pe.minX=Fe-p-(S*2+Be.width),Pe.maxX=Fe-p);var sr=Be.height/2,fr=st-Be.top-sr,vr="clip"+Y._uid+"commonlabel"+Se._id,lr;if(Fe=0?dt=cr:er+Vt=0?dt=er:ct+Vt=0?bt=Ht:Wt+gt=0?bt=Wt:qe+gt=0,(Mt.idealAlign==="top"||!sn)&&Jr?(sr-=vr/2,Mt.anchor="end"):sn?(sr+=vr/2,Mt.anchor="start"):Mt.anchor="middle",Mt.crossPos=sr;else{if(Mt.pos=sr,sn=Dt+fr/2+Ar<=Ze,Jr=Dt-fr/2-Ar>=0,(Mt.idealAlign==="left"||!sn)&&Jr)Dt-=fr/2,Mt.anchor="end";else if(sn)Dt+=fr/2,Mt.anchor="start";else{Mt.anchor="middle";var bn=Ar/2,xn=Dt+bn-Ze,or=Dt-bn;xn>0&&(Dt-=xn),or<0&&(Dt+=-or)}Mt.crossPos=Dt}Lt.attr("text-anchor",Mt.anchor),Qt&&Ut.attr("text-anchor",Mt.anchor),_t.attr("transform",M(Dt,sr)+(ne?d(n):""))}),{hoverLabels:Et,commonLabelBoundingBox:Pe}}function B(J,ae,K,Y,ie,ne){var le="",de="";J.nameOverride!==void 0&&(J.name=J.nameOverride),J.name&&(J.trace._meta&&(J.name=L.templateString(J.name,J.trace._meta)),le=q(J.name,J.nameLength));var we=K.charAt(0),me=we==="x"?"y":"x";J.zLabel!==void 0?(J.xLabel!==void 0&&(de+="x: "+J.xLabel+"
"),J.yLabel!==void 0&&(de+="y: "+J.yLabel+"
"),J.trace.type!=="choropleth"&&J.trace.type!=="choroplethmapbox"&&(de+=(de?"z: ":"")+J.zLabel)):ae&&J[we+"Label"]===ie?de=J[me+"Label"]||"":J.xLabel===void 0?J.yLabel!==void 0&&J.trace.type!=="scattercarpet"&&(de=J.yLabel):J.yLabel===void 0?de=J.xLabel:de="("+J.xLabel+", "+J.yLabel+")",(J.text||J.text===0)&&!Array.isArray(J.text)&&(de+=(de?"
":"")+J.text),J.extraText!==void 0&&(de+=(de?"
":"")+J.extraText),ne&&de===""&&!J.hovertemplate&&(le===""&&ne.remove(),de=le);var Le=J.hovertemplate||!1;if(Le){var ve=J.hovertemplateLabels||J;J[we+"Label"]!==ie&&(ve[we+"other"]=ve[we+"Val"],ve[we+"otherLabel"]=ve[we+"Label"]),de=L.hovertemplateString(Le,ve,Y._d3locale,J.eventData[0]||{},J.trace._meta),de=de.replace(k,function(Ae,ye){return le=q(ye,J.nameLength),""})}return[de,le]}function _(J,ae,K,Y){var ie=ae?"xa":"ya",ne=ae?"ya":"xa",le=0,de=1,we=J.size(),me=new Array(we),Le=0,ve=Y.minX,Ae=Y.maxX,ye=Y.minY,Se=Y.maxY,_e=function(Oe){return Oe*K._invScaleX},ze=function(Oe){return Oe*K._invScaleY};J.each(function(Oe){var Ce=Oe[ie],ge=Oe[ne],pe=Ce._id.charAt(0)==="x",Te=Ce.range;Le===0&&Te&&Te[0]>Te[1]!==pe&&(de=-1);var be=0,ke=pe?K.width:K.height;if(K.hovermode==="x"||K.hovermode==="y"){var Ve=z(Oe,ae),je=Oe.anchor,at=je==="end"?-1:1,ut,Nt;if(je==="middle")ut=Oe.crossPos+(pe?ze(Ve.y-Oe.by/2):_e(Oe.bx/2+Oe.tx2width/2)),Nt=ut+(pe?ze(Oe.by):_e(Oe.bx));else if(pe)ut=Oe.crossPos+ze(p+Ve.y)-ze(Oe.by/2-p),Nt=ut+ze(Oe.by);else{var Vt=_e(at*p+Ve.x),gt=Vt+_e(at*Oe.bx);ut=Oe.crossPos+Math.min(Vt,gt),Nt=Oe.crossPos+Math.max(Vt,gt)}pe?ye!==void 0&&Se!==void 0&&Math.min(Nt,Se)-Math.max(ut,ye)>1&&(ge.side==="left"?(be=ge._mainLinePosition,ke=K.width):ke=ge._mainLinePosition):ve!==void 0&&Ae!==void 0&&Math.min(Nt,Ae)-Math.max(ut,ve)>1&&(ge.side==="top"?(be=ge._mainLinePosition,ke=K.height):ke=ge._mainLinePosition)}me[Le++]=[{datum:Oe,traceIndex:Oe.trace.index,dp:0,pos:Oe.pos,posref:Oe.posref,size:Oe.by*(pe?m:1)/2,pmin:be,pmax:ke}]}),me.sort(function(Oe,Ce){return Oe[0].posref-Ce[0].posref||de*(Ce[0].traceIndex-Oe[0].traceIndex)});var Ie,Ne,et,st,Ze,Ke,nt;function it(Oe){var Ce=Oe[0],ge=Oe[Oe.length-1];if(Ne=Ce.pmin-Ce.pos-Ce.dp+Ce.size,et=ge.pos+ge.dp+ge.size-Ce.pmax,Ne>.01){for(Ze=Oe.length-1;Ze>=0;Ze--)Oe[Ze].dp+=Ne;Ie=!1}if(!(et<.01)){if(Ne<-.01){for(Ze=Oe.length-1;Ze>=0;Ze--)Oe[Ze].dp-=et;Ie=!1}if(Ie){var pe=0;for(st=0;stCe.pmax&&pe++;for(st=Oe.length-1;st>=0&&!(pe<=0);st--)Ke=Oe[st],Ke.pos>Ce.pmax-1&&(Ke.del=!0,pe--);for(st=0;st=0;Ze--)Oe[Ze].dp-=et;for(st=Oe.length-1;st>=0&&!(pe<=0);st--)Ke=Oe[st],Ke.pos+Ke.dp+Ke.size>Ce.pmax&&(Ke.del=!0,pe--)}}}for(;!Ie&&le<=we;){for(le++,Ie=!0,st=0;st.01&&xt.pmin===Je.pmin&&xt.pmax===Je.pmax){for(Ze=vt.length-1;Ze>=0;Ze--)vt[Ze].dp+=Ne;for(lt.push.apply(lt,vt),me.splice(st+1,1),nt=0,Ze=lt.length-1;Ze>=0;Ze--)nt+=lt[Ze].dp;for(et=nt/lt.length,Ze=lt.length-1;Ze>=0;Ze--)lt[Ze].dp-=et;Ie=!1}else st++}me.forEach(it)}for(st=me.length-1;st>=0;st--){var Pe=me[st];for(Ze=Pe.length-1;Ze>=0;Ze--){var Ue=Pe[Ze],He=Ue.datum;He.offset=Ue.dp,He.del=Ue.del}}}function z(J,ae){var K=0,Y=J.offset;return ae&&(Y*=-E,K=J.offset*b),{x:K,y:Y}}function O(J){var ae={start:1,end:-1,middle:0}[J.anchor],K=ae*(p+S),Y=K+ae*(J.txwidth+S),ie=J.anchor==="middle";return ie&&(K-=J.tx2width/2,Y+=J.txwidth/2+S),{alignShift:ae,textShiftX:K,text2ShiftX:Y}}function F(J,ae,K,Y){var ie=function(le){return le*K},ne=function(le){return le*Y};J.each(function(le){var de=A.select(this);if(le.del)return de.remove();var we=de.select("text.nums"),me=le.anchor,Le=me==="end"?-1:1,ve=O(le),Ae=z(le,ae),ye=Ae.x,Se=Ae.y,_e=me==="middle";de.select("path").attr("d",_e?"M-"+ie(le.bx/2+le.tx2width/2)+","+ne(Se-le.by/2)+"h"+ie(le.bx)+"v"+ne(le.by)+"h-"+ie(le.bx)+"Z":"M0,0L"+ie(Le*p+ye)+","+ne(p+Se)+"v"+ne(le.by/2-p)+"h"+ie(Le*le.bx)+"v-"+ne(le.by)+"H"+ie(Le*p+ye)+"V"+ne(Se-p)+"Z");var ze=ye+ve.textShiftX,Ie=Se+le.ty0-le.by/2+S,Ne=le.textAlign||"auto";Ne!=="auto"&&(Ne==="left"&&me!=="start"?(we.attr("text-anchor","start"),ze=_e?-le.bx/2-le.tx2width/2+S:-le.bx-S):Ne==="right"&&me!=="end"&&(we.attr("text-anchor","end"),ze=_e?le.bx/2-le.tx2width/2-S:le.bx+S)),we.call(r.positionText,ie(ze),ne(Ie)),le.tx2width&&(de.select("text.name").call(r.positionText,ie(ve.text2ShiftX+ve.alignShift*S+ye),ne(Se+le.ty0-le.by/2+S)),de.select("rect").call(s.setRect,ie(ve.text2ShiftX+(ve.alignShift-1)*le.tx2width/2+ye),ne(Se-le.by/2-1),ie(le.tx2width),ne(le.by+2)))})}function N(J,ae){var K=J.index,Y=J.trace||{},ie=J.cd[0],ne=J.cd[K]||{};function le(Ae){return Ae||P(Ae)&&Ae===0}var de=Array.isArray(K)?function(Ae,ye){var Se=L.castOption(ie,K,Ae);return le(Se)?Se:L.extractOption({},Y,"",ye)}:function(Ae,ye){return L.extractOption(ne,Y,Ae,ye)};function we(Ae,ye,Se){var _e=de(ye,Se);le(_e)&&(J[Ae]=_e)}if(we("hoverinfo","hi","hoverinfo"),we("bgcolor","hbg","hoverlabel.bgcolor"),we("borderColor","hbc","hoverlabel.bordercolor"),we("fontFamily","htf","hoverlabel.font.family"),we("fontSize","hts","hoverlabel.font.size"),we("fontColor","htc","hoverlabel.font.color"),we("nameLength","hnl","hoverlabel.namelength"),we("textAlign","hta","hoverlabel.align"),J.posref=ae==="y"||ae==="closest"&&Y.orientation==="h"?J.xa._offset+(J.x0+J.x1)/2:J.ya._offset+(J.y0+J.y1)/2,J.x0=L.constrain(J.x0,0,J.xa._length),J.x1=L.constrain(J.x1,0,J.xa._length),J.y0=L.constrain(J.y0,0,J.ya._length),J.y1=L.constrain(J.y1,0,J.ya._length),J.xLabelVal!==void 0&&(J.xLabel="xLabel"in J?J.xLabel:u.hoverLabelText(J.xa,J.xLabelVal,Y.xhoverformat),J.xVal=J.xa.c2d(J.xLabelVal)),J.yLabelVal!==void 0&&(J.yLabel="yLabel"in J?J.yLabel:u.hoverLabelText(J.ya,J.yLabelVal,Y.yhoverformat),J.yVal=J.ya.c2d(J.yLabelVal)),J.zLabelVal!==void 0&&J.zLabel===void 0&&(J.zLabel=String(J.zLabelVal)),!isNaN(J.xerr)&&!(J.xa.type==="log"&&J.xerr<=0)){var me=u.tickText(J.xa,J.xa.c2l(J.xerr),"hover").text;J.xerrneg!==void 0?J.xLabel+=" +"+me+" / -"+u.tickText(J.xa,J.xa.c2l(J.xerrneg),"hover").text:J.xLabel+=" ± "+me,ae==="x"&&(J.distance+=1)}if(!isNaN(J.yerr)&&!(J.ya.type==="log"&&J.yerr<=0)){var Le=u.tickText(J.ya,J.ya.c2l(J.yerr),"hover").text;J.yerrneg!==void 0?J.yLabel+=" +"+Le+" / -"+u.tickText(J.ya,J.ya.c2l(J.yerrneg),"hover").text:J.yLabel+=" ± "+Le,ae==="y"&&(J.distance+=1)}var ve=J.hoverinfo||J.trace.hoverinfo;return ve&&ve!=="all"&&(ve=Array.isArray(ve)?ve:ve.split("+"),ve.indexOf("x")===-1&&(J.xLabel=void 0),ve.indexOf("y")===-1&&(J.yLabel=void 0),ve.indexOf("z")===-1&&(J.zLabel=void 0),ve.indexOf("text")===-1&&(J.text=void 0),ve.indexOf("name")===-1&&(J.name=void 0)),J}function V(J,ae,K){var Y=K.container,ie=K.fullLayout,ne=ie._size,le=K.event,de=!!ae.hLinePoint,we=!!ae.vLinePoint,me,Le;if(Y.selectAll(".spikeline").remove(),!!(we||de)){var ve=a.combine(ie.plot_bgcolor,ie.paper_bgcolor);if(de){var Ae=ae.hLinePoint,ye,Se;me=Ae&&Ae.xa,Le=Ae&&Ae.ya;var _e=Le.spikesnap;_e==="cursor"?(ye=le.pointerX,Se=le.pointerY):(ye=me._offset+Ae.x,Se=Le._offset+Ae.y);var ze=o.readability(Ae.color,ve)<1.5?a.contrast(ve):Ae.color,Ie=Le.spikemode,Ne=Le.spikethickness,et=Le.spikecolor||ze,st=u.getPxPosition(J,Le),Ze,Ke;if(Ie.indexOf("toaxis")!==-1||Ie.indexOf("across")!==-1){if(Ie.indexOf("toaxis")!==-1&&(Ze=st,Ke=ye),Ie.indexOf("across")!==-1){var nt=Le._counterDomainMin,it=Le._counterDomainMax;Le.anchor==="free"&&(nt=Math.min(nt,Le.position),it=Math.max(it,Le.position)),Ze=ne.l+nt*ne.w,Ke=ne.l+it*ne.w}Y.insert("line",":first-child").attr({x1:Ze,x2:Ke,y1:Se,y2:Se,"stroke-width":Ne,stroke:et,"stroke-dasharray":s.dashStyle(Le.spikedash,Ne)}).classed("spikeline",!0).classed("crisp",!0),Y.insert("line",":first-child").attr({x1:Ze,x2:Ke,y1:Se,y2:Se,"stroke-width":Ne+2,stroke:ve}).classed("spikeline",!0).classed("crisp",!0)}Ie.indexOf("marker")!==-1&&Y.insert("circle",":first-child").attr({cx:st+(Le.side!=="right"?Ne:-Ne),cy:Se,r:Ne,fill:et}).classed("spikeline",!0)}if(we){var lt=ae.vLinePoint,vt,xt;me=lt&<.xa,Le=lt&<.ya;var Je=me.spikesnap;Je==="cursor"?(vt=le.pointerX,xt=le.pointerY):(vt=me._offset+lt.x,xt=Le._offset+lt.y);var Pe=o.readability(lt.color,ve)<1.5?a.contrast(ve):lt.color,Ue=me.spikemode,He=me.spikethickness,Oe=me.spikecolor||Pe,Ce=u.getPxPosition(J,me),ge,pe;if(Ue.indexOf("toaxis")!==-1||Ue.indexOf("across")!==-1){if(Ue.indexOf("toaxis")!==-1&&(ge=Ce,pe=xt),Ue.indexOf("across")!==-1){var Te=me._counterDomainMin,be=me._counterDomainMax;me.anchor==="free"&&(Te=Math.min(Te,me.position),be=Math.max(be,me.position)),ge=ne.t+(1-be)*ne.h,pe=ne.t+(1-Te)*ne.h}Y.insert("line",":first-child").attr({x1:vt,x2:vt,y1:ge,y2:pe,"stroke-width":He,stroke:Oe,"stroke-dasharray":s.dashStyle(me.spikedash,He)}).classed("spikeline",!0).classed("crisp",!0),Y.insert("line",":first-child").attr({x1:vt,x2:vt,y1:ge,y2:pe,"stroke-width":He+2,stroke:ve}).classed("spikeline",!0).classed("crisp",!0)}Ue.indexOf("marker")!==-1&&Y.insert("circle",":first-child").attr({cx:vt,cy:Ce-(me.side!=="top"?He:-He),r:He,fill:Oe}).classed("spikeline",!0)}}}function j(J,ae,K){if(!K||K.length!==J._hoverdata.length)return!0;for(var Y=K.length-1;Y>=0;Y--){var ie=K[Y],ne=J._hoverdata[Y];if(ie.curveNumber!==ne.curveNumber||String(ie.pointNumber)!==String(ne.pointNumber)||String(ie.pointNumbers)!==String(ne.pointNumbers))return!0}return!1}function $(J,ae){return!0}function q(J,ae){return r.plainText(J||"",{len:ae,allowedTags:["br","sub","sup","b","i","em"]})}function oe(J,ae){for(var K=ae.charAt(0),Y=[],ie=[],ne=[],le=0;le1)){delete u.grid;return}if(!T&&!f&&!n){var i=p("pattern")==="independent";i&&(T=!0)}E._hasSubplotGrid=T;var C=p("roworder"),x=C==="top to bottom",k=T?.2:.1,I=T?.3:.1,B,_;v&&u._splomGridDflt&&(B=u._splomGridDflt.xside,_=u._splomGridDflt.yside),E._domains={x:t("x",p,k,B,w),y:t("y",p,I,_,S,x)}}function t(c,u,l,y,h,T){var f=u(c+"gap",l),n=u("domain."+c);u(c+"side",y);for(var v=new Array(h),m=n[0],b=(n[1]-m)/(h-f),E=b*(1-f),p=0;p(t==="legend"?1:0));if(x===!1&&(a[t]=void 0),!(x===!1&&!u.uirevision)&&(y("uirevision",a.uirevision),x!==!1)){y("borderwidth");var k=y("orientation"),I=y("yref"),B=y("xref"),_=k==="h",z=I==="paper",O=B==="paper",F,N,V,j="left";_?(F=0,A.getComponentMethod("rangeslider","isVisible")(s.xaxis)?z?(N=1.1,V="bottom"):(N=1,V="top"):z?(N=-.1,V="top"):(N=0,V="bottom")):(N=1,V="auto",O?F=1.02:(F=1,j="right")),P.coerce(u,l,{x:{valType:"number",editType:"legend",min:O?-2:0,max:O?3:1,dflt:F}},"x"),P.coerce(u,l,{y:{valType:"number",editType:"legend",min:z?-2:0,max:z?3:1,dflt:N}},"y"),y("traceorder",p),g.isGrouped(a[t])&&y("tracegroupgap"),y("entrywidth"),y("entrywidthmode"),y("indentation"),y("itemsizing"),y("itemwidth"),y("itemclick"),y("itemdoubleclick"),y("groupclick"),y("xanchor",j),y("yanchor",V),y("valign"),P.noneOrAll(u,l,["x","y"]);var $=y("title.text");if($){y("title.side",_?"left":"top");var q=P.extendFlat({},h,{size:P.bigFont(h.size)});P.coerceFont(y,"title.font",q)}}}}te.exports=function(s,a,c){var u,l=c.slice(),y=a.shapes;if(y)for(u=0;u1)}var Y=j.hiddenlabels||[];if(!Z&&(!j.showlegend||!G.length))return oe.selectAll("."+$).remove(),j._topdefs.select("#"+q).remove(),o.autoMargin(F,$);var ie=P.ensureSingle(oe,"g",$,function(ye){Z||ye.attr("pointer-events","all")}),ne=P.ensureSingleById(j._topdefs,"clipPath",q,function(ye){ye.append("rect")}),le=P.ensureSingle(ie,"rect","bg",function(ye){ye.attr("shape-rendering","crispEdges")});le.call(r.stroke,V.bordercolor).call(r.fill,V.bgcolor).style("stroke-width",V.borderwidth+"px");var de=P.ensureSingle(ie,"g","scrollbox"),we=V.title;V._titleWidth=0,V._titleHeight=0;var me;we.text?(me=P.ensureSingle(de,"text",$+"titletext"),me.attr("text-anchor","start").call(g.font,we.font).text(we.text),C(me,de,F,V,n)):de.selectAll("."+$+"titletext").remove();var Le=P.ensureSingle(ie,"rect","scrollbar",function(ye){ye.attr(a.scrollBarEnterAttrs).call(r.fill,a.scrollBarColor)}),ve=de.selectAll("g.groups").data(G);ve.enter().append("g").attr("class","groups"),ve.exit().remove();var Ae=ve.selectAll("g.traces").data(P.identity);Ae.enter().append("g").attr("class","traces"),Ae.exit().remove(),Ae.style("opacity",function(ye){var Se=ye[0].trace;return L.traceIs(Se,"pie-like")?Y.indexOf(ye[0].label)!==-1?.5:1:Se.visible==="legendonly"?.5:1}).each(function(){A.select(this).call(S,F,V)}).call(T,F,V).each(function(){Z||A.select(this).call(i,F,$)}),P.syncOrAsync([o.previousPromises,function(){return I(F,ve,Ae,V)},function(){var ye=j._size,Se=V.borderwidth,_e=V.xref==="paper",ze=V.yref==="paper";if(we.text&&m(me,V,Se),!Z){var Ie,Ne;_e?Ie=ye.l+ye.w*V.x-l[_(V)]*V._width:Ie=j.width*V.x-l[_(V)]*V._width,ze?Ne=ye.t+ye.h*(1-V.y)-l[z(V)]*V._effHeight:Ne=j.height*(1-V.y)-l[z(V)]*V._effHeight;var et=B(F,$,Ie,Ne);if(et)return;if(j.margin.autoexpand){var st=Ie,Ze=Ne;Ie=_e?P.constrain(Ie,0,j.width-V._width):st,Ne=ze?P.constrain(Ne,0,j.height-V._effHeight):Ze,Ie!==st&&P.log("Constrain "+$+".x to make legend fit inside graph"),Ne!==Ze&&P.log("Constrain "+$+".y to make legend fit inside graph")}g.setTranslate(ie,Ie,Ne)}if(Le.on(".drag",null),ie.on("wheel",null),Z||V._height<=V._maxHeight||F._context.staticPlot){var Ke=V._effHeight;Z&&(Ke=V._height),le.attr({width:V._width-Se,height:Ke-Se,x:Se/2,y:Se/2}),g.setTranslate(de,0,0),ne.select("rect").attr({width:V._width-2*Se,height:Ke-2*Se,x:Se,y:Se}),g.setClipUrl(de,q,F),g.setRect(Le,0,0,0,0),delete V._scrollY}else{var nt=Math.max(a.scrollBarMinHeight,V._effHeight*V._effHeight/V._height),it=V._effHeight-nt-2*a.scrollBarMargin,lt=V._height-V._effHeight,vt=it/lt,xt=Math.min(V._scrollY||0,lt);le.attr({width:V._width-2*Se+a.scrollBarWidth+a.scrollBarMargin,height:V._effHeight-Se,x:Se/2,y:Se/2}),ne.select("rect").attr({width:V._width-2*Se+a.scrollBarWidth+a.scrollBarMargin,height:V._effHeight-2*Se,x:Se,y:Se+xt}),g.setClipUrl(de,q,F),pe(xt,nt,vt),ie.on("wheel",function(){xt=P.constrain(V._scrollY+A.event.deltaY/it*lt,0,lt),pe(xt,nt,vt),xt!==0&&xt!==lt&&A.event.preventDefault()});var Je,Pe,Ue,He=function(je,at,ut){var Nt=(ut-at)/vt+je;return P.constrain(Nt,0,lt)},Oe=function(je,at,ut){var Nt=(at-ut)/vt+je;return P.constrain(Nt,0,lt)},Ce=A.behavior.drag().on("dragstart",function(){var je=A.event.sourceEvent;je.type==="touchstart"?Je=je.changedTouches[0].clientY:Je=je.clientY,Ue=xt}).on("drag",function(){var je=A.event.sourceEvent;je.buttons===2||je.ctrlKey||(je.type==="touchmove"?Pe=je.changedTouches[0].clientY:Pe=je.clientY,xt=He(Ue,Je,Pe),pe(xt,nt,vt))});Le.call(Ce);var ge=A.behavior.drag().on("dragstart",function(){var je=A.event.sourceEvent;je.type==="touchstart"&&(Je=je.changedTouches[0].clientY,Ue=xt)}).on("drag",function(){var je=A.event.sourceEvent;je.type==="touchmove"&&(Pe=je.changedTouches[0].clientY,xt=Oe(Ue,Je,Pe),pe(xt,nt,vt))});de.call(ge)}function pe(je,at,ut){V._scrollY=F._fullLayout[$]._scrollY=je,g.setTranslate(de,0,-je),g.setRect(Le,V._width,a.scrollBarMargin+je*ut,a.scrollBarWidth,at),ne.select("rect").attr("y",Se+je)}if(F._context.edits.legendPosition){var Te,be,ke,Ve;ie.classed("cursor-move",!0),d.init({element:ie.node(),gd:F,prepFn:function(){var je=g.getTranslate(ie);ke=je.x,Ve=je.y},moveFn:function(je,at){var ut=ke+je,Nt=Ve+at;g.setTranslate(ie,ut,Nt),Te=d.align(ut,V._width,ye.l,ye.l+ye.w,V.xanchor),be=d.align(Nt+V._height,-V._height,ye.t+ye.h,ye.t,V.yanchor)},doneFn:function(){if(Te!==void 0&&be!==void 0){var je={};je[$+".x"]=Te,je[$+".y"]=be,L.call("_guiRelayout",F,je)}},clickFn:function(je,at){var ut=oe.selectAll("g.traces").filter(function(){var Nt=this.getBoundingClientRect();return at.clientX>=Nt.left&&at.clientX<=Nt.right&&at.clientY>=Nt.top&&at.clientY<=Nt.bottom});ut.size()>0&&p(F,ie,ut,je,at)}})}}],F)}}function E(F,N,V){var j=F[0],$=j.width,q=N.entrywidthmode,oe=j.trace.legendwidth||N.entrywidth;return q==="fraction"?N._maxWidth*oe:V+(oe||$)}function p(F,N,V,j,$){var q=V.data()[0][0].trace,oe={event:$,node:V.node(),curveNumber:q.index,expandedIndex:q._expandedIndex,data:F.data,layout:F.layout,frames:F._transitionData._frames,config:F._context,fullData:F._fullData,fullLayout:F._fullLayout};q._group&&(oe.group=q._group),L.traceIs(q,"pie-like")&&(oe.label=V.datum()[0].label);var Z=M.triggerHandler(F,"plotly_legendclick",oe);if(j===1){if(Z===!1)return;N._clickTimeout=setTimeout(function(){F._fullLayout&&s(V,F,j)},F._context.doubleClickDelay)}else if(j===2){N._clickTimeout&&clearTimeout(N._clickTimeout),F._legendMouseDownTime=0;var G=M.triggerHandler(F,"plotly_legenddoubleclick",oe);G!==!1&&Z!==!1&&s(V,F,j)}}function S(F,N,V){var j=O(V),$=F.data()[0][0],q=$.trace,oe=L.traceIs(q,"pie-like"),Z=!V._inHover&&N._context.edits.legendText&&!oe,G=V._maxNameLength,re,H;$.groupTitle?(re=$.groupTitle.text,H=$.groupTitle.font):(H=V.font,V.entries?re=$.text:(re=oe?$.label:q.name,q._meta&&(re=P.templateString(re,q._meta))));var J=P.ensureSingle(F,"text",j+"text");J.attr("text-anchor","start").call(g.font,H).text(Z?w(re,G):re);var ae=V.indentation+V.itemwidth+a.itemGap*2;t.positionText(J,ae,0),Z?J.call(t.makeEditable,{gd:N,text:re}).call(C,F,N,V).on("edit",function(K){this.text(w(K,G)).call(C,F,N,V);var Y=$.trace._fullInput||{},ie={};if(L.hasTransform(Y,"groupby")){var ne=L.getTransformIndices(Y,"groupby"),le=ne[ne.length-1],de=P.keyedContainer(Y,"transforms["+le+"].styles","target","value.name");de.set($.trace._group,K),ie=de.constructUpdate()}else ie.name=K;return Y._isShape?L.call("_guiRelayout",N,"shapes["+q.index+"].name",ie.name):L.call("_guiRestyle",N,ie,q.index)}):C(J,F,N,V)}function w(F,N){var V=Math.max(4,N);if(F&&F.trim().length>=V/2)return F;F=F||"";for(var j=V-F.length;j>0;j--)F+=" ";return F}function i(F,N,V){var j=N._context.doubleClickDelay,$,q=1,oe=P.ensureSingle(F,"rect",V+"toggle",function(Z){N._context.staticPlot||Z.style("cursor","pointer").attr("pointer-events","all"),Z.call(r.fill,"rgba(0,0,0,0)")});N._context.staticPlot||(oe.on("mousedown",function(){$=new Date().getTime(),$-N._legendMouseDownTimej&&(q=Math.max(q-1,1)),p(N,Z,F,q,A.event)}}))}function C(F,N,V,j,$){j._inHover&&F.attr("data-notex",!0),t.convertToTspans(F,V,function(){x(N,V,j,$)})}function x(F,N,V,j){var $=F.data()[0][0];if(!V._inHover&&$&&!$.trace.showlegend){F.remove();return}var q=F.select("g[class*=math-group]"),oe=q.node(),Z=O(V);V||(V=N._fullLayout[Z]);var G=V.borderwidth,re;j===n?re=V.title.font:$.groupTitle?re=$.groupTitle.font:re=V.font;var H=re.size*u,J,ae;if(oe){var K=g.bBox(oe);J=K.height,ae=K.width,j===n?g.setTranslate(q,G,G+J*.75):g.setTranslate(q,0,J*.25)}else{var Y="."+Z+(j===n?"title":"")+"text",ie=F.select(Y),ne=t.lineCount(ie),le=ie.node();if(J=H*ne,ae=le?g.bBox(le).width:0,j===n)V.title.side==="left"&&(ae+=a.itemGap*2),t.positionText(ie,G+a.titlePad,G+H);else{var de=a.itemGap*2+V.indentation+V.itemwidth;$.groupTitle&&(de=a.itemGap,ae-=V.indentation+V.itemwidth),t.positionText(ie,de,-H*((ne-1)/2-.3))}}j===n?(V._titleWidth=ae,V._titleHeight=J):($.lineHeight=H,$.height=Math.max(J,16)+3,$.width=ae)}function k(F){var N=0,V=0,j=F.title.side;return j&&(j.indexOf("left")!==-1&&(N=F._titleWidth),j.indexOf("top")!==-1&&(V=F._titleHeight)),[N,V]}function I(F,N,V,j){var $=F._fullLayout,q=O(j);j||(j=$[q]);var oe=$._size,Z=f.isVertical(j),G=f.isGrouped(j),re=j.entrywidthmode==="fraction",H=j.borderwidth,J=2*H,ae=a.itemGap,K=j.indentation+j.itemwidth+ae*2,Y=2*(H+ae),ie=z(j),ne=j.y<0||j.y===0&&ie==="top",le=j.y>1||j.y===1&&ie==="bottom",de=j.tracegroupgap,we={};j._maxHeight=Math.max(ne||le?$.height/2:oe.h,30);var me=0;j._width=0,j._height=0;var Le=k(j);if(Z)V.each(function(Ue){var He=Ue[0].height;g.setTranslate(this,H+Le[0],H+Le[1]+j._height+He/2+ae),j._height+=He,j._width=Math.max(j._width,Ue[0].width)}),me=K+j._width,j._width+=ae+K+J,j._height+=Y,G&&(N.each(function(Ue,He){g.setTranslate(this,0,He*j.tracegroupgap)}),j._height+=(j._lgroupsLength-1)*j.tracegroupgap);else{var ve=_(j),Ae=j.x<0||j.x===0&&ve==="right",ye=j.x>1||j.x===1&&ve==="left",Se=le||ne,_e=$.width/2;j._maxWidth=Math.max(Ae?Se&&ve==="left"?oe.l+oe.w:_e:ye?Se&&ve==="right"?oe.r+oe.w:_e:oe.w,2*K);var ze=0,Ie=0;V.each(function(Ue){var He=E(Ue,j,K);ze=Math.max(ze,He),Ie+=He}),me=null;var Ne=0;if(G){var et=0,st=0,Ze=0;N.each(function(){var Ue=0,He=0;A.select(this).selectAll("g.traces").each(function(Ce){var ge=E(Ce,j,K),pe=Ce[0].height;g.setTranslate(this,Le[0],Le[1]+H+ae+pe/2+He),He+=pe,Ue=Math.max(Ue,ge),we[Ce[0].trace.legendgroup]=Ue});var Oe=Ue+ae;st>0&&Oe+H+st>j._maxWidth?(Ne=Math.max(Ne,st),st=0,Ze+=et+de,et=He):et=Math.max(et,He),g.setTranslate(this,st,Ze),st+=Oe}),j._width=Math.max(Ne,st)+H,j._height=Ze+et+Y}else{var Ke=V.size(),nt=Ie+J+(Ke-1)*ae=j._maxWidth&&(Ne=Math.max(Ne,xt),lt=0,vt+=it,j._height+=it,it=0),g.setTranslate(this,Le[0]+H+lt,Le[1]+H+vt+He/2+ae),xt=lt+Oe+ae,lt+=Ce,it=Math.max(it,He)}),nt?(j._width=lt+J,j._height=it+Y):(j._width=Math.max(Ne,xt)+J,j._height+=it+Y)}}j._width=Math.ceil(Math.max(j._width+Le[0],j._titleWidth+2*(H+a.titlePad))),j._height=Math.ceil(Math.max(j._height+Le[1],j._titleHeight+2*(H+a.itemGap))),j._effHeight=Math.min(j._height,j._maxHeight);var Je=F._context.edits,Pe=Je.legendText||Je.legendPosition;V.each(function(Ue){var He=A.select(this).select("."+q+"toggle"),Oe=Ue[0].height,Ce=Ue[0].trace.legendgroup,ge=E(Ue,j,K);G&&Ce!==""&&(ge=we[Ce]);var pe=Pe?K:me||ge;!Z&&!re&&(pe+=ae/2),g.setRect(He,0,-Oe/2,pe,Oe)})}function B(F,N,V,j){var $=F._fullLayout,q=$[N],oe=_(q),Z=z(q),G=q.xref==="paper",re=q.yref==="paper";F._fullLayout._reservedMargin[N]={};var H=q.y<.5?"b":"t",J=q.x<.5?"l":"r",ae={r:$.width-V,l:V+q._width,b:$.height-j,t:j+q._effHeight};if(G&&re)return o.autoMargin(F,N,{x:q.x,y:q.y,l:q._width*l[oe],r:q._width*y[oe],b:q._effHeight*y[Z],t:q._effHeight*l[Z]});G?F._fullLayout._reservedMargin[N][H]=ae[H]:re||q.orientation==="v"?F._fullLayout._reservedMargin[N][J]=ae[J]:F._fullLayout._reservedMargin[N][H]=ae[H]}function _(F){return P.isRightAnchor(F)?"right":P.isCenterAnchor(F)?"center":"left"}function z(F){return P.isBottomAnchor(F)?"bottom":P.isMiddleAnchor(F)?"middle":"top"}function O(F){return F._id||"legend"}},35456:function(te,X,e){var A=e(24040),P=e(42451);te.exports=function(L,M,d){var g=M._inHover,r=P.isGrouped(M),t=P.isReversed(M),s={},a=[],c=!1,u={},l=0,y=0,h,T;function f(F,N,V){if(M.visible!==!1&&!(d&&F!==M._id))if(N===""||!P.isGrouped(M)){var j="~~i"+l;a.push(j),s[j]=[V],l++}else a.indexOf(N)===-1?(a.push(N),c=!0,s[N]=[V]):s[N].push(V)}for(h=0;hx&&(C=x)}w[h][0]._groupMinRank=C,w[h][0]._preGroupSort=h}var k=function(F,N){return F[0]._groupMinRank-N[0]._groupMinRank||F[0]._preGroupSort-N[0]._preGroupSort},I=function(F,N){return F.trace.legendrank-N.trace.legendrank||F._preSort-N._preSort};for(w.forEach(function(F,N){F[0]._preGroupSort=N}),w.sort(k),h=0;h0)J=G.width;else return 0;return S?H:Math.min(J,re)};m.each(function(Z){var G=A.select(this),re=o.ensureSingle(G,"g","layers");re.style("opacity",Z[0].trace.opacity);var H=E.indentation,J=E.valign,ae=Z[0].lineHeight,K=Z[0].height;if(J==="middle"&&H===0||!ae||!K)re.attr("transform",null);else{var Y={top:1,bottom:-1}[J],ie=Y*(.5*(ae-K+3))||0,ne=E.indentation;re.attr("transform",L(ne,ie))}var le=re.selectAll("g.legendfill").data([Z]);le.enter().append("g").classed("legendfill",!0);var de=re.selectAll("g.legendlines").data([Z]);de.enter().append("g").classed("legendlines",!0);var we=re.selectAll("g.legendsymbols").data([Z]);we.enter().append("g").classed("legendsymbols",!0),we.selectAll("g.legendpoints").data([Z]).enter().append("g").classed("legendpoints",!0)}).each(oe).each(B).each(z).each(_).each(F).each($).each(j).each(k).each(I).each(N).each(V);function k(Z){var G=f(Z),re=G.showFill,H=G.showLine,J=G.showGradientLine,ae=G.showGradientFill,K=G.anyFill,Y=G.anyLine,ie=Z[0],ne=ie.trace,le,de,we=g(ne),me=we.colorscale,Le=we.reversescale,ve=function(Ne){if(Ne.size())if(re)M.fillGroupStyle(Ne,b,!0);else{var et="legendfill-"+ne.uid;M.gradient(Ne,b,et,T(Le),me,"fill")}},Ae=function(Ne){if(Ne.size()){var et="legendline-"+ne.uid;M.lineGroupStyle(Ne),M.gradient(Ne,b,et,T(Le),me,"stroke")}},ye=r.hasMarkers(ne)||!K?"M5,0":Y?"M5,-2":"M5,-3",Se=A.select(this),_e=Se.select(".legendfill").selectAll("path").data(re||ae?[Z]:[]);if(_e.enter().append("path").classed("js-fill",!0),_e.exit().remove(),_e.attr("d",ye+"h"+w+"v6h-"+w+"z").call(ve),H||J){var ze=x(void 0,ne.line,y,u);de=o.minExtend(ne,{line:{width:ze}}),le=[o.minExtend(ie,{trace:de})]}var Ie=Se.select(".legendlines").selectAll("path").data(H||J?[le]:[]);Ie.enter().append("path").classed("js-line",!0),Ie.exit().remove(),Ie.attr("d",ye+(J?"l"+w+",0.0001":"h"+w)).call(H?M.lineGroupStyle:Ae)}function I(Z){var G=f(Z),re=G.anyFill,H=G.anyLine,J=G.showLine,ae=G.showMarker,K=Z[0],Y=K.trace,ie=!ae&&!H&&!re&&r.hasText(Y),ne,le;function de(_e,ze,Ie,Ne){var et=o.nestedProperty(Y,_e).get(),st=o.isArrayOrTypedArray(et)&&ze?ze(et):et;if(S&&st&&Ne!==void 0&&(st=Ne),Ie){if(stIe[1])return Ie[1]}return st}function we(_e){return K._distinct&&K.index&&_e[K.index]?_e[K.index]:_e[0]}if(ae||ie||J){var me={},Le={};if(ae){me.mc=de("marker.color",we),me.mx=de("marker.symbol",we),me.mo=de("marker.opacity",o.mean,[.2,1]),me.mlc=de("marker.line.color",we),me.mlw=de("marker.line.width",o.mean,[0,5],l),Le.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var ve=de("marker.size",o.mean,[2,16],c);me.ms=ve,Le.marker.size=ve}J&&(Le.line={width:de("line.width",we,[0,10],u)}),ie&&(me.tx="Aa",me.tp=de("textposition",we),me.ts=10,me.tc=de("textfont.color",we),me.tf=de("textfont.family",we)),ne=[o.minExtend(K,me)],le=o.minExtend(Y,Le),le.selectedpoints=null,le.texttemplate=null}var Ae=A.select(this).select("g.legendpoints"),ye=Ae.selectAll("path.scatterpts").data(ae?ne:[]);ye.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",C),ye.exit().remove(),ye.call(M.pointStyle,le,b),ae&&(ne[0].mrc=3);var Se=Ae.selectAll("g.pointtext").data(ie?ne:[]);Se.enter().append("g").classed("pointtext",!0).append("text").attr("transform",C),Se.exit().remove(),Se.selectAll("text").call(M.textPointStyle,le,b)}function B(Z){var G=Z[0].trace,re=G.type==="waterfall";if(Z[0]._distinct&&re){var H=Z[0].trace[Z[0].dir].marker;return Z[0].mc=H.color,Z[0].mlw=H.line.width,Z[0].mlc=H.line.color,O(Z,this,"waterfall")}var J=[];G.visible&&re&&(J=Z[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 ae=A.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(J);ae.enter().append("path").classed("legendwaterfall",!0).attr("transform",C).style("stroke-miterlimit",1),ae.exit().remove(),ae.each(function(K){var Y=A.select(this),ie=G[K[0]].marker,ne=x(void 0,ie.line,h,l);Y.attr("d",K[1]).style("stroke-width",ne+"px").call(d.fill,ie.color),ne&&Y.call(d.stroke,ie.line.color)})}function _(Z){O(Z,this)}function z(Z){O(Z,this,"funnel")}function O(Z,G,re){var H=Z[0].trace,J=H.marker||{},ae=J.line||{},K=J.cornerradius?"M6,3a3,3,0,0,1-3,3H-3a3,3,0,0,1-3-3V-3a3,3,0,0,1,3-3H3a3,3,0,0,1,3,3Z":"M6,6H-6V-6H6Z",Y=re?H.visible&&H.type===re:P.traceIs(H,"bar"),ie=A.select(G).select("g.legendpoints").selectAll("path.legend"+re).data(Y?[Z]:[]);ie.enter().append("path").classed("legend"+re,!0).attr("d",K).attr("transform",C),ie.exit().remove(),ie.each(function(ne){var le=A.select(this),de=ne[0],we=x(de.mlw,J.line,h,l);le.style("stroke-width",we+"px");var me=de.mcc;if(!E._inHover&&"mc"in de){var Le=g(J),ve=Le.mid;ve===void 0&&(ve=(Le.max+Le.min)/2),me=M.tryColorscale(J,"")(ve)}var Ae=me||de.mc||J.color,ye=J.pattern,Se=ye&&M.getPatternAttr(ye.shape,0,"");if(Se){var _e=M.getPatternAttr(ye.bgcolor,0,null),ze=M.getPatternAttr(ye.fgcolor,0,null),Ie=ye.fgopacity,Ne=n(ye.size,8,10),et=n(ye.solidity,.5,1),st="legend-"+H.uid;le.call(M.pattern,"legend",b,st,Se,Ne,et,me,ye.fillmode,_e,ze,Ie)}else le.call(d.fill,Ae);we&&d.stroke(le,de.mlc||ae.color)})}function F(Z){var G=Z[0].trace,re=A.select(this).select("g.legendpoints").selectAll("path.legendbox").data(G.visible&&P.traceIs(G,"box-violin")?[Z]:[]);re.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",C),re.exit().remove(),re.each(function(){var H=A.select(this);if((G.boxpoints==="all"||G.points==="all")&&d.opacity(G.fillcolor)===0&&d.opacity((G.line||{}).color)===0){var J=o.minExtend(G,{marker:{size:S?c:o.constrain(G.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});re.call(M.pointStyle,J,b)}else{var ae=x(void 0,G.line,h,l);H.style("stroke-width",ae+"px").call(d.fill,G.fillcolor),ae&&d.stroke(H,G.line.color)}})}function N(Z){var G=Z[0].trace,re=A.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(G.visible&&G.type==="candlestick"?[Z,Z]:[]);re.enter().append("path").classed("legendcandle",!0).attr("d",function(H,J){return J?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",C).style("stroke-miterlimit",1),re.exit().remove(),re.each(function(H,J){var ae=A.select(this),K=G[J?"increasing":"decreasing"],Y=x(void 0,K.line,h,l);ae.style("stroke-width",Y+"px").call(d.fill,K.fillcolor),Y&&d.stroke(ae,K.line.color)})}function V(Z){var G=Z[0].trace,re=A.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(G.visible&&G.type==="ohlc"?[Z,Z]:[]);re.enter().append("path").classed("legendohlc",!0).attr("d",function(H,J){return J?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",C).style("stroke-miterlimit",1),re.exit().remove(),re.each(function(H,J){var ae=A.select(this),K=G[J?"increasing":"decreasing"],Y=x(void 0,K.line,h,l);ae.style("fill","none").call(M.dashLine,K.line.dash,Y),Y&&d.stroke(ae,K.line.color)})}function j(Z){q(Z,this,"pie")}function $(Z){q(Z,this,"funnelarea")}function q(Z,G,re){var H=Z[0],J=H.trace,ae=re?J.visible&&J.type===re:P.traceIs(J,re),K=A.select(G).select("g.legendpoints").selectAll("path.legend"+re).data(ae?[Z]:[]);if(K.enter().append("path").classed("legend"+re,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",C),K.exit().remove(),K.size()){var Y=J.marker||{},ie=x(s(Y.line.width,H.pts),Y.line,h,l),ne="pieLike",le=o.minExtend(J,{marker:{line:{width:ie}}},ne),de=o.minExtend(H,{trace:le},ne);t(K,de,le,b)}}function oe(Z){var G=Z[0].trace,re,H=[];if(G.visible)switch(G.type){case"histogram2d":case"heatmap":H=[["M-15,-2V4H15V-2Z"]],re=!0;break;case"choropleth":case"choroplethmapbox":H=[["M-6,-6V6H6V-6Z"]],re=!0;break;case"densitymapbox":H=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],re="radial";break;case"cone":H=[["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"]],re=!1;break;case"streamtube":H=[["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"]],re=!1;break;case"surface":H=[["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"]],re=!0;break;case"mesh3d":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],re=!1;break;case"volume":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],re=!0;break;case"isosurface":H=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],re=!1;break}var J=A.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(H);J.enter().append("path").classed("legend3dandfriends",!0).attr("transform",C).style("stroke-miterlimit",1),J.exit().remove(),J.each(function(ae,K){var Y=A.select(this),ie=g(G),ne=ie.colorscale,le=ie.reversescale,de=function(ve){if(ve.size()){var Ae="legendfill-"+G.uid;M.gradient(ve,b,Ae,T(le,re==="radial"),ne,"fill")}},we;if(ne){if(!re){var Le=ne.length;we=K===0?ne[le?Le-1:0][1]:K===1?ne[le?0:Le-1][1]:ne[Math.floor((Le-1)/2)][1]}}else{var me=G.vertexcolor||G.facecolor||G.color;we=o.isArrayOrTypedArray(me)?me[K]||me[0]:me}Y.attr("d",ae[0]),we?Y.call(d.fill,we):Y.call(de)})}};function T(v,m){var b=m?"radial":"horizontal";return b+(v?"":"reversed")}function f(v){var m=v[0].trace,b=m.contours,E=r.hasLines(m),p=r.hasMarkers(m),S=m.visible&&m.fill&&m.fill!=="none",w=!1,i=!1;if(b){var C=b.coloring;C==="lines"?w=!0:E=C==="none"||C==="heatmap"||b.showlines,b.type==="constraint"?S=b._operation!=="=":(C==="fill"||C==="heatmap")&&(i=!0)}return{showMarker:p,showLine:E,showFill:S,showGradientLine:w,showGradientFill:i,anyLine:E||w,anyFill:S||i}}function n(v,m,b){return v&&o.isArrayOrTypedArray(v)?m:v>b?b:v}},66540:function(te,X,e){e(76052),te.exports={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar"},bgcolor:{valType:"color",editType:"modebar"},color:{valType:"color",editType:"modebar"},activecolor:{valType:"color",editType:"modebar"},uirevision:{valType:"any",editType:"none"},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar"}}},44248:function(te,X,e){var A=e(24040),P=e(7316),o=e(79811),L=e(9224),M=e(4016).eraseActiveShape,d=e(3400),g=d._,r=te.exports={};r.toImage={name:"toImage",title:function(v){var m=v._context.toImageButtonOptions||{},b=m.format||"png";return b==="png"?g(v,"Download plot as a png"):g(v,"Download plot")},icon:L.camera,click:function(v){var m=v._context.toImageButtonOptions,b={format:m.format||"png"};d.notifier(g(v,"Taking snapshot - this may take a few seconds"),"long"),b.format!=="svg"&&d.isIE()&&(d.notifier(g(v,"IE only supports svg. Changing format to svg."),"long"),b.format="svg"),["filename","width","height","scale"].forEach(function(E){E in m&&(b[E]=m[E])}),A.call("downloadImage",v,b).then(function(E){d.notifier(g(v,"Snapshot succeeded")+" - "+E,"long")}).catch(function(){d.notifier(g(v,"Sorry, there was a problem downloading your snapshot!"),"long")})}},r.sendDataToCloud={name:"sendDataToCloud",title:function(v){return g(v,"Edit in Chart Studio")},icon:L.disk,click:function(v){P.sendDataToCloud(v)}},r.editInChartStudio={name:"editInChartStudio",title:function(v){return g(v,"Edit in Chart Studio")},icon:L.pencil,click:function(v){P.sendDataToCloud(v)}},r.zoom2d={name:"zoom2d",_cat:"zoom",title:function(v){return g(v,"Zoom")},attr:"dragmode",val:"zoom",icon:L.zoombox,click:t},r.pan2d={name:"pan2d",_cat:"pan",title:function(v){return g(v,"Pan")},attr:"dragmode",val:"pan",icon:L.pan,click:t},r.select2d={name:"select2d",_cat:"select",title:function(v){return g(v,"Box Select")},attr:"dragmode",val:"select",icon:L.selectbox,click:t},r.lasso2d={name:"lasso2d",_cat:"lasso",title:function(v){return g(v,"Lasso Select")},attr:"dragmode",val:"lasso",icon:L.lasso,click:t},r.drawclosedpath={name:"drawclosedpath",title:function(v){return g(v,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:L.drawclosedpath,click:t},r.drawopenpath={name:"drawopenpath",title:function(v){return g(v,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:L.drawopenpath,click:t},r.drawline={name:"drawline",title:function(v){return g(v,"Draw line")},attr:"dragmode",val:"drawline",icon:L.drawline,click:t},r.drawrect={name:"drawrect",title:function(v){return g(v,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:L.drawrect,click:t},r.drawcircle={name:"drawcircle",title:function(v){return g(v,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:L.drawcircle,click:t},r.eraseshape={name:"eraseshape",title:function(v){return g(v,"Erase active shape")},icon:L.eraseshape,click:M},r.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(v){return g(v,"Zoom in")},attr:"zoom",val:"in",icon:L.zoom_plus,click:t},r.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(v){return g(v,"Zoom out")},attr:"zoom",val:"out",icon:L.zoom_minus,click:t},r.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(v){return g(v,"Autoscale")},attr:"zoom",val:"auto",icon:L.autoscale,click:t},r.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(v){return g(v,"Reset axes")},attr:"zoom",val:"reset",icon:L.home,click:t},r.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(v){return g(v,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:L.tooltip_basic,gravity:"ne",click:t},r.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(v){return g(v,"Compare data on hover")},attr:"hovermode",val:function(v){return v._fullLayout._isHoriz?"y":"x"},icon:L.tooltip_compare,gravity:"ne",click:t};function t(v,m){var b=m.currentTarget,E=b.getAttribute("data-attr"),p=b.getAttribute("data-val")||!0,S=v._fullLayout,w={},i=o.list(v,null,!0),C=S._cartesianSpikesEnabled,x,k;if(E==="zoom"){var I=p==="in"?.5:2,B=(1+I)/2,_=(1-I)/2,z;for(k=0;k1?(q=["toggleHover"],oe=["resetViews"]):w?($=["zoomInGeo","zoomOutGeo"],q=["hoverClosestGeo"],oe=["resetGeo"]):S?(q=["hoverClosest3d"],oe=["resetCameraDefault3d","resetCameraLastSave3d"]):I?($=["zoomInMapbox","zoomOutMapbox"],q=["toggleHover"],oe=["resetViewMapbox"]):x?q=["hoverClosestGl2d"]:i?q=["hoverClosestPie"]:z?(q=["hoverClosestCartesian","hoverCompareCartesian"],oe=["resetViewSankey"]):q=["toggleHover"],p&&(q=["toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"]),(c(T)||F)&&(q=[]),(p||x)&&!O&&($=["zoomIn2d","zoomOut2d","autoScale2d"],oe[0]!=="resetViews"&&(oe=["resetScale2d"])),S?Z=["zoom3d","pan3d","orbitRotation","tableRotation"]:(p||x)&&!O||k?Z=["zoom2d","pan2d"]:I||w?Z=["pan2d"]:B&&(Z=["zoom2d"]),a(T)&&Z.push("select2d","lasso2d");var G=[],re=function(K){G.indexOf(K)===-1&&q.indexOf(K)!==-1&&G.push(K)};if(Array.isArray(b)){for(var H=[],J=0;J0);if(n){var v=r(a,c,u);T("x",v[0]),T("y",v[1]),A.noneOrAll(s,a,["x","y"]),T("xanchor"),T("yanchor"),A.coerceFont(T,"font",c.font);var m=T("bgcolor");T("activecolor",P.contrast(m,d.lightAmount,d.darkAmount)),T("bordercolor"),T("borderwidth")}};function g(t,s,a,c){var u=c.calendar;function l(T,f){return A.coerce(t,s,M.buttons,T,f)}var y=l("visible");if(y){var h=l("step");h!=="all"&&(u&&u!=="gregorian"&&(h==="month"||h==="year")?s.stepmode="backward":l("stepmode"),l("count")),l("label")}}function r(t,s,a){for(var c=a.filter(function(h){return s[h].anchor===t._id}),u=0,l=0;l=Ae.max)Le=ne[ve+1];else if(me=Ae.pmax)Le=ne[ve+1];else if(me0?S.touches[0].clientX:0}function y(S,w,i,C){if(w._context.staticPlot)return;var x=S.select("rect."+u.slideBoxClassName).node(),k=S.select("rect."+u.grabAreaMinClassName).node(),I=S.select("rect."+u.grabAreaMaxClassName).node();function B(){var _=A.event,z=_.target,O=l(_),F=O-S.node().getBoundingClientRect().left,N=C.d2p(i._rl[0]),V=C.d2p(i._rl[1]),j=a.coverSlip();this.addEventListener("touchmove",$),this.addEventListener("touchend",q),j.addEventListener("mousemove",$),j.addEventListener("mouseup",q);function $(oe){var Z=l(oe),G=+Z-O,re,H,J;switch(z){case x:if(J="ew-resize",N+G>i._length||V+G<0)return;re=N+G,H=V+G;break;case k:if(J="col-resize",N+G>i._length)return;re=N+G,H=V;break;case I:if(J="col-resize",V+G<0)return;re=N,H=V+G;break;default:J="ew-resize",re=F,H=F+G;break}if(H=0;B--){var _=b.append("path").attr(p).style("opacity",B?.1:S).call(L.stroke,i).call(L.fill,w).call(M.dashLine,B?"solid":x,B?4+C:C);if(c(_,h,n),k){var z=d(h.layout,"selections",n);_.style({cursor:"move"});var O={element:_.node(),plotinfo:v,gd:h,editHelpers:z,isActiveSelection:!0},F=A(E,h);P(F,_,O)}else _.style("pointer-events",B?"all":"none");I[B]=_}var N=I[0],V=I[1];V.node().addEventListener("click",function(){return u(h,N)})}}function c(h,T,f){var n=f.xref+f.yref;M.setClipUrl(h,"clip"+T._fullLayout._uid+n,T)}function u(h,T){if(s(h)){var f=T.node(),n=+f.getAttribute("data-index");if(n>=0){if(n===h._fullLayout._activeSelectionIndex){y(h);return}h._fullLayout._activeSelectionIndex=n,h._fullLayout._deactivateSelection=y,t(h)}}}function l(h){if(s(h)){var T=h._fullLayout.selections.length-1;h._fullLayout._activeSelectionIndex=T,h._fullLayout._deactivateSelection=y,t(h)}}function y(h){if(s(h)){var T=h._fullLayout._activeSelectionIndex;T>=0&&(o(h),delete h._fullLayout._activeSelectionIndex,t(h))}}},34200:function(te,X,e){var A=e(98192).u,P=e(92880).extendFlat;te.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:P({},A,{dflt:"dot",editType:"none"}),editType:"none"},editType:"none"},activeselection:{fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"none"},opacity:{valType:"number",min:0,max:1,dflt:.5,editType:"none"},editType:"none"}}},81004:function(te){te.exports=function(e,A,P){P("newselection.mode");var o=P("newselection.line.width");o&&(P("newselection.line.color"),P("newselection.line.dash")),P("activeselection.fillcolor"),P("activeselection.opacity")}},5968:function(te,X,e){var A=e(72760),P=A.selectMode,o=e(1936),L=o.clearOutline,M=e(9856),d=M.readPaths,g=M.writePaths,r=M.fixDatesForPaths;te.exports=function(s,a){if(s.length){var c=s[0][0];if(c){var u=c.getAttribute("d"),l=a.gd,y=l._fullLayout.newselection,h=a.plotinfo,T=h.xaxis,f=h.yaxis,n=a.isActiveSelection,v=a.dragmode,m=(l.layout||{}).selections||[];if(!P(v)&&n!==void 0){var b=l._fullLayout._activeSelectionIndex;if(b=0){Ct._fullLayout._deactivateShape(Ct);return}if(!at){var xn=Yt.clickmode;i.done(Or).then(function(){if(i.clear(Or),Jr===2){for(Kt.remove(),Ut=0;Ut-1&&q(bn,Ct,pe.xaxes,pe.yaxes,pe.subplot,pe,Kt),xn==="event"&&Ue(Ct,void 0);d.click(Ct,bn,Wt.id)}).catch(p.error)}},pe.doneFn=function(){vr.remove(),i.done(Or).then(function(){i.clear(Or),!gr&&Lt&&pe.selectionDefs&&(Lt.subtract=ir,pe.selectionDefs.push(Lt),pe.mergedPolygons.length=0,[].push.apply(pe.mergedPolygons,Rt)),(gr||at)&&K(pe,gr),pe.doneFnCompleted&&pe.doneFnCompleted(Sr),ut&&Ue(Ct,rr)}).catch(p.error)}}function q(Oe,Ce,ge,pe,Te,be,ke){var Ve=Ce._hoverdata,je=Ce._fullLayout,at=je.clickmode,ut=at.indexOf("event")>-1,Nt=[],Vt,gt,Ct,Yt,gr,ht,Ht,Wt,cr,er;if(le(Ve)){H(Oe,Ce,be),Vt=ie(Ce,ge,pe,Te);var ct=de(Ve,Vt),qe=ct.pointNumbers.length>0;if(qe?me(Vt,ct):Le(Vt)&&(Ht=we(ct))){for(ke&&ke.remove(),er=0;er=0}function ae(Oe){return Oe._fullLayout._activeSelectionIndex>=0}function K(Oe,Ce){var ge=Oe.dragmode,pe=Oe.plotinfo,Te=Oe.gd;J(Te)&&Te._fullLayout._deactivateShape(Te),ae(Te)&&Te._fullLayout._deactivateSelection(Te);var be=Te._fullLayout,ke=be._zoomlayer,Ve=a(ge),je=u(ge);if(Ve||je){var at=ke.selectAll(".select-outline-"+pe.id);if(at&&Te._fullLayout._outlining){var ut;Ve&&(ut=m(at,Oe)),ut&&o.call("_guiRelayout",Te,{shapes:ut});var Nt;je&&!j(Oe)&&(Nt=b(at,Oe)),Nt&&(Te._fullLayout._noEmitSelectedAtStart=!0,o.call("_guiRelayout",Te,{selections:Nt}).then(function(){Ce&&E(Te)})),Te._fullLayout._outlining=!1}}pe.selection={},pe.selection.selectionDefs=Oe.selectionDefs=[],pe.selection.mergedPolygons=Oe.mergedPolygons=[]}function Y(Oe){return Oe._id}function ie(Oe,Ce,ge,pe){if(!Oe.calcdata)return[];var Te=[],be=Ce.map(Y),ke=ge.map(Y),Ve,je,at;for(at=0;at0,be=Te?pe[0]:ge;return Ce.selectedpoints?Ce.selectedpoints.indexOf(be)>-1:!1}function me(Oe,Ce){var ge=[],pe,Te,be,ke;for(ke=0;ke0&&ge.push(pe);if(ge.length===1&&(be=ge[0]===Ce.searchInfo,be&&(Te=Ce.searchInfo.cd[0].trace,Te.selectedpoints.length===Ce.pointNumbers.length))){for(ke=0;ke1||(Ce+=pe.selectedpoints.length,Ce>1)))return!1;return Ce===1}function ve(Oe,Ce,ge){var pe;for(pe=0;pe-1&&Ce;if(!ke&&Ce){var Jr=Ke(Oe,!0);if(Jr.length){var bn=Jr[0].xref,xn=Jr[0].yref;if(bn&&xn){var or=lt(Jr),Lr=xt([C(Oe,bn,"x"),C(Oe,xn,"y")]);Lr(Sr,or)}}Oe._fullLayout._noEmitSelectedAtStart?Oe._fullLayout._noEmitSelectedAtStart=!1:sn&&Ue(Oe,Sr),Vt._reselect=!1}if(!ke&&Vt._deselect){var Br=Vt._deselect;Ve=Br.xref,je=Br.yref,et(Ve,je,ut)||st(Oe,Ve,je,pe),sn&&(Sr.points.length?Ue(Oe,Sr):He(Oe)),Vt._deselect=!1}return{eventData:Sr,selectionTesters:ge}}function Ne(Oe){var Ce=Oe.calcdata;if(Ce)for(var ge=0;ge0?f+y:y;return{ppad:y,ppadplus:h?v:m,ppadminus:h?m:v}}else return{ppad:y}}function r(t,s,a,c,u){var l=t.type==="category"||t.type==="multicategory"?t.r2c:t.d2c;if(s!==void 0)return[l(s),l(a)];if(c){var y=1/0,h=-1/0,T=c.match(o.segmentRE),f,n,v,m,b;for(t.type==="date"&&(l=L.decodeDate(l)),f=0;fh&&(h=b)));if(h>=y)return[y,h]}}},85448:function(te){te.exports={segmentRE:/[MLHVQCTSZ][^MLHVQCTSZ]*/g,paramRE:/[^\s,]+/g,paramIsX:{M:{0:!0,drawn:0},L:{0:!0,drawn:0},H:{0:!0,drawn:0},V:{},Q:{0:!0,2:!0,drawn:2},C:{0:!0,2:!0,4:!0,drawn:4},T:{0:!0,drawn:0},S:{0:!0,2:!0,drawn:2},Z:{}},paramIsY:{M:{1:!0,drawn:1},L:{1:!0,drawn:1},H:{},V:{0:!0,drawn:0},Q:{1:!0,3:!0,drawn:3},C:{1:!0,3:!0,5:!0,drawn:5},T:{1:!0,drawn:1},S:{1:!0,3:!0,drawn:5},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}},43712:function(te,X,e){var A=e(3400),P=e(54460),o=e(51272),L=e(46056),M=e(65152);te.exports=function(t,s){o(t,s,{name:"shapes",handleItemDefaults:g})};function d(r,t){return r?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function g(r,t,s){function a(Z,G){return A.coerce(r,t,L,Z,G)}t._isShape=!0;var c=a("visible");if(c){var u=a("showlegend");u&&(a("legend"),a("legendwidth"),a("legendgroup"),a("legendgrouptitle.text"),A.coerceFont(a,"legendgrouptitle.font"),a("legendrank"));var l=a("path"),y=l?"path":"rect",h=a("type",y),T=h!=="path";T&&delete t.path,a("editable"),a("layer"),a("opacity"),a("fillcolor"),a("fillrule");var f=a("line.width");f&&(a("line.color"),a("line.dash"));for(var n=a("xsizemode"),v=a("ysizemode"),m=["x","y"],b=0;b<2;b++){var E=m[b],p=E+"anchor",S=E==="x"?n:v,w={_fullLayout:s},i,C,x,k=P.coerceRef(r,t,w,E,void 0,"paper"),I=P.getRefType(k);if(I==="range"?(i=P.getFromId(w,k),i._shapeIndices.push(t._index),x=M.rangeToShapePosition(i),C=M.shapePositionToRange(i)):C=x=A.identity,T){var B=.25,_=.75,z=E+"0",O=E+"1",F=r[z],N=r[O];r[z]=C(r[z],!0),r[O]=C(r[O],!0),S==="pixel"?(a(z,0),a(O,10)):(P.coercePosition(t,w,a,k,z,B),P.coercePosition(t,w,a,k,O,_)),t[z]=x(t[z]),t[O]=x(t[O]),r[z]=F,r[O]=N}if(S==="pixel"){var V=r[p];r[p]=C(r[p],!0),P.coercePosition(t,w,a,k,p,.25),t[p]=x(t[p]),r[p]=V}}T&&A.noneOrAll(r,t,["x0","x1","y0","y1"]);var j=h==="line",$,q;if(T&&($=a("label.texttemplate")),$||(q=a("label.text")),q||$){a("label.textangle");var oe=a("label.textposition",j?"middle":"middle center");a("label.xanchor"),a("label.yanchor",d(j,oe)),a("label.padding"),A.coerceFont(a,"label.font",s.font)}}}},60728:function(te,X,e){var A=e(3400),P=e(54460),o=e(72736),L=e(43616),M=e(9856).readPaths,d=e(65152),g=d.getPathString,r=e(97728),t=e(84284).FROM_TL;te.exports=function(u,l,y,h){if(h.selectAll(".shape-label").remove(),!!(y.label.text||y.label.texttemplate)){var T;if(y.label.texttemplate){var f={};if(y.type!=="path"){var n=P.getFromId(u,y.xref),v=P.getFromId(u,y.yref);for(var m in r){var b=r[m](y,n,v);b!==void 0&&(f[m]=b)}}T=A.texttemplateStringForShapes(y.label.texttemplate,{},u._fullLayout._d3locale,f)}else T=y.label.text;var E={"data-index":l},p=y.label.font,S={"data-notex":1},w=h.append("g").attr(E).classed("shape-label",!0),i=w.append("text").attr(S).classed("shape-label-text",!0).text(T),C,x,k,I;if(y.path){var B=g(u,y),_=M(B,u);C=1/0,k=1/0,x=-1/0,I=-1/0;for(var z=0;z<_.length;z++)for(var O=0;O<_[z].length;O++)for(var F=_[z][O],N=1;N=c?h=u-y:h=y-u,-180/Math.PI*Math.atan2(h,T)}function a(c,u,l,y,h,T,f){var n=h.label.textposition,v=h.label.textangle,m=h.label.padding,b=h.type,E=Math.PI/180*T,p=Math.sin(E),S=Math.cos(E),w=h.label.xanchor,i=h.label.yanchor,C,x,k,I;if(b==="line"){n==="start"?(C=c,x=u):n==="end"?(C=l,x=y):(C=(c+l)/2,x=(u+y)/2),w==="auto"&&(n==="start"?v==="auto"?l>c?w="left":lc?w="right":lc?w="right":lc?w="left":l1&&!(ye.length===2&&ye[1][0]==="Z")&&(Z===0&&(ye[0][0]="M"),C[oe]=ye,_(),z())}}function ne(ye,Se){if(ye===2){oe=+Se.srcElement.getAttribute("data-i"),Z=+Se.srcElement.getAttribute("data-j");var _e=C[oe];!T(_e)&&!f(_e)&&ie()}}function le(ye){$=[];for(var Se=0;Se_&&ge>z&&!He.shiftKey?c.getCursor(pe/Ce,1-Te/ge):"move";u(C,be),et=be.split("-")[0]}}function nt(He){f(i)||(O&&(G=ye(x.xanchor)),F&&(re=Se(x.yanchor)),x.type==="path"?de=x.path:($=O?x.x0:ye(x.x0),q=F?x.y0:Se(x.y0),oe=O?x.x1:ye(x.x1),Z=F?x.y1:Se(x.y1)),$Z?(H=q,Y="y0",J=Z,ie="y1"):(H=Z,Y="y1",J=q,ie="y0"),Ke(He),Je(I,x),Ue(C,x,i),Ne.moveFn=et==="move"?vt:xt,Ne.altKey=He.altKey)}function it(){f(i)||(u(C),Pe(I),m(C,i,x),P.call("_guiRelayout",i,B.getUpdateObj()))}function lt(){f(i)||Pe(I)}function vt(He,Oe){if(x.type==="path"){var Ce=function(Te){return Te},ge=Ce,pe=Ce;O?j("xanchor",x.xanchor=_e(G+He)):(ge=function(be){return _e(ye(be)+He)},me&&me.type==="date"&&(ge=y.encodeDate(ge))),F?j("yanchor",x.yanchor=ze(re+Oe)):(pe=function(be){return ze(Se(be)+Oe)},ve&&ve.type==="date"&&(pe=y.encodeDate(pe))),j("path",x.path=E(de,ge,pe))}else O?j("xanchor",x.xanchor=_e(G+He)):(j("x0",x.x0=_e($+He)),j("x1",x.x1=_e(oe+He))),F?j("yanchor",x.yanchor=ze(re+Oe)):(j("y0",x.y0=ze(q+Oe)),j("y1",x.y1=ze(Z+Oe)));C.attr("d",h(i,x)),Je(I,x),g(i,k,x,we)}function xt(He,Oe){if(V){var Ce=function(ht){return ht},ge=Ce,pe=Ce;O?j("xanchor",x.xanchor=_e(G+He)):(ge=function(Ht){return _e(ye(Ht)+He)},me&&me.type==="date"&&(ge=y.encodeDate(ge))),F?j("yanchor",x.yanchor=ze(re+Oe)):(pe=function(Ht){return ze(Se(Ht)+Oe)},ve&&ve.type==="date"&&(pe=y.encodeDate(pe))),j("path",x.path=E(de,ge,pe))}else if(N){if(et==="resize-over-start-point"){var Te=$+He,be=F?q-Oe:q+Oe;j("x0",x.x0=O?Te:_e(Te)),j("y0",x.y0=F?be:ze(be))}else if(et==="resize-over-end-point"){var ke=oe+He,Ve=F?Z-Oe:Z+Oe;j("x1",x.x1=O?ke:_e(ke)),j("y1",x.y1=F?Ve:ze(Ve))}}else{var je=function(ht){return et.indexOf(ht)!==-1},at=je("n"),ut=je("s"),Nt=je("w"),Vt=je("e"),gt=at?H+Oe:H,Ct=ut?J+Oe:J,Yt=Nt?ae+He:ae,gr=Vt?K+He:K;F&&(at&&(gt=H-Oe),ut&&(Ct=J-Oe)),(!F&&Ct-gt>z||F&>-Ct>z)&&(j(Y,x[Y]=F?gt:ze(gt)),j(ie,x[ie]=F?Ct:ze(Ct))),gr-Yt>_&&(j(ne,x[ne]=O?Yt:_e(Yt)),j(le,x[le]=O?gr:_e(gr)))}C.attr("d",h(i,x)),Je(I,x),g(i,k,x,we)}function Je(He,Oe){(O||F)&&Ce();function Ce(){var ge=Oe.type!=="path",pe=He.selectAll(".visual-cue").data([0]),Te=1;pe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":Te}).classed("visual-cue",!0);var be=ye(O?Oe.xanchor:o.midRange(ge?[Oe.x0,Oe.x1]:y.extractPathCoords(Oe.path,l.paramIsX))),ke=Se(F?Oe.yanchor:o.midRange(ge?[Oe.y0,Oe.y1]:y.extractPathCoords(Oe.path,l.paramIsY)));if(be=y.roundPositionForSharpStrokeRendering(be,Te),ke=y.roundPositionForSharpStrokeRendering(ke,Te),O&&F){var Ve="M"+(be-1-Te)+","+(ke-1-Te)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";pe.attr("d",Ve)}else if(O){var je="M"+(be-1-Te)+","+(ke-9-Te)+"v18 h2 v-18 Z";pe.attr("d",je)}else{var at="M"+(be-9-Te)+","+(ke-1-Te)+"h18 v2 h-18 Z";pe.attr("d",at)}}}function Pe(He){He.selectAll(".visual-cue").remove()}function Ue(He,Oe,Ce){var ge=Oe.xref,pe=Oe.yref,Te=L.getFromId(Ce,ge),be=L.getFromId(Ce,pe),ke="";ge!=="paper"&&!Te.autorange&&(ke+=ge),pe!=="paper"&&!be.autorange&&(ke+=pe),s.setClipUrl(He,ke?"clip"+Ce._fullLayout._uid+ke:null,Ce)}}function E(i,C,x){return i.replace(l.segmentRE,function(k){var I=0,B=k.charAt(0),_=l.paramIsX[B],z=l.paramIsY[B],O=l.numParams[B],F=k.substr(1).replace(l.paramRE,function(N){return I>=O||(_[I]?N=C(N):z[I]&&(N=x(N)),I++),N});return B+F})}function p(i,C){if(n(i)){var x=C.node(),k=+x.getAttribute("data-index");if(k>=0){if(k===i._fullLayout._activeShapeIndex){S(i);return}i._fullLayout._activeShapeIndex=k,i._fullLayout._deactivateShape=S,T(i)}}}function S(i){if(n(i)){var C=i._fullLayout._activeShapeIndex;C>=0&&(r(i),delete i._fullLayout._activeShapeIndex,T(i))}}function w(i){if(n(i)){r(i);var C=i._fullLayout._activeShapeIndex,x=(i.layout||{}).shapes||[];if(C0&&vf&&(v="X"),v});return l>f&&(n=n.replace(/[\s,]*X.*/,""),P.log("Ignoring extra params in segment "+u)),y+n})}},41592:function(te,X,e){var A=e(4016);te.exports={moduleType:"component",name:"shapes",layoutAttributes:e(46056),supplyLayoutDefaults:e(43712),supplyDrawNewShapeDefaults:e(65144),includeBasePlot:e(36632)("shapes"),calcAutorange:e(96084),draw:A.draw,drawOne:A.drawOne}},97728:function(te){function X(u,l){return l?l.d2l(u):u}function e(u,l){return l?l.l2d(u):u}function A(u){return u.x0}function P(u){return u.x1}function o(u){return u.y0}function L(u){return u.y1}function M(u,l){return X(u.x1,l)-X(u.x0,l)}function d(u,l,y){return X(u.y1,y)-X(u.y0,y)}function g(u,l){return Math.abs(M(u,l))}function r(u,l,y){return Math.abs(d(u,l,y))}function t(u,l,y){return u.type!=="line"?void 0:Math.sqrt(Math.pow(M(u,l),2)+Math.pow(d(u,l,y),2))}function s(u,l){return e((X(u.x1,l)+X(u.x0,l))/2,l)}function a(u,l,y){return e((X(u.y1,y)+X(u.y0,y))/2,y)}function c(u,l,y){return u.type!=="line"?void 0:d(u,l,y)/M(u,l)}te.exports={x0:A,x1:P,y0:o,y1:L,slope:c,dx:M,dy:d,width:g,height:r,length:t,xcenter:s,ycenter:a}},89861:function(te,X,e){var A=e(25376),P=e(66741),o=e(92880).extendDeepAll,L=e(67824).overrideAll,M=e(85656),d=e(31780).templatedArray,g=e(60876),r=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}});te.exports=L(d("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:r,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:o(P({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:M.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:A({})},font:A({}),activebgcolor:{valType:"color",dflt:g.gripBgActiveColor},bgcolor:{valType:"color",dflt:g.railBgColor},bordercolor:{valType:"color",dflt:g.railBorderColor},borderwidth:{valType:"number",min:0,dflt:g.railBorderWidth},ticklen:{valType:"number",min:0,dflt:g.tickLength},tickcolor:{valType:"color",dflt:g.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:g.minorTickLength}}),"arraydraw","from-root")},60876:function(te){te.exports={name:"sliders",containerClassName:"slider-container",groupClassName:"slider-group",inputAreaClass:"slider-input-area",railRectClass:"slider-rail-rect",railTouchRectClass:"slider-rail-touch-rect",gripRectClass:"slider-grip-rect",tickRectClass:"slider-tick-rect",inputProxyClass:"slider-input-proxy",labelsClass:"slider-labels",labelGroupClass:"slider-label-group",labelClass:"slider-label",currentValueClass:"slider-current-value",railHeight:5,menuIndexAttrName:"slider-active-index",autoMarginIdRoot:"slider-",minWidth:30,minHeight:30,textPadX:40,arrowOffsetX:4,railRadius:2,railWidth:5,railBorder:4,railBorderWidth:1,railBorderColor:"#bec8d9",railBgColor:"#f8fafc",railInset:8,stepInset:10,gripRadius:10,gripWidth:20,gripHeight:20,gripBorder:20,gripBorderWidth:1,gripBorderColor:"#bec8d9",gripBgColor:"#f6f8fa",gripBgActiveColor:"#dbdde0",labelPadding:8,labelOffset:0,tickWidth:1,tickColor:"#333",tickOffset:25,tickLength:7,minorTickOffset:25,minorTickColor:"#333",minorTickLength:4,currentValuePadding:8,currentValueInset:0}},8132:function(te,X,e){var A=e(3400),P=e(51272),o=e(89861),L=e(60876),M=L.name,d=o.steps;te.exports=function(s,a){P(s,a,{name:M,handleItemDefaults:g})};function g(t,s,a){function c(v,m){return A.coerce(t,s,o,v,m)}for(var u=P(t,s,{name:"steps",handleItemDefaults:r}),l=0,y=0;y0?[0]:[]);V.enter().append("g").classed(t.containerClassName,!0).style("cursor",O?null:"ew-resize");function j(Z){Z._commandObserver&&(Z._commandObserver.remove(),delete Z._commandObserver),P.autoMargin(z,l(Z))}if(V.exit().each(function(){A.select(this).selectAll("g."+t.groupClassName).each(j)}).remove(),N.length!==0){var $=V.selectAll("g."+t.groupClassName).data(N,h);$.enter().append("g").classed(t.groupClassName,!0),$.exit().each(j).remove();for(var q=0;q0&&($=$.transition().duration(z.transition.duration).ease(z.transition.easing)),$.attr("transform",d(j-t.gripWidth*.5,z._dims.currentValueTotalHeight))}}function x(_,z){var O=_._dims;return O.inputAreaStart+t.stepInset+(O.inputAreaLength-2*t.stepInset)*Math.min(1,Math.max(0,z))}function k(_,z){var O=_._dims;return Math.min(1,Math.max(0,(z-t.stepInset-O.inputAreaStart)/(O.inputAreaLength-2*t.stepInset-2*O.inputAreaStart)))}function I(_,z,O){var F=O._dims,N=M.ensureSingle(_,"rect",t.railTouchRectClass,function(V){V.call(S,z,_,O).style("pointer-events","all")});N.attr({width:F.inputAreaLength,height:Math.max(F.inputAreaWidth,t.tickOffset+O.ticklen+F.labelHeight)}).call(o.fill,O.bgcolor).attr("opacity",0),L.setTranslate(N,0,F.currentValueTotalHeight)}function B(_,z){var O=z._dims,F=O.inputAreaLength-t.railInset*2,N=M.ensureSingle(_,"rect",t.railRectClass);N.attr({width:F,height:t.railWidth,rx:t.railRadius,ry:t.railRadius,"shape-rendering":"crispEdges"}).call(o.stroke,z.bordercolor).call(o.fill,z.bgcolor).style("stroke-width",z.borderwidth+"px"),L.setTranslate(N,t.railInset,(O.inputAreaWidth-t.railWidth)*.5+O.currentValueTotalHeight)}},97544:function(te,X,e){var A=e(60876);te.exports={moduleType:"component",name:A.name,layoutAttributes:e(89861),supplyLayoutDefaults:e(8132),draw:e(79664)}},81668:function(te,X,e){var A=e(33428),P=e(38248),o=e(7316),L=e(24040),M=e(3400),d=M.strTranslate,g=e(43616),r=e(76308),t=e(72736),s=e(13448),a=e(84284).OPPOSITE_SIDE,c=/ [XY][0-9]* /;function u(l,y,h){var T=h.propContainer,f=h.propName,n=h.placeholder,v=h.traceIndex,m=h.avoid||{},b=h.attributes,E=h.transform,p=h.containerGroup,S=l._fullLayout,w=1,i=!1,C=T.title,x=(C&&C.text?C.text:"").trim(),k=C&&C.font?C.font:{},I=k.family,B=k.size,_=k.color,z;f==="title.text"?z="titleText":f.indexOf("axis")!==-1?z="axisTitleText":f.indexOf("colorbar"!==-1)&&(z="colorbarTitleText");var O=l._context.edits[z];x===""?w=0:x.replace(c," % ")===n.replace(c," % ")&&(w=.2,i=!0,O||(x="")),h._meta?x=M.templateString(x,h._meta):S._meta&&(x=M.templateString(x,S._meta));var F=x||O,N;p||(p=M.ensureSingle(S._infolayer,"g","g-"+y),N=S._hColorbarMoveTitle);var V=p.selectAll("text").data(F?[0]:[]);if(V.enter().append("text"),V.text(x).attr("class",y),V.exit().remove(),!F)return p;function j(Z){M.syncOrAsync([$,q],Z)}function $(Z){var G;return!E&&N&&(E={}),E?(G="",E.rotate&&(G+="rotate("+[E.rotate,b.x,b.y]+")"),(E.offset||N)&&(G+=d(0,(E.offset||0)-(N||0)))):G=null,Z.attr("transform",G),Z.style({"font-family":I,"font-size":A.round(B,2)+"px",fill:r.rgb(_),opacity:w*r.opacity(_),"font-weight":o.fontWeight}).attr(b).call(t.convertToTspans,l),o.previousPromises(l)}function q(Z){var G=A.select(Z.node().parentNode);if(m.selection&&m.side&&x){G.attr("transform",null);var re=a[m.side],H=m.side==="left"||m.side==="top"?-1:1,J=P(m.pad)?m.pad:2,ae=g.bBox(G.node()),K={t:0,b:0,l:0,r:0},Y=l._fullLayout._reservedMargin;for(var ie in Y)for(var ne in Y[ie]){var le=Y[ie][ne];K[ne]=Math.max(K[ne],le)}var de={left:K.l,top:K.t,right:S.width-K.r,bottom:S.height-K.b},we=m.maxShift||H*(de[m.side]-ae[m.side]),me=0;if(we<0)me=we;else{var Le=m.offsetLeft||0,ve=m.offsetTop||0;ae.left-=Le,ae.right-=Le,ae.top-=ve,ae.bottom-=ve,m.selection.each(function(){var ye=g.bBox(this);M.bBoxIntersect(ae,ye,J)&&(me=Math.max(me,H*(ye[m.side]-ae[re])+J))}),me=Math.min(we,me),T._titleScoot=Math.abs(me)}if(me>0||we<0){var Ae={left:[-me,0],right:[me,0],top:[0,-me],bottom:[0,me]}[m.side];G.attr("transform",d(Ae[0],Ae[1]))}}}V.call(j);function oe(){w=0,i=!0,V.text(n).on("mouseover.opacity",function(){A.select(this).transition().duration(s.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){A.select(this).transition().duration(s.HIDE_PLACEHOLDER).style("opacity",0)})}return O&&(x?V.on(".opacity",null):oe(),V.call(t.makeEditable,{gd:l}).on("edit",function(Z){v!==void 0?L.call("_guiRestyle",l,f,Z,v):L.call("_guiRelayout",l,f,Z)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(j)}).on("input",function(Z){this.text(Z||" ").call(t.positionText,b.x,b.y)})),V.classed("js-placeholder",i),p}te.exports={draw:u}},88444:function(te,X,e){var A=e(25376),P=e(22548),o=e(92880).extendFlat,L=e(67824).overrideAll,M=e(66741),d=e(31780).templatedArray,g=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}});te.exports=L(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:g,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:o(M({editType:"arraydraw"}),{}),font:A({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:P.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")},73712:function(te){te.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"◄",right:"►",up:"▲",down:"▼"}}},91384:function(te,X,e){var A=e(3400),P=e(51272),o=e(88444),L=e(73712),M=L.name,d=o.buttons;te.exports=function(s,a){var c={name:M,handleItemDefaults:g};P(s,a,c)};function g(t,s,a){function c(y,h){return A.coerce(t,s,o,y,h)}var u=P(t,s,{name:"buttons",handleItemDefaults:r}),l=c("visible",u.length>0);l&&(c("active"),c("direction"),c("type"),c("showactive"),c("x"),c("y"),A.noneOrAll(t,s,["x","y"]),c("xanchor"),c("yanchor"),c("pad.t"),c("pad.r"),c("pad.b"),c("pad.l"),A.coerceFont(c,"font",a.font),c("bgcolor",a.paper_bgcolor),c("bordercolor"),c("borderwidth"))}function r(t,s){function a(u,l){return A.coerce(t,s,d,u,l)}var c=a("visible",t.method==="skip"||Array.isArray(t.args));c&&(a("method"),a("args"),a("args2"),a("label"),a("execute"))}},14420:function(te,X,e){var A=e(33428),P=e(7316),o=e(76308),L=e(43616),M=e(3400),d=e(72736),g=e(31780).arrayEditor,r=e(84284).LINE_SPACING,t=e(73712),s=e(37400);te.exports=function(k){var I=k._fullLayout,B=M.filterVisible(I[t.name]);function _(q){P.autoMargin(k,w(q))}var z=I._menulayer.selectAll("g."+t.containerClassName).data(B.length>0?[0]:[]);if(z.enter().append("g").classed(t.containerClassName,!0).style("cursor","pointer"),z.exit().each(function(){A.select(this).selectAll("g."+t.headerGroupClassName).each(_)}).remove(),B.length!==0){var O=z.selectAll("g."+t.headerGroupClassName).data(B,a);O.enter().append("g").classed(t.headerGroupClassName,!0);for(var F=M.ensureSingle(z,"g",t.dropdownButtonGroupClassName,function(q){q.style("pointer-events","all")}),N=0;Nb,k=M.barLength+2*M.barPad,I=M.barWidth+2*M.barPad,B=u,_=y+h;_+I>c&&(_=c-I);var z=this.container.selectAll("rect.scrollbar-horizontal").data(x?[0]:[]);z.exit().on(".drag",null).remove(),z.enter().append("rect").classed("scrollbar-horizontal",!0).call(P.fill,M.barColor),x?(this.hbar=z.attr({rx:M.barRadius,ry:M.barRadius,x:B,y:_,width:k,height:I}),this._hbarXMin=B+k/2,this._hbarTranslateMax=b-k):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var O=h>E,F=M.barWidth+2*M.barPad,N=M.barLength+2*M.barPad,V=u+l,j=y;V+F>a&&(V=a-F);var $=this.container.selectAll("rect.scrollbar-vertical").data(O?[0]:[]);$.exit().on(".drag",null).remove(),$.enter().append("rect").classed("scrollbar-vertical",!0).call(P.fill,M.barColor),O?(this.vbar=$.attr({rx:M.barRadius,ry:M.barRadius,x:V,y:j,width:F,height:N}),this._vbarYMin=j+N/2,this._vbarTranslateMax=E-N):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var q=this.id,oe=p-.5,Z=O?S+F+.5:S+.5,G=w-.5,re=x?i+I+.5:i+.5,H=s._topdefs.selectAll("#"+q).data(x||O?[0]:[]);if(H.exit().remove(),H.enter().append("clipPath").attr("id",q).append("rect"),x||O?(this._clipRect=H.select("rect").attr({x:Math.floor(oe),y:Math.floor(G),width:Math.ceil(Z)-Math.floor(oe),height:Math.ceil(re)-Math.floor(G)}),this.container.call(o.setClipUrl,q,this.gd),this.bg.attr({x:u,y,width:l,height:h})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.setClipUrl,null),delete this._clipRect),x||O){var J=A.behavior.drag().on("dragstart",function(){A.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(J);var ae=A.behavior.drag().on("dragstart",function(){A.event.sourceEvent.preventDefault(),A.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));x&&this.hbar.on(".drag",null).call(ae),O&&this.vbar.on(".drag",null).call(ae)}this.setTranslate(r,t)},M.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(o.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)},M.prototype._onBoxDrag=function(){var g=this.translateX,r=this.translateY;this.hbar&&(g-=A.event.dx),this.vbar&&(r-=A.event.dy),this.setTranslate(g,r)},M.prototype._onBoxWheel=function(){var g=this.translateX,r=this.translateY;this.hbar&&(g+=A.event.deltaY),this.vbar&&(r+=A.event.deltaY),this.setTranslate(g,r)},M.prototype._onBarDrag=function(){var g=this.translateX,r=this.translateY;if(this.hbar){var t=g+this._hbarXMin,s=t+this._hbarTranslateMax,a=L.constrain(A.event.x,t,s),c=(a-t)/(s-t),u=this.position.w-this._box.w;g=c*u}if(this.vbar){var l=r+this._vbarYMin,y=l+this._vbarTranslateMax,h=L.constrain(A.event.y,l,y),T=(h-l)/(y-l),f=this.position.h-this._box.h;r=T*f}this.setTranslate(g,r)},M.prototype.setTranslate=function(g,r){var t=this.position.w-this._box.w,s=this.position.h-this._box.h;if(g=L.constrain(g||0,0,t),r=L.constrain(r||0,0,s),this.translateX=g,this.translateY=r,this.container.call(o.setTranslate,this._box.l-this.position.l-g,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+g-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var a=g/t;this.hbar.call(o.setTranslate,g+a*this._hbarTranslateMax,r)}if(this.vbar){var c=r/s;this.vbar.call(o.setTranslate,g,r+c*this._vbarTranslateMax)}}},84284:function(te){te.exports={FROM_BL:{left:0,center:.5,right:1,bottom:0,middle:.5,top:1},FROM_TL:{left:0,center:.5,right:1,bottom:1,middle:.5,top:0},FROM_BR:{left:1,center:.5,right:0,bottom:0,middle:.5,top:1},LINE_SPACING:1.3,CAP_SHIFT:.7,MID_SHIFT:.35,OPPOSITE_SIDE:{left:"right",right:"left",top:"bottom",bottom:"top"}}},36208:function(te){te.exports={axisRefDescription:function(X,e,A){return["If set to a",X,"axis id (e.g. *"+X+"* or","*"+X+"2*), the `"+X+"` position refers to a",X,"coordinate. If set to *paper*, the `"+X+"`","position refers to the distance from the",e,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",e,"("+A+"). If set to a",X,"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.,","*"+X+"2 domain* refers to the domain of the second",X," axis and a",X,"position of 0.5 refers to the","point between the",e,"and the",A,"of the domain of the","second",X,"axis."].join(" ")}}},48164:function(te){te.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"▲"},DECREASING:{COLOR:"#FF4136",SYMBOL:"▼"}}},26880:function(te){te.exports={FORMAT_LINK:"https://github.com/d3/d3-format/tree/v1.4.5#d3-format",DATE_FORMAT_LINK:"https://github.com/d3/d3-time-format/tree/v2.2.3#locale_format"}},69104:function(te){te.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}},99168:function(te){te.exports={solid:[[],0],dot:[[.5,1],200],dash:[[.5,1],50],longdash:[[.5,1],10],dashdot:[[.5,.625,.875,1],50],longdashdot:[[.5,.7,.8,1],10]}},87792:function(te){te.exports={circle:"●","circle-open":"○",square:"■","square-open":"□",diamond:"◆","diamond-open":"◇",cross:"+",x:"❌"}},13448:function(te){te.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}},39032:function(te){te.exports={BADNUM:void 0,FP_SAFE:Number.MAX_VALUE*1e-4,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:24405875e-1,ALMOST_EQUAL:.999999,LOG_CLIP:10,MINUS_SIGN:"−"}},2264:function(te,X){X.CSS_DECLARATIONS=[["image-rendering","optimizeSpeed"],["image-rendering","-moz-crisp-edges"],["image-rendering","-o-crisp-edges"],["image-rendering","-webkit-optimize-contrast"],["image-rendering","optimize-contrast"],["image-rendering","crisp-edges"],["image-rendering","pixelated"]],X.STYLE=X.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")},9616:function(te,X){X.xmlns="http://www.w3.org/2000/xmlns/",X.svg="http://www.w3.org/2000/svg",X.xlink="http://www.w3.org/1999/xlink",X.svgAttrs={xmlns:X.svg,"xmlns:xlink":X.xlink}},64884:function(te,X,e){X.version=e(25788).version,e(88324),e(79288);for(var A=e(24040),P=X.register=A.register,o=e(22448),L=Object.keys(o),M=0;M",""," ",""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}},98308:function(te,X){X.isLeftAnchor=function(A){return A.xanchor==="left"||A.xanchor==="auto"&&A.x<=.3333333333333333},X.isCenterAnchor=function(A){return A.xanchor==="center"||A.xanchor==="auto"&&A.x>.3333333333333333&&A.x<.6666666666666666},X.isRightAnchor=function(A){return A.xanchor==="right"||A.xanchor==="auto"&&A.x>=.6666666666666666},X.isTopAnchor=function(A){return A.yanchor==="top"||A.yanchor==="auto"&&A.y>=.6666666666666666},X.isMiddleAnchor=function(A){return A.yanchor==="middle"||A.yanchor==="auto"&&A.y>.3333333333333333&&A.y<.6666666666666666},X.isBottomAnchor=function(A){return A.yanchor==="bottom"||A.yanchor==="auto"&&A.y<=.3333333333333333}},11864:function(te,X,e){var A=e(20435),P=A.mod,o=A.modHalf,L=Math.PI,M=2*L;function d(T){return T/180*L}function g(T){return T/L*180}function r(T){return Math.abs(T[1]-T[0])>M-1e-14}function t(T,f){return o(f-T,M)}function s(T,f){return Math.abs(t(T,f))}function a(T,f){if(r(f))return!0;var n,v;f[0]v&&(v+=M);var m=P(T,M),b=m+M;return m>=n&&m<=v||b>=n&&b<=v}function c(T,f,n,v){if(!a(f,v))return!1;var m,b;return n[0]=m&&T<=b}function u(T,f,n,v,m,b,E){m=m||0,b=b||0;var p=r([n,v]),S,w,i,C,x;p?(S=0,w=L,i=M):n"u"?void 0:Uint8ClampedArray,i1:typeof Int8Array>"u"?void 0:Int8Array,u1:typeof Uint8Array>"u"?void 0:Uint8Array,i2:typeof Int16Array>"u"?void 0:Int16Array,u2:typeof Uint16Array>"u"?void 0:Uint16Array,i4:typeof Int32Array>"u"?void 0:Int32Array,u4:typeof Uint32Array>"u"?void 0:Uint32Array,f4:typeof Float32Array>"u"?void 0:Float32Array,f8:typeof Float64Array>"u"?void 0:Float64Array};t.uint8c=t.u1c,t.uint8=t.u1,t.int8=t.i1,t.uint16=t.u2,t.int16=t.i2,t.uint32=t.u4,t.int32=t.i4,t.float32=t.f4,t.float64=t.f8;function s(u){return u.constructor===ArrayBuffer}X.isArrayBuffer=s,X.decodeTypedArraySpec=function(u){var l=[],y=a(u),h=y.dtype,T=t[h];if(!T)throw new Error('Error in dtype: "'+h+'"');var f=T.BYTES_PER_ELEMENT,n=y.bdata;s(n)||(n=A(n));var v=y.shape===void 0?[n.byteLength/f]:(""+y.shape).split(",");v.reverse();var m=v.length,b,E,p=+v[0],S=f*p,w=0;if(m===1)l=new T(n);else if(m===2)for(b=+v[1],E=0;ET.max?y.set(h):y.set(+l)}},integer:{coerceFunction:function(l,y,h,T){l%1||!A(l)||T.min!==void 0&&lT.max?y.set(h):y.set(+l)}},string:{coerceFunction:function(l,y,h,T){if(typeof l!="string"){var f=typeof l=="number";T.strict===!0||!f?y.set(h):y.set(String(l))}else T.noBlank&&!l?y.set(h):y.set(l)}},color:{coerceFunction:function(l,y,h){P(l).isValid()?y.set(l):y.set(h)}},colorlist:{coerceFunction:function(l,y,h){function T(f){return P(f).isValid()}!Array.isArray(l)||!l.length?y.set(h):l.every(T)?y.set(l):y.set(h)}},colorscale:{coerceFunction:function(l,y,h){y.set(L.get(l,h))}},angle:{coerceFunction:function(l,y,h){l==="auto"?y.set("auto"):A(l)?y.set(t(+l,360)):y.set(h)}},subplotid:{coerceFunction:function(l,y,h,T){var f=T.regex||r(h);if(typeof l=="string"&&f.test(l)){y.set(l);return}y.set(h)},validateFunction:function(l,y){var h=y.dflt;return l===h?!0:typeof l!="string"?!1:!!r(h).test(l)}},flaglist:{coerceFunction:function(l,y,h,T){if((T.extras||[]).indexOf(l)!==-1){y.set(l);return}if(typeof l!="string"){y.set(h);return}for(var f=l.split("+"),n=0;n=n&&_<=v?_:d}if(typeof _!="string"&&typeof _!="number")return d;_=String(_);var V=T(z),j=_.charAt(0);V&&(j==="G"||j==="g")&&(_=_.substr(1),z="");var $=V&&z.substr(0,7)==="chinese",q=_.match($?y:l);if(!q)return d;var oe=q[1],Z=q[3]||"1",G=Number(q[5]||1),re=Number(q[7]||0),H=Number(q[9]||0),J=Number(q[11]||0);if(V){if(oe.length===2)return d;oe=Number(oe);var ae;try{var K=c.getComponentMethod("calendars","getCal")(z);if($){var Y=Z.charAt(Z.length-1)==="i";Z=parseInt(Z,10),ae=K.newDate(oe,K.toMonthIndex(oe,Z,Y),G)}else ae=K.newDate(oe,Number(Z),G)}catch{return d}return ae?(ae.toJD()-a)*g+re*r+H*t+J*s:d}oe.length===2?oe=(Number(oe)+2e3-h)%100+h:oe=Number(oe),Z-=1;var ie=new Date(Date.UTC(2e3,Z,G,re,H));return ie.setUTCFullYear(oe),ie.getUTCMonth()!==Z||ie.getUTCDate()!==G?d:ie.getTime()+J*s},n=X.MIN_MS=X.dateTime2ms("-9999"),v=X.MAX_MS=X.dateTime2ms("9999-12-31 23:59:59.9999"),X.isDateTime=function(_,z){return X.dateTime2ms(_,z)!==d};function m(_,z){return String(_+Math.pow(10,z)).substr(1)}var b=90*g,E=3*r,p=5*t;X.ms2DateTime=function(_,z,O){if(typeof _!="number"||!(_>=n&&_<=v))return d;z||(z=0);var F=Math.floor(L(_+.05,1)*10),N=Math.round(_-F/10),V,j,$,q,oe,Z;if(T(O)){var G=Math.floor(N/g)+a,re=Math.floor(L(_,g));try{V=c.getComponentMethod("calendars","getCal")(O).fromJD(G).formatDate("yyyy-mm-dd")}catch{V=u("G%Y-%m-%d")(new Date(N))}if(V.charAt(0)==="-")for(;V.length<11;)V="-0"+V.substr(1);else for(;V.length<10;)V="0"+V;j=z=n+g&&_<=v-g))return d;var z=Math.floor(L(_+.05,1)*10),O=new Date(Math.round(_-z/10)),F=A("%Y-%m-%d")(O),N=O.getHours(),V=O.getMinutes(),j=O.getSeconds(),$=O.getUTCMilliseconds()*10+z;return S(F,N,V,j,$)};function S(_,z,O,F,N){if((z||O||F||N)&&(_+=" "+m(z,2)+":"+m(O,2),(F||N)&&(_+=":"+m(F,2),N))){for(var V=4;N%10===0;)V-=1,N/=10;_+="."+m(N,V)}return _}X.cleanDate=function(_,z,O){if(_===d)return z;if(X.isJSDate(_)||typeof _=="number"&&isFinite(_)){if(T(O))return o.error("JS Dates and milliseconds are incompatible with world calendars",_),z;if(_=X.ms2DateTimeLocal(+_),!_&&z!==void 0)return z}else if(!X.isDateTime(_,O))return o.error("unrecognized date",_),z;return _};var w=/%\d?f/g,i=/%h/g,C={1:"1",2:"1",3:"2",4:"2"};function x(_,z,O,F){_=_.replace(w,function(V){var j=Math.min(+V.charAt(1)||6,6),$=(z/1e3%1+2).toFixed(j).substr(2).replace(/0+$/,"")||"0";return $});var N=new Date(Math.floor(z+.05));if(_=_.replace(i,function(){return C[O("%q")(N)]}),T(F))try{_=c.getComponentMethod("calendars","worldCalFmt")(_,z,F)}catch{return"Invalid"}return O(_)(N)}var k=[59,59.9,59.99,59.999,59.9999];function I(_,z){var O=L(_+.05,g),F=m(Math.floor(O/r),2)+":"+m(L(Math.floor(O/t),60),2);if(z!=="M"){P(z)||(z=0);var N=Math.min(L(_/s,60),k[z]),V=(100+N).toFixed(z).substr(1);z>0&&(V=V.replace(/0+$/,"").replace(/[\.]$/,"")),F+=":"+V}return F}X.formatDate=function(_,z,O,F,N,V){if(N=T(N)&&N,!z)if(O==="y")z=V.year;else if(O==="m")z=V.month;else if(O==="d")z=V.dayMonth+` `+V.year;else return I(_,O)+` `+x(V.dayMonthYear,_,F,N);return x(z,_,F,N)};var B=3*g;X.incrementMonth=function(_,z,O){O=T(O)&&O;var F=L(_,g);if(_=Math.round(_-F),O)try{var N=Math.round(_/g)+a,V=c.getComponentMethod("calendars","getCal")(O),j=V.fromJD(N);return z%12?V.add(j,z,"m"):V.add(j,z/12,"y"),(j.toJD()-a)*g+F}catch{o.error("invalid ms "+_+" in calendar "+O)}var $=new Date(_+B);return $.setUTCMonth($.getUTCMonth()+z)+F-B},X.findExactDates=function(_,z){for(var O=0,F=0,N=0,V=0,j,$,q=T(z)&&c.getComponentMethod("calendars","getCal")(z),oe=0;oe<_.length;oe++){if($=_[oe],!P($)){V++;continue}if(!($%g))if(q)try{j=q.fromJD($/g+a),j.day()===1?j.month()===1?O++:F++:N++}catch{}else j=new Date($),j.getUTCDate()===1?j.getUTCMonth()===0?O++:F++:N++}F+=O,N+=F;var Z=_.length-V;return{exactYears:O/Z,exactMonths:F/Z,exactDays:N/Z}}},52200:function(te,X,e){var A=e(33428),P=e(24248),o=e(52248),L=e(36524);function M(h){var T;if(typeof h=="string"){if(T=document.getElementById(h),T===null)throw new Error("No DOM element with id '"+h+"' exists on the page.");return T}else if(h==null)throw new Error("DOM element provided is null or undefined");return h}function d(h){var T=A.select(h);return T.node()instanceof HTMLElement&&T.size()&&T.classed("js-plotly-plot")}function g(h){var T=h&&h.parentNode;T&&T.removeChild(h)}function r(h,T){t("global",h,T)}function t(h,T,f){var n="plotly.js-style-"+h,v=document.getElementById(n);v||(v=document.createElement("style"),v.setAttribute("id",n),v.appendChild(document.createTextNode("")),document.head.appendChild(v));var m=v.sheet;m.insertRule?m.insertRule(T+"{"+f+"}",0):m.addRule?m.addRule(T,f,0):P.warn("addStyleRule failed")}function s(h){var T="plotly.js-style-"+h,f=document.getElementById(T);f&&g(f)}function a(h){var T=u(h),f=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return T.forEach(function(n){var v=c(n);if(v){var m=o.convertCssMatrix(v);f=L.multiply(f,f,m)}}),f}function c(h){var T=window.getComputedStyle(h,null),f=T.getPropertyValue("-webkit-transform")||T.getPropertyValue("-moz-transform")||T.getPropertyValue("-ms-transform")||T.getPropertyValue("-o-transform")||T.getPropertyValue("transform");return f==="none"?null:f.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function u(h){for(var T=[];l(h);)T.push(h),h=h.parentNode;return T}function l(h){return h&&(h instanceof Element||h instanceof HTMLElement)}function y(h,T){return h&&T&&h.top===T.top&&h.left===T.left&&h.right===T.right&&h.bottom===T.bottom}te.exports={getGraphDiv:M,isPlotDiv:d,removeElement:g,addStyleRule:r,addRelatedStyleRule:t,deleteRelatedStyleRule:s,getFullTransformMatrix:a,getElementTransformMatrix:c,getElementAndAncestors:u,equalDomRects:y}},95924:function(te,X,e){var A=e(61252).EventEmitter,P={init:function(o){if(o._ev instanceof A)return o;var L=new A,M=new A;return o._ev=L,o._internalEv=M,o.on=L.on.bind(L),o.once=L.once.bind(L),o.removeListener=L.removeListener.bind(L),o.removeAllListeners=L.removeAllListeners.bind(L),o._internalOn=M.on.bind(M),o._internalOnce=M.once.bind(M),o._removeInternalListener=M.removeListener.bind(M),o._removeAllInternalListeners=M.removeAllListeners.bind(M),o.emit=function(d,g){typeof jQuery<"u"&&jQuery(o).trigger(d,g),L.emit(d,g),M.emit(d,g)},o},triggerHandler:function(o,L,M){var d,g;typeof jQuery<"u"&&(d=jQuery(o).triggerHandler(L,M));var r=o._ev;if(!r)return d;var t=r._events[L];if(!t)return d;function s(c){if(c.listener){if(r.removeListener(L,c.listener),!c.fired)return c.fired=!0,c.listener.apply(r,[M])}else return c.apply(r,[M])}t=Array.isArray(t)?t:[t];var a;for(a=0;a0&&I[B+1][0]<0)return B;return null}switch(p==="RUS"||p==="FJI"?w=function(I){var B;if(k(I)===null)B=I;else for(B=new Array(I.length),x=0;xB?_[z++]=[I[x][0]+360,I[x][1]]:x===B?(_[z++]=I[x],_[z++]=[I[x][0],-90]):_[z++]=I[x];var O=s.tester(_);O.pts.pop(),S.push(O)}:w=function(I){S.push(s.tester(I))},b.type){case"MultiPolygon":for(i=0;iS&&(S=C,E=i)}else E=b;return L.default(E).geometry.coordinates}function n(m){var b=window.PlotlyGeoAssets||{},E=[];function p(x){return new Promise(function(k,I){A.json(x,function(B,_){if(B){delete b[x];var z=B.status===404?'GeoJSON at URL "'+x+'" does not exist.':"Unexpected error while fetching from "+x;return I(new Error(z))}return b[x]=_,k(_)})})}function S(x){return new Promise(function(k,I){var B=0,_=setInterval(function(){if(b[x]&&b[x]!=="pending")return clearInterval(_),k(b[x]);if(B>100)return clearInterval(_),I("Unexpected error while fetching from "+x);B++},50)})}for(var w=0;w0&&(M.push(d),d=[])}return d.length>0&&M.push(d),M},X.makeLine=function(P){return P.length===1?{type:"LineString",coordinates:P[0]}:{type:"MultiLineString",coordinates:P}},X.makePolygon=function(P){if(P.length===1)return{type:"Polygon",coordinates:P};for(var o=new Array(P.length),L=0;L1||b<0||b>1?null:{x:g+y*b,y:r+f*b}}X.segmentDistance=function(r,t,s,a,c,u,l,y){if(P(r,t,s,a,c,u,l,y))return 0;var h=s-r,T=a-t,f=l-c,n=y-u,v=h*h+T*T,m=f*f+n*n,b=Math.min(o(h,T,v,c-r,u-t),o(h,T,v,l-r,y-t),o(f,n,m,r-c,t-u),o(f,n,m,s-c,a-u));return Math.sqrt(b)};function o(g,r,t,s,a){var c=s*g+a*r;if(c<0)return s*s+a*a;if(c>t){var u=s-g,l=a-r;return u*u+l*l}else{var y=s*r-a*g;return y*y/t}}var L,M,d;X.getTextLocation=function(r,t,s,a){if((r!==M||a!==d)&&(L={},M=r,d=a),L[s])return L[s];var c=r.getPointAtLength(A(s-a/2,t)),u=r.getPointAtLength(A(s+a/2,t)),l=Math.atan((u.y-c.y)/(u.x-c.x)),y=r.getPointAtLength(A(s,t)),h=(y.x*4+c.x+u.x)/6,T=(y.y*4+c.y+u.y)/6,f={x:h,y:T,theta:l};return L[s]=f,f},X.clearLocationCache=function(){M=null},X.getVisibleSegment=function(r,t,s){var a=t.left,c=t.right,u=t.top,l=t.bottom,y=0,h=r.getTotalLength(),T=h,f,n;function v(b){var E=r.getPointAtLength(b);b===0?f=E:b===h&&(n=E);var p=E.xc?E.x-c:0,S=E.yl?E.y-l:0;return Math.sqrt(p*p+S*S)}for(var m=v(y);m;){if(y+=m+s,y>T)return;m=v(y)}for(m=v(T);m;){if(T-=m+s,y>T)return;m=v(T)}return{min:y,max:T,len:T-y,total:h,isClosed:y===0&&T===h&&Math.abs(f.x-n.x)<.1&&Math.abs(f.y-n.y)<.1}},X.findPointOnPath=function(r,t,s,a){a=a||{};for(var c=a.pathLength||r.getTotalLength(),u=a.tolerance||.001,l=a.iterationLimit||30,y=r.getPointAtLength(0)[s]>r.getPointAtLength(c)[s]?-1:1,h=0,T=0,f=c,n,v,m;h0?f=n:T=n,h++}return v}},33040:function(te,X,e){var A=e(38248),P=e(49760),o=e(72160),L=e(8932),M=e(22548).defaultLine,d=e(38116).isArrayOrTypedArray,g=o(M),r=1;function t(l,y){var h=l;return h[3]*=y,h}function s(l){if(A(l))return g;var y=o(l);return y.length?y:g}function a(l){return A(l)?l:r}function c(l,y,h){var T=l.color;T&&T._inputArray&&(T=T._inputArray);var f=d(T),n=d(y),v=L.extractOpts(l),m=[],b,E,p,S,w;if(v.colorscale!==void 0?b=L.makeColorScaleFuncFromTrace(l):b=s,f?E=function(C,x){return C[x]===void 0?g:o(b(C[x]))}:E=s,n?p=function(C,x){return C[x]===void 0?r:a(C[x])}:p=a,f||n)for(var i=0;i1?(P*e+P*A)/P:e+A,L=String(o).length;if(L>16){var M=String(A).length,d=String(e).length;if(L>=d+M){var g=parseFloat(o).toPrecision(12);g.indexOf("e+")===-1&&(o=+g)}}return o}},3400:function(te,X,e){var A=e(33428),P=e(94336).E9,o=e(57624).E9,L=e(38248),M=e(39032),d=M.FP_SAFE,g=-d,r=M.BADNUM,t=te.exports={};t.adjustFormat=function(ae){return!ae||/^\d[.]\df/.test(ae)||/[.]\d%/.test(ae)?ae:ae==="0.f"?"~f":/^\d%/.test(ae)?"~%":/^\ds/.test(ae)?"~s":!/^[~,.0$]/.test(ae)&&/[&fps]/.test(ae)?"~"+ae:ae};var s={};t.warnBadFormat=function(J){var ae=String(J);s[ae]||(s[ae]=1,t.warn('encountered bad format: "'+ae+'"'))},t.noFormat=function(J){return String(J)},t.numberFormat=function(J){var ae;try{ae=o(t.adjustFormat(J))}catch{return t.warnBadFormat(J),t.noFormat}return ae},t.nestedProperty=e(22296),t.keyedContainer=e(37804),t.relativeAttr=e(23193),t.isPlainObject=e(63620),t.toLogRange=e(36896),t.relinkPrivateKeys=e(51528);var a=e(38116);t.isArrayBuffer=a.isArrayBuffer,t.isTypedArray=a.isTypedArray,t.isArrayOrTypedArray=a.isArrayOrTypedArray,t.isArray1D=a.isArray1D,t.ensureArray=a.ensureArray,t.concat=a.concat,t.maxRowLength=a.maxRowLength,t.minRowLength=a.minRowLength;var c=e(20435);t.mod=c.mod,t.modHalf=c.modHalf;var u=e(63064);t.valObjectMeta=u.valObjectMeta,t.coerce=u.coerce,t.coerce2=u.coerce2,t.coerceFont=u.coerceFont,t.coercePattern=u.coercePattern,t.coerceHoverinfo=u.coerceHoverinfo,t.coerceSelectionMarkerOpacity=u.coerceSelectionMarkerOpacity,t.validate=u.validate;var l=e(67555);t.dateTime2ms=l.dateTime2ms,t.isDateTime=l.isDateTime,t.ms2DateTime=l.ms2DateTime,t.ms2DateTimeLocal=l.ms2DateTimeLocal,t.cleanDate=l.cleanDate,t.isJSDate=l.isJSDate,t.formatDate=l.formatDate,t.incrementMonth=l.incrementMonth,t.dateTick0=l.dateTick0,t.dfltRange=l.dfltRange,t.findExactDates=l.findExactDates,t.MIN_MS=l.MIN_MS,t.MAX_MS=l.MAX_MS;var y=e(14952);t.findBin=y.findBin,t.sorterAsc=y.sorterAsc,t.sorterDes=y.sorterDes,t.distinctVals=y.distinctVals,t.roundUp=y.roundUp,t.sort=y.sort,t.findIndexOfMin=y.findIndexOfMin,t.sortObjectKeys=e(95376);var h=e(63084);t.aggNums=h.aggNums,t.len=h.len,t.mean=h.mean,t.median=h.median,t.midRange=h.midRange,t.variance=h.variance,t.stdev=h.stdev,t.interp=h.interp;var T=e(52248);t.init2dArray=T.init2dArray,t.transposeRagged=T.transposeRagged,t.dot=T.dot,t.translationMatrix=T.translationMatrix,t.rotationMatrix=T.rotationMatrix,t.rotationXYMatrix=T.rotationXYMatrix,t.apply3DTransform=T.apply3DTransform,t.apply2DTransform=T.apply2DTransform,t.apply2DTransform2=T.apply2DTransform2,t.convertCssMatrix=T.convertCssMatrix,t.inverseTransformMatrix=T.inverseTransformMatrix;var f=e(11864);t.deg2rad=f.deg2rad,t.rad2deg=f.rad2deg,t.angleDelta=f.angleDelta,t.angleDist=f.angleDist,t.isFullCircle=f.isFullCircle,t.isAngleInsideSector=f.isAngleInsideSector,t.isPtInsideSector=f.isPtInsideSector,t.pathArc=f.pathArc,t.pathSector=f.pathSector,t.pathAnnulus=f.pathAnnulus;var n=e(98308);t.isLeftAnchor=n.isLeftAnchor,t.isCenterAnchor=n.isCenterAnchor,t.isRightAnchor=n.isRightAnchor,t.isTopAnchor=n.isTopAnchor,t.isMiddleAnchor=n.isMiddleAnchor,t.isBottomAnchor=n.isBottomAnchor;var v=e(92348);t.segmentsIntersect=v.segmentsIntersect,t.segmentDistance=v.segmentDistance,t.getTextLocation=v.getTextLocation,t.clearLocationCache=v.clearLocationCache,t.getVisibleSegment=v.getVisibleSegment,t.findPointOnPath=v.findPointOnPath;var m=e(92880);t.extendFlat=m.extendFlat,t.extendDeep=m.extendDeep,t.extendDeepAll=m.extendDeepAll,t.extendDeepNoArrays=m.extendDeepNoArrays;var b=e(24248);t.log=b.log,t.warn=b.warn,t.error=b.error;var E=e(53756);t.counterRegex=E.counter;var p=e(91200);t.throttle=p.throttle,t.throttleDone=p.done,t.clearThrottle=p.clear;var S=e(52200);t.getGraphDiv=S.getGraphDiv,t.isPlotDiv=S.isPlotDiv,t.removeElement=S.removeElement,t.addStyleRule=S.addStyleRule,t.addRelatedStyleRule=S.addRelatedStyleRule,t.deleteRelatedStyleRule=S.deleteRelatedStyleRule,t.getFullTransformMatrix=S.getFullTransformMatrix,t.getElementTransformMatrix=S.getElementTransformMatrix,t.getElementAndAncestors=S.getElementAndAncestors,t.equalDomRects=S.equalDomRects,t.clearResponsive=e(75352),t.preserveDrawingBuffer=e(34296),t.makeTraceGroups=e(30988),t._=e(98356),t.notifier=e(41792),t.filterUnique=e(68944),t.filterVisible=e(43880),t.pushUnique=e(52416),t.increment=e(1396),t.cleanNumber=e(54037),t.ensureNumber=function(ae){return L(ae)?(ae=Number(ae),ae>d||ae=ae?!1:L(J)&&J>=0&&J%1===0},t.noop=e(16628),t.identity=e(35536),t.repeat=function(J,ae){for(var K=new Array(ae),Y=0;YK?Math.max(K,Math.min(ae,J)):Math.max(ae,Math.min(K,J))},t.bBoxIntersect=function(J,ae,K){return K=K||0,J.left<=ae.right+K&&ae.left<=J.right+K&&J.top<=ae.bottom+K&&ae.top<=J.bottom+K},t.simpleMap=function(J,ae,K,Y,ie){for(var ne=J.length,le=new Array(ne),de=0;de=Math.pow(2,K)?ie>10?(t.warn("randstr failed uniqueness"),le):J(ae,K,Y,(ie||0)+1):le},t.OptionControl=function(J,ae){J||(J={}),ae||(ae="opt");var K={};return K.optionList=[],K._newoption=function(Y){Y[ae]=J,K[Y.name]=Y,K.optionList.push(Y)},K["_"+ae]=J,K},t.smooth=function(J,ae){if(ae=Math.round(ae)||0,ae<2)return J;var K=J.length,Y=2*K,ie=2*ae-1,ne=new Array(ie),le=new Array(K),de,we,me,Le;for(de=0;de=Y&&(me-=Y*Math.floor(me/Y)),me<0?me=-1-me:me>=K&&(me=Y-1-me),Le+=J[me]*ne[we];le[de]=Le}return le},t.syncOrAsync=function(J,ae,K){var Y,ie;function ne(){return t.syncOrAsync(J,ae,K)}for(;J.length;)if(ie=J.splice(0,1)[0],Y=ie(ae),Y&&Y.then)return Y.then(ne);return K&&K(ae)},t.stripTrailingSlash=function(J){return J.substr(-1)==="/"?J.substr(0,J.length-1):J},t.noneOrAll=function(J,ae,K){if(J){var Y=!1,ie=!0,ne,le;for(ne=0;ne0?ie:0})},t.fillArray=function(J,ae,K,Y){if(Y=Y||t.identity,t.isArrayOrTypedArray(J))for(var ie=0;ie1?ie+le[1]:"";if(ne&&(le.length>1||de.length>4||K))for(;Y.test(de);)de=de.replace(Y,"$1"+ne+"$2");return de+we},t.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var z=/^\w*$/;t.templateString=function(J,ae){var K={};return J.replace(t.TEMPLATE_STRING_REGEX,function(Y,ie){var ne;return z.test(ie)?ne=ae[ie]:(K[ie]=K[ie]||t.nestedProperty(ae,ie).get,ne=K[ie]()),t.isValidTextValue(ne)?ne:""})};var O={max:10,count:0,name:"hovertemplate"};t.hovertemplateString=function(){return q.apply(O,arguments)};var F={max:10,count:0,name:"texttemplate"};t.texttemplateString=function(){return q.apply(F,arguments)};var N=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function V(J){var ae=J.match(N);return ae?{key:ae[1],op:ae[2],number:Number(ae[3])}:{key:J,op:null,number:null}}var j={max:10,count:0,name:"texttemplate",parseMultDiv:!0};t.texttemplateStringForShapes=function(){return q.apply(j,arguments)};var $=/^[:|\|]/;function q(J,ae,K){var Y=this,ie=arguments;ae||(ae={});var ne={};return J.replace(t.TEMPLATE_STRING_REGEX,function(le,de,we){var me=de==="xother"||de==="yother",Le=de==="_xother"||de==="_yother",ve=de==="_xother_"||de==="_yother_",Ae=de==="xother_"||de==="yother_",ye=me||Le||Ae||ve,Se=de;(Le||ve)&&(Se=Se.substring(1)),(Ae||ve)&&(Se=Se.substring(0,Se.length-1));var _e=null,ze=null;if(Y.parseMultDiv){var Ie=V(Se);Se=Ie.key,_e=Ie.op,ze=Ie.number}var Ne;if(ye){if(Ne=ae[Se],Ne===void 0)return""}else{var et,st;for(st=3;st=oe&&le<=Z,me=de>=oe&&de<=Z;if(we&&(Y=10*Y+le-oe),me&&(ie=10*ie+de-oe),!we||!me){if(Y!==ie)return Y-ie;if(le!==de)return le-de}}return ie-Y};var G=2e9;t.seedPseudoRandom=function(){G=2e9},t.pseudoRandom=function(){var J=G;return G=(69069*G+1)%4294967296,Math.abs(G-J)<429496729?t.pseudoRandom():G/4294967296},t.fillText=function(J,ae,K){var Y=Array.isArray(K)?function(le){K.push(le)}:function(le){K.text=le},ie=t.extractOption(J,ae,"htx","hovertext");if(t.isValidTextValue(ie))return Y(ie);var ne=t.extractOption(J,ae,"tx","text");if(t.isValidTextValue(ne))return Y(ne)},t.isValidTextValue=function(J){return J||J===0},t.formatPercent=function(J,ae){ae=ae||0;for(var K=(Math.round(100*J*Math.pow(10,ae))*Math.pow(.1,ae)).toFixed(ae)+"%",Y=0;Y1&&(me=1):me=0,t.strTranslate(ie-me*(K+le),ne-me*(Y+de))+t.strScale(me)+(we?"rotate("+we+(ae?"":" "+K+" "+Y)+")":"")},t.setTransormAndDisplay=function(J,ae){J.attr("transform",t.getTextTransform(ae)),J.style("display",ae.scale?null:"none")},t.ensureUniformFontSize=function(J,ae){var K=t.extendFlat({},ae);return K.size=Math.max(ae.size,J._fullLayout.uniformtext.minsize||0),K},t.join2=function(J,ae,K){var Y=J.length;return Y>1?J.slice(0,-1).join(ae)+K+J[Y-1]:J.join(ae)},t.bigFont=function(J){return Math.round(1.2*J)};var re=t.getFirefoxVersion(),H=re!==null&&re<86;t.getPositionFromD3Event=function(){return H?[A.event.layerX,A.event.layerY]:[A.event.offsetX,A.event.offsetY]}},63620:function(te){te.exports=function(e){return window&&window.process&&window.process.versions?Object.prototype.toString.call(e)==="[object Object]":Object.prototype.toString.call(e)==="[object Object]"&&Object.getPrototypeOf(e).hasOwnProperty("hasOwnProperty")}},37804:function(te,X,e){var A=e(22296),P=/^\w*$/,o=0,L=1,M=2,d=3,g=4;te.exports=function(t,s,a,c){a=a||"name",c=c||"value";var u,l,y,h={};s&&s.length?(y=A(t,s),l=y.get()):l=t,s=s||"";var T={};if(l)for(u=0;u2)return h[m]=h[m]|M,n.set(v,null);if(f){for(u=m;u1){var M=["LOG:"];for(L=0;L1){var d=[];for(L=0;L"),"long")}},o.warn=function(){var L;if(A.logging>0){var M=["WARN:"];for(L=0;L0){var d=[];for(L=0;L"),"stick")}},o.error=function(){var L;if(A.logging>0){var M=["ERROR:"];for(L=0;L0){var d=[];for(L=0;L"),"stick")}}},30988:function(te,X,e){var A=e(33428);te.exports=function(o,L,M){var d=o.selectAll("g."+M.replace(/\s/g,".")).data(L,function(r){return r[0].trace.uid});d.exit().remove(),d.enter().append("g").attr("class",M),d.order();var g=o.classed("rangeplot")?"nodeRangePlot3":"node3";return d.each(function(r){r[0][g]=A.select(this)}),d}},52248:function(te,X,e){var A=e(36524);X.init2dArray=function(P,o){for(var L=new Array(P),M=0;MP/2?A-Math.round(A/P)*P:A}te.exports={mod:X,modHalf:e}},22296:function(te,X,e){var A=e(38248),P=e(38116).isArrayOrTypedArray;te.exports=function(c,u){if(A(u))u=String(u);else if(typeof u!="string"||u.substr(u.length-4)==="[-1]")throw"bad property string";var l=u.split("."),y,h,T,f;for(f=0;f/g),l=0;lr||m===P||ms||n&&u(f))}function y(f,n){var v=f[0],m=f[1];if(v===P||vr||m===P||ms)return!1;var b=d.length,E=d[0][0],p=d[0][1],S=0,w,i,C,x,k;for(w=1;wMath.max(i,E)||m>Math.max(C,p)))if(ma||Math.abs(A(y,u))>r)return!0;return!1},o.filter=function(M,d){var g=[M[0]],r=0,t=0;function s(c){M.push(c);var u=g.length,l=r;g.splice(t+1);for(var y=l+1;y1){var a=M.pop();s(a)}return{addPt:s,raw:M,filtered:g}}},5048:function(te,X,e){var A=e(16576),P=e(28624);te.exports=function(L,M,d){var g=L._fullLayout,r=!0;return g._glcanvas.each(function(t){if(t.regl){t.regl.preloadCachedCode(d);return}if(!(t.pick&&!g._has("parcoords"))){try{t.regl=P({canvas:this,attributes:{antialias:!t.pick,preserveDrawingBuffer:!0},pixelRatio:L._context.plotGlPixelRatio||e.g.devicePixelRatio,extensions:M||[],cachedCode:d||{}})}catch{r=!1}t.regl||(r=!1),r&&this.addEventListener("webglcontextlost",function(s){L&&L.emit&&L.emit("plotly_webglcontextlost",{event:s,layer:t.key})},!1)}}),r||A({container:g._glcontainer.node()}),r}},34296:function(te,X,e){var A=e(38248),P=e(25928);te.exports=function(M){var d;if(M&&M.hasOwnProperty("userAgent")?d=M.userAgent:d=o(),typeof d!="string")return!0;var g=P({ua:{headers:{"user-agent":d}},tablet:!0,featureDetect:!1});if(!g)for(var r=d.split(" "),t=1;t-1;a--){var c=r[a];if(c.substr(0,8)==="Version/"){var u=c.substr(8).split(".")[0];if(A(u)&&(u=+u),u>=13)return!0}}}return g};function o(){var L;return typeof navigator<"u"&&(L=navigator.userAgent),L&&L.headers&&typeof L.headers["user-agent"]=="string"&&(L=L.headers["user-agent"]),L}},52416:function(te){te.exports=function(e,A){if(A instanceof RegExp){for(var P=A.toString(),o=0;oP.queueLength&&(M.undoQueue.queue.shift(),M.undoQueue.index--)},L.startSequence=function(M){M.undoQueue=M.undoQueue||{index:0,queue:[],sequence:!1},M.undoQueue.sequence=!0,M.undoQueue.beginSequence=!0},L.stopSequence=function(M){M.undoQueue=M.undoQueue||{index:0,queue:[],sequence:!1},M.undoQueue.sequence=!1,M.undoQueue.beginSequence=!1},L.undo=function(d){var g,r;if(!(d.undoQueue===void 0||isNaN(d.undoQueue.index)||d.undoQueue.index<=0)){for(d.undoQueue.index--,g=d.undoQueue.queue[d.undoQueue.index],d.undoQueue.inSequence=!0,r=0;r=d.undoQueue.queue.length)){for(g=d.undoQueue.queue[d.undoQueue.index],d.undoQueue.inSequence=!0,r=0;r1?(a[l-1]-a[0])/(l-1):1,T,f;for(h>=0?f=c?d:g:f=c?t:r,s+=h*M*(c?-1:1)*(h>=0?1:-1);u90&&P.log("Long binary search..."),u-1};function d(s,a){return sa}function t(s,a){return s>=a}X.sorterAsc=function(s,a){return s-a},X.sorterDes=function(s,a){return a-s},X.distinctVals=function(s){var a=s.slice();a.sort(X.sorterAsc);var c;for(c=a.length-1;c>-1&&a[c]===L;c--);for(var u=a[c]-a[0]||1,l=u/(c||1)/1e4,y=[],h,T=0;T<=c;T++){var f=a[T],n=f-h;h===void 0?(y.push(f),h=f):n>l&&(u=Math.min(u,n),y.push(f),h=f)}return{vals:y,minDiff:u}},X.roundUp=function(s,a,c){for(var u=0,l=a.length-1,y,h=0,T=c?0:1,f=c?1:0,n=c?Math.ceil:Math.floor;u0&&(u=1),c&&u)return s.sort(a)}return u?s:s.reverse()},X.findIndexOfMin=function(s,a){a=a||o;for(var c=1/0,u,l=0;lM.length)&&(d=M.length),A(L)||(L=!1),P(M[0])){for(r=new Array(d),g=0;go.length-1)return o[o.length-1];var M=L%1;return M*o[Math.ceil(L)]+(1-M)*o[Math.floor(L)]}},43080:function(te,X,e){var A=e(72160);function P(o){return o?A(o):[0,0,0,1]}te.exports=P},9188:function(te,X,e){var A=e(2264),P=e(43616),o=e(3400),L=null;function M(){if(L!==null)return L;L=!1;var d=o.isIE()||o.isSafari()||o.isIOS();if(window.navigator.userAgent&&!d){var g=Array.from(A.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")L=g.some(function(c){return r.apply(null,c)});else{var t=P.tester.append("image").attr("style",A.STYLE),s=window.getComputedStyle(t.node()),a=s.imageRendering;L=g.some(function(c){var u=c[1];return a===u||a===u.toLowerCase()}),t.remove()}}return L}te.exports=M},72736:function(te,X,e){var A=e(33428),P=e(3400),o=P.strTranslate,L=e(9616),M=e(84284).LINE_SPACING,d=/([^$]*)([$]+[^$]*[$]+)([^$]*)/;X.convertToTspans=function(O,F,N){var V=O.text(),j=!O.attr("data-notex")&&F&&F._context.typesetMath&&typeof MathJax<"u"&&V.match(d),$=A.select(O.node().parentNode);if($.empty())return;var q=O.attr("class")?O.attr("class").split(" ")[0]:"text";q+="-math",$.selectAll("svg."+q).remove(),$.selectAll("g."+q+"-group").remove(),O.style("display",null).attr({"data-unformatted":V,"data-math":"N"});function oe(){$.empty()||(q=O.attr("class")+"-math",$.select("svg."+q).remove()),O.text("").style("white-space","pre");var Z=I(O.node(),V);Z&&O.style("pointer-events","all"),X.positionText(O),N&&N.call(O)}return j?(F&&F._promises||[]).push(new Promise(function(Z){O.style("display","none");var G=parseInt(O.node().style.fontSize,10),re={fontSize:G};a(j[2],re,function(H,J,ae){$.selectAll("svg."+q).remove(),$.selectAll("g."+q+"-group").remove();var K=H&&H.select("svg");if(!K||!K.node()){oe(),Z();return}var Y=$.append("g").classed(q+"-group",!0).attr({"pointer-events":"none","data-unformatted":V,"data-math":"Y"});Y.node().appendChild(K.node()),J&&J.node()&&K.node().insertBefore(J.node().cloneNode(!0),K.node().firstChild);var ie=ae.width,ne=ae.height;K.attr({class:q,height:ne,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none"});var le=O.node().style.fill||"black",de=K.select("g");de.attr({fill:le,stroke:le});var we=de.node().getBoundingClientRect(),me=we.width,Le=we.height;(me>ie||Le>ne)&&(K.style("overflow","hidden"),we=K.node().getBoundingClientRect(),me=we.width,Le=we.height);var ve=+O.attr("x"),Ae=+O.attr("y"),ye=G||O.node().getBoundingClientRect().height,Se=-ye/4;if(q[0]==="y")Y.attr({transform:"rotate("+[-90,ve,Ae]+")"+o(-me/2,Se-Le/2)});else if(q[0]==="l")Ae=Se-Le/2;else if(q[0]==="a"&&q.indexOf("atitle")!==0)ve=0,Ae=Se;else{var _e=O.attr("text-anchor");ve=ve-me*(_e==="middle"?.5:_e==="end"?1:0),Ae=Ae+Se-Le/2}K.attr({x:ve,y:Ae}),N&&N.call(O,Y),Z(Y)})})):oe(),O};var g=/(<|<|<)/g,r=/(>|>|>)/g;function t(O){return O.replace(g,"\\lt ").replace(r,"\\gt ")}var s=[["$","$"],["\\(","\\)"]];function a(O,F,N){var V=parseInt((MathJax.version||"").split(".")[0]);if(V!==2&&V!==3){P.warn("No MathJax version:",MathJax.version);return}var j,$,q,oe,Z=function(){return $=P.extendDeepAll({},MathJax.Hub.config),q=MathJax.Hub.processSectionDelay,MathJax.Hub.processSectionDelay!==void 0&&(MathJax.Hub.processSectionDelay=0),MathJax.Hub.Config({messageStyle:"none",tex2jax:{inlineMath:s},displayAlign:"left"})},G=function(){$=P.extendDeepAll({},MathJax.config),MathJax.config.tex||(MathJax.config.tex={}),MathJax.config.tex.inlineMath=s},re=function(){if(j=MathJax.Hub.config.menuSettings.renderer,j!=="SVG")return MathJax.Hub.setRenderer("SVG")},H=function(){j=MathJax.config.startup.output,j!=="svg"&&(MathJax.config.startup.output="svg")},J=function(){var le="math-output-"+P.randstr({},64);oe=A.select("body").append("div").attr({id:le}).style({visibility:"hidden",position:"absolute","font-size":F.fontSize+"px"}).text(t(O));var de=oe.node();return V===2?MathJax.Hub.Typeset(de):MathJax.typeset([de])},ae=function(){var le=oe.select(V===2?".MathJax_SVG":".MathJax"),de=!le.empty()&&oe.select("svg").node();if(!de)P.log("There was an error in the tex syntax.",O),N();else{var we=de.getBoundingClientRect(),me;V===2?me=A.select("body").select("#MathJax_SVG_glyphs"):me=le.select("defs"),N(le,me,we)}oe.remove()},K=function(){if(j!=="SVG")return MathJax.Hub.setRenderer(j)},Y=function(){j!=="svg"&&(MathJax.config.startup.output=j)},ie=function(){return q!==void 0&&(MathJax.Hub.processSectionDelay=q),MathJax.Hub.Config($)},ne=function(){MathJax.config=$};V===2?MathJax.Hub.Queue(Z,re,J,ae,K,ie):V===3&&(G(),H(),MathJax.startup.defaultReady(),MathJax.startup.promise.then(function(){J(),ae(),Y(),ne()}))}var c={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"},u={sub:"0.3em",sup:"-0.6em"},l={sub:"-0.21em",sup:"0.42em"},y="​",h=["http:","https:","mailto:","",void 0,":"],T=X.NEWLINES=/(\r\n?|\n)/g,f=/(<[^<>]*>)/,n=/<(\/?)([^ >]*)(\s+(.*))?>/i,v=//i;X.BR_TAG_ALL=//gi;var m=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,b=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,E=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,p=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function S(O,F){if(!O)return null;var N=O.match(F),V=N&&(N[3]||N[4]);return V&&x(V)}var w=/(^|;)\s*color:/;X.plainText=function(O,F){F=F||{};for(var N=F.len!==void 0&&F.len!==-1?F.len:1/0,V=F.allowedTags!==void 0?F.allowedTags:["br"],j="...",$=j.length,q=O.split(f),oe=[],Z="",G=0,re=0;re$?oe.push(H.substr(0,Y-$)+j):oe.push(H.substr(0,Y));break}Z=""}}return oe.join("")};var i={mu:"μ",amp:"&",lt:"<",gt:">",nbsp:" ",times:"×",plusmn:"±",deg:"°"},C=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function x(O){return O.replace(C,function(F,N){var V;return N.charAt(0)==="#"?V=k(N.charAt(1)==="x"?parseInt(N.substr(2),16):parseInt(N.substr(1),10)):V=i[N],V||F})}X.convertEntities=x;function k(O){if(!(O>1114111)){var F=String.fromCodePoint;if(F)return F(O);var N=String.fromCharCode;return O<=65535?N(O):N((O>>10)+55232,O%1024+56320)}}function I(O,F){F=F.replace(T," ");var N=!1,V=[],j,$=-1;function q(){$++;var Le=document.createElementNS(L.svg,"tspan");A.select(Le).attr({class:"line",dy:$*M+"em"}),O.appendChild(Le),j=Le;var ve=V;if(V=[{node:Le}],ve.length>1)for(var Ae=1;Ae.",F);return}var ve=V.pop();Le!==ve.type&&P.log("Start tag <"+ve.type+"> doesnt match end tag <"+Le+">. Pretending it did match.",F),j=V[V.length-1].node}var re=v.test(F);re?q():(j=O,V=[{node:O}]);for(var H=F.split(f),J=0;Jd.ts+L){t();return}d.timer=setTimeout(function(){t(),d.timer=null},L)},X.done=function(P){var o=e[P];return!o||!o.timer?Promise.resolve():new Promise(function(L){var M=o.onDone;o.onDone=function(){M&&M(),L(),o.onDone=null}})},X.clear=function(P){if(P)A(e[P]),delete e[P];else for(var o in e)X.clear(o)};function A(P){P&&P.timer!==null&&(clearTimeout(P.timer),P.timer=null)}},36896:function(te,X,e){var A=e(38248);te.exports=function(o,L){if(o>0)return Math.log(o)/Math.LN10;var M=Math.log(Math.min(L[0],L[1]))/Math.LN10;return A(M)||(M=Math.log(Math.max(L[0],L[1]))/Math.LN10-6),M}},59972:function(te,X,e){var A=te.exports={},P=e(79552).locationmodeToLayer,o=e(55712).NO;A.getTopojsonName=function(L){return[L.scope.replace(/ /g,"-"),"_",L.resolution.toString(),"m"].join("")},A.getTopojsonPath=function(L,M){return L+M+".json"},A.getTopojsonFeatures=function(L,M){var d=P[L.locationmode],g=M.objects[d];return o(M,g).features}},11680:function(te){te.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}},6580:function(te){te.exports={moduleType:"locale",name:"en",dictionary:{"Click to enter Colorscale title":"Click to enter Colourscale title"},format:{days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],periods:["AM","PM"],dateTime:"%a %b %e %X %Y",date:"%d/%m/%Y",time:"%H:%M:%S",decimal:".",thousands:",",grouping:[3],currency:["$",""],year:"%Y",month:"%b %Y",dayMonth:"%b %-d",dayMonthYear:"%b %-d, %Y"}}},69820:function(te,X,e){var A=e(24040);te.exports=function(o){for(var L=A.layoutArrayContainers,M=A.layoutArrayRegexes,d=o.split("[")[0],g,r,t=0;t0&&L.log("Clearing previous rejected promises from queue."),v._promises=[]},X.cleanLayout=function(v){var m,b;v||(v={}),v.xaxis1&&(v.xaxis||(v.xaxis=v.xaxis1),delete v.xaxis1),v.yaxis1&&(v.yaxis||(v.yaxis=v.yaxis1),delete v.yaxis1),v.scene1&&(v.scene||(v.scene=v.scene1),delete v.scene1);var E=(M.subplotsRegistry.cartesian||{}).attrRegex,p=(M.subplotsRegistry.polar||{}).attrRegex,S=(M.subplotsRegistry.ternary||{}).attrRegex,w=(M.subplotsRegistry.gl3d||{}).attrRegex,i=Object.keys(v);for(m=0;m3?(re.x=1.02,re.xanchor="left"):re.x<-2&&(re.x=-.02,re.xanchor="right"),re.y>3?(re.y=1.02,re.yanchor="bottom"):re.y<-2&&(re.y=-.02,re.yanchor="top")),c(v),v.dragmode==="rotate"&&(v.dragmode="orbit"),g.clean(v),v.template&&v.template.layout&&X.cleanLayout(v.template.layout),v};function a(v,m){var b=v[m],E=m.charAt(0);b&&b!=="paper"&&(v[m]=r(b,E,!0))}function c(v){v&&((typeof v.title=="string"||typeof v.title=="number")&&(v.title={text:v.title}),m("titlefont","font"),m("titleposition","position"),m("titleside","side"),m("titleoffset","offset"));function m(b,E){var p=v[b],S=v.title&&v.title[E];p&&!S&&(v.title||(v.title={}),v.title[E]=v[b],delete v[b])}}X.cleanData=function(v){for(var m=0;m0)return v.substr(0,m)}X.hasParent=function(v,m){for(var b=f(m);b;){if(b in v)return!0;b=f(b)}return!1};var n=["x","y","z"];X.clearAxisTypes=function(v,m,b){for(var E=0;E1&&o.warn("Full array edits are incompatible with other edits",l);var m=a[""][""];if(g(m))s.set(null);else if(Array.isArray(m))s.set(m);else return o.warn("Unrecognized full array edit value",l,m),!0;return f?!1:(y(n,v),h(t),!0)}var b=Object.keys(a).map(Number).sort(L),E=s.get(),p=E||[],S=u(v,l).get(),w=[],i=-1,C=p.length,x,k,I,B,_,z,O,F;for(x=0;xp.length-(O?0:1)){o.warn("index out of range",l,I);continue}if(z!==void 0)_.length>1&&o.warn("Insertion & removal are incompatible with edits to the same index.",l,I),g(z)?w.push(I):O?(z==="add"&&(z={}),p.splice(I,0,z),S&&S.splice(I,0,{})):o.warn("Unrecognized full object edit value",l,I,z),i===-1&&(i=I);else for(k=0;k<_.length;k++)F=l+"["+I+"].",u(p[I],_[k],F).set(B[_[k]])}for(x=w.length-1;x>=0;x--)p.splice(w[x],1),S&&S.splice(w[x],1);if(p.length?E||s.set(p):s.set(null),f)return!1;if(y(n,v),T!==P){var N;if(i===-1)N=b;else{for(C=Math.max(p.length,C),N=[],x=0;x=i));x++)N.push(I);for(x=i;x=be.data.length||at<-be.data.length)throw new Error(Ve+" must be valid indices for gd.data.");if(ke.indexOf(at,je+1)>-1||at>=0&&ke.indexOf(-be.data.length+at)>-1||at<0&&ke.indexOf(be.data.length+at)>-1)throw new Error("each index in "+Ve+" must be unique.")}}function N(be,ke,Ve){if(!Array.isArray(be.data))throw new Error("gd.data must be an array.");if(typeof ke>"u")throw new Error("currentIndices is a required argument.");if(Array.isArray(ke)||(ke=[ke]),F(be,ke,"currentIndices"),typeof Ve<"u"&&!Array.isArray(Ve)&&(Ve=[Ve]),typeof Ve<"u"&&F(be,Ve,"newIndices"),typeof Ve<"u"&&ke.length!==Ve.length)throw new Error("current and new indices must be of equal length.")}function V(be,ke,Ve){var je,at;if(!Array.isArray(be.data))throw new Error("gd.data must be an array.");if(typeof ke>"u")throw new Error("traces must be defined.");for(Array.isArray(ke)||(ke=[ke]),je=0;je"u")throw new Error("indices must be an integer or array of integers");F(be,Ve,"indices");for(var ut in ke){if(!Array.isArray(ke[ut])||ke[ut].length!==Ve.length)throw new Error("attribute "+ut+" must be an array of length equal to indices array length");if(at&&(!(ut in je)||!Array.isArray(je[ut])||je[ut].length!==ke[ut].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")}}function $(be,ke,Ve,je){var at=L.isPlainObject(je),ut=[],Nt,Vt,gt,Ct,Yt;Array.isArray(Ve)||(Ve=[Ve]),Ve=O(Ve,be.data.length-1);for(var gr in ke)for(var ht=0;ht=0&&Yt=0&&Yt"u")return Ct=X.redraw(be),g.add(be,at,Nt,ut,Vt),Ct;Array.isArray(Ve)||(Ve=[Ve]);try{N(be,je,Ve)}catch(Yt){throw be.data.splice(be.data.length-ke.length,ke.length),Yt}return g.startSequence(be),g.add(be,at,Nt,ut,Vt),Ct=X.moveTraces(be,je,Ve),g.stopSequence(be),Ct}function H(be,ke){be=L.getGraphDiv(be);var Ve=[],je=X.addTraces,at=H,ut=[be,Ve,ke],Nt=[be,ke],Vt,gt;if(typeof ke>"u")throw new Error("indices must be an integer or array of integers.");for(Array.isArray(ke)||(ke=[ke]),F(be,ke,"indices"),ke=O(ke,be.data.length-1),ke.sort(L.sorterDes),Vt=0;Vt"u")for(Ve=[],Ct=0;Ct-1&&ut.indexOf("grouptitlefont")===-1?Vt(ut,ut.replace("titlefont","title.font")):ut.indexOf("titleposition")>-1?Vt(ut,ut.replace("titleposition","title.position")):ut.indexOf("titleside")>-1?Vt(ut,ut.replace("titleside","title.side")):ut.indexOf("titleoffset")>-1&&Vt(ut,ut.replace("titleoffset","title.offset"));function Vt(gt,Ct){be[Ct]=be[gt],delete be[gt]}}function we(be,ke,Ve){be=L.getGraphDiv(be),m.clearPromiseQueue(be);var je={};if(typeof ke=="string")je[ke]=Ve;else if(L.isPlainObject(ke))je=L.extendFlat({},ke);else return L.warn("Relayout fail.",ke,Ve),Promise.reject();Object.keys(je).length&&(be.changed=!0);var at=Se(be,je),ut=at.flags;ut.calc&&(be.calcdata=void 0);var Nt=[s.previousPromises];ut.layoutReplot?Nt.push(b.layoutReplot):Object.keys(je).length&&(me(be,ut,at)||s.supplyDefaults(be),ut.legend&&Nt.push(b.doLegend),ut.layoutstyle&&Nt.push(b.layoutStyles),ut.axrange&&Le(Nt,at.rangesAltered),ut.ticks&&Nt.push(b.doTicksRelayout),ut.modebar&&Nt.push(b.doModeBar),ut.camera&&Nt.push(b.doCamera),ut.colorbars&&Nt.push(b.doColorBars),Nt.push(C)),Nt.push(s.rehover,s.redrag,s.reselect),g.add(be,we,[be,at.undoit],we,[be,at.redoit]);var Vt=L.syncOrAsync(Nt,be);return(!Vt||!Vt.then)&&(Vt=Promise.resolve(be)),Vt.then(function(){return be.emit("plotly_relayout",at.eventData),be})}function me(be,ke,Ve){var je=be._fullLayout;if(!ke.axrange)return!1;for(var at in ke)if(at!=="axrange"&&ke[at])return!1;var ut,Nt,Vt=function(Ht,Wt){return L.coerce(ut,Nt,u,Ht,Wt)},gt={};for(var Ct in Ve.rangesAltered){var Yt=a.id2name(Ct);if(ut=be.layout[Yt],Nt=je[Yt],c(ut,Nt,Vt,gt),Nt._matchGroup){for(var gr in Nt._matchGroup)if(gr!==Ct){var ht=je[a.id2name(gr)];ht.autorange=Nt.autorange,ht.range=Nt.range.slice(),ht._input.range=Nt.range.slice()}}}return!0}function Le(be,ke){var Ve=ke?function(je){var at=[],ut=!0;for(var Nt in ke){var Vt=a.getFromId(je,Nt);if(at.push(Nt),(Vt.ticklabelposition||"").indexOf("inside")!==-1&&Vt._anchorAxis&&at.push(Vt._anchorAxis._id),Vt._matchGroup)for(var gt in Vt._matchGroup)ke[gt]||at.push(gt)}return a.draw(je,at,{skipTitle:ut})}:function(je){return a.draw(je,"redraw")};be.push(f,b.doAutoRangeAndConstraints,Ve,b.drawData,b.finalDraw)}var ve=/^[xyz]axis[0-9]*\.range(\[[0|1]\])?$/,Ae=/^[xyz]axis[0-9]*\.autorange$/,ye=/^[xyz]axis[0-9]*\.domain(\[[0|1]\])?$/;function Se(be,ke){var Ve=be.layout,je=be._fullLayout,at=je._guiEditing,ut=Y(je._preGUI,at),Nt=Object.keys(ke),Vt=a.list(be),gt=L.extendDeepAll({},ke),Ct={},Yt,gr,ht;for(de(ke),Nt=Object.keys(ke),gr=0;gr0&&typeof It.parts[ar]!="string";)ar--;var ir=It.parts[ar],Be=It.parts[ar-1]+"."+ir,Fe=It.parts.slice(0,ar).join("."),Rt=M(be.layout,Fe).get(),Lt=M(je,Fe).get(),Ut=It.get();if(Gt!==void 0){ct[_t]=Gt,qe[_t]=ir==="reverse"?Gt:K(Ut);var Qt=t.getLayoutValObject(je,It.parts);if(Qt&&Qt.impliedEdits&&Gt!==null)for(var rr in Qt.impliedEdits)dt(L.relativeAttr(_t,rr),Qt.impliedEdits[rr]);if(["width","height"].indexOf(_t)!==-1)if(Gt){dt("autosize",null);var Kt=_t==="height"?"width":"height";dt(Kt,je[Kt])}else je[_t]=be._initialAutoSize[_t];else if(_t==="autosize")dt("width",Gt?null:je.width),dt("height",Gt?null:je.height);else if(Be.match(ve))Mt(Be),M(je,Fe+"._inputRange").set(null);else if(Be.match(Ae)){Mt(Be),M(je,Fe+"._inputRange").set(null);var Dt=M(je,Fe).get();Dt._inputDomain&&(Dt._input.domain=Dt._inputDomain.slice())}else Be.match(ye)&&M(je,Fe+"._inputDomain").set(null);if(ir==="type"){Et=Rt;var sr=Lt.type==="linear"&&Gt==="log",fr=Lt.type==="log"&&Gt==="linear";if(sr||fr){if(!Et||!Et.range)dt(Fe+".autorange",!0);else if(Lt.autorange)sr&&(Et.range=Et.range[1]>Et.range[0]?[1,2]:[2,1]);else{var vr=Et.range[0],lr=Et.range[1];sr?(vr<=0&&lr<=0&&dt(Fe+".autorange",!0),vr<=0?vr=lr/1e6:lr<=0&&(lr=vr/1e6),dt(Fe+".range[0]",Math.log(vr)/Math.LN10),dt(Fe+".range[1]",Math.log(lr)/Math.LN10)):(dt(Fe+".range[0]",Math.pow(10,vr)),dt(Fe+".range[1]",Math.pow(10,lr)))}Array.isArray(je._subplots.polar)&&je._subplots.polar.length&&je[It.parts[0]]&&It.parts[1]==="radialaxis"&&delete je[It.parts[0]]._subplot.viewInitial["radialaxis.range"],r.getComponentMethod("annotations","convertCoords")(be,Lt,Gt,dt),r.getComponentMethod("images","convertCoords")(be,Lt,Gt,dt)}else dt(Fe+".autorange",!0),dt(Fe+".range",null);M(je,Fe+"._inputRange").set(null)}else if(ir.match(p)){var Or=M(je,_t).get(),Sr=(Gt||{}).type;(!Sr||Sr==="-")&&(Sr="linear"),r.getComponentMethod("annotations","convertCoords")(be,Or,Sr,dt),r.getComponentMethod("images","convertCoords")(be,Or,Sr,dt)}var Ar=v.containerArrayMatch(_t);if(Ar){Yt=Ar.array,gr=Ar.index;var sn=Ar.property,Jr=Qt||{editType:"calc"};gr!==""&&sn===""&&(v.isAddVal(Gt)?qe[_t]=null:v.isRemoveVal(Gt)?qe[_t]=(M(Ve,Yt).get()||[])[gr]:L.warn("unrecognized full object value",ke)),E.update(er,Jr),Ct[Yt]||(Ct[Yt]={});var bn=Ct[Yt][gr];bn||(bn=Ct[Yt][gr]={}),bn[sn]=Gt,delete ke[_t]}else ir==="reverse"?(Rt.range?Rt.range.reverse():(dt(Fe+".autorange",!0),Rt.range=[1,0]),Lt.autorange?er.calc=!0:er.plot=!0):(_t==="dragmode"&&(Gt===!1&&Ut!==!1||Gt!==!1&&Ut===!1)||je._has("scatter-like")&&je._has("regl")&&_t==="dragmode"&&(Gt==="lasso"||Gt==="select")&&!(Ut==="lasso"||Ut==="select")||je._has("gl2d")?er.plot=!0:Qt?E.update(er,Qt):er.calc=!0,It.set(Gt))}}for(Yt in Ct){var xn=v.applyContainerArrayChanges(be,ut(Ve,Yt),Ct[Yt],er,ut);xn||(er.plot=!0)}for(var or in bt){Et=a.getFromId(be,or);var Lr=Et&&Et._constraintGroup;if(Lr){er.calc=!0;for(var Br in Lr)bt[Br]||(a.getFromId(be,Br)._constraintShrinkable=!0)}}(_e(be)||ke.height||ke.width)&&(er.plot=!0);var _r=je.shapes;for(gr=0;gr<_r.length;gr++)if(_r[gr].showlegend){er.calc=!0;break}return(er.plot||er.calc)&&(er.layoutReplot=!0),{flags:er,rangesAltered:bt,undoit:qe,redoit:ct,eventData:gt}}function _e(be){var ke=be._fullLayout,Ve=ke.width,je=ke.height;return be.layout.autosize&&s.plotAutoSize(be,be.layout,ke),ke.width!==Ve||ke.height!==je}function ze(be,ke,Ve,je){be=L.getGraphDiv(be),m.clearPromiseQueue(be),L.isPlainObject(ke)||(ke={}),L.isPlainObject(Ve)||(Ve={}),Object.keys(ke).length&&(be.changed=!0),Object.keys(Ve).length&&(be.changed=!0);var at=m.coerceTraceIndices(be,je),ut=le(be,L.extendFlat({},ke),at),Nt=ut.flags,Vt=Se(be,L.extendFlat({},Ve)),gt=Vt.flags;(Nt.calc||gt.calc)&&(be.calcdata=void 0),Nt.clearAxisTypes&&m.clearAxisTypes(be,at,Ve);var Ct=[];gt.layoutReplot?Ct.push(b.layoutReplot):Nt.fullReplot?Ct.push(X._doPlot):(Ct.push(s.previousPromises),me(be,gt,Vt)||s.supplyDefaults(be),Nt.style&&Ct.push(b.doTraceStyle),(Nt.colorbars||gt.colorbars)&&Ct.push(b.doColorBars),gt.legend&&Ct.push(b.doLegend),gt.layoutstyle&&Ct.push(b.layoutStyles),gt.axrange&&Le(Ct,Vt.rangesAltered),gt.ticks&&Ct.push(b.doTicksRelayout),gt.modebar&&Ct.push(b.doModeBar),gt.camera&&Ct.push(b.doCamera),Ct.push(C)),Ct.push(s.rehover,s.redrag,s.reselect),g.add(be,ze,[be,ut.undoit,Vt.undoit,ut.traces],ze,[be,ut.redoit,Vt.redoit,ut.traces]);var Yt=L.syncOrAsync(Ct,be);return(!Yt||!Yt.then)&&(Yt=Promise.resolve(be)),Yt.then(function(){return be.emit("plotly_update",{data:ut.eventData,layout:Vt.eventData}),be})}function Ie(be){return function(Ve){Ve._fullLayout._guiEditing=!0;var je=be.apply(null,arguments);return Ve._fullLayout._guiEditing=!1,je}}var Ne=[{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"}],et=[{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 st(be,ke){for(var Ve=0;Ve1;)if(je.pop(),Ve=M(ke,je.join(".")+".uirevision").get(),Ve!==void 0)return Ve;return ke.uirevision}function Ke(be,ke){for(var Ve=0;Ve=at.length?at[0]:at[Ct]:at}function Vt(Ct){return Array.isArray(ut)?Ct>=ut.length?ut[0]:ut[Ct]:ut}function gt(Ct,Yt){var gr=0;return function(){if(Ct&&++gr===Yt)return Ct()}}return new Promise(function(Ct,Yt){function gr(){if(je._frameQueue.length!==0){for(;je._frameQueue.length;){var ir=je._frameQueue.pop();ir.onInterrupt&&ir.onInterrupt()}be.emit("plotly_animationinterrupted",[])}}function ht(ir){if(ir.length!==0){for(var Be=0;Beje._timeToNext&&Wt()};ir()}var er=0;function ct(ir){return Array.isArray(at)?er>=at.length?ir.transitionOpts=at[er]:ir.transitionOpts=at[0]:ir.transitionOpts=at,er++,ir}var qe,dt,bt=[],Et=ke==null,Mt=Array.isArray(ke),_t=!Et&&!Mt&&L.isPlainObject(ke);if(_t)bt.push({type:"object",data:ct(L.extendFlat({},ke))});else if(Et||["string","number"].indexOf(typeof ke)!==-1)for(qe=0;qe0&&nrnr)&&ar.push(dt);bt=ar}}bt.length>0?ht(bt):(be.emit("plotly_animated"),Ct())})}function Oe(be,ke,Ve){if(be=L.getGraphDiv(be),ke==null)return Promise.resolve();if(!L.isPlotDiv(be))throw new Error("This element is not a Plotly plot: "+be+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var je,at,ut,Nt,Vt=be._transitionData._frames,gt=be._transitionData._frameHash;if(!Array.isArray(ke))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+ke);var Ct=Vt.length+ke.length*2,Yt=[],gr={};for(je=ke.length-1;je>=0;je--)if(L.isPlainObject(ke[je])){var ht=ke[je].name,Ht=(gt[ht]||gr[ht]||{}).name,Wt=ke[je].name,cr=gt[Ht]||gr[Ht];Ht&&Wt&&typeof Wt=="number"&&cr&&SIt.index?-1:_t.index=0;je--){if(at=Yt[je].frame,typeof at.name=="number"&&L.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!at.name)for(;gt[at.name="frame "+be._transitionData._counter++];);if(gt[at.name]){for(ut=0;ut=0;Ve--)je=ke[Ve],ut.push({type:"delete",index:je}),Nt.unshift({type:"insert",index:je,value:at[je]});var Vt=s.modifyFrames,gt=s.modifyFrames,Ct=[be,Nt],Yt=[be,ut];return g&&g.add(be,Vt,Ct,gt,Yt),s.modifyFrames(be,ut)}function ge(be){be=L.getGraphDiv(be);var ke=be._fullLayout||{},Ve=be._fullData||[];return s.cleanPlot([],{},Ve,ke),s.purge(be),d.purge(be),ke._container&&ke._container.remove(),delete be._context,be}function pe(be){var ke=be._fullLayout,Ve=be.getBoundingClientRect();if(!L.equalDomRects(Ve,ke._lastBBox)){var je=ke._invTransform=L.inverseTransformMatrix(L.getFullTransformMatrix(be));ke._invScaleX=Math.sqrt(je[0][0]*je[0][0]+je[0][1]*je[0][1]+je[0][2]*je[0][2]),ke._invScaleY=Math.sqrt(je[1][0]*je[1][0]+je[1][1]*je[1][1]+je[1][2]*je[1][2]),ke._lastBBox=Ve}}function Te(be){var ke=A.select(be),Ve=be._fullLayout;if(Ve._calcInverseTransform=pe,Ve._calcInverseTransform(be),Ve._container=ke.selectAll(".plot-container").data([0]),Ve._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0),Ve._paperdiv=Ve._container.selectAll(".svg-container").data([0]),Ve._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),Ve._glcontainer=Ve._paperdiv.selectAll(".gl-container").data([{}]),Ve._glcontainer.enter().append("div").classed("gl-container",!0),Ve._paperdiv.selectAll(".main-svg").remove(),Ve._paperdiv.select(".modebar-container").remove(),Ve._paper=Ve._paperdiv.insert("svg",":first-child").classed("main-svg",!0),Ve._toppaper=Ve._paperdiv.append("svg").classed("main-svg",!0),Ve._modebardiv=Ve._paperdiv.append("div"),delete Ve._modeBar,Ve._hoverpaper=Ve._paperdiv.append("svg").classed("main-svg",!0),!Ve._uid){var je={};A.selectAll("defs").each(function(){this.id&&(je[this.id.split("-")[1]]=1)}),Ve._uid=L.randstr(je)}Ve._paperdiv.selectAll(".main-svg").attr(T.svgAttrs),Ve._defs=Ve._paper.append("defs").attr("id","defs-"+Ve._uid),Ve._clips=Ve._defs.append("g").classed("clips",!0),Ve._topdefs=Ve._toppaper.append("defs").attr("id","topdefs-"+Ve._uid),Ve._topclips=Ve._topdefs.append("g").classed("clips",!0),Ve._bgLayer=Ve._paper.append("g").classed("bglayer",!0),Ve._draggers=Ve._paper.append("g").classed("draglayer",!0);var at=Ve._paper.append("g").classed("layer-below",!0);Ve._imageLowerLayer=at.append("g").classed("imagelayer",!0),Ve._shapeLowerLayer=at.append("g").classed("shapelayer",!0),Ve._cartesianlayer=Ve._paper.append("g").classed("cartesianlayer",!0),Ve._polarlayer=Ve._paper.append("g").classed("polarlayer",!0),Ve._smithlayer=Ve._paper.append("g").classed("smithlayer",!0),Ve._ternarylayer=Ve._paper.append("g").classed("ternarylayer",!0),Ve._geolayer=Ve._paper.append("g").classed("geolayer",!0),Ve._funnelarealayer=Ve._paper.append("g").classed("funnelarealayer",!0),Ve._pielayer=Ve._paper.append("g").classed("pielayer",!0),Ve._iciclelayer=Ve._paper.append("g").classed("iciclelayer",!0),Ve._treemaplayer=Ve._paper.append("g").classed("treemaplayer",!0),Ve._sunburstlayer=Ve._paper.append("g").classed("sunburstlayer",!0),Ve._indicatorlayer=Ve._toppaper.append("g").classed("indicatorlayer",!0),Ve._glimages=Ve._paper.append("g").classed("glimages",!0);var ut=Ve._toppaper.append("g").classed("layer-above",!0);Ve._imageUpperLayer=ut.append("g").classed("imagelayer",!0),Ve._shapeUpperLayer=ut.append("g").classed("shapelayer",!0),Ve._selectionLayer=Ve._toppaper.append("g").classed("selectionlayer",!0),Ve._infolayer=Ve._toppaper.append("g").classed("infolayer",!0),Ve._menulayer=Ve._toppaper.append("g").classed("menulayer",!0),Ve._zoomlayer=Ve._toppaper.append("g").classed("zoomlayer",!0),Ve._hoverlayer=Ve._hoverpaper.append("g").classed("hoverlayer",!0),Ve._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),be.emit("plotly_framework")}X.animate=He,X.addFrames=Oe,X.deleteFrames=Ce,X.addTraces=re,X.deleteTraces=H,X.extendTraces=Z,X.moveTraces=J,X.prependTraces=G,X.newPlot=z,X._doPlot=i,X.purge=ge,X.react=vt,X.redraw=_,X.relayout=we,X.restyle=ae,X.setPlotConfig=x,X.update=ze,X._guiRelayout=Ie(we),X._guiRestyle=Ie(ae),X._guiUpdate=Ie(ze),X._storeDirectGUIEdit=ne},20556:function(te){var X={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 A(P,o){for(var L in P){var M=P[L];M.valType?o[L]=M.dflt:(o[L]||(o[L]={}),A(M,o[L]))}}A(X,e),te.exports={configAttributes:X,dfltConfig:e}},73060:function(te,X,e){var A=e(24040),P=e(3400),o=e(45464),L=e(64859),M=e(16672),d=e(85656),g=e(20556).configAttributes,r=e(67824),t=P.extendDeepAll,s=P.isPlainObject,a=P.isArrayOrTypedArray,c=P.nestedProperty,u=P.valObjectMeta,l="_isSubplotObj",y="_isLinkedToArray",h="_arrayAttrRegexps",T="_deprecated",f=[l,y,h,T];X.IS_SUBPLOT_OBJ=l,X.IS_LINKED_TO_ARRAY=y,X.DEPRECATED=T,X.UNDERSCORE_ATTRS=f,X.get=function(){var B={};A.allTypes.forEach(function(z){B[z]=b(z)});var _={};return Object.keys(A.transformsRegistry).forEach(function(z){_[z]=p(z)}),{defs:{valObjects:u,metaKeys:f.concat(["description","role","editType","impliedEdits"]),editType:{traces:r.traces,layout:r.layout},impliedEdits:{}},traces:B,layout:E(),transforms:_,frames:S(),animation:w(d),config:w(g)}},X.crawl=function(B,_,z,O){var F=z||0;O=O||"",Object.keys(B).forEach(function(N){var V=B[N];if(f.indexOf(N)===-1){var j=(O?O+".":"")+N;_(V,N,B,F,j),!X.isValObject(V)&&s(V)&&N!=="impliedEdits"&&X.crawl(V,_,F+1,j)}})},X.isValObject=function(B){return B&&B.valType!==void 0},X.findArrayAttributes=function(B){var _=[],z=[],O=[],F,N;function V(G,re,H,J){z=z.slice(0,J).concat([re]),O=O.slice(0,J).concat([G&&G._isLinkedToArray]);var ae=G&&(G.valType==="data_array"||G.arrayOk===!0)&&!(z[J-1]==="colorbar"&&(re==="ticktext"||re==="tickvals"));ae&&j(F,0,"")}function j(G,re,H){var J=G[z[re]],ae=H+z[re];if(re===z.length-1)a(J)&&_.push(N+ae);else if(O[re]){if(Array.isArray(J))for(var K=0;K=V.length)return!1;F=(A.transformsRegistry[V[j].type]||{}).attributes,N=F&&F[_[2]],O=3}else{var $=B._module;if($||($=(A.modules[B.type||o.type.dflt]||{})._module),!$)return!1;if(F=$.attributes,N=F&&F[z],!N){var q=$.basePlotModule;q&&q.attributes&&(N=q.attributes[z])}N||(N=o[z])}return v(N,_,O)},X.getLayoutValObject=function(B,_){var z=n(B,_[0]);return v(z,_,1)};function n(B,_){var z,O,F,N,V=B._basePlotModules;if(V){var j;for(z=0;z=N.length)return!1;if(B.dimensions===2){if(z++,_.length===z)return B;var V=_[z];if(!m(V))return!1;B=N[F][V]}else B=N[F]}else B=N}}return B}function m(B){return B===Math.round(B)&&B>=0}function b(B){var _,z;_=A.modules[B]._module,z=_.basePlotModule;var O={};O.type=null;var F=t({},o),N=t({},_.attributes);X.crawl(N,function($,q,oe,Z,G){c(F,G).set(void 0),$===void 0&&c(N,G).set(void 0)}),t(O,F),A.traceIs(B,"noOpacity")&&delete O.opacity,A.traceIs(B,"showLegend")||(delete O.showlegend,delete O.legendgroup),A.traceIs(B,"noHover")&&(delete O.hoverinfo,delete O.hoverlabel),_.selectPoints||delete O.selectedpoints,t(O,N),z.attributes&&t(O,z.attributes),O.type=B;var V={meta:_.meta||{},categories:_.categories||{},animatable:!!_.animatable,type:B,attributes:w(O)};if(_.layoutAttributes){var j={};t(j,_.layoutAttributes),V.layoutAttributes=w(j)}return _.animatable||X.crawl(V,function($){X.isValObject($)&&"anim"in $&&delete $.anim}),V}function E(){var B={},_,z;t(B,L);for(_ in A.subplotsRegistry)if(z=A.subplotsRegistry[_],!!z.layoutAttributes)if(Array.isArray(z.attr))for(var O=0;O=s&&(t._input||{})._templateitemname;c&&(a=s);var u=r+"["+a+"]",l;function y(){l={},c&&(l[u]={},l[u][o]=c)}y();function h(v,m){l[v]=m}function T(v,m){c?A.nestedProperty(l[u],v).set(m):l[u+"."+v]=m}function f(){var v=l;return y(),v}function n(v,m){v&&T(v,m);var b=f();for(var E in b)A.nestedProperty(g,E).set(b[E])}return{modifyBase:h,modifyItem:T,getUpdateObj:f,applyUpdate:n}}},39172:function(te,X,e){var A=e(33428),P=e(24040),o=e(7316),L=e(3400),M=e(72736),d=e(73696),g=e(76308),r=e(43616),t=e(81668),s=e(45460),a=e(54460),c=e(84284),u=e(71888),l=u.enforce,y=u.clean,h=e(19280).doAutoRange,T="start",f="middle",n="end";X.layoutStyles=function(z){return L.syncOrAsync([o.doAutoMargin,m],z)};function v(z,O,F){for(var N=0;N=z[1]||V[1]<=z[0])&&j[0]O[0])return!0}return!1}function m(z){var O=z._fullLayout,F=O._size,N=F.p,V=a.list(z,"",!0),j,$,q,oe,Z,G;if(O._paperdiv.style({width:z._context.responsive&&O.autosize&&!z._context._hasZeroWidth&&!z.layout.width?"100%":O.width+"px",height:z._context.responsive&&O.autosize&&!z._context._hasZeroHeight&&!z.layout.height?"100%":O.height+"px"}).selectAll(".main-svg").call(r.setSize,O.width,O.height),z._context.setBackground(z,O.paper_bgcolor),X.drawMainTitle(z),s.manage(z),!O._has("cartesian"))return o.previousPromises(z);function re(ge,pe,Te){var be=ge._lw/2;if(ge._id.charAt(0)==="x"){if(pe){if(Te==="top")return pe._offset-N-be}else return F.t+F.h*(1-(ge.position||0))+be%1;return pe._offset+pe._length+N+be}if(pe){if(Te==="right")return pe._offset+pe._length+N+be}else return F.l+F.w*(ge.position||0)+be%1;return pe._offset-N-be}for(j=0;j0){C(z,j,Z,oe),q.attr({x:$,y:j,"text-anchor":N,dy:I(O.yanchor)}).call(M.positionText,$,j);var G=(O.text.match(M.BR_TAG_ALL)||[]).length;if(G){var re=c.LINE_SPACING*G+c.MID_SHIFT;O.y===0&&(re=-re),q.selectAll(".line").each(function(){var H=+this.getAttribute("dy").slice(0,-2)-re+"em";this.setAttribute("dy",H)})}}}};function S(z,O,F,N,V){var j=O.yref==="paper"?z._fullLayout._size.h:z._fullLayout.height,$=L.isTopAnchor(O)?N:N-V,q=F==="b"?j-$:$;return L.isTopAnchor(O)&&F==="t"||L.isBottomAnchor(O)&&F==="b"?!1:q.5?"t":"b",$=z._fullLayout.margin[j],q=0;return O.yref==="paper"?q=F+O.pad.t+O.pad.b:O.yref==="container"&&(q=w(j,N,V,z._fullLayout.height,F)+O.pad.t+O.pad.b),q>$?q:0}function C(z,O,F,N){var V="title.automargin",j=z._fullLayout.title,$=j.y>.5?"t":"b",q={x:j.x,y:j.y,t:0,b:0},oe={};j.yref==="paper"&&S(z,j,$,O,N)?q[$]=F:j.yref==="container"&&(oe[$]=F,z._fullLayout._reservedMargin[V]=oe),o.allowAutoMargin(z,V),o.autoMargin(z,V,q)}function x(z,O){var F=z.title,N=z._size,V=0;switch(O===T?V=F.pad.l:O===n&&(V=-F.pad.r),F.xref){case"paper":return N.l+N.w*F.x+V;case"container":default:return z.width*F.x+V}}function k(z,O){var F=z.title,N=z._size,V=0;if(O==="0em"||!O?V=-F.pad.b:O===c.CAP_SHIFT+"em"&&(V=F.pad.t),F.y==="auto")return N.t/2;switch(F.yref){case"paper":return N.t+N.h-N.h*F.y+V;case"container":default:return z.height-z.height*F.y+V}}function I(z){return z==="top"?c.CAP_SHIFT+.3+"em":z==="bottom"?"-0.3em":c.MID_SHIFT+"em"}function B(z){var O=z.title,F=f;return L.isRightAnchor(O)?F=n:L.isLeftAnchor(O)&&(F=T),F}function _(z){var O=z.title,F="0em";return L.isTopAnchor(O)?F=c.CAP_SHIFT+"em":L.isMiddleAnchor(O)&&(F=c.MID_SHIFT+"em"),F}X.doTraceStyle=function(z){var O=z.calcdata,F=[],N;for(N=0;N_?b.push({code:"unused",traceType:x,templateCount:B,dataCount:_}):_>B&&b.push({code:"reused",traceType:x,templateCount:B,dataCount:_})}}function z(O,F){for(var N in O)if(N.charAt(0)!=="_"){var V=O[N],j=u(O,N,F);P(V)?(Array.isArray(O)&&V._template===!1&&V.templateitemname&&b.push({code:"missing",path:j,templateitemname:V.templateitemname}),z(V,j)):Array.isArray(V)&&l(V)&&z(V,j)}}if(z({data:p,layout:E},""),b.length)return b.map(y)};function l(h){for(var T=0;T1&&b.push(c("object","layout"))),P.supplyDefaults(E);for(var w=E._fullData,i=p.length,C=0;Cx.length&&m.push(c("unused",b,i.concat(x.length)));var O=x.length,F=Array.isArray(z);F&&(O=Math.min(O,z.length));var N,V,j,$,q;if(k.dimensions===2)for(V=0;Vx[V].length&&m.push(c("unused",b,i.concat(V,x[V].length)));var oe=x[V].length;for(N=0;N<(F?Math.min(oe,z[V].length):oe);N++)j=F?z[V][N]:z,$=C[V][N],q=x[V][N],A.validate($,j)?q!==$&&q!==+$&&m.push(c("dynamic",b,i.concat(V,N),$,q)):m.push(c("value",b,i.concat(V,N),$))}else m.push(c("array",b,i.concat(V),C[V]));else for(V=0;V0&&Math.round(y)===y)l=y;else return{vals:a}}for(var h=t.calendar,T=c==="start",f=c==="end",n=r[s+"period0"],v=o(n,h)||0,m=[],b=[],E=[],p=a.length,S=0;Sw;)x=L(x,-l,h);for(;x<=w;)x=L(x,l,h);C=L(x,-l,h)}else{for(i=Math.round((w-v)/u),x=v+i*u;x>w;)x-=u;for(;x<=w;)x+=u;C=x-u}m[S]=T?C:f?x:(C+x)/2,b[S]=C,E[S]=x}return{vals:m,starts:b,ends:E}}},26720:function(te){te.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}},19280:function(te,X,e){var A=e(33428),P=e(38248),o=e(3400),L=e(39032).FP_SAFE,M=e(24040),d=e(43616),g=e(79811),r=g.getFromId,t=g.isLinked;te.exports={applyAutorangeOptions:i,getAutoRange:s,makePadFn:c,doAutoRange:h,findExtremes:T,concatExtremes:y};function s(C,x){var k,I,B=[],_=C._fullLayout,z=c(_,x,0),O=c(_,x,1),F=y(C,x),N=F.min,V=F.max;if(N.length===0||V.length===0)return o.simpleMap(x.range,x.r2l);var j=N[0].val,$=V[0].val;for(k=1;k0&&(de=J-z(Y)-O(ie),de>ae?we/de>K&&(ne=Y,le=ie,K=we/de):we/J>K&&(ne={val:Y.val,nopad:1},le={val:ie.val,nopad:1},K=we/J));function me(Se,_e){return Math.max(Se,O(_e))}if(j===$){var Le=j-1,ve=j+1;if(re)if(j===0)B=[0,1];else{var Ae=(j>0?V:N).reduce(me,0),ye=j/(1-Math.min(.5,Ae/J));B=j>0?[0,ye]:[ye,0]}else H?B=[Math.max(0,Le),Math.max(1,ve)]:B=[Le,ve]}else re?(ne.val>=0&&(ne={val:0,nopad:1}),le.val<=0&&(le={val:0,nopad:1})):H&&(ne.val-K*z(ne)<0&&(ne={val:0,nopad:1}),le.val<=0&&(le={val:1,nopad:1})),K=(le.val-ne.val-a(x,Y.val,ie.val))/(J-z(ne)-O(le)),B=[ne.val-K*z(ne),le.val+K*O(le)];return B=i(B,x),x.limitRange&&x.limitRange(),oe&&B.reverse(),o.simpleMap(B,x.l2r||Number)}function a(C,x,k){var I=0;if(C.rangebreaks)for(var B=C.locateBreaks(x,k),_=0;_0?k.ppadplus:k.ppadminus)||k.ppad||0),Y=ae((C._m>0?k.ppadminus:k.ppadplus)||k.ppad||0),ie=ae(k.vpadplus||k.vpad),ne=ae(k.vpadminus||k.vpad);if(!N){if(H=1/0,J=-1/0,F)for(j=0;j<_;j++)$=x[j],$0&&(H=$),$>J&&$-L&&(H=$),$>J&&$=we;j--)de(j);return{min:I,max:B,opts:k}}function f(C,x,k,I){v(C,x,k,I,b)}function n(C,x,k,I){v(C,x,k,I,E)}function v(C,x,k,I,B){for(var _=I.tozero,z=I.extrapad,O=!0,F=0;F=k&&(N.extrapad||!z)){O=!1;break}else B(x,N.val)&&N.pad<=k&&(z||!N.extrapad)&&(C.splice(F,1),F--)}if(O){var V=_&&x===0;C.push({val:x,pad:V?0:k,extrapad:V?!1:z})}}function m(C){return P(C)&&Math.abs(C)=x}function p(C,x){var k=x.autorangeoptions;return k&&k.minallowed!==void 0&&w(x,k.minallowed,k.maxallowed)?k.minallowed:k&&k.clipmin!==void 0&&w(x,k.clipmin,k.clipmax)?Math.max(C,x.d2l(k.clipmin)):C}function S(C,x){var k=x.autorangeoptions;return k&&k.maxallowed!==void 0&&w(x,k.minallowed,k.maxallowed)?k.maxallowed:k&&k.clipmax!==void 0&&w(x,k.clipmin,k.clipmax)?Math.min(C,x.d2l(k.clipmax)):C}function w(C,x,k){return x!==void 0&&k!==void 0?(x=C.d2l(x),k=C.d2l(k),x=F&&(_=F,k=F),z<=F&&(z=F,I=F)}}return k=p(k,x),I=S(I,x),[k,I]}},76808:function(te){te.exports=function(e,A,P){var o,L;if(P){var M=A==="reversed"||A==="min reversed"||A==="max reversed";o=P[M?1:0],L=P[M?0:1]}var d=e("autorangeoptions.minallowed",L===null?o:void 0),g=e("autorangeoptions.maxallowed",o===null?L:void 0);d===void 0&&e("autorangeoptions.clipmin"),g===void 0&&e("autorangeoptions.clipmax"),e("autorangeoptions.include")}},54460:function(te,X,e){var A=e(33428),P=e(38248),o=e(7316),L=e(24040),M=e(3400),d=M.strTranslate,g=e(72736),r=e(81668),t=e(76308),s=e(43616),a=e(94724),c=e(98728),u=e(39032),l=u.ONEMAXYEAR,y=u.ONEAVGYEAR,h=u.ONEMINYEAR,T=u.ONEMAXQUARTER,f=u.ONEAVGQUARTER,n=u.ONEMINQUARTER,v=u.ONEMAXMONTH,m=u.ONEAVGMONTH,b=u.ONEMINMONTH,E=u.ONEWEEK,p=u.ONEDAY,S=p/2,w=u.ONEHOUR,i=u.ONEMIN,C=u.ONESEC,x=u.MINUS_SIGN,k=u.BADNUM,I={K:"zeroline"},B={K:"gridline",L:"path"},_={K:"minor-gridline",L:"path"},z={K:"tick",L:"path"},O={K:"tick",L:"text"},F={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},N=e(84284),V=N.MID_SHIFT,j=N.CAP_SHIFT,$=N.LINE_SPACING,q=N.OPPOSITE_SIDE,oe=3,Z=te.exports={};Z.setConvert=e(78344);var G=e(52976),re=e(79811),H=re.idSort,J=re.isLinked;Z.id2name=re.id2name,Z.name2id=re.name2id,Z.cleanId=re.cleanId,Z.list=re.list,Z.listIds=re.listIds,Z.getFromId=re.getFromId,Z.getFromTrace=re.getFromTrace;var ae=e(19280);Z.getAutoRange=ae.getAutoRange,Z.findExtremes=ae.findExtremes;var K=1e-4;function Y(Be){var Fe=(Be[1]-Be[0])*K;return[Be[0]-Fe,Be[1]+Fe]}Z.coerceRef=function(Be,Fe,Rt,Lt,Ut,Qt){var rr=Lt.charAt(Lt.length-1),Kt=Rt._fullLayout._subplots[rr+"axis"],Dt=Lt+"ref",sr={};return Ut||(Ut=Kt[0]||(typeof Qt=="string"?Qt:Qt[0])),Qt||(Qt=Ut),Kt=Kt.concat(Kt.map(function(fr){return fr+" domain"})),sr[Dt]={valType:"enumerated",values:Kt.concat(Qt?typeof Qt=="string"?[Qt]:Qt:[]),dflt:Ut},M.coerce(Be,Fe,sr,Dt)},Z.getRefType=function(Be){return Be===void 0?Be:Be==="paper"?"paper":Be==="pixel"?"pixel":/( domain)$/.test(Be)?"domain":"range"},Z.coercePosition=function(Be,Fe,Rt,Lt,Ut,Qt){var rr,Kt,Dt=Z.getRefType(Lt);if(Dt!=="range")rr=M.ensureNumber,Kt=Rt(Ut,Qt);else{var sr=Z.getFromId(Fe,Lt);Qt=sr.fraction2r(Qt),Kt=Rt(Ut,Qt),rr=sr.cleanPos}Be[Ut]=rr(Kt)},Z.cleanPosition=function(Be,Fe,Rt){var Lt=Rt==="paper"||Rt==="pixel"?M.ensureNumber:Z.getFromId(Fe,Rt).cleanPos;return Lt(Be)},Z.redrawComponents=function(Be,Fe){Fe=Fe||Z.listIds(Be);var Rt=Be._fullLayout;function Lt(Ut,Qt,rr,Kt){for(var Dt=L.getComponentMethod(Ut,Qt),sr={},fr=0;fr2e-6||((Rt-Be._forceTick0)/Be._minDtick%1+1.000001)%1>2e-6)&&(Be._minDtick=0))},Z.saveRangeInitial=function(Be,Fe){for(var Rt=Z.list(Be,"",!0),Lt=!1,Ut=0;Utvr*.3||sr(Lt)||sr(Ut))){var lr=Rt.dtick/2;Be+=Be+lrrr){var Kt=Number(Rt.substr(1));Qt.exactYears>rr&&Kt%12===0?Be=Z.tickIncrement(Be,"M6","reverse")+p*1.5:Qt.exactMonths>rr?Be=Z.tickIncrement(Be,"M1","reverse")+p*15.5:Be-=S;var Dt=Z.tickIncrement(Be,Rt);if(Dt<=Lt)return Dt}return Be}Z.prepMinorTicks=function(Be,Fe,Rt){if(!Fe.minor.dtick){delete Be.dtick;var Lt=Fe.dtick&&P(Fe._tmin),Ut;if(Lt){var Qt=Z.tickIncrement(Fe._tmin,Fe.dtick,!0);Ut=[Fe._tmin,Qt*.99+Fe._tmin*.01]}else{var rr=M.simpleMap(Fe.range,Fe.r2l);Ut=[rr[0],.8*rr[0]+.2*rr[1]]}if(Be.range=M.simpleMap(Ut,Fe.l2r),Be._isMinor=!0,Z.prepTicks(Be,Rt),Lt){var Kt=P(Fe.dtick),Dt=P(Be.dtick),sr=Kt?Fe.dtick:+Fe.dtick.substring(1),fr=Dt?Be.dtick:+Be.dtick.substring(1);Kt&&Dt?me(sr,fr)?sr===2*E&&fr===2*p&&(Be.dtick=E):sr===2*E&&fr===3*p?Be.dtick=E:sr===E&&!(Fe._input.minor||{}).nticks?Be.dtick=p:Le(sr/fr,2.5)?Be.dtick=sr/2:Be.dtick=sr:String(Fe.dtick).charAt(0)==="M"?Dt?Be.dtick="M1":me(sr,fr)?sr>=12&&fr===2&&(Be.dtick="M3"):Be.dtick=Fe.dtick:String(Be.dtick).charAt(0)==="L"?String(Fe.dtick).charAt(0)==="L"?me(sr,fr)||(Be.dtick=Le(sr/fr,2.5)?Fe.dtick/2:Fe.dtick):Be.dtick="D1":Be.dtick==="D2"&&+Fe.dtick>1&&(Be.dtick=1)}Be.range=Fe.range}Fe.minor._tick0Init===void 0&&(Be.tick0=Fe.tick0)};function me(Be,Fe){return Math.abs((Be/Fe+.5)%1-.5)<.001}function Le(Be,Fe){return Math.abs(Be/Fe-1)<.001}Z.prepTicks=function(Be,Fe){var Rt=M.simpleMap(Be.range,Be.r2l,void 0,void 0,Fe);if(Be.tickmode==="auto"||!Be.dtick){var Lt=Be.nticks,Ut;Lt||(Be.type==="category"||Be.type==="multicategory"?(Ut=Be.tickfont?M.bigFont(Be.tickfont.size||12):15,Lt=Be._length/Ut):(Ut=Be._id.charAt(0)==="y"?40:80,Lt=M.constrain(Be._length/Ut,4,9)+1),Be._name==="radialaxis"&&(Lt*=2)),Be.minor&&Be.minor.tickmode!=="array"||Be.tickmode==="array"&&(Lt*=100),Be._roughDTick=Math.abs(Rt[1]-Rt[0])/Lt,Z.autoTicks(Be,Be._roughDTick),Be._minDtick>0&&Be.dtick0?(Qt=Lt-1,rr=Lt):(Qt=Lt,rr=Lt);var Kt=Be[Qt].value,Dt=Be[rr].value,sr=Math.abs(Dt-Kt),fr=Rt||sr,vr=0;fr>=h?sr>=h&&sr<=l?vr=sr:vr=y:Rt===f&&fr>=n?sr>=n&&sr<=T?vr=sr:vr=f:fr>=b?sr>=b&&sr<=v?vr=sr:vr=m:Rt===E&&fr>=E?vr=E:fr>=p?vr=p:Rt===S&&fr>=S?vr=S:Rt===w&&fr>=w&&(vr=w);var lr;vr>=sr&&(vr=sr,lr=!0);var Or=Ut+vr;if(Fe.rangebreaks&&vr>0){for(var Sr=84,Ar=0,sn=0;snE&&(vr=sr)}(vr>0||Lt===0)&&(Be[Lt].periodX=Ut+vr/2)}}Z.calcTicks=function(Fe,Rt){for(var Lt=Fe.type,Ut=Fe.calendar,Qt=Fe.ticklabelstep,rr=Fe.ticklabelmode==="period",Kt=M.simpleMap(Fe.range,Fe.r2l,void 0,void 0,Rt),Dt=Kt[1]=(sn?0:1);Jr--){var bn=!Jr;Jr?(Fe._dtickInit=Fe.dtick,Fe._tick0Init=Fe.tick0):(Fe.minor._dtickInit=Fe.minor.dtick,Fe.minor._tick0Init=Fe.minor.tick0);var xn=Jr?Fe:M.extendFlat({},Fe,Fe.minor);if(bn?Z.prepMinorTicks(xn,Fe,Rt):Z.prepTicks(xn,Rt),xn.tickmode==="array"){Jr?(Sr=[],lr=ze(Fe,!bn)):(Ar=[],Or=ze(Fe,!bn));continue}if(xn.tickmode==="sync"){Sr=[],lr=_e(Fe);continue}var or=Y(Kt),Lr=or[0],Br=or[1],_r=P(xn.dtick),Qr=Lt==="log"&&!(_r||xn.dtick.charAt(0)==="L"),un=Z.tickFirst(xn,Rt);if(Jr){if(Fe._tmin=un,un=Br:Mn<=Br;Mn=Z.tickIncrement(Mn,sa,Dt,Ut)){if(Jr&&Dn++,xn.rangebreaks&&!Dt){if(Mn=fr)break}if(Sr.length>vr||Mn===ln)break;ln=Mn;var na={value:Mn};Jr?(Qr&&Mn!==(Mn|0)&&(na.simpleLabel=!0),Qt>1&&Dn%Qt&&(na.skipLabel=!0),Sr.push(na)):(na.minor=!0,Ar.push(na))}}if(sn){var Jn=Fe.minor.ticks==="inside"&&Fe.ticks==="outside"||Fe.minor.ticks==="outside"&&Fe.ticks==="inside";if(!Jn){for(var aa=Sr.map(function(an){return an.value}),pr=[],$r=0;$r-1;gn--){if(Sr[gn].drop){Sr.splice(gn,1);continue}Sr[gn].value=It(Sr[gn].value,Fe);var Ma=Fe.c2p(Sr[gn].value);(In?ua>Ma-Gn:uafr||Drfr&&(yr.periodX=fr),DrUt&&lry)Fe/=y,Lt=Ut(10),Be.dtick="M"+12*it(Fe,Lt,Ie);else if(Qt>m)Fe/=m,Be.dtick="M"+it(Fe,1,Ne);else if(Qt>p){if(Be.dtick=it(Fe,p,Be._hasDayOfWeekBreaks?[1,2,7,14]:st),!Rt){var rr=Z.getTickFormat(Be),Kt=Be.ticklabelmode==="period";Kt&&(Be._rawTick0=Be.tick0),/%[uVW]/.test(rr)?Be.tick0=M.dateTick0(Be.calendar,2):Be.tick0=M.dateTick0(Be.calendar,1),Kt&&(Be._dowTick0=Be.tick0)}}else Qt>w?Be.dtick=it(Fe,w,Ne):Qt>i?Be.dtick=it(Fe,i,et):Qt>C?Be.dtick=it(Fe,C,et):(Lt=Ut(10),Be.dtick=it(Fe,Lt,Ie))}else if(Be.type==="log"){Be.tick0=0;var Dt=M.simpleMap(Be.range,Be.r2l);if(Be._isMinor&&(Fe*=1.5),Fe>.7)Be.dtick=Math.ceil(Fe);else if(Math.abs(Dt[1]-Dt[0])<1){var sr=1.5*Math.abs((Dt[1]-Dt[0])/Fe);Fe=Math.abs(Math.pow(10,Dt[1])-Math.pow(10,Dt[0]))/sr,Lt=Ut(10),Be.dtick="L"+it(Fe,Lt,Ie)}else Be.dtick=Fe>.3?"D2":"D1"}else Be.type==="category"||Be.type==="multicategory"?(Be.tick0=0,Be.dtick=Math.ceil(Math.max(Fe,1))):_t(Be)?(Be.tick0=0,Lt=1,Be.dtick=it(Fe,Lt,nt)):(Be.tick0=0,Lt=Ut(10),Be.dtick=it(Fe,Lt,Ie));if(Be.dtick===0&&(Be.dtick=1),!P(Be.dtick)&&typeof Be.dtick!="string"){var fr=Be.dtick;throw Be.dtick=1,"ax.dtick error: "+String(fr)}};function lt(Be){var Fe=Be.dtick;if(Be._tickexponent=0,!P(Fe)&&typeof Fe!="string"&&(Fe=1),(Be.type==="category"||Be.type==="multicategory")&&(Be._tickround=null),Be.type==="date"){var Rt=Be.r2l(Be.tick0),Lt=Be.l2r(Rt).replace(/(^-|i)/g,""),Ut=Lt.length;if(String(Fe).charAt(0)==="M")Ut>10||Lt.substr(5)!=="01-01"?Be._tickround="d":Be._tickround=+Fe.substr(1)%12===0?"y":"m";else if(Fe>=p&&Ut<=10||Fe>=p*15)Be._tickround="d";else if(Fe>=i&&Ut<=16||Fe>=w)Be._tickround="M";else if(Fe>=C&&Ut<=19||Fe>=i)Be._tickround="S";else{var Qt=Be.l2r(Rt+Fe).replace(/^-/,"").length;Be._tickround=Math.max(Ut,Qt)-20,Be._tickround<0&&(Be._tickround=4)}}else if(P(Fe)||Fe.charAt(0)==="L"){var rr=Be.range.map(Be.r2d||Number);P(Fe)||(Fe=Number(Fe.substr(1))),Be._tickround=2-Math.floor(Math.log(Fe)/Math.LN10+.01);var Kt=Math.max(Math.abs(rr[0]),Math.abs(rr[1])),Dt=Math.floor(Math.log(Kt)/Math.LN10+.01),sr=Be.minexponent===void 0?3:Be.minexponent;Math.abs(Dt)>sr&&(pe(Be.exponentformat)&&!Te(Dt)?Be._tickexponent=3*Math.round((Dt-1)/3):Be._tickexponent=Dt)}else Be._tickround=null}Z.tickIncrement=function(Be,Fe,Rt,Lt){var Ut=Rt?-1:1;if(P(Fe))return M.increment(Be,Ut*Fe);var Qt=Fe.charAt(0),rr=Ut*Number(Fe.substr(1));if(Qt==="M")return M.incrementMonth(Be,rr,Lt);if(Qt==="L")return Math.log(Math.pow(10,Be)+rr)/Math.LN10;if(Qt==="D"){var Kt=Fe==="D2"?Ke:Ze,Dt=Be+Ut*.01,sr=M.roundUp(M.mod(Dt,1),Kt,Rt);return Math.floor(Dt)+Math.log(A.round(Math.pow(10,sr),1))/Math.LN10}throw"unrecognized dtick "+String(Fe)},Z.tickFirst=function(Be,Fe){var Rt=Be.r2l||Number,Lt=M.simpleMap(Be.range,Rt,void 0,void 0,Fe),Ut=Lt[1]=0&&Jr<=Be._length?sn:null};if(Qt&&M.isArrayOrTypedArray(Be.ticktext)){var vr=M.simpleMap(Be.range,Be.r2l),lr=(Math.abs(vr[1]-vr[0])-(Be._lBreaks||0))/1e4;for(sr=0;sr"+Kt;else{var sr=Gt(Be),fr=Be._trueSide||Be.side;(!sr&&fr==="top"||sr&&fr==="bottom")&&(rr+="
")}Fe.text=rr}function Je(Be,Fe,Rt,Lt,Ut){var Qt=Be.dtick,rr=Fe.x,Kt=Be.tickformat,Dt=typeof Qt=="string"&&Qt.charAt(0);if(Ut==="never"&&(Ut=""),Lt&&Dt!=="L"&&(Qt="L3",Dt="L"),Kt||Dt==="L")Fe.text=be(Math.pow(10,rr),Be,Ut,Lt);else if(P(Qt)||Dt==="D"&&M.mod(rr+.01,1)<.1){var sr=Math.round(rr),fr=Math.abs(sr),vr=Be.exponentformat;vr==="power"||pe(vr)&&Te(sr)?(sr===0?Fe.text=1:sr===1?Fe.text="10":Fe.text="10"+(sr>1?"":x)+fr+"",Fe.fontSize*=1.25):(vr==="e"||vr==="E")&&fr>2?Fe.text="1"+vr+(sr>0?"+":x)+fr:(Fe.text=be(Math.pow(10,rr),Be,"","fakehover"),Qt==="D1"&&Be._id.charAt(0)==="y"&&(Fe.dy-=Fe.fontSize/6))}else if(Dt==="D")Fe.text=String(Math.round(Math.pow(10,M.mod(rr,1)))),Fe.fontSize*=.75;else throw"unrecognized dtick "+String(Qt);if(Be.dtick==="D1"){var lr=String(Fe.text).charAt(0);(lr==="0"||lr==="1")&&(Be._id.charAt(0)==="y"?Fe.dx-=Fe.fontSize/4:(Fe.dy+=Fe.fontSize/2,Fe.dx+=(Be.range[1]>Be.range[0]?1:-1)*Fe.fontSize*(rr<0?.5:.25)))}}function Pe(Be,Fe){var Rt=Be._categories[Math.round(Fe.x)];Rt===void 0&&(Rt=""),Fe.text=String(Rt)}function Ue(Be,Fe,Rt){var Lt=Math.round(Fe.x),Ut=Be._categories[Lt]||[],Qt=Ut[1]===void 0?"":String(Ut[1]),rr=Ut[0]===void 0?"":String(Ut[0]);Rt?Fe.text=rr+" - "+Qt:(Fe.text=Qt,Fe.text2=rr)}function He(Be,Fe,Rt,Lt,Ut){Ut==="never"?Ut="":Be.showexponent==="all"&&Math.abs(Fe.x/Be.dtick)<1e-6&&(Ut="hide"),Fe.text=be(Fe.x,Be,Ut,Lt)}function Oe(Be,Fe,Rt,Lt,Ut){if(Be.thetaunit==="radians"&&!Rt){var Qt=Fe.x/180;if(Qt===0)Fe.text="0";else{var rr=Ce(Qt);if(rr[1]>=100)Fe.text=be(M.deg2rad(Fe.x),Be,Ut,Lt);else{var Kt=Fe.x<0;rr[1]===1?rr[0]===1?Fe.text="π":Fe.text=rr[0]+"π":Fe.text=["",rr[0],"","⁄","",rr[1],"","π"].join(""),Kt&&(Fe.text=x+Fe.text)}}}else Fe.text=be(Fe.x,Be,Ut,Lt)}function Ce(Be){function Fe(Kt,Dt){return Math.abs(Kt-Dt)<=1e-6}function Rt(Kt,Dt){return Fe(Dt,0)?Kt:Rt(Dt,Kt%Dt)}function Lt(Kt){for(var Dt=1;!Fe(Math.round(Kt*Dt)/Dt,Kt);)Dt*=10;return Dt}var Ut=Lt(Be),Qt=Be*Ut,rr=Math.abs(Rt(Qt,Ut));return[Math.round(Qt/rr),Math.round(Ut/rr)]}var ge=["f","p","n","μ","m","","k","M","G","T"];function pe(Be){return Be==="SI"||Be==="B"}function Te(Be){return Be>14||Be<-15}function be(Be,Fe,Rt,Lt){var Ut=Be<0,Qt=Fe._tickround,rr=Rt||Fe.exponentformat||"B",Kt=Fe._tickexponent,Dt=Z.getTickFormat(Fe),sr=Fe.separatethousands;if(Lt){var fr={exponentformat:rr,minexponent:Fe.minexponent,dtick:Fe.showexponent==="none"?Fe.dtick:P(Be)&&Math.abs(Be)||1,range:Fe.showexponent==="none"?Fe.range.map(Fe.r2d):[0,Be||1]};lt(fr),Qt=(Number(fr._tickround)||0)+4,Kt=fr._tickexponent,Fe.hoverformat&&(Dt=Fe.hoverformat)}if(Dt)return Fe._numFormat(Dt)(Be).replace(/-/g,x);var vr=Math.pow(10,-Qt)/2;if(rr==="none"&&(Kt=0),Be=Math.abs(Be),Be"+Sr+"":rr==="B"&&Kt===9?Be+="B":pe(rr)&&(Be+=ge[Kt/3+5])}return Ut?x+Be:Be}Z.getTickFormat=function(Be){var Fe;function Rt(Dt){return typeof Dt!="string"?Dt:Number(Dt.replace("M",""))*m}function Lt(Dt,sr){var fr=["L","D"];if(typeof Dt==typeof sr){if(typeof Dt=="number")return Dt-sr;var vr=fr.indexOf(Dt.charAt(0)),lr=fr.indexOf(sr.charAt(0));return vr===lr?Number(Dt.replace(/(L|D)/g,""))-Number(sr.replace(/(L|D)/g,"")):vr-lr}else return typeof Dt=="number"?1:-1}function Ut(Dt,sr,fr){var vr=fr,lr=sr[0],Or=sr[1];return(!lr&&typeof lr!="number"||vr(lr)<=vr(Dt))&&(!Or&&typeof Or!="number"||vr(Or)>=vr(Dt))}function Qt(Dt,sr){var fr=sr[0]===null,vr=sr[1]===null,lr=Lt(Dt,sr[0])>=0,Or=Lt(Dt,sr[1])<=0;return(fr||lr)&&(vr||Or)}var rr,Kt;if(Be.tickformatstops&&Be.tickformatstops.length>0)switch(Be.type){case"date":case"linear":{for(Fe=0;Fe=0&&Ut.unshift(Ut.splice(fr,1).shift())}});var Kt={false:{left:0,right:0}};return M.syncOrAsync(Ut.map(function(Dt){return function(){if(Dt){var sr=Z.getFromId(Be,Dt);Rt||(Rt={}),Rt.axShifts=Kt,Rt.overlayingShiftedAx=rr;var fr=Z.drawOne(Be,sr,Rt);return sr._shiftPusher&&ar(sr,sr._fullDepth||0,Kt,!0),sr._r=sr.range.slice(),sr._rl=M.simpleMap(sr._r,sr.r2l),fr}}}))},Z.drawOne=function(Be,Fe,Rt){Rt=Rt||{};var Lt=Rt.axShifts||{},Ut=Rt.overlayingShiftedAx||[],Qt,rr,Kt;Fe.setScale();var Dt=Be._fullLayout,sr=Fe._id,fr=sr.charAt(0),vr=Z.counterLetter(sr),lr=Dt._plots[Fe._mainSubplot];if(!lr)return;if(Fe._shiftPusher=Fe.autoshift||Ut.indexOf(Fe._id)!==-1||Ut.indexOf(Fe.overlaying)!==-1,Fe._shiftPusher&Fe.anchor==="free"){var Or=Fe.linewidth/2||0;Fe.ticks==="inside"&&(Or+=Fe.ticklen),ar(Fe,Or,Lt,!0),ar(Fe,Fe.shift||0,Lt,!1)}(Rt.skipTitle!==!0||Fe._shift===void 0)&&(Fe._shift=ir(Fe,Lt));var Sr=lr[fr+"axislayer"],Ar=Fe._mainLinePosition,sn=Ar+=Fe._shift,Jr=Fe._mainMirrorPosition,bn=Fe._vals=Z.calcTicks(Fe),xn=[Fe.mirror,sn,Jr].join("_");for(Qt=0;Qt0?Tn.bottom-dn:0,wn))));var $n=0,la=0;if(Fe._shiftPusher&&($n=Math.max(wn,Tn.height>0?zr==="l"?dn-Tn.left:Tn.right-dn:0),Fe.title.text!==Dt._dfltTitle[fr]&&(la=(Fe._titleStandoff||0)+(Fe._titleScoot||0),zr==="l"&&(la+=Yt(Fe))),Fe._fullDepth=Math.max($n,la)),Fe.automargin){kn={x:0,y:0,r:0,l:0,t:0,b:0};var ba=[0,1],ni=typeof Fe._shift=="number"?Fe._shift:0;if(fr==="x"){if(zr==="b"?kn[zr]=Fe._depth:(kn[zr]=Fe._depth=Math.max(Tn.width>0?dn-Tn.top:0,wn),ba.reverse()),Tn.width>0){var Xa=Tn.right-(Fe._offset+Fe._length);Xa>0&&(kn.xr=1,kn.r=Xa);var uo=Fe._offset-Tn.left;uo>0&&(kn.xl=0,kn.l=uo)}}else if(zr==="l"?(Fe._depth=Math.max(Tn.height>0?dn-Tn.left:0,wn),kn[zr]=Fe._depth-ni):(Fe._depth=Math.max(Tn.height>0?Tn.right-dn:0,wn),kn[zr]=Fe._depth+ni,ba.reverse()),Tn.height>0){var ao=Tn.bottom-(Fe._offset+Fe._length);ao>0&&(kn.yb=0,kn.b=ao);var Oi=Fe._offset-Tn.top;Oi>0&&(kn.yt=1,kn.t=Oi)}kn[vr]=Fe.anchor==="free"?Fe.position:Fe._anchorAxis.domain[ba[0]],Fe.title.text!==Dt._dfltTitle[fr]&&(kn[zr]+=Yt(Fe)+(Fe.title.standoff||0)),Fe.mirror&&Fe.anchor!=="free"&&(Pn={x:0,y:0,r:0,l:0,t:0,b:0},Pn[Yr]=Fe.linewidth,Fe.mirror&&Fe.mirror!==!0&&(Pn[Yr]+=wn),Fe.mirror===!0||Fe.mirror==="ticks"?Pn[vr]=Fe._anchorAxis.domain[ba[1]]:(Fe.mirror==="all"||Fe.mirror==="allticks")&&(Pn[vr]=[Fe._counterDomainMin,Fe._counterDomainMax][ba[1]]))}Vr&&(fa=L.getComponentMethod("rangeslider","autoMarginOpts")(Be,Fe)),typeof Fe.automargin=="string"&&(ke(kn,Fe.automargin),ke(Pn,Fe.automargin)),o.autoMargin(Be,er(Fe),kn),o.autoMargin(Be,ct(Fe),Pn),o.autoMargin(Be,qe(Fe),fa)}),M.syncOrAsync(en)}};function ke(Be,Fe){if(Be){var Rt=Object.keys(F).reduce(function(Lt,Ut){return Fe.indexOf(Ut)!==-1&&F[Ut].forEach(function(Qt){Lt[Qt]=1}),Lt},{});Object.keys(Be).forEach(function(Lt){Rt[Lt]||(Lt.length===1?Be[Lt]=0:delete Be[Lt])})}}function Ve(Be,Fe){var Rt=[],Lt,Ut=function(Qt,rr){var Kt=Qt.xbnd[rr];Kt!==null&&Rt.push(M.extendFlat({},Qt,{x:Kt}))};if(Fe.length){for(Lt=0;Lt60?-.5*sa:Be.side==="top"!==fr?-sa:0};else if(_r==="y"){if(un=!fr&&Br==="left"||fr&&Br==="right",or=un?1:-1,fr&&(or*=-1),Jr=lr,bn=Or*or,xn=0,!fr&&Math.abs(Qr)===90&&(Qr===-90&&Br==="left"||Qr===90&&Br==="right"?xn=j:xn=.5),fr){var ln=P(Qr)?+Qr:0;if(ln!==0){var Mn=M.deg2rad(ln);Lr=Math.abs(Math.sin(Mn))*j*or,xn=0}}sn.xFn=function(Dn){return Dn.dx+Fe-(Jr+Dn.fontSize*xn)*or+Lr*Dn.fontSize},sn.yFn=function(Dn){return Dn.dy+bn+Dn.fontSize*V},sn.anchorFn=function(Dn,Kn){return P(Kn)&&Math.abs(Kn)===90?"middle":un?"end":"start"},sn.heightFn=function(Dn,Kn,sa){return Be.side==="right"&&(Kn*=-1),Kn<-30?-sa:Kn<30?-.5*sa:0}}return sn};function gt(Be){return[Be.text,Be.x,Be.axInfo,Be.font,Be.fontSize,Be.fontColor].join("_")}Z.drawTicks=function(Be,Fe,Rt){Rt=Rt||{};var Lt=Fe._id+"tick",Ut=[].concat(Fe.minor&&Fe.minor.ticks?Rt.vals.filter(function(rr){return rr.minor&&!rr.noTick}):[]).concat(Fe.ticks?Rt.vals.filter(function(rr){return!rr.minor&&!rr.noTick}):[]),Qt=Rt.layer.selectAll("path."+Lt).data(Ut,gt);Qt.exit().remove(),Qt.enter().append("path").classed(Lt,1).classed("ticks",1).classed("crisp",Rt.crisp!==!1).each(function(rr){return t.stroke(A.select(this),rr.minor?Fe.minor.tickcolor:Fe.tickcolor)}).style("stroke-width",function(rr){return s.crispRound(Be,rr.minor?Fe.minor.tickwidth:Fe.tickwidth,1)+"px"}).attr("d",Rt.path).style("display",null),nr(Fe,[z]),Qt.attr("transform",Rt.transFn)},Z.drawGrid=function(Be,Fe,Rt){if(Rt=Rt||{},Fe.tickmode!=="sync"){var Lt=Fe._id+"grid",Ut=Fe.minor&&Fe.minor.showgrid,Qt=Ut?Rt.vals.filter(function(Jr){return Jr.minor}):[],rr=Fe.showgrid?Rt.vals.filter(function(Jr){return!Jr.minor}):[],Kt=Rt.counterAxis;if(Kt&&Z.shouldShowZeroLine(Be,Fe,Kt))for(var Dt=Fe.tickmode==="array",sr=0;sr=0;Sr--){var Ar=Sr?lr:Or;if(Ar){var sn=Ar.selectAll("path."+Lt).data(Sr?rr:Qt,gt);sn.exit().remove(),sn.enter().append("path").classed(Lt,1).classed("crisp",Rt.crisp!==!1),sn.attr("transform",Rt.transFn).attr("d",Rt.path).each(function(Jr){return t.stroke(A.select(this),Jr.minor?Fe.minor.gridcolor:Fe.gridcolor||"#ddd")}).style("stroke-dasharray",function(Jr){return s.dashStyle(Jr.minor?Fe.minor.griddash:Fe.griddash,Jr.minor?Fe.minor.gridwidth:Fe.gridwidth)}).style("stroke-width",function(Jr){return(Jr.minor?vr:Fe._gw)+"px"}).style("display",null),typeof Rt.path=="function"&&sn.attr("d",Rt.path)}}nr(Fe,[B,_])}},Z.drawZeroLine=function(Be,Fe,Rt){Rt=Rt||Rt;var Lt=Fe._id+"zl",Ut=Z.shouldShowZeroLine(Be,Fe,Rt.counterAxis),Qt=Rt.layer.selectAll("path."+Lt).data(Ut?[{x:0,id:Fe._id}]:[]);Qt.exit().remove(),Qt.enter().append("path").classed(Lt,1).classed("zl",1).classed("crisp",Rt.crisp!==!1).each(function(){Rt.layer.selectAll("path").sort(function(rr,Kt){return H(rr.id,Kt.id)})}),Qt.attr("transform",Rt.transFn).attr("d",Rt.path).call(t.stroke,Fe.zerolinecolor||t.defaultLine).style("stroke-width",s.crispRound(Be,Fe.zerolinewidth,Fe._gw||1)+"px").style("display",null),nr(Fe,[I])},Z.drawLabels=function(Be,Fe,Rt){Rt=Rt||{};var Lt=Be._fullLayout,Ut=Fe._id,Qt=Rt.cls||Ut+"tick",rr=Rt.vals.filter(function(pr){return pr.text}),Kt=Rt.labelFns,Dt=Rt.secondary?0:Fe.tickangle,sr=(Fe._prevTickAngles||{})[Qt],fr=Rt.layer.selectAll("g."+Qt).data(Fe.showticklabels?rr:[],gt),vr=[];fr.enter().append("g").classed(Qt,1).append("text").attr("text-anchor","middle").each(function(pr){var $r=A.select(this),Xr=Be._promises.length;$r.call(g.positionText,Kt.xFn(pr),Kt.yFn(pr)).call(s.font,pr.font,pr.fontSize,pr.fontColor).text(pr.text).call(g.convertToTspans,Be),Be._promises[Xr]?vr.push(Be._promises.pop().then(function(){lr($r,Dt)})):lr($r,Dt)}),nr(Fe,[O]),fr.exit().remove(),Rt.repositionOnUpdate&&fr.each(function(pr){A.select(this).select("text").call(g.positionText,Kt.xFn(pr),Kt.yFn(pr))});function lr(pr,$r){pr.each(function(Xr){var fn=A.select(this),zn=fn.select(".text-math-group"),pn=Kt.anchorFn(Xr,$r),gn=Rt.transFn.call(fn.node(),Xr)+(P($r)&&+$r!=0?" rotate("+$r+","+Kt.xFn(Xr)+","+(Kt.yFn(Xr)-Xr.fontSize/2)+")":""),In=g.lineCount(fn),Gn=$*Xr.fontSize,ua=Kt.heightFn(Xr,P($r)?+$r:0,(In-1)*Gn);if(ua&&(gn+=d(0,ua)),zn.empty()){var Ma=fn.select("text");Ma.attr({transform:gn,"text-anchor":pn}),Ma.style("opacity",1),Fe._adjustTickLabelsOverflow&&Fe._adjustTickLabelsOverflow()}else{var xr=s.bBox(zn.node()).width,Rr=xr*{end:-.5,start:.5}[pn];zn.attr("transform",gn+d(Rr,0))}})}Fe._adjustTickLabelsOverflow=function(){var pr=Fe.ticklabeloverflow;if(!(!pr||pr==="allow")){var $r=pr.indexOf("hide")!==-1,Xr=Fe._id.charAt(0)==="x",fn=0,zn=Xr?Be._fullLayout.width:Be._fullLayout.height;if(pr.indexOf("domain")!==-1){var pn=M.simpleMap(Fe.range,Fe.r2l);fn=Fe.l2p(pn[0])+Fe._offset,zn=Fe.l2p(pn[1])+Fe._offset}var gn=Math.min(fn,zn),In=Math.max(fn,zn),Gn=Fe.side,ua=1/0,Ma=-1/0;fr.each(function(Dr){var vn=A.select(this),En=vn.select(".text-math-group");if(En.empty()){var an=s.bBox(vn.node()),en=0;Xr?(an.right>In||an.leftIn||an.top+(Fe.tickangle?0:Dr.fontSize/4)Fe["_visibleLabelMin_"+pn._id]?Dr.style("display","none"):In.K==="tick"&&!gn&&Dr.style("display",null)})})})})},lr(fr,sr+1?sr:Dt);function Or(){return vr.length&&Promise.all(vr)}var Sr=null;function Ar(){if(lr(fr,Dt),rr.length&&Fe.autotickangles&&(Fe.type!=="log"||String(Fe.dtick).charAt(0)!=="D")){Sr=Fe.autotickangles[0];var pr=0,$r=[],Xr,fn=1;if(fr.each(function(wn){pr=Math.max(pr,wn.fontSize);var Tn=Fe.l2p(wn.x),kn=cr(this),Pn=s.bBox(kn.node());fn=Math.max(fn,g.lineCount(kn)),$r.push({top:0,bottom:10,height:10,left:Tn-Pn.width/2,right:Tn+Pn.width/2+2,width:Pn.width+2})}),(Fe.tickson==="boundaries"||Fe.showdividers)&&!Rt.secondary){var zn=2;for(Fe.ticks&&(zn+=Fe.tickwidth/2),Xr=0;Xr<$r.length;Xr++){var pn=rr[Xr].xbnd,gn=$r[Xr];if(pn[0]!==null&&gn.left-Fe.l2p(pn[0])na*sa&&(Mn=sa,Qr[_r]=un[_r]=Dn[_r])}var Jn=Math.abs(Mn-ln);Jn-or>0?(Jn-=or,or*=1+or/Jn):or=0,Fe._id.charAt(0)!=="y"&&(or=-or),Qr[Br]=bn.p2r(bn.r2p(un[Br])+Lr*or),bn.autorange==="min"||bn.autorange==="max reversed"?(Qr[0]=null,bn._rangeInitial0=void 0,bn._rangeInitial1=void 0):(bn.autorange==="max"||bn.autorange==="min reversed")&&(Qr[1]=null,bn._rangeInitial0=void 0,bn._rangeInitial1=void 0),Lt._insideTickLabelsUpdaterange[bn._name+".range"]=Qr}var aa=M.syncOrAsync(sn);return aa&&aa.then&&Be._promises.push(aa),aa};function Ct(Be,Fe,Rt){var Lt=Fe._id+"divider",Ut=Rt.vals,Qt=Rt.layer.selectAll("path."+Lt).data(Ut,gt);Qt.exit().remove(),Qt.enter().insert("path",":first-child").classed(Lt,1).classed("crisp",1).call(t.stroke,Fe.dividercolor).style("stroke-width",s.crispRound(Be,Fe.dividerwidth,1)+"px"),Qt.attr("transform",Rt.transFn).attr("d",Rt.path)}Z.getPxPosition=function(Be,Fe){var Rt=Be._fullLayout._size,Lt=Fe._id.charAt(0),Ut=Fe.side,Qt;if(Fe.anchor!=="free"?Qt=Fe._anchorAxis:Lt==="x"?Qt={_offset:Rt.t+(1-(Fe.position||0))*Rt.h,_length:0}:Lt==="y"&&(Qt={_offset:Rt.l+(Fe.position||0)*Rt.w+Fe._shift,_length:0}),Ut==="top"||Ut==="left")return Qt._offset;if(Ut==="bottom"||Ut==="right")return Qt._offset+Qt._length};function Yt(Be){var Fe=Be.title.font.size,Rt=(Be.title.text.match(g.BR_TAG_ALL)||[]).length;return Be.title.hasOwnProperty("standoff")?Rt?Fe*(j+Rt*$):Fe*j:Rt?Fe*(Rt+1)*$:Fe}function gr(Be,Fe){var Rt=Be._fullLayout,Lt=Fe._id,Ut=Lt.charAt(0),Qt=Fe.title.font.size,rr;if(Fe.title.hasOwnProperty("standoff"))rr=Fe._depth+Fe.title.standoff+Yt(Fe);else{var Kt=Gt(Fe);if(Fe.type==="multicategory")rr=Fe._depth;else{var Dt=1.5*Qt;Kt&&(Dt=.5*Qt,Fe.ticks==="outside"&&(Dt+=Fe.ticklen)),rr=10+Dt+(Fe.linewidth?Fe.linewidth-1:0)}Kt||(Ut==="x"?rr+=Fe.side==="top"?Qt*(Fe.showticklabels?1:0):Qt*(Fe.showticklabels?1.5:.5):rr+=Fe.side==="right"?Qt*(Fe.showticklabels?1:.5):Qt*(Fe.showticklabels?.5:0))}var sr=Z.getPxPosition(Be,Fe),fr,vr,lr;Ut==="x"?(vr=Fe._offset+Fe._length/2,lr=Fe.side==="top"?sr-rr:sr+rr):(lr=Fe._offset+Fe._length/2,vr=Fe.side==="right"?sr+rr:sr-rr,fr={rotate:"-90",offset:0});var Or;if(Fe.type!=="multicategory"){var Sr=Fe._selections[Fe._id+"tick"];if(Or={selection:Sr,side:Fe.side},Sr&&Sr.node()&&Sr.node().parentNode){var Ar=s.getTranslate(Sr.node().parentNode);Or.offsetLeft=Ar.x,Or.offsetTop=Ar.y}Fe.title.hasOwnProperty("standoff")&&(Or.pad=0)}return Fe._titleStandoff=rr,r.draw(Be,Lt+"title",{propContainer:Fe,propName:Fe._name+".title.text",placeholder:Rt._dfltTitle[Ut],avoid:Or,transform:fr,attributes:{x:vr,y:lr,"text-anchor":"middle"}})}Z.shouldShowZeroLine=function(Be,Fe,Rt){var Lt=M.simpleMap(Fe.range,Fe.r2l);return Lt[0]*Lt[1]<=0&&Fe.zeroline&&(Fe.type==="linear"||Fe.type==="-")&&!(Fe.rangebreaks&&Fe.maskBreaks(0)===k)&&(ht(Fe,0)||!Ht(Be,Fe,Rt,Lt)||Wt(Be,Fe))},Z.clipEnds=function(Be,Fe){return Fe.filter(function(Rt){return ht(Be,Rt.x)})};function ht(Be,Fe){var Rt=Be.l2p(Fe);return Rt>1&&Rt1)for(Ut=1;Ut=Ut.min&&Ben*2}function a(l){return Math.max(1,(l-1)/1e3)}function c(l,y){for(var h=l.length,T=a(h),f=0,n=0,v={},m=0;mf*2}function u(l){return L(l[0])&&L(l[1])}},28336:function(te,X,e){var A=e(38248),P=e(24040),o=e(3400),L=e(31780),M=e(51272),d=e(94724),g=e(26332),r=e(25404),t=e(95936),s=e(42568),a=e(22416),c=e(42136),u=e(96312),l=e(78344),y=e(33816).WEEKDAY_PATTERN,h=e(33816).HOUR_PATTERN;te.exports=function(m,b,E,p,S){var w=p.letter,i=p.font||{},C=p.splomStash||{},x=E("visible",!p.visibleDflt),k=b._template||{},I=b.type||k.type||"-",B;if(I==="date"){var _=P.getComponentMethod("calendars","handleDefaults");_(m,b,"calendar",p.calendar),p.noTicklabelmode||(B=E("ticklabelmode"))}var z="";(!p.noTicklabelposition||I==="multicategory")&&(z=o.coerce(m,b,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:B==="period"?["outside","inside"]:w==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),p.noTicklabeloverflow||E("ticklabeloverflow",z.indexOf("inside")!==-1?"hide past domain":I==="category"||I==="multicategory"?"allow":"hide past div"),l(b,S),u(m,b,E,p),a(m,b,E,p),I!=="category"&&!p.noHover&&E("hoverformat");var O=E("color"),F=O!==d.color.dflt?O:i.color,N=C.label||S._dfltTitle[w];if(s(m,b,E,I,p),!x)return b;E("title.text",N),o.coerceFont(E,"title.font",{family:i.family,size:o.bigFont(i.size),color:F}),g(m,b,E,I);var V=p.hasMinor;if(V&&(L.newContainer(b,"minor"),g(m,b,E,I,{isMinor:!0})),t(m,b,E,I,p),r(m,b,E,p),V){var j=p.isMinor;p.isMinor=!0,r(m,b,E,p),p.isMinor=j}c(m,b,E,{dfltColor:O,bgColor:p.bgColor,showGrid:p.showGrid,hasMinor:V,attributes:d}),V&&!b.minor.ticks&&!b.minor.showgrid&&delete b.minor,(b.showline||b.ticks)&&E("mirror");var $=I==="multicategory";if(!p.noTickson&&(I==="category"||$)&&(b.ticks||b.showgrid)){var q;$&&(q="boundaries");var oe=E("tickson",q);oe==="boundaries"&&delete b.ticklabelposition}if($){var Z=E("showdividers");Z&&(E("dividercolor"),E("dividerwidth"))}if(I==="date")if(M(m,b,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:T}),!b.rangebreaks.length)delete b.rangebreaks;else{for(var G=0;G=2){var w="",i,C;if(S.length===2){for(i=0;i<2;i++)if(C=n(S[i]),C){w=y;break}}var x=E("pattern",w);if(x===y)for(i=0;i<2;i++)C=n(S[i]),C&&(m.bounds[i]=S[i]=C-1);if(x)for(i=0;i<2;i++)switch(C=S[i],x){case y:if(!A(C)){m.enabled=!1;return}if(C=+C,C!==Math.floor(C)||C<0||C>=7){m.enabled=!1;return}m.bounds[i]=S[i]=C;break;case h:if(!A(C)){m.enabled=!1;return}if(C=+C,C<0||C>24){m.enabled=!1;return}m.bounds[i]=S[i]=C;break}if(b.autorange===!1){var k=b.range;if(k[0]k[1]){m.enabled=!1;return}}else if(S[0]>k[0]&&S[1]g?1:-1:+(L.substr(1)||1)-+(M.substr(1)||1)},X.ref2id=function(L){return/^[xyz]/.test(L)?L.split(" ")[0]:!1};function o(L,M){if(M&&M.length){for(var d=0;d0||A(r),s;t&&(s="array");var a=d("categoryorder",s),c;a==="array"&&(c=d("categoryarray")),!t&&a==="array"&&(a=M.categoryorder="trace"),a==="trace"?M._initialCategories=[]:a==="array"?M._initialCategories=c.slice():(c=P(M,g).sort(),a==="category ascending"?M._initialCategories=c:a==="category descending"&&(M._initialCategories=c.reverse()))}}},98728:function(te,X,e){var A=e(38248),P=e(3400),o=e(39032),L=o.ONEDAY,M=o.ONEWEEK;X.dtick=function(d,g){var r=g==="log",t=g==="date",s=g==="category",a=t?L:1;if(!d)return a;if(A(d))return d=Number(d),d<=0?a:s?Math.max(1,Math.round(d)):t?Math.max(.1,d):d;if(typeof d!="string"||!(t||r))return a;var c=d.charAt(0),u=d.substr(1);return u=A(u)?Number(u):0,u<=0||!(t&&c==="M"&&u===Math.round(u)||r&&c==="L"||r&&c==="D"&&(u===1||u===2))?a:d},X.tick0=function(d,g,r,t){if(g==="date")return P.cleanDate(d,P.dateTick0(r,t%M===0?1:0));if(!(t==="D1"||t==="D2"))return A(d)?Number(d):0}},33816:function(te,X,e){var A=e(53756).counter;te.exports={idRegex:{x:A("x","( domain)?"),y:A("y","( domain)?")},attrRegex:A("[xy]axis"),xAxisMatch:A("xaxis"),yAxisMatch:A("yaxis"),AX_ID_PATTERN:/^[xyz][0-9]*( domain)?$/,AX_NAME_PATTERN:/^[xyz]axis[0-9]*$/,SUBPLOT_PATTERN:/^x([0-9]*)y([0-9]*)$/,HOUR_PATTERN:"hour",WEEKDAY_PATTERN:"day of week",MINDRAG:8,MINZOOM:20,DRAGGERSIZE:20,REDRAWDELAY:50,DFLTRANGEX:[-1,6],DFLTRANGEY:[-1,4],traceLayerClasses:["imagelayer","heatmaplayer","contourcarpetlayer","contourlayer","funnellayer","waterfalllayer","barlayer","carpetlayer","violinlayer","boxlayer","ohlclayer","scattercarpetlayer","scatterlayer"],clipOnAxisFalseQuery:[".scatterlayer",".barlayer",".funnellayer",".waterfalllayer"],layerValue2layerClass:{"above traces":"above","below traces":"below"}}},71888:function(te,X,e){var A=e(3400),P=e(19280),o=e(79811).id2name,L=e(94724),M=e(21160),d=e(78344),g=e(39032).ALMOST_EQUAL,r=e(84284).FROM_BL;X.handleDefaults=function(h,T,f){var n=f.axIds,v=f.axHasImage,m=T._axisConstraintGroups=[],b=T._axisMatchGroups=[],E,p,S,w,i,C,x,k;for(E=0;Em?f.substr(m):n.substr(v))+b}function l(h,T){for(var f=T._size,n=f.h/f.w,v={},m=Object.keys(h),b=0;bg*k&&!z)){for(m=0;mG&&neoe&&(oe=ne);var de=(oe-q)/(2*Z);i/=de,q=p.l2r(q),oe=p.l2r(oe),p.range=p._input.range=V=0){sr._fullLayout._deactivateShape(sr);return}var fr=sr._fullLayout.clickmode;if(G(sr),Kt===2&&!_e&&Fe(),Se)fr.indexOf("select")>-1&&S(Dt,sr,st,Ze,le.id,ut),fr.indexOf("event")>-1&&a.click(sr,Dt,le.id);else if(Kt===1&&_e){var vr=ve?Ie:ze,lr=ve==="s"||Ae==="w"?0:1,Or=vr._name+".range["+lr+"]",Sr=O(vr,lr),Ar="left",sn="middle";if(vr.fixedrange)return;ve?(sn=ve==="n"?"top":"bottom",vr.side==="right"&&(Ar="right")):Ae==="e"&&(Ar="right"),sr._context.showAxisRangeEntryBoxes&&A.select(at).call(r.makeEditable,{gd:sr,immediate:!0,background:sr._fullLayout.paper_bgcolor,text:String(Sr),fill:vr.tickfont?vr.tickfont.color:"#444",horizontalAlign:Ar,verticalAlign:sn}).on("edit",function(Jr){var bn=vr.d2r(Jr);bn!==void 0&&d.call("_guiRelayout",sr,Or,bn)})}}l.init(ut);var gt,Ct,Yt,gr,ht,Ht,Wt,cr,er,ct;function qe(Kt,Dt,sr){var fr=at.getBoundingClientRect();gt=Dt-fr.left,Ct=sr-fr.top,ne._fullLayout._calcInverseTransform(ne);var vr=P.apply3DTransform(ne._fullLayout._invTransform)(gt,Ct);gt=vr[0],Ct=vr[1],Yt={l:gt,r:gt,w:0,t:Ct,b:Ct,h:0},gr=ne._hmpixcount?ne._hmlumcount/ne._hmpixcount:L(ne._fullLayout.plot_bgcolor).getLuminance(),ht="M0,0H"+it+"V"+lt+"H0V0",Ht=!1,Wt="xy",ct=!1,cr=$(ye,gr,Ke,nt,ht),er=q(ye,Ke,nt)}function dt(Kt,Dt){if(ne._transitioningWithDuration)return!1;var sr=Math.max(0,Math.min(it,be*Kt+gt)),fr=Math.max(0,Math.min(lt,ke*Dt+Ct)),vr=Math.abs(sr-gt),lr=Math.abs(fr-Ct);Yt.l=Math.min(gt,sr),Yt.r=Math.max(gt,sr),Yt.t=Math.min(Ct,fr),Yt.b=Math.max(Ct,fr);function Or(){Wt="",Yt.r=Yt.l,Yt.t=Yt.b,er.attr("d","M0,0Z")}if(vt.isSubplotConstrained)vr>x||lr>x?(Wt="xy",vr/it>lr/lt?(lr=vr*lt/it,Ct>fr?Yt.t=Ct-lr:Yt.b=Ct+lr):(vr=lr*it/lt,gt>sr?Yt.l=gt-vr:Yt.r=gt+vr),er.attr("d",ae(Yt))):Or();else if(xt.isSubplotConstrained)if(vr>x||lr>x){Wt="xy";var Sr=Math.min(Yt.l/it,(lt-Yt.b)/lt),Ar=Math.max(Yt.r/it,(lt-Yt.t)/lt);Yt.l=Sr*it,Yt.r=Ar*it,Yt.b=(1-Sr)*lt,Yt.t=(1-Ar)*lt,er.attr("d",ae(Yt))}else Or();else!Pe||lr0){var Jr;if(xt.isSubplotConstrained||!Je&&Pe.length===1){for(Jr=0;Jr1&&(Or.maxallowed!==void 0&&He===(Or.range[0]1&&(Sr.maxallowed!==void 0&&Oe===(Sr.range[0]=0?Math.min(ne,.9):1/(1/Math.max(ne,-.3)+3.222))}function j(ne,le,de){return ne?ne==="nsew"?de?"":le==="pan"?"move":"crosshair":ne.toLowerCase()+"-resize":"pointer"}function $(ne,le,de,we,me){return ne.append("path").attr("class","zoombox").style({fill:le>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",g(de,we)).attr("d",me+"Z")}function q(ne,le,de){return ne.append("path").attr("class","zoombox-corners").style({fill:t.background,stroke:t.defaultLine,"stroke-width":1,opacity:0}).attr("transform",g(le,de)).attr("d","M0,0Z")}function oe(ne,le,de,we,me,Le){ne.attr("d",we+"M"+de.l+","+de.t+"v"+de.h+"h"+de.w+"v-"+de.h+"h-"+de.w+"Z"),Z(ne,le,me,Le)}function Z(ne,le,de,we){de||(ne.transition().style("fill",we>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),le.transition().style("opacity",1).duration(200))}function G(ne){A.select(ne).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function re(ne){k&&ne.data&&ne._context.showTips&&(P.notifier(P._(ne,"Double-click to zoom back out"),"long"),k=!1)}function H(ne,le){return"M"+(ne.l-.5)+","+(le-x-.5)+"h-3v"+(2*x+1)+"h3ZM"+(ne.r+.5)+","+(le-x-.5)+"h3v"+(2*x+1)+"h-3Z"}function J(ne,le){return"M"+(le-x-.5)+","+(ne.t-.5)+"v-3h"+(2*x+1)+"v3ZM"+(le-x-.5)+","+(ne.b+.5)+"v3h"+(2*x+1)+"v-3Z"}function ae(ne){var le=Math.floor(Math.min(ne.b-ne.t,ne.r-ne.l,x)/2);return"M"+(ne.l-3.5)+","+(ne.t-.5+le)+"h3v"+-le+"h"+le+"v-3h-"+(le+3)+"ZM"+(ne.r+3.5)+","+(ne.t-.5+le)+"h-3v"+-le+"h"+-le+"v-3h"+(le+3)+"ZM"+(ne.r+3.5)+","+(ne.b+.5-le)+"h-3v"+le+"h"+-le+"v3h"+(le+3)+"ZM"+(ne.l-3.5)+","+(ne.b+.5-le)+"h3v"+le+"h"+le+"v3h-"+(le+3)+"Z"}function K(ne,le,de,we,me){for(var Le=!1,ve={},Ae={},ye,Se,_e,ze,Ie=(me||{}).xaHash,Ne=(me||{}).yaHash,et=0;etE[1]-.000244140625&&(M.domain=l),P.noneOrAll(L.domain,M.domain,l),M.tickmode==="sync"&&(M.tickmode="auto")}return d("layer"),M}},42568:function(te,X,e){var A=e(85024);te.exports=function(o,L,M,d,g){g||(g={});var r=g.tickSuffixDflt,t=A(o),s=M("tickprefix");s&&M("showtickprefix",t);var a=M("ticksuffix",r);a&&M("showticksuffix",t)}},96312:function(te,X,e){var A=e(76808);te.exports=function(o,L,M,d){var g=L._template||{},r=L.type||g.type||"-";M("minallowed"),M("maxallowed");var t=M("range");if(!t){var s;!d.noInsiderange&&r!=="log"&&(s=M("insiderange"),s&&(s[0]===null||s[1]===null)&&(L.insiderange=!1,s=void 0),s&&(t=M("range",s)))}var a=L.getAutorangeDflt(t,d),c=M("autorange",a),u;t&&(t[0]===null&&t[1]===null||(t[0]===null||t[1]===null)&&(c==="reversed"||c===!0)||t[0]!==null&&(c==="min"||c==="max reversed")||t[1]!==null&&(c==="max"||c==="min reversed"))&&(t=void 0,delete L.range,L.autorange=!0,u=!0),u||(a=L.getAutorangeDflt(t,d),c=M("autorange",a)),c&&(A(M,c,t),(r==="linear"||r==="-")&&M("rangemode")),L.cleanRange()}},21160:function(te,X,e){var A=e(84284).FROM_BL;te.exports=function(o,L,M){M===void 0&&(M=A[o.constraintoward||"center"]);var d=[o.r2l(o.range[0]),o.r2l(o.range[1])],g=d[0]+(d[1]-d[0])*M;o.range=o._input.range=[o.l2r(g+(d[0]-g)*L),o.l2r(g+(d[1]-g)*L)],o.setScale()}},78344:function(te,X,e){var A=e(33428),P=e(94336).E9,o=e(3400),L=o.numberFormat,M=e(38248),d=o.cleanNumber,g=o.ms2DateTime,r=o.dateTime2ms,t=o.ensureNumber,s=o.isArrayOrTypedArray,a=e(39032),c=a.FP_SAFE,u=a.BADNUM,l=a.LOG_CLIP,y=a.ONEWEEK,h=a.ONEDAY,T=a.ONEHOUR,f=a.ONEMIN,n=a.ONESEC,v=e(79811),m=e(33816),b=m.HOUR_PATTERN,E=m.WEEKDAY_PATTERN;function p(w){return Math.pow(10,w)}function S(w){return w!=null}te.exports=function(i,C){C=C||{};var x=i._id||"x",k=x.charAt(0);function I(H,J){if(H>0)return Math.log(H)/Math.LN10;if(H<=0&&J&&i.range&&i.range.length===2){var ae=i.range[0],K=i.range[1];return .5*(ae+K-2*l*Math.abs(ae-K))}else return u}function B(H,J,ae,K){if((K||{}).msUTC&&M(H))return+H;var Y=r(H,ae||i.calendar);if(Y===u)if(M(H)){H=+H;var ie=Math.floor(o.mod(H+.05,1)*10),ne=Math.round(H-ie/10);Y=r(new Date(ne))+ie/10}else return u;return Y}function _(H,J,ae){return g(H,J,ae||i.calendar)}function z(H){return i._categories[Math.round(H)]}function O(H){if(S(H)){if(i._categoriesMap===void 0&&(i._categoriesMap={}),i._categoriesMap[H]!==void 0)return i._categoriesMap[H];i._categories.push(typeof H=="number"?String(H):H);var J=i._categories.length-1;return i._categoriesMap[H]=J,J}return u}function F(H,J){for(var ae=new Array(J),K=0;Ki.range[1]&&(ae=!ae);for(var K=ae?-1:1,Y=K*H,ie=0,ne=0;nede)ie=ne+1;else{ie=Y<(le+de)/2?ne:ne+1;break}}var we=i._B[ie]||0;return isFinite(we)?$(H,i._m2,we):0},Z=function(H){var J=i._rangebreaks.length;if(!J)return q(H,i._m,i._b);for(var ae=0,K=0;Ki._rangebreaks[K].pmax&&(ae=K+1);return q(H,i._m2,i._B[ae])}}i.c2l=i.type==="log"?I:t,i.l2c=i.type==="log"?p:t,i.l2p=oe,i.p2l=Z,i.c2p=i.type==="log"?function(H,J){return oe(I(H,J))}:oe,i.p2c=i.type==="log"?function(H){return p(Z(H))}:Z,["linear","-"].indexOf(i.type)!==-1?(i.d2r=i.r2d=i.d2c=i.r2c=i.d2l=i.r2l=d,i.c2d=i.c2r=i.l2d=i.l2r=t,i.d2p=i.r2p=function(H){return i.l2p(d(H))},i.p2d=i.p2r=Z,i.cleanPos=t):i.type==="log"?(i.d2r=i.d2l=function(H,J){return I(d(H),J)},i.r2d=i.r2c=function(H){return p(d(H))},i.d2c=i.r2l=d,i.c2d=i.l2r=t,i.c2r=I,i.l2d=p,i.d2p=function(H,J){return i.l2p(i.d2r(H,J))},i.p2d=function(H){return p(Z(H))},i.r2p=function(H){return i.l2p(d(H))},i.p2r=Z,i.cleanPos=t):i.type==="date"?(i.d2r=i.r2d=o.identity,i.d2c=i.r2c=i.d2l=i.r2l=B,i.c2d=i.c2r=i.l2d=i.l2r=_,i.d2p=i.r2p=function(H,J,ae){return i.l2p(B(H,0,ae))},i.p2d=i.p2r=function(H,J,ae){return _(Z(H),J,ae)},i.cleanPos=function(H){return o.cleanDate(H,u,i.calendar)}):i.type==="category"?(i.d2c=i.d2l=O,i.r2d=i.c2d=i.l2d=z,i.d2r=i.d2l_noadd=V,i.r2c=function(H){var J=j(H);return J!==void 0?J:i.fraction2r(.5)},i.l2r=i.c2r=t,i.r2l=j,i.d2p=function(H){return i.l2p(i.r2c(H))},i.p2d=function(H){return z(Z(H))},i.r2p=i.d2p,i.p2r=Z,i.cleanPos=function(H){return typeof H=="string"&&H!==""?H:t(H)}):i.type==="multicategory"&&(i.r2d=i.c2d=i.l2d=z,i.d2r=i.d2l_noadd=V,i.r2c=function(H){var J=V(H);return J!==void 0?J:i.fraction2r(.5)},i.r2c_just_indices=N,i.l2r=i.c2r=t,i.r2l=V,i.d2p=function(H){return i.l2p(i.r2c(H))},i.p2d=function(H){return z(Z(H))},i.r2p=i.d2p,i.p2r=Z,i.cleanPos=function(H){return Array.isArray(H)||typeof H=="string"&&H!==""?H:t(H)},i.setupMultiCategory=function(H){var J=i._traceIndices,ae,K,Y=i._matchGroup;if(Y&&i._categories.length===0){for(var ie in Y)if(ie!==x){var ne=C[v.id2name(ie)];J=J.concat(ne._traceIndices)}}var le=[[0,{}],[0,{}]],de=[];for(ae=0;aene[1]&&(K[ie?0:1]=ae),K[0]===K[1]){var le=i.l2r(J),de=i.l2r(ae);if(J!==void 0){var we=le+1;ae!==void 0&&(we=Math.min(we,de)),K[ie?1:0]=we}if(ae!==void 0){var me=de+1;J!==void 0&&(me=Math.max(me,le)),K[ie?0:1]=me}}}},i.cleanRange=function(H,J){i._cleanRange(H,J),i.limitRange(H)},i._cleanRange=function(H,J){J||(J={}),H||(H="range");var ae=o.nestedProperty(i,H).get(),K,Y;if(i.type==="date"?Y=o.dfltRange(i.calendar):k==="y"?Y=m.DFLTRANGEY:i._name==="realaxis"?Y=[0,1]:Y=J.dfltRange||m.DFLTRANGEX,Y=Y.slice(),(i.rangemode==="tozero"||i.rangemode==="nonnegative")&&(Y[0]=0),!ae||ae.length!==2){o.nestedProperty(i,H).set(Y);return}var ie=ae[0]===null,ne=ae[1]===null;for(i.type==="date"&&!i.autorange&&(ae[0]=o.cleanDate(ae[0],u,i.calendar),ae[1]=o.cleanDate(ae[1],u,i.calendar)),K=0;K<2;K++)if(i.type==="date"){if(!o.isDateTime(ae[K],i.calendar)){i[H]=Y;break}if(i.r2l(ae[0])===i.r2l(ae[1])){var le=o.constrain(i.r2l(ae[0]),o.MIN_MS+1e3,o.MAX_MS-1e3);ae[0]=i.l2r(le-1e3),ae[1]=i.l2r(le+1e3);break}}else{if(!M(ae[K]))if(!(ie||ne)&&M(ae[1-K]))ae[K]=ae[1-K]*(K?10:.1);else{i[H]=Y;break}if(ae[K]<-c?ae[K]=-c:ae[K]>c&&(ae[K]=c),ae[0]===ae[1]){var de=Math.max(1,Math.abs(ae[0]*1e-6));ae[0]-=de,ae[1]+=de}}},i.setScale=function(H){var J=C._size;if(i.overlaying){var ae=v.getFromId({_fullLayout:C},i.overlaying);i.domain=ae.domain}var K=H&&i._r?"_r":"range",Y=i.calendar;i.cleanRange(K);var ie=i.r2l(i[K][0],Y),ne=i.r2l(i[K][1],Y),le=k==="y";if(le?(i._offset=J.t+(1-i.domain[1])*J.h,i._length=J.h*(i.domain[1]-i.domain[0]),i._m=i._length/(ie-ne),i._b=-i._m*ne):(i._offset=J.l+i.domain[0]*J.w,i._length=J.w*(i.domain[1]-i.domain[0]),i._m=i._length/(ne-ie),i._b=-i._m*ie),i._rangebreaks=[],i._lBreaks=0,i._m2=0,i._B=[],i.rangebreaks){var de,we;if(i._rangebreaks=i.locateBreaks(Math.min(ie,ne),Math.max(ie,ne)),i._rangebreaks.length){for(de=0;dene&&(me=!me),me&&i._rangebreaks.reverse();var Le=me?-1:1;for(i._m2=Le*i._length/(Math.abs(ne-ie)-i._lBreaks),i._B.push(-i._m2*(le?ne:ie)),de=0;deY&&(Y+=7,ieY&&(Y+=24,ie=K&&ie=K&&H=Ze.min&&(IeZe.max&&(Ze.max=Ne),et=!1)}et&&ne.push({min:Ie,max:Ne})}};for(ae=0;ae rect").call(L.setTranslate,0,0).call(L.setScale,1,1),b.plot.call(L.setTranslate,E._offset,p._offset).call(L.setScale,1,1);var S=b.plot.selectAll(".scatterlayer .trace");S.selectAll(".point").call(L.setPointGroupScale,1,1),S.selectAll(".textpoint").call(L.setTextPointsScale,1,1),S.call(L.hideOutsideRangePoints,b)}function u(b,E){var p=b.plotinfo,S=p.xaxis,w=p.yaxis,i=S._length,C=w._length,x=!!b.xr1,k=!!b.yr1,I=[];if(x){var B=o.simpleMap(b.xr0,S.r2l),_=o.simpleMap(b.xr1,S.r2l),z=B[1]-B[0],O=_[1]-_[0];I[0]=(B[0]*(1-E)+E*_[0]-B[0])/(B[1]-B[0])*i,I[2]=i*(1-E+E*O/z),S.range[0]=S.l2r(B[0]*(1-E)+E*_[0]),S.range[1]=S.l2r(B[1]*(1-E)+E*_[1])}else I[0]=0,I[2]=i;if(k){var F=o.simpleMap(b.yr0,w.r2l),N=o.simpleMap(b.yr1,w.r2l),V=F[1]-F[0],j=N[1]-N[0];I[1]=(F[1]*(1-E)+E*N[1]-F[1])/(F[0]-F[1])*C,I[3]=C*(1-E+E*j/V),w.range[0]=S.l2r(F[0]*(1-E)+E*N[0]),w.range[1]=w.l2r(F[1]*(1-E)+E*N[1])}else I[1]=0,I[3]=C;M.drawOne(g,S,{skipTitle:!0}),M.drawOne(g,w,{skipTitle:!0}),M.redrawComponents(g,[S._id,w._id]);var $=x?i/I[2]:1,q=k?C/I[3]:1,oe=x?I[0]:0,Z=k?I[1]:0,G=x?I[0]/I[2]*i:0,re=k?I[1]/I[3]*C:0,H=S._offset-G,J=w._offset-re;p.clipRect.call(L.setTranslate,oe,Z).call(L.setScale,1/$,1/q),p.plot.call(L.setTranslate,H,J).call(L.setScale,$,q),L.setPointGroupScale(p.zoomScalePts,1/$,1/q),L.setTextPointsScale(p.zoomScaleTxt,1/$,1/q)}var l;s&&(l=s());function y(){for(var b={},E=0;Et.duration?(y(),n=window.cancelAnimationFrame(m)):n=window.requestAnimationFrame(m)}return T=Date.now(),n=window.requestAnimationFrame(m),Promise.resolve()}},14944:function(te,X,e){var A=e(24040).traceIs,P=e(52976);te.exports=function(r,t,s,a){s("autotypenumbers",a.autotypenumbersDflt);var c=s("type",(a.splomStash||{}).type);c==="-"&&(o(t,a.data),t.type==="-"?t.type="linear":r.type=t.type)};function o(g,r){if(g.type==="-"){var t=g._id,s=t.charAt(0),a;t.indexOf("scene")!==-1&&(t=s);var c=L(r,t,s);if(c){if(c.type==="histogram"&&s==={v:"y",h:"x"}[c.orientation||"v"]){g.type="linear";return}var u=s+"calendar",l=c[u],y={noMultiCategory:!A(c,"cartesian")||A(c,"noMultiCategory")};if(c.type==="box"&&c._hasPreCompStats&&s==={h:"x",v:"y"}[c.orientation||"v"]&&(y.noMultiCategory=!0),y.autotypenumbers=g.autotypenumbers,d(c,s)){var h=M(c),T=[];for(a=0;a0&&(a["_"+t+"axes"]||{})[r])return a;if((a[t+"axis"]||t)===r){if(d(a,t))return a;if((a[t]||[]).length||a[t+"0"])return a}}}function M(g){return{v:"x",h:"y"}[g.orientation||"v"]}function d(g,r){var t=M(g),s=A(g,"box-violin"),a=A(g._fullInput||{},"candlestick");return s&&!a&&r===t&&g[t]===void 0&&g[t+"0"]===void 0}},62460:function(te,X,e){var A=e(24040),P=e(3400);X.manageCommandObserver=function(r,t,s,a){var c={},u=!0;t&&t._commandObserver&&(c=t._commandObserver),c.cache||(c.cache={}),c.lookupTable={};var l=X.hasSimpleAPICommandBindings(r,s,c.lookupTable);if(t&&t._commandObserver){if(l)return c;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,c}if(l){o(r,l,c.cache),c.check=function(){if(u){var f=o(r,l,c.cache);return f.changed&&a&&c.lookupTable[f.value]!==void 0&&(c.disable(),Promise.resolve(a({value:f.value,type:l.type,prop:l.prop,traces:l.traces,index:c.lookupTable[f.value]})).then(c.enable,c.enable)),f.changed}};for(var y=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],h=0;h0?".":"")+c;P.isPlainObject(u)?g(u,t,l,a+1):t(l,c,u)}})}},86968:function(te,X,e){var A=e(92880).extendFlat;X.u=function(P,o){P=P||{},o=o||{};var L={valType:"info_array",editType:P.editType,items:[{valType:"number",min:0,max:1,editType:P.editType},{valType:"number",min:0,max:1,editType:P.editType}],dflt:[0,1]};P.name&&P.name+"",P.trace,o.description&&""+o.description;var M={x:A({},L,{}),y:A({},L,{}),editType:P.editType};return P.noGridCell||(M.row={valType:"integer",min:0,dflt:0,editType:P.editType},M.column={valType:"integer",min:0,dflt:0,editType:P.editType}),M},X.Q=function(P,o,L,M){var d=M&&M.x||[0,1],g=M&&M.y||[0,1],r=o.grid;if(r){var t=L("domain.column");t!==void 0&&(t0&&O._module.calcGeoJSON(z,k)}if(!I){var F=this.updateProjection(x,k);if(F)return;(!this.viewInitial||this.scope!==B.scope)&&this.saveViewInitial(B)}this.scope=B.scope,this.updateBaseLayers(k,B),this.updateDims(k,B),this.updateFx(k,B),c.generalUpdatePerTraceModule(this.graphDiv,this,x,B);var N=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=N.selectAll(".point"),this.dataPoints.text=N.selectAll("text"),this.dataPaths.line=N.selectAll(".js-line");var V=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=V.selectAll("path"),this._render()},S.updateProjection=function(x,k){var I=this.graphDiv,B=k[this.id],_=k._size,z=B.domain,O=B.projection,F=B.lonaxis,N=B.lataxis,V=F._ax,j=N._ax,$=this.projection=w(B),q=[[_.l+_.w*z.x[0],_.t+_.h*(1-z.y[1])],[_.l+_.w*z.x[1],_.t+_.h*(1-z.y[0])]],oe=B.center||{},Z=O.rotation||{},G=F.range||[],re=N.range||[];if(B.fitbounds){V._length=q[1][0]-q[0][0],j._length=q[1][1]-q[0][1],V.range=l(I,V),j.range=l(I,j);var H=(V.range[0]+V.range[1])/2,J=(j.range[0]+j.range[1])/2;if(B._isScoped)oe={lon:H,lat:J};else if(B._isClipped){oe={lon:H,lat:J},Z={lon:H,lat:J,roll:Z.roll};var ae=O.type,K=v.lonaxisSpan[ae]/2||180,Y=v.lataxisSpan[ae]/2||90;G=[H-K,H+K],re=[J-Y,J+Y]}else oe={lon:H,lat:J},Z={lon:H,lat:Z.lat,roll:Z.roll}}$.center([oe.lon-Z.lon,oe.lat-Z.lat]).rotate([-Z.lon,-Z.lat,Z.roll]).parallels(O.parallels);var ie=C(G,re);$.fitExtent(q,ie);var ne=this.bounds=$.getBounds(ie),le=this.fitScale=$.scale(),de=$.translate();if(B.fitbounds){var we=$.getBounds(C(V.range,j.range)),me=Math.min((ne[1][0]-ne[0][0])/(we[1][0]-we[0][0]),(ne[1][1]-ne[0][1])/(we[1][1]-we[0][1]));isFinite(me)?$.scale(me*le):g.warn("Something went wrong during"+this.id+"fitbounds computations.")}else $.scale(O.scale*le);var Le=this.midPt=[(ne[0][0]+ne[1][0])/2,(ne[0][1]+ne[1][1])/2];if($.translate([de[0]+(Le[0]-de[0]),de[1]+(Le[1]-de[1])]).clipExtent(ne),B._isAlbersUsa){var ve=$([oe.lon,oe.lat]),Ae=$.translate();$.translate([Ae[0]-(ve[0]-Ae[0]),Ae[1]-(ve[1]-Ae[1])])}},S.updateBaseLayers=function(x,k){var I=this,B=I.topojson,_=I.layers,z=I.basePaths;function O(q){return q==="lonaxis"||q==="lataxis"}function F(q){return!!v.lineLayers[q]}function N(q){return!!v.fillLayers[q]}var V=this.hasChoropleth?v.layersForChoropleth:v.layers,j=V.filter(function(q){return F(q)||N(q)?k["show"+q]:O(q)?k[q].showgrid:!0}),$=I.framework.selectAll(".layer").data(j,String);$.exit().each(function(q){delete _[q],delete z[q],A.select(this).remove()}),$.enter().append("g").attr("class",function(q){return"layer "+q}).each(function(q){var oe=_[q]=A.select(this);q==="bg"?I.bgRect=oe.append("rect").style("pointer-events","all"):O(q)?z[q]=oe.append("path").style("fill","none"):q==="backplot"?oe.append("g").classed("choroplethlayer",!0):q==="frontplot"?oe.append("g").classed("scatterlayer",!0):F(q)?z[q]=oe.append("path").style("fill","none").style("stroke-miterlimit",2):N(q)&&(z[q]=oe.append("path").style("stroke","none"))}),$.order(),$.each(function(q){var oe=z[q],Z=v.layerNameToAdjective[q];q==="frame"?oe.datum(v.sphereSVG):F(q)||N(q)?oe.datum(E(B,B.objects[q])):O(q)&&oe.datum(i(q,k,x)).call(t.stroke,k[q].gridcolor).call(s.dashLine,k[q].griddash,k[q].gridwidth),F(q)?oe.call(t.stroke,k[Z+"color"]).call(s.dashLine,"",k[Z+"width"]):N(q)&&oe.call(t.fill,k[Z+"color"])})},S.updateDims=function(x,k){var I=this.bounds,B=(k.framewidth||0)/2,_=I[0][0]-B,z=I[0][1]-B,O=I[1][0]-_+B,F=I[1][1]-z+B;s.setRect(this.clipRect,_,z,O,F),this.bgRect.call(s.setRect,_,z,O,F).call(t.fill,k.bgcolor),this.xaxis._offset=_,this.xaxis._length=O,this.yaxis._offset=z,this.yaxis._length=F},S.updateFx=function(x,k){var I=this,B=I.graphDiv,_=I.bgRect,z=x.dragmode,O=x.clickmode;if(I.isStatic)return;function F(){var $=I.viewInitial,q={};for(var oe in $)q[I.id+"."+oe]=$[oe];d.call("_guiRelayout",B,q),B.emit("plotly_doubleclick",null)}function N($){return I.projection.invert([$[0]+I.xaxis._offset,$[1]+I.yaxis._offset])}var V=function($,q){if(q.isRect){var oe=$.range={};oe[I.id]=[N([q.xmin,q.ymin]),N([q.xmax,q.ymax])]}else{var Z=$.lassoPoints={};Z[I.id]=q.map(N)}},j={element:I.bgRect.node(),gd:B,plotinfo:{id:I.id,xaxis:I.xaxis,yaxis:I.yaxis,fillRangeItems:V},xaxes:[I.xaxis],yaxes:[I.yaxis],subplot:I.id,clickFn:function($){$===2&&T(B)}};z==="pan"?(_.node().onmousedown=null,_.call(n(I,k)),_.on("dblclick.zoom",F),B._context._scrollZoom.geo||_.on("wheel.zoom",null)):(z==="select"||z==="lasso")&&(_.on(".zoom",null),j.prepFn=function($,q,oe){h($,q,oe,j,z)},y.init(j)),_.on("mousemove",function(){var $=I.projection.invert(g.getPositionFromD3Event());if(!$)return y.unhover(B,A.event);I.xaxis.p2c=function(){return $[0]},I.yaxis.p2c=function(){return $[1]},a.hover(B,A.event,I.id)}),_.on("mouseout",function(){B._dragging||y.unhover(B,A.event)}),_.on("click",function(){z!=="select"&&z!=="lasso"&&(O.indexOf("select")>-1&&f(A.event,B,[I.xaxis],[I.yaxis],I.id,j),O.indexOf("event")>-1&&a.click(B,A.event))})},S.makeFramework=function(){var x=this,k=x.graphDiv,I=k._fullLayout,B="clip"+I._uid+x.id;x.clipDef=I._clips.append("clipPath").attr("id",B),x.clipRect=x.clipDef.append("rect"),x.framework=A.select(x.container).append("g").attr("class","geo "+x.id).call(s.setClipUrl,B,k),x.project=function(_){var z=x.projection(_);return z?[z[0]-x.xaxis._offset,z[1]-x.yaxis._offset]:[null,null]},x.xaxis={_id:"x",c2p:function(_){return x.project(_)[0]}},x.yaxis={_id:"y",c2p:function(_){return x.project(_)[1]}},x.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},u.setConvert(x.mockAxis,I)},S.saveViewInitial=function(x){var k=x.center||{},I=x.projection,B=I.rotation||{};this.viewInitial={fitbounds:x.fitbounds,"projection.scale":I.scale};var _;x._isScoped?_={"center.lon":k.lon,"center.lat":k.lat}:x._isClipped?_={"projection.rotation.lon":B.lon,"projection.rotation.lat":B.lat}:_={"center.lon":k.lon,"center.lat":k.lat,"projection.rotation.lon":B.lon},g.extendFlat(this.viewInitial,_)},S.render=function(x){this._hasMarkerAngles&&x?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()},S._render=function(){var x=this.projection,k=x.getPath(),I;function B(z){var O=x(z.lonlat);return O?r(O[0],O[1]):null}function _(z){return x.isLonLatOverEdges(z.lonlat)?"none":null}for(I in this.basePaths)this.basePaths[I].attr("d",k);for(I in this.dataPaths)this.dataPaths[I].attr("d",function(z){return k(z.geojson)});for(I in this.dataPoints)this.dataPoints[I].attr("display",_).attr("transform",B)};function w(x){var k=x.projection,I=k.type,B=v.projNames[I];B="geo"+g.titleCase(B);for(var _=P[B]||M[B],z=_(),O=x._isSatellite?Math.acos(1/k.distance)*180/Math.PI:x._isClipped?v.lonaxisSpan[I]/2:null,F=["center","rotate","parallels","clipExtent"],N=function($){return $?z:[]},V=0;VZ}else return!1},z.getPath=function(){return o().projection(z)},z.getBounds=function($){return z.getPath().bounds($)},z.precision(v.precision),x._isSatellite&&z.tilt(k.tilt).distance(k.distance),O&&z.clipAngle(O-v.clipPad),z}function i(x,k,I){var B=1e-6,_=2.5,z=k[x],O=v.scopeDefaults[k.scope],F,N,V;x==="lonaxis"?(F=O.lonaxisRange,N=O.lataxisRange,V=function(J,ae){return[J,ae]}):x==="lataxis"&&(F=O.lataxisRange,N=O.lonaxisRange,V=function(J,ae){return[ae,J]});var j={type:"linear",range:[F[0],F[1]-B],tick0:z.tick0,dtick:z.dtick};u.setConvert(j,I);var $=u.calcTicks(j);!k.isScoped&&x==="lonaxis"&&$.pop();for(var q=$.length,oe=new Array(q),Z=0;Z0&&_<0&&(_+=360);var F=(_-B)/4;return{type:"Polygon",coordinates:[[[B,z],[B,O],[B+F,O],[B+2*F,O],[B+3*F,O],[_,O],[_,z],[_-F,z],[_-2*F,z],[_-3*F,z],[B,z]]]}}},10816:function(te,X,e){var A=e(84888).KY,P=e(3400).counterRegex,o=e(43520),L="geo",M=P(L),d={};d[L]={valType:"subplotid",dflt:L,editType:"calc"};function g(s){for(var a=s._fullLayout,c=s.calcdata,u=a._subplots[L],l=0;l0&&N<0&&(N+=360);var V=(F+N)/2,j;if(!f){var $=n?h.projRotate:[V,0,0];j=s("projection.rotation.lon",$[0]),s("projection.rotation.lat",$[1]),s("projection.rotation.roll",$[2]),S=s("showcoastlines",!n&&p),S&&(s("coastlinecolor"),s("coastlinewidth")),S=s("showocean",p?void 0:!1),S&&s("oceancolor")}var q,oe;if(f?(q=-96.6,oe=38.7):(q=n?V:j,oe=(O[0]+O[1])/2),s("center.lon",q),s("center.lat",oe),v&&(s("projection.tilt"),s("projection.distance")),m){var Z=h.projParallels||[0,60];s("projection.parallels",Z)}s("projection.scale"),S=s("showland",p?void 0:!1),S&&s("landcolor"),S=s("showlakes",p?void 0:!1),S&&s("lakecolor"),S=s("showrivers",p?void 0:!1),S&&(s("rivercolor"),s("riverwidth")),S=s("showcountries",n&&y!=="usa"&&p),S&&(s("countrycolor"),s("countrywidth")),(y==="usa"||y==="north america"&&l===50)&&(s("showsubunits",p),s("subunitcolor"),s("subunitwidth")),n||(S=s("showframe",p),S&&(s("framecolor"),s("framewidth"))),s("bgcolor");var G=s("fitbounds");G&&(delete t.projection.scale,n?(delete t.center.lon,delete t.center.lat):b?(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon,delete t.projection.rotation.lat,delete t.lonaxis.range,delete t.lataxis.range):(delete t.center.lon,delete t.center.lat,delete t.projection.rotation.lon))}},79248:function(te,X,e){var A=e(33428),P=e(3400),o=e(24040),L=Math.PI/180,M=180/Math.PI,d={cursor:"pointer"},g={cursor:"auto"};function r(i,C){var x=i.projection,k;return C._isScoped?k=a:C._isClipped?k=u:k=c,k(i,x)}te.exports=r;function t(i,C){return A.behavior.zoom().translate(C.translate()).scale(C.scale())}function s(i,C,x){var k=i.id,I=i.graphDiv,B=I.layout,_=B[k],z=I._fullLayout,O=z[k],F={},N={};function V(j,$){F[k+"."+j]=P.nestedProperty(_,j).get(),o.call("_storeDirectGUIEdit",B,z._preGUI,F);var q=P.nestedProperty(O,j);q.get()!==$&&(q.set($),P.nestedProperty(_,j).set($),N[k+"."+j]=$)}x(V),V("projection.scale",C.scale()/i.fitScale),V("fitbounds",!1),I.emit("plotly_relayout",N)}function a(i,C){var x=t(i,C);function k(){A.select(this).style(d)}function I(){C.scale(A.event.scale).translate(A.event.translate),i.render(!0);var z=C.invert(i.midPt);i.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":C.scale()/i.fitScale,"geo.center.lon":z[0],"geo.center.lat":z[1]})}function B(z){var O=C.invert(i.midPt);z("center.lon",O[0]),z("center.lat",O[1])}function _(){A.select(this).style(g),s(i,C,B)}return x.on("zoomstart",k).on("zoom",I).on("zoomend",_),x}function c(i,C){var x=t(i,C),k=2,I,B,_,z,O,F,N,V,j;function $(H){return C.invert(H)}function q(H){var J=$(H);if(!J)return!0;var ae=C(J);return Math.abs(ae[0]-H[0])>k||Math.abs(ae[1]-H[1])>k}function oe(){A.select(this).style(d),I=A.mouse(this),B=C.rotate(),_=C.translate(),z=B,O=$(I)}function Z(){if(F=A.mouse(this),q(I)){x.scale(C.scale()),x.translate(C.translate());return}C.scale(A.event.scale),C.translate([_[0],A.event.translate[1]]),O?$(F)&&(V=$(F),N=[z[0]+(V[0]-O[0]),B[1],B[2]],C.rotate(N),z=N):(I=F,O=$(I)),j=!0,i.render(!0);var H=C.rotate(),J=C.invert(i.midPt);i.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":C.scale()/i.fitScale,"geo.center.lon":J[0],"geo.center.lat":J[1],"geo.projection.rotation.lon":-H[0]})}function G(){A.select(this).style(g),j&&s(i,C,re)}function re(H){var J=C.rotate(),ae=C.invert(i.midPt);H("projection.rotation.lon",-J[0]),H("center.lon",ae[0]),H("center.lat",ae[1])}return x.on("zoomstart",oe).on("zoom",Z).on("zoomend",G),x}function u(i,C){C.rotate(),C.scale();var x=t(i,C),k=w(x,"zoomstart","zoom","zoomend"),I=0,B=x.on,_;x.on("zoomstart",function(){A.select(this).style(d);var V=A.mouse(this),j=C.rotate(),$=j,q=C.translate(),oe=y(j);_=l(C,V),B.call(x,"zoom",function(){var Z=A.mouse(this);if(C.scale(A.event.scale),!_)V=Z,_=l(C,V);else if(l(C,Z)){C.rotate(j).translate(q);var G=l(C,Z),re=T(_,G),H=b(h(oe,re)),J=f(H,_,$);(!isFinite(J[0])||!isFinite(J[1])||!isFinite(J[2]))&&(J=$),C.rotate(J),$=J}O(k.of(this,arguments))}),z(k.of(this,arguments))}).on("zoomend",function(){A.select(this).style(g),B.call(x,"zoom",null),F(k.of(this,arguments)),s(i,C,N)}).on("zoom.redraw",function(){i.render(!0);var V=C.rotate();i.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":C.scale()/i.fitScale,"geo.projection.rotation.lon":-V[0],"geo.projection.rotation.lat":-V[1]})});function z(V){I++||V({type:"zoomstart"})}function O(V){V({type:"zoom"})}function F(V){--I||V({type:"zoomend"})}function N(V){var j=C.rotate();V("projection.rotation.lon",-j[0]),V("projection.rotation.lat",-j[1])}return A.rebind(x,k,"on")}function l(i,C){var x=i.invert(C);return x&&isFinite(x[0])&&isFinite(x[1])&&E(x)}function y(i){var C=.5*i[0]*L,x=.5*i[1]*L,k=.5*i[2]*L,I=Math.sin(C),B=Math.cos(C),_=Math.sin(x),z=Math.cos(x),O=Math.sin(k),F=Math.cos(k);return[B*z*F+I*_*O,I*z*F-B*_*O,B*_*F+I*z*O,B*z*O-I*_*F]}function h(i,C){var x=i[0],k=i[1],I=i[2],B=i[3],_=C[0],z=C[1],O=C[2],F=C[3];return[x*_-k*z-I*O-B*F,x*z+k*_+I*F-B*O,x*O-k*F+I*_+B*z,x*F+k*O-I*z+B*_]}function T(i,C){if(!(!i||!C)){var x=S(i,C),k=Math.sqrt(p(x,x)),I=.5*Math.acos(Math.max(-1,Math.min(1,p(i,C)))),B=Math.sin(I)/k;return k&&[Math.cos(I),x[2]*B,-x[1]*B,x[0]*B]}}function f(i,C,x){var k=m(C,2,i[0]);k=m(k,1,i[1]),k=m(k,0,i[2]-x[2]);var I=C[0],B=C[1],_=C[2],z=k[0],O=k[1],F=k[2],N=Math.atan2(B,I)*M,V=Math.sqrt(I*I+B*B),j,$;Math.abs(O)>V?($=(O>0?90:-90)-N,j=0):($=Math.asin(O/V)*M-N,j=Math.sqrt(V*V-O*O));var q=180-$-2*N,oe=(Math.atan2(F,z)-Math.atan2(_,j))*M,Z=(Math.atan2(F,z)-Math.atan2(_,-j))*M,G=n(x[0],x[1],$,oe),re=n(x[0],x[1],q,Z);return G<=re?[$,oe,x[2]]:[q,Z,x[2]]}function n(i,C,x,k){var I=v(x-i),B=v(k-C);return Math.sqrt(I*I+B*B)}function v(i){return(i%360+540)%360-180}function m(i,C,x){var k=x*L,I=i.slice(),B=C===0?1:0,_=C===2?1:2,z=Math.cos(k),O=Math.sin(k);return I[B]=i[B]*z-i[_]*O,I[_]=i[_]*z+i[B]*O,I}function b(i){return[Math.atan2(2*(i[0]*i[1]+i[2]*i[3]),1-2*(i[1]*i[1]+i[2]*i[2]))*M,Math.asin(Math.max(-1,Math.min(1,2*(i[0]*i[2]-i[3]*i[1]))))*M,Math.atan2(2*(i[0]*i[3]+i[1]*i[2]),1-2*(i[2]*i[2]+i[3]*i[3]))*M]}function E(i){var C=i[0]*L,x=i[1]*L,k=Math.cos(x);return[k*Math.cos(C),k*Math.sin(C),Math.sin(x)]}function p(i,C){for(var x=0,k=0,I=i.length;kMath.abs(S)?(a.boxEnd[1]=a.boxStart[1]+Math.abs(p)*I*(S>=0?1:-1),a.boxEnd[1]f[3]&&(a.boxEnd[1]=f[3],a.boxEnd[0]=a.boxStart[0]+(f[3]-a.boxStart[1])/Math.abs(I))):(a.boxEnd[0]=a.boxStart[0]+Math.abs(S)/I*(p>=0?1:-1),a.boxEnd[0]f[2]&&(a.boxEnd[0]=f[2],a.boxEnd[1]=a.boxStart[1]+(f[2]-a.boxStart[0])*Math.abs(I)))}else x&&(a.boxEnd[0]=a.boxStart[0]),k&&(a.boxEnd[1]=a.boxStart[1])}else a.boxEnabled?(p=a.boxStart[0]!==a.boxEnd[0],S=a.boxStart[1]!==a.boxEnd[1],p||S?(p&&(w(0,a.boxStart[0],a.boxEnd[0]),r.xaxis.autorange=!1),S&&(w(1,a.boxStart[1],a.boxEnd[1]),r.yaxis.autorange=!1),r.relayoutCallback()):r.glplot.setDirty(),a.boxEnabled=!1,a.boxInited=!1):a.boxInited&&(a.boxInited=!1);break;case"pan":a.boxEnabled=!1,a.boxInited=!1,y?(a.panning||(a.dragStart[0]=h,a.dragStart[1]=T),Math.abs(a.dragStart[0]-h)1;function y(h){if(!l){var T=A.validate(a[h],d[h]);if(T)return a[h]}}L(a,c,u,{type:r,attributes:d,handleDefaults:t,fullLayout:c,font:c.font,fullData:u,getDfltFromLayout:y,autotypenumbersDflt:c.autotypenumbers,paper_bgcolor:c.paper_bgcolor,calendar:c.calendar})};function t(s,a,c,u){for(var l=c("bgcolor"),y=P.combine(l,u.paper_bgcolor),h=["up","center","eye"],T=0;T.999)&&(b="turntable")}else b="turntable";c("dragmode",b),c("hovermode",u.getDfltFromLayout("hovermode"))}},346:function(te,X,e){var A=e(86140),P=e(86968).u,o=e(92880).extendFlat,L=e(3400).counterRegex;function M(d,g,r){return{x:{valType:"number",dflt:d,editType:"camera"},y:{valType:"number",dflt:g,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}te.exports={_arrayAttrRegexps:[L("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:o(M(0,0,1),{}),center:o(M(0,0,0),{}),eye:o(M(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:P({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:A,yaxis:A,zaxis:A,dragmode:{valType:"enumerated",values:["orbit","turntable","zoom","pan",!1],editType:"plot"},hovermode:{valType:"enumerated",values:["closest",!1],dflt:"closest",editType:"modebar"},uirevision:{valType:"any",editType:"none"},editType:"plot",_deprecated:{cameraposition:{valType:"info_array",editType:"camera"}}}},9020:function(te,X,e){var A=e(43080),P=["xaxis","yaxis","zaxis"];function o(){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]}var L=o.prototype;L.merge=function(d){for(var g=0;g<3;++g){var r=d[P[g]];if(!r.visible){this.enabled[g]=!1,this.drawSides[g]=!1;continue}this.enabled[g]=r.showspikes,this.colors[g]=A(r.spikecolor),this.drawSides[g]=r.spikesides,this.lineWidth[g]=r.spikethickness}};function M(d){var g=new o;return g.merge(d),g}te.exports=M},87152:function(te,X,e){te.exports=M;var A=e(54460),P=e(3400),o=["xaxis","yaxis","zaxis"];function L(d){for(var g=new Array(3),r=0;r<3;++r){for(var t=d[r],s=new Array(t.length),a=0;a/g," "));s[a]=y,c.tickmode=u}}g.ticks=s;for(var a=0;a<3;++a){.5*(d.glplot.bounds[0][a]+d.glplot.bounds[1][a]);for(var h=0;h<2;++h)g.bounds[h][a]=d.glplot.bounds[h][a]}d.contourLevels=L(s)}},94424:function(te){function X(A,P){var o=[0,0,0,0],L,M;for(L=0;L<4;++L)for(M=0;M<4;++M)o[M]+=A[4*L+M]*P[L];return o}function e(A,P){var o=X(A.projection,X(A.view,X(A.model,[P[0],P[1],P[2],1])));return o}te.exports=e},98432:function(te,X,e){var A=e(67792).gl_plot3d,P=A.createCamera,o=A.createScene,L=e(5408),M=e(89184),d=e(24040),g=e(3400),r=g.preserveDrawingBuffer(),t=e(54460),s=e(93024),a=e(43080),c=e(16576),u=e(94424),l=e(44728),y=e(9020),h=e(87152),T=e(19280).applyAutorangeOptions,f,n,v=!1;function m(I,B){var _=document.createElement("div"),z=I.container;this.graphDiv=I.graphDiv;var O=document.createElementNS("http://www.w3.org/2000/svg","svg");O.style.position="absolute",O.style.top=O.style.left="0px",O.style.width=O.style.height="100%",O.style["z-index"]=20,O.style["pointer-events"]="none",_.appendChild(O),this.svgContainer=O,_.id=I.id,_.style.position="absolute",_.style.top=_.style.left="0px",_.style.width=_.style.height="100%",z.appendChild(_),this.fullLayout=B,this.id=I.id||"scene",this.fullSceneLayout=B[this.id],this.plotArgs=[[],{},{}],this.axesOptions=l(B,B[this.id]),this.spikeOptions=y(B[this.id]),this.container=_,this.staticMode=!!I.staticPlot,this.pixelRatio=this.pixelRatio||I.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=d.getComponentMethod("annotations3d","convert"),this.drawAnnotations=d.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var b=m.prototype;b.prepareOptions=function(){var I=this,B={canvas:I.canvas,gl:I.gl,glOptions:{preserveDrawingBuffer:r,premultipliedAlpha:!0,antialias:!0},container:I.container,axes:I.axesOptions,spikes:I.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:I.camera,pixelRatio:I.pixelRatio};if(I.staticMode){if(!n&&(f=document.createElement("canvas"),n=L({canvas:f,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!n))throw new Error("error creating static canvas/context for image server");B.gl=n,B.canvas=f}return B};var E=!0;b.tryCreatePlot=function(){var I=this,B=I.prepareOptions(),_=!0;try{I.glplot=o(B)}catch{if(I.staticMode||!E||r)_=!1;else{g.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=B.glOptions.preserveDrawingBuffer=!0,I.glplot=o(B)}catch{r=B.glOptions.preserveDrawingBuffer=!1,_=!1}}}return E=!1,_},b.initializeGLCamera=function(){var I=this,B=I.fullSceneLayout.camera,_=B.projection.type==="orthographic";I.camera=P(I.container,{center:[B.center.x,B.center.y,B.center.z],eye:[B.eye.x,B.eye.y,B.eye.z],up:[B.up.x,B.up.y,B.up.z],_ortho:_,zoomMin:.01,zoomMax:100,mode:"orbit"})},b.initializeGLPlot=function(){var I=this;I.initializeGLCamera();var B=I.tryCreatePlot();if(!B)return c(I);I.traces={},I.make4thDimension();var _=I.graphDiv,z=_.layout,O=function(){var N={};return I.isCameraChanged(z)&&(N[I.id+".camera"]=I.getCamera()),I.isAspectChanged(z)&&(N[I.id+".aspectratio"]=I.glplot.getAspectratio(),z[I.id].aspectmode!=="manual"&&(I.fullSceneLayout.aspectmode=z[I.id].aspectmode=N[I.id+".aspectmode"]="manual")),N},F=function(N){if(N.fullSceneLayout.dragmode!==!1){var V=O();N.saveLayout(z),N.graphDiv.emit("plotly_relayout",V)}};return I.glplot.canvas&&(I.glplot.canvas.addEventListener("mouseup",function(){F(I)}),I.glplot.canvas.addEventListener("touchstart",function(){v=!0}),I.glplot.canvas.addEventListener("wheel",function(N){if(_._context._scrollZoom.gl3d){if(I.camera._ortho){var V=N.deltaX>N.deltaY?1.1:.9090909090909091,j=I.glplot.getAspectratio();I.glplot.setAspectratio({x:V*j.x,y:V*j.y,z:V*j.z})}F(I)}},M?{passive:!1}:!1),I.glplot.canvas.addEventListener("mousemove",function(){if(I.fullSceneLayout.dragmode!==!1&&I.camera.mouseListener.buttons!==0){var N=O();I.graphDiv.emit("plotly_relayouting",N)}}),I.staticMode||I.glplot.canvas.addEventListener("webglcontextlost",function(N){_&&_.emit&&_.emit("plotly_webglcontextlost",{event:N,layer:I.id})},!1)),I.glplot.oncontextloss=function(){I.recoverContext()},I.glplot.onrender=function(){I.render()},!0},b.render=function(){var I=this,B=I.graphDiv,_,z=I.svgContainer,O=I.container.getBoundingClientRect();B._fullLayout._calcInverseTransform(B);var F=B._fullLayout._invScaleX,N=B._fullLayout._invScaleY,V=O.width*F,j=O.height*N;z.setAttributeNS(null,"viewBox","0 0 "+V+" "+j),z.setAttributeNS(null,"width",V),z.setAttributeNS(null,"height",j),h(I),I.glplot.axes.update(I.axesOptions);for(var $=Object.keys(I.traces),q=null,oe=I.glplot.selection,Z=0;Z<$.length;++Z)_=I.traces[$[Z]],_.data.hoverinfo!=="skip"&&_.handlePick(oe)&&(q=_),_.setContourLevels&&_.setContourLevels();function G(Le,ve,Ae){var ye=I.fullSceneLayout[Le+"axis"];return ye.type!=="log"&&(ve=ye.d2l(ve)),t.hoverLabelText(ye,ve,Ae)}if(q!==null){var re=u(I.glplot.cameraParams,oe.dataCoordinate);_=q.data;var H=B._fullData[_.index],J=oe.index,ae={xLabel:G("x",oe.traceCoordinate[0],_.xhoverformat),yLabel:G("y",oe.traceCoordinate[1],_.yhoverformat),zLabel:G("z",oe.traceCoordinate[2],_.zhoverformat)},K=s.castHoverinfo(H,I.fullLayout,J),Y=(K||"").split("+"),ie=K&&K==="all";!H.hovertemplate&&!ie&&(Y.indexOf("x")===-1&&(ae.xLabel=void 0),Y.indexOf("y")===-1&&(ae.yLabel=void 0),Y.indexOf("z")===-1&&(ae.zLabel=void 0),Y.indexOf("text")===-1&&(oe.textLabel=void 0),Y.indexOf("name")===-1&&(q.name=void 0));var ne,le=[];_.type==="cone"||_.type==="streamtube"?(ae.uLabel=G("x",oe.traceCoordinate[3],_.uhoverformat),(ie||Y.indexOf("u")!==-1)&&le.push("u: "+ae.uLabel),ae.vLabel=G("y",oe.traceCoordinate[4],_.vhoverformat),(ie||Y.indexOf("v")!==-1)&&le.push("v: "+ae.vLabel),ae.wLabel=G("z",oe.traceCoordinate[5],_.whoverformat),(ie||Y.indexOf("w")!==-1)&&le.push("w: "+ae.wLabel),ae.normLabel=oe.traceCoordinate[6].toPrecision(3),(ie||Y.indexOf("norm")!==-1)&&le.push("norm: "+ae.normLabel),_.type==="streamtube"&&(ae.divergenceLabel=oe.traceCoordinate[7].toPrecision(3),(ie||Y.indexOf("divergence")!==-1)&&le.push("divergence: "+ae.divergenceLabel)),oe.textLabel&&le.push(oe.textLabel),ne=le.join("
")):_.type==="isosurface"||_.type==="volume"?(ae.valueLabel=t.hoverLabelText(I._mockAxis,I._mockAxis.d2l(oe.traceCoordinate[3]),_.valuehoverformat),le.push("value: "+ae.valueLabel),oe.textLabel&&le.push(oe.textLabel),ne=le.join("
")):ne=oe.textLabel;var de={x:oe.traceCoordinate[0],y:oe.traceCoordinate[1],z:oe.traceCoordinate[2],data:H._input,fullData:H,curveNumber:H.index,pointNumber:J};s.appendArrayPointValue(de,H,J),_._module.eventData&&(de=H._module.eventData(de,oe,H,{},J));var we={points:[de]};if(I.fullSceneLayout.hovermode){var me=[];s.loneHover({trace:H,x:(.5+.5*re[0]/re[3])*V,y:(.5-.5*re[1]/re[3])*j,xLabel:ae.xLabel,yLabel:ae.yLabel,zLabel:ae.zLabel,text:ne,name:q.name,color:s.castHoverOption(H,J,"bgcolor")||q.color,borderColor:s.castHoverOption(H,J,"bordercolor"),fontFamily:s.castHoverOption(H,J,"font.family"),fontSize:s.castHoverOption(H,J,"font.size"),fontColor:s.castHoverOption(H,J,"font.color"),nameLength:s.castHoverOption(H,J,"namelength"),textAlign:s.castHoverOption(H,J,"align"),hovertemplate:g.castOption(H,J,"hovertemplate"),hovertemplateLabels:g.extendFlat({},de,ae),eventData:[de]},{container:z,gd:B,inOut_bbox:me}),de.bbox=me[0]}oe.distance<5&&(oe.buttons||v)?B.emit("plotly_click",we):B.emit("plotly_hover",we),this.oldEventData=we}else s.loneUnhover(z),this.oldEventData&&B.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;I.drawAnnotations(I)},b.recoverContext=function(){var I=this;I.glplot.dispose();var B=function(){if(I.glplot.gl.isContextLost()){requestAnimationFrame(B);return}if(!I.initializeGLPlot()){g.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}I.plot.apply(I,I.plotArgs)};requestAnimationFrame(B)};var p=["xaxis","yaxis","zaxis"];function S(I,B,_){for(var z=I.fullSceneLayout,O=0;O<3;O++){var F=p[O],N=F.charAt(0),V=z[F],j=B[N],$=B[N+"calendar"],q=B["_"+N+"length"];if(!g.isArrayOrTypedArray(j))_[0][O]=Math.min(_[0][O],0),_[1][O]=Math.max(_[1][O],q-1);else for(var oe,Z=0;Z<(q||j.length);Z++)if(g.isArrayOrTypedArray(j[Z]))for(var G=0;GH[1][N])H[0][N]=-1,H[1][N]=1;else{var Le=H[1][N]-H[0][N];H[0][N]-=Le/32,H[1][N]+=Le/32}if(ae=[H[0][N],H[1][N]],ae=T(ae,j),H[0][N]=ae[0],H[1][N]=ae[1],j.isReversed()){var ve=H[0][N];H[0][N]=H[1][N],H[1][N]=ve}}else ae=j.range,H[0][N]=j.r2l(ae[0]),H[1][N]=j.r2l(ae[1]);H[0][N]===H[1][N]&&(H[0][N]-=1,H[1][N]+=1),j.range=[H[0][N],H[1][N]],j.limitRange(),z.glplot.setBounds(N,{min:j.range[0]*G[N],max:j.range[1]*G[N]})}var Ae,ye=q.aspectmode;if(ye==="cube")Ae=[1,1,1];else if(ye==="manual"){var Se=q.aspectratio;Ae=[Se.x,Se.y,Se.z]}else if(ye==="auto"||ye==="data"){var _e=[1,1,1];for(N=0;N<3;++N){j=q[p[N]],$=j.type;var ze=J[$];_e[N]=Math.pow(ze.acc,1/ze.count)/G[N]}ye==="data"||Math.max.apply(null,_e)/Math.min.apply(null,_e)<=4?Ae=_e:Ae=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");q.aspectratio.x=oe.aspectratio.x=Ae[0],q.aspectratio.y=oe.aspectratio.y=Ae[1],q.aspectratio.z=oe.aspectratio.z=Ae[2],z.glplot.setAspectratio(q.aspectratio),z.viewInitial.aspectratio||(z.viewInitial.aspectratio={x:q.aspectratio.x,y:q.aspectratio.y,z:q.aspectratio.z}),z.viewInitial.aspectmode||(z.viewInitial.aspectmode=q.aspectmode);var Ie=q.domain||null,Ne=B._size||null;if(Ie&&Ne){var et=z.container.style;et.position="absolute",et.left=Ne.l+Ie.x[0]*Ne.w+"px",et.top=Ne.t+(1-Ie.y[1])*Ne.h+"px",et.width=Ne.w*(Ie.x[1]-Ie.x[0])+"px",et.height=Ne.h*(Ie.y[1]-Ie.y[0])+"px"}z.glplot.redraw()}},b.destroy=function(){var I=this;I.glplot&&(I.camera.mouseListener.enabled=!1,I.container.removeEventListener("wheel",I.camera.wheelListener),I.camera=null,I.glplot.dispose(),I.container.parentNode.removeChild(I.container),I.glplot=null)};function i(I){return[[I.eye.x,I.eye.y,I.eye.z],[I.center.x,I.center.y,I.center.z],[I.up.x,I.up.y,I.up.z]]}function C(I){return{up:{x:I.up[0],y:I.up[1],z:I.up[2]},center:{x:I.center[0],y:I.center[1],z:I.center[2]},eye:{x:I.eye[0],y:I.eye[1],z:I.eye[2]},projection:{type:I._ortho===!0?"orthographic":"perspective"}}}b.getCamera=function(){var I=this;return I.camera.view.recalcMatrix(I.camera.view.lastT()),C(I.camera)},b.setViewport=function(I){var B=this,_=I.camera;B.camera.lookAt.apply(this,i(_)),B.glplot.setAspectratio(I.aspectratio);var z=_.projection.type==="orthographic",O=B.camera._ortho;z!==O&&(B.glplot.redraw(),B.glplot.clearRGBA(),B.glplot.dispose(),B.initializeGLPlot())},b.isCameraChanged=function(I){var B=this,_=B.getCamera(),z=g.nestedProperty(I,B.id+".camera"),O=z.get();function F($,q,oe,Z){var G=["up","center","eye"],re=["x","y","z"];return q[G[oe]]&&$[G[oe]][re[Z]]===q[G[oe]][re[Z]]}var N=!1;if(O===void 0)N=!0;else{for(var V=0;V<3;V++)for(var j=0;j<3;j++)if(!F(_,O,V,j)){N=!0;break}(!O.projection||_.projection&&_.projection.type!==O.projection.type)&&(N=!0)}return N},b.isAspectChanged=function(I){var B=this,_=B.glplot.getAspectratio(),z=g.nestedProperty(I,B.id+".aspectratio"),O=z.get();return O===void 0||O.x!==_.x||O.y!==_.y||O.z!==_.z},b.saveLayout=function(I){var B=this,_=B.fullLayout,z,O,F,N,V,j,$=B.isCameraChanged(I),q=B.isAspectChanged(I),oe=$||q;if(oe){var Z={};if($&&(z=B.getCamera(),O=g.nestedProperty(I,B.id+".camera"),F=O.get(),Z[B.id+".camera"]=F),q&&(N=B.glplot.getAspectratio(),V=g.nestedProperty(I,B.id+".aspectratio"),j=V.get(),Z[B.id+".aspectratio"]=j),d.call("_storeDirectGUIEdit",I,_._preGUI,Z),$){O.set(z);var G=g.nestedProperty(_,B.id+".camera");G.set(z)}if(q){V.set(N);var re=g.nestedProperty(_,B.id+".aspectratio");re.set(N),B.glplot.redraw()}}return oe},b.updateFx=function(I,B){var _=this,z=_.camera;if(z)if(I==="orbit")z.mode="orbit",z.keyBindingMode="rotate";else if(I==="turntable"){z.up=[0,0,1],z.mode="turntable",z.keyBindingMode="rotate";var O=_.graphDiv,F=O._fullLayout,N=_.fullSceneLayout.camera,V=N.up.x,j=N.up.y,$=N.up.z;if($/Math.sqrt(V*V+j*j+$*$)<.999){var q=_.id+".camera.up",oe={x:0,y:0,z:1},Z={};Z[q]=oe;var G=O.layout;d.call("_storeDirectGUIEdit",G,F._preGUI,Z),N.up=oe,g.nestedProperty(G,q).set(oe)}}else z.keyBindingMode=I;_.fullSceneLayout.hovermode=B};function x(I,B,_){for(var z=0,O=_-1;z0)for(var V=255/N,j=0;j<3;++j)I[F+j]=Math.min(V*I[F+j],255)}}b.toImage=function(I){var B=this;I||(I="png"),B.staticMode&&B.container.appendChild(f),B.glplot.redraw();var _=B.glplot.gl,z=_.drawingBufferWidth,O=_.drawingBufferHeight;_.bindFramebuffer(_.FRAMEBUFFER,null);var F=new Uint8Array(z*O*4);_.readPixels(0,0,z,O,_.RGBA,_.UNSIGNED_BYTE,F),x(F,z,O),k(F,z,O);var N=document.createElement("canvas");N.width=z,N.height=O;var V=N.getContext("2d",{willReadFrequently:!0}),j=V.createImageData(z,O);j.data.set(F),V.putImageData(j,0,0);var $;switch(I){case"jpeg":$=N.toDataURL("image/jpeg");break;case"webp":$=N.toDataURL("image/webp");break;default:$=N.toDataURL("image/png")}return B.staticMode&&B.container.removeChild(f),$},b.setConvert=function(){for(var I=this,B=0;B<3;B++){var _=I.fullSceneLayout[p[B]];t.setConvert(_,I.fullLayout),_.setScale=g.noop}},b.make4thDimension=function(){var I=this,B=I.graphDiv,_=B._fullLayout;I._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},t.setConvert(I._mockAxis,_)},te.exports=m},52094:function(te){te.exports=function(e,A,P,o){o=o||e.length;for(var L=new Array(o),M=0;MOpenStreetMap contributors',L=['© Carto',o].join(" "),M=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under ODbL'].join(" "),d=['Map tiles by Stamen Design','under CC BY 3.0',"|",'Data by OpenStreetMap contributors','under CC BY SA'].join(" "),g={"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:o,tiles:["https://a.tile.openstreetmap.org/{z}/{x}/{y}.png","https://b.tile.openstreetmap.org/{z}/{x}/{y}.png"],tileSize:256}},layers:[{id:"plotly-osm-tiles",type:"raster",source:"plotly-osm-tiles",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"white-bg":{id:"white-bg",version:8,sources:{},layers:[{id:"white-bg",type:"background",paint:{"background-color":"#FFFFFF"},minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"carto-positron":{id:"carto-positron",version:8,sources:{"plotly-carto-positron":{type:"raster",attribution: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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"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}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-terrain":{id:"stamen-terrain",version:8,sources:{"plotly-stamen-terrain":{type:"raster",attribution:M,tiles:["https://tiles.stadiamaps.com/tiles/stamen_terrain/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-terrain",type:"raster",source:"plotly-stamen-terrain",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-toner":{id:"stamen-toner",version:8,sources:{"plotly-stamen-toner":{type:"raster",attribution:M,tiles:["https://tiles.stadiamaps.com/tiles/stamen_toner/{z}/{x}/{y}.png?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-toner",type:"raster",source:"plotly-stamen-toner",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"},"stamen-watercolor":{id:"stamen-watercolor",version:8,sources:{"plotly-stamen-watercolor":{type:"raster",attribution:d,tiles:["https://tiles.stadiamaps.com/tiles/stamen_watercolor/{z}/{x}/{y}.jpg?api_key="],tileSize:256}},layers:[{id:"plotly-stamen-watercolor",type:"raster",source:"plotly-stamen-watercolor",minzoom:0,maxzoom:22}],glyphs:"https://fonts.openmaptiles.org/{fontstack}/{range}.pbf"}},r=A(g);te.exports={requiredVersion:P,styleUrlPrefix:"mapbox://styles/mapbox/",styleUrlSuffix:"v9",styleValuesMapbox:["basic","streets","outdoors","light","dark","satellite","satellite-streets"],styleValueDflt:"basic",stylesNonMapbox:g,styleValuesNonMapbox:r,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",wrongVersionErrorMsg:["Your custom plotly.js bundle is not using the correct mapbox-gl version","Please install @plotly/mapbox-gl@"+P+"."].join(` `),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(` `),missingStyleErrorMsg:["No valid mapbox style found, please set `mapbox.style` to one of:",r.join(", "),"or register a Mapbox access token to use a Mapbox-served style."].join(` `),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(` `),mapOnErrorMsg:"Mapbox error.",mapboxLogo:{path0:"m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z",path1:"M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z",path2:"M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z",polygon:"11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34"},styleRules:{map:"overflow:hidden;position:relative;","missing-css":"display:none;",canary:"background-color:salmon;","ctrl-bottom-left":"position: absolute; pointer-events: none; z-index: 2; bottom: 0; left: 0;","ctrl-bottom-right":"position: absolute; pointer-events: none; z-index: 2; right: 0; bottom: 0;",ctrl:"clear: both; pointer-events: auto; transform: translate(0, 0);","ctrl-attrib.mapboxgl-compact .mapboxgl-ctrl-attrib-inner":"display: none;","ctrl-attrib.mapboxgl-compact:hover .mapboxgl-ctrl-attrib-inner":"display: block; margin-top:2px","ctrl-attrib.mapboxgl-compact:hover":"padding: 2px 24px 2px 4px; visibility: visible; margin-top: 6px;","ctrl-attrib.mapboxgl-compact::after":`content: ""; cursor: pointer; position: absolute; background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg"%3E %3Cpath fill="%23333333" fill-rule="evenodd" d="M4,10a6,6 0 1,0 12,0a6,6 0 1,0 -12,0 M9,7a1,1 0 1,0 2,0a1,1 0 1,0 -2,0 M9,10a1,1 0 1,1 2,0l0,3a1,1 0 1,1 -2,0"/%3E %3C/svg%3E'); background-color: rgba(255, 255, 255, 0.5); width: 24px; height: 24px; box-sizing: border-box; border-radius: 12px;`,"ctrl-attrib.mapboxgl-compact":"min-height: 20px; padding: 0; margin: 10px; position: relative; background-color: #fff; border-radius: 3px 12px 12px 3px;","ctrl-bottom-right > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; right: 0","ctrl-bottom-left > .mapboxgl-ctrl-attrib.mapboxgl-compact::after":"bottom: 0; left: 0","ctrl-bottom-left .mapboxgl-ctrl":"margin: 0 0 10px 10px; float: left;","ctrl-bottom-right .mapboxgl-ctrl":"margin: 0 10px 10px 0; float: right;","ctrl-attrib":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a":"color: rgba(0, 0, 0, 0.75); text-decoration: none; font-size: 12px","ctrl-attrib a:hover":"color: inherit; text-decoration: underline;","ctrl-attrib .mapbox-improve-map":"font-weight: bold; margin-left: 2px;","attrib-empty":"display: none;","ctrl-logo":`display:block; width: 21px; height: 21px; background-image: url('data:image/svg+xml;charset=utf-8,%3C?xml version="1.0" encoding="utf-8"?%3E %3Csvg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 21 21" style="enable-background:new 0 0 21 21;" xml:space="preserve"%3E%3Cg transform="translate(0,0.01)"%3E%3Cpath d="m 10.5,1.24 c -5.11,0 -9.25,4.15 -9.25,9.25 0,5.1 4.15,9.25 9.25,9.25 5.1,0 9.25,-4.15 9.25,-9.25 0,-5.11 -4.14,-9.25 -9.25,-9.25 z m 4.39,11.53 c -1.93,1.93 -4.78,2.31 -6.7,2.31 -0.7,0 -1.41,-0.05 -2.1,-0.16 0,0 -1.02,-5.64 2.14,-8.81 0.83,-0.83 1.95,-1.28 3.13,-1.28 1.27,0 2.49,0.51 3.39,1.42 1.84,1.84 1.89,4.75 0.14,6.52 z" style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3Cpath d="M 10.5,-0.01 C 4.7,-0.01 0,4.7 0,10.49 c 0,5.79 4.7,10.5 10.5,10.5 5.8,0 10.5,-4.7 10.5,-10.5 C 20.99,4.7 16.3,-0.01 10.5,-0.01 Z m 0,19.75 c -5.11,0 -9.25,-4.15 -9.25,-9.25 0,-5.1 4.14,-9.26 9.25,-9.26 5.11,0 9.25,4.15 9.25,9.25 0,5.13 -4.14,9.26 -9.25,9.26 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpath d="M 14.74,6.25 C 12.9,4.41 9.98,4.35 8.23,6.1 5.07,9.27 6.09,14.91 6.09,14.91 c 0,0 5.64,1.02 8.81,-2.14 C 16.64,11 16.59,8.09 14.74,6.25 Z m -2.27,4.09 -0.91,1.87 -0.9,-1.87 -1.86,-0.91 1.86,-0.9 0.9,-1.87 0.91,1.87 1.86,0.9 z" style="opacity:0.35;enable-background:new" class="st1"/%3E%3Cpolygon points="11.56,12.21 10.66,10.34 8.8,9.43 10.66,8.53 11.56,6.66 12.47,8.53 14.33,9.43 12.47,10.34 " style="opacity:0.9;fill:%23ffffff;enable-background:new" class="st0"/%3E%3C/g%3E%3C/svg%3E')`}}},89032:function(te,X,e){var A=e(3400);te.exports=function(o,L){var M=o.split(" "),d=M[0],g=M[1],r=A.isArrayOrTypedArray(L)?A.mean(L):L,t=.5+r/100,s=1.5+r/100,a=["",""],c=[0,0];switch(d){case"top":a[0]="top",c[1]=-s;break;case"bottom":a[0]="bottom",c[1]=s;break}switch(g){case"left":a[1]="right",c[0]=-t;break;case"right":a[1]="left",c[0]=t;break}var u;return a[0]&&a[1]?u=a.join("-"):a[0]?u=a[0]:a[1]?u=a[1]:u="center",{anchor:u,offset:c}}},33688:function(te,X,e){var A=e(3480),P=e(3400),o=P.strTranslate,L=P.strScale,M=e(84888).KY,d=e(9616),g=e(33428),r=e(43616),t=e(72736),s=e(14440),a="mapbox",c=X.constants=e(47552);X.name=a,X.attr="subplot",X.idRoot=a,X.idRegex=X.attrRegex=P.counterRegex(a),X.attributes={subplot:{valType:"subplotid",dflt:"mapbox",editType:"calc"}},X.layoutAttributes=e(5232),X.supplyLayoutDefaults=e(5976),X.plot=function(h){var T=h._fullLayout,f=h.calcdata,n=T._subplots[a];if(A.version!==c.requiredVersion)throw new Error(c.wrongVersionErrorMsg);var v=u(h,n);A.accessToken=v;for(var m=0;mB/2){var _=C.split("|").join("
");k.text(_).attr("data-unformatted",_).call(t.convertToTspans,y),I=r.bBox(k.node())}k.attr("transform",o(-3,-I.height+8)),x.insert("rect",".static-attribution").attr({x:-I.width-6,y:-I.height-3,width:I.width+6,height:I.height+3,fill:"rgba(255, 255, 255, 0.75)"});var z=1;I.width+6>B&&(z=B/(I.width+6));var O=[f.l+f.w*m.x[1],f.t+f.h*(1-m.y[0])];x.attr("transform",o(O[0],O[1])+L(z))}};function u(y,h){var T=y._fullLayout,f=y._context;if(f.mapboxAccessToken==="")return"";for(var n=[],v=[],m=!1,b=!1,E=0;E1&&P.warn(c.multipleTokensErrorMsg),n[0]):(v.length&&P.log(["Listed mapbox access token(s)",v.join(","),"but did not use a Mapbox map style, ignoring token(s)."].join(" ")),"")}function l(y){return typeof y=="string"&&(c.styleValuesMapbox.indexOf(y)!==-1||y.indexOf("mapbox://")===0||y.indexOf("stamen")===0)}X.updateFx=function(y){for(var h=y._fullLayout,T=h._subplots[a],f=0;f0){for(var c=0;c0}function r(s){var a={},c={};switch(s.type){case"circle":A.extendFlat(c,{"circle-radius":s.circle.radius,"circle-color":s.color,"circle-opacity":s.opacity});break;case"line":A.extendFlat(c,{"line-width":s.line.width,"line-color":s.color,"line-opacity":s.opacity,"line-dasharray":s.line.dash});break;case"fill":A.extendFlat(c,{"fill-color":s.color,"fill-outline-color":s.fill.outlinecolor,"fill-opacity":s.opacity});break;case"symbol":var u=s.symbol,l=o(u.textposition,u.iconsize);A.extendFlat(a,{"icon-image":u.icon+"-15","icon-size":u.iconsize/10,"text-field":u.text,"text-size":u.textfont.size,"text-anchor":l.anchor,"text-offset":l.offset,"symbol-placement":u.placement}),A.extendFlat(c,{"icon-color":s.color,"text-color":u.textfont.color,"text-opacity":s.opacity});break;case"raster":A.extendFlat(c,{"raster-fade-duration":0,"raster-opacity":s.opacity});break}return{layout:a,paint:c}}function t(s){var a=s.sourcetype,c=s.source,u={type:a},l;return a==="geojson"?l="data":a==="vector"?l=typeof c=="string"?"url":"tiles":a==="raster"?(l="tiles",u.tileSize=256):a==="image"&&(l="url",u.coordinates=s.coordinates),u[l]=c,s.sourceattribution&&(u.attribution=P(s.sourceattribution)),u}te.exports=function(a,c,u){var l=new M(a,c);return l.update(u),l}},5232:function(te,X,e){var A=e(3400),P=e(76308).defaultLine,o=e(86968).u,L=e(25376),M=e(52904).textposition,d=e(67824).overrideAll,g=e(31780).templatedArray,r=e(47552),t=L({});t.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var s=te.exports=d({_arrayAttrRegexps:[A.counterRegex("mapbox",".layers",!0)],domain:o({name:"mapbox"}),accesstoken:{valType:"string",noBlank:!0,strict:!0},style:{valType:"any",values:r.styleValuesMapbox.concat(r.styleValuesNonMapbox),dflt:r.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:g("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:P},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:P}},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:t,textposition:A.extendFlat({},M,{arrayOk:!1})}})},"plot","from-root");s.uirevision={valType:"any",editType:"none"}},5976:function(te,X,e){var A=e(3400),P=e(168),o=e(51272),L=e(5232);te.exports=function(r,t,s){P(r,t,s,{type:"mapbox",attributes:L,handleDefaults:M,partition:"y",accessToken:t._mapboxAccessToken})};function M(g,r,t,s){t("accesstoken",s.accessToken),t("style"),t("center.lon"),t("center.lat"),t("zoom"),t("bearing"),t("pitch");var a=t("bounds.west"),c=t("bounds.east"),u=t("bounds.south"),l=t("bounds.north");(a===void 0||c===void 0||u===void 0||l===void 0)&&delete r.bounds,o(g,r,{name:"layers",handleItemDefaults:d}),r._input=g}function d(g,r){function t(y,h){return A.coerce(g,r,L.layers,y,h)}var s=t("visible");if(s){var a=t("sourcetype"),c=a==="raster"||a==="image";t("source"),t("sourceattribution"),a==="vector"&&t("sourcelayer"),a==="image"&&t("coordinates");var u;c&&(u="raster");var l=t("type",u);c&&l!=="raster"&&(l=r.type="raster",A.log("Source types *raster* and *image* must drawn *raster* layer type.")),t("below"),t("color"),t("opacity"),t("minzoom"),t("maxzoom"),l==="circle"&&t("circle.radius"),l==="line"&&(t("line.width"),t("line.dash")),l==="fill"&&t("fill.outlinecolor"),l==="symbol"&&(t("symbol.icon"),t("symbol.iconsize"),t("symbol.text"),A.coerceFont(t,"symbol.textfont"),t("symbol.textposition"),t("symbol.placement"))}}},14440:function(te,X,e){var A=e(3480),P=e(3400),o=e(27144),L=e(24040),M=e(54460),d=e(86476),g=e(93024),r=e(72760),t=r.drawMode,s=r.selectMode,a=e(22676).prepSelect,c=e(22676).clearOutline,u=e(22676).clearSelectionsCache,l=e(22676).selectOnClick,y=e(47552),h=e(22360);function T(E,p){this.id=p,this.gd=E;var S=E._fullLayout,w=E._context;this.container=S._glcontainer.node(),this.isStatic=w.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 f=T.prototype;f.plot=function(E,p,S){var w=this,i=p[w.id];w.map&&i.accesstoken!==w.accessToken&&(w.map.remove(),w.map=null,w.styleObj=null,w.traceHash={},w.layerList=[]);var C;w.map?C=new Promise(function(x,k){w.updateMap(E,p,x,k)}):C=new Promise(function(x,k){w.createMap(E,p,x,k)}),S.push(C)},f.createMap=function(E,p,S,w){var i=this,C=p[i.id],x=i.styleObj=v(C.style,p);i.accessToken=C.accesstoken;var k=C.bounds,I=k?[[k.west,k.south],[k.east,k.north]]:null,B=i.map=new A.Map({container:i.div,style:x.style,center:b(C.center),zoom:C.zoom,bearing:C.bearing,pitch:C.pitch,maxBounds:I,interactive:!i.isStatic,preserveDrawingBuffer:i.isStatic,doubleClickZoom:!1,boxZoom:!1,attributionControl:!1}).addControl(new A.AttributionControl({compact:!0}));B._canvas.style.left="0px",B._canvas.style.top="0px",i.rejectOnError(w),i.isStatic||i.initFx(E,p);var _=[];_.push(new Promise(function(z){B.once("load",z)})),_=_.concat(o.fetchTraceGeoData(E)),Promise.all(_).then(function(){i.fillBelowLookup(E,p),i.updateData(E),i.updateLayout(p),i.resolveOnRender(S)}).catch(w)},f.updateMap=function(E,p,S,w){var i=this,C=i.map,x=p[this.id];i.rejectOnError(w);var k=[],I=v(x.style,p);JSON.stringify(i.styleObj)!==JSON.stringify(I)&&(i.styleObj=I,C.setStyle(I.style),i.traceHash={},k.push(new Promise(function(B){C.once("styledata",B)}))),k=k.concat(o.fetchTraceGeoData(E)),Promise.all(k).then(function(){i.fillBelowLookup(E,p),i.updateData(E),i.updateLayout(p),i.resolveOnRender(S)}).catch(w)},f.fillBelowLookup=function(E,p){var S=p[this.id],w=S.layers,i,C,x=this.belowLookup={},k=!1;for(i=0;i1)for(i=0;i-1&&l(I.originalEvent,w,[S.xaxis],[S.yaxis],S.id,k),B.indexOf("event")>-1&&g.click(w,I.originalEvent)}}},f.updateFx=function(E){var p=this,S=p.map,w=p.gd;if(p.isStatic)return;function i(I){var B=p.map.unproject(I);return[B.lng,B.lat]}var C=E.dragmode,x;x=function(I,B){if(B.isRect){var _=I.range={};_[p.id]=[i([B.xmin,B.ymin]),i([B.xmax,B.ymax])]}else{var z=I.lassoPoints={};z[p.id]=B.map(i)}};var k=p.dragOptions;p.dragOptions=P.extendDeep(k||{},{dragmode:E.dragmode,element:p.div,gd:w,plotinfo:{id:p.id,domain:E[p.id].domain,xaxis:p.xaxis,yaxis:p.yaxis,fillRangeItems:x},xaxes:[p.xaxis],yaxes:[p.yaxis],subplot:p.id}),S.off("click",p.onClickInPanHandler),s(C)||t(C)?(S.dragPan.disable(),S.on("zoomstart",p.clearOutline),p.dragOptions.prepFn=function(I,B,_){a(I,B,_,p.dragOptions,C)},d.init(p.dragOptions)):(S.dragPan.enable(),S.off("zoomstart",p.clearOutline),p.div.onmousedown=null,p.div.ontouchstart=null,p.div.removeEventListener("touchstart",p.div._ontouchstart),p.onClickInPanHandler=p.onClickInPanFn(p.dragOptions),S.on("click",p.onClickInPanHandler))},f.updateFramework=function(E){var p=E[this.id].domain,S=E._size,w=this.div.style;w.width=S.w*(p.x[1]-p.x[0])+"px",w.height=S.h*(p.y[1]-p.y[0])+"px",w.left=S.l+p.x[0]*S.w+"px",w.top=S.t+(1-p.y[1])*S.h+"px",this.xaxis._offset=S.l+p.x[0]*S.w,this.xaxis._length=S.w*(p.x[1]-p.x[0]),this.yaxis._offset=S.t+(1-p.y[1])*S.h,this.yaxis._length=S.h*(p.y[1]-p.y[0])},f.updateLayers=function(E){var p=E[this.id],S=p.layers,w=this.layerList,i;if(S.length!==w.length){for(i=0;i=J.width-20?(Y["text-anchor"]="start",Y.x=5):(Y["text-anchor"]="end",Y.x=J._paper.attr("width")-7),ae.attr(Y);var ie=ae.select(".js-link-to-tool"),ne=ae.select(".js-link-spacer"),le=ae.select(".js-sourcelinks");H._context.showSources&&H._context.showSources(H),H._context.showLink&&E(H,ie),ne.text(ie.text()&&le.text()?" - ":"")}};function E(H,J){J.text("");var ae=J.append("a").attr({"xlink:xlink:href":"#",class:"link--impt link--embedview","font-weight":"bold"}).text(H._context.linkText+" »");if(H._context.sendData)ae.on("click",function(){v.sendDataToCloud(H)});else{var K=window.location.pathname.split("/"),Y=window.location.search;ae.attr({"xlink:xlink:show":"new","xlink:xlink:href":"/"+K[2].split(".")[0]+"/"+K[1]+Y})}}v.sendDataToCloud=function(H){var J=(window.PLOTLYENV||{}).BASE_URL||H._context.plotlyServerURL;if(J){H.emit("plotly_beforeexport");var ae=A.select(H).append("div").attr("id","hiddenform").style("display","none"),K=ae.append("form").attr({action:J+"/external",method:"post",target:"_blank"}),Y=K.append("input").attr({type:"text",name:"data"});return Y.node().value=v.graphJson(H,!1,"keepdata"),K.node().submit(),ae.remove(),H.emit("plotly_afterexport"),!1}};var p=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],S=["year","month","dayMonth","dayMonthYear"];v.supplyDefaults=function(H,J){var ae=J&&J.skipUpdateCalc,K=H._fullLayout||{};if(K._skipDefaults){delete K._skipDefaults;return}var Y=H._fullLayout={},ie=H.layout||{},ne=H._fullData||[],le=H._fullData=[],de=H.data||[],we=H.calcdata||[],me=H._context||{},Le;H._transitionData||v.createTransitionData(H),Y._dfltTitle={plot:n(H,"Click to enter Plot title"),x:n(H,"Click to enter X axis title"),y:n(H,"Click to enter Y axis title"),colorbar:n(H,"Click to enter Colorscale title"),annotation:n(H,"new text")},Y._traceWord=n(H,"trace");var ve=C(H,p);if(Y._mapboxAccessToken=me.mapboxAccessToken,K._initialAutoSizeIsDone){var Ae=K.width,ye=K.height;v.supplyLayoutGlobalDefaults(ie,Y,ve),ie.width||(Y.width=Ae),ie.height||(Y.height=ye),v.sanitizeMargins(Y)}else{v.supplyLayoutGlobalDefaults(ie,Y,ve);var Se=!ie.width||!ie.height,_e=Y.autosize,ze=me.autosizable,Ie=Se&&(_e||ze);Ie?v.plotAutoSize(H,ie,Y):Se&&v.sanitizeMargins(Y),!_e&&Se&&(ie.width=Y.width,ie.height=Y.height)}Y._d3locale=x(ve,Y.separators),Y._extraFormat=C(H,S),Y._initialAutoSizeIsDone=!0,Y._dataLength=de.length,Y._modules=[],Y._visibleModules=[],Y._basePlotModules=[];var Ne=Y._subplots=i(),et=Y._splomAxes={x:{},y:{}},st=Y._splomSubplots={};Y._splomGridDflt={},Y._scatterStackOpts={},Y._firstScatter={},Y._alignmentOpts={},Y._colorAxes={},Y._requestRangeslider={},Y._traceUids=w(ne,de),Y._globalTransforms=(H._context||{}).globalTransforms,v.supplyDataDefaults(de,le,ie,Y);var Ze=Object.keys(et.x),Ke=Object.keys(et.y);if(Ze.length>1&&Ke.length>1){for(d.getComponentMethod("grid","sizeDefaults")(ie,Y),Le=0;Le15&&Ke.length>15&&Y.shapes.length===0&&Y.images.length===0,v.linkSubplots(le,Y,ne,K),v.cleanPlot(le,Y,ne,K);var xt=!!(K._has&&K._has("gl2d")),Je=!!(Y._has&&Y._has("gl2d")),Pe=!!(K._has&&K._has("cartesian")),Ue=!!(Y._has&&Y._has("cartesian")),He=Pe||xt,Oe=Ue||Je;He&&!Oe?K._bgLayer.remove():Oe&&!He&&(Y._shouldCreateBgLayer=!0),K._zoomlayer&&!H._dragging&&u({_fullLayout:K}),k(le,Y),f(Y,K),d.getComponentMethod("colorscale","crossTraceDefaults")(le,Y),Y._preGUI||(Y._preGUI={}),Y._tracePreGUI||(Y._tracePreGUI={});var Ce=Y._tracePreGUI,ge={},pe;for(pe in Ce)ge[pe]="old";for(Le=0;Le0){var me=1-2*ie;ne=Math.round(me*ne),le=Math.round(me*le)}}var Le=v.layoutAttributes.width.min,ve=v.layoutAttributes.height.min;ne1,ye=!ae.height&&Math.abs(K.height-le)>1;(ye||Ae)&&(Ae&&(K.width=ne),ye&&(K.height=le)),J._initialAutoSize||(J._initialAutoSize={width:ne,height:le}),v.sanitizeMargins(K)},v.supplyLayoutModuleDefaults=function(H,J,ae,K){var Y=d.componentsRegistry,ie=J._basePlotModules,ne,le,de,we=d.subplotsRegistry.cartesian;for(ne in Y)de=Y[ne],de.includeBasePlot&&de.includeBasePlot(H,J);ie.length||ie.push(we),J._has("cartesian")&&(d.getComponentMethod("grid","contentDefaults")(H,J),we.finalizeSubplots(H,J));for(var me in J._subplots)J._subplots[me].sort(t.subplotSort);for(le=0;le1&&(ae.l/=_e,ae.r/=_e)}if(ve){var ze=(ae.t+ae.b)/ve;ze>1&&(ae.t/=ze,ae.b/=ze)}var Ie=ae.xl!==void 0?ae.xl:ae.x,Ne=ae.xr!==void 0?ae.xr:ae.x,et=ae.yt!==void 0?ae.yt:ae.y,st=ae.yb!==void 0?ae.yb:ae.y;Ae[J]={l:{val:Ie,size:ae.l+Se},r:{val:Ne,size:ae.r+Se},b:{val:st,size:ae.b+Se},t:{val:et,size:ae.t+Se}},ye[J]=1}if(!K._replotting)return v.doAutoMargin(H)}};function V(H){if("_redrawFromAutoMarginCount"in H._fullLayout)return!1;var J=c.list(H,"",!0);for(var ae in J)if(J[ae].autoshift||J[ae].shift)return!0;return!1}v.doAutoMargin=function(H){var J=H._fullLayout,ae=J.width,K=J.height;J._size||(J._size={}),O(J);var Y=J._size,ie=J.margin,ne={t:0,b:0,l:0,r:0},le=t.extendFlat({},Y),de=ie.l,we=ie.r,me=ie.t,Le=ie.b,ve=J._pushmargin,Ae=J._pushmarginIds,ye=J.minreducedwidth,Se=J.minreducedheight;if(ie.autoexpand!==!1){for(var _e in ve)Ae[_e]||delete ve[_e];var ze=H._fullLayout._reservedMargin;for(var Ie in ze)for(var Ne in ze[Ie]){var et=ze[Ie][Ne];ne[Ne]=Math.max(ne[Ne],et)}ve.base={l:{val:0,size:de},r:{val:1,size:we},t:{val:1,size:me},b:{val:0,size:Le}};for(var st in ne){var Ze=0;for(var Ke in ve)Ke!=="base"&&L(ve[Ke][st].size)&&(Ze=ve[Ke][st].size>Ze?ve[Ke][st].size:Ze);var nt=Math.max(0,ie[st]-Ze);ne[st]=Math.max(0,ne[st]-nt)}for(var it in ve){var lt=ve[it].l||{},vt=ve[it].b||{},xt=lt.val,Je=lt.size,Pe=vt.val,Ue=vt.size,He=ae-ne.r-ne.l,Oe=K-ne.t-ne.b;for(var Ce in ve){if(L(Je)&&ve[Ce].r){var ge=ve[Ce].r.val,pe=ve[Ce].r.size;if(ge>xt){var Te=(Je*ge+(pe-He)*xt)/(ge-xt),be=(pe*(1-xt)+(Je-He)*(1-ge))/(ge-xt);Te+be>de+we&&(de=Te,we=be)}}if(L(Ue)&&ve[Ce].t){var ke=ve[Ce].t.val,Ve=ve[Ce].t.size;if(ke>Pe){var je=(Ue*ke+(Ve-Oe)*Pe)/(ke-Pe),at=(Ve*(1-Pe)+(Ue-Oe)*(1-ke))/(ke-Pe);je+at>Le+me&&(Le=je,me=at)}}}}}var ut=t.constrain(ae-ie.l-ie.r,F,ye),Nt=t.constrain(K-ie.t-ie.b,N,Se),Vt=Math.max(0,ae-ut),gt=Math.max(0,K-Nt);if(Vt){var Ct=(de+we)/Vt;Ct>1&&(de/=Ct,we/=Ct)}if(gt){var Yt=(Le+me)/gt;Yt>1&&(Le/=Yt,me/=Yt)}if(Y.l=Math.round(de)+ne.l,Y.r=Math.round(we)+ne.r,Y.t=Math.round(me)+ne.t,Y.b=Math.round(Le)+ne.b,Y.p=Math.round(ie.pad),Y.w=Math.round(ae)-Y.l-Y.r,Y.h=Math.round(K)-Y.t-Y.b,!J._replotting&&(v.didMarginChange(le,Y)||V(H))){"_redrawFromAutoMarginCount"in J?J._redrawFromAutoMarginCount++:J._redrawFromAutoMarginCount=1;var gr=3*(1+Object.keys(Ae).length);if(J._redrawFromAutoMarginCount1)return!0}return!1},v.graphJson=function(H,J,ae,K,Y,ie){(Y&&J&&!H._fullData||Y&&!J&&!H._fullLayout)&&v.supplyDefaults(H);var ne=Y?H._fullData:H.data,le=Y?H._fullLayout:H.layout,de=(H._transitionData||{})._frames;function we(ve,Ae){if(typeof ve=="function")return Ae?"_function_":null;if(t.isPlainObject(ve)){var ye={},Se;return Object.keys(ve).sort().forEach(function(Ne){if(["_","["].indexOf(Ne.charAt(0))===-1){if(typeof ve[Ne]=="function"){Ae&&(ye[Ne]="_function");return}if(ae==="keepdata"){if(Ne.substr(Ne.length-3)==="src")return}else if(ae==="keepstream"){if(Se=ve[Ne+"src"],typeof Se=="string"&&Se.indexOf(":")>0&&!t.isPlainObject(ve.stream))return}else if(ae!=="keepall"&&(Se=ve[Ne+"src"],typeof Se=="string"&&Se.indexOf(":")>0))return;ye[Ne]=we(ve[Ne],Ae)}}),ye}var _e=Array.isArray(ve),ze=t.isTypedArray(ve);if((_e||ze)&&ve.dtype&&ve.shape){var Ie=ve.bdata;return we({dtype:ve.dtype,shape:ve.shape,bdata:t.isArrayBuffer(Ie)?M.encode(Ie):Ie},Ae)}return _e?ve.map(function(Ne){return we(Ne,Ae)}):ze?t.simpleMap(ve,t.identity):t.isJSDate(ve)?t.ms2DateTimeLocal(+ve):ve}var me={data:(ne||[]).map(function(ve){var Ae=we(ve);return J&&delete Ae.fit,Ae})};if(!J&&(me.layout=we(le),Y)){var Le=le._size;me.layout.computed={margin:{b:Le.b,l:Le.l,r:Le.r,t:Le.t}}}return de&&(me.frames=we(de)),ie&&(me.config=we(H._context,!0)),K==="object"?me:JSON.stringify(me)},v.modifyFrames=function(H,J){var ae,K,Y,ie=H._transitionData._frames,ne=H._transitionData._frameHash;for(ae=0;ae0&&(H._transitioningWithDuration=!0),H._transitionData._interruptCallbacks.push(function(){K=!0}),ae.redraw&&H._transitionData._interruptCallbacks.push(function(){return d.call("redraw",H)}),H._transitionData._interruptCallbacks.push(function(){H.emit("plotly_transitioninterrupted",[])});var ve=0,Ae=0;function ye(){return ve++,function(){Ae++,!K&&Ae===ve&&le(Le)}}ae.runFn(ye),setTimeout(ye())})}function le(Le){if(H._transitionData)return ie(H._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(ae.redraw)return d.call("redraw",H)}).then(function(){H._transitioning=!1,H._transitioningWithDuration=!1,H.emit("plotly_transitioned",[])}).then(Le)}function de(){if(H._transitionData)return H._transitioning=!1,Y(H._transitionData._interruptCallbacks)}var we=[v.previousPromises,de,ae.prepareFn,v.rehover,v.reselect,ne],me=t.syncOrAsync(we,H);return(!me||!me.then)&&(me=Promise.resolve()),me.then(function(){return H})}v.doCalcdata=function(H,J){var ae=c.list(H),K=H._fullData,Y=H._fullLayout,ie,ne,le,de,we=new Array(K.length),me=(H.calcdata||[]).slice();for(H.calcdata=we,Y._numBoxes=0,Y._numViolins=0,Y._violinScaleGroupStats={},H._hmpixcount=0,H._hmlumcount=0,Y._piecolormap={},Y._sunburstcolormap={},Y._treemapcolormap={},Y._iciclecolormap={},Y._funnelareacolormap={},le=0;le=0;de--)if(st[de].enabled){ie._indexToPoints=st[de]._indexToPoints;break}ne&&ne.calc&&(et=ne.calc(H,ie))}(!Array.isArray(et)||!et[0])&&(et=[{x:a,y:a}]),et[0].t||(et[0].t={}),et[0].trace=ie,we[Ie]=et}}for(G(ae,K,Y),le=0;le0?S:1/0},b=o(v,m),E=A.mod(b+1,v.length);return[v[b],v[E]]}function y(n){return Math.abs(n)>1e-10?n:0}function h(n,v,m){v=v||0,m=m||0;for(var b=n.length,E=new Array(b),p=0;pve?(Ae=ie,ye=ie*ve,ze=(ne-ye)/H.h/2,Se=[K[0],K[1]],_e=[Y[0]+ze,Y[1]-ze]):(Ae=ne/ve,ye=ne,ze=(ie-Ae)/H.w/2,Se=[K[0]+ze,K[1]-ze],_e=[Y[0],Y[1]]),G.xLength2=Ae,G.yLength2=ye,G.xDomain2=Se,G.yDomain2=_e;var Ie=G.xOffset2=H.l+H.w*Se[0],Ne=G.yOffset2=H.t+H.h*(1-_e[1]),et=G.radius=Ae/we,st=G.innerRadius=G.getHole(Z)*et,Ze=G.cx=Ie-et*de[0],Ke=G.cy=Ne+et*de[3],nt=G.cxx=Ze-Ie,it=G.cyy=Ke-Ne,lt=J.side,vt;lt==="counterclockwise"?(vt=lt,lt="top"):lt==="clockwise"&&(vt=lt,lt="bottom"),G.radialAxis=G.mockAxis(oe,Z,J,{_id:"x",side:lt,_trueSide:vt,domain:[st/H.w,et/H.w]}),G.angularAxis=G.mockAxis(oe,Z,ae,{side:"right",domain:[0,Math.PI],autorange:!1}),G.doAutoRange(oe,Z),G.updateAngularAxis(oe,Z),G.updateRadialAxis(oe,Z),G.updateRadialAxisTitle(oe,Z),G.xaxis=G.mockCartesianAxis(oe,Z,{_id:"x",domain:Se}),G.yaxis=G.mockCartesianAxis(oe,Z,{_id:"y",domain:_e});var xt=G.pathSubplot();G.clipPaths.forTraces.select("path").attr("d",xt).attr("transform",d(nt,it)),re.frontplot.attr("transform",d(Ie,Ne)).call(r.setClipUrl,G._hasClipOnAxisFalse?null:G.clipIds.forTraces,G.gd),re.bg.attr("d",xt).attr("transform",d(Ze,Ke)).call(g.fill,Z.bgcolor)},N.mockAxis=function(oe,Z,G,re){var H=L.extendFlat({},G,re);return c(H,Z,oe),H},N.mockCartesianAxis=function(oe,Z,G){var re=this,H=re.isSmith,J=G._id,ae=L.extendFlat({type:"linear"},G);a(ae,oe);var K={x:[0,2],y:[1,3]};return ae.setRange=function(){var Y=re.sectorBBox,ie=K[J],ne=re.radialAxis._rl,le=(ne[1]-ne[0])/(1-re.getHole(Z));ae.range=[Y[ie[0]]*le,Y[ie[1]]*le]},ae.isPtWithinRange=J==="x"&&!H?function(Y){return re.isPtInside(Y)}:function(){return!0},ae.setRange(),ae.setScale(),ae},N.doAutoRange=function(oe,Z){var G=this,re=G.gd,H=G.radialAxis,J=G.getRadial(Z);u(re,H);var ae=H.range;if(J.range=ae.slice(),J._input.range=ae.slice(),H._rl=[H.r2l(ae[0],null,"gregorian"),H.r2l(ae[1],null,"gregorian")],H.minallowed!==void 0){var K=H.r2l(H.minallowed);H._rl[0]>H._rl[1]?H._rl[1]=Math.max(H._rl[1],K):H._rl[0]=Math.max(H._rl[0],K)}if(H.maxallowed!==void 0){var Y=H.r2l(H.maxallowed);H._rl[0]90&&ne<=270&&(le.tickangle=180);var me=we?function(et){var st=I(G,C([et.x,0]));return d(st[0]-K,st[1]-Y)}:function(et){return d(le.l2p(et.x)+ae,0)},Le=we?function(et){return k(G,et.x,-1/0,1/0)}:function(et){return G.pathArc(le.r2p(et.x)+ae)},ve=V(ie);if(G.radialTickLayout!==ve&&(H["radial-axis"].selectAll(".xtick").remove(),G.radialTickLayout=ve),de){le.setScale();var Ae=0,ye=we?(le.tickvals||[]).filter(function(et){return et>=0}).map(function(et){return s.tickText(le,et,!0,!1)}):s.calcTicks(le),Se=we?ye:s.clipEnds(le,ye),_e=s.getTickSigns(le)[2];we&&((le.ticks==="top"&&le.side==="bottom"||le.ticks==="bottom"&&le.side==="top")&&(_e=-_e),le.ticks==="top"&&le.side==="top"&&(Ae=-le.ticklen),le.ticks==="bottom"&&le.side==="bottom"&&(Ae=le.ticklen)),s.drawTicks(re,le,{vals:ye,layer:H["radial-axis"],path:s.makeTickPath(le,0,_e),transFn:me,crisp:!1}),s.drawGrid(re,le,{vals:Se,layer:H["radial-grid"],path:Le,transFn:L.noop,crisp:!1}),s.drawLabels(re,le,{vals:ye,layer:H["radial-axis"],transFn:me,labelFns:s.makeLabelFns(le,Ae)})}var ze=G.radialAxisAngle=G.vangles?O($(z(ie.angle),G.vangles)):ie.angle,Ie=d(K,Y),Ne=Ie+M(-ze);q(H["radial-axis"],de&&(ie.showticklabels||ie.ticks),{transform:Ne}),q(H["radial-grid"],de&&ie.showgrid,{transform:we?"":Ie}),q(H["radial-line"].select("line"),de&&ie.showline,{x1:we?-J:ae,y1:0,x2:J,y2:0,transform:Ne}).attr("stroke-width",ie.linewidth).call(g.stroke,ie.linecolor)},N.updateRadialAxisTitle=function(oe,Z,G){if(!this.isSmith){var re=this,H=re.gd,J=re.radius,ae=re.cx,K=re.cy,Y=re.getRadial(Z),ie=re.id+"title",ne=0;if(Y.title){var le=r.bBox(re.layers["radial-axis"].node()).height,de=Y.title.font.size,we=Y.side;ne=we==="top"?de:we==="counterclockwise"?-(le+de*.4):le+de*.8}var me=G!==void 0?G:re.radialAxisAngle,Le=z(me),ve=Math.cos(Le),Ae=Math.sin(Le),ye=ae+J/2*ve+ne*Ae,Se=K-J/2*Ae+ne*ve;re.layers["radial-axis-title"]=T.draw(H,ie,{propContainer:Y,propName:re.id+".radialaxis.title",placeholder:B(H,"Click to enter radial axis title"),attributes:{x:ye,y:Se,"text-anchor":"middle"},transform:{rotate:-me}})}},N.updateAngularAxis=function(oe,Z){var G=this,re=G.gd,H=G.layers,J=G.radius,ae=G.innerRadius,K=G.cx,Y=G.cy,ie=G.getAngular(Z),ne=G.angularAxis,le=G.isSmith;le||(G.fillViewInitialKey("angularaxis.rotation",ie.rotation),ne.setGeometry(),ne.setScale());var de=le?function(st){var Ze=I(G,C([0,st.x]));return Math.atan2(Ze[0]-K,Ze[1]-Y)-Math.PI/2}:function(st){return ne.t2g(st.x)};ne.type==="linear"&&ne.thetaunit==="radians"&&(ne.tick0=O(ne.tick0),ne.dtick=O(ne.dtick));var we=function(st){return d(K+J*Math.cos(st),Y-J*Math.sin(st))},me=le?function(st){var Ze=I(G,C([0,st.x]));return d(Ze[0],Ze[1])}:function(st){return we(de(st))},Le=le?function(st){var Ze=I(G,C([0,st.x])),Ke=Math.atan2(Ze[0]-K,Ze[1]-Y)-Math.PI/2;return d(Ze[0],Ze[1])+M(-O(Ke))}:function(st){var Ze=de(st);return we(Ze)+M(-O(Ze))},ve=le?function(st){return x(G,st.x,0,1/0)}:function(st){var Ze=de(st),Ke=Math.cos(Ze),nt=Math.sin(Ze);return"M"+[K+ae*Ke,Y-ae*nt]+"L"+[K+J*Ke,Y-J*nt]},Ae=s.makeLabelFns(ne,0),ye=Ae.labelStandoff,Se={};Se.xFn=function(st){var Ze=de(st);return Math.cos(Ze)*ye},Se.yFn=function(st){var Ze=de(st),Ke=Math.sin(Ze)>0?.2:1;return-Math.sin(Ze)*(ye+st.fontSize*Ke)+Math.abs(Math.cos(Ze))*(st.fontSize*p)},Se.anchorFn=function(st){var Ze=de(st),Ke=Math.cos(Ze);return Math.abs(Ke)<.1?"middle":Ke>0?"start":"end"},Se.heightFn=function(st,Ze,Ke){var nt=de(st);return-.5*(1+Math.sin(nt))*Ke};var _e=V(ie);G.angularTickLayout!==_e&&(H["angular-axis"].selectAll("."+ne._id+"tick").remove(),G.angularTickLayout=_e);var ze=le?[1/0].concat(ne.tickvals||[]).map(function(st){return s.tickText(ne,st,!0,!1)}):s.calcTicks(ne);le&&(ze[0].text="∞",ze[0].fontSize*=1.75);var Ie;if(Z.gridshape==="linear"?(Ie=ze.map(de),L.angleDelta(Ie[0],Ie[1])<0&&(Ie=Ie.slice().reverse())):Ie=null,G.vangles=Ie,ne.type==="category"&&(ze=ze.filter(function(st){return L.isAngleInsideSector(de(st),G.sectorInRad)})),ne.visible){var Ne=ne.ticks==="inside"?-1:1,et=(ne.linewidth||1)/2;s.drawTicks(re,ne,{vals:ze,layer:H["angular-axis"],path:"M"+Ne*et+",0h"+Ne*ne.ticklen,transFn:Le,crisp:!1}),s.drawGrid(re,ne,{vals:ze,layer:H["angular-grid"],path:ve,transFn:L.noop,crisp:!1}),s.drawLabels(re,ne,{vals:ze,layer:H["angular-axis"],repositionOnUpdate:!0,transFn:me,labelFns:Se})}q(H["angular-line"].select("path"),ie.showline,{d:G.pathSubplot(),transform:d(K,Y)}).attr("stroke-width",ie.linewidth).call(g.stroke,ie.linecolor)},N.updateFx=function(oe,Z){if(!this.gd._context.staticPlot){var G=!this.isSmith;G&&(this.updateAngularDrag(oe),this.updateRadialDrag(oe,Z,0),this.updateRadialDrag(oe,Z,1)),this.updateHoverAndMainDrag(oe)}},N.updateHoverAndMainDrag=function(oe){var Z=this,G=Z.isSmith,re=Z.gd,H=Z.layers,J=oe._zoomlayer,ae=S.MINZOOM,K=S.OFFEDGE,Y=Z.radius,ie=Z.innerRadius,ne=Z.cx,le=Z.cy,de=Z.cxx,we=Z.cyy,me=Z.sectorInRad,Le=Z.vangles,ve=Z.radialAxis,Ae=w.clampTiny,ye=w.findXYatLength,Se=w.findEnclosingVertexAngles,_e=S.cornerHalfWidth,ze=S.cornerLen/2,Ie,Ne,et=l.makeDragger(H,"path","maindrag",oe.dragmode===!1?"none":"crosshair");A.select(et).attr("d",Z.pathSubplot()).attr("transform",d(ne,le)),et.onmousemove=function(gt){h.hover(re,gt,Z.id),re._fullLayout._lasthover=et,re._fullLayout._hoversubplot=Z.id},et.onmouseout=function(gt){re._dragging||y.unhover(re,gt)};var st={element:et,gd:re,subplot:Z.id,plotinfo:{id:Z.id,xaxis:Z.xaxis,yaxis:Z.yaxis},xaxes:[Z.xaxis],yaxes:[Z.yaxis]},Ze,Ke,nt,it,lt,vt,xt,Je,Pe;function Ue(gt,Ct){return Math.sqrt(gt*gt+Ct*Ct)}function He(gt,Ct){return Ue(gt-de,Ct-we)}function Oe(gt,Ct){return Math.atan2(we-Ct,gt-de)}function Ce(gt,Ct){return[gt*Math.cos(Ct),gt*Math.sin(-Ct)]}function ge(gt,Ct){if(gt===0)return Z.pathSector(2*_e);var Yt=ze/gt,gr=Ct-Yt,ht=Ct+Yt,Ht=Math.max(0,Math.min(gt,Y)),Wt=Ht-_e,cr=Ht+_e;return"M"+Ce(Wt,gr)+"A"+[Wt,Wt]+" 0,0,0 "+Ce(Wt,ht)+"L"+Ce(cr,ht)+"A"+[cr,cr]+" 0,0,1 "+Ce(cr,gr)+"Z"}function pe(gt,Ct,Yt){if(gt===0)return Z.pathSector(2*_e);var gr=Ce(gt,Ct),ht=Ce(gt,Yt),Ht=Ae((gr[0]+ht[0])/2),Wt=Ae((gr[1]+ht[1])/2),cr,er;if(Ht&&Wt){var ct=Wt/Ht,qe=-1/ct,dt=ye(_e,ct,Ht,Wt);cr=ye(ze,qe,dt[0][0],dt[0][1]),er=ye(ze,qe,dt[1][0],dt[1][1])}else{var bt,Et;Wt?(bt=ze,Et=_e):(bt=_e,Et=ze),cr=[[Ht-bt,Wt-Et],[Ht+bt,Wt-Et]],er=[[Ht-bt,Wt+Et],[Ht+bt,Wt+Et]]}return"M"+cr.join("L")+"L"+er.reverse().join("L")+"Z"}function Te(){nt=null,it=null,lt=Z.pathSubplot(),vt=!1;var gt=re._fullLayout[Z.id];xt=P(gt.bgcolor).getLuminance(),Je=l.makeZoombox(J,xt,ne,le,lt),Je.attr("fill-rule","evenodd"),Pe=l.makeCorners(J,ne,le),v(re)}function be(gt,Ct){return Ct=Math.max(Math.min(Ct,Y),ie),gtae?(gt-1&>===1&&n(Ct,re,[Z.xaxis],[Z.yaxis],Z.id,st),Yt.indexOf("event")>-1&&h.click(re,Ct,Z.id)}st.prepFn=function(gt,Ct,Yt){var gr=re._fullLayout.dragmode,ht=et.getBoundingClientRect();re._fullLayout._calcInverseTransform(re);var Ht=re._fullLayout._invTransform;Ie=re._fullLayout._invScaleX,Ne=re._fullLayout._invScaleY;var Wt=L.apply3DTransform(Ht)(Ct-ht.left,Yt-ht.top);if(Ze=Wt[0],Ke=Wt[1],Le){var cr=w.findPolygonOffset(Y,me[0],me[1],Le);Ze+=de+cr[0],Ke+=we+cr[1]}switch(gr){case"zoom":st.clickFn=Vt,G||(Le?st.moveFn=at:st.moveFn=Ve,st.doneFn=ut,Te());break;case"select":case"lasso":f(gt,Ct,Yt,st,gr);break}},y.init(st)},N.updateRadialDrag=function(oe,Z,G){var re=this,H=re.gd,J=re.layers,ae=re.radius,K=re.innerRadius,Y=re.cx,ie=re.cy,ne=re.radialAxis,le=S.radialDragBoxSize,de=le/2;if(!ne.visible)return;var we=z(re.radialAxisAngle),me=ne._rl,Le=me[0],ve=me[1],Ae=me[G],ye=.75*(me[1]-me[0])/(1-re.getHole(Z))/ae,Se,_e,ze;G?(Se=Y+(ae+de)*Math.cos(we),_e=ie-(ae+de)*Math.sin(we),ze="radialdrag"):(Se=Y+(K-de)*Math.cos(we),_e=ie-(K-de)*Math.sin(we),ze="radialdrag-inner");var Ie=l.makeRectDragger(J,ze,"crosshair",-de,-de,le,le),Ne={element:Ie,gd:H};oe.dragmode===!1&&(Ne.dragmode=!1),q(A.select(Ie),ne.visible&&K0!=(G?Ze>Le:Ze=90||H>90&&J>=450?we=1:K<=0&&ie<=0?we=0:we=Math.max(K,ie),H<=180&&J>=180||H>180&&J>=540?ne=-1:ae>=0&&Y>=0?ne=0:ne=Math.min(ae,Y),H<=270&&J>=270||H>270&&J>=630?le=-1:K>=0&&ie>=0?le=0:le=Math.min(K,ie),J>=360?de=1:ae<=0&&Y<=0?de=0:de=Math.max(ae,Y),[ne,le,de,we]}function $(oe,Z){var G=function(H){return L.angleDist(oe,H)},re=L.findIndexOfMin(Z,G);return Z[re]}function q(oe,Z,G){return Z?(oe.attr("display",null),oe.attr(G)):oe&&oe.attr("display","none"),oe}},57696:function(te,X,e){var A=e(3400),P=e(78344),o=A.deg2rad,L=A.rad2deg;te.exports=function(s,a,c){switch(P(s,c),s._id){case"x":case"radialaxis":M(s,a);break;case"angularaxis":r(s,a);break}};function M(t,s){var a=s._subplot;t.setGeometry=function(){var c=t._rl[0],u=t._rl[1],l=a.innerRadius,y=(a.radius-l)/(u-c),h=l/y,T=c>u?function(f){return f<=0}:function(f){return f>=0};t.c2g=function(f){var n=t.c2l(f)-c;return(T(n)?n:0)+h},t.g2c=function(f){return t.l2c(f+c-h)},t.g2p=function(f){return f*y},t.c2p=function(f){return t.g2p(t.c2g(f))}}}function d(t,s){return s==="degrees"?o(t):t}function g(t,s){return s==="degrees"?L(t):t}function r(t,s){var a=t.type;if(a==="linear"){var c=t.d2c,u=t.c2d;t.d2c=function(l,y){return d(c(l),y)},t.c2d=function(l,y){return u(g(l,y))}}t.makeCalcdata=function(l,y){var h=l[y],T=l._length,f,n,v=function(S){return t.d2c(S,l.thetaunit)};if(h)for(f=new Array(T),n=0;n0?1:0}function e(M){var d=M[0],g=M[1];if(!isFinite(d)||!isFinite(g))return[1,0];var r=(d+1)*(d+1)+g*g;return[(d*d+g*g-1)/r,2*g/r]}function A(M,d){var g=d[0],r=d[1];return[g*M.radius+M.cx,-r*M.radius+M.cy]}function P(M,d){return d*M.radius}function o(M,d,g,r){var t=A(M,e([g,d])),s=t[0],a=t[1],c=A(M,e([r,d])),u=c[0],l=c[1];if(d===0)return["M"+s+","+a,"L"+u+","+l].join(" ");var y=P(M,1/Math.abs(d));return["M"+s+","+a,"A"+y+","+y+" 0 0,"+(d<0?1:0)+" "+u+","+l].join(" ")}function L(M,d,g,r){var t=P(M,1/(d+1)),s=A(M,e([d,g])),a=s[0],c=s[1],u=A(M,e([d,r])),l=u[0],y=u[1];if(X(g)!==X(r)){var h=A(M,e([d,0])),T=h[0],f=h[1];return["M"+a+","+c,"A"+t+","+t+" 0 0,"+(00){for(var d=[],g=0;g=n&&(p.min=0,S.min=0,w.min=0,l.aaxis&&delete l.aaxis.min,l.baxis&&delete l.baxis.min,l.caxis&&delete l.caxis.min)}function u(l,y,h,T){var f=s[y._name];function n(i,C){return o.coerce(l,y,f,i,C)}n("uirevision",T.uirevision),y.type="linear";var v=n("color"),m=v!==f.color.dflt?v:h.font.color,b=y._name,E=b.charAt(0).toUpperCase(),p="Component "+E,S=n("title.text",p);y._hovertitle=S===p?S:E,o.coerceFont(n,"title.font",{family:h.font.family,size:o.bigFont(h.font.size),color:m}),n("min"),r(l,y,n,"linear"),d(l,y,n,"linear"),M(l,y,n,"linear",{noAutotickangles:!0}),g(l,y,n,{outerTicks:!0});var w=n("showticklabels");w&&(o.coerceFont(n,"tickfont",{family:h.font.family,size:h.font.size,color:m}),n("tickangle"),n("tickformat")),t(l,y,n,{dfltColor:v,bgColor:h.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:f}),n("hoverformat"),n("layer")}},24696:function(te,X,e){var A=e(33428),P=e(49760),o=e(24040),L=e(3400),M=L.strTranslate,d=L._,g=e(76308),r=e(43616),t=e(78344),s=e(92880).extendFlat,a=e(7316),c=e(54460),u=e(86476),l=e(93024),y=e(72760),h=y.freeMode,T=y.rectMode,f=e(81668),n=e(22676).prepSelect,v=e(22676).selectOnClick,m=e(22676).clearOutline,b=e(22676).clearSelectionsCache,E=e(33816);function p(O,F){this.id=O.id,this.graphDiv=O.graphDiv,this.init(F),this.makeFramework(F),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}te.exports=p;var S=p.prototype;S.init=function(O){this.container=O._ternarylayer,this.defs=O._defs,this.layoutId=O._uid,this.traceHash={},this.layers={}},S.plot=function(O,F){var N=this,V=F[N.id],j=F._size;N._hasClipOnAxisFalse=!1;for(var $=0;$w*G?(ne=G,ie=ne*w):(ie=Z,ne=ie/w),le=q*ie/Z,de=oe*ne/G,K=F.l+F.w*j-ie/2,Y=F.t+F.h*(1-$)-ne/2,N.x0=K,N.y0=Y,N.w=ie,N.h=ne,N.sum=re,N.xaxis={type:"linear",range:[H+2*ae-re,re-H-2*J],domain:[j-le/2,j+le/2],_id:"x"},t(N.xaxis,N.graphDiv._fullLayout),N.xaxis.setScale(),N.xaxis.isPtWithinRange=function(Ne){return Ne.a>=N.aaxis.range[0]&&Ne.a<=N.aaxis.range[1]&&Ne.b>=N.baxis.range[1]&&Ne.b<=N.baxis.range[0]&&Ne.c>=N.caxis.range[1]&&Ne.c<=N.caxis.range[0]},N.yaxis={type:"linear",range:[H,re-J-ae],domain:[$-de/2,$+de/2],_id:"y"},t(N.yaxis,N.graphDiv._fullLayout),N.yaxis.setScale(),N.yaxis.isPtWithinRange=function(){return!0};var we=N.yaxis.domain[0],me=N.aaxis=s({},O.aaxis,{range:[H,re-J-ae],side:"left",tickangle:(+O.aaxis.tickangle||0)-30,domain:[we,we+de*w],anchor:"free",position:0,_id:"y",_length:ie});t(me,N.graphDiv._fullLayout),me.setScale();var Le=N.baxis=s({},O.baxis,{range:[re-H-ae,J],side:"bottom",domain:N.xaxis.domain,anchor:"free",position:0,_id:"x",_length:ie});t(Le,N.graphDiv._fullLayout),Le.setScale();var ve=N.caxis=s({},O.caxis,{range:[re-H-J,ae],side:"right",tickangle:(+O.caxis.tickangle||0)+30,domain:[we,we+de*w],anchor:"free",position:0,_id:"y",_length:ie});t(ve,N.graphDiv._fullLayout),ve.setScale();var Ae="M"+K+","+(Y+ne)+"h"+ie+"l-"+ie/2+",-"+ne+"Z";N.clipDef.select("path").attr("d",Ae),N.layers.plotbg.select("path").attr("d",Ae);var ye="M0,"+ne+"h"+ie+"l-"+ie/2+",-"+ne+"Z";N.clipDefRelative.select("path").attr("d",ye);var Se=M(K,Y);N.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Se),N.clipDefRelative.select("path").attr("transform",null);var _e=M(K-Le._offset,Y+ne);N.layers.baxis.attr("transform",_e),N.layers.bgrid.attr("transform",_e);var ze=M(K+ie/2,Y)+"rotate(30)"+M(0,-me._offset);N.layers.aaxis.attr("transform",ze),N.layers.agrid.attr("transform",ze);var Ie=M(K+ie/2,Y)+"rotate(-30)"+M(0,-ve._offset);N.layers.caxis.attr("transform",Ie),N.layers.cgrid.attr("transform",Ie),N.drawAxes(!0),N.layers.aline.select("path").attr("d",me.showline?"M"+K+","+(Y+ne)+"l"+ie/2+",-"+ne:"M0,0").call(g.stroke,me.linecolor||"#000").style("stroke-width",(me.linewidth||0)+"px"),N.layers.bline.select("path").attr("d",Le.showline?"M"+K+","+(Y+ne)+"h"+ie:"M0,0").call(g.stroke,Le.linecolor||"#000").style("stroke-width",(Le.linewidth||0)+"px"),N.layers.cline.select("path").attr("d",ve.showline?"M"+(K+ie/2)+","+Y+"l"+ie/2+","+ne:"M0,0").call(g.stroke,ve.linecolor||"#000").style("stroke-width",(ve.linewidth||0)+"px"),N.graphDiv._context.staticPlot||N.initInteractions(),r.setClipUrl(N.layers.frontplot,N._hasClipOnAxisFalse?null:N.clipId,N.graphDiv)},S.drawAxes=function(O){var F=this,N=F.graphDiv,V=F.id.substr(7)+"title",j=F.layers,$=F.aaxis,q=F.baxis,oe=F.caxis;if(F.drawAx($),F.drawAx(q),F.drawAx(oe),O){var Z=Math.max($.showticklabels?$.tickfont.size/2:0,(oe.showticklabels?oe.tickfont.size*.75:0)+(oe.ticks==="outside"?oe.ticklen*.87:0)),G=(q.showticklabels?q.tickfont.size:0)+(q.ticks==="outside"?q.ticklen:0)+3;j["a-title"]=f.draw(N,"a"+V,{propContainer:$,propName:F.id+".aaxis.title",placeholder:d(N,"Click to enter Component A title"),attributes:{x:F.x0+F.w/2,y:F.y0-$.title.font.size/3-Z,"text-anchor":"middle"}}),j["b-title"]=f.draw(N,"b"+V,{propContainer:q,propName:F.id+".baxis.title",placeholder:d(N,"Click to enter Component B title"),attributes:{x:F.x0-G,y:F.y0+F.h+q.title.font.size*.83+G,"text-anchor":"middle"}}),j["c-title"]=f.draw(N,"c"+V,{propContainer:oe,propName:F.id+".caxis.title",placeholder:d(N,"Click to enter Component C title"),attributes:{x:F.x0+F.w+G,y:F.y0+F.h+oe.title.font.size*.83+G,"text-anchor":"middle"}})}},S.drawAx=function(O){var F=this,N=F.graphDiv,V=O._name,j=V.charAt(0),$=O._id,q=F.layers[V],oe=30,Z=j+"tickLayout",G=i(O);F[Z]!==G&&(q.selectAll("."+$+"tick").remove(),F[Z]=G),O.setScale();var re=c.calcTicks(O),H=c.clipEnds(O,re),J=c.makeTransTickFn(O),ae=c.getTickSigns(O)[2],K=L.deg2rad(oe),Y=ae*(O.linewidth||1)/2,ie=ae*O.ticklen,ne=F.w,le=F.h,de=j==="b"?"M0,"+Y+"l"+Math.sin(K)*ie+","+Math.cos(K)*ie:"M"+Y+",0l"+Math.cos(K)*ie+","+-Math.sin(K)*ie,we={a:"M0,0l"+le+",-"+ne/2,b:"M0,0l-"+ne/2+",-"+le,c:"M0,0l-"+le+","+ne/2}[j];c.drawTicks(N,O,{vals:O.ticks==="inside"?H:re,layer:q,path:de,transFn:J,crisp:!1}),c.drawGrid(N,O,{vals:H,layer:F.layers[j+"grid"],path:we,transFn:J,crisp:!1}),c.drawLabels(N,O,{vals:re,layer:q,transFn:J,labelFns:c.makeLabelFns(O,0,oe)})};function i(O){return O.ticks+String(O.ticklen)+String(O.showticklabels)}var C=E.MINZOOM/2+.87,x="m-0.87,.5h"+C+"v3h-"+(C+5.2)+"l"+(C/2+2.6)+",-"+(C*.87+4.5)+"l2.6,1.5l-"+C/2+","+C*.87+"Z",k="m0.87,.5h-"+C+"v3h"+(C+5.2)+"l-"+(C/2+2.6)+",-"+(C*.87+4.5)+"l-2.6,1.5l"+C/2+","+C*.87+"Z",I="m0,1l"+C/2+","+C*.87+"l2.6,-1.5l-"+(C/2+2.6)+",-"+(C*.87+4.5)+"l-"+(C/2+2.6)+","+(C*.87+4.5)+"l2.6,1.5l"+C/2+",-"+C*.87+"Z",B="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",_=!0;S.clearOutline=function(){b(this.dragOptions),m(this.dragOptions.gd)},S.initInteractions=function(){var O=this,F=O.layers.plotbg.select("path").node(),N=O.graphDiv,V=N._fullLayout._zoomlayer,j,$;this.dragOptions={element:F,gd:N,plotinfo:{id:O.id,domain:N._fullLayout[O.id].domain,xaxis:O.xaxis,yaxis:O.yaxis},subplot:O.id,prepFn:function(_e,ze,Ie){O.dragOptions.xaxes=[O.xaxis],O.dragOptions.yaxes=[O.yaxis],j=N._fullLayout._invScaleX,$=N._fullLayout._invScaleY;var Ne=O.dragOptions.dragmode=N._fullLayout.dragmode;h(Ne)?O.dragOptions.minDrag=1:O.dragOptions.minDrag=void 0,Ne==="zoom"?(O.dragOptions.moveFn=Le,O.dragOptions.clickFn=ne,O.dragOptions.doneFn=ve,le(_e,ze,Ie)):Ne==="pan"?(O.dragOptions.moveFn=ye,O.dragOptions.clickFn=ne,O.dragOptions.doneFn=Se,Ae(),O.clearOutline(N)):(T(Ne)||h(Ne))&&n(_e,ze,Ie,O.dragOptions,Ne)}};var q,oe,Z,G,re,H,J,ae,K,Y;function ie(_e){var ze={};return ze[O.id+".aaxis.min"]=_e.a,ze[O.id+".baxis.min"]=_e.b,ze[O.id+".caxis.min"]=_e.c,ze}function ne(_e,ze){var Ie=N._fullLayout.clickmode;z(N),_e===2&&(N.emit("plotly_doubleclick",null),o.call("_guiRelayout",N,ie({a:0,b:0,c:0}))),Ie.indexOf("select")>-1&&_e===1&&v(ze,N,[O.xaxis],[O.yaxis],O.id,O.dragOptions),Ie.indexOf("event")>-1&&l.click(N,ze,O.id)}function le(_e,ze,Ie){var Ne=F.getBoundingClientRect();q=ze-Ne.left,oe=Ie-Ne.top,N._fullLayout._calcInverseTransform(N);var et=N._fullLayout._invTransform,st=L.apply3DTransform(et)(q,oe);q=st[0],oe=st[1],Z={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},re=Z,G=O.aaxis.range[1]-Z.a,H=P(O.graphDiv._fullLayout[O.id].bgcolor).getLuminance(),J="M0,"+O.h+"L"+O.w/2+", 0L"+O.w+","+O.h+"Z",ae=!1,K=V.append("path").attr("class","zoombox").attr("transform",M(O.x0,O.y0)).style({fill:H>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",J),Y=V.append("path").attr("class","zoombox-corners").attr("transform",M(O.x0,O.y0)).style({fill:g.background,stroke:g.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),O.clearOutline(N)}function de(_e,ze){return 1-ze/O.h}function we(_e,ze){return 1-(_e+(O.h-ze)/Math.sqrt(3))/O.w}function me(_e,ze){return(_e-(O.h-ze)/Math.sqrt(3))/O.w}function Le(_e,ze){var Ie=q+_e*j,Ne=oe+ze*$,et=Math.max(0,Math.min(1,de(q,oe),de(Ie,Ne))),st=Math.max(0,Math.min(1,we(q,oe),we(Ie,Ne))),Ze=Math.max(0,Math.min(1,me(q,oe),me(Ie,Ne))),Ke=(et/2+Ze)*O.w,nt=(1-et/2-st)*O.w,it=(Ke+nt)/2,lt=nt-Ke,vt=(1-et)*O.h,xt=vt-lt/w;lt.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),Y.transition().style("opacity",1).duration(200),ae=!0),N.emit("plotly_relayouting",ie(re))}function ve(){z(N),re!==Z&&(o.call("_guiRelayout",N,ie(re)),_&&N.data&&N._context.showTips&&(L.notifier(d(N,"Double-click to zoom back out"),"long"),_=!1))}function Ae(){Z={a:O.aaxis.range[0],b:O.baxis.range[1],c:O.caxis.range[1]},re=Z}function ye(_e,ze){var Ie=_e/O.xaxis._m,Ne=ze/O.yaxis._m;re={a:Z.a-Ne,b:Z.b+(Ie+Ne)/2,c:Z.c-(Ie-Ne)/2};var et=[re.a,re.b,re.c].sort(L.sorterAsc),st={a:et.indexOf(re.a),b:et.indexOf(re.b),c:et.indexOf(re.c)};et[0]<0&&(et[1]+et[0]/2<0?(et[2]+=et[0]+et[1],et[0]=et[1]=0):(et[2]+=et[0]/2,et[1]+=et[0]/2,et[0]=0),re={a:et[st.a],b:et[st.b],c:et[st.c]},ze=(Z.a-re.a)*O.yaxis._m,_e=(Z.c-re.c-Z.b+re.b)*O.xaxis._m);var Ze=M(O.x0+_e,O.y0+ze);O.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",Ze);var Ke=M(-_e,-ze);O.clipDefRelative.select("path").attr("transform",Ke),O.aaxis.range=[re.a,O.sum-re.b-re.c],O.baxis.range=[O.sum-re.a-re.c,re.b],O.caxis.range=[O.sum-re.a-re.b,re.c],O.drawAxes(!1),O._hasClipOnAxisFalse&&O.plotContainer.select(".scatterlayer").selectAll(".trace").call(r.hideOutsideRangePoints,O),N.emit("plotly_relayouting",ie(re))}function Se(){o.call("_guiRelayout",N,ie(re))}F.onmousemove=function(_e){l.hover(N,_e,O.id),N._fullLayout._lasthover=F,N._fullLayout._hoversubplot=O.id},F.onmouseout=function(_e){N._dragging||u.unhover(N,_e)},u.init(this.dragOptions)};function z(O){A.select(O).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}},24040:function(te,X,e){var A=e(24248),P=e(16628),o=e(52416),L=e(63620),M=e(52200).addStyleRule,d=e(92880),g=e(45464),r=e(64859),t=d.extendFlat,s=d.extendDeepAll;X.modules={},X.allCategories={},X.allTypes=[],X.subplotsRegistry={},X.transformsRegistry={},X.componentsRegistry={},X.layoutArrayContainers=[],X.layoutArrayRegexes=[],X.traceLayoutAttributes={},X.localeRegistry={},X.apiMethodRegistry={},X.collectableSubplotTypes=null,X.register=function(b){if(X.collectableSubplotTypes=null,b)b&&!Array.isArray(b)&&(b=[b]);else throw new Error("No argument passed to Plotly.register.");for(var E=0;E-1}te.exports=function(r,t){var s,a=r.data,c=r.layout,u=L([],a),l=L({},c,M(t.tileClass)),y=r._context||{};if(t.width&&(l.width=t.width),t.height&&(l.height=t.height),t.tileClass==="thumbnail"||t.tileClass==="themes__thumb"){l.annotations=[];var h=Object.keys(l);for(s=0;s")!==-1?"":c.html(l).text()});return c.remove(),u}function s(a){return a.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}te.exports=function(c,u,l){var y=c._fullLayout,h=y._paper,T=y._toppaper,f=y.width,n=y.height,v;h.insert("rect",":first-child").call(o.setRect,0,0,f,n).call(L.fill,y.paper_bgcolor);var m=y._basePlotModules||[];for(v=0;vN+O||!A(F))}for(var j=0;j=0)return y}else if(typeof y=="string"&&(y=y.trim(),y.slice(-1)==="%"&&A(y.slice(0,-1))&&(y=+y.slice(0,-1),y>=0)))return y+"%"}function l(y,h,T,f,n,v){v=v||{};var m=v.moduleHasSelected!==!1,b=v.moduleHasUnselected!==!1,E=v.moduleHasConstrain!==!1,p=v.moduleHasCliponaxis!==!1,S=v.moduleHasTextangle!==!1,w=v.moduleHasInsideanchor!==!1,i=!!v.hasPathbar,C=Array.isArray(n)||n==="auto",x=C||n==="inside",k=C||n==="outside";if(x||k){var I=s(f,"textfont",T.font),B=P.extendFlat({},I),_=y.textfont&&y.textfont.color,z=!_;if(z&&delete B.color,s(f,"insidetextfont",B),i){var O=P.extendFlat({},I);z&&delete O.color,s(f,"pathbar.textfont",O)}k&&s(f,"outsidetextfont",I),m&&f("selected.textfont.color"),b&&f("unselected.textfont.color"),E&&f("constraintext"),p&&f("cliponaxis"),S&&f("textangle"),f("texttemplate")}x&&w&&f("insidetextanchor")}te.exports={supplyDefaults:a,crossTraceDefaults:c,handleText:l,validateCornerradius:u}},52160:function(te){te.exports=function(e,A,P){return e.x="xVal"in A?A.xVal:A.x,e.y="yVal"in A?A.yVal:A.y,A.xa&&(e.xaxis=A.xa),A.ya&&(e.yaxis=A.ya),P.orientation==="h"?(e.label=e.y,e.value=e.x):(e.label=e.x,e.value=e.y),e}},60444:function(te,X,e){var A=e(38248),P=e(49760),o=e(3400).isArrayOrTypedArray;X.coerceString=function(L,M,d){if(typeof M=="string"){if(M||!L.noBlank)return M}else if((typeof M=="number"||M===!0)&&!L.strict)return String(M);return d!==void 0?d:L.dflt},X.coerceNumber=function(L,M,d){if(A(M)){M=+M;var g=L.min,r=L.max,t=g!==void 0&&Mr;if(!t)return M}return d!==void 0?d:L.dflt},X.coerceColor=function(L,M,d){return P(M).isValid()?M:d!==void 0?d:L.dflt},X.coerceEnumerated=function(L,M,d){return L.coerceNumber&&(M=+M),L.values.indexOf(M)!==-1?M:d!==void 0?d:L.dflt},X.getValue=function(L,M){var d;return o(L)?M0?de+=we:p<0&&(de-=we)}return de}function oe(le){var de=p,we=le.b,me=q(le);return A.inbox(we-de,me-de,m+(me-de)/(me-we)-1)}function Z(le){var de=p,we=le.b,me=q(le);return A.inbox(we-de,me-de,b+(me-de)/(me-we)-1)}var G=a[S+"a"],re=a[w+"a"];x=Math.abs(G.r2c(G.range[1])-G.r2c(G.range[0]));function H(le){return(i(le)+C(le))/2}var J=A.getDistanceFunction(l,i,C,H);if(A.getClosest(h,J,a),a.index!==!1&&h[a.index].p!==g){I||(F=function(le){return Math.min(B(le),le.p-f.bargroupwidth/2)},N=function(le){return Math.max(_(le),le.p+f.bargroupwidth/2)});var ae=a.index,K=h[ae],Y=T.base?K.b+K.s:K.s;a[w+"0"]=a[w+"1"]=re.c2p(K[w],!0),a[w+"LabelVal"]=Y;var ie=f.extents[f.extents.round(K.p)];a[S+"0"]=G.c2p(n?F(K):ie[0],!0),a[S+"1"]=G.c2p(n?N(K):ie[1],!0);var ne=K.orig_p!==void 0;return a[S+"LabelVal"]=ne?K.orig_p:K.p,a.labelLabel=d(G,a[S+"LabelVal"],T[S+"hoverformat"]),a.valueLabel=d(re,a[w+"LabelVal"],T[w+"hoverformat"]),a.baseLabel=d(re,K.b,T[w+"hoverformat"]),a.spikeDistance=(Z(K)+$(K))/2,a[S+"Spike"]=G.c2p(K.p,!0),L(K,T,a),a.hovertemplate=T.hovertemplate,a}}function s(a,c){var u=c.mcc||a.marker.color,l=c.mlcc||a.marker.line.color,y=M(a,c);if(o.opacity(u))return u;if(o.opacity(l)&&y)return l}te.exports={hoverPoints:r,hoverOnBars:t,getTraceColor:s}},51132:function(te,X,e){te.exports={attributes:e(20832),layoutAttributes:e(39324),supplyDefaults:e(31508).supplyDefaults,crossTraceDefaults:e(31508).crossTraceDefaults,supplyLayoutDefaults:e(37156),calc:e(71820),crossTraceCalc:e(96376).crossTraceCalc,colorbar:e(5528),arraysToCalcdata:e(84664),plot:e(98184).plot,style:e(60100).style,styleOnSelect:e(60100).styleOnSelect,hoverPoints:e(63400).hoverPoints,eventData:e(52160),selectPoints:e(45784),moduleType:"trace",name:"bar",basePlotModule:e(57952),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}},39324:function(te){te.exports={barmode:{valType:"enumerated",values:["stack","group","overlay","relative"],dflt:"group",editType:"calc"},barnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},bargap:{valType:"number",min:0,max:1,editType:"calc"},bargroupgap:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},barcornerradius:{valType:"any",editType:"calc"}}},37156:function(te,X,e){var A=e(24040),P=e(54460),o=e(3400),L=e(39324),M=e(31508).validateCornerradius;te.exports=function(d,g,r){function t(v,m){return o.coerce(d,g,L,v,m)}for(var s=!1,a=!1,c=!1,u={},l=t("barmode"),y=0;y0)-(j<0)}function E(j,$){return j<$?1:-1}function p(j,$,q,oe){var Z=[],G=[],re=oe?$:q,H=oe?q:$;return Z[0]=re.c2p(j.s0,!0),G[0]=H.c2p(j.p0,!0),Z[1]=re.c2p(j.s1,!0),G[1]=H.c2p(j.p1,!0),oe?[Z,G]:[G,Z]}function S(j,$,q,oe){if(!$.uniformtext.mode&&w(q)){var Z;return oe&&(Z=oe()),j.transition().duration(q.duration).ease(q.easing).each("end",function(){Z&&Z()}).each("interrupt",function(){Z&&Z()})}else return j}function w(j){return j&&j.duration>0}function i(j,$,q,oe,Z,G){var re=$.xaxis,H=$.yaxis,J=j._fullLayout,ae=j._context.staticPlot;Z||(Z={mode:J.barmode,norm:J.barmode,gap:J.bargap,groupgap:J.bargroupgap},a("bar",J));var K=o.makeTraceGroups(oe,q,"trace bars").each(function(Y){var ie=A.select(this),ne=Y[0].trace,le=Y[0].t,de=ne.type==="waterfall",we=ne.type==="funnel",me=ne.type==="histogram",Le=ne.type==="bar",ve=Le||we,Ae=0;de&&ne.connector.visible&&ne.connector.mode==="between"&&(Ae=ne.connector.line.width/2);var ye=ne.orientation==="h",Se=w(Z),_e=o.ensureSingle(ie,"g","points"),ze=m(ne),Ie=_e.selectAll("g.point").data(o.identity,ze);Ie.enter().append("g").classed("point",!0),Ie.exit().remove(),Ie.each(function(et,st){var Ze=A.select(this),Ke=p(et,re,H,ye),nt=Ke[0][0],it=Ke[0][1],lt=Ke[1][0],vt=Ke[1][1],xt=(ye?it-nt:vt-lt)===0;xt&&ve&&u.getLineWidth(ne,et)&&(xt=!1),xt||(xt=!P(nt)||!P(it)||!P(lt)||!P(vt)),et.isBlank=xt,xt&&(ye?it=nt:vt=lt),Ae&&!xt&&(ye?(nt-=E(nt,it)*Ae,it+=E(nt,it)*Ae):(lt-=E(lt,vt)*Ae,vt+=E(lt,vt)*Ae));var Je,Pe;if(ne.type==="waterfall"){if(!xt){var Ue=ne[et.dir].marker;Je=Ue.line.width,Pe=Ue.color}}else Je=u.getLineWidth(ne,et),Pe=et.mc||ne.marker.color;function He(qe){var dt=A.round(Je/2%1,2);return Z.gap===0&&Z.groupgap===0?A.round(Math.round(qe)-dt,2):qe}function Oe(qe,dt,bt){return bt&&qe===dt?qe:Math.abs(qe-dt)>=2?He(qe):qe>dt?Math.ceil(qe):Math.floor(qe)}var Ce=M.opacity(Pe),ge=Ce<1||Je>.01?He:Oe;j._context.staticPlot||(nt=ge(nt,it,ye),it=ge(it,nt,ye),lt=ge(lt,vt,!ye),vt=ge(vt,lt,!ye));var pe=ye?re.c2p:H.c2p,Te;et.s0>0?Te=et._sMax:et.s0<0?Te=et._sMin:Te=et.s1>0?et._sMax:et._sMin;function be(qe,dt){if(!qe)return 0;var bt=Math.abs(ye?vt-lt:it-nt),Et=Math.abs(ye?it-nt:vt-lt),Mt=ge(Math.abs(pe(Te,!0)-pe(0,!0))),_t=et.hasB?Math.min(bt/2,Et/2):Math.min(bt/2,Mt),It;if(dt==="%"){var Gt=Math.min(50,qe);It=bt*(Gt/100)}else It=qe;return ge(Math.max(Math.min(It,_t),0))}var ke=Le||me?be(le.cornerradiusvalue,le.cornerradiusform):0,Ve,je,at="M"+nt+","+lt+"V"+vt+"H"+it+"V"+lt+"Z",ut=0;if(ke&&et.s){var Nt=b(et.s0)===0||b(et.s)===b(et.s0)?et.s1:et.s0;if(ut=ge(et.hasB?0:Math.abs(pe(Te,!0)-pe(Nt,!0))),ut0?Math.sqrt(ut*(2*ke-ut)):0,ht=Vt>0?Math.max:Math.min;Ve="M"+nt+","+lt+"V"+(vt-Yt*gt)+"H"+ht(it-(ke-ut)*Vt,nt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+it+","+(vt-ke*gt-gr)+"V"+(lt+ke*gt+gr)+"A "+ke+","+ke+" 0 0 "+Ct+" "+ht(it-(ke-ut)*Vt,nt)+","+(lt+Yt*gt)+"Z"}else if(et.hasB)Ve="M"+(nt+ke*Vt)+","+lt+"A "+ke+","+ke+" 0 0 "+Ct+" "+nt+","+(lt+ke*gt)+"V"+(vt-ke*gt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+(nt+ke*Vt)+","+vt+"H"+(it-ke*Vt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+it+","+(vt-ke*gt)+"V"+(lt+ke*gt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+(it-ke*Vt)+","+lt+"Z";else{je=Math.abs(vt-lt)+ut;var Ht=je0?Math.sqrt(ut*(2*ke-ut)):0,cr=gt>0?Math.max:Math.min;Ve="M"+(nt+Ht*Vt)+","+lt+"V"+cr(vt-(ke-ut)*gt,lt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+(nt+ke*Vt-Wt)+","+vt+"H"+(it-ke*Vt+Wt)+"A "+ke+","+ke+" 0 0 "+Ct+" "+(it-Ht*Vt)+","+cr(vt-(ke-ut)*gt,lt)+"V"+lt+"Z"}}else Ve=at}else Ve=at;var er=S(o.ensureSingle(Ze,"path"),J,Z,G);if(er.style("vector-effect",ae?"none":"non-scaling-stroke").attr("d",isNaN((it-nt)*(vt-lt))||xt&&j._context.staticPlot?"M0,0Z":Ve).call(d.setClipUrl,$.layerClipId,j),!J.uniformtext.mode&&Se){var ct=d.makePointStyleFns(ne);d.singlePointStyle(et,er,ne,ct,j)}C(j,$,Ze,Y,st,nt,it,lt,vt,ke,ut,Z,G),$.layerClipId&&d.hideOutsideRangePoint(et,Ze.select("text"),re,H,ne.xcalendar,ne.ycalendar)});var Ne=ne.cliponaxis===!1;d.setClipUrl(ie,Ne?null:$.layerClipId,j)});g.getComponentMethod("errorbars","plot")(j,K,$,Z)}function C(j,$,q,oe,Z,G,re,H,J,ae,K,Y,ie){var ne=$.xaxis,le=$.yaxis,de=j._fullLayout,we;function me(je,at,ut){var Nt=o.ensureSingle(je,"text").text(at).attr({class:"bartext bartext-"+we,"text-anchor":"middle","data-notex":1}).call(d.font,ut).call(L.convertToTspans,j);return Nt}var Le=oe[0].trace,ve=Le.orientation==="h",Ae=O(de,oe,Z,ne,le);we=F(Le,Z);var ye=Y.mode==="stack"||Y.mode==="relative",Se=oe[Z],_e=!ye||Se._outmost,ze=Se.hasB,Ie=ae&&ae-K>n;if(!Ae||we==="none"||(Se.isBlank||G===re||H===J)&&(we==="auto"||we==="inside")){q.select("text").remove();return}var Ne=de.font,et=c.getBarColor(oe[Z],Le),st=c.getInsideTextFont(Le,Z,Ne,et),Ze=c.getOutsideTextFont(Le,Z,Ne),Ke=Le.insidetextanchor||"end",nt=q.datum();ve?ne.type==="log"&&nt.s0<=0&&(ne.range[0]0&&He>0,ge;Ie?ze?ge=x(vt-2*ae,xt,Ue,He,ve)||x(vt,xt-2*ae,Ue,He,ve):ve?ge=x(vt-(ae-K),xt,Ue,He,ve)||x(vt,xt-2*(ae-K),Ue,He,ve):ge=x(vt,xt-(ae-K),Ue,He,ve)||x(vt-2*(ae-K),xt,Ue,He,ve):ge=x(vt,xt,Ue,He,ve),Ce&&ge?we="inside":(we="outside",Je.remove(),Je=null)}else we="inside";if(!Je){Oe=o.ensureUniformFontSize(j,we==="outside"?Ze:st),Je=me(q,Ae,Oe);var pe=Je.attr("transform");if(Je.attr("transform",""),Pe=d.bBox(Je.node()),Ue=Pe.width,He=Pe.height,Je.attr("transform",pe),Ue<=0||He<=0){Je.remove();return}}var Te=Le.textangle,be,ke;we==="outside"?(ke=Le.constraintext==="both"||Le.constraintext==="outside",be=z(G,re,H,J,Pe,{isHorizontal:ve,constrained:ke,angle:Te})):(ke=Le.constraintext==="both"||Le.constraintext==="inside",be=B(G,re,H,J,Pe,{isHorizontal:ve,constrained:ke,angle:Te,anchor:Ke,hasB:ze,r:ae,overhead:K})),be.fontSize=Oe.size,s(Le.type==="histogram"?"bar":Le.type,be,de),Se.transform=be;var Ve=S(Je,de,Y,ie);o.setTransormAndDisplay(Ve,be)}function x(j,$,q,oe,Z){if(j<0||$<0)return!1;var G=q<=j&&oe<=$,re=q<=$&&oe<=j,H=Z?j>=q*($/oe):$>=oe*(j/q);return G||re||H}function k(j){return j==="auto"?0:j}function I(j,$){var q=Math.PI/180*$,oe=Math.abs(Math.sin(q)),Z=Math.abs(Math.cos(q));return{x:j.width*Z+j.height*oe,y:j.width*oe+j.height*Z}}function B(j,$,q,oe,Z,G){var re=!!G.isHorizontal,H=!!G.constrained,J=G.angle||0,ae=G.anchor,K=ae==="end",Y=ae==="start",ie=G.leftToRight||0,ne=(ie+1)/2,le=1-ne,de=G.hasB,we=G.r,me=G.overhead,Le=Z.width,ve=Z.height,Ae=Math.abs($-j),ye=Math.abs(oe-q),Se=Ae>2*n&&ye>2*n?n:0;Ae-=2*Se,ye-=2*Se;var _e=k(J);J==="auto"&&!(Le<=Ae&&ve<=ye)&&(Le>Ae||ve>ye)&&(!(Le>ye||ve>Ae)||Len){var et=_(j,$,q,oe,ze,we,me,re,de);Ie=et.scale,Ne=et.pad}else Ie=1,H&&(Ie=Math.min(1,Ae/ze.x,ye/ze.y)),Ne=0;var st=Z.left*le+Z.right*ne,Ze=(Z.top+Z.bottom)/2,Ke=(j+n)*le+($-n)*ne,nt=(q+oe)/2,it=0,lt=0;if(Y||K){var vt=(re?ze.x:ze.y)/2;we&&(K||de)&&(Se+=Ne);var xt=re?E(j,$):E(q,oe);re?Y?(Ke=j+xt*Se,it=-xt*vt):(Ke=$-xt*Se,it=xt*vt):Y?(nt=q+xt*Se,lt=-xt*vt):(nt=oe-xt*Se,lt=xt*vt)}return{textX:st,textY:Ze,targetX:Ke,targetY:nt,anchorX:it,anchorY:lt,scale:Ie,rotate:_e}}function _(j,$,q,oe,Z,G,re,H,J){var ae=Math.max(0,Math.abs($-j)-2*n),K=Math.max(0,Math.abs(oe-q)-2*n),Y=G-n,ie=re?Y-Math.sqrt(Y*Y-(Y-re)*(Y-re)):Y,ne=J?Y*2:H?Y-re:2*ie,le=J?Y*2:H?2*ie:Y-re,de,we,me,Le,ve;return Z.y/Z.x>=K/(ae-ne)?Le=K/Z.y:Z.y/Z.x<=(K-le)/ae?Le=ae/Z.x:!J&&H?(de=Z.x*Z.x+Z.y*Z.y/4,we=-2*Z.x*(ae-Y)-Z.y*(K/2-Y),me=(ae-Y)*(ae-Y)+(K/2-Y)*(K/2-Y)-Y*Y,Le=(-we+Math.sqrt(we*we-4*de*me))/(2*de)):J?(de=(Z.x*Z.x+Z.y*Z.y)/4,we=-Z.x*(ae/2-Y)-Z.y*(K/2-Y),me=(ae/2-Y)*(ae/2-Y)+(K/2-Y)*(K/2-Y)-Y*Y,Le=(-we+Math.sqrt(we*we-4*de*me))/(2*de)):(de=Z.x*Z.x/4+Z.y*Z.y,we=-Z.x*(ae/2-Y)-2*Z.y*(K-Y),me=(ae/2-Y)*(ae/2-Y)+(K-Y)*(K-Y)-Y*Y,Le=(-we+Math.sqrt(we*we-4*de*me))/(2*de)),Le=Math.min(1,Le),H?ve=Math.max(0,Y-Math.sqrt(Math.max(0,Y*Y-(Y-(K-Z.y*Le)/2)*(Y-(K-Z.y*Le)/2)))-re):ve=Math.max(0,Y-Math.sqrt(Math.max(0,Y*Y-(Y-(ae-Z.x*Le)/2)*(Y-(ae-Z.x*Le)/2)))-re),{scale:Le,pad:ve}}function z(j,$,q,oe,Z,G){var re=!!G.isHorizontal,H=!!G.constrained,J=G.angle||0,ae=Z.width,K=Z.height,Y=Math.abs($-j),ie=Math.abs(oe-q),ne;re?ne=ie>2*n?n:0:ne=Y>2*n?n:0;var le=1;H&&(le=re?Math.min(1,ie/K):Math.min(1,Y/ae));var de=k(J),we=I(Z,de),me=(re?we.x:we.y)/2,Le=(Z.left+Z.right)/2,ve=(Z.top+Z.bottom)/2,Ae=(j+$)/2,ye=(q+oe)/2,Se=0,_e=0,ze=re?E($,j):E(q,oe);return re?(Ae=$-ze*ne,Se=ze*me):(ye=oe+ze*ne,_e=-ze*me),{textX:Le,textY:ve,targetX:Ae,targetY:ye,anchorX:Se,anchorY:_e,scale:le,rotate:de}}function O(j,$,q,oe,Z){var G=$[0].trace,re=G.texttemplate,H;return re?H=N(j,$,q,oe,Z):G.textinfo?H=V($,q,oe,Z):H=u.getValue(G.text,q),u.coerceString(h,H)}function F(j,$){var q=u.getValue(j.textposition,$);return u.coerceEnumerated(T,q)}function N(j,$,q,oe,Z){var G=$[0].trace,re=o.castOption(G,q,"texttemplate");if(!re)return"";var H=G.type==="histogram",J=G.type==="waterfall",ae=G.type==="funnel",K=G.orientation==="h",Y,ie,ne,le;K?(Y="y",ie=Z,ne="x",le=oe):(Y="x",ie=oe,ne="y",le=Z);function de(Se){return r(ie,ie.c2l(Se),!0).text}function we(Se){return r(le,le.c2l(Se),!0).text}var me=$[q],Le={};Le.label=me.p,Le.labelLabel=Le[Y+"Label"]=de(me.p);var ve=o.castOption(G,me.i,"text");(ve===0||ve)&&(Le.text=ve),Le.value=me.s,Le.valueLabel=Le[ne+"Label"]=we(me.s);var Ae={};f(Ae,G,me.i),(H||Ae.x===void 0)&&(Ae.x=K?Le.value:Le.label),(H||Ae.y===void 0)&&(Ae.y=K?Le.label:Le.value),(H||Ae.xLabel===void 0)&&(Ae.xLabel=K?Le.valueLabel:Le.labelLabel),(H||Ae.yLabel===void 0)&&(Ae.yLabel=K?Le.labelLabel:Le.valueLabel),J&&(Le.delta=+me.rawS||me.s,Le.deltaLabel=we(Le.delta),Le.final=me.v,Le.finalLabel=we(Le.final),Le.initial=Le.final-Le.delta,Le.initialLabel=we(Le.initial)),ae&&(Le.value=me.s,Le.valueLabel=we(Le.value),Le.percentInitial=me.begR,Le.percentInitialLabel=o.formatPercent(me.begR),Le.percentPrevious=me.difR,Le.percentPreviousLabel=o.formatPercent(me.difR),Le.percentTotal=me.sumR,Le.percenTotalLabel=o.formatPercent(me.sumR));var ye=o.castOption(G,me.i,"customdata");return ye&&(Le.customdata=ye),o.texttemplateString(re,Le,j._d3locale,Ae,Le,G._meta||{})}function V(j,$,q,oe){var Z=j[0].trace,G=Z.orientation==="h",re=Z.type==="waterfall",H=Z.type==="funnel";function J(ye){var Se=G?oe:q;return r(Se,ye,!0).text}function ae(ye){var Se=G?q:oe;return r(Se,+ye,!0).text}var K=Z.textinfo,Y=j[$],ie=K.split("+"),ne=[],le,de=function(ye){return ie.indexOf(ye)!==-1};if(de("label")&&ne.push(J(j[$].p)),de("text")&&(le=o.castOption(Z,Y.i,"text"),(le===0||le)&&ne.push(le)),re){var we=+Y.rawS||Y.s,me=Y.v,Le=me-we;de("initial")&&ne.push(ae(Le)),de("delta")&&ne.push(ae(we)),de("final")&&ne.push(ae(me))}if(H){de("value")&&ne.push(ae(Y.s));var ve=0;de("percent initial")&&ve++,de("percent previous")&&ve++,de("percent total")&&ve++;var Ae=ve>1;de("percent initial")&&(le=o.formatPercent(Y.begR),Ae&&(le+=" of initial"),ne.push(le)),de("percent previous")&&(le=o.formatPercent(Y.difR),Ae&&(le+=" of previous"),ne.push(le)),de("percent total")&&(le=o.formatPercent(Y.sumR),Ae&&(le+=" of total"),ne.push(le))}return ne.join("
")}te.exports={plot:i,toMoveInsideBar:B}},45784:function(te){te.exports=function(A,P){var o=A.cd,L=A.xaxis,M=A.yaxis,d=o[0].trace,g=d.type==="funnel",r=d.orientation==="h",t=[],s;if(P===!1)for(s=0;s1||i.bargap===0&&i.bargroupgap===0&&!C[0].trace.marker.line.width)&&A.select(this).attr("shape-rendering","crispEdges")}),S.selectAll("g.points").each(function(C){var x=A.select(this),k=C[0].trace;u(x,k,p)}),M.getComponentMethod("errorbars","style")(S)}function u(p,S,w){o.pointStyle(p.selectAll("path"),S,w),l(p,S,w)}function l(p,S,w){p.selectAll("text").each(function(i){var C=A.select(this),x=L.ensureUniformFontSize(w,f(C,i,S,w));o.font(C,x)})}function y(p,S,w){var i=S[0].trace;i.selectedpoints?h(w,i,p):(u(w,i,p),M.getComponentMethod("errorbars","style")(w))}function h(p,S,w){o.selectedPointStyle(p.selectAll("path"),S),T(p.selectAll("text"),S,w)}function T(p,S,w){p.each(function(i){var C=A.select(this),x;if(i.selected){x=L.ensureUniformFontSize(w,f(C,i,S,w));var k=S.selected.textfont&&S.selected.textfont.color;k&&(x.color=k),o.font(C,x)}else o.selectedTextStyle(C,S)})}function f(p,S,w,i){var C=i._fullLayout.font,x=w.textfont;if(p.classed("bartext-inside")){var k=E(S,w);x=v(w,S.i,C,k)}else p.classed("bartext-outside")&&(x=m(w,S.i,C));return x}function n(p,S,w){return b(r,p.textfont,S,w)}function v(p,S,w,i){var C=n(p,S,w),x=p._input.textfont===void 0||p._input.textfont.color===void 0||Array.isArray(p.textfont.color)&&p.textfont.color[S]===void 0;return x&&(C={color:P.contrast(i),family:C.family,size:C.size}),b(t,p.insidetextfont,S,C)}function m(p,S,w){var i=n(p,S,w);return b(s,p.outsidetextfont,S,i)}function b(p,S,w,i){S=S||{};var C=a.getValue(S.family,w),x=a.getValue(S.size,w),k=a.getValue(S.color,w);return{family:a.coerceString(p.family,C,i.family),size:a.coerceNumber(p.size,x,i.size),color:a.coerceColor(p.color,k,i.color)}}function E(p,S){return S.type==="waterfall"?S[p.dir].marker.color:p.mcc||p.mc||S.marker.color}te.exports={style:c,styleTextPoints:l,styleOnSelect:y,getInsideTextFont:v,getOutsideTextFont:m,getBarColor:E,resizeText:d}},55592:function(te,X,e){var A=e(76308),P=e(94288).hasColorscale,o=e(27260),L=e(3400).coercePattern;te.exports=function(d,g,r,t,s){var a=r("marker.color",t),c=P(d,"marker");c&&o(d,g,s,r,{prefix:"marker.",cLetter:"c"}),r("marker.line.color",A.defaultLine),P(d,"marker.line")&&o(d,g,s,r,{prefix:"marker.line.",cLetter:"c"}),r("marker.line.width"),r("marker.opacity"),L(r,"marker.pattern",a,c),r("selected.marker.color"),r("unselected.marker.color")}},82744:function(te,X,e){var A=e(33428),P=e(3400);function o(g,r,t){var s=g._fullLayout,a=s["_"+t+"Text_minsize"];if(a){var c=s.uniformtext.mode==="hide",u;switch(t){case"funnelarea":case"pie":case"sunburst":u="g.slice";break;case"treemap":case"icicle":u="g.slice, g.pathbar";break;default:u="g.points > g.point"}r.selectAll(u).each(function(l){var y=l.transform;if(y){y.scale=c&&y.hide?0:a/y.fontSize;var h=A.select(this).select("text");P.setTransormAndDisplay(h,y)}})}}function L(g,r,t){if(t.uniformtext.mode){var s=d(g),a=t.uniformtext.minsize,c=r.scale*r.fontSize;r.hide=cl.range[1]&&(m+=Math.PI);var b=function(w){return T(v,m,[w.rp0,w.rp1],[w.thetag0,w.thetag1],h)?f+Math.min(1,Math.abs(w.thetag1-w.thetag0)/n)-1+(w.rp1-v)/(w.rp1-w.rp0)-1:1/0};if(A.getClosest(a,b,r),r.index!==!1){var E=r.index,p=a[E];r.x0=r.x1=p.ct[0],r.y0=r.y1=p.ct[1];var S=P.extendFlat({},p,{r:p.s,theta:p.p});return L(p,c,r),M(S,c,u,r),r.hovertemplate=c.hovertemplate,r.color=o(c,p),r.xLabelVal=r.yLabelVal=void 0,p.s<0&&(r.idealAlign="left"),[r]}}},94456:function(te,X,e){te.exports={moduleType:"trace",name:"barpolar",basePlotModule:e(40872),categories:["polar","bar","showLegend"],attributes:e(78100),layoutAttributes:e(9320),supplyDefaults:e(70384),supplyLayoutDefaults:e(89580),calc:e(47056).calc,crossTraceCalc:e(47056).crossTraceCalc,plot:e(42040),colorbar:e(5528),formatLabels:e(22852),style:e(60100).style,styleOnSelect:e(60100).styleOnSelect,hoverPoints:e(68896),selectPoints:e(45784),meta:{}}},9320:function(te){te.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}},89580:function(te,X,e){var A=e(3400),P=e(9320);te.exports=function(o,L,M){var d={},g;function r(a,c){return A.coerce(o[g]||{},L[g],P,a,c)}for(var t=0;t0?(l=c,y=u):(l=u,y=c);var h=M.findEnclosingVertexAngles(l,g.vangles)[0],T=M.findEnclosingVertexAngles(y,g.vangles)[1],f=[h,(l+y)/2,T];return M.pathPolygonAnnulus(s,a,l,y,f,r,t)}:function(s,a,c,u){return o.pathAnnulus(s,a,c,u,r,t)}}},63188:function(te,X,e){var A=e(98304),P=e(52904),o=e(20832),L=e(22548),M=e(29736).axisHoverFormat,d=e(21776).Ks,g=e(92880).extendFlat,r=P.marker,t=r.line;te.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:P.xperiod,yperiod:P.yperiod,xperiod0:P.xperiod0,yperiod0:P.yperiod0,xperiodalignment:P.xperiodalignment,yperiodalignment:P.yperiodalignment,xhoverformat:M("x"),yhoverformat:M("y"),name:{valType:"string",editType:"calc+clearAxisTypes"},q1:{valType:"data_array",editType:"calc+clearAxisTypes"},median:{valType:"data_array",editType:"calc+clearAxisTypes"},q3:{valType:"data_array",editType:"calc+clearAxisTypes"},lowerfence:{valType:"data_array",editType:"calc"},upperfence:{valType:"data_array",editType:"calc"},notched:{valType:"boolean",editType:"calc"},notchwidth:{valType:"number",min:0,max:.5,dflt:.25,editType:"calc"},notchspan:{valType:"data_array",editType:"calc"},boxpoints:{valType:"enumerated",values:["all","outliers","suspectedoutliers",!1],editType:"calc"},jitter:{valType:"number",min:0,max:1,editType:"calc"},pointpos:{valType:"number",min:-2,max:2,editType:"calc"},sdmultiple:{valType:"number",min:0,editType:"calc",dflt:1},sizemode:{valType:"enumerated",values:["quartiles","sd"],editType:"calc",dflt:"quartiles"},boxmean:{valType:"enumerated",values:[!0,"sd",!1],editType:"calc"},mean:{valType:"data_array",editType:"calc"},sd:{valType:"data_array",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},quartilemethod:{valType:"enumerated",values:["linear","exclusive","inclusive"],dflt:"linear",editType:"calc"},width:{valType:"number",min:0,dflt:0,editType:"calc"},marker:{outliercolor:{valType:"color",dflt:"rgba(0, 0, 0, 0)",editType:"style"},symbol:g({},r.symbol,{arrayOk:!1,editType:"plot"}),opacity:g({},r.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:g({},r.angle,{arrayOk:!1,editType:"calc"}),size:g({},r.size,{arrayOk:!1,editType:"calc"}),color:g({},r.color,{arrayOk:!1,editType:"style"}),line:{color:g({},t.color,{arrayOk:!1,dflt:L.defaultLine,editType:"style"}),width:g({},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:A(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:o.offsetgroup,alignmentgroup:o.alignmentgroup,selected:{marker:P.selected.marker,editType:"style"},unselected:{marker:P.unselected.marker,editType:"style"},text:g({},P.text,{}),hovertext:g({},P.hovertext,{}),hovertemplate:d({}),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"}}},62555:function(te,X,e){var A=e(38248),P=e(54460),o=e(1220),L=e(3400),M=e(39032).BADNUM,d=L._;te.exports=function(m,b){var E=m._fullLayout,p=P.getFromId(m,b.xaxis||"x"),S=P.getFromId(m,b.yaxis||"y"),w=[],i=b.type==="violin"?"_numViolins":"_numBoxes",C,x,k,I,B,_,z;b.orientation==="h"?(k=p,I="x",B=S,_="y",z=!!b.yperiodalignment):(k=S,I="y",B=p,_="x",z=!!b.xperiodalignment);var O=g(b,_,B,E[i]),F=O[0],N=O[1],V=L.distinctVals(F,B),j=V.vals,$=V.minDiff/2,q,oe,Z,G,re,H,J=(b.boxpoints||b.points)==="all"?L.identity:function(xt){return xt.vq.uf};if(b._hasPreCompStats){var ae=b[I],K=function(xt){return k.d2c((b[xt]||[])[C])},Y=1/0,ie=-1/0;for(C=0;C=q.q1&&q.q3>=q.med){var le=K("lowerfence");q.lf=le!==M&&le<=q.q1?le:y(q,Z,G);var de=K("upperfence");q.uf=de!==M&&de>=q.q3?de:h(q,Z,G);var we=K("mean");q.mean=we!==M?we:G?L.mean(Z,G):(q.q1+q.q3)/2;var me=K("sd");q.sd=we!==M&&me>=0?me:G?L.stdev(Z,G,q.mean):q.q3-q.q1,q.lo=T(q),q.uo=f(q);var Le=K("notchspan");Le=Le!==M&&Le>0?Le:n(q,G),q.ln=q.med-Le,q.un=q.med+Le;var ve=q.lf,Ae=q.uf;b.boxpoints&&Z.length&&(ve=Math.min(ve,Z[0]),Ae=Math.max(Ae,Z[G-1])),b.notched&&(ve=Math.min(ve,q.ln),Ae=Math.max(Ae,q.un)),q.min=ve,q.max=Ae}else{L.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+q.q1,"median = "+q.med,"q3 = "+q.q3].join(` `));var ye;q.med!==M?ye=q.med:q.q1!==M?q.q3!==M?ye=(q.q1+q.q3)/2:ye=q.q1:q.q3!==M?ye=q.q3:ye=0,q.med=ye,q.q1=q.q3=ye,q.lf=q.uf=ye,q.mean=q.sd=ye,q.ln=q.un=ye,q.min=q.max=ye}Y=Math.min(Y,q.min),ie=Math.max(ie,q.max),q.pts2=oe.filter(J),w.push(q)}}b._extremes[k._id]=P.findExtremes(k,[Y,ie],{padded:!0})}else{var Se=k.makeCalcdata(b,I),_e=r(j,$),ze=j.length,Ie=t(ze);for(C=0;C=0&&Ne0){if(q={},q.pos=q[_]=j[C],oe=q.pts=Ie[C].sort(u),Z=q[I]=oe.map(l),G=Z.length,q.min=Z[0],q.max=Z[G-1],q.mean=L.mean(Z,G),q.sd=L.stdev(Z,G,q.mean)*b.sdmultiple,q.med=L.interp(Z,.5),G%2&&(Ke||nt)){var it,lt;Ke?(it=Z.slice(0,G/2),lt=Z.slice(G/2+1)):nt&&(it=Z.slice(0,G/2+1),lt=Z.slice(G/2)),q.q1=L.interp(it,.5),q.q3=L.interp(lt,.5)}else q.q1=L.interp(Z,.25),q.q3=L.interp(Z,.75);q.lf=y(q,Z,G),q.uf=h(q,Z,G),q.lo=T(q),q.uo=f(q);var vt=n(q,G);q.ln=q.med-vt,q.un=q.med+vt,et=Math.min(et,q.ln),st=Math.max(st,q.un),q.pts2=oe.filter(J),w.push(q)}b.notched&&L.isTypedArray(Se)&&(Se=Array.from(Se)),b._extremes[k._id]=P.findExtremes(k,b.notched?Se.concat([et,st]):Se,{padded:!0})}return c(w,b),w.length>0?(w[0].t={num:E[i],dPos:$,posLetter:_,valLetter:I,labels:{med:d(m,"median:"),min:d(m,"min:"),q1:d(m,"q1:"),q3:d(m,"q3:"),max:d(m,"max:"),mean:b.boxmean==="sd"||b.sizemode==="sd"?d(m,"mean ± σ:").replace("σ",b.sdmultiple===1?"σ":b.sdmultiple+"σ"):d(m,"mean:"),lf:d(m,"lower fence:"),uf:d(m,"upper fence:")}},E[i]++,w):[{t:{empty:!0}}]};function g(v,m,b,E){var p=m in v,S=m+"0"in v,w="d"+m in v;if(p||S&&w){var i=b.makeCalcdata(v,m),C=o(v,b,m,i).vals;return[C,i]}var x;S?x=v[m+"0"]:"name"in v&&(b.type==="category"||A(v.name)&&["linear","log"].indexOf(b.type)!==-1||L.isDateTime(v.name)&&b.type==="date")?x=v.name:x=E;for(var k=b.type==="multicategory"?b.r2c_just_indices(x):b.d2c(x,0,v[m+"calendar"]),I=v._length,B=new Array(I),_=0;_1,S=1-c[g+"gap"],w=1-c[g+"groupgap"];for(y=0;y0;if(k==="positive"?(q=I*(x?1:.5),G=Z,oe=G=_):k==="negative"?(q=G=_,oe=I*(x?1:.5),re=Z):(q=oe=I,G=re=Z),ie){var ne=i.pointpos,le=i.jitter,de=i.marker.size/2,we=0;ne+le>=0&&(we=Z*(ne+le),we>q?(Y=!0,ae=de,H=we):we>G&&(ae=de,H=q)),we<=q&&(H=q);var me=0;ne-le<=0&&(me=-Z*(ne-le),me>oe?(Y=!0,K=de,J=me):me>re&&(K=de,J=oe)),me<=oe&&(J=oe)}else H=q,J=oe;var Le=new Array(T.length);for(h=0;h0?(k="v",S>0?I=Math.min(i,w):I=Math.min(w)):S>0?(k="h",I=Math.min(i)):I=0;if(!I){u.visible=!1;return}u._length=I;var F=l("orientation",k);u._hasPreCompStats?F==="v"&&S===0?(l("x0",0),l("dx",1)):F==="h"&&p===0&&(l("y0",0),l("dy",1)):F==="v"&&S===0?l("x0"):F==="h"&&p===0&&l("y0");var N=P.getComponentMethod("calendars","handleTraceDefaults");N(c,u,["x","y"],y)}function s(c,u,l,y){var h=y.prefix,T=A.coerce2(c,u,g,"marker.outliercolor"),f=l("marker.line.outliercolor"),n="outliers";u._hasPreCompStats?n="all":(T||f)&&(n="suspectedoutliers");var v=l(h+"points",n);v?(l("jitter",v==="all"?.3:0),l("pointpos",v==="all"?-1.5:0),l("marker.symbol"),l("marker.opacity"),l("marker.size"),l("marker.angle"),l("marker.color",u.line.color),l("marker.line.color"),l("marker.line.width"),v==="suspectedoutliers"&&(l("marker.line.outliercolor",u.marker.color),l("marker.line.outlierwidth")),l("selected.marker.color"),l("unselected.marker.color"),l("selected.marker.size"),l("unselected.marker.size"),l("text"),l("hovertext")):delete u.marker;var m=l("hoveron");(m==="all"||m.indexOf("points")!==-1)&&l("hovertemplate"),A.coerceSelectionMarkerOpacity(u,l)}function a(c,u){var l,y;function h(n){return A.coerce(y._input,y,g,n)}for(var T=0;Tb.lo&&(F.so=!0)}return p});m.enter().append("path").classed("point",!0),m.exit().remove(),m.call(o.translatePoints,l,y)}function t(s,a,c,u){var l=a.val,y=a.pos,h=!!y.rangebreaks,T=u.bPos,f=u.bPosPxOffset||0,n=c.boxmean||(c.meanline||{}).visible,v,m;Array.isArray(u.bdPos)?(v=u.bdPos[0],m=u.bdPos[1]):(v=u.bdPos,m=u.bdPos);var b=s.selectAll("path.mean").data(c.type==="box"&&c.boxmean||c.type==="violin"&&c.box.visible&&c.meanline.visible?P.identity:[]);b.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),b.exit().remove(),b.each(function(E){var p=y.c2l(E.pos+T,!0),S=y.l2p(p-v)+f,w=y.l2p(p+m)+f,i=h?(S+w)/2:y.l2p(p)+f,C=l.c2p(E.mean,!0),x=l.c2p(E.mean-E.sd,!0),k=l.c2p(E.mean+E.sd,!0);c.orientation==="h"?A.select(this).attr("d","M"+C+","+S+"V"+w+(n==="sd"?"m0,0L"+x+","+i+"L"+C+","+S+"L"+k+","+i+"Z":"")):A.select(this).attr("d","M"+S+","+C+"H"+w+(n==="sd"?"m0,0L"+i+","+x+"L"+S+","+C+"L"+i+","+k+"Z":""))})}te.exports={plot:d,plotBoxAndWhiskers:g,plotPoints:r,plotBoxMean:t}},8264:function(te){te.exports=function(e,A){var P=e.cd,o=e.xaxis,L=e.yaxis,M=[],d,g;if(A===!1)for(d=0;d=10)return null;for(var M=1/0,d=-1/0,g=o.length,r=0;r0?Math.floor:Math.ceil,z=I>0?Math.ceil:Math.floor,O=I>0?Math.min:Math.max,F=I>0?Math.max:Math.min,N=_(x+B),V=z(k-B);c=C(x);var j=[[c]];for(d=N;d*I=0;L--)M[s-L]=e[a][L],d[s-L]=A[a][L];for(g.push({x:M,y:d,bicubic:r}),L=a,M=[],d=[];L>=0;L--)M[a-L]=e[L][0],d[a-L]=A[L][0];return g.push({x:M,y:d,bicubic:t}),g}},19216:function(te,X,e){var A=e(54460),P=e(92880).extendFlat;te.exports=function(L,M,d){var g,r,t,s,a,c,u,l,y,h,T,f,n,v,m=L["_"+M],b=L[M+"axis"],E=b._gridlines=[],p=b._minorgridlines=[],S=b._boundarylines=[],w=L["_"+d],i=L[d+"axis"];b.tickmode==="array"&&(b.tickvals=m.slice());var C=L._xctrl,x=L._yctrl,k=C[0].length,I=C.length,B=L._a.length,_=L._b.length;A.prepTicks(b),b.tickmode==="array"&&delete b.tickvals;var z=b.smoothing?3:1;function O(N){var V,j,$,q,oe,Z,G,re,H,J,ae,K,Y=[],ie=[],ne={};if(M==="b")for(j=L.b2j(N),$=Math.floor(Math.max(0,Math.min(_-2,j))),q=j-$,ne.length=_,ne.crossLength=B,ne.xy=function(le){return L.evalxy([],le,j)},ne.dxy=function(le,de){return L.dxydi([],le,$,de,q)},V=0;V0&&(H=L.dxydi([],V-1,$,0,q),Y.push(oe[0]+H[0]/3),ie.push(oe[1]+H[1]/3),J=L.dxydi([],V-1,$,1,q),Y.push(re[0]-J[0]/3),ie.push(re[1]-J[1]/3)),Y.push(re[0]),ie.push(re[1]),oe=re;else for(V=L.a2i(N),Z=Math.floor(Math.max(0,Math.min(B-2,V))),G=V-Z,ne.length=B,ne.crossLength=_,ne.xy=function(le){return L.evalxy([],V,le)},ne.dxy=function(le,de){return L.dxydj([],Z,le,G,de)},j=0;j<_;j++)$=Math.min(_-2,j),q=j-$,re=L.evalxy([],V,j),i.smoothing&&j>0&&(ae=L.dxydj([],Z,j-1,G,0),Y.push(oe[0]+ae[0]/3),ie.push(oe[1]+ae[1]/3),K=L.dxydj([],Z,j-1,G,1),Y.push(re[0]-K[0]/3),ie.push(re[1]-K[1]/3)),Y.push(re[0]),ie.push(re[1]),oe=re;return ne.axisLetter=M,ne.axis=b,ne.crossAxis=i,ne.value=N,ne.constvar=d,ne.index=l,ne.x=Y,ne.y=ie,ne.smoothing=i.smoothing,ne}function F(N){var V,j,$,q,oe,Z=[],G=[],re={};if(re.length=m.length,re.crossLength=w.length,M==="b")for($=Math.max(0,Math.min(_-2,N)),oe=Math.min(1,Math.max(0,N-$)),re.xy=function(H){return L.evalxy([],H,N)},re.dxy=function(H,J){return L.dxydi([],H,$,J,oe)},V=0;Vm.length-1)&&E.push(P(F(r),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(l=c;lm.length-1)&&!(T<0||T>m.length-1))for(f=m[t],n=m[T],g=0;gm[m.length-1])&&p.push(P(O(h),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash})));b.startline&&S.push(P(F(0),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&S.push(P(F(m.length-1),{color:b.endlinecolor,width:b.endlinewidth}))}else{for(s=5e-15,a=[Math.floor((m[m.length-1]-b.tick0)/b.dtick*(1+s)),Math.ceil((m[0]-b.tick0)/b.dtick/(1+s))].sort(function(N,V){return N-V}),c=a[0],u=a[1],l=c;l<=u;l++)y=b.tick0+b.dtick*l,E.push(P(O(y),{color:b.gridcolor,width:b.gridwidth,dash:b.griddash}));for(l=c-1;lm[m.length-1])&&p.push(P(O(h),{color:b.minorgridcolor,width:b.minorgridwidth,dash:b.minorgriddash}));b.startline&&S.push(P(O(m[0]),{color:b.startlinecolor,width:b.startlinewidth})),b.endline&&S.push(P(O(m[m.length-1]),{color:b.endlinecolor,width:b.endlinewidth}))}}},14724:function(te,X,e){var A=e(54460),P=e(92880).extendFlat;te.exports=function(L,M){var d,g,r,t,s,a=M._labels=[],c=M._gridlines;for(d=0;dL.length&&(o=o.slice(0,L.length)):o=[],d=0;d90&&(u-=180,r=-r),{angle:u,flip:r,p:e.c2p(o,A,P),offsetMultplier:t}}},164:function(te,X,e){var A=e(33428),P=e(43616),o=e(87072),L=e(53416),M=e(15584),d=e(72736),g=e(3400),r=g.strRotate,t=g.strTranslate,s=e(84284);te.exports=function(n,v,m,b){var E=n._context.staticPlot,p=v.xaxis,S=v.yaxis,w=n._fullLayout,i=w._clips;g.makeTraceGroups(b,m,"trace").each(function(C){var x=A.select(this),k=C[0],I=k.trace,B=I.aaxis,_=I.baxis,z=g.ensureSingle(x,"g","minorlayer"),O=g.ensureSingle(x,"g","majorlayer"),F=g.ensureSingle(x,"g","boundarylayer"),N=g.ensureSingle(x,"g","labellayer");x.style("opacity",I.opacity),c(p,S,O,B,"a",B._gridlines,!0),c(p,S,O,_,"b",_._gridlines,!0),c(p,S,z,B,"a",B._minorgridlines,!0),c(p,S,z,_,"b",_._minorgridlines,!0),c(p,S,F,B,"a-boundary",B._boundarylines,E),c(p,S,F,_,"b-boundary",_._boundarylines,E);var V=u(n,p,S,I,k,N,B._labels,"a-label"),j=u(n,p,S,I,k,N,_._labels,"b-label");l(n,N,I,k,p,S,V,j),a(I,k,i,p,S)})};function a(f,n,v,m,b){var E,p,S,w,i=v.select("#"+f._clipPathId);i.size()||(i=v.append("clipPath").classed("carpetclip",!0));var C=g.ensureSingle(i,"path","carpetboundary"),x=n.clipsegments,k=[];for(w=0;w0?"start":"end","data-notex":1}).call(P.font,x.font).text(x.text).call(d.convertToTspans,f),O=P.bBox(this);z.attr("transform",t(I.p[0],I.p[1])+r(I.angle)+t(x.axis.labelpadding*_,O.height*.3)),i=Math.max(i,O.width+x.axis.labelpadding)}),w.exit().remove(),C.maxExtent=i,C}function l(f,n,v,m,b,E,p,S){var w,i,C,x,k=g.aggNums(Math.min,null,v.a),I=g.aggNums(Math.max,null,v.a),B=g.aggNums(Math.min,null,v.b),_=g.aggNums(Math.max,null,v.b);w=.5*(k+I),i=B,C=v.ab2xy(w,i,!0),x=v.dxyda_rough(w,i),p.angle===void 0&&g.extendFlat(p,M(v,b,E,C,v.dxydb_rough(w,i))),T(f,n,v,m,C,x,v.aaxis,b,E,p,"a-title"),w=k,i=.5*(B+_),C=v.ab2xy(w,i,!0),x=v.dxydb_rough(w,i),S.angle===void 0&&g.extendFlat(S,M(v,b,E,C,v.dxyda_rough(w,i))),T(f,n,v,m,C,x,v.baxis,b,E,S,"b-title")}var y=s.LINE_SPACING,h=(1-s.MID_SHIFT)/y+1;function T(f,n,v,m,b,E,p,S,w,i,C){var x=[];p.title.text&&x.push(p.title.text);var k=n.selectAll("text."+C).data(x),I=i.maxExtent;k.enter().append("text").classed(C,!0),k.each(function(){var B=M(v,S,w,b,E);["start","both"].indexOf(p.showticklabels)===-1&&(I=0);var _=p.title.font.size;I+=_+p.title.offset;var z=i.angle+(i.flip<0?180:0),O=(z-B.angle+450)%360,F=O>90&&O<270,N=A.select(this);N.text(p.title.text).call(d.convertToTspans,f),F&&(I=(-d.lineCount(N)+h)*y*_-I),N.attr("transform",t(B.p[0],B.p[1])+r(B.angle)+t(0,I)).attr("text-anchor","middle").call(P.font,p.title.font)}),k.exit().remove()}},81e3:function(te,X,e){var A=e(24588),P=e(14952).findBin,o=e(30180),L=e(29056),M=e(26435),d=e(24464);te.exports=function(r){var t=r._a,s=r._b,a=t.length,c=s.length,u=r.aaxis,l=r.baxis,y=t[0],h=t[a-1],T=s[0],f=s[c-1],n=t[t.length-1]-t[0],v=s[s.length-1]-s[0],m=n*A.RELATIVE_CULL_TOLERANCE,b=v*A.RELATIVE_CULL_TOLERANCE;y-=m,h+=m,T-=b,f+=b,r.isVisible=function(E,p){return E>y&&ET&&ph||pf},r.setScale=function(){var E=r._x,p=r._y,S=o(r._xctrl,r._yctrl,E,p,u.smoothing,l.smoothing);r._xctrl=S[0],r._yctrl=S[1],r.evalxy=L([r._xctrl,r._yctrl],a,c,u.smoothing,l.smoothing),r.dxydi=M([r._xctrl,r._yctrl],u.smoothing,l.smoothing),r.dxydj=d([r._xctrl,r._yctrl],u.smoothing,l.smoothing)},r.i2a=function(E){var p=Math.max(0,Math.floor(E[0]),a-2),S=E[0]-p;return(1-S)*t[p]+S*t[p+1]},r.j2b=function(E){var p=Math.max(0,Math.floor(E[1]),a-2),S=E[1]-p;return(1-S)*s[p]+S*s[p+1]},r.ij2ab=function(E){return[r.i2a(E[0]),r.j2b(E[1])]},r.a2i=function(E){var p=Math.max(0,Math.min(P(E,t),a-2)),S=t[p],w=t[p+1];return Math.max(0,Math.min(a-1,p+(E-S)/(w-S)))},r.b2j=function(E){var p=Math.max(0,Math.min(P(E,s),c-2)),S=s[p],w=s[p+1];return Math.max(0,Math.min(c-1,p+(E-S)/(w-S)))},r.ab2ij=function(E){return[r.a2i(E[0]),r.b2j(E[1])]},r.i2c=function(E,p){return r.evalxy([],E,p)},r.ab2xy=function(E,p,S){if(!S&&(Et[a-1]|ps[c-1]))return[!1,!1];var w=r.a2i(E),i=r.b2j(p),C=r.evalxy([],w,i);if(S){var x=0,k=0,I=[],B,_,z,O;Et[a-1]?(B=a-2,_=1,x=(E-t[a-1])/(t[a-1]-t[a-2])):(B=Math.max(0,Math.min(a-2,Math.floor(w))),_=w-B),ps[c-1]?(z=c-2,O=1,k=(p-s[c-1])/(s[c-1]-s[c-2])):(z=Math.max(0,Math.min(c-2,Math.floor(i))),O=i-z),x&&(r.dxydi(I,B,z,_,O),C[0]+=I[0]*x,C[1]+=I[1]*x),k&&(r.dxydj(I,B,z,_,O),C[0]+=I[0]*k,C[1]+=I[1]*k)}return C},r.c2p=function(E,p,S){return[p.c2p(E[0]),S.c2p(E[1])]},r.p2x=function(E,p,S){return[p.p2c(E[0]),S.p2c(E[1])]},r.dadi=function(E){var p=Math.max(0,Math.min(t.length-2,E));return t[p+1]-t[p]},r.dbdj=function(E){var p=Math.max(0,Math.min(s.length-2,E));return s[p+1]-s[p]},r.dxyda=function(E,p,S,w){var i=r.dxydi(null,E,p,S,w),C=r.dadi(E,S);return[i[0]/C,i[1]/C]},r.dxydb=function(E,p,S,w){var i=r.dxydj(null,E,p,S,w),C=r.dbdj(p,w);return[i[0]/C,i[1]/C]},r.dxyda_rough=function(E,p,S){var w=n*(S||.1),i=r.ab2xy(E+w,p,!0),C=r.ab2xy(E-w,p,!0);return[(i[0]-C[0])*.5/w,(i[1]-C[1])*.5/w]},r.dxydb_rough=function(E,p,S){var w=v*(S||.1),i=r.ab2xy(E,p+w,!0),C=r.ab2xy(E,p-w,!0);return[(i[0]-C[0])*.5/w,(i[1]-C[1])*.5/w]},r.dpdx=function(E){return E._m},r.dpdy=function(E){return E._m}}},51512:function(te,X,e){var A=e(3400);te.exports=function(o,L,M){var d,g,r,t=[],s=[],a=o[0].length,c=o.length;function u(j,$){var q=0,oe,Z=0;return j>0&&(oe=o[$][j-1])!==void 0&&(Z++,q+=oe),j0&&(oe=o[$-1][j])!==void 0&&(Z++,q+=oe),$0&&g0&&dw);return A.log("Smoother converged to",i,"after",x,"iterations"),o}},86411:function(te,X,e){var A=e(3400).isArray1D;te.exports=function(o,L,M){var d=M("x"),g=d&&d.length,r=M("y"),t=r&&r.length;if(!g&&!t)return!1;if(L._cheater=!d,(!g||A(d))&&(!t||A(r))){var s=g?d.length:1/0;t&&(s=Math.min(s,r.length)),L.a&&L.a.length&&(s=Math.min(s,L.a.length)),L.b&&L.b.length&&(s=Math.min(s,L.b.length)),L._length=s}else L._length=null;return!0}},83372:function(te,X,e){var A=e(21776).Ks,P=e(6096),o=e(49084),L=e(45464),M=e(22548).defaultLine,d=e(92880).extendFlat,g=P.marker.line;te.exports=d({locations:{valType:"data_array",editType:"calc"},locationmode:P.locationmode,z:{valType:"data_array",editType:"calc"},geojson:d({},P.geojson,{}),featureidkey:P.featureidkey,text:d({},P.text,{}),hovertext:d({},P.hovertext,{}),marker:{line:{color:d({},g.color,{dflt:M}),width:d({},g.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:P.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:P.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:d({},L.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:A(),showlegend:d({},L.showlegend,{dflt:!1})},o("",{cLetter:"z",editTypeOverride:"calc"}))},7924:function(te,X,e){var A=e(38248),P=e(39032).BADNUM,o=e(47128),L=e(20148),M=e(4500);function d(g){return g&&typeof g=="string"}te.exports=function(r,t){var s=t._length,a=new Array(s),c;t.geojson?c=function(T){return d(T)||A(T)}:c=d;for(var u=0;u")}}},54272:function(te,X,e){te.exports={attributes:e(83372),supplyDefaults:e(30972),colorbar:e(96288),calc:e(7924),calcGeoJSON:e(88364).calcGeoJSON,plot:e(88364).plot,style:e(7947).style,styleOnSelect:e(7947).styleOnSelect,hoverPoints:e(69224),eventData:e(52428),selectPoints:e(17328),moduleType:"trace",name:"choropleth",basePlotModule:e(10816),categories:["geo","noOpacity","showLegend"],meta:{}}},88364:function(te,X,e){var A=e(33428),P=e(3400),o=e(27144),L=e(59972).getTopojsonFeatures,M=e(19280).findExtremes,d=e(7947).style;function g(t,s,a){var c=s.layers.backplot.select(".choroplethlayer");P.makeTraceGroups(c,a,"trace choropleth").each(function(u){var l=A.select(this),y=l.selectAll("path.choroplethlocation").data(P.identity);y.enter().append("path").classed("choroplethlocation",!0),y.exit().remove(),d(t,u)})}function r(t,s){for(var a=t[0].trace,c=s[a.geo],u=c._subplot,l=a.locationmode,y=a._length,h=l==="geojson-id"?o.extractTraceFeature(t):L(a,u.topojson),T=[],f=[],n=0;n=0;L--){var M=o[L].id;if(typeof M=="string"&&M.indexOf("water")===0){for(var d=L+1;d=0;r--)d.removeLayer(g[r][1])},M.dispose=function(){var d=this.subplot.map;this._removeLayers(),d.removeSource(this.sourceId)},te.exports=function(g,r){var t=r[0].trace,s=new L(g,t.uid),a=s.sourceId,c=A(r),u=s.below=g.belowLookup["trace-"+t.uid];return g.map.addSource(a,{type:"geojson",data:c.geojson}),s._addLayers(c,u),r[0].trace._glTrace=s,s}},86040:function(te,X,e){var A=e(49084),P=e(29736).axisHoverFormat,o=e(21776).Ks,L=e(52948),M=e(45464),d=e(92880).extendFlat,g={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:o({editType:"calc"},{keys:["norm"]}),uhoverformat:P("u",1),vhoverformat:P("v",1),whoverformat:P("w",1),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),showlegend:d({},M.showlegend,{dflt:!1})};d(g,A("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var r=["opacity","lightposition","lighting"];r.forEach(function(t){g[t]=L[t]}),g.hoverinfo=d({},M.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"}),g.transforms=void 0,te.exports=g},83344:function(te,X,e){var A=e(47128);te.exports=function(o,L){for(var M=L.u,d=L.v,g=L.w,r=Math.min(L.x.length,L.y.length,L.z.length,M.length,d.length,g.length),t=-1/0,s=1/0,a=0;aM.level||M.starts.length&&L===M.level)}break;case"constraint":if(A.prefixBoundary=!1,A.edgepaths.length)return;var d=A.x.length,g=A.y.length,r=-1/0,t=1/0;for(o=0;o":s>r&&(A.prefixBoundary=!0);break;case"<":(sr||A.starts.length&&c===t)&&(A.prefixBoundary=!0);break;case"][":a=Math.min(s[0],s[1]),c=Math.max(s[0],s[1]),ar&&(A.prefixBoundary=!0);break}break}}},55296:function(te,X,e){var A=e(8932),P=e(41076),o=e(46960);function L(M,d,g){var r=d.contours,t=d.line,s=r.size||1,a=r.coloring,c=P(d,{isColorbar:!0});if(a==="heatmap"){var u=A.extractOpts(d);g._fillgradient=u.reversescale?A.flipScale(u.colorscale):u.colorscale,g._zrange=[u.min,u.max]}else a==="fill"&&(g._fillcolor=c);g._line={color:a==="lines"?c:t.color,width:r.showlines!==!1?t.width:0,dash:t.dash},g._levels={start:r.start,end:o(r),size:s}}te.exports={min:"zmin",max:"zmax",calc:L}},93252:function(te){te.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}}},95536:function(te,X,e){var A=e(38248),P=e(17428),o=e(76308),L=o.addOpacity,M=o.opacity,d=e(69104),g=e(3400).isArrayOrTypedArray,r=d.CONSTRAINT_REDUCTION,t=d.COMPARISON_OPS2;te.exports=function(c,u,l,y,h,T){var f=u.contours,n,v,m,b=l("contours.operation");if(f._operation=r[b],s(l,f),b==="="?n=f.showlines=!0:(n=l("contours.showlines"),m=l("fillcolor",L((c.line||{}).color||h,.5))),n){var E=m&&M(m)?L(u.fillcolor,1):h;v=l("line.color",E),l("line.width",2),l("line.dash")}l("line.smoothing"),P(l,y,v,T)};function s(a,c){var u;t.indexOf(c.operation)===-1?(a("contours.value",[0,1]),g(c.value)?c.value.length>2?c.value=c.value.slice(2):c.length===0?c.value=[0,1]:c.length<2?(u=parseFloat(c.value[0]),c.value=[u,u+1]):c.value=[parseFloat(c.value[0]),parseFloat(c.value[1])]:A(c.value)&&(u=parseFloat(c.value),c.value=[u,u+1])):(a("contours.value",0),A(c.value)||(g(c.value)?c.value=parseFloat(c.value[0]):c.value=0))}},3212:function(te,X,e){var A=e(69104),P=e(38248);te.exports={"[]":L("[]"),"][":L("]["),">":M(">"),"<":M("<"),"=":M("=")};function o(d,g){var r=Array.isArray(g),t;function s(a){return P(a)?+a:null}return A.COMPARISON_OPS2.indexOf(d)!==-1?t=s(r?g[0]:g):A.INTERVAL_OPS.indexOf(d)!==-1?t=r?[s(g[0]),s(g[1])]:[s(g),s(g)]:A.SET_OPS.indexOf(d)!==-1&&(t=r?g.map(s):[s(g)]),t}function L(d){return function(g){g=o(d,g);var r=Math.min(g[0],g[1]),t=Math.max(g[0],g[1]);return{start:r,end:t,size:t-r}}}function M(d){return function(g){return g=o(d,g),{start:g,end:1/0,size:1/0}}}},84952:function(te){te.exports=function(e,A,P,o){var L=o("contours.start"),M=o("contours.end"),d=L===!1||M===!1,g=P("contours.size"),r;d?r=A.autocontour=!0:r=P("autocontour",!1),(r||!g)&&P("ncontours")}},82172:function(te,X,e){var A=e(3400);te.exports=function(o,L){var M,d,g,r=function(a){return a.reverse()},t=function(a){return a};switch(L){case"=":case"<":return o;case">":for(o.length!==1&&A.warn("Contour data invalid for the specified inequality operation."),d=o[0],M=0;M1e3){A.warn("Too many contours, clipping at 1000",M);break}return s}},46960:function(te){te.exports=function(e){return e.end+e.size/1e6}},88748:function(te,X,e){var A=e(3400),P=e(93252);te.exports=function(t,s,a){var c,u,l,y,h;for(s=s||.01,a=a||.01,l=0;l20?(l=P.CHOOSESADDLE[l][(y[0]||y[1])<0?0:1],r.crossings[u]=P.SADDLEREMAINDER[l]):delete r.crossings[u],y=P.NEWDELTA[l],!y){A.log("Found bad marching index:",l,t,r.level);break}h.push(g(r,t,y)),t[0]+=y[0],t[1]+=y[1],u=t.join(","),o(h[h.length-1],h[h.length-2],a,c)&&h.pop();var b=y[0]&&(t[0]<0||t[0]>f-2)||y[1]&&(t[1]<0||t[1]>T-2),E=t[0]===n[0]&&t[1]===n[1]&&y[0]===v[0]&&y[1]===v[1];if(E||s&&b)break;l=r.crossings[u]}m===1e4&&A.log("Infinite loop in contour?");var p=o(h[0],h[h.length-1],a,c),S=0,w=.2*r.smoothing,i=[],C=0,x,k,I,B,_,z,O,F,N,V,j;for(m=1;m=C;m--)if(x=i[m],x<$){for(I=0,k=m-1;k>=C&&x+i[k]<$;k--)x+=i[k];if(p&&m===h.length-2)for(I=0;IF&&N--,r.edgepaths[N]=j.concat(h,V));break}Z||(r.edgepaths[F]=h.concat(V))}for(F=0;F20&&t?r===208||r===1114?a=s[0]===0?1:-1:c=s[1]===0?1:-1:P.BOTTOMSTART.indexOf(r)!==-1?c=1:P.LEFTSTART.indexOf(r)!==-1?a=1:P.TOPSTART.indexOf(r)!==-1?c=-1:a=-1,[a,c]}function g(r,t,s){var a=t[0]+Math.max(s[0],0),c=t[1]+Math.max(s[1],0),u=r.z[c][a],l=r.xaxis,y=r.yaxis;if(s[1]){var h=(r.level-u)/(r.z[c][a+1]-u),T=(h!==1?(1-h)*l.c2l(r.x[a]):0)+(h!==0?h*l.c2l(r.x[a+1]):0);return[l.c2p(l.l2c(T),!0),y.c2p(r.y[c],!0),a+h,c]}else{var f=(r.level-u)/(r.z[c+1][a]-u),n=(f!==1?(1-f)*y.c2l(r.y[c]):0)+(f!==0?f*y.c2l(r.y[c+1]):0);return[l.c2p(r.x[a],!0),y.c2p(y.l2c(n),!0),a,c+f]}}},38200:function(te,X,e){var A=e(76308),P=e(55512);te.exports=function(L,M,d,g,r){r||(r={}),r.isContour=!0;var t=P(L,M,d,g,r);return t&&t.forEach(function(s){var a=s.trace;a.contours.type==="constraint"&&(a.fillcolor&&A.opacity(a.fillcolor)?s.color=A.addOpacity(a.fillcolor,1):a.contours.showlines&&A.opacity(a.line.color)&&(s.color=A.addOpacity(a.line.color,1)))}),t}},66240:function(te,X,e){te.exports={attributes:e(67104),supplyDefaults:e(57004),calc:e(20688),plot:e(23676).plot,style:e(52440),colorbar:e(55296),hoverPoints:e(38200),moduleType:"trace",name:"contour",basePlotModule:e(57952),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}},17428:function(te,X,e){var A=e(3400);te.exports=function(o,L,M,d){d||(d={});var g=o("contours.showlabels");if(g){var r=L.font;A.coerceFont(o,"contours.labelfont",{family:r.family,size:r.size,color:M}),o("contours.labelformat")}d.hasHover!==!1&&o("zhoverformat")}},41076:function(te,X,e){var A=e(33428),P=e(8932),o=e(46960);te.exports=function(M){var d=M.contours,g=d.start,r=o(d),t=d.size||1,s=Math.floor((r-g)/t)+1,a=d.coloring==="lines"?0:1,c=P.extractOpts(M);isFinite(t)||(t=1,s=1);var u=c.reversescale?P.flipScale(c.colorscale):c.colorscale,l=u.length,y=new Array(l),h=new Array(l),T,f,n=c.min,v=c.max;if(d.coloring==="heatmap"){for(f=0;f=v)&&(g<=n&&(g=n),r>=v&&(r=v),s=Math.floor((r-g)/t)+1,a=0),f=0;fn&&(y.unshift(n),h.unshift(h[0])),y[y.length-1]o?0:1)+(L[0][1]>o?0:2)+(L[1][1]>o?0:4)+(L[1][0]>o?0:8);if(M===5||M===10){var d=(L[0][0]+L[0][1]+L[1][0]+L[1][1])/4;return o>d?M===5?713:1114:M===5?104:208}return M===15?0:M}},23676:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(8932),M=e(72736),d=e(54460),g=e(78344),r=e(41420),t=e(72424),s=e(88748),a=e(61512),c=e(82172),u=e(56008),l=e(93252),y=l.LABELOPTIMIZER;X.plot=function(p,S,w,i){var C=S.xaxis,x=S.yaxis;P.makeTraceGroups(i,w,"contour").each(function(k){var I=A.select(this),B=k[0],_=B.trace,z=B.x,O=B.y,F=_.contours,N=a(F,S,B),V=P.ensureSingle(I,"g","heatmapcoloring"),j=[];F.coloring==="heatmap"&&(j=[k]),r(p,S,j,V),t(N),s(N);var $=C.c2p(z[0],!0),q=C.c2p(z[z.length-1],!0),oe=x.c2p(O[0],!0),Z=x.c2p(O[O.length-1],!0),G=[[$,Z],[q,Z],[q,oe],[$,oe]],re=N;F.type==="constraint"&&(re=c(N,F._operation)),h(I,G,F),T(I,re,G,F),n(I,N,p,B,F),m(I,S,p,B,G)})};function h(E,p,S){var w=P.ensureSingle(E,"g","contourbg"),i=w.selectAll("path").data(S.coloring==="fill"?[0]:[]);i.enter().append("path"),i.exit().remove(),i.attr("d","M"+p.join("L")+"Z").style("stroke","none")}function T(E,p,S,w){var i=w.coloring==="fill"||w.type==="constraint"&&w._operation!=="=",C="M"+S.join("L")+"Z";i&&u(p,w);var x=P.ensureSingle(E,"g","contourfill"),k=x.selectAll("path").data(i?p:[]);k.enter().append("path"),k.exit().remove(),k.each(function(I){var B=(I.prefixBoundary?C:"")+f(I,S);B?A.select(this).attr("d",B).style("stroke","none"):A.select(this).remove()})}function f(E,p){var S="",w=0,i=E.edgepaths.map(function($,q){return q}),C=!0,x,k,I,B,_,z;function O($){return Math.abs($[1]-p[0][1])<.01}function F($){return Math.abs($[1]-p[2][1])<.01}function N($){return Math.abs($[0]-p[0][0])<.01}function V($){return Math.abs($[0]-p[2][0])<.01}for(;i.length;){for(z=o.smoothopen(E.edgepaths[w],E.smoothing),S+=C?z:z.replace(/^M/,"L"),i.splice(i.indexOf(w),1),x=E.edgepaths[w][E.edgepaths[w].length-1],B=-1,I=0;I<4;I++){if(!x){P.log("Missing end?",w,E);break}for(O(x)&&!V(x)?k=p[1]:N(x)?k=p[0]:F(x)?k=p[3]:V(x)&&(k=p[2]),_=0;_=0&&(k=j,B=_):Math.abs(x[1]-k[1])<.01?Math.abs(x[1]-j[1])<.01&&(j[0]-x[0])*(k[0]-j[0])>=0&&(k=j,B=_):P.log("endpt to newendpt is not vert. or horz.",x,k,j)}if(x=k,B>=0)break;S+="L"+k}if(B===E.edgepaths.length){P.log("unclosed perimeter path");break}w=B,C=i.indexOf(w)===-1,C&&(w=i[0],S+="Z")}for(w=0;wy.MAXCOST*2)break;O&&(k/=2),x=B-k/2,I=x+k*1.5}if(z<=y.MAXCOST)return _};function v(E,p,S,w){var i=p.width/2,C=p.height/2,x=E.x,k=E.y,I=E.theta,B=Math.cos(I)*i,_=Math.sin(I)*i,z=(x>w.center?w.right-x:x-w.left)/(B+Math.abs(Math.sin(I)*C)),O=(k>w.middle?w.bottom-k:k-w.top)/(Math.abs(_)+Math.cos(I)*C);if(z<1||O<1)return 1/0;var F=y.EDGECOST*(1/(z-1)+1/(O-1));F+=y.ANGLECOST*I*I;for(var N=x-B,V=k-_,j=x+B,$=k+_,q=0;qg.end&&(g.start=g.end=(g.start+g.end)/2),M._input.contours||(M._input.contours={}),P.extendFlat(M._input.contours,{start:g.start,end:g.end,size:g.size}),M._input.autocontour=!0}else if(g.type!=="constraint"){var a=g.start,c=g.end,u=M._input.contours;if(a>c&&(g.start=u.start=c,c=g.end=u.end=a,a=g.start),!(g.size>0)){var l;a===c?l=1:l=o(a,c,M.ncontours).dtick,u.size=g.size=l}}};function o(L,M,d){var g={type:"linear",range:[L,M]};return A.autoTicks(g,(M-L)/(d||15)),g}},52440:function(te,X,e){var A=e(33428),P=e(43616),o=e(41648),L=e(41076);te.exports=function(d){var g=A.select(d).selectAll("g.contour");g.style("opacity",function(r){return r[0].trace.opacity}),g.each(function(r){var t=A.select(this),s=r[0].trace,a=s.contours,c=s.line,u=a.size||1,l=a.start,y=a.type==="constraint",h=!y&&a.coloring==="lines",T=!y&&a.coloring==="fill",f=h||T?L(s):null;t.selectAll("g.contourlevel").each(function(m){A.select(this).selectAll("path").call(P.lineGroupStyle,c.width,h?f(m.level):c.color,c.dash)});var n=a.labelfont;if(t.selectAll("g.contourlabels text").each(function(m){P.font(A.select(this),{family:n.family,size:n.size,color:n.color||(h?f(m.level):c.color)})}),y)t.selectAll("g.contourfill path").style("fill",s.fillcolor);else if(T){var v;t.selectAll("g.contourfill path").style("fill",function(m){return v===void 0&&(v=m.level),f(m.level+.5*u)}),v===void 0&&(v=l),t.selectAll("g.contourbg path").style("fill",f(v-.5*u))}}),o(d)}},97680:function(te,X,e){var A=e(27260),P=e(17428);te.exports=function(L,M,d,g,r){var t=d("contours.coloring"),s,a="";t==="fill"&&(s=d("contours.showlines")),s!==!1&&(t!=="lines"&&(a=d("line.color","#000")),d("line.width",.5),d("line.dash")),t!=="none"&&(L.showlegend!==!0&&(M.showlegend=!1),M._dfltShowLegend=!1,A(L,M,g,d,{prefix:"",cLetter:"z"})),d("line.smoothing"),P(d,g,a,r)}},37960:function(te,X,e){var A=e(83328),P=e(67104),o=e(49084),L=e(92880).extendFlat,M=P.contours;te.exports=L({carpet:{valType:"string",editType:"calc"},z:A.z,a:A.x,a0:A.x0,da:A.dx,b:A.y,b0:A.y0,db:A.dy,text:A.text,hovertext:A.hovertext,transpose:A.transpose,atype:A.xtype,btype:A.ytype,fillcolor:P.fillcolor,autocontour:P.autocontour,ncontours:P.ncontours,contours:{type:M.type,start:M.start,end:M.end,size:M.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:M.showlines,showlabels:M.showlabels,labelfont:M.labelfont,labelformat:M.labelformat,operation:M.operation,value:M.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:P.line.color,width:P.line.width,dash:P.line.dash,smoothing:P.line.smoothing,editType:"plot"},transforms:void 0},o("",{cLetter:"z",autoColorDflt:!1}))},30572:function(te,X,e){var A=e(47128),P=e(3400),o=e(2872),L=e(26136),M=e(70448),d=e(11240),g=e(35744),r=e(3252),t=e(50948),s=e(54444);te.exports=function(u,l){var y=l._carpetTrace=t(u,l);if(!(!y||!y.visible||y.visible==="legendonly")){if(!l.a||!l.b){var h=u.data[y.index],T=u.data[l.index];T.a||(T.a=h.a),T.b||(T.b=h.b),r(T,l,l._defaultColor,u._fullLayout)}var f=a(u,l);return s(l,l._z),f}};function a(c,u){var l=u._carpetTrace,y=l.aaxis,h=l.baxis,T,f,n,v,m,b,E;y._minDtick=0,h._minDtick=0,P.isArray1D(u.z)&&o(u,y,h,"a","b",["z"]),T=u._a=u._a||u.a,v=u._b=u._b||u.b,T=T?y.makeCalcdata(u,"_a"):[],v=v?h.makeCalcdata(u,"_b"):[],f=u.a0||0,n=u.da||1,m=u.b0||0,b=u.db||1,E=u._z=L(u._z||u.z,u.transpose),u._emptypoints=d(E),M(E,u._emptypoints);var p=P.maxRowLength(E),S=u.xtype==="scaled"?"":T,w=g(u,S,f,n,p,y),i=u.ytype==="scaled"?"":v,C=g(u,i,m,b,E.length,h),x={a:w,b:C,z:E};return u.contours.type==="levels"&&u.contours.coloring!=="none"&&A(c,u,{vals:E,containerStr:"",cLetter:"z"}),[x]}},3252:function(te,X,e){var A=e(3400),P=e(51264),o=e(37960),L=e(95536),M=e(84952),d=e(97680);te.exports=function(r,t,s,a){function c(h,T){return A.coerce(r,t,o,h,T)}function u(h){return A.coerce2(r,t,o,h)}if(c("carpet"),r.a&&r.b){var l=P(r,t,c,a,"a","b");if(!l){t.visible=!1;return}c("text");var y=c("contours.type")==="constraint";y?L(r,t,c,a,s,{hasHover:!1}):(M(r,t,c,u),d(r,t,c,a,{hasHover:!1}))}else t._defaultColor=s,t._length=null}},40448:function(te,X,e){te.exports={attributes:e(37960),supplyDefaults:e(3252),colorbar:e(55296),calc:e(30572),plot:e(94440),style:e(52440),moduleType:"trace",name:"contourcarpet",basePlotModule:e(57952),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}},94440:function(te,X,e){var A=e(33428),P=e(87072),o=e(53416),L=e(43616),M=e(3400),d=e(72424),g=e(88748),r=e(23676),t=e(93252),s=e(82172),a=e(61512),c=e(56008),u=e(50948),l=e(77712);te.exports=function(S,w,i,C){var x=w.xaxis,k=w.yaxis;M.makeTraceGroups(C,i,"contour").each(function(I){var B=A.select(this),_=I[0],z=_.trace,O=z._carpetTrace=u(S,z),F=S.calcdata[O.index][0];if(!O.visible||O.visible==="legendonly")return;var N=_.a,V=_.b,j=z.contours,$=a(j,w,_),q=j.type==="constraint",oe=j._operation,Z=q?oe==="="?"lines":"fill":j.coloring;function G(we){var me=O.ab2xy(we[0],we[1],!0);return[x.c2p(me[0]),k.c2p(me[1])]}var re=[[N[0],V[V.length-1]],[N[N.length-1],V[V.length-1]],[N[N.length-1],V[0]],[N[0],V[0]]];d($);var H=(N[N.length-1]-N[0])*1e-8,J=(V[V.length-1]-V[0])*1e-8;g($,H,J);var ae=$;j.type==="constraint"&&(ae=s($,oe)),y($,G);var K,Y,ie,ne,le=[];for(ne=F.clipsegments.length-1;ne>=0;ne--)K=F.clipsegments[ne],Y=P([],K.x,x.c2p),ie=P([],K.y,k.c2p),Y.reverse(),ie.reverse(),le.push(o(Y,ie,K.bicubic));var de="M"+le.join("L")+"Z";m(B,F.clipsegments,x,k,q,Z),b(z,B,x,k,ae,re,G,O,F,Z,de),h(B,$,S,_,j,w,O),L.setClipUrl(B,O._clipPathId,S)})};function y(p,S){var w,i,C,x,k,I,B,_,z;for(w=0;w$&&(i.max=$),i.len=i.max-i.min}function f(p,S,w){var i=p.getPointAtLength(S),C=p.getPointAtLength(w),x=C.x-i.x,k=C.y-i.y,I=Math.sqrt(x*x+k*k);return[x/I,k/I]}function n(p){var S=Math.sqrt(p[0]*p[0]+p[1]*p[1]);return[p[0]/S,p[1]/S]}function v(p,S){var w=Math.abs(p[0]*S[0]+p[1]*S[1]),i=Math.sqrt(1-w*w);return i/w}function m(p,S,w,i,C,x){var k,I,B,_,z=M.ensureSingle(p,"g","contourbg"),O=z.selectAll("path").data(x==="fill"&&!C?[0]:[]);O.enter().append("path"),O.exit().remove();var F=[];for(_=0;_=0&&(N=Y,j=$):Math.abs(F[1]-N[1])=0&&(N=Y,j=$):M.log("endpt to newendpt is not vert. or horz.",F,N,Y)}if(j>=0)break;_+=ae(F,N),F=N}if(j===S.edgepaths.length){M.log("unclosed perimeter path");break}B=j,O=z.indexOf(B)===-1,O&&(B=z[0],_+=ae(F,N)+"Z",F=null)}for(B=0;B0?+h[l]:0),u.push({type:"Feature",geometry:{type:"Point",coordinates:v},properties:m})}}var E=L.extractOpts(t),p=E.reversescale?L.flipScale(E.colorscale):E.colorscale,S=p[0][1],w=o.opacity(S)<1?S:o.addOpacity(S,0),i=["interpolate",["linear"],["heatmap-density"],0,w];for(l=1;l=0;g--)M.removeLayer(d[g][1])},L.dispose=function(){var M=this.subplot.map;this._removeLayers(),M.removeSource(this.sourceId)},te.exports=function(d,g){var r=g[0].trace,t=new o(d,r.uid),s=t.sourceId,a=A(g),c=t.below=d.belowLookup["trace-"+r.uid];return d.map.addSource(s,{type:"geojson",data:a.geojson}),t._addLayers(a,c),t}},74248:function(te,X,e){var A=e(3400);te.exports=function(o,L){for(var M=0;M"),a.color=L(u,h),[a]}};function L(M,d){var g=M.marker,r=d.mc||g.color,t=d.mlc||g.line.color,s=d.mlw||g.line.width;if(A(r))return r;if(A(t)&&s)return t}},94704:function(te,X,e){te.exports={attributes:e(20088),layoutAttributes:e(7076),supplyDefaults:e(45432).supplyDefaults,crossTraceDefaults:e(45432).crossTraceDefaults,supplyLayoutDefaults:e(11631),calc:e(23096),crossTraceCalc:e(4804),plot:e(42200),style:e(44544).style,hoverPoints:e(31488),eventData:e(34580),selectPoints:e(45784),moduleType:"trace",name:"funnel",basePlotModule:e(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},7076:function(te){te.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"}}},11631:function(te,X,e){var A=e(3400),P=e(7076);te.exports=function(o,L,M){var d=!1;function g(s,a){return A.coerce(o,L,P,s,a)}for(var r=0;r path").each(function(h){if(!h.isBlank){var T=y.marker;A.select(this).call(o.fill,h.mc||T.color).call(o.stroke,h.mlc||T.line.color).call(P.dashLine,T.line.dash,h.mlw||T.line.width).style("opacity",y.selectedpoints&&!h.selected?L:1)}}),g(l,y,t),l.selectAll(".regions").each(function(){A.select(this).selectAll("path").style("stroke-width",0).call(o.fill,y.connector.fillcolor)}),l.selectAll(".lines").each(function(){var h=y.connector.line;P.lineGroupStyle(A.select(this).selectAll("path"),h.width,h.color,h.dash)})})}te.exports={style:r}},22332:function(te,X,e){var A=e(74996),P=e(45464),o=e(86968).u,L=e(21776).Ks,M=e(21776).Gw,d=e(92880).extendFlat;te.exports={labels:A.labels,label0:A.label0,dlabel:A.dlabel,values:A.values,marker:{colors:A.marker.colors,line:{color:d({},A.marker.line.color,{dflt:null}),width:d({},A.marker.line.width,{dflt:1}),editType:"calc"},pattern:A.marker.pattern,editType:"calc"},text:A.text,hovertext:A.hovertext,scalegroup:d({},A.scalegroup,{}),textinfo:d({},A.textinfo,{flags:["label","text","value","percent"]}),texttemplate:M({editType:"plot"},{keys:["label","color","value","text","percent"]}),hoverinfo:d({},P.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:L({},{keys:["label","color","value","text","percent"]}),textposition:d({},A.textposition,{values:["inside","none"],dflt:"inside"}),textfont:A.textfont,insidetextfont:A.insidetextfont,title:{text:A.title.text,font:A.title.font,position:d({},A.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:o({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"}}},91248:function(te,X,e){var A=e(7316);X.name="funnelarea",X.plot=function(P,o,L,M){A.plotBasePlot(X.name,P,o,L,M)},X.clean=function(P,o,L,M){A.cleanBasePlot(X.name,P,o,L,M)}},54e3:function(te,X,e){var A=e(45768);function P(L,M){return A.calc(L,M)}function o(L){A.crossTraceCalc(L,{type:"funnelarea"})}te.exports={calc:P,crossTraceCalc:o}},92688:function(te,X,e){var A=e(3400),P=e(22332),o=e(86968).Q,L=e(31508).handleText,M=e(74174).handleLabelsAndValues,d=e(74174).handleMarkerDefaults;te.exports=function(r,t,s,a){function c(b,E){return A.coerce(r,t,P,b,E)}var u=c("labels"),l=c("values"),y=M(u,l),h=y.len;if(t._hasLabels=y.hasLabels,t._hasValues=y.hasValues,!t._hasLabels&&t._hasValues&&(c("label0"),c("dlabel")),!h){t.visible=!1;return}t._length=h,d(r,t,a,c),c("scalegroup");var T=c("text"),f=c("texttemplate"),n;if(f||(n=c("textinfo",Array.isArray(T)?"text+percent":"percent")),c("hovertext"),c("hovertemplate"),f||n&&n!=="none"){var v=c("textposition");L(r,t,a,c,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else n==="none"&&c("textposition","none");o(t,a,c);var m=c("title.text");m&&(c("title.position"),A.coerceFont(c,"title.font",a.font)),c("aspectratio"),c("baseratio")}},62396:function(te,X,e){te.exports={moduleType:"trace",name:"funnelarea",basePlotModule:e(91248),categories:["pie-like","funnelarea","showLegend"],attributes:e(22332),layoutAttributes:e(61280),supplyDefaults:e(92688),supplyLayoutDefaults:e(35384),calc:e(54e3).calc,crossTraceCalc:e(54e3).crossTraceCalc,plot:e(39472),style:e(62096),styleOne:e(10528),meta:{}}},61280:function(te,X,e){var A=e(85204).hiddenlabels;te.exports={hiddenlabels:A,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}},35384:function(te,X,e){var A=e(3400),P=e(61280);te.exports=function(L,M){function d(g,r){return A.coerce(L,M,P,g,r)}d("hiddenlabels"),d("funnelareacolorway",M.colorway),d("extendfunnelareacolors")}},39472:function(te,X,e){var A=e(33428),P=e(43616),o=e(3400),L=o.strScale,M=o.strTranslate,d=e(72736),g=e(98184),r=g.toMoveInsideBar,t=e(82744),s=t.recordMinTextSize,a=t.clearMinTextSize,c=e(69656),u=e(37820),l=u.attachFxHandlers,y=u.determineInsideTextFont,h=u.layoutAreas,T=u.prerenderTitles,f=u.positionTitleOutside,n=u.formatSliceLabel;te.exports=function(p,S){var w=p._context.staticPlot,i=p._fullLayout;a("funnelarea",i),T(S,p),h(S,i._size),o.makeTraceGroups(i._funnelarealayer,S,"trace").each(function(C){var x=A.select(this),k=C[0],I=k.trace;b(C),x.each(function(){var B=A.select(this).selectAll("g.slice").data(C);B.enter().append("g").classed("slice",!0),B.exit().remove(),B.each(function(z,O){if(z.hidden){A.select(this).selectAll("path,g").remove();return}z.pointNumber=z.i,z.curveNumber=I.index;var F=k.cx,N=k.cy,V=A.select(this),j=V.selectAll("path.surface").data([z]);j.enter().append("path").classed("surface",!0).style({"pointer-events":w?"none":"all"}),V.call(l,p,C);var $="M"+(F+z.TR[0])+","+(N+z.TR[1])+v(z.TR,z.BR)+v(z.BR,z.BL)+v(z.BL,z.TL)+"Z";j.attr("d",$),n(p,z,k);var q=c.castOption(I.textposition,z.pts),oe=V.selectAll("g.slicetext").data(z.text&&q!=="none"?[0]:[]);oe.enter().append("g").classed("slicetext",!0),oe.exit().remove(),oe.each(function(){var Z=o.ensureSingle(A.select(this),"text","",function(ie){ie.attr("data-notex",1)}),G=o.ensureUniformFontSize(p,y(I,z,i.font));Z.text(z.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(P.font,G).call(d.convertToTspans,p);var re=P.bBox(Z.node()),H,J,ae,K=Math.min(z.BL[1],z.BR[1])+N,Y=Math.max(z.TL[1],z.TR[1])+N;J=Math.max(z.TL[0],z.BL[0])+F,ae=Math.min(z.TR[0],z.BR[0])+F,H=r(J,ae,K,Y,re,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),H.fontSize=G.size,s(I.type,H,i),C[O].transform=H,o.setTransormAndDisplay(Z,H)})});var _=A.select(this).selectAll("g.titletext").data(I.title.text?[0]:[]);_.enter().append("g").classed("titletext",!0),_.exit().remove(),_.each(function(){var z=o.ensureSingle(A.select(this),"text","",function(N){N.attr("data-notex",1)}),O=I.title.text;I._meta&&(O=o.templateString(O,I._meta)),z.text(O).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(P.font,I.title.font).call(d.convertToTspans,p);var F=f(k,i._size);z.attr("transform",M(F.x,F.y)+L(Math.min(1,F.scale))+M(F.tx,F.ty))})})})};function v(E,p){var S=p[0]-E[0],w=p[1]-E[1];return"l"+S+","+w}function m(E,p){return[.5*(E[0]+p[0]),.5*(E[1]+p[1])]}function b(E){if(!E.length)return;var p=E[0],S=p.trace,w=S.aspectratio,i=S.baseratio;i>.999&&(i=.999);var C=Math.pow(i,2),x=p.vTotal,k=x*C/(1-C),I=x,B=k/x;function _(){var ne=Math.sqrt(B);return{x:ne,y:-ne}}function z(){var ne=_();return[ne.x,ne.y]}var O,F=[];F.push(z());var N,V;for(N=E.length-1;N>-1;N--)if(V=E[N],!V.hidden){var j=V.v/I;B+=j,F.push(z())}var $=1/0,q=-1/0;for(N=0;N-1;N--)if(V=E[N],!V.hidden){K+=1;var Y=F[K][0],ie=F[K][1];V.TL=[-Y,ie],V.TR=[Y,ie],V.BL=J,V.BR=ae,V.pxmid=m(V.TR,V.BR),J=V.TL,ae=V.TR}}},62096:function(te,X,e){var A=e(33428),P=e(10528),o=e(82744).resizeText;te.exports=function(M){var d=M._fullLayout._funnelarealayer.selectAll(".trace");o(M,d,"funnelarea"),d.each(function(g){var r=g[0],t=r.trace,s=A.select(this);s.style({opacity:t.opacity}),s.selectAll("path.surface").each(function(a){A.select(this).call(P,a,t,M)})})}},83328:function(te,X,e){var A=e(52904),P=e(45464),o=e(25376),L=e(29736).axisHoverFormat,M=e(21776).Ks,d=e(21776).Gw,g=e(49084),r=e(92880).extendFlat;te.exports=r({z:{valType:"data_array",editType:"calc"},x:r({},A.x,{impliedEdits:{xtype:"array"}}),x0:r({},A.x0,{impliedEdits:{xtype:"scaled"}}),dx:r({},A.dx,{impliedEdits:{xtype:"scaled"}}),y:r({},A.y,{impliedEdits:{ytype:"array"}}),y0:r({},A.y0,{impliedEdits:{ytype:"scaled"}}),dy:r({},A.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:r({},A.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:r({},A.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:r({},A.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:r({},A.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:r({},A.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:r({},A.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:L("x"),yhoverformat:L("y"),zhoverformat:L("z",1),hovertemplate:M(),texttemplate:d({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),textfont:o({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:r({},P.showlegend,{dflt:!1})},{transforms:void 0},g("",{cLetter:"z",autoColorDflt:!1}))},19512:function(te,X,e){var A=e(24040),P=e(3400),o=e(54460),L=e(1220),M=e(55480),d=e(47128),g=e(2872),r=e(26136),t=e(70448),s=e(11240),a=e(35744),c=e(39032).BADNUM;te.exports=function(h,T){var f=o.getFromId(h,T.xaxis||"x"),n=o.getFromId(h,T.yaxis||"y"),v=A.traceIs(T,"contour"),m=A.traceIs(T,"histogram"),b=A.traceIs(T,"gl2d"),E=v?"best":T.zsmooth,p,S,w,i,C,x,k,I,B,_,z;if(f._minDtick=0,n._minDtick=0,m)z=M(h,T),i=z.orig_x,p=z.x,S=z.x0,w=z.dx,I=z.orig_y,C=z.y,x=z.y0,k=z.dy,B=z.z;else{var O=T.z;P.isArray1D(O)?(g(T,f,n,"x","y",["z"]),p=T._x,C=T._y,O=T._z):(i=T.x?f.makeCalcdata(T,"x"):[],I=T.y?n.makeCalcdata(T,"y"):[],p=L(T,f,"x",i).vals,C=L(T,n,"y",I).vals,T._x=p,T._y=C),S=T.x0,w=T.dx,x=T.y0,k=T.dy,B=r(O,T,f,n)}(f.rangebreaks||n.rangebreaks)&&(B=l(p,C,B),m||(p=u(p),C=u(C),T._x=p,T._y=C)),!m&&(v||T.connectgaps)&&(T._emptypoints=s(B),t(B,T._emptypoints));function F(re){E=T._input.zsmooth=T.zsmooth=!1,P.warn('cannot use zsmooth: "fast": '+re)}function N(re){if(re.length>1){var H=(re[re.length-1]-re[0])/(re.length-1),J=Math.abs(H/100);for(_=0;_J)return!1}return!0}T._islinear=!1,f.type==="log"||n.type==="log"?E==="fast"&&F("log axis found"):N(p)?N(C)?T._islinear=!0:E==="fast"&&F("y scale is not linear"):E==="fast"&&F("x scale is not linear");var V=P.maxRowLength(B),j=T.xtype==="scaled"?"":p,$=a(T,j,S,w,V,f),q=T.ytype==="scaled"?"":C,oe=a(T,q,x,k,B.length,n);b||(T._extremes[f._id]=o.findExtremes(f,$),T._extremes[n._id]=o.findExtremes(n,oe));var Z={x:$,y:oe,z:B,text:T._text||T.text,hovertext:T._hovertext||T.hovertext};if(T.xperiodalignment&&i&&(Z.orig_x=i),T.yperiodalignment&&I&&(Z.orig_y=I),j&&j.length===$.length-1&&(Z.xCenter=j),q&&q.length===oe.length-1&&(Z.yCenter=q),m&&(Z.xRanges=z.xRanges,Z.yRanges=z.yRanges,Z.pts=z.pts),v||d(h,T,{vals:B,cLetter:"z"}),v&&T.contours&&T.contours.coloring==="heatmap"){var G={type:T.type==="contour"?"heatmap":"histogram2d",xcalendar:T.xcalendar,ycalendar:T.ycalendar};Z.xfill=a(G,j,S,w,V,f),Z.yfill=a(G,q,x,k,B.length,n)}return[Z]};function u(y){for(var h=[],T=y.length,f=0;f=0;y--)l=d[y],c=l[0],u=l[1],h=((M[[c-1,u]]||t)[2]+(M[[c+1,u]]||t)[2]+(M[[c,u-1]]||t)[2]+(M[[c,u+1]]||t)[2])/20,h&&(T[l]=[c,u,h],d.splice(y,1),f=!0);if(!f)throw"findEmpties iterated with no new neighbors";for(l in T)M[l]=T[l],L.push(T[l])}return L.sort(function(n,v){return v[2]-n[2]})}},55512:function(te,X,e){var A=e(93024),P=e(3400),o=P.isArrayOrTypedArray,L=e(54460),M=e(8932).extractOpts;te.exports=function(g,r,t,s,a){a||(a={});var c=a.isContour,u=g.cd[0],l=u.trace,y=g.xa,h=g.ya,T=u.x,f=u.y,n=u.z,v=u.xCenter,m=u.yCenter,b=u.zmask,E=l.zhoverformat,p=T,S=f,w,i,C,x;if(g.index!==!1){try{C=Math.round(g.index[1]),x=Math.round(g.index[0])}catch{P.error("Error hovering on heatmap, pointNumber must be [row,col], found:",g.index);return}if(C<0||C>=n[0].length||x<0||x>n.length)return}else{if(A.inbox(r-T[0],r-T[T.length-1],0)>0||A.inbox(t-f[0],t-f[f.length-1],0)>0)return;if(c){var k;for(p=[2*T[0]-T[1]],k=1;kP;s++)t=M(g,r,L(t));return t>P&&A.log("interp2d didn't converge quickly",t),g};function M(d,g,r){var t=0,s,a,c,u,l,y,h,T,f,n,v,m,b;for(u=0;um&&(t=Math.max(t,Math.abs(d[a][c]-v)/(b-m))))}return t}},39096:function(te,X,e){var A=e(3400);te.exports=function(o,L){o("texttemplate");var M=A.extendFlat({},L.font,{color:"auto",size:"auto"});A.coerceFont(o,"textfont",M)}},35744:function(te,X,e){var A=e(24040),P=e(3400).isArrayOrTypedArray;te.exports=function(L,M,d,g,r,t){var s=[],a=A.traceIs(L,"contour"),c=A.traceIs(L,"histogram"),u=A.traceIs(L,"gl2d"),l,y,h,T=P(M)&&M.length>1;if(T&&!c&&t.type!=="category"){var f=M.length;if(f<=r){if(a||u)s=Array.from(M).slice(0,r);else if(r===1)t.type==="log"?s=[.5*M[0],2*M[0]]:s=[M[0]-.5,M[0]+.5];else if(t.type==="log"){for(s=[Math.pow(M[0],1.5)/Math.pow(M[1],.5)],h=1;h0;)J=i.c2p(F[ie]),ie--;for(J0;)Y=C.c2p(N[ie]),ie--;Y=i._length||J<=0||K>=C._length||Y<=0;if(ve){var Ae=k.selectAll("image").data([]);Ae.exit().remove(),n(k);return}var ye,Se;de==="fast"?(ye=Z,Se=oe):(ye=me,Se=Le);var _e=document.createElement("canvas");_e.width=ye,_e.height=Se;var ze=_e.getContext("2d",{willReadFrequently:!0}),Ie=a(B,{noNumericCheck:!0,returnArray:!0}),Ne,et;de==="fast"?(Ne=G?function(Qr){return Z-1-Qr}:d.identity,et=re?function(Qr){return oe-1-Qr}:d.identity):(Ne=function(Qr){return d.constrain(Math.round(i.c2p(F[Qr])-H),0,me)},et=function(Qr){return d.constrain(Math.round(C.c2p(N[Qr])-K),0,Le)});var st=et(0),Ze=[st,st],Ke=G?0:1,nt=re?0:1,it=0,lt=0,vt=0,xt=0,Je,Pe,Ue,He,Oe;function Ce(Qr,un){if(Qr!==void 0){var ln=Ie(Qr);return ln[0]=Math.round(ln[0]),ln[1]=Math.round(ln[1]),ln[2]=Math.round(ln[2]),it+=un,lt+=ln[0]*un,vt+=ln[1]*un,xt+=ln[2]*un,ln}return[0,0,0,0]}function ge(Qr,un,ln,Mn){var Dn=Qr[ln.bin0];if(Dn===void 0)return Ce(void 0,1);var Kn=Qr[ln.bin1],sa=un[ln.bin0],na=un[ln.bin1],Jn=Kn-Dn||0,aa=sa-Dn||0,pr;return Kn===void 0?na===void 0?pr=0:sa===void 0?pr=2*(na-Dn):pr=(2*na-sa-Dn)*2/3:na===void 0?sa===void 0?pr=0:pr=(2*Dn-Kn-sa)*2/3:sa===void 0?pr=(2*na-Kn-Dn)*2/3:pr=na+Dn-Kn-sa,Ce(Dn+ln.frac*Jn+Mn.frac*(aa+ln.frac*pr))}if(de!=="default"){var pe=0,Te;try{Te=new Uint8Array(ye*Se*4)}catch{Te=new Array(ye*Se*4)}if(de==="smooth"){var be=V||F,ke=j||N,Ve=new Array(be.length),je=new Array(ke.length),at=new Array(me),ut=V?m:v,Nt=j?m:v,Vt,gt,Ct;for(ie=0;ieir||ir>C._length))for(ne=It;neFe||Fe>i._length)){var Rt=r({x:Be,y:ar},B,E._fullLayout);Rt.x=Be,Rt.y=ar;var Lt=I.z[ie][ne];Lt===void 0?(Rt.z="",Rt.zLabel=""):(Rt.z=Lt,Rt.zLabel=M.tickText(dt,Lt,"hover").text);var Ut=I.text&&I.text[ie]&&I.text[ie][ne];(Ut===void 0||Ut===!1)&&(Ut=""),Rt.text=Ut;var Qt=d.texttemplateString(ct,Rt,E._fullLayout._d3locale,Rt,B._meta||{});if(Qt){var rr=Qt.split("
"),Kt=rr.length,Dt=0;for(le=0;le0&&(r=!0);for(var c=0;cd){var g=d-L[P];return L[P]=d,g}}else return L[P]=d,d;return 0},max:function(P,o,L,M){var d=M[o];if(A(d))if(d=Number(d),A(L[P])){if(L[P]S&&SL){var C=w===P?1:6,x=w===P?"M12":"M1";return function(k,I){var B=T.c2d(k,P,f),_=B.indexOf("-",C);_>0&&(B=B.substr(0,_));var z=T.d2c(B,0,f);if(zg?u>L?u>P*1.1?P:u>o*1.1?o:L:u>M?M:u>d?d:g:Math.pow(10,Math.floor(Math.log(u)/Math.LN10))}function a(u,l,y,h,T,f){if(h&&u>L){var n=c(l,T,f),v=c(y,T,f),m=u===P?0:1;return n[m]!==v[m]}return Math.floor(y/u)-Math.floor(l/u)>.1}function c(u,l,y){var h=l.c2d(u,P,y).split("-");return h[0]===""&&(h.unshift(),h[0]="-"+h[0]),h}},35852:function(te,X,e){var A=e(38248),P=e(3400),o=e(24040),L=e(54460),M=e(84664),d=e(16964),g=e(10648),r=e(2e3),t=e(67712);function s(y,h){var T=[],f=[],n=h.orientation==="h",v=L.getFromId(y,n?h.yaxis:h.xaxis),m=n?"y":"x",b={x:"y",y:"x"}[m],E=h[m+"calendar"],p=h.cumulative,S,w=a(y,h,v,m),i=w[0],C=w[1],x=typeof i.size=="string",k=[],I=x?k:i,B=[],_=[],z=[],O=0,F=h.histnorm,N=h.histfunc,V=F.indexOf("density")!==-1,j,$,q;p.enabled&&V&&(F=F.replace(/ ?density$/,""),V=!1);var oe=N==="max"||N==="min",Z=oe?null:0,G=d.count,re=g[F],H=!1,J=function(ze){return v.r2c(ze,0,E)},ae;for(P.isArrayOrTypedArray(h[b])&&N!=="count"&&(ae=h[b],H=N==="avg",G=d[N]),S=J(i.start),$=J(i.end)+(S-L.tickIncrement(S,i.size,!1,E))/1e6;S<$&&T.length<1e6&&(j=L.tickIncrement(S,i.size,!1,E),T.push((S+j)/2),f.push(Z),z.push([]),k.push(S),V&&B.push(1/(j-S)),H&&_.push(0),!(j<=S));)S=j;k.push(S),!x&&v.type==="date"&&(I={start:J(I.start),end:J(I.end),size:I.size}),y._fullLayout._roundFnOpts||(y._fullLayout._roundFnOpts={});var K=h["_"+m+"bingroup"],Y={leftGap:1/0,rightGap:1/0};K&&(y._fullLayout._roundFnOpts[K]||(y._fullLayout._roundFnOpts[K]=Y),Y=y._fullLayout._roundFnOpts[K]);var ie=f.length,ne=!0,le=Y.leftGap,de=Y.rightGap,we={};for(S=0;S=0&&q=ye;S--)if(f[S]){Se=S;break}for(S=ye;S<=Se;S++)if(A(T[S])&&A(f[S])){var _e={p:T[S],s:f[S],b:0};p.enabled||(_e.pts=z[S],ne?_e.ph0=_e.ph1=z[S].length?C[z[S][0]]:T[S]:(h._computePh=!0,_e.ph0=Le(k[S]),_e.ph1=Le(k[S+1],!0))),Ae.push(_e)}return Ae.length===1&&(Ae[0].width1=L.tickIncrement(Ae[0].p,i.size,!1,E)-Ae[0].p),M(Ae,h),P.isArrayOrTypedArray(h.selectedpoints)&&P.tagSelected(Ae,h,we),Ae}function a(y,h,T,f,n){var v=f+"bins",m=y._fullLayout,b=h["_"+f+"bingroup"],E=m._histogramBinOpts[b],p=m.barmode==="overlay",S,w,i,C,x,k,I,B=function(me){return T.r2c(me,0,C)},_=function(me){return T.c2r(me,0,C)},z=T.type==="date"?function(me){return me||me===0?P.cleanDate(me,null,C):null}:function(me){return A(me)?Number(me):null};function O(me,Le,ve){Le[me+"Found"]?(Le[me]=z(Le[me]),Le[me]===null&&(Le[me]=ve[me])):(k[me]=Le[me]=ve[me],P.nestedProperty(w[0],v+"."+me).set(ve[me]))}if(h["_"+f+"autoBinFinished"])delete h["_"+f+"autoBinFinished"];else{w=E.traces;var F=[],N=!0,V=!1,j=!1;for(S=0;S"u"){if(n)return[q,x,!0];q=c(y,h,T,f,v)}I=i.cumulative||{},I.enabled&&I.currentbin!=="include"&&(I.direction==="decreasing"?q.start=_(L.tickIncrement(B(q.start),q.size,!0,C)):q.end=_(L.tickIncrement(B(q.end),q.size,!1,C))),E.size=q.size,E.sizeFound||(k.size=q.size,P.nestedProperty(w[0],v+".size").set(q.size)),O("start",E,q),O("end",E,q)}x=h["_"+f+"pos0"],delete h["_"+f+"pos0"];var Z=h._input[v]||{},G=P.extendFlat({},E),re=E.start,H=T.r2l(Z.start),J=H!==void 0;if((E.startFound||J)&&H!==T.r2l(re)){var ae=J?H:P.aggNums(Math.min,null,x),K={type:T.type==="category"||T.type==="multicategory"?"linear":T.type,r2l:T.r2l,dtick:E.size,tick0:re,calendar:C,range:[ae,L.tickIncrement(ae,E.size,!1,C)].map(T.l2r)},Y=L.tickFirst(K);Y>T.r2l(ae)&&(Y=L.tickIncrement(Y,E.size,!0,C)),G.start=T.l2r(Y),J||P.nestedProperty(h,v+".start").set(G.start)}var ie=E.end,ne=T.r2l(Z.end),le=ne!==void 0;if((E.endFound||le)&&ne!==T.r2l(ie)){var de=le?ne:P.aggNums(Math.max,null,x);G.end=T.l2r(de),le||P.nestedProperty(h,v+".start").set(G.end)}var we="autobin"+f;return h._input[we]===!1&&(h._input[v]=P.extendFlat({},h[v]||{}),delete h._input[we],delete h[we]),[G,x]}function c(y,h,T,f,n){var v=y._fullLayout,m=u(y,h),b=!1,E=1/0,p=[h],S,w,i;for(S=0;S=0;f--)b(f);else if(h==="increasing"){for(f=1;f=0;f--)y[f]+=y[f+1];T==="exclude"&&(y.push(0),y.shift())}}te.exports={calc:s,calcAllAutoBins:a}},73316:function(te){te.exports={eventDataKeys:["binNumber"]}},80536:function(te,X,e){var A=e(3400),P=e(79811),o=e(24040).traceIs,L=e(20011),M=e(31508).validateCornerradius,d=A.nestedProperty,g=e(71888).getAxisGroup,r=[{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"];te.exports=function(a,c){var u=c._histogramBinOpts={},l=[],y={},h=[],T,f,n,v,m,b,E;function p(q,oe){return A.coerce(T._input,T,T._module.attributes,q,oe)}function S(q){return q.orientation==="v"?"x":"y"}function w(q,oe){var Z=P.getFromTrace({_fullLayout:c},q,oe);return Z.type}function i(q,oe,Z){var G=q.uid+"__"+Z;oe||(oe=G);var re=w(q,Z),H=q[Z+"calendar"]||"",J=u[oe],ae=!0;J&&(re===J.axType&&H===J.calendar?(ae=!1,J.traces.push(q),J.dirs.push(Z)):(oe=G,re!==J.axType&&A.warn(["Attempted to group the bins of trace",q.index,"set on a","type:"+re,"axis","with bins on","type:"+J.axType,"axis."].join(" ")),H!==J.calendar&&A.warn(["Attempted to group the bins of trace",q.index,"set with a",H,"calendar","with bins",J.calendar?"on a "+J.calendar+" calendar":"w/o a set calendar"].join(" ")))),ae&&(u[oe]={traces:[q],dirs:[Z],axType:re,calendar:q[Z+"calendar"]||""}),q["_"+Z+"bingroup"]=oe}for(m=0;mB&&C.splice(B,C.length-B),I.length>B&&I.splice(B,I.length-B);var _=[],z=[],O=[],F=typeof i.size=="string",N=typeof k.size=="string",V=[],j=[],$=F?V:i,q=N?j:k,oe=0,Z=[],G=[],re=u.histnorm,H=u.histfunc,J=re.indexOf("density")!==-1,ae=H==="max"||H==="min",K=ae?null:0,Y=o.count,ie=L[re],ne=!1,le=[],de=[],we="z"in u?u.z:"marker"in u&&Array.isArray(u.marker.color)?u.marker.color:"";we&&H!=="count"&&(ne=H==="avg",Y=o[H]);var me=i.size,Le=f(i.start),ve=f(i.end)+(Le-P.tickIncrement(Le,me,!1,h))/1e6;for(b=Le;b=0&&p=0&&S-1,flipY:z.tiling.flip.indexOf("y")>-1,orientation:z.tiling.orientation,pad:{inner:z.tiling.pad},maxDepth:z._maxDepth}),j=V.descendants(),$=1/0,q=-1/0;j.forEach(function(H){var J=H.depth;J>=z._maxDepth?(H.x0=H.x1=(H.x0+H.x1)/2,H.y0=H.y1=(H.y0+H.y1)/2):($=Math.min($,J),q=Math.max(q,J))}),h=h.data(j,r.getPtId),z._maxVisibleLayers=isFinite(q)?q-$+1:0,h.enter().append("g").classed("slice",!0),w(h,a,k,[f,n],b),h.order();var oe=null;if(S&&x){var Z=r.getPtId(x);h.each(function(H){oe===null&&r.getPtId(H)===Z&&(oe={x0:H.x0,x1:H.x1,y0:H.y0,y1:H.y1})})}var G=function(){return oe||{x0:0,x1:f,y0:0,y1:n}},re=h;return S&&(re=re.transition().each("end",function(){var H=A.select(this);r.setSliceCursor(H,u,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),re.each(function(H){H._x0=v(H.x0),H._x1=v(H.x1),H._y0=m(H.y0),H._y1=m(H.y1),H._hoverX=v(H.x1-z.tiling.pad),H._hoverY=m(N?H.y1-z.tiling.pad/2:H.y0+z.tiling.pad/2);var J=A.select(this),ae=P.ensureSingle(J,"path","surface",function(ne){ne.style("pointer-events",I?"none":"all")});S?ae.transition().attrTween("d",function(ne){var le=i(ne,a,G(),[f,n],{orientation:z.tiling.orientation,flipX:z.tiling.flip.indexOf("x")>-1,flipY:z.tiling.flip.indexOf("y")>-1});return function(de){return b(le(de))}}):ae.attr("d",b),J.call(t,y,u,l,{styleOne:d,eventDataKeys:g.eventDataKeys,transitionTime:g.CLICK_TRANSITION_TIME,transitionEasing:g.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,u,{isTransitioning:u._transitioning}),ae.call(d,H,z,u,{hovered:!1}),H.x0===H.x1||H.y0===H.y1?H._text="":H._text=s(H,y,z,l,B)||"";var K=P.ensureSingle(J,"g","slicetext"),Y=P.ensureSingle(K,"text","",function(ne){ne.attr("data-notex",1)}),ie=P.ensureUniformFontSize(u,r.determineTextFont(z,H,B.font));Y.text(H._text||" ").classed("slicetext",!0).attr("text-anchor",F?"end":O?"start":"middle").call(o.font,ie).call(L.convertToTspans,u),H.textBB=o.bBox(Y.node()),H.transform=E(H,{fontSize:ie.size}),H.transform.fontSize=ie.size,S?Y.transition().attrTween("transform",function(ne){var le=C(ne,a,G(),[f,n]);return function(de){return p(le(de))}}):Y.attr("transform",p(H))}),oe}},29044:function(te,X,e){te.exports={moduleType:"trace",name:"icicle",basePlotModule:e(59564),categories:[],animatable:!0,attributes:e(97376),layoutAttributes:e(90676),supplyDefaults:e(7045),supplyLayoutDefaults:e(4304),calc:e(73876).r,crossTraceCalc:e(73876).q,plot:e(38364),style:e(47192).style,colorbar:e(5528),meta:{}}},90676:function(te){te.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}},4304:function(te,X,e){var A=e(3400),P=e(90676);te.exports=function(L,M){function d(g,r){return A.coerce(L,M,P,g,r)}d("iciclecolorway",M.colorway),d("extendiciclecolors")}},25132:function(te,X,e){var A=e(74148),P=e(83024);te.exports=function(L,M,d){var g=d.flipX,r=d.flipY,t=d.orientation==="h",s=d.maxDepth,a=M[0],c=M[1];s&&(a=(L.height+1)*M[0]/Math.min(L.height+1,s),c=(L.height+1)*M[1]/Math.min(L.height+1,s));var u=A.partition().padding(d.pad.inner).size(t?[M[1],a]:[M[0],c])(L);return(t||g||r)&&P(u,M,{swapXY:t,flipX:g,flipY:r}),u}},38364:function(te,X,e){var A=e(95808),P=e(67880);te.exports=function(L,M,d,g){return A(L,M,d,g,{type:"icicle",drawDescendants:P})}},47192:function(te,X,e){var A=e(33428),P=e(76308),o=e(3400),L=e(82744).resizeText,M=e(60404);function d(r){var t=r._fullLayout._iciclelayer.selectAll(".trace");L(r,t,"icicle"),t.each(function(s){var a=A.select(this),c=s[0],u=c.trace;a.style("opacity",u.opacity),a.selectAll("path.surface").each(function(l){A.select(this).call(g,l,u,r)})})}function g(r,t,s,a){var c=t.data.data,u=!t.children,l=c.i,y=o.castOption(s,l,"marker.line.color")||P.defaultLine,h=o.castOption(s,l,"marker.line.width")||0;r.call(M,t,s,a).style("stroke-width",h).call(P.stroke,y).style("opacity",u?s.leaf.opacity:null)}te.exports={style:d,styleOne:g}},95188:function(te,X,e){for(var A=e(45464),P=e(21776).Ks,o=e(92880).extendFlat,L=e(47797).colormodel,M=["rgb","rgba","rgba256","hsl","hsla"],d=[],g=[],r=0;r0||A.inbox(r-t.y0,r-(t.y0+t.h*s.dy),0)>0)){var u=Math.floor((g-t.x0)/s.dx),l=Math.floor(Math.abs(r-t.y0)/s.dy),y;if(s._hasZ?y=t.z[l][u]:s._hasSource&&(y=s._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(u,l,1,1).data),!!y){var h=t.hi||s.hoverinfo,T;if(h){var f=h.split("+");f.indexOf("all")!==-1&&(f=["color"]),f.indexOf("color")!==-1&&(T=!0)}var n=L.colormodel[s.colormodel],v=n.colormodel||s.colormodel,m=v.length,b=s._scaler(y),E=n.suffix,p=[];(s.hovertemplate||T)&&(p.push("["+[b[0]+E[0],b[1]+E[1],b[2]+E[2]].join(", ")),m===4&&p.push(", "+b[3]+E[3]),p.push("]"),p=p.join(""),d.extraText=v.toUpperCase()+": "+p);var S;o(s.hovertext)&&o(s.hovertext[l])?S=s.hovertext[l][u]:o(s.text)&&o(s.text[l])&&(S=s.text[l][u]);var w=c.c2p(t.y0+(l+.5)*s.dy),i=t.x0+(u+.5)*s.dx,C=t.y0+(l+.5)*s.dy,x="["+y.slice(0,s.colormodel.length).join(", ")+"]";return[P.extendFlat(d,{index:[l,u],x0:a.c2p(t.x0+u*s.dx),x1:a.c2p(t.x0+(u+1)*s.dx),y0:w,y1:w,color:b,xVal:i,xLabelVal:i,yVal:C,yLabelVal:C,zLabelVal:x,text:S,hovertemplateLabels:{zLabel:x,colorLabel:p,"color[0]Label":b[0]+E[0],"color[1]Label":b[1]+E[1],"color[2]Label":b[2]+E[2],"color[3]Label":b[3]+E[3]}})]}}}},48928:function(te,X,e){te.exports={attributes:e(95188),supplyDefaults:e(13188),calc:e(93336),plot:e(63715),style:e(28576),hoverPoints:e(24892),eventData:e(79972),moduleType:"trace",name:"image",basePlotModule:e(57952),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}},63715:function(te,X,e){var A=e(33428),P=e(3400),o=P.strTranslate,L=e(9616),M=e(47797),d=e(9188),g=e(2264).STYLE;te.exports=function(t,s,a,c){var u=s.xaxis,l=s.yaxis,y=!t._context._exportedPlot&&d();P.makeTraceGroups(c,a,"im").each(function(h){var T=A.select(this),f=h[0],n=f.trace,v=(n.zsmooth==="fast"||n.zsmooth===!1&&y)&&!n._hasZ&&n._hasSource&&u.type==="linear"&&l.type==="linear";n._realImage=v;var m=f.z,b=f.x0,E=f.y0,p=f.w,S=f.h,w=n.dx,i=n.dy,C,x,k,I,B,_;for(_=0;C===void 0&&_0;)x=u.c2p(b+_*w),_--;for(_=0;I===void 0&&_0;)B=l.c2p(E+_*i),_--;if(xZ[0];if(G||re){var H=C+O/2,J=I+F/2;q+="transform:"+o(H+"px",J+"px")+"scale("+(G?-1:1)+","+(re?-1:1)+")"+o(-H+"px",-J+"px")+";"}}$.attr("style",q);var ae=new Promise(function(K){if(n._hasZ)K();else if(n._hasSource)if(n._canvas&&n._canvas.el.width===p&&n._canvas.el.height===S&&n._canvas.source===n.source)K();else{var Y=document.createElement("canvas");Y.width=p,Y.height=S;var ie=Y.getContext("2d",{willReadFrequently:!0});n._image=n._image||new Image;var ne=n._image;ne.onload=function(){ie.drawImage(ne,0,0),n._canvas={el:Y,source:n.source},K()},ne.setAttribute("src",n.source)}}).then(function(){var K,Y;if(n._hasZ)Y=j(function(le,de){var we=m[de][le];return P.isTypedArray(we)&&(we=Array.from(we)),we}),K=Y.toDataURL("image/png");else if(n._hasSource)if(v)K=n.source;else{var ie=n._canvas.el.getContext("2d",{willReadFrequently:!0}),ne=ie.getImageData(0,0,p,S).data;Y=j(function(le,de){var we=4*(de*p+le);return[ne[we],ne[we+1],ne[we+2],ne[we+3]]}),K=Y.toDataURL("image/png")}$.attr({"xlink:href":K,height:F,width:O,x:C,y:I})});t._promises.push(ae)})}},28576:function(te,X,e){var A=e(33428);te.exports=function(o){A.select(o).selectAll(".im image").style("opacity",function(L){return L[0].trace.opacity})}},89864:function(te,X,e){var A=e(92880).extendFlat,P=e(92880).extendDeep,o=e(67824).overrideAll,L=e(25376),M=e(22548),d=e(86968).u,g=e(94724),r=e(31780).templatedArray,t=e(48164),s=e(29736).descriptionOnlyNumbers,a=L({editType:"plot",colorEditType:"plot"}),c={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:M.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"},u={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},l=r("step",P({},c,{range:u}));te.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:A({},a,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:s("value")},font:A({},a,{}),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:s("value")},increasing:{symbol:{valType:"string",dflt:t.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:t.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:t.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:t.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:A({},a,{}),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:P({},c,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:M.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:o({range:u,visible:A({},g.visible,{dflt:!0}),tickmode:g.minor.tickmode,nticks:g.nticks,tick0:g.tick0,dtick:g.dtick,tickvals:g.tickvals,ticktext:g.ticktext,ticks:A({},g.ticks,{dflt:"outside"}),ticklen:g.ticklen,tickwidth:g.tickwidth,tickcolor:g.tickcolor,ticklabelstep:g.ticklabelstep,showticklabels:g.showticklabels,labelalias:g.labelalias,tickfont:L({}),tickangle:g.tickangle,tickformat:g.tickformat,tickformatstops:g.tickformatstops,tickprefix:g.tickprefix,showtickprefix:g.showtickprefix,ticksuffix:g.ticksuffix,showticksuffix:g.showticksuffix,separatethousands:g.separatethousands,exponentformat:g.exponentformat,minexponent:g.minexponent,showexponent:g.showexponent,editType:"plot"},"plot"),steps:l,threshold:{line:{color:A({},c.line.color,{}),width:A({},c.line.width,{dflt:1}),editType:"plot"},thickness:A({},c.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}},92728:function(te,X,e){var A=e(7316);X.name="indicator",X.plot=function(P,o,L,M){A.plotBasePlot(X.name,P,o,L,M)},X.clean=function(P,o,L,M){A.cleanBasePlot(X.name,P,o,L,M)}},79136:function(te){function X(e,A){var P=[],o=A.value;typeof A._lastValue!="number"&&(A._lastValue=A.value);var L=A._lastValue,M=L;return A._hasDelta&&typeof A.delta.reference=="number"&&(M=A.delta.reference),P[0]={y:o,lastY:L,delta:o-M,relativeDelta:(o-M)/M},P}te.exports={calc:X}},12096:function(te){te.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}},20424:function(te,X,e){var A=e(3400),P=e(89864),o=e(86968).Q,L=e(31780),M=e(51272),d=e(12096),g=e(26332),r=e(25404),t=e(95936),s=e(42568);function a(u,l,y,h){function T(B,_){return A.coerce(u,l,P,B,_)}o(l,h,T),T("mode"),l._hasNumber=l.mode.indexOf("number")!==-1,l._hasDelta=l.mode.indexOf("delta")!==-1,l._hasGauge=l.mode.indexOf("gauge")!==-1;var f=T("value");l._range=[0,typeof f=="number"?1.5*f:1];var n=new Array(2),v;l._hasNumber&&(T("number.valueformat"),T("number.font.color",h.font.color),T("number.font.family",h.font.family),T("number.font.size"),l.number.font.size===void 0&&(l.number.font.size=d.defaultNumberFontSize,n[0]=!0),T("number.prefix"),T("number.suffix"),v=l.number.font.size);var m;l._hasDelta&&(T("delta.font.color",h.font.color),T("delta.font.family",h.font.family),T("delta.font.size"),l.delta.font.size===void 0&&(l.delta.font.size=(l._hasNumber?.5:1)*(v||d.defaultNumberFontSize),n[1]=!0),T("delta.reference",l.value),T("delta.relative"),T("delta.valueformat",l.delta.relative?"2%":""),T("delta.increasing.symbol"),T("delta.increasing.color"),T("delta.decreasing.symbol"),T("delta.decreasing.color"),T("delta.position"),T("delta.prefix"),T("delta.suffix"),m=l.delta.font.size),l._scaleNumbers=(!l._hasNumber||n[0])&&(!l._hasDelta||n[1])||!1,T("title.font.color",h.font.color),T("title.font.family",h.font.family),T("title.font.size",.25*(v||m||d.defaultNumberFontSize)),T("title.text");var b,E,p,S;function w(B,_){return A.coerce(b,E,P.gauge,B,_)}function i(B,_){return A.coerce(p,S,P.gauge.axis,B,_)}if(l._hasGauge){b=u.gauge,b||(b={}),E=L.newContainer(l,"gauge"),w("shape");var C=l._isBullet=l.gauge.shape==="bullet";C||T("title.align","center");var x=l._isAngular=l.gauge.shape==="angular";x||T("align","center"),w("bgcolor",h.paper_bgcolor),w("borderwidth"),w("bordercolor"),w("bar.color"),w("bar.line.color"),w("bar.line.width");var k=d.valueThickness*(l.gauge.shape==="bullet"?.5:1);w("bar.thickness",k),M(b,E,{name:"steps",handleItemDefaults:c}),w("threshold.value"),w("threshold.thickness"),w("threshold.line.width"),w("threshold.line.color"),p={},b&&(p=b.axis||{}),S=L.newContainer(E,"axis"),i("visible"),l._range=i("range",l._range);var I={noAutotickangles:!0,outerTicks:!0};g(p,S,i,"linear"),s(p,S,i,"linear",I),t(p,S,i,"linear",I),r(p,S,i,I)}else T("title.align","center"),T("align","center"),l._isAngular=l._isBullet=!1;l._length=null}function c(u,l){function y(h,T){return A.coerce(u,l,P.gauge.steps,h,T)}y("color"),y("line.color"),y("line.width"),y("range"),y("thickness")}te.exports={supplyDefaults:a}},43480:function(te,X,e){te.exports={moduleType:"trace",name:"indicator",basePlotModule:e(92728),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:e(89864),supplyDefaults:e(20424).supplyDefaults,calc:e(79136).calc,plot:e(97864),meta:{}}},97864:function(te,X,e){var A=e(33428),P=e(67756).qy,o=e(67756).Gz,L=e(3400),M=L.strScale,d=L.strTranslate,g=L.rad2deg,r=e(84284).MID_SHIFT,t=e(43616),s=e(12096),a=e(72736),c=e(54460),u=e(28336),l=e(37668),y=e(94724),h=e(76308),T={left:"start",center:"middle",right:"end"},f={left:0,center:.5,right:1},n=/[yzafpnµmkMGTPEZY]/;function v(I){return I&&I.duration>0}te.exports=function(B,_,z,O){var F=B._fullLayout,N;v(z)&&O&&(N=O()),L.makeTraceGroups(F._indicatorlayer,_,"trace").each(function(V){var j=V[0],$=j.trace,q=A.select(this),oe=$._hasGauge,Z=$._isAngular,G=$._isBullet,re=$.domain,H={w:F._size.w*(re.x[1]-re.x[0]),h:F._size.h*(re.y[1]-re.y[0]),l:F._size.l+F._size.w*re.x[0],r:F._size.r+F._size.w*(1-re.x[1]),t:F._size.t+F._size.h*(1-re.y[1]),b:F._size.b+F._size.h*re.y[0]},J=H.l+H.w/2,ae=H.t+H.h/2,K=Math.min(H.w/2,H.h),Y=s.innerRadius*K,ie,ne,le,de=$.align||"center";if(ne=ae,!oe)ie=H.l+f[de]*H.w,le=function(Ie){return i(Ie,H.w,H.h)};else if(Z&&(ie=J,ne=ae+K/2,le=function(Ie){return C(Ie,.9*Y)}),G){var we=s.bulletPadding,me=1-s.bulletNumberDomainSize+we;ie=H.l+(me+(1-me)*f[de])*H.w,le=function(Ie){return i(Ie,(s.bulletNumberDomainSize-we)*H.w,H.h)}}E(B,q,V,{numbersX:ie,numbersY:ne,numbersScaler:le,transitionOpts:z,onComplete:N});var Le,ve;oe&&(Le={range:$.gauge.axis.range,color:$.gauge.bgcolor,line:{color:$.gauge.bordercolor,width:0},thickness:1},ve={range:$.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:$.gauge.bordercolor,width:$.gauge.borderwidth},thickness:1});var Ae=q.selectAll("g.angular").data(Z?V:[]);Ae.exit().remove();var ye=q.selectAll("g.angularaxis").data(Z?V:[]);ye.exit().remove(),Z&&b(B,q,V,{radius:K,innerRadius:Y,gauge:Ae,layer:ye,size:H,gaugeBg:Le,gaugeOutline:ve,transitionOpts:z,onComplete:N});var Se=q.selectAll("g.bullet").data(G?V:[]);Se.exit().remove();var _e=q.selectAll("g.bulletaxis").data(G?V:[]);_e.exit().remove(),G&&m(B,q,V,{gauge:Se,layer:_e,size:H,gaugeBg:Le,gaugeOutline:ve,transitionOpts:z,onComplete:N});var ze=q.selectAll("text.title").data(V);ze.exit().remove(),ze.enter().append("text").classed("title",!0),ze.attr("text-anchor",function(){return G?T.right:T[$.title.align]}).text($.title.text).call(t.font,$.title.font).call(a.convertToTspans,B),ze.attr("transform",function(){var Ie=H.l+H.w*f[$.title.align],Ne,et=s.titlePadding,st=t.bBox(ze.node());if(oe){if(Z)if($.gauge.axis.visible){var Ze=t.bBox(ye.node());Ne=Ze.top-et-st.bottom}else Ne=H.t+H.h/2-K/2-st.bottom-et;G&&(Ne=ne-(st.top+st.bottom)/2,Ie=H.l-s.bulletPadding*H.w)}else Ne=$._numbersTop-et-st.bottom;return d(Ie,Ne)})})};function m(I,B,_,z){var O=_[0].trace,F=z.gauge,N=z.layer,V=z.gaugeBg,j=z.gaugeOutline,$=z.size,q=O.domain,oe=z.transitionOpts,Z=z.onComplete,G,re,H,J,ae;F.enter().append("g").classed("bullet",!0),F.attr("transform",d($.l,$.t)),N.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),N.selectAll("g.xbulletaxistick,path,text").remove();var K=$.h,Y=O.gauge.bar.thickness*K,ie=q.x[0],ne=q.x[0]+(q.x[1]-q.x[0])*(O._hasNumber||O._hasDelta?1-s.bulletNumberDomainSize:1);G=w(I,O.gauge.axis),G._id="xbulletaxis",G.domain=[ie,ne],G.setScale(),re=c.calcTicks(G),H=c.makeTransTickFn(G),J=c.getTickSigns(G)[2],ae=$.t+$.h,G.visible&&(c.drawTicks(I,G,{vals:G.ticks==="inside"?c.clipEnds(G,re):re,layer:N,path:c.makeTickPath(G,ae,J),transFn:H}),c.drawLabels(I,G,{vals:re,layer:N,transFn:H,labelFns:c.makeLabelFns(G,ae)}));function le(ye){ye.attr("width",function(Se){return Math.max(0,G.c2p(Se.range[1])-G.c2p(Se.range[0]))}).attr("x",function(Se){return G.c2p(Se.range[0])}).attr("y",function(Se){return .5*(1-Se.thickness)*K}).attr("height",function(Se){return Se.thickness*K})}var de=[V].concat(O.gauge.steps),we=F.selectAll("g.bg-bullet").data(de);we.enter().append("g").classed("bg-bullet",!0).append("rect"),we.select("rect").call(le).call(p),we.exit().remove();var me=F.selectAll("g.value-bullet").data([O.gauge.bar]);me.enter().append("g").classed("value-bullet",!0).append("rect"),me.select("rect").attr("height",Y).attr("y",(K-Y)/2).call(p),v(oe)?me.select("rect").transition().duration(oe.duration).ease(oe.easing).each("end",function(){Z&&Z()}).each("interrupt",function(){Z&&Z()}).attr("width",Math.max(0,G.c2p(Math.min(O.gauge.axis.range[1],_[0].y)))):me.select("rect").attr("width",typeof _[0].y=="number"?Math.max(0,G.c2p(Math.min(O.gauge.axis.range[1],_[0].y))):0),me.exit().remove();var Le=_.filter(function(){return O.gauge.threshold.value||O.gauge.threshold.value===0}),ve=F.selectAll("g.threshold-bullet").data(Le);ve.enter().append("g").classed("threshold-bullet",!0).append("line"),ve.select("line").attr("x1",G.c2p(O.gauge.threshold.value)).attr("x2",G.c2p(O.gauge.threshold.value)).attr("y1",(1-O.gauge.threshold.thickness)/2*K).attr("y2",(1-(1-O.gauge.threshold.thickness)/2)*K).call(h.stroke,O.gauge.threshold.line.color).style("stroke-width",O.gauge.threshold.line.width),ve.exit().remove();var Ae=F.selectAll("g.gauge-outline").data([j]);Ae.enter().append("g").classed("gauge-outline",!0).append("rect"),Ae.select("rect").call(le).call(p),Ae.exit().remove()}function b(I,B,_,z){var O=_[0].trace,F=z.size,N=z.radius,V=z.innerRadius,j=z.gaugeBg,$=z.gaugeOutline,q=[F.l+F.w/2,F.t+F.h/2+N/2],oe=z.gauge,Z=z.layer,G=z.transitionOpts,re=z.onComplete,H=Math.PI/2;function J(Ke){var nt=O.gauge.axis.range[0],it=O.gauge.axis.range[1],lt=(Ke-nt)/(it-nt)*Math.PI-H;return lt<-H?-H:lt>H?H:lt}function ae(Ke){return A.svg.arc().innerRadius((V+N)/2-Ke/2*(N-V)).outerRadius((V+N)/2+Ke/2*(N-V)).startAngle(-H)}function K(Ke){Ke.attr("d",function(nt){return ae(nt.thickness).startAngle(J(nt.range[0])).endAngle(J(nt.range[1]))()})}var Y,ie,ne,le;oe.enter().append("g").classed("angular",!0),oe.attr("transform",d(q[0],q[1])),Z.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),Z.selectAll("g.xangularaxistick,path,text").remove(),Y=w(I,O.gauge.axis),Y.type="linear",Y.range=O.gauge.axis.range,Y._id="xangularaxis",Y.ticklabeloverflow="allow",Y.setScale();var de=function(Ke){return(Y.range[0]-Ke.x)/(Y.range[1]-Y.range[0])*Math.PI+Math.PI},we={},me=c.makeLabelFns(Y,0),Le=me.labelStandoff;we.xFn=function(Ke){var nt=de(Ke);return Math.cos(nt)*Le},we.yFn=function(Ke){var nt=de(Ke),it=Math.sin(nt)>0?.2:1;return-Math.sin(nt)*(Le+Ke.fontSize*it)+Math.abs(Math.cos(nt))*(Ke.fontSize*r)},we.anchorFn=function(Ke){var nt=de(Ke),it=Math.cos(nt);return Math.abs(it)<.1?"middle":it>0?"start":"end"},we.heightFn=function(Ke,nt,it){var lt=de(Ke);return-.5*(1+Math.sin(lt))*it};var ve=function(Ke){return d(q[0]+N*Math.cos(Ke),q[1]-N*Math.sin(Ke))};ne=function(Ke){return ve(de(Ke))};var Ae=function(Ke){var nt=de(Ke);return ve(nt)+"rotate("+-g(nt)+")"};if(ie=c.calcTicks(Y),le=c.getTickSigns(Y)[2],Y.visible){le=Y.ticks==="inside"?-1:1;var ye=(Y.linewidth||1)/2;c.drawTicks(I,Y,{vals:ie,layer:Z,path:"M"+le*ye+",0h"+le*Y.ticklen,transFn:Ae}),c.drawLabels(I,Y,{vals:ie,layer:Z,transFn:ne,labelFns:we})}var Se=[j].concat(O.gauge.steps),_e=oe.selectAll("g.bg-arc").data(Se);_e.enter().append("g").classed("bg-arc",!0).append("path"),_e.select("path").call(K).call(p),_e.exit().remove();var ze=ae(O.gauge.bar.thickness),Ie=oe.selectAll("g.value-arc").data([O.gauge.bar]);Ie.enter().append("g").classed("value-arc",!0).append("path");var Ne=Ie.select("path");v(G)?(Ne.transition().duration(G.duration).ease(G.easing).each("end",function(){re&&re()}).each("interrupt",function(){re&&re()}).attrTween("d",S(ze,J(_[0].lastY),J(_[0].y))),O._lastValue=_[0].y):Ne.attr("d",typeof _[0].y=="number"?ze.endAngle(J(_[0].y)):"M0,0Z"),Ne.call(p),Ie.exit().remove(),Se=[];var et=O.gauge.threshold.value;(et||et===0)&&Se.push({range:[et,et],color:O.gauge.threshold.color,line:{color:O.gauge.threshold.line.color,width:O.gauge.threshold.line.width},thickness:O.gauge.threshold.thickness});var st=oe.selectAll("g.threshold-arc").data(Se);st.enter().append("g").classed("threshold-arc",!0).append("path"),st.select("path").call(K).call(p),st.exit().remove();var Ze=oe.selectAll("g.gauge-outline").data([$]);Ze.enter().append("g").classed("gauge-outline",!0).append("path"),Ze.select("path").call(K).call(p),Ze.exit().remove()}function E(I,B,_,z){var O=_[0].trace,F=z.numbersX,N=z.numbersY,V=O.align||"center",j=T[V],$=z.transitionOpts,q=z.onComplete,oe=L.ensureSingle(B,"g","numbers"),Z,G,re,H=[];O._hasNumber&&H.push("number"),O._hasDelta&&(H.push("delta"),O.delta.position==="left"&&H.reverse());var J=oe.selectAll("text").data(H);J.enter().append("text"),J.attr("text-anchor",function(){return j}).attr("class",function(ve){return ve}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),J.exit().remove();function ae(ve,Ae,ye,Se){if(ve.match("s")&&ye>=0!=Se>=0&&!Ae(ye).slice(-1).match(n)&&!Ae(Se).slice(-1).match(n)){var _e=ve.slice().replace("s","f").replace(/\d+/,function(Ie){return parseInt(Ie)-1}),ze=w(I,{tickformat:_e});return function(Ie){return Math.abs(Ie)<1?c.tickText(ze,Ie).text:Ae(Ie)}}else return Ae}function K(){var ve=w(I,{tickformat:O.number.valueformat},O._range);ve.setScale(),c.prepTicks(ve);var Ae=function(Ie){return c.tickText(ve,Ie).text},ye=O.number.suffix,Se=O.number.prefix,_e=oe.select("text.number");function ze(){var Ie=typeof _[0].y=="number"?Se+Ae(_[0].y)+ye:"-";_e.text(Ie).call(t.font,O.number.font).call(a.convertToTspans,I)}return v($)?_e.transition().duration($.duration).ease($.easing).each("end",function(){ze(),q&&q()}).each("interrupt",function(){ze(),q&&q()}).attrTween("text",function(){var Ie=A.select(this),Ne=o(_[0].lastY,_[0].y);O._lastValue=_[0].y;var et=ae(O.number.valueformat,Ae,_[0].lastY,_[0].y);return function(st){Ie.text(Se+et(Ne(st))+ye)}}):ze(),Z=x(Se+Ae(_[0].y)+ye,O.number.font,j,I),_e}function Y(){var ve=w(I,{tickformat:O.delta.valueformat},O._range);ve.setScale(),c.prepTicks(ve);var Ae=function(st){return c.tickText(ve,st).text},ye=O.delta.suffix,Se=O.delta.prefix,_e=function(st){var Ze=O.delta.relative?st.relativeDelta:st.delta;return Ze},ze=function(st,Ze){return st===0||typeof st!="number"||isNaN(st)?"-":(st>0?O.delta.increasing.symbol:O.delta.decreasing.symbol)+Se+Ze(st)+ye},Ie=function(st){return st.delta>=0?O.delta.increasing.color:O.delta.decreasing.color};O._deltaLastValue===void 0&&(O._deltaLastValue=_e(_[0]));var Ne=oe.select("text.delta");Ne.call(t.font,O.delta.font).call(h.fill,Ie({delta:O._deltaLastValue}));function et(){Ne.text(ze(_e(_[0]),Ae)).call(h.fill,Ie(_[0])).call(a.convertToTspans,I)}return v($)?Ne.transition().duration($.duration).ease($.easing).tween("text",function(){var st=A.select(this),Ze=_e(_[0]),Ke=O._deltaLastValue,nt=ae(O.delta.valueformat,Ae,Ke,Ze),it=o(Ke,Ze);return O._deltaLastValue=Ze,function(lt){st.text(ze(it(lt),nt)),st.call(h.fill,Ie({delta:it(lt)}))}}).each("end",function(){et(),q&&q()}).each("interrupt",function(){et(),q&&q()}):et(),G=x(ze(_e(_[0]),Ae),O.delta.font,j,I),Ne}var ie=O.mode+O.align,ne;if(O._hasDelta&&(ne=Y(),ie+=O.delta.position+O.delta.font.size+O.delta.font.family+O.delta.valueformat,ie+=O.delta.increasing.symbol+O.delta.decreasing.symbol,re=G),O._hasNumber&&(K(),ie+=O.number.font.size+O.number.font.family+O.number.valueformat+O.number.suffix+O.number.prefix,re=Z),O._hasDelta&&O._hasNumber){var le=[(Z.left+Z.right)/2,(Z.top+Z.bottom)/2],de=[(G.left+G.right)/2,(G.top+G.bottom)/2],we,me,Le=.75*O.delta.font.size;O.delta.position==="left"&&(we=k(O,"deltaPos",0,-1*(Z.width*f[O.align]+G.width*(1-f[O.align])+Le),ie,Math.min),me=le[1]-de[1],re={width:Z.width+G.width+Le,height:Math.max(Z.height,G.height),left:G.left+we,right:Z.right,top:Math.min(Z.top,G.top+me),bottom:Math.max(Z.bottom,G.bottom+me)}),O.delta.position==="right"&&(we=k(O,"deltaPos",0,Z.width*(1-f[O.align])+G.width*f[O.align]+Le,ie,Math.max),me=le[1]-de[1],re={width:Z.width+G.width+Le,height:Math.max(Z.height,G.height),left:Z.left,right:G.right+we,top:Math.min(Z.top,G.top+me),bottom:Math.max(Z.bottom,G.bottom+me)}),O.delta.position==="bottom"&&(we=null,me=G.height,re={width:Math.max(Z.width,G.width),height:Z.height+G.height,left:Math.min(Z.left,G.left),right:Math.max(Z.right,G.right),top:Z.bottom-Z.height,bottom:Z.bottom+G.height}),O.delta.position==="top"&&(we=null,me=Z.top,re={width:Math.max(Z.width,G.width),height:Z.height+G.height,left:Math.min(Z.left,G.left),right:Math.max(Z.right,G.right),top:Z.bottom-Z.height-G.height,bottom:Z.bottom}),ne.attr({dx:we,dy:me})}(O._hasNumber||O._hasDelta)&&oe.attr("transform",function(){var ve=z.numbersScaler(re);ie+=ve[2];var Ae=k(O,"numbersScale",1,ve[0],ie,Math.min),ye;O._scaleNumbers||(Ae=1),O._isAngular?ye=N-Ae*re.bottom:ye=N-Ae*(re.top+re.bottom)/2,O._numbersTop=Ae*re.top+ye;var Se=re[V];V==="center"&&(Se=(re.left+re.right)/2);var _e=F-Ae*Se;return _e=k(O,"numbersTranslate",0,_e,ie,Math.max),d(_e,ye)+M(Ae)})}function p(I){I.each(function(B){h.stroke(A.select(this),B.line.color)}).each(function(B){h.fill(A.select(this),B.color)}).style("stroke-width",function(B){return B.line.width})}function S(I,B,_){return function(){var z=P(B,_);return function(O){return I.endAngle(z(O))()}}}function w(I,B,_){var z=I._fullLayout,O=L.extendFlat({type:"linear",ticks:"outside",range:_,showline:!0},B),F={type:"linear",_id:"x"+B._id},N={letter:"x",font:z.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function V(j,$){return L.coerce(O,F,y,j,$)}return u(O,F,V,N,z),l(O,F,V,N),F}function i(I,B,_){var z=Math.min(B/I.width,_/I.height);return[z,I,B+"x"+_]}function C(I,B){var _=Math.sqrt(I.width/2*(I.width/2)+I.height*I.height),z=B/_;return[z,I,B]}function x(I,B,_,z){var O=document.createElementNS("http://www.w3.org/2000/svg","text"),F=A.select(O);return F.text(I).attr("x",0).attr("y",0).attr("text-anchor",_).attr("data-unformatted",I).call(a.convertToTspans,z).call(t.font,B),t.bBox(F.node())}function k(I,B,_,z,O,F){var N="_cache"+B;I[N]&&I[N].key===O||(I[N]={key:O,value:_});var V=L.aggNums(F,null,[I[N].value,z],2);return I[N].value=V,V}},50048:function(te,X,e){var A=e(49084),P=e(29736).axisHoverFormat,o=e(21776).Ks,L=e(52948),M=e(45464),d=e(92880).extendFlat,g=e(67824).overrideAll;function r(a){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function t(a){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var s=te.exports=g(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:r(),y:r(),z:r()},caps:{x:t(),y:t(),z:t()},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:o(),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("z"),valuehoverformat:P("value",1),showlegend:d({},M.showlegend,{dflt:!1})},A("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:L.opacity,lightposition:L.lightposition,lighting:L.lighting,flatshading:L.flatshading,contour:L.contour,hoverinfo:d({},M.hoverinfo)}),"calc","nested");s.flatshading.dflt=!0,s.lighting.facenormalsepsilon.dflt=0,s.x.editType=s.y.editType=s.z.editType=s.value.editType="calc+clearAxisTypes",s.transforms=void 0},62624:function(te,X,e){var A=e(47128),P=e(3832).processGrid,o=e(3832).filter;te.exports=function(M,d){d._len=Math.min(d.x.length,d.y.length,d.z.length,d.value.length),d._x=o(d.x,d._len),d._y=o(d.y,d._len),d._z=o(d.z,d._len),d._value=o(d.value,d._len);var g=P(d);d._gridFill=g.fill,d._Xs=g.Xs,d._Ys=g.Ys,d._Zs=g.Zs,d._len=g.len;for(var r=1/0,t=-1/0,s=0;s0;y--){var h=Math.min(l[y],l[y-1]),T=Math.max(l[y],l[y-1]);if(T>h&&h-1}function Y(He,Oe){return He===null?Oe:He}function ie(He,Oe,Ce){$();var ge=[Oe],pe=[Ce];if(H>=1)ge=[Oe],pe=[Ce];else if(H>0){var Te=ae(Oe,Ce);ge=Te.xyzv,pe=Te.abc}for(var be=0;be-1?Ce[Ve]:j(je,at,ut);Vt>-1?ke[Ve]=Vt:ke[Ve]=oe(je,at,ut,Y(He,Nt))}Z(ke[0],ke[1],ke[2])}}function ne(He,Oe,Ce){var ge=function(pe,Te,be){ie(He,[Oe[pe],Oe[Te],Oe[be]],[Ce[pe],Ce[Te],Ce[be]])};ge(0,1,2),ge(2,3,0)}function le(He,Oe,Ce){var ge=function(pe,Te,be){ie(He,[Oe[pe],Oe[Te],Oe[be]],[Ce[pe],Ce[Te],Ce[be]])};ge(0,1,2),ge(3,0,1),ge(2,3,0),ge(1,2,3)}function de(He,Oe,Ce,ge){var pe=He[3];pege&&(pe=ge);for(var Te=(He[3]-pe)/(He[3]-Oe[3]+1e-9),be=[],ke=0;ke<4;ke++)be[ke]=(1-Te)*He[ke]+Te*Oe[ke];return be}function we(He,Oe,Ce){return He>=Oe&&He<=Ce}function me(He){var Oe=.001*(z-_);return He>=_-Oe&&He<=z+Oe}function Le(He){for(var Oe=[],Ce=0;Ce<4;Ce++){var ge=He[Ce];Oe.push([u._x[ge],u._y[ge],u._z[ge],u._value[ge]])}return Oe}var ve=3;function Ae(He,Oe,Ce,ge,pe,Te){Te||(Te=1),Ce=[-1,-1,-1];var be=!1,ke=[we(Oe[0][3],ge,pe),we(Oe[1][3],ge,pe),we(Oe[2][3],ge,pe)];if(!ke[0]&&!ke[1]&&!ke[2])return!1;var Ve=function(at,ut,Nt){return me(ut[0][3])&&me(ut[1][3])&&me(ut[2][3])?(ie(at,ut,Nt),!0):Teke?[I,Te]:[Te,B];it(Oe,Ve[0],Ve[1])}}var je=[[Math.min(_,B),Math.max(_,B)],[Math.min(I,z),Math.max(I,z)]];["x","y","z"].forEach(function(at){for(var ut=[],Nt=0;Nt0&&(ht.push(cr.id),at==="x"?Ht.push([cr.distRatio,0,0]):at==="y"?Ht.push([0,cr.distRatio,0]):Ht.push([0,0,cr.distRatio]))}else at==="x"?gr=Je(1,w-1):at==="y"?gr=Je(1,i-1):gr=Je(1,C-1);ht.length>0&&(at==="x"?ut[Vt]=lt(He,ht,gt,Ct,Ht,ut[Vt]):at==="y"?ut[Vt]=vt(He,ht,gt,Ct,Ht,ut[Vt]):ut[Vt]=xt(He,ht,gt,Ct,Ht,ut[Vt]),Vt++),gr.length>0&&(at==="x"?ut[Vt]=et(He,gr,gt,Ct,ut[Vt]):at==="y"?ut[Vt]=st(He,gr,gt,Ct,ut[Vt]):ut[Vt]=Ze(He,gr,gt,Ct,ut[Vt]),Vt++)}var er=u.caps[at];er.show&&er.fill&&(J(er.fill),at==="x"?ut[Vt]=et(He,[0,w-1],gt,Ct,ut[Vt]):at==="y"?ut[Vt]=st(He,[0,i-1],gt,Ct,ut[Vt]):ut[Vt]=Ze(He,[0,C-1],gt,Ct,ut[Vt]),Vt++)}}),v===0&&q(),u._meshX=O,u._meshY=F,u._meshZ=N,u._meshIntensity=V,u._Xs=E,u._Ys=p,u._Zs=S}return Ue(),u}function c(u,l){var y=u.glplot.gl,h=A({gl:y}),T=new r(u,h,l.uid);return h._trace=T,T.update(l),u.glplot.add(h),T}te.exports={findNearestOnAxis:g,generateIsoMeshes:a,createIsosurfaceTrace:c}},70548:function(te,X,e){var A=e(3400),P=e(24040),o=e(50048),L=e(27260);function M(g,r,t,s){function a(c,u){return A.coerce(g,r,o,c,u)}d(g,r,t,s,a)}function d(g,r,t,s,a){var c=a("isomin"),u=a("isomax");u!=null&&c!==void 0&&c!==null&&c>u&&(r.isomin=null,r.isomax=null);var l=a("x"),y=a("y"),h=a("z"),T=a("value");if(!l||!l.length||!y||!y.length||!h||!h.length||!T||!T.length){r.visible=!1;return}var f=P.getComponentMethod("calendars","handleTraceDefaults");f(g,r,["x","y","z"],s),a("valuehoverformat"),["x","y","z"].forEach(function(b){a(b+"hoverformat");var E="caps."+b,p=a(E+".show");p&&a(E+".fill");var S="slices."+b,w=a(S+".show");w&&(a(S+".fill"),a(S+".locations"))});var n=a("spaceframe.show");n&&a("spaceframe.fill");var v=a("surface.show");v&&(a("surface.count"),a("surface.fill"),a("surface.pattern"));var m=a("contour.show");m&&(a("contour.color"),a("contour.width")),["text","hovertext","hovertemplate","lighting.ambient","lighting.diffuse","lighting.specular","lighting.roughness","lighting.fresnel","lighting.vertexnormalsepsilon","lighting.facenormalsepsilon","lightposition.x","lightposition.y","lightposition.z","flatshading","opacity"].forEach(function(b){a(b)}),L(g,r,s,a,{prefix:"",cLetter:"c"}),r._length=null}te.exports={supplyDefaults:M,supplyIsoDefaults:d}},6296:function(te,X,e){te.exports={attributes:e(50048),supplyDefaults:e(70548).supplyDefaults,calc:e(62624),colorbar:{min:"cmin",max:"cmax"},plot:e(31460).createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:e(12536),categories:["gl3d","showLegend"],meta:{}}},52948:function(te,X,e){var A=e(49084),P=e(29736).axisHoverFormat,o=e(21776).Ks,L=e(16716),M=e(45464),d=e(92880).extendFlat;te.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:o({editType:"calc"}),xhoverformat:P("x"),yhoverformat:P("y"),zhoverformat:P("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},A("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:L.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:d({},L.contours.x.show,{}),color:L.contours.x.color,width:L.contours.x.width,editType:"calc"},lightposition:{x:d({},L.lightposition.x,{dflt:1e5}),y:d({},L.lightposition.y,{dflt:1e5}),z:d({},L.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"},L.lighting),hoverinfo:d({},M.hoverinfo,{editType:"calc"}),showlegend:d({},M.showlegend,{dflt:!1})})},1876:function(te,X,e){var A=e(47128);te.exports=function(o,L){L.intensity&&A(o,L,{vals:L.intensity,containerStr:"",cLetter:"c"})}},576:function(te,X,e){var A=e(67792).gl_mesh3d,P=e(67792).delaunay_triangulate,o=e(67792).alpha_shape,L=e(67792).convex_hull,M=e(33040).parseColorScale,d=e(3400).isArrayOrTypedArray,g=e(43080),r=e(8932).extractOpts,t=e(52094);function s(f,n,v){this.scene=f,this.uid=v,this.mesh=n,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var a=s.prototype;a.handlePick=function(f){if(f.object===this.mesh){var n=f.index=f.data.index;f.data._cellCenter?f.traceCoordinate=f.data.dataCoordinate:f.traceCoordinate=[this.data.x[n],this.data.y[n],this.data.z[n]];var v=this.data.hovertext||this.data.text;return d(v)&&v[n]!==void 0?f.textLabel=v[n]:v&&(f.textLabel=v),!0}};function c(f){for(var n=[],v=f.length,m=0;m=n-.5)return!1;return!0}a.update=function(f){var n=this.scene,v=n.fullSceneLayout;this.data=f;var m=f.x.length,b=t(u(v.xaxis,f.x,n.dataScale[0],f.xcalendar),u(v.yaxis,f.y,n.dataScale[1],f.ycalendar),u(v.zaxis,f.z,n.dataScale[2],f.zcalendar)),E;if(f.i&&f.j&&f.k){if(f.i.length!==f.j.length||f.j.length!==f.k.length||!h(f.i,m)||!h(f.j,m)||!h(f.k,m))return;E=t(l(f.i),l(f.j),l(f.k))}else f.alphahull===0?E=L(b):f.alphahull>0?E=o(f.alphahull,b):E=y(f.delaunayaxis,b);var p={positions:b,cells:E,lightPosition:[f.lightposition.x,f.lightposition.y,f.lightposition.z],ambient:f.lighting.ambient,diffuse:f.lighting.diffuse,specular:f.lighting.specular,roughness:f.lighting.roughness,fresnel:f.lighting.fresnel,vertexNormalsEpsilon:f.lighting.vertexnormalsepsilon,faceNormalsEpsilon:f.lighting.facenormalsepsilon,opacity:f.opacity,contourEnable:f.contour.show,contourColor:g(f.contour.color).slice(0,3),contourWidth:f.contour.width,useFacetNormals:f.flatshading};if(f.intensity){var S=r(f);this.color="#fff";var w=f.intensitymode;p[w+"Intensity"]=f.intensity,p[w+"IntensityBounds"]=[S.min,S.max],p.colormap=M(f)}else f.vertexcolor?(this.color=f.vertexcolor[0],p.vertexColors=c(f.vertexcolor)):f.facecolor?(this.color=f.facecolor[0],p.cellColors=c(f.facecolor)):(this.color=f.color,p.meshColor=g(f.color));this.mesh.update(p)},a.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function T(f,n){var v=f.glplot.gl,m=A({gl:v}),b=new s(f,m,n.uid);return m._trace=b,b.update(n),f.glplot.add(m),b}te.exports=T},74212:function(te,X,e){var A=e(24040),P=e(3400),o=e(27260),L=e(52948);te.exports=function(d,g,r,t){function s(y,h){return P.coerce(d,g,L,y,h)}function a(y){var h=y.map(function(T){var f=s(T);return f&&P.isArrayOrTypedArray(f)?f:null});return h.every(function(T){return T&&T.length===h[0].length})&&h}var c=a(["x","y","z"]);if(!c){g.visible=!1;return}if(a(["i","j","k"]),g.i&&(!g.j||!g.k)||g.j&&(!g.k||!g.i)||g.k&&(!g.i||!g.j)){g.visible=!1;return}var u=A.getComponentMethod("calendars","handleTraceDefaults");u(d,g,["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(y){s(y)});var l=s("contour.show");l&&(s("contour.color"),s("contour.width")),"intensity"in d?(s("intensity"),s("intensitymode"),o(d,g,t,s,{prefix:"",cLetter:"c"})):(g.showscale=!1,"facecolor"in d?s("facecolor"):"vertexcolor"in d?s("vertexcolor"):s("color",r)),s("text"),s("hovertext"),s("hovertemplate"),s("xhoverformat"),s("yhoverformat"),s("zhoverformat"),g._length=null}},7404:function(te,X,e){te.exports={attributes:e(52948),supplyDefaults:e(74212),calc:e(1876),colorbar:{min:"cmin",max:"cmax"},plot:e(576),moduleType:"trace",name:"mesh3d",basePlotModule:e(12536),categories:["gl3d","showLegend"],meta:{}}},20279:function(te,X,e){var A=e(3400).extendFlat,P=e(52904),o=e(29736).axisHoverFormat,L=e(98192).u,M=e(55756),d=e(48164),g=d.INCREASING.COLOR,r=d.DECREASING.COLOR,t=P.line;function s(a){return{line:{color:A({},t.color,{dflt:a}),width:t.width,dash:L,editType:"style"},editType:"style"}}te.exports={xperiod:P.xperiod,xperiod0:P.xperiod0,xperiodalignment:P.xperiodalignment,xhoverformat:o("x"),yhoverformat:o("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:A({},t.width,{}),dash:A({},L,{}),editType:"style"},increasing:s(g),decreasing:s(r),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:A({},M.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}})}},42812:function(te,X,e){var A=e(3400),P=A._,o=e(54460),L=e(1220),M=e(39032).BADNUM;function d(s,a){var c=o.getFromId(s,a.xaxis),u=o.getFromId(s,a.yaxis),l=t(s,c,a),y=a._minDiff;a._minDiff=null;var h=a._origX;a._origX=null;var T=a._xcalc;a._xcalc=null;var f=r(s,a,h,T,u,g);return a._extremes[c._id]=o.findExtremes(c,T,{vpad:y/2}),f.length?(A.extendFlat(f[0].t,{wHover:y/2,tickLen:l}),f):[{t:{empty:!0}}]}function g(s,a,c,u){return{o:s,h:a,l:c,c:u}}function r(s,a,c,u,l,y){for(var h=l.makeCalcdata(a,"open"),T=l.makeCalcdata(a,"high"),f=l.makeCalcdata(a,"low"),n=l.makeCalcdata(a,"close"),v=A.isArrayOrTypedArray(a.text),m=A.isArrayOrTypedArray(a.hovertext),b=!0,E=null,p=!!a.xperiodalignment,S=[],w=0;wE):b=I>C,E=I;var B=y(C,x,k,I);B.pos=i,B.yc=(C+I)/2,B.i=w,B.dir=b?"increasing":"decreasing",B.x=B.pos,B.y=[k,x],p&&(B.orig_p=c[w]),v&&(B.tx=a.text[w]),m&&(B.htx=a.hovertext[w]),S.push(B)}else S.push({pos:i,empty:!0})}return a._extremes[l._id]=o.findExtremes(l,A.concat(f,T),{padded:!0}),S.length&&(S[0].t={labels:{open:P(s,"open:")+" ",high:P(s,"high:")+" ",low:P(s,"low:")+" ",close:P(s,"close:")+" "}}),S}function t(s,a,c){var u=c._minDiff;if(!u){var l=s._fullData,y=[];u=1/0;var h;for(h=0;h"+n.labels[I]+A.hoverLabelText(T,B,f.yhoverformat)):(z=P.extendFlat({},m),z.y0=z.y1=_,z.yLabelVal=B,z.yLabel=n.labels[I]+A.hoverLabelText(T,B,f.yhoverformat),z.name="",v.push(z),x[B]=z)}return v}function a(c,u,l,y){var h=c.cd,T=c.ya,f=h[0].trace,n=h[0].t,v=t(c,u,l,y);if(!v)return[];var m=v.index,b=h[m],E=v.index=b.i,p=b.dir;function S(B){return n.labels[B]+A.hoverLabelText(T,f[B][E],f.yhoverformat)}var w=b.hi||f.hoverinfo,i=w.split("+"),C=w==="all",x=C||i.indexOf("y")!==-1,k=C||i.indexOf("text")!==-1,I=x?[S("open"),S("high"),S("low"),S("close")+" "+g[p]]:[];return k&&M(b,f,I),v.extraText=I.join("
"),v.y0=v.y1=T.c2p(b.yc,!0),[v]}te.exports={hoverPoints:r,hoverSplit:s,hoverOnPoints:a}},65456:function(te,X,e){te.exports={moduleType:"trace",name:"ohlc",basePlotModule:e(57952),categories:["cartesian","svg","showLegend"],meta:{},attributes:e(20279),supplyDefaults:e(23860),calc:e(42812).calc,plot:e(36664),style:e(14008),hoverPoints:e(18720).hoverPoints,selectPoints:e(97384)}},52744:function(te,X,e){var A=e(24040),P=e(3400);te.exports=function(L,M,d,g){var r=d("x"),t=d("open"),s=d("high"),a=d("low"),c=d("close");d("hoverlabel.split");var u=A.getComponentMethod("calendars","handleTraceDefaults");if(u(L,M,["x"],g),!!(t&&s&&a&&c)){var l=Math.min(t.length,s.length,a.length,c.length);return r&&(l=Math.min(l,P.minRowLength(r))),M._length=l,l}}},36664:function(te,X,e){var A=e(33428),P=e(3400);te.exports=function(L,M,d,g){var r=M.yaxis,t=M.xaxis,s=!!t.rangebreaks;P.makeTraceGroups(g,d,"trace ohlc").each(function(a){var c=A.select(this),u=a[0],l=u.t,y=u.trace;if(y.visible!==!0||l.empty){c.remove();return}var h=l.tickLen,T=c.selectAll("path").data(P.identity);T.enter().append("path"),T.exit().remove(),T.attr("d",function(f){if(f.empty)return"M0,0Z";var n=t.c2p(f.pos-h,!0),v=t.c2p(f.pos+h,!0),m=s?(n+v)/2:t.c2p(f.pos,!0),b=r.c2p(f.o,!0),E=r.c2p(f.h,!0),p=r.c2p(f.l,!0),S=r.c2p(f.c,!0);return"M"+n+","+b+"H"+m+"M"+m+","+E+"V"+p+"M"+v+","+S+"H"+m})})}},97384:function(te){te.exports=function(e,A){var P=e.cd,o=e.xaxis,L=e.yaxis,M=[],d,g=P[0].t.bPos||0;if(A===!1)for(d=0;d=f.length||n[f[v]]!==void 0)return!1;n[f[v]]=!0}return!0}},76671:function(te,X,e){var A=e(3400),P=e(94288).hasColorscale,o=e(27260),L=e(86968).Q,M=e(51272),d=e(72140),g=e(26284),r=e(38116).isTypedArraySpec;function t(a,c,u,l,y){y("line.shape"),y("line.hovertemplate");var h=y("line.color",l.colorway[0]);if(P(a,"line")&&A.isArrayOrTypedArray(h)){if(h.length)return y("line.colorscale"),o(a,c,l,y,{prefix:"line.",cLetter:"c"}),h.length;c.line.color=u}return 1/0}function s(a,c){function u(v,m){return A.coerce(a,c,d.dimensions,v,m)}var l=u("values"),y=u("visible");if(l&&l.length||(y=c.visible=!1),y){u("label"),u("displayindex",c._index);var h=a.categoryarray,T=A.isArrayOrTypedArray(h)&&h.length>0||r(h),f;T&&(f="array");var n=u("categoryorder",f);n==="array"?(u("categoryarray"),u("ticktext")):(delete a.categoryarray,delete a.ticktext),!T&&n==="array"&&(c.categoryorder="trace")}}te.exports=function(c,u,l,y){function h(m,b){return A.coerce(c,u,d,m,b)}var T=M(c,u,{name:"dimensions",handleItemDefaults:s}),f=t(c,u,l,y,h);L(u,y,h),(!Array.isArray(T)||!T.length)&&(u.visible=!1),g(u,T,"values",f),h("hoveron"),h("hovertemplate"),h("arrangement"),h("bundlecolors"),h("sortpaths"),h("counts");var n={family:y.font.family,size:Math.round(y.font.size),color:y.font.color};A.coerceFont(h,"labelfont",n);var v={family:y.font.family,size:Math.round(y.font.size/1.2),color:y.font.color};A.coerceFont(h,"tickfont",v)}},22020:function(te,X,e){te.exports={attributes:e(72140),supplyDefaults:e(76671),calc:e(69136),plot:e(60268),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:e(91800),categories:["noOpacity"],meta:{}}},51036:function(te,X,e){var A=e(33428),P=e(67756).Gz,o=e(36424),L=e(93024),M=e(3400),d=M.strTranslate,g=e(43616),r=e(49760),t=e(72736);function s(H,J,ae,K){var Y=J._context.staticPlot,ie=H.map(q.bind(0,J,ae)),ne=K.selectAll("g.parcatslayer").data([null]);ne.enter().append("g").attr("class","parcatslayer").style("pointer-events",Y?"none":"all");var le=ne.selectAll("g.trace.parcats").data(ie,a),de=le.enter().append("g").attr("class","trace parcats");le.attr("transform",function(Ne){return d(Ne.x,Ne.y)}),de.append("g").attr("class","paths");var we=le.select("g.paths"),me=we.selectAll("path.path").data(function(Ne){return Ne.paths},a);me.attr("fill",function(Ne){return Ne.model.color});var Le=me.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(Ne){return Ne.model.color}).attr("fill-opacity",0);n(Le),me.attr("d",function(Ne){return Ne.svgD}),Le.empty()||me.sort(u),me.exit().remove(),me.on("mouseover",l).on("mouseout",y).on("click",f),de.append("g").attr("class","dimensions");var ve=le.select("g.dimensions"),Ae=ve.selectAll("g.dimension").data(function(Ne){return Ne.dimensions},a);Ae.enter().append("g").attr("class","dimension"),Ae.attr("transform",function(Ne){return d(Ne.x,0)}),Ae.exit().remove();var ye=Ae.selectAll("g.category").data(function(Ne){return Ne.categories},a),Se=ye.enter().append("g").attr("class","category");ye.attr("transform",function(Ne){return d(0,Ne.y)}),Se.append("rect").attr("class","catrect").attr("pointer-events","none"),ye.select("rect.catrect").attr("fill","none").attr("width",function(Ne){return Ne.width}).attr("height",function(Ne){return Ne.height}),b(Se);var _e=ye.selectAll("rect.bandrect").data(function(Ne){return Ne.bands},a);_e.each(function(){M.raiseToTop(this)}),_e.attr("fill",function(Ne){return Ne.color});var ze=_e.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(Ne){return Ne.color}).attr("fill-opacity",0);_e.attr("fill",function(Ne){return Ne.color}).attr("width",function(Ne){return Ne.width}).attr("height",function(Ne){return Ne.height}).attr("y",function(Ne){return Ne.y}).attr("cursor",function(Ne){return Ne.parcatsViewModel.arrangement==="fixed"?"default":Ne.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),p(ze),_e.exit().remove(),Se.append("text").attr("class","catlabel").attr("pointer-events","none");var Ie=J._fullLayout.paper_bgcolor;ye.select("text.catlabel").attr("text-anchor",function(Ne){return c(Ne)?"start":"end"}).attr("alignment-baseline","middle").style("text-shadow",t.makeTextShadow(Ie)).style("fill","rgb(0, 0, 0)").attr("x",function(Ne){return c(Ne)?Ne.width+5:-5}).attr("y",function(Ne){return Ne.height/2}).text(function(Ne){return Ne.model.categoryLabel}).each(function(Ne){g.font(A.select(this),Ne.parcatsViewModel.categorylabelfont),t.convertToTspans(A.select(this),J)}),Se.append("text").attr("class","dimlabel"),ye.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(Ne){return Ne.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(Ne){return Ne.width/2}).attr("y",-5).text(function(Ne,et){return et===0?Ne.parcatsViewModel.model.dimensions[Ne.model.dimensionInd].dimensionLabel:null}).each(function(Ne){g.font(A.select(this),Ne.parcatsViewModel.labelfont)}),ye.selectAll("rect.bandrect").on("mouseover",_).on("mouseout",z),ye.exit().remove(),Ae.call(A.behavior.drag().origin(function(Ne){return{x:Ne.x,y:0}}).on("dragstart",O).on("drag",F).on("dragend",N)),le.each(function(Ne){Ne.traceSelection=A.select(this),Ne.pathSelection=A.select(this).selectAll("g.paths").selectAll("path.path"),Ne.dimensionSelection=A.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),le.exit().remove()}te.exports=function(H,J,ae,K){s(ae,H,K,J)};function a(H){return H.key}function c(H){var J=H.parcatsViewModel.dimensions.length,ae=H.parcatsViewModel.dimensions[J-1].model.dimensionInd;return H.model.dimensionInd===ae}function u(H,J){return H.model.rawColor>J.model.rawColor?1:H.model.rawColor"),Ze=A.mouse(Y)[0];L.loneHover({trace:ie,x:ye-le.left+de.left,y:Se-le.top+de.top,text:st,color:H.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:_e,idealAlign:Ze1&&we.displayInd===de.dimensions.length-1?(ve=ne.left,Ae="left"):(ve=ne.left+ne.width,Ae="right");var ye=le.model.count,Se=le.model.categoryLabel,_e=ye/le.parcatsViewModel.model.count,ze={countLabel:ye,categoryLabel:Se,probabilityLabel:_e.toFixed(3)},Ie=[];le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ie.push(["Count:",ze.countLabel].join(" ")),le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&Ie.push(["P("+ze.categoryLabel+"):",ze.probabilityLabel].join(" "));var Ne=Ie.join("
");return{trace:me,x:K*(ve-J.left),y:Y*(Le-J.top),text:Ne,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:Ae,hovertemplate:me.hovertemplate,hovertemplateLabels:ze,eventData:[{data:me._input,fullData:me,count:ye,category:Se,probability:_e}]}}function I(H,J,ae){var K=[];return A.select(ae.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var Y=this;K.push(k(H,J,Y))}),K}function B(H,J,ae){H._fullLayout._calcInverseTransform(H);var K=H._fullLayout._invScaleX,Y=H._fullLayout._invScaleY,ie=ae.getBoundingClientRect(),ne=A.select(ae).datum(),le=ne.categoryViewModel,de=le.parcatsViewModel,we=de.model.dimensions[le.model.dimensionInd],me=de.trace,Le=ie.y+ie.height/2,ve,Ae;de.dimensions.length>1&&we.displayInd===de.dimensions.length-1?(ve=ie.left,Ae="left"):(ve=ie.left+ie.width,Ae="right");var ye=le.model.categoryLabel,Se=ne.parcatsViewModel.model.count,_e=0;ne.categoryViewModel.bands.forEach(function(lt){lt.color===ne.color&&(_e+=lt.count)});var ze=le.model.count,Ie=0;de.pathSelection.each(function(lt){lt.model.color===ne.color&&(Ie+=lt.model.count)});var Ne=_e/Se,et=_e/Ie,st=_e/ze,Ze={countLabel:Se,categoryLabel:ye,probabilityLabel:Ne.toFixed(3)},Ke=[];le.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&Ke.push(["Count:",Ze.countLabel].join(" ")),le.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(Ke.push("P(color ∩ "+ye+"): "+Ze.probabilityLabel),Ke.push("P("+ye+" | color): "+et.toFixed(3)),Ke.push("P(color | "+ye+"): "+st.toFixed(3)));var nt=Ke.join("
"),it=r.mostReadable(ne.color,["black","white"]);return{trace:me,x:K*(ve-J.left),y:Y*(Le-J.top),text:nt,color:ne.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:it,fontSize:10,idealAlign:Ae,hovertemplate:me.hovertemplate,hovertemplateLabels:Ze,eventData:[{data:me._input,fullData:me,category:ye,count:Se,probability:Ne,categorycount:ze,colorcount:Ie,bandcolorcount:_e}]}}function _(H){if(!H.parcatsViewModel.dragDimension&&H.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var J=A.mouse(this)[1];if(J<-1)return;var ae=H.parcatsViewModel.graphDiv,K=ae._fullLayout,Y=K._paperdiv.node().getBoundingClientRect(),ie=H.parcatsViewModel.hoveron,ne=this;if(ie==="color"?(i(ne),x(ne,"plotly_hover",A.event)):(w(ne),C(ne,"plotly_hover",A.event)),H.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var le;ie==="category"?le=k(ae,Y,ne):ie==="color"?le=B(ae,Y,ne):ie==="dimension"&&(le=I(ae,Y,ne)),le&&L.loneHover(le,{container:K._hoverlayer.node(),outerContainer:K._paper.node(),gd:ae})}}}function z(H){var J=H.parcatsViewModel;if(!J.dragDimension&&(n(J.pathSelection),b(J.dimensionSelection.selectAll("g.category")),p(J.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),L.loneUnhover(J.graphDiv._fullLayout._hoverlayer.node()),J.pathSelection.sort(u),J.hoverinfoItems.indexOf("skip")===-1)){var ae=H.parcatsViewModel.hoveron,K=this;ae==="color"?x(K,"plotly_unhover",A.event):C(K,"plotly_unhover",A.event)}}function O(H){H.parcatsViewModel.arrangement!=="fixed"&&(H.dragDimensionDisplayInd=H.model.displayInd,H.initialDragDimensionDisplayInds=H.parcatsViewModel.model.dimensions.map(function(J){return J.displayInd}),H.dragHasMoved=!1,H.dragCategoryDisplayInd=null,A.select(this).selectAll("g.category").select("rect.catrect").each(function(J){var ae=A.mouse(this)[0],K=A.mouse(this)[1];-2<=ae&&ae<=J.width+2&&-2<=K&&K<=J.height+2&&(H.dragCategoryDisplayInd=J.model.displayInd,H.initialDragCategoryDisplayInds=H.model.categories.map(function(Y){return Y.displayInd}),J.model.dragY=J.y,M.raiseToTop(this.parentNode),A.select(this.parentNode).selectAll("rect.bandrect").each(function(Y){Y.yme.y+me.height/2&&(ie.model.displayInd=me.model.displayInd,me.model.displayInd=le),H.dragCategoryDisplayInd=ie.model.displayInd}if(H.dragCategoryDisplayInd===null||H.parcatsViewModel.arrangement==="freeform"){Y.model.dragX=A.event.x;var Le=H.parcatsViewModel.dimensions[ae],ve=H.parcatsViewModel.dimensions[K];Le!==void 0&&Y.model.dragXve.x&&(Y.model.displayInd=ve.model.displayInd,ve.model.displayInd=H.dragDimensionDisplayInd),H.dragDimensionDisplayInd=Y.model.displayInd}G(H.parcatsViewModel),Z(H.parcatsViewModel),$(H.parcatsViewModel),j(H.parcatsViewModel)}}function N(H){if(H.parcatsViewModel.arrangement!=="fixed"&&H.dragDimensionDisplayInd!==null){A.select(this).selectAll("text").attr("font-weight","normal");var J={},ae=V(H.parcatsViewModel),K=H.parcatsViewModel.model.dimensions.map(function(ve){return ve.displayInd}),Y=H.initialDragDimensionDisplayInds.some(function(ve,Ae){return ve!==K[Ae]});Y&&K.forEach(function(ve,Ae){var ye=H.parcatsViewModel.model.dimensions[Ae].containerInd;J["dimensions["+ye+"].displayindex"]=ve});var ie=!1;if(H.dragCategoryDisplayInd!==null){var ne=H.model.categories.map(function(ve){return ve.displayInd});if(ie=H.initialDragCategoryDisplayInds.some(function(ve,Ae){return ve!==ne[Ae]}),ie){var le=H.model.categories.slice().sort(function(ve,Ae){return ve.displayInd-Ae.displayInd}),de=le.map(function(ve){return ve.categoryValue}),we=le.map(function(ve){return ve.categoryLabel});J["dimensions["+H.model.containerInd+"].categoryarray"]=[de],J["dimensions["+H.model.containerInd+"].ticktext"]=[we],J["dimensions["+H.model.containerInd+"].categoryorder"]="array"}}if(H.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!H.dragHasMoved&&H.potentialClickBand&&(H.parcatsViewModel.hoveron==="color"?x(H.potentialClickBand,"plotly_click",A.event.sourceEvent):C(H.potentialClickBand,"plotly_click",A.event.sourceEvent)),H.model.dragX=null,H.dragCategoryDisplayInd!==null){var me=H.parcatsViewModel.dimensions[H.dragDimensionDisplayInd].categories[H.dragCategoryDisplayInd];me.model.dragY=null,H.dragCategoryDisplayInd=null}H.dragDimensionDisplayInd=null,H.parcatsViewModel.dragDimension=null,H.dragHasMoved=null,H.potentialClickBand=null,G(H.parcatsViewModel),Z(H.parcatsViewModel);var Le=A.transition().duration(300).ease("cubic-in-out");Le.each(function(){$(H.parcatsViewModel,!0),j(H.parcatsViewModel,!0)}).each("end",function(){(Y||ie)&&o.restyle(H.parcatsViewModel.graphDiv,J,[ae])})}}function V(H){for(var J,ae=H.graphDiv._fullData,K=0;K=0;de--)we+="C"+ne[de]+","+(J[de+1]+K)+" "+ie[de]+","+(J[de]+K)+" "+(H[de]+ae[de])+","+(J[de]+K),we+="l-"+ae[de]+",0 ";return we+="Z",we}function Z(H){var J=H.dimensions,ae=H.model,K=J.map(function(Je){return Je.categories.map(function(Pe){return Pe.y})}),Y=H.model.dimensions.map(function(Je){return Je.categories.map(function(Pe){return Pe.displayInd})}),ie=H.model.dimensions.map(function(Je){return Je.displayInd}),ne=H.dimensions.map(function(Je){return Je.model.dimensionInd}),le=J.map(function(Je){return Je.x}),de=J.map(function(Je){return Je.width}),we=[];for(var me in ae.paths)ae.paths.hasOwnProperty(me)&&we.push(ae.paths[me]);function Le(Je){var Pe=Je.categoryInds.map(function(He,Oe){return Y[Oe][He]}),Ue=ne.map(function(He){return Pe[He]});return Ue}we.sort(function(Je,Pe){var Ue=Le(Je),He=Le(Pe);return H.sortpaths==="backward"&&(Ue.reverse(),He.reverse()),Ue.push(Je.valueInds[0]),He.push(Pe.valueInds[0]),H.bundlecolors&&(Ue.unshift(Je.rawColor),He.unshift(Pe.rawColor)),UeHe?1:0});for(var ve=new Array(we.length),Ae=J[0].model.count,ye=J[0].categories.map(function(Je){return Je.height}).reduce(function(Je,Pe){return Je+Pe}),Se=0;Se0?ze=ye*(_e.count/Ae):ze=0;for(var Ie=new Array(K.length),Ne=0;Ne<_e.categoryInds.length;Ne++){var et=_e.categoryInds[Ne],st=Y[Ne][et],Ze=ie[Ne];Ie[Ze]=K[Ze][st],K[Ze][st]+=ze;var Ke=H.dimensions[Ze].categories[st],nt=Ke.bands.length,it=Ke.bands[nt-1];if(it===void 0||_e.rawColor!==it.rawColor){var lt=it===void 0?0:it.y+it.height;Ke.bands.push({key:lt,color:_e.color,rawColor:_e.rawColor,height:ze,width:Ke.width,count:_e.count,y:lt,categoryViewModel:Ke,parcatsViewModel:H})}else{var vt=Ke.bands[nt-1];vt.height+=ze,vt.count+=_e.count}}var xt;H.pathShape==="hspline"?xt=oe(le,Ie,de,ze,.5):xt=oe(le,Ie,de,ze,0),ve[Se]={key:_e.valueInds[0],model:_e,height:ze,leftXs:le,topYs:Ie,dimWidths:de,svgD:xt,parcatsViewModel:H}}H.paths=ve}function G(H){var J=H.model.dimensions.map(function(ne){return{displayInd:ne.displayInd,dimensionInd:ne.dimensionInd}});J.sort(function(ne,le){return ne.displayInd-le.displayInd});var ae=[];for(var K in J){var Y=J[K].dimensionInd,ie=H.model.dimensions[Y];ae.push(re(H,ie))}H.dimensions=ae}function re(H,J){var ae=40,K=16,Y=H.model.dimensions.length,ie=J.displayInd,ne,le,de;Y>1?ne=(H.width-2*ae-K)/(Y-1):ne=0,le=ae,de=le+ne*ie;var we=[],me=H.model.maxCats,Le=J.categories.length,ve=8,Ae=J.count,ye=H.height-ve*(me-1),Se,_e,ze,Ie,Ne,et=(me-Le)*ve/2,st=J.categories.map(function(Ze){return{displayInd:Ze.displayInd,categoryInd:Ze.categoryInd}});for(st.sort(function(Ze,Ke){return Ze.displayInd-Ke.displayInd}),Ne=0;Ne0?Se=_e.count/Ae*ye:Se=0,ze={key:_e.valueInds[0],model:_e,width:K,height:Se,y:_e.dragY!==null?_e.dragY:et,bands:[],parcatsViewModel:H},et=et+Se+ve,we.push(ze);return{key:J.dimensionInd,x:J.dragX!==null?J.dragX:de,y:0,width:K,model:J,categories:we,parcatsViewModel:H,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}},60268:function(te,X,e){var A=e(51036);te.exports=function(o,L,M,d){var g=o._fullLayout,r=g._paper,t=g._size;A(o,r,L,{width:t.w,height:t.h,margin:{t:t.t,r:t.r,b:t.b,l:t.l}},M,d)}},82296:function(te,X,e){var A=e(49084),P=e(94724),o=e(25376),L=e(86968).u,M=e(92880).extendFlat,d=e(31780).templatedArray;te.exports={domain:L({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:o({editType:"plot"}),tickfont:o({editType:"plot"}),rangefont:o({editType:"plot"}),dimensions:d("dimension",{label:{valType:"string",editType:"plot"},tickvals:M({},P.tickvals,{editType:"plot"}),ticktext:M({},P.ticktext,{editType:"plot"}),tickformat:M({},P.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:M({editType:"calc"},A("line",{colorscaleDflt:"Viridis",autoColorDflt:!1,editTypeOverride:"calc"})),unselected:{line:{color:{valType:"color",dflt:"#7f7f7f",editType:"plot"},opacity:{valType:"number",min:0,max:1,dflt:"auto",editType:"plot"},editType:"plot"},editType:"plot"}}},71864:function(te,X,e){var A=e(30140),P=e(33428),o=e(71688).keyFun,L=e(71688).repeat,M=e(3400).sorterAsc,d=e(3400).strTranslate,g=A.bar.snapRatio;function r(N,V){return N*(1-g)+V*g}var t=A.bar.snapClose;function s(N,V){return N*(1-t)+V*t}function a(N,V,j,$){if(c(j,$))return j;var q=N?-1:1,oe=0,Z=V.length-1;if(q<0){var G=oe;oe=Z,Z=G}for(var re=V[oe],H=re,J=oe;q*J=V[j][0]&&N<=V[j][1])return!0;return!1}function u(N){N.attr("x",-A.bar.captureWidth/2).attr("width",A.bar.captureWidth)}function l(N){N.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function y(N){if(!N.brush.filterSpecified)return"0,"+N.height;for(var V=h(N.brush.filter.getConsolidated(),N.height),j=[0],$,q,oe,Z=V.length?V[0][0]:null,G=0;GN[1]+j||V=.9*N[1]+.1*N[0]?"n":V<=.9*N[0]+.1*N[1]?"s":"ns"}function f(){P.select(document.body).style("cursor",null)}function n(N){N.attr("stroke-dasharray",y)}function v(N,V){var j=P.select(N).selectAll(".highlight, .highlight-shadow"),$=V?j.transition().duration(A.bar.snapDuration).each("end",V):j;n($)}function m(N,V){var j=N.brush,$=j.filterSpecified,q=NaN,oe={},Z;if($){var G=N.height,re=j.filter.getConsolidated(),H=h(re,G),J=NaN,ae=NaN,K=NaN;for(Z=0;Z<=H.length;Z++){var Y=H[Z];if(Y&&Y[0]<=V&&V<=Y[1]){J=Z;break}else if(ae=Z?Z-1:NaN,Y&&Y[0]>V){K=Z;break}}if(q=J,isNaN(q)&&(isNaN(ae)||isNaN(K)?q=isNaN(ae)?K:ae:q=V-H[ae][1]=we[0]&&de<=we[1]){oe.clickableOrdinalRange=we;break}}}return oe}function b(N,V){P.event.sourceEvent.stopPropagation();var j=V.height-P.mouse(N)[1]-2*A.verticalPadding,$=V.unitToPaddedPx.invert(j),q=V.brush,oe=m(V,j),Z=oe.interval,G=q.svgBrush;if(G.wasDragged=!1,G.grabbingBar=oe.region==="ns",G.grabbingBar){var re=Z.map(V.unitToPaddedPx);G.grabPoint=j-re[0]-A.verticalPadding,G.barLength=re[1]-re[0]}G.clickableOrdinalRange=oe.clickableOrdinalRange,G.stayingIntervals=V.multiselect&&q.filterSpecified?q.filter.getConsolidated():[],Z&&(G.stayingIntervals=G.stayingIntervals.filter(function(H){return H[0]!==Z[0]&&H[1]!==Z[1]})),G.startExtent=oe.region?Z[oe.region==="s"?1:0]:$,V.parent.inBrushDrag=!0,G.brushStartCallback()}function E(N,V){P.event.sourceEvent.stopPropagation();var j=V.height-P.mouse(N)[1]-2*A.verticalPadding,$=V.brush.svgBrush;$.wasDragged=!0,$._dragging=!0,$.grabbingBar?$.newExtent=[j-$.grabPoint,j+$.barLength-$.grabPoint].map(V.unitToPaddedPx.invert):$.newExtent=[$.startExtent,V.unitToPaddedPx.invert(j)].sort(M),V.brush.filterSpecified=!0,$.extent=$.stayingIntervals.concat([$.newExtent]),$.brushCallback(V),v(N.parentNode)}function p(N,V){var j=V.brush,$=j.filter,q=j.svgBrush;q._dragging||(S(N,V),E(N,V),V.brush.svgBrush.wasDragged=!1),q._dragging=!1;var oe=P.event;oe.sourceEvent.stopPropagation();var Z=q.grabbingBar;if(q.grabbingBar=!1,q.grabLocation=void 0,V.parent.inBrushDrag=!1,f(),!q.wasDragged){q.wasDragged=void 0,q.clickableOrdinalRange?j.filterSpecified&&V.multiselect?q.extent.push(q.clickableOrdinalRange):(q.extent=[q.clickableOrdinalRange],j.filterSpecified=!0):Z?(q.extent=q.stayingIntervals,q.extent.length===0&&I(j)):I(j),q.brushCallback(V),v(N.parentNode),q.brushEndCallback(j.filterSpecified?$.getConsolidated():[]);return}var G=function(){$.set($.getConsolidated())};if(V.ordinal){var re=V.unitTickvals;re[re.length-1]q.newExtent[0];q.extent=q.stayingIntervals.concat(H?[q.newExtent]:[]),q.extent.length||I(j),q.brushCallback(V),H?v(N.parentNode,G):(G(),v(N.parentNode))}else G();q.brushEndCallback(j.filterSpecified?$.getConsolidated():[])}function S(N,V){var j=V.height-P.mouse(N)[1]-2*A.verticalPadding,$=m(V,j),q="crosshair";$.clickableOrdinalRange?q="pointer":$.region&&(q=$.region+"-resize"),P.select(document.body).style("cursor",q)}function w(N){N.on("mousemove",function(V){P.event.preventDefault(),V.parent.inBrushDrag||S(this,V)}).on("mouseleave",function(V){V.parent.inBrushDrag||f()}).call(P.behavior.drag().on("dragstart",function(V){b(this,V)}).on("drag",function(V){E(this,V)}).on("dragend",function(V){p(this,V)}))}function i(N,V){return N[0]-V[0]}function C(N,V,j){var $=j._context.staticPlot,q=N.selectAll(".background").data(L);q.enter().append("rect").classed("background",!0).call(u).call(l).style("pointer-events",$?"none":"auto").attr("transform",d(0,A.verticalPadding)),q.call(w).attr("height",function(G){return G.height-A.verticalPadding});var oe=N.selectAll(".highlight-shadow").data(L);oe.enter().append("line").classed("highlight-shadow",!0).attr("x",-A.bar.width/2).attr("stroke-width",A.bar.width+A.bar.strokeWidth).attr("stroke",V).attr("opacity",A.bar.strokeOpacity).attr("stroke-linecap","butt"),oe.attr("y1",function(G){return G.height}).call(n);var Z=N.selectAll(".highlight").data(L);Z.enter().append("line").classed("highlight",!0).attr("x",-A.bar.width/2).attr("stroke-width",A.bar.width-A.bar.strokeWidth).attr("stroke",A.bar.fillColor).attr("opacity",A.bar.fillOpacity).attr("stroke-linecap","butt"),Z.attr("y1",function(G){return G.height}).call(n)}function x(N,V,j){var $=N.selectAll("."+A.cn.axisBrush).data(L,o);$.enter().append("g").classed(A.cn.axisBrush,!0),C($,V,j)}function k(N){return N.svgBrush.extent.map(function(V){return V.slice()})}function I(N){N.filterSpecified=!1,N.svgBrush.extent=[[-1/0,1/0]]}function B(N){return function(j){var $=j.brush,q=k($),oe=q.slice();$.filter.set(oe),N()}}function _(N){for(var V=N.slice(),j=[],$,q=V.shift();q;){for($=q.slice();(q=V.shift())&&q[0]<=$[1];)$[1]=Math.max($[1],q[1]);j.push($)}return j.length===1&&j[0][0]>j[0][1]&&(j=[]),j}function z(){var N=[],V,j;return{set:function($){N=$.map(function(q){return q.slice().sort(M)}).sort(i),N.length===1&&N[0][0]===-1/0&&N[0][1]===1/0&&(N=[[0,-1]]),V=_(N),j=N.reduce(function(q,oe){return[Math.min(q[0],oe[0]),Math.max(q[1],oe[1])]},[1/0,-1/0])},get:function(){return N.slice()},getConsolidated:function(){return V},getBounds:function(){return j}}}function O(N,V,j,$,q,oe){var Z=z();return Z.set(j),{filter:Z,filterSpecified:V,svgBrush:{extent:[],brushStartCallback:$,brushCallback:B(q),brushEndCallback:oe}}}function F(N,V){if(Array.isArray(N[0])?(N=N.map(function($){return $.sort(M)}),V.multiselect?N=_(N.sort(i)):N=[N[0]]):N=[N.sort(M)],V.tickvals){var j=V.tickvals.slice().sort(M);if(N=N.map(function($){var q=[a(0,j,$[0],[]),a(1,j,$[1],[])];if(q[1]>q[0])return q}).filter(function($){return $}),!N.length)return}return N.length>1?N:N[0]}te.exports={makeBrush:O,ensureAxisBrush:x,cleanRanges:F}},61664:function(te,X,e){te.exports={attributes:e(82296),supplyDefaults:e(60664),calc:e(95044),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:e(19976),categories:["gl","regl","noOpacity","noHover"],meta:{}}},19976:function(te,X,e){var A=e(33428),P=e(84888)._M,o=e(24196),L=e(9616);X.name="parcoords",X.plot=function(M){var d=P(M.calcdata,"parcoords")[0];d.length&&o(M,d)},X.clean=function(M,d,g,r){var t=r._has&&r._has("parcoords"),s=d._has&&d._has("parcoords");t&&!s&&(r._paperdiv.selectAll(".parcoords").remove(),r._glimages.selectAll("*").remove())},X.toSVG=function(M){var d=M._fullLayout._glimages,g=A.select(M).selectAll(".svg-container"),r=g.filter(function(s,a){return a===g.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function t(){var s=this,a=s.toDataURL("image/png"),c=d.append("svg:image");c.attr({xmlns:L.svg,"xlink:href":a,preserveAspectRatio:"none",x:0,y:0,width:s.style.width,height:s.style.height})}r.each(t),window.setTimeout(function(){A.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}},95044:function(te,X,e){var A=e(3400).isArrayOrTypedArray,P=e(8932),o=e(71688).wrap;te.exports=function(d,g){var r,t;return P.hasColorscale(g,"line")&&A(g.line.color)?(r=g.line.color,t=P.extractOpts(g.line).colorscale,P.calc(d,g,{vals:r,containerStr:"line",cLetter:"c"})):(r=L(g._length),t=[[0,g.line.color],[1,g.line.color]]),o({lineColor:r,cscale:t})};function L(M){for(var d=new Array(M),g=0;gt&&(A.log("parcoords traces support up to "+t+" dimensions at the moment"),n.splice(t));var v=M(l,y,{name:"dimensions",layout:T,handleItemDefaults:c}),m=a(l,y,h,T,f);L(y,T,f),(!Array.isArray(v)||!v.length)&&(y.visible=!1),s(y,v,"values",m);var b={family:T.font.family,size:Math.round(T.font.size/1.2),color:T.font.color};A.coerceFont(f,"labelfont",b),A.coerceFont(f,"tickfont",b),A.coerceFont(f,"rangefont",b),f("labelangle"),f("labelside"),f("unselected.line.color"),f("unselected.line.opacity")}},95724:function(te,X,e){var A=e(3400).isTypedArray;X.convertTypedArray=function(P){return A(P)?Array.prototype.slice.call(P):P},X.isOrdinal=function(P){return!!P.tickvals},X.isVisible=function(P){return P.visible||!("visible"in P)}},29928:function(te,X,e){var A=e(61664);A.plot=e(24196),te.exports=A},51352:function(te,X,e){var A=["precision highp float;","","varying vec4 fragColor;","","attribute vec4 p01_04, p05_08, p09_12, p13_16,"," p17_20, p21_24, p25_28, p29_32,"," p33_36, p37_40, p41_44, p45_48,"," p49_52, p53_56, p57_60, colors;","","uniform mat4 dim0A, dim1A, dim0B, dim1B, dim0C, dim1C, dim0D, dim1D,"," loA, hiA, loB, hiB, loC, hiC, loD, hiD;","","uniform vec2 resolution, viewBoxPos, viewBoxSize;","uniform float maskHeight;","uniform float drwLayer; // 0: context, 1: focus, 2: pick","uniform vec4 contextColor;","uniform sampler2D maskTexture, palette;","","bool isPick = (drwLayer > 1.5);","bool isContext = (drwLayer < 0.5);","","const vec4 ZEROS = vec4(0.0, 0.0, 0.0, 0.0);","const vec4 UNITS = vec4(1.0, 1.0, 1.0, 1.0);","","float val(mat4 p, mat4 v) {"," return dot(matrixCompMult(p, v) * UNITS, UNITS);","}","","float axisY(float ratio, mat4 A, mat4 B, mat4 C, mat4 D) {"," float y1 = val(A, dim0A) + val(B, dim0B) + val(C, dim0C) + val(D, dim0D);"," float y2 = val(A, dim1A) + val(B, dim1B) + val(C, dim1C) + val(D, dim1D);"," return y1 * (1.0 - ratio) + y2 * ratio;","}","","int iMod(int a, int b) {"," return a - b * (a / b);","}","","bool fOutside(float p, float lo, float hi) {"," return (lo < hi) && (lo > p || p > hi);","}","","bool vOutside(vec4 p, vec4 lo, vec4 hi) {"," return ("," fOutside(p[0], lo[0], hi[0]) ||"," fOutside(p[1], lo[1], hi[1]) ||"," fOutside(p[2], lo[2], hi[2]) ||"," fOutside(p[3], lo[3], hi[3])"," );","}","","bool mOutside(mat4 p, mat4 lo, mat4 hi) {"," return ("," vOutside(p[0], lo[0], hi[0]) ||"," vOutside(p[1], lo[1], hi[1]) ||"," vOutside(p[2], lo[2], hi[2]) ||"," vOutside(p[3], lo[3], hi[3])"," );","}","","bool outsideBoundingBox(mat4 A, mat4 B, mat4 C, mat4 D) {"," return mOutside(A, loA, hiA) ||"," mOutside(B, loB, hiB) ||"," mOutside(C, loC, hiC) ||"," mOutside(D, loD, hiD);","}","","bool outsideRasterMask(mat4 A, mat4 B, mat4 C, mat4 D) {"," mat4 pnts[4];"," pnts[0] = A;"," pnts[1] = B;"," pnts[2] = C;"," pnts[3] = D;",""," for(int i = 0; i < 4; ++i) {"," for(int j = 0; j < 4; ++j) {"," for(int k = 0; k < 4; ++k) {"," if(0 == iMod("," int(255.0 * texture2D(maskTexture,"," vec2("," (float(i * 2 + j / 2) + 0.5) / 8.0,"," (pnts[i][j][k] * (maskHeight - 1.0) + 1.0) / maskHeight"," ))[3]"," ) / int(pow(2.0, float(iMod(j * 4 + k, 8)))),"," 2"," )) return true;"," }"," }"," }"," return false;","}","","vec4 position(bool isContext, float v, mat4 A, mat4 B, mat4 C, mat4 D) {"," float x = 0.5 * sign(v) + 0.5;"," float y = axisY(x, A, B, C, D);"," float z = 1.0 - abs(v);",""," z += isContext ? 0.0 : 2.0 * float("," outsideBoundingBox(A, B, C, D) ||"," outsideRasterMask(A, B, C, D)"," );",""," return vec4("," 2.0 * (vec2(x, y) * viewBoxSize + viewBoxPos) / resolution - 1.0,"," z,"," 1.0"," );","}","","void main() {"," mat4 A = mat4(p01_04, p05_08, p09_12, p13_16);"," mat4 B = mat4(p17_20, p21_24, p25_28, p29_32);"," mat4 C = mat4(p33_36, p37_40, p41_44, p45_48);"," mat4 D = mat4(p49_52, p53_56, p57_60, ZEROS);",""," float v = colors[3];",""," gl_Position = position(isContext, v, A, B, C, D);",""," fragColor ="," isContext ? vec4(contextColor) :"," isPick ? vec4(colors.rgb, 1.0) : texture2D(palette, vec2(abs(v), 0.5));","}"].join(` `),P=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` `),o=e(30140).maxDimensionCount,L=e(3400),M=1e-6,d=2048,g=new Uint8Array(4),r=new Uint8Array(4),t={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function s(p){p.read({x:0,y:0,width:1,height:1,data:g})}function a(p,S,w,i,C){var x=p._gl;x.enable(x.SCISSOR_TEST),x.scissor(S,w,i,C),p.clear({color:[0,0,0,0],depth:1})}function c(p,S,w,i,C,x){var k=x.key;function I(B){var _=Math.min(i,C-B*i);B===0&&(window.cancelAnimationFrame(w.currentRafs[k]),delete w.currentRafs[k],a(p,x.scissorX,x.scissorY,x.scissorWidth,x.viewBoxSize[1])),!w.clearOnly&&(x.count=2*_,x.offset=2*B*i,S(x),B*i+_>>8*S)%256/255}function h(p,S,w){for(var i=new Array(p*(o+4)),C=0,x=0;xme&&(me=ae[ne].dim1.canvasX,de=ne);ie===0&&a(C,0,0,_.canvasWidth,_.canvasHeight);var Le=Z(w);for(ne=0;nene._length&&(Se=Se.slice(0,ne._length));var _e=ne.tickvals,ze;function Ie(Ke,nt){return{val:Ke,text:ze[nt]}}function Ne(Ke,nt){return Ke.val-nt.val}if(o(_e)&&_e.length){P.isTypedArray(_e)&&(_e=Array.from(_e)),ze=ne.ticktext,!o(ze)||!ze.length?ze=_e.map(L(ne.tickformat)):ze.length>_e.length?ze=ze.slice(0,_e.length):_e.length>ze.length&&(_e=_e.slice(0,ze.length));for(var et=1;et<_e.length;et++)if(_e[et]<_e[et-1]){for(var st=_e.map(Ie).sort(Ne),Ze=0;Ze<_e.length;Ze++)_e[Ze]=st[Ze].val,ze[Ze]=st[Ze].text;break}}else _e=void 0;return Se=h.convertTypedArray(Se),{key:me,label:ne.label,tickFormat:ne.tickformat,tickvals:_e,ticktext:ze,ordinal:h.isOrdinal(ne),multiselect:ne.multiselect,xIndex:le,crossfilterDimensionIndex:le,visibleIndex:ne._index,height:G,values:Se,paddedUnitValues:Se.map(de),unitTickvals:_e&&_e.map(de),xScale:J,x:J(le),canvasX:J(le)*H,unitToPaddedPx:K,domainScale:S(G,T.verticalPadding,ne,_e,ze),ordinalScale:C(ne),parent:Y,model:oe,brush:f.makeBrush($,ve,Ae,function(){$.linePickActive(!1)},ye,function(Ke){if(Y.focusLayer.render(Y.panels,!0),Y.pickLayer&&Y.pickLayer.render(Y.panels,!0),$.linePickActive(!0),q&&q.filterChanged){var nt=de.invert,it=Ke.map(function(lt){return lt.map(nt).sort(P.sorterAsc)}).sort(function(lt,vt){return lt[0]-vt[0]});q.filterChanged(Y.key,ne._index,it)}})}}),Y}function _($){$.classed(T.cn.axisExtentText,!0).attr("text-anchor","middle").style("cursor","default")}function z(){var $=!0,q=!1;return{linePickActive:function(oe){return arguments.length?$=!!oe:$},contextShown:function(oe){return arguments.length?q=!!oe:q}}}function O($,q){var oe=q==="top"?1:-1,Z=$*Math.PI/180,G=Math.sin(Z),re=Math.cos(Z);return{dir:oe,dx:G,dy:re,degrees:$}}function F($,q,oe){for(var Z=q.panels||(q.panels=[]),G=$.data(),re=0;re=nt||xt>=it)return;var Je=Ze.lineLayer.readPixel(vt,it-1-xt),Pe=Je[3]!==0,Ue=Pe?Je[2]+256*(Je[1]+256*Je[0]):null,He={x:vt,y:xt,clientX:Ke.clientX,clientY:Ke.clientY,dataIndex:Ze.model.key,curveNumber:Ue};Ue!==de&&(Pe?G.hover(He):G.unhover&&G.unhover(He),de=Ue)}}),le.style("opacity",function(Ze){return Ze.pick?0:1}),J.style("background","rgba(255, 255, 255, 0)");var me=J.selectAll("."+T.cn.parcoords).data(ne,u);me.exit().remove(),me.enter().append("g").classed(T.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),me.attr("transform",function(Ze){return r(Ze.model.translateX,Ze.model.translateY)});var Le=me.selectAll("."+T.cn.parcoordsControlView).data(l,u);Le.enter().append("g").classed(T.cn.parcoordsControlView,!0),Le.attr("transform",function(Ze){return r(Ze.model.pad.l,Ze.model.pad.t)});var ve=Le.selectAll("."+T.cn.yAxis).data(function(Ze){return Ze.dimensions},u);ve.enter().append("g").classed(T.cn.yAxis,!0),Le.each(function(Ze){F(ve,Ze,K)}),le.each(function(Ze){if(Ze.viewModel){!Ze.lineLayer||G?Ze.lineLayer=n(this,Ze):Ze.lineLayer.update(Ze),(Ze.key||Ze.key===0)&&(Ze.viewModel[Ze.key]=Ze.lineLayer);var Ke=!Ze.context||G;Ze.lineLayer.render(Ze.viewModel.panels,Ke)}}),ve.attr("transform",function(Ze){return r(Ze.xScale(Ze.xIndex),0)}),ve.call(A.behavior.drag().origin(function(Ze){return Ze}).on("drag",function(Ze){var Ke=Ze.parent;ie.linePickActive(!1),Ze.x=Math.max(-T.overdrag,Math.min(Ze.model.width+T.overdrag,A.event.x)),Ze.canvasX=Ze.x*Ze.model.canvasPixelRatio,ve.sort(function(nt,it){return nt.x-it.x}).each(function(nt,it){nt.xIndex=it,nt.x=Ze===nt?nt.x:nt.xScale(nt.xIndex),nt.canvasX=nt.x*nt.model.canvasPixelRatio}),F(ve,Ke,K),ve.filter(function(nt){return Math.abs(Ze.xIndex-nt.xIndex)!==0}).attr("transform",function(nt){return r(nt.xScale(nt.xIndex),0)}),A.select(this).attr("transform",r(Ze.x,0)),ve.each(function(nt,it,lt){lt===Ze.parent.key&&(Ke.dimensions[it]=nt)}),Ke.contextLayer&&Ke.contextLayer.render(Ke.panels,!1,!k(Ke)),Ke.focusLayer.render&&Ke.focusLayer.render(Ke.panels)}).on("dragend",function(Ze){var Ke=Ze.parent;Ze.x=Ze.xScale(Ze.xIndex),Ze.canvasX=Ze.x*Ze.model.canvasPixelRatio,F(ve,Ke,K),A.select(this).attr("transform",function(nt){return r(nt.x,0)}),Ke.contextLayer&&Ke.contextLayer.render(Ke.panels,!1,!k(Ke)),Ke.focusLayer&&Ke.focusLayer.render(Ke.panels),Ke.pickLayer&&Ke.pickLayer.render(Ke.panels,!0),ie.linePickActive(!0),G&&G.axesMoved&&G.axesMoved(Ke.key,Ke.dimensions.map(function(nt){return nt.crossfilterDimensionIndex}))})),ve.exit().remove();var Ae=ve.selectAll("."+T.cn.axisOverlays).data(l,u);Ae.enter().append("g").classed(T.cn.axisOverlays,!0),Ae.selectAll("."+T.cn.axis).remove();var ye=Ae.selectAll("."+T.cn.axis).data(l,u);ye.enter().append("g").classed(T.cn.axis,!0),ye.each(function(Ze){var Ke=Ze.model.height/Ze.model.tickDistance,nt=Ze.domainScale,it=nt.domain();A.select(this).call(A.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(Ke,Ze.tickFormat).tickValues(Ze.ordinal?it:null).tickFormat(function(lt){return h.isOrdinal(Ze)?lt:V(Ze.model.dimensions[Ze.visibleIndex],lt)}).scale(nt)),s.font(ye.selectAll("text"),Ze.model.tickFont)}),ye.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),ye.selectAll("text").style("text-shadow",t.makeTextShadow(Y)).style("cursor","default");var Se=Ae.selectAll("."+T.cn.axisHeading).data(l,u);Se.enter().append("g").classed(T.cn.axisHeading,!0);var _e=Se.selectAll("."+T.cn.axisTitle).data(l,u);_e.enter().append("text").classed(T.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",re?"none":"auto"),_e.text(function(Ze){return Ze.label}).each(function(Ze){var Ke=A.select(this);s.font(Ke,Ze.model.labelFont),t.convertToTspans(Ke,q)}).attr("transform",function(Ze){var Ke=O(Ze.model.labelAngle,Ze.model.labelSide),nt=T.axisTitleOffset;return(Ke.dir>0?"":r(0,2*nt+Ze.model.height))+g(Ke.degrees)+r(-nt*Ke.dx,-nt*Ke.dy)}).attr("text-anchor",function(Ze){var Ke=O(Ze.model.labelAngle,Ze.model.labelSide),nt=Math.abs(Ke.dx),it=Math.abs(Ke.dy);return 2*nt>it?Ke.dir*Ke.dx<0?"start":"end":"middle"});var ze=Ae.selectAll("."+T.cn.axisExtent).data(l,u);ze.enter().append("g").classed(T.cn.axisExtent,!0);var Ie=ze.selectAll("."+T.cn.axisExtentTop).data(l,u);Ie.enter().append("g").classed(T.cn.axisExtentTop,!0),Ie.attr("transform",r(0,-T.axisExtentOffset));var Ne=Ie.selectAll("."+T.cn.axisExtentTopText).data(l,u);Ne.enter().append("text").classed(T.cn.axisExtentTopText,!0).call(_),Ne.text(function(Ze){return j(Ze,!0)}).each(function(Ze){s.font(A.select(this),Ze.model.rangeFont)});var et=ze.selectAll("."+T.cn.axisExtentBottom).data(l,u);et.enter().append("g").classed(T.cn.axisExtentBottom,!0),et.attr("transform",function(Ze){return r(0,Ze.model.height+T.axisExtentOffset)});var st=et.selectAll("."+T.cn.axisExtentBottomText).data(l,u);st.enter().append("text").classed(T.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(_),st.text(function(Ze){return j(Ze,!1)}).each(function(Ze){s.font(A.select(this),Ze.model.rangeFont)}),f.ensureAxisBrush(Ae,Y,q)}},24196:function(te,X,e){var A=e(36336),P=e(5048),o=e(95724).isVisible,L={};function M(r,t,s){var a=t.indexOf(s),c=r.indexOf(a);return c===-1&&(c+=t.length),c}function d(r,t){return function(a,c){return M(r,t,a)-M(r,t,c)}}var g=te.exports=function(t,s){var a=t._fullLayout,c=P(t,[],L);if(c){var u={},l={},y={},h={},T=a._size;s.forEach(function(b,E){var p=b[0].trace;y[E]=p.index;var S=h[E]=p._fullInput.index;u[E]=t.data[S].dimensions,l[E]=t.data[S].dimensions.slice()});var f=function(b,E,p){var S=l[b][E],w=p.map(function(B){return B.slice()}),i="dimensions["+E+"].constraintrange",C=a._tracePreGUI[t._fullData[y[b]]._fullInput.uid];if(C[i]===void 0){var x=S.constraintrange;C[i]=x||null}var k=t._fullData[y[b]].dimensions[E];w.length?(w.length===1&&(w=w[0]),S.constraintrange=w,k.constraintrange=w.slice(),w=[w]):(delete S.constraintrange,delete k.constraintrange,w=null);var I={};I[i]=w,t.emit("plotly_restyle",[I,[h[b]]])},n=function(b){t.emit("plotly_hover",b)},v=function(b){t.emit("plotly_unhover",b)},m=function(b,E){var p=d(E,l[b].filter(o));u[b].sort(p),l[b].filter(function(S){return!o(S)}).sort(function(S){return l[b].indexOf(S)}).forEach(function(S){u[b].splice(u[b].indexOf(S),1),u[b].splice(l[b].indexOf(S),0,S)}),t.emit("plotly_restyle",[{dimensions:[u[b]]},[h[b]]])};A(t,s,{width:T.w,height:T.h,margin:{t:T.t,r:T.r,b:T.b,l:T.l}},{filterChanged:f,hover:n,unhover:v,axesMoved:m})}};g.reglPrecompiled=L},74996:function(te,X,e){var A=e(45464),P=e(86968).u,o=e(25376),L=e(22548),M=e(21776).Ks,d=e(21776).Gw,g=e(92880).extendFlat,r=e(98192).c,t=o({editType:"plot",arrayOk:!0,colorEditType:"plot"});te.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:L.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:r,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:g({},A.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:M({},{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:g({},t,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:g({},t,{}),outsidetextfont:g({},t,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},title:{text:{valType:"string",dflt:"",editType:"plot"},font:g({},t,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:P({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:g({},t,{}),titleposition:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"calc"}}}},80036:function(te,X,e){var A=e(7316);X.name="pie",X.plot=function(P,o,L,M){A.plotBasePlot(X.name,P,o,L,M)},X.clean=function(P,o,L,M){A.cleanBasePlot(X.name,P,o,L,M)}},45768:function(te,X,e){var A=e(38248),P=e(49760),o=e(76308),L={};function M(t,s){var a=[],c=t._fullLayout,u=c.hiddenlabels||[],l=s.labels,y=s.marker.colors||[],h=s.values,T=s._length,f=s._hasValues&&T,n,v;if(s.dlabel)for(l=new Array(T),n=0;n=0});var x=s.type==="funnelarea"?p:s.sort;return x&&a.sort(function(k,I){return I.v-k.v}),a[0]&&(a[0].vTotal=E),a}function d(t){return function(a,c){return!a||(a=P(a),!a.isValid())?!1:(a=o.addOpacity(a,a.getAlpha()),t[c]||(t[c]=a),a)}}function g(t,s){var a=(s||{}).type;a||(a="pie");var c=t._fullLayout,u=t.calcdata,l=c[a+"colorway"],y=c["_"+a+"colormap"];c["extend"+a+"colors"]&&(l=r(l,L));for(var h=0,T=0;T0){y=!0;break}}y||(l=0)}return{hasLabels:c,hasValues:u,len:l}}function r(s,a,c,u,l){var y=u("marker.line.width");y&&u("marker.line.color",l?void 0:c.paper_bgcolor);var h=u("marker.colors");d(u,"marker.pattern",h),s.marker&&!a.marker.pattern.fgcolor&&(a.marker.pattern.fgcolor=s.marker.colors),a.marker.pattern.bgcolor||(a.marker.pattern.bgcolor=c.paper_bgcolor)}function t(s,a,c,u){function l(C,x){return P.coerce(s,a,o,C,x)}var y=l("labels"),h=l("values"),T=g(y,h),f=T.len;if(a._hasLabels=T.hasLabels,a._hasValues=T.hasValues,!a._hasLabels&&a._hasValues&&(l("label0"),l("dlabel")),!f){a.visible=!1;return}a._length=f,r(s,a,u,l,!0),l("scalegroup");var n=l("text"),v=l("texttemplate"),m;if(v||(m=l("textinfo",P.isArrayOrTypedArray(n)?"text+percent":"percent")),l("hovertext"),l("hovertemplate"),v||m&&m!=="none"){var b=l("textposition");M(s,a,u,l,b,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var E=Array.isArray(b)||b==="auto",p=E||b==="outside";p&&l("automargin"),(b==="inside"||b==="auto"||Array.isArray(b))&&l("insidetextorientation")}else m==="none"&&l("textposition","none");L(a,u,l);var S=l("hole"),w=l("title.text");if(w){var i=l("title.position",S?"middle center":"top center");!S&&i==="middle center"&&(a.title.position="top center"),P.coerceFont(l,"title.font",u.font)}l("sort"),l("direction"),l("rotation"),l("pull")}te.exports={handleLabelsAndValues:g,handleMarkerDefaults:r,supplyDefaults:t}},53644:function(te,X,e){var A=e(10624).appendArrayMultiPointValues;te.exports=function(o,L){var M={curveNumber:L.index,pointNumbers:o.pts,data:L._input,fullData:L,label:o.label,color:o.color,value:o.v,percent:o.percent,text:o.text,bbox:o.bbox,v:o.v};return o.pts.length===1&&(M.pointNumber=M.i=o.pts[0]),A(M,L,o.pts),L.type==="funnelarea"&&(delete M.v,delete M.i),M}},21552:function(te,X,e){var A=e(43616),P=e(76308);te.exports=function(L,M,d,g){var r=d.marker.pattern;r&&r.shape?A.pointStyle(L,d,g,M):P.fill(L,M.color)}},69656:function(te,X,e){var A=e(3400);function P(o){return o.indexOf("e")!==-1?o.replace(/[.]?0+e/,"e"):o.indexOf(".")!==-1?o.replace(/[.]?0+$/,""):o}X.formatPiePercent=function(L,M){var d=P((L*100).toPrecision(3));return A.numSeparate(d,M)+"%"},X.formatPieValue=function(L,M){var d=P(L.toPrecision(10));return A.numSeparate(d,M)},X.getFirstFilled=function(L,M){if(A.isArrayOrTypedArray(L))for(var d=0;d0&&(et+=nt*Ie.pxmid[0],st+=nt*Ie.pxmid[1])}Ie.cxFinal=et,Ie.cyFinal=st;function it(He,Oe,Ce,ge){var pe=ge*(Oe[0]-He[0]),Te=ge*(Oe[1]-He[1]);return"a"+ge*ne.r+","+ge*ne.r+" 0 "+Ie.largeArc+(Ce?" 1 ":" 0 ")+pe+","+Te}var lt=le.hole;if(Ie.v===ne.vTotal){var vt="M"+(et+Ie.px0[0])+","+(st+Ie.px0[1])+it(Ie.px0,Ie.pxmid,!0,1)+it(Ie.pxmid,Ie.px0,!0,1)+"Z";lt?Ke.attr("d","M"+(et+lt*Ie.px0[0])+","+(st+lt*Ie.px0[1])+it(Ie.px0,Ie.pxmid,!1,lt)+it(Ie.pxmid,Ie.px0,!1,lt)+"Z"+vt):Ke.attr("d",vt)}else{var xt=it(Ie.px0,Ie.px1,!0,1);if(lt){var Je=1-lt;Ke.attr("d","M"+(et+lt*Ie.px1[0])+","+(st+lt*Ie.px1[1])+it(Ie.px1,Ie.px0,!1,lt)+"l"+Je*Ie.px0[0]+","+Je*Ie.px0[1]+xt+"Z")}else Ke.attr("d","M"+et+","+st+"l"+Ie.px0[0]+","+Ie.px0[1]+xt+"Z")}oe(G,Ie,ne);var Pe=l.castOption(le.textposition,Ie.pts),Ue=Ze.selectAll("g.slicetext").data(Ie.text&&Pe!=="none"?[0]:[]);Ue.enter().append("g").classed("slicetext",!0),Ue.exit().remove(),Ue.each(function(){var He=d.ensureSingle(A.select(this),"text","",function(Ve){Ve.attr("data-notex",1)}),Oe=d.ensureUniformFontSize(G,Pe==="outside"?v(le,Ie,J.font):m(le,Ie,J.font));He.text(Ie.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(M.font,Oe).call(t.convertToTspans,G);var Ce=M.bBox(He.node()),ge;if(Pe==="outside")ge=I(Ce,Ie);else if(ge=E(Ce,Ie,ne),Pe==="auto"&&ge.scale<1){var pe=d.ensureUniformFontSize(G,le.outsidetextfont);He.call(M.font,pe),Ce=M.bBox(He.node()),ge=I(Ce,Ie)}var Te=ge.textPosAngle,be=Te===void 0?Ie.pxmid:q(ne.r,Te);if(ge.targetX=et+be[0]*ge.rCenter+(ge.x||0),ge.targetY=st+be[1]*ge.rCenter+(ge.y||0),Z(ge,Ce),ge.outside){var ke=ge.targetY;Ie.yLabelMin=ke-Ce.height/2,Ie.yLabelMid=ke,Ie.yLabelMax=ke+Ce.height/2,Ie.labelExtraX=0,Ie.labelExtraY=0,me=!0}ge.fontSize=Oe.size,a(le.type,ge,J),Y[Ne].transform=ge,d.setTransormAndDisplay(He,ge)})});var Le=A.select(this).selectAll("g.titletext").data(le.title.text?[0]:[]);if(Le.enter().append("g").classed("titletext",!0),Le.exit().remove(),Le.each(function(){var Ie=d.ensureSingle(A.select(this),"text","",function(st){st.attr("data-notex",1)}),Ne=le.title.text;le._meta&&(Ne=d.templateString(Ne,le._meta)),Ie.text(Ne).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(M.font,le.title.font).call(t.convertToTspans,G);var et;le.title.position==="middle center"?et=B(ne):et=_(ne,ae),Ie.attr("transform",r(et.x,et.y)+g(Math.min(1,et.scale))+r(et.tx,et.ty))}),me&&N(we,le),f(de,le),me&&le.automargin){var ve=M.bBox(ie.node()),Ae=le.domain,ye=ae.w*(Ae.x[1]-Ae.x[0]),Se=ae.h*(Ae.y[1]-Ae.y[0]),_e=(.5*ye-ne.r)/ae.w,ze=(.5*Se-ne.r)/ae.h;P.autoMargin(G,"pie."+le.uid+".automargin",{xl:Ae.x[0]-_e,xr:Ae.x[1]+_e,yb:Ae.y[0]-ze,yt:Ae.y[1]+ze,l:Math.max(ne.cx-ne.r-ve.left,0),r:Math.max(ve.right-(ne.cx+ne.r),0),b:Math.max(ve.bottom-(ne.cy+ne.r),0),t:Math.max(ne.cy-ne.r-ve.top,0),pad:5})}})});setTimeout(function(){K.selectAll("tspan").each(function(){var Y=A.select(this);Y.attr("dy")&&Y.attr("dy",Y.attr("dy"))})},0)}function f(G,re){G.each(function(H){var J=A.select(this);if(!H.labelExtraX&&!H.labelExtraY){J.select("path.textline").remove();return}var ae=J.select("g.slicetext text");H.transform.targetX+=H.labelExtraX,H.transform.targetY+=H.labelExtraY,d.setTransormAndDisplay(ae,H.transform);var K=H.cxFinal+H.pxmid[0],Y=H.cyFinal+H.pxmid[1],ie="M"+K+","+Y,ne=(H.yLabelMax-H.yLabelMin)*(H.pxmid[0]<0?-1:1)/4;if(H.labelExtraX){var le=H.labelExtraX*H.pxmid[1]/H.pxmid[0],de=H.yLabelMid+H.labelExtraY-(H.cyFinal+H.pxmid[1]);Math.abs(le)>Math.abs(de)?ie+="l"+de*H.pxmid[0]/H.pxmid[1]+","+de+"H"+(K+H.labelExtraX+ne):ie+="l"+H.labelExtraX+","+le+"v"+(de-le)+"h"+ne}else ie+="V"+(H.yLabelMid+H.labelExtraY)+"h"+ne;d.ensureSingle(J,"path","textline").call(L.stroke,re.outsidetextfont.color).attr({"stroke-width":Math.min(2,re.outsidetextfont.size/8),d:ie,fill:"none"})})}function n(G,re,H){var J=H[0],ae=J.cx,K=J.cy,Y=J.trace,ie=Y.type==="funnelarea";"_hasHoverLabel"in Y||(Y._hasHoverLabel=!1),"_hasHoverEvent"in Y||(Y._hasHoverEvent=!1),G.on("mouseover",function(ne){var le=re._fullLayout,de=re._fullData[Y.index];if(!(re._dragging||le.hovermode===!1)){var we=de.hoverinfo;if(Array.isArray(we)&&(we=o.castHoverinfo({hoverinfo:[l.castOption(we,ne.pts)],_module:Y._module},le,0)),we==="all"&&(we="label+text+value+percent+name"),de.hovertemplate||we!=="none"&&we!=="skip"&&we){var me=ne.rInscribed||0,Le=ae+ne.pxmid[0]*(1-me),ve=K+ne.pxmid[1]*(1-me),Ae=le.separators,ye=[];if(we&&we.indexOf("label")!==-1&&ye.push(ne.label),ne.text=l.castOption(de.hovertext||de.text,ne.pts),we&&we.indexOf("text")!==-1){var Se=ne.text;d.isValidTextValue(Se)&&ye.push(Se)}ne.value=ne.v,ne.valueLabel=l.formatPieValue(ne.v,Ae),we&&we.indexOf("value")!==-1&&ye.push(ne.valueLabel),ne.percent=ne.v/J.vTotal,ne.percentLabel=l.formatPiePercent(ne.percent,Ae),we&&we.indexOf("percent")!==-1&&ye.push(ne.percentLabel);var _e=de.hoverlabel,ze=_e.font,Ie=[];o.loneHover({trace:Y,x0:Le-me*J.r,x1:Le+me*J.r,y:ve,_x0:ie?ae+ne.TL[0]:Le-me*J.r,_x1:ie?ae+ne.TR[0]:Le+me*J.r,_y0:ie?K+ne.TL[1]:ve-me*J.r,_y1:ie?K+ne.BL[1]:ve+me*J.r,text:ye.join("
"),name:de.hovertemplate||we.indexOf("name")!==-1?de.name:void 0,idealAlign:ne.pxmid[0]<0?"left":"right",color:l.castOption(_e.bgcolor,ne.pts)||ne.color,borderColor:l.castOption(_e.bordercolor,ne.pts),fontFamily:l.castOption(ze.family,ne.pts),fontSize:l.castOption(ze.size,ne.pts),fontColor:l.castOption(ze.color,ne.pts),nameLength:l.castOption(_e.namelength,ne.pts),textAlign:l.castOption(_e.align,ne.pts),hovertemplate:l.castOption(de.hovertemplate,ne.pts),hovertemplateLabels:ne,eventData:[y(ne,de)]},{container:le._hoverlayer.node(),outerContainer:le._paper.node(),gd:re,inOut_bbox:Ie}),ne.bbox=Ie[0],Y._hasHoverLabel=!0}Y._hasHoverEvent=!0,re.emit("plotly_hover",{points:[y(ne,de)],event:A.event})}}),G.on("mouseout",function(ne){var le=re._fullLayout,de=re._fullData[Y.index],we=A.select(this).datum();Y._hasHoverEvent&&(ne.originalEvent=A.event,re.emit("plotly_unhover",{points:[y(we,de)],event:A.event}),Y._hasHoverEvent=!1),Y._hasHoverLabel&&(o.loneUnhover(le._hoverlayer.node()),Y._hasHoverLabel=!1)}),G.on("click",function(ne){var le=re._fullLayout,de=re._fullData[Y.index];re._dragging||le.hovermode===!1||(re._hoverdata=[y(ne,de)],o.click(re,A.event))})}function v(G,re,H){var J=l.castOption(G.outsidetextfont.color,re.pts)||l.castOption(G.textfont.color,re.pts)||H.color,ae=l.castOption(G.outsidetextfont.family,re.pts)||l.castOption(G.textfont.family,re.pts)||H.family,K=l.castOption(G.outsidetextfont.size,re.pts)||l.castOption(G.textfont.size,re.pts)||H.size;return{color:J,family:ae,size:K}}function m(G,re,H){var J=l.castOption(G.insidetextfont.color,re.pts);!J&&G._input.textfont&&(J=l.castOption(G._input.textfont.color,re.pts));var ae=l.castOption(G.insidetextfont.family,re.pts)||l.castOption(G.textfont.family,re.pts)||H.family,K=l.castOption(G.insidetextfont.size,re.pts)||l.castOption(G.textfont.size,re.pts)||H.size;return{color:J||L.contrast(re.color),family:ae,size:K}}function b(G,re){for(var H,J,ae=0;ae=-4;_e-=2)Se(Math.PI*_e,"tan");for(_e=4;_e>=-4;_e-=2)Se(Math.PI*(_e+1),"tan")}if(we||Le){for(_e=4;_e>=-4;_e-=2)Se(Math.PI*(_e+1.5),"rad");for(_e=4;_e>=-4;_e-=2)Se(Math.PI*(_e+.5),"rad")}}if(ie||ve||we){var ze=Math.sqrt(G.width*G.width+G.height*G.height);if(ye={scale:ae*J*2/ze,rCenter:1-ae,rotate:0},ye.textPosAngle=(re.startangle+re.stopangle)/2,ye.scale>=1)return ye;Ae.push(ye)}(ve||Le)&&(ye=S(G,J,Y,ne,le),ye.textPosAngle=(re.startangle+re.stopangle)/2,Ae.push(ye)),(ve||me)&&(ye=w(G,J,Y,ne,le),ye.textPosAngle=(re.startangle+re.stopangle)/2,Ae.push(ye));for(var Ie=0,Ne=0,et=0;et=1)break}return Ae[Ie]}function p(G,re){var H=G.startangle,J=G.stopangle;return H>re&&re>J||H0?1:-1)/2,y:K/(1+H*H/(J*J)),outside:!0}}function B(G){var re=Math.sqrt(G.titleBox.width*G.titleBox.width+G.titleBox.height*G.titleBox.height);return{x:G.cx,y:G.cy,scale:G.trace.hole*G.r*2/re,tx:0,ty:-G.titleBox.height/2+G.trace.title.font.size}}function _(G,re){var H=1,J=1,ae,K=G.trace,Y={x:G.cx,y:G.cy},ie={tx:0,ty:0};ie.ty+=K.title.font.size,ae=F(K),K.title.position.indexOf("top")!==-1?(Y.y-=(1+ae)*G.r,ie.ty-=G.titleBox.height):K.title.position.indexOf("bottom")!==-1&&(Y.y+=(1+ae)*G.r);var ne=z(G.r,G.trace.aspectratio),le=re.w*(K.domain.x[1]-K.domain.x[0])/2;return K.title.position.indexOf("left")!==-1?(le=le+ne,Y.x-=(1+ae)*ne,ie.tx+=G.titleBox.width/2):K.title.position.indexOf("center")!==-1?le*=2:K.title.position.indexOf("right")!==-1&&(le=le+ne,Y.x+=(1+ae)*ne,ie.tx-=G.titleBox.width/2),H=le/G.titleBox.width,J=O(G,re)/G.titleBox.height,{x:Y.x,y:Y.y,scale:Math.min(H,J),tx:ie.tx,ty:ie.ty}}function z(G,re){return G/(re===void 0?1:re)}function O(G,re){var H=G.trace,J=re.h*(H.domain.y[1]-H.domain.y[0]);return Math.min(G.titleBox.height,J/2)}function F(G){var re=G.pull;if(!re)return 0;var H;if(d.isArrayOrTypedArray(re))for(re=0,H=0;Hre&&(re=G.pull[H]);return re}function N(G,re){var H,J,ae,K,Y,ie,ne,le,de,we,me,Le,ve;function Ae(ze,Ie){return ze.pxmid[1]-Ie.pxmid[1]}function ye(ze,Ie){return Ie.pxmid[1]-ze.pxmid[1]}function Se(ze,Ie){Ie||(Ie={});var Ne=Ie.labelExtraY+(J?Ie.yLabelMax:Ie.yLabelMin),et=J?ze.yLabelMin:ze.yLabelMax,st=J?ze.yLabelMax:ze.yLabelMin,Ze=ze.cyFinal+Y(ze.px0[1],ze.px1[1]),Ke=Ne-et,nt,it,lt,vt,xt,Je;if(Ke*ne>0&&(ze.labelExtraY=Ke),!!d.isArrayOrTypedArray(re.pull))for(it=0;it=(l.castOption(re.pull,lt.pts)||0))&&((ze.pxmid[1]-lt.pxmid[1])*ne>0?(vt=lt.cyFinal+Y(lt.px0[1],lt.px1[1]),Ke=vt-et-ze.labelExtraY,Ke*ne>0&&(ze.labelExtraY+=Ke)):(st+ze.labelExtraY-Ze)*ne>0&&(nt=3*ie*Math.abs(it-we.indexOf(ze)),xt=lt.cxFinal+K(lt.px0[0],lt.px1[0]),Je=xt+nt-(ze.cxFinal+ze.pxmid[0])-ze.labelExtraX,Je*ie>0&&(ze.labelExtraX+=Je)))}for(J=0;J<2;J++)for(ae=J?Ae:ye,Y=J?Math.max:Math.min,ne=J?1:-1,H=0;H<2;H++){for(K=H?Math.max:Math.min,ie=H?1:-1,le=G[J][H],le.sort(ae),de=G[1-J][H],we=de.concat(le),Le=[],me=0;me1?(le=H.r,de=le/ae.aspectratio):(de=H.r,le=de*ae.aspectratio),le*=(1+ae.baseratio)/2,ne=le*de}Y=Math.min(Y,ne/H.vTotal)}for(J=0;Jre.vTotal/2?1:0,le.halfangle=Math.PI*Math.min(le.v/re.vTotal,.5),le.ring=1-J.hole,le.rInscribed=k(le,re))}function q(G,re){return[G*Math.sin(re),-G*Math.cos(re)]}function oe(G,re,H){var J=G._fullLayout,ae=H.trace,K=ae.texttemplate,Y=ae.textinfo;if(!K&&Y&&Y!=="none"){var ie=Y.split("+"),ne=function(Ie){return ie.indexOf(Ie)!==-1},le=ne("label"),de=ne("text"),we=ne("value"),me=ne("percent"),Le=J.separators,ve;if(ve=le?[re.label]:[],de){var Ae=l.getFirstFilled(ae.text,re.pts);h(Ae)&&ve.push(Ae)}we&&ve.push(l.formatPieValue(re.v,Le)),me&&ve.push(l.formatPiePercent(re.v/H.vTotal,Le)),re.text=ve.join("
")}function ye(Ie){return{label:Ie.label,value:Ie.v,valueLabel:l.formatPieValue(Ie.v,J.separators),percent:Ie.v/H.vTotal,percentLabel:l.formatPiePercent(Ie.v/H.vTotal,J.separators),color:Ie.color,text:Ie.text,customdata:d.castOption(ae,Ie.i,"customdata")}}if(K){var Se=d.castOption(ae,re.i,"texttemplate");if(!Se)re.text="";else{var _e=ye(re),ze=l.getFirstFilled(ae.text,re.pts);(h(ze)||ze==="")&&(_e.text=ze),re.text=d.texttemplateString(Se,_e,G._fullLayout._d3locale,_e,ae._meta||{})}}}function Z(G,re){var H=G.rotate*Math.PI/180,J=Math.cos(H),ae=Math.sin(H),K=(re.left+re.right)/2,Y=(re.top+re.bottom)/2;G.textX=K*J-Y*ae,G.textY=K*ae+Y*J,G.noCenter=!0}te.exports={plot:T,formatSliceLabel:oe,transformInsideText:E,determineInsideTextFont:m,positionTitleOutside:_,prerenderTitles:b,layoutAreas:V,attachFxHandlers:n,computeTransform:Z}},22152:function(te,X,e){var A=e(33428),P=e(10528),o=e(82744).resizeText;te.exports=function(M){var d=M._fullLayout._pielayer.selectAll(".trace");o(M,d,"pie"),d.each(function(g){var r=g[0],t=r.trace,s=A.select(this);s.style({opacity:t.opacity}),s.selectAll("path.surface").each(function(a){A.select(this).call(P,a,t,M)})})}},10528:function(te,X,e){var A=e(76308),P=e(69656).castOption,o=e(21552);te.exports=function(M,d,g,r){var t=g.marker.line,s=P(t.color,d.pts)||A.defaultLine,a=P(t.width,d.pts)||0;M.call(o,d,g,r).style("stroke-width",a).call(A.stroke,s)}},35484:function(te,X,e){var A=e(52904);te.exports={x:A.x,y:A.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:A.text,marker:{color:{valType:"color",arrayOk:!1,editType:"calc"},opacity:{valType:"number",min:0,max:1,dflt:1,arrayOk:!1,editType:"calc"},blend:{valType:"boolean",dflt:null,editType:"calc"},sizemin:{valType:"number",min:.1,max:2,dflt:.5,editType:"calc"},sizemax:{valType:"number",min:.1,dflt:20,editType:"calc"},border:{color:{valType:"color",arrayOk:!1,editType:"calc"},arearatio:{valType:"number",min:0,max:1,dflt:0,editType:"calc"},editType:"calc"},editType:"calc"},transforms:void 0}},11072:function(te,X,e){var A=e(67792).gl_pointcloud2d,P=e(3400).isArrayOrTypedArray,o=e(43080),L=e(19280).findExtremes,M=e(44928);function d(t,s){this.scene=t,this.uid=s,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=A(t.glplot,this.pointcloudOptions),this.pointcloud._trace=this}var g=d.prototype;g.handlePick=function(t){var s=this.idToIndex[t.pointId];return{trace:this,dataCoord:t.dataCoord,traceCoord:this.pickXYData?[this.pickXYData[s*2],this.pickXYData[s*2+1]]:[this.pickXData[s],this.pickYData[s]],textLabel:P(this.textLabels)?this.textLabels[s]:this.textLabels,color:this.color,name:this.name,pointIndex:s,hoverinfo:this.hoverinfo}},g.update=function(t){this.index=t.index,this.textLabels=t.text,this.name=t.name,this.hoverinfo=t.hoverinfo,this.bounds=[1/0,1/0,-1/0,-1/0],this.updateFast(t),this.color=M(t,{})},g.updateFast=function(t){var s=this.xData=this.pickXData=t.x,a=this.yData=this.pickYData=t.y,c=this.pickXYData=t.xy,u=t.xbounds&&t.ybounds,l=t.indices,y,h,T,f=this.bounds,n,v,m;if(c){if(T=c,y=c.length>>>1,u)f[0]=t.xbounds[0],f[2]=t.xbounds[1],f[1]=t.ybounds[0],f[3]=t.ybounds[1];else for(m=0;mf[2]&&(f[2]=n),vf[3]&&(f[3]=v);if(l)h=l;else for(h=new Int32Array(y),m=0;mf[2]&&(f[2]=n),vf[3]&&(f[3]=v);this.idToIndex=h,this.pointcloudOptions.idToIndex=h,this.pointcloudOptions.positions=T;var b=o(t.marker.color),E=o(t.marker.border.color),p=t.opacity*t.marker.opacity;b[3]*=p,this.pointcloudOptions.color=b;var S=t.marker.blend;if(S===null){var w=100;S=s.lengthE&&(E=a.source[n]),a.target[n]>E&&(E=a.target[n]);var p=E+1;t.node._count=p;var S,w=t.node.groups,i={};for(n=0;n0&&M(_,p)&&M(z,p)&&!(i.hasOwnProperty(_)&&i.hasOwnProperty(z)&&i[_]===i[z])){i.hasOwnProperty(z)&&(z=i[z]),i.hasOwnProperty(_)&&(_=i[_]),_=+_,z=+z,h[_]=h[z]=!0;var O="";a.label&&a.label[n]&&(O=a.label[n]);var F=null;O&&T.hasOwnProperty(O)&&(F=T[O]),c.push({pointNumber:n,label:O,color:u?a.color[n]:a.color,hovercolor:l?a.hovercolor[n]:a.hovercolor,customdata:y?a.customdata[n]:a.customdata,concentrationscale:F,source:_,target:z,value:+B}),I.source.push(_),I.target.push(z)}}var N=p+w.length,V=L(s.color),j=L(s.customdata),$=[];for(n=0;np-1,childrenNodes:[],pointNumber:n,label:q,color:V?s.color[n]:s.color,customdata:j?s.customdata[n]:s.customdata})}var oe=!1;return r(N,I.source,I.target)&&(oe=!0),{circular:oe,links:c,nodes:$,groups:w,groupLookup:i}}function r(t,s,a){for(var c=P.init2dArray(t,0),u=0;u1})}te.exports=function(s,a){var c=g(a);return o({circular:c.circular,_nodes:c.nodes,_links:c.links,_groups:c.groups,_groupLookup:c.groupLookup})}},11820:function(te){te.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"}}},47140:function(te,X,e){var A=e(3400),P=e(41440),o=e(76308),L=e(49760),M=e(86968).Q,d=e(16132),g=e(31780),r=e(51272);te.exports=function(a,c,u,l){function y(k,I){return A.coerce(a,c,P,k,I)}var h=A.extendDeep(l.hoverlabel,a.hoverlabel),T=a.node,f=g.newContainer(c,"node");function n(k,I){return A.coerce(T,f,P.node,k,I)}n("label"),n("groups"),n("x"),n("y"),n("pad"),n("thickness"),n("line.color"),n("line.width"),n("hoverinfo",a.hoverinfo),d(T,f,n,h),n("hovertemplate"),n("align");var v=l.colorway,m=function(k){return v[k%v.length]};n("color",f.label.map(function(k,I){return o.addOpacity(m(I),.8)})),n("customdata");var b=a.link||{},E=g.newContainer(c,"link");function p(k,I){return A.coerce(b,E,P.link,k,I)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",a.hoverinfo),d(b,E,p,h),p("hovertemplate");var S=L(l.paper_bgcolor).getLuminance()<.333,w=S?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",i=p("color",w);function C(k){var I=L(k);if(!I.isValid())return k;var B=I.getAlpha();return B<=.8?I.setAlpha(B+.2):I=S?I.brighten():I.darken(),I.toRgbString()}p("hovercolor",Array.isArray(i)?i.map(C):C(i)),p("customdata"),r(b,E,{name:"colorscales",handleItemDefaults:t}),M(c,l,y),y("orientation"),y("valueformat"),y("valuesuffix");var x;f.x.length&&f.y.length&&(x="freeform"),y("arrangement",x),A.coerceFont(y,"textfont",A.extendFlat({},l.font)),c._length=null};function t(s,a){function c(u,l){return A.coerce(s,a,P.link.colorscales,u,l)}c("label"),c("cmin"),c("cmax"),c("colorscale")}},45499:function(te,X,e){te.exports={attributes:e(41440),supplyDefaults:e(47140),calc:e(48068),plot:e(59596),moduleType:"trace",name:"sankey",basePlotModule:e(10760),selectPoints:e(81128),categories:["noOpacity"],meta:{}}},59596:function(te,X,e){var A=e(33428),P=e(3400),o=P.numberFormat,L=e(83248),M=e(93024),d=e(76308),g=e(11820).cn,r=P._;function t(v){return v!==""}function s(v,m){return v.filter(function(b){return b.key===m.traceId})}function a(v,m){A.select(v).select("path").style("fill-opacity",m),A.select(v).select("rect").style("fill-opacity",m)}function c(v){A.select(v).select("text.name").style("fill","black")}function u(v){return function(m){return v.node.sourceLinks.indexOf(m.link)!==-1||v.node.targetLinks.indexOf(m.link)!==-1}}function l(v){return function(m){return m.node.sourceLinks.indexOf(v.link)!==-1||m.node.targetLinks.indexOf(v.link)!==-1}}function y(v,m,b){m&&b&&s(b,m).selectAll("."+g.sankeyLink).filter(u(m)).call(T.bind(0,m,b,!1))}function h(v,m,b){m&&b&&s(b,m).selectAll("."+g.sankeyLink).filter(u(m)).call(f.bind(0,m,b,!1))}function T(v,m,b,E){E.style("fill",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverHue}).style("fill-opacity",function(p){if(!p.link.concentrationscale)return p.tinyColorHoverAlpha}),E.each(function(p){var S=p.link.label;S!==""&&s(m,v).selectAll("."+g.sankeyLink).filter(function(w){return w.link.label===S}).style("fill",function(w){if(!w.link.concentrationscale)return w.tinyColorHoverHue}).style("fill-opacity",function(w){if(!w.link.concentrationscale)return w.tinyColorHoverAlpha})}),b&&s(m,v).selectAll("."+g.sankeyNode).filter(l(v)).call(y)}function f(v,m,b,E){E.style("fill",function(p){return p.tinyColorHue}).style("fill-opacity",function(p){return p.tinyColorAlpha}),E.each(function(p){var S=p.link.label;S!==""&&s(m,v).selectAll("."+g.sankeyLink).filter(function(w){return w.link.label===S}).style("fill",function(w){return w.tinyColorHue}).style("fill-opacity",function(w){return w.tinyColorAlpha})}),b&&s(m,v).selectAll(g.sankeyNode).filter(l(v)).call(h)}function n(v,m){var b=v.hoverlabel||{},E=P.nestedProperty(b,m).get();return Array.isArray(E)?!1:E}te.exports=function(m,b){for(var E=m._fullLayout,p=E._paper,S=E._size,w=0;w"),color:n(Z,"bgcolor")||d.addOpacity(ae.color,1),borderColor:n(Z,"bordercolor"),fontFamily:n(Z,"font.family"),fontSize:n(Z,"font.size"),fontColor:n(Z,"font.color"),nameLength:n(Z,"namelength"),textAlign:n(Z,"align"),idealAlign:A.event.x"),color:n(Z,"bgcolor")||oe.tinyColorHue,borderColor:n(Z,"bordercolor"),fontFamily:n(Z,"font.family"),fontSize:n(Z,"font.size"),fontColor:n(Z,"font.color"),nameLength:n(Z,"namelength"),textAlign:n(Z,"align"),idealAlign:"left",hovertemplate:Z.hovertemplate,hovertemplateLabels:Y,eventData:[oe.node]},{container:E._hoverlayer.node(),outerContainer:E._paper.node(),gd:m});a(le,.85),c(le)}}},$=function(q,oe,Z){m._fullLayout.hovermode!==!1&&(A.select(q).call(h,oe,Z),oe.node.trace.node.hoverinfo!=="skip"&&(oe.node.fullData=oe.node.trace,m.emit("plotly_unhover",{event:A.event,points:[oe.node]})),M.loneUnhover(E._hoverlayer.node()))};L(m,p,b,{width:S.w,height:S.h,margin:{t:S.t,r:S.r,b:S.b,l:S.l}},{linkEvents:{hover:x,follow:O,unhover:F,select:C},nodeEvents:{hover:V,follow:j,unhover:$,select:N}})}},83248:function(te,X,e){var A=e(49812),P=e(67756).Gz,o=e(33428),L=e(26800),M=e(48932),d=e(11820),g=e(49760),r=e(76308),t=e(43616),s=e(3400),a=s.strTranslate,c=s.strRotate,u=e(71688),l=u.keyFun,y=u.repeat,h=u.unwrap,T=e(72736),f=e(24040),n=e(84284),v=n.CAP_SHIFT,m=n.LINE_SPACING,b=3;function E(re,H,J){var ae=h(H),K=ae.trace,Y=K.domain,ie=K.orientation==="h",ne=K.node.pad,le=K.node.thickness,de={justify:L.sankeyJustify,left:L.sankeyLeft,right:L.sankeyRight,center:L.sankeyCenter}[K.node.align],we=re.width*(Y.x[1]-Y.x[0]),me=re.height*(Y.y[1]-Y.y[0]),Le=ae._nodes,ve=ae._links,Ae=ae.circular,ye;Ae?ye=M.sankeyCircular().circularLinkGap(0):ye=L.sankey(),ye.iterations(d.sankeyIterations).size(ie?[we,me]:[me,we]).nodeWidth(le).nodePadding(ne).nodeId(function(Je){return Je.pointNumber}).nodeAlign(de).nodes(Le).links(ve);var Se=ye();ye.nodePadding()=Oe||(He=Oe-Ue.y0,He>1e-6&&(Ue.y0+=He,Ue.y1+=He)),Oe=Ue.y1+ne})}function it(Je){var Pe=Je.map(function(Te,be){return{x0:Te.x0,index:be}}).sort(function(Te,be){return Te.x0-be.x0}),Ue=[],He=-1,Oe,Ce=-1/0,ge;for(_e=0;_eCe+le&&(He+=1,Oe=pe.x0),Ce=pe.x0,Ue[He]||(Ue[He]=[]),Ue[He].push(pe),ge=Oe-pe.x0,pe.x0+=ge,pe.x1+=ge}return Ue}if(K.node.x.length&&K.node.y.length){for(_e=0;_e0?"L"+K.targetX+" "+K.targetY:"")+"Z":J="M "+(K.targetX-H)+" "+(K.targetY-ae)+" L"+(K.rightInnerExtent-H)+" "+(K.targetY-ae)+"A"+(K.rightLargeArcRadius+ae)+" "+(K.rightSmallArcRadius+ae)+" 0 0 0 "+(K.rightFullExtent-ae-H)+" "+(K.targetY+K.rightSmallArcRadius)+"L"+(K.rightFullExtent-ae-H)+" "+K.verticalRightInnerExtent+"A"+(K.rightLargeArcRadius+ae)+" "+(K.rightLargeArcRadius+ae)+" 0 0 0 "+(K.rightInnerExtent-H)+" "+(K.verticalFullExtent+ae)+"L"+K.leftInnerExtent+" "+(K.verticalFullExtent+ae)+"A"+(K.leftLargeArcRadius+ae)+" "+(K.leftLargeArcRadius+ae)+" 0 0 0 "+(K.leftFullExtent+ae)+" "+K.verticalLeftInnerExtent+"L"+(K.leftFullExtent+ae)+" "+(K.sourceY+K.leftSmallArcRadius)+"A"+(K.leftLargeArcRadius+ae)+" "+(K.leftSmallArcRadius+ae)+" 0 0 0 "+K.leftInnerExtent+" "+(K.sourceY-ae)+"L"+K.sourceX+" "+(K.sourceY-ae)+"L"+K.sourceX+" "+(K.sourceY+ae)+"L"+K.leftInnerExtent+" "+(K.sourceY+ae)+"A"+(K.leftLargeArcRadius-ae)+" "+(K.leftSmallArcRadius-ae)+" 0 0 1 "+(K.leftFullExtent-ae)+" "+(K.sourceY+K.leftSmallArcRadius)+"L"+(K.leftFullExtent-ae)+" "+K.verticalLeftInnerExtent+"A"+(K.leftLargeArcRadius-ae)+" "+(K.leftLargeArcRadius-ae)+" 0 0 1 "+K.leftInnerExtent+" "+(K.verticalFullExtent-ae)+"L"+(K.rightInnerExtent-H)+" "+(K.verticalFullExtent-ae)+"A"+(K.rightLargeArcRadius-ae)+" "+(K.rightLargeArcRadius-ae)+" 0 0 1 "+(K.rightFullExtent+ae-H)+" "+K.verticalRightInnerExtent+"L"+(K.rightFullExtent+ae-H)+" "+(K.targetY+K.rightSmallArcRadius)+"A"+(K.rightLargeArcRadius-ae)+" "+(K.rightSmallArcRadius-ae)+" 0 0 1 "+(K.rightInnerExtent-H)+" "+(K.targetY+ae)+"L"+(K.targetX-H)+" "+(K.targetY+ae)+(H>0?"L"+K.targetX+" "+K.targetY:"")+"Z",J}function w(){var re=.5;function H(J){var ae=J.linkArrowLength;if(J.link.circular)return S(J.link,ae);var K=Math.abs((J.link.target.x0-J.link.source.x1)/2);ae>K&&(ae=K);var Y=J.link.source.x1,ie=J.link.target.x0-ae,ne=P(Y,ie),le=ne(re),de=ne(1-re),we=J.link.y0-J.link.width/2,me=J.link.y0+J.link.width/2,Le=J.link.y1-J.link.width/2,ve=J.link.y1+J.link.width/2,Ae="M"+Y+","+we,ye="C"+le+","+we+" "+de+","+Le+" "+ie+","+Le,Se="C"+de+","+ve+" "+le+","+me+" "+Y+","+me,_e=ae>0?"L"+(ie+ae)+","+(Le+J.link.width/2):"";return _e+="L"+ie+","+ve,Ae+ye+_e+Se+"Z"}return H}function i(re,H){var J=g(H.color),ae=d.nodePadAcross,K=re.nodePad/2;H.dx=H.x1-H.x0,H.dy=H.y1-H.y0;var Y=H.dx,ie=Math.max(.5,H.dy),ne="node_"+H.pointNumber;return H.group&&(ne=s.randstr()),H.trace=re.trace,H.curveNumber=re.trace.index,{index:H.pointNumber,key:ne,partOfGroup:H.partOfGroup||!1,group:H.group,traceId:re.key,trace:re.trace,node:H,nodePad:re.nodePad,nodeLineColor:re.nodeLineColor,nodeLineWidth:re.nodeLineWidth,textFont:re.textFont,size:re.horizontal?re.height:re.width,visibleWidth:Math.ceil(Y),visibleHeight:ie,zoneX:-ae,zoneY:-K,zoneWidth:Y+2*ae,zoneHeight:ie+2*K,labelY:re.horizontal?H.dy/2+1:H.dx/2+1,left:H.originalLayer===1,sizeAcross:re.width,forceLayouts:re.forceLayouts,horizontal:re.horizontal,darkBackground:J.getBrightness()<=128,tinyColorHue:r.tinyRGB(J),tinyColorAlpha:J.getAlpha(),valueFormat:re.valueFormat,valueSuffix:re.valueSuffix,sankey:re.sankey,graph:re.graph,arrangement:re.arrangement,uniqueNodeLabelPathId:[re.guid,re.key,ne].join("_"),interactionState:re.interactionState,figure:re}}function C(re){re.attr("transform",function(H){return a(H.node.x0.toFixed(3),H.node.y0.toFixed(3))})}function x(re){re.call(C)}function k(re,H){re.call(x),H.attr("d",w())}function I(re){re.attr("width",function(H){return H.node.x1-H.node.x0}).attr("height",function(H){return H.visibleHeight})}function B(re){return re.link.width>1||re.linkLineWidth>0}function _(re){var H=a(re.translateX,re.translateY);return H+(re.horizontal?"matrix(1 0 0 1 0 0)":"matrix(0 1 1 0 0 0)")}function z(re,H,J){re.on(".basic",null).on("mouseover.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(J.hover(this,ae,H),ae.interactionState.hovered=[this,ae])}).on("mousemove.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(J.follow(this,ae),ae.interactionState.hovered=[this,ae])}).on("mouseout.basic",function(ae){!ae.interactionState.dragInProgress&&!ae.partOfGroup&&(J.unhover(this,ae,H),ae.interactionState.hovered=!1)}).on("click.basic",function(ae){ae.interactionState.hovered&&(J.unhover(this,ae,H),ae.interactionState.hovered=!1),!ae.interactionState.dragInProgress&&!ae.partOfGroup&&J.select(this,ae,H)})}function O(re,H,J,ae){var K=o.behavior.drag().origin(function(Y){return{x:Y.node.x0+Y.visibleWidth/2,y:Y.node.y0+Y.visibleHeight/2}}).on("dragstart",function(Y){if(Y.arrangement!=="fixed"&&(s.ensureSingle(ae._fullLayout._infolayer,"g","dragcover",function(ne){ae._fullLayout._dragCover=ne}),s.raiseToTop(this),Y.interactionState.dragInProgress=Y.node,q(Y.node),Y.interactionState.hovered&&(J.nodeEvents.unhover.apply(0,Y.interactionState.hovered),Y.interactionState.hovered=!1),Y.arrangement==="snap")){var ie=Y.traceId+"|"+Y.key;Y.forceLayouts[ie]?Y.forceLayouts[ie].alpha(1):F(re,ie,Y),N(re,H,Y,ie,ae)}}).on("drag",function(Y){if(Y.arrangement!=="fixed"){var ie=o.event.x,ne=o.event.y;Y.arrangement==="snap"?(Y.node.x0=ie-Y.visibleWidth/2,Y.node.x1=ie+Y.visibleWidth/2,Y.node.y0=ne-Y.visibleHeight/2,Y.node.y1=ne+Y.visibleHeight/2):(Y.arrangement==="freeform"&&(Y.node.x0=ie-Y.visibleWidth/2,Y.node.x1=ie+Y.visibleWidth/2),ne=Math.max(0,Math.min(Y.size-Y.visibleHeight/2,ne)),Y.node.y0=ne-Y.visibleHeight/2,Y.node.y1=ne+Y.visibleHeight/2),q(Y.node),Y.arrangement!=="snap"&&(Y.sankey.update(Y.graph),k(re.filter(oe(Y)),H))}}).on("dragend",function(Y){if(Y.arrangement!=="fixed"){Y.interactionState.dragInProgress=!1;for(var ie=0;ie0)window.requestAnimationFrame(Y);else{var le=J.node.originalX;J.node.x0=le-J.visibleWidth/2,J.node.x1=le+J.visibleWidth/2,j(J,K)}})}function V(re,H,J,ae){return function(){for(var Y=0,ie=0;ie0&&ae.forceLayouts[H].alpha(0)}}function j(re,H){for(var J=[],ae=[],K=0;K_&&C[O].gap;)O--;for(N=C[O].s,z=C.length-1;z>O;z--)C[z].s=N;for(;_I[h]&&h=0;u--){var l=M[u];if(l.type==="scatter"&&l.xaxis===a.xaxis&&l.yaxis===a.yaxis){l.opacity=void 0;break}}}}}},18800:function(te,X,e){var A=e(3400),P=e(24040),o=e(52904),L=e(88200),M=e(43028),d=e(43980),g=e(31147),r=e(43912),t=e(74428),s=e(66828),a=e(11731),c=e(124),u=e(70840),l=e(3400).coercePattern;te.exports=function(h,T,f,n){function v(C,x){return A.coerce(h,T,o,C,x)}var m=d(h,T,n,v);if(m||(T.visible=!1),!!T.visible){g(h,T,n,v),v("xhoverformat"),v("yhoverformat");var b=r(h,T,n,v);n.scattermode==="group"&&T.orientation===void 0&&v("orientation","v");var E=!b&&m=Math.min(q,oe)&&h<=Math.max(q,oe)?0:1/0}var Z=Math.max(3,$.mrc||0),G=1-1/Z,re=Math.abs(l.c2p($.x)-h);return re=Math.min(q,oe)&&T<=Math.max(q,oe)?0:1/0}var Z=Math.max(3,$.mrc||0),G=1-1/Z,re=Math.abs(y.c2p($.y)-T);return reJ!=we>=J&&(ne=Y[K-1][0],le=Y[K][0],we-de&&(ie=ne+(le-ne)*(J-de)/(we-de),Z=Math.min(Z,ie),G=Math.max(G,ie)));return Z=Math.max(Z,0),G=Math.min(G,l._length),{x0:Z,x1:G,y0:J,y1:J}}if(n.indexOf("fills")!==-1&&u._fillElement){var N=O(u._fillElement)&&!O(u._fillExclusionElement);if(N){var V=F(u._polygons);V===null&&(V={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var j=M.defaultLine;return M.opacity(u.fillcolor)?j=u.fillcolor:M.opacity((u.line||{}).color)&&(j=u.line.color),A.extendFlat(r,{distance:r.maxHoverDistance,x0:V.x0,x1:V.x1,y0:V.y0,y1:V.y1,color:j,hovertemplate:!1}),delete r.index,u.text&&!A.isArrayOrTypedArray(u.text)?r.text=String(u.text):r.text=u.name,[r]}}}},65875:function(te,X,e){var A=e(43028);te.exports={hasLines:A.hasLines,hasMarkers:A.hasMarkers,hasText:A.hasText,isBubble:A.isBubble,attributes:e(52904),layoutAttributes:e(55308),supplyDefaults:e(18800),crossTraceDefaults:e(35036),supplyLayoutDefaults:e(59748),calc:e(16356).calc,crossTraceCalc:e(96664),arraysToCalcdata:e(20148),plot:e(96504),colorbar:e(5528),formatLabels:e(76688),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(98723),selectPoints:e(91560),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:e(57952),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}},55308:function(te){te.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}},59748:function(te,X,e){var A=e(3400),P=e(55308);te.exports=function(o,L){function M(g,r){return A.coerce(o,L,P,g,r)}var d=L.barmode==="group";L.scattermode==="group"&&M("scattergap",d?L.bargap:.2)}},66828:function(te,X,e){var A=e(3400).isArrayOrTypedArray,P=e(94288).hasColorscale,o=e(27260);te.exports=function(M,d,g,r,t,s){s||(s={});var a=(M.marker||{}).color;if(a&&a._inputArray&&(a=a._inputArray),t("line.color",g),P(M,"line"))o(M,d,r,t,{prefix:"line.",cLetter:"c"});else{var c=(A(a)?!1:a)||g;t("line.color",c)}t("line.width"),s.noDash||t("line.dash"),s.backoff&&t("line.backoff")}},52340:function(te,X,e){var A=e(43616),P=e(39032),o=P.BADNUM,L=P.LOG_CLIP,M=L+.5,d=L-.5,g=e(3400),r=g.segmentsIntersect,t=g.constrain,s=e(88200);te.exports=function(c,u){var l=u.trace||{},y=u.xaxis,h=u.yaxis,T=y.type==="log",f=h.type==="log",n=y._length,v=h._length,m=u.backoff,b=l.marker,E=u.connectGaps,p=u.baseTolerance,S=u.shape,w=S==="linear",i=l.fill&&l.fill!=="none",C=[],x=s.minTolerance,k=c.length,I=new Array(k),B=0,_,z,O,F,N,V,j,$,q,oe,Z,G,re,H,J,ae;function K(at){var ut=c[at];if(!ut)return!1;var Nt=u.linearized?y.l2p(ut.x):y.c2p(ut.x),Vt=u.linearized?h.l2p(ut.y):h.c2p(ut.y);if(Nt===o){if(T&&(Nt=y.c2p(ut.x,!0)),Nt===o)return!1;f&&Vt===o&&(Nt*=Math.abs(y._m*v*(y._m>0?M:d)/(h._m*n*(h._m>0?M:d)))),Nt*=1e3}if(Vt===o){if(f&&(Vt=h.c2p(ut.y,!0)),Vt===o)return!1;Vt*=1e3}return[Nt,Vt]}function Y(at,ut,Nt,Vt){var gt=Nt-at,Ct=Vt-ut,Yt=.5-at,gr=.5-ut,ht=gt*gt+Ct*Ct,Ht=gt*Yt+Ct*gr;if(Ht>0&&Ht1||Math.abs(Yt.y-Nt[0][1])>1)&&(Yt=[Yt.x,Yt.y],Vt&&de(Yt,at)Le||at[1]Ae)return[t(at[0],me,Le),t(at[1],ve,Ae)]}function Ke(at,ut){if(at[0]===ut[0]&&(at[0]===me||at[0]===Le)||at[1]===ut[1]&&(at[1]===ve||at[1]===Ae))return!0}function nt(at,ut){var Nt=[],Vt=Ze(at),gt=Ze(ut);return Vt&>&&Ke(Vt,gt)||(Vt&&Nt.push(Vt),gt&&Nt.push(gt)),Nt}function it(at,ut,Nt){return function(Vt,gt){var Ct=Ze(Vt),Yt=Ze(gt),gr=[];if(Ct&&Yt&&Ke(Ct,Yt))return gr;Ct&&gr.push(Ct),Yt&&gr.push(Yt);var ht=2*g.constrain((Vt[at]+gt[at])/2,ut,Nt)-((Ct||Vt)[at]+(Yt||gt)[at]);if(ht){var Ht;Ct&&Yt?Ht=ht>0==Ct[at]>Yt[at]?Ct:Yt:Ht=Ct||Yt,Ht[at]+=ht}return gr}}var lt;S==="linear"||S==="spline"?lt=st:S==="hv"||S==="vh"?lt=nt:S==="hvh"?lt=it(0,me,Le):S==="vhv"&&(lt=it(1,ve,Ae));function vt(at,ut){var Nt=ut[0]-at[0],Vt=(ut[1]-at[1])/Nt,gt=(at[1]*ut[0]-ut[1]*at[0])/Nt;return gt>0?[Vt>0?me:Le,Ae]:[Vt>0?Le:me,ve]}function xt(at){var ut=at[0],Nt=at[1],Vt=ut===I[B-1][0],gt=Nt===I[B-1][1];if(!(Vt&>))if(B>1){var Ct=ut===I[B-2][0],Yt=Nt===I[B-2][1];Vt&&(ut===me||ut===Le)&&Ct?Yt?B--:I[B-1]=at:gt&&(Nt===ve||Nt===Ae)&&Yt?Ct?B--:I[B-1]=at:I[B++]=at}else I[B++]=at}function Je(at){I[B-1][0]!==at[0]&&I[B-1][1]!==at[1]&&xt([ze,Ie]),xt(at),Ne=null,ze=Ie=0}var Pe=g.isArrayOrTypedArray(b);function Ue(at){if(at&&m&&(at.i=_,at.d=c,at.trace=l,at.marker=Pe?b[at.i]:b,at.backoff=m),ie=at[0]/n,ne=at[1]/v,Se=at[0]Le?Le:0,_e=at[1]Ae?Ae:0,Se||_e){if(!B)I[B++]=[Se||at[0],_e||at[1]];else if(Ne){var ut=lt(Ne,at);ut.length>1&&(Je(ut[0]),I[B++]=ut[1])}else et=lt(I[B-1],at)[0],I[B++]=et;var Nt=I[B-1];Se&&_e&&(Nt[0]!==Se||Nt[1]!==_e)?(Ne&&(ze!==Se&&Ie!==_e?xt(ze&&Ie?vt(Ne,at):[ze||Se,Ie||_e]):ze&&Ie&&xt([ze,Ie])),xt([Se,_e])):ze-Se&&Ie-_e&&xt([Se||ze,_e||Ie]),Ne=at,ze=Se,Ie=_e}else Ne&&Je(lt(Ne,at)[0]),I[B++]=at}for(_=0;_le(V,He))break;O=V,re=q[0]*$[0]+q[1]*$[1],re>Z?(Z=re,F=V,j=!1):re=c.length||!V)break;Ue(V),z=V}}Ne&&xt([ze||Ne[0],Ie||Ne[1]]),C.push(I.slice(0,B))}var Oe=S.slice(S.length-1);if(m&&Oe!=="h"&&Oe!=="v"){for(var Ce=!1,ge=-1,pe=[],Te=0;Te=0?r=u:(r=u=c,c++),r0?Math.max(s,g):0}}},5528:function(te){te.exports={container:"marker",min:"cmin",max:"cmax"}},74428:function(te,X,e){var A=e(76308),P=e(94288).hasColorscale,o=e(27260),L=e(43028);te.exports=function(d,g,r,t,s,a){var c=L.isBubble(d),u=(d.line||{}).color,l;if(a=a||{},u&&(r=u),s("marker.symbol"),s("marker.opacity",c?.7:1),s("marker.size"),a.noAngle||(s("marker.angle"),a.noAngleRef||s("marker.angleref"),a.noStandOff||s("marker.standoff")),s("marker.color",r),P(d,"marker")&&o(d,g,t,s,{prefix:"marker.",cLetter:"c"}),a.noSelect||(s("selected.marker.color"),s("unselected.marker.color"),s("selected.marker.size"),s("unselected.marker.size")),a.noLine||(u&&!Array.isArray(u)&&g.marker.color!==u?l=u:c?l=A.background:l=A.defaultLine,s("marker.line.color",l),P(d,"marker.line")&&o(d,g,t,s,{prefix:"marker.line.",cLetter:"c"}),s("marker.line.width",c?1:0)),c&&(s("marker.sizeref"),s("marker.sizemin"),s("marker.sizemode")),a.gradient){var y=s("marker.gradient.type");y!=="none"&&s("marker.gradient.color")}}},31147:function(te,X,e){var A=e(3400).dateTick0,P=e(39032),o=P.ONEWEEK;function L(M,d){return M%o===0?A(d,1):A(d,0)}te.exports=function(d,g,r,t,s){if(s||(s={x:!0,y:!0}),s.x){var a=t("xperiod");a&&(t("xperiod0",L(a,g.xcalendar)),t("xperiodalignment"))}if(s.y){var c=t("yperiod");c&&(t("yperiod0",L(c,g.ycalendar)),t("yperiodalignment"))}}},96504:function(te,X,e){var A=e(33428),P=e(24040),o=e(3400),L=o.ensureSingle,M=o.identity,d=e(43616),g=e(43028),r=e(52340),t=e(14328),s=e(92065).tester;te.exports=function(y,h,T,f,n,v){var m,b,E=!n,p=!!n&&n.duration>0,S=t(y,h,T);if(m=f.selectAll("g.trace").data(S,function(i){return i[0].trace.uid}),m.enter().append("g").attr("class",function(i){return"trace scatter trace"+i[0].trace.uid}).style("stroke-miterlimit",2),m.order(),a(y,m,h),p){v&&(b=v());var w=A.transition().duration(n.duration).ease(n.easing).each("end",function(){b&&b()}).each("interrupt",function(){b&&b()});w.each(function(){f.selectAll("g.trace").each(function(i,C){c(y,C,h,i,S,this,n)})})}else m.each(function(i,C){c(y,C,h,i,S,this,n)});E&&m.exit().remove(),f.selectAll("path:not([d])").remove()};function a(l,y,h){y.each(function(T){var f=L(A.select(this),"g","fills");d.setClipUrl(f,h.layerClipId,l);var n=T[0].trace,v=[];n._ownfill&&v.push("_ownFill"),n._nexttrace&&v.push("_nextFill");var m=f.selectAll("g").data(v,M);m.enter().append("g"),m.exit().each(function(b){n[b]=null}).remove(),m.order().each(function(b){n[b]=L(A.select(this),"path","js-fill")})})}function c(l,y,h,T,f,n,v){var m=l._context.staticPlot,b;u(l,y,h,T,f);var E=!!v&&v.duration>0;function p(xt){return E?xt.transition():xt}var S=h.xaxis,w=h.yaxis,i=T[0].trace,C=i.line,x=A.select(n),k=L(x,"g","errorbars"),I=L(x,"g","lines"),B=L(x,"g","points"),_=L(x,"g","text");if(P.getComponentMethod("errorbars","plot")(l,k,h,v),i.visible!==!0)return;p(x).style("opacity",i.opacity);var z,O,F=i.fill.charAt(i.fill.length-1);F!=="x"&&F!=="y"&&(F="");var N,V;F==="y"?(N=1,V=w.c2p(0,!0)):F==="x"&&(N=0,V=S.c2p(0,!0)),T[0][h.isRangePlot?"nodeRangePlot3":"node3"]=x;var j="",$=[],q=i._prevtrace,oe=null,Z=null;q&&(j=q._prevRevpath||"",O=q._nextFill,$=q._ownPolygons,oe=q._fillsegments,Z=q._fillElement);var G,re,H="",J="",ae,K,Y,ie,ne,le,de=[];i._polygons=[];var we=[],me=[],Le=o.noop;if(z=i._ownFill,g.hasLines(i)||i.fill!=="none"){O&&O.datum(T),["hv","vh","hvh","vhv"].indexOf(C.shape)!==-1?(ae=d.steps(C.shape),K=d.steps(C.shape.split("").reverse().join(""))):C.shape==="spline"?ae=K=function(xt){var Je=xt[xt.length-1];return xt.length>1&&xt[0][0]===Je[0]&&xt[0][1]===Je[1]?d.smoothclosed(xt.slice(1),C.smoothing):d.smoothopen(xt,C.smoothing)}:ae=K=function(xt){return"M"+xt.join("L")},Y=function(xt){return K(xt.reverse())},me=r(T,{xaxis:S,yaxis:w,trace:i,connectGaps:i.connectgaps,baseTolerance:Math.max(C.width||1,3)/4,shape:C.shape,backoff:C.backoff,simplify:C.simplify,fill:i.fill}),we=new Array(me.length);var ve=0;for(b=0;b=m[0]&&x.x<=m[1]&&x.y>=b[0]&&x.y<=b[1]}),w=Math.ceil(S.length/p),i=0;f.forEach(function(x,k){var I=x[0].trace;g.hasMarkers(I)&&I.marker.maxdisplayed>0&&k0){var h=r.c2l(l);r._lowerLogErrorBound||(r._lowerLogErrorBound=h),r._lowerErrorBound=Math.min(r._lowerLogErrorBound,h)}}else s[a]=[-c[0]*g,c[1]*g]}return s}function o(M){for(var d=0;d-1?-1:x.indexOf("right")>-1?1:0}function v(x){return x==null?0:x.indexOf("top")>-1?-1:x.indexOf("bottom")>-1?1:0}function m(x){var k=0,I=0,B=[k,I];if(Array.isArray(x))for(var _=0;_=0){var V=T(F.position,F.delaunayColor,F.delaunayAxis);V.opacity=x.opacity,this.delaunayMesh?this.delaunayMesh.update(V):(V.gl=k,this.delaunayMesh=L(V),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)},h.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())};function C(x,k){var I=new y(x,k.uid);return I.update(k),I}te.exports=C},83484:function(te,X,e){var A=e(24040),P=e(3400),o=e(43028),L=e(74428),M=e(66828),d=e(124),g=e(91592);te.exports=function(s,a,c,u){function l(b,E){return P.coerce(s,a,g,b,E)}var y=r(s,a,l,u);if(!y){a.visible=!1;return}l("text"),l("hovertext"),l("hovertemplate"),l("xhoverformat"),l("yhoverformat"),l("zhoverformat"),l("mode"),o.hasMarkers(a)&&L(s,a,c,u,l,{noSelect:!0,noAngle:!0}),o.hasLines(a)&&(l("connectgaps"),M(s,a,c,u,l)),o.hasText(a)&&(l("texttemplate"),d(s,a,u,l,{noSelect:!0}));var h=(a.line||{}).color,T=(a.marker||{}).color;l("surfaceaxis")>=0&&l("surfacecolor",h||T);for(var f=["x","y","z"],n=0;n<3;++n){var v="projection."+f[n];l(v+".show")&&(l(v+".opacity"),l(v+".scale"))}var m=A.getComponentMethod("errorbars","supplyDefaults");m(s,a,h||T||c,{axis:"z"}),m(s,a,h||T||c,{axis:"y",inherit:"z"}),m(s,a,h||T||c,{axis:"x",inherit:"z"})};function r(t,s,a,c){var u=0,l=a("x"),y=a("y"),h=a("z"),T=A.getComponentMethod("calendars","handleTraceDefaults");return T(t,s,["x","y","z"],c),l&&y&&h&&(u=Math.min(l.length,y.length,h.length),s._length=s._xlength=s._ylength=s._zlength=u),u}},3296:function(te,X,e){te.exports={plot:e(41064),attributes:e(91592),markerSymbols:e(87792),supplyDefaults:e(83484),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:e(41484),moduleType:"trace",name:"scatter3d",basePlotModule:e(12536),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}},90372:function(te,X,e){var A=e(98304),P=e(52904),o=e(45464),L=e(21776).Ks,M=e(21776).Gw,d=e(49084),g=e(92880).extendFlat,r=P.marker,t=P.line,s=r.line;te.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:g({},P.mode,{dflt:"markers"}),text:g({},P.text,{}),texttemplate:M({editType:"plot"},{keys:["a","b","text"]}),hovertext:g({},P.hovertext,{}),line:{color:t.color,width:t.width,dash:t.dash,backoff:t.backoff,shape:g({},t.shape,{values:["linear","spline"]}),smoothing:t.smoothing,editType:"calc"},connectgaps:P.connectgaps,fill:g({},P.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:A(),marker:g({symbol:r.symbol,opacity:r.opacity,maxdisplayed:r.maxdisplayed,angle:r.angle,angleref:r.angleref,standoff:r.standoff,size:r.size,sizeref:r.sizeref,sizemin:r.sizemin,sizemode:r.sizemode,line:g({width:s.width,editType:"calc"},d("marker.line")),gradient:r.gradient,editType:"calc"},d("marker")),textfont:P.textfont,textposition:P.textposition,selected:P.selected,unselected:P.unselected,hoverinfo:g({},o.hoverinfo,{flags:["a","b","text","name"]}),hoveron:P.hoveron,hovertemplate:L()}},48228:function(te,X,e){var A=e(38248),P=e(90136),o=e(20148),L=e(4500),M=e(16356).calcMarkerSize,d=e(50948);te.exports=function(r,t){var s=t._carpetTrace=d(r,t);if(!(!s||!s.visible||s.visible==="legendonly")){var a;t.xaxis=s.xaxis,t.yaxis=s.yaxis;var c=t._length,u=new Array(c),l,y,h=!1;for(a=0;a0?p=b.labelprefix.replace(/ = $/,""):p=b._hovertitle,f.push(p+": "+E.toFixed(3)+b.labelsuffix)}if(!y.hovertemplate){var v=l.hi||y.hoverinfo,m=v.split("+");m.indexOf("all")!==-1&&(m=["a","b","text"]),m.indexOf("a")!==-1&&n(h.aaxis,l.a),m.indexOf("b")!==-1&&n(h.baxis,l.b),f.push("y: "+t.yLabel),m.indexOf("text")!==-1&&P(l,y,f),t.extraText=f.join("
")}return r}},4184:function(te,X,e){te.exports={attributes:e(90372),supplyDefaults:e(6176),colorbar:e(5528),formatLabels:e(52364),calc:e(48228),plot:e(20036),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(58960),selectPoints:e(91560),eventData:e(89307),moduleType:"trace",name:"scattercarpet",basePlotModule:e(57952),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}},20036:function(te,X,e){var A=e(96504),P=e(54460),o=e(43616);te.exports=function(M,d,g,r){var t,s,a,c=g[0][0].carpet,u=P.getFromId(M,c.xaxis||"x"),l=P.getFromId(M,c.yaxis||"y"),y={xaxis:u,yaxis:l,plot:d.plot};for(t=0;t")}},36952:function(te,X,e){te.exports={attributes:e(6096),supplyDefaults:e(86188),colorbar:e(5528),formatLabels:e(56696),calc:e(25212),calcGeoJSON:e(48691).calcGeoJSON,plot:e(48691).plot,style:e(25064),styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(64292),eventData:e(58544),selectPoints:e(8796),moduleType:"trace",name:"scattergeo",basePlotModule:e(10816),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}},48691:function(te,X,e){var A=e(33428),P=e(3400),o=e(59972).getTopojsonFeatures,L=e(44808),M=e(27144),d=e(19280).findExtremes,g=e(39032).BADNUM,r=e(16356).calcMarkerSize,t=e(43028),s=e(25064);function a(u,l,y){var h=l.layers.frontplot.select(".scatterlayer"),T=P.makeTraceGroups(h,y,"trace scattergeo");function f(n,v){n.lonlat[0]===g&&A.select(v).remove()}T.selectAll("*").remove(),T.each(function(n){var v=A.select(this),m=n[0].trace;if(t.hasLines(m)||m.fill!=="none"){var b=L.calcTraceToLineCoords(n),E=m.fill!=="none"?L.makePolygon(b):L.makeLine(b);v.selectAll("path.js-line").data([{geojson:E,trace:m}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}t.hasMarkers(m)&&v.selectAll("path.point").data(P.identity).enter().append("path").classed("point",!0).each(function(p){f(p,this)}),t.hasText(m)&&v.selectAll("g").data(P.identity).enter().append("g").append("text").each(function(p){f(p,this)}),s(u,n)})}function c(u,l){var y=u[0].trace,h=l[y.geo],T=h._subplot,f=y._length,n,v;if(P.isArrayOrTypedArray(y.locations)){var m=y.locationmode,b=m==="geojson-id"?M.extractTraceFeature(u):o(y,T.topojson);for(n=0;n=l,w=p*2,i={},C,x=m.makeCalcdata(n,"x"),k=b.makeCalcdata(n,"y"),I=M(n,m,"x",x),B=M(n,b,"y",k),_=I.vals,z=B.vals;n._x=_,n._y=z,n.xperiodalignment&&(n._origX=x,n._xStarts=I.starts,n._xEnds=I.ends),n.yperiodalignment&&(n._origY=k,n._yStarts=B.starts,n._yEnds=B.ends);var O=new Array(w),F=new Array(p);for(C=0;C1&&P.extendFlat(E.line,a.linePositions(T,n,v)),E.errorX||E.errorY){var p=a.errorBarPositions(T,n,v,m,b);E.errorX&&P.extendFlat(E.errorX,p.x),E.errorY&&P.extendFlat(E.errorY,p.y)}return E.text&&(P.extendFlat(E.text,{positions:v},a.textPosition(T,n,E.text,E.marker)),P.extendFlat(E.textSel,{positions:v},a.textPosition(T,n,E.text,E.markerSel)),P.extendFlat(E.textUnsel,{positions:v},a.textPosition(T,n,E.text,E.markerUnsel))),E}},67072:function(te){var X=20;te.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:X,SYMBOL_STROKE:X/20,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]}}},84236:function(te,X,e){var A=e(38248),P=e(20472),o=e(72160),L=e(24040),M=e(3400),d=M.isArrayOrTypedArray,g=e(43616),r=e(79811),t=e(33040).formatColor,s=e(43028),a=e(7152),c=e(80088),u=e(67072),l=e(13448).DESELECTDIM,y={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},h=e(10624).appendArrayPointValue;function T(B,_){var z,O={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},F=B._context.plotGlPixelRatio;if(_.visible!==!0)return O;if(s.hasText(_)&&(O.text=f(B,_),O.textSel=m(B,_,_.selected),O.textUnsel=m(B,_,_.unselected)),s.hasMarkers(_)&&(O.marker=n(B,_),O.markerSel=v(B,_,_.selected),O.markerUnsel=v(B,_,_.unselected),!_.unselected&&d(_.marker.opacity))){var N=_.marker.opacity;for(O.markerUnsel.opacity=new Array(N.length),z=0;zu.TOO_MANY_POINTS||s.hasMarkers(_)?"rect":"round";if(q&&_.connectgaps){var Z=N[0],G=N[1];for(V=0;V1?$[V]:$[0]:$,re=d(q)?q.length>1?q[V]:q[0]:q,H=y[G],J=y[re],ae=oe?oe/.8+1:0,K=-J*ae-J*.5;N.offset[V]=[H*ae/Z,K/Z]}}return N}te.exports={style:T,markerStyle:n,markerSelection:v,linePositions:x,errorBarPositions:k,textPosition:I}},80220:function(te,X,e){var A=e(3400),P=e(24040),o=e(80088),L=e(2876),M=e(88200),d=e(43028),g=e(43980),r=e(31147),t=e(74428),s=e(66828),a=e(70840),c=e(124);te.exports=function(l,y,h,T){function f(w,i){return A.coerce(l,y,L,w,i)}var n=l.marker?o.isOpenSymbol(l.marker.symbol):!1,v=d.isBubble(l),m=g(l,y,T,f);if(!m){y.visible=!1;return}r(l,y,T,f),f("xhoverformat"),f("yhoverformat");var b=m100},X.isDotSymbol=function(P){return typeof P=="string"?A.DOT_RE.test(P):P>200}},41272:function(te,X,e){var A=e(24040),P=e(3400),o=e(44928);function L(d,g,r,t){var s=d.cd,a=s[0].t,c=s[0].trace,u=d.xa,l=d.ya,y=a.x,h=a.y,T=u.c2p(g),f=l.c2p(r),n=d.distance,v;if(a.tree){var m=u.p2c(T-n),b=u.p2c(T+n),E=l.p2c(f-n),p=l.p2c(f+n);t==="x"?v=a.tree.range(Math.min(m,b),Math.min(l._rl[0],l._rl[1]),Math.max(m,b),Math.max(l._rl[0],l._rl[1])):v=a.tree.range(Math.min(m,b),Math.min(E,p),Math.max(m,b),Math.max(E,p))}else v=a.ids;var S,w,i,C,x,k,I,B,_,z=n;if(t==="x"){var O=!!c.xperiodalignment,F=!!c.yperiodalignment;for(x=0;x=Math.min(N,V)&&T<=Math.max(N,V)?0:1/0}if(k=Math.min(j,$)&&f<=Math.max(j,$)?0:1/0}_=Math.sqrt(k*k+I*I),w=v[x]}}}else for(x=v.length-1;x>-1;x--)S=v[x],i=y[S],C=h[S],k=u.c2p(i)-T,I=l.c2p(C)-f,B=Math.sqrt(k*k+I*I),Bn.glText.length){var i=S-n.glText.length;for(b=0;bie&&(isNaN(Y[ne])||isNaN(Y[ne+1]));)ne-=2;K.positions=Y.slice(ie,ne+2)}return K}),n.line2d.update(n.lineOptions)),n.error2d){var k=(n.errorXOptions||[]).concat(n.errorYOptions||[]);n.error2d.update(k)}n.scatter2d&&n.scatter2d.update(n.markerOptions),n.fillOrder=M.repeat(null,S),n.fill2d&&(n.fillOptions=n.fillOptions.map(function(K,Y){var ie=T[Y];if(!(!K||!ie||!ie[0]||!ie[0].trace)){var ne=ie[0],le=ne.trace,de=ne.t,we=n.lineOptions[Y],me,Le,ve=[];le._ownfill&&ve.push(Y),le._nexttrace&&ve.push(Y+1),ve.length&&(n.fillOrder[Y]=ve);var Ae=[],ye=we&&we.positions||de.positions,Se,_e;if(le.fill==="tozeroy"){for(Se=0;SeSe&&isNaN(ye[_e+1]);)_e-=2;ye[Se+1]!==0&&(Ae=[ye[Se],0]),Ae=Ae.concat(ye.slice(Se,_e+2)),ye[_e+1]!==0&&(Ae=Ae.concat([ye[_e],0]))}else if(le.fill==="tozerox"){for(Se=0;SeSe&&isNaN(ye[_e]);)_e-=2;ye[Se]!==0&&(Ae=[0,ye[Se+1]]),Ae=Ae.concat(ye.slice(Se,_e+2)),ye[_e]!==0&&(Ae=Ae.concat([0,ye[_e+1]]))}else if(le.fill==="toself"||le.fill==="tonext"){for(Ae=[],me=0,K.splitNull=!0,Le=0;Le-1;for(b=0;b=0?Math.floor((s+180)/360):Math.ceil((s-180)/360),b=m*360,E=s-b;function p(_){var z=_.lonlat;if(z[0]===M||n&&T.indexOf(_.i+1)===-1)return 1/0;var O=P.modHalf(z[0],360),F=z[1],N=h.project([O,F]),V=N.x-l.c2p([E,F]),j=N.y-y.c2p([O,a]),$=Math.max(3,_.mrc||0);return Math.max(Math.sqrt(V*V+j*j)-$,1-3/$)}if(A.getClosest(c,p,t),t.index!==!1){var S=c[t.index],w=S.lonlat,i=[P.modHalf(w[0],360)+b,w[1]],C=l.c2p(i),x=y.c2p(i),k=S.mrc||1;t.x0=C-k,t.x1=C+k,t.y0=x-k,t.y1=x+k;var I={};I[u.subplot]={_subplot:h};var B=u._module.formatLabels(S,u,I);return t.lonLabel=B.lonLabel,t.latLabel=B.latLabel,t.color=o(u,S),t.extraText=r(u,S,c[0].t.labels),t.hovertemplate=u.hovertemplate,[t]}}function r(t,s,a){if(t.hovertemplate)return;var c=s.hi||t.hoverinfo,u=c.split("+"),l=u.indexOf("all")!==-1,y=u.indexOf("lon")!==-1,h=u.indexOf("lat")!==-1,T=s.lonlat,f=[];function n(v){return v+"°"}return l||y&&h?f.push("("+n(T[1])+", "+n(T[0])+")"):y?f.push(a.lon+n(T[0])):h&&f.push(a.lat+n(T[1])),(l||u.indexOf("text")!==-1)&&L(s,t,f),f.join("
")}te.exports={hoverPoints:g,getExtraText:r}},11572:function(te,X,e){te.exports={attributes:e(31512),supplyDefaults:e(15752),colorbar:e(5528),formatLabels:e(11960),calc:e(25212),plot:e(9660),hoverPoints:e(63312).hoverPoints,eventData:e(37920),selectPoints:e(404),styleOnSelect:function(A,P){if(P){var o=P[0].trace;o._glTrace.update(P)}},moduleType:"trace",name:"scattermapbox",basePlotModule:e(33688),categories:["mapbox","gl","symbols","showLegend","scatter-like"],meta:{}}},9660:function(te,X,e){var A=e(3400),P=e(59392),o=e(47552).traceLayerPrefix,L={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function M(g,r,t,s){this.type="scattermapbox",this.subplot=g,this.uid=r,this.clusterEnabled=t,this.isHidden=s,this.sourceIds={fill:"source-"+r+"-fill",line:"source-"+r+"-line",circle:"source-"+r+"-circle",symbol:"source-"+r+"-symbol",cluster:"source-"+r+"-circle",clusterCount:"source-"+r+"-circle"},this.layerIds={fill:o+r+"-fill",line:o+r+"-line",circle:o+r+"-circle",symbol:o+r+"-symbol",cluster:o+r+"-cluster",clusterCount:o+r+"-cluster-count"},this.below=null}var d=M.prototype;d.addSource=function(g,r,t){var s={type:"geojson",data:r.geojson};t&&t.enabled&&A.extendFlat(s,{cluster:!0,clusterMaxZoom:t.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[g]);a?a.setData(r.geojson):this.subplot.map.addSource(this.sourceIds[g],s)},d.setSourceData=function(g,r){this.subplot.map.getSource(this.sourceIds[g]).setData(r.geojson)},d.addLayer=function(g,r,t){var s={type:r.type,id:this.layerIds[g],source:this.sourceIds[g],layout:r.layout,paint:r.paint};r.filter&&(s.filter=r.filter);for(var a=this.layerIds[g],c,u=this.subplot.getMapLayers(),l=0;l=0;C--){var x=i[C];a.removeLayer(h.layerIds[x])}w||a.removeSource(h.sourceIds.circle)}function n(w){for(var i=L.nonCluster,C=0;C=0;C--){var x=i[C];a.removeLayer(h.layerIds[x]),w||a.removeSource(h.sourceIds[x])}}function m(w){y?f(w):v(w)}function b(w){l?T(w):n(w)}function E(){for(var w=l?L.cluster:L.nonCluster,i=0;i=0;s--){var a=t[s];r.removeLayer(this.layerIds[a]),r.removeSource(this.sourceIds[a])}},te.exports=function(r,t){var s=t[0].trace,a=s.cluster&&s.cluster.enabled,c=s.visible!==!0,u=new M(r,s.uid,a,c),l=P(r.gd,t),y=u.below=r.belowLookup["trace-"+s.uid],h,T,f;if(a)for(u.addSource("circle",l.circle,s.cluster),h=0;h")}}te.exports={hoverPoints:P,makeHoverPointText:o}},76924:function(te,X,e){te.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:e(40872),categories:["polar","symbols","showLegend","scatter-like"],attributes:e(8319),supplyDefaults:e(85968).supplyDefaults,colorbar:e(5528),formatLabels:e(22852),calc:e(58320),plot:e(43456),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(8504).hoverPoints,selectPoints:e(91560),meta:{}}},43456:function(te,X,e){var A=e(96504),P=e(39032).BADNUM;te.exports=function(L,M,d){for(var g=M.layers.frontplot.select("g.scatterlayer"),r=M.xaxis,t=M.yaxis,s={xaxis:r,yaxis:t,plot:M.framework,layerClipId:M._hasClipOnAxisFalse?M.clipIds.forTraces:null},a=M.radialAxis,c=M.angularAxis,u=0;u=g&&(E.marker.cluster=n.tree),E.marker&&(E.markerSel.positions=E.markerUnsel.positions=E.marker.positions=i),E.line&&i.length>1&&d.extendFlat(E.line,M.linePositions(s,f,i)),E.text&&(d.extendFlat(E.text,{positions:i},M.textPosition(s,f,E.text,E.marker)),d.extendFlat(E.textSel,{positions:i},M.textPosition(s,f,E.text,E.markerSel)),d.extendFlat(E.textUnsel,{positions:i},M.textPosition(s,f,E.text,E.markerUnsel))),E.fill&&!y.fill2d&&(y.fill2d=!0),E.marker&&!y.scatter2d&&(y.scatter2d=!0),E.line&&!y.line2d&&(y.line2d=!0),E.text&&!y.glText&&(y.glText=!0),y.lineOptions.push(E.line),y.fillOptions.push(E.fill),y.markerOptions.push(E.marker),y.markerSelectedOptions.push(E.markerSel),y.markerUnselectedOptions.push(E.markerUnsel),y.textOptions.push(E.text),y.textSelectedOptions.push(E.textSel),y.textUnselectedOptions.push(E.textUnsel),y.selectBatch.push([]),y.unselectBatch.push([]),n.x=C,n.y=x,n.rawx=C,n.rawy=x,n.r=m,n.theta=b,n.positions=i,n._scene=y,n.index=y.count,y.count++}}),o(s,a,c)}},te.exports.reglPrecompiled=r},69496:function(te,X,e){var A=e(21776).Ks,P=e(21776).Gw,o=e(92880).extendFlat,L=e(98304),M=e(52904),d=e(45464),g=M.line;te.exports={mode:M.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:M.text,texttemplate:P({editType:"plot"},{keys:["real","imag","text"]}),hovertext:M.hovertext,line:{color:g.color,width:g.width,dash:g.dash,backoff:g.backoff,shape:o({},g.shape,{values:["linear","spline"]}),smoothing:g.smoothing,editType:"calc"},connectgaps:M.connectgaps,marker:M.marker,cliponaxis:o({},M.cliponaxis,{dflt:!1}),textposition:M.textposition,textfont:M.textfont,fill:o({},M.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:L(),hoverinfo:o({},d.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:M.hoveron,hovertemplate:A(),selected:M.selected,unselected:M.unselected}},47507:function(te,X,e){var A=e(38248),P=e(39032).BADNUM,o=e(90136),L=e(20148),M=e(4500),d=e(16356).calcMarkerSize;te.exports=function(r,t){for(var s=r._fullLayout,a=t.subplot,c=s[a].realaxis,u=s[a].imaginaryaxis,l=c.makeCalcdata(t,"real"),y=u.makeCalcdata(t,"imag"),h=t._length,T=new Array(h),f=0;f")}}te.exports={hoverPoints:P,makeHoverPointText:o}},95443:function(te,X,e){te.exports={moduleType:"trace",name:"scattersmith",basePlotModule:e(47788),categories:["smith","symbols","showLegend","scatter-like"],attributes:e(69496),supplyDefaults:e(76716),colorbar:e(5528),formatLabels:e(49504),calc:e(47507),plot:e(34927),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(25292).hoverPoints,selectPoints:e(91560),meta:{}}},34927:function(te,X,e){var A=e(96504),P=e(39032).BADNUM,o=e(36416),L=o.smith;te.exports=function(d,g,r){for(var t=g.layers.frontplot.select("g.scatterlayer"),s=g.xaxis,a=g.yaxis,c={xaxis:s,yaxis:a,plot:g.framework,layerClipId:g._hasClipOnAxisFalse?g.clipIds.forTraces:null},u=0;u"),r.hovertemplate=l.hovertemplate,g}},34864:function(te,X,e){te.exports={attributes:e(5896),supplyDefaults:e(84256),colorbar:e(5528),formatLabels:e(90404),calc:e(34335),plot:e(88776),style:e(49224).style,styleOnSelect:e(49224).styleOnSelect,hoverPoints:e(26596),selectPoints:e(91560),eventData:e(97476),moduleType:"trace",name:"scatterternary",basePlotModule:e(19352),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}},88776:function(te,X,e){var A=e(96504);te.exports=function(o,L,M){var d=L.plotContainer;d.select(".scatterlayer").selectAll("*").remove();for(var g=L.xaxis,r=L.yaxis,t={xaxis:g,yaxis:r,plot:d,layerClipId:L._hasClipOnAxisFalse?L.clipIdRelative:null},s=L.layers.frontplot.select("g.scatterlayer"),a=0;as,C;for(i?C=h.sizeAvg||Math.max(h.size,3):C=o(u,y),m=0;mv&&h||n-1,_=L(h)||!!s.selectedpoints||B,z=!0;if(_){var O=s._length;if(s.selectedpoints){c.selectBatch=s.selectedpoints;var F=s.selectedpoints,N={};for(n=0;n1&&(w=r[a-1],C=t[a-1],k=s[a-1]),c=0;cw?"-":"+")+"x"),m=m.replace("y",(i>C?"-":"+")+"y"),m=m.replace("z",(x>k?"-":"+")+"z");var z=function(){a=0,I=[],B=[],_=[]};(!a||a2?h=l.slice(1,y-1):y===2?h=[(l[0]+l[1])/2]:h=l,h}function a(l){var y=l.length;return y===1?[.5,.5]:[l[1]-l[0],l[y-1]-l[y-2]]}function c(l,y){var h=l.fullSceneLayout,T=l.dataScale,f=y._len,n={};function v(oe,Z){var G=h[Z],re=T[g[Z]];return o.simpleMap(oe,function(H){return G.d2l(H)*re})}if(n.vectors=d(v(y._u,"xaxis"),v(y._v,"yaxis"),v(y._w,"zaxis"),f),!f)return{positions:[],cells:[]};var m=v(y._Xs,"xaxis"),b=v(y._Ys,"yaxis"),E=v(y._Zs,"zaxis");n.meshgrid=[m,b,E],n.gridFill=y._gridFill;var p=y._slen;if(p)n.startingPositions=d(v(y._startsX,"xaxis"),v(y._startsY,"yaxis"),v(y._startsZ,"zaxis"));else{for(var S=b[0],w=s(m),i=s(E),C=new Array(w.length*i.length),x=0,k=0;k=0},C,x,k;T?(C=Math.min(h.length,n.length),x=function(H){return w(h[H])&&i(H)},k=function(H){return String(h[H])}):(C=Math.min(f.length,n.length),x=function(H){return w(f[H])&&i(H)},k=function(H){return String(f[H])}),m&&(C=Math.min(C,v.length));for(var I=0;I1){for(var N=o.randstr(),V=0;V=0){M.i=t.i;var c=d.marker;c.pattern?(!c.colors||!c.pattern.shape)&&(c.color=a,M.color=a):(c.color=a,M.color=a),A.pointStyle(L,d,g,M)}else P.fill(L,a)}},45716:function(te,X,e){var A=e(33428),P=e(24040),o=e(10624).appendArrayPointValue,L=e(93024),M=e(3400),d=e(95924),g=e(78176),r=e(69656),t=r.formatPieValue;te.exports=function(c,u,l,y,h){var T=y[0],f=T.trace,n=T.hierarchy,v=f.type==="sunburst",m=f.type==="treemap"||f.type==="icicle";"_hasHoverLabel"in f||(f._hasHoverLabel=!1),"_hasHoverEvent"in f||(f._hasHoverEvent=!1);var b=function(S){var w=l._fullLayout;if(!(l._dragging||w.hovermode===!1)){var i=l._fullData[f.index],C=S.data.data,x=C.i,k=g.isHierarchyRoot(S),I=g.getParent(n,S),B=g.getValue(S),_=function(Y){return M.castOption(i,x,Y)},z=_("hovertemplate"),O=L.castHoverinfo(i,w,x),F=w.separators,N;if(z||O&&O!=="none"&&O!=="skip"){var V,j;v&&(V=T.cx+S.pxmid[0]*(1-S.rInscribed),j=T.cy+S.pxmid[1]*(1-S.rInscribed)),m&&(V=S._hoverX,j=S._hoverY);var $={},q=[],oe=[],Z=function(Y){return q.indexOf(Y)!==-1};O&&(q=O==="all"?i._module.attributes.hoverinfo.flags:O.split("+")),$.label=C.label,Z("label")&&$.label&&oe.push($.label),C.hasOwnProperty("v")&&($.value=C.v,$.valueLabel=t($.value,F),Z("value")&&oe.push($.valueLabel)),$.currentPath=S.currentPath=g.getPath(S.data),Z("current path")&&!k&&oe.push($.currentPath);var G,re=[],H=function(){re.indexOf(G)===-1&&(oe.push(G),re.push(G))};$.percentParent=S.percentParent=B/g.getValue(I),$.parent=S.parentString=g.getPtLabel(I),Z("percent parent")&&(G=g.formatPercent($.percentParent,F)+" of "+$.parent,H()),$.percentEntry=S.percentEntry=B/g.getValue(u),$.entry=S.entry=g.getPtLabel(u),Z("percent entry")&&!k&&!S.onPathbar&&(G=g.formatPercent($.percentEntry,F)+" of "+$.entry,H()),$.percentRoot=S.percentRoot=B/g.getValue(n),$.root=S.root=g.getPtLabel(n),Z("percent root")&&!k&&(G=g.formatPercent($.percentRoot,F)+" of "+$.root,H()),$.text=_("hovertext")||_("text"),Z("text")&&(G=$.text,M.isValidTextValue(G)&&oe.push(G)),N=[s(S,i,h.eventDataKeys)];var J={trace:i,y:j,_x0:S._x0,_x1:S._x1,_y0:S._y0,_y1:S._y1,text:oe.join("
"),name:z||Z("name")?i.name:void 0,color:_("hoverlabel.bgcolor")||C.color,borderColor:_("hoverlabel.bordercolor"),fontFamily:_("hoverlabel.font.family"),fontSize:_("hoverlabel.font.size"),fontColor:_("hoverlabel.font.color"),nameLength:_("hoverlabel.namelength"),textAlign:_("hoverlabel.align"),hovertemplate:z,hovertemplateLabels:$,eventData:N};v&&(J.x0=V-S.rInscribed*S.rpx1,J.x1=V+S.rInscribed*S.rpx1,J.idealAlign=S.pxmid[0]<0?"left":"right"),m&&(J.x=V,J.idealAlign=V<0?"left":"right");var ae=[];L.loneHover(J,{container:w._hoverlayer.node(),outerContainer:w._paper.node(),gd:l,inOut_bbox:ae}),N[0].bbox=ae[0],f._hasHoverLabel=!0}if(m){var K=c.select("path.surface");h.styleOne(K,S,i,l,{hovered:!0})}f._hasHoverEvent=!0,l.emit("plotly_hover",{points:N||[s(S,i,h.eventDataKeys)],event:A.event})}},E=function(S){var w=l._fullLayout,i=l._fullData[f.index],C=A.select(this).datum();if(f._hasHoverEvent&&(S.originalEvent=A.event,l.emit("plotly_unhover",{points:[s(C,i,h.eventDataKeys)],event:A.event}),f._hasHoverEvent=!1),f._hasHoverLabel&&(L.loneUnhover(w._hoverlayer.node()),f._hasHoverLabel=!1),m){var x=c.select("path.surface");h.styleOne(x,C,i,l,{hovered:!1})}},p=function(S){var w=l._fullLayout,i=l._fullData[f.index],C=v&&(g.isHierarchyRoot(S)||g.isLeaf(S)),x=g.getPtId(S),k=g.isEntry(S)?g.findEntryWithChild(n,x):g.findEntryWithLevel(n,x),I=g.getPtId(k),B={points:[s(S,i,h.eventDataKeys)],event:A.event};C||(B.nextLevel=I);var _=d.triggerHandler(l,"plotly_"+f.type+"click",B);if(_!==!1&&w.hovermode&&(l._hoverdata=[s(S,i,h.eventDataKeys)],L.click(l,A.event)),!C&&_!==!1&&!l._dragging&&!l._transitioning){P.call("_storeDirectGUIEdit",i,w._tracePreGUI[i.uid],{level:i.level});var z={data:[{level:I}],traces:[f.index]},O={frame:{redraw:!1,duration:h.transitionTime},transition:{duration:h.transitionTime,easing:h.transitionEasing},mode:"immediate",fromcurrent:!0};L.loneUnhover(w._hoverlayer.node()),P.call("animate",l,z,O)}};c.on("mouseover",b),c.on("mouseout",E),c.on("click",p)};function s(a,c,u){for(var l=a.data.data,y={curveNumber:c.index,pointNumber:l.i,data:c._input,fullData:c},h=0;h0)},X.getMaxDepth=function(r){return r.maxdepth>=0?r.maxdepth:1/0},X.isHeader=function(r,t){return!(X.isLeaf(r)||r.depth===t._maxDepth-1)};function g(r){return r.data.data.pid}X.getParent=function(r,t){return X.findEntryWithLevel(r,g(t))},X.listPath=function(r,t){var s=r.parent;if(!s)return[];var a=t?[s.data[t]]:[s];return X.listPath(s,t).concat(a)},X.getPath=function(r){return X.listPath(r,"label").join("/")+"/"},X.formatValue=L.formatPieValue,X.formatPercent=function(r,t){var s=A.formatPercent(r,0);return s==="0%"&&(s=L.formatPiePercent(r,t)),s}},5621:function(te,X,e){te.exports={moduleType:"trace",name:"sunburst",basePlotModule:e(54904),categories:[],animatable:!0,attributes:e(424),layoutAttributes:e(84920),supplyDefaults:e(25244),supplyLayoutDefaults:e(28732),calc:e(3776).calc,crossTraceCalc:e(3776).crossTraceCalc,plot:e(96488).plot,style:e(85676).style,colorbar:e(5528),meta:{}}},84920:function(te){te.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}},28732:function(te,X,e){var A=e(3400),P=e(84920);te.exports=function(L,M){function d(g,r){return A.coerce(L,M,P,g,r)}d("sunburstcolorway",M.colorway),d("extendsunburstcolors")}},96488:function(te,X,e){var A=e(33428),P=e(74148),o=e(67756).qy,L=e(43616),M=e(3400),d=e(72736),g=e(82744),r=g.recordMinTextSize,t=g.clearMinTextSize,s=e(37820),a=e(69656).getRotationAngle,c=s.computeTransform,u=s.transformInsideText,l=e(85676).styleOne,y=e(60100).resizeText,h=e(45716),T=e(27328),f=e(78176);X.plot=function(p,S,w,i){var C=p._fullLayout,x=C._sunburstlayer,k,I,B=!w,_=!C.uniformtext.mode&&f.hasTransition(w);if(t("sunburst",C),k=x.selectAll("g.trace.sunburst").data(S,function(O){return O[0].trace.uid}),k.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),k.order(),_){i&&(I=i());var z=A.transition().duration(w.duration).ease(w.easing).each("end",function(){I&&I()}).each("interrupt",function(){I&&I()});z.each(function(){x.selectAll("g.trace").each(function(O){n(p,O,this,w)})})}else k.each(function(O){n(p,O,this,w)}),C.uniformtext.mode&&y(p,C._sunburstlayer.selectAll(".trace"),"sunburst");B&&k.exit().remove()};function n(p,S,w,i){var C=p._context.staticPlot,x=p._fullLayout,k=!x.uniformtext.mode&&f.hasTransition(i),I=A.select(w),B=I.selectAll("g.slice"),_=S[0],z=_.trace,O=_.hierarchy,F=f.findEntryWithLevel(O,z.level),N=f.getMaxDepth(z),V=x._size,j=z.domain,$=V.w*(j.x[1]-j.x[0]),q=V.h*(j.y[1]-j.y[0]),oe=.5*Math.min($,q),Z=_.cx=V.l+V.w*(j.x[1]+j.x[0])/2,G=_.cy=V.t+V.h*(1-j.y[0])-q/2;if(!F)return B.remove();var re=null,H={};k&&B.each(function(Ne){H[f.getPtId(Ne)]={rpx0:Ne.rpx0,rpx1:Ne.rpx1,x0:Ne.x0,x1:Ne.x1,transform:Ne.transform},!re&&f.isEntry(Ne)&&(re=Ne)});var J=v(F).descendants(),ae=F.height+1,K=0,Y=N;_.hasMultipleRoots&&f.isHierarchyRoot(F)&&(J=J.slice(1),ae-=1,K=1,Y+=1),J=J.filter(function(Ne){return Ne.y1<=Y});var ie=a(z.rotation);ie&&J.forEach(function(Ne){Ne.x0+=ie,Ne.x1+=ie});var ne=Math.min(ae,N),le=function(Ne){return(Ne-K)/ne*oe},de=function(Ne,et){return[Ne*Math.cos(et),-Ne*Math.sin(et)]},we=function(Ne){return M.pathAnnulus(Ne.rpx0,Ne.rpx1,Ne.x0,Ne.x1,Z,G)},me=function(Ne){return Z+b(Ne)[0]*(Ne.transform.rCenter||0)+(Ne.transform.x||0)},Le=function(Ne){return G+b(Ne)[1]*(Ne.transform.rCenter||0)+(Ne.transform.y||0)};B=B.data(J,f.getPtId),B.enter().append("g").classed("slice",!0),k?B.exit().transition().each(function(){var Ne=A.select(this),et=Ne.select("path.surface");et.transition().attrTween("d",function(Ze){var Ke=Se(Ze);return function(nt){return we(Ke(nt))}});var st=Ne.select("g.slicetext");st.attr("opacity",0)}).remove():B.exit().remove(),B.order();var ve=null;if(k&&re){var Ae=f.getPtId(re);B.each(function(Ne){ve===null&&f.getPtId(Ne)===Ae&&(ve=Ne.x1)})}var ye=B;k&&(ye=ye.transition().each("end",function(){var Ne=A.select(this);f.setSliceCursor(Ne,p,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),ye.each(function(Ne){var et=A.select(this),st=M.ensureSingle(et,"path","surface",function(vt){vt.style("pointer-events",C?"none":"all")});Ne.rpx0=le(Ne.y0),Ne.rpx1=le(Ne.y1),Ne.xmid=(Ne.x0+Ne.x1)/2,Ne.pxmid=de(Ne.rpx1,Ne.xmid),Ne.midangle=-(Ne.xmid-Math.PI/2),Ne.startangle=-(Ne.x0-Math.PI/2),Ne.stopangle=-(Ne.x1-Math.PI/2),Ne.halfangle=.5*Math.min(M.angleDelta(Ne.x0,Ne.x1)||Math.PI,Math.PI),Ne.ring=1-Ne.rpx0/Ne.rpx1,Ne.rInscribed=m(Ne),k?st.transition().attrTween("d",function(vt){var xt=_e(vt);return function(Je){return we(xt(Je))}}):st.attr("d",we),et.call(h,F,p,S,{eventDataKeys:T.eventDataKeys,transitionTime:T.CLICK_TRANSITION_TIME,transitionEasing:T.CLICK_TRANSITION_EASING}).call(f.setSliceCursor,p,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:p._transitioning}),st.call(l,Ne,z,p);var Ze=M.ensureSingle(et,"g","slicetext"),Ke=M.ensureSingle(Ze,"text","",function(vt){vt.attr("data-notex",1)}),nt=M.ensureUniformFontSize(p,f.determineTextFont(z,Ne,x.font));Ke.text(X.formatSliceLabel(Ne,F,z,S,x)).classed("slicetext",!0).attr("text-anchor","middle").call(L.font,nt).call(d.convertToTspans,p);var it=L.bBox(Ke.node());Ne.transform=u(it,Ne,_),Ne.transform.targetX=me(Ne),Ne.transform.targetY=Le(Ne);var lt=function(vt,xt){var Je=vt.transform;return c(Je,xt),Je.fontSize=nt.size,r(z.type,Je,x),M.getTextTransform(Je)};k?Ke.transition().attrTween("transform",function(vt){var xt=ze(vt);return function(Je){return lt(xt(Je),it)}}):Ke.attr("transform",lt(Ne,it))});function Se(Ne){var et=f.getPtId(Ne),st=H[et],Ze=H[f.getPtId(F)],Ke;if(Ze){var nt=(Ne.x1>Ze.x1?2*Math.PI:0)+ie;Ke=Ne.rpx1ve?2*Math.PI:0)+ie;st={x0:Ke,x1:Ke}}else st={rpx0:oe,rpx1:oe},M.extendFlat(st,Ie(Ne));else st={rpx0:0,rpx1:0};else st={x0:ie,x1:ie};return o(st,Ze)}function ze(Ne){var et=H[f.getPtId(Ne)],st,Ze=Ne.transform;if(et)st=et;else if(st={rpx1:Ne.rpx1,transform:{textPosAngle:Ze.textPosAngle,scale:0,rotate:Ze.rotate,rCenter:Ze.rCenter,x:Ze.x,y:Ze.y}},re)if(Ne.parent)if(ve){var Ke=Ne.x1>ve?2*Math.PI:0;st.x0=st.x1=Ke}else M.extendFlat(st,Ie(Ne));else st.x0=st.x1=ie;else st.x0=st.x1=ie;var nt=o(st.transform.textPosAngle,Ne.transform.textPosAngle),it=o(st.rpx1,Ne.rpx1),lt=o(st.x0,Ne.x0),vt=o(st.x1,Ne.x1),xt=o(st.transform.scale,Ze.scale),Je=o(st.transform.rotate,Ze.rotate),Pe=Ze.rCenter===0?3:st.transform.rCenter===0?1/3:1,Ue=o(st.transform.rCenter,Ze.rCenter),He=function(Oe){return Ue(Math.pow(Oe,Pe))};return function(Oe){var Ce=it(Oe),ge=lt(Oe),pe=vt(Oe),Te=He(Oe),be=de(Ce,(ge+pe)/2),ke=nt(Oe),Ve={pxmid:be,rpx1:Ce,transform:{textPosAngle:ke,rCenter:Te,x:Ze.x,y:Ze.y}};return r(z.type,Ze,x),{transform:{targetX:me(Ve),targetY:Le(Ve),scale:xt(Oe),rotate:Je(Oe),rCenter:Te}}}}function Ie(Ne){var et=Ne.parent,st=H[f.getPtId(et)],Ze={};if(st){var Ke=et.children,nt=Ke.indexOf(Ne),it=Ke.length,lt=o(st.x0,st.x1);Ze.x0=lt(nt/it),Ze.x1=lt(nt/it)}else Ze.x0=Ze.x1=0;return Ze}}function v(p){return P.partition().size([2*Math.PI,p.height+1])(p)}X.formatSliceLabel=function(p,S,w,i,C){var x=w.texttemplate,k=w.textinfo;if(!x&&(!k||k==="none"))return"";var I=C.separators,B=i[0],_=p.data.data,z=B.hierarchy,O=f.isHierarchyRoot(p),F=f.getParent(z,p),N=f.getValue(p);if(!x){var V=k.split("+"),j=function(K){return V.indexOf(K)!==-1},$=[],q;if(j("label")&&_.label&&$.push(_.label),_.hasOwnProperty("v")&&j("value")&&$.push(f.formatValue(_.v,I)),!O){j("current path")&&$.push(f.getPath(p.data));var oe=0;j("percent parent")&&oe++,j("percent entry")&&oe++,j("percent root")&&oe++;var Z=oe>1;if(oe){var G,re=function(K){q=f.formatPercent(G,I),Z&&(q+=" of "+K),$.push(q)};j("percent parent")&&!O&&(G=N/f.getValue(F),re("parent")),j("percent entry")&&(G=N/f.getValue(S),re("entry")),j("percent root")&&(G=N/f.getValue(z),re("root"))}}return j("text")&&(q=M.castOption(w,_.i,"text"),M.isValidTextValue(q)&&$.push(q)),$.join("
")}var H=M.castOption(w,_.i,"texttemplate");if(!H)return"";var J={};_.label&&(J.label=_.label),_.hasOwnProperty("v")&&(J.value=_.v,J.valueLabel=f.formatValue(_.v,I)),J.currentPath=f.getPath(p.data),O||(J.percentParent=N/f.getValue(F),J.percentParentLabel=f.formatPercent(J.percentParent,I),J.parent=f.getPtLabel(F)),J.percentEntry=N/f.getValue(S),J.percentEntryLabel=f.formatPercent(J.percentEntry,I),J.entry=f.getPtLabel(S),J.percentRoot=N/f.getValue(z),J.percentRootLabel=f.formatPercent(J.percentRoot,I),J.root=f.getPtLabel(z),_.hasOwnProperty("color")&&(J.color=_.color);var ae=M.castOption(w,_.i,"text");return(M.isValidTextValue(ae)||ae==="")&&(J.text=ae),J.customdata=M.castOption(w,_.i,"customdata"),M.texttemplateString(H,J,C._d3locale,J,w._meta||{})};function m(p){return p.rpx0===0&&M.isFullCircle([p.x0,p.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(p.halfangle)),p.ring/2))}function b(p){return E(p.rpx1,p.transform.textPosAngle)}function E(p,S){return[p*Math.sin(S),-p*Math.cos(S)]}},85676:function(te,X,e){var A=e(33428),P=e(76308),o=e(3400),L=e(82744).resizeText,M=e(60404);function d(r){var t=r._fullLayout._sunburstlayer.selectAll(".trace");L(r,t,"sunburst"),t.each(function(s){var a=A.select(this),c=s[0],u=c.trace;a.style("opacity",u.opacity),a.selectAll("path.surface").each(function(l){A.select(this).call(g,l,u,r)})})}function g(r,t,s,a){var c=t.data.data,u=!t.children,l=c.i,y=o.castOption(s,l,"marker.line.color")||P.defaultLine,h=o.castOption(s,l,"marker.line.width")||0;r.call(M,t,s,a).style("stroke-width",h).call(P.stroke,y).style("opacity",u?s.leaf.opacity:null)}te.exports={style:d,styleOne:g}},16716:function(te,X,e){var A=e(76308),P=e(49084),o=e(29736).axisHoverFormat,L=e(21776).Ks,M=e(45464),d=e(92880).extendFlat,g=e(67824).overrideAll;function r(a){return{valType:"boolean",dflt:!1}}function t(a){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:r(),y:r(),z:r()},color:{valType:"color",dflt:A.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:A.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var s=te.exports=g(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:L(),xhoverformat:o("x"),yhoverformat:o("y"),zhoverformat:o("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},P("",{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({},P.zauto,{}),zmin:d({},P.zmin,{}),zmax:d({},P.zmax,{})},hoverinfo:d({},M.hoverinfo),showlegend:d({},M.showlegend,{dflt:!1})}),"calc","nested");s.x.editType=s.y.editType=s.z.editType="calc+clearAxisTypes",s.transforms=void 0},56576:function(te,X,e){var A=e(47128);te.exports=function(o,L){L.surfacecolor?A(o,L,{vals:L.surfacecolor,containerStr:"",cLetter:"c"}):A(o,L,{vals:L.z,containerStr:"",cLetter:"c"})}},79164:function(te,X,e){var A=e(67792).gl_surface3d,P=e(67792).ndarray,o=e(67792).ndarray_linear_interpolate.d2,L=e(70448),M=e(11240),d=e(3400).isArrayOrTypedArray,g=e(33040).parseColorScale,r=e(43080),t=e(8932).extractOpts;function s(i,C,x){this.scene=i,this.uid=x,this.surface=C,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 a=s.prototype;a.getXat=function(i,C,x,k){var I=d(this.data.x)?d(this.data.x[0])?this.data.x[C][i]:this.data.x[i]:i;return x===void 0?I:k.d2l(I,0,x)},a.getYat=function(i,C,x,k){var I=d(this.data.y)?d(this.data.y[0])?this.data.y[C][i]:this.data.y[C]:C;return x===void 0?I:k.d2l(I,0,x)},a.getZat=function(i,C,x,k){var I=this.data.z[C][i];return I===null&&this.data.connectgaps&&this.data._interpolatedZ&&(I=this.data._interpolatedZ[C][i]),x===void 0?I:k.d2l(I,0,x)},a.handlePick=function(i){if(i.object===this.surface){var C=(i.data.index[0]-1)/this.dataScaleX-1,x=(i.data.index[1]-1)/this.dataScaleY-1,k=Math.max(Math.min(Math.round(C),this.data.z[0].length-1),0),I=Math.max(Math.min(Math.round(x),this.data._ylength-1),0);i.index=[k,I],i.traceCoordinate=[this.getXat(k,I),this.getYat(k,I),this.getZat(k,I)],i.dataCoordinate=[this.getXat(k,I,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(k,I,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(k,I,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var B=0;B<3;B++){var _=i.dataCoordinate[B];_!=null&&(i.dataCoordinate[B]*=this.scene.dataScale[B])}var z=this.data.hovertext||this.data.text;return d(z)&&z[I]&&z[I][k]!==void 0?i.textLabel=z[I][k]:z?i.textLabel=z:i.textLabel="",i.data.dataCoordinate=i.dataCoordinate.slice(),this.surface.highlight(i.data),this.scene.glplot.spikes.position=i.dataCoordinate,!0}};function c(i){var C=i[0].rgb,x=i[i.length-1].rgb;return C[0]===x[0]&&C[1]===x[1]&&C[2]===x[2]&&C[3]===x[3]}var u=[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 l(i,C){if(i0){x=u[k];break}return x}function T(i,C){if(!(i<1||C<1)){for(var x=y(i),k=y(C),I=1,B=0;Bm;)k--,k/=h(k),k++,k1?I:1};function b(i,C,x){var k=x[8]+x[2]*C[0]+x[5]*C[1];return i[0]=(x[6]+x[0]*C[0]+x[3]*C[1])/k,i[1]=(x[7]+x[1]*C[0]+x[4]*C[1])/k,i}function E(i,C,x){return p(i,C,b,x),i}function p(i,C,x,k){for(var I=[0,0],B=i.shape[0],_=i.shape[1],z=0;z0&&this.contourStart[k]!==null&&this.contourEnd[k]!==null&&this.contourEnd[k]>this.contourStart[k]))for(C[k]=!0,I=this.contourStart[k];Ij&&(this.minValues[F]=j),this.maxValues[F]",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"}}},55992:function(te,X,e){var A=e(23536),P=e(92880).extendFlat,o=e(38248),L=e(38116).isTypedArray,M=e(38116).isArrayOrTypedArray;te.exports=function(y,h){var T=r(h.cells.values),f=function(j){return j.slice(h.header.values.length,j.length)},n=r(h.header.values);n.length&&!n[0].length&&(n[0]=[""],n=r(n));var v=n.concat(f(T).map(function(){return t((n[0]||[""]).length)})),m=h.domain,b=Math.floor(y._fullLayout._size.w*(m.x[1]-m.x[0])),E=Math.floor(y._fullLayout._size.h*(m.y[1]-m.y[0])),p=h.header.values.length?v[0].map(function(){return h.header.height}):[A.emptyHeaderHeight],S=T.length?T[0].map(function(){return h.cells.height}):[],w=p.reduce(g,0),i=E-w,C=i+A.uplift,x=c(S,C),k=c(p,w),I=a(k,[]),B=a(x,I),_={},z=h._fullInput.columnorder;M(z)&&(z=Array.from(z)),z=z.concat(f(T.map(function(j,$){return $})));var O=v.map(function(j,$){var q=M(h.columnwidth)?h.columnwidth[Math.min($,h.columnwidth.length-1)]:h.columnwidth;return o(q)?Number(q):1}),F=O.reduce(g,0);O=O.map(function(j){return j/F*b});var N=Math.max(d(h.header.line.width),d(h.cells.line.width)),V={key:h.uid+y._context.staticPlot,translateX:m.x[0]*y._fullLayout._size.w,translateY:y._fullLayout._size.h*(1-m.y[1]),size:y._fullLayout._size,width:b,maxLineWidth:N,height:E,columnOrder:z,groupHeight:E,rowBlocks:B,headerRowBlocks:I,scrollY:0,cells:P({},h.cells,{values:T}),headerCells:P({},h.header,{values:v}),gdColumns:v.map(function(j){return j[0]}),gdColumnsOriginalOrder:v.map(function(j){return j[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:v.map(function(j,$){var q=_[j];_[j]=(q||0)+1;var oe=j+"__"+_[j];return{key:oe,label:j,specIndex:$,xIndex:z[$],xScale:s,x:void 0,calcdata:void 0,columnWidth:O[$]}})};return V.columns.forEach(function(j){j.calcdata=V,j.x=s(j)}),V};function d(l){if(M(l)){for(var y=0,h=0;h=y||E===l.length-1)&&(h[f]=v,v.key=b++,v.firstRowIndex=m,v.lastRowIndex=E,v=u(),f+=n,m=E+1,n=0);return h}function u(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}},53056:function(te,X,e){var A=e(92880).extendFlat;X.splitToPanels=function(o){var L=[0,0],M=A({},o,{key:"header",type:"header",page:0,prevPages:L,currentRepaint:[null,null],dragHandle:!0,values:o.calcdata.headerCells.values[o.specIndex],rowBlocks:o.calcdata.headerRowBlocks,calcdata:A({},o.calcdata,{cells:o.calcdata.headerCells})}),d=A({},o,{key:"cells1",type:"cells",page:0,prevPages:L,currentRepaint:[null,null],dragHandle:!1,values:o.calcdata.cells.values[o.specIndex],rowBlocks:o.calcdata.rowBlocks}),g=A({},o,{key:"cells2",type:"cells",page:1,prevPages:L,currentRepaint:[null,null],dragHandle:!1,values:o.calcdata.cells.values[o.specIndex],rowBlocks:o.calcdata.rowBlocks});return[d,g,M]},X.splitToCells=function(o){var L=P(o);return(o.values||[]).slice(L[0],L[1]).map(function(M,d){var g=typeof M=="string"&&M.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:d+g,key:L[0]+d,column:o,calcdata:o.calcdata,page:o.page,rowBlocks:o.rowBlocks,value:M}})};function P(o){var L=o.rowBlocks[o.page],M=L?L.rows[0].rowIndex:0,d=L?M+L.rows.length:0;return[M,d]}},53212:function(te,X,e){var A=e(3400),P=e(60520),o=e(86968).Q;function L(M,d){for(var g=M.columnorder||[],r=M.header.values.length,t=g.slice(0,r),s=t.slice().sort(function(u,l){return u-l}),a=t.map(function(u){return s.indexOf(u)}),c=a.length;c/i),ye=!ve||Ae;de.mayHaveMarkup=ve&&Le.match(/[<&>]/);var Se=x(Le);de.latex=Se;var _e=Se?"":B(de.calcdata.cells.prefix,we,me)||"",ze=Se?"":B(de.calcdata.cells.suffix,we,me)||"",Ie=Se?null:B(de.calcdata.cells.format,we,me)||null,Ne=_e+(Ie?L(Ie)(de.value):de.value)+ze,et;de.wrappingNeeded=!de.wrapped&&!ye&&!Se&&(et=k(Ne)),de.cellHeightMayIncrease=Ae||Se||de.mayHaveMarkup||(et===void 0?k(Ne):et),de.needsConvertToTspans=de.mayHaveMarkup||de.wrappingNeeded||de.latex;var st;if(de.wrappingNeeded){var Ze=A.wrapSplitCharacter===" "?Ne.replace(/de&&le.push(we),de+=ve}return le}function V(Y,ie,ne){var le=T(ie)[0];if(le!==void 0){var de=le.rowBlocks,we=le.calcdata,me=re(de,de.length),Le=le.calcdata.groupHeight-F(le),ve=we.scrollY=Math.max(0,Math.min(me-Le,we.scrollY)),Ae=N(de,ve,Le);Ae.length===1&&(Ae[0]===de.length-1?Ae.unshift(Ae[0]-1):Ae.push(Ae[0]+1)),Ae[0]%2&&Ae.reverse(),ie.each(function(ye,Se){ye.page=Ae[Se],ye.scrollY=ve}),ie.attr("transform",function(ye){var Se=re(ye.rowBlocks,ye.page)-ye.scrollY;return t(0,Se)}),Y&&($(Y,ne,ie,Ae,le.prevPages,le,0),$(Y,ne,ie,Ae,le.prevPages,le,1),f(ne,Y))}}function j(Y,ie,ne,le){return function(we){var me=we.calcdata?we.calcdata:we,Le=ie.filter(function(Se){return me.key===Se.key}),ve=ne||me.scrollbarState.dragMultiplier,Ae=me.scrollY;me.scrollY=le===void 0?me.scrollY+ve*P.event.dy:le;var ye=Le.selectAll("."+A.cn.yColumn).selectAll("."+A.cn.columnBlock).filter(z);return V(Y,ye,Le),me.scrollY===Ae}}function $(Y,ie,ne,le,de,we,me){var Le=le[me]!==de[me];Le&&(clearTimeout(we.currentRepaint[me]),we.currentRepaint[me]=setTimeout(function(){var ve=ne.filter(function(Ae,ye){return ye===me&&le[ye]!==de[ye]});n(Y,ie,ve,ne),de[me]=le[me]}))}function q(Y,ie,ne,le){return function(){var we=P.select(ie.parentNode);we.each(function(me){var Le=me.fragments;we.selectAll("tspan.line").each(function(Ne,et){Le[et].width=this.getComputedTextLength()});var ve=Le[Le.length-1].width,Ae=Le.slice(0,-1),ye=[],Se,_e,ze=0,Ie=me.column.columnWidth-2*A.cellPad;for(me.value="";Ae.length;)Se=Ae.shift(),_e=Se.width+ve,ze+_e>Ie&&(me.value+=ye.join(A.wrapSpacer)+A.lineBreaker,ye=[],ze=0),ye.push(Se.text),ze+=_e;ze&&(me.value+=ye.join(A.wrapSpacer)),me.wrapped=!0}),we.selectAll("tspan.line").remove(),C(we.select("."+A.cn.cellText),ne,Y,le),P.select(ie.parentNode.parentNode).call(G)}}function oe(Y,ie,ne,le,de){return function(){if(!de.settledY){var me=P.select(ie.parentNode),Le=ae(de),ve=de.key-Le.firstRowIndex,Ae=Le.rows[ve].rowHeight,ye=de.cellHeightMayIncrease?ie.parentNode.getBoundingClientRect().height+2*A.cellPad:Ae,Se=Math.max(ye,Ae),_e=Se-Le.rows[ve].rowHeight;_e&&(Le.rows[ve].rowHeight=Se,Y.selectAll("."+A.cn.columnCell).call(G),V(null,Y.filter(z),0),f(ne,le,!0)),me.attr("transform",function(){var ze=this,Ie=ze.parentNode,Ne=Ie.getBoundingClientRect(),et=P.select(ze.parentNode).select("."+A.cn.cellRect).node().getBoundingClientRect(),st=ze.transform.baseVal.consolidate(),Ze=et.top-Ne.top+(st?st.matrix.f:A.cellPad);return t(Z(de,P.select(ze.parentNode).select("."+A.cn.cellTextHolder).node().getBoundingClientRect().width),Ze)}),de.settledY=!0}}}function Z(Y,ie){switch(Y.align){case"left":return A.cellPad;case"right":return Y.column.columnWidth-(ie||0)-A.cellPad;case"center":return(Y.column.columnWidth-(ie||0))/2;default:return A.cellPad}}function G(Y){Y.attr("transform",function(ie){var ne=ie.rowBlocks[0].auxiliaryBlocks.reduce(function(me,Le){return me+H(Le,1/0)},0),le=ae(ie),de=H(le,ie.key),we=de+ne;return t(0,we)}).selectAll("."+A.cn.cellRect).attr("height",function(ie){return K(ae(ie),ie.key).rowHeight})}function re(Y,ie){for(var ne=0,le=ie-1;le>=0;le--)ne+=J(Y[le]);return ne}function H(Y,ie){for(var ne=0,le=0;le","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:r({},M.textfont,{}),editType:"calc"},text:M.text,textinfo:d.textinfo,texttemplate:P({editType:"plot"},{keys:g.eventDataKeys.concat(["label","value"])}),hovertext:M.hovertext,hoverinfo:d.hoverinfo,hovertemplate:A({},{keys:g.eventDataKeys}),textfont:M.textfont,insidetextfont:M.insidetextfont,outsidetextfont:r({},M.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:M.sort,root:d.root,domain:L({name:"treemap",trace:!0,editType:"calc"})}},79516:function(te,X,e){var A=e(7316);X.name="treemap",X.plot=function(P,o,L,M){A.plotBasePlot(X.name,P,o,L,M)},X.clean=function(P,o,L,M){A.cleanBasePlot(X.name,P,o,L,M)}},97840:function(te,X,e){var A=e(3776);X.r=function(P,o){return A.calc(P,o)},X.q=function(P){return A._runCrossTraceCalc("treemap",P)}},32984:function(te){te.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}},34092:function(te,X,e){var A=e(3400),P=e(40516),o=e(76308),L=e(86968).Q,M=e(31508).handleText,d=e(78048).TEXTPAD,g=e(74174).handleMarkerDefaults,r=e(8932),t=r.hasColorscale,s=r.handleDefaults;te.exports=function(c,u,l,y){function h(i,C){return A.coerce(c,u,P,i,C)}var T=h("labels"),f=h("parents");if(!T||!T.length||!f||!f.length){u.visible=!1;return}var n=h("values");n&&n.length?h("branchvalues"):h("count"),h("level"),h("maxdepth");var v=h("tiling.packing");v==="squarify"&&h("tiling.squarifyratio"),h("tiling.flip"),h("tiling.pad");var m=h("text");h("texttemplate"),u.texttemplate||h("textinfo",A.isArrayOrTypedArray(m)?"text+label":"label"),h("hovertext"),h("hovertemplate");var b=h("pathbar.visible"),E="auto";M(c,u,y,h,E,{hasPathbar:b,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),h("textposition");var p=u.textposition.indexOf("bottom")!==-1;g(c,u,y,h);var S=u._hasColorscale=t(c,"marker","colors")||(c.marker||{}).coloraxis;S?s(c,u,y,h,{prefix:"marker.",cLetter:"c"}):h("marker.depthfade",!(u.marker.colors||[]).length);var w=u.textfont.size*2;h("marker.pad.t",p?w/4:w),h("marker.pad.l",w/4),h("marker.pad.r",w/4),h("marker.pad.b",p?w:w/4),h("marker.cornerradius"),u._hovered={marker:{line:{width:2,color:o.contrast(y.paper_bgcolor)}}},b&&(h("pathbar.thickness",u.pathbar.textfont.size+2*d),h("pathbar.side"),h("pathbar.edgeshape")),h("sort"),h("root.color"),L(u,y,h),u._length=null}},95808:function(te,X,e){var A=e(33428),P=e(78176),o=e(82744),L=o.clearMinTextSize,M=e(60100).resizeText,d=e(52960);te.exports=function(r,t,s,a,c){var u=c.type,l=c.drawDescendants,y=r._fullLayout,h=y["_"+u+"layer"],T,f,n=!s;if(L(u,y),T=h.selectAll("g.trace."+u).data(t,function(m){return m[0].trace.uid}),T.enter().append("g").classed("trace",!0).classed(u,!0),T.order(),!y.uniformtext.mode&&P.hasTransition(s)){a&&(f=a());var v=A.transition().duration(s.duration).ease(s.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});v.each(function(){h.selectAll("g.trace").each(function(m){d(r,m,this,s,l)})})}else T.each(function(m){d(r,m,this,s,l)}),y.uniformtext.mode&&M(r,h.selectAll(".trace"),u);n&&T.exit().remove()}},27336:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(72736),M=e(13832),d=e(66192).styleOne,g=e(32984),r=e(78176),t=e(45716),s=!0;te.exports=function(c,u,l,y,h){var T=h.barDifY,f=h.width,n=h.height,v=h.viewX,m=h.viewY,b=h.pathSlice,E=h.toMoveInsideSlice,p=h.strTransform,S=h.hasTransition,w=h.handleSlicesExit,i=h.makeUpdateSliceInterpolator,C=h.makeUpdateTextInterpolator,x={},k=c._context.staticPlot,I=c._fullLayout,B=u[0],_=B.trace,z=B.hierarchy,O=f/_._entryDepth,F=r.listPath(l.data,"id"),N=M(z.copy(),[f,n],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();N=N.filter(function(j){var $=F.indexOf(j.data.id);return $===-1?!1:(j.x0=O*$,j.x1=O*($+1),j.y0=T,j.y1=T+n,j.onPathbar=!0,!0)}),N.reverse(),y=y.data(N,r.getPtId),y.enter().append("g").classed("pathbar",!0),w(y,s,x,[f,n],b),y.order();var V=y;S&&(V=V.transition().each("end",function(){var j=A.select(this);r.setSliceCursor(j,c,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),V.each(function(j){j._x0=v(j.x0),j._x1=v(j.x1),j._y0=m(j.y0),j._y1=m(j.y1),j._hoverX=v(j.x1-Math.min(f,n)/2),j._hoverY=m(j.y1-n/2);var $=A.select(this),q=P.ensureSingle($,"path","surface",function(re){re.style("pointer-events",k?"none":"all")});S?q.transition().attrTween("d",function(re){var H=i(re,s,x,[f,n]);return function(J){return b(H(J))}}):q.attr("d",b),$.call(t,l,c,u,{styleOne:d,eventDataKeys:g.eventDataKeys,transitionTime:g.CLICK_TRANSITION_TIME,transitionEasing:g.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,c,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:c._transitioning}),q.call(d,j,_,c,{hovered:!1}),j._text=(r.getPtLabel(j)||"").split("
").join(" ")||"";var oe=P.ensureSingle($,"g","slicetext"),Z=P.ensureSingle(oe,"text","",function(re){re.attr("data-notex",1)}),G=P.ensureUniformFontSize(c,r.determineTextFont(_,j,I.font,{onPathbar:!0}));Z.text(j._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(o.font,G).call(L.convertToTspans,c),j.textBB=o.bBox(Z.node()),j.transform=E(j,{fontSize:G.size,onPathbar:!0}),j.transform.fontSize=G.size,S?Z.transition().attrTween("transform",function(re){var H=C(re,s,x,[f,n]);return function(J){return p(H(J))}}):Z.attr("transform",p(j))})}},76477:function(te,X,e){var A=e(33428),P=e(3400),o=e(43616),L=e(72736),M=e(13832),d=e(66192).styleOne,g=e(32984),r=e(78176),t=e(45716),s=e(96488).formatSliceLabel,a=!1;te.exports=function(u,l,y,h,T){var f=T.width,n=T.height,v=T.viewX,m=T.viewY,b=T.pathSlice,E=T.toMoveInsideSlice,p=T.strTransform,S=T.hasTransition,w=T.handleSlicesExit,i=T.makeUpdateSliceInterpolator,C=T.makeUpdateTextInterpolator,x=T.prevEntry,k={},I=u._context.staticPlot,B=u._fullLayout,_=l[0],z=_.trace,O=z.textposition.indexOf("left")!==-1,F=z.textposition.indexOf("right")!==-1,N=z.textposition.indexOf("bottom")!==-1,V=!N&&!z.marker.pad.t||N&&!z.marker.pad.b,j=M(y,[f,n],{packing:z.tiling.packing,squarifyratio:z.tiling.squarifyratio,flipX:z.tiling.flip.indexOf("x")>-1,flipY:z.tiling.flip.indexOf("y")>-1,pad:{inner:z.tiling.pad,top:z.marker.pad.t,left:z.marker.pad.l,right:z.marker.pad.r,bottom:z.marker.pad.b}}),$=j.descendants(),q=1/0,oe=-1/0;$.forEach(function(J){var ae=J.depth;ae>=z._maxDepth?(J.x0=J.x1=(J.x0+J.x1)/2,J.y0=J.y1=(J.y0+J.y1)/2):(q=Math.min(q,ae),oe=Math.max(oe,ae))}),h=h.data($,r.getPtId),z._maxVisibleLayers=isFinite(oe)?oe-q+1:0,h.enter().append("g").classed("slice",!0),w(h,a,k,[f,n],b),h.order();var Z=null;if(S&&x){var G=r.getPtId(x);h.each(function(J){Z===null&&r.getPtId(J)===G&&(Z={x0:J.x0,x1:J.x1,y0:J.y0,y1:J.y1})})}var re=function(){return Z||{x0:0,x1:f,y0:0,y1:n}},H=h;return S&&(H=H.transition().each("end",function(){var J=A.select(this);r.setSliceCursor(J,u,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),H.each(function(J){var ae=r.isHeader(J,z);J._x0=v(J.x0),J._x1=v(J.x1),J._y0=m(J.y0),J._y1=m(J.y1),J._hoverX=v(J.x1-z.marker.pad.r),J._hoverY=m(N?J.y1-z.marker.pad.b/2:J.y0+z.marker.pad.t/2);var K=A.select(this),Y=P.ensureSingle(K,"path","surface",function(me){me.style("pointer-events",I?"none":"all")});S?Y.transition().attrTween("d",function(me){var Le=i(me,a,re(),[f,n]);return function(ve){return b(Le(ve))}}):Y.attr("d",b),K.call(t,y,u,l,{styleOne:d,eventDataKeys:g.eventDataKeys,transitionTime:g.CLICK_TRANSITION_TIME,transitionEasing:g.CLICK_TRANSITION_EASING}).call(r.setSliceCursor,u,{isTransitioning:u._transitioning}),Y.call(d,J,z,u,{hovered:!1}),J.x0===J.x1||J.y0===J.y1?J._text="":ae?J._text=V?"":r.getPtLabel(J)||"":J._text=s(J,y,z,l,B)||"";var ie=P.ensureSingle(K,"g","slicetext"),ne=P.ensureSingle(ie,"text","",function(me){me.attr("data-notex",1)}),le=P.ensureUniformFontSize(u,r.determineTextFont(z,J,B.font)),de=J._text||" ",we=ae&&de.indexOf("
")===-1;ne.text(de).classed("slicetext",!0).attr("text-anchor",F?"end":O||we?"start":"middle").call(o.font,le).call(L.convertToTspans,u),J.textBB=o.bBox(ne.node()),J.transform=E(J,{fontSize:le.size,isHeader:ae}),J.transform.fontSize=le.size,S?ne.transition().attrTween("transform",function(me){var Le=C(me,a,re(),[f,n]);return function(ve){return p(Le(ve))}}):ne.attr("transform",p(J))}),Z}},83024:function(te){te.exports=function X(e,A,P){var o;P.swapXY&&(o=e.x0,e.x0=e.y0,e.y0=o,o=e.x1,e.x1=e.y1,e.y1=o),P.flipX&&(o=e.x0,e.x0=A[0]-e.x1,e.x1=A[0]-o),P.flipY&&(o=e.y0,e.y0=A[1]-e.y1,e.y1=A[1]-o);var L=e.children;if(L)for(var M=0;M-1?F+j:-(V+j):0,q={x0:N,x1:N,y0:$,y1:$+V},oe=function(Pe,Ue,He){var Oe=m.tiling.pad,Ce=function(be){return be-Oe<=Ue.x0},ge=function(be){return be+Oe>=Ue.x1},pe=function(be){return be-Oe<=Ue.y0},Te=function(be){return be+Oe>=Ue.y1};return Pe.x0===Ue.x0&&Pe.x1===Ue.x1&&Pe.y0===Ue.y0&&Pe.y1===Ue.y1?{x0:Pe.x0,x1:Pe.x1,y0:Pe.y0,y1:Pe.y1}:{x0:Ce(Pe.x0-Oe)?0:ge(Pe.x0-Oe)?He[0]:Pe.x0,x1:Ce(Pe.x1+Oe)?0:ge(Pe.x1+Oe)?He[0]:Pe.x1,y0:pe(Pe.y0-Oe)?0:Te(Pe.y0-Oe)?He[1]:Pe.y0,y1:pe(Pe.y1+Oe)?0:Te(Pe.y1+Oe)?He[1]:Pe.y1}},Z=null,G={},re={},H=null,J=function(Pe,Ue){return Ue?G[c(Pe)]:re[c(Pe)]},ae=function(Pe,Ue,He,Oe){if(Ue)return G[c(p)]||q;var Ce=re[m.level]||He;return B(Pe)?oe(Pe,Ce,Oe):{}};v.hasMultipleRoots&&x&&I++,m._maxDepth=I,m._backgroundColor=n.paper_bgcolor,m._entryDepth=S.data.depth,m._atRootLevel=x;var K=-O/2+_.l+_.w*(z.x[1]+z.x[0])/2,Y=-F/2+_.t+_.h*(1-(z.y[1]+z.y[0])/2),ie=function(Pe){return K+Pe},ne=function(Pe){return Y+Pe},le=ne(0),de=ie(0),we=function(Pe){return de+Pe},me=function(Pe){return le+Pe};function Le(Pe,Ue){return Pe+","+Ue}var ve=we(0),Ae=function(Pe){Pe.x=Math.max(ve,Pe.x)},ye=m.pathbar.edgeshape,Se=function(Pe){var Ue=we(Math.max(Math.min(Pe.x0,Pe.x0),0)),He=we(Math.min(Math.max(Pe.x1,Pe.x1),N)),Oe=me(Pe.y0),Ce=me(Pe.y1),ge=V/2,pe={},Te={};pe.x=Ue,Te.x=He,pe.y=Te.y=(Oe+Ce)/2;var be={x:Ue,y:Oe},ke={x:He,y:Oe},Ve={x:He,y:Ce},je={x:Ue,y:Ce};return ye===">"?(be.x-=ge,ke.x-=ge,Ve.x-=ge,je.x-=ge):ye==="/"?(Ve.x-=ge,je.x-=ge,pe.x-=ge/2,Te.x-=ge/2):ye==="\\"?(be.x-=ge,ke.x-=ge,pe.x-=ge/2,Te.x-=ge/2):ye==="<"&&(pe.x-=ge,Te.x-=ge),Ae(be),Ae(je),Ae(pe),Ae(ke),Ae(Ve),Ae(Te),"M"+Le(be.x,be.y)+"L"+Le(ke.x,ke.y)+"L"+Le(Te.x,Te.y)+"L"+Le(Ve.x,Ve.y)+"L"+Le(je.x,je.y)+"L"+Le(pe.x,pe.y)+"Z"},_e=m[E?"tiling":"marker"].pad,ze=function(Pe){return m.textposition.indexOf(Pe)!==-1},Ie=ze("top"),Ne=ze("left"),et=ze("right"),st=ze("bottom"),Ze=function(Pe){var Ue=ie(Pe.x0),He=ie(Pe.x1),Oe=ne(Pe.y0),Ce=ne(Pe.y1),ge=He-Ue,pe=Ce-Oe;if(!ge||!pe)return"";var Te=m.marker.cornerradius||0,be=Math.min(Te,ge/2,pe/2);be&&Pe.data&&Pe.data.data&&Pe.data.data.label&&(Ie&&(be=Math.min(be,_e.t)),Ne&&(be=Math.min(be,_e.l)),et&&(be=Math.min(be,_e.r)),st&&(be=Math.min(be,_e.b)));var ke=function(Ve,je){return be?"a"+Le(be,be)+" 0 0 1 "+Le(Ve,je):""};return"M"+Le(Ue,Oe+be)+ke(be,-be)+"L"+Le(He-be,Oe)+ke(be,be)+"L"+Le(He,Ce-be)+ke(-be,be)+"L"+Le(Ue+be,Ce)+ke(-be,-be)+"Z"},Ke=function(Pe,Ue){var He=Pe.x0,Oe=Pe.x1,Ce=Pe.y0,ge=Pe.y1,pe=Pe.textBB,Te=Ie||Ue.isHeader&&!st,be=Te?"start":st?"end":"middle",ke=ze("right"),Ve=ze("left")||Ue.onPathbar,je=Ve?-1:ke?1:0;if(Ue.isHeader){if(He+=(E?_e:_e.l)-M,Oe-=(E?_e:_e.r)-M,He>=Oe){var at=(He+Oe)/2;He=at,Oe=at}var ut;st?(ut=ge-(E?_e:_e.b),Ce0)for(var w=0;w0){var b=g.xa,E=g.ya,p,S,w,i,C;l.orientation==="h"?(C=r,p="y",w=E,S="x",i=b):(C=t,p="x",w=b,S="y",i=E);var x=u[g.index];if(C>=x.span[0]&&C<=x.span[1]){var k=P.extendFlat({},g),I=i.c2p(C,!0),B=M.getKdeValue(x,l,C),_=M.getPositionOnKdePath(x,l,I),z=w._offset,O=w._length;k[p+"0"]=_[0],k[p+"1"]=_[1],k[S+"0"]=k[S+"1"]=I,k[S+"Label"]=S+": "+o.hoverLabelText(i,C,l[S+"hoverformat"])+", "+u[0].t.labels.kde+" "+B.toFixed(3);for(var F=0,N=0;N")),u.color=d(y,m),[u]};function d(g,r){var t=g[r.dir].marker,s=t.color,a=t.line.color,c=t.line.width;if(P(s))return s;if(P(a)&&c)return a}},95952:function(te,X,e){te.exports={attributes:e(65776),layoutAttributes:e(91352),supplyDefaults:e(24224).supplyDefaults,crossTraceDefaults:e(24224).crossTraceDefaults,supplyLayoutDefaults:e(59464),calc:e(73540),crossTraceCalc:e(50152),plot:e(64488),style:e(12252).style,hoverPoints:e(94196),eventData:e(53256),selectPoints:e(45784),moduleType:"trace",name:"waterfall",basePlotModule:e(57952),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}},91352:function(te){te.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"}}},59464:function(te,X,e){var A=e(3400),P=e(91352);te.exports=function(o,L,M){var d=!1;function g(s,a){return A.coerce(o,L,P,s,a)}for(var r=0;r0&&(n?C+="M"+w[0]+","+i[1]+"V"+i[0]:C+="M"+w[1]+","+i[0]+"H"+w[0]),v!=="between"&&(E.isSum||p path").each(function(h){if(!h.isBlank){var T=y[h.dir].marker;A.select(this).call(o.fill,T.color).call(o.stroke,T.line.color).call(P.dashLine,T.line.dash,T.line.width).style("opacity",y.selectedpoints&&!h.selected?L:1)}}),g(l,y,t),l.selectAll(".lines").each(function(){var h=y.connector.line;P.lineGroupStyle(A.select(this).selectAll("path"),h.width,h.color,h.dash)})})}te.exports={style:r}},84224:function(te,X,e){var A=e(54460),P=e(3400),o=e(73060),L=e(60468).W,M=e(39032).BADNUM;X.moduleType="transform",X.name="aggregate";var d=X.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"},g=d.aggregations;X.supplyDefaults=function(u,l){var y={},h;function T(x,k){return P.coerce(u,y,d,x,k)}var f=T("enabled");if(!f)return y;var n=o.findArrayAttributes(l),v={};for(h=0;hm&&(m=S,b=p)}}return m?T(b):M};case"rms":return function(f,n){for(var v=0,m=0,b=0;b":return function(v){return f(v)>n};case">=":return function(v){return f(v)>=n};case"[]":return function(v){var m=f(v);return m>=n[0]&&m<=n[1]};case"()":return function(v){var m=f(v);return m>n[0]&&m=n[0]&&mn[0]&&m<=n[1]};case"][":return function(v){var m=f(v);return m<=n[0]||m>=n[1]};case")(":return function(v){var m=f(v);return mn[1]};case"](":return function(v){var m=f(v);return m<=n[0]||m>n[1]};case")[":return function(v){var m=f(v);return m=n[1]};case"{}":return function(v){return n.indexOf(f(v))!==-1};case"}{":return function(v){return n.indexOf(f(v))===-1}}}},32028:function(te,X,e){var A=e(3400),P=e(73060),o=e(7316),L=e(60468).W;X.moduleType="transform",X.name="groupby",X.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"},X.supplyDefaults=function(d,g,r){var t,s={};function a(T,f){return A.coerce(d,s,X.attributes,T,f)}var c=a("enabled");if(!c)return s;a("groups"),a("nameformat",r._dataLength>1?"%{group} (%{trace})":"%{group}");var u=d.styles,l=s.styles=[];if(u)for(t=0;t * @license MIT */function t(ge,pe){if(!(ge instanceof pe))throw new TypeError("Cannot call a class as a function")}function s(ge,pe){for(var Te=0;Te"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function f(ge){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Te){return Te.__proto__||Object.getPrototypeOf(Te)},f(ge)}function n(ge){"@babel/helpers - typeof";return n=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(pe){return typeof pe}:function(pe){return pe&&typeof Symbol=="function"&&pe.constructor===Symbol&&pe!==Symbol.prototype?"symbol":typeof pe},n(ge)}var v=r(3910),m=r(3187),b=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;g.lW=w,g.h2=50;var E=2147483647;w.TYPED_ARRAY_SUPPORT=p(),!w.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function p(){try{var ge=new Uint8Array(1),pe={foo:function(){return 42}};return Object.setPrototypeOf(pe,Uint8Array.prototype),Object.setPrototypeOf(ge,pe),ge.foo()===42}catch{return!1}}Object.defineProperty(w.prototype,"parent",{enumerable:!0,get:function(){if(w.isBuffer(this))return this.buffer}}),Object.defineProperty(w.prototype,"offset",{enumerable:!0,get:function(){if(w.isBuffer(this))return this.byteOffset}});function S(ge){if(ge>E)throw new RangeError('The value "'+ge+'" is invalid for option "size"');var pe=new Uint8Array(ge);return Object.setPrototypeOf(pe,w.prototype),pe}function w(ge,pe,Te){if(typeof ge=="number"){if(typeof pe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return k(ge)}return i(ge,pe,Te)}w.poolSize=8192;function i(ge,pe,Te){if(typeof ge=="string")return I(ge,pe);if(ArrayBuffer.isView(ge))return _(ge);if(ge==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(ge));if(Pe(ge,ArrayBuffer)||ge&&Pe(ge.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(Pe(ge,SharedArrayBuffer)||ge&&Pe(ge.buffer,SharedArrayBuffer)))return z(ge,pe,Te);if(typeof ge=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var be=ge.valueOf&&ge.valueOf();if(be!=null&&be!==ge)return w.from(be,pe,Te);var ke=O(ge);if(ke)return ke;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof ge[Symbol.toPrimitive]=="function")return w.from(ge[Symbol.toPrimitive]("string"),pe,Te);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+n(ge))}w.from=function(ge,pe,Te){return i(ge,pe,Te)},Object.setPrototypeOf(w.prototype,Uint8Array.prototype),Object.setPrototypeOf(w,Uint8Array);function C(ge){if(typeof ge!="number")throw new TypeError('"size" argument must be of type number');if(ge<0)throw new RangeError('The value "'+ge+'" is invalid for option "size"')}function x(ge,pe,Te){return C(ge),ge<=0?S(ge):pe!==void 0?typeof Te=="string"?S(ge).fill(pe,Te):S(ge).fill(pe):S(ge)}w.alloc=function(ge,pe,Te){return x(ge,pe,Te)};function k(ge){return C(ge),S(ge<0?0:F(ge)|0)}w.allocUnsafe=function(ge){return k(ge)},w.allocUnsafeSlow=function(ge){return k(ge)};function I(ge,pe){if((typeof pe!="string"||pe==="")&&(pe="utf8"),!w.isEncoding(pe))throw new TypeError("Unknown encoding: "+pe);var Te=N(ge,pe)|0,be=S(Te),ke=be.write(ge,pe);return ke!==Te&&(be=be.slice(0,ke)),be}function B(ge){for(var pe=ge.length<0?0:F(ge.length)|0,Te=S(pe),be=0;be=E)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+E.toString(16)+" bytes");return ge|0}w.isBuffer=function(pe){return pe!=null&&pe._isBuffer===!0&&pe!==w.prototype},w.compare=function(pe,Te){if(Pe(pe,Uint8Array)&&(pe=w.from(pe,pe.offset,pe.byteLength)),Pe(Te,Uint8Array)&&(Te=w.from(Te,Te.offset,Te.byteLength)),!w.isBuffer(pe)||!w.isBuffer(Te))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(pe===Te)return 0;for(var be=pe.length,ke=Te.length,Ve=0,je=Math.min(be,ke);Veke.length?(w.isBuffer(je)||(je=w.from(je)),je.copy(ke,Ve)):Uint8Array.prototype.set.call(ke,je,Ve);else if(w.isBuffer(je))je.copy(ke,Ve);else throw new TypeError('"list" argument must be an Array of Buffers');Ve+=je.length}return ke};function N(ge,pe){if(w.isBuffer(ge))return ge.length;if(ArrayBuffer.isView(ge)||Pe(ge,ArrayBuffer))return ge.byteLength;if(typeof ge!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+n(ge));var Te=ge.length,be=arguments.length>2&&arguments[2]===!0;if(!be&&Te===0)return 0;for(var ke=!1;;)switch(pe){case"ascii":case"latin1":case"binary":return Te;case"utf8":case"utf-8":return it(ge).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Te*2;case"hex":return Te>>>1;case"base64":return xt(ge).length;default:if(ke)return be?-1:it(ge).length;pe=(""+pe).toLowerCase(),ke=!0}}w.byteLength=N;function V(ge,pe,Te){var be=!1;if((pe===void 0||pe<0)&&(pe=0),pe>this.length||((Te===void 0||Te>this.length)&&(Te=this.length),Te<=0)||(Te>>>=0,pe>>>=0,Te<=pe))return"";for(ge||(ge="utf8");;)switch(ge){case"hex":return le(this,pe,Te);case"utf8":case"utf-8":return ae(this,pe,Te);case"ascii":return ie(this,pe,Te);case"latin1":case"binary":return ne(this,pe,Te);case"base64":return J(this,pe,Te);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return de(this,pe,Te);default:if(be)throw new TypeError("Unknown encoding: "+ge);ge=(ge+"").toLowerCase(),be=!0}}w.prototype._isBuffer=!0;function j(ge,pe,Te){var be=ge[pe];ge[pe]=ge[Te],ge[Te]=be}w.prototype.swap16=function(){var pe=this.length;if(pe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Te=0;TeTe&&(pe+=" ... "),""},b&&(w.prototype[b]=w.prototype.inspect),w.prototype.compare=function(pe,Te,be,ke,Ve){if(Pe(pe,Uint8Array)&&(pe=w.from(pe,pe.offset,pe.byteLength)),!w.isBuffer(pe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+n(pe));if(Te===void 0&&(Te=0),be===void 0&&(be=pe?pe.length:0),ke===void 0&&(ke=0),Ve===void 0&&(Ve=this.length),Te<0||be>pe.length||ke<0||Ve>this.length)throw new RangeError("out of range index");if(ke>=Ve&&Te>=be)return 0;if(ke>=Ve)return-1;if(Te>=be)return 1;if(Te>>>=0,be>>>=0,ke>>>=0,Ve>>>=0,this===pe)return 0;for(var je=Ve-ke,at=be-Te,ut=Math.min(je,at),Nt=this.slice(ke,Ve),Vt=pe.slice(Te,be),gt=0;gt2147483647?Te=2147483647:Te<-2147483648&&(Te=-2147483648),Te=+Te,Ue(Te)&&(Te=ke?0:ge.length-1),Te<0&&(Te=ge.length+Te),Te>=ge.length){if(ke)return-1;Te=ge.length-1}else if(Te<0)if(ke)Te=0;else return-1;if(typeof pe=="string"&&(pe=w.from(pe,be)),w.isBuffer(pe))return pe.length===0?-1:q(ge,pe,Te,be,ke);if(typeof pe=="number")return pe=pe&255,typeof Uint8Array.prototype.indexOf=="function"?ke?Uint8Array.prototype.indexOf.call(ge,pe,Te):Uint8Array.prototype.lastIndexOf.call(ge,pe,Te):q(ge,[pe],Te,be,ke);throw new TypeError("val must be string, number or Buffer")}function q(ge,pe,Te,be,ke){var Ve=1,je=ge.length,at=pe.length;if(be!==void 0&&(be=String(be).toLowerCase(),be==="ucs2"||be==="ucs-2"||be==="utf16le"||be==="utf-16le")){if(ge.length<2||pe.length<2)return-1;Ve=2,je/=2,at/=2,Te/=2}function ut(Yt,gr){return Ve===1?Yt[gr]:Yt.readUInt16BE(gr*Ve)}var Nt;if(ke){var Vt=-1;for(Nt=Te;Ntje&&(Te=je-at),Nt=Te;Nt>=0;Nt--){for(var gt=!0,Ct=0;Ctke&&(be=ke)):be=ke;var Ve=pe.length;be>Ve/2&&(be=Ve/2);var je;for(je=0;je>>0,isFinite(be)?(be=be>>>0,ke===void 0&&(ke="utf8")):(ke=be,be=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ve=this.length-Te;if((be===void 0||be>Ve)&&(be=Ve),pe.length>0&&(be<0||Te<0)||Te>this.length)throw new RangeError("Attempt to write outside buffer bounds");ke||(ke="utf8");for(var je=!1;;)switch(ke){case"hex":return oe(this,pe,Te,be);case"utf8":case"utf-8":return Z(this,pe,Te,be);case"ascii":case"latin1":case"binary":return G(this,pe,Te,be);case"base64":return re(this,pe,Te,be);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return H(this,pe,Te,be);default:if(je)throw new TypeError("Unknown encoding: "+ke);ke=(""+ke).toLowerCase(),je=!0}},w.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(ge,pe,Te){return pe===0&&Te===ge.length?v.fromByteArray(ge):v.fromByteArray(ge.slice(pe,Te))}function ae(ge,pe,Te){Te=Math.min(ge.length,Te);for(var be=[],ke=pe;ke239?4:Ve>223?3:Ve>191?2:1;if(ke+at<=Te){var ut=void 0,Nt=void 0,Vt=void 0,gt=void 0;switch(at){case 1:Ve<128&&(je=Ve);break;case 2:ut=ge[ke+1],(ut&192)===128&&(gt=(Ve&31)<<6|ut&63,gt>127&&(je=gt));break;case 3:ut=ge[ke+1],Nt=ge[ke+2],(ut&192)===128&&(Nt&192)===128&&(gt=(Ve&15)<<12|(ut&63)<<6|Nt&63,gt>2047&&(gt<55296||gt>57343)&&(je=gt));break;case 4:ut=ge[ke+1],Nt=ge[ke+2],Vt=ge[ke+3],(ut&192)===128&&(Nt&192)===128&&(Vt&192)===128&&(gt=(Ve&15)<<18|(ut&63)<<12|(Nt&63)<<6|Vt&63,gt>65535&><1114112&&(je=gt))}}je===null?(je=65533,at=1):je>65535&&(je-=65536,be.push(je>>>10&1023|55296),je=56320|je&1023),be.push(je),ke+=at}return Y(be)}var K=4096;function Y(ge){var pe=ge.length;if(pe<=K)return String.fromCharCode.apply(String,ge);for(var Te="",be=0;bebe)&&(Te=be);for(var ke="",Ve=pe;Vebe&&(pe=be),Te<0?(Te+=be,Te<0&&(Te=0)):Te>be&&(Te=be),TeTe)throw new RangeError("Trying to access beyond buffer length")}w.prototype.readUintLE=w.prototype.readUIntLE=function(pe,Te,be){pe=pe>>>0,Te=Te>>>0,be||we(pe,Te,this.length);for(var ke=this[pe],Ve=1,je=0;++je>>0,Te=Te>>>0,be||we(pe,Te,this.length);for(var ke=this[pe+--Te],Ve=1;Te>0&&(Ve*=256);)ke+=this[pe+--Te]*Ve;return ke},w.prototype.readUint8=w.prototype.readUInt8=function(pe,Te){return pe=pe>>>0,Te||we(pe,1,this.length),this[pe]},w.prototype.readUint16LE=w.prototype.readUInt16LE=function(pe,Te){return pe=pe>>>0,Te||we(pe,2,this.length),this[pe]|this[pe+1]<<8},w.prototype.readUint16BE=w.prototype.readUInt16BE=function(pe,Te){return pe=pe>>>0,Te||we(pe,2,this.length),this[pe]<<8|this[pe+1]},w.prototype.readUint32LE=w.prototype.readUInt32LE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),(this[pe]|this[pe+1]<<8|this[pe+2]<<16)+this[pe+3]*16777216},w.prototype.readUint32BE=w.prototype.readUInt32BE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),this[pe]*16777216+(this[pe+1]<<16|this[pe+2]<<8|this[pe+3])},w.prototype.readBigUInt64LE=Oe(function(pe){pe=pe>>>0,st(pe,"offset");var Te=this[pe],be=this[pe+7];(Te===void 0||be===void 0)&&Ze(pe,this.length-8);var ke=Te+this[++pe]*Math.pow(2,8)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,24),Ve=this[++pe]+this[++pe]*Math.pow(2,8)+this[++pe]*Math.pow(2,16)+be*Math.pow(2,24);return BigInt(ke)+(BigInt(Ve)<>>0,st(pe,"offset");var Te=this[pe],be=this[pe+7];(Te===void 0||be===void 0)&&Ze(pe,this.length-8);var ke=Te*Math.pow(2,24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+this[++pe],Ve=this[++pe]*Math.pow(2,24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+be;return(BigInt(ke)<>>0,Te=Te>>>0,be||we(pe,Te,this.length);for(var ke=this[pe],Ve=1,je=0;++je=Ve&&(ke-=Math.pow(2,8*Te)),ke},w.prototype.readIntBE=function(pe,Te,be){pe=pe>>>0,Te=Te>>>0,be||we(pe,Te,this.length);for(var ke=Te,Ve=1,je=this[pe+--ke];ke>0&&(Ve*=256);)je+=this[pe+--ke]*Ve;return Ve*=128,je>=Ve&&(je-=Math.pow(2,8*Te)),je},w.prototype.readInt8=function(pe,Te){return pe=pe>>>0,Te||we(pe,1,this.length),this[pe]&128?(255-this[pe]+1)*-1:this[pe]},w.prototype.readInt16LE=function(pe,Te){pe=pe>>>0,Te||we(pe,2,this.length);var be=this[pe]|this[pe+1]<<8;return be&32768?be|4294901760:be},w.prototype.readInt16BE=function(pe,Te){pe=pe>>>0,Te||we(pe,2,this.length);var be=this[pe+1]|this[pe]<<8;return be&32768?be|4294901760:be},w.prototype.readInt32LE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),this[pe]|this[pe+1]<<8|this[pe+2]<<16|this[pe+3]<<24},w.prototype.readInt32BE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),this[pe]<<24|this[pe+1]<<16|this[pe+2]<<8|this[pe+3]},w.prototype.readBigInt64LE=Oe(function(pe){pe=pe>>>0,st(pe,"offset");var Te=this[pe],be=this[pe+7];(Te===void 0||be===void 0)&&Ze(pe,this.length-8);var ke=this[pe+4]+this[pe+5]*Math.pow(2,8)+this[pe+6]*Math.pow(2,16)+(be<<24);return(BigInt(ke)<>>0,st(pe,"offset");var Te=this[pe],be=this[pe+7];(Te===void 0||be===void 0)&&Ze(pe,this.length-8);var ke=(Te<<24)+this[++pe]*Math.pow(2,16)+this[++pe]*Math.pow(2,8)+this[++pe];return(BigInt(ke)<>>0,Te||we(pe,4,this.length),m.read(this,pe,!0,23,4)},w.prototype.readFloatBE=function(pe,Te){return pe=pe>>>0,Te||we(pe,4,this.length),m.read(this,pe,!1,23,4)},w.prototype.readDoubleLE=function(pe,Te){return pe=pe>>>0,Te||we(pe,8,this.length),m.read(this,pe,!0,52,8)},w.prototype.readDoubleBE=function(pe,Te){return pe=pe>>>0,Te||we(pe,8,this.length),m.read(this,pe,!1,52,8)};function me(ge,pe,Te,be,ke,Ve){if(!w.isBuffer(ge))throw new TypeError('"buffer" argument must be a Buffer instance');if(pe>ke||pege.length)throw new RangeError("Index out of range")}w.prototype.writeUintLE=w.prototype.writeUIntLE=function(pe,Te,be,ke){if(pe=+pe,Te=Te>>>0,be=be>>>0,!ke){var Ve=Math.pow(2,8*be)-1;me(this,pe,Te,be,Ve,0)}var je=1,at=0;for(this[Te]=pe&255;++at>>0,be=be>>>0,!ke){var Ve=Math.pow(2,8*be)-1;me(this,pe,Te,be,Ve,0)}var je=be-1,at=1;for(this[Te+je]=pe&255;--je>=0&&(at*=256);)this[Te+je]=pe/at&255;return Te+be},w.prototype.writeUint8=w.prototype.writeUInt8=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,1,255,0),this[Te]=pe&255,Te+1},w.prototype.writeUint16LE=w.prototype.writeUInt16LE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,2,65535,0),this[Te]=pe&255,this[Te+1]=pe>>>8,Te+2},w.prototype.writeUint16BE=w.prototype.writeUInt16BE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,2,65535,0),this[Te]=pe>>>8,this[Te+1]=pe&255,Te+2},w.prototype.writeUint32LE=w.prototype.writeUInt32LE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,4,4294967295,0),this[Te+3]=pe>>>24,this[Te+2]=pe>>>16,this[Te+1]=pe>>>8,this[Te]=pe&255,Te+4},w.prototype.writeUint32BE=w.prototype.writeUInt32BE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,4,4294967295,0),this[Te]=pe>>>24,this[Te+1]=pe>>>16,this[Te+2]=pe>>>8,this[Te+3]=pe&255,Te+4};function Le(ge,pe,Te,be,ke){et(pe,be,ke,ge,Te,7);var Ve=Number(pe&BigInt(4294967295));ge[Te++]=Ve,Ve=Ve>>8,ge[Te++]=Ve,Ve=Ve>>8,ge[Te++]=Ve,Ve=Ve>>8,ge[Te++]=Ve;var je=Number(pe>>BigInt(32)&BigInt(4294967295));return ge[Te++]=je,je=je>>8,ge[Te++]=je,je=je>>8,ge[Te++]=je,je=je>>8,ge[Te++]=je,Te}function ve(ge,pe,Te,be,ke){et(pe,be,ke,ge,Te,7);var Ve=Number(pe&BigInt(4294967295));ge[Te+7]=Ve,Ve=Ve>>8,ge[Te+6]=Ve,Ve=Ve>>8,ge[Te+5]=Ve,Ve=Ve>>8,ge[Te+4]=Ve;var je=Number(pe>>BigInt(32)&BigInt(4294967295));return ge[Te+3]=je,je=je>>8,ge[Te+2]=je,je=je>>8,ge[Te+1]=je,je=je>>8,ge[Te]=je,Te+8}w.prototype.writeBigUInt64LE=Oe(function(pe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Le(this,pe,Te,BigInt(0),BigInt("0xffffffffffffffff"))}),w.prototype.writeBigUInt64BE=Oe(function(pe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ve(this,pe,Te,BigInt(0),BigInt("0xffffffffffffffff"))}),w.prototype.writeIntLE=function(pe,Te,be,ke){if(pe=+pe,Te=Te>>>0,!ke){var Ve=Math.pow(2,8*be-1);me(this,pe,Te,be,Ve-1,-Ve)}var je=0,at=1,ut=0;for(this[Te]=pe&255;++je>0)-ut&255;return Te+be},w.prototype.writeIntBE=function(pe,Te,be,ke){if(pe=+pe,Te=Te>>>0,!ke){var Ve=Math.pow(2,8*be-1);me(this,pe,Te,be,Ve-1,-Ve)}var je=be-1,at=1,ut=0;for(this[Te+je]=pe&255;--je>=0&&(at*=256);)pe<0&&ut===0&&this[Te+je+1]!==0&&(ut=1),this[Te+je]=(pe/at>>0)-ut&255;return Te+be},w.prototype.writeInt8=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,1,127,-128),pe<0&&(pe=255+pe+1),this[Te]=pe&255,Te+1},w.prototype.writeInt16LE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,2,32767,-32768),this[Te]=pe&255,this[Te+1]=pe>>>8,Te+2},w.prototype.writeInt16BE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,2,32767,-32768),this[Te]=pe>>>8,this[Te+1]=pe&255,Te+2},w.prototype.writeInt32LE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,4,2147483647,-2147483648),this[Te]=pe&255,this[Te+1]=pe>>>8,this[Te+2]=pe>>>16,this[Te+3]=pe>>>24,Te+4},w.prototype.writeInt32BE=function(pe,Te,be){return pe=+pe,Te=Te>>>0,be||me(this,pe,Te,4,2147483647,-2147483648),pe<0&&(pe=4294967295+pe+1),this[Te]=pe>>>24,this[Te+1]=pe>>>16,this[Te+2]=pe>>>8,this[Te+3]=pe&255,Te+4},w.prototype.writeBigInt64LE=Oe(function(pe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return Le(this,pe,Te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),w.prototype.writeBigInt64BE=Oe(function(pe){var Te=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ve(this,pe,Te,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function Ae(ge,pe,Te,be,ke,Ve){if(Te+be>ge.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("Index out of range")}function ye(ge,pe,Te,be,ke){return pe=+pe,Te=Te>>>0,ke||Ae(ge,pe,Te,4),m.write(ge,pe,Te,be,23,4),Te+4}w.prototype.writeFloatLE=function(pe,Te,be){return ye(this,pe,Te,!0,be)},w.prototype.writeFloatBE=function(pe,Te,be){return ye(this,pe,Te,!1,be)};function Se(ge,pe,Te,be,ke){return pe=+pe,Te=Te>>>0,ke||Ae(ge,pe,Te,8),m.write(ge,pe,Te,be,52,8),Te+8}w.prototype.writeDoubleLE=function(pe,Te,be){return Se(this,pe,Te,!0,be)},w.prototype.writeDoubleBE=function(pe,Te,be){return Se(this,pe,Te,!1,be)},w.prototype.copy=function(pe,Te,be,ke){if(!w.isBuffer(pe))throw new TypeError("argument should be a Buffer");if(be||(be=0),!ke&&ke!==0&&(ke=this.length),Te>=pe.length&&(Te=pe.length),Te||(Te=0),ke>0&&ke=this.length)throw new RangeError("Index out of range");if(ke<0)throw new RangeError("sourceEnd out of bounds");ke>this.length&&(ke=this.length),pe.length-Te>>0,be=be===void 0?this.length:be>>>0,pe||(pe=0);var je;if(typeof pe=="number")for(je=Te;jeMath.pow(2,32)?ke=Ie(String(Te)):typeof Te=="bigint"&&(ke=String(Te),(Te>Math.pow(BigInt(2),BigInt(32))||Te<-Math.pow(BigInt(2),BigInt(32)))&&(ke=Ie(ke)),ke+="n"),be+=" It must be ".concat(pe,". Received ").concat(ke),be},RangeError);function Ie(ge){for(var pe="",Te=ge.length,be=ge[0]==="-"?1:0;Te>=be+4;Te-=3)pe="_".concat(ge.slice(Te-3,Te)).concat(pe);return"".concat(ge.slice(0,Te)).concat(pe)}function Ne(ge,pe,Te){st(pe,"offset"),(ge[pe]===void 0||ge[pe+Te]===void 0)&&Ze(pe,ge.length-(Te+1))}function et(ge,pe,Te,be,ke,Ve){if(ge>Te||ge= 0".concat(je," and < 2").concat(je," ** ").concat((Ve+1)*8).concat(je):at=">= -(2".concat(je," ** ").concat((Ve+1)*8-1).concat(je,") and < 2 ** ")+"".concat((Ve+1)*8-1).concat(je),new _e.ERR_OUT_OF_RANGE("value",at,ge)}Ne(be,ke,Ve)}function st(ge,pe){if(typeof ge!="number")throw new _e.ERR_INVALID_ARG_TYPE(pe,"number",ge)}function Ze(ge,pe,Te){throw Math.floor(ge)!==ge?(st(ge,Te),new _e.ERR_OUT_OF_RANGE("offset","an integer",ge)):pe<0?new _e.ERR_BUFFER_OUT_OF_BOUNDS:new _e.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(pe),ge)}var Ke=/[^+/0-9A-Za-z-_]/g;function nt(ge){if(ge=ge.split("=")[0],ge=ge.trim().replace(Ke,""),ge.length<2)return"";for(;ge.length%4!==0;)ge=ge+"=";return ge}function it(ge,pe){pe=pe||1/0;for(var Te,be=ge.length,ke=null,Ve=[],je=0;je55295&&Te<57344){if(!ke){if(Te>56319){(pe-=3)>-1&&Ve.push(239,191,189);continue}else if(je+1===be){(pe-=3)>-1&&Ve.push(239,191,189);continue}ke=Te;continue}if(Te<56320){(pe-=3)>-1&&Ve.push(239,191,189),ke=Te;continue}Te=(ke-55296<<10|Te-56320)+65536}else ke&&(pe-=3)>-1&&Ve.push(239,191,189);if(ke=null,Te<128){if((pe-=1)<0)break;Ve.push(Te)}else if(Te<2048){if((pe-=2)<0)break;Ve.push(Te>>6|192,Te&63|128)}else if(Te<65536){if((pe-=3)<0)break;Ve.push(Te>>12|224,Te>>6&63|128,Te&63|128)}else if(Te<1114112){if((pe-=4)<0)break;Ve.push(Te>>18|240,Te>>12&63|128,Te>>6&63|128,Te&63|128)}else throw new Error("Invalid code point")}return Ve}function lt(ge){for(var pe=[],Te=0;Te>8,ke=Te%256,Ve.push(ke),Ve.push(be);return Ve}function xt(ge){return v.toByteArray(nt(ge))}function Je(ge,pe,Te,be){var ke;for(ke=0;ke=pe.length||ke>=ge.length);++ke)pe[ke+Te]=ge[ke];return ke}function Pe(ge,pe){return ge instanceof pe||ge!=null&&ge.constructor!=null&&ge.constructor.name!=null&&ge.constructor.name===pe.name}function Ue(ge){return ge!==ge}var He=function(){for(var ge="0123456789abcdef",pe=new Array(256),Te=0;Te<16;++Te)for(var be=Te*16,ke=0;ke<16;++ke)pe[be+ke]=ge[Te]+ge[ke];return pe}();function Oe(ge){return typeof BigInt>"u"?Ce:ge}function Ce(){throw new Error("BigInt not supported")}},2321:function(d){d.exports=s,d.exports.isMobile=s,d.exports.default=s;var g=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,r=/CrOS/,t=/android|ipad|playbook|silk/i;function s(a){a||(a={});var c=a.ua;if(!c&&typeof navigator<"u"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;var u=g.test(c)&&!r.test(c)||!!a.tablet&&t.test(c);return!u&&a.tablet&&a.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(u=!0),u}},3910:function(d,g){g.byteLength=y,g.toByteArray=T,g.fromByteArray=v;for(var r=[],t=[],s=typeof Uint8Array<"u"?Uint8Array:Array,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",c=0,u=a.length;c0)throw new Error("Invalid string. Length must be a multiple of 4");var E=m.indexOf("=");E===-1&&(E=b);var p=E===b?0:4-E%4;return[E,p]}function y(m){var b=l(m),E=b[0],p=b[1];return(E+p)*3/4-p}function h(m,b,E){return(b+E)*3/4-E}function T(m){var b,E=l(m),p=E[0],S=E[1],w=new s(h(m,p,S)),i=0,C=S>0?p-4:p,x;for(x=0;x>16&255,w[i++]=b>>8&255,w[i++]=b&255;return S===2&&(b=t[m.charCodeAt(x)]<<2|t[m.charCodeAt(x+1)]>>4,w[i++]=b&255),S===1&&(b=t[m.charCodeAt(x)]<<10|t[m.charCodeAt(x+1)]<<4|t[m.charCodeAt(x+2)]>>2,w[i++]=b>>8&255,w[i++]=b&255),w}function f(m){return r[m>>18&63]+r[m>>12&63]+r[m>>6&63]+r[m&63]}function n(m,b,E){for(var p,S=[],w=b;wC?C:i+w));return p===1?(b=m[E-1],S.push(r[b>>2]+r[b<<4&63]+"==")):p===2&&(b=(m[E-2]<<8)+m[E-1],S.push(r[b>>10]+r[b>>4&63]+r[b<<2&63]+"=")),S.join("")}},3187:function(d,g){/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */g.read=function(r,t,s,a,c){var u,l,y=c*8-a-1,h=(1<>1,f=-7,n=s?c-1:0,v=s?-1:1,m=r[t+n];for(n+=v,u=m&(1<<-f)-1,m>>=-f,f+=y;f>0;u=u*256+r[t+n],n+=v,f-=8);for(l=u&(1<<-f)-1,u>>=-f,f+=a;f>0;l=l*256+r[t+n],n+=v,f-=8);if(u===0)u=1-T;else{if(u===h)return l?NaN:(m?-1:1)*(1/0);l=l+Math.pow(2,a),u=u-T}return(m?-1:1)*l*Math.pow(2,u-a)},g.write=function(r,t,s,a,c,u){var l,y,h,T=u*8-c-1,f=(1<>1,v=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,m=a?0:u-1,b=a?1:-1,E=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(y=isNaN(t)?1:0,l=f):(l=Math.floor(Math.log(t)/Math.LN2),t*(h=Math.pow(2,-l))<1&&(l--,h*=2),l+n>=1?t+=v/h:t+=v*Math.pow(2,1-n),t*h>=2&&(l++,h/=2),l+n>=f?(y=0,l=f):l+n>=1?(y=(t*h-1)*Math.pow(2,c),l=l+n):(y=t*Math.pow(2,n-1)*Math.pow(2,c),l=0));c>=8;r[s+m]=y&255,m+=b,y/=256,c-=8);for(l=l<0;r[s+m]=l&255,m+=b,l/=256,T-=8);r[s+m-b]|=E*128}},1152:function(d,g,r){d.exports=l;var t=r(3440),s=r(7774),a=r(9298);function c(y,h){this._controllerNames=Object.keys(y),this._controllerList=this._controllerNames.map(function(T){return y[T]}),this._mode=h,this._active=y[h],this._active||(this._mode="turntable",this._active=y.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 u=c.prototype;u.flush=function(y){for(var h=this._controllerList,T=0;T"u"?r(5346):WeakMap,s=r(5827),a=r(2944),c=new t;function u(l){var y=c.get(l),h=y&&(y._triangleBuffer.handle||y._triangleBuffer.buffer);if(!h||!l.isBuffer(h)){var T=s(l,new Float32Array([-1,-1,-1,4,4,-1]));y=a(l,[{buffer:T,type:l.FLOAT,size:2}]),y._triangleBuffer=T,c.set(l,y)}y.bind(),l.drawArrays(l.TRIANGLES,0,3),y.unbind()}d.exports=u},8008:function(d,g,r){var t=r(4930);d.exports=s;function s(a,c,u){c=typeof c=="number"?c:1,u=u||": ";var l=a.split(/\r?\n/),y=String(l.length+c-1).length;return l.map(function(h,T){var f=T+c,n=String(f).length,v=t(f,y-n);return v+u+h}).join(` `)}},2153:function(d,g,r){d.exports=a;var t=r(417);function s(c,u){for(var l=new Array(u+1),y=0;y0?n=n.ushln(f):f<0&&(v=v.ushln(-f)),u(n,v)}},234:function(d,g,r){var t=r(3218);d.exports=s;function s(a){return Array.isArray(a)&&a.length===2&&t(a[0])&&t(a[1])}},4275:function(d,g,r){var t=r(1928);d.exports=s;function s(a){return a.cmp(new t(0))}},9958:function(d,g,r){var t=r(4275);d.exports=s;function s(a){var c=a.length,u=a.words,l=0;if(c===1)l=u[0];else if(c===2)l=u[0]+u[1]*67108864;else for(var y=0;y20?52:l+32}},3218:function(d,g,r){r(1928),d.exports=t;function t(s){return s&&typeof s=="object"&&!!s.words}},5514:function(d,g,r){var t=r(1928),s=r(8362);d.exports=a;function a(c){var u=s.exponent(c);return u<52?new t(c):new t(c*Math.pow(2,52-u)).ushln(u-52)}},8524:function(d,g,r){var t=r(5514),s=r(4275);d.exports=a;function a(c,u){var l=s(c),y=s(u);if(l===0)return[t(0),t(1)];if(y===0)return[t(0),t(0)];y<0&&(c=c.neg(),u=u.neg());var h=c.gcd(u);return h.cmpn(1)?[c.div(h),u.div(h)]:[c,u]}},2813:function(d,g,r){var t=r(1928);d.exports=s;function s(a){return new t(a)}},3962:function(d,g,r){var t=r(8524);d.exports=s;function s(a,c){return t(a[0].mul(c[0]),a[1].mul(c[1]))}},4951:function(d,g,r){var t=r(4275);d.exports=s;function s(a){return t(a[0])*t(a[1])}},4354:function(d,g,r){var t=r(8524);d.exports=s;function s(a,c){return t(a[0].mul(c[1]).sub(a[1].mul(c[0])),a[1].mul(c[1]))}},7999:function(d,g,r){var t=r(9958),s=r(1112);d.exports=a;function a(c){var u=c[0],l=c[1];if(u.cmpn(0)===0)return 0;var y=u.abs().divmod(l.abs()),h=y.div,T=t(h),f=y.mod,n=u.negative!==l.negative?-1:1;if(f.cmpn(0)===0)return n*T;if(T){var v=s(T)+4,m=t(f.ushln(v).divRound(l));return n*(T+m*Math.pow(2,-v))}else{var b=l.bitLength()-f.bitLength()+53,m=t(f.ushln(b).divRound(l));return b<1023?n*m*Math.pow(2,-b):(m*=Math.pow(2,-1023),n*m*Math.pow(2,1023-b))}}},5070:function(d){function g(u,l,y,h,T){for(var f=T+1;h<=T;){var n=h+T>>>1,v=u[n],m=y!==void 0?y(v,l):v-l;m>=0?(f=n,T=n-1):h=n+1}return f}function r(u,l,y,h,T){for(var f=T+1;h<=T;){var n=h+T>>>1,v=u[n],m=y!==void 0?y(v,l):v-l;m>0?(f=n,T=n-1):h=n+1}return f}function t(u,l,y,h,T){for(var f=h-1;h<=T;){var n=h+T>>>1,v=u[n],m=y!==void 0?y(v,l):v-l;m<0?(f=n,h=n+1):T=n-1}return f}function s(u,l,y,h,T){for(var f=h-1;h<=T;){var n=h+T>>>1,v=u[n],m=y!==void 0?y(v,l):v-l;m<=0?(f=n,h=n+1):T=n-1}return f}function a(u,l,y,h,T){for(;h<=T;){var f=h+T>>>1,n=u[f],v=y!==void 0?y(n,l):n-l;if(v===0)return f;v<=0?h=f+1:T=f-1}return-1}function c(u,l,y,h,T,f){return typeof y=="function"?f(u,l,y,h===void 0?0:h|0,T===void 0?u.length-1:T|0):f(u,l,void 0,y===void 0?0:y|0,h===void 0?u.length-1:h|0)}d.exports={ge:function(u,l,y,h,T){return c(u,l,y,h,T,g)},gt:function(u,l,y,h,T){return c(u,l,y,h,T,r)},lt:function(u,l,y,h,T){return c(u,l,y,h,T,t)},le:function(u,l,y,h,T){return c(u,l,y,h,T,s)},eq:function(u,l,y,h,T){return c(u,l,y,h,T,a)}}},2288:function(d,g){"use restrict";var r=32;g.INT_BITS=r,g.INT_MAX=2147483647,g.INT_MIN=-1<0)-(a<0)},g.abs=function(a){var c=a>>r-1;return(a^c)-c},g.min=function(a,c){return c^(a^c)&-(a65535)<<4,a>>>=c,u=(a>255)<<3,a>>>=u,c|=u,u=(a>15)<<2,a>>>=u,c|=u,u=(a>3)<<1,a>>>=u,c|=u,c|a>>1},g.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},g.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function t(a){var c=32;return a&=-a,a&&c--,a&65535&&(c-=16),a&16711935&&(c-=8),a&252645135&&(c-=4),a&858993459&&(c-=2),a&1431655765&&(c-=1),c}g.countTrailingZeros=t,g.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},g.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},g.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var s=new Array(256);(function(a){for(var c=0;c<256;++c){var u=c,l=c,y=7;for(u>>>=1;u;u>>>=1)l<<=1,l|=u&1,--y;a[c]=l<>>8&255]<<16|s[a>>>16&255]<<8|s[a>>>24&255]},g.interleave2=function(a,c){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,a|c<<1},g.deinterleave2=function(a,c){return a=a>>>c&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},g.interleave3=function(a,c,u){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,a|=c<<1,u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,a|u<<2},g.deinterleave3=function(a,c){return a=a>>>c&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},g.nextCombination=function(a){var c=a|a-1;return c+1|(~c&-~c)-1>>>t(a)+1}},1928:function(d,g,r){d=r.nmd(d),function(t,s){function a(O,F){if(!O)throw new Error(F||"Assertion failed")}function c(O,F){O.super_=F;var N=function(){};N.prototype=F.prototype,O.prototype=new N,O.prototype.constructor=O}function u(O,F,N){if(u.isBN(O))return O;this.negative=0,this.words=null,this.length=0,this.red=null,O!==null&&((F==="le"||F==="be")&&(N=F,F=10),this._init(O||0,F||10,N||"be"))}typeof t=="object"?t.exports=u:s.BN=u,u.BN=u,u.wordSize=26;var l;try{typeof window<"u"&&typeof window.Buffer<"u"?l=window.Buffer:l=r(6601).Buffer}catch{}u.isBN=function(F){return F instanceof u?!0:F!==null&&typeof F=="object"&&F.constructor.wordSize===u.wordSize&&Array.isArray(F.words)},u.max=function(F,N){return F.cmp(N)>0?F:N},u.min=function(F,N){return F.cmp(N)<0?F:N},u.prototype._init=function(F,N,V){if(typeof F=="number")return this._initNumber(F,N,V);if(typeof F=="object")return this._initArray(F,N,V);N==="hex"&&(N=16),a(N===(N|0)&&N>=2&&N<=36),F=F.toString().replace(/\s+/g,"");var j=0;F[0]==="-"&&(j++,this.negative=1),j=0;j-=3)q=F[j]|F[j-1]<<8|F[j-2]<<16,this.words[$]|=q<>>26-oe&67108863,oe+=24,oe>=26&&(oe-=26,$++);else if(V==="le")for(j=0,$=0;j>>26-oe&67108863,oe+=24,oe>=26&&(oe-=26,$++);return this.strip()};function y(O,F){var N=O.charCodeAt(F);return N>=65&&N<=70?N-55:N>=97&&N<=102?N-87:N-48&15}function h(O,F,N){var V=y(O,N);return N-1>=F&&(V|=y(O,N-1)<<4),V}u.prototype._parseHex=function(F,N,V){this.length=Math.ceil((F.length-N)/6),this.words=new Array(this.length);for(var j=0;j=N;j-=2)oe=h(F,N,j)<<$,this.words[q]|=oe&67108863,$>=18?($-=18,q+=1,this.words[q]|=oe>>>26):$+=8;else{var Z=F.length-N;for(j=Z%2===0?N+1:N;j=18?($-=18,q+=1,this.words[q]|=oe>>>26):$+=8}this.strip()};function T(O,F,N,V){for(var j=0,$=Math.min(O.length,N),q=F;q<$;q++){var oe=O.charCodeAt(q)-48;j*=V,oe>=49?j+=oe-49+10:oe>=17?j+=oe-17+10:j+=oe}return j}u.prototype._parseBase=function(F,N,V){this.words=[0],this.length=1;for(var j=0,$=1;$<=67108863;$*=N)j++;j--,$=$/N|0;for(var q=F.length-V,oe=q%j,Z=Math.min(q,q-oe)+V,G=0,re=V;re1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},u.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},u.prototype.inspect=function(){return(this.red?""};var f=["","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"],n=[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],v=[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];u.prototype.toString=function(F,N){F=F||10,N=N|0||1;var V;if(F===16||F==="hex"){V="";for(var j=0,$=0,q=0;q>>24-j&16777215,$!==0||q!==this.length-1?V=f[6-Z.length]+Z+V:V=Z+V,j+=2,j>=26&&(j-=26,q--)}for($!==0&&(V=$.toString(16)+V);V.length%N!==0;)V="0"+V;return this.negative!==0&&(V="-"+V),V}if(F===(F|0)&&F>=2&&F<=36){var G=n[F],re=v[F];V="";var H=this.clone();for(H.negative=0;!H.isZero();){var J=H.modn(re).toString(F);H=H.idivn(re),H.isZero()?V=J+V:V=f[G-J.length]+J+V}for(this.isZero()&&(V="0"+V);V.length%N!==0;)V="0"+V;return this.negative!==0&&(V="-"+V),V}a(!1,"Base should be between 2 and 36")},u.prototype.toNumber=function(){var F=this.words[0];return this.length===2?F+=this.words[1]*67108864:this.length===3&&this.words[2]===1?F+=4503599627370496+this.words[1]*67108864:this.length>2&&a(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-F:F},u.prototype.toJSON=function(){return this.toString(16)},u.prototype.toBuffer=function(F,N){return a(typeof l<"u"),this.toArrayLike(l,F,N)},u.prototype.toArray=function(F,N){return this.toArrayLike(Array,F,N)},u.prototype.toArrayLike=function(F,N,V){var j=this.byteLength(),$=V||Math.max(1,j);a(j<=$,"byte array longer than desired length"),a($>0,"Requested array length <= 0"),this.strip();var q=N==="le",oe=new F($),Z,G,re=this.clone();if(q){for(G=0;!re.isZero();G++)Z=re.andln(255),re.iushrn(8),oe[G]=Z;for(;G<$;G++)oe[G]=0}else{for(G=0;G<$-j;G++)oe[G]=0;for(G=0;!re.isZero();G++)Z=re.andln(255),re.iushrn(8),oe[$-G-1]=Z}return oe},Math.clz32?u.prototype._countBits=function(F){return 32-Math.clz32(F)}:u.prototype._countBits=function(F){var N=F,V=0;return N>=4096&&(V+=13,N>>>=13),N>=64&&(V+=7,N>>>=7),N>=8&&(V+=4,N>>>=4),N>=2&&(V+=2,N>>>=2),V+N},u.prototype._zeroBits=function(F){if(F===0)return 26;var N=F,V=0;return N&8191||(V+=13,N>>>=13),N&127||(V+=7,N>>>=7),N&15||(V+=4,N>>>=4),N&3||(V+=2,N>>>=2),N&1||V++,V},u.prototype.bitLength=function(){var F=this.words[this.length-1],N=this._countBits(F);return(this.length-1)*26+N};function m(O){for(var F=new Array(O.bitLength()),N=0;N>>j}return F}u.prototype.zeroBits=function(){if(this.isZero())return 0;for(var F=0,N=0;NF.length?this.clone().ior(F):F.clone().ior(this)},u.prototype.uor=function(F){return this.length>F.length?this.clone().iuor(F):F.clone().iuor(this)},u.prototype.iuand=function(F){var N;this.length>F.length?N=F:N=this;for(var V=0;VF.length?this.clone().iand(F):F.clone().iand(this)},u.prototype.uand=function(F){return this.length>F.length?this.clone().iuand(F):F.clone().iuand(this)},u.prototype.iuxor=function(F){var N,V;this.length>F.length?(N=this,V=F):(N=F,V=this);for(var j=0;jF.length?this.clone().ixor(F):F.clone().ixor(this)},u.prototype.uxor=function(F){return this.length>F.length?this.clone().iuxor(F):F.clone().iuxor(this)},u.prototype.inotn=function(F){a(typeof F=="number"&&F>=0);var N=Math.ceil(F/26)|0,V=F%26;this._expand(N),V>0&&N--;for(var j=0;j0&&(this.words[j]=~this.words[j]&67108863>>26-V),this.strip()},u.prototype.notn=function(F){return this.clone().inotn(F)},u.prototype.setn=function(F,N){a(typeof F=="number"&&F>=0);var V=F/26|0,j=F%26;return this._expand(V+1),N?this.words[V]=this.words[V]|1<F.length?(V=this,j=F):(V=F,j=this);for(var $=0,q=0;q>>26;for(;$!==0&&q>>26;if(this.length=V.length,$!==0)this.words[this.length]=$,this.length++;else if(V!==this)for(;qF.length?this.clone().iadd(F):F.clone().iadd(this)},u.prototype.isub=function(F){if(F.negative!==0){F.negative=0;var N=this.iadd(F);return F.negative=1,N._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(F),this.negative=1,this._normSign();var V=this.cmp(F);if(V===0)return this.negative=0,this.length=1,this.words[0]=0,this;var j,$;V>0?(j=this,$=F):(j=F,$=this);for(var q=0,oe=0;oe<$.length;oe++)N=(j.words[oe]|0)-($.words[oe]|0)+q,q=N>>26,this.words[oe]=N&67108863;for(;q!==0&&oe>26,this.words[oe]=N&67108863;if(q===0&&oe>>26,H=Z&67108863,J=Math.min(G,F.length-1),ae=Math.max(0,G-O.length+1);ae<=J;ae++){var K=G-ae|0;j=O.words[K]|0,$=F.words[ae]|0,q=j*$+H,re+=q/67108864|0,H=q&67108863}N.words[G]=H|0,Z=re|0}return Z!==0?N.words[G]=Z|0:N.length--,N.strip()}var E=function(F,N,V){var j=F.words,$=N.words,q=V.words,oe=0,Z,G,re,H=j[0]|0,J=H&8191,ae=H>>>13,K=j[1]|0,Y=K&8191,ie=K>>>13,ne=j[2]|0,le=ne&8191,de=ne>>>13,we=j[3]|0,me=we&8191,Le=we>>>13,ve=j[4]|0,Ae=ve&8191,ye=ve>>>13,Se=j[5]|0,_e=Se&8191,ze=Se>>>13,Ie=j[6]|0,Ne=Ie&8191,et=Ie>>>13,st=j[7]|0,Ze=st&8191,Ke=st>>>13,nt=j[8]|0,it=nt&8191,lt=nt>>>13,vt=j[9]|0,xt=vt&8191,Je=vt>>>13,Pe=$[0]|0,Ue=Pe&8191,He=Pe>>>13,Oe=$[1]|0,Ce=Oe&8191,ge=Oe>>>13,pe=$[2]|0,Te=pe&8191,be=pe>>>13,ke=$[3]|0,Ve=ke&8191,je=ke>>>13,at=$[4]|0,ut=at&8191,Nt=at>>>13,Vt=$[5]|0,gt=Vt&8191,Ct=Vt>>>13,Yt=$[6]|0,gr=Yt&8191,ht=Yt>>>13,Ht=$[7]|0,Wt=Ht&8191,cr=Ht>>>13,er=$[8]|0,ct=er&8191,qe=er>>>13,dt=$[9]|0,bt=dt&8191,Et=dt>>>13;V.negative=F.negative^N.negative,V.length=19,Z=Math.imul(J,Ue),G=Math.imul(J,He),G=G+Math.imul(ae,Ue)|0,re=Math.imul(ae,He);var Mt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Mt>>>26)|0,Mt&=67108863,Z=Math.imul(Y,Ue),G=Math.imul(Y,He),G=G+Math.imul(ie,Ue)|0,re=Math.imul(ie,He),Z=Z+Math.imul(J,Ce)|0,G=G+Math.imul(J,ge)|0,G=G+Math.imul(ae,Ce)|0,re=re+Math.imul(ae,ge)|0;var _t=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(_t>>>26)|0,_t&=67108863,Z=Math.imul(le,Ue),G=Math.imul(le,He),G=G+Math.imul(de,Ue)|0,re=Math.imul(de,He),Z=Z+Math.imul(Y,Ce)|0,G=G+Math.imul(Y,ge)|0,G=G+Math.imul(ie,Ce)|0,re=re+Math.imul(ie,ge)|0,Z=Z+Math.imul(J,Te)|0,G=G+Math.imul(J,be)|0,G=G+Math.imul(ae,Te)|0,re=re+Math.imul(ae,be)|0;var It=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(It>>>26)|0,It&=67108863,Z=Math.imul(me,Ue),G=Math.imul(me,He),G=G+Math.imul(Le,Ue)|0,re=Math.imul(Le,He),Z=Z+Math.imul(le,Ce)|0,G=G+Math.imul(le,ge)|0,G=G+Math.imul(de,Ce)|0,re=re+Math.imul(de,ge)|0,Z=Z+Math.imul(Y,Te)|0,G=G+Math.imul(Y,be)|0,G=G+Math.imul(ie,Te)|0,re=re+Math.imul(ie,be)|0,Z=Z+Math.imul(J,Ve)|0,G=G+Math.imul(J,je)|0,G=G+Math.imul(ae,Ve)|0,re=re+Math.imul(ae,je)|0;var Gt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Gt>>>26)|0,Gt&=67108863,Z=Math.imul(Ae,Ue),G=Math.imul(Ae,He),G=G+Math.imul(ye,Ue)|0,re=Math.imul(ye,He),Z=Z+Math.imul(me,Ce)|0,G=G+Math.imul(me,ge)|0,G=G+Math.imul(Le,Ce)|0,re=re+Math.imul(Le,ge)|0,Z=Z+Math.imul(le,Te)|0,G=G+Math.imul(le,be)|0,G=G+Math.imul(de,Te)|0,re=re+Math.imul(de,be)|0,Z=Z+Math.imul(Y,Ve)|0,G=G+Math.imul(Y,je)|0,G=G+Math.imul(ie,Ve)|0,re=re+Math.imul(ie,je)|0,Z=Z+Math.imul(J,ut)|0,G=G+Math.imul(J,Nt)|0,G=G+Math.imul(ae,ut)|0,re=re+Math.imul(ae,Nt)|0;var nr=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(nr>>>26)|0,nr&=67108863,Z=Math.imul(_e,Ue),G=Math.imul(_e,He),G=G+Math.imul(ze,Ue)|0,re=Math.imul(ze,He),Z=Z+Math.imul(Ae,Ce)|0,G=G+Math.imul(Ae,ge)|0,G=G+Math.imul(ye,Ce)|0,re=re+Math.imul(ye,ge)|0,Z=Z+Math.imul(me,Te)|0,G=G+Math.imul(me,be)|0,G=G+Math.imul(Le,Te)|0,re=re+Math.imul(Le,be)|0,Z=Z+Math.imul(le,Ve)|0,G=G+Math.imul(le,je)|0,G=G+Math.imul(de,Ve)|0,re=re+Math.imul(de,je)|0,Z=Z+Math.imul(Y,ut)|0,G=G+Math.imul(Y,Nt)|0,G=G+Math.imul(ie,ut)|0,re=re+Math.imul(ie,Nt)|0,Z=Z+Math.imul(J,gt)|0,G=G+Math.imul(J,Ct)|0,G=G+Math.imul(ae,gt)|0,re=re+Math.imul(ae,Ct)|0;var ar=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(ar>>>26)|0,ar&=67108863,Z=Math.imul(Ne,Ue),G=Math.imul(Ne,He),G=G+Math.imul(et,Ue)|0,re=Math.imul(et,He),Z=Z+Math.imul(_e,Ce)|0,G=G+Math.imul(_e,ge)|0,G=G+Math.imul(ze,Ce)|0,re=re+Math.imul(ze,ge)|0,Z=Z+Math.imul(Ae,Te)|0,G=G+Math.imul(Ae,be)|0,G=G+Math.imul(ye,Te)|0,re=re+Math.imul(ye,be)|0,Z=Z+Math.imul(me,Ve)|0,G=G+Math.imul(me,je)|0,G=G+Math.imul(Le,Ve)|0,re=re+Math.imul(Le,je)|0,Z=Z+Math.imul(le,ut)|0,G=G+Math.imul(le,Nt)|0,G=G+Math.imul(de,ut)|0,re=re+Math.imul(de,Nt)|0,Z=Z+Math.imul(Y,gt)|0,G=G+Math.imul(Y,Ct)|0,G=G+Math.imul(ie,gt)|0,re=re+Math.imul(ie,Ct)|0,Z=Z+Math.imul(J,gr)|0,G=G+Math.imul(J,ht)|0,G=G+Math.imul(ae,gr)|0,re=re+Math.imul(ae,ht)|0;var ir=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(ir>>>26)|0,ir&=67108863,Z=Math.imul(Ze,Ue),G=Math.imul(Ze,He),G=G+Math.imul(Ke,Ue)|0,re=Math.imul(Ke,He),Z=Z+Math.imul(Ne,Ce)|0,G=G+Math.imul(Ne,ge)|0,G=G+Math.imul(et,Ce)|0,re=re+Math.imul(et,ge)|0,Z=Z+Math.imul(_e,Te)|0,G=G+Math.imul(_e,be)|0,G=G+Math.imul(ze,Te)|0,re=re+Math.imul(ze,be)|0,Z=Z+Math.imul(Ae,Ve)|0,G=G+Math.imul(Ae,je)|0,G=G+Math.imul(ye,Ve)|0,re=re+Math.imul(ye,je)|0,Z=Z+Math.imul(me,ut)|0,G=G+Math.imul(me,Nt)|0,G=G+Math.imul(Le,ut)|0,re=re+Math.imul(Le,Nt)|0,Z=Z+Math.imul(le,gt)|0,G=G+Math.imul(le,Ct)|0,G=G+Math.imul(de,gt)|0,re=re+Math.imul(de,Ct)|0,Z=Z+Math.imul(Y,gr)|0,G=G+Math.imul(Y,ht)|0,G=G+Math.imul(ie,gr)|0,re=re+Math.imul(ie,ht)|0,Z=Z+Math.imul(J,Wt)|0,G=G+Math.imul(J,cr)|0,G=G+Math.imul(ae,Wt)|0,re=re+Math.imul(ae,cr)|0;var Be=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Be>>>26)|0,Be&=67108863,Z=Math.imul(it,Ue),G=Math.imul(it,He),G=G+Math.imul(lt,Ue)|0,re=Math.imul(lt,He),Z=Z+Math.imul(Ze,Ce)|0,G=G+Math.imul(Ze,ge)|0,G=G+Math.imul(Ke,Ce)|0,re=re+Math.imul(Ke,ge)|0,Z=Z+Math.imul(Ne,Te)|0,G=G+Math.imul(Ne,be)|0,G=G+Math.imul(et,Te)|0,re=re+Math.imul(et,be)|0,Z=Z+Math.imul(_e,Ve)|0,G=G+Math.imul(_e,je)|0,G=G+Math.imul(ze,Ve)|0,re=re+Math.imul(ze,je)|0,Z=Z+Math.imul(Ae,ut)|0,G=G+Math.imul(Ae,Nt)|0,G=G+Math.imul(ye,ut)|0,re=re+Math.imul(ye,Nt)|0,Z=Z+Math.imul(me,gt)|0,G=G+Math.imul(me,Ct)|0,G=G+Math.imul(Le,gt)|0,re=re+Math.imul(Le,Ct)|0,Z=Z+Math.imul(le,gr)|0,G=G+Math.imul(le,ht)|0,G=G+Math.imul(de,gr)|0,re=re+Math.imul(de,ht)|0,Z=Z+Math.imul(Y,Wt)|0,G=G+Math.imul(Y,cr)|0,G=G+Math.imul(ie,Wt)|0,re=re+Math.imul(ie,cr)|0,Z=Z+Math.imul(J,ct)|0,G=G+Math.imul(J,qe)|0,G=G+Math.imul(ae,ct)|0,re=re+Math.imul(ae,qe)|0;var Fe=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Fe>>>26)|0,Fe&=67108863,Z=Math.imul(xt,Ue),G=Math.imul(xt,He),G=G+Math.imul(Je,Ue)|0,re=Math.imul(Je,He),Z=Z+Math.imul(it,Ce)|0,G=G+Math.imul(it,ge)|0,G=G+Math.imul(lt,Ce)|0,re=re+Math.imul(lt,ge)|0,Z=Z+Math.imul(Ze,Te)|0,G=G+Math.imul(Ze,be)|0,G=G+Math.imul(Ke,Te)|0,re=re+Math.imul(Ke,be)|0,Z=Z+Math.imul(Ne,Ve)|0,G=G+Math.imul(Ne,je)|0,G=G+Math.imul(et,Ve)|0,re=re+Math.imul(et,je)|0,Z=Z+Math.imul(_e,ut)|0,G=G+Math.imul(_e,Nt)|0,G=G+Math.imul(ze,ut)|0,re=re+Math.imul(ze,Nt)|0,Z=Z+Math.imul(Ae,gt)|0,G=G+Math.imul(Ae,Ct)|0,G=G+Math.imul(ye,gt)|0,re=re+Math.imul(ye,Ct)|0,Z=Z+Math.imul(me,gr)|0,G=G+Math.imul(me,ht)|0,G=G+Math.imul(Le,gr)|0,re=re+Math.imul(Le,ht)|0,Z=Z+Math.imul(le,Wt)|0,G=G+Math.imul(le,cr)|0,G=G+Math.imul(de,Wt)|0,re=re+Math.imul(de,cr)|0,Z=Z+Math.imul(Y,ct)|0,G=G+Math.imul(Y,qe)|0,G=G+Math.imul(ie,ct)|0,re=re+Math.imul(ie,qe)|0,Z=Z+Math.imul(J,bt)|0,G=G+Math.imul(J,Et)|0,G=G+Math.imul(ae,bt)|0,re=re+Math.imul(ae,Et)|0;var Rt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Rt>>>26)|0,Rt&=67108863,Z=Math.imul(xt,Ce),G=Math.imul(xt,ge),G=G+Math.imul(Je,Ce)|0,re=Math.imul(Je,ge),Z=Z+Math.imul(it,Te)|0,G=G+Math.imul(it,be)|0,G=G+Math.imul(lt,Te)|0,re=re+Math.imul(lt,be)|0,Z=Z+Math.imul(Ze,Ve)|0,G=G+Math.imul(Ze,je)|0,G=G+Math.imul(Ke,Ve)|0,re=re+Math.imul(Ke,je)|0,Z=Z+Math.imul(Ne,ut)|0,G=G+Math.imul(Ne,Nt)|0,G=G+Math.imul(et,ut)|0,re=re+Math.imul(et,Nt)|0,Z=Z+Math.imul(_e,gt)|0,G=G+Math.imul(_e,Ct)|0,G=G+Math.imul(ze,gt)|0,re=re+Math.imul(ze,Ct)|0,Z=Z+Math.imul(Ae,gr)|0,G=G+Math.imul(Ae,ht)|0,G=G+Math.imul(ye,gr)|0,re=re+Math.imul(ye,ht)|0,Z=Z+Math.imul(me,Wt)|0,G=G+Math.imul(me,cr)|0,G=G+Math.imul(Le,Wt)|0,re=re+Math.imul(Le,cr)|0,Z=Z+Math.imul(le,ct)|0,G=G+Math.imul(le,qe)|0,G=G+Math.imul(de,ct)|0,re=re+Math.imul(de,qe)|0,Z=Z+Math.imul(Y,bt)|0,G=G+Math.imul(Y,Et)|0,G=G+Math.imul(ie,bt)|0,re=re+Math.imul(ie,Et)|0;var Lt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Lt>>>26)|0,Lt&=67108863,Z=Math.imul(xt,Te),G=Math.imul(xt,be),G=G+Math.imul(Je,Te)|0,re=Math.imul(Je,be),Z=Z+Math.imul(it,Ve)|0,G=G+Math.imul(it,je)|0,G=G+Math.imul(lt,Ve)|0,re=re+Math.imul(lt,je)|0,Z=Z+Math.imul(Ze,ut)|0,G=G+Math.imul(Ze,Nt)|0,G=G+Math.imul(Ke,ut)|0,re=re+Math.imul(Ke,Nt)|0,Z=Z+Math.imul(Ne,gt)|0,G=G+Math.imul(Ne,Ct)|0,G=G+Math.imul(et,gt)|0,re=re+Math.imul(et,Ct)|0,Z=Z+Math.imul(_e,gr)|0,G=G+Math.imul(_e,ht)|0,G=G+Math.imul(ze,gr)|0,re=re+Math.imul(ze,ht)|0,Z=Z+Math.imul(Ae,Wt)|0,G=G+Math.imul(Ae,cr)|0,G=G+Math.imul(ye,Wt)|0,re=re+Math.imul(ye,cr)|0,Z=Z+Math.imul(me,ct)|0,G=G+Math.imul(me,qe)|0,G=G+Math.imul(Le,ct)|0,re=re+Math.imul(Le,qe)|0,Z=Z+Math.imul(le,bt)|0,G=G+Math.imul(le,Et)|0,G=G+Math.imul(de,bt)|0,re=re+Math.imul(de,Et)|0;var Ut=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Ut>>>26)|0,Ut&=67108863,Z=Math.imul(xt,Ve),G=Math.imul(xt,je),G=G+Math.imul(Je,Ve)|0,re=Math.imul(Je,je),Z=Z+Math.imul(it,ut)|0,G=G+Math.imul(it,Nt)|0,G=G+Math.imul(lt,ut)|0,re=re+Math.imul(lt,Nt)|0,Z=Z+Math.imul(Ze,gt)|0,G=G+Math.imul(Ze,Ct)|0,G=G+Math.imul(Ke,gt)|0,re=re+Math.imul(Ke,Ct)|0,Z=Z+Math.imul(Ne,gr)|0,G=G+Math.imul(Ne,ht)|0,G=G+Math.imul(et,gr)|0,re=re+Math.imul(et,ht)|0,Z=Z+Math.imul(_e,Wt)|0,G=G+Math.imul(_e,cr)|0,G=G+Math.imul(ze,Wt)|0,re=re+Math.imul(ze,cr)|0,Z=Z+Math.imul(Ae,ct)|0,G=G+Math.imul(Ae,qe)|0,G=G+Math.imul(ye,ct)|0,re=re+Math.imul(ye,qe)|0,Z=Z+Math.imul(me,bt)|0,G=G+Math.imul(me,Et)|0,G=G+Math.imul(Le,bt)|0,re=re+Math.imul(Le,Et)|0;var Qt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Qt>>>26)|0,Qt&=67108863,Z=Math.imul(xt,ut),G=Math.imul(xt,Nt),G=G+Math.imul(Je,ut)|0,re=Math.imul(Je,Nt),Z=Z+Math.imul(it,gt)|0,G=G+Math.imul(it,Ct)|0,G=G+Math.imul(lt,gt)|0,re=re+Math.imul(lt,Ct)|0,Z=Z+Math.imul(Ze,gr)|0,G=G+Math.imul(Ze,ht)|0,G=G+Math.imul(Ke,gr)|0,re=re+Math.imul(Ke,ht)|0,Z=Z+Math.imul(Ne,Wt)|0,G=G+Math.imul(Ne,cr)|0,G=G+Math.imul(et,Wt)|0,re=re+Math.imul(et,cr)|0,Z=Z+Math.imul(_e,ct)|0,G=G+Math.imul(_e,qe)|0,G=G+Math.imul(ze,ct)|0,re=re+Math.imul(ze,qe)|0,Z=Z+Math.imul(Ae,bt)|0,G=G+Math.imul(Ae,Et)|0,G=G+Math.imul(ye,bt)|0,re=re+Math.imul(ye,Et)|0;var rr=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(rr>>>26)|0,rr&=67108863,Z=Math.imul(xt,gt),G=Math.imul(xt,Ct),G=G+Math.imul(Je,gt)|0,re=Math.imul(Je,Ct),Z=Z+Math.imul(it,gr)|0,G=G+Math.imul(it,ht)|0,G=G+Math.imul(lt,gr)|0,re=re+Math.imul(lt,ht)|0,Z=Z+Math.imul(Ze,Wt)|0,G=G+Math.imul(Ze,cr)|0,G=G+Math.imul(Ke,Wt)|0,re=re+Math.imul(Ke,cr)|0,Z=Z+Math.imul(Ne,ct)|0,G=G+Math.imul(Ne,qe)|0,G=G+Math.imul(et,ct)|0,re=re+Math.imul(et,qe)|0,Z=Z+Math.imul(_e,bt)|0,G=G+Math.imul(_e,Et)|0,G=G+Math.imul(ze,bt)|0,re=re+Math.imul(ze,Et)|0;var Kt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Kt>>>26)|0,Kt&=67108863,Z=Math.imul(xt,gr),G=Math.imul(xt,ht),G=G+Math.imul(Je,gr)|0,re=Math.imul(Je,ht),Z=Z+Math.imul(it,Wt)|0,G=G+Math.imul(it,cr)|0,G=G+Math.imul(lt,Wt)|0,re=re+Math.imul(lt,cr)|0,Z=Z+Math.imul(Ze,ct)|0,G=G+Math.imul(Ze,qe)|0,G=G+Math.imul(Ke,ct)|0,re=re+Math.imul(Ke,qe)|0,Z=Z+Math.imul(Ne,bt)|0,G=G+Math.imul(Ne,Et)|0,G=G+Math.imul(et,bt)|0,re=re+Math.imul(et,Et)|0;var Dt=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(Dt>>>26)|0,Dt&=67108863,Z=Math.imul(xt,Wt),G=Math.imul(xt,cr),G=G+Math.imul(Je,Wt)|0,re=Math.imul(Je,cr),Z=Z+Math.imul(it,ct)|0,G=G+Math.imul(it,qe)|0,G=G+Math.imul(lt,ct)|0,re=re+Math.imul(lt,qe)|0,Z=Z+Math.imul(Ze,bt)|0,G=G+Math.imul(Ze,Et)|0,G=G+Math.imul(Ke,bt)|0,re=re+Math.imul(Ke,Et)|0;var sr=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(sr>>>26)|0,sr&=67108863,Z=Math.imul(xt,ct),G=Math.imul(xt,qe),G=G+Math.imul(Je,ct)|0,re=Math.imul(Je,qe),Z=Z+Math.imul(it,bt)|0,G=G+Math.imul(it,Et)|0,G=G+Math.imul(lt,bt)|0,re=re+Math.imul(lt,Et)|0;var fr=(oe+Z|0)+((G&8191)<<13)|0;oe=(re+(G>>>13)|0)+(fr>>>26)|0,fr&=67108863,Z=Math.imul(xt,bt),G=Math.imul(xt,Et),G=G+Math.imul(Je,bt)|0,re=Math.imul(Je,Et);var vr=(oe+Z|0)+((G&8191)<<13)|0;return oe=(re+(G>>>13)|0)+(vr>>>26)|0,vr&=67108863,q[0]=Mt,q[1]=_t,q[2]=It,q[3]=Gt,q[4]=nr,q[5]=ar,q[6]=ir,q[7]=Be,q[8]=Fe,q[9]=Rt,q[10]=Lt,q[11]=Ut,q[12]=Qt,q[13]=rr,q[14]=Kt,q[15]=Dt,q[16]=sr,q[17]=fr,q[18]=vr,oe!==0&&(q[19]=oe,V.length++),V};Math.imul||(E=b);function p(O,F,N){N.negative=F.negative^O.negative,N.length=O.length+F.length;for(var V=0,j=0,$=0;$>>26)|0,j+=q>>>26,q&=67108863}N.words[$]=oe,V=q,q=j}return V!==0?N.words[$]=V:N.length--,N.strip()}function S(O,F,N){var V=new w;return V.mulp(O,F,N)}u.prototype.mulTo=function(F,N){var V,j=this.length+F.length;return this.length===10&&F.length===10?V=E(this,F,N):j<63?V=b(this,F,N):j<1024?V=p(this,F,N):V=S(this,F,N),V};function w(O,F){this.x=O,this.y=F}w.prototype.makeRBT=function(F){for(var N=new Array(F),V=u.prototype._countBits(F)-1,j=0;j>=1;return j},w.prototype.permute=function(F,N,V,j,$,q){for(var oe=0;oe>>1)$++;return 1<<$+1+j},w.prototype.conjugate=function(F,N,V){if(!(V<=1))for(var j=0;j>>13,V[2*q+1]=$&8191,$=$>>>13;for(q=2*N;q>=26,N+=j/67108864|0,N+=$>>>26,this.words[V]=$&67108863}return N!==0&&(this.words[V]=N,this.length++),this},u.prototype.muln=function(F){return this.clone().imuln(F)},u.prototype.sqr=function(){return this.mul(this)},u.prototype.isqr=function(){return this.imul(this.clone())},u.prototype.pow=function(F){var N=m(F);if(N.length===0)return new u(1);for(var V=this,j=0;j=0);var N=F%26,V=(F-N)/26,j=67108863>>>26-N<<26-N,$;if(N!==0){var q=0;for($=0;$>>26-N}q&&(this.words[$]=q,this.length++)}if(V!==0){for($=this.length-1;$>=0;$--)this.words[$+V]=this.words[$];for($=0;$=0);var j;N?j=(N-N%26)/26:j=0;var $=F%26,q=Math.min((F-$)/26,this.length),oe=67108863^67108863>>>$<<$,Z=V;if(j-=q,j=Math.max(0,j),Z){for(var G=0;Gq)for(this.length-=q,G=0;G=0&&(re!==0||G>=j);G--){var H=this.words[G]|0;this.words[G]=re<<26-$|H>>>$,re=H&oe}return Z&&re!==0&&(Z.words[Z.length++]=re),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},u.prototype.ishrn=function(F,N,V){return a(this.negative===0),this.iushrn(F,N,V)},u.prototype.shln=function(F){return this.clone().ishln(F)},u.prototype.ushln=function(F){return this.clone().iushln(F)},u.prototype.shrn=function(F){return this.clone().ishrn(F)},u.prototype.ushrn=function(F){return this.clone().iushrn(F)},u.prototype.testn=function(F){a(typeof F=="number"&&F>=0);var N=F%26,V=(F-N)/26,j=1<=0);var N=F%26,V=(F-N)/26;if(a(this.negative===0,"imaskn works only with positive numbers"),this.length<=V)return this;if(N!==0&&V++,this.length=Math.min(V,this.length),N!==0){var j=67108863^67108863>>>N<=67108864;N++)this.words[N]-=67108864,N===this.length-1?this.words[N+1]=1:this.words[N+1]++;return this.length=Math.max(this.length,N+1),this},u.prototype.isubn=function(F){if(a(typeof F=="number"),a(F<67108864),F<0)return this.iaddn(-F);if(this.negative!==0)return this.negative=0,this.iaddn(F),this.negative=1,this;if(this.words[0]-=F,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var N=0;N>26)-(Z/67108864|0),this.words[$+V]=q&67108863}for(;$>26,this.words[$+V]=q&67108863;if(oe===0)return this.strip();for(a(oe===-1),oe=0,$=0;$>26,this.words[$]=q&67108863;return this.negative=1,this.strip()},u.prototype._wordDiv=function(F,N){var V=this.length-F.length,j=this.clone(),$=F,q=$.words[$.length-1]|0,oe=this._countBits(q);V=26-oe,V!==0&&($=$.ushln(V),j.iushln(V),q=$.words[$.length-1]|0);var Z=j.length-$.length,G;if(N!=="mod"){G=new u(null),G.length=Z+1,G.words=new Array(G.length);for(var re=0;re=0;J--){var ae=(j.words[$.length+J]|0)*67108864+(j.words[$.length+J-1]|0);for(ae=Math.min(ae/q|0,67108863),j._ishlnsubmul($,ae,J);j.negative!==0;)ae--,j.negative=0,j._ishlnsubmul($,1,J),j.isZero()||(j.negative^=1);G&&(G.words[J]=ae)}return G&&G.strip(),j.strip(),N!=="div"&&V!==0&&j.iushrn(V),{div:G||null,mod:j}},u.prototype.divmod=function(F,N,V){if(a(!F.isZero()),this.isZero())return{div:new u(0),mod:new u(0)};var j,$,q;return this.negative!==0&&F.negative===0?(q=this.neg().divmod(F,N),N!=="mod"&&(j=q.div.neg()),N!=="div"&&($=q.mod.neg(),V&&$.negative!==0&&$.iadd(F)),{div:j,mod:$}):this.negative===0&&F.negative!==0?(q=this.divmod(F.neg(),N),N!=="mod"&&(j=q.div.neg()),{div:j,mod:q.mod}):this.negative&F.negative?(q=this.neg().divmod(F.neg(),N),N!=="div"&&($=q.mod.neg(),V&&$.negative!==0&&$.isub(F)),{div:q.div,mod:$}):F.length>this.length||this.cmp(F)<0?{div:new u(0),mod:this}:F.length===1?N==="div"?{div:this.divn(F.words[0]),mod:null}:N==="mod"?{div:null,mod:new u(this.modn(F.words[0]))}:{div:this.divn(F.words[0]),mod:new u(this.modn(F.words[0]))}:this._wordDiv(F,N)},u.prototype.div=function(F){return this.divmod(F,"div",!1).div},u.prototype.mod=function(F){return this.divmod(F,"mod",!1).mod},u.prototype.umod=function(F){return this.divmod(F,"mod",!0).mod},u.prototype.divRound=function(F){var N=this.divmod(F);if(N.mod.isZero())return N.div;var V=N.div.negative!==0?N.mod.isub(F):N.mod,j=F.ushrn(1),$=F.andln(1),q=V.cmp(j);return q<0||$===1&&q===0?N.div:N.div.negative!==0?N.div.isubn(1):N.div.iaddn(1)},u.prototype.modn=function(F){a(F<=67108863);for(var N=(1<<26)%F,V=0,j=this.length-1;j>=0;j--)V=(N*V+(this.words[j]|0))%F;return V},u.prototype.idivn=function(F){a(F<=67108863);for(var N=0,V=this.length-1;V>=0;V--){var j=(this.words[V]|0)+N*67108864;this.words[V]=j/F|0,N=j%F}return this.strip()},u.prototype.divn=function(F){return this.clone().idivn(F)},u.prototype.egcd=function(F){a(F.negative===0),a(!F.isZero());var N=this,V=F.clone();N.negative!==0?N=N.umod(F):N=N.clone();for(var j=new u(1),$=new u(0),q=new u(0),oe=new u(1),Z=0;N.isEven()&&V.isEven();)N.iushrn(1),V.iushrn(1),++Z;for(var G=V.clone(),re=N.clone();!N.isZero();){for(var H=0,J=1;!(N.words[0]&J)&&H<26;++H,J<<=1);if(H>0)for(N.iushrn(H);H-- >0;)(j.isOdd()||$.isOdd())&&(j.iadd(G),$.isub(re)),j.iushrn(1),$.iushrn(1);for(var ae=0,K=1;!(V.words[0]&K)&&ae<26;++ae,K<<=1);if(ae>0)for(V.iushrn(ae);ae-- >0;)(q.isOdd()||oe.isOdd())&&(q.iadd(G),oe.isub(re)),q.iushrn(1),oe.iushrn(1);N.cmp(V)>=0?(N.isub(V),j.isub(q),$.isub(oe)):(V.isub(N),q.isub(j),oe.isub($))}return{a:q,b:oe,gcd:V.iushln(Z)}},u.prototype._invmp=function(F){a(F.negative===0),a(!F.isZero());var N=this,V=F.clone();N.negative!==0?N=N.umod(F):N=N.clone();for(var j=new u(1),$=new u(0),q=V.clone();N.cmpn(1)>0&&V.cmpn(1)>0;){for(var oe=0,Z=1;!(N.words[0]&Z)&&oe<26;++oe,Z<<=1);if(oe>0)for(N.iushrn(oe);oe-- >0;)j.isOdd()&&j.iadd(q),j.iushrn(1);for(var G=0,re=1;!(V.words[0]&re)&&G<26;++G,re<<=1);if(G>0)for(V.iushrn(G);G-- >0;)$.isOdd()&&$.iadd(q),$.iushrn(1);N.cmp(V)>=0?(N.isub(V),j.isub($)):(V.isub(N),$.isub(j))}var H;return N.cmpn(1)===0?H=j:H=$,H.cmpn(0)<0&&H.iadd(F),H},u.prototype.gcd=function(F){if(this.isZero())return F.abs();if(F.isZero())return this.abs();var N=this.clone(),V=F.clone();N.negative=0,V.negative=0;for(var j=0;N.isEven()&&V.isEven();j++)N.iushrn(1),V.iushrn(1);do{for(;N.isEven();)N.iushrn(1);for(;V.isEven();)V.iushrn(1);var $=N.cmp(V);if($<0){var q=N;N=V,V=q}else if($===0||V.cmpn(1)===0)break;N.isub(V)}while(!0);return V.iushln(j)},u.prototype.invm=function(F){return this.egcd(F).a.umod(F)},u.prototype.isEven=function(){return(this.words[0]&1)===0},u.prototype.isOdd=function(){return(this.words[0]&1)===1},u.prototype.andln=function(F){return this.words[0]&F},u.prototype.bincn=function(F){a(typeof F=="number");var N=F%26,V=(F-N)/26,j=1<>>26,oe&=67108863,this.words[q]=oe}return $!==0&&(this.words[q]=$,this.length++),this},u.prototype.isZero=function(){return this.length===1&&this.words[0]===0},u.prototype.cmpn=function(F){var N=F<0;if(this.negative!==0&&!N)return-1;if(this.negative===0&&N)return 1;this.strip();var V;if(this.length>1)V=1;else{N&&(F=-F),a(F<=67108863,"Number is too big");var j=this.words[0]|0;V=j===F?0:jF.length)return 1;if(this.length=0;V--){var j=this.words[V]|0,$=F.words[V]|0;if(j!==$){j<$?N=-1:j>$&&(N=1);break}}return N},u.prototype.gtn=function(F){return this.cmpn(F)===1},u.prototype.gt=function(F){return this.cmp(F)===1},u.prototype.gten=function(F){return this.cmpn(F)>=0},u.prototype.gte=function(F){return this.cmp(F)>=0},u.prototype.ltn=function(F){return this.cmpn(F)===-1},u.prototype.lt=function(F){return this.cmp(F)===-1},u.prototype.lten=function(F){return this.cmpn(F)<=0},u.prototype.lte=function(F){return this.cmp(F)<=0},u.prototype.eqn=function(F){return this.cmpn(F)===0},u.prototype.eq=function(F){return this.cmp(F)===0},u.red=function(F){return new _(F)},u.prototype.toRed=function(F){return a(!this.red,"Already a number in reduction context"),a(this.negative===0,"red works only with positives"),F.convertTo(this)._forceRed(F)},u.prototype.fromRed=function(){return a(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},u.prototype._forceRed=function(F){return this.red=F,this},u.prototype.forceRed=function(F){return a(!this.red,"Already a number in reduction context"),this._forceRed(F)},u.prototype.redAdd=function(F){return a(this.red,"redAdd works only with red numbers"),this.red.add(this,F)},u.prototype.redIAdd=function(F){return a(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,F)},u.prototype.redSub=function(F){return a(this.red,"redSub works only with red numbers"),this.red.sub(this,F)},u.prototype.redISub=function(F){return a(this.red,"redISub works only with red numbers"),this.red.isub(this,F)},u.prototype.redShl=function(F){return a(this.red,"redShl works only with red numbers"),this.red.shl(this,F)},u.prototype.redMul=function(F){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.mul(this,F)},u.prototype.redIMul=function(F){return a(this.red,"redMul works only with red numbers"),this.red._verify2(this,F),this.red.imul(this,F)},u.prototype.redSqr=function(){return a(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},u.prototype.redISqr=function(){return a(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},u.prototype.redSqrt=function(){return a(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},u.prototype.redInvm=function(){return a(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},u.prototype.redNeg=function(){return a(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},u.prototype.redPow=function(F){return a(this.red&&!F.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,F)};var i={k256:null,p224:null,p192:null,p25519:null};function C(O,F){this.name=O,this.p=new u(F,16),this.n=this.p.bitLength(),this.k=new u(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}C.prototype._tmp=function(){var F=new u(null);return F.words=new Array(Math.ceil(this.n/13)),F},C.prototype.ireduce=function(F){var N=F,V;do this.split(N,this.tmp),N=this.imulK(N),N=N.iadd(this.tmp),V=N.bitLength();while(V>this.n);var j=V0?N.isub(this.p):N.strip!==void 0?N.strip():N._strip(),N},C.prototype.split=function(F,N){F.iushrn(this.n,0,N)},C.prototype.imulK=function(F){return F.imul(this.k)};function x(){C.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(x,C),x.prototype.split=function(F,N){for(var V=4194303,j=Math.min(F.length,9),$=0;$>>22,q=oe}q>>>=22,F.words[$-10]=q,q===0&&F.length>10?F.length-=10:F.length-=9},x.prototype.imulK=function(F){F.words[F.length]=0,F.words[F.length+1]=0,F.length+=2;for(var N=0,V=0;V>>=26,F.words[V]=$,N=j}return N!==0&&(F.words[F.length++]=N),F},u._prime=function(F){if(i[F])return i[F];var N;if(F==="k256")N=new x;else if(F==="p224")N=new k;else if(F==="p192")N=new I;else if(F==="p25519")N=new B;else throw new Error("Unknown prime "+F);return i[F]=N,N};function _(O){if(typeof O=="string"){var F=u._prime(O);this.m=F.p,this.prime=F}else a(O.gtn(1),"modulus must be greater than 1"),this.m=O,this.prime=null}_.prototype._verify1=function(F){a(F.negative===0,"red works only with positives"),a(F.red,"red works only with red numbers")},_.prototype._verify2=function(F,N){a((F.negative|N.negative)===0,"red works only with positives"),a(F.red&&F.red===N.red,"red works only with red numbers")},_.prototype.imod=function(F){return this.prime?this.prime.ireduce(F)._forceRed(this):F.umod(this.m)._forceRed(this)},_.prototype.neg=function(F){return F.isZero()?F.clone():this.m.sub(F)._forceRed(this)},_.prototype.add=function(F,N){this._verify2(F,N);var V=F.add(N);return V.cmp(this.m)>=0&&V.isub(this.m),V._forceRed(this)},_.prototype.iadd=function(F,N){this._verify2(F,N);var V=F.iadd(N);return V.cmp(this.m)>=0&&V.isub(this.m),V},_.prototype.sub=function(F,N){this._verify2(F,N);var V=F.sub(N);return V.cmpn(0)<0&&V.iadd(this.m),V._forceRed(this)},_.prototype.isub=function(F,N){this._verify2(F,N);var V=F.isub(N);return V.cmpn(0)<0&&V.iadd(this.m),V},_.prototype.shl=function(F,N){return this._verify1(F),this.imod(F.ushln(N))},_.prototype.imul=function(F,N){return this._verify2(F,N),this.imod(F.imul(N))},_.prototype.mul=function(F,N){return this._verify2(F,N),this.imod(F.mul(N))},_.prototype.isqr=function(F){return this.imul(F,F.clone())},_.prototype.sqr=function(F){return this.mul(F,F)},_.prototype.sqrt=function(F){if(F.isZero())return F.clone();var N=this.m.andln(3);if(a(N%2===1),N===3){var V=this.m.add(new u(1)).iushrn(2);return this.pow(F,V)}for(var j=this.m.subn(1),$=0;!j.isZero()&&j.andln(1)===0;)$++,j.iushrn(1);a(!j.isZero());var q=new u(1).toRed(this),oe=q.redNeg(),Z=this.m.subn(1).iushrn(1),G=this.m.bitLength();for(G=new u(2*G*G).toRed(this);this.pow(G,Z).cmp(oe)!==0;)G.redIAdd(oe);for(var re=this.pow(G,j),H=this.pow(F,j.addn(1).iushrn(1)),J=this.pow(F,j),ae=$;J.cmp(q)!==0;){for(var K=J,Y=0;K.cmp(q)!==0;Y++)K=K.redSqr();a(Y=0;$--){for(var re=N.words[$],H=G-1;H>=0;H--){var J=re>>H&1;if(q!==j[0]&&(q=this.sqr(q)),J===0&&oe===0){Z=0;continue}oe<<=1,oe|=J,Z++,!(Z!==V&&($!==0||H!==0))&&(q=this.mul(q,j[oe]),Z=0,oe=0)}G=26}return q},_.prototype.convertTo=function(F){var N=F.umod(this.m);return N===F?N.clone():N},_.prototype.convertFrom=function(F){var N=F.clone();return N.red=null,N},u.mont=function(F){return new z(F)};function z(O){_.call(this,O),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new u(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)}c(z,_),z.prototype.convertTo=function(F){return this.imod(F.ushln(this.shift))},z.prototype.convertFrom=function(F){var N=this.imod(F.mul(this.rinv));return N.red=null,N},z.prototype.imul=function(F,N){if(F.isZero()||N.isZero())return F.words[0]=0,F.length=1,F;var V=F.imul(N),j=V.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=V.isub(j).iushrn(this.shift),q=$;return $.cmp(this.m)>=0?q=$.isub(this.m):$.cmpn(0)<0&&(q=$.iadd(this.m)),q._forceRed(this)},z.prototype.mul=function(F,N){if(F.isZero()||N.isZero())return new u(0)._forceRed(this);var V=F.mul(N),j=V.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),$=V.isub(j).iushrn(this.shift),q=$;return $.cmp(this.m)>=0?q=$.isub(this.m):$.cmpn(0)<0&&(q=$.iadd(this.m)),q._forceRed(this)},z.prototype.invm=function(F){var N=this.imod(F._invmp(this.m).mul(this.r2));return N._forceRed(this)}}(d,this)},2692:function(d){d.exports=g;function g(r){var t,s,a,c=r.length,u=0;for(t=0;t>>1;if(!(w<=0)){var i,C=t.mallocDouble(2*w*p),x=t.mallocInt32(p);if(p=u(v,w,C,x),p>0){if(w===1&&E)s.init(p),i=s.sweepComplete(w,b,0,p,C,x,0,p,C,x);else{var k=t.mallocDouble(2*w*S),I=t.mallocInt32(S);S=u(m,w,k,I),S>0&&(s.init(p+S),w===1?i=s.sweepBipartite(w,b,0,p,C,x,0,S,k,I):i=a(w,b,E,p,C,x,S,k,I),t.free(k),t.free(I))}t.free(C),t.free(x)}return i}}}var y;function h(v,m){y.push([v,m])}function T(v){return y=[],l(v,v,h,!0),y}function f(v,m){return y=[],l(v,m,h,!1),y}function n(v,m,b){switch(arguments.length){case 1:return T(v);case 2:return typeof m=="function"?l(v,v,m,!0):f(v,m);case 3:return l(v,m,b,!1);default:throw new Error("box-intersect: Invalid arguments")}}},7333:function(d,g){function r(){function a(l,y,h,T,f,n,v,m,b,E,p){for(var S=2*l,w=T,i=S*T;wb-m?a(l,y,h,T,f,n,v,m,b,E,p):c(l,y,h,T,f,n,v,m,b,E,p)}return u}function t(){function a(h,T,f,n,v,m,b,E,p,S,w){for(var i=2*h,C=n,x=i*n;CS-p?n?a(h,T,f,v,m,b,E,p,S,w,i):c(h,T,f,v,m,b,E,p,S,w,i):n?u(h,T,f,v,m,b,E,p,S,w,i):l(h,T,f,v,m,b,E,p,S,w,i)}return y}function s(a){return a?r():t()}g.partial=s(!1),g.full=s(!0)},2337:function(d,g,r){d.exports=O;var t=r(5306),s=r(2288),a=r(7333),c=a.partial,u=a.full,l=r(1390),y=r(2464),h=r(122),T=128,f=1<<22,n=1<<22,v=h("!(lo>=p0)&&!(p1>=hi)"),m=h("lo===p0"),b=h("lo0;){re-=1;var ae=re*w,K=x[ae],Y=x[ae+1],ie=x[ae+2],ne=x[ae+3],le=x[ae+4],de=x[ae+5],we=re*i,me=k[we],Le=k[we+1],ve=de&1,Ae=!!(de&16),ye=$,Se=q,_e=Z,ze=G;if(ve&&(ye=Z,Se=G,_e=$,ze=q),!(de&2&&(ie=b(F,K,Y,ie,ye,Se,Le),Y>=ie))&&!(de&4&&(Y=E(F,K,Y,ie,ye,Se,me),Y>=ie))){var Ie=ie-Y,Ne=le-ne;if(Ae){if(F*Ie*(Ie+Ne)h&&f[S+y]>E;--p,S-=v){for(var w=S,i=S+v,C=0;C>>1,E=2*l,p=b,S=f[E*b+y];v=k?(p=x,S=k):C>=B?(p=i,S=C):(p=I,S=B):k>=B?(p=x,S=k):B>=C?(p=i,S=C):(p=I,S=B);for(var O=E*(m-1),F=E*p,_=0;_=p0)&&!(p1>=hi)":y};function r(h){return g[h]}function t(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+i];if(k===b)if(w===x)w+=1,S+=E;else{for(var I=0;E>I;++I){var B=v[p+I];v[p+I]=v[S],v[S++]=B}var _=m[x];m[x]=m[w],m[w++]=_}}return w}function s(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+i];if(kI;++I){var B=v[p+I];v[p+I]=v[S],v[S++]=B}var _=m[x];m[x]=m[w],m[w++]=_}}return w}function a(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+C];if(k<=b)if(w===x)w+=1,S+=E;else{for(var I=0;E>I;++I){var B=v[p+I];v[p+I]=v[S],v[S++]=B}var _=m[x];m[x]=m[w],m[w++]=_}}return w}function c(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+C];if(k<=b)if(w===x)w+=1,S+=E;else{for(var I=0;E>I;++I){var B=v[p+I];v[p+I]=v[S],v[S++]=B}var _=m[x];m[x]=m[w],m[w++]=_}}return w}function u(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+i],I=v[p+C];if(k<=b&&b<=I)if(w===x)w+=1,S+=E;else{for(var B=0;E>B;++B){var _=v[p+B];v[p+B]=v[S],v[S++]=_}var z=m[x];m[x]=m[w],m[w++]=z}}return w}function l(h,T,f,n,v,m,b){for(var E=2*h,p=E*f,S=p,w=f,i=T,C=h+T,x=f;n>x;++x,p+=E){var k=v[p+i],I=v[p+C];if(kB;++B){var _=v[p+B];v[p+B]=v[S],v[S++]=_}var z=m[x];m[x]=m[w],m[w++]=z}}return w}function y(h,T,f,n,v,m,b,E){for(var p=2*h,S=p*f,w=S,i=f,C=T,x=h+T,k=f;n>k;++k,S+=p){var I=v[S+C],B=v[S+x];if(!(I>=b)&&!(E>=B))if(i===k)i+=1,w+=p;else{for(var _=0;p>_;++_){var z=v[S+_];v[S+_]=v[w],v[w++]=z}var O=m[k];m[k]=m[i],m[i++]=O}}return i}},309:function(d){d.exports=r;var g=32;function r(T,f){f<=4*g?t(0,f-1,T):h(0,f-1,T)}function t(T,f,n){for(var v=2*(T+1),m=T+1;m<=f;++m){for(var b=n[v++],E=n[v++],p=m,S=v-2;p-- >T;){var w=n[S-2],i=n[S-1];if(wn[f+1]:!0}function y(T,f,n,v){T*=2;var m=v[T];return m>1,p=E-v,S=E+v,w=m,i=p,C=E,x=S,k=b,I=T+1,B=f-1,_=0;l(w,i,n)&&(_=w,w=i,i=_),l(x,k,n)&&(_=x,x=k,k=_),l(w,C,n)&&(_=w,w=C,C=_),l(i,C,n)&&(_=i,i=C,C=_),l(w,x,n)&&(_=w,w=x,x=_),l(C,x,n)&&(_=C,C=x,x=_),l(i,k,n)&&(_=i,i=k,k=_),l(i,C,n)&&(_=i,i=C,C=_),l(x,k,n)&&(_=x,x=k,k=_);for(var z=n[2*i],O=n[2*i+1],F=n[2*x],N=n[2*x+1],V=2*w,j=2*C,$=2*k,q=2*m,oe=2*E,Z=2*b,G=0;G<2;++G){var re=n[V+G],H=n[j+G],J=n[$+G];n[q+G]=re,n[oe+G]=H,n[Z+G]=J}a(p,T,n),a(S,f,n);for(var ae=I;ae<=B;++ae)if(y(ae,z,O,n))ae!==I&&s(ae,I,n),++I;else if(!y(ae,F,N,n))for(;;)if(y(B,F,N,n)){y(B,z,O,n)?(c(ae,I,B,n),++I,--B):(s(ae,B,n),--B);break}else{if(--B>>1;a(v,H);for(var J=0,ae=0,oe=0;oe=c)K=K-c|0,b(h,T,ae--,K);else if(K>=0)b(l,y,J--,K);else if(K<=-268435456){K=-K-c|0;for(var Y=0;Y>>1;a(v,H);for(var J=0,ae=0,K=0,oe=0;oe>1===v[2*oe+3]>>1&&(ie=2,oe+=1),Y<0){for(var ne=-(Y>>1)-1,le=0;le>1)-1;ie===0?b(l,y,J--,ne):ie===1?b(h,T,ae--,ne):ie===2&&b(f,n,K--,ne)}}}function w(C,x,k,I,B,_,z,O,F,N,V,j){var $=0,q=2*C,oe=x,Z=x+C,G=1,re=1;I?re=c:G=c;for(var H=B;H<_;++H){var J=H+G,ae=q*H;v[$++]=z[ae+oe],v[$++]=-J,v[$++]=z[ae+Z],v[$++]=J}for(var H=F;H>>1;a(v,Y);for(var ie=0,H=0;H=c?(le=!I,J-=c):(le=!!I,J-=1),le)E(l,y,ie++,J);else{var de=j[J],we=q*J,me=V[we+x+1],Le=V[we+x+1+C];e:for(var ve=0;ve>>1;a(v,J);for(var ae=0,Z=0;Z=c)l[ae++]=G-c;else{G-=1;var Y=V[G],ie=$*G,ne=N[ie+x+1],le=N[ie+x+1+C];e:for(var de=0;de=0;--de)if(l[de]===G){for(var ve=de+1;ve0;){for(var v=l.pop(),T=l.pop(),m=-1,b=-1,f=h[T],p=1;p=0||(u.flip(T,v),s(c,u,l,m,T,b),s(c,u,l,T,b,m),s(c,u,l,b,v,m),s(c,u,l,v,m,b))}}},7098:function(d,g,r){var t=r(5070);d.exports=y;function s(h,T,f,n,v,m,b){this.cells=h,this.neighbor=T,this.flags=n,this.constraint=f,this.active=v,this.next=m,this.boundary=b}var a=s.prototype;function c(h,T){return h[0]-T[0]||h[1]-T[1]||h[2]-T[2]}a.locate=function(){var h=[0,0,0];return function(T,f,n){var v=T,m=f,b=n;return f0||b.length>0;){for(;m.length>0;){var i=m.pop();if(E[i]!==-v){E[i]=v,p[i];for(var C=0;C<3;++C){var x=w[3*i+C];x>=0&&E[x]===0&&(S[3*i+C]?b.push(x):(m.push(x),E[x]=v))}}}var k=b;b=m,m=k,b.length=0,v=-v}var I=l(p,E,T);return f?I.concat(n.boundary):I}},9971:function(d,g,r){var t=r(5070),s=r(417)[3],a=0,c=1,u=2;d.exports=b;function l(E,p,S,w,i){this.a=E,this.b=p,this.idx=S,this.lowerIds=w,this.upperIds=i}function y(E,p,S,w){this.a=E,this.b=p,this.type=S,this.idx=w}function h(E,p){var S=E.a[0]-p.a[0]||E.a[1]-p.a[1]||E.type-p.type;return S||E.type!==a&&(S=s(E.a,E.b,p.b),S)?S:E.idx-p.idx}function T(E,p){return s(E.a,E.b,p)}function f(E,p,S,w,i){for(var C=t.lt(p,w,T),x=t.gt(p,w,T),k=C;k1&&s(S[B[z-2]],S[B[z-1]],w)>0;)E.push([B[z-1],B[z-2],i]),z-=1;B.length=z,B.push(i);for(var _=I.upperIds,z=_.length;z>1&&s(S[_[z-2]],S[_[z-1]],w)<0;)E.push([_[z-2],_[z-1],i]),z-=1;_.length=z,_.push(i)}}function n(E,p){var S;return E.a[0]I[0]&&i.push(new y(I,k,u,C),new y(k,I,c,C))}i.sort(h);for(var B=i[0].a[0]-(1+Math.abs(i[0].a[0]))*Math.pow(2,-52),_=[new l([B,1],[B,0],-1,[],[])],z=[],C=0,O=i.length;C=0}}(),a.removeTriangle=function(l,y,h){var T=this.stars;c(T[l],y,h),c(T[y],h,l),c(T[h],l,y)},a.addTriangle=function(l,y,h){var T=this.stars;T[l].push(y,h),T[y].push(h,l),T[h].push(l,y)},a.opposite=function(l,y){for(var h=this.stars[y],T=1,f=h.length;T=0;--F){var re=z[F];N=re[0];var H=B[N],J=H[0],ae=H[1],K=I[J],Y=I[ae];if((K[0]-Y[0]||K[1]-Y[1])<0){var ie=J;J=ae,ae=ie}H[0]=J;var ne=H[1]=re[1],le;for(O&&(le=H[2]);F>0&&z[F-1][0]===N;){var re=z[--F],de=re[1];O?B.push([ne,de,le]):B.push([ne,de]),ne=de}O?B.push([ne,ae,le]):B.push([ne,ae])}return V}function p(I,B,_){for(var z=B.length,O=new t(z),F=[],N=0;NB[2]?1:0)}function i(I,B,_){if(I.length!==0){if(B)for(var z=0;z0||N.length>0}function k(I,B,_){var z;if(_){z=B;for(var O=new Array(B.length),F=0;FE+1)throw new Error(m+" map requires nshades to be at least size "+v.length);Array.isArray(y.alpha)?y.alpha.length!==2?p=[1,1]:p=y.alpha.slice():typeof y.alpha=="number"?p=[y.alpha,y.alpha]:p=[1,1],h=v.map(function(k){return Math.round(k.index*E)}),p[0]=Math.min(Math.max(p[0],0),1),p[1]=Math.min(Math.max(p[1],0),1);var w=v.map(function(k,I){var B=v[I].index,_=v[I].rgb.slice();return _.length===4&&_[3]>=0&&_[3]<=1||(_[3]=p[0]+(p[1]-p[0])*B),_}),i=[];for(S=0;S=0}function y(h,T,f,n){var v=t(T,f,n);if(v===0){var m=s(t(h,T,f)),b=s(t(h,T,n));if(m===b){if(m===0){var E=l(h,T,f),p=l(h,T,n);return E===p?0:E?1:-1}return 0}else{if(b===0)return m>0||l(h,T,n)?-1:1;if(m===0)return b>0||l(h,T,f)?1:-1}return s(b-m)}var S=t(h,T,f);if(S>0)return v>0&&t(h,T,n)>0?1:-1;if(S<0)return v>0||t(h,T,n)>0?1:-1;var w=t(h,T,n);return w>0||l(h,T,f)?1:-1}},7538:function(d){d.exports=function(r){return r<0?-1:r>0?1:0}},9209:function(d){d.exports=t;var g=Math.min;function r(s,a){return s-a}function t(s,a){var c=s.length,u=s.length-a.length;if(u)return u;switch(c){case 0:return 0;case 1:return s[0]-a[0];case 2:return s[0]+s[1]-a[0]-a[1]||g(s[0],s[1])-g(a[0],a[1]);case 3:var l=s[0]+s[1],y=a[0]+a[1];if(u=l+s[2]-(y+a[2]),u)return u;var h=g(s[0],s[1]),T=g(a[0],a[1]);return g(h,s[2])-g(T,a[2])||g(h+s[2],l)-g(T+a[2],y);case 4:var f=s[0],n=s[1],v=s[2],m=s[3],b=a[0],E=a[1],p=a[2],S=a[3];return f+n+v+m-(b+E+p+S)||g(f,n,v,m)-g(b,E,p,S,b)||g(f+n,f+v,f+m,n+v,n+m,v+m)-g(b+E,b+p,b+S,E+p,E+S,p+S)||g(f+n+v,f+n+m,f+v+m,n+v+m)-g(b+E+p,b+E+S,b+p+S,E+p+S);default:for(var w=s.slice().sort(r),i=a.slice().sort(r),C=0;Cr[s][0]&&(s=a);return ts?[[s],[t]]:[[t]]}},8722:function(d,g,r){d.exports=s;var t=r(3266);function s(a){var c=t(a),u=c.length;if(u<=2)return[];for(var l=new Array(u),y=c[u-1],h=0;h=y[b]&&(m+=1);n[v]=m}}return l}function u(l,y){try{return t(l,!0)}catch{var h=s(l);if(h.length<=y)return[];var T=a(l,h),f=t(T,!0);return c(f,h)}}},9680:function(d){function g(t,s,a,c,u,l){var y=6*u*u-6*u,h=3*u*u-4*u+1,T=-6*u*u+6*u,f=3*u*u-2*u;if(t.length){l||(l=new Array(t.length));for(var n=t.length-1;n>=0;--n)l[n]=y*t[n]+h*s[n]+T*a[n]+f*c[n];return l}return y*t+h*s+T*a[n]+f*c}function r(t,s,a,c,u,l){var y=u-1,h=u*u,T=y*y,f=(1+2*u)*T,n=u*T,v=h*(3-2*u),m=h*y;if(t.length){l||(l=new Array(t.length));for(var b=t.length-1;b>=0;--b)l[b]=f*t[b]+n*s[b]+v*a[b]+m*c[b];return l}return f*t+n*s+v*a+m*c}d.exports=r,d.exports.derivative=g},4419:function(d,g,r){var t=r(2183),s=r(1215);d.exports=l;function a(y,h){this.point=y,this.index=h}function c(y,h){for(var T=y.point,f=h.point,n=T.length,v=0;v=2)return!1;_[O]=F}return!0}):B=B.filter(function(_){for(var z=0;z<=f;++z){var O=C[_[z]];if(O<0)return!1;_[z]=O}return!0}),f&1)for(var m=0;m>>31},d.exports.exponent=function(a){var c=d.exports.hi(a);return(c<<1>>>21)-1023},d.exports.fraction=function(a){var c=d.exports.lo(a),u=d.exports.hi(a),l=u&(1<<20)-1;return u&2146435072&&(l+=1048576),[c,l]},d.exports.denormalized=function(a){var c=d.exports.hi(a);return!(c&2146435072)}},3094:function(d){function g(s,a,c){var u=s[c]|0;if(u<=0)return[];var l=new Array(u),y;if(c===s.length-1)for(y=0;y"u"&&(a=0),typeof s){case"number":if(s>0)return r(s|0,a);break;case"object":if(typeof s.length=="number")return g(s,a,0);break}return[]}d.exports=t},8348:function(d,g,r){d.exports=s;var t=r(1215);function s(a,c){var u=a.length;if(typeof c!="number"){c=0;for(var l=0;l=f-1)for(var S=m.length-1,i=h-T[f-1],w=0;w=f-1){var p=m.length-1;h-T[f-1];for(var S=0;S=0;--f)if(h[--T])return!1;return!0},u.jump=function(h){var T=this.lastT(),f=this.dimension;if(!(h0;--w)n.push(a(E[w-1],p[w-1],arguments[w])),v.push(0)}},u.push=function(h){var T=this.lastT(),f=this.dimension;if(!(h1e-6?1/b:0;this._time.push(h);for(var i=f;i>0;--i){var C=a(p[i-1],S[i-1],arguments[i]);n.push(C),v.push((C-n[m++])*w)}}},u.set=function(h){var T=this.dimension;if(!(h0;--E)f.push(a(m[E-1],b[E-1],arguments[E])),n.push(0)}},u.move=function(h){var T=this.lastT(),f=this.dimension;if(!(h<=T||arguments.length!==f+1)){var n=this._state,v=this._velocity,m=n.length-this.dimension,b=this.bounds,E=b[0],p=b[1],S=h-T,w=S>1e-6?1/S:0;this._time.push(h);for(var i=f;i>0;--i){var C=arguments[i];n.push(a(E[i-1],p[i-1],n[m++]+C)),v.push(C*w)}}},u.idle=function(h){var T=this.lastT();if(!(h=0;--w)n.push(a(E[w],p[w],n[m]+S*v[m])),v.push(0),m+=1}};function l(h){for(var T=new Array(h),f=0;f=0;--I){var i=C[I];x[I]<=0?C[I]=new t(i._color,i.key,i.value,C[I+1],i.right,i._count+1):C[I]=new t(i._color,i.key,i.value,i.left,C[I+1],i._count+1)}for(var I=C.length-1;I>1;--I){var B=C[I-1],i=C[I];if(B._color===r||i._color===r)break;var _=C[I-2];if(_.left===B)if(B.left===i){var z=_.right;if(z&&z._color===g)B._color=r,_.right=a(r,z),_._color=g,I-=1;else{if(_._color=g,_.left=B.right,B._color=r,B.right=_,C[I-2]=B,C[I-1]=i,c(_),c(B),I>=3){var O=C[I-3];O.left===_?O.left=B:O.right=B}break}}else{var z=_.right;if(z&&z._color===g)B._color=r,_.right=a(r,z),_._color=g,I-=1;else{if(B.right=i.left,_._color=g,_.left=i.right,i._color=r,i.left=B,i.right=_,C[I-2]=i,C[I-1]=B,c(_),c(B),c(i),I>=3){var O=C[I-3];O.left===_?O.left=i:O.right=i}break}}else if(B.right===i){var z=_.left;if(z&&z._color===g)B._color=r,_.left=a(r,z),_._color=g,I-=1;else{if(_._color=g,_.right=B.left,B._color=r,B.left=_,C[I-2]=B,C[I-1]=i,c(_),c(B),I>=3){var O=C[I-3];O.right===_?O.right=B:O.left=B}break}}else{var z=_.left;if(z&&z._color===g)B._color=r,_.left=a(r,z),_._color=g,I-=1;else{if(B.left=i.right,_._color=g,_.right=i.left,i._color=r,i.right=B,i.left=_,C[I-2]=i,C[I-1]=B,c(_),c(B),c(i),I>=3){var O=C[I-3];O.right===_?O.right=i:O.left=i}break}}}return C[0]._color=r,new u(w,C[0])};function y(p,S){if(S.left){var w=y(p,S.left);if(w)return w}var w=p(S.key,S.value);if(w)return w;if(S.right)return y(p,S.right)}function h(p,S,w,i){var C=S(p,i.key);if(C<=0){if(i.left){var x=h(p,S,w,i.left);if(x)return x}var x=w(i.key,i.value);if(x)return x}if(i.right)return h(p,S,w,i.right)}function T(p,S,w,i,C){var x=w(p,C.key),k=w(S,C.key),I;if(x<=0&&(C.left&&(I=T(p,S,w,i,C.left),I)||k>0&&(I=i(C.key,C.value),I)))return I;if(k>0&&C.right)return T(p,S,w,i,C.right)}l.forEach=function(S,w,i){if(this.root)switch(arguments.length){case 1:return y(S,this.root);case 2:return h(w,this._compare,S,this.root);case 3:return this._compare(w,i)>=0?void 0:T(w,i,this._compare,S,this.root)}},Object.defineProperty(l,"begin",{get:function(){for(var p=[],S=this.root;S;)p.push(S),S=S.left;return new f(this,p)}}),Object.defineProperty(l,"end",{get:function(){for(var p=[],S=this.root;S;)p.push(S),S=S.right;return new f(this,p)}}),l.at=function(p){if(p<0)return new f(this,[]);for(var S=this.root,w=[];;){if(w.push(S),S.left){if(p=S.right._count)break;S=S.right}else break}return new f(this,[])},l.ge=function(p){for(var S=this._compare,w=this.root,i=[],C=0;w;){var x=S(p,w.key);i.push(w),x<=0&&(C=i.length),x<=0?w=w.left:w=w.right}return i.length=C,new f(this,i)},l.gt=function(p){for(var S=this._compare,w=this.root,i=[],C=0;w;){var x=S(p,w.key);i.push(w),x<0&&(C=i.length),x<0?w=w.left:w=w.right}return i.length=C,new f(this,i)},l.lt=function(p){for(var S=this._compare,w=this.root,i=[],C=0;w;){var x=S(p,w.key);i.push(w),x>0&&(C=i.length),x<=0?w=w.left:w=w.right}return i.length=C,new f(this,i)},l.le=function(p){for(var S=this._compare,w=this.root,i=[],C=0;w;){var x=S(p,w.key);i.push(w),x>=0&&(C=i.length),x<0?w=w.left:w=w.right}return i.length=C,new f(this,i)},l.find=function(p){for(var S=this._compare,w=this.root,i=[];w;){var C=S(p,w.key);if(i.push(w),C===0)return new f(this,i);C<=0?w=w.left:w=w.right}return new f(this,[])},l.remove=function(p){var S=this.find(p);return S?S.remove():this},l.get=function(p){for(var S=this._compare,w=this.root;w;){var i=S(p,w.key);if(i===0)return w.value;i<=0?w=w.left:w=w.right}};function f(p,S){this.tree=p,this._stack=S}var n=f.prototype;Object.defineProperty(n,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(n,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),n.clone=function(){return new f(this.tree,this._stack.slice())};function v(p,S){p.key=S.key,p.value=S.value,p.left=S.left,p.right=S.right,p._color=S._color,p._count=S._count}function m(p){for(var S,w,i,C,x=p.length-1;x>=0;--x){if(S=p[x],x===0){S._color=r;return}if(w=p[x-1],w.left===S){if(i=w.right,i.right&&i.right._color===g){if(i=w.right=s(i),C=i.right=s(i.right),w.right=i.left,i.left=w,i.right=C,i._color=w._color,S._color=r,w._color=r,C._color=r,c(w),c(i),x>1){var k=p[x-2];k.left===w?k.left=i:k.right=i}p[x-1]=i;return}else if(i.left&&i.left._color===g){if(i=w.right=s(i),C=i.left=s(i.left),w.right=C.left,i.left=C.right,C.left=w,C.right=i,C._color=w._color,w._color=r,i._color=r,S._color=r,c(w),c(i),c(C),x>1){var k=p[x-2];k.left===w?k.left=C:k.right=C}p[x-1]=C;return}if(i._color===r)if(w._color===g){w._color=r,w.right=a(g,i);return}else{w.right=a(g,i);continue}else{if(i=s(i),w.right=i.left,i.left=w,i._color=w._color,w._color=g,c(w),c(i),x>1){var k=p[x-2];k.left===w?k.left=i:k.right=i}p[x-1]=i,p[x]=w,x+11){var k=p[x-2];k.right===w?k.right=i:k.left=i}p[x-1]=i;return}else if(i.right&&i.right._color===g){if(i=w.left=s(i),C=i.right=s(i.right),w.left=C.right,i.right=C.left,C.right=w,C.left=i,C._color=w._color,w._color=r,i._color=r,S._color=r,c(w),c(i),c(C),x>1){var k=p[x-2];k.right===w?k.right=C:k.left=C}p[x-1]=C;return}if(i._color===r)if(w._color===g){w._color=r,w.left=a(g,i);return}else{w.left=a(g,i);continue}else{if(i=s(i),w.left=i.right,i.right=w,i._color=w._color,w._color=g,c(w),c(i),x>1){var k=p[x-2];k.right===w?k.right=i:k.left=i}p[x-1]=i,p[x]=w,x+1=0;--i){var w=p[i];w.left===p[i+1]?S[i]=new t(w._color,w.key,w.value,S[i+1],w.right,w._count):S[i]=new t(w._color,w.key,w.value,w.left,S[i+1],w._count)}if(w=S[S.length-1],w.left&&w.right){var C=S.length;for(w=w.left;w.right;)S.push(w),w=w.right;var x=S[C-1];S.push(new t(w._color,x.key,x.value,w.left,w.right,w._count)),S[C-1].key=w.key,S[C-1].value=w.value;for(var i=S.length-2;i>=C;--i)w=S[i],S[i]=new t(w._color,w.key,w.value,w.left,S[i+1],w._count);S[C-1].left=S[C]}if(w=S[S.length-1],w._color===g){var k=S[S.length-2];k.left===w?k.left=null:k.right===w&&(k.right=null),S.pop();for(var i=0;i0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(n,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(n,"index",{get:function(){var p=0,S=this._stack;if(S.length===0){var w=this.tree.root;return w?w._count:0}else S[S.length-1].left&&(p=S[S.length-1].left._count);for(var i=S.length-2;i>=0;--i)S[i+1]===S[i].right&&(++p,S[i].left&&(p+=S[i].left._count));return p},enumerable:!0}),n.next=function(){var p=this._stack;if(p.length!==0){var S=p[p.length-1];if(S.right)for(S=S.right;S;)p.push(S),S=S.left;else for(p.pop();p.length>0&&p[p.length-1].right===S;)S=p[p.length-1],p.pop()}},Object.defineProperty(n,"hasNext",{get:function(){var p=this._stack;if(p.length===0)return!1;if(p[p.length-1].right)return!0;for(var S=p.length-1;S>0;--S)if(p[S-1].left===p[S])return!0;return!1}}),n.update=function(p){var S=this._stack;if(S.length===0)throw new Error("Can't update empty node!");var w=new Array(S.length),i=S[S.length-1];w[w.length-1]=new t(i._color,i.key,p,i.left,i.right,i._count);for(var C=S.length-2;C>=0;--C)i=S[C],i.left===S[C+1]?w[C]=new t(i._color,i.key,i.value,w[C+1],i.right,i._count):w[C]=new t(i._color,i.key,i.value,i.left,w[C+1],i._count);return new u(this.tree._compare,w[0])},n.prev=function(){var p=this._stack;if(p.length!==0){var S=p[p.length-1];if(S.left)for(S=S.left;S;)p.push(S),S=S.right;else for(p.pop();p.length>0&&p[p.length-1].left===S;)S=p[p.length-1],p.pop()}},Object.defineProperty(n,"hasPrev",{get:function(){var p=this._stack;if(p.length===0)return!1;if(p[p.length-1].left)return!0;for(var S=p.length-1;S>0;--S)if(p[S-1].right===p[S])return!0;return!1}});function b(p,S){return pS?1:0}function E(p){return new u(p||b,null)}},7453:function(d,g,r){d.exports=i;var t=r(9557),s=r(1681),a=r(1011),c=r(2864),u=r(8468),l=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]);function y(C,x){return C[0]=x[0],C[1]=x[1],C[2]=x[2],C}function h(C){this.gl=C,this.pixelRatio=1,this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.autoTicks=!0,this.tickSpacing=[1,1,1],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickAngle=[0,0,0],this.tickAlign=["auto","auto","auto"],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[10,10,10],this.lastCubeProps={cubeEdges:[0,0,0],axis:[0,0,0]},this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont="sans-serif",this.labelSize=[20,20,20],this.labelAngle=[0,0,0],this.labelAlign=["auto","auto","auto"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[10,10,10],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[0,0,0],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!1,!1,!1],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._firstInit=!0,this._text=null,this._lines=null,this._background=a(C)}var T=h.prototype;T.update=function(C){C=C||{};function x(q,oe,Z){if(Z in C){var G=C[Z],re=this[Z],H;(q?Array.isArray(G)&&Array.isArray(G[0]):Array.isArray(G))?this[Z]=H=[oe(G[0]),oe(G[1]),oe(G[2])]:this[Z]=H=[oe(G),oe(G),oe(G)];for(var J=0;J<3;++J)if(H[J]!==re[J])return!0}return!1}var k=x.bind(this,!1,Number),I=x.bind(this,!1,Boolean),B=x.bind(this,!1,String),_=x.bind(this,!0,function(q){if(Array.isArray(q)){if(q.length===3)return[+q[0],+q[1],+q[2],1];if(q.length===4)return[+q[0],+q[1],+q[2],+q[3]]}return[0,0,0,1]}),z,O=!1,F=!1;if("bounds"in C)for(var N=C.bounds,V=0;V<2;++V)for(var j=0;j<3;++j)N[V][j]!==this.bounds[V][j]&&(F=!0),this.bounds[V][j]=N[V][j];if("ticks"in C){z=C.ticks,O=!0,this.autoTicks=!1;for(var V=0;V<3;++V)this.tickSpacing[V]=0}else k("tickSpacing")&&(this.autoTicks=!0,F=!0);if(this._firstInit&&("ticks"in C||"tickSpacing"in C||(this.autoTicks=!0),F=!0,O=!0,this._firstInit=!1),F&&this.autoTicks&&(z=u.create(this.bounds,this.tickSpacing),O=!0),O){for(var V=0;V<3;++V)z[V].sort(function(oe,Z){return oe.x-Z.x});u.equal(z,this.ticks)?O=!1:this.ticks=z}I("tickEnable"),B("tickFont")&&(O=!0),k("tickSize"),k("tickAngle"),k("tickPad"),_("tickColor");var $=B("labels");B("labelFont")&&($=!0),I("labelEnable"),k("labelSize"),k("labelPad"),_("labelColor"),I("lineEnable"),I("lineMirror"),k("lineWidth"),_("lineColor"),I("lineTickEnable"),I("lineTickMirror"),k("lineTickLength"),k("lineTickWidth"),_("lineTickColor"),I("gridEnable"),k("gridWidth"),_("gridColor"),I("zeroEnable"),_("zeroLineColor"),k("zeroLineWidth"),I("backgroundEnable"),_("backgroundColor"),this._text?this._text&&($||O)&&this._text.update(this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont):this._text=t(this.gl,this.bounds,this.labels,this.labelFont,this.ticks,this.tickFont),this._lines&&O&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=s(this.gl,this.bounds,this.ticks))};function f(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var n=[new f,new f,new f];function v(C,x,k,I,B){for(var _=C.primalOffset,z=C.primalMinor,O=C.mirrorOffset,F=C.mirrorMinor,N=I[x],V=0;V<3;++V)if(x!==V){var j=_,$=O,q=z,oe=F;N&1<0?(q[V]=-1,oe[V]=0):(q[V]=0,oe[V]=1)}}var m=[0,0,0],b={model:l,view:l,projection:l,_ortho:!1};T.isOpaque=function(){return!0},T.isTransparent=function(){return!1},T.drawTransparent=function(C){};var E=0,p=[0,0,0],S=[0,0,0],w=[0,0,0];T.draw=function(C){C=C||b;for(var re=this.gl,x=C.model||l,k=C.view||l,I=C.projection||l,B=this.bounds,_=C._ortho||!1,z=c(x,k,I,B,_),O=z.cubeEdges,F=z.axis,N=k[12],V=k[13],j=k[14],$=k[15],q=_?2:1,oe=q*this.pixelRatio*(I[3]*N+I[7]*V+I[11]*j+I[15]*$)/re.drawingBufferHeight,Z=0;Z<3;++Z)this.lastCubeProps.cubeEdges[Z]=O[Z],this.lastCubeProps.axis[Z]=F[Z];for(var G=n,Z=0;Z<3;++Z)v(n[Z],Z,this.bounds,O,F);for(var re=this.gl,H=m,Z=0;Z<3;++Z)this.backgroundEnable[Z]?H[Z]=F[Z]:H[Z]=0;this._background.draw(x,k,I,B,H,this.backgroundColor),this._lines.bind(x,k,I,this);for(var Z=0;Z<3;++Z){var J=[0,0,0];F[Z]>0?J[Z]=B[1][Z]:J[Z]=B[0][Z];for(var ae=0;ae<2;++ae){var K=(Z+1+ae)%3,Y=(Z+1+(ae^1))%3;this.gridEnable[K]&&this._lines.drawGrid(K,Y,this.bounds,J,this.gridColor[K],this.gridWidth[K]*this.pixelRatio)}for(var ae=0;ae<2;++ae){var K=(Z+1+ae)%3,Y=(Z+1+(ae^1))%3;this.zeroEnable[Y]&&Math.min(B[0][Y],B[1][Y])<=0&&Math.max(B[0][Y],B[1][Y])>=0&&this._lines.drawZero(K,Y,this.bounds,J,this.zeroLineColor[Y],this.zeroLineWidth[Y]*this.pixelRatio)}}for(var Z=0;Z<3;++Z){this.lineEnable[Z]&&this._lines.drawAxisLine(Z,this.bounds,G[Z].primalOffset,this.lineColor[Z],this.lineWidth[Z]*this.pixelRatio),this.lineMirror[Z]&&this._lines.drawAxisLine(Z,this.bounds,G[Z].mirrorOffset,this.lineColor[Z],this.lineWidth[Z]*this.pixelRatio);for(var ie=y(p,G[Z].primalMinor),ne=y(S,G[Z].mirrorMinor),le=this.lineTickLength,ae=0;ae<3;++ae){var de=oe/x[5*ae];ie[ae]*=le[ae]*de,ne[ae]*=le[ae]*de}this.lineTickEnable[Z]&&this._lines.drawAxisTicks(Z,G[Z].primalOffset,ie,this.lineTickColor[Z],this.lineTickWidth[Z]*this.pixelRatio),this.lineTickMirror[Z]&&this._lines.drawAxisTicks(Z,G[Z].mirrorOffset,ne,this.lineTickColor[Z],this.lineTickWidth[Z]*this.pixelRatio)}this._lines.unbind(),this._text.bind(x,k,I,this.pixelRatio);var we,me=.5,Le,ve;function Ae(Ne){ve=[0,0,0],ve[Ne]=1}function ye(Ne,et,st){var Ze=(Ne+1)%3,Ke=(Ne+2)%3,nt=et[Ze],it=et[Ke],lt=st[Ze],vt=st[Ke];if(nt>0&&vt>0){Ae(Ze);return}else if(nt>0&&vt<0){Ae(Ze);return}else if(nt<0&&vt>0){Ae(Ze);return}else if(nt<0&&vt<0){Ae(Ze);return}else if(it>0&<>0){Ae(Ke);return}else if(it>0&<<0){Ae(Ke);return}else if(it<0&<>0){Ae(Ke);return}else if(it<0&<<0){Ae(Ke);return}}for(var Z=0;Z<3;++Z){for(var Se=G[Z].primalMinor,_e=G[Z].mirrorMinor,ze=y(w,G[Z].primalOffset),ae=0;ae<3;++ae)this.lineTickEnable[Z]&&(ze[ae]+=oe*Se[ae]*Math.max(this.lineTickLength[ae],0)/x[5*ae]);var Ie=[0,0,0];if(Ie[Z]=1,this.tickEnable[Z]){this.tickAngle[Z]===-3600?(this.tickAngle[Z]=0,this.tickAlign[Z]="auto"):this.tickAlign[Z]=-1,Le=1,we=[this.tickAlign[Z],me,Le],we[0]==="auto"?we[0]=E:we[0]=parseInt(""+we[0]),ve=[0,0,0],ye(Z,Se,_e);for(var ae=0;ae<3;++ae)ze[ae]+=oe*Se[ae]*this.tickPad[ae]/x[5*ae];this._text.drawTicks(Z,this.tickSize[Z],this.tickAngle[Z],ze,this.tickColor[Z],Ie,ve,we)}if(this.labelEnable[Z]){Le=0,ve=[0,0,0],this.labels[Z].length>4&&(Ae(Z),Le=1),we=[this.labelAlign[Z],me,Le],we[0]==="auto"?we[0]=E:we[0]=parseInt(""+we[0]);for(var ae=0;ae<3;++ae)ze[ae]+=oe*Se[ae]*this.labelPad[ae]/x[5*ae];ze[Z]+=.5*(B[0][Z]+B[1][Z]),this._text.drawLabel(Z,this.labelSize[Z],this.labelAngle[Z],ze,this.labelColor[Z],[0,0,0],ve,we)}}this._text.unbind()},T.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function i(C,x){var k=new h(C);return k.update(x),k}},1011:function(d,g,r){d.exports=l;var t=r(5827),s=r(2944),a=r(1943).bg;function c(y,h,T,f){this.gl=y,this.buffer=h,this.vao=T,this.shader=f}var u=c.prototype;u.draw=function(y,h,T,f,n,v){for(var m=!1,b=0;b<3;++b)m=m||n[b];if(m){var E=this.gl;E.enable(E.POLYGON_OFFSET_FILL),E.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:y,view:h,projection:T,bounds:f,enable:n,colors:v},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),E.disable(E.POLYGON_OFFSET_FILL)}},u.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function l(y){for(var h=[],T=[],f=0,n=0;n<3;++n)for(var v=(n+1)%3,m=(n+2)%3,b=[0,0,0],E=[0,0,0],p=-1;p<=1;p+=2){T.push(f,f+2,f+1,f+1,f+2,f+3),b[n]=p,E[n]=p;for(var S=-1;S<=1;S+=2){b[v]=S;for(var w=-1;w<=1;w+=2)b[m]=w,h.push(b[0],b[1],b[2],E[0],E[1],E[2]),f+=1}var i=v;v=m,m=i}var C=t(y,new Float32Array(h)),x=t(y,new Uint16Array(T),y.ELEMENT_ARRAY_BUFFER),k=s(y,[{buffer:C,type:y.FLOAT,size:3,offset:0,stride:24},{buffer:C,type:y.FLOAT,size:3,offset:12,stride:24}],x),I=a(y);return I.attributes.position.location=0,I.attributes.normal.location=1,new c(y,C,k,I)}},2864:function(d,g,r){d.exports=p;var t=r(2288),s=r(104),a=r(4670),c=r(417),u=new Array(16),l=new Array(8),y=new Array(8),h=new Array(3),T=[0,0,0];(function(){for(var S=0;S<8;++S)l[S]=[1,1,1,1],y[S]=[1,1,1]})();function f(S,w,i){for(var C=0;C<4;++C){S[C]=i[12+C];for(var x=0;x<3;++x)S[C]+=w[x]*i[4*x+C]}}var n=[[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 v(S){for(var w=0;w$&&(z|=1<$){z|=1<y[I][1])&&(ae=I);for(var K=-1,I=0;I<3;++I){var Y=ae^1<y[ie][0]&&(ie=Y)}}var ne=m;ne[0]=ne[1]=ne[2]=0,ne[t.log2(K^ae)]=ae&K,ne[t.log2(ae^ie)]=ae&ie;var le=ie^7;le===z||le===J?(le=K^7,ne[t.log2(ie^le)]=le&ie):ne[t.log2(K^le)]=le&K;for(var de=b,we=z,N=0;N<3;++N)we&1< HALF_PI) && (b <= ONE_AND_HALF_PI)) ? b - PI : b; } float look_horizontal_or_vertical(float a, float ratio) { // ratio controls the ratio between being horizontal to (vertical + horizontal) // if ratio is set to 0.5 then it is 50%, 50%. // when using a higher ratio e.g. 0.75 the result would // likely be more horizontal than vertical. float b = positive_angle(a); return (b < ( ratio) * HALF_PI) ? 0.0 : (b < (2.0 - ratio) * HALF_PI) ? -HALF_PI : (b < (2.0 + ratio) * HALF_PI) ? 0.0 : (b < (4.0 - ratio) * HALF_PI) ? HALF_PI : 0.0; } float roundTo(float a, float b) { return float(b * floor((a + 0.5 * b) / b)); } float look_round_n_directions(float a, int n) { float b = positive_angle(a); float div = TWO_PI / float(n); float c = roundTo(b, div); return look_upwards(c); } float applyAlignOption(float rawAngle, float delta) { return (option > 2) ? look_round_n_directions(rawAngle + delta, option) : // option 3-n: round to n directions (option == 2) ? look_horizontal_or_vertical(rawAngle + delta, hv_ratio) : // horizontal or vertical (option == 1) ? rawAngle + delta : // use free angle, and flip to align with one direction of the axis (option == 0) ? look_upwards(rawAngle) : // use free angle, and stay upwards (option ==-1) ? 0.0 : // useful for backward compatibility, all texts remains horizontal rawAngle; // otherwise return back raw input angle } bool isAxisTitle = (axis.x == 0.0) && (axis.y == 0.0) && (axis.z == 0.0); void main() { //Compute world offset float axisDistance = position.z; vec3 dataPosition = axisDistance * axis + offset; float beta = angle; // i.e. user defined attributes for each tick float axisAngle; float clipAngle; float flip; if (enableAlign) { axisAngle = (isAxisTitle) ? HALF_PI : computeViewAngle(dataPosition, dataPosition + axis); clipAngle = computeViewAngle(dataPosition, dataPosition + alignDir); axisAngle += (sin(axisAngle) < 0.0) ? PI : 0.0; clipAngle += (sin(clipAngle) < 0.0) ? PI : 0.0; flip = (dot(vec2(cos(axisAngle), sin(axisAngle)), vec2(sin(clipAngle),-cos(clipAngle))) > 0.0) ? 1.0 : 0.0; beta += applyAlignOption(clipAngle, flip * PI); } //Compute plane offset vec2 planeCoord = position.xy * pixelScale; mat2 planeXform = scale * mat2( cos(beta), sin(beta), -sin(beta), cos(beta) ); vec2 viewOffset = 2.0 * planeXform * planeCoord / resolution; //Compute clip position vec3 clipPosition = project(dataPosition); //Apply text offset in clip coordinates clipPosition += vec3(viewOffset, 0.0); //Done gl_Position = vec4(clipPosition, 1.0); }`]),l=t([`precision highp float; #define GLSLIFY 1 uniform vec4 color; void main() { gl_FragColor = color; }`]);g.f=function(T){return s(T,u,l,null,[{name:"position",type:"vec3"}])};var y=t([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec3 normal; uniform mat4 model, view, projection; uniform vec3 enable; uniform vec3 bounds[2]; varying vec3 colorChannel; void main() { vec3 signAxis = sign(bounds[1] - bounds[0]); vec3 realNormal = signAxis * normal; if(dot(realNormal, enable) > 0.0) { vec3 minRange = min(bounds[0], bounds[1]); vec3 maxRange = max(bounds[0], bounds[1]); vec3 nPosition = mix(minRange, maxRange, 0.5 * (position + 1.0)); gl_Position = projection * view * model * vec4(nPosition, 1.0); } else { gl_Position = vec4(0,0,0,0); } colorChannel = abs(realNormal); }`]),h=t([`precision highp float; #define GLSLIFY 1 uniform vec4 colors[3]; varying vec3 colorChannel; void main() { gl_FragColor = colorChannel.x * colors[0] + colorChannel.y * colors[1] + colorChannel.z * colors[2]; }`]);g.bg=function(T){return s(T,y,h,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}},9557:function(d,g,r){d.exports=v;var t=r(5827),s=r(2944),a=r(875),c=r(1943).f,u=window||A.global||{},l=u.__TEXT_CACHE||{};u.__TEXT_CACHE={};var y=3;function h(m,b,E,p){this.gl=m,this.shader=b,this.buffer=E,this.vao=p,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var T=h.prototype,f=[0,0];T.bind=function(m,b,E,p){this.vao.bind(),this.shader.bind();var S=this.shader.uniforms;S.model=m,S.view=b,S.projection=E,S.pixelScale=p,f[0]=this.gl.drawingBufferWidth,f[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=f},T.unbind=function(){this.vao.unbind()},T.update=function(m,b,E,p,S){var w=[];function i(F,N,V,j,$,q){var oe=l[V];oe||(oe=l[V]={});var Z=oe[N];Z||(Z=oe[N]=n(N,{triangles:!0,font:V,textAlign:"center",textBaseline:"middle",lineSpacing:$,styletags:q}));for(var G=(j||12)/12,re=Z.positions,H=Z.cells,J=0,ae=H.length;J=0;--Y){var ie=re[K[Y]];w.push(G*ie[0],-G*ie[1],F)}}for(var C=[0,0,0],x=[0,0,0],k=[0,0,0],I=[0,0,0],B=1.25,_={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},z=0;z<3;++z){k[z]=w.length/y|0,i(.5*(m[0][z]+m[1][z]),b[z],E[z],12,B,_),I[z]=(w.length/y|0)-k[z],C[z]=w.length/y|0;for(var O=0;O=0&&(y=u.length-l-1);var h=Math.pow(10,y),T=Math.round(a*c*h),f=T+"";if(f.indexOf("e")>=0)return f;var n=T/h,v=T%h;T<0?(n=-Math.ceil(n)|0,v=-v|0):(n=Math.floor(n)|0,v=v|0);var m=""+n;if(T<0&&(m="-"+m),y){for(var b=""+v;b.length=a[0][l];--h)y.push({x:h*c[l],text:r(c[l],h)});u.push(y)}return u}function s(a,c){for(var u=0;u<3;++u){if(a[u].length!==c[u].length)return!1;for(var l=0;lm)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return n.bufferSubData(v,p,E),m}function h(n,v){for(var m=t.malloc(n.length,v),b=n.length,E=0;E=0;--b){if(v[b]!==m)return!1;m*=n[b]}return!0}l.update=function(n,v){if(typeof v!="number"&&(v=-1),this.bind(),typeof n=="object"&&typeof n.shape<"u"){var m=n.dtype;if(c.indexOf(m)<0&&(m="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var b=gl.getExtension("OES_element_index_uint");b&&m!=="uint16"?m="uint32":m="uint16"}if(m===n.dtype&&T(n.shape,n.stride))n.offset===0&&n.data.length===n.shape[0]?this.length=y(this.gl,this.type,this.length,this.usage,n.data,v):this.length=y(this.gl,this.type,this.length,this.usage,n.data.subarray(n.offset,n.shape[0]),v);else{var E=t.malloc(n.size,m),p=a(E,n.shape);s.assign(p,n),v<0?this.length=y(this.gl,this.type,this.length,this.usage,E,v):this.length=y(this.gl,this.type,this.length,this.usage,E.subarray(0,n.size),v),t.free(E)}}else if(Array.isArray(n)){var S;this.type===this.gl.ELEMENT_ARRAY_BUFFER?S=h(n,"uint16"):S=h(n,"float32"),v<0?this.length=y(this.gl,this.type,this.length,this.usage,S,v):this.length=y(this.gl,this.type,this.length,this.usage,S.subarray(0,n.length),v),t.free(S)}else if(typeof n=="object"&&typeof n.length=="number")this.length=y(this.gl,this.type,this.length,this.usage,n,v);else if(typeof n=="number"||n===void 0){if(v>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");n=n|0,n<=0&&(n=1),this.gl.bufferData(this.type,n|0,this.usage),this.length=n}else throw new Error("gl-buffer: Invalid data type")};function f(n,v,m,b){if(m=m||n.ARRAY_BUFFER,b=b||n.DYNAMIC_DRAW,m!==n.ARRAY_BUFFER&&m!==n.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(b!==n.DYNAMIC_DRAW&&b!==n.STATIC_DRAW&&b!==n.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 E=n.createBuffer(),p=new u(n,m,E,0,b);return p.update(v),p}d.exports=f},1140:function(d,g,r){var t=r(2858);d.exports=function(a,c){var u=a.positions,l=a.vectors,y={positions:[],vertexIntensity:[],vertexIntensityBounds:a.vertexIntensityBounds,vectors:[],cells:[],coneOffset:a.coneOffset,colormap:a.colormap};if(a.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),y;for(var h=0,T=1/0,f=-1/0,n=1/0,v=-1/0,m=1/0,b=-1/0,E=null,p=null,S=[],w=1/0,i=!1,C=0;Ch&&(h=t.length(k)),C){var I=2*t.distance(E,x)/(t.length(p)+t.length(k));I?(w=Math.min(w,I),i=!1):i=!0}i||(E=x,p=k),S.push(k)}var B=[T,n,m],_=[f,v,b];c&&(c[0]=B,c[1]=_),h===0&&(h=1);var z=1/h;isFinite(w)||(w=1),y.vectorScale=w;var O=a.coneSize||.5;a.absoluteConeSize&&(O=a.absoluteConeSize*z),y.coneScale=O;for(var C=0,F=0;C=1},n.isTransparent=function(){return this.opacity<1},n.pickSlots=1,n.setPickBase=function(S){this.pickId=S};function v(S){for(var w=h({colormap:S,nshades:256,format:"rgba"}),i=new Uint8Array(256*4),C=0;C<256;++C){for(var x=w[C],k=0;k<3;++k)i[4*C+k]=x[k];i[4*C+3]=x[3]*255}return y(i,[256,256,4],[4,0,1])}function m(S){for(var w=S.length,i=new Array(w),C=0;C0){var N=this.triShader;N.bind(),N.uniforms=B,this.triangleVAO.bind(),w.drawArrays(w.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},n.drawPick=function(S){S=S||{};for(var w=this.gl,i=S.model||T,C=S.view||T,x=S.projection||T,k=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],I=0;I<3;++I)k[0][I]=Math.max(k[0][I],this.clipBounds[0][I]),k[1][I]=Math.min(k[1][I],this.clipBounds[1][I]);this._model=[].slice.call(i),this._view=[].slice.call(C),this._projection=[].slice.call(x),this._resolution=[w.drawingBufferWidth,w.drawingBufferHeight];var B={model:i,view:C,projection:x,clipBounds:k,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},_=this.pickShader;_.bind(),_.uniforms=B,this.triangleCount>0&&(this.triangleVAO.bind(),w.drawArrays(w.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},n.pick=function(S){if(!S||S.id!==this.pickId)return null;var w=S.value[0]+256*S.value[1]+65536*S.value[2],i=this.cells[w],C=this.positions[i[1]].slice(0,3),x={position:C,dataCoordinate:C,index:Math.floor(i[1]/48)};return this.traceType==="cone"?x.index=Math.floor(i[1]/48):this.traceType==="streamtube"&&(x.intensity=this.intensity[i[1]],x.velocity=this.vectors[i[1]].slice(0,3),x.divergence=this.vectors[i[1]][3],x.index=w),x},n.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()};function b(S,w){var i=t(S,w.meshShader.vertex,w.meshShader.fragment,null,w.meshShader.attributes);return i.attributes.position.location=0,i.attributes.color.location=2,i.attributes.uv.location=3,i.attributes.vector.location=4,i}function E(S,w){var i=t(S,w.pickShader.vertex,w.pickShader.fragment,null,w.pickShader.attributes);return i.attributes.position.location=0,i.attributes.id.location=1,i.attributes.vector.location=4,i}function p(S,w,i){var C=i.shaders;arguments.length===1&&(w=S,S=w.gl);var x=b(S,C),k=E(S,C),I=c(S,y(new Uint8Array([255,255,255,255]),[1,1,4]));I.generateMipmap(),I.minFilter=S.LINEAR_MIPMAP_LINEAR,I.magFilter=S.LINEAR;var B=s(S),_=s(S),z=s(S),O=s(S),F=s(S),N=a(S,[{buffer:B,type:S.FLOAT,size:4},{buffer:F,type:S.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:z,type:S.FLOAT,size:4},{buffer:O,type:S.FLOAT,size:2},{buffer:_,type:S.FLOAT,size:4}]),V=new f(S,I,x,k,B,_,F,z,O,N,i.traceType||"cone");return V.update(w),V}d.exports=p},7234:function(d,g,r){var t=r(6832),s=t([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // 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). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec3 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, coneScale, coneOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * conePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(conePosition, 1.0); vec4 t_position = view * conePosition; gl_Position = projection * t_position; f_color = color; f_data = conePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),a=t([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),c=t([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // 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). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the cone vertex and normal at the given index. // // The returned vertex is for a cone with its top at origin and height of 1.0, // pointing in the direction of the vector attribute. // // Each cone is made up of a top vertex, a center base vertex and base perimeter vertices. // These vertices are used to make up the triangles of the cone by the following: // segment + 0 top vertex // segment + 1 perimeter vertex a+1 // segment + 2 perimeter vertex a // segment + 3 center base vertex // segment + 4 perimeter vertex a // segment + 5 perimeter vertex a+1 // Where segment is the number of the radial segment * 6 and a is the angle at that radial segment. // To go from index to segment, floor(index / 6) // To go from segment to angle, 2*pi * (segment/segmentCount) // To go from index to segment index, index - (segment*6) // vec3 getConePosition(vec3 d, float rawIndex, float coneOffset, out vec3 normal) { const float segmentCount = 8.0; float index = rawIndex - floor(rawIndex / (segmentCount * 6.0)) * (segmentCount * 6.0); float segment = floor(0.001 + index/6.0); float segmentIndex = index - (segment*6.0); normal = -normalize(d); if (segmentIndex > 2.99 && segmentIndex < 3.01) { return mix(vec3(0.0), -d, coneOffset); } float nextAngle = ( (segmentIndex > 0.99 && segmentIndex < 1.01) || (segmentIndex > 4.99 && segmentIndex < 5.01) ) ? 1.0 : 0.0; float angle = 2.0 * 3.14159 * ((segment + nextAngle) / segmentCount); vec3 v1 = mix(d, vec3(0.0), coneOffset); vec3 v2 = v1 - d; vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d)*0.25; vec3 y = v * sin(angle) * length(d)*0.25; vec3 v3 = v2 + x + y; if (segmentIndex < 3.0) { vec3 tx = u * sin(angle); vec3 ty = v * -cos(angle); vec3 tangent = tx + ty; normal = normalize(cross(v3 - v1, tangent)); } if (segmentIndex == 0.0) { return mix(d, vec3(0.0), coneOffset); } return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float vectorScale, coneScale, coneOffset; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getConePosition(mat3(model) * ((vectorScale * coneScale) * vector.xyz), position.w, coneOffset, normal); vec4 conePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * view * conePosition; f_id = id; f_position = position.xyz; } `]),u=t([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);g.meshShader={vertex:s,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},g.pickShader={vertex:c,fragment:u,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,g,r){var t=r(1950);d.exports=function(a){return t[a]}},3110:function(d,g,r){d.exports=f;var t=r(5827),s=r(2944),a=r(7667),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function u(n,v,m,b){this.gl=n,this.shader=b,this.buffer=v,this.vao=m,this.pixelRatio=1,this.bounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.lineWidth=[1,1,1],this.capSize=[10,10,10],this.lineCount=[0,0,0],this.lineOffset=[0,0,0],this.opacity=1,this.hasAlpha=!1}var l=u.prototype;l.isOpaque=function(){return!this.hasAlpha},l.isTransparent=function(){return this.hasAlpha},l.drawTransparent=l.draw=function(n){var v=this.gl,m=this.shader.uniforms;this.shader.bind();var b=m.view=n.view||c,E=m.projection=n.projection||c;m.model=n.model||c,m.clipBounds=this.clipBounds,m.opacity=this.opacity;var p=b[12],S=b[13],w=b[14],i=b[15],C=n._ortho||!1,x=C?2:1,k=x*this.pixelRatio*(E[3]*p+E[7]*S+E[11]*w+E[15]*i)/v.drawingBufferHeight;this.vao.bind();for(var I=0;I<3;++I)v.lineWidth(this.lineWidth[I]*this.pixelRatio),m.capSize=this.capSize[I]*k,this.lineCount[I]&&v.drawArrays(v.LINES,this.lineOffset[I],this.lineCount[I]);this.vao.unbind()};function y(n,v){for(var m=0;m<3;++m)n[0][m]=Math.min(n[0][m],v[m]),n[1][m]=Math.max(n[1][m],v[m])}var h=function(){for(var n=new Array(3),v=0;v<3;++v){for(var m=[],b=1;b<=2;++b)for(var E=-1;E<=1;E+=2){var p=(b+v)%3,S=[0,0,0];S[p]=E,m.push(S)}n[v]=m}return n}();function T(n,v,m,b){for(var E=h[b],p=0;p0){var B=C.slice();B[w]+=k[1][w],E.push(C[0],C[1],C[2],I[0],I[1],I[2],I[3],0,0,0,B[0],B[1],B[2],I[0],I[1],I[2],I[3],0,0,0),y(this.bounds,B),S+=2+T(E,B,I,w)}}}this.lineCount[w]=S-this.lineOffset[w]}this.buffer.update(E)}},l.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function f(n){var v=n.gl,m=t(v),b=s(v,[{buffer:m,type:v.FLOAT,size:3,offset:0,stride:40},{buffer:m,type:v.FLOAT,size:4,offset:12,stride:40},{buffer:m,type:v.FLOAT,size:3,offset:28,stride:40}]),E=a(v);E.attributes.position.location=0,E.attributes.color.location=1,E.attributes.offset.location=2;var p=new u(v,m,b,E);return p.update(n),p}},7667:function(d,g,r){var t=r(6832),s=r(5158),a=t([`precision highp float; #define GLSLIFY 1 attribute vec3 position, offset; attribute vec4 color; uniform mat4 model, view, projection; uniform float capSize; varying vec4 fragColor; varying vec3 fragPosition; void main() { vec4 worldPosition = model * vec4(position, 1.0); worldPosition = (worldPosition / worldPosition.w) + vec4(capSize * offset, 0.0); gl_Position = projection * view * worldPosition; fragColor = color; fragPosition = position; }`]),c=t([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float opacity; varying vec3 fragPosition; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], fragPosition) || fragColor.a * opacity == 0. ) discard; gl_FragColor = opacity * fragColor; }`]);d.exports=function(u){return s(u,a,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}},4234:function(d,g,r){var t=r(8931);d.exports=S;var s=null,a,c,u,l;function y(w){var i=w.getParameter(w.FRAMEBUFFER_BINDING),C=w.getParameter(w.RENDERBUFFER_BINDING),x=w.getParameter(w.TEXTURE_BINDING_2D);return[i,C,x]}function h(w,i){w.bindFramebuffer(w.FRAMEBUFFER,i[0]),w.bindRenderbuffer(w.RENDERBUFFER,i[1]),w.bindTexture(w.TEXTURE_2D,i[2])}function T(w,i){var C=w.getParameter(i.MAX_COLOR_ATTACHMENTS_WEBGL);s=new Array(C+1);for(var x=0;x<=C;++x){for(var k=new Array(C),I=0;I1&&_.drawBuffersWEBGL(s[B]);var V=C.getExtension("WEBGL_depth_texture");V?z?w.depth=n(C,k,I,V.UNSIGNED_INT_24_8_WEBGL,C.DEPTH_STENCIL,C.DEPTH_STENCIL_ATTACHMENT):O&&(w.depth=n(C,k,I,C.UNSIGNED_SHORT,C.DEPTH_COMPONENT,C.DEPTH_ATTACHMENT)):O&&z?w._depth_rb=v(C,k,I,C.DEPTH_STENCIL,C.DEPTH_STENCIL_ATTACHMENT):O?w._depth_rb=v(C,k,I,C.DEPTH_COMPONENT16,C.DEPTH_ATTACHMENT):z&&(w._depth_rb=v(C,k,I,C.STENCIL_INDEX,C.STENCIL_ATTACHMENT));var j=C.checkFramebufferStatus(C.FRAMEBUFFER);if(j!==C.FRAMEBUFFER_COMPLETE){w._destroyed=!0,C.bindFramebuffer(C.FRAMEBUFFER,null),C.deleteFramebuffer(w.handle),w.handle=null,w.depth&&(w.depth.dispose(),w.depth=null),w._depth_rb&&(C.deleteRenderbuffer(w._depth_rb),w._depth_rb=null);for(var N=0;Nk||C<0||C>k)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");w._shape[0]=i,w._shape[1]=C;for(var I=y(x),B=0;BI||C<0||C>I)throw new Error("gl-fbo: Parameters are too large for FBO");x=x||{};var B=1;if("color"in x){if(B=Math.max(x.color|0,0),B<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(B>1)if(k){if(B>w.getParameter(k.MAX_COLOR_ATTACHMENTS_WEBGL))throw new Error("gl-fbo: Context does not support "+B+" draw buffers")}else throw new Error("gl-fbo: Multiple draw buffer extension not supported")}var _=w.UNSIGNED_BYTE,z=w.getExtension("OES_texture_float");if(x.float&&B>0){if(!z)throw new Error("gl-fbo: Context does not support floating point textures");_=w.FLOAT}else x.preferFloat&&B>0&&z&&(_=w.FLOAT);var O=!0;"depth"in x&&(O=!!x.depth);var F=!1;return"stencil"in x&&(F=!!x.stencil),new b(w,i,C,_,B,O,F,k)}},3530:function(d,g,r){var t=r(8974).sprintf,s=r(6603),a=r(9365),c=r(8008);d.exports=u;function u(l,y,h){var T=a(y)||"of unknown name (see npm glsl-shader-name)",f="unknown type";h!==void 0&&(f=h===s.FRAGMENT_SHADER?"fragment":"vertex");for(var n=t(`Error compiling %s shader %s: `,f,T),v=t("%s%s",n,l),m=l.split(` `),b={},E=0;E>B*8&255;this.pickOffset=m,E.bind();var _=E.uniforms;_.viewTransform=n,_.pickOffset=v,_.shape=this.shape;var z=E.attributes;return this.positionBuffer.bind(),z.position.pointer(),this.weightBuffer.bind(),z.weight.pointer(w.UNSIGNED_BYTE,!1),this.idBuffer.bind(),z.pickId.pointer(w.UNSIGNED_BYTE,!1),w.drawArrays(w.TRIANGLES,0,S),m+this.shape[0]*this.shape[1]}}}(),h.pick=function(n,v,m){var b=this.pickOffset,E=this.shape[0]*this.shape[1];if(m=b+E)return null;var p=m-b,S=this.xData,w=this.yData;return{object:this,pointId:p,dataCoord:[S[p%this.shape[0]],w[p/this.shape[0]|0]]}},h.update=function(n){n=n||{};var v=n.shape||[0,0],m=n.x||s(v[0]),b=n.y||s(v[1]),E=n.z||new Float32Array(v[0]*v[1]),p=n.zsmooth!==!1;this.xData=m,this.yData=b;var S=n.colorLevels||[0],w=n.colorValues||[0,0,0,1],i=S.length,C=this.bounds,x,k,I,B;p?(x=C[0]=m[0],k=C[1]=b[0],I=C[2]=m[m.length-1],B=C[3]=b[b.length-1]):(x=C[0]=m[0]+(m[1]-m[0])/2,k=C[1]=b[0]+(b[1]-b[0])/2,I=C[2]=m[m.length-1]+(m[m.length-1]-m[m.length-2])/2,B=C[3]=b[b.length-1]+(b[b.length-1]-b[b.length-2])/2);var _=1/(I-x),z=1/(B-k),O=v[0],F=v[1];this.shape=[O,F];var N=(p?(O-1)*(F-1):O*F)*(T.length>>>1);this.numVertices=N;for(var V=a.mallocUint8(N*4),j=a.mallocFloat32(N*2),$=a.mallocUint8(N*2),q=a.mallocUint32(N),oe=0,Z=p?O-1:O,G=p?F-1:F,re=0;re max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D dashTexture; uniform float dashScale; uniform float opacity; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if ( outOfRange(clipBounds[0], clipBounds[1], worldPosition) || fragColor.a * opacity == 0. ) discard; float dashWeight = texture2D(dashTexture, vec2(dashScale * pixelArcLength, 0)).r; if(dashWeight < 0.5) { discard; } gl_FragColor = fragColor * opacity; } `]),u=t([`precision highp float; #define GLSLIFY 1 #define FLOAT_MAX 1.70141184e38 #define FLOAT_MIN 1.17549435e-38 // https://github.com/mikolalysenko/glsl-read-float/blob/master/index.glsl vec4 packFloat(float v) { float av = abs(v); //Handle special cases if(av < FLOAT_MIN) { return vec4(0.0, 0.0, 0.0, 0.0); } else if(v > FLOAT_MAX) { return vec4(127.0, 128.0, 0.0, 0.0) / 255.0; } else if(v < -FLOAT_MAX) { return vec4(255.0, 128.0, 0.0, 0.0) / 255.0; } vec4 c = vec4(0,0,0,0); //Compute exponent and mantissa float e = floor(log2(av)); float m = av * pow(2.0, -e) - 1.0; //Unpack mantissa c[1] = floor(128.0 * m); m -= c[1] / 128.0; c[2] = floor(32768.0 * m); m -= c[2] / 32768.0; c[3] = floor(8388608.0 * m); //Unpack exponent float ebias = e + 127.0; c[0] = floor(ebias / 2.0); ebias -= c[0] * 2.0; c[1] += floor(ebias) * 128.0; //Unpack sign bit c[0] += 128.0 * step(0.0, -v); //Scale back to range return c / 255.0; } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform float pickId; uniform vec3 clipBounds[2]; varying vec3 worldPosition; varying float pixelArcLength; varying vec4 fragColor; void main() { if (outOfRange(clipBounds[0], clipBounds[1], worldPosition)) discard; gl_FragColor = vec4(pickId/255.0, packFloat(pixelArcLength).xyz); }`]),l=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];g.createShader=function(y){return s(y,a,c,null,l)},g.createPickShader=function(y){return s(y,a,u,null,l)}},6086:function(d,g,r){d.exports=w;var t=r(5827),s=r(2944),a=r(8931),c=new Uint8Array(4),u=new Float32Array(c.buffer);function l(i,C,x,k){return c[0]=k,c[1]=x,c[2]=C,c[3]=i,u[0]}var y=r(5070),h=r(5050),T=r(248),f=T.createShader,n=T.createPickShader,v=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function m(i,C){for(var x=0,k=0;k<3;++k){var I=i[k]-C[k];x+=I*I}return Math.sqrt(x)}function b(i){for(var C=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],x=0;x<3;++x)C[0][x]=Math.max(i[0][x],C[0][x]),C[1][x]=Math.min(i[1][x],C[1][x]);return C}function E(i,C,x,k){this.arcLength=i,this.position=C,this.index=x,this.dataCoordinate=k}function p(i,C,x,k,I,B){this.gl=i,this.shader=C,this.pickShader=x,this.buffer=k,this.vao=I,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.points=[],this.arcLength=[],this.vertexCount=0,this.bounds=[[0,0,0],[0,0,0]],this.pickId=0,this.lineWidth=1,this.texture=B,this.dashScale=1,this.opacity=1,this.hasAlpha=!1,this.dirty=!0,this.pixelRatio=1}var S=p.prototype;S.isTransparent=function(){return this.hasAlpha},S.isOpaque=function(){return!this.hasAlpha},S.pickSlots=1,S.setPickBase=function(i){this.pickId=i},S.drawTransparent=S.draw=function(i){if(this.vertexCount){var C=this.gl,x=this.shader,k=this.vao;x.bind(),x.uniforms={model:i.model||v,view:i.view||v,projection:i.projection||v,clipBounds:b(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[C.drawingBufferWidth,C.drawingBufferHeight],pixelRatio:this.pixelRatio},k.bind(),k.draw(C.TRIANGLE_STRIP,this.vertexCount),k.unbind()}},S.drawPick=function(i){if(this.vertexCount){var C=this.gl,x=this.pickShader,k=this.vao;x.bind(),x.uniforms={model:i.model||v,view:i.view||v,projection:i.projection||v,pickId:this.pickId,clipBounds:b(this.clipBounds),screenShape:[C.drawingBufferWidth,C.drawingBufferHeight],pixelRatio:this.pixelRatio},k.bind(),k.draw(C.TRIANGLE_STRIP,this.vertexCount),k.unbind()}},S.update=function(i){var C,x;this.dirty=!0;var k=!!i.connectGaps;"dashScale"in i&&(this.dashScale=i.dashScale),this.hasAlpha=!1,"opacity"in i&&(this.opacity=+i.opacity,this.opacity<1&&(this.hasAlpha=!0));var I=[],B=[],_=[],z=0,O=0,F=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],N=i.position||i.positions;if(N){var V=i.color||i.colors||[0,0,0,1],j=i.lineWidth||1,$=!1;e:for(C=1;C0){for(var Z=0;Z<24;++Z)I.push(I[I.length-12]);O+=2,$=!0}continue e}F[0][x]=Math.min(F[0][x],q[x],oe[x]),F[1][x]=Math.max(F[1][x],q[x],oe[x])}var G,re;Array.isArray(V[0])?(G=V.length>C-1?V[C-1]:V.length>0?V[V.length-1]:[0,0,0,1],re=V.length>C?V[C]:V.length>0?V[V.length-1]:[0,0,0,1]):G=re=V,G.length===3&&(G=[G[0],G[1],G[2],1]),re.length===3&&(re=[re[0],re[1],re[2],1]),!this.hasAlpha&&G[3]<1&&(this.hasAlpha=!0);var H;Array.isArray(j)?H=j.length>C-1?j[C-1]:j.length>0?j[j.length-1]:[0,0,0,1]:H=j;var J=z;if(z+=m(q,oe),$){for(x=0;x<2;++x)I.push(q[0],q[1],q[2],oe[0],oe[1],oe[2],J,H,G[0],G[1],G[2],G[3]);O+=2,$=!1}I.push(q[0],q[1],q[2],oe[0],oe[1],oe[2],J,H,G[0],G[1],G[2],G[3],q[0],q[1],q[2],oe[0],oe[1],oe[2],J,-H,G[0],G[1],G[2],G[3],oe[0],oe[1],oe[2],q[0],q[1],q[2],z,-H,re[0],re[1],re[2],re[3],oe[0],oe[1],oe[2],q[0],q[1],q[2],z,H,re[0],re[1],re[2],re[3]),O+=4}}if(this.buffer.update(I),B.push(z),_.push(N[N.length-1].slice()),this.bounds=F,this.vertexCount=O,this.points=_,this.arcLength=B,"dashes"in i){var ae=i.dashes,K=ae.slice();for(K.unshift(0),C=1;C1.0001)return null;x+=C[E]}return Math.abs(x-1)>.001?null:[p,l(h,C),C]}},2056:function(d,g,r){var t=r(6832),s=t([`precision highp float; #define GLSLIFY 1 attribute vec3 position, normal; attribute vec4 color; attribute vec2 uv; uniform mat4 model , view , projection , inverseModel; uniform vec3 eyePosition , lightPosition; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; vec4 project(vec3 p) { return projection * view * model * vec4(p, 1.0); } void main() { gl_Position = project(position); //Lighting geometry parameters vec4 cameraCoordinate = view * vec4(position , 1.0); cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); f_color = color; f_data = position; f_uv = uv; } `]),a=t([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } //#pragma glslify: beckmann = require(glsl-specular-beckmann) // used in gl-surface3d bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness , fresnel , kambient , kdiffuse , kspecular; uniform sampler2D texture; varying vec3 f_normal , f_lightDirection , f_eyeDirection , f_data; varying vec4 f_color; varying vec2 f_uv; void main() { if (f_color.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], f_data) ) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); //float specular = max(0.0, beckmann(L, V, N, roughness)); // used in gl-surface3d float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = vec4(f_color.rgb, 1.0) * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * f_color.a; } `]),c=t([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 color; attribute vec2 uv; uniform mat4 model, view, projection; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { gl_Position = projection * view * model * vec4(position, 1.0); f_color = color; f_data = position; f_uv = uv; }`]),u=t([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec3 f_data; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_data)) discard; gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),l=t([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 uv; attribute float pointSize; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0 ,0.0 ,0.0); } else { gl_Position = projection * view * model * vec4(position, 1.0); } gl_PointSize = pointSize; f_color = color; f_uv = uv; }`]),y=t([`precision highp float; #define GLSLIFY 1 uniform sampler2D texture; uniform float opacity; varying vec4 f_color; varying vec2 f_uv; void main() { vec2 pointR = gl_PointCoord.xy - vec2(0.5, 0.5); if(dot(pointR, pointR) > 0.25) { discard; } gl_FragColor = f_color * texture2D(texture, f_uv) * opacity; }`]),h=t([`precision highp float; #define GLSLIFY 1 attribute vec3 position; attribute vec4 id; uniform mat4 model, view, projection; varying vec3 f_position; varying vec4 f_id; void main() { gl_Position = projection * view * model * vec4(position, 1.0); f_id = id; f_position = position; }`]),T=t([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]),f=t([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute float pointSize; attribute vec4 id; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0.0, 0.0, 0.0, 0.0); } else { gl_Position = projection * view * model * vec4(position, 1.0); gl_PointSize = pointSize; } f_id = id; f_position = position; }`]),n=t([`precision highp float; #define GLSLIFY 1 attribute vec3 position; uniform mat4 model, view, projection; void main() { gl_Position = projection * view * model * vec4(position, 1.0); }`]),v=t([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } `]);g.meshShader={vertex:s,fragment:a,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},g.wireShader={vertex:c,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},g.pointShader={vertex:l,fragment:y,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},g.pickShader={vertex:h,fragment:T,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},g.pointPickShader={vertex:f,fragment:T,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},g.contourShader={vertex:n,fragment:v,attributes:[{name:"position",type:"vec3"}]}},8116:function(d,g,r){var t=1e-6,s=1e-6,a=r(5158),c=r(5827),u=r(2944),l=r(8931),y=r(115),h=r(104),T=r(7437),f=r(5050),n=r(9156),v=r(7212),m=r(5306),b=r(2056),E=r(4340),p=b.meshShader,S=b.wireShader,w=b.pointShader,i=b.pickShader,C=b.pointPickShader,x=b.contourShader,k=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function I(Z,G,re,H,J,ae,K,Y,ie,ne,le,de,we,me,Le,ve,Ae,ye,Se,_e,ze,Ie,Ne,et,st,Ze,Ke){this.gl=Z,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=G,this.dirty=!0,this.triShader=re,this.lineShader=H,this.pointShader=J,this.pickShader=ae,this.pointPickShader=K,this.contourShader=Y,this.trianglePositions=ie,this.triangleColors=le,this.triangleNormals=we,this.triangleUVs=de,this.triangleIds=ne,this.triangleVAO=me,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Le,this.edgeColors=Ae,this.edgeUVs=ye,this.edgeIds=ve,this.edgeVAO=Se,this.edgeCount=0,this.pointPositions=_e,this.pointColors=Ie,this.pointUVs=Ne,this.pointSizes=et,this.pointIds=ze,this.pointVAO=st,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=Ze,this.contourVAO=Ke,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=k,this._view=k,this._projection=k,this._resolution=[1,1]}var B=I.prototype;B.isOpaque=function(){return!this.hasAlpha},B.isTransparent=function(){return this.hasAlpha},B.pickSlots=1,B.setPickBase=function(Z){this.pickId=Z};function _(Z,G){if(!G||!G.length)return 1;for(var re=0;reZ&&re>0){var H=(G[re][0]-Z)/(G[re][0]-G[re-1][0]);return G[re][1]*(1-H)+H*G[re-1][1]}}return 1}function z(Z,G){for(var re=n({colormap:Z,nshades:256,format:"rgba"}),H=new Uint8Array(256*4),J=0;J<256;++J){for(var ae=re[J],K=0;K<3;++K)H[4*J+K]=ae[K];G?H[4*J+3]=255*_(J/255,G):H[4*J+3]=255*ae[3]}return f(H,[256,256,4],[4,0,1])}function O(Z){for(var G=Z.length,re=new Array(G),H=0;H0){var we=this.triShader;we.bind(),we.uniforms=Y,this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var we=this.lineShader;we.bind(),we.uniforms=Y,this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var we=this.pointShader;we.bind(),we.uniforms=Y,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var we=this.contourShader;we.bind(),we.uniforms=Y,this.contourVAO.bind(),G.drawArrays(G.LINES,0,this.contourCount),this.contourVAO.unbind()}},B.drawPick=function(Z){Z=Z||{};for(var G=this.gl,re=Z.model||k,H=Z.view||k,J=Z.projection||k,ae=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],K=0;K<3;++K)ae[0][K]=Math.max(ae[0][K],this.clipBounds[0][K]),ae[1][K]=Math.min(ae[1][K],this.clipBounds[1][K]);this._model=[].slice.call(re),this._view=[].slice.call(H),this._projection=[].slice.call(J),this._resolution=[G.drawingBufferWidth,G.drawingBufferHeight];var Y={model:re,view:H,projection:J,clipBounds:ae,pickId:this.pickId/255},ie=this.pickShader;if(ie.bind(),ie.uniforms=Y,this.triangleCount>0&&(this.triangleVAO.bind(),G.drawArrays(G.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),G.lineWidth(this.lineWidth*this.pixelRatio),G.drawArrays(G.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var ie=this.pointPickShader;ie.bind(),ie.uniforms=Y,this.pointVAO.bind(),G.drawArrays(G.POINTS,0,this.pointCount),this.pointVAO.unbind()}},B.pick=function(Z){if(!Z||Z.id!==this.pickId)return null;for(var G=Z.value[0]+256*Z.value[1]+65536*Z.value[2],re=this.cells[G],H=this.positions,J=new Array(re.length),ae=0;aep[$]&&(b.uniforms.dataAxis=T,b.uniforms.screenOffset=f,b.uniforms.color=B[v],b.uniforms.angle=_[v],S.drawArrays(S.TRIANGLES,p[$],p[q]-p[$]))),z[v]&&j&&(f[v^1]-=oe*x*O[v],b.uniforms.dataAxis=n,b.uniforms.screenOffset=f,b.uniforms.color=F[v],b.uniforms.angle=N[v],S.drawArrays(S.TRIANGLES,V,j)),f[v^1]=oe*w[2+(v^1)]-1,k[v+2]&&(f[v^1]+=oe*x*I[v+2],$p[$]&&(b.uniforms.dataAxis=T,b.uniforms.screenOffset=f,b.uniforms.color=B[v+2],b.uniforms.angle=_[v+2],S.drawArrays(S.TRIANGLES,p[$],p[q]-p[$]))),z[v+2]&&j&&(f[v^1]+=oe*x*O[v+2],b.uniforms.dataAxis=n,b.uniforms.screenOffset=f,b.uniforms.color=F[v+2],b.uniforms.angle=N[v+2],S.drawArrays(S.TRIANGLES,V,j))}}(),y.drawTitle=function(){var T=[0,0],f=[0,0];return function(){var n=this.plot,v=this.shader,m=n.gl,b=n.screenBox,E=n.titleCenter,p=n.titleAngle,S=n.titleColor,w=n.pixelRatio;if(this.titleCount){for(var i=0;i<2;++i)f[i]=2*(E[i]*w-b[i])/(b[2+i]-b[i])-1;v.bind(),v.uniforms.dataAxis=T,v.uniforms.screenOffset=f,v.uniforms.angle=p,v.uniforms.color=S,m.drawArrays(m.TRIANGLES,this.titleOffset,this.titleCount)}}}(),y.bind=function(){var T=[0,0],f=[0,0],n=[0,0];return function(){var v=this.plot,m=this.shader,b=v._tickBounds,E=v.dataBox,p=v.screenBox,S=v.viewBox;m.bind();for(var w=0;w<2;++w){var i=b[w],C=b[w+2],x=C-i,k=.5*(E[w+2]+E[w]),I=E[w+2]-E[w],B=S[w],_=S[w+2],z=_-B,O=p[w],F=p[w+2],N=F-O;f[w]=2*x/I*z/N,T[w]=2*(i-k)/I*z/N}n[1]=2*v.pixelRatio/(p[3]-p[1]),n[0]=n[1]*(p[3]-p[1])/(p[2]-p[0]),m.uniforms.dataScale=f,m.uniforms.dataShift=T,m.uniforms.textScale=n,this.vbo.bind(),m.attributes.textCoordinate.pointer()}}(),y.update=function(T){var f=[],n=T.ticks,v=T.bounds,m,b,E,p,S;for(S=0;S<2;++S){var w=[Math.floor(f.length/3)],i=[-1/0],C=n[S];for(m=0;m=0))){var z=v[_]-b[_]*(v[_+2]-v[_])/(b[_+2]-b[_]);_===0?S.drawLine(z,v[1],z,v[3],B[_],I[_]):S.drawLine(v[0],z,v[2],z,B[_],I[_])}}for(var _=0;_=0;--n)this.objects[n].dispose();this.objects.length=0;for(var n=this.overlays.length-1;n>=0;--n)this.overlays[n].dispose();this.overlays.length=0,this.gl=null},y.addObject=function(n){this.objects.indexOf(n)<0&&(this.objects.push(n),this.setDirty())},y.removeObject=function(n){for(var v=this.objects,m=0;mMath.abs(i))n.rotate(k,0,0,-w*C*Math.PI*p.rotateSpeed/window.innerWidth);else if(!p._ortho){var I=-p.zoomSpeed*x*i/window.innerHeight*(k-n.lastT())/20;n.pan(k,0,0,m*(Math.exp(I)-1))}}},!0)},p.enableMouseListeners(),p}},8245:function(d,g,r){var t=r(6832),s=r(5158),a=t([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); }`]),c=t([`precision mediump float; #define GLSLIFY 1 uniform sampler2D accumBuffer; varying vec2 uv; void main() { vec4 accum = texture2D(accumBuffer, 0.5 * (uv + 1.0)); gl_FragColor = min(vec4(1,1,1,1), accum); }`]);d.exports=function(u){return s(u,a,c,null,[{name:"position",type:"vec2"}])}},1059:function(d,g,r){var t=r(4296),s=r(7453),a=r(2771),c=r(6496),u=r(2611),l=r(4234),y=r(8126),h=r(6145),T=r(1120),f=r(5268),n=r(8245),v=r(2321)({tablet:!0,featureDetect:!0});d.exports={createScene:S,createCamera:t};function m(){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 b(i,C){var x=null;try{x=i.getContext("webgl",C),x||(x=i.getContext("experimental-webgl",C))}catch{return null}return x}function E(i){var C=Math.round(Math.log(Math.abs(i))/Math.log(10));if(C<0){var x=Math.round(Math.pow(10,-C));return Math.ceil(i*x)/x}else if(C>0){var x=Math.round(Math.pow(10,C));return Math.ceil(i/x)*x}return Math.ceil(i)}function p(i){return typeof i=="boolean"?i:!0}function S(i){i=i||{},i.camera=i.camera||{};var C=i.canvas;if(!C)if(C=document.createElement("canvas"),i.container){var x=i.container;x.appendChild(C)}else document.body.appendChild(C);var k=i.gl;if(k||(i.glOptions&&(v=!!i.glOptions.preserveDrawingBuffer),k=b(C,i.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:v})),!k)throw new Error("webgl not supported");var I=i.bounds||[[-10,-10,-10],[10,10,10]],B=new m,_=l(k,k.drawingBufferWidth,k.drawingBufferHeight,{preferFloat:!v}),z=n(k),O=i.cameraObject&&i.cameraObject._ortho===!0||i.camera.projection&&i.camera.projection.type==="orthographic"||!1,F={eye:i.camera.eye||[2,0,0],center:i.camera.center||[0,0,0],up:i.camera.up||[0,1,0],zoomMin:i.camera.zoomMax||.1,zoomMax:i.camera.zoomMin||100,mode:i.camera.mode||"turntable",_ortho:O},N=i.axes||{},V=s(k,N);V.enable=!N.disable;var j=i.spikes||{},$=c(k,j),q=[],oe=[],Z=[],G=[],re=!0,K=!0,H=new Array(16),J=new Array(16),ae={view:null,projection:H,model:J,_ortho:!1},K=!0,Y=[k.drawingBufferWidth,k.drawingBufferHeight],ie=i.cameraObject||t(C,F),ne={gl:k,contextLost:!1,pixelRatio:i.pixelRatio||1,canvas:C,selection:B,camera:ie,axes:V,axesPixels:null,spikes:$,bounds:I,objects:q,shape:Y,aspect:i.aspectRatio||[1,1,1],pickRadius:i.pickRadius||10,zNear:i.zNear||.01,zFar:i.zFar||1e3,fovy:i.fovy||Math.PI/4,clearColor:i.clearColor||[0,0,0,0],autoResize:p(i.autoResize),autoBounds:p(i.autoBounds),autoScale:!!i.autoScale,autoCenter:p(i.autoCenter),clipToBounds:p(i.clipToBounds),snapToData:!!i.snapToData,onselect:i.onselect||null,onrender:i.onrender||null,onclick:i.onclick||null,cameraParams:ae,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(_e){this.aspect[0]=_e.x,this.aspect[1]=_e.y,this.aspect[2]=_e.z,K=!0},setBounds:function(_e,ze){this.bounds[0][_e]=ze.min,this.bounds[1][_e]=ze.max},setClearColor:function(_e){this.clearColor=_e},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)}},le=[k.drawingBufferWidth/ne.pixelRatio|0,k.drawingBufferHeight/ne.pixelRatio|0];function de(){if(!ne._stopped&&ne.autoResize){var _e=C.parentNode,ze=1,Ie=1;_e&&_e!==document.body?(ze=_e.clientWidth,Ie=_e.clientHeight):(ze=window.innerWidth,Ie=window.innerHeight);var Ne=Math.ceil(ze*ne.pixelRatio)|0,et=Math.ceil(Ie*ne.pixelRatio)|0;if(Ne!==C.width||et!==C.height){C.width=Ne,C.height=et;var st=C.style;st.position=st.position||"absolute",st.left="0px",st.top="0px",st.width=ze+"px",st.height=Ie+"px",re=!0}}}ne.autoResize&&de(),window.addEventListener("resize",de);function we(){for(var _e=q.length,ze=G.length,Ie=0;Ie0&&Z[ze-1]===0;)Z.pop(),G.pop().dispose()}ne.update=function(_e){ne._stopped||(re=!0,K=!0)},ne.add=function(_e){ne._stopped||(_e.axes=V,q.push(_e),oe.push(-1),re=!0,K=!0,we())},ne.remove=function(_e){if(!ne._stopped){var ze=q.indexOf(_e);ze<0||(q.splice(ze,1),oe.pop(),re=!0,K=!0,we())}},ne.dispose=function(){if(!ne._stopped&&(ne._stopped=!0,window.removeEventListener("resize",de),C.removeEventListener("webglcontextlost",me),ne.mouseListener.enabled=!1,!ne.contextLost)){V.dispose(),$.dispose();for(var _e=0;_eB.distance)continue;for(var it=0;it 1.0) { discard; } baseColor = mix(borderColor, color, step(radius, centerFraction)); gl_FragColor = vec4(baseColor.rgb * baseColor.a, baseColor.a); } } `]),g.pickVertex=t([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; attribute vec4 pickId; uniform mat3 matrix; uniform float pointSize; uniform vec4 pickOffset; varying vec4 fragId; void main() { vec3 hgPosition = matrix * vec3(position, 1); gl_Position = vec4(hgPosition.xy, 0, hgPosition.z); gl_PointSize = pointSize; vec4 id = pickId + pickOffset; id.y += floor(id.x / 256.0); id.x -= floor(id.x / 256.0) * 256.0; id.z += floor(id.y / 256.0); id.y -= floor(id.y / 256.0) * 256.0; id.w += floor(id.z / 256.0); id.z -= floor(id.z / 256.0) * 256.0; fragId = id; } `]),g.pickFragment=t([`precision mediump float; #define GLSLIFY 1 varying vec4 fragId; void main() { float radius = length(2.0 * gl_PointCoord.xy - 1.0); if(radius > 1.0) { discard; } gl_FragColor = fragId / 255.0; } `])},8271:function(d,g,r){var t=r(5158),s=r(5827),a=r(5306),c=r(8023);d.exports=h;function u(T,f,n,v,m){this.plot=T,this.offsetBuffer=f,this.pickBuffer=n,this.shader=v,this.pickShader=m,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}var l=u.prototype;l.dispose=function(){this.shader.dispose(),this.pickShader.dispose(),this.offsetBuffer.dispose(),this.pickBuffer.dispose(),this.plot.removeObject(this)},l.update=function(T){var f;T=T||{};function n(w,i){return w in T?T[w]:i}this.sizeMin=n("sizeMin",.5),this.sizeMax=n("sizeMax",20),this.color=n("color",[1,0,0,1]).slice(),this.areaRatio=n("areaRatio",1),this.borderColor=n("borderColor",[0,0,0,1]).slice(),this.blend=n("blend",!1);var v=T.positions.length>>>1,m=T.positions instanceof Float32Array,b=T.idToIndex instanceof Int32Array&&T.idToIndex.length>=v,E=T.positions,p=m?E:a.mallocFloat32(E.length),S=b?T.idToIndex:a.mallocInt32(v);if(m||p.set(E),!b)for(p.set(E),f=0;f>>1,m;for(m=0;m=f[0]&&b<=f[2]&&E>=f[1]&&E<=f[3]&&n++}return n}l.unifiedDraw=function(){var T=[1,0,0,0,1,0,0,0,1],f=[0,0,0,0];return function(n){var v=n!==void 0,m=v?this.pickShader:this.shader,b=this.plot.gl,E=this.plot.dataBox;if(this.pointCount===0)return n;var p=E[2]-E[0],S=E[3]-E[1],w=y(this.points,E),i=this.plot.pickPixelRatio*Math.max(Math.min(this.sizeMinCap,this.sizeMin),Math.min(this.sizeMax,this.sizeMax/Math.pow(w,.33333)));T[0]=2/p,T[4]=2/S,T[6]=-2*E[0]/p-1,T[7]=-2*E[1]/S-1,this.offsetBuffer.bind(),m.bind(),m.attributes.position.pointer(),m.uniforms.matrix=T,m.uniforms.color=this.color,m.uniforms.borderColor=this.borderColor,m.uniforms.pointCloud=i<5,m.uniforms.pointSize=i,m.uniforms.centerFraction=Math.min(1,Math.max(0,Math.sqrt(1-this.areaRatio))),v&&(f[0]=n&255,f[1]=n>>8&255,f[2]=n>>16&255,f[3]=n>>24&255,this.pickBuffer.bind(),m.attributes.pickId.pointer(b.UNSIGNED_BYTE),m.uniforms.pickOffset=f,this.pickOffset=n);var C=b.getParameter(b.BLEND),x=b.getParameter(b.DITHER);return C&&!this.blend&&b.disable(b.BLEND),x&&b.disable(b.DITHER),b.drawArrays(b.POINTS,0,this.pointCount),C&&!this.blend&&b.enable(b.BLEND),x&&b.enable(b.DITHER),n+this.pointCount}}(),l.draw=l.unifiedDraw,l.drawPick=l.unifiedDraw,l.pick=function(T,f,n){var v=this.pickOffset,m=this.pointCount;if(n=v+m)return null;var b=n-v,E=this.points;return{object:this,pointId:b,dataCoord:[E[2*b],E[2*b+1]]}};function h(T,f){var n=T.gl,v=s(n),m=s(n),b=t(n,c.pointVertex,c.pointFragment),E=t(n,c.pickVertex,c.pickFragment),p=new u(T,v,m,b,E);return p.update(f),T.addObject(p),p}},6093:function(d){d.exports=g;function g(r,t,s,a){var c=t[0],u=t[1],l=t[2],y=t[3],h=s[0],T=s[1],f=s[2],n=s[3],v,m,b,E,p;return m=c*h+u*T+l*f+y*n,m<0&&(m=-m,h=-h,T=-T,f=-f,n=-n),1-m>1e-6?(v=Math.acos(m),b=Math.sin(v),E=Math.sin((1-a)*v)/b,p=Math.sin(a*v)/b):(E=1-a,p=a),r[0]=E*c+p*h,r[1]=E*u+p*T,r[2]=E*l+p*f,r[3]=E*y+p*n,r}},8240:function(d){d.exports=function(g){return!g&&g!==0?"":g.toString()}},4123:function(d,g,r){var t=r(875);d.exports=a;var s={};function a(c,u,l){var y=s[u];if(y||(y=s[u]={}),c in y)return y[c];var h={textAlign:"center",textBaseline:"middle",lineHeight:1,font:u,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};h.triangles=!0;var T=t(c,h);h.triangles=!1;var f=t(c,h),n,v;if(l&&l!==1){for(n=0;n max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform vec4 highlightId; uniform float highlightScale; uniform mat4 model, view, projection; uniform vec3 clipBounds[2]; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = 1.0; if(distance(highlightId, id) < 0.0001) { scale = highlightScale; } vec4 worldPosition = model * vec4(position, 1); vec4 viewPosition = view * worldPosition; viewPosition = viewPosition / viewPosition.w; vec4 clipPosition = projection * (viewPosition + scale * vec4(glyph.x, -glyph.y, 0, 0)); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = position; } }`]),c=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float highlightScale, pixelRatio; uniform vec4 highlightId; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float scale = pixelRatio; if(distance(highlightId.bgr, id.bgr) < 0.001) { scale *= highlightScale; } vec4 worldPosition = model * vec4(position, 1.0); vec4 viewPosition = view * worldPosition; vec4 clipPosition = projection * viewPosition; clipPosition /= clipPosition.w; gl_Position = clipPosition + vec4(screenSize * scale * vec2(glyph.x, -glyph.y), 0.0, 0.0); interpColor = color; pickId = id; dataCoordinate = position; } }`]),u=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } attribute vec3 position; attribute vec4 color; attribute vec2 glyph; attribute vec4 id; uniform float highlightScale; uniform vec4 highlightId; uniform vec3 axes[2]; uniform mat4 model, view, projection; uniform vec2 screenSize; uniform vec3 clipBounds[2]; uniform float scale, pixelRatio; varying vec4 interpColor; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(clipBounds[0], clipBounds[1], position)) { gl_Position = vec4(0,0,0,0); } else { float lscale = pixelRatio * scale; if(distance(highlightId, id) < 0.0001) { lscale *= highlightScale; } vec4 clipCenter = projection * view * model * vec4(position, 1); vec3 dataPosition = position + 0.5*lscale*(axes[0] * glyph.x + axes[1] * glyph.y) * clipCenter.w * screenSize.y; vec4 clipPosition = projection * view * model * vec4(dataPosition, 1); gl_Position = clipPosition; interpColor = color; pickId = id; dataCoordinate = dataPosition; } } `]),l=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float opacity; varying vec4 interpColor; varying vec3 dataCoordinate; void main() { if ( outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate) || interpColor.a * opacity == 0. ) discard; gl_FragColor = interpColor * opacity; } `]),y=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 fragClipBounds[2]; uniform float pickGroup; varying vec4 pickId; varying vec3 dataCoordinate; void main() { if (outOfRange(fragClipBounds[0], fragClipBounds[1], dataCoordinate)) discard; gl_FragColor = vec4(pickGroup, pickId.bgr); }`]),h=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],T={vertex:a,fragment:l,attributes:h},f={vertex:c,fragment:l,attributes:h},n={vertex:u,fragment:l,attributes:h},v={vertex:a,fragment:y,attributes:h},m={vertex:c,fragment:y,attributes:h},b={vertex:u,fragment:y,attributes:h};function E(p,S){var w=t(p,S),i=w.attributes;return i.position.location=0,i.color.location=1,i.glyph.location=2,i.id.location=3,w}g.createPerspective=function(p){return E(p,T)},g.createOrtho=function(p){return E(p,f)},g.createProject=function(p){return E(p,n)},g.createPickPerspective=function(p){return E(p,v)},g.createPickOrtho=function(p){return E(p,m)},g.createPickProject=function(p){return E(p,b)}},2182:function(d,g,r){var t=r(3596),s=r(5827),a=r(2944),c=r(5306),u=r(104),l=r(9282),y=r(4123),h=r(8240),T=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];d.exports=oe;function f(Z,G){var re=Z[0],H=Z[1],J=Z[2],ae=Z[3];return Z[0]=G[0]*re+G[4]*H+G[8]*J+G[12]*ae,Z[1]=G[1]*re+G[5]*H+G[9]*J+G[13]*ae,Z[2]=G[2]*re+G[6]*H+G[10]*J+G[14]*ae,Z[3]=G[3]*re+G[7]*H+G[11]*J+G[15]*ae,Z}function n(Z,G,re,H){return f(H,H),f(H,H),f(H,H)}function v(Z,G){this.index=Z,this.dataCoordinate=this.position=G}function m(Z){return Z===!0||Z>1?1:Z}function b(Z,G,re,H,J,ae,K,Y,ie,ne,le,de){this.gl=Z,this.pixelRatio=1,this.shader=G,this.orthoShader=re,this.projectShader=H,this.pointBuffer=J,this.colorBuffer=ae,this.glyphBuffer=K,this.idBuffer=Y,this.vao=ie,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=ne,this.pickOrthoShader=le,this.pickProjectShader=de,this.points=[],this._selectResult=new v(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}var E=b.prototype;E.pickSlots=1,E.setPickBase=function(Z){this.pickId=Z},E.isTransparent=function(){if(this.hasAlpha)return!0;for(var Z=0;Z<3;++Z)if(this.axesProject[Z]&&this.projectHasAlpha)return!0;return!1},E.isOpaque=function(){if(!this.hasAlpha)return!0;for(var Z=0;Z<3;++Z)if(this.axesProject[Z]&&!this.projectHasAlpha)return!0;return!1};var p=[0,0],S=[0,0,0],w=[0,0,0],i=[0,0,0,1],C=[0,0,0,1],x=T.slice(),k=[0,0,0],I=[[0,0,0],[0,0,0]];function B(Z){return Z[0]=Z[1]=Z[2]=0,Z}function _(Z,G){return Z[0]=G[0],Z[1]=G[1],Z[2]=G[2],Z[3]=1,Z}function z(Z,G,re,H){return Z[0]=G[0],Z[1]=G[1],Z[2]=G[2],Z[re]=H,Z}function O(Z){for(var G=I,re=0;re<2;++re)for(var H=0;H<3;++H)G[re][H]=Math.max(Math.min(Z[re][H],1e8),-1e8);return G}function F(Z,G,re,H){var J=G.axesProject,ae=G.gl,K=Z.uniforms,Y=re.model||T,ie=re.view||T,ne=re.projection||T,le=G.axesBounds,de=O(G.clipBounds),we;G.axes&&G.axes.lastCubeProps?we=G.axes.lastCubeProps.axis:we=[1,1,1],p[0]=2/ae.drawingBufferWidth,p[1]=2/ae.drawingBufferHeight,Z.bind(),K.view=ie,K.projection=ne,K.screenSize=p,K.highlightId=G.highlightId,K.highlightScale=G.highlightScale,K.clipBounds=de,K.pickGroup=G.pickId/255,K.pixelRatio=H;for(var me=0;me<3;++me)if(J[me]){K.scale=G.projectScale[me],K.opacity=G.projectOpacity[me];for(var Le=x,ve=0;ve<16;++ve)Le[ve]=0;for(var ve=0;ve<4;++ve)Le[5*ve]=1;Le[5*me]=0,we[me]<0?Le[12+me]=le[0][me]:Le[12+me]=le[1][me],u(Le,Y,Le),K.model=Le;var Ae=(me+1)%3,ye=(me+2)%3,Se=B(S),_e=B(w);Se[Ae]=1,_e[ye]=1;var ze=n(ne,ie,Y,_(i,Se)),Ie=n(ne,ie,Y,_(C,_e));if(Math.abs(ze[1])>Math.abs(Ie[1])){var Ne=ze;ze=Ie,Ie=Ne,Ne=Se,Se=_e,_e=Ne;var et=Ae;Ae=ye,ye=et}ze[0]<0&&(Se[Ae]=-1),Ie[1]>0&&(_e[ye]=-1);for(var st=0,Ze=0,ve=0;ve<4;++ve)st+=Math.pow(Y[4*Ae+ve],2),Ze+=Math.pow(Y[4*ye+ve],2);Se[Ae]/=Math.sqrt(st),_e[ye]/=Math.sqrt(Ze),K.axes[0]=Se,K.axes[1]=_e,K.fragClipBounds[0]=z(k,de[0],me,-1e8),K.fragClipBounds[1]=z(k,de[1],me,1e8),G.vao.bind(),G.vao.draw(ae.TRIANGLES,G.vertexCount),G.lineWidth>0&&(ae.lineWidth(G.lineWidth*H),G.vao.draw(ae.LINES,G.lineVertexCount,G.vertexCount)),G.vao.unbind()}}var N=[-1e8,-1e8,-1e8],V=[1e8,1e8,1e8],j=[N,V];function $(Z,G,re,H,J,ae,K){var Y=re.gl;if((ae===re.projectHasAlpha||K)&&F(G,re,H,J),ae===re.hasAlpha||K){Z.bind();var ie=Z.uniforms;ie.model=H.model||T,ie.view=H.view||T,ie.projection=H.projection||T,p[0]=2/Y.drawingBufferWidth,p[1]=2/Y.drawingBufferHeight,ie.screenSize=p,ie.highlightId=re.highlightId,ie.highlightScale=re.highlightScale,ie.fragClipBounds=j,ie.clipBounds=re.axes.bounds,ie.opacity=re.opacity,ie.pickGroup=re.pickId/255,ie.pixelRatio=J,re.vao.bind(),re.vao.draw(Y.TRIANGLES,re.vertexCount),re.lineWidth>0&&(Y.lineWidth(re.lineWidth*J),re.vao.draw(Y.LINES,re.lineVertexCount,re.vertexCount)),re.vao.unbind()}}E.draw=function(Z){var G=this.useOrtho?this.orthoShader:this.shader;$(G,this.projectShader,this,Z,this.pixelRatio,!1,!1)},E.drawTransparent=function(Z){var G=this.useOrtho?this.orthoShader:this.shader;$(G,this.projectShader,this,Z,this.pixelRatio,!0,!1)},E.drawPick=function(Z){var G=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;$(G,this.pickProjectShader,this,Z,1,!0,!0)},E.pick=function(Z){if(!Z||Z.id!==this.pickId)return null;var G=Z.value[2]+(Z.value[1]<<8)+(Z.value[0]<<16);if(G>=this.pointCount||G<0)return null;var re=this.points[G],H=this._selectResult;H.index=G;for(var J=0;J<3;++J)H.position[J]=H.dataCoordinate[J]=re[J];return H},E.highlight=function(Z){if(!Z)this.highlightId=[1,1,1,1];else{var G=Z.index,re=G&255,H=G>>8&255,J=G>>16&255;this.highlightId=[re/255,H/255,J/255,0]}};function q(Z,G,re,H){var J;Array.isArray(Z)?G0){var xt=0,Je=ye,Pe=[0,0,0,1],Ue=[0,0,0,1],He=Array.isArray(we)&&Array.isArray(we[0]),Oe=Array.isArray(ve)&&Array.isArray(ve[0]);e:for(var H=0;H<_e;++H){Ae+=1;for(var ze=J[H],Ie=0;Ie<3;++Ie){if(isNaN(ze[Ie])||!isFinite(ze[Ie]))continue e;le[Ie]=Math.max(le[Ie],ze[Ie]),ne[Ie]=Math.min(ne[Ie],ze[Ie])}var Ne=q(de,H,ae,this.pixelRatio),et=Ne.mesh,st=Ne.lines,Ze=Ne.bounds,Ce=Ne.visible;if(!Ce)Pe=[1,1,1,0];else if(Array.isArray(we)){var ge;if(He?H0?1-Ze[0][0]:Ve<0?1+Ze[1][0]:1,je*=je>0?1-Ze[0][1]:je<0?1+Ze[1][1]:1;for(var at=[Ve,je],Ct=et.cells||[],Yt=et.positions||[],Ie=0;Ie0){var B=T*S;m.drawBox(w-B,i-B,C+B,i+B,v),m.drawBox(w-B,x-B,C+B,x+B,v),m.drawBox(w-B,i-B,w+B,x+B,v),m.drawBox(C-B,i-B,C+B,x+B,v)}}}},u.update=function(y){y=y||{},this.innerFill=!!y.innerFill,this.outerFill=!!y.outerFill,this.innerColor=(y.innerColor||[0,0,0,.5]).slice(),this.outerColor=(y.outerColor||[0,0,0,.5]).slice(),this.borderColor=(y.borderColor||[0,0,0,1]).slice(),this.borderWidth=y.borderWidth||0,this.selectBox=(y.selectBox||this.selectBox).slice()},u.dispose=function(){this.boxBuffer.dispose(),this.boxShader.dispose(),this.plot.removeOverlay(this)};function l(y,h){var T=y.gl,f=s(T,[0,0,0,1,1,0,1,1]),n=t(T,a.boxVertex,a.boxFragment),v=new c(y,f,n);return v.update(h),y.addOverlay(v),v}},2611:function(d,g,r){d.exports=T;var t=r(4234),s=r(5306),a=r(5050),c=r(2288).nextPow2,u=function(f,n,v){for(var m=1e8,b=-1,E=-1,p=f.shape[0],S=f.shape[1],w=0;wthis.buffer.length){s.free(this.buffer);for(var m=this.buffer=s.mallocUint8(c(v*n*4)),b=0;bm)for(n=m;nv)for(n=v;n=0){for(var O=z.type.charAt(z.type.length-1)|0,F=new Array(O),N=0;N=0;)V+=1;B[_]=V}var j=new Array(m.length);function $(){p.program=c.program(S,p._vref,p._fref,I,B);for(var q=0;q=0){var i=S.charCodeAt(S.length-1)-48;if(i<2||i>4)throw new t("","Invalid data type for attribute "+p+": "+S);u(h,T,w[0],n,i,v,p)}else if(S.indexOf("mat")>=0){var i=S.charCodeAt(S.length-1)-48;if(i<2||i>4)throw new t("","Invalid data type for attribute "+p+": "+S);l(h,T,w,n,i,v,p)}else throw new t("","Unknown data type for attribute "+p+": "+S);break}}return v}},9016:function(d,g,r){var t=r(3984),s=r(9068);d.exports=u;function a(l){return function(){return l}}function c(l,y){for(var h=new Array(l),T=0;T4)throw new s("","Invalid data type");switch(V.charAt(0)){case"b":case"i":l["uniform"+j+"iv"](T[B],_);break;case"v":l["uniform"+j+"fv"](T[B],_);break;default:throw new s("","Unrecognized data type for vector "+name+": "+V)}}else if(V.indexOf("mat")===0&&V.length===4){if(j=V.charCodeAt(V.length-1)-48,j<2||j>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+V);l["uniformMatrix"+j+"fv"](T[B],!1,_);break}else throw new s("","Unknown uniform data type for "+name+": "+V)}}}}}function v(S,w){if(typeof w!="object")return[[S,w]];var i=[];for(var C in w){var x=w[C],k=S;parseInt(C)+""===C?k+="["+C+"]":k+="."+C,typeof x=="object"?i.push.apply(i,v(k,x)):i.push([k,x])}return i}function m(S){switch(S){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var w=S.indexOf("vec");if(0<=w&&w<=1&&S.length===4+w){var i=S.charCodeAt(S.length-1)-48;if(i<2||i>4)throw new s("","Invalid data type");return S.charAt(0)==="b"?c(i,!1):c(i,0)}else if(S.indexOf("mat")===0&&S.length===4){var i=S.charCodeAt(S.length-1)-48;if(i<2||i>4)throw new s("","Invalid uniform dimension type for matrix "+name+": "+S);return c(i*i,0)}else throw new s("","Unknown uniform data type for "+name+": "+S)}}function b(S,w,i){if(typeof i=="object"){var C=E(i);Object.defineProperty(S,w,{get:a(C),set:n(i),enumerable:!0,configurable:!1})}else T[i]?Object.defineProperty(S,w,{get:f(i),set:n(i),enumerable:!0,configurable:!1}):S[w]=m(h[i].type)}function E(S){var w;if(Array.isArray(S)){w=new Array(S.length);for(var i=0;i1){h[0]in l||(l[h[0]]=[]),l=l[h[0]];for(var T=1;T1)for(var v=0;v"u"?r(4037):WeakMap,c=new a,u=0;function l(b,E,p,S,w,i,C){this.id=b,this.src=E,this.type=p,this.shader=S,this.count=i,this.programs=[],this.cache=C}l.prototype.dispose=function(){if(--this.count===0){for(var b=this.cache,E=b.gl,p=this.programs,S=0,w=p.length;S 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 color, position; attribute vec2 uv; uniform float vectorScale, tubeScale; uniform mat4 model, view, projection, inverseModel; uniform vec3 eyePosition, lightPosition; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { // Scale the vector magnitude to stay constant with // model & view changes. vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); //Lighting geometry parameters vec4 cameraCoordinate = view * tubePosition; cameraCoordinate.xyz /= cameraCoordinate.w; f_lightDirection = lightPosition - cameraCoordinate.xyz; f_eyeDirection = eyePosition - cameraCoordinate.xyz; f_normal = normalize((vec4(normal, 0.0) * inverseModel).xyz); // vec4 m_position = model * vec4(tubePosition, 1.0); vec4 t_position = view * tubePosition; gl_Position = projection * t_position; f_color = color; f_data = tubePosition.xyz; f_position = position.xyz; f_uv = uv; } `]),a=t([`#extension GL_OES_standard_derivatives : enable precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float cookTorranceSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness, float fresnel) { float VdotN = max(dot(viewDirection, surfaceNormal), 0.0); float LdotN = max(dot(lightDirection, surfaceNormal), 0.0); //Half angle vector vec3 H = normalize(lightDirection + viewDirection); //Geometric term float NdotH = max(dot(surfaceNormal, H), 0.0); float VdotH = max(dot(viewDirection, H), 0.000001); float LdotH = max(dot(lightDirection, H), 0.000001); float G1 = (2.0 * NdotH * VdotN) / VdotH; float G2 = (2.0 * NdotH * LdotN) / LdotH; float G = min(1.0, min(G1, G2)); //Distribution term float D = beckmannDistribution(NdotH, roughness); //Fresnel term float F = pow(1.0 - VdotN, fresnel); //Multiply terms and done return G * F * D / max(3.14159265 * VdotN, 0.000001); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform sampler2D texture; varying vec3 f_normal, f_lightDirection, f_eyeDirection, f_data, f_position; varying vec4 f_color; varying vec2 f_uv; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; vec3 N = normalize(f_normal); vec3 L = normalize(f_lightDirection); vec3 V = normalize(f_eyeDirection); if(gl_FrontFacing) { N = -N; } float specular = min(1.0, max(0.0, cookTorranceSpecular(L, V, N, roughness, fresnel))); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); vec4 surfaceColor = f_color * texture2D(texture, f_uv); vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = litColor * opacity; } `]),c=t([`precision highp float; precision highp float; #define GLSLIFY 1 vec3 getOrthogonalVector(vec3 v) { // Return up-vector for only-z vector. // 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). // From the above if-statement we have ||a|| > 0 U ||b|| > 0. // Assign z = 0, x = -b, y = a: // a*-b + b*a + c*0 = -ba + ba + 0 = 0 if (v.x*v.x > v.z*v.z || v.y*v.y > v.z*v.z) { return normalize(vec3(-v.y, v.x, 0.0)); } else { return normalize(vec3(0.0, v.z, -v.y)); } } // Calculate the tube vertex and normal at the given index. // // The returned vertex is for a tube ring with its center at origin, radius of length(d), pointing in the direction of d. // // Each tube segment is made up of a ring of vertices. // These vertices are used to make up the triangles of the tube by connecting them together in the vertex array. // The indexes of tube segments run from 0 to 8. // vec3 getTubePosition(vec3 d, float index, out vec3 normal) { float segmentCount = 8.0; float angle = 2.0 * 3.14159 * (index / segmentCount); vec3 u = getOrthogonalVector(d); vec3 v = normalize(cross(u, d)); vec3 x = u * cos(angle) * length(d); vec3 y = v * sin(angle) * length(d); vec3 v3 = x + y; normal = normalize(v3); return v3; } attribute vec4 vector; attribute vec4 position; attribute vec4 id; uniform mat4 model, view, projection; uniform float tubeScale; varying vec3 f_position; varying vec4 f_id; void main() { vec3 normal; vec3 XYZ = getTubePosition(mat3(model) * (tubeScale * vector.w * normalize(vector.xyz)), position.w, normal); vec4 tubePosition = model * vec4(position.xyz, 1.0) + vec4(XYZ, 0.0); gl_Position = projection * view * tubePosition; f_id = id; f_position = position.xyz; } `]),u=t([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 clipBounds[2]; uniform float pickId; varying vec3 f_position; varying vec4 f_id; void main() { if (outOfRange(clipBounds[0], clipBounds[1], f_position)) discard; gl_FragColor = vec4(pickId, f_id.xyz); }`]);g.meshShader={vertex:s,fragment:a,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},g.pickShader={vertex:c,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}},7307:function(d,g,r){var t=r(2858),s=r(4020),a=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(m,b,E,p){for(var S=m.points,w=m.velocities,i=m.divergences,C=[],x=[],k=[],I=[],B=[],_=[],z=0,O=0,F=s.create(),N=s.create(),V=8,j=0;j0)for(var Z=0;Zb)return p-1}return p},y=function(m,b,E){return mE?E:m},h=function(m,b,E){var p=b.vectors,S=b.meshgrid,w=m[0],i=m[1],C=m[2],x=S[0].length,k=S[1].length,I=S[2].length,B=l(S[0],w),_=l(S[1],i),z=l(S[2],C),O=B+1,F=_+1,N=z+1;if(B=y(B,0,x-1),O=y(O,0,x-1),_=y(_,0,k-1),F=y(F,0,k-1),z=y(z,0,I-1),N=y(N,0,I-1),B<0||_<0||z<0||O>x-1||F>k-1||N>I-1)return t.create();var V=S[0][B],j=S[0][O],$=S[1][_],q=S[1][F],oe=S[2][z],Z=S[2][N],G=(w-V)/(j-V),re=(i-$)/(q-$),H=(C-oe)/(Z-oe);isFinite(G)||(G=.5),isFinite(re)||(re=.5),isFinite(H)||(H=.5);var J,ae,K,Y,ie,ne;switch(E.reversedX&&(B=x-1-B,O=x-1-O),E.reversedY&&(_=k-1-_,F=k-1-F),E.reversedZ&&(z=I-1-z,N=I-1-N),E.filled){case 5:ie=z,ne=N,K=_*I,Y=F*I,J=B*I*k,ae=O*I*k;break;case 4:ie=z,ne=N,J=B*I,ae=O*I,K=_*I*x,Y=F*I*x;break;case 3:K=_,Y=F,ie=z*k,ne=N*k,J=B*k*I,ae=O*k*I;break;case 2:K=_,Y=F,J=B*k,ae=O*k,ie=z*k*x,ne=N*k*x;break;case 1:J=B,ae=O,ie=z*x,ne=N*x,K=_*x*I,Y=F*x*I;break;default:J=B,ae=O,K=_*x,Y=F*x,ie=z*x*k,ne=N*x*k;break}var le=p[J+K+ie],de=p[J+K+ne],we=p[J+Y+ie],me=p[J+Y+ne],Le=p[ae+K+ie],ve=p[ae+K+ne],Ae=p[ae+Y+ie],ye=p[ae+Y+ne],Se=t.create(),_e=t.create(),ze=t.create(),Ie=t.create();t.lerp(Se,le,Le,G),t.lerp(_e,de,ve,G),t.lerp(ze,we,Ae,G),t.lerp(Ie,me,ye,G);var Ne=t.create(),et=t.create();t.lerp(Ne,Se,ze,re),t.lerp(et,_e,Ie,re);var st=t.create();return t.lerp(st,Ne,et,H),st},T=function(m){var b=1/0;m.sort(function(w,i){return w-i});for(var E=m.length,p=1;pO||ye<_||ye>F||SeN)},j=t.distance(b[0],b[1]),$=10*j/p,q=$*$,oe=1,Z=0,G=E.length;G>1&&(oe=f(E));for(var re=0;reZ&&(Z=le),ie.push(le),I.push({points:J,velocities:ae,divergences:ie});for(var de=0;deq&&t.scale(we,we,$/Math.sqrt(me)),t.add(we,we,H),K=x(we),t.squaredDistance(Y,we)-q>-1e-4*q){J.push(we),Y=we,ae.push(K);var ne=k(we,K),le=t.length(ne);isFinite(le)&&le>Z&&(Z=le),ie.push(le)}H=we}}var Le=u(I,m.colormap,Z,oe);return w?Le.tubeScale=w:(Z===0&&(Z=1),Le.tubeScale=S*.5*oe/Z),Le};var n=r(9578),v=r(1140).createMesh;d.exports.createTubeMesh=function(m,b){return v(m,b,{shaders:n,traceType:"streamtube"})}},9054:function(d,g,r){var t=r(5158),s=r(6832),a=s([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute vec3 f; attribute vec3 normal; uniform vec3 objectOffset; uniform mat4 model, view, projection, inverseModel; uniform vec3 lightPosition, eyePosition; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 localCoordinate = vec3(uv.zw, f.x); worldCoordinate = objectOffset + localCoordinate; vec4 worldPosition = model * vec4(worldCoordinate, 1.0); vec4 clipPosition = projection * view * worldPosition; gl_Position = clipPosition; kill = f.y; value = f.z; planeCoordinate = uv.xy; vColor = texture2D(colormap, vec2(value, value)); //Lighting geometry parameters vec4 cameraCoordinate = view * worldPosition; cameraCoordinate.xyz /= cameraCoordinate.w; lightDirection = lightPosition - cameraCoordinate.xyz; eyeDirection = eyePosition - cameraCoordinate.xyz; surfaceNormal = normalize((vec4(normal,0) * inverseModel).xyz); } `]),c=s([`precision highp float; #define GLSLIFY 1 float beckmannDistribution(float x, float roughness) { float NdotH = max(x, 0.0001); float cos2Alpha = NdotH * NdotH; float tan2Alpha = (cos2Alpha - 1.0) / cos2Alpha; float roughness2 = roughness * roughness; float denom = 3.141592653589793 * roughness2 * cos2Alpha * cos2Alpha; return exp(tan2Alpha / roughness2) / denom; } float beckmannSpecular( vec3 lightDirection, vec3 viewDirection, vec3 surfaceNormal, float roughness) { return beckmannDistribution(dot(surfaceNormal, normalize(lightDirection + viewDirection)), roughness); } bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec3 lowerBound, upperBound; uniform float contourTint; uniform vec4 contourColor; uniform sampler2D colormap; uniform vec3 clipBounds[2]; uniform float roughness, fresnel, kambient, kdiffuse, kspecular, opacity; uniform float vertexColor; varying float value, kill; varying vec3 worldCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { if ( kill > 0.0 || vColor.a == 0.0 || outOfRange(clipBounds[0], clipBounds[1], worldCoordinate) ) discard; vec3 N = normalize(surfaceNormal); vec3 V = normalize(eyeDirection); vec3 L = normalize(lightDirection); if(gl_FrontFacing) { N = -N; } float specular = max(beckmannSpecular(L, V, N, roughness), 0.); float diffuse = min(kambient + kdiffuse * max(dot(N, L), 0.0), 1.0); //decide how to interpolate color — in vertex or in fragment vec4 surfaceColor = step(vertexColor, .5) * texture2D(colormap, vec2(value, value)) + step(.5, vertexColor) * vColor; vec4 litColor = surfaceColor.a * vec4(diffuse * surfaceColor.rgb + kspecular * vec3(1,1,1) * specular, 1.0); gl_FragColor = mix(litColor, contourColor, contourTint) * opacity; } `]),u=s([`precision highp float; #define GLSLIFY 1 attribute vec4 uv; attribute float f; uniform vec3 objectOffset; uniform mat3 permutation; uniform mat4 model, view, projection; uniform float height, zOffset; uniform sampler2D colormap; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 lightDirection, eyeDirection, surfaceNormal; varying vec4 vColor; void main() { vec3 dataCoordinate = permutation * vec3(uv.xy, height); worldCoordinate = objectOffset + dataCoordinate; vec4 worldPosition = model * vec4(worldCoordinate, 1.0); vec4 clipPosition = projection * view * worldPosition; clipPosition.z += zOffset; gl_Position = clipPosition; value = f + objectOffset.z; kill = -1.0; planeCoordinate = uv.zw; vColor = texture2D(colormap, vec2(value, value)); //Don't do lighting for contours surfaceNormal = vec3(1,0,0); eyeDirection = vec3(0,1,0); lightDirection = vec3(0,0,1); } `]),l=s([`precision highp float; #define GLSLIFY 1 bool outOfRange(float a, float b, float p) { return ((p > max(a, b)) || (p < min(a, b))); } bool outOfRange(vec2 a, vec2 b, vec2 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y)); } bool outOfRange(vec3 a, vec3 b, vec3 p) { return (outOfRange(a.x, b.x, p.x) || outOfRange(a.y, b.y, p.y) || outOfRange(a.z, b.z, p.z)); } bool outOfRange(vec4 a, vec4 b, vec4 p) { return outOfRange(a.xyz, b.xyz, p.xyz); } uniform vec2 shape; uniform vec3 clipBounds[2]; uniform float pickId; varying float value, kill; varying vec3 worldCoordinate; varying vec2 planeCoordinate; varying vec3 surfaceNormal; vec2 splitFloat(float v) { float vh = 255.0 * v; float upper = floor(vh); float lower = fract(vh); return vec2(upper / 255.0, floor(lower * 16.0) / 16.0); } void main() { if ((kill > 0.0) || (outOfRange(clipBounds[0], clipBounds[1], worldCoordinate))) discard; vec2 ux = splitFloat(planeCoordinate.x / shape.x); vec2 uy = splitFloat(planeCoordinate.y / shape.y); gl_FragColor = vec4(pickId, ux.x, uy.x, ux.y + (uy.y/16.0)); } `]);g.createShader=function(y){var h=t(y,a,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},g.createPickShader=function(y){var h=t(y,a,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h.attributes.normal.location=2,h},g.createContourShader=function(y){var h=t(y,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h},g.createPickContourShader=function(y){var h=t(y,u,l,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return h.attributes.uv.location=0,h.attributes.f.location=1,h}},3754:function(d,g,r){d.exports=ae;var t=r(2288),s=r(5827),a=r(2944),c=r(8931),u=r(5306),l=r(9156),y=r(7498),h=r(7382),T=r(5050),f=r(4162),n=r(104),v=r(7437),m=r(5070),b=r(9144),E=r(9054),p=E.createShader,S=E.createContourShader,w=E.createPickShader,i=E.createPickContourShader,C=4*10,x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],k=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],I=[[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(){for(var K=0;K<3;++K){var Y=I[K],ie=(K+1)%3,ne=(K+2)%3;Y[ie+0]=1,Y[ne+3]=1,Y[K+6]=1}})();function B(K,Y,ie,ne,le){this.position=K,this.index=Y,this.uv=ie,this.level=ne,this.dataCoordinate=le}var _=256;function z(K,Y,ie,ne,le,de,we,me,Le,ve,Ae,ye,Se,_e,ze){this.gl=K,this.shape=Y,this.bounds=ie,this.objectOffset=ze,this.intensityBounds=[],this._shader=ne,this._pickShader=le,this._coordinateBuffer=de,this._vao=we,this._colorMap=me,this._contourShader=Le,this._contourPickShader=ve,this._contourBuffer=Ae,this._contourVAO=ye,this._contourOffsets=[[],[],[]],this._contourCounts=[[],[],[]],this._vertexCount=0,this._pickResult=new B([0,0,0],[0,0],[0,0],[0,0,0],[0,0,0]),this._dynamicBuffer=Se,this._dynamicVAO=_e,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=[T(u.mallocFloat(1024),[0,0]),T(u.mallocFloat(1024),[0,0]),T(u.mallocFloat(1024),[0,0])],this.pickId=1,this.clipBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.snapToData=!1,this.pixelRatio=1,this.opacity=1,this.lightPosition=[10,1e4,0],this.ambientLight=.8,this.diffuseLight=.8,this.specularLight=2,this.roughness=.5,this.fresnel=1.5,this.vertexColor=0,this.dirty=!0}var O=z.prototype;O.genColormap=function(K,Y){var ie=!1,ne=h([l({colormap:K,nshades:_,format:"rgba"}).map(function(le,de){var we=Y?F(de/255,Y):le[3];return we<1&&(ie=!0),[le[0],le[1],le[2],255*we]})]);return y.divseq(ne,255),this.hasAlphaScale=ie,ne},O.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},O.isOpaque=function(){return!this.isTransparent()},O.pickSlots=1,O.setPickBase=function(K){this.pickId=K};function F(K,Y){if(!Y||!Y.length)return 1;for(var ie=0;ieK&&ie>0){var ne=(Y[ie][0]-K)/(Y[ie][0]-Y[ie-1][0]);return Y[ie][1]*(1-ne)+ne*Y[ie-1][1]}}return 1}var N=[0,0,0],V={showSurface:!1,showContour:!1,projections:[x.slice(),x.slice(),x.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function j(K,Y){var ie,ne,le,de=Y.axes&&Y.axes.lastCubeProps.axis||N,we=Y.showSurface,me=Y.showContour;for(ie=0;ie<3;++ie)for(we=we||Y.surfaceProject[ie],ne=0;ne<3;++ne)me=me||Y.contourProject[ie][ne];for(ie=0;ie<3;++ie){var Le=V.projections[ie];for(ne=0;ne<16;++ne)Le[ne]=0;for(ne=0;ne<4;++ne)Le[5*ne]=1;Le[5*ie]=0,Le[12+ie]=Y.axesBounds[+(de[ie]>0)][ie],n(Le,K.model,Le);var ve=V.clipBounds[ie];for(le=0;le<2;++le)for(ne=0;ne<3;++ne)ve[le][ne]=K.clipBounds[le][ne];ve[0][ie]=-1e8,ve[1][ie]=1e8}return V.showSurface=we,V.showContour=me,V}var $={model:x,view:x,projection:x,inverseModel:x.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},q=x.slice(),oe=[1,0,0,0,1,0,0,0,1];function Z(K,Y){K=K||{};var ie=this.gl;ie.disable(ie.CULL_FACE),this._colorMap.bind(0);var ne=$;ne.model=K.model||x,ne.view=K.view||x,ne.projection=K.projection||x,ne.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],ne.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],ne.objectOffset=this.objectOffset,ne.contourColor=this.contourColor[0],ne.inverseModel=v(ne.inverseModel,ne.model);for(var le=0;le<2;++le)for(var de=ne.clipBounds[le],we=0;we<3;++we)de[we]=Math.min(Math.max(this.clipBounds[le][we],-1e8),1e8);ne.kambient=this.ambientLight,ne.kdiffuse=this.diffuseLight,ne.kspecular=this.specularLight,ne.roughness=this.roughness,ne.fresnel=this.fresnel,ne.opacity=this.opacity,ne.height=0,ne.permutation=oe,ne.vertexColor=this.vertexColor;var me=q;for(n(me,ne.view,ne.model),n(me,ne.projection,me),v(me,me),le=0;le<3;++le)ne.eyePosition[le]=me[12+le]/me[15];var Le=me[15];for(le=0;le<3;++le)Le+=this.lightPosition[le]*me[4*le+3];for(le=0;le<3;++le){var ve=me[12+le];for(we=0;we<3;++we)ve+=me[4*we+le]*this.lightPosition[we];ne.lightPosition[le]=ve/Le}var Ae=j(ne,this);if(Ae.showSurface){for(this._shader.bind(),this._shader.uniforms=ne,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(ie.TRIANGLES,this._vertexCount),le=0;le<3;++le)!this.surfaceProject[le]||!this.vertexCount||(this._shader.uniforms.model=Ae.projections[le],this._shader.uniforms.clipBounds=Ae.clipBounds[le],this._vao.draw(ie.TRIANGLES,this._vertexCount));this._vao.unbind()}if(Ae.showContour){var ye=this._contourShader;ne.kambient=1,ne.kdiffuse=0,ne.kspecular=0,ne.opacity=1,ye.bind(),ye.uniforms=ne;var Se=this._contourVAO;for(Se.bind(),le=0;le<3;++le)for(ye.uniforms.permutation=I[le],ie.lineWidth(this.contourWidth[le]*this.pixelRatio),we=0;we>4)/16)/255,le=Math.floor(ne),de=ne-le,we=Y[1]*(K.value[1]+(K.value[2]&15)/16)/255,me=Math.floor(we),Le=we-me;le+=1,me+=1;var ve=ie.position;ve[0]=ve[1]=ve[2]=0;for(var Ae=0;Ae<2;++Ae)for(var ye=Ae?de:1-de,Se=0;Se<2;++Se)for(var _e=Se?Le:1-Le,ze=le+Ae,Ie=me+Se,Ne=ye*_e,et=0;et<3;++et)ve[et]+=this._field[et].get(ze,Ie)*Ne;for(var st=this._pickResult.level,Ze=0;Ze<3;++Ze)if(st[Ze]=m.le(this.contourLevels[Ze],ve[Ze]),st[Ze]<0)this.contourLevels[Ze].length>0&&(st[Ze]=0);else if(st[Ze]Math.abs(nt-ve[Ze])&&(st[Ze]+=1)}for(ie.index[0]=de<.5?le:le+1,ie.index[1]=Le<.5?me:me+1,ie.uv[0]=ne/Y[0],ie.uv[1]=we/Y[1],et=0;et<3;++et)ie.dataCoordinate[et]=this._field[et].get(ie.index[0],ie.index[1]);return ie},O.padField=function(K,Y){var ie=Y.shape.slice(),ne=K.shape.slice();y.assign(K.lo(1,1).hi(ie[0],ie[1]),Y),y.assign(K.lo(1).hi(ie[0],1),Y.hi(ie[0],1)),y.assign(K.lo(1,ne[1]-1).hi(ie[0],1),Y.lo(0,ie[1]-1).hi(ie[0],1)),y.assign(K.lo(0,1).hi(1,ie[1]),Y.hi(1)),y.assign(K.lo(ne[0]-1,1).hi(1,ie[1]),Y.lo(ie[0]-1)),K.set(0,0,Y.get(0,0)),K.set(0,ne[1]-1,Y.get(0,ie[1]-1)),K.set(ne[0]-1,0,Y.get(ie[0]-1,0)),K.set(ne[0]-1,ne[1]-1,Y.get(ie[0]-1,ie[1]-1))};function re(K,Y){return Array.isArray(K)?[Y(K[0]),Y(K[1]),Y(K[2])]:[Y(K),Y(K),Y(K)]}function H(K){return Array.isArray(K)?K.length===3?[K[0],K[1],K[2],1]:[K[0],K[1],K[2],K[3]]:[0,0,0,1]}function J(K){if(Array.isArray(K)){if(Array.isArray(K))return[H(K[0]),H(K[1]),H(K[2])];var Y=H(K);return[Y.slice(),Y.slice(),Y.slice()]}}O.update=function(K){K=K||{},this.objectOffset=K.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in K&&(this.contourWidth=re(K.contourWidth,Number)),"showContour"in K&&(this.showContour=re(K.showContour,Boolean)),"showSurface"in K&&(this.showSurface=!!K.showSurface),"contourTint"in K&&(this.contourTint=re(K.contourTint,Boolean)),"contourColor"in K&&(this.contourColor=J(K.contourColor)),"contourProject"in K&&(this.contourProject=re(K.contourProject,function(Lt){return re(Lt,Boolean)})),"surfaceProject"in K&&(this.surfaceProject=K.surfaceProject),"dynamicColor"in K&&(this.dynamicColor=J(K.dynamicColor)),"dynamicTint"in K&&(this.dynamicTint=re(K.dynamicTint,Number)),"dynamicWidth"in K&&(this.dynamicWidth=re(K.dynamicWidth,Number)),"opacity"in K&&(this.opacity=K.opacity),"opacityscale"in K&&(this.opacityscale=K.opacityscale),"colorBounds"in K&&(this.colorBounds=K.colorBounds),"vertexColor"in K&&(this.vertexColor=K.vertexColor?1:0),"colormap"in K&&this._colorMap.setPixels(this.genColormap(K.colormap,this.opacityscale));var Y=K.field||K.coords&&K.coords[2]||null,ie=!1;if(Y||(this._field[2].shape[0]||this._field[2].shape[2]?Y=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):Y=this._field[2].hi(0,0)),"field"in K||"coords"in K){var ne=(Y.shape[0]+2)*(Y.shape[1]+2);ne>this._field[2].data.length&&(u.freeFloat(this._field[2].data),this._field[2].data=u.mallocFloat(t.nextPow2(ne))),this._field[2]=T(this._field[2].data,[Y.shape[0]+2,Y.shape[1]+2]),this.padField(this._field[2],Y),this.shape=Y.shape.slice();for(var le=this.shape,de=0;de<2;++de)this._field[2].size>this._field[de].data.length&&(u.freeFloat(this._field[de].data),this._field[de].data=u.mallocFloat(this._field[2].size)),this._field[de]=T(this._field[de].data,[le[0]+2,le[1]+2]);if(K.coords){var we=K.coords;if(!Array.isArray(we)||we.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(de=0;de<2;++de){var me=we[de];for(Se=0;Se<2;++Se)if(me.shape[Se]!==le[Se])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[de],me)}}else if(K.ticks){var Le=K.ticks;if(!Array.isArray(Le)||Le.length!==2)throw new Error("gl-surface: invalid ticks");for(de=0;de<2;++de){var ve=Le[de];if((Array.isArray(ve)||ve.length)&&(ve=T(ve)),ve.shape[0]!==le[de])throw new Error("gl-surface: invalid tick length");var Ae=T(ve.data,le);Ae.stride[de]=ve.stride[0],Ae.stride[de^1]=0,this.padField(this._field[de],Ae)}}else{for(de=0;de<2;++de){var ye=[0,0];ye[de]=1,this._field[de]=T(this._field[de].data,[le[0]+2,le[1]+2],ye,0)}this._field[0].set(0,0,0);for(var Se=0;Se0){for(var Fe=0;Fe<5;++Fe)Ct.pop();pe-=1}continue e}}}Ht.push(pe)}this._contourOffsets[Yt]=ht,this._contourCounts[Yt]=Ht}var Rt=u.mallocFloat(Ct.length);for(de=0;deB||k<0||k>B)throw new Error("gl-texture2d: Invalid texture size");return C._shape=[x,k],C.bind(),I.texImage2D(I.TEXTURE_2D,0,C.format,x,k,0,C.format,C.type,null),C._mipLevels=[0],C}function n(C,x,k,I,B,_){this.gl=C,this.handle=x,this.format=B,this.type=_,this._shape=[k,I],this._mipLevels=[0],this._magFilter=C.NEAREST,this._minFilter=C.NEAREST,this._wrapS=C.CLAMP_TO_EDGE,this._wrapT=C.CLAMP_TO_EDGE,this._anisoSamples=1;var z=this,O=[this._wrapS,this._wrapT];Object.defineProperties(O,[{get:function(){return z._wrapS},set:function(N){return z.wrapS=N}},{get:function(){return z._wrapT},set:function(N){return z.wrapT=N}}]),this._wrapVector=O;var F=[this._shape[0],this._shape[1]];Object.defineProperties(F,[{get:function(){return z._shape[0]},set:function(N){return z.width=N}},{get:function(){return z._shape[1]},set:function(N){return z.height=N}}]),this._shapeVector=F}var v=n.prototype;Object.defineProperties(v,{minFilter:{get:function(){return this._minFilter},set:function(C){this.bind();var x=this.gl;if(this.type===x.FLOAT&&c.indexOf(C)>=0&&(x.getExtension("OES_texture_float_linear")||(C=x.NEAREST)),u.indexOf(C)<0)throw new Error("gl-texture2d: Unknown filter mode "+C);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MIN_FILTER,C),this._minFilter=C}},magFilter:{get:function(){return this._magFilter},set:function(C){this.bind();var x=this.gl;if(this.type===x.FLOAT&&c.indexOf(C)>=0&&(x.getExtension("OES_texture_float_linear")||(C=x.NEAREST)),u.indexOf(C)<0)throw new Error("gl-texture2d: Unknown filter mode "+C);return x.texParameteri(x.TEXTURE_2D,x.TEXTURE_MAG_FILTER,C),this._magFilter=C}},mipSamples:{get:function(){return this._anisoSamples},set:function(C){var x=this._anisoSamples;if(this._anisoSamples=Math.max(C,1)|0,x!==this._anisoSamples){var k=this.gl.getExtension("EXT_texture_filter_anisotropic");k&&this.gl.texParameterf(this.gl.TEXTURE_2D,k.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(C){if(this.bind(),l.indexOf(C)<0)throw new Error("gl-texture2d: Unknown wrap mode "+C);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,C),this._wrapS=C}},wrapT:{get:function(){return this._wrapT},set:function(C){if(this.bind(),l.indexOf(C)<0)throw new Error("gl-texture2d: Unknown wrap mode "+C);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,C),this._wrapT=C}},wrap:{get:function(){return this._wrapVector},set:function(C){if(Array.isArray(C)||(C=[C,C]),C.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var x=0;x<2;++x)if(l.indexOf(C[x])<0)throw new Error("gl-texture2d: Unknown wrap mode "+C);this._wrapS=C[0],this._wrapT=C[1];var k=this.gl;return this.bind(),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_S,this._wrapS),k.texParameteri(k.TEXTURE_2D,k.TEXTURE_WRAP_T,this._wrapT),C}},shape:{get:function(){return this._shapeVector},set:function(C){if(!Array.isArray(C))C=[C|0,C|0];else if(C.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return f(this,C[0]|0,C[1]|0),[C[0]|0,C[1]|0]}},width:{get:function(){return this._shape[0]},set:function(C){return C=C|0,f(this,C,this._shape[1]),C}},height:{get:function(){return this._shape[1]},set:function(C){return C=C|0,f(this,this._shape[0],C),C}}}),v.bind=function(C){var x=this.gl;return C!==void 0&&x.activeTexture(x.TEXTURE0+(C|0)),x.bindTexture(x.TEXTURE_2D,this.handle),C!==void 0?C|0:x.getParameter(x.ACTIVE_TEXTURE)-x.TEXTURE0},v.dispose=function(){this.gl.deleteTexture(this.handle)},v.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var C=Math.min(this._shape[0],this._shape[1]),x=0;C>0;++x,C>>>=1)this._mipLevels.indexOf(x)<0&&this._mipLevels.push(x)},v.setPixels=function(C,x,k,I){var B=this.gl;this.bind(),Array.isArray(x)?(I=k,k=x[1]|0,x=x[0]|0):(x=x||0,k=k||0),I=I||0;var _=h(C)?C:C.raw;if(_){var z=this._mipLevels.indexOf(I)<0;z?(B.texImage2D(B.TEXTURE_2D,0,this.format,this.format,this.type,_),this._mipLevels.push(I)):B.texSubImage2D(B.TEXTURE_2D,I,x,k,this.format,this.type,_)}else if(C.shape&&C.stride&&C.data){if(C.shape.length<2||x+C.shape[1]>this._shape[1]>>>I||k+C.shape[0]>this._shape[0]>>>I||x<0||k<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");b(B,x,k,I,this.format,this.type,this._mipLevels,C)}else throw new Error("gl-texture2d: Unsupported data type")};function m(C,x){return C.length===3?x[2]===1&&x[1]===C[0]*C[2]&&x[0]===C[2]:x[0]===1&&x[1]===C[0]}function b(C,x,k,I,B,_,z,O){var F=O.dtype,N=O.shape.slice();if(N.length<2||N.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var V=0,j=0,$=m(N,O.stride.slice());if(F==="float32"?V=C.FLOAT:F==="float64"?(V=C.FLOAT,$=!1,F="float32"):F==="uint8"?V=C.UNSIGNED_BYTE:(V=C.UNSIGNED_BYTE,$=!1,F="uint8"),N.length===2)j=C.LUMINANCE,N=[N[0],N[1],1],O=t(O.data,N,[O.stride[0],O.stride[1],1],O.offset);else if(N.length===3){if(N[2]===1)j=C.ALPHA;else if(N[2]===2)j=C.LUMINANCE_ALPHA;else if(N[2]===3)j=C.RGB;else if(N[2]===4)j=C.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");N[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((j===C.LUMINANCE||j===C.ALPHA)&&(B===C.LUMINANCE||B===C.ALPHA)&&(j=B),j!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var q=O.size,oe=z.indexOf(I)<0;if(oe&&z.push(I),V===_&&$)O.offset===0&&O.data.length===q?oe?C.texImage2D(C.TEXTURE_2D,I,B,N[0],N[1],0,B,_,O.data):C.texSubImage2D(C.TEXTURE_2D,I,x,k,N[0],N[1],B,_,O.data):oe?C.texImage2D(C.TEXTURE_2D,I,B,N[0],N[1],0,B,_,O.data.subarray(O.offset,O.offset+q)):C.texSubImage2D(C.TEXTURE_2D,I,x,k,N[0],N[1],B,_,O.data.subarray(O.offset,O.offset+q));else{var Z;_===C.FLOAT?Z=a.mallocFloat32(q):Z=a.mallocUint8(q);var G=t(Z,N,[N[2],N[2]*N[0],1]);V===C.FLOAT&&_===C.UNSIGNED_BYTE?T(G,O):s.assign(G,O),oe?C.texImage2D(C.TEXTURE_2D,I,B,N[0],N[1],0,B,_,Z.subarray(0,q)):C.texSubImage2D(C.TEXTURE_2D,I,x,k,N[0],N[1],B,_,Z.subarray(0,q)),_===C.FLOAT?a.freeFloat32(Z):a.freeUint8(Z)}}function E(C){var x=C.createTexture();return C.bindTexture(C.TEXTURE_2D,x),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MIN_FILTER,C.NEAREST),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_MAG_FILTER,C.NEAREST),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_S,C.CLAMP_TO_EDGE),C.texParameteri(C.TEXTURE_2D,C.TEXTURE_WRAP_T,C.CLAMP_TO_EDGE),x}function p(C,x,k,I,B){var _=C.getParameter(C.MAX_TEXTURE_SIZE);if(x<0||x>_||k<0||k>_)throw new Error("gl-texture2d: Invalid texture shape");if(B===C.FLOAT&&!C.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var z=E(C);return C.texImage2D(C.TEXTURE_2D,0,I,x,k,0,I,B,null),new n(C,z,x,k,I,B)}function S(C,x,k,I,B,_){var z=E(C);return C.texImage2D(C.TEXTURE_2D,0,B,B,_,x),new n(C,z,k,I,B,_)}function w(C,x){var k=x.dtype,I=x.shape.slice(),B=C.getParameter(C.MAX_TEXTURE_SIZE);if(I[0]<0||I[0]>B||I[1]<0||I[1]>B)throw new Error("gl-texture2d: Invalid texture size");var _=m(I,x.stride.slice()),z=0;k==="float32"?z=C.FLOAT:k==="float64"?(z=C.FLOAT,_=!1,k="float32"):k==="uint8"?z=C.UNSIGNED_BYTE:(z=C.UNSIGNED_BYTE,_=!1,k="uint8");var O=0;if(I.length===2)O=C.LUMINANCE,I=[I[0],I[1],1],x=t(x.data,I,[x.stride[0],x.stride[1],1],x.offset);else if(I.length===3)if(I[2]===1)O=C.ALPHA;else if(I[2]===2)O=C.LUMINANCE_ALPHA;else if(I[2]===3)O=C.RGB;else if(I[2]===4)O=C.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");z===C.FLOAT&&!C.getExtension("OES_texture_float")&&(z=C.UNSIGNED_BYTE,_=!1);var F,N,V=x.size;if(_)x.offset===0&&x.data.length===V?F=x.data:F=x.data.subarray(x.offset,x.offset+V);else{var j=[I[2],I[2]*I[0],1];N=a.malloc(V,k);var $=t(N,I,j,0);(k==="float32"||k==="float64")&&z===C.UNSIGNED_BYTE?T($,x):s.assign($,x),F=N.subarray(0,V)}var q=E(C);return C.texImage2D(C.TEXTURE_2D,0,O,I[0],I[1],0,O,z,F),_||a.free(N),new n(C,q,I[0],I[1],O,z)}function i(C){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||y(C),typeof arguments[1]=="number")return p(C,arguments[1],arguments[2],arguments[3]||C.RGBA,arguments[4]||C.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return p(C,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||C.RGBA,arguments[3]||C.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var x=arguments[1],k=h(x)?x:x.raw;if(k)return S(C,k,x.width|0,x.height|0,arguments[2]||C.RGBA,arguments[3]||C.UNSIGNED_BYTE);if(x.shape&&x.data&&x.stride)return w(C,x)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}},3056:function(d){function g(r,t,s){t?t.bind():r.bindBuffer(r.ELEMENT_ARRAY_BUFFER,null);var a=r.getParameter(r.MAX_VERTEX_ATTRIBS)|0;if(s){if(s.length>a)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(T)}},8827:function(d){d.exports=g;function g(r,t){return r[0]=Math.ceil(t[0]),r[1]=Math.ceil(t[1]),r[2]=Math.ceil(t[2]),r}},7622:function(d){d.exports=g;function g(r){var t=new Float32Array(3);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t}},8782:function(d){d.exports=g;function g(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r}},8501:function(d){d.exports=g;function g(){var r=new Float32Array(3);return r[0]=0,r[1]=0,r[2]=0,r}},903:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=s[0],y=s[1],h=s[2];return r[0]=c*h-u*y,r[1]=u*l-a*h,r[2]=a*y-c*l,r}},5981:function(d,g,r){d.exports=r(8288)},8288:function(d){d.exports=g;function g(r,t){var s=t[0]-r[0],a=t[1]-r[1],c=t[2]-r[2];return Math.sqrt(s*s+a*a+c*c)}},8629:function(d,g,r){d.exports=r(7979)},7979:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]/s[0],r[1]=t[1]/s[1],r[2]=t[2]/s[2],r}},9305:function(d){d.exports=g;function g(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]}},154:function(d){d.exports=1e-6},4932:function(d,g,r){d.exports=s;var t=r(154);function s(a,c){var u=a[0],l=a[1],y=a[2],h=c[0],T=c[1],f=c[2];return Math.abs(u-h)<=t*Math.max(1,Math.abs(u),Math.abs(h))&&Math.abs(l-T)<=t*Math.max(1,Math.abs(l),Math.abs(T))&&Math.abs(y-f)<=t*Math.max(1,Math.abs(y),Math.abs(f))}},5777:function(d){d.exports=g;function g(r,t){return r[0]===t[0]&&r[1]===t[1]&&r[2]===t[2]}},3306:function(d){d.exports=g;function g(r,t){return r[0]=Math.floor(t[0]),r[1]=Math.floor(t[1]),r[2]=Math.floor(t[2]),r}},7447:function(d,g,r){d.exports=s;var t=r(8501)();function s(a,c,u,l,y,h){var T,f;for(c||(c=3),u||(u=0),l?f=Math.min(l*c+u,a.length):f=a.length,T=u;T0&&(u=1/Math.sqrt(u),r[0]=t[0]*u,r[1]=t[1]*u,r[2]=t[2]*u),r}},6660:function(d){d.exports=g;function g(r,t){t=t||1;var s=Math.random()*2*Math.PI,a=Math.random()*2-1,c=Math.sqrt(1-a*a)*t;return r[0]=Math.cos(s)*c,r[1]=Math.sin(s)*c,r[2]=a*t,r}},392:function(d){d.exports=g;function g(r,t,s,a){var c=s[1],u=s[2],l=t[1]-c,y=t[2]-u,h=Math.sin(a),T=Math.cos(a);return r[0]=t[0],r[1]=c+l*T-y*h,r[2]=u+l*h+y*T,r}},3222:function(d){d.exports=g;function g(r,t,s,a){var c=s[0],u=s[2],l=t[0]-c,y=t[2]-u,h=Math.sin(a),T=Math.cos(a);return r[0]=c+y*h+l*T,r[1]=t[1],r[2]=u+y*T-l*h,r}},3388:function(d){d.exports=g;function g(r,t,s,a){var c=s[0],u=s[1],l=t[0]-c,y=t[1]-u,h=Math.sin(a),T=Math.cos(a);return r[0]=c+l*T-y*h,r[1]=u+l*h+y*T,r[2]=t[2],r}},1624:function(d){d.exports=g;function g(r,t){return r[0]=Math.round(t[0]),r[1]=Math.round(t[1]),r[2]=Math.round(t[2]),r}},5685:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]*s,r[1]=t[1]*s,r[2]=t[2]*s,r}},6722:function(d){d.exports=g;function g(r,t,s,a){return r[0]=t[0]+s[0]*a,r[1]=t[1]+s[1]*a,r[2]=t[2]+s[2]*a,r}},831:function(d){d.exports=g;function g(r,t,s,a){return r[0]=t,r[1]=s,r[2]=a,r}},5294:function(d,g,r){d.exports=r(6403)},3303:function(d,g,r){d.exports=r(4337)},6403:function(d){d.exports=g;function g(r,t){var s=t[0]-r[0],a=t[1]-r[1],c=t[2]-r[2];return s*s+a*a+c*c}},4337:function(d){d.exports=g;function g(r){var t=r[0],s=r[1],a=r[2];return t*t+s*s+a*a}},8921:function(d,g,r){d.exports=r(911)},911:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]-s[0],r[1]=t[1]-s[1],r[2]=t[2]-s[2],r}},9908:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2];return r[0]=a*s[0]+c*s[3]+u*s[6],r[1]=a*s[1]+c*s[4]+u*s[7],r[2]=a*s[2]+c*s[5]+u*s[8],r}},3255:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=s[3]*a+s[7]*c+s[11]*u+s[15];return l=l||1,r[0]=(s[0]*a+s[4]*c+s[8]*u+s[12])/l,r[1]=(s[1]*a+s[5]*c+s[9]*u+s[13])/l,r[2]=(s[2]*a+s[6]*c+s[10]*u+s[14])/l,r}},6568:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=s[0],y=s[1],h=s[2],T=s[3],f=T*a+y*u-h*c,n=T*c+h*a-l*u,v=T*u+l*c-y*a,m=-l*a-y*c-h*u;return r[0]=f*T+m*-l+n*-h-v*-y,r[1]=n*T+m*-y+v*-l-f*-h,r[2]=v*T+m*-h+f*-y-n*-l,r}},3433:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]+s[0],r[1]=t[1]+s[1],r[2]=t[2]+s[2],r[3]=t[3]+s[3],r}},1413:function(d){d.exports=g;function g(r){var t=new Float32Array(4);return t[0]=r[0],t[1]=r[1],t[2]=r[2],t[3]=r[3],t}},3470:function(d){d.exports=g;function g(r,t){return r[0]=t[0],r[1]=t[1],r[2]=t[2],r[3]=t[3],r}},5313:function(d){d.exports=g;function g(){var r=new Float32Array(4);return r[0]=0,r[1]=0,r[2]=0,r[3]=0,r}},5446:function(d){d.exports=g;function g(r,t){var s=t[0]-r[0],a=t[1]-r[1],c=t[2]-r[2],u=t[3]-r[3];return Math.sqrt(s*s+a*a+c*c+u*u)}},205:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]/s[0],r[1]=t[1]/s[1],r[2]=t[2]/s[2],r[3]=t[3]/s[3],r}},4242:function(d){d.exports=g;function g(r,t){return r[0]*t[0]+r[1]*t[1]+r[2]*t[2]+r[3]*t[3]}},5680:function(d){d.exports=g;function g(r,t,s,a){var c=new Float32Array(4);return c[0]=r,c[1]=t,c[2]=s,c[3]=a,c}},4020:function(d,g,r){d.exports={create:r(5313),clone:r(1413),fromValues:r(5680),copy:r(3470),set:r(6453),add:r(3433),subtract:r(2705),multiply:r(746),divide:r(205),min:r(2170),max:r(3030),scale:r(5510),scaleAndAdd:r(4224),distance:r(5446),squaredDistance:r(1542),length:r(8177),squaredLength:r(9037),negate:r(6459),inverse:r(8057),normalize:r(381),dot:r(4242),lerp:r(8746),random:r(3770),transformMat4:r(6342),transformQuat:r(5022)}},8057:function(d){d.exports=g;function g(r,t){return r[0]=1/t[0],r[1]=1/t[1],r[2]=1/t[2],r[3]=1/t[3],r}},8177:function(d){d.exports=g;function g(r){var t=r[0],s=r[1],a=r[2],c=r[3];return Math.sqrt(t*t+s*s+a*a+c*c)}},8746:function(d){d.exports=g;function g(r,t,s,a){var c=t[0],u=t[1],l=t[2],y=t[3];return r[0]=c+a*(s[0]-c),r[1]=u+a*(s[1]-u),r[2]=l+a*(s[2]-l),r[3]=y+a*(s[3]-y),r}},3030:function(d){d.exports=g;function g(r,t,s){return r[0]=Math.max(t[0],s[0]),r[1]=Math.max(t[1],s[1]),r[2]=Math.max(t[2],s[2]),r[3]=Math.max(t[3],s[3]),r}},2170:function(d){d.exports=g;function g(r,t,s){return r[0]=Math.min(t[0],s[0]),r[1]=Math.min(t[1],s[1]),r[2]=Math.min(t[2],s[2]),r[3]=Math.min(t[3],s[3]),r}},746:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]*s[0],r[1]=t[1]*s[1],r[2]=t[2]*s[2],r[3]=t[3]*s[3],r}},6459:function(d){d.exports=g;function g(r,t){return r[0]=-t[0],r[1]=-t[1],r[2]=-t[2],r[3]=-t[3],r}},381:function(d){d.exports=g;function g(r,t){var s=t[0],a=t[1],c=t[2],u=t[3],l=s*s+a*a+c*c+u*u;return l>0&&(l=1/Math.sqrt(l),r[0]=s*l,r[1]=a*l,r[2]=c*l,r[3]=u*l),r}},3770:function(d,g,r){var t=r(381),s=r(5510);d.exports=a;function a(c,u){return u=u||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),t(c,c),s(c,c,u),c}},5510:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]*s,r[1]=t[1]*s,r[2]=t[2]*s,r[3]=t[3]*s,r}},4224:function(d){d.exports=g;function g(r,t,s,a){return r[0]=t[0]+s[0]*a,r[1]=t[1]+s[1]*a,r[2]=t[2]+s[2]*a,r[3]=t[3]+s[3]*a,r}},6453:function(d){d.exports=g;function g(r,t,s,a,c){return r[0]=t,r[1]=s,r[2]=a,r[3]=c,r}},1542:function(d){d.exports=g;function g(r,t){var s=t[0]-r[0],a=t[1]-r[1],c=t[2]-r[2],u=t[3]-r[3];return s*s+a*a+c*c+u*u}},9037:function(d){d.exports=g;function g(r){var t=r[0],s=r[1],a=r[2],c=r[3];return t*t+s*s+a*a+c*c}},2705:function(d){d.exports=g;function g(r,t,s){return r[0]=t[0]-s[0],r[1]=t[1]-s[1],r[2]=t[2]-s[2],r[3]=t[3]-s[3],r}},6342:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=t[3];return r[0]=s[0]*a+s[4]*c+s[8]*u+s[12]*l,r[1]=s[1]*a+s[5]*c+s[9]*u+s[13]*l,r[2]=s[2]*a+s[6]*c+s[10]*u+s[14]*l,r[3]=s[3]*a+s[7]*c+s[11]*u+s[15]*l,r}},5022:function(d){d.exports=g;function g(r,t,s){var a=t[0],c=t[1],u=t[2],l=s[0],y=s[1],h=s[2],T=s[3],f=T*a+y*u-h*c,n=T*c+h*a-l*u,v=T*u+l*c-y*a,m=-l*a-y*c-h*u;return r[0]=f*T+m*-l+n*-h-v*-y,r[1]=n*T+m*-y+v*-l-f*-h,r[2]=v*T+m*-h+f*-y-n*-l,r[3]=t[3],r}},9365:function(d,g,r){var t=r(8096),s=r(7896);d.exports=a;function a(c){for(var u=Array.isArray(c)?c:t(c),l=0;l0)continue;et=ze.slice(0,1).join("")}return K(et),$+=et.length,F=F.slice(et.length),F.length}while(!0)}function Ae(){return/[^a-fA-F0-9]/.test(z)?(K(F.join("")),_=l,I):(F.push(z),O=z,I+1)}function ye(){return z==="."||/[eE]/.test(z)?(F.push(z),_=m,O=z,I+1):z==="x"&&F.length===1&&F[0]==="0"?(_=i,F.push(z),O=z,I+1):/[^\d]/.test(z)?(K(F.join("")),_=l,I):(F.push(z),O=z,I+1)}function Se(){return z==="f"&&(F.push(z),O=z,I+=1),/[eE]/.test(z)||(z==="-"||z==="+")&&/[eE]/.test(O)?(F.push(z),O=z,I+1):/[^\d]/.test(z)?(K(F.join("")),_=l,I):(F.push(z),O=z,I+1)}function _e(){if(/[^\d\w_]/.test(z)){var ze=F.join("");return ae[ze]?_=p:J[ze]?_=E:_=b,K(F.join("")),_=l,I}return F.push(z),O=z,I+1}}},3585:function(d,g,r){var t=r(9525);t=t.slice().filter(function(s){return!/^(gl\_|texture)/.test(s)}),d.exports=t.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,g,r){var t=r(399);d.exports=t.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,g,r){var t=r(3193);d.exports=s;function s(a,c){var u=t(c),l=[];return l=l.concat(u(a)),l=l.concat(u(null)),l}},6832:function(d){d.exports=function(g){typeof g=="string"&&(g=[g]);for(var r=[].slice.call(arguments,1),t=[],s=0;s0;){v=w.pop();for(var i=v.adjacent,C=0;C<=b;++C){var x=i[C];if(!(!x.boundary||x.lastVisited<=-E)){for(var k=x.vertices,I=0;I<=b;++I){var B=k[I];B<0?p[I]=m:p[I]=S[B]}var _=this.orient();if(_>0)return x;x.lastVisited=-E,_===0&&w.push(x)}}}return null},f.walk=function(v,m){var b=this.vertices.length-1,E=this.dimension,p=this.vertices,S=this.tuple,w=m?this.interior.length*Math.random()|0:this.interior.length-1,i=this.interior[w];e:for(;!i.boundary;){for(var C=i.vertices,x=i.adjacent,k=0;k<=E;++k)S[k]=p[C[k]];i.lastVisited=b;for(var k=0;k<=E;++k){var I=x[k];if(!(I.lastVisited>=b)){var B=S[k];S[k]=v;var _=this.orient();if(S[k]=B,_<0){i=I;continue e}else I.boundary?I.lastVisited=-b:I.lastVisited=b}}return}return i},f.addPeaks=function(v,m){var b=this.vertices.length-1,E=this.dimension,p=this.vertices,S=this.tuple,w=this.interior,i=this.simplices,C=[m];m.lastVisited=b,m.vertices[m.vertices.indexOf(-1)]=b,m.boundary=!1,w.push(m);for(var x=[];C.length>0;){var m=C.pop(),k=m.vertices,I=m.adjacent,B=k.indexOf(b);if(!(B<0)){for(var _=0;_<=E;++_)if(_!==B){var z=I[_];if(!(!z.boundary||z.lastVisited>=b)){var O=z.vertices;if(z.lastVisited!==-b){for(var F=0,N=0;N<=E;++N)O[N]<0?(F=N,S[N]=v):S[N]=p[O[N]];var V=this.orient();if(V>0){O[F]=b,z.boundary=!1,w.push(z),C.push(z),z.lastVisited=b;continue}else z.lastVisited=-b}var j=z.adjacent,$=k.slice(),q=I.slice(),oe=new a($,q,!0);i.push(oe);var Z=j.indexOf(m);if(!(Z<0)){j[Z]=oe,q[B]=z,$[_]=-1,q[_]=m,I[_]=oe,oe.flip();for(var N=0;N<=E;++N){var G=$[N];if(!(G<0||G===b)){for(var re=new Array(E-1),H=0,J=0;J<=E;++J){var ae=$[J];ae<0||J===N||(re[H++]=ae)}x.push(new c(re,oe,N))}}}}}}}x.sort(u);for(var _=0;_+1=0?w[C++]=i[k]:x=k&1;if(x===(v&1)){var I=w[0];w[0]=w[1],w[1]=I}m.push(w)}}return m};function n(v,m){var b=v.length;if(b===0)throw new Error("Must have at least d+1 points");var E=v[0].length;if(b<=E)throw new Error("Must input at least d+1 points");var p=v.slice(0,E+1),S=t.apply(void 0,p);if(S===0)throw new Error("Input not in general position");for(var w=new Array(E+1),i=0;i<=E;++i)w[i]=i;S<0&&(w[0]=1,w[1]=0);for(var C=new a(w,new Array(E+1),!1),x=C.adjacent,k=new Array(E+2),i=0;i<=E;++i){for(var I=w.slice(),B=0;B<=E;++B)B===i&&(I[B]=-1);var _=I[0];I[0]=I[1],I[1]=_;var z=new a(I,new Array(E+1),!0);x[i]=z,k[i]=z}k[E+1]=C;for(var i=0;i<=E;++i)for(var I=x[i].vertices,O=x[i].adjacent,B=0;B<=E;++B){var F=I[B];if(F<0){O[B]=C;continue}for(var N=0;N<=E;++N)x[N].vertices.indexOf(F)<0&&(O[B]=x[N])}for(var V=new T(E,p,k),j=!!m,i=E+1;i3*(k+1)?T(this,x):this.left.insert(x):this.left=S([x]);else if(x[0]>this.mid)this.right?4*(this.right.count+1)>3*(k+1)?T(this,x):this.right.insert(x):this.right=S([x]);else{var I=t.ge(this.leftPoints,x,E),B=t.ge(this.rightPoints,x,p);this.leftPoints.splice(I,0,x),this.rightPoints.splice(B,0,x)}},l.remove=function(x){var k=this.count-this.leftPoints;if(x[1]3*(k-1))return f(this,x);var B=this.left.remove(x);return B===c?(this.left=null,this.count-=1,a):(B===a&&(this.count-=1),B)}else if(x[0]>this.mid){if(!this.right)return s;var _=this.left?this.left.count:0;if(4*_>3*(k-1))return f(this,x);var B=this.right.remove(x);return B===c?(this.right=null,this.count-=1,a):(B===a&&(this.count-=1),B)}else{if(this.count===1)return this.leftPoints[0]===x?c:s;if(this.leftPoints.length===1&&this.leftPoints[0]===x){if(this.left&&this.right){for(var z=this,O=this.left;O.right;)z=O,O=O.right;if(z===this)O.right=this.right;else{var F=this.left,B=this.right;z.count-=O.count,z.right=O.left,O.left=F,O.right=B}y(this,O),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?y(this,this.left):y(this,this.right);return a}for(var F=t.ge(this.leftPoints,x,E);F=0&&x[B][1]>=k;--B){var _=I(x[B]);if(_)return _}}function m(x,k){for(var I=0;Ithis.mid){if(this.right){var I=this.right.queryPoint(x,k);if(I)return I}return v(this.rightPoints,x,k)}else return m(this.leftPoints,k)},l.queryInterval=function(x,k,I){if(xthis.mid&&this.right){var B=this.right.queryInterval(x,k,I);if(B)return B}return kthis.mid?v(this.rightPoints,x,I):m(this.leftPoints,I)};function b(x,k){return x-k}function E(x,k){var I=x[0]-k[0];return I||x[1]-k[1]}function p(x,k){var I=x[1]-k[1];return I||x[0]-k[0]}function S(x){if(x.length===0)return null;for(var k=[],I=0;I>1],_=[],z=[],O=[],I=0;I * @license MIT */d.exports=function(t){return t!=null&&(g(t)||r(t)||!!t._isBuffer)};function g(t){return!!t.constructor&&typeof t.constructor.isBuffer=="function"&&t.constructor.isBuffer(t)}function r(t){return typeof t.readFloatLE=="function"&&typeof t.slice=="function"&&g(t.slice(0,0))}},3596:function(d){d.exports=function(g){for(var r=g.length,t,s=0;s13)&&t!==32&&t!==133&&t!==160&&t!==5760&&t!==6158&&(t<8192||t>8205)&&t!==8232&&t!==8233&&t!==8239&&t!==8287&&t!==8288&&t!==12288&&t!==65279)return!1;return!0}},3578:function(d){function g(r,t,s){return r*(1-s)+t*s}d.exports=g},7191:function(d,g,r){var t=r(4690),s=r(9823),a=r(7332),c=r(7787),u=r(7437),l=r(2142),y={length:r(4693),normalize:r(899),dot:r(9305),cross:r(903)},h=s(),T=s(),f=[0,0,0,0],n=[[0,0,0],[0,0,0],[0,0,0]],v=[0,0,0];d.exports=function(S,w,i,C,x,k){if(w||(w=[0,0,0]),i||(i=[0,0,0]),C||(C=[0,0,0]),x||(x=[0,0,0,1]),k||(k=[0,0,0,1]),!t(h,S)||(a(T,h),T[3]=0,T[7]=0,T[11]=0,T[15]=1,Math.abs(c(T)<1e-8)))return!1;var I=h[3],B=h[7],_=h[11],z=h[12],O=h[13],F=h[14],N=h[15];if(I!==0||B!==0||_!==0){f[0]=I,f[1]=B,f[2]=_,f[3]=N;var V=u(T,T);if(!V)return!1;l(T,T),m(x,f,T)}else x[0]=x[1]=x[2]=0,x[3]=1;if(w[0]=z,w[1]=O,w[2]=F,b(n,h),i[0]=y.length(n[0]),y.normalize(n[0],n[0]),C[0]=y.dot(n[0],n[1]),E(n[1],n[1],n[0],1,-C[0]),i[1]=y.length(n[1]),y.normalize(n[1],n[1]),C[0]/=i[1],C[1]=y.dot(n[0],n[2]),E(n[2],n[2],n[0],1,-C[1]),C[2]=y.dot(n[1],n[2]),E(n[2],n[2],n[1],1,-C[2]),i[2]=y.length(n[2]),y.normalize(n[2],n[2]),C[1]/=i[2],C[2]/=i[2],y.cross(v,n[1],n[2]),y.dot(n[0],v)<0)for(var j=0;j<3;j++)i[j]*=-1,n[j][0]*=-1,n[j][1]*=-1,n[j][2]*=-1;return k[0]=.5*Math.sqrt(Math.max(1+n[0][0]-n[1][1]-n[2][2],0)),k[1]=.5*Math.sqrt(Math.max(1-n[0][0]+n[1][1]-n[2][2],0)),k[2]=.5*Math.sqrt(Math.max(1-n[0][0]-n[1][1]+n[2][2],0)),k[3]=.5*Math.sqrt(Math.max(1+n[0][0]+n[1][1]+n[2][2],0)),n[2][1]>n[1][2]&&(k[0]=-k[0]),n[0][2]>n[2][0]&&(k[1]=-k[1]),n[1][0]>n[0][1]&&(k[2]=-k[2]),!0};function m(p,S,w){var i=S[0],C=S[1],x=S[2],k=S[3];return p[0]=w[0]*i+w[4]*C+w[8]*x+w[12]*k,p[1]=w[1]*i+w[5]*C+w[9]*x+w[13]*k,p[2]=w[2]*i+w[6]*C+w[10]*x+w[14]*k,p[3]=w[3]*i+w[7]*C+w[11]*x+w[15]*k,p}function b(p,S){p[0][0]=S[0],p[0][1]=S[1],p[0][2]=S[2],p[1][0]=S[4],p[1][1]=S[5],p[1][2]=S[6],p[2][0]=S[8],p[2][1]=S[9],p[2][2]=S[10]}function E(p,S,w,i,C){p[0]=S[0]*i+w[0]*C,p[1]=S[1]*i+w[1]*C,p[2]=S[2]*i+w[2]*C}},4690:function(d){d.exports=function(r,t){var s=t[15];if(s===0)return!1;for(var a=1/s,c=0;c<16;c++)r[c]=t[c]*a;return!0}},7649:function(d,g,r){var t=r(1868),s=r(1102),a=r(7191),c=r(7787),u=r(1116),l=f(),y=f(),h=f();d.exports=T;function T(m,b,E,p){if(c(b)===0||c(E)===0)return!1;var S=a(b,l.translate,l.scale,l.skew,l.perspective,l.quaternion),w=a(E,y.translate,y.scale,y.skew,y.perspective,y.quaternion);return!S||!w?!1:(t(h.translate,l.translate,y.translate,p),t(h.skew,l.skew,y.skew,p),t(h.scale,l.scale,y.scale,p),t(h.perspective,l.perspective,y.perspective,p),u(h.quaternion,l.quaternion,y.quaternion,p),s(m,h.translate,h.scale,h.skew,h.perspective,h.quaternion),!0)}function f(){return{translate:n(),scale:n(1),skew:n(),perspective:v(),quaternion:v()}}function n(m){return[m||0,m||0,m||0]}function v(){return[0,0,0,1]}},1102:function(d,g,r){var t={identity:r(9947),translate:r(998),multiply:r(104),create:r(9823),scale:r(3668),fromRotationTranslation:r(7280)};t.create();var s=t.create();d.exports=function(c,u,l,y,h,T){return t.identity(c),t.fromRotationTranslation(c,T,u),c[3]=h[0],c[7]=h[1],c[11]=h[2],c[15]=h[3],t.identity(s),y[2]!==0&&(s[9]=y[2],t.multiply(c,c,s)),y[1]!==0&&(s[9]=0,s[8]=y[1],t.multiply(c,c,s)),y[0]!==0&&(s[8]=0,s[4]=y[0],t.multiply(c,c,s)),t.scale(c,c,l),c}},9298:function(d,g,r){var t=r(5070),s=r(7649),a=r(7437),c=r(6109),u=r(7115),l=r(5240),y=r(3012),h=r(998);r(3668);var T=r(899),f=[0,0,0];d.exports=b;function n(E){this._components=E.slice(),this._time=[0],this.prevMatrix=E.slice(),this.nextMatrix=E.slice(),this.computedMatrix=E.slice(),this.computedInverse=E.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]}var v=n.prototype;v.recalcMatrix=function(E){var p=this._time,S=t.le(p,E),w=this.computedMatrix;if(!(S<0)){var i=this._components;if(S===p.length-1)for(var C=16*S,x=0;x<16;++x)w[x]=i[C++];else{for(var k=p[S+1]-p[S],C=16*S,I=this.prevMatrix,B=!0,x=0;x<16;++x)I[x]=i[C++];for(var _=this.nextMatrix,x=0;x<16;++x)_[x]=i[C++],B=B&&I[x]===_[x];if(k<1e-6||B)for(var x=0;x<16;++x)w[x]=I[x];else s(w,I,_,(E-p[S])/k)}var z=this.computedUp;z[0]=w[1],z[1]=w[5],z[2]=w[9],T(z,z);var O=this.computedInverse;a(O,w);var F=this.computedEye,N=O[15];F[0]=O[12]/N,F[1]=O[13]/N,F[2]=O[14]/N;for(var V=this.computedCenter,j=Math.exp(this.computedRadius[0]),x=0;x<3;++x)V[x]=F[x]-w[2+4*x]*j}},v.idle=function(E){if(!(E1&&t(a[y[n-2]],a[y[n-1]],f)<=0;)n-=1,y.pop();for(y.push(T),n=h.length;n>1&&t(a[h[n-2]],a[h[n-1]],f)>=0;)n-=1,h.pop();h.push(T)}for(var v=new Array(h.length+y.length-2),m=0,u=0,b=y.length;u0;--E)v[m++]=h[E];return v}},6145:function(d,g,r){d.exports=s;var t=r(4110);function s(a,c){c||(c=a,a=window);var u=0,l=0,y=0,h={shift:!1,alt:!1,control:!1,meta:!1},T=!1;function f(x){var k=!1;return"altKey"in x&&(k=k||x.altKey!==h.alt,h.alt=!!x.altKey),"shiftKey"in x&&(k=k||x.shiftKey!==h.shift,h.shift=!!x.shiftKey),"ctrlKey"in x&&(k=k||x.ctrlKey!==h.control,h.control=!!x.ctrlKey),"metaKey"in x&&(k=k||x.metaKey!==h.meta,h.meta=!!x.metaKey),k}function n(x,k){var I=t.x(k),B=t.y(k);"buttons"in k&&(x=k.buttons|0),(x!==u||I!==l||B!==y||f(k))&&(u=x|0,l=I||0,y=B||0,c&&c(u,l,y,h))}function v(x){n(0,x)}function m(){(u||l||y||h.shift||h.alt||h.meta||h.control)&&(l=y=0,u=0,h.shift=h.alt=h.control=h.meta=!1,c&&c(0,0,0,h))}function b(x){f(x)&&c&&c(u,l,y,h)}function E(x){t.buttons(x)===0?n(0,x):n(u,x)}function p(x){n(u|t.buttons(x),x)}function S(x){n(u&~t.buttons(x),x)}function w(){T||(T=!0,a.addEventListener("mousemove",E),a.addEventListener("mousedown",p),a.addEventListener("mouseup",S),a.addEventListener("mouseleave",v),a.addEventListener("mouseenter",v),a.addEventListener("mouseout",v),a.addEventListener("mouseover",v),a.addEventListener("blur",m),a.addEventListener("keyup",b),a.addEventListener("keydown",b),a.addEventListener("keypress",b),a!==window&&(window.addEventListener("blur",m),window.addEventListener("keyup",b),window.addEventListener("keydown",b),window.addEventListener("keypress",b)))}function i(){T&&(T=!1,a.removeEventListener("mousemove",E),a.removeEventListener("mousedown",p),a.removeEventListener("mouseup",S),a.removeEventListener("mouseleave",v),a.removeEventListener("mouseenter",v),a.removeEventListener("mouseout",v),a.removeEventListener("mouseover",v),a.removeEventListener("blur",m),a.removeEventListener("keyup",b),a.removeEventListener("keydown",b),a.removeEventListener("keypress",b),a!==window&&(window.removeEventListener("blur",m),window.removeEventListener("keyup",b),window.removeEventListener("keydown",b),window.removeEventListener("keypress",b)))}w();var C={element:a};return Object.defineProperties(C,{enabled:{get:function(){return T},set:function(x){x?w():i()},enumerable:!0},buttons:{get:function(){return u},enumerable:!0},x:{get:function(){return l},enumerable:!0},y:{get:function(){return y},enumerable:!0},mods:{get:function(){return h},enumerable:!0}}),C}},2565:function(d){var g={left:0,top:0};d.exports=r;function r(s,a,c){a=a||s.currentTarget||s.srcElement,Array.isArray(c)||(c=[0,0]);var u=s.clientX||0,l=s.clientY||0,y=t(a);return c[0]=u-y.left,c[1]=l-y.top,c}function t(s){return s===window||s===document||s===document.body?g:s.getBoundingClientRect()}},4110:function(d,g){function r(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var u=c.which;if(u===2)return 4;if(u===3)return 2;if(u>0)return 1<=0)return 1<0){if(q=1,G[H++]=h(w[k],m,b,E),k+=V,p>0)for($=1,I=w[k],J=G[H]=h(I,m,b,E),Y=G[H+ae],le=G[H+ie],me=G[H+de],(J!==Y||J!==le||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,Y,le,me,m,b,E),Le=re[H]=oe++),H+=1,k+=V,$=2;$0)for($=1,I=w[k],J=G[H]=h(I,m,b,E),Y=G[H+ae],le=G[H+ie],me=G[H+de],(J!==Y||J!==le||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,Y,le,me,m,b,E),Le=re[H]=oe++,me!==le&&y(re[H+ie],Le,O,N,le,me,m,b,E)),H+=1,k+=V,$=2;$0){if($=1,G[H++]=h(w[k],m,b,E),k+=V,S>0)for(q=1,I=w[k],J=G[H]=h(I,m,b,E),le=G[H+ie],Y=G[H+ae],me=G[H+de],(J!==le||J!==Y||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,le,Y,me,m,b,E),Le=re[H]=oe++),H+=1,k+=V,q=2;q0)for(q=1,I=w[k],J=G[H]=h(I,m,b,E),le=G[H+ie],Y=G[H+ae],me=G[H+de],(J!==le||J!==Y||J!==me)&&(_=w[k+B],O=w[k+z],N=w[k+F],l($,q,I,_,O,N,J,le,Y,me,m,b,E),Le=re[H]=oe++,me!==le&&y(re[H+ie],Le,N,_,me,le,m,b,E)),H+=1,k+=V,q=2;q 0"),typeof u.vertex!="function"&&l("Must specify vertex creation function"),typeof u.cell!="function"&&l("Must specify cell creation function"),typeof u.phase!="function"&&l("Must specify phase function");for(var f=u.getters||[],n=new Array(h),v=0;v=0?n[v]=!0:n[v]=!1;return a(u.vertex,u.cell,u.phase,T,y,n)}},9144:function(d,g,r){var t=r(3094),s={zero:function(b,E,p,S){var w=b[0],i=p[0];S|=0;var C=0,x=i;for(C=0;C2&&C[1]>2&&S(i.pick(-1,-1).lo(1,1).hi(C[0]-2,C[1]-2),w.pick(-1,-1,0).lo(1,1).hi(C[0]-2,C[1]-2),w.pick(-1,-1,1).lo(1,1).hi(C[0]-2,C[1]-2)),C[1]>2&&(p(i.pick(0,-1).lo(1).hi(C[1]-2),w.pick(0,-1,1).lo(1).hi(C[1]-2)),E(w.pick(0,-1,0).lo(1).hi(C[1]-2))),C[1]>2&&(p(i.pick(C[0]-1,-1).lo(1).hi(C[1]-2),w.pick(C[0]-1,-1,1).lo(1).hi(C[1]-2)),E(w.pick(C[0]-1,-1,0).lo(1).hi(C[1]-2))),C[0]>2&&(p(i.pick(-1,0).lo(1).hi(C[0]-2),w.pick(-1,0,0).lo(1).hi(C[0]-2)),E(w.pick(-1,0,1).lo(1).hi(C[0]-2))),C[0]>2&&(p(i.pick(-1,C[1]-1).lo(1).hi(C[0]-2),w.pick(-1,C[1]-1,0).lo(1).hi(C[0]-2)),E(w.pick(-1,C[1]-1,1).lo(1).hi(C[0]-2))),w.set(0,0,0,0),w.set(0,0,1,0),w.set(C[0]-1,0,0,0),w.set(C[0]-1,0,1,0),w.set(0,C[1]-1,0,0),w.set(0,C[1]-1,1,0),w.set(C[0]-1,C[1]-1,0,0),w.set(C[0]-1,C[1]-1,1,0),w}}function m(b){var E=b.join(),C=h[E];if(C)return C;for(var p=b.length,S=[T,f],w=1;w<=p;++w)S.push(n(w));var i=v,C=i.apply(void 0,S);return h[E]=C,C}d.exports=function(E,p,S){if(Array.isArray(S)||(typeof S=="string"?S=t(p.dimension,S):S=t(p.dimension,"clamp")),p.size===0)return E;if(p.dimension===0)return E.set(0),E;var w=m(S);return w(E,p)}},3581:function(d){function g(c,u){var l=Math.floor(u),y=u-l,h=0<=l&&l0;){O<64?(p=O,O=0):(p=64,O-=64);for(var F=h[1]|0;F>0;){F<64?(S=F,F=0):(S=64,F-=64),n=_+O*i+F*C,b=z+O*k+F*I;var N=0,V=0,j=0,$=x,q=i-w*x,oe=C-p*i,Z=B,G=k-w*B,re=I-p*k;for(j=0;j0;){I<64?(p=I,I=0):(p=64,I-=64);for(var B=h[0]|0;B>0;){B<64?(E=B,B=0):(E=64,B-=64),n=x+I*w+B*S,b=k+I*C+B*i;var _=0,z=0,O=w,F=S-p*w,N=C,V=i-p*C;for(z=0;z0;){z<64?(S=z,z=0):(S=64,z-=64);for(var O=h[0]|0;O>0;){O<64?(E=O,O=0):(E=64,O-=64);for(var F=h[1]|0;F>0;){F<64?(p=F,F=0):(p=64,F-=64),n=B+z*C+O*w+F*i,b=_+z*I+O*x+F*k;var N=0,V=0,j=0,$=C,q=w-S*C,oe=i-E*w,Z=I,G=x-S*I,re=k-E*x;for(j=0;jv;){N=0,V=_-p;t:for(O=0;O$)break t;V+=x,N+=k}for(N=_,V=_-p,O=0;O>1,F=O-B,N=O+B,V=_,j=F,$=O,q=N,oe=z,Z=m+1,G=b-1,re=!0,H,J,ae,K,Y,ie,ne,le,de,we=0,me=0,Le=0,ve,Ae,ye,Se,_e,ze,Ie,Ne,et,st,Ze,Ke,nt,it,lt,vt,xt=C,Je=f(xt),Pe=f(xt);Ae=S*V,ye=S*j,vt=p;e:for(ve=0;ve0){J=V,V=j,j=J;break e}if(Le<0)break e;vt+=k}Ae=S*q,ye=S*oe,vt=p;e:for(ve=0;ve0){J=q,q=oe,oe=J;break e}if(Le<0)break e;vt+=k}Ae=S*V,ye=S*$,vt=p;e:for(ve=0;ve0){J=V,V=$,$=J;break e}if(Le<0)break e;vt+=k}Ae=S*j,ye=S*$,vt=p;e:for(ve=0;ve0){J=j,j=$,$=J;break e}if(Le<0)break e;vt+=k}Ae=S*V,ye=S*q,vt=p;e:for(ve=0;ve0){J=V,V=q,q=J;break e}if(Le<0)break e;vt+=k}Ae=S*$,ye=S*q,vt=p;e:for(ve=0;ve0){J=$,$=q,q=J;break e}if(Le<0)break e;vt+=k}Ae=S*j,ye=S*oe,vt=p;e:for(ve=0;ve0){J=j,j=oe,oe=J;break e}if(Le<0)break e;vt+=k}Ae=S*j,ye=S*$,vt=p;e:for(ve=0;ve0){J=j,j=$,$=J;break e}if(Le<0)break e;vt+=k}Ae=S*q,ye=S*oe,vt=p;e:for(ve=0;ve0){J=q,q=oe,oe=J;break e}if(Le<0)break e;vt+=k}for(Ae=S*V,ye=S*j,Se=S*$,_e=S*q,ze=S*oe,Ie=S*_,Ne=S*O,et=S*z,lt=0,vt=p,ve=0;ve0)G--;else if(Le<0){for(Ae=S*ie,ye=S*Z,Se=S*G,vt=p,ve=0;ve0)for(;;){ne=p+G*S,lt=0;e:for(ve=0;ve0){if(--Gz){e:for(;;){for(ne=p+Z*S,lt=0,vt=p,ve=0;ve1&&v?b(n,v[0],v[1]):b(n)}var y={"uint32,1,0":function(T,f){return function(n){var v=n.data,m=n.offset|0,b=n.shape,E=n.stride,p=E[0]|0,S=b[0]|0,w=E[1]|0,i=b[1]|0,C=w,x=w,k=1;S<=32?T(0,S-1,v,m,p,w,S,i,C,x,k):f(0,S-1,v,m,p,w,S,i,C,x,k)}}};function h(T,f){var n=[f,T].join(","),v=y[n],m=c(T,f),b=l(T,f,m);return v(m,b)}d.exports=h},8729:function(d,g,r){var t=r(8139),s={};function a(c){var u=c.order,l=c.dtype,y=[u,l],h=y.join(":"),T=s[h];return T||(s[h]=T=t(u,l)),T(c),c}d.exports=a},5050:function(d,g,r){var t=r(4780),s=typeof Float64Array<"u";function a(f,n){return f[0]-n[0]}function c(){var f=this.stride,n=new Array(f.length),v;for(v=0;v=0&&(w=p|0,S+=C*w,i-=w),new m(this.data,i,C,S)},b.step=function(p){var S=this.shape[0],w=this.stride[0],i=this.offset,C=0,x=Math.ceil;return typeof p=="number"&&(C=p|0,C<0?(i+=w*(S-1),S=x(-S/C)):S=x(S/C),w*=C),new m(this.data,S,w,i)},b.transpose=function(p){p=p===void 0?0:p|0;var S=this.shape,w=this.stride;return new m(this.data,S[p],w[p],this.offset)},b.pick=function(p){var S=[],w=[],i=this.offset;typeof p=="number"&&p>=0?i=i+this.stride[0]*p|0:(S.push(this.shape[0]),w.push(this.stride[0]));var C=n[S.length+1];return C(this.data,S,w,i)},function(p,S,w,i){return new m(p,S[0],w[0],i)}},2:function(f,n,v){function m(E,p,S,w,i,C){this.data=E,this.shape=[p,S],this.stride=[w,i],this.offset=C|0}var b=m.prototype;return b.dtype=f,b.dimension=2,Object.defineProperty(b,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(b,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),b.set=function(p,S,w){return f==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*S,w):this.data[this.offset+this.stride[0]*p+this.stride[1]*S]=w},b.get=function(p,S){return f==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*S):this.data[this.offset+this.stride[0]*p+this.stride[1]*S]},b.index=function(p,S){return this.offset+this.stride[0]*p+this.stride[1]*S},b.hi=function(p,S){return new m(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof S!="number"||S<0?this.shape[1]:S|0,this.stride[0],this.stride[1],this.offset)},b.lo=function(p,S){var w=this.offset,i=0,C=this.shape[0],x=this.shape[1],k=this.stride[0],I=this.stride[1];return typeof p=="number"&&p>=0&&(i=p|0,w+=k*i,C-=i),typeof S=="number"&&S>=0&&(i=S|0,w+=I*i,x-=i),new m(this.data,C,x,k,I,w)},b.step=function(p,S){var w=this.shape[0],i=this.shape[1],C=this.stride[0],x=this.stride[1],k=this.offset,I=0,B=Math.ceil;return typeof p=="number"&&(I=p|0,I<0?(k+=C*(w-1),w=B(-w/I)):w=B(w/I),C*=I),typeof S=="number"&&(I=S|0,I<0?(k+=x*(i-1),i=B(-i/I)):i=B(i/I),x*=I),new m(this.data,w,i,C,x,k)},b.transpose=function(p,S){p=p===void 0?0:p|0,S=S===void 0?1:S|0;var w=this.shape,i=this.stride;return new m(this.data,w[p],w[S],i[p],i[S],this.offset)},b.pick=function(p,S){var w=[],i=[],C=this.offset;typeof p=="number"&&p>=0?C=C+this.stride[0]*p|0:(w.push(this.shape[0]),i.push(this.stride[0])),typeof S=="number"&&S>=0?C=C+this.stride[1]*S|0:(w.push(this.shape[1]),i.push(this.stride[1]));var x=n[w.length+1];return x(this.data,w,i,C)},function(p,S,w,i){return new m(p,S[0],S[1],w[0],w[1],i)}},3:function(f,n,v){function m(E,p,S,w,i,C,x,k){this.data=E,this.shape=[p,S,w],this.stride=[i,C,x],this.offset=k|0}var b=m.prototype;return b.dtype=f,b.dimension=3,Object.defineProperty(b,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(b,"order",{get:function(){var p=Math.abs(this.stride[0]),S=Math.abs(this.stride[1]),w=Math.abs(this.stride[2]);return p>S?S>w?[2,1,0]:p>w?[1,2,0]:[1,0,2]:p>w?[2,0,1]:w>S?[0,1,2]:[0,2,1]}}),b.set=function(p,S,w,i){return f==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w,i):this.data[this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w]=i},b.get=function(p,S,w){return f==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w):this.data[this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w]},b.index=function(p,S,w){return this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w},b.hi=function(p,S,w){return new m(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof w!="number"||w<0?this.shape[2]:w|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},b.lo=function(p,S,w){var i=this.offset,C=0,x=this.shape[0],k=this.shape[1],I=this.shape[2],B=this.stride[0],_=this.stride[1],z=this.stride[2];return typeof p=="number"&&p>=0&&(C=p|0,i+=B*C,x-=C),typeof S=="number"&&S>=0&&(C=S|0,i+=_*C,k-=C),typeof w=="number"&&w>=0&&(C=w|0,i+=z*C,I-=C),new m(this.data,x,k,I,B,_,z,i)},b.step=function(p,S,w){var i=this.shape[0],C=this.shape[1],x=this.shape[2],k=this.stride[0],I=this.stride[1],B=this.stride[2],_=this.offset,z=0,O=Math.ceil;return typeof p=="number"&&(z=p|0,z<0?(_+=k*(i-1),i=O(-i/z)):i=O(i/z),k*=z),typeof S=="number"&&(z=S|0,z<0?(_+=I*(C-1),C=O(-C/z)):C=O(C/z),I*=z),typeof w=="number"&&(z=w|0,z<0?(_+=B*(x-1),x=O(-x/z)):x=O(x/z),B*=z),new m(this.data,i,C,x,k,I,B,_)},b.transpose=function(p,S,w){p=p===void 0?0:p|0,S=S===void 0?1:S|0,w=w===void 0?2:w|0;var i=this.shape,C=this.stride;return new m(this.data,i[p],i[S],i[w],C[p],C[S],C[w],this.offset)},b.pick=function(p,S,w){var i=[],C=[],x=this.offset;typeof p=="number"&&p>=0?x=x+this.stride[0]*p|0:(i.push(this.shape[0]),C.push(this.stride[0])),typeof S=="number"&&S>=0?x=x+this.stride[1]*S|0:(i.push(this.shape[1]),C.push(this.stride[1])),typeof w=="number"&&w>=0?x=x+this.stride[2]*w|0:(i.push(this.shape[2]),C.push(this.stride[2]));var k=n[i.length+1];return k(this.data,i,C,x)},function(p,S,w,i){return new m(p,S[0],S[1],S[2],w[0],w[1],w[2],i)}},4:function(f,n,v){function m(E,p,S,w,i,C,x,k,I,B){this.data=E,this.shape=[p,S,w,i],this.stride=[C,x,k,I],this.offset=B|0}var b=m.prototype;return b.dtype=f,b.dimension=4,Object.defineProperty(b,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(b,"order",{get:v}),b.set=function(p,S,w,i,C){return f==="generic"?this.data.set(this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w+this.stride[3]*i,C):this.data[this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w+this.stride[3]*i]=C},b.get=function(p,S,w,i){return f==="generic"?this.data.get(this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w+this.stride[3]*i):this.data[this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w+this.stride[3]*i]},b.index=function(p,S,w,i){return this.offset+this.stride[0]*p+this.stride[1]*S+this.stride[2]*w+this.stride[3]*i},b.hi=function(p,S,w,i){return new m(this.data,typeof p!="number"||p<0?this.shape[0]:p|0,typeof S!="number"||S<0?this.shape[1]:S|0,typeof w!="number"||w<0?this.shape[2]:w|0,typeof i!="number"||i<0?this.shape[3]:i|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},b.lo=function(p,S,w,i){var C=this.offset,x=0,k=this.shape[0],I=this.shape[1],B=this.shape[2],_=this.shape[3],z=this.stride[0],O=this.stride[1],F=this.stride[2],N=this.stride[3];return typeof p=="number"&&p>=0&&(x=p|0,C+=z*x,k-=x),typeof S=="number"&&S>=0&&(x=S|0,C+=O*x,I-=x),typeof w=="number"&&w>=0&&(x=w|0,C+=F*x,B-=x),typeof i=="number"&&i>=0&&(x=i|0,C+=N*x,_-=x),new m(this.data,k,I,B,_,z,O,F,N,C)},b.step=function(p,S,w,i){var C=this.shape[0],x=this.shape[1],k=this.shape[2],I=this.shape[3],B=this.stride[0],_=this.stride[1],z=this.stride[2],O=this.stride[3],F=this.offset,N=0,V=Math.ceil;return typeof p=="number"&&(N=p|0,N<0?(F+=B*(C-1),C=V(-C/N)):C=V(C/N),B*=N),typeof S=="number"&&(N=S|0,N<0?(F+=_*(x-1),x=V(-x/N)):x=V(x/N),_*=N),typeof w=="number"&&(N=w|0,N<0?(F+=z*(k-1),k=V(-k/N)):k=V(k/N),z*=N),typeof i=="number"&&(N=i|0,N<0?(F+=O*(I-1),I=V(-I/N)):I=V(I/N),O*=N),new m(this.data,C,x,k,I,B,_,z,O,F)},b.transpose=function(p,S,w,i){p=p===void 0?0:p|0,S=S===void 0?1:S|0,w=w===void 0?2:w|0,i=i===void 0?3:i|0;var C=this.shape,x=this.stride;return new m(this.data,C[p],C[S],C[w],C[i],x[p],x[S],x[w],x[i],this.offset)},b.pick=function(p,S,w,i){var C=[],x=[],k=this.offset;typeof p=="number"&&p>=0?k=k+this.stride[0]*p|0:(C.push(this.shape[0]),x.push(this.stride[0])),typeof S=="number"&&S>=0?k=k+this.stride[1]*S|0:(C.push(this.shape[1]),x.push(this.stride[1])),typeof w=="number"&&w>=0?k=k+this.stride[2]*w|0:(C.push(this.shape[2]),x.push(this.stride[2])),typeof i=="number"&&i>=0?k=k+this.stride[3]*i|0:(C.push(this.shape[3]),x.push(this.stride[3]));var I=n[C.length+1];return I(this.data,C,x,k)},function(p,S,w,i){return new m(p,S[0],S[1],S[2],S[3],w[0],w[1],w[2],w[3],i)}},5:function(n,v,m){function b(p,S,w,i,C,x,k,I,B,_,z,O){this.data=p,this.shape=[S,w,i,C,x],this.stride=[k,I,B,_,z],this.offset=O|0}var E=b.prototype;return E.dtype=n,E.dimension=5,Object.defineProperty(E,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(E,"order",{get:m}),E.set=function(S,w,i,C,x,k){return n==="generic"?this.data.set(this.offset+this.stride[0]*S+this.stride[1]*w+this.stride[2]*i+this.stride[3]*C+this.stride[4]*x,k):this.data[this.offset+this.stride[0]*S+this.stride[1]*w+this.stride[2]*i+this.stride[3]*C+this.stride[4]*x]=k},E.get=function(S,w,i,C,x){return n==="generic"?this.data.get(this.offset+this.stride[0]*S+this.stride[1]*w+this.stride[2]*i+this.stride[3]*C+this.stride[4]*x):this.data[this.offset+this.stride[0]*S+this.stride[1]*w+this.stride[2]*i+this.stride[3]*C+this.stride[4]*x]},E.index=function(S,w,i,C,x){return this.offset+this.stride[0]*S+this.stride[1]*w+this.stride[2]*i+this.stride[3]*C+this.stride[4]*x},E.hi=function(S,w,i,C,x){return new b(this.data,typeof S!="number"||S<0?this.shape[0]:S|0,typeof w!="number"||w<0?this.shape[1]:w|0,typeof i!="number"||i<0?this.shape[2]:i|0,typeof C!="number"||C<0?this.shape[3]:C|0,typeof x!="number"||x<0?this.shape[4]:x|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},E.lo=function(S,w,i,C,x){var k=this.offset,I=0,B=this.shape[0],_=this.shape[1],z=this.shape[2],O=this.shape[3],F=this.shape[4],N=this.stride[0],V=this.stride[1],j=this.stride[2],$=this.stride[3],q=this.stride[4];return typeof S=="number"&&S>=0&&(I=S|0,k+=N*I,B-=I),typeof w=="number"&&w>=0&&(I=w|0,k+=V*I,_-=I),typeof i=="number"&&i>=0&&(I=i|0,k+=j*I,z-=I),typeof C=="number"&&C>=0&&(I=C|0,k+=$*I,O-=I),typeof x=="number"&&x>=0&&(I=x|0,k+=q*I,F-=I),new b(this.data,B,_,z,O,F,N,V,j,$,q,k)},E.step=function(S,w,i,C,x){var k=this.shape[0],I=this.shape[1],B=this.shape[2],_=this.shape[3],z=this.shape[4],O=this.stride[0],F=this.stride[1],N=this.stride[2],V=this.stride[3],j=this.stride[4],$=this.offset,q=0,oe=Math.ceil;return typeof S=="number"&&(q=S|0,q<0?($+=O*(k-1),k=oe(-k/q)):k=oe(k/q),O*=q),typeof w=="number"&&(q=w|0,q<0?($+=F*(I-1),I=oe(-I/q)):I=oe(I/q),F*=q),typeof i=="number"&&(q=i|0,q<0?($+=N*(B-1),B=oe(-B/q)):B=oe(B/q),N*=q),typeof C=="number"&&(q=C|0,q<0?($+=V*(_-1),_=oe(-_/q)):_=oe(_/q),V*=q),typeof x=="number"&&(q=x|0,q<0?($+=j*(z-1),z=oe(-z/q)):z=oe(z/q),j*=q),new b(this.data,k,I,B,_,z,O,F,N,V,j,$)},E.transpose=function(S,w,i,C,x){S=S===void 0?0:S|0,w=w===void 0?1:w|0,i=i===void 0?2:i|0,C=C===void 0?3:C|0,x=x===void 0?4:x|0;var k=this.shape,I=this.stride;return new b(this.data,k[S],k[w],k[i],k[C],k[x],I[S],I[w],I[i],I[C],I[x],this.offset)},E.pick=function(S,w,i,C,x){var k=[],I=[],B=this.offset;typeof S=="number"&&S>=0?B=B+this.stride[0]*S|0:(k.push(this.shape[0]),I.push(this.stride[0])),typeof w=="number"&&w>=0?B=B+this.stride[1]*w|0:(k.push(this.shape[1]),I.push(this.stride[1])),typeof i=="number"&&i>=0?B=B+this.stride[2]*i|0:(k.push(this.shape[2]),I.push(this.stride[2])),typeof C=="number"&&C>=0?B=B+this.stride[3]*C|0:(k.push(this.shape[3]),I.push(this.stride[3])),typeof x=="number"&&x>=0?B=B+this.stride[4]*x|0:(k.push(this.shape[4]),I.push(this.stride[4]));var _=v[k.length+1];return _(this.data,k,I,B)},function(S,w,i,C){return new b(S,w[0],w[1],w[2],w[3],w[4],i[0],i[1],i[2],i[3],i[4],C)}}};function l(f,n){var v=n===-1?"T":String(n),m=u[v];return n===-1?m(f):n===0?m(f,h[f][0]):m(f,h[f],c)}function y(f){if(t(f))return"buffer";if(s)switch(Object.prototype.toString.call(f)){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(f)?"array":"generic"}var h={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function T(f,n,v,m){if(f===void 0){var i=h.array[0];return i([])}else typeof f=="number"&&(f=[f]);n===void 0&&(n=[f.length]);var b=n.length;if(v===void 0){v=new Array(b);for(var E=b-1,p=1;E>=0;--E)v[E]=p,p*=n[E]}if(m===void 0){m=0;for(var E=0;E>>0;d.exports=c;function c(u,l){if(isNaN(u)||isNaN(l))return NaN;if(u===l)return u;if(u===0)return l<0?-s:s;var y=t.hi(u),h=t.lo(u);return l>u==u>0?h===a?(y+=1,h=0):h+=1:h===0?(h=a,y-=1):h-=1,t.pack(h,y)}},115:function(d,g){var r=1e-6,t=1e-6;g.vertexNormals=function(s,a,c){for(var u=a.length,l=new Array(u),y=c===void 0?r:c,h=0;hy)for(var k=l[n],I=1/Math.sqrt(w*C),x=0;x<3;++x){var B=(x+1)%3,_=(x+2)%3;k[x]+=I*(i[B]*S[_]-i[_]*S[B])}}for(var h=0;hy)for(var I=1/Math.sqrt(z),x=0;x<3;++x)k[x]*=I;else for(var x=0;x<3;++x)k[x]=0}return l},g.faceNormals=function(s,a,c){for(var u=s.length,l=new Array(u),y=c===void 0?t:c,h=0;hy?E=1/Math.sqrt(E):E=0;for(var n=0;n<3;++n)b[n]*=E;l[h]=b}return l}},567:function(d){d.exports=g;function g(r,t,s,a,c,u,l,y,h,T){var f=t+u+T;if(n>0){var n=Math.sqrt(f+1);r[0]=.5*(l-h)/n,r[1]=.5*(y-a)/n,r[2]=.5*(s-u)/n,r[3]=.5*n}else{var v=Math.max(t,u,T),n=Math.sqrt(2*v-f+1);t>=v?(r[0]=.5*n,r[1]=.5*(c+s)/n,r[2]=.5*(y+a)/n,r[3]=.5*(l-h)/n):u>=v?(r[0]=.5*(s+c)/n,r[1]=.5*n,r[2]=.5*(h+l)/n,r[3]=.5*(y-a)/n):(r[0]=.5*(a+y)/n,r[1]=.5*(l+h)/n,r[2]=.5*n,r[3]=.5*(s-c)/n)}return r}},7774:function(d,g,r){d.exports=n;var t=r(8444),s=r(3012),a=r(5950),c=r(7437),u=r(567);function l(v,m,b){return Math.sqrt(Math.pow(v,2)+Math.pow(m,2)+Math.pow(b,2))}function y(v,m,b,E){return Math.sqrt(Math.pow(v,2)+Math.pow(m,2)+Math.pow(b,2)+Math.pow(E,2))}function h(v,m){var b=m[0],E=m[1],p=m[2],S=m[3],w=y(b,E,p,S);w>1e-6?(v[0]=b/w,v[1]=E/w,v[2]=p/w,v[3]=S/w):(v[0]=v[1]=v[2]=0,v[3]=1)}function T(v,m,b){this.radius=t([b]),this.center=t(m),this.rotation=t(v),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 f=T.prototype;f.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},f.recalcMatrix=function(v){this.radius.curve(v),this.center.curve(v),this.rotation.curve(v);var m=this.computedRotation;h(m,m);var b=this.computedMatrix;a(b,m);var E=this.computedCenter,p=this.computedEye,S=this.computedUp,w=Math.exp(this.computedRadius[0]);p[0]=E[0]+w*b[2],p[1]=E[1]+w*b[6],p[2]=E[2]+w*b[10],S[0]=b[1],S[1]=b[5],S[2]=b[9];for(var i=0;i<3;++i){for(var C=0,x=0;x<3;++x)C+=b[i+4*x]*p[x];b[12+i]=-C}},f.getMatrix=function(v,m){this.recalcMatrix(v);var b=this.computedMatrix;if(m){for(var E=0;E<16;++E)m[E]=b[E];return m}return b},f.idle=function(v){this.center.idle(v),this.radius.idle(v),this.rotation.idle(v)},f.flush=function(v){this.center.flush(v),this.radius.flush(v),this.rotation.flush(v)},f.pan=function(v,m,b,E){m=m||0,b=b||0,E=E||0,this.recalcMatrix(v);var p=this.computedMatrix,S=p[1],w=p[5],i=p[9],C=l(S,w,i);S/=C,w/=C,i/=C;var x=p[0],k=p[4],I=p[8],B=x*S+k*w+I*i;x-=S*B,k-=w*B,I-=i*B;var _=l(x,k,I);x/=_,k/=_,I/=_,p[2],p[6],p[10];var z=x*m+S*b,O=k*m+w*b,F=I*m+i*b;this.center.move(v,z,O,F);var N=Math.exp(this.computedRadius[0]);N=Math.max(1e-4,N+E),this.radius.set(v,Math.log(N))},f.rotate=function(v,m,b,E){this.recalcMatrix(v),m=m||0,b=b||0;var p=this.computedMatrix,S=p[0],w=p[4],i=p[8],C=p[1],x=p[5],k=p[9],I=p[2],B=p[6],_=p[10],z=m*S+b*C,O=m*w+b*x,F=m*i+b*k,N=-(B*F-_*O),V=-(_*z-I*F),j=-(I*O-B*z),$=Math.sqrt(Math.max(0,1-Math.pow(N,2)-Math.pow(V,2)-Math.pow(j,2))),q=y(N,V,j,$);q>1e-6?(N/=q,V/=q,j/=q,$/=q):(N=V=j=0,$=1);var oe=this.computedRotation,Z=oe[0],G=oe[1],re=oe[2],H=oe[3],J=Z*$+H*N+G*j-re*V,ae=G*$+H*V+re*N-Z*j,K=re*$+H*j+Z*V-G*N,Y=H*$-Z*N-G*V-re*j;if(E){N=I,V=B,j=_;var ie=Math.sin(E)/l(N,V,j);N*=ie,V*=ie,j*=ie,$=Math.cos(m),J=J*$+Y*N+ae*j-K*V,ae=ae*$+Y*V+K*N-J*j,K=K*$+Y*j+J*V-ae*N,Y=Y*$-J*N-ae*V-K*j}var ne=y(J,ae,K,Y);ne>1e-6?(J/=ne,ae/=ne,K/=ne,Y/=ne):(J=ae=K=0,Y=1),this.rotation.set(v,J,ae,K,Y)},f.lookAt=function(v,m,b,E){this.recalcMatrix(v),b=b||this.computedCenter,m=m||this.computedEye,E=E||this.computedUp;var p=this.computedMatrix;s(p,m,b,E);var S=this.computedRotation;u(S,p[0],p[1],p[2],p[4],p[5],p[6],p[8],p[9],p[10]),h(S,S),this.rotation.set(v,S[0],S[1],S[2],S[3]);for(var w=0,i=0;i<3;++i)w+=Math.pow(b[i]-m[i],2);this.radius.set(v,.5*Math.log(Math.max(w,1e-6))),this.center.set(v,b[0],b[1],b[2])},f.translate=function(v,m,b,E){this.center.move(v,m||0,b||0,E||0)},f.setMatrix=function(v,m){var b=this.computedRotation;u(b,m[0],m[1],m[2],m[4],m[5],m[6],m[8],m[9],m[10]),h(b,b),this.rotation.set(v,b[0],b[1],b[2],b[3]);var E=this.computedMatrix;c(E,m);var p=E[15];if(Math.abs(p)>1e-6){var S=E[12]/p,w=E[13]/p,i=E[14]/p;this.recalcMatrix(v);var C=Math.exp(this.computedRadius[0]);this.center.set(v,S-E[2]*C,w-E[6]*C,i-E[10]*C),this.radius.idle(v)}else this.center.idle(v),this.radius.idle(v)},f.setDistance=function(v,m){m>0&&this.radius.set(v,Math.log(m))},f.setDistanceLimits=function(v,m){v>0?v=Math.log(v):v=-1/0,m>0?m=Math.log(m):m=1/0,m=Math.max(m,v),this.radius.bounds[0][0]=v,this.radius.bounds[1][0]=m},f.getDistanceLimits=function(v){var m=this.radius.bounds;return v?(v[0]=Math.exp(m[0][0]),v[1]=Math.exp(m[1][0]),v):[Math.exp(m[0][0]),Math.exp(m[1][0])]},f.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]}},f.fromJSON=function(v){var m=this.lastT(),b=v.center;b&&this.center.set(m,b[0],b[1],b[2]);var E=v.rotation;E&&this.rotation.set(m,E[0],E[1],E[2],E[3]);var p=v.distance;p&&p>0&&this.radius.set(m,Math.log(p)),this.setDistanceLimits(v.zoomMin,v.zoomMax)};function n(v){v=v||{};var m=v.center||[0,0,0],b=v.rotation||[0,0,0,1],E=v.radius||1;m=[].slice.call(m,0,3),b=[].slice.call(b,0,4),h(b,b);var p=new T(b,m,Math.log(E));return p.setDistanceLimits(v.zoomMin,v.zoomMax),("eye"in v||"up"in v)&&p.lookAt(0,v.eye,v.center,v.up),p}},4930:function(d,g,r){/*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. */var t=r(6184);d.exports=function(a,c,u){return u=typeof u<"u"?u+"":" ",t(u,c)+a}},4405:function(d){d.exports=function(r,t){t||(t=[0,""]),r=String(r);var s=parseFloat(r,10);return t[0]=s,t[1]=r.match(/[\d.\-\+]*\s*(.*)/)[1]||"",t}},4166:function(d,g,r){d.exports=s;var t=r(9398);function s(a,c){for(var u=c.length|0,l=a.length,y=[new Array(u),new Array(u)],h=0;h0){x=y[B][i][0],I=B;break}k=x[I^1];for(var _=0;_<2;++_)for(var z=y[_][i],O=0;O0&&(x=F,k=N,I=_)}return C||x&&n(x,I),k}function m(w,i){var C=y[i][w][0],x=[w];n(C,i);for(var k=C[i^1];;){for(;k!==w;)x.push(k),k=v(x[x.length-2],k,!1);if(y[0][w].length+y[1][w].length===0)break;var I=x[x.length-1],B=w,_=x[1],z=v(I,B,!0);if(t(c[I],c[B],c[_],c[z])<0)break;x.push(w),k=v(I,B)}return x}function b(w,i){return i[1]===i[i.length-1]}for(var h=0;h0;){y[0][h].length;var S=m(h,E);b(p,S)?p.push.apply(p,S):(p.length>0&&f.push(p),p=S)}p.length>0&&f.push(p)}return f}},3959:function(d,g,r){d.exports=s;var t=r(8348);function s(a,c){for(var u=t(a,c.length),l=new Array(c.length),y=new Array(c.length),h=[],T=0;T0;){var n=h.pop();l[n]=!1;for(var v=u[n],T=0;T0}p=p.filter(S);for(var w=p.length,i=new Array(w),C=new Array(w),E=0;E0;){var ie=ae.pop(),ne=$[ie];l(ne,function(Le,ve){return Le-ve});var le=ne.length,de=K[ie],we;if(de===0){var z=p[ie];we=[z]}for(var E=0;E=0)&&(K[me]=de^1,ae.push(me),de===0)){var z=p[me];J(z)||(z.reverse(),we.push(z))}}de===0&&Y.push(we)}return Y}},211:function(d,g,r){d.exports=v;var t=r(417)[3],s=r(4385),a=r(9014),c=r(5070);function u(){return!0}function l(m){return function(b,E){var p=m[b];return p?!!p.queryPoint(E,u):!1}}function y(m){for(var b={},E=0;E0&&b[p]===E[0])S=m[p-1];else return 1;for(var w=1;S;){var i=S.key,C=t(E,i[0],i[1]);if(i[0][0]0)w=-1,S=S.right;else return 0;else if(C>0)S=S.left;else if(C<0)w=1,S=S.right;else return 0}return w}}function T(m){return 1}function f(m){return function(E){return m(E[0],E[1])?0:1}}function n(m,b){return function(p){return m(p[0],p[1])?0:b(p)}}function v(m){for(var b=m.length,E=[],p=[],S=0;S=T?(i=1,x=T+2*v+b):(i=-v/T,x=v*i+b)):(i=0,m>=0?(C=0,x=b):-m>=n?(C=1,x=n+2*m+b):(C=-m/n,x=m*C+b));else if(C<0)C=0,v>=0?(i=0,x=b):-v>=T?(i=1,x=T+2*v+b):(i=-v/T,x=v*i+b);else{var k=1/w;i*=k,C*=k,x=i*(T*i+f*C+2*v)+C*(f*i+n*C+2*m)+b}else{var I,B,_,z;i<0?(I=f+v,B=n+m,B>I?(_=B-I,z=T-2*f+n,_>=z?(i=1,C=0,x=T+2*v+b):(i=_/z,C=1-i,x=i*(T*i+f*C+2*v)+C*(f*i+n*C+2*m)+b)):(i=0,B<=0?(C=1,x=n+2*m+b):m>=0?(C=0,x=b):(C=-m/n,x=m*C+b))):C<0?(I=f+m,B=T+v,B>I?(_=B-I,z=T-2*f+n,_>=z?(C=1,i=0,x=n+2*m+b):(C=_/z,i=1-C,x=i*(T*i+f*C+2*v)+C*(f*i+n*C+2*m)+b)):(C=0,B<=0?(i=1,x=T+2*v+b):v>=0?(i=0,x=b):(i=-v/T,x=v*i+b))):(_=n+m-f-v,_<=0?(i=0,C=1,x=n+2*m+b):(z=T-2*f+n,_>=z?(i=1,C=0,x=T+2*v+b):(i=_/z,C=1-i,x=i*(T*i+f*C+2*v)+C*(f*i+n*C+2*m)+b)))}for(var O=1-i-C,h=0;h0){var n=u[y-1];if(t(T,n)===0&&a(n)!==f){y-=1;continue}}u[y++]=T}}return u.length=y,u}},6184:function(d){/*! * repeat-string * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */var g="",r;d.exports=t;function t(s,a){if(typeof s!="string")throw new TypeError("expected a string");if(a===1)return s;if(a===2)return s+s;var c=s.length*a;if(r!==s||typeof r>"u")r=s,g="";else if(g.length>=c)return g.substr(0,c);for(;c>g.length&&a>1;)a&1&&(g+=s),a>>=1,s+=s;return g+=s,g=g.substr(0,c),g}},8161:function(d,g,r){d.exports=r.g.performance&&r.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}},402:function(d){d.exports=g;function g(r){for(var t=r.length,s=r[r.length-1],a=t,c=t-2;c>=0;--c){var u=s,l=r[c];s=u+l;var y=s-u,h=l-y;h&&(r[--a]=s,s=h)}for(var T=0,c=a;c0){if(B<=0)return _;z=I+B}else if(I<0){if(B>=0)return _;z=-(I+B)}else return _;var O=y*z;return _>=O||_<=-O?_:m(C,x,k)},function(C,x,k,I){var B=C[0]-I[0],_=x[0]-I[0],z=k[0]-I[0],O=C[1]-I[1],F=x[1]-I[1],N=k[1]-I[1],V=C[2]-I[2],j=x[2]-I[2],$=k[2]-I[2],q=_*N,oe=z*F,Z=z*O,G=B*N,re=B*F,H=_*O,J=V*(q-oe)+j*(Z-G)+$*(re-H),ae=(Math.abs(q)+Math.abs(oe))*Math.abs(V)+(Math.abs(Z)+Math.abs(G))*Math.abs(j)+(Math.abs(re)+Math.abs(H))*Math.abs($),K=h*ae;return J>K||-J>K?J:b(C,x,k,I)}];function p(i){var C=E[i.length];return C||(C=E[i.length]=v(i.length)),C.apply(void 0,i)}function S(i,C,x,k,I,B,_){return function(O,F,N,V,j){switch(arguments.length){case 0:case 1:return 0;case 2:return k(O,F);case 3:return I(O,F,N);case 4:return B(O,F,N,V);case 5:return _(O,F,N,V,j)}for(var $=new Array(arguments.length),q=0;q0&&T>0||h<0&&T<0)return!1;var f=t(l,c,u),n=t(y,c,u);return f>0&&n>0||f<0&&n<0?!1:h===0&&T===0&&f===0&&n===0?s(c,u,l,y):!0}},4078:function(d){d.exports=r;function g(t,s){var a=t+s,c=a-t,u=a-c,l=s-c,y=t-u,h=y+l;return h?[h,a]:[a]}function r(t,s){var a=t.length|0,c=s.length|0;if(a===1&&c===1)return g(t[0],-s[0]);var u=a+c,l=new Array(u),y=0,h=0,T=0,f=Math.abs,n=t[h],v=f(n),m=-s[T],b=f(m),E,p;v=c?(E=n,h+=1,h=c?(E=n,h+=1,h"u"&&(E=u(v));var p=v.length;if(p===0||E<1)return{cells:[],vertexIds:[],vertexWeights:[]};var S=l(m,+b),w=y(v,E),i=h(w,m,S,+b),C=T(w,m.length|0),x=c(E)(v,w.data,C,S),k=f(w),I=[].slice.call(i.data,0,i.shape[0]);return s.free(S),s.free(w.data),s.free(i.data),s.free(C),{cells:x,vertexIds:k,vertexWeights:I}}},1168:function(d){d.exports=r;var g=[function(){function s(a,c,u,l){for(var y=a.length,h=[],T=0;T>1,m=u[2*v+1];if(m===T)return v;T>1,m=u[2*v+1];if(m===T)return v;T>1,m=u[2*v+1];if(m===T)return v;T0)-(a<0)},g.abs=function(a){var c=a>>r-1;return(a^c)-c},g.min=function(a,c){return c^(a^c)&-(a65535)<<4,a>>>=c,u=(a>255)<<3,a>>>=u,c|=u,u=(a>15)<<2,a>>>=u,c|=u,u=(a>3)<<1,a>>>=u,c|=u,c|a>>1},g.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},g.popCount=function(a){return a=a-(a>>>1&1431655765),a=(a&858993459)+(a>>>2&858993459),(a+(a>>>4)&252645135)*16843009>>>24};function t(a){var c=32;return a&=-a,a&&c--,a&65535&&(c-=16),a&16711935&&(c-=8),a&252645135&&(c-=4),a&858993459&&(c-=2),a&1431655765&&(c-=1),c}g.countTrailingZeros=t,g.nextPow2=function(a){return a+=a===0,--a,a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a+1},g.prevPow2=function(a){return a|=a>>>1,a|=a>>>2,a|=a>>>4,a|=a>>>8,a|=a>>>16,a-(a>>>1)},g.parity=function(a){return a^=a>>>16,a^=a>>>8,a^=a>>>4,a&=15,27030>>>a&1};var s=new Array(256);(function(a){for(var c=0;c<256;++c){var u=c,l=c,y=7;for(u>>>=1;u;u>>>=1)l<<=1,l|=u&1,--y;a[c]=l<>>8&255]<<16|s[a>>>16&255]<<8|s[a>>>24&255]},g.interleave2=function(a,c){return a&=65535,a=(a|a<<8)&16711935,a=(a|a<<4)&252645135,a=(a|a<<2)&858993459,a=(a|a<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,a|c<<1},g.deinterleave2=function(a,c){return a=a>>>c&1431655765,a=(a|a>>>1)&858993459,a=(a|a>>>2)&252645135,a=(a|a>>>4)&16711935,a=(a|a>>>16)&65535,a<<16>>16},g.interleave3=function(a,c,u){return a&=1023,a=(a|a<<16)&4278190335,a=(a|a<<8)&251719695,a=(a|a<<4)&3272356035,a=(a|a<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,a|=c<<1,u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,a|u<<2},g.deinterleave3=function(a,c){return a=a>>>c&1227133513,a=(a|a>>>2)&3272356035,a=(a|a>>>4)&251719695,a=(a|a>>>8)&4278190335,a=(a|a>>>16)&1023,a<<22>>22},g.nextCombination=function(a){var c=a|a-1;return c+1|(~c&-~c)-1>>>t(a)+1}},6656:function(d,g,r){"use restrict";var t=r(9392),s=r(9521);function a(i){for(var C=0,x=Math.max,k=0,I=i.length;k>1,_=l(i[B],C);_<=0?(_===0&&(I=B),x=B+1):_>0&&(k=B-1)}return I}g.findCell=f;function n(i,C){for(var x=new Array(i.length),k=0,I=x.length;k=i.length||l(i[$],B)!==0););}return x}g.incidence=n;function v(i,C){if(!C)return n(T(b(i,0)),i);for(var x=new Array(C),k=0;k>>F&1&&O.push(I[F]);C.push(O)}return h(C)}g.explode=m;function b(i,C){if(C<0)return[];for(var x=[],k=(1<>1:(Z>>1)-1}function k(Z){for(var G=C(Z);;){var re=G,H=2*Z+1,J=2*(Z+1),ae=Z;if(H0;){var re=x(Z);if(re>=0){var H=C(re);if(G0){var Z=O[0];return i(0,V-1),V-=1,k(0),Z}return-1}function _(Z,G){var re=O[Z];return v[re]===G?Z:(v[re]=-1/0,I(Z),B(),v[re]=G,V+=1,I(V-1))}function z(Z){if(!m[Z]){m[Z]=!0;var G=f[Z],re=n[Z];f[re]>=0&&(f[re]=G),n[G]>=0&&(n[G]=re),F[G]>=0&&_(F[G],w(G)),F[re]>=0&&_(F[re],w(re))}}for(var O=[],F=new Array(h),b=0;b>1;b>=0;--b)k(b);for(;;){var j=B();if(j<0||v[j]>y)break;z(j)}for(var $=[],b=0;b=0&&re>=0&&G!==re){var H=F[G],J=F[re];H!==J&&oe.push([H,J])}}),s.unique(s.normalize(oe)),{positions:$,edges:oe}}},6638:function(d,g,r){d.exports=a;var t=r(417);function s(c,u){var l,y;if(u[0][0]u[1][0])l=u[1],y=u[0];else{var h=Math.min(c[0][1],c[1][1]),T=Math.max(c[0][1],c[1][1]),f=Math.min(u[0][1],u[1][1]),n=Math.max(u[0][1],u[1][1]);return Tn?h-n:T-n}var v,m;c[0][1]u[1][0])l=u[1],y=u[0];else return s(u,c);var h,T;if(c[0][0]c[1][0])h=c[1],T=c[0];else return-s(c,u);var f=t(l,y,T),n=t(l,y,h);if(f<0){if(n<=0)return f}else if(f>0){if(n>=0)return f}else if(n)return n;if(f=t(T,h,y),n=t(T,h,l),f<0){if(n<=0)return f}else if(f>0){if(n>=0)return f}else if(n)return n;return y[0]-T[0]}},4385:function(d,g,r){d.exports=n;var t=r(5070),s=r(7080),a=r(417),c=r(6638);function u(v,m,b){this.slabs=v,this.coordinates=m,this.horizontal=b}var l=u.prototype;function y(v,m){return v.y-m}function h(v,m){for(var b=null;v;){var E=v.key,p,S;E[0][0]0)if(m[0]!==E[1][0])b=v,v=v.right;else{var i=h(v.right,m);if(i)return i;v=v.left}else{if(m[0]!==E[1][0])return v;var i=h(v.right,m);if(i)return i;v=v.left}}return b}l.castUp=function(v){var m=t.le(this.coordinates,v[0]);if(m<0)return-1;this.slabs[m];var b=h(this.slabs[m],v),E=-1;if(b&&(E=b.value),this.coordinates[m]===v[0]){var p=null;if(b&&(p=b.key),m>0){var S=h(this.slabs[m-1],v);S&&(p?c(S.key,p)>0&&(p=S.key,E=S.value):(E=S.value,p=S.key))}var w=this.horizontal[m];if(w.length>0){var i=t.ge(w,v[1],y);if(i=w.length)return E;C=w[i]}}if(C.start)if(p){var x=a(p[0],p[1],[v[0],C.y]);p[0][0]>p[1][0]&&(x=-x),x>0&&(E=C.index)}else E=C.index;else C.y!==v[1]&&(E=C.index)}}}return E};function T(v,m,b,E){this.y=v,this.index=m,this.start=b,this.closed=E}function f(v,m,b,E){this.x=v,this.segment=m,this.create=b,this.index=E}function n(v){for(var m=v.length,b=2*m,E=new Array(b),p=0;p1&&(m=1);for(var b=1-m,E=h.length,p=new Array(E),S=0;S0||v>0&&p<0){var S=c(m,p,b,v);f.push(S),n.push(S.slice())}p<0?n.push(b.slice()):p>0?f.push(b.slice()):(f.push(b.slice()),n.push(b.slice())),v=p}return{positive:f,negative:n}}function l(h,T){for(var f=[],n=a(h[h.length-1],T),v=h[h.length-1],m=h[0],b=0;b0||n>0&&E<0)&&f.push(c(v,E,m,n)),E>=0&&f.push(m.slice()),n=E}return f}function y(h,T){for(var f=[],n=a(h[h.length-1],T),v=h[h.length-1],m=h[0],b=0;b0||n>0&&E<0)&&f.push(c(v,E,m,n)),E<=0&&f.push(m.slice()),n=E}return f}},8974:function(d,g,r){var t;(function(){var s={not_string:/[^s]/,not_bool:/[^t]/,not_type:/[^T]/,not_primitive:/[^v]/,number:/[diefg]/,numeric_arg:/[bcdiefguxX]/,json:/[j]/,not_json:/[^j]/,text:/^[^\x25]+/,modulo:/^\x25{2}/,placeholder:/^\x25(?:([1-9]\d*)\$|\(([^)]+)\))?(\+)?(0|'[^$])?(-)?(\d+)?(?:\.(\d+))?([b-gijostTuvxX])/,key:/^([a-z_][a-z_\d]*)/i,key_access:/^\.([a-z_][a-z_\d]*)/i,index_access:/^\[(\d+)\]/,sign:/^[+-]/};function a(h){return u(y(h),arguments)}function c(h,T){return a.apply(null,[h].concat(T||[]))}function u(h,T){var f=1,n=h.length,v,m="",b,E,p,S,w,i,C,x;for(b=0;b=0),p.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,p.width?parseInt(p.width):0);break;case"e":v=p.precision?parseFloat(v).toExponential(p.precision):parseFloat(v).toExponential();break;case"f":v=p.precision?parseFloat(v).toFixed(p.precision):parseFloat(v);break;case"g":v=p.precision?String(Number(v.toPrecision(p.precision))):parseFloat(v);break;case"o":v=(parseInt(v,10)>>>0).toString(8);break;case"s":v=String(v),v=p.precision?v.substring(0,p.precision):v;break;case"t":v=String(!!v),v=p.precision?v.substring(0,p.precision):v;break;case"T":v=Object.prototype.toString.call(v).slice(8,-1).toLowerCase(),v=p.precision?v.substring(0,p.precision):v;break;case"u":v=parseInt(v,10)>>>0;break;case"v":v=v.valueOf(),v=p.precision?v.substring(0,p.precision):v;break;case"x":v=(parseInt(v,10)>>>0).toString(16);break;case"X":v=(parseInt(v,10)>>>0).toString(16).toUpperCase();break}s.json.test(p.type)?m+=v:(s.number.test(p.type)&&(!C||p.sign)?(x=C?"+":"-",v=v.toString().replace(s.sign,"")):x="",w=p.pad_char?p.pad_char==="0"?"0":p.pad_char.charAt(1):" ",i=p.width-(x+v).length,S=p.width&&i>0?w.repeat(i):"",m+=p.align?x+v+S:w==="0"?x+S+v:S+x+v)}return m}var l=Object.create(null);function y(h){if(l[h])return l[h];for(var T=h,f,n=[],v=0;T;){if((f=s.text.exec(T))!==null)n.push(f[0]);else if((f=s.modulo.exec(T))!==null)n.push("%");else if((f=s.placeholder.exec(T))!==null){if(f[2]){v|=1;var m=[],b=f[2],E=[];if((E=s.key.exec(b))!==null)for(m.push(E[1]);(b=b.substring(E[0].length))!=="";)if((E=s.key_access.exec(b))!==null)m.push(E[1]);else if((E=s.index_access.exec(b))!==null)m.push(E[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");f[2]=m}else v|=2;if(v===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");n.push({placeholder:f[0],param_no:f[1],keys:f[2],sign:f[3],pad_char:f[4],align:f[5],width:f[6],precision:f[7],type:f[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");T=T.substring(f[0].length)}return l[h]=n}g.sprintf=a,g.vsprintf=c,typeof window<"u"&&(window.sprintf=a,window.vsprintf=c,t=(function(){return{sprintf:a,vsprintf:c}}).call(g,r,g,d),t!==void 0&&(d.exports=t))})()},4162:function(d,g,r){d.exports=y;var t=r(9284),s=r(9584),a={"2d":function(h,T,f){var n=h({order:T,scalarArguments:3,getters:f==="generic"?[0]:void 0,phase:function(m,b,E,p){return m>p|0},vertex:function(m,b,E,p,S,w,i,C,x,k,I,B,_){var z=(i<<0)+(C<<1)+(x<<2)+(k<<3)|0;if(!(z===0||z===15))switch(z){case 0:I.push([m-.5,b-.5]);break;case 1:I.push([m-.25-.25*(p+E-2*_)/(E-p),b-.25-.25*(S+E-2*_)/(E-S)]);break;case 2:I.push([m-.75-.25*(-p-E+2*_)/(p-E),b-.25-.25*(w+p-2*_)/(p-w)]);break;case 3:I.push([m-.5,b-.5-.5*(S+E+w+p-4*_)/(E-S+p-w)]);break;case 4:I.push([m-.25-.25*(w+S-2*_)/(S-w),b-.75-.25*(-S-E+2*_)/(S-E)]);break;case 5:I.push([m-.5-.5*(p+E+w+S-4*_)/(E-p+S-w),b-.5]);break;case 6:I.push([m-.5-.25*(-p-E+w+S)/(p-E+S-w),b-.5-.25*(-S-E+w+p)/(S-E+p-w)]);break;case 7:I.push([m-.75-.25*(w+S-2*_)/(S-w),b-.75-.25*(w+p-2*_)/(p-w)]);break;case 8:I.push([m-.75-.25*(-w-S+2*_)/(w-S),b-.75-.25*(-w-p+2*_)/(w-p)]);break;case 9:I.push([m-.5-.25*(p+E+-w-S)/(E-p+w-S),b-.5-.25*(S+E+-w-p)/(E-S+w-p)]);break;case 10:I.push([m-.5-.5*(-p-E+-w-S+4*_)/(p-E+w-S),b-.5]);break;case 11:I.push([m-.25-.25*(-w-S+2*_)/(w-S),b-.75-.25*(S+E-2*_)/(E-S)]);break;case 12:I.push([m-.5,b-.5-.5*(-S-E+-w-p+4*_)/(S-E+w-p)]);break;case 13:I.push([m-.75-.25*(p+E-2*_)/(E-p),b-.25-.25*(-w-p+2*_)/(w-p)]);break;case 14:I.push([m-.25-.25*(-p-E+2*_)/(p-E),b-.25-.25*(-S-E+2*_)/(S-E)]);break;case 15:I.push([m-.5,b-.5]);break}},cell:function(m,b,E,p,S,w,i,C,x){S?C.push([m,b]):C.push([b,m])}});return function(v,m){var b=[],E=[];return n(v,b,E,m),{positions:b,cells:E}}}};function c(h,T){var f=h.length+"d",n=a[f];if(n)return n(t,h,T)}function u(h,T){for(var f=s(h,T),n=f.length,v=new Array(n),m=new Array(n),b=0;b0&&(E+=.02);for(var S=new Float32Array(b),w=0,i=-.5*E,p=0;pMath.max(p,S)?w[2]=1:p>Math.max(E,S)?w[0]=1:w[1]=1;for(var i=0,C=0,x=0;x<3;++x)i+=b[x]*b[x],C+=w[x]*b[x];for(var x=0;x<3;++x)w[x]-=C/i*b[x];return u(w,w),w}function f(b,E,p,S,w,i,C,x){this.center=t(p),this.up=t(S),this.right=t(w),this.radius=t([i]),this.angle=t([C,x]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(b,E),this.computedCenter=this.center.curve(0),this.computedUp=this.up.curve(0),this.computedRight=this.right.curve(0),this.computedRadius=this.radius.curve(0),this.computedAngle=this.angle.curve(0),this.computedToward=[0,0,0],this.computedEye=[0,0,0],this.computedMatrix=new Array(16);for(var k=0;k<16;++k)this.computedMatrix[k]=.5;this.recalcMatrix(0)}var n=f.prototype;n.setDistanceLimits=function(b,E){b>0?b=Math.log(b):b=-1/0,E>0?E=Math.log(E):E=1/0,E=Math.max(E,b),this.radius.bounds[0][0]=b,this.radius.bounds[1][0]=E},n.getDistanceLimits=function(b){var E=this.radius.bounds[0];return b?(b[0]=Math.exp(E[0][0]),b[1]=Math.exp(E[1][0]),b):[Math.exp(E[0][0]),Math.exp(E[1][0])]},n.recalcMatrix=function(b){this.center.curve(b),this.up.curve(b),this.right.curve(b),this.radius.curve(b),this.angle.curve(b);for(var E=this.computedUp,p=this.computedRight,S=0,w=0,i=0;i<3;++i)w+=E[i]*p[i],S+=E[i]*E[i];for(var C=Math.sqrt(S),x=0,i=0;i<3;++i)p[i]-=E[i]*w/S,x+=p[i]*p[i],E[i]/=C;for(var k=Math.sqrt(x),i=0;i<3;++i)p[i]/=k;var I=this.computedToward;c(I,E,p),u(I,I);for(var B=Math.exp(this.computedRadius[0]),_=this.computedAngle[0],z=this.computedAngle[1],O=Math.cos(_),F=Math.sin(_),N=Math.cos(z),V=Math.sin(z),j=this.computedCenter,$=O*N,q=F*N,oe=V,Z=-O*V,G=-F*V,re=N,H=this.computedEye,J=this.computedMatrix,i=0;i<3;++i){var ae=$*p[i]+q*I[i]+oe*E[i];J[4*i+1]=Z*p[i]+G*I[i]+re*E[i],J[4*i+2]=ae,J[4*i+3]=0}var K=J[1],Y=J[5],ie=J[9],ne=J[2],le=J[6],de=J[10],we=Y*de-ie*le,me=ie*ne-K*de,Le=K*le-Y*ne,ve=y(we,me,Le);we/=ve,me/=ve,Le/=ve,J[0]=we,J[4]=me,J[8]=Le;for(var i=0;i<3;++i)H[i]=j[i]+J[2+4*i]*B;for(var i=0;i<3;++i){for(var x=0,Ae=0;Ae<3;++Ae)x+=J[i+4*Ae]*H[Ae];J[12+i]=-x}J[15]=1},n.getMatrix=function(b,E){this.recalcMatrix(b);var p=this.computedMatrix;if(E){for(var S=0;S<16;++S)E[S]=p[S];return E}return p};var v=[0,0,0];n.rotate=function(b,E,p,S){if(this.angle.move(b,E,p),S){this.recalcMatrix(b);var w=this.computedMatrix;v[0]=w[2],v[1]=w[6],v[2]=w[10];for(var i=this.computedUp,C=this.computedRight,x=this.computedToward,k=0;k<3;++k)w[4*k]=i[k],w[4*k+1]=C[k],w[4*k+2]=x[k];a(w,w,S,v);for(var k=0;k<3;++k)i[k]=w[4*k],C[k]=w[4*k+1];this.up.set(b,i[0],i[1],i[2]),this.right.set(b,C[0],C[1],C[2])}},n.pan=function(b,E,p,S){E=E||0,p=p||0,S=S||0,this.recalcMatrix(b);var w=this.computedMatrix;Math.exp(this.computedRadius[0]);var i=w[1],C=w[5],x=w[9],k=y(i,C,x);i/=k,C/=k,x/=k;var I=w[0],B=w[4],_=w[8],z=I*i+B*C+_*x;I-=i*z,B-=C*z,_-=x*z;var O=y(I,B,_);I/=O,B/=O,_/=O;var F=I*E+i*p,N=B*E+C*p,V=_*E+x*p;this.center.move(b,F,N,V);var j=Math.exp(this.computedRadius[0]);j=Math.max(1e-4,j+S),this.radius.set(b,Math.log(j))},n.translate=function(b,E,p,S){this.center.move(b,E||0,p||0,S||0)},n.setMatrix=function(b,E,p,S){var w=1;typeof p=="number"&&(w=p|0),(w<0||w>3)&&(w=1);var i=(w+2)%3;E||(this.recalcMatrix(b),E=this.computedMatrix);var C=E[w],x=E[w+4],k=E[w+8];if(S){var B=Math.abs(C),_=Math.abs(x),z=Math.abs(k),O=Math.max(B,_,z);B===O?(C=C<0?-1:1,x=k=0):z===O?(k=k<0?-1:1,C=x=0):(x=x<0?-1:1,C=k=0)}else{var I=y(C,x,k);C/=I,x/=I,k/=I}var F=E[i],N=E[i+4],V=E[i+8],j=F*C+N*x+V*k;F-=C*j,N-=x*j,V-=k*j;var $=y(F,N,V);F/=$,N/=$,V/=$;var q=x*V-k*N,oe=k*F-C*V,Z=C*N-x*F,G=y(q,oe,Z);q/=G,oe/=G,Z/=G,this.center.jump(b,ze,Ie,Ne),this.radius.idle(b),this.up.jump(b,C,x,k),this.right.jump(b,F,N,V);var re,H;if(w===2){var J=E[1],ae=E[5],K=E[9],Y=J*F+ae*N+K*V,ie=J*q+ae*oe+K*Z;we<0?re=-Math.PI/2:re=Math.PI/2,H=Math.atan2(ie,Y)}else{var ne=E[2],le=E[6],de=E[10],we=ne*C+le*x+de*k,me=ne*F+le*N+de*V,Le=ne*q+le*oe+de*Z;re=Math.asin(h(we)),H=Math.atan2(Le,me)}this.angle.jump(b,H,re),this.recalcMatrix(b);var ve=E[2],Ae=E[6],ye=E[10],Se=this.computedMatrix;s(Se,E);var _e=Se[15],ze=Se[12]/_e,Ie=Se[13]/_e,Ne=Se[14]/_e,et=Math.exp(this.computedRadius[0]);this.center.jump(b,ze-ve*et,Ie-Ae*et,Ne-ye*et)},n.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},n.idle=function(b){this.center.idle(b),this.up.idle(b),this.right.idle(b),this.radius.idle(b),this.angle.idle(b)},n.flush=function(b){this.center.flush(b),this.up.flush(b),this.right.flush(b),this.radius.flush(b),this.angle.flush(b)},n.setDistance=function(b,E){E>0&&this.radius.set(b,Math.log(E))},n.lookAt=function(b,E,p,S){this.recalcMatrix(b),E=E||this.computedEye,p=p||this.computedCenter,S=S||this.computedUp;var w=S[0],i=S[1],C=S[2],x=y(w,i,C);if(!(x<1e-6)){w/=x,i/=x,C/=x;var k=E[0]-p[0],I=E[1]-p[1],B=E[2]-p[2],_=y(k,I,B);if(!(_<1e-6)){k/=_,I/=_,B/=_;var z=this.computedRight,O=z[0],F=z[1],N=z[2],V=w*O+i*F+C*N;O-=V*w,F-=V*i,N-=V*C;var j=y(O,F,N);if(!(j<.01&&(O=i*B-C*I,F=C*k-w*B,N=w*I-i*k,j=y(O,F,N),j<1e-6))){O/=j,F/=j,N/=j,this.up.set(b,w,i,C),this.right.set(b,O,F,N),this.center.set(b,p[0],p[1],p[2]),this.radius.set(b,Math.log(_));var $=i*N-C*F,q=C*O-w*N,oe=w*F-i*O,Z=y($,q,oe);$/=Z,q/=Z,oe/=Z;var G=w*k+i*I+C*B,re=O*k+F*I+N*B,H=$*k+q*I+oe*B,J=Math.asin(h(G)),ae=Math.atan2(H,re),K=this.angle._state,Y=K[K.length-1],ie=K[K.length-2];Y=Y%(2*Math.PI);var ne=Math.abs(Y+2*Math.PI-ae),le=Math.abs(Y-ae),de=Math.abs(Y-2*Math.PI-ae);ne0?N.pop():new ArrayBuffer(O)}g.mallocArrayBuffer=v;function m(z){return new Uint8Array(v(z),0,z)}g.mallocUint8=m;function b(z){return new Uint16Array(v(2*z),0,z)}g.mallocUint16=b;function E(z){return new Uint32Array(v(4*z),0,z)}g.mallocUint32=E;function p(z){return new Int8Array(v(z),0,z)}g.mallocInt8=p;function S(z){return new Int16Array(v(2*z),0,z)}g.mallocInt16=S;function w(z){return new Int32Array(v(4*z),0,z)}g.mallocInt32=w;function i(z){return new Float32Array(v(4*z),0,z)}g.mallocFloat32=g.mallocFloat=i;function C(z){return new Float64Array(v(8*z),0,z)}g.mallocFloat64=g.mallocDouble=C;function x(z){return c?new Uint8ClampedArray(v(z),0,z):m(z)}g.mallocUint8Clamped=x;function k(z){return u?new BigUint64Array(v(8*z),0,z):null}g.mallocBigUint64=k;function I(z){return l?new BigInt64Array(v(8*z),0,z):null}g.mallocBigInt64=I;function B(z){return new DataView(v(z),0,z)}g.mallocDataView=B;function _(z){z=t.nextPow2(z);var O=t.log2(z),F=T[O];return F.length>0?F.pop():new a(z)}g.mallocBuffer=_,g.clearCache=function(){for(var O=0;O<32;++O)y.UINT8[O].length=0,y.UINT16[O].length=0,y.UINT32[O].length=0,y.INT8[O].length=0,y.INT16[O].length=0,y.INT32[O].length=0,y.FLOAT[O].length=0,y.DOUBLE[O].length=0,y.BIGUINT64[O].length=0,y.BIGINT64[O].length=0,y.UINT8C[O].length=0,h[O].length=0,T[O].length=0}},1731:function(d){"use restrict";d.exports=g;function g(t){this.roots=new Array(t),this.ranks=new Array(t);for(var s=0;s",N="",V=F.length,j=N.length,$=_[0]===v||_[0]===E,q=0,oe=-j;q>-1&&(q=z.indexOf(F,q),!(q===-1||(oe=z.indexOf(N,q+V),oe===-1)||oe<=q));){for(var Z=q;Z=oe)O[Z]=null,z=z.substr(0,Z)+" "+z.substr(Z+1);else if(O[Z]!==null){var G=O[Z].indexOf(_[0]);G===-1?O[Z]+=_:$&&(O[Z]=O[Z].substr(0,G+1)+(1+parseInt(O[Z][G+1]))+O[Z].substr(G+2))}var re=q+V,H=z.substr(re,oe-re),J=H.indexOf(F);J!==-1?q=J:q=oe+j}return O}function w(B,_,z){for(var O=_.textAlign||"start",F=_.textBaseline||"alphabetic",N=[1<<30,1<<30],V=[0,0],j=B.length,$=0;$/g,` `):z=z.replace(/\/g," ");var V="",j=[];for(Y=0;Y-1?parseInt(Ne[1+Ze]):0,it=Ke>-1?parseInt(et[1+Ke]):0;nt!==it&&(st=st.replace(Le(),"?px "),le*=Math.pow(.75,it-nt),st=st.replace("?px ",Le())),ne+=.25*G*(it-nt)}if(N.superscripts===!0){var lt=Ne.indexOf(v),vt=et.indexOf(v),xt=lt>-1?parseInt(Ne[1+lt]):0,Je=vt>-1?parseInt(et[1+vt]):0;xt!==Je&&(st=st.replace(Le(),"?px "),le*=Math.pow(.75,Je-xt),st=st.replace("?px ",Le())),ne-=.25*G*(Je-xt)}if(N.bolds===!0){var Pe=Ne.indexOf(h)>-1,Ue=et.indexOf(h)>-1;!Pe&&Ue&&(He?st=st.replace("italic ","italic bold "):st="bold "+st),Pe&&!Ue&&(st=st.replace("bold ",""))}if(N.italics===!0){var He=Ne.indexOf(f)>-1,Oe=et.indexOf(f)>-1;!He&&Oe&&(st="italic "+st),He&&!Oe&&(st=st.replace("italic ",""))}_.font=st}for(K=0;K0&&(F=O.size),O.lineSpacing&&O.lineSpacing>0&&(N=O.lineSpacing),O.styletags&&O.styletags.breaklines&&(V.breaklines=!!O.styletags.breaklines),O.styletags&&O.styletags.bolds&&(V.bolds=!!O.styletags.bolds),O.styletags&&O.styletags.italics&&(V.italics=!!O.styletags.italics),O.styletags&&O.styletags.subscripts&&(V.subscripts=!!O.styletags.subscripts),O.styletags&&O.styletags.superscripts&&(V.superscripts=!!O.styletags.superscripts)),z.font=[O.fontStyle,O.fontVariant,O.fontWeight,F+"px",O.font].filter(function($){return $}).join(" "),z.textAlign="start",z.textBaseline="alphabetic",z.direction="ltr";var j=i(_,z,B,F,N,V);return k(j,O,F)}},5346:function(d){(function(){if(typeof ses<"u"&&ses.ok&&!ses.ok())return;function r(C){C.permitHostObjects___&&C.permitHostObjects___(r)}typeof ses<"u"&&(ses.weakMapPermitHostObjects=r);var t=!1;if(typeof WeakMap=="function"){var s=WeakMap;if(!(typeof navigator<"u"&&/Firefox/.test(navigator.userAgent))){var a=new s,c=Object.freeze({});if(a.set(c,1),a.get(c)!==1)t=!0;else{d.exports=WeakMap;return}}}var u=Object.getOwnPropertyNames,l=Object.defineProperty,y=Object.isExtensible,h="weakmap:",T=h+"ident:"+Math.random()+"___";if(typeof crypto<"u"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var f=new ArrayBuffer(25),n=new Uint8Array(f);crypto.getRandomValues(n),T=h+"rand:"+Array.prototype.map.call(n,function(C){return(C%36).toString(36)}).join("")+"___"}function v(C){return!(C.substr(0,h.length)==h&&C.substr(C.length-3)==="___")}if(l(Object,"getOwnPropertyNames",{value:function(x){return u(x).filter(v)}}),"getPropertyNames"in Object){var m=Object.getPropertyNames;l(Object,"getPropertyNames",{value:function(x){return m(x).filter(v)}})}function b(C){if(C!==Object(C))throw new TypeError("Not an object: "+C);var x=C[T];if(x&&x.key===C)return x;if(y(C)){x={key:C};try{return l(C,T,{value:x,writable:!1,enumerable:!1,configurable:!1}),x}catch{return}}}(function(){var C=Object.freeze;l(Object,"freeze",{value:function(B){return b(B),C(B)}});var x=Object.seal;l(Object,"seal",{value:function(B){return b(B),x(B)}});var k=Object.preventExtensions;l(Object,"preventExtensions",{value:function(B){return b(B),k(B)}})})();function E(C){return C.prototype=null,Object.freeze(C)}var p=!1;function S(){!p&&typeof console<"u"&&(p=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var w=0,i=function(){this instanceof i||S();var C=[],x=[],k=w++;function I(O,F){var N,V=b(O);return V?k in V?V[k]:F:(N=C.indexOf(O),N>=0?x[N]:F)}function B(O){var F=b(O);return F?k in F:C.indexOf(O)>=0}function _(O,F){var N,V=b(O);return V?V[k]=F:(N=C.indexOf(O),N>=0?x[N]=F:(N=C.length,x[N]=F,C[N]=O)),this}function z(O){var F=b(O),N,V;return F?k in F&&delete F[k]:(N=C.indexOf(O),N<0?!1:(V=C.length-1,C[N]=void 0,x[N]=x[V],C[N]=C[V],C.length=V,x.length=V,!0))}return Object.create(i.prototype,{get___:{value:E(I)},has___:{value:E(B)},set___:{value:E(_)},delete___:{value:E(z)}})};i.prototype=Object.create(Object.prototype,{get:{value:function(x,k){return this.get___(x,k)},writable:!0,configurable:!0},has:{value:function(x){return this.has___(x)},writable:!0,configurable:!0},set:{value:function(x,k){return this.set___(x,k)},writable:!0,configurable:!0},delete:{value:function(x){return this.delete___(x)},writable:!0,configurable:!0}}),typeof s=="function"?function(){t&&typeof Proxy<"u"&&(Proxy=void 0);function C(){this instanceof i||S();var x=new s,k=void 0,I=!1;function B(F,N){return k?x.has(F)?x.get(F):k.get___(F,N):x.get(F,N)}function _(F){return x.has(F)||(k?k.has___(F):!1)}var z;t?z=function(F,N){return x.set(F,N),x.has(F)||(k||(k=new i),k.set(F,N)),this}:z=function(F,N){if(I)try{x.set(F,N)}catch{k||(k=new i),k.set___(F,N)}else x.set(F,N);return this};function O(F){var N=!!x.delete(F);return k&&k.delete___(F)||N}return Object.create(i.prototype,{get___:{value:E(B)},has___:{value:E(_)},set___:{value:E(z)},delete___:{value:E(O)},permitHostObjects___:{value:E(function(F){if(F===r)I=!0;else throw new Error("bogus call to permitHostObjects___")})}})}C.prototype=i.prototype,d.exports=C,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})}():(typeof Proxy<"u"&&(Proxy=void 0),d.exports=i)})()},9222:function(d,g,r){var t=r(7178);d.exports=s;function s(){var a={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var u=c.valueOf(a);return u&&u.identity===a?u:t(c,a)}}},7178:function(d){d.exports=g;function g(r,t){var s={identity:t},a=r.valueOf;return Object.defineProperty(r,"valueOf",{value:function(c){return c!==t?a.apply(this,arguments):s},writable:!0}),s}},4037:function(d,g,r){var t=r(9222);d.exports=s;function s(){var a=t();return{get:function(c,u){var l=a(c);return l.hasOwnProperty("value")?l.value:u},set:function(c,u){return a(c).value=u,this},has:function(c){return"value"in a(c)},delete:function(c){return delete a(c).value}}}},6183:function(d){function g(){return function(u,l,y,h,T,f){var n=u[0],v=y[0],m=[0],b=v;h|=0;var E=0,p=v;for(E=0;E=0!=w>=0&&T.push(m[0]+.5+.5*(S+w)/(S-w))}h+=p,++m[0]}}}function r(){return g()}var t=r;function s(u){var l={};return function(h,T,f){var n=h.dtype,v=h.order,m=[n,v.join()].join(),b=l[m];return b||(l[m]=b=u([n,v])),b(h.shape.slice(0),h.data,h.stride,h.offset|0,T,f)}}function a(u){return s(t.bind(void 0,u))}function c(u){return a({funcName:u.funcName})}d.exports=c({funcName:"zeroCrossings"})},9584:function(d,g,r){d.exports=s;var t=r(6183);function s(a,c){var u=[];return c=+c||0,t(a.hi(a.shape[0]-1),u,c),u}},6601:function(){}},o={};function L(d){var g=o[d];if(g!==void 0)return g.exports;var r=o[d]={id:d,loaded:!1,exports:{}};return P[d].call(r.exports,r,r.exports,L),r.loaded=!0,r.exports}(function(){L.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}()})(),function(){L.nmd=function(d){return d.paths=[],d.children||(d.children=[]),d}}();var M=L(7386);return M}()})},33576:function(te,X,e){/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */function A(Je,Pe){if(!(Je instanceof Pe))throw new TypeError("Cannot call a class as a function")}function P(Je,Pe){for(var Ue=0;Ue"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch{return!1}}return Pe=r(Pe),g(Je,He()?Reflect.construct(Pe,[],r(Je).constructor):Pe.apply(Je,Ue))}function g(Je,Pe){if(Pe&&(c(Pe)==="object"||typeof Pe=="function"))return Pe;if(Pe!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return t(Je)}function r(Je){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(Ue){return Ue.__proto__||Object.getPrototypeOf(Ue)},r(Je)}function t(Je){if(Je===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return Je}function s(Je,Pe){if(typeof Pe!="function"&&Pe!==null)throw new TypeError("Super expression must either be null or a function");Je.prototype=Object.create(Pe&&Pe.prototype,{constructor:{value:Je,writable:!0,configurable:!0}}),Object.defineProperty(Je,"prototype",{writable:!1}),Pe&&a(Je,Pe)}function a(Je,Pe){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(He,Oe){return He.__proto__=Oe,He},a(Je,Pe)}function c(Je){"@babel/helpers - typeof";return c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Pe){return typeof Pe}:function(Pe){return Pe&&typeof Symbol=="function"&&Pe.constructor===Symbol&&Pe!==Symbol.prototype?"symbol":typeof Pe},c(Je)}var u=e(59968),l=e(35984),y=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;X.Buffer=n,X.SlowBuffer=k,X.INSPECT_MAX_BYTES=50;var h=2147483647;X.kMaxLength=h,n.TYPED_ARRAY_SUPPORT=T(),!n.TYPED_ARRAY_SUPPORT&&typeof console<"u"&&typeof console.error=="function"&&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.");function T(){try{var Je=new Uint8Array(1),Pe={foo:function(){return 42}};return Object.setPrototypeOf(Pe,Uint8Array.prototype),Object.setPrototypeOf(Je,Pe),Je.foo()===42}catch{return!1}}Object.defineProperty(n.prototype,"parent",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.buffer}}),Object.defineProperty(n.prototype,"offset",{enumerable:!0,get:function(){if(n.isBuffer(this))return this.byteOffset}});function f(Je){if(Je>h)throw new RangeError('The value "'+Je+'" is invalid for option "size"');var Pe=new Uint8Array(Je);return Object.setPrototypeOf(Pe,n.prototype),Pe}function n(Je,Pe,Ue){if(typeof Je=="number"){if(typeof Pe=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return E(Je)}return v(Je,Pe,Ue)}n.poolSize=8192;function v(Je,Pe,Ue){if(typeof Je=="string")return p(Je,Pe);if(ArrayBuffer.isView(Je))return w(Je);if(Je==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(Je));if(nt(Je,ArrayBuffer)||Je&&nt(Je.buffer,ArrayBuffer)||typeof SharedArrayBuffer<"u"&&(nt(Je,SharedArrayBuffer)||Je&&nt(Je.buffer,SharedArrayBuffer)))return i(Je,Pe,Ue);if(typeof Je=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var He=Je.valueOf&&Je.valueOf();if(He!=null&&He!==Je)return n.from(He,Pe,Ue);var Oe=C(Je);if(Oe)return Oe;if(typeof Symbol<"u"&&Symbol.toPrimitive!=null&&typeof Je[Symbol.toPrimitive]=="function")return n.from(Je[Symbol.toPrimitive]("string"),Pe,Ue);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+c(Je))}n.from=function(Je,Pe,Ue){return v(Je,Pe,Ue)},Object.setPrototypeOf(n.prototype,Uint8Array.prototype),Object.setPrototypeOf(n,Uint8Array);function m(Je){if(typeof Je!="number")throw new TypeError('"size" argument must be of type number');if(Je<0)throw new RangeError('The value "'+Je+'" is invalid for option "size"')}function b(Je,Pe,Ue){return m(Je),Je<=0?f(Je):Pe!==void 0?typeof Ue=="string"?f(Je).fill(Pe,Ue):f(Je).fill(Pe):f(Je)}n.alloc=function(Je,Pe,Ue){return b(Je,Pe,Ue)};function E(Je){return m(Je),f(Je<0?0:x(Je)|0)}n.allocUnsafe=function(Je){return E(Je)},n.allocUnsafeSlow=function(Je){return E(Je)};function p(Je,Pe){if((typeof Pe!="string"||Pe==="")&&(Pe="utf8"),!n.isEncoding(Pe))throw new TypeError("Unknown encoding: "+Pe);var Ue=I(Je,Pe)|0,He=f(Ue),Oe=He.write(Je,Pe);return Oe!==Ue&&(He=He.slice(0,Oe)),He}function S(Je){for(var Pe=Je.length<0?0:x(Je.length)|0,Ue=f(Pe),He=0;He=h)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+h.toString(16)+" bytes");return Je|0}function k(Je){return+Je!=Je&&(Je=0),n.alloc(+Je)}n.isBuffer=function(Pe){return Pe!=null&&Pe._isBuffer===!0&&Pe!==n.prototype},n.compare=function(Pe,Ue){if(nt(Pe,Uint8Array)&&(Pe=n.from(Pe,Pe.offset,Pe.byteLength)),nt(Ue,Uint8Array)&&(Ue=n.from(Ue,Ue.offset,Ue.byteLength)),!n.isBuffer(Pe)||!n.isBuffer(Ue))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(Pe===Ue)return 0;for(var He=Pe.length,Oe=Ue.length,Ce=0,ge=Math.min(He,Oe);CeOe.length?(n.isBuffer(ge)||(ge=n.from(ge)),ge.copy(Oe,Ce)):Uint8Array.prototype.set.call(Oe,ge,Ce);else if(n.isBuffer(ge))ge.copy(Oe,Ce);else throw new TypeError('"list" argument must be an Array of Buffers');Ce+=ge.length}return Oe};function I(Je,Pe){if(n.isBuffer(Je))return Je.length;if(ArrayBuffer.isView(Je)||nt(Je,ArrayBuffer))return Je.byteLength;if(typeof Je!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+c(Je));var Ue=Je.length,He=arguments.length>2&&arguments[2]===!0;if(!He&&Ue===0)return 0;for(var Oe=!1;;)switch(Pe){case"ascii":case"latin1":case"binary":return Ue;case"utf8":case"utf-8":return Ne(Je).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Ue*2;case"hex":return Ue>>>1;case"base64":return Ze(Je).length;default:if(Oe)return He?-1:Ne(Je).length;Pe=(""+Pe).toLowerCase(),Oe=!0}}n.byteLength=I;function B(Je,Pe,Ue){var He=!1;if((Pe===void 0||Pe<0)&&(Pe=0),Pe>this.length||((Ue===void 0||Ue>this.length)&&(Ue=this.length),Ue<=0)||(Ue>>>=0,Pe>>>=0,Ue<=Pe))return"";for(Je||(Je="utf8");;)switch(Je){case"hex":return J(this,Pe,Ue);case"utf8":case"utf-8":return oe(this,Pe,Ue);case"ascii":return re(this,Pe,Ue);case"latin1":case"binary":return H(this,Pe,Ue);case"base64":return q(this,Pe,Ue);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return ae(this,Pe,Ue);default:if(He)throw new TypeError("Unknown encoding: "+Je);Je=(Je+"").toLowerCase(),He=!0}}n.prototype._isBuffer=!0;function _(Je,Pe,Ue){var He=Je[Pe];Je[Pe]=Je[Ue],Je[Ue]=He}n.prototype.swap16=function(){var Pe=this.length;if(Pe%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Ue=0;UeUe&&(Pe+=" ... "),""},y&&(n.prototype[y]=n.prototype.inspect),n.prototype.compare=function(Pe,Ue,He,Oe,Ce){if(nt(Pe,Uint8Array)&&(Pe=n.from(Pe,Pe.offset,Pe.byteLength)),!n.isBuffer(Pe))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+c(Pe));if(Ue===void 0&&(Ue=0),He===void 0&&(He=Pe?Pe.length:0),Oe===void 0&&(Oe=0),Ce===void 0&&(Ce=this.length),Ue<0||He>Pe.length||Oe<0||Ce>this.length)throw new RangeError("out of range index");if(Oe>=Ce&&Ue>=He)return 0;if(Oe>=Ce)return-1;if(Ue>=He)return 1;if(Ue>>>=0,He>>>=0,Oe>>>=0,Ce>>>=0,this===Pe)return 0;for(var ge=Ce-Oe,pe=He-Ue,Te=Math.min(ge,pe),be=this.slice(Oe,Ce),ke=Pe.slice(Ue,He),Ve=0;Ve2147483647?Ue=2147483647:Ue<-2147483648&&(Ue=-2147483648),Ue=+Ue,it(Ue)&&(Ue=Oe?0:Je.length-1),Ue<0&&(Ue=Je.length+Ue),Ue>=Je.length){if(Oe)return-1;Ue=Je.length-1}else if(Ue<0)if(Oe)Ue=0;else return-1;if(typeof Pe=="string"&&(Pe=n.from(Pe,He)),n.isBuffer(Pe))return Pe.length===0?-1:O(Je,Pe,Ue,He,Oe);if(typeof Pe=="number")return Pe=Pe&255,typeof Uint8Array.prototype.indexOf=="function"?Oe?Uint8Array.prototype.indexOf.call(Je,Pe,Ue):Uint8Array.prototype.lastIndexOf.call(Je,Pe,Ue):O(Je,[Pe],Ue,He,Oe);throw new TypeError("val must be string, number or Buffer")}function O(Je,Pe,Ue,He,Oe){var Ce=1,ge=Je.length,pe=Pe.length;if(He!==void 0&&(He=String(He).toLowerCase(),He==="ucs2"||He==="ucs-2"||He==="utf16le"||He==="utf-16le")){if(Je.length<2||Pe.length<2)return-1;Ce=2,ge/=2,pe/=2,Ue/=2}function Te(at,ut){return Ce===1?at[ut]:at.readUInt16BE(ut*Ce)}var be;if(Oe){var ke=-1;for(be=Ue;bege&&(Ue=ge-pe),be=Ue;be>=0;be--){for(var Ve=!0,je=0;jeOe&&(He=Oe)):He=Oe;var Ce=Pe.length;He>Ce/2&&(He=Ce/2);var ge;for(ge=0;ge>>0,isFinite(He)?(He=He>>>0,Oe===void 0&&(Oe="utf8")):(Oe=He,He=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ce=this.length-Ue;if((He===void 0||He>Ce)&&(He=Ce),Pe.length>0&&(He<0||Ue<0)||Ue>this.length)throw new RangeError("Attempt to write outside buffer bounds");Oe||(Oe="utf8");for(var ge=!1;;)switch(Oe){case"hex":return F(this,Pe,Ue,He);case"utf8":case"utf-8":return N(this,Pe,Ue,He);case"ascii":case"latin1":case"binary":return V(this,Pe,Ue,He);case"base64":return j(this,Pe,Ue,He);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return $(this,Pe,Ue,He);default:if(ge)throw new TypeError("Unknown encoding: "+Oe);Oe=(""+Oe).toLowerCase(),ge=!0}},n.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function q(Je,Pe,Ue){return Pe===0&&Ue===Je.length?u.fromByteArray(Je):u.fromByteArray(Je.slice(Pe,Ue))}function oe(Je,Pe,Ue){Ue=Math.min(Je.length,Ue);for(var He=[],Oe=Pe;Oe239?4:Ce>223?3:Ce>191?2:1;if(Oe+pe<=Ue){var Te=void 0,be=void 0,ke=void 0,Ve=void 0;switch(pe){case 1:Ce<128&&(ge=Ce);break;case 2:Te=Je[Oe+1],(Te&192)===128&&(Ve=(Ce&31)<<6|Te&63,Ve>127&&(ge=Ve));break;case 3:Te=Je[Oe+1],be=Je[Oe+2],(Te&192)===128&&(be&192)===128&&(Ve=(Ce&15)<<12|(Te&63)<<6|be&63,Ve>2047&&(Ve<55296||Ve>57343)&&(ge=Ve));break;case 4:Te=Je[Oe+1],be=Je[Oe+2],ke=Je[Oe+3],(Te&192)===128&&(be&192)===128&&(ke&192)===128&&(Ve=(Ce&15)<<18|(Te&63)<<12|(be&63)<<6|ke&63,Ve>65535&&Ve<1114112&&(ge=Ve))}}ge===null?(ge=65533,pe=1):ge>65535&&(ge-=65536,He.push(ge>>>10&1023|55296),ge=56320|ge&1023),He.push(ge),Oe+=pe}return G(He)}var Z=4096;function G(Je){var Pe=Je.length;if(Pe<=Z)return String.fromCharCode.apply(String,Je);for(var Ue="",He=0;HeHe)&&(Ue=He);for(var Oe="",Ce=Pe;CeHe&&(Pe=He),Ue<0?(Ue+=He,Ue<0&&(Ue=0)):Ue>He&&(Ue=He),UeUe)throw new RangeError("Trying to access beyond buffer length")}n.prototype.readUintLE=n.prototype.readUIntLE=function(Pe,Ue,He){Pe=Pe>>>0,Ue=Ue>>>0,He||K(Pe,Ue,this.length);for(var Oe=this[Pe],Ce=1,ge=0;++ge>>0,Ue=Ue>>>0,He||K(Pe,Ue,this.length);for(var Oe=this[Pe+--Ue],Ce=1;Ue>0&&(Ce*=256);)Oe+=this[Pe+--Ue]*Ce;return Oe},n.prototype.readUint8=n.prototype.readUInt8=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,1,this.length),this[Pe]},n.prototype.readUint16LE=n.prototype.readUInt16LE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,2,this.length),this[Pe]|this[Pe+1]<<8},n.prototype.readUint16BE=n.prototype.readUInt16BE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,2,this.length),this[Pe]<<8|this[Pe+1]},n.prototype.readUint32LE=n.prototype.readUInt32LE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),(this[Pe]|this[Pe+1]<<8|this[Pe+2]<<16)+this[Pe+3]*16777216},n.prototype.readUint32BE=n.prototype.readUInt32BE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),this[Pe]*16777216+(this[Pe+1]<<16|this[Pe+2]<<8|this[Pe+3])},n.prototype.readBigUInt64LE=vt(function(Pe){Pe=Pe>>>0,Se(Pe,"offset");var Ue=this[Pe],He=this[Pe+7];(Ue===void 0||He===void 0)&&_e(Pe,this.length-8);var Oe=Ue+this[++Pe]*Math.pow(2,8)+this[++Pe]*Math.pow(2,16)+this[++Pe]*Math.pow(2,24),Ce=this[++Pe]+this[++Pe]*Math.pow(2,8)+this[++Pe]*Math.pow(2,16)+He*Math.pow(2,24);return BigInt(Oe)+(BigInt(Ce)<>>0,Se(Pe,"offset");var Ue=this[Pe],He=this[Pe+7];(Ue===void 0||He===void 0)&&_e(Pe,this.length-8);var Oe=Ue*Math.pow(2,24)+this[++Pe]*Math.pow(2,16)+this[++Pe]*Math.pow(2,8)+this[++Pe],Ce=this[++Pe]*Math.pow(2,24)+this[++Pe]*Math.pow(2,16)+this[++Pe]*Math.pow(2,8)+He;return(BigInt(Oe)<>>0,Ue=Ue>>>0,He||K(Pe,Ue,this.length);for(var Oe=this[Pe],Ce=1,ge=0;++ge=Ce&&(Oe-=Math.pow(2,8*Ue)),Oe},n.prototype.readIntBE=function(Pe,Ue,He){Pe=Pe>>>0,Ue=Ue>>>0,He||K(Pe,Ue,this.length);for(var Oe=Ue,Ce=1,ge=this[Pe+--Oe];Oe>0&&(Ce*=256);)ge+=this[Pe+--Oe]*Ce;return Ce*=128,ge>=Ce&&(ge-=Math.pow(2,8*Ue)),ge},n.prototype.readInt8=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,1,this.length),this[Pe]&128?(255-this[Pe]+1)*-1:this[Pe]},n.prototype.readInt16LE=function(Pe,Ue){Pe=Pe>>>0,Ue||K(Pe,2,this.length);var He=this[Pe]|this[Pe+1]<<8;return He&32768?He|4294901760:He},n.prototype.readInt16BE=function(Pe,Ue){Pe=Pe>>>0,Ue||K(Pe,2,this.length);var He=this[Pe+1]|this[Pe]<<8;return He&32768?He|4294901760:He},n.prototype.readInt32LE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),this[Pe]|this[Pe+1]<<8|this[Pe+2]<<16|this[Pe+3]<<24},n.prototype.readInt32BE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),this[Pe]<<24|this[Pe+1]<<16|this[Pe+2]<<8|this[Pe+3]},n.prototype.readBigInt64LE=vt(function(Pe){Pe=Pe>>>0,Se(Pe,"offset");var Ue=this[Pe],He=this[Pe+7];(Ue===void 0||He===void 0)&&_e(Pe,this.length-8);var Oe=this[Pe+4]+this[Pe+5]*Math.pow(2,8)+this[Pe+6]*Math.pow(2,16)+(He<<24);return(BigInt(Oe)<>>0,Se(Pe,"offset");var Ue=this[Pe],He=this[Pe+7];(Ue===void 0||He===void 0)&&_e(Pe,this.length-8);var Oe=(Ue<<24)+this[++Pe]*Math.pow(2,16)+this[++Pe]*Math.pow(2,8)+this[++Pe];return(BigInt(Oe)<>>0,Ue||K(Pe,4,this.length),l.read(this,Pe,!0,23,4)},n.prototype.readFloatBE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,4,this.length),l.read(this,Pe,!1,23,4)},n.prototype.readDoubleLE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,8,this.length),l.read(this,Pe,!0,52,8)},n.prototype.readDoubleBE=function(Pe,Ue){return Pe=Pe>>>0,Ue||K(Pe,8,this.length),l.read(this,Pe,!1,52,8)};function Y(Je,Pe,Ue,He,Oe,Ce){if(!n.isBuffer(Je))throw new TypeError('"buffer" argument must be a Buffer instance');if(Pe>Oe||PeJe.length)throw new RangeError("Index out of range")}n.prototype.writeUintLE=n.prototype.writeUIntLE=function(Pe,Ue,He,Oe){if(Pe=+Pe,Ue=Ue>>>0,He=He>>>0,!Oe){var Ce=Math.pow(2,8*He)-1;Y(this,Pe,Ue,He,Ce,0)}var ge=1,pe=0;for(this[Ue]=Pe&255;++pe>>0,He=He>>>0,!Oe){var Ce=Math.pow(2,8*He)-1;Y(this,Pe,Ue,He,Ce,0)}var ge=He-1,pe=1;for(this[Ue+ge]=Pe&255;--ge>=0&&(pe*=256);)this[Ue+ge]=Pe/pe&255;return Ue+He},n.prototype.writeUint8=n.prototype.writeUInt8=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,1,255,0),this[Ue]=Pe&255,Ue+1},n.prototype.writeUint16LE=n.prototype.writeUInt16LE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,2,65535,0),this[Ue]=Pe&255,this[Ue+1]=Pe>>>8,Ue+2},n.prototype.writeUint16BE=n.prototype.writeUInt16BE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,2,65535,0),this[Ue]=Pe>>>8,this[Ue+1]=Pe&255,Ue+2},n.prototype.writeUint32LE=n.prototype.writeUInt32LE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,4,4294967295,0),this[Ue+3]=Pe>>>24,this[Ue+2]=Pe>>>16,this[Ue+1]=Pe>>>8,this[Ue]=Pe&255,Ue+4},n.prototype.writeUint32BE=n.prototype.writeUInt32BE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,4,4294967295,0),this[Ue]=Pe>>>24,this[Ue+1]=Pe>>>16,this[Ue+2]=Pe>>>8,this[Ue+3]=Pe&255,Ue+4};function ie(Je,Pe,Ue,He,Oe){ye(Pe,He,Oe,Je,Ue,7);var Ce=Number(Pe&BigInt(4294967295));Je[Ue++]=Ce,Ce=Ce>>8,Je[Ue++]=Ce,Ce=Ce>>8,Je[Ue++]=Ce,Ce=Ce>>8,Je[Ue++]=Ce;var ge=Number(Pe>>BigInt(32)&BigInt(4294967295));return Je[Ue++]=ge,ge=ge>>8,Je[Ue++]=ge,ge=ge>>8,Je[Ue++]=ge,ge=ge>>8,Je[Ue++]=ge,Ue}function ne(Je,Pe,Ue,He,Oe){ye(Pe,He,Oe,Je,Ue,7);var Ce=Number(Pe&BigInt(4294967295));Je[Ue+7]=Ce,Ce=Ce>>8,Je[Ue+6]=Ce,Ce=Ce>>8,Je[Ue+5]=Ce,Ce=Ce>>8,Je[Ue+4]=Ce;var ge=Number(Pe>>BigInt(32)&BigInt(4294967295));return Je[Ue+3]=ge,ge=ge>>8,Je[Ue+2]=ge,ge=ge>>8,Je[Ue+1]=ge,ge=ge>>8,Je[Ue]=ge,Ue+8}n.prototype.writeBigUInt64LE=vt(function(Pe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ie(this,Pe,Ue,BigInt(0),BigInt("0xffffffffffffffff"))}),n.prototype.writeBigUInt64BE=vt(function(Pe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ne(this,Pe,Ue,BigInt(0),BigInt("0xffffffffffffffff"))}),n.prototype.writeIntLE=function(Pe,Ue,He,Oe){if(Pe=+Pe,Ue=Ue>>>0,!Oe){var Ce=Math.pow(2,8*He-1);Y(this,Pe,Ue,He,Ce-1,-Ce)}var ge=0,pe=1,Te=0;for(this[Ue]=Pe&255;++ge>0)-Te&255;return Ue+He},n.prototype.writeIntBE=function(Pe,Ue,He,Oe){if(Pe=+Pe,Ue=Ue>>>0,!Oe){var Ce=Math.pow(2,8*He-1);Y(this,Pe,Ue,He,Ce-1,-Ce)}var ge=He-1,pe=1,Te=0;for(this[Ue+ge]=Pe&255;--ge>=0&&(pe*=256);)Pe<0&&Te===0&&this[Ue+ge+1]!==0&&(Te=1),this[Ue+ge]=(Pe/pe>>0)-Te&255;return Ue+He},n.prototype.writeInt8=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,1,127,-128),Pe<0&&(Pe=255+Pe+1),this[Ue]=Pe&255,Ue+1},n.prototype.writeInt16LE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,2,32767,-32768),this[Ue]=Pe&255,this[Ue+1]=Pe>>>8,Ue+2},n.prototype.writeInt16BE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,2,32767,-32768),this[Ue]=Pe>>>8,this[Ue+1]=Pe&255,Ue+2},n.prototype.writeInt32LE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,4,2147483647,-2147483648),this[Ue]=Pe&255,this[Ue+1]=Pe>>>8,this[Ue+2]=Pe>>>16,this[Ue+3]=Pe>>>24,Ue+4},n.prototype.writeInt32BE=function(Pe,Ue,He){return Pe=+Pe,Ue=Ue>>>0,He||Y(this,Pe,Ue,4,2147483647,-2147483648),Pe<0&&(Pe=4294967295+Pe+1),this[Ue]=Pe>>>24,this[Ue+1]=Pe>>>16,this[Ue+2]=Pe>>>8,this[Ue+3]=Pe&255,Ue+4},n.prototype.writeBigInt64LE=vt(function(Pe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ie(this,Pe,Ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),n.prototype.writeBigInt64BE=vt(function(Pe){var Ue=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return ne(this,Pe,Ue,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function le(Je,Pe,Ue,He,Oe,Ce){if(Ue+He>Je.length)throw new RangeError("Index out of range");if(Ue<0)throw new RangeError("Index out of range")}function de(Je,Pe,Ue,He,Oe){return Pe=+Pe,Ue=Ue>>>0,Oe||le(Je,Pe,Ue,4),l.write(Je,Pe,Ue,He,23,4),Ue+4}n.prototype.writeFloatLE=function(Pe,Ue,He){return de(this,Pe,Ue,!0,He)},n.prototype.writeFloatBE=function(Pe,Ue,He){return de(this,Pe,Ue,!1,He)};function we(Je,Pe,Ue,He,Oe){return Pe=+Pe,Ue=Ue>>>0,Oe||le(Je,Pe,Ue,8),l.write(Je,Pe,Ue,He,52,8),Ue+8}n.prototype.writeDoubleLE=function(Pe,Ue,He){return we(this,Pe,Ue,!0,He)},n.prototype.writeDoubleBE=function(Pe,Ue,He){return we(this,Pe,Ue,!1,He)},n.prototype.copy=function(Pe,Ue,He,Oe){if(!n.isBuffer(Pe))throw new TypeError("argument should be a Buffer");if(He||(He=0),!Oe&&Oe!==0&&(Oe=this.length),Ue>=Pe.length&&(Ue=Pe.length),Ue||(Ue=0),Oe>0&&Oe=this.length)throw new RangeError("Index out of range");if(Oe<0)throw new RangeError("sourceEnd out of bounds");Oe>this.length&&(Oe=this.length),Pe.length-Ue>>0,He=He===void 0?this.length:He>>>0,Pe||(Pe=0);var ge;if(typeof Pe=="number")for(ge=Ue;geMath.pow(2,32)?Oe=ve(String(Ue)):typeof Ue=="bigint"&&(Oe=String(Ue),(Ue>Math.pow(BigInt(2),BigInt(32))||Ue<-Math.pow(BigInt(2),BigInt(32)))&&(Oe=ve(Oe)),Oe+="n"),He+=" It must be ".concat(Pe,". Received ").concat(Oe),He},RangeError);function ve(Je){for(var Pe="",Ue=Je.length,He=Je[0]==="-"?1:0;Ue>=He+4;Ue-=3)Pe="_".concat(Je.slice(Ue-3,Ue)).concat(Pe);return"".concat(Je.slice(0,Ue)).concat(Pe)}function Ae(Je,Pe,Ue){Se(Pe,"offset"),(Je[Pe]===void 0||Je[Pe+Ue]===void 0)&&_e(Pe,Je.length-(Ue+1))}function ye(Je,Pe,Ue,He,Oe,Ce){if(Je>Ue||Je= 0".concat(ge," and < 2").concat(ge," ** ").concat((Ce+1)*8).concat(ge):pe=">= -(2".concat(ge," ** ").concat((Ce+1)*8-1).concat(ge,") and < 2 ** ")+"".concat((Ce+1)*8-1).concat(ge),new me.ERR_OUT_OF_RANGE("value",pe,Je)}Ae(He,Oe,Ce)}function Se(Je,Pe){if(typeof Je!="number")throw new me.ERR_INVALID_ARG_TYPE(Pe,"number",Je)}function _e(Je,Pe,Ue){throw Math.floor(Je)!==Je?(Se(Je,Ue),new me.ERR_OUT_OF_RANGE("offset","an integer",Je)):Pe<0?new me.ERR_BUFFER_OUT_OF_BOUNDS:new me.ERR_OUT_OF_RANGE("offset",">= ".concat(0," and <= ").concat(Pe),Je)}var ze=/[^+/0-9A-Za-z-_]/g;function Ie(Je){if(Je=Je.split("=")[0],Je=Je.trim().replace(ze,""),Je.length<2)return"";for(;Je.length%4!==0;)Je=Je+"=";return Je}function Ne(Je,Pe){Pe=Pe||1/0;for(var Ue,He=Je.length,Oe=null,Ce=[],ge=0;ge55295&&Ue<57344){if(!Oe){if(Ue>56319){(Pe-=3)>-1&&Ce.push(239,191,189);continue}else if(ge+1===He){(Pe-=3)>-1&&Ce.push(239,191,189);continue}Oe=Ue;continue}if(Ue<56320){(Pe-=3)>-1&&Ce.push(239,191,189),Oe=Ue;continue}Ue=(Oe-55296<<10|Ue-56320)+65536}else Oe&&(Pe-=3)>-1&&Ce.push(239,191,189);if(Oe=null,Ue<128){if((Pe-=1)<0)break;Ce.push(Ue)}else if(Ue<2048){if((Pe-=2)<0)break;Ce.push(Ue>>6|192,Ue&63|128)}else if(Ue<65536){if((Pe-=3)<0)break;Ce.push(Ue>>12|224,Ue>>6&63|128,Ue&63|128)}else if(Ue<1114112){if((Pe-=4)<0)break;Ce.push(Ue>>18|240,Ue>>12&63|128,Ue>>6&63|128,Ue&63|128)}else throw new Error("Invalid code point")}return Ce}function et(Je){for(var Pe=[],Ue=0;Ue>8,Oe=Ue%256,Ce.push(Oe),Ce.push(He);return Ce}function Ze(Je){return u.toByteArray(Ie(Je))}function Ke(Je,Pe,Ue,He){var Oe;for(Oe=0;Oe=Pe.length||Oe>=Je.length);++Oe)Pe[Oe+Ue]=Je[Oe];return Oe}function nt(Je,Pe){return Je instanceof Pe||Je!=null&&Je.constructor!=null&&Je.constructor.name!=null&&Je.constructor.name===Pe.name}function it(Je){return Je!==Je}var lt=function(){for(var Je="0123456789abcdef",Pe=new Array(256),Ue=0;Ue<16;++Ue)for(var He=Ue*16,Oe=0;Oe<16;++Oe)Pe[He+Oe]=Je[Ue]+Je[Oe];return Pe}();function vt(Je){return typeof BigInt>"u"?xt:Je}function xt(){throw new Error("BigInt not supported")}},25928:function(te){te.exports=P,te.exports.isMobile=P,te.exports.default=P;var X=/(android|bb\d+|meego).+mobile|armv7l|avantgo|bada\/|blackberry|blazer|compal|elaine|fennec|hiptop|iemobile|ip(hone|od)|iris|kindle|lge |maemo|midp|mmp|mobile.+firefox|netfront|opera m(ob|in)i|palm( os)?|phone|p(ixi|re)\/|plucker|pocket|psp|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,e=/CrOS/,A=/android|ipad|playbook|silk/i;function P(o){o||(o={});var L=o.ua;if(!L&&typeof navigator<"u"&&(L=navigator.userAgent),L&&L.headers&&typeof L.headers["user-agent"]=="string"&&(L=L.headers["user-agent"]),typeof L!="string")return!1;var M=X.test(L)&&!e.test(L)||!!o.tablet&&A.test(L);return!M&&o.tablet&&o.featureDetect&&navigator&&navigator.maxTouchPoints>1&&L.indexOf("Macintosh")!==-1&&L.indexOf("Safari")!==-1&&(M=!0),M}},48932:function(te,X,e){e.r(X),e.d(X,{sankeyCenter:function(){return s},sankeyCircular:function(){return C},sankeyJustify:function(){return t},sankeyLeft:function(){return g},sankeyRight:function(){return r}});var A=e(84706),P=e(34712),o=e(10132),L=e(6688),M=e.n(L);function d(me){return me.target.depth}function g(me){return me.depth}function r(me,Le){return Le-1-me.height}function t(me,Le){return me.sourceLinks.length?me.depth:Le-1}function s(me){return me.targetLinks.length?me.depth:me.sourceLinks.length?(0,A.SY)(me.sourceLinks,d)-1:0}function a(me){return function(){return me}}var c=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(me){return typeof me}:function(me){return me&&typeof Symbol=="function"&&me.constructor===Symbol&&me!==Symbol.prototype?"symbol":typeof me};function u(me,Le){return y(me.source,Le.source)||me.index-Le.index}function l(me,Le){return y(me.target,Le.target)||me.index-Le.index}function y(me,Le){return me.partOfCycle===Le.partOfCycle?me.y0-Le.y0:me.circularLinkType==="top"||Le.circularLinkType==="bottom"?-1:1}function h(me){return me.value}function T(me){return(me.y0+me.y1)/2}function f(me){return T(me.source)}function n(me){return T(me.target)}function v(me){return me.index}function m(me){return me.nodes}function b(me){return me.links}function E(me,Le){var ve=me.get(Le);if(!ve)throw new Error("missing: "+Le);return ve}function p(me,Le){return Le(me)}var S=25,w=10,i=.3;function C(){var me=0,Le=0,ve=1,Ae=1,ye=24,Se,_e=v,ze=t,Ie=m,Ne=b,et=32,st=2,Ze,Ke=null;function nt(){var He={nodes:Ie.apply(null,arguments),links:Ne.apply(null,arguments)};it(He),x(He,_e,Ke),lt(He),Je(He),k(He,_e),Pe(He,et,_e),Ue(He);for(var Oe=4,Ce=0;Ce"u"?"undefined":c(pe))!=="object"&&(pe=Ce.source=E(Oe,pe)),(typeof Te>"u"?"undefined":c(Te))!=="object"&&(Te=Ce.target=E(Oe,Te)),pe.sourceLinks.push(Ce),Te.targetLinks.push(Ce)}),He}function lt(He){He.nodes.forEach(function(Oe){Oe.partOfCycle=!1,Oe.value=Math.max((0,A.oh)(Oe.sourceLinks,h),(0,A.oh)(Oe.targetLinks,h)),Oe.sourceLinks.forEach(function(Ce){Ce.circular&&(Oe.partOfCycle=!0,Oe.circularLinkType=Ce.circularLinkType)}),Oe.targetLinks.forEach(function(Ce){Ce.circular&&(Oe.partOfCycle=!0,Oe.circularLinkType=Ce.circularLinkType)})})}function vt(He){var Oe=0,Ce=0,ge=0,pe=0,Te=(0,A.kv)(He.nodes,function(be){return be.column});return He.links.forEach(function(be){be.circular&&(be.circularLinkType=="top"?Oe=Oe+be.width:Ce=Ce+be.width,be.target.column==0&&(pe=pe+be.width),be.source.column==Te&&(ge=ge+be.width))}),Oe=Oe>0?Oe+S+w:Oe,Ce=Ce>0?Ce+S+w:Ce,ge=ge>0?ge+S+w:ge,pe=pe>0?pe+S+w:pe,{top:Oe,bottom:Ce,left:pe,right:ge}}function xt(He,Oe){var Ce=(0,A.kv)(He.nodes,function(je){return je.column}),ge=ve-me,pe=Ae-Le,Te=ge+Oe.right+Oe.left,be=pe+Oe.top+Oe.bottom,ke=ge/Te,Ve=pe/be;return me=me*ke+Oe.left,ve=Oe.right==0?ve:ve*ke,Le=Le*Ve+Oe.top,Ae=Ae*Ve,He.nodes.forEach(function(je){je.x0=me+je.column*((ve-me-ye)/Ce),je.x1=je.x0+ye}),Ve}function Je(He){var Oe,Ce,ge;for(Oe=He.nodes,Ce=[],ge=0;Oe.length;++ge,Oe=Ce,Ce=[])Oe.forEach(function(pe){pe.depth=ge,pe.sourceLinks.forEach(function(Te){Ce.indexOf(Te.target)<0&&!Te.circular&&Ce.push(Te.target)})});for(Oe=He.nodes,Ce=[],ge=0;Oe.length;++ge,Oe=Ce,Ce=[])Oe.forEach(function(pe){pe.height=ge,pe.targetLinks.forEach(function(Te){Ce.indexOf(Te.source)<0&&!Te.circular&&Ce.push(Te.source)})});He.nodes.forEach(function(pe){pe.column=Math.floor(ze.call(null,pe,ge))})}function Pe(He,Oe,Ce){var ge=(0,P.UJ)().key(function(je){return je.column}).sortKeys(A.XE).entries(He.nodes).map(function(je){return je.values});be(Ce),Ve();for(var pe=1,Te=Oe;Te>0;--Te)ke(pe*=.99,Ce),Ve();function be(je){if(Ze){var at=1/0;ge.forEach(function(gt){var Ct=Ae*Ze/(gt.length+1);at=Ct0))if(gt==0&&Vt==1)Yt=Ct.y1-Ct.y0,Ct.y0=Ae/2-Yt/2,Ct.y1=Ae/2+Yt/2;else if(gt==ut-1&&Vt==1)Yt=Ct.y1-Ct.y0,Ct.y0=Ae/2-Yt/2,Ct.y1=Ae/2+Yt/2;else{var gr=0,ht=(0,A.mo)(Ct.sourceLinks,n),Ht=(0,A.mo)(Ct.targetLinks,f);ht&&Ht?gr=(ht+Ht)/2:gr=ht||Ht;var Wt=(gr-T(Ct))*je;Ct.y0+=Wt,Ct.y1+=Wt}})})}function Ve(){ge.forEach(function(je){var at,ut,Nt=Le,Vt=je.length,gt;for(je.sort(y),gt=0;gt0&&(at.y0+=ut,at.y1+=ut),Nt=at.y1+Se;if(ut=Nt-Se-Ae,ut>0)for(Nt=at.y0-=ut,at.y1-=ut,gt=Vt-2;gt>=0;--gt)at=je[gt],ut=at.y1+Se-Nt,ut>0&&(at.y0-=ut,at.y1-=ut),Nt=at.y0})}}function Ue(He){He.nodes.forEach(function(Oe){Oe.sourceLinks.sort(l),Oe.targetLinks.sort(u)}),He.nodes.forEach(function(Oe){var Ce=Oe.y0,ge=Ce,pe=Oe.y1,Te=pe;Oe.sourceLinks.forEach(function(be){be.circular?(be.y0=pe-be.width/2,pe=pe-be.width):(be.y0=Ce+be.width/2,Ce+=be.width)}),Oe.targetLinks.forEach(function(be){be.circular?(be.y1=Te-be.width/2,Te=Te-be.width):(be.y1=ge+be.width/2,ge+=be.width)})})}return nt}function x(me,Le,ve){var Ae=0;if(ve===null){for(var ye=[],Se=0;SeLe.source.column)}function _(me,Le){var ve=0;me.sourceLinks.forEach(function(ye){ve=ye.circular&&!de(ye,Le)?ve+1:ve});var Ae=0;return me.targetLinks.forEach(function(ye){Ae=ye.circular&&!de(ye,Le)?Ae+1:Ae}),ve+Ae}function z(me){var Le=me.source.sourceLinks,ve=0;Le.forEach(function(Se){ve=Se.circular?ve+1:ve});var Ae=me.target.targetLinks,ye=0;return Ae.forEach(function(Se){ye=Se.circular?ye+1:ye}),!(ve>1||ye>1)}function O(me,Le,ve){return me.sort(V),me.forEach(function(Ae,ye){var Se=0;if(de(Ae,ve)&&z(Ae))Ae.circularPathData.verticalBuffer=Se+Ae.width/2;else{var _e=0;for(_e;_eSe?ze:Se}Ae.circularPathData.verticalBuffer=Se+Ae.width/2}}),me}function F(me,Le,ve,Ae){var ye=5,Se=(0,A.SY)(me.links,function(Ie){return Ie.source.y0});me.links.forEach(function(Ie){Ie.circular&&(Ie.circularPathData={})});var _e=me.links.filter(function(Ie){return Ie.circularLinkType=="top"});O(_e,Le,Ae);var ze=me.links.filter(function(Ie){return Ie.circularLinkType=="bottom"});O(ze,Le,Ae),me.links.forEach(function(Ie){if(Ie.circular){if(Ie.circularPathData.arcRadius=Ie.width+w,Ie.circularPathData.leftNodeBuffer=ye,Ie.circularPathData.rightNodeBuffer=ye,Ie.circularPathData.sourceWidth=Ie.source.x1-Ie.source.x0,Ie.circularPathData.sourceX=Ie.source.x0+Ie.circularPathData.sourceWidth,Ie.circularPathData.targetX=Ie.target.x0,Ie.circularPathData.sourceY=Ie.y0,Ie.circularPathData.targetY=Ie.y1,de(Ie,Ae)&&z(Ie))Ie.circularPathData.leftSmallArcRadius=w+Ie.width/2,Ie.circularPathData.leftLargeArcRadius=w+Ie.width/2,Ie.circularPathData.rightSmallArcRadius=w+Ie.width/2,Ie.circularPathData.rightLargeArcRadius=w+Ie.width/2,Ie.circularLinkType=="bottom"?(Ie.circularPathData.verticalFullExtent=Ie.source.y1+S+Ie.circularPathData.verticalBuffer,Ie.circularPathData.verticalLeftInnerExtent=Ie.circularPathData.verticalFullExtent-Ie.circularPathData.leftLargeArcRadius,Ie.circularPathData.verticalRightInnerExtent=Ie.circularPathData.verticalFullExtent-Ie.circularPathData.rightLargeArcRadius):(Ie.circularPathData.verticalFullExtent=Ie.source.y0-S-Ie.circularPathData.verticalBuffer,Ie.circularPathData.verticalLeftInnerExtent=Ie.circularPathData.verticalFullExtent+Ie.circularPathData.leftLargeArcRadius,Ie.circularPathData.verticalRightInnerExtent=Ie.circularPathData.verticalFullExtent+Ie.circularPathData.rightLargeArcRadius);else{var Ne=Ie.source.column,et=Ie.circularLinkType,st=me.links.filter(function(nt){return nt.source.column==Ne&&nt.circularLinkType==et});Ie.circularLinkType=="bottom"?st.sort($):st.sort(j);var Ze=0;st.forEach(function(nt,it){nt.circularLinkID==Ie.circularLinkID&&(Ie.circularPathData.leftSmallArcRadius=w+Ie.width/2+Ze,Ie.circularPathData.leftLargeArcRadius=w+Ie.width/2+it*Le+Ze),Ze=Ze+nt.width}),Ne=Ie.target.column,st=me.links.filter(function(nt){return nt.target.column==Ne&&nt.circularLinkType==et}),Ie.circularLinkType=="bottom"?st.sort(oe):st.sort(q),Ze=0,st.forEach(function(nt,it){nt.circularLinkID==Ie.circularLinkID&&(Ie.circularPathData.rightSmallArcRadius=w+Ie.width/2+Ze,Ie.circularPathData.rightLargeArcRadius=w+Ie.width/2+it*Le+Ze),Ze=Ze+nt.width}),Ie.circularLinkType=="bottom"?(Ie.circularPathData.verticalFullExtent=Math.max(ve,Ie.source.y1,Ie.target.y1)+S+Ie.circularPathData.verticalBuffer,Ie.circularPathData.verticalLeftInnerExtent=Ie.circularPathData.verticalFullExtent-Ie.circularPathData.leftLargeArcRadius,Ie.circularPathData.verticalRightInnerExtent=Ie.circularPathData.verticalFullExtent-Ie.circularPathData.rightLargeArcRadius):(Ie.circularPathData.verticalFullExtent=Se-S-Ie.circularPathData.verticalBuffer,Ie.circularPathData.verticalLeftInnerExtent=Ie.circularPathData.verticalFullExtent+Ie.circularPathData.leftLargeArcRadius,Ie.circularPathData.verticalRightInnerExtent=Ie.circularPathData.verticalFullExtent+Ie.circularPathData.rightLargeArcRadius)}Ie.circularPathData.leftInnerExtent=Ie.circularPathData.sourceX+Ie.circularPathData.leftNodeBuffer,Ie.circularPathData.rightInnerExtent=Ie.circularPathData.targetX-Ie.circularPathData.rightNodeBuffer,Ie.circularPathData.leftFullExtent=Ie.circularPathData.sourceX+Ie.circularPathData.leftLargeArcRadius+Ie.circularPathData.leftNodeBuffer,Ie.circularPathData.rightFullExtent=Ie.circularPathData.targetX-Ie.circularPathData.rightLargeArcRadius-Ie.circularPathData.rightNodeBuffer}if(Ie.circular)Ie.path=N(Ie);else{var Ke=(0,o.ak)().source(function(nt){var it=nt.source.x0+(nt.source.x1-nt.source.x0),lt=nt.y0;return[it,lt]}).target(function(nt){var it=nt.target.x0,lt=nt.y1;return[it,lt]});Ie.path=Ke(Ie)}})}function N(me){var Le="";return me.circularLinkType=="top"?Le="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:Le="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,Le}function V(me,Le){return Z(me)==Z(Le)?me.circularLinkType=="bottom"?$(me,Le):j(me,Le):Z(Le)-Z(me)}function j(me,Le){return me.y0-Le.y0}function $(me,Le){return Le.y0-me.y0}function q(me,Le){return me.y1-Le.y1}function oe(me,Le){return Le.y1-me.y1}function Z(me){return me.target.column-me.source.column}function G(me){return me.target.x0-me.source.x1}function re(me,Le){var ve=I(me),Ae=G(Le)/Math.tan(ve),ye=le(me)=="up"?me.y1+Ae:me.y1-Ae;return ye}function H(me,Le){var ve=I(me),Ae=G(Le)/Math.tan(ve),ye=le(me)=="up"?me.y1-Ae:me.y1+Ae;return ye}function J(me,Le,ve,Ae){me.links.forEach(function(ye){if(!ye.circular&&ye.target.column-ye.source.column>1){var Se=ye.source.column+1,_e=ye.target.column-1,ze=1,Ie=_e-Se+1;for(ze=1;Se<=_e;Se++,ze++)me.nodes.forEach(function(Ne){if(Ne.column==Se){var et=ze/(Ie+1),st=Math.pow(1-et,3),Ze=3*et*Math.pow(1-et,2),Ke=3*Math.pow(et,2)*(1-et),nt=Math.pow(et,3),it=st*ye.y0+Ze*ye.y0+Ke*ye.y1+nt*ye.y1,lt=it-ye.width/2,vt=it+ye.width/2,xt;lt>Ne.y0&<Ne.y0&&vtNe.y1&&K(Je,xt,Le,ve)})):ltNe.y1&&(xt=vt-Ne.y0+10,Ne=K(Ne,xt,Le,ve),me.nodes.forEach(function(Je){p(Je,Ae)==p(Ne,Ae)||Je.column!=Ne.column||Je.y0Ne.y1&&K(Je,xt,Le,ve)}))}})}})}function ae(me,Le){return me.y0>Le.y0&&me.y0Le.y0&&me.y1Le.y1}function K(me,Le,ve,Ae){return me.y0+Le>=ve&&me.y1+Le<=Ae&&(me.y0=me.y0+Le,me.y1=me.y1+Le,me.targetLinks.forEach(function(ye){ye.y1=ye.y1+Le}),me.sourceLinks.forEach(function(ye){ye.y0=ye.y0+Le})),me}function Y(me,Le,ve,Ae){me.nodes.forEach(function(ye){Ae&&ye.y+(ye.y1-ye.y0)>Le&&(ye.y=ye.y-(ye.y+(ye.y1-ye.y0)-Le));var Se=me.links.filter(function(Ie){return p(Ie.source,ve)==p(ye,ve)}),_e=Se.length;_e>1&&Se.sort(function(Ie,Ne){if(!Ie.circular&&!Ne.circular){if(Ie.target.column==Ne.target.column)return Ie.y1-Ne.y1;if(ne(Ie,Ne)){if(Ie.target.column>Ne.target.column){var et=H(Ne,Ie);return Ie.y1-et}if(Ne.target.column>Ie.target.column){var st=H(Ie,Ne);return st-Ne.y1}}else return Ie.y1-Ne.y1}if(Ie.circular&&!Ne.circular)return Ie.circularLinkType=="top"?-1:1;if(Ne.circular&&!Ie.circular)return Ne.circularLinkType=="top"?1:-1;if(Ie.circular&&Ne.circular)return Ie.circularLinkType===Ne.circularLinkType&&Ie.circularLinkType=="top"?Ie.target.column===Ne.target.column?Ie.target.y1-Ne.target.y1:Ne.target.column-Ie.target.column:Ie.circularLinkType===Ne.circularLinkType&&Ie.circularLinkType=="bottom"?Ie.target.column===Ne.target.column?Ne.target.y1-Ie.target.y1:Ie.target.column-Ne.target.column:Ie.circularLinkType=="top"?-1:1});var ze=ye.y0;Se.forEach(function(Ie){Ie.y0=ze+Ie.width/2,ze=ze+Ie.width}),Se.forEach(function(Ie,Ne){if(Ie.circularLinkType=="bottom"){var et=Ne+1,st=0;for(et;et<_e;et++)st=st+Se[et].width;Ie.y0=ye.y1-st-Ie.width/2}})})}function ie(me,Le,ve){me.nodes.forEach(function(Ae){var ye=me.links.filter(function(ze){return p(ze.target,ve)==p(Ae,ve)}),Se=ye.length;Se>1&&ye.sort(function(ze,Ie){if(!ze.circular&&!Ie.circular){if(ze.source.column==Ie.source.column)return ze.y0-Ie.y0;if(ne(ze,Ie)){if(Ie.source.column0?"up":"down"}function de(me,Le){return p(me.source,Le)==p(me.target,Le)}function we(me,Le,ve){var Ae=me.nodes,ye=me.links,Se=!1,_e=!1;if(ye.forEach(function(Ze){Ze.circularLinkType=="top"?Se=!0:Ze.circularLinkType=="bottom"&&(_e=!0)}),Se==!1||_e==!1){var ze=(0,A.SY)(Ae,function(Ze){return Ze.y0}),Ie=(0,A.kv)(Ae,function(Ze){return Ze.y1}),Ne=Ie-ze,et=ve-Le,st=et/Ne;Ae.forEach(function(Ze){var Ke=(Ze.y1-Ze.y0)*st;Ze.y0=(Ze.y0-ze)*st,Ze.y1=Ze.y0+Ke}),ye.forEach(function(Ze){Ze.y0=(Ze.y0-ze)*st,Ze.y1=(Ze.y1-ze)*st,Ze.width=Ze.width*st})}}},26800:function(te,X,e){e.r(X),e.d(X,{sankey:function(){return v},sankeyCenter:function(){return g},sankeyJustify:function(){return d},sankeyLeft:function(){return L},sankeyLinkHorizontal:function(){return p},sankeyRight:function(){return M}});var A=e(84706),P=e(34712);function o(S){return S.target.depth}function L(S){return S.depth}function M(S,w){return w-1-S.height}function d(S,w){return S.sourceLinks.length?S.depth:w-1}function g(S){return S.targetLinks.length?S.depth:S.sourceLinks.length?(0,A.SY)(S.sourceLinks,o)-1:0}function r(S){return function(){return S}}function t(S,w){return a(S.source,w.source)||S.index-w.index}function s(S,w){return a(S.target,w.target)||S.index-w.index}function a(S,w){return S.y0-w.y0}function c(S){return S.value}function u(S){return(S.y0+S.y1)/2}function l(S){return u(S.source)*S.value}function y(S){return u(S.target)*S.value}function h(S){return S.index}function T(S){return S.nodes}function f(S){return S.links}function n(S,w){var i=S.get(w);if(!i)throw new Error("missing: "+w);return i}function v(){var S=0,w=0,i=1,C=1,x=24,k=8,I=h,B=d,_=T,z=f,O=32,F=2/3;function N(){var Z={nodes:_.apply(null,arguments),links:z.apply(null,arguments)};return V(Z),j(Z),$(Z),q(Z),oe(Z),Z}N.update=function(Z){return oe(Z),Z},N.nodeId=function(Z){return arguments.length?(I=typeof Z=="function"?Z:r(Z),N):I},N.nodeAlign=function(Z){return arguments.length?(B=typeof Z=="function"?Z:r(Z),N):B},N.nodeWidth=function(Z){return arguments.length?(x=+Z,N):x},N.nodePadding=function(Z){return arguments.length?(k=+Z,N):k},N.nodes=function(Z){return arguments.length?(_=typeof Z=="function"?Z:r(Z),N):_},N.links=function(Z){return arguments.length?(z=typeof Z=="function"?Z:r(Z),N):z},N.size=function(Z){return arguments.length?(S=w=0,i=+Z[0],C=+Z[1],N):[i-S,C-w]},N.extent=function(Z){return arguments.length?(S=+Z[0][0],i=+Z[1][0],w=+Z[0][1],C=+Z[1][1],N):[[S,w],[i,C]]},N.iterations=function(Z){return arguments.length?(O=+Z,N):O};function V(Z){Z.nodes.forEach(function(re,H){re.index=H,re.sourceLinks=[],re.targetLinks=[]});var G=(0,P.kH)(Z.nodes,I);Z.links.forEach(function(re,H){re.index=H;var J=re.source,ae=re.target;typeof J!="object"&&(J=re.source=n(G,J)),typeof ae!="object"&&(ae=re.target=n(G,ae)),J.sourceLinks.push(re),ae.targetLinks.push(re)})}function j(Z){Z.nodes.forEach(function(G){G.value=Math.max((0,A.oh)(G.sourceLinks,c),(0,A.oh)(G.targetLinks,c))})}function $(Z){var G,re,H;for(G=Z.nodes,re=[],H=0;G.length;++H,G=re,re=[])G.forEach(function(ae){ae.depth=H,ae.sourceLinks.forEach(function(K){re.indexOf(K.target)<0&&re.push(K.target)})});for(G=Z.nodes,re=[],H=0;G.length;++H,G=re,re=[])G.forEach(function(ae){ae.height=H,ae.targetLinks.forEach(function(K){re.indexOf(K.source)<0&&re.push(K.source)})});var J=(i-S-x)/(H-1);Z.nodes.forEach(function(ae){ae.x1=(ae.x0=S+Math.max(0,Math.min(H-1,Math.floor(B.call(null,ae,H))))*J)+x})}function q(Z){var G=(0,P.UJ)().key(function(ie){return ie.x0}).sortKeys(A.XE).entries(Z.nodes).map(function(ie){return ie.values});J(),Y();for(var re=1,H=O;H>0;--H)K(re*=.99),Y(),ae(re),Y();function J(){var ie=(0,A.kv)(G,function(de){return de.length}),ne=F*(C-w)/(ie-1);k>ne&&(k=ne);var le=(0,A.SY)(G,function(de){return(C-w-(de.length-1)*k)/(0,A.oh)(de,c)});G.forEach(function(de){de.forEach(function(we,me){we.y1=(we.y0=me)+we.value*le})}),Z.links.forEach(function(de){de.width=de.value*le})}function ae(ie){G.forEach(function(ne){ne.forEach(function(le){if(le.targetLinks.length){var de=((0,A.oh)(le.targetLinks,l)/(0,A.oh)(le.targetLinks,c)-u(le))*ie;le.y0+=de,le.y1+=de}})})}function K(ie){G.slice().reverse().forEach(function(ne){ne.forEach(function(le){if(le.sourceLinks.length){var de=((0,A.oh)(le.sourceLinks,y)/(0,A.oh)(le.sourceLinks,c)-u(le))*ie;le.y0+=de,le.y1+=de}})})}function Y(){G.forEach(function(ie){var ne,le,de=w,we=ie.length,me;for(ie.sort(a),me=0;me0&&(ne.y0+=le,ne.y1+=le),de=ne.y1+k;if(le=de-k-C,le>0)for(de=ne.y0-=le,ne.y1-=le,me=we-2;me>=0;--me)ne=ie[me],le=ne.y1+k-de,le>0&&(ne.y0-=le,ne.y1-=le),de=ne.y0})}}function oe(Z){Z.nodes.forEach(function(G){G.sourceLinks.sort(s),G.targetLinks.sort(t)}),Z.nodes.forEach(function(G){var re=G.y0,H=re;G.sourceLinks.forEach(function(J){J.y0=re+J.width/2,re+=J.width}),G.targetLinks.forEach(function(J){J.y1=H+J.width/2,H+=J.width})})}return N}var m=e(10132);function b(S){return[S.source.x1,S.y0]}function E(S){return[S.target.x0,S.y1]}function p(){return(0,m.ak)().source(b).target(E)}},33428:function(te,X,e){var A,P;(function(){var o={version:"3.8.0"},L=[].slice,M=function(se){return L.call(se)},d=self.document;function g(se){return se&&(se.ownerDocument||se.document||se).documentElement}function r(se){return se&&(se.ownerDocument&&se.ownerDocument.defaultView||se.document&&se||se.defaultView)}if(d)try{M(d.documentElement.childNodes)[0].nodeType}catch{M=function(Me){for(var De=Me.length,Xe=new Array(De);De--;)Xe[De]=Me[De];return Xe}}if(Date.now||(Date.now=function(){return+new Date}),d)try{d.createElement("DIV").style.setProperty("opacity",0,"")}catch{var t=this.Element.prototype,s=t.setAttribute,a=t.setAttributeNS,c=this.CSSStyleDeclaration.prototype,u=c.setProperty;t.setAttribute=function(Me,De){s.call(this,Me,De+"")},t.setAttributeNS=function(Me,De,Xe){a.call(this,Me,De,Xe+"")},c.setProperty=function(Me,De,Xe){u.call(this,Me,De+"",Xe)}}o.ascending=l;function l(se,Me){return seMe?1:se>=Me?0:NaN}o.descending=function(se,Me){return Mese?1:Me>=se?0:NaN},o.min=function(se,Me){var De=-1,Xe=se.length,Qe,rt;if(arguments.length===1){for(;++De=rt){Qe=rt;break}for(;++Dert&&(Qe=rt)}else{for(;++De=rt){Qe=rt;break}for(;++Dert&&(Qe=rt)}return Qe},o.max=function(se,Me){var De=-1,Xe=se.length,Qe,rt;if(arguments.length===1){for(;++De=rt){Qe=rt;break}for(;++DeQe&&(Qe=rt)}else{for(;++De=rt){Qe=rt;break}for(;++DeQe&&(Qe=rt)}return Qe},o.extent=function(se,Me){var De=-1,Xe=se.length,Qe,rt,Tt;if(arguments.length===1){for(;++De=rt){Qe=Tt=rt;break}for(;++Dert&&(Qe=rt),Tt=rt){Qe=Tt=rt;break}for(;++Dert&&(Qe=rt),Tt1)return Tt/(Ft-1)},o.deviation=function(){var se=o.variance.apply(this,arguments);return se&&Math.sqrt(se)};function T(se){return{left:function(Me,De,Xe,Qe){for(arguments.length<3&&(Xe=0),arguments.length<4&&(Qe=Me.length);Xe>>1;se(Me[rt],De)<0?Xe=rt+1:Qe=rt}return Xe},right:function(Me,De,Xe,Qe){for(arguments.length<3&&(Xe=0),arguments.length<4&&(Qe=Me.length);Xe>>1;se(Me[rt],De)>0?Qe=rt:Xe=rt+1}return Xe}}}var f=T(l);o.bisectLeft=f.left,o.bisect=o.bisectRight=f.right,o.bisector=function(se){return T(se.length===1?function(Me,De){return l(se(Me),De)}:se)},o.shuffle=function(se,Me,De){(Xe=arguments.length)<3&&(De=se.length,Xe<2&&(Me=0));for(var Xe=De-Me,Qe,rt;Xe;)rt=Math.random()*Xe--|0,Qe=se[Xe+Me],se[Xe+Me]=se[rt+Me],se[rt+Me]=Qe;return se},o.permute=function(se,Me){for(var De=Me.length,Xe=new Array(De);De--;)Xe[De]=se[Me[De]];return Xe},o.pairs=function(se){for(var Me=0,De=se.length-1,Xe=se[0],Qe=new Array(De<0?0:De);Me=0;)for(Tt=se[Me],De=Tt.length;--De>=0;)rt[--Qe]=Tt[De];return rt};var v=Math.abs;o.range=function(se,Me,De){if(arguments.length<3&&(De=1,arguments.length<2&&(Me=se,se=0)),(Me-se)/De===1/0)throw new Error("infinite range");var Xe=[],Qe=m(v(De)),rt=-1,Tt;if(se*=Qe,Me*=Qe,De*=Qe,De<0)for(;(Tt=se+De*++rt)>Me;)Xe.push(Tt/Qe);else for(;(Tt=se+De*++rt)=Me.length)return Qe?Qe.call(se,Ft):Xe?Ft.sort(Xe):Ft;for(var jt=-1,wr=Ft.length,Tr=Me[Ot++],Wr,qr,Mr,kr=new E,Hr;++jt=Me.length)return yt;var Ot=[],jt=De[Ft++];return yt.forEach(function(wr,Tr){Ot.push({key:wr,values:Tt(Tr,Ft)})}),jt?Ot.sort(function(wr,Tr){return jt(wr.key,Tr.key)}):Ot}return se.map=function(yt,Ft){return rt(Ft,yt,0)},se.entries=function(yt){return Tt(rt(o.map,yt,0),0)},se.key=function(yt){return Me.push(yt),se},se.sortKeys=function(yt){return De[Me.length-1]=yt,se},se.sortValues=function(yt){return Xe=yt,se},se.rollup=function(yt){return Qe=yt,se},se},o.set=function(se){var Me=new _;if(se)for(var De=0,Xe=se.length;De=0&&(Xe=se.slice(De+1),se=se.slice(0,De)),se)return arguments.length<2?this[se].on(Xe):this[se].on(Xe,Me);if(arguments.length===2){if(Me==null)for(se in this)this.hasOwnProperty(se)&&this[se].on(Xe,null);return this}};function $(se){var Me=[],De=new E;function Xe(){for(var Qe=Me,rt=-1,Tt=Qe.length,yt;++rt=0&&(De=se.slice(0,Me))!=="xmlns"&&(se=se.slice(Me+1)),de.hasOwnProperty(De)?{space:de[De],local:se}:se}},Y.attr=function(se,Me){if(arguments.length<2){if(typeof se=="string"){var De=this.node();return se=o.ns.qualify(se),se.local?De.getAttributeNS(se.space,se.local):De.getAttribute(se)}for(Me in se)this.each(we(Me,se[Me]));return this}return this.each(we(se,Me))};function we(se,Me){se=o.ns.qualify(se);function De(){this.removeAttribute(se)}function Xe(){this.removeAttributeNS(se.space,se.local)}function Qe(){this.setAttribute(se,Me)}function rt(){this.setAttributeNS(se.space,se.local,Me)}function Tt(){var Ft=Me.apply(this,arguments);Ft==null?this.removeAttribute(se):this.setAttribute(se,Ft)}function yt(){var Ft=Me.apply(this,arguments);Ft==null?this.removeAttributeNS(se.space,se.local):this.setAttributeNS(se.space,se.local,Ft)}return Me==null?se.local?Xe:De:typeof Me=="function"?se.local?yt:Tt:se.local?rt:Qe}function me(se){return se.trim().replace(/\s+/g," ")}Y.classed=function(se,Me){if(arguments.length<2){if(typeof se=="string"){var De=this.node(),Xe=(se=ve(se)).length,Qe=-1;if(Me=De.classList){for(;++Qe=0;)(rt=De[Xe])&&(Qe&&Qe!==rt.nextSibling&&Qe.parentNode.insertBefore(rt,Qe),Qe=rt);return this},Y.sort=function(se){se=st.apply(this,arguments);for(var Me=-1,De=this.length;++Me=Me&&(Me=Qe+1);!(Ft=Tt[Me])&&++Me0&&(se=se.slice(0,Qe));var Tt=vt.get(se);Tt&&(se=Tt,rt=Je);function yt(){var jt=this[Xe];jt&&(this.removeEventListener(se,jt,jt.$),delete this[Xe])}function Ft(){var jt=rt(Me,M(arguments));yt.call(this),this.addEventListener(se,this[Xe]=jt,jt.$=De),jt._=Me}function Ot(){var jt=new RegExp("^__on([^.]+)"+o.requote(se)+"$"),wr;for(var Tr in this)if(wr=Tr.match(jt)){var Wr=this[Tr];this.removeEventListener(wr[1],Wr,Wr.$),delete this[Tr]}}return Qe?Me?Ft:yt:Me?V:Ot}var vt=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});d&&vt.forEach(function(se){"on"+se in d&&vt.remove(se)});function xt(se,Me){return function(De){var Xe=o.event;o.event=De,Me[0]=this.__data__;try{se.apply(this,Me)}finally{o.event=Xe}}}function Je(se,Me){var De=xt(se,Me);return function(Xe){var Qe=this,rt=Xe.relatedTarget;(!rt||rt!==Qe&&!(rt.compareDocumentPosition(Qe)&8))&&De.call(Qe,Xe)}}var Pe,Ue=0;function He(se){var Me=".dragsuppress-"+ ++Ue,De="click"+Me,Xe=o.select(r(se)).on("touchmove"+Me,q).on("dragstart"+Me,q).on("selectstart"+Me,q);if(Pe==null&&(Pe="onselectstart"in se?!1:F(se.style,"userSelect")),Pe){var Qe=g(se).style,rt=Qe[Pe];Qe[Pe]="none"}return function(Tt){if(Xe.on(Me,null),Pe&&(Qe[Pe]=rt),Tt){var yt=function(){Xe.on(De,null)};Xe.on(De,function(){q(),yt()},!0),setTimeout(yt,0)}}}o.mouse=function(se){return Ce(se,oe())};var Oe=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ce(se,Me){Me.changedTouches&&(Me=Me.changedTouches[0]);var De=se.ownerSVGElement||se;if(De.createSVGPoint){var Xe=De.createSVGPoint();if(Oe<0){var Qe=r(se);if(Qe.scrollX||Qe.scrollY){De=o.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var rt=De[0][0].getScreenCTM();Oe=!(rt.f||rt.e),De.remove()}}return Oe?(Xe.x=Me.pageX,Xe.y=Me.pageY):(Xe.x=Me.clientX,Xe.y=Me.clientY),Xe=Xe.matrixTransform(se.getScreenCTM().inverse()),[Xe.x,Xe.y]}var Tt=se.getBoundingClientRect();return[Me.clientX-Tt.left-se.clientLeft,Me.clientY-Tt.top-se.clientTop]}o.touch=function(se,Me,De){if(arguments.length<3&&(De=Me,Me=oe().changedTouches),Me){for(var Xe=0,Qe=Me.length,rt;Xe1?je:se<-1?-je:Math.asin(se)}function gt(se){return((se=Math.exp(se))-1/se)/2}function Ct(se){return((se=Math.exp(se))+1/se)/2}function Yt(se){return((se=Math.exp(2*se))-1)/(se+1)}var gr=Math.SQRT2,ht=2,Ht=4;o.interpolateZoom=function(se,Me){var De=se[0],Xe=se[1],Qe=se[2],rt=Me[0],Tt=Me[1],yt=Me[2],Ft=rt-De,Ot=Tt-Xe,jt=Ft*Ft+Ot*Ot,wr,Tr;if(jt0&&(Hn=Hn.transition().duration(Tt)),Hn.call(on.event)}function Qn(){kr&&kr.domain(Mr.range().map(function(Hn){return(Hn-se.x)/se.k}).map(Mr.invert)),rn&&rn.domain(Hr.range().map(function(Hn){return(Hn-se.y)/se.k}).map(Hr.invert))}function ra(Hn){yt++||Hn({type:"zoomstart"})}function Pa(Hn){Qn(),Hn({type:"zoom",scale:se.k,translate:[se.x,se.y]})}function ya(Hn){--yt||(Hn({type:"zoomend"}),De=null)}function Sa(){var Hn=this,Da=qr.of(Hn,arguments),pa=0,Ba=o.select(r(Hn)).on(Ot,zi).on(jt,Fi),li=Zr(o.mouse(Hn)),ja=He(Hn);kt.call(Hn),ra(Da);function zi(){pa=1,ta(o.mouse(Hn),li),Pa(Da)}function Fi(){Ba.on(Ot,null).on(jt,null),ja(pa),ya(Da)}}function Za(){var Hn=this,Da=qr.of(Hn,arguments),pa={},Ba=0,li,ja=".zoom-"+o.event.changedTouches[0].identifier,zi="touchmove"+ja,Fi="touchend"+ja,Ui=[],ui=o.select(Hn),Ki=He(Hn);xa(),ra(Da),ui.on(Ft,null).on(Tr,xa);function qn(){var Vi=o.touches(Hn);return li=se.k,Vi.forEach(function(ei){ei.identifier in pa&&(pa[ei.identifier]=Zr(ei))}),Vi}function xa(){var Vi=o.event.target;o.select(Vi).on(zi,so).on(Fi,ho),Ui.push(Vi);for(var ei=o.event.changedTouches,Pi=0,Mi=ei.length;Pi1){var pi=Bo[0],Zs=Bo[1],Na=pi[0]-Zs[0],gi=pi[1]-Zs[1];Ba=Na*Na+gi*gi}}function so(){var Vi=o.touches(Hn),ei,Pi,Mi,Bo;kt.call(Hn);for(var Qo=0,pi=Vi.length;Qo1?1:Me,De=De<0?0:De>1?1:De,Qe=De<=.5?De*(1+Me):De+Me-De*Me,Xe=2*De-Qe;function rt(yt){return yt>360?yt-=360:yt<0&&(yt+=360),yt<60?Xe+(Qe-Xe)*yt/60:yt<180?Qe:yt<240?Xe+(Qe-Xe)*(240-yt)/60:Xe}function Tt(yt){return Math.round(rt(yt)*255)}return new rr(Tt(se+120),Tt(se),Tt(se-120))}o.hcl=Et;function Et(se,Me,De){return this instanceof Et?(this.h=+se,this.c=+Me,void(this.l=+De)):arguments.length<2?se instanceof Et?new Et(se.h,se.c,se.l):se instanceof It?Rt(se.l,se.a,se.b):Rt((se=Or((se=o.rgb(se)).r,se.g,se.b)).l,se.a,se.b):new Et(se,Me,De)}var Mt=Et.prototype=new ct;Mt.brighter=function(se){return new Et(this.h,this.c,Math.min(100,this.l+Gt*(arguments.length?se:1)))},Mt.darker=function(se){return new Et(this.h,this.c,Math.max(0,this.l-Gt*(arguments.length?se:1)))},Mt.rgb=function(){return _t(this.h,this.c,this.l).rgb()};function _t(se,Me,De){return isNaN(se)&&(se=0),isNaN(Me)&&(Me=0),new It(De,Math.cos(se*=at)*Me,Math.sin(se)*Me)}o.lab=It;function It(se,Me,De){return this instanceof It?(this.l=+se,this.a=+Me,void(this.b=+De)):arguments.length<2?se instanceof It?new It(se.l,se.a,se.b):se instanceof Et?_t(se.h,se.c,se.l):Or((se=rr(se)).r,se.g,se.b):new It(se,Me,De)}var Gt=18,nr=.95047,ar=1,ir=1.08883,Be=It.prototype=new ct;Be.brighter=function(se){return new It(Math.min(100,this.l+Gt*(arguments.length?se:1)),this.a,this.b)},Be.darker=function(se){return new It(Math.max(0,this.l-Gt*(arguments.length?se:1)),this.a,this.b)},Be.rgb=function(){return Fe(this.l,this.a,this.b)};function Fe(se,Me,De){var Xe=(se+16)/116,Qe=Xe+Me/500,rt=Xe-De/200;return Qe=Lt(Qe)*nr,Xe=Lt(Xe)*ar,rt=Lt(rt)*ir,new rr(Qt(3.2404542*Qe-1.5371385*Xe-.4985314*rt),Qt(-.969266*Qe+1.8760108*Xe+.041556*rt),Qt(.0556434*Qe-.2040259*Xe+1.0572252*rt))}function Rt(se,Me,De){return se>0?new Et(Math.atan2(De,Me)*ut,Math.sqrt(Me*Me+De*De),se):new Et(NaN,NaN,se)}function Lt(se){return se>.206893034?se*se*se:(se-.13793103448275862)/7.787037}function Ut(se){return se>.008856?Math.pow(se,.3333333333333333):7.787037*se+.13793103448275862}function Qt(se){return Math.round(255*(se<=.00304?12.92*se:1.055*Math.pow(se,.4166666666666667)-.055))}o.rgb=rr;function rr(se,Me,De){return this instanceof rr?(this.r=~~se,this.g=~~Me,void(this.b=~~De)):arguments.length<2?se instanceof rr?new rr(se.r,se.g,se.b):vr(""+se,rr,bt):new rr(se,Me,De)}function Kt(se){return new rr(se>>16,se>>8&255,se&255)}function Dt(se){return Kt(se)+""}var sr=rr.prototype=new ct;sr.brighter=function(se){se=Math.pow(.7,arguments.length?se:1);var Me=this.r,De=this.g,Xe=this.b,Qe=30;return!Me&&!De&&!Xe?new rr(Qe,Qe,Qe):(Me&&Me>4,Xe=Xe>>4|Xe,Qe=Ft&240,Qe=Qe>>4|Qe,rt=Ft&15,rt=rt<<4|rt):se.length===7&&(Xe=(Ft&16711680)>>16,Qe=(Ft&65280)>>8,rt=Ft&255)),Me(Xe,Qe,rt))}function lr(se,Me,De){var Xe=Math.min(se/=255,Me/=255,De/=255),Qe=Math.max(se,Me,De),rt=Qe-Xe,Tt,yt,Ft=(Qe+Xe)/2;return rt?(yt=Ft<.5?rt/(Qe+Xe):rt/(2-Qe-Xe),se==Qe?Tt=(Me-De)/rt+(Me0&&Ft<1?0:Tt),new qe(Tt,yt,Ft)}function Or(se,Me,De){se=Sr(se),Me=Sr(Me),De=Sr(De);var Xe=Ut((.4124564*se+.3575761*Me+.1804375*De)/nr),Qe=Ut((.2126729*se+.7151522*Me+.072175*De)/ar),rt=Ut((.0193339*se+.119192*Me+.9503041*De)/ir);return It(116*Qe-16,500*(Xe-Qe),200*(Qe-rt))}function Sr(se){return(se/=255)<=.04045?se/12.92:Math.pow((se+.055)/1.055,2.4)}function Ar(se){var Me=parseFloat(se);return se.charAt(se.length-1)==="%"?Math.round(Me*2.55):Me}var sn=o.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});sn.forEach(function(se,Me){sn.set(se,Kt(Me))});function Jr(se){return typeof se=="function"?se:function(){return se}}o.functor=Jr,o.xhr=bn(z);function bn(se){return function(Me,De,Xe){return arguments.length===2&&typeof De=="function"&&(Xe=De,De=null),xn(Me,De,se,Xe)}}function xn(se,Me,De,Xe){var Qe={},rt=o.dispatch("beforesend","progress","load","error"),Tt={},yt=new XMLHttpRequest,Ft=null;self.XDomainRequest&&!("withCredentials"in yt)&&/^(http(s)?:)?\/\//.test(se)&&(yt=new XDomainRequest),"onload"in yt?yt.onload=yt.onerror=Ot:yt.onreadystatechange=function(){yt.readyState>3&&Ot()};function Ot(){var jt=yt.status,wr;if(!jt&&Lr(yt)||jt>=200&&jt<300||jt===304){try{wr=De.call(Qe,yt)}catch(Tr){rt.error.call(Qe,Tr);return}rt.load.call(Qe,wr)}else rt.error.call(Qe,yt)}return yt.onprogress=function(jt){var wr=o.event;o.event=jt;try{rt.progress.call(Qe,yt)}finally{o.event=wr}},Qe.header=function(jt,wr){return jt=(jt+"").toLowerCase(),arguments.length<2?Tt[jt]:(wr==null?delete Tt[jt]:Tt[jt]=wr+"",Qe)},Qe.mimeType=function(jt){return arguments.length?(Me=jt==null?null:jt+"",Qe):Me},Qe.responseType=function(jt){return arguments.length?(Ft=jt,Qe):Ft},Qe.response=function(jt){return De=jt,Qe},["get","post"].forEach(function(jt){Qe[jt]=function(){return Qe.send.apply(Qe,[jt].concat(M(arguments)))}}),Qe.send=function(jt,wr,Tr){if(arguments.length===2&&typeof wr=="function"&&(Tr=wr,wr=null),yt.open(jt,se,!0),Me!=null&&!("accept"in Tt)&&(Tt.accept=Me+",*/*"),yt.setRequestHeader)for(var Wr in Tt)yt.setRequestHeader(Wr,Tt[Wr]);return Me!=null&&yt.overrideMimeType&&yt.overrideMimeType(Me),Ft!=null&&(yt.responseType=Ft),Tr!=null&&Qe.on("error",Tr).on("load",function(qr){Tr(null,qr)}),rt.beforesend.call(Qe,yt),yt.send(wr??null),Qe},Qe.abort=function(){return yt.abort(),Qe},o.rebind(Qe,rt,"on"),Xe==null?Qe:Qe.get(or(Xe))}function or(se){return se.length===1?function(Me,De){se(Me==null?De:null)}:se}function Lr(se){var Me=se.responseType;return Me&&Me!=="text"?se.response:se.responseText}o.dsv=function(se,Me){var De=new RegExp('["'+se+` ]`),Xe=se.charCodeAt(0);function Qe(Ot,jt,wr){arguments.length<3&&(wr=jt,jt=null);var Tr=xn(Ot,Me,jt==null?rt:Tt(jt),wr);return Tr.row=function(Wr){return arguments.length?Tr.response((jt=Wr)==null?rt:Tt(Wr)):jt},Tr}function rt(Ot){return Qe.parse(Ot.responseText)}function Tt(Ot){return function(jt){return Qe.parse(jt.responseText,Ot)}}Qe.parse=function(Ot,jt){var wr;return Qe.parseRows(Ot,function(Tr,Wr){if(wr)return wr(Tr,Wr-1);var qr=function(Mr){for(var kr={},Hr=Tr.length,rn=0;rn=qr)return Tr;if(rn)return rn=!1,wr;var _n=Mr;if(Ot.charCodeAt(_n)===34){for(var Xn=_n;Xn++24?(isFinite(Me)&&(clearTimeout(un),un=setTimeout(Dn,Me)),Qr=0):(Qr=1,ln(Dn))}o.timer.flush=function(){Kn(),sa()};function Kn(){for(var se=Date.now(),Me=Br;Me;)se>=Me.t&&Me.c(se-Me.t)&&(Me.c=null),Me=Me.n;return se}function sa(){for(var se,Me=Br,De=1/0;Me;)Me.c?(Me.t=0;--yt)Mr.push(Qe[Ot[wr[yt]][2]]);for(yt=+Wr;yt1&&Nt(se[De[Xe-2]],se[De[Xe-1]],se[Qe])<=0;)--Xe;De[Xe++]=Qe}return De.slice(0,Xe)}function pr(se,Me){return se[0]-Me[0]||se[1]-Me[1]}o.geom.polygon=function(se){return re(se,$r),se};var $r=o.geom.polygon.prototype=[];$r.area=function(){for(var se=-1,Me=this.length,De,Xe=this[Me-1],Qe=0;++sepe)yt=yt.L;else if(Tt=Me-en(yt,De),Tt>pe){if(!yt.R){Xe=yt;break}yt=yt.R}else{rt>-1e-6?(Xe=yt.P,Qe=yt):Tt>-1e-6?(Xe=yt,Qe=yt.N):Xe=Qe=yt;break}var Ft=yr(se);if(In.insert(Xe,Ft),!(!Xe&&!Qe)){if(Xe===Qe){wn(Xe),Qe=yr(Xe.site),In.insert(Ft,Qe),Ft.edge=Qe.edge=$n(Xe.site,Ft.site),dn(Xe),dn(Qe);return}if(!Qe){Ft.edge=$n(Xe.site,Ft.site);return}wn(Xe),wn(Qe);var Ot=Xe.site,jt=Ot.x,wr=Ot.y,Tr=se.x-jt,Wr=se.y-wr,qr=Qe.site,Mr=qr.x-jt,kr=qr.y-wr,Hr=2*(Tr*kr-Wr*Mr),rn=Tr*Tr+Wr*Wr,on=Mr*Mr+kr*kr,Zr={x:(kr*rn-Wr*on)/Hr+jt,y:(Tr*on-Mr*rn)/Hr+wr};ba(Qe.edge,Ot,qr,Zr),Ft.edge=$n(Ot,se,null,Zr),Qe.edge=$n(se,qr,null,Zr),dn(Xe),dn(Qe)}}function an(se,Me){var De=se.site,Xe=De.x,Qe=De.y,rt=Qe-Me;if(!rt)return Xe;var Tt=se.P;if(!Tt)return-1/0;De=Tt.site;var yt=De.x,Ft=De.y,Ot=Ft-Me;if(!Ot)return yt;var jt=yt-Xe,wr=1/rt-1/Ot,Tr=jt/Ot;return wr?(-Tr+Math.sqrt(Tr*Tr-2*wr*(jt*jt/(-2*Ot)-Ft+Ot/2+Qe-rt/2)))/wr+Xe:(Xe+yt)/2}function en(se,Me){var De=se.N;if(De)return an(De,Me);var Xe=se.site;return Xe.y===Me?Xe.x:1/0}function br(se){this.site=se,this.edges=[]}br.prototype.prepare=function(){for(var se=this.edges,Me=se.length,De;Me--;)De=se[Me].edge,(!De.b||!De.a)&&se.splice(Me,1);return se.sort(zr),se.length};function Vr(se){for(var Me=se[0][0],De=se[1][0],Xe=se[0][1],Qe=se[1][1],rt,Tt,yt,Ft,Ot=gn,jt=Ot.length,wr,Tr,Wr,qr,Mr,kr;jt--;)if(wr=Ot[jt],!(!wr||!wr.prepare()))for(Wr=wr.edges,qr=Wr.length,Tr=0;Trpe||v(Ft-Tt)>pe)&&(Wr.splice(Tr,0,new ni(la(wr.site,kr,v(yt-Me)pe?{x:Me,y:v(rt-Me)pe?{x:v(Tt-Qe)pe?{x:De,y:v(rt-De)pe?{x:v(Tt-Xe)=-1e-12)){var Tr=Ft*Ft+Ot*Ot,Wr=jt*jt+kr*kr,qr=(kr*Tr-Ot*Wr)/wr,Mr=(Ft*Wr-jt*Tr)/wr,kr=Mr+yt,Hr=xr.pop()||new Yr;Hr.arc=se,Hr.site=Qe,Hr.x=qr+Tt,Hr.y=kr+Math.sqrt(qr*qr+Mr*Mr),Hr.cy=kr,se.circle=Hr;for(var rn=null,on=Ma._;on;)if(Hr.y0)){if(Mr/=Wr,Wr<0){if(Mr0){if(Mr>Tr)return;Mr>wr&&(wr=Mr)}if(Mr=De-yt,!(!Wr&&Mr<0)){if(Mr/=Wr,Wr<0){if(Mr>Tr)return;Mr>wr&&(wr=Mr)}else if(Wr>0){if(Mr0)){if(Mr/=qr,qr<0){if(Mr0){if(Mr>Tr)return;Mr>wr&&(wr=Mr)}if(Mr=Xe-Ft,!(!qr&&Mr<0)){if(Mr/=qr,qr<0){if(Mr>Tr)return;Mr>wr&&(wr=Mr)}else if(qr>0){if(Mr0&&(Qe.a={x:yt+wr*Wr,y:Ft+wr*qr}),Tr<1&&(Qe.b={x:yt+Tr*Wr,y:Ft+Tr*qr}),Qe}}}}}}function kn(se){for(var Me=pn,De=Tn(se[0][0],se[0][1],se[1][0],se[1][1]),Xe=Me.length,Qe;Xe--;)Qe=Me[Xe],(!Pn(Qe,se)||!De(Qe)||v(Qe.a.x-Qe.b.x)=rt)return;if(jt>Tr){if(!Xe)Xe={x:qr,y:Tt};else if(Xe.y>=yt)return;De={x:qr,y:yt}}else{if(!Xe)Xe={x:qr,y:yt};else if(Xe.y1)if(jt>Tr){if(!Xe)Xe={x:(Tt-Hr)/kr,y:Tt};else if(Xe.y>=yt)return;De={x:(yt-Hr)/kr,y:yt}}else{if(!Xe)Xe={x:(yt-Hr)/kr,y:yt};else if(Xe.y=rt)return;De={x:rt,y:kr*rt+Hr}}else{if(!Xe)Xe={x:rt,y:kr*rt+Hr};else if(Xe.x=jt&&Hr.x<=Tr&&Hr.y>=wr&&Hr.y<=Wr?[[jt,Wr],[Tr,Wr],[Tr,wr],[jt,wr]]:[];rn.point=Ft[Mr]}),Ot}function yt(Ft){return Ft.map(function(Ot,jt){return{x:Math.round(Xe(Ot,jt)/pe)*pe,y:Math.round(Qe(Ot,jt)/pe)*pe,i:jt}})}return Tt.links=function(Ft){return jl(yt(Ft)).edges.filter(function(Ot){return Ot.l&&Ot.r}).map(function(Ot){return{source:Ft[Ot.l.i],target:Ft[Ot.r.i]}})},Tt.triangles=function(Ft){var Ot=[];return jl(yt(Ft)).cells.forEach(function(jt,wr){for(var Tr=jt.site,Wr=jt.edges.sort(zr),qr=-1,Mr=Wr.length,kr,Hr=Wr[Mr-1].edge,rn=Hr.l===Tr?Hr.r:Hr.l;++qron&&(on=jt.x),jt.y>Zr&&(Zr=jt.y),Wr.push(jt.x),qr.push(jt.y);else for(Mr=0;Mron&&(on=_n),Xn>Zr&&(Zr=Xn),Wr.push(_n),qr.push(Xn)}var ta=on-Hr,Wn=Zr-rn;ta>Wn?Zr=rn+ta:on=Hr+Wn;function Qn(ya,Sa,Za,Ai,qa,Hn,Da,pa){if(!(isNaN(Za)||isNaN(Ai)))if(ya.leaf){var Ba=ya.x,li=ya.y;if(Ba!=null)if(v(Ba-Za)+v(li-Ai)<.01)ra(ya,Sa,Za,Ai,qa,Hn,Da,pa);else{var ja=ya.point;ya.x=ya.y=ya.point=null,ra(ya,ja,Ba,li,qa,Hn,Da,pa),ra(ya,Sa,Za,Ai,qa,Hn,Da,pa)}else ya.x=Za,ya.y=Ai,ya.point=Sa}else ra(ya,Sa,Za,Ai,qa,Hn,Da,pa)}function ra(ya,Sa,Za,Ai,qa,Hn,Da,pa){var Ba=(qa+Da)*.5,li=(Hn+pa)*.5,ja=Za>=Ba,zi=Ai>=li,Fi=zi<<1|ja;ya.leaf=!1,ya=ya.nodes[Fi]||(ya.nodes[Fi]=$i()),ja?qa=Ba:Da=Ba,zi?Hn=li:pa=li,Qn(ya,Sa,Za,Ai,qa,Hn,Da,pa)}var Pa=$i();if(Pa.add=function(ya){Qn(Pa,ya,+wr(ya,++Mr),+Tr(ya,Mr),Hr,rn,on,Zr)},Pa.visit=function(ya){Ps(ya,Pa,Hr,rn,on,Zr)},Pa.find=function(ya){return Ll(Pa,ya[0],ya[1],Hr,rn,on,Zr)},Mr=-1,Me==null){for(;++Mrrt||Tr>Tt||Wr=_n,Wn=De>=Xn,Qn=Wn<<1|ta,ra=Qn+4;QnDe&&(rt=Me.slice(De,rt),yt[Tt]?yt[Tt]+=rt:yt[++Tt]=rt),(Xe=Xe[0])===(Qe=Qe[0])?yt[Tt]?yt[Tt]+=Qe:yt[++Tt]=Qe:(yt[++Tt]=null,Ft.push({i:Tt,x:Ti(Xe,Qe)})),De=Bi.lastIndex;return De=0&&!(Xe=o.interpolators[De](se,Me)););return Xe}o.interpolators=[function(se,Me){var De=typeof Me;return(De==="string"?sn.has(Me.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(Me)?xi:Ci:Me instanceof ct?xi:Array.isArray(Me)?fo:De==="object"&&isNaN(Me)?Rs:Ti)(se,Me)}],o.interpolateArray=fo;function fo(se,Me){var De=[],Xe=[],Qe=se.length,rt=Me.length,Tt=Math.min(se.length,Me.length),yt;for(yt=0;yt=0?se.slice(0,Me):se,Xe=Me>=0?se.slice(Me+1):"in";return De=io.get(De)||wu,Xe=nf.get(Xe)||z,_o(Xe(De.apply(null,L.call(arguments,1))))};function _o(se){return function(Me){return Me<=0?0:Me>=1?1:se(Me)}}function ki(se){return function(Me){return 1-se(1-Me)}}function Jl(se){return function(Me){return .5*(Me<.5?se(2*Me):2-se(2-2*Me))}}function es(se){return se*se}function zo(se){return se*se*se}function Ql(se){if(se<=0)return 0;if(se>=1)return 1;var Me=se*se,De=Me*se;return 4*(se<.5?De:3*(se-Me)+De-.75)}function Tu(se){return function(Me){return Math.pow(Me,se)}}function af(se){return 1-Math.cos(se*je)}function Pl(se){return Math.pow(2,10*(se-1))}function of(se){return 1-Math.sqrt(1-se*se)}function sf(se,Me){var De;return arguments.length<2&&(Me=.45),arguments.length?De=Me/ke*Math.asin(1/se):(se=1,De=Me/4),function(Xe){return 1+se*Math.pow(2,-10*Xe)*Math.sin((Xe-De)*ke/Me)}}function lf(se){return se||(se=1.70158),function(Me){return Me*Me*((se+1)*Me-se)}}function $l(se){return se<.36363636363636365?7.5625*se*se:se<.7272727272727273?7.5625*(se-=.5454545454545454)*se+.75:se<.9090909090909091?7.5625*(se-=.8181818181818182)*se+.9375:7.5625*(se-=.9545454545454546)*se+.984375}o.interpolateHcl=uf;function uf(se,Me){se=o.hcl(se),Me=o.hcl(Me);var De=se.h,Xe=se.c,Qe=se.l,rt=Me.h-De,Tt=Me.c-Xe,yt=Me.l-Qe;return isNaN(Tt)&&(Tt=0,Xe=isNaN(Xe)?Me.c:Xe),isNaN(rt)?(rt=0,De=isNaN(De)?Me.h:De):rt>180?rt-=360:rt<-180&&(rt+=360),function(Ft){return _t(De+rt*Ft,Xe+Tt*Ft,Qe+yt*Ft)+""}}o.interpolateHsl=ff;function ff(se,Me){se=o.hsl(se),Me=o.hsl(Me);var De=se.h,Xe=se.s,Qe=se.l,rt=Me.h-De,Tt=Me.s-Xe,yt=Me.l-Qe;return isNaN(Tt)&&(Tt=0,Xe=isNaN(Xe)?Me.s:Xe),isNaN(rt)?(rt=0,De=isNaN(De)?Me.h:De):rt>180?rt-=360:rt<-180&&(rt+=360),function(Ft){return bt(De+rt*Ft,Xe+Tt*Ft,Qe+yt*Ft)+""}}o.interpolateLab=Au;function Au(se,Me){se=o.lab(se),Me=o.lab(Me);var De=se.l,Xe=se.a,Qe=se.b,rt=Me.l-De,Tt=Me.a-Xe,yt=Me.b-Qe;return function(Ft){return Fe(De+rt*Ft,Xe+Tt*Ft,Qe+yt*Ft)+""}}o.interpolateRound=Mu;function Mu(se,Me){return Me-=se,function(De){return Math.round(se+Me*De)}}o.transform=function(se){var Me=d.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(De){if(De!=null){Me.setAttribute("transform",De);var Xe=Me.transform.baseVal.consolidate()}return new ds(Xe?Xe.matrix:Su)})(se)};function ds(se){var Me=[se.a,se.b],De=[se.c,se.d],Xe=el(Me),Qe=Is(Me,De),rt=el(tl(De,Me,-Qe))||0;Me[0]*De[1]180?Me+=360:Me-se>180&&(se+=360),Xe.push({i:De.push(Wo(De)+"rotate(",null,")")-2,x:Ti(se,Me)})):Me&&De.push(Wo(De)+"rotate("+Me+")")}function Eu(se,Me,De,Xe){se!==Me?Xe.push({i:De.push(Wo(De)+"skewX(",null,")")-2,x:Ti(se,Me)}):Me&&De.push(Wo(De)+"skewX("+Me+")")}function Cu(se,Me,De,Xe){if(se[0]!==Me[0]||se[1]!==Me[1]){var Qe=De.push(Wo(De)+"scale(",null,",",null,")");Xe.push({i:Qe-4,x:Ti(se[0],Me[0])},{i:Qe-2,x:Ti(se[1],Me[1])})}else(Me[0]!==1||Me[1]!==1)&&De.push(Wo(De)+"scale("+Me+")")}function Dl(se,Me){var De=[],Xe=[];return se=o.transform(se),Me=o.transform(Me),cf(se.translate,Me.translate,De,Xe),Rl(se.rotate,Me.rotate,De,Xe),Eu(se.skew,Me.skew,De,Xe),Cu(se.scale,Me.scale,De,Xe),se=Me=null,function(Qe){for(var rt=-1,Tt=Xe.length,yt;++rt0?rt=Zr:(De.c=null,De.t=NaN,De=null,Me.end({type:"end",alpha:rt=0})):Zr>0&&(Me.start({type:"start",alpha:rt=Zr}),De=Mn(se.tick)),se):rt},se.start=function(){var Zr,_n=Wr.length,Xn=qr.length,ta=Xe[0],Wn=Xe[1],Qn,ra;for(Zr=0;Zr<_n;++Zr)(ra=Wr[Zr]).index=Zr,ra.weight=0;for(Zr=0;Zr=0;)rt.push(jt=Ot[Ft]),jt.parent=yt,jt.depth=yt.depth+1;De&&(yt.value=0),yt.children=Ot}else De&&(yt.value=+De.call(Xe,yt,yt.depth)||0),delete yt.children;return vo(Qe,function(wr){var Tr,Wr;se&&(Tr=wr.children)&&Tr.sort(se),De&&(Wr=wr.parent)&&(Wr.value+=wr.value)}),Tt}return Xe.sort=function(Qe){return arguments.length?(se=Qe,Xe):se},Xe.children=function(Qe){return arguments.length?(Me=Qe,Xe):Me},Xe.value=function(Qe){return arguments.length?(De=Qe,Xe):De},Xe.revalue=function(Qe){return De&&(Fs(Qe,function(rt){rt.children&&(rt.value=0)}),vo(Qe,function(rt){var Tt;rt.children||(rt.value=+De.call(Xe,rt,rt.depth)||0),(Tt=rt.parent)&&(Tt.value+=rt.value)})),Qe},Xe};function zs(se,Me){return o.rebind(se,Me,"sort","children","value"),se.nodes=se,se.links=vf,se}function Fs(se,Me){for(var De=[se];(se=De.pop())!=null;)if(Me(se),(Qe=se.children)&&(Xe=Qe.length))for(var Xe,Qe;--Xe>=0;)De.push(Qe[Xe])}function vo(se,Me){for(var De=[se],Xe=[];(se=De.pop())!=null;)if(Xe.push(se),(Tt=se.children)&&(rt=Tt.length))for(var Qe=-1,rt,Tt;++QeQe&&(Qe=yt),Xe.push(yt)}for(Tt=0;TtXe&&(De=Me,Xe=Qe);return De}function Pu(se){return se.reduce(To,0)}function To(se,Me){return se+Me[1]}o.layout.histogram=function(){var se=!0,Me=Number,De=gs,Xe=Ru;function Qe(rt,Tr){for(var yt=[],Ft=rt.map(Me,this),Ot=De.call(this,Ft,Tr),jt=Xe.call(this,Ot,Ft,Tr),wr,Tr=-1,Wr=Ft.length,qr=jt.length-1,Mr=se?1:1/Wr,kr;++Tr0)for(Tr=-1;++Tr=Ot[0]&&kr<=Ot[1]&&(wr=yt[o.bisect(jt,kr,1,qr)-1],wr.y+=Mr,wr.push(rt[Tr]));return yt}return Qe.value=function(rt){return arguments.length?(Me=rt,Qe):Me},Qe.range=function(rt){return arguments.length?(De=Jr(rt),Qe):De},Qe.bins=function(rt){return arguments.length?(Xe=typeof rt=="number"?function(Tt){return au(Tt,rt)}:Jr(rt),Qe):Xe},Qe.frequency=function(rt){return arguments.length?(se=!!rt,Qe):se},Qe};function Ru(se,Me){return au(se,Math.ceil(Math.log(Me.length)/Math.LN2+1))}function au(se,Me){for(var De=-1,Xe=+se[0],Qe=(se[1]-Xe)/Me,rt=[];++De<=Me;)rt[De]=Qe*De+Xe;return rt}function gs(se){return[o.min(se),o.max(se)]}o.layout.pack=function(){var se=o.layout.hierarchy().sort(rs),Me=0,De=[1,1],Xe;function Qe(rt,Tt){var yt=se.call(this,rt,Tt),Ft=yt[0],Ot=De[0],jt=De[1],wr=Xe==null?Math.sqrt:typeof Xe=="function"?Xe:function(){return Xe};if(Ft.x=Ft.y=0,vo(Ft,function(Wr){Wr.r=+wr(Wr.value)}),vo(Ft,Ao),Me){var Tr=Me*(Xe?1:Math.max(2*Ft.r/Ot,2*Ft.r/jt))/2;vo(Ft,function(Wr){Wr.r+=Tr}),vo(Ft,Ao),vo(Ft,function(Wr){Wr.r-=Tr})}return ns(Ft,Ot/2,jt/2,Xe?1:1/Math.max(2*Ft.r/Ot,2*Ft.r/jt)),yt}return Qe.size=function(rt){return arguments.length?(De=rt,Qe):De},Qe.radius=function(rt){return arguments.length?(Xe=rt==null||typeof rt=="function"?rt:+rt,Qe):Xe},Qe.padding=function(rt){return arguments.length?(Me=+rt,Qe):Me},zs(Qe,se)};function rs(se,Me){return se.value-Me.value}function Ol(se,Me){var De=se._pack_next;se._pack_next=Me,Me._pack_prev=se,Me._pack_next=De,De._pack_prev=Me}function bi(se,Me){se._pack_next=Me,Me._pack_prev=se}function al(se,Me){var De=Me.x-se.x,Xe=Me.y-se.y,Qe=se.r+Me.r;return .999*Qe*Qe>De*De+Xe*Xe}function Ao(se){if(!(Me=se.children)||!(Tr=Me.length))return;var Me,De=1/0,Xe=-1/0,Qe=1/0,rt=-1/0,Tt,yt,Ft,Ot,jt,wr,Tr;function Wr(Zr){De=Math.min(Zr.x-Zr.r,De),Xe=Math.max(Zr.x+Zr.r,Xe),Qe=Math.min(Zr.y-Zr.r,Qe),rt=Math.max(Zr.y+Zr.r,rt)}if(Me.forEach(Yo),Tt=Me[0],Tt.x=-Tt.r,Tt.y=0,Wr(Tt),Tr>1&&(yt=Me[1],yt.x=yt.r,yt.y=0,Wr(yt),Tr>2))for(Ft=Me[2],Mo(Tt,yt,Ft),Wr(Ft),Ol(Tt,Ft),Tt._pack_prev=Ft,Ol(Ft,yt),yt=Tt._pack_next,Ot=3;Otkr.x&&(kr=_n),_n.depth>Hr.depth&&(Hr=_n)});var rn=Me(Mr,kr)/2-Mr.x,on=De[0]/(kr.x+Me(kr,Mr)/2+rn),Zr=De[1]/(Hr.depth||1);Fs(Wr,function(_n){_n.x=(_n.x+rn)*on,_n.y=_n.depth*Zr})}return Tr}function rt(jt){for(var wr={A:null,children:[jt]},Tr=[wr],Wr;(Wr=Tr.pop())!=null;)for(var qr=Wr.children,Mr,kr=0,Hr=qr.length;kr0&&(il(pf(Mr,jt,Tr),jt,_n),Hr+=_n,rn+=_n),on+=Mr.m,Hr+=Wr.m,Zr+=kr.m,rn+=qr.m;Mr&&!po(qr)&&(qr.t=Mr,qr.m+=on-rn),Wr&&!So(kr)&&(kr.t=Wr,kr.m+=Hr-Zr,Tr=jt)}return Tr}function Ot(jt){jt.x*=De[0],jt.y=jt.depth*De[1]}return Qe.separation=function(jt){return arguments.length?(Me=jt,Qe):Me},Qe.size=function(jt){return arguments.length?(Xe=(De=jt)==null?Ot:null,Qe):Xe?null:De},Qe.nodeSize=function(jt){return arguments.length?(Xe=(De=jt)==null?null:Ot,Qe):Xe?De:null},zs(Qe,se)};function Xo(se,Me){return se.parent==Me.parent?1:2}function So(se){var Me=se.children;return Me.length?Me[0]:se.t}function po(se){var Me=se.children,De;return(De=Me.length)?Me[De-1]:se.t}function il(se,Me,De){var Xe=De/(Me.i-se.i);Me.c-=Xe,Me.s+=De,se.c+=Xe,Me.z+=De,Me.m+=De}function df(se){for(var Me=0,De=0,Xe=se.children,Qe=Xe.length,rt;--Qe>=0;)rt=Xe[Qe],rt.z+=Me,rt.m+=Me,Me+=rt.s+(De+=rt.c)}function pf(se,Me,De){return se.a.parent===Me.parent?se.a:De}o.layout.cluster=function(){var se=o.layout.hierarchy().sort(null).value(null),Me=Xo,De=[1,1],Xe=!1;function Qe(rt,Tt){var yt=se.call(this,rt,Tt),Ft=yt[0],Ot,jt=0;vo(Ft,function(Mr){var kr=Mr.children;kr&&kr.length?(Mr.x=yf(kr),Mr.y=gf(kr)):(Mr.x=Ot?jt+=Me(Mr,Ot):0,Mr.y=0,Ot=Mr)});var wr=iu(Ft),Tr=Du(Ft),Wr=wr.x-Me(wr,Tr)/2,qr=Tr.x+Me(Tr,wr)/2;return vo(Ft,Xe?function(Mr){Mr.x=(Mr.x-Ft.x)*De[0],Mr.y=(Ft.y-Mr.y)*De[1]}:function(Mr){Mr.x=(Mr.x-Wr)/(qr-Wr)*De[0],Mr.y=(1-(Ft.y?Mr.y/Ft.y:1))*De[1]}),yt}return Qe.separation=function(rt){return arguments.length?(Me=rt,Qe):Me},Qe.size=function(rt){return arguments.length?(Xe=(De=rt)==null,Qe):Xe?null:De},Qe.nodeSize=function(rt){return arguments.length?(Xe=(De=rt)!=null,Qe):Xe?De:null},zs(Qe,se)};function gf(se){return 1+o.max(se,function(Me){return Me.y})}function yf(se){return se.reduce(function(Me,De){return Me+De.x},0)/se.length}function iu(se){var Me=se.children;return Me&&Me.length?iu(Me[0]):se}function Du(se){var Me=se.children,De;return Me&&(De=Me.length)?Du(Me[De-1]):se}o.layout.treemap=function(){var se=o.layout.hierarchy(),Me=Math.round,De=[1,1],Xe=null,Qe=Ns,rt=!1,Tt,yt="squarify",Ft=.5*(1+Math.sqrt(5));function Ot(Mr,kr){for(var Hr=-1,rn=Mr.length,on,Zr;++Hr0;)rn.push(Zr=on[Wn-1]),rn.area+=Zr.area,yt!=="squarify"||(Xn=Tr(rn,ta))<=_n?(on.pop(),_n=Xn):(rn.area-=rn.pop().area,Wr(rn,ta,Hr,!1),ta=Math.min(Hr.dx,Hr.dy),rn.length=rn.area=0,_n=1/0);rn.length&&(Wr(rn,ta,Hr,!0),rn.length=rn.area=0),kr.forEach(jt)}}function wr(Mr){var kr=Mr.children;if(kr&&kr.length){var Hr=Qe(Mr),rn=kr.slice(),on,Zr=[];for(Ot(rn,Hr.dx*Hr.dy/Mr.value),Zr.area=0;on=rn.pop();)Zr.push(on),Zr.area+=on.area,on.z!=null&&(Wr(Zr,on.z?Hr.dx:Hr.dy,Hr,!rn.length),Zr.length=Zr.area=0);kr.forEach(wr)}}function Tr(Mr,kr){for(var Hr=Mr.area,rn,on=0,Zr=1/0,_n=-1,Xn=Mr.length;++_non&&(on=rn));return Hr*=Hr,kr*=kr,Hr?Math.max(kr*on*Ft/Hr,Hr/(kr*Zr*Ft)):1/0}function Wr(Mr,kr,Hr,rn){var on=-1,Zr=Mr.length,_n=Hr.x,Xn=Hr.y,ta=kr?Me(Mr.area/kr):0,Wn;if(kr==Hr.dx){for((rn||ta>Hr.dy)&&(ta=Hr.dy);++onHr.dx)&&(ta=Hr.dx);++on1);return se+Me*Xe*Math.sqrt(-2*Math.log(rt)/rt)}},logNormal:function(){var se=o.random.normal.apply(o,arguments);return function(){return Math.exp(se())}},bates:function(se){var Me=o.random.irwinHall(se);return function(){return Me()/se}},irwinHall:function(se){return function(){for(var Me=0,De=0;De2?ku:Iu,Ot=Xe?ks:bo;return Qe=Ft(se,Me,Ot,De),rt=Ft(Me,se,Ot,Ni),yt}function yt(Ft){return Qe(Ft)}return yt.invert=function(Ft){return rt(Ft)},yt.domain=function(Ft){return arguments.length?(se=Ft.map(Number),Tt()):se},yt.range=function(Ft){return arguments.length?(Me=Ft,Tt()):Me},yt.rangeRound=function(Ft){return yt.range(Ft).interpolate(Mu)},yt.clamp=function(Ft){return arguments.length?(Xe=Ft,Tt()):Xe},yt.interpolate=function(Ft){return arguments.length?(De=Ft,Tt()):De},yt.ticks=function(Ft){return Eo(se,Ft)},yt.tickFormat=function(Ft,Ot){return d3_scale_linearTickFormat(se,Ft,Ot)},yt.nice=function(Ft){return zu(se,Ft),Tt()},yt.copy=function(){return _u(se,Me,De,Xe)},Tt()}function ou(se,Me){return o.rebind(se,Me,"range","rangeRound","interpolate","clamp")}function zu(se,Me){return ol(se,Zo(qi(se,Me)[2])),ol(se,Zo(qi(se,Me)[2])),se}function qi(se,Me){Me==null&&(Me=10);var De=co(se),Xe=De[1]-De[0],Qe=Math.pow(10,Math.floor(Math.log(Xe/Me)/Math.LN10)),rt=Me/Xe*Qe;return rt<=.15?Qe*=10:rt<=.35?Qe*=5:rt<=.75&&(Qe*=2),De[0]=Math.ceil(De[0]/Qe)*Qe,De[1]=Math.floor(De[1]/Qe)*Qe+Qe*.5,De[2]=Qe,De}function Eo(se,Me){return o.range.apply(o,qi(se,Me))}o.scale.log=function(){return as(o.scale.linear().domain([0,1]),10,!0,[1,10])};function as(se,Me,De,Xe){function Qe(yt){return(De?Math.log(yt<0?0:yt):-Math.log(yt>0?0:-yt))/Math.log(Me)}function rt(yt){return De?Math.pow(Me,yt):-Math.pow(Me,-yt)}function Tt(yt){return se(Qe(yt))}return Tt.invert=function(yt){return rt(se.invert(yt))},Tt.domain=function(yt){return arguments.length?(De=yt[0]>=0,se.domain((Xe=yt.map(Number)).map(Qe)),Tt):Xe},Tt.base=function(yt){return arguments.length?(Me=+yt,se.domain(Xe.map(Qe)),Tt):Me},Tt.nice=function(){var yt=ol(Xe.map(Qe),De?Math:Vs);return se.domain(yt),Xe=yt.map(rt),Tt},Tt.ticks=function(){var yt=co(Xe),Ft=[],Ot=yt[0],jt=yt[1],wr=Math.floor(Qe(Ot)),Tr=Math.ceil(Qe(jt)),Wr=Me%1?2:Me;if(isFinite(Tr-wr)){if(De){for(;wr0;qr--)Ft.push(rt(wr)*qr);for(wr=0;Ft[wr]jt;Tr--);Ft=Ft.slice(wr,Tr)}return Ft},Tt.copy=function(){return as(se.copy(),Me,De,Xe)},ou(Tt,se)}var Vs={floor:function(se){return-Math.ceil(-se)},ceil:function(se){return-Math.floor(-se)}};o.scale.pow=function(){return Bl(o.scale.linear(),1,[0,1])};function Bl(se,Me,De){var Xe=ms(Me),Qe=ms(1/Me);function rt(Tt){return se(Xe(Tt))}return rt.invert=function(Tt){return Qe(se.invert(Tt))},rt.domain=function(Tt){return arguments.length?(se.domain((De=Tt.map(Number)).map(Xe)),rt):De},rt.ticks=function(Tt){return Eo(De,Tt)},rt.tickFormat=function(Tt,yt){return d3_scale_linearTickFormat(De,Tt,yt)},rt.nice=function(Tt){return rt.domain(zu(De,Tt))},rt.exponent=function(Tt){return arguments.length?(Xe=ms(Me=Tt),Qe=ms(1/Me),se.domain(De.map(Xe)),rt):Me},rt.copy=function(){return Bl(se.copy(),Me,De)},ou(rt,se)}function ms(se){return function(Me){return Me<0?-Math.pow(-Me,se):Math.pow(Me,se)}}o.scale.sqrt=function(){return o.scale.pow().exponent(.5)},o.scale.ordinal=function(){return xs([],{t:"range",a:[[]]})};function xs(se,Me){var De,Xe,Qe;function rt(yt){return Xe[((De.get(yt)||(Me.t==="range"?De.set(yt,se.push(yt)):NaN))-1)%Xe.length]}function Tt(yt,Ft){return o.range(se.length).map(function(Ot){return yt+Ft*Ot})}return rt.domain=function(yt){if(!arguments.length)return se;se=[],De=new E;for(var Ft=-1,Ot=yt.length,jt;++Ft0?De[rt-1]:se[0],rtTr?0:1;if(jt=Ve)return Ft(jt,qr)+(Ot?Ft(Ot,1-qr):"")+"Z";var Mr,kr,Hr,rn,on=0,Zr=0,_n,Xn,ta,Wn,Qn,ra,Pa,ya,Sa=[];if((rn=(+Tt.apply(this,arguments)||0)/2)&&(Hr=Xe===Nl?Math.sqrt(Ot*Ot+jt*jt):+Xe.apply(this,arguments),qr||(Zr*=-1),jt&&(Zr=Vt(Hr/jt*Math.sin(rn))),Ot&&(on=Vt(Hr/Ot*Math.sin(rn)))),jt){_n=jt*Math.cos(wr+Zr),Xn=jt*Math.sin(wr+Zr),ta=jt*Math.cos(Tr-Zr),Wn=jt*Math.sin(Tr-Zr);var Za=Math.abs(Tr-wr-2*Zr)<=be?0:1;if(Zr&&ul(_n,Xn,ta,Wn)===qr^Za){var Ai=(wr+Tr)/2;_n=jt*Math.cos(Ai),Xn=jt*Math.sin(Ai),ta=Wn=null}}else _n=Xn=0;if(Ot){Qn=Ot*Math.cos(Tr-on),ra=Ot*Math.sin(Tr-on),Pa=Ot*Math.cos(wr+on),ya=Ot*Math.sin(wr+on);var qa=Math.abs(wr-Tr+2*on)<=be?0:1;if(on&&ul(Qn,ra,Pa,ya)===1-qr^qa){var Hn=(wr+Tr)/2;Qn=Ot*Math.cos(Hn),ra=Ot*Math.sin(Hn),Pa=ya=null}}else Qn=ra=0;if(Wr>pe&&(Mr=Math.min(Math.abs(jt-Ot)/2,+De.apply(this,arguments)))>.001){kr=Ot0?0:1}function fl(se,Me,De,Xe,Qe){var rt=se[0]-Me[0],Tt=se[1]-Me[1],yt=(Qe?Xe:-Xe)/Math.sqrt(rt*rt+Tt*Tt),Ft=yt*Tt,Ot=-yt*rt,jt=se[0]+Ft,wr=se[1]+Ot,Tr=Me[0]+Ft,Wr=Me[1]+Ot,qr=(jt+Tr)/2,Mr=(wr+Wr)/2,kr=Tr-jt,Hr=Wr-wr,rn=kr*kr+Hr*Hr,on=De-Xe,Zr=jt*Wr-Tr*wr,_n=(Hr<0?-1:1)*Math.sqrt(Math.max(0,on*on*rn-Zr*Zr)),Xn=(Zr*Hr-kr*_n)/rn,ta=(-Zr*kr-Hr*_n)/rn,Wn=(Zr*Hr+kr*_n)/rn,Qn=(-Zr*kr+Hr*_n)/rn,ra=Xn-qr,Pa=ta-Mr,ya=Wn-qr,Sa=Qn-Mr;return ra*ra+Pa*Pa>ya*ya+Sa*Sa&&(Xn=Wn,ta=Qn),[[Xn-Ft,ta-Ot],[Xn*De/on,ta*De/on]]}function os(){return!0}function cl(se){var Me=na,De=Jn,Xe=os,Qe=Li,rt=Qe.key,Tt=.7;function yt(Ft){var Ot=[],jt=[],wr=-1,Tr=Ft.length,Wr,qr=Jr(Me),Mr=Jr(De);function kr(){Ot.push("M",Qe(se(jt),Tt))}for(;++wr1?se.join("L"):se+"Z"}function Oo(se){return se.join("L")+"Z"}function lu(se){for(var Me=0,De=se.length,Xe=se[0],Qe=[Xe[0],",",Xe[1]];++Me1&&Qe.push("H",Xe[0]),Qe.join("")}function bs(se){for(var Me=0,De=se.length,Xe=se[0],Qe=[Xe[0],",",Xe[1]];++Me1){yt=Me[1],rt=se[Ft],Ft++,Xe+="C"+(Qe[0]+Tt[0])+","+(Qe[1]+Tt[1])+","+(rt[0]-yt[0])+","+(rt[1]-yt[1])+","+rt[0]+","+rt[1];for(var Ot=2;Ot9&&(rt=De*3/Math.sqrt(rt),Tt[yt]=rt*Xe,Tt[yt+1]=rt*Qe));for(yt=-1;++yt<=Ft;)rt=(se[Math.min(Ft,yt+1)][0]-se[Math.max(0,yt-1)][0])/(6*(1+Tt[yt]*Tt[yt])),Me.push([rt||0,Tt[yt]*rt||0]);return Me}function Gl(se){return se.length<3?Li(se):se[0]+ji(se,yl(se))}o.svg.line.radial=function(){var se=cl(Uu);return se.radius=se.x,delete se.x,se.angle=se.y,delete se.y,se};function Uu(se){for(var Me,De=-1,Xe=se.length,Qe,rt;++Debe)+",1 "+wr}function Ot(jt,wr,Tr,Wr){return"Q 0,0 "+Wr}return rt.radius=function(jt){return arguments.length?(De=Jr(jt),rt):De},rt.source=function(jt){return arguments.length?(se=Jr(jt),rt):se},rt.target=function(jt){return arguments.length?(Me=Jr(jt),rt):Me},rt.startAngle=function(jt){return arguments.length?(Xe=Jr(jt),rt):Xe},rt.endAngle=function(jt){return arguments.length?(Qe=Jr(jt),rt):Qe},rt};function cu(se){return se.radius}o.svg.diagonal=function(){var se=fu,Me=ws,De=xl;function Xe(Qe,rt){var Tt=se.call(this,Qe,rt),yt=Me.call(this,Qe,rt),Ft=(Tt.y+yt.y)/2,Ot=[Tt,{x:Tt.x,y:Ft},{x:yt.x,y:Ft},yt];return Ot=Ot.map(De),"M"+Ot[0]+"C"+Ot[1]+" "+Ot[2]+" "+Ot[3]}return Xe.source=function(Qe){return arguments.length?(se=Jr(Qe),Xe):se},Xe.target=function(Qe){return arguments.length?(Me=Jr(Qe),Xe):Me},Xe.projection=function(Qe){return arguments.length?(De=Qe,Xe):De},Xe};function xl(se){return[se.x,se.y]}o.svg.diagonal.radial=function(){var se=o.svg.diagonal(),Me=xl,De=se.projection;return se.projection=function(Xe){return arguments.length?De(Vu(Me=Xe)):Me},se};function Vu(se){return function(){var Me=se.apply(this,arguments),De=Me[0],Xe=Me[1]-je;return[De*Math.cos(Xe),De*Math.sin(Xe)]}}o.svg.symbol=function(){var se=$e,Me=We;function De(Xe,Qe){return(pt.get(se.call(this,Xe,Qe))||ft)(Me.call(this,Xe,Qe))}return De.type=function(Xe){return arguments.length?(se=Jr(Xe),De):se},De.size=function(Xe){return arguments.length?(Me=Jr(Xe),De):Me},De};function We(){return 64}function $e(){return"circle"}function ft(se){var Me=Math.sqrt(se/be);return"M0,"+Me+"A"+Me+","+Me+" 0 1,1 0,"+-Me+"A"+Me+","+Me+" 0 1,1 0,"+Me+"Z"}var pt=o.map({circle:ft,cross:function(se){var Me=Math.sqrt(se/5)/2;return"M"+-3*Me+","+-Me+"H"+-Me+"V"+-3*Me+"H"+Me+"V"+-Me+"H"+3*Me+"V"+Me+"H"+Me+"V"+3*Me+"H"+-Me+"V"+Me+"H"+-3*Me+"Z"},diamond:function(se){var Me=Math.sqrt(se/(2*St)),De=Me*St;return"M0,"+-Me+"L"+De+",0 0,"+Me+" "+-De+",0Z"},square:function(se){var Me=Math.sqrt(se)/2;return"M"+-Me+","+-Me+"L"+Me+","+-Me+" "+Me+","+Me+" "+-Me+","+Me+"Z"},"triangle-down":function(se){var Me=Math.sqrt(se/Pt),De=Me*Pt/2;return"M0,"+De+"L"+Me+","+-De+" "+-Me+","+-De+"Z"},"triangle-up":function(se){var Me=Math.sqrt(se/Pt),De=Me*Pt/2;return"M0,"+-De+"L"+Me+","+De+" "+-Me+","+De+"Z"}});o.svg.symbolTypes=pt.keys();var Pt=Math.sqrt(3),St=Math.tan(30*at);Y.transition=function(se){for(var Me=Er||++mr,De=An(se),Xe=[],Qe,rt,Tt=Ir||{time:Date.now(),ease:Ql,delay:0,duration:250},yt=-1,Ft=this.length;++yt0;)wr[--rn].call(se,Hr);if(kr>=1)return Tt.event&&Tt.event.end.call(se,se.__data__,Me),--rt.count?delete rt[Xe]:delete se[De],1}Tt||(yt=Qe.time,Ft=Mn(Tr,0,yt),Tt=rt[Xe]={tween:new E,time:yt,timer:Ft,delay:Qe.delay,duration:Qe.duration,ease:Qe.ease,index:Me},Qe=null,++rt.count)}o.svg.axis=function(){var se=o.scale.linear(),Me=Un,De=6,Xe=6,Qe=3,rt=[10],Tt=null,yt;function Ft(Ot){Ot.each(function(){var jt=o.select(this),wr=this.__chart__||se,Tr=this.__chart__=se.copy(),Wr=Tt??(Tr.ticks?Tr.ticks.apply(Tr,rt):Tr.domain()),qr=yt??(Tr.tickFormat?Tr.tickFormat.apply(Tr,rt):z),Mr=jt.selectAll(".tick").data(Wr,Tr),kr=Mr.enter().insert("g",".domain").attr("class","tick").style("opacity",pe),Hr=o.transition(Mr.exit()).style("opacity",pe).remove(),rn=o.transition(Mr.order()).style("opacity",1),on=Math.max(De,0)+Qe,Zr,_n=Us(Tr),Xn=jt.selectAll(".domain").data([0]),ta=(Xn.enter().append("path").attr("class","domain"),o.transition(Xn));kr.append("line"),kr.append("text");var Wn=kr.select("line"),Qn=rn.select("line"),ra=Mr.select("text").text(qr),Pa=kr.select("text"),ya=rn.select("text"),Sa=Me==="top"||Me==="left"?-1:1,Za,Ai,qa,Hn;if(Me==="bottom"||Me==="top"?(Zr=Ta,Za="x",qa="y",Ai="x2",Hn="y2",ra.attr("dy",Sa<0?"0em":".71em").style("text-anchor","middle"),ta.attr("d","M"+_n[0]+","+Sa*Xe+"V0H"+_n[1]+"V"+Sa*Xe)):(Zr=Aa,Za="y",qa="x",Ai="y2",Hn="x2",ra.attr("dy",".32em").style("text-anchor",Sa<0?"end":"start"),ta.attr("d","M"+Sa*Xe+","+_n[0]+"H0V"+_n[1]+"H"+Sa*Xe)),Wn.attr(Hn,Sa*De),Pa.attr(qa,Sa*on),Qn.attr(Ai,0).attr(Hn,Sa*De),ya.attr(Za,0).attr(qa,Sa*on),Tr.rangeBand){var Da=Tr,pa=Da.rangeBand()/2;wr=Tr=function(Ba){return Da(Ba)+pa}}else wr.rangeBand?wr=Tr:Hr.call(Zr,Tr,wr);kr.call(Zr,wr,Tr),rn.call(Zr,Tr,Tr)})}return Ft.scale=function(Ot){return arguments.length?(se=Ot,Ft):se},Ft.orient=function(Ot){return arguments.length?(Me=Ot in wa?Ot+"":Un,Ft):Me},Ft.ticks=function(){return arguments.length?(rt=M(arguments),Ft):rt},Ft.tickValues=function(Ot){return arguments.length?(Tt=Ot,Ft):Tt},Ft.tickFormat=function(Ot){return arguments.length?(yt=Ot,Ft):yt},Ft.tickSize=function(Ot){var jt=arguments.length;return jt?(De=+Ot,Xe=+arguments[jt-1],Ft):De},Ft.innerTickSize=function(Ot){return arguments.length?(De=+Ot,Ft):De},Ft.outerTickSize=function(Ot){return arguments.length?(Xe=+Ot,Ft):Xe},Ft.tickPadding=function(Ot){return arguments.length?(Qe=+Ot,Ft):Qe},Ft.tickSubdivide=function(){return arguments.length&&Ft},Ft};var Un="bottom",wa={top:1,right:1,bottom:1,left:1};function Ta(se,Me,De){se.attr("transform",function(Xe){var Qe=Me(Xe);return"translate("+(isFinite(Qe)?Qe:De(Xe))+",0)"})}function Aa(se,Me,De){se.attr("transform",function(Xe){var Qe=Me(Xe);return"translate(0,"+(isFinite(Qe)?Qe:De(Xe))+")"})}o.svg.brush=function(){var se=Z(jt,"brushstart","brush","brushend"),Me=null,De=null,Xe=[0,0],Qe=[0,0],rt,Tt,yt=!0,Ft=!0,Ot=Oa[0];function jt(Mr){Mr.each(function(){var kr=o.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",qr).on("touchstart.brush",qr),Hr=kr.selectAll(".background").data([0]);Hr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),kr.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var rn=kr.selectAll(".resize").data(Ot,z);rn.exit().remove(),rn.enter().append("g").attr("class",function(Xn){return"resize "+Xn}).style("cursor",function(Xn){return Ca[Xn]}).append("rect").attr("x",function(Xn){return/[ew]$/.test(Xn)?-3:null}).attr("y",function(Xn){return/^[ns]/.test(Xn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),rn.style("display",jt.empty()?"none":null);var on=o.transition(kr),Zr=o.transition(Hr),_n;Me&&(_n=Us(Me),Zr.attr("x",_n[0]).attr("width",_n[1]-_n[0]),Tr(on)),De&&(_n=Us(De),Zr.attr("y",_n[0]).attr("height",_n[1]-_n[0]),Wr(on)),wr(on)})}jt.event=function(Mr){Mr.each(function(){var kr=se.of(this,arguments),Hr={x:Xe,y:Qe,i:rt,j:Tt},rn=this.__chart__||Hr;this.__chart__=Hr,Er?o.select(this).transition().each("start.brush",function(){rt=rn.i,Tt=rn.j,Xe=rn.x,Qe=rn.y,kr({type:"brushstart"})}).tween("brush:brush",function(){var on=fo(Xe,Hr.x),Zr=fo(Qe,Hr.y);return rt=Tt=null,function(_n){Xe=Hr.x=on(_n),Qe=Hr.y=Zr(_n),kr({type:"brush",mode:"resize"})}}).each("end.brush",function(){rt=Hr.i,Tt=Hr.j,kr({type:"brush",mode:"resize"}),kr({type:"brushend"})}):(kr({type:"brushstart"}),kr({type:"brush",mode:"resize"}),kr({type:"brushend"}))})};function wr(Mr){Mr.selectAll(".resize").attr("transform",function(kr){return"translate("+Xe[+/e$/.test(kr)]+","+Qe[+/^s/.test(kr)]+")"})}function Tr(Mr){Mr.select(".extent").attr("x",Xe[0]),Mr.selectAll(".extent,.n>rect,.s>rect").attr("width",Xe[1]-Xe[0])}function Wr(Mr){Mr.select(".extent").attr("y",Qe[0]),Mr.selectAll(".extent,.e>rect,.w>rect").attr("height",Qe[1]-Qe[0])}function qr(){var Mr=this,kr=o.select(o.event.target),Hr=se.of(Mr,arguments),rn=o.select(Mr),on=kr.datum(),Zr=!/^(n|s)$/.test(on)&&Me,_n=!/^(e|w)$/.test(on)&&De,Xn=kr.classed("extent"),ta=He(Mr),Wn,Qn=o.mouse(Mr),ra,Pa=o.select(r(Mr)).on("keydown.brush",Za).on("keyup.brush",Ai);if(o.event.changedTouches?Pa.on("touchmove.brush",qa).on("touchend.brush",Da):Pa.on("mousemove.brush",qa).on("mouseup.brush",Da),rn.interrupt().selectAll("*").interrupt(),Xn)Qn[0]=Xe[0]-Qn[0],Qn[1]=Qe[0]-Qn[1];else if(on){var ya=+/w$/.test(on),Sa=+/^n/.test(on);ra=[Xe[1-ya]-Qn[0],Qe[1-Sa]-Qn[1]],Qn[0]=Xe[ya],Qn[1]=Qe[Sa]}else o.event.altKey&&(Wn=Qn.slice());rn.style("pointer-events","none").selectAll(".resize").style("display",null),o.select("body").style("cursor",kr.style("cursor")),Hr({type:"brushstart"}),qa();function Za(){o.event.keyCode==32&&(Xn||(Wn=null,Qn[0]-=Xe[1],Qn[1]-=Qe[1],Xn=2),q())}function Ai(){o.event.keyCode==32&&Xn==2&&(Qn[0]+=Xe[1],Qn[1]+=Qe[1],Xn=0,q())}function qa(){var pa=o.mouse(Mr),Ba=!1;ra&&(pa[0]+=ra[0],pa[1]+=ra[1]),Xn||(o.event.altKey?(Wn||(Wn=[(Xe[0]+Xe[1])/2,(Qe[0]+Qe[1])/2]),Qn[0]=Xe[+(pa[0]"u"&&(R=1e-6);var U,ee,ue,xe,Ee;for(ue=D,Ee=0;Ee<8;Ee++){if(xe=this.sampleCurveX(ue)-D,Math.abs(xe)ee)return ee;for(;Uxe?U=ue:ee=ue,ue=(ee-U)*.5+U}return ue},g.prototype.solve=function(D,R){return this.sampleCurveY(this.solveCurveX(D,R))};var r=t;function t(D,R){this.x=D,this.y=R}t.prototype={clone:function(){return new t(this.x,this.y)},add:function(D){return this.clone()._add(D)},sub:function(D){return this.clone()._sub(D)},multByPoint:function(D){return this.clone()._multByPoint(D)},divByPoint:function(D){return this.clone()._divByPoint(D)},mult:function(D){return this.clone()._mult(D)},div:function(D){return this.clone()._div(D)},rotate:function(D){return this.clone()._rotate(D)},rotateAround:function(D,R){return this.clone()._rotateAround(D,R)},matMult:function(D){return this.clone()._matMult(D)},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(D){return this.x===D.x&&this.y===D.y},dist:function(D){return Math.sqrt(this.distSqr(D))},distSqr:function(D){var R=D.x-this.x,U=D.y-this.y;return R*R+U*U},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(D){return Math.atan2(this.y-D.y,this.x-D.x)},angleWith:function(D){return this.angleWithSep(D.x,D.y)},angleWithSep:function(D,R){return Math.atan2(this.x*R-this.y*D,this.x*D+this.y*R)},_matMult:function(D){var R=D[0]*this.x+D[1]*this.y,U=D[2]*this.x+D[3]*this.y;return this.x=R,this.y=U,this},_add:function(D){return this.x+=D.x,this.y+=D.y,this},_sub:function(D){return this.x-=D.x,this.y-=D.y,this},_mult:function(D){return this.x*=D,this.y*=D,this},_div:function(D){return this.x/=D,this.y/=D,this},_multByPoint:function(D){return this.x*=D.x,this.y*=D.y,this},_divByPoint:function(D){return this.x/=D.x,this.y/=D.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var D=this.y;return this.y=this.x,this.x=-D,this},_rotate:function(D){var R=Math.cos(D),U=Math.sin(D),ee=R*this.x-U*this.y,ue=U*this.x+R*this.y;return this.x=ee,this.y=ue,this},_rotateAround:function(D,R){var U=Math.cos(D),ee=Math.sin(D),ue=R.x+U*(this.x-R.x)-ee*(this.y-R.y),xe=R.y+ee*(this.x-R.x)+U*(this.y-R.y);return this.x=ue,this.y=xe,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},t.convert=function(D){return D instanceof t?D:Array.isArray(D)?new t(D[0],D[1]):D};var s=typeof self<"u"?self:{};function a(D,R){if(Array.isArray(D)){if(!Array.isArray(R)||D.length!==R.length)return!1;for(var U=0;U=1)return 1;var R=D*D,U=R*D;return 4*(D<.5?U:3*(D-R)+U-.75)}function l(D,R,U,ee){var ue=new d(D,R,U,ee);return function(xe){return ue.solve(xe)}}var y=l(.25,.1,.25,1);function h(D,R,U){return Math.min(U,Math.max(R,D))}function T(D,R,U){var ee=U-R,ue=((D-R)%ee+ee)%ee+R;return ue===R?U:ue}function f(D,R,U){if(!D.length)return U(null,[]);var ee=D.length,ue=new Array(D.length),xe=null;D.forEach(function(Ee,Ye){R(Ee,function(ot,mt){ot&&(xe=ot),ue[Ye]=mt,--ee===0&&U(xe,ue)})})}function n(D){var R=[];for(var U in D)R.push(D[U]);return R}function v(D,R){var U=[];for(var ee in D)ee in R||U.push(ee);return U}function m(D){for(var R=[],U=arguments.length-1;U-- >0;)R[U]=arguments[U+1];for(var ee=0,ue=R;ee>R/4).toString(16):([1e7]+-[1e3]+-4e3+-8e3+-1e11).replace(/[018]/g,D)}return D()}function w(D){return D<=1?1:Math.pow(2,Math.ceil(Math.log(D)/Math.LN2))}function i(D){return D?/^[0-9a-f]{8}-[0-9a-f]{4}-[4][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(D):!1}function C(D,R){D.forEach(function(U){R[U]&&(R[U]=R[U].bind(R))})}function x(D,R){return D.indexOf(R,D.length-R.length)!==-1}function k(D,R,U){var ee={};for(var ue in D)ee[ue]=R.call(U||this,D[ue],ue,D);return ee}function I(D,R,U){var ee={};for(var ue in D)R.call(U||this,D[ue],ue,D)&&(ee[ue]=D[ue]);return ee}function B(D){return Array.isArray(D)?D.map(B):typeof D=="object"&&D?k(D,B):D}function _(D,R){for(var U=0;U=0)return!0;return!1}var z={};function O(D){z[D]||(typeof console<"u"&&console.warn(D),z[D]=!0)}function F(D,R,U){return(U.y-D.y)*(R.x-D.x)>(R.y-D.y)*(U.x-D.x)}function N(D){for(var R=0,U=0,ee=D.length,ue=ee-1,xe=void 0,Ee=void 0;U@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,U={};if(D.replace(R,function(ue,xe,Ee,Ye){var ot=Ee||Ye;return U[xe]=ot?ot.toLowerCase():!0,""}),U["max-age"]){var ee=parseInt(U["max-age"],10);isNaN(ee)?delete U["max-age"]:U["max-age"]=ee}return U}var q=null;function oe(D){if(q==null){var R=D.navigator?D.navigator.userAgent:null;q=!!D.safari||!!(R&&(/\b(iPad|iPhone|iPod)\b/.test(R)||R.match("Safari")&&!R.match("Chrome")))}return q}function Z(D){try{var R=s[D];return R.setItem("_mapbox_test_",1),R.removeItem("_mapbox_test_"),!0}catch{return!1}}function G(D){return s.btoa(encodeURIComponent(D).replace(/%([0-9A-F]{2})/g,function(R,U){return String.fromCharCode(+("0x"+U))}))}function re(D){return decodeURIComponent(s.atob(D).split("").map(function(R){return"%"+("00"+R.charCodeAt(0).toString(16)).slice(-2)}).join(""))}var H=s.performance&&s.performance.now?s.performance.now.bind(s.performance):Date.now.bind(Date),J=s.requestAnimationFrame||s.mozRequestAnimationFrame||s.webkitRequestAnimationFrame||s.msRequestAnimationFrame,ae=s.cancelAnimationFrame||s.mozCancelAnimationFrame||s.webkitCancelAnimationFrame||s.msCancelAnimationFrame,K,Y,ie={now:H,frame:function(R){var U=J(R);return{cancel:function(){return ae(U)}}},getImageData:function(R,U){U===void 0&&(U=0);var ee=s.document.createElement("canvas"),ue=ee.getContext("2d");if(!ue)throw new Error("failed to create canvas 2d context");return ee.width=R.width,ee.height=R.height,ue.drawImage(R,0,0,R.width,R.height),ue.getImageData(-U,-U,R.width+2*U,R.height+2*U)},resolveURL:function(R){return K||(K=s.document.createElement("a")),K.href=R,K.href},hardwareConcurrency:s.navigator&&s.navigator.hardwareConcurrency||4,get devicePixelRatio(){return s.devicePixelRatio},get prefersReducedMotion(){return s.matchMedia?(Y==null&&(Y=s.matchMedia("(prefers-reduced-motion: reduce)")),Y.matches):!1}},ne={API_URL:"https://api.mapbox.com",get EVENTS_URL(){return this.API_URL?this.API_URL.indexOf("https://api.mapbox.cn")===0?"https://events.mapbox.cn/events/v2":this.API_URL.indexOf("https://api.mapbox.com")===0?"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},le={supported:!1,testSupport:ve},de,we=!1,me,Le=!1;s.document&&(me=s.document.createElement("img"),me.onload=function(){de&&Ae(de),de=null,Le=!0},me.onerror=function(){we=!0,de=null},me.src="data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAQAAAAfQ//73v/+BiOh/AAA=");function ve(D){we||!me||(Le?Ae(D):de=D)}function Ae(D){var R=D.createTexture();D.bindTexture(D.TEXTURE_2D,R);try{if(D.texImage2D(D.TEXTURE_2D,0,D.RGBA,D.RGBA,D.UNSIGNED_BYTE,me),D.isContextLost())return;le.supported=!0}catch{}D.deleteTexture(R),we=!0}var ye="01";function Se(){for(var D="1",R="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ",U="",ee=0;ee<10;ee++)U+=R[Math.floor(Math.random()*62)];var ue=12*60*60*1e3,xe=[D,ye,U].join(""),Ee=Date.now()+ue;return{token:xe,tokenExpiresAt:Ee}}var _e=function(R,U){this._transformRequestFn=R,this._customAccessToken=U,this._createSkuToken()};_e.prototype._createSkuToken=function(){var R=Se();this._skuToken=R.token,this._skuTokenExpiresAt=R.tokenExpiresAt},_e.prototype._isSkuTokenExpired=function(){return Date.now()>this._skuTokenExpiresAt},_e.prototype.transformRequest=function(R,U){return this._transformRequestFn?this._transformRequestFn(R,U)||{url:R}:{url:R}},_e.prototype.normalizeStyleURL=function(R,U){if(!ze(R))return R;var ee=Ke(R);return ee.path="/styles/v1"+ee.path,this._makeAPIURL(ee,this._customAccessToken||U)},_e.prototype.normalizeGlyphsURL=function(R,U){if(!ze(R))return R;var ee=Ke(R);return ee.path="/fonts/v1"+ee.path,this._makeAPIURL(ee,this._customAccessToken||U)},_e.prototype.normalizeSourceURL=function(R,U){if(!ze(R))return R;var ee=Ke(R);return ee.path="/v4/"+ee.authority+".json",ee.params.push("secure"),this._makeAPIURL(ee,this._customAccessToken||U)},_e.prototype.normalizeSpriteURL=function(R,U,ee,ue){var xe=Ke(R);return ze(R)?(xe.path="/styles/v1"+xe.path+"/sprite"+U+ee,this._makeAPIURL(xe,this._customAccessToken||ue)):(xe.path+=""+U+ee,nt(xe))},_e.prototype.normalizeTileURL=function(R,U){if(this._isSkuTokenExpired()&&this._createSkuToken(),R&&!ze(R))return R;var ee=Ke(R),ue=/(\.(png|jpg)\d*)(?=$)/,xe=/^.+\/v4\//,Ee=ie.devicePixelRatio>=2||U===512?"@2x":"",Ye=le.supported?".webp":"$1";ee.path=ee.path.replace(ue,""+Ee+Ye),ee.path=ee.path.replace(xe,"/"),ee.path="/v4"+ee.path;var ot=this._customAccessToken||st(ee.params)||ne.ACCESS_TOKEN;return ne.REQUIRE_ACCESS_TOKEN&&ot&&this._skuToken&&ee.params.push("sku="+this._skuToken),this._makeAPIURL(ee,ot)},_e.prototype.canonicalizeTileURL=function(R,U){var ee="/v4/",ue=/\.[\w]+$/,xe=Ke(R);if(!xe.path.match(/(^\/v4\/)/)||!xe.path.match(ue))return R;var Ee="mapbox://tiles/";Ee+=xe.path.replace(ee,"");var Ye=xe.params;return U&&(Ye=Ye.filter(function(ot){return!ot.match(/^access_token=/)})),Ye.length&&(Ee+="?"+Ye.join("&")),Ee},_e.prototype.canonicalizeTileset=function(R,U){for(var ee=U?ze(U):!1,ue=[],xe=0,Ee=R.tiles||[];xe=0&&R.params.splice(xe,1)}if(ue.path!=="/"&&(R.path=""+ue.path+R.path),!ne.REQUIRE_ACCESS_TOKEN)return nt(R);if(U=U||ne.ACCESS_TOKEN,!U)throw new Error("An API access token is required to use Mapbox GL. "+ee);if(U[0]==="s")throw new Error("Use a public access token (pk.*) with Mapbox GL, not a secret access token (sk.*). "+ee);return R.params=R.params.filter(function(Ee){return Ee.indexOf("access_token")===-1}),R.params.push("access_token="+U),nt(R)};function ze(D){return D.indexOf("mapbox:")===0}var Ie=/^((https?:)?\/\/)?([^\/]+\.)?mapbox\.c(n|om)(\/|\?|$)/i;function Ne(D){return Ie.test(D)}function et(D){return D.indexOf("sku=")>0&&Ne(D)}function st(D){for(var R=0,U=D;R=1&&s.localStorage.setItem(U,JSON.stringify(this.eventData))}catch{O("Unable to write to LocalStorage")}},vt.prototype.processRequests=function(R){},vt.prototype.postEvent=function(R,U,ee,ue){var xe=this;if(ne.EVENTS_URL){var Ee=Ke(ne.EVENTS_URL);Ee.params.push("access_token="+(ue||ne.ACCESS_TOKEN||""));var Ye={event:this.type,created:new Date(R).toISOString(),sdkIdentifier:"mapbox-gl-js",sdkVersion:M,skuId:ye,userId:this.anonId},ot=U?m(Ye,U):Ye,mt={url:nt(Ee),headers:{"Content-Type":"text/plain"},body:JSON.stringify([ot])};this.pendingRequest=It(mt,function(At){xe.pendingRequest=null,ee(At),xe.saveEventData(),xe.processRequests(ue)})}},vt.prototype.queueRequest=function(R,U){this.queue.push(R),this.processRequests(U)};var xt=function(D){function R(){D.call(this,"map.load"),this.success={},this.skuToken=""}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.postMapLoadEvent=function(ee,ue,xe,Ee){this.skuToken=xe,(ne.EVENTS_URL&&Ee||ne.ACCESS_TOKEN&&Array.isArray(ee)&&ee.some(function(Ye){return ze(Ye)||Ne(Ye)}))&&this.queueRequest({id:ue,timestamp:Date.now()},Ee)},R.prototype.processRequests=function(ee){var ue=this;if(!(this.pendingRequest||this.queue.length===0)){var xe=this.queue.shift(),Ee=xe.id,Ye=xe.timestamp;Ee&&this.success[Ee]||(this.anonId||this.fetchEventData(),i(this.anonId)||(this.anonId=S()),this.postEvent(Ye,{skuToken:this.skuToken},function(ot){ot||Ee&&(ue.success[Ee]=!0)},ee))}},R}(vt),Je=function(D){function R(U){D.call(this,"appUserTurnstile"),this._customAccessToken=U}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.postTurnstileEvent=function(ee,ue){ne.EVENTS_URL&&ne.ACCESS_TOKEN&&Array.isArray(ee)&&ee.some(function(xe){return ze(xe)||Ne(xe)})&&this.queueRequest(Date.now(),ue)},R.prototype.processRequests=function(ee){var ue=this;if(!(this.pendingRequest||this.queue.length===0)){(!this.anonId||!this.eventData.lastSuccess||!this.eventData.tokenU)&&this.fetchEventData();var xe=lt(ne.ACCESS_TOKEN),Ee=xe?xe.u:ne.ACCESS_TOKEN,Ye=Ee!==this.eventData.tokenU;i(this.anonId)||(this.anonId=S(),Ye=!0);var ot=this.queue.shift();if(this.eventData.lastSuccess){var mt=new Date(this.eventData.lastSuccess),At=new Date(ot),Bt=(ot-this.eventData.lastSuccess)/(24*60*60*1e3);Ye=Ye||Bt>=1||Bt<-1||mt.getDate()!==At.getDate()}else Ye=!0;if(!Ye)return this.processRequests();this.postEvent(ot,{"enabled.telemetry":!1},function(Jt){Jt||(ue.eventData.lastSuccess=ot,ue.eventData.tokenU=Ee)},ee)}},R}(vt),Pe=new Je,Ue=Pe.postTurnstileEvent.bind(Pe),He=new xt,Oe=He.postMapLoadEvent.bind(He),Ce="mapbox-tiles",ge=500,pe=50,Te=1e3*60*7,be;function ke(){s.caches&&!be&&(be=s.caches.open(Ce))}var Ve;function je(D,R){if(Ve===void 0)try{new Response(new ReadableStream),Ve=!0}catch{Ve=!1}Ve?R(D.body):D.blob().then(R)}function at(D,R,U){if(ke(),!!be){var ee={status:R.status,statusText:R.statusText,headers:new s.Headers};R.headers.forEach(function(Ee,Ye){return ee.headers.set(Ye,Ee)});var ue=$(R.headers.get("Cache-Control")||"");if(!ue["no-store"]){ue["max-age"]&&ee.headers.set("Expires",new Date(U+ue["max-age"]*1e3).toUTCString());var xe=new Date(ee.headers.get("Expires")).getTime()-U;xeDate.now()&&!U["no-cache"]}var gt=1/0;function Ct(D){gt++,gt>pe&&(D.getActor().send("enforceCacheSizeLimit",ge),gt=0)}function Yt(D){ke(),be&&be.then(function(R){R.keys().then(function(U){for(var ee=0;ee=200&&U.status<300||U.status===0)&&U.response!==null){var ue=U.response;if(D.type==="json")try{ue=JSON.parse(U.response)}catch(xe){return R(xe)}R(null,ue,U.getResponseHeader("Cache-Control"),U.getResponseHeader("Expires"))}else R(new er(U.statusText,U.status,D.url))},U.send(D.body),{cancel:function(){return U.abort()}}}var Et=function(D,R){if(!qe(D.url)){if(s.fetch&&s.Request&&s.AbortController&&s.Request.prototype.hasOwnProperty("signal"))return dt(D,R);if(j()&&self.worker&&self.worker.actor){var U=!0;return self.worker.actor.send("getResource",D,R,void 0,U)}}return bt(D,R)},Mt=function(D,R){return Et(m(D,{type:"json"}),R)},_t=function(D,R){return Et(m(D,{type:"arrayBuffer"}),R)},It=function(D,R){return Et(m(D,{method:"POST"}),R)};function Gt(D){var R=s.document.createElement("a");return R.href=D,R.protocol===s.document.location.protocol&&R.host===s.document.location.host}var nr="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function ar(D,R,U,ee){var ue=new s.Image,xe=s.URL;ue.onload=function(){R(null,ue),xe.revokeObjectURL(ue.src),ue.onload=null,s.requestAnimationFrame(function(){ue.src=nr})},ue.onerror=function(){return R(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 Ee=new s.Blob([new Uint8Array(D)],{type:"image/png"});ue.cacheControl=U,ue.expires=ee,ue.src=D.byteLength?xe.createObjectURL(Ee):nr}function ir(D,R){var U=new s.Blob([new Uint8Array(D)],{type:"image/png"});s.createImageBitmap(U).then(function(ee){R(null,ee)}).catch(function(ee){R(new Error("Could not load image because of "+ee.message+". Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported."))})}var Be,Fe,Rt=function(){Be=[],Fe=0};Rt();var Lt=function(D,R){if(le.supported&&(D.headers||(D.headers={}),D.headers.accept="image/webp,*/*"),Fe>=ne.MAX_PARALLEL_IMAGE_REQUESTS){var U={requestParameters:D,callback:R,cancelled:!1,cancel:function(){this.cancelled=!0}};return Be.push(U),U}Fe++;var ee=!1,ue=function(){if(!ee)for(ee=!0,Fe--;Be.length&&Fe0||this._oneTimeListeners&&this._oneTimeListeners[R]&&this._oneTimeListeners[R].length>0||this._eventedParent&&this._eventedParent.listens(R)},sr.prototype.setEventedParent=function(R,U){return this._eventedParent=R,this._eventedParentData=U,this};var fr=8,vr={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"}},lr={"*":{type:"source"}},Or=["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],Sr={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"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Ar={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"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},sn={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"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},Jr={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},filter:{type:"*"},tolerance:{type:"number",default:.375},cluster:{type:"boolean",default:!1},clusterRadius:{type:"number",default:50,minimum:0},clusterMaxZoom:{type:"number"},clusterMinPoints:{type:"number"},clusterProperties:{type:"*"},lineMetrics:{type:"boolean",default:!1},generateId:{type:"boolean",default:!1},promoteId:{type:"promoteId"}},bn={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"}}},xn={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"}}},or={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"}},Lr=["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_background"],Br={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},_r={"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"}},Qr={"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"}},un={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},ln={"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"}},Mn={"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"}},Dn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},Kn={visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},sa={type:"array",value:"*"},na={type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{},within:{}}},Jn={type:"enum",values:{Point:{},LineString:{},Polygon:{}}},aa={type:"array",minimum:0,maximum:24,value:["number","color"],length:2},pr={type:"array",value:"*",minimum:1},$r={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}},Xr=["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_background"],fn={"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"}},zn={"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"}},pn={"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"}},gn={"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"}},In={"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"}},Gn={"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"}},ua={"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"}},Ma={"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"}},xr={duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},Rr={"*":{type:"string"}},yr={$version:fr,$root:vr,sources:lr,source:Or,source_vector:Sr,source_raster:Ar,source_raster_dem:sn,source_geojson:Jr,source_video:bn,source_image:xn,layer:or,layout:Lr,layout_background:Br,layout_fill:_r,layout_circle:Qr,layout_heatmap:un,"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible","property-type":"constant"}},layout_line:ln,layout_symbol:Mn,layout_raster:Dn,layout_hillshade:Kn,filter:sa,filter_operator:na,geometry_type:Jn,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:aa,expression:pr,light:$r,paint:Xr,paint_fill:fn,"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:zn,paint_circle:pn,paint_heatmap:gn,paint_symbol:In,paint_raster:Gn,paint_hillshade:ua,paint_background:Ma,transition:xr,"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:Rr},Dr=function(R,U,ee,ue){this.message=(R?R+": ":"")+ee,ue&&(this.identifier=ue),U!=null&&U.__line__&&(this.line=U.__line__)};function vn(D){var R=D.key,U=D.value;return U?[new Dr(R,U,"constants have been deprecated as of v8")]:[]}function En(D){for(var R=[],U=arguments.length-1;U-- >0;)R[U]=arguments[U+1];for(var ee=0,ue=R;ee":D.itemType.kind==="value"?"array":"array<"+R+">"}else return D.kind}var uo=[zr,Yr,dn,wn,Tn,la,kn,ni(Pn),ba];function ao(D,R){if(R.kind==="error")return null;if(D.kind==="array"){if(R.kind==="array"&&(R.N===0&&R.itemType.kind==="value"||!ao(D.itemType,R.itemType))&&(typeof D.N!="number"||D.N===R.N))return null}else{if(D.kind===R.kind)return null;if(D.kind==="value")for(var U=0,ee=uo;U255?255:mt}function ue(mt){return mt<0?0:mt>1?1:mt}function xe(mt){return mt[mt.length-1]==="%"?ee(parseFloat(mt)/100*255):ee(parseInt(mt))}function Ee(mt){return mt[mt.length-1]==="%"?ue(parseFloat(mt)/100):ue(parseFloat(mt))}function Ye(mt,At,Bt){return Bt<0?Bt+=1:Bt>1&&(Bt-=1),Bt*6<1?mt+(At-mt)*Bt*6:Bt*2<1?At:Bt*3<2?mt+(At-mt)*(2/3-Bt)*6:mt}function ot(mt){var At=mt.replace(/ /g,"").toLowerCase();if(At in U)return U[At].slice();if(At[0]==="#"){if(At.length===4){var Bt=parseInt(At.substr(1),16);return Bt>=0&&Bt<=4095?[(Bt&3840)>>4|(Bt&3840)>>8,Bt&240|(Bt&240)>>4,Bt&15|(Bt&15)<<4,1]:null}else if(At.length===7){var Bt=parseInt(At.substr(1),16);return Bt>=0&&Bt<=16777215?[(Bt&16711680)>>16,(Bt&65280)>>8,Bt&255,1]:null}return null}var Jt=At.indexOf("("),Zt=At.indexOf(")");if(Jt!==-1&&Zt+1===At.length){var hr=At.substr(0,Jt),Pr=At.substr(Jt+1,Zt-(Jt+1)).split(","),tn=1;switch(hr){case"rgba":if(Pr.length!==4)return null;tn=Ee(Pr.pop());case"rgb":return Pr.length!==3?null:[xe(Pr[0]),xe(Pr[1]),xe(Pr[2]),tn];case"hsla":if(Pr.length!==4)return null;tn=Ee(Pr.pop());case"hsl":if(Pr.length!==3)return null;var jr=(parseFloat(Pr[0])%360+360)%360/360,mn=Ee(Pr[1]),cn=Ee(Pr[2]),yn=cn<=.5?cn*(mn+1):cn+mn-cn*mn,Ln=cn*2-yn;return[ee(Ye(Ln,yn,jr+1/3)*255),ee(Ye(Ln,yn,jr)*255),ee(Ye(Ln,yn,jr-1/3)*255),tn];default:return null}}return null}try{R.parseCSSColor=ot}catch{}}),bu=jl.parseCSSColor,Ga=function(R,U,ee,ue){ue===void 0&&(ue=1),this.r=R,this.g=U,this.b=ee,this.a=ue};Ga.parse=function(R){if(R){if(R instanceof Ga)return R;if(typeof R=="string"){var U=bu(R);if(U)return new Ga(U[0]/255*U[3],U[1]/255*U[3],U[2]/255*U[3],U[3])}}},Ga.prototype.toString=function(){var R=this.toArray(),U=R[0],ee=R[1],ue=R[2],xe=R[3];return"rgba("+Math.round(U)+","+Math.round(ee)+","+Math.round(ue)+","+xe+")"},Ga.prototype.toArray=function(){var R=this,U=R.r,ee=R.g,ue=R.b,xe=R.a;return xe===0?[0,0,0,0]:[U*255/xe,ee*255/xe,ue*255/xe,xe]},Ga.black=new Ga(0,0,0,1),Ga.white=new Ga(1,1,1,1),Ga.transparent=new Ga(0,0,0,0),Ga.red=new Ga(1,0,0,1);var qs=function(R,U,ee){R?this.sensitivity=U?"variant":"case":this.sensitivity=U?"accent":"base",this.locale=ee,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})};qs.prototype.compare=function(R,U){return this.collator.compare(R,U)},qs.prototype.resolvedLocale=function(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale};var Kl=function(R,U,ee,ue,xe){this.text=R,this.image=U,this.scale=ee,this.fontStack=ue,this.textColor=xe},Ii=function(R){this.sections=R};Ii.fromString=function(R){return new Ii([new Kl(R,null,null,null,null)])},Ii.prototype.isEmpty=function(){return this.sections.length===0?!0:!this.sections.some(function(R){return R.text.length!==0||R.image&&R.image.name.length!==0})},Ii.factory=function(R){return R instanceof Ii?R:Ii.fromString(R)},Ii.prototype.toString=function(){return this.sections.length===0?"":this.sections.map(function(R){return R.text}).join("")},Ii.prototype.serialize=function(){for(var R=["format"],U=0,ee=this.sections;U=0&&D<=255&&typeof R=="number"&&R>=0&&R<=255&&typeof U=="number"&&U>=0&&U<=255)){var ue=typeof ee=="number"?[D,R,U,ee]:[D,R,U];return"Invalid rgba value ["+ue.join(", ")+"]: 'r', 'g', and 'b' must be between 0 and 255."}return typeof ee>"u"||typeof ee=="number"&&ee>=0&&ee<=1?null:"Invalid rgba value ["+[D,R,U,ee].join(", ")+"]: 'a' must be between 0 and 1."}function Ll(D){if(D===null)return!0;if(typeof D=="string")return!0;if(typeof D=="boolean")return!0;if(typeof D=="number")return!0;if(D instanceof Ga)return!0;if(D instanceof qs)return!0;if(D instanceof Ii)return!0;if(D instanceof $i)return!0;if(Array.isArray(D)){for(var R=0,U=D;R2){var Ye=R[1];if(typeof Ye!="string"||!(Ye in Ds)||Ye==="object")return U.error('The item type argument of "array" must be one of string, number, boolean',1);Ee=Ds[Ye],ee++}else Ee=Pn;var ot;if(R.length>3){if(R[2]!==null&&(typeof R[2]!="number"||R[2]<0||R[2]!==Math.floor(R[2])))return U.error('The length argument to "array" must be a positive integer literal',2);ot=R[2],ee++}ue=ni(Ee,ot)}else ue=Ds[xe];for(var mt=[];ee1)&&U.push(ue)}}return U.concat(this.args.map(function(xe){return xe.serialize()}))};var Ni=function(R){this.type=la,this.sections=R};Ni.parse=function(R,U){if(R.length<2)return U.error("Expected at least one argument.");var ee=R[1];if(!Array.isArray(ee)&&typeof ee=="object")return U.error("First argument must be an image or text section.");for(var ue=[],xe=!1,Ee=1;Ee<=R.length-1;++Ee){var Ye=R[Ee];if(xe&&typeof Ye=="object"&&!Array.isArray(Ye)){xe=!1;var ot=null;if(Ye["font-scale"]&&(ot=U.parse(Ye["font-scale"],1,Yr),!ot))return null;var mt=null;if(Ye["text-font"]&&(mt=U.parse(Ye["text-font"],1,ni(dn)),!mt))return null;var At=null;if(Ye["text-color"]&&(At=U.parse(Ye["text-color"],1,Tn),!At))return null;var Bt=ue[ue.length-1];Bt.scale=ot,Bt.font=mt,Bt.textColor=At}else{var Jt=U.parse(R[Ee],1,Pn);if(!Jt)return null;var Zt=Jt.type.kind;if(Zt!=="string"&&Zt!=="value"&&Zt!=="null"&&Zt!=="resolvedImage")return U.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");xe=!0,ue.push({content:Jt,scale:null,font:null,textColor:null})}}return new Ni(ue)},Ni.prototype.evaluate=function(R){var U=function(ee){var ue=ee.content.evaluate(R);return xi(ue)===ba?new Kl("",ue,null,null,null):new Kl(Rs(ue),null,ee.scale?ee.scale.evaluate(R):null,ee.font?ee.font.evaluate(R).join(","):null,ee.textColor?ee.textColor.evaluate(R):null)};return new Ii(this.sections.map(U))},Ni.prototype.eachChild=function(R){for(var U=0,ee=this.sections;U-1),ee},fo.prototype.eachChild=function(R){R(this.input)},fo.prototype.outputDefined=function(){return!1},fo.prototype.serialize=function(){return["image",this.input.serialize()]};var wu={"to-boolean":wn,"to-color":Tn,"to-number":Yr,"to-string":dn},io=function(R,U){this.type=R,this.args=U};io.parse=function(R,U){if(R.length<2)return U.error("Expected at least one argument.");var ee=R[0];if((ee==="to-boolean"||ee==="to-string")&&R.length!==2)return U.error("Expected one argument.");for(var ue=wu[ee],xe=[],Ee=1;Ee4?ee="Invalid rbga value "+JSON.stringify(U)+": expected an array containing either three or four numeric values.":ee=Ps(U[0],U[1],U[2],U[3]),!ee))return new Ga(U[0]/255,U[1]/255,U[2]/255,U[3])}throw new Ci(ee||"Could not parse color from value '"+(typeof U=="string"?U:String(JSON.stringify(U)))+"'")}else if(this.type.kind==="number"){for(var ot=null,mt=0,At=this.args;mt=R[2]||D[1]<=R[1]||D[3]>=R[3])}function of(D,R){var U=Tu(D[0]),ee=af(D[1]),ue=Math.pow(2,R.z);return[Math.round(U*ue*zo),Math.round(ee*ue*zo)]}function sf(D,R,U){var ee=D[0]-R[0],ue=D[1]-R[1],xe=D[0]-U[0],Ee=D[1]-U[1];return ee*Ee-xe*ue===0&&ee*xe<=0&&ue*Ee<=0}function lf(D,R,U){return R[1]>D[1]!=U[1]>D[1]&&D[0]<(U[0]-R[0])*(D[1]-R[1])/(U[1]-R[1])+R[0]}function $l(D,R){for(var U=!1,ee=0,ue=R.length;ee0&&Bt<0||At<0&&Bt>0}function Mu(D,R,U,ee){var ue=[R[0]-D[0],R[1]-D[1]],xe=[ee[0]-U[0],ee[1]-U[1]];return ff(xe,ue)===0?!1:!!(Au(D,R,U,ee)&&Au(U,ee,D,R))}function ds(D,R,U){for(var ee=0,ue=U;eeU[2]){var ue=ee*.5,xe=D[0]-U[0]>ue?-ee:U[0]-D[0]>ue?ee:0;xe===0&&(xe=D[0]-U[2]>ue?-ee:U[2]-D[0]>ue?ee:0),D[0]+=xe}Ql(R,D)}function cf(D){D[0]=D[1]=1/0,D[2]=D[3]=-1/0}function Rl(D,R,U,ee){for(var ue=Math.pow(2,ee.z)*zo,xe=[ee.x*zo,ee.y*zo],Ee=[],Ye=0,ot=D;Ye=0)return!1;var U=!0;return D.eachChild(function(ee){U&&!rl(ee,R)&&(U=!1)}),U}var ts=function(R,U){this.type=U.type,this.name=R,this.boundExpression=U};ts.parse=function(R,U){if(R.length!==2||typeof R[1]!="string")return U.error("'var' expression requires exactly one string literal argument.");var ee=R[1];return U.scope.has(ee)?new ts(ee,U.scope.get(ee)):U.error('Unknown variable "'+ee+'". Make sure "'+ee+'" has been bound in an enclosing "let" expression before using it.',1)},ts.prototype.evaluate=function(R){return this.boundExpression.evaluate(R)},ts.prototype.eachChild=function(){},ts.prototype.outputDefined=function(){return!1},ts.prototype.serialize=function(){return["var",this.name]};var Fo=function(R,U,ee,ue,xe){U===void 0&&(U=[]),ue===void 0&&(ue=new Vr),xe===void 0&&(xe=[]),this.registry=R,this.path=U,this.key=U.map(function(Ee){return"["+Ee+"]"}).join(""),this.scope=ue,this.errors=xe,this.expectedType=ee};Fo.prototype.parse=function(R,U,ee,ue,xe){return xe===void 0&&(xe={}),U?this.concat(U,ee,ue)._parse(R,xe):this._parse(R,xe)},Fo.prototype._parse=function(R,U){(R===null||typeof R=="string"||typeof R=="boolean"||typeof R=="number")&&(R=["literal",R]);function ee(At,Bt,Jt){return Jt==="assert"?new Bi(Bt,[At]):Jt==="coerce"?new io(Bt,[At]):At}if(Array.isArray(R)){if(R.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');var ue=R[0];if(typeof ue!="string")return this.error("Expression name must be a string, but found "+typeof ue+' instead. If you wanted a literal array, use ["literal", [...]].',0),null;var xe=this.registry[ue];if(xe){var Ee=xe.parse(R,this);if(!Ee)return null;if(this.expectedType){var Ye=this.expectedType,ot=Ee.type;if((Ye.kind==="string"||Ye.kind==="number"||Ye.kind==="boolean"||Ye.kind==="object"||Ye.kind==="array")&&ot.kind==="value")Ee=ee(Ee,Ye,U.typeAnnotation||"assert");else if((Ye.kind==="color"||Ye.kind==="formatted"||Ye.kind==="resolvedImage")&&(ot.kind==="value"||ot.kind==="string"))Ee=ee(Ee,Ye,U.typeAnnotation||"coerce");else if(this.checkSubtype(Ye,ot))return null}if(!(Ee instanceof Ti)&&Ee.type.kind!=="resolvedImage"&&ql(Ee)){var mt=new _o;try{Ee=new Ti(Ee.type,Ee.evaluate(mt))}catch(At){return this.error(At.message),null}}return Ee}return this.error('Unknown expression "'+ue+'". If you wanted a literal array, use ["literal", [...]].',0)}else return typeof R>"u"?this.error("'undefined' value invalid. Use null instead."):typeof R=="object"?this.error('Bare objects invalid. Use ["literal", {...}] instead.'):this.error("Expected an array, but found "+typeof R+" instead.")},Fo.prototype.concat=function(R,U,ee){var ue=typeof R=="number"?this.path.concat(R):this.path,xe=ee?this.scope.concat(ee):this.scope;return new Fo(this.registry,ue,U||null,xe,this.errors)},Fo.prototype.error=function(R){for(var U=[],ee=arguments.length-1;ee-- >0;)U[ee]=arguments[ee+1];var ue=""+this.key+U.map(function(xe){return"["+xe+"]"}).join("");this.errors.push(new br(ue,R))},Fo.prototype.checkSubtype=function(R,U){var ee=ao(R,U);return ee&&this.error(ee),ee};function ql(D){if(D instanceof ts)return ql(D.boundExpression);if(D instanceof ki&&D.name==="error")return!1;if(D instanceof es)return!1;if(D instanceof bo)return!1;var R=D instanceof io||D instanceof Bi,U=!0;return D.eachChild(function(ee){R?U=U&&ql(ee):U=U&&ee instanceof Ti}),U?ks(D)&&rl(D,["zoom","heatmap-density","line-progress","accumulated","is-supported-script"]):!1}function _s(D,R){for(var U=D.length-1,ee=0,ue=U,xe=0,Ee,Ye;ee<=ue;)if(xe=Math.floor((ee+ue)/2),Ee=D[xe],Ye=D[xe+1],Ee<=R){if(xe===U||RR)ue=xe-1;else throw new Ci("Input is not a number.");return 0}var wo=function(R,U,ee){this.type=R,this.input=U,this.labels=[],this.outputs=[];for(var ue=0,xe=ee;ue=Ye)return U.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',mt);var Bt=U.parse(ot,At,xe);if(!Bt)return null;xe=xe||Bt.type,ue.push([Ye,Bt])}return new wo(xe,ee,ue)},wo.prototype.evaluate=function(R){var U=this.labels,ee=this.outputs;if(U.length===1)return ee[0].evaluate(R);var ue=this.input.evaluate(R);if(ue<=U[0])return ee[0].evaluate(R);var xe=U.length;if(ue>=U[xe-1])return ee[xe-1].evaluate(R);var Ee=_s(U,ue);return ee[Ee].evaluate(R)},wo.prototype.eachChild=function(R){R(this.input);for(var U=0,ee=this.outputs;U0&&R.push(this.labels[U]),R.push(this.outputs[U].serialize());return R};function yi(D,R,U){return D*(1-U)+R*U}function eu(D,R,U){return new Ga(yi(D.r,R.r,U),yi(D.g,R.g,U),yi(D.b,R.b,U),yi(D.a,R.a,U))}function hf(D,R,U){return D.map(function(ee,ue){return yi(ee,R[ue],U)})}var Il=Object.freeze({__proto__:null,number:yi,color:eu,array:hf}),zs=.95047,Fs=1,vo=1.08883,kl=4/29,Os=6/29,_l=3*Os*Os,vf=Os*Os*Os,Lu=Math.PI/180,tu=180/Math.PI;function ru(D){return D>vf?Math.pow(D,.3333333333333333):D/_l+kl}function nu(D){return D>Os?D*D*D:_l*(D-kl)}function Bs(D){return 255*(D<=.0031308?12.92*D:1.055*Math.pow(D,.4166666666666667)-.055)}function zl(D){return D/=255,D<=.04045?D/12.92:Math.pow((D+.055)/1.055,2.4)}function nl(D){var R=zl(D.r),U=zl(D.g),ee=zl(D.b),ue=ru((.4124564*R+.3575761*U+.1804375*ee)/zs),xe=ru((.2126729*R+.7151522*U+.072175*ee)/Fs),Ee=ru((.0193339*R+.119192*U+.9503041*ee)/vo);return{l:116*xe-16,a:500*(ue-xe),b:200*(xe-Ee),alpha:D.a}}function Fl(D){var R=(D.l+16)/116,U=isNaN(D.a)?R:R+D.a/500,ee=isNaN(D.b)?R:R-D.b/200;return R=Fs*nu(R),U=zs*nu(U),ee=vo*nu(ee),new Ga(Bs(3.2404542*U-1.5371385*R-.4985314*ee),Bs(-.969266*U+1.8760108*R+.041556*ee),Bs(.0556434*U-.2040259*R+1.0572252*ee),D.alpha)}function ai(D,R,U){return{l:yi(D.l,R.l,U),a:yi(D.a,R.a,U),b:yi(D.b,R.b,U),alpha:yi(D.alpha,R.alpha,U)}}function Pu(D){var R=nl(D),U=R.l,ee=R.a,ue=R.b,xe=Math.atan2(ue,ee)*tu;return{h:xe<0?xe+360:xe,c:Math.sqrt(ee*ee+ue*ue),l:U,alpha:D.a}}function To(D){var R=D.h*Lu,U=D.c,ee=D.l;return Fl({l:ee,a:Math.cos(R)*U,b:Math.sin(R)*U,alpha:D.alpha})}function Ru(D,R,U){var ee=R-D;return D+U*(ee>180||ee<-180?ee-360*Math.round(ee/360):ee)}function au(D,R,U){return{h:Ru(D.h,R.h,U),c:yi(D.c,R.c,U),l:yi(D.l,R.l,U),alpha:yi(D.alpha,R.alpha,U)}}var gs={forward:nl,reverse:Fl,interpolate:ai},rs={forward:Pu,reverse:To,interpolate:au},Ol=Object.freeze({__proto__:null,lab:gs,hcl:rs}),bi=function(R,U,ee,ue,xe){this.type=R,this.operator=U,this.interpolation=ee,this.input=ue,this.labels=[],this.outputs=[];for(var Ee=0,Ye=xe;Ee1}))return U.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);ue={name:"cubic-bezier",controlPoints:ot}}else return U.error("Unknown interpolation type "+String(ue[0]),1,0);if(R.length-1<4)return U.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if((R.length-1)%2!==0)return U.error("Expected an even number of arguments.");if(xe=U.parse(xe,2,Yr),!xe)return null;var mt=[],At=null;ee==="interpolate-hcl"||ee==="interpolate-lab"?At=Tn:U.expectedType&&U.expectedType.kind!=="value"&&(At=U.expectedType);for(var Bt=0;Bt=Jt)return U.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',hr);var tn=U.parse(Zt,Pr,At);if(!tn)return null;At=At||tn.type,mt.push([Jt,tn])}return At.kind!=="number"&&At.kind!=="color"&&!(At.kind==="array"&&At.itemType.kind==="number"&&typeof At.N=="number")?U.error("Type "+Xa(At)+" is not interpolatable."):new bi(At,ee,ue,xe,mt)},bi.prototype.evaluate=function(R){var U=this.labels,ee=this.outputs;if(U.length===1)return ee[0].evaluate(R);var ue=this.input.evaluate(R);if(ue<=U[0])return ee[0].evaluate(R);var xe=U.length;if(ue>=U[xe-1])return ee[xe-1].evaluate(R);var Ee=_s(U,ue),Ye=U[Ee],ot=U[Ee+1],mt=bi.interpolationFactor(this.interpolation,ue,Ye,ot),At=ee[Ee].evaluate(R),Bt=ee[Ee+1].evaluate(R);return this.operator==="interpolate"?Il[this.type.kind.toLowerCase()](At,Bt,mt):this.operator==="interpolate-hcl"?rs.reverse(rs.interpolate(rs.forward(At),rs.forward(Bt),mt)):gs.reverse(gs.interpolate(gs.forward(At),gs.forward(Bt),mt))},bi.prototype.eachChild=function(R){R(this.input);for(var U=0,ee=this.outputs;U=ee.length)throw new Ci("Array index out of bounds: "+U+" > "+(ee.length-1)+".");if(U!==Math.floor(U))throw new Ci("Array index must be an integer, but found "+U+" instead.");return ee[U]},ys.prototype.eachChild=function(R){R(this.index),R(this.input)},ys.prototype.outputDefined=function(){return!1},ys.prototype.serialize=function(){return["at",this.index.serialize(),this.input.serialize()]};var ns=function(R,U){this.type=wn,this.needle=R,this.haystack=U};ns.parse=function(R,U){if(R.length!==3)return U.error("Expected 2 arguments, but found "+(R.length-1)+" instead.");var ee=U.parse(R[1],1,Pn),ue=U.parse(R[2],2,Pn);return!ee||!ue?null:Oi(ee.type,[wn,dn,Yr,zr,Pn])?new ns(ee,ue):U.error("Expected first argument to be of type boolean, string, number or null, but found "+Xa(ee.type)+" instead")},ns.prototype.evaluate=function(R){var U=this.needle.evaluate(R),ee=this.haystack.evaluate(R);if(!ee)return!1;if(!Ls(U,["boolean","string","number","null"]))throw new Ci("Expected first argument to be of type boolean, string, number or null, but found "+Xa(xi(U))+" instead.");if(!Ls(ee,["string","array"]))throw new Ci("Expected second argument to be of type array or string, but found "+Xa(xi(ee))+" instead.");return ee.indexOf(U)>=0},ns.prototype.eachChild=function(R){R(this.needle),R(this.haystack)},ns.prototype.outputDefined=function(){return!0},ns.prototype.serialize=function(){return["in",this.needle.serialize(),this.haystack.serialize()]};var Mo=function(R,U,ee){this.type=Yr,this.needle=R,this.haystack=U,this.fromIndex=ee};Mo.parse=function(R,U){if(R.length<=2||R.length>=5)return U.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var ee=U.parse(R[1],1,Pn),ue=U.parse(R[2],2,Pn);if(!ee||!ue)return null;if(!Oi(ee.type,[wn,dn,Yr,zr,Pn]))return U.error("Expected first argument to be of type boolean, string, number or null, but found "+Xa(ee.type)+" instead");if(R.length===4){var xe=U.parse(R[3],3,Yr);return xe?new Mo(ee,ue,xe):null}else return new Mo(ee,ue)},Mo.prototype.evaluate=function(R){var U=this.needle.evaluate(R),ee=this.haystack.evaluate(R);if(!Ls(U,["boolean","string","number","null"]))throw new Ci("Expected first argument to be of type boolean, string, number or null, but found "+Xa(xi(U))+" instead.");if(!Ls(ee,["string","array"]))throw new Ci("Expected second argument to be of type array or string, but found "+Xa(xi(ee))+" instead.");if(this.fromIndex){var ue=this.fromIndex.evaluate(R);return ee.indexOf(U,ue)}return ee.indexOf(U)},Mo.prototype.eachChild=function(R){R(this.needle),R(this.haystack),this.fromIndex&&R(this.fromIndex)},Mo.prototype.outputDefined=function(){return!1},Mo.prototype.serialize=function(){if(this.fromIndex!=null&&this.fromIndex!==void 0){var R=this.fromIndex.serialize();return["index-of",this.needle.serialize(),this.haystack.serialize(),R]}return["index-of",this.needle.serialize(),this.haystack.serialize()]};var Xo=function(R,U,ee,ue,xe,Ee){this.inputType=R,this.type=U,this.input=ee,this.cases=ue,this.outputs=xe,this.otherwise=Ee};Xo.parse=function(R,U){if(R.length<5)return U.error("Expected at least 4 arguments, but found only "+(R.length-1)+".");if(R.length%2!==1)return U.error("Expected an even number of arguments.");var ee,ue;U.expectedType&&U.expectedType.kind!=="value"&&(ue=U.expectedType);for(var xe={},Ee=[],Ye=2;YeNumber.MAX_SAFE_INTEGER)return At.error("Branch labels must be integers no larger than "+Number.MAX_SAFE_INTEGER+".");if(typeof Zt=="number"&&Math.floor(Zt)!==Zt)return At.error("Numeric branch labels must be integer values.");if(!ee)ee=xi(Zt);else if(At.checkSubtype(ee,xi(Zt)))return null;if(typeof xe[String(Zt)]<"u")return At.error("Branch labels must be unique.");xe[String(Zt)]=Ee.length}var hr=U.parse(mt,Ye,ue);if(!hr)return null;ue=ue||hr.type,Ee.push(hr)}var Pr=U.parse(R[1],1,Pn);if(!Pr)return null;var tn=U.parse(R[R.length-1],R.length-1,ue);return!tn||Pr.type.kind!=="value"&&U.concat(1).checkSubtype(ee,Pr.type)?null:new Xo(ee,ue,Pr,xe,Ee,tn)},Xo.prototype.evaluate=function(R){var U=this.input.evaluate(R),ee=xi(U)===this.inputType&&this.outputs[this.cases[U]]||this.otherwise;return ee.evaluate(R)},Xo.prototype.eachChild=function(R){R(this.input),this.outputs.forEach(R),R(this.otherwise)},Xo.prototype.outputDefined=function(){return this.outputs.every(function(R){return R.outputDefined()})&&this.otherwise.outputDefined()},Xo.prototype.serialize=function(){for(var R=this,U=["match",this.input.serialize()],ee=Object.keys(this.cases).sort(),ue=[],xe={},Ee=0,Ye=ee;Ee=5)return U.error("Expected 3 or 4 arguments, but found "+(R.length-1)+" instead.");var ee=U.parse(R[1],1,Pn),ue=U.parse(R[2],2,Yr);if(!ee||!ue)return null;if(!Oi(ee.type,[ni(Pn),dn,Pn]))return U.error("Expected first argument to be of type array or string, but found "+Xa(ee.type)+" instead");if(R.length===4){var xe=U.parse(R[3],3,Yr);return xe?new po(ee.type,ee,ue,xe):null}else return new po(ee.type,ee,ue)},po.prototype.evaluate=function(R){var U=this.input.evaluate(R),ee=this.beginIndex.evaluate(R);if(!Ls(U,["string","array"]))throw new Ci("Expected first argument to be of type array or string, but found "+Xa(xi(U))+" instead.");if(this.endIndex){var ue=this.endIndex.evaluate(R);return U.slice(ee,ue)}return U.slice(ee)},po.prototype.eachChild=function(R){R(this.input),R(this.beginIndex),this.endIndex&&R(this.endIndex)},po.prototype.outputDefined=function(){return!1},po.prototype.serialize=function(){if(this.endIndex!=null&&this.endIndex!==void 0){var R=this.endIndex.serialize();return["slice",this.input.serialize(),this.beginIndex.serialize(),R]}return["slice",this.input.serialize(),this.beginIndex.serialize()]};function il(D,R){return D==="=="||D==="!="?R.kind==="boolean"||R.kind==="string"||R.kind==="number"||R.kind==="null"||R.kind==="value":R.kind==="string"||R.kind==="number"||R.kind==="value"}function df(D,R,U){return R===U}function pf(D,R,U){return R!==U}function gf(D,R,U){return RU}function iu(D,R,U){return R<=U}function Du(D,R,U){return R>=U}function Ns(D,R,U,ee){return ee.compare(R,U)===0}function _i(D,R,U,ee){return!Ns(D,R,U,ee)}function co(D,R,U,ee){return ee.compare(R,U)<0}function Us(D,R,U,ee){return ee.compare(R,U)>0}function Iu(D,R,U,ee){return ee.compare(R,U)<=0}function ol(D,R,U,ee){return ee.compare(R,U)>=0}function Zo(D,R,U){var ee=D!=="=="&&D!=="!=";return function(){function ue(xe,Ee,Ye){this.type=wn,this.lhs=xe,this.rhs=Ee,this.collator=Ye,this.hasUntypedArgument=xe.type.kind==="value"||Ee.type.kind==="value"}return ue.parse=function(Ee,Ye){if(Ee.length!==3&&Ee.length!==4)return Ye.error("Expected two or three arguments.");var ot=Ee[0],mt=Ye.parse(Ee[1],1,Pn);if(!mt)return null;if(!il(ot,mt.type))return Ye.concat(1).error('"'+ot+`" comparisons are not supported for type '`+Xa(mt.type)+"'.");var At=Ye.parse(Ee[2],2,Pn);if(!At)return null;if(!il(ot,At.type))return Ye.concat(2).error('"'+ot+`" comparisons are not supported for type '`+Xa(At.type)+"'.");if(mt.type.kind!==At.type.kind&&mt.type.kind!=="value"&&At.type.kind!=="value")return Ye.error("Cannot compare types '"+Xa(mt.type)+"' and '"+Xa(At.type)+"'.");ee&&(mt.type.kind==="value"&&At.type.kind!=="value"?mt=new Bi(At.type,[mt]):mt.type.kind!=="value"&&At.type.kind==="value"&&(At=new Bi(mt.type,[At])));var Bt=null;if(Ee.length===4){if(mt.type.kind!=="string"&&At.type.kind!=="string"&&mt.type.kind!=="value"&&At.type.kind!=="value")return Ye.error("Cannot use collator to compare non-string types.");if(Bt=Ye.parse(Ee[3],3,$n),!Bt)return null}return new ue(mt,At,Bt)},ue.prototype.evaluate=function(Ee){var Ye=this.lhs.evaluate(Ee),ot=this.rhs.evaluate(Ee);if(ee&&this.hasUntypedArgument){var mt=xi(Ye),At=xi(ot);if(mt.kind!==At.kind||!(mt.kind==="string"||mt.kind==="number"))throw new Ci('Expected arguments for "'+D+'" to be (string, string) or (number, number), but found ('+mt.kind+", "+At.kind+") instead.")}if(this.collator&&!ee&&this.hasUntypedArgument){var Bt=xi(Ye),Jt=xi(ot);if(Bt.kind!=="string"||Jt.kind!=="string")return R(Ee,Ye,ot)}return this.collator?U(Ee,Ye,ot,this.collator.evaluate(Ee)):R(Ee,Ye,ot)},ue.prototype.eachChild=function(Ee){Ee(this.lhs),Ee(this.rhs),this.collator&&Ee(this.collator)},ue.prototype.outputDefined=function(){return!0},ue.prototype.serialize=function(){var Ee=[D];return this.eachChild(function(Ye){Ee.push(Ye.serialize())}),Ee},ue}()}var mf=Zo("==",df,Ns),ku=Zo("!=",pf,_i),_u=Zo("<",gf,co),ou=Zo(">",yf,Us),zu=Zo("<=",iu,Iu),qi=Zo(">=",Du,ol),Eo=function(R,U,ee,ue,xe){this.type=dn,this.number=R,this.locale=U,this.currency=ee,this.minFractionDigits=ue,this.maxFractionDigits=xe};Eo.parse=function(R,U){if(R.length!==3)return U.error("Expected two arguments.");var ee=U.parse(R[1],1,Yr);if(!ee)return null;var ue=R[2];if(typeof ue!="object"||Array.isArray(ue))return U.error("NumberFormat options argument must be an object.");var xe=null;if(ue.locale&&(xe=U.parse(ue.locale,1,dn),!xe))return null;var Ee=null;if(ue.currency&&(Ee=U.parse(ue.currency,1,dn),!Ee))return null;var Ye=null;if(ue["min-fraction-digits"]&&(Ye=U.parse(ue["min-fraction-digits"],1,Yr),!Ye))return null;var ot=null;return ue["max-fraction-digits"]&&(ot=U.parse(ue["max-fraction-digits"],1,Yr),!ot)?null:new Eo(ee,xe,Ee,Ye,ot)},Eo.prototype.evaluate=function(R){return new Intl.NumberFormat(this.locale?this.locale.evaluate(R):[],{style:this.currency?"currency":"decimal",currency:this.currency?this.currency.evaluate(R):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(R):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(R):void 0}).format(this.number.evaluate(R))},Eo.prototype.eachChild=function(R){R(this.number),this.locale&&R(this.locale),this.currency&&R(this.currency),this.minFractionDigits&&R(this.minFractionDigits),this.maxFractionDigits&&R(this.maxFractionDigits)},Eo.prototype.outputDefined=function(){return!1},Eo.prototype.serialize=function(){var R={};return this.locale&&(R.locale=this.locale.serialize()),this.currency&&(R.currency=this.currency.serialize()),this.minFractionDigits&&(R["min-fraction-digits"]=this.minFractionDigits.serialize()),this.maxFractionDigits&&(R["max-fraction-digits"]=this.maxFractionDigits.serialize()),["number-format",this.number.serialize(),R]};var as=function(R){this.type=Yr,this.input=R};as.parse=function(R,U){if(R.length!==2)return U.error("Expected 1 argument, but found "+(R.length-1)+" instead.");var ee=U.parse(R[1],1);return ee?ee.type.kind!=="array"&&ee.type.kind!=="string"&&ee.type.kind!=="value"?U.error("Expected argument of type string or array, but found "+Xa(ee.type)+" instead."):new as(ee):null},as.prototype.evaluate=function(R){var U=this.input.evaluate(R);if(typeof U=="string")return U.length;if(Array.isArray(U))return U.length;throw new Ci("Expected value to be of type string or array, but found "+Xa(xi(U))+" instead.")},as.prototype.eachChild=function(R){R(this.input)},as.prototype.outputDefined=function(){return!1},as.prototype.serialize=function(){var R=["length"];return this.eachChild(function(U){R.push(U.serialize())}),R};var Vs={"==":mf,"!=":ku,">":ou,"<":_u,">=":qi,"<=":zu,array:Bi,at:ys,boolean:Bi,case:So,coalesce:Ao,collator:es,format:Ni,image:fo,in:ns,"index-of":Mo,interpolate:bi,"interpolate-hcl":bi,"interpolate-lab":bi,length:as,let:Yo,literal:Ti,match:Xo,number:Bi,"number-format":Eo,object:Bi,slice:po,step:wo,string:Bi,"to-boolean":io,"to-color":io,"to-number":io,"to-string":io,var:ts,within:bo};function Bl(D,R){var U=R[0],ee=R[1],ue=R[2],xe=R[3];U=U.evaluate(D),ee=ee.evaluate(D),ue=ue.evaluate(D);var Ee=xe?xe.evaluate(D):1,Ye=Ps(U,ee,ue,Ee);if(Ye)throw new Ci(Ye);return new Ga(U/255*Ee,ee/255*Ee,ue/255*Ee,Ee)}function ms(D,R){return D in R}function xs(D,R){var U=R[D];return typeof U>"u"?null:U}function Fu(D,R,U,ee){for(;U<=ee;){var ue=U+ee>>1;if(R[ue]===D)return!0;R[ue]>D?ee=ue-1:U=ue+1}return!1}function jo(D){return{type:D}}ki.register(Vs,{error:[fa,[dn],function(D,R){var U=R[0];throw new Ci(U.evaluate(D))}],typeof:[dn,[Pn],function(D,R){var U=R[0];return Xa(xi(U.evaluate(D)))}],"to-rgba":[ni(Yr,4),[Tn],function(D,R){var U=R[0];return U.evaluate(D).toArray()}],rgb:[Tn,[Yr,Yr,Yr],Bl],rgba:[Tn,[Yr,Yr,Yr,Yr],Bl],has:{type:wn,overloads:[[[dn],function(D,R){var U=R[0];return ms(U.evaluate(D),D.properties())}],[[dn,kn],function(D,R){var U=R[0],ee=R[1];return ms(U.evaluate(D),ee.evaluate(D))}]]},get:{type:Pn,overloads:[[[dn],function(D,R){var U=R[0];return xs(U.evaluate(D),D.properties())}],[[dn,kn],function(D,R){var U=R[0],ee=R[1];return xs(U.evaluate(D),ee.evaluate(D))}]]},"feature-state":[Pn,[dn],function(D,R){var U=R[0];return xs(U.evaluate(D),D.featureState||{})}],properties:[kn,[],function(D){return D.properties()}],"geometry-type":[dn,[],function(D){return D.geometryType()}],id:[Pn,[],function(D){return D.id()}],zoom:[Yr,[],function(D){return D.globals.zoom}],"heatmap-density":[Yr,[],function(D){return D.globals.heatmapDensity||0}],"line-progress":[Yr,[],function(D){return D.globals.lineProgress||0}],accumulated:[Pn,[],function(D){return D.globals.accumulated===void 0?null:D.globals.accumulated}],"+":[Yr,jo(Yr),function(D,R){for(var U=0,ee=0,ue=R;ee":[wn,[dn,Pn],function(D,R){var U=R[0],ee=R[1],ue=D.properties()[U.value],xe=ee.value;return typeof ue==typeof xe&&ue>xe}],"filter-id->":[wn,[Pn],function(D,R){var U=R[0],ee=D.id(),ue=U.value;return typeof ee==typeof ue&&ee>ue}],"filter-<=":[wn,[dn,Pn],function(D,R){var U=R[0],ee=R[1],ue=D.properties()[U.value],xe=ee.value;return typeof ue==typeof xe&&ue<=xe}],"filter-id-<=":[wn,[Pn],function(D,R){var U=R[0],ee=D.id(),ue=U.value;return typeof ee==typeof ue&&ee<=ue}],"filter->=":[wn,[dn,Pn],function(D,R){var U=R[0],ee=R[1],ue=D.properties()[U.value],xe=ee.value;return typeof ue==typeof xe&&ue>=xe}],"filter-id->=":[wn,[Pn],function(D,R){var U=R[0],ee=D.id(),ue=U.value;return typeof ee==typeof ue&&ee>=ue}],"filter-has":[wn,[Pn],function(D,R){var U=R[0];return U.value in D.properties()}],"filter-has-id":[wn,[],function(D){return D.id()!==null&&D.id()!==void 0}],"filter-type-in":[wn,[ni(dn)],function(D,R){var U=R[0];return U.value.indexOf(D.geometryType())>=0}],"filter-id-in":[wn,[ni(Pn)],function(D,R){var U=R[0];return U.value.indexOf(D.id())>=0}],"filter-in-small":[wn,[dn,ni(Pn)],function(D,R){var U=R[0],ee=R[1];return ee.value.indexOf(D.properties()[U.value])>=0}],"filter-in-large":[wn,[dn,ni(Pn)],function(D,R){var U=R[0],ee=R[1];return Fu(D.properties()[U.value],ee.value,0,ee.value.length-1)}],all:{type:wn,overloads:[[[wn,wn],function(D,R){var U=R[0],ee=R[1];return U.evaluate(D)&&ee.evaluate(D)}],[jo(wn),function(D,R){for(var U=0,ee=R;U-1}function Gs(D){return!!D.expression&&D.expression.interpolated}function ti(D){return D instanceof Number?"number":D instanceof String?"string":D instanceof Boolean?"boolean":Array.isArray(D)?"array":D===null?"null":typeof D}function Ws(D){return typeof D=="object"&&D!==null&&!Array.isArray(D)}function Nl(D){return D}function Ou(D,R){var U=R.type==="color",ee=D.stops&&typeof D.stops[0][0]=="object",ue=ee||D.property!==void 0,xe=ee||!ue,Ee=D.type||(Gs(R)?"exponential":"interval");if(U&&(D=En({},D),D.stops&&(D.stops=D.stops.map(function(Yn){return[Yn[0],Ga.parse(Yn[1])]})),D.default?D.default=Ga.parse(D.default):D.default=Ga.parse(R.default)),D.colorSpace&&D.colorSpace!=="rgb"&&!Ol[D.colorSpace])throw new Error("Unknown color space: "+D.colorSpace);var Ye,ot,mt;if(Ee==="exponential")Ye=su;else if(Ee==="interval")Ye=Ul;else if(Ee==="categorical"){Ye=ll,ot=Object.create(null);for(var At=0,Bt=D.stops;At=D.stops[ee-1][0])return D.stops[ee-1][1];var ue=_s(D.stops.map(function(xe){return xe[0]}),U);return D.stops[ue][1]}function su(D,R,U){var ee=D.base!==void 0?D.base:1;if(ti(U)!=="number")return Ys(D.default,R.default);var ue=D.stops.length;if(ue===1||U<=D.stops[0][0])return D.stops[0][1];if(U>=D.stops[ue-1][0])return D.stops[ue-1][1];var xe=_s(D.stops.map(function(Bt){return Bt[0]}),U),Ee=fl(U,ee,D.stops[xe][0],D.stops[xe+1][0]),Ye=D.stops[xe][1],ot=D.stops[xe+1][1],mt=Il[R.type]||Nl;if(D.colorSpace&&D.colorSpace!=="rgb"){var At=Ol[D.colorSpace];mt=function(Bt,Jt){return At.reverse(At.interpolate(At.forward(Bt),At.forward(Jt),Ee))}}return typeof Ye.evaluate=="function"?{evaluate:function(){for(var Jt=[],Zt=arguments.length;Zt--;)Jt[Zt]=arguments[Zt];var hr=Ye.evaluate.apply(void 0,Jt),Pr=ot.evaluate.apply(void 0,Jt);if(!(hr===void 0||Pr===void 0))return mt(hr,Pr,Ee)}}:mt(Ye,ot,Ee)}function ul(D,R,U){return R.type==="color"?U=Ga.parse(U):R.type==="formatted"?U=Ii.fromString(U.toString()):R.type==="resolvedImage"?U=$i.fromString(U.toString()):ti(U)!==R.type&&(R.type!=="enum"||!R.values[U])&&(U=void 0),Ys(U,D.default,R.default)}function fl(D,R,U,ee){var ue=ee-U,xe=D-U;return ue===0?0:R===1?xe/ue:(Math.pow(R,xe)-1)/(Math.pow(R,ue)-1)}var os=function(R,U){this.expression=R,this._warningHistory={},this._evaluator=new _o,this._defaultValue=U?Bu(U):null,this._enumValues=U&&U.type==="enum"?U.values:null};os.prototype.evaluateWithoutErrorHandling=function(R,U,ee,ue,xe,Ee){return this._evaluator.globals=R,this._evaluator.feature=U,this._evaluator.featureState=ee,this._evaluator.canonical=ue,this._evaluator.availableImages=xe||null,this._evaluator.formattedSection=Ee,this.expression.evaluate(this._evaluator)},os.prototype.evaluate=function(R,U,ee,ue,xe,Ee){this._evaluator.globals=R,this._evaluator.feature=U||null,this._evaluator.featureState=ee||null,this._evaluator.canonical=ue,this._evaluator.availableImages=xe||null,this._evaluator.formattedSection=Ee||null;try{var Ye=this.expression.evaluate(this._evaluator);if(Ye==null||typeof Ye=="number"&&Ye!==Ye)return this._defaultValue;if(this._enumValues&&!(Ye in this._enumValues))throw new Ci("Expected value to be one of "+Object.keys(this._enumValues).map(function(ot){return JSON.stringify(ot)}).join(", ")+", but found "+JSON.stringify(Ye)+" instead.");return Ye}catch(ot){return this._warningHistory[ot.message]||(this._warningHistory[ot.message]=!0,typeof console<"u"&&console.warn(ot.message)),this._defaultValue}};function cl(D){return Array.isArray(D)&&D.length>0&&typeof D[0]=="string"&&D[0]in Vs}function ss(D,R){var U=new Fo(Vs,[],R?xf(R):void 0),ee=U.parse(D,void 0,void 0,void 0,R&&R.type==="string"?{typeAnnotation:"coerce"}:void 0);return ee?Hs(new os(ee,R)):is(U.errors)}var Li=function(R,U){this.kind=R,this._styleExpression=U,this.isStateDependent=R!=="constant"&&!ps(U.expression)};Li.prototype.evaluateWithoutErrorHandling=function(R,U,ee,ue,xe,Ee){return this._styleExpression.evaluateWithoutErrorHandling(R,U,ee,ue,xe,Ee)},Li.prototype.evaluate=function(R,U,ee,ue,xe,Ee){return this._styleExpression.evaluate(R,U,ee,ue,xe,Ee)};var Oo=function(R,U,ee,ue){this.kind=R,this.zoomStops=ee,this._styleExpression=U,this.isStateDependent=R!=="camera"&&!ps(U.expression),this.interpolationType=ue};Oo.prototype.evaluateWithoutErrorHandling=function(R,U,ee,ue,xe,Ee){return this._styleExpression.evaluateWithoutErrorHandling(R,U,ee,ue,xe,Ee)},Oo.prototype.evaluate=function(R,U,ee,ue,xe,Ee){return this._styleExpression.evaluate(R,U,ee,ue,xe,Ee)},Oo.prototype.interpolationFactor=function(R,U,ee){return this.interpolationType?bi.interpolationFactor(this.interpolationType,R,U,ee):0};function lu(D,R){if(D=ss(D,R),D.result==="error")return D;var U=D.value.expression,ee=ks(U);if(!ee&&!Ko(R))return is([new br("","data expressions not supported")]);var ue=rl(U,["zoom"]);if(!ue&&!sl(R))return is([new br("","zoom expressions not supported")]);var xe=hl(U);if(!xe&&!ue)return is([new br("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')]);if(xe instanceof br)return is([xe]);if(xe instanceof bi&&!Gs(R))return is([new br("",'"interpolate" expressions cannot be used with this property')]);if(!xe)return Hs(ee?new Li("constant",D.value):new Li("source",D.value));var Ee=xe instanceof bi?xe.interpolation:void 0;return Hs(ee?new Oo("camera",D.value,xe.labels,Ee):new Oo("composite",D.value,xe.labels,Ee))}var bs=function(R,U){this._parameters=R,this._specification=U,En(this,Ou(this._parameters,this._specification))};bs.deserialize=function(R){return new bs(R._parameters,R._specification)},bs.serialize=function(R){return{_parameters:R._parameters,_specification:R._specification}};function Vl(D,R){if(Ws(D))return new bs(D,R);if(cl(D)){var U=lu(D,R);if(U.result==="error")throw new Error(U.value.map(function(ue){return ue.key+": "+ue.message}).join(", "));return U.value}else{var ee=D;return typeof D=="string"&&R.type==="color"&&(ee=Ga.parse(D)),{kind:"constant",evaluate:function(){return ee}}}}function hl(D){var R=null;if(D instanceof Yo)R=hl(D.result);else if(D instanceof Ao)for(var U=0,ee=D.args;Uee.maximum?[new Dr(R,U,U+" is greater than the maximum value "+ee.maximum)]:[]}function Nu(D){var R=D.valueSpec,U=an(D.value.type),ee,ue={},xe,Ee,Ye=U!=="categorical"&&D.value.property===void 0,ot=!Ye,mt=ti(D.value.stops)==="array"&&ti(D.value.stops[0])==="array"&&ti(D.value.stops[0][0])==="object",At=ji({key:D.key,value:D.value,valueSpec:D.styleSpec.function,style:D.style,styleSpec:D.styleSpec,objectElementValidators:{stops:Bt,default:hr}});return U==="identity"&&Ye&&At.push(new Dr(D.key,D.value,'missing required property "property"')),U!=="identity"&&!D.value.stops&&At.push(new Dr(D.key,D.value,'missing required property "stops"')),U==="exponential"&&D.valueSpec.expression&&!Gs(D.valueSpec)&&At.push(new Dr(D.key,D.value,"exponential functions not supported")),D.styleSpec.$version>=8&&(ot&&!Ko(D.valueSpec)?At.push(new Dr(D.key,D.value,"property functions not supported")):Ye&&!sl(D.valueSpec)&&At.push(new Dr(D.key,D.value,"zoom functions not supported"))),(U==="categorical"||mt)&&D.value.property===void 0&&At.push(new Dr(D.key,D.value,'"property" property is required')),At;function Bt(Pr){if(U==="identity")return[new Dr(Pr.key,Pr.value,'identity function may not have a "stops" property')];var tn=[],jr=Pr.value;return tn=tn.concat(vl({key:Pr.key,value:jr,valueSpec:Pr.valueSpec,style:Pr.style,styleSpec:Pr.styleSpec,arrayElementValidator:Jt})),ti(jr)==="array"&&jr.length===0&&tn.push(new Dr(Pr.key,jr,"array must have at least one stop")),tn}function Jt(Pr){var tn=[],jr=Pr.value,mn=Pr.key;if(ti(jr)!=="array")return[new Dr(mn,jr,"array expected, "+ti(jr)+" found")];if(jr.length!==2)return[new Dr(mn,jr,"array length 2 expected, length "+jr.length+" found")];if(mt){if(ti(jr[0])!=="object")return[new Dr(mn,jr,"object expected, "+ti(jr[0])+" found")];if(jr[0].zoom===void 0)return[new Dr(mn,jr,"object stop key must have zoom")];if(jr[0].value===void 0)return[new Dr(mn,jr,"object stop key must have value")];if(Ee&&Ee>an(jr[0].zoom))return[new Dr(mn,jr[0].zoom,"stop zoom values must appear in ascending order")];an(jr[0].zoom)!==Ee&&(Ee=an(jr[0].zoom),xe=void 0,ue={}),tn=tn.concat(ji({key:mn+"[0]",value:jr[0],valueSpec:{zoom:{}},style:Pr.style,styleSpec:Pr.styleSpec,objectElementValidators:{zoom:Xs,value:Zt}}))}else tn=tn.concat(Zt({key:mn+"[0]",value:jr[0],valueSpec:{},style:Pr.style,styleSpec:Pr.styleSpec},jr));return cl(en(jr[1]))?tn.concat([new Dr(mn+"[1]",jr[1],"expressions are not allowed in function stops.")]):tn.concat(Er({key:mn+"[1]",value:jr[1],valueSpec:R,style:Pr.style,styleSpec:Pr.styleSpec}))}function Zt(Pr,tn){var jr=ti(Pr.value),mn=an(Pr.value),cn=Pr.value!==null?Pr.value:tn;if(!ee)ee=jr;else if(jr!==ee)return[new Dr(Pr.key,cn,jr+" stop domain type must match previous stop domain type "+ee)];if(jr!=="number"&&jr!=="string"&&jr!=="boolean")return[new Dr(Pr.key,cn,"stop domain value must be a number, string, or boolean")];if(jr!=="number"&&U!=="categorical"){var yn="number expected, "+jr+" found";return Ko(R)&&U===void 0&&(yn+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new Dr(Pr.key,cn,yn)]}return U==="categorical"&&jr==="number"&&(!isFinite(mn)||Math.floor(mn)!==mn)?[new Dr(Pr.key,cn,"integer expected, found "+mn)]:U!=="categorical"&&jr==="number"&&xe!==void 0&&mn=2&&D[1]!=="$id"&&D[1]!=="$type";case"in":return D.length>=3&&(typeof D[1]!="string"||Array.isArray(D[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return D.length!==3||Array.isArray(D[1])||Array.isArray(D[2]);case"any":case"all":for(var R=0,U=D.slice(1);RR?1:0}function pl(D){if(!Array.isArray(D))return!1;if(D[0]==="within")return!0;for(var R=1;R"||R==="<="||R===">="?Gl(D[1],D[2],R):R==="any"?Uu(D.slice(1)):R==="all"?["all"].concat(D.slice(1).map(yl)):R==="none"?["all"].concat(D.slice(1).map(yl).map(ws)):R==="in"?ml(D[1],D.slice(2)):R==="!in"?ws(ml(D[1],D.slice(2))):R==="has"?fu(D[1]):R==="!has"?ws(fu(D[1])):R==="within"?D:!0;return U}function Gl(D,R,U){switch(D){case"$type":return["filter-type-"+U,R];case"$id":return["filter-id-"+U,R];default:return["filter-"+U,D,R]}}function Uu(D){return["any"].concat(D.map(yl))}function ml(D,R){if(R.length===0)return!1;switch(D){case"$type":return["filter-type-in",["literal",R]];case"$id":return["filter-id-in",["literal",R]];default:return R.length>200&&!R.some(function(U){return typeof U!=typeof R[0]})?["filter-in-large",D,["literal",R.sort(uu)]]:["filter-in-small",D,["literal",R]]}}function fu(D){switch(D){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",D]}}function ws(D){return["!",D]}function cu(D){return Hl(en(D.value))?ls(En({},D,{expressionContext:"filter",valueSpec:{value:"boolean"}})):xl(D)}function xl(D){var R=D.value,U=D.key;if(ti(R)!=="array")return[new Dr(U,R,"array expected, "+ti(R)+" found")];var ee=D.styleSpec,ue,xe=[];if(R.length<1)return[new Dr(U,R,"filter array must have at least 1 element")];switch(xe=xe.concat(dl({key:U+"[0]",value:R[0],valueSpec:ee.filter_operator,style:D.style,styleSpec:D.styleSpec})),an(R[0])){case"<":case"<=":case">":case">=":R.length>=2&&an(R[1])==="$type"&&xe.push(new Dr(U,R,'"$type" cannot be use with operator "'+R[0]+'"'));case"==":case"!=":R.length!==3&&xe.push(new Dr(U,R,'filter array for operator "'+R[0]+'" must have 3 elements'));case"in":case"!in":R.length>=2&&(ue=ti(R[1]),ue!=="string"&&xe.push(new Dr(U+"[1]",R[1],"string expected, "+ue+" found")));for(var Ee=2;Ee=At[Zt+0]&&ee>=At[Zt+1])?(Ee[Jt]=!0,xe.push(mt[Jt])):Ee[Jt]=!1}}},ri.prototype._forEachCell=function(D,R,U,ee,ue,xe,Ee,Ye){for(var ot=this._convertToCellCoord(D),mt=this._convertToCellCoord(R),At=this._convertToCellCoord(U),Bt=this._convertToCellCoord(ee),Jt=ot;Jt<=At;Jt++)for(var Zt=mt;Zt<=Bt;Zt++){var hr=this.d*Zt+Jt;if(!(Ye&&!Ye(this._convertFromCellCoord(Jt),this._convertFromCellCoord(Zt),this._convertFromCellCoord(Jt+1),this._convertFromCellCoord(Zt+1)))&&ue.call(this,D,R,U,ee,hr,xe,Ee,Ye))return}},ri.prototype._convertFromCellCoord=function(D){return(D-this.padding)/this.scale},ri.prototype._convertToCellCoord=function(D){return Math.max(0,Math.min(this.d-1,Math.floor(D*this.scale)+this.padding))},ri.prototype.toArrayBuffer=function(){if(this.arrayBuffer)return this.arrayBuffer;for(var D=this.cells,R=Oa+this.cells.length+1+1,U=0,ee=0;ee=0)){var Bt=D[At];mt[At]=Me[ot].shallow.indexOf(At)>=0?Bt:Tt(Bt,R)}D instanceof Error&&(mt.message=D.message)}if(mt.$name)throw new Error("$name property is reserved for worker serialization logic.");return ot!=="Object"&&(mt.$name=ot),mt}throw new Error("can't serialize object of type "+typeof D)}function yt(D){if(D==null||typeof D=="boolean"||typeof D=="number"||typeof D=="string"||D instanceof Boolean||D instanceof Number||D instanceof String||D instanceof Date||D instanceof RegExp||Qe(D)||rt(D)||ArrayBuffer.isView(D)||D instanceof wi)return D;if(Array.isArray(D))return D.map(yt);if(typeof D=="object"){var R=D.$name||"Object",U=Me[R],ee=U.klass;if(!ee)throw new Error("can't deserialize unregistered class "+R);if(ee.deserialize)return ee.deserialize(D);for(var ue=Object.create(ee.prototype),xe=0,Ee=Object.keys(D);xe=0?ot:yt(ot)}}return ue}throw new Error("can't deserialize object of type "+typeof D)}var Ft=function(){this.first=!0};Ft.prototype.update=function(R,U){var ee=Math.floor(R);return this.first?(this.first=!1,this.lastIntegerZoom=ee,this.lastIntegerZoomTime=0,this.lastZoom=R,this.lastFloorZoom=ee,!0):(this.lastFloorZoom>ee?(this.lastIntegerZoom=ee+1,this.lastIntegerZoomTime=U):this.lastFloorZoom=128&&D<=255},Arabic:function(D){return D>=1536&&D<=1791},"Arabic Supplement":function(D){return D>=1872&&D<=1919},"Arabic Extended-A":function(D){return D>=2208&&D<=2303},"Hangul Jamo":function(D){return D>=4352&&D<=4607},"Unified Canadian Aboriginal Syllabics":function(D){return D>=5120&&D<=5759},Khmer:function(D){return D>=6016&&D<=6143},"Unified Canadian Aboriginal Syllabics Extended":function(D){return D>=6320&&D<=6399},"General Punctuation":function(D){return D>=8192&&D<=8303},"Letterlike Symbols":function(D){return D>=8448&&D<=8527},"Number Forms":function(D){return D>=8528&&D<=8591},"Miscellaneous Technical":function(D){return D>=8960&&D<=9215},"Control Pictures":function(D){return D>=9216&&D<=9279},"Optical Character Recognition":function(D){return D>=9280&&D<=9311},"Enclosed Alphanumerics":function(D){return D>=9312&&D<=9471},"Geometric Shapes":function(D){return D>=9632&&D<=9727},"Miscellaneous Symbols":function(D){return D>=9728&&D<=9983},"Miscellaneous Symbols and Arrows":function(D){return D>=11008&&D<=11263},"CJK Radicals Supplement":function(D){return D>=11904&&D<=12031},"Kangxi Radicals":function(D){return D>=12032&&D<=12255},"Ideographic Description Characters":function(D){return D>=12272&&D<=12287},"CJK Symbols and Punctuation":function(D){return D>=12288&&D<=12351},Hiragana:function(D){return D>=12352&&D<=12447},Katakana:function(D){return D>=12448&&D<=12543},Bopomofo:function(D){return D>=12544&&D<=12591},"Hangul Compatibility Jamo":function(D){return D>=12592&&D<=12687},Kanbun:function(D){return D>=12688&&D<=12703},"Bopomofo Extended":function(D){return D>=12704&&D<=12735},"CJK Strokes":function(D){return D>=12736&&D<=12783},"Katakana Phonetic Extensions":function(D){return D>=12784&&D<=12799},"Enclosed CJK Letters and Months":function(D){return D>=12800&&D<=13055},"CJK Compatibility":function(D){return D>=13056&&D<=13311},"CJK Unified Ideographs Extension A":function(D){return D>=13312&&D<=19903},"Yijing Hexagram Symbols":function(D){return D>=19904&&D<=19967},"CJK Unified Ideographs":function(D){return D>=19968&&D<=40959},"Yi Syllables":function(D){return D>=40960&&D<=42127},"Yi Radicals":function(D){return D>=42128&&D<=42191},"Hangul Jamo Extended-A":function(D){return D>=43360&&D<=43391},"Hangul Syllables":function(D){return D>=44032&&D<=55215},"Hangul Jamo Extended-B":function(D){return D>=55216&&D<=55295},"Private Use Area":function(D){return D>=57344&&D<=63743},"CJK Compatibility Ideographs":function(D){return D>=63744&&D<=64255},"Arabic Presentation Forms-A":function(D){return D>=64336&&D<=65023},"Vertical Forms":function(D){return D>=65040&&D<=65055},"CJK Compatibility Forms":function(D){return D>=65072&&D<=65103},"Small Form Variants":function(D){return D>=65104&&D<=65135},"Arabic Presentation Forms-B":function(D){return D>=65136&&D<=65279},"Halfwidth and Fullwidth Forms":function(D){return D>=65280&&D<=65519}};function jt(D){for(var R=0,U=D;R=65097&&D<=65103)||Ot["CJK Compatibility Ideographs"](D)||Ot["CJK Compatibility"](D)||Ot["CJK Radicals Supplement"](D)||Ot["CJK Strokes"](D)||Ot["CJK Symbols and Punctuation"](D)&&!(D>=12296&&D<=12305)&&!(D>=12308&&D<=12319)&&D!==12336||Ot["CJK Unified Ideographs Extension A"](D)||Ot["CJK Unified Ideographs"](D)||Ot["Enclosed CJK Letters and Months"](D)||Ot["Hangul Compatibility Jamo"](D)||Ot["Hangul Jamo Extended-A"](D)||Ot["Hangul Jamo Extended-B"](D)||Ot["Hangul Jamo"](D)||Ot["Hangul Syllables"](D)||Ot.Hiragana(D)||Ot["Ideographic Description Characters"](D)||Ot.Kanbun(D)||Ot["Kangxi Radicals"](D)||Ot["Katakana Phonetic Extensions"](D)||Ot.Katakana(D)&&D!==12540||Ot["Halfwidth and Fullwidth Forms"](D)&&D!==65288&&D!==65289&&D!==65293&&!(D>=65306&&D<=65310)&&D!==65339&&D!==65341&&D!==65343&&!(D>=65371&&D<=65503)&&D!==65507&&!(D>=65512&&D<=65519)||Ot["Small Form Variants"](D)&&!(D>=65112&&D<=65118)&&!(D>=65123&&D<=65126)||Ot["Unified Canadian Aboriginal Syllabics"](D)||Ot["Unified Canadian Aboriginal Syllabics Extended"](D)||Ot["Vertical Forms"](D)||Ot["Yijing Hexagram Symbols"](D)||Ot["Yi Syllables"](D)||Ot["Yi Radicals"](D))}function Mr(D){return!!(Ot["Latin-1 Supplement"](D)&&(D===167||D===169||D===174||D===177||D===188||D===189||D===190||D===215||D===247)||Ot["General Punctuation"](D)&&(D===8214||D===8224||D===8225||D===8240||D===8241||D===8251||D===8252||D===8258||D===8263||D===8264||D===8265||D===8273)||Ot["Letterlike Symbols"](D)||Ot["Number Forms"](D)||Ot["Miscellaneous Technical"](D)&&(D>=8960&&D<=8967||D>=8972&&D<=8991||D>=8996&&D<=9e3||D===9003||D>=9085&&D<=9114||D>=9150&&D<=9165||D===9167||D>=9169&&D<=9179||D>=9186&&D<=9215)||Ot["Control Pictures"](D)&&D!==9251||Ot["Optical Character Recognition"](D)||Ot["Enclosed Alphanumerics"](D)||Ot["Geometric Shapes"](D)||Ot["Miscellaneous Symbols"](D)&&!(D>=9754&&D<=9759)||Ot["Miscellaneous Symbols and Arrows"](D)&&(D>=11026&&D<=11055||D>=11088&&D<=11097||D>=11192&&D<=11243)||Ot["CJK Symbols and Punctuation"](D)||Ot.Katakana(D)||Ot["Private Use Area"](D)||Ot["CJK Compatibility Forms"](D)||Ot["Small Form Variants"](D)||Ot["Halfwidth and Fullwidth Forms"](D)||D===8734||D===8756||D===8757||D>=9984&&D<=10087||D>=10102&&D<=10131||D===65532||D===65533)}function kr(D){return!(qr(D)||Mr(D))}function Hr(D){return Ot.Arabic(D)||Ot["Arabic Supplement"](D)||Ot["Arabic Extended-A"](D)||Ot["Arabic Presentation Forms-A"](D)||Ot["Arabic Presentation Forms-B"](D)}function rn(D){return D>=1424&&D<=2303||Ot["Arabic Presentation Forms-A"](D)||Ot["Arabic Presentation Forms-B"](D)}function on(D,R){return!(!R&&rn(D)||D>=2304&&D<=3583||D>=3840&&D<=4255||Ot.Khmer(D))}function Zr(D){for(var R=0,U=D;R-1&&(Wn=Xn.error),ta&&ta(D)};function Pa(){ya.fire(new Kt("pluginStateChange",{pluginStatus:Wn,pluginURL:Qn}))}var ya=new sr,Sa=function(){return Wn},Za=function(D){return D({pluginStatus:Wn,pluginURL:Qn}),ya.on("pluginStateChange",D),D},Ai=function(D,R,U){if(U===void 0&&(U=!1),Wn===Xn.deferred||Wn===Xn.loading||Wn===Xn.loaded)throw new Error("setRTLTextPlugin cannot be called multiple times.");Qn=ie.resolveURL(D),Wn=Xn.deferred,ta=R,Pa(),U||qa()},qa=function(){if(Wn!==Xn.deferred||!Qn)throw new Error("rtl-text-plugin cannot be downloaded unless a pluginURL is specified");Wn=Xn.loading,Pa(),Qn&&_t({url:Qn},function(D){D?ra(D):(Wn=Xn.loaded,Pa())})},Hn={applyArabicShaping:null,processBidirectionalText:null,processStyledBidirectionalText:null,isLoaded:function(){return Wn===Xn.loaded||Hn.applyArabicShaping!=null},isLoading:function(){return Wn===Xn.loading},setState:function(R){Wn=R.pluginStatus,Qn=R.pluginURL},isParsed:function(){return Hn.applyArabicShaping!=null&&Hn.processBidirectionalText!=null&&Hn.processStyledBidirectionalText!=null},getPluginURL:function(){return Qn}},Da=function(){!Hn.isLoading()&&!Hn.isLoaded()&&Sa()==="deferred"&&qa()},pa=function(R,U){this.zoom=R,U?(this.now=U.now,this.fadeDuration=U.fadeDuration,this.zoomHistory=U.zoomHistory,this.transition=U.transition):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Ft,this.transition={})};pa.prototype.isSupportedScript=function(R){return _n(R,Hn.isLoaded())},pa.prototype.crossFadingFactor=function(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)},pa.prototype.getCrossfadeParameters=function(){var R=this.zoom,U=R-Math.floor(R),ee=this.crossFadingFactor();return R>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:U+(1-U)*ee}:{fromScale:.5,toScale:1,t:1-(1-ee)*U}};var Ba=function(R,U){this.property=R,this.value=U,this.expression=Vl(U===void 0?R.specification.default:U,R.specification)};Ba.prototype.isDataDriven=function(){return this.expression.kind==="source"||this.expression.kind==="composite"},Ba.prototype.possiblyEvaluate=function(R,U,ee){return this.property.possiblyEvaluate(this,R,U,ee)};var li=function(R){this.property=R,this.value=new Ba(R,void 0)};li.prototype.transitioned=function(R,U){return new zi(this.property,this.value,U,m({},R.transition,this.transition),R.now)},li.prototype.untransitioned=function(){return new zi(this.property,this.value,null,{},0)};var ja=function(R){this._properties=R,this._values=Object.create(R.defaultTransitionablePropertyValues)};ja.prototype.getValue=function(R){return B(this._values[R].value.value)},ja.prototype.setValue=function(R,U){this._values.hasOwnProperty(R)||(this._values[R]=new li(this._values[R].property)),this._values[R].value=new Ba(this._values[R].property,U===null?void 0:B(U))},ja.prototype.getTransition=function(R){return B(this._values[R].transition)},ja.prototype.setTransition=function(R,U){this._values.hasOwnProperty(R)||(this._values[R]=new li(this._values[R].property)),this._values[R].transition=B(U)||void 0},ja.prototype.serialize=function(){for(var R={},U=0,ee=Object.keys(this._values);Uthis.end)return this.prior=null,xe;if(this.value.isDataDriven())return this.prior=null,xe;if(ueEe.zoomHistory.lastIntegerZoom?{from:ee,to:ue}:{from:xe,to:ue}},R.prototype.interpolate=function(ee){return ee},R}(xa),ho=function(R){this.specification=R};ho.prototype.possiblyEvaluate=function(R,U,ee,ue){if(R.value!==void 0)if(R.expression.kind==="constant"){var xe=R.expression.evaluate(U,null,{},ee,ue);return this._calculate(xe,xe,xe,U)}else return this._calculate(R.expression.evaluate(new pa(Math.floor(U.zoom-1),U)),R.expression.evaluate(new pa(Math.floor(U.zoom),U)),R.expression.evaluate(new pa(Math.floor(U.zoom+1),U)),U)},ho.prototype._calculate=function(R,U,ee,ue){var xe=ue.zoom;return xe>ue.zoomHistory.lastIntegerZoom?{from:R,to:U}:{from:ee,to:U}},ho.prototype.interpolate=function(R){return R};var Vi=function(R){this.specification=R};Vi.prototype.possiblyEvaluate=function(R,U,ee,ue){return!!R.expression.evaluate(U,null,{},ee,ue)},Vi.prototype.interpolate=function(){return!1};var ei=function(R){this.properties=R,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(var U in R){var ee=R[U];ee.specification.overridable&&this.overridableProperties.push(U);var ue=this.defaultPropertyValues[U]=new Ba(ee,void 0),xe=this.defaultTransitionablePropertyValues[U]=new li(ee);this.defaultTransitioningPropertyValues[U]=xe.untransitioned(),this.defaultPossiblyEvaluatedValues[U]=ue.possiblyEvaluate({})}};De("DataDrivenProperty",xa),De("DataConstantProperty",qn),De("CrossFadedDataDrivenProperty",so),De("CrossFadedProperty",ho),De("ColorRampProperty",Vi);var Pi="-transition",Mi=function(D){function R(U,ee){if(D.call(this),this.id=U.id,this.type=U.type,this._featureFilter={filter:function(){return!0},needGeometry:!1},U.type!=="custom"&&(U=U,this.metadata=U.metadata,this.minzoom=U.minzoom,this.maxzoom=U.maxzoom,U.type!=="background"&&(this.source=U.source,this.sourceLayer=U["source-layer"],this.filter=U.filter),ee.layout&&(this._unevaluatedLayout=new Ui(ee.layout)),ee.paint)){this._transitionablePaint=new ja(ee.paint);for(var ue in U.paint)this.setPaintProperty(ue,U.paint[ue],{validate:!1});for(var xe in U.layout)this.setLayoutProperty(xe,U.layout[xe],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new Ki(ee.paint)}}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.getCrossfadeParameters=function(){return this._crossfadeParameters},R.prototype.getLayoutProperty=function(ee){return ee==="visibility"?this.visibility:this._unevaluatedLayout.getValue(ee)},R.prototype.setLayoutProperty=function(ee,ue,xe){if(xe===void 0&&(xe={}),ue!=null){var Ee="layers."+this.id+".layout."+ee;if(this._validate(Ta,Ee,ee,ue,xe))return}if(ee==="visibility"){this.visibility=ue;return}this._unevaluatedLayout.setValue(ee,ue)},R.prototype.getPaintProperty=function(ee){return x(ee,Pi)?this._transitionablePaint.getTransition(ee.slice(0,-Pi.length)):this._transitionablePaint.getValue(ee)},R.prototype.setPaintProperty=function(ee,ue,xe){if(xe===void 0&&(xe={}),ue!=null){var Ee="layers."+this.id+".paint."+ee;if(this._validate(wa,Ee,ee,ue,xe))return!1}if(x(ee,Pi))return this._transitionablePaint.setTransition(ee.slice(0,-Pi.length),ue||void 0),!1;var Ye=this._transitionablePaint._values[ee],ot=Ye.property.specification["property-type"]==="cross-faded-data-driven",mt=Ye.value.isDataDriven(),At=Ye.value;this._transitionablePaint.setValue(ee,ue),this._handleSpecialPaintPropertyUpdate(ee);var Bt=this._transitionablePaint._values[ee].value,Jt=Bt.isDataDriven();return Jt||mt||ot||this._handleOverridablePaintPropertyUpdate(ee,At,Bt)},R.prototype._handleSpecialPaintPropertyUpdate=function(ee){},R.prototype._handleOverridablePaintPropertyUpdate=function(ee,ue,xe){return!1},R.prototype.isHidden=function(ee){return this.minzoom&&ee=this.maxzoom?!0:this.visibility==="none"},R.prototype.updateTransitions=function(ee){this._transitioningPaint=this._transitionablePaint.transitioned(ee,this._transitioningPaint)},R.prototype.hasTransition=function(){return this._transitioningPaint.hasTransition()},R.prototype.recalculate=function(ee,ue){ee.getCrossfadeParameters&&(this._crossfadeParameters=ee.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(ee,void 0,ue)),this.paint=this._transitioningPaint.possiblyEvaluate(ee,void 0,ue)},R.prototype.serialize=function(){var ee={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&&(ee.layout=ee.layout||{},ee.layout.visibility=this.visibility),I(ee,function(ue,xe){return ue!==void 0&&!(xe==="layout"&&!Object.keys(ue).length)&&!(xe==="paint"&&!Object.keys(ue).length)})},R.prototype._validate=function(ee,ue,xe,Ee,Ye){return Ye===void 0&&(Ye={}),Ye&&Ye.validate===!1?!1:Aa(this,ee.call(Sn,{key:ue,layerType:this.type,objectKey:xe,value:Ee,styleSpec:yr,style:{glyphs:!0,sprite:!0}}))},R.prototype.is3D=function(){return!1},R.prototype.isTileClipped=function(){return!1},R.prototype.hasOffscreenPass=function(){return!1},R.prototype.resize=function(){},R.prototype.isStateDependent=function(){for(var ee in this.paint._values){var ue=this.paint.get(ee);if(!(!(ue instanceof ui)||!Ko(ue.property.specification))&&(ue.value.kind==="source"||ue.value.kind==="composite")&&ue.value.isStateDependent)return!0}return!1},R}(sr),Bo={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array},Qo=function(R,U){this._structArray=R,this._pos1=U*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8},pi=128,Zs=5,Na=function(){this.isTransferred=!1,this.capacity=-1,this.resize(0)};Na.serialize=function(R,U){return R._trim(),U&&(R.isTransferred=!0,U.push(R.arrayBuffer)),{length:R.length,arrayBuffer:R.arrayBuffer}},Na.deserialize=function(R){var U=Object.create(this.prototype);return U.arrayBuffer=R.arrayBuffer,U.length=R.length,U.capacity=R.arrayBuffer.byteLength/U.bytesPerElement,U._refreshViews(),U},Na.prototype._trim=function(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())},Na.prototype.clear=function(){this.length=0},Na.prototype.resize=function(R){this.reserve(R),this.length=R},Na.prototype.reserve=function(R){if(R>this.capacity){this.capacity=Math.max(R,Math.floor(this.capacity*Zs),pi),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);var U=this.uint8;this._refreshViews(),U&&this.uint8.set(U)}},Na.prototype._refreshViews=function(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")};function gi(D,R){R===void 0&&(R=1);var U=0,ee=0,ue=D.map(function(Ee){var Ye=wf(Ee.type),ot=U=Sc(U,Math.max(R,Ye)),mt=Ee.components||1;return ee=Math.max(ee,Ye),U+=Ye*mt,{name:Ee.name,type:Ee.type,components:mt,offset:ot}}),xe=Sc(U,Math.max(ee,R));return{members:ue,size:xe,alignment:R}}function wf(D){return Bo[D].BYTES_PER_ELEMENT}function Sc(D,R){return Math.ceil(D/R)*R}var hu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ee,ue)},R.prototype.emplace=function(ee,ue,xe){var Ee=ee*2;return this.int16[Ee+0]=ue,this.int16[Ee+1]=xe,ee},R}(Na);hu.prototype.bytesPerElement=4,De("StructArrayLayout2i4",hu);var rc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee){var Ye=this.length;return this.resize(Ye+1),this.emplace(Ye,ee,ue,xe,Ee)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye){var ot=ee*4;return this.int16[ot+0]=ue,this.int16[ot+1]=xe,this.int16[ot+2]=Ee,this.int16[ot+3]=Ye,ee},R}(Na);rc.prototype.bytesPerElement=8,De("StructArrayLayout4i8",rc);var Wl=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot){var mt=this.length;return this.resize(mt+1),this.emplace(mt,ee,ue,xe,Ee,Ye,ot)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt){var At=ee*6;return this.int16[At+0]=ue,this.int16[At+1]=xe,this.int16[At+2]=Ee,this.int16[At+3]=Ye,this.int16[At+4]=ot,this.int16[At+5]=mt,ee},R}(Na);Wl.prototype.bytesPerElement=12,De("StructArrayLayout2i4i12",Wl);var Hu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot){var mt=this.length;return this.resize(mt+1),this.emplace(mt,ee,ue,xe,Ee,Ye,ot)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt){var At=ee*4,Bt=ee*8;return this.int16[At+0]=ue,this.int16[At+1]=xe,this.uint8[Bt+4]=Ee,this.uint8[Bt+5]=Ye,this.uint8[Bt+6]=ot,this.uint8[Bt+7]=mt,ee},R}(Na);Hu.prototype.bytesPerElement=8,De("StructArrayLayout2i4ub8",Hu);var Gu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ee,ue)},R.prototype.emplace=function(ee,ue,xe){var Ee=ee*2;return this.float32[Ee+0]=ue,this.float32[Ee+1]=xe,ee},R}(Na);Gu.prototype.bytesPerElement=8,De("StructArrayLayout2f8",Gu);var Co=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt){var Zt=this.length;return this.resize(Zt+1),this.emplace(Zt,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt){var hr=ee*10;return this.uint16[hr+0]=ue,this.uint16[hr+1]=xe,this.uint16[hr+2]=Ee,this.uint16[hr+3]=Ye,this.uint16[hr+4]=ot,this.uint16[hr+5]=mt,this.uint16[hr+6]=At,this.uint16[hr+7]=Bt,this.uint16[hr+8]=Jt,this.uint16[hr+9]=Zt,ee},R}(Na);Co.prototype.bytesPerElement=20,De("StructArrayLayout10ui20",Co);var Yl=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr){var Pr=this.length;return this.resize(Pr+1),this.emplace(Pr,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr){var tn=ee*12;return this.int16[tn+0]=ue,this.int16[tn+1]=xe,this.int16[tn+2]=Ee,this.int16[tn+3]=Ye,this.uint16[tn+4]=ot,this.uint16[tn+5]=mt,this.uint16[tn+6]=At,this.uint16[tn+7]=Bt,this.int16[tn+8]=Jt,this.int16[tn+9]=Zt,this.int16[tn+10]=hr,this.int16[tn+11]=Pr,ee},R}(Na);Yl.prototype.bytesPerElement=24,De("StructArrayLayout4i4ui4i24",Yl);var nc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ee,ue,xe)},R.prototype.emplace=function(ee,ue,xe,Ee){var Ye=ee*3;return this.float32[Ye+0]=ue,this.float32[Ye+1]=xe,this.float32[Ye+2]=Ee,ee},R}(Na);nc.prototype.bytesPerElement=12,De("StructArrayLayout3f12",nc);var ac=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee){var ue=this.length;return this.resize(ue+1),this.emplace(ue,ee)},R.prototype.emplace=function(ee,ue){var xe=ee*1;return this.uint32[xe+0]=ue,ee},R}(Na);ac.prototype.bytesPerElement=4,De("StructArrayLayout1ul4",ac);var Tf=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.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)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt){var Jt=this.length;return this.resize(Jt+1),this.emplace(Jt,ee,ue,xe,Ee,Ye,ot,mt,At,Bt)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt){var Zt=ee*10,hr=ee*5;return this.int16[Zt+0]=ue,this.int16[Zt+1]=xe,this.int16[Zt+2]=Ee,this.int16[Zt+3]=Ye,this.int16[Zt+4]=ot,this.int16[Zt+5]=mt,this.uint32[hr+3]=At,this.uint16[Zt+8]=Bt,this.uint16[Zt+9]=Jt,ee},R}(Na);Tf.prototype.bytesPerElement=20,De("StructArrayLayout6i1ul2ui20",Tf);var Df=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot){var mt=this.length;return this.resize(mt+1),this.emplace(mt,ee,ue,xe,Ee,Ye,ot)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt){var At=ee*6;return this.int16[At+0]=ue,this.int16[At+1]=xe,this.int16[At+2]=Ee,this.int16[At+3]=Ye,this.int16[At+4]=ot,this.int16[At+5]=mt,ee},R}(Na);Df.prototype.bytesPerElement=12,De("StructArrayLayout2i2i2i12",Df);var bl=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye){var ot=this.length;return this.resize(ot+1),this.emplace(ot,ee,ue,xe,Ee,Ye)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot){var mt=ee*4,At=ee*8;return this.float32[mt+0]=ue,this.float32[mt+1]=xe,this.float32[mt+2]=Ee,this.int16[At+6]=Ye,this.int16[At+7]=ot,ee},R}(Na);bl.prototype.bytesPerElement=16,De("StructArrayLayout2f1f2i16",bl);var No=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee){var Ye=this.length;return this.resize(Ye+1),this.emplace(Ye,ee,ue,xe,Ee)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye){var ot=ee*12,mt=ee*3;return this.uint8[ot+0]=ue,this.uint8[ot+1]=xe,this.float32[mt+1]=Ee,this.float32[mt+2]=Ye,ee},R}(Na);No.prototype.bytesPerElement=12,De("StructArrayLayout2ub2f12",No);var wl=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ee,ue,xe)},R.prototype.emplace=function(ee,ue,xe,Ee){var Ye=ee*3;return this.uint16[Ye+0]=ue,this.uint16[Ye+1]=xe,this.uint16[Ye+2]=Ee,ee},R}(Na);wl.prototype.bytesPerElement=6,De("StructArrayLayout3ui6",wl);var Af=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.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)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn){var yn=this.length;return this.resize(yn+1),this.emplace(yn,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn,yn){var Ln=ee*24,On=ee*12,jn=ee*48;return this.int16[Ln+0]=ue,this.int16[Ln+1]=xe,this.uint16[Ln+2]=Ee,this.uint16[Ln+3]=Ye,this.uint32[On+2]=ot,this.uint32[On+3]=mt,this.uint32[On+4]=At,this.uint16[Ln+10]=Bt,this.uint16[Ln+11]=Jt,this.uint16[Ln+12]=Zt,this.float32[On+7]=hr,this.float32[On+8]=Pr,this.uint8[jn+36]=tn,this.uint8[jn+37]=jr,this.uint8[jn+38]=mn,this.uint32[On+10]=cn,this.int16[Ln+22]=yn,ee},R}(Na);Af.prototype.bytesPerElement=48,De("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Af);var If=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.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)},R.prototype.emplaceBack=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn,yn,Ln,On,jn,Yn,va,oa,ha,Ra,da,ma){var _a=this.length;return this.resize(_a+1),this.emplace(_a,ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn,yn,Ln,On,jn,Yn,va,oa,ha,Ra,da,ma)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye,ot,mt,At,Bt,Jt,Zt,hr,Pr,tn,jr,mn,cn,yn,Ln,On,jn,Yn,va,oa,ha,Ra,da,ma,_a){var La=ee*34,Ja=ee*17;return this.int16[La+0]=ue,this.int16[La+1]=xe,this.int16[La+2]=Ee,this.int16[La+3]=Ye,this.int16[La+4]=ot,this.int16[La+5]=mt,this.int16[La+6]=At,this.int16[La+7]=Bt,this.uint16[La+8]=Jt,this.uint16[La+9]=Zt,this.uint16[La+10]=hr,this.uint16[La+11]=Pr,this.uint16[La+12]=tn,this.uint16[La+13]=jr,this.uint16[La+14]=mn,this.uint16[La+15]=cn,this.uint16[La+16]=yn,this.uint16[La+17]=Ln,this.uint16[La+18]=On,this.uint16[La+19]=jn,this.uint16[La+20]=Yn,this.uint16[La+21]=va,this.uint16[La+22]=oa,this.uint32[Ja+12]=ha,this.float32[Ja+13]=Ra,this.float32[Ja+14]=da,this.float32[Ja+15]=ma,this.float32[Ja+16]=_a,ee},R}(Na);If.prototype.bytesPerElement=68,De("StructArrayLayout8i15ui1ul4f68",If);var Wu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee){var ue=this.length;return this.resize(ue+1),this.emplace(ue,ee)},R.prototype.emplace=function(ee,ue){var xe=ee*1;return this.float32[xe+0]=ue,ee},R}(Na);Wu.prototype.bytesPerElement=4,De("StructArrayLayout1f4",Wu);var ic=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ee,ue,xe)},R.prototype.emplace=function(ee,ue,xe,Ee){var Ye=ee*3;return this.int16[Ye+0]=ue,this.int16[Ye+1]=xe,this.int16[Ye+2]=Ee,ee},R}(Na);ic.prototype.bytesPerElement=6,De("StructArrayLayout3i6",ic);var Xl=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe){var Ee=this.length;return this.resize(Ee+1),this.emplace(Ee,ee,ue,xe)},R.prototype.emplace=function(ee,ue,xe,Ee){var Ye=ee*2,ot=ee*4;return this.uint32[Ye+0]=ue,this.uint16[ot+2]=xe,this.uint16[ot+3]=Ee,ee},R}(Na);Xl.prototype.bytesPerElement=8,De("StructArrayLayout1ul2ui8",Xl);var Mf=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue){var xe=this.length;return this.resize(xe+1),this.emplace(xe,ee,ue)},R.prototype.emplace=function(ee,ue,xe){var Ee=ee*2;return this.uint16[Ee+0]=ue,this.uint16[Ee+1]=xe,ee},R}(Na);Mf.prototype.bytesPerElement=4,De("StructArrayLayout2ui4",Mf);var Yu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee){var ue=this.length;return this.resize(ue+1),this.emplace(ue,ee)},R.prototype.emplace=function(ee,ue){var xe=ee*1;return this.uint16[xe+0]=ue,ee},R}(Na);Yu.prototype.bytesPerElement=2,De("StructArrayLayout1ui2",Yu);var vu=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._refreshViews=function(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)},R.prototype.emplaceBack=function(ee,ue,xe,Ee){var Ye=this.length;return this.resize(Ye+1),this.emplace(Ye,ee,ue,xe,Ee)},R.prototype.emplace=function(ee,ue,xe,Ee,Ye){var ot=ee*4;return this.float32[ot+0]=ue,this.float32[ot+1]=xe,this.float32[ot+2]=Ee,this.float32[ot+3]=Ye,ee},R}(Na);vu.prototype.bytesPerElement=16,De("StructArrayLayout4f16",vu);var Ec=function(D){function R(){D.apply(this,arguments)}R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R;var U={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 U.anchorPointX.get=function(){return this._structArray.int16[this._pos2+0]},U.anchorPointY.get=function(){return this._structArray.int16[this._pos2+1]},U.x1.get=function(){return this._structArray.int16[this._pos2+2]},U.y1.get=function(){return this._structArray.int16[this._pos2+3]},U.x2.get=function(){return this._structArray.int16[this._pos2+4]},U.y2.get=function(){return this._structArray.int16[this._pos2+5]},U.featureIndex.get=function(){return this._structArray.uint32[this._pos4+3]},U.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+8]},U.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+9]},U.anchorPoint.get=function(){return new r(this.anchorPointX,this.anchorPointY)},Object.defineProperties(R.prototype,U),R}(Qo);Ec.prototype.size=20;var oc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.get=function(ee){return new Ec(this,ee)},R}(Tf);De("CollisionBoxArray",oc);var du=function(D){function R(){D.apply(this,arguments)}R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R;var U={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 U.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},U.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},U.glyphStartIndex.get=function(){return this._structArray.uint16[this._pos2+2]},U.numGlyphs.get=function(){return this._structArray.uint16[this._pos2+3]},U.vertexStartIndex.get=function(){return this._structArray.uint32[this._pos4+2]},U.lineStartIndex.get=function(){return this._structArray.uint32[this._pos4+3]},U.lineLength.get=function(){return this._structArray.uint32[this._pos4+4]},U.segment.get=function(){return this._structArray.uint16[this._pos2+10]},U.lowerSize.get=function(){return this._structArray.uint16[this._pos2+11]},U.upperSize.get=function(){return this._structArray.uint16[this._pos2+12]},U.lineOffsetX.get=function(){return this._structArray.float32[this._pos4+7]},U.lineOffsetY.get=function(){return this._structArray.float32[this._pos4+8]},U.writingMode.get=function(){return this._structArray.uint8[this._pos1+36]},U.placedOrientation.get=function(){return this._structArray.uint8[this._pos1+37]},U.placedOrientation.set=function(ee){this._structArray.uint8[this._pos1+37]=ee},U.hidden.get=function(){return this._structArray.uint8[this._pos1+38]},U.hidden.set=function(ee){this._structArray.uint8[this._pos1+38]=ee},U.crossTileID.get=function(){return this._structArray.uint32[this._pos4+10]},U.crossTileID.set=function(ee){this._structArray.uint32[this._pos4+10]=ee},U.associatedIconIndex.get=function(){return this._structArray.int16[this._pos2+22]},Object.defineProperties(R.prototype,U),R}(Qo);du.prototype.size=48;var sc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.get=function(ee){return new du(this,ee)},R}(Af);De("PlacedSymbolArray",sc);var Xu=function(D){function R(){D.apply(this,arguments)}R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R;var U={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 U.anchorX.get=function(){return this._structArray.int16[this._pos2+0]},U.anchorY.get=function(){return this._structArray.int16[this._pos2+1]},U.rightJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+2]},U.centerJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+3]},U.leftJustifiedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+4]},U.verticalPlacedTextSymbolIndex.get=function(){return this._structArray.int16[this._pos2+5]},U.placedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+6]},U.verticalPlacedIconSymbolIndex.get=function(){return this._structArray.int16[this._pos2+7]},U.key.get=function(){return this._structArray.uint16[this._pos2+8]},U.textBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+9]},U.textBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+10]},U.verticalTextBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+11]},U.verticalTextBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+12]},U.iconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+13]},U.iconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+14]},U.verticalIconBoxStartIndex.get=function(){return this._structArray.uint16[this._pos2+15]},U.verticalIconBoxEndIndex.get=function(){return this._structArray.uint16[this._pos2+16]},U.featureIndex.get=function(){return this._structArray.uint16[this._pos2+17]},U.numHorizontalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+18]},U.numVerticalGlyphVertices.get=function(){return this._structArray.uint16[this._pos2+19]},U.numIconVertices.get=function(){return this._structArray.uint16[this._pos2+20]},U.numVerticalIconVertices.get=function(){return this._structArray.uint16[this._pos2+21]},U.useRuntimeCollisionCircles.get=function(){return this._structArray.uint16[this._pos2+22]},U.crossTileID.get=function(){return this._structArray.uint32[this._pos4+12]},U.crossTileID.set=function(ee){this._structArray.uint32[this._pos4+12]=ee},U.textBoxScale.get=function(){return this._structArray.float32[this._pos4+13]},U.textOffset0.get=function(){return this._structArray.float32[this._pos4+14]},U.textOffset1.get=function(){return this._structArray.float32[this._pos4+15]},U.collisionCircleDiameter.get=function(){return this._structArray.float32[this._pos4+16]},Object.defineProperties(R.prototype,U),R}(Qo);Xu.prototype.size=68;var Cc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.get=function(ee){return new Xu(this,ee)},R}(If);De("SymbolInstanceArray",Cc);var Lc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.getoffsetX=function(ee){return this.float32[ee*1+0]},R}(Wu);De("GlyphOffsetArray",Lc);var Ts=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.getx=function(ee){return this.int16[ee*3+0]},R.prototype.gety=function(ee){return this.int16[ee*3+1]},R.prototype.gettileUnitDistanceFromAnchor=function(ee){return this.int16[ee*3+2]},R}(ic);De("SymbolLineVertexArray",Ts);var Pc=function(D){function R(){D.apply(this,arguments)}R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R;var U={featureIndex:{configurable:!0},sourceLayerIndex:{configurable:!0},bucketIndex:{configurable:!0}};return U.featureIndex.get=function(){return this._structArray.uint32[this._pos4+0]},U.sourceLayerIndex.get=function(){return this._structArray.uint16[this._pos2+2]},U.bucketIndex.get=function(){return this._structArray.uint16[this._pos2+3]},Object.defineProperties(R.prototype,U),R}(Qo);Pc.prototype.size=8;var Rc=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.get=function(ee){return new Pc(this,ee)},R}(Xl);De("FeatureIndexArray",Rc);var qc=gi([{name:"a_pos",components:2,type:"Int16"}],4),Dc=qc.members,Hi=function(R){R===void 0&&(R=[]),this.segments=R};Hi.prototype.prepareSegment=function(R,U,ee,ue){var xe=this.segments[this.segments.length-1];return R>Hi.MAX_VERTEX_ARRAY_LENGTH&&O("Max vertices per segment is "+Hi.MAX_VERTEX_ARRAY_LENGTH+": bucket requested "+R),(!xe||xe.vertexLength+R>Hi.MAX_VERTEX_ARRAY_LENGTH||xe.sortKey!==ue)&&(xe={vertexOffset:U.length,primitiveOffset:ee.length,vertexLength:0,primitiveLength:0},ue!==void 0&&(xe.sortKey=ue),this.segments.push(xe)),xe},Hi.prototype.get=function(){return this.segments},Hi.prototype.destroy=function(){for(var R=0,U=this.segments;R>>16)*ot&65535)<<16)&4294967295,At=At<<15|At>>>17,At=(At&65535)*mt+(((At>>>16)*mt&65535)<<16)&4294967295,Ee^=At,Ee=Ee<<13|Ee>>>19,Ye=(Ee&65535)*5+(((Ee>>>16)*5&65535)<<16)&4294967295,Ee=(Ye&65535)+27492+(((Ye>>>16)+58964&65535)<<16);switch(At=0,ue){case 3:At^=(U.charCodeAt(Bt+2)&255)<<16;case 2:At^=(U.charCodeAt(Bt+1)&255)<<8;case 1:At^=U.charCodeAt(Bt)&255,At=(At&65535)*ot+(((At>>>16)*ot&65535)<<16)&4294967295,At=At<<15|At>>>17,At=(At&65535)*mt+(((At>>>16)*mt&65535)<<16)&4294967295,Ee^=At}return Ee^=U.length,Ee^=Ee>>>16,Ee=(Ee&65535)*2246822507+(((Ee>>>16)*2246822507&65535)<<16)&4294967295,Ee^=Ee>>>13,Ee=(Ee&65535)*3266489909+(((Ee>>>16)*3266489909&65535)<<16)&4294967295,Ee^=Ee>>>16,Ee>>>0}D.exports=R}),Q=L(function(D){function R(U,ee){for(var ue=U.length,xe=ee^ue,Ee=0,Ye;ue>=4;)Ye=U.charCodeAt(Ee)&255|(U.charCodeAt(++Ee)&255)<<8|(U.charCodeAt(++Ee)&255)<<16|(U.charCodeAt(++Ee)&255)<<24,Ye=(Ye&65535)*1540483477+(((Ye>>>16)*1540483477&65535)<<16),Ye^=Ye>>>24,Ye=(Ye&65535)*1540483477+(((Ye>>>16)*1540483477&65535)<<16),xe=(xe&65535)*1540483477+(((xe>>>16)*1540483477&65535)<<16)^Ye,ue-=4,++Ee;switch(ue){case 3:xe^=(U.charCodeAt(Ee+2)&255)<<16;case 2:xe^=(U.charCodeAt(Ee+1)&255)<<8;case 1:xe^=U.charCodeAt(Ee)&255,xe=(xe&65535)*1540483477+(((xe>>>16)*1540483477&65535)<<16)}return xe^=xe>>>13,xe=(xe&65535)*1540483477+(((xe>>>16)*1540483477&65535)<<16),xe^=xe>>>15,xe>>>0}D.exports=R}),he=fe,Re=fe,Ge=Q;he.murmur3=Re,he.murmur2=Ge;var tt=function(){this.ids=[],this.positions=[],this.indexed=!1};tt.prototype.add=function(R,U,ee,ue){this.ids.push(zt(R)),this.positions.push(U,ee,ue)},tt.prototype.getPositions=function(R){for(var U=zt(R),ee=0,ue=this.ids.length-1;ee>1;this.ids[xe]>=U?ue=xe:ee=xe+1}for(var Ee=[];this.ids[ee]===U;){var Ye=this.positions[3*ee],ot=this.positions[3*ee+1],mt=this.positions[3*ee+2];Ee.push({index:Ye,start:ot,end:mt}),ee++}return Ee},tt.serialize=function(R,U){var ee=new Float64Array(R.ids),ue=new Uint32Array(R.positions);return Xt(ee,ue,0,ee.length-1),U&&U.push(ee.buffer,ue.buffer),{ids:ee,positions:ue}},tt.deserialize=function(R){var U=new tt;return U.ids=R.ids,U.positions=R.positions,U.indexed=!0,U};var wt=Math.pow(2,53)-1;function zt(D){var R=+D;return!isNaN(R)&&R<=wt?R:he(String(D))}function Xt(D,R,U,ee){for(;U>1],xe=U-1,Ee=ee+1;;){do xe++;while(D[xe]ue);if(xe>=Ee)break;tr(D,xe,Ee),tr(R,3*xe,3*Ee),tr(R,3*xe+1,3*Ee+1),tr(R,3*xe+2,3*Ee+2)}Ee-UEe.x+1||otEe.y+1)&&O("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return U}function fi(D,R){return{type:D.type,id:D.id,properties:D.properties,geometry:R?Wa(D):[]}}function Ua(D,R,U,ee,ue){D.emplaceBack(R*2+(ee+1)/2,U*2+(ue+1)/2)}var ii=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(U){return U.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new hu,this.indexArray=new wl,this.segments=new Hi,this.programConfigurations=new ia(R.layers,R.zoom),this.stateDependentLayerIds=this.layers.filter(function(U){return U.isStateDependent()}).map(function(U){return U.id})};ii.prototype.populate=function(R,U,ee){var ue=this.layers[0],xe=[],Ee=null;ue.type==="circle"&&(Ee=ue.layout.get("circle-sort-key"));for(var Ye=0,ot=R;Ye=ga||Jt<0||Jt>=ga)){var Zt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray,R.sortKey),hr=Zt.vertexLength;Ua(this.layoutVertexArray,Bt,Jt,-1,-1),Ua(this.layoutVertexArray,Bt,Jt,1,-1),Ua(this.layoutVertexArray,Bt,Jt,1,1),Ua(this.layoutVertexArray,Bt,Jt,-1,1),this.indexArray.emplaceBack(hr,hr+1,hr+2),this.indexArray.emplaceBack(hr,hr+3,hr+2),Zt.vertexLength+=4,Zt.primitiveLength+=2}}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,R,ee,{},ue)},De("CircleBucket",ii,{omit:["layers"]});function ka(D,R){for(var U=0;U=3){for(var xe=0;xe1){if(cs(D,R))return!0;for(var ee=0;ee1?D.distSqr(U):D.distSqr(U.sub(R)._mult(ue)._add(R))}function Ks(D,R){for(var U=!1,ee,ue,xe,Ee=0;EeR.y!=xe.y>R.y&&R.x<(xe.x-ue.x)*(R.y-ue.y)/(xe.y-ue.y)+ue.x&&(U=!U)}return U}function Lo(D,R){for(var U=!1,ee=0,ue=D.length-1;eeR.y!=Ee.y>R.y&&R.x<(Ee.x-xe.x)*(R.y-xe.y)/(Ee.y-xe.y)+xe.x&&(U=!U)}return U}function Js(D,R,U,ee,ue){for(var xe=0,Ee=D;xe=Ye.x&&ue>=Ye.y)return!0}var ot=[new r(R,U),new r(R,ue),new r(ee,ue),new r(ee,U)];if(D.length>2)for(var mt=0,At=ot;mtue.x&&R.x>ue.x||D.yue.y&&R.y>ue.y)return!1;var xe=F(D,R,U[0]);return xe!==F(D,R,U[1])||xe!==F(D,R,U[2])||xe!==F(D,R,U[3])}function Po(D,R,U){var ee=R.paint.get(D).value;return ee.kind==="constant"?ee.value:U.programConfigurations.get(R.id).getMaxValue(D)}function Ms(D){return Math.sqrt(D[0]*D[0]+D[1]*D[1])}function Tl(D,R,U,ee,ue){if(!R[0]&&!R[1])return D;var xe=r.convert(R)._mult(ue);U==="viewport"&&xe._rotate(-ee);for(var Ee=[],Ye=0;Ye0&&(xe=1/Math.sqrt(xe)),D[0]=R[0]*xe,D[1]=R[1]*xe,D[2]=R[2]*xe,D}function Nv(D,R){return D[0]*R[0]+D[1]*R[1]+D[2]*R[2]}function Uv(D,R,U){var ee=R[0],ue=R[1],xe=R[2],Ee=U[0],Ye=U[1],ot=U[2];return D[0]=ue*ot-xe*Ye,D[1]=xe*Ee-ee*ot,D[2]=ee*Ye-ue*Ee,D}function Vv(D,R,U){var ee=R[0],ue=R[1],xe=R[2];return D[0]=ee*U[0]+ue*U[3]+xe*U[6],D[1]=ee*U[1]+ue*U[4]+xe*U[7],D[2]=ee*U[2]+ue*U[5]+xe*U[8],D}var Hv=nh;(function(){var D=Ef();return function(R,U,ee,ue,xe,Ee){var Ye,ot;for(U||(U=3),ee||(ee=0),ue?ot=Math.min(ue*U+ee,R.length):ot=R.length,Ye=ee;YeD.width||ue.height>D.height||U.x>D.width-ue.width||U.y>D.height-ue.height)throw new RangeError("out of range source coordinates for image copy");if(ue.width>R.width||ue.height>R.height||ee.x>R.width-ue.width||ee.y>R.height-ue.height)throw new RangeError("out of range destination coordinates for image copy");for(var Ee=D.data,Ye=R.data,ot=0;ot80*U){Ye=mt=D[0],ot=At=D[1];for(var hr=U;hrmt&&(mt=Bt),Jt>At&&(At=Jt);Zt=Math.max(mt-Ye,At-ot),Zt=Zt!==0?1/Zt:0}return fc(xe,Ee,U,Ye,ot,Zt),Ee}function _h(D,R,U,ee,ue){var xe,Ee;if(ue===fh(D,R,U,ee)>0)for(xe=R;xe=R;xe-=ee)Ee=Oh(xe,D[xe],D[xe+1],Ee);return Ee&&_c(Ee,Ee.next)&&(hc(Ee),Ee=Ee.next),Ee}function Qu(D,R){if(!D)return D;R||(R=D);var U=D,ee;do if(ee=!1,!U.steiner&&(_c(U,U.next)||Gi(U.prev,U,U.next)===0)){if(hc(U),U=R=U.prev,U===U.next)break;ee=!0}else U=U.next;while(ee||U!==R);return R}function fc(D,R,U,ee,ue,xe,Ee){if(D){!Ee&&xe&&pd(D,ee,ue,xe);for(var Ye=D,ot,mt;D.prev!==D.next;){if(ot=D.prev,mt=D.next,xe?sd(D,ee,ue,xe):od(D)){R.push(ot.i/U),R.push(D.i/U),R.push(mt.i/U),hc(D),D=mt.next,Ye=mt.next;continue}if(D=mt,D===Ye){Ee?Ee===1?(D=ld(Qu(D),R,U),fc(D,R,U,ee,ue,xe,2)):Ee===2&&ud(D,R,U,ee,ue,xe):fc(Qu(D),R,U,ee,ue,xe,1);break}}}}function od(D){var R=D.prev,U=D,ee=D.next;if(Gi(R,U,ee)>=0)return!1;for(var ue=D.next.next;ue!==D.prev;){if(Uf(R.x,R.y,U.x,U.y,ee.x,ee.y,ue.x,ue.y)&&Gi(ue.prev,ue,ue.next)>=0)return!1;ue=ue.next}return!0}function sd(D,R,U,ee){var ue=D.prev,xe=D,Ee=D.next;if(Gi(ue,xe,Ee)>=0)return!1;for(var Ye=ue.xxe.x?ue.x>Ee.x?ue.x:Ee.x:xe.x>Ee.x?xe.x:Ee.x,At=ue.y>xe.y?ue.y>Ee.y?ue.y:Ee.y:xe.y>Ee.y?xe.y:Ee.y,Bt=lh(Ye,ot,R,U,ee),Jt=lh(mt,At,R,U,ee),Zt=D.prevZ,hr=D.nextZ;Zt&&Zt.z>=Bt&&hr&&hr.z<=Jt;){if(Zt!==D.prev&&Zt!==D.next&&Uf(ue.x,ue.y,xe.x,xe.y,Ee.x,Ee.y,Zt.x,Zt.y)&&Gi(Zt.prev,Zt,Zt.next)>=0||(Zt=Zt.prevZ,hr!==D.prev&&hr!==D.next&&Uf(ue.x,ue.y,xe.x,xe.y,Ee.x,Ee.y,hr.x,hr.y)&&Gi(hr.prev,hr,hr.next)>=0))return!1;hr=hr.nextZ}for(;Zt&&Zt.z>=Bt;){if(Zt!==D.prev&&Zt!==D.next&&Uf(ue.x,ue.y,xe.x,xe.y,Ee.x,Ee.y,Zt.x,Zt.y)&&Gi(Zt.prev,Zt,Zt.next)>=0)return!1;Zt=Zt.prevZ}for(;hr&&hr.z<=Jt;){if(hr!==D.prev&&hr!==D.next&&Uf(ue.x,ue.y,xe.x,xe.y,Ee.x,Ee.y,hr.x,hr.y)&&Gi(hr.prev,hr,hr.next)>=0)return!1;hr=hr.nextZ}return!0}function ld(D,R,U){var ee=D;do{var ue=ee.prev,xe=ee.next.next;!_c(ue,xe)&&zh(ue,ee,ee.next,xe)&&cc(ue,xe)&&cc(xe,ue)&&(R.push(ue.i/U),R.push(ee.i/U),R.push(xe.i/U),hc(ee),hc(ee.next),ee=D=xe),ee=ee.next}while(ee!==D);return Qu(ee)}function ud(D,R,U,ee,ue,xe){var Ee=D;do{for(var Ye=Ee.next.next;Ye!==Ee.prev;){if(Ee.i!==Ye.i&&md(Ee,Ye)){var ot=Fh(Ee,Ye);Ee=Qu(Ee,Ee.next),ot=Qu(ot,ot.next),fc(Ee,R,U,ee,ue,xe),fc(ot,R,U,ee,ue,xe);return}Ye=Ye.next}Ee=Ee.next}while(Ee!==D)}function fd(D,R,U,ee){var ue=[],xe,Ee,Ye,ot,mt;for(xe=0,Ee=R.length;xe=U.next.y&&U.next.y!==U.y){var Ye=U.x+(ue-U.y)*(U.next.x-U.x)/(U.next.y-U.y);if(Ye<=ee&&Ye>xe){if(xe=Ye,Ye===ee){if(ue===U.y)return U;if(ue===U.next.y)return U.next}Ee=U.x=U.x&&U.x>=mt&&ee!==U.x&&Uf(ueEe.x||U.x===Ee.x&&dd(Ee,U)))&&(Ee=U,Bt=Jt)),U=U.next;while(U!==ot);return Ee}function dd(D,R){return Gi(D.prev,D,R.prev)<0&&Gi(R.next,D,D.next)<0}function pd(D,R,U,ee){var ue=D;do ue.z===null&&(ue.z=lh(ue.x,ue.y,R,U,ee)),ue.prevZ=ue.prev,ue.nextZ=ue.next,ue=ue.next;while(ue!==D);ue.prevZ.nextZ=null,ue.prevZ=null,gd(ue)}function gd(D){var R,U,ee,ue,xe,Ee,Ye,ot,mt=1;do{for(U=D,D=null,xe=null,Ee=0;U;){for(Ee++,ee=U,Ye=0,R=0;R0||ot>0&ⅇ)Ye!==0&&(ot===0||!ee||U.z<=ee.z)?(ue=U,U=U.nextZ,Ye--):(ue=ee,ee=ee.nextZ,ot--),xe?xe.nextZ=ue:D=ue,ue.prevZ=xe,xe=ue;U=ee}xe.nextZ=null,mt*=2}while(Ee>1);return D}function lh(D,R,U,ee,ue){return D=32767*(D-U)*ue,R=32767*(R-ee)*ue,D=(D|D<<8)&16711935,D=(D|D<<4)&252645135,D=(D|D<<2)&858993459,D=(D|D<<1)&1431655765,R=(R|R<<8)&16711935,R=(R|R<<4)&252645135,R=(R|R<<2)&858993459,R=(R|R<<1)&1431655765,D|R<<1}function yd(D){var R=D,U=D;do(R.x=0&&(D-Ee)*(ee-Ye)-(U-Ee)*(R-Ye)>=0&&(U-Ee)*(xe-Ye)-(ue-Ee)*(ee-Ye)>=0}function md(D,R){return D.next.i!==R.i&&D.prev.i!==R.i&&!xd(D,R)&&(cc(D,R)&&cc(R,D)&&bd(D,R)&&(Gi(D.prev,D,R.prev)||Gi(D,R.prev,R))||_c(D,R)&&Gi(D.prev,D,D.next)>0&&Gi(R.prev,R,R.next)>0)}function Gi(D,R,U){return(R.y-D.y)*(U.x-R.x)-(R.x-D.x)*(U.y-R.y)}function _c(D,R){return D.x===R.x&&D.y===R.y}function zh(D,R,U,ee){var ue=Fc(Gi(D,R,U)),xe=Fc(Gi(D,R,ee)),Ee=Fc(Gi(U,ee,D)),Ye=Fc(Gi(U,ee,R));return!!(ue!==xe&&Ee!==Ye||ue===0&&zc(D,U,R)||xe===0&&zc(D,ee,R)||Ee===0&&zc(U,D,ee)||Ye===0&&zc(U,R,ee))}function zc(D,R,U){return R.x<=Math.max(D.x,U.x)&&R.x>=Math.min(D.x,U.x)&&R.y<=Math.max(D.y,U.y)&&R.y>=Math.min(D.y,U.y)}function Fc(D){return D>0?1:D<0?-1:0}function xd(D,R){var U=D;do{if(U.i!==D.i&&U.next.i!==D.i&&U.i!==R.i&&U.next.i!==R.i&&zh(U,U.next,D,R))return!0;U=U.next}while(U!==D);return!1}function cc(D,R){return Gi(D.prev,D,D.next)<0?Gi(D,R,D.next)>=0&&Gi(D,D.prev,R)>=0:Gi(D,R,D.prev)<0||Gi(D,D.next,R)<0}function bd(D,R){var U=D,ee=!1,ue=(D.x+R.x)/2,xe=(D.y+R.y)/2;do U.y>xe!=U.next.y>xe&&U.next.y!==U.y&&ue<(U.next.x-U.x)*(xe-U.y)/(U.next.y-U.y)+U.x&&(ee=!ee),U=U.next;while(U!==D);return ee}function Fh(D,R){var U=new uh(D.i,D.x,D.y),ee=new uh(R.i,R.x,R.y),ue=D.next,xe=R.prev;return D.next=R,R.prev=D,U.next=ue,ue.prev=U,ee.next=U,U.prev=ee,xe.next=ee,ee.prev=xe,ee}function Oh(D,R,U,ee){var ue=new uh(D,R,U);return ee?(ue.next=ee.next,ue.prev=ee,ee.next.prev=ue,ee.next=ue):(ue.prev=ue,ue.next=ue),ue}function hc(D){D.next.prev=D.prev,D.prev.next=D.next,D.prevZ&&(D.prevZ.nextZ=D.nextZ),D.nextZ&&(D.nextZ.prevZ=D.prevZ)}function uh(D,R,U){this.i=D,this.x=R,this.y=U,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}kc.deviation=function(D,R,U,ee){var ue=R&&R.length,xe=ue?R[0]*U:D.length,Ee=Math.abs(fh(D,0,xe,U));if(ue)for(var Ye=0,ot=R.length;Ye0&&(ee+=D[ue-1].length,U.holes.push(ee))}return U},sh.default=id;function wd(D,R,U,ee,ue){Bh(D,R,U,ee||D.length-1,ue)}function Bh(D,R,U,ee,ue){for(;ee>U;){if(ee-U>600){var xe=ee-U+1,Ee=R-U+1,Ye=Math.log(xe),ot=.5*Math.exp(2*Ye/3),mt=.5*Math.sqrt(Ye*ot*(xe-ot)/xe)*(Ee-xe/2<0?-1:1),At=Math.max(U,Math.floor(R-Ee*ot/xe+mt)),Bt=Math.min(ee,Math.floor(R+(xe-Ee)*ot/xe+mt));Bh(D,R,At,Bt,ue)}var Jt=D[R],Zt=U,hr=ee;for(vc(D,U,R),ue(D[ee],Jt)>0&&vc(D,U,ee);Zt0;)hr--}ue(D[U],Jt)===0?vc(D,U,hr):(hr++,vc(D,hr,ee)),hr<=R&&(U=hr+1),R<=hr&&(ee=hr-1)}}function vc(D,R,U){var ee=D[R];D[R]=D[U],D[U]=ee}function ch(D,R){var U=D.length;if(U<=1)return[D];for(var ee=[],ue,xe,Ee=0;Ee1)for(var ot=0;ot>3}if(ee--,U===1||U===2)ue+=D.readSVarint(),xe+=D.readSVarint(),U===1&&(Ye&&Ee.push(Ye),Ye=[]),Ye.push(new r(ue,xe));else if(U===7)Ye&&Ye.push(Ye[0].clone());else throw new Error("unknown command "+U)}return Ye&&Ee.push(Ye),Ee},Vf.prototype.bbox=function(){var D=this._pbf;D.pos=this._geometry;for(var R=D.readVarint()+D.pos,U=1,ee=0,ue=0,xe=0,Ee=1/0,Ye=-1/0,ot=1/0,mt=-1/0;D.pos>3}if(ee--,U===1||U===2)ue+=D.readSVarint(),xe+=D.readSVarint(),ueYe&&(Ye=ue),xemt&&(mt=xe);else if(U!==7)throw new Error("unknown command "+U)}return[Ee,ot,Ye,mt]},Vf.prototype.toGeoJSON=function(D,R,U){var ee=this.extent*Math.pow(2,U),ue=this.extent*D,xe=this.extent*R,Ee=this.loadGeometry(),Ye=Vf.types[this.type],ot,mt;function At(Zt){for(var hr=0;hr>3;R=ee===1?D.readString():ee===2?D.readFloat():ee===3?D.readDouble():ee===4?D.readVarint64():ee===5?D.readVarint():ee===6?D.readSVarint():ee===7?D.readBoolean():null}return R}Vh.prototype.feature=function(D){if(D<0||D>=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[D];var R=this._pbf.readVarint()+this._pbf.pos;return new Nh(this._pbf,R,this.extent,this._keys,this._values)};var Fd=Od;function Od(D,R){this.layers=D.readFields(Bd,{},R)}function Bd(D,R,U){if(D===3){var ee=new Uh(U,U.readVarint()+U.pos);ee.length&&(R[ee.name]=ee)}}var Nd=Fd,Ud=Nh,Vd=Uh,Hf={VectorTile:Nd,VectorTileFeature:Ud,VectorTileLayer:Vd},Hd=Hf.VectorTileFeature.types,Gd=500,dh=Math.pow(2,13);function dc(D,R,U,ee,ue,xe,Ee,Ye){D.emplaceBack(R,U,Math.floor(ee*dh)*2+Ee,ue*dh*2,xe*dh*2,Math.round(Ye))}var Ml=function(R){this.zoom=R.zoom,this.overscaling=R.overscaling,this.layers=R.layers,this.layerIds=this.layers.map(function(U){return U.id}),this.index=R.index,this.hasPattern=!1,this.layoutVertexArray=new Wl,this.indexArray=new wl,this.programConfigurations=new ia(R.layers,R.zoom),this.segments=new Hi,this.stateDependentLayerIds=this.layers.filter(function(U){return U.isStateDependent()}).map(function(U){return U.id})};Ml.prototype.populate=function(R,U,ee){this.features=[],this.hasPattern=hh("fill-extrusion",this.layers,U);for(var ue=0,xe=R;ue=1){var yn=tn[mn-1];if(!Wd(cn,yn)){Zt.vertexLength+4>Hi.MAX_VERTEX_ARRAY_LENGTH&&(Zt=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));var Ln=cn.sub(yn)._perp()._unit(),On=yn.dist(cn);jr+On>32768&&(jr=0),dc(this.layoutVertexArray,cn.x,cn.y,Ln.x,Ln.y,0,0,jr),dc(this.layoutVertexArray,cn.x,cn.y,Ln.x,Ln.y,0,1,jr),jr+=On,dc(this.layoutVertexArray,yn.x,yn.y,Ln.x,Ln.y,0,0,jr),dc(this.layoutVertexArray,yn.x,yn.y,Ln.x,Ln.y,0,1,jr);var jn=Zt.vertexLength;this.indexArray.emplaceBack(jn,jn+2,jn+1),this.indexArray.emplaceBack(jn+1,jn+2,jn+3),Zt.vertexLength+=4,Zt.primitiveLength+=2}}}}if(Zt.vertexLength+mt>Hi.MAX_VERTEX_ARRAY_LENGTH&&(Zt=this.segments.prepareSegment(mt,this.layoutVertexArray,this.indexArray)),Hd[R.type]==="Polygon"){for(var Yn=[],va=[],oa=Zt.vertexLength,ha=0,Ra=ot;haga)||D.y===R.y&&(D.y<0||D.y>ga)}function Yd(D){return D.every(function(R){return R.x<0})||D.every(function(R){return R.x>ga})||D.every(function(R){return R.y<0})||D.every(function(R){return R.y>ga})}var Xd=new ei({"fill-extrusion-opacity":new qn(yr["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new xa(yr["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new qn(yr["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new qn(yr["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new so(yr["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new xa(yr["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new xa(yr["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new qn(yr["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])}),Zd={paint:Xd},jd=function(D){function R(U){D.call(this,U,Zd)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.createBucket=function(ee){return new Ml(ee)},R.prototype.queryRadius=function(){return Ms(this.paint.get("fill-extrusion-translate"))},R.prototype.is3D=function(){return!0},R.prototype.queryIntersectsFeature=function(ee,ue,xe,Ee,Ye,ot,mt,At){var Bt=Tl(ee,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),ot.angle,mt),Jt=this.paint.get("fill-extrusion-height").evaluate(ue,xe),Zt=this.paint.get("fill-extrusion-base").evaluate(ue,xe),hr=Qd(Bt,At,ot,0),Pr=Jd(Ee,Zt,Jt,At),tn=Pr[0],jr=Pr[1];return Kd(tn,jr,hr)},R}(Mi);function pc(D,R){return D.x*R.x+D.y*R.y}function Hh(D,R){if(D.length===1){for(var U=0,ee=R[U++],ue;!ue||ee.equals(ue);)if(ue=R[U++],!ue)return 1/0;for(;U=2&&R[mt-1].equals(R[mt-2]);)mt--;for(var At=0;At0;if(Yn&&mn>At){var oa=Zt.dist(hr);if(oa>2*Bt){var ha=Zt.sub(Zt.sub(hr)._mult(Bt/oa)._round());this.updateDistance(hr,ha),this.addCurrentVertex(ha,tn,0,0,Jt),hr=ha}}var Ra=hr&&Pr,da=Ra?ee:ot?"butt":ue;if(Ra&&da==="round"&&(Onxe&&(da="bevel"),da==="bevel"&&(On>2&&(da="flipbevel"),On100)cn=jr.mult(-1);else{var ma=On*tn.add(jr).mag()/tn.sub(jr).mag();cn._perp()._mult(ma*(va?-1:1))}this.addCurrentVertex(Zt,cn,0,0,Jt),this.addCurrentVertex(Zt,cn.mult(-1),0,0,Jt)}else if(da==="bevel"||da==="fakeround"){var _a=-Math.sqrt(On*On-1),La=va?_a:0,Ja=va?0:_a;if(hr&&this.addCurrentVertex(Zt,tn,La,Ja,Jt),da==="fakeround")for(var si=Math.round(jn*180/Math.PI/ip),Qa=1;Qa2*Bt){var Xi=Zt.add(Pr.sub(Zt)._mult(Bt/ro)._round());this.updateDistance(Zt,Xi),this.addCurrentVertex(Xi,jr,0,0,Jt),Zt=Xi}}}}},Ro.prototype.addCurrentVertex=function(R,U,ee,ue,xe,Ee){Ee===void 0&&(Ee=!1);var Ye=U.x+U.y*ee,ot=U.y-U.x*ee,mt=-U.x+U.y*ue,At=-U.y-U.x*ue;this.addHalfVertex(R,Ye,ot,Ee,!1,ee,xe),this.addHalfVertex(R,mt,At,Ee,!0,-ue,xe),this.distance>Yh/2&&this.totalDistance===0&&(this.distance=0,this.addCurrentVertex(R,U,ee,ue,xe,Ee))},Ro.prototype.addHalfVertex=function(R,U,ee,ue,xe,Ee,Ye){var ot=R.x,mt=R.y,At=this.lineClips?this.scaledDistance*(Yh-1):this.scaledDistance,Bt=At*Wh;if(this.layoutVertexArray.emplaceBack((ot<<1)+(ue?1:0),(mt<<1)+(xe?1:0),Math.round(Gh*U)+128,Math.round(Gh*ee)+128,(Ee===0?0:Ee<0?-1:1)+1|(Bt&63)<<2,Bt>>6),this.lineClips){var Jt=this.scaledDistance-this.lineClips.start,Zt=this.lineClips.end-this.lineClips.start,hr=Jt/Zt;this.layoutVertexArray2.emplaceBack(hr,this.lineClipsArray.length)}var Pr=Ye.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,this.e2,Pr),Ye.primitiveLength++),xe?this.e2=Pr:this.e1=Pr},Ro.prototype.updateScaledDistance=function(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance},Ro.prototype.updateDistance=function(R,U){this.distance+=R.dist(U),this.updateScaledDistance()},De("LineBucket",Ro,{omit:["layers","patternFeatures"]});var sp=new ei({"line-cap":new qn(yr.layout_line["line-cap"]),"line-join":new xa(yr.layout_line["line-join"]),"line-miter-limit":new qn(yr.layout_line["line-miter-limit"]),"line-round-limit":new qn(yr.layout_line["line-round-limit"]),"line-sort-key":new xa(yr.layout_line["line-sort-key"])}),lp=new ei({"line-opacity":new xa(yr.paint_line["line-opacity"]),"line-color":new xa(yr.paint_line["line-color"]),"line-translate":new qn(yr.paint_line["line-translate"]),"line-translate-anchor":new qn(yr.paint_line["line-translate-anchor"]),"line-width":new xa(yr.paint_line["line-width"]),"line-gap-width":new xa(yr.paint_line["line-gap-width"]),"line-offset":new xa(yr.paint_line["line-offset"]),"line-blur":new xa(yr.paint_line["line-blur"]),"line-dasharray":new ho(yr.paint_line["line-dasharray"]),"line-pattern":new so(yr.paint_line["line-pattern"]),"line-gradient":new Vi(yr.paint_line["line-gradient"])}),Xh={paint:lp,layout:sp},up=function(D){function R(){D.apply(this,arguments)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.possiblyEvaluate=function(ee,ue){return ue=new pa(Math.floor(ue.zoom),{now:ue.now,fadeDuration:ue.fadeDuration,zoomHistory:ue.zoomHistory,transition:ue.transition}),D.prototype.possiblyEvaluate.call(this,ee,ue)},R.prototype.evaluate=function(ee,ue,xe,Ee){return ue=m({},ue,{zoom:Math.floor(ue.zoom)}),D.prototype.evaluate.call(this,ee,ue,xe,Ee)},R}(xa),Zh=new up(Xh.paint.properties["line-width"].specification);Zh.useIntegerZoom=!0;var fp=function(D){function R(U){D.call(this,U,Xh),this.gradientVersion=0}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype._handleSpecialPaintPropertyUpdate=function(ee){if(ee==="line-gradient"){var ue=this._transitionablePaint._values["line-gradient"].value.expression;this.stepInterpolant=ue._styleExpression.expression instanceof wo,this.gradientVersion=(this.gradientVersion+1)%c}},R.prototype.gradientExpression=function(){return this._transitionablePaint._values["line-gradient"].value.expression},R.prototype.recalculate=function(ee,ue){D.prototype.recalculate.call(this,ee,ue),this.paint._values["line-floorwidth"]=Zh.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,ee)},R.prototype.createBucket=function(ee){return new Ro(ee)},R.prototype.queryRadius=function(ee){var ue=ee,xe=jh(Po("line-width",this,ue),Po("line-gap-width",this,ue)),Ee=Po("line-offset",this,ue);return xe/2+Math.abs(Ee)+Ms(this.paint.get("line-translate"))},R.prototype.queryIntersectsFeature=function(ee,ue,xe,Ee,Ye,ot,mt){var At=Tl(ee,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),ot.angle,mt),Bt=mt/2*jh(this.paint.get("line-width").evaluate(ue,xe),this.paint.get("line-gap-width").evaluate(ue,xe)),Jt=this.paint.get("line-offset").evaluate(ue,xe);return Jt&&(Ee=cp(Ee,Jt*mt)),Ji(At,Ee,Bt)},R.prototype.isTileClipped=function(){return!0},R}(Mi);function jh(D,R){return R>0?R+2*D:D}function cp(D,R){for(var U=[],ee=new r(0,0),ue=0;ue":"﹀","?":"︖","@":"@","[":"﹇","\\":"\","]":"﹈","^":"^",_:"︳","`":"`","{":"︷","|":"―","}":"︸","~":"~","¢":"¢","£":"£","¥":"¥","¦":"¦","¬":"¬","¯":" ̄","–":"︲","—":"︱","‘":"﹃","’":"﹄","“":"﹁","”":"﹂","…":"︙","‧":"・","₩":"₩","、":"︑","。":"︒","〈":"︿","〉":"﹀","《":"︽","》":"︾","「":"﹁","」":"﹂","『":"﹃","』":"﹄","【":"︻","】":"︼","〔":"︹","〕":"︺","〖":"︗","〗":"︘","!":"︕","(":"︵",")":"︶",",":"︐","-":"︲",".":"・",":":"︓",";":"︔","<":"︿",">":"﹀","?":"︖","[":"﹇","]":"﹈","_":"︳","{":"︷","|":"―","}":"︸","⦅":"︵","⦆":"︶","。":"︒","「":"﹁","」":"﹂"};function xp(D){for(var R="",U=0;U>1,At=-7,Bt=U?ue-1:0,Jt=U?-1:1,Zt=D[R+Bt];for(Bt+=Jt,xe=Zt&(1<<-At)-1,Zt>>=-At,At+=Ye;At>0;xe=xe*256+D[R+Bt],Bt+=Jt,At-=8);for(Ee=xe&(1<<-At)-1,xe>>=-At,At+=ee;At>0;Ee=Ee*256+D[R+Bt],Bt+=Jt,At-=8);if(xe===0)xe=1-mt;else{if(xe===ot)return Ee?NaN:(Zt?-1:1)*(1/0);Ee=Ee+Math.pow(2,ee),xe=xe-mt}return(Zt?-1:1)*Ee*Math.pow(2,xe-ee)},wp=function(D,R,U,ee,ue,xe){var Ee,Ye,ot,mt=xe*8-ue-1,At=(1<>1,Jt=ue===23?Math.pow(2,-24)-Math.pow(2,-77):0,Zt=ee?0:xe-1,hr=ee?1:-1,Pr=R<0||R===0&&1/R<0?1:0;for(R=Math.abs(R),isNaN(R)||R===1/0?(Ye=isNaN(R)?1:0,Ee=At):(Ee=Math.floor(Math.log(R)/Math.LN2),R*(ot=Math.pow(2,-Ee))<1&&(Ee--,ot*=2),Ee+Bt>=1?R+=Jt/ot:R+=Jt*Math.pow(2,1-Bt),R*ot>=2&&(Ee++,ot/=2),Ee+Bt>=At?(Ye=0,Ee=At):Ee+Bt>=1?(Ye=(R*ot-1)*Math.pow(2,ue),Ee=Ee+Bt):(Ye=R*Math.pow(2,Bt-1)*Math.pow(2,ue),Ee=0));ue>=8;D[U+Zt]=Ye&255,Zt+=hr,Ye/=256,ue-=8);for(Ee=Ee<0;D[U+Zt]=Ee&255,Zt+=hr,Ee/=256,mt-=8);D[U+Zt-hr]|=Pr*128},Oc={read:bp,write:wp},Bc=hi;function hi(D){this.buf=ArrayBuffer.isView&&ArrayBuffer.isView(D)?D:new Uint8Array(D||0),this.pos=0,this.type=0,this.length=this.buf.length}hi.Varint=0,hi.Fixed64=1,hi.Bytes=2,hi.Fixed32=5;var ph=65536*65536,Jh=1/ph,Tp=12,Qh=typeof TextDecoder>"u"?null:new TextDecoder("utf8");hi.prototype={destroy:function(){this.buf=null},readFields:function(D,R,U){for(U=U||this.length;this.pos>3,xe=this.pos;this.type=ee&7,D(ue,R,this),this.pos===xe&&this.skip(ee)}return R},readMessage:function(D,R){return this.readFields(D,R,this.readVarint()+this.pos)},readFixed32:function(){var D=Nc(this.buf,this.pos);return this.pos+=4,D},readSFixed32:function(){var D=qh(this.buf,this.pos);return this.pos+=4,D},readFixed64:function(){var D=Nc(this.buf,this.pos)+Nc(this.buf,this.pos+4)*ph;return this.pos+=8,D},readSFixed64:function(){var D=Nc(this.buf,this.pos)+qh(this.buf,this.pos+4)*ph;return this.pos+=8,D},readFloat:function(){var D=Oc.read(this.buf,this.pos,!0,23,4);return this.pos+=4,D},readDouble:function(){var D=Oc.read(this.buf,this.pos,!0,52,8);return this.pos+=8,D},readVarint:function(D){var R=this.buf,U,ee;return ee=R[this.pos++],U=ee&127,ee<128||(ee=R[this.pos++],U|=(ee&127)<<7,ee<128)||(ee=R[this.pos++],U|=(ee&127)<<14,ee<128)||(ee=R[this.pos++],U|=(ee&127)<<21,ee<128)?U:(ee=R[this.pos],U|=(ee&15)<<28,Ap(U,D,this))},readVarint64:function(){return this.readVarint(!0)},readSVarint:function(){var D=this.readVarint();return D%2===1?(D+1)/-2:D/2},readBoolean:function(){return!!this.readVarint()},readString:function(){var D=this.readVarint()+this.pos,R=this.pos;return this.pos=D,D-R>=Tp&&Qh?Op(this.buf,R,D):Fp(this.buf,R,D)},readBytes:function(){var D=this.readVarint()+this.pos,R=this.buf.subarray(this.pos,D);return this.pos=D,R},readPackedVarint:function(D,R){if(this.type!==hi.Bytes)return D.push(this.readVarint(R));var U=gu(this);for(D=D||[];this.pos127;);else if(R===hi.Bytes)this.pos=this.readVarint()+this.pos;else if(R===hi.Fixed32)this.pos+=4;else if(R===hi.Fixed64)this.pos+=8;else throw new Error("Unimplemented type: "+R)},writeTag:function(D,R){this.writeVarint(D<<3|R)},realloc:function(D){for(var R=this.length||16;R268435455||D<0){Mp(D,this);return}this.realloc(4),this.buf[this.pos++]=D&127|(D>127?128:0),!(D<=127)&&(this.buf[this.pos++]=(D>>>=7)&127|(D>127?128:0),!(D<=127)&&(this.buf[this.pos++]=(D>>>=7)&127|(D>127?128:0),!(D<=127)&&(this.buf[this.pos++]=D>>>7&127)))},writeSVarint:function(D){this.writeVarint(D<0?-D*2-1:D*2)},writeBoolean:function(D){this.writeVarint(!!D)},writeString:function(D){D=String(D),this.realloc(D.length*4),this.pos++;var R=this.pos;this.pos=Bp(this.buf,D,this.pos);var U=this.pos-R;U>=128&&$h(R,U,this),this.pos=R-1,this.writeVarint(U),this.pos+=U},writeFloat:function(D){this.realloc(4),Oc.write(this.buf,D,this.pos,!0,23,4),this.pos+=4},writeDouble:function(D){this.realloc(8),Oc.write(this.buf,D,this.pos,!0,52,8),this.pos+=8},writeBytes:function(D){var R=D.length;this.writeVarint(R),this.realloc(R);for(var U=0;U=128&&$h(U,ee,this),this.pos=U-1,this.writeVarint(ee),this.pos+=ee},writeMessage:function(D,R,U){this.writeTag(D,hi.Bytes),this.writeRawMessage(R,U)},writePackedVarint:function(D,R){R.length&&this.writeMessage(D,Cp,R)},writePackedSVarint:function(D,R){R.length&&this.writeMessage(D,Lp,R)},writePackedBoolean:function(D,R){R.length&&this.writeMessage(D,Dp,R)},writePackedFloat:function(D,R){R.length&&this.writeMessage(D,Pp,R)},writePackedDouble:function(D,R){R.length&&this.writeMessage(D,Rp,R)},writePackedFixed32:function(D,R){R.length&&this.writeMessage(D,Ip,R)},writePackedSFixed32:function(D,R){R.length&&this.writeMessage(D,kp,R)},writePackedFixed64:function(D,R){R.length&&this.writeMessage(D,_p,R)},writePackedSFixed64:function(D,R){R.length&&this.writeMessage(D,zp,R)},writeBytesField:function(D,R){this.writeTag(D,hi.Bytes),this.writeBytes(R)},writeFixed32Field:function(D,R){this.writeTag(D,hi.Fixed32),this.writeFixed32(R)},writeSFixed32Field:function(D,R){this.writeTag(D,hi.Fixed32),this.writeSFixed32(R)},writeFixed64Field:function(D,R){this.writeTag(D,hi.Fixed64),this.writeFixed64(R)},writeSFixed64Field:function(D,R){this.writeTag(D,hi.Fixed64),this.writeSFixed64(R)},writeVarintField:function(D,R){this.writeTag(D,hi.Varint),this.writeVarint(R)},writeSVarintField:function(D,R){this.writeTag(D,hi.Varint),this.writeSVarint(R)},writeStringField:function(D,R){this.writeTag(D,hi.Bytes),this.writeString(R)},writeFloatField:function(D,R){this.writeTag(D,hi.Fixed32),this.writeFloat(R)},writeDoubleField:function(D,R){this.writeTag(D,hi.Fixed64),this.writeDouble(R)},writeBooleanField:function(D,R){this.writeVarintField(D,!!R)}};function Ap(D,R,U){var ee=U.buf,ue,xe;if(xe=ee[U.pos++],ue=(xe&112)>>4,xe<128||(xe=ee[U.pos++],ue|=(xe&127)<<3,xe<128)||(xe=ee[U.pos++],ue|=(xe&127)<<10,xe<128)||(xe=ee[U.pos++],ue|=(xe&127)<<17,xe<128)||(xe=ee[U.pos++],ue|=(xe&127)<<24,xe<128)||(xe=ee[U.pos++],ue|=(xe&1)<<31,xe<128))return Gf(D,ue,R);throw new Error("Expected varint not more than 10 bytes")}function gu(D){return D.type===hi.Bytes?D.readVarint()+D.pos:D.pos+1}function Gf(D,R,U){return U?R*4294967296+(D>>>0):(R>>>0)*4294967296+(D>>>0)}function Mp(D,R){var U,ee;if(D>=0?(U=D%4294967296|0,ee=D/4294967296|0):(U=~(-D%4294967296),ee=~(-D/4294967296),U^4294967295?U=U+1|0:(U=0,ee=ee+1|0)),D>=18446744073709552e3||D<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");R.realloc(10),Sp(U,ee,R),Ep(ee,R)}function Sp(D,R,U){U.buf[U.pos++]=D&127|128,D>>>=7,U.buf[U.pos++]=D&127|128,D>>>=7,U.buf[U.pos++]=D&127|128,D>>>=7,U.buf[U.pos++]=D&127|128,D>>>=7,U.buf[U.pos]=D&127}function Ep(D,R){var U=(D&7)<<4;R.buf[R.pos++]|=U|((D>>>=3)?128:0),D&&(R.buf[R.pos++]=D&127|((D>>>=7)?128:0),D&&(R.buf[R.pos++]=D&127|((D>>>=7)?128:0),D&&(R.buf[R.pos++]=D&127|((D>>>=7)?128:0),D&&(R.buf[R.pos++]=D&127|((D>>>=7)?128:0),D&&(R.buf[R.pos++]=D&127)))))}function $h(D,R,U){var ee=R<=16383?1:R<=2097151?2:R<=268435455?3:Math.floor(Math.log(R)/(Math.LN2*7));U.realloc(ee);for(var ue=U.pos-1;ue>=D;ue--)U.buf[ue+ee]=U.buf[ue]}function Cp(D,R){for(var U=0;U>>8,D[U+2]=R>>>16,D[U+3]=R>>>24}function qh(D,R){return(D[R]|D[R+1]<<8|D[R+2]<<16)+(D[R+3]<<24)}function Fp(D,R,U){for(var ee="",ue=R;ue239?4:xe>223?3:xe>191?2:1;if(ue+Ye>U)break;var ot,mt,At;Ye===1?xe<128&&(Ee=xe):Ye===2?(ot=D[ue+1],(ot&192)===128&&(Ee=(xe&31)<<6|ot&63,Ee<=127&&(Ee=null))):Ye===3?(ot=D[ue+1],mt=D[ue+2],(ot&192)===128&&(mt&192)===128&&(Ee=(xe&15)<<12|(ot&63)<<6|mt&63,(Ee<=2047||Ee>=55296&&Ee<=57343)&&(Ee=null))):Ye===4&&(ot=D[ue+1],mt=D[ue+2],At=D[ue+3],(ot&192)===128&&(mt&192)===128&&(At&192)===128&&(Ee=(xe&15)<<18|(ot&63)<<12|(mt&63)<<6|At&63,(Ee<=65535||Ee>=1114112)&&(Ee=null))),Ee===null?(Ee=65533,Ye=1):Ee>65535&&(Ee-=65536,ee+=String.fromCharCode(Ee>>>10&1023|55296),Ee=56320|Ee&1023),ee+=String.fromCharCode(Ee),ue+=Ye}return ee}function Op(D,R,U){return Qh.decode(D.subarray(R,U))}function Bp(D,R,U){for(var ee=0,ue,xe;ee55295&&ue<57344)if(xe)if(ue<56320){D[U++]=239,D[U++]=191,D[U++]=189,xe=ue;continue}else ue=xe-55296<<10|ue-56320|65536,xe=null;else{ue>56319||ee+1===R.length?(D[U++]=239,D[U++]=191,D[U++]=189):xe=ue;continue}else xe&&(D[U++]=239,D[U++]=191,D[U++]=189,xe=null);ue<128?D[U++]=ue:(ue<2048?D[U++]=ue>>6|192:(ue<65536?D[U++]=ue>>12|224:(D[U++]=ue>>18|240,D[U++]=ue>>12&63|128),D[U++]=ue>>6&63|128),D[U++]=ue&63|128)}return U}var gh=3;function Np(D,R,U){D===1&&U.readMessage(Up,R)}function Up(D,R,U){if(D===3){var ee=U.readMessage(Vp,{}),ue=ee.id,xe=ee.bitmap,Ee=ee.width,Ye=ee.height,ot=ee.left,mt=ee.top,At=ee.advance;R.push({id:ue,bitmap:new Cf({width:Ee+2*gh,height:Ye+2*gh},xe),metrics:{width:Ee,height:Ye,left:ot,top:mt,advance:At}})}}function Vp(D,R,U){D===1?R.id=U.readVarint():D===2?R.bitmap=U.readBytes():D===3?R.width=U.readVarint():D===4?R.height=U.readVarint():D===5?R.left=U.readSVarint():D===6?R.top=U.readSVarint():D===7&&(R.advance=U.readVarint())}function Hp(D){return new Bc(D).readFields(Np,[])}var Gp=gh;function ev(D){for(var R=0,U=0,ee=0,ue=D;ee=0;Zt--){var hr=Ye[Zt];if(!(Jt.w>hr.w||Jt.h>hr.h)){if(Jt.x=hr.x,Jt.y=hr.y,mt=Math.max(mt,Jt.y+Jt.h),ot=Math.max(ot,Jt.x+Jt.w),Jt.w===hr.w&&Jt.h===hr.h){var Pr=Ye.pop();Zt=0&&ue>=R&&Zl[this.text.charCodeAt(ue)];ue--)ee--;this.text=this.text.substring(R,ee),this.sectionIndex=this.sectionIndex.slice(R,ee)},yo.prototype.substring=function(R,U){var ee=new yo;return ee.text=this.text.substring(R,U),ee.sectionIndex=this.sectionIndex.slice(R,U),ee.sections=this.sections,ee},yo.prototype.toString=function(){return this.text},yo.prototype.getMaxScale=function(){var R=this;return this.sectionIndex.reduce(function(U,ee){return Math.max(U,R.sections[ee].scale)},0)},yo.prototype.addTextSection=function(R,U){this.text+=R.text,this.sections.push(Yf.forText(R.scale,R.fontStack||U));for(var ee=this.sections.length-1,ue=0;ue=rv?null:++this.imageSectionID:(this.imageSectionID=tv,this.imageSectionID)};function Yp(D,R){for(var U=[],ee=D.text,ue=0,xe=0,Ee=R;xe=0,At=0,Bt=0;Bt0&&Xi>va&&(va=Xi)}else{var $a=U[ha.fontStack],Ya=$a&&$a[da];if(Ya&&Ya.rect)La=Ya.rect,_a=Ya.metrics;else{var ci=R[ha.fontStack],vi=ci&&ci[da];if(!vi)continue;_a=vi.metrics}ma=(Ln-ha.scale)*lo}Qa?(D.verticalizable=!0,Yn.push({glyph:da,imageName:Ja,x:Jt,y:Zt+ma,vertical:Qa,scale:ha.scale,fontStack:ha.fontStack,sectionIndex:Ra,metrics:_a,rect:La}),Jt+=si*ha.scale+mt):(Yn.push({glyph:da,imageName:Ja,x:Jt,y:Zt+ma,vertical:Qa,scale:ha.scale,fontStack:ha.fontStack,sectionIndex:Ra,metrics:_a,rect:La}),Jt+=_a.advance*ha.scale+mt)}if(Yn.length!==0){var mo=Jt-mt;hr=Math.max(mo,hr),Kp(Yn,0,Yn.length-1,tn,va)}Jt=0;var xo=xe*Ln+va;jn.lineOffset=Math.max(va,On),Zt+=xo,Pr=Math.max(xo,Pr),++jr}var no=Zt-xc,Do=mh(Ee),Io=Do.horizontalAlign,Qi=Do.verticalAlign;Jp(D.positionedLines,tn,Io,Qi,hr,Pr,xe,no,ue.length),D.top+=-Qi*no,D.bottom=D.top+no,D.left+=-Io*hr,D.right=D.left+hr}function Kp(D,R,U,ee,ue){if(!(!ee&&!ue))for(var xe=D[U],Ee=xe.metrics.advance*xe.scale,Ye=(D[U].x+Ee)*ee,ot=R;ot<=U;ot++)D[ot].x-=Ye,D[ot].y+=ue}function Jp(D,R,U,ee,ue,xe,Ee,Ye,ot){var mt=(R-U)*ue,At=0;xe!==Ee?At=-Ye*ee-xc:At=(-ee*ot+.5)*Ee;for(var Bt=0,Jt=D;Bt-U/2;){if(Ee--,Ee<0)return!1;Ye-=D[Ee].dist(xe),xe=D[Ee]}Ye+=D[Ee].dist(D[Ee+1]),Ee++;for(var ot=[],mt=0;Yeee;)mt-=ot.shift().angleDelta;if(mt>ue)return!1;Ee++,Ye+=Bt.dist(Jt)}return!0}function cv(D){for(var R=0,U=0;Umt){var hr=(mt-ot)/Zt,Pr=yi(Bt.x,Jt.x,hr),tn=yi(Bt.y,Jt.y,hr),jr=new Xf(Pr,tn,Jt.angleTo(Bt),At);return jr._round(),!Ee||fv(D,jr,Ye,Ee,R)?jr:void 0}ot+=Zt}}function e0(D,R,U,ee,ue,xe,Ee,Ye,ot){var mt=hv(ee,xe,Ee),At=vv(ee,ue),Bt=At*Ee,Jt=D[0].x===0||D[0].x===ot||D[0].y===0||D[0].y===ot;R-Bt=0&&yn=0&&Ln=0&&Jt+mt<=At){var On=new Xf(yn,Ln,mn,hr);On._round(),(!ee||fv(D,On,xe,ee,ue))&&Zt.push(On)}}Bt+=jr}return!Ye&&!Zt.length&&!Ee&&(Zt=dv(D,Bt/2,U,ee,ue,xe,Ee,!0,ot)),Zt}function pv(D,R,U,ee,ue){for(var xe=[],Ee=0;Ee=ee&&Bt.x>=ee)&&(At.x>=ee?At=new r(ee,At.y+(Bt.y-At.y)*((ee-At.x)/(Bt.x-At.x)))._round():Bt.x>=ee&&(Bt=new r(ee,At.y+(Bt.y-At.y)*((ee-At.x)/(Bt.x-At.x)))._round()),!(At.y>=ue&&Bt.y>=ue)&&(At.y>=ue?At=new r(At.x+(Bt.x-At.x)*((ue-At.y)/(Bt.y-At.y)),ue)._round():Bt.y>=ue&&(Bt=new r(At.x+(Bt.x-At.x)*((ue-At.y)/(Bt.y-At.y)),ue)._round()),(!ot||!At.equals(ot[ot.length-1]))&&(ot=[At],xe.push(ot)),ot.push(Bt)))))}return xe}var bc=$o;function gv(D,R,U,ee){var ue=[],xe=D.image,Ee=xe.pixelRatio,Ye=xe.paddedRect.w-2*bc,ot=xe.paddedRect.h-2*bc,mt=D.right-D.left,At=D.bottom-D.top,Bt=xe.stretchX||[[0,Ye]],Jt=xe.stretchY||[[0,ot]],Zt=function($a,Ya){return $a+Ya[1]-Ya[0]},hr=Bt.reduce(Zt,0),Pr=Jt.reduce(Zt,0),tn=Ye-hr,jr=ot-Pr,mn=0,cn=hr,yn=0,Ln=Pr,On=0,jn=tn,Yn=0,va=jr;if(xe.content&&ee){var oa=xe.content;mn=Hc(Bt,0,oa[0]),yn=Hc(Jt,0,oa[1]),cn=Hc(Bt,oa[0],oa[2]),Ln=Hc(Jt,oa[1],oa[3]),On=oa[0]-mn,Yn=oa[1]-yn,jn=oa[2]-oa[0]-cn,va=oa[3]-oa[1]-Ln}var ha=function($a,Ya,ci,vi){var Ei=Gc($a.stretch-mn,cn,mt,D.left),Di=Wc($a.fixed-On,jn,$a.stretch,hr),ro=Gc(Ya.stretch-yn,Ln,At,D.top),Xi=Wc(Ya.fixed-Yn,va,Ya.stretch,Pr),mo=Gc(ci.stretch-mn,cn,mt,D.left),xo=Wc(ci.fixed-On,jn,ci.stretch,hr),no=Gc(vi.stretch-yn,Ln,At,D.top),Do=Wc(vi.fixed-Yn,va,vi.stretch,Pr),Io=new r(Ei,ro),Qi=new r(mo,ro),ko=new r(mo,no),vs=new r(Ei,no),xu=new r(Di/Ee,Xi/Ee),ef=new r(xo/Ee,Do/Ee),tf=R*Math.PI/180;if(tf){var rf=Math.sin(tf),ec=Math.cos(tf),Qs=[ec,-rf,rf,ec];Io._matMult(Qs),Qi._matMult(Qs),vs._matMult(Qs),ko._matMult(Qs)}var Jc=$a.stretch+$a.fixed,Ch=ci.stretch+ci.fixed,Qc=Ya.stretch+Ya.fixed,Lh=vi.stretch+vi.fixed,Es={x:xe.paddedRect.x+bc+Jc,y:xe.paddedRect.y+bc+Qc,w:Ch-Jc,h:Lh-Qc},tc=jn/Ee/mt,$c=va/Ee/At;return{tl:Io,tr:Qi,bl:vs,br:ko,tex:Es,writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:xu,pixelOffsetBR:ef,minFontScaleX:tc,minFontScaleY:$c,isSDF:U}};if(!ee||!xe.stretchX&&!xe.stretchY)ue.push(ha({fixed:0,stretch:-1},{fixed:0,stretch:-1},{fixed:0,stretch:Ye+1},{fixed:0,stretch:ot+1}));else for(var Ra=yv(Bt,tn,hr),da=yv(Jt,jr,Pr),ma=0;ma0&&(hr=Math.max(10,hr),this.circleDiameter=hr)}else{var Pr=Ee.top*Ye-ot,tn=Ee.bottom*Ye+ot,jr=Ee.left*Ye-ot,mn=Ee.right*Ye+ot,cn=Ee.collisionPadding;if(cn&&(jr-=cn[0]*Ye,Pr-=cn[1]*Ye,mn+=cn[2]*Ye,tn+=cn[3]*Ye),At){var yn=new r(jr,Pr),Ln=new r(mn,Pr),On=new r(jr,tn),jn=new r(mn,tn),Yn=At*Math.PI/180;yn._rotate(Yn),Ln._rotate(Yn),On._rotate(Yn),jn._rotate(Yn),jr=Math.min(yn.x,Ln.x,On.x,jn.x),mn=Math.max(yn.x,Ln.x,On.x,jn.x),Pr=Math.min(yn.y,Ln.y,On.y,jn.y),tn=Math.max(yn.y,Ln.y,On.y,jn.y)}R.emplaceBack(U.x,U.y,jr,Pr,mn,tn,ee,ue,xe)}this.boxEndIndex=R.length},Zf=function(R,U){if(R===void 0&&(R=[]),U===void 0&&(U=r0),this.data=R,this.length=this.data.length,this.compare=U,this.length>0)for(var ee=(this.length>>1)-1;ee>=0;ee--)this._down(ee)};Zf.prototype.push=function(R){this.data.push(R),this.length++,this._up(this.length-1)},Zf.prototype.pop=function(){if(this.length!==0){var R=this.data[0],U=this.data.pop();return this.length--,this.length>0&&(this.data[0]=U,this._down(0)),R}},Zf.prototype.peek=function(){return this.data[0]},Zf.prototype._up=function(R){for(var U=this,ee=U.data,ue=U.compare,xe=ee[R];R>0;){var Ee=R-1>>1,Ye=ee[Ee];if(ue(xe,Ye)>=0)break;ee[R]=Ye,R=Ee}ee[R]=xe},Zf.prototype._down=function(R){for(var U=this,ee=U.data,ue=U.compare,xe=this.length>>1,Ee=ee[R];R=0)break;ee[R]=ot,R=Ye}ee[R]=Ee};function r0(D,R){return DR?1:0}function n0(D,R,U){U===void 0&&(U=!1);for(var ee=1/0,ue=1/0,xe=-1/0,Ee=-1/0,Ye=D[0],ot=0;otxe)&&(xe=mt.x),(!ot||mt.y>Ee)&&(Ee=mt.y)}var At=xe-ee,Bt=Ee-ue,Jt=Math.min(At,Bt),Zt=Jt/2,hr=new Zf([],a0);if(Jt===0)return new r(ee,ue);for(var Pr=ee;Prjr.d||!jr.d)&&(jr=cn,U&&console.log("found best %d after %d probes",Math.round(1e4*cn.d)/1e4,mn)),!(cn.max-jr.d<=R)&&(Zt=cn.h/2,hr.push(new jf(cn.p.x-Zt,cn.p.y-Zt,Zt,D)),hr.push(new jf(cn.p.x+Zt,cn.p.y-Zt,Zt,D)),hr.push(new jf(cn.p.x-Zt,cn.p.y+Zt,Zt,D)),hr.push(new jf(cn.p.x+Zt,cn.p.y+Zt,Zt,D)),mn+=4)}return U&&(console.log("num probes: "+mn),console.log("best distance: "+jr.d)),jr.p}function a0(D,R){return R.max-D.max}function jf(D,R,U,ee){this.p=new r(D,R),this.h=U,this.d=i0(this.p,ee),this.max=this.d+this.h*Math.SQRT2}function i0(D,R){for(var U=!1,ee=1/0,ue=0;ueD.y!=At.y>D.y&&D.x<(At.x-mt.x)*(D.y-mt.y)/(At.y-mt.y)+mt.x&&(U=!U),ee=Math.min(ee,pu(D,mt,At))}return(U?1:-1)*Math.sqrt(ee)}function o0(D){for(var R=0,U=0,ee=0,ue=D[0],xe=0,Ee=ue.length,Ye=Ee-1;xe=ga||Qs.y<0||Qs.y>=ga||u0(D,Qs,ec,U,ee,ue,da,D.layers[0],D.collisionBoxArray,R.index,R.sourceLayerIndex,D.index,jr,Ln,Yn,ot,cn,On,va,Zt,R,xe,mt,At,Ee)};if(oa==="line")for(var _a=0,La=pv(R.geometry,0,0,ga,ga);_a1){var ro=qp(Di,jn,U.vertical||hr,ee,Pr,mn);ro&&ma(Di,ro)}}else if(R.type==="Polygon")for(var Xi=0,mo=ch(R.geometry,0);Xi$u&&O(D.layerIds[0]+': Value for "text-size" is >= '+wc+'. Reduce your "text-size".')):tn.kind==="composite"&&(jr=[Sl*Zt.compositeTextSizes[0].evaluate(Ee,{},hr),Sl*Zt.compositeTextSizes[1].evaluate(Ee,{},hr)],(jr[0]>$u||jr[1]>$u)&&O(D.layerIds[0]+': Value for "text-size" is >= '+wc+'. Reduce your "text-size".')),D.addSymbols(D.text,Pr,jr,Ye,xe,Ee,mt,R,ot.lineStartIndex,ot.lineLength,Jt,hr);for(var mn=0,cn=At;mn$u&&O(D.layerIds[0]+': Value for "icon-size" is >= '+wc+'. Reduce your "icon-size".')):Io.kind==="composite"&&(Qi=[Sl*Ln.compositeIconSizes[0].evaluate(yn,{},jn),Sl*Ln.compositeIconSizes[1].evaluate(yn,{},jn)],(Qi[0]>$u||Qi[1]>$u)&&O(D.layerIds[0]+': Value for "icon-size" is >= '+wc+'. Reduce your "icon-size".')),D.addSymbols(D.icon,no,Qi,cn,mn,yn,!1,R,oa.lineStartIndex,oa.lineLength,-1,jn),Qa=D.icon.placedSymbolArray.length-1,Do&&(La=Do.length*4,D.addSymbols(D.icon,Do,Qi,cn,mn,yn,hs.vertical,R,oa.lineStartIndex,oa.lineLength,-1,jn),$a=D.icon.placedSymbolArray.length-1)}for(var ko in ee.horizontal){var vs=ee.horizontal[ko];if(!ha){ci=he(vs.text);var xu=Ye.layout.get("text-rotate").evaluate(yn,{},jn);ha=new Yc(ot,R,mt,At,Bt,vs,Jt,Zt,hr,xu)}var ef=vs.positionedLines.length===1;if(Ja+=xv(D,R,vs,xe,Ye,hr,yn,Pr,oa,ee.vertical?hs.horizontal:hs.horizontalOnly,ef?Object.keys(ee.horizontal):[ko],Ya,Qa,Ln,jn),ef)break}ee.vertical&&(si+=xv(D,R,ee.vertical,xe,Ye,hr,yn,Pr,oa,hs.vertical,["vertical"],Ya,$a,Ln,jn));var tf=ha?ha.boxStartIndex:D.collisionBoxArray.length,rf=ha?ha.boxEndIndex:D.collisionBoxArray.length,ec=da?da.boxStartIndex:D.collisionBoxArray.length,Qs=da?da.boxEndIndex:D.collisionBoxArray.length,Jc=Ra?Ra.boxStartIndex:D.collisionBoxArray.length,Ch=Ra?Ra.boxEndIndex:D.collisionBoxArray.length,Qc=ma?ma.boxStartIndex:D.collisionBoxArray.length,Lh=ma?ma.boxEndIndex:D.collisionBoxArray.length,Es=-1,tc=function(Mc,Fv){return Mc&&Mc.circleDiameter?Math.max(Mc.circleDiameter,Fv):Fv};Es=tc(ha,Es),Es=tc(da,Es),Es=tc(Ra,Es),Es=tc(ma,Es);var $c=Es>-1?1:0;$c&&(Es*=Yn/lo),D.glyphOffsetArray.length>=oi.MAX_GLYPHS&&O("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),yn.sortKey!==void 0&&D.addToSortKeyRanges(D.symbolInstances.length,yn.sortKey),D.symbolInstances.emplaceBack(R.x,R.y,Ya.right>=0?Ya.right:-1,Ya.center>=0?Ya.center:-1,Ya.left>=0?Ya.left:-1,Ya.vertical||-1,Qa,$a,ci,tf,rf,ec,Qs,Jc,Ch,Qc,Lh,mt,Ja,si,_a,La,$c,0,Jt,vi,Ei,Es)}function f0(D,R,U,ee){var ue=D.compareText;if(!(R in ue))ue[R]=[];else for(var xe=ue[R],Ee=xe.length-1;Ee>=0;Ee--)if(ee.dist(xe[Ee])0)&&(Ee.value.kind!=="constant"||Ee.value.value.length>0),At=ot.value.kind!=="constant"||!!ot.value.value||Object.keys(ot.parameters).length>0,Bt=xe.get("symbol-sort-key");if(this.features=[],!(!mt&&!At)){for(var Jt=U.iconDependencies,Zt=U.glyphDependencies,hr=U.availableImages,Pr=new pa(this.zoom),tn=0,jr=R;tn=0;for(var si=0,Qa=va.sections;si=0;ot--)Ee[ot]={x:U[ot].x,y:U[ot].y,tileUnitDistanceFromAnchor:xe},ot>0&&(xe+=U[ot-1].dist(U[ot]));for(var mt=0;mt0},oi.prototype.hasIconData=function(){return this.icon.segments.get().length>0},oi.prototype.hasDebugData=function(){return this.textCollisionBox&&this.iconCollisionBox},oi.prototype.hasTextCollisionBoxData=function(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0},oi.prototype.hasIconCollisionBoxData=function(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0},oi.prototype.addIndicesForPlacedSymbol=function(R,U){for(var ee=R.placedSymbolArray.get(U),ue=ee.vertexStartIndex+ee.numGlyphs*4,xe=ee.vertexStartIndex;xe1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(R),this.sortedAngle=R,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(var ee=0,ue=this.symbolInstanceIndexes;ee=0&&mt.indexOf(Ye)===ot&&U.addIndicesForPlacedSymbol(U.text,Ye)}),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)}},De("SymbolBucket",oi,{omit:["layers","collisionBoxArray","features","compareText"]}),oi.MAX_GLYPHS=65535,oi.addDynamicAttributes=Th;function d0(D,R){return R.replace(/{([^{}]+)}/g,function(U,ee){return ee in D?String(D[ee]):""})}var p0=new ei({"symbol-placement":new qn(yr.layout_symbol["symbol-placement"]),"symbol-spacing":new qn(yr.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new qn(yr.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new xa(yr.layout_symbol["symbol-sort-key"]),"symbol-z-order":new qn(yr.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new qn(yr.layout_symbol["icon-allow-overlap"]),"icon-ignore-placement":new qn(yr.layout_symbol["icon-ignore-placement"]),"icon-optional":new qn(yr.layout_symbol["icon-optional"]),"icon-rotation-alignment":new qn(yr.layout_symbol["icon-rotation-alignment"]),"icon-size":new xa(yr.layout_symbol["icon-size"]),"icon-text-fit":new qn(yr.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new qn(yr.layout_symbol["icon-text-fit-padding"]),"icon-image":new xa(yr.layout_symbol["icon-image"]),"icon-rotate":new xa(yr.layout_symbol["icon-rotate"]),"icon-padding":new qn(yr.layout_symbol["icon-padding"]),"icon-keep-upright":new qn(yr.layout_symbol["icon-keep-upright"]),"icon-offset":new xa(yr.layout_symbol["icon-offset"]),"icon-anchor":new xa(yr.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new qn(yr.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new qn(yr.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new qn(yr.layout_symbol["text-rotation-alignment"]),"text-field":new xa(yr.layout_symbol["text-field"]),"text-font":new xa(yr.layout_symbol["text-font"]),"text-size":new xa(yr.layout_symbol["text-size"]),"text-max-width":new xa(yr.layout_symbol["text-max-width"]),"text-line-height":new qn(yr.layout_symbol["text-line-height"]),"text-letter-spacing":new xa(yr.layout_symbol["text-letter-spacing"]),"text-justify":new xa(yr.layout_symbol["text-justify"]),"text-radial-offset":new xa(yr.layout_symbol["text-radial-offset"]),"text-variable-anchor":new qn(yr.layout_symbol["text-variable-anchor"]),"text-anchor":new xa(yr.layout_symbol["text-anchor"]),"text-max-angle":new qn(yr.layout_symbol["text-max-angle"]),"text-writing-mode":new qn(yr.layout_symbol["text-writing-mode"]),"text-rotate":new xa(yr.layout_symbol["text-rotate"]),"text-padding":new qn(yr.layout_symbol["text-padding"]),"text-keep-upright":new qn(yr.layout_symbol["text-keep-upright"]),"text-transform":new xa(yr.layout_symbol["text-transform"]),"text-offset":new xa(yr.layout_symbol["text-offset"]),"text-allow-overlap":new qn(yr.layout_symbol["text-allow-overlap"]),"text-ignore-placement":new qn(yr.layout_symbol["text-ignore-placement"]),"text-optional":new qn(yr.layout_symbol["text-optional"])}),g0=new ei({"icon-opacity":new xa(yr.paint_symbol["icon-opacity"]),"icon-color":new xa(yr.paint_symbol["icon-color"]),"icon-halo-color":new xa(yr.paint_symbol["icon-halo-color"]),"icon-halo-width":new xa(yr.paint_symbol["icon-halo-width"]),"icon-halo-blur":new xa(yr.paint_symbol["icon-halo-blur"]),"icon-translate":new qn(yr.paint_symbol["icon-translate"]),"icon-translate-anchor":new qn(yr.paint_symbol["icon-translate-anchor"]),"text-opacity":new xa(yr.paint_symbol["text-opacity"]),"text-color":new xa(yr.paint_symbol["text-color"],{runtimeType:Tn,getOverride:function(D){return D.textColor},hasOverride:function(D){return!!D.textColor}}),"text-halo-color":new xa(yr.paint_symbol["text-halo-color"]),"text-halo-width":new xa(yr.paint_symbol["text-halo-width"]),"text-halo-blur":new xa(yr.paint_symbol["text-halo-blur"]),"text-translate":new qn(yr.paint_symbol["text-translate"]),"text-translate-anchor":new qn(yr.paint_symbol["text-translate-anchor"])}),Ah={paint:g0,layout:p0},Qf=function(R){this.type=R.property.overrides?R.property.overrides.runtimeType:zr,this.defaultValue=R};Qf.prototype.evaluate=function(R){if(R.formattedSection){var U=this.defaultValue.property.overrides;if(U&&U.hasOverride(R.formattedSection))return U.getOverride(R.formattedSection)}return R.feature&&R.featureState?this.defaultValue.evaluate(R.feature,R.featureState):this.defaultValue.property.specification.default},Qf.prototype.eachChild=function(R){if(!this.defaultValue.isConstant()){var U=this.defaultValue.value;R(U._styleExpression.expression)}},Qf.prototype.outputDefined=function(){return!1},Qf.prototype.serialize=function(){return null},De("FormatSectionOverride",Qf,{omit:["defaultValue"]});var y0=function(D){function R(U){D.call(this,U,Ah)}return R.__proto__=D,R.prototype=Object.create(D.prototype),R.prototype.constructor=R,R.prototype.recalculate=function(ee,ue){if(D.prototype.recalculate.call(this,ee,ue),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["icon-rotation-alignment"]="map":this.layout._values["icon-rotation-alignment"]="viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout.get("symbol-placement")!=="point"?this.layout._values["text-rotation-alignment"]="map":this.layout._values["text-rotation-alignment"]="viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")),this.layout.get("icon-pitch-alignment")==="auto"&&(this.layout._values["icon-pitch-alignment"]=this.layout.get("icon-rotation-alignment")),this.layout.get("symbol-placement")==="point"){var xe=this.layout.get("text-writing-mode");if(xe){for(var Ee=[],Ye=0,ot=xe;Ye",targetMapId:ue,sourceMapId:Ee.mapId})}}},$f.prototype.receive=function(R){var U=R.data,ee=U.id;if(ee&&!(U.targetMapId&&this.mapId!==U.targetMapId))if(U.type===""){delete this.tasks[ee];var ue=this.cancelCallbacks[ee];delete this.cancelCallbacks[ee],ue&&ue()}else j()||U.mustQueue?(this.tasks[ee]=U,this.taskQueue.push(ee),this.invoker.trigger()):this.processTask(ee,U)},$f.prototype.process=function(){if(this.taskQueue.length){var R=this.taskQueue.shift(),U=this.tasks[R];delete this.tasks[R],this.taskQueue.length&&this.invoker.trigger(),U&&this.processTask(R,U)}},$f.prototype.processTask=function(R,U){var ee=this;if(U.type===""){var ue=this.callbacks[R];delete this.callbacks[R],ue&&(U.error?ue(yt(U.error)):ue(null,yt(U.data)))}else{var xe=!1,Ee=oe(this.globalScope)?void 0:[],Ye=U.hasCallback?function(Jt,Zt){xe=!0,delete ee.cancelCallbacks[R],ee.target.postMessage({id:R,type:"",sourceMapId:ee.mapId,error:Jt?Tt(Jt):null,data:Tt(Zt,Ee)},Ee)}:function(Jt){xe=!0},ot=null,mt=yt(U.data);if(this.parent[U.type])ot=this.parent[U.type](U.sourceMapId,mt,Ye);else if(this.parent.getWorkerSource){var At=U.type.split("."),Bt=this.parent.getWorkerSource(U.sourceMapId,At[0],mt.source);ot=Bt[At[1]](mt,Ye)}else Ye(new Error("Could not find function "+U.type));!xe&&ot&&ot.cancel&&(this.cancelCallbacks[R]=ot.cancel)}},$f.prototype.remove=function(){this.invoker.remove(),this.target.removeEventListener("message",this.receive,!1)};function L0(D,R,U){R=Math.pow(2,U)-R-1;var ee=Sv(D*256,R*256,U),ue=Sv((D+1)*256,(R+1)*256,U);return ee[0]+","+ee[1]+","+ue[0]+","+ue[1]}function Sv(D,R,U){var ee=2*Math.PI*6378137/256/Math.pow(2,U),ue=D*ee-2*Math.PI*6378137/2,xe=R*ee-2*Math.PI*6378137/2;return[ue,xe]}var Wi=function(R,U){R&&(U?this.setSouthWest(R).setNorthEast(U):R.length===4?this.setSouthWest([R[0],R[1]]).setNorthEast([R[2],R[3]]):this.setSouthWest(R[0]).setNorthEast(R[1]))};Wi.prototype.setNorthEast=function(R){return this._ne=R instanceof mi?new mi(R.lng,R.lat):mi.convert(R),this},Wi.prototype.setSouthWest=function(R){return this._sw=R instanceof mi?new mi(R.lng,R.lat):mi.convert(R),this},Wi.prototype.extend=function(R){var U=this._sw,ee=this._ne,ue,xe;if(R instanceof mi)ue=R,xe=R;else if(R instanceof Wi){if(ue=R._sw,xe=R._ne,!ue||!xe)return this}else{if(Array.isArray(R))if(R.length===4||R.every(Array.isArray)){var Ee=R;return this.extend(Wi.convert(Ee))}else{var Ye=R;return this.extend(mi.convert(Ye))}return this}return!U&&!ee?(this._sw=new mi(ue.lng,ue.lat),this._ne=new mi(xe.lng,xe.lat)):(U.lng=Math.min(ue.lng,U.lng),U.lat=Math.min(ue.lat,U.lat),ee.lng=Math.max(xe.lng,ee.lng),ee.lat=Math.max(xe.lat,ee.lat)),this},Wi.prototype.getCenter=function(){return new mi((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)},Wi.prototype.getSouthWest=function(){return this._sw},Wi.prototype.getNorthEast=function(){return this._ne},Wi.prototype.getNorthWest=function(){return new mi(this.getWest(),this.getNorth())},Wi.prototype.getSouthEast=function(){return new mi(this.getEast(),this.getSouth())},Wi.prototype.getWest=function(){return this._sw.lng},Wi.prototype.getSouth=function(){return this._sw.lat},Wi.prototype.getEast=function(){return this._ne.lng},Wi.prototype.getNorth=function(){return this._ne.lat},Wi.prototype.toArray=function(){return[this._sw.toArray(),this._ne.toArray()]},Wi.prototype.toString=function(){return"LngLatBounds("+this._sw.toString()+", "+this._ne.toString()+")"},Wi.prototype.isEmpty=function(){return!(this._sw&&this._ne)},Wi.prototype.contains=function(R){var U=mi.convert(R),ee=U.lng,ue=U.lat,xe=this._sw.lat<=ue&&ue<=this._ne.lat,Ee=this._sw.lng<=ee&&ee<=this._ne.lng;return this._sw.lng>this._ne.lng&&(Ee=this._sw.lng>=ee&&ee>=this._ne.lng),xe&&Ee},Wi.convert=function(R){return!R||R instanceof Wi?R:new Wi(R)};var Ev=63710088e-1,mi=function(R,U){if(isNaN(R)||isNaN(U))throw new Error("Invalid LngLat object: ("+R+", "+U+")");if(this.lng=+R,this.lat=+U,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")};mi.prototype.wrap=function(){return new mi(T(this.lng,-180,180),this.lat)},mi.prototype.toArray=function(){return[this.lng,this.lat]},mi.prototype.toString=function(){return"LngLat("+this.lng+", "+this.lat+")"},mi.prototype.distanceTo=function(R){var U=Math.PI/180,ee=this.lat*U,ue=R.lat*U,xe=Math.sin(ee)*Math.sin(ue)+Math.cos(ee)*Math.cos(ue)*Math.cos((R.lng-this.lng)*U),Ee=Ev*Math.acos(Math.min(xe,1));return Ee},mi.prototype.toBounds=function(R){R===void 0&&(R=0);var U=40075017,ee=360*R/U,ue=ee/Math.cos(Math.PI/180*this.lat);return new Wi(new mi(this.lng-ue,this.lat-ee),new mi(this.lng+ue,this.lat+ee))},mi.convert=function(R){if(R instanceof mi)return R;if(Array.isArray(R)&&(R.length===2||R.length===3))return new mi(Number(R[0]),Number(R[1]));if(!Array.isArray(R)&&typeof R=="object"&&R!==null)return new mi(Number("lng"in R?R.lng:R.lon),Number(R.lat));throw new Error("`LngLatLike` argument must be specified as a LngLat instance, an object {lng: , lat: }, an object {lon: , lat: }, or an array of [, ]")};var Cv=2*Math.PI*Ev;function Lv(D){return Cv*Math.cos(D*Math.PI/180)}function Pv(D){return(180+D)/360}function Rv(D){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+D*Math.PI/360)))/360}function Dv(D,R){return D/Lv(R)}function P0(D){return D*360-180}function Sh(D){var R=180-D*360;return 360/Math.PI*Math.atan(Math.exp(R*Math.PI/180))-90}function R0(D,R){return D*Lv(Sh(R))}function D0(D){return 1/Math.cos(D*Math.PI/180)}var Pf=function(R,U,ee){ee===void 0&&(ee=0),this.x=+R,this.y=+U,this.z=+ee};Pf.fromLngLat=function(R,U){U===void 0&&(U=0);var ee=mi.convert(R);return new Pf(Pv(ee.lng),Rv(ee.lat),Dv(U,ee.lat))},Pf.prototype.toLngLat=function(){return new mi(P0(this.x),Sh(this.y))},Pf.prototype.toAltitude=function(){return R0(this.z,this.y)},Pf.prototype.meterInMercatorCoordinateUnits=function(){return 1/Cv*D0(Sh(this.y))};var Rf=function(R,U,ee){this.z=R,this.x=U,this.y=ee,this.key=Ac(0,R,R,U,ee)};Rf.prototype.equals=function(R){return this.z===R.z&&this.x===R.x&&this.y===R.y},Rf.prototype.url=function(R,U){var ee=L0(this.x,this.y,this.z),ue=I0(this.z,this.x,this.y);return R[(this.x+this.y)%R.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(U==="tms"?Math.pow(2,this.z)-this.y-1:this.y)).replace("{quadkey}",ue).replace("{bbox-epsg-3857}",ee)},Rf.prototype.getTilePoint=function(R){var U=Math.pow(2,this.z);return new r((R.x*U-this.x)*ga,(R.y*U-this.y)*ga)},Rf.prototype.toString=function(){return this.z+"/"+this.x+"/"+this.y};var Iv=function(R,U){this.wrap=R,this.canonical=U,this.key=Ac(R,U.z,U.z,U.x,U.y)},Yi=function(R,U,ee,ue,xe){this.overscaledZ=R,this.wrap=U,this.canonical=new Rf(ee,+ue,+xe),this.key=Ac(U,R,ee,ue,xe)};Yi.prototype.equals=function(R){return this.overscaledZ===R.overscaledZ&&this.wrap===R.wrap&&this.canonical.equals(R.canonical)},Yi.prototype.scaledTo=function(R){var U=this.canonical.z-R;return R>this.canonical.z?new Yi(R,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Yi(R,this.wrap,R,this.canonical.x>>U,this.canonical.y>>U)},Yi.prototype.calculateScaledKey=function(R,U){var ee=this.canonical.z-R;return R>this.canonical.z?Ac(this.wrap*+U,R,this.canonical.z,this.canonical.x,this.canonical.y):Ac(this.wrap*+U,R,R,this.canonical.x>>ee,this.canonical.y>>ee)},Yi.prototype.isChildOf=function(R){if(R.wrap!==this.wrap)return!1;var U=this.canonical.z-R.canonical.z;return R.overscaledZ===0||R.overscaledZ>U&&R.canonical.y===this.canonical.y>>U},Yi.prototype.children=function(R){if(this.overscaledZ>=R)return[new Yi(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];var U=this.canonical.z+1,ee=this.canonical.x*2,ue=this.canonical.y*2;return[new Yi(U,this.wrap,U,ee,ue),new Yi(U,this.wrap,U,ee+1,ue),new Yi(U,this.wrap,U,ee,ue+1),new Yi(U,this.wrap,U,ee+1,ue+1)]},Yi.prototype.isLessThan=function(R){return this.wrapR.wrap?!1:this.overscaledZR.overscaledZ?!1:this.canonical.xR.canonical.x?!1:this.canonical.y0;xe--)ue=1<=this.dim+1||U<-1||U>=this.dim+1)throw new RangeError("out of range source coordinates for DEM data");return(U+1)*this.stride+(R+1)},yu.prototype._unpackMapbox=function(R,U,ee){return(R*256*256+U*256+ee)/10-1e4},yu.prototype._unpackTerrarium=function(R,U,ee){return R*256+U+ee/256-32768},yu.prototype.getPixels=function(){return new Go({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))},yu.prototype.backfillBorder=function(R,U,ee){if(this.dim!==R.dim)throw new Error("dem dimension mismatch");var ue=U*this.dim,xe=U*this.dim+this.dim,Ee=ee*this.dim,Ye=ee*this.dim+this.dim;switch(U){case-1:ue=xe-1;break;case 1:xe=ue+1;break}switch(ee){case-1:Ee=Ye-1;break;case 1:Ye=Ee+1;break}for(var ot=-U*this.dim,mt=-ee*this.dim,At=Ee;At=0&&Bt[3]>=0&&ot.insert(Ye,Bt[0],Bt[1],Bt[2],Bt[3])}},mu.prototype.loadVTLayers=function(){return this.vtLayers||(this.vtLayers=new Hf.VectorTile(new Bc(this.rawTileData)).layers,this.sourceLayerCoder=new jc(this.vtLayers?Object.keys(this.vtLayers).sort():["_geojsonTileLayer"])),this.vtLayers},mu.prototype.query=function(R,U,ee,ue){var xe=this;this.loadVTLayers();for(var Ee=R.params||{},Ye=ga/R.tileSize/R.scale,ot=us(Ee.filter),mt=R.queryGeometry,At=R.queryPadding*Ye,Bt=_v(mt),Jt=this.grid.query(Bt.minX-At,Bt.minY-At,Bt.maxX+At,Bt.maxY+At),Zt=_v(R.cameraQueryGeometry),hr=this.grid3D.query(Zt.minX-At,Zt.minY-At,Zt.maxX+At,Zt.maxY+At,function(On,jn,Yn,va){return Js(R.cameraQueryGeometry,On-At,jn-At,Yn+At,va+At)}),Pr=0,tn=hr;Prue)xe=!1;else if(!U)xe=!0;else if(this.expirationTime=fr.maxzoom)&&fr.visibility!=="none"){a(sr,this.zoom,bt);var vr=nr[fr.id]=fr.createBucket({index:Gt.bucketLayerIDs.length,layers:sr,zoom:this.zoom,pixelRatio:this.pixelRatio,overscaling:this.overscaling,collisionBoxArray:this.collisionBoxArray,sourceLayerIndex:Rt,sourceID:this.source});vr.populate(Lt,ar,this.tileID.canonical),Gt.bucketLayerIDs.push(sr.map(function(or){return or.id}))}}}}var lr,Or,Sr,Ar,sn=o.mapObject(ar.glyphDependencies,function(or){return Object.keys(or).map(Number)});Object.keys(sn).length?Et.send("getGlyphs",{uid:this.uid,stacks:sn},function(or,Lr){lr||(lr=or,Or=Lr,xn.call(_t))}):Or={};var Jr=Object.keys(ar.iconDependencies);Jr.length?Et.send("getImages",{icons:Jr,source:this.source,tileID:this.tileID,type:"icons"},function(or,Lr){lr||(lr=or,Sr=Lr,xn.call(_t))}):Sr={};var bn=Object.keys(ar.patternDependencies);bn.length?Et.send("getImages",{icons:bn,source:this.source,tileID:this.tileID,type:"patterns"},function(or,Lr){lr||(lr=or,Ar=Lr,xn.call(_t))}):Ar={},xn.call(this);function xn(){if(lr)return Mt(lr);if(Or&&Sr&&Ar){var or=new t(Or),Lr=new o.ImageAtlas(Sr,Ar);for(var Br in nr){var _r=nr[Br];_r instanceof o.SymbolBucket?(a(_r.layers,this.zoom,bt),o.performSymbolLayout(_r,Or,or.positions,Sr,Lr.iconPositions,this.showCollisionBoxes,this.tileID.canonical)):_r.hasPattern&&(_r instanceof o.LineBucket||_r instanceof o.FillBucket||_r instanceof o.FillExtrusionBucket)&&(a(_r.layers,this.zoom,bt),_r.addFeatures(ar,this.tileID.canonical,Lr.patternPositions))}this.status="done",Mt(null,{buckets:o.values(nr).filter(function(Qr){return!Qr.isEmpty()}),featureIndex:Gt,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:or.image,imageAtlas:Lr,glyphMap:this.returnDependencies?Or:null,iconMap:this.returnDependencies?Sr:null,glyphPositions:this.returnDependencies?or.positions:null})}}};function a(ct,qe,dt){for(var bt=new o.EvaluationParameters(qe),Et=0,Mt=ct;Et=0!=!!qe&&ct.reverse()}var v=o.vectorTile.VectorTileFeature.prototype.toGeoJSON,m=function(qe){this._feature=qe,this.extent=o.EXTENT,this.type=qe.type,this.properties=qe.tags,"id"in qe&&!isNaN(qe.id)&&(this.id=parseInt(qe.id,10))};m.prototype.loadGeometry=function(){if(this._feature.type===1){for(var qe=[],dt=0,bt=this._feature.geometry;dt"u"&&(bt.push(It),Gt=bt.length-1,Mt[It]=Gt),qe.writeVarint(Gt);var nr=dt.properties[It],ar=typeof nr;ar!=="string"&&ar!=="boolean"&&ar!=="number"&&(nr=JSON.stringify(nr));var ir=ar+":"+nr,Be=_t[ir];typeof Be>"u"&&(Et.push(nr),Be=Et.length-1,_t[ir]=Be),qe.writeVarint(Be)}}function N(ct,qe){return(qe<<3)+(ct&7)}function V(ct){return ct<<1^ct>>31}function j(ct,qe){for(var dt=ct.loadGeometry(),bt=ct.type,Et=0,Mt=0,_t=dt.length,It=0;It<_t;It++){var Gt=dt[It],nr=1;bt===1&&(nr=Gt.length),qe.writeVarint(N(1,nr));for(var ar=bt===3?Gt.length-1:Gt.length,ir=0;ir>1;oe(ct,qe,_t,bt,Et,Mt%2),q(ct,qe,dt,bt,_t-1,Mt+1),q(ct,qe,dt,_t+1,Et,Mt+1)}}function oe(ct,qe,dt,bt,Et,Mt){for(;Et>bt;){if(Et-bt>600){var _t=Et-bt+1,It=dt-bt+1,Gt=Math.log(_t),nr=.5*Math.exp(2*Gt/3),ar=.5*Math.sqrt(Gt*nr*(_t-nr)/_t)*(It-_t/2<0?-1:1),ir=Math.max(bt,Math.floor(dt-It*nr/_t+ar)),Be=Math.min(Et,Math.floor(dt+(_t-It)*nr/_t+ar));oe(ct,qe,dt,ir,Be,Mt)}var Fe=qe[2*dt+Mt],Rt=bt,Lt=Et;for(Z(ct,qe,bt,dt),qe[2*Et+Mt]>Fe&&Z(ct,qe,bt,Et);RtFe;)Lt--}qe[2*bt+Mt]===Fe?Z(ct,qe,bt,Lt):(Lt++,Z(ct,qe,Lt,Et)),Lt<=dt&&(bt=Lt+1),dt<=Lt&&(Et=Lt-1)}}function Z(ct,qe,dt,bt){G(ct,dt,bt),G(qe,2*dt,2*bt),G(qe,2*dt+1,2*bt+1)}function G(ct,qe,dt){var bt=ct[qe];ct[qe]=ct[dt],ct[dt]=bt}function re(ct,qe,dt,bt,Et,Mt,_t){for(var It=[0,ct.length-1,0],Gt=[],nr,ar;It.length;){var ir=It.pop(),Be=It.pop(),Fe=It.pop();if(Be-Fe<=_t){for(var Rt=Fe;Rt<=Be;Rt++)nr=qe[2*Rt],ar=qe[2*Rt+1],nr>=dt&&nr<=Et&&ar>=bt&&ar<=Mt&&Gt.push(ct[Rt]);continue}var Lt=Math.floor((Fe+Be)/2);nr=qe[2*Lt],ar=qe[2*Lt+1],nr>=dt&&nr<=Et&&ar>=bt&&ar<=Mt&&Gt.push(ct[Lt]);var Ut=(ir+1)%2;(ir===0?dt<=nr:bt<=ar)&&(It.push(Fe),It.push(Lt-1),It.push(Ut)),(ir===0?Et>=nr:Mt>=ar)&&(It.push(Lt+1),It.push(Be),It.push(Ut))}return Gt}function H(ct,qe,dt,bt,Et,Mt){for(var _t=[0,ct.length-1,0],It=[],Gt=Et*Et;_t.length;){var nr=_t.pop(),ar=_t.pop(),ir=_t.pop();if(ar-ir<=Mt){for(var Be=ir;Be<=ar;Be++)J(qe[2*Be],qe[2*Be+1],dt,bt)<=Gt&&It.push(ct[Be]);continue}var Fe=Math.floor((ir+ar)/2),Rt=qe[2*Fe],Lt=qe[2*Fe+1];J(Rt,Lt,dt,bt)<=Gt&&It.push(ct[Fe]);var Ut=(nr+1)%2;(nr===0?dt-Et<=Rt:bt-Et<=Lt)&&(_t.push(ir),_t.push(Fe-1),_t.push(Ut)),(nr===0?dt+Et>=Rt:bt+Et>=Lt)&&(_t.push(Fe+1),_t.push(ar),_t.push(Ut))}return It}function J(ct,qe,dt,bt){var Et=ct-dt,Mt=qe-bt;return Et*Et+Mt*Mt}var ae=function(ct){return ct[0]},K=function(ct){return ct[1]},Y=function(qe,dt,bt,Et,Mt){dt===void 0&&(dt=ae),bt===void 0&&(bt=K),Et===void 0&&(Et=64),Mt===void 0&&(Mt=Float64Array),this.nodeSize=Et,this.points=qe;for(var _t=qe.length<65536?Uint16Array:Uint32Array,It=this.ids=new _t(qe.length),Gt=this.coords=new Mt(qe.length*2),nr=0;nr=Et;ar--){var ir=+Date.now();Gt=this._cluster(Gt,ar),this.trees[ar]=new Y(Gt,_e,ze,_t,Float32Array),bt&&console.log("z%d: %d clusters in %dms",ar,Gt.length,+Date.now()-ir)}return bt&&console.timeEnd("total time"),this},ne.prototype.getClusters=function(qe,dt){var bt=((qe[0]+180)%360+360)%360-180,Et=Math.max(-90,Math.min(90,qe[1])),Mt=qe[2]===180?180:((qe[2]+180)%360+360)%360-180,_t=Math.max(-90,Math.min(90,qe[3]));if(qe[2]-qe[0]>=360)bt=-180,Mt=180;else if(bt>Mt){var It=this.getClusters([bt,Et,180,_t],dt),Gt=this.getClusters([-180,Et,Mt,_t],dt);return It.concat(Gt)}for(var nr=this.trees[this._limitZoom(dt)],ar=nr.range(Le(bt),ve(_t),Le(Mt),ve(Et)),ir=[],Be=0,Fe=ar;Bedt&&(Lt+=Kt.numPoints||1)}if(Lt>=Gt){for(var Dt=ir.x*Rt,sr=ir.y*Rt,fr=It&&Rt>1?this._map(ir,!0):null,vr=(ar<<5)+(dt+1)+this.points.length,lr=0,Or=Fe;lr1)for(var Jr=0,bn=Fe;Jr>5},ne.prototype._getOriginZoom=function(qe){return(qe-this.points.length)%32},ne.prototype._map=function(qe,dt){if(qe.numPoints)return dt?Se({},qe.properties):qe.properties;var bt=this.points[qe.index].properties,Et=this.options.map(bt);return dt&&Et===bt?Se({},Et):Et};function le(ct,qe,dt,bt,Et){return{x:ct,y:qe,zoom:1/0,id:dt,parentId:-1,numPoints:bt,properties:Et}}function de(ct,qe){var dt=ct.geometry.coordinates,bt=dt[0],Et=dt[1];return{x:Le(bt),y:ve(Et),zoom:1/0,index:qe,parentId:-1}}function we(ct){return{type:"Feature",id:ct.id,properties:me(ct),geometry:{type:"Point",coordinates:[Ae(ct.x),ye(ct.y)]}}}function me(ct){var qe=ct.numPoints,dt=qe>=1e4?Math.round(qe/1e3)+"k":qe>=1e3?Math.round(qe/100)/10+"k":qe;return Se(Se({},ct.properties),{cluster:!0,cluster_id:ct.id,point_count:qe,point_count_abbreviated:dt})}function Le(ct){return ct/360+.5}function ve(ct){var qe=Math.sin(ct*Math.PI/180),dt=.5-.25*Math.log((1+qe)/(1-qe))/Math.PI;return dt<0?0:dt>1?1:dt}function Ae(ct){return(ct-.5)*360}function ye(ct){var qe=(180-ct*360)*Math.PI/180;return 360*Math.atan(Math.exp(qe))/Math.PI-90}function Se(ct,qe){for(var dt in qe)ct[dt]=qe[dt];return ct}function _e(ct){return ct.x}function ze(ct){return ct.y}function Ie(ct,qe,dt,bt){for(var Et=bt,Mt=dt-qe>>1,_t=dt-qe,It,Gt=ct[qe],nr=ct[qe+1],ar=ct[dt],ir=ct[dt+1],Be=qe+3;BeEt)It=Be,Et=Fe;else if(Fe===Et){var Rt=Math.abs(Be-Mt);Rt<_t&&(It=Be,_t=Rt)}}Et>bt&&(It-qe>3&&Ie(ct,qe,It,bt),ct[It+2]=Et,dt-It>3&&Ie(ct,It,dt,bt))}function Ne(ct,qe,dt,bt,Et,Mt){var _t=Et-dt,It=Mt-bt;if(_t!==0||It!==0){var Gt=((ct-dt)*_t+(qe-bt)*It)/(_t*_t+It*It);Gt>1?(dt=Et,bt=Mt):Gt>0&&(dt+=_t*Gt,bt+=It*Gt)}return _t=ct-dt,It=qe-bt,_t*_t+It*It}function et(ct,qe,dt,bt){var Et={id:typeof ct>"u"?null:ct,type:qe,geometry:dt,tags:bt,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};return st(Et),Et}function st(ct){var qe=ct.geometry,dt=ct.type;if(dt==="Point"||dt==="MultiPoint"||dt==="LineString")Ze(ct,qe);else if(dt==="Polygon"||dt==="MultiLineString")for(var bt=0;bt0&&(bt?_t+=(Et*nr-Gt*Mt)/2:_t+=Math.sqrt(Math.pow(Gt-Et,2)+Math.pow(nr-Mt,2))),Et=Gt,Mt=nr}var ar=qe.length-3;qe[2]=1,Ie(qe,0,ar,dt),qe[ar+2]=1,qe.size=Math.abs(_t),qe.start=0,qe.end=qe.size}function vt(ct,qe,dt,bt){for(var Et=0;Et1?1:dt}function Pe(ct,qe,dt,bt,Et,Mt,_t,It){if(dt/=qe,bt/=qe,Mt>=dt&&_t=bt)return null;for(var Gt=[],nr=0;nr=dt&&Rt=bt)continue;var Lt=[];if(Be==="Point"||Be==="MultiPoint")Ue(ir,Lt,dt,bt,Et);else if(Be==="LineString")He(ir,Lt,dt,bt,Et,!1,It.lineMetrics);else if(Be==="MultiLineString")Ce(ir,Lt,dt,bt,Et,!1);else if(Be==="Polygon")Ce(ir,Lt,dt,bt,Et,!0);else if(Be==="MultiPolygon")for(var Ut=0;Ut=dt&&_t<=bt&&(qe.push(ct[Mt]),qe.push(ct[Mt+1]),qe.push(ct[Mt+2]))}}function He(ct,qe,dt,bt,Et,Mt,_t){for(var It=Oe(ct),Gt=Et===0?pe:Te,nr=ct.start,ar,ir,Be=0;Bedt&&(ir=Gt(It,Fe,Rt,Ut,Qt,dt),_t&&(It.start=nr+ar*ir)):rr>bt?Kt=dt&&(ir=Gt(It,Fe,Rt,Ut,Qt,dt),Dt=!0),Kt>bt&&rr<=bt&&(ir=Gt(It,Fe,Rt,Ut,Qt,bt),Dt=!0),!Mt&&Dt&&(_t&&(It.end=nr+ar*ir),qe.push(It),It=Oe(ct)),_t&&(nr+=ar)}var sr=ct.length-3;Fe=ct[sr],Rt=ct[sr+1],Lt=ct[sr+2],rr=Et===0?Fe:Rt,rr>=dt&&rr<=bt&&ge(It,Fe,Rt,Lt),sr=It.length-3,Mt&&sr>=3&&(It[sr]!==It[0]||It[sr+1]!==It[1])&&ge(It,It[0],It[1],It[2]),It.length&&qe.push(It)}function Oe(ct){var qe=[];return qe.size=ct.size,qe.start=ct.start,qe.end=ct.end,qe}function Ce(ct,qe,dt,bt,Et,Mt){for(var _t=0;_t_t.maxX&&(_t.maxX=ar),ir>_t.maxY&&(_t.maxY=ir)}return _t}function Nt(ct,qe,dt,bt){var Et=qe.geometry,Mt=qe.type,_t=[];if(Mt==="Point"||Mt==="MultiPoint")for(var It=0;It0&&qe.size<(Et?_t:bt)){dt.numPoints+=qe.length/3;return}for(var It=[],Gt=0;Gt_t)&&(dt.numSimplified++,It.push(qe[Gt]),It.push(qe[Gt+1])),dt.numPoints++;Et&>(It,Mt),ct.push(It)}function gt(ct,qe){for(var dt=0,bt=0,Et=ct.length,Mt=Et-2;bt0===qe)for(bt=0,Et=ct.length;bt24)throw new Error("maxZoom should be in the 0-24 range");if(qe.promoteId&&qe.generateId)throw new Error("promoteId and generateId cannot be used together.");var bt=Ke(ct,qe);this.tiles={},this.tileCoords=[],dt&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",qe.indexMaxZoom,qe.indexMaxPoints),console.time("generate tiles"),this.stats={},this.total=0),bt=be(bt,qe),bt.length&&this.splitTile(bt,0,0,0),dt&&(bt.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)))}Yt.prototype.options={maxZoom:14,indexMaxZoom:5,indexMaxPoints:1e5,tolerance:3,extent:4096,buffer:64,lineMetrics:!1,promoteId:null,generateId:!1,debug:0},Yt.prototype.splitTile=function(ct,qe,dt,bt,Et,Mt,_t){for(var It=[ct,qe,dt,bt],Gt=this.options,nr=Gt.debug;It.length;){bt=It.pop(),dt=It.pop(),qe=It.pop(),ct=It.pop();var ar=1<1&&console.time("creation"),Be=this.tiles[ir]=ut(ct,qe,dt,bt,Gt),this.tileCoords.push({z:qe,x:dt,y:bt}),nr)){nr>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",qe,dt,bt,Be.numFeatures,Be.numPoints,Be.numSimplified),console.timeEnd("creation"));var Fe="z"+qe;this.stats[Fe]=(this.stats[Fe]||0)+1,this.total++}if(Be.source=ct,Et){if(qe===Gt.maxZoom||qe===Et)continue;var Rt=1<1&&console.time("clipping");var Lt=.5*Gt.buffer/Gt.extent,Ut=.5-Lt,Qt=.5+Lt,rr=1+Lt,Kt,Dt,sr,fr,vr,lr;Kt=Dt=sr=fr=null,vr=Pe(ct,ar,dt-Lt,dt+Qt,0,Be.minX,Be.maxX,Gt),lr=Pe(ct,ar,dt+Ut,dt+rr,0,Be.minX,Be.maxX,Gt),ct=null,vr&&(Kt=Pe(vr,ar,bt-Lt,bt+Qt,1,Be.minY,Be.maxY,Gt),Dt=Pe(vr,ar,bt+Ut,bt+rr,1,Be.minY,Be.maxY,Gt),vr=null),lr&&(sr=Pe(lr,ar,bt-Lt,bt+Qt,1,Be.minY,Be.maxY,Gt),fr=Pe(lr,ar,bt+Ut,bt+rr,1,Be.minY,Be.maxY,Gt),lr=null),nr>1&&console.timeEnd("clipping"),It.push(Kt||[],qe+1,dt*2,bt*2),It.push(Dt||[],qe+1,dt*2,bt*2+1),It.push(sr||[],qe+1,dt*2+1,bt*2),It.push(fr||[],qe+1,dt*2+1,bt*2+1)}}},Yt.prototype.getTile=function(ct,qe,dt){var bt=this.options,Et=bt.extent,Mt=bt.debug;if(ct<0||ct>24)return null;var _t=1<1&&console.log("drilling down to z%d-%d-%d",ct,qe,dt);for(var Gt=ct,nr=qe,ar=dt,ir;!ir&&Gt>0;)Gt--,nr=Math.floor(nr/2),ar=Math.floor(ar/2),ir=this.tiles[gr(Gt,nr,ar)];return!ir||!ir.source?null:(Mt>1&&console.log("found parent tile z%d-%d-%d",Gt,nr,ar),Mt>1&&console.time("drilling down"),this.splitTile(ir.source,Gt,nr,ar,ct,qe,dt),Mt>1&&console.timeEnd("drilling down"),this.tiles[It]?je(this.tiles[It],Et):null)};function gr(ct,qe,dt){return((1<=0?0:ce.button},M.remove=function(ce){ce.parentNode&&ce.parentNode.removeChild(ce)};function l(ce,W,fe){var Q,he,Re,Ge=o.browser.devicePixelRatio>1?"@2x":"",tt=o.getJSON(W.transformRequest(W.normalizeSpriteURL(ce,Ge,".json"),o.ResourceType.SpriteJSON),function(Xt,tr){tt=null,Re||(Re=Xt,Q=tr,zt())}),wt=o.getImage(W.transformRequest(W.normalizeSpriteURL(ce,Ge,".png"),o.ResourceType.SpriteImage),function(Xt,tr){wt=null,Re||(Re=Xt,he=tr,zt())});function zt(){if(Re)fe(Re);else if(Q&&he){var Xt=o.browser.getImageData(he),tr={};for(var qt in Q){var Cr=Q[qt],Ur=Cr.width,Nr=Cr.height,Fr=Cr.x,Gr=Cr.y,nn=Cr.sdf,Cn=Cr.pixelRatio,Rn=Cr.stretchX,Bn=Cr.stretchY,Nn=Cr.content,Fn=new o.RGBAImage({width:Ur,height:Nr});o.RGBAImage.copy(Xt,Fn,{x:Fr,y:Gr},{x:0,y:0},{width:Ur,height:Nr}),tr[qt]={data:Fn,pixelRatio:Cn,sdf:nn,stretchX:Rn,stretchY:Bn,content:Nn}}fe(null,tr)}}return{cancel:function(){tt&&(tt.cancel(),tt=null),wt&&(wt.cancel(),wt=null)}}}function y(ce){var W=ce.userImage;if(W&&W.render){var fe=W.render();if(fe)return ce.data.replace(new Uint8Array(W.data.buffer)),!0}return!1}var h=1,T=function(ce){function W(){ce.call(this),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new o.RGBAImage({width:1,height:1}),this.dirty=!0}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.isLoaded=function(){return this.loaded},W.prototype.setLoaded=function(Q){if(this.loaded!==Q&&(this.loaded=Q,Q)){for(var he=0,Re=this.requestors;he=0?1.2:1))}b.prototype.draw=function(ce){this.ctx.clearRect(0,0,this.size,this.size),this.ctx.fillText(ce,this.buffer,this.middle);for(var W=this.ctx.getImageData(0,0,this.size,this.size),fe=new Uint8ClampedArray(this.size*this.size),Q=0;Q65535){Xt(new Error("glyphs > 65535 not supported"));return}if(Cr.ranges[Nr]){Xt(null,{stack:tr,id:qt,glyph:Ur});return}var Fr=Cr.requests[Nr];Fr||(Fr=Cr.requests[Nr]=[],S.loadGlyphRange(tr,Nr,Q.url,Q.requestManager,function(Gr,nn){if(nn){for(var Cn in nn)Q._doesCharSupportLocalGlyph(+Cn)||(Cr.glyphs[+Cn]=nn[+Cn]);Cr.ranges[Nr]=!0}for(var Rn=0,Bn=Fr;Rn1&&(zt=W[++wt]);var tr=Math.abs(Xt-zt.left),qt=Math.abs(Xt-zt.right),Cr=Math.min(tr,qt),Ur=void 0,Nr=Re/Q*(he+1);if(zt.isDash){var Fr=he-Math.abs(Nr);Ur=Math.sqrt(Cr*Cr+Fr*Fr)}else Ur=he-Math.sqrt(Cr*Cr+Nr*Nr);this.data[tt+Xt]=Math.max(0,Math.min(255,Ur+128))}},k.prototype.addRegularDash=function(W){for(var fe=W.length-1;fe>=0;--fe){var Q=W[fe],he=W[fe+1];Q.zeroLength?W.splice(fe,1):he&&he.isDash===Q.isDash&&(he.left=Q.left,W.splice(fe,1))}var Re=W[0],Ge=W[W.length-1];Re.isDash===Ge.isDash&&(Re.left=Ge.left-this.width,Ge.right=Re.right+this.width);for(var tt=this.width*this.nextRow,wt=0,zt=W[wt],Xt=0;Xt1&&(zt=W[++wt]);var tr=Math.abs(Xt-zt.left),qt=Math.abs(Xt-zt.right),Cr=Math.min(tr,qt),Ur=zt.isDash?Cr:-Cr;this.data[tt+Xt]=Math.max(0,Math.min(255,Ur+128))}},k.prototype.addDash=function(W,fe){var Q=fe?7:0,he=2*Q+1;if(this.nextRow+he>this.height)return o.warnOnce("LineAtlas out of space"),null;for(var Re=0,Ge=0;Ge=Q.minX&&W.x=Q.minY&&W.y0&&(Xt[new o.OverscaledTileID(Q.overscaledZ,tt,he.z,Ge,he.y-1).key]={backfilled:!1},Xt[new o.OverscaledTileID(Q.overscaledZ,Q.wrap,he.z,he.x,he.y-1).key]={backfilled:!1},Xt[new o.OverscaledTileID(Q.overscaledZ,zt,he.z,wt,he.y-1).key]={backfilled:!1}),he.y+10&&(Re.resourceTiming=Q._resourceTiming,Q._resourceTiming=[]),Q.fire(new o.Event("data",Re))})},W.prototype.onAdd=function(Q){this.map=Q,this.load()},W.prototype.setData=function(Q){var he=this;return this._data=Q,this.fire(new o.Event("dataloading",{dataType:"source"})),this._updateWorkerData(function(Re){if(Re){he.fire(new o.ErrorEvent(Re));return}var Ge={dataType:"source",sourceDataType:"content"};he._collectResourceTiming&&he._resourceTiming&&he._resourceTiming.length>0&&(Ge.resourceTiming=he._resourceTiming,he._resourceTiming=[]),he.fire(new o.Event("data",Ge))}),this},W.prototype.getClusterExpansionZoom=function(Q,he){return this.actor.send("geojson.getClusterExpansionZoom",{clusterId:Q,source:this.id},he),this},W.prototype.getClusterChildren=function(Q,he){return this.actor.send("geojson.getClusterChildren",{clusterId:Q,source:this.id},he),this},W.prototype.getClusterLeaves=function(Q,he,Re,Ge){return this.actor.send("geojson.getClusterLeaves",{source:this.id,clusterId:Q,limit:he,offset:Re},Ge),this},W.prototype._updateWorkerData=function(Q){var he=this;this._loaded=!1;var Re=o.extend({},this.workerOptions),Ge=this._data;typeof Ge=="string"?(Re.request=this.map._requestManager.transformRequest(o.browser.resolveURL(Ge),o.ResourceType.Source),Re.request.collectResourceTiming=this._collectResourceTiming):Re.data=JSON.stringify(Ge),this.actor.send(this.type+".loadData",Re,function(tt,wt){he._removed||wt&&wt.abandoned||(he._loaded=!0,wt&&wt.resourceTiming&&wt.resourceTiming[he.id]&&(he._resourceTiming=wt.resourceTiming[he.id].slice(0)),he.actor.send(he.type+".coalesce",{source:Re.source},null),Q(tt))})},W.prototype.loaded=function(){return this._loaded},W.prototype.loadTile=function(Q,he){var Re=this,Ge=Q.actor?"reloadTile":"loadTile";Q.actor=this.actor;var tt={type:this.type,uid:Q.uid,tileID:Q.tileID,zoom:Q.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:o.browser.devicePixelRatio,showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId};Q.request=this.actor.send(Ge,tt,function(wt,zt){return delete Q.request,Q.unloadVectorData(),Q.aborted?he(null):wt?he(wt):(Q.loadVectorData(zt,Re.map.painter,Ge==="reloadTile"),he(null))})},W.prototype.abortTile=function(Q){Q.request&&(Q.request.cancel(),delete Q.request),Q.aborted=!0},W.prototype.unloadTile=function(Q){Q.unloadVectorData(),this.actor.send("removeTile",{uid:Q.uid,type:this.type,source:this.id})},W.prototype.onRemove=function(){this._removed=!0,this.actor.send("removeSource",{type:this.type,source:this.id})},W.prototype.serialize=function(){return o.extend({},this._options,{type:this.type,data:this._data})},W.prototype.hasTransition=function(){return!1},W}(o.Evented),V=o.createLayout([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]),j=function(ce){function W(fe,Q,he,Re){ce.call(this),this.id=fe,this.dispatcher=he,this.coordinates=Q.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(Re),this.options=Q}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.load=function(Q,he){var Re=this;this._loaded=!1,this.fire(new o.Event("dataloading",{dataType:"source"})),this.url=this.options.url,o.getImage(this.map._requestManager.transformRequest(this.url,o.ResourceType.Image),function(Ge,tt){Re._loaded=!0,Ge?Re.fire(new o.ErrorEvent(Ge)):tt&&(Re.image=tt,Q&&(Re.coordinates=Q),he&&he(),Re._finishLoading())})},W.prototype.loaded=function(){return this._loaded},W.prototype.updateImage=function(Q){var he=this;return!this.image||!Q.url?this:(this.options.url=Q.url,this.load(Q.coordinates,function(){he.texture=null}),this)},W.prototype._finishLoading=function(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"metadata"})))},W.prototype.onAdd=function(Q){this.map=Q,this.load()},W.prototype.setCoordinates=function(Q){var he=this;this.coordinates=Q;var Re=Q.map(o.MercatorCoordinate.fromLngLat);this.tileID=$(Re),this.minzoom=this.maxzoom=this.tileID.z;var Ge=Re.map(function(tt){return he.tileID.getTilePoint(tt)._round()});return this._boundsArray=new o.StructArrayLayout4i8,this._boundsArray.emplaceBack(Ge[0].x,Ge[0].y,0,0),this._boundsArray.emplaceBack(Ge[1].x,Ge[1].y,o.EXTENT,0),this._boundsArray.emplaceBack(Ge[3].x,Ge[3].y,0,o.EXTENT),this._boundsArray.emplaceBack(Ge[2].x,Ge[2].y,o.EXTENT,o.EXTENT),this.boundsBuffer&&(this.boundsBuffer.destroy(),delete this.boundsBuffer),this.fire(new o.Event("data",{dataType:"source",sourceDataType:"content"})),this},W.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||!this.image)){var Q=this.map.painter.context,he=Q.gl;this.boundsBuffer||(this.boundsBuffer=Q.createVertexBuffer(this._boundsArray,V.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture||(this.texture=new o.Texture(Q,this.image,he.RGBA),this.texture.bind(he.LINEAR,he.CLAMP_TO_EDGE));for(var Re in this.tiles){var Ge=this.tiles[Re];Ge.state!=="loaded"&&(Ge.state="loaded",Ge.texture=this.texture)}}},W.prototype.loadTile=function(Q,he){this.tileID&&this.tileID.equals(Q.tileID.canonical)?(this.tiles[String(Q.tileID.wrap)]=Q,Q.buckets={},he(null)):(Q.state="errored",he(null))},W.prototype.serialize=function(){return{type:"image",url:this.options.url,coordinates:this.coordinates}},W.prototype.hasTransition=function(){return!1},W}(o.Evented);function $(ce){for(var W=1/0,fe=1/0,Q=-1/0,he=-1/0,Re=0,Ge=ce;Rehe.end(0)?this.fire(new o.ErrorEvent(new o.ValidationError("sources."+this.id,null,"Playback for this video can be set only between the "+he.start(0)+" and "+he.end(0)+"-second mark."))):this.video.currentTime=Q}},W.prototype.getVideo=function(){return this.video},W.prototype.onAdd=function(Q){this.map||(this.map=Q,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))},W.prototype.prepare=function(){if(!(Object.keys(this.tiles).length===0||this.video.readyState<2)){var Q=this.map.painter.context,he=Q.gl;this.boundsBuffer||(this.boundsBuffer=Q.createVertexBuffer(this._boundsArray,V.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?this.video.paused||(this.texture.bind(he.LINEAR,he.CLAMP_TO_EDGE),he.texSubImage2D(he.TEXTURE_2D,0,0,0,he.RGBA,he.UNSIGNED_BYTE,this.video)):(this.texture=new o.Texture(Q,this.video,he.RGBA),this.texture.bind(he.LINEAR,he.CLAMP_TO_EDGE));for(var Re in this.tiles){var Ge=this.tiles[Re];Ge.state!=="loaded"&&(Ge.state="loaded",Ge.texture=this.texture)}}},W.prototype.serialize=function(){return{type:"video",urls:this.urls,coordinates:this.coordinates}},W.prototype.hasTransition=function(){return this.video&&!this.video.paused},W}(j),oe=function(ce){function W(fe,Q,he,Re){ce.call(this,fe,Q,he,Re),Q.coordinates?(!Array.isArray(Q.coordinates)||Q.coordinates.length!==4||Q.coordinates.some(function(Ge){return!Array.isArray(Ge)||Ge.length!==2||Ge.some(function(tt){return typeof tt!="number"})}))&&this.fire(new o.ErrorEvent(new o.ValidationError("sources."+fe,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new o.ErrorEvent(new o.ValidationError("sources."+fe,null,'missing required property "coordinates"'))),Q.animate&&typeof Q.animate!="boolean"&&this.fire(new o.ErrorEvent(new o.ValidationError("sources."+fe,null,'optional "animate" property must be a boolean value'))),Q.canvas?typeof Q.canvas!="string"&&!(Q.canvas instanceof o.window.HTMLCanvasElement)&&this.fire(new o.ErrorEvent(new o.ValidationError("sources."+fe,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 o.ErrorEvent(new o.ValidationError("sources."+fe,null,'missing required property "canvas"'))),this.options=Q,this.animate=Q.animate!==void 0?Q.animate:!0}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.load=function(){if(this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof o.window.HTMLCanvasElement?this.options.canvas:o.window.document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()){this.fire(new o.ErrorEvent(new Error("Canvas dimensions cannot be less than or equal to zero.")));return}this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading()},W.prototype.getCanvas=function(){return this.canvas},W.prototype.onAdd=function(Q){this.map=Q,this.load(),this.canvas&&this.animate&&this.play()},W.prototype.onRemove=function(){this.pause()},W.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()&&Object.keys(this.tiles).length!==0){var he=this.map.painter.context,Re=he.gl;this.boundsBuffer||(this.boundsBuffer=he.createVertexBuffer(this._boundsArray,V.members)),this.boundsSegments||(this.boundsSegments=o.SegmentVector.simpleSegment(0,0,4,2)),this.texture?(Q||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):this.texture=new o.Texture(he,this.canvas,Re.RGBA,{premultiply:!0});for(var Ge in this.tiles){var tt=this.tiles[Ge];tt.state!=="loaded"&&(tt.state="loaded",tt.texture=this.texture)}}},W.prototype.serialize=function(){return{type:"canvas",coordinates:this.coordinates}},W.prototype.hasTransition=function(){return this._playing},W.prototype._hasInvalidDimensions=function(){for(var Q=0,he=[this.canvas.width,this.canvas.height];Qthis.max){var tt=this._getAndRemoveByKey(this.order[0]);tt&&this.onRemove(tt)}return this},de.prototype.has=function(W){return W.wrapped().key in this.data},de.prototype.getAndRemove=function(W){return this.has(W)?this._getAndRemoveByKey(W.wrapped().key):null},de.prototype._getAndRemoveByKey=function(W){var fe=this.data[W].shift();return fe.timeout&&clearTimeout(fe.timeout),this.data[W].length===0&&delete this.data[W],this.order.splice(this.order.indexOf(W),1),fe.value},de.prototype.getByKey=function(W){var fe=this.data[W];return fe?fe[0].value:null},de.prototype.get=function(W){if(!this.has(W))return null;var fe=this.data[W.wrapped().key][0];return fe.value},de.prototype.remove=function(W,fe){if(!this.has(W))return this;var Q=W.wrapped().key,he=fe===void 0?0:this.data[Q].indexOf(fe),Re=this.data[Q][he];return this.data[Q].splice(he,1),Re.timeout&&clearTimeout(Re.timeout),this.data[Q].length===0&&delete this.data[Q],this.onRemove(Re.value),this.order.splice(this.order.indexOf(Q),1),this},de.prototype.setMaxSize=function(W){for(this.max=W;this.order.length>this.max;){var fe=this._getAndRemoveByKey(this.order[0]);fe&&this.onRemove(fe)}return this},de.prototype.filter=function(W){var fe=[];for(var Q in this.data)for(var he=0,Re=this.data[Q];he1||(Math.abs(tr)>1&&(Math.abs(tr+Cr)===1?tr+=Cr:Math.abs(tr-Cr)===1&&(tr-=Cr)),!(!Xt.dem||!zt.dem)&&(zt.dem.backfillBorder(Xt.dem,tr,qt),zt.neighboringTiles&&zt.neighboringTiles[Ur]&&(zt.neighboringTiles[Ur].backfilled=!0)))}},W.prototype.getTile=function(Q){return this.getTileByID(Q.key)},W.prototype.getTileByID=function(Q){return this._tiles[Q]},W.prototype._retainLoadedChildren=function(Q,he,Re,Ge){for(var tt in this._tiles){var wt=this._tiles[tt];if(!(Ge[tt]||!wt.hasData()||wt.tileID.overscaledZ<=he||wt.tileID.overscaledZ>Re)){for(var zt=wt.tileID;wt&&wt.tileID.overscaledZ>he+1;){var Xt=wt.tileID.scaledTo(wt.tileID.overscaledZ-1);wt=this._tiles[Xt.key],wt&&wt.hasData()&&(zt=Xt)}for(var tr=zt;tr.overscaledZ>he;)if(tr=tr.scaledTo(tr.overscaledZ-1),Q[tr.key]){Ge[zt.key]=zt;break}}}},W.prototype.findLoadedParent=function(Q,he){if(Q.key in this._loadedParentTiles){var Re=this._loadedParentTiles[Q.key];return Re&&Re.tileID.overscaledZ>=he?Re:null}for(var Ge=Q.overscaledZ-1;Ge>=he;Ge--){var tt=Q.scaledTo(Ge),wt=this._getLoadedTile(tt);if(wt)return wt}},W.prototype._getLoadedTile=function(Q){var he=this._tiles[Q.key];if(he&&he.hasData())return he;var Re=this._cache.getByKey(Q.wrapped().key);return Re},W.prototype.updateCacheSize=function(Q){var he=Math.ceil(Q.width/this._source.tileSize)+1,Re=Math.ceil(Q.height/this._source.tileSize)+1,Ge=he*Re,tt=5,wt=Math.floor(Ge*tt),zt=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,wt):wt;this._cache.setMaxSize(zt)},W.prototype.handleWrapJump=function(Q){var he=this._prevLng===void 0?Q:this._prevLng,Re=Q-he,Ge=Re/360,tt=Math.round(Ge);if(this._prevLng=Q,tt){var wt={};for(var zt in this._tiles){var Xt=this._tiles[zt];Xt.tileID=Xt.tileID.unwrapTo(Xt.tileID.wrap+tt),wt[Xt.tileID.key]=Xt}this._tiles=wt;for(var tr in this._timers)clearTimeout(this._timers[tr]),delete this._timers[tr];for(var qt in this._tiles){var Cr=this._tiles[qt];this._setTileReloadTimer(qt,Cr)}}},W.prototype.update=function(Q){var he=this;if(this.transform=Q,!(!this._sourceLoaded||this._paused)){this.updateCacheSize(Q),this.handleWrapJump(this.transform.center.lng),this._coveredTiles={};var Re;this.used?this._source.tileID?Re=Q.getVisibleUnwrappedCoordinates(this._source.tileID).map(function(ea){return new o.OverscaledTileID(ea.canonical.z,ea.wrap,ea.canonical.z,ea.canonical.x,ea.canonical.y)}):(Re=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&&(Re=Re.filter(function(ea){return he._source.hasTile(ea)}))):Re=[];var Ge=Q.coveringZoomLevel(this._source),tt=Math.max(Ge-W.maxOverzooming,this._source.minzoom),wt=Math.max(Ge+W.maxUnderzooming,this._source.minzoom),zt=this._updateRetainedTiles(Re,Ge);if(Gt(this._source.type)){for(var Xt={},tr={},qt=Object.keys(zt),Cr=0,Ur=qt;Crthis._source.maxzoom){var nn=Fr.children(this._source.maxzoom)[0],Cn=this.getTile(nn);if(Cn&&Cn.hasData()){Re[nn.key]=nn;continue}}else{var Rn=Fr.children(this._source.maxzoom);if(Re[Rn[0].key]&&Re[Rn[1].key]&&Re[Rn[2].key]&&Re[Rn[3].key])continue}for(var Bn=Gr.wasRequested(),Nn=Fr.overscaledZ-1;Nn>=tt;--Nn){var Fn=Fr.scaledTo(Nn);if(Ge[Fn.key]||(Ge[Fn.key]=!0,Gr=this.getTile(Fn),!Gr&&Bn&&(Gr=this._addTile(Fn)),Gr&&(Re[Fn.key]=Fn,Bn=Gr.wasRequested(),Gr.hasData())))break}}}return Re},W.prototype._updateLoadedParentTileCache=function(){this._loadedParentTiles={};for(var Q in this._tiles){for(var he=[],Re=void 0,Ge=this._tiles[Q].tileID;Ge.overscaledZ>0;){if(Ge.key in this._loadedParentTiles){Re=this._loadedParentTiles[Ge.key];break}he.push(Ge.key);var tt=Ge.scaledTo(Ge.overscaledZ-1);if(Re=this._getLoadedTile(tt),Re)break;Ge=tt}for(var wt=0,zt=he;wt0)&&(he.hasData()&&he.state!=="reloading"?this._cache.add(he.tileID,he,he.getExpiryTimeout()):(he.aborted=!0,this._abortTile(he),this._unloadTile(he))))},W.prototype.clearTiles=function(){this._shouldReloadOnResume=!1,this._paused=!1;for(var Q in this._tiles)this._removeTile(Q);this._cache.reset()},W.prototype.tilesIn=function(Q,he,Re){var Ge=this,tt=[],wt=this.transform;if(!wt)return tt;for(var zt=Re?wt.getCameraQueryGeometry(Q):Q,Xt=Q.map(function(Nn){return wt.pointCoordinate(Nn)}),tr=zt.map(function(Nn){return wt.pointCoordinate(Nn)}),qt=this.getIds(),Cr=1/0,Ur=1/0,Nr=-1/0,Fr=-1/0,Gr=0,nn=tr;Gr=0&&ca[1].y+ea>=0){var ia=Xt.map(function(Va){return Vn.getTilePoint(Va)}),Ea=tr.map(function(Va){return Vn.getTilePoint(Va)});tt.push({tile:Fn,tileID:Vn,queryGeometry:ia,cameraQueryGeometry:Ea,scale:Zn})}}},Bn=0;Bn=o.browser.now())return!0}return!1},W.prototype.setFeatureState=function(Q,he,Re){Q=Q||"_geojsonTileLayer",this._state.updateState(Q,he,Re)},W.prototype.removeFeatureState=function(Q,he,Re){Q=Q||"_geojsonTileLayer",this._state.removeFeatureState(Q,he,Re)},W.prototype.getFeatureState=function(Q,he){return Q=Q||"_geojsonTileLayer",this._state.getState(Q,he)},W.prototype.setDependencies=function(Q,he,Re){var Ge=this._tiles[Q];Ge&&Ge.setDependencies(he,Re)},W.prototype.reloadTilesForDependencies=function(Q,he){for(var Re in this._tiles){var Ge=this._tiles[Re];Ge.hasDependency(Q,he)&&this._reloadTile(Re,"reloading")}this._cache.filter(function(tt){return!tt.hasDependency(Q,he)})},W}(o.Evented);_t.maxOverzooming=10,_t.maxUnderzooming=3;function It(ce,W){var fe=Math.abs(ce.wrap*2)-+(ce.wrap<0),Q=Math.abs(W.wrap*2)-+(W.wrap<0);return ce.overscaledZ-W.overscaledZ||Q-fe||W.canonical.y-ce.canonical.y||W.canonical.x-ce.canonical.x}function Gt(ce){return ce==="raster"||ce==="image"||ce==="video"}function nr(){return new o.window.Worker(Hi.workerUrl)}var ar="mapboxgl_preloaded_worker_pool",ir=function(){this.active={}};ir.prototype.acquire=function(W){if(!this.workers)for(this.workers=[];this.workers.length0?(he-Ge)/tt:0;return this.points[Re].mult(1-wt).add(this.points[fe].mult(wt))};var or=function(W,fe,Q){var he=this.boxCells=[],Re=this.circleCells=[];this.xCellCount=Math.ceil(W/Q),this.yCellCount=Math.ceil(fe/Q);for(var Ge=0;Gethis.width||he<0||fe>this.height)return Re?!1:[];var tt=[];if(W<=0&&fe<=0&&this.width<=Q&&this.height<=he){if(Re)return!0;for(var wt=0;wt0:tt}},or.prototype._queryCircle=function(W,fe,Q,he,Re){var Ge=W-Q,tt=W+Q,wt=fe-Q,zt=fe+Q;if(tt<0||Ge>this.width||zt<0||wt>this.height)return he?!1:[];var Xt=[],tr={hitTest:he,circle:{x:W,y:fe,radius:Q},seenUids:{box:{},circle:{}}};return this._forEachCell(Ge,wt,tt,zt,this._queryCellCircle,Xt,tr,Re),he?Xt.length>0:Xt},or.prototype.query=function(W,fe,Q,he,Re){return this._query(W,fe,Q,he,!1,Re)},or.prototype.hitTest=function(W,fe,Q,he,Re){return this._query(W,fe,Q,he,!0,Re)},or.prototype.hitTestCircle=function(W,fe,Q,he){return this._queryCircle(W,fe,Q,!0,he)},or.prototype._queryCell=function(W,fe,Q,he,Re,Ge,tt,wt){var zt=tt.seenUids,Xt=this.boxCells[Re];if(Xt!==null)for(var tr=this.bboxes,qt=0,Cr=Xt;qt=tr[Nr+0]&&he>=tr[Nr+1]&&(!wt||wt(this.boxKeys[Ur]))){if(tt.hitTest)return Ge.push(!0),!0;Ge.push({key:this.boxKeys[Ur],x1:tr[Nr],y1:tr[Nr+1],x2:tr[Nr+2],y2:tr[Nr+3]})}}}var Fr=this.circleCells[Re];if(Fr!==null)for(var Gr=this.circles,nn=0,Cn=Fr;nntt*tt+wt*wt},or.prototype._circleAndRectCollide=function(W,fe,Q,he,Re,Ge,tt){var wt=(Ge-he)/2,zt=Math.abs(W-(he+wt));if(zt>wt+Q)return!1;var Xt=(tt-Re)/2,tr=Math.abs(fe-(Re+Xt));if(tr>Xt+Q)return!1;if(zt<=wt||tr<=Xt)return!0;var qt=zt-wt,Cr=tr-Xt;return qt*qt+Cr*Cr<=Q*Q};function Lr(ce,W,fe,Q,he){var Re=o.create();return W?(o.scale(Re,Re,[1/he,1/he,1]),fe||o.rotateZ(Re,Re,Q.angle)):o.multiply(Re,Q.labelPlaneMatrix,ce),Re}function Br(ce,W,fe,Q,he){if(W){var Re=o.clone(ce);return o.scale(Re,Re,[he,he,1]),fe||o.rotateZ(Re,Re,-Q.angle),Re}else return Q.glCoordMatrix}function _r(ce,W){var fe=[ce.x,ce.y,0,1];pr(fe,fe,W);var Q=fe[3];return{point:new o.Point(fe[0]/Q,fe[1]/Q),signedDistanceFromCamera:Q}}function Qr(ce,W){return .5+.5*(ce/W)}function un(ce,W){var fe=ce[0]/ce[3],Q=ce[1]/ce[3],he=fe>=-W[0]&&fe<=W[0]&&Q>=-W[1]&&Q<=W[1];return he}function ln(ce,W,fe,Q,he,Re,Ge,tt){var wt=Q?ce.textSizeData:ce.iconSizeData,zt=o.evaluateSizeForZoom(wt,fe.transform.zoom),Xt=[256/fe.width*2+1,256/fe.height*2+1],tr=Q?ce.text.dynamicLayoutVertexArray:ce.icon.dynamicLayoutVertexArray;tr.clear();for(var qt=ce.lineVertexArray,Cr=Q?ce.text.placedSymbolArray:ce.icon.placedSymbolArray,Ur=fe.transform.width/fe.transform.height,Nr=!1,Fr=0;FrRe)return{useVertical:!0}}return(ce===o.WritingMode.vertical?W.yfe.x)?{needsFlipping:!0}:null}function Kn(ce,W,fe,Q,he,Re,Ge,tt,wt,zt,Xt,tr,qt,Cr){var Ur=W/24,Nr=ce.lineOffsetX*Ur,Fr=ce.lineOffsetY*Ur,Gr;if(ce.numGlyphs>1){var nn=ce.glyphStartIndex+ce.numGlyphs,Cn=ce.lineStartIndex,Rn=ce.lineStartIndex+ce.lineLength,Bn=Mn(Ur,tt,Nr,Fr,fe,Xt,tr,ce,wt,Re,qt);if(!Bn)return{notEnoughRoom:!0};var Nn=_r(Bn.first.point,Ge).point,Fn=_r(Bn.last.point,Ge).point;if(Q&&!fe){var Vn=Dn(ce.writingMode,Nn,Fn,Cr);if(Vn)return Vn}Gr=[Bn.first];for(var Zn=ce.glyphStartIndex+1;Zn0?Ea.point:sa(tr,ia,ea,1,he),za=Dn(ce.writingMode,ea,Va,Cr);if(za)return za}var ga=na(Ur*tt.getoffsetX(ce.glyphStartIndex),Nr,Fr,fe,Xt,tr,ce.segment,ce.lineStartIndex,ce.lineStartIndex+ce.lineLength,wt,Re,qt);if(!ga)return{notEnoughRoom:!0};Gr=[ga]}for(var Fa=0,Ia=Gr;Fa0?1:-1,Ur=0;Q&&(Cr*=-1,Ur=Math.PI),Cr<0&&(Ur+=Math.PI);for(var Nr=Cr>0?tt+Ge:tt+Ge+1,Fr=he,Gr=he,nn=0,Cn=0,Rn=Math.abs(qt),Bn=[];nn+Cn<=Rn;){if(Nr+=Cr,Nr=wt)return null;if(Gr=Fr,Bn.push(Fr),Fr=tr[Nr],Fr===void 0){var Nn=new o.Point(zt.getx(Nr),zt.gety(Nr)),Fn=_r(Nn,Xt);if(Fn.signedDistanceFromCamera>0)Fr=tr[Nr]=Fn.point;else{var Vn=Nr-Cr,Zn=nn===0?Re:new o.Point(zt.getx(Vn),zt.gety(Vn));Fr=sa(Zn,Nn,Gr,Rn-nn+1,Xt)}}nn+=Cn,Cn=Gr.dist(Fr)}var ea=(Rn-nn)/Cn,ca=Fr.sub(Gr),ia=ca.mult(ea)._add(Gr);ia._add(ca._unit()._perp()._mult(fe*Cr));var Ea=Ur+Math.atan2(Fr.y-Gr.y,Fr.x-Gr.x);return Bn.push(ia),{point:ia,angle:Ea,path:Bn}}var Jn=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function aa(ce,W){for(var fe=0;fe=1;Ka--)Ia.push(ga.path[Ka]);for(var Wa=1;Wa0){for(var ka=Ia[0].clone(),Ha=Ia[0].clone(),Si=1;Si=Ea.x&&Ha.x<=Va.x&&ka.y>=Ea.y&&Ha.y<=Va.y?ii=[Ia]:Ha.xVa.x||Ha.yVa.y?ii=[]:ii=o.clipLine([Ia],Ea.x,Ea.y,Va.x,Va.y)}for(var Ji=0,fs=ii;Ji=this.screenRightBoundary||he<$r||fe>this.screenBottomBoundary},Xr.prototype.isInsideGrid=function(W,fe,Q,he){return Q>=0&&W=0&&fe0){var Rn;return this.prevPlacement&&this.prevPlacement.variableOffsets[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID]&&this.prevPlacement.placements[qt.crossTileID].text&&(Rn=this.prevPlacement.variableOffsets[qt.crossTileID].anchor),this.variableOffsets[qt.crossTileID]={textOffset:Fr,width:Q,height:he,anchor:W,textBoxScale:Re,prevAnchor:Rn},this.markUsedJustification(Cr,W,qt,Ur),Cr.allowVerticalPlacement&&(this.markUsedOrientation(Cr,Ur,qt),this.placedOrientations[qt.crossTileID]=Ur),{shift:Gr,placedGlyphBoxes:nn}}},Rr.prototype.placeLayerBucketPart=function(W,fe,Q){var he=this,Re=W.parameters,Ge=Re.bucket,tt=Re.layout,wt=Re.posMatrix,zt=Re.textLabelPlaneMatrix,Xt=Re.labelToScreenMatrix,tr=Re.textPixelRatio,qt=Re.holdingForFade,Cr=Re.collisionBoxArray,Ur=Re.partiallyEvaluatedTextSize,Nr=Re.collisionGroup,Fr=tt.get("text-optional"),Gr=tt.get("icon-optional"),nn=tt.get("text-allow-overlap"),Cn=tt.get("icon-allow-overlap"),Rn=tt.get("text-rotation-alignment")==="map",Bn=tt.get("text-pitch-alignment")==="map",Nn=tt.get("icon-text-fit")!=="none",Fn=tt.get("symbol-z-order")==="viewport-y",Vn=nn&&(Cn||!Ge.hasIconData()||Gr),Zn=Cn&&(nn||!Ge.hasTextData()||Fr);!Ge.collisionArrays&&Cr&&Ge.deserializeCollisionBoxes(Cr);var ea=function(ga,Fa){if(!fe[ga.crossTileID]){if(qt){he.placements[ga.crossTileID]=new gn(!1,!1,!1);return}var Ia=!1,Ka=!1,Wa=!0,fi=null,Ua={box:null,offscreen:null},ii={box:null,offscreen:null},ka=null,Ha=null,Si=null,Ji=0,fs=0,cs=0;Fa.textFeatureIndex?Ji=Fa.textFeatureIndex:ga.useRuntimeCollisionCircles&&(Ji=ga.featureIndex),Fa.verticalTextFeatureIndex&&(fs=Fa.verticalTextFeatureIndex);var As=Fa.textBox;if(As){var js=function(Ri){var Vo=o.WritingMode.horizontal;if(Ge.allowVerticalPlacement&&!Ri&&he.prevPlacement){var Ho=he.prevPlacement.placedOrientations[ga.crossTileID];Ho&&(he.placedOrientations[ga.crossTileID]=Ho,Vo=Ho,he.markUsedOrientation(Ge,Vo,ga))}return Vo},pu=function(Ri,Vo){if(Ge.allowVerticalPlacement&&ga.numVerticalGlyphVertices>0&&Fa.verticalTextBox)for(var Ho=0,Bf=Ge.writingModes;Ho0&&(Uo=Uo.filter(function(Ri){return Ri!==Po.anchor}),Uo.unshift(Po.anchor))}var Ms=function(Ri,Vo,Ho){for(var Bf=Ri.x2-Ri.x1,lc=Ri.y2-Ri.y1,eh=ga.textBoxScale,th=Nn&&!Cn?Vo:null,Ef={box:[],offscreen:!1},rh=nn?Uo.length*2:Uo.length,Nf=0;Nf=Uo.length,uc=he.attemptAnchorPlacement(nh,Ri,Bf,lc,eh,Rn,Bn,tr,wt,Nr,ah,ga,Ge,Ho,th);if(uc&&(Ef=uc.placedGlyphBoxes,Ef&&Ef.box&&Ef.box.length)){Ia=!0,fi=uc.shift;break}}return Ef},Tl=function(){return Ms(As,Fa.iconBox,o.WritingMode.horizontal)},Ss=function(){var Ri=Fa.verticalTextBox,Vo=Ua&&Ua.box&&Ua.box.length;return Ge.allowVerticalPlacement&&!Vo&&ga.numVerticalGlyphVertices>0&&Ri?Ms(Ri,Fa.verticalIconBox,o.WritingMode.vertical):{box:null,offscreen:null}};pu(Tl,Ss),Ua&&(Ia=Ua.box,Wa=Ua.offscreen);var kf=js(Ua&&Ua.box);if(!Ia&&he.prevPlacement){var Zu=he.prevPlacement.variableOffsets[ga.crossTileID];Zu&&(he.variableOffsets[ga.crossTileID]=Zu,he.markUsedJustification(Ge,Zu.anchor,ga,kf))}}else{var Ks=function(Ri,Vo){var Ho=he.collisionIndex.placeCollisionBox(Ri,nn,tr,wt,Nr.predicate);return Ho&&Ho.box&&Ho.box.length&&(he.markUsedOrientation(Ge,Vo,ga),he.placedOrientations[ga.crossTileID]=Vo),Ho},Lo=function(){return Ks(As,o.WritingMode.horizontal)},Js=function(){var Ri=Fa.verticalTextBox;return Ge.allowVerticalPlacement&&ga.numVerticalGlyphVertices>0&&Ri?Ks(Ri,o.WritingMode.vertical):{box:null,offscreen:null}};pu(Lo,Js),js(Ua&&Ua.box&&Ua.box.length)}}if(ka=Ua,Ia=ka&&ka.box&&ka.box.length>0,Wa=ka&&ka.offscreen,ga.useRuntimeCollisionCircles){var eo=Ge.text.placedSymbolArray.get(ga.centerJustifiedTextSymbolIndex),_f=o.evaluateSizeForFeature(Ge.textSizeData,Ur,eo),Sf=tt.get("text-padding"),go=ga.collisionCircleDiameter;Ha=he.collisionIndex.placeCollisionCircles(nn,eo,Ge.lineVertexArray,Ge.glyphOffsetArray,_f,wt,zt,Xt,Q,Bn,Nr.predicate,go,Sf),Ia=nn||Ha.circles.length>0&&!Ha.collisionDetected,Wa=Wa&&Ha.offscreen}if(Fa.iconFeatureIndex&&(cs=Fa.iconFeatureIndex),Fa.iconBox){var ju=function(Ri){var Vo=Nn&&fi?xr(Ri,fi.x,fi.y,Rn,Bn,he.transform.angle):Ri;return he.collisionIndex.placeCollisionBox(Vo,Cn,tr,wt,Nr.predicate)};ii&&ii.box&&ii.box.length&&Fa.verticalIconBox?(Si=ju(Fa.verticalIconBox),Ka=Si.box.length>0):(Si=ju(Fa.iconBox),Ka=Si.box.length>0),Wa=Wa&&Si.offscreen}var zf=Fr||ga.numHorizontalGlyphVertices===0&&ga.numVerticalGlyphVertices===0,Ff=Gr||ga.numIconVertices===0;if(!zf&&!Ff?Ka=Ia=Ka&&Ia:Ff?zf||(Ka=Ka&&Ia):Ia=Ka&&Ia,Ia&&ka&&ka.box&&(ii&&ii.box&&fs?he.collisionIndex.insertCollisionBox(ka.box,tt.get("text-ignore-placement"),Ge.bucketInstanceId,fs,Nr.ID):he.collisionIndex.insertCollisionBox(ka.box,tt.get("text-ignore-placement"),Ge.bucketInstanceId,Ji,Nr.ID)),Ka&&Si&&he.collisionIndex.insertCollisionBox(Si.box,tt.get("icon-ignore-placement"),Ge.bucketInstanceId,cs,Nr.ID),Ha&&(Ia&&he.collisionIndex.insertCollisionCircles(Ha.circles,tt.get("text-ignore-placement"),Ge.bucketInstanceId,Ji,Nr.ID),Q)){var Of=Ge.bucketInstanceId,Ku=he.collisionCircleArrays[Of];Ku===void 0&&(Ku=he.collisionCircleArrays[Of]=new In);for(var Ju=0;Ju=0;--ia){var Ea=ca[ia];ea(Ge.symbolInstances.get(Ea),Ge.collisionArrays[Ea])}else for(var Va=W.symbolInstanceStart;Va=0&&(Ge>=0&&Xt!==Ge?W.text.placedSymbolArray.get(Xt).crossTileID=0:W.text.placedSymbolArray.get(Xt).crossTileID=Q.crossTileID)}},Rr.prototype.markUsedOrientation=function(W,fe,Q){for(var he=fe===o.WritingMode.horizontal||fe===o.WritingMode.horizontalOnly?fe:0,Re=fe===o.WritingMode.vertical?fe:0,Ge=[Q.leftJustifiedTextSymbolIndex,Q.centerJustifiedTextSymbolIndex,Q.rightJustifiedTextSymbolIndex],tt=0,wt=Ge;tt0||Bn>0,ea=Cn.numIconVertices>0,ca=he.placedOrientations[Cn.crossTileID],ia=ca===o.WritingMode.vertical,Ea=ca===o.WritingMode.horizontal||ca===o.WritingMode.horizontalOnly;if(Zn){var Va=zr(Vn.text),za=ia?Yr:Va;Ur(W.text,Rn,za);var ga=Ea?Yr:Va;Ur(W.text,Bn,ga);var Fa=Vn.text.isHidden();[Cn.rightJustifiedTextSymbolIndex,Cn.centerJustifiedTextSymbolIndex,Cn.leftJustifiedTextSymbolIndex].forEach(function(cs){cs>=0&&(W.text.placedSymbolArray.get(cs).hidden=Fa||ia?1:0)}),Cn.verticalPlacedTextSymbolIndex>=0&&(W.text.placedSymbolArray.get(Cn.verticalPlacedTextSymbolIndex).hidden=Fa||Ea?1:0);var Ia=he.variableOffsets[Cn.crossTileID];Ia&&he.markUsedJustification(W,Ia.anchor,Cn,ca);var Ka=he.placedOrientations[Cn.crossTileID];Ka&&(he.markUsedJustification(W,"left",Cn,Ka),he.markUsedOrientation(W,Ka,Cn))}if(ea){var Wa=zr(Vn.icon),fi=!(qt&&Cn.verticalPlacedIconSymbolIndex&&ia);if(Cn.placedIconSymbolIndex>=0){var Ua=fi?Wa:Yr;Ur(W.icon,Cn.numIconVertices,Ua),W.icon.placedSymbolArray.get(Cn.placedIconSymbolIndex).hidden=Vn.icon.isHidden()}if(Cn.verticalPlacedIconSymbolIndex>=0){var ii=fi?Yr:Wa;Ur(W.icon,Cn.numVerticalIconVertices,ii),W.icon.placedSymbolArray.get(Cn.verticalPlacedIconSymbolIndex).hidden=Vn.icon.isHidden()}}if(W.hasIconCollisionBoxData()||W.hasTextCollisionBoxData()){var ka=W.collisionArrays[nn];if(ka){var Ha=new o.Point(0,0);if(ka.textBox||ka.verticalTextBox){var Si=!0;if(zt){var Ji=he.variableOffsets[Nn];Ji?(Ha=Ma(Ji.anchor,Ji.width,Ji.height,Ji.textOffset,Ji.textBoxScale),Xt&&Ha._rotate(tr?he.transform.angle:-he.transform.angle)):Si=!1}ka.textBox&&yr(W.textCollisionBox.collisionVertexArray,Vn.text.placed,!Si||ia,Ha.x,Ha.y),ka.verticalTextBox&&yr(W.textCollisionBox.collisionVertexArray,Vn.text.placed,!Si||Ea,Ha.x,Ha.y)}var fs=!!(!Ea&&ka.verticalIconBox);ka.iconBox&&yr(W.iconCollisionBox.collisionVertexArray,Vn.icon.placed,fs,qt?Ha.x:0,qt?Ha.y:0),ka.verticalIconBox&&yr(W.iconCollisionBox.collisionVertexArray,Vn.icon.placed,!fs,qt?Ha.x:0,qt?Ha.y:0)}}},Fr=0;FrW},Rr.prototype.setStale=function(){this.stale=!0};function yr(ce,W,fe,Q,he){ce.emplaceBack(W?1:0,fe?1:0,Q||0,he||0),ce.emplaceBack(W?1:0,fe?1:0,Q||0,he||0),ce.emplaceBack(W?1:0,fe?1:0,Q||0,he||0),ce.emplaceBack(W?1:0,fe?1:0,Q||0,he||0)}var Dr=Math.pow(2,25),vn=Math.pow(2,24),En=Math.pow(2,17),an=Math.pow(2,16),en=Math.pow(2,9),br=Math.pow(2,8),Vr=Math.pow(2,1);function zr(ce){if(ce.opacity===0&&!ce.placed)return 0;if(ce.opacity===1&&ce.placed)return 4294967295;var W=ce.placed?1:0,fe=Math.floor(ce.opacity*127);return fe*Dr+W*vn+fe*En+W*an+fe*en+W*br+fe*Vr+W}var Yr=0,dn=function(W){this._sortAcrossTiles=W.layout.get("symbol-z-order")!=="viewport-y"&&W.layout.get("symbol-sort-key").constantOr(1)!==void 0,this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]};dn.prototype.continuePlacement=function(W,fe,Q,he,Re){for(var Ge=this._bucketParts;this._currentTileIndex2};this._currentPlacementIndex>=0;){var tt=W[this._currentPlacementIndex],wt=fe[tt],zt=this.placement.collisionIndex.transform.zoom;if(wt.type==="symbol"&&(!wt.minzoom||wt.minzoom<=zt)&&(!wt.maxzoom||wt.maxzoom>zt)){this._inProgressLayer||(this._inProgressLayer=new dn(wt));var Xt=this._inProgressLayer.continuePlacement(Q[wt.source],this.placement,this._showCollisionBoxes,wt,Ge);if(Xt)return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0},wn.prototype.commit=function(W){return this.placement.commit(W),this.placement};var Tn=512/o.EXTENT/2,kn=function(W,fe,Q){this.tileID=W,this.indexedSymbolInstances={},this.bucketInstanceId=Q;for(var he=0;heW.overscaledZ)for(var zt in wt){var Xt=wt[zt];Xt.tileID.isChildOf(W)&&Xt.findMatches(fe.symbolInstances,W,Ge)}else{var tr=W.scaledTo(Number(tt)),qt=wt[tr.key];qt&&qt.findMatches(fe.symbolInstances,W,Ge)}}for(var Cr=0;Cr0)throw new Error("Unimplemented: "+Ge.map(function(tt){return tt.command}).join(", ")+".");return Re.forEach(function(tt){tt.command!=="setTransition"&&he[tt.command].apply(he,tt.args)}),this.stylesheet=Q,!0},W.prototype.addImage=function(Q,he){if(this.getImage(Q))return this.fire(new o.ErrorEvent(new Error("An image with this name already exists.")));this.imageManager.addImage(Q,he),this._afterImageUpdated(Q)},W.prototype.updateImage=function(Q,he){this.imageManager.updateImage(Q,he)},W.prototype.getImage=function(Q){return this.imageManager.getImage(Q)},W.prototype.removeImage=function(Q){if(!this.getImage(Q))return this.fire(new o.ErrorEvent(new Error("No image with this name exists.")));this.imageManager.removeImage(Q),this._afterImageUpdated(Q)},W.prototype._afterImageUpdated=function(Q){this._availableImages=this.imageManager.listImages(),this._changedImages[Q]=!0,this._changed=!0,this.dispatcher.broadcast("setImages",this._availableImages),this.fire(new o.Event("data",{dataType:"style"}))},W.prototype.listImages=function(){return this._checkLoaded(),this.imageManager.listImages()},W.prototype.addSource=function(Q,he,Re){var Ge=this;if(Re===void 0&&(Re={}),this._checkLoaded(),this.sourceCaches[Q]!==void 0)throw new Error("There is already a source with this ID");if(!he.type)throw new Error("The type property must be defined, but only the following properties were given: "+Object.keys(he).join(", ")+".");var tt=["vector","raster","geojson","video","image"],wt=tt.indexOf(he.type)>=0;if(!(wt&&this._validate(o.validateStyle.source,"sources."+Q,he,null,Re))){this.map&&this.map._collectResourceTiming&&(he.collectResourceTiming=!0);var zt=this.sourceCaches[Q]=new _t(Q,he,this.dispatcher);zt.style=this,zt.setEventedParent(this,function(){return{isSourceLoaded:Ge.loaded(),source:zt.serialize(),sourceId:Q}}),zt.onAdd(this.map),this._changed=!0}},W.prototype.removeSource=function(Q){if(this._checkLoaded(),this.sourceCaches[Q]===void 0)throw new Error("There is no source with this ID");for(var he in this._layers)if(this._layers[he].source===Q)return this.fire(new o.ErrorEvent(new Error('Source "'+Q+'" cannot be removed while layer "'+he+'" is using it.')));var Re=this.sourceCaches[Q];delete this.sourceCaches[Q],delete this._updatedSources[Q],Re.fire(new o.Event("data",{sourceDataType:"metadata",dataType:"source",sourceId:Q})),Re.setEventedParent(null),Re.clearTiles(),Re.onRemove&&Re.onRemove(this.map),this._changed=!0},W.prototype.setGeoJSONSourceData=function(Q,he){this._checkLoaded();var Re=this.sourceCaches[Q].getSource();Re.setData(he),this._changed=!0},W.prototype.getSource=function(Q){return this.sourceCaches[Q]&&this.sourceCaches[Q].getSource()},W.prototype.addLayer=function(Q,he,Re){Re===void 0&&(Re={}),this._checkLoaded();var Ge=Q.id;if(this.getLayer(Ge)){this.fire(new o.ErrorEvent(new Error('Layer with id "'+Ge+'" already exists on this map')));return}var tt;if(Q.type==="custom"){if(la(this,o.validateCustomStyleLayer(Q)))return;tt=o.createStyleLayer(Q)}else{if(typeof Q.source=="object"&&(this.addSource(Ge,Q.source),Q=o.clone$1(Q),Q=o.extend(Q,{source:Ge})),this._validate(o.validateStyle.layer,"layers."+Ge,Q,{arrayIndex:-1},Re))return;tt=o.createStyleLayer(Q),this._validateLayer(tt),tt.setEventedParent(this,{layer:{id:Ge}}),this._serializedLayers[tt.id]=tt.serialize()}var wt=he?this._order.indexOf(he):this._order.length;if(he&&wt===-1){this.fire(new o.ErrorEvent(new Error('Layer with id "'+he+'" does not exist on this map.')));return}if(this._order.splice(wt,0,Ge),this._layerOrderChanged=!0,this._layers[Ge]=tt,this._removedLayers[Ge]&&tt.source&&tt.type!=="custom"){var zt=this._removedLayers[Ge];delete this._removedLayers[Ge],zt.type!==tt.type?this._updatedSources[tt.source]="clear":(this._updatedSources[tt.source]="reload",this.sourceCaches[tt.source].pause())}this._updateLayer(tt),tt.onAdd&&tt.onAdd(this.map)},W.prototype.moveLayer=function(Q,he){this._checkLoaded(),this._changed=!0;var Re=this._layers[Q];if(!Re){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot be moved.")));return}if(Q!==he){var Ge=this._order.indexOf(Q);this._order.splice(Ge,1);var tt=he?this._order.indexOf(he):this._order.length;if(he&&tt===-1){this.fire(new o.ErrorEvent(new Error('Layer with id "'+he+'" does not exist on this map.')));return}this._order.splice(tt,0,Q),this._layerOrderChanged=!0}},W.prototype.removeLayer=function(Q){this._checkLoaded();var he=this._layers[Q];if(!he){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot be removed.")));return}he.setEventedParent(null);var Re=this._order.indexOf(Q);this._order.splice(Re,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[Q]=he,delete this._layers[Q],delete this._serializedLayers[Q],delete this._updatedLayers[Q],delete this._updatedPaintProps[Q],he.onRemove&&he.onRemove(this.map)},W.prototype.getLayer=function(Q){return this._layers[Q]},W.prototype.hasLayer=function(Q){return Q in this._layers},W.prototype.setLayerZoomRange=function(Q,he,Re){this._checkLoaded();var Ge=this.getLayer(Q);if(!Ge){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot have zoom extent.")));return}Ge.minzoom===he&&Ge.maxzoom===Re||(he!=null&&(Ge.minzoom=he),Re!=null&&(Ge.maxzoom=Re),this._updateLayer(Ge))},W.prototype.setFilter=function(Q,he,Re){Re===void 0&&(Re={}),this._checkLoaded();var Ge=this.getLayer(Q);if(!Ge){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot be filtered.")));return}if(!o.deepEqual(Ge.filter,he)){if(he==null){Ge.filter=void 0,this._updateLayer(Ge);return}this._validate(o.validateStyle.filter,"layers."+Ge.id+".filter",he,null,Re)||(Ge.filter=o.clone$1(he),this._updateLayer(Ge))}},W.prototype.getFilter=function(Q){return o.clone$1(this.getLayer(Q).filter)},W.prototype.setLayoutProperty=function(Q,he,Re,Ge){Ge===void 0&&(Ge={}),this._checkLoaded();var tt=this.getLayer(Q);if(!tt){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot be styled.")));return}o.deepEqual(tt.getLayoutProperty(he),Re)||(tt.setLayoutProperty(he,Re,Ge),this._updateLayer(tt))},W.prototype.getLayoutProperty=function(Q,he){var Re=this.getLayer(Q);if(!Re){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style.")));return}return Re.getLayoutProperty(he)},W.prototype.setPaintProperty=function(Q,he,Re,Ge){Ge===void 0&&(Ge={}),this._checkLoaded();var tt=this.getLayer(Q);if(!tt){this.fire(new o.ErrorEvent(new Error("The layer '"+Q+"' does not exist in the map's style and cannot be styled.")));return}if(!o.deepEqual(tt.getPaintProperty(he),Re)){var wt=tt.setPaintProperty(he,Re,Ge);wt&&this._updateLayer(tt),this._changed=!0,this._updatedPaintProps[Q]=!0}},W.prototype.getPaintProperty=function(Q,he){return this.getLayer(Q).getPaintProperty(he)},W.prototype.setFeatureState=function(Q,he){this._checkLoaded();var Re=Q.source,Ge=Q.sourceLayer,tt=this.sourceCaches[Re];if(tt===void 0){this.fire(new o.ErrorEvent(new Error("The source '"+Re+"' does not exist in the map's style.")));return}var wt=tt.getSource().type;if(wt==="geojson"&&Ge){this.fire(new o.ErrorEvent(new Error("GeoJSON sources cannot have a sourceLayer parameter.")));return}if(wt==="vector"&&!Ge){this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}Q.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),tt.setFeatureState(Ge,Q.id,he)},W.prototype.removeFeatureState=function(Q,he){this._checkLoaded();var Re=Q.source,Ge=this.sourceCaches[Re];if(Ge===void 0){this.fire(new o.ErrorEvent(new Error("The source '"+Re+"' does not exist in the map's style.")));return}var tt=Ge.getSource().type,wt=tt==="vector"?Q.sourceLayer:void 0;if(tt==="vector"&&!wt){this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}if(he&&typeof Q.id!="string"&&typeof Q.id!="number"){this.fire(new o.ErrorEvent(new Error("A feature id is required to remove its specific state property.")));return}Ge.removeFeatureState(wt,Q.id,he)},W.prototype.getFeatureState=function(Q){this._checkLoaded();var he=Q.source,Re=Q.sourceLayer,Ge=this.sourceCaches[he];if(Ge===void 0){this.fire(new o.ErrorEvent(new Error("The source '"+he+"' does not exist in the map's style.")));return}var tt=Ge.getSource().type;if(tt==="vector"&&!Re){this.fire(new o.ErrorEvent(new Error("The sourceLayer parameter must be provided for vector source types.")));return}return Q.id===void 0&&this.fire(new o.ErrorEvent(new Error("The feature id parameter must be provided."))),Ge.getFeatureState(Re,Q.id)},W.prototype.getTransition=function(){return o.extend({duration:300,delay:0},this.stylesheet&&this.stylesheet.transition)},W.prototype.serialize=function(){return o.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:o.mapObject(this.sourceCaches,function(Q){return Q.serialize()}),layers:this._serializeLayers(this._order)},function(Q){return Q!==void 0})},W.prototype._updateLayer=function(Q){this._updatedLayers[Q.id]=!0,Q.source&&!this._updatedSources[Q.source]&&this.sourceCaches[Q.source].getSource().type!=="raster"&&(this._updatedSources[Q.source]="reload",this.sourceCaches[Q.source].pause()),this._changed=!0},W.prototype._flattenAndSortRenderedFeatures=function(Q){for(var he=this,Re=function(Ea){return he._layers[Ea].type==="fill-extrusion"},Ge={},tt=[],wt=this._order.length-1;wt>=0;wt--){var zt=this._order[wt];if(Re(zt)){Ge[zt]=wt;for(var Xt=0,tr=Q;Xt=0;nn--){var Cn=this._order[nn];if(Re(Cn))for(var Rn=tt.length-1;Rn>=0;Rn--){var Bn=tt[Rn].feature;if(Ge[Bn.layer.id] 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;}`,Pl=`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; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 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; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,of=`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; #pragma mapbox: define lowp float base #pragma mapbox: define lowp float height #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float base #pragma mapbox: initialize lowp float height #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to vec2 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 ? a_pos : 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;}`,sf=`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;varying vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;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 exaggerationFactor=u_zoom < 2.0 ? 0.4 : u_zoom < 4.5 ? 0.35 : 0.3;float exaggeration=u_zoom < 15.0 ? (u_zoom-15.0)*exaggerationFactor : 0.0;vec2 deriv=vec2((c+f+f+i)-(a+d+d+g),(g+h+h+i)-(a+b+b+c))/pow(2.0,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); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,lf="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;}",$l=`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; #define PI 3.141592653589793 void 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; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,uf="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;}",ff=`uniform lowp float u_device_pixel_ratio;varying vec2 v_width2;varying vec2 v_normal;varying float v_gamma_scale; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity 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);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Au=` #define scale 0.015873016 attribute 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; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float 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);}`,Mu=`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 vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity 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);vec4 color=texture2D(u_image,v_uv);gl_FragColor=color*(alpha*opacity); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,ds=` #define scale 0.015873016 attribute vec2 a_pos_normal;attribute vec4 a_data;attribute float a_uv_x;attribute float a_split_index;uniform mat4 u_matrix;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;varying vec2 v_normal;varying vec2 v_width2;varying float v_gamma_scale;varying highp vec2 v_uv; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width float 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;highp float texel_height=1.0/u_image_height;highp float half_texel_height=0.5*texel_height;v_uv=vec2(a_uv_x,a_split_index*texel_height-half_texel_height);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);}`,Is=`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; #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity vec2 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; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,el=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute 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; #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float gapwidth #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to #pragma mapbox: define lowp float pixel_ratio_from #pragma mapbox: define lowp float pixel_ratio_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_to #pragma mapbox: initialize lowp float pixel_ratio_from #pragma mapbox: initialize lowp float pixel_ratio_to float 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;}`,tl=`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; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth 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 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); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Su=` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 attribute 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; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float gapwidth #pragma mapbox: define lowp float offset #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float gapwidth #pragma mapbox: initialize lowp float offset #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth float 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);}`,Wo=`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); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,cf="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;}",Rl=`uniform sampler2D u_texture;varying vec2 v_tex;varying float v_fade_opacity; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity lowp float alpha=opacity*v_fade_opacity;gl_FragColor=texture2D(u_texture,v_tex)*alpha; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Eu=`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; #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize lowp float opacity vec2 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 ? camera_to_anchor_distance/u_camera_to_center_distance : u_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));}`,Cu=`#define SDF_PX 8.0 uniform 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; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float 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); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,Dl=`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; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 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 ? camera_to_anchor_distance/u_camera_to_center_distance : u_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);}`,bo=`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform 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; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur float 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; #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif return;}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); #ifdef OVERDRAW_INSPECTOR gl_FragColor=vec4(1.0); #endif }`,ks=`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; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp float halo_width #pragma mapbox: define lowp float halo_blur void main() { #pragma mapbox: initialize highp vec4 fill_color #pragma mapbox: initialize highp vec4 halo_color #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize lowp float halo_width #pragma mapbox: initialize lowp float halo_blur vec2 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 ? camera_to_anchor_distance/u_camera_to_center_distance : u_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);}`,ps=ai(Oi,Ls),rl=ai(jl,bu),ts=ai(Ga,qs),Fo=ai(Kl,Ii),ql=ai($i,Ps),_s=ai(Ll,xi),wo=ai(Rs,Ti),yi=ai(Ci,Ds),eu=ai(Bi,Ni),hf=ai(fo,wu),Il=ai(io,nf),zs=ai(_o,ki),Fs=ai(Jl,es),vo=ai(zo,Ql),kl=ai(Tu,af),Os=ai(Pl,of),_l=ai(sf,lf),vf=ai($l,uf),Lu=ai(ff,Au),tu=ai(Mu,ds),ru=ai(Is,el),nu=ai(tl,Su),Bs=ai(Wo,cf),zl=ai(Rl,Eu),nl=ai(Cu,Dl),Fl=ai(bo,ks);function ai(ce,W){var fe=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,Q=W.match(/attribute ([\w]+) ([\w]+)/g),he=ce.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Re=W.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),Ge=Re?Re.concat(he):he,tt={};return ce=ce.replace(fe,function(wt,zt,Xt,tr,qt){return tt[qt]=!0,zt==="define"?` #ifndef HAS_UNIFORM_u_`+qt+` varying `+Xt+" "+tr+" "+qt+`; #else uniform `+Xt+" "+tr+" u_"+qt+`; #endif `:` #ifdef HAS_UNIFORM_u_`+qt+` `+Xt+" "+tr+" "+qt+" = u_"+qt+`; #endif `}),W=W.replace(fe,function(wt,zt,Xt,tr,qt){var Cr=tr==="float"?"vec2":"vec4",Ur=qt.match(/color/)?"color":Cr;return tt[qt]?zt==="define"?` #ifndef HAS_UNIFORM_u_`+qt+` uniform lowp float u_`+qt+`_t; attribute `+Xt+" "+Cr+" a_"+qt+`; varying `+Xt+" "+tr+" "+qt+`; #else uniform `+Xt+" "+tr+" u_"+qt+`; #endif `:Ur==="vec4"?` #ifndef HAS_UNIFORM_u_`+qt+` `+qt+" = a_"+qt+`; #else `+Xt+" "+tr+" "+qt+" = u_"+qt+`; #endif `:` #ifndef HAS_UNIFORM_u_`+qt+` `+qt+" = unpack_mix_"+Ur+"(a_"+qt+", u_"+qt+`_t); #else `+Xt+" "+tr+" "+qt+" = u_"+qt+`; #endif `:zt==="define"?` #ifndef HAS_UNIFORM_u_`+qt+` uniform lowp float u_`+qt+`_t; attribute `+Xt+" "+Cr+" a_"+qt+`; #else uniform `+Xt+" "+tr+" u_"+qt+`; #endif `:Ur==="vec4"?` #ifndef HAS_UNIFORM_u_`+qt+` `+Xt+" "+tr+" "+qt+" = a_"+qt+`; #else `+Xt+" "+tr+" "+qt+" = u_"+qt+`; #endif `:` #ifndef HAS_UNIFORM_u_`+qt+` `+Xt+" "+tr+" "+qt+" = unpack_mix_"+Ur+"(a_"+qt+", u_"+qt+`_t); #else `+Xt+" "+tr+" "+qt+" = u_"+qt+`; #endif `}),{fragmentSource:ce,vertexSource:W,staticAttributes:Q,staticUniforms:Ge}}var Pu=Object.freeze({__proto__:null,prelude:ps,background:rl,backgroundPattern:ts,circle:Fo,clippingMask:ql,heatmap:_s,heatmapTexture:wo,collisionBox:yi,collisionCircle:eu,debug:hf,fill:Il,fillOutline:zs,fillOutlinePattern:Fs,fillPattern:vo,fillExtrusion:kl,fillExtrusionPattern:Os,hillshadePrepare:_l,hillshade:vf,line:Lu,lineGradient:tu,linePattern:ru,lineSDF:nu,raster:Bs,symbolIcon:zl,symbolSDF:nl,symbolTextAndIcon:Fl}),To=function(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null};To.prototype.bind=function(W,fe,Q,he,Re,Ge,tt,wt){this.context=W;for(var zt=this.boundPaintVertexBuffers.length!==he.length,Xt=0;!zt&&Xt>16,tt>>16],u_pixel_coord_lower:[Ge&65535,tt&65535]}}function rs(ce,W,fe,Q){var he=fe.imageManager.getPattern(ce.from.toString()),Re=fe.imageManager.getPattern(ce.to.toString()),Ge=fe.imageManager.getPixelSize(),tt=Ge.width,wt=Ge.height,zt=Math.pow(2,Q.tileID.overscaledZ),Xt=Q.tileSize*Math.pow(2,fe.transform.tileZoom)/zt,tr=Xt*(Q.tileID.canonical.x+Q.tileID.wrap*zt),qt=Xt*Q.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:he.tl,u_pattern_br_a:he.br,u_pattern_tl_b:Re.tl,u_pattern_br_b:Re.br,u_texsize:[tt,wt],u_mix:W.t,u_pattern_size_a:he.displaySize,u_pattern_size_b:Re.displaySize,u_scale_a:W.fromScale,u_scale_b:W.toScale,u_tile_units_to_pixels:1/fn(Q,1,fe.transform.tileZoom),u_pixel_coord_upper:[tr>>16,qt>>16],u_pixel_coord_lower:[tr&65535,qt&65535]}}var Ol=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_lightpos:new o.Uniform3f(ce,W.u_lightpos),u_lightintensity:new o.Uniform1f(ce,W.u_lightintensity),u_lightcolor:new o.Uniform3f(ce,W.u_lightcolor),u_vertical_gradient:new o.Uniform1f(ce,W.u_vertical_gradient),u_opacity:new o.Uniform1f(ce,W.u_opacity)}},bi=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_lightpos:new o.Uniform3f(ce,W.u_lightpos),u_lightintensity:new o.Uniform1f(ce,W.u_lightintensity),u_lightcolor:new o.Uniform3f(ce,W.u_lightcolor),u_vertical_gradient:new o.Uniform1f(ce,W.u_vertical_gradient),u_height_factor:new o.Uniform1f(ce,W.u_height_factor),u_image:new o.Uniform1i(ce,W.u_image),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_pixel_coord_upper:new o.Uniform2f(ce,W.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(ce,W.u_pixel_coord_lower),u_scale:new o.Uniform3f(ce,W.u_scale),u_fade:new o.Uniform1f(ce,W.u_fade),u_opacity:new o.Uniform1f(ce,W.u_opacity)}},al=function(ce,W,fe,Q){var he=W.style.light,Re=he.properties.get("position"),Ge=[Re.x,Re.y,Re.z],tt=o.create$1();he.properties.get("anchor")==="viewport"&&o.fromRotation(tt,-W.transform.angle),o.transformMat3(Ge,Ge,tt);var wt=he.properties.get("color");return{u_matrix:ce,u_lightpos:Ge,u_lightintensity:he.properties.get("intensity"),u_lightcolor:[wt.r,wt.g,wt.b],u_vertical_gradient:+fe,u_opacity:Q}},Ao=function(ce,W,fe,Q,he,Re,Ge){return o.extend(al(ce,W,fe,Q),gs(Re,W,Ge),{u_height_factor:-Math.pow(2,he.overscaledZ)/Ge.tileSize/8})},Yo=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix)}},ys=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_image:new o.Uniform1i(ce,W.u_image),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_pixel_coord_upper:new o.Uniform2f(ce,W.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(ce,W.u_pixel_coord_lower),u_scale:new o.Uniform3f(ce,W.u_scale),u_fade:new o.Uniform1f(ce,W.u_fade)}},ns=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_world:new o.Uniform2f(ce,W.u_world)}},Mo=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_world:new o.Uniform2f(ce,W.u_world),u_image:new o.Uniform1i(ce,W.u_image),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_pixel_coord_upper:new o.Uniform2f(ce,W.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(ce,W.u_pixel_coord_lower),u_scale:new o.Uniform3f(ce,W.u_scale),u_fade:new o.Uniform1f(ce,W.u_fade)}},Xo=function(ce){return{u_matrix:ce}},So=function(ce,W,fe,Q){return o.extend(Xo(ce),gs(fe,W,Q))},po=function(ce,W){return{u_matrix:ce,u_world:W}},il=function(ce,W,fe,Q,he){return o.extend(So(ce,W,fe,Q),{u_world:he})},df=function(ce,W){return{u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_scale_with_map:new o.Uniform1i(ce,W.u_scale_with_map),u_pitch_with_map:new o.Uniform1i(ce,W.u_pitch_with_map),u_extrude_scale:new o.Uniform2f(ce,W.u_extrude_scale),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix)}},pf=function(ce,W,fe,Q){var he=ce.transform,Re,Ge;if(Q.paint.get("circle-pitch-alignment")==="map"){var tt=fn(fe,1,he.zoom);Re=!0,Ge=[tt,tt]}else Re=!1,Ge=he.pixelsToGLUnits;return{u_camera_to_center_distance:he.cameraToCenterDistance,u_scale_with_map:+(Q.paint.get("circle-pitch-scale")==="map"),u_matrix:ce.translatePosMatrix(W.posMatrix,fe,Q.paint.get("circle-translate"),Q.paint.get("circle-translate-anchor")),u_pitch_with_map:+Re,u_device_pixel_ratio:o.browser.devicePixelRatio,u_extrude_scale:Ge}},gf=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_pixels_to_tile_units:new o.Uniform1f(ce,W.u_pixels_to_tile_units),u_extrude_scale:new o.Uniform2f(ce,W.u_extrude_scale),u_overscale_factor:new o.Uniform1f(ce,W.u_overscale_factor)}},yf=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_inv_matrix:new o.UniformMatrix4f(ce,W.u_inv_matrix),u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_viewport_size:new o.Uniform2f(ce,W.u_viewport_size)}},iu=function(ce,W,fe){var Q=fn(fe,1,W.zoom),he=Math.pow(2,W.zoom-fe.tileID.overscaledZ),Re=fe.tileID.overscaleFactor();return{u_matrix:ce,u_camera_to_center_distance:W.cameraToCenterDistance,u_pixels_to_tile_units:Q,u_extrude_scale:[W.pixelsToGLUnits[0]/(Q*he),W.pixelsToGLUnits[1]/(Q*he)],u_overscale_factor:Re}},Du=function(ce,W,fe){return{u_matrix:ce,u_inv_matrix:W,u_camera_to_center_distance:fe.cameraToCenterDistance,u_viewport_size:[fe.width,fe.height]}},Ns=function(ce,W){return{u_color:new o.UniformColor(ce,W.u_color),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_overlay:new o.Uniform1i(ce,W.u_overlay),u_overlay_scale:new o.Uniform1f(ce,W.u_overlay_scale)}},_i=function(ce,W,fe){return fe===void 0&&(fe=1),{u_matrix:ce,u_color:W,u_overlay:0,u_overlay_scale:fe}},co=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix)}},Us=function(ce){return{u_matrix:ce}},Iu=function(ce,W){return{u_extrude_scale:new o.Uniform1f(ce,W.u_extrude_scale),u_intensity:new o.Uniform1f(ce,W.u_intensity),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix)}},ol=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_world:new o.Uniform2f(ce,W.u_world),u_image:new o.Uniform1i(ce,W.u_image),u_color_ramp:new o.Uniform1i(ce,W.u_color_ramp),u_opacity:new o.Uniform1f(ce,W.u_opacity)}},Zo=function(ce,W,fe,Q){return{u_matrix:ce,u_extrude_scale:fn(W,1,fe),u_intensity:Q}},mf=function(ce,W,fe,Q){var he=o.create();o.ortho(he,0,ce.width,ce.height,0,0,1);var Re=ce.context.gl;return{u_matrix:he,u_world:[Re.drawingBufferWidth,Re.drawingBufferHeight],u_image:fe,u_color_ramp:Q,u_opacity:W.paint.get("heatmap-opacity")}},ku=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_image:new o.Uniform1i(ce,W.u_image),u_latrange:new o.Uniform2f(ce,W.u_latrange),u_light:new o.Uniform2f(ce,W.u_light),u_shadow:new o.UniformColor(ce,W.u_shadow),u_highlight:new o.UniformColor(ce,W.u_highlight),u_accent:new o.UniformColor(ce,W.u_accent)}},_u=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_image:new o.Uniform1i(ce,W.u_image),u_dimension:new o.Uniform2f(ce,W.u_dimension),u_zoom:new o.Uniform1f(ce,W.u_zoom),u_unpack:new o.Uniform4f(ce,W.u_unpack)}},ou=function(ce,W,fe){var Q=fe.paint.get("hillshade-shadow-color"),he=fe.paint.get("hillshade-highlight-color"),Re=fe.paint.get("hillshade-accent-color"),Ge=fe.paint.get("hillshade-illumination-direction")*(Math.PI/180);fe.paint.get("hillshade-illumination-anchor")==="viewport"&&(Ge-=ce.transform.angle);var tt=!ce.options.moving;return{u_matrix:ce.transform.calculatePosMatrix(W.tileID.toUnwrapped(),tt),u_image:0,u_latrange:qi(ce,W.tileID),u_light:[fe.paint.get("hillshade-exaggeration"),Ge],u_shadow:Q,u_highlight:he,u_accent:Re}},zu=function(ce,W){var fe=W.stride,Q=o.create();return o.ortho(Q,0,o.EXTENT,-o.EXTENT,0,0,1),o.translate(Q,Q,[0,-o.EXTENT,0]),{u_matrix:Q,u_image:1,u_dimension:[fe,fe],u_zoom:ce.overscaledZ,u_unpack:W.getUnpackVector()}};function qi(ce,W){var fe=Math.pow(2,W.canonical.z),Q=W.canonical.y;return[new o.MercatorCoordinate(0,Q/fe).toLngLat().lat,new o.MercatorCoordinate(0,(Q+1)/fe).toLngLat().lat]}var Eo=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_ratio:new o.Uniform1f(ce,W.u_ratio),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(ce,W.u_units_to_pixels)}},as=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_ratio:new o.Uniform1f(ce,W.u_ratio),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(ce,W.u_units_to_pixels),u_image:new o.Uniform1i(ce,W.u_image),u_image_height:new o.Uniform1f(ce,W.u_image_height)}},Vs=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_ratio:new o.Uniform1f(ce,W.u_ratio),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_image:new o.Uniform1i(ce,W.u_image),u_units_to_pixels:new o.Uniform2f(ce,W.u_units_to_pixels),u_scale:new o.Uniform3f(ce,W.u_scale),u_fade:new o.Uniform1f(ce,W.u_fade)}},Bl=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_ratio:new o.Uniform1f(ce,W.u_ratio),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_units_to_pixels:new o.Uniform2f(ce,W.u_units_to_pixels),u_patternscale_a:new o.Uniform2f(ce,W.u_patternscale_a),u_patternscale_b:new o.Uniform2f(ce,W.u_patternscale_b),u_sdfgamma:new o.Uniform1f(ce,W.u_sdfgamma),u_image:new o.Uniform1i(ce,W.u_image),u_tex_y_a:new o.Uniform1f(ce,W.u_tex_y_a),u_tex_y_b:new o.Uniform1f(ce,W.u_tex_y_b),u_mix:new o.Uniform1f(ce,W.u_mix)}},ms=function(ce,W,fe){var Q=ce.transform;return{u_matrix:is(ce,W,fe),u_ratio:1/fn(W,1,Q.zoom),u_device_pixel_ratio:o.browser.devicePixelRatio,u_units_to_pixels:[1/Q.pixelsToGLUnits[0],1/Q.pixelsToGLUnits[1]]}},xs=function(ce,W,fe,Q){return o.extend(ms(ce,W,fe),{u_image:0,u_image_height:Q})},Fu=function(ce,W,fe,Q){var he=ce.transform,Re=Hs(W,he);return{u_matrix:is(ce,W,fe),u_texsize:W.imageAtlasTexture.size,u_ratio:1/fn(W,1,he.zoom),u_device_pixel_ratio:o.browser.devicePixelRatio,u_image:0,u_scale:[Re,Q.fromScale,Q.toScale],u_fade:Q.t,u_units_to_pixels:[1/he.pixelsToGLUnits[0],1/he.pixelsToGLUnits[1]]}},jo=function(ce,W,fe,Q,he){var Re=ce.transform,Ge=ce.lineAtlas,tt=Hs(W,Re),wt=fe.layout.get("line-cap")==="round",zt=Ge.getDash(Q.from,wt),Xt=Ge.getDash(Q.to,wt),tr=zt.width*he.fromScale,qt=Xt.width*he.toScale;return o.extend(ms(ce,W,fe),{u_patternscale_a:[tt/tr,-zt.height/2],u_patternscale_b:[tt/qt,-Xt.height/2],u_sdfgamma:Ge.width/(Math.min(tr,qt)*256*o.browser.devicePixelRatio)/2,u_image:0,u_tex_y_a:zt.y,u_tex_y_b:Xt.y,u_mix:he.t})};function Hs(ce,W){return 1/fn(ce,1,W.tileZoom)}function is(ce,W,fe){return ce.translatePosMatrix(W.tileID.posMatrix,W,fe.paint.get("line-translate"),fe.paint.get("line-translate-anchor"))}var Ko=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_tl_parent:new o.Uniform2f(ce,W.u_tl_parent),u_scale_parent:new o.Uniform1f(ce,W.u_scale_parent),u_buffer_scale:new o.Uniform1f(ce,W.u_buffer_scale),u_fade_t:new o.Uniform1f(ce,W.u_fade_t),u_opacity:new o.Uniform1f(ce,W.u_opacity),u_image0:new o.Uniform1i(ce,W.u_image0),u_image1:new o.Uniform1i(ce,W.u_image1),u_brightness_low:new o.Uniform1f(ce,W.u_brightness_low),u_brightness_high:new o.Uniform1f(ce,W.u_brightness_high),u_saturation_factor:new o.Uniform1f(ce,W.u_saturation_factor),u_contrast_factor:new o.Uniform1f(ce,W.u_contrast_factor),u_spin_weights:new o.Uniform3f(ce,W.u_spin_weights)}},sl=function(ce,W,fe,Q,he){return{u_matrix:ce,u_tl_parent:W,u_scale_parent:fe,u_buffer_scale:1,u_fade_t:Q.mix,u_opacity:Q.opacity*he.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:he.paint.get("raster-brightness-min"),u_brightness_high:he.paint.get("raster-brightness-max"),u_saturation_factor:Ws(he.paint.get("raster-saturation")),u_contrast_factor:ti(he.paint.get("raster-contrast")),u_spin_weights:Gs(he.paint.get("raster-hue-rotate"))}};function Gs(ce){ce*=Math.PI/180;var W=Math.sin(ce),fe=Math.cos(ce);return[(2*fe+1)/3,(-Math.sqrt(3)*W-fe+1)/3,(Math.sqrt(3)*W-fe+1)/3]}function ti(ce){return ce>0?1/(1-ce):1+ce}function Ws(ce){return ce>0?1-1/(1.001-ce):-ce}var Nl=function(ce,W){return{u_is_size_zoom_constant:new o.Uniform1i(ce,W.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(ce,W.u_is_size_feature_constant),u_size_t:new o.Uniform1f(ce,W.u_size_t),u_size:new o.Uniform1f(ce,W.u_size),u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_pitch:new o.Uniform1f(ce,W.u_pitch),u_rotate_symbol:new o.Uniform1i(ce,W.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(ce,W.u_aspect_ratio),u_fade_change:new o.Uniform1f(ce,W.u_fade_change),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(ce,W.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(ce,W.u_coord_matrix),u_is_text:new o.Uniform1i(ce,W.u_is_text),u_pitch_with_map:new o.Uniform1i(ce,W.u_pitch_with_map),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_texture:new o.Uniform1i(ce,W.u_texture)}},Ou=function(ce,W){return{u_is_size_zoom_constant:new o.Uniform1i(ce,W.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(ce,W.u_is_size_feature_constant),u_size_t:new o.Uniform1f(ce,W.u_size_t),u_size:new o.Uniform1f(ce,W.u_size),u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_pitch:new o.Uniform1f(ce,W.u_pitch),u_rotate_symbol:new o.Uniform1i(ce,W.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(ce,W.u_aspect_ratio),u_fade_change:new o.Uniform1f(ce,W.u_fade_change),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(ce,W.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(ce,W.u_coord_matrix),u_is_text:new o.Uniform1i(ce,W.u_is_text),u_pitch_with_map:new o.Uniform1i(ce,W.u_pitch_with_map),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_texture:new o.Uniform1i(ce,W.u_texture),u_gamma_scale:new o.Uniform1f(ce,W.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(ce,W.u_is_halo)}},Ys=function(ce,W){return{u_is_size_zoom_constant:new o.Uniform1i(ce,W.u_is_size_zoom_constant),u_is_size_feature_constant:new o.Uniform1i(ce,W.u_is_size_feature_constant),u_size_t:new o.Uniform1f(ce,W.u_size_t),u_size:new o.Uniform1f(ce,W.u_size),u_camera_to_center_distance:new o.Uniform1f(ce,W.u_camera_to_center_distance),u_pitch:new o.Uniform1f(ce,W.u_pitch),u_rotate_symbol:new o.Uniform1i(ce,W.u_rotate_symbol),u_aspect_ratio:new o.Uniform1f(ce,W.u_aspect_ratio),u_fade_change:new o.Uniform1f(ce,W.u_fade_change),u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_label_plane_matrix:new o.UniformMatrix4f(ce,W.u_label_plane_matrix),u_coord_matrix:new o.UniformMatrix4f(ce,W.u_coord_matrix),u_is_text:new o.Uniform1i(ce,W.u_is_text),u_pitch_with_map:new o.Uniform1i(ce,W.u_pitch_with_map),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_texsize_icon:new o.Uniform2f(ce,W.u_texsize_icon),u_texture:new o.Uniform1i(ce,W.u_texture),u_texture_icon:new o.Uniform1i(ce,W.u_texture_icon),u_gamma_scale:new o.Uniform1f(ce,W.u_gamma_scale),u_device_pixel_ratio:new o.Uniform1f(ce,W.u_device_pixel_ratio),u_is_halo:new o.Uniform1i(ce,W.u_is_halo)}},ll=function(ce,W,fe,Q,he,Re,Ge,tt,wt,zt){var Xt=he.transform;return{u_is_size_zoom_constant:+(ce==="constant"||ce==="source"),u_is_size_feature_constant:+(ce==="constant"||ce==="camera"),u_size_t:W?W.uSizeT:0,u_size:W?W.uSize:0,u_camera_to_center_distance:Xt.cameraToCenterDistance,u_pitch:Xt.pitch/360*2*Math.PI,u_rotate_symbol:+fe,u_aspect_ratio:Xt.width/Xt.height,u_fade_change:he.options.fadeDuration?he.symbolFadeChange:1,u_matrix:Re,u_label_plane_matrix:Ge,u_coord_matrix:tt,u_is_text:+wt,u_pitch_with_map:+Q,u_texsize:zt,u_texture:0}},Ul=function(ce,W,fe,Q,he,Re,Ge,tt,wt,zt,Xt){var tr=he.transform;return o.extend(ll(ce,W,fe,Q,he,Re,Ge,tt,wt,zt),{u_gamma_scale:Q?Math.cos(tr._pitch)*tr.cameraToCenterDistance:1,u_device_pixel_ratio:o.browser.devicePixelRatio,u_is_halo:1})},su=function(ce,W,fe,Q,he,Re,Ge,tt,wt,zt){return o.extend(Ul(ce,W,fe,Q,he,Re,Ge,tt,!0,wt),{u_texsize_icon:zt,u_texture_icon:1})},ul=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_opacity:new o.Uniform1f(ce,W.u_opacity),u_color:new o.UniformColor(ce,W.u_color)}},fl=function(ce,W){return{u_matrix:new o.UniformMatrix4f(ce,W.u_matrix),u_opacity:new o.Uniform1f(ce,W.u_opacity),u_image:new o.Uniform1i(ce,W.u_image),u_pattern_tl_a:new o.Uniform2f(ce,W.u_pattern_tl_a),u_pattern_br_a:new o.Uniform2f(ce,W.u_pattern_br_a),u_pattern_tl_b:new o.Uniform2f(ce,W.u_pattern_tl_b),u_pattern_br_b:new o.Uniform2f(ce,W.u_pattern_br_b),u_texsize:new o.Uniform2f(ce,W.u_texsize),u_mix:new o.Uniform1f(ce,W.u_mix),u_pattern_size_a:new o.Uniform2f(ce,W.u_pattern_size_a),u_pattern_size_b:new o.Uniform2f(ce,W.u_pattern_size_b),u_scale_a:new o.Uniform1f(ce,W.u_scale_a),u_scale_b:new o.Uniform1f(ce,W.u_scale_b),u_pixel_coord_upper:new o.Uniform2f(ce,W.u_pixel_coord_upper),u_pixel_coord_lower:new o.Uniform2f(ce,W.u_pixel_coord_lower),u_tile_units_to_pixels:new o.Uniform1f(ce,W.u_tile_units_to_pixels)}},os=function(ce,W,fe){return{u_matrix:ce,u_opacity:W,u_color:fe}},cl=function(ce,W,fe,Q,he,Re){return o.extend(rs(Q,Re,fe,he),{u_matrix:ce,u_opacity:W})},ss={fillExtrusion:Ol,fillExtrusionPattern:bi,fill:Yo,fillPattern:ys,fillOutline:ns,fillOutlinePattern:Mo,circle:df,collisionBox:gf,collisionCircle:yf,debug:Ns,clippingMask:co,heatmap:Iu,heatmapTexture:ol,hillshade:ku,hillshadePrepare:_u,line:Eo,lineGradient:as,linePattern:Vs,lineSDF:Bl,raster:Ko,symbolIcon:Nl,symbolSDF:Ou,symbolTextAndIcon:Ys,background:ul,backgroundPattern:fl},Li;function Oo(ce,W,fe,Q,he,Re,Ge){for(var tt=ce.context,wt=tt.gl,zt=ce.useProgram("collisionBox"),Xt=[],tr=0,qt=0,Cr=0;Cr0){var Rn=o.create(),Bn=Gr;o.mul(Rn,Fr.placementInvProjMatrix,ce.transform.glCoordMatrix),o.mul(Rn,Rn,Fr.placementViewportMatrix),Xt.push({circleArray:Cn,circleOffset:qt,transform:Bn,invTransform:Rn}),tr+=Cn.length/4,qt=tr}nn&&zt.draw(tt,wt.LINES,gr.disabled,Wt.disabled,ce.colorModeForRenderPass(),Et.disabled,iu(Gr,ce.transform,Nr),fe.id,nn.layoutVertexBuffer,nn.indexBuffer,nn.segments,null,ce.transform.zoom,null,null,nn.collisionVertexBuffer)}}if(!(!Ge||!Xt.length)){var Nn=ce.useProgram("collisionCircle"),Fn=new o.StructArrayLayout2f1f2i16;Fn.resize(tr*4),Fn._trim();for(var Vn=0,Zn=0,ea=Xt;Zn=0&&(Ur[Fr.associatedIconIndex]={shiftedAnchor:Ea,angle:Va})}}if(Xt){Cr.clear();for(var ga=ce.icon.placedSymbolArray,Fa=0;Fa0){var Ge=o.browser.now(),tt=(Ge-ce.timeAdded)/Re,wt=W?(Ge-W.timeAdded)/Re:-1,zt=fe.getSource(),Xt=he.coveringZoomLevel({tileSize:zt.tileSize,roundZoom:zt.roundZoom}),tr=!W||Math.abs(W.tileID.overscaledZ-Xt)>Math.abs(ce.tileID.overscaledZ-Xt),qt=tr&&ce.refreshedUponExpiration?1:o.clamp(tr?tt:1-wt,0,1);return ce.refreshedUponExpiration&&tt>=1&&(ce.refreshedUponExpiration=!1),W?{opacity:1,mix:1-qt}:{opacity:qt,mix:0}}else return{opacity:1,mix:0}}function ws(ce,W,fe){var Q=fe.paint.get("background-color"),he=fe.paint.get("background-opacity");if(he!==0){var Re=ce.context,Ge=Re.gl,tt=ce.transform,wt=tt.tileSize,zt=fe.paint.get("background-pattern");if(!ce.isPatternMissing(zt)){var Xt=!zt&&Q.a===1&&he===1&&ce.opaquePassEnabledForLayer()?"opaque":"translucent";if(ce.renderPass===Xt){var tr=Wt.disabled,qt=ce.depthModeForSublayer(0,Xt==="opaque"?gr.ReadWrite:gr.ReadOnly),Cr=ce.colorModeForRenderPass(),Ur=ce.useProgram(zt?"backgroundPattern":"background"),Nr=tt.coveringTiles({tileSize:wt});zt&&(Re.activeTexture.set(Ge.TEXTURE0),ce.imageManager.bind(ce.context));for(var Fr=fe.getCrossfadeParameters(),Gr=0,nn=Nr;Gr "+fe.overscaledZ);var Gr=Fr+" "+Cr+"kb";$t(ce,Gr),Ge.draw(Q,he.TRIANGLES,tt,wt,qe.alphaBlended,Et.disabled,_i(Re,o.Color.transparent,Nr),Xt,ce.debugBuffer,ce.quadTriangleIndexBuffer,ce.debugSegments)}function $t(ce,W){ce.initDebugOverlayCanvas();var fe=ce.debugOverlayCanvas,Q=ce.context.gl,he=ce.debugOverlayCanvas.getContext("2d");he.clearRect(0,0,fe.width,fe.height),he.shadowColor="white",he.shadowBlur=2,he.lineWidth=1.5,he.strokeStyle="white",he.textBaseline="top",he.font="bold 36px Open Sans, sans-serif",he.fillText(W,5,5),he.strokeText(W,5,5),ce.debugOverlayTexture.update(fe),ce.debugOverlayTexture.bind(Q.LINEAR,Q.CLAMP_TO_EDGE)}function mr(ce,W,fe){var Q=ce.context,he=fe.implementation;if(ce.renderPass==="offscreen"){var Re=he.prerender;Re&&(ce.setCustomLayerDefaults(),Q.setColorMode(ce.colorModeForRenderPass()),Re.call(he,Q.gl,ce.transform.customLayerMatrix()),Q.setDirty(),ce.setBaseState())}else if(ce.renderPass==="translucent"){ce.setCustomLayerDefaults(),Q.setColorMode(ce.colorModeForRenderPass()),Q.setStencilMode(Wt.disabled);var Ge=he.renderingMode==="3d"?new gr(ce.context.gl.LEQUAL,gr.ReadWrite,ce.depthRangeFor3D):ce.depthModeForSublayer(0,gr.ReadOnly);Q.setDepthMode(Ge),he.render(Q.gl,ce.transform.customLayerMatrix()),Q.setDirty(),ce.setBaseState(),Q.bindFramebuffer.set(null)}}var Er={symbol:Vl,circle:Nu,heatmap:ls,line:Hl,fill:Jo,"fill-extrusion":uu,hillshade:yl,raster:ml,background:ws,debug:ur,custom:mr},Ir=function(W,fe){this.context=new Mt(W),this.transform=fe,this._tileTextures={},this.setup(),this.numSublayers=_t.maxUnderzooming+_t.maxOverzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new $n,this.gpuTimers={}};Ir.prototype.resize=function(W,fe){if(this.width=W*o.browser.devicePixelRatio,this.height=fe*o.browser.devicePixelRatio,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(var Q=0,he=this.style._order;Q256&&this.clearStencil(),Q.setColorMode(qe.disabled),Q.setDepthMode(gr.disabled);var Re=this.useProgram("clippingMask");this._tileClippingMaskIDs={};for(var Ge=0,tt=fe;Ge256&&this.clearStencil();var W=this.nextStencilID++,fe=this.context.gl;return new Wt({func:fe.NOTEQUAL,mask:255},W,255,fe.KEEP,fe.KEEP,fe.REPLACE)},Ir.prototype.stencilModeForClipping=function(W){var fe=this.context.gl;return new Wt({func:fe.EQUAL,mask:255},this._tileClippingMaskIDs[W.key],0,fe.KEEP,fe.KEEP,fe.REPLACE)},Ir.prototype.stencilConfigForOverlap=function(W){var fe,Q=this.context.gl,he=W.sort(function(zt,Xt){return Xt.overscaledZ-zt.overscaledZ}),Re=he[he.length-1].overscaledZ,Ge=he[0].overscaledZ-Re+1;if(Ge>1){this.currentStencilSource=void 0,this.nextStencilID+Ge>256&&this.clearStencil();for(var tt={},wt=0;wt=0;this.currentLayer--){var Rn=this.style._layers[he[this.currentLayer]],Bn=Re[Rn.source],Nn=wt[Rn.source];this._renderTileClippingMasks(Rn,Nn),this.renderLayer(this,Bn,Rn,Nn)}for(this.renderPass="translucent",this.currentLayer=0;this.currentLayer0?fe.pop():null},Ir.prototype.isPatternMissing=function(W){if(!W)return!1;if(!W.from||!W.to)return!0;var fe=this.imageManager.getPattern(W.from.toString()),Q=this.imageManager.getPattern(W.to.toString());return!fe||!Q},Ir.prototype.useProgram=function(W,fe){this.cache=this.cache||{};var Q=""+W+(fe?fe.cacheKey:"")+(this._showOverdrawInspector?"/overdraw":"");return this.cache[Q]||(this.cache[Q]=new au(this.context,W,Pu[W],fe,ss[W],this._showOverdrawInspector)),this.cache[Q]},Ir.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()},Ir.prototype.setBaseState=function(){var W=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(W.FUNC_ADD)},Ir.prototype.initDebugOverlayCanvas=function(){if(this.debugOverlayCanvas==null){this.debugOverlayCanvas=o.window.document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512;var W=this.context.gl;this.debugOverlayTexture=new o.Texture(this.context,this.debugOverlayCanvas,W.RGBA)}},Ir.prototype.destroy=function(){this.emptyTexture.destroy(),this.debugOverlayTexture&&this.debugOverlayTexture.destroy()};var Kr=function(W,fe){this.points=W,this.planes=fe};Kr.fromInvProjectionMatrix=function(W,fe,Q){var he=[[-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]],Re=Math.pow(2,Q),Ge=he.map(function(zt){return o.transformMat4([],zt,W)}).map(function(zt){return o.scale$1([],zt,1/zt[3]/fe*Re)}),tt=[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],wt=tt.map(function(zt){var Xt=o.sub([],Ge[zt[0]],Ge[zt[1]]),tr=o.sub([],Ge[zt[2]],Ge[zt[1]]),qt=o.normalize([],o.cross([],Xt,tr)),Cr=-o.dot(qt,Ge[zt[1]]);return qt.concat(Cr)});return new Kr(Ge,wt)};var hn=function(W,fe){this.min=W,this.max=fe,this.center=o.scale$2([],o.add([],this.min,this.max),.5)};hn.prototype.quadrant=function(W){for(var fe=[W%2===0,W<2],Q=o.clone$2(this.min),he=o.clone$2(this.max),Re=0;Re=0;if(Ge===0)return 0;Ge!==fe.length&&(Q=!1)}if(Q)return 2;for(var wt=0;wt<3;wt++){for(var zt=Number.MAX_VALUE,Xt=-Number.MAX_VALUE,tr=0;trthis.max[wt]-this.min[wt])return 0}return 1};var An=function(W,fe,Q,he){if(W===void 0&&(W=0),fe===void 0&&(fe=0),Q===void 0&&(Q=0),he===void 0&&(he=0),isNaN(W)||W<0||isNaN(fe)||fe<0||isNaN(Q)||Q<0||isNaN(he)||he<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=W,this.bottom=fe,this.left=Q,this.right=he};An.prototype.interpolate=function(W,fe,Q){return fe.top!=null&&W.top!=null&&(this.top=o.number(W.top,fe.top,Q)),fe.bottom!=null&&W.bottom!=null&&(this.bottom=o.number(W.bottom,fe.bottom,Q)),fe.left!=null&&W.left!=null&&(this.left=o.number(W.left,fe.left,Q)),fe.right!=null&&W.right!=null&&(this.right=o.number(W.right,fe.right,Q)),this},An.prototype.getCenter=function(W,fe){var Q=o.clamp((this.left+W-this.right)/2,0,W),he=o.clamp((this.top+fe-this.bottom)/2,0,fe);return new o.Point(Q,he)},An.prototype.equals=function(W){return this.top===W.top&&this.bottom===W.bottom&&this.left===W.left&&this.right===W.right},An.prototype.clone=function(){return new An(this.top,this.bottom,this.left,this.right)},An.prototype.toJSON=function(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}};var Sn=function(W,fe,Q,he,Re){this.tileSize=512,this.maxValidLatitude=85.051129,this._renderWorldCopies=Re===void 0?!0:Re,this._minZoom=W||0,this._maxZoom=fe||22,this._minPitch=Q??0,this._maxPitch=he??60,this.setMaxBounds(),this.width=0,this.height=0,this._center=new o.LngLat(0,0),this.zoom=0,this.angle=0,this._fov=.6435011087932844,this._pitch=0,this._unmodified=!0,this._edgeInsets=new An,this._posMatrixCache={},this._alignedPosMatrixCache={}},Un={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}};Sn.prototype.clone=function(){var W=new Sn(this._minZoom,this._maxZoom,this._minPitch,this.maxPitch,this._renderWorldCopies);return W.tileSize=this.tileSize,W.latRange=this.latRange,W.width=this.width,W.height=this.height,W._center=this._center,W.zoom=this.zoom,W.angle=this.angle,W._fov=this._fov,W._pitch=this._pitch,W._unmodified=this._unmodified,W._edgeInsets=this._edgeInsets.clone(),W._calcMatrices(),W},Un.minZoom.get=function(){return this._minZoom},Un.minZoom.set=function(ce){this._minZoom!==ce&&(this._minZoom=ce,this.zoom=Math.max(this.zoom,ce))},Un.maxZoom.get=function(){return this._maxZoom},Un.maxZoom.set=function(ce){this._maxZoom!==ce&&(this._maxZoom=ce,this.zoom=Math.min(this.zoom,ce))},Un.minPitch.get=function(){return this._minPitch},Un.minPitch.set=function(ce){this._minPitch!==ce&&(this._minPitch=ce,this.pitch=Math.max(this.pitch,ce))},Un.maxPitch.get=function(){return this._maxPitch},Un.maxPitch.set=function(ce){this._maxPitch!==ce&&(this._maxPitch=ce,this.pitch=Math.min(this.pitch,ce))},Un.renderWorldCopies.get=function(){return this._renderWorldCopies},Un.renderWorldCopies.set=function(ce){ce===void 0?ce=!0:ce===null&&(ce=!1),this._renderWorldCopies=ce},Un.worldSize.get=function(){return this.tileSize*this.scale},Un.centerOffset.get=function(){return this.centerPoint._sub(this.size._div(2))},Un.size.get=function(){return new o.Point(this.width,this.height)},Un.bearing.get=function(){return-this.angle/Math.PI*180},Un.bearing.set=function(ce){var W=-o.wrap(ce,-180,180)*Math.PI/180;this.angle!==W&&(this._unmodified=!1,this.angle=W,this._calcMatrices(),this.rotationMatrix=o.create$2(),o.rotate(this.rotationMatrix,this.rotationMatrix,this.angle))},Un.pitch.get=function(){return this._pitch/Math.PI*180},Un.pitch.set=function(ce){var W=o.clamp(ce,this.minPitch,this.maxPitch)/180*Math.PI;this._pitch!==W&&(this._unmodified=!1,this._pitch=W,this._calcMatrices())},Un.fov.get=function(){return this._fov/Math.PI*180},Un.fov.set=function(ce){ce=Math.max(.01,Math.min(60,ce)),this._fov!==ce&&(this._unmodified=!1,this._fov=ce/180*Math.PI,this._calcMatrices())},Un.zoom.get=function(){return this._zoom},Un.zoom.set=function(ce){var W=Math.min(Math.max(ce,this.minZoom),this.maxZoom);this._zoom!==W&&(this._unmodified=!1,this._zoom=W,this.scale=this.zoomScale(W),this.tileZoom=Math.floor(W),this.zoomFraction=W-this.tileZoom,this._constrain(),this._calcMatrices())},Un.center.get=function(){return this._center},Un.center.set=function(ce){ce.lat===this._center.lat&&ce.lng===this._center.lng||(this._unmodified=!1,this._center=ce,this._constrain(),this._calcMatrices())},Un.padding.get=function(){return this._edgeInsets.toJSON()},Un.padding.set=function(ce){this._edgeInsets.equals(ce)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,ce,1),this._calcMatrices())},Un.centerPoint.get=function(){return this._edgeInsets.getCenter(this.width,this.height)},Sn.prototype.isPaddingEqual=function(W){return this._edgeInsets.equals(W)},Sn.prototype.interpolatePadding=function(W,fe,Q){this._unmodified=!1,this._edgeInsets.interpolate(W,fe,Q),this._constrain(),this._calcMatrices()},Sn.prototype.coveringZoomLevel=function(W){var fe=(W.roundZoom?Math.round:Math.floor)(this.zoom+this.scaleZoom(this.tileSize/W.tileSize));return Math.max(0,fe)},Sn.prototype.getVisibleUnwrappedCoordinates=function(W){var fe=[new o.UnwrappedTileID(0,W)];if(this._renderWorldCopies)for(var Q=this.pointCoordinate(new o.Point(0,0)),he=this.pointCoordinate(new o.Point(this.width,0)),Re=this.pointCoordinate(new o.Point(this.width,this.height)),Ge=this.pointCoordinate(new o.Point(0,this.height)),tt=Math.floor(Math.min(Q.x,he.x,Re.x,Ge.x)),wt=Math.floor(Math.max(Q.x,he.x,Re.x,Ge.x)),zt=1,Xt=tt-zt;Xt<=wt+zt;Xt++)Xt!==0&&fe.push(new o.UnwrappedTileID(Xt,W));return fe},Sn.prototype.coveringTiles=function(W){var fe=this.coveringZoomLevel(W),Q=fe;if(W.minzoom!==void 0&&feW.maxzoom&&(fe=W.maxzoom);var he=o.MercatorCoordinate.fromLngLat(this.center),Re=Math.pow(2,fe),Ge=[Re*he.x,Re*he.y,0],tt=Kr.fromInvProjectionMatrix(this.invProjMatrix,this.worldSize,fe),wt=W.minzoom||0;this.pitch<=60&&this._edgeInsets.top<.1&&(wt=fe);var zt=3,Xt=function(ia){return{aabb:new hn([ia*Re,0,0],[(ia+1)*Re,Re,0]),zoom:0,x:0,y:0,wrap:ia,fullyVisible:!1}},tr=[],qt=[],Cr=fe,Ur=W.reparseOverscaled?Q:fe;if(this._renderWorldCopies)for(var Nr=1;Nr<=3;Nr++)tr.push(Xt(-Nr)),tr.push(Xt(Nr));for(tr.push(Xt(0));tr.length>0;){var Fr=tr.pop(),Gr=Fr.x,nn=Fr.y,Cn=Fr.fullyVisible;if(!Cn){var Rn=Fr.aabb.intersects(tt);if(Rn===0)continue;Cn=Rn===2}var Bn=Fr.aabb.distanceX(Ge),Nn=Fr.aabb.distanceY(Ge),Fn=Math.max(Math.abs(Bn),Math.abs(Nn)),Vn=zt+(1<Vn&&Fr.zoom>=wt){qt.push({tileID:new o.OverscaledTileID(Fr.zoom===Cr?Ur:Fr.zoom,Fr.wrap,Fr.zoom,Gr,nn),distanceSq:o.sqrLen([Ge[0]-.5-Gr,Ge[1]-.5-nn])});continue}for(var Zn=0;Zn<4;Zn++){var ea=(Gr<<1)+Zn%2,ca=(nn<<1)+(Zn>>1);tr.push({aabb:Fr.aabb.quadrant(Zn),zoom:Fr.zoom+1,x:ea,y:ca,wrap:Fr.wrap,fullyVisible:Cn})}}return qt.sort(function(ia,Ea){return ia.distanceSq-Ea.distanceSq}).map(function(ia){return ia.tileID})},Sn.prototype.resize=function(W,fe){this.width=W,this.height=fe,this.pixelsToGLUnits=[2/W,-2/fe],this._constrain(),this._calcMatrices()},Un.unmodified.get=function(){return this._unmodified},Sn.prototype.zoomScale=function(W){return Math.pow(2,W)},Sn.prototype.scaleZoom=function(W){return Math.log(W)/Math.LN2},Sn.prototype.project=function(W){var fe=o.clamp(W.lat,-this.maxValidLatitude,this.maxValidLatitude);return new o.Point(o.mercatorXfromLng(W.lng)*this.worldSize,o.mercatorYfromLat(fe)*this.worldSize)},Sn.prototype.unproject=function(W){return new o.MercatorCoordinate(W.x/this.worldSize,W.y/this.worldSize).toLngLat()},Un.point.get=function(){return this.project(this.center)},Sn.prototype.setLocationAtPoint=function(W,fe){var Q=this.pointCoordinate(fe),he=this.pointCoordinate(this.centerPoint),Re=this.locationCoordinate(W),Ge=new o.MercatorCoordinate(Re.x-(Q.x-he.x),Re.y-(Q.y-he.y));this.center=this.coordinateLocation(Ge),this._renderWorldCopies&&(this.center=this.center.wrap())},Sn.prototype.locationPoint=function(W){return this.coordinatePoint(this.locationCoordinate(W))},Sn.prototype.pointLocation=function(W){return this.coordinateLocation(this.pointCoordinate(W))},Sn.prototype.locationCoordinate=function(W){return o.MercatorCoordinate.fromLngLat(W)},Sn.prototype.coordinateLocation=function(W){return W.toLngLat()},Sn.prototype.pointCoordinate=function(W){var fe=0,Q=[W.x,W.y,0,1],he=[W.x,W.y,1,1];o.transformMat4(Q,Q,this.pixelMatrixInverse),o.transformMat4(he,he,this.pixelMatrixInverse);var Re=Q[3],Ge=he[3],tt=Q[0]/Re,wt=he[0]/Ge,zt=Q[1]/Re,Xt=he[1]/Ge,tr=Q[2]/Re,qt=he[2]/Ge,Cr=tr===qt?0:(fe-tr)/(qt-tr);return new o.MercatorCoordinate(o.number(tt,wt,Cr)/this.worldSize,o.number(zt,Xt,Cr)/this.worldSize)},Sn.prototype.coordinatePoint=function(W){var fe=[W.x*this.worldSize,W.y*this.worldSize,0,1];return o.transformMat4(fe,fe,this.pixelMatrix),new o.Point(fe[0]/fe[3],fe[1]/fe[3])},Sn.prototype.getBounds=function(){return new o.LngLatBounds().extend(this.pointLocation(new o.Point(0,0))).extend(this.pointLocation(new o.Point(this.width,0))).extend(this.pointLocation(new o.Point(this.width,this.height))).extend(this.pointLocation(new o.Point(0,this.height)))},Sn.prototype.getMaxBounds=function(){return!this.latRange||this.latRange.length!==2||!this.lngRange||this.lngRange.length!==2?null:new o.LngLatBounds([this.lngRange[0],this.latRange[0]],[this.lngRange[1],this.latRange[1]])},Sn.prototype.setMaxBounds=function(W){W?(this.lngRange=[W.getWest(),W.getEast()],this.latRange=[W.getSouth(),W.getNorth()],this._constrain()):(this.lngRange=null,this.latRange=[-this.maxValidLatitude,this.maxValidLatitude])},Sn.prototype.calculatePosMatrix=function(W,fe){fe===void 0&&(fe=!1);var Q=W.key,he=fe?this._alignedPosMatrixCache:this._posMatrixCache;if(he[Q])return he[Q];var Re=W.canonical,Ge=this.worldSize/this.zoomScale(Re.z),tt=Re.x+Math.pow(2,Re.z)*W.wrap,wt=o.identity(new Float64Array(16));return o.translate(wt,wt,[tt*Ge,Re.y*Ge,0]),o.scale(wt,wt,[Ge/o.EXTENT,Ge/o.EXTENT,1]),o.multiply(wt,fe?this.alignedProjMatrix:this.projMatrix,wt),he[Q]=new Float32Array(wt),he[Q]},Sn.prototype.customLayerMatrix=function(){return this.mercatorMatrix.slice()},Sn.prototype._constrain=function(){if(!(!this.center||!this.width||!this.height||this._constraining)){this._constraining=!0;var W=-90,fe=90,Q=-180,he=180,Re,Ge,tt,wt,zt=this.size,Xt=this._unmodified;if(this.latRange){var tr=this.latRange;W=o.mercatorYfromLat(tr[1])*this.worldSize,fe=o.mercatorYfromLat(tr[0])*this.worldSize,Re=fe-Wfe&&(wt=fe-Fr)}if(this.lngRange){var Gr=Cr.x,nn=zt.x/2;Gr-nnhe&&(tt=he-nn)}(tt!==void 0||wt!==void 0)&&(this.center=this.unproject(new o.Point(tt!==void 0?tt:Cr.x,wt!==void 0?wt:Cr.y))),this._unmodified=Xt,this._constraining=!1}},Sn.prototype._calcMatrices=function(){if(this.height){var W=this._fov/2,fe=this.centerOffset;this.cameraToCenterDistance=.5/Math.tan(W)*this.height;var Q=Math.PI/2+this._pitch,he=this._fov*(.5+fe.y/this.height),Re=Math.sin(he)*this.cameraToCenterDistance/Math.sin(o.clamp(Math.PI-Q-he,.01,Math.PI-.01)),Ge=this.point,tt=Ge.x,wt=Ge.y,zt=Math.cos(Math.PI/2-this._pitch)*Re+this.cameraToCenterDistance,Xt=zt*1.01,tr=this.height/50,qt=new Float64Array(16);o.perspective(qt,this._fov,this.width/this.height,tr,Xt),qt[8]=-fe.x*2/this.width,qt[9]=fe.y*2/this.height,o.scale(qt,qt,[1,-1,1]),o.translate(qt,qt,[0,0,-this.cameraToCenterDistance]),o.rotateX(qt,qt,this._pitch),o.rotateZ(qt,qt,this.angle),o.translate(qt,qt,[-tt,-wt,0]),this.mercatorMatrix=o.scale([],qt,[this.worldSize,this.worldSize,this.worldSize]),o.scale(qt,qt,[1,1,o.mercatorZfromAltitude(1,this.center.lat)*this.worldSize,1]),this.projMatrix=qt,this.invProjMatrix=o.invert([],this.projMatrix);var Cr=this.width%2/2,Ur=this.height%2/2,Nr=Math.cos(this.angle),Fr=Math.sin(this.angle),Gr=tt-Math.round(tt)+Nr*Cr+Fr*Ur,nn=wt-Math.round(wt)+Nr*Ur+Fr*Cr,Cn=new Float64Array(qt);if(o.translate(Cn,Cn,[Gr>.5?Gr-1:Gr,nn>.5?nn-1:nn,0]),this.alignedProjMatrix=Cn,qt=o.create(),o.scale(qt,qt,[this.width/2,-this.height/2,1]),o.translate(qt,qt,[1,-1,0]),this.labelPlaneMatrix=qt,qt=o.create(),o.scale(qt,qt,[1,-1,1]),o.translate(qt,qt,[-1,-1,0]),o.scale(qt,qt,[2/this.width,2/this.height,1]),this.glCoordMatrix=qt,this.pixelMatrix=o.multiply(new Float64Array(16),this.labelPlaneMatrix,this.projMatrix),qt=o.invert(new Float64Array(16),this.pixelMatrix),!qt)throw new Error("failed to invert matrix");this.pixelMatrixInverse=qt,this._posMatrixCache={},this._alignedPosMatrixCache={}}},Sn.prototype.maxPitchScaleFactor=function(){if(!this.pixelMatrixInverse)return 1;var W=this.pointCoordinate(new o.Point(0,0)),fe=[W.x*this.worldSize,W.y*this.worldSize,0,1],Q=o.transformMat4(fe,fe,this.pixelMatrix);return Q[3]/this.cameraToCenterDistance},Sn.prototype.getCameraPoint=function(){var W=this._pitch,fe=Math.tan(W)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new o.Point(0,fe))},Sn.prototype.getCameraQueryGeometry=function(W){var fe=this.getCameraPoint();if(W.length===1)return[W[0],fe];for(var Q=fe.x,he=fe.y,Re=fe.x,Ge=fe.y,tt=0,wt=W;tt=3&&!W.some(function(Q){return isNaN(Q)})){var fe=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(W[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+W[2],+W[1]],zoom:+W[0],bearing:fe,pitch:+(W[4]||0)}),!0}return!1},Ta.prototype._updateHashUnthrottled=function(){var W=o.window.location.href.replace(/(#.+)?$/,this.getHashString());try{o.window.history.replaceState(o.window.history.state,null,W)}catch{}};var Aa={linearity:.3,easing:o.bezier(0,0,.3,1)},Ca=o.extend({deceleration:2500,maxSpeed:1400},Aa),Oa=o.extend({deceleration:20,maxSpeed:1400},Aa),ri=o.extend({deceleration:1e3,maxSpeed:360},Aa),wi=o.extend({deceleration:1e3,maxSpeed:90},Aa),se=function(W){this._map=W,this.clear()};se.prototype.clear=function(){this._inertiaBuffer=[]},se.prototype.record=function(W){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:o.browser.now(),settings:W})},se.prototype._drainInertiaBuffer=function(){for(var W=this._inertiaBuffer,fe=o.browser.now(),Q=160;W.length>0&&fe-W[0].time>Q;)W.shift()},se.prototype._onMoveEnd=function(W){if(this._drainInertiaBuffer(),!(this._inertiaBuffer.length<2)){for(var fe={zoom:0,bearing:0,pitch:0,pan:new o.Point(0,0),pinchAround:void 0,around:void 0},Q=0,he=this._inertiaBuffer;Q=this._clickTolerance||this._map.fire(new Xe(W.type,this._map,W))},Tt.prototype.dblclick=function(W){return this._firePreventable(new Xe(W.type,this._map,W))},Tt.prototype.mouseover=function(W){this._map.fire(new Xe(W.type,this._map,W))},Tt.prototype.mouseout=function(W){this._map.fire(new Xe(W.type,this._map,W))},Tt.prototype.touchstart=function(W){return this._firePreventable(new Qe(W.type,this._map,W))},Tt.prototype.touchmove=function(W){this._map.fire(new Qe(W.type,this._map,W))},Tt.prototype.touchend=function(W){this._map.fire(new Qe(W.type,this._map,W))},Tt.prototype.touchcancel=function(W){this._map.fire(new Qe(W.type,this._map,W))},Tt.prototype._firePreventable=function(W){if(this._map.fire(W),W.defaultPrevented)return{}},Tt.prototype.isEnabled=function(){return!0},Tt.prototype.isActive=function(){return!1},Tt.prototype.enable=function(){},Tt.prototype.disable=function(){};var yt=function(W){this._map=W};yt.prototype.reset=function(){this._delayContextMenu=!1,delete this._contextMenuEvent},yt.prototype.mousemove=function(W){this._map.fire(new Xe(W.type,this._map,W))},yt.prototype.mousedown=function(){this._delayContextMenu=!0},yt.prototype.mouseup=function(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Xe("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)},yt.prototype.contextmenu=function(W){this._delayContextMenu?this._contextMenuEvent=W:this._map.fire(new Xe(W.type,this._map,W)),this._map.listens("contextmenu")&&W.preventDefault()},yt.prototype.isEnabled=function(){return!0},yt.prototype.isActive=function(){return!1},yt.prototype.enable=function(){},yt.prototype.disable=function(){};var Ft=function(W,fe){this._map=W,this._el=W.getCanvasContainer(),this._container=W.getContainer(),this._clickTolerance=fe.clickTolerance||1};Ft.prototype.isEnabled=function(){return!!this._enabled},Ft.prototype.isActive=function(){return!!this._active},Ft.prototype.enable=function(){this.isEnabled()||(this._enabled=!0)},Ft.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},Ft.prototype.mousedown=function(W,fe){this.isEnabled()&&W.shiftKey&&W.button===0&&(M.disableDrag(),this._startPos=this._lastPos=fe,this._active=!0)},Ft.prototype.mousemoveWindow=function(W,fe){if(this._active){var Q=fe;if(!(this._lastPos.equals(Q)||!this._box&&Q.dist(this._startPos)this.numTouches)&&(this.aborted=!0),!this.aborted&&(this.startTime===void 0&&(this.startTime=W.timeStamp),Q.length===this.numTouches&&(this.centroid=jt(fe),this.touches=Ot(Q,fe)))},qr.prototype.touchmove=function(W,fe,Q){if(!(this.aborted||!this.centroid)){var he=Ot(Q,fe);for(var Re in this.touches){var Ge=this.touches[Re],tt=he[Re];(!tt||tt.dist(Ge)>Wr)&&(this.aborted=!0)}}},qr.prototype.touchend=function(W,fe,Q){if((!this.centroid||W.timeStamp-this.startTime>Tr)&&(this.aborted=!0),Q.length===0){var he=!this.aborted&&this.centroid;if(this.reset(),he)return he}};var Mr=function(W){this.singleTap=new qr(W),this.numTaps=W.numTaps,this.reset()};Mr.prototype.reset=function(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()},Mr.prototype.touchstart=function(W,fe,Q){this.singleTap.touchstart(W,fe,Q)},Mr.prototype.touchmove=function(W,fe,Q){this.singleTap.touchmove(W,fe,Q)},Mr.prototype.touchend=function(W,fe,Q){var he=this.singleTap.touchend(W,fe,Q);if(he){var Re=W.timeStamp-this.lastTime0&&(this._active=!0);var he=Ot(Q,fe),Re=new o.Point(0,0),Ge=new o.Point(0,0),tt=0;for(var wt in he){var zt=he[wt],Xt=this._touches[wt];Xt&&(Re._add(zt),Ge._add(zt.sub(Xt)),tt++,he[wt]=zt)}if(this._touches=he,!(ttMath.abs(ce.x)}var pa=100,Ba=function(ce){function W(){ce.apply(this,arguments)}return W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W,W.prototype.reset=function(){ce.prototype.reset.call(this),this._valid=void 0,delete this._firstMove,delete this._lastPoints},W.prototype._start=function(Q){this._lastPoints=Q,Da(Q[0].sub(Q[1]))&&(this._valid=!1)},W.prototype._move=function(Q,he,Re){var Ge=Q[0].sub(this._lastPoints[0]),tt=Q[1].sub(this._lastPoints[1]);if(this._valid=this.gestureBeginsVertically(Ge,tt,Re.timeStamp),!!this._valid){this._lastPoints=Q,this._active=!0;var wt=(Ge.y+tt.y)/2,zt=-.5;return{pitchDelta:wt*zt}}},W.prototype.gestureBeginsVertically=function(Q,he,Re){if(this._valid!==void 0)return this._valid;var Ge=2,tt=Q.mag()>=Ge,wt=he.mag()>=Ge;if(!(!tt&&!wt)){if(!tt||!wt)return this._firstMove===void 0&&(this._firstMove=Re),Re-this._firstMove0==he.y>0;return Da(Q)&&Da(he)&&zt}},W}(ra),li={panStep:100,bearingStep:15,pitchStep:10},ja=function(){var W=li;this._panStep=W.panStep,this._bearingStep=W.bearingStep,this._pitchStep=W.pitchStep,this._rotationDisabled=!1};ja.prototype.reset=function(){this._active=!1},ja.prototype.keydown=function(W){var fe=this;if(!(W.altKey||W.ctrlKey||W.metaKey)){var Q=0,he=0,Re=0,Ge=0,tt=0;switch(W.keyCode){case 61:case 107:case 171:case 187:Q=1;break;case 189:case 109:case 173:Q=-1;break;case 37:W.shiftKey?he=-1:(W.preventDefault(),Ge=-1);break;case 39:W.shiftKey?he=1:(W.preventDefault(),Ge=1);break;case 38:W.shiftKey?Re=1:(W.preventDefault(),tt=-1);break;case 40:W.shiftKey?Re=-1:(W.preventDefault(),tt=1);break;default:return}return this._rotationDisabled&&(he=0,Re=0),{cameraAnimation:function(wt){var zt=wt.getZoom();wt.easeTo({duration:300,easeId:"keyboardHandler",easing:zi,zoom:Q?Math.round(zt)+Q*(W.shiftKey?2:1):zt,bearing:wt.getBearing()+he*fe._bearingStep,pitch:wt.getPitch()+Re*fe._pitchStep,offset:[-Ge*fe._panStep,-tt*fe._panStep],center:wt.getCenter()},{originalEvent:W})}}}},ja.prototype.enable=function(){this._enabled=!0},ja.prototype.disable=function(){this._enabled=!1,this.reset()},ja.prototype.isEnabled=function(){return this._enabled},ja.prototype.isActive=function(){return this._active},ja.prototype.disableRotation=function(){this._rotationDisabled=!0},ja.prototype.enableRotation=function(){this._rotationDisabled=!1};function zi(ce){return ce*(2-ce)}var Fi=4.000244140625,Ui=1/100,ui=1/450,Ki=2,qn=function(W,fe){this._map=W,this._el=W.getCanvasContainer(),this._handler=fe,this._delta=0,this._defaultZoomRate=Ui,this._wheelZoomRate=ui,o.bindAll(["_onTimeout"],this)};qn.prototype.setZoomRate=function(W){this._defaultZoomRate=W},qn.prototype.setWheelZoomRate=function(W){this._wheelZoomRate=W},qn.prototype.isEnabled=function(){return!!this._enabled},qn.prototype.isActive=function(){return!!this._active||this._finishTimeout!==void 0},qn.prototype.isZooming=function(){return!!this._zooming},qn.prototype.enable=function(W){this.isEnabled()||(this._enabled=!0,this._aroundCenter=W&&W.around==="center")},qn.prototype.disable=function(){this.isEnabled()&&(this._enabled=!1)},qn.prototype.wheel=function(W){if(this.isEnabled()){var fe=W.deltaMode===o.window.WheelEvent.DOM_DELTA_LINE?W.deltaY*40:W.deltaY,Q=o.browser.now(),he=Q-(this._lastWheelEventTime||0);this._lastWheelEventTime=Q,fe!==0&&fe%Fi===0?this._type="wheel":fe!==0&&Math.abs(fe)<4?this._type="trackpad":he>400?(this._type=null,this._lastValue=fe,this._timeout=setTimeout(this._onTimeout,40,W)):this._type||(this._type=Math.abs(he*fe)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,fe+=this._lastValue)),W.shiftKey&&fe&&(fe=fe/4),this._type&&(this._lastWheelEvent=W,this._delta-=fe,this._active||this._start(W)),W.preventDefault()}},qn.prototype._onTimeout=function(W){this._type="wheel",this._delta-=this._lastValue,this._active||this._start(W)},qn.prototype._start=function(W){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 fe=M.mousePos(this._el,W);this._around=o.LngLat.convert(this._aroundCenter?this._map.getCenter():this._map.unproject(fe)),this._aroundPoint=this._map.transform.locationPoint(this._around),this._frameId||(this._frameId=!0,this._handler._triggerRenderFrame())}},qn.prototype.renderFrame=function(){var W=this;if(this._frameId&&(this._frameId=null,!!this.isActive())){var fe=this._map.transform;if(this._delta!==0){var Q=this._type==="wheel"&&Math.abs(this._delta)>Fi?this._wheelZoomRate:this._defaultZoomRate,he=Ki/(1+Math.exp(-Math.abs(this._delta*Q)));this._delta<0&&he!==0&&(he=1/he);var Re=typeof this._targetZoom=="number"?fe.zoomScale(this._targetZoom):fe.scale;this._targetZoom=Math.min(fe.maxZoom,Math.max(fe.minZoom,fe.scaleZoom(Re*he))),this._type==="wheel"&&(this._startZoom=fe.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}var Ge=typeof this._targetZoom=="number"?this._targetZoom:fe.zoom,tt=this._startZoom,wt=this._easing,zt=!1,Xt;if(this._type==="wheel"&&tt&&wt){var tr=Math.min((o.browser.now()-this._lastWheelEventTime)/200,1),qt=wt(tr);Xt=o.number(tt,Ge,qt),tr<1?this._frameId||(this._frameId=!0):zt=!0}else Xt=Ge,zt=!0;return this._active=!0,zt&&(this._active=!1,this._finishTimeout=setTimeout(function(){W._zooming=!1,W._handler._triggerRenderFrame(),delete W._targetZoom,delete W._finishTimeout},200)),{noInertia:!0,needsRenderFrame:!zt,zoomDelta:Xt-fe.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}},qn.prototype._smoothOutEasing=function(W){var fe=o.ease;if(this._prevEase){var Q=this._prevEase,he=(o.browser.now()-Q.start)/Q.duration,Re=Q.easing(he+.01)-Q.easing(he),Ge=.27/Math.sqrt(Re*Re+1e-4)*.01,tt=Math.sqrt(.27*.27-Ge*Ge);fe=o.bezier(Ge,tt,.25,1)}return this._prevEase={start:o.browser.now(),duration:W,easing:fe},fe},qn.prototype.reset=function(){this._active=!1};var xa=function(W,fe){this._clickZoom=W,this._tapZoom=fe};xa.prototype.enable=function(){this._clickZoom.enable(),this._tapZoom.enable()},xa.prototype.disable=function(){this._clickZoom.disable(),this._tapZoom.disable()},xa.prototype.isEnabled=function(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()},xa.prototype.isActive=function(){return this._clickZoom.isActive()||this._tapZoom.isActive()};var so=function(){this.reset()};so.prototype.reset=function(){this._active=!1},so.prototype.dblclick=function(W,fe){return W.preventDefault(),{cameraAnimation:function(Q){Q.easeTo({duration:300,zoom:Q.getZoom()+(W.shiftKey?-1:1),around:Q.unproject(fe)},{originalEvent:W})}}},so.prototype.enable=function(){this._enabled=!0},so.prototype.disable=function(){this._enabled=!1,this.reset()},so.prototype.isEnabled=function(){return this._enabled},so.prototype.isActive=function(){return this._active};var ho=function(){this._tap=new Mr({numTouches:1,numTaps:1}),this.reset()};ho.prototype.reset=function(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,this._tap.reset()},ho.prototype.touchstart=function(W,fe,Q){this._swipePoint||(this._tapTime&&W.timeStamp-this._tapTime>wr&&this.reset(),this._tapTime?Q.length>0&&(this._swipePoint=fe[0],this._swipeTouch=Q[0].identifier):this._tap.touchstart(W,fe,Q))},ho.prototype.touchmove=function(W,fe,Q){if(!this._tapTime)this._tap.touchmove(W,fe,Q);else if(this._swipePoint){if(Q[0].identifier!==this._swipeTouch)return;var he=fe[0],Re=he.y-this._swipePoint.y;return this._swipePoint=he,W.preventDefault(),this._active=!0,{zoomDelta:Re/128}}},ho.prototype.touchend=function(W,fe,Q){if(this._tapTime)this._swipePoint&&Q.length===0&&this.reset();else{var he=this._tap.touchend(W,fe,Q);he&&(this._tapTime=W.timeStamp)}},ho.prototype.touchcancel=function(){this.reset()},ho.prototype.enable=function(){this._enabled=!0},ho.prototype.disable=function(){this._enabled=!1,this.reset()},ho.prototype.isEnabled=function(){return this._enabled},ho.prototype.isActive=function(){return this._active};var Vi=function(W,fe,Q){this._el=W,this._mousePan=fe,this._touchPan=Q};Vi.prototype.enable=function(W){this._inertiaOptions=W||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("mapboxgl-touch-drag-pan")},Vi.prototype.disable=function(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("mapboxgl-touch-drag-pan")},Vi.prototype.isEnabled=function(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()},Vi.prototype.isActive=function(){return this._mousePan.isActive()||this._touchPan.isActive()};var ei=function(W,fe,Q){this._pitchWithRotate=W.pitchWithRotate,this._mouseRotate=fe,this._mousePitch=Q};ei.prototype.enable=function(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable()},ei.prototype.disable=function(){this._mouseRotate.disable(),this._mousePitch.disable()},ei.prototype.isEnabled=function(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())},ei.prototype.isActive=function(){return this._mouseRotate.isActive()||this._mousePitch.isActive()};var Pi=function(W,fe,Q,he){this._el=W,this._touchZoom=fe,this._touchRotate=Q,this._tapDragZoom=he,this._rotationDisabled=!1,this._enabled=!0};Pi.prototype.enable=function(W){this._touchZoom.enable(W),this._rotationDisabled||this._touchRotate.enable(W),this._tapDragZoom.enable(),this._el.classList.add("mapboxgl-touch-zoom-rotate")},Pi.prototype.disable=function(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("mapboxgl-touch-zoom-rotate")},Pi.prototype.isEnabled=function(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()},Pi.prototype.isActive=function(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()},Pi.prototype.disableRotation=function(){this._rotationDisabled=!0,this._touchRotate.disable()},Pi.prototype.enableRotation=function(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()};var Mi=function(ce){return ce.zoom||ce.drag||ce.pitch||ce.rotate},Bo=function(ce){function W(){ce.apply(this,arguments)}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W}(o.Event);function Qo(ce){return ce.panDelta&&ce.panDelta.mag()||ce.zoomDelta||ce.bearingDelta||ce.pitchDelta}var pi=function(W,fe){this._map=W,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new se(W),this._bearingSnap=fe.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(fe),o.bindAll(["handleEvent","handleWindowEvent"],this);var Q=this._el;this._listeners=[[Q,"touchstart",{passive:!0}],[Q,"touchmove",{passive:!1}],[Q,"touchend",void 0],[Q,"touchcancel",void 0],[Q,"mousedown",void 0],[Q,"mousemove",void 0],[Q,"mouseup",void 0],[o.window.document,"mousemove",{capture:!0}],[o.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],[o.window,"blur",void 0]];for(var he=0,Re=this._listeners;hett?Math.min(2,Bn):Math.max(.5,Bn),ia=Math.pow(ca,1-Zn),Ea=Ge.unproject(Cn.add(Rn.mult(Zn*ia)).mult(ea));Ge.setLocationAtPoint(Ge.renderWorldCopies?Ea.wrap():Ea,Fr)}Re._fireMoveEvents(he)},function(Zn){Re._afterEase(he,Zn)},Q),this},W.prototype._prepareEase=function(Q,he,Re){Re===void 0&&(Re={}),this._moving=!0,!he&&!Re.moving&&this.fire(new o.Event("movestart",Q)),this._zooming&&!Re.zooming&&this.fire(new o.Event("zoomstart",Q)),this._rotating&&!Re.rotating&&this.fire(new o.Event("rotatestart",Q)),this._pitching&&!Re.pitching&&this.fire(new o.Event("pitchstart",Q))},W.prototype._fireMoveEvents=function(Q){this.fire(new o.Event("move",Q)),this._zooming&&this.fire(new o.Event("zoom",Q)),this._rotating&&this.fire(new o.Event("rotate",Q)),this._pitching&&this.fire(new o.Event("pitch",Q))},W.prototype._afterEase=function(Q,he){if(!(this._easeId&&he&&this._easeId===he)){delete this._easeId;var Re=this._zooming,Ge=this._rotating,tt=this._pitching;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._padding=!1,Re&&this.fire(new o.Event("zoomend",Q)),Ge&&this.fire(new o.Event("rotateend",Q)),tt&&this.fire(new o.Event("pitchend",Q)),this.fire(new o.Event("moveend",Q))}},W.prototype.flyTo=function(Q,he){var Re=this;if(!Q.essential&&o.browser.prefersReducedMotion){var Ge=o.pick(Q,["center","zoom","bearing","pitch","around"]);return this.jumpTo(Ge,he)}this.stop(),Q=o.extend({offset:[0,0],speed:1.2,curve:1.42,easing:o.ease},Q);var tt=this.transform,wt=this.getZoom(),zt=this.getBearing(),Xt=this.getPitch(),tr=this.getPadding(),qt="zoom"in Q?o.clamp(+Q.zoom,tt.minZoom,tt.maxZoom):wt,Cr="bearing"in Q?this._normalizeBearing(Q.bearing,zt):zt,Ur="pitch"in Q?+Q.pitch:Xt,Nr="padding"in Q?Q.padding:tt.padding,Fr=tt.zoomScale(qt-wt),Gr=o.Point.convert(Q.offset),nn=tt.centerPoint.add(Gr),Cn=tt.pointLocation(nn),Rn=o.LngLat.convert(Q.center||Cn);this._normalizeCenter(Rn);var Bn=tt.project(Cn),Nn=tt.project(Rn).sub(Bn),Fn=Q.curve,Vn=Math.max(tt.width,tt.height),Zn=Vn/Fr,ea=Nn.mag();if("minZoom"in Q){var ca=o.clamp(Math.min(Q.minZoom,wt,qt),tt.minZoom,tt.maxZoom),ia=Vn/tt.zoomScale(ca-wt);Fn=Math.sqrt(ia/ea*2)}var Ea=Fn*Fn;function Va(ka){var Ha=(Zn*Zn-Vn*Vn+(ka?-1:1)*Ea*Ea*ea*ea)/(2*(ka?Zn:Vn)*Ea*ea);return Math.log(Math.sqrt(Ha*Ha+1)-Ha)}function za(ka){return(Math.exp(ka)-Math.exp(-ka))/2}function ga(ka){return(Math.exp(ka)+Math.exp(-ka))/2}function Fa(ka){return za(ka)/ga(ka)}var Ia=Va(0),Ka=function(ka){return ga(Ia)/ga(Ia+Fn*ka)},Wa=function(ka){return Vn*((ga(Ia)*Fa(Ia+Fn*ka)-za(Ia))/Ea)/ea},fi=(Va(1)-Ia)/Fn;if(Math.abs(ea)<1e-6||!isFinite(fi)){if(Math.abs(Vn-Zn)<1e-6)return this.easeTo(Q,he);var Ua=ZnQ.maxDuration&&(Q.duration=0),this._zooming=!0,this._rotating=zt!==Cr,this._pitching=Ur!==Xt,this._padding=!tt.isPaddingEqual(Nr),this._prepareEase(he,!1),this._ease(function(ka){var Ha=ka*fi,Si=1/Ka(Ha);tt.zoom=ka===1?qt:wt+tt.scaleZoom(Si),Re._rotating&&(tt.bearing=o.number(zt,Cr,ka)),Re._pitching&&(tt.pitch=o.number(Xt,Ur,ka)),Re._padding&&(tt.interpolatePadding(tr,Nr,ka),nn=tt.centerPoint.add(Gr));var Ji=ka===1?Rn:tt.unproject(Bn.add(Nn.mult(Wa(Ha))).mult(Si));tt.setLocationAtPoint(tt.renderWorldCopies?Ji.wrap():Ji,nn),Re._fireMoveEvents(he)},function(){return Re._afterEase(he)},Q),this},W.prototype.isEasing=function(){return!!this._easeFrameId},W.prototype.stop=function(){return this._stop()},W.prototype._stop=function(Q,he){if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){var Re=this._onEaseEnd;delete this._onEaseEnd,Re.call(this,he)}if(!Q){var Ge=this.handlers;Ge&&Ge.stop(!1)}return this},W.prototype._ease=function(Q,he,Re){Re.animate===!1||Re.duration===0?(Q(1),he()):(this._easeStart=o.browser.now(),this._easeOptions=Re,this._onEaseFrame=Q,this._onEaseEnd=he,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))},W.prototype._renderFrameCallback=function(){var Q=Math.min((o.browser.now()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(Q)),Q<1?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},W.prototype._normalizeBearing=function(Q,he){Q=o.wrap(Q,-180,180);var Re=Math.abs(Q-he);return Math.abs(Q-360-he)180?-360:Re<-180?360:0}},W}(o.Evented),Na=function(W){W===void 0&&(W={}),this.options=W,o.bindAll(["_toggleAttribution","_updateEditLink","_updateData","_updateCompact"],this)};Na.prototype.getDefaultPosition=function(){return"bottom-right"},Na.prototype.onAdd=function(W){var fe=this.options&&this.options.compact;return this._map=W,this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-attrib"),this._compactButton=M.create("button","mapboxgl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=M.create("div","mapboxgl-ctrl-attrib-inner",this._container),this._innerContainer.setAttribute("role","list"),fe&&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),fe===void 0&&(this._map.on("resize",this._updateCompact),this._updateCompact()),this._container},Na.prototype.onRemove=function(){M.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},Na.prototype._setElementTitle=function(W,fe){var Q=this._map._getUIString("AttributionControl."+fe);W.title=Q,W.setAttribute("aria-label",Q)},Na.prototype._toggleAttribution=function(){this._container.classList.contains("mapboxgl-compact-show")?(this._container.classList.remove("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","false")):(this._container.classList.add("mapboxgl-compact-show"),this._compactButton.setAttribute("aria-pressed","true"))},Na.prototype._updateEditLink=function(){var W=this._editLink;W||(W=this._editLink=this._container.querySelector(".mapbox-improve-map"));var fe=[{key:"owner",value:this.styleOwner},{key:"id",value:this.styleId},{key:"access_token",value:this._map._requestManager._customAccessToken||o.config.ACCESS_TOKEN}];if(W){var Q=fe.reduce(function(he,Re,Ge){return Re.value&&(he+=Re.key+"="+Re.value+(Ge=0)return!1;return!0});var tt=W.join(" | ");tt!==this._attribHTML&&(this._attribHTML=tt,W.length?(this._innerContainer.innerHTML=tt,this._container.classList.remove("mapboxgl-attrib-empty")):this._container.classList.add("mapboxgl-attrib-empty"),this._editLink=null)}},Na.prototype._updateCompact=function(){this._map.getCanvasContainer().offsetWidth<=640?this._container.classList.add("mapboxgl-compact"):this._container.classList.remove("mapboxgl-compact","mapboxgl-compact-show")};var gi=function(){o.bindAll(["_updateLogo"],this),o.bindAll(["_updateCompact"],this)};gi.prototype.onAdd=function(W){this._map=W,this._container=M.create("div","mapboxgl-ctrl");var fe=M.create("a","mapboxgl-ctrl-logo");return fe.target="_blank",fe.rel="noopener nofollow",fe.href="https://www.mapbox.com/",fe.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),fe.setAttribute("rel","noopener nofollow"),this._container.appendChild(fe),this._container.style.display="none",this._map.on("sourcedata",this._updateLogo),this._updateLogo(),this._map.on("resize",this._updateCompact),this._updateCompact(),this._container},gi.prototype.onRemove=function(){M.remove(this._container),this._map.off("sourcedata",this._updateLogo),this._map.off("resize",this._updateCompact)},gi.prototype.getDefaultPosition=function(){return"bottom-left"},gi.prototype._updateLogo=function(W){(!W||W.sourceDataType==="metadata")&&(this._container.style.display=this._logoRequired()?"block":"none")},gi.prototype._logoRequired=function(){if(this._map.style){var W=this._map.style.sourceCaches;for(var fe in W){var Q=W[fe].getSource();if(Q.mapbox_logo)return!0}return!1}},gi.prototype._updateCompact=function(){var W=this._container.children;if(W.length){var fe=W[0];this._map.getCanvasContainer().offsetWidth<250?fe.classList.add("mapboxgl-compact"):fe.classList.remove("mapboxgl-compact")}};var wf=function(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1};wf.prototype.add=function(W){var fe=++this._id,Q=this._queue;return Q.push({callback:W,id:fe,cancelled:!1}),fe},wf.prototype.remove=function(W){for(var fe=this._currentlyRunning,Q=fe?this._queue.concat(fe):this._queue,he=0,Re=Q;heQ.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(Q.minPitch!=null&&Q.maxPitch!=null&&Q.minPitch>Q.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(Q.minPitch!=null&&Q.minPitchYl)throw new Error("maxPitch must be less than or equal to "+Yl);var Re=new Sn(Q.minZoom,Q.maxZoom,Q.minPitch,Q.maxPitch,Q.renderWorldCopies);if(ce.call(this,Re,Q),this._interactive=Q.interactive,this._maxTileCacheSize=Q.maxTileCacheSize,this._failIfMajorPerformanceCaveat=Q.failIfMajorPerformanceCaveat,this._preserveDrawingBuffer=Q.preserveDrawingBuffer,this._antialias=Q.antialias,this._trackResize=Q.trackResize,this._bearingSnap=Q.bearingSnap,this._refreshExpiredTiles=Q.refreshExpiredTiles,this._fadeDuration=Q.fadeDuration,this._crossSourceCollisions=Q.crossSourceCollisions,this._crossFadingFactor=1,this._collectResourceTiming=Q.collectResourceTiming,this._renderTaskQueue=new wf,this._controls=[],this._mapId=o.uniqueId(),this._locale=o.extend({},Sc,Q.locale),this._clickTolerance=Q.clickTolerance,this._requestManager=new o.RequestManager(Q.transformRequest,Q.accessToken),typeof Q.container=="string"){if(this._container=o.window.document.getElementById(Q.container),!this._container)throw new Error("Container '"+Q.container+"' not found.")}else if(Q.container instanceof rc)this._container=Q.container;else throw new Error("Invalid type: 'container' must be a String or HTMLElement.");if(Q.maxBounds&&this.setMaxBounds(Q.maxBounds),o.bindAll(["_onWindowOnline","_onWindowResize","_onMapScroll","_contextLost","_contextRestored"],this),this._setupContainer(),this._setupPainter(),this.painter===void 0)throw new Error("Failed to initialize WebGL.");this.on("move",function(){return he._update(!1)}),this.on("moveend",function(){return he._update(!1)}),this.on("zoom",function(){return he._update(!0)}),typeof o.window<"u"&&(o.window.addEventListener("online",this._onWindowOnline,!1),o.window.addEventListener("resize",this._onWindowResize,!1),o.window.addEventListener("orientationchange",this._onWindowResize,!1)),this.handlers=new pi(this,Q);var Ge=typeof Q.hash=="string"&&Q.hash||void 0;this._hash=Q.hash&&new Ta(Ge).addTo(this),(!this._hash||!this._hash._onHashChange())&&(this.jumpTo({center:Q.center,zoom:Q.zoom,bearing:Q.bearing,pitch:Q.pitch}),Q.bounds&&(this.resize(),this.fitBounds(Q.bounds,o.extend({},Q.fitBoundsOptions,{duration:0})))),this.resize(),this._localIdeographFontFamily=Q.localIdeographFontFamily,Q.style&&this.setStyle(Q.style,{localIdeographFontFamily:Q.localIdeographFontFamily}),Q.attributionControl&&this.addControl(new Na({customAttribution:Q.customAttribution})),this.addControl(new gi,Q.logoPosition),this.on("style.load",function(){he.transform.unmodified&&he.jumpTo(he.style.stylesheet)}),this.on("data",function(tt){he._update(tt.dataType==="style"),he.fire(new o.Event(tt.dataType+"data",tt))}),this.on("dataloading",function(tt){he.fire(new o.Event(tt.dataType+"dataloading",tt))})}W.__proto__=ce,W.prototype=Object.create(ce.prototype),W.prototype.constructor=W;var fe={showTileBoundaries:{configurable:!0},showPadding:{configurable:!0},showCollisionBoxes:{configurable:!0},showOverdrawInspector:{configurable:!0},repaint:{configurable:!0},vertices:{configurable:!0},version:{configurable:!0}};return W.prototype._getMapId=function(){return this._mapId},W.prototype.addControl=function(he,Re){if(Re===void 0&&(he.getDefaultPosition?Re=he.getDefaultPosition():Re="top-right"),!he||!he.onAdd)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));var Ge=he.onAdd(this);this._controls.push(he);var tt=this._controlPositions[Re];return Re.indexOf("bottom")!==-1?tt.insertBefore(Ge,tt.firstChild):tt.appendChild(Ge),this},W.prototype.removeControl=function(he){if(!he||!he.onRemove)return this.fire(new o.ErrorEvent(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));var Re=this._controls.indexOf(he);return Re>-1&&this._controls.splice(Re,1),he.onRemove(this),this},W.prototype.hasControl=function(he){return this._controls.indexOf(he)>-1},W.prototype.resize=function(he){var Re=this._containerDimensions(),Ge=Re[0],tt=Re[1];this._resizeCanvas(Ge,tt),this.transform.resize(Ge,tt),this.painter.resize(Ge,tt);var wt=!this._moving;return wt&&(this.stop(),this.fire(new o.Event("movestart",he)).fire(new o.Event("move",he))),this.fire(new o.Event("resize",he)),wt&&this.fire(new o.Event("moveend",he)),this},W.prototype.getBounds=function(){return this.transform.getBounds()},W.prototype.getMaxBounds=function(){return this.transform.getMaxBounds()},W.prototype.setMaxBounds=function(he){return this.transform.setMaxBounds(o.LngLatBounds.convert(he)),this._update()},W.prototype.setMinZoom=function(he){if(he=he??Hu,he>=Hu&&he<=this.transform.maxZoom)return this.transform.minZoom=he,this._update(),this.getZoom()=this.transform.minZoom)return this.transform.maxZoom=he,this._update(),this.getZoom()>he&&this.setZoom(he),this;throw new Error("maxZoom must be greater than the current minZoom")},W.prototype.getMaxZoom=function(){return this.transform.maxZoom},W.prototype.setMinPitch=function(he){if(he=he??Co,he=Co&&he<=this.transform.maxPitch)return this.transform.minPitch=he,this._update(),this.getPitch()Yl)throw new Error("maxPitch must be less than or equal to "+Yl);if(he>=this.transform.minPitch)return this.transform.maxPitch=he,this._update(),this.getPitch()>he&&this.setPitch(he),this;throw new Error("maxPitch must be greater than the current minPitch")},W.prototype.getMaxPitch=function(){return this.transform.maxPitch},W.prototype.getRenderWorldCopies=function(){return this.transform.renderWorldCopies},W.prototype.setRenderWorldCopies=function(he){return this.transform.renderWorldCopies=he,this._update()},W.prototype.project=function(he){return this.transform.locationPoint(o.LngLat.convert(he))},W.prototype.unproject=function(he){return this.transform.pointLocation(o.Point.convert(he))},W.prototype.isMoving=function(){return this._moving||this.handlers.isMoving()},W.prototype.isZooming=function(){return this._zooming||this.handlers.isZooming()},W.prototype.isRotating=function(){return this._rotating||this.handlers.isRotating()},W.prototype._createDelegatedListener=function(he,Re,Ge){var tt=this,wt;if(he==="mouseenter"||he==="mouseover"){var zt=!1,Xt=function(Fr){var Gr=tt.getLayer(Re)?tt.queryRenderedFeatures(Fr.point,{layers:[Re]}):[];Gr.length?zt||(zt=!0,Ge.call(tt,new Xe(he,tt,Fr.originalEvent,{features:Gr}))):zt=!1},tr=function(){zt=!1};return{layer:Re,listener:Ge,delegates:{mousemove:Xt,mouseout:tr}}}else if(he==="mouseleave"||he==="mouseout"){var qt=!1,Cr=function(Fr){var Gr=tt.getLayer(Re)?tt.queryRenderedFeatures(Fr.point,{layers:[Re]}):[];Gr.length?qt=!0:qt&&(qt=!1,Ge.call(tt,new Xe(he,tt,Fr.originalEvent)))},Ur=function(Fr){qt&&(qt=!1,Ge.call(tt,new Xe(he,tt,Fr.originalEvent)))};return{layer:Re,listener:Ge,delegates:{mousemove:Cr,mouseout:Ur}}}else{var Nr=function(Fr){var Gr=tt.getLayer(Re)?tt.queryRenderedFeatures(Fr.point,{layers:[Re]}):[];Gr.length&&(Fr.features=Gr,Ge.call(tt,Fr),delete Fr.features)};return{layer:Re,listener:Ge,delegates:(wt={},wt[he]=Nr,wt)}}},W.prototype.on=function(he,Re,Ge){if(Ge===void 0)return ce.prototype.on.call(this,he,Re);var tt=this._createDelegatedListener(he,Re,Ge);this._delegatedListeners=this._delegatedListeners||{},this._delegatedListeners[he]=this._delegatedListeners[he]||[],this._delegatedListeners[he].push(tt);for(var wt in tt.delegates)this.on(wt,tt.delegates[wt]);return this},W.prototype.once=function(he,Re,Ge){if(Ge===void 0)return ce.prototype.once.call(this,he,Re);var tt=this._createDelegatedListener(he,Re,Ge);for(var wt in tt.delegates)this.once(wt,tt.delegates[wt]);return this},W.prototype.off=function(he,Re,Ge){var tt=this;if(Ge===void 0)return ce.prototype.off.call(this,he,Re);var wt=function(zt){for(var Xt=zt[he],tr=0;tr180;){var Ge=fe.locationPoint(ce);if(Ge.x>=0&&Ge.y>=0&&Ge.x<=fe.width&&Ge.y<=fe.height)break;ce.lng>fe.center.lng?ce.lng-=360:ce.lng+=360}return ce}var Af={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 If(ce,W,fe){var Q=ce.classList;for(var he in Af)Q.remove("mapboxgl-"+fe+"-anchor-"+he);Q.add("mapboxgl-"+fe+"-anchor-"+W)}var Wu=function(ce){function W(fe,Q){if(ce.call(this),(fe instanceof o.window.HTMLElement||Q)&&(fe=o.extend({element:fe},Q)),o.bindAll(["_update","_onMove","_onUp","_addDragHandler","_onMapClick","_onKeyPress"],this),this._anchor=fe&&fe.anchor||"center",this._color=fe&&fe.color||"#3FB1CE",this._scale=fe&&fe.scale||1,this._draggable=fe&&fe.draggable||!1,this._clickTolerance=fe&&fe.clickTolerance||0,this._isDragging=!1,this._state="inactive",this._rotation=fe&&fe.rotation||0,this._rotationAlignment=fe&&fe.rotationAlignment||"auto",this._pitchAlignment=fe&&fe.pitchAlignment&&fe.pitchAlignment!=="auto"?fe.pitchAlignment:this._rotationAlignment,!fe||!fe.element){this._defaultMarker=!0,this._element=M.create("div"),this._element.setAttribute("aria-label","Map marker");var he=M.createNS("http://www.w3.org/2000/svg","svg"),Re=41,Ge=27;he.setAttributeNS(null,"display","block"),he.setAttributeNS(null,"height",Re+"px"),he.setAttributeNS(null,"width",Ge+"px"),he.setAttributeNS(null,"viewBox","0 0 "+Ge+" "+Re);var tt=M.createNS("http://www.w3.org/2000/svg","g");tt.setAttributeNS(null,"stroke","none"),tt.setAttributeNS(null,"stroke-width","1"),tt.setAttributeNS(null,"fill","none"),tt.setAttributeNS(null,"fill-rule","evenodd");var wt=M.createNS("http://www.w3.org/2000/svg","g");wt.setAttributeNS(null,"fill-rule","nonzero");var zt=M.createNS("http://www.w3.org/2000/svg","g");zt.setAttributeNS(null,"transform","translate(3.0, 29.0)"),zt.setAttributeNS(null,"fill","#000000");for(var 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"}],tr=0,qt=Xt;tr=he}this._isDragging&&(this._pos=Q.point.sub(this._positionDelta),this._lngLat=this._map.unproject(this._pos),this.setLngLat(this._lngLat),this._element.style.pointerEvents="none",this._state==="pending"&&(this._state="active",this.fire(new o.Event("dragstart"))),this.fire(new o.Event("drag")))},W.prototype._onUp=function(){this._element.style.pointerEvents="auto",this._positionDelta=null,this._pointerdownPos=null,this._isDragging=!1,this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),this._state==="active"&&this.fire(new o.Event("dragend")),this._state="inactive"},W.prototype._addDragHandler=function(Q){this._element.contains(Q.originalEvent.target)&&(Q.preventDefault(),this._positionDelta=Q.point.sub(this._pos).add(this._offset),this._pointerdownPos=Q.point,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))},W.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},W.prototype.isDraggable=function(){return this._draggable},W.prototype.setRotation=function(Q){return this._rotation=Q||0,this._update(),this},W.prototype.getRotation=function(){return this._rotation},W.prototype.setRotationAlignment=function(Q){return this._rotationAlignment=Q||"auto",this._update(),this},W.prototype.getRotationAlignment=function(){return this._rotationAlignment},W.prototype.setPitchAlignment=function(Q){return this._pitchAlignment=Q&&Q!=="auto"?Q:this._rotationAlignment,this._update(),this},W.prototype.getPitchAlignment=function(){return this._pitchAlignment},W}(o.Evented),ic={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Xl;function Mf(ce){Xl!==void 0?ce(Xl):o.window.navigator.permissions!==void 0?o.window.navigator.permissions.query({name:"geolocation"}).then(function(W){Xl=W.state!=="denied",ce(Xl)}):(Xl=!!o.window.navigator.geolocation,ce(Xl))}var Yu=0,vu=!1,Ec=function(ce){function W(fe){ce.call(this),this.options=o.extend({},ic,fe),o.bindAll(["_onSuccess","_onError","_onZoom","_finish","_setupUI","_updateCamera","_updateMarker"],this)}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.prototype.onAdd=function(Q){return this._map=Q,this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),Mf(this._setupUI),this._container},W.prototype.onRemove=function(){this._geolocationWatchID!==void 0&&(o.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(),M.remove(this._container),this._map.off("zoom",this._onZoom),this._map=void 0,Yu=0,vu=!1},W.prototype._isOutOfMapMaxBounds=function(Q){var he=this._map.getMaxBounds(),Re=Q.coords;return he&&(Re.longitudehe.getEast()||Re.latitudehe.getNorth())},W.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");break}},W.prototype._onSuccess=function(Q){if(this._map){if(this._isOutOfMapMaxBounds(Q)){this._setErrorState(),this.fire(new o.Event("outofmaxbounds",Q)),this._updateMarker(),this._finish();return}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");break}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(Q),(!this.options.trackUserLocation||this._watchState==="ACTIVE_LOCK")&&this._updateCamera(Q),this.options.showUserLocation&&this._dotElement.classList.remove("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("geolocate",Q)),this._finish()}},W.prototype._updateCamera=function(Q){var he=new o.LngLat(Q.coords.longitude,Q.coords.latitude),Re=Q.coords.accuracy,Ge=this._map.getBearing(),tt=o.extend({bearing:Ge},this.options.fitBoundsOptions);this._map.fitBounds(he.toBounds(Re),tt,{geolocateSource:!0})},W.prototype._updateMarker=function(Q){if(Q){var he=new o.LngLat(Q.coords.longitude,Q.coords.latitude);this._accuracyCircleMarker.setLngLat(he).addTo(this._map),this._userLocationDotMarker.setLngLat(he).addTo(this._map),this._accuracy=Q.coords.accuracy,this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},W.prototype._updateCircleRadius=function(){var Q=this._map._container.clientHeight/2,he=this._map.unproject([0,Q]),Re=this._map.unproject([1,Q]),Ge=he.distanceTo(Re),tt=Math.ceil(2*this._accuracy/Ge);this._circleElement.style.width=tt+"px",this._circleElement.style.height=tt+"px"},W.prototype._onZoom=function(){this.options.showUserLocation&&this.options.showAccuracyCircle&&this._updateCircleRadius()},W.prototype._onError=function(Q){if(this._map){if(this.options.trackUserLocation)if(Q.code===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._geolocateButton.disabled=!0;var he=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=he,this._geolocateButton.setAttribute("aria-label",he),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(Q.code===3&&vu)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("mapboxgl-user-location-dot-stale"),this.fire(new o.Event("error",Q)),this._finish()}},W.prototype._finish=function(){this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},W.prototype._setupUI=function(Q){var he=this;if(this._container.addEventListener("contextmenu",function(tt){return tt.preventDefault()}),this._geolocateButton=M.create("button","mapboxgl-ctrl-geolocate",this._container),M.create("span","mapboxgl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden",!0),this._geolocateButton.type="button",Q===!1){o.warnOnce("Geolocation support is not available so the GeolocateControl will be disabled.");var Re=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=Re,this._geolocateButton.setAttribute("aria-label",Re)}else{var Ge=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.title=Ge,this._geolocateButton.setAttribute("aria-label",Ge)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=M.create("div","mapboxgl-user-location-dot"),this._userLocationDotMarker=new Wu(this._dotElement),this._circleElement=M.create("div","mapboxgl-user-location-accuracy-circle"),this._accuracyCircleMarker=new Wu({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(tt){var wt=tt.originalEvent&&tt.originalEvent.type==="resize";!tt.geolocateSource&&he._watchState==="ACTIVE_LOCK"&&!wt&&(he._watchState="BACKGROUND",he._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-background"),he._geolocateButton.classList.remove("mapboxgl-ctrl-geolocate-active"),he.fire(new o.Event("trackuserlocationend")))})},W.prototype.trigger=function(){if(!this._setup)return o.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 o.Event("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Yu--,vu=!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 o.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 o.Event("trackuserlocationstart"));break}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");break}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){this._geolocateButton.classList.add("mapboxgl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Yu++;var Q;Yu>1?(Q={maximumAge:6e5,timeout:0},vu=!0):(Q=this.options.positionOptions,vu=!1),this._geolocationWatchID=o.window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Q)}}else o.window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0},W.prototype._clearWatch=function(){o.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)},W}(o.Evented),oc={maxWidth:100,unit:"metric"},du=function(W){this.options=o.extend({},oc,W),o.bindAll(["_onMove","setUnit"],this)};du.prototype.getDefaultPosition=function(){return"bottom-left"},du.prototype._onMove=function(){sc(this._map,this._container,this.options)},du.prototype.onAdd=function(W){return this._map=W,this._container=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-scale",W.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container},du.prototype.onRemove=function(){M.remove(this._container),this._map.off("move",this._onMove),this._map=void 0},du.prototype.setUnit=function(W){this.options.unit=W,sc(this._map,this._container,this.options)};function sc(ce,W,fe){var Q=fe&&fe.maxWidth||100,he=ce._container.clientHeight/2,Re=ce.unproject([0,he]),Ge=ce.unproject([Q,he]),tt=Re.distanceTo(Ge);if(fe&&fe.unit==="imperial"){var wt=3.2808*tt;if(wt>5280){var zt=wt/5280;Xu(W,Q,zt,ce._getUIString("ScaleControl.Miles"))}else Xu(W,Q,wt,ce._getUIString("ScaleControl.Feet"))}else if(fe&&fe.unit==="nautical"){var Xt=tt/1852;Xu(W,Q,Xt,ce._getUIString("ScaleControl.NauticalMiles"))}else tt>=1e3?Xu(W,Q,tt/1e3,ce._getUIString("ScaleControl.Kilometers")):Xu(W,Q,tt,ce._getUIString("ScaleControl.Meters"))}function Xu(ce,W,fe,Q){var he=Lc(fe),Re=he/fe;ce.style.width=W*Re+"px",ce.innerHTML=he+" "+Q}function Cc(ce){var W=Math.pow(10,Math.ceil(-Math.log(ce)/Math.LN10));return Math.round(ce*W)/W}function Lc(ce){var W=Math.pow(10,(""+Math.floor(ce)).length-1),fe=ce/W;return fe=fe>=10?10:fe>=5?5:fe>=3?3:fe>=2?2:fe>=1?1:Cc(fe),W*fe}var Ts=function(W){this._fullscreen=!1,W&&W.container&&(W.container instanceof o.window.HTMLElement?this._container=W.container:o.warnOnce("Full screen control 'container' must be a DOM element.")),o.bindAll(["_onClickFullscreen","_changeIcon"],this),"onfullscreenchange"in o.window.document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in o.window.document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in o.window.document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in o.window.document&&(this._fullscreenchange="MSFullscreenChange")};Ts.prototype.onAdd=function(W){return this._map=W,this._container||(this._container=this._map.getContainer()),this._controlContainer=M.create("div","mapboxgl-ctrl mapboxgl-ctrl-group"),this._checkFullscreenSupport()?this._setupUI():(this._controlContainer.style.display="none",o.warnOnce("This device does not support fullscreen mode.")),this._controlContainer},Ts.prototype.onRemove=function(){M.remove(this._controlContainer),this._map=null,o.window.document.removeEventListener(this._fullscreenchange,this._changeIcon)},Ts.prototype._checkFullscreenSupport=function(){return!!(o.window.document.fullscreenEnabled||o.window.document.mozFullScreenEnabled||o.window.document.msFullscreenEnabled||o.window.document.webkitFullscreenEnabled)},Ts.prototype._setupUI=function(){var W=this._fullscreenButton=M.create("button","mapboxgl-ctrl-fullscreen",this._controlContainer);M.create("span","mapboxgl-ctrl-icon",W).setAttribute("aria-hidden",!0),W.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),o.window.document.addEventListener(this._fullscreenchange,this._changeIcon)},Ts.prototype._updateTitle=function(){var W=this._getTitle();this._fullscreenButton.setAttribute("aria-label",W),this._fullscreenButton.title=W},Ts.prototype._getTitle=function(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")},Ts.prototype._isFullscreen=function(){return this._fullscreen},Ts.prototype._changeIcon=function(){var W=o.window.document.fullscreenElement||o.window.document.mozFullScreenElement||o.window.document.webkitFullscreenElement||o.window.document.msFullscreenElement;W===this._container!==this._fullscreen&&(this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("mapboxgl-ctrl-shrink"),this._fullscreenButton.classList.toggle("mapboxgl-ctrl-fullscreen"),this._updateTitle())},Ts.prototype._onClickFullscreen=function(){this._isFullscreen()?o.window.document.exitFullscreen?o.window.document.exitFullscreen():o.window.document.mozCancelFullScreen?o.window.document.mozCancelFullScreen():o.window.document.msExitFullscreen?o.window.document.msExitFullscreen():o.window.document.webkitCancelFullScreen&&o.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 Pc={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px"},Rc=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", "),qc=function(ce){function W(fe){ce.call(this),this.options=o.extend(Object.create(Pc),fe),o.bindAll(["_update","_onClose","remove","_onMouseMove","_onMouseUp","_onDrag"],this)}return ce&&(W.__proto__=ce),W.prototype=Object.create(ce&&ce.prototype),W.prototype.constructor=W,W.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._focusFirstElement(),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 o.Event("open")),this},W.prototype.isOpen=function(){return!!this._map},W.prototype.remove=function(){return this._content&&M.remove(this._content),this._container&&(M.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 o.Event("close")),this},W.prototype.getLngLat=function(){return this._lngLat},W.prototype.setLngLat=function(Q){return this._lngLat=o.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},W.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},W.prototype.getElement=function(){return this._container},W.prototype.setText=function(Q){return this.setDOMContent(o.window.document.createTextNode(Q))},W.prototype.setHTML=function(Q){var he=o.window.document.createDocumentFragment(),Re=o.window.document.createElement("body"),Ge;for(Re.innerHTML=Q;Ge=Re.firstChild,!!Ge;)he.appendChild(Ge);return this.setDOMContent(he)},W.prototype.getMaxWidth=function(){return this._container&&this._container.style.maxWidth},W.prototype.setMaxWidth=function(Q){return this.options.maxWidth=Q,this._update(),this},W.prototype.setDOMContent=function(Q){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=M.create("div","mapboxgl-popup-content",this._container);return this._content.appendChild(Q),this._createCloseButton(),this._update(),this._focusFirstElement(),this},W.prototype.addClassName=function(Q){this._container&&this._container.classList.add(Q)},W.prototype.removeClassName=function(Q){this._container&&this._container.classList.remove(Q)},W.prototype.setOffset=function(Q){return this.options.offset=Q,this._update(),this},W.prototype.toggleClassName=function(Q){if(this._container)return this._container.classList.toggle(Q)},W.prototype._createCloseButton=function(){this.options.closeButton&&(this._closeButton=M.create("button","mapboxgl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.setAttribute("aria-label","Close popup"),this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))},W.prototype._onMouseUp=function(Q){this._update(Q.point)},W.prototype._onMouseMove=function(Q){this._update(Q.point)},W.prototype._onDrag=function(Q){this._update(Q.point)},W.prototype._update=function(Q){var he=this,Re=this._lngLat||this._trackPointer;if(!(!this._map||!Re||!this._content)&&(this._container||(this._container=M.create("div","mapboxgl-popup",this._map.getContainer()),this._tip=M.create("div","mapboxgl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className&&this.options.className.split(" ").forEach(function(Cr){return he._container.classList.add(Cr)}),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=wl(this._lngLat,this._pos,this._map.transform)),!(this._trackPointer&&!Q))){var Ge=this._pos=this._trackPointer&&Q?Q:this._map.project(this._lngLat),tt=this.options.anchor,wt=Dc(this.options.offset);if(!tt){var zt=this._container.offsetWidth,Xt=this._container.offsetHeight,tr;Ge.y+wt.bottom.ythis._map.transform.height-Xt?tr=["bottom"]:tr=[],Ge.xthis._map.transform.width-zt/2&&tr.push("right"),tr.length===0?tt="bottom":tt=tr.join("-")}var qt=Ge.add(wt[tt]).round();M.setTransform(this._container,Af[tt]+" translate("+qt.x+"px,"+qt.y+"px)"),If(this._container,tt,"popup")}},W.prototype._focusFirstElement=function(){if(!(!this.options.focusAfterOpen||!this._container)){var Q=this._container.querySelector(Rc);Q&&Q.focus()}},W.prototype._onClose=function(){this.remove()},W}(o.Evented);function Dc(ce){if(ce)if(typeof ce=="number"){var W=Math.round(Math.sqrt(.5*Math.pow(ce,2)));return{center:new o.Point(0,0),top:new o.Point(0,ce),"top-left":new o.Point(W,W),"top-right":new o.Point(-W,W),bottom:new o.Point(0,-ce),"bottom-left":new o.Point(W,-W),"bottom-right":new o.Point(-W,-W),left:new o.Point(ce,0),right:new o.Point(-ce,0)}}else if(ce instanceof o.Point||Array.isArray(ce)){var fe=o.Point.convert(ce);return{center:fe,top:fe,"top-left":fe,"top-right":fe,bottom:fe,"bottom-left":fe,"bottom-right":fe,left:fe,right:fe}}else return{center:o.Point.convert(ce.center||[0,0]),top:o.Point.convert(ce.top||[0,0]),"top-left":o.Point.convert(ce["top-left"]||[0,0]),"top-right":o.Point.convert(ce["top-right"]||[0,0]),bottom:o.Point.convert(ce.bottom||[0,0]),"bottom-left":o.Point.convert(ce["bottom-left"]||[0,0]),"bottom-right":o.Point.convert(ce["bottom-right"]||[0,0]),left:o.Point.convert(ce.left||[0,0]),right:o.Point.convert(ce.right||[0,0])};else return Dc(new o.Point(0,0))}var Hi={version:o.version,supported:L,setRTLTextPlugin:o.setRTLTextPlugin,getRTLTextPluginStatus:o.getRTLTextPluginStatus,Map:ac,NavigationControl:bl,GeolocateControl:Ec,AttributionControl:Na,ScaleControl:du,FullscreenControl:Ts,Popup:qc,Marker:Wu,Style:uo,LngLat:o.LngLat,LngLatBounds:o.LngLatBounds,Point:o.Point,MercatorCoordinate:o.MercatorCoordinate,Evented:o.Evented,config:o.config,prewarm:Lt,clearPrewarmedResources:Ut,get accessToken(){return o.config.ACCESS_TOKEN},set accessToken(ce){o.config.ACCESS_TOKEN=ce},get baseApiUrl(){return o.config.API_URL},set baseApiUrl(ce){o.config.API_URL=ce},get workerCount(){return ir.workerCount},set workerCount(ce){ir.workerCount=ce},get maxParallelImageRequests(){return o.config.MAX_PARALLEL_IMAGE_REQUESTS},set maxParallelImageRequests(ce){o.config.MAX_PARALLEL_IMAGE_REQUESTS=ce},clearStorage:function(W){o.clearTileCache(W)},workerUrl:""};return Hi}),A})},3108:function(te,X,e){te.exports=e(26099)},26099:function(te,X,e){var A=e(64928),P=e(32420),o=e(51160),L=e(76752),M=e(55616),d=e(31264),g=e(47520),r=e(18400),t=e(72512),s=e(76244),a=1073741824;te.exports=function(l,y){y||(y={}),l=g(l,"float64"),y=M(y,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});var h=d(y.maxDepth,255),T=d(y.bounds,L(l,2));T[0]===T[2]&&T[2]++,T[1]===T[3]&&T[3]++;var f=c(l,T),n=l.length>>>1,v;y.dtype||(y.dtype="array"),typeof y.dtype=="string"?v=new(t(y.dtype))(n):y.dtype&&(v=y.dtype,Array.isArray(v)&&(v.length=n));for(var m=0;mh||q>a){for(var H=0;H_e||ae>ze||K=ie)&&ye!==Se){var Ie=b[Ae];Se===void 0&&(Se=Ie.length);for(var Ne=ye;Ne=oe&&st<=G&&Ze>=Z&&Ze<=re&&le.push(et)}var Ke=E[Ae],nt=Ke[ye*4+0],it=Ke[ye*4+1],lt=Ke[ye*4+2],vt=Ke[ye*4+3],xt=we(Ke,ye+1),Je=ve*.5,Pe=Ae+1;de(me,Le,Je,Pe,nt,it||lt||vt||xt),de(me,Le+Je,Je,Pe,it,lt||vt||xt),de(me+Je,Le,Je,Pe,lt,vt||xt),de(me+Je,Le+Je,Je,Pe,vt,xt)}}}function we(me,Le){for(var ve=null,Ae=0;ve===null;)if(ve=me[Le*4+Ae],Ae++,Ae>me.length)return null;return ve}return le}function z(F,N,V,j,$){for(var q=[],oe=0;oe<$;oe++){var Z=p[oe],G=S[oe][0],re=O(F,N,oe),H=O(V,j,oe),J=A.ge(Z,re),ae=A.gt(Z,H,J,Z.length-1);q[oe]=[J+G,ae+G]}return q}function O(F,N,V){for(var j=1,$=.5,q=.5,oe=.5,Z=0;Z0){t+=Math.abs(d(r[0]));for(var s=1;s2){for(y=0;y=0))throw new Error("precision must be a positive number");var C=Math.pow(10,i||0);return Math.round(w*C)/C}X.round=u;function l(w,i){i===void 0&&(i="kilometers");var C=X.factors[i];if(!C)throw new Error(i+" units is invalid");return w*C}X.radiansToLength=l;function y(w,i){i===void 0&&(i="kilometers");var C=X.factors[i];if(!C)throw new Error(i+" units is invalid");return w/C}X.lengthToRadians=y;function h(w,i){return f(y(w,i))}X.lengthToDegrees=h;function T(w){var i=w%360;return i<0&&(i+=360),i}X.bearingToAzimuth=T;function f(w){var i=w%(2*Math.PI);return i*180/Math.PI}X.radiansToDegrees=f;function n(w){var i=w%360;return i*Math.PI/180}X.degreesToRadians=n;function v(w,i,C){if(i===void 0&&(i="kilometers"),C===void 0&&(C="kilometers"),!(w>=0))throw new Error("length must be a positive number");return l(y(w,i),C)}X.convertLength=v;function m(w,i,C){if(i===void 0&&(i="meters"),C===void 0&&(C="kilometers"),!(w>=0))throw new Error("area must be a positive number");var x=X.areaFactors[i];if(!x)throw new Error("invalid original units");var k=X.areaFactors[C];if(!k)throw new Error("invalid final units");return w/x*k}X.convertArea=m;function b(w){return!isNaN(w)&&w!==null&&!Array.isArray(w)}X.isNumber=b;function E(w){return!!w&&w.constructor===Object}X.isObject=E;function p(w){if(!w)throw new Error("bbox is required");if(!Array.isArray(w))throw new Error("bbox must be an Array");if(w.length!==4&&w.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");w.forEach(function(i){if(!b(i))throw new Error("bbox must only contain numbers")})}X.validateBBox=p;function S(w){if(!w)throw new Error("id is required");if(["string","number"].indexOf(typeof w)===-1)throw new Error("id must be a number or a string")}X.validateId=S},3256:function(te,X,e){Object.defineProperty(X,"__esModule",{value:!0});var A=e(46284);function P(n,v,m){if(n!==null)for(var b,E,p,S,w,i,C,x=0,k=0,I,B=n.type,_=B==="FeatureCollection",z=B==="Feature",O=_?n.features.length:1,F=0;Fi||_>C||z>x){w=k,i=b,C=_,x=z,p=0;return}var O=A.lineString([w,k],m.properties);if(v(O,b,E,z,p)===!1)return!1;p++,w=k})===!1)return!1}}})}function l(n,v,m){var b=m,E=!1;return u(n,function(p,S,w,i,C){E===!1&&m===void 0?b=p:b=v(b,p,S,w,i,C),E=!0}),b}function y(n,v){if(!n)throw new Error("geojson is required");a(n,function(m,b,E){if(m.geometry!==null){var p=m.geometry.type,S=m.geometry.coordinates;switch(p){case"LineString":if(v(m,b,E,0,0)===!1)return!1;break;case"Polygon":for(var w=0;wM[0]&&(L[0]=M[0]),L[1]>M[1]&&(L[1]=M[1]),L[2]=0))throw new Error("precision must be a positive number");var C=Math.pow(10,i||0);return Math.round(w*C)/C}X.round=u;function l(w,i){i===void 0&&(i="kilometers");var C=X.factors[i];if(!C)throw new Error(i+" units is invalid");return w*C}X.radiansToLength=l;function y(w,i){i===void 0&&(i="kilometers");var C=X.factors[i];if(!C)throw new Error(i+" units is invalid");return w/C}X.lengthToRadians=y;function h(w,i){return f(y(w,i))}X.lengthToDegrees=h;function T(w){var i=w%360;return i<0&&(i+=360),i}X.bearingToAzimuth=T;function f(w){var i=w%(2*Math.PI);return i*180/Math.PI}X.radiansToDegrees=f;function n(w){var i=w%360;return i*Math.PI/180}X.degreesToRadians=n;function v(w,i,C){if(i===void 0&&(i="kilometers"),C===void 0&&(C="kilometers"),!(w>=0))throw new Error("length must be a positive number");return l(y(w,i),C)}X.convertLength=v;function m(w,i,C){if(i===void 0&&(i="meters"),C===void 0&&(C="kilometers"),!(w>=0))throw new Error("area must be a positive number");var x=X.areaFactors[i];if(!x)throw new Error("invalid original units");var k=X.areaFactors[C];if(!k)throw new Error("invalid final units");return w/x*k}X.convertArea=m;function b(w){return!isNaN(w)&&w!==null&&!Array.isArray(w)}X.isNumber=b;function E(w){return!!w&&w.constructor===Object}X.isObject=E;function p(w){if(!w)throw new Error("bbox is required");if(!Array.isArray(w))throw new Error("bbox must be an Array");if(w.length!==4&&w.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");w.forEach(function(i){if(!b(i))throw new Error("bbox must only contain numbers")})}X.validateBBox=p;function S(w){if(!w)throw new Error("id is required");if(["string","number"].indexOf(typeof w)===-1)throw new Error("id must be a number or a string")}X.validateId=S},84880:function(te,X,e){Object.defineProperty(X,"__esModule",{value:!0});var A=e(76796);function P(n,v,m){if(n!==null)for(var b,E,p,S,w,i,C,x=0,k=0,I,B=n.type,_=B==="FeatureCollection",z=B==="Feature",O=_?n.features.length:1,F=0;Fi||_>C||z>x){w=k,i=b,C=_,x=z,p=0;return}var O=A.lineString([w,k],m.properties);if(v(O,b,E,z,p)===!1)return!1;p++,w=k})===!1)return!1}}})}function l(n,v,m){var b=m,E=!1;return u(n,function(p,S,w,i,C){E===!1&&m===void 0?b=p:b=v(b,p,S,w,i,C),E=!0}),b}function y(n,v){if(!n)throw new Error("geojson is required");a(n,function(m,b,E){if(m.geometry!==null){var p=m.geometry.type,S=m.geometry.coordinates;switch(p){case"LineString":if(v(m,b,E,0,0)===!1)return!1;break;case"Polygon":for(var w=0;w=0))throw new Error("precision must be a positive number");var O=Math.pow(10,z||0);return Math.round(_*O)/O}X.round=u;function l(_,z){z===void 0&&(z="kilometers");var O=X.factors[z];if(!O)throw new Error(z+" units is invalid");return _*O}X.radiansToLength=l;function y(_,z){z===void 0&&(z="kilometers");var O=X.factors[z];if(!O)throw new Error(z+" units is invalid");return _/O}X.lengthToRadians=y;function h(_,z){return f(y(_,z))}X.lengthToDegrees=h;function T(_){var z=_%360;return z<0&&(z+=360),z}X.bearingToAzimuth=T;function f(_){var z=_%(2*Math.PI);return z*180/Math.PI}X.radiansToDegrees=f;function n(_){var z=_%360;return z*Math.PI/180}X.degreesToRadians=n;function v(_,z,O){if(z===void 0&&(z="kilometers"),O===void 0&&(O="kilometers"),!(_>=0))throw new Error("length must be a positive number");return l(y(_,z),O)}X.convertLength=v;function m(_,z,O){if(z===void 0&&(z="meters"),O===void 0&&(O="kilometers"),!(_>=0))throw new Error("area must be a positive number");var F=X.areaFactors[z];if(!F)throw new Error("invalid original units");var N=X.areaFactors[O];if(!N)throw new Error("invalid final units");return _/F*N}X.convertArea=m;function b(_){return!isNaN(_)&&_!==null&&!Array.isArray(_)&&!/^\s*$/.test(_)}X.isNumber=b;function E(_){return!!_&&_.constructor===Object}X.isObject=E;function p(_){if(!_)throw new Error("bbox is required");if(!Array.isArray(_))throw new Error("bbox must be an Array");if(_.length!==4&&_.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");_.forEach(function(z){if(!b(z))throw new Error("bbox must only contain numbers")})}X.validateBBox=p;function S(_){if(!_)throw new Error("id is required");if(["string","number"].indexOf(typeof _)===-1)throw new Error("id must be a number or a string")}X.validateId=S;function w(){throw new Error("method has been renamed to `radiansToDegrees`")}X.radians2degrees=w;function i(){throw new Error("method has been renamed to `degreesToRadians`")}X.degrees2radians=i;function C(){throw new Error("method has been renamed to `lengthToDegrees`")}X.distanceToDegrees=C;function x(){throw new Error("method has been renamed to `lengthToRadians`")}X.distanceToRadians=x;function k(){throw new Error("method has been renamed to `radiansToLength`")}X.radiansToDistance=k;function I(){throw new Error("method has been renamed to `bearingToAzimuth`")}X.bearingToAngle=I;function B(){throw new Error("method has been renamed to `convertLength`")}X.convertDistance=B},43752:function(te,X,e){Object.defineProperty(X,"__esModule",{value:!0});var A=e(49840);function P(n,v,m){if(n!==null)for(var b,E,p,S,w,i,C,x=0,k=0,I,B=n.type,_=B==="FeatureCollection",z=B==="Feature",O=_?n.features.length:1,F=0;Fi||_>C||z>x){w=k,i=b,C=_,x=z,p=0;return}var O=A.lineString([w,k],m.properties);if(v(O,b,E,z,p)===!1)return!1;p++,w=k})===!1)return!1}}})}function l(n,v,m){var b=m,E=!1;return u(n,function(p,S,w,i,C){E===!1&&m===void 0?b=p:b=v(b,p,S,w,i,C),E=!0}),b}function y(n,v){if(!n)throw new Error("geojson is required");a(n,function(m,b,E){if(m.geometry!==null){var p=m.geometry.type,S=m.geometry.coordinates;switch(p){case"LineString":if(v(m,b,E,0,0)===!1)return!1;break;case"Polygon":for(var w=0;wL&&(L=e[d]),e[d]1?q-1:0),Z=1;Z1?q-1:0),Z=1;Z1?q-1:0),Z=1;Z1?q-1:0),Z=1;Z"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function c(_,z,O){return a()?c=Reflect.construct:c=function(N,V,j){var $=[null];$.push.apply($,V);var q=Function.bind.apply(N,$),oe=new q;return j&&l(oe,j.prototype),oe},c.apply(null,arguments)}function u(_){return Function.toString.call(_).indexOf("[native code]")!==-1}function l(_,z){return l=Object.setPrototypeOf||function(F,N){return F.__proto__=N,F},l(_,z)}function y(_){return y=Object.setPrototypeOf?Object.getPrototypeOf:function(O){return O.__proto__||Object.getPrototypeOf(O)},y(_)}function h(_){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?h=function(O){return typeof O}:h=function(O){return O&&typeof Symbol=="function"&&O.constructor===Symbol&&O!==Symbol.prototype?"symbol":typeof O},h(_)}var T=e(35840),f=T.inspect,n=e(86832),v=n.codes.ERR_INVALID_ARG_TYPE;function m(_,z,O){return(O===void 0||O>_.length)&&(O=_.length),_.substring(O-z.length,O)===z}function b(_,z){if(z=Math.floor(z),_.length==0||z==0)return"";var O=_.length*z;for(z=Math.floor(Math.log(z)/Math.log(2));z;)_+=_,z--;return _+=_.substring(0,O-_.length),_}var E="",p="",S="",w="",i={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:"},C=10;function x(_){var z=Object.keys(_),O=Object.create(Object.getPrototypeOf(_));return z.forEach(function(F){O[F]=_[F]}),Object.defineProperty(O,"message",{value:_.message}),O}function k(_){return f(_,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function I(_,z,O){var F="",N="",V=0,j="",$=!1,q=k(_),oe=q.split(` `),Z=k(z).split(` `),G=0,re="";if(O==="strictEqual"&&h(_)==="object"&&h(z)==="object"&&_!==null&&z!==null&&(O="strictEqualObject"),oe.length===1&&Z.length===1&&oe[0]!==Z[0]){var H=oe[0].length+Z[0].length;if(H<=C){if((h(_)!=="object"||_===null)&&(h(z)!=="object"||z===null)&&(_!==0||z!==0))return"".concat(i[O],` `)+"".concat(oe[0]," !== ").concat(Z[0],` `)}else if(O!=="strictEqualObject"){var J=A.stderr&&A.stderr.isTTY?A.stderr.columns:80;if(H2&&(re=` `.concat(b(" ",G),"^"),G=0)}}}for(var ae=oe[oe.length-1],K=Z[Z.length-1];ae===K&&(G++<2?j=` `.concat(ae).concat(j):F=ae,oe.pop(),Z.pop(),!(oe.length===0||Z.length===0));)ae=oe[oe.length-1],K=Z[Z.length-1];var Y=Math.max(oe.length,Z.length);if(Y===0){var ie=q.split(` `);if(ie.length>30)for(ie[26]="".concat(E,"...").concat(w);ie.length>27;)ie.pop();return"".concat(i.notIdentical,` `).concat(ie.join(` `),` `)}G>3&&(j=` `.concat(E,"...").concat(w).concat(j),$=!0),F!==""&&(j=` `.concat(F).concat(j),F="");var ne=0,le=i[O]+` `.concat(p,"+ actual").concat(w," ").concat(S,"- expected").concat(w),de=" ".concat(E,"...").concat(w," Lines skipped");for(G=0;G1&&G>2&&(we>4?(N+=` `.concat(E,"...").concat(w),$=!0):we>3&&(N+=` `.concat(Z[G-2]),ne++),N+=` `.concat(Z[G-1]),ne++),V=G,F+=` `.concat(S,"-").concat(w," ").concat(Z[G]),ne++;else if(Z.length1&&G>2&&(we>4?(N+=` `.concat(E,"...").concat(w),$=!0):we>3&&(N+=` `.concat(oe[G-2]),ne++),N+=` `.concat(oe[G-1]),ne++),V=G,N+=` `.concat(p,"+").concat(w," ").concat(oe[G]),ne++;else{var me=Z[G],Le=oe[G],ve=Le!==me&&(!m(Le,",")||Le.slice(0,-1)!==me);ve&&m(me,",")&&me.slice(0,-1)===Le&&(ve=!1,Le+=","),ve?(we>1&&G>2&&(we>4?(N+=` `.concat(E,"...").concat(w),$=!0):we>3&&(N+=` `.concat(oe[G-2]),ne++),N+=` `.concat(oe[G-1]),ne++),V=G,N+=` `.concat(p,"+").concat(w," ").concat(Le),F+=` `.concat(S,"-").concat(w," ").concat(me),ne+=2):(N+=F,F="",(we===1||G===0)&&(N+=` `.concat(Le),ne++))}if(ne>20&&G30)for(G[26]="".concat(E,"...").concat(w);G.length>27;)G.pop();G.length===1?F=g(this,y(z).call(this,"".concat(Z," ").concat(G[0]))):F=g(this,y(z).call(this,"".concat(Z,` `).concat(G.join(` `),` `)))}else{var re=k($),H="",J=i[V];V==="notDeepEqual"||V==="notEqual"?(re="".concat(i[V],` `).concat(re),re.length>1024&&(re="".concat(re.slice(0,1021),"..."))):(H="".concat(k(q)),re.length>512&&(re="".concat(re.slice(0,509),"...")),H.length>512&&(H="".concat(H.slice(0,509),"...")),V==="deepEqual"||V==="equal"?re="".concat(J,` `).concat(re,` should equal `):H=" ".concat(V," ").concat(H)),F=g(this,y(z).call(this,"".concat(re).concat(H)))}return Error.stackTraceLimit=oe,F.generatedMessage=!N,Object.defineProperty(r(F),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),F.code="ERR_ASSERTION",F.actual=$,F.expected=q,F.operator=V,Error.captureStackTrace&&Error.captureStackTrace(r(F),j),F.stack,F.name="AssertionError",g(F)}return d(z,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:f.custom,value:function(F,N){return f(this,P({},N,{customInspect:!1,depth:0}))}}]),z}(s(Error));te.exports=B},86832:function(te,X,e){function A(h){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?A=function(f){return typeof f}:A=function(f){return f&&typeof Symbol=="function"&&f.constructor===Symbol&&f!==Symbol.prototype?"symbol":typeof f},A(h)}function P(h,T){if(!(h instanceof T))throw new TypeError("Cannot call a class as a function")}function o(h,T){return T&&(A(T)==="object"||typeof T=="function")?T:L(h)}function L(h){if(h===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return h}function M(h){return M=Object.setPrototypeOf?Object.getPrototypeOf:function(f){return f.__proto__||Object.getPrototypeOf(f)},M(h)}function d(h,T){if(typeof T!="function"&&T!==null)throw new TypeError("Super expression must either be null or a function");h.prototype=Object.create(T&&T.prototype,{constructor:{value:h,writable:!0,configurable:!0}}),T&&g(h,T)}function g(h,T){return g=Object.setPrototypeOf||function(n,v){return n.__proto__=v,n},g(h,T)}var r={},t,s;function a(h,T,f){f||(f=Error);function n(m,b,E){return typeof T=="string"?T:T(m,b,E)}var v=function(m){d(b,m);function b(E,p,S){var w;return P(this,b),w=o(this,M(b).call(this,n(E,p,S))),w.code=h,w}return b}(f);r[h]=v}function c(h,T){if(Array.isArray(h)){var f=h.length;return h=h.map(function(n){return String(n)}),f>2?"one of ".concat(T," ").concat(h.slice(0,f-1).join(", "),", or ")+h[f-1]:f===2?"one of ".concat(T," ").concat(h[0]," or ").concat(h[1]):"of ".concat(T," ").concat(h[0])}else return"of ".concat(T," ").concat(String(h))}function u(h,T,f){return h.substr(0,T.length)===T}function l(h,T,f){return(f===void 0||f>h.length)&&(f=h.length),h.substring(f-T.length,f)===T}function y(h,T,f){return typeof f!="number"&&(f=0),f+T.length>h.length?!1:h.indexOf(T,f)!==-1}a("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),a("ERR_INVALID_ARG_TYPE",function(h,T,f){t===void 0&&(t=e(45408)),t(typeof h=="string","'name' must be a string");var n;typeof T=="string"&&u(T,"not ")?(n="must not be",T=T.replace(/^not /,"")):n="must be";var v;if(l(h," argument"))v="The ".concat(h," ").concat(n," ").concat(c(T,"type"));else{var m=y(h,".")?"property":"argument";v='The "'.concat(h,'" ').concat(m," ").concat(n," ").concat(c(T,"type"))}return v+=". Received type ".concat(A(f)),v},TypeError),a("ERR_INVALID_ARG_VALUE",function(h,T){var f=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";s===void 0&&(s=e(35840));var n=s.inspect(T);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(h,"' ").concat(f,". Received ").concat(n)},TypeError),a("ERR_INVALID_RETURN_VALUE",function(h,T,f){var n;return f&&f.constructor&&f.constructor.name?n="instance of ".concat(f.constructor.name):n="type ".concat(A(f)),"Expected ".concat(h,' to be returned from the "').concat(T,'"')+" function but got ".concat(n,".")},TypeError),a("ERR_MISSING_ARGS",function(){for(var h=arguments.length,T=new Array(h),f=0;f0,"At least one arg needs to be specified");var n="The ",v=T.length;switch(T=T.map(function(m){return'"'.concat(m,'"')}),v){case 1:n+="".concat(T[0]," argument");break;case 2:n+="".concat(T[0]," and ").concat(T[1]," arguments");break;default:n+=T.slice(0,v-1).join(", "),n+=", and ".concat(T[v-1]," arguments");break}return"".concat(n," must be specified")},TypeError),te.exports.codes=r},25116:function(te,X,e){function A(ve,Ae){return o(ve)||P(ve,Ae)}function P(ve,Ae){var ye=[],Se=!0,_e=!1,ze=void 0;try{for(var Ie=ve[Symbol.iterator](),Ne;!(Se=(Ne=Ie.next()).done)&&(ye.push(Ne.value),!(Ae&&ye.length===Ae));Se=!0);}catch(et){_e=!0,ze=et}finally{try{!Se&&Ie.return!=null&&Ie.return()}finally{if(_e)throw ze}}return ye}function o(ve){if(Array.isArray(ve))return ve}function L(ve){return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?L=function(ye){return typeof ye}:L=function(ye){return ye&&typeof Symbol=="function"&&ye.constructor===Symbol&&ye!==Symbol.prototype?"symbol":typeof ye},L(ve)}var M=/a/g.flags!==void 0,d=function(Ae){var ye=[];return Ae.forEach(function(Se){return ye.push(Se)}),ye},g=function(Ae){var ye=[];return Ae.forEach(function(Se,_e){return ye.push([_e,Se])}),ye},r=Object.is?Object.is:e(39896),t=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},s=Number.isNaN?Number.isNaN:e(1560);function a(ve){return ve.call.bind(ve)}var c=a(Object.prototype.hasOwnProperty),u=a(Object.prototype.propertyIsEnumerable),l=a(Object.prototype.toString),y=e(35840).types,h=y.isAnyArrayBuffer,T=y.isArrayBufferView,f=y.isDate,n=y.isMap,v=y.isRegExp,m=y.isSet,b=y.isNativeError,E=y.isBoxedPrimitive,p=y.isNumberObject,S=y.isStringObject,w=y.isBooleanObject,i=y.isBigIntObject,C=y.isSymbolObject,x=y.isFloat32Array,k=y.isFloat64Array;function I(ve){if(ve.length===0||ve.length>10)return!0;for(var Ae=0;Ae57)return!0}return ve.length===10&&ve>=Math.pow(2,32)}function B(ve){return Object.keys(ve).filter(I).concat(t(ve).filter(Object.prototype.propertyIsEnumerable.bind(ve)))}/*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */function _(ve,Ae){if(ve===Ae)return 0;for(var ye=ve.length,Se=Ae.length,_e=0,ze=Math.min(ye,Se);_e"u"?[]:new Uint8Array(256),o=0;o>2],s+=A[(g[r]&3)<<4|g[r+1]>>4],s+=A[(g[r+1]&15)<<2|g[r+2]>>6],s+=A[g[r+2]&63];return t%3===2?s=s.substring(0,s.length-1)+"=":t%3===1&&(s=s.substring(0,s.length-2)+"=="),s},M=function(d){var g=d.length*.75,r=d.length,t,s=0,a,c,u,l;d[d.length-1]==="="&&(g--,d[d.length-2]==="="&&g--);var y=new ArrayBuffer(g),h=new Uint8Array(y);for(t=0;t>4,h[s++]=(c&15)<<4|u>>2,h[s++]=(u&3)<<6|l&63;return y}},59968:function(te,X){X.byteLength=g,X.toByteArray=t,X.fromByteArray=c;for(var e=[],A=[],P=typeof Uint8Array<"u"?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",L=0,M=o.length;L0)throw new Error("Invalid string. Length must be a multiple of 4");var y=u.indexOf("=");y===-1&&(y=l);var h=y===l?0:4-y%4;return[y,h]}function g(u){var l=d(u),y=l[0],h=l[1];return(y+h)*3/4-h}function r(u,l,y){return(l+y)*3/4-y}function t(u){var l,y=d(u),h=y[0],T=y[1],f=new P(r(u,h,T)),n=0,v=T>0?h-4:h,m;for(m=0;m>16&255,f[n++]=l>>8&255,f[n++]=l&255;return T===2&&(l=A[u.charCodeAt(m)]<<2|A[u.charCodeAt(m+1)]>>4,f[n++]=l&255),T===1&&(l=A[u.charCodeAt(m)]<<10|A[u.charCodeAt(m+1)]<<4|A[u.charCodeAt(m+2)]>>2,f[n++]=l>>8&255,f[n++]=l&255),f}function s(u){return e[u>>18&63]+e[u>>12&63]+e[u>>6&63]+e[u&63]}function a(u,l,y){for(var h,T=[],f=l;fv?v:n+f));return h===1?(l=u[y-1],T.push(e[l>>2]+e[l<<4&63]+"==")):h===2&&(l=(u[y-2]<<8)+u[y-1],T.push(e[l>>10]+e[l>>4&63]+e[l<<2&63]+"=")),T.join("")}},64928:function(te){function X(M,d,g,r,t){for(var s=t+1;r<=t;){var a=r+t>>>1,c=M[a],u=g!==void 0?g(c,d):c-d;u>=0?(s=a,t=a-1):r=a+1}return s}function e(M,d,g,r,t){for(var s=t+1;r<=t;){var a=r+t>>>1,c=M[a],u=g!==void 0?g(c,d):c-d;u>0?(s=a,t=a-1):r=a+1}return s}function A(M,d,g,r,t){for(var s=r-1;r<=t;){var a=r+t>>>1,c=M[a],u=g!==void 0?g(c,d):c-d;u<0?(s=a,r=a+1):t=a-1}return s}function P(M,d,g,r,t){for(var s=r-1;r<=t;){var a=r+t>>>1,c=M[a],u=g!==void 0?g(c,d):c-d;u<=0?(s=a,r=a+1):t=a-1}return s}function o(M,d,g,r,t){for(;r<=t;){var s=r+t>>>1,a=M[s],c=g!==void 0?g(a,d):a-d;if(c===0)return s;c<=0?r=s+1:t=s-1}return-1}function L(M,d,g,r,t,s){return typeof g=="function"?s(M,d,g,r===void 0?0:r|0,t===void 0?M.length-1:t|0):s(M,d,void 0,g===void 0?0:g|0,r===void 0?M.length-1:r|0)}te.exports={ge:function(M,d,g,r,t){return L(M,d,g,r,t,X)},gt:function(M,d,g,r,t){return L(M,d,g,r,t,e)},lt:function(M,d,g,r,t){return L(M,d,g,r,t,A)},le:function(M,d,g,r,t){return L(M,d,g,r,t,P)},eq:function(M,d,g,r,t){return L(M,d,g,r,t,o)}}},308:function(te,X){"use restrict";var e=32;X.INT_BITS=e,X.INT_MAX=2147483647,X.INT_MIN=-1<0)-(o<0)},X.abs=function(o){var L=o>>e-1;return(o^L)-L},X.min=function(o,L){return L^(o^L)&-(o65535)<<4,o>>>=L,M=(o>255)<<3,o>>>=M,L|=M,M=(o>15)<<2,o>>>=M,L|=M,M=(o>3)<<1,o>>>=M,L|=M,L|o>>1},X.log10=function(o){return o>=1e9?9:o>=1e8?8:o>=1e7?7:o>=1e6?6:o>=1e5?5:o>=1e4?4:o>=1e3?3:o>=100?2:o>=10?1:0},X.popCount=function(o){return o=o-(o>>>1&1431655765),o=(o&858993459)+(o>>>2&858993459),(o+(o>>>4)&252645135)*16843009>>>24};function A(o){var L=32;return o&=-o,o&&L--,o&65535&&(L-=16),o&16711935&&(L-=8),o&252645135&&(L-=4),o&858993459&&(L-=2),o&1431655765&&(L-=1),L}X.countTrailingZeros=A,X.nextPow2=function(o){return o+=o===0,--o,o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o+1},X.prevPow2=function(o){return o|=o>>>1,o|=o>>>2,o|=o>>>4,o|=o>>>8,o|=o>>>16,o-(o>>>1)},X.parity=function(o){return o^=o>>>16,o^=o>>>8,o^=o>>>4,o&=15,27030>>>o&1};var P=new Array(256);(function(o){for(var L=0;L<256;++L){var M=L,d=L,g=7;for(M>>>=1;M;M>>>=1)d<<=1,d|=M&1,--g;o[L]=d<>>8&255]<<16|P[o>>>16&255]<<8|P[o>>>24&255]},X.interleave2=function(o,L){return o&=65535,o=(o|o<<8)&16711935,o=(o|o<<4)&252645135,o=(o|o<<2)&858993459,o=(o|o<<1)&1431655765,L&=65535,L=(L|L<<8)&16711935,L=(L|L<<4)&252645135,L=(L|L<<2)&858993459,L=(L|L<<1)&1431655765,o|L<<1},X.deinterleave2=function(o,L){return o=o>>>L&1431655765,o=(o|o>>>1)&858993459,o=(o|o>>>2)&252645135,o=(o|o>>>4)&16711935,o=(o|o>>>16)&65535,o<<16>>16},X.interleave3=function(o,L,M){return o&=1023,o=(o|o<<16)&4278190335,o=(o|o<<8)&251719695,o=(o|o<<4)&3272356035,o=(o|o<<2)&1227133513,L&=1023,L=(L|L<<16)&4278190335,L=(L|L<<8)&251719695,L=(L|L<<4)&3272356035,L=(L|L<<2)&1227133513,o|=L<<1,M&=1023,M=(M|M<<16)&4278190335,M=(M|M<<8)&251719695,M=(M|M<<4)&3272356035,M=(M|M<<2)&1227133513,o|M<<2},X.deinterleave3=function(o,L){return o=o>>>L&1227133513,o=(o|o>>>2)&3272356035,o=(o|o>>>4)&251719695,o=(o|o>>>8)&4278190335,o=(o|o>>>16)&1023,o<<22>>22},X.nextCombination=function(o){var L=o|o-1;return L+1|(~L&-~L)-1>>>A(o)+1}},29620:function(te,X,e){var A=e(32420);te.exports=o;var P=1e20;function o(d,g){g||(g={});var r=g.cutoff==null?.25:g.cutoff,t=g.radius==null?8:g.radius,s=g.channel||0,a,c,u,l,y,h,T,f,n,v,m;if(ArrayBuffer.isView(d)||Array.isArray(d)){if(!g.width||!g.height)throw Error("For raw data width and height should be provided by options");a=g.width,c=g.height,l=d,g.stride?h=g.stride:h=Math.floor(d.length/a/c)}else window.HTMLCanvasElement&&d instanceof window.HTMLCanvasElement?(f=d,T=f.getContext("2d"),a=f.width,c=f.height,n=T.getImageData(0,0,a,c),l=n.data,h=4):window.CanvasRenderingContext2D&&d instanceof window.CanvasRenderingContext2D?(f=d.canvas,T=d,a=f.width,c=f.height,n=T.getImageData(0,0,a,c),l=n.data,h=4):window.ImageData&&d instanceof window.ImageData&&(n=d,a=d.width,c=d.height,l=n.data,h=4);if(u=Math.max(a,c),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(y=l,l=Array(a*c),v=0,m=y.length;v-1?P(g):g}},57916:function(te,X,e){var A=e(8844),P=e(53664),o=e(14500),L=P("%TypeError%"),M=P("%Function.prototype.apply%"),d=P("%Function.prototype.call%"),g=P("%Reflect.apply%",!0)||A.call(d,M),r=P("%Object.defineProperty%",!0),t=P("%Math.max%");if(r)try{r({},"a",{value:1})}catch{r=null}te.exports=function(c){if(typeof c!="function")throw new L("a function is required");var u=g(A,d,arguments);return o(u,1+t(0,c.length-(arguments.length-1)),!0)};var s=function(){return g(A,M,arguments)};r?r(te.exports,"apply",{value:s}):te.exports.apply=s},32420:function(te){te.exports=X;function X(e,A,P){return AP?P:e:eA?A:e}},3808:function(te,X,e){var A=e(32420);te.exports=P,te.exports.to=P,te.exports.from=o;function P(L,M){M==null&&(M=!0);var d=L[0],g=L[1],r=L[2],t=L[3];t==null&&(t=M?1:255),M&&(d*=255,g*=255,r*=255,t*=255),d=A(d,0,255)&255,g=A(g,0,255)&255,r=A(r,0,255)&255,t=A(t,0,255)&255;var s=d*16777216+(g<<16)+(r<<8)+t;return s}function o(L,M){L=+L;var d=L>>>24,g=(L&16711680)>>>16,r=(L&65280)>>>8,t=L&255;return M===!1?[d,g,r,t]:[d/255,g/255,r/255,t/255]}},17592:function(te){te.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},72160:function(te,X,e){var A=e(96824),P=e(32420),o=e(72512);te.exports=function(d,g){(g==="float"||!g)&&(g="array"),g==="uint"&&(g="uint8"),g==="uint_clamped"&&(g="uint8_clamped");var r=o(g),t=new r(4),s=g!=="uint8"&&g!=="uint8_clamped";return(!d.length||typeof d=="string")&&(d=A(d),d[0]/=255,d[1]/=255,d[2]/=255),L(d)?(t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=d[3]!=null?d[3]:255,s&&(t[0]/=255,t[1]/=255,t[2]/=255,t[3]/=255),t):(s?(t[0]=d[0],t[1]=d[1],t[2]=d[2],t[3]=d[3]!=null?d[3]:1):(t[0]=P(Math.floor(d[0]*255),0,255),t[1]=P(Math.floor(d[1]*255),0,255),t[2]=P(Math.floor(d[2]*255),0,255),t[3]=d[3]==null?255:P(Math.floor(d[3]*255),0,255)),t)};function L(M){return!!(M instanceof Uint8Array||M instanceof Uint8ClampedArray||Array.isArray(M)&&(M[0]>1||M[0]===0)&&(M[1]>1||M[1]===0)&&(M[2]>1||M[2]===0)&&(!M[3]||M[3]>1))}},96824:function(te,X,e){var A=e(95532),P=e(53576),o=e(32420);te.exports=function(M){var d,g=A(M);return g.space?(d=Array(3),d[0]=o(g.values[0],0,255),d[1]=o(g.values[1],0,255),d[2]=o(g.values[2],0,255),g.space[0]==="h"&&(d=P.rgb(d)),d.push(o(g.alpha,0,1)),d):[]}},95532:function(te,X,e){var A=e(17592);te.exports=o;var P={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function o(L){var M,d=[],g=1,r;if(typeof L=="string")if(L=L.toLowerCase(),A[L])d=A[L].slice(),r="rgb";else if(L==="transparent")g=0,r="rgb",d=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(L)){var t=L.slice(1),s=t.length,a=s<=4;g=1,a?(d=[parseInt(t[0]+t[0],16),parseInt(t[1]+t[1],16),parseInt(t[2]+t[2],16)],s===4&&(g=parseInt(t[3]+t[3],16)/255)):(d=[parseInt(t[0]+t[1],16),parseInt(t[2]+t[3],16),parseInt(t[4]+t[5],16)],s===8&&(g=parseInt(t[6]+t[7],16)/255)),d[0]||(d[0]=0),d[1]||(d[1]=0),d[2]||(d[2]=0),r="rgb"}else if(M=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(L)){var c=M[1],u=c==="rgb",t=c.replace(/a$/,"");r=t;var s=t==="cmyk"?4:t==="gray"?1:3;d=M[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(h,T){if(/%$/.test(h))return T===s?parseFloat(h)/100:t==="rgb"?parseFloat(h)*255/100:parseFloat(h);if(t[T]==="h"){if(/deg$/.test(h))return parseFloat(h);if(P[h]!==void 0)return P[h]}return parseFloat(h)}),c===t&&d.push(1),g=u||d[s]===void 0?1:d[s],d=d.slice(0,s)}else L.length>10&&/[0-9](?:\s|\/)/.test(L)&&(d=L.match(/([0-9]+)/g).map(function(l){return parseFloat(l)}),r=L.match(/([a-z])/ig).join("").toLowerCase());else isNaN(L)?Array.isArray(L)||L.length?(d=[L[0],L[1],L[2]],r="rgb",g=L.length===4?L[3]:1):L instanceof Object&&(L.r!=null||L.red!=null||L.R!=null?(r="rgb",d=[L.r||L.red||L.R||0,L.g||L.green||L.G||0,L.b||L.blue||L.B||0]):(r="hsl",d=[L.h||L.hue||L.H||0,L.s||L.saturation||L.S||0,L.l||L.lightness||L.L||L.b||L.brightness]),g=L.a||L.alpha||L.opacity||1,L.opacity!=null&&(g/=100)):(r="rgb",d=[L>>>16,(L&65280)>>>8,L&255]);return{space:r,values:d,alpha:g}}},53576:function(te,X,e){var A=e(19336);te.exports={name:"hsl",min:[0,0,0],max:[360,100,100],channel:["hue","saturation","lightness"],alias:["HSL"],rgb:function(P){var o=P[0]/360,L=P[1]/100,M=P[2]/100,d,g,r,t,s;if(L===0)return s=M*255,[s,s,s];M<.5?g=M*(1+L):g=M+L-M*L,d=2*M-g,t=[0,0,0];for(var a=0;a<3;a++)r=o+.3333333333333333*-(a-1),r<0?r++:r>1&&r--,6*r<1?s=d+(g-d)*6*r:2*r<1?s=g:3*r<2?s=d+(g-d)*(.6666666666666666-r)*6:s=d,t[a]=s*255;return t}},A.hsl=function(P){var o=P[0]/255,L=P[1]/255,M=P[2]/255,d=Math.min(o,L,M),g=Math.max(o,L,M),r=g-d,t,s,a;return g===d?t=0:o===g?t=(L-M)/r:L===g?t=2+(M-o)/r:M===g&&(t=4+(o-L)/r),t=Math.min(t*60,360),t<0&&(t+=360),a=(d+g)/2,g===d?s=0:a<=.5?s=r/(g+d):s=r/(2-g-d),[t,s*100,a*100]}},19336:function(te){te.exports={name:"rgb",min:[0,0,0],max:[255,255,255],channel:["red","green","blue"],alias:["RGB"]}},36116:function(te){te.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|ç)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|é)union",ROU:"r(o|u|ou)mania",RUS:"\\brussia|soviet.?union|u\\.?s\\.?s\\.?r|socialist.?republics",RWA:"rwanda",BLM:"barth(e|é)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|ã)o.?tom(e|é)",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"}},42771:function(te,X,e){te.exports={parse:e(46416),stringify:e(49395)}},8744:function(te,X,e){var A=e(30584);te.exports={isSize:function(o){return/^[\d\.]/.test(o)||o.indexOf("/")!==-1||A.indexOf(o)!==-1}}},46416:function(te,X,e){var A=e(92384),P=e(68194),o=e(3748),L=e(2904),M=e(47916),d=e(7294),g=e(39956),r=e(8744).isSize;te.exports=s;var t=s.cache={};function s(c){if(typeof c!="string")throw new Error("Font argument must be a string.");if(t[c])return t[c];if(c==="")throw new Error("Cannot parse an empty string.");if(o.indexOf(c)!==-1)return t[c]={system:c};for(var u={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},l=g(c,/\s+/),y;y=l.shift();){if(P.indexOf(y)!==-1)return["style","variant","weight","stretch"].forEach(function(T){u[T]=y}),t[c]=u;if(M.indexOf(y)!==-1){u.style=y;continue}if(y==="normal"||y==="small-caps"){u.variant=y;continue}if(d.indexOf(y)!==-1){u.stretch=y;continue}if(L.indexOf(y)!==-1){u.weight=y;continue}if(r(y)){var h=g(y,"/");if(u.size=h[0],h[1]!=null?u.lineHeight=a(h[1]):l[0]==="/"&&(l.shift(),u.lineHeight=a(l.shift())),!l.length)throw new Error("Missing required font-family.");return u.family=g(l.join(" "),/\s*,\s*/).map(A),t[c]=u}throw new Error("Unknown or unsupported font token: "+y)}throw new Error("Missing required font-size.")}function a(c){var u=parseFloat(c);return u.toString()===c?u:c}},49395:function(te,X,e){var A=e(55616),P=e(8744).isSize,o=c(e(68194)),L=c(e(3748)),M=c(e(2904)),d=c(e(47916)),g=c(e(7294)),r={normal:1,"small-caps":1},t={serif:1,"sans-serif":1,monospace:1,cursive:1,fantasy:1,"system-ui":1},s={style:"normal",variant:"normal",weight:"normal",stretch:"normal",size:"1rem",lineHeight:"normal",family:"serif"};te.exports=function(l){if(l=A(l,{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"}),l.system)return l.system&&a(l.system,L),l.system;if(a(l.style,d),a(l.variant,r),a(l.weight,M),a(l.stretch,g),l.size==null&&(l.size=s.size),typeof l.size=="number"&&(l.size+="px"),!P)throw Error("Bad size value `"+l.size+"`");l.family||(l.family=s.family),Array.isArray(l.family)&&(l.family.length||(l.family=[s.family]),l.family=l.family.map(function(h){return t[h]?h:'"'+h+'"'}).join(", "));var y=[];return y.push(l.style),l.variant!==l.style&&y.push(l.variant),l.weight!==l.variant&&l.weight!==l.style&&y.push(l.weight),l.stretch!==l.weight&&l.stretch!==l.variant&&l.stretch!==l.style&&y.push(l.stretch),y.push(l.size+(l.lineHeight==null||l.lineHeight==="normal"||l.lineHeight+""=="1"?"":"/"+l.lineHeight)),y.push(l.family),y.filter(Boolean).join(" ")};function a(u,l){if(u&&!l[u]&&!o[u])throw Error("Unknown keyword `"+u+"`");return u}function c(u){for(var l={},y=0;yc?1:a>=c?0:NaN}function P(a){return a.length===1&&(a=o(a)),{left:function(c,u,l,y){for(l==null&&(l=0),y==null&&(y=c.length);l>>1;a(c[h],u)<0?l=h+1:y=h}return l},right:function(c,u,l,y){for(l==null&&(l=0),y==null&&(y=c.length);l>>1;a(c[h],u)>0?y=h:l=h+1}return l}}}function o(a){return function(c,u){return A(a(c),u)}}P(A);function L(a,c){var u=a.length,l=-1,y,h;if(c==null){for(;++l=y)for(h=y;++lh&&(h=y)}else for(;++l=y)for(h=y;++lh&&(h=y);return h}function M(a){return a===null?NaN:+a}function d(a,c){var u=a.length,l=u,y=-1,h,T=0;if(c==null)for(;++y=0;)for(T=a[c],u=T.length;--u>=0;)h[--y]=T[u];return h}function r(a,c){var u=a.length,l=-1,y,h;if(c==null){for(;++l=y)for(h=y;++ly&&(h=y)}else for(;++l=y)for(h=y;++ly&&(h=y);return h}function t(a,c,u){a=+a,c=+c,u=(y=arguments.length)<2?(c=a,a=0,1):y<3?1:+u;for(var l=-1,y=Math.max(0,Math.ceil((c-a)/u))|0,h=new Array(y);++l=c.length)return l!=null&&n.sort(l),y!=null?y(n):n;for(var E=-1,p=n.length,S=c[v++],w,i,C=L(),x,k=m();++Ec.length)return n;var m,b=u[v-1];return y!=null&&v>=c.length?m=n.entries():(m=[],n.each(function(E,p){m.push({key:p,values:f(E,v)})})),b!=null?m.sort(function(E,p){return b(E.key,p.key)}):m}return h={object:function(n){return T(n,0,d,g)},map:function(n){return T(n,0,r,t)},entries:function(n){return f(T(n,0,r,t),0)},key:function(n){return c.push(n),h},sortKeys:function(n){return u[c.length-1]=n,h},sortValues:function(n){return l=n,h},rollup:function(n){return y=n,h}}}function d(){return{}}function g(c,u,l){c[u]=l}function r(){return L()}function t(c,u,l){c.set(u,l)}function s(){}var a=L.prototype;s.prototype={constructor:s,has:a.has,add:function(c){return c+="",this[A+c]=c,this},remove:a.remove,clear:a.clear,values:a.keys,size:a.size,empty:a.empty,each:a.each}},49812:function(te,X,e){e.r(X),e.d(X,{forceCenter:function(){return A},forceCollide:function(){return C},forceLink:function(){return B},forceManyBody:function(){return Ne},forceRadial:function(){return et},forceSimulation:function(){return Ie},forceX:function(){return st},forceY:function(){return Ze}});function A(Ke,nt){var it;Ke==null&&(Ke=0),nt==null&&(nt=0);function lt(){var vt,xt=it.length,Je,Pe=0,Ue=0;for(vt=0;vt=(Ce=(Pe+He)/2))?Pe=Ce:He=Ce,(ke=it>=(ge=(Ue+Oe)/2))?Ue=ge:Oe=ge,vt=xt,!(xt=xt[Ve=ke<<1|be]))return vt[Ve]=Je,Ke;if(pe=+Ke._x.call(null,xt.data),Te=+Ke._y.call(null,xt.data),nt===pe&&it===Te)return Je.next=xt,vt?vt[Ve]=Je:Ke._root=Je,Ke;do vt=vt?vt[Ve]=new Array(4):Ke._root=new Array(4),(be=nt>=(Ce=(Pe+He)/2))?Pe=Ce:He=Ce,(ke=it>=(ge=(Ue+Oe)/2))?Ue=ge:Oe=ge;while((Ve=ke<<1|be)===(je=(Te>=ge)<<1|pe>=Ce));return vt[je]=xt,vt[Ve]=Je,Ke}function d(Ke){var nt,it,lt=Ke.length,vt,xt,Je=new Array(lt),Pe=new Array(lt),Ue=1/0,He=1/0,Oe=-1/0,Ce=-1/0;for(it=0;itOe&&(Oe=vt),xtCe&&(Ce=xt));if(Ue>Oe||He>Ce)return this;for(this.cover(Ue,He).cover(Oe,Ce),it=0;itKe||Ke>=vt||lt>nt||nt>=xt;)switch(He=(ntOe||(Pe=Te.y0)>Ce||(Ue=Te.x1)=Ve)<<1|Ke>=ke)&&(Te=ge[ge.length-1],ge[ge.length-1]=ge[ge.length-1-be],ge[ge.length-1-be]=Te)}else{var je=Ke-+this._x.call(null,pe.data),at=nt-+this._y.call(null,pe.data),ut=je*je+at*at;if(ut=(ge=(Je+Ue)/2))?Je=ge:Ue=ge,(be=Ce>=(pe=(Pe+He)/2))?Pe=pe:He=pe,nt=it,!(it=it[ke=be<<1|Te]))return this;if(!it.length)break;(nt[ke+1&3]||nt[ke+2&3]||nt[ke+3&3])&&(lt=nt,Ve=ke)}for(;it.data!==Ke;)if(vt=it,!(it=it.next))return this;return(xt=it.next)&&delete it.next,vt?(xt?vt.next=xt:delete vt.next,this):nt?(xt?nt[ke]=xt:delete nt[ke],(it=nt[0]||nt[1]||nt[2]||nt[3])&&it===(nt[3]||nt[2]||nt[1]||nt[0])&&!it.length&&(lt?lt[Ve]=it:this._root=it),this):(this._root=xt,this)}function u(Ke){for(var nt=0,it=Ke.length;ntCe.index){var gr=ge-gt.x-gt.vx,ht=pe-gt.y-gt.vy,Ht=gr*gr+ht*ht;Htge+Yt||Ntpe+Yt||VtUe.r&&(Ue.r=Ue[He].r)}function Pe(){if(nt){var Ue,He=nt.length,Oe;for(it=new Array(He),Ue=0;Ue=0&&(lt=it.slice(vt+1),it=it.slice(0,vt)),it&&!nt.hasOwnProperty(it))throw new Error("unknown type: "+it);return{type:it,name:lt}})}O.prototype=z.prototype={constructor:O,on:function(Ke,nt){var it=this._,lt=F(Ke+"",it),vt,xt=-1,Je=lt.length;if(arguments.length<2){for(;++xt0)for(var it=new Array(vt),lt=0,vt,xt;lt=0&&Ke._call.call(null,nt),Ke=Ke._next;--$}function me(){J=(H=K.now())+ae,$=q=0;try{we()}finally{$=0,ve(),J=0}}function Le(){var Ke=K.now(),nt=Ke-H;nt>Z&&(ae-=nt,H=Ke)}function ve(){for(var Ke,nt=G,it,lt=1/0;nt;)nt._call?(lt>nt._time&&(lt=nt._time),Ke=nt,nt=nt._next):(it=nt._next,nt._next=null,nt=Ke?Ke._next=it:G=it);re=Ke,Ae(lt)}function Ae(Ke){if(!$){q&&(q=clearTimeout(q));var nt=Ke-J;nt>24?(Ke<1/0&&(q=setTimeout(me,Ke-K.now()-ae)),oe&&(oe=clearInterval(oe))):(oe||(H=K.now(),oe=setInterval(Le,Z)),$=1,Y(me))}}function ye(Ke){return Ke.x}function Se(Ke){return Ke.y}var _e=10,ze=Math.PI*(3-Math.sqrt(5));function Ie(Ke){var nt,it=1,lt=.001,vt=1-Math.pow(lt,1/300),xt=0,Je=.6,Pe=(0,x.kH)(),Ue=de(Oe),He=j("tick","end");Ke==null&&(Ke=[]);function Oe(){Ce(),He.call("tick",nt),it1?(be==null?Pe.remove(Te):Pe.set(Te,pe(be)),nt):Pe.get(Te)},find:function(Te,be,ke){var Ve=0,je=Ke.length,at,ut,Nt,Vt,gt;for(ke==null?ke=1/0:ke*=ke,Ve=0;Ve1?(He.on(Te,be),nt):He.on(Te)}}}function Ne(){var Ke,nt,it,lt=P(-30),vt,xt=1,Je=1/0,Pe=.81;function Ue(ge){var pe,Te=Ke.length,be=b(Ke,ye,Se).visitAfter(Oe);for(it=ge,pe=0;pe=Je)return;(ge.data!==nt||ge.next)&&(ke===0&&(ke=o(),at+=ke*ke),Ve===0&&(Ve=o(),at+=Ve*Ve),at=1e21?m.toLocaleString("en").replace(/,/g,""):m.toString(10)}function P(m,b){if((E=(m=b?m.toExponential(b-1):m.toExponential()).indexOf("e"))<0)return null;var E,p=m.slice(0,E);return[p.length>1?p[0]+p.slice(2):p,+m.slice(E+1)]}function o(m){return m=P(Math.abs(m)),m?m[1]:NaN}function L(m,b){return function(E,p){for(var S=E.length,w=[],i=0,C=m[0],x=0;S>0&&C>0&&(x+C+1>p&&(C=Math.max(1,p-x)),w.push(E.substring(S-=C,S+C)),!((x+=C+1)>p));)C=m[i=(i+1)%m.length];return w.reverse().join(b)}}function M(m){return function(b){return b.replace(/[0-9]/g,function(E){return m[+E]})}}var d=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function g(m){if(!(b=d.exec(m)))throw new Error("invalid format: "+m);var b;return new r({fill:b[1],align:b[2],sign:b[3],symbol:b[4],zero:b[5],width:b[6],comma:b[7],precision:b[8]&&b[8].slice(1),trim:b[9],type:b[10]})}g.prototype=r.prototype;function r(m){this.fill=m.fill===void 0?" ":m.fill+"",this.align=m.align===void 0?">":m.align+"",this.sign=m.sign===void 0?"-":m.sign+"",this.symbol=m.symbol===void 0?"":m.symbol+"",this.zero=!!m.zero,this.width=m.width===void 0?void 0:+m.width,this.comma=!!m.comma,this.precision=m.precision===void 0?void 0:+m.precision,this.trim=!!m.trim,this.type=m.type===void 0?"":m.type+""}r.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function t(m){e:for(var b=m.length,E=1,p=-1,S;E0&&(p=0);break}return p>0?m.slice(0,p)+m.slice(S+1):m}var s;function a(m,b){var E=P(m,b);if(!E)return m+"";var p=E[0],S=E[1],w=S-(s=Math.max(-8,Math.min(8,Math.floor(S/3)))*3)+1,i=p.length;return w===i?p:w>i?p+new Array(w-i+1).join("0"):w>0?p.slice(0,w)+"."+p.slice(w):"0."+new Array(1-w).join("0")+P(m,Math.max(0,b+w-1))[0]}function c(m,b){var E=P(m,b);if(!E)return m+"";var p=E[0],S=E[1];return S<0?"0."+new Array(-S).join("0")+p:p.length>S+1?p.slice(0,S+1)+"."+p.slice(S+1):p+new Array(S-p.length+2).join("0")}var u={"%":function(m,b){return(m*100).toFixed(b)},b:function(m){return Math.round(m).toString(2)},c:function(m){return m+""},d:A,e:function(m,b){return m.toExponential(b)},f:function(m,b){return m.toFixed(b)},g:function(m,b){return m.toPrecision(b)},o:function(m){return Math.round(m).toString(8)},p:function(m,b){return c(m*100,b)},r:c,s:a,X:function(m){return Math.round(m).toString(16).toUpperCase()},x:function(m){return Math.round(m).toString(16)}};function l(m){return m}var y=Array.prototype.map,h=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function T(m){var b=m.grouping===void 0||m.thousands===void 0?l:L(y.call(m.grouping,Number),m.thousands+""),E=m.currency===void 0?"":m.currency[0]+"",p=m.currency===void 0?"":m.currency[1]+"",S=m.decimal===void 0?".":m.decimal+"",w=m.numerals===void 0?l:M(y.call(m.numerals,String)),i=m.percent===void 0?"%":m.percent+"",C=m.minus===void 0?"-":m.minus+"",x=m.nan===void 0?"NaN":m.nan+"";function k(B){B=g(B);var _=B.fill,z=B.align,O=B.sign,F=B.symbol,N=B.zero,V=B.width,j=B.comma,$=B.precision,q=B.trim,oe=B.type;oe==="n"?(j=!0,oe="g"):u[oe]||($===void 0&&($=12),q=!0,oe="g"),(N||_==="0"&&z==="=")&&(N=!0,_="0",z="=");var Z=F==="$"?E:F==="#"&&/[boxX]/.test(oe)?"0"+oe.toLowerCase():"",G=F==="$"?p:/[%p]/.test(oe)?i:"",re=u[oe],H=/[defgprs%]/.test(oe);$=$===void 0?6:/[gprs]/.test(oe)?Math.max(1,Math.min(21,$)):Math.max(0,Math.min(20,$));function J(ae){var K=Z,Y=G,ie,ne,le;if(oe==="c")Y=re(ae)+Y,ae="";else{ae=+ae;var de=ae<0||1/ae<0;if(ae=isNaN(ae)?x:re(Math.abs(ae),$),q&&(ae=t(ae)),de&&+ae==0&&O!=="+"&&(de=!1),K=(de?O==="("?O:C:O==="-"||O==="("?"":O)+K,Y=(oe==="s"?h[8+s/3]:"")+Y+(de&&O==="("?")":""),H){for(ie=-1,ne=ae.length;++iele||le>57){Y=(le===46?S+ae.slice(ie+1):ae.slice(ie))+Y,ae=ae.slice(0,ie);break}}}j&&!N&&(ae=b(ae,1/0));var we=K.length+ae.length+Y.length,me=we>1)+K+ae+Y+me.slice(we);break;default:ae=me+K+ae+Y;break}return w(ae)}return J.toString=function(){return B+""},J}function I(B,_){var z=k((B=g(B),B.type="f",B)),O=Math.max(-8,Math.min(8,Math.floor(o(_)/3)))*3,F=Math.pow(10,-O),N=h[8+O/3];return function(V){return z(F*V)+N}}return{format:k,formatPrefix:I}}var f,n;v({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function v(m){return f=T(m),n=f.format,f.formatPrefix,f}},87108:function(te,X,e){e.r(X),e.d(X,{geoAiry:function(){return N},geoAiryRaw:function(){return F},geoAitoff:function(){return j},geoAitoffRaw:function(){return V},geoArmadillo:function(){return q},geoArmadilloRaw:function(){return $},geoAugust:function(){return Z},geoAugustRaw:function(){return oe},geoBaker:function(){return J},geoBakerRaw:function(){return H},geoBerghaus:function(){return Y},geoBerghausRaw:function(){return K},geoBertin1953:function(){return ve},geoBertin1953Raw:function(){return Le},geoBoggs:function(){return et},geoBoggsRaw:function(){return Ne},geoBonne:function(){return it},geoBonneRaw:function(){return nt},geoBottomley:function(){return vt},geoBottomleyRaw:function(){return lt},geoBromley:function(){return Je},geoBromleyRaw:function(){return xt},geoChamberlin:function(){return be},geoChamberlinAfrica:function(){return Te},geoChamberlinRaw:function(){return ge},geoCollignon:function(){return Ve},geoCollignonRaw:function(){return ke},geoCraig:function(){return at},geoCraigRaw:function(){return je},geoCraster:function(){return Vt},geoCrasterRaw:function(){return Nt},geoCylindricalEqualArea:function(){return Ct},geoCylindricalEqualAreaRaw:function(){return gt},geoCylindricalStereographic:function(){return gr},geoCylindricalStereographicRaw:function(){return Yt},geoEckert1:function(){return Ht},geoEckert1Raw:function(){return ht},geoEckert2:function(){return cr},geoEckert2Raw:function(){return Wt},geoEckert3:function(){return ct},geoEckert3Raw:function(){return er},geoEckert4:function(){return dt},geoEckert4Raw:function(){return qe},geoEckert5:function(){return Et},geoEckert5Raw:function(){return bt},geoEckert6:function(){return _t},geoEckert6Raw:function(){return Mt},geoEisenlohr:function(){return nr},geoEisenlohrRaw:function(){return Gt},geoFahey:function(){return Be},geoFaheyRaw:function(){return ir},geoFoucaut:function(){return Rt},geoFoucautRaw:function(){return Fe},geoFoucautSinusoidal:function(){return Ut},geoFoucautSinusoidalRaw:function(){return Lt},geoGilbert:function(){return sr},geoGingery:function(){return Or},geoGingeryRaw:function(){return fr},geoGinzburg4:function(){return sn},geoGinzburg4Raw:function(){return Ar},geoGinzburg5:function(){return bn},geoGinzburg5Raw:function(){return Jr},geoGinzburg6:function(){return or},geoGinzburg6Raw:function(){return xn},geoGinzburg8:function(){return Br},geoGinzburg8Raw:function(){return Lr},geoGinzburg9:function(){return Qr},geoGinzburg9Raw:function(){return _r},geoGringorten:function(){return Kn},geoGringortenQuincuncial:function(){return mf},geoGringortenRaw:function(){return ln},geoGuyou:function(){return fn},geoGuyouRaw:function(){return pr},geoHammer:function(){return de},geoHammerRaw:function(){return ne},geoHammerRetroazimuthal:function(){return In},geoHammerRetroazimuthalRaw:function(){return pn},geoHealpix:function(){return en},geoHealpixRaw:function(){return yr},geoHill:function(){return Vr},geoHillRaw:function(){return br},geoHomolosine:function(){return kn},geoHomolosineRaw:function(){return Tn},geoHufnagel:function(){return fa},geoHufnagelRaw:function(){return Pn},geoHyperelliptical:function(){return ni},geoHyperellipticalRaw:function(){return ba},geoInterrupt:function(){return Oi},geoInterruptedBoggs:function(){return jl},geoInterruptedHomolosine:function(){return Ga},geoInterruptedMollweide:function(){return Kl},geoInterruptedMollweideHemispheres:function(){return $i},geoInterruptedQuarticAuthalic:function(){return ts},geoInterruptedSinuMollweide:function(){return Ll},geoInterruptedSinusoidal:function(){return Rs},geoKavrayskiy7:function(){return Ci},geoKavrayskiy7Raw:function(){return Ti},geoLagrange:function(){return Bi},geoLagrangeRaw:function(){return Ds},geoLarrivee:function(){return wu},geoLarriveeRaw:function(){return fo},geoLaskowski:function(){return nf},geoLaskowskiRaw:function(){return io},geoLittrow:function(){return ki},geoLittrowRaw:function(){return _o},geoLoximuthal:function(){return es},geoLoximuthalRaw:function(){return Jl},geoMiller:function(){return Ql},geoMillerRaw:function(){return zo},geoModifiedStereographic:function(){return ds},geoModifiedStereographicAlaska:function(){return $l},geoModifiedStereographicGs48:function(){return uf},geoModifiedStereographicGs50:function(){return ff},geoModifiedStereographicLee:function(){return Mu},geoModifiedStereographicMiller:function(){return Au},geoModifiedStereographicRaw:function(){return Tu},geoMollweide:function(){return _e},geoMollweideRaw:function(){return Se},geoMtFlatPolarParabolic:function(){return Su},geoMtFlatPolarParabolicRaw:function(){return tl},geoMtFlatPolarQuartic:function(){return cf},geoMtFlatPolarQuarticRaw:function(){return Wo},geoMtFlatPolarSinusoidal:function(){return Eu},geoMtFlatPolarSinusoidalRaw:function(){return Rl},geoNaturalEarth:function(){return Cu.c},geoNaturalEarth2:function(){return bo},geoNaturalEarth2Raw:function(){return Dl},geoNaturalEarthRaw:function(){return Cu.g},geoNellHammer:function(){return ps},geoNellHammerRaw:function(){return ks},geoNicolosi:function(){return ql},geoNicolosiRaw:function(){return Fo},geoPatterson:function(){return Os},geoPattersonRaw:function(){return kl},geoPeirceQuincuncial:function(){return ku},geoPierceQuincuncial:function(){return ku},geoPolyconic:function(){return vf},geoPolyconicRaw:function(){return _l},geoPolyhedral:function(){return ai},geoPolyhedralButterfly:function(){return al},geoPolyhedralCollignon:function(){return ys},geoPolyhedralWaterman:function(){return ns},geoProject:function(){return gf},geoQuantize:function(){return _u},geoQuincuncial:function(){return Zo},geoRectangularPolyconic:function(){return zu},geoRectangularPolyconicRaw:function(){return ou},geoRobinson:function(){return as},geoRobinsonRaw:function(){return Eo},geoSatellite:function(){return ms},geoSatelliteRaw:function(){return Bl},geoSinuMollweide:function(){return wn},geoSinuMollweideRaw:function(){return dn},geoSinusoidal:function(){return Ke},geoSinusoidalRaw:function(){return Ze},geoStitch:function(){return cl},geoTimes:function(){return Li},geoTimesRaw:function(){return ss},geoTwoPointAzimuthal:function(){return Vl},geoTwoPointAzimuthalRaw:function(){return lu},geoTwoPointAzimuthalUsa:function(){return bs},geoTwoPointEquidistant:function(){return Bu},geoTwoPointEquidistantRaw:function(){return hl},geoTwoPointEquidistantUsa:function(){return xf},geoVanDerGrinten:function(){return vl},geoVanDerGrinten2:function(){return Nu},geoVanDerGrinten2Raw:function(){return Xs},geoVanDerGrinten3:function(){return bf},geoVanDerGrinten3Raw:function(){return ls},geoVanDerGrinten4:function(){return dl},geoVanDerGrinten4Raw:function(){return oo},geoVanDerGrintenRaw:function(){return ji},geoWagner:function(){return us},geoWagner4:function(){return Uu},geoWagner4Raw:function(){return Gl},geoWagner6:function(){return fu},geoWagner6Raw:function(){return ml},geoWagner7:function(){return uu},geoWagnerRaw:function(){return Jo},geoWiechel:function(){return cu},geoWiechelRaw:function(){return ws},geoWinkel3:function(){return Vu},geoWinkel3Raw:function(){return xl}});var A=e(87952),P=Math.abs,o=Math.atan,L=Math.atan2,M=Math.cos,d=Math.exp,g=Math.floor,r=Math.log,t=Math.max,s=Math.min,a=Math.pow,c=Math.round,u=Math.sign||function(We){return We>0?1:We<0?-1:0},l=Math.sin,y=Math.tan,h=1e-6,T=1e-12,f=Math.PI,n=f/2,v=f/4,m=Math.SQRT1_2,b=k(2),E=k(f),p=f*2,S=180/f,w=f/180;function i(We){return We?We/Math.sin(We):1}function C(We){return We>1?n:We<-1?-n:Math.asin(We)}function x(We){return We>1?0:We<-1?f:Math.acos(We)}function k(We){return We>0?Math.sqrt(We):0}function I(We){return We=d(2*We),(We-1)/(We+1)}function B(We){return(d(We)-d(-We))/2}function _(We){return(d(We)+d(-We))/2}function z(We){return r(We+k(We*We+1))}function O(We){return r(We+k(We*We-1))}function F(We){var $e=y(We/2),ft=2*r(M(We/2))/($e*$e);function pt(Pt,St){var kt=M(Pt),ur=M(St),dr=l(St),$t=ur*kt,mr=-((1-$t?r((1+$t)/2)/(1-$t):-.5)+ft/(1+$t));return[mr*ur*l(Pt),mr*dr]}return pt.invert=function(Pt,St){var kt=k(Pt*Pt+St*St),ur=-We/2,dr=50,$t;if(!kt)return[0,0];do{var mr=ur/2,Er=M(mr),Ir=l(mr),Kr=Ir/Er,hn=-r(P(Er));ur-=$t=(2/Kr*hn-ft*Kr-kt)/(-hn/(Ir*Ir)+1-ft/(2*Er*Er))*(Er<0?.7:1)}while(P($t)>h&&--dr>0);var An=l(ur);return[L(Pt*An,kt*M(ur)),C(St*An/kt)]},pt}function N(){var We=n,$e=(0,A.U)(F),ft=$e(We);return ft.radius=function(pt){return arguments.length?$e(We=pt*w):We*S},ft.scale(179.976).clipAngle(147)}function V(We,$e){var ft=M($e),pt=i(x(ft*M(We/=2)));return[2*ft*l(We)*pt,l($e)*pt]}V.invert=function(We,$e){if(!(We*We+4*$e*$e>f*f+h)){var ft=We,pt=$e,Pt=25;do{var St=l(ft),kt=l(ft/2),ur=M(ft/2),dr=l(pt),$t=M(pt),mr=l(2*pt),Er=dr*dr,Ir=$t*$t,Kr=kt*kt,hn=1-Ir*ur*ur,An=hn?x($t*ur)*k(Sn=1/hn):Sn=0,Sn,Un=2*An*$t*kt-We,wa=An*dr-$e,Ta=Sn*(Ir*Kr+An*$t*ur*Er),Aa=Sn*(.5*St*mr-An*2*dr*kt),Ca=Sn*.25*(mr*kt-An*dr*Ir*St),Oa=Sn*(Er*ur+An*Kr*$t),ri=Aa*Ca-Oa*Ta;if(!ri)break;var wi=(wa*Aa-Un*Oa)/ri,se=(Un*Ca-wa*Ta)/ri;ft-=wi,pt-=se}while((P(wi)>h||P(se)>h)&&--Pt>0);return[ft,pt]}};function j(){return(0,A.c)(V).scale(152.63)}function $(We){var $e=l(We),ft=M(We),pt=We>=0?1:-1,Pt=y(pt*We),St=(1+$e-ft)/2;function kt(ur,dr){var $t=M(dr),mr=M(ur/=2);return[(1+$t)*l(ur),(pt*dr>-L(mr,Pt)-.001?0:-pt*10)+St+l(dr)*ft-(1+$t)*$e*mr]}return kt.invert=function(ur,dr){var $t=0,mr=0,Er=50;do{var Ir=M($t),Kr=l($t),hn=M(mr),An=l(mr),Sn=1+hn,Un=Sn*Kr-ur,wa=St+An*ft-Sn*$e*Ir-dr,Ta=Sn*Ir/2,Aa=-Kr*An,Ca=$e*Sn*Kr/2,Oa=ft*hn+$e*Ir*An,ri=Aa*Ca-Oa*Ta,wi=(wa*Aa-Un*Oa)/ri/2,se=(Un*Ca-wa*Ta)/ri;P(se)>2&&(se/=2),$t-=wi,mr-=se}while((P(wi)>h||P(se)>h)&&--Er>0);return pt*mr>-L(M($t),Pt)-.001?[$t*2,mr]:null},kt}function q(){var We=20*w,$e=We>=0?1:-1,ft=y($e*We),pt=(0,A.U)($),Pt=pt(We),St=Pt.stream;return Pt.parallel=function(kt){return arguments.length?(ft=y(($e=(We=kt*w)>=0?1:-1)*We),pt(We)):We*S},Pt.stream=function(kt){var ur=Pt.rotate(),dr=St(kt),$t=(Pt.rotate([0,0]),St(kt)),mr=Pt.precision();return Pt.rotate(ur),dr.sphere=function(){$t.polygonStart(),$t.lineStart();for(var Er=$e*-180;$e*Er<180;Er+=$e*90)$t.point(Er,$e*90);if(We)for(;$e*(Er-=3*$e*mr)>=-180;)$t.point(Er,$e*-L(M(Er*w/2),ft)*S);$t.lineEnd(),$t.polygonEnd()},dr},Pt.scale(218.695).center([0,28.0974])}function oe(We,$e){var ft=y($e/2),pt=k(1-ft*ft),Pt=1+pt*M(We/=2),St=l(We)*pt/Pt,kt=ft/Pt,ur=St*St,dr=kt*kt;return[1.3333333333333333*St*(3+ur-3*dr),1.3333333333333333*kt*(3+3*ur-dr)]}oe.invert=function(We,$e){if(We*=.375,$e*=.375,!We&&P($e)>1)return null;var ft=We*We,pt=$e*$e,Pt=1+ft+pt,St=k((Pt-k(Pt*Pt-4*$e*$e))/2),kt=C(St)/3,ur=St?O(P($e/St))/3:z(P(We))/3,dr=M(kt),$t=_(ur),mr=$t*$t-dr*dr;return[u(We)*2*L(B(ur)*dr,.25-mr),u($e)*2*L($t*l(kt),.25+mr)]};function Z(){return(0,A.c)(oe).scale(66.1603)}var G=k(8),re=r(1+b);function H(We,$e){var ft=P($e);return ftT&&--pt>0);return[We/(M(ft)*(G-1/l(ft))),u($e)*ft]};function J(){return(0,A.c)(H).scale(112.314)}var ae=e(69020);function K(We){var $e=2*f/We;function ft(pt,Pt){var St=(0,ae.O)(pt,Pt);if(P(pt)>n){var kt=L(St[1],St[0]),ur=k(St[0]*St[0]+St[1]*St[1]),dr=$e*c((kt-n)/$e)+n,$t=L(l(kt-=dr),2-M(kt));kt=dr+C(f/ur*l($t))-$t,St[0]=ur*M(kt),St[1]=ur*l(kt)}return St}return ft.invert=function(pt,Pt){var St=k(pt*pt+Pt*Pt);if(St>n){var kt=L(Pt,pt),ur=$e*c((kt-n)/$e)+n,dr=kt>ur?-1:1,$t=St*M(ur-kt),mr=1/y(dr*x(($t-f)/k(f*(f-2*$t)+St*St)));kt=ur+2*o((mr+dr*k(mr*mr-3))/3),pt=St*M(kt),Pt=St*l(kt)}return ae.O.invert(pt,Pt)},ft}function Y(){var We=5,$e=(0,A.U)(K),ft=$e(We),pt=ft.stream,Pt=.01,St=-M(Pt*w),kt=l(Pt*w);return ft.lobes=function(ur){return arguments.length?$e(We=+ur):We},ft.stream=function(ur){var dr=ft.rotate(),$t=pt(ur),mr=(ft.rotate([0,0]),pt(ur));return ft.rotate(dr),$t.sphere=function(){mr.polygonStart(),mr.lineStart();for(var Er=0,Ir=360/We,Kr=2*f/We,hn=90-180/We,An=n;Er0&&P(Pt)>h);return pt<0?NaN:ft}function me(We,$e,ft){return $e===void 0&&($e=40),ft===void 0&&(ft=T),function(pt,Pt,St,kt){var ur,dr,$t;St=St===void 0?0:+St,kt=kt===void 0?0:+kt;for(var mr=0;mr<$e;mr++){var Er=We(St,kt),Ir=Er[0]-pt,Kr=Er[1]-Pt;if(P(Ir)ur){St-=dr/=2,kt-=$t/=2;continue}ur=hn;var An=(St>0?-1:1)*ft,Sn=(kt>0?-1:1)*ft,Un=We(St+An,kt),wa=We(St,kt+Sn),Ta=(Un[0]-Er[0])/An,Aa=(Un[1]-Er[1])/An,Ca=(wa[0]-Er[0])/Sn,Oa=(wa[1]-Er[1])/Sn,ri=Oa*Ta-Aa*Ca,wi=(P(ri)<.5?.5:1)/ri;if(dr=(Kr*Ca-Ir*Oa)*wi,$t=(Ir*Aa-Kr*Ta)*wi,St+=dr,kt+=$t,P(dr)0&&(ur[1]*=1+dr/1.5*ur[0]*ur[0]),ur}return pt.invert=me(pt),pt}function ve(){return(0,A.c)(Le()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function Ae(We,$e){var ft=We*l($e),pt=30,Pt;do $e-=Pt=($e+l($e)-ft)/(1+M($e));while(P(Pt)>h&&--pt>0);return $e/2}function ye(We,$e,ft){function pt(Pt,St){return[We*Pt*M(St=Ae(ft,St)),$e*l(St)]}return pt.invert=function(Pt,St){return St=C(St/$e),[Pt/(We*M(St)),C((2*St+l(2*St))/ft)]},pt}var Se=ye(b/n,b,f);function _e(){return(0,A.c)(Se).scale(169.529)}var ze=2.00276,Ie=1.11072;function Ne(We,$e){var ft=Ae(f,$e);return[ze*We/(1/M($e)+Ie/M(ft)),($e+b*l(ft))/ze]}Ne.invert=function(We,$e){var ft=ze*$e,pt=$e<0?-v:v,Pt=25,St,kt;do kt=ft-b*l(pt),pt-=St=(l(2*pt)+2*pt-f*l(kt))/(2*M(2*pt)+2+f*M(kt)*b*M(pt));while(P(St)>h&&--Pt>0);return kt=ft-b*l(pt),[We*(1/M(kt)+Ie/M(pt))/ze,kt]};function et(){return(0,A.c)(Ne).scale(160.857)}function st(We){var $e=0,ft=(0,A.U)(We),pt=ft($e);return pt.parallel=function(Pt){return arguments.length?ft($e=Pt*w):$e*S},pt}function Ze(We,$e){return[We*M($e),$e]}Ze.invert=function(We,$e){return[We/M($e),$e]};function Ke(){return(0,A.c)(Ze).scale(152.63)}function nt(We){if(!We)return Ze;var $e=1/y(We);function ft(pt,Pt){var St=$e+We-Pt,kt=St&&pt*M(Pt)/St;return[St*l(kt),$e-St*M(kt)]}return ft.invert=function(pt,Pt){var St=k(pt*pt+(Pt=$e-Pt)*Pt),kt=$e+We-St;return[St/M(kt)*L(pt,Pt),kt]},ft}function it(){return st(nt).scale(123.082).center([0,26.1441]).parallel(45)}function lt(We){function $e(ft,pt){var Pt=n-pt,St=Pt&&ft*We*l(Pt)/Pt;return[Pt*l(St)/We,n-Pt*M(St)]}return $e.invert=function(ft,pt){var Pt=ft*We,St=n-pt,kt=k(Pt*Pt+St*St),ur=L(Pt,St);return[(kt?kt/l(kt):1)*ur/We,n-kt]},$e}function vt(){var We=.5,$e=(0,A.U)(lt),ft=$e(We);return ft.fraction=function(pt){return arguments.length?$e(We=+pt):We},ft.scale(158.837)}var xt=ye(1,4/f,f);function Je(){return(0,A.c)(xt).scale(152.63)}var Pe=e(24052),Ue=e(92992);function He(We,$e,ft,pt,Pt,St){var kt=M(St),ur;if(P(We)>1||P(St)>1)ur=x(ft*Pt+$e*pt*kt);else{var dr=l(We/2),$t=l(St/2);ur=2*C(k(dr*dr+$e*pt*$t*$t))}return P(ur)>h?[ur,L(pt*l(St),$e*Pt-ft*pt*kt)]:[0,0]}function Oe(We,$e,ft){return x((We*We+$e*$e-ft*ft)/(2*We*$e))}function Ce(We){return We-2*f*g((We+f)/(2*f))}function ge(We,$e,ft){for(var pt=[[We[0],We[1],l(We[1]),M(We[1])],[$e[0],$e[1],l($e[1]),M($e[1])],[ft[0],ft[1],l(ft[1]),M(ft[1])]],Pt=pt[2],St,kt=0;kt<3;++kt,Pt=St)St=pt[kt],Pt.v=He(St[1]-Pt[1],Pt[3],Pt[2],St[3],St[2],St[0]-Pt[0]),Pt.point=[0,0];var ur=Oe(pt[0].v[0],pt[2].v[0],pt[1].v[0]),dr=Oe(pt[0].v[0],pt[1].v[0],pt[2].v[0]),$t=f-ur;pt[2].point[1]=0,pt[0].point[0]=-(pt[1].point[0]=pt[0].v[0]/2);var mr=[pt[2].point[0]=pt[0].point[0]+pt[2].v[0]*M(ur),2*(pt[0].point[1]=pt[1].point[1]=pt[2].v[0]*l(ur))];function Er(Ir,Kr){var hn=l(Kr),An=M(Kr),Sn=new Array(3),Un;for(Un=0;Un<3;++Un){var wa=pt[Un];if(Sn[Un]=He(Kr-wa[1],wa[3],wa[2],An,hn,Ir-wa[0]),!Sn[Un][0])return wa.point;Sn[Un][1]=Ce(Sn[Un][1]-wa.v[1])}var Ta=mr.slice();for(Un=0;Un<3;++Un){var Aa=Un==2?0:Un+1,Ca=Oe(pt[Un].v[0],Sn[Un][0],Sn[Aa][0]);Sn[Un][1]<0&&(Ca=-Ca),Un?Un==1?(Ca=dr-Ca,Ta[0]-=Sn[Un][0]*M(Ca),Ta[1]-=Sn[Un][0]*l(Ca)):(Ca=$t-Ca,Ta[0]+=Sn[Un][0]*M(Ca),Ta[1]+=Sn[Un][0]*l(Ca)):(Ta[0]+=Sn[Un][0]*M(Ca),Ta[1]-=Sn[Un][0]*l(Ca))}return Ta[0]/=3,Ta[1]/=3,Ta}return Er}function pe(We){return We[0]*=w,We[1]*=w,We}function Te(){return be([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function be(We,$e,ft){var pt=(0,Pe.c)({type:"MultiPoint",coordinates:[We,$e,ft]}),Pt=[-pt[0],-pt[1]],St=(0,Ue.c)(Pt),kt=ge(pe(St(We)),pe(St($e)),pe(St(ft)));kt.invert=me(kt);var ur=(0,A.c)(kt).rotate(Pt),dr=ur.center;return delete ur.rotate,ur.center=function($t){return arguments.length?dr(St($t)):St.invert(dr())},ur.clipAngle(90)}function ke(We,$e){var ft=k(1-l($e));return[2/E*We*ft,E*(1-ft)]}ke.invert=function(We,$e){var ft=(ft=$e/E-1)*ft;return[ft>0?We*k(f/ft)/2:0,C(1-ft)]};function Ve(){return(0,A.c)(ke).scale(95.6464).center([0,30])}function je(We){var $e=y(We);function ft(pt,Pt){return[pt,(pt?pt/l(pt):1)*(l(Pt)*M(pt)-$e*M(Pt))]}return ft.invert=$e?function(pt,Pt){pt&&(Pt*=l(pt)/pt);var St=M(pt);return[pt,2*L(k(St*St+$e*$e-Pt*Pt)-St,$e-Pt)]}:function(pt,Pt){return[pt,C(pt?Pt*y(pt)/pt:Pt)]},ft}function at(){return st(je).scale(249.828).clipAngle(90)}var ut=k(3);function Nt(We,$e){return[ut*We*(2*M(2*$e/3)-1)/E,ut*E*l($e/3)]}Nt.invert=function(We,$e){var ft=3*C($e/(ut*E));return[E*We/(ut*(2*M(2*ft/3)-1)),ft]};function Vt(){return(0,A.c)(Nt).scale(156.19)}function gt(We){var $e=M(We);function ft(pt,Pt){return[pt*$e,l(Pt)/$e]}return ft.invert=function(pt,Pt){return[pt/$e,C(Pt*$e)]},ft}function Ct(){return st(gt).parallel(38.58).scale(195.044)}function Yt(We){var $e=M(We);function ft(pt,Pt){return[pt*$e,(1+$e)*y(Pt/2)]}return ft.invert=function(pt,Pt){return[pt/$e,o(Pt/(1+$e))*2]},ft}function gr(){return st(Yt).scale(124.75)}function ht(We,$e){var ft=k(8/(3*f));return[ft*We*(1-P($e)/f),ft*$e]}ht.invert=function(We,$e){var ft=k(8/(3*f)),pt=$e/ft;return[We/(ft*(1-P(pt)/f)),pt]};function Ht(){return(0,A.c)(ht).scale(165.664)}function Wt(We,$e){var ft=k(4-3*l(P($e)));return[2/k(6*f)*We*ft,u($e)*k(2*f/3)*(2-ft)]}Wt.invert=function(We,$e){var ft=2-P($e)/k(2*f/3);return[We*k(6*f)/(2*ft),u($e)*C((4-ft*ft)/3)]};function cr(){return(0,A.c)(Wt).scale(165.664)}function er(We,$e){var ft=k(f*(4+f));return[2/ft*We*(1+k(1-4*$e*$e/(f*f))),4/ft*$e]}er.invert=function(We,$e){var ft=k(f*(4+f))/2;return[We*ft/(1+k(1-$e*$e*(4+f)/(4*f))),$e*ft/2]};function ct(){return(0,A.c)(er).scale(180.739)}function qe(We,$e){var ft=(2+n)*l($e);$e/=2;for(var pt=0,Pt=1/0;pt<10&&P(Pt)>h;pt++){var St=M($e);$e-=Pt=($e+l($e)*(St+2)-ft)/(2*St*(1+St))}return[2/k(f*(4+f))*We*(1+M($e)),2*k(f/(4+f))*l($e)]}qe.invert=function(We,$e){var ft=$e*k((4+f)/f)/2,pt=C(ft),Pt=M(pt);return[We/(2/k(f*(4+f))*(1+Pt)),C((pt+ft*(Pt+2))/(2+n))]};function dt(){return(0,A.c)(qe).scale(180.739)}function bt(We,$e){return[We*(1+M($e))/k(2+f),2*$e/k(2+f)]}bt.invert=function(We,$e){var ft=k(2+f),pt=$e*ft/2;return[ft*We/(1+M(pt)),pt]};function Et(){return(0,A.c)(bt).scale(173.044)}function Mt(We,$e){for(var ft=(1+n)*l($e),pt=0,Pt=1/0;pt<10&&P(Pt)>h;pt++)$e-=Pt=($e+l($e)-ft)/(1+M($e));return ft=k(2+f),[We*(1+M($e))/ft,2*$e/ft]}Mt.invert=function(We,$e){var ft=1+n,pt=k(ft/2);return[We*2*pt/(1+M($e*=pt)),C(($e+l($e))/ft)]};function _t(){return(0,A.c)(Mt).scale(173.044)}var It=3+2*b;function Gt(We,$e){var ft=l(We/=2),pt=M(We),Pt=k(M($e)),St=M($e/=2),kt=l($e)/(St+b*pt*Pt),ur=k(2/(1+kt*kt)),dr=k((b*St+(pt+ft)*Pt)/(b*St+(pt-ft)*Pt));return[It*(ur*(dr-1/dr)-2*r(dr)),It*(ur*kt*(dr+1/dr)-2*o(kt))]}Gt.invert=function(We,$e){if(!(St=oe.invert(We/1.2,$e*1.065)))return null;var ft=St[0],pt=St[1],Pt=20,St;We/=It,$e/=It;do{var kt=ft/2,ur=pt/2,dr=l(kt),$t=M(kt),mr=l(ur),Er=M(ur),Ir=M(pt),Kr=k(Ir),hn=mr/(Er+b*$t*Kr),An=hn*hn,Sn=k(2/(1+An)),Un=b*Er+($t+dr)*Kr,wa=b*Er+($t-dr)*Kr,Ta=Un/wa,Aa=k(Ta),Ca=Aa-1/Aa,Oa=Aa+1/Aa,ri=Sn*Ca-2*r(Aa)-We,wi=Sn*hn*Oa-2*o(hn)-$e,se=mr&&m*Kr*dr*An/mr,Me=(b*$t*Er+Kr)/(2*(Er+b*$t*Kr)*(Er+b*$t*Kr)*Kr),De=-.5*hn*Sn*Sn*Sn,Xe=De*se,Qe=De*Me,rt=(rt=2*Er+b*Kr*($t-dr))*rt*Aa,Tt=(b*$t*Er*Kr+Ir)/rt,yt=-(b*dr*mr)/(Kr*rt),Ft=Ca*Xe-2*Tt/Aa+Sn*(Tt+Tt/Ta),Ot=Ca*Qe-2*yt/Aa+Sn*(yt+yt/Ta),jt=hn*Oa*Xe-2*se/(1+An)+Sn*Oa*se+Sn*hn*(Tt-Tt/Ta),wr=hn*Oa*Qe-2*Me/(1+An)+Sn*Oa*Me+Sn*hn*(yt-yt/Ta),Tr=Ot*jt-wr*Ft;if(!Tr)break;var Wr=(wi*Ot-ri*wr)/Tr,qr=(ri*jt-wi*Ft)/Tr;ft-=Wr,pt=t(-n,s(n,pt-qr))}while((P(Wr)>h||P(qr)>h)&&--Pt>0);return P(P(pt)-n)pt){var Er=k(mr),Ir=L($t,dr),Kr=ft*c(Ir/ft),hn=Ir-Kr,An=We*M(hn),Sn=(We*l(hn)-hn*l(An))/(n-An),Un=vr(hn,Sn),wa=(f-We)/lr(Un,An,f);dr=Er;var Ta=50,Aa;do dr-=Aa=(We+lr(Un,An,dr)*wa-Er)/(Un(dr)*wa);while(P(Aa)>h&&--Ta>0);$t=hn*l(dr),drpt){var dr=k(ur),$t=L(kt,St),mr=ft*c($t/ft),Er=$t-mr;St=dr*M(Er),kt=dr*l(Er);for(var Ir=St-n,Kr=l(St),hn=kt/Kr,An=Sth||P(hn)>h)&&--An>0);return[Er,Ir]},dr}var Ar=Sr(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function sn(){return(0,A.c)(Ar).scale(149.995)}var Jr=Sr(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function bn(){return(0,A.c)(Jr).scale(153.93)}var xn=Sr(5/6*f,-.62636,-.0344,0,1.3493,-.05524,0,.045);function or(){return(0,A.c)(xn).scale(130.945)}function Lr(We,$e){var ft=We*We,pt=$e*$e;return[We*(1-.162388*pt)*(.87-952426e-9*ft*ft),$e*(1+pt/12)]}Lr.invert=function(We,$e){var ft=We,pt=$e,Pt=50,St;do{var kt=pt*pt;pt-=St=(pt*(1+kt/12)-$e)/(1+kt/4)}while(P(St)>h&&--Pt>0);Pt=50,We/=1-.162388*kt;do{var ur=(ur=ft*ft)*ur;ft-=St=(ft*(.87-952426e-9*ur)-We)/(.87-.00476213*ur)}while(P(St)>h&&--Pt>0);return[ft,pt]};function Br(){return(0,A.c)(Lr).scale(131.747)}var _r=Sr(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Qr(){return(0,A.c)(_r).scale(131.087)}function un(We){var $e=We(n,0)[0]-We(-n,0)[0];function ft(pt,Pt){var St=pt>0?-.5:.5,kt=We(pt+St*f,Pt);return kt[0]-=St*$e,kt}return We.invert&&(ft.invert=function(pt,Pt){var St=pt>0?-.5:.5,kt=We.invert(pt+St*$e,Pt),ur=kt[0]-St*f;return ur<-f?ur+=2*f:ur>f&&(ur-=2*f),kt[0]=ur,kt}),ft}function ln(We,$e){var ft=u(We),pt=u($e),Pt=M($e),St=M(We)*Pt,kt=l(We)*Pt,ur=l(pt*$e);We=P(L(kt,ur)),$e=C(St),P(We-n)>h&&(We%=n);var dr=Mn(We>f/4?n-We:We,$e);return We>f/4&&(ur=dr[0],dr[0]=-dr[1],dr[1]=-ur),dr[0]*=ft,dr[1]*=-pt,dr}ln.invert=function(We,$e){P(We)>1&&(We=u(We)*2-We),P($e)>1&&($e=u($e)*2-$e);var ft=u(We),pt=u($e),Pt=-ft*We,St=-pt*$e,kt=St/Pt<1,ur=Dn(kt?St:Pt,kt?Pt:St),dr=ur[0],$t=ur[1],mr=M($t);return kt&&(dr=-n-dr),[ft*(L(l(dr)*mr,-l($t))+f),pt*C(M(dr)*mr)]};function Mn(We,$e){if($e===n)return[0,0];var ft=l($e),pt=ft*ft,Pt=pt*pt,St=1+Pt,kt=1+3*Pt,ur=1-Pt,dr=C(1/k(St)),$t=ur+pt*St*dr,mr=(1-ft)/$t,Er=k(mr),Ir=mr*St,Kr=k(Ir),hn=Er*ur,An,Sn;if(We===0)return[0,-(hn+pt*Kr)];var Un=M($e),wa=1/Un,Ta=2*ft*Un,Aa=(-3*pt+dr*kt)*Ta,Ca=(-$t*Un-(1-ft)*Aa)/($t*$t),Oa=.5*Ca/Er,ri=ur*Oa-2*pt*Er*Ta,wi=pt*St*Ca+mr*kt*Ta,se=-wa*Ta,Me=-wa*wi,De=-2*wa*ri,Xe=4*We/f,Qe;if(We>.222*f||$e.175*f){if(An=(hn+pt*k(Ir*(1+Pt)-hn*hn))/(1+Pt),We>f/4)return[An,An];var rt=An,Tt=.5*An;An=.5*(Tt+rt),Sn=50;do{var yt=k(Ir-An*An),Ft=An*(De+se*yt)+Me*C(An/Kr)-Xe;if(!Ft)break;Ft<0?Tt=An:rt=An,An=.5*(Tt+rt)}while(P(rt-Tt)>h&&--Sn>0)}else{An=h,Sn=25;do{var Ot=An*An,jt=k(Ir-Ot),wr=De+se*jt,Tr=An*wr+Me*C(An/Kr)-Xe,Wr=wr+(Me-se*Ot)/jt;An-=Qe=jt?Tr/Wr:0}while(P(Qe)>h&&--Sn>0)}return[An,-hn-pt*k(Ir-An*An)]}function Dn(We,$e){for(var ft=0,pt=1,Pt=.5,St=50;;){var kt=Pt*Pt,ur=k(Pt),dr=C(1/k(1+kt)),$t=1-kt+Pt*(1+kt)*dr,mr=(1-ur)/$t,Er=k(mr),Ir=mr*(1+kt),Kr=Er*(1-kt),hn=Ir-We*We,An=k(hn),Sn=$e+Kr+Pt*An;if(P(pt-ft)0?ft=Pt:pt=Pt,Pt=.5*(ft+pt)}if(!St)return null;var Un=C(ur),wa=M(Un),Ta=1/wa,Aa=2*ur*wa,Ca=(-3*Pt+dr*(1+3*kt))*Aa,Oa=(-$t*wa-(1-ur)*Ca)/($t*$t),ri=.5*Oa/Er,wi=(1-kt)*ri-2*Pt*Er*Aa,se=-2*Ta*wi,Me=-Ta*Aa,De=-Ta*(Pt*(1+kt)*Oa+mr*(1+3*kt)*Aa);return[f/4*(We*(se+Me*An)+De*C(We/k(Ir))),Un]}function Kn(){return(0,A.c)(un(ln)).scale(239.75)}function sa(We,$e,ft){var pt,Pt,St;return We?(pt=na(We,ft),$e?(Pt=na($e,1-ft),St=Pt[1]*Pt[1]+ft*pt[0]*pt[0]*Pt[0]*Pt[0],[[pt[0]*Pt[2]/St,pt[1]*pt[2]*Pt[0]*Pt[1]/St],[pt[1]*Pt[1]/St,-pt[0]*pt[2]*Pt[0]*Pt[2]/St],[pt[2]*Pt[1]*Pt[2]/St,-ft*pt[0]*pt[1]*Pt[0]/St]]):[[pt[0],0],[pt[1],0],[pt[2],0]]):(Pt=na($e,1-ft),[[0,Pt[0]/Pt[1]],[1/Pt[1],0],[Pt[2]/Pt[1],0]])}function na(We,$e){var ft,pt,Pt,St,kt;if($e=1-h)return ft=(1-$e)/4,pt=_(We),St=I(We),Pt=1/pt,kt=pt*B(We),[St+ft*(kt-We)/(pt*pt),Pt-ft*St*Pt*(kt-We),Pt+ft*St*Pt*(kt+We),2*o(d(We))-n+ft*(kt-We)/pt];var ur=[1,0,0,0,0,0,0,0,0],dr=[k($e),0,0,0,0,0,0,0,0],$t=0;for(pt=k(1-$e),kt=1;P(dr[$t]/ur[$t])>h&&$t<8;)ft=ur[$t++],dr[$t]=(ft-pt)/2,ur[$t]=(ft+pt)/2,pt=k(ft*pt),kt*=2;Pt=kt*ur[$t]*We;do St=dr[$t]*l(pt=Pt)/ur[$t],Pt=(C(St)+Pt)/2;while(--$t);return[l(Pt),St=M(Pt),St/M(Pt-pt),Pt]}function Jn(We,$e,ft){var pt=P(We),Pt=P($e),St=B(Pt);if(pt){var kt=1/l(pt),ur=1/(y(pt)*y(pt)),dr=-(ur+ft*(St*St*kt*kt)-1+ft),$t=(ft-1)*ur,mr=(-dr+k(dr*dr-4*$t))/2;return[aa(o(1/k(mr)),ft)*u(We),aa(o(k((mr/ur-1)/ft)),1-ft)*u($e)]}return[0,aa(o(St),1-ft)*u($e)]}function aa(We,$e){if(!$e)return We;if($e===1)return r(y(We/2+v));for(var ft=1,pt=k(1-$e),Pt=k($e),St=0;P(Pt)>h;St++){if(We%f){var kt=o(pt*y(We)/ft);kt<0&&(kt+=f),We+=kt+~~(We/f)*f}else We+=We;Pt=(ft+pt)/2,pt=k(ft*pt),Pt=((ft=Pt)-pt)/2}return We/(a(2,St)*ft)}function pr(We,$e){var ft=(b-1)/(b+1),pt=k(1-ft*ft),Pt=aa(n,pt*pt),St=-1,kt=r(y(f/4+P($e)/2)),ur=d(St*kt)/k(ft),dr=$r(ur*M(St*We),ur*l(St*We)),$t=Jn(dr[0],dr[1],pt*pt);return[-$t[1],($e>=0?1:-1)*(.5*Pt-$t[0])]}function $r(We,$e){var ft=We*We,pt=$e+1,Pt=1-ft-$e*$e;return[.5*((We>=0?n:-n)-L(Pt,2*We)),-.25*r(Pt*Pt+4*ft)+.5*r(pt*pt+ft)]}function Xr(We,$e){var ft=$e[0]*$e[0]+$e[1]*$e[1];return[(We[0]*$e[0]+We[1]*$e[1])/ft,(We[1]*$e[0]-We[0]*$e[1])/ft]}pr.invert=function(We,$e){var ft=(b-1)/(b+1),pt=k(1-ft*ft),Pt=aa(n,pt*pt),St=-1,kt=sa(.5*Pt-$e,-We,pt*pt),ur=Xr(kt[0],kt[1]),dr=L(ur[1],ur[0])/St;return[dr,2*o(d(.5/St*r(ft*ur[0]*ur[0]+ft*ur[1]*ur[1])))-n]};function fn(){return(0,A.c)(un(pr)).scale(151.496)}var zn=e(61780);function pn(We){var $e=l(We),ft=M(We),pt=gn(We);pt.invert=gn(-We);function Pt(St,kt){var ur=pt(St,kt);St=ur[0],kt=ur[1];var dr=l(kt),$t=M(kt),mr=M(St),Er=x($e*dr+ft*$t*mr),Ir=l(Er),Kr=P(Ir)>h?Er/Ir:1;return[Kr*ft*l(St),(P(St)>n?Kr:-Kr)*($e*$t-ft*dr*mr)]}return Pt.invert=function(St,kt){var ur=k(St*St+kt*kt),dr=-l(ur),$t=M(ur),mr=ur*$t,Er=-kt*dr,Ir=ur*$e,Kr=k(mr*mr+Er*Er-Ir*Ir),hn=L(mr*Ir+Er*Kr,Er*Ir-mr*Kr),An=(ur>n?-1:1)*L(St*dr,ur*M(hn)*$t+kt*l(hn)*dr);return pt.invert(An,hn)},Pt}function gn(We){var $e=l(We),ft=M(We);return function(pt,Pt){var St=M(Pt),kt=M(pt)*St,ur=l(pt)*St,dr=l(Pt);return[L(ur,kt*ft-dr*$e),C(dr*ft+kt*$e)]}}function In(){var We=0,$e=(0,A.U)(pn),ft=$e(We),pt=ft.rotate,Pt=ft.stream,St=(0,zn.c)();return ft.parallel=function(kt){if(!arguments.length)return We*S;var ur=ft.rotate();return $e(We=kt*w).rotate(ur)},ft.rotate=function(kt){return arguments.length?(pt.call(ft,[kt[0],kt[1]-We*S]),St.center([-kt[0],-kt[1]]),ft):(kt=pt.call(ft),kt[1]+=We*S,kt)},ft.stream=function(kt){return kt=Pt(kt),kt.sphere=function(){kt.polygonStart();var ur=.01,dr=St.radius(90-ur)().coordinates[0],$t=dr.length-1,mr=-1,Er;for(kt.lineStart();++mr<$t;)kt.point((Er=dr[mr])[0],Er[1]);for(kt.lineEnd(),dr=St.radius(90+ur)().coordinates[0],$t=dr.length-1,kt.lineStart();--mr>=0;)kt.point((Er=dr[mr])[0],Er[1]);kt.lineEnd(),kt.polygonEnd()},kt},ft.scale(79.4187).parallel(45).clipAngle(179.999)}var Gn=e(84706),ua=e(16016),Ma=3,xr=C(1-1/Ma)*S,Rr=gt(0);function yr(We){var $e=xr*w,ft=ke(f,$e)[0]-ke(-f,$e)[0],pt=Rr(0,$e)[1],Pt=ke(0,$e)[1],St=E-Pt,kt=p/We,ur=4/p,dr=pt+St*St*4/p;function $t(mr,Er){var Ir,Kr=P(Er);if(Kr>$e){var hn=s(We-1,t(0,g((mr+f)/kt)));mr+=f*(We-1)/We-hn*kt,Ir=ke(mr,Kr),Ir[0]=Ir[0]*p/ft-p*(We-1)/(2*We)+hn*p/We,Ir[1]=pt+(Ir[1]-Pt)*4*St/p,Er<0&&(Ir[1]=-Ir[1])}else Ir=Rr(mr,Er);return Ir[0]*=ur,Ir[1]/=dr,Ir}return $t.invert=function(mr,Er){mr/=ur,Er*=dr;var Ir=P(Er);if(Ir>pt){var Kr=s(We-1,t(0,g((mr+f)/kt)));mr=(mr+f*(We-1)/We-Kr*kt)*ft/p;var hn=ke.invert(mr,.25*(Ir-pt)*p/St+Pt);return hn[0]-=f*(We-1)/We-Kr*kt,Er<0&&(hn[1]=-hn[1]),hn}return Rr.invert(mr,Er)},$t}function Dr(We,$e){return[We,$e&1?90-h:xr]}function vn(We,$e){return[We,$e&1?-90+h:-xr]}function En(We){return[We[0]*(1-h),We[1]]}function an(We){var $e=[].concat((0,Gn.ik)(-180,180+We/2,We).map(Dr),(0,Gn.ik)(180,-180-We/2,-We).map(vn));return{type:"Polygon",coordinates:[We===180?$e.map(En):$e]}}function en(){var We=4,$e=(0,A.U)(yr),ft=$e(We),pt=ft.stream;return ft.lobes=function(Pt){return arguments.length?$e(We=+Pt):We},ft.stream=function(Pt){var St=ft.rotate(),kt=pt(Pt),ur=(ft.rotate([0,0]),pt(Pt));return ft.rotate(St),kt.sphere=function(){(0,ua.c)(an(180/We),ur)},kt},ft.scale(239.75)}function br(We){var $e=1+We,ft=l(1/$e),pt=C(ft),Pt=2*k(f/(St=f+4*pt*$e)),St,kt=.5*Pt*($e+k(We*(2+We))),ur=We*We,dr=$e*$e;function $t(mr,Er){var Ir=1-l(Er),Kr,hn;if(Ir&&Ir<2){var An=n-Er,Sn=25,Un;do{var wa=l(An),Ta=M(An),Aa=pt+L(wa,$e-Ta),Ca=1+dr-2*$e*Ta;An-=Un=(An-ur*pt-$e*wa+Ca*Aa-.5*Ir*St)/(2*$e*wa*Aa)}while(P(Un)>T&&--Sn>0);Kr=Pt*k(Ca),hn=mr*Aa/f}else Kr=Pt*(We+Ir),hn=mr*pt/f;return[Kr*l(hn),kt-Kr*M(hn)]}return $t.invert=function(mr,Er){var Ir=mr*mr+(Er-=kt)*Er,Kr=(1+dr-Ir/(Pt*Pt))/(2*$e),hn=x(Kr),An=l(hn),Sn=pt+L(An,$e-Kr);return[C(mr/k(Ir))*f/Sn,C(1-2*(hn-ur*pt-$e*An+(1+dr-2*$e*Kr)*Sn)/St)]},$t}function Vr(){var We=1,$e=(0,A.U)(br),ft=$e(We);return ft.ratio=function(pt){return arguments.length?$e(We=+pt):We},ft.scale(167.774).center([0,18.67])}var zr=.7109889596207567,Yr=.0528035274542;function dn(We,$e){return $e>-.7109889596207567?(We=Se(We,$e),We[1]+=Yr,We):Ze(We,$e)}dn.invert=function(We,$e){return $e>-.7109889596207567?Se.invert(We,$e-Yr):Ze.invert(We,$e)};function wn(){return(0,A.c)(dn).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function Tn(We,$e){return P($e)>zr?(We=Se(We,$e),We[1]-=$e>0?Yr:-.0528035274542,We):Ze(We,$e)}Tn.invert=function(We,$e){return P($e)>zr?Se.invert(We,$e+($e>0?Yr:-.0528035274542)):Ze.invert(We,$e)};function kn(){return(0,A.c)(Tn).scale(152.63)}function Pn(We,$e,ft,pt){var Pt=k(4*f/(2*ft+(1+We-$e/2)*l(2*ft)+(We+$e)/2*l(4*ft)+$e/2*l(6*ft))),St=k(pt*l(ft)*k((1+We*M(2*ft)+$e*M(4*ft))/(1+We+$e))),kt=ft*dr(1);function ur(Er){return k(1+We*M(2*Er)+$e*M(4*Er))}function dr(Er){var Ir=Er*ft;return(2*Ir+(1+We-$e/2)*l(2*Ir)+(We+$e)/2*l(4*Ir)+$e/2*l(6*Ir))/ft}function $t(Er){return ur(Er)*l(Er)}var mr=function(Er,Ir){var Kr=ft*we(dr,kt*l(Ir)/ft,Ir/f);isNaN(Kr)&&(Kr=ft*u(Ir));var hn=Pt*ur(Kr);return[hn*St*Er/f*M(Kr),hn/St*l(Kr)]};return mr.invert=function(Er,Ir){var Kr=we($t,Ir*St/Pt);return[Er*f/(M(Kr)*Pt*St*ur(Kr)),C(ft*dr(Kr/ft)/kt)]},ft===0&&(Pt=k(pt/f),mr=function(Er,Ir){return[Er*Pt,l(Ir)/Pt]},mr.invert=function(Er,Ir){return[Er/Pt,C(Ir*Pt)]}),mr}function fa(){var We=1,$e=0,ft=45*w,pt=2,Pt=(0,A.U)(Pn),St=Pt(We,$e,ft,pt);return St.a=function(kt){return arguments.length?Pt(We=+kt,$e,ft,pt):We},St.b=function(kt){return arguments.length?Pt(We,$e=+kt,ft,pt):$e},St.psiMax=function(kt){return arguments.length?Pt(We,$e,ft=+kt*w,pt):ft*S},St.ratio=function(kt){return arguments.length?Pt(We,$e,ft,pt=+kt):pt},St.scale(180.739)}function $n(We,$e,ft,pt,Pt,St,kt,ur,dr,$t,mr){if(mr.nanEncountered)return NaN;var Er,Ir,Kr,hn,An,Sn,Un,wa,Ta,Aa;if(Er=ft-$e,Ir=We($e+Er*.25),Kr=We(ft-Er*.25),isNaN(Ir)){mr.nanEncountered=!0;return}if(isNaN(Kr)){mr.nanEncountered=!0;return}return hn=Er*(pt+4*Ir+Pt)/12,An=Er*(Pt+4*Kr+St)/12,Sn=hn+An,Aa=(Sn-kt)/15,$t>dr?(mr.maxDepthCount++,Sn+Aa):Math.abs(Aa)>1;do dr[Sn]>Kr?An=Sn:hn=Sn,Sn=hn+An>>1;while(Sn>hn);var Un=dr[Sn+1]-dr[Sn];return Un&&(Un=(Kr-dr[Sn+1])/Un),(Sn+1+Un)/kt}var Er=2*mr(1)/f*St/ft,Ir=function(Kr,hn){var An=mr(P(l(hn))),Sn=pt(An)*Kr;return An/=Er,[Sn,hn>=0?An:-An]};return Ir.invert=function(Kr,hn){var An;return hn*=Er,P(hn)<1&&(An=u(hn)*C(Pt(P(hn))*St)),[Kr/pt(P(hn)),An]},Ir}function ni(){var We=0,$e=2.5,ft=1.183136,pt=(0,A.U)(ba),Pt=pt(We,$e,ft);return Pt.alpha=function(St){return arguments.length?pt(We=+St,$e,ft):We},Pt.k=function(St){return arguments.length?pt(We,$e=+St,ft):$e},Pt.gamma=function(St){return arguments.length?pt(We,$e,ft=+St):ft},Pt.scale(152.63)}function Xa(We,$e){return P(We[0]-$e[0])=0;--dr)ft=We[1][dr],pt=ft[0][0],Pt=ft[0][1],St=ft[1][1],kt=ft[2][0],ur=ft[2][1],$e.push(uo([[kt-h,ur-h],[kt-h,St+h],[pt+h,St+h],[pt+h,Pt-h]],30));return{type:"Polygon",coordinates:[(0,Gn.Uf)($e)]}}function Oi(We,$e,ft){var pt,Pt;function St(dr,$t){for(var mr=$t<0?-1:1,Er=$e[+($t<0)],Ir=0,Kr=Er.length-1;IrEr[Ir][2][0];++Ir);var hn=We(dr-Er[Ir][1][0],$t);return hn[0]+=We(Er[Ir][1][0],mr*$t>mr*Er[Ir][0][1]?Er[Ir][0][1]:$t)[0],hn}ft?St.invert=ft(St):We.invert&&(St.invert=function(dr,$t){for(var mr=Pt[+($t<0)],Er=$e[+($t<0)],Ir=0,Kr=mr.length;Irhn&&(An=Kr,Kr=hn,hn=An),[[Er,Kr],[Ir,hn]]})}),kt):$e.map(function($t){return $t.map(function(mr){return[[mr[0][0]*S,mr[0][1]*S],[mr[1][0]*S,mr[1][1]*S],[mr[2][0]*S,mr[2][1]*S]]})})},$e!=null&&kt.lobes($e),kt}var Ls=[[[[-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 jl(){return Oi(Ne,Ls).scale(160.857)}var bu=[[[[-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 Ga(){return Oi(Tn,bu).scale(152.63)}var qs=[[[[-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 Kl(){return Oi(Se,qs).scale(169.529)}var Ii=[[[[-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 $i(){return Oi(Se,Ii).scale(169.529).rotate([20,0])}var Ps=[[[[-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 Ll(){return Oi(dn,Ps,me).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var xi=[[[[-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 Rs(){return Oi(Ze,xi).scale(152.63).rotate([-20,0])}function Ti(We,$e){return[3/p*We*k(f*f/3-$e*$e),$e]}Ti.invert=function(We,$e){return[p/3*We/k(f*f/3-$e*$e),$e]};function Ci(){return(0,A.c)(Ti).scale(158.837)}function Ds(We){function $e(ft,pt){if(P(P(pt)-n)2)return null;ft/=2,pt/=2;var St=ft*ft,kt=pt*pt,ur=2*pt/(1+St+kt);return ur=a((1+ur)/(1-ur),1/We),[L(2*ft,1-St-kt)/We,C((ur-1)/(ur+1))]},$e}function Bi(){var We=.5,$e=(0,A.U)(Ds),ft=$e(We);return ft.spacing=function(pt){return arguments.length?$e(We=+pt):We},ft.scale(124.75)}var Ni=f/b;function fo(We,$e){return[We*(1+k(M($e)))/2,$e/(M($e/2)*M(We/6))]}fo.invert=function(We,$e){var ft=P(We),pt=P($e),Pt=h,St=n;pth||P(Sn)>h)&&--Pt>0);return Pt&&[ft,pt]};function nf(){return(0,A.c)(io).scale(139.98)}function _o(We,$e){return[l(We)/M($e),y($e)*M(We)]}_o.invert=function(We,$e){var ft=We*We,pt=$e*$e,Pt=pt+1,St=ft+Pt,kt=We?m*k((St-k(St*St-4*ft))/ft):1/k(Pt);return[C(We*kt),u($e)*x(kt)]};function ki(){return(0,A.c)(_o).scale(144.049).clipAngle(89.999)}function Jl(We){var $e=M(We),ft=y(v+We/2);function pt(Pt,St){var kt=St-We,ur=P(kt)=0;)mr=We[$t],Er=mr[0]+ur*(Kr=Er)-dr*Ir,Ir=mr[1]+ur*Ir+dr*Kr;return Er=ur*(Kr=Er)-dr*Ir,Ir=ur*Ir+dr*Kr,[Er,Ir]}return ft.invert=function(pt,Pt){var St=20,kt=pt,ur=Pt;do{for(var dr=$e,$t=We[dr],mr=$t[0],Er=$t[1],Ir=0,Kr=0,hn;--dr>=0;)$t=We[dr],Ir=mr+kt*(hn=Ir)-ur*Kr,Kr=Er+kt*Kr+ur*hn,mr=$t[0]+kt*(hn=mr)-ur*Er,Er=$t[1]+kt*Er+ur*hn;Ir=mr+kt*(hn=Ir)-ur*Kr,Kr=Er+kt*Kr+ur*hn,mr=kt*(hn=mr)-ur*Er-pt,Er=kt*Er+ur*hn-Pt;var An=Ir*Ir+Kr*Kr,Sn,Un;kt-=Sn=(mr*Ir+Er*Kr)/An,ur-=Un=(Er*Ir-mr*Kr)/An}while(P(Sn)+P(Un)>h*h&&--St>0);if(St){var wa=k(kt*kt+ur*ur),Ta=2*o(wa*.5),Aa=l(Ta);return[L(kt*Aa,wa*M(Ta)),wa?C(ur*Aa/wa):0]}},ft}var af=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Pl=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],of=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],sf=[[.9245,0],[0,0],[.01943,0]],lf=[[.721316,0],[0,0],[-.00881625,-.00617325]];function $l(){return ds(af,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function uf(){return ds(Pl,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function ff(){return ds(of,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function Au(){return ds(sf,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function Mu(){return ds(lf,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function ds(We,$e){var ft=(0,A.c)(Tu(We)).rotate($e).clipAngle(90),pt=(0,Ue.c)($e),Pt=ft.center;return delete ft.rotate,ft.center=function(St){return arguments.length?Pt(pt(St)):pt.invert(Pt())},ft}var Is=k(6),el=k(7);function tl(We,$e){var ft=C(7*l($e)/(3*Is));return[Is*We*(2*M(2*ft/3)-1)/el,9*l(ft/3)/el]}tl.invert=function(We,$e){var ft=3*C($e*el/9);return[We*el/(Is*(2*M(2*ft/3)-1)),C(l(ft)*3*Is/7)]};function Su(){return(0,A.c)(tl).scale(164.859)}function Wo(We,$e){for(var ft=(1+m)*l($e),pt=$e,Pt=0,St;Pt<25&&(pt-=St=(l(pt/2)+l(pt)-ft)/(.5*M(pt/2)+M(pt)),!(P(St)T&&--pt>0);return St=ft*ft,kt=St*St,ur=St*kt,[We/(.84719-.13063*St+ur*ur*(-.04515+.05494*St-.02326*kt+.00331*ur)),ft]};function bo(){return(0,A.c)(Dl).scale(175.295)}function ks(We,$e){return[We*(1+M($e))/2,2*($e-y($e/2))]}ks.invert=function(We,$e){for(var ft=$e/2,pt=0,Pt=1/0;pt<10&&P(Pt)>h;++pt){var St=M($e/2);$e-=Pt=($e-y($e/2)-ft)/(1-.5/(St*St))}return[2*We/(1+M($e)),$e]};function ps(){return(0,A.c)(ks).scale(152.63)}var rl=[[[[-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 ts(){return Oi(ne(1/0),rl).rotate([20,0]).scale(152.63)}function Fo(We,$e){var ft=l($e),pt=M($e),Pt=u(We);if(We===0||P($e)===n)return[0,$e];if($e===0)return[We,0];if(P(We)===n)return[We*pt,n*ft];var St=f/(2*We)-2*We/f,kt=2*$e/f,ur=(1-kt*kt)/(ft-kt),dr=St*St,$t=ur*ur,mr=1+dr/$t,Er=1+$t/dr,Ir=(St*ft/ur-St/2)/mr,Kr=($t*ft/dr+ur/2)/Er,hn=Ir*Ir+pt*pt/mr,An=Kr*Kr-($t*ft*ft/dr+ur*ft-1)/Er;return[n*(Ir+k(hn)*Pt),n*(Kr+k(An<0?0:An)*u(-$e*St)*Pt)]}Fo.invert=function(We,$e){We/=n,$e/=n;var ft=We*We,pt=$e*$e,Pt=ft+pt,St=f*f;return[We?(Pt-1+k((1-Pt)*(1-Pt)+4*ft))/(2*We)*n:0,we(function(kt){return Pt*(f*l(kt)-2*kt)*f+4*kt*kt*($e-l(kt))+2*f*kt-St*$e},0)]};function ql(){return(0,A.c)(Fo).scale(127.267)}var _s=1.0148,wo=.23185,yi=-.14499,eu=.02406,hf=_s,Il=5*wo,zs=7*yi,Fs=9*eu,vo=1.790857183;function kl(We,$e){var ft=$e*$e;return[We,$e*(_s+ft*ft*(wo+ft*(yi+eu*ft)))]}kl.invert=function(We,$e){$e>vo?$e=vo:$e<-1.790857183&&($e=-1.790857183);var ft=$e,pt;do{var Pt=ft*ft;ft-=pt=(ft*(_s+Pt*Pt*(wo+Pt*(yi+eu*Pt)))-$e)/(hf+Pt*Pt*(Il+Pt*(zs+Fs*Pt)))}while(P(pt)>h);return[We,ft]};function Os(){return(0,A.c)(kl).scale(139.319)}function _l(We,$e){if(P($e)h&&--Pt>0);return kt=y(pt),[(P($e)=0;)if(pt=$e[ur],ft[0]===pt[0]&&ft[1]===pt[1]){if(St)return[St,ft];St=ft}}}function au(We){for(var $e=We.length,ft=[],pt=We[$e-1],Pt=0;Pt<$e;++Pt)ft.push([pt,pt=We[Pt]]);return ft}function gs(We){return We.project.invert||We.children&&We.children.some(gs)}var rs=e(53285),Ol=[[0,90],[-90,0],[0,0],[90,0],[180,0],[0,-90]],bi=[[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(We){return We.map(function($e){return Ol[$e]})});function al(We){We=We||function(ft){var pt=(0,Pe.c)({type:"MultiPoint",coordinates:ft});return(0,rs.c)().scale(1).translate([0,0]).rotate([-pt[0],-pt[1]])};var $e=bi.map(function(ft){return{face:ft,project:We(ft)}});return[-1,0,0,1,0,1,4,5].forEach(function(ft,pt){var Pt=$e[ft];Pt&&(Pt.children||(Pt.children=[])).push($e[pt])}),ai($e[0],function(ft,pt){return $e[ft<-f/2?pt<0?6:4:ft<0?pt<0?2:0:ft0?[-pt[0],0]:[180-pt[0],180])};var $e=bi.map(function(ft){return{face:ft,project:We(ft)}});return[-1,0,0,1,0,1,4,5].forEach(function(ft,pt){var Pt=$e[ft];Pt&&(Pt.children||(Pt.children=[])).push($e[pt])}),ai($e[0],function(ft,pt){return $e[ft<-f/2?pt<0?6:4:ft<0?pt<0?2:0:ftpt^Kr>pt&&ft<(Ir-$t)*(pt-mr)/(Kr-mr)+$t&&(Pt=!Pt)}return Pt}function gf(We,$e){var ft=$e.stream,pt;if(!ft)throw new Error("invalid projection");switch(We&&We.type){case"Feature":pt=iu;break;case"FeatureCollection":pt=yf;break;default:pt=Ns;break}return pt(We,ft)}function yf(We,$e){return{type:"FeatureCollection",features:We.features.map(function(ft){return iu(ft,$e)})}}function iu(We,$e){return{type:"Feature",id:We.id,properties:We.properties,geometry:Ns(We.geometry,$e)}}function Du(We,$e){return{type:"GeometryCollection",geometries:We.geometries.map(function(ft){return Ns(ft,$e)})}}function Ns(We,$e){if(!We)return null;if(We.type==="GeometryCollection")return Du(We,$e);var ft;switch(We.type){case"Point":ft=Us;break;case"MultiPoint":ft=Us;break;case"LineString":ft=Iu;break;case"MultiLineString":ft=Iu;break;case"Polygon":ft=ol;break;case"MultiPolygon":ft=ol;break;case"Sphere":ft=ol;break;default:return null}return(0,ua.c)(We,$e(ft)),ft.result()}var _i=[],co=[],Us={point:function(We,$e){_i.push([We,$e])},result:function(){var We=_i.length?_i.length<2?{type:"Point",coordinates:_i[0]}:{type:"MultiPoint",coordinates:_i}:null;return _i=[],We}},Iu={lineStart:il,point:function(We,$e){_i.push([We,$e])},lineEnd:function(){_i.length&&(co.push(_i),_i=[])},result:function(){var We=co.length?co.length<2?{type:"LineString",coordinates:co[0]}:{type:"MultiLineString",coordinates:co}:null;return co=[],We}},ol={polygonStart:il,lineStart:il,point:function(We,$e){_i.push([We,$e])},lineEnd:function(){var We=_i.length;if(We){do _i.push(_i[0].slice());while(++We<4);co.push(_i),_i=[]}},polygonEnd:il,result:function(){if(!co.length)return null;var We=[],$e=[];return co.forEach(function(ft){df(ft)?We.push([ft]):$e.push(ft)}),$e.forEach(function(ft){var pt=ft[0];We.some(function(Pt){if(pf(Pt[0],pt))return Pt.push(ft),!0})||We.push([ft])}),co=[],We.length?We.length>1?{type:"MultiPolygon",coordinates:We}:{type:"Polygon",coordinates:We[0]}:null}};function Zo(We){var $e=We(n,0)[0]-We(-n,0)[0];function ft(pt,Pt){var St=P(pt)0?pt-f:pt+f,Pt),ur=(kt[0]-kt[1])*m,dr=(kt[0]+kt[1])*m;if(St)return[ur,dr];var $t=$e*m,mr=ur>0^dr>0?-1:1;return[mr*ur-u(dr)*$t,mr*dr-u(ur)*$t]}return We.invert&&(ft.invert=function(pt,Pt){var St=(pt+Pt)*m,kt=(Pt-pt)*m,ur=P(St)<.5*$e&&P(kt)<.5*$e;if(!ur){var dr=$e*m,$t=St>0^kt>0?-1:1,mr=-$t*pt+(kt>0?1:-1)*dr,Er=-$t*Pt+(St>0?1:-1)*dr;St=(-mr-Er)*m,kt=(mr-Er)*m}var Ir=We.invert(St,kt);return ur||(Ir[0]+=St>0?f:-f),Ir}),(0,A.c)(ft).rotate([-90,-90,45]).clipAngle(179.999)}function mf(){return Zo(ln).scale(176.423)}function ku(){return Zo(pr).scale(111.48)}function _u(We,$e){if(!(0<=($e=+$e)&&$e<=20))throw new Error("invalid digits");function ft($t){var mr=$t.length,Er=2,Ir=new Array(mr);for(Ir[0]=+$t[0].toFixed($e),Ir[1]=+$t[1].toFixed($e);Er2||Kr[0]!=mr[0]||Kr[1]!=mr[1])&&(Er.push(Kr),mr=Kr)}return Er.length===1&&$t.length>1&&Er.push(ft($t[$t.length-1])),Er}function St($t){return $t.map(Pt)}function kt($t){if($t==null)return $t;var mr;switch($t.type){case"GeometryCollection":mr={type:"GeometryCollection",geometries:$t.geometries.map(kt)};break;case"Point":mr={type:"Point",coordinates:ft($t.coordinates)};break;case"MultiPoint":mr={type:$t.type,coordinates:pt($t.coordinates)};break;case"LineString":mr={type:$t.type,coordinates:Pt($t.coordinates)};break;case"MultiLineString":case"Polygon":mr={type:$t.type,coordinates:St($t.coordinates)};break;case"MultiPolygon":mr={type:"MultiPolygon",coordinates:$t.coordinates.map(St)};break;default:return $t}return $t.bbox!=null&&(mr.bbox=$t.bbox),mr}function ur($t){var mr={type:"Feature",properties:$t.properties,geometry:kt($t.geometry)};return $t.id!=null&&(mr.id=$t.id),$t.bbox!=null&&(mr.bbox=$t.bbox),mr}if(We!=null)switch(We.type){case"Feature":return ur(We);case"FeatureCollection":{var dr={type:"FeatureCollection",features:We.features.map(ur)};return We.bbox!=null&&(dr.bbox=We.bbox),dr}default:return kt(We)}return We}function ou(We){var $e=l(We);function ft(pt,Pt){var St=$e?y(pt*$e/2)/$e:pt/2;if(!Pt)return[2*St,-We];var kt=2*o(St*l(Pt)),ur=1/y(Pt);return[l(kt)*ur,Pt+(1-M(kt))*ur-We]}return ft.invert=function(pt,Pt){if(P(Pt+=We)h&&--ur>0);var Ir=pt*($t=y(kt)),Kr=y(P(Pt)0?n:-n)*(dr+Pt*(mr-kt)/2+Pt*Pt*(mr-2*dr+kt)/2)]}Eo.invert=function(We,$e){var ft=$e/n,pt=ft*90,Pt=s(18,P(pt/5)),St=t(0,g(Pt));do{var kt=qi[St][1],ur=qi[St+1][1],dr=qi[s(19,St+2)][1],$t=dr-kt,mr=dr-2*ur+kt,Er=2*(P(ft)-ur)/$t,Ir=mr/$t,Kr=Er*(1-Ir*Er*(1-2*Ir*Er));if(Kr>=0||St===1){pt=($e>=0?5:-5)*(Kr+Pt);var hn=50,An;do Pt=s(18,P(pt)/5),St=g(Pt),Kr=Pt-St,kt=qi[St][1],ur=qi[St+1][1],dr=qi[s(19,St+2)][1],pt-=(An=($e>=0?n:-n)*(ur+Kr*(dr-kt)/2+Kr*Kr*(dr-2*ur+kt)/2)-$e)*S;while(P(An)>T&&--hn>0);break}}while(--St>=0);var Sn=qi[St][0],Un=qi[St+1][0],wa=qi[s(19,St+2)][0];return[We/(Un+Kr*(wa-Sn)/2+Kr*Kr*(wa-2*Un+Sn)/2),pt*w]};function as(){return(0,A.c)(Eo).scale(152.63)}function Vs(We){function $e(ft,pt){var Pt=M(pt),St=(We-1)/(We-Pt*M(ft));return[St*Pt*l(ft),St*l(pt)]}return $e.invert=function(ft,pt){var Pt=ft*ft+pt*pt,St=k(Pt),kt=(We-k(1-Pt*(We+1)/(We-1)))/((We-1)/St+St/(We-1));return[L(ft*kt,St*k(1-kt*kt)),St?C(pt*kt/St):0]},$e}function Bl(We,$e){var ft=Vs(We);if(!$e)return ft;var pt=M($e),Pt=l($e);function St(kt,ur){var dr=ft(kt,ur),$t=dr[1],mr=$t*Pt/(We-1)+pt;return[dr[0]*pt/mr,$t/mr]}return St.invert=function(kt,ur){var dr=(We-1)/(We-1-ur*Pt);return ft.invert(dr*kt,dr*ur*pt)},St}function ms(){var We=2,$e=0,ft=(0,A.U)(Bl),pt=ft(We,$e);return pt.distance=function(Pt){return arguments.length?ft(We=+Pt,$e):We},pt.tilt=function(Pt){return arguments.length?ft(We,$e=Pt*w):$e*S},pt.scale(432.147).clipAngle(x(1/We)*S-1e-6)}var xs=1e-4,Fu=1e4,jo=-180,Hs=jo+xs,is=180,Ko=is-xs,sl=-90,Gs=sl+xs,ti=90,Ws=ti-xs;function Nl(We){return We.length>0}function Ou(We){return Math.floor(We*Fu)/Fu}function Ys(We){return We===sl||We===ti?[0,We]:[jo,Ou(We)]}function ll(We){var $e=We[0],ft=We[1],pt=!1;return $e<=Hs?($e=jo,pt=!0):$e>=Ko&&($e=is,pt=!0),ft<=Gs?(ft=sl,pt=!0):ft>=Ws&&(ft=ti,pt=!0),pt?[$e,ft]:We}function Ul(We){return We.map(ll)}function su(We,$e,ft){for(var pt=0,Pt=We.length;pt=Ko||mr<=Gs||mr>=Ws){St[kt]=ll(dr);for(var Er=kt+1;ErHs&&KrGs&&hn=ur)break;ft.push({index:-1,polygon:$e,ring:St=St.slice(Er-1)}),St[0]=Ys(St[0][1]),kt=-1,ur=St.length}}}}function ul(We){var $e,ft=We.length,pt={},Pt={},St,kt,ur,dr,$t;for($e=0;$e0?f-ur:ur)*S],$t=(0,A.c)(We(kt)).rotate(dr),mr=(0,Ue.c)(dr),Er=$t.center;return delete $t.rotate,$t.center=function(Ir){return arguments.length?Er(mr(Ir)):mr.invert(Er())},$t.clipAngle(90)}function lu(We){var $e=M(We);function ft(pt,Pt){var St=(0,rs.Y)(pt,Pt);return St[0]*=$e,St}return ft.invert=function(pt,Pt){return rs.Y.invert(pt/$e,Pt)},ft}function bs(){return Vl([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function Vl(We,$e){return Oo(lu,We,$e)}function hl(We){if(!(We*=2))return ae.O;var $e=-We/2,ft=-$e,pt=We*We,Pt=y(ft),St=.5/l(ft);function kt(ur,dr){var $t=x(M(dr)*M(ur-$e)),mr=x(M(dr)*M(ur-ft)),Er=dr<0?-1:1;return $t*=$t,mr*=mr,[($t-mr)/(2*We),Er*k(4*pt*mr-(pt-$t+mr)*(pt-$t+mr))/(2*We)]}return kt.invert=function(ur,dr){var $t=dr*dr,mr=M(k($t+(Ir=ur+$e)*Ir)),Er=M(k($t+(Ir=ur+ft)*Ir)),Ir,Kr;return[L(Kr=mr-Er,Ir=(mr+Er)*Pt),(dr<0?-1:1)*x(k(Ir*Ir+Kr*Kr)*St)]},kt}function xf(){return Bu([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Bu(We,$e){return Oo(hl,We,$e)}function ji(We,$e){if(P($e)h&&--ur>0);return[u(We)*(k(Pt*Pt+4)+Pt)*f/4,n*kt]};function dl(){return(0,A.c)(oo).scale(127.16)}function Hl(We,$e,ft,pt,Pt){function St(kt,ur){var dr=ft*l(pt*ur),$t=k(1-dr*dr),mr=k(2/(1+$t*M(kt*=Pt)));return[We*$t*mr*l(kt),$e*dr*mr]}return St.invert=function(kt,ur){var dr=kt/We,$t=ur/$e,mr=k(dr*dr+$t*$t),Er=2*C(mr/2);return[L(kt*y(Er),We*mr)/Pt,mr&&C(ur*l(Er)/($e*ft*mr))/pt]},St}function Jo(We,$e,ft,pt){var Pt=f/3;We=t(We,h),$e=t($e,h),We=s(We,n),$e=s($e,f-h),ft=t(ft,0),ft=s(ft,100-h),pt=t(pt,h);var St=ft/100+1,kt=pt/100,ur=x(St*M(Pt))/Pt,dr=l(We)/l(ur*n),$t=$e/f,mr=k(kt*l(We/2)/l($e/2)),Er=mr/k($t*dr*ur),Ir=1/(mr*k($t*dr*ur));return Hl(Er,Ir,dr,ur,$t)}function us(){var We=65*w,$e=60*w,ft=20,pt=200,Pt=(0,A.U)(Jo),St=Pt(We,$e,ft,pt);return St.poleline=function(kt){return arguments.length?Pt(We=+kt*w,$e,ft,pt):We*S},St.parallels=function(kt){return arguments.length?Pt(We,$e=+kt*w,ft,pt):$e*S},St.inflation=function(kt){return arguments.length?Pt(We,$e,ft=+kt,pt):ft},St.ratio=function(kt){return arguments.length?Pt(We,$e,ft,pt=+kt):pt},St.scale(163.775)}function uu(){return us().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var pl=4*f+3*k(3),yl=2*k(2*f*k(3)/pl),Gl=ye(yl*k(3)/f,yl,pl/6);function Uu(){return(0,A.c)(Gl).scale(176.84)}function ml(We,$e){return[We*k(1-3*$e*$e/(f*f)),$e]}ml.invert=function(We,$e){return[We/k(1-3*$e*$e/(f*f)),$e]};function fu(){return(0,A.c)(ml).scale(152.63)}function ws(We,$e){var ft=M($e),pt=M(We)*ft,Pt=1-pt,St=M(We=L(l(We)*ft,-l($e))),kt=l(We);return ft=k(1-pt*pt),[kt*ft-St*Pt,-St*ft-kt*Pt]}ws.invert=function(We,$e){var ft=(We*We+$e*$e)/-2,pt=k(-ft*(2+ft)),Pt=$e*ft+We*pt,St=We*ft-$e*pt,kt=k(St*St+Pt*Pt);return[L(pt*Pt,kt*(1+ft)),kt?-C(pt*St/kt):0]};function cu(){return(0,A.c)(ws).rotate([0,-90,45]).scale(124.75).clipAngle(179.999)}function xl(We,$e){var ft=V(We,$e);return[(ft[0]+We/n)/2,(ft[1]+$e)/2]}xl.invert=function(We,$e){var ft=We,pt=$e,Pt=25;do{var St=M(pt),kt=l(pt),ur=l(2*pt),dr=kt*kt,$t=St*St,mr=l(ft),Er=M(ft/2),Ir=l(ft/2),Kr=Ir*Ir,hn=1-$t*Er*Er,An=hn?x(St*Er)*k(Sn=1/hn):Sn=0,Sn,Un=.5*(2*An*St*Ir+ft/n)-We,wa=.5*(An*kt+pt)-$e,Ta=.5*Sn*($t*Kr+An*St*Er*dr)+.5/n,Aa=Sn*(mr*ur/4-An*kt*Ir),Ca=.125*Sn*(ur*Ir-An*kt*$t*mr),Oa=.5*Sn*(dr*Er+An*Kr*St)+.5,ri=Aa*Ca-Oa*Ta,wi=(wa*Aa-Un*Oa)/ri,se=(Un*Ca-wa*Ta)/ri;ft-=wi,pt-=se}while((P(wi)>h||P(se)>h)&&--Pt>0);return[ft,pt]};function Vu(){return(0,A.c)(xl).scale(158.837)}},88728:function(te,X,e){e.d(X,{c:function(){return A}});function A(){return new P}function P(){this.reset()}P.prototype={constructor:P,reset:function(){this.s=this.t=0},add:function(M){L(o,M,this.t),L(this,o.s,this.s),this.s?this.t+=o.t:this.s=o.t},valueOf:function(){return this.s}};var o=new P;function L(M,d,g){var r=M.s=d+g,t=r-d,s=r-t;M.t=d-s+(g-t)}},95384:function(te,X,e){e.d(X,{cp:function(){return T},mQ:function(){return M},oB:function(){return c}});var A=e(88728),P=e(64528),o=e(70932),L=e(16016),M=(0,A.c)(),d=(0,A.c)(),g,r,t,s,a,c={point:o.c,lineStart:o.c,lineEnd:o.c,polygonStart:function(){M.reset(),c.lineStart=u,c.lineEnd=l},polygonEnd:function(){var f=+M;d.add(f<0?P.kD+f:f),this.lineStart=this.lineEnd=this.point=o.c},sphere:function(){d.add(P.kD)}};function u(){c.point=y}function l(){h(g,r)}function y(f,n){c.point=h,g=f,r=n,f*=P.qw,n*=P.qw,t=f,s=(0,P.W8)(n=n/2+P.wL),a=(0,P.g$)(n)}function h(f,n){f*=P.qw,n*=P.qw,n=n/2+P.wL;var v=f-t,m=v>=0?1:-1,b=m*v,E=(0,P.W8)(n),p=(0,P.g$)(n),S=a*p,w=s*E+S*(0,P.W8)(b),i=S*m*(0,P.g$)(b);M.add((0,P.WE)(i,w)),t=f,s=E,a=p}function T(f){return d.reset(),(0,L.c)(f,c),d*2}},13696:function(te,X,e){e.d(X,{c:function(){return C}});var A=e(88728),P=e(95384),o=e(84220),L=e(64528),M=e(16016),d,g,r,t,s,a,c,u,l=(0,A.c)(),y,h,T={point:f,lineStart:v,lineEnd:m,polygonStart:function(){T.point=b,T.lineStart=E,T.lineEnd=p,l.reset(),P.oB.polygonStart()},polygonEnd:function(){P.oB.polygonEnd(),T.point=f,T.lineStart=v,T.lineEnd=m,P.mQ<0?(d=-(r=180),g=-(t=90)):l>L.Gg?t=90:l<-L.Gg&&(g=-90),h[0]=d,h[1]=r},sphere:function(){d=-(r=180),g=-(t=90)}};function f(x,k){y.push(h=[d=x,r=x]),kt&&(t=k)}function n(x,k){var I=(0,o.ux)([x*L.qw,k*L.qw]);if(u){var B=(0,o.CW)(u,I),_=[B[1],-B[0],0],z=(0,o.CW)(_,B);(0,o.cJ)(z),z=(0,o.G)(z);var O=x-s,F=O>0?1:-1,N=z[0]*L.oh*F,V,j=(0,L.a2)(O)>180;j^(F*st&&(t=V)):(N=(N+360)%360-180,j^(F*st&&(t=k))),j?xS(d,r)&&(r=x):S(x,r)>S(d,r)&&(d=x):r>=d?(xr&&(r=x)):x>s?S(d,x)>S(d,r)&&(r=x):S(x,r)>S(d,r)&&(d=x)}else y.push(h=[d=x,r=x]);kt&&(t=k),u=I,s=x}function v(){T.point=n}function m(){h[0]=d,h[1]=r,T.point=f,u=null}function b(x,k){if(u){var I=x-s;l.add((0,L.a2)(I)>180?I+(I>0?360:-360):I)}else a=x,c=k;P.oB.point(x,k),n(x,k)}function E(){P.oB.lineStart()}function p(){b(a,c),P.oB.lineEnd(),(0,L.a2)(l)>L.Gg&&(d=-(r=180)),h[0]=d,h[1]=r,u=null}function S(x,k){return(k-=x)<0?k+360:k}function w(x,k){return x[0]-k[0]}function i(x,k){return x[0]<=x[1]?x[0]<=k&&k<=x[1]:kS(B[0],B[1])&&(B[1]=_[1]),S(_[0],B[1])>S(B[0],B[1])&&(B[0]=_[0])):z.push(B=_);for(O=-1/0,I=z.length-1,k=0,B=z[I];k<=I;B=_,++k)_=z[k],(F=S(B[1],_[0]))>O&&(O=F,d=_[0],r=B[1])}return y=h=null,d===1/0||g===1/0?[[NaN,NaN],[NaN,NaN]]:[[d,g],[r,t]]}},84220:function(te,X,e){e.d(X,{CW:function(){return M},Ez:function(){return L},G:function(){return P},cJ:function(){return r},mg:function(){return d},ux:function(){return o},wx:function(){return g}});var A=e(64528);function P(t){return[(0,A.WE)(t[1],t[0]),(0,A.qR)(t[2])]}function o(t){var s=t[0],a=t[1],c=(0,A.W8)(a);return[c*(0,A.W8)(s),c*(0,A.g$)(s),(0,A.g$)(a)]}function L(t,s){return t[0]*s[0]+t[1]*s[1]+t[2]*s[2]}function M(t,s){return[t[1]*s[2]-t[2]*s[1],t[2]*s[0]-t[0]*s[2],t[0]*s[1]-t[1]*s[0]]}function d(t,s){t[0]+=s[0],t[1]+=s[1],t[2]+=s[2]}function g(t,s){return[t[0]*s,t[1]*s,t[2]*s]}function r(t){var s=(0,A._I)(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=s,t[1]/=s,t[2]/=s}},24052:function(te,X,e){e.d(X,{c:function(){return I}});var A=e(64528),P=e(70932),o=e(16016),L,M,d,g,r,t,s,a,c,u,l,y,h,T,f,n,v={sphere:P.c,point:m,lineStart:E,lineEnd:w,polygonStart:function(){v.lineStart=i,v.lineEnd=C},polygonEnd:function(){v.lineStart=E,v.lineEnd=w}};function m(B,_){B*=A.qw,_*=A.qw;var z=(0,A.W8)(_);b(z*(0,A.W8)(B),z*(0,A.g$)(B),(0,A.g$)(_))}function b(B,_,z){++L,d+=(B-d)/L,g+=(_-g)/L,r+=(z-r)/L}function E(){v.point=p}function p(B,_){B*=A.qw,_*=A.qw;var z=(0,A.W8)(_);T=z*(0,A.W8)(B),f=z*(0,A.g$)(B),n=(0,A.g$)(_),v.point=S,b(T,f,n)}function S(B,_){B*=A.qw,_*=A.qw;var z=(0,A.W8)(_),O=z*(0,A.W8)(B),F=z*(0,A.g$)(B),N=(0,A.g$)(_),V=(0,A.WE)((0,A._I)((V=f*N-n*F)*V+(V=n*O-T*N)*V+(V=T*F-f*O)*V),T*O+f*F+n*N);M+=V,t+=V*(T+(T=O)),s+=V*(f+(f=F)),a+=V*(n+(n=N)),b(T,f,n)}function w(){v.point=m}function i(){v.point=x}function C(){k(y,h),v.point=m}function x(B,_){y=B,h=_,B*=A.qw,_*=A.qw,v.point=k;var z=(0,A.W8)(_);T=z*(0,A.W8)(B),f=z*(0,A.g$)(B),n=(0,A.g$)(_),b(T,f,n)}function k(B,_){B*=A.qw,_*=A.qw;var z=(0,A.W8)(_),O=z*(0,A.W8)(B),F=z*(0,A.g$)(B),N=(0,A.g$)(_),V=f*N-n*F,j=n*O-T*N,$=T*F-f*O,q=(0,A._I)(V*V+j*j+$*$),oe=(0,A.qR)(q),Z=q&&-oe/q;c+=Z*V,u+=Z*j,l+=Z*$,M+=oe,t+=oe*(T+(T=O)),s+=oe*(f+(f=F)),a+=oe*(n+(n=N)),b(T,f,n)}function I(B){L=M=d=g=r=t=s=a=c=u=l=0,(0,o.c)(B,v);var _=c,z=u,O=l,F=_*_+z*z+O*O;return F0?cu)&&(c+=a*o.kD));for(var T,f=c;a>0?f>u:f0?P.pi:-P.pi,l=(0,P.a2)(a-g);(0,P.a2)(l-P.pi)0?P.or:-P.or),d.point(t,r),d.lineEnd(),d.lineStart(),d.point(u,r),d.point(a,r),s=0):t!==u&&l>=P.pi&&((0,P.a2)(g-t)P.Gg?(0,P.MQ)(((0,P.g$)(g)*(a=(0,P.W8)(t))*(0,P.g$)(r)-(0,P.g$)(t)*(s=(0,P.W8)(g))*(0,P.g$)(d))/(s*a*c)):(g+t)/2}function M(d,g,r,t){var s;if(d==null)s=r*P.or,t.point(-P.pi,s),t.point(0,s),t.point(P.pi,s),t.point(P.pi,0),t.point(P.pi,-s),t.point(0,-s),t.point(-P.pi,-s),t.point(-P.pi,0),t.point(-P.pi,s);else if((0,P.a2)(d[0]-g[0])>P.Gg){var a=d[0]1&&o.push(o.pop().concat(o.shift()))},result:function(){var M=o;return o=[],L=null,M}}}},2728:function(te,X,e){e.d(X,{c:function(){return d}});var A=e(84220),P=e(61780),o=e(64528),L=e(41860),M=e(14229);function d(g){var r=(0,o.W8)(g),t=6*o.qw,s=r>0,a=(0,o.a2)(r)>o.Gg;function c(T,f,n,v){(0,P.Q)(v,g,t,n,T,f)}function u(T,f){return(0,o.W8)(T)*(0,o.W8)(f)>r}function l(T){var f,n,v,m,b;return{lineStart:function(){m=v=!1,b=1},point:function(E,p){var S=[E,p],w,i=u(E,p),C=s?i?0:h(E,p):i?h(E+(E<0?o.pi:-o.pi),p):0;if(!f&&(m=v=i)&&T.lineStart(),i!==v&&(w=y(f,S),(!w||(0,L.c)(f,w)||(0,L.c)(S,w))&&(S[2]=1)),i!==v)b=0,i?(T.lineStart(),w=y(S,f),T.point(w[0],w[1])):(w=y(f,S),T.point(w[0],w[1],2),T.lineEnd()),f=w;else if(a&&f&&s^i){var x;!(C&n)&&(x=y(S,f,!0))&&(b=0,s?(T.lineStart(),T.point(x[0][0],x[0][1]),T.point(x[1][0],x[1][1]),T.lineEnd()):(T.point(x[1][0],x[1][1]),T.lineEnd(),T.lineStart(),T.point(x[0][0],x[0][1],3)))}i&&(!f||!(0,L.c)(f,S))&&T.point(S[0],S[1]),f=S,v=i,n=C},lineEnd:function(){v&&T.lineEnd(),f=null},clean:function(){return b|(m&&v)<<1}}}function y(T,f,n){var v=(0,A.ux)(T),m=(0,A.ux)(f),b=[1,0,0],E=(0,A.CW)(v,m),p=(0,A.Ez)(E,E),S=E[0],w=p-S*S;if(!w)return!n&&T;var i=r*p/w,C=-r*S/w,x=(0,A.CW)(b,E),k=(0,A.wx)(b,i),I=(0,A.wx)(E,C);(0,A.mg)(k,I);var B=x,_=(0,A.Ez)(k,B),z=(0,A.Ez)(B,B),O=_*_-z*((0,A.Ez)(k,k)-1);if(!(O<0)){var F=(0,o._I)(O),N=(0,A.wx)(B,(-_-F)/z);if((0,A.mg)(N,k),N=(0,A.G)(N),!n)return N;var V=T[0],j=f[0],$=T[1],q=f[1],oe;j0^N[1]<((0,o.a2)(N[0]-V)o.pi^(V<=N[0]&&N[0]<=j)){var H=(0,A.wx)(B,(-_+F)/z);return(0,A.mg)(H,k),[N,(0,A.G)(H)]}}}function h(T,f){var n=s?g:o.pi-g,v=0;return T<-n?v|=1:T>n&&(v|=2),f<-n?v|=4:f>n&&(v|=8),v}return(0,M.c)(u,l,c,s?[0,-g]:[-o.pi,g-o.pi])}},14229:function(te,X,e){e.d(X,{c:function(){return d}});var A=e(97208),P=e(32232),o=e(64528),L=e(58196),M=e(84706);function d(t,s,a,c){return function(u){var l=s(u),y=(0,A.c)(),h=s(y),T=!1,f,n,v,m={point:b,lineStart:p,lineEnd:S,polygonStart:function(){m.point=w,m.lineStart=i,m.lineEnd=C,n=[],f=[]},polygonEnd:function(){m.point=b,m.lineStart=p,m.lineEnd=S,n=(0,M.Uf)(n);var x=(0,L.c)(f,c);n.length?(T||(u.polygonStart(),T=!0),(0,P.c)(n,r,x,a,u)):x&&(T||(u.polygonStart(),T=!0),u.lineStart(),a(null,null,1,u),u.lineEnd()),T&&(u.polygonEnd(),T=!1),n=f=null},sphere:function(){u.polygonStart(),u.lineStart(),a(null,null,1,u),u.lineEnd(),u.polygonEnd()}};function b(x,k){t(x,k)&&u.point(x,k)}function E(x,k){l.point(x,k)}function p(){m.point=E,l.lineStart()}function S(){m.point=b,l.lineEnd()}function w(x,k){v.push([x,k]),h.point(x,k)}function i(){h.lineStart(),v=[]}function C(){w(v[0][0],v[0][1]),h.lineEnd();var x=h.clean(),k=y.result(),I,B=k.length,_,z,O;if(v.pop(),f.push(v),v=null,!!B){if(x&1){if(z=k[0],(_=z.length-1)>0){for(T||(u.polygonStart(),T=!0),u.lineStart(),I=0;I<_;++I)u.point((O=z[I])[0],O[1]);u.lineEnd()}return}B>1&&x&2&&k.push(k.pop().concat(k.shift())),n.push(k.filter(g))}}return m}}function g(t){return t.length>1}function r(t,s){return((t=t.x)[0]<0?t[1]-o.or-o.Gg:o.or-t[1])-((s=s.x)[0]<0?s[1]-o.or-o.Gg:o.or-s[1])}},21676:function(te,X,e){e.d(X,{c:function(){return r}});var A=e(64528),P=e(97208);function o(t,s,a,c,u,l){var y=t[0],h=t[1],T=s[0],f=s[1],n=0,v=1,m=T-y,b=f-h,E;if(E=a-y,!(!m&&E>0)){if(E/=m,m<0){if(E0){if(E>v)return;E>n&&(n=E)}if(E=u-y,!(!m&&E<0)){if(E/=m,m<0){if(E>v)return;E>n&&(n=E)}else if(m>0){if(E0)){if(E/=b,b<0){if(E0){if(E>v)return;E>n&&(n=E)}if(E=l-h,!(!b&&E<0)){if(E/=b,b<0){if(E>v)return;E>n&&(n=E)}else if(b>0){if(E0&&(t[0]=y+n*m,t[1]=h+n*b),v<1&&(s[0]=y+v*m,s[1]=h+v*b),!0}}}}}var L=e(32232),M=e(84706),d=1e9,g=-1e9;function r(t,s,a,c){function u(f,n){return t<=f&&f<=a&&s<=n&&n<=c}function l(f,n,v,m){var b=0,E=0;if(f==null||(b=y(f,v))!==(E=y(n,v))||T(f,n)<0^v>0)do m.point(b===0||b===3?t:a,b>1?c:s);while((b=(b+v+4)%4)!==E);else m.point(n[0],n[1])}function y(f,n){return(0,A.a2)(f[0]-t)0?0:3:(0,A.a2)(f[0]-a)0?2:1:(0,A.a2)(f[1]-s)0?1:0:n>0?3:2}function h(f,n){return T(f.x,n.x)}function T(f,n){var v=y(f,1),m=y(n,1);return v!==m?v-m:v===0?n[1]-f[1]:v===1?f[0]-n[0]:v===2?f[1]-n[1]:n[0]-f[0]}return function(f){var n=f,v=(0,P.c)(),m,b,E,p,S,w,i,C,x,k,I,B={point:_,lineStart:N,lineEnd:V,polygonStart:O,polygonEnd:F};function _($,q){u($,q)&&n.point($,q)}function z(){for(var $=0,q=0,oe=b.length;qc&&(K-J)*(c-ae)>(Y-ae)*(t-J)&&++$:Y<=c&&(K-J)*(c-ae)<(Y-ae)*(t-J)&&--$;return $}function O(){n=v,m=[],b=[],I=!0}function F(){var $=z(),q=I&&$,oe=(m=(0,M.Uf)(m)).length;(q||oe)&&(f.polygonStart(),q&&(f.lineStart(),l(null,null,1,f),f.lineEnd()),oe&&(0,L.c)(m,h,$,l,f),f.polygonEnd()),n=f,m=b=E=null}function N(){B.point=j,b&&b.push(E=[]),k=!0,x=!1,i=C=NaN}function V(){m&&(j(p,S),w&&x&&v.rejoin(),m.push(v.result())),B.point=_,x&&n.lineEnd()}function j($,q){var oe=u($,q);if(b&&E.push([$,q]),k)p=$,S=q,w=oe,k=!1,oe&&(n.lineStart(),n.point($,q));else if(oe&&x)n.point($,q);else{var Z=[i=Math.max(g,Math.min(d,i)),C=Math.max(g,Math.min(d,C))],G=[$=Math.max(g,Math.min(d,$)),q=Math.max(g,Math.min(d,q))];o(Z,G,t,s,a,c)?(x||(n.lineStart(),n.point(Z[0],Z[1])),n.point(G[0],G[1]),oe||n.lineEnd(),I=!1):oe&&(n.lineStart(),n.point($,q),I=!1)}i=$,C=q,x=oe}return B}}},32232:function(te,X,e){e.d(X,{c:function(){return L}});var A=e(41860),P=e(64528);function o(d,g,r,t){this.x=d,this.z=g,this.o=r,this.e=t,this.v=!1,this.n=this.p=null}function L(d,g,r,t,s){var a=[],c=[],u,l;if(d.forEach(function(v){if(!((m=v.length-1)<=0)){var m,b=v[0],E=v[m],p;if((0,A.c)(b,E)){if(!b[2]&&!E[2]){for(s.lineStart(),u=0;u=0;--u)s.point((T=h[u])[0],T[1]);else t(f.x,f.p.x,-1,s);f=f.p}f=f.o,h=f.z,n=!n}while(!f.v);s.lineEnd()}}}function M(d){if(g=d.length){for(var g,r=0,t=d[0],s;++r0&&(Qr=w(or[un],or[un-1]),Qr>0&&Br<=Qr&&_r<=Qr&&(Br+_r-Qr)*(1-Math.pow((Br-_r)/Qr,2))a.Gg}).map(Jn)).concat((0,F.ik)((0,a.Km)(un/Kn)*Kn,Qr,Kn).filter(function(pn){return(0,a.a2)(pn%na)>a.Gg}).map(aa))}return fn.lines=function(){return zn().map(function(pn){return{type:"LineString",coordinates:pn}})},fn.outline=function(){return{type:"Polygon",coordinates:[pr(_r).concat($r(ln).slice(1),pr(Br).reverse().slice(1),$r(Mn).reverse().slice(1))]}},fn.extent=function(pn){return arguments.length?fn.extentMajor(pn).extentMinor(pn):fn.extentMinor()},fn.extentMajor=function(pn){return arguments.length?(_r=+pn[0][0],Br=+pn[1][0],Mn=+pn[0][1],ln=+pn[1][1],_r>Br&&(pn=_r,_r=Br,Br=pn),Mn>ln&&(pn=Mn,Mn=ln,ln=pn),fn.precision(Xr)):[[_r,Mn],[Br,ln]]},fn.extentMinor=function(pn){return arguments.length?(Lr=+pn[0][0],or=+pn[1][0],un=+pn[0][1],Qr=+pn[1][1],Lr>or&&(pn=Lr,Lr=or,or=pn),un>Qr&&(pn=un,un=Qr,Qr=pn),fn.precision(Xr)):[[Lr,un],[or,Qr]]},fn.step=function(pn){return arguments.length?fn.stepMajor(pn).stepMinor(pn):fn.stepMinor()},fn.stepMajor=function(pn){return arguments.length?(sa=+pn[0],na=+pn[1],fn):[sa,na]},fn.stepMinor=function(pn){return arguments.length?(Dn=+pn[0],Kn=+pn[1],fn):[Dn,Kn]},fn.precision=function(pn){return arguments.length?(Xr=+pn,Jn=N(un,Qr,90),aa=V(Lr,or,Xr),pr=N(Mn,ln,90),$r=V(_r,Br,Xr),fn):Xr},fn.extentMajor([[-180,-90+a.Gg],[180,90-a.Gg]]).extentMinor([[-180,-80-a.Gg],[180,80+a.Gg]])}function $(){return j()()}var q=e(27284),oe=e(7376),Z=(0,s.c)(),G=(0,s.c)(),re,H,J,ae,K={point:c.c,lineStart:c.c,lineEnd:c.c,polygonStart:function(){K.lineStart=Y,K.lineEnd=le},polygonEnd:function(){K.lineStart=K.lineEnd=K.point=c.c,Z.add((0,a.a2)(G)),G.reset()},result:function(){var or=Z/2;return Z.reset(),or}};function Y(){K.point=ie}function ie(or,Lr){K.point=ne,re=J=or,H=ae=Lr}function ne(or,Lr){G.add(ae*or-J*Lr),J=or,ae=Lr}function le(){ne(re,H)}var de=K,we=e(73784),me=0,Le=0,ve=0,Ae=0,ye=0,Se=0,_e=0,ze=0,Ie=0,Ne,et,st,Ze,Ke={point:nt,lineStart:it,lineEnd:xt,polygonStart:function(){Ke.lineStart=Je,Ke.lineEnd=Pe},polygonEnd:function(){Ke.point=nt,Ke.lineStart=it,Ke.lineEnd=xt},result:function(){var or=Ie?[_e/Ie,ze/Ie]:Se?[Ae/Se,ye/Se]:ve?[me/ve,Le/ve]:[NaN,NaN];return me=Le=ve=Ae=ye=Se=_e=ze=Ie=0,or}};function nt(or,Lr){me+=or,Le+=Lr,++ve}function it(){Ke.point=lt}function lt(or,Lr){Ke.point=vt,nt(st=or,Ze=Lr)}function vt(or,Lr){var Br=or-st,_r=Lr-Ze,Qr=(0,a._I)(Br*Br+_r*_r);Ae+=Qr*(st+or)/2,ye+=Qr*(Ze+Lr)/2,Se+=Qr,nt(st=or,Ze=Lr)}function xt(){Ke.point=nt}function Je(){Ke.point=Ue}function Pe(){He(Ne,et)}function Ue(or,Lr){Ke.point=He,nt(Ne=st=or,et=Ze=Lr)}function He(or,Lr){var Br=or-st,_r=Lr-Ze,Qr=(0,a._I)(Br*Br+_r*_r);Ae+=Qr*(st+or)/2,ye+=Qr*(Ze+Lr)/2,Se+=Qr,Qr=Ze*or-st*Lr,_e+=Qr*(st+or),ze+=Qr*(Ze+Lr),Ie+=Qr*3,nt(st=or,Ze=Lr)}var Oe=Ke;function Ce(or){this._context=or}Ce.prototype={_radius:4.5,pointRadius:function(or){return this._radius=or,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._context.closePath(),this._point=NaN},point:function(or,Lr){switch(this._point){case 0:{this._context.moveTo(or,Lr),this._point=1;break}case 1:{this._context.lineTo(or,Lr);break}default:{this._context.moveTo(or+this._radius,Lr),this._context.arc(or,Lr,this._radius,0,a.kD);break}}},result:c.c};var ge=(0,s.c)(),pe,Te,be,ke,Ve,je={point:c.c,lineStart:function(){je.point=at},lineEnd:function(){pe&&ut(Te,be),je.point=c.c},polygonStart:function(){pe=!0},polygonEnd:function(){pe=null},result:function(){var or=+ge;return ge.reset(),or}};function at(or,Lr){je.point=ut,Te=ke=or,be=Ve=Lr}function ut(or,Lr){ke-=or,Ve-=Lr,ge.add((0,a._I)(ke*ke+Ve*Ve)),ke=or,Ve=Lr}var Nt=je;function Vt(){this._string=[]}Vt.prototype={_radius:4.5,_circle:gt(4.5),pointRadius:function(or){return(or=+or)!==this._radius&&(this._radius=or,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(or,Lr){switch(this._point){case 0:{this._string.push("M",or,",",Lr),this._point=1;break}case 1:{this._string.push("L",or,",",Lr);break}default:{this._circle==null&&(this._circle=gt(this._radius)),this._string.push("M",or,",",Lr,this._circle);break}}},result:function(){if(this._string.length){var or=this._string.join("");return this._string=[],or}else return null}};function gt(or){return"m0,"+or+"a"+or+","+or+" 0 1,1 0,"+-2*or+"a"+or+","+or+" 0 1,1 0,"+2*or+"z"}function Ct(or,Lr){var Br=4.5,_r,Qr;function un(ln){return ln&&(typeof Br=="function"&&Qr.pointRadius(+Br.apply(this,arguments)),(0,u.c)(ln,_r(Qr))),Qr.result()}return un.area=function(ln){return(0,u.c)(ln,_r(de)),de.result()},un.measure=function(ln){return(0,u.c)(ln,_r(Nt)),Nt.result()},un.bounds=function(ln){return(0,u.c)(ln,_r(we.c)),we.c.result()},un.centroid=function(ln){return(0,u.c)(ln,_r(Oe)),Oe.result()},un.projection=function(ln){return arguments.length?(_r=ln==null?(or=null,oe.c):(or=ln).stream,un):or},un.context=function(ln){return arguments.length?(Qr=ln==null?(Lr=null,new Vt):new Ce(Lr=ln),typeof Br!="function"&&Qr.pointRadius(Br),un):Lr},un.pointRadius=function(ln){return arguments.length?(Br=typeof ln=="function"?ln:(Qr.pointRadius(+ln),+ln),un):Br},un.projection(or).context(Lr)}var Yt=e(87952);function gr(or){var Lr=0,Br=a.pi/3,_r=(0,Yt.U)(or),Qr=_r(Lr,Br);return Qr.parallels=function(un){return arguments.length?_r(Lr=un[0]*a.qw,Br=un[1]*a.qw):[Lr*a.oh,Br*a.oh]},Qr}function ht(or){var Lr=(0,a.W8)(or);function Br(_r,Qr){return[_r*Lr,(0,a.g$)(Qr)/Lr]}return Br.invert=function(_r,Qr){return[_r/Lr,(0,a.qR)(Qr*Lr)]},Br}function Ht(or,Lr){var Br=(0,a.g$)(or),_r=(Br+(0,a.g$)(Lr))/2;if((0,a.a2)(_r)=.12&&Xr<.234&&$r>=-.425&&$r<-.214?Qr:Xr>=.166&&Xr<.234&&$r>=-.214&&$r<-.115?ln:Br).invert(Jn)},sa.stream=function(Jn){return or&&Lr===Jn?or:or=ct([Br.stream(Lr=Jn),Qr.stream(Jn),ln.stream(Jn)])},sa.precision=function(Jn){return arguments.length?(Br.precision(Jn),Qr.precision(Jn),ln.precision(Jn),na()):Br.precision()},sa.scale=function(Jn){return arguments.length?(Br.scale(Jn),Qr.scale(Jn*.35),ln.scale(Jn),sa.translate(Br.translate())):Br.scale()},sa.translate=function(Jn){if(!arguments.length)return Br.translate();var aa=Br.scale(),pr=+Jn[0],$r=+Jn[1];return _r=Br.translate(Jn).clipExtent([[pr-.455*aa,$r-.238*aa],[pr+.455*aa,$r+.238*aa]]).stream(Kn),un=Qr.translate([pr-.307*aa,$r+.201*aa]).clipExtent([[pr-.425*aa+a.Gg,$r+.12*aa+a.Gg],[pr-.214*aa-a.Gg,$r+.234*aa-a.Gg]]).stream(Kn),Mn=ln.translate([pr-.205*aa,$r+.212*aa]).clipExtent([[pr-.214*aa+a.Gg,$r+.166*aa+a.Gg],[pr-.115*aa-a.Gg,$r+.234*aa-a.Gg]]).stream(Kn),na()},sa.fitExtent=function(Jn,aa){return(0,er.QX)(sa,Jn,aa)},sa.fitSize=function(Jn,aa){return(0,er.UV)(sa,Jn,aa)},sa.fitWidth=function(Jn,aa){return(0,er.Qx)(sa,Jn,aa)},sa.fitHeight=function(Jn,aa){return(0,er.OW)(sa,Jn,aa)};function na(){return or=Lr=null,sa}return sa.scale(1070)}var dt=e(54724),bt=e(69020),Et=e(92992);function Mt(or,Lr){return[or,(0,a.Yz)((0,a.a6)((a.or+Lr)/2))]}Mt.invert=function(or,Lr){return[or,2*(0,a.MQ)((0,a.oN)(Lr))-a.or]};function _t(){return It(Mt).scale(961/a.kD)}function It(or){var Lr=(0,Yt.c)(or),Br=Lr.center,_r=Lr.scale,Qr=Lr.translate,un=Lr.clipExtent,ln=null,Mn,Dn,Kn;Lr.scale=function(na){return arguments.length?(_r(na),sa()):_r()},Lr.translate=function(na){return arguments.length?(Qr(na),sa()):Qr()},Lr.center=function(na){return arguments.length?(Br(na),sa()):Br()},Lr.clipExtent=function(na){return arguments.length?(na==null?ln=Mn=Dn=Kn=null:(ln=+na[0][0],Mn=+na[0][1],Dn=+na[1][0],Kn=+na[1][1]),sa()):ln==null?null:[[ln,Mn],[Dn,Kn]]};function sa(){var na=a.pi*_r(),Jn=Lr((0,Et.c)(Lr.rotate()).invert([0,0]));return un(ln==null?[[Jn[0]-na,Jn[1]-na],[Jn[0]+na,Jn[1]+na]]:or===Mt?[[Math.max(Jn[0]-na,ln),Mn],[Math.min(Jn[0]+na,Dn),Kn]]:[[ln,Math.max(Jn[1]-na,Mn)],[Dn,Math.min(Jn[1]+na,Kn)]])}return sa()}function Gt(or){return(0,a.a6)((a.or+or)/2)}function nr(or,Lr){var Br=(0,a.W8)(or),_r=or===Lr?(0,a.g$)(or):(0,a.Yz)(Br/(0,a.W8)(Lr))/(0,a.Yz)(Gt(Lr)/Gt(or)),Qr=Br*(0,a.g3)(Gt(or),_r)/_r;if(!_r)return Mt;function un(ln,Mn){Qr>0?Mn<-a.or+a.Gg&&(Mn=-a.or+a.Gg):Mn>a.or-a.Gg&&(Mn=a.or-a.Gg);var Dn=Qr/(0,a.g3)(Gt(Mn),_r);return[Dn*(0,a.g$)(_r*ln),Qr-Dn*(0,a.W8)(_r*ln)]}return un.invert=function(ln,Mn){var Dn=Qr-Mn,Kn=(0,a.kq)(_r)*(0,a._I)(ln*ln+Dn*Dn),sa=(0,a.WE)(ln,(0,a.a2)(Dn))*(0,a.kq)(Dn);return Dn*_r<0&&(sa-=a.pi*(0,a.kq)(ln)*(0,a.kq)(Dn)),[sa/_r,2*(0,a.MQ)((0,a.g3)(Qr/Kn,1/_r))-a.or]},un}function ar(){return gr(nr).scale(109.5).parallels([30,30])}var ir=e(69604);function Be(or,Lr){var Br=(0,a.W8)(or),_r=or===Lr?(0,a.g$)(or):(Br-(0,a.W8)(Lr))/(Lr-or),Qr=Br/_r+or;if((0,a.a2)(_r)2?_r[2]+90:90]):(_r=Br(),[_r[0],_r[1],_r[2]-90])},Br([0,0,90]).scale(159.155)}},27284:function(te,X,e){e.d(X,{c:function(){return P}});var A=e(64528);function P(o,L){var M=o[0]*A.qw,d=o[1]*A.qw,g=L[0]*A.qw,r=L[1]*A.qw,t=(0,A.W8)(d),s=(0,A.g$)(d),a=(0,A.W8)(r),c=(0,A.g$)(r),u=t*(0,A.W8)(M),l=t*(0,A.g$)(M),y=a*(0,A.W8)(g),h=a*(0,A.g$)(g),T=2*(0,A.qR)((0,A._I)((0,A.SD)(r-d)+t*a*(0,A.SD)(g-M))),f=(0,A.g$)(T),n=T?function(v){var m=(0,A.g$)(v*=T)/f,b=(0,A.g$)(T-v)/f,E=b*u+m*y,p=b*l+m*h,S=b*s+m*c;return[(0,A.WE)(p,E)*A.oh,(0,A.WE)(S,(0,A._I)(E*E+p*p))*A.oh]}:function(){return[M*A.oh,d*A.oh]};return n.distance=T,n}},64528:function(te,X,e){e.d(X,{Gg:function(){return A},Km:function(){return u},MQ:function(){return s},SD:function(){return E},W8:function(){return c},WE:function(){return a},Yz:function(){return y},_I:function(){return n},a2:function(){return t},a6:function(){return v},a8:function(){return P},g$:function(){return T},g3:function(){return h},kD:function(){return d},kq:function(){return f},mE:function(){return m},oN:function(){return l},oh:function(){return g},or:function(){return L},pi:function(){return o},qR:function(){return b},qw:function(){return r},wL:function(){return M}});var A=1e-6,P=1e-12,o=Math.PI,L=o/2,M=o/4,d=o*2,g=180/o,r=o/180,t=Math.abs,s=Math.atan,a=Math.atan2,c=Math.cos,u=Math.ceil,l=Math.exp,y=Math.log,h=Math.pow,T=Math.sin,f=Math.sign||function(p){return p>0?1:p<0?-1:0},n=Math.sqrt,v=Math.tan;function m(p){return p>1?0:p<-1?o:Math.acos(p)}function b(p){return p>1?L:p<-1?-L:Math.asin(p)}function E(p){return(p=T(p/2))*p}},70932:function(te,X,e){e.d(X,{c:function(){return A}});function A(){}},73784:function(te,X,e){var A=e(70932),P=1/0,o=P,L=-P,M=L,d={point:g,lineStart:A.c,lineEnd:A.c,polygonStart:A.c,polygonEnd:A.c,result:function(){var r=[[P,o],[L,M]];return L=M=-(o=P=1/0),r}};function g(r,t){rL&&(L=r),tM&&(M=t)}X.c=d},41860:function(te,X,e){e.d(X,{c:function(){return P}});var A=e(64528);function P(o,L){return(0,A.a2)(o[0]-L[0])=0?1:-1,B=I*k,_=B>o.pi,z=b*C;if(L.add((0,o.WE)(z*I*(0,o.g$)(B),E*x+z*(0,o.W8)(B))),u+=_?k+I*o.kD:k,_^v>=t^w>=t){var O=(0,P.CW)((0,P.ux)(n),(0,P.ux)(S));(0,P.cJ)(O);var F=(0,P.CW)(c,O);(0,P.cJ)(F);var N=(_^k>=0?-1:1)*(0,o.qR)(F[2]);(s>N||s===N&&(O[0]||O[1]))&&(l+=_^k>=0?1:-1)}}return(u<-o.Gg||u4*E&&N--){var oe=C+z,Z=x+O,G=k+F,re=(0,d._I)(oe*oe+Z*Z+G*G),H=(0,d.qR)(G/=re),J=(0,d.a2)((0,d.a2)(G)-1)E||(0,d.a2)((j*ie+$*ne)/q-.5)>.3||C*z+x*O+k*F2?le[2]%360*d.qw:0,ie()):[x*d.oh,k*d.oh,I*d.oh]},K.angle=function(le){return arguments.length?(_=le%360*d.qw,ie()):_*d.oh},K.reflectX=function(le){return arguments.length?(z=le?-1:1,ie()):z<0},K.reflectY=function(le){return arguments.length?(O=le?-1:1,ie()):O<0},K.precision=function(le){return arguments.length?(G=u(re,Z=le*le),ne()):(0,d._I)(Z)},K.fitExtent=function(le,de){return(0,t.QX)(K,le,de)},K.fitSize=function(le,de){return(0,t.UV)(K,le,de)},K.fitWidth=function(le,de){return(0,t.Qx)(K,le,de)},K.fitHeight=function(le,de){return(0,t.OW)(K,le,de)};function ie(){var le=n(p,0,0,z,O,_).apply(null,E(i,C)),de=(_?n:f)(p,S-le[0],w-le[1],z,O,_);return B=(0,g.O)(x,k,I),re=(0,L.c)(E,de),H=(0,L.c)(B,re),G=u(re,Z),ne()}function ne(){return J=ae=null,K}return function(){return E=b.apply(this,arguments),K.invert=E.invert&&Y,ie()}}},47984:function(te,X,e){e.d(X,{c:function(){return L},g:function(){return o}});var A=e(87952),P=e(64528);function o(M,d){var g=d*d,r=g*g;return[M*(.8707-.131979*g+r*(-.013791+r*(.003971*g-.001529*r))),d*(1.007226+g*(.015085+r*(-.044475+.028874*g-.005916*r)))]}o.invert=function(M,d){var g=d,r=25,t;do{var s=g*g,a=s*s;g-=t=(g*(1.007226+s*(.015085+a*(-.044475+.028874*s-.005916*a)))-d)/(1.007226+s*(.045255+a*(-.311325+.259866*s-.06507600000000001*a)))}while((0,P.a2)(t)>P.Gg&&--r>0);return[M/(.8707+(s=g*g)*(-.131979+s*(-.013791+s*s*s*(.003971-.001529*s)))),g]};function L(){return(0,A.c)(o).scale(175.295)}},4888:function(te,X,e){e.d(X,{c:function(){return M},t:function(){return L}});var A=e(64528),P=e(62280),o=e(87952);function L(d,g){return[(0,A.W8)(g)*(0,A.g$)(d),(0,A.g$)(g)]}L.invert=(0,P.g)(A.qR);function M(){return(0,o.c)(L).scale(249.5).clipAngle(90+A.Gg)}},92992:function(te,X,e){e.d(X,{O:function(){return L},c:function(){return r}});var A=e(68120),P=e(64528);function o(t,s){return[(0,P.a2)(t)>P.pi?t+Math.round(-t/P.kD)*P.kD:t,s]}o.invert=o;function L(t,s,a){return(t%=P.kD)?s||a?(0,A.c)(d(t),g(s,a)):d(t):s||a?g(s,a):o}function M(t){return function(s,a){return s+=t,[s>P.pi?s-P.kD:s<-P.pi?s+P.kD:s,a]}}function d(t){var s=M(t);return s.invert=M(-t),s}function g(t,s){var a=(0,P.W8)(t),c=(0,P.g$)(t),u=(0,P.W8)(s),l=(0,P.g$)(s);function y(h,T){var f=(0,P.W8)(T),n=(0,P.W8)(h)*f,v=(0,P.g$)(h)*f,m=(0,P.g$)(T),b=m*a+n*c;return[(0,P.WE)(v*u-b*l,n*a-m*c),(0,P.qR)(b*u+v*l)]}return y.invert=function(h,T){var f=(0,P.W8)(T),n=(0,P.W8)(h)*f,v=(0,P.g$)(h)*f,m=(0,P.g$)(T),b=m*u-v*l;return[(0,P.WE)(v*u+m*l,n*a+b*c),(0,P.qR)(b*a-n*c)]},y}function r(t){t=L(t[0]*P.qw,t[1]*P.qw,t.length>2?t[2]*P.qw:0);function s(a){return a=t(a[0]*P.qw,a[1]*P.qw),a[0]*=P.oh,a[1]*=P.oh,a}return s.invert=function(a){return a=t.invert(a[0]*P.qw,a[1]*P.qw),a[0]*=P.oh,a[1]*=P.oh,a},s}},16016:function(te,X,e){e.d(X,{c:function(){return d}});function A(g,r){g&&o.hasOwnProperty(g.type)&&o[g.type](g,r)}var P={Feature:function(g,r){A(g.geometry,r)},FeatureCollection:function(g,r){for(var t=g.features,s=-1,a=t.length;++s=0;)ge+=pe[Te].value;Ce.value=ge}function s(){return this.eachAfter(t)}function a(Ce){var ge=this,pe,Te=[ge],be,ke,Ve;do for(pe=Te.reverse(),Te=[];ge=pe.pop();)if(Ce(ge),be=ge.children,be)for(ke=0,Ve=be.length;ke=0;--be)pe.push(Te[be]);return this}function u(Ce){for(var ge=this,pe=[ge],Te=[],be,ke,Ve;ge=pe.pop();)if(Te.push(ge),be=ge.children,be)for(ke=0,Ve=be.length;ke=0;)pe+=Te[be].value;ge.value=pe})}function y(Ce){return this.eachBefore(function(ge){ge.children&&ge.children.sort(Ce)})}function h(Ce){for(var ge=this,pe=T(ge,Ce),Te=[ge];ge!==pe;)ge=ge.parent,Te.push(ge);for(var be=Te.length;Ce!==pe;)Te.splice(be,0,Ce),Ce=Ce.parent;return Te}function T(Ce,ge){if(Ce===ge)return Ce;var pe=Ce.ancestors(),Te=ge.ancestors(),be=null;for(Ce=pe.pop(),ge=Te.pop();Ce===ge;)be=Ce,Ce=pe.pop(),ge=Te.pop();return be}function f(){for(var Ce=this,ge=[Ce];Ce=Ce.parent;)ge.push(Ce);return ge}function n(){var Ce=[];return this.each(function(ge){Ce.push(ge)}),Ce}function v(){var Ce=[];return this.eachBefore(function(ge){ge.children||Ce.push(ge)}),Ce}function m(){var Ce=this,ge=[];return Ce.each(function(pe){pe!==Ce&&ge.push({source:pe.parent,target:pe})}),ge}function b(Ce,ge){var pe=new i(Ce),Te=+Ce.value&&(pe.value=Ce.value),be,ke=[pe],Ve,je,at,ut;for(ge==null&&(ge=p);be=ke.pop();)if(Te&&(be.value=+be.data.value),(je=ge(be.data))&&(ut=je.length))for(be.children=new Array(ut),at=ut-1;at>=0;--at)ke.push(Ve=be.children[at]=new i(je[at])),Ve.parent=be,Ve.depth=be.depth+1;return pe.eachBefore(w)}function E(){return b(this).eachBefore(S)}function p(Ce){return Ce.children}function S(Ce){Ce.data=Ce.data.data}function w(Ce){var ge=0;do Ce.height=ge;while((Ce=Ce.parent)&&Ce.height<++ge)}function i(Ce){this.data=Ce,this.depth=this.height=0,this.parent=null}i.prototype=b.prototype={constructor:i,count:s,each:a,eachAfter:u,eachBefore:c,sum:l,sort:y,path:h,ancestors:f,descendants:n,leaves:v,links:m,copy:E};var C=Array.prototype.slice;function x(Ce){for(var ge=Ce.length,pe,Te;ge;)Te=Math.random()*ge--|0,pe=Ce[ge],Ce[ge]=Ce[Te],Ce[Te]=pe;return Ce}function k(Ce){for(var ge=0,pe=(Ce=x(C.call(Ce))).length,Te=[],be,ke;ge0&&pe*pe>Te*Te+be*be}function z(Ce,ge){for(var pe=0;peat?(be=(ut+at-ke)/(2*ut),je=Math.sqrt(Math.max(0,at/ut-be*be)),pe.x=Ce.x-be*Te-je*Ve,pe.y=Ce.y-be*Ve+je*Te):(be=(ut+ke-at)/(2*ut),je=Math.sqrt(Math.max(0,ke/ut-be*be)),pe.x=ge.x+be*Te-je*Ve,pe.y=ge.y+be*Ve+je*Te)):(pe.x=ge.x+pe.r,pe.y=ge.y)}function $(Ce,ge){var pe=Ce.r+ge.r-1e-6,Te=ge.x-Ce.x,be=ge.y-Ce.y;return pe>0&&pe*pe>Te*Te+be*be}function q(Ce){var ge=Ce._,pe=Ce.next._,Te=ge.r+pe.r,be=(ge.x*pe.r+pe.x*ge.r)/Te,ke=(ge.y*pe.r+pe.y*ge.r)/Te;return be*be+ke*ke}function oe(Ce){this._=Ce,this.next=null,this.previous=null}function Z(Ce){if(!(be=Ce.length))return 0;var ge,pe,Te,be,ke,Ve,je,at,ut,Nt,Vt;if(ge=Ce[0],ge.x=0,ge.y=0,!(be>1))return ge.r;if(pe=Ce[1],ge.x=-pe.r,pe.x=ge.r,pe.y=0,!(be>2))return ge.r+pe.r;j(pe,ge,Te=Ce[2]),ge=new oe(ge),pe=new oe(pe),Te=new oe(Te),ge.next=Te.previous=pe,pe.next=ge.previous=Te,Te.next=pe.previous=ge;e:for(je=3;je0)throw new Error("cycle");return je}return pe.id=function(Te){return arguments.length?(Ce=H(Te),pe):Ce},pe.parentId=function(Te){return arguments.length?(ge=H(Te),pe):ge},pe}function ze(Ce,ge){return Ce.parent===ge.parent?1:2}function Ie(Ce){var ge=Ce.children;return ge?ge[0]:Ce.t}function Ne(Ce){var ge=Ce.children;return ge?ge[ge.length-1]:Ce.t}function et(Ce,ge,pe){var Te=pe/(ge.i-Ce.i);ge.c-=Te,ge.s+=pe,Ce.c+=Te,ge.z+=pe,ge.m+=pe}function st(Ce){for(var ge=0,pe=0,Te=Ce.children,be=Te.length,ke;--be>=0;)ke=Te[be],ke.z+=ge,ke.m+=ge,ge+=ke.s+(pe+=ke.c)}function Ze(Ce,ge,pe){return Ce.a.parent===ge.parent?Ce.a:pe}function Ke(Ce,ge){this._=Ce,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=ge}Ke.prototype=Object.create(i.prototype);function nt(Ce){for(var ge=new Ke(Ce,0),pe,Te=[ge],be,ke,Ve,je;pe=Te.pop();)if(ke=pe._.children)for(pe.children=new Array(je=ke.length),Ve=je-1;Ve>=0;--Ve)Te.push(be=pe.children[Ve]=new Ke(ke[Ve],Ve)),be.parent=pe;return(ge.parent=new Ke(null,0)).children=[ge],ge}function it(){var Ce=ze,ge=1,pe=1,Te=null;function be(ut){var Nt=nt(ut);if(Nt.eachAfter(ke),Nt.parent.m=-Nt.z,Nt.eachBefore(Ve),Te)ut.eachBefore(at);else{var Vt=ut,gt=ut,Ct=ut;ut.eachBefore(function(Wt){Wt.xgt.x&&(gt=Wt),Wt.depth>Ct.depth&&(Ct=Wt)});var Yt=Vt===gt?1:Ce(Vt,gt)/2,gr=Yt-Vt.x,ht=ge/(gt.x+Yt+gr),Ht=pe/(Ct.depth||1);ut.eachBefore(function(Wt){Wt.x=(Wt.x+gr)*ht,Wt.y=Wt.depth*Ht})}return ut}function ke(ut){var Nt=ut.children,Vt=ut.parent.children,gt=ut.i?Vt[ut.i-1]:null;if(Nt){st(ut);var Ct=(Nt[0].z+Nt[Nt.length-1].z)/2;gt?(ut.z=gt.z+Ce(ut._,gt._),ut.m=ut.z-Ct):ut.z=Ct}else gt&&(ut.z=gt.z+Ce(ut._,gt._));ut.parent.A=je(ut,gt,ut.parent.A||Vt[0])}function Ve(ut){ut._.x=ut.z+ut.parent.m,ut.m+=ut.parent.m}function je(ut,Nt,Vt){if(Nt){for(var gt=ut,Ct=ut,Yt=Nt,gr=gt.parent.children[0],ht=gt.m,Ht=Ct.m,Wt=Yt.m,cr=gr.m,er;Yt=Ne(Yt),gt=Ie(gt),Yt&>)gr=Ie(gr),Ct=Ne(Ct),Ct.a=ut,er=Yt.z+Wt-gt.z-ht+Ce(Yt._,gt._),er>0&&(et(Ze(Yt,ut,Vt),ut,er),ht+=er,Ht+=er),Wt+=Yt.m,ht+=gt.m,cr+=gr.m,Ht+=Ct.m;Yt&&!Ne(Ct)&&(Ct.t=Yt,Ct.m+=Wt-Ht),gt&&!Ie(gr)&&(gr.t=gt,gr.m+=ht-cr,Vt=ut)}return Vt}function at(ut){ut.x*=ge,ut.y=ut.depth*pe}return be.separation=function(ut){return arguments.length?(Ce=ut,be):Ce},be.size=function(ut){return arguments.length?(Te=!1,ge=+ut[0],pe=+ut[1],be):Te?null:[ge,pe]},be.nodeSize=function(ut){return arguments.length?(Te=!0,ge=+ut[0],pe=+ut[1],be):Te?[ge,pe]:null},be}function lt(Ce,ge,pe,Te,be){for(var ke=Ce.children,Ve,je=-1,at=ke.length,ut=Ce.value&&(be-pe)/Ce.value;++jeWt&&(Wt=ut),qe=ht*ht*ct,cr=Math.max(Wt/qe,qe/Ht),cr>er){ht-=ut;break}er=cr}Ve.push(at={value:ht,dice:Ct1?Te:1)},pe}(vt);function Pe(){var Ce=Je,ge=!1,pe=1,Te=1,be=[0],ke=J,Ve=J,je=J,at=J,ut=J;function Nt(gt){return gt.x0=gt.y0=0,gt.x1=pe,gt.y1=Te,gt.eachBefore(Vt),be=[0],ge&>.eachBefore(de),gt}function Vt(gt){var Ct=be[gt.depth],Yt=gt.x0+Ct,gr=gt.y0+Ct,ht=gt.x1-Ct,Ht=gt.y1-Ct;ht=gt-1){var Wt=ke[Vt];Wt.x0=Yt,Wt.y0=gr,Wt.x1=ht,Wt.y1=Ht;return}for(var cr=ut[Vt],er=Ct/2+cr,ct=Vt+1,qe=gt-1;ct>>1;ut[dt]Ht-gr){var Mt=(Yt*Et+ht*bt)/Ct;Nt(Vt,ct,bt,Yt,gr,Mt,Ht),Nt(ct,gt,Et,Mt,gr,ht,Ht)}else{var _t=(gr*Et+Ht*bt)/Ct;Nt(Vt,ct,bt,Yt,gr,ht,_t),Nt(ct,gt,Et,Yt,_t,ht,Ht)}}}function He(Ce,ge,pe,Te,be){(Ce.depth&1?lt:we)(Ce,ge,pe,Te,be)}var Oe=function Ce(ge){function pe(Te,be,ke,Ve,je){if((at=Te._squarify)&&at.ratio===ge)for(var at,ut,Nt,Vt,gt=-1,Ct,Yt=at.length,gr=Te.value;++gt1?Te:1)},pe}(vt)},10132:function(te,X,e){e.d(X,{ak:function(){return h}});var A=Math.PI,P=2*A,o=1e-6,L=P-o;function M(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function d(){return new M}M.prototype=d.prototype={constructor:M,moveTo:function(T,f){this._+="M"+(this._x0=this._x1=+T)+","+(this._y0=this._y1=+f)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(T,f){this._+="L"+(this._x1=+T)+","+(this._y1=+f)},quadraticCurveTo:function(T,f,n,v){this._+="Q"+ +T+","+ +f+","+(this._x1=+n)+","+(this._y1=+v)},bezierCurveTo:function(T,f,n,v,m,b){this._+="C"+ +T+","+ +f+","+ +n+","+ +v+","+(this._x1=+m)+","+(this._y1=+b)},arcTo:function(T,f,n,v,m){T=+T,f=+f,n=+n,v=+v,m=+m;var b=this._x1,E=this._y1,p=n-T,S=v-f,w=b-T,i=E-f,C=w*w+i*i;if(m<0)throw new Error("negative radius: "+m);if(this._x1===null)this._+="M"+(this._x1=T)+","+(this._y1=f);else if(C>o)if(!(Math.abs(i*p-S*w)>o)||!m)this._+="L"+(this._x1=T)+","+(this._y1=f);else{var x=n-b,k=v-E,I=p*p+S*S,B=x*x+k*k,_=Math.sqrt(I),z=Math.sqrt(C),O=m*Math.tan((A-Math.acos((I+C-B)/(2*_*z)))/2),F=O/z,N=O/_;Math.abs(F-1)>o&&(this._+="L"+(T+F*w)+","+(f+F*i)),this._+="A"+m+","+m+",0,0,"+ +(i*x>w*k)+","+(this._x1=T+N*p)+","+(this._y1=f+N*S)}},arc:function(T,f,n,v,m,b){T=+T,f=+f,n=+n,b=!!b;var E=n*Math.cos(v),p=n*Math.sin(v),S=T+E,w=f+p,i=1^b,C=b?v-m:m-v;if(n<0)throw new Error("negative radius: "+n);this._x1===null?this._+="M"+S+","+w:(Math.abs(this._x1-S)>o||Math.abs(this._y1-w)>o)&&(this._+="L"+S+","+w),n&&(C<0&&(C=C%P+P),C>L?this._+="A"+n+","+n+",0,1,"+i+","+(T-E)+","+(f-p)+"A"+n+","+n+",0,1,"+i+","+(this._x1=S)+","+(this._y1=w):C>o&&(this._+="A"+n+","+n+",0,"+ +(C>=A)+","+i+","+(this._x1=T+n*Math.cos(m))+","+(this._y1=f+n*Math.sin(m))))},rect:function(T,f,n,v){this._+="M"+(this._x0=this._x1=+T)+","+(this._y0=this._y1=+f)+"h"+ +n+"v"+ +v+"h"+-n+"Z"},toString:function(){return this._}};var g=d,r=Array.prototype.slice;function t(T){return function(){return T}}function s(T){return T[0]}function a(T){return T[1]}function c(T){return T.source}function u(T){return T.target}function l(T){var f=c,n=u,v=s,m=a,b=null;function E(){var p,S=r.call(arguments),w=f.apply(this,S),i=n.apply(this,S);if(b||(b=p=g()),T(b,+v.apply(this,(S[0]=w,S)),+m.apply(this,S),+v.apply(this,(S[0]=i,S)),+m.apply(this,S)),p)return b=null,p+""||null}return E.source=function(p){return arguments.length?(f=p,E):f},E.target=function(p){return arguments.length?(n=p,E):n},E.x=function(p){return arguments.length?(v=typeof p=="function"?p:t(+p),E):v},E.y=function(p){return arguments.length?(m=typeof p=="function"?p:t(+p),E):m},E.context=function(p){return arguments.length?(b=p??null,E):b},E}function y(T,f,n,v,m){T.moveTo(f,n),T.bezierCurveTo(f=(f+v)/2,n,f,m,v,m)}function h(){return l(y)}},94336:function(te,X,e){e.d(X,{Yn:function(){return Ue},m_:function(){return s},E9:function(){return He}});var A=e(8208),P=e(58931),o=e(46192),L=e(68936),M=e(32171),d=e(53528);function g(Ce){if(0<=Ce.y&&Ce.y<100){var ge=new Date(-1,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L);return ge.setFullYear(Ce.y),ge}return new Date(Ce.y,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L)}function r(Ce){if(0<=Ce.y&&Ce.y<100){var ge=new Date(Date.UTC(-1,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L));return ge.setUTCFullYear(Ce.y),ge}return new Date(Date.UTC(Ce.y,Ce.m,Ce.d,Ce.H,Ce.M,Ce.S,Ce.L))}function t(Ce,ge,pe){return{y:Ce,m:ge,d:pe,H:0,M:0,S:0,L:0}}function s(Ce){var ge=Ce.dateTime,pe=Ce.date,Te=Ce.time,be=Ce.periods,ke=Ce.days,Ve=Ce.shortDays,je=Ce.months,at=Ce.shortMonths,ut=T(be),Nt=f(be),Vt=T(ke),gt=f(ke),Ct=T(Ve),Yt=f(Ve),gr=T(je),ht=f(je),Ht=T(at),Wt=f(at),cr={a:Be,A:Fe,b:Rt,B:Lt,c:null,d:j,e:j,f:G,H:$,I:q,j:oe,L:Z,m:re,M:H,p:Ut,q:Qt,Q:xt,s:Je,S:J,u:ae,U:K,V:Y,w:ie,W:ne,x:null,X:null,y:le,Y:de,Z:we,"%":vt},er={a:rr,A:Kt,b:Dt,B:sr,c:null,d:me,e:me,f:Se,H:Le,I:ve,j:Ae,L:ye,m:_e,M:ze,p:fr,q:vr,Q:xt,s:Je,S:Ie,u:Ne,U:et,V:st,w:Ze,W:Ke,x:null,X:null,y:nt,Y:it,Z:lt,"%":vt},ct={a:Mt,A:_t,b:It,B:Gt,c:nr,d:x,e:x,f:O,H:I,I,j:k,L:z,m:C,M:B,p:Et,q:i,Q:N,s:V,S:_,u:v,U:m,V:b,w:n,W:E,x:ar,X:ir,y:S,Y:p,Z:w,"%":F};cr.x=qe(pe,cr),cr.X=qe(Te,cr),cr.c=qe(ge,cr),er.x=qe(pe,er),er.X=qe(Te,er),er.c=qe(ge,er);function qe(lr,Or){return function(Sr){var Ar=[],sn=-1,Jr=0,bn=lr.length,xn,or,Lr;for(Sr instanceof Date||(Sr=new Date(+Sr));++sn53)return null;"w"in Ar||(Ar.w=1),"Z"in Ar?(Jr=r(t(Ar.y,0,1)),bn=Jr.getUTCDay(),Jr=bn>4||bn===0?A.ot.ceil(Jr):(0,A.ot)(Jr),Jr=P.c.offset(Jr,(Ar.V-1)*7),Ar.y=Jr.getUTCFullYear(),Ar.m=Jr.getUTCMonth(),Ar.d=Jr.getUTCDate()+(Ar.w+6)%7):(Jr=g(t(Ar.y,0,1)),bn=Jr.getDay(),Jr=bn>4||bn===0?o.qT.ceil(Jr):(0,o.qT)(Jr),Jr=L.c.offset(Jr,(Ar.V-1)*7),Ar.y=Jr.getFullYear(),Ar.m=Jr.getMonth(),Ar.d=Jr.getDate()+(Ar.w+6)%7)}else("W"in Ar||"U"in Ar)&&("w"in Ar||(Ar.w="u"in Ar?Ar.u%7:"W"in Ar?1:0),bn="Z"in Ar?r(t(Ar.y,0,1)).getUTCDay():g(t(Ar.y,0,1)).getDay(),Ar.m=0,Ar.d="W"in Ar?(Ar.w+6)%7+Ar.W*7-(bn+5)%7:Ar.w+Ar.U*7-(bn+6)%7);return"Z"in Ar?(Ar.H+=Ar.Z/100|0,Ar.M+=Ar.Z%100,r(Ar)):g(Ar)}}function bt(lr,Or,Sr,Ar){for(var sn=0,Jr=Or.length,bn=Sr.length,xn,or;sn=bn)return-1;if(xn=Or.charCodeAt(sn++),xn===37){if(xn=Or.charAt(sn++),or=ct[xn in a?Or.charAt(sn++):xn],!or||(Ar=or(lr,Sr,Ar))<0)return-1}else if(xn!=Sr.charCodeAt(Ar++))return-1}return Ar}function Et(lr,Or,Sr){var Ar=ut.exec(Or.slice(Sr));return Ar?(lr.p=Nt[Ar[0].toLowerCase()],Sr+Ar[0].length):-1}function Mt(lr,Or,Sr){var Ar=Ct.exec(Or.slice(Sr));return Ar?(lr.w=Yt[Ar[0].toLowerCase()],Sr+Ar[0].length):-1}function _t(lr,Or,Sr){var Ar=Vt.exec(Or.slice(Sr));return Ar?(lr.w=gt[Ar[0].toLowerCase()],Sr+Ar[0].length):-1}function It(lr,Or,Sr){var Ar=Ht.exec(Or.slice(Sr));return Ar?(lr.m=Wt[Ar[0].toLowerCase()],Sr+Ar[0].length):-1}function Gt(lr,Or,Sr){var Ar=gr.exec(Or.slice(Sr));return Ar?(lr.m=ht[Ar[0].toLowerCase()],Sr+Ar[0].length):-1}function nr(lr,Or,Sr){return bt(lr,ge,Or,Sr)}function ar(lr,Or,Sr){return bt(lr,pe,Or,Sr)}function ir(lr,Or,Sr){return bt(lr,Te,Or,Sr)}function Be(lr){return Ve[lr.getDay()]}function Fe(lr){return ke[lr.getDay()]}function Rt(lr){return at[lr.getMonth()]}function Lt(lr){return je[lr.getMonth()]}function Ut(lr){return be[+(lr.getHours()>=12)]}function Qt(lr){return 1+~~(lr.getMonth()/3)}function rr(lr){return Ve[lr.getUTCDay()]}function Kt(lr){return ke[lr.getUTCDay()]}function Dt(lr){return at[lr.getUTCMonth()]}function sr(lr){return je[lr.getUTCMonth()]}function fr(lr){return be[+(lr.getUTCHours()>=12)]}function vr(lr){return 1+~~(lr.getUTCMonth()/3)}return{format:function(lr){var Or=qe(lr+="",cr);return Or.toString=function(){return lr},Or},parse:function(lr){var Or=dt(lr+="",!1);return Or.toString=function(){return lr},Or},utcFormat:function(lr){var Or=qe(lr+="",er);return Or.toString=function(){return lr},Or},utcParse:function(lr){var Or=dt(lr+="",!0);return Or.toString=function(){return lr},Or}}}var a={"-":"",_:" ",0:"0"},c=/^\s*\d+/,u=/^%/,l=/[\\^$*+?|[\]().{}]/g;function y(Ce,ge,pe){var Te=Ce<0?"-":"",be=(Te?-Ce:Ce)+"",ke=be.length;return Te+(ke68?1900:2e3),pe+Te[0].length):-1}function w(Ce,ge,pe){var Te=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(ge.slice(pe,pe+6));return Te?(Ce.Z=Te[1]?0:-(Te[2]+(Te[3]||"00")),pe+Te[0].length):-1}function i(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+1));return Te?(Ce.q=Te[0]*3-3,pe+Te[0].length):-1}function C(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.m=Te[0]-1,pe+Te[0].length):-1}function x(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.d=+Te[0],pe+Te[0].length):-1}function k(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+3));return Te?(Ce.m=0,Ce.d=+Te[0],pe+Te[0].length):-1}function I(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.H=+Te[0],pe+Te[0].length):-1}function B(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.M=+Te[0],pe+Te[0].length):-1}function _(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+2));return Te?(Ce.S=+Te[0],pe+Te[0].length):-1}function z(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+3));return Te?(Ce.L=+Te[0],pe+Te[0].length):-1}function O(Ce,ge,pe){var Te=c.exec(ge.slice(pe,pe+6));return Te?(Ce.L=Math.floor(Te[0]/1e3),pe+Te[0].length):-1}function F(Ce,ge,pe){var Te=u.exec(ge.slice(pe,pe+1));return Te?pe+Te[0].length:-1}function N(Ce,ge,pe){var Te=c.exec(ge.slice(pe));return Te?(Ce.Q=+Te[0],pe+Te[0].length):-1}function V(Ce,ge,pe){var Te=c.exec(ge.slice(pe));return Te?(Ce.s=+Te[0],pe+Te[0].length):-1}function j(Ce,ge){return y(Ce.getDate(),ge,2)}function $(Ce,ge){return y(Ce.getHours(),ge,2)}function q(Ce,ge){return y(Ce.getHours()%12||12,ge,2)}function oe(Ce,ge){return y(1+L.c.count((0,M.c)(Ce),Ce),ge,3)}function Z(Ce,ge){return y(Ce.getMilliseconds(),ge,3)}function G(Ce,ge){return Z(Ce,ge)+"000"}function re(Ce,ge){return y(Ce.getMonth()+1,ge,2)}function H(Ce,ge){return y(Ce.getMinutes(),ge,2)}function J(Ce,ge){return y(Ce.getSeconds(),ge,2)}function ae(Ce){var ge=Ce.getDay();return ge===0?7:ge}function K(Ce,ge){return y(o.uU.count((0,M.c)(Ce)-1,Ce),ge,2)}function Y(Ce,ge){var pe=Ce.getDay();return Ce=pe>=4||pe===0?(0,o.kD)(Ce):o.kD.ceil(Ce),y(o.kD.count((0,M.c)(Ce),Ce)+((0,M.c)(Ce).getDay()===4),ge,2)}function ie(Ce){return Ce.getDay()}function ne(Ce,ge){return y(o.qT.count((0,M.c)(Ce)-1,Ce),ge,2)}function le(Ce,ge){return y(Ce.getFullYear()%100,ge,2)}function de(Ce,ge){return y(Ce.getFullYear()%1e4,ge,4)}function we(Ce){var ge=Ce.getTimezoneOffset();return(ge>0?"-":(ge*=-1,"+"))+y(ge/60|0,"0",2)+y(ge%60,"0",2)}function me(Ce,ge){return y(Ce.getUTCDate(),ge,2)}function Le(Ce,ge){return y(Ce.getUTCHours(),ge,2)}function ve(Ce,ge){return y(Ce.getUTCHours()%12||12,ge,2)}function Ae(Ce,ge){return y(1+P.c.count((0,d.c)(Ce),Ce),ge,3)}function ye(Ce,ge){return y(Ce.getUTCMilliseconds(),ge,3)}function Se(Ce,ge){return ye(Ce,ge)+"000"}function _e(Ce,ge){return y(Ce.getUTCMonth()+1,ge,2)}function ze(Ce,ge){return y(Ce.getUTCMinutes(),ge,2)}function Ie(Ce,ge){return y(Ce.getUTCSeconds(),ge,2)}function Ne(Ce){var ge=Ce.getUTCDay();return ge===0?7:ge}function et(Ce,ge){return y(A.EV.count((0,d.c)(Ce)-1,Ce),ge,2)}function st(Ce,ge){var pe=Ce.getUTCDay();return Ce=pe>=4||pe===0?(0,A.yA)(Ce):A.yA.ceil(Ce),y(A.yA.count((0,d.c)(Ce),Ce)+((0,d.c)(Ce).getUTCDay()===4),ge,2)}function Ze(Ce){return Ce.getUTCDay()}function Ke(Ce,ge){return y(A.ot.count((0,d.c)(Ce)-1,Ce),ge,2)}function nt(Ce,ge){return y(Ce.getUTCFullYear()%100,ge,2)}function it(Ce,ge){return y(Ce.getUTCFullYear()%1e4,ge,4)}function lt(){return"+0000"}function vt(){return"%"}function xt(Ce){return+Ce}function Je(Ce){return Math.floor(+Ce/1e3)}var Pe,Ue,He;Oe({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"]});function Oe(Ce){return Pe=s(Ce),Ue=Pe.format,Pe.parse,He=Pe.utcFormat,Pe.utcParse,Pe}},68936:function(te,X,e){e.d(X,{m:function(){return L}});var A=e(81628),P=e(69792),o=(0,A.c)(function(M){M.setHours(0,0,0,0)},function(M,d){M.setDate(M.getDate()+d)},function(M,d){return(d-M-(d.getTimezoneOffset()-M.getTimezoneOffset())*P.iy)/P.SK},function(M){return M.getDate()-1});X.c=o;var L=o.range},69792:function(te,X,e){e.d(X,{KK:function(){return M},SK:function(){return L},cg:function(){return o},iy:function(){return P},yc:function(){return A}});var A=1e3,P=6e4,o=36e5,L=864e5,M=6048e5},73220:function(te,X,e){e.r(X),e.d(X,{timeDay:function(){return y.c},timeDays:function(){return y.m},timeFriday:function(){return h.iB},timeFridays:function(){return h.sJ},timeHour:function(){return u},timeHours:function(){return l},timeInterval:function(){return A.c},timeMillisecond:function(){return o},timeMilliseconds:function(){return L},timeMinute:function(){return s},timeMinutes:function(){return a},timeMonday:function(){return h.qT},timeMondays:function(){return h.QP},timeMonth:function(){return f},timeMonths:function(){return n},timeSaturday:function(){return h.Wc},timeSaturdays:function(){return h.aI},timeSecond:function(){return g},timeSeconds:function(){return r},timeSunday:function(){return h.uU},timeSundays:function(){return h.Ab},timeThursday:function(){return h.kD},timeThursdays:function(){return h.eC},timeTuesday:function(){return h.Mf},timeTuesdays:function(){return h.Oc},timeWednesday:function(){return h.eg},timeWednesdays:function(){return h.sn},timeWeek:function(){return h.uU},timeWeeks:function(){return h.Ab},timeYear:function(){return v.c},timeYears:function(){return v.Q},utcDay:function(){return i.c},utcDays:function(){return i.o},utcFriday:function(){return C.od},utcFridays:function(){return C.iG},utcHour:function(){return S},utcHours:function(){return w},utcMillisecond:function(){return o},utcMilliseconds:function(){return L},utcMinute:function(){return b},utcMinutes:function(){return E},utcMonday:function(){return C.ot},utcMondays:function(){return C.iO},utcMonth:function(){return k},utcMonths:function(){return I},utcSaturday:function(){return C.Ad},utcSaturdays:function(){return C.K8},utcSecond:function(){return g},utcSeconds:function(){return r},utcSunday:function(){return C.EV},utcSundays:function(){return C.Wq},utcThursday:function(){return C.yA},utcThursdays:function(){return C.ob},utcTuesday:function(){return C.sG},utcTuesdays:function(){return C.kl},utcWednesday:function(){return C._6},utcWednesdays:function(){return C.W_},utcWeek:function(){return C.EV},utcWeeks:function(){return C.Wq},utcYear:function(){return B.c},utcYears:function(){return B.i}});var A=e(81628),P=(0,A.c)(function(){},function(_,z){_.setTime(+_+z)},function(_,z){return z-_});P.every=function(_){return _=Math.floor(_),!isFinite(_)||!(_>0)?null:_>1?(0,A.c)(function(z){z.setTime(Math.floor(z/_)*_)},function(z,O){z.setTime(+z+O*_)},function(z,O){return(O-z)/_}):P};var o=P,L=P.range,M=e(69792),d=(0,A.c)(function(_){_.setTime(_-_.getMilliseconds())},function(_,z){_.setTime(+_+z*M.yc)},function(_,z){return(z-_)/M.yc},function(_){return _.getUTCSeconds()}),g=d,r=d.range,t=(0,A.c)(function(_){_.setTime(_-_.getMilliseconds()-_.getSeconds()*M.yc)},function(_,z){_.setTime(+_+z*M.iy)},function(_,z){return(z-_)/M.iy},function(_){return _.getMinutes()}),s=t,a=t.range,c=(0,A.c)(function(_){_.setTime(_-_.getMilliseconds()-_.getSeconds()*M.yc-_.getMinutes()*M.iy)},function(_,z){_.setTime(+_+z*M.cg)},function(_,z){return(z-_)/M.cg},function(_){return _.getHours()}),u=c,l=c.range,y=e(68936),h=e(46192),T=(0,A.c)(function(_){_.setDate(1),_.setHours(0,0,0,0)},function(_,z){_.setMonth(_.getMonth()+z)},function(_,z){return z.getMonth()-_.getMonth()+(z.getFullYear()-_.getFullYear())*12},function(_){return _.getMonth()}),f=T,n=T.range,v=e(32171),m=(0,A.c)(function(_){_.setUTCSeconds(0,0)},function(_,z){_.setTime(+_+z*M.iy)},function(_,z){return(z-_)/M.iy},function(_){return _.getUTCMinutes()}),b=m,E=m.range,p=(0,A.c)(function(_){_.setUTCMinutes(0,0,0)},function(_,z){_.setTime(+_+z*M.cg)},function(_,z){return(z-_)/M.cg},function(_){return _.getUTCHours()}),S=p,w=p.range,i=e(58931),C=e(8208),x=(0,A.c)(function(_){_.setUTCDate(1),_.setUTCHours(0,0,0,0)},function(_,z){_.setUTCMonth(_.getUTCMonth()+z)},function(_,z){return z.getUTCMonth()-_.getUTCMonth()+(z.getUTCFullYear()-_.getUTCFullYear())*12},function(_){return _.getUTCMonth()}),k=x,I=x.range,B=e(53528)},81628:function(te,X,e){e.d(X,{c:function(){return o}});var A=new Date,P=new Date;function o(L,M,d,g){function r(t){return L(t=arguments.length===0?new Date:new Date(+t)),t}return r.floor=function(t){return L(t=new Date(+t)),t},r.ceil=function(t){return L(t=new Date(t-1)),M(t,1),L(t),t},r.round=function(t){var s=r(t),a=r.ceil(t);return t-s0))return c;do c.push(u=new Date(+t)),M(t,a),L(t);while(u=s)for(;L(s),!t(s);)s.setTime(s-1)},function(s,a){if(s>=s)if(a<0)for(;++a<=0;)for(;M(s,-1),!t(s););else for(;--a>=0;)for(;M(s,1),!t(s););})},d&&(r.count=function(t,s){return A.setTime(+t),P.setTime(+s),L(A),L(P),Math.floor(d(A,P))},r.every=function(t){return t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?r.filter(g?function(s){return g(s)%t===0}:function(s){return r.count(0,s)%t===0}):r}),r}},58931:function(te,X,e){e.d(X,{o:function(){return L}});var A=e(81628),P=e(69792),o=(0,A.c)(function(M){M.setUTCHours(0,0,0,0)},function(M,d){M.setUTCDate(M.getUTCDate()+d)},function(M,d){return(d-M)/P.SK},function(M){return M.getUTCDate()-1});X.c=o;var L=o.range},8208:function(te,X,e){e.d(X,{Ad:function(){return s},EV:function(){return L},K8:function(){return T},W_:function(){return l},Wq:function(){return a},_6:function(){return g},iG:function(){return h},iO:function(){return c},kl:function(){return u},ob:function(){return y},od:function(){return t},ot:function(){return M},sG:function(){return d},yA:function(){return r}});var A=e(81628),P=e(69792);function o(f){return(0,A.c)(function(n){n.setUTCDate(n.getUTCDate()-(n.getUTCDay()+7-f)%7),n.setUTCHours(0,0,0,0)},function(n,v){n.setUTCDate(n.getUTCDate()+v*7)},function(n,v){return(v-n)/P.KK})}var L=o(0),M=o(1),d=o(2),g=o(3),r=o(4),t=o(5),s=o(6),a=L.range,c=M.range,u=d.range,l=g.range,y=r.range,h=t.range,T=s.range},53528:function(te,X,e){e.d(X,{i:function(){return o}});var A=e(81628),P=(0,A.c)(function(L){L.setUTCMonth(0,1),L.setUTCHours(0,0,0,0)},function(L,M){L.setUTCFullYear(L.getUTCFullYear()+M)},function(L,M){return M.getUTCFullYear()-L.getUTCFullYear()},function(L){return L.getUTCFullYear()});P.every=function(L){return!isFinite(L=Math.floor(L))||!(L>0)?null:(0,A.c)(function(M){M.setUTCFullYear(Math.floor(M.getUTCFullYear()/L)*L),M.setUTCMonth(0,1),M.setUTCHours(0,0,0,0)},function(M,d){M.setUTCFullYear(M.getUTCFullYear()+d*L)})},X.c=P;var o=P.range},46192:function(te,X,e){e.d(X,{Ab:function(){return a},Mf:function(){return d},Oc:function(){return u},QP:function(){return c},Wc:function(){return s},aI:function(){return T},eC:function(){return y},eg:function(){return g},iB:function(){return t},kD:function(){return r},qT:function(){return M},sJ:function(){return h},sn:function(){return l},uU:function(){return L}});var A=e(81628),P=e(69792);function o(f){return(0,A.c)(function(n){n.setDate(n.getDate()-(n.getDay()+7-f)%7),n.setHours(0,0,0,0)},function(n,v){n.setDate(n.getDate()+v*7)},function(n,v){return(v-n-(v.getTimezoneOffset()-n.getTimezoneOffset())*P.iy)/P.KK})}var L=o(0),M=o(1),d=o(2),g=o(3),r=o(4),t=o(5),s=o(6),a=L.range,c=M.range,u=d.range,l=g.range,y=r.range,h=t.range,T=s.range},32171:function(te,X,e){e.d(X,{Q:function(){return o}});var A=e(81628),P=(0,A.c)(function(L){L.setMonth(0,1),L.setHours(0,0,0,0)},function(L,M){L.setFullYear(L.getFullYear()+M)},function(L,M){return M.getFullYear()-L.getFullYear()},function(L){return L.getFullYear()});P.every=function(L){return!isFinite(L=Math.floor(L))||!(L>0)?null:(0,A.c)(function(M){M.setFullYear(Math.floor(M.getFullYear()/L)*L),M.setMonth(0,1),M.setHours(0,0,0,0)},function(M,d){M.setFullYear(M.getFullYear()+d*L)})},X.c=P;var o=P.range},64348:function(te,X,e){var A=e(39640)(),P=e(53664),o=A&&P("%Object.defineProperty%",!0);if(o)try{o({},"a",{value:1})}catch{o=!1}var L=P("%SyntaxError%"),M=P("%TypeError%"),d=e(2304);te.exports=function(r,t,s){if(!r||typeof r!="object"&&typeof r!="function")throw new M("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new M("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new M("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new M("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new M("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new M("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,c=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6?arguments[6]:!1,y=!!d&&d(r,t);if(o)o(r,t,{configurable:u===null&&y?y.configurable:!u,enumerable:a===null&&y?y.enumerable:!a,value:s,writable:c===null&&y?y.writable:!c});else if(l||!a&&!c&&!u)r[t]=s;else throw new L("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}},81288:function(te,X,e){var A=e(41820),P=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",o=Object.prototype.toString,L=Array.prototype.concat,M=Object.defineProperty,d=function(a){return typeof a=="function"&&o.call(a)==="[object Function]"},g=e(39640)(),r=M&&g,t=function(a,c,u,l){if(c in a){if(l===!0){if(a[c]===u)return}else if(!d(l)||!l())return}r?M(a,c,{configurable:!0,enumerable:!1,value:u,writable:!0}):a[c]=u},s=function(a,c){var u=arguments.length>2?arguments[2]:{},l=A(c);P&&(l=L.call(l,Object.getOwnPropertySymbols(c)));for(var y=0;yr*t){var l=(u-c)/r;d[a]=l*1e3}}return d}function o(L){for(var M=[],d=L[0];d<=L[1];d++)for(var g=String.fromCharCode(d),r=L[0];r"u"&&(o=0),typeof P){case"number":if(P>0)return e(P|0,o);break;case"object":if(typeof P.length=="number")return X(P,o,0);break}return[]}te.exports=A},28912:function(te){te.exports=X,te.exports.default=X;function X(I,B,_){_=_||2;var z=B&&B.length,O=z?B[0]*_:I.length,F=e(I,0,O,_,!0),N=[];if(!F||F.next===F.prev)return N;var V,j,$,q,oe,Z,G;if(z&&(F=g(I,B,F,_)),I.length>80*_){V=$=I[0],j=q=I[1];for(var re=_;re$&&($=oe),Z>q&&(q=Z);G=Math.max($-V,q-j),G=G!==0?1/G:0}return P(F,N,_,V,j,G),N}function e(I,B,_,z,O){var F,N;if(O===k(I,B,_,z)>0)for(F=B;F<_;F+=z)N=i(F,I[F],I[F+1],N);else for(F=_-z;F>=B;F-=z)N=i(F,I[F],I[F+1],N);return N&&n(N,N.next)&&(C(N),N=N.next),N}function A(I,B){if(!I)return I;B||(B=I);var _=I,z;do if(z=!1,!_.steiner&&(n(_,_.next)||f(_.prev,_,_.next)===0)){if(C(_),_=B=_.prev,_===_.next)break;z=!0}else _=_.next;while(z||_!==B);return B}function P(I,B,_,z,O,F,N){if(I){!N&&F&&c(I,z,O,F);for(var V=I,j,$;I.prev!==I.next;){if(j=I.prev,$=I.next,F?L(I,z,O,F):o(I)){B.push(j.i/_),B.push(I.i/_),B.push($.i/_),C(I),I=$.next,V=$.next;continue}if(I=$,I===V){N?N===1?(I=M(A(I),B,_),P(I,B,_,z,O,F,2)):N===2&&d(I,B,_,z,O,F):P(A(I),B,_,z,O,F,1);break}}}}function o(I){var B=I.prev,_=I,z=I.next;if(f(B,_,z)>=0)return!1;for(var O=I.next.next;O!==I.prev;){if(h(B.x,B.y,_.x,_.y,z.x,z.y,O.x,O.y)&&f(O.prev,O,O.next)>=0)return!1;O=O.next}return!0}function L(I,B,_,z){var O=I.prev,F=I,N=I.next;if(f(O,F,N)>=0)return!1;for(var V=O.xF.x?O.x>N.x?O.x:N.x:F.x>N.x?F.x:N.x,q=O.y>F.y?O.y>N.y?O.y:N.y:F.y>N.y?F.y:N.y,oe=l(V,j,B,_,z),Z=l($,q,B,_,z),G=I.prevZ,re=I.nextZ;G&&G.z>=oe&&re&&re.z<=Z;){if(G!==I.prev&&G!==I.next&&h(O.x,O.y,F.x,F.y,N.x,N.y,G.x,G.y)&&f(G.prev,G,G.next)>=0||(G=G.prevZ,re!==I.prev&&re!==I.next&&h(O.x,O.y,F.x,F.y,N.x,N.y,re.x,re.y)&&f(re.prev,re,re.next)>=0))return!1;re=re.nextZ}for(;G&&G.z>=oe;){if(G!==I.prev&&G!==I.next&&h(O.x,O.y,F.x,F.y,N.x,N.y,G.x,G.y)&&f(G.prev,G,G.next)>=0)return!1;G=G.prevZ}for(;re&&re.z<=Z;){if(re!==I.prev&&re!==I.next&&h(O.x,O.y,F.x,F.y,N.x,N.y,re.x,re.y)&&f(re.prev,re,re.next)>=0)return!1;re=re.nextZ}return!0}function M(I,B,_){var z=I;do{var O=z.prev,F=z.next.next;!n(O,F)&&v(O,z,z.next,F)&&p(O,F)&&p(F,O)&&(B.push(O.i/_),B.push(z.i/_),B.push(F.i/_),C(z),C(z.next),z=I=F),z=z.next}while(z!==I);return A(z)}function d(I,B,_,z,O,F){var N=I;do{for(var V=N.next.next;V!==N.prev;){if(N.i!==V.i&&T(N,V)){var j=w(N,V);N=A(N,N.next),j=A(j,j.next),P(N,B,_,z,O,F),P(j,B,_,z,O,F);return}V=V.next}N=N.next}while(N!==I)}function g(I,B,_,z){var O=[],F,N,V,j,$;for(F=0,N=B.length;F=_.next.y&&_.next.y!==_.y){var V=_.x+(O-_.y)*(_.next.x-_.x)/(_.next.y-_.y);if(V<=z&&V>F){if(F=V,V===z){if(O===_.y)return _;if(O===_.next.y)return _.next}N=_.x<_.next.x?_:_.next}}_=_.next}while(_!==B);if(!N)return null;if(z===F)return N;var j=N,$=N.x,q=N.y,oe=1/0,Z;_=N;do z>=_.x&&_.x>=$&&z!==_.x&&h(ON.x||_.x===N.x&&a(N,_)))&&(N=_,oe=Z)),_=_.next;while(_!==j);return N}function a(I,B){return f(I.prev,I,B.prev)<0&&f(B.next,I,I.next)<0}function c(I,B,_,z){var O=I;do O.z===null&&(O.z=l(O.x,O.y,B,_,z)),O.prevZ=O.prev,O.nextZ=O.next,O=O.next;while(O!==I);O.prevZ.nextZ=null,O.prevZ=null,u(O)}function u(I){var B,_,z,O,F,N,V,j,$=1;do{for(_=I,I=null,F=null,N=0;_;){for(N++,z=_,V=0,B=0;B<$&&(V++,z=z.nextZ,!!z);B++);for(j=$;V>0||j>0&&z;)V!==0&&(j===0||!z||_.z<=z.z)?(O=_,_=_.nextZ,V--):(O=z,z=z.nextZ,j--),F?F.nextZ=O:I=O,O.prevZ=F,F=O;_=z}F.nextZ=null,$*=2}while(N>1);return I}function l(I,B,_,z,O){return I=32767*(I-_)*O,B=32767*(B-z)*O,I=(I|I<<8)&16711935,I=(I|I<<4)&252645135,I=(I|I<<2)&858993459,I=(I|I<<1)&1431655765,B=(B|B<<8)&16711935,B=(B|B<<4)&252645135,B=(B|B<<2)&858993459,B=(B|B<<1)&1431655765,I|B<<1}function y(I){var B=I,_=I;do(B.x<_.x||B.x===_.x&&B.y<_.y)&&(_=B),B=B.next;while(B!==I);return _}function h(I,B,_,z,O,F,N,V){return(O-N)*(B-V)-(I-N)*(F-V)>=0&&(I-N)*(z-V)-(_-N)*(B-V)>=0&&(_-N)*(F-V)-(O-N)*(z-V)>=0}function T(I,B){return I.next.i!==B.i&&I.prev.i!==B.i&&!E(I,B)&&(p(I,B)&&p(B,I)&&S(I,B)&&(f(I.prev,I,B.prev)||f(I,B.prev,B))||n(I,B)&&f(I.prev,I,I.next)>0&&f(B.prev,B,B.next)>0)}function f(I,B,_){return(B.y-I.y)*(_.x-B.x)-(B.x-I.x)*(_.y-B.y)}function n(I,B){return I.x===B.x&&I.y===B.y}function v(I,B,_,z){var O=b(f(I,B,_)),F=b(f(I,B,z)),N=b(f(_,z,I)),V=b(f(_,z,B));return!!(O!==F&&N!==V||O===0&&m(I,_,B)||F===0&&m(I,z,B)||N===0&&m(_,I,z)||V===0&&m(_,B,z))}function m(I,B,_){return B.x<=Math.max(I.x,_.x)&&B.x>=Math.min(I.x,_.x)&&B.y<=Math.max(I.y,_.y)&&B.y>=Math.min(I.y,_.y)}function b(I){return I>0?1:I<0?-1:0}function E(I,B){var _=I;do{if(_.i!==I.i&&_.next.i!==I.i&&_.i!==B.i&&_.next.i!==B.i&&v(_,_.next,I,B))return!0;_=_.next}while(_!==I);return!1}function p(I,B){return f(I.prev,I,I.next)<0?f(I,B,I.next)>=0&&f(I,I.prev,B)>=0:f(I,B,I.prev)<0||f(I,I.next,B)<0}function S(I,B){var _=I,z=!1,O=(I.x+B.x)/2,F=(I.y+B.y)/2;do _.y>F!=_.next.y>F&&_.next.y!==_.y&&O<(_.next.x-_.x)*(F-_.y)/(_.next.y-_.y)+_.x&&(z=!z),_=_.next;while(_!==I);return z}function w(I,B){var _=new x(I.i,I.x,I.y),z=new x(B.i,B.x,B.y),O=I.next,F=B.prev;return I.next=B,B.prev=I,_.next=O,O.prev=_,z.next=_,_.prev=z,F.next=z,z.prev=F,z}function i(I,B,_,z){var O=new x(I,B,_);return z?(O.next=z.next,O.prev=z,z.next.prev=O,z.next=O):(O.prev=O,O.next=O),O}function C(I){I.next.prev=I.prev,I.prev.next=I.next,I.prevZ&&(I.prevZ.nextZ=I.nextZ),I.nextZ&&(I.nextZ.prevZ=I.prevZ)}function x(I,B,_){this.i=I,this.x=B,this.y=_,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}X.deviation=function(I,B,_,z){var O=B&&B.length,F=O?B[0]*_:I.length,N=Math.abs(k(I,0,F,_));if(O)for(var V=0,j=B.length;V0&&(z+=I[O-1].length,_.holes.push(z))}return _}},6688:function(te,X,e){var A=e(78484);te.exports=function(o,L){var M=[],d=[],g=[],r={},t=[],s;function a(m){g[m]=!1,r.hasOwnProperty(m)&&Object.keys(r[m]).forEach(function(b){delete r[m][b],g[b]&&a(b)})}function c(m){var b=!1;d.push(m),g[m]=!0;var E,p;for(E=0;E=m})}function y(m){l(m);for(var b=o,E=A(b),p=E.components.filter(function(I){return I.length>1}),S=1/0,w,i=0;i=55296&&m<=56319&&(S+=u[++T])),S=l?s.call(l,y,S,f):S,h?(a.value=S,c(n,f,a)):n[f]=S,++f;v=f}}if(v===void 0)for(v=L(u.length),h&&(n=new h(v)),T=0;T0?1:-1}},96936:function(te,X,e){var A=e(85608),P=Math.abs,o=Math.floor;te.exports=function(L){return isNaN(L)?0:(L=Number(L),L===0||!isFinite(L)?L:A(L)*o(P(L)))}},81304:function(te,X,e){var A=e(96936),P=Math.max;te.exports=function(o){return P(0,A(o))}},14428:function(te,X,e){var A=e(34044),P=e(9252),o=Function.prototype.bind,L=Function.prototype.call,M=Object.keys,d=Object.prototype.propertyIsEnumerable;te.exports=function(g,r){return function(t,s){var a,c=arguments[2],u=arguments[3];return t=Object(P(t)),A(s),a=M(t),u&&a.sort(typeof u=="function"?o.call(u,t):void 0),typeof g!="function"&&(g=a[g]),L.call(g,a,function(l,y){return d.call(t,l)?L.call(s,c,t[l],l,t,y):r})}}},38452:function(te,X,e){te.exports=e(96276)()?Object.assign:e(81892)},96276:function(te){te.exports=function(){var X=Object.assign,e;return typeof X!="function"?!1:(e={foo:"raz"},X(e,{bar:"dwa"},{trzy:"trzy"}),e.foo+e.bar+e.trzy==="razdwatrzy")}},81892:function(te,X,e){var A=e(54768),P=e(9252),o=Math.max;te.exports=function(L,M){var d,g,r=o(arguments.length,2),t;for(L=Object(P(L)),t=function(s){try{L[s]=M[s]}catch(a){d||(d=a)}},g=1;g-1}},29768:function(te){var X=Object.prototype.toString,e=X.call("");te.exports=function(A){return typeof A=="string"||A&&typeof A=="object"&&(A instanceof String||X.call(A)===e)||!1}},82252:function(te){var X=Object.create(null),e=Math.random;te.exports=function(){var A;do A=e().toString(36).slice(2);while(X[A]);return A}},52104:function(te,X,e){var A=e(69932),P=e(71056),o=e(21092),L=e(92664),M=e(85512),d=Object.defineProperty,g;g=te.exports=function(r,t){if(!(this instanceof g))throw new TypeError("Constructor requires 'new'");M.call(this,r),t?P.call(t,"key+value")?t="key+value":P.call(t,"key")?t="key":t="value":t="value",d(this,"__kind__",o("",t))},A&&A(g,M),delete g.prototype.constructor,g.prototype=Object.create(M.prototype,{_resolve:o(function(r){return this.__kind__==="value"?this.__list__[r]:this.__kind__==="key+value"?[r,this.__list__[r]]:r})}),d(g.prototype,L.toStringTag,o("c","Array Iterator"))},76024:function(te,X,e){var A=e(60948),P=e(34044),o=e(29768),L=e(76252),M=Array.isArray,d=Function.prototype.call,g=Array.prototype.some;te.exports=function(r,t){var s,a=arguments[2],c,u,l,y,h,T,f;if(M(r)||A(r)?s="array":o(r)?s="string":r=L(r),P(t),u=function(){l=!0},s==="array"){g.call(r,function(n){return d.call(t,a,n,u),l});return}if(s==="string"){for(h=r.length,y=0;y=55296&&f<=56319&&(T+=r[++y])),d.call(t,a,T,u),!l);++y);return}for(c=r.next();!c.done;){if(d.call(t,a,c.value,u),l)return;c=r.next()}}},76252:function(te,X,e){var A=e(60948),P=e(29768),o=e(52104),L=e(80940),M=e(52891),d=e(92664).iterator;te.exports=function(g){return typeof M(g)[d]=="function"?g[d]():A(g)?new o(g):P(g)?new L(g):new o(g)}},85512:function(te,X,e){var A=e(41476),P=e(38452),o=e(34044),L=e(9252),M=e(21092),d=e(27940),g=e(92664),r=Object.defineProperty,t=Object.defineProperties,s;te.exports=s=function(a,c){if(!(this instanceof s))throw new TypeError("Constructor requires 'new'");t(this,{__list__:M("w",L(a)),__context__:M("w",c),__nextIndex__:M("w",0)}),c&&(o(c.on),c.on("_add",this._onAdd),c.on("_delete",this._onDelete),c.on("_clear",this._onClear))},delete s.prototype.constructor,t(s.prototype,P({_next:M(function(){var a;if(this.__list__){if(this.__redo__&&(a=this.__redo__.shift(),a!==void 0))return a;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){r(this,"__redo__",M("c",[a]));return}this.__redo__.forEach(function(c,u){c>=a&&(this.__redo__[u]=++c)},this),this.__redo__.push(a)}}),_onDelete:M(function(a){var c;a>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(c=this.__redo__.indexOf(a),c!==-1&&this.__redo__.splice(c,1),this.__redo__.forEach(function(u,l){u>a&&(this.__redo__[l]=--u)},this)))}),_onClear:M(function(){this.__redo__&&A.call(this.__redo__),this.__nextIndex__=0})}))),r(s.prototype,g.iterator,M(function(){return this}))},76368:function(te,X,e){var A=e(60948),P=e(42584),o=e(29768),L=e(92664).iterator,M=Array.isArray;te.exports=function(d){return P(d)?M(d)||o(d)||A(d)?!0:typeof d[L]=="function":!1}},80940:function(te,X,e){var A=e(69932),P=e(21092),o=e(92664),L=e(85512),M=Object.defineProperty,d;d=te.exports=function(g){if(!(this instanceof d))throw new TypeError("Constructor requires 'new'");g=String(g),L.call(this,g),M(this,"__length__",P("",g.length))},A&&A(d,L),delete d.prototype.constructor,d.prototype=Object.create(L.prototype,{_next:P(function(){if(this.__list__){if(this.__nextIndex__=55296&&t<=56319?r+this.__list__[this.__nextIndex__++]:r)})}),M(d.prototype,o.toStringTag,P("c","String Iterator"))},52891:function(te,X,e){var A=e(76368);te.exports=function(P){if(!A(P))throw new TypeError(P+" is not iterable");return P}},60964:function(te){function X(A,P){if(A==null)throw new TypeError("Cannot convert first argument to object");for(var o=Object(A),L=1;L0&&(S=m[0]),S instanceof Error)throw S;var w=new Error("Unhandled error."+(S?" ("+S.message+")":""));throw w.context=S,w}var i=p[v];if(i===void 0)return!1;if(typeof i=="function")e(i,this,m);else for(var C=i.length,x=u(i,C),b=0;b0&&S.length>E&&!S.warned){S.warned=!0;var w=new Error("Possible EventEmitter memory leak detected. "+S.length+" "+String(v)+" listeners added. Use emitter.setMaxListeners() to increase limit");w.name="MaxListenersExceededWarning",w.emitter=n,w.type=v,w.count=S.length,P(w)}return n}L.prototype.addListener=function(v,m){return r(this,v,m,!1)},L.prototype.on=L.prototype.addListener,L.prototype.prependListener=function(v,m){return r(this,v,m,!0)};function t(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function s(n,v,m){var b={fired:!1,wrapFn:void 0,target:n,type:v,listener:m},E=t.bind(b);return E.listener=m,b.wrapFn=E,E}L.prototype.once=function(v,m){return d(m),this.on(v,s(this,v,m)),this},L.prototype.prependOnceListener=function(v,m){return d(m),this.prependListener(v,s(this,v,m)),this},L.prototype.removeListener=function(v,m){var b,E,p,S,w;if(d(m),E=this._events,E===void 0)return this;if(b=E[v],b===void 0)return this;if(b===m||b.listener===m)--this._eventsCount===0?this._events=Object.create(null):(delete E[v],E.removeListener&&this.emit("removeListener",v,b.listener||m));else if(typeof b!="function"){for(p=-1,S=b.length-1;S>=0;S--)if(b[S]===m||b[S].listener===m){w=b[S].listener,p=S;break}if(p<0)return this;p===0?b.shift():l(b,p),b.length===1&&(E[v]=b[0]),E.removeListener!==void 0&&this.emit("removeListener",v,w||m)}return this},L.prototype.off=L.prototype.removeListener,L.prototype.removeAllListeners=function(v){var m,b,E;if(b=this._events,b===void 0)return this;if(b.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):b[v]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete b[v]),this;if(arguments.length===0){var p=Object.keys(b),S;for(E=0;E=0;E--)this.removeListener(v,m[E]);return this};function a(n,v,m){var b=n._events;if(b===void 0)return[];var E=b[v];return E===void 0?[]:typeof E=="function"?m?[E.listener||E]:[E]:m?y(E):u(E,E.length)}L.prototype.listeners=function(v){return a(this,v,!0)},L.prototype.rawListeners=function(v){return a(this,v,!1)},L.listenerCount=function(n,v){return typeof n.listenerCount=="function"?n.listenerCount(v):c.call(n,v)},L.prototype.listenerCount=c;function c(n){var v=this._events;if(v!==void 0){var m=v[n];if(typeof m=="function")return 1;if(m!==void 0)return m.length}return 0}L.prototype.eventNames=function(){return this._eventsCount>0?A(this._events):[]};function u(n,v){for(var m=new Array(v),b=0;bM[0]-r[0]/2&&(l=r[0]/2,y+=r[1]);return d}},71920:function(te){te.exports=X,X.canvas=document.createElement("canvas"),X.cache={};function X(t,L){L||(L={}),(typeof t=="string"||Array.isArray(t))&&(L.family=t);var M=Array.isArray(L.family)?L.family.join(", "):L.family;if(!M)throw Error("`family` must be defined");var d=L.size||L.fontSize||L.em||48,g=L.weight||L.fontWeight||"",r=L.style||L.fontStyle||"",t=[r,g,d].join(" ")+"px "+M,s=L.origin||"top";if(X.cache[M]&&d<=X.cache[M].em)return e(X.cache[M],s);var a=L.canvas||X.canvas,c=a.getContext("2d"),u={upper:L.upper!==void 0?L.upper:"H",lower:L.lower!==void 0?L.lower:"x",descent:L.descent!==void 0?L.descent:"p",ascent:L.ascent!==void 0?L.ascent:"h",tittle:L.tittle!==void 0?L.tittle:"i",overshoot:L.overshoot!==void 0?L.overshoot:"O"},l=Math.ceil(d*1.5);a.height=l,a.width=l*.5,c.font=t;var y="H",h={top:0};c.clearRect(0,0,l,l),c.textBaseline="top",c.fillStyle="black",c.fillText(y,0,0);var T=A(c.getImageData(0,0,l,l));c.clearRect(0,0,l,l),c.textBaseline="bottom",c.fillText(y,0,l);var f=A(c.getImageData(0,0,l,l));h.lineHeight=h.bottom=l-f+T,c.clearRect(0,0,l,l),c.textBaseline="alphabetic",c.fillText(y,0,l);var n=A(c.getImageData(0,0,l,l)),v=l-n-1+T;h.baseline=h.alphabetic=v,c.clearRect(0,0,l,l),c.textBaseline="middle",c.fillText(y,0,l*.5);var m=A(c.getImageData(0,0,l,l));h.median=h.middle=l-m-1+T-l*.5,c.clearRect(0,0,l,l),c.textBaseline="hanging",c.fillText(y,0,l*.5);var b=A(c.getImageData(0,0,l,l));h.hanging=l-b-1+T-l*.5,c.clearRect(0,0,l,l),c.textBaseline="ideographic",c.fillText(y,0,l);var E=A(c.getImageData(0,0,l,l));if(h.ideographic=l-E-1+T,u.upper&&(c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.upper,0,0),h.upper=A(c.getImageData(0,0,l,l)),h.capHeight=h.baseline-h.upper),u.lower&&(c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.lower,0,0),h.lower=A(c.getImageData(0,0,l,l)),h.xHeight=h.baseline-h.lower),u.tittle&&(c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.tittle,0,0),h.tittle=A(c.getImageData(0,0,l,l))),u.ascent&&(c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.ascent,0,0),h.ascent=A(c.getImageData(0,0,l,l))),u.descent&&(c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.descent,0,0),h.descent=P(c.getImageData(0,0,l,l))),u.overshoot){c.clearRect(0,0,l,l),c.textBaseline="top",c.fillText(u.overshoot,0,0);var p=P(c.getImageData(0,0,l,l));h.overshoot=p-v}for(var S in h)h[S]/=d;return h.em=d,X.cache[M]=h,e(h,s)}function e(o,L){var M={};typeof L=="string"&&(L=o[L]);for(var d in o)d!=="em"&&(M[d]=o[d]-L);return M}function A(o){for(var L=o.height,M=o.data,d=3;d0;d-=4)if(M[d]!==0)return Math.floor((d-3)*.25/L)}},46492:function(te,X,e){var A=e(90720),P=Object.prototype.toString,o=Object.prototype.hasOwnProperty,L=function(t,s,a){for(var c=0,u=t.length;c=3&&(c=a),P.call(t)==="[object Array]"?L(t,s,c):typeof t=="string"?M(t,s,c):d(t,s,c)};te.exports=g},74336:function(te){var X="Function.prototype.bind called on incompatible ",e=Object.prototype.toString,A=Math.max,P="[object Function]",o=function(g,r){for(var t=[],s=0;s"u"&&!A.canvas)return null;var P=A.canvas||document.createElement("canvas");typeof A.width=="number"&&(P.width=A.width),typeof A.height=="number"&&(P.height=A.height);var o=A,L;try{var M=[e];e.indexOf("webgl")===0&&M.push("experimental-"+e);for(var d=0;d"u"||!a?A:a(Uint8Array),l={"%AggregateError%":typeof AggregateError>"u"?A:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?A:ArrayBuffer,"%ArrayIteratorPrototype%":t&&a?a([][Symbol.iterator]()):A,"%AsyncFromSyncIteratorPrototype%":A,"%AsyncFunction%":c,"%AsyncGenerator%":c,"%AsyncGeneratorFunction%":c,"%AsyncIteratorPrototype%":c,"%Atomics%":typeof Atomics>"u"?A:Atomics,"%BigInt%":typeof BigInt>"u"?A:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?A:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?A:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?A:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":typeof Float32Array>"u"?A:Float32Array,"%Float64Array%":typeof Float64Array>"u"?A:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?A:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":c,"%Int8Array%":typeof Int8Array>"u"?A:Int8Array,"%Int16Array%":typeof Int16Array>"u"?A:Int16Array,"%Int32Array%":typeof Int32Array>"u"?A:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":t&&a?a(a([][Symbol.iterator]())):A,"%JSON%":typeof JSON=="object"?JSON:A,"%Map%":typeof Map>"u"?A:Map,"%MapIteratorPrototype%":typeof Map>"u"||!t||!a?A:a(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?A:Promise,"%Proxy%":typeof Proxy>"u"?A:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":typeof Reflect>"u"?A:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?A:Set,"%SetIteratorPrototype%":typeof Set>"u"||!t||!a?A:a(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?A:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":t&&a?a(""[Symbol.iterator]()):A,"%Symbol%":t?Symbol:A,"%SyntaxError%":P,"%ThrowTypeError%":r,"%TypedArray%":u,"%TypeError%":L,"%Uint8Array%":typeof Uint8Array>"u"?A:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?A:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?A:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?A:Uint32Array,"%URIError%":URIError,"%WeakMap%":typeof WeakMap>"u"?A:WeakMap,"%WeakRef%":typeof WeakRef>"u"?A:WeakRef,"%WeakSet%":typeof WeakSet>"u"?A:WeakSet};if(a)try{null.error}catch(x){var y=a(a(x));l["%Error.prototype%"]=y}var h=function x(k){var I;if(k==="%AsyncFunction%")I=M("async function () {}");else if(k==="%GeneratorFunction%")I=M("function* () {}");else if(k==="%AsyncGeneratorFunction%")I=M("async function* () {}");else if(k==="%AsyncGenerator%"){var B=x("%AsyncGeneratorFunction%");B&&(I=B.prototype)}else if(k==="%AsyncIteratorPrototype%"){var _=x("%AsyncGenerator%");_&&a&&(I=a(_.prototype))}return l[k]=I,I},T={"%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"]},f=e(8844),n=e(92064),v=f.call(Function.call,Array.prototype.concat),m=f.call(Function.apply,Array.prototype.splice),b=f.call(Function.call,String.prototype.replace),E=f.call(Function.call,String.prototype.slice),p=f.call(Function.call,RegExp.prototype.exec),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,w=/\\(\\)?/g,i=function(k){var I=E(k,0,1),B=E(k,-1);if(I==="%"&&B!=="%")throw new P("invalid intrinsic syntax, expected closing `%`");if(B==="%"&&I!=="%")throw new P("invalid intrinsic syntax, expected opening `%`");var _=[];return b(k,S,function(z,O,F,N){_[_.length]=F?b(N,w,"$1"):O||z}),_},C=function(k,I){var B=k,_;if(n(T,B)&&(_=T[B],B="%"+_[0]+"%"),n(l,B)){var z=l[B];if(z===c&&(z=h(B)),typeof z>"u"&&!I)throw new L("intrinsic "+k+" exists, but is not available. Please file an issue!");return{alias:_,name:B,value:z}}throw new P("intrinsic "+k+" does not exist!")};te.exports=function(k,I){if(typeof k!="string"||k.length===0)throw new L("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof I!="boolean")throw new L('"allowMissing" argument must be a boolean');if(p(/^%?[^%]*%?$/,k)===null)throw new P("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var B=i(k),_=B.length>0?B[0]:"",z=C("%"+_+"%",I),O=z.name,F=z.value,N=!1,V=z.alias;V&&(_=V[0],m(B,v([0,1],V)));for(var j=1,$=!0;j=B.length){var G=d(F,q);$=!!G,$&&"get"in G&&!("originalValue"in G.get)?F=G.get:F=F[q]}else $=n(F,q),F=F[q];$&&!N&&(l[O]=F)}}return F}},12408:function(te){te.exports=X;function X(e,A){var P=A[0],o=A[1],L=A[2],M=A[3],d=A[4],g=A[5],r=A[6],t=A[7],s=A[8],a=A[9],c=A[10],u=A[11],l=A[12],y=A[13],h=A[14],T=A[15];return e[0]=g*(c*T-u*h)-a*(r*T-t*h)+y*(r*u-t*c),e[1]=-(o*(c*T-u*h)-a*(L*T-M*h)+y*(L*u-M*c)),e[2]=o*(r*T-t*h)-g*(L*T-M*h)+y*(L*t-M*r),e[3]=-(o*(r*u-t*c)-g*(L*u-M*c)+a*(L*t-M*r)),e[4]=-(d*(c*T-u*h)-s*(r*T-t*h)+l*(r*u-t*c)),e[5]=P*(c*T-u*h)-s*(L*T-M*h)+l*(L*u-M*c),e[6]=-(P*(r*T-t*h)-d*(L*T-M*h)+l*(L*t-M*r)),e[7]=P*(r*u-t*c)-d*(L*u-M*c)+s*(L*t-M*r),e[8]=d*(a*T-u*y)-s*(g*T-t*y)+l*(g*u-t*a),e[9]=-(P*(a*T-u*y)-s*(o*T-M*y)+l*(o*u-M*a)),e[10]=P*(g*T-t*y)-d*(o*T-M*y)+l*(o*t-M*g),e[11]=-(P*(g*u-t*a)-d*(o*u-M*a)+s*(o*t-M*g)),e[12]=-(d*(a*h-c*y)-s*(g*h-r*y)+l*(g*c-r*a)),e[13]=P*(a*h-c*y)-s*(o*h-L*y)+l*(o*c-L*a),e[14]=-(P*(g*h-r*y)-d*(o*h-L*y)+l*(o*r-L*g)),e[15]=P*(g*c-r*a)-d*(o*c-L*a)+s*(o*r-L*g),e}},76860:function(te){te.exports=X;function X(e){var A=new Float32Array(16);return A[0]=e[0],A[1]=e[1],A[2]=e[2],A[3]=e[3],A[4]=e[4],A[5]=e[5],A[6]=e[6],A[7]=e[7],A[8]=e[8],A[9]=e[9],A[10]=e[10],A[11]=e[11],A[12]=e[12],A[13]=e[13],A[14]=e[14],A[15]=e[15],A}},64492:function(te){te.exports=X;function X(e,A){return e[0]=A[0],e[1]=A[1],e[2]=A[2],e[3]=A[3],e[4]=A[4],e[5]=A[5],e[6]=A[6],e[7]=A[7],e[8]=A[8],e[9]=A[9],e[10]=A[10],e[11]=A[11],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15],e}},54212:function(te){te.exports=X;function X(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},70800:function(te){te.exports=X;function X(e){var A=e[0],P=e[1],o=e[2],L=e[3],M=e[4],d=e[5],g=e[6],r=e[7],t=e[8],s=e[9],a=e[10],c=e[11],u=e[12],l=e[13],y=e[14],h=e[15],T=A*d-P*M,f=A*g-o*M,n=A*r-L*M,v=P*g-o*d,m=P*r-L*d,b=o*r-L*g,E=t*l-s*u,p=t*y-a*u,S=t*h-c*u,w=s*y-a*l,i=s*h-c*l,C=a*h-c*y;return T*C-f*i+n*w+v*S-m*p+b*E}},61784:function(te){te.exports=X;function X(e,A){var P=A[0],o=A[1],L=A[2],M=A[3],d=P+P,g=o+o,r=L+L,t=P*d,s=o*d,a=o*g,c=L*d,u=L*g,l=L*r,y=M*d,h=M*g,T=M*r;return e[0]=1-a-l,e[1]=s+T,e[2]=c-h,e[3]=0,e[4]=s-T,e[5]=1-t-l,e[6]=u+y,e[7]=0,e[8]=c+h,e[9]=u-y,e[10]=1-t-a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},91616:function(te){te.exports=X;function X(e,A,P){var o,L,M,d=P[0],g=P[1],r=P[2],t=Math.sqrt(d*d+g*g+r*r);return Math.abs(t)<1e-6?null:(t=1/t,d*=t,g*=t,r*=t,o=Math.sin(A),L=Math.cos(A),M=1-L,e[0]=d*d*M+L,e[1]=g*d*M+r*o,e[2]=r*d*M-g*o,e[3]=0,e[4]=d*g*M-r*o,e[5]=g*g*M+L,e[6]=r*g*M+d*o,e[7]=0,e[8]=d*r*M+g*o,e[9]=g*r*M-d*o,e[10]=r*r*M+L,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}},51944:function(te){te.exports=X;function X(e,A,P){var o=A[0],L=A[1],M=A[2],d=A[3],g=o+o,r=L+L,t=M+M,s=o*g,a=o*r,c=o*t,u=L*r,l=L*t,y=M*t,h=d*g,T=d*r,f=d*t;return e[0]=1-(u+y),e[1]=a+f,e[2]=c-T,e[3]=0,e[4]=a-f,e[5]=1-(s+y),e[6]=l+h,e[7]=0,e[8]=c+T,e[9]=l-h,e[10]=1-(s+u),e[11]=0,e[12]=P[0],e[13]=P[1],e[14]=P[2],e[15]=1,e}},69444:function(te){te.exports=X;function X(e,A){return e[0]=A[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=A[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=A[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},48268:function(te){te.exports=X;function X(e,A){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=A[0],e[13]=A[1],e[14]=A[2],e[15]=1,e}},21856:function(te){te.exports=X;function X(e,A){var P=Math.sin(A),o=Math.cos(A);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=P,e[7]=0,e[8]=0,e[9]=-P,e[10]=o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},79216:function(te){te.exports=X;function X(e,A){var P=Math.sin(A),o=Math.cos(A);return e[0]=o,e[1]=0,e[2]=-P,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=P,e[9]=0,e[10]=o,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},57736:function(te){te.exports=X;function X(e,A){var P=Math.sin(A),o=Math.cos(A);return e[0]=o,e[1]=P,e[2]=0,e[3]=0,e[4]=-P,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},38848:function(te){te.exports=X;function X(e,A,P,o,L,M,d){var g=1/(P-A),r=1/(L-o),t=1/(M-d);return e[0]=M*2*g,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=M*2*r,e[6]=0,e[7]=0,e[8]=(P+A)*g,e[9]=(L+o)*r,e[10]=(d+M)*t,e[11]=-1,e[12]=0,e[13]=0,e[14]=d*M*2*t,e[15]=0,e}},36635:function(te){te.exports=X;function X(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},36524:function(te,X,e){te.exports={create:e(54212),clone:e(76860),copy:e(64492),identity:e(36635),transpose:e(86520),invert:e(4308),adjoint:e(12408),determinant:e(70800),multiply:e(80944),translate:e(35176),scale:e(68152),rotate:e(30016),rotateX:e(15456),rotateY:e(64840),rotateZ:e(4192),fromRotation:e(91616),fromRotationTranslation:e(51944),fromScaling:e(69444),fromTranslation:e(48268),fromXRotation:e(21856),fromYRotation:e(79216),fromZRotation:e(57736),fromQuat:e(61784),frustum:e(38848),perspective:e(51296),perspectiveFromFieldOfView:e(63688),ortho:e(97688),lookAt:e(56508),str:e(89412)}},4308:function(te){te.exports=X;function X(e,A){var P=A[0],o=A[1],L=A[2],M=A[3],d=A[4],g=A[5],r=A[6],t=A[7],s=A[8],a=A[9],c=A[10],u=A[11],l=A[12],y=A[13],h=A[14],T=A[15],f=P*g-o*d,n=P*r-L*d,v=P*t-M*d,m=o*r-L*g,b=o*t-M*g,E=L*t-M*r,p=s*y-a*l,S=s*h-c*l,w=s*T-u*l,i=a*h-c*y,C=a*T-u*y,x=c*T-u*h,k=f*x-n*C+v*i+m*w-b*S+E*p;return k?(k=1/k,e[0]=(g*x-r*C+t*i)*k,e[1]=(L*C-o*x-M*i)*k,e[2]=(y*E-h*b+T*m)*k,e[3]=(c*b-a*E-u*m)*k,e[4]=(r*w-d*x-t*S)*k,e[5]=(P*x-L*w+M*S)*k,e[6]=(h*v-l*E-T*n)*k,e[7]=(s*E-c*v+u*n)*k,e[8]=(d*C-g*w+t*p)*k,e[9]=(o*w-P*C-M*p)*k,e[10]=(l*b-y*v+T*f)*k,e[11]=(a*v-s*b-u*f)*k,e[12]=(g*S-d*i-r*p)*k,e[13]=(P*i-o*S+L*p)*k,e[14]=(y*n-l*m-h*f)*k,e[15]=(s*m-a*n+c*f)*k,e):null}},56508:function(te,X,e){var A=e(36635);te.exports=P;function P(o,L,M,d){var g,r,t,s,a,c,u,l,y,h,T=L[0],f=L[1],n=L[2],v=d[0],m=d[1],b=d[2],E=M[0],p=M[1],S=M[2];return Math.abs(T-E)<1e-6&&Math.abs(f-p)<1e-6&&Math.abs(n-S)<1e-6?A(o):(u=T-E,l=f-p,y=n-S,h=1/Math.sqrt(u*u+l*l+y*y),u*=h,l*=h,y*=h,g=m*y-b*l,r=b*u-v*y,t=v*l-m*u,h=Math.sqrt(g*g+r*r+t*t),h?(h=1/h,g*=h,r*=h,t*=h):(g=0,r=0,t=0),s=l*t-y*r,a=y*g-u*t,c=u*r-l*g,h=Math.sqrt(s*s+a*a+c*c),h?(h=1/h,s*=h,a*=h,c*=h):(s=0,a=0,c=0),o[0]=g,o[1]=s,o[2]=u,o[3]=0,o[4]=r,o[5]=a,o[6]=l,o[7]=0,o[8]=t,o[9]=c,o[10]=y,o[11]=0,o[12]=-(g*T+r*f+t*n),o[13]=-(s*T+a*f+c*n),o[14]=-(u*T+l*f+y*n),o[15]=1,o)}},80944:function(te){te.exports=X;function X(e,A,P){var o=A[0],L=A[1],M=A[2],d=A[3],g=A[4],r=A[5],t=A[6],s=A[7],a=A[8],c=A[9],u=A[10],l=A[11],y=A[12],h=A[13],T=A[14],f=A[15],n=P[0],v=P[1],m=P[2],b=P[3];return e[0]=n*o+v*g+m*a+b*y,e[1]=n*L+v*r+m*c+b*h,e[2]=n*M+v*t+m*u+b*T,e[3]=n*d+v*s+m*l+b*f,n=P[4],v=P[5],m=P[6],b=P[7],e[4]=n*o+v*g+m*a+b*y,e[5]=n*L+v*r+m*c+b*h,e[6]=n*M+v*t+m*u+b*T,e[7]=n*d+v*s+m*l+b*f,n=P[8],v=P[9],m=P[10],b=P[11],e[8]=n*o+v*g+m*a+b*y,e[9]=n*L+v*r+m*c+b*h,e[10]=n*M+v*t+m*u+b*T,e[11]=n*d+v*s+m*l+b*f,n=P[12],v=P[13],m=P[14],b=P[15],e[12]=n*o+v*g+m*a+b*y,e[13]=n*L+v*r+m*c+b*h,e[14]=n*M+v*t+m*u+b*T,e[15]=n*d+v*s+m*l+b*f,e}},97688:function(te){te.exports=X;function X(e,A,P,o,L,M,d){var g=1/(A-P),r=1/(o-L),t=1/(M-d);return e[0]=-2*g,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*t,e[11]=0,e[12]=(A+P)*g,e[13]=(L+o)*r,e[14]=(d+M)*t,e[15]=1,e}},51296:function(te){te.exports=X;function X(e,A,P,o,L){var M=1/Math.tan(A/2),d=1/(o-L);return e[0]=M/P,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=M,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(L+o)*d,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*L*o*d,e[15]=0,e}},63688:function(te){te.exports=X;function X(e,A,P,o){var L=Math.tan(A.upDegrees*Math.PI/180),M=Math.tan(A.downDegrees*Math.PI/180),d=Math.tan(A.leftDegrees*Math.PI/180),g=Math.tan(A.rightDegrees*Math.PI/180),r=2/(d+g),t=2/(L+M);return e[0]=r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t,e[6]=0,e[7]=0,e[8]=-((d-g)*r*.5),e[9]=(L-M)*t*.5,e[10]=o/(P-o),e[11]=-1,e[12]=0,e[13]=0,e[14]=o*P/(P-o),e[15]=0,e}},30016:function(te){te.exports=X;function X(e,A,P,o){var L=o[0],M=o[1],d=o[2],g=Math.sqrt(L*L+M*M+d*d),r,t,s,a,c,u,l,y,h,T,f,n,v,m,b,E,p,S,w,i,C,x,k,I;return Math.abs(g)<1e-6?null:(g=1/g,L*=g,M*=g,d*=g,r=Math.sin(P),t=Math.cos(P),s=1-t,a=A[0],c=A[1],u=A[2],l=A[3],y=A[4],h=A[5],T=A[6],f=A[7],n=A[8],v=A[9],m=A[10],b=A[11],E=L*L*s+t,p=M*L*s+d*r,S=d*L*s-M*r,w=L*M*s-d*r,i=M*M*s+t,C=d*M*s+L*r,x=L*d*s+M*r,k=M*d*s-L*r,I=d*d*s+t,e[0]=a*E+y*p+n*S,e[1]=c*E+h*p+v*S,e[2]=u*E+T*p+m*S,e[3]=l*E+f*p+b*S,e[4]=a*w+y*i+n*C,e[5]=c*w+h*i+v*C,e[6]=u*w+T*i+m*C,e[7]=l*w+f*i+b*C,e[8]=a*x+y*k+n*I,e[9]=c*x+h*k+v*I,e[10]=u*x+T*k+m*I,e[11]=l*x+f*k+b*I,A!==e&&(e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15]),e)}},15456:function(te){te.exports=X;function X(e,A,P){var o=Math.sin(P),L=Math.cos(P),M=A[4],d=A[5],g=A[6],r=A[7],t=A[8],s=A[9],a=A[10],c=A[11];return A!==e&&(e[0]=A[0],e[1]=A[1],e[2]=A[2],e[3]=A[3],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15]),e[4]=M*L+t*o,e[5]=d*L+s*o,e[6]=g*L+a*o,e[7]=r*L+c*o,e[8]=t*L-M*o,e[9]=s*L-d*o,e[10]=a*L-g*o,e[11]=c*L-r*o,e}},64840:function(te){te.exports=X;function X(e,A,P){var o=Math.sin(P),L=Math.cos(P),M=A[0],d=A[1],g=A[2],r=A[3],t=A[8],s=A[9],a=A[10],c=A[11];return A!==e&&(e[4]=A[4],e[5]=A[5],e[6]=A[6],e[7]=A[7],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15]),e[0]=M*L-t*o,e[1]=d*L-s*o,e[2]=g*L-a*o,e[3]=r*L-c*o,e[8]=M*o+t*L,e[9]=d*o+s*L,e[10]=g*o+a*L,e[11]=r*o+c*L,e}},4192:function(te){te.exports=X;function X(e,A,P){var o=Math.sin(P),L=Math.cos(P),M=A[0],d=A[1],g=A[2],r=A[3],t=A[4],s=A[5],a=A[6],c=A[7];return A!==e&&(e[8]=A[8],e[9]=A[9],e[10]=A[10],e[11]=A[11],e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15]),e[0]=M*L+t*o,e[1]=d*L+s*o,e[2]=g*L+a*o,e[3]=r*L+c*o,e[4]=t*L-M*o,e[5]=s*L-d*o,e[6]=a*L-g*o,e[7]=c*L-r*o,e}},68152:function(te){te.exports=X;function X(e,A,P){var o=P[0],L=P[1],M=P[2];return e[0]=A[0]*o,e[1]=A[1]*o,e[2]=A[2]*o,e[3]=A[3]*o,e[4]=A[4]*L,e[5]=A[5]*L,e[6]=A[6]*L,e[7]=A[7]*L,e[8]=A[8]*M,e[9]=A[9]*M,e[10]=A[10]*M,e[11]=A[11]*M,e[12]=A[12],e[13]=A[13],e[14]=A[14],e[15]=A[15],e}},89412:function(te){te.exports=X;function X(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},35176:function(te){te.exports=X;function X(e,A,P){var o=P[0],L=P[1],M=P[2],d,g,r,t,s,a,c,u,l,y,h,T;return A===e?(e[12]=A[0]*o+A[4]*L+A[8]*M+A[12],e[13]=A[1]*o+A[5]*L+A[9]*M+A[13],e[14]=A[2]*o+A[6]*L+A[10]*M+A[14],e[15]=A[3]*o+A[7]*L+A[11]*M+A[15]):(d=A[0],g=A[1],r=A[2],t=A[3],s=A[4],a=A[5],c=A[6],u=A[7],l=A[8],y=A[9],h=A[10],T=A[11],e[0]=d,e[1]=g,e[2]=r,e[3]=t,e[4]=s,e[5]=a,e[6]=c,e[7]=u,e[8]=l,e[9]=y,e[10]=h,e[11]=T,e[12]=d*o+s*L+l*M+A[12],e[13]=g*o+a*L+y*M+A[13],e[14]=r*o+c*L+h*M+A[14],e[15]=t*o+u*L+T*M+A[15]),e}},86520:function(te){te.exports=X;function X(e,A){if(e===A){var P=A[1],o=A[2],L=A[3],M=A[6],d=A[7],g=A[11];e[1]=A[4],e[2]=A[8],e[3]=A[12],e[4]=P,e[6]=A[9],e[7]=A[13],e[8]=o,e[9]=M,e[11]=A[14],e[12]=L,e[13]=d,e[14]=g}else e[0]=A[0],e[1]=A[4],e[2]=A[8],e[3]=A[12],e[4]=A[1],e[5]=A[5],e[6]=A[9],e[7]=A[13],e[8]=A[2],e[9]=A[6],e[10]=A[10],e[11]=A[14],e[12]=A[3],e[13]=A[7],e[14]=A[11],e[15]=A[15];return e}},23352:function(te,X,e){var A=e(42771),P=e(55616),o=e(28624),L=e(55212),M=e(60463),d=e(72160),g=e(33888),r=e(14144),t=e(51160),s=e(58908),a=e(65819),c=e(23464),u=e(63768),l=e(50896),y=e(71920),h=e(47520),T=e(308),f=T.nextPow2,n=new M,v=!1;if(document.body){var m=document.body.appendChild(document.createElement("div"));m.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(m).fontStretch&&(v=!0),document.body.removeChild(m)}var b=function(S){E(S)?(S={regl:S},this.gl=S.regl._gl):this.gl=L(S),this.shader=n.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=S.regl||o({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(),n.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(s(S)?S:{})};b.prototype.createShader=function(){var S=this.regl,w=S({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:S.prop("count"),offset:S.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:S.this("sizeBuffer")},width:{offset:0,stride:8,buffer:S.this("sizeBuffer")},char:S.this("charBuffer"),position:S.this("position")},uniforms:{atlasSize:function(C,x){return[x.atlas.width,x.atlas.height]},atlasDim:function(C,x){return[x.atlas.cols,x.atlas.rows]},atlas:function(C,x){return x.atlas.texture},charStep:function(C,x){return x.atlas.step},em:function(C,x){return x.atlas.em},color:S.prop("color"),opacity:S.prop("opacity"),viewport:S.this("viewportArray"),scale:S.this("scale"),align:S.prop("align"),baseline:S.prop("baseline"),translate:S.this("translate"),positionOffset:S.prop("positionOffset")},primitive:"points",viewport:S.this("viewport"),vert:` precision highp float; attribute float width, charOffset, char; attribute vec2 position; uniform float fontSize, charStep, em, align, baseline; uniform vec4 viewport; uniform vec4 color; uniform vec2 atlasSize, atlasDim, scale, translate, positionOffset; varying vec2 charCoord, charId; varying float charWidth; varying vec4 fontColor; void main () { vec2 offset = floor(em * (vec2(align + charOffset, baseline) + vec2(positionOffset.x, -positionOffset.y))) / (viewport.zw * scale.xy); vec2 position = (position + translate) * scale; position += offset * scale; charCoord = position * viewport.zw + viewport.xy; gl_Position = vec4(position * 2. - 1., 0, 1); gl_PointSize = charStep; charId.x = mod(char, atlasDim.x); charId.y = floor(char / atlasDim.x); charWidth = width * em; fontColor = color / 255.; }`,frag:` precision highp float; uniform float fontSize, charStep, opacity; uniform vec2 atlasSize; uniform vec4 viewport; uniform sampler2D atlas; varying vec4 fontColor; varying vec2 charCoord, charId; varying float charWidth; float lightness(vec4 color) { return color.r * 0.299 + color.g * 0.587 + color.b * 0.114; } void main () { vec2 uv = gl_FragCoord.xy - charCoord + charStep * .5; float halfCharStep = floor(charStep * .5 + .5); // invert y and shift by 1px (FF expecially needs that) uv.y = charStep - uv.y; // ignore points outside of character bounding box float halfCharWidth = ceil(charWidth * .5); if (floor(uv.x) > halfCharStep + halfCharWidth || floor(uv.x) < halfCharStep - halfCharWidth) return; uv += charId * charStep; uv = uv / atlasSize; vec4 color = fontColor; vec4 mask = texture2D(atlas, uv); float maskY = lightness(mask); // float colorY = lightness(color); color.a *= maskY; color.a *= opacity; // color.a += .1; // antialiasing, see yiq color space y-channel formula // color.rgb += (1. - color.rgb) * (1. - mask.rgb); gl_FragColor = color; }`}),i={};return{regl:S,draw:w,atlas:i}},b.prototype.update=function(S){var w=this;if(typeof S=="string")S={text:S};else if(!S)return;S=P(S,{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),S.opacity!=null&&(Array.isArray(S.opacity)?this.opacity=S.opacity.map(function(Ie){return parseFloat(Ie)}):this.opacity=parseFloat(S.opacity)),S.viewport!=null&&(this.viewport=t(S.viewport),this.viewportArray=[this.viewport.x,this.viewport.y,this.viewport.width,this.viewport.height]),this.viewport==null&&(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]),S.kerning!=null&&(this.kerning=S.kerning),S.offset!=null&&(typeof S.offset=="number"&&(S.offset=[S.offset,0]),this.positionOffset=h(S.offset)),S.direction&&(this.direction=S.direction),S.range&&(this.range=S.range,this.scale=[1/(S.range[2]-S.range[0]),1/(S.range[3]-S.range[1])],this.translate=[-S.range[0],-S.range[1]]),S.scale&&(this.scale=S.scale),S.translate&&(this.translate=S.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!S.font&&(S.font=b.baseFontSize+"px sans-serif");var i=!1,C=!1;if(S.font&&(Array.isArray(S.font)?S.font:[S.font]).forEach(function(Ie,Ne){if(typeof Ie=="string")try{Ie=A.parse(Ie)}catch{Ie=A.parse(b.baseFontSize+"px "+Ie)}else Ie=A.parse(A.stringify(Ie));var et=A.stringify({size:b.baseFontSize,family:Ie.family,stretch:v?Ie.stretch:void 0,variant:Ie.variant,weight:Ie.weight,style:Ie.style}),st=a(Ie.size),Ze=Math.round(st[0]*c(st[1]));if(Ze!==w.fontSize[Ne]&&(C=!0,w.fontSize[Ne]=Ze),(!w.font[Ne]||et!=w.font[Ne].baseString)&&(i=!0,w.font[Ne]=b.fonts[et],!w.font[Ne])){var Ke=Ie.family.join(", "),nt=[Ie.style];Ie.style!=Ie.variant&&nt.push(Ie.variant),Ie.variant!=Ie.weight&&nt.push(Ie.weight),v&&Ie.weight!=Ie.stretch&&nt.push(Ie.stretch),w.font[Ne]={baseString:et,family:Ke,weight:Ie.weight,stretch:Ie.stretch,style:Ie.style,variant:Ie.variant,width:{},kerning:{},metrics:y(Ke,{origin:"top",fontSize:b.baseFontSize,fontStyle:nt.join(" ")})},b.fonts[et]=w.font[Ne]}}),(i||C)&&this.font.forEach(function(Ie,Ne){var et=A.stringify({size:w.fontSize[Ne],family:Ie.family,stretch:v?Ie.stretch:void 0,variant:Ie.variant,weight:Ie.weight,style:Ie.style});if(w.fontAtlas[Ne]=w.shader.atlas[et],!w.fontAtlas[Ne]){var st=Ie.metrics;w.shader.atlas[et]=w.fontAtlas[Ne]={fontString:et,step:Math.ceil(w.fontSize[Ne]*st.bottom*.5)*2,em:w.fontSize[Ne],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:w.regl.texture()}}S.text==null&&(S.text=w.text)}),typeof S.text=="string"&&S.position&&S.position.length>2){for(var x=Array(S.position.length*.5),k=0;k2){for(var _=!S.position[0].length,z=r.mallocFloat(this.count*2),O=0,F=0;O1?w.align[Ne]:w.align[0]:w.align;if(typeof et=="number")return et;switch(et){case"right":case"end":return-Ie;case"center":case"centre":case"middle":return-Ie*.5}return 0})),this.baseline==null&&S.baseline==null&&(S.baseline=0),S.baseline!=null&&(this.baseline=S.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(Ie,Ne){var et=(w.font[Ne]||w.font[0]).metrics,st=0;return st+=et.bottom*.5,typeof Ie=="number"?st+=Ie-et.baseline:st+=-et[Ie],st*=-1,st})),S.color!=null)if(S.color||(S.color="transparent"),typeof S.color=="string"||!isNaN(S.color))this.color=d(S.color,"uint8");else{var we;if(typeof S.color[0]=="number"&&S.color.length>this.counts.length){var me=S.color.length;we=r.mallocUint8(me);for(var Le=(S.color.subarray||S.color.slice).bind(S.color),ve=0;ve4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(Se){var _e=Math.max(this.position.length*.5||0,this.color.length*.25||0,this.baselineOffset.length||0,this.alignOffset.length||0,this.font.length||0,this.opacity.length||0,this.positionOffset.length*.5||0);this.batch=Array(_e);for(var ze=0;ze1?this.counts[ze]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ze]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ze*4,ze*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ze]:this.opacity,baseline:this.baselineOffset[ze]!=null?this.baselineOffset[ze]:this.baselineOffset[0],align:this.align?this.alignOffset[ze]!=null?this.alignOffset[ze]:this.alignOffset[0]:0,atlas:this.fontAtlas[ze]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ze*2,ze*2+2):this.positionOffset}}else this.count?this.batch=[{count:this.count,offset:0,color:this.color||[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[0]:this.opacity,baseline:this.baselineOffset[0],align:this.alignOffset?this.alignOffset[0]:0,atlas:this.fontAtlas[0],positionOffset:this.positionOffset}]:this.batch=[]}},b.prototype.destroy=function(){},b.prototype.kerning=!0,b.prototype.position={constant:new Float32Array(2)},b.prototype.translate=null,b.prototype.scale=null,b.prototype.font=null,b.prototype.text="",b.prototype.positionOffset=[0,0],b.prototype.opacity=1,b.prototype.color=new Uint8Array([0,0,0,255]),b.prototype.alignOffset=[0,0],b.maxAtlasSize=1024,b.atlasCanvas=document.createElement("canvas"),b.atlasContext=b.atlasCanvas.getContext("2d",{alpha:!1}),b.baseFontSize=64,b.fonts={};function E(p){return typeof p=="function"&&p._gl&&p.prop&&p.texture&&p.buffer}te.exports=b},55212:function(te,X,e){var A=e(55616);te.exports=function(r){if(r?typeof r=="string"&&(r={container:r}):r={},o(r)?r={container:r}:L(r)?r={container:r}:M(r)?r={gl:r}:r=A(r,{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),r.pixelRatio||(r.pixelRatio=e.g.pixelRatio||1),r.gl)return r.gl;if(r.canvas&&(r.container=r.canvas.parentNode),r.container){if(typeof r.container=="string"){var t=document.querySelector(r.container);if(!t)throw Error("Element "+r.container+" is not found");r.container=t}o(r.container)?(r.canvas=r.container,r.container=r.canvas.parentNode):r.canvas||(r.canvas=d(),r.container.appendChild(r.canvas),P(r))}else if(!r.canvas)if(typeof document<"u")r.container=document.body||document.documentElement,r.canvas=d(),r.container.appendChild(r.canvas),P(r);else throw Error("Not DOM environment. Use headless-gl.");return r.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(s){try{r.gl=r.canvas.getContext(s,r.attrs)}catch{}return r.gl}),r.gl};function P(g){if(g.container)if(g.container==document.body)document.body.style.width||(g.canvas.width=g.width||g.pixelRatio*e.g.innerWidth),document.body.style.height||(g.canvas.height=g.height||g.pixelRatio*e.g.innerHeight);else{var r=g.container.getBoundingClientRect();g.canvas.width=g.width||r.right-r.left,g.canvas.height=g.height||r.bottom-r.top}}function o(g){return typeof g.getContext=="function"&&"width"in g&&"height"in g}function L(g){return typeof g.nodeName=="string"&&typeof g.appendChild=="function"&&typeof g.getBoundingClientRect=="function"}function M(g){return typeof g.drawArrays=="function"||typeof g.drawElements=="function"}function d(){var g=document.createElement("canvas");return g.style.position="absolute",g.style.top=0,g.style.left=0,g}},26444:function(te){te.exports=function(X){typeof X=="string"&&(X=[X]);for(var e=[].slice.call(arguments,1),A=[],P=0;P */X.read=function(e,A,P,o,L){var M,d,g=L*8-o-1,r=(1<>1,s=-7,a=P?L-1:0,c=P?-1:1,u=e[A+a];for(a+=c,M=u&(1<<-s)-1,u>>=-s,s+=g;s>0;M=M*256+e[A+a],a+=c,s-=8);for(d=M&(1<<-s)-1,M>>=-s,s+=o;s>0;d=d*256+e[A+a],a+=c,s-=8);if(M===0)M=1-t;else{if(M===r)return d?NaN:(u?-1:1)*(1/0);d=d+Math.pow(2,o),M=M-t}return(u?-1:1)*d*Math.pow(2,M-o)},X.write=function(e,A,P,o,L,M){var d,g,r,t=M*8-L-1,s=(1<>1,c=L===23?Math.pow(2,-24)-Math.pow(2,-77):0,u=o?0:M-1,l=o?1:-1,y=A<0||A===0&&1/A<0?1:0;for(A=Math.abs(A),isNaN(A)||A===1/0?(g=isNaN(A)?1:0,d=s):(d=Math.floor(Math.log(A)/Math.LN2),A*(r=Math.pow(2,-d))<1&&(d--,r*=2),d+a>=1?A+=c/r:A+=c*Math.pow(2,1-a),A*r>=2&&(d++,r/=2),d+a>=s?(g=0,d=s):d+a>=1?(g=(A*r-1)*Math.pow(2,L),d=d+a):(g=A*Math.pow(2,a-1)*Math.pow(2,L),d=0));L>=8;e[P+u]=g&255,u+=l,g/=256,L-=8);for(d=d<0;e[P+u]=d&255,u+=l,d/=256,t-=8);e[P+u-l]|=y*128}},6768:function(te){typeof Object.create=="function"?te.exports=function(e,A){A&&(e.super_=A,e.prototype=Object.create(A.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:te.exports=function(e,A){if(A){e.super_=A;var P=function(){};P.prototype=A.prototype,e.prototype=new P,e.prototype.constructor=e}}},91148:function(te,X,e){var A=e(46672)(),P=e(99676),o=P("Object.prototype.toString"),L=function(r){return A&&r&&typeof r=="object"&&Symbol.toStringTag in r?!1:o(r)==="[object Arguments]"},M=function(r){return L(r)?!0:r!==null&&typeof r=="object"&&typeof r.length=="number"&&r.length>=0&&o(r)!=="[object Array]"&&o(r.callee)==="[object Function]"},d=function(){return L(arguments)}();L.isLegacyArguments=M,te.exports=d?L:M},24200:function(te){te.exports=!0},90720:function(te){var X=Function.prototype.toString,e=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,A,P;if(typeof e=="function"&&typeof Object.defineProperty=="function")try{A=Object.defineProperty({},"length",{get:function(){throw P}}),P={},e(function(){throw 42},null,A)}catch(T){T!==P&&(e=null)}else e=null;var o=/^\s*class\b/,L=function(f){try{var n=X.call(f);return o.test(n)}catch{return!1}},M=function(f){try{return L(f)?!1:(X.call(f),!0)}catch{return!1}},d=Object.prototype.toString,g="[object Object]",r="[object Function]",t="[object GeneratorFunction]",s="[object HTMLAllCollection]",a="[object HTML document.all class]",c="[object HTMLCollection]",u=typeof Symbol=="function"&&!!Symbol.toStringTag,l=!(0 in[,]),y=function(){return!1};if(typeof document=="object"){var h=document.all;d.call(h)===d.call(document.all)&&(y=function(f){if((l||!f)&&(typeof f>"u"||typeof f=="object"))try{var n=d.call(f);return(n===s||n===a||n===c||n===g)&&f("")==null}catch{}return!1})}te.exports=e?function(f){if(y(f))return!0;if(!f||typeof f!="function"&&typeof f!="object")return!1;try{e(f,null,A)}catch(n){if(n!==P)return!1}return!L(f)&&M(f)}:function(f){if(y(f))return!0;if(!f||typeof f!="function"&&typeof f!="object")return!1;if(u)return M(f);if(L(f))return!1;var n=d.call(f);return n!==r&&n!==t&&!/^\[object HTML/.test(n)?!1:M(f)}},84420:function(te,X,e){var A=Object.prototype.toString,P=Function.prototype.toString,o=/^\s*(?:function)?\*/,L=e(46672)(),M=Object.getPrototypeOf,d=function(){if(!L)return!1;try{return Function("return function*() {}")()}catch{}},g;te.exports=function(t){if(typeof t!="function")return!1;if(o.test(P.call(t)))return!0;if(!L){var s=A.call(t);return s==="[object GeneratorFunction]"}if(!M)return!1;if(typeof g>"u"){var a=d();g=a?M(a):!1}return M(t)===g}},96604:function(te){te.exports=typeof navigator<"u"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion))},85992:function(te){te.exports=function(e){return e!==e}},1560:function(te,X,e){var A=e(57916),P=e(81288),o=e(85992),L=e(57740),M=e(59736),d=A(L(),Number);P(d,{getPolyfill:L,implementation:o,shim:M}),te.exports=d},57740:function(te,X,e){var A=e(85992);te.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:A}},59736:function(te,X,e){var A=e(81288),P=e(57740);te.exports=function(){var L=P();return A(Number,{isNaN:L},{isNaN:function(){return Number.isNaN!==L}}),L}},18400:function(te){te.exports=function(X){var e=typeof X;return X!==null&&(e==="object"||e==="function")}},58908:function(te){var X=Object.prototype.toString;te.exports=function(e){var A;return X.call(e)==="[object Object]"&&(A=Object.getPrototypeOf(e),A===null||A===Object.getPrototypeOf({}))}},94576:function(te){te.exports=function(X){for(var e=X.length,A,P=0;P13)&&A!==32&&A!==133&&A!==160&&A!==5760&&A!==6158&&(A<8192||A>8205)&&A!==8232&&A!==8233&&A!==8239&&A!==8287&&A!==8288&&A!==12288&&A!==65279)return!1;return!0}},53520:function(te){te.exports=function(e){return typeof e!="string"?!1:(e=e.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(e)&&/[\dz]$/i.test(e)&&e.length>4))}},7728:function(te,X,e){var A=e(46492),P=e(63436),o=e(99676),L=o("Object.prototype.toString"),M=e(46672)(),d=e(2304),g=typeof globalThis>"u"?e.g:globalThis,r=P(),t=o("Array.prototype.indexOf",!0)||function(y,h){for(var T=0;T-1}return d?u(y):!1}},76244:function(te){te.exports=Math.log2||function(X){return Math.log(X)*Math.LOG2E}},62644:function(te,X,e){te.exports=P;var A=e(93784);function P(o,L){L||(L=o,o=window);var M=0,d=0,g=0,r={shift:!1,alt:!1,control:!1,meta:!1},t=!1;function s(m){var b=!1;return"altKey"in m&&(b=b||m.altKey!==r.alt,r.alt=!!m.altKey),"shiftKey"in m&&(b=b||m.shiftKey!==r.shift,r.shift=!!m.shiftKey),"ctrlKey"in m&&(b=b||m.ctrlKey!==r.control,r.control=!!m.ctrlKey),"metaKey"in m&&(b=b||m.metaKey!==r.meta,r.meta=!!m.metaKey),b}function a(m,b){var E=A.x(b),p=A.y(b);"buttons"in b&&(m=b.buttons|0),(m!==M||E!==d||p!==g||s(b))&&(M=m|0,d=E||0,g=p||0,L&&L(M,d,g,r))}function c(m){a(0,m)}function u(){(M||d||g||r.shift||r.alt||r.meta||r.control)&&(d=g=0,M=0,r.shift=r.alt=r.control=r.meta=!1,L&&L(0,0,0,r))}function l(m){s(m)&&L&&L(M,d,g,r)}function y(m){A.buttons(m)===0?a(0,m):a(M,m)}function h(m){a(M|A.buttons(m),m)}function T(m){a(M&~A.buttons(m),m)}function f(){t||(t=!0,o.addEventListener("mousemove",y),o.addEventListener("mousedown",h),o.addEventListener("mouseup",T),o.addEventListener("mouseleave",c),o.addEventListener("mouseenter",c),o.addEventListener("mouseout",c),o.addEventListener("mouseover",c),o.addEventListener("blur",u),o.addEventListener("keyup",l),o.addEventListener("keydown",l),o.addEventListener("keypress",l),o!==window&&(window.addEventListener("blur",u),window.addEventListener("keyup",l),window.addEventListener("keydown",l),window.addEventListener("keypress",l)))}function n(){t&&(t=!1,o.removeEventListener("mousemove",y),o.removeEventListener("mousedown",h),o.removeEventListener("mouseup",T),o.removeEventListener("mouseleave",c),o.removeEventListener("mouseenter",c),o.removeEventListener("mouseout",c),o.removeEventListener("mouseover",c),o.removeEventListener("blur",u),o.removeEventListener("keyup",l),o.removeEventListener("keydown",l),o.removeEventListener("keypress",l),o!==window&&(window.removeEventListener("blur",u),window.removeEventListener("keyup",l),window.removeEventListener("keydown",l),window.removeEventListener("keypress",l)))}f();var v={element:o};return Object.defineProperties(v,{enabled:{get:function(){return t},set:function(m){m?f():n()},enumerable:!0},buttons:{get:function(){return M},enumerable:!0},x:{get:function(){return d},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return r},enumerable:!0}}),v}},29128:function(te){var X={left:0,top:0};te.exports=e;function e(P,o,L){o=o||P.currentTarget||P.srcElement,Array.isArray(L)||(L=[0,0]);var M=P.clientX||0,d=P.clientY||0,g=A(o);return L[0]=M-g.left,L[1]=d-g.top,L}function A(P){return P===window||P===document||P===document.body?X:P.getBoundingClientRect()}},93784:function(te,X){function e(L){if(typeof L=="object"){if("buttons"in L)return L.buttons;if("which"in L){var M=L.which;if(M===2)return 4;if(M===3)return 2;if(M>0)return 1<=0)return 1<0&&r(s,m))}catch(b){u.call(new y(m),b)}}}function u(n){var v=this;v.triggered||(v.triggered=!0,v.def&&(v=v.def),v.msg=n,v.state=2,v.chain.length>0&&r(s,v))}function l(n,v,m,b){for(var E=0;E7&&(t.push(v.splice(0,7)),v.unshift("C"));break;case"S":var b=h,E=T;(r=="C"||r=="S")&&(b+=b-s,E+=E-a),v=["C",b,E,v[1],v[2],v[3],v[4]];break;case"T":r=="Q"||r=="T"?(l=h*2-l,y=T*2-y):(l=h,y=T),v=o(h,T,l,y,v[1],v[2]);break;case"Q":l=v[1],y=v[2],v=o(h,T,v[1],v[2],v[3],v[4]);break;case"L":v=P(h,T,v[1],v[2]);break;case"H":v=P(h,T,v[1],T);break;case"V":v=P(h,T,h,v[1]);break;case"Z":v=P(h,T,c,u);break}r=m,h=v[v.length-2],T=v[v.length-1],v.length>4?(s=v[v.length-4],a=v[v.length-3]):(s=h,a=T),t.push(v)}return t}function P(g,r,t,s){return["C",g,r,t,s,t,s]}function o(g,r,t,s,a,c){return["C",g/3+.6666666666666666*t,r/3+.6666666666666666*s,a/3+.6666666666666666*t,c/3+.6666666666666666*s,a,c]}function L(g,r,t,s,a,c,u,l,y,h){if(h)w=h[0],i=h[1],p=h[2],S=h[3];else{var T=M(g,r,-a);g=T.x,r=T.y,T=M(l,y,-a),l=T.x,y=T.y;var f=(g-l)/2,n=(r-y)/2,v=f*f/(t*t)+n*n/(s*s);v>1&&(v=Math.sqrt(v),t=v*t,s=v*s);var m=t*t,b=s*s,E=(c==u?-1:1)*Math.sqrt(Math.abs((m*b-m*n*n-b*f*f)/(m*n*n+b*f*f)));E==1/0&&(E=1);var p=E*t*n/s+(g+l)/2,S=E*-s*f/t+(r+y)/2,w=Math.asin(((r-S)/s).toFixed(9)),i=Math.asin(((y-S)/s).toFixed(9));w=gi&&(w=w-X*2),!u&&i>w&&(i=i-X*2)}if(Math.abs(i-w)>e){var C=i,x=l,k=y;i=w+e*(u&&i>w?1:-1),l=p+t*Math.cos(i),y=S+s*Math.sin(i);var I=L(l,y,t,s,a,0,u,x,k,[i,C,p,S])}var B=Math.tan((i-w)/4),_=4/3*t*B,z=4/3*s*B,O=[2*g-(g+_*Math.sin(w)),2*r-(r-z*Math.cos(w)),l+_*Math.sin(i),y-z*Math.cos(i),l,y];if(h)return O;I&&(O=O.concat(I));for(var F=0;F"u")return!1;for(var u in window)try{if(!s["$"+u]&&P.call(window,u)&&window[u]!==null&&typeof window[u]=="object")try{t(window[u])}catch{return!0}}catch{return!0}return!1}(),c=function(u){if(typeof window>"u"||!a)return t(u);try{return t(u)}catch{return!1}};A=function(l){var y=l!==null&&typeof l=="object",h=o.call(l)==="[object Function]",T=L(l),f=y&&o.call(l)==="[object String]",n=[];if(!y&&!h&&!T)throw new TypeError("Object.keys called on a non-object");var v=g&&h;if(f&&l.length>0&&!P.call(l,0))for(var m=0;m0)for(var b=0;b=0&&X.call(A.callee)==="[object Function]"),o}},32868:function(te){function X(P,o){if(typeof P!="string")return[P];var L=[P];typeof o=="string"||Array.isArray(o)?o={brackets:o}:o||(o={});var M=o.brackets?Array.isArray(o.brackets)?o.brackets:[o.brackets]:["{}","[]","()"],d=o.escape||"___",g=!!o.flat;M.forEach(function(s){var a=new RegExp(["\\",s[0],"[^\\",s[0],"\\",s[1],"]*\\",s[1]].join("")),c=[];function u(l,y,h){var T=L.push(l.slice(s[0].length,-s[1].length))-1;return c.push(T),d+T+d}L.forEach(function(l,y){for(var h,T=0;l!=h;)if(h=l,l=l.replace(a,u),T++>1e4)throw Error("References have circular dependency. Please, check them.");L[y]=l}),c=c.reverse(),L=L.map(function(l){return c.forEach(function(y){l=l.replace(new RegExp("(\\"+d+y+"\\"+d+")","g"),s[0]+"$1"+s[1])}),l})});var r=new RegExp("\\"+d+"([0-9]+)\\"+d);function t(s,a,c){for(var u=[],l,y=0;l=r.exec(s);){if(y++>1e4)throw Error("Circular references in parenthesis");u.push(s.slice(0,l.index)),u.push(t(a[l[1]],a)),s=s.slice(l.index+l[0].length)}return u.push(s),u}return g?L:t(L[0],L)}function e(P,o){if(o&&o.flat){var L=o&&o.escape||"___",M=P[0],d;if(!M)return"";for(var g=new RegExp("\\"+L+"([0-9]+)\\"+L),r=0;M!=d;){if(r++>1e4)throw Error("Circular references in "+P);d=M,M=M.replace(g,t)}return M}return P.reduce(function s(a,c){return Array.isArray(c)&&(c=c.reduce(s,"")),a+c},"");function t(s,a){if(P[a]==null)throw Error("Reference "+a+"is undefined");return P[a]}}function A(P,o){return Array.isArray(P)?e(P,o):X(P,o)}A.parse=X,A.stringify=e,te.exports=A},51160:function(te,X,e){var A=e(55616);te.exports=P;function P(o){var L;return arguments.length>1&&(o=arguments),typeof o=="string"?o=o.split(/\s/).map(parseFloat):typeof o=="number"&&(o=[o]),o.length&&typeof o[0]=="number"?o.length===1?L={width:o[0],height:o[0],x:0,y:0}:o.length===2?L={width:o[0],height:o[1],x:0,y:0}:L={x:o[0],y:o[1],width:o[2]-o[0]||0,height:o[3]-o[1]||0}:o&&(o=A(o,{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"}),L={x:o.left||0,y:o.top||0},o.width==null?o.right?L.width=o.right-L.x:L.width=0:L.width=o.width,o.height==null?o.bottom?L.height=o.bottom-L.y:L.height=0:L.height=o.height),L}},21984:function(te){te.exports=A;var X={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},e=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function A(L){var M=[];return L.replace(e,function(d,g,r){var t=g.toLowerCase();for(r=o(r),t=="m"&&r.length>2&&(M.push([g].concat(r.splice(0,2))),t="l",g=g=="m"?"l":"L");;){if(r.length==X[t])return r.unshift(g),M.push(r);if(r.lengthM!=u>M&&L<(c-s)*(M-a)/(u-a)+s;l&&(d=!d)}return d}},14756:function(te,X,e){/* * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc * @license MIT * @preserve Project Home: https://github.com/voidqk/polybooljs */var A=e(7688),P=e(28648),o=e(72200),L=e(11403),M=e(82368),d=e(17792),g=!1,r=P(),t;t={buildLog:function(a){return a===!0?g=A():a===!1&&(g=!1),g===!1?!1:g.list},epsilon:function(a){return r.epsilon(a)},segments:function(a){var c=o(!0,r,g);return a.regions.forEach(c.addRegion),{segments:c.calculate(a.inverted),inverted:a.inverted}},combine:function(a,c){var u=o(!1,r,g);return{combined:u.calculate(a.segments,a.inverted,c.segments,c.inverted),inverted1:a.inverted,inverted2:c.inverted}},selectUnion:function(a){return{segments:M.union(a.combined,g),inverted:a.inverted1||a.inverted2}},selectIntersect:function(a){return{segments:M.intersect(a.combined,g),inverted:a.inverted1&&a.inverted2}},selectDifference:function(a){return{segments:M.difference(a.combined,g),inverted:a.inverted1&&!a.inverted2}},selectDifferenceRev:function(a){return{segments:M.differenceRev(a.combined,g),inverted:!a.inverted1&&a.inverted2}},selectXor:function(a){return{segments:M.xor(a.combined,g),inverted:a.inverted1!==a.inverted2}},polygon:function(a){return{regions:L(a.segments,r,g),inverted:a.inverted}},polygonFromGeoJSON:function(a){return d.toPolygon(t,a)},polygonToGeoJSON:function(a){return d.fromPolygon(t,r,a)},union:function(a,c){return s(a,c,t.selectUnion)},intersect:function(a,c){return s(a,c,t.selectIntersect)},difference:function(a,c){return s(a,c,t.selectDifference)},differenceRev:function(a,c){return s(a,c,t.selectDifferenceRev)},xor:function(a,c){return s(a,c,t.selectXor)}};function s(a,c,u){var l=t.segments(a),y=t.segments(c),h=t.combine(l,y),T=u(h);return t.polygon(T)}typeof window=="object"&&(window.PolyBool=t),te.exports=t},7688:function(te){function X(){var e,A=0,P=!1;function o(L,M){return e.list.push({type:L,data:M?JSON.parse(JSON.stringify(M)):void 0}),e}return e={list:[],segmentId:function(){return A++},checkIntersection:function(L,M){return o("check",{seg1:L,seg2:M})},segmentChop:function(L,M){return o("div_seg",{seg:L,pt:M}),o("chop",{seg:L,pt:M})},statusRemove:function(L){return o("pop_seg",{seg:L})},segmentUpdate:function(L){return o("seg_update",{seg:L})},segmentNew:function(L,M){return o("new_seg",{seg:L,primary:M})},segmentRemove:function(L){return o("rem_seg",{seg:L})},tempStatus:function(L,M,d){return o("temp_status",{seg:L,above:M,below:d})},rewind:function(L){return o("rewind",{seg:L})},status:function(L,M,d){return o("status",{seg:L,above:M,below:d})},vert:function(L){return L===P?e:(P=L,o("vert",{x:L}))},log:function(L){return typeof L!="string"&&(L=JSON.stringify(L,!1," ")),o("log",{txt:L})},reset:function(){return o("reset")},selected:function(L){return o("selected",{segs:L})},chainStart:function(L){return o("chain_start",{seg:L})},chainRemoveHead:function(L,M){return o("chain_rem_head",{index:L,pt:M})},chainRemoveTail:function(L,M){return o("chain_rem_tail",{index:L,pt:M})},chainNew:function(L,M){return o("chain_new",{pt1:L,pt2:M})},chainMatch:function(L){return o("chain_match",{index:L})},chainClose:function(L){return o("chain_close",{index:L})},chainAddHead:function(L,M){return o("chain_add_head",{index:L,pt:M})},chainAddTail:function(L,M){return o("chain_add_tail",{index:L,pt:M})},chainConnect:function(L,M){return o("chain_con",{index1:L,index2:M})},chainReverse:function(L){return o("chain_rev",{index:L})},chainJoin:function(L,M){return o("chain_join",{index1:L,index2:M})},done:function(){return o("done")}},e}te.exports=X},28648:function(te){function X(e){typeof e!="number"&&(e=1e-10);var A={epsilon:function(P){return typeof P=="number"&&(e=P),e},pointAboveOrOnLine:function(P,o,L){var M=o[0],d=o[1],g=L[0],r=L[1],t=P[0],s=P[1];return(g-M)*(s-d)-(r-d)*(t-M)>=-e},pointBetween:function(P,o,L){var M=P[1]-o[1],d=L[0]-o[0],g=P[0]-o[0],r=L[1]-o[1],t=g*d+M*r;if(t-e)},pointsSameX:function(P,o){return Math.abs(P[0]-o[0])e!=g-M>e&&(d-s)*(M-a)/(g-a)+s-L>e&&(r=!r),d=s,g=a}return r}};return A}te.exports=X},17792:function(te){var X={toPolygon:function(e,A){function P(M){if(M.length<=0)return e.segments({inverted:!1,regions:[]});function d(t){var s=t.slice(0,t.length-1);return e.segments({inverted:!1,regions:[s]})}for(var g=d(M[0]),r=1;r0})}function b(_,z){var O=_.seg,F=z.seg,N=O.start,V=O.end,j=F.start,$=F.end;M&&M.checkIntersection(O,F);var q=L.linesIntersect(N,V,j,$);if(q===!1){if(!L.pointsCollinear(N,V,j)||L.pointsSame(N,$)||L.pointsSame(V,j))return!1;var oe=L.pointsSame(N,j),Z=L.pointsSame(V,$);if(oe&&Z)return z;var G=!oe&&L.pointBetween(N,j,$),re=!Z&&L.pointBetween(V,j,$);if(oe)return re?y(z,V):y(_,$),z;G&&(Z||(re?y(z,V):y(_,$)),y(z,N))}else q.alongA===0&&(q.alongB===-1?y(_,j):q.alongB===0?y(_,q.pt):q.alongB===1&&y(_,$)),q.alongB===0&&(q.alongA===-1?y(z,N):q.alongA===0?y(z,q.pt):q.alongA===1&&y(z,V));return!1}for(var E=[];!r.isEmpty();){var p=r.getHead();if(M&&M.vert(p.pt[0]),p.isStart){let _=function(){if(w){var z=b(p,w);if(z)return z}return i?b(p,i):!1};M&&M.segmentNew(p.seg,p.primary);var S=m(p),w=S.before?S.before.ev:null,i=S.after?S.after.ev:null;M&&M.tempStatus(p.seg,w?w.seg:!1,i?i.seg:!1);var C=_();if(C){if(o){var x;p.seg.myFill.below===null?x=!0:x=p.seg.myFill.above!==p.seg.myFill.below,x&&(C.seg.myFill.above=!C.seg.myFill.above)}else C.seg.otherFill=p.seg.myFill;M&&M.segmentUpdate(C.seg),p.other.remove(),p.remove()}if(r.getHead()!==p){M&&M.rewind(p.seg);continue}if(o){var x;p.seg.myFill.below===null?x=!0:x=p.seg.myFill.above!==p.seg.myFill.below,i?p.seg.myFill.below=i.seg.myFill.above:p.seg.myFill.below=T,x?p.seg.myFill.above=!p.seg.myFill.below:p.seg.myFill.above=p.seg.myFill.below}else if(p.seg.otherFill===null){var k;i?p.primary===i.primary?k=i.seg.otherFill.above:k=i.seg.myFill.above:k=p.primary?f:T,p.seg.otherFill={above:k,below:k}}M&&M.status(p.seg,w?w.seg:!1,i?i.seg:!1),p.other.status=S.insert(A.node({ev:p}))}else{var I=p.status;if(I===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(n.exists(I.prev)&&n.exists(I.next)&&b(I.prev.ev,I.next.ev),M&&M.statusRemove(I.ev.seg),I.remove(),!p.primary){var B=p.seg.myFill;p.seg.myFill=p.seg.otherFill,p.seg.otherFill=B}E.push(p.seg)}r.getHead().remove()}return M&&M.done(),E}return o?{addRegion:function(T){for(var f,n=T[T.length-1],v=0;v0&&!this.aborted;){var L=this.ifds_to_read.shift();L.offset&&this.scan_ifd(L.id,L.offset,P)}},A.prototype.read_uint16=function(P){var o=this.input;if(P+2>o.length)throw X("unexpected EOF","EBADDATA");return this.big_endian?o[P]*256+o[P+1]:o[P]+o[P+1]*256},A.prototype.read_uint32=function(P){var o=this.input;if(P+4>o.length)throw X("unexpected EOF","EBADDATA");return this.big_endian?o[P]*16777216+o[P+1]*65536+o[P+2]*256+o[P+3]:o[P]+o[P+1]*256+o[P+2]*65536+o[P+3]*16777216},A.prototype.is_subifd_link=function(P,o){return P===0&&o===34665||P===0&&o===34853||P===34665&&o===40965},A.prototype.exif_format_length=function(P){switch(P){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}},A.prototype.exif_format_read=function(P,o){var L;switch(P){case 1:case 2:return L=this.input[o],L;case 6:return L=this.input[o],L|(L&128)*33554430;case 3:return L=this.read_uint16(o),L;case 8:return L=this.read_uint16(o),L|(L&32768)*131070;case 4:return L=this.read_uint32(o),L;case 9:return L=this.read_uint32(o),L|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}},A.prototype.scan_ifd=function(P,o,L){var M=this.read_uint16(o);o+=2;for(var d=0;dthis.input.length)throw X("unexpected EOF","EBADDATA");for(var l=[],y=c,h=0;h0&&(this.ifds_to_read.push({id:g,offset:l[0]}),u=!0);var f={is_big_endian:this.big_endian,ifd:P,tag:g,format:r,count:t,entry_offset:o+this.start,data_length:a,data_offset:c+this.start,value:l,is_subifd_link:u};if(L(f)===!1){this.aborted=!0;return}o+=12}P===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(o)})},te.exports.ExifParser=A,te.exports.get_orientation=function(P){var o=0;try{return new A(P,0,P.length).each(function(L){if(L.ifd===0&&L.tag===274&&Array.isArray(L.value))return o=L.value[0],!1}),o}catch{return-1}}},44600:function(te,X,e){var A=e(9696).eW,P=e(9696).eI;function o(a,c){if(a.length<4+c)return null;var u=P(a,c);return a.length>4&15,l=a[4]&15,y=a[5]>>4&15,h=A(a,6),T=8,f=0;fh.width||y.width===h.width&&y.height>h.height?y:h}),u=a.reduce(function(y,h){return y.height>h.height||y.height===h.height&&y.width>h.width?y:h}),l;return c.width>u.height||c.width===u.height&&c.height>u.width?l=c:l=u,l}te.exports.readSizeFromMeta=function(a){var c={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(t(a,c),!!c.sizes.length){var u=s(c.sizes),l=1;c.transforms.forEach(function(h){var T={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},f={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(h.type==="imir"&&(h.value===0?l=f[l]:(l=f[l],l=T[l],l=T[l])),h.type==="irot")for(var n=0;n1&&(l.variants=u.variants),u.orientation&&(l.orientation=u.orientation),u.exif_location&&u.exif_location.offset+u.exif_location.length<=g.length){var y=o(g,u.exif_location.offset),h=g.slice(u.exif_location.offset+y+4,u.exif_location.offset+u.exif_location.length),T=M.get_orientation(h);T>0&&(l.orientation=T)}return l}}}}}}},38728:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).Bz,L=A("BM");te.exports=function(M){if(!(M.length<26)&&P(M,0,L))return{width:o(M,18),height:o(M,22),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}},5588:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).Bz,L=A("GIF87a"),M=A("GIF89a");te.exports=function(d){if(!(d.length<10)&&!(!P(d,0,L)&&!P(d,0,M)))return{width:o(d,6),height:o(d,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}},41924:function(te,X,e){var A=e(9696).Bz,P=0,o=1,L=16;te.exports=function(M){var d=A(M,0),g=A(M,2),r=A(M,4);if(!(d!==P||g!==o||!r)){for(var t=[],s={width:0,height:0},a=0;as.width||u>s.height)&&(s=l)}return{width:s.width,height:s.height,variants:t,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}},87968:function(te,X,e){var A=e(9696).eW,P=e(9696).wR,o=e(9696).gS,L=e(11688),M=P("Exif\0\0");te.exports=function(d){if(!(d.length<2)&&!(d[0]!==255||d[1]!==216||d[2]!==255))for(var g=2;;){for(;;){if(d.length-g<2)return;if(d[g++]===255)break}for(var r=d[g++],t;r===255;)r=d[g++];if(208<=r&&r<=217||r===1)t=0;else if(192<=r&&r<=254){if(d.length-g<2)return;t=A(d,g)-2,g+=2}else return;if(r===217||r===218)return;var s;if(r===225&&t>=10&&o(d,g,M)&&(s=L.get_orientation(d.slice(g+6,g+t))),t>=5&&192<=r&&r<=207&&r!==196&&r!==200&&r!==204){if(d.length-g0&&(a.orientation=s),a}g+=t}}},37276:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).eI,L=A(`‰PNG\r  `),M=A("IHDR");te.exports=function(d){if(!(d.length<24)&&P(d,0,L)&&P(d,12,M))return{width:o(d,16),height:o(d,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}},90328:function(te,X,e){var A=e(9696).wR,P=e(9696).gS,o=e(9696).eI,L=A("8BPS\0");te.exports=function(M){if(!(M.length<22)&&P(M,0,L))return{width:o(M,18),height:o(M,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}},16024:function(te){function X(s){return s===32||s===9||s===13||s===10}function e(s){return typeof s=="number"&&isFinite(s)&&s>0}function A(s){var a=0,c=s.length;for(s[0]===239&&s[1]===187&&s[2]===191&&(a=3);a]*>/,o=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,L=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,M=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,d=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,g=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function r(s){var a=s.match(L),c=s.match(M),u=s.match(d);return{width:a&&(a[1]||a[2]),height:c&&(c[1]||c[2]),viewbox:u&&(u[1]||u[2])}}function t(s){return g.test(s)?s.match(g)[0]:"px"}te.exports=function(s){if(A(s)){for(var a="",c=0;c>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function s(a,c){return{width:(a[c+6]<<16|a[c+5]<<8|a[c+4])+1,height:(a[c+9]<a.length)){for(;c+8=10?u=u||r(a,c+8):h==="VP8L"&&T>=9?u=u||t(a,c+8):h==="VP8X"&&T>=10?u=u||s(a,c+8):h==="EXIF"&&(l=M.get_orientation(a.slice(c+8,c+8+T)),c=1/0),c+=8+T}if(u)return l>0&&(u.orientation=l),u}}}},87480:function(te,X,e){te.exports={avif:e(40528),bmp:e(38728),gif:e(5588),ico:e(41924),jpeg:e(87968),png:e(37276),psd:e(90328),svg:e(16024),tiff:e(98792),webp:e(20704)}},19480:function(te,X,e){var A=e(87480);function P(o){for(var L=Object.keys(A),M=0;M1)for(var h=1;h"u"?e.g:window,o=["moz","webkit"],L="AnimationFrame",M=P["request"+L],d=P["cancel"+L]||P["cancelRequest"+L],g=0;!M&&g1&&(C.scaleRatio=[C.scale[0]*C.viewport.width,C.scale[1]*C.viewport.height],y(C),C.after&&C.after(C))}function w(C){if(C){C.length!=null?typeof C[0]=="number"&&(C=[{positions:C}]):Array.isArray(C)||(C=[C]);var x=0,k=0;if(E.groups=b=C.map(function(N,V){var j=b[V];if(N)typeof N=="function"?N={after:N}:typeof N[0]=="number"&&(N={positions:N});else return j;return N=L(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||(b[V]=j={id:V,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},N=M({},m,N)),o(j,N,[{lineWidth:function($){return+$*.5},capSize:function($){return+$*.5},opacity:parseFloat,errors:function($){return $=d($),k+=$.length,$},positions:function($,q){return $=d($,"float64"),q.count=Math.floor($.length/2),q.bounds=A($,2),q.offset=x,x+=q.count,$}},{color:function($,q){var oe=q.count;if($||($="transparent"),!Array.isArray($)||typeof $[0]=="number"){var Z=$;$=Array(oe);for(var G=0;G 0. && baClipping < length(normalWidth * endBotJoin)) { //handle miter clipping bTopCoord -= normalWidth * endTopJoin; bTopCoord += normalize(endTopJoin * normalWidth) * baClipping; } if (nextReverse) { //make join rectangular vec2 miterShift = normalWidth * endJoinDirection * miterLimit * .5; float normalAdjust = 1. - min(miterLimit / endMiterRatio, 1.); bBotCoord = bCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; bTopCoord = bCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; } else if (!prevReverse && abClipping > 0. && abClipping < length(normalWidth * startBotJoin)) { //handle miter clipping aBotCoord -= normalWidth * startBotJoin; aBotCoord += normalize(startBotJoin * normalWidth) * abClipping; } vec2 aTopPosition = (aTopCoord) * adjustedScale + translate; vec2 aBotPosition = (aBotCoord) * adjustedScale + translate; vec2 bTopPosition = (bTopCoord) * adjustedScale + translate; vec2 bBotPosition = (bBotCoord) * adjustedScale + translate; //position is normalized 0..1 coord on the screen vec2 position = (aTopPosition * lineTop + aBotPosition * lineBot) * lineStart + (bTopPosition * lineTop + bBotPosition * lineBot) * lineEnd; startCoord = aCoord * scaleRatio + translate * viewport.zw + viewport.xy; endCoord = bCoord * scaleRatio + translate * viewport.zw + viewport.xy; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); enableStartMiter = step(dot(currTangent, prevTangent), .5); enableEndMiter = step(dot(currTangent, nextTangent), .5); //bevel miter cutoffs if (miterMode == 1.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * miterLimit * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * miterLimit * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } //round miter cutoffs else if (miterMode == 2.) { if (enableStartMiter == 1.) { vec2 startMiterWidth = vec2(startJoinDirection) * thickness * abs(dot(startJoinDirection, currNormal)) * .5; startCutoff = vec4(aCoord, aCoord); startCutoff.zw += vec2(-startJoinDirection.y, startJoinDirection.x) / scaleRatio; startCutoff = startCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; startCutoff += viewport.xyxy; startCutoff += startMiterWidth.xyxy; } if (enableEndMiter == 1.) { vec2 endMiterWidth = vec2(endJoinDirection) * thickness * abs(dot(endJoinDirection, currNormal)) * .5; endCutoff = vec4(bCoord, bCoord); endCutoff.zw += vec2(-endJoinDirection.y, endJoinDirection.x) / scaleRatio; endCutoff = endCutoff * scaleRatio.xyxy + translate.xyxy * viewport.zwzw; endCutoff += viewport.xyxy; endCutoff += endMiterWidth.xyxy; } } } `,n=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id, miterMode; uniform sampler2D dashTexture; varying vec4 fragColor; varying vec2 tangent; varying vec4 startCutoff, endCutoff; varying vec2 startCoord, endCoord; varying float enableStartMiter, enableEndMiter; float distToLine(vec2 p, vec2 a, vec2 b) { vec2 diff = b - a; vec2 perp = normalize(vec2(-diff.y, diff.x)); return dot(p - a, perp); } void main() { float alpha = 1., distToStart, distToEnd; float cutoff = thickness * .5; //bevel miter if (miterMode == 1.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < -1.) { discard; return; } alpha *= min(max(distToStart + 1., 0.), 1.); } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < -1.) { discard; return; } alpha *= min(max(distToEnd + 1., 0.), 1.); } } // round miter else if (miterMode == 2.) { if (enableStartMiter == 1.) { distToStart = distToLine(gl_FragCoord.xy, startCutoff.xy, startCutoff.zw); if (distToStart < 0.) { float radius = length(gl_FragCoord.xy - startCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } if (enableEndMiter == 1.) { distToEnd = distToLine(gl_FragCoord.xy, endCutoff.xy, endCutoff.zw); if (distToEnd < 0.) { float radius = length(gl_FragCoord.xy - endCoord); if(radius > cutoff + .5) { discard; return; } alpha -= smoothstep(cutoff - .5, cutoff + .5, radius); } } } float t = fract(dot(tangent, gl_FragCoord.xy) / dashLength) * .5 + .25; float dash = texture2D(dashTexture, vec2(t, .5)).r; gl_FragColor = fragColor; gl_FragColor.a *= alpha * opacity * dash; } `;te.exports=v;function v(m,b){if(!(this instanceof v))return new v(m,b);if(typeof m=="function"?(b||(b={}),b.regl=m):b=m,b.length&&(b.positions=b),m=b.regl,!m.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=m._gl,this.regl=m,this.passes=[],this.shaders=v.shaders.has(m)?v.shaders.get(m):v.shaders.set(m,v.createShaders(m)).get(m),this.update(b)}v.dashMult=2,v.maxPatternLength=256,v.precisionThreshold=3e6,v.maxPoints=1e4,v.maxLines=2048,v.shaders=new a,v.createShaders=function(m){var b=m.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),E={primitive:"triangle strip",instances:m.prop("count"),count:4,offset:0,uniforms:{miterMode:function(i,C){return C.join==="round"?2:1},miterLimit:m.prop("miterLimit"),scale:m.prop("scale"),scaleFract:m.prop("scaleFract"),translateFract:m.prop("translateFract"),translate:m.prop("translate"),thickness:m.prop("thickness"),dashTexture:m.prop("dashTexture"),opacity:m.prop("opacity"),pixelRatio:m.context("pixelRatio"),id:m.prop("id"),dashLength:m.prop("dashLength"),viewport:function(i,C){return[C.viewport.x,C.viewport.y,i.viewportWidth,i.viewportHeight]},depth:m.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(i,C){return!C.overlay}},stencil:{enable:!1},scissor:{enable:!0,box:m.prop("viewport")},viewport:m.prop("viewport")},p=m(o({vert:l,frag:y,attributes:{lineEnd:{buffer:b,divisor:0,stride:8,offset:0},lineTop:{buffer:b,divisor:0,stride:8,offset:4},aCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:m.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:m.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:m.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},E)),S;try{S=m(o({cull:{enable:!0,face:"back"},vert:f,frag:n,attributes:{lineEnd:{buffer:b,divisor:0,stride:8,offset:0},lineTop:{buffer:b,divisor:0,stride:8,offset:4},aColor:{buffer:m.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:m.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:m.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},E))}catch{S=p}var w=m({primitive:"triangle",elements:function(i,C){return C.triangles},offset:0,vert:h,frag:T,uniforms:{scale:m.prop("scale"),color:m.prop("fill"),scaleFract:m.prop("scaleFract"),translateFract:m.prop("translateFract"),translate:m.prop("translate"),opacity:m.prop("opacity"),pixelRatio:m.context("pixelRatio"),id:m.prop("id"),viewport:function(i,C){return[C.viewport.x,C.viewport.y,i.viewportWidth,i.viewportHeight]}},attributes:{position:{buffer:m.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:m.prop("positionFractBuffer"),stride:8,offset:8}},blend:E.blend,depth:{enable:!1},scissor:E.scissor,stencil:E.stencil,viewport:E.viewport});return{fill:w,rect:p,miter:S}},v.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},v.prototype.render=function(){for(var m,b=[],E=arguments.length;E--;)b[E]=arguments[E];b.length&&(m=this).update.apply(m,b),this.draw()},v.prototype.draw=function(){for(var m=this,b=[],E=arguments.length;E--;)b[E]=arguments[E];return(b.length?b:this.passes).forEach(function(p,S){var w;if(p&&Array.isArray(p))return(w=m).draw.apply(w,p);typeof p=="number"&&(p=m.passes[p]),p&&p.count>1&&p.opacity&&(m.regl._refresh(),p.fill&&p.triangles&&p.triangles.length>2&&m.shaders.fill(p),p.thickness&&(p.scale[0]*p.viewport.width>v.precisionThreshold||p.scale[1]*p.viewport.height>v.precisionThreshold||p.join==="rect"||!p.join&&(p.thickness<=2||p.count>=v.maxPoints)?m.shaders.rect(p):m.shaders.miter(p)))}),this},v.prototype.update=function(m){var b=this;if(m){m.length!=null?typeof m[0]=="number"&&(m=[{positions:m}]):Array.isArray(m)||(m=[m]);var E=this,p=E.regl,S=E.gl;if(m.forEach(function(k,I){var B=b.passes[I];if(k!==void 0){if(k===null){b.passes[I]=null;return}if(typeof k[0]=="number"&&(k={positions:k}),k=L(k,{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"}),B||(b.passes[I]=B={id:I,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:p.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:p.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:p.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:p.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},k=o({},v.defaults,k)),k.thickness!=null&&(B.thickness=parseFloat(k.thickness)),k.opacity!=null&&(B.opacity=parseFloat(k.opacity)),k.miterLimit!=null&&(B.miterLimit=parseFloat(k.miterLimit)),k.overlay!=null&&(B.overlay=!!k.overlay,I=Y});J=J.slice(0,ie),J.push(Y)}for(var ne=function(be){var ke=j.slice(K*2,J[be]*2).concat(Y?j.slice(Y*2):[]),Ve=(B.hole||[]).map(function(at){return at-Y+(J[be]-K)}),je=d(ke,Ve);je=je.map(function(at){return at+K+(at+Ki.length)&&(C=i.length);for(var x=0,k=new Array(C);x 1.0 + delta) { discard; } alpha -= smoothstep(1.0 - delta, 1.0 + delta, radius); float borderRadius = fragBorderRadius; float ratio = smoothstep(borderRadius - delta, borderRadius + delta, radius); vec4 color = mix(fragColor, fragBorderColor, ratio); color.a *= alpha * opacity; gl_FragColor = color; } `]),q.vert=h([`precision highp float; #define GLSLIFY 1 attribute float x, y, xFract, yFract; attribute float size, borderSize; attribute vec4 colorId, borderColorId; attribute float isActive; // \`invariant\` effectively turns off optimizations for the position. // We need this because -fast-math on M1 Macs is re-ordering // floating point operations in a way that causes floating point // precision limits to put points in the wrong locations. invariant gl_Position; uniform bool constPointSize; uniform float pixelRatio; uniform vec2 paletteSize, scale, scaleFract, translate, translateFract; uniform sampler2D paletteTexture; const float maxSize = 100.; varying vec4 fragColor, fragBorderColor; varying float fragBorderRadius, fragWidth; float pointSizeScale = (constPointSize) ? 2. : pixelRatio; bool isDirect = (paletteSize.x < 1.); vec4 getColor(vec4 id) { return isDirect ? id / 255. : texture2D(paletteTexture, vec2( (id.x + .5) / paletteSize.x, (id.y + .5) / paletteSize.y ) ); } void main() { // ignore inactive points if (isActive == 0.) return; vec2 position = vec2(x, y); vec2 positionFract = vec2(xFract, yFract); vec4 color = getColor(colorId); vec4 borderColor = getColor(borderColorId); float size = size * maxSize / 255.; float borderSize = borderSize * maxSize / 255.; gl_PointSize = (size + borderSize) * pointSizeScale; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; gl_Position = vec4(pos * 2. - 1., 0., 1.); fragBorderRadius = 1. - 2. * borderSize / (size + borderSize); fragColor = color; fragBorderColor = borderColor.a == 0. || borderSize == 0. ? vec4(color.rgb, 0.) : borderColor; fragWidth = 1. / gl_PointSize; } `]),v&&(q.frag=q.frag.replace("smoothstep","smoothStep"),$.frag=$.frag.replace("smoothstep","smoothStep")),this.drawCircle=i(q)}p.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},p.prototype.render=function(){return arguments.length&&this.update.apply(this,arguments),this.draw(),this},p.prototype.draw=function(){for(var i=this,C=arguments.length,x=new Array(C),k=0;kze)?Se.tree=l(ye,{bounds:Ze}):ze&&ze.length&&(Se.tree=ze),Se.tree){var Ke={primitive:"points",usage:"static",data:Se.tree,type:"uint32"};Se.elements?Se.elements(Ke):Se.elements=_.elements(Ke)}var nt=m.float32(ye);Ie({data:nt,usage:"dynamic"});var it=m.fract32(ye,nt);return Ne({data:it,usage:"dynamic"}),et({data:new Uint8Array(st),type:"uint8",usage:"stream"}),ye}},{marker:function(ye,Se,_e){var ze=Se.activation;if(ze.forEach(function(it){return it&&it.destroy&&it.destroy()}),ze.length=0,!ye||typeof ye[0]=="number"){var Ie=i.addMarker(ye);ze[Ie]=!0}else{for(var Ne=[],et=0,st=Math.min(ye.length,Se.count);et=0)return I;var B;if(i instanceof Uint8Array||i instanceof Uint8ClampedArray)B=i;else{B=new Uint8Array(i.length);for(var _=0,z=i.length;_k*4&&(this.tooManyColors=!0),this.updatePalette(x),I.length===1?I[0]:I},p.prototype.updatePalette=function(i){if(!this.tooManyColors){var C=this.maxColors,x=this.paletteTexture,k=Math.ceil(i.length*.25/C);if(k>1){i=i.slice();for(var I=i.length*.25%C;Ik)&&!(!T.lower&&x2?(n[0],n[2],y=n[1],h=n[3]):n.length?(y=n[0],h=n[1]):(n.x,y=n.y,n.x+n.width,h=n.y+n.height),v.length>2?(T=v[0],f=v[2],v[1],v[3]):v.length?(T=v[0],f=v[1]):(T=v.x,v.y,f=v.x+v.width,v.y+v.height),[T,y,f,h]}function a(c){if(typeof c=="number")return[c,c,c,c];if(c.length===2)return[c[0],c[1],c[0],c[1]];var u=d(c);return[u.x,u.y,u.x+u.width,u.y+u.height]}},28624:function(te){(function(X,e){te.exports=e()})(this,function(){function X(ht,Ht){this.id=le++,this.type=ht,this.data=Ht}function e(ht){if(ht.length===0)return[];var Ht=ht.charAt(0),Wt=ht.charAt(ht.length-1);if(1"u"?1:window.devicePixelRatio,Et=!1,Mt={},_t=function(Gt){},It=function(){};if(typeof Ht=="string"?Wt=document.querySelector(Ht):typeof Ht=="object"&&(typeof Ht.nodeName=="string"&&typeof Ht.appendChild=="function"&&typeof Ht.getBoundingClientRect=="function"?Wt=Ht:typeof Ht.drawArrays=="function"||typeof Ht.drawElements=="function"?(ct=Ht,er=ct.canvas):("gl"in Ht?ct=Ht.gl:"canvas"in Ht?er=g(Ht.canvas):"container"in Ht&&(cr=g(Ht.container)),"attributes"in Ht&&(ht=Ht.attributes),"extensions"in Ht&&(qe=d(Ht.extensions)),"optionalExtensions"in Ht&&(dt=d(Ht.optionalExtensions)),"onDone"in Ht&&(_t=Ht.onDone),"profile"in Ht&&(Et=!!Ht.profile),"pixelRatio"in Ht&&(bt=+Ht.pixelRatio),"cachedCode"in Ht&&(Mt=Ht.cachedCode))),Wt&&(Wt.nodeName.toLowerCase()==="canvas"?er=Wt:cr=Wt),!ct){if(!er){if(Wt=L(cr||document.body,_t,bt),!Wt)return null;er=Wt.canvas,It=Wt.onDestroy}ht.premultipliedAlpha===void 0&&(ht.premultipliedAlpha=!0),ct=M(er,ht)}return ct?{gl:ct,canvas:er,container:cr,extensions:qe,optionalExtensions:dt,pixelRatio:bt,profile:Et,cachedCode:Mt,onDone:_t,onDestroy:It}:(It(),_t("webgl not supported, try upgrading your browser or graphics drivers http://get.webgl.org"),null)}function t(ht,Ht){function Wt(qe){qe=qe.toLowerCase();var dt;try{dt=cr[qe]=ht.getExtension(qe)}catch{}return!!dt}for(var cr={},er=0;er>>=Ht,Wt=(255>>=Wt,Ht|=Wt,Wt=(15>>=Wt,Ht|=Wt,Wt=(3>>Wt>>1}function c(){function ht(cr){e:{for(var er=16;268435456>=er;er*=16)if(cr<=er){cr=er;break e}cr=0}return er=Wt[a(cr)>>2],0>2].push(cr)}var Wt=s(8,function(){return[]});return{alloc:ht,free:Ht,allocType:function(cr,er){var ct=null;switch(cr){case 5120:ct=new Int8Array(ht(er),0,er);break;case 5121:ct=new Uint8Array(ht(er),0,er);break;case 5122:ct=new Int16Array(ht(2*er),0,er);break;case 5123:ct=new Uint16Array(ht(2*er),0,er);break;case 5124:ct=new Int32Array(ht(4*er),0,er);break;case 5125:ct=new Uint32Array(ht(4*er),0,er);break;case 5126:ct=new Float32Array(ht(4*er),0,er);break;default:return null}return ct.length!==er?ct.subarray(0,er):ct},freeType:function(cr){Ht(cr.buffer)}}}function u(ht){return!!ht&&typeof ht=="object"&&Array.isArray(ht.shape)&&Array.isArray(ht.stride)&&typeof ht.offset=="number"&&ht.shape.length===ht.stride.length&&(Array.isArray(ht.data)||Ae(ht.data))}function l(ht,Ht,Wt,cr,er,ct){for(var qe=0;qeIt&&(It=_t.buffer.byteLength,Fe===5123?It>>=1:Fe===5125&&(It>>=2)),_t.vertCount=It,It=nr,0>nr&&(It=4,nr=_t.buffer.dimension,nr===1&&(It=0),nr===2&&(It=1),nr===3&&(It=4)),_t.primType=It}function qe(_t){cr.elementsCount--,delete dt[_t.id],_t.buffer.destroy(),_t.buffer=null}var dt={},bt=0,Et={uint8:5121,uint16:5123};Ht.oes_element_index_uint&&(Et.uint32=5125),er.prototype.bind=function(){this.buffer.bind()};var Mt=[];return{create:function(_t,It){function Gt(ir){if(ir)if(typeof ir=="number")nr(ir),ar.primType=4,ar.vertCount=ir|0,ar.type=5121;else{var Be=null,Fe=35044,Rt=-1,Lt=-1,Ut=0,Qt=0;Array.isArray(ir)||Ae(ir)||u(ir)?Be=ir:("data"in ir&&(Be=ir.data),"usage"in ir&&(Fe=Ie[ir.usage]),"primitive"in ir&&(Rt=Ze[ir.primitive]),"count"in ir&&(Lt=ir.count|0),"type"in ir&&(Qt=Et[ir.type]),"length"in ir?Ut=ir.length|0:(Ut=Lt,Qt===5123||Qt===5122?Ut*=2:(Qt===5125||Qt===5124)&&(Ut*=4))),ct(ar,Be,Fe,Rt,Lt,Ut,Qt)}else nr(),ar.primType=4,ar.vertCount=0,ar.type=5121;return Gt}var nr=Wt.create(null,34963,!0),ar=new er(nr._buffer);return cr.elementsCount++,Gt(_t),Gt._reglType="elements",Gt._elements=ar,Gt.subdata=function(ir,Be){return nr.subdata(ir,Be),Gt},Gt.destroy=function(){qe(ar)},Gt},createStream:function(_t){var It=Mt.pop();return It||(It=new er(Wt.create(null,34963,!0,!1)._buffer)),ct(It,_t,35040,-1,-1,0,0),It},destroyStream:function(_t){Mt.push(_t)},getElements:function(_t){return typeof _t=="function"&&_t._elements instanceof er?_t._elements:null},clear:function(){ye(dt).forEach(qe)}}}function m(ht){for(var Ht=Le.allocType(5123,ht.length),Wt=0;Wt>>31<<15,er=(ct<<1>>>24)-127,ct=ct>>13&1023;Ht[Wt]=-24>er?cr:-14>er?cr+(ct+1024>>-14-er):15>=zn,Xr.height>>=zn,It(Xr,fn[zn]),pr.mipmask|=1<$r;++$r)pr.images[$r]=null;return pr}function Ut(pr){for(var $r=pr.images,Xr=0;Xr<$r.length;++Xr)$r[Xr]&&ar($r[Xr]),$r[Xr]=null;Kn.push(pr)}function Qt(){this.magFilter=this.minFilter=9728,this.wrapT=this.wrapS=33071,this.anisotropic=1,this.genMipmaps=!1,this.mipmapHint=4352}function rr(pr,$r){"min"in $r&&(pr.minFilter=Ar[$r.min],0<=it.indexOf(pr.minFilter)&&!("faces"in $r)&&(pr.genMipmaps=!0)),"mag"in $r&&(pr.magFilter=Sr[$r.mag]);var Xr=pr.wrapS,fn=pr.wrapT;if("wrap"in $r){var zn=$r.wrap;typeof zn=="string"?Xr=fn=Or[zn]:Array.isArray(zn)&&(Xr=Or[zn[0]],fn=Or[zn[1]])}else"wrapS"in $r&&(Xr=Or[$r.wrapS]),"wrapT"in $r&&(fn=Or[$r.wrapT]);if(pr.wrapS=Xr,pr.wrapT=fn,"anisotropic"in $r&&(pr.anisotropic=$r.anisotropic),"mipmap"in $r){switch(Xr=!1,typeof $r.mipmap){case"string":pr.mipmapHint=lr[$r.mipmap],Xr=pr.genMipmaps=!0;break;case"boolean":Xr=pr.genMipmaps=$r.mipmap;break;case"object":pr.genMipmaps=!1,Xr=!0}!Xr||"min"in $r||(pr.minFilter=9984)}}function Kt(pr,$r){ht.texParameteri($r,10241,pr.minFilter),ht.texParameteri($r,10240,pr.magFilter),ht.texParameteri($r,10242,pr.wrapS),ht.texParameteri($r,10243,pr.wrapT),Ht.ext_texture_filter_anisotropic&&ht.texParameteri($r,34046,pr.anisotropic),pr.genMipmaps&&(ht.hint(33170,pr.mipmapHint),ht.generateMipmap($r))}function Dt(pr){dt.call(this),this.mipmask=0,this.internalformat=6408,this.id=sa++,this.refCount=1,this.target=pr,this.texture=ht.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new Qt,qe.profile&&(this.stats={size:0})}function sr(pr){ht.activeTexture(33984),ht.bindTexture(pr.target,pr.texture)}function fr(){var pr=aa[0];pr?ht.bindTexture(pr.target,pr.texture):ht.bindTexture(3553,null)}function vr(pr){var $r=pr.texture,Xr=pr.unit,fn=pr.target;0<=Xr&&(ht.activeTexture(33984+Xr),ht.bindTexture(fn,null),aa[Xr]=null),ht.deleteTexture($r),pr.texture=null,pr.params=null,pr.pixels=null,pr.refCount=0,delete na[pr.id],ct.textureCount--}var lr={"don't care":4352,"dont care":4352,nice:4354,fast:4353},Or={repeat:10497,clamp:33071,mirror:33648},Sr={nearest:9728,linear:9729},Ar=ne({mipmap:9987,"nearest mipmap nearest":9984,"linear mipmap nearest":9985,"nearest mipmap linear":9986,"linear mipmap linear":9987},Sr),sn={none:0,browser:37444},Jr={uint8:5121,rgba4:32819,rgb565:33635,"rgb5 a1":32820},bn={alpha:6406,luminance:6409,"luminance alpha":6410,rgb:6407,rgba:6408,rgba4:32854,"rgb5 a1":32855,rgb565:36194},xn={};Ht.ext_srgb&&(bn.srgb=35904,bn.srgba=35906),Ht.oes_texture_float&&(Jr.float32=Jr.float=5126),Ht.oes_texture_half_float&&(Jr.float16=Jr["half float"]=36193),Ht.webgl_depth_texture&&(ne(bn,{depth:6402,"depth stencil":34041}),ne(Jr,{uint16:5123,uint32:5125,"depth stencil":34042})),Ht.webgl_compressed_texture_s3tc&&ne(xn,{"rgb s3tc dxt1":33776,"rgba s3tc dxt1":33777,"rgba s3tc dxt3":33778,"rgba s3tc dxt5":33779}),Ht.webgl_compressed_texture_atc&&ne(xn,{"rgb atc":35986,"rgba atc explicit alpha":35987,"rgba atc interpolated alpha":34798}),Ht.webgl_compressed_texture_pvrtc&&ne(xn,{"rgb pvrtc 4bppv1":35840,"rgb pvrtc 2bppv1":35841,"rgba pvrtc 4bppv1":35842,"rgba pvrtc 2bppv1":35843}),Ht.webgl_compressed_texture_etc1&&(xn["rgb etc1"]=36196);var or=Array.prototype.slice.call(ht.getParameter(34467));Object.keys(xn).forEach(function(pr){var $r=xn[pr];0<=or.indexOf($r)&&(bn[pr]=$r)});var Lr=Object.keys(bn);Wt.textureFormats=Lr;var Br=[];Object.keys(bn).forEach(function(pr){Br[bn[pr]]=pr});var _r=[];Object.keys(Jr).forEach(function(pr){_r[Jr[pr]]=pr});var Qr=[];Object.keys(Sr).forEach(function(pr){Qr[Sr[pr]]=pr});var un=[];Object.keys(Ar).forEach(function(pr){un[Ar[pr]]=pr});var ln=[];Object.keys(Or).forEach(function(pr){ln[Or[pr]]=pr});var Mn=Lr.reduce(function(pr,$r){var Xr=bn[$r];return Xr===6409||Xr===6406||Xr===6409||Xr===6410||Xr===6402||Xr===34041||Ht.ext_srgb&&(Xr===35904||Xr===35906)?pr[Xr]=Xr:Xr===32855||0<=$r.indexOf("rgba")?pr[Xr]=6408:pr[Xr]=6407,pr},{}),Dn=[],Kn=[],sa=0,na={},Jn=Wt.maxTextureUnits,aa=Array(Jn).map(function(){return null});return ne(Dt.prototype,{bind:function(){this.bindCount+=1;var pr=this.unit;if(0>pr){for(var $r=0;$r=--this.refCount&&vr(this)}}),qe.profile&&(ct.getTotalTextureSize=function(){var pr=0;return Object.keys(na).forEach(function($r){pr+=na[$r].stats.size}),pr}),{create2D:function(pr,$r){function Xr(zn,pn){var gn=fn.texInfo;Qt.call(gn);var In=Lt();return typeof zn=="number"?typeof pn=="number"?Be(In,zn|0,pn|0):Be(In,zn|0,zn|0):zn?(rr(gn,zn),Fe(In,zn)):Be(In,1,1),gn.genMipmaps&&(In.mipmask=(In.width<<1)-1),fn.mipmask=In.mipmask,bt(fn,In),fn.internalformat=In.internalformat,Xr.width=In.width,Xr.height=In.height,sr(fn),Rt(In,3553),Kt(gn,3553),fr(),Ut(In),qe.profile&&(fn.stats.size=x(fn.internalformat,fn.type,In.width,In.height,gn.genMipmaps,!1)),Xr.format=Br[fn.internalformat],Xr.type=_r[fn.type],Xr.mag=Qr[gn.magFilter],Xr.min=un[gn.minFilter],Xr.wrapS=ln[gn.wrapS],Xr.wrapT=ln[gn.wrapT],Xr}var fn=new Dt(3553);return na[fn.id]=fn,ct.textureCount++,Xr(pr,$r),Xr.subimage=function(zn,pn,gn,In){pn|=0,gn|=0,In|=0;var Gn=nr();return bt(Gn,fn),Gn.width=0,Gn.height=0,It(Gn,zn),Gn.width=Gn.width||(fn.width>>In)-pn,Gn.height=Gn.height||(fn.height>>In)-gn,sr(fn),Gt(Gn,3553,pn,gn,In),fr(),ar(Gn),Xr},Xr.resize=function(zn,pn){var gn=zn|0,In=pn|0||gn;if(gn===fn.width&&In===fn.height)return Xr;Xr.width=fn.width=gn,Xr.height=fn.height=In,sr(fn);for(var Gn=0;fn.mipmask>>Gn;++Gn){var ua=gn>>Gn,Ma=In>>Gn;if(!ua||!Ma)break;ht.texImage2D(3553,Gn,fn.format,ua,Ma,0,fn.format,fn.type,null)}return fr(),qe.profile&&(fn.stats.size=x(fn.internalformat,fn.type,gn,In,!1,!1)),Xr},Xr._reglType="texture2d",Xr._texture=fn,qe.profile&&(Xr.stats=fn.stats),Xr.destroy=function(){fn.decRef()},Xr},createCube:function(pr,$r,Xr,fn,zn,pn){function gn(ua,Ma,xr,Rr,yr,Dr){var vn,En=In.texInfo;for(Qt.call(En),vn=0;6>vn;++vn)Gn[vn]=Lt();if(typeof ua=="number"||!ua)for(ua=ua|0||1,vn=0;6>vn;++vn)Be(Gn[vn],ua,ua);else if(typeof ua=="object")if(Ma)Fe(Gn[0],ua),Fe(Gn[1],Ma),Fe(Gn[2],xr),Fe(Gn[3],Rr),Fe(Gn[4],yr),Fe(Gn[5],Dr);else if(rr(En,ua),Et(In,ua),"faces"in ua)for(ua=ua.faces,vn=0;6>vn;++vn)bt(Gn[vn],In),Fe(Gn[vn],ua[vn]);else for(vn=0;6>vn;++vn)Fe(Gn[vn],ua);for(bt(In,Gn[0]),In.mipmask=En.genMipmaps?(Gn[0].width<<1)-1:Gn[0].mipmask,In.internalformat=Gn[0].internalformat,gn.width=Gn[0].width,gn.height=Gn[0].height,sr(In),vn=0;6>vn;++vn)Rt(Gn[vn],34069+vn);for(Kt(En,34067),fr(),qe.profile&&(In.stats.size=x(In.internalformat,In.type,gn.width,gn.height,En.genMipmaps,!0)),gn.format=Br[In.internalformat],gn.type=_r[In.type],gn.mag=Qr[En.magFilter],gn.min=un[En.minFilter],gn.wrapS=ln[En.wrapS],gn.wrapT=ln[En.wrapT],vn=0;6>vn;++vn)Ut(Gn[vn]);return gn}var In=new Dt(34067);na[In.id]=In,ct.cubeCount++;var Gn=Array(6);return gn(pr,$r,Xr,fn,zn,pn),gn.subimage=function(ua,Ma,xr,Rr,yr){xr|=0,Rr|=0,yr|=0;var Dr=nr();return bt(Dr,In),Dr.width=0,Dr.height=0,It(Dr,Ma),Dr.width=Dr.width||(In.width>>yr)-xr,Dr.height=Dr.height||(In.height>>yr)-Rr,sr(In),Gt(Dr,34069+ua,xr,Rr,yr),fr(),ar(Dr),gn},gn.resize=function(ua){if(ua|=0,ua!==In.width){gn.width=In.width=ua,gn.height=In.height=ua,sr(In);for(var Ma=0;6>Ma;++Ma)for(var xr=0;In.mipmask>>xr;++xr)ht.texImage2D(34069+Ma,xr,In.format,ua>>xr,ua>>xr,0,In.format,In.type,null);return fr(),qe.profile&&(In.stats.size=x(In.internalformat,In.type,gn.width,gn.height,!1,!0)),gn}},gn._reglType="textureCube",gn._texture=In,qe.profile&&(gn.stats=In.stats),gn.destroy=function(){In.decRef()},gn},clear:function(){for(var pr=0;prfn;++fn)if(Xr.mipmask&1<>fn,Xr.height>>fn,0,Xr.internalformat,Xr.type,null);else for(var zn=0;6>zn;++zn)ht.texImage2D(34069+zn,fn,Xr.internalformat,Xr.width>>fn,Xr.height>>fn,0,Xr.internalformat,Xr.type,null);Kt(Xr.texInfo,Xr.target)})},refresh:function(){for(var pr=0;prlr;++lr){for(Jr=0;Jrvr;++vr)fr[vr].resize(lr);return sr.width=sr.height=lr,sr},_reglType:"framebufferCube",destroy:function(){fr.forEach(function(vr){vr.destroy()})}})},clear:function(){ye(Kt).forEach(ir)},restore:function(){Rt.cur=null,Rt.next=null,Rt.dirty=!0,ye(Kt).forEach(function(Dt){Dt.framebuffer=ht.createFramebuffer(),Be(Dt)})}})}function B(){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 _(ht,Ht,Wt,cr,er,ct,qe){function dt(Be){if(Be!==ir.currentVAO){var Fe=Ht.oes_vertex_array_object;Be?Fe.bindVertexArrayOES(Be.vao):Fe.bindVertexArrayOES(null),ir.currentVAO=Be}}function bt(Be){if(Be!==ir.currentVAO){if(Be)Be.bindAttrs();else{for(var Fe=Ht.angle_instanced_arrays,Rt=0;Rt=sr.byteLength?fr.subdata(sr):(fr.destroy(),Rt.buffers[rr]=null)),Rt.buffers[rr]||(fr=Rt.buffers[rr]=er.create(Kt,34962,!1,!0)),Dt.buffer=er.getBuffer(fr),Dt.size=Dt.buffer.dimension|0,Dt.normalized=!1,Dt.type=Dt.buffer.dtype,Dt.offset=0,Dt.stride=0,Dt.divisor=0,Dt.state=1,Lt[rr]=1}else er.getBuffer(Kt)?(Dt.buffer=er.getBuffer(Kt),Dt.size=Dt.buffer.dimension|0,Dt.normalized=!1,Dt.type=Dt.buffer.dtype,Dt.offset=0,Dt.stride=0,Dt.divisor=0,Dt.state=1):er.getBuffer(Kt.buffer)?(Dt.buffer=er.getBuffer(Kt.buffer),Dt.size=(+Kt.size||Dt.buffer.dimension)|0,Dt.normalized=!!Kt.normalized||!1,Dt.type="type"in Kt?ze[Kt.type]:Dt.buffer.dtype,Dt.offset=(Kt.offset||0)|0,Dt.stride=(Kt.stride||0)|0,Dt.divisor=(Kt.divisor||0)|0,Dt.state=1):"x"in Kt&&(Dt.x=+Kt.x||0,Dt.y=+Kt.y||0,Dt.z=+Kt.z||0,Dt.w=+Kt.w||0,Dt.state=2)}for(fr=0;frnr&&(nr=ar.stats.uniformsCount)}),nr},Wt.getMaxAttributesCount=function(){var nr=0;return It.forEach(function(ar){ar.stats.attributesCount>nr&&(nr=ar.stats.attributesCount)}),nr}),{clear:function(){var nr=ht.deleteShader.bind(ht);ye(Et).forEach(nr),Et={},ye(Mt).forEach(nr),Mt={},It.forEach(function(ar){ht.deleteProgram(ar.program)}),It.length=0,_t={},Wt.shaderCount=0},program:function(nr,ar,ir,Be){var Fe=_t[ar];Fe||(Fe=_t[ar]={});var Rt=Fe[nr];if(Rt&&(Rt.refCount++,!Be))return Rt;var Lt=new dt(ar,nr);return Wt.shaderCount++,bt(Lt,ir,Be),Rt||(Fe[nr]=Lt),It.push(Lt),ne(Lt,{destroy:function(){if(Lt.refCount--,0>=Lt.refCount){ht.deleteProgram(Lt.program);var Ut=It.indexOf(Lt);It.splice(Ut,1),Wt.shaderCount--}0>=Fe[Lt.vertId].refCount&&(ht.deleteShader(Mt[Lt.vertId]),delete Mt[Lt.vertId],delete _t[Lt.fragId][Lt.vertId]),Object.keys(_t[Lt.fragId]).length||(ht.deleteShader(Et[Lt.fragId]),delete Et[Lt.fragId],delete _t[Lt.fragId])}})},restore:function(){Et={},Mt={};for(var nr=0;nr>2),cr=0;cr>5]|=(ht.charCodeAt(cr/8)&255)<<24-cr%32;var Wt=8*ht.length;ht=[1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225];var cr=Array(64),er,ct,qe,dt,bt,Et,Mt,_t,It,Gt,nr;for(Ht[Wt>>5]|=128<<24-Wt%32,Ht[(Wt+64>>9<<4)+15]=Wt,_t=0;_tIt;It++){if(16>It)cr[It]=Ht[It+_t];else{Gt=It,nr=cr[It-2],nr=j(nr,17)^j(nr,19)^nr>>>10,nr=$(nr,cr[It-7]);var ar;ar=cr[It-15],ar=j(ar,7)^j(ar,18)^ar>>>3,cr[Gt]=$($(nr,ar),cr[It-16])}Gt=dt,Gt=j(Gt,6)^j(Gt,11)^j(Gt,25),Gt=$($($($(Mt,Gt),dt&bt^~dt&Et),je[It]),cr[It]),Mt=Wt,Mt=j(Mt,2)^j(Mt,13)^j(Mt,22),nr=$(Mt,Wt&er^Wt&ct^er&ct),Mt=Et,Et=bt,bt=dt,dt=$(qe,Gt),qe=ct,ct=er,er=Wt,Wt=$(Gt,nr)}ht[0]=$(Wt,ht[0]),ht[1]=$(er,ht[1]),ht[2]=$(ct,ht[2]),ht[3]=$(qe,ht[3]),ht[4]=$(dt,ht[4]),ht[5]=$(bt,ht[5]),ht[6]=$(Et,ht[6]),ht[7]=$(Mt,ht[7])}for(Ht="",cr=0;cr<32*ht.length;cr+=8)Ht+=String.fromCharCode(ht[cr>>5]>>>24-cr%32&255);return Ht}function N(ht){for(var Ht="",Wt,cr=0;cr>>4&15)+"0123456789abcdef".charAt(Wt&15);return Ht}function V(ht){for(var Ht="",Wt=-1,cr,er;++Wt=cr&&56320<=er&&57343>=er&&(cr=65536+((cr&1023)<<10)+(er&1023),Wt++),127>=cr?Ht+=String.fromCharCode(cr):2047>=cr?Ht+=String.fromCharCode(192|cr>>>6&31,128|cr&63):65535>=cr?Ht+=String.fromCharCode(224|cr>>>12&15,128|cr>>>6&63,128|cr&63):2097151>=cr&&(Ht+=String.fromCharCode(240|cr>>>18&7,128|cr>>>12&63,128|cr>>>6&63,128|cr&63));return Ht}function j(ht,Ht){return ht>>>Ht|ht<<32-Ht}function $(ht,Ht){var Wt=(ht&65535)+(Ht&65535);return(ht>>16)+(Ht>>16)+(Wt>>16)<<16|Wt&65535}function q(ht){return Array.prototype.slice.call(ht)}function oe(ht){return q(ht).join("")}function Z(ht){function Ht(){var Mt=[],_t=[];return ne(function(){Mt.push.apply(Mt,q(arguments))},{def:function(){var It="v"+er++;return _t.push(It),0"+la+"?"+zr+".constant["+la+"]:0;"}).join(""),"}}else{","if(",dn,"(",zr,".buffer)){",Pn,"=",wn,".createStream(",34962,",",zr,".buffer);","}else{",Pn,"=",wn,".getBuffer(",zr,".buffer);","}",fa,'="type" in ',zr,"?",Yr.glTypes,"[",zr,".type]:",Pn,".dtype;",Tn.normalized,"=!!",zr,".normalized;"),Vr("size"),Vr("offset"),Vr("stride"),Vr("divisor"),br("}}"),br.exit("if(",Tn.isStream,"){",wn,".destroyStream(",Pn,");","}"),Tn})}),vn}function lr(xr){var Rr=xr.static,yr=xr.dynamic,Dr={};return Object.keys(Rr).forEach(function(vn){var En=Rr[vn];Dr[vn]=ae(function(an,en){return typeof En=="number"||typeof En=="boolean"?""+En:an.link(En)})}),Object.keys(yr).forEach(function(vn){var En=yr[vn];Dr[vn]=K(En,function(an,en){return an.invoke(en,En)})}),Dr}function Or(xr,Rr,yr,Dr,vn){function En(kn){var Pn=en[kn];Pn&&(Vr[kn]=Pn)}var an=rr(xr,Rr),dn=Ut(xr),en=Qt(xr,dn),br=Dt(xr),Vr=sr(xr),zr=Kt(xr,vn,an);En("viewport"),En(ir("scissor.box"));var Yr=0"u"?"Date.now()":"performance.now()"}function an(kn){wn=Rr.def(),kn(wn,"=",En(),";"),typeof vn=="string"?kn(zr,".count+=",vn,";"):kn(zr,".count++;"),Gt&&(Dr?(Tn=Rr.def(),kn(Tn,"=",dn,".getNumPendingQueries();")):kn(dn,".beginQuery(",zr,");"))}function en(kn){kn(zr,".cpuTime+=",En(),"-",wn,";"),Gt&&(Dr?kn(dn,".pushScopeStats(",Tn,",",dn,".getNumPendingQueries(),",zr,");"):kn(dn,".endQuery();"))}function br(kn){var Pn=Rr.def(Yr,".profile");Rr(Yr,".profile=",kn,";"),Rr.exit(Yr,".profile=",Pn,";")}var Vr=xr.shared,zr=xr.stats,Yr=Vr.current,dn=Vr.timer;yr=yr.profile;var wn,Tn;if(yr){if(J(yr)){yr.enable?(an(Rr),en(Rr.exit),br("true")):br("false");return}yr=yr.append(xr,Rr),br(yr)}else yr=Rr.def(Yr,".profile");Vr=xr.block(),an(Vr),Rr("if(",yr,"){",Vr,"}"),xr=xr.block(),en(xr),Rr.exit("if(",yr,"){",xr,"}")}function or(xr,Rr,yr,Dr,vn){function En(br){switch(br){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}}function an(br,Vr,zr){function Yr(){Rr("if(!",kn,".buffer){",wn,".enableVertexAttribArray(",Tn,");}");var la=zr.type,ba;ba=zr.size?Rr.def(zr.size,"||",Vr):Vr,Rr("if(",kn,".type!==",la,"||",kn,".size!==",ba,"||",$n.map(function(ni){return kn+"."+ni+"!=="+zr[ni]}).join("||"),"){",wn,".bindBuffer(",34962,",",Pn,".buffer);",wn,".vertexAttribPointer(",[Tn,ba,la,zr.normalized,zr.stride,zr.offset],");",kn,".type=",la,";",kn,".size=",ba,";",$n.map(function(ni){return kn+"."+ni+"="+zr[ni]+";"}).join(""),"}"),pr&&(la=zr.divisor,Rr("if(",kn,".divisor!==",la,"){",xr.instancing,".vertexAttribDivisorANGLE(",[Tn,la],");",kn,".divisor=",la,";}"))}function dn(){Rr("if(",kn,".buffer){",wn,".disableVertexAttribArray(",Tn,");",kn,".buffer=null;","}if(",at.map(function(la,ba){return kn+"."+la+"!=="+fa[ba]}).join("||"),"){",wn,".vertexAttrib4f(",Tn,",",fa,");",at.map(function(la,ba){return kn+"."+la+"="+fa[ba]+";"}).join(""),"}")}var wn=en.gl,Tn=Rr.def(br,".location"),kn=Rr.def(en.attributes,"[",Tn,"]");br=zr.state;var Pn=zr.buffer,fa=[zr.x,zr.y,zr.z,zr.w],$n=["buffer","normalized","offset","stride"];br===1?Yr():br===2?dn():(Rr("if(",br,"===",1,"){"),Yr(),Rr("}else{"),dn(),Rr("}"))}var en=xr.shared;Dr.forEach(function(br){var Vr=br.name,zr=yr.attributes[Vr],Yr;if(zr){if(!vn(zr))return;Yr=zr.append(xr,Rr)}else{if(!vn(Yt))return;var dn=xr.scopeAttrib(Vr);Yr={},Object.keys(new Jn).forEach(function(wn){Yr[wn]=Rr.def(dn,".",wn)})}an(xr.link(br),En(br.info.type),Yr)})}function Lr(xr,Rr,yr,Dr,vn,En){for(var an=xr.shared,en=an.gl,br,Vr=0;Vr>1)",kn],");")}function ba(){yr(Pn,".drawArraysInstancedANGLE(",[dn,wn,Tn,kn],");")}Yr&&Yr!=="null"?$n?la():(yr("if(",Yr,"){"),la(),yr("}else{"),ba(),yr("}")):ba()}function an(){function la(){yr(br+".drawElements("+[dn,Tn,fa,wn+"<<(("+fa+"-5121)>>1)"]+");")}function ba(){yr(br+".drawArrays("+[dn,wn,Tn]+");")}Yr&&Yr!=="null"?$n?la():(yr("if(",Yr,"){"),la(),yr("}else{"),ba(),yr("}")):ba()}var en=xr.shared,br=en.gl,Vr=en.draw,zr=Dr.draw,Yr=function(){var la=zr.elements,ba=Rr;return la?((la.contextDep&&Dr.contextDynamic||la.propDep)&&(ba=yr),la=la.append(xr,ba),zr.elementsActive&&ba("if("+la+")"+br+".bindBuffer(34963,"+la+".buffer.buffer);")):(la=ba.def(),ba(la,"=",Vr,".","elements",";","if(",la,"){",br,".bindBuffer(",34963,",",la,".buffer.buffer);}","else if(",en.vao,".currentVAO){",la,"=",xr.shared.elements+".getElements("+en.vao,".currentVAO.elements);",Xr?"":"if("+la+")"+br+".bindBuffer(34963,"+la+".buffer.buffer);","}")),la}(),dn=vn("primitive"),wn=vn("offset"),Tn=function(){var la=zr.count,ba=Rr;return la?((la.contextDep&&Dr.contextDynamic||la.propDep)&&(ba=yr),la=la.append(xr,ba)):la=ba.def(Vr,".","count"),la}();if(typeof Tn=="number"){if(Tn===0)return}else yr("if(",Tn,"){"),yr.exit("}");var kn,Pn;pr&&(kn=vn("instances"),Pn=xr.instancing);var fa=Yr+".type",$n=zr.elements&&J(zr.elements)&&!zr.vaoActive;pr&&(typeof kn!="number"||0<=kn)?typeof kn=="string"?(yr("if(",kn,">0){"),En(),yr("}else if(",kn,"<0){"),an(),yr("}")):En():an()}function _r(xr,Rr,yr,Dr,vn){return Rr=Rt(),vn=Rr.proc("body",vn),pr&&(Rr.instancing=vn.def(Rr.shared.extensions,".angle_instanced_arrays")),xr(Rr,vn,yr,Dr),Rr.compile().body}function Qr(xr,Rr,yr,Dr){bn(xr,Rr),yr.useVAO?yr.drawVAO?Rr(xr.shared.vao,".setVAO(",yr.drawVAO.append(xr,Rr),");"):Rr(xr.shared.vao,".setVAO(",xr.shared.vao,".targetVAO);"):(Rr(xr.shared.vao,".setVAO(null);"),or(xr,Rr,yr,Dr.attributes,function(){return!0})),Lr(xr,Rr,yr,Dr.uniforms,function(){return!0},!1),Br(xr,Rr,Rr,yr)}function un(xr,Rr){var yr=xr.proc("draw",1);bn(xr,yr),Sr(xr,yr,Rr.context),Ar(xr,yr,Rr.framebuffer),sn(xr,yr,Rr),Jr(xr,yr,Rr.state),xn(xr,yr,Rr,!1,!0);var Dr=Rr.shader.progVar.append(xr,yr);if(yr(xr.shared.gl,".useProgram(",Dr,".program);"),Rr.shader.program)Qr(xr,yr,Rr,Rr.shader.program);else{yr(xr.shared.vao,".setVAO(null);");var vn=xr.global.def("{}"),En=yr.def(Dr,".id"),an=yr.def(vn,"[",En,"]");yr(xr.cond(an).then(an,".call(this,a0);").else(an,"=",vn,"[",En,"]=",xr.link(function(en){return _r(Qr,xr,Rr,en,1)}),"(",Dr,");",an,".call(this,a0);"))}0=--this.refCount&&qe(this)},er.profile&&(cr.getTotalRenderbufferSize=function(){var _t=0;return Object.keys(Mt).forEach(function(It){_t+=Mt[It].stats.size}),_t}),{create:function(_t,It){function Gt(ar,ir){var Be=0,Fe=0,Rt=32854;if(typeof ar=="object"&&ar?("shape"in ar?(Fe=ar.shape,Be=Fe[0]|0,Fe=Fe[1]|0):("radius"in ar&&(Be=Fe=ar.radius|0),"width"in ar&&(Be=ar.width|0),"height"in ar&&(Fe=ar.height|0)),"format"in ar&&(Rt=dt[ar.format])):typeof ar=="number"?(Be=ar|0,Fe=typeof ir=="number"?ir|0:Be):ar||(Be=Fe=1),Be!==nr.width||Fe!==nr.height||Rt!==nr.format)return Gt.width=nr.width=Be,Gt.height=nr.height=Fe,nr.format=Rt,ht.bindRenderbuffer(36161,nr.renderbuffer),ht.renderbufferStorage(36161,Rt,Be,Fe),er.profile&&(nr.stats.size=Te[nr.format]*nr.width*nr.height),Gt.format=bt[nr.format],Gt}var nr=new ct(ht.createRenderbuffer());return Mt[nr.id]=nr,cr.renderbufferCount++,Gt(_t,It),Gt.resize=function(ar,ir){var Be=ar|0,Fe=ir|0||Be;return Be===nr.width&&Fe===nr.height||(Gt.width=nr.width=Be,Gt.height=nr.height=Fe,ht.bindRenderbuffer(36161,nr.renderbuffer),ht.renderbufferStorage(36161,nr.format,Be,Fe),er.profile&&(nr.stats.size=Te[nr.format]*nr.width*nr.height)),Gt},Gt._reglType="renderbuffer",Gt._renderbuffer=nr,er.profile&&(Gt.stats=nr.stats),Gt.destroy=function(){nr.decRef()},Gt},clear:function(){ye(Mt).forEach(qe)},restore:function(){ye(Mt).forEach(function(_t){_t.renderbuffer=ht.createRenderbuffer(),ht.bindRenderbuffer(36161,_t.renderbuffer),ht.renderbufferStorage(36161,_t.format,_t.width,_t.height)}),ht.bindRenderbuffer(36161,null)}}},ke=[];ke[6408]=4,ke[6407]=3;var Ve=[];Ve[5121]=1,Ve[5126]=4,Ve[36193]=2;var je=[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],at=["x","y","z","w"],ut="blend.func blend.equation stencil.func stencil.opFront stencil.opBack sample.coverage viewport scissor.box polygonOffset.offset".split(" "),Nt={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},Vt={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},gt={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},Ct={cw:2304,ccw:2305},Yt=new H(!1,!1,!1,function(){}),gr=function(ht,Ht){function Wt(){this.endQueryIndex=this.startQueryIndex=-1,this.sum=0,this.stats=null}function cr(Mt,_t,It){var Gt=qe.pop()||new Wt;Gt.startQueryIndex=Mt,Gt.endQueryIndex=_t,Gt.sum=0,Gt.stats=It,dt.push(Gt)}if(!Ht.ext_disjoint_timer_query)return null;var er=[],ct=[],qe=[],dt=[],bt=[],Et=[];return{beginQuery:function(Mt){var _t=er.pop()||Ht.ext_disjoint_timer_query.createQueryEXT();Ht.ext_disjoint_timer_query.beginQueryEXT(35007,_t),ct.push(_t),cr(ct.length-1,ct.length,Mt)},endQuery:function(){Ht.ext_disjoint_timer_query.endQueryEXT(35007)},pushScopeStats:cr,update:function(){var Mt,_t;if(Mt=ct.length,Mt!==0){Et.length=Math.max(Et.length,Mt+1),bt.length=Math.max(bt.length,Mt+1),bt[0]=0;var It=Et[0]=0;for(_t=Mt=0;_t=xn.length&&cr()}var Mn=ie(xn,un);xn[Mn]=ln}}}function Et(){var un=Jr.viewport,ln=Jr.scissor_box;un[0]=un[1]=ln[0]=ln[1]=0,Qt.viewportWidth=Qt.framebufferWidth=Qt.drawingBufferWidth=un[2]=ln[2]=Gt.drawingBufferWidth,Qt.viewportHeight=Qt.framebufferHeight=Qt.drawingBufferHeight=un[3]=ln[3]=Gt.drawingBufferHeight}function Mt(){Qt.tick+=1,Qt.time=It(),Et(),Ar.procs.poll()}function _t(){lr.refresh(),Et(),Ar.procs.refresh(),Rt&&Rt.update()}function It(){return(me()-Lt)/1e3}if(ht=r(ht),!ht)return null;var Gt=ht.gl,nr=Gt.getContextAttributes();Gt.isContextLost();var ar=t(Gt,ht);if(!ar)return null;var sn=o(),ir={vaoCount:0,bufferCount:0,elementsCount:0,framebufferCount:0,shaderCount:0,textureCount:0,cubeCount:0,renderbufferCount:0,maxTextureUnits:0},Be=ht.cachedCode||{},Fe=ar.extensions,Rt=gr(Gt,Fe),Lt=me(),rr=Gt.drawingBufferWidth,Ut=Gt.drawingBufferHeight,Qt={tick:0,time:0,viewportWidth:rr,viewportHeight:Ut,framebufferWidth:rr,framebufferHeight:Ut,drawingBufferWidth:rr,drawingBufferHeight:Ut,pixelRatio:ht.pixelRatio},rr={elements:null,primitive:4,count:-1,offset:0,instances:-1},Kt=ve(Gt,Fe),Dt=n(Gt,ir,ht,function(un){return fr.destroyBuffer(un)}),sr=v(Gt,Fe,Dt,ir),fr=_(Gt,Fe,Kt,ir,Dt,sr,rr),vr=z(Gt,sn,ir,ht),lr=k(Gt,Fe,Kt,function(){Ar.procs.poll()},Qt,ir,ht),Or=be(Gt,Fe,Kt,ir,ht),Sr=I(Gt,Fe,Kt,lr,Or,ir),Ar=Y(Gt,sn,Fe,Kt,Dt,sr,lr,Sr,{},fr,vr,rr,Qt,Rt,Be,ht),sn=O(Gt,Sr,Ar.procs.poll,Qt),Jr=Ar.next,bn=Gt.canvas,xn=[],or=[],Lr=[],Br=[ht.onDestroy],_r=null;bn&&(bn.addEventListener("webglcontextlost",er,!1),bn.addEventListener("webglcontextrestored",ct,!1));var Qr=Sr.setFBO=qe({framebuffer:de.define.call(null,1,"framebuffer")});return _t(),nr=ne(qe,{clear:function(un){if("framebuffer"in un)if(un.framebuffer&&un.framebuffer_reglType==="framebufferCube")for(var ln=0;6>ln;++ln)Qr(ne({framebuffer:un.framebuffer.faces[ln]},un),dt);else Qr(un,dt);else dt(null,un)},prop:de.define.bind(null,1),context:de.define.bind(null,2),this:de.define.bind(null,3),draw:qe({}),buffer:function(un){return Dt.create(un,34962,!1,!1)},elements:function(un){return sr.create(un,!1)},texture:lr.create2D,cube:lr.createCube,renderbuffer:Or.create,framebuffer:Sr.create,framebufferCube:Sr.createCube,vao:fr.createVAO,attributes:nr,frame:bt,on:function(un,ln){var Mn;switch(un){case"frame":return bt(ln);case"lost":Mn=or;break;case"restore":Mn=Lr;break;case"destroy":Mn=Br}return Mn.push(ln),{cancel:function(){for(var Dn=0;Dn */var A=e(33576),P=A.Buffer;function o(M,d){for(var g in M)d[g]=M[g]}P.from&&P.alloc&&P.allocUnsafe&&P.allocUnsafeSlow?te.exports=A:(o(A,X),X.Buffer=L);function L(M,d,g){return P(M,d,g)}L.prototype=Object.create(P.prototype),o(P,L),L.from=function(M,d,g){if(typeof M=="number")throw new TypeError("Argument must not be a number");return P(M,d,g)},L.alloc=function(M,d,g){if(typeof M!="number")throw new TypeError("Argument must be a number");var r=P(M);return d!==void 0?typeof g=="string"?r.fill(d,g):r.fill(d):r.fill(0),r},L.allocUnsafe=function(M){if(typeof M!="number")throw new TypeError("Argument must be a number");return P(M)},L.allocUnsafeSlow=function(M){if(typeof M!="number")throw new TypeError("Argument must be a number");return A.SlowBuffer(M)}},14500:function(te,X,e){var A=e(53664),P=e(64348),o=e(39640)(),L=e(2304),M=A("%TypeError%"),d=A("%Math.floor%");te.exports=function(r,t){if(typeof r!="function")throw new M("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||d(t)!==t)throw new M("`length` must be a positive 32-bit integer");var s=arguments.length>2&&!!arguments[2],a=!0,c=!0;if("length"in r&&L){var u=L(r,"length");u&&!u.configurable&&(a=!1),u&&!u.writable&&(c=!1)}return(a||c||!s)&&(o?P(r,"length",t,!0,!0):P(r,"length",t)),r}},29936:function(te,X,e){te.exports=o;var A=e(61252).EventEmitter,P=e(6768);P(o,A),o.Readable=e(12348),o.Writable=e(11288),o.Duplex=e(15316),o.Transform=e(22477),o.PassThrough=e(27136),o.finished=e(15932),o.pipeline=e(38180),o.Stream=o;function o(){A.call(this)}o.prototype.pipe=function(L,M){var d=this;function g(l){L.writable&&L.write(l)===!1&&d.pause&&d.pause()}d.on("data",g);function r(){d.readable&&d.resume&&d.resume()}L.on("drain",r),!L._isStdio&&(!M||M.end!==!1)&&(d.on("end",s),d.on("close",a));var t=!1;function s(){t||(t=!0,L.end())}function a(){t||(t=!0,typeof L.destroy=="function"&&L.destroy())}function c(l){if(u(),A.listenerCount(this,"error")===0)throw l}d.on("error",c),L.on("error",c);function u(){d.removeListener("data",g),L.removeListener("drain",r),d.removeListener("end",s),d.removeListener("close",a),d.removeListener("error",c),L.removeListener("error",c),d.removeListener("end",u),d.removeListener("close",u),L.removeListener("close",u)}return d.on("end",u),d.on("close",u),L.on("close",u),L.emit("pipe",d),L}},92784:function(te){function X(d,g){d.prototype=Object.create(g.prototype),d.prototype.constructor=d,d.__proto__=g}var e={};function A(d,g,r){r||(r=Error);function t(a,c,u){return typeof g=="string"?g:g(a,c,u)}var s=function(a){X(c,a);function c(u,l,y){return a.call(this,t(u,l,y))||this}return c}(r);s.prototype.name=r.name,s.prototype.code=d,e[d]=s}function P(d,g){if(Array.isArray(d)){var r=d.length;return d=d.map(function(t){return String(t)}),r>2?"one of ".concat(g," ").concat(d.slice(0,r-1).join(", "),", or ")+d[r-1]:r===2?"one of ".concat(g," ").concat(d[0]," or ").concat(d[1]):"of ".concat(g," ").concat(d[0])}else return"of ".concat(g," ").concat(String(d))}function o(d,g,r){return d.substr(0,g.length)===g}function L(d,g,r){return(r===void 0||r>d.length)&&(r=d.length),d.substring(r-g.length,r)===g}function M(d,g,r){return typeof r!="number"&&(r=0),r+g.length>d.length?!1:d.indexOf(g,r)!==-1}A("ERR_INVALID_OPT_VALUE",function(d,g){return'The value "'+g+'" is invalid for option "'+d+'"'},TypeError),A("ERR_INVALID_ARG_TYPE",function(d,g,r){var t;typeof g=="string"&&o(g,"not ")?(t="must not be",g=g.replace(/^not /,"")):t="must be";var s;if(L(d," argument"))s="The ".concat(d," ").concat(t," ").concat(P(g,"type"));else{var a=M(d,".")?"property":"argument";s='The "'.concat(d,'" ').concat(a," ").concat(t," ").concat(P(g,"type"))}return s+=". Received type ".concat(typeof r),s},TypeError),A("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),A("ERR_METHOD_NOT_IMPLEMENTED",function(d){return"The "+d+" method is not implemented"}),A("ERR_STREAM_PREMATURE_CLOSE","Premature close"),A("ERR_STREAM_DESTROYED",function(d){return"Cannot call "+d+" after a stream was destroyed"}),A("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),A("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),A("ERR_STREAM_WRITE_AFTER_END","write after end"),A("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),A("ERR_UNKNOWN_ENCODING",function(d){return"Unknown encoding: "+d},TypeError),A("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),te.exports.i=e},15316:function(te,X,e){var A=e(4168),P=Object.keys||function(a){var c=[];for(var u in a)c.push(u);return c};te.exports=r;var o=e(12348),L=e(11288);e(6768)(r,o);for(var M=P(L.prototype),d=0;d0)if(typeof Y!="string"&&!de.objectMode&&Object.getPrototypeOf(Y)!==M.prototype&&(Y=g(Y)),ne)de.endEmitted?E(K,new n):x(K,de,Y,!0);else if(de.ended)E(K,new T);else{if(de.destroyed)return!1;de.reading=!1,de.decoder&&!ie?(Y=de.decoder.write(Y),de.objectMode||Y.length!==0?x(K,de,Y,!1):N(K,de)):x(K,de,Y,!1)}else ne||(de.reading=!1,N(K,de))}return!de.ended&&(de.length=I?K=I:(K--,K|=K>>>1,K|=K>>>2,K|=K>>>4,K|=K>>>8,K|=K>>>16,K++),K}function _(K,Y){return K<=0||Y.length===0&&Y.ended?0:Y.objectMode?1:K!==K?Y.flowing&&Y.length?Y.buffer.head.data.length:Y.length:(K>Y.highWaterMark&&(Y.highWaterMark=B(K)),K<=Y.length?K:Y.ended?Y.length:(Y.needReadable=!0,0))}i.prototype.read=function(K){s("read",K),K=parseInt(K,10);var Y=this._readableState,ie=K;if(K!==0&&(Y.emittedReadable=!1),K===0&&Y.needReadable&&((Y.highWaterMark!==0?Y.length>=Y.highWaterMark:Y.length>0)||Y.ended))return s("read: emitReadable",Y.length,Y.ended),Y.length===0&&Y.ended?H(this):O(this),null;if(K=_(K,Y),K===0&&Y.ended)return Y.length===0&&H(this),null;var ne=Y.needReadable;s("need readable",ne),(Y.length===0||Y.length-K0?le=re(K,Y):le=null,le===null?(Y.needReadable=Y.length<=Y.highWaterMark,K=0):(Y.length-=K,Y.awaitDrain=0),Y.length===0&&(Y.ended||(Y.needReadable=!0),ie!==K&&Y.ended&&H(this)),le!==null&&this.emit("data",le),le};function z(K,Y){if(s("onEofChunk"),!Y.ended){if(Y.decoder){var ie=Y.decoder.end();ie&&ie.length&&(Y.buffer.push(ie),Y.length+=Y.objectMode?1:ie.length)}Y.ended=!0,Y.sync?O(K):(Y.needReadable=!1,Y.emittedReadable||(Y.emittedReadable=!0,F(K)))}}function O(K){var Y=K._readableState;s("emitReadable",Y.needReadable,Y.emittedReadable),Y.needReadable=!1,Y.emittedReadable||(s("emitReadable",Y.flowing),Y.emittedReadable=!0,A.nextTick(F,K))}function F(K){var Y=K._readableState;s("emitReadable_",Y.destroyed,Y.length,Y.ended),!Y.destroyed&&(Y.length||Y.ended)&&(K.emit("readable"),Y.emittedReadable=!1),Y.needReadable=!Y.flowing&&!Y.ended&&Y.length<=Y.highWaterMark,G(K)}function N(K,Y){Y.readingMore||(Y.readingMore=!0,A.nextTick(V,K,Y))}function V(K,Y){for(;!Y.reading&&!Y.ended&&(Y.length1&&ae(ne.pipes,K)!==-1)&&!ve&&(s("false write response, pause",ne.awaitDrain),ne.awaitDrain++),ie.pause())}function Se(Ne){s("onerror",Ne),Ie(),K.removeListener("error",Se),o(K,"error")===0&&E(K,Ne)}S(K,"error",Se);function _e(){K.removeListener("finish",ze),Ie()}K.once("close",_e);function ze(){s("onfinish"),K.removeListener("close",_e),Ie()}K.once("finish",ze);function Ie(){s("unpipe"),ie.unpipe(K)}return K.emit("pipe",ie),ne.flowing||(s("pipe resume"),ie.resume()),K};function j(K){return function(){var ie=K._readableState;s("pipeOnDrain",ie.awaitDrain),ie.awaitDrain&&ie.awaitDrain--,ie.awaitDrain===0&&o(K,"data")&&(ie.flowing=!0,G(K))}}i.prototype.unpipe=function(K){var Y=this._readableState,ie={hasUnpiped:!1};if(Y.pipesCount===0)return this;if(Y.pipesCount===1)return K&&K!==Y.pipes?this:(K||(K=Y.pipes),Y.pipes=null,Y.pipesCount=0,Y.flowing=!1,K&&K.emit("unpipe",this,ie),this);if(!K){var ne=Y.pipes,le=Y.pipesCount;Y.pipes=null,Y.pipesCount=0,Y.flowing=!1;for(var de=0;de0,ne.flowing!==!1&&this.resume()):K==="readable"&&!ne.endEmitted&&!ne.readableListening&&(ne.readableListening=ne.needReadable=!0,ne.flowing=!1,ne.emittedReadable=!1,s("on readable",ne.length,ne.reading),ne.length?O(this):ne.reading||A.nextTick(q,this)),ie},i.prototype.addListener=i.prototype.on,i.prototype.removeListener=function(K,Y){var ie=L.prototype.removeListener.call(this,K,Y);return K==="readable"&&A.nextTick($,this),ie},i.prototype.removeAllListeners=function(K){var Y=L.prototype.removeAllListeners.apply(this,arguments);return(K==="readable"||K===void 0)&&A.nextTick($,this),Y};function $(K){var Y=K._readableState;Y.readableListening=K.listenerCount("readable")>0,Y.resumeScheduled&&!Y.paused?Y.flowing=!0:K.listenerCount("data")>0&&K.resume()}function q(K){s("readable nexttick read 0"),K.read(0)}i.prototype.resume=function(){var K=this._readableState;return K.flowing||(s("resume"),K.flowing=!K.readableListening,oe(this,K)),K.paused=!1,this};function oe(K,Y){Y.resumeScheduled||(Y.resumeScheduled=!0,A.nextTick(Z,K,Y))}function Z(K,Y){s("resume",Y.reading),Y.reading||K.read(0),Y.resumeScheduled=!1,K.emit("resume"),G(K),Y.flowing&&!Y.reading&&K.read(0)}i.prototype.pause=function(){return s("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(s("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function G(K){var Y=K._readableState;for(s("flow",Y.flowing);Y.flowing&&K.read()!==null;);}i.prototype.wrap=function(K){var Y=this,ie=this._readableState,ne=!1;K.on("end",function(){if(s("wrapped end"),ie.decoder&&!ie.ended){var we=ie.decoder.end();we&&we.length&&Y.push(we)}Y.push(null)}),K.on("data",function(we){if(s("wrapped data"),ie.decoder&&(we=ie.decoder.write(we)),!(ie.objectMode&&we==null)&&!(!ie.objectMode&&(!we||!we.length))){var me=Y.push(we);me||(ne=!0,K.pause())}});for(var le in K)this[le]===void 0&&typeof K[le]=="function"&&(this[le]=function(me){return function(){return K[me].apply(K,arguments)}}(le));for(var de=0;de=Y.length?(Y.decoder?ie=Y.buffer.join(""):Y.buffer.length===1?ie=Y.buffer.first():ie=Y.buffer.concat(Y.length),Y.buffer.clear()):ie=Y.buffer.consume(K,Y.decoder),ie}function H(K){var Y=K._readableState;s("endReadable",Y.endEmitted),Y.endEmitted||(Y.ended=!0,A.nextTick(J,Y,K))}function J(K,Y){if(s("endReadableNT",K.endEmitted,K.length),!K.endEmitted&&K.length===0&&(K.endEmitted=!0,Y.readable=!1,Y.emit("end"),K.autoDestroy)){var ie=Y._writableState;(!ie||ie.autoDestroy&&ie.finished)&&Y.destroy()}}typeof Symbol=="function"&&(i.from=function(K,Y){return b===void 0&&(b=e(90555)),b(i,K,Y)});function ae(K,Y){for(var ie=0,ne=K.length;ie-1))throw new m(re);return this._writableState.defaultEncoding=re,this},Object.defineProperty(w.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function x(G,re,H){return!G.objectMode&&G.decodeStrings!==!1&&typeof re=="string"&&(re=d.from(re,H)),re}Object.defineProperty(w.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function k(G,re,H,J,ae,K){if(!H){var Y=x(re,J,ae);J!==Y&&(H=!0,ae="buffer",J=Y)}var ie=re.objectMode?1:J.length;re.length+=ie;var ne=re.length0?this.tail.next=h:this.head=h,this.tail=h,++this.length}},{key:"unshift",value:function(y){var h={data:y,next:this.head};this.length===0&&(this.tail=h),this.head=h,++this.length}},{key:"shift",value:function(){if(this.length!==0){var y=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,y}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(y){if(this.length===0)return"";for(var h=this.head,T=""+h.data;h=h.next;)T+=y+h.data;return T}},{key:"concat",value:function(y){if(this.length===0)return r.alloc(0);for(var h=r.allocUnsafe(y>>>0),T=this.head,f=0;T;)c(T.data,h,f),f+=T.data.length,T=T.next;return h}},{key:"consume",value:function(y,h){var T;return yn.length?n.length:y;if(v===n.length?f+=n:f+=n.slice(0,y),y-=v,y===0){v===n.length?(++T,h.next?this.head=h.next:this.head=this.tail=null):(this.head=h,h.data=n.slice(v));break}++T}return this.length-=T,f}},{key:"_getBuffer",value:function(y){var h=r.allocUnsafe(y),T=this.head,f=1;for(T.data.copy(h),y-=T.data.length;T=T.next;){var n=T.data,v=y>n.length?n.length:y;if(n.copy(h,h.length-y,0,v),y-=v,y===0){v===n.length?(++f,T.next?this.head=T.next:this.head=this.tail=null):(this.head=T,T.data=n.slice(v));break}++f}return this.length-=f,h}},{key:a,value:function(y,h){return s(this,P({},h,{depth:0,customInspect:!1}))}}]),u}()},55324:function(te,X,e){var A=e(4168);function P(r,t){var s=this,a=this._readableState&&this._readableState.destroyed,c=this._writableState&&this._writableState.destroyed;return a||c?(t?t(r):r&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,A.nextTick(d,this,r)):A.nextTick(d,this,r)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(r||null,function(u){!t&&u?s._writableState?s._writableState.errorEmitted?A.nextTick(L,s):(s._writableState.errorEmitted=!0,A.nextTick(o,s,u)):A.nextTick(o,s,u):t?(A.nextTick(L,s),t(u)):A.nextTick(L,s)}),this)}function o(r,t){d(r,t),L(r)}function L(r){r._writableState&&!r._writableState.emitClose||r._readableState&&!r._readableState.emitClose||r.emit("close")}function M(){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)}function d(r,t){r.emit("error",t)}function g(r,t){var s=r._readableState,a=r._writableState;s&&s.autoDestroy||a&&a.autoDestroy?r.destroy(t):r.emit("error",t)}te.exports={destroy:P,undestroy:M,errorOrDestroy:g}},15932:function(te,X,e){var A=e(92784).i.ERR_STREAM_PREMATURE_CLOSE;function P(d){var g=!1;return function(){if(!g){g=!0;for(var r=arguments.length,t=new Array(r),s=0;s0;return r(n,m,b,function(E){T||(T=E),E&&f.forEach(t),!m&&(f.forEach(t),h(T))})});return l.reduce(s)}te.exports=c},24888:function(te,X,e){var A=e(92784).i.ERR_INVALID_OPT_VALUE;function P(L,M,d){return L.highWaterMark!=null?L.highWaterMark:M?L[d]:null}function o(L,M,d,g){var r=P(M,g,d);if(r!=null){if(!(isFinite(r)&&Math.floor(r)===r)||r<0){var t=g?d:"highWaterMark";throw new A(t,r)}return Math.floor(r)}return L.objectMode?16:16384}te.exports={getHighWaterMark:o}},4776:function(te,X,e){te.exports=e(61252).EventEmitter},86032:function(te,X,e){var A=e(30456).Buffer,P=A.isEncoding||function(f){switch(f=""+f,f&&f.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 o(f){if(!f)return"utf8";for(var n;;)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(n)return;f=(""+f).toLowerCase(),n=!0}}function L(f){var n=o(f);if(typeof n!="string"&&(A.isEncoding===P||!P(f)))throw new Error("Unknown encoding: "+f);return n||f}X.o=M;function M(f){this.encoding=L(f);var n;switch(this.encoding){case"utf16le":this.text=c,this.end=u,n=4;break;case"utf8":this.fillLast=t,n=4;break;case"base64":this.text=l,this.end=y,n=3;break;default:this.write=h,this.end=T;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=A.allocUnsafe(n)}M.prototype.write=function(f){if(f.length===0)return"";var n,v;if(this.lastNeed){if(n=this.fillLast(f),n===void 0)return"";v=this.lastNeed,this.lastNeed=0}else v=0;return v>5===6?2:f>>4===14?3:f>>3===30?4:f>>6===2?-1:-2}function g(f,n,v){var m=n.length-1;if(m=0?(b>0&&(f.lastNeed=b-1),b):--m=0?(b>0&&(f.lastNeed=b-2),b):--m=0?(b>0&&(b===2?b=0:f.lastNeed=b-3),b):0))}function r(f,n,v){if((n[0]&192)!==128)return f.lastNeed=0,"�";if(f.lastNeed>1&&n.length>1){if((n[1]&192)!==128)return f.lastNeed=1,"�";if(f.lastNeed>2&&n.length>2&&(n[2]&192)!==128)return f.lastNeed=2,"�"}}function t(f){var n=this.lastTotal-this.lastNeed,v=r(this,f);if(v!==void 0)return v;if(this.lastNeed<=f.length)return f.copy(this.lastChar,n,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);f.copy(this.lastChar,n,0,f.length),this.lastNeed-=f.length}function s(f,n){var v=g(this,f,n);if(!this.lastNeed)return f.toString("utf8",n);this.lastTotal=v;var m=f.length-(v-this.lastNeed);return f.copy(this.lastChar,0,m),f.toString("utf8",n,m)}function a(f){var n=f&&f.length?this.write(f):"";return this.lastNeed?n+"�":n}function c(f,n){if((f.length-n)%2===0){var v=f.toString("utf16le",n);if(v){var m=v.charCodeAt(v.length-1);if(m>=55296&&m<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1],v.slice(0,-1)}return v}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=f[f.length-1],f.toString("utf16le",n,f.length-1)}function u(f){var n=f&&f.length?this.write(f):"";if(this.lastNeed){var v=this.lastTotal-this.lastNeed;return n+this.lastChar.toString("utf16le",0,v)}return n}function l(f,n){var v=(f.length-n)%3;return v===0?f.toString("base64",n):(this.lastNeed=3-v,this.lastTotal=3,v===1?this.lastChar[0]=f[f.length-1]:(this.lastChar[0]=f[f.length-2],this.lastChar[1]=f[f.length-1]),f.toString("base64",n,f.length-v))}function y(f){var n=f&&f.length?this.write(f):"";return this.lastNeed?n+this.lastChar.toString("base64",0,3-this.lastNeed):n}function h(f){return f.toString(this.encoding)}function T(f){return f&&f.length?this.write(f):""}},55619:function(te,X,e){var A=e(45408),P=e(86844)("stream-parser");te.exports=g;var o=-1,L=0,M=1,d=2;function g(f){var n=f&&typeof f._transform=="function",v=f&&typeof f._write=="function";if(!n&&!v)throw new Error("must pass a Writable or Transform stream in");P("extending Parser into stream"),f._bytes=t,f._skipBytes=s,n&&(f._passthrough=a),n?f._transform=u:f._write=c}function r(f){P("initializing parser stream"),f._parserBytesLeft=0,f._parserBuffers=[],f._parserBuffered=0,f._parserState=o,f._parserCallback=null,typeof f.push=="function"&&(f._parserOutput=f.push.bind(f)),f._parserInit=!0}function t(f,n){A(!this._parserCallback,'there is already a "callback" set!'),A(isFinite(f)&&f>0,'can only buffer a finite number of bytes > 0, got "'+f+'"'),this._parserInit||r(this),P("buffering %o bytes",f),this._parserBytesLeft=f,this._parserCallback=n,this._parserState=L}function s(f,n){A(!this._parserCallback,'there is already a "callback" set!'),A(f>0,'can only skip > 0 bytes, got "'+f+'"'),this._parserInit||r(this),P("skipping %o bytes",f),this._parserBytesLeft=f,this._parserCallback=n,this._parserState=M}function a(f,n){A(!this._parserCallback,'There is already a "callback" set!'),A(f>0,'can only pass through > 0 bytes, got "'+f+'"'),this._parserInit||r(this),P("passing through %o bytes",f),this._parserBytesLeft=f,this._parserCallback=n,this._parserState=d}function c(f,n,v){this._parserInit||r(this),P("write(%o bytes)",f.length),typeof n=="function"&&(v=n),h(this,f,null,v)}function u(f,n,v){this._parserInit||r(this),P("transform(%o bytes)",f.length),typeof n!="function"&&(n=this._parserOutput),h(this,f,n,v)}function l(f,n,v,m){return f._parserBytesLeft<=0?m(new Error("got data but not currently parsing anything")):n.length<=f._parserBytesLeft?function(){return y(f,n,v,m)}:function(){var b=n.slice(0,f._parserBytesLeft);return y(f,b,v,function(E){if(E)return m(E);if(n.length>b.length)return function(){return l(f,n.slice(b.length),v,m)}})}}function y(f,n,v,m){if(f._parserBytesLeft-=n.length,P("%o bytes left for stream piece",f._parserBytesLeft),f._parserState===L?(f._parserBuffers.push(n),f._parserBuffered+=n.length):f._parserState===d&&v(n),f._parserBytesLeft===0){var b=f._parserCallback;if(b&&f._parserState===L&&f._parserBuffers.length>1&&(n=Buffer.concat(f._parserBuffers,f._parserBuffered)),f._parserState!==L&&(n=null),f._parserCallback=null,f._parserBuffered=0,f._parserState=o,f._parserBuffers.splice(0),b){var E=[];n&&E.push(n),v&&E.push(v);var p=b.length>E.length;p&&E.push(T(m));var S=b.apply(f,E);if(!p||m===S)return m}}else return m}var h=T(l);function T(f){return function(){for(var n=f.apply(this,arguments);typeof n=="function";)n=n();return n}}},86844:function(te,X,e){var A=e(4168);X=te.exports=e(89416),X.log=L,X.formatArgs=o,X.save=M,X.load=d,X.useColors=P,X.storage=typeof chrome<"u"&&typeof chrome.storage<"u"?chrome.storage.local:g(),X.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function P(){return typeof window<"u"&&window.process&&window.process.type==="renderer"?!0: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+)/)}X.formatters.j=function(r){try{return JSON.stringify(r)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function o(r){var t=this.useColors;if(r[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+r[0]+(t?"%c ":" ")+"+"+X.humanize(this.diff),!!t){var s="color: "+this.color;r.splice(1,0,s,"color: inherit");var a=0,c=0;r[0].replace(/%[a-zA-Z%]/g,function(u){u!=="%%"&&(a++,u==="%c"&&(c=a))}),r.splice(c,0,s)}}function L(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function M(r){try{r==null?X.storage.removeItem("debug"):X.storage.debug=r}catch{}}function d(){var r;try{r=X.storage.debug}catch{}return!r&&typeof A<"u"&&"env"in A&&(r=A.env.DEBUG),r}X.enable(d());function g(){try{return window.localStorage}catch{}}},89416:function(te,X,e){X=te.exports=o.debug=o.default=o,X.coerce=g,X.disable=M,X.enable=L,X.enabled=d,X.humanize=e(93744),X.names=[],X.skips=[],X.formatters={};var A;function P(r){var t=0,s;for(s in r)t=(t<<5)-t+r.charCodeAt(s),t|=0;return X.colors[Math.abs(t)%X.colors.length]}function o(r){function t(){if(t.enabled){var s=t,a=+new Date,c=a-(A||a);s.diff=c,s.prev=A,s.curr=a,A=a;for(var u=new Array(arguments.length),l=0;l0)return L(r);if(s==="number"&&isNaN(r)===!1)return t.long?d(r):M(r);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(r))};function L(r){if(r=String(r),!(r.length>100)){var t=/^((?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|years?|yrs?|y)?$/i.exec(r);if(t){var s=parseFloat(t[1]),a=(t[2]||"ms").toLowerCase();switch(a){case"years":case"year":case"yrs":case"yr":case"y":return s*o;case"days":case"day":case"d":return s*P;case"hours":case"hour":case"hrs":case"hr":case"h":return s*A;case"minutes":case"minute":case"mins":case"min":case"m":return s*e;case"seconds":case"second":case"secs":case"sec":case"s":return s*X;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return s;default:return}}}}function M(r){return r>=P?Math.round(r/P)+"d":r>=A?Math.round(r/A)+"h":r>=e?Math.round(r/e)+"m":r>=X?Math.round(r/X)+"s":r+"ms"}function d(r){return g(r,P,"day")||g(r,A,"hour")||g(r,e,"minute")||g(r,X,"second")||r+" ms"}function g(r,t,s){if(!(r",'""',"''","``","“”","«»"]:(typeof M.ignore=="string"&&(M.ignore=[M.ignore]),M.ignore=M.ignore.map(function(u){return u.length===1&&(u=u+u),u}));var d=A.parse(o,{flat:!0,brackets:M.ignore}),g=d[0],r=g.split(L);if(M.escape){for(var t=[],s=0;s0;){h=f[f.length-1];var n=e[h];if(M[h]=0&&g[h].push(d[m])}M[h]=v}else{if(o[h]===P[h]){for(var b=[],E=[],p=0,v=T.length-1;v>=0;--v){var S=T[v];if(L[S]=!1,b.push(S),E.push(g[S]),p+=g[S].length,d[S]=s.length,S===h){T.length=v;break}}s.push(b);for(var w=new Array(p),v=0;v1&&(l=1),l<-1&&(l=-1),u*Math.acos(l)},d=function(t,s,a,c,u,l,y,h,T,f,n,v){var m=Math.pow(u,2),b=Math.pow(l,2),E=Math.pow(n,2),p=Math.pow(v,2),S=m*b-m*p-b*E;S<0&&(S=0),S/=m*p+b*E,S=Math.sqrt(S)*(y===h?-1:1);var w=S*u/l*v,i=S*-l/u*n,C=f*w-T*i+(t+a)/2,x=T*w+f*i+(s+c)/2,k=(n-w)/u,I=(v-i)/l,B=(-n-w)/u,_=(-v-i)/l,z=M(1,0,k,I),O=M(k,I,B,_);return h===0&&O>0&&(O-=P),h===1&&O<0&&(O+=P),[C,x,z,O]},g=function(t){var s=t.px,a=t.py,c=t.cx,u=t.cy,l=t.rx,y=t.ry,h=t.xAxisRotation,T=h===void 0?0:h,f=t.largeArcFlag,n=f===void 0?0:f,v=t.sweepFlag,m=v===void 0?0:v,b=[];if(l===0||y===0)return[];var E=Math.sin(T*P/360),p=Math.cos(T*P/360),S=p*(s-c)/2+E*(a-u)/2,w=-E*(s-c)/2+p*(a-u)/2;if(S===0&&w===0)return[];l=Math.abs(l),y=Math.abs(y);var i=Math.pow(S,2)/Math.pow(l,2)+Math.pow(w,2)/Math.pow(y,2);i>1&&(l*=Math.sqrt(i),y*=Math.sqrt(i));var C=d(s,a,c,u,l,y,n,m,E,p,S,w),x=A(C,4),k=x[0],I=x[1],B=x[2],_=x[3],z=Math.abs(_)/(P/4);Math.abs(1-z)<1e-7&&(z=1);var O=Math.max(Math.ceil(z),1);_/=O;for(var F=0;Fr[2]&&(r[2]=a[c+0]),a[c+1]>r[3]&&(r[3]=a[c+1]);return r}},41976:function(te,X,e){te.exports=P;var A=e(92848);function P(M){for(var d,g=[],r=0,t=0,s=0,a=0,c=null,u=null,l=0,y=0,h=0,T=M.length;h4?(r=f[f.length-4],t=f[f.length-3]):(r=l,t=y),g.push(f)}return g}function o(M,d,g,r){return["C",M,d,g,r,g,r]}function L(M,d,g,r,t,s){return["C",M/3+.6666666666666666*g,d/3+.6666666666666666*r,t/3+.6666666666666666*g,s/3+.6666666666666666*r,t,s]}},20472:function(te,X,e){var A=e(74840),P=e(21984),o=e(22235),L=e(53520),M=e(29620),d=document.createElement("canvas"),g=d.getContext("2d");te.exports=r;function r(a,c){if(!L(a))throw Error("Argument should be valid svg path string");c||(c={});var u,l;c.shape?(u=c.shape[0],l=c.shape[1]):(u=d.width=c.w||c.width||200,l=d.height=c.h||c.height||200);var y=Math.min(u,l),h=c.stroke||0,T=c.viewbox||c.viewBox||A(a),f=[u/(T[2]-T[0]),l/(T[3]-T[1])],n=Math.min(f[0]||0,f[1]||0)/2;if(g.fillStyle="black",g.fillRect(0,0,u,l),g.fillStyle="white",h&&(typeof h!="number"&&(h=1),h>0?g.strokeStyle="white":g.strokeStyle="black",g.lineWidth=Math.abs(h)),g.translate(u*.5,l*.5),g.scale(n,n),s()){var v=new Path2D(a);g.fill(v),h&&g.stroke(v)}else{var m=P(a);o(g,m),g.fill(),h&&g.stroke()}g.setTransform(1,0,0,1,0,0);var b=M(g,{cutoff:c.cutoff!=null?c.cutoff:.5,radius:c.radius!=null?c.radius:y*.5});return b}var t;function s(){if(t!=null)return t;var a=document.createElement("canvas").getContext("2d");if(a.canvas.width=a.canvas.height=1,!window.Path2D)return t=!1;var c=new Path2D("M0,0h1v1h-1v-1Z");a.fillStyle="black",a.fill(c);var u=a.getImageData(0,0,1,1);return t=u&&u.data&&u.data[3]===255}},49760:function(te,X,e){var A;(function(P){var o=/^\s+/,L=/\s+$/,M=0,d=P.round,g=P.min,r=P.max,t=P.random;function s(Y,ie){if(Y=Y||"",ie=ie||{},Y instanceof s)return Y;if(!(this instanceof s))return new s(Y,ie);var ne=a(Y);this._originalInput=Y,this._r=ne.r,this._g=ne.g,this._b=ne.b,this._a=ne.a,this._roundA=d(100*this._a)/100,this._format=ie.format||ne.format,this._gradientType=ie.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=ne.ok,this._tc_id=M++}s.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 Y=this.toRgb();return(Y.r*299+Y.g*587+Y.b*114)/1e3},getLuminance:function(){var Y=this.toRgb(),ie,ne,le,de,we,me;return ie=Y.r/255,ne=Y.g/255,le=Y.b/255,ie<=.03928?de=ie/12.92:de=P.pow((ie+.055)/1.055,2.4),ne<=.03928?we=ne/12.92:we=P.pow((ne+.055)/1.055,2.4),le<=.03928?me=le/12.92:me=P.pow((le+.055)/1.055,2.4),.2126*de+.7152*we+.0722*me},setAlpha:function(Y){return this._a=F(Y),this._roundA=d(100*this._a)/100,this},toHsv:function(){var Y=y(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,v:Y.v,a:this._a}},toHsvString:function(){var Y=y(this._r,this._g,this._b),ie=d(Y.h*360),ne=d(Y.s*100),le=d(Y.v*100);return this._a==1?"hsv("+ie+", "+ne+"%, "+le+"%)":"hsva("+ie+", "+ne+"%, "+le+"%, "+this._roundA+")"},toHsl:function(){var Y=u(this._r,this._g,this._b);return{h:Y.h*360,s:Y.s,l:Y.l,a:this._a}},toHslString:function(){var Y=u(this._r,this._g,this._b),ie=d(Y.h*360),ne=d(Y.s*100),le=d(Y.l*100);return this._a==1?"hsl("+ie+", "+ne+"%, "+le+"%)":"hsla("+ie+", "+ne+"%, "+le+"%, "+this._roundA+")"},toHex:function(Y){return T(this._r,this._g,this._b,Y)},toHexString:function(Y){return"#"+this.toHex(Y)},toHex8:function(Y){return f(this._r,this._g,this._b,this._a,Y)},toHex8String:function(Y){return"#"+this.toHex8(Y)},toRgb:function(){return{r:d(this._r),g:d(this._g),b:d(this._b),a:this._a}},toRgbString:function(){return this._a==1?"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(N(this._r,255)*100)+"%",g:d(N(this._g,255)*100)+"%",b:d(N(this._b,255)*100)+"%",a:this._a}},toPercentageRgbString:function(){return this._a==1?"rgb("+d(N(this._r,255)*100)+"%, "+d(N(this._g,255)*100)+"%, "+d(N(this._b,255)*100)+"%)":"rgba("+d(N(this._r,255)*100)+"%, "+d(N(this._g,255)*100)+"%, "+d(N(this._b,255)*100)+"%, "+this._roundA+")"},toName:function(){return this._a===0?"transparent":this._a<1?!1:z[T(this._r,this._g,this._b,!0)]||!1},toFilter:function(Y){var ie="#"+n(this._r,this._g,this._b,this._a),ne=ie,le=this._gradientType?"GradientType = 1, ":"";if(Y){var de=s(Y);ne="#"+n(de._r,de._g,de._b,de._a)}return"progid:DXImageTransform.Microsoft.gradient("+le+"startColorstr="+ie+",endColorstr="+ne+")"},toString:function(Y){var ie=!!Y;Y=Y||this._format;var ne=!1,le=this._a<1&&this._a>=0,de=!ie&&le&&(Y==="hex"||Y==="hex6"||Y==="hex3"||Y==="hex4"||Y==="hex8"||Y==="name");return de?Y==="name"&&this._a===0?this.toName():this.toRgbString():(Y==="rgb"&&(ne=this.toRgbString()),Y==="prgb"&&(ne=this.toPercentageRgbString()),(Y==="hex"||Y==="hex6")&&(ne=this.toHexString()),Y==="hex3"&&(ne=this.toHexString(!0)),Y==="hex4"&&(ne=this.toHex8String(!0)),Y==="hex8"&&(ne=this.toHex8String()),Y==="name"&&(ne=this.toName()),Y==="hsl"&&(ne=this.toHslString()),Y==="hsv"&&(ne=this.toHsvString()),ne||this.toHexString())},clone:function(){return s(this.toString())},_applyModification:function(Y,ie){var ne=Y.apply(null,[this].concat([].slice.call(ie)));return this._r=ne._r,this._g=ne._g,this._b=ne._b,this.setAlpha(ne._a),this},lighten:function(){return this._applyModification(E,arguments)},brighten:function(){return this._applyModification(p,arguments)},darken:function(){return this._applyModification(S,arguments)},desaturate:function(){return this._applyModification(v,arguments)},saturate:function(){return this._applyModification(m,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(w,arguments)},_applyCombination:function(Y,ie){return Y.apply(null,[this].concat([].slice.call(ie)))},analogous:function(){return this._applyCombination(I,arguments)},complement:function(){return this._applyCombination(i,arguments)},monochromatic:function(){return this._applyCombination(B,arguments)},splitcomplement:function(){return this._applyCombination(k,arguments)},triad:function(){return this._applyCombination(C,arguments)},tetrad:function(){return this._applyCombination(x,arguments)}},s.fromRatio=function(Y,ie){if(typeof Y=="object"){var ne={};for(var le in Y)Y.hasOwnProperty(le)&&(le==="a"?ne[le]=Y[le]:ne[le]=Z(Y[le]));Y=ne}return s(Y,ie)};function a(Y){var ie={r:0,g:0,b:0},ne=1,le=null,de=null,we=null,me=!1,Le=!1;return typeof Y=="string"&&(Y=ae(Y)),typeof Y=="object"&&(J(Y.r)&&J(Y.g)&&J(Y.b)?(ie=c(Y.r,Y.g,Y.b),me=!0,Le=String(Y.r).substr(-1)==="%"?"prgb":"rgb"):J(Y.h)&&J(Y.s)&&J(Y.v)?(le=Z(Y.s),de=Z(Y.v),ie=h(Y.h,le,de),me=!0,Le="hsv"):J(Y.h)&&J(Y.s)&&J(Y.l)&&(le=Z(Y.s),we=Z(Y.l),ie=l(Y.h,le,we),me=!0,Le="hsl"),Y.hasOwnProperty("a")&&(ne=Y.a)),ne=F(ne),{ok:me,format:Y.format||Le,r:g(255,r(ie.r,0)),g:g(255,r(ie.g,0)),b:g(255,r(ie.b,0)),a:ne}}function c(Y,ie,ne){return{r:N(Y,255)*255,g:N(ie,255)*255,b:N(ne,255)*255}}function u(Y,ie,ne){Y=N(Y,255),ie=N(ie,255),ne=N(ne,255);var le=r(Y,ie,ne),de=g(Y,ie,ne),we,me,Le=(le+de)/2;if(le==de)we=me=0;else{var ve=le-de;switch(me=Le>.5?ve/(2-le-de):ve/(le+de),le){case Y:we=(ie-ne)/ve+(ie1&&(Se-=1),Se<.16666666666666666?Ae+(ye-Ae)*6*Se:Se<.5?ye:Se<.6666666666666666?Ae+(ye-Ae)*(.6666666666666666-Se)*6:Ae}if(ie===0)le=de=we=ne;else{var Le=ne<.5?ne*(1+ie):ne+ie-ne*ie,ve=2*ne-Le;le=me(ve,Le,Y+.3333333333333333),de=me(ve,Le,Y),we=me(ve,Le,Y-.3333333333333333)}return{r:le*255,g:de*255,b:we*255}}function y(Y,ie,ne){Y=N(Y,255),ie=N(ie,255),ne=N(ne,255);var le=r(Y,ie,ne),de=g(Y,ie,ne),we,me,Le=le,ve=le-de;if(me=le===0?0:ve/le,le==de)we=0;else{switch(le){case Y:we=(ie-ne)/ve+(ie>1)+720)%360;--ie;)le.h=(le.h+de)%360,we.push(s(le));return we}function B(Y,ie){ie=ie||6;for(var ne=s(Y).toHsv(),le=ne.h,de=ne.s,we=ne.v,me=[],Le=1/ie;ie--;)me.push(s({h:le,s:de,v:we})),we=(we+Le)%1;return me}s.mix=function(Y,ie,ne){ne=ne===0?0:ne||50;var le=s(Y).toRgb(),de=s(ie).toRgb(),we=ne/100,me={r:(de.r-le.r)*we+le.r,g:(de.g-le.g)*we+le.g,b:(de.b-le.b)*we+le.b,a:(de.a-le.a)*we+le.a};return s(me)},s.readability=function(Y,ie){var ne=s(Y),le=s(ie);return(P.max(ne.getLuminance(),le.getLuminance())+.05)/(P.min(ne.getLuminance(),le.getLuminance())+.05)},s.isReadable=function(Y,ie,ne){var le=s.readability(Y,ie),de,we;switch(we=!1,de=K(ne),de.level+de.size){case"AAsmall":case"AAAlarge":we=le>=4.5;break;case"AAlarge":we=le>=3;break;case"AAAsmall":we=le>=7;break}return we},s.mostReadable=function(Y,ie,ne){var le=null,de=0,we,me,Le,ve;ne=ne||{},me=ne.includeFallbackColors,Le=ne.level,ve=ne.size;for(var Ae=0;Aede&&(de=we,le=s(ie[Ae]));return s.isReadable(Y,le,{level:Le,size:ve})||!me?le:(ne.includeFallbackColors=!1,s.mostReadable(Y,["#fff","#000"],ne))};var _=s.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"},z=s.hexNames=O(_);function O(Y){var ie={};for(var ne in Y)Y.hasOwnProperty(ne)&&(ie[Y[ne]]=ne);return ie}function F(Y){return Y=parseFloat(Y),(isNaN(Y)||Y<0||Y>1)&&(Y=1),Y}function N(Y,ie){$(Y)&&(Y="100%");var ne=q(Y);return Y=g(ie,r(0,parseFloat(Y))),ne&&(Y=parseInt(Y*ie,10)/100),P.abs(Y-ie)<1e-6?1:Y%ie/parseFloat(ie)}function V(Y){return g(1,r(0,Y))}function j(Y){return parseInt(Y,16)}function $(Y){return typeof Y=="string"&&Y.indexOf(".")!=-1&&parseFloat(Y)===1}function q(Y){return typeof Y=="string"&&Y.indexOf("%")!=-1}function oe(Y){return Y.length==1?"0"+Y:""+Y}function Z(Y){return Y<=1&&(Y=Y*100+"%"),Y}function G(Y){return P.round(parseFloat(Y)*255).toString(16)}function re(Y){return j(Y)/255}var H=function(){var Y="[-\\+]?\\d+%?",ie="[-\\+]?\\d*\\.\\d+%?",ne="(?:"+ie+")|(?:"+Y+")",le="[\\s|\\(]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")\\s*\\)?",de="[\\s|\\(]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")[,|\\s]+("+ne+")\\s*\\)?";return{CSS_UNIT:new RegExp(ne),rgb:new RegExp("rgb"+le),rgba:new RegExp("rgba"+de),hsl:new RegExp("hsl"+le),hsla:new RegExp("hsla"+de),hsv:new RegExp("hsv"+le),hsva:new RegExp("hsva"+de),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 J(Y){return!!H.CSS_UNIT.exec(Y)}function ae(Y){Y=Y.replace(o,"").replace(L,"").toLowerCase();var ie=!1;if(_[Y])Y=_[Y],ie=!0;else if(Y=="transparent")return{r:0,g:0,b:0,a:0,format:"name"};var ne;return(ne=H.rgb.exec(Y))?{r:ne[1],g:ne[2],b:ne[3]}:(ne=H.rgba.exec(Y))?{r:ne[1],g:ne[2],b:ne[3],a:ne[4]}:(ne=H.hsl.exec(Y))?{h:ne[1],s:ne[2],l:ne[3]}:(ne=H.hsla.exec(Y))?{h:ne[1],s:ne[2],l:ne[3],a:ne[4]}:(ne=H.hsv.exec(Y))?{h:ne[1],s:ne[2],v:ne[3]}:(ne=H.hsva.exec(Y))?{h:ne[1],s:ne[2],v:ne[3],a:ne[4]}:(ne=H.hex8.exec(Y))?{r:j(ne[1]),g:j(ne[2]),b:j(ne[3]),a:re(ne[4]),format:ie?"name":"hex8"}:(ne=H.hex6.exec(Y))?{r:j(ne[1]),g:j(ne[2]),b:j(ne[3]),format:ie?"name":"hex"}:(ne=H.hex4.exec(Y))?{r:j(ne[1]+""+ne[1]),g:j(ne[2]+""+ne[2]),b:j(ne[3]+""+ne[3]),a:re(ne[4]+""+ne[4]),format:ie?"name":"hex8"}:(ne=H.hex3.exec(Y))?{r:j(ne[1]+""+ne[1]),g:j(ne[2]+""+ne[2]),b:j(ne[3]+""+ne[3]),format:ie?"name":"hex"}:!1}function K(Y){var ie,ne;return Y=Y||{level:"AA",size:"small"},ie=(Y.level||"AA").toUpperCase(),ne=(Y.size||"small").toLowerCase(),ie!=="AA"&&ie!=="AAA"&&(ie="AA"),ne!=="small"&&ne!=="large"&&(ne="small"),{level:ie,size:ne}}te.exports?te.exports=s:(A=(function(){return s}).call(X,e,X,te),A!==void 0&&(te.exports=A))})(Math)},37816:function(te){te.exports=A,te.exports.float32=te.exports.float=A,te.exports.fract32=te.exports.fract=e;var X=new Float32Array(1);function e(P,o){if(P.length){if(P instanceof Float32Array)return new Float32Array(P.length);o instanceof Float32Array||(o=A(P));for(var L=0,M=o.length;L":(L.length>100&&(L=L.slice(0,99)+"…"),L=L.replace(P,function(M){switch(M){case` `:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),L)}},7328:function(te,X,e){var A=e(81680),P={object:!0,function:!0,undefined:!0};te.exports=function(o){return A(o)?hasOwnProperty.call(P,typeof o):!1}},87396:function(te,X,e){var A=e(57980),P=e(85488);te.exports=function(o){return P(o)?o:A(o,"%v is not a plain function",arguments[1])}},85488:function(te,X,e){var A=e(73384),P=/^\s*class[\s{/}]/,o=Function.prototype.toString;te.exports=function(L){return!(!A(L)||P.test(o.call(L)))}},54612:function(te,X,e){var A=e(7328);te.exports=function(P){if(!A(P))return!1;try{return P.constructor?P.constructor.prototype===P:!1}catch{return!1}}},33940:function(te,X,e){var A=e(81680),P=e(7328),o=Object.prototype.toString;te.exports=function(L){if(!A(L))return null;if(P(L)){var M=L.toString;if(typeof M!="function"||M===o)return null}try{return""+L}catch{return null}}},18496:function(te,X,e){var A=e(57980),P=e(81680);te.exports=function(o){return P(o)?o:A(o,"Cannot use %v",arguments[1])}},81680:function(te){var X=void 0;te.exports=function(e){return e!==X&&e!==null}},14144:function(te,X,e){var A=e(308),P=e(10352),o=e(33576).Buffer;e.g.__TYPEDARRAY_POOL||(e.g.__TYPEDARRAY_POOL={UINT8:P([32,0]),UINT16:P([32,0]),UINT32:P([32,0]),BIGUINT64:P([32,0]),INT8:P([32,0]),INT16:P([32,0]),INT32:P([32,0]),BIGINT64:P([32,0]),FLOAT:P([32,0]),DOUBLE:P([32,0]),DATA:P([32,0]),UINT8C:P([32,0]),BUFFER:P([32,0])});var L=typeof Uint8ClampedArray<"u",M=typeof BigUint64Array<"u",d=typeof BigInt64Array<"u",g=e.g.__TYPEDARRAY_POOL;g.UINT8C||(g.UINT8C=P([32,0])),g.BIGUINT64||(g.BIGUINT64=P([32,0])),g.BIGINT64||(g.BIGINT64=P([32,0])),g.BUFFER||(g.BUFFER=P([32,0]));var r=g.DATA,t=g.BUFFER;X.free=function(i){if(o.isBuffer(i))t[A.log2(i.length)].push(i);else{if(Object.prototype.toString.call(i)!=="[object ArrayBuffer]"&&(i=i.buffer),!i)return;var C=i.length||i.byteLength,x=A.log2(C)|0;r[x].push(i)}};function s(w){if(w){var i=w.length||w.byteLength,C=A.log2(i);r[C].push(w)}}function a(w){s(w.buffer)}X.freeUint8=X.freeUint16=X.freeUint32=X.freeBigUint64=X.freeInt8=X.freeInt16=X.freeInt32=X.freeBigInt64=X.freeFloat32=X.freeFloat=X.freeFloat64=X.freeDouble=X.freeUint8Clamped=X.freeDataView=a,X.freeArrayBuffer=s,X.freeBuffer=function(i){t[A.log2(i.length)].push(i)},X.malloc=function(i,C){if(C===void 0||C==="arraybuffer")return c(i);switch(C){case"uint8":return u(i);case"uint16":return l(i);case"uint32":return y(i);case"int8":return h(i);case"int16":return T(i);case"int32":return f(i);case"float":case"float32":return n(i);case"double":case"float64":return v(i);case"uint8_clamped":return m(i);case"bigint64":return E(i);case"biguint64":return b(i);case"buffer":return S(i);case"data":case"dataview":return p(i);default:return null}return null};function c(i){var i=A.nextPow2(i),C=A.log2(i),x=r[C];return x.length>0?x.pop():new ArrayBuffer(i)}X.mallocArrayBuffer=c;function u(w){return new Uint8Array(c(w),0,w)}X.mallocUint8=u;function l(w){return new Uint16Array(c(2*w),0,w)}X.mallocUint16=l;function y(w){return new Uint32Array(c(4*w),0,w)}X.mallocUint32=y;function h(w){return new Int8Array(c(w),0,w)}X.mallocInt8=h;function T(w){return new Int16Array(c(2*w),0,w)}X.mallocInt16=T;function f(w){return new Int32Array(c(4*w),0,w)}X.mallocInt32=f;function n(w){return new Float32Array(c(4*w),0,w)}X.mallocFloat32=X.mallocFloat=n;function v(w){return new Float64Array(c(8*w),0,w)}X.mallocFloat64=X.mallocDouble=v;function m(w){return L?new Uint8ClampedArray(c(w),0,w):u(w)}X.mallocUint8Clamped=m;function b(w){return M?new BigUint64Array(c(8*w),0,w):null}X.mallocBigUint64=b;function E(w){return d?new BigInt64Array(c(8*w),0,w):null}X.mallocBigInt64=E;function p(w){return new DataView(c(w),0,w)}X.mallocDataView=p;function S(w){w=A.nextPow2(w);var i=A.log2(w),C=t[i];return C.length>0?C.pop():new o(w)}X.mallocBuffer=S,X.clearCache=function(){for(var i=0;i<32;++i)g.UINT8[i].length=0,g.UINT16[i].length=0,g.UINT32[i].length=0,g.INT8[i].length=0,g.INT16[i].length=0,g.INT32[i].length=0,g.FLOAT[i].length=0,g.DOUBLE[i].length=0,g.BIGUINT64[i].length=0,g.BIGINT64[i].length=0,g.UINT8C[i].length=0,r[i].length=0,t[i].length=0}},92384:function(te){var X=/[\'\"]/;te.exports=function(A){return A?(X.test(A.charAt(0))&&(A=A.substr(1)),X.test(A.charAt(A.length-1))&&(A=A.substr(0,A.length-1)),A):""}},45223:function(te){te.exports=function(e,A,P){Array.isArray(P)||(P=[].slice.call(arguments,2));for(var o=0,L=P.length;o"u"?!1:C.working?C(we):we instanceof Map}X.isMap=x;function k(we){return r(we)==="[object Set]"}k.working=typeof Set<"u"&&k(new Set);function I(we){return typeof Set>"u"?!1:k.working?k(we):we instanceof Set}X.isSet=I;function B(we){return r(we)==="[object WeakMap]"}B.working=typeof WeakMap<"u"&&B(new WeakMap);function _(we){return typeof WeakMap>"u"?!1:B.working?B(we):we instanceof WeakMap}X.isWeakMap=_;function z(we){return r(we)==="[object WeakSet]"}z.working=typeof WeakSet<"u"&&z(new WeakSet);function O(we){return z(we)}X.isWeakSet=O;function F(we){return r(we)==="[object ArrayBuffer]"}F.working=typeof ArrayBuffer<"u"&&F(new ArrayBuffer);function N(we){return typeof ArrayBuffer>"u"?!1:F.working?F(we):we instanceof ArrayBuffer}X.isArrayBuffer=N;function V(we){return r(we)==="[object DataView]"}V.working=typeof ArrayBuffer<"u"&&typeof DataView<"u"&&V(new DataView(new ArrayBuffer(1),0,1));function j(we){return typeof DataView>"u"?!1:V.working?V(we):we instanceof DataView}X.isDataView=j;var $=typeof SharedArrayBuffer<"u"?SharedArrayBuffer:void 0;function q(we){return r(we)==="[object SharedArrayBuffer]"}function oe(we){return typeof $>"u"?!1:(typeof q.working>"u"&&(q.working=q(new $)),q.working?q(we):we instanceof $)}X.isSharedArrayBuffer=oe;function Z(we){return r(we)==="[object AsyncFunction]"}X.isAsyncFunction=Z;function G(we){return r(we)==="[object Map Iterator]"}X.isMapIterator=G;function re(we){return r(we)==="[object Set Iterator]"}X.isSetIterator=re;function H(we){return r(we)==="[object Generator]"}X.isGeneratorObject=H;function J(we){return r(we)==="[object WebAssembly.Module]"}X.isWebAssemblyCompiledModule=J;function ae(we){return l(we,t)}X.isNumberObject=ae;function K(we){return l(we,s)}X.isStringObject=K;function Y(we){return l(we,a)}X.isBooleanObject=Y;function ie(we){return d&&l(we,c)}X.isBigIntObject=ie;function ne(we){return g&&l(we,u)}X.isSymbolObject=ne;function le(we){return ae(we)||K(we)||Y(we)||ie(we)||ne(we)}X.isBoxedPrimitive=le;function de(we){return typeof Uint8Array<"u"&&(N(we)||oe(we))}X.isAnyArrayBuffer=de,["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(we){Object.defineProperty(X,we,{enumerable:!1,value:function(){throw new Error(we+" is not supported in userland")}})})},35840:function(te,X,e){var A=e(4168),P=Object.getOwnPropertyDescriptors||function($){for(var q=Object.keys($),oe={},Z=0;Z=Z)return H;switch(H){case"%s":return String(oe[q++]);case"%d":return Number(oe[q++]);case"%j":try{return JSON.stringify(oe[q++])}catch{return"[Circular]"}default:return H}}),re=oe[q];q"u")return function(){return X.deprecate(j,$).apply(this,arguments)};var q=!1;function oe(){if(!q){if(A.throwDeprecation)throw new Error($);A.traceDeprecation?console.trace($):console.error($),q=!0}return j.apply(this,arguments)}return oe};var L={},M=/^$/;if(A.env.NODE_DEBUG){var d=A.env.NODE_DEBUG;d=d.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),M=new RegExp("^"+d+"$","i")}X.debuglog=function(j){if(j=j.toUpperCase(),!L[j])if(M.test(j)){var $=A.pid;L[j]=function(){var q=X.format.apply(X,arguments);console.error("%s %d: %s",j,$,q)}}else L[j]=function(){};return L[j]};function g(j,$){var q={seen:[],stylize:t};return arguments.length>=3&&(q.depth=arguments[2]),arguments.length>=4&&(q.colors=arguments[3]),f($)?q.showHidden=$:$&&X._extend(q,$),p(q.showHidden)&&(q.showHidden=!1),p(q.depth)&&(q.depth=2),p(q.colors)&&(q.colors=!1),p(q.customInspect)&&(q.customInspect=!0),q.colors&&(q.stylize=r),a(q,j,q.depth)}X.inspect=g,g.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]},g.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function r(j,$){var q=g.styles[$];return q?"\x1B["+g.colors[q][0]+"m"+j+"\x1B["+g.colors[q][1]+"m":j}function t(j,$){return j}function s(j){var $={};return j.forEach(function(q,oe){$[q]=!0}),$}function a(j,$,q){if(j.customInspect&&$&&x($.inspect)&&$.inspect!==X.inspect&&!($.constructor&&$.constructor.prototype===$)){var oe=$.inspect(q,j);return b(oe)||(oe=a(j,oe,q)),oe}var Z=c(j,$);if(Z)return Z;var G=Object.keys($),re=s(G);if(j.showHidden&&(G=Object.getOwnPropertyNames($)),C($)&&(G.indexOf("message")>=0||G.indexOf("description")>=0))return u($);if(G.length===0){if(x($)){var H=$.name?": "+$.name:"";return j.stylize("[Function"+H+"]","special")}if(S($))return j.stylize(RegExp.prototype.toString.call($),"regexp");if(i($))return j.stylize(Date.prototype.toString.call($),"date");if(C($))return u($)}var J="",ae=!1,K=["{","}"];if(T($)&&(ae=!0,K=["[","]"]),x($)){var Y=$.name?": "+$.name:"";J=" [Function"+Y+"]"}if(S($)&&(J=" "+RegExp.prototype.toString.call($)),i($)&&(J=" "+Date.prototype.toUTCString.call($)),C($)&&(J=" "+u($)),G.length===0&&(!ae||$.length==0))return K[0]+J+K[1];if(q<0)return S($)?j.stylize(RegExp.prototype.toString.call($),"regexp"):j.stylize("[Object]","special");j.seen.push($);var ie;return ae?ie=l(j,$,q,re,G):ie=G.map(function(ne){return y(j,$,q,re,ne,ae)}),j.seen.pop(),h(ie,J,K)}function c(j,$){if(p($))return j.stylize("undefined","undefined");if(b($)){var q="'"+JSON.stringify($).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return j.stylize(q,"string")}if(m($))return j.stylize(""+$,"number");if(f($))return j.stylize(""+$,"boolean");if(n($))return j.stylize("null","null")}function u(j){return"["+Error.prototype.toString.call(j)+"]"}function l(j,$,q,oe,Z){for(var G=[],re=0,H=$.length;re-1&&(G?H=H.split(` `).map(function(ae){return" "+ae}).join(` `).slice(2):H=` `+H.split(` `).map(function(ae){return" "+ae}).join(` `))):H=j.stylize("[Circular]","special")),p(re)){if(G&&Z.match(/^\d+$/))return H;re=JSON.stringify(""+Z),re.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(re=re.slice(1,-1),re=j.stylize(re,"name")):(re=re.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),re=j.stylize(re,"string"))}return re+": "+H}function h(j,$,q){var oe=j.reduce(function(Z,G){return G.indexOf(` `)>=0,Z+G.replace(/\u001b\[\d\d?m/g,"").length+1},0);return oe>60?q[0]+($===""?"":$+` `)+" "+j.join(`, `)+" "+q[1]:q[0]+$+" "+j.join(", ")+" "+q[1]}X.types=e(41088);function T(j){return Array.isArray(j)}X.isArray=T;function f(j){return typeof j=="boolean"}X.isBoolean=f;function n(j){return j===null}X.isNull=n;function v(j){return j==null}X.isNullOrUndefined=v;function m(j){return typeof j=="number"}X.isNumber=m;function b(j){return typeof j=="string"}X.isString=b;function E(j){return typeof j=="symbol"}X.isSymbol=E;function p(j){return j===void 0}X.isUndefined=p;function S(j){return w(j)&&I(j)==="[object RegExp]"}X.isRegExp=S,X.types.isRegExp=S;function w(j){return typeof j=="object"&&j!==null}X.isObject=w;function i(j){return w(j)&&I(j)==="[object Date]"}X.isDate=i,X.types.isDate=i;function C(j){return w(j)&&(I(j)==="[object Error]"||j instanceof Error)}X.isError=C,X.types.isNativeError=C;function x(j){return typeof j=="function"}X.isFunction=x;function k(j){return j===null||typeof j=="boolean"||typeof j=="number"||typeof j=="string"||typeof j=="symbol"||typeof j>"u"}X.isPrimitive=k,X.isBuffer=e(75272);function I(j){return Object.prototype.toString.call(j)}function B(j){return j<10?"0"+j.toString(10):j.toString(10)}var _=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function z(){var j=new Date,$=[B(j.getHours()),B(j.getMinutes()),B(j.getSeconds())].join(":");return[j.getDate(),_[j.getMonth()],$].join(" ")}X.log=function(){console.log("%s - %s",z(),X.format.apply(X,arguments))},X.inherits=e(6768),X._extend=function(j,$){if(!$||!w($))return j;for(var q=Object.keys($),oe=q.length;oe--;)j[q[oe]]=$[q[oe]];return j};function O(j,$){return Object.prototype.hasOwnProperty.call(j,$)}var F=typeof Symbol<"u"?Symbol("util.promisify.custom"):void 0;X.promisify=function($){if(typeof $!="function")throw new TypeError('The "original" argument must be of type Function');if(F&&$[F]){var q=$[F];if(typeof q!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(q,F,{value:q,enumerable:!1,writable:!1,configurable:!0}),q}function q(){for(var oe,Z,G=new Promise(function(J,ae){oe=J,Z=ae}),re=[],H=0;H"u"?e.g:globalThis,t=P(),s=L("String.prototype.slice"),a=Object.getPrototypeOf,c=L("Array.prototype.indexOf",!0)||function(T,f){for(var n=0;n-1?f:f!=="Object"?!1:y(T)}return M?l(T):null}},67020:function(te,X,e){var A=e(38700),P=e(50896),o=A.instance();function L(u){this.local=this.regionalOptions[u||""]||this.regionalOptions[""]}L.prototype=new A.baseCalendar,P(L.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(u,l){if(typeof u=="string"){var y=u.match(d);return y?y[0]:""}var h=this._validateYear(u),T=u.month(),f=""+this.toChineseMonth(h,T);return l&&f.length<2&&(f="0"+f),this.isIntercalaryMonth(h,T)&&(f+="i"),f},monthNames:function(u){if(typeof u=="string"){var l=u.match(g);return l?l[0]:""}var y=this._validateYear(u),h=u.month(),T=this.toChineseMonth(y,h),f=["一月","二月","三月","四月","五月","六月","七月","八月","九月","十月","十一月","十二月"][T-1];return this.isIntercalaryMonth(y,h)&&(f="闰"+f),f},monthNamesShort:function(u){if(typeof u=="string"){var l=u.match(r);return l?l[0]:""}var y=this._validateYear(u),h=u.month(),T=this.toChineseMonth(y,h),f=["一","二","三","四","五","六","七","八","九","十","十一","十二"][T-1];return this.isIntercalaryMonth(y,h)&&(f="闰"+f),f},parseMonth:function(u,l){u=this._validateYear(u);var y=parseInt(l),h;if(isNaN(y))l[0]==="闰"&&(h=!0,l=l.substring(1)),l[l.length-1]==="月"&&(l=l.substring(0,l.length-1)),y=1+["一","二","三","四","五","六","七","八","九","十","十一","十二"].indexOf(l);else{var T=l[l.length-1];h=T==="i"||T==="I"}var f=this.toMonthIndex(u,y,h);return f},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(u,l){if(u.year&&(u=u.year()),typeof u!="number"||u<1888||u>2111)throw l.replace(/\{0\}/,this.local.name);return u},toMonthIndex:function(u,l,y){var h=this.intercalaryMonth(u),T=y&&l!==h;if(T||l<1||l>12)throw A.local.invalidMonth.replace(/\{0\}/,this.local.name);var f;return h?!y&&l<=h?f=l-1:f=l:f=l-1,f},toChineseMonth:function(u,l){u.year&&(u=u.year(),l=u.month());var y=this.intercalaryMonth(u),h=y?12:11;if(l<0||l>h)throw A.local.invalidMonth.replace(/\{0\}/,this.local.name);var T;return y?l>13;return y},isIntercalaryMonth:function(u,l){u.year&&(u=u.year(),l=u.month());var y=this.intercalaryMonth(u);return!!y&&y===l},leapYear:function(u){return this.intercalaryMonth(u)!==0},weekOfYear:function(u,l,y){var h=this._validateYear(u,A.local.invalidyear),T=s[h-s[0]],f=T>>9&4095,n=T>>5&15,v=T&31,m;m=o.newDate(f,n,v),m.add(4-(m.dayOfWeek()||7),"d");var b=this.toJD(u,l,y)-m.toJD();return 1+Math.floor(b/7)},monthsInYear:function(u){return this.leapYear(u)?13:12},daysInMonth:function(u,l){u.year&&(l=u.month(),u=u.year()),u=this._validateYear(u);var y=t[u-t[0]],h=y>>13,T=h?12:11;if(l>T)throw A.local.invalidMonth.replace(/\{0\}/,this.local.name);var f=y&1<<12-l?30:29;return f},weekDay:function(u,l,y){return(this.dayOfWeek(u,l,y)||7)<6},toJD:function(u,l,y){var h=this._validate(u,f,y,A.local.invalidDate);u=this._validateYear(h.year()),l=h.month(),y=h.day();var T=this.isIntercalaryMonth(u,l),f=this.toChineseMonth(u,l),n=c(u,f,y,T);return o.toJD(n.year,n.month,n.day)},fromJD:function(u){var l=o.fromJD(u),y=a(l.year(),l.month(),l.day()),h=this.toMonthIndex(y.year,y.month,y.isIntercalary);return this.newDate(y.year,h,y.day)},fromString:function(u){var l=u.match(M),y=this._validateYear(+l[1]),h=+l[2],T=!!l[3],f=this.toMonthIndex(y,h,T),n=+l[4];return this.newDate(y,f,n)},add:function(u,l,y){var h=u.year(),T=u.month(),f=this.isIntercalaryMonth(h,T),n=this.toChineseMonth(h,T),v=Object.getPrototypeOf(L.prototype).add.call(this,u,l,y);if(y==="y"){var m=v.year(),b=v.month(),E=this.isIntercalaryMonth(m,n),p=f&&E?this.toMonthIndex(m,n,!0):this.toMonthIndex(m,n,!1);p!==b&&v.month(p)}return v}});var M=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,d=/^\d?\d[iI]?/m,g=/^闰?十?[一二三四五六七八九]?月/m,r=/^闰?十?[一二三四五六七八九]?/m;A.calendars.chinese=L;var t=[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],s=[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];function a(u,l,y,h){var T,f;if(typeof u=="object")T=u,f=l||{};else{var n=typeof u=="number"&&u>=1888&&u<=2111;if(!n)throw new Error("Solar year outside range 1888-2111");var v=typeof l=="number"&&l>=1&&l<=12;if(!v)throw new Error("Solar month outside range 1 - 12");var m=typeof y=="number"&&y>=1&&y<=31;if(!m)throw new Error("Solar day outside range 1 - 31");T={year:u,month:l,day:y},f={}}var b=s[T.year-s[0]],E=T.year<<9|T.month<<5|T.day;f.year=E>=b?T.year:T.year-1,b=s[f.year-s[0]];var p=b>>9&4095,S=b>>5&15,w=b&31,i,C=new Date(p,S-1,w),x=new Date(T.year,T.month-1,T.day);i=Math.round((x-C)/864e5);var k=t[f.year-t[0]],I;for(I=0;I<13;I++){var B=k&1<<12-I?30:29;if(i>13;return!_||I<_?(f.isIntercalary=!1,f.month=1+I):I===_?(f.isIntercalary=!0,f.month=I):(f.isIntercalary=!1,f.month=I),f.day=1+i,f}function c(u,l,y,h,T){var f,n;if(typeof u=="object")n=u,f=l||{};else{var v=typeof u=="number"&&u>=1888&&u<=2111;if(!v)throw new Error("Lunar year outside range 1888-2111");var m=typeof l=="number"&&l>=1&&l<=12;if(!m)throw new Error("Lunar month outside range 1 - 12");var b=typeof y=="number"&&y>=1&&y<=30;if(!b)throw new Error("Lunar day outside range 1 - 30");var E;typeof h=="object"?(E=!1,f=h):(E=!!h,f={}),n={year:u,month:l,day:y,isIntercalary:E}}var p;p=n.day-1;var S=t[n.year-t[0]],w=S>>13,i;w&&(n.month>w||n.isIntercalary)?i=n.month:i=n.month-1;for(var C=0;C>9&4095,B=k>>5&15,_=k&31,z=new Date(I,B-1,_+p);return f.year=z.getFullYear(),f.month=1+z.getMonth(),f.day=z.getDate(),f}},89792:function(te,X,e){var A=e(38700),P=e(50896);function o(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Coptic",jdEpoch:18250295e-1,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(d){var M=this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),d=M.year()+(M.year()<0?1:0);return d%4===3||d%4===-1},monthsInYear:function(L){return this._validate(L,this.minMonth,this.minDay,A.local.invalidYear||A.regionalOptions[""].invalidYear),13},weekOfYear:function(L,M,d){var g=this.newDate(L,M,d);return g.add(-g.dayOfWeek(),"d"),Math.floor((g.dayOfYear()-1)/7)+1},daysInMonth:function(L,M){var d=this._validate(L,M,this.minDay,A.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===13&&this.leapYear(d.year())?1:0)},weekDay:function(L,M,d){return(this.dayOfWeek(L,M,d)||7)<6},toJD:function(L,M,d){var g=this._validate(L,M,d,A.local.invalidDate);return L=g.year(),L<0&&L++,g.day()+(g.month()-1)*30+(L-1)*365+Math.floor(L/4)+this.jdEpoch-1},fromJD:function(L){var M=Math.floor(L)+.5-this.jdEpoch,d=Math.floor((M-Math.floor((M+366)/1461))/365)+1;d<=0&&d--,M=Math.floor(L)+.5-this.newDate(d,1,1).toJD();var g=Math.floor(M/30)+1,r=M-(g-1)*30+1;return this.newDate(d,g,r)}}),A.calendars.coptic=o},55668:function(te,X,e){var A=e(38700),P=e(50896);function o(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Discworld",jdEpoch:17214255e-1,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(M){return this._validate(M,this.minMonth,this.minDay,A.local.invalidYear),!1},monthsInYear:function(M){return this._validate(M,this.minMonth,this.minDay,A.local.invalidYear),13},daysInYear:function(M){return this._validate(M,this.minMonth,this.minDay,A.local.invalidYear),400},weekOfYear:function(M,d,g){var r=this.newDate(M,d,g);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/8)+1},daysInMonth:function(M,d){var g=this._validate(M,d,this.minDay,A.local.invalidMonth);return this.daysPerMonth[g.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);return(r.day()+1)%8},weekDay:function(M,d,g){var r=this.dayOfWeek(M,d,g);return r>=2&&r<=6},extraInfo:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);return{century:L[Math.floor((r.year()-1)/100)+1]||""}},toJD:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);return M=r.year()+(r.year()<0?1:0),d=r.month(),g=r.day(),g+(d>1?16:0)+(d>2?(d-2)*32:0)+(M-1)*400+this.jdEpoch-1},fromJD:function(M){M=Math.floor(M+.5)-Math.floor(this.jdEpoch)-1;var d=Math.floor(M/400)+1;M-=(d-1)*400,M+=M>15?16:0;var g=Math.floor(M/32)+1,r=M-(g-1)*32+1;return this.newDate(d<=0?d-1:d,g,r)}});var L={20:"Fruitbat",21:"Anchovy"};A.calendars.discworld=o},65168:function(te,X,e){var A=e(38700),P=e(50896);function o(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Ethiopian",jdEpoch:17242205e-1,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(d){var M=this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),d=M.year()+(M.year()<0?1:0);return d%4===3||d%4===-1},monthsInYear:function(L){return this._validate(L,this.minMonth,this.minDay,A.local.invalidYear||A.regionalOptions[""].invalidYear),13},weekOfYear:function(L,M,d){var g=this.newDate(L,M,d);return g.add(-g.dayOfWeek(),"d"),Math.floor((g.dayOfYear()-1)/7)+1},daysInMonth:function(L,M){var d=this._validate(L,M,this.minDay,A.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===13&&this.leapYear(d.year())?1:0)},weekDay:function(L,M,d){return(this.dayOfWeek(L,M,d)||7)<6},toJD:function(L,M,d){var g=this._validate(L,M,d,A.local.invalidDate);return L=g.year(),L<0&&L++,g.day()+(g.month()-1)*30+(L-1)*365+Math.floor(L/4)+this.jdEpoch-1},fromJD:function(L){var M=Math.floor(L)+.5-this.jdEpoch,d=Math.floor((M-Math.floor((M+366)/1461))/365)+1;d<=0&&d--,M=Math.floor(L)+.5-this.newDate(d,1,1).toJD();var g=Math.floor(M/30)+1,r=M-(g-1)*30+1;return this.newDate(d,g,r)}}),A.calendars.ethiopian=o},2084:function(te,X,e){var A=e(38700),P=e(50896);function o(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Hebrew",jdEpoch:347995.5,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29,29],hasYearZero:!1,minMonth:1,firstMonth:7,minDay:1,regionalOptions:{"":{name:"Hebrew",epochs:["BAM","AM"],monthNames:["Nisan","Iyar","Sivan","Tammuz","Av","Elul","Tishrei","Cheshvan","Kislev","Tevet","Shevat","Adar","Adar II"],monthNamesShort:["Nis","Iya","Siv","Tam","Av","Elu","Tis","Che","Kis","Tev","She","Ada","Ad2"],dayNames:["Yom Rishon","Yom Sheni","Yom Shlishi","Yom Revi'i","Yom Chamishi","Yom Shishi","Yom Shabbat"],dayNamesShort:["Ris","She","Shl","Rev","Cha","Shi","Sha"],dayNamesMin:["Ri","She","Shl","Re","Ch","Shi","Sha"],digits:null,dateFormat:"dd/mm/yyyy",firstDay:0,isRTL:!1}},leapYear:function(M){var d=this._validate(M,this.minMonth,this.minDay,A.local.invalidYear);return this._leapYear(d.year())},_leapYear:function(M){return M=M<0?M+1:M,L(M*7+1,19)<7},monthsInYear:function(M){return this._validate(M,this.minMonth,this.minDay,A.local.invalidYear),this._leapYear(M.year?M.year():M)?13:12},weekOfYear:function(M,d,g){var r=this.newDate(M,d,g);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(M){var d=this._validate(M,this.minMonth,this.minDay,A.local.invalidYear);return M=d.year(),this.toJD(M===-1?1:M+1,7,1)-this.toJD(M,7,1)},daysInMonth:function(M,d){return M.year&&(d=M.month(),M=M.year()),this._validate(M,d,this.minDay,A.local.invalidMonth),d===12&&this.leapYear(M)||d===8&&L(this.daysInYear(M),10)===5?30:d===9&&L(this.daysInYear(M),10)===3?29:this.daysPerMonth[d-1]},weekDay:function(M,d,g){return this.dayOfWeek(M,d,g)!==6},extraInfo:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);return{yearType:(this.leapYear(r)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(r)%10-3]}},toJD:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);M=r.year(),d=r.month(),g=r.day();var t=M<=0?M+1:M,s=this.jdEpoch+this._delay1(t)+this._delay2(t)+g+1;if(d<7){for(var a=7;a<=this.monthsInYear(M);a++)s+=this.daysInMonth(M,a);for(var a=1;a=this.toJD(d===-1?1:d+1,7,1);)d++;for(var g=Mthis.toJD(d,g,this.daysInMonth(d,g));)g++;var r=M-this.toJD(d,g,1)+1;return this.newDate(d,g,r)}});function L(M,d){return M-d*Math.floor(M/d)}A.calendars.hebrew=o},26368:function(te,X,e){var A=e(38700),P=e(50896);function o(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Islamic",jdEpoch:19484395e-1,daysPerMonth:[30,29,30,29,30,29,30,29,30,29,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Islamic",epochs:["BH","AH"],monthNames:["Muharram","Safar","Rabi' al-awwal","Rabi' al-thani","Jumada al-awwal","Jumada al-thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-ahad","Yawm al-ithnayn","Yawm ath-thulaathaa'","Yawm al-arbi'aa'","Yawm al-khamīs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(L){var M=this._validate(L,this.minMonth,this.minDay,A.local.invalidYear);return(M.year()*11+14)%30<11},weekOfYear:function(L,M,d){var g=this.newDate(L,M,d);return g.add(-g.dayOfWeek(),"d"),Math.floor((g.dayOfYear()-1)/7)+1},daysInYear:function(L){return this.leapYear(L)?355:354},daysInMonth:function(L,M){var d=this._validate(L,M,this.minDay,A.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===12&&this.leapYear(d.year())?1:0)},weekDay:function(L,M,d){return this.dayOfWeek(L,M,d)!==5},toJD:function(L,M,d){var g=this._validate(L,M,d,A.local.invalidDate);return L=g.year(),M=g.month(),d=g.day(),L=L<=0?L+1:L,d+Math.ceil(29.5*(M-1))+(L-1)*354+Math.floor((3+11*L)/30)+this.jdEpoch-1},fromJD:function(L){L=Math.floor(L)+.5;var M=Math.floor((30*(L-this.jdEpoch)+10646)/10631);M=M<=0?M-1:M;var d=Math.min(12,Math.ceil((L-29-this.toJD(M,1,1))/29.5)+1),g=L-this.toJD(M,d,1)+1;return this.newDate(M,d,g)}}),A.calendars.islamic=o},24747:function(te,X,e){var A=e(38700),P=e(50896);function o(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Julian",jdEpoch:17214235e-1,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(d){var M=this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),d=M.year()<0?M.year()+1:M.year();return d%4===0},weekOfYear:function(L,M,d){var g=this.newDate(L,M,d);return g.add(4-(g.dayOfWeek()||7),"d"),Math.floor((g.dayOfYear()-1)/7)+1},daysInMonth:function(L,M){var d=this._validate(L,M,this.minDay,A.local.invalidMonth);return this.daysPerMonth[d.month()-1]+(d.month()===2&&this.leapYear(d.year())?1:0)},weekDay:function(L,M,d){return(this.dayOfWeek(L,M,d)||7)<6},toJD:function(L,M,d){var g=this._validate(L,M,d,A.local.invalidDate);return L=g.year(),M=g.month(),d=g.day(),L<0&&L++,M<=2&&(L--,M+=12),Math.floor(365.25*(L+4716))+Math.floor(30.6001*(M+1))+d-1524.5},fromJD:function(L){var M=Math.floor(L+.5),d=M+1524,g=Math.floor((d-122.1)/365.25),r=Math.floor(365.25*g),t=Math.floor((d-r)/30.6001),s=t-Math.floor(t<14?1:13),a=g-Math.floor(s>2?4716:4715),c=d-r-Math.floor(30.6001*t);return a<=0&&a--,this.newDate(a,s,c)}}),A.calendars.julian=o},65616:function(te,X,e){var A=e(38700),P=e(50896);function o(d){this.local=this.regionalOptions[d||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Mayan",jdEpoch:584282.5,hasYearZero:!0,minMonth:0,firstMonth:0,minDay:0,regionalOptions:{"":{name:"Mayan",epochs:["",""],monthNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],monthNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17"],dayNames:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesShort:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],dayNamesMin:["0","1","2","3","4","5","6","7","8","9","10","11","12","13","14","15","16","17","18","19"],digits:null,dateFormat:"YYYY.m.d",firstDay:0,isRTL:!1,haabMonths:["Pop","Uo","Zip","Zotz","Tzec","Xul","Yaxkin","Mol","Chen","Yax","Zac","Ceh","Mac","Kankin","Muan","Pax","Kayab","Cumku","Uayeb"],tzolkinMonths:["Imix","Ik","Akbal","Kan","Chicchan","Cimi","Manik","Lamat","Muluc","Oc","Chuen","Eb","Ben","Ix","Men","Cib","Caban","Etznab","Cauac","Ahau"]}},leapYear:function(d){return this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),!1},formatYear:function(d){var g=this._validate(d,this.minMonth,this.minDay,A.local.invalidYear);d=g.year();var r=Math.floor(d/400);d=d%400,d+=d<0?400:0;var t=Math.floor(d/20);return r+"."+t+"."+d%20},forYear:function(d){if(d=d.split("."),d.length<3)throw"Invalid Mayan year";for(var g=0,r=0;r19||r>0&&t<0)throw"Invalid Mayan year";g=g*20+t}return g},monthsInYear:function(d){return this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),18},weekOfYear:function(d,g,r){return this._validate(d,g,r,A.local.invalidDate),0},daysInYear:function(d){return this._validate(d,this.minMonth,this.minDay,A.local.invalidYear),360},daysInMonth:function(d,g){return this._validate(d,g,this.minDay,A.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(d,g,r){var t=this._validate(d,g,r,A.local.invalidDate);return t.day()},weekDay:function(d,g,r){return this._validate(d,g,r,A.local.invalidDate),!0},extraInfo:function(d,g,r){var t=this._validate(d,g,r,A.local.invalidDate),s=t.toJD(),a=this._toHaab(s),c=this._toTzolkin(s);return{haabMonthName:this.local.haabMonths[a[0]-1],haabMonth:a[0],haabDay:a[1],tzolkinDayName:this.local.tzolkinMonths[c[0]-1],tzolkinDay:c[0],tzolkinTrecena:c[1]}},_toHaab:function(d){d-=this.jdEpoch;var g=L(d+8+17*20,365);return[Math.floor(g/20)+1,L(g,20)]},_toTzolkin:function(d){return d-=this.jdEpoch,[M(d+20,20),M(d+4,13)]},toJD:function(d,g,r){var t=this._validate(d,g,r,A.local.invalidDate);return t.day()+t.month()*20+t.year()*360+this.jdEpoch},fromJD:function(d){d=Math.floor(d)+.5-this.jdEpoch;var g=Math.floor(d/360);d=d%360,d+=d<0?360:0;var r=Math.floor(d/20),t=d%20;return this.newDate(g,r,t)}});function L(d,g){return d-g*Math.floor(d/g)}function M(d,g){return L(d-1,g)+1}A.calendars.mayan=o},30632:function(te,X,e){var A=e(38700),P=e(50896);function o(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar;var L=A.instance("gregorian");P(o.prototype,{name:"Nanakshahi",jdEpoch:22576735e-1,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(M){var d=this._validate(M,this.minMonth,this.minDay,A.local.invalidYear||A.regionalOptions[""].invalidYear);return L.leapYear(d.year()+(d.year()<1?1:0)+1469)},weekOfYear:function(M,d,g){var r=this.newDate(M,d,g);return r.add(1-(r.dayOfWeek()||7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(M,d){var g=this._validate(M,d,this.minDay,A.local.invalidMonth);return this.daysPerMonth[g.month()-1]+(g.month()===12&&this.leapYear(g.year())?1:0)},weekDay:function(M,d,g){return(this.dayOfWeek(M,d,g)||7)<6},toJD:function(t,d,g){var r=this._validate(t,d,g,A.local.invalidMonth),t=r.year();t<0&&t++;for(var s=r.day(),a=1;a=this.toJD(d+1,1,1);)d++;for(var g=M-Math.floor(this.toJD(d,1,1)+.5)+1,r=1;g>this.daysInMonth(d,r);)g-=this.daysInMonth(d,r),r++;return this.newDate(d,r,g)}}),A.calendars.nanakshahi=o},73040:function(te,X,e){var A=e(38700),P=e(50896);function o(L){this.local=this.regionalOptions[L||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Nepali",jdEpoch:17007095e-1,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(L){return this.daysInYear(L)!==this.daysPerYear},weekOfYear:function(L,M,d){var g=this.newDate(L,M,d);return g.add(-g.dayOfWeek(),"d"),Math.floor((g.dayOfYear()-1)/7)+1},daysInYear:function(L){var M=this._validate(L,this.minMonth,this.minDay,A.local.invalidYear);if(L=M.year(),typeof this.NEPALI_CALENDAR_DATA[L]>"u")return this.daysPerYear;for(var d=0,g=this.minMonth;g<=12;g++)d+=this.NEPALI_CALENDAR_DATA[L][g];return d},daysInMonth:function(L,M){return L.year&&(M=L.month(),L=L.year()),this._validate(L,M,this.minDay,A.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[L]>"u"?this.daysPerMonth[M-1]:this.NEPALI_CALENDAR_DATA[L][M]},weekDay:function(L,M,d){return this.dayOfWeek(L,M,d)!==6},toJD:function(L,M,d){var g=this._validate(L,M,d,A.local.invalidDate);L=g.year(),M=g.month(),d=g.day();var r=A.instance(),t=0,s=M,a=L;this._createMissingCalendarData(L);var c=L-(s>9||s===9&&d>=this.NEPALI_CALENDAR_DATA[a][0]?56:57);for(M!==9&&(t=d,s--);s!==9;)s<=0&&(s=12,a--),t+=this.NEPALI_CALENDAR_DATA[a][s],s--;return M===9?(t+=d-this.NEPALI_CALENDAR_DATA[a][0],t<0&&(t+=r.daysInYear(c))):t+=this.NEPALI_CALENDAR_DATA[a][9]-this.NEPALI_CALENDAR_DATA[a][0],r.newDate(c,1,1).add(t,"d").toJD()},fromJD:function(L){var M=A.instance(),d=M.fromJD(L),g=d.year(),r=d.dayOfYear(),t=g+56;this._createMissingCalendarData(t);for(var s=9,a=this.NEPALI_CALENDAR_DATA[t][0],c=this.NEPALI_CALENDAR_DATA[t][s]-a+1;r>c;)s++,s>12&&(s=1,t++),c+=this.NEPALI_CALENDAR_DATA[t][s];var u=this.NEPALI_CALENDAR_DATA[t][s]-(c-r);return this.newDate(t,s,u)},_createMissingCalendarData:function(L){var M=this.daysPerMonth.slice(0);M.unshift(17);for(var d=L-1;d"u"&&(this.NEPALI_CALENDAR_DATA[d]=M)},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]}}),A.calendars.nepali=o},1104:function(te,X,e){var A=e(38700),P=e(50896);function o(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"Persian",jdEpoch:19483205e-1,daysPerMonth:[31,31,31,31,31,31,30,30,30,30,30,29],hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Persian",epochs:["BP","AP"],monthNames:["Farvardin","Ordibehesht","Khordad","Tir","Mordad","Shahrivar","Mehr","Aban","Azar","Day","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Day","Bah","Esf"],dayNames:["Yekshambe","Doshambe","Seshambe","Chæharshambe","Panjshambe","Jom'e","Shambe"],dayNamesShort:["Yek","Do","Se","Chæ","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(M){var d=this._validate(M,this.minMonth,this.minDay,A.local.invalidYear);return((d.year()-(d.year()>0?474:473))%2820+474+38)*682%2816<682},weekOfYear:function(M,d,g){var r=this.newDate(M,d,g);return r.add(-((r.dayOfWeek()+1)%7),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInMonth:function(M,d){var g=this._validate(M,d,this.minDay,A.local.invalidMonth);return this.daysPerMonth[g.month()-1]+(g.month()===12&&this.leapYear(g.year())?1:0)},weekDay:function(M,d,g){return this.dayOfWeek(M,d,g)!==5},toJD:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate);M=r.year(),d=r.month(),g=r.day();var t=M-(M>=0?474:473),s=474+L(t,2820);return g+(d<=7?(d-1)*31:(d-1)*30+6)+Math.floor((s*682-110)/2816)+(s-1)*365+Math.floor(t/2820)*1029983+this.jdEpoch-1},fromJD:function(M){M=Math.floor(M)+.5;var d=M-this.toJD(475,1,1),g=Math.floor(d/1029983),r=L(d,1029983),t=2820;if(r!==1029982){var s=Math.floor(r/366),a=L(r,366);t=Math.floor((2134*s+2816*a+2815)/1028522)+s+1}var c=t+2820*g+474;c=c<=0?c-1:c;var u=M-this.toJD(c,1,1)+1,l=u<=186?Math.ceil(u/31):Math.ceil((u-6)/30),y=M-this.toJD(c,l,1)+1;return this.newDate(c,l,y)}});function L(M,d){return M-d*Math.floor(M/d)}A.calendars.persian=o,A.calendars.jalali=o},51456:function(te,X,e){var A=e(38700),P=e(50896),o=A.instance();function L(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}L.prototype=new A.baseCalendar,P(L.prototype,{name:"Taiwan",jdEpoch:24194025e-1,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(g){var d=this._validate(g,this.minMonth,this.minDay,A.local.invalidYear),g=this._t2gYear(d.year());return o.leapYear(g)},weekOfYear:function(t,d,g){var r=this._validate(t,this.minMonth,this.minDay,A.local.invalidYear),t=this._t2gYear(r.year());return o.weekOfYear(t,r.month(),r.day())},daysInMonth:function(M,d){var g=this._validate(M,d,this.minDay,A.local.invalidMonth);return this.daysPerMonth[g.month()-1]+(g.month()===2&&this.leapYear(g.year())?1:0)},weekDay:function(M,d,g){return(this.dayOfWeek(M,d,g)||7)<6},toJD:function(t,d,g){var r=this._validate(t,d,g,A.local.invalidDate),t=this._t2gYear(r.year());return o.toJD(t,r.month(),r.day())},fromJD:function(M){var d=o.fromJD(M),g=this._g2tYear(d.year());return this.newDate(g,d.month(),d.day())},_t2gYear:function(M){return M+this.yearsOffset+(M>=-this.yearsOffset&&M<=-1?1:0)},_g2tYear:function(M){return M-this.yearsOffset-(M>=1&&M<=this.yearsOffset?1:0)}}),A.calendars.taiwan=L},4592:function(te,X,e){var A=e(38700),P=e(50896),o=A.instance();function L(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}L.prototype=new A.baseCalendar,P(L.prototype,{name:"Thai",jdEpoch:15230985e-1,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(g){var d=this._validate(g,this.minMonth,this.minDay,A.local.invalidYear),g=this._t2gYear(d.year());return o.leapYear(g)},weekOfYear:function(t,d,g){var r=this._validate(t,this.minMonth,this.minDay,A.local.invalidYear),t=this._t2gYear(r.year());return o.weekOfYear(t,r.month(),r.day())},daysInMonth:function(M,d){var g=this._validate(M,d,this.minDay,A.local.invalidMonth);return this.daysPerMonth[g.month()-1]+(g.month()===2&&this.leapYear(g.year())?1:0)},weekDay:function(M,d,g){return(this.dayOfWeek(M,d,g)||7)<6},toJD:function(t,d,g){var r=this._validate(t,d,g,A.local.invalidDate),t=this._t2gYear(r.year());return o.toJD(t,r.month(),r.day())},fromJD:function(M){var d=o.fromJD(M),g=this._g2tYear(d.year());return this.newDate(g,d.month(),d.day())},_t2gYear:function(M){return M-this.yearsOffset-(M>=1&&M<=this.yearsOffset?1:0)},_g2tYear:function(M){return M+this.yearsOffset+(M>=-this.yearsOffset&&M<=-1?1:0)}}),A.calendars.thai=L},45348:function(te,X,e){var A=e(38700),P=e(50896);function o(M){this.local=this.regionalOptions[M||""]||this.regionalOptions[""]}o.prototype=new A.baseCalendar,P(o.prototype,{name:"UmmAlQura",hasYearZero:!1,minMonth:1,firstMonth:1,minDay:1,regionalOptions:{"":{name:"Umm al-Qura",epochs:["BH","AH"],monthNames:["Al-Muharram","Safar","Rabi' al-awwal","Rabi' Al-Thani","Jumada Al-Awwal","Jumada Al-Thani","Rajab","Sha'aban","Ramadan","Shawwal","Dhu al-Qi'dah","Dhu al-Hijjah"],monthNamesShort:["Muh","Saf","Rab1","Rab2","Jum1","Jum2","Raj","Sha'","Ram","Shaw","DhuQ","DhuH"],dayNames:["Yawm al-Ahad","Yawm al-Ithnain","Yawm al-Thalāthā’","Yawm al-Arba‘ā’","Yawm al-Khamīs","Yawm al-Jum‘a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(M){var d=this._validate(M,this.minMonth,this.minDay,A.local.invalidYear);return this.daysInYear(d.year())===355},weekOfYear:function(M,d,g){var r=this.newDate(M,d,g);return r.add(-r.dayOfWeek(),"d"),Math.floor((r.dayOfYear()-1)/7)+1},daysInYear:function(M){for(var d=0,g=1;g<=12;g++)d+=this.daysInMonth(M,g);return d},daysInMonth:function(M,d){for(var g=this._validate(M,d,this.minDay,A.local.invalidMonth),r=g.toJD()-24e5+.5,t=0,s=0;sr)return L[t]-L[t-1];t++}return 30},weekDay:function(M,d,g){return this.dayOfWeek(M,d,g)!==5},toJD:function(M,d,g){var r=this._validate(M,d,g,A.local.invalidDate),t=12*(r.year()-1)+r.month()-15292,s=r.day()+L[t-1]-1;return s+24e5-.5},fromJD:function(M){for(var d=M-24e5+.5,g=0,r=0;rd);r++)g++;var t=g+15292,s=Math.floor((t-1)/12),a=s+1,c=t-12*s,u=d-L[g-1]+1;return this.newDate(a,c,u)},isValid:function(M,d,g){var r=A.baseCalendar.prototype.isValid.apply(this,arguments);return r&&(M=M.year!=null?M.year:M,r=M>=1276&&M<=1500),r},_validate:function(M,d,g,r){var t=A.baseCalendar.prototype._validate.apply(this,arguments);if(t.year<1276||t.year>1500)throw r.replace(/\{0\}/,this.local.name);return t}}),A.calendars.ummalqura=o;var L=[20,50,79,109,138,168,197,227,256,286,315,345,374,404,433,463,492,522,551,581,611,641,670,700,729,759,788,818,847,877,906,936,965,995,1024,1054,1083,1113,1142,1172,1201,1231,1260,1290,1320,1350,1379,1409,1438,1468,1497,1527,1556,1586,1615,1645,1674,1704,1733,1763,1792,1822,1851,1881,1910,1940,1969,1999,2028,2058,2087,2117,2146,2176,2205,2235,2264,2294,2323,2353,2383,2413,2442,2472,2501,2531,2560,2590,2619,2649,2678,2708,2737,2767,2796,2826,2855,2885,2914,2944,2973,3003,3032,3062,3091,3121,3150,3180,3209,3239,3268,3298,3327,3357,3386,3416,3446,3476,3505,3535,3564,3594,3623,3653,3682,3712,3741,3771,3800,3830,3859,3889,3918,3948,3977,4007,4036,4066,4095,4125,4155,4185,4214,4244,4273,4303,4332,4362,4391,4421,4450,4480,4509,4539,4568,4598,4627,4657,4686,4716,4745,4775,4804,4834,4863,4893,4922,4952,4981,5011,5040,5070,5099,5129,5158,5188,5218,5248,5277,5307,5336,5366,5395,5425,5454,5484,5513,5543,5572,5602,5631,5661,5690,5720,5749,5779,5808,5838,5867,5897,5926,5956,5985,6015,6044,6074,6103,6133,6162,6192,6221,6251,6281,6311,6340,6370,6399,6429,6458,6488,6517,6547,6576,6606,6635,6665,6694,6724,6753,6783,6812,6842,6871,6901,6930,6960,6989,7019,7048,7078,7107,7137,7166,7196,7225,7255,7284,7314,7344,7374,7403,7433,7462,7492,7521,7551,7580,7610,7639,7669,7698,7728,7757,7787,7816,7846,7875,7905,7934,7964,7993,8023,8053,8083,8112,8142,8171,8201,8230,8260,8289,8319,8348,8378,8407,8437,8466,8496,8525,8555,8584,8614,8643,8673,8702,8732,8761,8791,8821,8850,8880,8909,8938,8968,8997,9027,9056,9086,9115,9145,9175,9205,9234,9264,9293,9322,9352,9381,9410,9440,9470,9499,9529,9559,9589,9618,9648,9677,9706,9736,9765,9794,9824,9853,9883,9913,9943,9972,10002,10032,10061,10090,10120,10149,10178,10208,10237,10267,10297,10326,10356,10386,10415,10445,10474,10504,10533,10562,10592,10621,10651,10680,10710,10740,10770,10799,10829,10858,10888,10917,10947,10976,11005,11035,11064,11094,11124,11153,11183,11213,11242,11272,11301,11331,11360,11389,11419,11448,11478,11507,11537,11567,11596,11626,11655,11685,11715,11744,11774,11803,11832,11862,11891,11921,11950,11980,12010,12039,12069,12099,12128,12158,12187,12216,12246,12275,12304,12334,12364,12393,12423,12453,12483,12512,12542,12571,12600,12630,12659,12688,12718,12747,12777,12807,12837,12866,12896,12926,12955,12984,13014,13043,13072,13102,13131,13161,13191,13220,13250,13280,13310,13339,13368,13398,13427,13456,13486,13515,13545,13574,13604,13634,13664,13693,13723,13752,13782,13811,13840,13870,13899,13929,13958,13988,14018,14047,14077,14107,14136,14166,14195,14224,14254,14283,14313,14342,14372,14401,14431,14461,14490,14520,14550,14579,14609,14638,14667,14697,14726,14756,14785,14815,14844,14874,14904,14933,14963,14993,15021,15051,15081,15110,15140,15169,15199,15228,15258,15287,15317,15347,15377,15406,15436,15465,15494,15524,15553,15582,15612,15641,15671,15701,15731,15760,15790,15820,15849,15878,15908,15937,15966,15996,16025,16055,16085,16114,16144,16174,16204,16233,16262,16292,16321,16350,16380,16409,16439,16468,16498,16528,16558,16587,16617,16646,16676,16705,16734,16764,16793,16823,16852,16882,16912,16941,16971,17001,17030,17060,17089,17118,17148,17177,17207,17236,17266,17295,17325,17355,17384,17414,17444,17473,17502,17532,17561,17591,17620,17650,17679,17709,17738,17768,17798,17827,17857,17886,17916,17945,17975,18004,18034,18063,18093,18122,18152,18181,18211,18241,18270,18300,18330,18359,18388,18418,18447,18476,18506,18535,18565,18595,18625,18654,18684,18714,18743,18772,18802,18831,18860,18890,18919,18949,18979,19008,19038,19068,19098,19127,19156,19186,19215,19244,19274,19303,19333,19362,19392,19422,19452,19481,19511,19540,19570,19599,19628,19658,19687,19717,19746,19776,19806,19836,19865,19895,19924,19954,19983,20012,20042,20071,20101,20130,20160,20190,20219,20249,20279,20308,20338,20367,20396,20426,20455,20485,20514,20544,20573,20603,20633,20662,20692,20721,20751,20780,20810,20839,20869,20898,20928,20957,20987,21016,21046,21076,21105,21135,21164,21194,21223,21253,21282,21312,21341,21371,21400,21430,21459,21489,21519,21548,21578,21607,21637,21666,21696,21725,21754,21784,21813,21843,21873,21902,21932,21962,21991,22021,22050,22080,22109,22138,22168,22197,22227,22256,22286,22316,22346,22375,22405,22434,22464,22493,22522,22552,22581,22611,22640,22670,22700,22730,22759,22789,22818,22848,22877,22906,22936,22965,22994,23024,23054,23083,23113,23143,23173,23202,23232,23261,23290,23320,23349,23379,23408,23438,23467,23497,23527,23556,23586,23616,23645,23674,23704,23733,23763,23792,23822,23851,23881,23910,23940,23970,23999,24029,24058,24088,24117,24147,24176,24206,24235,24265,24294,24324,24353,24383,24413,24442,24472,24501,24531,24560,24590,24619,24648,24678,24707,24737,24767,24796,24826,24856,24885,24915,24944,24974,25003,25032,25062,25091,25121,25150,25180,25210,25240,25269,25299,25328,25358,25387,25416,25446,25475,25505,25534,25564,25594,25624,25653,25683,25712,25742,25771,25800,25830,25859,25888,25918,25948,25977,26007,26037,26067,26096,26126,26155,26184,26214,26243,26272,26302,26332,26361,26391,26421,26451,26480,26510,26539,26568,26598,26627,26656,26686,26715,26745,26775,26805,26834,26864,26893,26923,26952,26982,27011,27041,27070,27099,27129,27159,27188,27218,27248,27277,27307,27336,27366,27395,27425,27454,27484,27513,27542,27572,27602,27631,27661,27691,27720,27750,27779,27809,27838,27868,27897,27926,27956,27985,28015,28045,28074,28104,28134,28163,28193,28222,28252,28281,28310,28340,28369,28399,28428,28458,28488,28517,28547,28577,28607,28636,28665,28695,28724,28754,28783,28813,28843,28872,28901,28931,28960,28990,29019,29049,29078,29108,29137,29167,29196,29226,29255,29285,29315,29345,29375,29404,29434,29463,29492,29522,29551,29580,29610,29640,29669,29699,29729,29759,29788,29818,29847,29876,29906,29935,29964,29994,30023,30053,30082,30112,30141,30171,30200,30230,30259,30289,30318,30348,30378,30408,30437,30467,30496,30526,30555,30585,30614,30644,30673,30703,30732,30762,30791,30821,30850,30880,30909,30939,30968,30998,31027,31057,31086,31116,31145,31175,31204,31234,31263,31293,31322,31352,31381,31411,31441,31471,31500,31530,31559,31589,31618,31648,31676,31706,31736,31766,31795,31825,31854,31884,31913,31943,31972,32002,32031,32061,32090,32120,32150,32180,32209,32239,32268,32298,32327,32357,32386,32416,32445,32475,32504,32534,32563,32593,32622,32652,32681,32711,32740,32770,32799,32829,32858,32888,32917,32947,32976,33006,33035,33065,33094,33124,33153,33183,33213,33243,33272,33302,33331,33361,33390,33420,33450,33479,33509,33539,33568,33598,33627,33657,33686,33716,33745,33775,33804,33834,33863,33893,33922,33952,33981,34011,34040,34069,34099,34128,34158,34187,34217,34247,34277,34306,34336,34365,34395,34424,34454,34483,34512,34542,34571,34601,34631,34660,34690,34719,34749,34778,34808,34837,34867,34896,34926,34955,34985,35015,35044,35074,35103,35133,35162,35192,35222,35251,35280,35310,35340,35370,35399,35429,35458,35488,35517,35547,35576,35605,35635,35665,35694,35723,35753,35782,35811,35841,35871,35901,35930,35960,35989,36019,36048,36078,36107,36136,36166,36195,36225,36254,36284,36314,36343,36373,36403,36433,36462,36492,36521,36551,36580,36610,36639,36669,36698,36728,36757,36786,36816,36845,36875,36904,36934,36963,36993,37022,37052,37081,37111,37141,37170,37200,37229,37259,37288,37318,37347,37377,37406,37436,37465,37495,37524,37554,37584,37613,37643,37672,37701,37731,37760,37790,37819,37849,37878,37908,37938,37967,37997,38027,38056,38085,38115,38144,38174,38203,38233,38262,38292,38322,38351,38381,38410,38440,38469,38499,38528,38558,38587,38617,38646,38676,38705,38735,38764,38794,38823,38853,38882,38912,38941,38971,39001,39030,39059,39089,39118,39148,39178,39208,39237,39267,39297,39326,39355,39385,39414,39444,39473,39503,39532,39562,39592,39621,39650,39680,39709,39739,39768,39798,39827,39857,39886,39916,39946,39975,40005,40035,40064,40094,40123,40153,40182,40212,40241,40271,40300,40330,40359,40389,40418,40448,40477,40507,40536,40566,40595,40625,40655,40685,40714,40744,40773,40803,40832,40862,40892,40921,40951,40980,41009,41039,41068,41098,41127,41157,41186,41216,41245,41275,41304,41334,41364,41393,41422,41452,41481,41511,41540,41570,41599,41629,41658,41688,41718,41748,41777,41807,41836,41865,41894,41924,41953,41983,42012,42042,42072,42102,42131,42161,42190,42220,42249,42279,42308,42337,42367,42397,42426,42456,42485,42515,42545,42574,42604,42633,42662,42692,42721,42751,42780,42810,42839,42869,42899,42929,42958,42988,43017,43046,43076,43105,43135,43164,43194,43223,43253,43283,43312,43342,43371,43401,43430,43460,43489,43519,43548,43578,43607,43637,43666,43696,43726,43755,43785,43814,43844,43873,43903,43932,43962,43991,44021,44050,44080,44109,44139,44169,44198,44228,44258,44287,44317,44346,44375,44405,44434,44464,44493,44523,44553,44582,44612,44641,44671,44700,44730,44759,44788,44818,44847,44877,44906,44936,44966,44996,45025,45055,45084,45114,45143,45172,45202,45231,45261,45290,45320,45350,45380,45409,45439,45468,45498,45527,45556,45586,45615,45644,45674,45704,45733,45763,45793,45823,45852,45882,45911,45940,45970,45999,46028,46058,46088,46117,46147,46177,46206,46236,46265,46295,46324,46354,46383,46413,46442,46472,46501,46531,46560,46590,46620,46649,46679,46708,46738,46767,46797,46826,46856,46885,46915,46944,46974,47003,47033,47063,47092,47122,47151,47181,47210,47240,47269,47298,47328,47357,47387,47417,47446,47476,47506,47535,47565,47594,47624,47653,47682,47712,47741,47771,47800,47830,47860,47890,47919,47949,47978,48008,48037,48066,48096,48125,48155,48184,48214,48244,48273,48303,48333,48362,48392,48421,48450,48480,48509,48538,48568,48598,48627,48657,48687,48717,48746,48776,48805,48834,48864,48893,48922,48952,48982,49011,49041,49071,49100,49130,49160,49189,49218,49248,49277,49306,49336,49365,49395,49425,49455,49484,49514,49543,49573,49602,49632,49661,49690,49720,49749,49779,49809,49838,49868,49898,49927,49957,49986,50016,50045,50075,50104,50133,50163,50192,50222,50252,50281,50311,50340,50370,50400,50429,50459,50488,50518,50547,50576,50606,50635,50665,50694,50724,50754,50784,50813,50843,50872,50902,50931,50960,50990,51019,51049,51078,51108,51138,51167,51197,51227,51256,51286,51315,51345,51374,51403,51433,51462,51492,51522,51552,51582,51611,51641,51670,51699,51729,51758,51787,51816,51846,51876,51906,51936,51965,51995,52025,52054,52083,52113,52142,52171,52200,52230,52260,52290,52319,52349,52379,52408,52438,52467,52497,52526,52555,52585,52614,52644,52673,52703,52733,52762,52792,52822,52851,52881,52910,52939,52969,52998,53028,53057,53087,53116,53146,53176,53205,53235,53264,53294,53324,53353,53383,53412,53441,53471,53500,53530,53559,53589,53619,53648,53678,53708,53737,53767,53796,53825,53855,53884,53913,53943,53973,54003,54032,54062,54092,54121,54151,54180,54209,54239,54268,54297,54327,54357,54387,54416,54446,54476,54505,54535,54564,54593,54623,54652,54681,54711,54741,54770,54800,54830,54859,54889,54919,54948,54977,55007,55036,55066,55095,55125,55154,55184,55213,55243,55273,55302,55332,55361,55391,55420,55450,55479,55508,55538,55567,55597,55627,55657,55686,55716,55745,55775,55804,55834,55863,55892,55922,55951,55981,56011,56040,56070,56100,56129,56159,56188,56218,56247,56276,56306,56335,56365,56394,56424,56454,56483,56513,56543,56572,56601,56631,56660,56690,56719,56749,56778,56808,56837,56867,56897,56926,56956,56985,57015,57044,57074,57103,57133,57162,57192,57221,57251,57280,57310,57340,57369,57399,57429,57458,57487,57517,57546,57576,57605,57634,57664,57694,57723,57753,57783,57813,57842,57871,57901,57930,57959,57989,58018,58048,58077,58107,58137,58167,58196,58226,58255,58285,58314,58343,58373,58402,58432,58461,58491,58521,58551,58580,58610,58639,58669,58698,58727,58757,58786,58816,58845,58875,58905,58934,58964,58994,59023,59053,59082,59111,59141,59170,59200,59229,59259,59288,59318,59348,59377,59407,59436,59466,59495,59525,59554,59584,59613,59643,59672,59702,59731,59761,59791,59820,59850,59879,59909,59939,59968,59997,60027,60056,60086,60115,60145,60174,60204,60234,60264,60293,60323,60352,60381,60411,60440,60469,60499,60528,60558,60588,60618,60648,60677,60707,60736,60765,60795,60824,60853,60883,60912,60942,60972,61002,61031,61061,61090,61120,61149,61179,61208,61237,61267,61296,61326,61356,61385,61415,61445,61474,61504,61533,61563,61592,61621,61651,61680,61710,61739,61769,61799,61828,61858,61888,61917,61947,61976,62006,62035,62064,62094,62123,62153,62182,62212,62242,62271,62301,62331,62360,62390,62419,62448,62478,62507,62537,62566,62596,62625,62655,62685,62715,62744,62774,62803,62832,62862,62891,62921,62950,62980,63009,63039,63069,63099,63128,63157,63187,63216,63246,63275,63305,63334,63363,63393,63423,63453,63482,63512,63541,63571,63600,63630,63659,63689,63718,63747,63777,63807,63836,63866,63895,63925,63955,63984,64014,64043,64073,64102,64131,64161,64190,64220,64249,64279,64309,64339,64368,64398,64427,64457,64486,64515,64545,64574,64603,64633,64663,64692,64722,64752,64782,64811,64841,64870,64899,64929,64958,64987,65017,65047,65076,65106,65136,65166,65195,65225,65254,65283,65313,65342,65371,65401,65431,65460,65490,65520,65549,65579,65608,65638,65667,65697,65726,65755,65785,65815,65844,65874,65903,65933,65963,65992,66022,66051,66081,66110,66140,66169,66199,66228,66258,66287,66317,66346,66376,66405,66435,66465,66494,66524,66553,66583,66612,66641,66671,66700,66730,66760,66789,66819,66849,66878,66908,66937,66967,66996,67025,67055,67084,67114,67143,67173,67203,67233,67262,67292,67321,67351,67380,67409,67439,67468,67497,67527,67557,67587,67617,67646,67676,67705,67735,67764,67793,67823,67852,67882,67911,67941,67971,68e3,68030,68060,68089,68119,68148,68177,68207,68236,68266,68295,68325,68354,68384,68414,68443,68473,68502,68532,68561,68591,68620,68650,68679,68708,68738,68768,68797,68827,68857,68886,68916,68946,68975,69004,69034,69063,69092,69122,69152,69181,69211,69240,69270,69300,69330,69359,69388,69418,69447,69476,69506,69535,69565,69595,69624,69654,69684,69713,69743,69772,69802,69831,69861,69890,69919,69949,69978,70008,70038,70067,70097,70126,70156,70186,70215,70245,70274,70303,70333,70362,70392,70421,70451,70481,70510,70540,70570,70599,70629,70658,70687,70717,70746,70776,70805,70835,70864,70894,70924,70954,70983,71013,71042,71071,71101,71130,71159,71189,71218,71248,71278,71308,71337,71367,71397,71426,71455,71485,71514,71543,71573,71602,71632,71662,71691,71721,71751,71781,71810,71839,71869,71898,71927,71957,71986,72016,72046,72075,72105,72135,72164,72194,72223,72253,72282,72311,72341,72370,72400,72429,72459,72489,72518,72548,72577,72607,72637,72666,72695,72725,72754,72784,72813,72843,72872,72902,72931,72961,72991,73020,73050,73080,73109,73139,73168,73197,73227,73256,73286,73315,73345,73375,73404,73434,73464,73493,73523,73552,73581,73611,73640,73669,73699,73729,73758,73788,73818,73848,73877,73907,73936,73965,73995,74024,74053,74083,74113,74142,74172,74202,74231,74261,74291,74320,74349,74379,74408,74437,74467,74497,74526,74556,74586,74615,74645,74675,74704,74733,74763,74792,74822,74851,74881,74910,74940,74969,74999,75029,75058,75088,75117,75147,75176,75206,75235,75264,75294,75323,75353,75383,75412,75442,75472,75501,75531,75560,75590,75619,75648,75678,75707,75737,75766,75796,75826,75856,75885,75915,75944,75974,76003,76032,76062,76091,76121,76150,76180,76210,76239,76269,76299,76328,76358,76387,76416,76446,76475,76505,76534,76564,76593,76623,76653,76682,76712,76741,76771,76801,76830,76859,76889,76918,76948,76977,77007,77036,77066,77096,77125,77155,77185,77214,77243,77273,77302,77332,77361,77390,77420,77450,77479,77509,77539,77569,77598,77627,77657,77686,77715,77745,77774,77804,77833,77863,77893,77923,77952,77982,78011,78041,78070,78099,78129,78158,78188,78217,78247,78277,78307,78336,78366,78395,78425,78454,78483,78513,78542,78572,78601,78631,78661,78690,78720,78750,78779,78808,78838,78867,78897,78926,78956,78985,79015,79044,79074,79104,79133,79163,79192,79222,79251,79281,79310,79340,79369,79399,79428,79458,79487,79517,79546,79576,79606,79635,79665,79695,79724,79753,79783,79812,79841,79871,79900,79930,79960,79990]},38700:function(te,X,e){var A=e(50896);function P(){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={}}A(P.prototype,{instance:function(r,t){r=(r||"gregorian").toLowerCase(),t=t||"";var s=this._localCals[r+"-"+t];if(!s&&this.calendars[r]&&(s=new this.calendars[r](t),this._localCals[r+"-"+t]=s),!s)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,r);return s},newDate:function(r,t,s,a,c){return a=(r!=null&&r.year?r.calendar():typeof a=="string"?this.instance(a,c):a)||this.instance(),a.newDate(r,t,s)},substituteDigits:function(r){return function(t){return(t+"").replace(/[0-9]/g,function(s){return r[s]})}},substituteChineseDigits:function(r,t){return function(s){for(var a="",c=0;s>0;){var u=s%10;a=(u===0?"":r[u]+t[c])+a,c++,s=Math.floor(s/10)}return a.indexOf(r[1]+t[1])===0&&(a=a.substr(1)),a||r[0]}}});function o(r,t,s,a){if(this._calendar=r,this._year=t,this._month=s,this._day=a,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(g.local.invalidDate||g.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function L(r,t){return r=""+r,"000000".substring(0,t-r.length)+r}A(o.prototype,{newDate:function(r,t,s){return this._calendar.newDate(r??this,t,s)},year:function(r){return arguments.length===0?this._year:this.set(r,"y")},month:function(r){return arguments.length===0?this._month:this.set(r,"m")},day:function(r){return arguments.length===0?this._day:this.set(r,"d")},date:function(r,t,s){if(!this._calendar.isValid(r,t,s))throw(g.local.invalidDate||g.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=r,this._month=t,this._day=s,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(r,t){return this._calendar.add(this,r,t)},set:function(r,t){return this._calendar.set(this,r,t)},compareTo:function(r){if(this._calendar.name!==r._calendar.name)throw(g.local.differentCalendars||g.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,r._calendar.local.name);var t=this._year!==r._year?this._year-r._year:this._month!==r._month?this.monthOfYear()-r.monthOfYear():this._day-r._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(r){return this._calendar.fromJD(r)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(r){return this._calendar.fromJSDate(r)},toString:function(){return(this.year()<0?"-":"")+L(Math.abs(this.year()),4)+"-"+L(this.month(),2)+"-"+L(this.day(),2)}});function M(){this.shortYearCutoff="+10"}A(M.prototype,{_validateLevel:0,newDate:function(r,t,s){return r==null?this.today():(r.year&&(this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate),s=r.day(),t=r.month(),r=r.year()),new o(this,r,t,s))},today:function(){return this.fromJSDate(new Date)},epoch:function(r){var t=this._validate(r,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+L(Math.abs(t.year()),4)},monthsInYear:function(r){return this._validate(r,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear),12},monthOfYear:function(r,t){var s=this._validate(r,t,this.minDay,g.local.invalidMonth||g.regionalOptions[""].invalidMonth);return(s.month()+this.monthsInYear(s)-this.firstMonth)%this.monthsInYear(s)+this.minMonth},fromMonthOfYear:function(r,t){var s=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(r)+this.minMonth;return this._validate(r,s,this.minDay,g.local.invalidMonth||g.regionalOptions[""].invalidMonth),s},daysInYear:function(r){var t=this._validate(r,this.minMonth,this.minDay,g.local.invalidYear||g.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(r,t,s){var a=this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate);return a.toJD()-this.newDate(a.year(),this.fromMonthOfYear(a.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(r,t,s){var a=this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(a))+2)%this.daysInWeek()},extraInfo:function(r,t,s){return this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate),{}},add:function(r,t,s){return this._validate(r,this.minMonth,this.minDay,g.local.invalidDate||g.regionalOptions[""].invalidDate),this._correctAdd(r,this._add(r,t,s),t,s)},_add:function(r,t,s){if(this._validateLevel++,s==="d"||s==="w"){var a=r.toJD()+t*(s==="w"?this.daysInWeek():1),c=r.calendar().fromJD(a);return this._validateLevel--,[c.year(),c.month(),c.day()]}try{var u=r.year()+(s==="y"?t:0),l=r.monthOfYear()+(s==="m"?t:0),c=r.day(),y=function(f){for(;ln-1+f.minMonth;)u++,l-=n,n=f.monthsInYear(u)};s==="y"?(r.month()!==this.fromMonthOfYear(u,l)&&(l=this.newDate(u,r.month(),this.minDay).monthOfYear()),l=Math.min(l,this.monthsInYear(u)),c=Math.min(c,this.daysInMonth(u,this.fromMonthOfYear(u,l)))):s==="m"&&(y(this),c=Math.min(c,this.daysInMonth(u,this.fromMonthOfYear(u,l))));var h=[u,this.fromMonthOfYear(u,l),c];return this._validateLevel--,h}catch(T){throw this._validateLevel--,T}},_correctAdd:function(r,t,s,a){if(!this.hasYearZero&&(a==="y"||a==="m")&&(t[0]===0||r.year()>0!=t[0]>0)){var c={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[a],u=s<0?-1:1;t=this._add(r,s*c[0]+u*c[1],c[2])}return r.date(t[0],t[1],t[2])},set:function(r,t,s){this._validate(r,this.minMonth,this.minDay,g.local.invalidDate||g.regionalOptions[""].invalidDate);var a=s==="y"?t:r.year(),c=s==="m"?t:r.month(),u=s==="d"?t:r.day();return(s==="y"||s==="m")&&(u=Math.min(u,this.daysInMonth(a,c))),r.date(a,c,u)},isValid:function(r,t,s){this._validateLevel++;var a=this.hasYearZero||r!==0;if(a){var c=this.newDate(r,t,this.minDay);a=t>=this.minMonth&&t-this.minMonth=this.minDay&&s-this.minDay13.5?13:1),T=c-(h>2.5?4716:4715);return T<=0&&T--,this.newDate(T,h,y)},toJSDate:function(r,t,s){var a=this._validate(r,t,s,g.local.invalidDate||g.regionalOptions[""].invalidDate),c=new Date(a.year(),a.month()-1,a.day());return c.setHours(0),c.setMinutes(0),c.setSeconds(0),c.setMilliseconds(0),c.setHours(c.getHours()>12?c.getHours()+2:0),c},fromJSDate:function(r){return this.newDate(r.getFullYear(),r.getMonth()+1,r.getDate())}});var g=te.exports=new P;g.cdate=o,g.baseCalendar=M,g.calendars.gregorian=d},15168:function(te,X,e){var A=e(50896),P=e(38700);A(P.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"}),P.local=P.regionalOptions[""],A(P.cdate.prototype,{formatDate:function(o,L){return typeof o!="string"&&(L=o,o=""),this._calendar.formatDate(o||"",this,L)}}),A(P.baseCalendar.prototype,{UNIX_EPOCH:P.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:86400,TICKS_EPOCH:P.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(o,L,M){if(typeof o!="string"&&(M=L,L=o,o=""),!L)return"";if(L.calendar()!==this)throw P.local.invalidFormat||P.regionalOptions[""].invalidFormat;o=o||this.local.dateFormat,M=M||{};var d=M.dayNamesShort||this.local.dayNamesShort,g=M.dayNames||this.local.dayNames,r=M.monthNumbers||this.local.monthNumbers,t=M.monthNamesShort||this.local.monthNamesShort,s=M.monthNames||this.local.monthNames;M.calculateWeek||this.local.calculateWeek;for(var a=function(b,E){for(var p=1;m+p1},c=function(b,E,p,S){var w=""+E;if(a(b,S))for(;w.length1},m=function(I,B){var _=v(I,B),z=[2,3,_?4:2,_?4:2,10,11,20]["oyYJ@!".indexOf(I)+1],O=new RegExp("^-?\\d{1,"+z+"}"),F=L.substring(i).match(O);if(!F)throw(P.local.missingNumberAt||P.regionalOptions[""].missingNumberAt).replace(/\{0\}/,i);return i+=F[0].length,parseInt(F[0],10)},b=this,E=function(){if(typeof s=="function"){v("m");var I=s.call(b,L.substring(i));return i+=I.length,I}return m("m")},p=function(I,B,_,z){for(var O=v(I,z)?_:B,F=0;F-1){y=1,h=T;for(var k=this.daysInMonth(l,y);h>k;k=this.daysInMonth(l,y))y++,h-=k}return u>-1?this.fromJD(u):this.newDate(l,y,h)},determineDate:function(o,L,M,d,g){M&&typeof M!="object"&&(g=d,d=M,M=null),typeof d!="string"&&(g=d,d="");var r=this,t=function(s){try{return r.parseDate(d,s,g)}catch{}s=s.toLowerCase();for(var a=(s.match(/^c/)&&M?M.newDate():null)||r.today(),c=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,u=c.exec(s);u;)a.add(parseInt(u[1],10),u[2]||"d"),u=c.exec(s);return a};return L=L?L.newDate():null,o=o==null?L:typeof o=="string"?t(o):typeof o=="number"?isNaN(o)||o===1/0||o===-1/0?L:r.today().add(o,"d"):r.newDate(o),o}})},21576:function(){},19768:function(){},63436:function(te,X,e){var A=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],P=typeof globalThis>"u"?e.g:globalThis;te.exports=function(){for(var L=[],M=0;M>8&15|Se>>4&240,Se>>4&15|Se&240,(Se&15)<<4|Se&15,1):_e===8?E(Se>>24&255,Se>>16&255,Se>>8&255,(Se&255)/255):_e===4?E(Se>>12&15|Se>>8&240,Se>>8&15|Se>>4&240,Se>>4&15|Se&240,((Se&15)<<4|Se&15)/255):null):(Se=s.exec(ye))?new w(Se[1],Se[2],Se[3],1):(Se=a.exec(ye))?new w(Se[1]*255/100,Se[2]*255/100,Se[3]*255/100,1):(Se=c.exec(ye))?E(Se[1],Se[2],Se[3],Se[4]):(Se=u.exec(ye))?E(Se[1]*255/100,Se[2]*255/100,Se[3]*255/100,Se[4]):(Se=l.exec(ye))?_(Se[1],Se[2]/100,Se[3]/100,1):(Se=y.exec(ye))?_(Se[1],Se[2]/100,Se[3]/100,Se[4]):h.hasOwnProperty(ye)?b(h[ye]):ye==="transparent"?new w(NaN,NaN,NaN,0):null}function b(ye){return new w(ye>>16&255,ye>>8&255,ye&255,1)}function E(ye,Se,_e,ze){return ze<=0&&(ye=Se=_e=NaN),new w(ye,Se,_e,ze)}function p(ye){return ye instanceof o||(ye=m(ye)),ye?(ye=ye.rgb(),new w(ye.r,ye.g,ye.b,ye.opacity)):new w}function S(ye,Se,_e,ze){return arguments.length===1?p(ye):new w(ye,Se,_e,ze??1)}function w(ye,Se,_e,ze){this.r=+ye,this.g=+Se,this.b=+_e,this.opacity=+ze}A(w,S,P(o,{brighter:function(Se){return Se=Se==null?M:Math.pow(M,Se),new w(this.r*Se,this.g*Se,this.b*Se,this.opacity)},darker:function(Se){return Se=Se==null?L:Math.pow(L,Se),new w(this.r*Se,this.g*Se,this.b*Se,this.opacity)},rgb:function(){return this},clamp:function(){return new w(I(this.r),I(this.g),I(this.b),k(this.opacity))},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:i,formatHex:i,formatHex8:C,formatRgb:x,toString:x}));function i(){return"#".concat(B(this.r)).concat(B(this.g)).concat(B(this.b))}function C(){return"#".concat(B(this.r)).concat(B(this.g)).concat(B(this.b)).concat(B((isNaN(this.opacity)?1:this.opacity)*255))}function x(){var ye=k(this.opacity);return"".concat(ye===1?"rgb(":"rgba(").concat(I(this.r),", ").concat(I(this.g),", ").concat(I(this.b)).concat(ye===1?")":", ".concat(ye,")"))}function k(ye){return isNaN(ye)?1:Math.max(0,Math.min(1,ye))}function I(ye){return Math.max(0,Math.min(255,Math.round(ye)||0))}function B(ye){return ye=I(ye),(ye<16?"0":"")+ye.toString(16)}function _(ye,Se,_e,ze){return ze<=0?ye=Se=_e=NaN:_e<=0||_e>=1?ye=Se=NaN:Se<=0&&(ye=NaN),new F(ye,Se,_e,ze)}function z(ye){if(ye instanceof F)return new F(ye.h,ye.s,ye.l,ye.opacity);if(ye instanceof o||(ye=m(ye)),!ye)return new F;if(ye instanceof F)return ye;ye=ye.rgb();var Se=ye.r/255,_e=ye.g/255,ze=ye.b/255,Ie=Math.min(Se,_e,ze),Ne=Math.max(Se,_e,ze),et=NaN,st=Ne-Ie,Ze=(Ne+Ie)/2;return st?(Se===Ne?et=(_e-ze)/st+(_e0&&Ze<1?0:et,new F(et,st,Ze,ye.opacity)}function O(ye,Se,_e,ze){return arguments.length===1?z(ye):new F(ye,Se,_e,ze??1)}function F(ye,Se,_e,ze){this.h=+ye,this.s=+Se,this.l=+_e,this.opacity=+ze}A(F,O,P(o,{brighter:function(Se){return Se=Se==null?M:Math.pow(M,Se),new F(this.h,this.s,this.l*Se,this.opacity)},darker:function(Se){return Se=Se==null?L:Math.pow(L,Se),new F(this.h,this.s,this.l*Se,this.opacity)},rgb:function(){var Se=this.h%360+(this.h<0)*360,_e=isNaN(Se)||isNaN(this.s)?0:this.s,ze=this.l,Ie=ze+(ze<.5?ze:1-ze)*_e,Ne=2*ze-Ie;return new w(j(Se>=240?Se-240:Se+120,Ne,Ie),j(Se,Ne,Ie),j(Se<120?Se+240:Se-120,Ne,Ie),this.opacity)},clamp:function(){return new F(N(this.h),V(this.s),V(this.l),k(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 Se=k(this.opacity);return"".concat(Se===1?"hsl(":"hsla(").concat(N(this.h),", ").concat(V(this.s)*100,"%, ").concat(V(this.l)*100,"%").concat(Se===1?")":", ".concat(Se,")"))}}));function N(ye){return ye=(ye||0)%360,ye<0?ye+360:ye}function V(ye){return Math.max(0,Math.min(1,ye||0))}function j(ye,Se,_e){return(ye<60?Se+(_e-Se)*ye/60:ye<180?_e:ye<240?Se+(_e-Se)*(240-ye)/60:Se)*255}var $=function(ye){return function(){return ye}};function q(ye,Se){return function(_e){return ye+_e*Se}}function oe(ye,Se,_e){return ye=Math.pow(ye,_e),Se=Math.pow(Se,_e)-ye,_e=1/_e,function(ze){return Math.pow(ye+ze*Se,_e)}}function Z(ye){return(ye=+ye)==1?G:function(Se,_e){return _e-Se?oe(Se,_e,ye):$(isNaN(Se)?_e:Se)}}function G(ye,Se){var _e=Se-ye;return _e?q(ye,_e):$(isNaN(ye)?Se:ye)}var re=function ye(Se){var _e=Z(Se);function ze(Ie,Ne){var et=_e((Ie=S(Ie)).r,(Ne=S(Ne)).r),st=_e(Ie.g,Ne.g),Ze=_e(Ie.b,Ne.b),Ke=G(Ie.opacity,Ne.opacity);return function(nt){return Ie.r=et(nt),Ie.g=st(nt),Ie.b=Ze(nt),Ie.opacity=Ke(nt),Ie+""}}return ze.gamma=ye,ze}(1);function H(ye,Se){var _e=Se?Se.length:0,ze=ye?Math.min(_e,ye.length):0,Ie=new Array(ze),Ne=new Array(_e),et;for(et=0;et_e&&(Ne=Se.slice(_e,Ne),st[et]?st[et]+=Ne:st[++et]=Ne),(ze=ze[0])===(Ie=Ie[0])?st[et]?st[et]+=Ie:st[++et]=Ie:(st[++et]=null,Ze.push({i:et,x:ae(ze,Ie)})),_e=ne.lastIndex;return _e