/** * plotly.js v4.0.0 * Copyright 2012-2026, Plotly, Inc. * All rights reserved. * Licensed under the MIT license */ ( function(root, factory) { if (typeof module === "object" && module.exports) { module.exports = factory(); } else { root.moduleName = factory(); } } (typeof self !== "undefined" ? self : this, () => { "use strict";var Plotly=(()=>{var bat=Object.create;var T4=Object.defineProperty,wat=Object.defineProperties,Tat=Object.getOwnPropertyDescriptor,Aat=Object.getOwnPropertyDescriptors,Mat=Object.getOwnPropertyNames,YS=Object.getOwnPropertySymbols,Sat=Object.getPrototypeOf,GI=Object.prototype.hasOwnProperty,Ste=Object.prototype.propertyIsEnumerable;var VI=(e,t)=>(t=Symbol[e])?t:Symbol.for("Symbol."+e),Eat=e=>{throw TypeError(e)};var Mte=(e,t,r)=>t in e?T4(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,zo=(e,t)=>{for(var r in t||(t={}))GI.call(t,r)&&Mte(e,r,t[r]);if(YS)for(var r of YS(t))Ste.call(t,r)&&Mte(e,r,t[r]);return e},tl=(e,t)=>wat(e,Aat(t));var Ete=(e,t)=>{var r={};for(var n in e)GI.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&YS)for(var n of YS(e))t.indexOf(n)<0&&Ste.call(e,n)&&(r[n]=e[n]);return r};var Co=(e,t,r)=>()=>{if(r)throw r[0];try{return e&&(t=e(e=0)),t}catch(n){throw r=[n],n}};var fe=(e,t)=>()=>{try{return t||e((t={exports:{}}).exports,t),t.exports}catch(r){throw t=0,r}},zp=(e,t)=>{for(var r in t)T4(e,r,{get:t[r],enumerable:!0})},kte=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Mat(t))!GI.call(e,a)&&a!==r&&T4(e,a,{get:()=>t[a],enumerable:!(n=Tat(t,a))||n.enumerable});return e};var $0=(e,t,r)=>(r=e!=null?bat(Sat(e)):{},kte(t||!e||!e.__esModule?T4(r,"default",{value:e,enumerable:!0}):r,e)),Gs=e=>kte(T4({},"__esModule",{value:!0}),e);var kat=function(e,t){this[0]=e,this[1]=t};var Cte=e=>{var t=e[VI("asyncIterator")],r=!1,n,a={};return t==null?(t=e[VI("iterator")](),n=i=>a[i]=o=>t[i](o)):(t=t.call(e),n=i=>a[i]=o=>{if(r){if(r=!1,i==="throw")throw o;return o}return r=!0,{done:!1,value:new kat(new Promise(s=>{var l=t[i](o);l instanceof Object||Eat("Object expected"),s(l)}),1)}}),a[VI("iterator")]=()=>a,n("next"),"throw"in t?n("throw"):a.throw=i=>{throw i},"return"in t&&n("return"),a};var A4=fe(Lte=>{"use strict";Lte.version="4.0.0"});var Fte=fe((Pte,XS)=>{(function(t,r,n){r[t]=r[t]||n(),typeof XS!="undefined"&&XS.exports&&(XS.exports=r[t])})("Promise",typeof window!="undefined"?window:Pte,function(){"use strict";var t,r,n,a=Object.prototype.toString,i=typeof setImmediate!="undefined"?function(C){return setImmediate(C)}:setTimeout;try{Object.defineProperty({},"x",{}),t=function(C,k,S,L){return Object.defineProperty(C,k,{value:S,writable:!0,configurable:L!==!1})}}catch(y){t=function(k,S,L){return k[S]=L,k}}n=(function(){var C,k,S;function L(w,A){this.fn=w,this.self=A,this.next=void 0}return{add:function(A,T){S=new L(A,T),k?k.next=S:C=S,k=S,S=void 0},drain:function(){var A=C;for(C=k=r=void 0;A;)A.fn.call(A.self),A=A.next}}})();function o(y,C){n.add(y,C),r||(r=i(n.drain))}function s(y){var C,k=typeof y;return y!=null&&(k=="object"||k=="function")&&(C=y.then),typeof C=="function"?C:!1}function l(){for(var y=0;y0&&o(l,k))}catch(S){f.call(new g(k),S)}}}function f(y){var C=this;C.triggered||(C.triggered=!0,C.def&&(C=C.def),C.msg=y,C.state=2,C.chain.length>0&&o(l,C))}function v(y,C,k,S){for(var L=0;L{(function(){var e={version:"3.8.2"},t=[].slice,r=function(W){return t.call(W)},n=self.document;function a(W){return W&&(W.ownerDocument||W.document||W).documentElement}function i(W){return W&&(W.ownerDocument&&W.ownerDocument.defaultView||W.document&&W||W.defaultView)}if(n)try{r(n.documentElement.childNodes)[0].nodeType}catch(W){r=function(te){for(var ve=te.length,Se=new Array(ve);ve--;)Se[ve]=te[ve];return Se}}if(Date.now||(Date.now=function(){return+new Date}),n)try{n.createElement("DIV").style.setProperty("opacity",0,"")}catch(W){var o=this.Element.prototype,s=o.setAttribute,l=o.setAttributeNS,u=this.CSSStyleDeclaration.prototype,c=u.setProperty;o.setAttribute=function(te,ve){s.call(this,te,ve+"")},o.setAttributeNS=function(te,ve,Se){l.call(this,te,ve,Se+"")},u.setProperty=function(te,ve,Se){c.call(this,te,ve+"",Se)}}e.ascending=f;function f(W,te){return Wte?1:W>=te?0:NaN}e.descending=function(W,te){return teW?1:te>=W?0:NaN},e.min=function(W,te){var ve=-1,Se=W.length,Ee,Re;if(arguments.length===1){for(;++ve=Re){Ee=Re;break}for(;++veRe&&(Ee=Re)}else{for(;++ve=Re){Ee=Re;break}for(;++veRe&&(Ee=Re)}return Ee},e.max=function(W,te){var ve=-1,Se=W.length,Ee,Re;if(arguments.length===1){for(;++ve=Re){Ee=Re;break}for(;++veEe&&(Ee=Re)}else{for(;++ve=Re){Ee=Re;break}for(;++veEe&&(Ee=Re)}return Ee},e.extent=function(W,te){var ve=-1,Se=W.length,Ee,Re,rt;if(arguments.length===1){for(;++ve=Re){Ee=rt=Re;break}for(;++veRe&&(Ee=Re),rt=Re){Ee=rt=Re;break}for(;++veRe&&(Ee=Re),rt1)return rt/(pt-1)},e.deviation=function(){var W=e.variance.apply(this,arguments);return W&&Math.sqrt(W)};function p(W){return{left:function(te,ve,Se,Ee){for(arguments.length<3&&(Se=0),arguments.length<4&&(Ee=te.length);Se>>1;W(te[Re],ve)<0?Se=Re+1:Ee=Re}return Se},right:function(te,ve,Se,Ee){for(arguments.length<3&&(Se=0),arguments.length<4&&(Ee=te.length);Se>>1;W(te[Re],ve)>0?Ee=Re:Se=Re+1}return Se}}}var x=p(f);e.bisectLeft=x.left,e.bisect=e.bisectRight=x.right,e.bisector=function(W){return p(W.length===1?function(te,ve){return f(W(te),ve)}:W)},e.shuffle=function(W,te,ve){(Se=arguments.length)<3&&(ve=W.length,Se<2&&(te=0));for(var Se=ve-te,Ee,Re;Se;)Re=Math.random()*Se--|0,Ee=W[Se+te],W[Se+te]=W[Re+te],W[Re+te]=Ee;return W},e.permute=function(W,te){for(var ve=te.length,Se=new Array(ve);ve--;)Se[ve]=W[te[ve]];return Se},e.pairs=function(W){for(var te=0,ve=W.length-1,Se,Ee=W[0],Re=new Array(ve<0?0:ve);te=0;)for(rt=W[te],ve=rt.length;--ve>=0;)Re[--Ee]=rt[ve];return Re};var y=Math.abs;e.range=function(W,te,ve){if(arguments.length<3&&(ve=1,arguments.length<2&&(te=W,W=0)),(te-W)/ve===1/0)throw new Error("infinite range");var Se=[],Ee=C(y(ve)),Re=-1,rt;if(W*=Ee,te*=Ee,ve*=Ee,ve<0)for(;(rt=W+ve*++Re)>te;)Se.push(rt/Ee);else for(;(rt=W+ve*++Re)=te.length)return Ee?Ee.call(W,pt):Se?pt.sort(Se):pt;for(var Rt=-1,ir=pt.length,nr=te[Ft++],Cr,Vr,sr,br=new S,kr;++Rt=te.length)return He;var Ft=[],Rt=ve[pt++];return He.forEach(function(ir,nr){Ft.push({key:ir,values:rt(nr,pt)})}),Rt?Ft.sort(function(ir,nr){return Rt(ir.key,nr.key)}):Ft}return W.map=function(He,pt){return Re(pt,He,0)},W.entries=function(He){return rt(Re(e.map,He,0),0)},W.key=function(He){return te.push(He),W},W.sortKeys=function(He){return ve[te.length-1]=He,W},W.sortValues=function(He){return Se=He,W},W.rollup=function(He){return Ee=He,W},W},e.set=function(W){var te=new B;if(W)for(var ve=0,Se=W.length;ve=0&&(Se=W.slice(ve+1),W=W.slice(0,ve)),W)return arguments.length<2?this[W].on(Se):this[W].on(Se,te);if(arguments.length===2){if(te==null)for(W in this)this.hasOwnProperty(W)&&this[W].on(Se,null);return this}};function ee(W){var te=[],ve=new S;function Se(){for(var Ee=te,Re=-1,rt=Ee.length,He;++Re=0&&(ve=W.slice(0,te))!=="xmlns"&&(W=W.slice(te+1)),De.hasOwnProperty(ve)?{space:De[ve],local:W}:W}},ie.attr=function(W,te){if(arguments.length<2){if(typeof W=="string"){var ve=this.node();return W=e.ns.qualify(W),W.local?ve.getAttributeNS(W.space,W.local):ve.getAttribute(W)}for(te in W)this.each(Ge(te,W[te]));return this}return this.each(Ge(W,te))};function Ge(W,te){W=e.ns.qualify(W);function ve(){this.removeAttribute(W)}function Se(){this.removeAttributeNS(W.space,W.local)}function Ee(){this.setAttribute(W,te)}function Re(){this.setAttributeNS(W.space,W.local,te)}function rt(){var pt=te.apply(this,arguments);pt==null?this.removeAttribute(W):this.setAttribute(W,pt)}function He(){var pt=te.apply(this,arguments);pt==null?this.removeAttributeNS(W.space,W.local):this.setAttributeNS(W.space,W.local,pt)}return te==null?W.local?Se:ve:typeof te=="function"?W.local?He:rt:W.local?Re:Ee}function ht(W){return W.trim().replace(/\s+/g," ")}ie.classed=function(W,te){if(arguments.length<2){if(typeof W=="string"){var ve=this.node(),Se=(W=Oe(W)).length,Ee=-1;if(te=ve.classList){for(;++Ee=0;)(Re=ve[Se])&&(Ee&&Ee!==Re.nextSibling&&Ee.parentNode.insertBefore(Re,Ee),Ee=Re);return this},ie.sort=function(W){W=Ve.apply(this,arguments);for(var te=-1,ve=this.length;++te=te&&(te=Ee+1);!(pt=rt[te])&&++te0&&(W=W.slice(0,Ee));var rt=mt.get(W);rt&&(W=rt,Re=Yt);function He(){var Rt=this[Se];Rt&&(this.removeEventListener(W,Rt,Rt.$),delete this[Se])}function pt(){var Rt=Re(te,r(arguments));He.call(this),this.addEventListener(W,this[Se]=Rt,Rt.$=ve),Rt._=te}function Ft(){var Rt=new RegExp("^__on([^.]+)"+e.requote(W)+"$"),ir;for(var nr in this)if(ir=nr.match(Rt)){var Cr=this[nr];this.removeEventListener(ir[1],Cr,Cr.$),delete this[nr]}}return Ee?te?pt:He:te?U:Ft}var mt=e.map({mouseenter:"mouseover",mouseleave:"mouseout"});n&&mt.forEach(function(W){"on"+W in n&&mt.remove(W)});function bt(W,te){return function(ve){var Se=e.event;e.event=ve,te[0]=this.__data__;try{W.apply(this,te)}finally{e.event=Se}}}function Yt(W,te){var ve=bt(W,te);return function(Se){var Ee=this,Re=Se.relatedTarget;(!Re||Re!==Ee&&!(Re.compareDocumentPosition(Ee)&8))&&ve.call(Ee,Se)}}var jt,mr=0;function or(W){var te=".dragsuppress-"+ ++mr,ve="click"+te,Se=e.select(i(W)).on("touchmove"+te,ce).on("dragstart"+te,ce).on("selectstart"+te,ce);if(jt==null&&(jt="onselectstart"in W?!1:j(W.style,"userSelect")),jt){var Ee=a(W).style,Re=Ee[jt];Ee[jt]="none"}return function(rt){if(Se.on(te,null),jt&&(Ee[jt]=Re),rt){var He=function(){Se.on(ve,null)};Se.on(ve,function(){ce(),He()},!0),setTimeout(He,0)}}}e.mouse=function(W){return Ot(W,ye())};var fr=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Ot(W,te){te.changedTouches&&(te=te.changedTouches[0]);var ve=W.ownerSVGElement||W;if(ve.createSVGPoint){var Se=ve.createSVGPoint();if(fr<0){var Ee=i(W);if(Ee.scrollX||Ee.scrollY){ve=e.select("body").append("svg").style({position:"absolute",top:0,left:0,margin:0,padding:0,border:"none"},"important");var Re=ve[0][0].getScreenCTM();fr=!(Re.f||Re.e),ve.remove()}}return fr?(Se.x=te.pageX,Se.y=te.pageY):(Se.x=te.clientX,Se.y=te.clientY),Se=Se.matrixTransform(W.getScreenCTM().inverse()),[Se.x,Se.y]}var rt=W.getBoundingClientRect();return[te.clientX-rt.left-W.clientLeft,te.clientY-rt.top-W.clientTop]}e.touch=function(W,te,ve){if(arguments.length<3&&(ve=te,te=ye().changedTouches),te){for(var Se=0,Ee=te.length,Re;Se0?1:W<0?-1:0}function Kr(W,te,ve){return(te[0]-W[0])*(ve[1]-W[1])-(te[1]-W[1])*(ve[0]-W[0])}function Nr(W){return W>1?0:W<-1?Tt:Math.acos(W)}function dn(W){return W>1?ft:W<-1?-ft:Math.asin(W)}function xr(W){return((W=Math.exp(W))-1/W)/2}function Fr(W){return((W=Math.exp(W))+1/W)/2}function Zr(W){return((W=Math.exp(2*W))-1)/(W+1)}function Cn(W){return(W=Math.sin(W/2))*W}var Dt=Math.SQRT2,At=2,Vt=4;e.interpolateZoom=function(W,te){var ve=W[0],Se=W[1],Ee=W[2],Re=te[0],rt=te[1],He=te[2],pt=Re-ve,Ft=rt-Se,Rt=pt*pt+Ft*Ft,ir,nr;if(Rt0&&($=$.transition().duration(rt)),$.call(Wr.event)}function Mi(){br&&br.domain(sr.range().map(function($){return($-W.x)/W.k}).map(sr.invert)),Gr&&Gr.domain(kr.range().map(function($){return($-W.y)/W.k}).map(kr.invert))}function Si($){He++||$({type:"zoomstart"})}function ya($){Mi(),$({type:"zoom",scale:W.k,translate:[W.x,W.y]})}function Y($){--He||($({type:"zoomend"}),ve=null)}function d(){var $=this,se=Vr.of($,arguments),de=0,Ae=e.select(i($)).on(Ft,Ye).on(Rt,st),Fe=Ar(e.mouse($)),Ie=or($);ua.call($),Si(se);function Ye(){de=1,Zn(e.mouse($),Fe),ya(se)}function st(){Ae.on(Ft,null).on(Rt,null),Ie(de),Y(se)}}function P(){var $=this,se=Vr.of($,arguments),de={},Ae=0,Fe,Ie=".zoom-"+e.event.changedTouches[0].identifier,Ye="touchmove"+Ie,st="touchend"+Ie,dt=[],Pe=e.select($),Xe=or($);xt(),Si(se),Pe.on(pt,null).on(nr,xt);function at(){var St=e.touches($);return Fe=W.k,St.forEach(function(Pt){Pt.identifier in de&&(de[Pt.identifier]=Ar(Pt))}),St}function xt(){var St=e.event.target;e.select(St).on(Ye,Et).on(st,Bt),dt.push(St);for(var Pt=e.event.changedTouches,$t=0,Ht=Pt.length;$t1){var Or=dr[0],$r=dr[1],Er=Or[0]-$r[0],Tr=Or[1]-$r[1];Ae=Er*Er+Tr*Tr}}function Et(){var St=e.touches($),Pt,$t,Ht,dr;ua.call($);for(var Xr=0,Or=St.length;Xr1?1:te,ve=ve<0?0:ve>1?1:ve,Ee=ve<=.5?ve*(1+te):ve+te-ve*te,Se=2*ve-Ee;function Re(He){return He>360?He-=360:He<0&&(He+=360),He<60?Se+(Ee-Se)*He/60:He<180?Ee:He<240?Se+(Ee-Se)*(240-He)/60:Se}function rt(He){return Math.round(Re(He)*255)}return new ao(rt(W+120),rt(W),rt(W-120))}e.hcl=Jn;function Jn(W,te,ve){return this instanceof Jn?(this.h=+W,this.c=+te,void(this.l=+ve)):arguments.length<2?W instanceof Jn?new Jn(W.h,W.c,W.l):W instanceof ra?ss(W.l,W.a,W.b):ss((W=Af((W=e.rgb(W)).r,W.g,W.b)).l,W.a,W.b):new Jn(W,te,ve)}var Ii=Jn.prototype=new rn;Ii.brighter=function(W){return new Jn(this.h,this.c,Math.min(100,this.l+ha*(arguments.length?W:1)))},Ii.darker=function(W){return new Jn(this.h,this.c,Math.max(0,this.l-ha*(arguments.length?W:1)))},Ii.rgb=function(){return Vi(this.h,this.c,this.l).rgb()};function Vi(W,te,ve){return isNaN(W)&&(W=0),isNaN(te)&&(te=0),new ra(ve,Math.cos(W*=kt)*te,Math.sin(W)*te)}e.lab=ra;function ra(W,te,ve){return this instanceof ra?(this.l=+W,this.a=+te,void(this.b=+ve)):arguments.length<2?W instanceof ra?new ra(W.l,W.a,W.b):W instanceof Jn?Vi(W.h,W.c,W.l):Af((W=ao(W)).r,W.g,W.b):new ra(W,te,ve)}var ha=18,va=.95047,Xi=1,oa=1.08883,Ma=ra.prototype=new rn;Ma.brighter=function(W){return new ra(Math.min(100,this.l+ha*(arguments.length?W:1)),this.a,this.b)},Ma.darker=function(W){return new ra(Math.max(0,this.l-ha*(arguments.length?W:1)),this.a,this.b)},Ma.rgb=function(){return Ga(this.l,this.a,this.b)};function Ga(W,te,ve){var Se=(W+16)/116,Ee=Se+te/500,Re=Se-ve/200;return Ee=mo(Ee)*va,Se=mo(Se)*Xi,Re=mo(Re)*oa,new ao(Eo(3.2404542*Ee-1.5371385*Se-.4985314*Re),Eo(-.969266*Ee+1.8760108*Se+.041556*Re),Eo(.0556434*Ee-.2040259*Se+1.0572252*Re))}function ss(W,te,ve){return W>0?new Jn(Math.atan2(ve,te)*rr,Math.sqrt(te*te+ve*ve),W):new Jn(NaN,NaN,W)}function mo(W){return W>.206893034?W*W*W:(W-4/29)/7.787037}function sl(W){return W>.008856?Math.pow(W,1/3):7.787037*W+4/29}function Eo(W){return Math.round(255*(W<=.00304?12.92*W:1.055*Math.pow(W,1/2.4)-.055))}e.rgb=ao;function ao(W,te,ve){return this instanceof ao?(this.r=~~W,this.g=~~te,void(this.b=~~ve)):arguments.length<2?W instanceof ao?new ao(W.r,W.g,W.b):su(""+W,ao,ri):new ao(W,te,ve)}function Da(W){return new ao(W>>16,W>>8&255,W&255)}function bl(W){return Da(W)+""}var bo=ao.prototype=new rn;bo.brighter=function(W){W=Math.pow(.7,arguments.length?W:1);var te=this.r,ve=this.g,Se=this.b,Ee=30;return!te&&!ve&&!Se?new ao(Ee,Ee,Ee):(te&&te>4,Se=Se>>4|Se,Ee=pt&240,Ee=Ee>>4|Ee,Re=pt&15,Re=Re<<4|Re):W.length===7&&(Se=(pt&16711680)>>16,Ee=(pt&65280)>>8,Re=pt&255)),te(Se,Ee,Re))}function fc(W,te,ve){var Se=Math.min(W/=255,te/=255,ve/=255),Ee=Math.max(W,te,ve),Re=Ee-Se,rt,He,pt=(Ee+Se)/2;return Re?(He=pt<.5?Re/(Ee+Se):Re/(2-Ee-Se),W==Ee?rt=(te-ve)/Re+(te0&&pt<1?0:rt),new Jr(rt,He,pt)}function Af(W,te,ve){W=ut(W),te=ut(te),ve=ut(ve);var Se=sl((.4124564*W+.3575761*te+.1804375*ve)/va),Ee=sl((.2126729*W+.7151522*te+.072175*ve)/Xi),Re=sl((.0193339*W+.119192*te+.9503041*ve)/oa);return ra(116*Ee-16,500*(Se-Ee),200*(Ee-Re))}function ut(W){return(W/=255)<=.04045?W/12.92:Math.pow((W+.055)/1.055,2.4)}function Jt(W){var te=parseFloat(W);return W.charAt(W.length-1)==="%"?Math.round(te*2.55):te}var er=e.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});er.forEach(function(W,te){er.set(W,Da(te))});function wr(W){return typeof W=="function"?W:function(){return W}}e.functor=wr,e.xhr=nn(O);function nn(W){return function(te,ve,Se){return arguments.length===2&&typeof ve=="function"&&(Se=ve,ve=null),Dr(te,ve,W,Se)}}function Dr(W,te,ve,Se){var Ee={},Re=e.dispatch("beforesend","progress","load","error"),rt={},He=new XMLHttpRequest,pt=null;self.XDomainRequest&&!("withCredentials"in He)&&/^(http(s)?:)?\/\//.test(W)&&(He=new XDomainRequest),"onload"in He?He.onload=He.onerror=Ft:He.onreadystatechange=function(){He.readyState>3&&Ft()};function Ft(){var Rt=He.status,ir;if(!Rt&&Yr(He)||Rt>=200&&Rt<300||Rt===304){try{ir=ve.call(Ee,He)}catch(nr){Re.error.call(Ee,nr);return}Re.load.call(Ee,ir)}else Re.error.call(Ee,He)}return He.onprogress=function(Rt){var ir=e.event;e.event=Rt;try{Re.progress.call(Ee,He)}finally{e.event=ir}},Ee.header=function(Rt,ir){return Rt=(Rt+"").toLowerCase(),arguments.length<2?rt[Rt]:(ir==null?delete rt[Rt]:rt[Rt]=ir+"",Ee)},Ee.mimeType=function(Rt){return arguments.length?(te=Rt==null?null:Rt+"",Ee):te},Ee.responseType=function(Rt){return arguments.length?(pt=Rt,Ee):pt},Ee.response=function(Rt){return ve=Rt,Ee},["get","post"].forEach(function(Rt){Ee[Rt]=function(){return Ee.send.apply(Ee,[Rt].concat(r(arguments)))}}),Ee.send=function(Rt,ir,nr){if(arguments.length===2&&typeof ir=="function"&&(nr=ir,ir=null),He.open(Rt,W,!0),te!=null&&!("accept"in rt)&&(rt.accept=te+",*/*"),He.setRequestHeader)for(var Cr in rt)He.setRequestHeader(Cr,rt[Cr]);return te!=null&&He.overrideMimeType&&He.overrideMimeType(te),pt!=null&&(He.responseType=pt),nr!=null&&Ee.on("error",nr).on("load",function(Vr){nr(null,Vr)}),Re.beforesend.call(Ee,He),He.send(ir==null?null:ir),Ee},Ee.abort=function(){return He.abort(),Ee},e.rebind(Ee,Re,"on"),Se==null?Ee:Ee.get(bn(Se))}function bn(W){return W.length===1?function(te,ve){W(te==null?ve:null)}:W}function Yr(W){var te=W.responseType;return te&&te!=="text"?W.response:W.responseText}e.dsv=function(W,te){var ve=new RegExp('["'+W+` ]`),Se=W.charCodeAt(0);function Ee(Ft,Rt,ir){arguments.length<3&&(ir=Rt,Rt=null);var nr=Dr(Ft,te,Rt==null?Re:rt(Rt),ir);return nr.row=function(Cr){return arguments.length?nr.response((Rt=Cr)==null?Re:rt(Cr)):Rt},nr}function Re(Ft){return Ee.parse(Ft.responseText)}function rt(Ft){return function(Rt){return Ee.parse(Rt.responseText,Ft)}}Ee.parse=function(Ft,Rt){var ir;return Ee.parseRows(Ft,function(nr,Cr){if(ir)return ir(nr,Cr-1);var Vr=function(sr){for(var br={},kr=nr.length,Gr=0;Gr=Vr)return nr;if(Gr)return Gr=!1,ir;var En=sr;if(Ft.charCodeAt(En)===34){for(var zn=En;zn++24?(isFinite(te)&&(clearTimeout(Ai),Ai=setTimeout(ii,te)),Qn=0):(Qn=1,Ji(ii))}e.timer.flush=function(){Za(),ja()};function Za(){for(var W=Date.now(),te=Tn;te;)W>=te.t&&te.c(W-te.t)&&(te.c=null),te=te.n;return W}function ja(){for(var W,te=Tn,ve=1/0;te;)te.c?(te.t=0;--He)sr.push(Ee[Ft[ir[He]][2]]);for(He=+Cr;He1&&Kr(W[ve[Se-2]],W[ve[Se-1]],W[Ee])<=0;)--Se;ve[Se++]=Ee}return ve.slice(0,Se)}function Oa(W,te){return W[0]-te[0]||W[1]-te[1]}e.geom.polygon=function(W){return K(W,Ni),W};var Ni=e.geom.polygon.prototype=[];Ni.area=function(){for(var W=-1,te=this.length,ve,Se=this[te-1],Ee=0;++WCt)He=He.L;else if(rt=te-Gu(He,ve),rt>Ct){if(!He.R){Se=He;break}He=He.R}else{Re>-Ct?(Se=He.P,Ee=He):rt>-Ct?(Se=He,Ee=He.N):Se=Ee=He;break}var pt=rs(W);if(ko.insert(Se,pt),!(!Se&&!Ee)){if(Se===Ee){Ca(Se),Ee=rs(Se.site),ko.insert(pt,Ee),pt.edge=Ee.edge=Mf(Se.site,pt.site),Ps(Se),Ps(Ee);return}if(!Ee){pt.edge=Mf(Se.site,pt.site);return}Ca(Se),Ca(Ee);var Ft=Se.site,Rt=Ft.x,ir=Ft.y,nr=W.x-Rt,Cr=W.y-ir,Vr=Ee.site,sr=Vr.x-Rt,br=Vr.y-ir,kr=2*(nr*br-Cr*sr),Gr=nr*nr+Cr*Cr,Wr=sr*sr+br*br,Ar={x:(br*Gr-Cr*Wr)/kr+Rt,y:(nr*Wr-sr*Gr)/kr+ir};Hu(Ee.edge,Ft,Vr,Ar),pt.edge=Mf(Ft,W,null,Ar),Ee.edge=Mf(W,Vr,null,Ar),Ps(Se),Ps(Ee)}}function _u(W,te){var ve=W.site,Se=ve.x,Ee=ve.y,Re=Ee-te;if(!Re)return Se;var rt=W.P;if(!rt)return-1/0;ve=rt.site;var He=ve.x,pt=ve.y,Ft=pt-te;if(!Ft)return He;var Rt=He-Se,ir=1/Re-1/Ft,nr=Rt/Ft;return ir?(-nr+Math.sqrt(nr*nr-2*ir*(Rt*Rt/(-2*Ft)-pt+Ft/2+Ee-Re/2)))/ir+Se:(Se+He)/2}function Gu(W,te){var ve=W.N;if(ve)return _u(ve,te);var Se=W.site;return Se.y===te?Se.x:1/0}function Ja(W){this.site=W,this.edges=[]}Ja.prototype.prepare=function(){for(var W=this.edges,te=W.length,ve;te--;)ve=W[te].edge,(!ve.b||!ve.a)&&W.splice(te,1);return W.sort(Sa),W.length};function ps(W){for(var te=W[0][0],ve=W[1][0],Se=W[0][1],Ee=W[1][1],Re,rt,He,pt,Ft=oo,Rt=Ft.length,ir,nr,Cr,Vr,sr,br;Rt--;)if(ir=Ft[Rt],!(!ir||!ir.prepare()))for(Cr=ir.edges,Vr=Cr.length,nr=0;nrCt||y(pt-rt)>Ct)&&(Cr.splice(nr,0,new Sf(Bd(ir.site,br,y(He-te)Ct?{x:te,y:y(Re-te)Ct?{x:y(rt-Ee)Ct?{x:ve,y:y(Re-ve)Ct?{x:y(rt-Se)=-wt)){var nr=pt*pt+Ft*Ft,Cr=Rt*Rt+br*br,Vr=(br*nr-Ft*Cr)/ir,sr=(pt*Cr-Rt*nr)/ir,br=sr+He,kr=Ms.pop()||new ma;kr.arc=W,kr.site=Ee,kr.x=Vr+rt,kr.y=br+Math.sqrt(Vr*Vr+sr*sr),kr.cy=br,W.circle=kr;for(var Gr=null,Wr=As._;Wr;)if(kr.y0)){if(sr/=Cr,Cr<0){if(sr0){if(sr>nr)return;sr>ir&&(ir=sr)}if(sr=ve-He,!(!Cr&&sr<0)){if(sr/=Cr,Cr<0){if(sr>nr)return;sr>ir&&(ir=sr)}else if(Cr>0){if(sr0)){if(sr/=Vr,Vr<0){if(sr0){if(sr>nr)return;sr>ir&&(ir=sr)}if(sr=Se-pt,!(!Vr&&sr<0)){if(sr/=Vr,Vr<0){if(sr>nr)return;sr>ir&&(ir=sr)}else if(Vr>0){if(sr0&&(Ee.a={x:He+ir*Cr,y:pt+ir*Vr}),nr<1&&(Ee.b={x:He+nr*Cr,y:pt+nr*Vr}),Ee}}}}}}function ll(W){for(var te=so,ve=Pl(W[0][0],W[0][1],W[1][0],W[1][1]),Se=te.length,Ee;Se--;)Ee=te[Se],(!Jc(Ee,W)||!ve(Ee)||y(Ee.a.x-Ee.b.x)=Re)return;if(Rt>nr){if(!Se)Se={x:Vr,y:rt};else if(Se.y>=He)return;ve={x:Vr,y:He}}else{if(!Se)Se={x:Vr,y:He};else if(Se.y1)if(Rt>nr){if(!Se)Se={x:(rt-kr)/br,y:rt};else if(Se.y>=He)return;ve={x:(He-kr)/br,y:He}}else{if(!Se)Se={x:(He-kr)/br,y:He};else if(Se.y=Re)return;ve={x:Re,y:br*Re+kr}}else{if(!Se)Se={x:Re,y:br*Re+kr};else if(Se.x=Rt&&kr.x<=nr&&kr.y>=ir&&kr.y<=Cr?[[Rt,Cr],[nr,Cr],[nr,ir],[Rt,ir]]:[];Gr.point=pt[sr]}),Ft}function He(pt){return pt.map(function(Ft,Rt){return{x:Math.round(Se(Ft,Rt)/Ct)*Ct,y:Math.round(Ee(Ft,Rt)/Ct)*Ct,i:Rt}})}return rt.links=function(pt){return ju(He(pt)).edges.filter(function(Ft){return Ft.l&&Ft.r}).map(function(Ft){return{source:pt[Ft.l.i],target:pt[Ft.r.i]}})},rt.triangles=function(pt){var Ft=[];return ju(He(pt)).cells.forEach(function(Rt,ir){for(var nr=Rt.site,Cr=Rt.edges.sort(Sa),Vr=-1,sr=Cr.length,br,kr,Gr=Cr[sr-1].edge,Wr=Gr.l===nr?Gr.r:Gr.l;++VrWr&&(Wr=Rt.x),Rt.y>Ar&&(Ar=Rt.y),Cr.push(Rt.x),Vr.push(Rt.y);else for(sr=0;srWr&&(Wr=En),zn>Ar&&(Ar=zn),Cr.push(En),Vr.push(zn)}var Zn=Wr-kr,ai=Ar-Gr;Zn>ai?Ar=Gr+Zn:Wr=kr+ai;function Mi(Y,d,P,N,H,$,se,de){if(!(isNaN(P)||isNaN(N)))if(Y.leaf){var Ae=Y.x,Fe=Y.y;if(Ae!=null)if(y(Ae-P)+y(Fe-N)<.01)Si(Y,d,P,N,H,$,se,de);else{var Ie=Y.point;Y.x=Y.y=Y.point=null,Si(Y,Ie,Ae,Fe,H,$,se,de),Si(Y,d,P,N,H,$,se,de)}else Y.x=P,Y.y=N,Y.point=d}else Si(Y,d,P,N,H,$,se,de)}function Si(Y,d,P,N,H,$,se,de){var Ae=(H+se)*.5,Fe=($+de)*.5,Ie=P>=Ae,Ye=N>=Fe,st=Ye<<1|Ie;Y.leaf=!1,Y=Y.nodes[st]||(Y.nodes[st]=Qc()),Ie?H=Ae:se=Ae,Ye?$=Fe:de=Fe,Mi(Y,d,P,N,H,$,se,de)}var ya=Qc();if(ya.add=function(Y){Mi(ya,Y,+ir(Y,++sr),+nr(Y,sr),kr,Gr,Wr,Ar)},ya.visit=function(Y){uu(Y,ya,kr,Gr,Wr,Ar)},ya.find=function(Y){return oh(ya,Y[0],Y[1],kr,Gr,Wr,Ar)},sr=-1,te==null){for(;++srRe||nr>rt||Cr=En,ai=ve>=zn,Mi=ai<<1|Zn,Si=Mi+4;Mive&&(Re=te.slice(ve,Re),He[rt]?He[rt]+=Re:He[++rt]=Re),(Se=Se[0])===(Ee=Ee[0])?He[rt]?He[rt]+=Ee:He[++rt]=Ee:(He[++rt]=null,pt.push({i:rt,x:Yo(Se,Ee)})),ve=Dl.lastIndex;return ve=0&&!(Se=e.interpolators[ve](W,te)););return Se}e.interpolators=[function(W,te){var ve=typeof te;return(ve==="string"?er.has(te.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(te)?hc:Ro:te instanceof rn?hc:Array.isArray(te)?ef:ve==="object"&&isNaN(te)?Fl:Yo)(W,te)}],e.interpolateArray=ef;function ef(W,te){var ve=[],Se=[],Ee=W.length,Re=te.length,rt=Math.min(W.length,te.length),He;for(He=0;He=0?W.slice(0,te):W,Se=te>=0?W.slice(te+1):"in";return ve=sh.get(ve)||Cc,Se=Y0.get(Se)||O,Nd(Se(ve.apply(null,t.call(arguments,1))))};function Nd(W){return function(te){return te<=0?0:te>=1?1:W(te)}}function Cf(W){return function(te){return 1-W(1-te)}}function Vo(W){return function(te){return .5*(te<.5?W(2*te):2-W(2-2*te))}}function Ud(W){return W*W}function zh(W){return W*W*W}function tf(W){if(W<=0)return 0;if(W>=1)return 1;var te=W*W,ve=te*W;return 4*(W<.5?ve:3*(W-te)+ve-.75)}function Vd(W){return function(te){return Math.pow(te,W)}}function rf(W){return 1-Math.cos(W*ft)}function qh(W){return Math.pow(2,10*(W-1))}function vc(W){return 1-Math.sqrt(1-W*W)}function dd(W,te){var ve;return arguments.length<2&&(te=.45),arguments.length?ve=te/Mt*Math.asin(1/W):(W=1,ve=te/4),function(Se){return 1+W*Math.pow(2,-10*Se)*Math.sin((Se-ve)*Mt/te)}}function Bh(W){return W||(W=1.70158),function(te){return te*te*((W+1)*te-W)}}function Wu(W){return W<1/2.75?7.5625*W*W:W<2/2.75?7.5625*(W-=1.5/2.75)*W+.75:W<2.5/2.75?7.5625*(W-=2.25/2.75)*W+.9375:7.5625*(W-=2.625/2.75)*W+.984375}e.interpolateHcl=vd;function vd(W,te){W=e.hcl(W),te=e.hcl(te);var ve=W.h,Se=W.c,Ee=W.l,Re=te.h-ve,rt=te.c-Se,He=te.l-Ee;return isNaN(rt)&&(rt=0,Se=isNaN(Se)?te.c:Se),isNaN(Re)?(Re=0,ve=isNaN(ve)?te.h:ve):Re>180?Re-=360:Re<-180&&(Re+=360),function(pt){return Vi(ve+Re*pt,Se+rt*pt,Ee+He*pt)+""}}e.interpolateHsl=pd;function pd(W,te){W=e.hsl(W),te=e.hsl(te);var ve=W.h,Se=W.s,Ee=W.l,Re=te.h-ve,rt=te.s-Se,He=te.l-Ee;return isNaN(rt)&&(rt=0,Se=isNaN(Se)?te.s:Se),isNaN(Re)?(Re=0,ve=isNaN(ve)?te.h:ve):Re>180?Re-=360:Re<-180&&(Re+=360),function(pt){return ri(ve+Re*pt,Se+rt*pt,Ee+He*pt)+""}}e.interpolateLab=lh;function lh(W,te){W=e.lab(W),te=e.lab(te);var ve=W.l,Se=W.a,Ee=W.b,Re=te.l-ve,rt=te.a-Se,He=te.b-Ee;return function(pt){return Ga(ve+Re*pt,Se+rt*pt,Ee+He*pt)+""}}e.interpolateRound=nf;function nf(W,te){return te-=W,function(ve){return Math.round(W+te*ve)}}e.transform=function(W){var te=n.createElementNS(e.ns.prefix.svg,"g");return(e.transform=function(ve){if(ve!=null){te.setAttribute("transform",ve);var Se=te.transform.baseVal.consolidate()}return new uh(Se?Se.matrix:ch)})(W)};function uh(W){var te=[W.a,W.b],ve=[W.c,W.d],Se=gd(te),Ee=af(te,ve),Re=gd(Rl(ve,te,-Ee))||0;te[0]*ve[1]180?te+=360:te-W>180&&(W+=360),Se.push({i:ve.push(Lc(ve)+"rotate(",null,")")-2,x:Yo(W,te)})):te&&ve.push(Lc(ve)+"rotate("+te+")")}function Lf(W,te,ve,Se){W!==te?Se.push({i:ve.push(Lc(ve)+"skewX(",null,")")-2,x:Yo(W,te)}):te&&ve.push(Lc(ve)+"skewX("+te+")")}function wu(W,te,ve,Se){if(W[0]!==te[0]||W[1]!==te[1]){var Ee=ve.push(Lc(ve)+"scale(",null,",",null,")");Se.push({i:Ee-4,x:Yo(W[0],te[0])},{i:Ee-2,x:Yo(W[1],te[1])})}else(te[0]!==1||te[1]!==1)&&ve.push(Lc(ve)+"scale("+te+")")}function fh(W,te){var ve=[],Se=[];return W=e.transform(W),te=e.transform(te),md(W.translate,te.translate,ve,Se),yd(W.rotate,te.rotate,ve,Se),Lf(W.skew,te.skew,ve,Se),wu(W.scale,te.scale,ve,Se),W=te=null,function(Ee){for(var Re=-1,rt=Se.length,He;++Re0?Re=Ar:(ve.c=null,ve.t=NaN,ve=null,te.end({type:"end",alpha:Re=0})):Ar>0&&(te.start({type:"start",alpha:Re=Ar}),ve=Ra(W.tick)),W):Re},W.start=function(){var Ar,En=Cr.length,zn=Vr.length,Zn=Se[0],ai=Se[1],Mi,Si;for(Ar=0;Ar=0;)Re.push(Rt=Ft[pt]),Rt.parent=He,Rt.depth=He.depth+1;ve&&(He.value=0),He.children=Ft}else ve&&(He.value=+ve.call(Se,He,He.depth)||0),delete He.children;return Il(Ee,function(ir){var nr,Cr;W&&(nr=ir.children)&&nr.sort(W),ve&&(Cr=ir.parent)&&(Cr.value+=ir.value)}),rt}return Se.sort=function(Ee){return arguments.length?(W=Ee,Se):W},Se.children=function(Ee){return arguments.length?(te=Ee,Se):te},Se.value=function(Ee){return arguments.length?(ve=Ee,Se):ve},Se.revalue=function(Ee){return ve&&(Au(Ee,function(Re){Re.children&&(Re.value=0)}),Il(Ee,function(Re){var rt;Re.children||(Re.value=+ve.call(Se,Re,Re.depth)||0),(rt=Re.parent)&&(rt.value+=Re.value)})),Ee},Se};function Tu(W,te){return e.rebind(W,te,"sort","children","value"),W.nodes=W,W.links=Tl,W}function Au(W,te){for(var ve=[W];(W=ve.pop())!=null;)if(te(W),(Ee=W.children)&&(Se=Ee.length))for(var Se,Ee;--Se>=0;)ve.push(Ee[Se])}function Il(W,te){for(var ve=[W],Se=[];(W=ve.pop())!=null;)if(Se.push(W),(rt=W.children)&&(Re=rt.length))for(var Ee=-1,Re,rt;++EeEe&&(Ee=He),Se.push(He)}for(rt=0;rtSe&&(ve=te,Se=Ee);return ve}function Gh(W){return W.reduce(Xu,0)}function Xu(W,te){return W+te[1]}e.layout.histogram=function(){var W=!0,te=Number,ve=Df,Se=Pc;function Ee(Re,nr){for(var He=[],pt=Re.map(te,this),Ft=ve.call(this,pt,nr),Rt=Se.call(this,Ft,pt,nr),ir,nr=-1,Cr=pt.length,Vr=Rt.length-1,sr=W?1:1/Cr,br;++nr0)for(nr=-1;++nr=Ft[0]&&br<=Ft[1]&&(ir=He[e.bisect(Rt,br,1,Vr)-1],ir.y+=sr,ir.push(Re[nr]));return He}return Ee.value=function(Re){return arguments.length?(te=Re,Ee):te},Ee.range=function(Re){return arguments.length?(ve=wr(Re),Ee):ve},Ee.bins=function(Re){return arguments.length?(Se=typeof Re=="number"?function(rt){return Ff(rt,Re)}:wr(Re),Ee):Se},Ee.frequency=function(Re){return arguments.length?(W=!!Re,Ee):W},Ee};function Pc(W,te){return Ff(W,Math.ceil(Math.log(te.length)/Math.LN2+1))}function Ff(W,te){for(var ve=-1,Se=+W[0],Ee=(W[1]-Se)/te,Re=[];++ve<=te;)Re[ve]=Ee*ve+Se;return Re}function Df(W){return[e.min(W),e.max(W)]}e.layout.pack=function(){var W=e.layout.hierarchy().sort(La),te=0,ve=[1,1],Se;function Ee(Re,rt){var He=W.call(this,Re,rt),pt=He[0],Ft=ve[0],Rt=ve[1],ir=Se==null?Math.sqrt:typeof Se=="function"?Se:function(){return Se};if(pt.x=pt.y=0,Il(pt,function(Cr){Cr.r=+ir(Cr.value)}),Il(pt,Hh),te){var nr=te*(Se?1:Math.max(2*pt.r/Ft,2*pt.r/Rt))/2;Il(pt,function(Cr){Cr.r+=nr}),Il(pt,Hh),Il(pt,function(Cr){Cr.r-=nr})}return Td(pt,Ft/2,Rt/2,Se?1:1/Math.max(2*pt.r/Ft,2*pt.r/Rt)),He}return Ee.size=function(Re){return arguments.length?(ve=Re,Ee):ve},Ee.radius=function(Re){return arguments.length?(Se=Re==null||typeof Re=="function"?Re:+Re,Ee):Se},Ee.padding=function(Re){return arguments.length?(te=+Re,Ee):te},Tu(Ee,W)};function La(W,te){return W.value-te.value}function Rf(W,te){var ve=W._pack_next;W._pack_next=te,te._pack_prev=W,te._pack_next=ve,ve._pack_prev=te}function m0(W,te){W._pack_next=te,te._pack_prev=W}function wd(W,te){var ve=te.x-W.x,Se=te.y-W.y,Ee=W.r+te.r;return .999*Ee*Ee>ve*ve+Se*Se}function Hh(W){if(!(te=W.children)||!(nr=te.length))return;var te,ve=1/0,Se=-1/0,Ee=1/0,Re=-1/0,rt,He,pt,Ft,Rt,ir,nr;function Cr(Ar){ve=Math.min(Ar.x-Ar.r,ve),Se=Math.max(Ar.x+Ar.r,Se),Ee=Math.min(Ar.y-Ar.r,Ee),Re=Math.max(Ar.y+Ar.r,Re)}if(te.forEach(X0),rt=te[0],rt.x=-rt.r,rt.y=0,Cr(rt),nr>1&&(He=te[1],He.x=He.r,He.y=0,Cr(He),nr>2))for(pt=te[2],ul(rt,He,pt),Cr(pt),Rf(rt,pt),rt._pack_prev=pt,Rf(pt,He),He=rt._pack_next,Ft=3;Ftbr.x&&(br=En),En.depth>kr.depth&&(kr=En)});var Gr=te(sr,br)/2-sr.x,Wr=ve[0]/(br.x+te(br,sr)/2+Gr),Ar=ve[1]/(kr.depth||1);Au(Cr,function(En){En.x=(En.x+Gr)*Wr,En.y=En.depth*Ar})}return nr}function Re(Rt){for(var ir={A:null,children:[Rt]},nr=[ir],Cr;(Cr=nr.pop())!=null;)for(var Vr=Cr.children,sr,br=0,kr=Vr.length;br0&&(zf(Ze(sr,Rt,nr),Rt,En),kr+=En,Gr+=En),Wr+=sr.m,kr+=Cr.m,Ar+=br.m,Gr+=Vr.m;sr&&!vh(Vr)&&(Vr.t=sr,Vr.m+=Wr-Gr),Cr&&!If(br)&&(br.t=Cr,br.m+=kr-Ar,nr=Rt)}return nr}function Ft(Rt){Rt.x*=ve[0],Rt.y=Rt.depth*ve[1]}return Ee.separation=function(Rt){return arguments.length?(te=Rt,Ee):te},Ee.size=function(Rt){return arguments.length?(Se=(ve=Rt)==null?Ft:null,Ee):Se?null:ve},Ee.nodeSize=function(Rt){return arguments.length?(Se=(ve=Rt)==null?null:Ft,Ee):Se?ve:null},Tu(Ee,W)};function Wl(W,te){return W.parent==te.parent?1:2}function If(W){var te=W.children;return te.length?te[0]:W.t}function vh(W){var te=W.children,ve;return(ve=te.length)?te[ve-1]:W.t}function zf(W,te,ve){var Se=ve/(te.i-W.i);te.c-=Se,te.s+=ve,W.c+=Se,te.z+=ve,te.m+=ve}function qf(W){for(var te=0,ve=0,Se=W.children,Ee=Se.length,Re;--Ee>=0;)Re=Se[Ee],Re.z+=te,Re.m+=te,te+=Re.s+(ve+=Re.c)}function Ze(W,te,ve){return W.a.parent===te.parent?W.a:ve}e.layout.cluster=function(){var W=e.layout.hierarchy().sort(null).value(null),te=Wl,ve=[1,1],Se=!1;function Ee(Re,rt){var He=W.call(this,Re,rt),pt=He[0],Ft,Rt=0;Il(pt,function(sr){var br=sr.children;br&&br.length?(sr.x=Wt(br),sr.y=yt(br)):(sr.x=Ft?Rt+=te(sr,Ft):0,sr.y=0,Ft=sr)});var ir=zt(pt),nr=hr(pt),Cr=ir.x-te(ir,nr)/2,Vr=nr.x+te(nr,ir)/2;return Il(pt,Se?function(sr){sr.x=(sr.x-pt.x)*ve[0],sr.y=(pt.y-sr.y)*ve[1]}:function(sr){sr.x=(sr.x-Cr)/(Vr-Cr)*ve[0],sr.y=(1-(pt.y?sr.y/pt.y:1))*ve[1]}),He}return Ee.separation=function(Re){return arguments.length?(te=Re,Ee):te},Ee.size=function(Re){return arguments.length?(Se=(ve=Re)==null,Ee):Se?null:ve},Ee.nodeSize=function(Re){return arguments.length?(Se=(ve=Re)!=null,Ee):Se?ve:null},Tu(Ee,W)};function yt(W){return 1+e.max(W,function(te){return te.y})}function Wt(W){return W.reduce(function(te,ve){return te+ve.x},0)/W.length}function zt(W){var te=W.children;return te&&te.length?zt(te[0]):W}function hr(W){var te=W.children,ve;return te&&(ve=te.length)?hr(te[ve-1]):W}e.layout.treemap=function(){var W=e.layout.hierarchy(),te=Math.round,ve=[1,1],Se=null,Ee=Ur,Re=!1,rt,He="squarify",pt=.5*(1+Math.sqrt(5));function Ft(sr,br){for(var kr=-1,Gr=sr.length,Wr,Ar;++kr0;)Gr.push(Ar=Wr[ai-1]),Gr.area+=Ar.area,He!=="squarify"||(zn=nr(Gr,Zn))<=En?(Wr.pop(),En=zn):(Gr.area-=Gr.pop().area,Cr(Gr,Zn,kr,!1),Zn=Math.min(kr.dx,kr.dy),Gr.length=Gr.area=0,En=1/0);Gr.length&&(Cr(Gr,Zn,kr,!0),Gr.length=Gr.area=0),br.forEach(Rt)}}function ir(sr){var br=sr.children;if(br&&br.length){var kr=Ee(sr),Gr=br.slice(),Wr,Ar=[];for(Ft(Gr,kr.dx*kr.dy/sr.value),Ar.area=0;Wr=Gr.pop();)Ar.push(Wr),Ar.area+=Wr.area,Wr.z!=null&&(Cr(Ar,Wr.z?kr.dx:kr.dy,kr,!Gr.length),Ar.length=Ar.area=0);br.forEach(ir)}}function nr(sr,br){for(var kr=sr.area,Gr,Wr=0,Ar=1/0,En=-1,zn=sr.length;++EnWr&&(Wr=Gr));return kr*=kr,br*=br,kr?Math.max(br*Wr*pt/kr,kr/(br*Ar*pt)):1/0}function Cr(sr,br,kr,Gr){var Wr=-1,Ar=sr.length,En=kr.x,zn=kr.y,Zn=br?te(sr.area/br):0,ai;if(br==kr.dx){for((Gr||Zn>kr.dy)&&(Zn=kr.dy);++Wrkr.dx)&&(Zn=kr.dx);++Wr1);return W+te*Se*Math.sqrt(-2*Math.log(Re)/Re)}},logNormal:function(){var W=e.random.normal.apply(e,arguments);return function(){return Math.exp(W())}},bates:function(W){var te=e.random.irwinHall(W);return function(){return te()/W}},irwinHall:function(W){return function(){for(var te=0,ve=0;ve2?Pn:Fn,Ft=Se?hh:Oh;return Ee=pt(W,te,Ft,ve),Re=pt(te,W,Ft,dc),He}function He(pt){return Ee(pt)}return He.invert=function(pt){return Re(pt)},He.domain=function(pt){return arguments.length?(W=pt.map(Number),rt()):W},He.range=function(pt){return arguments.length?(te=pt,rt()):te},He.rangeRound=function(pt){return He.range(pt).interpolate(nf)},He.clamp=function(pt){return arguments.length?(Se=pt,rt()):Se},He.interpolate=function(pt){return arguments.length?(ve=pt,rt()):ve},He.ticks=function(pt){return pi(W,pt)},He.tickFormat=function(pt,Ft){return d3_scale_linearTickFormat(W,pt,Ft)},He.nice=function(pt){return Ci(W,pt),rt()},He.copy=function(){return On(W,te,ve,Se)},rt()}function ki(W,te){return e.rebind(W,te,"range","rangeRound","interpolate","clamp")}function Ci(W,te){return en(W,vn(qi(W,te)[2])),en(W,vn(qi(W,te)[2])),W}function qi(W,te){te==null&&(te=10);var ve=cn(W),Se=ve[1]-ve[0],Ee=Math.pow(10,Math.floor(Math.log(Se/te)/Math.LN10)),Re=te/Se*Ee;return Re<=.15?Ee*=10:Re<=.35?Ee*=5:Re<=.75&&(Ee*=2),ve[0]=Math.ceil(ve[0]/Ee)*Ee,ve[1]=Math.floor(ve[1]/Ee)*Ee+Ee*.5,ve[2]=Ee,ve}function pi(W,te){return e.range.apply(e,qi(W,te))}var Un={s:1,g:1,p:1,r:1,e:1};function Gn(W){return-Math.floor(Math.log(W)/Math.LN10+.01)}function Zi(W,te){var ve=Gn(te[2]);return W in Un?Math.abs(ve-Gn(Math.max(y(te[0]),y(te[1]))))+ +(W!=="e"):ve-(W==="%")*2}e.scale.log=function(){return na(e.scale.linear().domain([0,1]),10,!0,[1,10])};function na(W,te,ve,Se){function Ee(He){return(ve?Math.log(He<0?0:He):-Math.log(He>0?0:-He))/Math.log(te)}function Re(He){return ve?Math.pow(te,He):-Math.pow(te,-He)}function rt(He){return W(Ee(He))}return rt.invert=function(He){return Re(W.invert(He))},rt.domain=function(He){return arguments.length?(ve=He[0]>=0,W.domain((Se=He.map(Number)).map(Ee)),rt):Se},rt.base=function(He){return arguments.length?(te=+He,W.domain(Se.map(Ee)),rt):te},rt.nice=function(){var He=en(Se.map(Ee),ve?Math:Ha);return W.domain(He),Se=He.map(Re),rt},rt.ticks=function(){var He=cn(Se),pt=[],Ft=He[0],Rt=He[1],ir=Math.floor(Ee(Ft)),nr=Math.ceil(Ee(Rt)),Cr=te%1?2:te;if(isFinite(nr-ir)){if(ve){for(;ir0;Vr--)pt.push(Re(ir)*Vr);for(ir=0;pt[ir]Rt;nr--);pt=pt.slice(ir,nr)}return pt},rt.copy=function(){return na(W.copy(),te,ve,Se)},ki(rt,W)}var Ha={floor:function(W){return-Math.ceil(-W)},ceil:function(W){return-Math.floor(-W)}};e.scale.pow=function(){return Qa(e.scale.linear(),1,[0,1])};function Qa(W,te,ve){var Se=Ya(te),Ee=Ya(1/te);function Re(rt){return W(Se(rt))}return Re.invert=function(rt){return Ee(W.invert(rt))},Re.domain=function(rt){return arguments.length?(W.domain((ve=rt.map(Number)).map(Se)),Re):ve},Re.ticks=function(rt){return pi(ve,rt)},Re.tickFormat=function(rt,He){return d3_scale_linearTickFormat(ve,rt,He)},Re.nice=function(rt){return Re.domain(Ci(ve,rt))},Re.exponent=function(rt){return arguments.length?(Se=Ya(te=rt),Ee=Ya(1/te),W.domain(ve.map(Se)),Re):te},Re.copy=function(){return Qa(W.copy(),te,ve)},ki(Re,W)}function Ya(W){return function(te){return te<0?-Math.pow(-te,W):Math.pow(te,W)}}e.scale.sqrt=function(){return e.scale.pow().exponent(.5)},e.scale.ordinal=function(){return ho([],{t:"range",a:[[]]})};function ho(W,te){var ve,Se,Ee;function Re(He){return Se[((ve.get(He)||(te.t==="range"?ve.set(He,W.push(He)):NaN))-1)%Se.length]}function rt(He,pt){return e.range(W.length).map(function(Ft){return He+pt*Ft})}return Re.domain=function(He){if(!arguments.length)return W;W=[],ve=new S;for(var pt=-1,Ft=He.length,Rt;++pt0?ve[Re-1]:W[0],Renr?0:1;if(Rt=Lt)return pt(Rt,Vr)+(Ft?pt(Ft,1-Vr):"")+"Z";var sr,br,kr,Gr,Wr=0,Ar=0,En,zn,Zn,ai,Mi,Si,ya,Y,d=[];if((Gr=(+rt.apply(this,arguments)||0)/2)&&(kr=Se===cu?Math.sqrt(Ft*Ft+Rt*Rt):+Se.apply(this,arguments),Vr||(Ar*=-1),Rt&&(Ar=dn(kr/Rt*Math.sin(Gr))),Ft&&(Wr=dn(kr/Ft*Math.sin(Gr)))),Rt){En=Rt*Math.cos(ir+Ar),zn=Rt*Math.sin(ir+Ar),Zn=Rt*Math.cos(nr-Ar),ai=Rt*Math.sin(nr-Ar);var P=Math.abs(nr-ir-2*Ar)<=Tt?0:1;if(Ar&&ph(En,zn,Zn,ai)===Vr^P){var N=(ir+nr)/2;En=Rt*Math.cos(N),zn=Rt*Math.sin(N),Zn=ai=null}}else En=zn=0;if(Ft){Mi=Ft*Math.cos(nr-Wr),Si=Ft*Math.sin(nr-Wr),ya=Ft*Math.cos(ir+Wr),Y=Ft*Math.sin(ir+Wr);var H=Math.abs(ir-nr+2*Wr)<=Tt?0:1;if(Wr&&ph(Mi,Si,ya,Y)===1-Vr^H){var $=(ir+nr)/2;Mi=Ft*Math.cos($),Si=Ft*Math.sin($),ya=Y=null}}else Mi=Si=0;if(Cr>Ct&&(sr=Math.min(Math.abs(Rt-Ft)/2,+ve.apply(this,arguments)))>.001){br=Ft0?0:1}function gh(W,te,ve,Se,Ee){var Re=W[0]-te[0],rt=W[1]-te[1],He=(Ee?Se:-Se)/Math.sqrt(Re*Re+rt*rt),pt=He*rt,Ft=-He*Re,Rt=W[0]+pt,ir=W[1]+Ft,nr=te[0]+pt,Cr=te[1]+Ft,Vr=(Rt+nr)/2,sr=(ir+Cr)/2,br=nr-Rt,kr=Cr-ir,Gr=br*br+kr*kr,Wr=ve-Se,Ar=Rt*Cr-nr*ir,En=(kr<0?-1:1)*Math.sqrt(Math.max(0,Wr*Wr*Gr-Ar*Ar)),zn=(Ar*kr-br*En)/Gr,Zn=(-Ar*br-kr*En)/Gr,ai=(Ar*kr+br*En)/Gr,Mi=(-Ar*br+kr*En)/Gr,Si=zn-Vr,ya=Zn-sr,Y=ai-Vr,d=Mi-sr;return Si*Si+ya*ya>Y*Y+d*d&&(zn=ai,Zn=Mi),[[zn-pt,Zn-Ft],[zn*ve/Wr,Zn*ve/Wr]]}function uf(){return!0}function Ku(W){var te=qo,ve=$a,Se=uf,Ee=Ju,Re=Ee.key,rt=.7;function He(pt){var Ft=[],Rt=[],ir=-1,nr=pt.length,Cr,Vr=wr(te),sr=wr(ve);function br(){Ft.push("M",Ee(W(Rt),rt))}for(;++ir1?W.join("L"):W+"Z"}function Qu(W){return W.join("L")+"Z"}function Wd(W){for(var te=0,ve=W.length,Se=W[0],Ee=[Se[0],",",Se[1]];++te1&&Ee.push("H",Se[0]),Ee.join("")}function x0(W){for(var te=0,ve=W.length,Se=W[0],Ee=[Se[0],",",Se[1]];++te1){He=te[1],Re=W[pt],pt++,Se+="C"+(Ee[0]+rt[0])+","+(Ee[1]+rt[1])+","+(Re[0]-He[0])+","+(Re[1]-He[1])+","+Re[0]+","+Re[1];for(var Ft=2;Ft9&&(Re=ve*3/Math.sqrt(Re),rt[He]=Re*Se,rt[He+1]=Re*Ee));for(He=-1;++He<=pt;)Re=(W[Math.min(pt,He+1)][0]-W[Math.max(0,He-1)][0])/(6*(1+rt[He]*rt[He])),te.push([Re||0,rt[He]*Re||0]);return te}function Gt(W){return W.length<3?Ju(W):W[0]+jh(W,lt(W))}e.svg.line.radial=function(){var W=Ku(Zt);return W.radius=W.x,delete W.x,W.angle=W.y,delete W.y,W};function Zt(W){for(var te,ve=-1,Se=W.length,Ee,Re;++veTt)+",1 "+ir}function Ft(Rt,ir,nr,Cr){return"Q 0,0 "+Cr}return Re.radius=function(Rt){return arguments.length?(ve=wr(Rt),Re):ve},Re.source=function(Rt){return arguments.length?(W=wr(Rt),Re):W},Re.target=function(Rt){return arguments.length?(te=wr(Rt),Re):te},Re.startAngle=function(Rt){return arguments.length?(Se=wr(Rt),Re):Se},Re.endAngle=function(Rt){return arguments.length?(Ee=wr(Rt),Re):Ee},Re};function Sr(W){return W.radius}e.svg.diagonal=function(){var W=Kt,te=ur,ve=Br;function Se(Ee,Re){var rt=W.call(this,Ee,Re),He=te.call(this,Ee,Re),pt=(rt.y+He.y)/2,Ft=[rt,{x:rt.x,y:pt},{x:He.x,y:pt},He];return Ft=Ft.map(ve),"M"+Ft[0]+"C"+Ft[1]+" "+Ft[2]+" "+Ft[3]}return Se.source=function(Ee){return arguments.length?(W=wr(Ee),Se):W},Se.target=function(Ee){return arguments.length?(te=wr(Ee),Se):te},Se.projection=function(Ee){return arguments.length?(ve=Ee,Se):ve},Se};function Br(W){return[W.x,W.y]}e.svg.diagonal.radial=function(){var W=e.svg.diagonal(),te=Br,ve=W.projection;return W.projection=function(Se){return arguments.length?ve(ln(te=Se)):te},W};function ln(W){return function(){var te=W.apply(this,arguments),ve=te[0],Se=te[1]-ft;return[ve*Math.cos(Se),ve*Math.sin(Se)]}}e.svg.symbol=function(){var W=In,te=wn;function ve(Se,Ee){return(Bi.get(W.call(this,Se,Ee))||gi)(te.call(this,Se,Ee))}return ve.type=function(Se){return arguments.length?(W=wr(Se),ve):W},ve.size=function(Se){return arguments.length?(te=wr(Se),ve):te},ve};function wn(){return 64}function In(){return"circle"}function gi(W){var te=Math.sqrt(W/Tt);return"M0,"+te+"A"+te+","+te+" 0 1,1 0,"+-te+"A"+te+","+te+" 0 1,1 0,"+te+"Z"}var Bi=e.map({circle:gi,cross:function(W){var te=Math.sqrt(W/5)/2;return"M"+-3*te+","+-te+"H"+-te+"V"+-3*te+"H"+te+"V"+-te+"H"+3*te+"V"+te+"H"+te+"V"+3*te+"H"+-te+"V"+te+"H"+-3*te+"Z"},diamond:function(W){var te=Math.sqrt(W/(2*ia)),ve=te*ia;return"M0,"+-te+"L"+ve+",0 0,"+te+" "+-ve+",0Z"},square:function(W){var te=Math.sqrt(W)/2;return"M"+-te+","+-te+"L"+te+","+-te+" "+te+","+te+" "+-te+","+te+"Z"},"triangle-down":function(W){var te=Math.sqrt(W/mi),ve=te*mi/2;return"M0,"+ve+"L"+te+","+-ve+" "+-te+","+-ve+"Z"},"triangle-up":function(W){var te=Math.sqrt(W/mi),ve=te*mi/2;return"M0,"+-ve+"L"+te+","+ve+" "+-te+","+ve+"Z"}});e.svg.symbolTypes=Bi.keys();var mi=Math.sqrt(3),ia=Math.tan(30*kt);ie.transition=function(W){for(var te=cl||++ls,ve=wi(W),Se=[],Ee,Re,rt=Eu||{time:Date.now(),ease:tf,delay:0,duration:250},He=-1,pt=this.length;++He0;)ir[--Gr].call(W,kr);if(br>=1)return rt.event&&rt.event.end.call(W,W.__data__,te),--Re.count?delete Re[Se]:delete W[ve],1}rt||(He=Ee.time,pt=Ra(nr,0,He),rt=Re[Se]={tween:new S,time:He,timer:pt,delay:Ee.delay,duration:Ee.duration,ease:Ee.ease,index:te},Ee=null,++Re.count)}e.svg.axis=function(){var W=e.scale.linear(),te=fl,ve=6,Se=6,Ee=3,Re=[10],rt=null,He;function pt(Ft){Ft.each(function(){var Rt=e.select(this),ir=this.__chart__||W,nr=this.__chart__=W.copy(),Cr=rt==null?nr.ticks?nr.ticks.apply(nr,Re):nr.domain():rt,Vr=He==null?nr.tickFormat?nr.tickFormat.apply(nr,Re):O:He,sr=Rt.selectAll(".tick").data(Cr,nr),br=sr.enter().insert("g",".domain").attr("class","tick").style("opacity",Ct),kr=e.transition(sr.exit()).style("opacity",Ct).remove(),Gr=e.transition(sr.order()).style("opacity",1),Wr=Math.max(ve,0)+Ee,Ar,En=yn(nr),zn=Rt.selectAll(".domain").data([0]),Zn=(zn.enter().append("path").attr("class","domain"),e.transition(zn));br.append("line"),br.append("text");var ai=br.select("line"),Mi=Gr.select("line"),Si=sr.select("text").text(Vr),ya=br.select("text"),Y=Gr.select("text"),d=te==="top"||te==="left"?-1:1,P,N,H,$;if(te==="bottom"||te==="top"?(Ar=du,P="x",H="y",N="x2",$="y2",Si.attr("dy",d<0?"0em":".71em").style("text-anchor","middle"),Zn.attr("d","M"+En[0]+","+d*Se+"V0H"+En[1]+"V"+d*Se)):(Ar=ms,P="y",H="x",N="y2",$="x2",Si.attr("dy",".32em").style("text-anchor",d<0?"end":"start"),Zn.attr("d","M"+d*Se+","+En[0]+"H0V"+En[1]+"H"+d*Se)),ai.attr($,d*ve),ya.attr(H,d*Wr),Mi.attr(N,0).attr($,d*ve),Y.attr(P,0).attr(H,d*Wr),nr.rangeBand){var se=nr,de=se.rangeBand()/2;ir=nr=function(Ae){return se(Ae)+de}}else ir.rangeBand?ir=nr:kr.call(Ar,nr,ir);br.call(Ar,ir,nr),Gr.call(Ar,nr,nr)})}return pt.scale=function(Ft){return arguments.length?(W=Ft,pt):W},pt.orient=function(Ft){return arguments.length?(te=Ft in Fc?Ft+"":fl,pt):te},pt.ticks=function(){return arguments.length?(Re=r(arguments),pt):Re},pt.tickValues=function(Ft){return arguments.length?(rt=Ft,pt):rt},pt.tickFormat=function(Ft){return arguments.length?(He=Ft,pt):He},pt.tickSize=function(Ft){var Rt=arguments.length;return Rt?(ve=+Ft,Se=+arguments[Rt-1],pt):ve},pt.innerTickSize=function(Ft){return arguments.length?(ve=+Ft,pt):ve},pt.outerTickSize=function(Ft){return arguments.length?(Se=+Ft,pt):Se},pt.tickPadding=function(Ft){return arguments.length?(Ee=+Ft,pt):Ee},pt.tickSubdivide=function(){return arguments.length&&pt},pt};var fl="bottom",Fc={top:1,right:1,bottom:1,left:1};function du(W,te,ve){W.attr("transform",function(Se){var Ee=te(Se);return"translate("+(isFinite(Ee)?Ee:ve(Se))+",0)"})}function ms(W,te,ve){W.attr("transform",function(Se){var Ee=te(Se);return"translate(0,"+(isFinite(Ee)?Ee:ve(Se))+")"})}e.svg.brush=function(){var W=xe(Rt,"brushstart","brush","brushend"),te=null,ve=null,Se=[0,0],Ee=[0,0],Re,rt,He=!0,pt=!0,Ft=ku[0];function Rt(sr){sr.each(function(){var br=e.select(this).style("pointer-events","all").style("-webkit-tap-highlight-color","rgba(0,0,0,0)").on("mousedown.brush",Vr).on("touchstart.brush",Vr),kr=br.selectAll(".background").data([0]);kr.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),br.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var Gr=br.selectAll(".resize").data(Ft,O);Gr.exit().remove(),Gr.enter().append("g").attr("class",function(zn){return"resize "+zn}).style("cursor",function(zn){return ff[zn]}).append("rect").attr("x",function(zn){return/[ew]$/.test(zn)?-3:null}).attr("y",function(zn){return/^[ns]/.test(zn)?-3:null}).attr("width",6).attr("height",6).style("visibility","hidden"),Gr.style("display",Rt.empty()?"none":null);var Wr=e.transition(br),Ar=e.transition(kr),En;te&&(En=yn(te),Ar.attr("x",En[0]).attr("width",En[1]-En[0]),nr(Wr)),ve&&(En=yn(ve),Ar.attr("y",En[0]).attr("height",En[1]-En[0]),Cr(Wr)),ir(Wr)})}Rt.event=function(sr){sr.each(function(){var br=W.of(this,arguments),kr={x:Se,y:Ee,i:Re,j:rt},Gr=this.__chart__||kr;this.__chart__=kr,cl?e.select(this).transition().each("start.brush",function(){Re=Gr.i,rt=Gr.j,Se=Gr.x,Ee=Gr.y,br({type:"brushstart"})}).tween("brush:brush",function(){var Wr=ef(Se,kr.x),Ar=ef(Ee,kr.y);return Re=rt=null,function(En){Se=kr.x=Wr(En),Ee=kr.y=Ar(En),br({type:"brush",mode:"resize"})}}).each("end.brush",function(){Re=kr.i,rt=kr.j,br({type:"brush",mode:"resize"}),br({type:"brushend"})}):(br({type:"brushstart"}),br({type:"brush",mode:"resize"}),br({type:"brushend"}))})};function ir(sr){sr.selectAll(".resize").attr("transform",function(br){return"translate("+Se[+/e$/.test(br)]+","+Ee[+/^s/.test(br)]+")"})}function nr(sr){sr.select(".extent").attr("x",Se[0]),sr.selectAll(".extent,.n>rect,.s>rect").attr("width",Se[1]-Se[0])}function Cr(sr){sr.select(".extent").attr("y",Ee[0]),sr.selectAll(".extent,.e>rect,.w>rect").attr("height",Ee[1]-Ee[0])}function Vr(){var sr=this,br=e.select(e.event.target),kr=W.of(sr,arguments),Gr=e.select(sr),Wr=br.datum(),Ar=!/^(n|s)$/.test(Wr)&&te,En=!/^(e|w)$/.test(Wr)&&ve,zn=br.classed("extent"),Zn=or(sr),ai,Mi=e.mouse(sr),Si,ya=e.select(i(sr)).on("keydown.brush",P).on("keyup.brush",N);if(e.event.changedTouches?ya.on("touchmove.brush",H).on("touchend.brush",se):ya.on("mousemove.brush",H).on("mouseup.brush",se),Gr.interrupt().selectAll("*").interrupt(),zn)Mi[0]=Se[0]-Mi[0],Mi[1]=Ee[0]-Mi[1];else if(Wr){var Y=+/w$/.test(Wr),d=+/^n/.test(Wr);Si=[Se[1-Y]-Mi[0],Ee[1-d]-Mi[1]],Mi[0]=Se[Y],Mi[1]=Ee[d]}else e.event.altKey&&(ai=Mi.slice());Gr.style("pointer-events","none").selectAll(".resize").style("display",null),e.select("body").style("cursor",br.style("cursor")),kr({type:"brushstart"}),H();function P(){e.event.keyCode==32&&(zn||(ai=null,Mi[0]-=Se[1],Mi[1]-=Ee[1],zn=2),ce())}function N(){e.event.keyCode==32&&zn==2&&(Mi[0]+=Se[1],Mi[1]+=Ee[1],zn=0,ce())}function H(){var de=e.mouse(sr),Ae=!1;Si&&(de[0]+=Si[0],de[1]+=Si[1]),zn||(e.event.altKey?(ai||(ai=[(Se[0]+Se[1])/2,(Ee[0]+Ee[1])/2]),Mi[0]=Se[+(de[0]{(function(e,t){typeof $S=="object"&&typeof Dte!="undefined"?t($S):(e=e||self,t(e.d3=e.d3||{}))})($S,function(e){"use strict";var t=new Date,r=new Date;function n(Te,Ve,$e,ot){function tt(nt){return Te(nt=arguments.length===0?new Date:new Date(+nt)),nt}return tt.floor=function(nt){return Te(nt=new Date(+nt)),nt},tt.ceil=function(nt){return Te(nt=new Date(nt-1)),Ve(nt,1),Te(nt),nt},tt.round=function(nt){var We=tt(nt),mt=tt.ceil(nt);return nt-We0))return bt;do bt.push(Yt=new Date(+nt)),Ve(nt,mt),Te(nt);while(Yt=We)for(;Te(We),!nt(We);)We.setTime(We-1)},function(We,mt){if(We>=We)if(mt<0)for(;++mt<=0;)for(;Ve(We,-1),!nt(We););else for(;--mt>=0;)for(;Ve(We,1),!nt(We););})},$e&&(tt.count=function(nt,We){return t.setTime(+nt),r.setTime(+We),Te(t),Te(r),Math.floor($e(t,r))},tt.every=function(nt){return nt=Math.floor(nt),!isFinite(nt)||!(nt>0)?null:nt>1?tt.filter(ot?function(We){return ot(We)%nt===0}:function(We){return tt.count(0,We)%nt===0}):tt}),tt}var a=n(function(){},function(Te,Ve){Te.setTime(+Te+Ve)},function(Te,Ve){return Ve-Te});a.every=function(Te){return Te=Math.floor(Te),!isFinite(Te)||!(Te>0)?null:Te>1?n(function(Ve){Ve.setTime(Math.floor(Ve/Te)*Te)},function(Ve,$e){Ve.setTime(+Ve+$e*Te)},function(Ve,$e){return($e-Ve)/Te}):a};var i=a.range,o=1e3,s=6e4,l=36e5,u=864e5,c=6048e5,f=n(function(Te){Te.setTime(Te-Te.getMilliseconds())},function(Te,Ve){Te.setTime(+Te+Ve*o)},function(Te,Ve){return(Ve-Te)/o},function(Te){return Te.getUTCSeconds()}),v=f.range,g=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o)},function(Te,Ve){Te.setTime(+Te+Ve*s)},function(Te,Ve){return(Ve-Te)/s},function(Te){return Te.getMinutes()}),p=g.range,x=n(function(Te){Te.setTime(Te-Te.getMilliseconds()-Te.getSeconds()*o-Te.getMinutes()*s)},function(Te,Ve){Te.setTime(+Te+Ve*l)},function(Te,Ve){return(Ve-Te)/l},function(Te){return Te.getHours()}),_=x.range,y=n(function(Te){Te.setHours(0,0,0,0)},function(Te,Ve){Te.setDate(Te.getDate()+Ve)},function(Te,Ve){return(Ve-Te-(Ve.getTimezoneOffset()-Te.getTimezoneOffset())*s)/u},function(Te){return Te.getDate()-1}),C=y.range;function k(Te){return n(function(Ve){Ve.setDate(Ve.getDate()-(Ve.getDay()+7-Te)%7),Ve.setHours(0,0,0,0)},function(Ve,$e){Ve.setDate(Ve.getDate()+$e*7)},function(Ve,$e){return($e-Ve-($e.getTimezoneOffset()-Ve.getTimezoneOffset())*s)/c})}var S=k(0),L=k(1),w=k(2),A=k(3),T=k(4),m=k(5),F=k(6),E=S.range,I=L.range,R=w.range,B=A.range,O=T.range,V=m.range,j=F.range,q=n(function(Te){Te.setDate(1),Te.setHours(0,0,0,0)},function(Te,Ve){Te.setMonth(Te.getMonth()+Ve)},function(Te,Ve){return Ve.getMonth()-Te.getMonth()+(Ve.getFullYear()-Te.getFullYear())*12},function(Te){return Te.getMonth()}),U=q.range,J=n(function(Te){Te.setMonth(0,1),Te.setHours(0,0,0,0)},function(Te,Ve){Te.setFullYear(Te.getFullYear()+Ve)},function(Te,Ve){return Ve.getFullYear()-Te.getFullYear()},function(Te){return Te.getFullYear()});J.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(Ve){Ve.setFullYear(Math.floor(Ve.getFullYear()/Te)*Te),Ve.setMonth(0,1),Ve.setHours(0,0,0,0)},function(Ve,$e){Ve.setFullYear(Ve.getFullYear()+$e*Te)})};var ee=J.range,ce=n(function(Te){Te.setUTCSeconds(0,0)},function(Te,Ve){Te.setTime(+Te+Ve*s)},function(Te,Ve){return(Ve-Te)/s},function(Te){return Te.getUTCMinutes()}),ye=ce.range,xe=n(function(Te){Te.setUTCMinutes(0,0,0)},function(Te,Ve){Te.setTime(+Te+Ve*l)},function(Te,Ve){return(Ve-Te)/l},function(Te){return Te.getUTCHours()}),ue=xe.range,K=n(function(Te){Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCDate(Te.getUTCDate()+Ve)},function(Te,Ve){return(Ve-Te)/u},function(Te){return Te.getUTCDate()-1}),_e=K.range;function ne(Te){return n(function(Ve){Ve.setUTCDate(Ve.getUTCDate()-(Ve.getUTCDay()+7-Te)%7),Ve.setUTCHours(0,0,0,0)},function(Ve,$e){Ve.setUTCDate(Ve.getUTCDate()+$e*7)},function(Ve,$e){return($e-Ve)/c})}var ae=ne(0),pe=ne(1),ie=ne(2),le=ne(3),me=ne(4),be=ne(5),De=ne(6),Ge=ae.range,ht=pe.range,it=ie.range,Oe=le.range,ze=me.range,ct=be.range,et=De.range,qe=n(function(Te){Te.setUTCDate(1),Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCMonth(Te.getUTCMonth()+Ve)},function(Te,Ve){return Ve.getUTCMonth()-Te.getUTCMonth()+(Ve.getUTCFullYear()-Te.getUTCFullYear())*12},function(Te){return Te.getUTCMonth()}),we=qe.range,Le=n(function(Te){Te.setUTCMonth(0,1),Te.setUTCHours(0,0,0,0)},function(Te,Ve){Te.setUTCFullYear(Te.getUTCFullYear()+Ve)},function(Te,Ve){return Ve.getUTCFullYear()-Te.getUTCFullYear()},function(Te){return Te.getUTCFullYear()});Le.every=function(Te){return!isFinite(Te=Math.floor(Te))||!(Te>0)?null:n(function(Ve){Ve.setUTCFullYear(Math.floor(Ve.getUTCFullYear()/Te)*Te),Ve.setUTCMonth(0,1),Ve.setUTCHours(0,0,0,0)},function(Ve,$e){Ve.setUTCFullYear(Ve.getUTCFullYear()+$e*Te)})};var Ke=Le.range;e.timeDay=y,e.timeDays=C,e.timeFriday=m,e.timeFridays=V,e.timeHour=x,e.timeHours=_,e.timeInterval=n,e.timeMillisecond=a,e.timeMilliseconds=i,e.timeMinute=g,e.timeMinutes=p,e.timeMonday=L,e.timeMondays=I,e.timeMonth=q,e.timeMonths=U,e.timeSaturday=F,e.timeSaturdays=j,e.timeSecond=f,e.timeSeconds=v,e.timeSunday=S,e.timeSundays=E,e.timeThursday=T,e.timeThursdays=O,e.timeTuesday=w,e.timeTuesdays=R,e.timeWednesday=A,e.timeWednesdays=B,e.timeWeek=S,e.timeWeeks=E,e.timeYear=J,e.timeYears=ee,e.utcDay=K,e.utcDays=_e,e.utcFriday=be,e.utcFridays=ct,e.utcHour=xe,e.utcHours=ue,e.utcMillisecond=a,e.utcMilliseconds=i,e.utcMinute=ce,e.utcMinutes=ye,e.utcMonday=pe,e.utcMondays=ht,e.utcMonth=qe,e.utcMonths=we,e.utcSaturday=De,e.utcSaturdays=et,e.utcSecond=f,e.utcSeconds=v,e.utcSunday=ae,e.utcSundays=Ge,e.utcThursday=me,e.utcThursdays=ze,e.utcTuesday=ie,e.utcTuesdays=it,e.utcWednesday=le,e.utcWednesdays=Oe,e.utcWeek=ae,e.utcWeeks=Ge,e.utcYear=Le,e.utcYears=Ke,Object.defineProperty(e,"__esModule",{value:!0})})});var lb=fe((KS,Rte)=>{(function(e,t){typeof KS=="object"&&typeof Rte!="undefined"?t(KS,HI()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(KS,function(e,t){"use strict";function r(ft){if(0<=ft.y&&ft.y<100){var kt=new Date(-1,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L);return kt.setFullYear(ft.y),kt}return new Date(ft.y,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L)}function n(ft){if(0<=ft.y&&ft.y<100){var kt=new Date(Date.UTC(-1,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L));return kt.setUTCFullYear(ft.y),kt}return new Date(Date.UTC(ft.y,ft.m,ft.d,ft.H,ft.M,ft.S,ft.L))}function a(ft,kt,rr){return{y:ft,m:kt,d:rr,H:0,M:0,S:0,L:0}}function i(ft){var kt=ft.dateTime,rr=ft.date,pr=ft.time,Kr=ft.periods,Nr=ft.days,dn=ft.shortDays,xr=ft.months,Fr=ft.shortMonths,Zr=v(Kr),Cn=g(Kr),Dt=v(Nr),At=g(Nr),Vt=v(dn),Qt=g(dn),Ut=v(xr),_r=g(xr),rn=v(Fr),Jr=g(Fr),qn={a:sl,A:Eo,b:ao,B:Da,c:null,d:q,e:q,f:ye,g:be,G:Ge,H:U,I:J,j:ee,L:ce,m:xe,M:ue,p:bl,q:bo,Q:or,s:fr,S:K,u:_e,U:ne,V:pe,w:ie,W:le,x:null,X:null,y:me,Y:De,Z:ht,"%":mr},ri={a:Zs,A:su,b:fc,B:Af,c:null,d:it,e:it,f:qe,g:mt,G:Yt,H:Oe,I:ze,j:ct,L:et,m:we,M:Le,p:ut,q:Jt,Q:or,s:fr,S:Ke,u:Te,U:Ve,V:ot,w:tt,W:nt,x:null,X:null,y:We,Y:bt,Z:jt,"%":mr},Jn={a:va,A:Xi,b:oa,B:Ma,c:Ga,d:T,e:T,f:B,g:S,G:k,H:F,I:F,j:m,L:R,m:A,M:E,p:ha,q:w,Q:V,s:j,S:I,u:x,U:_,V:y,w:p,W:C,x:ss,X:mo,y:S,Y:k,Z:L,"%":O};qn.x=Ii(rr,qn),qn.X=Ii(pr,qn),qn.c=Ii(kt,qn),ri.x=Ii(rr,ri),ri.X=Ii(pr,ri),ri.c=Ii(kt,ri);function Ii(er,wr){return function(nn){var Dr=[],bn=-1,Yr=0,Tn=er.length,Kn,Qn,Ai;for(nn instanceof Date||(nn=new Date(+nn));++bn53)return null;"w"in Dr||(Dr.w=1),"Z"in Dr?(Yr=n(a(Dr.y,0,1)),Tn=Yr.getUTCDay(),Yr=Tn>4||Tn===0?t.utcMonday.ceil(Yr):t.utcMonday(Yr),Yr=t.utcDay.offset(Yr,(Dr.V-1)*7),Dr.y=Yr.getUTCFullYear(),Dr.m=Yr.getUTCMonth(),Dr.d=Yr.getUTCDate()+(Dr.w+6)%7):(Yr=r(a(Dr.y,0,1)),Tn=Yr.getDay(),Yr=Tn>4||Tn===0?t.timeMonday.ceil(Yr):t.timeMonday(Yr),Yr=t.timeDay.offset(Yr,(Dr.V-1)*7),Dr.y=Yr.getFullYear(),Dr.m=Yr.getMonth(),Dr.d=Yr.getDate()+(Dr.w+6)%7)}else("W"in Dr||"U"in Dr)&&("w"in Dr||(Dr.w="u"in Dr?Dr.u%7:"W"in Dr?1:0),Tn="Z"in Dr?n(a(Dr.y,0,1)).getUTCDay():r(a(Dr.y,0,1)).getDay(),Dr.m=0,Dr.d="W"in Dr?(Dr.w+6)%7+Dr.W*7-(Tn+5)%7:Dr.w+Dr.U*7-(Tn+6)%7);return"Z"in Dr?(Dr.H+=Dr.Z/100|0,Dr.M+=Dr.Z%100,n(Dr)):r(Dr)}}function ra(er,wr,nn,Dr){for(var bn=0,Yr=wr.length,Tn=nn.length,Kn,Qn;bn=Tn)return-1;if(Kn=wr.charCodeAt(bn++),Kn===37){if(Kn=wr.charAt(bn++),Qn=Jn[Kn in o?wr.charAt(bn++):Kn],!Qn||(Dr=Qn(er,nn,Dr))<0)return-1}else if(Kn!=nn.charCodeAt(Dr++))return-1}return Dr}function ha(er,wr,nn){var Dr=Zr.exec(wr.slice(nn));return Dr?(er.p=Cn[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function va(er,wr,nn){var Dr=Vt.exec(wr.slice(nn));return Dr?(er.w=Qt[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Xi(er,wr,nn){var Dr=Dt.exec(wr.slice(nn));return Dr?(er.w=At[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function oa(er,wr,nn){var Dr=rn.exec(wr.slice(nn));return Dr?(er.m=Jr[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Ma(er,wr,nn){var Dr=Ut.exec(wr.slice(nn));return Dr?(er.m=_r[Dr[0].toLowerCase()],nn+Dr[0].length):-1}function Ga(er,wr,nn){return ra(er,kt,wr,nn)}function ss(er,wr,nn){return ra(er,rr,wr,nn)}function mo(er,wr,nn){return ra(er,pr,wr,nn)}function sl(er){return dn[er.getDay()]}function Eo(er){return Nr[er.getDay()]}function ao(er){return Fr[er.getMonth()]}function Da(er){return xr[er.getMonth()]}function bl(er){return Kr[+(er.getHours()>=12)]}function bo(er){return 1+~~(er.getMonth()/3)}function Zs(er){return dn[er.getUTCDay()]}function su(er){return Nr[er.getUTCDay()]}function fc(er){return Fr[er.getUTCMonth()]}function Af(er){return xr[er.getUTCMonth()]}function ut(er){return Kr[+(er.getUTCHours()>=12)]}function Jt(er){return 1+~~(er.getUTCMonth()/3)}return{format:function(er){var wr=Ii(er+="",qn);return wr.toString=function(){return er},wr},parse:function(er){var wr=Vi(er+="",!1);return wr.toString=function(){return er},wr},utcFormat:function(er){var wr=Ii(er+="",ri);return wr.toString=function(){return er},wr},utcParse:function(er){var wr=Vi(er+="",!0);return wr.toString=function(){return er},wr}}}var o={"-":"",_:" ",0:"0"},s=/^\s*\d+/,l=/^%/,u=/[\\^$*+?|[\]().{}]/g;function c(ft,kt,rr){var pr=ft<0?"-":"",Kr=(pr?-ft:ft)+"",Nr=Kr.length;return pr+(Nr68?1900:2e3),rr+pr[0].length):-1}function L(ft,kt,rr){var pr=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(kt.slice(rr,rr+6));return pr?(ft.Z=pr[1]?0:-(pr[2]+(pr[3]||"00")),rr+pr[0].length):-1}function w(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+1));return pr?(ft.q=pr[0]*3-3,rr+pr[0].length):-1}function A(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.m=pr[0]-1,rr+pr[0].length):-1}function T(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.d=+pr[0],rr+pr[0].length):-1}function m(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+3));return pr?(ft.m=0,ft.d=+pr[0],rr+pr[0].length):-1}function F(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.H=+pr[0],rr+pr[0].length):-1}function E(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.M=+pr[0],rr+pr[0].length):-1}function I(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+2));return pr?(ft.S=+pr[0],rr+pr[0].length):-1}function R(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+3));return pr?(ft.L=+pr[0],rr+pr[0].length):-1}function B(ft,kt,rr){var pr=s.exec(kt.slice(rr,rr+6));return pr?(ft.L=Math.floor(pr[0]/1e3),rr+pr[0].length):-1}function O(ft,kt,rr){var pr=l.exec(kt.slice(rr,rr+1));return pr?rr+pr[0].length:-1}function V(ft,kt,rr){var pr=s.exec(kt.slice(rr));return pr?(ft.Q=+pr[0],rr+pr[0].length):-1}function j(ft,kt,rr){var pr=s.exec(kt.slice(rr));return pr?(ft.s=+pr[0],rr+pr[0].length):-1}function q(ft,kt){return c(ft.getDate(),kt,2)}function U(ft,kt){return c(ft.getHours(),kt,2)}function J(ft,kt){return c(ft.getHours()%12||12,kt,2)}function ee(ft,kt){return c(1+t.timeDay.count(t.timeYear(ft),ft),kt,3)}function ce(ft,kt){return c(ft.getMilliseconds(),kt,3)}function ye(ft,kt){return ce(ft,kt)+"000"}function xe(ft,kt){return c(ft.getMonth()+1,kt,2)}function ue(ft,kt){return c(ft.getMinutes(),kt,2)}function K(ft,kt){return c(ft.getSeconds(),kt,2)}function _e(ft){var kt=ft.getDay();return kt===0?7:kt}function ne(ft,kt){return c(t.timeSunday.count(t.timeYear(ft)-1,ft),kt,2)}function ae(ft){var kt=ft.getDay();return kt>=4||kt===0?t.timeThursday(ft):t.timeThursday.ceil(ft)}function pe(ft,kt){return ft=ae(ft),c(t.timeThursday.count(t.timeYear(ft),ft)+(t.timeYear(ft).getDay()===4),kt,2)}function ie(ft){return ft.getDay()}function le(ft,kt){return c(t.timeMonday.count(t.timeYear(ft)-1,ft),kt,2)}function me(ft,kt){return c(ft.getFullYear()%100,kt,2)}function be(ft,kt){return ft=ae(ft),c(ft.getFullYear()%100,kt,2)}function De(ft,kt){return c(ft.getFullYear()%1e4,kt,4)}function Ge(ft,kt){var rr=ft.getDay();return ft=rr>=4||rr===0?t.timeThursday(ft):t.timeThursday.ceil(ft),c(ft.getFullYear()%1e4,kt,4)}function ht(ft){var kt=ft.getTimezoneOffset();return(kt>0?"-":(kt*=-1,"+"))+c(kt/60|0,"0",2)+c(kt%60,"0",2)}function it(ft,kt){return c(ft.getUTCDate(),kt,2)}function Oe(ft,kt){return c(ft.getUTCHours(),kt,2)}function ze(ft,kt){return c(ft.getUTCHours()%12||12,kt,2)}function ct(ft,kt){return c(1+t.utcDay.count(t.utcYear(ft),ft),kt,3)}function et(ft,kt){return c(ft.getUTCMilliseconds(),kt,3)}function qe(ft,kt){return et(ft,kt)+"000"}function we(ft,kt){return c(ft.getUTCMonth()+1,kt,2)}function Le(ft,kt){return c(ft.getUTCMinutes(),kt,2)}function Ke(ft,kt){return c(ft.getUTCSeconds(),kt,2)}function Te(ft){var kt=ft.getUTCDay();return kt===0?7:kt}function Ve(ft,kt){return c(t.utcSunday.count(t.utcYear(ft)-1,ft),kt,2)}function $e(ft){var kt=ft.getUTCDay();return kt>=4||kt===0?t.utcThursday(ft):t.utcThursday.ceil(ft)}function ot(ft,kt){return ft=$e(ft),c(t.utcThursday.count(t.utcYear(ft),ft)+(t.utcYear(ft).getUTCDay()===4),kt,2)}function tt(ft){return ft.getUTCDay()}function nt(ft,kt){return c(t.utcMonday.count(t.utcYear(ft)-1,ft),kt,2)}function We(ft,kt){return c(ft.getUTCFullYear()%100,kt,2)}function mt(ft,kt){return ft=$e(ft),c(ft.getUTCFullYear()%100,kt,2)}function bt(ft,kt){return c(ft.getUTCFullYear()%1e4,kt,4)}function Yt(ft,kt){var rr=ft.getUTCDay();return ft=rr>=4||rr===0?t.utcThursday(ft):t.utcThursday.ceil(ft),c(ft.getUTCFullYear()%1e4,kt,4)}function jt(){return"+0000"}function mr(){return"%"}function or(ft){return+ft}function fr(ft){return Math.floor(+ft/1e3)}var Ot;cr({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 cr(ft){return Ot=i(ft),e.timeFormat=Ot.format,e.timeParse=Ot.parse,e.utcFormat=Ot.utcFormat,e.utcParse=Ot.utcParse,Ot}var Ct="%Y-%m-%dT%H:%M:%S.%LZ";function wt(ft){return ft.toISOString()}var Tt=Date.prototype.toISOString?wt:e.utcFormat(Ct);function Mt(ft){var kt=new Date(ft);return isNaN(kt)?null:kt}var Lt=+new Date("2000-01-01T00:00:00.000Z")?Mt:e.utcParse(Ct);e.isoFormat=Tt,e.isoParse=Lt,e.timeFormatDefaultLocale=cr,e.timeFormatLocale=i,Object.defineProperty(e,"__esModule",{value:!0})})});var jI=fe((JS,Ite)=>{(function(e,t){typeof JS=="object"&&typeof Ite!="undefined"?t(JS):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(JS,(function(e){"use strict";function t(A){return Math.abs(A=Math.round(A))>=1e21?A.toLocaleString("en").replace(/,/g,""):A.toString(10)}function r(A,T){if((m=(A=T?A.toExponential(T-1):A.toExponential()).indexOf("e"))<0)return null;var m,F=A.slice(0,m);return[F.length>1?F[0]+F.slice(2):F,+A.slice(m+1)]}function n(A){return A=r(Math.abs(A)),A?A[1]:NaN}function a(A,T){return function(m,F){for(var E=m.length,I=[],R=0,B=A[0],O=0;E>0&&B>0&&(O+B+1>F&&(B=Math.max(1,F-O)),I.push(m.substring(E-=B,E+B)),!((O+=B+1)>F));)B=A[R=(R+1)%A.length];return I.reverse().join(T)}}function i(A){return function(T){return T.replace(/[0-9]/g,function(m){return A[+m]})}}var o=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function s(A){if(!(T=o.exec(A)))throw new Error("invalid format: "+A);var T;return new l({fill:T[1],align:T[2],sign:T[3],symbol:T[4],zero:T[5],width:T[6],comma:T[7],precision:T[8]&&T[8].slice(1),trim:T[9],type:T[10]})}s.prototype=l.prototype;function l(A){this.fill=A.fill===void 0?" ":A.fill+"",this.align=A.align===void 0?">":A.align+"",this.sign=A.sign===void 0?"-":A.sign+"",this.symbol=A.symbol===void 0?"":A.symbol+"",this.zero=!!A.zero,this.width=A.width===void 0?void 0:+A.width,this.comma=!!A.comma,this.precision=A.precision===void 0?void 0:+A.precision,this.trim=!!A.trim,this.type=A.type===void 0?"":A.type+""}l.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 u(A){e:for(var T=A.length,m=1,F=-1,E;m0&&(F=0);break}return F>0?A.slice(0,F)+A.slice(E+1):A}var c;function f(A,T){var m=r(A,T);if(!m)return A+"";var F=m[0],E=m[1],I=E-(c=Math.max(-8,Math.min(8,Math.floor(E/3)))*3)+1,R=F.length;return I===R?F:I>R?F+new Array(I-R+1).join("0"):I>0?F.slice(0,I)+"."+F.slice(I):"0."+new Array(1-I).join("0")+r(A,Math.max(0,T+I-1))[0]}function v(A,T){var m=r(A,T);if(!m)return A+"";var F=m[0],E=m[1];return E<0?"0."+new Array(-E).join("0")+F:F.length>E+1?F.slice(0,E+1)+"."+F.slice(E+1):F+new Array(E-F.length+2).join("0")}var g={"%":function(A,T){return(A*100).toFixed(T)},b:function(A){return Math.round(A).toString(2)},c:function(A){return A+""},d:t,e:function(A,T){return A.toExponential(T)},f:function(A,T){return A.toFixed(T)},g:function(A,T){return A.toPrecision(T)},o:function(A){return Math.round(A).toString(8)},p:function(A,T){return v(A*100,T)},r:v,s:f,X:function(A){return Math.round(A).toString(16).toUpperCase()},x:function(A){return Math.round(A).toString(16)}};function p(A){return A}var x=Array.prototype.map,_=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function y(A){var T=A.grouping===void 0||A.thousands===void 0?p:a(x.call(A.grouping,Number),A.thousands+""),m=A.currency===void 0?"":A.currency[0]+"",F=A.currency===void 0?"":A.currency[1]+"",E=A.decimal===void 0?".":A.decimal+"",I=A.numerals===void 0?p:i(x.call(A.numerals,String)),R=A.percent===void 0?"%":A.percent+"",B=A.minus===void 0?"-":A.minus+"",O=A.nan===void 0?"NaN":A.nan+"";function V(q){q=s(q);var U=q.fill,J=q.align,ee=q.sign,ce=q.symbol,ye=q.zero,xe=q.width,ue=q.comma,K=q.precision,_e=q.trim,ne=q.type;ne==="n"?(ue=!0,ne="g"):g[ne]||(K===void 0&&(K=12),_e=!0,ne="g"),(ye||U==="0"&&J==="=")&&(ye=!0,U="0",J="=");var ae=ce==="$"?m:ce==="#"&&/[boxX]/.test(ne)?"0"+ne.toLowerCase():"",pe=ce==="$"?F:/[%p]/.test(ne)?R:"",ie=g[ne],le=/[defgprs%]/.test(ne);K=K===void 0?6:/[gprs]/.test(ne)?Math.max(1,Math.min(21,K)):Math.max(0,Math.min(20,K));function me(be){var De=ae,Ge=pe,ht,it,Oe;if(ne==="c")Ge=ie(be)+Ge,be="";else{be=+be;var ze=be<0||1/be<0;if(be=isNaN(be)?O:ie(Math.abs(be),K),_e&&(be=u(be)),ze&&+be==0&&ee!=="+"&&(ze=!1),De=(ze?ee==="("?ee:B:ee==="-"||ee==="("?"":ee)+De,Ge=(ne==="s"?_[8+c/3]:"")+Ge+(ze&&ee==="("?")":""),le){for(ht=-1,it=be.length;++htOe||Oe>57){Ge=(Oe===46?E+be.slice(ht+1):be.slice(ht))+Ge,be=be.slice(0,ht);break}}}ue&&!ye&&(be=T(be,1/0));var ct=De.length+be.length+Ge.length,et=ct>1)+De+be+Ge+et.slice(ct);break;default:be=et+De+be+Ge;break}return I(be)}return me.toString=function(){return q+""},me}function j(q,U){var J=V((q=s(q),q.type="f",q)),ee=Math.max(-8,Math.min(8,Math.floor(n(U)/3)))*3,ce=Math.pow(10,-ee),ye=_[8+ee/3];return function(xe){return J(ce*xe)+ye}}return{format:V,formatPrefix:j}}var C;k({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});function k(A){return C=y(A),e.format=C.format,e.formatPrefix=C.formatPrefix,C}function S(A){return Math.max(0,-n(Math.abs(A)))}function L(A,T){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(n(T)/3)))*3-n(Math.abs(A)))}function w(A,T){return A=Math.abs(A),T=Math.abs(T)-A,Math.max(0,n(T)-n(A))+1}e.FormatSpecifier=l,e.formatDefaultLocale=k,e.formatLocale=y,e.formatSpecifier=s,e.precisionFixed=S,e.precisionPrefix=L,e.precisionRound=w,Object.defineProperty(e,"__esModule",{value:!0})}))});var qte=fe((Hcr,zte)=>{"use strict";zte.exports=function(e){for(var t=e.length,r,n=0;n13)&&r!==32&&r!==133&&r!==160&&r!==5760&&r!==6158&&(r<8192||r>8205)&&r!==8232&&r!==8233&&r!==8239&&r!==8287&&r!==8288&&r!==12288&&r!==65279)return!1;return!0}});var aa=fe((jcr,Bte)=>{"use strict";var Cat=qte();Bte.exports=function(e){var t=typeof e;if(t==="string"){var r=e;if(e=+e,e===0&&Cat(r))return!1}else if(t!=="number")return!1;return e-e<1}});var Wa=fe((Wcr,Ote)=>{"use strict";Ote.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,ONEMILLI:1,ONEMICROSEC:.001,EPOCHJD:24405875e-1,ALMOST_EQUAL:1-1e-6,LOG_CLIP:10,MINUS_SIGN:"\u2212"}});var WI=fe((QS,Nte)=>{(function(e,t){typeof QS=="object"&&typeof Nte!="undefined"?t(QS):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e["base64-arraybuffer"]={}))})(QS,(function(e){"use strict";for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array=="undefined"?[]:new Uint8Array(256),n=0;n>2],c+=t[(s[l]&3)<<4|s[l+1]>>4],c+=t[(s[l+1]&15)<<2|s[l+2]>>6],c+=t[s[l+2]&63];return u%3===2?c=c.substring(0,c.length-1)+"=":u%3===1&&(c=c.substring(0,c.length-2)+"=="),c},i=function(o){var s=o.length*.75,l=o.length,u,c=0,f,v,g,p;o[o.length-1]==="="&&(s--,o[o.length-2]==="="&&s--);var x=new ArrayBuffer(s),_=new Uint8Array(x);for(u=0;u>4,_[c++]=(v&15)<<4|g>>2,_[c++]=(g&3)<<6|p&63;return x};e.decode=i,e.encode=a,Object.defineProperty(e,"__esModule",{value:!0})}))});var em=fe((Ycr,Ute)=>{"use strict";Ute.exports=function(t){return window&&window.process&&window.process.versions?Object.prototype.toString.call(t)==="[object Object]":Object.prototype.toString.call(t)==="[object Object]"&&Object.getPrototypeOf(t).hasOwnProperty("hasOwnProperty")}});var Gf=fe(Zv=>{"use strict";var Lat=WI().decode,Pat=em(),YI=Array.isArray,Fat=ArrayBuffer,Dat=DataView;function Vte(e){return Fat.isView(e)&&!(e instanceof Dat)}Zv.isTypedArray=Vte;function eE(e){return YI(e)||Vte(e)}Zv.isArrayOrTypedArray=eE;function Rat(e){return!eE(e[0])}Zv.isArray1D=Rat;Zv.ensureArray=function(e,t){return YI(e)||(e=[]),e.length=t,e};var vf={u1c:typeof Uint8ClampedArray=="undefined"?void 0:Uint8ClampedArray,i1:typeof Int8Array=="undefined"?void 0:Int8Array,u1:typeof Uint8Array=="undefined"?void 0:Uint8Array,i2:typeof Int16Array=="undefined"?void 0:Int16Array,u2:typeof Uint16Array=="undefined"?void 0:Uint16Array,i4:typeof Int32Array=="undefined"?void 0:Int32Array,u4:typeof Uint32Array=="undefined"?void 0:Uint32Array,f4:typeof Float32Array=="undefined"?void 0:Float32Array,f8:typeof Float64Array=="undefined"?void 0:Float64Array};vf.uint8c=vf.u1c;vf.uint8=vf.u1;vf.int8=vf.i1;vf.uint16=vf.u2;vf.int16=vf.i2;vf.uint32=vf.u4;vf.int32=vf.i4;vf.float32=vf.f4;vf.float64=vf.f8;function XI(e){return e.constructor===ArrayBuffer}Zv.isArrayBuffer=XI;Zv.decodeTypedArraySpec=function(e){var t=[],r=Iat(e),n=r.dtype,a=vf[n];if(!a)throw new Error('Error in dtype: "'+n+'"');var i=a.BYTES_PER_ELEMENT,o=r.bdata;XI(o)||(o=Lat(o));var s=r.shape===void 0?[o.byteLength/i]:(""+r.shape).split(",");s.reverse();var l=s.length,u,c,f=+s[0],v=i*f,g=0;if(l===1)t=new a(o);else if(l===2)for(u=+s[1],c=0;c{"use strict";var Hte=aa(),$I=Gf().isArrayOrTypedArray;Xte.exports=function(t,r){if(Hte(r))r=String(r);else if(typeof r!="string"||r.slice(-4)==="[-1]")throw"bad property string";var n=r.split("."),a,i,o,s;for(s=0;s{"use strict";var ub=M4(),Nat=/^\w*$/,Uat=0,Zte=1,tE=2,$te=3,ux=4;Kte.exports=function(t,r,n,a){n=n||"name",a=a||"value";var i,o,s,l={};r&&r.length?(s=ub(t,r),o=s.get()):o=t,r=r||"";var u={};if(o)for(i=0;i2)return l[g]=l[g]|tE,f.set(v,null);if(c){for(i=g;i{"use strict";var Vat=/^(.*)(\.[^\.\[\]]+|\[\d\])$/,Gat=/^[^\.\[\]]+$/;Qte.exports=function(e,t){for(;t;){var r=e.match(Vat);if(r)e=r[1];else if(e.match(Gat))e="";else throw new Error("bad relativeAttr call:"+[e,t]);if(t.charAt(0)==="^")t=t.slice(1);else break}return e&&t.charAt(0)!=="["?e+"."+t:e+t}});var rE=fe((Jcr,tre)=>{"use strict";var Hat=aa();tre.exports=function(t,r){if(t>0)return Math.log(t)/Math.LN10;var n=Math.log(Math.min(r[0],r[1]))/Math.LN10;return Hat(n)||(n=Math.log(Math.max(r[0],r[1]))/Math.LN10-6),n}});var ire=fe((Qcr,nre)=>{"use strict";var rre=Gf().isArrayOrTypedArray,S4=em();nre.exports=function e(t,r){for(var n in r){var a=r[n],i=t[n];if(i!==a)if(n.charAt(0)==="_"||typeof a=="function"){if(n in t)continue;t[n]=a}else if(rre(a)&&rre(i)&&S4(a[0])){if(n==="customdata"||n==="ids")continue;for(var o=Math.min(a.length,i.length),s=0;sjat,modHalf:()=>Wat});function jat(e,t){let r=e%t;return r<0?r+t:r}function Wat(e,t){return Math.abs(e)>t/2?e-Math.round(e/t)*t:e}var fb=Co(()=>{"use strict"});var ta=fe(C4=>{"use strict";var are=em(),E4=Array.isArray;function Yat(e,t){var r,n;for(r=0;r{"use strict";ore.exports=function(e){var t=e.variantValues,r=e.editType,n=e.colorEditType;n===void 0&&(n=r);var a={editType:r,valType:"integer",min:1,max:1e3,extras:["normal","bold"],dflt:"normal"};e.noNumericWeightValues&&(a.valType="enumerated",a.values=a.extras,a.extras=void 0,a.min=void 0,a.max=void 0);var i={family:{valType:"string",noBlank:!0,strict:!0,editType:r},size:{valType:"number",min:1,editType:r},color:{valType:"color",editType:n},weight:a,style:{editType:r,valType:"enumerated",values:["normal","italic"],dflt:"normal"},variant:e.noFontVariant?void 0:{editType:r,valType:"enumerated",values:t||["normal","small-caps","all-small-caps","all-petite-caps","petite-caps","unicase"],dflt:"normal"},textcase:e.noFontTextcase?void 0:{editType:r,valType:"enumerated",values:["normal","word caps","upper","lower"],dflt:"normal"},lineposition:e.noFontLineposition?void 0:{editType:r,valType:"flaglist",flags:["under","over","through"],extras:["none"],dflt:"none"},shadow:e.noFontShadow?void 0:{editType:r,valType:"string",dflt:e.autoShadowDflt?"auto":"none"},editType:r};return e.autoSize&&(i.size.dflt="auto"),e.autoColor&&(i.color.dflt="auto"),e.arrayOk&&(i.family.arrayOk=!0,i.weight.arrayOk=!0,i.style.arrayOk=!0,e.noFontVariant||(i.variant.arrayOk=!0),e.noFontTextcase||(i.textcase.arrayOk=!0),e.noFontLineposition||(i.lineposition.arrayOk=!0),e.noFontShadow||(i.shadow.arrayOk=!0),i.size.arrayOk=!0,i.color.arrayOk=!0),i}});var L4=fe((rfr,sre)=>{"use strict";sre.exports={YANGLE:60,HOVERARROWSIZE:6,HOVERTEXTPAD:3,HOVERFONTSIZE:13,HOVERFONT:"Arial, sans-serif",HOVERMINTIME:50,HOVERID:"-hover"}});var tm=fe((nfr,cre)=>{"use strict";var lre=L4(),ure=Ds(),KI=ure({editType:"none"});KI.family.dflt=lre.HOVERFONT;KI.size.dflt=lre.HOVERFONTSIZE;cre.exports={clickmode:{valType:"flaglist",flags:["event","select"],dflt:"event",editType:"plot",extras:["none"]},dragmode:{valType:"enumerated",values:["zoom","pan","select","lasso","drawclosedpath","drawopenpath","drawline","drawrect","drawcircle","orbit","turntable",!1],dflt:"zoom",editType:"modebar"},hovermode:{valType:"enumerated",values:["x","y","closest",!1,"x unified","y unified"],dflt:"closest",editType:"modebar"},hoversort:{valType:"enumerated",values:["trace","value descending","value ascending"],dflt:"trace",editType:"none"},hoversubplots:{valType:"enumerated",values:["single","overlaying","axis"],dflt:"overlaying",editType:"none"},hoveranywhere:{valType:"boolean",dflt:!1,editType:"none"},clickanywhere:{valType:"boolean",dflt:!1,editType:"none"},hoverdistance:{valType:"integer",min:-1,dflt:20,editType:"none"},spikedistance:{valType:"integer",min:-1,dflt:-1,editType:"none"},hoverlabel:{bgcolor:{valType:"color",editType:"none"},bordercolor:{valType:"color",editType:"none"},font:KI,grouptitlefont:ure({editType:"none"}),align:{valType:"enumerated",values:["left","right","auto"],dflt:"auto",editType:"none"},namelength:{valType:"integer",min:-1,dflt:15,editType:"none"},showarrow:{valType:"boolean",dflt:!0,editType:"none"},editType:"none"},selectdirection:{valType:"enumerated",values:["h","v","d","any"],dflt:"any",editType:"none"}}});var hb=fe((ifr,fre)=>{"use strict";var Xat=Ds(),P4=tm().hoverlabel,F4=ta().extendFlat;fre.exports={hoverlabel:{bgcolor:F4({},P4.bgcolor,{arrayOk:!0}),bordercolor:F4({},P4.bordercolor,{arrayOk:!0}),font:Xat({arrayOk:!0,editType:"none"}),align:F4({},P4.align,{arrayOk:!0}),namelength:F4({},P4.namelength,{arrayOk:!0}),showarrow:F4({},P4.showarrow),editType:"none"}}});var Ho=fe((afr,hre)=>{"use strict";var Zat=Ds(),$at=hb();hre.exports={type:{valType:"enumerated",values:[],dflt:"scatter",editType:"calc+clearAxisTypes",_noTemplating:!0},visible:{valType:"enumerated",values:[!0,!1,"legendonly"],dflt:!0,editType:"calc"},showlegend:{valType:"boolean",dflt:!0,editType:"style"},legend:{valType:"subplotid",dflt:"legend",editType:"style"},legendgroup:{valType:"string",dflt:"",editType:"style"},legendgrouptitle:{text:{valType:"string",dflt:"",editType:"style"},font:Zat({editType:"style"}),editType:"style"},legendrank:{valType:"number",dflt:1e3,editType:"style"},legendwidth:{valType:"number",min:0,editType:"style"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"style"},name:{valType:"string",editType:"style"},uid:{valType:"string",editType:"plot",anim:!0},ids:{valType:"data_array",editType:"calc",anim:!0},customdata:{valType:"data_array",editType:"calc"},meta:{valType:"any",arrayOk:!0,editType:"plot"},selectedpoints:{valType:"any",editType:"calc"},hoverinfo:{valType:"flaglist",flags:["x","y","z","text","name"],extras:["all","none","skip"],arrayOk:!0,dflt:"all",editType:"none"},hoverlabel:$at.hoverlabel,uirevision:{valType:"any",editType:"none"}}});var iie=fe((hfr,nie)=>{var Gz=Object.defineProperty,Kat=Object.getOwnPropertyDescriptor,Jat=Object.getOwnPropertyNames,Qat=Object.prototype.hasOwnProperty,eot=(e,t)=>{for(var r in t)Gz(e,r,{get:t[r],enumerable:!0})},tot=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of Jat(t))!Qat.call(e,a)&&a!==r&&Gz(e,a,{get:()=>t[a],enumerable:!(n=Kat(t,a))||n.enumerable});return e},rot=e=>tot(Gz({},"__esModule",{value:!0}),e),wre={};eot(wre,{a98:()=>Yut,average:()=>Jot,averageAngle:()=>Op,averageNumber:()=>Ore,blend:()=>Klt,blerp:()=>Tz,clampChroma:()=>mut,clampGamut:()=>gq,clampRgb:()=>gut,colorsNamed:()=>Are,convertA98ToXyz65:()=>Az,convertCubehelixToRgb:()=>qre,convertDlchToLab65:()=>fE,convertHsiToRgb:()=>Yre,convertHslToRgb:()=>$re,convertHsvToRgb:()=>Zz,convertHwbToRgb:()=>ene,convertItpToXyz65:()=>Sz,convertJabToJch:()=>kz,convertJabToRgb:()=>tq,convertJabToXyz65:()=>Qz,convertJchToJab:()=>Cz,convertLab65ToDlch:()=>hE,convertLab65ToRgb:()=>N4,convertLab65ToXyz65:()=>Wz,convertLabToLch:()=>H1,convertLabToRgb:()=>nq,convertLabToXyz50:()=>wE,convertLchToLab:()=>j1,convertLchuvToLuv:()=>oq,convertLrgbToOklab:()=>sq,convertLrgbToRgb:()=>gx,convertLuvToLchuv:()=>aq,convertLuvToXyz50:()=>vE,convertOkhslToOklab:()=>Fz,convertOkhsvToOklab:()=>Rz,convertOklabToLrgb:()=>_b,convertOklabToOkhsl:()=>Pz,convertOklabToOkhsv:()=>Dz,convertOklabToRgb:()=>G4,convertP3ToXyz65:()=>Iz,convertProphotoToXyz50:()=>Bz,convertRec2020ToXyz65:()=>Nz,convertRgbToCubehelix:()=>zre,convertRgbToHsi:()=>Xre,convertRgbToHsl:()=>Kre,convertRgbToHsv:()=>$z,convertRgbToHwb:()=>tne,convertRgbToJab:()=>eq,convertRgbToLab:()=>iq,convertRgbToLab65:()=>U4,convertRgbToLrgb:()=>px,convertRgbToOklab:()=>V4,convertRgbToXyb:()=>Cne,convertRgbToXyz50:()=>xb,convertRgbToXyz65:()=>rm,convertRgbToYiq:()=>zne,convertXybToRgb:()=>Lne,convertXyz50ToLab:()=>TE,convertXyz50ToLuv:()=>dE,convertXyz50ToProphoto:()=>qz,convertXyz50ToRgb:()=>yb,convertXyz50ToXyz65:()=>Rne,convertXyz65ToA98:()=>Mz,convertXyz65ToItp:()=>Ez,convertXyz65ToJab:()=>Jz,convertXyz65ToLab65:()=>Yz,convertXyz65ToP3:()=>zz,convertXyz65ToRec2020:()=>Oz,convertXyz65ToRgb:()=>nm,convertXyz65ToXyz50:()=>Dne,convertYiqToRgb:()=>qne,converter:()=>dl,cubehelix:()=>Xut,differenceCie76:()=>jot,differenceCie94:()=>Wot,differenceCiede2000:()=>Yot,differenceCmc:()=>Xot,differenceEuclidean:()=>mb,differenceHueChroma:()=>O4,differenceHueNaive:()=>Bre,differenceHueSaturation:()=>B4,differenceHyab:()=>Zot,differenceItp:()=>Kot,differenceKotsarenkoRamos:()=>$ot,displayable:()=>pq,dlab:()=>Zut,dlch:()=>$ut,easingGamma:()=>Jne,easingInOutSine:()=>jut,easingMidpoint:()=>jne,easingSmootherstep:()=>Gut,easingSmoothstep:()=>Nut,easingSmoothstepInverse:()=>Uut,filterBrightness:()=>Sut,filterContrast:()=>Eut,filterDeficiencyDeuter:()=>But,filterDeficiencyProt:()=>qut,filterDeficiencyTrit:()=>Out,filterGrayscale:()=>Lut,filterHueRotate:()=>Fut,filterInvert:()=>Put,filterSaturate:()=>Cut,filterSepia:()=>kut,fixupAlpha:()=>Nc,fixupHueDecreasing:()=>Not,fixupHueIncreasing:()=>Oot,fixupHueLonger:()=>Bot,fixupHueShorter:()=>Bp,formatCss:()=>Hlt,formatHex:()=>jlt,formatHex8:()=>Wlt,formatHsl:()=>Xlt,formatRgb:()=>Ylt,getMode:()=>Kh,hsi:()=>Kut,hsl:()=>Jut,hsv:()=>Qut,hwb:()=>ect,inGamut:()=>SE,interpolate:()=>out,interpolateWith:()=>Yne,interpolateWithPremultipliedAlpha:()=>sut,interpolatorLinear:()=>Ui,interpolatorPiecewise:()=>Rre,interpolatorSplineBasis:()=>Zne,interpolatorSplineBasisClosed:()=>$ne,interpolatorSplineMonotone:()=>cut,interpolatorSplineMonotone2:()=>fut,interpolatorSplineMonotoneClosed:()=>hut,interpolatorSplineNatural:()=>lut,interpolatorSplineNaturalClosed:()=>uut,itp:()=>tct,jab:()=>rct,jch:()=>nct,lab:()=>ict,lab65:()=>act,lch:()=>oct,lch65:()=>sct,lchuv:()=>lct,lerp:()=>fx,lrgb:()=>uct,luv:()=>cct,mapAlphaDivide:()=>Hne,mapAlphaMultiply:()=>Gne,mapTransferGamma:()=>rut,mapTransferLinear:()=>hq,mapper:()=>H4,modeA98:()=>Ire,modeCubehelix:()=>Nre,modeDlab:()=>jre,modeDlch:()=>Wre,modeHsi:()=>Zre,modeHsl:()=>Xz,modeHsv:()=>Kz,modeHwb:()=>nne,modeItp:()=>one,modeJab:()=>sne,modeJch:()=>lne,modeLab:()=>AE,modeLab65:()=>cne,modeLch:()=>ME,modeLch65:()=>hne,modeLchuv:()=>pne,modeLrgb:()=>gne,modeLuv:()=>mne,modeOkhsl:()=>xne,modeOkhsv:()=>_ne,modeOklab:()=>wne,modeOklch:()=>Ane,modeP3:()=>Mne,modeProphoto:()=>Sne,modeRec2020:()=>Ene,modeRgb:()=>vx,modeXyb:()=>Pne,modeXyz50:()=>Fne,modeXyz65:()=>Ine,modeYiq:()=>Bne,nearest:()=>_ut,okhsl:()=>fct,okhsv:()=>hct,oklab:()=>dct,oklch:()=>vct,p3:()=>pct,parse:()=>Pre,parseHex:()=>Sre,parseHsl:()=>Qre,parseHslLegacy:()=>Jre,parseHwb:()=>rne,parseLab:()=>une,parseLch:()=>fne,parseNamed:()=>Mre,parseOklab:()=>bne,parseOklch:()=>Tne,parseRgb:()=>Fre,parseRgbLegacy:()=>Ere,parseTransparent:()=>Dre,prophoto:()=>gct,random:()=>tut,rec2020:()=>mct,removeParser:()=>got,rgb:()=>yct,round:()=>One,samples:()=>put,serializeHex:()=>fq,serializeHex8:()=>Nne,serializeHsl:()=>Vne,serializeRgb:()=>Une,toGamut:()=>yut,trilerp:()=>Eot,unlerp:()=>Sot,useMode:()=>Rs,useParser:()=>Cre,wcagContrast:()=>Wut,wcagLuminance:()=>Vz,xyb:()=>xct,xyz50:()=>_ct,xyz65:()=>bct,yiq:()=>wct});nie.exports=rot(wre);var not=(e,t)=>{if(typeof e=="number"){if(t===3)return{mode:"rgb",r:(e>>8&15|e>>4&240)/255,g:(e>>4&15|e&240)/255,b:(e&15|e<<4&240)/255};if(t===4)return{mode:"rgb",r:(e>>12&15|e>>8&240)/255,g:(e>>8&15|e>>4&240)/255,b:(e>>4&15|e&240)/255,alpha:(e&15|e<<4&240)/255};if(t===6)return{mode:"rgb",r:(e>>16&255)/255,g:(e>>8&255)/255,b:(e&255)/255};if(t===8)return{mode:"rgb",r:(e>>24&255)/255,g:(e>>16&255)/255,b:(e>>8&255)/255,alpha:(e&255)/255}}},Tre=not,iot={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},Are=iot,aot=e=>Tre(Are[e.toLowerCase()],6),Mre=aot,oot=/^#?([0-9a-f]{8}|[0-9a-f]{6}|[0-9a-f]{4}|[0-9a-f]{3})$/i,sot=e=>{let t;return(t=e.match(oot))?Tre(parseInt(t[1],16),t[1].length):void 0},Sre=sot,$d="([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)",ofr=`(?:${$d}|none)`,I4=`${$d}%`,sfr=`(?:${$d}%|none)`,Hz=`(?:${$d}%|${$d})`,lot=`(?:${$d}%|${$d}|none)`,uot=`(?:${$d}(deg|grad|rad|turn)|${$d})`,lfr=`(?:${$d}(deg|grad|rad|turn)|${$d}|none)`,pb="\\s*,\\s*",ufr=new RegExp("^"+lot+"$"),cot=new RegExp(`^rgba?\\(\\s*${$d}${pb}${$d}${pb}${$d}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),fot=new RegExp(`^rgba?\\(\\s*${I4}${pb}${I4}${pb}${I4}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),hot=e=>{let t={mode:"rgb"},r;if(r=e.match(cot))r[1]!==void 0&&(t.r=r[1]/255),r[2]!==void 0&&(t.g=r[2]/255),r[3]!==void 0&&(t.b=r[3]/255);else if(r=e.match(fot))r[1]!==void 0&&(t.r=r[1]/100),r[2]!==void 0&&(t.g=r[2]/100),r[3]!==void 0&&(t.b=r[3]/100);else return;return r[4]!==void 0?t.alpha=Math.max(0,Math.min(1,r[4]/100)):r[5]!==void 0&&(t.alpha=Math.max(0,Math.min(1,+r[5]))),t},Ere=hot,dot=(e,t)=>e===void 0?void 0:typeof e!="object"?Pre(e):e.mode!==void 0?e:t?tl(zo({},e),{mode:t}):void 0,$v=dot,vot=(e="rgb")=>t=>(t=$v(t,e))!==void 0?t.mode===e?t:qp[t.mode][e]?qp[t.mode][e](t):e==="rgb"?qp[t.mode].rgb(t):qp.rgb[e](qp[t.mode].rgb(t)):void 0,dl=vot,qp={},kre={},gb=[],jz={},pot=e=>e,Rs=e=>(qp[e.mode]=zo(zo({},qp[e.mode]),e.toMode),Object.keys(e.fromMode||{}).forEach(t=>{qp[t]||(qp[t]={}),qp[t][e.mode]=e.fromMode[t]}),e.ranges||(e.ranges={}),e.difference||(e.difference={}),e.channels.forEach(t=>{if(e.ranges[t]===void 0&&(e.ranges[t]=[0,1]),!e.interpolate[t])throw new Error(`Missing interpolator for: ${t}`);typeof e.interpolate[t]=="function"&&(e.interpolate[t]={use:e.interpolate[t]}),e.interpolate[t].fixup||(e.interpolate[t].fixup=pot)}),kre[e.mode]=e,(e.parse||[]).forEach(t=>{Cre(t,e.mode)}),dl(e.mode)),Kh=e=>kre[e],Cre=(e,t)=>{if(typeof e=="string"){if(!t)throw new Error("'mode' required when 'parser' is a string");jz[e]=t}else typeof e=="function"&&gb.indexOf(e)<0&&gb.push(e)},got=e=>{if(typeof e=="string")delete jz[e];else if(typeof e=="function"){let t=gb.indexOf(e);t>0&&gb.splice(t,1)}},bz=/[^\x00-\x7F]|[a-zA-Z_]/,mot=/[^\x00-\x7F]|[-\w]/,Ti={Function:"function",Ident:"ident",Number:"number",Percentage:"percentage",ParenClose:")",None:"none",Hue:"hue",Alpha:"alpha"},eo=0;function nE(e){let t=e[eo],r=e[eo+1];return t==="-"||t==="+"?/\d/.test(r)||r==="."&&/\d/.test(e[eo+2]):t==="."?/\d/.test(r):/\d/.test(t)}function wz(e){if(eo>=e.length)return!1;let t=e[eo];if(bz.test(t))return!0;if(t==="-"){if(e.length-eo<2)return!1;let r=e[eo+1];return!!(r==="-"||bz.test(r))}return!1}var yot={deg:1,rad:180/Math.PI,grad:9/10,turn:360};function D4(e){let t="";if((e[eo]==="-"||e[eo]==="+")&&(t+=e[eo++]),t+=iE(e),e[eo]==="."&&/\d/.test(e[eo+1])&&(t+=e[eo++]+iE(e)),(e[eo]==="e"||e[eo]==="E")&&((e[eo+1]==="-"||e[eo+1]==="+")&&/\d/.test(e[eo+2])?t+=e[eo++]+e[eo++]+iE(e):/\d/.test(e[eo+1])&&(t+=e[eo++]+iE(e))),wz(e)){let r=sE(e);return r==="deg"||r==="rad"||r==="turn"||r==="grad"?{type:Ti.Hue,value:t*yot[r]}:void 0}return e[eo]==="%"?(eo++,{type:Ti.Percentage,value:+t}):{type:Ti.Number,value:+t}}function iE(e){let t="";for(;/\d/.test(e[eo]);)t+=e[eo++];return t}function sE(e){let t="";for(;eo4)){if(r.length===4){if(r[3].type!==Ti.Alpha)return;r[3]=r[3].value}return r.length===3&&r.push({type:Ti.None,value:void 0}),r.every(a=>a.type!==Ti.Alpha)?r:void 0}}function wot(e,t){e._i=0;let r=e[e._i++];if(!r||r.type!==Ti.Function)return;let n=Lre(e,t);if(n)return n.unshift(r.value),n}var Tot=e=>{if(typeof e!="string")return;let t=_ot(e),r=t?wot(t,!0):void 0,n,a=0,i=gb.length;for(;ae==="transparent"?{mode:"rgb",r:0,g:0,b:0,alpha:0}:void 0,Dre=Mot,fx=(e,t,r)=>e+r*(t-e),Sot=(e,t,r)=>(r-e)/(t-e),Tz=(e,t,r,n,a,i)=>fx(fx(e,t,a),fx(r,n,a),i),Eot=(e,t,r,n,a,i,o,s,l,u,c)=>fx(Tz(e,t,r,n,l,u),Tz(a,i,o,s,l,u),c),kot=e=>{let t=[];for(let r=0;rt=>{let r=kot(t);return n=>{let a=n*r.length,i=n>=1?r.length-1:Math.max(Math.floor(a),0),o=r[i];return o===void 0?void 0:e(o[0],o[1],a-i)}},Ui=Rre(fx),Nc=e=>{let t=!1,r=e.map(n=>n!==void 0?(t=!0,n):1);return t?r:e},Cot={mode:"rgb",channels:["r","g","b","alpha"],parse:[Fre,Sre,Ere,Mre,Dre,"srgb"],serialize:"srgb",interpolate:{r:Ui,g:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}},gamut:!0,white:{r:1,g:1,b:1},black:{r:0,g:0,b:0}},vx=Cot,JI=(e=0)=>Math.pow(Math.abs(e),563/256)*Math.sign(e),Lot=e=>{let t=JI(e.r),r=JI(e.g),n=JI(e.b),a={mode:"xyz65",x:.5766690429101305*t+.1855582379065463*r+.1882286462349947*n,y:.297344975250536*t+.6273635662554661*r+.0752914584939979*n,z:.0270313613864123*t+.0706888525358272*r+.9913375368376386*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Az=Lot,QI=e=>Math.pow(Math.abs(e),256/563)*Math.sign(e),Pot=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"a98",r:QI(e*2.0415879038107465-t*.5650069742788597-.3447313507783297*r),g:QI(e*-.9692436362808798+t*1.8759675015077206+.0415550574071756*r),b:QI(e*.0134442806320312-t*.1183623922310184+1.0151749943912058*r)};return n!==void 0&&(a.alpha=n),a},Mz=Pot,ez=(e=0)=>{let t=Math.abs(e);return t<=.04045?e/12.92:(Math.sign(e)||1)*Math.pow((t+.055)/1.055,2.4)},Fot=({r:e,g:t,b:r,alpha:n})=>{let a={mode:"lrgb",r:ez(e),g:ez(t),b:ez(r)};return n!==void 0&&(a.alpha=n),a},px=Fot,Dot=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i={mode:"xyz65",x:.4123907992659593*t+.357584339383878*r+.1804807884018343*n,y:.2126390058715102*t+.715168678767756*r+.0721923153607337*n,z:.0193308187155918*t+.119194779794626*r+.9505321522496607*n};return a!==void 0&&(i.alpha=a),i},rm=Dot,tz=(e=0)=>{let t=Math.abs(e);return t>.0031308?(Math.sign(e)||1)*(1.055*Math.pow(t,1/2.4)-.055):e*12.92},Rot=({r:e,g:t,b:r,alpha:n},a="rgb")=>{let i={mode:a,r:tz(e),g:tz(t),b:tz(r)};return n!==void 0&&(i.alpha=n),i},gx=Rot,Iot=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=gx({r:e*3.2409699419045226-t*1.537383177570094-.4986107602930034*r,g:e*-.9692436362808796+t*1.8759675015077204+.0415550574071756*r,b:e*.0556300796969936-t*.2039769588889765+1.0569715142428784*r});return n!==void 0&&(a.alpha=n),a},nm=Iot,zot=tl(zo({},vx),{mode:"a98",parse:["a98-rgb"],serialize:"a98-rgb",fromMode:{rgb:e=>Mz(rm(e)),xyz65:Mz},toMode:{rgb:e=>nm(Az(e)),xyz65:Az}}),Ire=zot,qot=e=>(e=e%360)<0?e+360:e,Th=qot,gE=(e,t)=>e.map((r,n,a)=>{if(r===void 0)return r;let i=Th(r);return n===0||e[n-1]===void 0?i:t(i-Th(a[n-1]))}).reduce((r,n)=>!r.length||n===void 0||r[r.length-1]===void 0?(r.push(n),r):(r.push(n+r[r.length-1]),r),[]),Bp=e=>gE(e,t=>Math.abs(t)<=180?t:t-360*Math.sign(t)),Bot=e=>gE(e,t=>Math.abs(t)>=180||t===0?t:t-360*Math.sign(t)),Oot=e=>gE(e,t=>t>=0?t:t+360),Not=e=>gE(e,t=>t<=0?t:t-360),Hf=[-.14861,1.78277,-.29227,-.90649,1.97294,0],Uot=Math.PI/180,Vot=180/Math.PI,dre=Hf[3]*Hf[4],vre=Hf[1]*Hf[4],pre=Hf[1]*Hf[2]-Hf[0]*Hf[3],Got=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(pre*r+e*dre-t*vre)/(pre+dre-vre),i=r-a,o=(Hf[4]*(t-a)-Hf[2]*i)/Hf[3],s={mode:"cubehelix",l:a,s:a===0||a===1?void 0:Math.sqrt(i*i+o*o)/(Hf[4]*a*(1-a))};return s.s&&(s.h=Math.atan2(o,i)*Vot-120),n!==void 0&&(s.alpha=n),s},zre=Got,Hot=({h:e,s:t,l:r,alpha:n})=>{let a={mode:"rgb"};e=(e===void 0?0:e+120)*Uot,r===void 0&&(r=0);let i=t===void 0?0:t*r*(1-r),o=Math.cos(e),s=Math.sin(e);return a.r=r+i*(Hf[0]*o+Hf[1]*s),a.g=r+i*(Hf[2]*o+Hf[3]*s),a.b=r+i*(Hf[4]*o+Hf[5]*s),n!==void 0&&(a.alpha=n),a},qre=Hot,B4=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.s||!t.s)return 0;let r=Th(e.h),n=Th(t.h),a=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.s*t.s)*a},Bre=(e,t)=>{if(e.h===void 0||t.h===void 0)return 0;let r=Th(e.h),n=Th(t.h);return Math.abs(n-r)>180?r-(n-360*Math.sign(n-r)):n-r},O4=(e,t)=>{if(e.h===void 0||t.h===void 0||!e.c||!t.c)return 0;let r=Th(e.h),n=Th(t.h),a=Math.sin((n-r+360)/2*Math.PI/180);return 2*Math.sqrt(e.c*t.c)*a},mb=(e="rgb",t=[1,1,1,0])=>{let r=Kh(e),n=r.channels,a=r.difference,i=dl(e);return(o,s)=>{let l=i(o),u=i(s);return Math.sqrt(n.reduce((c,f,v)=>{let g=a[f]?a[f](l,u):l[f]-u[f];return c+(t[v]||0)*Math.pow(isNaN(g)?0:g,2)},0))}},jot=()=>mb("lab65"),Wot=(e=1,t=.045,r=.015)=>{let n=dl("lab65");return(a,i)=>{let o=n(a),s=n(i),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),v=s.l,g=s.a,p=s.b,x=Math.sqrt(g*g+p*p),_=Math.pow(l-v,2),y=Math.pow(f-x,2),C=Math.pow(u-g,2)+Math.pow(c-p,2)-y;return Math.sqrt(_/Math.pow(e,2)+y/Math.pow(1+t*f,2)+C/Math.pow(1+r*f,2))}},Yot=(e=1,t=1,r=1)=>{let n=dl("lab65");return(a,i)=>{let o=n(a),s=n(i),l=o.l,u=o.a,c=o.b,f=Math.sqrt(u*u+c*c),v=s.l,g=s.a,p=s.b,x=Math.sqrt(g*g+p*p),_=(f+x)/2,y=.5*(1-Math.sqrt(Math.pow(_,7)/(Math.pow(_,7)+Math.pow(25,7)))),C=u*(1+y),k=g*(1+y),S=Math.sqrt(C*C+c*c),L=Math.sqrt(k*k+p*p),w=Math.abs(C)+Math.abs(c)===0?0:Math.atan2(c,C);w+=(w<0)*2*Math.PI;let A=Math.abs(k)+Math.abs(p)===0?0:Math.atan2(p,k);A+=(A<0)*2*Math.PI;let T=v-l,m=L-S,F=S*L===0?0:A-w;F-=(F>Math.PI)*2*Math.PI,F+=(F<-Math.PI)*2*Math.PI;let E=2*Math.sqrt(S*L)*Math.sin(F/2),I=(l+v)/2,R=(S+L)/2,B;S*L===0?B=w+A:(B=(w+A)/2,B-=(Math.abs(w-A)>Math.PI)*Math.PI,B+=(B<0)*2*Math.PI);let O=Math.pow(I-50,2),V=1-.17*Math.cos(B-Math.PI/6)+.24*Math.cos(2*B)+.32*Math.cos(3*B+Math.PI/30)-.2*Math.cos(4*B-63*Math.PI/180),j=1+.015*O/Math.sqrt(20+O),q=1+.045*R,U=1+.015*R*V,J=30*Math.PI/180*Math.exp(-1*Math.pow((180/Math.PI*B-275)/25,2)),ee=2*Math.sqrt(Math.pow(R,7)/(Math.pow(R,7)+Math.pow(25,7))),ce=-1*Math.sin(2*J)*ee;return Math.sqrt(Math.pow(T/(e*j),2)+Math.pow(m/(t*q),2)+Math.pow(E/(r*U),2)+ce*m/(t*q)*E/(r*U))}},Xot=(e=1,t=1)=>{let r=dl("lab65");return(n,a)=>{let i=r(n),o=i.l,s=i.a,l=i.b,u=Math.sqrt(s*s+l*l),c=Math.atan2(l,s);c=c+2*Math.PI*(c<0);let f=r(a),v=f.l,g=f.a,p=f.b,x=Math.sqrt(g*g+p*p),_=Math.pow(o-v,2),y=Math.pow(u-x,2),C=Math.pow(s-g,2)+Math.pow(l-p,2)-y,k=Math.sqrt(Math.pow(u,4)/(Math.pow(u,4)+1900)),S=c>=164/180*Math.PI&&c<=345/180*Math.PI?.56+Math.abs(.2*Math.cos(c+168/180*Math.PI)):.36+Math.abs(.4*Math.cos(c+35/180*Math.PI)),L=o<16?.511:.040975*o/(1+.01765*o),w=.0638*u/(1+.0131*u)+.638,A=w*(k*S+1-k);return Math.sqrt(_/Math.pow(e*L,2)+y/Math.pow(t*w,2)+C/Math.pow(A,2))}},Zot=()=>{let e=dl("lab65");return(t,r)=>{let n=e(t),a=e(r),i=n.l-a.l,o=n.a-a.a,s=n.b-a.b;return Math.abs(i)+Math.sqrt(o*o+s*s)}},$ot=()=>mb("yiq",[.5053,.299,.1957]),Kot=()=>mb("itp",[518400,129600,518400]),Op=e=>{let t=e.reduce((n,a)=>{if(a!==void 0){let i=a*Math.PI/180;n.sin+=Math.sin(i),n.cos+=Math.cos(i)}return n},{sin:0,cos:0}),r=Math.atan2(t.sin,t.cos)*180/Math.PI;return r<0?360+r:r},Ore=e=>{let t=e.filter(r=>r!==void 0);return t.length?t.reduce((r,n)=>r+n,0)/t.length:void 0},rz=e=>typeof e=="function";function Jot(e,t="rgb",r){let n=Kh(t),a=e.map(dl(t));return n.channels.reduce((i,o)=>{let s=a.map(l=>l[o]).filter(l=>l!==void 0);if(s.length){let l;rz(r)?l=r:r&&rz(r[o])?l=r[o]:n.average&&rz(n.average[o])?l=n.average[o]:l=Ore,i[o]=l(s,o)}return i},{mode:t})}var Qot={mode:"cubehelix",channels:["h","s","l","alpha"],parse:["--cubehelix"],serialize:"--cubehelix",ranges:{h:[0,360],s:[0,4.614],l:[0,1]},fromMode:{rgb:zre},toMode:{rgb:qre},interpolate:{h:{use:Ui,fixup:Bp},s:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:B4},average:{h:Op}},Nre=Qot,est=({l:e,a:t,b:r,alpha:n},a="lch")=>{t===void 0&&(t=0),r===void 0&&(r=0);let i=Math.sqrt(t*t+r*r),o={mode:a,l:e,c:i};return i&&(o.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(o.alpha=n),o},H1=est,tst=({l:e,c:t,h:r,alpha:n},a="lab")=>{r===void 0&&(r=0);let i={mode:a,l:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(i.alpha=n),i},j1=tst,Ure=Math.pow(29,3)/Math.pow(3,3),Vre=Math.pow(6,3)/Math.pow(29,3),Oc={X:.3457/.3585,Y:1,Z:(1-.3457-.3585)/.3585},vb={X:.3127/.329,Y:1,Z:(1-.3127-.329)/.329},cfr=Math.pow(29,3)/Math.pow(3,3),ffr=Math.pow(6,3)/Math.pow(29,3),nz=e=>Math.pow(e,3)>Vre?Math.pow(e,3):(116*e-16)/Ure,rst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+16)/116,i=t/500+a,o=a-r/200,s={mode:"xyz65",x:nz(i)*vb.X,y:nz(a)*vb.Y,z:nz(o)*vb.Z};return n!==void 0&&(s.alpha=n),s},Wz=rst,nst=e=>nm(Wz(e)),N4=nst,iz=e=>e>Vre?Math.cbrt(e):(Ure*e+16)/116,ist=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=iz(e/vb.X),i=iz(t/vb.Y),o=iz(r/vb.Z),s={mode:"lab65",l:116*i-16,a:500*(a-i),b:200*(i-o)};return n!==void 0&&(s.alpha=n),s},Yz=ist,ast=e=>{let t=Yz(rm(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},U4=ast,lE=1,Gre=1,q4=26/180*Math.PI,uE=Math.cos(q4),cE=Math.sin(q4),Hre=100/Math.log(139/100),ost=({l:e,c:t,h:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"lab65",l:(Math.exp(e*lE/Hre)-1)/.0039},i=(Math.exp(.0435*t*Gre*lE)-1)/.075,o=i*Math.cos(r/180*Math.PI-q4),s=i*Math.sin(r/180*Math.PI-q4);return a.a=o*uE-s/.83*cE,a.b=o*cE+s/.83*uE,n!==void 0&&(a.alpha=n),a},fE=ost,sst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=t*uE+r*cE,i=.83*(r*uE-t*cE),o=Math.sqrt(a*a+i*i),s={mode:"dlch",l:Hre/lE*Math.log(1+.0039*e),c:Math.log(1+.075*o)/(.0435*Gre*lE)};return s.c&&(s.h=Th((Math.atan2(i,a)+q4)/Math.PI*180)),n!==void 0&&(s.alpha=n),s},hE=sst,gre=e=>fE(H1(e,"dlch")),mre=e=>j1(hE(e),"dlab"),lst={mode:"dlab",parse:["--din99o-lab"],serialize:"--din99o-lab",toMode:{lab65:gre,rgb:e=>N4(gre(e))},fromMode:{lab65:mre,rgb:e=>mre(U4(e))},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-40.09,45.501],b:[-40.469,44.344]},interpolate:{l:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},jre=lst,ust={mode:"dlch",parse:["--din99o-lch"],serialize:"--din99o-lch",toMode:{lab65:fE,dlab:e=>j1(e,"dlab"),rgb:e=>N4(fE(e))},fromMode:{lab65:hE,dlab:e=>H1(e,"dlch"),rgb:e=>hE(U4(e))},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,51.484],h:[0,360]},interpolate:{l:Ui,c:Ui,h:{use:Ui,fixup:Bp},alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},Wre=ust;function Yre({h:e,s:t,i:r,alpha:n}){e=Th(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1-t)};break;case 1:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1+t*(3/(2-a)-1)),b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r*(1+t*(3/(2-a)-1)),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;case 3:i={r:r*(1-t),g:r*(1+t*(3*(1-a)/(2-a)-1)),b:r*(1+t*(3/(2-a)-1))};break;case 4:i={r:r*(1+t*(3*(1-a)/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3/(2-a)-1))};break;case 5:i={r:r*(1+t*(3/(2-a)-1)),g:r*(1-t),b:r*(1+t*(3*(1-a)/(2-a)-1))};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function Xre({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.max(e,t,r),i=Math.min(e,t,r),o={mode:"hsi",s:e+t+r===0?0:1-3*i/(e+t+r),i:(e+t+r)/3};return a-i!==0&&(o.h=(a===e?(t-r)/(a-i)+(t{switch(t){case"deg":return+e;case"rad":return e/Math.PI*180;case"grad":return e/10*9;case"turn":return e*360}},hst=fst,dst=new RegExp(`^hsla?\\(\\s*${uot}${pb}${I4}${pb}${I4}\\s*(?:,\\s*${Hz}\\s*)?\\)$`),vst=e=>{let t=e.match(dst);if(!t)return;let r={mode:"hsl"};return t[3]!==void 0?r.h=+t[3]:t[1]!==void 0&&t[2]!==void 0&&(r.h=hst(t[1],t[2])),t[4]!==void 0&&(r.s=Math.min(Math.max(0,t[4]/100),1)),t[5]!==void 0&&(r.l=Math.min(Math.max(0,t[5]/100),1)),t[6]!==void 0?r.alpha=Math.max(0,Math.min(1,t[6]/100)):t[7]!==void 0&&(r.alpha=Math.max(0,Math.min(1,+t[7]))),r},Jre=vst;function pst(e,t){if(!t||t[0]!=="hsl"&&t[0]!=="hsla")return;let r={mode:"hsl"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Percentage)return;r.h=n.value}if(a.type!==Ti.None){if(a.type===Ti.Hue)return;r.s=a.value/100}if(i.type!==Ti.None){if(i.type===Ti.Hue)return;r.l=i.value/100}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var Qre=pst,gst={mode:"hsl",toMode:{rgb:$re},fromMode:{rgb:Kre},channels:["h","s","l","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[Qre,Jre],serialize:e=>`hsl(${e.h!==void 0?e.h:"none"} ${e.s!==void 0?e.s*100+"%":"none"} ${e.l!==void 0?e.l*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},s:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:B4},average:{h:Op}},Xz=gst;function Zz({h:e,s:t,v:r,alpha:n}){e=Th(e!==void 0?e:0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.abs(e/60%2-1),i;switch(Math.floor(e/60)){case 0:i={r,g:r*(1-t*a),b:r*(1-t)};break;case 1:i={r:r*(1-t*a),g:r,b:r*(1-t)};break;case 2:i={r:r*(1-t),g:r,b:r*(1-t*a)};break;case 3:i={r:r*(1-t),g:r*(1-t*a),b:r};break;case 4:i={r:r*(1-t*a),g:r*(1-t),b:r};break;case 5:i={r,g:r*(1-t),b:r*(1-t*a)};break;default:i={r:r*(1-t),g:r*(1-t),b:r*(1-t)}}return i.mode="rgb",n!==void 0&&(i.alpha=n),i}function $z({r:e,g:t,b:r,alpha:n}){e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.max(e,t,r),i=Math.min(e,t,r),o={mode:"hsv",s:a===0?0:1-i/a,v:a};return a-i!==0&&(o.h=(a===e?(t-r)/(a-i)+(t1){let a=t+r;t/=a,r/=a}return Zz({h:e,s:r===1?1:1-t/(1-r),v:1-r,alpha:n})}function tne(e){let t=$z(e);if(t===void 0)return;let r=t.s!==void 0?t.s:0,n=t.v!==void 0?t.v:0,a={mode:"hwb",w:(1-r)*n,b:1-n};return t.h!==void 0&&(a.h=t.h),t.alpha!==void 0&&(a.alpha=t.alpha),a}function yst(e,t){if(!t||t[0]!=="hwb")return;let r={mode:"hwb"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Percentage)return;r.h=n.value}if(a.type!==Ti.None){if(a.type===Ti.Hue)return;r.w=a.value/100}if(i.type!==Ti.None){if(i.type===Ti.Hue)return;r.b=i.value/100}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var rne=yst,xst={mode:"hwb",toMode:{rgb:ene},fromMode:{rgb:tne},channels:["h","w","b","alpha"],ranges:{h:[0,360]},gamut:"rgb",parse:[rne],serialize:e=>`hwb(${e.h!==void 0?e.h:"none"} ${e.w!==void 0?e.w*100+"%":"none"} ${e.b!==void 0?e.b*100+"%":"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},w:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:Bre},average:{h:Op}},nne=xst,ine=203,mE=.1593017578125,ane=78.84375,yE=.8359375,xE=18.8515625,_E=18.6875;function az(e){if(e<0)return 0;let t=Math.pow(e,1/ane);return 1e4*Math.pow(Math.max(0,t-yE)/(xE-_E*t),1/mE)}function oz(e){if(e<0)return 0;let t=Math.pow(e/1e4,mE);return Math.pow((yE+xE*t)/(1+_E*t),ane)}var sz=e=>Math.max(e/ine,0),_st=({i:e,t,p:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=az(e+.008609037037932761*t+.11102962500302593*r),i=az(e-.00860903703793275*t-.11102962500302599*r),o=az(e+.5600313357106791*t-.32062717498731885*r),s={mode:"xyz65",x:sz(2.070152218389422*a-1.3263473389671556*i+.2066510476294051*o),y:sz(.3647385209748074*a+.680566024947227*i-.0453045459220346*o),z:sz(-.049747207535812*a-.0492609666966138*i+1.1880659249923042*o)};return n!==void 0&&(s.alpha=n),s},Sz=_st,lz=(e=0)=>Math.max(e*ine,0),bst=({x:e,y:t,z:r,alpha:n})=>{let a=lz(e),i=lz(t),o=lz(r),s=oz(.3592832590121217*a+.6976051147779502*i-.0358915932320289*o),l=oz(-.1920808463704995*a+1.1004767970374323*i+.0753748658519118*o),u=oz(.0070797844607477*a+.0748396662186366*i+.8433265453898765*o),c=.5*s+.5*l,f=1.61376953125*s-3.323486328125*l+1.709716796875*u,v=4.378173828125*s-4.24560546875*l-.132568359375*u,g={mode:"itp",i:c,t:f,p:v};return n!==void 0&&(g.alpha=n),g},Ez=bst,wst={mode:"itp",channels:["i","t","p","alpha"],parse:["--ictcp"],serialize:"--ictcp",toMode:{xyz65:Sz,rgb:e=>nm(Sz(e))},fromMode:{xyz65:Ez,rgb:e=>Ez(rm(e))},ranges:{i:[0,.581],t:[-.369,.272],p:[-.164,.331]},interpolate:{i:Ui,t:Ui,p:Ui,alpha:{use:Ui,fixup:Nc}}},one=wst,Tst=134.03437499999998,Ast=16295499532821565e-27,uz=e=>{if(e<0)return 0;let t=Math.pow(e/1e4,mE);return Math.pow((yE+xE*t)/(1+_E*t),Tst)},cz=(e=0)=>Math.max(e*203,0),Mst=({x:e,y:t,z:r,alpha:n})=>{e=cz(e),t=cz(t),r=cz(r);let a=1.15*e-.15*r,i=.66*t+.34*e,o=uz(.41478972*a+.579999*i+.014648*r),s=uz(-.20151*a+1.120649*i+.0531008*r),l=uz(-.0166008*a+.2648*i+.6684799*r),u=(o+s)/2,c={mode:"jab",j:.44*u/(1-.56*u)-Ast,a:3.524*o-4.066708*s+.542708*l,b:.199076*o+1.096799*s-1.295875*l};return n!==void 0&&(c.alpha=n),c},Jz=Mst,Sst=134.03437499999998,yre=16295499532821565e-27,fz=e=>{if(e<0)return 0;let t=Math.pow(e,1/Sst);return 1e4*Math.pow((yE-t)/(_E*t-xE),1/mE)},hz=e=>e/203,Est=({j:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+yre)/(.44+.56*(e+yre)),i=fz(a+.13860504*t+.058047316*r),o=fz(a-.13860504*t-.058047316*r),s=fz(a-.096019242*t-.8118919*r),l={mode:"xyz65",x:hz(1.661373024652174*i-.914523081304348*o+.23136208173913045*s),y:hz(-.3250758611844533*i+1.571847026732543*o-.21825383453227928*s),z:hz(-.090982811*i-.31272829*o+1.5227666*s)};return n!==void 0&&(l.alpha=n),l},Qz=Est,kst=e=>{let t=Jz(rm(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},eq=kst,Cst=e=>nm(Qz(e)),tq=Cst,Lst={mode:"jab",channels:["j","a","b","alpha"],parse:["--jzazbz"],serialize:"--jzazbz",fromMode:{rgb:eq,xyz65:Jz},toMode:{rgb:tq,xyz65:Qz},ranges:{j:[0,.222],a:[-.109,.129],b:[-.185,.134]},interpolate:{j:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},sne=Lst,Pst=({j:e,a:t,b:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:"jch",j:e,c:a};return a&&(i.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},kz=Pst,Fst=({j:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let a={mode:"jab",j:e,a:t?t*Math.cos(r/180*Math.PI):0,b:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},Cz=Fst,Dst={mode:"jch",parse:["--jzczhz"],serialize:"--jzczhz",toMode:{jab:Cz,rgb:e=>tq(Cz(e))},fromMode:{rgb:e=>kz(eq(e)),jab:kz},channels:["j","c","h","alpha"],ranges:{j:[0,.221],c:[0,.19],h:[0,360]},interpolate:{h:{use:Ui,fixup:Bp},c:Ui,j:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},lne=Dst,bE=Math.pow(29,3)/Math.pow(3,3),rq=Math.pow(6,3)/Math.pow(29,3),dz=e=>Math.pow(e,3)>rq?Math.pow(e,3):(116*e-16)/bE,Rst=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=(e+16)/116,i=t/500+a,o=a-r/200,s={mode:"xyz50",x:dz(i)*Oc.X,y:dz(a)*Oc.Y,z:dz(o)*Oc.Z};return n!==void 0&&(s.alpha=n),s},wE=Rst,Ist=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=gx({r:e*3.1341359569958707-t*1.6173863321612538-.4906619460083532*r,g:e*-.978795502912089+t*1.916254567259524+.03344273116131949*r,b:e*.07195537988411677-t*.2289768264158322+1.405386058324125*r});return n!==void 0&&(a.alpha=n),a},yb=Ist,zst=e=>yb(wE(e)),nq=zst,qst=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i={mode:"xyz50",x:.436065742824811*t+.3851514688337912*r+.14307845442264197*n,y:.22249319175623702*t+.7168870538238823*r+.06061979053616537*n,z:.013923904500943465*t+.09708128566574634*r+.7140993584005155*n};return a!==void 0&&(i.alpha=a),i},xb=qst,vz=e=>e>rq?Math.cbrt(e):(bE*e+16)/116,Bst=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=vz(e/Oc.X),i=vz(t/Oc.Y),o=vz(r/Oc.Z),s={mode:"lab",l:116*i-16,a:500*(a-i),b:200*(i-o)};return n!==void 0&&(s.alpha=n),s},TE=Bst,Ost=e=>{let t=TE(xb(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},iq=Ost;function Nst(e,t){if(!t||t[0]!=="lab")return;let r={mode:"lab"},[,n,a,i,o]=t;if(!(n.type===Ti.Hue||a.type===Ti.Hue||i.type===Ti.Hue))return n.type!==Ti.None&&(r.l=Math.min(Math.max(0,n.value),100)),a.type!==Ti.None&&(r.a=a.type===Ti.Number?a.value:a.value*125/100),i.type!==Ti.None&&(r.b=i.type===Ti.Number?i.value:i.value*125/100),o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var une=Nst,Ust={mode:"lab",toMode:{xyz50:wE,rgb:nq},fromMode:{xyz50:TE,rgb:iq},channels:["l","a","b","alpha"],ranges:{l:[0,100],a:[-125,125],b:[-125,125]},parse:[une],serialize:e=>`lab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{l:Ui,a:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},AE=Ust,Vst=tl(zo({},AE),{mode:"lab65",parse:["--lab-d65"],serialize:"--lab-d65",toMode:{xyz65:Wz,rgb:N4},fromMode:{xyz65:Yz,rgb:U4},ranges:{l:[0,100],a:[-125,125],b:[-125,125]}}),cne=Vst;function Gst(e,t){if(!t||t[0]!=="lch")return;let r={mode:"lch"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Hue)return;r.l=Math.min(Math.max(0,n.value),100)}if(a.type!==Ti.None&&(r.c=Math.max(0,a.type===Ti.Number?a.value:a.value*150/100)),i.type!==Ti.None){if(i.type===Ti.Percentage)return;r.h=i.value}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var fne=Gst,Hst={mode:"lch",toMode:{lab:j1,rgb:e=>nq(j1(e))},fromMode:{rgb:e=>H1(iq(e)),lab:H1},channels:["l","c","h","alpha"],ranges:{l:[0,100],c:[0,150],h:[0,360]},parse:[fne],serialize:e=>`lch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,interpolate:{h:{use:Ui,fixup:Bp},c:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},ME=Hst,jst=tl(zo({},ME),{mode:"lch65",parse:["--lch-d65"],serialize:"--lch-d65",toMode:{lab65:e=>j1(e,"lab65"),rgb:e=>N4(j1(e,"lab65"))},fromMode:{rgb:e=>H1(U4(e),"lch65"),lab65:e=>H1(e,"lch65")},ranges:{l:[0,100],c:[0,150],h:[0,360]}}),hne=jst,Wst=({l:e,u:t,v:r,alpha:n})=>{t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.sqrt(t*t+r*r),i={mode:"lchuv",l:e,c:a};return a&&(i.h=Th(Math.atan2(r,t)*180/Math.PI)),n!==void 0&&(i.alpha=n),i},aq=Wst,Yst=({l:e,c:t,h:r,alpha:n})=>{r===void 0&&(r=0);let a={mode:"luv",l:e,u:t?t*Math.cos(r/180*Math.PI):0,v:t?t*Math.sin(r/180*Math.PI):0};return n!==void 0&&(a.alpha=n),a},oq=Yst,dne=(e,t,r)=>4*e/(e+15*t+3*r),vne=(e,t,r)=>9*t/(e+15*t+3*r),Xst=dne(Oc.X,Oc.Y,Oc.Z),Zst=vne(Oc.X,Oc.Y,Oc.Z),$st=e=>e<=rq?bE*e:116*Math.cbrt(e)-16,Kst=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=$st(t/Oc.Y),i=dne(e,t,r),o=vne(e,t,r);!isFinite(i)||!isFinite(o)?a=i=o=0:(i=13*a*(i-Xst),o=13*a*(o-Zst));let s={mode:"luv",l:a,u:i,v:o};return n!==void 0&&(s.alpha=n),s},dE=Kst,Jst=(e,t,r)=>4*e/(e+15*t+3*r),Qst=(e,t,r)=>9*t/(e+15*t+3*r),elt=Jst(Oc.X,Oc.Y,Oc.Z),tlt=Qst(Oc.X,Oc.Y,Oc.Z),rlt=({l:e,u:t,v:r,alpha:n})=>{if(e===void 0&&(e=0),e===0)return{mode:"xyz50",x:0,y:0,z:0};t===void 0&&(t=0),r===void 0&&(r=0);let a=t/(13*e)+elt,i=r/(13*e)+tlt,o=Oc.Y*(e<=8?e/bE:Math.pow((e+16)/116,3)),s=o*(9*a)/(4*i),l=o*(12-3*a-20*i)/(4*i),u={mode:"xyz50",x:s,y:o,z:l};return n!==void 0&&(u.alpha=n),u},vE=rlt,nlt=e=>aq(dE(xb(e))),ilt=e=>yb(vE(oq(e))),alt={mode:"lchuv",toMode:{luv:oq,rgb:ilt},fromMode:{rgb:nlt,luv:aq},channels:["l","c","h","alpha"],parse:["--lchuv"],serialize:"--lchuv",ranges:{l:[0,100],c:[0,176.956],h:[0,360]},interpolate:{h:{use:Ui,fixup:Bp},c:Ui,l:Ui,alpha:{use:Ui,fixup:Nc}},difference:{h:O4},average:{h:Op}},pne=alt,olt=tl(zo({},vx),{mode:"lrgb",toMode:{rgb:gx},fromMode:{rgb:px},parse:["srgb-linear"],serialize:"srgb-linear"}),gne=olt,slt={mode:"luv",toMode:{xyz50:vE,rgb:e=>yb(vE(e))},fromMode:{xyz50:dE,rgb:e=>dE(xb(e))},channels:["l","u","v","alpha"],parse:["--luv"],serialize:"--luv",ranges:{l:[0,100],u:[-84.936,175.042],v:[-125.882,87.243]},interpolate:{l:Ui,u:Ui,v:Ui,alpha:{use:Ui,fixup:Nc}}},mne=slt,llt=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.cbrt(.412221469470763*e+.5363325372617348*t+.0514459932675022*r),i=Math.cbrt(.2119034958178252*e+.6806995506452344*t+.1073969535369406*r),o=Math.cbrt(.0883024591900564*e+.2817188391361215*t+.6299787016738222*r),s={mode:"oklab",l:.210454268309314*a+.7936177747023054*i-.0040720430116193*o,a:1.9779985324311684*a-2.42859224204858*i+.450593709617411*o,b:.0259040424655478*a+.7827717124575296*i-.8086757549230774*o};return n!==void 0&&(s.alpha=n),s},sq=llt,ult=e=>{let t=sq(px(e));return e.r===e.b&&e.b===e.g&&(t.a=t.b=0),t},V4=ult,clt=({l:e,a:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=Math.pow(e+.3963377773761749*t+.2158037573099136*r,3),i=Math.pow(e-.1055613458156586*t-.0638541728258133*r,3),o=Math.pow(e-.0894841775298119*t-1.2914855480194092*r,3),s={mode:"lrgb",r:4.076741636075957*a-3.3077115392580616*i+.2309699031821044*o,g:-1.2684379732850317*a+2.6097573492876887*i-.3413193760026573*o,b:-.0041960761386756*a-.7034186179359362*i+1.7076146940746117*o};return n!==void 0&&(s.alpha=n),s},_b=clt,flt=e=>gx(_b(e)),G4=flt;function Lz(e){let n=1.170873786407767;return .5*(n*e-.206+Math.sqrt((n*e-.206)*(n*e-.206)+4*.03*n*e))}function pE(e){return(e*e+.206*e)/(1.170873786407767*(e+.03))}function hlt(e,t){let r,n,a,i,o,s,l,u;-1.88170328*e-.80936493*t>1?(r=1.19086277,n=1.76576728,a=.59662641,i=.75515197,o=.56771245,s=4.0767416621,l=-3.3077115913,u=.2309699292):1.81444104*e-1.19445276*t>1?(r=.73956515,n=-.45954404,a=.08285427,i=.1254107,o=.14503204,s=-1.2684380046,l=2.6097574011,u=-.3413193965):(r=1.35733652,n=-.00915799,a=-1.1513021,i=-.50559606,o=.00692167,s=-.0041960863,l=-.7034186147,u=1.707614701);let c=r+n*e+a*t+i*e*e+o*e*t,f=.3963377774*e+.2158037573*t,v=-.1055613458*e-.0638541728*t,g=-.0894841775*e-1.291485548*t;{let p=1+c*f,x=1+c*v,_=1+c*g,y=p*p*p,C=x*x*x,k=_*_*_,S=3*f*p*p,L=3*v*x*x,w=3*g*_*_,A=6*f*f*p,T=6*v*v*x,m=6*g*g*_,F=s*y+l*C+u*k,E=s*S+l*L+u*w,I=s*A+l*T+u*m;c=c-F*E/(E*E-.5*F*I)}return c}function lq(e,t){let r=hlt(e,t),n=_b({l:1,a:r*e,b:r*t}),a=Math.cbrt(1/Math.max(n.r,n.g,n.b)),i=a*r;return[a,i]}function dlt(e,t,r,n,a,i=null){i||(i=lq(e,t));let o;if((r-a)*i[1]-(i[0]-a)*n<=0)o=i[1]*a/(n*i[0]+i[1]*(a-r));else{o=i[1]*(a-1)/(n*(i[0]-1)+i[1]*(a-r));{let s=r-a,l=n,u=.3963377774*e+.2158037573*t,c=-.1055613458*e-.0638541728*t,f=-.0894841775*e-1.291485548*t,v=s+l*u,g=s+l*c,p=s+l*f;{let x=a*(1-o)+o*r,_=o*n,y=x+_*u,C=x+_*c,k=x+_*f,S=y*y*y,L=C*C*C,w=k*k*k,A=3*v*y*y,T=3*g*C*C,m=3*p*k*k,F=6*v*v*y,E=6*g*g*C,I=6*p*p*k,R=4.0767416621*S-3.3077115913*L+.2309699292*w-1,B=4.0767416621*A-3.3077115913*T+.2309699292*m,O=4.0767416621*F-3.3077115913*E+.2309699292*I,V=B/(B*B-.5*R*O),j=-R*V,q=-1.2684380046*S+2.6097574011*L-.3413193965*w-1,U=-1.2684380046*A+2.6097574011*T-.3413193965*m,J=-1.2684380046*F+2.6097574011*E-.3413193965*I,ee=U/(U*U-.5*q*J),ce=-q*ee,ye=-.0041960863*S-.7034186147*L+1.707614701*w-1,xe=-.0041960863*A-.7034186147*T+1.707614701*m,ue=-.0041960863*F-.7034186147*E+1.707614701*I,K=xe/(xe*xe-.5*ye*ue),_e=-ye*K;j=V>=0?j:1e6,ce=ee>=0?ce:1e6,_e=K>=0?_e:1e6,o+=Math.min(j,Math.min(ce,_e))}}}return o}function uq(e,t,r=null){r||(r=lq(e,t));let n=r[0],a=r[1];return[a/n,a/(1-n)]}function yne(e,t,r){let n=lq(t,r),a=dlt(t,r,e,1,e,n),i=uq(t,r,n),o=.11516993+1/(7.4477897+4.1590124*r+t*(-2.19557347+1.75198401*r+t*(-2.13704948-10.02301043*r+t*(-4.24894561+5.38770819*r+4.69891013*t)))),s=.11239642+1/(1.6132032-.68124379*r+t*(.40370612+.90148123*r+t*(-.27087943+.6122399*r+t*(.00299215-.45399568*r-.14661872*t)))),l=a/Math.min(e*i[0],(1-e)*i[1]),u=e*o,c=(1-e)*s,f=.9*l*Math.sqrt(Math.sqrt(1/(1/(u*u*u*u)+1/(c*c*c*c))));return u=e*.4,c=(1-e)*.8,[Math.sqrt(1/(1/(u*u)+1/(c*c))),f,a]}function Pz(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,a={mode:"okhsl",l:Lz(t)};e.alpha!==void 0&&(a.alpha=e.alpha);let i=Math.sqrt(r*r+n*n);if(!i)return a.s=0,a;let[o,s,l]=yne(t,r/i,n/i),u;if(iPz(V4(e))},toMode:{oklab:Fz,rgb:e=>G4(Fz(e))}}),xne=vlt;function Dz(e){let t=e.l!==void 0?e.l:0,r=e.a!==void 0?e.a:0,n=e.b!==void 0?e.b:0,a=Math.sqrt(r*r+n*n),i=a?r/a:1,o=a?n/a:1,[s,l]=uq(i,o),u=.5,c=1-u/s,f=l/(a+t*l),v=f*t,g=f*a,p=pE(v),x=g*p/v,_=_b({l:p,a:i*x,b:o*x}),y=Math.cbrt(1/Math.max(_.r,_.g,_.b,0));t=t/y,a=a/y*Lz(t)/t,t=Lz(t);let C={mode:"okhsv",s:a?(u+l)*g/(l*u+l*c*g):0,v:t?t/v:0};return C.s&&(C.h=Th(Math.atan2(n,r)*180/Math.PI)),e.alpha!==void 0&&(C.alpha=e.alpha),C}function Rz(e){let t={mode:"oklab"};e.alpha!==void 0&&(t.alpha=e.alpha);let r=e.h!==void 0?e.h:0,n=e.s!==void 0?e.s:0,a=e.v!==void 0?e.v:0,i=Math.cos(r/180*Math.PI),o=Math.sin(r/180*Math.PI),[s,l]=uq(i,o),u=.5,c=1-u/s,f=1-n*u/(u+l-l*c*n),v=n*l*u/(u+l-l*c*n),g=pE(f),p=v*g/f,x=_b({l:g,a:i*p,b:o*p}),_=Math.cbrt(1/Math.max(x.r,x.g,x.b,0)),y=pE(a*f),C=v*y/f;return t.l=y*_,t.a=C*i*_,t.b=C*o*_,t}var plt=tl(zo({},Kz),{mode:"okhsv",channels:["h","s","v","alpha"],parse:["--okhsv"],serialize:"--okhsv",fromMode:{oklab:Dz,rgb:e=>Dz(V4(e))},toMode:{oklab:Rz,rgb:e=>G4(Rz(e))}}),_ne=plt;function glt(e,t){if(!t||t[0]!=="oklab")return;let r={mode:"oklab"},[,n,a,i,o]=t;if(!(n.type===Ti.Hue||a.type===Ti.Hue||i.type===Ti.Hue))return n.type!==Ti.None&&(r.l=Math.min(Math.max(0,n.type===Ti.Number?n.value:n.value/100),1)),a.type!==Ti.None&&(r.a=a.type===Ti.Number?a.value:a.value*.4/100),i.type!==Ti.None&&(r.b=i.type===Ti.Number?i.value:i.value*.4/100),o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var bne=glt,mlt=tl(zo({},AE),{mode:"oklab",toMode:{lrgb:_b,rgb:G4},fromMode:{lrgb:sq,rgb:V4},ranges:{l:[0,1],a:[-.4,.4],b:[-.4,.4]},parse:[bne],serialize:e=>`oklab(${e.l!==void 0?e.l:"none"} ${e.a!==void 0?e.a:"none"} ${e.b!==void 0?e.b:"none"}${e.alpha<1?` / ${e.alpha}`:""})`}),wne=mlt;function ylt(e,t){if(!t||t[0]!=="oklch")return;let r={mode:"oklch"},[,n,a,i,o]=t;if(n.type!==Ti.None){if(n.type===Ti.Hue)return;r.l=Math.min(Math.max(0,n.type===Ti.Number?n.value:n.value/100),1)}if(a.type!==Ti.None&&(r.c=Math.max(0,a.type===Ti.Number?a.value:a.value*.4/100)),i.type!==Ti.None){if(i.type===Ti.Percentage)return;r.h=i.value}return o.type!==Ti.None&&(r.alpha=Math.min(1,Math.max(0,o.type===Ti.Number?o.value:o.value/100))),r}var Tne=ylt,xlt=tl(zo({},ME),{mode:"oklch",toMode:{oklab:e=>j1(e,"oklab"),rgb:e=>G4(j1(e,"oklab"))},fromMode:{rgb:e=>H1(V4(e),"oklch"),oklab:e=>H1(e,"oklch")},parse:[Tne],serialize:e=>`oklch(${e.l!==void 0?e.l:"none"} ${e.c!==void 0?e.c:"none"} ${e.h!==void 0?e.h:"none"}${e.alpha<1?` / ${e.alpha}`:""})`,ranges:{l:[0,1],c:[0,.4],h:[0,360]}}),Ane=xlt,_lt=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i={mode:"xyz65",x:.486570948648216*t+.265667693169093*r+.1982172852343625*n,y:.2289745640697487*t+.6917385218365062*r+.079286914093745*n,z:0*t+.0451133818589026*r+1.043944368900976*n};return a!==void 0&&(i.alpha=a),i},Iz=_lt,blt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=gx({r:e*2.4934969119414263-t*.9313836179191242-.402710784450717*r,g:e*-.8294889695615749+t*1.7626640603183465+.0236246858419436*r,b:e*.0358458302437845-t*.0761723892680418+.9568845240076871*r},"p3");return n!==void 0&&(a.alpha=n),a},zz=blt,wlt=tl(zo({},vx),{mode:"p3",parse:["display-p3"],serialize:"display-p3",fromMode:{rgb:e=>zz(rm(e)),xyz65:zz},toMode:{rgb:e=>nm(Iz(e)),xyz65:Iz}}),Mne=wlt,pz=e=>{let t=Math.abs(e);return t>=1/512?Math.sign(e)*Math.pow(t,1/1.8):16*e},Tlt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"prophoto",r:pz(e*1.3457868816471585-t*.2555720873797946-.0511018649755453*r),g:pz(e*-.5446307051249019+t*1.5082477428451466+.0205274474364214*r),b:pz(e*0+t*0+1.2119675456389452*r)};return n!==void 0&&(a.alpha=n),a},qz=Tlt,gz=(e=0)=>{let t=Math.abs(e);return t>=16/512?Math.sign(e)*Math.pow(t,1.8):e/16},Alt=e=>{let t=gz(e.r),r=gz(e.g),n=gz(e.b),a={mode:"xyz50",x:.7977666449006423*t+.1351812974005331*r+.0313477341283922*n,y:.2880748288194013*t+.7118352342418731*r+899369387256e-16*n,z:0*t+0*r+.8251046025104602*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Bz=Alt,Mlt=tl(zo({},vx),{mode:"prophoto",parse:["prophoto-rgb"],serialize:"prophoto-rgb",fromMode:{xyz50:qz,rgb:e=>qz(xb(e))},toMode:{xyz50:Bz,rgb:e=>yb(Bz(e))}}),Sne=Mlt,xre=1.09929682680944,Slt=.018053968510807,mz=e=>{let t=Math.abs(e);return t>Slt?(Math.sign(e)||1)*(xre*Math.pow(t,.45)-(xre-1)):4.5*e},Elt=({x:e,y:t,z:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"rec2020",r:mz(e*1.7166511879712683-t*.3556707837763925-.2533662813736599*r),g:mz(e*-.6666843518324893+t*1.6164812366349395+.0157685458139111*r),b:mz(e*.0176398574453108-t*.0427706132578085+.9421031212354739*r)};return n!==void 0&&(a.alpha=n),a},Oz=Elt,_re=1.09929682680944,klt=.018053968510807,yz=(e=0)=>{let t=Math.abs(e);return t{let t=yz(e.r),r=yz(e.g),n=yz(e.b),a={mode:"xyz65",x:.6369580483012911*t+.1446169035862083*r+.1688809751641721*n,y:.262700212011267*t+.6779980715188708*r+.059301716469862*n,z:0*t+.0280726930490874*r+1.0609850577107909*n};return e.alpha!==void 0&&(a.alpha=e.alpha),a},Nz=Clt,Llt=tl(zo({},vx),{mode:"rec2020",fromMode:{xyz65:Oz,rgb:e=>Oz(rm(e))},toMode:{xyz65:Nz,rgb:e=>nm(Nz(e))},parse:["rec2020"],serialize:"rec2020"}),Ene=Llt,hx=.0037930732552754493,kne=Math.cbrt(hx),xz=e=>Math.cbrt(e)-kne,Plt=e=>{let{r:t,g:r,b:n,alpha:a}=px(e),i=xz(.3*t+.622*r+.078*n+hx),o=xz(.23*t+.692*r+.078*n+hx),s=xz(.2434226892454782*t+.2047674442449682*r+.5518098665095535*n+hx),l={mode:"xyb",x:(i-o)/2,y:(i+o)/2,b:s-(i+o)/2};return a!==void 0&&(l.alpha=a),l},Cne=Plt,_z=e=>Math.pow(e+kne,3),Flt=({x:e,y:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a=_z(e+t)-hx,i=_z(t-e)-hx,o=_z(r+t)-hx,s=gx({r:11.031566904639861*a-9.866943908131562*i-.16462299650829934*o,g:-3.2541473810744237*a+4.418770377582723*i-.16462299650829934*o,b:-3.6588512867136815*a+2.7129230459360922*i+1.9459282407775895*o});return n!==void 0&&(s.alpha=n),s},Lne=Flt,Dlt={mode:"xyb",channels:["x","y","b","alpha"],parse:["--xyb"],serialize:"--xyb",toMode:{rgb:Lne},fromMode:{rgb:Cne},ranges:{x:[-.0154,.0281],y:[0,.8453],b:[-.2778,.388]},interpolate:{x:Ui,y:Ui,b:Ui,alpha:{use:Ui,fixup:Nc}}},Pne=Dlt,Rlt={mode:"xyz50",parse:["xyz-d50"],serialize:"xyz-d50",toMode:{rgb:yb,lab:TE},fromMode:{rgb:xb,lab:wE},channels:["x","y","z","alpha"],ranges:{x:[0,.964],y:[0,.999],z:[0,.825]},interpolate:{x:Ui,y:Ui,z:Ui,alpha:{use:Ui,fixup:Nc}}},Fne=Rlt,Ilt=e=>{let{x:t,y:r,z:n,alpha:a}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let i={mode:"xyz50",x:1.0479298208405488*t+.0229467933410191*r-.0501922295431356*n,y:.0296278156881593*t+.990434484573249*r-.0170738250293851*n,z:-.0092430581525912*t+.0150551448965779*r+.7518742899580008*n};return a!==void 0&&(i.alpha=a),i},Dne=Ilt,zlt=e=>{let{x:t,y:r,z:n,alpha:a}=e;t===void 0&&(t=0),r===void 0&&(r=0),n===void 0&&(n=0);let i={mode:"xyz65",x:.9554734527042182*t-.0230985368742614*r+.0632593086610217*n,y:-.0283697069632081*t+1.0099954580058226*r+.021041398966943*n,z:.0123140016883199*t-.0205076964334779*r+1.3303659366080753*n};return a!==void 0&&(i.alpha=a),i},Rne=zlt,qlt={mode:"xyz65",toMode:{rgb:nm,xyz50:Dne},fromMode:{rgb:rm,xyz50:Rne},ranges:{x:[0,.95],y:[0,1],z:[0,1.088]},channels:["x","y","z","alpha"],parse:["xyz","xyz-d65"],serialize:"xyz-d65",interpolate:{x:Ui,y:Ui,z:Ui,alpha:{use:Ui,fixup:Nc}}},Ine=qlt,Blt=({r:e,g:t,b:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"yiq",y:.29889531*e+.58662247*t+.11448223*r,i:.59597799*e-.2741761*t-.32180189*r,q:.21147017*e-.52261711*t+.31114694*r};return n!==void 0&&(a.alpha=n),a},zne=Blt,Olt=({y:e,i:t,q:r,alpha:n})=>{e===void 0&&(e=0),t===void 0&&(t=0),r===void 0&&(r=0);let a={mode:"rgb",r:e+.95608445*t+.6208885*r,g:e-.27137664*t-.6486059*r,b:e-1.10561724*t+1.70250126*r};return n!==void 0&&(a.alpha=n),a},qne=Olt,Nlt={mode:"yiq",toMode:{rgb:qne},fromMode:{rgb:zne},channels:["y","i","q","alpha"],parse:["--yiq"],serialize:"--yiq",ranges:{i:[-.595,.595],q:[-.522,.522]},interpolate:{y:Ui,i:Ui,q:Ui,alpha:{use:Ui,fixup:Nc}}},Bne=Nlt,Ult=(e,t)=>Math.round(e*(t=Math.pow(10,t)))/t,Vlt=(e=4)=>t=>typeof t=="number"?Ult(t,e):t,One=Vlt,R4=One(2),z4=e=>Math.max(0,Math.min(1,e||0)),dx=e=>Math.round(z4(e)*255),cq=dl("rgb"),Glt=dl("hsl"),fq=e=>{if(e===void 0)return;let t=dx(e.r),r=dx(e.g),n=dx(e.b);return"#"+(1<<24|t<<16|r<<8|n).toString(16).slice(1)},Nne=e=>{if(e===void 0)return;let t=dx(e.alpha!==void 0?e.alpha:1);return fq(e)+(256|t).toString(16).slice(1)},Une=e=>{if(e===void 0)return;let t=dx(e.r),r=dx(e.g),n=dx(e.b);return e.alpha===void 0||e.alpha===1?`rgb(${t}, ${r}, ${n})`:`rgba(${t}, ${r}, ${n}, ${R4(z4(e.alpha))})`},Vne=e=>{if(e===void 0)return;let t=R4(e.h||0),r=R4(z4(e.s)*100)+"%",n=R4(z4(e.l)*100)+"%";return e.alpha===void 0||e.alpha===1?`hsl(${t}, ${r}, ${n})`:`hsla(${t}, ${r}, ${n}, ${R4(z4(e.alpha))})`},Hlt=e=>{let t=$v(e);if(!t)return;let r=Kh(t.mode);if(!r.serialize||typeof r.serialize=="string"){let n=`color(${r.serialize||`--${t.mode}`} `;return r.channels.forEach((a,i)=>{a!=="alpha"&&(n+=(i?" ":"")+(t[a]!==void 0?t[a]:"none"))}),t.alpha!==void 0&&t.alpha<1&&(n+=` / ${t.alpha}`),n+")"}if(typeof r.serialize=="function")return r.serialize(t)},jlt=e=>fq(cq(e)),Wlt=e=>Nne(cq(e)),Ylt=e=>Une(cq(e)),Xlt=e=>Vne(Glt(e)),Zlt={normal:(e,t)=>t,multiply:(e,t)=>e*t,screen:(e,t)=>e+t-e*t,"hard-light":(e,t)=>t<.5?e*2*t:2*t*(1-e)-1,overlay:(e,t)=>e<.5?t*2*e:2*e*(1-t)-1,darken:(e,t)=>Math.min(e,t),lighten:(e,t)=>Math.max(e,t),"color-dodge":(e,t)=>e===0?0:t===1?1:Math.min(1,e/(1-t)),"color-burn":(e,t)=>e===1?1:t===0?0:1-Math.min(1,(1-e)/t),"soft-light":(e,t)=>t<.5?e-(1-2*t)*e*(1-e):e+(2*t-1)*((e<.25?((16*e-12)*e+4)*e:Math.sqrt(e))-e),difference:(e,t)=>Math.abs(e-t),exclusion:(e,t)=>e+t-2*e*t},$lt=(e,t="normal",r="rgb")=>{let n=typeof t=="function"?t:Zlt[t],a=dl(r),i=Kh(r).channels;return e.map(s=>{let l=a(s);return l.alpha===void 0&&(l.alpha=1),l}).reduce((s,l)=>{if(s===void 0)return l;let u=l.alpha+s.alpha*(1-l.alpha);return i.reduce((c,f)=>(f!=="alpha"&&(u===0?c[f]=0:(c[f]=l.alpha*(1-s.alpha)*l[f]+l.alpha*s.alpha*n(s[f],l[f])+(1-l.alpha)*s.alpha*s[f],c[f]=Math.max(0,Math.min(1,c[f]/u)))),c),{mode:r,alpha:u})})},Klt=$lt,Jlt=([e,t])=>e+Math.random()*(t-e),Qlt=e=>Object.keys(e).reduce((t,r)=>{let n=e[r];return t[r]=Array.isArray(n)?n:[n,n],t},{}),eut=(e="rgb",t={})=>{let r=Kh(e),n=Qlt(t);return r.channels.reduce((a,i)=>((n.alpha||i!=="alpha")&&(a[i]=Jlt(n[i]||r.ranges[i])),a),{mode:e})},tut=eut,H4=(e,t="rgb",r=!1)=>{let n=t?Kh(t).channels:null,a=t?dl(t):$v;return i=>{let o=a(i);if(!o)return;let s=(n||Kh(o.mode).channels).reduce((u,c)=>{let f=e(o[c],c,o,t);return f!==void 0&&!isNaN(f)&&(u[c]=f),u},{mode:o.mode});if(!r)return s;let l=$v(i);return l&&l.mode!==s.mode?dl(l.mode)(s):s}},Gne=(e,t,r)=>t!=="alpha"?(e||0)*(r.alpha!==void 0?r.alpha:1):e,Hne=(e,t,r)=>t!=="alpha"&&r.alpha!==0?(e||0)/(r.alpha!==void 0?r.alpha:1):e,hq=(e=1,t=0)=>(r,n)=>n!=="alpha"?r*e+t:r,rut=(e=1,t=1,r=0)=>(n,a)=>a!=="alpha"?e*Math.pow(n,t)+r:n,nut=e=>{e[0]===void 0&&(e[0]=0),e[e.length-1]===void 0&&(e[e.length-1]=1);let t=1,r,n,a,i;for(;tt=>e<=0?1:e>=1?0:Math.pow(t,Math.log(.5)/Math.log(e)),jne=aut,aE=e=>typeof e=="function",cx=e=>e&&typeof e=="object",bre=e=>typeof e=="number",Wne=(e,t="rgb",r,n)=>{let a=Kh(t),i=dl(t),o=[],s=[],l={};e.forEach(v=>{Array.isArray(v)?(o.push(i(v[0])),s.push(v[1])):bre(v)||aE(v)?l[s.length]=v:(o.push(i(v)),s.push(void 0))}),iut(s);let u=a.channels.reduce((v,g)=>{let p;return cx(r)&&cx(r[g])&&r[g].fixup?p=r[g].fixup:cx(a.interpolate[g])&&a.interpolate[g].fixup?p=a.interpolate[g].fixup:p=x=>x,v[g]=p(o.map(x=>x[g])),v},{});if(n){let v=o.map((g,p)=>a.channels.reduce((x,_)=>(x[_]=u[_][p],x),{mode:t}));u=a.channels.reduce((g,p)=>(g[p]=v.map(x=>{let _=n(x[p],p,x,t);return isNaN(_)?void 0:_}),g),{})}let c=a.channels.reduce((v,g)=>{let p;return aE(r)?p=r:cx(r)&&aE(r[g])?p=r[g]:cx(r)&&cx(r[g])&&r[g].use?p=r[g].use:aE(a.interpolate[g])?p=a.interpolate[g]:cx(a.interpolate[g])&&(p=a.interpolate[g].use),v[g]=p(u[g]),v},{}),f=o.length-1;return v=>{if(v=Math.min(Math.max(0,v),1),v<=s[0])return o[0];if(v>s[f])return o[f];let g=0;for(;s[g]{let L=c[S](C);return L!==void 0&&(k[S]=L),k},{mode:t})}},out=(e,t="rgb",r)=>Wne(e,t,r),Yne=(e,t)=>(r,n="rgb",a)=>{let i=t?H4(t,n):void 0,o=Wne(r,n,a,e);return i?s=>i(o(s)):o},sut=Yne(Gne,Hne),oE=(e,t)=>(e+t)%t,Xne=(e,t,r,n,a)=>{let i=a*a,o=i*a;return((1-3*a+3*i-o)*e+(4-6*i+3*o)*t+(1+3*a+3*i-3*o)*r+o*n)/6},Zne=e=>t=>{let r=e.length-1,n=t>=1?r-1:Math.max(0,Math.floor(t*r));return Xne(n>0?e[n-1]:2*e[n]-e[n+1],e[n],e[n+1],nt=>{let r=e.length-1,n=Math.floor(t*r);return Xne(e[oE(n-1,e.length)],e[oE(n,e.length)],e[oE(n+1,e.length)],e[oE(n+2,e.length)],(t-n/r)*r)},Kne=e=>{let t,r=e.length-1,n=new Array(r),a=new Array(r),i=new Array(r);for(n[1]=1/4,a[1]=(6*e[1]-e[0])/4,t=2;t0&&(i[r-1]=a[r-1]),t=r-2;t>0;--t)i[t]=a[t]-n[t]*i[t+1];return i},lut=e=>Zne(Kne(e)),uut=e=>$ne(Kne(e)),db=Math.sign,Uz=Math.min,b0=Math.abs,dq=e=>{let t=e.length-1,r=[],n=[],a=[];for(let i=0;i0?.5*(e[i+1]-e[i-1])*t:void 0),a.push(i>0?(db(r[i-1])+db(r[i]))*Uz(b0(r[i-1]),b0(r[i]),.5*b0(n[i])):void 0);return[r,n,a]},vq=(e,t,r)=>{let n=e.length-1,a=n*n;return i=>{let o;i>=1?o=n-1:o=Math.max(0,Math.floor(i*n));let s=i-o/n,l=s*s,u=l*s;return(t[o]+t[o+1]-2*r[o])*a*u+(3*r[o]-2*t[o]-t[o+1])*n*l+t[o]*s+e[o]}},cut=e=>{if(e.length<3)return Ui(e);let t=e.length-1,[r,,n]=dq(e);return n[0]=r[0],n[t]=r[t-1],vq(e,n,r)},fut=e=>{if(e.length<3)return Ui(e);let t=e.length-1,[r,n,a]=dq(e);return n[0]=(e[1]*2-e[0]*1.5-e[2]*.5)*t,n[t]=(e[t]*1.5-e[t-1]*2+e[t-2]*.5)*t,a[0]=n[0]*r[0]<=0?0:b0(n[0])>2*b0(r[0])?2*r[0]:n[0],a[t]=n[t]*r[t-1]<=0?0:b0(n[t])>2*b0(r[t-1])?2*r[t-1]:n[t],vq(e,a,r)},hut=e=>{let t=e.length-1,[r,n,a]=dq(e);n[0]=.5*(e[1]-e[t])*t,n[t]=.5*(e[0]-e[t-1])*t;let i=(e[0]-e[t])*t,o=i;return a[0]=(db(i)+db(r[0]))*Uz(b0(i),b0(r[0]),.5*b0(n[0])),a[t]=(db(r[t-1])+db(o))*Uz(b0(r[t-1]),b0(o),.5*b0(n[t])),vq(e,a,r)},dut=(e=1)=>e===1?t=>t:t=>Math.pow(t,e),Jne=dut,vut=(e=2,t=1)=>{let r=Jne(t);if(e<2)return e<1?[]:[r(.5)];let n=[];for(let a=0;a{let t={mode:e.mode,r:Math.max(0,Math.min(e.r!==void 0?e.r:0,1)),g:Math.max(0,Math.min(e.g!==void 0?e.g:0,1)),b:Math.max(0,Math.min(e.b!==void 0?e.b:0,1))};return e.alpha!==void 0&&(t.alpha=e.alpha),t},tie=e=>eie(Qne(e)),rie=e=>e!==void 0&&(e.r===void 0||e.r>=0&&e.r<=1)&&(e.g===void 0||e.g>=0&&e.g<=1)&&(e.b===void 0||e.b>=0&&e.b<=1);function pq(e){return rie(Qne(e))}function SE(e="rgb"){let{gamut:t}=Kh(e);if(!t)return n=>!0;let r=dl(typeof t=="string"?t:e);return n=>rie(r(n))}function gut(e){return e=$v(e),e===void 0||pq(e)?e:dl(e.mode)(tie(e))}function gq(e="rgb"){let{gamut:t}=Kh(e);if(!t)return i=>$v(i);let r=typeof t=="string"?t:e,n=dl(r),a=SE(r);return i=>{let o=$v(i);if(!o)return;let s=n(o);if(a(s))return o;let l=eie(s);return o.mode===l.mode?l:dl(o.mode)(l)}}function mut(e,t="lch",r="rgb"){e=$v(e);let n=r==="rgb"?pq:SE(r),a=r==="rgb"?tie:gq(r);if(e===void 0||n(e))return e;let i=dl(e.mode);e=dl(t)(e);let o=tl(zo({},e),{c:0});if(!n(o))return i(a(o));let s=0,l=e.c!==void 0?e.c:0,u=Kh(t).ranges.c,c=(u[1]-u[0])/Math.pow(2,13),f=o.c;for(;l-s>c;)o.c=s+(l-s)*.5,n(o)?(f=o.c,s=o.c):l=o.c;return i(n(o)?o:tl(zo({},o),{c:f}))}function yut(e="rgb",t="oklch",r=mb("oklch"),n=.02){let a=dl(e),i=Kh(e);if(!i.gamut)return c=>a(c);let o=SE(e),s=gq(e),l=dl(t),{ranges:u}=Kh(t);if(!u.l||!u.c)throw new Error("LCH-like space expected");return c=>{if(c=$v(c),c===void 0)return;let f=zo({},l(c));if(f.l===void 0&&(f.l=0),f.c===void 0&&(f.c=0),f.l>=u.l[1]){let _=tl(zo({},i.white),{mode:e});return c.alpha!==void 0&&(_.alpha=c.alpha),_}if(f.l<=u.l[0]){let _=tl(zo({},i.black),{mode:e});return c.alpha!==void 0&&(_.alpha=c.alpha),_}if(o(f))return a(f);let v=0,g=f.c,p=(u.c[1]-u.c[0])/4e3,x=s(f);for(;g-v>p;)f.c=(v+g)*.5,x=s(f),o(f)||r&&n>0&&r(f,x)<=n?v=f.c:g=f.c;return a(o(f)?f:x)}}var xut=(e,t=mb(),r=n=>n)=>{let n=e.map((a,i)=>({color:r(a),i}));return(a,i=1,o=1/0)=>(isFinite(i)&&(i=Math.max(1,Math.min(i,n.length-1))),n.forEach(s=>{s.d=t(a,s.color)}),n.sort((s,l)=>s.d-l.d).slice(0,i).filter(s=>s.de[s.i]))},_ut=xut,mq=e=>Math.max(e,0),yq=e=>Math.max(Math.min(e,1),0),but=(e,t,r)=>e===void 0||t===void 0?void 0:e+r*(t-e),wut=e=>{let t=1-yq(e);return[.393+.607*t,.769-.769*t,.189-.189*t,0,.349-.349*t,.686+.314*t,.168-.168*t,0,.272-.272*t,.534-.534*t,.131+.869*t,0,0,0,0,1]},Tut=e=>{let t=mq(e);return[.213+.787*t,.715-.715*t,.072-.072*t,0,.213-.213*t,.715+.285*t,.072-.072*t,0,.213-.213*t,.715-.715*t,.072+.928*t,0,0,0,0,1]},Aut=e=>{let t=1-yq(e);return[.2126+.7874*t,.7152-.7152*t,.0722-.0722*t,0,.2126-.2126*t,.7152+.2848*t,.0722-.0722*t,0,.2126-.2126*t,.7152-.7152*t,.0722+.9278*t,0,0,0,0,1]},Mut=e=>{let t=Math.PI*e/180,r=Math.cos(t),n=Math.sin(t);return[.213+r*.787-n*.213,.715-r*.715-n*.715,.072-r*.072+n*.928,0,.213-r*.213+n*.143,.715+r*.285+n*.14,.072-r*.072-n*.283,0,.213-r*.213-n*.787,.715-r*.715+n*.715,.072+r*.928+n*.072,0,0,0,0,1]},EE=(e,t,r=!1)=>{let n=dl(t),a=Kh(t).channels;return i=>{let o=n(i);if(!o)return;let s={mode:t},l,u=a.length;for(let f=0;f{let r=mq(e);return H4(hq(r),t,!0)},Eut=(e=1,t="rgb")=>{let r=mq(e);return H4(hq(r,(1-r)/2),t,!0)},kut=(e=1,t="rgb")=>EE(wut(e),t,!0),Cut=(e=1,t="rgb")=>EE(Tut(e),t,!0),Lut=(e=1,t="rgb")=>EE(Aut(e),t,!0),Put=(e=1,t="rgb")=>{let r=yq(e);return H4((n,a)=>a==="alpha"?n:but(r,1-r,n),t,!0)},Fut=(e=0,t="rgb")=>EE(Mut(e),t,!0),Dut=dl("rgb"),Rut=[[1,0,-0,0,1,0,-0,-0,1],[.856167,.182038,-.038205,.029342,.955115,.015544,-.00288,-.001563,1.004443],[.734766,.334872,-.069637,.05184,.919198,.028963,-.004928,-.004209,1.009137],[.630323,.465641,-.095964,.069181,.890046,.040773,-.006308,-.007724,1.014032],[.539009,.579343,-.118352,.082546,.866121,.051332,-.007136,-.011959,1.019095],[.458064,.679578,-.137642,.092785,.846313,.060902,-.007494,-.016807,1.024301],[.38545,.769005,-.154455,.100526,.829802,.069673,-.007442,-.02219,1.029632],[.319627,.849633,-.169261,.106241,.815969,.07779,-.007025,-.028051,1.035076],[.259411,.923008,-.18242,.110296,.80434,.085364,-.006276,-.034346,1.040622],[.203876,.990338,-.194214,.112975,.794542,.092483,-.005222,-.041043,1.046265],[.152286,1.052583,-.204868,.114503,.786281,.099216,-.003882,-.048116,1.051998]],Iut=[[1,0,-0,0,1,0,-0,-0,1],[.866435,.177704,-.044139,.049567,.939063,.01137,-.003453,.007233,.99622],[.760729,.319078,-.079807,.090568,.889315,.020117,-.006027,.013325,.992702],[.675425,.43385,-.109275,.125303,.847755,.026942,-.00795,.018572,.989378],[.605511,.52856,-.134071,.155318,.812366,.032316,-.009376,.023176,.9862],[.547494,.607765,-.155259,.181692,.781742,.036566,-.01041,.027275,.983136],[.498864,.674741,-.173604,.205199,.754872,.039929,-.011131,.030969,.980162],[.457771,.731899,-.18967,.226409,.731012,.042579,-.011595,.034333,.977261],[.422823,.781057,-.203881,.245752,.709602,.044646,-.011843,.037423,.974421],[.392952,.82361,-.216562,.263559,.69021,.046232,-.01191,.040281,.97163],[.367322,.860646,-.227968,.280085,.672501,.047413,-.01182,.04294,.968881]],zut=[[1,0,-0,0,1,0,-0,-0,1],[.92667,.092514,-.019184,.021191,.964503,.014306,.008437,.054813,.93675],[.89572,.13333,-.02905,.029997,.9454,.024603,.013027,.104707,.882266],[.905871,.127791,-.033662,.026856,.941251,.031893,.01341,.148296,.838294],[.948035,.08949,-.037526,.014364,.946792,.038844,.010853,.193991,.795156],[1.017277,.027029,-.044306,-.006113,.958479,.047634,.006379,.248708,.744913],[1.104996,-.046633,-.058363,-.032137,.971635,.060503,.001336,.317922,.680742],[1.193214,-.109812,-.083402,-.058496,.97941,.079086,-.002346,.403492,.598854],[1.257728,-.139648,-.118081,-.078003,.975409,.102594,-.003316,.501214,.502102],[1.278864,-.125333,-.153531,-.084748,.957674,.127074,-989e-6,.601151,.399838],[1.255528,-.076749,-.178779,-.078411,.930809,.147602,.004733,.691367,.3039]],xq=(e,t)=>{let r=Math.max(0,Math.min(1,t)),n=Math.round(r/.1),a=Math.round(r%.1),i=e[n];if(a>0&&nfx(i[l],o[l],a))}return o=>{let s=$v(o);if(s===void 0)return;let{r:l,g:u,b:c}=Dut(s),f={mode:"rgb",r:i[0]*l+i[1]*u+i[2]*c,g:i[3]*l+i[4]*u+i[5]*c,b:i[6]*l+i[7]*u+i[8]*c};return s.alpha!==void 0&&(f.alpha=s.alpha),dl(s.mode)(f)}},qut=(e=1)=>xq(Rut,e),But=(e=1)=>xq(Iut,e),Out=(e=1)=>xq(zut,e),Nut=e=>e*e*(3-2*e),Uut=e=>.5-Math.sin(Math.asin(1-2*e)/3),Vut=e=>e*e*e*(e*(e*6-15)+10),Gut=Vut,Hut=e=>(1-Math.cos(e*Math.PI))/2,jut=Hut;function Vz(e){let t=dl("lrgb")(e);return .2126*t.r+.7152*t.g+.0722*t.b}function Wut(e,t){let r=Vz(e),n=Vz(t);return(Math.max(r,n)+.05)/(Math.min(r,n)+.05)}var Yut=Rs(Ire),Xut=Rs(Nre),Zut=Rs(jre),$ut=Rs(Wre),Kut=Rs(Zre),Jut=Rs(Xz),Qut=Rs(Kz),ect=Rs(nne),tct=Rs(one),rct=Rs(sne),nct=Rs(lne),ict=Rs(AE),act=Rs(cne),oct=Rs(ME),sct=Rs(hne),lct=Rs(pne),uct=Rs(gne),cct=Rs(mne),fct=Rs(xne),hct=Rs(_ne),dct=Rs(wne),vct=Rs(Ane),pct=Rs(Mne),gct=Rs(Sne),mct=Rs(Ene),yct=Rs(vx),xct=Rs(Pne),_ct=Rs(Fne),bct=Rs(Ine),wct=Rs(Bne)});var im=fe((vfr,lie)=>{"use strict";var aie={staticPlot:{valType:"boolean",dflt:!1},typesetMath:{valType:"boolean",dflt:!0},plotlyServerURL:{valType:"string",dflt:"https://cloud.plotly.com/newchart"},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","map"],extras:[!0,!1],dflt:"gl3d+geo+map"},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},displayNotifier:{valType:"boolean",dflt:!0},displayModeBar:{valType:"enumerated",values:["hover",!0,!1],dflt:"hover"},showSendToCloud:{valType:"boolean",dflt:!0},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/un/"},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},locale:{valType:"string",dflt:"en-US"},locales:{valType:"any",dflt:{}}},oie={};function sie(e,t){for(var r in e){var n=e[r];n.valType?t[r]=n.dflt:(t[r]||(t[r]={}),sie(n,t[r]))}}sie(aie,oie);lie.exports={configAttributes:aie,dfltConfig:oie}});var bq=fe((pfr,uie)=>{"use strict";var _q=xi(),Tct=aa(),j4=[];uie.exports=function(e,t,r){var s;if(((s=r==null?void 0:r._context)==null?void 0:s.displayNotifier)===!1||j4.indexOf(e)!==-1)return;j4.push(e);var n=1e3;Tct(t)?n=t:t==="long"&&(n=3e3);var a=_q.select("body").selectAll(".plotly-notifier").data([0]);a.enter().append("div").classed("plotly-notifier",!0);var i=a.selectAll(".notifier-note").data(j4);function o(l){l.duration(700).style("opacity",0).each("end",function(u){var c=j4.indexOf(u);c!==-1&&j4.splice(c,1),_q.select(this).remove()})}i.enter().append("div").classed("notifier-note",!0).style("opacity",0).each(function(l){var u=_q.select(this);u.append("button").classed("notifier-close",!0).html("×").on("click",function(){u.transition().call(o)});for(var c=u.append("p"),f=l.split(//g),v=0;v{"use strict";var bb=im().dfltConfig,wq=bq(),Tq=cie.exports={};Tq.log=function(){var e;if(bb.logging>1){var t=["LOG:"];for(e=0;e1){var r=[];for(e=0;e"),"long")}};Tq.warn=function(){var e;if(bb.logging>0){var t=["WARN:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}};Tq.error=function(){var e;if(bb.logging>0){var t=["ERROR:"];for(e=0;e0){var r=[];for(e=0;e"),"stick")}}});var tc=fe(mx=>{"use strict";mx.defaults=["#1f77b4","#ff7f0e","#2ca02c","#d62728","#9467bd","#8c564b","#e377c2","#7f7f7f","#bcbd22","#17becf"];mx.defaultLine="#444";mx.lightLine="#eee";mx.background="#fff";mx.borderLine="#BEC8D9";mx.lightFraction=1e3/11});var ni=fe((yfr,yie)=>{"use strict";var{converter:fie,formatHex:Act,formatRgb:Mct,wcagContrast:Sct,wcagLuminance:Ect}=iie(),{isArrayOrTypedArray:kct}=Gf(),{warn:Cct}=W1(),{background:Y4,defaultLine:Sq,defaults:Lct,lightLine:Pct}=tc(),hie=fie("rgb"),Fct=fie("hsl"),die=e=>{if(typeof e!="string")return;let t=e.trim().toLowerCase();if(!/^[0-9a-f]+$/.test(t))try{return hie(t)}catch(r){return}},Jh=e=>e>0?e>1?1:e:0,Dct={mode:"rgb",r:0,g:0,b:0,alpha:1},Aq=e=>Math.round(e*255e6)/255e6,vie=e=>tl(zo({},e),{r:Aq(e.r),g:Aq(e.g),b:Aq(e.b)}),w0=e=>Mct(vie(e)),Rct=e=>Act(vie(e)),eu=(e,t)=>{var n;let r=die(e);return r?((n=r.alpha)!=null||(r.alpha=1),r):(!t&&e!=null&&Cct(`Invalid color specifier: "${e}". Defaulting to "#000"`),Dct)},W4=e=>w0(tl(zo({},eu(e)),{alpha:1})),Ict=e=>e?eu(e).alpha:0,pie=e=>kct(e)&&e.length>2&&Number.isFinite(e[0])&&Number.isFinite(e[1])&&Number.isFinite(e[2]),zct=e=>{let[t,r,n,a]=e,i=Math.max(t,r,n)>1?1/255:1,o=a!=null?a:1;return{mode:"rgb",r:t*i,g:r*i,b:n*i,alpha:o>1?o/255:o}},qct=(e,t)=>{let r=pie(e)?zct(e):eu(e,!0),n=[Jh(r.r),Jh(r.g),Jh(r.b),Jh(r.alpha)];return t==="uint8"||t==="uint8_clamped"?Uint8Array.from(n,a=>Math.round(a*255)):t==="float32"?Float32Array.from(n):t==="float64"?Float64Array.from(n):n},Bct=(e,t)=>w0(tl(zo({},eu(e)),{alpha:Jh(t)})),gie=(e,t)=>{let r=eu(e),n=r.alpha;if(n===1)return w0(r);let a=eu(t||Y4),i=a.alpha,o=(s,l)=>(i===1?l:1-i+l*i)*(1-n)+s*n;return w0({mode:"rgb",r:o(r.r,a.r),g:o(r.g,a.g),b:o(r.b,a.b)})},Oct=(e,t,r)=>{let n=eu(e),a=eu(t),i=(o,s)=>r*o+(1-r)*s;return w0({mode:"rgb",r:i(n.r,a.r),g:i(n.g,a.g),b:i(n.b,a.b)})},Mq=(e,t)=>{let r=eu(e),n=Fct(r)||{mode:"hsl",h:0,s:0,l:0};return w0(hie(tl(zo({},n),{l:Jh((n.l*100+t)/100),alpha:r.alpha})))},kE=(e,t)=>Sct(eu(e),eu(t)),mie=e=>kE(e,Y4)>kE(e,Sq),Nct=w0(eu(Y4)),Uct=w0(eu(Sq)),Vct=(e,t,r)=>(eu(e).alpha!==1&&(e=gie(e,Y4)),mie(e)?t?Mq(e,t):Nct:r?Mq(e,-r):Uct),Gct=(e,t)=>{e.style({stroke:W4(t),"stroke-opacity":eu(t).alpha})},Hct=(e,t)=>{e.style({fill:W4(t),"fill-opacity":eu(t).alpha})},jct=(e,t)=>!!(e&&t&&W4(e)===W4(t)),Wct=e=>die(e)!==void 0,Yct=(e,t)=>{t=t===0?0:t||10;let r=eu(e),n=t/100;return w0(tl(zo({},r),{r:Jh(r.r+n),g:Jh(r.g+n),b:Jh(r.b+n)}))},Xct=(e,t,r)=>{let n=eu(e),a=eu(t),i=r/100,o=a.alpha-n.alpha,s=2*i-1,l=((s*o===-1?s:(s+o)/(1+s*o))+1)/2,u=1-l,c=(f,v)=>u*f+l*v;return w0({mode:"rgb",r:c(n.r,a.r),g:c(n.g,a.g),b:c(n.b,a.b),alpha:n.alpha*(1-i)+a.alpha*i})},Zct=(e,t=["#000","#fff"])=>{let r,n=-1/0;for(let a of t){let i=kE(e,a);i>n&&(n=i,r=w0(eu(a)))}return r},$ct=e=>w0(eu(e)),Kct=e=>Rct(eu(e)).toUpperCase(),Jct=e=>{let t=eu(e);return[Jh(t.r)*255,Jh(t.g)*255,Jh(t.b)*255,Jh(t.alpha)]},Qct=([e,t,r,n])=>w0({mode:"rgb",r:e/255,g:t/255,b:r/255,alpha:n}),eft=e=>{let t=eu(e);return Ect({mode:"rgb",r:Jh(t.r),g:Jh(t.g),b:Jh(t.b)})};yie.exports={addOpacity:Bct,adjustLightness:Mq,background:Y4,brighten:Yct,combine:gie,contrast:Vct,defaultLine:Sq,defaults:Lct,equals:jct,fill:Hct,hexString:Kct,interpolate:Oct,isChannelArray:pie,isDark:mie,isValid:Wct,lightLine:Pct,luminosity:eft,mix:Xct,mostReadable:Zct,normalize:qct,opacity:Ict,parse:eu,rgb:W4,rgbaArray:Jct,rgbaArrayToString:Qct,rgbaString:$ct,stroke:Gct,wcagContrast:kE}});var yx=fe((_fr,bie)=>{"use strict";var tft=ni(),CE={Greys:[[0,"rgb(0,0,0)"],[1,"rgb(255,255,255)"]],YlGnBu:[[0,"rgb(8,29,88)"],[.125,"rgb(37,52,148)"],[.25,"rgb(34,94,168)"],[.375,"rgb(29,145,192)"],[.5,"rgb(65,182,196)"],[.625,"rgb(127,205,187)"],[.75,"rgb(199,233,180)"],[.875,"rgb(237,248,217)"],[1,"rgb(255,255,217)"]],Greens:[[0,"rgb(0,68,27)"],[.125,"rgb(0,109,44)"],[.25,"rgb(35,139,69)"],[.375,"rgb(65,171,93)"],[.5,"rgb(116,196,118)"],[.625,"rgb(161,217,155)"],[.75,"rgb(199,233,192)"],[.875,"rgb(229,245,224)"],[1,"rgb(247,252,245)"]],YlOrRd:[[0,"rgb(128,0,38)"],[.125,"rgb(189,0,38)"],[.25,"rgb(227,26,28)"],[.375,"rgb(252,78,42)"],[.5,"rgb(253,141,60)"],[.625,"rgb(254,178,76)"],[.75,"rgb(254,217,118)"],[.875,"rgb(255,237,160)"],[1,"rgb(255,255,204)"]],Bluered:[[0,"rgb(0,0,255)"],[1,"rgb(255,0,0)"]],RdBu:[[0,"rgb(5,10,172)"],[.35,"rgb(106,137,247)"],[.5,"rgb(190,190,190)"],[.6,"rgb(220,170,132)"],[.7,"rgb(230,145,90)"],[1,"rgb(178,10,28)"]],Reds:[[0,"rgb(220,220,220)"],[.2,"rgb(245,195,157)"],[.4,"rgb(245,160,105)"],[1,"rgb(178,10,28)"]],Blues:[[0,"rgb(5,10,172)"],[.35,"rgb(40,60,190)"],[.5,"rgb(70,100,245)"],[.6,"rgb(90,120,245)"],[.7,"rgb(106,137,247)"],[1,"rgb(220,220,220)"]],Picnic:[[0,"rgb(0,0,255)"],[.1,"rgb(51,153,255)"],[.2,"rgb(102,204,255)"],[.3,"rgb(153,204,255)"],[.4,"rgb(204,204,255)"],[.5,"rgb(255,255,255)"],[.6,"rgb(255,204,255)"],[.7,"rgb(255,153,255)"],[.8,"rgb(255,102,204)"],[.9,"rgb(255,102,102)"],[1,"rgb(255,0,0)"]],Rainbow:[[0,"rgb(150,0,90)"],[.125,"rgb(0,0,200)"],[.25,"rgb(0,25,255)"],[.375,"rgb(0,152,255)"],[.5,"rgb(44,255,150)"],[.625,"rgb(151,255,0)"],[.75,"rgb(255,234,0)"],[.875,"rgb(255,111,0)"],[1,"rgb(255,0,0)"]],Portland:[[0,"rgb(12,51,131)"],[.25,"rgb(10,136,186)"],[.5,"rgb(242,211,56)"],[.75,"rgb(242,143,56)"],[1,"rgb(217,30,30)"]],Jet:[[0,"rgb(0,0,131)"],[.125,"rgb(0,60,170)"],[.375,"rgb(5,255,255)"],[.625,"rgb(255,255,0)"],[.875,"rgb(250,0,0)"],[1,"rgb(128,0,0)"]],Hot:[[0,"rgb(0,0,0)"],[.3,"rgb(230,0,0)"],[.6,"rgb(255,210,0)"],[1,"rgb(255,255,255)"]],Blackbody:[[0,"rgb(0,0,0)"],[.2,"rgb(230,0,0)"],[.4,"rgb(230,210,0)"],[.7,"rgb(255,255,255)"],[1,"rgb(160,200,255)"]],Earth:[[0,"rgb(0,0,130)"],[.1,"rgb(0,180,180)"],[.2,"rgb(40,210,40)"],[.4,"rgb(230,230,50)"],[.6,"rgb(120,70,20)"],[1,"rgb(255,255,255)"]],Electric:[[0,"rgb(0,0,0)"],[.15,"rgb(30,0,100)"],[.4,"rgb(120,0,100)"],[.6,"rgb(160,90,0)"],[.8,"rgb(230,200,0)"],[1,"rgb(255,250,220)"]],Viridis:[[0,"#440154"],[.06274509803921569,"#48186a"],[.12549019607843137,"#472d7b"],[.18823529411764706,"#424086"],[.25098039215686274,"#3b528b"],[.3137254901960784,"#33638d"],[.3764705882352941,"#2c728e"],[.4392156862745098,"#26828e"],[.5019607843137255,"#21918c"],[.5647058823529412,"#1fa088"],[.6274509803921569,"#28ae80"],[.6901960784313725,"#3fbc73"],[.7529411764705882,"#5ec962"],[.8156862745098039,"#84d44b"],[.8784313725490196,"#addc30"],[.9411764705882353,"#d8e219"],[1,"#fde725"]],Cividis:[[0,"rgb(0,32,76)"],[.058824,"rgb(0,42,102)"],[.117647,"rgb(0,52,110)"],[.176471,"rgb(39,63,108)"],[.235294,"rgb(60,74,107)"],[.294118,"rgb(76,85,107)"],[.352941,"rgb(91,95,109)"],[.411765,"rgb(104,106,112)"],[.470588,"rgb(117,117,117)"],[.529412,"rgb(131,129,120)"],[.588235,"rgb(146,140,120)"],[.647059,"rgb(161,152,118)"],[.705882,"rgb(176,165,114)"],[.764706,"rgb(192,177,109)"],[.823529,"rgb(209,191,102)"],[.882353,"rgb(225,204,92)"],[.941176,"rgb(243,219,79)"],[1,"rgb(255,233,69)"]]},xie=CE.RdBu;function rft(e,t){if(t||(t=xie),!e)return t;function r(){try{e=CE[e]||JSON.parse(e)}catch(n){e=t}}return typeof e=="string"&&(r(),typeof e=="string"&&r()),_ie(e)?e:t}function _ie(e){var t=0;if(!Array.isArray(e)||e.length<2||!e[0]||!e[e.length-1]||+e[0][0]!=0||+e[e.length-1][0]!=1)return!1;for(var r=0;r{"use strict";wie.exports={SHOW_PLACEHOLDER:100,HIDE_PLACEHOLDER:1e3,DESELECTDIM:.2}});var wb={};zp(wb,{counter:()=>ift});function ift(e,t="",r,n){let a=t+(r?"":"$"),i=n===!1?"":"^";return e==="xy"?new RegExp(i+"x"+Eq+"y"+Eq+a):new RegExp(i+e+Eq+a)}var Eq,Tb=Co(()=>{"use strict";Eq="([2-9]|[1-9][0-9]+)?"});var Mie=fe(Kd=>{"use strict";var kq=aa(),Tie=ta().extendFlat,aft=Ho(),oft=yx(),Cq=ni(),sft=Y1().DESELECTDIM,Ab=M4(),Aie=(Tb(),Gs(wb)).counter,lft=(fb(),Gs(cb)).modHalf,Kv=Gf().isArrayOrTypedArray,am=Gf().isTypedArraySpec,om=Gf().decodeTypedArraySpec;Kd.valObjectMeta={data_array:{coerceFunction:function(e,t,r){t.set(Kv(e)?e:am(e)?om(e):r)}},enumerated:{coerceFunction:function(e,t,r,n){n.coerceNumber&&(e=+e),n.values.indexOf(e)===-1?t.set(r):t.set(e)},validateFunction:function(e,t){t.coerceNumber&&(e=+e);for(var r=t.values,n=0;ni===!0||i===!1;a(e)||n.arrayOk&&Array.isArray(e)&&e.length>0&&e.every(a)?t.set(e):t.set(r)}},number:{coerceFunction:function(e,t,r,n){am(e)&&(e=om(e)),!kq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},integer:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}am(e)&&(e=om(e)),e%1||!kq(e)||n.min!==void 0&&en.max?t.set(r):t.set(+e)}},string:{coerceFunction:function(e,t,r,n){if(typeof e!="string"){var a=typeof e=="number";n.strict===!0||!a?t.set(r):t.set(String(e))}else n.noBlank&&!e?t.set(r):t.set(e)}},color:{coerceFunction:function(e,t,r){am(e)&&(e=om(e)),Cq.isValid(e)?t.set(e):t.set(r)}},colorlist:{coerceFunction:function(e,t,r){!Array.isArray(e)||!e.length?t.set(r):e.every(n=>Cq.isValid(n))?t.set(e):t.set(r)}},colorscale:{coerceFunction:function(e,t,r){t.set(oft.get(e,r))}},angle:{coerceFunction:function(e,t,r){am(e)&&(e=om(e)),e==="auto"?t.set("auto"):kq(e)?t.set(lft(+e,360)):t.set(r)}},subplotid:{coerceFunction:function(e,t,r,n){var a=n.regex||Aie(r);let i=o=>typeof o=="string"&&a.test(o);i(e)||n.arrayOk&&Kv(e)&&e.length>0&&e.every(i)?t.set(e):t.set(r)},validateFunction:function(e,t){var r=t.dflt;return e===r?!0:typeof e!="string"?!1:!!Aie(r).test(e)}},flaglist:{coerceFunction:function(e,t,r,n){if((n.extras||[]).indexOf(e)!==-1){t.set(e);return}if(typeof e!="string"){t.set(r);return}for(var a=e.split("+"),i=0;i{"use strict";Sie.exports=function(){}});var Lq=fe((Afr,Eie)=>{"use strict";Eie.exports=function(t,r){if(r instanceof RegExp){for(var n=r.toString(),a=0;a{kie.exports=uft;function uft(){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}});var Pie=fe((Sfr,Lie)=>{Lie.exports=cft;function cft(e){var t=new Float32Array(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}});var Die=fe((Efr,Fie)=>{Fie.exports=fft;function fft(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var Pq=fe((kfr,Rie)=>{Rie.exports=hft;function hft(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}});var zie=fe((Cfr,Iie)=>{Iie.exports=dft;function dft(e,t){if(e===t){var r=t[1],n=t[2],a=t[3],i=t[6],o=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=r,e[6]=t[9],e[7]=t[13],e[8]=n,e[9]=i,e[11]=t[14],e[12]=a,e[13]=o,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}});var Bie=fe((Lfr,qie)=>{qie.exports=vft;function vft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],v=t[10],g=t[11],p=t[12],x=t[13],_=t[14],y=t[15],C=r*s-n*o,k=r*l-a*o,S=r*u-i*o,L=n*l-a*s,w=n*u-i*s,A=a*u-i*l,T=c*x-f*p,m=c*_-v*p,F=c*y-g*p,E=f*_-v*x,I=f*y-g*x,R=v*y-g*_,B=C*R-k*I+S*E+L*F-w*m+A*T;return B?(B=1/B,e[0]=(s*R-l*I+u*E)*B,e[1]=(a*I-n*R-i*E)*B,e[2]=(x*A-_*w+y*L)*B,e[3]=(v*w-f*A-g*L)*B,e[4]=(l*F-o*R-u*m)*B,e[5]=(r*R-a*F+i*m)*B,e[6]=(_*S-p*A-y*k)*B,e[7]=(c*A-v*S+g*k)*B,e[8]=(o*I-s*F+u*T)*B,e[9]=(n*F-r*I-i*T)*B,e[10]=(p*w-x*S+y*C)*B,e[11]=(f*S-c*w-g*C)*B,e[12]=(s*m-o*E-l*T)*B,e[13]=(r*E-n*m+a*T)*B,e[14]=(x*k-p*L-_*C)*B,e[15]=(c*L-f*k+v*C)*B,e):null}});var Nie=fe((Pfr,Oie)=>{Oie.exports=pft;function pft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=t[4],s=t[5],l=t[6],u=t[7],c=t[8],f=t[9],v=t[10],g=t[11],p=t[12],x=t[13],_=t[14],y=t[15];return e[0]=s*(v*y-g*_)-f*(l*y-u*_)+x*(l*g-u*v),e[1]=-(n*(v*y-g*_)-f*(a*y-i*_)+x*(a*g-i*v)),e[2]=n*(l*y-u*_)-s*(a*y-i*_)+x*(a*u-i*l),e[3]=-(n*(l*g-u*v)-s*(a*g-i*v)+f*(a*u-i*l)),e[4]=-(o*(v*y-g*_)-c*(l*y-u*_)+p*(l*g-u*v)),e[5]=r*(v*y-g*_)-c*(a*y-i*_)+p*(a*g-i*v),e[6]=-(r*(l*y-u*_)-o*(a*y-i*_)+p*(a*u-i*l)),e[7]=r*(l*g-u*v)-o*(a*g-i*v)+c*(a*u-i*l),e[8]=o*(f*y-g*x)-c*(s*y-u*x)+p*(s*g-u*f),e[9]=-(r*(f*y-g*x)-c*(n*y-i*x)+p*(n*g-i*f)),e[10]=r*(s*y-u*x)-o*(n*y-i*x)+p*(n*u-i*s),e[11]=-(r*(s*g-u*f)-o*(n*g-i*f)+c*(n*u-i*s)),e[12]=-(o*(f*_-v*x)-c*(s*_-l*x)+p*(s*v-l*f)),e[13]=r*(f*_-v*x)-c*(n*_-a*x)+p*(n*v-a*f),e[14]=-(r*(s*_-l*x)-o*(n*_-a*x)+p*(n*l-a*s)),e[15]=r*(s*v-l*f)-o*(n*v-a*f)+c*(n*l-a*s),e}});var Vie=fe((Ffr,Uie)=>{Uie.exports=gft;function gft(e){var t=e[0],r=e[1],n=e[2],a=e[3],i=e[4],o=e[5],s=e[6],l=e[7],u=e[8],c=e[9],f=e[10],v=e[11],g=e[12],p=e[13],x=e[14],_=e[15],y=t*o-r*i,C=t*s-n*i,k=t*l-a*i,S=r*s-n*o,L=r*l-a*o,w=n*l-a*s,A=u*p-c*g,T=u*x-f*g,m=u*_-v*g,F=c*x-f*p,E=c*_-v*p,I=f*_-v*x;return y*I-C*E+k*F+S*m-L*T+w*A}});var Hie=fe((Dfr,Gie)=>{Gie.exports=mft;function mft(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=t[4],l=t[5],u=t[6],c=t[7],f=t[8],v=t[9],g=t[10],p=t[11],x=t[12],_=t[13],y=t[14],C=t[15],k=r[0],S=r[1],L=r[2],w=r[3];return e[0]=k*n+S*s+L*f+w*x,e[1]=k*a+S*l+L*v+w*_,e[2]=k*i+S*u+L*g+w*y,e[3]=k*o+S*c+L*p+w*C,k=r[4],S=r[5],L=r[6],w=r[7],e[4]=k*n+S*s+L*f+w*x,e[5]=k*a+S*l+L*v+w*_,e[6]=k*i+S*u+L*g+w*y,e[7]=k*o+S*c+L*p+w*C,k=r[8],S=r[9],L=r[10],w=r[11],e[8]=k*n+S*s+L*f+w*x,e[9]=k*a+S*l+L*v+w*_,e[10]=k*i+S*u+L*g+w*y,e[11]=k*o+S*c+L*p+w*C,k=r[12],S=r[13],L=r[14],w=r[15],e[12]=k*n+S*s+L*f+w*x,e[13]=k*a+S*l+L*v+w*_,e[14]=k*i+S*u+L*g+w*y,e[15]=k*o+S*c+L*p+w*C,e}});var Wie=fe((Rfr,jie)=>{jie.exports=yft;function yft(e,t,r){var n=r[0],a=r[1],i=r[2],o,s,l,u,c,f,v,g,p,x,_,y;return t===e?(e[12]=t[0]*n+t[4]*a+t[8]*i+t[12],e[13]=t[1]*n+t[5]*a+t[9]*i+t[13],e[14]=t[2]*n+t[6]*a+t[10]*i+t[14],e[15]=t[3]*n+t[7]*a+t[11]*i+t[15]):(o=t[0],s=t[1],l=t[2],u=t[3],c=t[4],f=t[5],v=t[6],g=t[7],p=t[8],x=t[9],_=t[10],y=t[11],e[0]=o,e[1]=s,e[2]=l,e[3]=u,e[4]=c,e[5]=f,e[6]=v,e[7]=g,e[8]=p,e[9]=x,e[10]=_,e[11]=y,e[12]=o*n+c*a+p*i+t[12],e[13]=s*n+f*a+x*i+t[13],e[14]=l*n+v*a+_*i+t[14],e[15]=u*n+g*a+y*i+t[15]),e}});var Xie=fe((Ifr,Yie)=>{Yie.exports=xft;function xft(e,t,r){var n=r[0],a=r[1],i=r[2];return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e[4]=t[4]*a,e[5]=t[5]*a,e[6]=t[6]*a,e[7]=t[7]*a,e[8]=t[8]*i,e[9]=t[9]*i,e[10]=t[10]*i,e[11]=t[11]*i,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}});var $ie=fe((zfr,Zie)=>{Zie.exports=_ft;function _ft(e,t,r,n){var a=n[0],i=n[1],o=n[2],s=Math.sqrt(a*a+i*i+o*o),l,u,c,f,v,g,p,x,_,y,C,k,S,L,w,A,T,m,F,E,I,R,B,O;return Math.abs(s)<1e-6?null:(s=1/s,a*=s,i*=s,o*=s,l=Math.sin(r),u=Math.cos(r),c=1-u,f=t[0],v=t[1],g=t[2],p=t[3],x=t[4],_=t[5],y=t[6],C=t[7],k=t[8],S=t[9],L=t[10],w=t[11],A=a*a*c+u,T=i*a*c+o*l,m=o*a*c-i*l,F=a*i*c-o*l,E=i*i*c+u,I=o*i*c+a*l,R=a*o*c+i*l,B=i*o*c-a*l,O=o*o*c+u,e[0]=f*A+x*T+k*m,e[1]=v*A+_*T+S*m,e[2]=g*A+y*T+L*m,e[3]=p*A+C*T+w*m,e[4]=f*F+x*E+k*I,e[5]=v*F+_*E+S*I,e[6]=g*F+y*E+L*I,e[7]=p*F+C*E+w*I,e[8]=f*R+x*B+k*O,e[9]=v*R+_*B+S*O,e[10]=g*R+y*B+L*O,e[11]=p*R+C*B+w*O,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e)}});var Jie=fe((qfr,Kie)=>{Kie.exports=bft;function bft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[4],o=t[5],s=t[6],l=t[7],u=t[8],c=t[9],f=t[10],v=t[11];return t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[4]=i*a+u*n,e[5]=o*a+c*n,e[6]=s*a+f*n,e[7]=l*a+v*n,e[8]=u*a-i*n,e[9]=c*a-o*n,e[10]=f*a-s*n,e[11]=v*a-l*n,e}});var eae=fe((Bfr,Qie)=>{Qie.exports=wft;function wft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],u=t[8],c=t[9],f=t[10],v=t[11];return t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a-u*n,e[1]=o*a-c*n,e[2]=s*a-f*n,e[3]=l*a-v*n,e[8]=i*n+u*a,e[9]=o*n+c*a,e[10]=s*n+f*a,e[11]=l*n+v*a,e}});var rae=fe((Ofr,tae)=>{tae.exports=Tft;function Tft(e,t,r){var n=Math.sin(r),a=Math.cos(r),i=t[0],o=t[1],s=t[2],l=t[3],u=t[4],c=t[5],f=t[6],v=t[7];return t!==e&&(e[8]=t[8],e[9]=t[9],e[10]=t[10],e[11]=t[11],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]),e[0]=i*a+u*n,e[1]=o*a+c*n,e[2]=s*a+f*n,e[3]=l*a+v*n,e[4]=u*a-i*n,e[5]=c*a-o*n,e[6]=f*a-s*n,e[7]=v*a-l*n,e}});var iae=fe((Nfr,nae)=>{nae.exports=Aft;function Aft(e,t,r){var n,a,i,o=r[0],s=r[1],l=r[2],u=Math.sqrt(o*o+s*s+l*l);return Math.abs(u)<1e-6?null:(u=1/u,o*=u,s*=u,l*=u,n=Math.sin(t),a=Math.cos(t),i=1-a,e[0]=o*o*i+a,e[1]=s*o*i+l*n,e[2]=l*o*i-s*n,e[3]=0,e[4]=o*s*i-l*n,e[5]=s*s*i+a,e[6]=l*s*i+o*n,e[7]=0,e[8]=o*l*i+s*n,e[9]=s*l*i-o*n,e[10]=l*l*i+a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e)}});var oae=fe((Ufr,aae)=>{aae.exports=Mft;function Mft(e,t,r){var n=t[0],a=t[1],i=t[2],o=t[3],s=n+n,l=a+a,u=i+i,c=n*s,f=n*l,v=n*u,g=a*l,p=a*u,x=i*u,_=o*s,y=o*l,C=o*u;return e[0]=1-(g+x),e[1]=f+C,e[2]=v-y,e[3]=0,e[4]=f-C,e[5]=1-(c+x),e[6]=p+_,e[7]=0,e[8]=v+y,e[9]=p-_,e[10]=1-(c+g),e[11]=0,e[12]=r[0],e[13]=r[1],e[14]=r[2],e[15]=1,e}});var lae=fe((Vfr,sae)=>{sae.exports=Sft;function Sft(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var cae=fe((Gfr,uae)=>{uae.exports=Eft;function Eft(e,t){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]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}});var hae=fe((Hfr,fae)=>{fae.exports=kft;function kft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=n,e[6]=r,e[7]=0,e[8]=0,e[9]=-r,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var vae=fe((jfr,dae)=>{dae.exports=Cft;function Cft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=0,e[2]=-r,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=r,e[9]=0,e[10]=n,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var gae=fe((Wfr,pae)=>{pae.exports=Lft;function Lft(e,t){var r=Math.sin(t),n=Math.cos(t);return e[0]=n,e[1]=r,e[2]=0,e[3]=0,e[4]=-r,e[5]=n,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}});var yae=fe((Yfr,mae)=>{mae.exports=Pft;function Pft(e,t){var r=t[0],n=t[1],a=t[2],i=t[3],o=r+r,s=n+n,l=a+a,u=r*o,c=n*o,f=n*s,v=a*o,g=a*s,p=a*l,x=i*o,_=i*s,y=i*l;return e[0]=1-f-p,e[1]=c+y,e[2]=v-_,e[3]=0,e[4]=c-y,e[5]=1-u-p,e[6]=g+x,e[7]=0,e[8]=v+_,e[9]=g-x,e[10]=1-u-f,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}});var _ae=fe((Xfr,xae)=>{xae.exports=Fft;function Fft(e,t,r,n,a,i,o){var s=1/(r-t),l=1/(a-n),u=1/(i-o);return e[0]=i*2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i*2*l,e[6]=0,e[7]=0,e[8]=(r+t)*s,e[9]=(a+n)*l,e[10]=(o+i)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=o*i*2*u,e[15]=0,e}});var wae=fe((Zfr,bae)=>{bae.exports=Dft;function Dft(e,t,r,n,a){var i=1/Math.tan(t/2),o=1/(n-a);return e[0]=i/r,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=i,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(a+n)*o,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*a*n*o,e[15]=0,e}});var Aae=fe(($fr,Tae)=>{Tae.exports=Rft;function Rft(e,t,r,n){var a=Math.tan(t.upDegrees*Math.PI/180),i=Math.tan(t.downDegrees*Math.PI/180),o=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(o+s),u=2/(a+i);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-((o-s)*l*.5),e[9]=(a-i)*u*.5,e[10]=n/(r-n),e[11]=-1,e[12]=0,e[13]=0,e[14]=n*r/(r-n),e[15]=0,e}});var Sae=fe((Kfr,Mae)=>{Mae.exports=Ift;function Ift(e,t,r,n,a,i,o){var s=1/(t-r),l=1/(n-a),u=1/(i-o);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+r)*s,e[13]=(a+n)*l,e[14]=(o+i)*u,e[15]=1,e}});var kae=fe((Jfr,Eae)=>{var zft=Pq();Eae.exports=qft;function qft(e,t,r,n){var a,i,o,s,l,u,c,f,v,g,p=t[0],x=t[1],_=t[2],y=n[0],C=n[1],k=n[2],S=r[0],L=r[1],w=r[2];return Math.abs(p-S)<1e-6&&Math.abs(x-L)<1e-6&&Math.abs(_-w)<1e-6?zft(e):(c=p-S,f=x-L,v=_-w,g=1/Math.sqrt(c*c+f*f+v*v),c*=g,f*=g,v*=g,a=C*v-k*f,i=k*c-y*v,o=y*f-C*c,g=Math.sqrt(a*a+i*i+o*o),g?(g=1/g,a*=g,i*=g,o*=g):(a=0,i=0,o=0),s=f*o-v*i,l=v*a-c*o,u=c*i-f*a,g=Math.sqrt(s*s+l*l+u*u),g?(g=1/g,s*=g,l*=g,u*=g):(s=0,l=0,u=0),e[0]=a,e[1]=s,e[2]=c,e[3]=0,e[4]=i,e[5]=l,e[6]=f,e[7]=0,e[8]=o,e[9]=u,e[10]=v,e[11]=0,e[12]=-(a*p+i*x+o*_),e[13]=-(s*p+l*x+u*_),e[14]=-(c*p+f*x+v*_),e[15]=1,e)}});var Lae=fe((Qfr,Cae)=>{Cae.exports=Bft;function Bft(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]+")"}});var Fq=fe((ehr,Pae)=>{Pae.exports={create:Cie(),clone:Pie(),copy:Die(),identity:Pq(),transpose:zie(),invert:Bie(),adjoint:Nie(),determinant:Vie(),multiply:Hie(),translate:Wie(),scale:Xie(),rotate:$ie(),rotateX:Jie(),rotateY:eae(),rotateZ:rae(),fromRotation:iae(),fromRotationTranslation:oae(),fromScaling:lae(),fromTranslation:cae(),fromXRotation:hae(),fromYRotation:vae(),fromZRotation:gae(),fromQuat:yae(),frustum:_ae(),perspective:wae(),perspectiveFromFieldOfView:Aae(),ortho:Sae(),lookAt:kae(),str:Lae()}});var FE=fe(Lu=>{"use strict";var Oft=Fq();Lu.init2dArray=function(e,t){for(var r=new Array(e),n=0;n{"use strict";var Nft=xi(),Fae=W1(),Uft=FE(),Vft=Fq();function Gft(e){var t;if(typeof e=="string"){if(t=document.getElementById(e),t===null)throw new Error("No DOM element with id '"+e+"' exists on the page.");return t}else if(e==null)throw new Error("DOM element provided is null or undefined");return e}function Hft(e){var t=Nft.select(e);return t.node()instanceof HTMLElement&&t.size()&&t.classed("js-plotly-plot")}function Dae(e){var t=e&&e.parentNode;t&&t.removeChild(e)}function jft(e,t){Rae("global",e,t)}function Rae(e,t,r){var n="plotly.js-style-"+e,a=document.getElementById(n);if(!(a&&a.matches(".no-inline-styles"))){a||(a=document.createElement("style"),a.setAttribute("id",n),a.appendChild(document.createTextNode("")),document.head.appendChild(a));var i=a.sheet;i?i.insertRule?i.insertRule(t+"{"+r+"}",0):i.addRule?i.addRule(t,r,0):Fae.warn("addStyleRule failed"):Fae.warn("Cannot addRelatedStyleRule, probably due to strict CSP...")}}function Wft(e){var t="plotly.js-style-"+e,r=document.getElementById(t);r&&Dae(r)}function Yft(e,t,r,n,a,i){var o=n.split(":"),s=a.split(":"),l="data-btn-style-event-added";i||(i=document),i.querySelectorAll(e).forEach(function(u){u.getAttribute(l)||(u.addEventListener("mouseenter",function(){var c=this.querySelector(r);c&&(c.style[o[0]]=o[1])}),u.addEventListener("mouseleave",function(){var c=this.querySelector(r);c&&(t&&this.matches(t)?c.style[o[0]]=o[1]:c.style[s[0]]=s[1])}),u.setAttribute(l,!0))})}function Xft(e){var t=zae(e),r=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];return t.forEach(function(n){var a=Iae(n);if(a){var i=Uft.convertCssMatrix(a);r=Vft.multiply(r,r,i)}}),r}function Iae(e){var t=window.getComputedStyle(e,null),r=t.getPropertyValue("-webkit-transform")||t.getPropertyValue("-moz-transform")||t.getPropertyValue("-ms-transform")||t.getPropertyValue("-o-transform")||t.getPropertyValue("transform");return r==="none"?null:r.replace("matrix","").replace("3d","").slice(1,-1).split(",").map(function(n){return+n})}function zae(e){for(var t=[];Zft(e);)t.push(e),e=e.parentNode,typeof ShadowRoot=="function"&&e instanceof ShadowRoot&&(e=e.host);return t}function Zft(e){return e&&(e instanceof Element||e instanceof HTMLElement)}function $ft(e,t){return e&&t&&e.top===t.top&&e.left===t.left&&e.right===t.right&&e.bottom===t.bottom}qae.exports={getGraphDiv:Gft,isPlotDiv:Hft,removeElement:Dae,addStyleRule:jft,addRelatedStyleRule:Rae,deleteRelatedStyleRule:Wft,setStyleOnHover:Yft,getFullTransformMatrix:Xft,getElementTransformMatrix:Iae,getElementAndAncestors:zae,equalDomRects:$ft}});var Z4=fe((nhr,Bae)=>{"use strict";Bae.exports={mode:{valType:"enumerated",dflt:"afterall",values:["immediate","next","afterall"]},direction:{valType:"enumerated",values:["forward","reverse"],dflt:"forward"},fromcurrent:{valType:"boolean",dflt:!1},frame:{duration:{valType:"number",min:0,dflt:500},redraw:{valType:"boolean",dflt:!0}},transition:{duration:{valType:"number",min:0,dflt:500,editType:"none"},easing:{valType:"enumerated",dflt:"cubic-in-out",values:["linear","quad","cubic","sin","exp","circle","elastic","back","bounce","linear-in","quad-in","cubic-in","sin-in","exp-in","circle-in","elastic-in","back-in","bounce-in","linear-out","quad-out","cubic-out","sin-out","exp-out","circle-out","elastic-out","back-out","bounce-out","linear-in-out","quad-in-out","cubic-in-out","sin-in-out","exp-in-out","circle-in-out","elastic-in-out","back-in-out","bounce-in-out"],editType:"none"},ordering:{valType:"enumerated",values:["layout first","traces first"],dflt:"layout first",editType:"none"}}}});var rl=fe((ihr,jae)=>{"use strict";var Nae=ta().extendFlat,Kft=em(),Uae={valType:"flaglist",extras:["none"],flags:["calc","clearAxisTypes","plot","style","markerSize","colorbars"]},Vae={valType:"flaglist",extras:["none"],flags:["calc","plot","legend","ticks","axrange","layoutstyle","modebar","camera","arraydraw","colorbars"]},Jft=Uae.flags.slice().concat(["fullReplot"]),Qft=Vae.flags.slice().concat("layoutReplot");jae.exports={traces:Uae,layout:Vae,traceFlags:function(){return Oae(Jft)},layoutFlags:function(){return Oae(Qft)},update:function(e,t){var r=t.editType;if(r&&r!=="none")for(var n=r.split("+"),a=0;a{"use strict";Dq.dash={valType:"string",values:["solid","dot","dash","longdash","dashdot","longdashdot"],dflt:"solid",editType:"style"};Dq.pattern={shape:{valType:"enumerated",values:["","/","\\","x","-","|","+","."],dflt:"",arrayOk:!0,editType:"style"},path:{valType:"string",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"}});var Rq=fe((ohr,Wae)=>{"use strict";Wae.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"}});var Oo=fe(Mb=>{"use strict";var{DATE_FORMAT_LINK:eht,FORMAT_LINK:tht}=Rq(),rht=["Variables that can't be found will be replaced with the specifier.",'For example, a template of "data: %{x}, %{y}" will result in a value of "data: 1, %{y}" if x is 1 and y is missing.',"Variables with an undefined value will be replaced with the fallback value."].join(" ");function nht({supportOther:e}={}){return["Variables are inserted using %{variable},",'for example "y: %{y}"'+(e?" as well as %{xother}, {%_xother}, {%_xother_}, {%xother_}. When showing info for several points, *xother* will be added to those with different x positions from the first point. An underscore before or after *(x|y)other* will add a space on that side, only when this field is shown.":"."),`Numbers are formatted using d3-format's syntax %{variable:d3-format}, for example "Price: %{y:$.2f}".`,tht,"for details on the formatting syntax.",`Dates are formatted using d3-time-format's syntax %{variable|d3-time-format}, for example "Day: %{2019-01-01|%A}".`,eht,"for details on the date formatting syntax.",rht].join(" ")}Mb.templateFormatStringDescription=nht;Mb.hovertemplateAttrs=({editType:e="none",arrayOk:t}={},r={})=>zo({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Mb.texttemplateAttrs=({editType:e="calc",arrayOk:t}={},r={})=>zo({valType:"string",dflt:"",editType:e},t!==!1?{arrayOk:!0}:{});Mb.shapeTexttemplateAttrs=({editType:e="arraydraw",newshape:t}={},r={})=>({valType:"string",dflt:"",editType:e});Mb.templatefallbackAttrs=({editType:e="none"}={})=>({valType:"any",dflt:"-",editType:e})});var IE=fe((uhr,Jae)=>{"use strict";function sm(e,t){return t?t.d2l(e):e}function Yae(e,t){return t?t.l2d(e):e}function iht(e){return e.x0}function aht(e){return e.x1}function oht(e){return e.y0}function sht(e){return e.y1}function Xae(e){return e.x0shift||0}function Zae(e){return e.x1shift||0}function $ae(e){return e.y0shift||0}function Kae(e){return e.y1shift||0}function DE(e,t){return sm(e.x1,t)+Zae(e)-sm(e.x0,t)-Xae(e)}function RE(e,t,r){return sm(e.y1,r)+Kae(e)-sm(e.y0,r)-$ae(e)}function lht(e,t){return Math.abs(DE(e,t))}function uht(e,t,r){return Math.abs(RE(e,t,r))}function cht(e,t,r){return e.type!=="line"?void 0:Math.sqrt(Math.pow(DE(e,t),2)+Math.pow(RE(e,t,r),2))}function fht(e,t){return Yae((sm(e.x1,t)+Zae(e)+sm(e.x0,t)+Xae(e))/2,t)}function hht(e,t,r){return Yae((sm(e.y1,r)+Kae(e)+sm(e.y0,r)+$ae(e))/2,r)}function dht(e,t,r){return e.type!=="line"?void 0:RE(e,t,r)/DE(e,t)}var vht=["x0","x1","y0","y1","dy","height","ycenter"],pht=["x0","x1","y0","y1","dx","width","xcenter"];Jae.exports={x0:iht,x1:aht,y0:oht,y1:sht,slope:dht,dx:DE,dy:RE,width:lht,height:uht,length:cht,xcenter:fht,ycenter:hht,simpleXVariables:vht,simpleYVariables:pht}});var toe=fe((chr,eoe)=>{"use strict";var ght=rl().overrideAll,xx=Ho(),Qae=Ds(),mht=Uc().dash,lm=ta().extendFlat,{shapeTexttemplateAttrs:yht,templatefallbackAttrs:xht}=Oo(),_ht=IE();eoe.exports=ght({newshape:{visible:lm({},xx.visible,{}),showlegend:{valType:"boolean",dflt:!1},legend:lm({},xx.legend,{}),legendgroup:lm({},xx.legendgroup,{}),legendgrouptitle:{text:lm({},xx.legendgrouptitle.text,{}),font:Qae({})},legendrank:lm({},xx.legendrank,{}),legendwidth:lm({},xx.legendwidth,{}),line:{color:{valType:"color"},width:{valType:"number",min:0,dflt:4},dash:lm({},mht,{dflt:"solid"})},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd"},opacity:{valType:"number",min:0,max:1,dflt:1},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above"},drawdirection:{valType:"enumerated",values:["ortho","horizontal","vertical","diagonal"],dflt:"diagonal"},name:lm({},xx.name,{}),label:{text:{valType:"string",dflt:""},texttemplate:yht({newshape:!0},{keys:Object.keys(_ht)}),texttemplatefallback:xht({editType:"arraydraw"}),font:Qae({}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"]},textangle:{valType:"angle",dflt:"auto"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto"},yanchor:{valType:"enumerated",values:["top","middle","bottom"]},padding:{valType:"number",dflt:3,min:0}}},activeshape:{fillcolor:{valType:"color",dflt:"rgb(255,0,255)",description:"Sets the color filling the active shape' interior."},opacity:{valType:"number",min:0,max:1,dflt:.5}}},"none","from-root")});var noe=fe((fhr,roe)=>{"use strict";var bht=Uc().dash,wht=ta().extendFlat;roe.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:wht({},bht,{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"}}});var zE=fe((hhr,ioe)=>{"use strict";ioe.exports=function(e){var t=e.editType;return{t:{valType:"number",dflt:0,editType:t},r:{valType:"number",dflt:0,editType:t},b:{valType:"number",dflt:0,editType:t},l:{valType:"number",dflt:0,editType:t},editType:t}}});var Sb=fe((dhr,loe)=>{"use strict";var Iq=Ds(),Tht=Z4(),qE=tc(),aoe=toe(),ooe=noe(),Aht=zE(),soe=ta().extendFlat,BE=Iq({editType:"calc"});BE.family.dflt='"Open Sans", verdana, arial, sans-serif';BE.size.dflt=12;BE.color.dflt=qE.defaultLine;loe.exports={font:BE,title:{text:{valType:"string",editType:"layoutstyle"},font:Iq({editType:"layoutstyle"}),subtitle:{text:{valType:"string",editType:"layoutstyle"},font:Iq({editType:"layoutstyle"}),editType:"layoutstyle"},xref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},yref:{valType:"enumerated",dflt:"container",values:["container","paper"],editType:"layoutstyle"},x:{valType:"number",min:0,max:1,dflt:.5,editType:"layoutstyle"},y:{valType:"number",min:0,max:1,dflt:"auto",editType:"layoutstyle"},xanchor:{valType:"enumerated",dflt:"auto",values:["auto","left","center","right"],editType:"layoutstyle"},yanchor:{valType:"enumerated",dflt:"auto",values:["auto","top","middle","bottom"],editType:"layoutstyle"},pad:soe(Aht({editType:"layoutstyle"}),{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},editType:"layoutstyle"},uniformtext:{mode:{valType:"enumerated",values:[!1,"hide","show"],dflt:!1,editType:"plot"},minsize:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"},autosize:{valType:"boolean",dflt:!1,editType:"none"},width:{valType:"number",min:10,dflt:700,editType:"plot"},height:{valType:"number",min:10,dflt:450,editType:"plot"},minreducedwidth:{valType:"number",min:2,dflt:64,editType:"plot"},minreducedheight:{valType:"number",min:2,dflt:64,editType:"plot"},margin:{l:{valType:"number",min:0,dflt:80,editType:"plot"},r:{valType:"number",min:0,dflt:80,editType:"plot"},t:{valType:"number",min:0,dflt:100,editType:"plot"},b:{valType:"number",min:0,dflt:80,editType:"plot"},pad:{valType:"number",min:0,dflt:0,editType:"plot"},autoexpand:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},computed:{valType:"any",editType:"none"},paper_bgcolor:{valType:"color",dflt:qE.background,editType:"plot"},plot_bgcolor:{valType:"color",dflt:qE.background,editType:"layoutstyle"},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},separators:{valType:"string",editType:"plot"},showlegend:{valType:"boolean",editType:"legend"},colorway:{valType:"colorlist",dflt:qE.defaults,editType:"calc"},datarevision:{valType:"any",editType:"calc"},uirevision:{valType:"any",editType:"none"},editrevision:{valType:"any",editType:"none"},selectionrevision:{valType:"any",editType:"none"},template:{valType:"any",editType:"calc"},newshape:aoe.newshape,activeshape:aoe.activeshape,newselection:ooe.newselection,activeselection:ooe.activeselection,meta:{valType:"any",arrayOk:!0,editType:"plot"},transition:soe({},Tht.transition,{editType:"none"})}});var uoe=fe(()=>{(function(){if(!document.getElementById("ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe")){var e=document.createElement("style");e.id="ce8d464691048653ffe3a57c6c18ab566e8366f186677868cf724621a857b4fe",e.textContent=`.maplibregl-map{font:12px/20px Helvetica Neue,Arial,Helvetica,sans-serif;overflow:hidden;position:relative;-webkit-tap-highlight-color:rgb(0 0 0/0)}.maplibregl-canvas{left:0;position:absolute;top:0}.maplibregl-map:fullscreen{height:100%;width:100%}.maplibregl-ctrl-group button.maplibregl-ctrl-compass{touch-action:none}.maplibregl-canvas-container.maplibregl-interactive,.maplibregl-ctrl-group button.maplibregl-ctrl-compass{cursor:grab;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-canvas-container.maplibregl-interactive.maplibregl-track-pointer{cursor:pointer}.maplibregl-canvas-container.maplibregl-interactive:active,.maplibregl-ctrl-group button.maplibregl-ctrl-compass:active{cursor:grabbing}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-canvas-container.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:pinch-zoom}.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan,.maplibregl-canvas-container.maplibregl-touch-zoom-rotate.maplibregl-touch-drag-pan .maplibregl-canvas{touch-action:none}.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures,.maplibregl-canvas-container.maplibregl-touch-drag-pan.maplibregl-cooperative-gestures .maplibregl-canvas{touch-action:pan-x pan-y}.maplibregl-ctrl-bottom-left,.maplibregl-ctrl-bottom-right,.maplibregl-ctrl-top-left,.maplibregl-ctrl-top-right{pointer-events:none;position:absolute;z-index:2}.maplibregl-ctrl-top-left{left:0;top:0}.maplibregl-ctrl-top-right{right:0;top:0}.maplibregl-ctrl-bottom-left{bottom:0;left:0}.maplibregl-ctrl-bottom-right{bottom:0;right:0}.maplibregl-ctrl{clear:both;pointer-events:auto;transform:translate(0)}.maplibregl-ctrl-top-left .maplibregl-ctrl{float:left;margin:10px 0 0 10px}.maplibregl-ctrl-top-right .maplibregl-ctrl{float:right;margin:10px 10px 0 0}.maplibregl-ctrl-bottom-left .maplibregl-ctrl{float:left;margin:0 0 10px 10px}.maplibregl-ctrl-bottom-right .maplibregl-ctrl{float:right;margin:0 10px 10px 0}.maplibregl-ctrl-group{background:#fff;border-radius:4px}.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px rgba(0,0,0,.1)}@media (forced-colors:active){.maplibregl-ctrl-group:not(:empty){box-shadow:0 0 0 2px ButtonText}}.maplibregl-ctrl-group button{background-color:transparent;border:0;box-sizing:border-box;cursor:pointer;display:block;height:29px;outline:none;padding:0;width:29px}.maplibregl-ctrl-group button+button{border-top:1px solid #ddd}.maplibregl-ctrl button .maplibregl-ctrl-icon{background-position:50%;background-repeat:no-repeat;display:block;height:100%;width:100%}@media (forced-colors:active){.maplibregl-ctrl-icon{background-color:transparent}.maplibregl-ctrl-group button+button{border-top:1px solid ButtonText}}.maplibregl-ctrl button::-moz-focus-inner{border:0;padding:0}.maplibregl-ctrl-attrib-button:focus,.maplibregl-ctrl-group button:focus{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl button:disabled{cursor:not-allowed}.maplibregl-ctrl button:disabled .maplibregl-ctrl-icon{opacity:.25}@media (hover:hover){.maplibregl-ctrl button:not(:disabled):hover{background-color:rgba(0,0,0,.05)}}.maplibregl-ctrl button:not(:disabled):active{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-group button:focus:focus-visible{box-shadow:0 0 2px 2px #0096ff}.maplibregl-ctrl-group button:focus:not(:focus-visible){box-shadow:none}.maplibregl-ctrl-group button:focus:first-child{border-radius:4px 4px 0 0}.maplibregl-ctrl-group button:focus:last-child{border-radius:0 0 4px 4px}.maplibregl-ctrl-group button:focus:only-child{border-radius:inherit}.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-zoom-out .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M10 13c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h9c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-zoom-in .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M14.5 8.5c-.75 0-1.5.75-1.5 1.5v3h-3c-.75 0-1.5.75-1.5 1.5S9.25 16 10 16h3v3c0 .75.75 1.5 1.5 1.5S16 19.75 16 19v-3h3c.75 0 1.5-.75 1.5-1.5S19.75 13 19 13h-3v-3c0-.75-.75-1.5-1.5-1.5'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-fullscreen .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M24 16v5.5c0 1.75-.75 2.5-2.5 2.5H16v-1l3-1.5-4-5.5 1-1 5.5 4 1.5-3zM6 16l1.5 3 5.5-4 1 1-4 5.5 3 1.5v1H7.5C5.75 24 5 23.25 5 21.5V16zm7-11v1l-3 1.5 4 5.5-1 1-5.5-4L6 13H5V7.5C5 5.75 5.75 5 7.5 5zm11 2.5c0-1.75-.75-2.5-2.5-2.5H16v1l3 1.5-4 5.5 1 1 5.5-4 1.5 3h1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-shrink .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='M18.5 16c-1.75 0-2.5.75-2.5 2.5V24h1l1.5-3 5.5 4 1-1-4-5.5 3-1.5v-1zM13 18.5c0-1.75-.75-2.5-2.5-2.5H5v1l3 1.5L4 24l1 1 5.5-4 1.5 3h1zm3-8c0 1.75.75 2.5 2.5 2.5H24v-1l-3-1.5L25 5l-1-1-5.5 4L17 5h-1zM10.5 13c1.75 0 2.5-.75 2.5-2.5V5h-1l-1.5 3L5 4 4 5l4 5.5L5 12v1z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-compass .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 29 29'%3E%3Cpath d='m10.5 14 4-8 4 8z'/%3E%3Cpath fill='%23ccc' d='m10.5 16 4 8 4-8z'/%3E%3C/svg%3E")}}.maplibregl-ctrl button.maplibregl-ctrl-globe .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%23333' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-globe-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='none' stroke='%2333b5e5' viewBox='0 0 22 22'%3E%3Ccircle cx='11' cy='11' r='8.5'/%3E%3Cpath d='M17.5 11c0 4.819-3.02 8.5-6.5 8.5S4.5 15.819 4.5 11 7.52 2.5 11 2.5s6.5 3.681 6.5 8.5Z'/%3E%3Cpath d='M13.5 11c0 2.447-.331 4.64-.853 6.206-.262.785-.562 1.384-.872 1.777-.314.399-.58.517-.775.517s-.461-.118-.775-.517c-.31-.393-.61-.992-.872-1.777C8.831 15.64 8.5 13.446 8.5 11s.331-4.64.853-6.206c.262-.785.562-1.384.872-1.777.314-.399.58-.517.775-.517s.461.118.775.517c.31.393.61.992.872 1.777.522 1.565.853 3.76.853 6.206Z'/%3E%3Cpath d='M11 7.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138q.07-.058.224-.138c.299-.151.763-.302 1.379-.434C7.378 5.666 9.091 5.5 11 5.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138q-.07.058-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428ZM4.486 6.436ZM11 16.5c-1.909 0-3.622-.166-4.845-.428-.616-.132-1.08-.283-1.379-.434a1.3 1.3 0 0 1-.224-.138 1.3 1.3 0 0 1 .224-.138c.299-.151.763-.302 1.379-.434C7.378 14.666 9.091 14.5 11 14.5s3.622.166 4.845.428c.616.132 1.08.283 1.379.434.105.053.177.1.224.138a1.3 1.3 0 0 1-.224.138c-.299.151-.763.302-1.379.434-1.223.262-2.936.428-4.845.428Zm-6.514-1.064ZM11 12.5c-2.46 0-4.672-.222-6.255-.574-.796-.177-1.406-.38-1.805-.59a1.5 1.5 0 0 1-.39-.272.3.3 0 0 1-.047-.064.3.3 0 0 1 .048-.064c.066-.073.189-.167.389-.272.399-.21 1.009-.413 1.805-.59C6.328 9.722 8.54 9.5 11 9.5s4.672.222 6.256.574c.795.177 1.405.38 1.804.59.2.105.323.2.39.272a.3.3 0 0 1 .047.064.3.3 0 0 1-.048.064 1.4 1.4 0 0 1-.389.272c-.399.21-1.009.413-1.804.59-1.584.352-3.796.574-6.256.574Zm-8.501-1.51v.002zm0 .018v.002zm17.002.002v-.002zm0-.018v-.002z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%23333' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-terrain-enabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='22' height='22' fill='%2333b5e5' viewBox='0 0 22 22'%3E%3Cpath d='m1.754 13.406 4.453-4.851 3.09 3.09 3.281 3.277.969-.969-3.309-3.312 3.844-4.121 6.148 6.886h1.082v-.855l-7.207-8.07-4.84 5.187L6.169 6.57l-5.48 5.965v.871ZM.688 16.844h20.625v1.375H.688Zm0 0'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23333' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23aaa' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-waiting .maplibregl-ctrl-icon{animation:maplibregl-spin 2s linear infinite}@media (forced-colors:active){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23fff' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23999' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-active-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e58978' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%2333b5e5' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate.maplibregl-ctrl-geolocate-background-error .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23e54e33' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl button.maplibregl-ctrl-geolocate .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3C/svg%3E")}.maplibregl-ctrl button.maplibregl-ctrl-geolocate:disabled .maplibregl-ctrl-icon{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='29' height='29' fill='%23666' viewBox='0 0 20 20'%3E%3Cpath d='M10 4C9 4 9 5 9 5v.1A5 5 0 0 0 5.1 9H5s-1 0-1 1 1 1 1 1h.1A5 5 0 0 0 9 14.9v.1s0 1 1 1 1-1 1-1v-.1a5 5 0 0 0 3.9-3.9h.1s1 0 1-1-1-1-1-1h-.1A5 5 0 0 0 11 5.1V5s0-1-1-1m0 2.5a3.5 3.5 0 1 1 0 7 3.5 3.5 0 1 1 0-7'/%3E%3Ccircle cx='10' cy='10' r='2'/%3E%3Cpath fill='red' d='m14 5 1 1-9 9-1-1z'/%3E%3C/svg%3E")}}@keyframes maplibregl-spin{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E");background-repeat:no-repeat;cursor:pointer;display:block;height:23px;margin:0 0 -4px -4px;overflow:hidden;width:88px}a.maplibregl-ctrl-logo.maplibregl-compact{width:14px}@media (forced-colors:active){a.maplibregl-ctrl-logo{background-color:transparent;background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}@media (forced-colors:active) and (prefers-color-scheme:light){a.maplibregl-ctrl-logo{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='88' height='23' fill='none'%3E%3Cpath fill='%23000' fill-opacity='.4' fill-rule='evenodd' d='M17.408 16.796h-1.827l2.501-12.095h.198l3.324 6.533.988 2.19.988-2.19 3.258-6.533h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.929 5.644h-.098l-2.914-5.644-.757-1.71-.345 1.71zm1.958-3.42-.726 3.663a1.255 1.255 0 0 1-1.232 1.011h-1.827a1.255 1.255 0 0 1-1.229-1.509l2.501-12.095a1.255 1.255 0 0 1 1.23-1.001h.197a1.25 1.25 0 0 1 1.12.685l3.19 6.273 3.125-6.263a1.25 1.25 0 0 1 1.123-.695h.181a1.255 1.255 0 0 1 1.227.991l1.443 6.71a5 5 0 0 1 .314-.787l.009-.016a4.6 4.6 0 0 1 1.777-1.887c.782-.46 1.668-.667 2.611-.667a4.6 4.6 0 0 1 1.7.32l.306.134c.21-.16.474-.256.759-.256h1.694a1.255 1.255 0 0 1 1.212.925 1.255 1.255 0 0 1 1.212-.925h1.711c.284 0 .545.094.755.252.613-.3 1.312-.45 2.075-.45 1.356 0 2.557.445 3.482 1.4q.47.48.763 1.064V4.701a1.255 1.255 0 0 1 1.255-1.255h1.86A1.255 1.255 0 0 1 54.44 4.7v9.194h2.217c.19 0 .37.043.532.118v-4.77c0-.356.147-.678.385-.906a2.42 2.42 0 0 1-.682-1.71c0-.665.267-1.253.735-1.7a2.45 2.45 0 0 1 1.722-.674 2.43 2.43 0 0 1 1.705.675q.318.302.504.683V4.7a1.255 1.255 0 0 1 1.255-1.255h1.744A1.255 1.255 0 0 1 65.812 4.7v3.335a4.8 4.8 0 0 1 1.526-.246c.938 0 1.817.214 2.59.69a4.47 4.47 0 0 1 1.67 1.743v-.98a1.255 1.255 0 0 1 1.256-1.256h1.777c.233 0 .451.064.639.174a3.4 3.4 0 0 1 1.567-.372c.346 0 .861.02 1.285.232a1.25 1.25 0 0 1 .689 1.004 4.7 4.7 0 0 1 .853-.588c.795-.44 1.675-.647 2.61-.647 1.385 0 2.65.39 3.525 1.396.836.938 1.168 2.173 1.168 3.528q-.001.515-.056 1.051a1.255 1.255 0 0 1-.947 1.09l.408.952a1.255 1.255 0 0 1-.477 1.552c-.418.268-.92.463-1.458.612-.613.171-1.304.244-2.049.244-1.06 0-2.043-.207-2.886-.698l-.015-.008c-.798-.48-1.419-1.135-1.818-1.963l-.004-.008a5.8 5.8 0 0 1-.548-2.512q0-.429.053-.843a1.3 1.3 0 0 1-.333-.086l-.166-.004c-.223 0-.426.062-.643.228-.03.024-.142.139-.142.59v3.883a1.255 1.255 0 0 1-1.256 1.256h-1.777a1.255 1.255 0 0 1-1.256-1.256V15.69l-.032.057a4.8 4.8 0 0 1-1.86 1.833 5.04 5.04 0 0 1-2.484.634 4.5 4.5 0 0 1-1.935-.424 1.25 1.25 0 0 1-.764.258h-1.71a1.255 1.255 0 0 1-1.256-1.255V7.687a2.4 2.4 0 0 1-.428.625c.253.23.412.561.412.93v7.553a1.255 1.255 0 0 1-1.256 1.255h-1.843a1.25 1.25 0 0 1-.894-.373c-.228.23-.544.373-.894.373H51.32a1.255 1.255 0 0 1-1.256-1.255v-1.251l-.061.117a4.7 4.7 0 0 1-1.782 1.884 4.77 4.77 0 0 1-2.485.67 5.6 5.6 0 0 1-1.485-.188l.009 2.764a1.255 1.255 0 0 1-1.255 1.259h-1.729a1.255 1.255 0 0 1-1.255-1.255v-3.537a1.255 1.255 0 0 1-1.167.793h-1.679a1.25 1.25 0 0 1-.77-.263 4.5 4.5 0 0 1-1.945.429c-.885 0-1.724-.21-2.495-.632l-.017-.01a5 5 0 0 1-1.081-.836 1.255 1.255 0 0 1-1.254 1.312h-1.81a1.255 1.255 0 0 1-1.228-.99l-.782-3.625-2.044 3.939a1.25 1.25 0 0 1-1.115.676h-.098a1.25 1.25 0 0 1-1.116-.68l-2.061-3.994zM35.92 16.63l.207-.114.223-.15q.493-.356.735-.785l.061-.118.033 1.332h1.678V9.242h-1.694l-.033 1.267q-.133-.329-.526-.658l-.032-.028a3.2 3.2 0 0 0-.668-.428l-.27-.12a3.3 3.3 0 0 0-1.235-.23q-1.136-.001-1.974.493a3.36 3.36 0 0 0-1.3 1.382q-.445.89-.444 2.074 0 1.2.51 2.107a3.8 3.8 0 0 0 1.382 1.381 3.9 3.9 0 0 0 1.893.477q.795 0 1.455-.33zm-2.789-5.38q-.576.675-.575 1.762 0 1.102.559 1.794.576.675 1.645.675a2.25 2.25 0 0 0 .934-.19 2.2 2.2 0 0 0 .468-.29l.178-.161a2.2 2.2 0 0 0 .397-.561q.244-.5.244-1.15v-.115q0-.708-.296-1.267l-.043-.077a2.2 2.2 0 0 0-.633-.709l-.13-.086-.047-.028a2.1 2.1 0 0 0-1.073-.285q-1.052 0-1.629.692zm2.316 2.706c.163-.17.28-.407.28-.83v-.114c0-.292-.06-.508-.15-.68a.96.96 0 0 0-.353-.389.85.85 0 0 0-.464-.127c-.4 0-.56.114-.664.239l-.01.012c-.148.174-.275.45-.275.945 0 .506.122.801.27.99.097.11.266.224.68.224.303 0 .504-.09.687-.269zm7.545 1.705a2.6 2.6 0 0 0 .331.423q.319.33.755.548l.173.074q.65.255 1.49.255 1.02 0 1.844-.493a3.45 3.45 0 0 0 1.316-1.4q.493-.904.493-2.089 0-1.909-.988-2.913-.988-1.02-2.584-1.02-.898 0-1.575.347a3 3 0 0 0-.415.262l-.199.166a3.4 3.4 0 0 0-.64.82V9.242h-1.712v11.553h1.729l-.017-5.134zm.53-1.138q.206.29.48.5l.155.11.053.034q.51.296 1.119.297 1.07 0 1.645-.675.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.435 0-.835.16a2 2 0 0 0-.284.136 2 2 0 0 0-.363.254 2.2 2.2 0 0 0-.46.569l-.082.162a2.6 2.6 0 0 0-.213 1.072v.115q0 .707.296 1.267l.135.211zm.964-.818a1.1 1.1 0 0 0 .367.385.94.94 0 0 0 .476.118c.423 0 .59-.117.687-.23.159-.194.28-.478.28-.95 0-.53-.133-.8-.266-.952l-.021-.025c-.078-.094-.231-.221-.68-.221a1 1 0 0 0-.503.135l-.012.007a.86.86 0 0 0-.335.343c-.073.133-.132.324-.132.614v.115a1.4 1.4 0 0 0 .14.66zm15.7-6.222q.347-.346.346-.856a1.05 1.05 0 0 0-.345-.79 1.18 1.18 0 0 0-.84-.329q-.51 0-.855.33a1.05 1.05 0 0 0-.346.79q0 .51.346.855.345.346.856.346.51 0 .839-.346zm4.337 9.314.033-1.332q.191.403.59.747l.098.081a4 4 0 0 0 .316.224l.223.122a3.2 3.2 0 0 0 1.44.322 3.8 3.8 0 0 0 1.875-.477 3.5 3.5 0 0 0 1.382-1.366q.527-.89.526-2.09 0-1.184-.444-2.073a3.24 3.24 0 0 0-1.283-1.399q-.823-.51-1.942-.51a3.5 3.5 0 0 0-1.527.344l-.086.043-.165.09a3 3 0 0 0-.33.214q-.432.315-.656.707a2 2 0 0 0-.099.198l.082-1.283V4.701h-1.744v12.095zm.473-2.509a2.5 2.5 0 0 0 .566.7q.117.098.245.18l.144.08a2.1 2.1 0 0 0 .975.232q1.07 0 1.645-.675.576-.69.576-1.778 0-1.102-.576-1.777-.56-.691-1.645-.692a2.2 2.2 0 0 0-1.015.235q-.22.113-.415.282l-.15.142a2.1 2.1 0 0 0-.42.594q-.223.479-.223 1.1v.115q0 .705.293 1.26zm2.616-.293c.157-.191.28-.479.28-.967 0-.51-.13-.79-.276-.961l-.021-.026c-.082-.1-.232-.225-.67-.225a.87.87 0 0 0-.681.279l-.012.011c-.154.155-.274.38-.274.807v.115c0 .285.057.499.144.669a1.1 1.1 0 0 0 .367.405c.137.082.28.123.455.123.423 0 .59-.118.686-.23zm8.266-3.013q.345-.13.724-.14l.069-.002q.493 0 .642.099l.247-1.794q-.196-.099-.717-.099a2.3 2.3 0 0 0-.545.063 2 2 0 0 0-.411.148 2.2 2.2 0 0 0-.4.249 2.5 2.5 0 0 0-.485.499 2.7 2.7 0 0 0-.32.581l-.05.137v-1.48h-1.778v7.553h1.777v-3.884q0-.546.159-.943a1.5 1.5 0 0 1 .466-.636 2.5 2.5 0 0 1 .399-.253 2 2 0 0 1 .224-.099zm9.784 2.656.05-.922q0-1.743-.856-2.698-.838-.97-2.584-.97-1.119-.001-2.007.493a3.46 3.46 0 0 0-1.4 1.382q-.493.906-.493 2.106 0 1.07.428 1.975.428.89 1.332 1.432.906.526 2.255.526.973 0 1.668-.185l.044-.012.135-.04q.613-.184.984-.421l-.542-1.267q-.3.162-.642.274l-.297.087q-.51.131-1.3.131-.954 0-1.497-.444a1.6 1.6 0 0 1-.192-.193q-.366-.44-.512-1.234l-.004-.021zm-5.427-1.256-.003.022h3.752v-.138q-.011-.727-.288-1.118a1 1 0 0 0-.156-.176q-.46-.428-1.316-.428-.986 0-1.494.604-.379.45-.494 1.234zm-27.053 2.77V4.7h-1.86v12.095h5.333V15.15zm7.103-5.908v7.553h-1.843V9.242h1.843z'/%3E%3Cpath fill='%23fff' d='m19.63 11.151-.757-1.71-.345 1.71-1.12 5.644h-1.827L18.083 4.7h.197l3.325 6.533.988 2.19.988-2.19L26.839 4.7h.181l2.6 12.095h-1.81l-1.218-5.644-.362-1.71-.658 1.71-2.93 5.644h-.098l-2.913-5.644zm14.836 5.81q-1.02 0-1.893-.478a3.8 3.8 0 0 1-1.381-1.382q-.51-.906-.51-2.106 0-1.185.444-2.074a3.36 3.36 0 0 1 1.3-1.382q.839-.494 1.974-.494a3.3 3.3 0 0 1 1.234.231 3.3 3.3 0 0 1 .97.575q.396.33.527.659l.033-1.267h1.694v7.553H37.18l-.033-1.332q-.279.593-1.02 1.053a3.17 3.17 0 0 1-1.662.444zm.296-1.482q.938 0 1.58-.642.642-.66.642-1.711v-.115q0-.708-.296-1.267a2.2 2.2 0 0 0-.807-.872 2.1 2.1 0 0 0-1.119-.313q-1.053 0-1.629.692-.575.675-.575 1.76 0 1.103.559 1.795.577.675 1.645.675zm6.521-6.237h1.711v1.4q.906-1.597 2.83-1.597 1.596 0 2.584 1.02.988 1.005.988 2.914 0 1.185-.493 2.09a3.46 3.46 0 0 1-1.316 1.399 3.5 3.5 0 0 1-1.844.493q-.954 0-1.662-.329a2.67 2.67 0 0 1-1.086-.97l.017 5.134h-1.728zm4.048 6.22q1.07 0 1.645-.674.577-.69.576-1.762 0-1.119-.576-1.777-.558-.675-1.645-.675-.592 0-1.12.296-.51.28-.822.823-.296.527-.296 1.234v.115q0 .708.296 1.267.313.543.823.855.51.296 1.119.297z'/%3E%3Cpath fill='%23e1e3e9' d='M51.325 4.7h1.86v10.45h3.473v1.646h-5.333zm7.12 4.542h1.843v7.553h-1.843zm.905-1.415a1.16 1.16 0 0 1-.856-.346 1.17 1.17 0 0 1-.346-.856 1.05 1.05 0 0 1 .346-.79q.346-.329.856-.329.494 0 .839.33a1.05 1.05 0 0 1 .345.79 1.16 1.16 0 0 1-.345.855q-.33.346-.84.346zm7.875 9.133a3.17 3.17 0 0 1-1.662-.444q-.723-.46-1.004-1.053l-.033 1.332h-1.71V4.701h1.743v4.657l-.082 1.283q.279-.658 1.086-1.119a3.5 3.5 0 0 1 1.778-.477q1.119 0 1.942.51a3.24 3.24 0 0 1 1.283 1.4q.445.888.444 2.072 0 1.201-.526 2.09a3.5 3.5 0 0 1-1.382 1.366 3.8 3.8 0 0 1-1.876.477zm-.296-1.481q1.069 0 1.645-.675.577-.69.577-1.778 0-1.102-.577-1.776-.56-.691-1.645-.692a2.12 2.12 0 0 0-1.58.659q-.642.641-.642 1.694v.115q0 .71.296 1.267a2.4 2.4 0 0 0 .807.872 2.1 2.1 0 0 0 1.119.313zm5.927-6.237h1.777v1.481q.263-.757.856-1.217a2.14 2.14 0 0 1 1.349-.46q.527 0 .724.098l-.247 1.794q-.149-.099-.642-.099-.774 0-1.416.494-.626.493-.626 1.58v3.883h-1.777V9.242zm9.534 7.718q-1.35 0-2.255-.526-.904-.543-1.332-1.432a4.6 4.6 0 0 1-.428-1.975q0-1.2.493-2.106a3.46 3.46 0 0 1 1.4-1.382q.889-.495 2.007-.494 1.744 0 2.584.97.855.956.856 2.7 0 .444-.05.92h-5.43q.18 1.005.708 1.45.542.443 1.497.443.79 0 1.3-.131a4 4 0 0 0 .938-.362l.542 1.267q-.411.263-1.119.46-.708.198-1.711.197zm1.596-4.558q.016-1.02-.444-1.432-.46-.428-1.316-.428-1.728 0-1.991 1.86z'/%3E%3Cpath d='M5.074 15.948a.484.657 0 0 0-.486.659v1.84a.484.657 0 0 0 .486.659h4.101a.484.657 0 0 0 .486-.659v-1.84a.484.657 0 0 0-.486-.659zm3.56 1.16H5.617v.838h3.017z' style='fill:%23fff;fill-rule:evenodd;stroke-width:1.03600001'/%3E%3Cg style='stroke-width:1.12603545'%3E%3Cpath d='M-9.408-1.416c-3.833-.025-7.056 2.912-7.08 6.615-.02 3.08 1.653 4.832 3.107 6.268.903.892 1.721 1.74 2.32 2.902l-.525-.004c-.543-.003-.992.304-1.24.639a1.87 1.87 0 0 0-.362 1.121l-.011 1.877c-.003.402.104.787.347 1.125.244.338.688.653 1.23.656l4.142.028c.542.003.99-.306 1.238-.641a1.87 1.87 0 0 0 .363-1.121l.012-1.875a1.87 1.87 0 0 0-.348-1.127c-.243-.338-.688-.653-1.23-.656l-.518-.004c.597-1.145 1.425-1.983 2.348-2.87 1.473-1.414 3.18-3.149 3.2-6.226-.016-3.59-2.923-6.684-6.993-6.707m-.006 1.1v.002c3.274.02 5.92 2.532 5.9 5.6-.017 2.706-1.39 4.026-2.863 5.44-1.034.994-2.118 2.033-2.814 3.633-.018.041-.052.055-.075.065q-.013.004-.02.01a.34.34 0 0 1-.226.084.34.34 0 0 1-.224-.086l-.092-.077c-.699-1.615-1.768-2.669-2.781-3.67-1.454-1.435-2.797-2.762-2.78-5.478.02-3.067 2.7-5.545 5.975-5.523m-.02 2.826c-1.62-.01-2.944 1.315-2.955 2.96-.01 1.646 1.295 2.988 2.916 2.999h.002c1.621.01 2.943-1.316 2.953-2.961.011-1.646-1.294-2.988-2.916-2.998m-.005 1.1c1.017.006 1.829.83 1.822 1.89s-.83 1.874-1.848 1.867c-1.018-.006-1.829-.83-1.822-1.89s.83-1.874 1.848-1.868m-2.155 11.857 4.14.025c.271.002.49.305.487.676l-.013 1.875c-.003.37-.224.67-.495.668l-4.14-.025c-.27-.002-.487-.306-.485-.676l.012-1.875c.003-.37.224-.67.494-.668' style='color:%23000;font-style:normal;font-variant:normal;font-weight:400;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;font-variant-ligatures:normal;font-variant-position:normal;font-variant-caps:normal;font-variant-numeric:normal;font-variant-alternates:normal;font-feature-settings:normal;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:%23000;letter-spacing:normal;word-spacing:normal;text-transform:none;writing-mode:lr-tb;direction:ltr;text-orientation:mixed;dominant-baseline:auto;baseline-shift:baseline;text-anchor:start;white-space:normal;shape-padding:0;clip-rule:evenodd;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:%23000;solid-opacity:1;vector-effect:none;fill:%23000;fill-opacity:.4;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-9.415-.316C-12.69-.338-15.37 2.14-15.39 5.207c-.017 2.716 1.326 4.041 2.78 5.477 1.013 1 2.081 2.055 2.78 3.67l.092.076a.34.34 0 0 0 .225.086.34.34 0 0 0 .227-.083l.019-.01c.022-.009.057-.024.074-.064.697-1.6 1.78-2.64 2.814-3.634 1.473-1.414 2.847-2.733 2.864-5.44.02-3.067-2.627-5.58-5.901-5.601m-.057 8.784c1.621.011 2.944-1.315 2.955-2.96.01-1.646-1.295-2.988-2.916-2.999-1.622-.01-2.945 1.315-2.955 2.96s1.295 2.989 2.916 3' style='clip-rule:evenodd;fill:%23e1e3e9;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3Cpath d='M-11.594 15.465c-.27-.002-.492.297-.494.668l-.012 1.876c-.003.371.214.673.485.675l4.14.027c.271.002.492-.298.495-.668l.012-1.877c.003-.37-.215-.672-.485-.674z' style='clip-rule:evenodd;fill:%23fff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2.47727823;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:.4' transform='translate(15.553 2.85)scale(.88807)'/%3E%3C/g%3E%3C/svg%3E")}}.maplibregl-ctrl.maplibregl-ctrl-attrib{background-color:hsla(0,0%,100%,.5);margin:0;padding:0 5px}@media screen{.maplibregl-ctrl-attrib.maplibregl-compact{background-color:#fff;border-radius:12px;box-sizing:content-box;color:#000;margin:10px;min-height:20px;padding:2px 24px 2px 0;position:relative}.maplibregl-ctrl-attrib.maplibregl-compact-show{padding:2px 28px 2px 8px;visibility:visible}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact-show,.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact-show{border-radius:12px;padding:2px 8px 2px 28px}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-inner{display:none}.maplibregl-ctrl-attrib-button{background-color:hsla(0,0%,100%,.5);background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E");border:0;border-radius:12px;box-sizing:border-box;cursor:pointer;display:none;height:24px;outline:none;position:absolute;right:0;top:0;width:24px}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;list-style:none}.maplibregl-ctrl-attrib summary.maplibregl-ctrl-attrib-button::-webkit-details-marker{display:none}.maplibregl-ctrl-bottom-left .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-top-left .maplibregl-ctrl-attrib-button{left:0}.maplibregl-ctrl-attrib.maplibregl-compact .maplibregl-ctrl-attrib-button,.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-inner{display:block}.maplibregl-ctrl-attrib.maplibregl-compact-show .maplibregl-ctrl-attrib-button{background-color:rgba(0,0,0,.05)}.maplibregl-ctrl-bottom-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;right:0}.maplibregl-ctrl-top-right>.maplibregl-ctrl-attrib.maplibregl-compact:after{right:0;top:0}.maplibregl-ctrl-top-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{left:0;top:0}.maplibregl-ctrl-bottom-left>.maplibregl-ctrl-attrib.maplibregl-compact:after{bottom:0;left:0}}@media screen and (forced-colors:active){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill='%23fff' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}@media screen and (forced-colors:active) and (prefers-color-scheme:light){.maplibregl-ctrl-attrib.maplibregl-compact:after{background-image:url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' fill-rule='evenodd' viewBox='0 0 20 20'%3E%3Cpath d='M4 10a6 6 0 1 0 12 0 6 6 0 1 0-12 0m5-3a1 1 0 1 0 2 0 1 1 0 1 0-2 0m0 3a1 1 0 1 1 2 0v3a1 1 0 1 1-2 0'/%3E%3C/svg%3E")}}.maplibregl-ctrl-attrib a{color:rgba(0,0,0,.75);text-decoration:none}.maplibregl-ctrl-attrib a:hover{color:inherit;text-decoration:underline}.maplibregl-attrib-empty{display:none}.maplibregl-ctrl-scale{background-color:hsla(0,0%,100%,.75);border:2px solid #333;border-top:#333;box-sizing:border-box;color:#333;font-size:10px;padding:0 5px;white-space:nowrap}.maplibregl-popup{display:flex;left:0;pointer-events:none;position:absolute;top:0;will-change:transform}.maplibregl-popup-anchor-top,.maplibregl-popup-anchor-top-left,.maplibregl-popup-anchor-top-right{flex-direction:column}.maplibregl-popup-anchor-bottom,.maplibregl-popup-anchor-bottom-left,.maplibregl-popup-anchor-bottom-right{flex-direction:column-reverse}.maplibregl-popup-anchor-left{flex-direction:row}.maplibregl-popup-anchor-right{flex-direction:row-reverse}.maplibregl-popup-tip{border:10px solid transparent;height:0;width:0;z-index:1}.maplibregl-popup-anchor-top .maplibregl-popup-tip{align-self:center;border-bottom-color:#fff;border-top:none}.maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-start;border-bottom-color:#fff;border-left:none;border-top:none}.maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-end;border-bottom-color:#fff;border-right:none;border-top:none}.maplibregl-popup-anchor-bottom .maplibregl-popup-tip{align-self:center;border-bottom:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-start;border-bottom:none;border-left:none;border-top-color:#fff}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-end;border-bottom:none;border-right:none;border-top-color:#fff}.maplibregl-popup-anchor-left .maplibregl-popup-tip{align-self:center;border-left:none;border-right-color:#fff}.maplibregl-popup-anchor-right .maplibregl-popup-tip{align-self:center;border-left-color:#fff;border-right:none}[dir=rtl] .maplibregl-popup-anchor-left{flex-direction:row-reverse}[dir=rtl] .maplibregl-popup-anchor-right{flex-direction:row}[dir=rtl] .maplibregl-popup-anchor-top-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-top-right .maplibregl-popup-tip{align-self:flex-start}[dir=rtl] .maplibregl-popup-anchor-bottom-left .maplibregl-popup-tip{align-self:flex-end}[dir=rtl] .maplibregl-popup-anchor-bottom-right .maplibregl-popup-tip{align-self:flex-start}.maplibregl-popup-close-button{background-color:transparent;border:0;border-radius:0 3px 0 0;cursor:pointer;position:absolute;right:0;top:0}.maplibregl-popup-close-button:hover{background-color:rgba(0,0,0,.05)}.maplibregl-popup-content{background:#fff;border-radius:3px;box-shadow:0 1px 2px rgba(0,0,0,.1);padding:15px 10px;pointer-events:auto;position:relative}.maplibregl-popup-anchor-top-left .maplibregl-popup-content{border-top-left-radius:0}.maplibregl-popup-anchor-top-right .maplibregl-popup-content{border-top-right-radius:0}.maplibregl-popup-anchor-bottom-left .maplibregl-popup-content{border-bottom-left-radius:0}.maplibregl-popup-anchor-bottom-right .maplibregl-popup-content{border-bottom-right-radius:0}.maplibregl-popup-track-pointer{display:none}.maplibregl-popup-track-pointer *{pointer-events:none;-webkit-user-select:none;-moz-user-select:none;user-select:none}.maplibregl-map:hover .maplibregl-popup-track-pointer{display:flex}.maplibregl-map:active .maplibregl-popup-track-pointer{display:none}.maplibregl-marker{left:0;position:absolute;top:0;transition:opacity .2s;will-change:transform}.maplibregl-user-location-dot,.maplibregl-user-location-dot:before{background-color:#1da1f2;border-radius:50%;height:15px;width:15px}.maplibregl-user-location-dot:before{animation:maplibregl-user-location-dot-pulse 2s infinite;content:"";position:absolute}.maplibregl-user-location-dot:after{border:2px solid #fff;border-radius:50%;box-shadow:0 0 3px rgba(0,0,0,.35);box-sizing:border-box;content:"";height:19px;left:-2px;position:absolute;top:-2px;width:19px}@media (prefers-reduced-motion:reduce){.maplibregl-user-location-dot:before{animation:none}}@keyframes maplibregl-user-location-dot-pulse{0%{opacity:1;transform:scale(1)}70%{opacity:0;transform:scale(3)}to{opacity:0;transform:scale(1)}}.maplibregl-user-location-dot-stale{background-color:#aaa}.maplibregl-user-location-dot-stale:after{display:none}.maplibregl-user-location-accuracy-circle{background-color:#1da1f233;border-radius:100%;height:1px;width:1px}.maplibregl-crosshair,.maplibregl-crosshair .maplibregl-interactive,.maplibregl-crosshair .maplibregl-interactive:active{cursor:crosshair}.maplibregl-boxzoom{background:#fff;border:2px dotted #202020;height:0;left:0;opacity:.5;position:absolute;top:0;width:0}.maplibregl-cooperative-gesture-screen{align-items:center;background:rgba(0,0,0,.4);color:#fff;display:flex;font-size:1.4em;inset:0;justify-content:center;line-height:1.2;opacity:0;padding:1rem;pointer-events:none;position:absolute;transition:opacity 1s ease 1s;z-index:99999}.maplibregl-cooperative-gesture-screen.maplibregl-show{opacity:1;transition:opacity .05s}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:none}@media (hover:none),(pointer:coarse){.maplibregl-cooperative-gesture-screen .maplibregl-desktop-message{display:none}.maplibregl-cooperative-gesture-screen .maplibregl-mobile-message{display:block}}.maplibregl-pseudo-fullscreen{height:100%!important;left:0!important;position:fixed!important;top:0!important;width:100%!important;z-index:99999}`,document.head.appendChild(e)}})()});var bi=fe(co=>{"use strict";var zq=W1(),coe=PE(),foe=Lq(),ghr=X4().addStyleRule,hoe=ta(),Mht=Ho(),Sht=Sb(),Eht=hoe.extendFlat,qq=hoe.extendDeepAll;co.modules={};co.allCategories={};co.allTypes=[];co.subplotsRegistry={};co.componentsRegistry={};co.layoutArrayContainers=[];co.layoutArrayRegexes=[];co.traceLayoutAttributes={};co.localeRegistry={};co.apiMethodRegistry={};co.collectableSubplotTypes=null;co.register=function(t){if(co.collectableSubplotTypes=null,t)t&&!Array.isArray(t)&&(t=[t]);else throw new Error("No argument passed to Plotly.register.");for(var r=0;r{"use strict";var Fht=lb().timeFormat,Toe=aa(),Bq=W1(),cm=(fb(),Gs(cb)).mod,Cb=Wa(),K0=Cb.BADNUM,Jd=Cb.ONEDAY,$4=Cb.ONEHOUR,um=Cb.ONEMIN,kb=Cb.ONESEC,K4=Cb.EPOCHJD,X1=bi(),moe=lb().utcFormat,Dht=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\d)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,Rht=/^\s*(-?\d\d\d\d|\d\d)(-(\d?\di?)(-(\d?\d)([ Tt]([01]?\d|2[0-3])(:([0-5]\d)(:([0-5]\d(\.\d+)?))?(Z|z|[+\-]\d\d(:?\d\d)?)?)?)?)?)?\s*$/m,yoe=new Date().getFullYear()-70;function Z1(e){return e&&X1.componentsRegistry.calendars&&typeof e=="string"&&e!=="gregorian"}Pu.dateTick0=function(e,t){var r=Iht(e,!!t);if(t<2)return r;var n=Pu.dateTime2ms(r,e);return n+=Jd*(t-1),Pu.ms2DateTime(n,0,e)};function Iht(e,t){return Z1(e)?t?X1.getComponentMethod("calendars","CANONICAL_SUNDAY")[e]:X1.getComponentMethod("calendars","CANONICAL_TICK")[e]:t?"2000-01-02":"2000-01-01"}Pu.dfltRange=function(e){return Z1(e)?X1.getComponentMethod("calendars","DFLTRANGE")[e]:["2000-01-01","2001-01-01"]};Pu.isJSDate=function(e){return typeof e=="object"&&e!==null&&typeof e.getTime=="function"};var NE,UE;Pu.dateTime2ms=function(e,t){if(Pu.isJSDate(e)){var r=e.getTimezoneOffset()*um,n=(e.getUTCMinutes()-e.getMinutes())*um+(e.getUTCSeconds()-e.getSeconds())*kb+(e.getUTCMilliseconds()-e.getMilliseconds());if(n){var a=3*um;r=r-a/2+cm(n-r+a/2,a)}return e=Number(e)-r,e>=NE&&e<=UE?e:K0}if(typeof e!="string"&&typeof e!="number")return K0;e=String(e);var i=Z1(t),o=e.charAt(0);i&&(o==="G"||o==="g")&&(e=e.slice(1),t="");var s=i&&t.slice(0,7)==="chinese",l=e.match(s?Rht:Dht);if(!l)return K0;var u=l[1],c=l[3]||"1",f=Number(l[5]||1),v=Number(l[7]||0),g=Number(l[9]||0),p=Number(l[11]||0);if(i){if(u.length===2)return K0;u=Number(u);var x;try{var _=X1.getComponentMethod("calendars","getCal")(t);if(s){var y=c.charAt(c.length-1)==="i";c=parseInt(c,10),x=_.newDate(u,_.toMonthIndex(u,c,y),f)}else x=_.newDate(u,Number(c),f)}catch(k){return K0}return x?(x.toJD()-K4)*Jd+v*$4+g*um+p*kb:K0}u.length===2?u=(Number(u)+2e3-yoe)%100+yoe:u=Number(u),c-=1;var C=new Date(Date.UTC(2e3,c,f,v,g));return C.setUTCFullYear(u),C.getUTCMonth()!==c||C.getUTCDate()!==f?K0:C.getTime()+p*kb};NE=Pu.MIN_MS=Pu.dateTime2ms("-9999");UE=Pu.MAX_MS=Pu.dateTime2ms("9999-12-31 23:59:59.9999");Pu.isDateTime=function(e,t){return Pu.dateTime2ms(e,t)!==K0};function Eb(e,t){return String(e+Math.pow(10,t)).slice(1)}var OE=90*Jd,xoe=3*$4,_oe=5*um;Pu.ms2DateTime=function(e,t,r){if(typeof e!="number"||!(e>=NE&&e<=UE))return K0;t||(t=0);var n=Math.floor(cm(e+.05,1)*10),a=Math.round(e-n/10),i,o,s,l,u,c;if(Z1(r)){var f=Math.floor(a/Jd)+K4,v=Math.floor(cm(e,Jd));try{i=X1.getComponentMethod("calendars","getCal")(r).fromJD(f).formatDate("yyyy-mm-dd")}catch(g){i=moe("G%Y-%m-%d")(new Date(a))}if(i.charAt(0)==="-")for(;i.length<11;)i="-0"+i.slice(1);else for(;i.length<10;)i="0"+i;o=t=NE+Jd&&e<=UE-Jd))return K0;var t=Math.floor(cm(e+.05,1)*10),r=new Date(Math.round(e-t/10)),n=Fht("%Y-%m-%d")(r),a=r.getHours(),i=r.getMinutes(),o=r.getSeconds(),s=r.getUTCMilliseconds()*10+t;return Aoe(n,a,i,o,s)};function Aoe(e,t,r,n,a){if((t||r||n||a)&&(e+=" "+Eb(t,2)+":"+Eb(r,2),(n||a)&&(e+=":"+Eb(n,2),a))){for(var i=4;a%10===0;)i-=1,a/=10;e+="."+Eb(a,i)}return e}Pu.cleanDate=function(e,t,r){if(e===K0)return t;if(Pu.isJSDate(e)||typeof e=="number"&&isFinite(e)){if(Z1(r))return Bq.error("JS Dates and milliseconds are incompatible with world calendars",e),t;if(e=Pu.ms2DateTimeLocal(+e),!e&&t!==void 0)return t}else if(!Pu.isDateTime(e,r))return Bq.error("unrecognized date",e),t;return e};var zht=/%\d?f/g,qht=/%h/g,Bht={1:"1",2:"1",3:"2",4:"2"};function boe(e,t,r,n){e=e.replace(zht,function(i){var o=Math.min(+i.charAt(1)||6,6),s=(t/1e3%1+2).toFixed(o).slice(2).replace(/0+$/,"")||"0";return s});var a=new Date(Math.floor(t+.05));if(e=e.replace(qht,function(){return Bht[r("%q")(a)]}),Z1(n))try{e=X1.getComponentMethod("calendars","worldCalFmt")(e,t,n)}catch(i){return"Invalid"}return r(e)(a)}var Oht=[59,59.9,59.99,59.999,59.9999];function Nht(e,t){var r=cm(e+.05,Jd),n=Eb(Math.floor(r/$4),2)+":"+Eb(cm(Math.floor(r/um),60),2);if(t!=="M"){Toe(t)||(t=0);var a=Math.min(cm(e/kb,60),Oht[t]),i=(100+a).toFixed(t).slice(1);t>0&&(i=i.replace(/0+$/,"").replace(/[\.]$/,"")),n+=":"+i}return n}Pu.formatDate=function(e,t,r,n,a,i){if(a=Z1(a)&&a,!t)if(r==="y")t=i.year;else if(r==="m")t=i.month;else if(r==="d")t=i.dayMonth+` `+i.year;else return Nht(e,r)+` `+boe(i.dayMonthYear,e,n,a);return boe(t,e,n,a)};var woe=3*Jd;Pu.incrementMonth=function(e,t,r){r=Z1(r)&&r;var n=cm(e,Jd);if(e=Math.round(e-n),r)try{var a=Math.round(e/Jd)+K4,i=X1.getComponentMethod("calendars","getCal")(r),o=i.fromJD(a);return t%12?i.add(o,t,"m"):i.add(o,t/12,"y"),(o.toJD()-K4)*Jd+n}catch(l){Bq.error("invalid ms "+e+" in calendar "+r)}var s=new Date(e+woe);return s.setUTCMonth(s.getUTCMonth()+t)+n-woe};Pu.findExactDates=function(e,t){for(var r=0,n=0,a=0,i=0,o,s,l=Z1(t)&&X1.getComponentMethod("calendars","getCal")(t),u=0;u{"use strict";Soe.exports=function(t){return t}});var VE=fe($1=>{"use strict";var Uht=aa(),Vht=W1(),Ght=J4(),Hht=Wa().BADNUM,Oq=1e-9;$1.findBin=function(e,t,r){if(Uht(t.start))return r?Math.ceil((e-t.start)/t.size-Oq)-1:Math.floor((e-t.start)/t.size+Oq);var n=0,a=t.length,i=0,o=a>1?(t[a-1]-t[0])/(a-1):1,s,l;for(o>=0?l=r?jht:Wht:l=r?Xht:Yht,e+=o*Oq*(r?-1:1)*(o>=0?1:-1);n90&&Vht.log("Long binary search..."),n-1};function jht(e,t){return et}function Xht(e,t){return e>=t}$1.sorterAsc=function(e,t){return e-t};$1.sorterDes=function(e,t){return t-e};$1.distinctVals=function(e){var t=e.slice();t.sort($1.sorterAsc);var r;for(r=t.length-1;r>-1&&t[r]===Hht;r--);for(var n=t[r]-t[0]||1,a=n/(r||1)/1e4,i=[],o,s=0;s<=r;s++){var l=t[s],u=l-o;o===void 0?(i.push(l),o=l):u>a&&(n=Math.min(n,u),i.push(l),o=l)}return{vals:i,minDiff:n}};$1.roundUp=function(e,t,r){for(var n=0,a=t.length-1,i,o=0,s=r?0:1,l=r?1:0,u=r?Math.ceil:Math.floor;n0&&(n=1),r&&n)return e.sort(t)}return n?e:e.reverse()};$1.findIndexOfMin=function(e,t){t=t||Ght;for(var r=1/0,n,a=0;a$ht});function Zht(e){return Object.keys(e).sort()}var $ht,bx=Co(()=>{"use strict";$ht=Zht});var Eoe=fe(Fu=>{"use strict";var Q4=aa(),Kht=Gf().isArrayOrTypedArray;Fu.aggNums=function(e,t,r,n){var a,i;if((!n||n>r.length)&&(n=r.length),Q4(t)||(t=!1),Kht(r[0])){for(i=new Array(n),a=0;ae.length-1)return e[e.length-1];var r=t%1;return r*e[Math.ceil(t)]+(1-r)*e[Math.floor(t)]}});var Foe=fe((whr,Poe)=>{"use strict";var koe=(fb(),Gs(cb)),Nq=koe.mod,Jht=koe.modHalf,eT=Math.PI,fm=2*eT;function Qht(e){return e/180*eT}function edt(e){return e/eT*180}function Uq(e){return Math.abs(e[1]-e[0])>fm-1e-14}function Coe(e,t){return Jht(t-e,fm)}function tdt(e,t){return Math.abs(Coe(e,t))}function Loe(e,t){if(Uq(t))return!0;var r,n;t[0]n&&(n+=fm);var a=Nq(e,fm),i=a+fm;return a>=r&&a<=n||i>=r&&i<=n}function rdt(e,t,r,n){if(!Loe(t,n))return!1;var a,i;return r[0]=a&&e<=i}function Vq(e,t,r,n,a,i,o){a=a||0,i=i||0;var s=Uq([r,n]),l,u,c,f,v;s?(l=0,u=eT,c=fm):r{"use strict";wx.isLeftAnchor=function(t){return t.xanchor==="left"||t.xanchor==="auto"&&t.x<=1/3};wx.isCenterAnchor=function(t){return t.xanchor==="center"||t.xanchor==="auto"&&t.x>1/3&&t.x<2/3};wx.isRightAnchor=function(t){return t.xanchor==="right"||t.xanchor==="auto"&&t.x>=2/3};wx.isTopAnchor=function(t){return t.yanchor==="top"||t.yanchor==="auto"&&t.y>=2/3};wx.isMiddleAnchor=function(t){return t.yanchor==="middle"||t.yanchor==="auto"&&t.y>1/3&&t.y<2/3};wx.isBottomAnchor=function(t){return t.yanchor==="bottom"||t.yanchor==="auto"&&t.y<=1/3}});var zoe=fe(Tx=>{"use strict";var Gq=(fb(),Gs(cb)).mod;Tx.segmentsIntersect=Ioe;function Ioe(e,t,r,n,a,i,o,s){var l=r-e,u=a-e,c=o-a,f=n-t,v=i-t,g=s-i,p=l*g-c*f;if(p===0)return null;var x=(u*g-c*v)/p,_=(u*f-l*v)/p;return _<0||_>1||x<0||x>1?null:{x:e+l*x,y:t+f*x}}Tx.segmentDistance=function(t,r,n,a,i,o,s,l){if(Ioe(t,r,n,a,i,o,s,l))return 0;var u=n-t,c=a-r,f=s-i,v=l-o,g=u*u+c*c,p=f*f+v*v,x=Math.min(GE(u,c,g,i-t,o-r),GE(u,c,g,s-t,l-r),GE(f,v,p,t-i,r-o),GE(f,v,p,n-i,a-o));return Math.sqrt(x)};function GE(e,t,r,n,a){var i=n*e+a*t;if(i<0)return n*n+a*a;if(i>r){var o=n-e,s=a-t;return o*o+s*s}else{var l=n*t-a*e;return l*l/r}}var HE,Hq,Roe;Tx.getTextLocation=function(t,r,n,a){if((t!==Hq||a!==Roe)&&(HE={},Hq=t,Roe=a),HE[n])return HE[n];var i=t.getPointAtLength(Gq(n-a/2,r)),o=t.getPointAtLength(Gq(n+a/2,r)),s=Math.atan((o.y-i.y)/(o.x-i.x)),l=t.getPointAtLength(Gq(n,r)),u=(l.x*4+i.x+o.x)/6,c=(l.y*4+i.y+o.y)/6,f={x:u,y:c,theta:s};return HE[n]=f,f};Tx.clearLocationCache=function(){Hq=null};Tx.getVisibleSegment=function(t,r,n){var a=r.left,i=r.right,o=r.top,s=r.bottom,l=0,u=t.getTotalLength(),c=u,f,v;function g(x){var _=t.getPointAtLength(x);x===0?f=_:x===u&&(v=_);var y=_.xi?_.x-i:0,C=_.ys?_.y-s:0;return Math.sqrt(y*y+C*C)}for(var p=g(l);p;){if(l+=p+n,l>c)return;p=g(l)}for(p=g(c);p;){if(c-=p+n,l>c)return;p=g(c)}return{min:l,max:c,len:c-l,total:u,isClosed:l===0&&c===u&&Math.abs(f.x-v.x)<.1&&Math.abs(f.y-v.y)<.1}};Tx.findPointOnPath=function(t,r,n,a){a=a||{};for(var i=a.pathLength||t.getTotalLength(),o=a.tolerance||.001,s=a.iterationLimit||30,l=t.getPointAtLength(0)[n]>t.getPointAtLength(i)[n]?-1:1,u=0,c=0,f=i,v,g,p;u0?f=v:c=v,u++}return g}});var jE=fe(tT=>{"use strict";var K1={};tT.throttle=function(t,r,n){var a=K1[t],i=Date.now();if(!a){for(var o in K1)K1[o].tsa.ts+r){s();return}a.timer=setTimeout(function(){s(),a.timer=null},r)};tT.done=function(e){var t=K1[e];return!t||!t.timer?Promise.resolve():new Promise(function(r){var n=t.onDone;t.onDone=function(){n&&n(),r(),t.onDone=null}})};tT.clear=function(e){if(e)qoe(K1[e]),delete K1[e];else for(var t in K1)tT.clear(t)};function qoe(e){e&&e.timer!==null&&(clearTimeout(e.timer),e.timer=null)}});var Ooe=fe((Shr,Boe)=>{"use strict";Boe.exports=function(t){t._responsiveChartHandler&&(window.removeEventListener("resize",t._responsiveChartHandler),delete t._responsiveChartHandler)}});var Noe=fe((Ehr,WE)=>{"use strict";WE.exports=jq;WE.exports.isMobile=jq;WE.exports.default=jq;var odt=/(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|redmi|series[46]0|samsungbrowser.*mobile|symbian|treo|up\.(browser|link)|vodafone|wap|windows (ce|phone)|xda|xiino/i,sdt=/CrOS/,ldt=/android|ipad|playbook|silk/i;function jq(e){e||(e={});let t=e.ua;if(!t&&typeof navigator!="undefined"&&(t=navigator.userAgent),t&&t.headers&&typeof t.headers["user-agent"]=="string"&&(t=t.headers["user-agent"]),typeof t!="string")return!1;let r=odt.test(t)&&!sdt.test(t)||!!e.tablet&&ldt.test(t);return!r&&e.tablet&&e.featureDetect&&navigator&&navigator.maxTouchPoints>1&&t.indexOf("Macintosh")!==-1&&t.indexOf("Safari")!==-1&&(r=!0),r}});var Voe=fe((khr,Uoe)=>{"use strict";var udt=aa(),cdt=Noe();Uoe.exports=function(t){var r;if(t&&t.hasOwnProperty("userAgent")?r=t.userAgent:r=fdt(),typeof r!="string")return!0;var n=cdt({ua:{headers:{"user-agent":r}},tablet:!0,featureDetect:!1});if(!n)for(var a=r.split(" "),i=1;i-1;s--){var l=a[s];if(l.slice(0,8)==="Version/"){var u=l.slice(8).split(".")[0];if(udt(u)&&(u=+u),u>=13)return!0}}}return n};function fdt(){var e;return typeof navigator!="undefined"&&(e=navigator.userAgent),e&&e.headers&&typeof e.headers["user-agent"]=="string"&&(e=e.headers["user-agent"]),e}});var Hoe=fe((Chr,Goe)=>{"use strict";var hdt=xi();Goe.exports=function(t,r,n){var a=t.selectAll("g."+n.replace(/\s/g,".")).data(r,function(o){return o[0].trace.uid});a.exit().remove(),a.enter().append("g").attr("class",n),a.order();var i=t.classed("rangeplot")?"nodeRangePlot3":"node3";return a.each(function(o){o[0][i]=hdt.select(this)}),a}});var Woe=fe((Lhr,joe)=>{"use strict";var ddt=bi();joe.exports=function(t,r){for(var n=t._context.locale,a=0;a<2;a++){for(var i=t._context.locales,o=0;o<2;o++){var s=(i[n]||{}).dictionary;if(s){var l=s[r];if(l)return l}i=ddt.localeRegistry}var u=n.split("-")[0];if(u===n)break;n=u}return r}});var Wq=fe((Phr,Yoe)=>{"use strict";Yoe.exports=function(t){for(var r={},n=[],a=0,i=0;i{"use strict";Xoe.exports=function(t){for(var r=gdt(t)?pdt:vdt,n=[],a=0;a{"use strict";$oe.exports=function(t,r){if(!r)return t;var n=1/Math.abs(r),a=n>1?(n*t+n*r)/n:t+r,i=String(a).length;if(i>16){var o=String(r).length,s=String(t).length;if(i>=s+o){var l=parseFloat(a).toPrecision(12);l.indexOf("e+")===-1&&(a=+l)}}return a}});var ese={};zp(ese,{default:()=>xdt});function ydt(e){return typeof e=="string"&&(e=e.replace(mdt,"")),(0,Joe.default)(e)?Number(e):Qoe.BADNUM}var Joe,Qoe,mdt,xdt,tse=Co(()=>{"use strict";Joe=$0(aa()),Qoe=$0(Wa()),mdt=/^['"%,$#\s']+|[, ]|['"%,$#\s']+$/g;xdt=ydt});var ise=fe((Rhr,nse)=>{"use strict";var _dt=/<[^>]*>/g,bdt=/[\p{S}\p{P}]/gu,wdt=/[\p{Cc}\p{Cf}\uFE00-\uFE0F\u20E3]/gu,Tdt=/�/g,Adt=/\s+/g,YE="-",rse=YE.replace(/[.*+?^${}()|[\]\\]/g,"\\$&"),Mdt=new RegExp(rse+"{3,}","g"),Sdt=new RegExp(rse+"$","g"),Edt=60;function kdt(e){return typeof e.toWellFormed=="function"?e.toWellFormed():new TextDecoder().decode(new TextEncoder().encode(e))}nse.exports=function(t,r=Edt){var n=kdt(t!=null?t:"").replace(Tdt,"").replace(_dt," ").replace(bdt,a=>a===YE?a:"").toLowerCase().trim().replace(Adt,YE).replace(wdt,"").replace(Mdt,YE);return n.length<=r?n:Array.from(n).slice(0,r).join("").replace(Sdt,"")}});var Xt=fe((Ihr,gse)=>{"use strict";var rT=xi(),Cdt=lb().utcFormat,Ldt=jI().format,cse=aa(),fse=Wa(),hse=fse.FP_SAFE,Pdt=-hse,ase=fse.BADNUM,Ir=gse.exports={};Ir.adjustFormat=function(t){if(!t||/^\d[.]\df/.test(t)||/[.]\d%/.test(t))return t;if(t==="0.f")return"~f";if(/^\d%/.test(t))return"~%";if(/^\ds/.test(t))return"~s";var r=(t.match(/^[+\-( ]?/)||[""])[0],n=t.slice(r.length);return!/^[~,.0$#]/.test(n)&&/[&fps]/.test(n)?r+"~"+n:t};var ose={};Ir.warnBadFormat=function(e){var t=String(e);ose[t]||(ose[t]=1,Ir.warn('encountered bad format: "'+t+'"'))};Ir.noFormat=function(e){return String(e)};Ir.numberFormat=function(e){var t;try{t=Ldt(Ir.adjustFormat(e))}catch(r){return Ir.warnBadFormat(e),Ir.noFormat}return t};Ir.nestedProperty=M4();Ir.keyedContainer=Jte();Ir.relativeAttr=ere();Ir.isPlainObject=em();Ir.toLogRange=rE();Ir.relinkPrivateKeys=ire();var hm=Gf();Ir.isArrayBuffer=hm.isArrayBuffer;Ir.isTypedArray=hm.isTypedArray;Ir.isArrayOrTypedArray=hm.isArrayOrTypedArray;Ir.isArray1D=hm.isArray1D;Ir.ensureArray=hm.ensureArray;Ir.concat=hm.concat;Ir.maxRowLength=hm.maxRowLength;Ir.minRowLength=hm.minRowLength;var dse=(fb(),Gs(cb));Ir.mod=dse.mod;Ir.modHalf=dse.modHalf;var dm=Mie();Ir.valObjectMeta=dm.valObjectMeta;Ir.coerce=dm.coerce;Ir.coerce2=dm.coerce2;Ir.coerceFont=dm.coerceFont;Ir.coercePattern=dm.coercePattern;Ir.coerceHoverinfo=dm.coerceHoverinfo;Ir.coerceSelectionMarkerOpacity=dm.coerceSelectionMarkerOpacity;Ir.validate=dm.validate;var T0=Moe();Ir.dateTime2ms=T0.dateTime2ms;Ir.isDateTime=T0.isDateTime;Ir.ms2DateTime=T0.ms2DateTime;Ir.ms2DateTimeLocal=T0.ms2DateTimeLocal;Ir.cleanDate=T0.cleanDate;Ir.isJSDate=T0.isJSDate;Ir.formatDate=T0.formatDate;Ir.incrementMonth=T0.incrementMonth;Ir.dateTick0=T0.dateTick0;Ir.dfltRange=T0.dfltRange;Ir.findExactDates=T0.findExactDates;Ir.MIN_MS=T0.MIN_MS;Ir.MAX_MS=T0.MAX_MS;var Ax=VE();Ir.findBin=Ax.findBin;Ir.sorterAsc=Ax.sorterAsc;Ir.sorterDes=Ax.sorterDes;Ir.distinctVals=Ax.distinctVals;Ir.roundUp=Ax.roundUp;Ir.sort=Ax.sort;Ir.findIndexOfMin=Ax.findIndexOfMin;Ir.sortObjectKeys=(bx(),Gs(_x)).default;var J1=Eoe();Ir.aggNums=J1.aggNums;Ir.len=J1.len;Ir.mean=J1.mean;Ir.geometricMean=J1.geometricMean;Ir.median=J1.median;Ir.midRange=J1.midRange;Ir.variance=J1.variance;Ir.stdev=J1.stdev;Ir.interp=J1.interp;var Jv=FE();Ir.init2dArray=Jv.init2dArray;Ir.transposeRagged=Jv.transposeRagged;Ir.dot=Jv.dot;Ir.translationMatrix=Jv.translationMatrix;Ir.rotationMatrix=Jv.rotationMatrix;Ir.rotationXYMatrix=Jv.rotationXYMatrix;Ir.apply3DTransform=Jv.apply3DTransform;Ir.apply2DTransform=Jv.apply2DTransform;Ir.apply2DTransform2=Jv.apply2DTransform2;Ir.convertCssMatrix=Jv.convertCssMatrix;Ir.inverseTransformMatrix=Jv.inverseTransformMatrix;var Np=Foe();Ir.deg2rad=Np.deg2rad;Ir.rad2deg=Np.rad2deg;Ir.angleDelta=Np.angleDelta;Ir.angleDist=Np.angleDist;Ir.isFullCircle=Np.isFullCircle;Ir.isAngleInsideSector=Np.isAngleInsideSector;Ir.isPtInsideSector=Np.isPtInsideSector;Ir.pathArc=Np.pathArc;Ir.pathSector=Np.pathSector;Ir.pathAnnulus=Np.pathAnnulus;var Pb=Doe();Ir.isLeftAnchor=Pb.isLeftAnchor;Ir.isCenterAnchor=Pb.isCenterAnchor;Ir.isRightAnchor=Pb.isRightAnchor;Ir.isTopAnchor=Pb.isTopAnchor;Ir.isMiddleAnchor=Pb.isMiddleAnchor;Ir.isBottomAnchor=Pb.isBottomAnchor;var Fb=zoe();Ir.segmentsIntersect=Fb.segmentsIntersect;Ir.segmentDistance=Fb.segmentDistance;Ir.getTextLocation=Fb.getTextLocation;Ir.clearLocationCache=Fb.clearLocationCache;Ir.getVisibleSegment=Fb.getVisibleSegment;Ir.findPointOnPath=Fb.findPointOnPath;var $E=ta();Ir.extendFlat=$E.extendFlat;Ir.extendDeep=$E.extendDeep;Ir.extendDeepAll=$E.extendDeepAll;Ir.extendDeepNoArrays=$E.extendDeepNoArrays;var Yq=W1();Ir.log=Yq.log;Ir.warn=Yq.warn;Ir.error=Yq.error;var Fdt=(Tb(),Gs(wb));Ir.counterRegex=Fdt.counter;var Xq=jE();Ir.throttle=Xq.throttle;Ir.throttleDone=Xq.done;Ir.clearThrottle=Xq.clear;var Qv=X4();Ir.getGraphDiv=Qv.getGraphDiv;Ir.isPlotDiv=Qv.isPlotDiv;Ir.removeElement=Qv.removeElement;Ir.addStyleRule=Qv.addStyleRule;Ir.addRelatedStyleRule=Qv.addRelatedStyleRule;Ir.deleteRelatedStyleRule=Qv.deleteRelatedStyleRule;Ir.setStyleOnHover=Qv.setStyleOnHover;Ir.getFullTransformMatrix=Qv.getFullTransformMatrix;Ir.getElementTransformMatrix=Qv.getElementTransformMatrix;Ir.getElementAndAncestors=Qv.getElementAndAncestors;Ir.equalDomRects=Qv.equalDomRects;Ir.clearResponsive=Ooe();Ir.preserveDrawingBuffer=Voe();Ir.makeTraceGroups=Hoe();Ir._=Woe();Ir.notifier=bq();Ir.filterUnique=Wq();Ir.filterVisible=Zoe();Ir.pushUnique=Lq();Ir.increment=Koe();Ir.cleanNumber=(tse(),Gs(ese)).default;Ir.slugify=ise();Ir.ensureNumber=function(t){return cse(t)?(t=Number(t),t>hse||t=t?!1:cse(e)&&e>=0&&e%1===0};Ir.noop=PE();Ir.identity=J4();Ir.repeat=function(e,t){for(var r=new Array(t),n=0;nr?Math.max(r,Math.min(t,e)):Math.max(t,Math.min(r,e))};Ir.bBoxIntersect=function(e,t,r){return r=r||0,e.left<=t.right+r&&t.left<=e.right+r&&e.top<=t.bottom+r&&t.top<=e.bottom+r};Ir.simpleMap=function(e,t,r,n,a){for(var i=e.length,o=new Array(i),s=0;s=Math.pow(2,r)?a>10?(Ir.warn("randstr failed uniqueness"),o):e(t,r,n,(a||0)+1):o};Ir.OptionControl=function(e,t){e||(e={}),t||(t="opt");var r={};return r.optionList=[],r._newoption=function(n){n[t]=e,r[n.name]=n,r.optionList.push(n)},r["_"+t]=e,r};Ir.smooth=function(e,t){if(t=Math.round(t)||0,t<2)return e;var r=e.length,n=2*r,a=2*t-1,i=new Array(a),o=new Array(r),s,l,u,c;for(s=0;s=n&&(u-=n*Math.floor(u/n)),u<0?u=-1-u:u>=r&&(u=n-1-u),c+=e[u]*i[l];o[s]=c}return o};Ir.syncOrAsync=function(e,t,r){var n,a;function i(){return Ir.syncOrAsync(e,t,r)}for(;e.length;)if(a=e.splice(0,1)[0],n=a(t),n&&n.then)return n.then(i);return r&&r(t)};Ir.stripTrailingSlash=function(e){return e.slice(-1)==="/"?e.slice(0,-1):e};Ir.noneOrAll=function(e,t,r){if(e){var n=!1,a=!0,i,o;for(i=0;i0?a:0})};Ir.fillArray=function(e,t,r,n){if(n=n||Ir.identity,Ir.isArrayOrTypedArray(e))for(var a=0;aIdt.test(window.navigator.userAgent);var zdt=/Firefox\/(\d+)\.\d+/;Ir.getFirefoxVersion=function(){var e=zdt.exec(window.navigator.userAgent);if(e&&e.length===2){var t=parseInt(e[1]);if(!isNaN(t))return t}return null};Ir.isD3Selection=function(e){return e instanceof rT.selection};Ir.ensureSingle=function(e,t,r,n){var a=e.select(t+(r?"."+r:""));if(a.size())return a;var i=e.append(t);return r&&i.classed(r,!0),n&&i.call(n),i};Ir.ensureSingleById=function(e,t,r,n){var a=e.select(t+"#"+r);if(a.size())return a;var i=e.append(t).attr("id",r);return n&&i.call(n),i};Ir.objectFromPath=function(e,t){for(var r=e.split("."),n,a=n={},i=0;i1?a+o[1]:"";if(i&&(o.length>1||s.length>4||r))for(;n.test(s);)s=s.replace(n,"$1"+i+"$2");return s+l};Ir.TEMPLATE_STRING_REGEX=/%{([^\s%{}:]*)([:|\|][^}]*)?}/g;var pse=/^\w*$/;Ir.templateString=function(e,t){var r={};return e.replace(Ir.TEMPLATE_STRING_REGEX,function(n,a){var i;return pse.test(a)?i=t[a]:(r[a]=r[a]||Ir.nestedProperty(t,a).get,i=r[a](!0)),i!==void 0?i:""})};var Odt={max:10,count:0,name:"hovertemplate"};Ir.hovertemplateString=e=>Zq(tl(zo({},e),{opts:Odt}));var Ndt={max:10,count:0,name:"texttemplate"};Ir.texttemplateString=e=>Zq(tl(zo({},e),{opts:Ndt}));var Udt=/^(\S+)([\*\/])(-?\d+(\.\d+)?)$/;function Vdt(e){var t=e.match(Udt);return t?{key:t[1],op:t[2],number:Number(t[3])}:{key:e,op:null,number:null}}var Gdt={max:10,count:0,name:"texttemplate",parseMultDiv:!0};Ir.texttemplateStringForShapes=e=>Zq(tl(zo({},e),{opts:Gdt}));var sse=/^[:|\|]/;function Zq({data:e=[],locale:t,fallback:r,labels:n={},opts:a,template:i}){return i.replace(Ir.TEMPLATE_STRING_REGEX,(o,s,l)=>{let u=["xother","yother"].includes(s),c=["_xother","_yother"].includes(s),f=["_xother_","_yother_"].includes(s),v=["xother_","yother_"].includes(s),g=u||c||v||f;(c||f)&&(s=s.substring(1)),(v||f)&&(s=s.substring(0,s.length-1));let p=null,x=null;if(a.parseMultDiv){var _=Vdt(s);s=_.key,p=_.op,x=_.number}let y;if(g){if(n[s]===void 0)return"";y=n[s]}else for(let L of e)if(L){if(L.hasOwnProperty(s)){y=L[s];break}if(pse.test(s)||(y=Ir.nestedProperty(L,s).get(!0)),y!==void 0)break}if(y===void 0){let{count:L,max:w,name:A}=a,T=r===!1?o:r;return L=ZE&&o<=lse,u=s>=ZE&&s<=lse;if(l&&(n=10*n+o-ZE),u&&(a=10*a+s-ZE),!l||!u){if(n!==a)return n-a;if(o!==s)return o-s}}return a-n};var Lb=2e9;Ir.seedPseudoRandom=function(){Lb=2e9};Ir.pseudoRandom=function(){var e=Lb;return Lb=(69069*Lb+1)%4294967296,Math.abs(Lb-e)<429496729?Ir.pseudoRandom():Lb/4294967296};Ir.fillText=function(e,t,r){var n=Array.isArray(r)?function(o){r.push(o)}:function(o){r.text=o},a=Ir.extractOption(e,t,"htx","hovertext");if(Ir.isValidTextValue(a))return n(a);var i=Ir.extractOption(e,t,"tx","text");if(Ir.isValidTextValue(i))return n(i)};Ir.isValidTextValue=function(e){return e||e===0};Ir.formatPercent=function(e,t){t=t||0;for(var r=(Math.round(100*e*Math.pow(10,t))*Math.pow(.1,t)).toFixed(t)+"%",n=0;n1&&(u=1):u=0,Ir.strTranslate(a-u*(r+o),i-u*(n+s))+Ir.strScale(u)+(l?"rotate("+l+(t?"":" "+r+" "+n)+")":"")};Ir.setTransormAndDisplay=function(e,t){e.attr("transform",Ir.getTextTransform(t)),e.style("display",t.scale?null:"none")};Ir.ensureUniformFontSize=function(e,t){var r=Ir.extendFlat({},t);return r.size=Math.max(t.size,e._fullLayout.uniformtext.minsize||0),r};Ir.join2=function(e,t,r){var n=e.length;return n>1?e.slice(0,-1).join(t)+r+e[n-1]:e.join(t)};Ir.bigFont=function(e){return Math.round(1.2*e)};var use=Ir.getFirefoxVersion(),Hdt=use!==null&&use<86;Ir.getPositionFromD3Event=function(){return Hdt?[rT.event.layerX,rT.event.layerY]:[rT.event.offsetX,rT.event.offsetY]}});var xse=fe(()=>{"use strict";var jdt=Xt(),mse={"X,X div":'direction:ltr;font-family:"Open Sans",verdana,arial,sans-serif;margin:0;padding:0;border: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 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:focus-within .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-group a":"display:grid;place-content:center;","X .modebar-btn":"position:relative;font-size:16px;padding:3px 4px;height:22px;cursor:pointer;line-height:normal;box-sizing:border-box;border:none;background:rgba(0,0,0,0);","X .modebar-btn svg":"position:relative;","X .modebar-btn:focus-visible":"outline:1px solid #000;outline-offset:1px;border-radius:3px;","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;","X .plotly-cloud-dialog":'font-family:"Open Sans",verdana,arial,sans-serif;position:absolute;top:0;left:0;width:100%;height:100%;z-index:1001;display:flex;align-items:center;justify-content:center;background-color:rgba(0,0,0,.4);',"X .plotly-cloud-dialog .plotly-cloud-dialog-box":"box-sizing:border-box;min-width:300px;max-width:420px;padding:20px 24px;background-color:#fff;border:1px solid #e0e2e5;border-radius:4px;box-shadow:0 4px 16px rgba(0,0,0,.25);font-size:13px;color:#2a3f5f;","X .plotly-cloud-dialog .plotly-cloud-dialog-title":"font-size:16px;font-weight:bold;margin-bottom:12px;","X .plotly-cloud-dialog .plotly-cloud-dialog-message":"line-height:1.5;overflow-wrap:break-word;word-wrap:break-word;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--hostname":"font-weight:bold;text-decoration:underline;","X .plotly-cloud-dialog .plotly-cloud-dialog-message--account":"margin-top:16px;padding:8px;border-radius:3px;font-size:.9em;background-color:#edf1f8;","X .plotly-cloud-dialog .plotly-cloud-dialog-buttons":"display:flex;justify-content:flex-end;margin-top:20px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn":"font-family:inherit;font-size:13px;padding:7px 16px;margin-left:8px;border-radius:3px;border:1px solid rgba(0,0,0,0);cursor:pointer;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn:focus-visible":"outline:2px solid #447adb;outline-offset:1px;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel":"background-color:#f3f3f3;margin-left:auto;color:#777;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--cancel:hover":"background-color:#e0e2e5;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm":"background-color:#447adb;color:#fff;","X .plotly-cloud-dialog .plotly-cloud-dialog-btn--confirm:hover":"background-color:#1d3b84;",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($q in mse)yse=$q.replace(/^,/," ,").replace(/X/g,".js-plotly-plot .plotly").replace(/Y/g,".plotly-notifier"),jdt.addStyleRule(yse,mse[$q]);var yse,$q});var Kq=fe((Ohr,_se)=>{_se.exports=!0});var Qq=fe((Nhr,bse)=>{"use strict";var Wdt=Kq(),Jq;typeof window.matchMedia=="function"?Jq=!window.matchMedia("(hover: none)").matches:Jq=Wdt;bse.exports=Jq});var Mx=fe((Uhr,eB)=>{"use strict";var Db=typeof Reflect=="object"?Reflect:null,wse=Db&&typeof Db.apply=="function"?Db.apply:function(t,r,n){return Function.prototype.apply.call(t,r,n)},KE;Db&&typeof Db.ownKeys=="function"?KE=Db.ownKeys:Object.getOwnPropertySymbols?KE=function(t){return Object.getOwnPropertyNames(t).concat(Object.getOwnPropertySymbols(t))}:KE=function(t){return Object.getOwnPropertyNames(t)};function Ydt(e){console&&console.warn&&console.warn(e)}var Ase=Number.isNaN||function(t){return t!==t};function vl(){vl.init.call(this)}eB.exports=vl;eB.exports.once=Kdt;vl.EventEmitter=vl;vl.prototype._events=void 0;vl.prototype._eventsCount=0;vl.prototype._maxListeners=void 0;var Tse=10;function JE(e){if(typeof e!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}Object.defineProperty(vl,"defaultMaxListeners",{enumerable:!0,get:function(){return Tse},set:function(e){if(typeof e!="number"||e<0||Ase(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");Tse=e}});vl.init=function(){(this._events===void 0||this._events===Object.getPrototypeOf(this)._events)&&(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0};vl.prototype.setMaxListeners=function(t){if(typeof t!="number"||t<0||Ase(t))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+t+".");return this._maxListeners=t,this};function Mse(e){return e._maxListeners===void 0?vl.defaultMaxListeners:e._maxListeners}vl.prototype.getMaxListeners=function(){return Mse(this)};vl.prototype.emit=function(t){for(var r=[],n=1;n0&&(o=r[0]),o instanceof Error)throw o;var s=new Error("Unhandled error."+(o?" ("+o.message+")":""));throw s.context=o,s}var l=i[t];if(l===void 0)return!1;if(typeof l=="function")wse(l,this,r);else for(var u=l.length,c=Lse(l,u),n=0;n0&&o.length>a&&!o.warned){o.warned=!0;var s=new Error("Possible EventEmitter memory leak detected. "+o.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");s.name="MaxListenersExceededWarning",s.emitter=e,s.type=t,s.count=o.length,Ydt(s)}return e}vl.prototype.addListener=function(t,r){return Sse(this,t,r,!1)};vl.prototype.on=vl.prototype.addListener;vl.prototype.prependListener=function(t,r){return Sse(this,t,r,!0)};function Xdt(){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 Ese(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},a=Xdt.bind(n);return a.listener=r,n.wrapFn=a,a}vl.prototype.once=function(t,r){return JE(r),this.on(t,Ese(this,t,r)),this};vl.prototype.prependOnceListener=function(t,r){return JE(r),this.prependListener(t,Ese(this,t,r)),this};vl.prototype.removeListener=function(t,r){var n,a,i,o,s;if(JE(r),a=this._events,a===void 0)return this;if(n=a[t],n===void 0)return this;if(n===r||n.listener===r)--this._eventsCount===0?this._events=Object.create(null):(delete a[t],a.removeListener&&this.emit("removeListener",t,n.listener||r));else if(typeof n!="function"){for(i=-1,o=n.length-1;o>=0;o--)if(n[o]===r||n[o].listener===r){s=n[o].listener,i=o;break}if(i<0)return this;i===0?n.shift():Zdt(n,i),n.length===1&&(a[t]=n[0]),a.removeListener!==void 0&&this.emit("removeListener",t,s||r)}return this};vl.prototype.off=vl.prototype.removeListener;vl.prototype.removeAllListeners=function(t){var r,n,a;if(n=this._events,n===void 0)return this;if(n.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):n[t]!==void 0&&(--this._eventsCount===0?this._events=Object.create(null):delete n[t]),this;if(arguments.length===0){var i=Object.keys(n),o;for(a=0;a=0;a--)this.removeListener(t,r[a]);return this};function kse(e,t,r){var n=e._events;if(n===void 0)return[];var a=n[t];return a===void 0?[]:typeof a=="function"?r?[a.listener||a]:[a]:r?$dt(a):Lse(a,a.length)}vl.prototype.listeners=function(t){return kse(this,t,!0)};vl.prototype.rawListeners=function(t){return kse(this,t,!1)};vl.listenerCount=function(e,t){return typeof e.listenerCount=="function"?e.listenerCount(t):Cse.call(e,t)};vl.prototype.listenerCount=Cse;function Cse(e){var t=this._events;if(t!==void 0){var r=t[e];if(typeof r=="function")return 1;if(r!==void 0)return r.length}return 0}vl.prototype.eventNames=function(){return this._eventsCount>0?KE(this._events):[]};function Lse(e,t){for(var r=new Array(t),n=0;n{"use strict";var tB=Mx().EventEmitter,Qdt={init:function(e){if(e._ev instanceof tB)return e;var t=new tB,r=new tB;return e._ev=t,e._internalEv=r,e.on=t.on.bind(t),e.once=t.once.bind(t),e.removeListener=t.removeListener.bind(t),e.removeAllListeners=t.removeAllListeners.bind(t),e._internalOn=r.on.bind(r),e._internalOnce=r.once.bind(r),e._removeInternalListener=r.removeListener.bind(r),e._removeAllInternalListeners=r.removeAllListeners.bind(r),e.emit=function(n,a){t.emit(n,a),r.emit(n,a)},typeof e.addEventListener=="function"&&e.addEventListener("wheel",()=>{},{passive:!0}),e},triggerHandler:function(e,t,r){var n,a=e._ev;if(!a)return;var i=a._events[t];if(!i)return;function o(l){if(l.listener){if(a.removeListener(t,l.listener),!l.fired)return l.fired=!0,l.listener.apply(a,[r])}else return l.apply(a,[r])}i=Array.isArray(i)?i:[i];var s;for(s=0;s{"use strict";var Dse=Xt(),e0t=im().dfltConfig;function t0t(e,t){for(var r=[],n,a=0;ae0t.queueLength&&(e.undoQueue.queue.shift(),e.undoQueue.index--)};Q1.startSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!0,e.undoQueue.beginSequence=!0};Q1.stopSequence=function(e){e.undoQueue=e.undoQueue||{index:0,queue:[],sequence:!1},e.undoQueue.sequence=!1,e.undoQueue.beginSequence=!1};Q1.undo=function(t){var r,n;if(!(t.undoQueue===void 0||isNaN(t.undoQueue.index)||t.undoQueue.index<=0)){for(t.undoQueue.index--,r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n=t.undoQueue.queue.length)){for(r=t.undoQueue.queue[t.undoQueue.index],t.undoQueue.inSequence=!0,n=0;n{"use strict";zse.exports={_isLinkedToArray:"frames_entry",group:{valType:"string"},name:{valType:"string"},traces:{valType:"any"},baseframe:{valType:"string"},data:{valType:"any"},layout:{valType:"any"}}});var qb=fe(bc=>{"use strict";var J0=bi(),nT=Xt(),ek=Ho(),nB=Sb(),r0t=rB(),n0t=Z4(),i0t=im().configAttributes,qse=rl(),ep=nT.extendDeepAll,Ib=nT.isPlainObject,a0t=nT.isArrayOrTypedArray,tk=nT.nestedProperty,o0t=nT.valObjectMeta,iB="_isSubplotObj",rk="_isLinkedToArray",s0t="_arrayAttrRegexps",Ose="_deprecated",aB=[iB,rk,s0t,Ose];bc.IS_SUBPLOT_OBJ=iB;bc.IS_LINKED_TO_ARRAY=rk;bc.DEPRECATED=Ose;bc.UNDERSCORE_ATTRS=aB;bc.get=function(){var e={};return J0.allTypes.forEach(function(t){e[t]=u0t(t)}),{defs:{valObjects:o0t,metaKeys:aB.concat(["description","role","editType","impliedEdits"]),editType:{traces:qse.traces,layout:qse.layout},impliedEdits:{}},traces:e,layout:c0t(),frames:f0t(),animation:zb(n0t),config:zb(i0t)}};bc.crawl=function(e,t,r,n){var a=r||0;n=n||"",Object.keys(e).forEach(function(i){var o=e[i];if(aB.indexOf(i)===-1){var s=(n?n+".":"")+i;t(o,i,e,a,s),!bc.isValObject(o)&&Ib(o)&&i!=="impliedEdits"&&bc.crawl(o,t,a+1,s)}})};bc.isValObject=function(e){return e&&e.valType!==void 0};bc.findArrayAttributes=function(e){var t=[],r=[],n=[],a,i;function o(l,u,c,f){r=r.slice(0,f).concat([u]),n=n.slice(0,f).concat([l&&l._isLinkedToArray]);var v=l&&(l.valType==="data_array"||l.arrayOk===!0)&&!(r[f-1]==="colorbar"&&(u==="ticktext"||u==="tickvals"));v&&s(a,0,"")}function s(l,u,c){var f=l[r[u]],v=c+r[u];if(u===r.length-1)a0t(f)&&t.push(i+v);else if(n[u]){if(Array.isArray(f))for(var g=0;g=i.length)return!1;if(e.dimensions===2){if(r++,t.length===r)return e;var o=t[r];if(!QE(o))return!1;e=i[a][o]}else e=i[a]}else e=i}}return e}function QE(e){return e===Math.round(e)&&e>=0}function u0t(e){var t,r;t=J0.modules[e]._module,r=t.basePlotModule;var n={};n.type=null;var a=ep({},ek),i=ep({},t.attributes);bc.crawl(i,function(l,u,c,f,v){tk(a,v).set(void 0),l===void 0&&tk(i,v).set(void 0)}),ep(n,a),J0.traceIs(e,"noOpacity")&&delete n.opacity,J0.traceIs(e,"showLegend")||(delete n.showlegend,delete n.legendgroup),J0.traceIs(e,"noHover")&&(delete n.hoverinfo,delete n.hoverlabel),t.selectPoints||delete n.selectedpoints,ep(n,i),r.attributes&&ep(n,r.attributes),n.type=e;var o={meta:t.meta||{},categories:t.categories||{},animatable:!!t.animatable,type:e,attributes:zb(n)};if(t.layoutAttributes){var s={};ep(s,t.layoutAttributes),o.layoutAttributes=zb(s)}return t.animatable||bc.crawl(o,function(l){bc.isValObject(l)&&"anim"in l&&delete l.anim}),o}function c0t(){var e={},t,r;ep(e,nB);for(t in J0.subplotsRegistry)if(r=J0.subplotsRegistry[t],!!r.layoutAttributes)if(Array.isArray(r.attr))for(var n=0;n{"use strict";var Bb=Xt(),g0t=Ho(),vm="templateitemname",oB={name:{valType:"string",editType:"none"}};oB[vm]={valType:"string",editType:"calc"};Sx.templatedArray=function(e,t){return t._isLinkedToArray=e,t.name=oB.name,t[vm]=oB[vm],t};Sx.traceTemplater=function(e){var t={},r,n;for(r in e)n=e[r],Array.isArray(n)&&n.length&&(t[r]=0);function a(i){r=Bb.coerce(i,{},g0t,"type");var o={type:r,_template:null};if(r in t){n=e[r];var s=t[r]%n.length;t[r]++,o._template=n[s]}return o}return{newTrace:a}};Sx.newContainer=function(e,t,r){var n=e._template,a=n&&(n[t]||r&&n[r]);Bb.isPlainObject(a)||(a=null);var i=e[t]={_template:a};return i};Sx.arrayTemplater=function(e,t,r){var n=e._template,a=n&&n[Vse(t)],i=n&&n[t];(!Array.isArray(i)||!i.length)&&(i=[]);var o={};function s(u){var c={name:u.name,_input:u},f=c[vm]=u[vm];if(!Use(f))return c._template=a,c;for(var v=0;v=n&&(r._input||{})._templateitemname;i&&(a=n);var o=t+"["+a+"]",s;function l(){s={},i&&(s[o]={},s[o][vm]=i)}l();function u(g,p){s[g]=p}function c(g,p){i?Bb.nestedProperty(s[o],g).set(p):s[o+"."+g]=p}function f(){var g=s;return l(),g}function v(g,p){g&&c(g,p);var x=f();for(var _ in x)Bb.nestedProperty(e,_).set(x[_])}return{modifyBase:u,modifyItem:c,getUpdateObj:f,applyUpdate:v}}});var rc=fe((Yhr,Gse)=>{"use strict";var iT=(Tb(),Gs(wb)).counter;Gse.exports={idRegex:{x:iT("x","( domain)?"),y:iT("y","( domain)?")},attrRegex:iT("[xy]axis"),xAxisMatch:iT("xaxis"),yAxisMatch:iT("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"},zindexSeparator:"z"}});var El=fe(Qd=>{"use strict";var m0t=bi(),sB=rc();Qd.id2name=function(t){if(!(typeof t!="string"||!t.match(sB.AX_ID_PATTERN))){var r=t.split(" ")[0].slice(1);return r==="1"&&(r=""),t.charAt(0)+"axis"+r}};Qd.name2id=function(t){if(t.match(sB.AX_NAME_PATTERN)){var r=t.slice(5);return r==="1"&&(r=""),t.charAt(0)+r}};Qd.cleanId=function(t,r,n){var a=/( domain)$/.test(t);if(!(typeof t!="string"||!t.match(sB.AX_ID_PATTERN))&&!(r&&t.charAt(0)!==r)&&!(a&&!n)){var i=t.split(" ")[0].slice(1).replace(/^0+/,"");return i==="1"&&(i=""),t.charAt(0)+i+(a&&n?" domain":"")}};Qd.list=function(e,t,r){var n=e._fullLayout;if(!n)return[];var a=Qd.listIds(e,t),i=new Array(a.length),o;for(o=0;on?1:-1:+(e.slice(1)||1)-+(t.slice(1)||1)};Qd.ref2id=function(e){return/^[xyz]/.test(e)?e.split(" ")[0]:!1};function Hse(e,t){if(t&&t.length){for(var r=0;r{"use strict";function y0t(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".outline-controllers").remove()}function x0t(e){var t=e._fullLayout._zoomlayer;t&&t.selectAll(".select-outline").remove(),e._fullLayout._outlining=!1}jse.exports={clearOutlineControllers:y0t,clearOutline:x0t}});var nk=fe(($hr,Wse)=>{"use strict";Wse.exports={scattermode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},scattergap:{valType:"number",min:0,max:1,editType:"calc"}}});var jf=fe(ak=>{"use strict";var ik=bi(),Khr=rc().SUBPLOT_PATTERN;ak.getSubplotCalcData=function(e,t,r){var n=ik.subplotsRegistry[t];if(!n)return[];for(var a=n.attr,i=[],o=0;o{"use strict";var _0t=bi(),Ob=Xt();Ex.manageCommandObserver=function(e,t,r,n){var a={},i=!0;t&&t._commandObserver&&(a=t._commandObserver),a.cache||(a.cache={}),a.lookupTable={};var o=Ex.hasSimpleAPICommandBindings(e,r,a.lookupTable);if(t&&t._commandObserver){if(o)return a;if(t._commandObserver.remove)return t._commandObserver.remove(),t._commandObserver=null,a}if(o){Yse(e,o,a.cache),a.check=function(){if(i){var c=Yse(e,o,a.cache);return c.changed&&n&&a.lookupTable[c.value]!==void 0&&(a.disable(),Promise.resolve(n({value:c.value,type:o.type,prop:o.prop,traces:o.traces,index:a.lookupTable[c.value]})).then(a.enable,a.enable)),c.changed}};for(var s=["plotly_relayout","plotly_redraw","plotly_restyle","plotly_update","plotly_animatingframe","plotly_afterplot"],l=0;l0?".":"")+a;Ob.isPlainObject(i)?lB(i,t,o,n+1):t(o,a,i)}})}});var Hs=fe((tdr,ole)=>{"use strict";var edr=xi(),w0t=lb().timeFormatLocale,T0t=jI().formatLocale,aT=aa(),A0t=WI(),M0t=A4().version,No=bi(),S0t=qb(),E0t=Mo(),Ri=Xt(),k0t=ni(),Kse=Wa().BADNUM,e0=El(),C0t=pm().clearOutline,L0t=nk(),uB=Z4(),P0t=rB(),F0t=jf().getModuleCalcData,Jse=Ri.relinkPrivateKeys,kx=Ri._,fi=ole.exports={};Ri.extendFlat(fi,No);fi.attributes=Ho();fi.attributes.type.values=fi.allTypes;fi.fontAttrs=Ds();fi.layoutAttributes=Sb();var sk=$se();fi.executeAPICommand=sk.executeAPICommand;fi.computeAPICommandBindings=sk.computeAPICommandBindings;fi.manageCommandObserver=sk.manageCommandObserver;fi.hasSimpleAPICommandBindings=sk.hasSimpleAPICommandBindings;fi.redrawText=function(e){return e=Ri.getGraphDiv(e),new Promise(function(t){setTimeout(function(){e._fullLayout&&(No.getComponentMethod("annotations","draw")(e),No.getComponentMethod("legend","draw")(e),No.getComponentMethod("colorbar","draw")(e),t(fi.previousPromises(e)))},300)})};fi.resize=function(e){e=Ri.getGraphDiv(e);var t,r=new Promise(function(n,a){(!e||Ri.isHidden(e))&&a(new Error("Resize must be passed a displayed plot div element.")),e._redrawTimer&&clearTimeout(e._redrawTimer),e._resolveResize&&(t=e._resolveResize),e._resolveResize=n,e._redrawTimer=setTimeout(function(){if(!e.layout||e.layout.width&&e.layout.height||Ri.isHidden(e)){n(e);return}delete e.layout.width,delete e.layout.height;var i=e.changed;e.autoplay=!0,No.call("relayout",e,{autosize:!0}).then(function(){e.changed=i,e._resolveResize===n&&(delete e._resolveResize,n(e))})},100)});return t&&t(r),r};fi.previousPromises=function(e){if((e._promises||[]).length)return Promise.all(e._promises).then(function(){e._promises=[]})};fi.sendDataToCloud=function(e,t){e.emit("plotly_beforeexport");let r=new URL(t).origin;var n=fi.graphJson(e,!1,"object");n.version=M0t;var a=new URL(t);a.searchParams.set("origin",window.location.origin);var i=window.open(a.href,"_blank");if(!i){console.error("Unable to open Plotly Cloud (the popup may have been blocked)"),e.emit("plotly_exportfail");return}var o=function(s){s.origin===r&&s.data&&s.data.type==="CHART_AUTH_SUCCESS"&&(i.postMessage({type:"chart",chart:n},r),window.removeEventListener("message",o),e.emit("plotly_afterexport"))};return window.addEventListener("message",o),!1};var D0t=["days","shortDays","months","shortMonths","periods","dateTime","date","time","decimal","thousands","grouping","currency"],R0t=["year","month","dayMonth","dayMonthYear"];fi.supplyDefaults=function(e,t){var r=t&&t.skipUpdateCalc,n=e._fullLayout||{};if(n._skipDefaults){delete n._skipDefaults;return}var a=e._fullLayout={},i=e.layout||{},o=e._fullData||[],s=e._fullData=[],l=e.data||[],u=e.calcdata||[],c=e._context||{},f;e._transitionData||fi.createTransitionData(e),a._dfltTitle={plot:kx(e,"Click to enter Plot title"),subtitle:kx(e,"Click to enter Plot subtitle"),x:kx(e,"Click to enter X axis title"),y:kx(e,"Click to enter Y axis title"),colorbar:kx(e,"Click to enter Colorscale title"),annotation:kx(e,"new text")},a._traceWord=kx(e,"trace");var v=Qse(e,D0t);if(n._initialAutoSizeIsDone){var g=n.width,p=n.height;fi.supplyLayoutGlobalDefaults(i,a,v),i.width||(a.width=g),i.height||(a.height=p),fi.sanitizeMargins(a)}else{fi.supplyLayoutGlobalDefaults(i,a,v);var x=!i.width||!i.height,_=a.autosize,y=c.autosizable,C=x&&(_||y);C?fi.plotAutoSize(e,i,a):x&&fi.sanitizeMargins(a),!_&&x&&(i.width=a.width,i.height=a.height)}a._d3locale=q0t(v,a.separators),a._extraFormat=Qse(e,R0t),a._initialAutoSizeIsDone=!0,a._dataLength=l.length,a._modules=[],a._visibleModules=[],a._basePlotModules=[];var k=a._subplots=z0t(),S=a._splomAxes={x:{},y:{}},L=a._splomSubplots={};a._splomGridDflt={},a._scatterStackOpts={},a._firstScatter={},a._alignmentOpts={},a._colorAxes={},a._requestRangeslider={},a._traceUids=I0t(o,l),fi.supplyDataDefaults(l,s,i,a);var w=Object.keys(S.x),A=Object.keys(S.y);if(w.length>1&&A.length>1){for(No.getComponentMethod("grid","sizeDefaults")(i,a),f=0;f15&&A.length>15&&a.shapes.length===0&&a.images.length===0,fi.linkSubplots(s,a,o,n),fi.cleanPlot(s,a,o,n);var I=!!(n._has&&n._has("cartesian")),R=!!(a._has&&a._has("cartesian")),B=I,O=R;B&&!O?n._bgLayer.remove():O&&!B&&(a._shouldCreateBgLayer=!0),n._zoomlayer&&!e._dragging&&C0t({_fullLayout:n}),B0t(s,a),Jse(a,n),No.getComponentMethod("colorscale","crossTraceDefaults")(s,a),a._preGUI||(a._preGUI={}),a._tracePreGUI||(a._tracePreGUI={});var V=a._tracePreGUI,j={},q;for(q in V)j[q]="old";for(f=0;f0){var c=1-2*i;o=Math.round(c*o),s=Math.round(c*s)}}var f=fi.layoutAttributes.width.min,v=fi.layoutAttributes.height.min;o1,p=!r.height&&Math.abs(n.height-s)>1;(p||g)&&(g&&(n.width=o),p&&(n.height=s)),t._initialAutoSize||(t._initialAutoSize={width:o,height:s}),fi.sanitizeMargins(n)};fi.supplyLayoutModuleDefaults=function(e,t,r,n){var a=No.componentsRegistry,i=t._basePlotModules,o,s,l,u=No.subplotsRegistry.cartesian;for(o in a)l=a[o],l.includeBasePlot&&l.includeBasePlot(e,t);i.length||i.push(u),t._has("cartesian")&&(No.getComponentMethod("grid","contentDefaults")(e,t),u.finalizeSubplots(e,t));for(var c in t._subplots)t._subplots[c].sort(Ri.subplotSort);for(s=0;s1&&(r.l/=_,r.r/=_)}if(v){var y=(r.t+r.b)/v;y>1&&(r.t/=y,r.b/=y)}var C=r.xl!==void 0?r.xl:r.x,k=r.xr!==void 0?r.xr:r.x,S=r.yt!==void 0?r.yt:r.y,L=r.yb!==void 0?r.yb:r.y;g[t]={l:{val:C,size:r.l+x},r:{val:k,size:r.r+x},b:{val:L,size:r.b+x},t:{val:S,size:r.t+x}},p[t]=1}if(!n._replotting)return fi.doAutoMargin(e)}};function N0t(e){if("_redrawFromAutoMarginCount"in e._fullLayout)return!1;var t=e0.list(e,"",!0);for(var r in t)if(t[r].autoshift||t[r].shift)return!0;return!1}fi.doAutoMargin=function(e){var t=e._fullLayout,r=t.width,n=t.height;t._size||(t._size={}),rle(t);var a=t._size,i=t.margin,o={t:0,b:0,l:0,r:0},s=Ri.extendFlat({},a),l=i.l,u=i.r,c=i.t,f=i.b,v=t._pushmargin,g=t._pushmarginIds,p=t.minreducedwidth,x=t.minreducedheight;if(i.autoexpand!==!1){for(var _ in v)g[_]||delete v[_];var y=e._fullLayout._reservedMargin;for(var C in y)for(var k in y[C]){var S=y[C][k];o[k]=Math.max(o[k],S)}v.base={l:{val:0,size:l},r:{val:1,size:u},t:{val:1,size:c},b:{val:0,size:f}};for(var L in o){var w=0;for(var A in v)A!=="base"&&aT(v[A][L].size)&&(w=v[A][L].size>w?v[A][L].size:w);var T=Math.max(0,i[L]-w);o[L]=Math.max(0,o[L]-T)}for(var m in v){var F=v[m].l||{},E=v[m].b||{},I=F.val,R=F.size,B=E.val,O=E.size,V=r-o.r-o.l,j=n-o.t-o.b;for(var q in v){if(aT(R)&&v[q].r){var U=v[q].r.val,J=v[q].r.size;if(U>I){var ee=(R*U+(J-V)*I)/(U-I),ce=(J*(1-I)+(R-V)*(1-U))/(U-I);ee+ce>l+u&&(l=ee,u=ce)}}if(aT(O)&&v[q].t){var ye=v[q].t.val,xe=v[q].t.size;if(ye>B){var ue=(O*ye+(xe-j)*B)/(ye-B),K=(xe*(1-B)+(O-j)*(1-ye))/(ye-B);ue+K>f+c&&(f=ue,c=K)}}}}}var _e=Ri.constrain(r-i.l-i.r,nle,p),ne=Ri.constrain(n-i.t-i.b,ile,x),ae=Math.max(0,r-_e),pe=Math.max(0,n-ne);if(ae){var ie=(l+u)/ae;ie>1&&(l/=ie,u/=ie)}if(pe){var le=(f+c)/pe;le>1&&(f/=le,c/=le)}if(a.l=Math.round(l)+o.l,a.r=Math.round(u)+o.r,a.t=Math.round(c)+o.t,a.b=Math.round(f)+o.b,a.p=Math.round(i.pad),a.w=Math.round(r)-a.l-a.r,a.h=Math.round(n)-a.t-a.b,!t._replotting&&(fi.didMarginChange(s,a)||N0t(e))){"_redrawFromAutoMarginCount"in t?t._redrawFromAutoMarginCount++:t._redrawFromAutoMarginCount=1;var me=3*(1+Object.keys(g).length);if(t._redrawFromAutoMarginCount1)return!0}return!1};fi.graphJson=function(e,t=!1,r="json",n=!1,a=!1){(n&&t&&!e._fullData||n&&!t&&!e._fullLayout)&&fi.supplyDefaults(e);var i=n?e._fullData:e.data,o=n?e._fullLayout:e.layout,s=(e._transitionData||{})._frames;function l(f,v){if(typeof f=="function")return v?"_function_":null;if(Ri.isPlainObject(f)){var g={};return Object.keys(f).sort().forEach(function(y){if(["_","["].indexOf(y.charAt(0))===-1){if(typeof f[y]=="function"){v&&(g[y]="_function");return}g[y]=l(f[y],v)}}),g}var p=Array.isArray(f),x=Ri.isTypedArray(f);if((p||x)&&f.dtype&&f.shape){var _=f.bdata;return l({dtype:f.dtype,shape:f.shape,bdata:Ri.isArrayBuffer(_)?A0t.encode(_):_},v)}return p?f.map(function(y){return l(y,v)}):x?Ri.simpleMap(f,Ri.identity):Ri.isJSDate(f)?Ri.ms2DateTimeLocal(+f):f}var u={data:(i||[]).map(function(f){var v=l(f);return t&&delete v.fit,v})};if(!t&&(u.layout=l(o),n)){var c=o._size;u.layout.computed={margin:{b:c.b,l:c.l,r:c.r,t:c.t}}}return s&&(u.frames=l(s)),a&&(u.config=l(e._context,!0)),r==="object"?u:JSON.stringify(u)};fi.modifyFrames=function(e,t){var r,n,a,i=e._transitionData._frames,o=e._transitionData._frameHash;for(r=0;r0&&(e._transitioningWithDuration=!0),e._transitionData._interruptCallbacks.push(function(){n=!0}),r.redraw&&e._transitionData._interruptCallbacks.push(function(){return No.call("redraw",e)}),e._transitionData._interruptCallbacks.push(function(){e.emit("plotly_transitioninterrupted",[])});var v=0,g=0;function p(){return v++,function(){g++,!n&&g===v&&s(f)}}r.runFn(p),setTimeout(p())})}function s(f){if(e._transitionData)return i(e._transitionData._interruptCallbacks),Promise.resolve().then(function(){if(r.redraw)return No.call("redraw",e)}).then(function(){e._transitioning=!1,e._transitioningWithDuration=!1,e.emit("plotly_transitioned",[])}).then(f)}function l(){if(e._transitionData)return e._transitioning=!1,a(e._transitionData._interruptCallbacks)}var u=[fi.previousPromises,l,r.prepareFn,fi.rehover,fi.reselect,o],c=Ri.syncOrAsync(u,e);return(!c||!c.then)&&(c=Promise.resolve()),c.then(function(){return e})}fi.doCalcdata=function(e,t){var r=e0.list(e),n=e._fullData,a=e._fullLayout,i,o,s,l=new Array(n.length),u=(e.calcdata||[]).slice();for(e.calcdata=l,a._numBoxes=0,a._numViolins=0,a._violinScaleGroupStats={},e._hmpixcount=0,e._hmlumcount=0,a._piecolormap={},a._sunburstcolormap={},a._treemapcolormap={},a._iciclecolormap={},a._funnelareacolormap={},s=0;s{"use strict";Cx.xmlns="http://www.w3.org/2000/xmlns/";Cx.svg="http://www.w3.org/2000/svg";Cx.xlink="http://www.w3.org/1999/xlink";Cx.svgAttrs={xmlns:Cx.svg,"xmlns:xlink":Cx.xlink}});var nc=fe((ndr,sle)=>{"use strict";sle.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"}}});var as=fe(A0=>{"use strict";var wc=xi(),ev=Xt(),j0t=ev.strTranslate,cB=Q0(),W0t=nc().LINE_SPACING,Y0t=/([^$]*)([$]+[^$]*[$]+)([^$]*)/,dle=e=>e?e.match(Y0t):null;A0.matchTex=dle;A0.convertToTspans=function(e,t,r){var n=e.text(),a=!e.attr("data-notex")&&t&&t._context.typesetMath&&dle(n);a&&!K0t()&&(a=null);var i=wc.select(e.node().parentNode);if(i.empty())return;var o=e.attr("class")?e.attr("class").split(" ")[0]:"text";o+="-math",i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove(),e.style("display",null).attr({"data-unformatted":n,"data-math":"N"});function s(){i.empty()||(o=e.attr("class")+"-math",i.select("svg."+o).remove()),e.text("").style("white-space","pre");var l=svt(e.node(),n);l&&e.style("pointer-events","all"),A0.positionText(e),r&&r.call(e)}return a?(t&&t._promises||[]).push(new Promise(function(l){e.style("display","none");var u=parseInt(e.node().style.fontSize,10),c={fontSize:u},f=e.attr("text-anchor");J0t(a[2],c,function(v,g,p){i.selectAll("svg."+o).remove(),i.selectAll("g."+o+"-group").remove();var x=v&&v.select("svg");if(!x||!x.node()){s(),l();return}e.style("display","none");var _=i.append("g").classed(o+"-group",!0).attr({"pointer-events":"none","data-unformatted":n,"data-math":"Y"});_.node().appendChild(x.node()),g&&g.node()&&x.node().insertBefore(g.node().cloneNode(!0),x.node().firstChild);var y=p.width,C=p.height;x.attr({class:o,height:C,preserveAspectRatio:"xMinYMin meet"}).style({overflow:"visible","pointer-events":"none","font-size":c.fontSize+"px"});var k=e.node().style.fill||"black",S=x.select("g");S.attr({fill:k,stroke:k});var L=S.node().getBoundingClientRect(),w=L.width,A=L.height;(w>y||A>C)&&(x.style("overflow","hidden"),L=x.node().getBoundingClientRect(),w=L.width,A=L.height);var T=+e.attr("x"),m=+e.attr("y"),F=u||e.node().getBoundingClientRect().height,E=-F/4;o[0]==="y"?_.attr({transform:"rotate("+[-90,T,m]+")"+j0t(-w/2,E-A/2)}):o[0]==="l"?m=E-A/2:o[0]==="a"&&o.indexOf("atitle")!==0?(T=0,m=E):(T=T-w*(f==="middle"?.5:f==="end"?1:0),m=m+E-A/2),x.attr({x:T,y:m}),r&&r.call(e,_),l(_)})})):s(),e};var X0t=/(<|<|<)/g,Z0t=/(>|>|>)/g;function $0t(e){return e.replace(X0t,"\\lt ").replace(Z0t,"\\gt ")}var fB=null,vle=()=>typeof MathJax!="undefined"&&MathJax.version?parseInt(MathJax.version.split(".")[0]):null,lle=!1,ule=!1;function K0t(){let e=vle();return e===3||e===4?!0:(e===null?lle||(lle=!0,ev.warn("MathJax is not loaded. Math equations will not be rendered.")):ule||(ule=!0,ev.warn("Unsupported MathJax version:",MathJax.version)),!1)}function J0t(e,t,r){let n=vle();var a;let i=function(){if(!fB){let u=MathJax._.output.svg_ts.SVG,c=ev.extendFlat({},MathJax.config.svg,{fontCache:"local"});n===4&&(c.linebreaks=ev.extendFlat({},c.linebreaks,{inline:!1})),fB=MathJax._.mathjax.mathjax.document(document,ev.extendFlat({},MathJax.config.options,{InputJax:MathJax.startup.input,OutputJax:new u(c)}))}let s="math-output-"+ev.randstr({},64);a=wc.select("body").append("div").attr({id:s}).style({visibility:"hidden",position:"absolute","font-size":t.fontSize+"px"});let l=$0t(e).replace(/^\$+|\$+$/g,"");return MathJax._.mathjax.mathjax.handleRetriesFor(function(){return fB.convert(l,{display:!1})}).then(function(u){a.node().appendChild(u)})},o=function(){let s=a.select(".MathJax"),l=!s.empty()&&a.select("svg").node();if(!l)ev.log("There was an error in the tex syntax.",e),r();else{let u=l.getBoundingClientRect(),c=s.select("defs");r(s,c,u)}a.remove()};Promise.resolve().then(i).then(o).catch(s=>{ev.log("MathJax typesetting failed.",e,s),a&&a.remove(),r()})}var ple={sup:"font-size:70%",sub:"font-size:70%",s:"text-decoration:line-through",u:"text-decoration:underline",b:"font-weight:bold",i:"font-style:italic",a:"cursor:pointer",span:"",em:"font-style:italic;font-weight:bold"},Q0t={sub:"0.3em",sup:"-0.6em"},evt={sub:"-0.21em",sup:"0.42em"},cle="\u200B",fle=["http:","https:","mailto:","",void 0,":"],gle=A0.NEWLINES=/(\r\n?|\n)/g,dB=/(<[^<>]*>)/,vB=/<(\/?)([^ >]*)(\s+(.*))?>/i,tvt=//i;A0.BR_TAG_ALL=//gi;var mle=/(^|[\s"'])style\s*=\s*("([^"]*);?"|'([^']*);?')/i,yle=/(^|[\s"'])href\s*=\s*("([^"]*)"|'([^']*)')/i,xle=/(^|[\s"'])target\s*=\s*("([^"\s]*)"|'([^'\s]*)')/i,rvt=/(^|[\s"'])popup\s*=\s*("([\w=,]*)"|'([\w=,]*)')/i;function Lx(e,t){if(!e)return null;var r=e.match(t),n=r&&(r[3]||r[4]);return n&&lk(n)}var nvt=/(^|;)\s*color:/;A0.plainText=function(e,t){t=t||{};for(var r=t.len!==void 0&&t.len!==-1?t.len:1/0,n=t.allowedTags!==void 0?t.allowedTags:["br"],a="...",i=a.length,o=e.split(dB),s=[],l="",u=0,c=0;ci?s.push(f.slice(0,Math.max(0,x-i))+a):s.push(f.slice(0,x));break}l=""}}return s.join("")};var ivt={mu:"\u03BC",amp:"&",lt:"<",gt:">",nbsp:"\xA0",times:"\xD7",plusmn:"\xB1",deg:"\xB0"},avt=/&(#\d+|#x[\da-fA-F]+|[a-z]+);/g;function lk(e){return e.replace(avt,function(t,r){var n;return r.charAt(0)==="#"?n=ovt(r.charAt(1)==="x"?parseInt(r.slice(2),16):parseInt(r.slice(1),10)):n=ivt[r],n||t})}A0.convertEntities=lk;function ovt(e){if(!(e>1114111)){var t=String.fromCodePoint;if(t)return t(e);var r=String.fromCharCode;return e<=65535?r(e):r((e>>10)+55232,e%1024+56320)}}function svt(e,t){t=t.replace(gle," ");var r=!1,n=[],a,i=-1;function o(){i++;var w=document.createElementNS(cB.svg,"tspan");wc.select(w).attr({class:"line",dy:i*W0t+"em"}),e.appendChild(w),a=w;var A=n;if(n=[{node:w}],A.length>1)for(var T=1;T.",t);return}var A=n.pop();w!==A.type&&ev.log("Start tag <"+A.type+"> doesnt match end tag <"+w+">. Pretending it did match.",t),a=n[n.length-1].node}var c=tvt.test(t);c?o():(a=e,n=[{node:e}]);for(var f=t.split(dB),v=0;v{"use strict";var lvt=xi(),sT=aa(),uk=Xt(),Px=ni(),uvt=yx().isValid;function cvt(e,t,r){var n=t?uk.nestedProperty(e,t).get()||{}:e,a=n[r||"color"];a&&a._inputArray&&(a=a._inputArray);var i=!1;if(uk.isArrayOrTypedArray(a)){for(var o=0;o=0;n--,a++){var i=e[n];r[a]=[1-i[0],i[1]]}return r}function Mle(e,t){t=t||{};for(var r=e.domain,n=e.range,a=n.length,i=new Array(a),o=0;o{"use strict";var Ele=Rq(),hvt=Ele.FORMAT_LINK,dvt=Ele.DATE_FORMAT_LINK;function vvt(e,t){return{valType:"string",dflt:"",editType:"none",description:(t?pB:kle)("hover text",e)+["By default the values are formatted using "+(t?"generic number format":"`"+e+"axis.hoverformat`")+"."].join(" ")}}function pB(e,t){return["Sets the "+e+" formatting rule"+(t?" for `"+t+"`":""),"using d3 formatting mini-languages","which are very similar to those in Python. For numbers, see: "+hvt+"."].join(" ")}function kle(e,t){return pB(e,t)+[" And for dates see: "+dvt+".","We add two items to d3's date formatter:","*%h* for half of the year as a decimal number as well as","*%{n}f* for fractional seconds","with n digits. For example, *2016-10-13 09:15:23.456* with tickformat","*%H~%M~%S.%2f* would display *09~15~23.46*"].join(" ")}Cle.exports={axisHoverFormat:vvt,descriptionOnlyNumbers:pB,descriptionWithDates:kle}});var pf=fe((ldr,Wle)=>{"use strict";var Lle=Ds(),Nb=tc(),jle=Uc().dash,mB=ta().extendFlat,Ple=Mo().templatedArray,sdr=Oo().templateFormatStringDescription,Fle=pl().descriptionWithDates,pvt=Wa().ONEDAY,Up=rc(),gvt=Up.HOUR_PATTERN,mvt=Up.WEEKDAY_PATTERN,gB={valType:"enumerated",values:["auto","linear","array"],editType:"ticks",impliedEdits:{tick0:void 0,dtick:void 0}},yvt=mB({},gB,{values:gB.values.slice().concat(["sync"])});function Dle(e){return{valType:"integer",min:0,dflt:e?5:0,editType:"ticks"}}var Rle={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},Ile={valType:"any",editType:"ticks",impliedEdits:{tickmode:"linear"}},zle={valType:"data_array",editType:"ticks"},qle={valType:"enumerated",values:["outside","inside",""],editType:"ticks"};function Ble(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=5),t}function Ole(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Nle={valType:"color",dflt:Nb.defaultLine,editType:"ticks"},Ule={valType:"color",dflt:Nb.lightLine,editType:"ticks"};function Vle(e){var t={valType:"number",min:0,editType:"ticks"};return e||(t.dflt=1),t}var Gle=mB({},jle,{editType:"ticks"}),Hle={valType:"boolean",editType:"ticks"};Wle.exports={visible:{valType:"boolean",editType:"plot"},color:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},title:{text:{valType:"string",editType:"ticks"},font:Lle({editType:"ticks",description:"Sets this axis' title font."}),standoff:{valType:"number",min:0,editType:"ticks"},editType:"ticks"},type:{valType:"enumerated",values:["-","linear","log","date","category","multicategory"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:{valType:"enumerated",values:["convert types","strict"],dflt:"convert types",editType:"calc"},autorange:{valType:"enumerated",values:[!0,!1,"reversed","min reversed","max reversed","min","max"],dflt:!0,editType:"axrange",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},autorangeoptions:{minallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmin:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},clipmax:{valType:"any",editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},include:{valType:"any",arrayOk:!0,editType:"plot",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},editType:"plot"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"plot"},range:{valType:"info_array",items:[{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0},{valType:"any",editType:"axrange",impliedEdits:{"^autorange":!1},anim:!0}],editType:"axrange",impliedEdits:{autorange:!1},anim:!0},minallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},maxallowed:{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},modebardisable:{valType:"flaglist",flags:["autoscale","zoominout"],extras:["none"],dflt:"none",editType:"modebar"},insiderange:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},scaleanchor:{valType:"enumerated",values:[Up.idRegex.x.toString(),Up.idRegex.y.toString(),!1],editType:"plot"},scaleratio:{valType:"number",min:0,dflt:1,editType:"plot"},constrain:{valType:"enumerated",values:["range","domain"],editType:"plot"},constraintoward:{valType:"enumerated",values:["left","center","right","top","middle","bottom"],editType:"plot"},matches:{valType:"enumerated",values:[Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"calc"},rangebreaks:Ple("rangebreak",{enabled:{valType:"boolean",dflt:!0,editType:"calc"},bounds:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},pattern:{valType:"enumerated",values:[mvt,gvt,""],editType:"calc"},values:{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"any",editType:"calc"}},dvalue:{valType:"number",editType:"calc",min:0,dflt:pvt},editType:"calc"}),tickmode:yvt,nticks:Dle(),tick0:Rle,dtick:Ile,ticklabelstep:{valType:"integer",min:1,dflt:1,editType:"ticks"},tickvals:zle,ticktext:{valType:"data_array",editType:"ticks"},ticks:qle,tickson:{valType:"enumerated",values:["labels","boundaries"],dflt:"labels",editType:"ticks"},ticklabelmode:{valType:"enumerated",values:["instant","period"],dflt:"instant",editType:"ticks"},ticklabelposition:{valType:"enumerated",values:["outside","inside","outside top","inside top","outside left","inside left","outside right","inside right","outside bottom","inside bottom"],dflt:"outside",editType:"calc"},ticklabeloverflow:{valType:"enumerated",values:["allow","hide past div","hide past domain"],editType:"calc"},ticklabelshift:{valType:"integer",dflt:0,editType:"ticks"},ticklabelstandoff:{valType:"integer",dflt:0,editType:"ticks"},ticklabelindex:{valType:"integer",arrayOk:!0,editType:"calc"},mirror:{valType:"enumerated",values:[!0,"ticks",!1,"all","allticks"],dflt:!1,editType:"ticks+layoutstyle"},ticklen:Ble(),tickwidth:Ole(),tickcolor:Nle,showticklabels:{valType:"boolean",dflt:!0,editType:"ticks"},labelalias:{valType:"any",dflt:!1,editType:"ticks"},automargin:{valType:"flaglist",flags:["height","width","left","right","top","bottom"],extras:[!0,!1],dflt:!1,editType:"ticks"},showspikes:{valType:"boolean",dflt:!1,editType:"modebar"},spikecolor:{valType:"color",dflt:null,editType:"none"},spikethickness:{valType:"number",dflt:3,editType:"none"},spikedash:mB({},jle,{dflt:"dash",editType:"none"}),spikemode:{valType:"flaglist",flags:["toaxis","across","marker"],dflt:"toaxis",editType:"none"},spikesnap:{valType:"enumerated",values:["data","cursor","hovered data"],dflt:"hovered data",editType:"none"},tickfont:Lle({editType:"ticks"}),tickangle:{valType:"angle",dflt:"auto",editType:"ticks"},autotickangles:{valType:"info_array",freeLength:!0,items:{valType:"angle"},dflt:[0,30,90],editType:"ticks"},tickprefix:{valType:"string",dflt:"",editType:"ticks"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},ticksuffix:{valType:"string",dflt:"",editType:"ticks"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"ticks"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"ticks"},minexponent:{valType:"number",dflt:3,min:0,editType:"ticks"},separatethousands:{valType:"boolean",dflt:!1,editType:"ticks"},tickformat:{valType:"string",dflt:"",editType:"ticks",description:Fle("tick label")},tickformatstops:Ple("tickformatstop",{enabled:{valType:"boolean",dflt:!0,editType:"ticks"},dtickrange:{valType:"info_array",items:[{valType:"any",editType:"ticks"},{valType:"any",editType:"ticks"}],editType:"ticks"},value:{valType:"string",dflt:"",editType:"ticks"},editType:"ticks"}),hoverformat:{valType:"string",dflt:"",editType:"none",description:Fle("hover text")},unifiedhovertitle:{text:{valType:"string",dflt:"",editType:"none"},editType:"none"},showline:{valType:"boolean",dflt:!1,editType:"ticks+layoutstyle"},linecolor:{valType:"color",dflt:Nb.defaultLine,editType:"layoutstyle"},linewidth:{valType:"number",min:0,dflt:1,editType:"ticks+layoutstyle"},showgrid:Hle,gridcolor:Ule,gridwidth:Vle(),griddash:Gle,zeroline:{valType:"boolean",editType:"ticks"},zerolinecolor:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},zerolinelayer:{valType:"enumerated",values:["above traces","below traces"],dflt:"below traces",editType:"plot"},zerolinewidth:{valType:"number",dflt:1,editType:"ticks"},showdividers:{valType:"boolean",dflt:!0,editType:"ticks"},dividercolor:{valType:"color",dflt:Nb.defaultLine,editType:"ticks"},dividerwidth:{valType:"number",dflt:1,editType:"ticks"},anchor:{valType:"enumerated",values:["free",Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"plot"},side:{valType:"enumerated",values:["top","bottom","left","right"],editType:"plot"},overlaying:{valType:"enumerated",values:["free",Up.idRegex.x.toString(),Up.idRegex.y.toString()],editType:"plot"},minor:{tickmode:gB,nticks:Dle("minor"),tick0:Rle,dtick:Ile,tickvals:zle,ticks:qle,ticklen:Ble("minor"),tickwidth:Ole("minor"),tickcolor:Nle,gridcolor:Ule,gridwidth:Vle("minor"),griddash:Gle,showgrid:Hle,editType:"ticks"},minorloglabels:{valType:"enumerated",values:["small digits","complete","none"],dflt:"small digits",editType:"calc"},layer:{valType:"enumerated",values:["above traces","below traces"],dflt:"above traces",editType:"plot"},domain:{valType:"info_array",items:[{valType:"number",min:0,max:1,editType:"plot"},{valType:"number",min:0,max:1,editType:"plot"}],dflt:[0,1],editType:"plot"},position:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},autoshift:{valType:"boolean",dflt:!1,editType:"plot"},shift:{valType:"number",editType:"plot"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array","total ascending","total descending","min ascending","min descending","max ascending","max descending","sum ascending","sum descending","mean ascending","mean descending","geometric mean ascending","geometric mean descending","median ascending","median descending"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var ck=fe((udr,Zle)=>{"use strict";var ml=pf(),Yle=Ds(),Xle=ta().extendFlat,xvt=rl().overrideAll;Zle.exports=xvt({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:ml.linecolor,outlinewidth:ml.linewidth,bordercolor:ml.linecolor,borderwidth:{valType:"number",min:0,dflt:0},bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)"},tickmode:ml.minor.tickmode,nticks:ml.nticks,tick0:ml.tick0,dtick:ml.dtick,tickvals:ml.tickvals,ticktext:ml.ticktext,ticks:Xle({},ml.ticks,{dflt:""}),ticklabeloverflow:Xle({},ml.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:ml.ticklen,tickwidth:ml.tickwidth,tickcolor:ml.tickcolor,ticklabelstep:ml.ticklabelstep,showticklabels:ml.showticklabels,labelalias:ml.labelalias,tickfont:Yle({description:"Sets the color bar's tick label font"}),tickangle:ml.tickangle,tickformat:ml.tickformat,tickformatstops:ml.tickformatstops,tickprefix:ml.tickprefix,showtickprefix:ml.showtickprefix,ticksuffix:ml.ticksuffix,showticksuffix:ml.showticksuffix,separatethousands:ml.separatethousands,exponentformat:ml.exponentformat,minexponent:ml.minexponent,showexponent:ml.showexponent,title:{text:{valType:"string"},font:Yle({description:"Sets this color bar's title font."}),side:{valType:"enumerated",values:["right","top","bottom"]}}},"colorbars","from-root")});var _s=fe((fdr,Kle)=>{"use strict";var _vt=ck(),bvt=(Tb(),Gs(wb)).counter,wvt=(bx(),Gs(_x)).default,$le=yx().scales,cdr=wvt($le);function fk(e){return"`"+e+"`"}Kle.exports=function(t,r){t=t||"",r=r||{};var n=r.cLetter||"c",a="onlyIfNumerical"in r?r.onlyIfNumerical:!!t,i="noScale"in r?r.noScale:t==="marker.line",o="showScaleDflt"in r?r.showScaleDflt:n==="z",s=typeof r.colorscaleDflt=="string"?$le[r.colorscaleDflt]:null,l=r.editTypeOverride||"",u=t?t+".":"",c,f;"colorAttr"in r?(c=r.colorAttr,f=r.colorAttr):(c={z:"z",c:"color"}[n],f="in "+fk(u+c));var v=a?" Has an effect only if "+f+" is set to a numerical array.":"",g=n+"auto",p=n+"min",x=n+"max",_=n+"mid",y=fk(u+g),C=fk(u+p),k=fk(u+x),S=C+" and "+k,L={};L[p]=L[x]=void 0;var w={};w[g]=!1;var A={};return c==="color"&&(A.color={valType:"color",arrayOk:!0,editType:l||"style"},r.anim&&(A.color.anim=!0)),A[g]={valType:"boolean",dflt:!0,editType:"calc",impliedEdits:L},A[p]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:w},A[x]={valType:"number",dflt:null,editType:l||"plot",impliedEdits:w},A[_]={valType:"number",dflt:null,editType:"calc",impliedEdits:L},A.colorscale={valType:"colorscale",editType:"calc",dflt:s,impliedEdits:{autocolorscale:!1}},A.autocolorscale={valType:"boolean",dflt:r.autoColorDflt!==!1,editType:"calc",impliedEdits:{colorscale:void 0}},A.reversescale={valType:"boolean",dflt:!1,editType:"plot"},i||(A.showscale={valType:"boolean",dflt:o,editType:"calc"},A.colorbar=_vt),r.noColorAxis||(A.coloraxis={valType:"subplotid",regex:bvt("coloraxis"),dflt:null,editType:"calc"}),A}});var xB=fe((hdr,Jle)=>{"use strict";var Tvt=ta().extendFlat,Avt=_s(),yB=yx().scales;Jle.exports={editType:"calc",colorscale:{editType:"calc",sequential:{valType:"colorscale",dflt:yB.Reds,editType:"calc"},sequentialminus:{valType:"colorscale",dflt:yB.Blues,editType:"calc"},diverging:{valType:"colorscale",dflt:yB.RdBu,editType:"calc"}},coloraxis:Tvt({_isSubplotObj:!0,editType:"calc"},Avt("",{colorAttr:"corresponding trace color array(s)",noColorAxis:!0,showScaleDflt:!0}))}});var _B=fe((ddr,Qle)=>{"use strict";var Mvt=Xt();Qle.exports=function(t){return Mvt.isPlainObject(t.colorbar)}});var TB=fe(wB=>{"use strict";var bB=aa(),eue=Xt(),tue=Wa(),Svt=tue.ONEDAY,Evt=tue.ONEWEEK;wB.dtick=function(e,t){var r=t==="log",n=t==="date",a=t==="category",i=n?Svt:1;if(!e)return i;if(bB(e))return e=Number(e),e<=0?i:a?Math.max(1,Math.round(e)):n?Math.max(.1,e):e;if(typeof e!="string"||!(n||r))return i;var o=e.charAt(0),s=e.slice(1);return s=bB(s)?Number(s):0,s<=0||!(n&&o==="M"&&s===Math.round(s)||r&&o==="L"||r&&o==="D"&&(s===1||s===2))?i:e};wB.tick0=function(e,t,r,n){if(t==="date")return eue.cleanDate(e,eue.dateTick0(r,n%Evt===0?1:0));if(!(n==="D1"||n==="D2"))return bB(e)?Number(e):0}});var Fx=fe((pdr,nue)=>{"use strict";var rue=TB(),kvt=Xt().isArrayOrTypedArray,Cvt=Gf().isTypedArraySpec,Lvt=Gf().decodeTypedArraySpec;nue.exports=function(t,r,n,a,i={}){var o=i.isMinor,s=o?t.minor||{}:t,l=o?r.minor:r,u=o?"minor.":"";function c(S){var L=s[S];return Cvt(L)&&(L=Lvt(L)),L!==void 0?L:(l._template||{})[S]}var f=c("tick0"),v=c("dtick"),g=c("tickvals"),p=c("overlaying"),x=a==="category"||a==="multicategory",_;kvt(g)?_="array":v?_="linear":p&&!x?_="sync":_="auto";var y=n(u+"tickmode",_);if(y==="auto"||y==="sync")n(u+"nticks");else if(y==="linear"){var C=l.dtick=rue.dtick(v,a);l.tick0=rue.tick0(f,a,r.calendar,C)}else if(a!=="multicategory"){var k=n(u+"tickvals");k===void 0?l.tickmode="auto":o||n("ticktext")}}});var Ub=fe((gdr,aue)=>{"use strict";var AB=Xt(),iue=pf();aue.exports=function(t,r,n,a){var i=a.isMinor,o=i?t.minor||{}:t,s=i?r.minor:r,l=i?iue.minor:iue,u=i?"minor.":"",c=AB.coerce2(o,s,l,"ticklen",i?(r.ticklen||5)*.6:void 0),f=AB.coerce2(o,s,l,"tickwidth",i?r.tickwidth||1:void 0),v=AB.coerce2(o,s,l,"tickcolor",(i?r.tickcolor:void 0)||s.color),g=n(u+"ticks",!i&&a.outerTicks||c||f||v?"outside":"");g||(delete s.ticklen,delete s.tickwidth,delete s.tickcolor)}});var MB=fe((mdr,oue)=>{"use strict";oue.exports=function(t){var r=["showexponent","showtickprefix","showticksuffix"],n=r.filter(function(i){return t[i]!==void 0}),a=function(i){return t[i]===t[n[0]]};if(n.every(a)||n.length===1)return t[n[0]]}});var Ah=fe((ydr,sue)=>{"use strict";var hk=Xt(),Pvt=Mo();sue.exports=function(t,r,n){var a=n.name,i=n.inclusionAttr||"visible",o=r[a],s=hk.isArrayOrTypedArray(t[a])?t[a]:[],l=r[a]=[],u=Pvt.arrayTemplater(r,a,i),c,f;for(c=0;c{"use strict";var SB=Xt(),Fvt=ni().contrast,lue=pf(),Dvt=MB(),Rvt=Ah();uue.exports=function(t,r,n,a,i){i||(i={});var o=n("labelalias");SB.isPlainObject(o)||delete r.labelalias;var s=Dvt(t),l=n("showticklabels");if(l){i.noTicklabelshift||n("ticklabelshift"),i.noTicklabelstandoff||n("ticklabelstandoff");var u=i.font||{},c=r.color,f=r.ticklabelposition||"",v=f.indexOf("inside")!==-1?Fvt(i.bgColor):c&&c!==lue.color.dflt?c:u.color;if(SB.coerceFont(n,"tickfont",u,{overrideDflt:{color:v}}),!i.noTicklabelstep&&a!=="multicategory"&&a!=="log"&&n("ticklabelstep"),!i.noAng){var g=n("tickangle");!i.noAutotickangles&&g==="auto"&&n("autotickangles")}if(a!=="category"){var p=n("tickformat");Rvt(t,r,{name:"tickformatstops",inclusionAttr:"enabled",handleItemDefaults:Ivt}),r.tickformatstops.length||delete r.tickformatstops,!i.noExp&&!p&&a!=="date"&&(n("showexponent",s),n("exponentformat"),n("minexponent"),n("separatethousands"))}!i.noMinorloglabels&&a==="log"&&n("minorloglabels")}};function Ivt(e,t){function r(a,i){return SB.coerce(e,t,lue.tickformatstops,a,i)}var n=r("enabled");n&&(r("dtickrange"),r("value"))}});var mm=fe((_dr,cue)=>{"use strict";var zvt=MB();cue.exports=function(t,r,n,a,i){i||(i={});var o=i.tickSuffixDflt,s=zvt(t),l=n("tickprefix");l&&n("showtickprefix",s);var u=n("ticksuffix",o);u&&n("showticksuffix",s)}});var EB=fe((bdr,fue)=>{"use strict";var ym=Xt(),qvt=Mo(),Bvt=Fx(),Ovt=Ub(),Nvt=gm(),Uvt=mm(),Vvt=ck();fue.exports=function(t,r,n){var a=qvt.newContainer(r,"colorbar"),i=t.colorbar||{};function o(E,I){return ym.coerce(i,a,Vvt,E,I)}var s=n.margin||{t:0,b:0,l:0,r:0},l=n.width-s.l-s.r,u=n.height-s.t-s.b,c=o("orientation"),f=c==="v",v=o("thicknessmode");o("thickness",v==="fraction"?30/(f?l:u):30);var g=o("lenmode");o("len",g==="fraction"?1:f?u:l);var p=o("yref"),x=o("xref"),_=p==="paper",y=x==="paper",C,k,S,L="left";f?(S="middle",L=y?"left":"right",C=y?1.02:1,k=.5):(S=_?"bottom":"top",L="center",C=.5,k=_?1.02:1),ym.coerce(i,a,{x:{valType:"number",min:y?-2:0,max:y?3:1,dflt:C}},"x"),ym.coerce(i,a,{y:{valType:"number",min:_?-2:0,max:_?3:1,dflt:k}},"y"),o("xanchor",L),o("xpad"),o("yanchor",S),o("ypad"),ym.noneOrAll(i,a,["x","y"]),o("outlinecolor"),o("outlinewidth"),o("bordercolor"),o("borderwidth"),o("bgcolor");var w=ym.coerce(i,a,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:f?["outside","inside","outside top","inside top","outside bottom","inside bottom"]:["outside","inside","outside left","inside left","outside right","inside right"]}},"ticklabelposition");o("ticklabeloverflow",w.indexOf("inside")!==-1?"hide past domain":"hide past div"),Bvt(i,a,o,"linear");var A=n.font,T={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,outerTicks:!1,font:A};w.indexOf("inside")!==-1&&(T.bgColor="black"),Uvt(i,a,o,"linear",T),Nvt(i,a,o,"linear",T),Ovt(i,a,o,"linear",T),o("title.text",n._dfltTitle.colorbar);var m=a.showticklabels?a.tickfont:A,F=ym.extendFlat({},A,{family:m.family,size:ym.bigFont(m.size)});ym.coerceFont(o,"title.font",F),o("title.side",f?"top":"right")}});var Vc=fe((wdr,vue)=>{"use strict";var hue=aa(),CB=Xt(),Gvt=_B(),Hvt=EB(),due=yx().isValid,jvt=bi().traceIs;function kB(e,t){var r=t.slice(0,t.length-1);return t?CB.nestedProperty(e,r).get()||{}:e}vue.exports=function e(t,r,n,a,i){var o=i.prefix,s=i.cLetter,l="_module"in r,u=kB(t,o),c=kB(r,o),f=kB(r._template||{},o)||{},v=function(){return delete t.coloraxis,delete r.coloraxis,e(t,r,n,a,i)};if(l){var g=n._colorAxes||{},p=a(o+"coloraxis");if(p){var x=jvt(r,"contour")&&CB.nestedProperty(r,"contours.coloring").get()||"heatmap",_=g[p];_?(_[2].push(v),_[0]!==x&&(_[0]=!1,CB.warn(["Ignoring coloraxis:",p,"setting","as it is linked to incompatible colorscales."].join(" ")))):g[p]=[x,r,[v]];return}}var y=u[s+"min"],C=u[s+"max"],k=hue(y)&&hue(C)&&y{"use strict";var pue=Xt(),Wvt=Mo(),gue=xB(),Yvt=Vc();mue.exports=function(t,r){function n(f,v){return pue.coerce(t,r,gue,f,v)}n("colorscale.sequential"),n("colorscale.sequentialminus"),n("colorscale.diverging");var a=r._colorAxes,i,o;function s(f,v){return pue.coerce(i,o,gue.coloraxis,f,v)}for(var l in a){var u=a[l];if(u[0])i=t[l]||{},o=Wvt.newContainer(r,l,"coloraxis"),o._name=l,Yvt(i,o,r,s,{prefix:"",cLetter:"c"});else{for(var c=0;c{"use strict";var Xvt=Xt(),Zvt=Wf().hasColorscale,$vt=Wf().extractOpts;xue.exports=function(t,r){function n(c,f){var v=c["_"+f];v!==void 0&&(c[f]=v)}function a(c,f){var v=f.container?Xvt.nestedProperty(c,f.container).get():c;if(v)if(v.coloraxis)v._colorAx=r[v.coloraxis];else{var g=$vt(v),p=g.auto;(p||g.min===void 0)&&n(v,f.min),(p||g.max===void 0)&&n(v,f.max),g.autocolorscale&&n(v,"colorscale")}}for(var i=0;i{"use strict";var bue=aa(),LB=Xt(),Kvt=Wf().extractOpts;wue.exports=function(t,r,n){var a=t._fullLayout,i=n.vals,o=n.containerStr,s=o?LB.nestedProperty(r,o).get():r,l=Kvt(s),u=l.auto!==!1,c=l.min,f=l.max,v=l.mid,g=function(){return LB.aggNums(Math.min,null,i)},p=function(){return LB.aggNums(Math.max,null,i)};if(c===void 0?c=g():u&&(s._colorAx&&bue(c)?c=Math.min(c,g()):c=g()),f===void 0?f=p():u&&(s._colorAx&&bue(f)?f=Math.max(f,p()):f=p()),u&&v!==void 0&&(f-v>v-c?c=v-(f-v):f-v=0?x=a.colorscale.sequential:x=a.colorscale.sequentialminus,l._sync("colorscale",x)}}});var js=fe((Sdr,Tue)=>{"use strict";var dk=yx(),Vb=Wf();Tue.exports={moduleType:"component",name:"colorscale",attributes:_s(),layoutAttributes:xB(),supplyLayoutDefaults:yue(),handleDefaults:Vc(),crossTraceDefaults:_ue(),calc:Mh(),scales:dk.scales,defaultScale:dk.defaultScale,getScale:dk.get,isValidScale:dk.isValid,hasColorscale:Vb.hasColorscale,extractOpts:Vb.extractOpts,extractScale:Vb.extractScale,flipScale:Vb.flipScale,makeColorScaleFunc:Vb.makeColorScaleFunc,makeColorScaleFuncFromTrace:Vb.makeColorScaleFuncFromTrace}});var Is=fe((Edr,Mue)=>{"use strict";var Aue=Xt(),Jvt=Gf().isTypedArraySpec;Mue.exports={hasLines:function(e){return e.visible&&e.mode&&e.mode.indexOf("lines")!==-1},hasMarkers:function(e){return e.visible&&(e.mode&&e.mode.indexOf("markers")!==-1||e.type==="splom")},hasText:function(e){return e.visible&&e.mode&&e.mode.indexOf("text")!==-1},isBubble:function(e){var t=e.marker;return Aue.isPlainObject(t)&&(Aue.isArrayOrTypedArray(t.size)||Jvt(t.size))}}});var lT=fe((kdr,Sue)=>{"use strict";var Qvt=aa();Sue.exports=function(t,r){r||(r=2);var n=t.marker,a=n.sizeref||1,i=n.sizemin||0,o=n.sizemode==="area"?function(s){return Math.sqrt(s/a)}:function(s){return s/a};return function(s){var l=o(s/r);return Qvt(l)&&l>0?Math.max(l,i):0}}});var Sd=fe(Yf=>{"use strict";var uT=Xt();Yf.getSubplot=function(e){return e.subplot||e.xaxis+e.yaxis||e.geo};Yf.isTraceInSubplots=function(e,t){if(e.type==="splom"){for(var r=e.xaxes||[],n=e.yaxes||[],a=0;a=0&&r.index{var PB={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},npt=/([astvzqmhlc])([^astvzqmhlc]*)/gi,ipt=/-?[0-9]*\.?[0-9]+(?:e[-+]?\d+)?/gi;function apt(e){let t=[];return e.replace(npt,(r,n,a)=>{let i=n.toLowerCase(),o=n,s=opt(a);for(i==="m"&&s.length>2&&(t.push([o,...s.splice(0,2)]),i="l",o=o==="m"?"l":"L");;){if(s.length===PB[i])return t.push([o,...s]),"";if(s.length{"use strict";var spt=FB(),$n=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)},za="M0,0Z",Lue=Math.sqrt(2),xm=Math.sqrt(3),DB=Math.PI,RB=Math.cos,IB=Math.sin;Iue.exports={circle:{n:0,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a="M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z";return r?Ba(t,r,a):a}},square:{n:1,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")}},diamond:{n:2,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"Z")}},cross:{n:3,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.4,2),a=$n(e*1.2,2);return Ba(t,r,"M"+a+","+n+"H"+n+"V"+a+"H-"+n+"V"+n+"H-"+a+"V-"+n+"H-"+n+"V-"+a+"H"+n+"V-"+n+"H"+a+"Z")}},x:{n:4,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.8/Lue,2),a="l"+n+","+n,i="l"+n+",-"+n,o="l-"+n+",-"+n,s="l-"+n+","+n;return Ba(t,r,"M0,"+n+a+i+o+i+o+s+o+s+a+s+a+"Z")}},"triangle-up":{n:5,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+n+","+a+"H"+n+"L0,-"+i+"Z")}},"triangle-down":{n:6,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+n+",-"+a+"H"+n+"L0,"+i+"Z")}},"triangle-left":{n:7,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M"+a+",-"+n+"V"+n+"L-"+i+",0Z")}},"triangle-right":{n:8,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2/xm,2),a=$n(e/2,2),i=$n(e,2);return Ba(t,r,"M-"+a+",-"+n+"V"+n+"L"+i+",0Z")}},"triangle-ne":{n:9,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M-"+a+",-"+n+"H"+n+"V"+a+"Z")}},"triangle-se":{n:10,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M"+n+",-"+a+"V"+n+"H-"+a+"Z")}},"triangle-sw":{n:11,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M"+a+","+n+"H-"+n+"V-"+a+"Z")}},"triangle-nw":{n:12,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.6,2),a=$n(e*1.2,2);return Ba(t,r,"M-"+n+","+a+"V-"+n+"H"+a+"Z")}},pentagon:{n:13,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.951,2),a=$n(e*.588,2),i=$n(-e,2),o=$n(e*-.309,2),s=$n(e*.809,2);return Ba(t,r,"M"+n+","+o+"L"+a+","+s+"H-"+a+"L-"+n+","+o+"L0,"+i+"Z")}},hexagon:{n:14,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/2,2),i=$n(e*xm/2,2);return Ba(t,r,"M"+i+",-"+a+"V"+a+"L0,"+n+"L-"+i+","+a+"V-"+a+"L0,-"+n+"Z")}},hexagon2:{n:15,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/2,2),i=$n(e*xm/2,2);return Ba(t,r,"M-"+a+","+i+"H"+a+"L"+n+",0L"+a+",-"+i+"H-"+a+"L-"+n+",0Z")}},octagon:{n:16,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.924,2),a=$n(e*.383,2);return Ba(t,r,"M-"+a+",-"+n+"H"+a+"L"+n+",-"+a+"V"+a+"L"+a+","+n+"H-"+a+"L-"+n+","+a+"V-"+a+"Z")}},star:{n:17,f:function(e,t,r){if(qa(t))return za;var n=e*1.4,a=$n(n*.225,2),i=$n(n*.951,2),o=$n(n*.363,2),s=$n(n*.588,2),l=$n(-n,2),u=$n(n*-.309,2),c=$n(n*.118,2),f=$n(n*.809,2),v=$n(n*.382,2);return Ba(t,r,"M"+a+","+u+"H"+i+"L"+o+","+c+"L"+s+","+f+"L0,"+v+"L-"+s+","+f+"L-"+o+","+c+"L-"+i+","+u+"H-"+a+"L0,"+l+"Z")}},hexagram:{n:18,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.66,2),a=$n(e*.38,2),i=$n(e*.76,2);return Ba(t,r,"M-"+i+",0l-"+a+",-"+n+"h"+i+"l"+a+",-"+n+"l"+a+","+n+"h"+i+"l-"+a+","+n+"l"+a+","+n+"h-"+i+"l-"+a+","+n+"l-"+a+",-"+n+"h-"+i+"Z")}},"star-triangle-up":{n:19,f:function(e,t,r){if(qa(t))return za;var n=$n(e*xm*.8,2),a=$n(e*.8,2),i=$n(e*1.6,2),o=$n(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Ba(t,r,"M-"+n+","+a+s+n+","+a+s+"0,-"+i+s+"-"+n+","+a+"Z")}},"star-triangle-down":{n:20,f:function(e,t,r){if(qa(t))return za;var n=$n(e*xm*.8,2),a=$n(e*.8,2),i=$n(e*1.6,2),o=$n(e*4,2),s="A "+o+","+o+" 0 0 1 ";return Ba(t,r,"M"+n+",-"+a+s+"-"+n+",-"+a+s+"0,"+i+s+n+",-"+a+"Z")}},"star-square":{n:21,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.1,2),a=$n(e*2,2),i="A "+a+","+a+" 0 0 1 ";return Ba(t,r,"M-"+n+",-"+n+i+"-"+n+","+n+i+n+","+n+i+n+",-"+n+i+"-"+n+",-"+n+"Z")}},"star-diamond":{n:22,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2),a=$n(e*1.9,2),i="A "+a+","+a+" 0 0 1 ";return Ba(t,r,"M-"+n+",0"+i+"0,"+n+i+n+",0"+i+"0,-"+n+i+"-"+n+",0Z")}},"diamond-tall":{n:23,f:function(e,t,r){if(qa(t))return za;var n=$n(e*.7,2),a=$n(e*1.4,2);return Ba(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},"diamond-wide":{n:24,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2),a=$n(e*.7,2);return Ba(t,r,"M0,"+a+"L"+n+",0L0,-"+a+"L-"+n+",0Z")}},hourglass:{n:25,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"H-"+n+"L"+n+",-"+n+"H-"+n+"Z")},noDot:!0},bowtie:{n:26,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"V-"+n+"L-"+n+","+n+"V-"+n+"Z")},noDot:!0},"circle-cross":{n:27,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"circle-x":{n:28,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e/Lue,2);return Ba(t,r,"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a+"M"+n+",0A"+n+","+n+" 0 1,1 0,-"+n+"A"+n+","+n+" 0 0,1 "+n+",0Z")},needLine:!0,noDot:!0},"square-cross":{n:29,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"square-x":{n:30,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n+"M"+n+","+n+"H-"+n+"V-"+n+"H"+n+"Z")},needLine:!0,noDot:!0},"diamond-cross":{n:31,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM0,-"+n+"V"+n+"M-"+n+",0H"+n)},needLine:!0,noDot:!0},"diamond-x":{n:32,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.3,2),a=$n(e*.65,2);return Ba(t,r,"M"+n+",0L0,"+n+"L-"+n+",0L0,-"+n+"ZM-"+a+",-"+a+"L"+a+","+a+"M-"+a+","+a+"L"+a+",-"+a)},needLine:!0,noDot:!0},"cross-thin":{n:33,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"x-thin":{n:34,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n+"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},asterisk:{n:35,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*.85,2);return Ba(t,r,"M0,"+n+"V-"+n+"M"+n+",0H-"+n+"M"+a+","+a+"L-"+a+",-"+a+"M"+a+",-"+a+"L-"+a+","+a)},needLine:!0,noDot:!0,noFill:!0},hash:{n:36,f:function(e,t,r){if(qa(t))return za;var n=$n(e/2,2),a=$n(e,2);return Ba(t,r,"M"+n+","+a+"V-"+a+"M"+(n-a)+",-"+a+"V"+a+"M"+a+","+n+"H-"+a+"M-"+a+","+(n-a)+"H"+a)},needLine:!0,noFill:!0},"y-up":{n:37,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+n+","+i+"L0,0M"+n+","+i+"L0,0M0,-"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-down":{n:38,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+n+",-"+i+"L0,0M"+n+",-"+i+"L0,0M0,"+a+"L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-left":{n:39,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M"+i+","+n+"L0,0M"+i+",-"+n+"L0,0M-"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"y-right":{n:40,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.2,2),a=$n(e*1.6,2),i=$n(e*.8,2);return Ba(t,r,"M-"+i+","+n+"L0,0M-"+i+",-"+n+"L0,0M"+a+",0L0,0")},needLine:!0,noDot:!0,noFill:!0},"line-ew":{n:41,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M"+n+",0H-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ns":{n:42,f:function(e,t,r){if(qa(t))return za;var n=$n(e*1.4,2);return Ba(t,r,"M0,"+n+"V-"+n)},needLine:!0,noDot:!0,noFill:!0},"line-ne":{n:43,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+",-"+n+"L-"+n+","+n)},needLine:!0,noDot:!0,noFill:!0},"line-nw":{n:44,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2);return Ba(t,r,"M"+n+","+n+"L-"+n+",-"+n)},needLine:!0,noDot:!0,noFill:!0},"arrow-up":{n:45,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,noDot:!0},"arrow-down":{n:46,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M0,0L-"+n+",-"+a+"H"+n+"Z")},noDot:!0},"arrow-left":{n:47,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,0L"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-right":{n:48,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,0L-"+n+",-"+a+"V"+a+"Z")},noDot:!0},"arrow-bar-up":{n:49,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+","+a+"H"+n+"Z")},backoff:1,needLine:!0,noDot:!0},"arrow-bar-down":{n:50,f:function(e,t,r){if(qa(t))return za;var n=$n(e,2),a=$n(e*2,2);return Ba(t,r,"M-"+n+",0H"+n+"M0,0L-"+n+",-"+a+"H"+n+"Z")},needLine:!0,noDot:!0},"arrow-bar-left":{n:51,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,-"+a+"V"+a+"M0,0L"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},"arrow-bar-right":{n:52,f:function(e,t,r){if(qa(t))return za;var n=$n(e*2,2),a=$n(e,2);return Ba(t,r,"M0,-"+a+"V"+a+"M0,0L-"+n+",-"+a+"V"+a+"Z")},needLine:!0,noDot:!0},arrow:{n:53,f:function(e,t,r){if(qa(t))return za;var n=DB/2.5,a=2*e*RB(n),i=2*e*IB(n);return Ba(t,r,"M0,0L"+-a+","+i+"L"+a+","+i+"Z")},backoff:.9,noDot:!0},"arrow-wide":{n:54,f:function(e,t,r){if(qa(t))return za;var n=DB/4,a=2*e*RB(n),i=2*e*IB(n);return Ba(t,r,"M0,0L"+-a+","+i+"A "+2*e+","+2*e+" 0 0 1 "+a+","+i+"Z")},backoff:.4,noDot:!0}};function qa(e){return e===null}var Pue,Fue,Due,Rue;function Ba(e,t,r){if((!e||e%360===0)&&!t)return r;if(Due===e&&Rue===t&&Pue===r)return Fue;Due=e,Rue=t,Pue=r;function n(_,y){var C=RB(_),k=IB(_),S=y[0],L=y[1]+(t||0);return[S*C-L*k,S*k+L*C]}for(var a=e/180*DB,i=0,o=0,s=spt(r),l="",u=0;u{"use strict";var Gc=xi(),hs=Xt(),lpt=hs.numberFormat,_m=aa(),pk=bi(),Tc=ni(),upt=js(),fT=hs.strTranslate,gk=as(),cpt=Q0(),fpt=nc(),hpt=fpt.LINE_SPACING,Wue=Y1().DESELECTDIM,dpt=Is(),vpt=lT(),ppt=Sd().appendArrayPointValue,hi=rce.exports={};hi.font=function(e,t){var r=t.variant,n=t.style,a=t.weight,i=t.color,o=t.size,s=t.family,l=t.shadow,u=t.lineposition,c=t.textcase;s&&e.style("font-family",s),o+1&&e.style("font-size",o+"px"),i&&e.call(Tc.fill,i),a&&e.style("font-weight",a),n&&e.style("font-style",n),r&&e.style("font-variant",r),c&&e.style("text-transform",zB(mpt(c))),l&&e.style("text-shadow",l==="auto"?gk.makeTextShadow(Tc.contrast(i)):zB(l)),u&&e.style("text-decoration-line",zB(ypt(u)))};function zB(e){return e==="none"?void 0:e}var gpt={normal:"none",lower:"lowercase",upper:"uppercase","word caps":"capitalize"};function mpt(e){return gpt[e]}function ypt(e){return e.replace("under","underline").replace("over","overline").replace("through","line-through").split("+").join(" ")}hi.setPosition=function(e,t,r){e.attr("x",t).attr("y",r)};hi.setSize=function(e,t,r){e.attr("width",t).attr("height",r)};hi.setRect=function(e,t,r,n,a){e.call(hi.setPosition,t,r).call(hi.setSize,n,a)};hi.translatePoint=function(e,t,r,n){var a=r.c2p(e.x),i=n.c2p(e.y);if(_m(a)&&_m(i)&&t.node())t.node().nodeName==="text"?t.attr("x",a).attr("y",i):t.attr("transform",fT(a,i));else return!1;return!0};hi.translatePoints=function(e,t,r){e.each(function(n){var a=Gc.select(this);hi.translatePoint(n,a,t,r)})};hi.hideOutsideRangePoint=function(e,t,r,n,a,i){t.attr("display",r.isPtWithinRange(e,a)&&n.isPtWithinRange(e,i)?null:"none")};hi.hideOutsideRangePoints=function(e,t){if(t._hasClipOnAxisFalse){var r=t.xaxis,n=t.yaxis;e.each(function(a){var i=a[0].trace,o=i.xcalendar,s=i.ycalendar,l=pk.traceIs(i,"bar-like")?".bartext":".point,.textpoint";e.selectAll(l).each(function(u){hi.hideOutsideRangePoint(u,Gc.select(this),r,n,o,s)})})}};hi.crispRound=function(e,t,r){return!t||!_m(t)?r||0:e._context.staticPlot?t:t<1?1:Math.round(t)};hi.singleLineStyle=function(e,t,r,n,a){t.style("fill","none");var i=(((e||[])[0]||{}).trace||{}).line||{},o=r||i.width||0,s=a||i.dash||"";Tc.stroke(t,n||i.color),hi.dashLine(t,s,o)};hi.lineGroupStyle=function(e,t,r,n){e.style("fill","none").each(function(a){var i=(((a||[])[0]||{}).trace||{}).line||{},o=t||i.width||0,s=n||i.dash||"";Gc.select(this).call(Tc.stroke,r||i.color).call(hi.dashLine,s,o)})};hi.dashLine=function(e,t,r){r=+r||0,t=hi.dashStyle(t,r),e.style({"stroke-dasharray":t,"stroke-width":r+"px"})};hi.dashStyle=function(e,t){t=+t||1;var r=Math.max(t,3);return e==="solid"?e="":e==="dot"?e=r+"px,"+r+"px":e==="dash"?e=3*r+"px,"+3*r+"px":e==="longdash"?e=5*r+"px,"+5*r+"px":e==="dashdot"?e=3*r+"px,"+r+"px,"+r+"px,"+r+"px":e==="longdashdot"&&(e=5*r+"px,"+2*r+"px,"+r+"px,"+2*r+"px"),e};function Yue(e,t,r,n){var a=t.fillpattern,i=t.fillgradient,o=hi.getPatternAttr,s=a&&(o(a.shape,0,"")||o(a.path,0,""));if(s){var l=o(a.bgcolor,0,null),u=o(a.fgcolor,0,null),c=a.fgopacity,f=o(a.size,0,8),v=o(a.solidity,0,.3),g=t.uid;hi.pattern(e,"point",r,g,s,f,v,void 0,a.fillmode,l,u,c)}else if(i&&i.type!=="none"){var p=i.type,x="scatterfill-"+t.uid;if(n&&(x="legendfill-"+t.uid),!n&&(i.start!==void 0||i.stop!==void 0)){var _,y;p==="horizontal"?(_={x:i.start,y:0},y={x:i.stop,y:0}):p==="vertical"&&(_={x:0,y:i.start},y={x:0,y:i.stop}),_.x=t._xA.c2p(_.x===void 0?t._extremes.x.min[0].val:_.x,!0),_.y=t._yA.c2p(_.y===void 0?t._extremes.y.min[0].val:_.y,!0),y.x=t._xA.c2p(y.x===void 0?t._extremes.x.max[0].val:y.x,!0),y.y=t._yA.c2p(y.y===void 0?t._extremes.y.max[0].val:y.y,!0),e.call($ue,r,x,"linear",i.colorscale,"fill",_,y,!0,!1)}else p==="horizontal"&&(p=p+"reversed"),e.call(hi.gradient,r,x,p,i.colorscale,"fill")}else t.fillcolor&&e.call(Tc.fill,t.fillcolor)}hi.singleFillStyle=function(e,t){var r=Gc.select(e.node()),n=r.data(),a=((n[0]||[])[0]||{}).trace||{};Yue(e,a,t,!1)};hi.fillGroupStyle=function(e,t,r){e.style("stroke-width",0).each(function(n){var a=Gc.select(this);n[0].trace&&Yue(a,n[0].trace,t,r)})};var que=zue();hi.symbolNames=[];hi.symbolFuncs=[];hi.symbolBackOffs=[];hi.symbolNeedLines={};hi.symbolNoDot={};hi.symbolNoFill={};hi.symbolList=[];Object.keys(que).forEach(function(e){var t=que[e],r=t.n;hi.symbolList.push(r,String(r),e,r+100,String(r+100),e+"-open"),hi.symbolNames[r]=e,hi.symbolFuncs[r]=t.f,hi.symbolBackOffs[r]=t.backoff||0,t.needLine&&(hi.symbolNeedLines[r]=!0),t.noDot?hi.symbolNoDot[r]=!0:hi.symbolList.push(r+200,String(r+200),e+"-dot",r+300,String(r+300),e+"-open-dot"),t.noFill&&(hi.symbolNoFill[r]=!0)});var xpt=hi.symbolNames.length,_pt="M0,0.5L0.5,0L0,-0.5L-0.5,0Z";hi.symbolNumber=function(e){if(_m(e))e=+e;else if(typeof e=="string"){var t=0;e.indexOf("-open")>0&&(t=100,e=e.replace("-open","")),e.indexOf("-dot")>0&&(t+=200,e=e.replace("-dot","")),e=hi.symbolNames.indexOf(e),e>=0&&(e+=t)}return e%100>=xpt||e>=400?0:Math.floor(Math.max(e,0))};function Xue(e,t,r,n){var a=e%100;return hi.symbolFuncs[a](t,r,n)+(e>=200?_pt:"")}var Bue=lpt("~f"),Zue={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}};hi.gradient=function(e,t,r,n,a,i){var o=Zue[n];return $ue(e,t,r,o.type,a,i,o.start,o.stop,!1,o.reversed)};function $ue(e,t,r,n,a,i,o,s,l,u){var c=a.length,f;n==="linear"?f={node:"linearGradient",attrs:{x1:o.x,y1:o.y,x2:s.x,y2:s.y,gradientUnits:l?"userSpaceOnUse":"objectBoundingBox"},reversed:u}:n==="radial"&&(f={node:"radialGradient",reversed:u});for(var v=new Array(c),g=0;g=0&&e.i===void 0&&(e.i=i.i),t.style("opacity",n.selectedOpacityFn?n.selectedOpacityFn(e):e.mo===void 0?o.opacity:e.mo),n.ms2mrc){var l;e.ms==="various"||o.size==="various"?l=3:l=n.ms2mrc(e.ms),e.mrc=l,n.selectedSizeFn&&(l=e.mrc=n.selectedSizeFn(e));var u=hi.symbolNumber(e.mx||o.symbol)||0;e.om=u%200>=100;var c=GB(e,r),f=VB(e,r);t.attr("d",Xue(u,l,c,f))}var v=!1,g,p,x;if(e.so)x=s.outlierwidth,p=s.outliercolor,g=o.outliercolor;else{var _=(s||{}).width;x=(e.mlw+1||_+1||(e.trace?(e.trace.marker.line||{}).width:0)+1)-1||0,"mlc"in e?p=e.mlcc=n.lineScale(e.mlc):hs.isArrayOrTypedArray(s.color)?p=Tc.defaultLine:p=s.color,hs.isArrayOrTypedArray(o.color)&&(g=Tc.defaultLine,v=!0),"mc"in e?g=e.mcc=n.markerScale(e.mc):g=o.color||o.colors||"rgba(0,0,0,0)",n.selectedColorFn&&(g=n.selectedColorFn(e))}let y=e.mld||(s||{}).dash;if(y&&hi.dashLine(t,y,x),e.om)t.call(Tc.stroke,g).style({"stroke-width":(x||1)+"px",fill:"none"});else{t.style("stroke-width",(e.isBlank?0:x)+"px");var C=o.gradient,k=e.mgt;k?v=!0:k=C&&C.type,hs.isArrayOrTypedArray(k)&&(k=k[0],Zue[k]||(k=0));var S=o.pattern,L=hi.getPatternAttr,w=S&&(L(S.shape,e.i,"")||L(S.path,e.i,""));if(k&&k!=="none"){var A=e.mgc;A?v=!0:A=C.color;var T=r.uid;v&&(T+="-"+e.i),hi.gradient(t,a,T,k,[[0,A],[1,g]],"fill")}else if(w){var m=!1,F=S.fgcolor;!F&&i&&i.color&&(F=i.color,m=!0);var E=L(F,e.i,i&&i.color||null),I=L(S.bgcolor,e.i,null),R=S.fgopacity,B=L(S.size,e.i,8),O=L(S.solidity,e.i,.3);m=m||e.mcc||hs.isArrayOrTypedArray(S.shape)||hs.isArrayOrTypedArray(S.path)||hs.isArrayOrTypedArray(S.bgcolor)||hs.isArrayOrTypedArray(S.fgcolor)||hs.isArrayOrTypedArray(S.size)||hs.isArrayOrTypedArray(S.solidity);var V=r.uid;m&&(V+="-"+e.i),hi.pattern(t,"point",a,V,w,B,O,e.mcc,S.fillmode,I,E,R)}else hs.isArrayOrTypedArray(g)?Tc.fill(t,g[e.i]):Tc.fill(t,g);x&&Tc.stroke(t,p)}};hi.makePointStyleFns=function(e){var t={},r=e.marker;return t.markerScale=hi.tryColorscale(r,""),t.lineScale=hi.tryColorscale(r,"line"),pk.traceIs(e,"symbols")&&(t.ms2mrc=dpt.isBubble(e)?vpt(e):function(){return(r.size||6)/2}),e.selectedpoints&&hs.extendFlat(t,hi.makeSelectedPointStyleFns(e)),t};hi.makeSelectedPointStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.marker||{},i=r.marker||{},o=n.marker||{},s=a.opacity,l=i.opacity,u=o.opacity,c=l!==void 0,f=u!==void 0;(hs.isArrayOrTypedArray(s)||c||f)&&(t.selectedOpacityFn=function(S){var L=S.mo===void 0?a.opacity:S.mo;return S.selected?c?l:L:f?u:Wue*L});var v=a.color,g=i.color,p=o.color;(g||p)&&(t.selectedColorFn=function(S){var L=S.mcc||v;return S.selected?g||L:p||L});var x=a.size,_=i.size,y=o.size,C=_!==void 0,k=y!==void 0;return pk.traceIs(e,"symbols")&&(C||k)&&(t.selectedSizeFn=function(S){var L=S.mrc||x/2;return S.selected?C?_/2:L:k?y/2:L}),t};hi.makeSelectedTextStyleFns=function(e){var t={},r=e.selected||{},n=e.unselected||{},a=e.textfont||{},i=r.textfont||{},o=n.textfont||{},s=a.color,l=i.color,u=o.color;return t.selectedTextColorFn=function(c){var f=c.tc||s;return c.selected?l||f:u||(l?f:Tc.addOpacity(f,Wue))},t};hi.selectedPointStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=hi.makeSelectedPointStyleFns(t),n=t.marker||{},a=[];r.selectedOpacityFn&&a.push(function(i,o){i.style("opacity",r.selectedOpacityFn(o))}),r.selectedColorFn&&a.push(function(i,o){Tc.fill(i,r.selectedColorFn(o))}),r.selectedSizeFn&&a.push(function(i,o){var s=o.mx||n.symbol||0,l=r.selectedSizeFn(o);i.attr("d",Xue(hi.symbolNumber(s),l,GB(o,t),VB(o,t))),o.mrc2=l}),a.length&&e.each(function(i){for(var o=Gc.select(this),s=0;s0?r:0}hi.textPointStyle=function(e,t,r){if(e.size()){var n;if(t.selectedpoints){var a=hi.makeSelectedTextStyleFns(t);n=a.selectedTextColorFn}var i=t.texttemplate,o=r._fullLayout;e.each(function(s){var l=Gc.select(this),u=i?hs.extractOption(s,t,"txt","texttemplate"):hs.extractOption(s,t,"tx","text");if(!u&&u!==0){l.remove();return}if(i){var c=t._module.formatLabels,f=c?c(s,t,o):{},v={};ppt(v,t,s.i),u=hs.texttemplateString({data:[v,s,t._meta],fallback:t.texttemplatefallback,labels:f,locale:o._d3locale,template:u})}var g=s.tp||t.textposition,p=Jue(s,t),x=n?n(s):s.tc||t.textfont.color;l.call(hi.font,{family:s.tf||t.textfont.family,weight:s.tw||t.textfont.weight,style:s.ty||t.textfont.style,variant:s.tv||t.textfont.variant,textcase:s.tC||t.textfont.textcase,lineposition:s.tE||t.textfont.lineposition,shadow:s.tS||t.textfont.shadow,size:p,color:x}).text(u).call(gk.convertToTspans,r).call(Kue,g,p,s.mrc)})}};hi.selectedTextStyle=function(e,t){if(!(!e.size()||!t.selectedpoints)){var r=hi.makeSelectedTextStyleFns(t);e.each(function(n){var a=Gc.select(this),i=r.selectedTextColorFn(n),o=n.tp||t.textposition,s=Jue(n,t);Tc.fill(a,i);var l=pk.traceIs(t,"bar-like");Kue(a,o,s,n.mrc2||n.mrc,l)})}};var Oue=.5;hi.smoothopen=function(e,t){if(e.length<3)return"M"+e.join("L");var r="M"+e[0],n=[],a;for(a=1;a=l||S>=c&&S<=l)&&(L<=f&&L>=u||L>=f&&L<=u)&&(e=[S,L])}return e}hi.applyBackoff=tce;hi.makeTester=function(){var e=hs.ensureSingleById(Gc.select("body"),"svg","js-plotly-tester",function(r){r.attr(cpt.svgAttrs).style({position:"absolute",left:"-10000px",top:"-10000px",width:"9000px",height:"9000px","z-index":"1"})}),t=hs.ensureSingle(e,"path","js-reference-point",function(r){r.attr("d","M0,0H1V1H0Z").style({"stroke-width":0,fill:"black"})});hi.tester=e,hi.testref=t};hi.savedBBoxes={};var BB=0,Tpt=1e4;hi.bBox=function(e,t,r){r||(r=Nue(e));var n;if(r){if(n=hi.savedBBoxes[r],n)return hs.extendFlat({},n)}else if(e.childNodes.length===1){var a=e.childNodes[0];if(r=Nue(a),r){var i=+a.getAttribute("x")||0,o=+a.getAttribute("y")||0,s=a.getAttribute("transform");if(!s){var l=hi.bBox(a,!1,r);return i&&(l.left+=i,l.right+=i),o&&(l.top+=o,l.bottom+=o),l}if(r+="~"+i+"~"+o+"~"+s,n=hi.savedBBoxes[r],n)return hs.extendFlat({},n)}}var u,c;t?u=e:(c=hi.tester.node(),u=e.cloneNode(!0),c.appendChild(u)),Gc.select(u).attr("transform",null).call(gk.positionText,0,0);var f=u.getBoundingClientRect(),v=hi.testref.node().getBoundingClientRect();t||c.removeChild(u);var g={height:f.height,width:f.width,left:f.left-v.left,top:f.top-v.top,right:f.right-v.left,bottom:f.bottom-v.top};return BB>=Tpt&&(hi.savedBBoxes={},BB=0),r&&(hi.savedBBoxes[r]=g),BB++,hs.extendFlat({},g)};function Nue(e){var t=e.getAttribute("data-unformatted");if(t!==null)return t+e.getAttribute("data-math")+e.getAttribute("text-anchor")+e.getAttribute("style")}hi.setClipUrl=function(e,t,r){e.attr("clip-path",UB(t,r))};function UB(e,t){if(!e)return null;var r=t._context,n=r._exportedPlot?"":r._baseUrl||"";return n?"url('"+n+"#"+e+"')":"url(#"+e+")"}hi.getTranslate=function(e){var t=/.*\btranslate\((-?\d*\.?\d*)[^-\d]*(-?\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",a=n.replace(t,function(i,o,s){return[o,s].join(" ")}).split(" ");return{x:+a[0]||0,y:+a[1]||0}};hi.setTranslate=function(e,t,r){var n=/(\btranslate\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return t=t||0,r=r||0,o=o.replace(n,"").trim(),o+=fT(t,r),o=o.trim(),e[i]("transform",o),o};hi.getScale=function(e){var t=/.*\bscale\((\d*\.?\d*)[^\d]*(\d*\.?\d*)[^\d].*/,r=e.attr?"attr":"getAttribute",n=e[r]("transform")||"",a=n.replace(t,function(i,o,s){return[o,s].join(" ")}).split(" ");return{x:+a[0]||1,y:+a[1]||1}};hi.setScale=function(e,t,r){var n=/(\bscale\(.*?\);?)/,a=e.attr?"attr":"getAttribute",i=e.attr?"attr":"setAttribute",o=e[a]("transform")||"";return t=t||1,r=r||1,o=o.replace(n,"").trim(),o+="scale("+t+","+r+")",o=o.trim(),e[i]("transform",o),o};var Apt=/\s*sc.*/;hi.setPointGroupScale=function(e,t,r){if(t=t||1,r=r||1,!!e){var n=t===1&&r===1?"":"scale("+t+","+r+")";e.each(function(){var a=(this.getAttribute("transform")||"").replace(Apt,"");a+=n,a=a.trim(),this.setAttribute("transform",a)})}};var Mpt=/translate\([^)]*\)\s*$/;hi.setTextPointsScale=function(e,t,r){e&&e.each(function(){var n,a=Gc.select(this),i=a.select("text");if(i.node()){var o=parseFloat(i.attr("x")||0),s=parseFloat(i.attr("y")||0),l=(a.attr("transform")||"").match(Mpt);t===1&&r===1?n=[]:n=[fT(o,s),"scale("+t+","+r+")",fT(-o,-s)],l&&n.push(l),a.attr("transform",n.join(""))}})};function VB(e,t){var r;return e&&(r=e.mf),r===void 0&&(r=t.marker&&t.marker.standoff||0),!t._geo&&!t._xA?-r:r}hi.getMarkerStandoff=VB;var cT=Math.atan2,Dx=Math.cos,Hb=Math.sin;function Uue(e,t){var r=t[0],n=t[1];return[r*Dx(e)-n*Hb(e),r*Hb(e)+n*Dx(e)]}var Vue,Gue,Hue,jue,OB,NB;function GB(e,t){var r=e.ma;r===void 0&&(r=t.marker.angle,(!_m(r)||hs.isArrayOrTypedArray(r))&&(r=0));var n,a,i=t.marker.angleref;if(i==="previous"||i==="north"){if(t._geo){var o=t._geo.project(e.lonlat);n=o[0],a=o[1]}else{var s=t._xA,l=t._yA;if(s&&l)n=s.c2p(e.x),a=l.c2p(e.y);else return 90}if(t._geo){var u=e.lonlat[0],c=e.lonlat[1],f=t._geo.project([u,c+1e-5]),v=t._geo.project([u+1e-5,c]),g=cT(v[1]-a,v[0]-n),p=cT(f[1]-a,f[0]-n),x;if(i==="north")x=r/180*Math.PI;else if(i==="previous"){var _=u/180*Math.PI,y=c/180*Math.PI,C=Vue/180*Math.PI,k=Gue/180*Math.PI,S=C-_,L=Dx(k)*Hb(S),w=Hb(k)*Dx(y)-Dx(k)*Hb(y)*Dx(S);x=-cT(L,w)-Math.PI,Vue=u,Gue=c}var A=Uue(g,[Dx(x),0]),T=Uue(p,[Hb(x),0]);r=cT(A[1]+T[1],A[0]+T[0])/Math.PI*180,i==="previous"&&!(NB===t.uid&&e.i===OB+1)&&(r=null)}if(i==="previous"&&!t._geo)if(NB===t.uid&&e.i===OB+1&&_m(n)&&_m(a)){var m=n-Hue,F=a-jue,E=t.line&&t.line.shape||"",I=E.slice(E.length-1);I==="h"&&(F=0),I==="v"&&(m=0),r+=cT(F,m)/Math.PI*180+90}else r=null}return Hue=n,jue=a,OB=e.i,NB=t.uid,r}hi.getMarkerAngle=GB});var qx=fe((Ddr,oce)=>{"use strict";var jb=xi(),Spt=aa(),Ept=Hs(),HB=bi(),zx=Xt(),nce=zx.strTranslate,mk=ea(),yk=ni(),Wb=as(),ice=Y1(),kpt=nc().OPPOSITE_SIDE,ace=/ [XY][0-9]* /,jB=1.6,WB=1.6;function Cpt(e,t,r){var n=e._fullLayout,a=r.propContainer,i=r.propName,o=r.placeholder,s=r.traceIndex,l=r.avoid||{},u=r.attributes,c=r.transform,f=r.containerGroup,v=1,g=a.title,p=(g&&g.text?g.text:"").trim(),x=!1,_=g&&g.font?g.font:{},y=_.family,C=_.size,k=_.color,S=_.weight,L=_.style,w=_.variant,A=_.textcase,T=_.lineposition,m=_.shadow,F=r.subtitlePropName,E=!!F,I=r.subtitlePlaceholder,R=(a.title||{}).subtitle||{text:"",font:{}},B=(R.text||"").trim(),O=!1,V=1,j=R.font,q=j.family,U=j.size,J=j.color,ee=j.weight,ce=j.style,ye=j.variant,xe=j.textcase,ue=j.lineposition,K=j.shadow,_e;i==="title.text"?_e="titleText":i.indexOf("axis")!==-1?_e="axisTitleText":i.indexOf("colorbar")!==-1&&(_e="colorbarTitleText");var ne=e._context.edits[_e];function ae(et,qe){return et===void 0||qe===void 0?!1:et.replace(ace," % ")===qe.replace(ace," % ")}p===""?v=0:ae(p,o)&&(ne||(p=""),v=.2,x=!0),E&&(B===""?V=0:ae(B,I)&&(ne||(B=""),V=.2,O=!0)),r._meta?p=zx.templateString(p,r._meta):n._meta&&(p=zx.templateString(p,n._meta));var pe=p||B||ne,ie;f||(f=zx.ensureSingle(n._infolayer,"g","g-"+t),ie=n._hColorbarMoveTitle);var le=f.selectAll("text."+t).data(pe?[0]:[]);le.enter().append("text"),le.text(p).attr("class",t),le.exit().remove();var me=null,be=t+"-subtitle",De=B||ne;if(E&&(me=f.selectAll("text."+be).data(De?[0]:[]),me.enter().append("text"),me.text(B).attr("class",be),me.exit().remove()),!pe)return f;function Ge(et,qe){zx.syncOrAsync([ht,it],{title:et,subtitle:qe})}function ht(et){var qe=et.title,we=et.subtitle,Le;!c&&ie&&(c={}),c?(Le="",c.rotate&&(Le+="rotate("+[c.rotate,u.x,u.y]+")"),(c.offset||ie)&&(Le+=nce(0,(c.offset||0)-(ie||0)))):Le=null,qe.attr("transform",Le);function Ke(nt){if(nt){var We=jb.select(nt.node().parentNode).select("."+be);if(!We.empty()){var mt=nt.node().getBBox();if(mt.height){var bt=mt.y+mt.height+jB*U;We.attr("y",bt)}}}}if(qe.style("opacity",v*yk.opacity(k)).call(mk.font,{color:yk.rgb(k),size:jb.round(C,2),family:y,weight:S,style:L,variant:w,textcase:A,shadow:m,lineposition:T}).attr(u).call(Wb.convertToTspans,e,Ke),we&&!we.empty()){var Te=f.select("."+t+"-math-group"),Ve=qe.node().getBBox(),$e=Te.node()?Te.node().getBBox():void 0,ot=$e?$e.y+$e.height+jB*U:Ve.y+Ve.height+WB*U,tt=zx.extendFlat({},u,{y:ot});we.attr("transform",Le),we.style("opacity",V*yk.opacity(J)).call(mk.font,{color:yk.rgb(J),size:jb.round(U,2),family:q,weight:ee,style:ce,variant:ye,textcase:xe,shadow:K,lineposition:ue}).attr(tt).call(Wb.convertToTspans,e)}return Ept.previousPromises(e)}function it(et){var qe=et.title,we=jb.select(qe.node().parentNode);if(l&&l.selection&&l.side&&p){we.attr("transform",null);var Le=kpt[l.side],Ke=l.side==="left"||l.side==="top"?-1:1,Te=Spt(l.pad)?l.pad:2,Ve=mk.bBox(we.node()),$e={t:0,b:0,l:0,r:0},ot=e._fullLayout._reservedMargin;for(var tt in ot)for(var nt in ot[tt]){var We=ot[tt][nt];$e[nt]=Math.max($e[nt],We)}var mt={left:$e.l,top:$e.t,right:n.width-$e.r,bottom:n.height-$e.b},bt=l.maxShift||Ke*(mt[l.side]-Ve[l.side]),Yt=0;if(bt<0)Yt=bt;else{var jt=l.offsetLeft||0,mr=l.offsetTop||0;Ve.left-=jt,Ve.right-=jt,Ve.top-=mr,Ve.bottom-=mr,l.selection.each(function(){var fr=mk.bBox(this);zx.bBoxIntersect(Ve,fr,Te)&&(Yt=Math.max(Yt,Ke*(fr[l.side]-Ve[Le])+Te))}),Yt=Math.min(bt,Yt),a._titleScoot=Math.abs(Yt)}if(Yt>0||bt<0){var or={left:[-Yt,0],right:[Yt,0],top:[0,-Yt],bottom:[0,Yt]}[l.side];we.attr("transform",nce(or[0],or[1]))}}}le.call(Ge,me);function Oe(et,qe){et.text(qe).on("mouseover.opacity",function(){jb.select(this).transition().duration(ice.SHOW_PLACEHOLDER).style("opacity",1)}).on("mouseout.opacity",function(){jb.select(this).transition().duration(ice.HIDE_PLACEHOLDER).style("opacity",0)})}if(ne&&(p?le.on(".opacity",null):(Oe(le,o),x=!0),le.call(Wb.makeEditable,{gd:e}).on("edit",function(et){s!==void 0?HB.call("_guiRestyle",e,i,et,s):HB.call("_guiRelayout",e,i,et)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(et){this.text(et||" ").call(Wb.positionText,u.x,u.y)}),E)){if(E&&!p){var ze=le.node().getBBox(),ct=ze.y+ze.height+WB*U;me.attr("y",ct)}B?me.on(".opacity",null):(Oe(me,I),O=!0),me.call(Wb.makeEditable,{gd:e}).on("edit",function(et){HB.call("_guiRelayout",e,"title.subtitle.text",et)}).on("cancel",function(){this.text(this.attr("data-unformatted")).call(Ge)}).on("input",function(et){this.text(et||" ").call(Wb.positionText,me.attr("x"),me.attr("y"))})}return le.classed("js-placeholder",x),me&&!me.empty()&&me.classed("js-placeholder",O),f}oce.exports={draw:Cpt,SUBTITLE_PADDING_EM:WB,SUBTITLE_PADDING_MATHJAX_EM:jB}});var Hp=fe((Rdr,fce)=>{"use strict";var Lpt=xi(),Ppt=lb().utcFormat,zs=Xt(),Fpt=zs.numberFormat,Vp=aa(),bm=zs.cleanNumber,Dpt=zs.ms2DateTime,sce=zs.dateTime2ms,Gp=zs.ensureNumber,lce=zs.isArrayOrTypedArray,wm=Wa(),xk=wm.FP_SAFE,tp=wm.BADNUM,Rpt=wm.LOG_CLIP,Ipt=wm.ONEWEEK,_k=wm.ONEDAY,bk=wm.ONEHOUR,uce=wm.ONEMIN,cce=wm.ONESEC,wk=El(),Mk=rc(),Tk=Mk.HOUR_PATTERN,Ak=Mk.WEEKDAY_PATTERN;function hT(e){return Math.pow(10,e)}function YB(e){return e!=null}fce.exports=function(t,r){r=r||{};var n=t._id||"x",a=n.charAt(0);function i(S,L){if(S>0)return Math.log(S)/Math.LN10;if(S<=0&&L&&t.range&&t.range.length===2){var w=t.range[0],A=t.range[1];return .5*(w+A-2*Rpt*Math.abs(w-A))}else return tp}function o(S,L,w,A){if((A||{}).msUTC&&Vp(S))return+S;var T=sce(S,w||t.calendar);if(T===tp)if(Vp(S)){S=+S;var m=Math.floor(zs.mod(S+.05,1)*10),F=Math.round(S-m/10);T=sce(new Date(F))+m/10}else return tp;return T}function s(S,L,w){return Dpt(S,L,w||t.calendar)}function l(S){return t._categories[Math.round(S)]}function u(S){if(YB(S)){if(t._categoriesMap===void 0&&(t._categoriesMap={}),t._categoriesMap[S]!==void 0)return t._categoriesMap[S];t._categories.push(typeof S=="number"?String(S):S);var L=t._categories.length-1;return t._categoriesMap[S]=L,L}return tp}function c(S,L){for(var w=new Array(L),A=0;At.range[1]&&(w=!w);for(var A=w?-1:1,T=A*S,m=0,F=0;FI)m=F+1;else{m=T<(E+I)/2?F:F+1;break}}var R=t._B[m]||0;return isFinite(R)?p(S,t._m2,R):0},y=function(S){var L=t._rangebreaks.length;if(!L)return x(S,t._m,t._b);for(var w=0,A=0;At._rangebreaks[A].pmax&&(w=A+1);return x(S,t._m2,t._B[w])}}t.c2l=t.type==="log"?i:Gp,t.l2c=t.type==="log"?hT:Gp,t.l2p=_,t.p2l=y,t.c2p=t.type==="log"?function(S,L){return _(i(S,L))}:_,t.p2c=t.type==="log"?function(S){return hT(y(S))}:y,["linear","-"].indexOf(t.type)!==-1?(t.d2r=t.r2d=t.d2c=t.r2c=t.d2l=t.r2l=bm,t.c2d=t.c2r=t.l2d=t.l2r=Gp,t.d2p=t.r2p=function(S){return t.l2p(bm(S))},t.p2d=t.p2r=y,t.cleanPos=Gp):t.type==="log"?(t.d2r=t.d2l=function(S,L){return i(bm(S),L)},t.r2d=t.r2c=function(S){return hT(bm(S))},t.d2c=t.r2l=bm,t.c2d=t.l2r=Gp,t.c2r=i,t.l2d=hT,t.d2p=function(S,L){return t.l2p(t.d2r(S,L))},t.p2d=function(S){return hT(y(S))},t.r2p=function(S){return t.l2p(bm(S))},t.p2r=y,t.cleanPos=Gp):t.type==="date"?(t.d2r=t.r2d=zs.identity,t.d2c=t.r2c=t.d2l=t.r2l=o,t.c2d=t.c2r=t.l2d=t.l2r=s,t.d2p=t.r2p=function(S,L,w){return t.l2p(o(S,0,w))},t.p2d=t.p2r=function(S,L,w){return s(y(S),L,w)},t.cleanPos=function(S){return zs.cleanDate(S,tp,t.calendar)}):t.type==="category"?(t.d2c=t.d2l=u,t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=v,t.r2c=function(S){var L=g(S);return L!==void 0?L:t.fraction2r(.5)},t.l2r=t.c2r=Gp,t.r2l=g,t.d2p=function(S){return t.l2p(t.r2c(S))},t.p2d=function(S){return l(y(S))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(S){return typeof S=="string"&&S!==""?S:Gp(S)}):t.type==="multicategory"&&(t.r2d=t.c2d=t.l2d=l,t.d2r=t.d2l_noadd=v,t.r2c=function(S){var L=v(S);return L!==void 0?L:t.fraction2r(.5)},t.r2c_just_indices=f,t.l2r=t.c2r=Gp,t.r2l=v,t.d2p=function(S){return t.l2p(t.r2c(S))},t.p2d=function(S){return l(y(S))},t.r2p=t.d2p,t.p2r=y,t.cleanPos=function(S){return Array.isArray(S)||typeof S=="string"&&S!==""?S:Gp(S)},t.setupMultiCategory=function(S){var L=t._traceIndices,w,A,T=t._matchGroup;if(T&&t._categories.length===0){for(var m in T)if(m!==n){var F=r[wk.id2name(m)];L=L.concat(F._traceIndices)}}var E=[[0,{}],[0,{}]],I=[];for(w=0;wF[1]&&(A[m?0:1]=w,T[1]=F[1]),T[0]>=T[1])if(L!==void 0){var E=F[0]+1;w!==void 0&&(E=Math.min(E,F[1])),A[m?0:1]=t.l2r(E)}else w!==void 0&&(A[m?1:0]=t.l2r(F[1]-1))}},t.cleanRange=function(S,L){t._cleanRange(S,L),t.limitRange(S)},t._cleanRange=function(S,L){L||(L={}),S||(S="range");var w=zs.nestedProperty(t,S).get(),A,T;if(t.type==="date"?T=zs.dfltRange(t.calendar):a==="y"?T=Mk.DFLTRANGEY:t._name==="realaxis"?T=[0,1]:T=L.dfltRange||Mk.DFLTRANGEX,T=T.slice(),(t.rangemode==="tozero"||t.rangemode==="nonnegative")&&(T[0]=0),!w||w.length!==2){zs.nestedProperty(t,S).set(T);return}var m=w[0]===null,F=w[1]===null;for(t.type==="date"&&!t.autorange&&(w[0]=zs.cleanDate(w[0],tp,t.calendar),w[1]=zs.cleanDate(w[1],tp,t.calendar)),A=0;A<2;A++)if(t.type==="date"){if(!zs.isDateTime(w[A],t.calendar)){t[S]=T;break}if(t.r2l(w[0])===t.r2l(w[1])){var E=zs.constrain(t.r2l(w[0]),zs.MIN_MS+1e3,zs.MAX_MS-1e3);w[0]=t.l2r(E-1e3),w[1]=t.l2r(E+1e3);break}}else{if(!Vp(w[A]))if(!(m||F)&&Vp(w[1-A]))w[A]=w[1-A]*(A?10:.1);else{t[S]=T;break}if(w[A]<-xk?w[A]=-xk:w[A]>xk&&(w[A]=xk),w[0]===w[1]){var I=Math.max(1,Math.abs(w[0]*1e-6));w[0]-=I,w[1]+=I}}},t.setScale=function(S){var L=r._size;if(t.overlaying){var w=wk.getFromId({_fullLayout:r},t.overlaying);t.domain=w.domain}var A=S&&t._r?"_r":"range",T=t.calendar;t.cleanRange(A);var m=t.r2l(t[A][0],T),F=t.r2l(t[A][1],T),E=a==="y";if(E?(t._offset=L.t+(1-t.domain[1])*L.h,t._length=L.h*(t.domain[1]-t.domain[0]),t._m=t._length/(m-F),t._b=-t._m*F):(t._offset=L.l+t.domain[0]*L.w,t._length=L.w*(t.domain[1]-t.domain[0]),t._m=t._length/(F-m),t._b=-t._m*m),t._rangebreaks=[],t._lBreaks=0,t._m2=0,t._B=[],t.rangebreaks){var I,R;if(t._rangebreaks=t.locateBreaks(Math.min(m,F),Math.max(m,F)),t._rangebreaks.length){for(I=0;IF&&(B=!B),B&&t._rangebreaks.reverse();var O=B?-1:1;for(t._m2=O*t._length/(Math.abs(F-m)-t._lBreaks),t._B.push(-t._m2*(E?F:m)),I=0;IT&&(T+=7,mT&&(T+=24,m=A&&m=A&&S=K.min&&(ceK.max&&(K.max=ye),xe=!1)}xe&&F.push({min:ce,max:ye})}};for(w=0;w{"use strict";var hce=aa(),XB=Xt(),zpt=Wa().BADNUM,Sk=XB.isArrayOrTypedArray,qpt=XB.isDateTime,Bpt=XB.cleanNumber,dce=Math.round;pce.exports=function(t,r,n){var a=t,i=n.noMultiCategory;if(Sk(a)&&!a.length)return"-";if(!i&&Gpt(a))return"multicategory";if(i&&Array.isArray(a[0])){for(var o=[],s=0;si*2}function vce(e){return Math.max(1,(e-1)/1e3)}function Vpt(e,t){for(var r=e.length,n=vce(r),a=0,i=0,o={},s=0;sa*2}function Gpt(e){return Sk(e[0])&&Sk(e[1])}});var rp=fe((zdr,Tce)=>{"use strict";var Hpt=xi(),xce=aa(),Tm=Xt(),Ek=Wa().FP_SAFE,jpt=bi(),Wpt=ea(),_ce=El(),Ypt=_ce.getFromId,Xpt=_ce.isLinked;Tce.exports={applyAutorangeOptions:wce,getAutoRange:ZB,makePadFn:$B,doAutoRange:$pt,findExtremes:Kpt,concatExtremes:QB};function ZB(e,t){var r,n,a=[],i=e._fullLayout,o=$B(i,t,0),s=$B(i,t,1),l=QB(e,t),u=l.min,c=l.max;if(u.length===0||c.length===0)return Tm.simpleMap(t.range,t.r2l);var f=u[0].val,v=c[0].val;for(r=1;r0&&(F=k-o(w)-s(A),F>S?E/F>L&&(T=w,m=A,L=E/F):E/k>L&&(T={val:w.val,nopad:1},m={val:A.val,nopad:1},L=E/k));function I(j,q){return Math.max(j,s(q))}if(f===v){var R=f-1,B=f+1;if(y)if(f===0)a=[0,1];else{var O=(f>0?c:u).reduce(I,0),V=f/(1-Math.min(.5,O/k));a=f>0?[0,V]:[V,0]}else C?a=[Math.max(0,R),Math.max(1,B)]:a=[R,B]}else y?(T.val>=0&&(T={val:0,nopad:1}),m.val<=0&&(m={val:0,nopad:1})):C&&(T.val-L*o(T)<0&&(T={val:0,nopad:1}),m.val<=0&&(m={val:1,nopad:1})),L=(m.val-T.val-gce(t,w.val,A.val))/(k-o(T)-s(m)),a=[T.val-L*o(T),m.val+L*s(m)];return a=wce(a,t),t.limitRange&&t.limitRange(),p&&a.reverse(),Tm.simpleMap(a,t.l2r||Number)}function gce(e,t,r){var n=0;if(e.rangebreaks)for(var a=e.locateBreaks(t,r),i=0;i0?r.ppadplus:r.ppadminus)||r.ppad||0),w=S((e._m>0?r.ppadminus:r.ppadplus)||r.ppad||0),A=S(r.vpadplus||r.vpad),T=S(r.vpadminus||r.vpad);if(!u){if(C=1/0,k=-1/0,l)for(f=0;f0&&(C=v),v>k&&v-Ek&&(C=v),v>k&&v=E;f--)F(f);return{min:n,max:a,opts:r}}function KB(e,t,r,n){bce(e,t,r,n,Jpt)}function JB(e,t,r,n){bce(e,t,r,n,Qpt)}function bce(e,t,r,n,a){for(var i=n.tozero,o=n.extrapad,s=!0,l=0;l=r&&(u.extrapad||!o)){s=!1;break}else a(t,u.val)&&u.pad<=r&&(o||!u.extrapad)&&(e.splice(l,1),l--)}if(s){var c=i&&t===0;e.push({val:t,pad:c?0:r,extrapad:c?!1:o})}}function yce(e){return xce(e)&&Math.abs(e)=t}function e1t(e,t){var r=t.autorangeoptions;return r&&r.minallowed!==void 0&&kk(t,r.minallowed,r.maxallowed)?r.minallowed:r&&r.clipmin!==void 0&&kk(t,r.clipmin,r.clipmax)?Math.max(e,t.d2l(r.clipmin)):e}function t1t(e,t){var r=t.autorangeoptions;return r&&r.maxallowed!==void 0&&kk(t,r.minallowed,r.maxallowed)?r.maxallowed:r&&r.clipmax!==void 0&&kk(t,r.clipmin,r.clipmax)?Math.min(e,t.d2l(r.clipmax)):e}function kk(e,t,r){return t!==void 0&&r!==void 0?(t=e.d2l(t),r=e.d2l(r),t=l&&(i=l,r=l),o<=l&&(o=l,n=l)}}return r=e1t(r,t),n=t1t(n,t),[r,n]}});var Yi=fe((Bdr,Wce)=>{"use strict";var tv=xi(),Du=aa(),Xb=Hs(),vT=bi(),ga=Xt(),Zb=ga.strTranslate,Bx=as(),r1t=qx(),pT=ni(),M0=ea(),n1t=pf(),Ace=TB(),qdr=rc(),Xf=Wa(),i1t=Xf.ONEMAXYEAR,Pk=Xf.ONEAVGYEAR,Fk=Xf.ONEMINYEAR,a1t=Xf.ONEMAXQUARTER,nO=Xf.ONEAVGQUARTER,Dk=Xf.ONEMINQUARTER,o1t=Xf.ONEMAXMONTH,$b=Xf.ONEAVGMONTH,Rk=Xf.ONEMINMONTH,S0=Xf.ONEWEEK,Qh=Xf.ONEDAY,Am=Qh/2,Wp=Xf.ONEHOUR,gT=Xf.ONEMIN,Ik=Xf.ONESEC,s1t=Xf.ONEMILLI,l1t=Xf.ONEMICROSEC,Ox=Xf.MINUS_SIGN,qk=Xf.BADNUM,iO={K:"zeroline"},aO={K:"gridline",L:"path"},oO={K:"minor-gridline",L:"path"},Ice={K:"tick",L:"path"},Mce={K:"tick",L:"text"},Sce={width:["x","r","l","xl","xr"],height:["y","t","b","yt","yb"],right:["r","xr"],left:["l","xl"],top:["t","yt"],bottom:["b","yb"]},Bk=nc(),dT=Bk.MID_SHIFT,Nx=Bk.CAP_SHIFT,mT=Bk.LINE_SPACING,u1t=Bk.OPPOSITE_SIDE,zk=3,Rn=Wce.exports={};Rn.setConvert=Hp();var c1t=Yb(),Yp=El(),f1t=Yp.idSort,h1t=Yp.isLinked;Rn.id2name=Yp.id2name;Rn.name2id=Yp.name2id;Rn.cleanId=Yp.cleanId;Rn.list=Yp.list;Rn.listIds=Yp.listIds;Rn.getFromId=Yp.getFromId;Rn.getFromTrace=Yp.getFromTrace;var zce=rp();Rn.getAutoRange=zce.getAutoRange;Rn.findExtremes=zce.findExtremes;var d1t=1e-4;function cO(e){var t=(e[1]-e[0])*d1t;return[e[0]-t,e[1]+t]}function v1t(e,t,r){if(![r,e,t].every(Du)||r===0)return e;let n=Math.round((e-t)/r),a=t+n*r;return e!==a&&Math.abs(e-a)v+" domain")),l=l.concat(i||[]),c.length>o?(ga.warn("Array attribute "+u+" has more entries than expected, truncating to "+o),c=c.slice(0,o)):c.length2e-6||((r-e._forceTick0)/e._minDtick%1+1.000001)%1>2e-6)&&(e._minDtick=0))};Rn.saveRangeInitial=function(e,t){for(var r=Rn.list(e,"",!0),n=!1,a=0;af*.3||u(n)||u(a))){var v=r.dtick/2;e+=e+vo){var s=Number(r.slice(1));i.exactYears>o&&s%12===0?e=Rn.tickIncrement(e,"M6","reverse")+Qh*1.5:i.exactMonths>o?e=Rn.tickIncrement(e,"M1","reverse")+Qh*15.5:e-=Am;var l=Rn.tickIncrement(e,r);if(l<=n)return l}return e}Rn.prepMinorTicks=function(e,t,r){var f,v;if(!((f=t.minor)!=null&&f.dtick)){delete e.dtick;var n=t.dtick&&Du(t._tmin),a;if(n){var i=Rn.tickIncrement(t._tmin,t.dtick,!0);a=[t._tmin,i*.99+t._tmin*.01]}else{var o=ga.simpleMap(t.range,t.r2l);a=[o[0],.8*o[0]+.2*o[1]]}if(e.range=ga.simpleMap(a,t.l2r),e._isMinor=!0,Rn.prepTicks(e,r),n){var s=Du(t.dtick),l=Du(e.dtick),u=s?t.dtick:+t.dtick.substring(1),c=l?e.dtick:+e.dtick.substring(1);s&&l?eO(u,c)?u===2*S0&&c===2*Qh&&(e.dtick=S0):u===2*S0&&c===3*Qh?e.dtick=S0:u===S0&&!(t._input.minor||{}).nticks?e.dtick=Qh:Cce(u/c,2.5)?e.dtick=u/2:e.dtick=u:String(t.dtick).charAt(0)==="M"?l?e.dtick="M1":eO(u,c)?u>=12&&c===2&&(e.dtick="M3"):e.dtick=t.dtick:String(e.dtick).charAt(0)==="L"?String(t.dtick).charAt(0)==="L"?eO(u,c)||(e.dtick=Cce(u/c,2.5)?t.dtick/2:t.dtick):e.dtick="D1":e.dtick==="D2"&&+t.dtick>1&&(e.dtick=1)}e.range=t.range}((v=t.minor)==null?void 0:v._tick0Init)===void 0&&(e.tick0=t.tick0)};function eO(e,t){return Math.abs((e/t+.5)%1-.5)<.001}function Cce(e,t){return Math.abs(e/t-1)<.001}Rn.prepTicks=function(e,t){var r=ga.simpleMap(e.range,e.r2l,void 0,void 0,t);if(e.tickmode==="auto"||!e.dtick){var n=e.nticks,a;n||(e.type==="category"||e.type==="multicategory"?(a=e.tickfont?ga.bigFont(e.tickfont.size||12):15,n=e._length/a):(a=e._id.charAt(0)==="y"?40:80,n=ga.constrain(e._length/a,4,9)+1),e._name==="radialaxis"&&(n*=2)),e.minor&&e.minor.tickmode!=="array"||e.tickmode==="array"&&(n*=100),e._roughDTick=Math.abs(r[1]-r[0])/n,Rn.autoTicks(e,e._roughDTick),e._minDtick>0&&e.dtick0?(i=n-1,o=n):(i=n,o=n);var s=e[i].value,l=e[o].value,u=Math.abs(l-s),c=r||u,f=0;c>=Fk?u>=Fk&&u<=i1t?f=u:f=Pk:r===nO&&c>=Dk?u>=Dk&&u<=a1t?f=u:f=nO:c>=Rk?u>=Rk&&u<=o1t?f=u:f=$b:r===S0&&c>=S0?f=S0:c>=Qh?f=Qh:r===Am&&c>=Am?f=Am:r===Wp&&c>=Wp&&(f=Wp);var v;f>=u&&(f=u,v=!0);var g=a+f;if(t.rangebreaks&&f>0){for(var p=84,x=0,_=0;_S0&&(f=u)}(f>0||n===0)&&(e[n].periodX=a+f/2)}}Rn.calcTicks=function(t,r){for(var n=t.type,a=t.calendar,i=t.ticklabelstep,o=t.ticklabelmode==="period",s=t.range[0]>t.range[1],l=!t.ticklabelindex||ga.isArrayOrTypedArray(t.ticklabelindex)?t.ticklabelindex:[t.ticklabelindex],u=ga.simpleMap(t.range,t.r2l,void 0,void 0,r),c=u[1]=(S?0:1);L--){var w=!L;L?(t._dtickInit=t.dtick,t._tick0Init=t.tick0):S&&(t.minor._dtickInit=t.minor.dtick,t.minor._tick0Init=t.minor.tick0);var A=L?t:ga.extendFlat({},t,S?t.minor:{minor:{}});if(w?Rn.prepMinorTicks(A,t,r):Rn.prepTicks(A,r),A.tickmode==="array"){L?(_=[],p=Lce(t,!w)):(y=[],x=Lce(t,!w));continue}if(A.tickmode==="sync"){_=[],p=_1t(t);continue}var T=cO(u),m=T[0],F=T[1],E=Du(A.dtick),I=n==="log"&&!(E||A.dtick.charAt(0)==="L"),R=Rn.tickFirst(A,r);if(L){if(t._tmin=R,R=F:O<=F;O=Rn.tickIncrement(O,q,c,a)){if(L&&V++,A.rangebreaks&&!c){if(O=v)break}if(_.length>g||O===B)break;B=O;var J={value:v1t(O,U,q)};L?(O===R&&(J.first=!0),I&&O!==(O|0)&&(J.simpleLabel=!0),i>1&&V%i&&(J.skipLabel=!0),_.push(J)):(J.minor=!0,y.push(J))}}if(!y||y.length<3)l=!1;else{var ee=(y[2].value-y[1].value)*(s?-1:1);j1t(ee,t.tickformat)||(l=!1,y=y.slice(1))}if(!l)C=_;else{var ce=_.concat(y);o&&_.length&&(ce=ce.slice(1)),ce=ce.sort(function(qe,we){return qe.value-we.value}).filter(function(qe,we,Le){return we===0||qe.value!==Le[we-1].value});var ye=ce.map(function(qe,we){return qe.minor===void 0&&!qe.skipLabel?we:null}).filter(function(qe){return qe!==null});ye.forEach(function(qe){l.map(function(we){var Le=qe+we;Le>=0&&Le-1;le--){if(_[le].drop){_.splice(le,1);continue}_[le].value=rO(_[le].value,t);var Ge=t.c2p(_[le].value);(me?De>Ge-be:Dev||Kev&&(Le.periodX=v),Kea&&pa&&_Pk)t/=Pk,n=a(10),e.dtick="M"+12*jp(t,n,Ck);else if(i>$b)t/=$b,e.dtick="M"+jp(t,1,Pce);else if(i>Qh){if(e.dtick=jp(t,Qh,e._hasDayOfWeekBreaks?[1,2,7,14]:b1t),!r){var o=Rn.getTickFormat(e),s=e.ticklabelmode==="period";s&&(e._rawTick0=e.tick0),/%[uVW]/.test(o)?e.tick0=ga.dateTick0(e.calendar,2):e.tick0=ga.dateTick0(e.calendar,1),s&&(e._dowTick0=e.tick0)}}else i>Wp?e.dtick=jp(t,Wp,Pce):i>gT?e.dtick=jp(t,gT,Fce):i>Ik?e.dtick=jp(t,Ik,Fce):(n=a(10),e.dtick=jp(t,n,Ck))}else if(e.type==="log"){e.tick0=0;var l=ga.simpleMap(e.range,e.r2l);if(e._isMinor&&(t*=1.5),t>.7)e.dtick=Math.ceil(t);else if(Math.abs(l[1]-l[0])<1){var u=1.5*Math.abs((l[1]-l[0])/t);t=Math.abs(Math.pow(10,l[1])-Math.pow(10,l[0]))/u,n=a(10),e.dtick="L"+jp(t,n,Ck)}else e.dtick=t>.3?"D2":"D1"}else e.type==="category"||e.type==="multicategory"?(e.tick0=0,e.dtick=Math.ceil(Math.max(t,1))):vO(e)?(e.tick0=0,n=1,e.dtick=jp(t,n,w1t)):(e.tick0=0,n=a(10),e.dtick=jp(t,n,Ck));if(e.dtick===0&&(e.dtick=1),!Du(e.dtick)&&typeof e.dtick!="string"){var c=e.dtick;throw e.dtick=1,"ax.dtick error: "+String(c)}};function Nce(e){var t=e.dtick;if(e._tickexponent=0,!Du(t)&&typeof t!="string"&&(t=1),(e.type==="category"||e.type==="multicategory")&&(e._tickround=null),e.type==="date"){var r=e.r2l(e.tick0),n=e.l2r(r).replace(/(^-|i)/g,""),a=n.length;if(String(t).charAt(0)==="M")a>10||n.slice(5)!=="01-01"?e._tickround="d":e._tickround=+t.slice(1)%12===0?"y":"m";else if(t>=Qh&&a<=10||t>=Qh*15)e._tickround="d";else if(t>=gT&&a<=16||t>=Wp)e._tickround="M";else if(t>=Ik&&a<=19||t>=gT)e._tickround="S";else{var i=e.l2r(r+t).replace(/^-/,"").length;e._tickround=Math.max(a,i)-20,e._tickround<0&&(e._tickround=4)}}else if(Du(t)||t.charAt(0)==="L"){var o=e.range.map(e.r2d||Number);Du(t)||(t=Number(t.slice(1))),e._tickround=2-Math.floor(Math.log(t)/Math.LN10+.01);var s=Math.max(Math.abs(o[0]),Math.abs(o[1])),l=Math.floor(Math.log(s)/Math.LN10+.01),u=e.minexponent===void 0?3:e.minexponent;Math.abs(l)>u&&(Kb(e.exponentformat)&&e.exponentformat!=="SI extended"&&!fO(l)||Kb(e.exponentformat)&&e.exponentformat==="SI extended"&&!hO(l)?e._tickexponent=3*Math.round((l-1)/3):e._tickexponent=l)}else e._tickround=null}Rn.tickIncrement=function(e,t,r,n){var a=r?-1:1;if(Du(t))return ga.increment(e,a*t);var i=t.charAt(0),o=a*Number(t.slice(1));if(i==="M")return ga.incrementMonth(e,o,n);if(i==="L")return Math.log(Math.pow(10,e)+o)/Math.LN10;if(i==="D"){var s=t==="D2"?Oce:Bce,l=e+a*.01,u=ga.roundUp(ga.mod(l,1),s,r);return Math.floor(l)+Math.log(tv.round(Math.pow(10,u),1))/Math.LN10}throw"unrecognized dtick "+String(t)};Rn.tickFirst=function(e,t){var r=e.r2l||Number,n=ga.simpleMap(e.range,r,void 0,void 0,t),a=n[1]=0&&S<=e._length?k:null};if(l&&ga.isArrayOrTypedArray(e.ticktext)){var p=ga.simpleMap(e.range,e.r2l),x=(Math.abs(p[1]-p[0])-(e._lBreaks||0))/1e4;for(v=0;v"+s;else{var u=xT(e),c=e._trueSide||e.side;(!u&&c==="top"||u&&c==="bottom")&&(o+="
")}t.text=o}function A1t(e,t,r,n,a){var i=e.dtick,o=t.x,s=e.tickformat,l=typeof i=="string"&&i.charAt(0);if(a==="never"&&(a=""),n&&l!=="L"&&(i="L3",l="L"),s||l==="L")t.text=yT(Math.pow(10,o),e,a,n);else if(Du(i)||l==="D"&&(e.minorloglabels==="complete"||ga.mod(o+.01,1)<.1)){var u;e.minorloglabels==="complete"&&!(ga.mod(o+.01,1)<.1)&&(u=!0,t.fontSize*=.75);var c=Math.pow(10,o).toExponential(0),f=c.split("e"),v=+f[1],g=Math.abs(v),p=e.exponentformat;p==="power"||Kb(p)&&p!=="SI extended"&&fO(v)||Kb(p)&&p==="SI extended"&&hO(v)?(t.text=f[0],g>0&&(t.text+="x10"),t.text==="1x10"&&(t.text="10"),v!==0&&v!==1&&(t.text+=""+(v>0?"":Ox)+g+""),t.fontSize*=1.25):(p==="e"||p==="E")&&g>2?t.text=f[0]+p+(v>0?"+":Ox)+g:(t.text=yT(Math.pow(10,o),e,"","fakehover"),i==="D1"&&e._id.charAt(0)==="y"&&(t.dy-=t.fontSize/6))}else if(l==="D")t.text=e.minorloglabels==="none"?"":String(Math.round(Math.pow(10,ga.mod(o,1)))),t.fontSize*=.75;else throw"unrecognized dtick "+String(i);if(e.dtick==="D1"){var x=String(t.text).charAt(0);(x==="0"||x==="1")&&(e._id.charAt(0)==="y"?t.dx-=t.fontSize/4:(t.dy+=t.fontSize/2,t.dx+=(e.range[1]>e.range[0]?1:-1)*t.fontSize*(o<0?.5:.25)))}}function M1t(e,t){var r=e._categories[Math.round(t.x)];r===void 0&&(r=""),t.text=String(r)}function S1t(e,t,r){var n=Math.round(t.x),a=e._categories[n]||[],i=a[1]===void 0?"":String(a[1]),o=a[0]===void 0?"":String(a[0]);r?t.text=o+" - "+i:(t.text=i,t.text2=o)}function E1t(e,t,r,n,a){a==="never"?a="":e.showexponent==="all"&&Math.abs(t.x/e.dtick)<1e-6&&(a="hide"),t.text=yT(t.x,e,a,n)}function k1t(e,t,r,n,a){if(e.thetaunit==="radians"&&!r){var i=t.x/180;if(i===0)t.text="0";else{var o=C1t(i);if(o[1]>=100)t.text=yT(ga.deg2rad(t.x),e,a,n);else{var s=t.x<0;o[1]===1?o[0]===1?t.text="\u03C0":t.text=o[0]+"\u03C0":t.text=["",o[0],"","\u2044","",o[1],"","\u03C0"].join(""),s&&(t.text=Ox+t.text)}}}else t.text=yT(t.x,e,a,n)}function C1t(e){function t(s,l){return Math.abs(s-l)<=1e-6}function r(s,l){return t(l,0)?s:r(l,s%l)}function n(s){for(var l=1;!t(Math.round(s*l)/l,s);)l*=10;return l}var a=n(e),i=e*a,o=Math.abs(r(i,a));return[Math.round(i/o),Math.round(a/o)]}var Vce=["f","p","n","\u03BC","m","","k","M","G","T"],L1t=["q","r","y","z","a",...Vce,"P","E","Z","Y","R","Q"],Kb=e=>["SI","SI extended","B"].includes(e);function fO(e){return e>14||e<-15}function hO(e){return e>32||e<-30}function P1t(e,t){return Kb(t)?!!(t==="SI extended"&&hO(e)||t!=="SI extended"&&fO(e)):!1}function yT(e,t,r,n){var a=e<0,i=t._tickround,o=r||t.exponentformat||"B",s=t._tickexponent,l=Rn.getTickFormat(t),u=t.separatethousands;if(n){var c={exponentformat:o,minexponent:t.minexponent,dtick:t.showexponent==="none"?t.dtick:Du(e)&&Math.abs(e)||1,range:t.showexponent==="none"?t.range.map(t.r2d):[0,e||1]};Nce(c),i=(Number(c._tickround)||0)+4,s=c._tickexponent,t.hoverformat&&(l=t.hoverformat)}if(l)return t._numFormat(l)(e).replace(/-/g,Ox);o==="none"&&(s=0),e=Math.abs(e);let f=Math.pow(10,-i)/2;if(e"+v+"":o==="B"&&s===9?e+="B":Kb(o)&&(e+=o==="SI extended"?L1t[s/3+10]:Vce[s/3+5])}return a?Ox+e:e}Rn.getTickFormat=function(e){var t;function r(l){return typeof l!="string"?l:Number(l.replace("M",""))*$b}function n(l,u){var c=["L","D"];if(typeof l==typeof u){if(typeof l=="number")return l-u;var f=c.indexOf(l.charAt(0)),v=c.indexOf(u.charAt(0));return f===v?Number(l.replace(/(L|D)/g,""))-Number(u.replace(/(L|D)/g,"")):f-v}else return typeof l=="number"?1:-1}function a(l,u,c){var f=c||function(p){return p},v=u[0],g=u[1];return(!v&&typeof v!="number"||f(v)<=f(l))&&(!g&&typeof g!="number"||f(g)>=f(l))}function i(l,u){var c=u[0]===null,f=u[1]===null,v=n(l,u[0])>=0,g=n(l,u[1])<=0;return(c||v)&&(f||g)}var o,s;if(e.tickformatstops&&e.tickformatstops.length>0)switch(e.type){case"date":case"linear":{for(t=0;t=0&&a.unshift(a.splice(c,1).shift())}});var s={false:{left:0,right:0}};return ga.syncOrAsync(a.map(function(l){return function(){if(l){var u=Rn.getFromId(e,l);r||(r={}),r.axShifts=s,r.overlayingShiftedAx=o;var c=Rn.drawOne(e,u,r);return u._shiftPusher&&uO(u,u._fullDepth||0,s,!0),u._r=u.range.slice(),u._rl=ga.simpleMap(u._r,u.r2l),c}}}))};Rn.drawOne=function(e,t,r){r=r||{};var n=r.axShifts||{},a=r.overlayingShiftedAx||[],i,o,s;t.setScale();var l=e._fullLayout,u=t._id,c=u.charAt(0),f=Rn.counterLetter(u),v=l._plots[t._mainSubplot],g=t.zerolinelayer==="above traces";if(!v)return;if(t._shiftPusher=t.autoshift||a.indexOf(t._id)!==-1||a.indexOf(t.overlaying)!==-1,t._shiftPusher&t.anchor==="free"){var p=t.linewidth/2||0;t.ticks==="inside"&&(p+=t.ticklen),uO(t,p,n,!0),uO(t,t.shift||0,n,!1)}(r.skipTitle!==!0||t._shift===void 0)&&(t._shift=H1t(t,n));var x=v[c+"axislayer"],_=t._mainLinePosition,y=_+=t._shift,C=t._mainMirrorPosition,k=t._vals=Rn.calcTicks(t),S=[t.mirror,y,C].join("_");for(i=0;i0?we.bottom-et:0,qe))));var Ve=0,$e=0;if(t._shiftPusher&&(Ve=Math.max(qe,we.height>0?ze==="l"?et-we.left:we.right-et:0),t.title.text!==l._dfltTitle[c]&&($e=(t._titleStandoff||0)+(t._titleScoot||0),ze==="l"&&($e+=Rce(t))),t._fullDepth=Math.max(Ve,$e)),t.automargin){Le={x:0,y:0,r:0,l:0,t:0,b:0};var ot=[0,1],tt=typeof t._shift=="number"?t._shift:0;if(c==="x"){if(ze==="b"?Le[ze]=t._depth:(Le[ze]=t._depth=Math.max(we.width>0?et-we.top:0,qe),ot.reverse()),we.width>0){var nt=we.right-(t._offset+t._length);nt>0&&(Le.xr=1,Le.r=nt);var We=t._offset-we.left;We>0&&(Le.xl=0,Le.l=We)}}else if(ze==="l"?(t._depth=Math.max(we.height>0?et-we.left:0,qe),Le[ze]=t._depth-tt):(t._depth=Math.max(we.height>0?we.right-et:0,qe),Le[ze]=t._depth+tt,ot.reverse()),we.height>0){var mt=we.bottom-(t._offset+t._length);mt>0&&(Le.yb=0,Le.b=mt);var bt=t._offset-we.top;bt>0&&(Le.yt=1,Le.t=bt)}Le[f]=t.anchor==="free"?t.position:t._anchorAxis.domain[ot[0]],t.title.text!==l._dfltTitle[c]&&(Le[ze]+=Rce(t)+(t.title.standoff||0)),t.mirror&&t.anchor!=="free"&&(Ke={x:0,y:0,r:0,l:0,t:0,b:0},Ke[ct]=t.linewidth,t.mirror&&t.mirror!==!0&&(Ke[ct]+=qe),t.mirror===!0||t.mirror==="ticks"?Ke[f]=t._anchorAxis.domain[ot[1]]:(t.mirror==="all"||t.mirror==="allticks")&&(Ke[f]=[t._counterDomainMin,t._counterDomainMax][ot[1]]))}Oe&&(Te=vT.getComponentMethod("rangeslider","autoMarginOpts")(e,t)),typeof t.automargin=="string"&&(Dce(Le,t.automargin),Dce(Ke,t.automargin)),Xb.autoMargin(e,dO(t),Le),Xb.autoMargin(e,Hce(t),Ke),Xb.autoMargin(e,jce(t),Te)}),ga.syncOrAsync(ht)}};function Dce(e,t){if(e){var r=Object.keys(Sce).reduce(function(n,a){return t.indexOf(a)!==-1&&Sce[a].forEach(function(i){n[i]=1}),n},{});Object.keys(e).forEach(function(n){r[n]||(n.length===1?e[n]=0:delete e[n])})}}function F1t(e,t){var r=[],n,a=function(i,o){var s=i.xbnd[o];s!==null&&r.push(ga.extendFlat({},i,{x:s}))};if(t.length){for(n=0;ne.range[1],s=e.ticklabelposition&&e.ticklabelposition.indexOf("inside")!==-1,l=!s;if(r){var u=o?-1:1;r=r*u}if(n){var c=e.side,f=s&&(c==="top"||c==="left")||l&&(c==="bottom"||c==="right")?1:-1;n=n*f}return e._id.charAt(0)==="x"?function(v){return Zb(a+e._offset+e.l2p(sO(v))+r,i+n)}:function(v){return Zb(i+n,a+e._offset+e.l2p(sO(v))+r)}};function sO(e){return e.periodX!==void 0?e.periodX:e.x}function z1t(e){var t=e.ticklabelposition||"",r=e.tickson||"",n=function(p){return t.indexOf(p)!==-1},a=n("top"),i=n("left"),o=n("right"),s=n("bottom"),l=n("inside"),u=r!=="boundaries"&&(s||i||a||o);if(!u&&!l)return[0,0];var c=e.side,f=u?(e.tickwidth||0)/2:0,v=zk,g=e.tickfont?e.tickfont.size:12;return(s||a)&&(f+=g*Nx,v+=(e.linewidth||0)/2),(i||o)&&(f+=(e.linewidth||0)/2,v+=zk),l&&c==="top"&&(v-=g*(1-Nx)),(i||a)&&(f=-f),(c==="bottom"||c==="right")&&(v=-v),[u?f:0,l?v:0]}Rn.makeTickPath=function(e,t,r,n){n||(n={});var a=n.minor;if(a&&!e.minor)return"";var i=n.len!==void 0?n.len:a?e.minor.ticklen:e.ticklen,o=e._id.charAt(0),s=(e.linewidth||1)/2;return o==="x"?"M0,"+(t+s*r)+"v"+i*r:"M"+(t+s*r)+",0h"+i*r};Rn.makeLabelFns=function(e,t,r){var n=e.ticklabelposition||"",a=e.tickson||"",i=function(R){return n.indexOf(R)!==-1},o=i("top"),s=i("left"),l=i("right"),u=i("bottom"),c=a!=="boundaries"&&(u||s||o||l),f=i("inside"),v=n==="inside"&&e.ticks==="inside"||!f&&e.ticks==="outside"&&a!=="boundaries",g=0,p=0,x=v?e.ticklen:0;if(f?x*=-1:c&&(x=0),v&&(g+=x,r)){var _=ga.deg2rad(r);g=x*Math.cos(_)+1,p=x*Math.sin(_)}e.showticklabels&&(v||e.showline)&&(g+=.2*e.tickfont.size),g+=(e.linewidth||1)/2*(f?-1:1);var y={labelStandoff:g,labelShift:p},C,k,S,L,w=0,A=e.side,T=e._id.charAt(0),m=e.tickangle,F;if(T==="x")F=!f&&A==="bottom"||f&&A==="top",L=F?1:-1,f&&(L*=-1),C=p*L,k=t+g*L,S=F?1:-.2,Math.abs(m)===90&&(f?S+=dT:m===-90&&A==="bottom"?S=Nx:m===90&&A==="top"?S=dT:S=.5,w=dT/2*(m/90)),y.xFn=function(R){return R.dx+C+w*R.fontSize},y.yFn=function(R){return R.dy+k+R.fontSize*S},y.anchorFn=function(R,B){if(c){if(s)return"end";if(l)return"start"}return!Du(B)||B===0||B===180?"middle":B*L<0!==f?"end":"start"},y.heightFn=function(R,B,O){return B<-60||B>60?-.5*O:e.side==="top"!==f?-O:0};else if(T==="y"){if(F=!f&&A==="left"||f&&A==="right",L=F?1:-1,f&&(L*=-1),C=g,k=p*L,S=0,!f&&Math.abs(m)===90&&(m===-90&&A==="left"||m===90&&A==="right"?S=Nx:S=.5),f){var E=Du(m)?+m:0;if(E!==0){var I=ga.deg2rad(E);w=Math.abs(Math.sin(I))*Nx*L,S=0}}y.xFn=function(R){return R.dx+t-(C+R.fontSize*S)*L+w*R.fontSize},y.yFn=function(R){return R.dy+k+R.fontSize*dT},y.anchorFn=function(R,B){return Du(B)&&Math.abs(B)===90?"middle":F?"end":"start"},y.heightFn=function(R,B,O){return e.side==="right"&&(B*=-1),B<-30?-O:B<30?-.5*O:0}}return y};function Ok(e){return[e.text,e.x,e.axInfo,e.font,e.fontSize,e.fontColor].join("_")}Rn.drawTicks=function(e,t,r){r=r||{};var n=t._id+"tick",a=[].concat(t.minor&&t.minor.ticks?r.vals.filter(function(o){return o.minor&&!o.noTick}):[]).concat(t.ticks?r.vals.filter(function(o){return!o.minor&&!o.noTick}):[]),i=r.layer.selectAll("path."+n).data(a,Ok);i.exit().remove(),i.enter().append("path").classed(n,1).classed("ticks",1).classed("crisp",r.crisp!==!1).each(function(o){return pT.stroke(tv.select(this),o.minor?t.minor.tickcolor:t.tickcolor)}).style("stroke-width",function(o){return M0.crispRound(e,o.minor?t.minor.tickwidth:t.tickwidth,1)+"px"}).attr("d",r.path).style("display",null),Nk(t,[Ice]),i.attr("transform",r.transFn)};Rn.drawGrid=function(e,t,r){if(r=r||{},t.tickmode!=="sync"){var n=t._id+"grid",a=t.minor&&t.minor.showgrid,i=a?r.vals.filter(function(y){return y.minor}):[],o=t.showgrid?r.vals.filter(function(y){return!y.minor}):[],s=r.counterAxis;if(s&&Rn.shouldShowZeroLine(e,t,s))for(var l=t.tickmode==="array",u=0;u=0;p--){var x=p?v:g;if(x){var _=x.selectAll("path."+n).data(p?o:i,Ok);_.exit().remove(),_.enter().append("path").classed(n,1).classed("crisp",r.crisp!==!1),_.attr("transform",r.transFn).attr("d",r.path).each(function(y){return pT.stroke(tv.select(this),y.minor?t.minor.gridcolor:t.gridcolor||"#ddd")}).style("stroke-dasharray",function(y){return M0.dashStyle(y.minor?t.minor.griddash:t.griddash,y.minor?t.minor.gridwidth:t.gridwidth)}).style("stroke-width",function(y){return(y.minor?f:t._gw)+"px"}).style("display",null),typeof r.path=="function"&&_.attr("d",r.path)}}Nk(t,[aO,oO])}};Rn.drawZeroLine=function(e,t,r){r=r||r;var n=t._id+"zl",a=Rn.shouldShowZeroLine(e,t,r.counterAxis),i=r.layer.selectAll("path."+n).data(a?[{x:0,id:t._id}]:[]);i.exit().remove(),i.enter().append("path").classed(n,1).classed("zl",1).classed("crisp",r.crisp!==!1).each(function(){r.layer.selectAll("path").sort(function(o,s){return f1t(o.id,s.id)})}),i.attr("transform",r.transFn).attr("d",r.path).call(pT.stroke,t.zerolinecolor||pT.defaultLine).style("stroke-width",M0.crispRound(e,t.zerolinewidth,t._gw||1)+"px").style("display",null),Nk(t,[iO])};Rn.drawLabels=function(e,t,r){r=r||{};var n=e._fullLayout,a=t._id,i=t.zerolinelayer==="above traces",o=r.cls||a+"tick",s=r.vals.filter(function(U){return U.text}),l=r.labelFns,u=r.secondary?0:t.tickangle,c=(t._prevTickAngles||{})[o],f=r.layer.selectAll("g."+o).data(t.showticklabels?s:[],Ok),v=[];f.enter().append("g").classed(o,1).append("text").attr("text-anchor","middle").each(function(U){var J=tv.select(this),ee=e._promises.length;J.call(Bx.positionText,l.xFn(U),l.yFn(U)).call(M0.font,{family:U.font,size:U.fontSize,color:U.fontColor,weight:U.fontWeight,style:U.fontStyle,variant:U.fontVariant,textcase:U.fontTextcase,lineposition:U.fontLineposition,shadow:U.fontShadow}).text(U.text).call(Bx.convertToTspans,e),e._promises[ee]?v.push(e._promises.pop().then(function(){g(J,u)})):g(J,u)}),Nk(t,[Mce]),f.exit().remove(),r.repositionOnUpdate&&f.each(function(U){tv.select(this).select("text").call(Bx.positionText,l.xFn(U),l.yFn(U))});function g(U,J){U.each(function(ee){var ce=tv.select(this),ye=ce.select(".text-math-group"),xe=l.anchorFn(ee,J),ue=r.transFn.call(ce.node(),ee)+(Du(J)&&+J!=0?" rotate("+J+","+l.xFn(ee)+","+(l.yFn(ee)-ee.fontSize/2)+")":""),K=Bx.lineCount(ce),_e=mT*ee.fontSize,ne=l.heightFn(ee,Du(J)?+J:0,(K-1)*_e);if(ne&&(ue+=Zb(0,ne)),ye.empty()){var ae=ce.select("text");ae.attr({transform:ue,"text-anchor":xe}),ae.style("display",null),t._adjustTickLabelsOverflow&&t._adjustTickLabelsOverflow()}else{var pe=M0.bBox(ye.node()).width,ie=pe*{end:-.5,start:.5}[xe];ye.attr("transform",ue+Zb(ie,0))}})}t._adjustTickLabelsOverflow=function(){var U=t.ticklabeloverflow;if(!(!U||U==="allow")){var J=U.indexOf("hide")!==-1,ee=t._id.charAt(0)==="x",ce=0,ye=ee?e._fullLayout.width:e._fullLayout.height;if(U.indexOf("domain")!==-1){var xe=ga.simpleMap(t.range,t.r2l);ce=t.l2p(xe[0])+t._offset,ye=t.l2p(xe[1])+t._offset}var ue=Math.min(ce,ye),K=Math.max(ce,ye),_e=t.side,ne=1/0,ae=-1/0;f.each(function(me){var be=tv.select(this),De=be.select(".text-math-group");if(De.empty()){var Ge=M0.bBox(be.node()),ht=0;ee?(Ge.right>K||Ge.leftK||Ge.top+(t.tickangle?0:me.fontSize/4)t["_visibleLabelMin_"+xe._id]?be.style("display","none"):K.K==="tick"&&!ue&&be.node().style.display!=="none"&&be.style("display",null)})})})})},g(f,c+1?c:u);function p(){return v.length&&Promise.all(v)}var x=null;function _(){if(g(f,u),s.length&&t.autotickangles&&(t.type!=="log"||String(t.dtick).charAt(0)!=="D")){x=t.autotickangles[0];var U=0,J=[],ee,ce=1;f.each(function(Le){U=Math.max(U,Le.fontSize);var Ke=t.l2p(Le.x),Te=lO(this),Ve=M0.bBox(Te.node());ce=Math.max(ce,Bx.lineCount(Te)),J.push({top:0,bottom:10,height:10,left:Ke-Ve.width/2,right:Ke+Ve.width/2+2,width:Ve.width+2})});var ye=(t.tickson==="boundaries"||t.showdividers)&&!r.secondary,xe=s.length,ue=Math.abs((s[xe-1].x-s[0].x)*t._m)/(xe-1),K=ye?ue/2:ue,_e=ye?t.ticklen:U*1.25*ce,ne=Math.sqrt(Math.pow(K,2)+Math.pow(_e,2)),ae=K/ne,pe=t.autotickangles.map(function(Le){return Le*Math.PI/180}),ie=pe.find(function(Le){return Math.abs(Math.cos(Le))<=ae});ie===void 0&&(ie=pe.reduce(function(Le,Ke){return Math.abs(Math.cos(Le))V*O&&(I=O,m[T]=F[T]=R[T])}var j=Math.abs(I-E);j-L>0?(j-=L,L*=1+L/j):L=0,t._id.charAt(0)!=="y"&&(L=-L),m[A]=k.p2r(k.r2p(F[A])+w*L),k.autorange==="min"||k.autorange==="max reversed"?(m[0]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0):(k.autorange==="max"||k.autorange==="min reversed")&&(m[1]=null,k._rangeInitial0=void 0,k._rangeInitial1=void 0),n._insideTickLabelsUpdaterange[k._name+".range"]=m}var q=ga.syncOrAsync(y);return q&&q.then&&e._promises.push(q),q};function q1t(e,t,r){var n=t._id+"divider",a=r.vals,i=r.layer.selectAll("path."+n).data(a,Ok);i.exit().remove(),i.enter().insert("path",":first-child").classed(n,1).classed("crisp",1).call(pT.stroke,t.dividercolor).style("stroke-width",M0.crispRound(e,t.dividerwidth,1)+"px"),i.attr("transform",r.transFn).attr("d",r.path)}Rn.getPxPosition=function(e,t){var r=e._fullLayout._size,n=t._id.charAt(0),a=t.side,i;if(t.anchor!=="free"?i=t._anchorAxis:n==="x"?i={_offset:r.t+(1-(t.position||0))*r.h,_length:0}:n==="y"&&(i={_offset:r.l+(t.position||0)*r.w+t._shift,_length:0}),a==="top"||a==="left")return i._offset;if(a==="bottom"||a==="right")return i._offset+i._length};function Rce(e){var t=e.title.font.size,r=(e.title.text.match(Bx.BR_TAG_ALL)||[]).length;return e.title.hasOwnProperty("standoff")?t*(Nx+r*mT):r?t*(r+1)*mT:t}function B1t(e,t){var r=e._fullLayout,n=t._id,a=n.charAt(0),i=t.title.font.size,o,s=(t.title.text.match(Bx.BR_TAG_ALL)||[]).length;if(t.title.hasOwnProperty("standoff"))t.side==="bottom"||t.side==="right"?o=t._depth+t.title.standoff+i*Nx:(t.side==="top"||t.side==="left")&&(o=t._depth+t.title.standoff+i*(dT+s*mT));else{var l=xT(t);if(t.type==="multicategory")o=t._depth;else{var u=1.5*i;l&&(u=.5*i,t.ticks==="outside"&&(u+=t.ticklen)),o=10+u+(t.linewidth?t.linewidth-1:0)}l||(a==="x"?o+=t.side==="top"?i*(t.showticklabels?1:0):i*(t.showticklabels?1.5:.5):o+=t.side==="right"?i*(t.showticklabels?1:.5):i*(t.showticklabels?.5:0))}var c=Rn.getPxPosition(e,t),f,v,g;a==="x"?(v=t._offset+t._length/2,g=t.side==="top"?c-o:c+o):(g=t._offset+t._length/2,v=t.side==="right"?c+o:c-o,f={rotate:"-90",offset:0});var p;if(t.type!=="multicategory"){var x=t._selections[t._id+"tick"];if(p={selection:x,side:t.side},x&&x.node()&&x.node().parentNode){var _=M0.getTranslate(x.node().parentNode);p.offsetLeft=_.x,p.offsetTop=_.y}t.title.hasOwnProperty("standoff")&&(p.pad=0)}return t._titleStandoff=o,r1t.draw(e,n+"title",{propContainer:t,propName:t._name+".title.text",placeholder:r._dfltTitle[a],avoid:p,transform:f,attributes:{x:v,y:g,"text-anchor":"middle"}})}Rn.shouldShowZeroLine=function(e,t,r){var n=ga.simpleMap(t.range,t.r2l);return n[0]*n[1]<=0&&t.zeroline&&(t.type==="linear"||t.type==="-")&&!(t.rangebreaks&&t.maskBreaks(0)===qk)&&(Gce(t,0)||!O1t(e,t,r,n)||N1t(e,t))};Rn.clipEnds=function(e,t){return t.filter(function(r){return Gce(e,r.x)})};function Gce(e,t){var r=e.l2p(t);return r>1&&r1)for(a=1;a=a.min&&e=l1t:/%L/.test(t)?e>=s1t:/%[SX]/.test(t)?e>=Ik:/%M/.test(t)?e>=gT:/%[HI]/.test(t)?e>=Wp:/%p/.test(t)?e>=Am:/%[Aadejuwx]/.test(t)?e>=Qh:/%[UVW]/.test(t)?e>=S0:/%[Bbm]/.test(t)?e>=Rk:/%[q]/.test(t)?e>=Dk:/%[Yy]/.test(t)?e>=Fk:!0}});var pO=fe((Odr,Yce)=>{"use strict";Yce.exports=function(t,r,n){var a,i;if(n){var o=r==="reversed"||r==="min reversed"||r==="max reversed";a=n[o?1:0],i=n[o?0:1]}var s=t("autorangeoptions.minallowed",i===null?a:void 0),l=t("autorangeoptions.maxallowed",a===null?i:void 0);s===void 0&&t("autorangeoptions.clipmin"),l===void 0&&t("autorangeoptions.clipmax"),t("autorangeoptions.include")}});var gO=fe((Ndr,Xce)=>{"use strict";var W1t=pO();Xce.exports=function(t,r,n,a){var i=r._template||{},o=r.type||i.type||"-";n("minallowed"),n("maxallowed");var s=n("range");if(!s){var l;!a.noInsiderange&&o!=="log"&&(l=n("insiderange"),l&&(l[0]===null||l[1]===null)&&(r.insiderange=!1,l=void 0),l&&(s=n("range",l)))}var u=r.getAutorangeDflt(s,a),c=n("autorange",u),f;s&&(s[0]===null&&s[1]===null||(s[0]===null||s[1]===null)&&(c==="reversed"||c===!0)||s[0]!==null&&(c==="min"||c==="max reversed")||s[1]!==null&&(c==="max"||c==="min reversed"))&&(s=void 0,delete r.range,r.autorange=!0,f=!0),f||(u=r.getAutorangeDflt(s,a),c=n("autorange",u)),c&&(W1t(n,c,s),(o==="linear"||o==="-")&&n("rangemode")),r.cleanRange()}});var $ce=fe((Udr,Zce)=>{var Y1t={left:0,top:0};Zce.exports=X1t;function X1t(e,t,r){t=t||e.currentTarget||e.srcElement,Array.isArray(r)||(r=[0,0]);var n=e.clientX||0,a=e.clientY||0,i=Z1t(t);return r[0]=n-i.left,r[1]=a-i.top,r}function Z1t(e){return e===window||e===document||e===document.body?Y1t:e.getBoundingClientRect()}});var Uk=fe((Vdr,Kce)=>{"use strict";var $1t=Kq();function K1t(){var e=!1;try{var t=Object.defineProperty({},"passive",{get:function(){e=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(r){e=!1}return e}Kce.exports=$1t&&K1t()});var Qce=fe((Gdr,Jce)=>{"use strict";Jce.exports=function(t,r,n,a,i){var o=(t-n)/(a-n),s=o+r/(a-n),l=(o+s)/2;return i==="left"||i==="bottom"?o:i==="center"||i==="middle"?l:i==="right"||i==="top"?s:o<2/3-l?o:s>4/3-l?s:l}});var rfe=fe((Hdr,tfe)=>{"use strict";var efe=Xt(),J1t=[["sw-resize","s-resize","se-resize"],["w-resize","move","e-resize"],["nw-resize","n-resize","ne-resize"]];tfe.exports=function(t,r,n,a){return n==="left"?t=0:n==="center"?t=1:n==="right"?t=2:t=efe.constrain(Math.floor(t*3),0,2),a==="bottom"?r=0:a==="middle"?r=1:a==="top"?r=2:r=efe.constrain(Math.floor(r*3),0,2),J1t[r][t]}});var ife=fe((jdr,nfe)=>{"use strict";var Q1t=Rb(),egt=jE(),tgt=X4().getGraphDiv,rgt=L4(),mO=nfe.exports={};mO.wrapped=function(e,t,r){var i;e=tgt(e),e._fullLayout&&egt.clear(e._fullLayout._uid+rgt.HOVERID);let n=e._hoverdata;mO.raw(e,t,r)&&e._hoverAnywhereActive&&(e._hoverAnywhereActive=!1,(i=e._fullLayout)!=null&&i.hoveranywhere&&(t!=null&&t.target)&&!n&&e.emit("plotly_unhover",{event:t,points:[]}))};mO.raw=function(t,r){var n=t._fullLayout,a=t._hoverdata;return r||(r={}),r.target&&!t._dragged&&Q1t.triggerHandler(t,"plotly_beforehover",r)===!1?!1:(n._hoverlayer.selectAll("g").remove(),n._hoverlayer.selectAll("line").remove(),n._hoverlayer.selectAll("circle").remove(),t._hoverdata=void 0,r.target&&a&&t.emit("plotly_unhover",{event:r,points:a}),!0)}});var ed=fe((Wdr,lfe)=>{"use strict";var ngt=$ce(),yO=Qq(),igt=Uk(),agt=Xt().removeElement,ogt=rc(),Ux=lfe.exports={};Ux.align=Qce();Ux.getCursor=rfe();var ofe=ife();Ux.unhover=ofe.wrapped;Ux.unhoverRaw=ofe.raw;Ux.init=function(t){var r=t.gd,n=1,a=r._context.doubleClickDelay,i=t.element,o,s,l,u,c,f,v,g;r._mouseDownTime||(r._mouseDownTime=0),i.style.pointerEvents="all",i.onmousedown=_,igt?(i._ontouchstart&&i.removeEventListener("touchstart",i._ontouchstart),i._ontouchstart=_,i.addEventListener("touchstart",_,{passive:!1})):i.ontouchstart=_;function p(k,S,L){return Math.abs(k)a&&(n=Math.max(n-1,1)),r._dragged)t.doneFn&&t.doneFn();else{var S;f.target===v?S=f:(S={target:v,srcElement:v,toElement:v},Object.keys(f).concat(Object.keys(f.__proto__)).forEach(L=>{var w=f[L];!S[L]&&typeof w!="function"&&(S[L]=w)})),t.clickFn&&t.clickFn(n,S),g||v.dispatchEvent(new MouseEvent("click",k))}r._dragging=!1,r._dragged=!1}};function sfe(){var e=document.createElement("div");e.className="dragcover";var t=e.style;return t.position="fixed",t.left=0,t.right=0,t.top=0,t.bottom=0,t.zIndex=999999999,t.background="none",document.body.appendChild(e),e}Ux.coverSlip=sfe;function afe(e){return ngt(e.changedTouches?e.changedTouches[0]:e,document.body)}});var np=fe((Ydr,ufe)=>{"use strict";ufe.exports=function(t,r){(t.attr("class")||"").split(" ").forEach(function(n){n.indexOf("cursor-")===0&&t.classed(n,!1)}),r&&t.classed("cursor-"+r,!0)}});var hfe=fe((Xdr,ffe)=>{"use strict";var xO=np(),_T="data-savedcursor",cfe="!!";ffe.exports=function(t,r){var n=t.attr(_T);if(r){if(!n){for(var a=(t.attr("class")||"").split(" "),i=0;i{"use strict";var _O=Ds(),sgt=tc();dfe.exports={_isSubplotObj:!0,visible:{valType:"boolean",dflt:!0,editType:"legend"},bgcolor:{valType:"color",editType:"legend"},bordercolor:{valType:"color",dflt:sgt.defaultLine,editType:"legend"},maxheight:{valType:"number",min:0,editType:"legend"},borderwidth:{valType:"number",min:0,dflt:0,editType:"legend"},font:_O({editType:"legend"}),grouptitlefont:_O({editType:"legend"}),orientation:{valType:"enumerated",values:["v","h"],dflt:"v",editType:"legend"},traceorder:{valType:"flaglist",flags:["reversed","grouped"],extras:["normal"],editType:"legend"},tracegroupgap:{valType:"number",min:0,dflt:10,editType:"legend"},entrywidth:{valType:"number",min:0,editType:"legend"},entrywidthmode:{valType:"enumerated",values:["fraction","pixels"],dflt:"pixels",editType:"legend"},indentation:{valType:"number",min:-15,dflt:0,editType:"legend"},itemsizing:{valType:"enumerated",values:["trace","constant"],dflt:"trace",editType:"legend"},itemwidth:{valType:"number",min:30,dflt:30,editType:"legend"},itemclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggle",editType:"legend"},itemdoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],dflt:"toggleothers",editType:"legend"},groupclick:{valType:"enumerated",values:["toggleitem","togglegroup"],dflt:"togglegroup",editType:"legend"},titleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},titledoubleclick:{valType:"enumerated",values:["toggle","toggleothers",!1],editType:"legend"},x:{valType:"number",editType:"legend"},xref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"legend"},y:{valType:"number",editType:"legend"},yref:{valType:"enumerated",dflt:"paper",values:["container","paper"],editType:"layoutstyle"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],editType:"legend"},uirevision:{valType:"any",editType:"none"},valign:{valType:"enumerated",values:["top","middle","bottom"],dflt:"middle",editType:"legend"},title:{text:{valType:"string",dflt:"",editType:"legend"},font:_O({editType:"legend"}),side:{valType:"enumerated",values:["top","left","top left","top center","top right"],editType:"legend"},editType:"legend"},editType:"legend"}});var wT=fe(bT=>{"use strict";bT.isGrouped=function(t){return(t.traceorder||"").indexOf("grouped")!==-1};bT.isVertical=function(t){return t.orientation!=="h"};bT.isReversed=function(t){return(t.traceorder||"").indexOf("reversed")!==-1};bT.getId=function(t){return t._id||"legend"}});var TO=fe((Kdr,vfe)=>{"use strict";var Vk=bi(),E0=Xt(),lgt=Mo(),ugt=Ho(),cgt=bO(),fgt=Sb(),wO=wT();function hgt(e,t,r,n,a){var i=t[e]||{},o=lgt.newContainer(r,e);function s(U,J){return E0.coerce(i,o,cgt,U,J)}var l=E0.coerceFont(s,"font",r.font);s("bgcolor",r.paper_bgcolor),s("bordercolor");var u=s("visible");if(!u)return;var c,f=function(U,J){var ee=c._input,ce=c;return E0.coerce(ee,ce,ugt,U,J)},v=r.font||{},g=E0.coerceFont(s,"grouptitlefont",v,{overrideDflt:{size:Math.round(v.size*1.1)}}),p=0,x=!1,_="normal",y=(r.shapes||[]).filter(function(U){return U.showlegend});function C(U){return Vk.traceIs(U,"pie-like")&&U._length!=null&&(Array.isArray(U.legend)||Array.isArray(U.showlegend))}n.filter(C).forEach(function(U){U.visible&&p++;for(var J=0;JU.legend.length)for(var ce=U.legend.length;ce(e==="legend"?1:0));if(w===!1&&(r[e]=void 0),!(w===!1&&!i.uirevision)&&(s("uirevision",r.uirevision),w!==!1)){s("borderwidth");var A=s("orientation"),T=s("yref"),m=s("xref"),F=A==="h",E=T==="paper",I=m==="paper",R,B,O,V="left";F?(R=0,Vk.getComponentMethod("rangeslider","isVisible")(t.xaxis)?E?(B=1.1,O="bottom"):(B=1,O="top"):E?(B=-.1,O="top"):(B=0,O="bottom")):(B=1,O="auto",I?R=1.02:(R=1,V="right")),E0.coerce(i,o,{x:{valType:"number",editType:"legend",min:I?-2:0,max:I?3:1,dflt:R}},"x"),E0.coerce(i,o,{y:{valType:"number",editType:"legend",min:E?-2:0,max:E?3:1,dflt:B}},"y"),s("traceorder",_),wO.isGrouped(r[e])&&s("tracegroupgap"),s("entrywidth"),s("entrywidthmode"),s("indentation"),s("itemsizing"),s("itemwidth"),s("itemclick"),s("itemdoubleclick"),s("groupclick"),s("xanchor",V),s("yanchor",O),s("maxheight"),s("valign"),E0.noneOrAll(i,o,["x","y"]);var j=s("title.text");if(j){s("title.side",F?"left":"top");var q=E0.extendFlat({},l,{size:E0.bigFont(l.size)});E0.coerceFont(s,"title.font",q);let U=a>1;s("titleclick",U?"toggle":!1),s("titledoubleclick",U?"toggleothers":!1)}}}vfe.exports=function(t,r,n){var a,i=n.slice(),o=r.shapes;if(o)for(a=0;a{"use strict";var Mm=bi(),AO=Xt(),dgt=AO.pushUnique,vgt=wT(),pfe=!0;MO.handleItemClick=function(t,r,n,a){var i=r._fullLayout;if(r._dragged||r._editing)return;var o=t.data()[0][0];if(o.groupTitle&&o.noClick)return;var s=n.groupclick;a==="toggle"&&n.itemdoubleclick==="toggleothers"&&pfe&&r.data&&r._context.showTips&&(AO.notifier(AO._(r,"Double-click on legend to isolate one trace"),"long",r),pfe=!1);var l=s==="togglegroup",u=i.hiddenlabels?i.hiddenlabels.slice():[],c=r._fullData;let f=(i.shapes||[]).filter(ht=>ht.showlegend||ht.legendgroup);var v=c.concat(f),g=o.trace;g._isShape&&(g=i.shapes[g.index]);var p=g.legendgroup,x,_,y,C,k,S,L={},w=[],A=[],T=[];function m(ht,it){var Oe=w.indexOf(ht),ze=L.visible;return ze||(ze=L.visible=[]),w.indexOf(ht)===-1&&(w.push(ht),Oe=w.length-1),ze[Oe]=it,Oe}var F=(i.shapes||[]).map(function(ht){return ht._input}),E=!1;function I(ht,it){F[ht].visible=it,E=!0}function R(ht,it){if(!(o.groupTitle&&!l)){var Oe=ht._isShape,ze=ht.index;ze===void 0&&(ze=ht._index);var ct=ht.visible===!1?!1:it;Oe?I(ze,ct):m(ze,ct)}}var B=g.legend;if(!g._isShape&&Mm.traceIs(g,"pie-like")){var O=o.label,V=u.indexOf(O);if(a==="toggle")V===-1?u.push(O):u.splice(V,1);else if(a==="toggleothers"){var j=V!==-1,q=[];for(x=0;xy.showlegend||y.legendgroup),l=i.concat(s);function u(y){return(y.legend||"legend")===o}var c,f;if(n==="toggle")c=!l.some(function(C){return u(C)&&C.visible===!0}),f=!1;else{let y=l.some(function(C){return!u(C)&&C.visible===!0&&C.showlegend!==!1});c=!0,f=!y}let v={visible:[]},g=[],p=(a.shapes||[]).map(function(y){return y._input});for(var x=!1,_=0;_{"use strict";gfe.exports={scrollBarWidth:6,scrollBarMinHeight:20,scrollBarColor:"#808BA4",scrollBarMargin:4,scrollBarEnterAttrs:{rx:20,ry:3,width:0,height:0},titlePad:2,itemGap:5}});var xfe=fe((e0r,yfe)=>{"use strict";var{isArrayOrTypedArray:kO}=Gf(),mfe=bi(),CO=wT();yfe.exports=function(t,r,n){var a=r._inHover,i=CO.isGrouped(r),o=CO.isReversed(r),s={},l=[],u=!1,c={},f=0,v=0,g,p;function x(J,ee,ce){if(r.visible!==!1&&!(n&&J!==r._id))if(ee===""||!CO.isGrouped(r)){var ye="~~i"+f;l.push(ye),s[ye]=[ce],f++}else l.indexOf(ee)===-1?(l.push(ee),u=!0,s[ee]=[ce]):s[ee].push(ce)}for(g=0;gR&&(E=R)}m[g][0]._groupMinRank=E,m[g][0]._preGroupSort=g}var B=function(J,ee){return J[0]._groupMinRank-ee[0]._groupMinRank||J[0]._preGroupSort-ee[0]._preGroupSort},O=function(J,ee){var ce=kO(J.trace.legendrank)?J.trace.legendrank[J.i]:J.trace.legendrank,ye=kO(ee.trace.legendrank)?ee.trace.legendrank[ee.i]:ee.trace.legendrank;return ce-ye||J._preSort-ee._preSort};for(m.forEach(function(J,ee){J[0]._preGroupSort=ee}),m.sort(B),g=0;g{"use strict";var Gk=Xt();function _fe(e){return e.indexOf("e")!==-1?e.replace(/[.]?0+e/,"e"):e.indexOf(".")!==-1?e.replace(/[.]?0+$/,""):e}Vx.formatPiePercent=function(t,r){var n=_fe((t*100).toPrecision(3));return Gk.numSeparate(n,r)+"%"};Vx.formatPieValue=function(t,r){var n=_fe(t.toPrecision(10));return Gk.numSeparate(n,r)};Vx.getFirstFilled=function(t,r){if(Gk.isArrayOrTypedArray(t))for(var n=0;n{"use strict";var pgt=ea(),ggt=ni();bfe.exports=function(t,r,n,a){var i=n.marker.pattern;i&&i.shape?pgt.pointStyle(t,n,a,r):ggt.fill(t,r.color)}});var Jb=fe((n0r,Mfe)=>{"use strict";var Tfe=ni(),Afe=Sm().castOption,mgt=wfe();Mfe.exports=function(t,r,n,a){var i=n.marker.line,o=Afe(i.color,r.pts)||Tfe.defaultLine,s=Afe(i.width,r.pts)||0;t.call(mgt,r,n,a).style("stroke-width",s).call(Tfe.stroke,o)}});var DO=fe((i0r,Pfe)=>{"use strict";var td=xi(),LO=bi(),Sh=Xt(),Sfe=Sh.strTranslate,k0=ea(),rv=ni(),PO=Wf().extractOpts,Hk=Is(),ygt=Jb(),xgt=Sm().castOption,_gt=EO(),Efe=12,kfe=5,Gx=2,bgt=10,Qb=5;Pfe.exports=function(t,r,n){var a=r._fullLayout;n||(n=a.legend);var i=n.itemsizing==="constant",o=n.itemwidth,s=(o+_gt.itemGap*2)/2,l=Sfe(s,0),u=function(A,T,m,F){var E;if(A+1)E=A;else if(T&&T.width>0)E=T.width;else return 0;return i?F:Math.min(E,m)};t.each(function(A){var T=td.select(this),m=Sh.ensureSingle(T,"g","layers");m.style("opacity",A[0].trace.opacity);var F=n.indentation,E=n.valign,I=A[0].lineHeight,R=A[0].height;if(E==="middle"&&F===0||!I||!R)m.attr("transform",null);else{var B={top:1,bottom:-1}[E],O=B*(.5*(I-R+3))||0,V=n.indentation;m.attr("transform",Sfe(V,O))}var j=m.selectAll("g.legendfill").data([A]);j.enter().append("g").classed("legendfill",!0);var q=m.selectAll("g.legendlines").data([A]);q.enter().append("g").classed("legendlines",!0);var U=m.selectAll("g.legendsymbols").data([A]);U.enter().append("g").classed("legendsymbols",!0),U.selectAll("g.legendpoints").data([A]).enter().append("g").classed("legendpoints",!0)}).each(w).each(v).each(p).each(g).each(_).each(S).each(k).each(c).each(f).each(y).each(C);function c(A){var T=Cfe(A),m=T.showFill,F=T.showLine,E=T.showGradientLine,I=T.showGradientFill,R=T.anyFill,B=T.anyLine,O=A[0],V=O.trace,j,q,U=PO(V),J=U.colorscale,ee=U.reversescale,ce=function(ae){if(ae.size())if(m)k0.fillGroupStyle(ae,r,!0);else{var pe="legendfill-"+V.uid;k0.gradient(ae,r,pe,FO(ee),J,"fill")}},ye=function(ae){if(ae.size()){var pe="legendline-"+V.uid;k0.lineGroupStyle(ae),k0.gradient(ae,r,pe,FO(ee),J,"stroke")}},xe=Hk.hasMarkers(V)||!R?"M5,0":B?"M5,-2":"M5,-3",ue=td.select(this),K=ue.select(".legendfill").selectAll("path").data(m||I?[A]:[]);if(K.enter().append("path").classed("js-fill",!0),K.exit().remove(),K.attr("d",xe+"h"+o+"v6h-"+o+"z").call(ce),F||E){var _e=u(void 0,V.line,bgt,kfe);q=Sh.minExtend(V,{line:{width:_e}}),j=[Sh.minExtend(O,{trace:q})]}var ne=ue.select(".legendlines").selectAll("path").data(F||E?[j]:[]);ne.enter().append("path").classed("js-line",!0),ne.exit().remove(),ne.attr("d",xe+(E?"l"+o+",0.0001":"h"+o)).call(F?k0.lineGroupStyle:ye)}function f(A){var T=Cfe(A),m=T.anyFill,F=T.anyLine,E=T.showLine,I=T.showMarker,R=A[0],B=R.trace,O=!I&&!F&&!m&&Hk.hasText(B),V,j;function q(_e,ne,ae,pe){var ie=Sh.nestedProperty(B,_e).get(),le=Sh.isArrayOrTypedArray(ie)&&ne?ne(ie):ie;if(i&&le&&pe!==void 0&&(le=pe),ae){if(leae[1])return ae[1]}return le}function U(_e){return R._distinct&&R.index&&_e[R.index]?_e[R.index]:_e[0]}if(I||O||E){var J={},ee={};if(I){J.mc=q("marker.color",U);var ce=B.type==="scattermap";J.mx=ce?"circle":q("marker.symbol",U),J.mo=q("marker.opacity",Sh.mean,[.2,1]),J.mlc=q("marker.line.color",U),J.mlw=q("marker.line.width",Sh.mean,[0,5],Gx),J.mld=q("marker.line.dash",U),ee.marker={sizeref:1,sizemin:1,sizemode:"diameter"};var ye=q("marker.size",Sh.mean,[2,16],Efe);J.ms=ye,ee.marker.size=ye}E&&(ee.line={width:q("line.width",U,[0,10],kfe)}),O&&(J.tx="Aa",J.tp=q("textposition",U),J.ts=10,J.tc=q("textfont.color",U),J.tf=q("textfont.family",U),J.tw=q("textfont.weight",U),J.ty=q("textfont.style",U),J.tv=q("textfont.variant",U),J.tC=q("textfont.textcase",U),J.tE=q("textfont.lineposition",U),J.tS=q("textfont.shadow",U)),V=[Sh.minExtend(R,J)],j=Sh.minExtend(B,ee),j.selectedpoints=null,j.texttemplate=null}var xe=td.select(this).select("g.legendpoints"),ue=xe.selectAll("path.scatterpts").data(I?V:[]);ue.enter().insert("path",":first-child").classed("scatterpts",!0).attr("transform",l),ue.exit().remove(),ue.call(k0.pointStyle,j,r),I&&(V[0].mrc=3);var K=xe.selectAll("g.pointtext").data(O?V:[]);K.enter().append("g").classed("pointtext",!0).append("text").attr("transform",l),K.exit().remove(),K.selectAll("text").call(k0.textPointStyle,j,r)}function v(A){var T=A[0].trace,m=T.type==="waterfall";if(A[0]._distinct&&m){var F=A[0].trace[A[0].dir].marker;return A[0].mc=F.color,A[0].mlw=F.line.width,A[0].mlc=F.line.color,x(A,this,"waterfall")}var E=[];T.visible&&m&&(E=A[0].hasTotals?[["increasing","M-6,-6V6H0Z"],["totals","M6,6H0L-6,-6H-0Z"],["decreasing","M6,6V-6H0Z"]]:[["increasing","M-6,-6V6H6Z"],["decreasing","M6,6V-6H-6Z"]]);var I=td.select(this).select("g.legendpoints").selectAll("path.legendwaterfall").data(E);I.enter().append("path").classed("legendwaterfall",!0).attr("transform",l).style("stroke-miterlimit",1),I.exit().remove(),I.each(function(R){var B=td.select(this),O=T[R[0]].marker,V=u(void 0,O.line,Qb,Gx);B.attr("d",R[1]).style("stroke-width",V+"px").call(rv.fill,O.color),V&&B.call(rv.stroke,O.line.color)})}function g(A){x(A,this)}function p(A){x(A,this,"funnel")}function x(A,T,m){var F=A[0].trace,E=F.marker||{},I=E.line||{},R=E.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",B=m?F.visible&&F.type===m:LO.traceIs(F,"bar"),O=td.select(T).select("g.legendpoints").selectAll("path.legend"+m).data(B?[A]:[]);O.enter().append("path").classed("legend"+m,!0).attr("d",R).attr("transform",l),O.exit().remove(),O.each(function(V){var j=td.select(this),q=V[0],U=u(q.mlw,E.line,Qb,Gx);j.style("stroke-width",U+"px");var J=q.mcc;if(!n._inHover&&"mc"in q){var ee=PO(E),ce=ee.mid;ce===void 0&&(ce=(ee.max+ee.min)/2),J=k0.tryColorscale(E,"")(ce)}var ye=J||q.mc||E.color,xe=E.pattern,ue=k0.getPatternAttr,K=xe&&(ue(xe.shape,0,"")||ue(xe.path,0,""));if(K){var _e=ue(xe.bgcolor,0,null),ne=ue(xe.fgcolor,0,null),ae=xe.fgopacity,pe=Lfe(xe.size,8,10),ie=Lfe(xe.solidity,.5,1),le="legend-"+F.uid;j.call(k0.pattern,"legend",r,le,K,pe,ie,J,xe.fillmode,_e,ne,ae)}else j.call(rv.fill,ye);U&&rv.stroke(j,q.mlc||I.color)})}function _(A){var T=A[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendbox").data(T.visible&&LO.traceIs(T,"box-violin")?[A]:[]);m.enter().append("path").classed("legendbox",!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),m.exit().remove(),m.each(function(){var F=td.select(this);if((T.boxpoints==="all"||T.points==="all")&&rv.opacity(T.fillcolor)===0&&rv.opacity((T.line||{}).color)===0){var E=Sh.minExtend(T,{marker:{size:i?Efe:Sh.constrain(T.marker.size,2,16),sizeref:1,sizemin:1,sizemode:"diameter"}});m.call(k0.pointStyle,E,r)}else{var I=u(void 0,T.line,Qb,Gx);F.style("stroke-width",I+"px").call(rv.fill,T.fillcolor),I&&rv.stroke(F,T.line.color)}})}function y(A){var T=A[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendcandle").data(T.visible&&T.type==="candlestick"?[A,A]:[]);m.enter().append("path").classed("legendcandle",!0).attr("d",function(F,E){return E?"M-15,0H-8M-8,6V-6H8Z":"M15,0H8M8,-6V6H-8Z"}).attr("transform",l).style("stroke-miterlimit",1),m.exit().remove(),m.each(function(F,E){var I=td.select(this),R=T[E?"increasing":"decreasing"],B=u(void 0,R.line,Qb,Gx);I.style("stroke-width",B+"px").call(rv.fill,R.fillcolor),B&&rv.stroke(I,R.line.color)})}function C(A){var T=A[0].trace,m=td.select(this).select("g.legendpoints").selectAll("path.legendohlc").data(T.visible&&T.type==="ohlc"?[A,A]:[]);m.enter().append("path").classed("legendohlc",!0).attr("d",function(F,E){return E?"M-15,0H0M-8,-6V0":"M15,0H0M8,6V0"}).attr("transform",l).style("stroke-miterlimit",1),m.exit().remove(),m.each(function(F,E){var I=td.select(this),R=T[E?"increasing":"decreasing"],B=u(void 0,R.line,Qb,Gx);I.style("fill","none").call(k0.dashLine,R.line.dash,B),B&&rv.stroke(I,R.line.color)})}function k(A){L(A,this,"pie")}function S(A){L(A,this,"funnelarea")}function L(A,T,m){var F=A[0],E=F.trace,I=m?E.visible&&E.type===m:LO.traceIs(E,m),R=td.select(T).select("g.legendpoints").selectAll("path.legend"+m).data(I?[A]:[]);if(R.enter().append("path").classed("legend"+m,!0).attr("d","M6,6H-6V-6H6Z").attr("transform",l),R.exit().remove(),R.size()){var B=E.marker||{},O=u(xgt(B.line.width,F.pts),B.line,Qb,Gx),V="pieLike",j=Sh.minExtend(E,{marker:{line:{width:O}}},V),q=Sh.minExtend(F,{trace:j},V);ygt(R,q,j,r)}}function w(A){var T=A[0].trace,m,F=[];if(T.visible)switch(T.type){case"histogram2d":case"heatmap":F=[["M-15,-2V4H15V-2Z"]],m=!0;break;case"choropleth":case"choroplethmap":F=[["M-6,-6V6H6V-6Z"]],m=!0;break;case"densitymap":F=[["M-6,0 a6,6 0 1,0 12,0 a 6,6 0 1,0 -12,0"]],m="radial";break;case"cone":F=[["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"]],m=!1;break;case"streamtube":F=[["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"]],m=!1;break;case"surface":F=[["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"]],m=!0;break;case"mesh3d":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],m=!1;break;case"volume":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6H6L0,6Z"]],m=!0;break;case"isosurface":F=[["M-6,6H0L-6,-6Z"],["M6,6H0L6,-6Z"],["M-6,-6 A12,24 0 0,0 6,-6 L0,6Z"]],m=!1;break}var E=td.select(this).select("g.legendpoints").selectAll("path.legend3dandfriends").data(F);E.enter().append("path").classed("legend3dandfriends",!0).attr("transform",l).style("stroke-miterlimit",1),E.exit().remove(),E.each(function(I,R){var B=td.select(this),O=PO(T),V=O.colorscale,j=O.reversescale,q=function(ce){if(ce.size()){var ye="legendfill-"+T.uid;k0.gradient(ce,r,ye,FO(j,m==="radial"),V,"fill")}},U;if(V){if(!m){var ee=V.length;U=R===0?V[j?ee-1:0][1]:R===1?V[j?0:ee-1][1]:V[Math.floor((ee-1)/2)][1]}}else{var J=T.vertexcolor||T.facecolor||T.color;U=Sh.isArrayOrTypedArray(J)?J[R]||J[0]:J}B.attr("d",I[0]),U?B.call(rv.fill,U):B.call(q)})}};function FO(e,t){var r=t?"radial":"horizontal";return r+(e?"":"reversed")}function Cfe(e){var t=e[0].trace,r=t.contours,n=Hk.hasLines(t)||t.visible&&t.type==="quiver",a=Hk.hasMarkers(t),i=t.visible&&t.fill&&t.fill!=="none",o=!1,s=!1;if(r){var l=r.coloring;l==="lines"?o=!0:n=l==="none"||l==="heatmap"||r.showlines,r.type==="constraint"?i=r._operation!=="=":(l==="fill"||l==="heatmap")&&(s=!0)}return{showMarker:a,showLine:n,showFill:i,showGradientLine:o,showGradientFill:s,anyLine:n||o,anyFill:i||s}}function Lfe(e,t,r){return e&&Sh.isArrayOrTypedArray(e)?t:e>r?r:e}});var qO=fe((a0r,Nfe)=>{"use strict";var Ed=xi(),Ru=Xt(),IO=Hs(),Hx=bi(),Yk=Rb(),RO=ed(),Iu=ea(),TT=ni(),jx=as(),Ffe=SO().handleItemClick,Dfe=SO().handleTitleClick,ic=EO(),zO=nc(),Bfe=zO.LINE_SPACING,t3=zO.FROM_TL,Rfe=zO.FROM_BR,Ife=xfe(),wgt=DO(),r3=wT(),e3=1,Tgt=/^legend[0-9]*$/;Nfe.exports=function(t,r){if(r)zfe(t,r);else{var n=t._fullLayout,a=n._legends,i=n._infolayer.selectAll('[class^="legend"]');i.each(function(){var u=Ed.select(this),c=u.attr("class"),f=c.split(" ")[0];f.match(Tgt)&&a.indexOf(f)===-1&&u.remove()});for(var o=0;o1)}var p=n.hiddenlabels||[];if(!s&&(!n.showlegend||!l.length))return o.selectAll("."+a).remove(),n._topdefs.select("#"+i).remove(),IO.autoMargin(e,a);var x=Ru.ensureSingle(o,"g",a,function(T){s||T.attr("pointer-events","all")}),_=Ru.ensureSingleById(n._topdefs,"clipPath",i,function(T){T.append("rect")}),y=Ru.ensureSingle(x,"rect","bg",function(T){T.attr("shape-rendering","crispEdges")});y.call(TT.stroke,r.bordercolor).call(TT.fill,r.bgcolor).style("stroke-width",r.borderwidth+"px");var C=Ru.ensureSingle(x,"g","scrollbox"),k=r.title;r._titleWidth=0,r._titleHeight=0;var S;k.text?(S=Ru.ensureSingle(C,"text",a+"titletext"),S.attr("text-anchor","start").call(Iu.font,k.font).text(k.text),Wk(S,C,e,r,e3),!s&&(r.titleclick||r.titledoubleclick)&&Egt(C,e,r,a)):(C.selectAll("."+a+"titletext").remove(),C.selectAll("."+a+"titletoggle").remove());var L=Ru.ensureSingle(x,"rect","scrollbar",function(T){T.attr(ic.scrollBarEnterAttrs).call(TT.fill,ic.scrollBarColor)}),w=C.selectAll("g.groups").data(l);w.enter().append("g").attr("class","groups"),w.exit().remove();var A=w.selectAll("g.traces").data(Ru.identity);A.enter().append("g").attr("class","traces"),A.exit().remove(),A.style("opacity",function(T){let m=T[0],F=m.trace;if(m.groupTitle){let E=F.legendgroup,I=(n.shapes||[]).filter(function(B){return B.showlegend});return e._fullData.concat(I).some(function(B){return B.legendgroup===E&&(B.legend||"legend")===a&&B.visible===!0})?1:.5}return Hx.traceIs(F,"pie-like")?p.indexOf(T[0].label)!==-1?.5:1:F.visible==="legendonly"?.5:1}).each(function(){Ed.select(this).call(Mgt,e,r)}).call(wgt,e,r).each(function(T){s||T[0].groupTitle&&r.groupclick==="toggleitem"||Ed.select(this).call(Sgt,e,a)}),Ru.syncOrAsync([IO.previousPromises,function(){return Lgt(e,w,A,r,C)},function(){var T=n._size,m=r.borderwidth,F=r.xref==="paper",E=r.yref==="paper";if(k.text){let De=(n.shapes||[]).filter(function(ht){return ht.showlegend}),Ge=e._fullData.concat(De).some(function(ht){let it=ht.legend||"legend";var Oe=Array.isArray(it)?it.includes(a):it===a;return Oe&&ht.visible===!0});S.style("opacity",Ge?1:.5)}if(!s){var I,R;F?I=T.l+T.w*r.x-t3[Xk(r)]*r._width:I=n.width*r.x-t3[Xk(r)]*r._width,E?R=T.t+T.h*(1-r.y)-t3[Zk(r)]*r._effHeight:R=n.height*(1-r.y)-t3[Zk(r)]*r._effHeight;var B=Pgt(e,a,I,R);if(B)return;if(n.margin.autoexpand){var O=I,V=R;I=F?Ru.constrain(I,0,n.width-r._width):O,R=E?Ru.constrain(R,0,n.height-r._effHeight):V,I!==O&&Ru.log("Constrain "+a+".x to make legend fit inside graph"),R!==V&&Ru.log("Constrain "+a+".y to make legend fit inside graph")}Iu.setTranslate(x,I,R)}if(L.on(".drag",null),x.on("wheel",null),s||r._height<=r._maxHeight||e._context.staticPlot){var j=r._effHeight;s&&(j=r._height),y.attr({width:r._width-m,height:j-m,x:m/2,y:m/2}),Iu.setTranslate(C,0,0),_.select("rect").attr({width:r._width-2*m,height:j-2*m,x:m,y:m}),Iu.setClipUrl(C,i,e),Iu.setRect(L,0,0,0,0),delete r._scrollY}else{var q=Math.max(ic.scrollBarMinHeight,r._effHeight*r._effHeight/r._height),U=r._effHeight-q-2*ic.scrollBarMargin,J=r._height-r._effHeight,ee=U/J,ce=Math.min(r._scrollY||0,J);y.attr({width:r._width-2*m+ic.scrollBarWidth+ic.scrollBarMargin,height:r._effHeight-m,x:m/2,y:m/2}),_.select("rect").attr({width:r._width-2*m+ic.scrollBarWidth+ic.scrollBarMargin,height:r._effHeight-2*m,x:m,y:m+ce}),Iu.setClipUrl(C,i,e),pe(ce,q,ee),x.on("wheel",function(){ce=Ru.constrain(r._scrollY+Ed.event.deltaY/J*U,0,J),pe(ce,q,ee),ce!==0&&ce!==J&&Ed.event.preventDefault()});var ye,xe,ue,K=function(De,Ge,ht){var it=(ht-Ge)/ee+De;return Ru.constrain(it,0,J)},_e=function(De,Ge,ht){var it=(Ge-ht)/ee+De;return Ru.constrain(it,0,J)},ne=Ed.behavior.drag().on("dragstart",function(){var De=Ed.event.sourceEvent;De.type==="touchstart"?ye=De.changedTouches[0].clientY:ye=De.clientY,ue=ce}).on("drag",function(){var De=Ed.event.sourceEvent;De.buttons===2||De.ctrlKey||(De.type==="touchmove"?xe=De.changedTouches[0].clientY:xe=De.clientY,ce=K(ue,ye,xe),pe(ce,q,ee))});L.call(ne);var ae=Ed.behavior.drag().on("dragstart",function(){var De=Ed.event.sourceEvent;De.type==="touchstart"&&(ye=De.changedTouches[0].clientY,ue=ce)}).on("drag",function(){var De=Ed.event.sourceEvent;De.type==="touchmove"&&(xe=De.changedTouches[0].clientY,ce=_e(ue,ye,xe),pe(ce,q,ee))});C.call(ae)}function pe(De,Ge,ht){r._scrollY=e._fullLayout[a]._scrollY=De,Iu.setTranslate(C,0,-De),Iu.setRect(L,r._width,ic.scrollBarMargin+De*ht,ic.scrollBarWidth,Ge),_.select("rect").attr("y",m+De)}if(e._context.edits.legendPosition){var ie,le,me,be;x.classed("cursor-move",!0),RO.init({element:x.node(),gd:e,prepFn:function(De){if(De.target!==L.node()){var Ge=Iu.getTranslate(x);me=Ge.x,be=Ge.y}},moveFn:function(De,Ge){if(me!==void 0&&be!==void 0){var ht=me+De,it=be+Ge;Iu.setTranslate(x,ht,it),ie=RO.align(ht,r._width,T.l,T.l+T.w,r.xanchor),le=RO.align(it+r._height,-r._height,T.t+T.h,T.t,r.yanchor)}},doneFn:function(){if(ie!==void 0&&le!==void 0){var De={};De[a+".x"]=ie,De[a+".y"]=le,Hx.call("_guiRelayout",e,De)}},clickFn:function(De,Ge){var ht=o.selectAll("g.traces").filter(function(){var it=this.getBoundingClientRect();return Ge.clientX>=it.left&&Ge.clientX<=it.right&&Ge.clientY>=it.top&&Ge.clientY<=it.bottom});ht.size()>0&&Ofe(e,r,ht,De,Ge)}})}}],e)}}function jk(e,t,r){var n=e[0],a=n.width,i=t.entrywidthmode,o=n.trace.legendwidth||t.entrywidth;return i==="fraction"?t._maxWidth*o:r+(o||a)}function Ofe(e,t,r,n,a){var i=e._fullLayout,o=r.data()[0][0].trace,s=t.itemclick,l=t.itemdoubleclick,u={event:a,node:r.node(),curveNumber:o.index,expandedIndex:o.index,data:e.data,layout:e.layout,frames:e._transitionData._frames,config:e._context,fullData:e._fullData,fullLayout:i};o._group&&(u.group=o._group),Hx.traceIs(o,"pie-like")&&(u.label=r.datum()[0].label);var c=Yk.triggerHandler(e,"plotly_legendclick",u);if(n===1){if(c===!1)return;t._clickTimeout=setTimeout(function(){e._fullLayout&&s&&Ffe(r,e,t,s)},e._context.doubleClickDelay)}else if(n===2){t._clickTimeout&&clearTimeout(t._clickTimeout),e._legendMouseDownTime=0;var f=Yk.triggerHandler(e,"plotly_legenddoubleclick",u);f!==!1&&c!==!1&&l&&Ffe(r,e,t,l)}}function Mgt(e,t,r){var n=r3.getId(r),a=e.data()[0][0],i=a.trace,o=Hx.traceIs(i,"pie-like"),s=!r._inHover&&t._context.edits.legendText&&!o,l=r._maxNameLength,u,c;a.groupTitle?(u=a.groupTitle.text,c=a.groupTitle.font):(c=r.font,r.entries?u=a.text:(u=o?a.label:i.name,i._meta&&(u=Ru.templateString(u,i._meta))));var f=Ru.ensureSingle(e,"text",n+"text");f.attr("text-anchor","start").call(Iu.font,c).text(s?qfe(u,l):u);var v=r.indentation+r.itemwidth+ic.itemGap*2;jx.positionText(f,v,0),s?f.call(jx.makeEditable,{gd:t,text:u}).call(Wk,e,t,r).on("edit",function(g){this.text(qfe(g,l)).call(Wk,e,t,r);var p={};return p.name=g,a.trace._isShape?Hx.call("_guiRelayout",t,"shapes["+i.index+"].name",p.name):Hx.call("_guiRestyle",t,p,i.index)}):Wk(f,e,t,r)}function qfe(e,t){var r=Math.max(4,t);if(e&&e.trim().length>=r/2)return e;e=e||"";for(var n=r-e.length;n>0;n--)e+=" ";return e}function Sgt(e,t,r){var n=t._context.doubleClickDelay,a,i=1,o=Ru.ensureSingle(e,"rect",r+"toggle",function(s){t._context.staticPlot||s.style("cursor","pointer").attr("pointer-events","all"),s.call(TT.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(o.on("mousedown",function(){a=new Date().getTime(),a-t._legendMouseDownTimen&&(i=Math.max(i-1,1)),Ofe(t,s,e,i,Ed.event)}}))}function Egt(e,t,r,n){if(t._fullData.some(function(u){let c=u.legend||"legend";return(Array.isArray(c)?c.includes(n):c===n)&&Hx.traceIs(u,"pie-like")}))return;let i=t._context.doubleClickDelay;var o,s=1;let l=Ru.ensureSingle(e,"rect",n+"titletoggle",function(u){t._context.staticPlot||u.style("cursor","pointer").attr("pointer-events","all"),u.call(TT.fill,"rgba(0,0,0,0)")});t._context.staticPlot||(l.on("mousedown",function(){o=new Date().getTime(),o-t._legendMouseDownTimei&&(s=Math.max(s-1,1));let u={event:Ed.event,legendId:n,data:t.data,layout:t.layout,fullData:t._fullData,fullLayout:t._fullLayout};if(s===1&&r.titleclick){if(Yk.triggerHandler(t,"plotly_legendtitleclick",u)===!1)return;r._titleClickTimeout=setTimeout(function(){t._fullLayout&&Dfe(t,r,r.titleclick)},i)}else s===2&&(r._titleClickTimeout&&clearTimeout(r._titleClickTimeout),t._legendMouseDownTime=0,Yk.triggerHandler(t,"plotly_legendtitledoubleclick",u)!==!1&&r.titledoubleclick&&Dfe(t,r,r.titledoubleclick))}))}function Wk(e,t,r,n,a){n._inHover&&e.attr("data-notex",!0),jx.convertToTspans(e,r,function(){kgt(t,r,n,a)})}function kgt(e,t,r,n){var a=e.data()[0][0],i=a&&a.trace.showlegend;if(Array.isArray(i)&&(i=i[a.i]!==!1),!r._inHover&&a&&!i){e.remove();return}var o=e.select("g[class*=math-group]"),s=o.node(),l=r3.getId(r);r||(r=t._fullLayout[l]);var u=r.borderwidth,c;n===e3?c=r.title.font:a.groupTitle?c=a.groupTitle.font:c=r.font;var f=c.size*Bfe,v,g;if(s){var p=Iu.bBox(s);v=p.height,g=p.width,n===e3?Iu.setTranslate(o,u,u+v*.75):Iu.setTranslate(o,0,v*.25)}else{var x="."+l+(n===e3?"title":"")+"text",_=e.select(x),y=jx.lineCount(_),C=_.node();if(v=f*y,g=C?Iu.bBox(C).width:0,n===e3)r.title.side==="left"&&(g+=ic.itemGap*2),jx.positionText(_,u+ic.titlePad,u+f);else{var k=ic.itemGap*2+r.indentation+r.itemwidth;a.groupTitle&&(k=ic.itemGap,g-=r.indentation+r.itemwidth),jx.positionText(_,k,-f*((y-1)/2-.3))}}n===e3?(r._titleWidth=g,r._titleHeight=v):(a.lineHeight=f,a.height=Math.max(v,16)+3,a.width=g)}function Cgt(e){var t=0,r=0,n=e.title.side;return n&&(n.indexOf("left")!==-1&&(t=e._titleWidth),n.indexOf("top")!==-1&&(r=e._titleHeight)),[t,r]}function Lgt(e,t,r,n,a){var i=e._fullLayout,o=r3.getId(n);n||(n=i[o]);var s=i._size,l=r3.isVertical(n),u=r3.isGrouped(n),c=n.entrywidthmode==="fraction",f=n.borderwidth,v=2*f,g=ic.itemGap,p=n.indentation+n.itemwidth+g*2,x=2*(f+g),_=Zk(n),y=n.y<0||n.y===0&&_==="top",C=n.y>1||n.y===1&&_==="bottom",k=n.tracegroupgap,S={};let{orientation:L,yref:w}=n,{maxheight:A}=n,T=y||C||L!=="v"||w!=="paper";A||(A=T?.5:1);let m=T?i.height:s.h;n._maxHeight=Math.max(A>1?A:A*m,30);var F=0;n._width=0,n._height=0;var E=Cgt(n);if(l)r.each(function(De){var Ge=De[0].height;Iu.setTranslate(this,f+E[0],f+E[1]+n._height+Ge/2+g),n._height+=Ge,n._width=Math.max(n._width,De[0].width)}),F=p+n._width,n._width+=g+p+v,n._height+=x,u&&(t.each(function(De,Ge){Iu.setTranslate(this,0,Ge*n.tracegroupgap)}),n._height+=(n._lgroupsLength-1)*n.tracegroupgap);else{var I=Xk(n),R=n.x<0||n.x===0&&I==="right",B=n.x>1||n.x===1&&I==="left",O=C||y,V=i.width/2;n._maxWidth=Math.max(R?O&&I==="left"?s.l+s.w:V:B?O&&I==="right"?s.r+s.w:V:s.w,2*p);var j=0,q=0;r.each(function(De){var Ge=jk(De,n,p);j=Math.max(j,Ge),q+=Ge}),F=null;var U=0;if(u){var J=0,ee=0,ce=0;t.each(function(){var De=0,Ge=0;Ed.select(this).selectAll("g.traces").each(function(it){var Oe=jk(it,n,p),ze=it[0].height;Iu.setTranslate(this,E[0],E[1]+f+g+ze/2+Ge),Ge+=ze,De=Math.max(De,Oe),S[it[0].trace.legendgroup]=De});var ht=De+g;ee>0&&ht+f+ee>n._maxWidth?(U=Math.max(U,ee),ee=0,ce+=J+k,J=Ge):J=Math.max(J,Ge),Iu.setTranslate(this,ee,ce),ee+=ht}),n._width=Math.max(U,ee)+f,n._height=ce+J+x}else{var ye=r.size(),xe=q+v+(ye-1)*g=n._maxWidth&&(U=Math.max(U,ne),K=0,_e+=ue,n._height+=ue,ue=0),Iu.setTranslate(this,E[0]+f+K,E[1]+f+_e+Ge/2+g),ne=K+ht+g,K+=it,ue=Math.max(ue,Ge)}),xe?(n._width=K+v,n._height=ue+x):(n._width=Math.max(U,ne)+v,n._height+=ue+x)}}n._width=Math.ceil(Math.max(n._width+E[0],n._titleWidth+2*(f+ic.titlePad))),n._height=Math.ceil(Math.max(n._height+E[1],n._titleHeight+2*(f+ic.itemGap))),n._effHeight=Math.min(n._height,n._maxHeight);var ae=e._context.edits,pe=ae.legendText||ae.legendPosition;r.each(function(De){var Ge=Ed.select(this).select("."+o+"toggle"),ht=De[0].height,it=De[0].trace.legendgroup,Oe=jk(De,n,p);u&&it!==""&&(Oe=S[it]);var ze=pe?p:F||Oe;!l&&!c&&(ze+=g/2),Iu.setRect(Ge,0,-ht/2,ze,ht)});var ie=a.select("."+o+"titletext");ie.node()&&Agt(ie,n,f);var le=a.select("."+o+"titletoggle");if(le.size()&&ie.node()){var me=ie.attr("x")||0,be=ic.titlePad;Iu.setRect(le,me-be,f,n._titleWidth+2*be,n._titleHeight+2*be)}}function Pgt(e,t,r,n){var a=e._fullLayout,i=a[t],o=Xk(i),s=Zk(i),l=i.xref==="paper",u=i.yref==="paper";e._fullLayout._reservedMargin[t]={};var c=i.y<.5?"b":"t",f=i.x<.5?"l":"r",v={r:a.width-r,l:r+i._width,b:a.height-n,t:n+i._effHeight};if(l&&u)return IO.autoMargin(e,t,{x:i.x,y:i.y,l:i._width*t3[o],r:i._width*Rfe[o],b:i._effHeight*Rfe[s],t:i._effHeight*t3[s]});l?e._fullLayout._reservedMargin[t][c]=v[c]:u||i.orientation==="v"?e._fullLayout._reservedMargin[t][f]=v[f]:e._fullLayout._reservedMargin[t][c]=v[c]}function Xk(e){return Ru.isRightAnchor(e)?"right":Ru.isCenterAnchor(e)?"center":"left"}function Zk(e){return Ru.isBottomAnchor(e)?"bottom":Ru.isMiddleAnchor(e)?"middle":"top"}});var UO=fe(NO=>{"use strict";var Wx=xi(),eg=aa(),tu=Xt(),Fgt=tu.pushUnique,BO=tu.strTranslate,Dgt=tu.strRotate,Rgt=Rb(),nv=as(),Igt=hfe(),Xp=ea(),ac=ni(),$k=ed(),Zp=Yi(),zgt=rc().zindexSeparator,i3=bi(),C0=Sd(),Yx=L4(),qgt=TO(),Bgt=qO(),Xfe=Yx.YANGLE,OO=Math.PI*Xfe/180,Ogt=1/Math.sin(OO),Ngt=Math.cos(OO),Ugt=Math.sin(OO),yl=Yx.HOVERARROWSIZE,go=Yx.HOVERTEXTPAD,Ufe={box:!0,ohlc:!0,violin:!0,candlestick:!0},Vgt={scatter:!0,scattergl:!0,splom:!0};function Vfe(e,t){return e.distance-t.distance}NO.hover=function(t,r,n,a){t=tu.getGraphDiv(t);var i=r.target;tu.throttle(t._fullLayout._uid+Yx.HOVERID,Yx.HOVERMINTIME,function(){Ggt(t,r,n,a,i)})};NO.loneHover=function(t,r){var n=!0;Array.isArray(t)||(n=!1,t=[t]);var a=r.gd,i=Qfe(a),o=ehe(a),s=t.map(function(_){var y=_._x0||_.x0||_.x||0,C=_._x1||_.x1||_.x||0,k=_._y0||_.y0||_.y||0,S=_._y1||_.y1||_.y||0,L=_.eventData;if(L){var w=Math.min(y,C),A=Math.max(y,C),T=Math.min(k,S),m=Math.max(k,S),F=_.trace;if(i3.traceIs(F,"gl3d")){var E=a._fullLayout[F.scene]._scene.container,I=E.offsetLeft,R=E.offsetTop;w+=I,A+=I,T+=R,m+=R}L.bbox={x0:w+o,x1:A+o,y0:T+i,y1:m+i},L.xPixel=(y+C)/2,L.yPixel=(k+S)/2,r.inOut_bbox&&r.inOut_bbox.push(L.bbox)}else L=!1;return{color:_.color||ac.defaultLine,x0:_.x0||_.x||0,x1:_.x1||_.x||0,y0:_.y0||_.y||0,y1:_.y1||_.y||0,xLabel:_.xLabel,yLabel:_.yLabel,zLabel:_.zLabel,text:_.text,name:_.name,idealAlign:_.idealAlign,borderColor:_.borderColor,fontFamily:_.fontFamily,fontSize:_.fontSize,fontColor:_.fontColor,fontWeight:_.fontWeight,fontStyle:_.fontStyle,fontVariant:_.fontVariant,nameLength:_.nameLength,textAlign:_.textAlign,trace:_.trace||{index:0,hoverinfo:""},xa:{_offset:0},ya:{_offset:0},index:0,hovertemplate:_.hovertemplate||!1,hovertemplateLabels:_.hovertemplateLabels||!1,eventData:L}}),l=!1,u=$fe(s,{gd:a,hovermode:"closest",rotateLabels:l,bgColor:r.bgColor||ac.background,container:Wx.select(r.container),outerContainer:r.outerContainer||r.container}),c=u.hoverLabels,f=5,v=0,g=0;c.sort(function(_,y){return _.y0-y.y0}).each(function(_,y){var C=_.y0-_.by/2;C-fA[0]._length||be<0||be>T[0]._length)return $k.unhoverRaw(e,t)}if(t.pointerX=me+A[0]._offset,t.pointerY=be+T[0]._offset,"xval"in t?V=C0.flat(i,t.xval):V=C0.p2c(A,me),"yval"in t?j=C0.flat(i,t.yval):j=C0.p2c(T,be),e._hoverPointerX=t.pointerX,e._hoverPointerY=t.pointerY,!eg(V[0])||!eg(j[0]))return tu.warn("Fx.hover failed",t,e),$k.unhoverRaw(e,t)}s.clickanywhere&&(e._hoverXVals=V,e._hoverYVals=j,e._hoverXAxes=A,e._hoverYAxes=T);var ht=1/0;function it(Ut,_r){for(U=0;Une&&(B.splice(0,ne),ht=B[0].distance),f&&R!==0&&B.length===0){_e.distance=R,_e.index=!1;var Jn=ee._module.hoverPoints(_e,ue,K,"closest",{hoverLayer:s._hoverlayer});if(Jn&&(Jn=Jn.filter(function(Xi){return Xi.spikeDistance<=R})),Jn&&Jn.length){var Ii,Vi=Jn.filter(function(Xi){return Xi.xa.showspikes&&Xi.xa.spikesnap!=="hovered data"});if(Vi.length){var ra=Vi[0];eg(ra.x0)&&eg(ra.y0)&&(Ii=ze(ra),(!ae.vLinePoint||ae.vLinePoint.spikeDistance>Ii.spikeDistance)&&(ae.vLinePoint=Ii))}var ha=Jn.filter(function(Xi){return Xi.ya.showspikes&&Xi.ya.spikesnap!=="hovered data"});if(ha.length){var va=ha[0];eg(va.x0)&&eg(va.y0)&&(Ii=ze(va),(!ae.hLinePoint||ae.hLinePoint.spikeDistance>Ii.spikeDistance)&&(ae.hLinePoint=Ii))}}}}}it();function Oe(Ut,_r,rn){for(var Jr=null,qn=1/0,ri,Jn=0;JnUt.trace.index===We.trace.index):B=[We];var mt=B.length,bt=Yfe("x",We,s),Yt=Yfe("y",We,s);it(bt,Yt);var jt=[],mr={},or=0,fr=function(Ut){var _r=Ufe[Ut.trace.type]?Zfe(Ut):Ut.trace.index;if(!mr[_r])or++,mr[_r]=or,jt.push(Ut);else{var rn=mr[_r]-1,Jr=jt[rn];rn>0&&Math.abs(Ut.distance)mt-1;Ot--)fr(B[Ot]);B=jt,we()}var cr=e._hoverdata,Ct=[],wt=Qfe(e),Tt=ehe(e);for(let Ut of B){var Mt=C0.makeEventData(Ut,Ut.trace,Ut.cd);if(Ut.hovertemplate!==!1){var Lt=!1;Ut.cd[Ut.index]&&Ut.cd[Ut.index].ht&&(Lt=Ut.cd[Ut.index].ht),Ut.hovertemplate=Lt||Ut.trace.hovertemplate||!1}if(Ut.xa&&Ut.ya){var ft=Ut.x0+Ut.xa._offset,kt=Ut.x1+Ut.xa._offset,rr=Ut.y0+Ut.ya._offset,pr=Ut.y1+Ut.ya._offset,Kr=Math.min(ft,kt),Nr=Math.max(ft,kt),dn=Math.min(rr,pr),xr=Math.max(rr,pr);Mt.bbox={x0:Kr+Tt,x1:Nr+Tt,y0:dn+wt,y1:xr+wt},Mt.xPixel=(ft+kt)/2,Mt.yPixel=(rr+pr)/2}Ut.eventData=[Mt],Ct.push(Mt)}e._hoverdata=Ct;var Fr=v==="y"&&(O.length>1||B.length>1)||v==="closest"&&pe&&B.length>1,Zr=ac.combine(s.plot_bgcolor||ac.background,s.paper_bgcolor),Cn=$fe(B,{gd:e,hovermode:v,rotateLabels:Fr,bgColor:Zr,container:s._hoverlayer,outerContainer:s._paper.node(),commonLabelOpts:s.hoverlabel,hoverdistance:s.hoverdistance}),Dt=Cn.hoverLabels;if(C0.isUnifiedHover(v)||(jgt(Dt,Fr,s,Cn.commonLabelBoundingBox),Jfe(Dt,Fr,s._invScaleX,s._invScaleY)),a&&a.tagName){var At=i3.getComponentMethod("annotations","hasClickToShow")(e,Ct);Igt(Wx.select(a),At?"pointer":"")}var Vt=Xgt(e,t,cr);if(!a||n||!Vt&&!s.hoveranywhere)return;cr&&Vt&&e.emit("plotly_unhover",{event:t,points:cr}),Qt(e._hoverdata);function Qt(Ut){e.emit("plotly_hover",{event:t,points:Ut,xaxes:A,yaxes:T,xvals:C0.c2dApply(A,V),yvals:C0.c2dApply(T,j),xPixel:t.pointerX,yPixel:t.pointerY})}}function Zfe(e){return[e.trace.index,e.index,e.x0,e.y0,e.name,e.attr,e.xa?e.xa._id:"",e.ya?e.ya._id:""].join(",")}var Hgt=/([\s\S]*)<\/extra>/;function $fe(e,t){var r=t.gd,n=r._fullLayout,a=t.hovermode,i=t.rotateLabels,o=t.bgColor,s=t.container,l=t.outerContainer,u=t.commonLabelOpts||{};if(e.length===0)return[[]];var c=t.fontFamily||Yx.HOVERFONT,f=t.fontSize||Yx.HOVERFONTSIZE,v=t.fontWeight||n.font.weight,g=t.fontStyle||n.font.style,p=t.fontVariant||n.font.variant,x=t.fontTextcase||n.font.textcase,_=t.fontLineposition||n.font.lineposition,y=t.fontShadow||n.font.shadow,C=e[0],k=C.xa,S=C.ya,L=a.charAt(0),w=L+"Label",A=C[w];if(A===void 0&&k.type==="multicategory")for(var T=0;Tn.width-Ct&&(wt=n.width-Ct),nt.attr("d","M"+(fr-wt)+",0L"+(fr-wt+yl)+","+cr+yl+"H"+Ct+"v"+cr+(go*2+or.height)+"H"+-Ct+"V"+cr+yl+"H"+(fr-wt-yl)+"Z"),fr=wt,U.minX=fr-Ct,U.maxX=fr+Ct,k.side==="top"?(U.minY=Ot-(go*2+or.height),U.maxY=Ot-go):(U.minY=Ot+go,U.maxY=Ot+(go*2+or.height))}else{var Tt,Mt,Lt;S.side==="right"?(Tt="start",Mt=1,Lt="",fr=k._offset+k._length):(Tt="end",Mt=-1,Lt="-",fr=k._offset),Ot=S._offset+(C.y0+C.y1)/2,We.attr("text-anchor",Tt),nt.attr("d","M0,0L"+Lt+yl+","+yl+"V"+(go+or.height/2)+"h"+Lt+(go*2+or.width)+"V-"+(go+or.height/2)+"H"+Lt+yl+"V-"+yl+"Z"),U.minY=Ot-(go+or.height/2),U.maxY=Ot+(go+or.height/2),S.side==="right"?(U.minX=fr+yl,U.maxX=fr+yl+(go*2+or.width)):(U.minX=fr-yl-(go*2+or.width),U.maxX=fr-yl);var ft=or.height/2,kt=F-or.top-ft,rr="clip"+n._uid+"commonlabel"+S._id,pr;if(frnt.hoverinfo!=="none");if(tt.length===0)return[];var J=n.hoverlabel,ee=J.font,ce=tt[0],ye=((a==="x unified"?ce.xa:ce.ya).unifiedhovertitle||{}).text,xe=ye?tu.hovertemplateString({data:a==="x unified"?[{xa:ce.xa,x:ce.xVal}]:[{ya:ce.ya,y:ce.yVal}],fallback:ce.trace.hovertemplatefallback,locale:n._d3locale,template:ye}):A,ue={showlegend:!0,legend:{title:{text:xe,font:ee},font:ee,bgcolor:J.bgcolor,bordercolor:J.bordercolor,borderwidth:1,tracegroupgap:7,traceorder:n.legend?n.legend.traceorder:void 0,orientation:"v"}},K={font:ee};qgt(ue,K,r._fullData);var _e=K.legend;_e.entries=[];for(var ne=0;ne=0?Ve=we:Le+Ge=0?Ve=Le:Ke+Ge=0?$e=et:qe+ht=0?$e=qe:Te+ht=0,(tt.idealAlign==="top"||!dn)&&xr?(Lt-=kt/2,tt.anchor="end"):dn?(Lt+=kt/2,tt.anchor="start"):tt.anchor="middle",tt.crossPos=Lt;else{if(tt.pos=Lt,dn=Mt+ft/2+Nr<=E,xr=Mt-ft/2-Nr>=0,(tt.idealAlign==="left"||!dn)&&xr)Mt-=ft/2,tt.anchor="end";else if(dn)Mt+=ft/2,tt.anchor="start";else{tt.anchor="middle";var Fr=Nr/2,Zr=Mt+Fr-E,Cn=Mt-Fr;Zr>0&&(Mt-=Zr),Cn<0&&(Mt+=-Cn)}tt.crossPos=Mt}Ot.attr("text-anchor",tt.anchor),Ct&&cr.attr("text-anchor",tt.anchor),nt.attr("transform",BO(Mt,Lt)+(i?Dgt(Xfe):""))}),{hoverLabels:ot,commonLabelBoundingBox:U}}function Gfe(e,t,r,n,a,i){var f,v;var o="",s="";e.nameOverride!==void 0&&(e.name=e.nameOverride),e.name&&(e.trace._meta&&(e.name=tu.templateString(e.name,e.trace._meta)),o=Wfe(e.name,e.nameLength));var l=r.charAt(0),u=l==="x"?"y":"x";e.zLabel!==void 0?(e.xLabel!==void 0&&(s+="x: "+e.xLabel+"
"),e.yLabel!==void 0&&(s+="y: "+e.yLabel+"
"),e.trace.type!=="choropleth"&&e.trace.type!=="choroplethmap"&&(s+=(s?"z: ":"")+e.zLabel)):t&&e[l+"Label"]===a?s=e[u+"Label"]||"":e.xLabel===void 0?e.yLabel!==void 0&&e.trace.type!=="scattercarpet"&&(s=e.yLabel):e.yLabel===void 0?s=e.xLabel:s="("+e.xLabel+", "+e.yLabel+")",(e.text||e.text===0)&&!Array.isArray(e.text)&&(s+=(s?"
":"")+e.text),e.extraText!==void 0&&(s+=(s?"
":"")+e.extraText),i&&s===""&&!e.hovertemplate&&(o===""&&i.remove(),s=o),(v=(f=e.trace)==null?void 0:f.hoverlabel)!=null&&v.split&&(e.hovertemplate="");let{hovertemplate:c=!1}=e;if(c){let g=e.hovertemplateLabels||e;e[l+"Label"]!==a&&(g[l+"other"]=g[l+"Val"],g[l+"otherLabel"]=g[l+"Label"]),s=tu.hovertemplateString({data:[e.eventData[0]||{},e.trace._meta],fallback:e.trace.hovertemplatefallback,labels:g,locale:n._d3locale,template:c}),s=s.replace(Hgt,(p,x)=>(o=Wfe(x,e.nameLength),""))}return[s,o]}function jgt(e,t,r,n){var a=t?"xa":"ya",i=t?"ya":"xa",o=0,s=1,l=e.size(),u=new Array(l),c=0,f=n.minX,v=n.maxX,g=n.minY,p=n.maxY,x=function(V){return V*r._invScaleX},_=function(V){return V*r._invScaleY};e.each(function(V){var j=V[a],q=V[i],U=j._id.charAt(0)==="x",J=j.range;c===0&&J&&J[0]>J[1]!==U&&(s=-1);var ee=0,ce=U?r.width:r.height;if(r.hovermode==="x"||r.hovermode==="y"){var ye=Kfe(V,t),xe=V.anchor,ue=xe==="end"?-1:1,K,_e;if(xe==="middle")K=V.crossPos+(U?_(ye.y-V.by/2):x(V.bx/2+V.tx2width/2)),_e=K+(U?_(V.by):x(V.bx));else if(U)K=V.crossPos+_(yl+ye.y)-_(V.by/2-yl),_e=K+_(V.by);else{var ne=x(ue*yl+ye.x),ae=ne+x(ue*V.bx);K=V.crossPos+Math.min(ne,ae),_e=V.crossPos+Math.max(ne,ae)}U?g!==void 0&&p!==void 0&&Math.min(_e,p)-Math.max(K,g)>1&&(q.side==="left"?(ee=q._mainLinePosition,ce=r.width):ce=q._mainLinePosition):f!==void 0&&v!==void 0&&Math.min(_e,v)-Math.max(K,f)>1&&(q.side==="top"?(ee=q._mainLinePosition,ce=r.height):ce=q._mainLinePosition)}u[c++]=[{datum:V,traceIndex:V.trace.index,dp:0,pos:V.pos,posref:V.posref,size:V.by*(U?Ogt:1)/2,pmin:ee,pmax:ce}]}),u.sort(function(V,j){return V[0].posref-j[0].posref||s*(j[0].traceIndex-V[0].traceIndex)});var y,C,k,S,L,w,A;function T(V){var j=V[0],q=V[V.length-1];if(C=j.pmin-j.pos-j.dp+j.size,k=q.pos+q.dp+q.size-j.pmax,C>.01){for(L=V.length-1;L>=0;L--)V[L].dp+=C;y=!1}if(!(k<.01)){if(C<-.01){for(L=V.length-1;L>=0;L--)V[L].dp-=k;y=!1}if(y){var U=0;for(S=0;Sj.pmax&&U++;for(S=V.length-1;S>=0&&!(U<=0);S--)w=V[S],w.pos>j.pmax-1&&(w.del=!0,U--);for(S=0;S=0;L--)V[L].dp-=k;for(S=V.length-1;S>=0&&!(U<=0);S--)w=V[S],w.pos+w.dp+w.size>j.pmax&&(w.del=!0,U--)}}}for(;!y&&o<=l;){for(o++,y=!0,S=0;S.01){for(L=F.length-1;L>=0;L--)F[L].dp+=C;for(m.push.apply(m,F),u.splice(S+1,1),A=0,L=m.length-1;L>=0;L--)A+=m[L].dp;for(k=A/m.length,L=m.length-1;L>=0;L--)m[L].dp-=k;y=!1}else S++}u.forEach(T)}for(S=u.length-1;S>=0;S--){var R=u[S];for(L=R.length-1;L>=0;L--){var B=R[L],O=B.datum;O.offset=B.dp,O.del=B.del}}}function Kfe(e,t){var r=0,n=e.offset;return t&&(n*=-Ugt,r=e.offset*Ngt),{x:r,y:n}}function Wgt(e){var t={start:1,end:-1,middle:0}[e.anchor],r=t*(yl+go),n=r+t*(e.txwidth+go),a=e.anchor==="middle";return a&&(r-=e.tx2width/2,n+=e.txwidth/2+go),{alignShift:t,textShiftX:r,text2ShiftX:n}}function Jfe(e,t,r,n){var a=function(o){return o*r},i=function(o){return o*n};e.each(function(o){var s=Wx.select(this);if(o.del)return s.remove();var l=s.select("text.nums"),u=o.anchor,c=u==="end"?-1:1,f=Wgt(o),v=Kfe(o,t),g=v.x,p=v.y,x=u==="middle",_="hoverlabel"in o.trace?o.trace.hoverlabel.showarrow:!0,y;x?y="M-"+a(o.bx/2+o.tx2width/2)+","+i(p-o.by/2)+"h"+a(o.bx)+"v"+i(o.by)+"h-"+a(o.bx)+"Z":_?y="M0,0L"+a(c*yl+g)+","+i(yl+p)+"v"+i(o.by/2-yl)+"h"+a(c*o.bx)+"v-"+i(o.by)+"H"+a(c*yl+g)+"V"+i(p-yl)+"Z":y="M"+a(c*yl+g)+","+i(p-o.by/2)+"h"+a(c*o.bx)+"v"+i(o.by)+"h"+a(-c*o.bx)+"Z",s.select("path").attr("d",y);var C=g+f.textShiftX,k=p+o.ty0-o.by/2+go,S=o.textAlign||"auto";S!=="auto"&&(S==="left"&&u!=="start"?(l.attr("text-anchor","start"),C=x?-o.bx/2-o.tx2width/2+go:-o.bx-go):S==="right"&&u!=="end"&&(l.attr("text-anchor","end"),C=x?o.bx/2-o.tx2width/2-go:o.bx+go)),l.call(nv.positionText,a(C),i(k)),o.tx2width&&(s.select("text.name").call(nv.positionText,a(f.text2ShiftX+f.alignShift*go+g),i(p+o.ty0-o.by/2+go)),s.select("rect").call(Xp.setRect,a(f.text2ShiftX+(f.alignShift-1)*o.tx2width/2+g),i(p-o.by/2-1),a(o.tx2width),i(o.by+2)))})}function Ygt(e,t){var r=e.index,n=e.trace||{},a=e.cd[0],i=e.cd[r]||{};function o(v){return v||eg(v)&&v===0}var s=Array.isArray(r)?function(v,g){var p=tu.castOption(a,r,v);return o(p)?p:tu.extractOption({},n,"",g)}:function(v,g){return tu.extractOption(i,n,v,g)};function l(v,g,p){var x=s(g,p);o(x)&&(e[v]=x)}if(l("hoverinfo","hi","hoverinfo"),l("bgcolor","hbg","hoverlabel.bgcolor"),l("borderColor","hbc","hoverlabel.bordercolor"),l("fontFamily","htf","hoverlabel.font.family"),l("fontSize","hts","hoverlabel.font.size"),l("fontColor","htc","hoverlabel.font.color"),l("fontWeight","htw","hoverlabel.font.weight"),l("fontStyle","hty","hoverlabel.font.style"),l("fontVariant","htv","hoverlabel.font.variant"),l("nameLength","hnl","hoverlabel.namelength"),l("textAlign","hta","hoverlabel.align"),e.posref=t==="y"||t==="closest"&&n.orientation==="h"?e.xa._offset+(e.x0+e.x1)/2:e.ya._offset+(e.y0+e.y1)/2,e.x0=tu.constrain(e.x0,0,e.xa._length),e.x1=tu.constrain(e.x1,0,e.xa._length),e.y0=tu.constrain(e.y0,0,e.ya._length),e.y1=tu.constrain(e.y1,0,e.ya._length),e.xLabelVal!==void 0&&(e.xLabel="xLabel"in e?e.xLabel:Zp.hoverLabelText(e.xa,e.xLabelVal,n.xhoverformat),e.xVal=e.xa.c2d(e.xLabelVal)),e.yLabelVal!==void 0&&(e.yLabel="yLabel"in e?e.yLabel:Zp.hoverLabelText(e.ya,e.yLabelVal,n.yhoverformat),e.yVal=e.ya.c2d(e.yLabelVal)),e.zLabelVal!==void 0&&e.zLabel===void 0&&(e.zLabel=String(e.zLabelVal)),!isNaN(e.xerr)&&!(e.xa.type==="log"&&e.xerr<=0)){var u=Zp.tickText(e.xa,e.xa.c2l(e.xerr),"hover").text;e.xerrneg!==void 0?e.xLabel+=" +"+u+" / -"+Zp.tickText(e.xa,e.xa.c2l(e.xerrneg),"hover").text:e.xLabel+=" \xB1 "+u,t==="x"&&(e.distance+=1)}if(!isNaN(e.yerr)&&!(e.ya.type==="log"&&e.yerr<=0)){var c=Zp.tickText(e.ya,e.ya.c2l(e.yerr),"hover").text;e.yerrneg!==void 0?e.yLabel+=" +"+c+" / -"+Zp.tickText(e.ya,e.ya.c2l(e.yerrneg),"hover").text:e.yLabel+=" \xB1 "+c,t==="y"&&(e.distance+=1)}var f=e.hoverinfo||e.trace.hoverinfo;return f&&f!=="all"&&(f=Array.isArray(f)?f:f.split("+"),f.indexOf("x")===-1&&(e.xLabel=void 0),f.indexOf("y")===-1&&(e.yLabel=void 0),f.indexOf("z")===-1&&(e.zLabel=void 0),f.indexOf("text")===-1&&(e.text=void 0),f.indexOf("name")===-1&&(e.name=void 0)),e}function Hfe(e,t,r){var n=r.container,a=r.fullLayout,i=a._size,o=r.event,s=!!t.hLinePoint,l=!!t.vLinePoint,u,c;if(n.selectAll(".spikeline").remove(),!!(l||s)){var f=ac.combine(a.plot_bgcolor,a.paper_bgcolor);if(s){var v=t.hLinePoint,g,p;u=v&&v.xa,c=v&&v.ya;var x=c.spikesnap;x==="cursor"?(g=o.pointerX,p=o.pointerY):(g=u._offset+v.x,p=c._offset+v.y);var _=ac.wcagContrast(v.color,f)<1.5?ac.contrast(f):v.color,y=c.spikemode,C=c.spikethickness,k=c.spikecolor||_,S=Zp.getPxPosition(e,c),L,w;if(y.indexOf("toaxis")!==-1||y.indexOf("across")!==-1){if(y.indexOf("toaxis")!==-1&&(L=S,w=g),y.indexOf("across")!==-1){var A=c._counterDomainMin,T=c._counterDomainMax;c.anchor==="free"&&(A=Math.min(A,c.position),T=Math.max(T,c.position)),L=i.l+A*i.w,w=i.l+T*i.w}n.insert("line",":first-child").attr({x1:L,x2:w,y1:p,y2:p,"stroke-width":C,stroke:k,"stroke-dasharray":Xp.dashStyle(c.spikedash,C)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:L,x2:w,y1:p,y2:p,"stroke-width":C+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}y.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:S+(c.side!=="right"?C:-C),cy:p,r:C,fill:k}).classed("spikeline",!0)}if(l){var m=t.vLinePoint,F,E;u=m&&m.xa,c=m&&m.ya;var I=u.spikesnap;I==="cursor"?(F=o.pointerX,E=o.pointerY):(F=u._offset+m.x,E=c._offset+m.y);var R=ac.wcagContrast(m.color,f)<1.5?ac.contrast(f):m.color,B=u.spikemode,O=u.spikethickness,V=u.spikecolor||R,j=Zp.getPxPosition(e,u),q,U;if(B.indexOf("toaxis")!==-1||B.indexOf("across")!==-1){if(B.indexOf("toaxis")!==-1&&(q=j,U=E),B.indexOf("across")!==-1){var J=u._counterDomainMin,ee=u._counterDomainMax;u.anchor==="free"&&(J=Math.min(J,u.position),ee=Math.max(ee,u.position)),q=i.t+(1-ee)*i.h,U=i.t+(1-J)*i.h}n.insert("line",":first-child").attr({x1:F,x2:F,y1:q,y2:U,"stroke-width":O,stroke:V,"stroke-dasharray":Xp.dashStyle(u.spikedash,O)}).classed("spikeline",!0).classed("crisp",!0),n.insert("line",":first-child").attr({x1:F,x2:F,y1:q,y2:U,"stroke-width":O+2,stroke:f}).classed("spikeline",!0).classed("crisp",!0)}B.indexOf("marker")!==-1&&n.insert("circle",":first-child").attr({cx:F,cy:j-(u.side!=="top"?O:-O),r:O,fill:V}).classed("spikeline",!0)}}}function Xgt(e,t,r){if(!r||r.length!==e._hoverdata.length)return!0;for(var n=r.length-1;n>=0;n--){var a=r[n],i=e._hoverdata[n];if(a.curveNumber!==i.curveNumber||String(a.pointNumber)!==String(i.pointNumber)||String(a.pointNumbers)!==String(i.pointNumbers)||a.binNumber!==i.binNumber)return!0}return!1}function jfe(e,t){return!t||t.vLinePoint!==e._spikepoints.vLinePoint||t.hLinePoint!==e._spikepoints.hLinePoint}function Wfe(e,t){return nv.plainText(e||"",{len:t,allowedTags:["br","sub","sup","b","i","em","s","u"]})}function Zgt(e,t){for(var r=t.charAt(0),n=[],a=[],i=[],o=0;oe.offsetTop+e.clientTop,ehe=e=>e.offsetLeft+e.clientLeft;function n3(e,t){var r=e._fullLayout,n=t.getBoundingClientRect(),a=n.left,i=n.top,o=a+n.width,s=i+n.height,l=tu.apply3DTransform(r._invTransform)(a,i),u=tu.apply3DTransform(r._invTransform)(o,s),c=l[0],f=l[1],v=u[0],g=u[1];return{x:c,y:f,width:v-c,height:g-f,top:Math.min(f,g),left:Math.min(c,v),right:Math.max(c,v),bottom:Math.max(f,g)}}});var AT=fe((s0r,the)=>{"use strict";var $gt=Xt(),Kgt=ni(),Jgt=Sd().isUnifiedHover;the.exports=function(t,r,n,a){a=a||{};var i=r.legend;function o(s){a.font[s]||(a.font[s]=i?r.legend.font[s]:r.font[s])}r&&Jgt(r.hovermode)&&(a.font||(a.font={}),o("size"),o("family"),o("color"),o("weight"),o("style"),o("variant"),i?(a.bgcolor||(a.bgcolor=Kgt.combine(r.legend.bgcolor,r.paper_bgcolor)),a.bordercolor||(a.bordercolor=r.legend.bordercolor)):a.bgcolor||(a.bgcolor=r.paper_bgcolor)),n("hoverlabel.bgcolor",a.bgcolor),n("hoverlabel.bordercolor",a.bordercolor),n("hoverlabel.namelength",a.namelength),n("hoverlabel.showarrow",a.showarrow),$gt.coerceFont(n,"hoverlabel.font",a.font),n("hoverlabel.align",a.align)}});var nhe=fe((l0r,rhe)=>{"use strict";var Qgt=Xt(),emt=AT(),tmt=tm();rhe.exports=function(t,r){function n(a,i){return Qgt.coerce(t,r,tmt,a,i)}emt(t,r,n)}});var ohe=fe((u0r,ahe)=>{"use strict";var ihe=Xt(),rmt=hb(),nmt=AT();ahe.exports=function(t,r,n,a){function i(s,l){return ihe.coerce(t,r,rmt,s,l)}var o=ihe.extendFlat({},a.hoverlabel);r.hovertemplate&&(o.namelength=-1),nmt(t,r,i,o)}});var VO=fe((c0r,she)=>{"use strict";var imt=Xt(),amt=tm();she.exports=function(t,r){function n(a,i){return r[a]!==void 0?r[a]:imt.coerce(t,r,amt,a,i)}return n("clickmode"),n("hoversubplots"),n("hoveranywhere"),n("clickanywhere"),n("hovermode")}});var che=fe((f0r,uhe)=>{"use strict";var lhe=Xt(),omt=tm(),smt=VO(),lmt=AT();uhe.exports=function(t,r){function n(u,c){return lhe.coerce(t,r,omt,u,c)}var a=smt(t,r);a&&(n("hoverdistance"),n("spikedistance"),a.indexOf("unified")!==-1&&n("hoversort"));var i=n("dragmode");i==="select"&&n("selectdirection");var o=r._has("map"),s=r._has("geo"),l=r._basePlotModules.length;r.dragmode==="zoom"&&((o||s)&&l===1||o&&s&&l===2)&&(r.dragmode="pan"),lmt(t,r,n),lhe.coerceFont(n,"hoverlabel.grouptitlefont",r.hoverlabel.font)}});var dhe=fe((h0r,hhe)=>{"use strict";var GO=Xt(),fhe=bi();hhe.exports=function(t){var r=t.calcdata,n=t._fullLayout;function a(u){return function(c){return GO.coerceHoverinfo({hoverinfo:c},{_module:u._module},n)}}for(var i=0;i{"use strict";var cmt=bi(),vhe=Sd(),fmt=UO().hover;phe.exports=function(t,r,n){var a=cmt.getComponentMethod("annotations","onClick")(t,t._hoverdata),i=t._fullLayout;n!==void 0&&fmt(t,r,n,!0);function o(){var l,u,c,f,v,g;var s={points:t._hoverdata,event:r};(l=s.xaxes)!=null||(s.xaxes=t._hoverXAxes),(u=s.yaxes)!=null||(s.yaxes=t._hoverYAxes),(c=s.xvals)!=null||(s.xvals=t._hoverXVals&&vhe.c2dApply(t._hoverXAxes,t._hoverXVals)),(f=s.yvals)!=null||(s.yvals=t._hoverYVals&&vhe.c2dApply(t._hoverYAxes,t._hoverYVals)),(v=s.xPixel)!=null||(s.xPixel=t._hoverPointerX),(g=s.yPixel)!=null||(s.yPixel=t._hoverPointerY),t.emit("plotly_click",s)}(t._hoverdata||i.clickanywhere)&&r&&r.target&&(t._hoverdata||(t._hoverdata=[]),a&&a.then?a.then(o):o(),r.stopImmediatePropagation&&r.stopImmediatePropagation())}});var kl=fe((v0r,xhe)=>{"use strict";var hmt=xi(),Kk=Xt(),dmt=ed(),MT=Sd(),mhe=tm(),yhe=UO();xhe.exports={moduleType:"component",name:"fx",constants:L4(),schema:{layout:mhe},attributes:hb(),layoutAttributes:mhe,supplyLayoutGlobalDefaults:nhe(),supplyDefaults:ohe(),supplyLayoutDefaults:che(),calc:dhe(),getDistanceFunction:MT.getDistanceFunction,getClosest:MT.getClosest,inbox:MT.inbox,quadrature:MT.quadrature,appendArrayPointValue:MT.appendArrayPointValue,castHoverOption:pmt,castHoverinfo:gmt,hover:yhe.hover,unhover:dmt.unhover,loneHover:yhe.loneHover,loneUnhover:vmt,click:ghe()};function vmt(e){var t=Kk.isD3Selection(e)?e:hmt.select(e);t.selectAll("g.hovertext").remove(),t.selectAll(".spikeline").remove()}function pmt(e,t,r){return Kk.castOption(e,t,"hoverlabel."+r)}function gmt(e,t,r){function n(a){return Kk.coerceHoverinfo({hoverinfo:a},{_module:e._module},t)}return Kk.castOption(e,r,"hoverinfo",n)}});var $p=fe(tg=>{"use strict";tg.selectMode=function(e){return e==="lasso"||e==="select"};tg.drawMode=function(e){return e==="drawclosedpath"||e==="drawopenpath"||e==="drawline"||e==="drawrect"||e==="drawcircle"};tg.openMode=function(e){return e==="drawline"||e==="drawopenpath"};tg.rectMode=function(e){return e==="select"||e==="drawline"||e==="drawrect"||e==="drawcircle"};tg.freeMode=function(e){return e==="lasso"||e==="drawclosedpath"||e==="drawopenpath"};tg.selectingOrDrawing=function(e){return tg.freeMode(e)||tg.rectMode(e)}});var ST=fe((g0r,_he)=>{"use strict";_he.exports=function(t){var r=t._fullLayout;r._glcanvas&&r._glcanvas.size()&&r._glcanvas.each(function(n){n.regl&&n.regl.clear({color:!0,depth:!0})})}});var Jk=fe((m0r,bhe)=>{"use strict";bhe.exports={undo:{width:857.1,height:1e3,path:"m857 350q0-87-34-166t-91-137-137-92-166-34q-96 0-183 41t-147 114q-4 6-4 13t5 11l76 77q6 5 14 5 9-1 13-7 41-53 100-82t126-29q58 0 110 23t92 61 61 91 22 111-22 111-61 91-92 61-110 23q-55 0-105-20t-90-57l77-77q17-16 8-38-10-23-33-23h-250q-15 0-25 11t-11 25v250q0 24 22 33 22 10 39-8l72-72q60 57 137 88t159 31q87 0 166-34t137-92 91-137 34-166z",transform:"matrix(1 0 0 -1 0 850)"},home:{width:928.6,height:1e3,path:"m786 296v-267q0-15-11-26t-25-10h-214v214h-143v-214h-214q-15 0-25 10t-11 26v267q0 1 0 2t0 2l321 264 321-264q1-1 1-4z m124 39l-34-41q-5-5-12-6h-2q-7 0-12 3l-386 322-386-322q-7-4-13-4-7 2-12 7l-35 41q-4 5-3 13t6 12l401 334q18 15 42 15t43-15l136-114v109q0 8 5 13t13 5h107q8 0 13-5t5-13v-227l122-102q5-5 6-12t-4-13z",transform:"matrix(1 0 0 -1 0 850)"},"camera-retro":{width:1e3,height:1e3,path:"m518 386q0 8-5 13t-13 5q-37 0-63-27t-26-63q0-8 5-13t13-5 12 5 5 13q0 23 16 38t38 16q8 0 13 5t5 13z m125-73q0-59-42-101t-101-42-101 42-42 101 42 101 101 42 101-42 42-101z m-572-320h858v71h-858v-71z m643 320q0 89-62 152t-152 62-151-62-63-152 63-151 151-63 152 63 62 151z m-571 358h214v72h-214v-72z m-72-107h858v143h-462l-36-71h-360v-72z m929 143v-714q0-30-21-51t-50-21h-858q-29 0-50 21t-21 51v714q0 30 21 51t50 21h858q29 0 50-21t21-51z",transform:"matrix(1 0 0 -1 0 850)"},zoombox:{width:1e3,height:1e3,path:"m1000-25l-250 251c40 63 63 138 63 218 0 224-182 406-407 406-224 0-406-182-406-406s183-406 407-406c80 0 155 22 218 62l250-250 125 125z m-812 250l0 438 437 0 0-438-437 0z m62 375l313 0 0-312-313 0 0 312z",transform:"matrix(1 0 0 -1 0 850)"},pan:{width:1e3,height:1e3,path:"m1000 350l-187 188 0-125-250 0 0 250 125 0-188 187-187-187 125 0 0-250-250 0 0 125-188-188 186-187 0 125 252 0 0-250-125 0 187-188 188 188-125 0 0 250 250 0 0-126 187 188z",transform:"matrix(1 0 0 -1 0 850)"},zoom_plus:{width:875,height:1e3,path:"m1 787l0-875 875 0 0 875-875 0z m687-500l-187 0 0-187-125 0 0 187-188 0 0 125 188 0 0 187 125 0 0-187 187 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},zoom_minus:{width:875,height:1e3,path:"m0 788l0-876 875 0 0 876-875 0z m688-500l-500 0 0 125 500 0 0-125z",transform:"matrix(1 0 0 -1 0 850)"},autoscale:{width:1e3,height:1e3,path:"m250 850l-187 0-63 0 0-62 0-188 63 0 0 188 187 0 0 62z m688 0l-188 0 0-62 188 0 0-188 62 0 0 188 0 62-62 0z m-875-938l0 188-63 0 0-188 0-62 63 0 187 0 0 62-187 0z m875 188l0-188-188 0 0-62 188 0 62 0 0 62 0 188-62 0z m-125 188l-1 0-93-94-156 156 156 156 92-93 2 0 0 250-250 0 0-2 93-92-156-156-156 156 94 92 0 2-250 0 0-250 0 0 93 93 157-156-157-156-93 94 0 0 0-250 250 0 0 0-94 93 156 157 156-157-93-93 0 0 250 0 0 250z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_basic:{width:1500,height:1e3,path:"m375 725l0 0-375-375 375-374 0-1 1125 0 0 750-1125 0z",transform:"matrix(1 0 0 -1 0 850)"},tooltip_compare:{width:1125,height:1e3,path:"m187 786l0 2-187-188 188-187 0 0 937 0 0 373-938 0z m0-499l0 1-187-188 188-188 0 0 937 0 0 376-938-1z",transform:"matrix(1 0 0 -1 0 850)"},plotlylogo:{width:1542,height:1e3,path:"m0-10h182v-140h-182v140z m228 146h183v-286h-183v286z m225 714h182v-1000h-182v1000z m225-285h182v-715h-182v715z m225 142h183v-857h-183v857z m231-428h182v-429h-182v429z m225-291h183v-138h-183v138z",transform:"matrix(1 0 0 -1 0 850)"},"z-axis":{width:1e3,height:1e3,path:"m833 5l-17 108v41l-130-65 130-66c0 0 0 38 0 39 0-1 36-14 39-25 4-15-6-22-16-30-15-12-39-16-56-20-90-22-187-23-279-23-261 0-341 34-353 59 3 60 228 110 228 110-140-8-351-35-351-116 0-120 293-142 474-142 155 0 477 22 477 142 0 50-74 79-163 96z m-374 94c-58-5-99-21-99-40 0-24 65-43 144-43 79 0 143 19 143 43 0 19-42 34-98 40v216h87l-132 135-133-135h88v-216z m167 515h-136v1c16 16 31 34 46 52l84 109v54h-230v-71h124v-1c-16-17-28-32-44-51l-89-114v-51h245v72z",transform:"matrix(1 0 0 -1 0 850)"},"3d_rotate":{width:1e3,height:1e3,path:"m922 660c-5 4-9 7-14 11-359 263-580-31-580-31l-102 28 58-400c0 1 1 1 2 2 118 108 351 249 351 249s-62 27-100 42c88 83 222 183 347 122 16-8 30-17 44-27-2 1-4 2-6 4z m36-329c0 0 64 229-88 296-62 27-124 14-175-11 157-78 225-208 249-266 8-19 11-31 11-31 2 5 6 15 11 32-5-13-8-20-8-20z m-775-239c70-31 117-50 198-32-121 80-199 346-199 346l-96-15-58-12c0 0 55-226 155-287z m603 133l-317-139c0 0 4-4 19-14 7-5 24-15 24-15s-177-147-389 4c235-287 536-112 536-112l31-22 100 299-4-1z m-298-153c6-4 14-9 24-15 0 0-17 10-24 15z",transform:"matrix(1 0 0 -1 0 850)"},camera:{width:1e3,height:1e3,path:"m500 450c-83 0-150-67-150-150 0-83 67-150 150-150 83 0 150 67 150 150 0 83-67 150-150 150z m400 150h-120c-16 0-34 13-39 29l-31 93c-6 15-23 28-40 28h-340c-16 0-34-13-39-28l-31-94c-6-15-23-28-40-28h-120c-55 0-100-45-100-100v-450c0-55 45-100 100-100h800c55 0 100 45 100 100v450c0 55-45 100-100 100z m-400-550c-138 0-250 112-250 250 0 138 112 250 250 250 138 0 250-112 250-250 0-138-112-250-250-250z m365 380c-19 0-35 16-35 35 0 19 16 35 35 35 19 0 35-16 35-35 0-19-16-35-35-35z",transform:"matrix(1 0 0 -1 0 850)"},movie:{width:1e3,height:1e3,path:"m938 413l-188-125c0 37-17 71-44 94 64 38 107 107 107 187 0 121-98 219-219 219-121 0-219-98-219-219 0-61 25-117 66-156h-115c30 33 49 76 49 125 0 103-84 187-187 187s-188-84-188-187c0-57 26-107 65-141-38-22-65-62-65-109v-250c0-70 56-126 125-126h500c69 0 125 56 125 126l188-126c34 0 62 28 62 63v375c0 35-28 63-62 63z m-750 0c-69 0-125 56-125 125s56 125 125 125 125-56 125-125-56-125-125-125z m406-1c-87 0-157 70-157 157 0 86 70 156 157 156s156-70 156-156-70-157-156-157z",transform:"matrix(1 0 0 -1 0 850)"},question:{width:857.1,height:1e3,path:"m500 82v107q0 8-5 13t-13 5h-107q-8 0-13-5t-5-13v-107q0-8 5-13t13-5h107q8 0 13 5t5 13z m143 375q0 49-31 91t-77 65-95 23q-136 0-207-119-9-14 4-24l74-55q4-4 10-4 9 0 14 7 30 38 48 51 19 14 48 14 27 0 48-15t21-33q0-21-11-34t-38-25q-35-16-65-48t-29-70v-20q0-8 5-13t13-5h107q8 0 13 5t5 13q0 10 12 27t30 28q18 10 28 16t25 19 25 27 16 34 7 45z m214-107q0-117-57-215t-156-156-215-58-216 58-155 156-58 215 58 215 155 156 216 58 215-58 156-156 57-215z",transform:"matrix(1 0 0 -1 0 850)"},disk:{width:857.1,height:1e3,path:"m214-7h429v214h-429v-214z m500 0h72v500q0 8-6 21t-11 20l-157 156q-5 6-19 12t-22 5v-232q0-22-15-38t-38-16h-322q-22 0-37 16t-16 38v232h-72v-714h72v232q0 22 16 38t37 16h465q22 0 38-16t15-38v-232z m-214 518v178q0 8-5 13t-13 5h-107q-7 0-13-5t-5-13v-178q0-8 5-13t13-5h107q7 0 13 5t5 13z m357-18v-518q0-22-15-38t-38-16h-750q-23 0-38 16t-16 38v750q0 22 16 38t38 16h517q23 0 50-12t42-26l156-157q16-15 27-42t11-49z",transform:"matrix(1 0 0 -1 0 850)"},cloudupload:{width:640,height:640,path:"M451.5 160C434.9 160 418.8 164.5 404.7 172.7C388.9 156.7 370.5 143.3 350.2 133.2C378.4 109.2 414.3 96 451.5 96C537.9 96 608 166 608 252.5C608 294 591.5 333.8 562.2 363.1L491.1 434.2C461.8 463.5 422 480 380.5 480C294.1 480 224 410 224 323.5C224 322 224 320.5 224.1 319C224.6 301.3 239.3 287.4 257 287.9C274.7 288.4 288.6 303.1 288.1 320.8C288.1 321.7 288.1 322.6 288.1 323.4C288.1 374.5 329.5 415.9 380.6 415.9C405.1 415.9 428.6 406.2 446 388.8L517.1 317.7C534.4 300.4 544.2 276.8 544.2 252.3C544.2 201.2 502.8 159.8 451.7 159.8zM307.2 237.3C305.3 236.5 303.4 235.4 301.7 234.2C289.1 227.7 274.7 224 259.6 224C235.1 224 211.6 233.7 194.2 251.1L123.1 322.2C105.8 339.5 96 363.1 96 387.6C96 438.7 137.4 480.1 188.5 480.1C205 480.1 221.1 475.7 235.2 467.5C251 483.5 269.4 496.9 289.8 507C261.6 530.9 225.8 544.2 188.5 544.2C102.1 544.2 32 474.2 32 387.7C32 346.2 48.5 306.4 77.8 277.1L148.9 206C178.2 176.7 218 160.2 259.5 160.2C346.1 160.2 416 230.8 416 317.1C416 318.4 416 319.7 416 321C415.6 338.7 400.9 352.6 383.2 352.2C365.5 351.8 351.6 337.1 352 319.4C352 318.6 352 317.9 352 317.1C352 283.4 334 253.8 307.2 237.5z",transform:"matrix(1 0 0 1 -15 -15)"},drawopenpath:{width:70,height:70,path:"M33.21,85.65a7.31,7.31,0,0,1-2.59-.48c-8.16-3.11-9.27-19.8-9.88-41.3-.1-3.58-.19-6.68-.35-9-.15-2.1-.67-3.48-1.43-3.79-2.13-.88-7.91,2.32-12,5.86L3,32.38c1.87-1.64,11.55-9.66,18.27-6.9,2.13.87,4.75,3.14,5.17,9,.17,2.43.26,5.59.36,9.25a224.17,224.17,0,0,0,1.5,23.4c1.54,10.76,4,12.22,4.48,12.4.84.32,2.79-.46,5.76-3.59L43,80.07C41.53,81.57,37.68,85.64,33.21,85.65ZM74.81,69a11.34,11.34,0,0,0,6.09-6.72L87.26,44.5,74.72,32,56.9,38.35c-2.37.86-5.57,3.42-6.61,6L38.65,72.14l8.42,8.43ZM55,46.27a7.91,7.91,0,0,1,3.64-3.17l14.8-5.3,8,8L76.11,60.6l-.06.19a6.37,6.37,0,0,1-3,3.43L48.25,74.59,44.62,71Zm16.57,7.82A6.9,6.9,0,1,0,64.64,61,6.91,6.91,0,0,0,71.54,54.09Zm-4.05,0a2.85,2.85,0,1,1-2.85-2.85A2.86,2.86,0,0,1,67.49,54.09Zm-4.13,5.22L60.5,56.45,44.26,72.7l2.86,2.86ZM97.83,35.67,84.14,22l-8.57,8.57L89.26,44.24Zm-13.69-8,8,8-2.85,2.85-8-8Z",transform:"matrix(1 0 0 1 -15 -15)"},drawclosedpath:{width:90,height:90,path:"M88.41,21.12a26.56,26.56,0,0,0-36.18,0l-2.07,2-2.07-2a26.57,26.57,0,0,0-36.18,0,23.74,23.74,0,0,0,0,34.8L48,90.12a3.22,3.22,0,0,0,4.42,0l36-34.21a23.73,23.73,0,0,0,0-34.79ZM84,51.24,50.16,83.35,16.35,51.25a17.28,17.28,0,0,1,0-25.47,20,20,0,0,1,27.3,0l4.29,4.07a3.23,3.23,0,0,0,4.44,0l4.29-4.07a20,20,0,0,1,27.3,0,17.27,17.27,0,0,1,0,25.46ZM66.76,47.68h-33v6.91h33ZM53.35,35H46.44V68h6.91Z",transform:"matrix(1 0 0 1 -5 -5)"},lasso:{width:1031,height:1e3,path:"m1018 538c-36 207-290 336-568 286-277-48-473-256-436-463 10-57 36-108 76-151-13-66 11-137 68-183 34-28 75-41 114-42l-55-70 0 0c-2-1-3-2-4-3-10-14-8-34 5-45 14-11 34-8 45 4 1 1 2 3 2 5l0 0 113 140c16 11 31 24 45 40 4 3 6 7 8 11 48-3 100 0 151 9 278 48 473 255 436 462z m-624-379c-80 14-149 48-197 96 42 42 109 47 156 9 33-26 47-66 41-105z m-187-74c-19 16-33 37-39 60 50-32 109-55 174-68-42-25-95-24-135 8z m360 75c-34-7-69-9-102-8 8 62-16 128-68 170-73 59-175 54-244-5-9 20-16 40-20 61-28 159 121 317 333 354s407-60 434-217c28-159-121-318-333-355z",transform:"matrix(1 0 0 -1 0 850)"},selectbox:{width:1e3,height:1e3,path:"m0 850l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-285l0-143 143 0 0 143-143 0z m857 0l0-143 143 0 0 143-143 0z m-857-286l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z m285 0l0-143 143 0 0 143-143 0z m286 0l0-143 143 0 0 143-143 0z",transform:"matrix(1 0 0 -1 0 850)"},drawline:{width:70,height:70,path:"M60.64,62.3a11.29,11.29,0,0,0,6.09-6.72l6.35-17.72L60.54,25.31l-17.82,6.4c-2.36.86-5.57,3.41-6.6,6L24.48,65.5l8.42,8.42ZM40.79,39.63a7.89,7.89,0,0,1,3.65-3.17l14.79-5.31,8,8L61.94,54l-.06.19a6.44,6.44,0,0,1-3,3.43L34.07,68l-3.62-3.63Zm16.57,7.81a6.9,6.9,0,1,0-6.89,6.9A6.9,6.9,0,0,0,57.36,47.44Zm-4,0a2.86,2.86,0,1,1-2.85-2.85A2.86,2.86,0,0,1,53.32,47.44Zm-4.13,5.22L46.33,49.8,30.08,66.05l2.86,2.86ZM83.65,29,70,15.34,61.4,23.9,75.09,37.59ZM70,21.06l8,8-2.84,2.85-8-8ZM87,80.49H10.67V87H87Z",transform:"matrix(1 0 0 1 -15 -15)"},drawrect:{width:80,height:80,path:"M78,22V79H21V22H78m9-9H12V88H87V13ZM68,46.22H31V54H68ZM53,32H45.22V69H53Z",transform:"matrix(1 0 0 1 -10 -10)"},drawcircle:{width:80,height:80,path:"M50,84.72C26.84,84.72,8,69.28,8,50.3S26.84,15.87,50,15.87,92,31.31,92,50.3,73.16,84.72,50,84.72Zm0-60.59c-18.6,0-33.74,11.74-33.74,26.17S31.4,76.46,50,76.46,83.74,64.72,83.74,50.3,68.6,24.13,50,24.13Zm17.15,22h-34v7.11h34Zm-13.8-13H46.24v34h7.11Z",transform:"matrix(1 0 0 1 -10 -10)"},eraseshape:{width:80,height:80,path:"M82.77,78H31.85L6,49.57,31.85,21.14H82.77a8.72,8.72,0,0,1,8.65,8.77V69.24A8.72,8.72,0,0,1,82.77,78ZM35.46,69.84H82.77a.57.57,0,0,0,.49-.6V29.91a.57.57,0,0,0-.49-.61H35.46L17,49.57Zm32.68-34.7-24,24,5,5,24-24Zm-19,.53-5,5,24,24,5-5Z",transform:"matrix(1 0 0 1 -10 -10)"},spikeline:{width:1e3,height:1e3,path:"M512 409c0-57-46-104-103-104-57 0-104 47-104 104 0 57 47 103 104 103 57 0 103-46 103-103z m-327-39l92 0 0 92-92 0z m-185 0l92 0 0 92-92 0z m370-186l92 0 0 93-92 0z m0-184l92 0 0 92-92 0z",transform:"matrix(1.5 0 0 -1.5 0 850)"},pencil:{width:1792,height:1792,path:"M491 1536l91-91-235-235-91 91v107h128v128h107zm523-928q0-22-22-22-10 0-17 7l-542 542q-7 7-7 17 0 22 22 22 10 0 17-7l542-542q7-7 7-17zm-54-192l416 416-832 832h-416v-416zm683 96q0 53-37 90l-166 166-416-416 166-165q36-38 90-38 53 0 91 38l235 234q37 39 37 91z",transform:"matrix(1 0 0 1 0 1)"},newplotlylogo:{name:"newplotlylogo",svg:[""," plotly-logomark"," "," "," "," "," "," "," "," "," "," "," "," "," ",""].join("")}}});var e8=fe((y0r,whe)=>{"use strict";var Qk=32;whe.exports={CIRCLE_SIDES:Qk,i000:0,i090:Qk/4,i180:Qk/2,i270:Qk/4*3,cos45:Math.cos(Math.PI/4),sin45:Math.sin(Math.PI/4),SQRT2:Math.sqrt(2)}});var t8=fe((x0r,Ahe)=>{"use strict";var mmt=Xt().strTranslate;function The(e,t){switch(e.type){case"log":return e.p2d(t);case"date":return e.p2r(t,0,e.calendar);default:return e.p2r(t)}}function ymt(e,t){switch(e.type){case"log":return e.d2p(t);case"date":return e.r2p(t,0,e.calendar);default:return e.r2p(t)}}function xmt(e){var t=e._id.charAt(0)==="y"?1:0;return function(r){return The(e,r[t])}}function _mt(e){return mmt(e.xaxis._offset,e.yaxis._offset)}Ahe.exports={p2r:The,r2p:ymt,axValue:xmt,getTransform:_mt}});var Em=fe(rg=>{"use strict";var bmt=FB(),Ehe=e8(),a3=Ehe.CIRCLE_SIDES,HO=Ehe.SQRT2,khe=t8(),Mhe=khe.p2r,She=khe.r2p,wmt=[0,3,4,5,6,1,2],Tmt=[0,3,4,1,2];rg.writePaths=function(e){var t=e.length;if(!t)return"M0,0Z";for(var r="",n=0;n0&&l{"use strict";var Che=El(),Rhe=$p(),Amt=Rhe.drawMode,Mmt=Rhe.openMode,o3=e8(),Lhe=o3.i000,Phe=o3.i090,Fhe=o3.i180,Dhe=o3.i270,Smt=o3.cos45,Emt=o3.sin45,Ihe=t8(),n8=Ihe.p2r,km=Ihe.r2p,kmt=pm(),Cmt=kmt.clearOutline,i8=Em(),Lmt=i8.readPaths,Pmt=i8.writePaths,Fmt=i8.ellipseOver,Dmt=i8.fixDatesForPaths;function Rmt(e,t){if(e.length){var r=e[0][0];if(r){var n=t.gd,a=t.isActiveShape,i=t.dragmode,o=(n.layout||{}).shapes||[];if(!Amt(i)&&a!==void 0){var s=n._fullLayout._activeShapeIndex;if(s{"use strict";var Imt=$p(),zmt=Imt.selectMode,qmt=pm(),Bmt=qmt.clearOutline,jO=Em(),Omt=jO.readPaths,Nmt=jO.writePaths,Umt=jO.fixDatesForPaths;Bhe.exports=function(t,r){if(t.length){var n=t[0][0];if(n){var a=n.getAttribute("d"),i=r.gd,o=i._fullLayout.newselection,s=r.plotinfo,l=s.xaxis,u=s.yaxis,c=r.isActiveSelection,f=r.dragmode,v=(i.layout||{}).selections||[];if(!zmt(f)&&c!==void 0){var g=i._fullLayout._activeSelectionIndex;if(g{"use strict";Ohe.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:3},Z:{}},numParams:{M:2,L:2,H:1,V:1,Q:4,C:6,T:2,S:4,Z:0}}});var Lm=fe(gf=>{"use strict";var Jp=kT(),Nhe=Xt(),Cm=Yi();gf.rangeToShapePosition=function(e){return e.type==="log"?e.r2d:function(t){return t}};gf.shapePositionToRange=function(e){return e.type==="log"?e.d2r:function(t){return t}};gf.decodeDate=function(e){return function(t){return t.replace&&(t=t.replace("_"," ")),e(t)}};gf.encodeDate=function(e){return function(t){return e(t).replace(" ","_")}};gf.extractPathCoords=function(e,t,r){var n=[],a=e.match(Jp.segmentRE);return a.forEach(function(i){var o=t[i.charAt(0)].drawn;if(o!==void 0){var s=i.slice(1).match(Jp.paramRE);if(!(!s||s.length{let s=o.charAt(0),l=a[s].drawn!==void 0;return i+(l?1:0)},0)};gf.getDataToPixel=function(e,t,r,n,a){var i=e._fullLayout._size,o;if(t)if(a==="domain")o=function(l){return t._length*(n?1-l:l)+t._offset};else{var s=gf.shapePositionToRange(t);o=function(l){var u=Kp(t,r);return t._offset+t.r2p(s(l,!0))+u},t.type==="date"&&(o=gf.decodeDate(o))}else n?o=function(l){return i.t+i.h*(1-l)}:o=function(l){return i.l+i.w*l};return o};gf.getPixelToData=function(e,t,r,n){var a=e._fullLayout._size,i;if(t)if(n==="domain")i=function(s){var l=(s-t._offset)/t._length;return r?1-l:l};else{var o=gf.rangeToShapePosition(t);i=function(s){return o(t.p2r(s-t._offset))}}else r?i=function(s){return 1-(s-a.t)/a.h}:i=function(s){return(s-a.l)/a.w};return i};gf.roundPositionForSharpStrokeRendering=function(e,t){var r=Math.round(t%2)===1,n=Math.round(e);return r?n+.5:n};gf.makeShapesOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.shapes[t]||{},n=e._fullLayout._plots[r.xref+r.yref],a=!!n;return a?n._hadPlotinfo=!0:(n={},r.xref&&r.xref!=="paper"&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&r.yref!=="paper"&&(n.yaxis=e._fullLayout[r.yref+"axis"])),n.xsizemode=r.xsizemode,n.ysizemode=r.ysizemode,n.xanchor=r.xanchor,n.yanchor=r.yanchor,{options:r,plotinfo:n}};gf.makeSelectionsOptionsAndPlotinfo=function(e,t){var r=e._fullLayout.selections[t]||{},n=e._fullLayout._plots[r.xref+r.yref],a=!!n;return a?n._hadPlotinfo=!0:(n={},r.xref&&(n.xaxis=e._fullLayout[r.xref+"axis"]),r.yref&&(n.yaxis=e._fullLayout[r.yref+"axis"])),{options:r,plotinfo:n}};gf.getPathString=function(e,t){let r=t.type,n=Cm.getRefType(t.xref),a=Cm.getRefType(t.yref),i=e._fullLayout._size;var o,s,l,u,c,f,v,g,p,x,_,y;function C(F,E,I,R){var B;if(F)if(E==="domain")R?B=function(O){return F._offset+F._length*(1-O)}:B=function(O){return F._offset+F._length*O};else{let O=gf.shapePositionToRange(F);B=function(V){return F._offset+F.r2p(O(V,!0))},I==="path"&&F.type==="date"&&(B=gf.decodeDate(B))}else R?B=function(O){return i.t+i.h*(1-O)}:B=function(O){return i.l+i.w*O};return B}if(n==="array"?(v=[],o=t.xref.map(function(F){return Cm.getFromId(e,F)}),v=t.xref.map(function(F,E){return C(o[E],Cm.getRefType(F),r,!1)})):(o=Cm.getFromId(e,t.xref),v=C(o,n,r,!1)),a==="array"?(g=[],s=t.yref.map(function(F){return Cm.getFromId(e,F)}),g=t.yref.map(function(F,E){return C(s[E],Cm.getRefType(F),r,!0)})):(s=Cm.getFromId(e,t.yref),g=C(s,a,r,!0)),r==="path")return Vmt(t,v,g);if(n==="array")l=Kp(o[0],t.x0shift),u=Kp(o[1],t.x1shift),p=v[0](t.x0)+l,x=v[1](t.x1)+u;else if(l=Kp(o,t.x0shift),u=Kp(o,t.x1shift),t.xsizemode==="pixel"){let F=v(t.xanchor);p=F+t.x0+l,x=F+t.x1+u}else p=v(t.x0)+l,x=v(t.x1)+u;if(a==="array")c=Kp(s[0],t.y0shift),f=Kp(s[1],t.y1shift),_=g[0](t.y0)+c,y=g[1](t.y1)+f;else if(c=Kp(s,t.y0shift),f=Kp(s,t.y1shift),t.ysizemode==="pixel"){let F=g(t.yanchor);_=F-t.y0+c,y=F-t.y1+f}else _=g(t.y0)+c,y=g(t.y1)+f;if(r==="line")return"M"+p+","+_+"L"+x+","+y;if(r==="rect")return"M"+p+","+_+"H"+x+"V"+y+"H"+p+"Z";var k=(p+x)/2,S=(_+y)/2,L=Math.abs(k-p),w=Math.abs(S-_),A="A"+L+","+w,T=k+L+","+S,m=k+","+(S-w);return"M"+T+A+" 0 1,1 "+m+A+" 0 0,1 "+T+"Z"};function Vmt(e,t,r){let n=e.path,a=e.xsizemode,i=e.ysizemode,o=e.xanchor,s=e.yanchor,l=Array.isArray(e.xref),u=Array.isArray(e.yref);var c=0,f=0;return n.replace(Jp.segmentRE,function(v){var g=0,p=v.charAt(0),x=Jp.paramIsX[p],_=Jp.paramIsY[p],y=Jp.numParams[p];let C=x.drawn!==void 0,k=_.drawn!==void 0,S=l?t[c]:t,L=u?r[f]:r;var w=v.slice(1).replace(Jp.paramRE,function(A){return x[g]?a==="pixel"?A=S(o)+Number(A):A=S(A):_[g]&&(i==="pixel"?A=L(s)-Number(A):A=L(A)),g++,g>y&&(A="X"),A});return g>y&&(w=w.replace(/[\s,]*X.*/,""),Nhe.log("Ignoring extra params in segment "+v)),C&&c++,k&&f++,p+w})}gf.getPixelShift=Kp;function Kp(e,t){t=t||0;var r=0;return t&&e&&(e.type==="category"||e.type==="multicategory")&&(r=(e.r2p(1)-e.r2p(0))*t),r}});var YO=fe((M0r,Ghe)=>{"use strict";var Gmt=Xt(),Qp=Yi(),Uhe=as(),Vhe=ea(),Hmt=Em().readPaths,Xx=Lm(),jmt=Xx.getPathString,CT=IE(),Wmt=nc().FROM_TL;Ghe.exports=function(t,r,n,a){if(a.selectAll(".shape-label").remove(),!!(n.label.text||n.label.texttemplate)){var i;if(n.label.texttemplate){var o={};if(n.type!=="path"){var s=Qp.getFromId(t,n.xref),l=Qp.getFromId(t,n.yref);let ee=Array.isArray(n.xref),ce=Array.isArray(n.yref);for(var u in CT){var c=typeof CT[u]=="function",f=!ee||CT.simpleXVariables.includes(u),v=!ce||CT.simpleYVariables.includes(u);if(c&&f&&v){var g=CT[u](n,s,l);g!==void 0&&(o[u]=g)}}}i=Gmt.texttemplateStringForShapes({data:[o],fallback:n.label.texttemplatefallback,locale:t._fullLayout._d3locale,template:n.label.texttemplate})}else i=n.label.text;var p={"data-index":r},x=n.label.font,_={"data-notex":1},y=a.append("g").attr(p).classed("shape-label",!0),C=y.append("text").attr(_).classed("shape-label-text",!0).text(i),k,S,L,w;if(n.path){var A=jmt(t,n),T=Hmt(A,t);k=1/0,L=1/0,S=-1/0,w=-1/0;for(var m=0;mXx.getDataToPixel(t,De,be,!1,Ge)(me),le=(me,be,De,Ge)=>Xx.getDataToPixel(t,De,be,!0,Ge)(me);if(n.xsizemode==="pixel"){let me=ie(n.xanchor,void 0,ye,_e),be=Xx.getPixelShift(ye,n.x0shift),De=Xx.getPixelShift(ye,n.x1shift);k=me+n.x0+be,S=me+n.x1+De}else k=ie(n.x0,n.x0shift,ye,_e),S=ie(n.x1,n.x1shift,xe,ne);if(n.ysizemode==="pixel"){let me=le(n.yanchor,void 0,ue,ae),be=Xx.getPixelShift(ue,n.y0shift),De=Xx.getPixelShift(ue,n.y1shift);L=me-n.y0+be,w=me-n.y1+De}else L=le(n.y0,n.y0shift,ue,ae),w=le(n.y1,n.y1shift,K,pe)}var O=n.label.textangle;O==="auto"&&(n.type==="line"?O=Ymt(k,L,S,w):O=0),C.call(function(ee){return ee.call(Vhe.font,x).attr({}),Uhe.convertToTspans(ee,t),ee});var V=Vhe.bBox(C.node()),j=Xmt(k,L,S,w,n,O,V),q=j.textx,U=j.texty,J=j.xanchor;C.attr({"text-anchor":{left:"start",center:"middle",right:"end"}[J],y:U,x:q,transform:"rotate("+O+","+q+","+U+")"}).call(Uhe.positionText,q,U)}};function Ymt(e,t,r,n){var a,i;return i=Math.abs(r-e),r>=e?a=t-n:a=n-t,-180/Math.PI*Math.atan2(a,i)}function Xmt(e,t,r,n,a,i,o){var s=a.label.textposition,l=a.label.textangle,u=a.label.padding,c=a.type,f=Math.PI/180*i,v=Math.sin(f),g=Math.cos(f),p=a.label.xanchor,x=a.label.yanchor,_,y,C,k;if(c==="line"){s==="start"?(_=e,y=t):s==="end"?(_=r,y=n):(_=(e+r)/2,y=(t+n)/2),p==="auto"&&(s==="start"?l==="auto"?r>e?p="left":re?p="right":re?p="right":re?p="left":r{"use strict";var Zmt=Xt(),$mt=Zmt.strTranslate,Hhe=ed(),Yhe=$p(),Kmt=Yhe.drawMode,Xhe=Yhe.selectMode,Zhe=bi(),jhe=ni(),s8=e8(),Jmt=s8.i000,Qmt=s8.i090,eyt=s8.i180,tyt=s8.i270,ryt=pm(),$he=ryt.clearOutlineControllers,ZO=Em(),o8=ZO.pointsOnRectangle,XO=ZO.pointsOnEllipse,nyt=ZO.writePaths,iyt=a8().newShapes,ayt=a8().createShapeObj,oyt=WO(),syt=YO();Khe.exports=function e(t,r,n,a){a||(a=0);var i=n.gd;function o(){e(t,r,n,a++),(XO(t[0])||n.hasText)&&s({redrawing:!0})}function s(j){var q={};n.isActiveShape!==void 0&&(n.isActiveShape=!1,q=iyt(r,n)),n.isActiveSelection!==void 0&&(n.isActiveSelection=!1,q=oyt(r,n),i._fullLayout._reselect=!0),Object.keys(q).length&&Zhe.call((j||{}).redrawing?"relayout":"_guiRelayout",i,q)}var l=i._fullLayout,u=l._zoomlayer,c=n.dragmode,f=Kmt(c),v=Xhe(c);(f||v)&&(i._fullLayout._outlining=!0),$he(i),r.attr("d",nyt(t));var g,p,x,_,y;if(!a&&(n.isActiveShape||n.isActiveSelection)){y=lyt([],t);var C=u.append("g").attr("class","outline-controllers");F(C),V()}if(f&&n.hasText){var k=u.select(".label-temp"),S=ayt(r,n,n.dragmode);syt(i,"label-temp",S,k)}function L(j){x=+j.srcElement.getAttribute("data-i"),_=+j.srcElement.getAttribute("data-j"),g[x][_].moveFn=w}function w(j,q){if(t.length){var U=y[x][_][1],J=y[x][_][2],ee=t[x],ce=ee.length;if(o8(ee)){var ye=j,xe=q;if(n.isActiveSelection){var ue=Whe(ee,_);ue[1]===ee[_][1]?xe=0:ye=0}for(var K=0;K1&&!(j.length===2&&j[1][0]==="Z")&&(_===0&&(j[0][0]="M"),t[x]=j,o(),s())}}function m(j,q){if(j===2){x=+q.srcElement.getAttribute("data-i"),_=+q.srcElement.getAttribute("data-j");var U=t[x];!o8(U)&&!XO(U)&&T()}}function F(j){g=[];for(var q=0;q{"use strict";var cyt=xi(),nde=bi(),KO=Xt(),Zx=Yi(),fyt=Em().readPaths,hyt=l8(),c8=YO(),ide=pm().clearOutlineControllers,$O=ni(),f8=ea(),dyt=Mo().arrayEditor,Jhe=ed(),Qhe=kl(),ede=np(),$x=kT(),t0=Lm(),JO=t0.getPathString;sde.exports={draw:QO,drawOne:ade,eraseActiveShape:yyt,drawLabel:c8};function QO(e){var t=e._fullLayout;t._shapeUpperLayer.selectAll("path").remove(),t._shapeLowerLayer.selectAll("path").remove(),t._shapeUpperLayer.selectAll("text").remove(),t._shapeLowerLayer.selectAll("text").remove();for(var r in t._plots){var n=t._plots[r].shapelayer;n&&(n.selectAll("path").remove(),n.selectAll("text").remove())}for(var a=0;a{if(!e._dragging&&e._fullLayout.hoveranywhere){let o=a(i);o&&Qhe.hover(e,o,r.id)}}),n.addEventListener("click",i=>{if(!e._dragged&&e._fullLayout.clickanywhere){let o=a(i);o&&Qhe.click(e,o,r.id)}})}function ode(e,t,r){let n=r.xref,a=r.yref;if(Array.isArray(n)||Array.isArray(a)){let i="clip"+t._fullLayout._uid+"shape"+r._index,o=pyt(t,n,a);KO.ensureSingleById(t._fullLayout._clips,"clipPath",i,function(s){s.append("rect")}).select("rect").attr(o),f8.setClipUrl(e,i,t)}else{let i=(n+a).replace(/paper/g,"").replace(/[xyz][0-9]* *domain/g,"");f8.setClipUrl(e,i?"clip"+t._fullLayout._uid+i:null,t)}}function pyt(e,t,r){let n=e._fullLayout._size;function a(s,l){let u=(Array.isArray(s)?s:[s]).map(v=>Zx.getFromId(e,v)).filter(Boolean);if(!u.length)return l?[n.t,n.t+n.h]:[n.l,n.l+n.w];let c=u.map(function(v){return v._offset}),f=u.map(function(v){return v._offset+v._length});return[Math.min(...c),Math.max(...f)]}let i=a(t,!1),o=a(r,!0);return{x:i[0],y:o[0],width:i[1]-i[0],height:o[1]-o[0]}}function gyt(e,t,r,n,a,i){var o=10,s=10,l=r.xsizemode==="pixel",u=r.ysizemode==="pixel",c=r.type==="line",f=r.type==="path",v=i.modifyItem,g,p,x,_,y,C,k,S,L,w,A,T,m,F,E,I=cyt.select(t.node().parentNode),R=Zx.getFromId(e,r.xref),B=Zx.getRefType(r.xref),O=Zx.getFromId(e,r.yref),V=Zx.getRefType(r.yref),j=r.x0shift,q=r.x1shift,U=r.y0shift,J=r.y1shift,ee=function(Oe,ze){var ct=t0.getDataToPixel(e,R,ze,!1,B);return ct(Oe)},ce=function(Oe,ze){var ct=t0.getDataToPixel(e,O,ze,!0,V);return ct(Oe)},ye=t0.getPixelToData(e,R,!1,B),xe=t0.getPixelToData(e,O,!0,V),ue=ne(),K={element:ue.node(),gd:e,prepFn:ie,doneFn:le,clickFn:me},_e;Jhe.init(K),ue.node().onmousemove=pe;function ne(){return c?ae():t}function ae(){var Oe=10,ze=Math.max(r.line.width,Oe),ct=a.append("g").attr("data-index",n).attr("drag-helper",!0);ct.append("path").attr("d",t.attr("d")).style({cursor:"move","stroke-width":ze,"stroke-opacity":"0"});var et={"fill-opacity":"0"},qe=Math.max(ze/2,Oe);return ct.append("circle").attr({"data-line-point":"start-point",cx:l?ee(r.xanchor)+r.x0:ee(r.x0,j),cy:u?ce(r.yanchor)-r.y0:ce(r.y0,U),r:qe}).style(et).classed("cursor-grab",!0),ct.append("circle").attr({"data-line-point":"end-point",cx:l?ee(r.xanchor)+r.x1:ee(r.x1,q),cy:u?ce(r.yanchor)-r.y1:ce(r.y1,J),r:qe}).style(et).classed("cursor-grab",!0),ct}function pe(Oe){if(u8(e)){_e=null;return}if(c)Oe.target.tagName==="path"?_e="move":_e=Oe.target.attributes["data-line-point"].value==="start-point"?"resize-over-start-point":"resize-over-end-point";else{var ze=K.element.getBoundingClientRect(),ct=ze.right-ze.left,et=ze.bottom-ze.top,qe=Oe.clientX-ze.left,we=Oe.clientY-ze.top,Le=!f&&ct>o&&et>s&&!Oe.shiftKey?Jhe.getCursor(qe/ct,1-we/et):"move";ede(t,Le),_e=Le.split("-")[0]}}function ie(Oe){u8(e)||(l&&(y=ee(r.xanchor)),u&&(C=ce(r.yanchor)),r.type==="path"?E=r.path:(g=l?r.x0:ee(r.x0),p=u?r.y0:ce(r.y0),x=l?r.x1:ee(r.x1),_=u?r.y1:ce(r.y1)),g_?(k=p,A="y0",S=_,T="y1"):(k=_,A="y1",S=p,T="y0"),pe(Oe),Ge(a,r),it(t,r,e),K.moveFn=_e==="move"?be:De,K.altKey=Oe.altKey)}function le(){u8(e)||(ede(t),ht(a),ode(t,e,r),nde.call("_guiRelayout",e,i.getUpdateObj()))}function me(){u8(e)||ht(a)}function be(Oe,ze){if(r.type==="path"){var ct=function(we){return we},et=ct,qe=ct;l?v("xanchor",r.xanchor=ye(y+Oe)):(et=function(Le){return ye(ee(Le)+Oe)},R&&R.type==="date"&&(et=t0.encodeDate(et))),u?v("yanchor",r.yanchor=xe(C+ze)):(qe=function(Le){return xe(ce(Le)+ze)},O&&O.type==="date"&&(qe=t0.encodeDate(qe))),v("path",r.path=tde(E,et,qe))}else l?v("xanchor",r.xanchor=ye(y+Oe)):(v("x0",r.x0=ye(g+Oe)),v("x1",r.x1=ye(x+Oe))),u?v("yanchor",r.yanchor=xe(C+ze)):(v("y0",r.y0=xe(p+ze)),v("y1",r.y1=xe(_+ze)));t.attr("d",JO(e,r)),Ge(a,r),c8(e,n,r,I)}function De(Oe,ze){if(f){var ct=function(jt){return jt},et=ct,qe=ct;l?v("xanchor",r.xanchor=ye(y+Oe)):(et=function(mr){return ye(ee(mr)+Oe)},R&&R.type==="date"&&(et=t0.encodeDate(et))),u?v("yanchor",r.yanchor=xe(C+ze)):(qe=function(mr){return xe(ce(mr)+ze)},O&&O.type==="date"&&(qe=t0.encodeDate(qe))),v("path",r.path=tde(E,et,qe))}else if(c){if(_e==="resize-over-start-point"){var we=g+Oe,Le=u?p-ze:p+ze;v("x0",r.x0=l?we:ye(we)),v("y0",r.y0=u?Le:xe(Le))}else if(_e==="resize-over-end-point"){var Ke=x+Oe,Te=u?_-ze:_+ze;v("x1",r.x1=l?Ke:ye(Ke)),v("y1",r.y1=u?Te:xe(Te))}}else{var Ve=function(jt){return _e.indexOf(jt)!==-1},$e=Ve("n"),ot=Ve("s"),tt=Ve("w"),nt=Ve("e"),We=$e?k+ze:k,mt=ot?S+ze:S,bt=tt?L+Oe:L,Yt=nt?w+Oe:w;u&&($e&&(We=k-ze),ot&&(mt=S-ze)),(!u&&mt-We>s||u&&We-mt>s)&&(v(A,r[A]=u?We:xe(We)),v(T,r[T]=u?mt:xe(mt))),Yt-bt>o&&(v(m,r[m]=l?bt:ye(bt)),v(F,r[F]=l?Yt:ye(Yt)))}t.attr("d",JO(e,r)),Ge(a,r),c8(e,n,r,I)}function Ge(Oe,ze){(l||u)&&ct();function ct(){var et=ze.type!=="path",qe=Oe.selectAll(".visual-cue").data([0]),we=1;qe.enter().append("path").attr({fill:"#fff","fill-rule":"evenodd",stroke:"#000","stroke-width":we}).classed("visual-cue",!0);var Le=ee(l?ze.xanchor:KO.midRange(et?[ze.x0,ze.x1]:t0.extractPathCoords(ze.path,$x.paramIsX))),Ke=ce(u?ze.yanchor:KO.midRange(et?[ze.y0,ze.y1]:t0.extractPathCoords(ze.path,$x.paramIsY)));if(Le=t0.roundPositionForSharpStrokeRendering(Le,we),Ke=t0.roundPositionForSharpStrokeRendering(Ke,we),l&&u){var Te="M"+(Le-1-we)+","+(Ke-1-we)+"h-8v2h8 v8h2v-8 h8v-2h-8 v-8h-2 Z";qe.attr("d",Te)}else if(l){var Ve="M"+(Le-1-we)+","+(Ke-9-we)+"v18 h2 v-18 Z";qe.attr("d",Ve)}else{var $e="M"+(Le-9-we)+","+(Ke-1-we)+"h18 v2 h-18 Z";qe.attr("d",$e)}}}function ht(Oe){Oe.selectAll(".visual-cue").remove()}function it(Oe,ze,ct){var et=ze.xref,qe=ze.yref,we=Zx.getFromId(ct,et),Le=Zx.getFromId(ct,qe),Ke="";et!=="paper"&&!we.autorange&&(Ke+=et),qe!=="paper"&&!Le.autorange&&(Ke+=qe),f8.setClipUrl(Oe,Ke?"clip"+ct._fullLayout._uid+Ke:null,ct)}}function tde(e,t,r){return e.replace($x.segmentRE,function(n){var a=0,i=n.charAt(0),o=$x.paramIsX[i],s=$x.paramIsY[i],l=$x.numParams[i],u=n.slice(1).replace($x.paramRE,function(c){return a>=l||(o[a]?c=t(c):s[a]&&(c=r(c)),a++),c});return i+u})}function myt(e,t){if(h8(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeShapeIndex){rde(e);return}e._fullLayout._activeShapeIndex=n,e._fullLayout._deactivateShape=rde,QO(e)}}}function rde(e){if(h8(e)){var t=e._fullLayout._activeShapeIndex;t>=0&&(ide(e),delete e._fullLayout._activeShapeIndex,QO(e))}}function yyt(e){if(h8(e)){ide(e);var t=e._fullLayout._activeShapeIndex,r=(e.layout||{}).shapes||[];if(t{"use strict";var s3=Xt()._,xyt=function(e){return{DIALOG_TITLE:s3(e,"Share chart"),DIALOG_MESSAGE_CLOUD:s3(e,"This chart will be uploaded to {Plotly Cloud} to create a sharing link. Only you can see it until you change its visibility."),DIALOG_MESSAGE_CLOUD_ACCOUNT:s3(e,"If you don't have a Plotly Cloud account yet, you'll have a chance to create one."),DIALOG_MESSAGE_OTHER:s3(e,"This chart will be sent to {serverUrl}."),DIALOG_CANCEL:s3(e,"Cancel"),DIALOG_CONFIRM:s3(e,"Share")}};lde.exports=xyt});var hde=fe((C0r,fde)=>{"use strict";var cde=xi(),{dfltConfig:_yt}=im(),byt=ude(),wyt=(e,t,r,n,a)=>{let i=byt(e),o=t.append("div").classed("plotly-cloud-dialog-box",!0);if(o.append("div").classed("plotly-cloud-dialog-title",!0).text(i.DIALOG_TITLE),r===_yt.plotlyServerURL){let l=o.append("div").classed("plotly-cloud-dialog-message",!0),u=new URL(r).origin,c=i.DIALOG_MESSAGE_CLOUD.split(/(\{|\})/),f=c[0],v=c[2],g=c[4];l.append("span").text(f),l.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",u).attr("target","_blank").text(v),l.append("span").text(g),l.append("div").classed("plotly-cloud-dialog-message--account",!0).text(i.DIALOG_MESSAGE_CLOUD_ACCOUNT)}else{let l=new URL(r),u=l.hostname,c=l.origin,f=i.DIALOG_MESSAGE_OTHER.split(/(\{|\})/),v=f[0],g=f[4],p=o.append("div").classed("plotly-cloud-dialog-message",!0);p.append("span").text(v),p.append("a").classed("plotly-cloud-dialog-message--hostname",!0).attr("href",c).attr("target","_blank").text(u),p.append("span").text(g)}let s=o.append("div").classed("plotly-cloud-dialog-buttons",!0);s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--cancel",!0).text(i.DIALOG_CANCEL).on("click",a),s.append("button").classed("plotly-cloud-dialog-btn",!0).classed("plotly-cloud-dialog-btn--confirm",!0).text(i.DIALOG_CONFIRM).on("click",n)},Tyt=(e,t,r)=>{let n=cde.select(e._fullLayout._paperdiv.node());n.selectAll(".plotly-cloud-dialog").remove();let a=n.append("div").classed("plotly-cloud-dialog",!0),i=()=>{a.remove(),document.removeEventListener("keydown",o)},o=s=>{(s.key==="Escape"||s.keyCode===27)&&i()};document.addEventListener("keydown",o),a.on("click",()=>{cde.event.target===a.node()&&i()}),wyt(e,a,t,()=>{i(),r()},i)};fde.exports=Tyt});var rN=fe((L0r,xde)=>{"use strict";var iv=bi(),Ayt=Hs(),vde=El(),Zo=Jk(),Myt=d8().eraseActiveShape,Syt=hde(),v8=Xt(),Lo=v8._,$o=xde.exports={};$o.toImage={name:"toImage",title:function(e){var t=e._context.toImageButtonOptions||{},r=t.format||"png";return r==="png"?Lo(e,"Download plot as a PNG"):Lo(e,"Download plot")},icon:Zo.camera,click:function(e){var t=e._context.toImageButtonOptions,r={format:t.format||"png"};v8.notifier(Lo(e,"Preparing image - this may take a few seconds"),"long",e),["filename","width","height","scale"].forEach(function(n){n in t&&(r[n]=t[n])}),iv.call("downloadImage",e,r).then(function(n){v8.notifier(Lo(e,"Image download succeeded")+" - "+n,"long",e)}).catch(function(){v8.notifier(Lo(e,"Sorry, there was a problem downloading your image!"),"long",e)})}};$o.sendChartToCloud={name:"sendChartToCloud",title:function(e){return Lo(e,"Share chart...")},icon:Zo.cloudupload,click:function(e){var t=(window.PLOTLYENV||{}).BASE_URL||e._context.plotlyServerURL;if(!t){console.error("No destination URL provided (plotlyServerURL is empty)");return}var r;try{r=new URL(t)}catch(a){console.error("Invalid plotlyServerURL: "+t);return}let n=["http:","https:"];if(!n.includes(r.protocol)){console.error(`Invalid protocol '${r.protocol}' in plotlyServerURL '${t}'. Must be one of: ${n.join(", ")}`);return}Syt(e,t,function(){Ayt.sendDataToCloud(e,t)})}};$o.zoom2d={name:"zoom2d",_cat:"zoom",title:function(e){return Lo(e,"Zoom")},attr:"dragmode",val:"zoom",icon:Zo.zoombox,click:rd};$o.pan2d={name:"pan2d",_cat:"pan",title:function(e){return Lo(e,"Pan")},attr:"dragmode",val:"pan",icon:Zo.pan,click:rd};$o.select2d={name:"select2d",_cat:"select",title:function(e){return Lo(e,"Box Select")},attr:"dragmode",val:"select",icon:Zo.selectbox,click:rd};$o.lasso2d={name:"lasso2d",_cat:"lasso",title:function(e){return Lo(e,"Lasso Select")},attr:"dragmode",val:"lasso",icon:Zo.lasso,click:rd};$o.drawclosedpath={name:"drawclosedpath",title:function(e){return Lo(e,"Draw closed freeform")},attr:"dragmode",val:"drawclosedpath",icon:Zo.drawclosedpath,click:rd};$o.drawopenpath={name:"drawopenpath",title:function(e){return Lo(e,"Draw open freeform")},attr:"dragmode",val:"drawopenpath",icon:Zo.drawopenpath,click:rd};$o.drawline={name:"drawline",title:function(e){return Lo(e,"Draw line")},attr:"dragmode",val:"drawline",icon:Zo.drawline,click:rd};$o.drawrect={name:"drawrect",title:function(e){return Lo(e,"Draw rectangle")},attr:"dragmode",val:"drawrect",icon:Zo.drawrect,click:rd};$o.drawcircle={name:"drawcircle",title:function(e){return Lo(e,"Draw circle")},attr:"dragmode",val:"drawcircle",icon:Zo.drawcircle,click:rd};$o.eraseshape={name:"eraseshape",title:function(e){return Lo(e,"Erase active shape")},icon:Zo.eraseshape,click:Myt};$o.zoomIn2d={name:"zoomIn2d",_cat:"zoomin",title:function(e){return Lo(e,"Zoom in")},attr:"zoom",val:"in",icon:Zo.zoom_plus,click:rd};$o.zoomOut2d={name:"zoomOut2d",_cat:"zoomout",title:function(e){return Lo(e,"Zoom out")},attr:"zoom",val:"out",icon:Zo.zoom_minus,click:rd};$o.autoScale2d={name:"autoScale2d",_cat:"autoscale",title:function(e){return Lo(e,"Autoscale")},attr:"zoom",val:"auto",icon:Zo.autoscale,click:rd};$o.resetScale2d={name:"resetScale2d",_cat:"resetscale",title:function(e){return Lo(e,"Reset axes")},attr:"zoom",val:"reset",icon:Zo.home,click:rd};$o.hoverClosestCartesian={name:"hoverClosestCartesian",_cat:"hoverclosest",title:function(e){return Lo(e,"Show closest data on hover")},attr:"hovermode",val:"closest",icon:Zo.tooltip_basic,gravity:"ne",click:rd};$o.hoverCompareCartesian={name:"hoverCompareCartesian",_cat:"hoverCompare",title:function(e){return Lo(e,"Compare data on hover")},attr:"hovermode",val:function(e){return e._fullLayout._isHoriz?"y":"x"},icon:Zo.tooltip_compare,gravity:"ne",click:rd};function rd(e,t){var r=t.currentTarget,n=r.getAttribute("data-attr"),a=r.getAttribute("data-val")||!0,i=e._fullLayout,o={},s=vde.list(e,null,!0),l=i._cartesianSpikesEnabled,u,c;if(n==="zoom"){var f=a==="in"?.5:2,v=(1+f)/2,g=(1-f)/2,p,x;for(c=0;c-w),[x,_]=f.invert(c.midPt),{minscale:y}=u.projection,C=(s=u.projection.maxscale)!=null?s:1/0,k=Math.min(y,C),S=Math.max(y,C),L=a==="in"?dde*v:1/dde*v;L>S?L=S:L{"use strict";var _de=rN(),Lyt=Object.keys(_de),bde=["drawline","drawopenpath","drawclosedpath","drawcircle","drawrect","eraseshape"],wde=["v1hovermode","hoverclosest","hovercompare","togglehover","togglespikelines"].concat(bde),l3=[],Pyt=function(e){if(wde.indexOf(e._cat||e.name)===-1){var t=e.name,r=(e._cat||e.name).toLowerCase();l3.indexOf(t)===-1&&l3.push(t),l3.indexOf(r)===-1&&l3.push(r)}};Lyt.forEach(function(e){Pyt(_de[e])});l3.sort();Tde.exports={DRAW_MODES:bde,backButtons:wde,foreButtons:l3}});var aN={};zp(aN,{default:()=>Dyt});var iN,Fyt,Dyt,oN=Co(()=>{"use strict";iN=$0(nN()),Fyt={editType:"modebar",orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"modebar",description:"Sets the orientation of the modebar."},bgcolor:{valType:"color",editType:"modebar",description:"Sets the background color of the modebar."},color:{valType:"color",editType:"modebar",description:"Sets the color of the icons in the modebar."},activecolor:{valType:"color",editType:"modebar",description:"Sets the color of the active or hovered on icons in the modebar."},uirevision:{valType:"any",editType:"none",description:["Controls persistence of user-driven changes related to the modebar,","including `hovermode`, `dragmode`, and `showspikes` at both the","root level and inside subplots. Defaults to `layout.uirevision`."].join(" ")},add:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to add.","Please note that these buttons will only be shown if they are","compatible with all trace types used in a graph.","Similar to `config.modeBarButtonsToAdd` option.",`This may include *${iN.default.backButtons.join("*, *")}*.`].join(" ")},remove:{valType:"string",arrayOk:!0,dflt:"",editType:"modebar",description:["Determines which predefined modebar buttons to remove.","Similar to `config.modeBarButtonsToRemove` option.",`This may include *${iN.default.foreButtons.join("*, *")}*.`].join(" ")}},Dyt=Fyt});var Mde=fe((F0r,Ade)=>{"use strict";var Ryt=Xt(),LT=ni(),Iyt=Mo(),zyt=(oN(),Gs(aN)).default;Ade.exports=function(t,r){var n=t.modebar||{},a=Iyt.newContainer(r,"modebar");function i(s,l){return Ryt.coerce(n,a,zyt,s,l)}i("orientation"),i("bgcolor",LT.addOpacity(r.paper_bgcolor,.5));var o=LT.contrast(LT.rgb(r.modebar.bgcolor));i("color",LT.addOpacity(o,.3)),i("activecolor",LT.addOpacity(o,.7)),i("uirevision",r.uirevision),i("add"),i("remove")}});var Cde=fe((D0r,kde)=>{"use strict";var sN=xi(),qyt=aa(),m8=Xt(),Sde=Jk(),Byt=A4().version,Oyt=new DOMParser;function Ede(e){this.container=e.container,this.element=document.createElement("div"),this.update(e.graphInfo,e.buttons),this.container.appendChild(this.element)}var e1=Ede.prototype;e1.update=function(e,t){this.graphInfo=e;var r=this.graphInfo._context,n=this.graphInfo._fullLayout,a="modebar-"+n._uid;this.element.setAttribute("id",a),this.element.setAttribute("role","toolbar"),this._uid=a,this.element.className="modebar modebar--custom",r.displayModeBar==="hover"&&(this.element.className+=" modebar--hover ease-bg"),n.modebar.orientation==="v"&&(this.element.className+=" vertical",t=t.reverse());var i=n.modebar,o="#"+a+" .modebar-group";document.querySelectorAll(o).forEach(function(f){f.style.backgroundColor=i.bgcolor});var s=!this.hasButtons(t),l=this.hasLogo!==r.displaylogo,u=this.locale!==r.locale;if(this.locale=r.locale,(s||l||u)&&(this.removeAllButtons(),this.updateButtons(t),r.watermark||r.displaylogo)){var c=this.getLogo();r.watermark&&(c.className=c.className+" watermark"),n.modebar.orientation==="v"?this.element.insertBefore(c,this.element.childNodes[0]):this.element.appendChild(c),this.hasLogo=!0}this.updateActiveButton(),m8.setStyleOnHover("#"+a+" .modebar-btn",".active",".icon path","fill: "+i.activecolor,"fill: "+i.color,this.element)};e1.updateButtons=function(e){var t=this;this.buttons=e,this.buttonElements=[],this.buttonsNames=[],this.buttons.forEach(function(r){var n=t.createGroup();r.forEach(function(a){var i=a.name;if(!i)throw new Error("must provide button 'name' in button config");if(t.buttonsNames.indexOf(i)!==-1)throw new Error("button name '"+i+"' is taken");t.buttonsNames.push(i);var o=t.createButton(a);t.buttonElements.push(o),n.appendChild(o)}),t.element.appendChild(n)})};e1.createGroup=function(){var e=document.createElement("div");e.className="modebar-group";var t=this.graphInfo._fullLayout.modebar;return e.style.backgroundColor=t.bgcolor,e};e1.createButton=function(e){var t=this,r=document.createElement("button");r.setAttribute("type","button"),r.setAttribute("rel","tooltip"),r.className="modebar-btn";var n=e.title;n===void 0?n=e.name:typeof n=="function"&&(n=n(this.graphInfo)),(n||n===0)&&(r.setAttribute("data-title",n),r.setAttribute("aria-label",n)),e.attr!==void 0&&r.setAttribute("data-attr",e.attr);var a=e.val;a!==void 0&&(typeof a=="function"&&(a=a(this.graphInfo)),r.setAttribute("data-val",a));var i=e.click;if(typeof i!="function")throw new Error("must provide button 'click' function in button config");r.addEventListener("click",function(s){e.click(t.graphInfo,s),t.updateActiveButton(s.currentTarget)}),r.setAttribute("data-toggle",e.toggle||!1),e.toggle&&sN.select(r).classed("active",!0);var o=e.icon;return typeof o=="function"?r.appendChild(o()):r.appendChild(this.createIcon(o||Sde.question)),r.setAttribute("data-gravity",e.gravity||"n"),r};e1.createIcon=function(e){var t=qyt(e.height)?Number(e.height):e.ascent-e.descent,r="http://www.w3.org/2000/svg",n;if(e.path){n=document.createElementNS(r,"svg"),n.setAttribute("viewBox",[0,0,e.width,t].join(" ")),n.setAttribute("class","icon");var a=document.createElementNS(r,"path");a.setAttribute("d",e.path),e.transform?a.setAttribute("transform",e.transform):e.ascent!==void 0&&a.setAttribute("transform","matrix(1 0 0 -1 0 "+e.ascent+")"),n.appendChild(a)}if(e.svg){var i=Oyt.parseFromString(e.svg,"application/xml");n=i.childNodes[0]}return n.setAttribute("height","1em"),n.setAttribute("width","1em"),n};e1.updateActiveButton=function(e){var t=this.graphInfo._fullLayout,r=e!==void 0?e.getAttribute("data-attr"):null;this.buttonElements.forEach(function(n){var a=n.getAttribute("data-val")||!0,i=n.getAttribute("data-attr"),o=n.getAttribute("data-toggle")==="true",s=sN.select(n),l=function(f,v){var g=t.modebar,p=f.querySelector(".icon path");p&&(v||f.matches(":hover")?p.style.fill=g.activecolor:p.style.fill=g.color)};if(o){if(i===r){var u=!s.classed("active");s.classed("active",u),l(n,u)}}else{var c=i===null?i:m8.nestedProperty(t,i).get();s.classed("active",c===a),l(n,c===a)}})};e1.hasButtons=function(e){var t=this.buttons;if(!t||e.length!==t.length)return!1;for(var r=0;r{"use strict";var Vyt=El(),Lde=Is(),lN=bi(),Gyt=Sd().isUnifiedHover,Hyt=Cde(),y8=rN(),jyt=nN().DRAW_MODES,Wyt=Xt().extendDeep;Pde.exports=function(t){var r=t._fullLayout,n=t._context,a=r._modeBar;if(!n.displayModeBar&&!n.watermark){a&&(a.destroy(),delete r._modeBar);return}if(!Array.isArray(n.modeBarButtonsToRemove))throw new Error(["*modeBarButtonsToRemove* configuration options","must be an array."].join(" "));if(!Array.isArray(n.modeBarButtonsToAdd))throw new Error(["*modeBarButtonsToAdd* configuration options","must be an array."].join(" "));var i=n.modeBarButtons,o;Array.isArray(i)&&i.length?o=Jyt(i):!n.displayModeBar&&n.watermark?o=[]:o=Yyt(t),a?a.update(t,o):r._modeBar=Hyt(t,o)};function Yyt(e){var t=e._fullLayout,r=e._fullData,n=e._context;function a(j,q){if(typeof q=="string"){if(q.toLowerCase()===j.toLowerCase())return!0}else{var U=q.name,J=q._cat||q.name;if(U===j||J===j.toLowerCase())return!0}return!1}var i=t.modebar.add;typeof i=="string"&&(i=[i]);var o=t.modebar.remove;typeof o=="string"&&(o=[o]);var s=n.modeBarButtonsToAdd.concat(i.filter(function(j){for(var q=0;q1?(m=["toggleHover"],F=["resetViews"]):f?(T=["zoomInGeo","zoomOutGeo"],m=["hoverClosestGeo"],F=["resetGeo"]):c?(m=["hoverClosest3d"],F=["resetCameraDefault3d","resetCameraLastSave3d"]):x?(T=["zoomInMap","zoomOutMap"],m=["toggleHover"],F=["resetViewMap"]):v?m=["hoverClosestPie"]:C?(m=["hoverClosestCartesian","hoverCompareCartesian"],F=["resetViewSankey"]):m=["toggleHover"],u&&m.push("toggleSpikelines","hoverClosestCartesian","hoverCompareCartesian"),($yt(r)||S)&&(m=[]),u&&!k&&(T=["zoomIn2d","zoomOut2d","autoScale2d"],F[0]!=="resetViews"&&(F=["resetScale2d"])),c?E=["zoom3d","pan3d","orbitRotation","tableRotation"]:u&&!k||p?E=["zoom2d","pan2d"]:x||f?E=["pan2d"]:_&&(E=["zoom2d"]),Zyt(r)&&E.push("select2d","lasso2d");var I=[],R=function(j){I.indexOf(j)===-1&&m.indexOf(j)!==-1&&I.push(j)};if(Array.isArray(s)){for(var B=[],O=0;O{"use strict";Dde.exports={moduleType:"component",name:"modebar",layoutAttributes:(oN(),Gs(aN)).default,supplyLayoutDefaults:Mde(),manage:Fde()}});var cN=fe((z0r,Rde)=>{"use strict";var Qyt=nc().FROM_BL;Rde.exports=function(t,r,n){n===void 0&&(n=Qyt[t.constraintoward||"center"]);var a=[t.r2l(t.range[0]),t.r2l(t.range[1])],i=a[0]+(a[1]-a[0])*n;t.range=t._input.range=[t.l2r(i+(a[0]-i)*r),t.l2r(i+(a[1]-i)*r)],t.setScale()}});var Jx=fe(PT=>{"use strict";var Kx=Xt(),fN=rp(),ip=El().id2name,ext=pf(),Ide=cN(),txt=Hp(),rxt=Wa().ALMOST_EQUAL,nxt=nc().FROM_BL;PT.handleDefaults=function(e,t,r){var n=r.axIds,a=r.axHasImage,i=t._axisConstraintGroups=[],o=t._axisMatchGroups=[],s,l,u,c,f,v,g,p;for(s=0;si?r.slice(i):n.slice(a))+o}function axt(e,t){for(var r=t._size,n=r.h/r.w,a={},i=Object.keys(e),o=0;orxt*p&&!C)){for(i=0;iI&&JF&&(F=J);var ce=(F-m)/(2*E);f/=ce,m=l.l2r(m),F=l.l2r(F),l.range=l._input.range=w{"use strict";var _8=xi(),nd=bi(),L0=Hs(),av=Xt(),vN=as(),pN=ST(),FT=ni(),u3=ea(),Ode=qx(),Hde=uN(),DT=Yi(),ng=nc(),jde=Jx(),oxt=jde.enforce,sxt=jde.clean,Nde=rp().doAutoRange,Wde="start",lxt="middle",Yde="end",uxt=rc().zindexSeparator;Hc.layoutStyles=function(e){return av.syncOrAsync([L0.doAutoMargin,fxt],e)};function cxt(e,t,r){for(var n=0;n=e[1]||a[1]<=e[0])&&i[0]t[0])return!0}return!1}function fxt(e){var t=e._fullLayout,r=t._size,n=r.p,a=DT.list(e,"",!0),i,o,s,l,u,c;if(t._paperdiv.style({width:e._context.responsive&&t.autosize&&!e._context._hasZeroWidth&&!e.layout.width?"100%":t.width+"px",height:e._context.responsive&&t.autosize&&!e._context._hasZeroHeight&&!e.layout.height?"100%":t.height+"px"}).selectAll(".main-svg").call(u3.setSize,t.width,t.height),e._context.setBackground(e,t.paper_bgcolor),Hc.drawMainTitle(e),Hde.manage(e),!t._has("cartesian"))return L0.previousPromises(e);function f(ie,le,me){var be=ie._lw/2;if(ie._id.charAt(0)==="x"){if(le){if(me==="top")return le._offset-n-be}else return r.t+r.h*(1-(ie.position||0))+be%1;return le._offset+le._length+n+be}if(le){if(me==="right")return le._offset+le._length+n+be}else return r.l+r.w*(ie.position||0)+be%1;return le._offset-n-be}for(i=0;i0){pxt(e,i,u,l),s.attr({x:o,y:i,"text-anchor":n,dy:Gde(t.yanchor)}).call(vN.positionText,o,i);var c=(t.text.match(vN.BR_TAG_ALL)||[]).length;if(c){var f=ng.LINE_SPACING*c+ng.MID_SHIFT;t.y===0&&(f=-f),s.selectAll(".line").each(function(){var _=+this.getAttribute("dy").slice(0,-2)-f+"em";this.setAttribute("dy",_)})}var v=_8.select(e).selectAll(".gtitle-subtitle");if(v.node()){var g=s.node().getBBox(),p=g.y+g.height,x=p+Ode.SUBTITLE_PADDING_EM*t.subtitle.font.size;v.attr({x:o,y:x,"text-anchor":n,dy:Gde(t.yanchor)}).call(vN.positionText,o,x)}}}};function hxt(e,t,r,n,a){var i=t.yref==="paper"?e._fullLayout._size.h:e._fullLayout.height,o=av.isTopAnchor(t)?n:n-a,s=r==="b"?i-o:o;return av.isTopAnchor(t)&&r==="t"||av.isBottomAnchor(t)&&r==="b"?!1:s.5?"t":"b",o=e._fullLayout.margin[i],s=0;return t.yref==="paper"?s=r+t.pad.t+t.pad.b:t.yref==="container"&&(s=dxt(i,n,a,e._fullLayout.height,r)+t.pad.t+t.pad.b),s>o?s:0}function pxt(e,t,r,n){var a="title.automargin",i=e._fullLayout.title,o=i.y>.5?"t":"b",s={x:i.x,y:i.y,t:0,b:0},l={};i.yref==="paper"&&hxt(e,i,o,t,n)?s[o]=r:i.yref==="container"&&(l[o]=r,e._fullLayout._reservedMargin[a]=l),L0.allowAutoMargin(e,a),L0.autoMargin(e,a,s)}function gxt(e,t){var r=e.title,n=e._size,a=0;return t===Wde?a=r.pad.l:t===Yde&&(a=-r.pad.r),r.xref==="paper"?n.l+n.w*r.x+a:e.width*r.x+a}function mxt(e,t){var r=e.title,n=e._size,a=0;return t==="0em"||!t?a=-r.pad.b:t===ng.CAP_SHIFT+"em"&&(a=r.pad.t),r.y==="auto"?n.t/2:r.yref==="paper"?n.t+n.h-n.h*r.y+a:e.height-e.height*r.y+a}function Gde(e){return e==="top"?ng.CAP_SHIFT+.3+"em":e==="bottom"?"-0.3em":ng.MID_SHIFT+"em"}function yxt(e){var t=e.title,r=lxt;return av.isRightAnchor(t)?r=Yde:av.isLeftAnchor(t)&&(r=Wde),r}function xxt(e){var t=e.title,r="0em";return av.isTopAnchor(t)?r=ng.CAP_SHIFT+"em":av.isMiddleAnchor(t)&&(r=ng.MID_SHIFT+"em"),r}Hc.doTraceStyle=function(e){var t=e.calcdata,r=[],n;for(n=0;n{"use strict";var _xt=Em().readPaths,bxt=l8(),Xde=pm().clearOutlineControllers,gN=ni(),Zde=ea(),wxt=Mo().arrayEditor,$de=Lm(),Txt=$de.getPathString;Jde.exports={draw:b8,drawOne:Kde,activateLastSelection:Sxt};function b8(e){var t=e._fullLayout;Xde(e),t._selectionLayer.selectAll("path").remove();for(var r in t._plots){var n=t._plots[r].selectionLayer;n&&n.selectAll("path").remove()}for(var a=0;a=0;_--){var y=o.append("path").attr(l).style("opacity",_?.1:u).call(gN.stroke,f).call(gN.fill,c).call(Zde.dashLine,_?"solid":g,_?4+v:v);if(Axt(y,e,n),p){var C=wxt(e.layout,"selections",n);y.style({cursor:"move"});var k={element:y.node(),plotinfo:a,gd:e,editHelpers:C,isActiveSelection:!0},S=_xt(s,e);bxt(S,y,k)}else y.style("pointer-events",_?"all":"none");x[_]=y}var L=x[0],w=x[1];w.node().addEventListener("click",function(){return Mxt(e,L)})}}function Axt(e,t,r){var n=r.xref+r.yref;Zde.setClipUrl(e,"clip"+t._fullLayout._uid+n,t)}function Mxt(e,t){if(w8(e)){var r=t.node(),n=+r.getAttribute("data-index");if(n>=0){if(n===e._fullLayout._activeSelectionIndex){mN(e);return}e._fullLayout._activeSelectionIndex=n,e._fullLayout._deactivateSelection=mN,b8(e)}}}function Sxt(e){if(w8(e)){var t=e._fullLayout.selections.length-1;e._fullLayout._activeSelectionIndex=t,e._fullLayout._deactivateSelection=mN,b8(e)}}function mN(e){if(w8(e)){var t=e._fullLayout._activeSelectionIndex;t>=0&&(Xde(e),delete e._fullLayout._activeSelectionIndex,b8(e))}}});var e0e=fe((N0r,Qde)=>{function Ext(){var e,t=0,r=!1;function n(a,i){return e.list.push({type:a,data:i?JSON.parse(JSON.stringify(i)):void 0}),e}return e={list:[],segmentId:function(){return t++},checkIntersection:function(a,i){return n("check",{seg1:a,seg2:i})},segmentChop:function(a,i){return n("div_seg",{seg:a,pt:i}),n("chop",{seg:a,pt:i})},statusRemove:function(a){return n("pop_seg",{seg:a})},segmentUpdate:function(a){return n("seg_update",{seg:a})},segmentNew:function(a,i){return n("new_seg",{seg:a,primary:i})},segmentRemove:function(a){return n("rem_seg",{seg:a})},tempStatus:function(a,i,o){return n("temp_status",{seg:a,above:i,below:o})},rewind:function(a){return n("rewind",{seg:a})},status:function(a,i,o){return n("status",{seg:a,above:i,below:o})},vert:function(a){return a===r?e:(r=a,n("vert",{x:a}))},log:function(a){return typeof a!="string"&&(a=JSON.stringify(a,!1," ")),n("log",{txt:a})},reset:function(){return n("reset")},selected:function(a){return n("selected",{segs:a})},chainStart:function(a){return n("chain_start",{seg:a})},chainRemoveHead:function(a,i){return n("chain_rem_head",{index:a,pt:i})},chainRemoveTail:function(a,i){return n("chain_rem_tail",{index:a,pt:i})},chainNew:function(a,i){return n("chain_new",{pt1:a,pt2:i})},chainMatch:function(a){return n("chain_match",{index:a})},chainClose:function(a){return n("chain_close",{index:a})},chainAddHead:function(a,i){return n("chain_add_head",{index:a,pt:i})},chainAddTail:function(a,i){return n("chain_add_tail",{index:a,pt:i})},chainConnect:function(a,i){return n("chain_con",{index1:a,index2:i})},chainReverse:function(a){return n("chain_rev",{index:a})},chainJoin:function(a,i){return n("chain_join",{index1:a,index2:i})},done:function(){return n("done")}},e}Qde.exports=Ext});var r0e=fe((U0r,t0e)=>{function kxt(e){typeof e!="number"&&(e=1e-10);var t={epsilon:function(r){return typeof r=="number"&&(e=r),e},pointAboveOrOnLine:function(r,n,a){var i=n[0],o=n[1],s=a[0],l=a[1],u=r[0],c=r[1];return(s-i)*(c-o)-(l-o)*(u-i)>=-e},pointBetween:function(r,n,a){var i=r[1]-n[1],o=a[0]-n[0],s=r[0]-n[0],l=a[1]-n[1],u=s*o+i*l;if(u-e)},pointsSameX:function(r,n){return Math.abs(r[0]-n[0])e!=s-i>e&&(o-c)*(i-f)/(s-f)+c-a>e&&(l=!l),o=c,s=f}return l}};return t}t0e.exports=kxt});var i0e=fe((V0r,n0e)=>{var Cxt={create:function(){var e={root:{root:!0,next:null},exists:function(t){return!(t===null||t===e.root)},isEmpty:function(){return e.root.next===null},getHead:function(){return e.root.next},insertBefore:function(t,r){for(var n=e.root,a=e.root.next;a!==null;){if(r(a)){t.prev=a.prev,t.next=a,a.prev.next=t,a.prev=t;return}n=a,a=a.next}n.next=t,t.prev=n,t.next=null},findTransition:function(t){for(var r=e.root,n=e.root.next;n!==null&&!t(n);)r=n,n=n.next;return{before:r===e.root?null:r,after:n,insert:function(a){return a.prev=r,a.next=n,r.next=a,n!==null&&(n.prev=a),a}}}};return e},node:function(e){return e.prev=null,e.next=null,e.remove=function(){e.prev.next=e.next,e.next&&(e.next.prev=e.prev),e.prev=null,e.next=null},e}};n0e.exports=Cxt});var o0e=fe((G0r,a0e)=>{var IT=i0e();function Lxt(e,t,r){function n(p,x){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:null,below:null},otherFill:null}}function a(p,x,_){return{id:r?r.segmentId():-1,start:p,end:x,myFill:{above:_.myFill.above,below:_.myFill.below},otherFill:null}}var i=IT.create();function o(p,x,_,y,C,k){var S=t.pointsCompare(x,C);return S!==0?S:t.pointsSame(_,k)?0:p!==y?p?1:-1:t.pointAboveOrOnLine(_,y?C:k,y?k:C)?1:-1}function s(p,x){i.insertBefore(p,function(_){var y=o(p.isStart,p.pt,x,_.isStart,_.pt,_.other.pt);return y<0})}function l(p,x){var _=IT.node({isStart:!0,pt:p.start,seg:p,primary:x,other:null,status:null});return s(_,p.end),_}function u(p,x,_){var y=IT.node({isStart:!1,pt:x.end,seg:x,primary:_,other:p,status:null});p.other=y,s(y,p.pt)}function c(p,x){var _=l(p,x);return u(_,p,x),_}function f(p,x){r&&r.segmentChop(p.seg,x),p.other.remove(),p.seg.end=x,p.other.pt=x,s(p.other,p.pt)}function v(p,x){var _=a(x,p.seg.end,p.seg);return f(p,x),c(_,p.primary)}function g(p,x){var _=IT.create();function y(O,V){var j=O.seg.start,q=O.seg.end,U=V.seg.start,J=V.seg.end;return t.pointsCollinear(j,U,J)?t.pointsCollinear(q,U,J)||t.pointAboveOrOnLine(q,U,J)?1:-1:t.pointAboveOrOnLine(j,U,J)?1:-1}function C(O){return _.findTransition(function(V){var j=y(O,V.ev);return j>0})}function k(O,V){var j=O.seg,q=V.seg,U=j.start,J=j.end,ee=q.start,ce=q.end;r&&r.checkIntersection(j,q);var ye=t.linesIntersect(U,J,ee,ce);if(ye===!1){if(!t.pointsCollinear(U,J,ee)||t.pointsSame(U,ce)||t.pointsSame(J,ee))return!1;var xe=t.pointsSame(U,ee),ue=t.pointsSame(J,ce);if(xe&&ue)return V;var K=!xe&&t.pointBetween(U,ee,ce),_e=!ue&&t.pointBetween(J,ee,ce);if(xe)return _e?v(V,J):v(O,ce),V;K&&(ue||(_e?v(V,J):v(O,ce)),v(V,U))}else ye.alongA===0&&(ye.alongB===-1?v(O,ee):ye.alongB===0?v(O,ye.pt):ye.alongB===1&&v(O,ce)),ye.alongB===0&&(ye.alongA===-1?v(V,U):ye.alongA===0?v(V,ye.pt):ye.alongA===1&&v(V,J));return!1}for(var S=[];!i.isEmpty();){var L=i.getHead();if(r&&r.vert(L.pt[0]),L.isStart){let O=function(){if(A){var V=k(L,A);if(V)return V}return T?k(L,T):!1};var B=O;r&&r.segmentNew(L.seg,L.primary);var w=C(L),A=w.before?w.before.ev:null,T=w.after?w.after.ev:null;r&&r.tempStatus(L.seg,A?A.seg:!1,T?T.seg:!1);var m=O();if(m){if(e){var F;L.seg.myFill.below===null?F=!0:F=L.seg.myFill.above!==L.seg.myFill.below,F&&(m.seg.myFill.above=!m.seg.myFill.above)}else m.seg.otherFill=L.seg.myFill;r&&r.segmentUpdate(m.seg),L.other.remove(),L.remove()}if(i.getHead()!==L){r&&r.rewind(L.seg);continue}if(e){var F;L.seg.myFill.below===null?F=!0:F=L.seg.myFill.above!==L.seg.myFill.below,T?L.seg.myFill.below=T.seg.myFill.above:L.seg.myFill.below=p,F?L.seg.myFill.above=!L.seg.myFill.below:L.seg.myFill.above=L.seg.myFill.below}else if(L.seg.otherFill===null){var E;T?L.primary===T.primary?E=T.seg.otherFill.above:E=T.seg.myFill.above:E=L.primary?x:p,L.seg.otherFill={above:E,below:E}}r&&r.status(L.seg,A?A.seg:!1,T?T.seg:!1),L.other.status=w.insert(IT.node({ev:L}))}else{var I=L.status;if(I===null)throw new Error("PolyBool: Zero-length segment detected; your epsilon is probably too small or too large");if(_.exists(I.prev)&&_.exists(I.next)&&k(I.prev.ev,I.next.ev),r&&r.statusRemove(I.ev.seg),I.remove(),!L.primary){var R=L.seg.myFill;L.seg.myFill=L.seg.otherFill,L.seg.otherFill=R}S.push(L.seg)}i.getHead().remove()}return r&&r.done(),S}return e?{addRegion:function(p){for(var x,_=p[p.length-1],y=0;y{function Pxt(e,t,r){var n=[],a=[];return e.forEach(function(i){var o=i.start,s=i.end;if(t.pointsSame(o,s)){console.warn("PolyBool: Warning: Zero-length segment detected; your epsilon is probably too small or too large");return}r&&r.chainStart(i);var l={index:0,matches_head:!1,matches_pt1:!1},u={index:0,matches_head:!1,matches_pt1:!1},c=l;function f(B,O,V){return c.index=B,c.matches_head=O,c.matches_pt1=V,c===l?(c=u,!1):(c=null,!0)}for(var v=0;v{function zT(e,t,r){var n=[];return e.forEach(function(a){var i=(a.myFill.above?8:0)+(a.myFill.below?4:0)+(a.otherFill&&a.otherFill.above?2:0)+(a.otherFill&&a.otherFill.below?1:0);t[i]!==0&&n.push({id:r?r.segmentId():-1,start:a.start,end:a.end,myFill:{above:t[i]===1,below:t[i]===2},otherFill:null})}),r&&r.selected(n),n}var Fxt={union:function(e,t){return zT(e,[0,2,1,0,2,2,0,0,1,0,1,0,0,0,0,0],t)},intersect:function(e,t){return zT(e,[0,0,0,0,0,2,0,2,0,0,1,1,0,2,1,0],t)},difference:function(e,t){return zT(e,[0,0,0,0,2,0,2,0,1,1,0,0,0,1,2,0],t)},differenceRev:function(e,t){return zT(e,[0,2,1,0,0,0,1,1,0,2,0,2,0,0,0,0],t)},xor:function(e,t){return zT(e,[0,2,1,0,2,0,0,1,1,0,0,2,0,1,2,0],t)}};u0e.exports=Fxt});var h0e=fe((W0r,f0e)=>{var Dxt={toPolygon:function(e,t){function r(i){if(i.length<=0)return e.segments({inverted:!1,regions:[]});function o(u){var c=u.slice(0,u.length-1);return e.segments({inverted:!1,regions:[c]})}for(var s=o(i[0]),l=1;l{var Rxt=e0e(),Ixt=r0e(),d0e=o0e(),zxt=l0e(),qT=c0e(),v0e=h0e(),ov=!1,BT=Ixt(),r0;r0={buildLog:function(e){return e===!0?ov=Rxt():e===!1&&(ov=!1),ov===!1?!1:ov.list},epsilon:function(e){return BT.epsilon(e)},segments:function(e){var t=d0e(!0,BT,ov);return e.regions.forEach(t.addRegion),{segments:t.calculate(e.inverted),inverted:e.inverted}},combine:function(e,t){var r=d0e(!1,BT,ov);return{combined:r.calculate(e.segments,e.inverted,t.segments,t.inverted),inverted1:e.inverted,inverted2:t.inverted}},selectUnion:function(e){return{segments:qT.union(e.combined,ov),inverted:e.inverted1||e.inverted2}},selectIntersect:function(e){return{segments:qT.intersect(e.combined,ov),inverted:e.inverted1&&e.inverted2}},selectDifference:function(e){return{segments:qT.difference(e.combined,ov),inverted:e.inverted1&&!e.inverted2}},selectDifferenceRev:function(e){return{segments:qT.differenceRev(e.combined,ov),inverted:!e.inverted1&&e.inverted2}},selectXor:function(e){return{segments:qT.xor(e.combined,ov),inverted:e.inverted1!==e.inverted2}},polygon:function(e){return{regions:zxt(e.segments,BT,ov),inverted:e.inverted}},polygonFromGeoJSON:function(e){return v0e.toPolygon(r0,e)},polygonToGeoJSON:function(e){return v0e.fromPolygon(r0,BT,e)},union:function(e,t){return OT(e,t,r0.selectUnion)},intersect:function(e,t){return OT(e,t,r0.selectIntersect)},difference:function(e,t){return OT(e,t,r0.selectDifference)},differenceRev:function(e,t){return OT(e,t,r0.selectDifferenceRev)},xor:function(e,t){return OT(e,t,r0.selectXor)}};function OT(e,t,r){var n=r0.segments(e),a=r0.segments(t),i=r0.combine(n,a),o=r(i);return r0.polygon(o)}typeof window=="object"&&(window.PolyBool=r0);p0e.exports=r0});var y0e=fe((X0r,m0e)=>{m0e.exports=function(t,r,n,a){var i=t[0],o=t[1],s=!1;n===void 0&&(n=0),a===void 0&&(a=r.length);for(var l=a-n,u=0,c=l-1;uo!=p>o&&i<(g-f)*(o-v)/(p-v)+f;x&&(s=!s)}return s}});var NT=fe((Z0r,x0e)=>{"use strict";var xN=FE().dot,T8=Wa().BADNUM,A8=x0e.exports={};A8.tester=function(t){var r=t.slice(),n=r[0][0],a=n,i=r[0][1],o=i,s;for((r[r.length-1][0]!==r[0][0]||r[r.length-1][1]!==r[0][1])&&r.push(r[0]),s=1;sa||y===T8||yo||x&&u(p))}function f(p,x){var _=p[0],y=p[1];if(_===T8||_a||y===T8||yo)return!1;var C=r.length,k=r[0][0],S=r[0][1],L=0,w,A,T,m,F;for(w=1;wMath.max(A,k)||y>Math.max(T,S)))if(ys||Math.abs(xN(f,u))>a)return!0;return!1};A8.filter=function(t,r){var n=[t[0]],a=0,i=0;function o(l){t.push(l);var u=n.length,c=a;n.splice(i+1);for(var f=c+1;f1){var s=t.pop();o(s)}return{addPt:o,raw:t,filtered:n}}});var b0e=fe(($0r,_0e)=>{"use strict";_0e.exports={BENDPX:1.5,MINSELECT:12,SELECTDELAY:100,SELECTID:"-select"}});var G0e=fe((K0r,V0e)=>{"use strict";var w0e=g0e(),qxt=y0e(),GT=bi(),Bxt=ea().dashStyle,UT=ni(),Oxt=kl(),Nxt=Sd().makeEventData,XT=$p(),Uxt=XT.freeMode,Vxt=XT.rectMode,HT=XT.drawMode,TN=XT.openMode,AN=XT.selectMode,T0e=Lm(),A0e=kT(),C0e=l8(),L0e=pm().clearOutline,P0e=Em(),_N=P0e.handleEllipse,Gxt=P0e.readPaths,Hxt=a8().newShapes,jxt=WO(),Wxt=yN().activateLastSelection,S8=Xt(),Yxt=S8.sorterAsc,F0e=NT(),VT=jE(),sv=El().getFromId,Xxt=ST(),Zxt=RT().redrawReglTraces,E8=b0e(),t1=E8.MINSELECT,$xt=F0e.filter,MN=F0e.tester,SN=t8(),M0e=SN.p2r,Kxt=SN.axValue,Jxt=SN.getTransform;function EN(e){return e.subplot!==void 0}function Qxt(e,t,r,n,a){var i=!EN(n),o=Uxt(a),s=Vxt(a),l=TN(a),u=HT(a),c=AN(a),f=a==="drawline",v=a==="drawcircle",g=f||v,p=n.gd,x=p._fullLayout,_=c&&x.newselection.mode==="immediate"&&i,y=x._zoomlayer,C=n.element.getBoundingClientRect(),k=n.plotinfo,S=Jxt(k),L=t-C.left,w=r-C.top;x._calcInverseTransform(p);var A=S8.apply3DTransform(x._invTransform)(L,w);L=A[0],w=A[1];var T=x._invScaleX,m=x._invScaleY,F=L,E=w,I="M"+L+","+w,R=n.xaxes[0],B=n.yaxes[0],O=R._length,V=B._length,j=e.altKey&&!(HT(a)&&l),q,U,J,ee,ce,ye,xe;R0e(e,p,n),o&&(q=$xt([[L,w]],E8.BENDPX));var ue=y.selectAll("path.select-outline-"+k.id).data([1]),K=u?x.newshape:x.newselection;u&&(n.hasText=K.label.text||K.label.texttemplate);var _e=u&&!l?K.fillcolor:"rgba(0,0,0,0)",ne=K.line.color||(i?UT.contrast(p._fullLayout.plot_bgcolor):"#7f7f7f");ue.enter().append("path").attr("class","select-outline select-outline-"+k.id).style({opacity:u?K.opacity/2:1,"stroke-dasharray":Bxt(K.line.dash,K.line.width),"stroke-width":K.line.width+"px","shape-rendering":"crispEdges"}).call(UT.stroke,ne).call(UT.fill,_e).attr("fill-rule","evenodd").classed("cursor-move",!!u).attr("transform",S).attr("d",I+"Z");var ae=y.append("path").attr("class","zoombox-corners").style({fill:UT.background,stroke:UT.defaultLine,"stroke-width":1}).attr("transform",S).attr("d","M0,0Z");if(u&&n.hasText){var pe=y.select(".label-temp");pe.empty()&&(pe=y.append("g").classed("label-temp",!0).classed("select-outline",!0).style({opacity:.8}))}var ie=x._uid+E8.SELECTID,le=[],me=k8(p,n.xaxes,n.yaxes,n.subplot);_&&!e.shiftKey&&(n._clearSubplotSelections=function(){if(i){var De=R._id,Ge=B._id;O0e(p,De,Ge,me);for(var ht=(p.layout||{}).selections||[],it=[],Oe=!1,ze=0;ze=0){p._fullLayout._deactivateShape(p);return}if(!u){var ht=x.clickmode;VT.done(ie).then(function(){if(VT.clear(ie),De===2){for(ue.remove(),ce=0;ce-1&&D0e(Ge,p,n.xaxes,n.yaxes,n.subplot,n,ue),ht==="event"&&YT(p,void 0);Oxt.click(p,Ge,k.id)}).catch(S8.error)}},n.doneFn=function(){ae.remove(),VT.done(ie).then(function(){VT.clear(ie),!_&&ee&&n.selectionDefs&&(ee.subtract=j,n.selectionDefs.push(ee),n.mergedPolygons.length=0,[].push.apply(n.mergedPolygons,J)),(_||u)&&jT(n,_),n.doneFnCompleted&&n.doneFnCompleted(le),c&&YT(p,xe)}).catch(S8.error)}}function D0e(e,t,r,n,a,i,o){var s=t._hoverdata,l=t._fullLayout,u=l.clickmode,c=u.indexOf("event")>-1,f=[],v,g,p,x,_,y,C,k,S,L;if(i2t(s)){R0e(e,t,i),v=k8(t,r,n,a);var w=a2t(s,v),A=w.pointNumbers.length>0;if(A?o2t(v,w):s2t(v)&&(C=E0e(w))){for(o&&o.remove(),L=0;L=0}function n2t(e){return e._fullLayout._activeSelectionIndex>=0}function jT(e,t){var r=e.dragmode,n=e.plotinfo,a=e.gd;r2t(a)&&a._fullLayout._deactivateShape(a),n2t(a)&&a._fullLayout._deactivateSelection(a);var i=a._fullLayout,o=i._zoomlayer,s=HT(r),l=AN(r);if(s||l){var u=o.selectAll(".select-outline-"+n.id);if(u&&a._fullLayout._outlining){var c;s&&(c=Hxt(u,e)),c&>.call("_guiRelayout",a,{shapes:c});var f;l&&!EN(e)&&(f=jxt(u,e)),f&&(a._fullLayout._noEmitSelectedAtStart=!0,GT.call("_guiRelayout",a,{selections:f}).then(function(){t&&Wxt(a)})),a._fullLayout._outlining=!1}}n.selection={},n.selection.selectionDefs=e.selectionDefs=[],n.selection.mergedPolygons=e.mergedPolygons=[]}function S0e(e){return e._id}function k8(e,t,r,n){if(!e.calcdata)return[];var a=[],i=t.map(S0e),o=r.map(S0e),s,l,u;for(u=0;u0,i=a?n[0]:r;return t.selectedpoints?t.selectedpoints.indexOf(i)>-1:!1}function o2t(e,t){var r=[],n,a,i,o;for(o=0;o0&&r.push(n);if(r.length===1&&(i=r[0]===t.searchInfo,i&&(a=t.searchInfo.cd[0].trace,a.selectedpoints.length===t.pointNumbers.length))){for(o=0;o1||(t+=n.selectedpoints.length,t>1)))return!1;return t===1}function WT(e,t,r){var n,a;for(n=0;n-1&&t;if(!o&&t){var De=k0e(e,!0);if(De.length){var Ge=De[0].xref,ht=De[0].yref;if(Ge&&ht){var it=N0e(De),Oe=U0e([sv(e,Ge,"x"),sv(e,ht,"y")]);Oe(le,it)}}e._fullLayout._noEmitSelectedAtStart?e._fullLayout._noEmitSelectedAtStart=!1:be&&YT(e,le),v._reselect=!1}if(!o&&v._deselect){var ze=v._deselect;s=ze.xref,l=ze.yref,c2t(s,l,c)||O0e(e,s,l,n),be&&(le.points.length?YT(e,le):LN(e)),v._deselect=!1}return{eventData:le,selectionTesters:r}}function u2t(e){var t=e.calcdata;if(t)for(var r=0;r{"use strict";H0e.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}]});var ZT=fe((Q0r,j0e)=>{"use strict";j0e.exports={axisRefDescription:function(e,t,r){return["If set to a",e,"axis id (e.g. *"+e+"* or","*"+e+"2*), the `"+e+"` position refers to a",e,"coordinate. If set to *paper*, the `"+e+"`","position refers to the distance from the",t,"of the plotting","area in normalized coordinates where *0* (*1*) corresponds to the",t,"("+r+"). If set to a",e,"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",t,"of the domain of that axis: e.g.,","*"+e+"2 domain* refers to the domain of the second",e,"axis and a",e,"position of 0.5 refers to the","point between the",t,"and the",r,"of the domain of the","second",e,"axis."].join(" ")}}});var Fm=fe((tvr,X0e)=>{"use strict";var W0e=PN(),Y0e=Ds(),C8=rc(),p2t=Mo().templatedArray,evr=ZT();X0e.exports=p2t("annotation",{visible:{valType:"boolean",dflt:!0,editType:"calc+arraydraw"},text:{valType:"string",editType:"calc+arraydraw"},textangle:{valType:"angle",dflt:0,editType:"calc+arraydraw"},font:Y0e({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:W0e.length,dflt:1,editType:"arraydraw"},startarrowhead:{valType:"integer",min:0,max:W0e.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",C8.idRegex.x.toString()],editType:"calc"},ayref:{valType:"enumerated",dflt:"pixel",values:["pixel",C8.idRegex.y.toString()],editType:"calc"},xref:{valType:"enumerated",values:["paper",C8.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",C8.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:Y0e({editType:"arraydraw"}),editType:"arraydraw"},captureevents:{valType:"boolean",editType:"arraydraw"},editType:"calc"})});var r1=fe((rvr,Z0e)=>{"use strict";Z0e.exports={PTS_LINESONLY:20,minTolerance:.2,toleranceGrowth:10,maxScreensAway:20,eventDataKeys:[]}});var n1=fe((nvr,$0e)=>{"use strict";$0e.exports=function(t){return{valType:"color",editType:"style",anim:!0}}});var Ol=fe((ivr,ive)=>{"use strict";var K0e=pl().axisHoverFormat,{hovertemplateAttrs:g2t,texttemplateAttrs:m2t,templatefallbackAttrs:J0e}=Oo(),Q0e=_s(),y2t=Ds(),eve=Uc().dash,x2t=Uc().pattern,_2t=ea(),b2t=r1(),$T=ta().extendFlat,w2t=n1();function tve(e){return{valType:"any",dflt:0,editType:"calc"}}function rve(e){return{valType:"any",editType:"calc"}}function nve(e){return{valType:"enumerated",values:["start","middle","end"],dflt:"middle",editType:"calc"}}ive.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dx:{valType:"number",dflt:1,editType:"calc",anim:!0},y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",anim:!0},dy:{valType:"number",dflt:1,editType:"calc",anim:!0},xperiod:tve("x"),yperiod:tve("y"),xperiod0:rve("x0"),yperiod0:rve("y0"),xperiodalignment:nve("x"),yperiodalignment:nve("y"),xhoverformat:K0e("x"),yhoverformat:K0e("y"),offsetgroup:{valType:"string",dflt:"",editType:"calc"},alignmentgroup:{valType:"string",dflt:"",editType:"calc"},stackgroup:{valType:"string",dflt:"",editType:"calc"},orientation:{valType:"enumerated",values:["v","h"],editType:"calc"},groupnorm:{valType:"enumerated",values:["","fraction","percent"],dflt:"",editType:"calc"},stackgaps:{valType:"enumerated",values:["infer zero","interpolate"],dflt:"infer zero",editType:"calc"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},texttemplate:m2t(),texttemplatefallback:J0e({editType:"calc"}),hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"style"},mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"],editType:"calc"},hoveron:{valType:"flaglist",flags:["points","fills"],editType:"style"},hovertemplate:g2t({},{keys:b2t.eventDataKeys}),hovertemplatefallback:J0e(),line:{color:{valType:"color",editType:"style",anim:!0},width:{valType:"number",min:0,dflt:2,editType:"style",anim:!0},shape:{valType:"enumerated",values:["linear","spline","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},smoothing:{valType:"number",min:0,max:1.3,dflt:1,editType:"plot"},dash:$T({},eve,{editType:"style"}),backoff:{valType:"number",min:0,dflt:"auto",arrayOk:!0,editType:"plot"},simplify:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},cliponaxis:{valType:"boolean",dflt:!0,editType:"plot"},fill:{valType:"enumerated",values:["none","tozeroy","tozerox","tonexty","tonextx","toself","tonext"],editType:"calc"},fillcolor:w2t(!0),fillgradient:$T({type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],dflt:"none",editType:"calc"},start:{valType:"number",editType:"calc"},stop:{valType:"number",editType:"calc"},colorscale:{valType:"colorscale",editType:"style"},editType:"calc"}),fillpattern:x2t,marker:$T({symbol:{valType:"enumerated",values:_2t.symbolList,dflt:"circle",arrayOk:!0,editType:"style"},opacity:{valType:"number",min:0,max:1,arrayOk:!0,editType:"style",anim:!0},angle:{valType:"angle",dflt:0,arrayOk:!0,editType:"plot",anim:!1},angleref:{valType:"enumerated",values:["previous","up"],dflt:"up",editType:"plot",anim:!1},standoff:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"plot",anim:!0},size:{valType:"number",min:0,dflt:6,arrayOk:!0,editType:"calc",anim:!0},maxdisplayed:{valType:"number",min:0,dflt:0,editType:"plot"},sizeref:{valType:"number",dflt:1,editType:"calc"},sizemin:{valType:"number",min:0,dflt:0,editType:"calc"},sizemode:{valType:"enumerated",values:["diameter","area"],dflt:"diameter",editType:"calc"},line:$T({width:{valType:"number",min:0,arrayOk:!0,editType:"style",anim:!0},dash:$T({},eve,{arrayOk:!0}),editType:"calc"},Q0e("marker.line",{anim:!0})),gradient:{type:{valType:"enumerated",values:["radial","horizontal","vertical","none"],arrayOk:!0,dflt:"none",editType:"calc"},color:{valType:"color",arrayOk:!0,editType:"calc"},editType:"calc"},editType:"calc"},Q0e("marker",{anim:!0})),selected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{opacity:{valType:"number",min:0,max:1,editType:"style"},color:{valType:"color",editType:"style"},size:{valType:"number",min:0,editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right"],dflt:"middle center",arrayOk:!0,editType:"calc"},textfont:y2t({editType:"calc",colorEditType:"style",arrayOk:!0}),zorder:{valType:"integer",dflt:0,editType:"plot"}}});var FN=fe((ovr,sve)=>{"use strict";var ave=Fm(),ove=Ol().line,T2t=Uc().dash,L8=ta().extendFlat,A2t=rl().overrideAll,M2t=Mo().templatedArray,avr=ZT();sve.exports=A2t(M2t("selection",{type:{valType:"enumerated",values:["rect","path"]},xref:L8({},ave.xref,{}),yref:L8({},ave.yref,{}),x0:{valType:"any"},x1:{valType:"any"},y0:{valType:"any"},y1:{valType:"any"},path:{valType:"string",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:.7,editType:"arraydraw"},line:{color:ove.color,width:L8({},ove.width,{min:1,dflt:1}),dash:L8({},T2t,{dflt:"dot"})}}),"arraydraw","from-root")});var fve=fe((svr,cve)=>{"use strict";var lve=Xt(),P8=Yi(),S2t=Ah(),E2t=FN(),uve=Lm();cve.exports=function(t,r){S2t(t,r,{name:"selections",handleItemDefaults:k2t});for(var n=r.selections,a=0;a{"use strict";hve.exports=function(t,r,n){n("newselection.mode");var a=n("newselection.line.width");a&&(n("newselection.line.color"),n("newselection.line.dash")),n("activeselection.fillcolor"),n("activeselection.opacity")}});var KT=fe((uvr,gve)=>{"use strict";var C2t=bi(),vve=Xt(),pve=El();gve.exports=function(t){return function(n,a){var i=n[t];if(Array.isArray(i))for(var o=C2t.subplotsRegistry.cartesian,s=o.idRegex,l=a._subplots,u=l.xaxis,c=l.yaxis,f=l.cartesian,v=a._has("cartesian"),g=0;g{"use strict";var mve=yN(),JT=G0e();yve.exports={moduleType:"component",name:"selections",layoutAttributes:FN(),supplyLayoutDefaults:fve(),supplyDrawNewSelectionDefaults:dve(),includeBasePlot:KT()("selections"),draw:mve.draw,drawOne:mve.drawOne,reselect:JT.reselect,prepSelect:JT.prepSelect,clearOutline:JT.clearOutline,clearSelectionsCache:JT.clearSelectionsCache,selectOnClick:JT.selectOnClick}});var NN=fe((fvr,qve)=>{"use strict";var BN=xi(),lv=Xt(),xve=lv.numberFormat,L2t=Uk(),F8=bi(),Eve=lv.strTranslate,P2t=as(),RN=ni(),Dm=ea(),F2t=kl(),_ve=Yi(),D2t=np(),R2t=ed(),kve=$p(),D8=kve.selectingOrDrawing,I2t=kve.freeMode,z2t=nc().FROM_TL,q2t=ST(),B2t=RT().redrawReglTraces,O2t=Hs(),IN=El().getFromId,N2t=Ac().prepSelect,U2t=Ac().clearOutline,V2t=Ac().selectOnClick,DN=cN(),ON=rc(),bve=ON.MINDRAG,kd=ON.MINZOOM,wve=!0;function G2t(e,t,r,n,a,i,o,s){var l=e._fullLayout._zoomlayer,u=o+s==="nsew",c=(o+s).length===1,f,v,g,p,x,_,y,C,k,S,L,w,A,T,m,F,E,I,R,B,O,V,j;r+=t.yaxis._shift;function q(){if(f=t.xaxis,v=t.yaxis,k=f._length,S=v._length,y=f._offset,C=v._offset,g={},g[f._id]=f,p={},p[v._id]=v,o&&s)for(var nt=t.overlays,We=0;We=0){mt._fullLayout._deactivateShape(mt);return}var bt=mt._fullLayout.clickmode;if(qN(mt),nt===2&&!c&&Ke(),u)bt.indexOf("select")>-1&&V2t(We,mt,x,_,t.id,ee),bt.indexOf("event")>-1&&F2t.click(mt,We,t.id);else if(nt===1&&c){var Yt=o?v:f,jt=o==="s"||s==="w"?0:1,mr=Yt._name+".range["+jt+"]",or=H2t(Yt,jt),fr="left",Ot="middle";if(Yt.fixedrange)return;o?(Ot=o==="n"?"top":"bottom",Yt.side==="right"&&(fr="right")):s==="e"&&(fr="right"),mt._context.showAxisRangeEntryBoxes&&BN.select(J).call(P2t.makeEditable,{gd:mt,immediate:!0,background:mt._fullLayout.paper_bgcolor,text:String(or),fill:Yt.tickfont?Yt.tickfont.color:"#444",horizontalAlign:fr,verticalAlign:Ot}).on("edit",function(cr){var Ct=Yt.d2r(cr);Ct!==void 0&&F8.call("_guiRelayout",mt,mr,Ct)})}}R2t.init(ee);var xe,ue,K,_e,ne,ae,pe,ie,le,me;function be(nt,We,mt){var bt=J.getBoundingClientRect();xe=We-bt.left,ue=mt-bt.top,e._fullLayout._calcInverseTransform(e);var Yt=lv.apply3DTransform(e._fullLayout._invTransform)(xe,ue);xe=Yt[0],ue=Yt[1],K={l:xe,r:xe,w:0,t:ue,b:ue,h:0},_e=e._hmpixcount?e._hmlumcount/e._hmpixcount:RN.luminosity(e._fullLayout.plot_bgcolor),ne="M0,0H"+k+"V"+S+"H0V0",ae=!1,pe="xy",me=!1,ie=Pve(l,_e,y,C,ne),le=Fve(l,y,C)}function De(nt,We){if(e._transitioningWithDuration)return!1;var mt=Math.max(0,Math.min(k,V*nt+xe)),bt=Math.max(0,Math.min(S,j*We+ue)),Yt=Math.abs(mt-xe),jt=Math.abs(bt-ue);K.l=Math.min(xe,mt),K.r=Math.max(xe,mt),K.t=Math.min(ue,bt),K.b=Math.max(ue,bt);function mr(){pe="",K.r=K.l,K.t=K.b,le.attr("d","M0,0Z")}if(L.isSubplotConstrained)Yt>kd||jt>kd?(pe="xy",Yt/k>jt/S?(jt=Yt*S/k,ue>bt?K.t=ue-jt:K.b=ue+jt):(Yt=jt*k/S,xe>mt?K.l=xe-Yt:K.r=xe+Yt),le.attr("d",R8(K))):mr();else if(w.isSubplotConstrained)if(Yt>kd||jt>kd){pe="xy";var or=Math.min(K.l/k,(S-K.b)/S),fr=Math.max(K.r/k,(S-K.t)/S);K.l=or*k,K.r=fr*k,K.b=(1-or)*S,K.t=(1-fr)*S,le.attr("d",R8(K))}else mr();else!T||jt0){var cr;if(w.isSubplotConstrained||!A&&T.length===1){for(cr=0;cr1&&(mr.maxallowed!==void 0&&F===(mr.range[0]1&&(or.maxallowed!==void 0&&E===(or.range[0]=0?Math.min(e,.9):1/(1/Math.max(e,-.3)+3.222))}function W2t(e,t,r){return e?e==="nsew"?r?"":t==="pan"?"move":"crosshair":e.toLowerCase()+"-resize":"pointer"}function Pve(e,t,r,n,a){return e.append("path").attr("class","zoombox").style({fill:t>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("transform",Eve(r,n)).attr("d",a+"Z")}function Fve(e,t,r){return e.append("path").attr("class","zoombox-corners").style({fill:RN.background,stroke:RN.defaultLine,"stroke-width":1,opacity:0}).attr("transform",Eve(t,r)).attr("d","M0,0Z")}function Dve(e,t,r,n,a,i){e.attr("d",n+"M"+r.l+","+r.t+"v"+r.h+"h"+r.w+"v-"+r.h+"h-"+r.w+"Z"),Rve(e,t,a,i)}function Rve(e,t,r,n){r||(e.transition().style("fill",n>.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),t.transition().style("opacity",1).duration(200))}function qN(e){BN.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}function Ive(e){wve&&e.data&&e._context.showTips&&(lv.notifier(lv._(e,"Double-click to zoom back out"),"long",e),wve=!1)}function Y2t(e,t){return"M"+(e.l-.5)+","+(t-kd-.5)+"h-3v"+(2*kd+1)+"h3ZM"+(e.r+.5)+","+(t-kd-.5)+"h3v"+(2*kd+1)+"h-3Z"}function X2t(e,t){return"M"+(t-kd-.5)+","+(e.t-.5)+"v-3h"+(2*kd+1)+"v3ZM"+(t-kd-.5)+","+(e.b+.5)+"v3h"+(2*kd+1)+"v-3Z"}function R8(e){var t=Math.floor(Math.min(e.b-e.t,e.r-e.l,kd)/2);return"M"+(e.l-3.5)+","+(e.t-.5+t)+"h3v"+-t+"h"+t+"v-3h-"+(t+3)+"ZM"+(e.r+3.5)+","+(e.t-.5+t)+"h-3v"+-t+"h"+-t+"v-3h"+(t+3)+"ZM"+(e.r+3.5)+","+(e.b+.5-t)+"h-3v"+t+"h"+-t+"v3h"+(t+3)+"ZM"+(e.l-3.5)+","+(e.b+.5-t)+"h3v"+t+"h"+t+"v3h-"+(t+3)+"Z"}function Mve(e,t,r,n,a){for(var i=!1,o={},s={},l,u,c,f,v=(a||{}).xaHash,g=(a||{}).yaHash,p=0;p{"use strict";var Z2t=xi(),I8=kl(),$2t=ed(),K2t=np(),ap=NN().makeDragBox,jc=rc().DRAGGERSIZE;z8.initInteractions=function(t){var r=t._fullLayout;if(t._context.staticPlot){Z2t.select(t).selectAll(".drag").remove();return}if(!(!r._has("cartesian")&&!r._has("splom"))){var n=Object.keys(r._plots||{}).sort(function(i,o){if((r._plots[i].mainplot&&!0)===(r._plots[o].mainplot&&!0)){var s=i.split("y"),l=o.split("y");return s[0]===l[0]?Number(s[1]||1)-Number(l[1]||1):Number(s[0]||1)-Number(l[0]||1)}return r._plots[i].mainplot?1:-1});n.forEach(function(i){var o=r._plots[i],s=o.xaxis,l=o.yaxis;if(!o.mainplot){var u=ap(t,o,s._offset,l._offset,s._length,l._length,"ns","ew");u.onmousemove=function(v){t._fullLayout._rehover=function(){t._fullLayout._hoversubplot===i&&t._fullLayout._plots[i]&&I8.hover(t,v,i)},I8.hover(t,v,i),t._fullLayout._lasthover=u,t._fullLayout._hoversubplot=i},u.onmouseout=function(v){t._dragging||(t._fullLayout._hoversubplot=null,$2t.unhover(t,v))},t._context.showAxisDragHandles&&(ap(t,o,s._offset-jc,l._offset-jc,jc,jc,"n","w"),ap(t,o,s._offset+s._length,l._offset-jc,jc,jc,"n","e"),ap(t,o,s._offset-jc,l._offset+l._length,jc,jc,"s","w"),ap(t,o,s._offset+s._length,l._offset+l._length,jc,jc,"s","e"))}if(t._context.showAxisDragHandles){if(i===s._mainSubplot){var c=s._mainLinePosition;s.side==="top"&&(c-=jc),ap(t,o,s._offset+s._length*.1,c,s._length*.8,jc,"","ew"),ap(t,o,s._offset,c,s._length*.1,jc,"","w"),ap(t,o,s._offset+s._length*.9,c,s._length*.1,jc,"","e")}if(i===l._mainSubplot){var f=l._mainLinePosition;l.side!=="right"&&(f-=jc),ap(t,o,f,l._offset+l._length*.1,jc,l._length*.8,"ns",""),ap(t,o,f,l._offset+l._length*.9,jc,l._length*.1,"s",""),ap(t,o,f,l._offset,jc,l._length*.1,"n","")}}});var a=r._hoverlayer.node();a.onmousemove=function(i){i.target=t._fullLayout._lasthover,I8.hover(t,i,r._hoversubplot)},a.onclick=function(i){i.target=t._fullLayout._lasthover,I8.click(t,i)},a.onmousedown=function(i){t._fullLayout._lasthover.onmousedown(i)},z8.updateFx(t)}};z8.updateFx=function(e){var t=e._fullLayout,r=t.dragmode==="pan"?"move":"crosshair";K2t(t._draggers,r)}});var Nve=fe((dvr,Ove)=>{"use strict";var Bve=bi();Ove.exports=function(t){for(var r=Bve.layoutArrayContainers,n=Bve.layoutArrayRegexes,a=t.split("[")[0],i,o,s=0;s{"use strict";var J2t=em(),VN=PE(),QT=W1(),Q2t=VE().sorterAsc,GN=bi();eA.containerArrayMatch=Nve();var e_t=eA.isAddVal=function(t){return t==="add"||J2t(t)},Uve=eA.isRemoveVal=function(t){return t===null||t==="remove"};eA.applyContainerArrayChanges=function(t,r,n,a,i){var o=r.astr,s=GN.getComponentMethod(o,"supplyLayoutDefaults"),l=GN.getComponentMethod(o,"draw"),u=GN.getComponentMethod(o,"drawOne"),c=a.replot||a.recalc||s===VN||l===VN,f=t.layout,v=t._fullLayout;if(n[""]){Object.keys(n).length>1&&QT.warn("Full array edits are incompatible with other edits",o);var g=n[""][""];if(Uve(g))r.set(null);else if(Array.isArray(g))r.set(g);else return QT.warn("Unrecognized full array edit value",o,g),!0;return c?!1:(s(f,v),l(t),!0)}var p=Object.keys(n).map(Number).sort(Q2t),x=r.get(),_=x||[],y=i(v,o).get(),C=[],k=-1,S=_.length,L,w,A,T,m,F,E,I;for(L=0;L_.length-(E?0:1)){QT.warn("index out of range",o,A);continue}if(F!==void 0)m.length>1&&QT.warn("Insertion & removal are incompatible with edits to the same index.",o,A),Uve(F)?C.push(A):E?(F==="add"&&(F={}),_.splice(A,0,F),y&&y.splice(A,0,{})):QT.warn("Unrecognized full object edit value",o,A,F),k===-1&&(k=A);else for(w=0;w=0;L--)_.splice(C[L],1),y&&y.splice(C[L],1);if(_.length?x||r.set(_):r.set(null),c)return!1;if(s(f,v),u!==VN){var R;if(k===-1)R=p;else{for(S=Math.max(_.length,S),R=[],L=0;L=k));L++)R.push(A);for(L=k;L{"use strict";var Wve=aa(),Yve=bi(),id=Xt(),tA=Hs(),Xve=El(),rA=Xve.cleanId,t_t=Xve.getFromTrace,HN=Yve.traceIs,r_t=["x","y","z"];uv.clearPromiseQueue=function(e){Array.isArray(e._promises)&&e._promises.length>0&&id.log("Clearing previous rejected promises from queue."),e._promises=[]};uv.cleanLayout=function(e){var t,r;e||(e={}),e.xaxis1&&(e.xaxis||(e.xaxis=e.xaxis1),delete e.xaxis1),e.yaxis1&&(e.yaxis||(e.yaxis=e.yaxis1),delete e.yaxis1),e.scene1&&(e.scene||(e.scene=e.scene1),delete e.scene1);var n=(tA.subplotsRegistry.cartesian||{}).attrRegex,a=(tA.subplotsRegistry.polar||{}).attrRegex,i=(tA.subplotsRegistry.ternary||{}).attrRegex,o=(tA.subplotsRegistry.gl3d||{}).attrRegex,s=Object.keys(e);for(t=0;t3?(_.x=1.02,_.xanchor="left"):_.x<-2&&(_.x=-.02,_.xanchor="right"),_.y>3?(_.y=1.02,_.yanchor="bottom"):_.y<-2&&(_.y=-.02,_.yanchor="top")),e.dragmode==="rotate"&&(e.dragmode="orbit"),e.template&&e.template.layout&&uv.cleanLayout(e.template.layout),e};function c3(e,t,r=!1){var n=e[t],a=t.charAt(0);r&&Array.isArray(n)||n&&n!=="paper"&&(e[t]=rA(n,a,!0))}uv.cleanData=function(e){for(var t=0;t0)return e.slice(0,t)}uv.hasParent=function(e,t){for(var r=jve(t);r;){if(r in e)return!0;r=jve(r)}return!1};uv.clearAxisTypes=function(e,t,r){for(var n=0;n{let r=(...n)=>n.every(a=>id.isPlainObject(a))||n.every(a=>Array.isArray(a));if([e,t].every(n=>Array.isArray(n))){if(e.length!==t.length)return!1;for(let n=0;nid.isPlainObject(n))){if(Object.keys(e).length!==Object.keys(t).length)return!1;for(let n in e){if(n.startsWith("_"))continue;let a=e[n],i=t[n];if(a!==i&&!(r(a,i)?jN(a,i):!1))return!1}return!0}return!1};uv.collectionsAreEqual=jN});var Z8=fe(So=>{"use strict";var N8=xi(),a_t=aa(),o_t=Qq(),vi=Xt(),Ws=vi.nestedProperty,XN=Rb(),Cd=Ise(),cv=bi(),Y8=qb(),wa=Hs(),ad=Yi(),s_t=gO(),l_t=pf(),WN=ea(),u_t=ni(),c_t=UN().initInteractions,f_t=Q0(),h_t=Ac().clearOutline,epe=im().dfltConfig,B8=Vve(),zu=Zve(),cs=RT(),Rm=rl(),d_t=rc().AX_NAME_PATTERN,YN=0,$ve=5;function v_t(e,t,r,n){var a;if(e=vi.getGraphDiv(e),XN.init(e),vi.isPlainObject(t)){var i=t;t=i.data,r=i.layout,n=i.config,a=i.frames}var o=XN.triggerHandler(e,"plotly_beforeplot",[t,r,n]);if(o===!1)return Promise.reject();!t&&!r&&!vi.isPlotDiv(e)&&vi.warn("Calling _doPlot as if redrawing but this container doesn't yet have a plot.",e);function s(){if(a)return So.addFrames(e,a)}rpe(e,n),r||(r={}),N8.select(e).classed("js-plotly-plot",!0),WN.makeTester(),Array.isArray(e._promises)||(e._promises=[]);var l=(e.data||[]).length===0&&Array.isArray(t);Array.isArray(t)&&(zu.cleanData(t),l?e.data=t:e.data.push.apply(e.data,t),e.empty=!1),(!e.layout||l)&&(e.layout=zu.cleanLayout(r)),wa.supplyDefaults(e);var u=e._fullLayout,c=u._has("cartesian");u._replotting=!0,(l||u._shouldCreateBgLayer)&&(q_t(e),u._shouldCreateBgLayer&&delete u._shouldCreateBgLayer),WN.initGradients(e),WN.initPatterns(e),l&&ad.saveShowSpikeInitial(e);var f=!e.calcdata||e.calcdata.length!==(e._fullData||[]).length;f&&wa.doCalcdata(e);for(var v=0;v=e.data.length||a<-e.data.length)throw new Error(r+" must be valid indices for gd.data.");if(t.indexOf(a,n+1)>-1||a>=0&&t.indexOf(-e.data.length+a)>-1||a<0&&t.indexOf(e.data.length+a)>-1)throw new Error("each index in "+r+" must be unique.")}}function npe(e,t,r){if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("currentIndices is a required argument.");if(Array.isArray(t)||(t=[t]),V8(e,t,"currentIndices"),typeof r!="undefined"&&!Array.isArray(r)&&(r=[r]),typeof r!="undefined"&&V8(e,r,"newIndices"),typeof r!="undefined"&&t.length!==r.length)throw new Error("current and new indices must be of equal length.")}function x_t(e,t,r){var n,a;if(!Array.isArray(e.data))throw new Error("gd.data must be an array.");if(typeof t=="undefined")throw new Error("traces must be defined.");for(Array.isArray(t)||(t=[t]),n=0;n=0&&c=0&&c0&&typeof T.parts[E]!="string";)E--;var I=T.parts[E],R=T.parts[E-1]+"."+I,B=T.parts.slice(0,E).join("."),O=Ws(e.layout,B).get(),V=Ws(n,B).get(),j=T.get();if(m!==void 0){y[A]=m,C[A]=I==="reverse"?m:ig(j);var q=Y8.getLayoutValObject(n,T.parts);if(q&&q.impliedEdits&&m!==null)for(var U in q.impliedEdits)k(vi.relativeAttr(A,U),q.impliedEdits[U]);if(["width","height"].indexOf(A)!==-1)if(m){k("autosize",null);var J=A==="height"?"width":"height";k(J,n[J])}else n[A]=e._initialAutoSize[A];else if(A==="autosize")k("width",m?null:n.width),k("height",m?null:n.height);else if(R.match(hpe))w(R),Ws(n,B+"._inputRange").set(null);else if(R.match(dpe)){w(R),Ws(n,B+"._inputRange").set(null);var ee=Ws(n,B).get();ee._inputDomain&&(ee._input.domain=ee._inputDomain.slice())}else R.match(T_t)&&Ws(n,B+"._inputDomain").set(null);if(I==="type"){L=O;var ce=V.type==="linear"&&m==="log",ye=V.type==="log"&&m==="linear";if(ce||ye){if(!L||!L.range)k(B+".autorange",!0);else if(V.autorange)ce&&(L.range=L.range[1]>L.range[0]?[1,2]:[2,1]);else{var xe=L.range[0],ue=L.range[1];ce?(xe<=0&&ue<=0&&k(B+".autorange",!0),xe<=0?xe=ue/1e6:ue<=0&&(ue=xe/1e6),k(B+".range[0]",Math.log(xe)/Math.LN10),k(B+".range[1]",Math.log(ue)/Math.LN10)):(k(B+".range[0]",Math.pow(10,xe)),k(B+".range[1]",Math.pow(10,ue)))}Array.isArray(n._subplots.polar)&&n._subplots.polar.length&&n[T.parts[0]]&&T.parts[1]==="radialaxis"&&delete n[T.parts[0]]._subplot.viewInitial["radialaxis.range"],cv.getComponentMethod("annotations","convertCoords")(e,V,m,k),cv.getComponentMethod("images","convertCoords")(e,V,m,k)}else k(B+".autorange",!0),k(B+".range",null);Ws(n,B+"._inputRange").set(null)}else if(I.match(d_t)){var K=Ws(n,A).get(),_e=(m||{}).type;(!_e||_e==="-")&&(_e="linear"),cv.getComponentMethod("annotations","convertCoords")(e,K,_e,k),cv.getComponentMethod("images","convertCoords")(e,K,_e,k)}var ne=B8.containerArrayMatch(A);if(ne){c=ne.array,f=ne.index;var ae=ne.property,pe=q||{editType:"calc"};f!==""&&ae===""&&(B8.isAddVal(m)?C[A]=null:B8.isRemoveVal(m)?C[A]=(Ws(r,c).get()||[])[f]:vi.warn("unrecognized full object value",t)),Rm.update(_,pe),u[c]||(u[c]={});var ie=u[c][f];ie||(ie=u[c][f]={}),ie[ae]=m,delete t[A]}else I==="reverse"?(O.range?O.range.reverse():(k(B+".autorange",!0),O.range=[1,0]),V.autorange?_.calc=!0:_.plot=!0):(A==="dragmode"&&(m===!1&&j!==!1||m!==!1&&j===!1)||n._has("scatter-like")&&n._has("regl")&&A==="dragmode"&&(m==="lasso"||m==="select")&&!(j==="lasso"||j==="select")?_.plot=!0:q?Rm.update(_,q):_.calc=!0,T.set(m))}}for(c in u){var le=B8.applyContainerArrayChanges(e,i(r,c),u[c],_,i);le||(_.plot=!0)}for(var me in S){L=ad.getFromId(e,me);var be=L&&L._constraintGroup;if(be){_.calc=!0;for(var De in be)S[De]||(ad.getFromId(e,De)._constraintShrinkable=!0)}}(ppe(e)||t.height||t.width)&&(_.plot=!0);var Ge=n.shapes;for(f=0;f1;)if(n.pop(),r=Ws(t,n.join(".")+".uirevision").get(),r!==void 0)return r;return t.uirevision}function S_t(e,t){for(var r=0;r[B,e._ev.listeners(B)]);i=So.newPlot(e,t,r,n).then(()=>{for(let[B,O]of R)O.forEach(V=>e.on(B,V));return So.react(e,t,r,n)})}else{e.data=t||[],zu.cleanData(e.data),e.layout=r||{},zu.cleanLayout(e.layout),k_t(e.data,e.layout,s,l),wa.supplyDefaults(e,{skipUpdateCalc:!0});var f=e._fullData,v=e._fullLayout,g=v.datarevision===void 0,p=v.transition,x=P_t(e,l,v,g,p),_=x.newDataRevision,y=L_t(e,s,f,g,p,_);if(ppe(e)&&(x.layoutReplot=!0),y.calc||x.calc){e.calcdata=void 0;for(var C=Object.getOwnPropertyNames(v),k=0;k(c||e.emit("plotly_react",{config:n,data:t,layout:r}),e))}function L_t(e,t,r,n,a,i){var o=t.length===r.length;if(!a&&!o)return{fullReplot:!0,calc:!0};var s=Rm.traceFlags();s.arrays={},s.nChanges=0,s.nChangesAnim=0;var l,u;function c(g){var p=Y8.getTraceValObject(u,g);return!u._module.animatable&&p.anim&&(p.anim=!1),p}var f={getValObject:c,flags:s,immutable:n,transition:a,newDataRevision:i,gd:e},v={};for(l=0;l=a.length?a[0]:a[u]:a}function s(u){return Array.isArray(i)?u>=i.length?i[0]:i[u]:i}function l(u,c){var f=0;return function(){if(u&&++f===c)return u()}}return new Promise(function(u,c){function f(){if(n._frameQueue.length!==0){for(;n._frameQueue.length;){var I=n._frameQueue.pop();I.onInterrupt&&I.onInterrupt()}e.emit("plotly_animationinterrupted",[])}}function v(I){if(I.length!==0){for(var R=0;Rn._timeToNext&&p()};I()}var _=0;function y(I){return Array.isArray(a)?_>=a.length?I.transitionOpts=a[_]:I.transitionOpts=a[0]:I.transitionOpts=a,_++,I}var C,k,S=[],L=t==null,w=Array.isArray(t),A=!L&&!w&&vi.isPlainObject(t);if(A)S.push({type:"object",data:y(vi.extendFlat({},t))});else if(L||["string","number"].indexOf(typeof t)!==-1)for(C=0;C0&&FF)&&E.push(k);S=E}}S.length>0?v(S):(e.emit("plotly_animated"),u())})}function D_t(e,t,r){if(e=vi.getGraphDiv(e),t==null)return Promise.resolve();if(!vi.isPlotDiv(e))throw new Error("This element is not a Plotly plot: "+e+". It's likely that you've failed to create a plot before adding frames. For more details, see https://plotly.com/javascript/animations/");var n,a,i,o,s=e._transitionData._frames,l=e._transitionData._frameHash;if(!Array.isArray(t))throw new Error("addFrames failure: frameList must be an Array of frame definitions"+t);var u=s.length+t.length*2,c=[],f={};for(n=t.length-1;n>=0;n--)if(vi.isPlainObject(t[n])){var v=t[n].name,g=(l[v]||f[v]||{}).name,p=t[n].name,x=l[g]||f[g];g&&p&&typeof p=="number"&&x&&YN<$ve&&(YN++,vi.warn('addFrames: overwriting frame "'+(l[g]||f[g]).name+'" with a frame whose name of type "number" also equates to "'+g+'". This is valid but may potentially lead to unexpected behavior since all plotly.js frame names are stored internally as strings.'),YN===$ve&&vi.warn("addFrames: This API call has yielded too many of these warnings. For the rest of this call, further warnings about numeric frame names will be suppressed.")),f[v]={name:v},c.push({frame:wa.supplyFrameDefaults(t[n]),index:r&&r[n]!==void 0&&r[n]!==null?r[n]:u+n})}c.sort(function(A,T){return A.index>T.index?-1:A.index=0;n--){if(a=c[n].frame,typeof a.name=="number"&&vi.warn("Warning: addFrames accepts frames with numeric names, but the numbers areimplicitly cast to strings"),!a.name)for(;l[a.name="frame "+e._transitionData._counter++];);if(l[a.name]){for(i=0;i=0;r--)n=t[r],i.push({type:"delete",index:n}),o.unshift({type:"insert",index:n,value:a[n]});var s=wa.modifyFrames,l=wa.modifyFrames,u=[e,o],c=[e,i];return Cd&&Cd.add(e,s,u,l,c),wa.modifyFrames(e,i)}function I_t(e){e=vi.getGraphDiv(e);var t=e._fullLayout||{},r=e._fullData||[];return wa.cleanPlot([],{},r,t),wa.purge(e),XN.purge(e),t._container&&t._container.remove(),delete e._context,e}function z_t(e){var t=e._fullLayout,r=e.getBoundingClientRect();if(!vi.equalDomRects(r,t._lastBBox)){var n=t._invTransform=vi.inverseTransformMatrix(vi.getFullTransformMatrix(e));t._invScaleX=Math.sqrt(n[0][0]*n[0][0]+n[0][1]*n[0][1]+n[0][2]*n[0][2]),t._invScaleY=Math.sqrt(n[1][0]*n[1][0]+n[1][1]*n[1][1]+n[1][2]*n[1][2]),t._lastBBox=r}}function q_t(e){var t=N8.select(e),r=e._fullLayout;if(r._calcInverseTransform=z_t,r._calcInverseTransform(e),r._container=t.selectAll(".plot-container").data([0]),r._container.enter().insert("div",":first-child").classed("plot-container",!0).classed("plotly",!0).style({width:"100%",height:"100%"}),r._paperdiv=r._container.selectAll(".svg-container").data([0]),r._paperdiv.enter().append("div").classed("user-select-none",!0).classed("svg-container",!0).style("position","relative"),r._glcontainer=r._paperdiv.selectAll(".gl-container").data([{}]),r._glcontainer.enter().append("div").classed("gl-container",!0),r._paperdiv.selectAll(".main-svg").remove(),r._paperdiv.select(".modebar-container").remove(),r._paper=r._paperdiv.insert("svg",":first-child").classed("main-svg",!0),r._toppaper=r._paperdiv.append("svg").classed("main-svg",!0),r._modebardiv=r._paperdiv.append("div"),delete r._modeBar,r._hoverpaper=r._paperdiv.append("svg").classed("main-svg",!0),!r._uid){var n={};N8.selectAll("defs").each(function(){this.id&&(n[this.id.split("-")[1]]=1)}),r._uid=vi.randstr(n)}r._paperdiv.selectAll(".main-svg").attr(f_t.svgAttrs),r._defs=r._paper.append("defs").attr("id","defs-"+r._uid),r._clips=r._defs.append("g").classed("clips",!0),r._topdefs=r._toppaper.append("defs").attr("id","topdefs-"+r._uid),r._topclips=r._topdefs.append("g").classed("clips",!0),r._bgLayer=r._paper.append("g").classed("bglayer",!0),r._draggers=r._paper.append("g").classed("draglayer",!0);var a=r._paper.append("g").classed("layer-below",!0);r._imageLowerLayer=a.append("g").classed("imagelayer",!0),r._shapeLowerLayer=a.append("g").classed("shapelayer",!0),r._cartesianlayer=r._paper.append("g").classed("cartesianlayer",!0),r._polarlayer=r._paper.append("g").classed("polarlayer",!0),r._smithlayer=r._paper.append("g").classed("smithlayer",!0),r._ternarylayer=r._paper.append("g").classed("ternarylayer",!0),r._geolayer=r._paper.append("g").classed("geolayer",!0),r._funnelarealayer=r._paper.append("g").classed("funnelarealayer",!0),r._pielayer=r._paper.append("g").classed("pielayer",!0),r._iciclelayer=r._paper.append("g").classed("iciclelayer",!0),r._treemaplayer=r._paper.append("g").classed("treemaplayer",!0),r._sunburstlayer=r._paper.append("g").classed("sunburstlayer",!0),r._indicatorlayer=r._toppaper.append("g").classed("indicatorlayer",!0),r._glimages=r._paper.append("g").classed("glimages",!0);var i=r._toppaper.append("g").classed("layer-above",!0);r._imageUpperLayer=i.append("g").classed("imagelayer",!0),r._shapeUpperLayer=i.append("g").classed("shapelayer",!0),r._selectionLayer=r._toppaper.append("g").classed("selectionlayer",!0),r._infolayer=r._toppaper.append("g").classed("infolayer",!0),r._menulayer=r._toppaper.append("g").classed("menulayer",!0),r._zoomlayer=r._toppaper.append("g").classed("zoomlayer",!0),r._hoverlayer=r._hoverpaper.append("g").classed("hoverlayer",!0),r._modebardiv.classed("modebar-container",!0).style("position","absolute").style("top","0px").style("right","0px"),e.emit("plotly_framework")}So.animate=F_t;So.addFrames=D_t;So.deleteFrames=R_t;So.addTraces=lpe;So.deleteTraces=upe;So.extendTraces=ope;So.moveTraces=ZN;So.prependTraces=spe;So.newPlot=y_t;So._doPlot=v_t;So.purge=I_t;So.react=C_t;So.redraw=m_t;So.relayout=nA;So.restyle=G8;So.setPlotConfig=p_t;So.update=j8;So._guiRelayout=$N(nA);So._guiRestyle=$N(G8);So._guiUpdate=$N(j8);So._storeDirectGUIEdit=w_t});var ag=fe(fv=>{"use strict";var B_t=bi();fv.getDelay=function(e){return e._has&&(e._has("gl3d")||e._has("map"))?500:0};fv.getRedrawFunc=function(e){return function(){B_t.getComponentMethod("colorbar","draw")(e)}};fv.encodeSVG=function(e){return"data:image/svg+xml,"+encodeURIComponent(e)};fv.encodeJSON=function(e){return"data:application/json,"+encodeURIComponent(e)};var gpe=window.URL||window.webkitURL;fv.createObjectURL=function(e){return gpe.createObjectURL(e)};fv.revokeObjectURL=function(e){return gpe.revokeObjectURL(e)};fv.createBlob=function(e,t){if(t==="svg")return new window.Blob([e],{type:"image/svg+xml;charset=utf-8"});if(t==="full-json")return new window.Blob([e],{type:"application/json;charset=utf-8"});var r=O_t(window.atob(e));return new window.Blob([r],{type:"image/"+t})};fv.octetStream=function(e){document.location.href="data:application/octet-stream"+e};fv.getPlotTitle=function(e){var n,a,i,o;var t=e._fullLayout;if(t){var r=(n=t.title)==null?void 0:n.text;return r===((a=t._dfltTitle)==null?void 0:a.plot)?void 0:r}return(o=(i=e.layout)==null?void 0:i.title)==null?void 0:o.text};fv.getPlotSubtitle=function(e){var n,a,i,o,s,l;var t=e._fullLayout;if(t){var r=(a=(n=t.title)==null?void 0:n.subtitle)==null?void 0:a.text;return r===((i=t._dfltTitle)==null?void 0:i.subtitle)?void 0:r}return(l=(s=(o=e.layout)==null?void 0:o.title)==null?void 0:s.subtitle)==null?void 0:l.text};function O_t(e){for(var t=e.length,r=new ArrayBuffer(t),n=new Uint8Array(r),a=0;a{"use strict";var JN=xi(),yvr=Xt(),N_t=ea(),U_t=ni(),xvr=Q0(),KN=/"/g,Qx="TOBESTRIPPED",V_t=new RegExp(`("${Qx})|(${Qx}")|("${Qx})|(${Qx}")`,"g"),G_t=["&","&","&",""",""",""","'","'","'"],H_t=["<","<","<"],j_t=[">",">",">"];function W_t(e){let t=JN.select("body").append("div").style({display:"none"}).html(""),r=e.replace(/(&[^;]*;)/gi,n=>{let a=n.toLowerCase();return G_t.includes(a)?n:H_t.includes(a)?"<":j_t.includes(a)?">":n.includes("<")||n.includes(">")?"":t.html(n).text()});return t.remove(),r}function Y_t(e){return e.replace(/&(?!\w+;|\#[0-9]+;| \#x[0-9A-F]+;)/g,"&")}mpe.exports=function(t,r,n){var a=t._fullLayout,i=a._paper,o=a._toppaper,s=a.width,l=a.height,u;i.insert("rect",":first-child").call(N_t.setRect,0,0,s,l).call(U_t.fill,a.paper_bgcolor);var c=a._basePlotModules||[];for(u=0;u{"use strict";var X_t=Xt(),Z_t=Mx().EventEmitter,aA=ag();function $_t(e){var t=e.emitter||new Z_t,r=new Promise(function(n,a){var i=window.Image,o=e.svg,s=e.format||"png",l=e.canvas,u=e.scale||1,c=e.width||300,f=e.height||150,v=u*c,g=u*f,p=l.getContext("2d",{willReadFrequently:!0}),x=new i,_,y;s==="svg"||X_t.isSafari()?y=aA.encodeSVG(o):(_=aA.createBlob(o,"svg"),y=aA.createObjectURL(_)),l.width=v,l.height=g,x.onload=function(){var C;switch(_=null,aA.revokeObjectURL(y),s!=="svg"&&p.drawImage(x,0,0,v,g),s){case"jpeg":C=l.toDataURL("image/jpeg");break;case"png":C=l.toDataURL("image/png");break;case"webp":C=l.toDataURL("image/webp");break;case"svg":C=y;break;default:var k="Image format is not jpeg, png, svg or webp.";if(a(new Error(k)),!e.promise)return t.emit("error",k)}n(C),e.promise||t.emit("success",C)},x.onerror=function(C){if(_=null,aA.revokeObjectURL(y),a(C),!e.promise)return t.emit("error",C)},x.src=y});return e.promise?r:t}ype.exports=$_t});var eU=fe((wvr,bpe)=>{"use strict";var xpe=aa(),_pe=Z8(),K_t=Hs(),i1=Xt(),oA=ag(),J_t=$8(),Q_t=K8(),ebt=A4().version,QN={format:{valType:"enumerated",values:["png","jpeg","webp","svg","full-json"],dflt:"png"},width:{valType:"number",min:1},height:{valType:"number",min:1},scale:{valType:"number",min:0,dflt:1},setBackground:{valType:"any",dflt:!1},imageDataOnly:{valType:"boolean",dflt:!1}};function tbt(e,t){t=t||{};var r,n,a,i;i1.isPlainObject(e)?(r=e.data||[],n=e.layout||{},a=e.config||{},i={}):(e=i1.getGraphDiv(e),r=i1.extendDeep([],e.data),n=i1.extendDeep({},e.layout),a=e._context,i=e._fullLayout||{});function o(w){return!(w in t)||i1.validate(t[w],QN[w])}if(!o("width")&&t.width!==null||!o("height")&&t.height!==null)throw new Error("Height and width should be pixel values.");if(!o("format"))throw new Error("Export format is not "+i1.join2(QN.format.values,", "," or ")+".");var s={};function l(w,A){return i1.coerce(t,s,QN,w,A)}var u=l("format"),c=l("width"),f=l("height"),v=l("scale"),g=l("setBackground"),p=l("imageDataOnly"),x=document.createElement("div");x.style.position="absolute",x.style.left="-5000px",document.body.appendChild(x);var _=i1.extendFlat({},n);c?_.width=c:t.width===null&&xpe(i.width)&&(_.width=i.width),f?_.height=f:t.height===null&&xpe(i.height)&&(_.height=i.height);var y=i1.extendFlat({},a,{_exportedPlot:!0,staticPlot:!0,setBackground:g}),C=oA.getRedrawFunc(x);function k(){return new Promise(function(w){setTimeout(w,oA.getDelay(x._fullLayout))})}function S(){return new Promise(function(w,A){var T=J_t(x,u,v),m=x._fullLayout.width,F=x._fullLayout.height;function E(){_pe.purge(x),document.body.removeChild(x)}if(u==="full-json"){var I=K_t.graphJson(x,!1,"object",!0,!0);return I.version=ebt,I=JSON.stringify(I),E(),w(p?I:oA.encodeJSON(I))}if(E(),u==="svg")return w(p?T:oA.encodeSVG(T));var R=document.createElement("canvas");R.id=i1.randstr(),Q_t({format:u,width:m,height:F,scale:v,canvas:R,svg:T,promise:!0}).then(w).catch(A)})}function L(w){return p?w.replace(oA.IMAGE_URL_PREFIX,""):w}return new Promise(function(w,A){_pe.newPlot(x,r,_,y).then(C).then(k).then(S).then(function(T){w(L(T))}).catch(function(T){A(T)})})}bpe.exports=tbt});var Ape=fe((Tvr,Tpe)=>{"use strict";var hv=Xt(),rbt=Hs(),nbt=qb(),ibt=im().dfltConfig,op=hv.isPlainObject,t2=Array.isArray,tU=hv.isArrayOrTypedArray;Tpe.exports=function(t,r){t===void 0&&(t=[]),r===void 0&&(r={});var n=nbt.get(),a=[],i={_context:hv.extendFlat({},ibt)},o,s;t2(t)?(i.data=hv.extendDeep([],t),o=t):(i.data=[],o=[],a.push(Wc("array","data"))),op(r)?(i.layout=hv.extendDeep({},r),s=r):(i.layout={},s={},arguments.length>1&&a.push(Wc("object","layout"))),rbt.supplyDefaults(i);for(var l=i._fullData,u=o.length,c=0;cf.length&&n.push(Wc("unused",a,u.concat(f.length)));var y=f.length,C=Array.isArray(_);C&&(y=Math.min(y,_.length));var k,S,L,w,A;if(v.dimensions===2)for(S=0;Sf[S].length&&n.push(Wc("unused",a,u.concat(S,f[S].length)));var T=f[S].length;for(k=0;k<(C?Math.min(T,_[S].length):T);k++)L=C?_[S][k]:_,w=c[S][k],A=f[S][k],hv.validate(w,L)?A!==w&&A!==+w&&n.push(Wc("dynamic",a,u.concat(S,k),w,A)):n.push(Wc("value",a,u.concat(S,k),w))}else n.push(Wc("array",a,u.concat(S),c[S]));else for(S=0;S{"use strict";var fbt=Xt(),Q8=ag();function hbt(e,t,r){var n=document.createElement("a"),a="download"in n,i=new Promise(function(o,s){var l,u;if(a)return l=Q8.createBlob(e,r),u=Q8.createObjectURL(l),n.href=u,n.download=t,document.body.appendChild(n),n.click(),document.body.removeChild(n),Q8.revokeObjectURL(u),l=null,o(t);if(fbt.isSafari()){var c=r==="svg"?",":";base64,";return Q8.octetStream(c+encodeURIComponent(e)),o(t)}s(new Error("download error"))});return i}Mpe.exports=hbt});var rU=fe((Mvr,Lpe)=>{"use strict";var eC=Xt(),Epe=as(),dbt=eU(),vbt=Spe(),kpe=ag(),Cpe=40;function pbt(e,t){var r;return eC.isPlainObject(e)||(r=eC.getGraphDiv(e)),t=t||{},t.format=t.format||"png",t.width=t.width||null,t.height=t.height||null,t.imageDataOnly=!0,new Promise(function(n,a){r&&r._snapshotInProgress&&a(new Error("Image capture already in progress.")),r&&(r._snapshotInProgress=!0);var i=dbt(e,t),o=t.filename||e.fn;if(!o){let l=kpe.getPlotTitle(e);if(l&&!Epe.matchTex(l))o=eC.slugify(l,Cpe);else{let u=kpe.getPlotSubtitle(e);u&&!Epe.matchTex(u)&&(o=eC.slugify(u,Cpe))}}var s=o||"plot-image";s+="."+t.format.replace("-","."),i.then(function(l){return r&&(r._snapshotInProgress=!1),vbt(l,s,t.format)}).then(function(l){n(l)}).catch(function(l){r&&(r._snapshotInProgress=!1),a(l)})})}Lpe.exports=pbt});var Ipe=fe(nU=>{"use strict";var n0=Xt(),i0=n0.isPlainObject,Ppe=qb(),Fpe=Hs(),gbt=Ho(),Dpe=Mo(),Rpe=im().dfltConfig;nU.makeTemplate=function(e){e=n0.isPlainObject(e)?e:n0.getGraphDiv(e),e=n0.extendDeep({_context:Rpe},{data:e.data,layout:e.layout}),Fpe.supplyDefaults(e);var t=e.data||[],r=e.layout||{};r._basePlotModules=e._fullLayout._basePlotModules,r._modules=e._fullLayout._modules;var n={data:{},layout:{}};t.forEach(function(g){var p={};sA(g,p,ybt.bind(null,g));var x=n0.coerce(g,{},gbt,"type"),_=n.data[x];_||(_=n.data[x]=[]),_.push(p)}),sA(r,n.layout,mbt.bind(null,r)),delete n.layout.template;var a=r.template;if(i0(a)){var i=a.layout,o,s,l,u,c,f;i0(i)&&tC(i,n.layout);var v=a.data;if(i0(v)){for(s in n.data)if(l=v[s],Array.isArray(l)){for(c=n.data[s],f=c.length,u=l.length,o=0;oy?o.push({code:"unused",traceType:g,templateCount:_,dataCount:y}):y>_&&o.push({code:"reused",traceType:g,templateCount:_,dataCount:y})}}function C(k,S){for(var L in k)if(L.charAt(0)!=="_"){var w=k[L],A=dv(k,L,S);i0(w)?(Array.isArray(k)&&w._template===!1&&w.templateitemname&&o.push({code:"missing",path:A,templateitemname:w.templateitemname}),C(w,A)):Array.isArray(w)&&xbt(w)&&C(w,A)}}if(C({data:l,layout:s},""),o.length)return o.map(_bt)};function xbt(e){for(var t=0;t{"use strict";var Mc=Z8();xl._doPlot=Mc._doPlot;xl.newPlot=Mc.newPlot;xl.restyle=Mc.restyle;xl.relayout=Mc.relayout;xl.redraw=Mc.redraw;xl.update=Mc.update;xl._guiRestyle=Mc._guiRestyle;xl._guiRelayout=Mc._guiRelayout;xl._guiUpdate=Mc._guiUpdate;xl._storeDirectGUIEdit=Mc._storeDirectGUIEdit;xl.react=Mc.react;xl.extendTraces=Mc.extendTraces;xl.prependTraces=Mc.prependTraces;xl.addTraces=Mc.addTraces;xl.deleteTraces=Mc.deleteTraces;xl.moveTraces=Mc.moveTraces;xl.purge=Mc.purge;xl.addFrames=Mc.addFrames;xl.deleteFrames=Mc.deleteFrames;xl.animate=Mc.animate;xl.setPlotConfig=Mc.setPlotConfig;var bbt=X4().getGraphDiv,wbt=d8().eraseActiveShape;xl.deleteActiveShape=function(e){return wbt(bbt(e))};xl.toImage=eU();xl.validate=Ape();xl.downloadImage=rU();var zpe=Ipe();xl.makeTemplate=zpe.makeTemplate;xl.validateTemplate=zpe.validateTemplate});var r2=fe((kvr,Bpe)=>{"use strict";var iU=Xt(),Tbt=bi();Bpe.exports=function(t,r,n,a){var i=a("x"),o=a("y"),s,l=Tbt.getComponentMethod("calendars","handleTraceDefaults");if(l(t,r,["x","y"],n),i){var u=iU.minRowLength(i);o?s=Math.min(u,iU.minRowLength(o)):(s=u,a("y0"),a("dy"))}else{if(!o)return 0;s=iU.minRowLength(o),a("x0"),a("dx")}return r._length=s,s}});var sp=fe((Cvr,Upe)=>{"use strict";var Ope=Xt().dateTick0,Abt=Wa(),Mbt=Abt.ONEWEEK;function Npe(e,t){return e%Mbt===0?Ope(t,1):Ope(t,0)}Upe.exports=function(t,r,n,a,i){if(i||(i={x:!0,y:!0}),i.x){var o=a("xperiod");o&&(a("xperiod0",Npe(o,r.xcalendar)),a("xperiodalignment"))}if(i.y){var s=a("yperiod");s&&(a("yperiod0",Npe(s,r.ycalendar)),a("yperiodalignment"))}}});var Hpe=fe((Lvr,Gpe)=>{"use strict";var Vpe=["orientation","groupnorm","stackgaps"];Gpe.exports=function(t,r,n,a){var i=n._scatterStackOpts,o=a("stackgroup");if(o){var s=r.xaxis+r.yaxis,l=i[s];l||(l=i[s]={});var u=l[o],c=!1;u?u.traces.push(r):(u=l[o]={traceIndices:[],traces:[r]},c=!0);for(var f={orientation:r.x&&!r.y?"h":"v"},v=0;v{"use strict";var jpe=ni(),Wpe=Wf().hasColorscale,Ype=Vc(),Sbt=Is();Xpe.exports=function(t,r,n,a,i,o={}){var s=Sbt.isBubble(t),l=(t.line||{}).color,u;if(l&&(n=l),i("marker.symbol"),i("marker.opacity",s?.7:1),i("marker.size"),o.noAngle||(i("marker.angle"),o.noAngleRef||i("marker.angleref"),o.noStandOff||i("marker.standoff")),i("marker.color",n),Wpe(t,"marker")&&Ype(t,r,a,i,{prefix:"marker.",cLetter:"c"}),o.noSelect||(i("selected.marker.color"),i("unselected.marker.color"),i("selected.marker.size"),i("unselected.marker.size")),o.noLine||(l&&!Array.isArray(l)&&r.marker.color!==l?u=l:s?u=jpe.background:u=jpe.defaultLine,i("marker.line.color",u),Wpe(t,"marker.line")&&Ype(t,r,a,i,{prefix:"marker.line.",cLetter:"c"}),i("marker.line.width",s?1:0),o.noLineDash||i("marker.line.dash")),s&&(i("marker.sizeref"),i("marker.sizemin"),i("marker.sizemode")),o.gradient){var c=i("marker.gradient.type");c!=="none"&&i("marker.gradient.color")}}});var lp=fe((Fvr,Zpe)=>{"use strict";var Ebt=Xt().isArrayOrTypedArray,kbt=Wf().hasColorscale,Cbt=Vc();Zpe.exports=function(t,r,n,a,i,o){o||(o={});var s=(t.marker||{}).color;if(s&&s._inputArray&&(s=s._inputArray),i("line.color",n),kbt(t,"line"))Cbt(t,r,a,i,{prefix:"line.",cLetter:"c"});else{var l=(Ebt(s)?!1:s)||n;i("line.color",l)}i("line.width"),o.noDash||i("line.dash"),o.backoff&&i("line.backoff")}});var f3=fe((Dvr,$pe)=>{"use strict";$pe.exports=function(t,r,n){var a=n("line.shape");a==="spline"&&n("line.smoothing")}});var up=fe((Rvr,Kpe)=>{"use strict";var Lbt=Xt();Kpe.exports=function(e,t,r,n,a){a=a||{},n("textposition"),Lbt.coerceFont(n,"textfont",a.font||r.font,a),a.noSelect||(n("selected.textfont.color"),n("unselected.textfont.color"))}});var a1=fe((Ivr,Qpe)=>{"use strict";var nC=ni(),Jpe=Xt().isArrayOrTypedArray;function Pbt(e){for(var t=nC.interpolate(e[0][1],e[1][1],.5),r=2;r{"use strict";var e1e=Xt(),Fbt=bi(),Dbt=Ol(),Rbt=r1(),h3=Is(),Ibt=r2(),zbt=sp(),qbt=Hpe(),Bbt=vv(),Obt=lp(),t1e=f3(),Nbt=up(),Ubt=a1(),Vbt=Xt().coercePattern;r1e.exports=function(t,r,n,a){function i(g,p){return e1e.coerce(t,r,Dbt,g,p)}var o=Ibt(t,r,a,i);if(o||(r.visible=!1),!!r.visible){zbt(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("zorder");var s=qbt(t,r,a,i);a.scattermode==="group"&&r.orientation===void 0&&i("orientation","v");var l=!s&&o{"use strict";var Gbt=Jx().getAxisGroup;i1e.exports=function(t,r,n,a,i){var o=r.orientation,s=r[{v:"x",h:"y"}[o]+"axis"],l=Gbt(n,s)+o,u=n._alignmentOpts||{},c=a("alignmentgroup"),f=u[l];f||(f=u[l]={});var v=f[c];v?v.traces.push(r):v=f[c]={traces:[r],alignmentIndex:Object.keys(f).length,offsetGroups:{}};var g=a("offsetgroup")||"",p=v.offsetGroups,x=p[g];r._offsetIndex=0,(i!=="group"||g)&&(x||(x=p[g]={offsetIndex:Object.keys(p).length}),r._offsetIndex=x.offsetIndex)}});var aU=fe((Bvr,a1e)=>{"use strict";var Hbt=Xt(),jbt=n2(),Wbt=Ol();a1e.exports=function(t,r){var n,a,i,o=r.scattermode;function s(v){return Hbt.coerce(a._input,a,Wbt,v)}if(r.scattermode==="group")for(i=0;i=0;c--){var f=t[c];if(f.type==="scatter"&&f.xaxis===l.xaxis&&f.yaxis===l.yaxis){f.opacity=void 0;break}}}}}});var s1e=fe((Ovr,o1e)=>{"use strict";var Ybt=Xt(),Xbt=nk();o1e.exports=function(e,t){function r(a,i){return Ybt.coerce(e,t,Xbt,a,i)}var n=t.barmode==="group";t.scattermode==="group"&&r("scattergap",n?t.bargap:.2)}});var cp=fe((Nvr,u1e)=>{"use strict";var Zbt=aa(),l1e=Xt(),$bt=l1e.dateTime2ms,iC=l1e.incrementMonth,Kbt=Wa(),Jbt=Kbt.ONEAVGMONTH;u1e.exports=function(t,r,n,a){if(r.type!=="date")return{vals:a};var i=t[n+"periodalignment"];if(!i)return{vals:a};var o=t[n+"period"],s;if(Zbt(o)){if(o=+o,o<=0)return{vals:a}}else if(typeof o=="string"&&o.charAt(0)==="M"){var l=+o.substring(1);if(l>0&&Math.round(l)===l)s=l;else return{vals:a}}for(var u=r.calendar,c=i==="start",f=i==="end",v=t[n+"period0"],g=$bt(v,u)||0,p=[],x=[],_=[],y=a.length,C=0;Ck;)w=iC(w,-s,u);for(;w<=k;)w=iC(w,s,u);L=iC(w,-s,u)}else{for(S=Math.round((k-g)/o),w=g+S*o;w>k;)w-=o;for(;w<=k;)w+=o;L=w-o}p[C]=c?L:f?w:(L+w)/2,x[C]=L,_[C]=w}return{vals:p,starts:x,ends:_}}});var pv=fe((Uvr,f1e)=>{"use strict";var oU=Wf().hasColorscale,sU=Mh(),c1e=Is();f1e.exports=function(t,r){c1e.hasLines(r)&&oU(r,"line")&&sU(t,r,{vals:r.line.color,containerStr:"line",cLetter:"c"}),c1e.hasMarkers(r)&&(oU(r,"marker")&&sU(t,r,{vals:r.marker.color,containerStr:"marker",cLetter:"c"}),oU(r,"marker.line")&&sU(t,r,{vals:r.marker.line.color,containerStr:"marker.line",cLetter:"c"}))}});var o1=fe((Vvr,h1e)=>{"use strict";var ru=Xt();h1e.exports=function(t,r){for(var n=0;n{"use strict";var d1e=Xt();v1e.exports=function(t,r){d1e.isArrayOrTypedArray(r.selectedpoints)&&d1e.tagSelected(t,r)}});var gv=fe((Hvr,b1e)=>{"use strict";var p1e=aa(),uU=Xt(),lA=Yi(),g1e=cp(),lU=Wa().BADNUM,cU=Is(),Qbt=pv(),e3t=o1(),t3t=P0();function r3t(e,t){var r=e._fullLayout,n=t._xA=lA.getFromId(e,t.xaxis||"x","x"),a=t._yA=lA.getFromId(e,t.yaxis||"y","y"),i=n.makeCalcdata(t,"x"),o=a.makeCalcdata(t,"y"),s=g1e(t,n,"x",i),l=g1e(t,a,"y",o),u=s.vals,c=l.vals,f=t._length,v=new Array(f),g=t.ids,p=fU(t,r,n,a),x=!1,_,y,C,k,S,L;x1e(r,t);var w="x",A="y",T;if(p)uU.pushUnique(p.traceIndices,t.index),_=p.orientation==="v",_?(A="s",T="x"):(w="s",T="y"),S=p.stackgaps==="interpolate";else{var m=y1e(t,f);m1e(e,t,n,a,u,c,m)}var F=!!t.xperiodalignment,E=!!t.yperiodalignment;for(y=0;yy&&v[k].gap;)k--;for(L=v[k].s,C=v.length-1;C>k;C--)v[C].s=L;for(;y{"use strict";w1e.exports=aC;var n3t=Xt().distinctVals;function aC(e,t){this.traces=e,this.sepNegVal=t.sepNegVal,this.overlapNoMerge=t.overlapNoMerge;for(var r=1/0,n=t.posAxis._id.charAt(0),a=[],i=0;i{"use strict";A1e.exports={TEXTPAD:3,eventDataKeys:["value","label"]}});var i2=fe((Yvr,k1e)=>{"use strict";var mv=aa(),{isArrayOrTypedArray:og}=Xt(),{BADNUM:d3}=Wa(),i3t=bi(),uA=Yi(),{getAxisGroup:a3t}=Jx(),oC=T1e(),{TEXTPAD:o3t}=Im(),{LINE_SPACING:s3t}=nc(),{BR_TAG_ALL:l3t}=as();function u3t(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,s=[],l=[],u=0;ul+o||!mv(s))}for(var c=0;cn(i))):n(e.text);let a=e.outsidetextfont.size*s3t*r+o3t;return{ppadplus:t.some(i=>i.s<0)?a:0,ppadminus:t.some(i=>i.s>=0)?a:0}}return{ppadplus:void 0,ppadminus:void 0}}function x3t(e,t,r,n){for(var a=v3(n),i=0;i{"use strict";var C1e=gv(),L1e=i2().setGroupPositions;function b3t(e,t){for(var r=t.xaxis,n=t.yaxis,a=e._fullLayout,i=e._fullData,o=e.calcdata,s=[],l=[],u=0;um[c]&&c{"use strict";var T3t=ea(),z1e=Wa(),cA=z1e.BADNUM,q1e=z1e.LOG_CLIP,D1e=q1e+.5,R1e=q1e-.5,sC=Xt(),A3t=sC.segmentsIntersect,I1e=sC.constrain,yU=r1();B1e.exports=function(t,r){var n=r.trace||{},a=r.xaxis,i=r.yaxis,o=a.type==="log",s=i.type==="log",l=a._length,u=i._length,c=r.backoff,f=n.marker,v=r.connectGaps,g=r.baseTolerance,p=r.shape,x=p==="linear",_=n.fill&&n.fill!=="none",y=[],C=yU.minTolerance,k=t.length,S=new Array(k),L=0,w,A,T,m,F,E,I,R,B,O,V,j,q,U,J,ee;function ce(Ot){var cr=t[Ot];if(!cr)return!1;var Ct=r.linearized?a.l2p(cr.x):a.c2p(cr.x),wt=r.linearized?i.l2p(cr.y):i.c2p(cr.y);if(Ct===cA){if(o&&(Ct=a.c2p(cr.x,!0)),Ct===cA)return!1;s&&wt===cA&&(Ct*=Math.abs(a._m*u*(a._m>0?D1e:R1e)/(i._m*l*(i._m>0?D1e:R1e)))),Ct*=1e3}if(wt===cA){if(s&&(wt=i.c2p(cr.y,!0)),wt===cA)return!1;wt*=1e3}return[Ct,wt]}function ye(Ot,cr,Ct,wt){var Tt=Ct-Ot,Mt=wt-cr,Lt=.5-Ot,ft=.5-cr,kt=Tt*Tt+Mt*Mt,rr=Tt*Lt+Mt*ft;if(rr>0&&rr1||Math.abs(Lt.y-Ct[0][1])>1)&&(Lt=[Lt.x,Lt.y],wt&&_e(Lt,Ot)<_e(Ct[0],Ot)?Ct.unshift(Lt):Ct.push(Lt),wt++)}return Ct}function ct(Ot){if(Ot[0]pe||Ot[1]le)return[I1e(Ot[0],ae,pe),I1e(Ot[1],ie,le)]}function et(Ot,cr){if(Ot[0]===cr[0]&&(Ot[0]===ae||Ot[0]===pe)||Ot[1]===cr[1]&&(Ot[1]===ie||Ot[1]===le))return!0}function qe(Ot,cr){var Ct=[],wt=ct(Ot),Tt=ct(cr);return wt&&Tt&&et(wt,Tt)||(wt&&Ct.push(wt),Tt&&Ct.push(Tt)),Ct}function we(Ot,cr,Ct){return function(wt,Tt){var Mt=ct(wt),Lt=ct(Tt),ft=[];if(Mt&&Lt&&et(Mt,Lt))return ft;Mt&&ft.push(Mt),Lt&&ft.push(Lt);var kt=2*sC.constrain((wt[Ot]+Tt[Ot])/2,cr,Ct)-((Mt||wt)[Ot]+(Lt||Tt)[Ot]);if(kt){var rr;Mt&&Lt?rr=kt>0==Mt[Ot]>Lt[Ot]?Mt:Lt:rr=Mt||Lt,rr[Ot]+=kt}return ft}}var Le;p==="linear"||p==="spline"?Le=ze:p==="hv"||p==="vh"?Le=qe:p==="hvh"?Le=we(0,ae,pe):p==="vhv"&&(Le=we(1,ie,le));function Ke(Ot,cr){var Ct=cr[0]-Ot[0],wt=(cr[1]-Ot[1])/Ct,Tt=(Ot[1]*cr[0]-cr[1]*Ot[0])/Ct;return Tt>0?[wt>0?ae:pe,le]:[wt>0?pe:ae,ie]}function Te(Ot){var cr=Ot[0],Ct=Ot[1],wt=cr===S[L-1][0],Tt=Ct===S[L-1][1];if(!(wt&&Tt))if(L>1){var Mt=cr===S[L-2][0],Lt=Ct===S[L-2][1];wt&&(cr===ae||cr===pe)&&Mt?Lt?L--:S[L-1]=Ot:Tt&&(Ct===ie||Ct===le)&&Lt?Mt?L--:S[L-1]=Ot:S[L++]=Ot}else S[L++]=Ot}function Ve(Ot){S[L-1][0]!==Ot[0]&&S[L-1][1]!==Ot[1]&&Te([Ge,ht]),Te(Ot),it=null,Ge=ht=0}var $e=sC.isArrayOrTypedArray(f);function ot(Ot){if(Ot&&c&&(Ot.i=w,Ot.d=t,Ot.trace=n,Ot.marker=$e?f[Ot.i]:f,Ot.backoff=c),xe=Ot[0]/l,ue=Ot[1]/u,be=Ot[0]pe?pe:0,De=Ot[1]le?le:0,be||De){if(!L)S[L++]=[be||Ot[0],De||Ot[1]];else if(it){var cr=Le(it,Ot);cr.length>1&&(Ve(cr[0]),S[L++]=cr[1])}else Oe=Le(S[L-1],Ot)[0],S[L++]=Oe;var Ct=S[L-1];be&&De&&(Ct[0]!==be||Ct[1]!==De)?(it&&(Ge!==be&&ht!==De?Te(Ge&&ht?Ke(it,Ot):[Ge||be,ht||De]):Ge&&ht&&Te([Ge,ht])),Te([be,De])):Ge-be&&ht-De&&Te([be||Ge,De||ht]),it=Ot,Ge=be,ht=De}else it&&Ve(Le(it,Ot)[0]),S[L++]=Ot}for(w=0;wK(E,tt))break;T=E,q=B[0]*R[0]+B[1]*R[1],q>V?(V=q,m=E,I=!1):q=t.length||!E)break;ot(E),A=E}}it&&Te([Ge||it[0],ht||it[1]]),y.push(S.slice(0,L))}var nt=p.slice(p.length-1);if(c&&nt!=="h"&&nt!=="v"){for(var We=!1,mt=-1,bt=[],Yt=0;Yt{"use strict";var O1e={tonextx:1,tonexty:1,tonext:1};N1e.exports=function(t,r,n){var a,i,o,s,l,u={},c=!1,f=-1,v=0,g=-1;for(i=0;i=0?l=g:(l=g=v,v++),l{"use strict";var fp=xi(),M3t=bi(),fA=Xt(),p3=fA.ensureSingle,V1e=fA.identity,pu=ea(),g3=Is(),S3t=xU(),E3t=_U(),lC=NT().tester;G1e.exports=function(t,r,n,a,i,o){var s,l,u=!i,c=!!i&&i.duration>0,f=E3t(t,r,n);if(s=a.selectAll("g.trace").data(f,function(g){return g[0].trace.uid}),s.enter().append("g").attr("class",function(g){return"trace scatter trace"+g[0].trace.uid}).style("stroke-miterlimit",2),s.order(),k3t(t,s,r),c){o&&(l=o());var v=fp.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});v.each(function(){a.selectAll("g.trace").each(function(g,p){U1e(t,p,r,g,f,this,i)})})}else s.each(function(g,p){U1e(t,p,r,g,f,this,i)});u&&s.exit().remove(),a.selectAll("path:not([d])").remove()};function k3t(e,t,r){t.each(function(n){var a=p3(fp.select(this),"g","fills");pu.setClipUrl(a,r.layerClipId,e);var i=n[0].trace;i._ownFill=null,i._nextFill=null;var o=[];i._ownfill&&o.push("_ownFill"),i._nexttrace&&o.push("_nextFill");var s=a.selectAll("g").data(o,V1e);s.enter().append("g"),s.exit().remove(),s.order().each(function(l){i[l]=p3(fp.select(this),"path","js-fill")})})}function U1e(e,t,r,n,a,i,o){var s=e._context.staticPlot,l;C3t(e,t,r,n,a);var u=!!o&&o.duration>0;function c(we){return u?we.transition():we}var f=r.xaxis,v=r.yaxis,g=n[0].trace,p=g.line,x=fp.select(i),_=p3(x,"g","errorbars"),y=p3(x,"g","lines"),C=p3(x,"g","points"),k=p3(x,"g","text");if(M3t.getComponentMethod("errorbars","plot")(e,_,r,o),g.visible!==!0)return;c(x).style("opacity",g.opacity);var S,L,w=g.fill.charAt(g.fill.length-1);w!=="x"&&w!=="y"&&(w="");var A,T;w==="y"?(A=1,T=v.c2p(0,!0)):w==="x"&&(A=0,T=f.c2p(0,!0)),n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=x;var m="",F=[],E=g._prevtrace,I=null,R=null;E&&(m=E._prevRevpath||"",L=E._nextFill,F=E._ownPolygons,I=E._fillsegments,R=E._fillElement);var B,O,V="",j="",q,U,J,ee,ce,ye,xe=[];g._polygons=[];var ue=[],K=[],_e=fA.noop;if(S=g._ownFill,g3.hasLines(g)||g.fill!=="none"){L&&L.datum(n),["hv","vh","hvh","vhv"].indexOf(p.shape)!==-1?(q=pu.steps(p.shape),U=pu.steps(p.shape.split("").reverse().join(""))):p.shape==="spline"?q=U=function(we){var Le=we[we.length-1];return we.length>1&&we[0][0]===Le[0]&&we[0][1]===Le[1]?pu.smoothclosed(we.slice(1),p.smoothing):pu.smoothopen(we,p.smoothing)}:q=U=function(we){return"M"+we.join("L")},J=function(we){return U(we.reverse())},K=S3t(n,{xaxis:f,yaxis:v,trace:g,connectGaps:g.connectgaps,baseTolerance:Math.max(p.width||1,3)/4,shape:p.shape,backoff:p.backoff,simplify:p.simplify,fill:g.fill}),ue=new Array(K.length);var ne=0;for(l=0;l=s[0]&&x.x<=s[1]&&x.y>=l[0]&&x.y<=l[1]}),v=Math.ceil(f.length/c),g=0;a.forEach(function(x,_){var y=x[0].trace;g3.hasMarkers(y)&&y.marker.maxdisplayed>0&&_{"use strict";H1e.exports={container:"marker",min:"cmin",max:"cmax"}});var cC=fe((Qvr,j1e)=>{"use strict";var uC=Yi();j1e.exports=function(t,r,n){var a={},i={_fullLayout:n},o=uC.getFromTrace(i,r,"x"),s=uC.getFromTrace(i,r,"y"),l=t.orig_x;l===void 0&&(l=t.x);var u=t.orig_y;return u===void 0&&(u=t.y),a.xLabel=uC.tickText(o,o.c2l(l),!0).text,a.yLabel=uC.tickText(s,s.c2l(u),!0).text,a}});var Ld=fe((epr,W1e)=>{"use strict";var bU=xi(),y3=ea(),L3t=bi();function P3t(e){var t=bU.select(e).selectAll("g.trace.scatter");t.style("opacity",function(r){return r[0].trace.opacity}),t.selectAll("g.points").each(function(r){var n=bU.select(this),a=r.trace||r[0].trace;wU(n,a,e)}),t.selectAll("g.text").each(function(r){var n=bU.select(this),a=r.trace||r[0].trace;TU(n,a,e)}),t.selectAll("g.trace path.js-line").call(y3.lineGroupStyle),t.selectAll("g.trace path.js-fill").call(y3.fillGroupStyle,e,!1),L3t.getComponentMethod("errorbars","style")(t)}function wU(e,t,r){y3.pointStyle(e.selectAll("path.point"),t,r)}function TU(e,t,r){y3.textPointStyle(e.selectAll("text"),t,r)}function F3t(e,t,r){var n=t[0].trace;n.selectedpoints?(y3.selectedPointStyle(r.selectAll("path.point"),n),y3.selectedTextStyle(r.selectAll("text"),n)):(wU(r,n,e),TU(r,n,e))}W1e.exports={style:P3t,stylePoints:wU,styleText:TU,styleOnSelect:F3t}});var _3=fe((tpr,Y1e)=>{"use strict";var x3=ni(),D3t=Is();Y1e.exports=function(t,r){var n,a;if(t.mode==="lines")return n=t.line.color,n&&x3.opacity(n)?n:t.fillcolor;if(t.mode==="none")return t.fill?t.fillcolor:"";var i=r.mcc||(t.marker||{}).color,o=r.mlcc||((t.marker||{}).line||{}).color;return a=i&&x3.opacity(i)?i:o&&x3.opacity(o)&&(r.mlw||((t.marker||{}).line||{}).width)?o:"",a?x3.opacity(a)<.3?x3.addOpacity(a,.3):a:(n=(t.line||{}).color,n&&x3.opacity(n)&&D3t.hasLines(t)&&t.line.width?n:t.fillcolor)}});var b3=fe((rpr,Z1e)=>{"use strict";var fC=Xt(),X1e=kl(),R3t=bi(),I3t=_3(),AU=ni(),z3t=fC.fillText;Z1e.exports=function(t,r,n,a){var i=t.cd,o=i[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=[u,c],v=o.hoveron||"",g=o.mode.indexOf("markers")!==-1?3:.5,p=!!o.xperiodalignment,x=!!o.yperiodalignment;if(v.indexOf("points")!==-1){var _=function(j){if(p){var q=s.c2p(j.xStart),U=s.c2p(j.xEnd);return u>=Math.min(q,U)&&u<=Math.max(q,U)?0:1/0}var J=Math.max(3,j.mrc||0),ee=1-1/J,ce=Math.abs(s.c2p(j.x)-u);return ce=Math.min(q,U)&&c<=Math.max(q,U)?0:1/0}var J=Math.max(3,j.mrc||0),ee=1-1/J,ce=Math.abs(l.c2p(j.y)-c);return cexe!=le>=xe&&(ae=_e[K-1][0],pe=_e[K][0],le-ie&&(ne=ae+(pe-ae)*(xe-ie)/(le-ie),J=Math.min(J,ne),ee=Math.max(ee,ne)));return J=Math.max(J,0),ee=Math.min(ee,s._length),{x0:J,x1:ee,y0:xe,y1:xe}}if(v.indexOf("fills")!==-1&&o._fillElement){var B=I(o._fillElement)&&!I(o._fillExclusionElement);if(B){var O=R(o._polygons);O===null&&(O={x0:f[0],x1:f[0],y0:f[1],y1:f[1]});var V=AU.defaultLine;return AU.opacity(o.fillcolor)?V=o.fillcolor:AU.opacity((o.line||{}).color)&&(V=o.line.color),fC.extendFlat(t,{distance:t.maxHoverDistance,x0:O.x0,x1:O.x1,y0:O.y0,y1:O.y1,color:V,hovertemplate:!1}),delete t.index,o.text&&!fC.isArrayOrTypedArray(o.text)?t.text=String(o.text):t.text=o.name,[t]}}}});var a2=fe((npr,K1e)=>{"use strict";var $1e=Is();K1e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l,u,c,f,v=s.mode&&!$1e.hasMarkers(s)&&!$1e.hasText(s);if(v)return[];if(r===!1)for(l=0;l{"use strict";J1e.exports={xaxis:{valType:"subplotid",dflt:"x",editType:"calc+clearAxisTypes"},yaxis:{valType:"subplotid",dflt:"y",editType:"calc+clearAxisTypes"}}});var SU=fe((apr,rge)=>{"use strict";var hC=bi().traceIs,MU=Yb();rge.exports=function(t,r,n,a){n("autotypenumbers",a.autotypenumbersDflt);var i=n("type",(a.splomStash||{}).type);i==="-"&&(q3t(r,a.data),r.type==="-"?r.type="linear":t.type=r.type)};function q3t(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),a;r.indexOf("scene")!==-1&&(r=n);var i=B3t(t,r,n);if(i){if(i.type==="histogram"&&n==={v:"y",h:"x"}[i.orientation||"v"]){e.type="linear";return}var o=n+"calendar",s=i[o],l={noMultiCategory:!hC(i,"cartesian")||hC(i,"noMultiCategory")};if(i.type==="box"&&i._hasPreCompStats&&n==={h:"x",v:"y"}[i.orientation||"v"]&&(l.noMultiCategory=!0),l.autotypenumbers=e.autotypenumbers,tge(i,n)){var u=ege(i),c=[];for(a=0;a0&&(a["_"+r+"axes"]||{})[t])return a;if((a[r+"axis"]||r)===t){if(tge(a,r))return a;if((a[r]||[]).length||a[r+"0"])return a}}}function ege(e){return{v:"x",h:"y"}[e.orientation||"v"]}function tge(e,t){var r=ege(e),n=hC(e,"box-violin");return n&&t===r&&e[r]===void 0&&e[r+"0"]===void 0}});var dC=fe((opr,nge)=>{"use strict";var O3t=Gf().isTypedArraySpec;function N3t(e,t){var r=t.dataAttr||e._id.charAt(0),n={},a,i,o;if(t.axData)a=t.axData;else for(a=[],i=0;i0||O3t(i),s;o&&(s="array");var l=n("categoryorder",s),u;l==="array"&&(u=n("categoryarray")),!o&&l==="array"&&(l=r.categoryorder="trace"),l==="trace"?r._initialCategories=[]:l==="array"?r._initialCategories=u.slice():(u=N3t(r,a).sort(),l==="category ascending"?r._initialCategories=u:l==="category descending"&&(r._initialCategories=u.reverse()))}}});var hA=fe((spr,age)=>{"use strict";var ige=ni(),U3t=tc(),V3t=Xt();age.exports=function(t,r,n,a){a=a||{};var i=a.dfltColor;function o(T,m){return V3t.coerce2(t,r,a.attributes,T,m)}var s=o("linecolor",i),l=o("linewidth"),u=n("showline",a.showLine||!!s||!!l);u||(delete r.linecolor,delete r.linewidth);var c=ige.mix(i,a.bgColor,a.blend||U3t.lightFraction),f=o("gridcolor",c),v=o("gridwidth"),g=o("griddash"),p=n("showgrid",a.showGrid||!!f||!!v||!!g);if(p||(delete r.gridcolor,delete r.gridwidth,delete r.griddash),a.hasMinor){var x=ige.mix(r.gridcolor,a.bgColor,67),_=o("minor.gridcolor",x),y=o("minor.gridwidth",r.gridwidth||1),C=o("minor.griddash",r.griddash||"solid"),k=n("minor.showgrid",!!_||!!y||!!C);k||(delete r.minor.gridcolor,delete r.minor.gridwidth,delete r.minor.griddash)}if(!a.noZeroLine){var S=o("zerolinelayer"),L=o("zerolinecolor",i),w=o("zerolinewidth"),A=n("zeroline",a.showGrid||!!L||!!w);A||(delete r.zerolinelayer,delete r.zerolinecolor,delete r.zerolinewidth)}}});var vA=fe((lpr,fge)=>{"use strict";var oge=aa(),G3t=bi(),dA=Xt(),H3t=Mo(),j3t=Ah(),EU=pf(),sge=Fx(),lge=Ub(),W3t=gm(),Y3t=mm(),X3t=dC(),Z3t=hA(),$3t=gO(),uge=Hp(),vC=rc().WEEKDAY_PATTERN,K3t=rc().HOUR_PATTERN;fge.exports=function(t,r,n,a,i){var o=a.letter,s=a.font||{},l=a.splomStash||{},u=n("visible",!a.visibleDflt),c=r._template||{},f=r.type||c.type||"-",v;if(f==="date"){var g=G3t.getComponentMethod("calendars","handleDefaults");g(t,r,"calendar",a.calendar),a.noTicklabelmode||(v=n("ticklabelmode"))}!a.noTicklabelindex&&(f==="date"||f==="linear")&&n("ticklabelindex");var p="";(!a.noTicklabelposition||f==="multicategory")&&(p=dA.coerce(t,r,{ticklabelposition:{valType:"enumerated",dflt:"outside",values:v==="period"?["outside","inside"]:o==="x"?["outside","inside","outside left","inside left","outside right","inside right"]:["outside","inside","outside top","inside top","outside bottom","inside bottom"]}},"ticklabelposition")),a.noTicklabeloverflow||n("ticklabeloverflow",p.indexOf("inside")!==-1?"hide past domain":f==="category"||f==="multicategory"?"allow":"hide past div"),uge(r,i),$3t(t,r,n,a),X3t(t,r,n,a),a.noHover||(f!=="category"&&n("hoverformat"),a.noUnifiedhovertitle||n("unifiedhovertitle.text"));var x=n("color"),_=x!==EU.color.dflt?x:s.color,y=l.label||i._dfltTitle[o];if(Y3t(t,r,n,f,a),!u)return r;n("title.text",y),dA.coerceFont(n,"title.font",s,{overrideDflt:{size:dA.bigFont(s.size),color:_}}),sge(t,r,n,f);var C=a.hasMinor;if(C&&(H3t.newContainer(r,"minor"),sge(t,r,n,f,{isMinor:!0})),W3t(t,r,n,f,a),lge(t,r,n,a),C){var k=a.isMinor;a.isMinor=!0,lge(t,r,n,a),a.isMinor=k}Z3t(t,r,n,{dfltColor:x,bgColor:a.bgColor,showGrid:a.showGrid,hasMinor:C,attributes:EU}),C&&r.ticklabelindex==null&&!r.minor.ticks&&!r.minor.showgrid&&delete r.minor,(r.showline||r.ticks)&&n("mirror");var S=f==="multicategory";if(!a.noTickson&&(f==="category"||S)&&(r.ticks||r.showgrid)&&(S?(n("tickson","boundaries"),delete r.ticklabelposition):n("tickson")),S){var L=n("showdividers");L&&(n("dividercolor"),n("dividerwidth"))}if(f==="date")if(j3t(t,r,{name:"rangebreaks",inclusionAttr:"enabled",handleItemDefaults:J3t}),!r.rangebreaks.length)delete r.rangebreaks;else{for(var w=0;w=2){var o="",s,l;if(i.length===2){for(s=0;s<2;s++)if(l=cge(i[s]),l){o=vC;break}}var u=n("pattern",o);if(u===vC)for(s=0;s<2;s++)l=cge(i[s]),l&&(t.bounds[s]=i[s]=l-1);if(u)for(s=0;s<2;s++)switch(l=i[s],u){case vC:if(!oge(l)){t.enabled=!1;return}if(l=+l,l!==Math.floor(l)||l<0||l>=7){t.enabled=!1;return}t.bounds[s]=i[s]=l;break;case K3t:if(!oge(l)){t.enabled=!1;return}if(l=+l,l<0||l>24){t.enabled=!1;return}t.bounds[s]=i[s]=l;break}if(r.autorange===!1){var c=r.range;if(c[0]c[1]){t.enabled=!1;return}}else if(i[0]>c[0]&&i[1]{"use strict";var ewt=aa(),pC=Xt();hge.exports=function(t,r,n,a){var i=a.counterAxes||[],o=a.overlayableAxes||[],s=a.letter,l=a.grid,u=a.overlayingDomain,c,f,v,g,p,x;l&&(f=l._domains[s][l._axisMap[r._id]],c=l._anchors[r._id],f&&(v=l[s+"side"].split(" ")[0],g=l.domain[s][v==="right"||v==="top"?1:0])),f=f||[0,1],c=c||(ewt(t.position)?"free":i[0]||"free"),v=v||(s==="x"?"bottom":"left"),g=g||0,p=0,x=!1;var _=pC.coerce(t,r,{anchor:{valType:"enumerated",values:["free"].concat(i),dflt:c}},"anchor"),y=pC.coerce(t,r,{side:{valType:"enumerated",values:s==="x"?["bottom","top"]:["left","right"],dflt:v}},"side");if(_==="free"){if(s==="y"){var C=n("autoshift");C&&(g=y==="left"?u[0]:u[1],x=r.automargin?r.automargin:!0,p=y==="left"?-3:3),n("shift",p)}n("position",g)}n("automargin",x);var k=!1;if(o.length&&(k=pC.coerce(t,r,{overlaying:{valType:"enumerated",values:[!1].concat(o),dflt:!1}},"overlaying")),!k){var S=n("domain",f);S[0]>S[1]-1/4096&&(r.domain=f),pC.noneOrAll(t.domain,r.domain,f),r.tickmode==="sync"&&(r.tickmode="auto")}return n("layer"),r}});var bge=fe((cpr,_ge)=>{"use strict";var o2=Xt(),dge=ni(),twt=Sd().isUnifiedHover,rwt=VO(),vge=Mo(),nwt=Sb(),pge=pf(),iwt=SU(),gge=vA(),awt=Jx(),mge=gC(),CU=El(),s1=CU.id2name,yge=CU.name2id,owt=rc().AX_ID_PATTERN,xge=bi(),mC=xge.traceIs,kU=xge.getComponentMethod;function yC(e,t,r){Array.isArray(e[t])?e[t].push(r):e[t]=[r]}_ge.exports=function(t,r,n){var a=r.autotypenumbers,i={},o={},s={},l={},u={},c={},f={},v={},g={},p={},x,_;for(x=0;x{"use strict";var swt=xi(),wge=bi(),xC=Xt(),F0=ea(),_C=Yi();Tge.exports=function(t,r,n,a){var i=t._fullLayout;if(r.length===0){_C.redrawComponents(t);return}function o(_){var y=_.xaxis,C=_.yaxis;i._defs.select("#"+_.clipId+"> rect").call(F0.setTranslate,0,0).call(F0.setScale,1,1),_.plot.call(F0.setTranslate,y._offset,C._offset).call(F0.setScale,1,1);var k=_.plot.selectAll(".scatterlayer .trace");k.selectAll(".point").call(F0.setPointGroupScale,1,1),k.selectAll(".textpoint").call(F0.setTextPointsScale,1,1),k.call(F0.hideOutsideRangePoints,_)}function s(_,y){var C=_.plotinfo,k=C.xaxis,S=C.yaxis,L=k._length,w=S._length,A=!!_.xr1,T=!!_.yr1,m=[];if(A){var F=xC.simpleMap(_.xr0,k.r2l),E=xC.simpleMap(_.xr1,k.r2l),I=F[1]-F[0],R=E[1]-E[0];m[0]=(F[0]*(1-y)+y*E[0]-F[0])/(F[1]-F[0])*L,m[2]=L*(1-y+y*R/I),k.range[0]=k.l2r(F[0]*(1-y)+y*E[0]),k.range[1]=k.l2r(F[1]*(1-y)+y*E[1])}else m[0]=0,m[2]=L;if(T){var B=xC.simpleMap(_.yr0,S.r2l),O=xC.simpleMap(_.yr1,S.r2l),V=B[1]-B[0],j=O[1]-O[0];m[1]=(B[1]*(1-y)+y*O[1]-B[1])/(B[0]-B[1])*w,m[3]=w*(1-y+y*j/V),S.range[0]=k.l2r(B[0]*(1-y)+y*O[0]),S.range[1]=S.l2r(B[1]*(1-y)+y*O[1])}else m[1]=0,m[3]=w;_C.drawOne(t,k,{skipTitle:!0}),_C.drawOne(t,S,{skipTitle:!0}),_C.redrawComponents(t,[k._id,S._id]);var q=A?L/m[2]:1,U=T?w/m[3]:1,J=A?m[0]:0,ee=T?m[1]:0,ce=A?m[0]/m[2]*L:0,ye=T?m[1]/m[3]*w:0,xe=k._offset-ce,ue=S._offset-ye;C.clipRect.call(F0.setTranslate,J,ee).call(F0.setScale,1/q,1/U),C.plot.call(F0.setTranslate,xe,ue).call(F0.setScale,q,U),F0.setPointGroupScale(C.zoomScalePts,1/q,1/U),F0.setTextPointsScale(C.zoomScaleTxt,1/q,1/U)}var l;a&&(l=a());function u(){for(var _={},y=0;yn.duration?(u(),g=window.cancelAnimationFrame(x)):g=window.requestAnimationFrame(x)}return f=Date.now(),g=window.requestAnimationFrame(x),Promise.resolve()}});var gu=fe(Eh=>{"use strict";var wC=xi(),Mge=bi(),s2=Xt(),lwt=Hs(),uwt=ea(),Sge=jf().getModuleCalcData,zm=El(),hp=rc(),cwt=Q0(),jo=s2.ensureSingle;function bC(e,t,r){return s2.ensureSingle(e,t,r,function(n){n.datum(r)})}var l2=hp.zindexSeparator;Eh.name="cartesian";Eh.attr=["xaxis","yaxis"];Eh.idRoot=["x","y"];Eh.idRegex=hp.idRegex;Eh.attrRegex=hp.attrRegex;Eh.attributes=Q1e();Eh.layoutAttributes=pf();Eh.supplyLayoutDefaults=bge();Eh.transitionAxes=Age();Eh.finalizeSubplots=function(e,t){var r=t._subplots,n=r.xaxis,a=r.yaxis,i=r.cartesian,o=i,s={},l={},u,c,f;for(u=0;u0){var g=v.id;if(g.indexOf(l2)!==-1)continue;g+=l2+(u+1),v=s2.extendFlat({},v,{id:g,plot:a._cartesianlayer.selectAll(".subplot").select("."+g)})}for(var p=[],x,_=0;_1&&(L+=l2+S),k.push(s+L),o=0;o1,f=t.mainplotinfo;if(!t.mainplot||c)if(u)t.xlines=jo(n,"path","xlines-above"),t.ylines=jo(n,"path","ylines-above"),t.xaxislayer=jo(n,"g","xaxislayer-above"),t.yaxislayer=jo(n,"g","yaxislayer-above");else{if(!o){var v=jo(n,"g","layer-subplot");t.shapelayer=jo(v,"g","shapelayer"),t.imagelayer=jo(v,"g","imagelayer"),f&&c?(t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer):(t.minorGridlayer=jo(n,"g","minor-gridlayer"),t.gridlayer=jo(n,"g","gridlayer"),t.zerolinelayer=jo(n,"g","zerolinelayer"));var g=jo(n,"g","layer-between");t.shapelayerBetween=jo(g,"g","shapelayer"),t.imagelayerBetween=jo(g,"g","imagelayer"),jo(n,"path","xlines-below"),jo(n,"path","ylines-below"),t.overlinesBelow=jo(n,"g","overlines-below"),jo(n,"g","xaxislayer-below"),jo(n,"g","yaxislayer-below"),t.overaxesBelow=jo(n,"g","overaxes-below")}t.overplot=jo(n,"g","overplot"),t.plot=jo(t.overplot,"g",a),f&&c?t.zerolinelayerAbove=f.zerolinelayerAbove:t.zerolinelayerAbove=jo(n,"g","zerolinelayer-above"),o||(t.xlines=jo(n,"path","xlines-above"),t.ylines=jo(n,"path","ylines-above"),t.overlinesAbove=jo(n,"g","overlines-above"),jo(n,"g","xaxislayer-above"),jo(n,"g","yaxislayer-above"),t.overaxesAbove=jo(n,"g","overaxes-above"),t.xlines=n.select(".xlines-"+s),t.ylines=n.select(".ylines-"+l),t.xaxislayer=n.select(".xaxislayer-"+s),t.yaxislayer=n.select(".yaxislayer-"+l))}else{var p=f.plotgroup,x=a+"-x",_=a+"-y";t.minorGridlayer=f.minorGridlayer,t.gridlayer=f.gridlayer,t.zerolinelayer=f.zerolinelayer,t.zerolinelayerAbove=f.zerolinelayerAbove,jo(f.overlinesBelow,"path",x),jo(f.overlinesBelow,"path",_),jo(f.overaxesBelow,"g",x),jo(f.overaxesBelow,"g",_),t.plot=jo(f.overplot,"g",a),jo(f.overlinesAbove,"path",x),jo(f.overlinesAbove,"path",_),jo(f.overaxesAbove,"g",x),jo(f.overaxesAbove,"g",_),t.xlines=p.select(".overlines-"+s).select("."+x),t.ylines=p.select(".overlines-"+l).select("."+_),t.xaxislayer=p.select(".overaxes-"+s).select("."+x),t.yaxislayer=p.select(".overaxes-"+l).select("."+_)}o||(u||(bC(t.minorGridlayer,"g",t.xaxis._id),bC(t.minorGridlayer,"g",t.yaxis._id),t.minorGridlayer.selectAll("g").map(function(y){return y[0]}).sort(zm.idSort),bC(t.gridlayer,"g",t.xaxis._id),bC(t.gridlayer,"g",t.yaxis._id),t.gridlayer.selectAll("g").map(function(y){return y[0]}).sort(zm.idSort)),t.xlines.style("fill","none").classed("crisp",!0),t.ylines.style("fill","none").classed("crisp",!0))}function Cge(e,t){if(e){var r={};e.each(function(l){var u=l[0],c=wC.select(this);c.remove(),Lge(u,t),r[u]=!0});for(var n in t._plots)for(var a=t._plots[n],i=a.overlays||[],o=0;o{"use strict";var TC=Is();Pge.exports={hasLines:TC.hasLines,hasMarkers:TC.hasMarkers,hasText:TC.hasText,isBubble:TC.isBubble,attributes:Ol(),layoutAttributes:nk(),supplyDefaults:n1e(),crossTraceDefaults:aU(),supplyLayoutDefaults:s1e(),calc:gv().calc,crossTraceCalc:F1e(),arraysToCalcdata:o1(),plot:m3(),colorbar:Zf(),formatLabels:cC(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:b3(),selectPoints:a2(),animatable:!0,moduleType:"trace",name:"scatter",basePlotModule:gu(),categories:["cartesian","svg","symbols","errorBarsOK","showLegend","scatter-like","zoomScale"],meta:{}}});var Ige=fe((vpr,Rge)=>{"use strict";var hwt=xi(),dwt=ni(),Dge=PN(),LU=Xt(),vwt=LU.strScale,pwt=LU.strRotate,gwt=LU.strTranslate;Rge.exports=function(t,r,n){var a=t.node(),i=Dge[n.arrowhead||0],o=Dge[n.startarrowhead||0],s=(n.arrowwidth||1)*(n.arrowsize||1),l=(n.arrowwidth||1)*(n.startarrowsize||1),u=r.indexOf("start")>=0,c=r.indexOf("end")>=0,f=i.backoff*s+n.standoff,v=o.backoff*l+n.startstandoff,g,p,x,_;if(a.nodeName==="line"){g={x:+t.attr("x1"),y:+t.attr("y1")},p={x:+t.attr("x2"),y:+t.attr("y2")};var y=g.x-p.x,C=g.y-p.y;if(x=Math.atan2(C,y),_=x+Math.PI,f&&v&&f+v>Math.sqrt(y*y+C*C)){B();return}if(f){if(f*f>y*y+C*C){B();return}var k=f*Math.cos(x),S=f*Math.sin(x);p.x+=k,p.y+=S,t.attr({x2:p.x,y2:p.y})}if(v){if(v*v>y*y+C*C){B();return}var L=v*Math.cos(x),w=v*Math.sin(x);g.x-=L,g.y-=w,t.attr({x1:g.x,y1:g.y})}}else if(a.nodeName==="path"){var A=a.getTotalLength(),T="";if(A{"use strict";var zge=xi(),PU=bi(),mwt=Hs(),Bm=Xt(),FU=Bm.strTranslate,gA=Yi(),u2=ni(),sg=ea(),qge=kl(),DU=as(),RU=np(),pA=ed(),ywt=Mo().arrayEditor,xwt=Ige();Nge.exports={draw:_wt,drawOne:Bge,drawRaw:Oge};function _wt(e){var t=e._fullLayout;t._infolayer.selectAll(".annotation").remove();for(var r=0;r2/3?Tt="right":Tt="center"),{center:0,middle:0,left:.5,bottom:-.5,right:-.5,top:.5}[Tt]}for(var ie=!1,le=["x","y"],me=0;me1)&&(Ge===De?(tt=ht.r2fraction(t["a"+be]),(tt<0||tt>1)&&(ie=!0)):ie=!0),Le=ht._offset+ht.r2p(t[be]),Ve=.5}else{var nt=ot==="domain";be==="x"?(Te=t[be],Le=nt?ht._offset+ht._length*Te:Le=s.l+s.w*Te):(Te=1-t[be],Le=nt?ht._offset+ht._length*Te:Le=s.t+s.h*Te),Ve=t.showarrow?.5:Te}if(t.showarrow){we.head=Le;var We=t["a"+be];if($e=Oe*pe(.5,t.xanchor)-ze*pe(.5,t.yanchor),Ge===De){var mt=gA.getRefType(Ge);mt==="domain"?(be==="y"&&(We=1-We),we.tail=ht._offset+ht._length*We):mt==="paper"?be==="y"?(We=1-We,we.tail=s.t+s.h*We):we.tail=s.l+s.w*We:we.tail=ht._offset+ht.r2p(We),Ke=$e}else we.tail=Le+We,Ke=$e+We;we.text=we.tail+$e;var bt=o[be==="x"?"width":"height"];if(De==="paper"&&(we.head=Bm.constrain(we.head,1,bt-1)),Ge==="pixel"){var Yt=-Math.max(we.tail-3,we.text),jt=Math.min(we.tail+3,we.text)-bt;Yt>0?(we.tail+=Yt,we.text+=Yt):jt>0&&(we.tail-=jt,we.text-=jt)}we.tail+=qe,we.head+=qe}else $e=ct*pe(Ve,et),Ke=$e,we.text=Le+$e;we.text+=qe,$e+=qe,Ke+=qe,t["_"+be+"padplus"]=ct/2+Ke,t["_"+be+"padminus"]=ct/2-Ke,t["_"+be+"size"]=ct,t["_"+be+"shift"]=$e}if(ie){A.remove();return}var mr=0,or=0;if(t.align!=="left"&&(mr=(K-xe)*(t.align==="center"?.5:1)),t.valign!=="top"&&(or=(_e-ue)*(t.valign==="middle"?.5:1)),ce)ee.select("svg").attr({x:F+mr-1,y:F+or}).call(sg.setClipUrl,I?x:null,e);else{var fr=F+or-ye.top,Ot=F+mr-ye.left;V.call(DU.positionText,Ot,fr).call(sg.setClipUrl,I?x:null,e)}R.select("rect").call(sg.setRect,F,F,K,_e),E.call(sg.setRect,T/2,T/2,ne-T,ae-T),A.call(sg.setTranslate,Math.round(_.x.text-ne/2),Math.round(_.y.text-ae/2)),k.attr({transform:"rotate("+y+","+_.x.text+","+_.y.text+")"});var cr=function(wt,Tt){C.selectAll(".annotation-arrow-g").remove();var Mt=_.x.head,Lt=_.y.head,ft=_.x.tail+wt,kt=_.y.tail+Tt,rr=_.x.text+wt,pr=_.y.text+Tt,Kr=Bm.rotationXYMatrix(y,rr,pr),Nr=Bm.apply2DTransform(Kr),dn=Bm.apply2DTransform2(Kr),xr=+E.attr("width"),Fr=+E.attr("height"),Zr=rr-.5*xr,Cn=Zr+xr,Dt=pr-.5*Fr,At=Dt+Fr,Vt=[[Zr,Dt,Zr,At],[Zr,At,Cn,At],[Cn,At,Cn,Dt],[Cn,Dt,Zr,Dt]].map(dn);if(!Vt.reduce(function(ha,va){return ha^!!Bm.segmentsIntersect(Mt,Lt,Mt+1e6,Lt+1e6,va[0],va[1],va[2],va[3])},!1)){Vt.forEach(function(ha){var va=Bm.segmentsIntersect(ft,kt,Mt,Lt,ha[0],ha[1],ha[2],ha[3]);va&&(ft=va.x,kt=va.y)});var Qt=t.arrowwidth,Ut=t.arrowcolor,_r=t.arrowside,rn=C.append("g").style({opacity:u2.opacity(Ut)}).classed("annotation-arrow-g",!0),Jr=rn.append("path").attr("d","M"+ft+","+kt+"L"+Mt+","+Lt).style("stroke-width",Qt+"px").call(u2.stroke,u2.rgb(Ut));if(xwt(Jr,_r,t),l.annotationPosition&&Jr.node().parentNode&&!n){var qn=Mt,ri=Lt;if(t.standoff){var Jn=Math.sqrt(Math.pow(Mt-ft,2)+Math.pow(Lt-kt,2));qn+=t.standoff*(ft-Mt)/Jn,ri+=t.standoff*(kt-Lt)/Jn}var Ii=rn.append("path").classed("annotation-arrow",!0).classed("anndrag",!0).classed("cursor-move",!0).attr({d:"M3,3H-3V-3H3ZM0,0L"+(ft-qn)+","+(kt-ri),transform:FU(qn,ri)}).style("stroke-width",Qt+6+"px").call(u2.stroke,"rgba(0,0,0,0)").call(u2.fill,"rgba(0,0,0,0)"),Vi,ra;pA.init({element:Ii.node(),gd:e,prepFn:function(){var ha=sg.getTranslate(A);Vi=ha.x,ra=ha.y,a&&a.autorange&&v(a._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0)},moveFn:function(ha,va){var Xi=Nr(Vi,ra),oa=Xi[0]+ha,Ma=Xi[1]+va;A.call(sg.setTranslate,oa,Ma),g("x",qm(a,ha,"x",s,t)),g("y",qm(i,va,"y",s,t)),t.axref===t.xref&&g("ax",qm(a,ha,"ax",s,t)),t.ayref===t.yref&&g("ay",qm(i,va,"ay",s,t)),rn.attr("transform",FU(ha,va)),k.attr({transform:"rotate("+y+","+oa+","+Ma+")"})},doneFn:function(){PU.call("_guiRelayout",e,p());var ha=document.querySelector(".js-notes-box-panel");ha&&ha.redraw(ha.selectedObj)}})}}};if(t.showarrow&&cr(0,0),S){var Ct;pA.init({element:A.node(),gd:e,prepFn:function(){Ct=k.attr("transform")},moveFn:function(wt,Tt){var Mt="pointer";if(t.showarrow)t.axref===t.xref?g("ax",qm(a,wt,"ax",s,t)):g("ax",t.ax+wt),t.ayref===t.yref?g("ay",qm(i,Tt,"ay",s.w,t)):g("ay",t.ay+Tt),cr(wt,Tt);else{if(n)return;var Lt,ft;if(a)Lt=qm(a,wt,"x",s,t);else{var kt=t._xsize/s.w,rr=t.x+(t._xshift-t.xshift)/s.w-kt/2;Lt=pA.align(rr+wt/s.w,kt,0,1,t.xanchor)}if(i)ft=qm(i,Tt,"y",s,t);else{var pr=t._ysize/s.h,Kr=t.y-(t._yshift+t.yshift)/s.h-pr/2;ft=pA.align(Kr-Tt/s.h,pr,0,1,t.yanchor)}g("x",Lt),g("y",ft),(!a||!i)&&(Mt=pA.getCursor(a?.5:Lt,i?.5:ft,t.xanchor,t.yanchor))}k.attr({transform:FU(wt,Tt)+Ct}),RU(A,Mt)},clickFn:function(wt,Tt){t.captureevents&&e.emit("plotly_clickannotation",w(Tt))},doneFn:function(){RU(A),PU.call("_guiRelayout",e,p());var wt=document.querySelector(".js-notes-box-panel");wt&&wt.redraw(wt.selectedObj)}})}}l.annotationText?V.call(DU.makeEditable,{delegate:A,gd:e}).call(j).on("edit",function(U){t.text=U,this.call(j),g("text",U),a&&a.autorange&&v(a._name+".autorange",!0),i&&i.autorange&&v(i._name+".autorange",!0),PU.call("_guiRelayout",e,p())}):V.call(j)}});var Wge=fe((gpr,jge)=>{"use strict";var Uge=Xt(),bwt=bi(),Vge=Mo().arrayEditor;jge.exports={hasClickToShow:wwt,onClick:Twt};function wwt(e,t){var r=Hge(e,t);return r.on.length>0||r.explicitOff.length>0}function Twt(e,t){var r=Hge(e,t),n=r.on,a=r.off.concat(r.explicitOff),i={},o=e._fullLayout.annotations,s,l;if(n.length||a.length){for(s=0;s{"use strict";var IU=Xt(),w3=ni();Yge.exports=function(t,r,n,a){a("opacity");var i=a("bgcolor"),o=a("bordercolor"),s=w3.opacity(o);a("borderpad");var l=a("borderwidth"),u=a("showarrow");a("text",u?" ":n._dfltTitle.annotation),a("textangle"),IU.coerceFont(a,"font",n.font),a("width"),a("align");var c=a("height");if(c&&a("valign"),u){var f=a("arrowside"),v,g;f.indexOf("end")!==-1&&(v=a("arrowhead"),g=a("arrowsize")),f.indexOf("start")!==-1&&(a("startarrowhead",v),a("startarrowsize",g)),a("arrowcolor",s?r.bordercolor:w3.defaultLine),a("arrowwidth",(s&&l||1)*2),a("standoff"),a("startstandoff")}var p=a("hovertext"),x=n.hoverlabel||{};if(p){var _=a("hoverlabel.bgcolor",x.bgcolor||(w3.opacity(i)?w3.rgb(i):w3.defaultLine)),y=a("hoverlabel.bordercolor",x.bordercolor||w3.contrast(_)),C=IU.extendFlat({},x.font);C.color||(C.color=y),IU.coerceFont(a,"hoverlabel.font",C)}a("captureevents",!!p)}});var Zge=fe((ypr,Xge)=>{"use strict";var qU=Xt(),c2=Yi(),Awt=Ah(),Mwt=zU(),Swt=Fm();Xge.exports=function(t,r){Awt(t,r,{name:"annotations",handleItemDefaults:Ewt})};function Ewt(e,t,r){function n(k,S){return qU.coerce(e,t,Swt,k,S)}var a=n("visible"),i=n("clicktoshow");if(a||i){Mwt(e,t,r,n);for(var o=t.showarrow,s=["x","y"],l=[-10,-30],u={_fullLayout:r},c=0;c<2;c++){var f=s[c],v=c2.coerceRef(e,t,u,f,"","paper");if(v!=="paper"){var g=c2.getFromId(u,v);g._annIndices.push(t._index)}if(c2.coercePosition(t,u,n,v,f,.5),o){var p="a"+f,x=c2.coerceRef(e,t,u,p,"pixel",["pixel","paper"]);x!=="pixel"&&x!==v&&(x=t[p]="pixel");var _=x==="pixel"?l[c]:.4;c2.coercePosition(t,u,n,x,p,_)}n(f+"anchor"),n(f+"shift")}if(qU.noneOrAll(e,t,["x","y"]),o&&qU.noneOrAll(e,t,["ax","ay"]),i){var y=n("xclick"),C=n("yclick");t._xclick=y===void 0?t.x:c2.cleanPosition(y,u,t.xref),t._yclick=C===void 0?t.y:c2.cleanPosition(C,u,t.yref)}}}});var Jge=fe((xpr,Kge)=>{"use strict";var BU=Xt(),f2=Yi(),kwt=AC().draw;Kge.exports=function(t){var r=t._fullLayout,n=BU.filterVisible(r.annotations);if(n.length&&t._fullData.length)return BU.syncOrAsync([kwt,Cwt],t)};function Cwt(e){var t=e._fullLayout;BU.filterVisible(t.annotations).forEach(function(r){var n=f2.getFromId(e,r.xref),a=f2.getFromId(e,r.yref),i=f2.getRefType(r.xref),o=f2.getRefType(r.yref);r._extremes={},i==="range"&&$ge(r,n),o==="range"&&$ge(r,a)})}function $ge(e,t){var r=t._id,n=r.charAt(0),a=e[n],i=e["a"+n],o=e[n+"ref"],s=e["a"+n+"ref"],l=e["_"+n+"padplus"],u=e["_"+n+"padminus"],c={x:1,y:-1}[n]*e[n+"shift"],f=3*e.arrowsize*e.arrowwidth||0,v=f+c,g=f-c,p=3*e.startarrowsize*e.arrowwidth||0,x=p+c,_=p-c,y;if(s===o){var C=f2.findExtremes(t,[t.r2c(a)],{ppadplus:v,ppadminus:g}),k=f2.findExtremes(t,[t.r2c(i)],{ppadplus:Math.max(l,x),ppadminus:Math.max(u,_)});y={min:[C.min[0],k.min[0]],max:[C.max[0],k.max[0]]}}else x=i?x+i:x,_=i?_-i:_,y=f2.findExtremes(t,[t.r2c(a)],{ppadplus:Math.max(l,v,x),ppadminus:Math.max(u,g,_)});e._extremes[r]=y}});var eme=fe((_pr,Qge)=>{"use strict";var Lwt=aa(),Pwt=rE();Qge.exports=function(t,r,n,a){r=r||{};var i=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(!(i||o))return;var s=t._fullLayout.annotations,l=r._id.charAt(0),u,c;function f(g){var p=u[g],x=null;i?x=Pwt(p,r.range):x=Math.pow(10,p),Lwt(x)||(x=null),a(c+g,x)}for(var v=0;v{"use strict";var OU=AC(),tme=Wge();rme.exports={moduleType:"component",name:"annotations",layoutAttributes:Fm(),supplyLayoutDefaults:Zge(),includeBasePlot:KT()("annotations"),calcAutorange:Jge(),draw:OU.draw,drawOne:OU.drawOne,drawRaw:OU.drawRaw,hasClickToShow:tme.hasClickToShow,onClick:tme.onClick,convertCoords:eme()}});var MC=fe((wpr,ime)=>{"use strict";var Ys=Fm(),Fwt=rl().overrideAll,Dwt=Mo().templatedArray;ime.exports=Fwt(Dwt("annotation",{visible:Ys.visible,x:{valType:"any"},y:{valType:"any"},z:{valType:"any"},ax:{valType:"number"},ay:{valType:"number"},xanchor:Ys.xanchor,xshift:Ys.xshift,yanchor:Ys.yanchor,yshift:Ys.yshift,text:Ys.text,textangle:Ys.textangle,font:Ys.font,width:Ys.width,height:Ys.height,opacity:Ys.opacity,align:Ys.align,valign:Ys.valign,bgcolor:Ys.bgcolor,bordercolor:Ys.bordercolor,borderpad:Ys.borderpad,borderwidth:Ys.borderwidth,showarrow:Ys.showarrow,arrowcolor:Ys.arrowcolor,arrowhead:Ys.arrowhead,startarrowhead:Ys.startarrowhead,arrowside:Ys.arrowside,arrowsize:Ys.arrowsize,startarrowsize:Ys.startarrowsize,arrowwidth:Ys.arrowwidth,standoff:Ys.standoff,startstandoff:Ys.startstandoff,hovertext:Ys.hovertext,hoverlabel:Ys.hoverlabel,captureevents:Ys.captureevents}),"calc","from-root")});var ome=fe((Tpr,ame)=>{"use strict";var NU=Xt(),Rwt=Yi(),Iwt=Ah(),zwt=zU(),qwt=MC();ame.exports=function(t,r,n){Iwt(t,r,{name:"annotations",handleItemDefaults:Bwt,fullLayout:n.fullLayout})};function Bwt(e,t,r,n){function a(s,l){return NU.coerce(e,t,qwt,s,l)}function i(s){var l=s+"axis",u={_fullLayout:{}};return u._fullLayout[l]=r[l],Rwt.coercePosition(t,u,a,s,s,.5)}var o=a("visible");o&&(zwt(e,t,n.fullLayout,a),i("x"),i("y"),i("z"),NU.noneOrAll(e,t,["x","y","z"]),t.xref="x",t.yref="y",t.zref="z",a("xanchor"),a("yanchor"),a("xshift"),a("yshift"),t.showarrow&&(t.axref="pixel",t.ayref="pixel",a("ax",-10),a("ay",-30),NU.noneOrAll(e,t,["ax","ay"])))}});var cme=fe((Apr,ume)=>{"use strict";var sme=Xt(),lme=Yi();ume.exports=function(t){for(var r=t.fullSceneLayout,n=r.annotations,a=0;a{"use strict";function UU(e,t){var r=[0,0,0,0],n,a;for(n=0;n<4;++n)for(a=0;a<4;++a)r[a]+=e[4*n+a]*t[n];return r}function Nwt(e,t){var r=UU(e.projection,UU(e.view,UU(e.model,[t[0],t[1],t[2],1])));return r}fme.exports=Nwt});var dme=fe((Spr,hme)=>{"use strict";var Uwt=AC().drawRaw,Vwt=VU(),Gwt=["x","y","z"];hme.exports=function(t){for(var r=t.fullSceneLayout,n=t.dataScale,a=r.annotations,i=0;i1){s=!0;break}}s?t.fullLayout._infolayer.select(".annotation-"+t.id+'[data-index="'+i+'"]').remove():(o._pdata=Vwt(t.glplot.cameraParams,[r.xaxis.r2l(o.x)*n[0],r.yaxis.r2l(o.y)*n[1],r.zaxis.r2l(o.z)*n[2]]),Uwt(t.graphDiv,o,i,t.id,o._xa,o._ya))}}});var gme=fe((Epr,pme)=>{"use strict";var Hwt=bi(),vme=Xt();pme.exports={moduleType:"component",name:"annotations3d",schema:{subplots:{scene:{annotations:MC()}}},layoutAttributes:MC(),handleDefaults:ome(),includeBasePlot:jwt,convert:cme(),draw:dme()};function jwt(e,t){var r=Hwt.subplotsRegistry.gl3d;if(r)for(var n=r.attrRegex,a=Object.keys(e),i=0;i{"use strict";var kpr=rc(),mme=Ds(),yme=Ol().line,Wwt=Uc().dash,dp=ta().extendFlat,Ywt=Mo().templatedArray,Cpr=ZT(),T3=Ho(),xme=Fm(),{shapeTexttemplateAttrs:Xwt,templatefallbackAttrs:Zwt}=Oo(),$wt=IE();_me.exports=Ywt("shape",{visible:dp({},T3.visible,{editType:"calc+arraydraw"}),showlegend:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},legend:dp({},T3.legend,{editType:"calc+arraydraw"}),legendgroup:dp({},T3.legendgroup,{editType:"calc+arraydraw"}),legendgrouptitle:{text:dp({},T3.legendgrouptitle.text,{editType:"calc+arraydraw"}),font:mme({editType:"calc+arraydraw"}),editType:"calc+arraydraw"},legendrank:dp({},T3.legendrank,{editType:"calc+arraydraw"}),legendwidth:dp({},T3.legendwidth,{editType:"calc+arraydraw"}),type:{valType:"enumerated",values:["circle","rect","path","line"],editType:"calc+arraydraw"},layer:{valType:"enumerated",values:["below","above","between"],dflt:"above",editType:"arraydraw"},xref:dp({},xme.xref,{arrayOk:!0}),xsizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},xanchor:{valType:"any",editType:"calc+arraydraw"},x0:{valType:"any",editType:"calc+arraydraw"},x1:{valType:"any",editType:"calc+arraydraw"},x0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},x1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},yref:dp({},xme.yref,{arrayOk:!0}),ysizemode:{valType:"enumerated",values:["scaled","pixel"],dflt:"scaled",editType:"calc+arraydraw"},yanchor:{valType:"any",editType:"calc+arraydraw"},y0:{valType:"any",editType:"calc+arraydraw"},y1:{valType:"any",editType:"calc+arraydraw"},y0shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},y1shift:{valType:"number",dflt:0,min:-1,max:1,editType:"calc"},path:{valType:"string",editType:"calc+arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},line:{color:dp({},yme.color,{editType:"arraydraw"}),width:dp({},yme.width,{editType:"calc+arraydraw"}),dash:dp({},Wwt,{editType:"arraydraw"}),editType:"calc+arraydraw"},fillcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"arraydraw"},fillrule:{valType:"enumerated",values:["evenodd","nonzero"],dflt:"evenodd",editType:"arraydraw"},editable:{valType:"boolean",dflt:!1,editType:"calc+arraydraw"},label:{text:{valType:"string",dflt:"",editType:"arraydraw"},texttemplate:Xwt({},{keys:Object.keys($wt)}),texttemplatefallback:Zwt({editType:"arraydraw"}),font:mme({editType:"calc+arraydraw",colorEditType:"arraydraw"}),textposition:{valType:"enumerated",values:["top left","top center","top right","middle left","middle center","middle right","bottom left","bottom center","bottom right","start","middle","end"],editType:"arraydraw"},textangle:{valType:"angle",dflt:"auto",editType:"calc+arraydraw"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"auto",editType:"calc+arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],editType:"calc+arraydraw"},padding:{valType:"number",dflt:3,min:0,editType:"arraydraw"},editType:"arraydraw"},editType:"arraydraw"})});var wme=fe((Ppr,bme)=>{"use strict";var A3=Xt(),D0=Yi(),Kwt=Ah(),Jwt=GU(),mA=Lm();bme.exports=function(t,r){Kwt(t,r,{name:"shapes",handleItemDefaults:e5t})};function Qwt(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}function e5t(e,t,r){function n(k,S){return A3.coerce(e,t,Jwt,k,S)}t._isShape=!0;var a=n("visible");if(!a)return;var i=n("showlegend");n("legend"),n("legendgroup"),i&&(n("legendwidth"),n("legendgrouptitle.text"),A3.coerceFont(n,"legendgrouptitle.font"),n("legendrank"));var o=n("path"),s=o?"path":"rect",l=n("type",s),u=l!=="path";u&&delete t.path,n("editable"),n("layer"),n("opacity"),n("fillcolor"),n("fillrule");var c=n("line.width");c&&(n("line.color"),n("line.dash"));var f=n("xsizemode"),v=n("ysizemode");let g=[.25,.75],p=[0,10];["x","y"].forEach(k=>{var S=k+"anchor",L=k==="x"?f:v,w={_fullLayout:r},A,T,m,F;let E=k+"ref",I=e[E];if(Array.isArray(I)&&I.length>0){let R=mA.countDefiningCoords(l,o,k);F=D0.coerceRefArray(e,t,w,k,void 0,"paper",R),t["_"+k+"refArray"]=!0}else F=D0.coerceRef(e,t,w,k,void 0,"paper");if(Array.isArray(F))F.forEach(function(R){D0.getRefType(R)==="range"&&(A=D0.getFromId(w,R),A&&A._shapeIndices.indexOf(t._index)===-1&&A._shapeIndices.push(t._index))}),u&&[0,1].forEach(function(R){let B=F[R];D0.getRefType(B)==="range"?(A=D0.getFromId(w,B),T=mA.shapePositionToRange(A),m=mA.rangeToShapePosition(A),(A.type==="category"||A.type==="multicategory")&&n(k+R+"shift")):T=m=A3.identity;let V=k+R,j=e[V];if(e[V]=T(e[V],!0),L==="pixel"?n(V,p[R]):D0.coercePosition(t,w,n,B,V,g[R]),t[V]=m(t[V]),e[V]=j,R===0&&L==="pixel"){let q=e[S];e[S]=T(e[S],!0),D0.coercePosition(t,w,n,B,S,.25),t[S]=m(t[S]),e[S]=q}});else{if(D0.getRefType(F)==="range"?(A=D0.getFromId(w,F),A._shapeIndices.push(t._index),m=mA.rangeToShapePosition(A),T=mA.shapePositionToRange(A),u&&(A.type==="category"||A.type==="multicategory")&&(n(k+"0shift"),n(k+"1shift"))):T=m=A3.identity,u){let B=k+"0",O=k+"1",V=e[B],j=e[O];e[B]=T(e[B],!0),e[O]=T(e[O],!0),L==="pixel"?(n(B,p[0]),n(O,p[1])):(D0.coercePosition(t,w,n,F,B,g[0]),D0.coercePosition(t,w,n,F,O,g[1])),t[B]=m(t[B]),t[O]=m(t[O]),e[B]=V,e[O]=j}if(L==="pixel"){let B=e[S];e[S]=T(e[S],!0),D0.coercePosition(t,w,n,F,S,.25),t[S]=m(t[S]),e[S]=B}}}),u&&A3.noneOrAll(e,t,["x0","x1","y0","y1"]);var x=l==="line",_,y;if(u&&(_=n("label.texttemplate"),n("label.texttemplatefallback")),_||(y=n("label.text")),y||_){n("label.textangle");var C=n("label.textposition",x?"middle":"middle center");n("label.xanchor"),n("label.yanchor",Qwt(x,C)),n("label.padding"),A3.coerceFont(n,"label.font",r.font)}}});var Mme=fe((Fpr,Ame)=>{"use strict";var t5t=ni(),Tme=Xt();function r5t(e,t){return e?"bottom":t.indexOf("top")!==-1?"top":t.indexOf("bottom")!==-1?"bottom":"middle"}Ame.exports=function(t,r,n){n("newshape.visible"),n("newshape.name"),n("newshape.showlegend"),n("newshape.legend"),n("newshape.legendwidth"),n("newshape.legendgroup"),n("newshape.legendgrouptitle.text"),Tme.coerceFont(n,"newshape.legendgrouptitle.font"),n("newshape.legendrank"),n("newshape.drawdirection"),n("newshape.layer"),n("newshape.fillcolor"),n("newshape.fillrule"),n("newshape.opacity");var a=n("newshape.line.width");if(a){var i=(t||{}).plot_bgcolor||"#FFF";n("newshape.line.color",t5t.contrast(i)),n("newshape.line.dash")}var o=t.dragmode==="drawline",s=n("newshape.label.text"),l=n("newshape.label.texttemplate");if(n("newshape.label.texttemplatefallback"),s||l){n("newshape.label.textangle");var u=n("newshape.label.textposition",o?"middle":"middle center");n("newshape.label.xanchor"),n("newshape.label.yanchor",r5t(o,u)),n("newshape.label.padding"),Tme.coerceFont(n,"newshape.label.font",r.font)}n("activeshape.fillcolor"),n("activeshape.opacity")}});var Fme=fe((Dpr,Pme)=>{"use strict";var HU=Xt(),yv=Yi(),l1=kT(),jU=Lm();Pme.exports=function(t){var r=t._fullLayout,n=HU.filterVisible(r.shapes);if(!(!n.length||!t._fullData.length))for(var a=0;a{o=yv.getFromId(t,f),i._extremes[o._id]=yv.findExtremes(o,v,Eme(i))})}else i.xref!=="paper"&&l!=="domain"&&(o=yv.getFromId(t,i.xref),s=Cme(o,i,l1.paramIsX),s&&(i._extremes[o._id]=yv.findExtremes(o,s,Eme(i))));if(u==="array"){let c=Sme(t,i,"y");Object.entries(c).forEach(([f,v])=>{o=yv.getFromId(t,f),i._extremes[o._id]=yv.findExtremes(o,v,kme(i))})}else i.yref!=="paper"&&u!=="domain"&&(o=yv.getFromId(t,i.yref),s=Cme(o,i,l1.paramIsY),s&&(i._extremes[o._id]=yv.findExtremes(o,s,kme(i))))}};function Sme(e,t,r){let n=t[r+"ref"],a=r==="x"?l1.paramIsX:l1.paramIsY;function i(f,v){f==="paper"||yv.getRefType(f)==="domain"||(o[f]||(o[f]=[]),o[f].push(v))}let o={};if(t.type==="path"&&t.path){let f=t.path.match(l1.segmentRE)||[];for(var s=0,l=0;lp&&(i(n[s],x[p]),s++)}}else i(n[0],t[r+"0"]),i(n[1],t[r+"1"]);let u={};for(let f in o){let v=yv.getFromId(e,f);if(v){var c=v.type==="category"||v.type==="multicategory"?v.r2c:v.d2c;v.type==="date"&&(c=jU.decodeDate(c)),u[v._id]=o[f].map(c)}}return u}function Eme(e){return Lme(e.line.width,e.xsizemode,e.x0,e.x1,e.path,!1)}function kme(e){return Lme(e.line.width,e.ysizemode,e.y0,e.y1,e.path,!0)}function Lme(e,t,r,n,a,i){var o=e/2,s=i;if(t==="pixel"){var l=a?jU.extractPathCoords(a,i?l1.paramIsY:l1.paramIsX):[r,n],u=HU.aggNums(Math.max,null,l),c=HU.aggNums(Math.min,null,l),f=c<0?Math.abs(c)+o:o,v=u>0?u+o:o;return{ppad:o,ppadplus:s?f:v,ppadminus:s?v:f}}else return{ppad:o}}function Cme(e,t,r){var n=e._id.charAt(0)==="x"?"x":"y",a=e.type==="category"||e.type==="multicategory",i,o,s=0,l=0,u=a?e.r2c:e.d2c,c=t[n+"sizemode"]==="scaled";if(c?(i=t[n+"0"],o=t[n+"1"],a&&(s=t[n+"0shift"],l=t[n+"1shift"])):(i=t[n+"anchor"],o=t[n+"anchor"]),i!==void 0)return[u(i)+s,u(o)+l];if(t.path){var f=1/0,v=-1/0,g=t.path.match(l1.segmentRE),p,x,_,y,C;for(e.type==="date"&&(u=jU.decodeDate(u)),p=0;pv&&(v=C)));if(v>=f)return[f,v]}}});var Ime=fe((Rpr,Rme)=>{"use strict";var Dme=d8();Rme.exports={moduleType:"component",name:"shapes",layoutAttributes:GU(),supplyLayoutDefaults:wme(),supplyDrawNewShapeDefaults:Mme(),includeBasePlot:KT()("shapes"),calcAutorange:Fme(),draw:Dme.draw,drawOne:Dme.drawOne}});var WU=fe((zpr,qme)=>{"use strict";var zme=rc(),n5t=Mo().templatedArray,Ipr=ZT();qme.exports=n5t("image",{visible:{valType:"boolean",dflt:!0,editType:"arraydraw"},source:{valType:"string",editType:"arraydraw"},layer:{valType:"enumerated",values:["below","above"],dflt:"above",editType:"arraydraw"},sizex:{valType:"number",dflt:0,editType:"arraydraw"},sizey:{valType:"number",dflt:0,editType:"arraydraw"},sizing:{valType:"enumerated",values:["fill","contain","stretch"],dflt:"contain",editType:"arraydraw"},opacity:{valType:"number",min:0,max:1,dflt:1,editType:"arraydraw"},x:{valType:"any",dflt:0,editType:"arraydraw"},y:{valType:"any",dflt:0,editType:"arraydraw"},xanchor:{valType:"enumerated",values:["left","center","right"],dflt:"left",editType:"arraydraw"},yanchor:{valType:"enumerated",values:["top","middle","bottom"],dflt:"top",editType:"arraydraw"},xref:{valType:"enumerated",values:["paper",zme.idRegex.x.toString()],dflt:"paper",editType:"arraydraw"},yref:{valType:"enumerated",values:["paper",zme.idRegex.y.toString()],dflt:"paper",editType:"arraydraw"},editType:"arraydraw"})});var Ome=fe((qpr,Bme)=>{"use strict";var i5t=Xt(),YU=Yi(),a5t=Ah(),o5t=WU(),s5t="images";Bme.exports=function(t,r){var n={name:s5t,handleItemDefaults:l5t};a5t(t,r,n)};function l5t(e,t,r){function n(v,g){return i5t.coerce(e,t,o5t,v,g)}var a=n("source"),i=n("visible",!!a);if(!i)return t;n("layer"),n("xanchor"),n("yanchor"),n("sizex"),n("sizey"),n("sizing"),n("opacity");for(var o={_fullLayout:r},s=["x","y"],l=0;l<2;l++){var u=s[l],c=YU.coerceRef(e,t,o,u,"paper",void 0);if(c!=="paper"){var f=YU.getFromId(o,c);f._imgIndices.push(t._index)}YU.coercePosition(t,o,n,c,u,0)}return t}});var Gme=fe((Bpr,Vme)=>{"use strict";var Nme=xi(),u5t=ea(),M3=Yi(),Ume=El(),c5t=Q0();Vme.exports=function(t){var r=t._fullLayout,n=[],a={},i=[],o,s;for(s=0;s{"use strict";var Hme=aa(),f5t=rE();jme.exports=function(t,r,n,a){r=r||{};var i=n==="log"&&r.type==="linear",o=n==="linear"&&r.type==="log";if(i||o){for(var s=t._fullLayout.images,l=r._id.charAt(0),u,c,f=0;f{"use strict";Yme.exports={moduleType:"component",name:"images",layoutAttributes:WU(),supplyLayoutDefaults:Ome(),includeBasePlot:KT()("images"),draw:Gme(),convertCoords:Wme()}});var SC=fe((Upr,Zme)=>{"use strict";Zme.exports={name:"updatemenus",containerClassName:"updatemenu-container",headerGroupClassName:"updatemenu-header-group",headerClassName:"updatemenu-header",headerArrowClassName:"updatemenu-header-arrow",dropdownButtonGroupClassName:"updatemenu-dropdown-button-group",dropdownButtonClassName:"updatemenu-dropdown-button",buttonClassName:"updatemenu-button",itemRectClassName:"updatemenu-item-rect",itemTextClassName:"updatemenu-item-text",menuIndexAttrName:"updatemenu-active-index",autoMarginIdRoot:"updatemenu-",blankHeaderOpts:{label:" "},minWidth:30,minHeight:30,textPadX:24,arrowPadX:16,rx:2,ry:2,textOffsetX:12,textOffsetY:3,arrowOffsetX:4,gapButtonHeader:5,gapButton:2,activeColor:"#F4FAFF",hoverColor:"#F4FAFF",arrowSymbol:{left:"\u25C4",right:"\u25BA",up:"\u25B2",down:"\u25BC"}}});var XU=fe((Vpr,Kme)=>{"use strict";var h5t=Ds(),d5t=tc(),v5t=ta().extendFlat,p5t=rl().overrideAll,g5t=zE(),$me=Mo().templatedArray,m5t=$me("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}});Kme.exports=p5t($me("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:m5t,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:v5t(g5t({editType:"arraydraw"}),{}),font:h5t({}),bgcolor:{valType:"color"},bordercolor:{valType:"color",dflt:d5t.borderLine},borderwidth:{valType:"number",min:0,dflt:1,editType:"arraydraw"}}),"arraydraw","from-root")});var tye=fe((Gpr,eye)=>{"use strict";var EC=Xt(),Jme=Ah(),Qme=XU(),y5t=SC(),x5t=y5t.name,_5t=Qme.buttons;eye.exports=function(t,r){var n={name:x5t,handleItemDefaults:b5t};Jme(t,r,n)};function b5t(e,t,r){function n(o,s){return EC.coerce(e,t,Qme,o,s)}var a=Jme(e,t,{name:"buttons",handleItemDefaults:w5t}),i=n("visible",a.length>0);i&&(n("active"),n("direction"),n("type"),n("showactive"),n("x"),n("y"),EC.noneOrAll(e,t,["x","y"]),n("xanchor"),n("yanchor"),n("pad.t"),n("pad.r"),n("pad.b"),n("pad.l"),EC.coerceFont(n,"font",r.font),n("bgcolor",r.paper_bgcolor),n("bordercolor"),n("borderwidth"))}function w5t(e,t){function r(a,i){return EC.coerce(e,t,_5t,a,i)}var n=r("visible",e.method==="skip"||Array.isArray(e.args));n&&(r("method"),r("args"),r("args2"),r("label"),r("execute"))}});var iye=fe((Hpr,nye)=>{"use strict";nye.exports=Nl;var vp=xi(),rye=ni(),S3=ea(),kC=Xt();function Nl(e,t,r){this.gd=e,this.container=t,this.id=r,this.position=null,this.translateX=null,this.translateY=null,this.hbar=null,this.vbar=null,this.bg=this.container.selectAll("rect.scrollbox-bg").data([0]),this.bg.exit().on(".drag",null).on("wheel",null).remove(),this.bg.enter().append("rect").classed("scrollbox-bg",!0).style("pointer-events","all").attr({opacity:0,x:0,y:0,width:0,height:0})}Nl.barWidth=2;Nl.barLength=20;Nl.barRadius=2;Nl.barPad=1;Nl.barColor="#808BA4";Nl.prototype.enable=function(t,r,n){var a=this.gd._fullLayout,i=a.width,o=a.height;this.position=t;var s=this.position.l,l=this.position.w,u=this.position.t,c=this.position.h,f=this.position.direction,v=f==="down",g=f==="left",p=f==="right",x=f==="up",_=l,y=c,C,k,S,L;!v&&!g&&!p&&!x&&(this.position.direction="down",v=!0);var w=v||x;w?(C=s,k=C+_,v?(S=u,L=Math.min(S+y,o),y=L-S):(L=u+y,S=Math.max(L-y,0),y=L-S)):(S=u,L=S+y,g?(k=s+_,C=Math.max(k-_,0),_=k-C):(C=s,k=Math.min(C+_,i),_=k-C)),this._box={l:C,t:S,w:_,h:y};var A=l>_,T=Nl.barLength+2*Nl.barPad,m=Nl.barWidth+2*Nl.barPad,F=s,E=u+c;E+m>o&&(E=o-m);var I=this.container.selectAll("rect.scrollbar-horizontal").data(A?[0]:[]);I.exit().on(".drag",null).remove(),I.enter().append("rect").classed("scrollbar-horizontal",!0).call(rye.fill,Nl.barColor),A?(this.hbar=I.attr({rx:Nl.barRadius,ry:Nl.barRadius,x:F,y:E,width:T,height:m}),this._hbarXMin=F+T/2,this._hbarTranslateMax=_-T):(delete this.hbar,delete this._hbarXMin,delete this._hbarTranslateMax);var R=c>y,B=Nl.barWidth+2*Nl.barPad,O=Nl.barLength+2*Nl.barPad,V=s+l,j=u;V+B>i&&(V=i-B);var q=this.container.selectAll("rect.scrollbar-vertical").data(R?[0]:[]);q.exit().on(".drag",null).remove(),q.enter().append("rect").classed("scrollbar-vertical",!0).call(rye.fill,Nl.barColor),R?(this.vbar=q.attr({rx:Nl.barRadius,ry:Nl.barRadius,x:V,y:j,width:B,height:O}),this._vbarYMin=j+O/2,this._vbarTranslateMax=y-O):(delete this.vbar,delete this._vbarYMin,delete this._vbarTranslateMax);var U=this.id,J=C-.5,ee=R?k+B+.5:k+.5,ce=S-.5,ye=A?L+m+.5:L+.5,xe=a._topdefs.selectAll("#"+U).data(A||R?[0]:[]);if(xe.exit().remove(),xe.enter().append("clipPath").attr("id",U).append("rect"),A||R?(this._clipRect=xe.select("rect").attr({x:Math.floor(J),y:Math.floor(ce),width:Math.ceil(ee)-Math.floor(J),height:Math.ceil(ye)-Math.floor(ce)}),this.container.call(S3.setClipUrl,U,this.gd),this.bg.attr({x:s,y:u,width:l,height:c})):(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S3.setClipUrl,null),delete this._clipRect),A||R){var ue=vp.behavior.drag().on("dragstart",function(){vp.event.sourceEvent.preventDefault()}).on("drag",this._onBoxDrag.bind(this));this.container.on("wheel",null).on("wheel",this._onBoxWheel.bind(this)).on(".drag",null).call(ue);var K=vp.behavior.drag().on("dragstart",function(){vp.event.sourceEvent.preventDefault(),vp.event.sourceEvent.stopPropagation()}).on("drag",this._onBarDrag.bind(this));A&&this.hbar.on(".drag",null).call(K),R&&this.vbar.on(".drag",null).call(K)}this.setTranslate(r,n)};Nl.prototype.disable=function(){(this.hbar||this.vbar)&&(this.bg.attr({width:0,height:0}),this.container.on("wheel",null).on(".drag",null).call(S3.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)};Nl.prototype._onBoxDrag=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t-=vp.event.dx),this.vbar&&(r-=vp.event.dy),this.setTranslate(t,r)};Nl.prototype._onBoxWheel=function(){var t=this.translateX,r=this.translateY;this.hbar&&(t+=vp.event.deltaY),this.vbar&&(r+=vp.event.deltaY),this.setTranslate(t,r)};Nl.prototype._onBarDrag=function(){var t=this.translateX,r=this.translateY;if(this.hbar){var n=t+this._hbarXMin,a=n+this._hbarTranslateMax,i=kC.constrain(vp.event.x,n,a),o=(i-n)/(a-n),s=this.position.w-this._box.w;t=o*s}if(this.vbar){var l=r+this._vbarYMin,u=l+this._vbarTranslateMax,c=kC.constrain(vp.event.y,l,u),f=(c-l)/(u-l),v=this.position.h-this._box.h;r=f*v}this.setTranslate(t,r)};Nl.prototype.setTranslate=function(t,r){var n=this.position.w-this._box.w,a=this.position.h-this._box.h;if(t=kC.constrain(t||0,0,n),r=kC.constrain(r||0,0,a),this.translateX=t,this.translateY=r,this.container.call(S3.setTranslate,this._box.l-this.position.l-t,this._box.t-this.position.t-r),this._clipRect&&this._clipRect.attr({x:Math.floor(this.position.l+t-.5),y:Math.floor(this.position.t+r-.5)}),this.hbar){var i=t/n;this.hbar.call(S3.setTranslate,t+i*this._hbarTranslateMax,r)}if(this.vbar){var o=r/a;this.vbar.call(S3.setTranslate,t,r+o*this._vbarTranslateMax)}}});var vye=fe((jpr,dye)=>{"use strict";var E3=xi(),yA=Hs(),xA=ni(),k3=ea(),R0=Xt(),CC=as(),T5t=Mo().arrayEditor,oye=nc().LINE_SPACING,ba=SC(),A5t=iye();dye.exports=function(t){var r=t._fullLayout,n=R0.filterVisible(r[ba.name]);function a(v){yA.autoMargin(t,fye(v))}var i=r._menulayer.selectAll("g."+ba.containerClassName).data(n.length>0?[0]:[]);if(i.enter().append("g").classed(ba.containerClassName,!0).style("cursor","pointer"),i.exit().each(function(){E3.select(this).selectAll("g."+ba.headerGroupClassName).each(a)}).remove(),n.length!==0){var o=i.selectAll("g."+ba.headerGroupClassName).data(n,M5t);o.enter().append("g").classed(ba.headerGroupClassName,!0);for(var s=R0.ensureSingle(i,"g",ba.dropdownButtonGroupClassName,function(v){v.style("pointer-events","all")}),l=0;l{"use strict";var F5t=SC();pye.exports={moduleType:"component",name:F5t.name,layoutAttributes:XU(),supplyLayoutDefaults:tye(),draw:vye()}});var bA=fe((Ypr,mye)=>{"use strict";mye.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}});var JU=fe((Xpr,_ye)=>{"use strict";var yye=Ds(),D5t=zE(),R5t=ta().extendDeepAll,I5t=rl().overrideAll,z5t=Z4(),xye=Mo().templatedArray,h2=bA(),q5t=xye("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}});_ye.exports=I5t(xye("slider",{visible:{valType:"boolean",dflt:!0},active:{valType:"number",min:0,dflt:0},steps:q5t,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:R5t(D5t({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:z5t.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:yye({})},font:yye({}),activebgcolor:{valType:"color",dflt:h2.gripBgActiveColor},bgcolor:{valType:"color",dflt:h2.railBgColor},bordercolor:{valType:"color",dflt:h2.railBorderColor},borderwidth:{valType:"number",min:0,dflt:h2.railBorderWidth},ticklen:{valType:"number",min:0,dflt:h2.tickLength},tickcolor:{valType:"color",dflt:h2.tickColor},tickwidth:{valType:"number",min:0,dflt:1},minorticklen:{valType:"number",min:0,dflt:h2.minorTickLength}}),"arraydraw","from-root")});var Aye=fe((Zpr,Tye)=>{"use strict";var C3=Xt(),bye=Ah(),wye=JU(),B5t=bA(),O5t=B5t.name,N5t=wye.steps;Tye.exports=function(t,r){bye(t,r,{name:O5t,handleItemDefaults:U5t})};function U5t(e,t,r){function n(f,v){return C3.coerce(e,t,wye,f,v)}for(var a=bye(e,t,{name:"steps",handleItemDefaults:V5t}),i=0,o=0;o{"use strict";var pp=xi(),LC=Hs(),Om=ni(),gp=ea(),I0=Xt(),G5t=I0.strTranslate,wA=as(),H5t=Mo().arrayEditor,Xa=bA(),tV=nc(),Eye=tV.LINE_SPACING,QU=tV.FROM_TL,eV=tV.FROM_BR;Dye.exports=function(t){var r=t._context.staticPlot,n=t._fullLayout,a=j5t(n,t),i=n._infolayer.selectAll("g."+Xa.containerClassName).data(a.length>0?[0]:[]);i.enter().append("g").classed(Xa.containerClassName,!0).style("cursor",r?null:"ew-resize");function o(c){c._commandObserver&&(c._commandObserver.remove(),delete c._commandObserver),LC.autoMargin(t,kye(c))}if(i.exit().each(function(){pp.select(this).selectAll("g."+Xa.groupClassName).each(o)}).remove(),a.length!==0){var s=i.selectAll("g."+Xa.groupClassName).data(a,W5t);s.enter().append("g").classed(Xa.groupClassName,!0),s.exit().each(o).remove();for(var l=0;l0&&(s=s.transition().duration(t.transition.duration).ease(t.transition.easing)),s.attr("transform",G5t(o-Xa.gripWidth*.5,t._dims.currentValueTotalHeight))}}function rV(e,t){var r=e._dims;return r.inputAreaStart+Xa.stepInset+(r.inputAreaLength-2*Xa.stepInset)*Math.min(1,Math.max(0,t))}function Sye(e,t){var r=e._dims;return Math.min(1,Math.max(0,(t-Xa.stepInset-r.inputAreaStart)/(r.inputAreaLength-2*Xa.stepInset-2*r.inputAreaStart)))}function Q5t(e,t,r){var n=r._dims,a=I0.ensureSingle(e,"rect",Xa.railTouchRectClass,function(i){i.call(Pye,t,e,r).style("pointer-events","all")});a.attr({width:n.inputAreaLength,height:Math.max(n.inputAreaWidth,Xa.tickOffset+r.ticklen+n.labelHeight)}).call(Om.fill,r.bgcolor).attr("opacity",0),gp.setTranslate(a,0,n.currentValueTotalHeight)}function e4t(e,t){var r=t._dims,n=r.inputAreaLength-Xa.railInset*2,a=I0.ensureSingle(e,"rect",Xa.railRectClass);a.attr({width:n,height:Xa.railWidth,rx:Xa.railRadius,ry:Xa.railRadius,"shape-rendering":"crispEdges"}).call(Om.stroke,t.bordercolor).call(Om.fill,t.bgcolor).style("stroke-width",t.borderwidth+"px"),gp.setTranslate(a,Xa.railInset,(r.inputAreaWidth-Xa.railWidth)*.5+r.currentValueTotalHeight)}});var zye=fe((Kpr,Iye)=>{"use strict";var t4t=bA();Iye.exports={moduleType:"component",name:t4t.name,layoutAttributes:JU(),supplyLayoutDefaults:Aye(),draw:Rye()}});var FC=fe((Jpr,Bye)=>{"use strict";var qye=tc();Bye.exports={bgcolor:{valType:"color",dflt:qye.background,editType:"plot"},bordercolor:{valType:"color",dflt:qye.defaultLine,editType:"plot"},borderwidth:{valType:"integer",dflt:0,min:0,editType:"plot"},autorange:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"range[0]":void 0,"range[1]":void 0}},range:{valType:"info_array",items:[{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"calc",impliedEdits:{"^autorange":!1}}],editType:"calc",impliedEdits:{autorange:!1}},thickness:{valType:"number",dflt:.15,min:0,max:1,editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"}});var nV=fe((Qpr,Oye)=>{"use strict";Oye.exports={_isSubplotObj:!0,rangemode:{valType:"enumerated",values:["auto","fixed","match"],dflt:"match",editType:"calc"},range:{valType:"info_array",items:[{valType:"any",editType:"plot"},{valType:"any",editType:"plot"}],editType:"plot"},editType:"calc"}});var DC=fe((e1r,Nye)=>{"use strict";Nye.exports={name:"rangeslider",containerClassName:"rangeslider-container",bgClassName:"rangeslider-bg",rangePlotClassName:"rangeslider-rangeplot",maskMinClassName:"rangeslider-mask-min",maskMaxClassName:"rangeslider-mask-max",slideBoxClassName:"rangeslider-slidebox",grabberMinClassName:"rangeslider-grabber-min",grabAreaMinClassName:"rangeslider-grabarea-min",handleMinClassName:"rangeslider-handle-min",grabberMaxClassName:"rangeslider-grabber-max",grabAreaMaxClassName:"rangeslider-grabarea-max",handleMaxClassName:"rangeslider-handle-max",maskMinOppAxisClassName:"rangeslider-mask-min-opp-axis",maskMaxOppAxisClassName:"rangeslider-mask-max-opp-axis",maskColor:"rgba(0,0,0,0.4)",maskOppAxisColor:"rgba(0,0,0,0.2)",slideBoxFill:"transparent",slideBoxCursor:"ew-resize",grabAreaFill:"transparent",grabAreaCursor:"col-resize",grabAreaWidth:10,handleWidth:4,handleRadius:1,handleStrokeWidth:1,extraPad:15}});var Gye=fe(IC=>{"use strict";var r4t=El(),n4t=as(),Uye=DC(),i4t=nc().LINE_SPACING,RC=Uye.name;function Vye(e){var t=e&&e[RC];return t&&t.visible}IC.isVisible=Vye;IC.makeData=function(e){for(var t=r4t.list({_fullLayout:e},"x",!0),r=e.margin,n=[],a=0;a{"use strict";var zC=Xt(),Hye=Mo(),jye=El(),a4t=FC(),o4t=nV();Wye.exports=function(t,r,n){var a=t[n],i=r[n];if(!(a.rangeslider||r._requestRangeslider[i._id]))return;zC.isPlainObject(a.rangeslider)||(a.rangeslider={});var o=a.rangeslider,s=Hye.newContainer(i,"rangeslider");function l(L,w){return zC.coerce(o,s,a4t,L,w)}var u,c;function f(L,w){return zC.coerce(u,c,o4t,L,w)}var v=l("visible");if(v){l("bgcolor",r.plot_bgcolor),l("bordercolor"),l("borderwidth"),l("thickness"),l("autorange",!i.isValidRange(o.range)),l("range");var g=r._subplots;if(g)for(var p=g.cartesian.filter(function(L){return L.slice(0,Math.max(0,L.indexOf("y")))===jye.name2id(n)}).map(function(L){return L.slice(L.indexOf("y"),L.length)}),x=zC.simpleMap(p,jye.id2name),_=0;_{"use strict";var s4t=El().list,l4t=rp().getAutoRange,u4t=DC();Xye.exports=function(t){for(var r=s4t(t,"x",!0),n=0;n{"use strict";var qC=xi(),c4t=bi(),f4t=Hs(),mu=Xt(),BC=mu.strTranslate,Kye=ea(),Nm=ni(),h4t=qx(),d4t=gu(),iV=El(),v4t=ed(),p4t=np(),fo=DC();Jye.exports=function(e){for(var t=e._fullLayout,r=t._rangeSliderData,n=0;n=q.max)V=E[j+1];else if(O=q.pmax)V=E[j+1];else if(O0?e.touches[0].clientX:0}function g4t(e,t,r,n){if(t._context.staticPlot)return;var a=e.select("rect."+fo.slideBoxClassName).node(),i=e.select("rect."+fo.grabAreaMinClassName).node(),o=e.select("rect."+fo.grabAreaMaxClassName).node();function s(){var l=qC.event,u=l.target,c=$ye(l),f=c-e.node().getBoundingClientRect().left,v=n.d2p(r._rl[0]),g=n.d2p(r._rl[1]),p=v4t.coverSlip();this.addEventListener("touchmove",x),this.addEventListener("touchend",_),p.addEventListener("mousemove",x),p.addEventListener("mouseup",_);function x(y){var C=$ye(y),k=+C-c,S,L,w;switch(u){case a:if(w="ew-resize",v+k>r._length||g+k<0)return;S=v+k,L=g+k;break;case i:if(w="col-resize",v+k>r._length)return;S=v+k,L=g;break;case o:if(w="col-resize",g+k<0)return;S=v,L=g+k;break;default:w="ew-resize",S=f,L=f+k;break}if(L{"use strict";var S4t=Xt(),E4t=FC(),k4t=nV(),aV=Gye();exe.exports={moduleType:"component",name:"rangeslider",schema:{subplots:{xaxis:{rangeslider:S4t.extendFlat({},E4t,{yaxis:k4t})}}},layoutAttributes:FC(),handleDefaults:Yye(),calcAutorange:Zye(),draw:Qye(),isVisible:aV.isVisible,makeData:aV.makeData,autoMarginOpts:aV.autoMarginOpts}});var OC=fe((o1r,nxe)=>{"use strict";var C4t=Ds(),rxe=tc(),L4t=Mo().templatedArray,P4t=L4t("button",{visible:{valType:"boolean",dflt:!0,editType:"plot"},step:{valType:"enumerated",values:["month","year","day","hour","minute","second","all"],dflt:"month",editType:"plot"},stepmode:{valType:"enumerated",values:["backward","todate"],dflt:"backward",editType:"plot"},count:{valType:"number",min:0,dflt:1,editType:"plot"},label:{valType:"string",editType:"plot"},editType:"plot"});nxe.exports={visible:{valType:"boolean",editType:"plot"},buttons:P4t,x:{valType:"number",min:-2,max:3,editType:"plot"},xanchor:{valType:"enumerated",values:["auto","left","center","right"],dflt:"left",editType:"plot"},y:{valType:"number",min:-2,max:3,editType:"plot"},yanchor:{valType:"enumerated",values:["auto","top","middle","bottom"],dflt:"bottom",editType:"plot"},font:C4t({editType:"plot"}),bgcolor:{valType:"color",dflt:rxe.lightLine,editType:"plot"},activecolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:rxe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"plot"}});var oV=fe((s1r,ixe)=>{"use strict";ixe.exports={yPad:.02,minButtonWidth:30,rx:3,ry:3,lightAmount:25,darkAmount:10}});var sxe=fe((l1r,oxe)=>{"use strict";var NC=Xt(),F4t=ni(),D4t=Mo(),R4t=Ah(),axe=OC(),sV=oV();oxe.exports=function(t,r,n,a,i){var o=t.rangeselector||{},s=D4t.newContainer(r,"rangeselector");function l(g,p){return NC.coerce(o,s,axe,g,p)}var u=R4t(o,s,{name:"buttons",handleItemDefaults:I4t,calendar:i}),c=l("visible",u.length>0);if(c){var f=z4t(r,n,a);l("x",f[0]),l("y",f[1]),NC.noneOrAll(t,r,["x","y"]),l("xanchor"),l("yanchor"),NC.coerceFont(l,"font",n.font);var v=l("bgcolor");l("activecolor",F4t.contrast(v,sV.lightAmount,sV.darkAmount)),l("bordercolor"),l("borderwidth")}};function I4t(e,t,r,n){var a=n.calendar;function i(l,u){return NC.coerce(e,t,axe.buttons,l,u)}var o=i("visible");if(o){var s=i("step");s!=="all"&&(a&&a!=="gregorian"&&(s==="month"||s==="year")?t.stepmode="backward":i("stepmode"),i("count")),i("label")}}function z4t(e,t,r){for(var n=r.filter(function(s){return t[s].anchor===e._id}),a=0,i=0;i{"use strict";var q4t=HI(),B4t=Xt().titleCase;lxe.exports=function(t,r){var n=t._name,a={};if(r.step==="all")a[n+".autorange"]=!0;else{var i=O4t(t,r);a[n+".range[0]"]=i[0],a[n+".range[1]"]=i[1]}return a};function O4t(e,t){var r=e.range,n=new Date(e.r2l(r[1])),a=t.step,i=q4t["utc"+B4t(a)],o=t.count,s;switch(t.stepmode){case"backward":s=e.l2r(+i.offset(n,-o));break;case"todate":var l=i.offset(n,-o);s=e.l2r(+i.ceil(l));break}var u=r[1];return[s,u]}});var mxe=fe((c1r,gxe)=>{"use strict";var VC=xi(),N4t=bi(),U4t=Hs(),cxe=ni(),pxe=ea(),lg=Xt(),fxe=lg.strTranslate,UC=as(),V4t=El(),cV=nc(),hxe=cV.LINE_SPACING,dxe=cV.FROM_TL,vxe=cV.FROM_BR,uV=oV(),G4t=uxe();gxe.exports=function(t){var r=t._fullLayout,n=r._infolayer.selectAll(".rangeselector").data(H4t(t),j4t);n.enter().append("g").classed("rangeselector",!0),n.exit().remove(),n.style({cursor:"pointer","pointer-events":"all"}),n.each(function(a){var i=VC.select(this),o=a,s=o.rangeselector,l=i.selectAll("g.button").data(lg.filterVisible(s.buttons));l.enter().append("g").classed("button",!0),l.exit().remove(),l.each(function(u){var c=VC.select(this),f=G4t(o,u);u._isActive=W4t(o,u,f),c.call(lV,s,u),c.call(X4t,s,u,t),c.on("click",function(){t._dragged||N4t.call("_guiRelayout",t,f)}),c.on("mouseover",function(){u._isHovered=!0,c.call(lV,s,u)}),c.on("mouseout",function(){u._isHovered=!1,c.call(lV,s,u)})}),$4t(t,l,s,o._name,i)})};function H4t(e){for(var t=V4t.list(e,"x",!0),r=[],n=0;n{"use strict";yxe.exports={moduleType:"component",name:"rangeselector",schema:{subplots:{xaxis:{rangeselector:OC()}}},layoutAttributes:OC(),handleDefaults:sxe(),draw:mxe()}});var nl=fe(fV=>{"use strict";var _xe=ta().extendFlat;fV.attributes=function(e,t){e=e||{},t=t||{};var r={valType:"info_array",editType:e.editType,items:[{valType:"number",min:0,max:1,editType:e.editType},{valType:"number",min:0,max:1,editType:e.editType}],dflt:[0,1]},n=e.name?e.name+" ":"",a=e.trace?"trace":"subplot",i=t.description?" "+t.description:"",o={x:_xe({},r,{}),y:_xe({},r,{}),editType:e.editType};return e.noGridCell||(o.row={valType:"integer",min:0,dflt:0,editType:e.editType},o.column={valType:"integer",min:0,dflt:0,editType:e.editType}),o};fV.defaults=function(e,t,r,n){var a=n&&n.x||[0,1],i=n&&n.y||[0,1],o=t.grid;if(o){var s=r("domain.column");s!==void 0&&(s{"use strict";var K4t=Xt(),J4t=(Tb(),Gs(wb)).counter,Q4t=nl().attributes,bxe=rc().idRegex,eTt=Mo(),hV={rows:{valType:"integer",min:1,editType:"plot"},roworder:{valType:"enumerated",values:["top to bottom","bottom to top"],dflt:"top to bottom",editType:"plot"},columns:{valType:"integer",min:1,editType:"plot"},subplots:{valType:"info_array",freeLength:!0,dimensions:2,items:{valType:"enumerated",values:[J4t("xy").toString(),""],editType:"plot"},editType:"plot"},xaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[bxe.x.toString(),""],editType:"plot"},editType:"plot"},yaxes:{valType:"info_array",freeLength:!0,items:{valType:"enumerated",values:[bxe.y.toString(),""],editType:"plot"},editType:"plot"},pattern:{valType:"enumerated",values:["independent","coupled"],dflt:"coupled",editType:"plot"},xgap:{valType:"number",min:0,max:1,editType:"plot"},ygap:{valType:"number",min:0,max:1,editType:"plot"},domain:Q4t({name:"grid",editType:"plot",noGridCell:!0},{}),xside:{valType:"enumerated",values:["bottom","bottom plot","top plot","top"],dflt:"bottom plot",editType:"plot"},yside:{valType:"enumerated",values:["left","left plot","right plot","right"],dflt:"left plot",editType:"plot"},editType:"plot"};function GC(e,t,r){var n=t[r+"axes"],a=Object.keys((e._splomAxes||{})[r]||{});if(Array.isArray(n))return n;if(a.length)return a}function tTt(e,t){var r=e.grid||{},n=GC(t,r,"x"),a=GC(t,r,"y");if(!e.grid&&!n&&!a)return;var i=Array.isArray(r.subplots)&&Array.isArray(r.subplots[0]),o=Array.isArray(n),s=Array.isArray(a),l=o&&n!==r.xaxes&&s&&a!==r.yaxes,u,c;i?(u=r.subplots.length,c=r.subplots[0].length):(s&&(u=a.length),o&&(c=n.length));var f=eTt.newContainer(t,"grid");function v(w,A){return K4t.coerce(r,f,hV,w,A)}var g=v("rows",u),p=v("columns",c);if(!(g*p>1)){delete t.grid;return}if(!i&&!o&&!s){var x=v("pattern")==="independent";x&&(i=!0)}f._hasSubplotGrid=i;var _=v("roworder"),y=_==="top to bottom",C=i?.2:.1,k=i?.3:.1,S,L;l&&t._splomGridDflt&&(S=t._splomGridDflt.xside,L=t._splomGridDflt.yside),f._domains={x:wxe("x",v,C,S,p),y:wxe("y",v,k,L,g,y)}}function wxe(e,t,r,n,a,i){var o=t(e+"gap",r),s=t("domain."+e);t(e+"side",n);for(var l=new Array(a),u=s[0],c=(s[1]-u)/(a-o),f=c*(1-o),v=0;v{"use strict";Mxe.exports={visible:{valType:"boolean",editType:"calc"},type:{valType:"enumerated",values:["percent","constant","sqrt","data"],editType:"calc"},symmetric:{valType:"boolean",editType:"calc"},array:{valType:"data_array",editType:"calc"},arrayminus:{valType:"data_array",editType:"calc"},value:{valType:"number",min:0,dflt:10,editType:"calc"},valueminus:{valType:"number",min:0,dflt:10,editType:"calc"},traceref:{valType:"integer",min:0,dflt:0,editType:"style"},tracerefminus:{valType:"integer",min:0,dflt:0,editType:"style"},copy_ystyle:{valType:"boolean",editType:"plot"},copy_zstyle:{valType:"boolean",editType:"style"},color:{valType:"color",editType:"style"},thickness:{valType:"number",min:0,dflt:2,editType:"style"},width:{valType:"number",min:0,editType:"plot"},editType:"calc"}});var kxe=fe((p1r,Exe)=>{"use strict";var Sxe=aa(),nTt=bi(),iTt=Xt(),aTt=Mo(),oTt=vV();Exe.exports=function(e,t,r,n){var a="error_"+n.axis,i=aTt.newContainer(t,a),o=e[a]||{};function s(p,x){return iTt.coerce(o,i,oTt,p,x)}var l=o.array!==void 0||o.value!==void 0||o.type==="sqrt",u=s("visible",l);if(u!==!1){var c=s("type","array"in o?"data":"percent"),f=!0;c!=="sqrt"&&(f=s("symmetric",!((c==="data"?"arrayminus":"valueminus")in o))),c==="data"?(s("array"),s("traceref"),f||(s("arrayminus"),s("tracerefminus"))):(c==="percent"||c==="constant")&&(s("value"),f||s("valueminus"));var v="copy_"+n.inherit+"style";if(n.inherit){var g=t["error_"+n.inherit];(g||{}).visible&&s(v,!(o.color||Sxe(o.thickness)||Sxe(o.width)))}(!n.inherit||!i[v])&&(s("color",r),s("thickness"),s("width",nTt.traceIs(t,"gl3d")?0:4))}}});var pV=fe((g1r,Lxe)=>{"use strict";Lxe.exports=function(t){var r=t.type,n=t.symmetric;if(r==="data"){var a=t.array||[];if(n)return function(u,c){var f=+a[c];return[f,f]};var i=t.arrayminus||[];return function(u,c){var f=+a[c],v=+i[c];return!isNaN(f)||!isNaN(v)?[v||0,f||0]:[NaN,NaN]}}else{var o=Cxe(r,t.value),s=Cxe(r,t.valueminus);return n||t.valueminus===void 0?function(u){var c=o(u);return[c,c]}:function(u){return[s(u),o(u)]}}};function Cxe(e,t){if(e==="percent")return function(r){return Math.abs(r*t/100)};if(e==="constant")return function(){return Math.abs(t)};if(e==="sqrt")return function(r){return Math.sqrt(Math.abs(r))}}});var Dxe=fe((m1r,Fxe)=>{"use strict";var gV=aa(),sTt=bi(),mV=Yi(),lTt=Xt(),uTt=pV();Fxe.exports=function(t){for(var r=t.calcdata,n=0;n{"use strict";var Rxe=xi(),Um=aa(),cTt=ea(),fTt=Is();Ixe.exports=function(t,r,n,a){var i,o=n.xaxis,s=n.yaxis,l=a&&a.duration>0,u=t._context.staticPlot;r.each(function(c){var f=c[0].trace,v=f.error_x||{},g=f.error_y||{},p;f.ids&&(p=function(C){return C.id});var x=fTt.hasMarkers(f)&&f.marker.maxdisplayed>0;!g.visible&&!v.visible&&(c=[]);var _=Rxe.select(this).selectAll("g.errorbar").data(c,p);if(_.exit().remove(),!!c.length){v.visible||_.selectAll("path.xerror").remove(),g.visible||_.selectAll("path.yerror").remove(),_.style("opacity",1);var y=_.enter().append("g").classed("errorbar",!0);l&&y.style("opacity",0).transition().duration(a.duration).style("opacity",1),cTt.setClipUrl(_,n.layerClipId,t),_.each(function(C){var k=Rxe.select(this),S=hTt(C,o,s);if(!(x&&!C.vis)){var L,w=k.select("path.yerror");if(g.visible&&Um(S.x)&&Um(S.yh)&&Um(S.ys)){var A=g.width;L="M"+(S.x-A)+","+S.yh+"h"+2*A+"m-"+A+",0V"+S.ys,S.noYS||(L+="m-"+A+",0h"+2*A),i=!w.size(),i?w=k.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("yerror",!0):l&&(w=w.transition().duration(a.duration).ease(a.easing)),w.attr("d",L)}else w.remove();var T=k.select("path.xerror");if(v.visible&&Um(S.y)&&Um(S.xh)&&Um(S.xs)){var m=(v.copy_ystyle?g:v).width;L="M"+S.xh+","+(S.y-m)+"v"+2*m+"m0,-"+m+"H"+S.xs,S.noXS||(L+="m0,-"+m+"v"+2*m),i=!T.size(),i?T=k.append("path").style("vector-effect",u?"none":"non-scaling-stroke").classed("xerror",!0):l&&(T=T.transition().duration(a.duration).ease(a.easing)),T.attr("d",L)}else T.remove()}})}})};function hTt(e,t,r){var n={x:t.c2p(e.x),y:r.c2p(e.y)};return e.yh!==void 0&&(n.yh=r.c2p(e.yh),n.ys=r.c2p(e.ys),Um(n.ys)||(n.noYS=!0,n.ys=r.c2p(e.ys,!0))),e.xh!==void 0&&(n.xh=t.c2p(e.xh),n.xs=t.c2p(e.xs),Um(n.xs)||(n.noXS=!0,n.xs=t.c2p(e.xs,!0))),n}});var Oxe=fe((x1r,Bxe)=>{"use strict";var dTt=xi(),qxe=ni();Bxe.exports=function(t){t.each(function(r){var n=r[0].trace,a=n.error_y||{},i=n.error_x||{},o=dTt.select(this);o.selectAll("path.yerror").style("stroke-width",a.thickness+"px").call(qxe.stroke,a.color),i.copy_ystyle&&(i=a),o.selectAll("path.xerror").style("stroke-width",i.thickness+"px").call(qxe.stroke,i.color)})}});var Vxe=fe((_1r,Uxe)=>{"use strict";var TA=Xt(),Nxe=rl().overrideAll,AA=vV(),d2={error_x:TA.extendFlat({},AA),error_y:TA.extendFlat({},AA)};delete d2.error_x.copy_zstyle;delete d2.error_y.copy_zstyle;delete d2.error_y.copy_ystyle;var MA={error_x:TA.extendFlat({},AA),error_y:TA.extendFlat({},AA),error_z:TA.extendFlat({},AA)};delete MA.error_x.copy_ystyle;delete MA.error_y.copy_ystyle;delete MA.error_z.copy_ystyle;delete MA.error_z.copy_zstyle;Uxe.exports={moduleType:"component",name:"errorbars",schema:{traces:{scatter:d2,bar:d2,histogram:d2,scatter3d:Nxe(MA,"calc","nested"),scattergl:Nxe(d2,"calc","nested")}},supplyDefaults:kxe(),calc:Dxe(),makeComputeError:pV(),plot:zxe(),style:Oxe(),hoverInfo:vTt};function vTt(e,t,r){(t.error_y||{}).visible&&(r.yerr=e.yh-e.y,t.error_y.symmetric||(r.yerrneg=e.y-e.ys)),(t.error_x||{}).visible&&(r.xerr=e.xh-e.x,t.error_x.symmetric||(r.xerrneg=e.x-e.xs))}});var Hxe=fe((b1r,Gxe)=>{"use strict";Gxe.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"}}});var Jxe=fe((w1r,Kxe)=>{"use strict";var Vm=xi(),jC=Hs(),jxe=bi(),ug=Yi(),HC=ed(),xv=Xt(),yp=xv.strTranslate,$xe=ta().extendFlat,yV=np(),mp=ea(),L3=ni(),pTt=qx(),gTt=as(),mTt=Wf().flipScale,yTt=vA(),xTt=gC(),_Tt=pf(),_V=nc(),Wxe=_V.LINE_SPACING,Yxe=_V.FROM_TL,Xxe=_V.FROM_BR,Cl=Hxe().cn;function bTt(e){var t=e._fullLayout,r=t._infolayer.selectAll("g."+Cl.colorbar).data(wTt(e),function(n){return n._id});r.enter().append("g").attr("class",function(n){return n._id}).classed(Cl.colorbar,!0),r.each(function(n){var a=Vm.select(this);xv.ensureSingle(a,"rect",Cl.cbbg),xv.ensureSingle(a,"g",Cl.cbfills),xv.ensureSingle(a,"g",Cl.cblines),xv.ensureSingle(a,"g",Cl.cbaxis,function(o){o.classed(Cl.crisp,!0)}),xv.ensureSingle(a,"g",Cl.cbtitleunshift,function(o){o.append("g").classed(Cl.cbtitle,!0)}),xv.ensureSingle(a,"rect",Cl.cboutline);var i=TTt(a,n,e);i&&i.then&&(e._promises||[]).push(i),e._context.edits.colorbarPosition&&ATt(a,n,e)}),r.exit().each(function(n){jC.autoMargin(e,n._id)}).remove(),r.order()}function wTt(e){var t=e._fullLayout,r=e.calcdata,n=[],a,i,o,s;function l(k){return $xe(k,{_fillcolor:null,_line:{color:null,width:null,dash:null},_levels:{start:null,end:null,size:null},_filllevels:null,_fillgradient:null,_zrange:null})}function u(){typeof s.calc=="function"?s.calc(e,o,a):(a._fillgradient=i.reversescale?mTt(i.colorscale):i.colorscale,a._zrange=[i[s.min],i[s.max]])}for(var c=0;c[Math.min(e[0]+t,e[1]),e[1]],Zxe=(e,t)=>[e[0],Math.max(e[1]-t,e[0])];function TTt(e,t,r){var n=t.orientation==="v",a=t.len,i=t.lenmode,o=t.thickness,s=t.thicknessmode,l=t.outlinewidth,u=t.borderwidth,c=t.bgcolor,f=t.xanchor,v=t.yanchor,g=t.xpad,p=t.ypad,x=t.x,_=n?t.y:1-t.y,y=t.yref==="paper",C=t.xref==="paper",k=r._fullLayout,S=k._size,L=t._fillcolor,w=t._line,A=t.title,T=A.side,m=t._zrange||Vm.extent((typeof L=="function"?L:w.color).domain()),F=typeof w.color=="function"?w.color:function(){return w.color},E=typeof L=="function"?L:function(){return L},I=t._levels,R=MTt(r,t,m),B=R.fill,O=R.line,V=Math.round(o*(s==="fraction"?n?S.w:S.h:1)),j=V/(n?S.w:S.h),q=Math.round(a*(i==="fraction"?n?S.h:S.w:1)),U=q/(n?S.h:S.w),J=C?S.w:r._fullLayout.width,ee=y?S.h:r._fullLayout.height,ce=Math.round(n?x*J+g:_*ee+p),ye={center:.5,right:1}[f]||0,xe={top:1,middle:.5}[v]||0,ue=n?x-ye*j:_-xe*j,K=n?_-xe*U:x-ye*U,_e=Math.round(n?ee*(1-K):J*K);t._lenFrac=U,t._thickFrac=j,t._uFrac=ue,t._vFrac=K;var ne=t._axis=STt(r,t,m);ne.position=j+(n?x+g/S.w:_+p/S.h);var ae=["top","bottom"].indexOf(T)!==-1;if(n&&ae&&(ne.title.side=T,ne.titlex=x+g/S.w,ne.titley=K+(A.side==="top"?U-p/S.h:p/S.h)),!n&&!ae&&(ne.title.side=T,ne.titley=_+p/S.h,ne.titlex=K+g/S.w),w.color&&t.tickmode==="auto"){ne.tickmode="linear",ne.tick0=I.start;var pe=I.size,ie=xv.constrain(q/50,4,15)+1,le=(m[1]-m[0])/((t.nticks||ie)*pe);if(le>1){var me=Math.pow(10,Math.floor(Math.log(le)/Math.LN10));pe*=me*xv.roundUp(le/me,[2,5,10]),(Math.abs(I.start)/I.size+1e-6)%1<2e-6&&(ne.tick0=0)}ne.dtick=pe}var be=n?p/S.h:g/S.w;ne.domain=Zxe(xV([K,K+U],be),be),ne.setScale(),e.attr("transform",yp(Math.round(S.l),Math.round(S.t)));var De=e.select("."+Cl.cbtitleunshift).attr("transform",yp(-Math.round(S.l),-Math.round(S.t))),Ge=ne.ticklabelposition,ht=ne.title.font.size,it=e.select("."+Cl.cbaxis),Oe,ze=0,ct=0;function et(Te,Ve){var $e={propContainer:ne,propName:t._propPrefix+"title.text",traceIndex:t._traceIndex,_meta:t._meta,placeholder:k._dfltTitle.colorbar,containerGroup:e.select("."+Cl.cbtitle)},ot=Te.charAt(0)==="h"?Te.slice(1):"h"+Te;e.selectAll("."+ot+",."+ot+"-math-group").remove(),pTt.draw(r,Te,$xe($e,Ve||{}))}function qe(){if(n&&ae||!n&&!ae){var Te,Ve;T==="top"&&(Te=g+S.l+J*x,Ve=p+S.t+ee*(1-K-U)+3+ht*.75),T==="bottom"&&(Te=g+S.l+J*x,Ve=p+S.t+ee*(1-K)-3-ht*.25),T==="right"&&(Ve=p+S.t+ee*_+3+ht*.75,Te=g+S.l+J*K),et(ne._id+"title",{attributes:{x:Te,y:Ve,"text-anchor":n?"start":"middle"}})}}function we(){if(n&&!ae||!n&&ae){var Te=ne.position||0,Ve=ne._offset+ne._length/2,$e,ot;if(T==="right")ot=Ve,$e=S.l+J*Te+10+ht*(ne.showticklabels?1:.5);else if($e=Ve,T==="bottom"&&(ot=S.t+ee*Te+10+(Ge.indexOf("inside")===-1?ne.tickfont.size:0)+(ne.ticks!=="inside"&&t.ticklen||0)),T==="top"){var tt=A.text.split("
").length;ot=S.t+ee*Te+10-V-Wxe*ht*tt}et((n?"h":"v")+ne._id+"title",{avoid:{selection:Vm.select(r).selectAll("g."+ne._id+"tick"),side:T,offsetTop:n?0:S.t,offsetLeft:n?S.l:0,maxShift:n?k.width:k.height},attributes:{x:$e,y:ot,"text-anchor":"middle"},transform:{rotate:n?-90:0,offset:0}})}}function Le(){if(!n&&!ae||n&&ae){var Te=e.select("."+Cl.cbtitle),Ve=Te.select("text"),$e=[-l/2,l/2],ot=Te.select(".h"+ne._id+"title-math-group").node(),tt=15.6;Ve.node()&&(tt=parseInt(Ve.node().style.fontSize,10)*Wxe);var nt;if(ot?(nt=mp.bBox(ot),ct=nt.width,ze=nt.height,ze>tt&&($e[1]-=(ze-tt)/2)):Ve.node()&&!Ve.classed(Cl.jsPlaceholder)&&(nt=mp.bBox(Ve.node()),ct=nt.width,ze=nt.height),n){if(ze){if(ze+=5,T==="top")ne.domain=Zxe(ne.domain,ze/S.h),$e[1]*=-1;else{ne.domain=xV(ne.domain,ze/S.h);var We=gTt.lineCount(Ve);$e[1]+=(1-We)*tt}Te.attr("transform",yp($e[0],$e[1])),ne.setScale()}}else ct&&(T==="right"&&(ne.domain=xV(ne.domain,(ct+ht/2)/S.w)),Te.attr("transform",yp($e[0],$e[1])),ne.setScale())}e.selectAll("."+Cl.cbfills+",."+Cl.cblines).attr("transform",n?yp(0,Math.round(S.h*(1-ne.domain[1]))):yp(Math.round(S.w*ne.domain[0]),0)),it.attr("transform",n?yp(0,Math.round(-S.t)):yp(Math.round(-S.l),0));var mt=e.select("."+Cl.cbfills).selectAll("rect."+Cl.cbfill).attr("style","").data(B);mt.enter().append("rect").classed(Cl.cbfill,!0).attr("style",""),mt.exit().remove();var bt=m.map(ne.c2p).map(Math.round).sort(function(fr,Ot){return fr-Ot});mt.each(function(fr,Ot){var cr=[Ot===0?m[0]:(B[Ot]+B[Ot-1])/2,Ot===B.length-1?m[1]:(B[Ot]+B[Ot+1])/2].map(ne.c2p).map(Math.round);n&&(cr[1]=xv.constrain(cr[1]+(cr[1]>cr[0])?1:-1,bt[0],bt[1]));var Ct=Vm.select(this).attr(n?"x":"y",ce).attr(n?"y":"x",Vm.min(cr)).attr(n?"width":"height",Math.max(V,2)).attr(n?"height":"width",Math.max(Vm.max(cr)-Vm.min(cr),2));if(t._fillgradient)mp.gradient(Ct,r,t._id,n?"vertical":"horizontalreversed",t._fillgradient,"fill");else{var wt=E(fr).replace("e-","");Ct.attr("fill",L3.hexString(wt))}});var Yt=e.select("."+Cl.cblines).selectAll("path."+Cl.cbline).data(w.color&&w.width?O:[]);Yt.enter().append("path").classed(Cl.cbline,!0),Yt.exit().remove(),Yt.each(function(fr){var Ot=ce,cr=Math.round(ne.c2p(fr))+w.width/2%1;Vm.select(this).attr("d","M"+(n?Ot+","+cr:cr+","+Ot)+(n?"h":"v")+V).call(mp.lineGroupStyle,w.width,F(fr),w.dash)}),it.selectAll("g."+ne._id+"tick,path").remove();var jt=ce+V+(l||0)/2-(t.ticks==="outside"?1:0),mr=ug.calcTicks(ne),or=ug.getTickSigns(ne)[2];return ug.drawTicks(r,ne,{vals:ne.ticks==="inside"?ug.clipEnds(ne,mr):mr,layer:it,path:ug.makeTickPath(ne,jt,or),transFn:ug.makeTransTickFn(ne)}),ug.drawLabels(r,ne,{vals:mr,layer:it,transFn:ug.makeTransTickLabelFn(ne),labelFns:ug.makeLabelFns(ne,jt)})}function Ke(){var Te,Ve=V+l/2;Ge.indexOf("inside")===-1&&(Te=mp.bBox(it.node()),Ve+=n?Te.width:Te.height),Oe=De.select("text");var $e=0,ot=n&&T==="top",tt=!n&&T==="right",nt=0;if(Oe.node()&&!Oe.classed(Cl.jsPlaceholder)){var We,mt=De.select(".h"+ne._id+"title-math-group").node();mt&&(n&&ae||!n&&!ae)?(Te=mp.bBox(mt),$e=Te.width,We=Te.height):(Te=mp.bBox(De.node()),$e=Te.right-S.l-(n?ce:_e),We=Te.bottom-S.t-(n?_e:ce),!n&&T==="top"&&(Ve+=Te.height,nt=Te.height)),tt&&(Oe.attr("transform",yp($e/2+ht/2,0)),$e*=2),Ve=Math.max(Ve,n?$e:We)}var bt=(n?g:p)*2+Ve+u+l/2,Yt=0;!n&&A.text&&v==="bottom"&&_<=0&&(Yt=bt/2,bt+=Yt,nt+=Yt),k._hColorbarMoveTitle=Yt,k._hColorbarMoveCBTitle=nt;var jt=u+l,mr=(n?ce:_e)-jt/2-(n?g:0),or=(n?_e:ce)-(n?q:p+nt-Yt);e.select("."+Cl.cbbg).attr("x",mr).attr("y",or).attr(n?"width":"height",Math.max(bt-Yt,2)).attr(n?"height":"width",Math.max(q+jt,2)).call(L3.fill,c).call(L3.stroke,t.bordercolor).style("stroke-width",u);var fr=tt?Math.max($e-10,0):0;e.selectAll("."+Cl.cboutline).attr("x",(n?ce:_e+g)+fr).attr("y",(n?_e+p-q:ce)+(ot?ze:0)).attr(n?"width":"height",Math.max(V,2)).attr(n?"height":"width",Math.max(q-(n?2*p+ze:2*g+fr),2)).call(L3.stroke,t.outlinecolor).style({fill:"none","stroke-width":l});var Ot=n?ye*bt:0,cr=n?0:(1-xe)*bt-nt;if(Ot=C?S.l-Ot:-Ot,cr=y?S.t-cr:-cr,e.attr("transform",yp(Ot,cr)),!n&&(u||L3.opacity(c)&&!L3.equals(k.paper_bgcolor,c))){var Ct=it.selectAll("text"),wt=Ct[0].length,Tt=e.select("."+Cl.cbbg).node(),Mt=mp.bBox(Tt),Lt=mp.getTranslate(e),ft=2;Ct.each(function(Cn,Dt){var At=0,Vt=wt-1;if(Dt===At||Dt===Vt){var Qt=mp.bBox(this),Ut=mp.getTranslate(this),_r;if(Dt===Vt){var rn=Qt.right+Ut.x,Jr=Mt.right+Lt.x+_e-u-ft+x;_r=Jr-rn,_r>0&&(_r=0)}else if(Dt===At){var qn=Qt.left+Ut.x,ri=Mt.left+Lt.x+_e+u+ft;_r=ri-qn,_r<0&&(_r=0)}_r&&(wt<3?this.setAttribute("transform","translate("+_r+",0) "+this.getAttribute("transform")):this.setAttribute("visibility","hidden"))}})}var kt={},rr=Yxe[f],pr=Xxe[f],Kr=Yxe[v],Nr=Xxe[v],dn=bt-V;n?(i==="pixels"?(kt.y=_,kt.t=q*Kr,kt.b=q*Nr):(kt.t=kt.b=0,kt.yt=_+a*Kr,kt.yb=_-a*Nr),s==="pixels"?(kt.x=x,kt.l=bt*rr,kt.r=bt*pr):(kt.l=dn*rr,kt.r=dn*pr,kt.xl=x-o*rr,kt.xr=x+o*pr)):(i==="pixels"?(kt.x=x,kt.l=q*rr,kt.r=q*pr):(kt.l=kt.r=0,kt.xl=x+a*rr,kt.xr=x-a*pr),s==="pixels"?(kt.y=1-_,kt.t=bt*Kr,kt.b=bt*Nr):(kt.t=dn*Kr,kt.b=dn*Nr,kt.yt=_-o*Kr,kt.yb=_+o*Nr));var xr=t.y<.5?"b":"t",Fr=t.x<.5?"l":"r";r._fullLayout._reservedMargin[t._id]={};var Zr={r:k.width-mr-Ot,l:mr+kt.r,b:k.height-or-cr,t:or+kt.b};C&&y?jC.autoMargin(r,t._id,kt):C?r._fullLayout._reservedMargin[t._id][xr]=Zr[xr]:y||n?r._fullLayout._reservedMargin[t._id][Fr]=Zr[Fr]:r._fullLayout._reservedMargin[t._id][xr]=Zr[xr]}return xv.syncOrAsync([jC.previousPromises,qe,Le,we,jC.previousPromises,Ke],r)}function ATt(e,t,r){var n=t.orientation==="v",a=r._fullLayout,i=a._size,o,s,l;HC.init({element:e.node(),gd:r,prepFn:function(){o=e.attr("transform"),yV(e)},moveFn:function(u,c){e.attr("transform",o+yp(u,c)),s=HC.align((n?t._uFrac:t._vFrac)+u/i.w,n?t._thickFrac:t._lenFrac,0,1,t.xanchor),l=HC.align((n?t._vFrac:1-t._uFrac)-c/i.h,n?t._lenFrac:t._thickFrac,0,1,t.yanchor);var f=HC.getCursor(s,l,t.xanchor,t.yanchor);yV(e,f)},doneFn:function(){if(yV(e),s!==void 0&&l!==void 0){var u={};u[t._propPrefix+"x"]=s,u[t._propPrefix+"y"]=l,t._traceIndex!==void 0?jxe.call("_guiRestyle",r,u,t._traceIndex):jxe.call("_guiRelayout",r,u)}}})}function MTt(e,t,r){var n=t._levels,a=[],i=[],o,s,l=n.end+n.size/100,u=n.size,c=1.001*r[0]-.001*r[1],f=1.001*r[1]-.001*r[0];for(s=0;s<1e5&&(o=n.start+s*u,!(u>0?o>=l:o<=l));s++)o>c&&o0?o>=l:o<=l));s++)o>r[0]&&o{"use strict";Qxe.exports={moduleType:"component",name:"colorbar",attributes:ck(),supplyDefaults:EB(),draw:Jxe().draw,hasColorbar:_B()}});var r2e=fe((A1r,t2e)=>{"use strict";t2e.exports={moduleType:"component",name:"legend",layoutAttributes:bO(),supplyLayoutDefaults:TO(),draw:qO(),style:DO()}});var i2e=fe((M1r,n2e)=>{"use strict";n2e.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"}}});var o2e=fe((S1r,a2e)=>{"use strict";a2e.exports={moduleType:"locale",name:"en-US",dictionary:{"Click to enter Colorscale title":"Click to enter Colorscale title"},format:{date:"%m/%d/%Y"}}});var wV=fe((E1r,c2e)=>{"use strict";var ETt=bi(),u2e=Xt(),bV=u2e.extendFlat,s2e=u2e.extendDeep;function l2e(e){var t;switch(e){case"themes__thumb":t={autosize:!0,width:150,height:150,title:{text:""},showlegend:!1,margin:{l:5,r:5,t:5,b:5,pad:0},annotations:[]};break;case"thumbnail":t={title:{text:""},showlegend:!1,borderwidth:0,bordercolor:"",margin:{l:1,r:1,t:1,b:1,pad:0},annotations:[]};break;default:t={}}return t}function kTt(e){var t=["xaxis","yaxis","zaxis"];return t.indexOf(e.slice(0,5))>-1}c2e.exports=function(t,r){var n,a=t.data,i=t.layout,o=s2e([],a),s=s2e({},i,l2e(r.tileClass)),l=t._context||{};if(r.width&&(s.width=r.width),r.height&&(s.height=r.height),r.tileClass==="thumbnail"||r.tileClass==="themes__thumb"){s.annotations=[];var u=Object.keys(s);for(n=0;n{"use strict";var CTt=Mx().EventEmitter,LTt=bi(),PTt=Xt(),f2e=ag(),FTt=wV(),DTt=$8(),RTt=K8();function ITt(e,t){var r=new CTt,n=FTt(e,{format:"png"}),a=n.gd;a.style.position="absolute",a.style.left="-5000px",document.body.appendChild(a);function i(){var s=f2e.getDelay(a._fullLayout);setTimeout(function(){var l=DTt(a),u=document.createElement("canvas");u.id=PTt.randstr(),r=RTt({format:t.format,width:a._fullLayout.width,height:a._fullLayout.height,canvas:u,emitter:r,svg:l}),r.clean=function(){a&&document.body.removeChild(a)}},s)}var o=f2e.getRedrawFunc(a);return LTt.call("_doPlot",a,n.data,n.layout,n.config).then(o).then(i).catch(function(s){r.emit("error",s)}),r}h2e.exports=ITt});var g2e=fe((C1r,p2e)=>{"use strict";var v2e=ag(),zTt={getDelay:v2e.getDelay,getRedrawFunc:v2e.getRedrawFunc,clone:wV(),toSVG:$8(),svgToImg:K8(),toImage:d2e(),downloadImage:rU()};p2e.exports=zTt});var y2e=fe(cg=>{"use strict";cg.version=A4().version;Fte();xse();var qTt=bi(),SA=cg.register=qTt.register,AV=qpe(),m2e=Object.keys(AV);for(WC=0;WC{"use strict";x2e.exports=y2e()});var u1=fe((F1r,M2e)=>{"use strict";var nu=Ol(),b2e=pl().axisHoverFormat,{hovertemplateAttrs:BTt,texttemplateAttrs:OTt,templatefallbackAttrs:w2e}=Oo(),A2e=_s(),NTt=Ds(),T2e=Im(),UTt=Uc().pattern,v2=ta().extendFlat,MV=NTt({editType:"calc",arrayOk:!0,colorEditType:"style"}),VTt=nu.marker,GTt=VTt.line,HTt=v2({},GTt.width,{dflt:0}),jTt=v2({width:HTt,editType:"calc"},A2e("marker.line")),WTt=v2({line:jTt,editType:"calc"},A2e("marker"),{opacity:{valType:"number",arrayOk:!0,dflt:1,min:0,max:1,editType:"style"},pattern:UTt,cornerradius:{valType:"any",editType:"calc"}});M2e.exports={x:nu.x,x0:nu.x0,dx:nu.dx,y:nu.y,y0:nu.y0,dy:nu.dy,xperiod:nu.xperiod,yperiod:nu.yperiod,xperiod0:nu.xperiod0,yperiod0:nu.yperiod0,xperiodalignment:nu.xperiodalignment,yperiodalignment:nu.yperiodalignment,xhoverformat:b2e("x"),yhoverformat:b2e("y"),text:nu.text,texttemplate:OTt({editType:"plot"},{keys:T2e.eventDataKeys}),texttemplatefallback:w2e({editType:"plot"}),hovertext:nu.hovertext,hovertemplate:BTt({},{keys:T2e.eventDataKeys}),hovertemplatefallback:w2e(),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"calc"},insidetextanchor:{valType:"enumerated",values:["end","middle","start"],dflt:"end",editType:"plot"},textangle:{valType:"angle",dflt:"auto",editType:"plot"},textfont:v2({},MV,{}),insidetextfont:v2({},MV,{}),outsidetextfont:v2({},MV,{}),constraintext:{valType:"enumerated",values:["inside","outside","both","none"],dflt:"both",editType:"calc"},cliponaxis:v2({},nu.cliponaxis,{}),orientation:{valType:"enumerated",values:["v","h"],editType:"calc+clearAxisTypes"},base:{valType:"any",dflt:null,arrayOk:!0,editType:"calc"},offset:{valType:"number",dflt:null,arrayOk:!0,editType:"calc"},width:{valType:"number",dflt:null,min:0,arrayOk:!0,editType:"calc"},marker:WTt,offsetgroup:nu.offsetgroup,alignmentgroup:nu.alignmentgroup,selected:{marker:{opacity:nu.selected.marker.opacity,color:nu.selected.marker.color,editType:"style"},textfont:nu.selected.textfont,editType:"style"},unselected:{marker:{opacity:nu.unselected.marker.opacity,color:nu.unselected.marker.color,editType:"style"},textfont:nu.unselected.textfont,editType:"style"},zorder:nu.zorder}});var XC=fe((D1r,S2e)=>{"use strict";S2e.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"}}});var ZC=fe((R1r,C2e)=>{"use strict";var YTt=ni(),E2e=Wf().hasColorscale,k2e=Vc(),XTt=Xt().coercePattern;C2e.exports=function(t,r,n,a,i){var o=n("marker.color",a),s=E2e(t,"marker");s&&k2e(t,r,i,n,{prefix:"marker.",cLetter:"c"}),n("marker.line.color",YTt.defaultLine),E2e(t,"marker.line")&&k2e(t,r,i,n,{prefix:"marker.line.",cLetter:"c"}),n("marker.line.width"),n("marker.opacity"),XTt(n,"marker.pattern",o,s),n("selected.marker.color"),n("unselected.marker.color")}});var z0=fe((I1r,I2e)=>{"use strict";var L2e=aa(),F3=Xt(),P2e=ni(),ZTt=bi(),$Tt=r2(),KTt=sp(),JTt=ZC(),QTt=n2(),F2e=u1(),$C=F3.coerceFont;function eAt(e,t,r,n){function a(u,c){return F3.coerce(e,t,F2e,u,c)}var i=$Tt(e,t,n,a);if(!i){t.visible=!1;return}KTt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("zorder"),a("orientation",t.x&&!t.y?"h":"v"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var o=a("textposition");R2e(e,t,n,a,o,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),JTt(e,t,a,r,n);var s=(t.marker.line||{}).color,l=ZTt.getComponentMethod("errorbars","supplyDefaults");l(e,t,s||P2e.defaultLine,{axis:"y"}),l(e,t,s||P2e.defaultLine,{axis:"x",inherit:"y"}),F3.coerceSelectionMarkerOpacity(t,a)}function tAt(e,t){var r,n;function a(s,l){return F3.coerce(n._input,n,F2e,s,l)}for(var i=0;i=0)return e}else if(typeof e=="string"&&(e=e.trim(),e.slice(-1)==="%"&&L2e(e.slice(0,-1))&&(e=+e.slice(0,-1),e>=0)))return e+"%"}function R2e(e,t,r,n,a,i){i=i||{};var o=i.moduleHasSelected!==!1,s=i.moduleHasUnselected!==!1,l=i.moduleHasConstrain!==!1,u=i.moduleHasCliponaxis!==!1,c=i.moduleHasTextangle!==!1,f=i.moduleHasInsideanchor!==!1,v=!!i.hasPathbar,g=Array.isArray(a)||a==="auto",p=g||a==="inside",x=g||a==="outside";if(p||x){var _=$C(n,"textfont",r.font),y=F3.extendFlat({},_),C=e.textfont&&e.textfont.color,k=!C;if(k&&delete y.color,$C(n,"insidetextfont",y),v){var S=F3.extendFlat({},_);k&&delete S.color,$C(n,"pathbar.textfont",S)}x&&$C(n,"outsidetextfont",_),o&&n("selected.textfont.color"),s&&n("unselected.textfont.color"),l&&n("constraintext"),u&&n("cliponaxis"),c&&n("textangle"),n("texttemplate"),n("texttemplatefallback")}p&&f&&n("insidetextanchor")}I2e.exports={supplyDefaults:eAt,crossTraceDefaults:tAt,handleText:R2e,validateCornerradius:D2e}});var SV=fe((z1r,z2e)=>{"use strict";var rAt=bi(),nAt=Yi(),iAt=Xt(),aAt=XC(),oAt=z0().validateCornerradius;z2e.exports=function(e,t,r){function n(x,_){return iAt.coerce(e,t,aAt,x,_)}for(var a=!1,i=!1,o=!1,s={},l=n("barmode"),u=l==="group",c=0;c0&&!s[v]&&(o=!0),s[v]=!0),f.visible&&f.type==="histogram"){var g=nAt.getFromId({_fullLayout:t},f[f.orientation==="v"?"xaxis":"yaxis"]);g.type!=="category"&&(i=!0)}}if(!a){delete t.barmode;return}l!=="overlay"&&n("barnorm"),n("bargap",i&&!o?0:.2),n("bargroupgap");var p=n("barcornerradius");t.barcornerradius=oAt(p)}});var EA=fe((q1r,q2e)=>{"use strict";var D3=Xt();q2e.exports=function(t,r){for(var n=0;n{"use strict";var B2e=Yi(),O2e=cp(),N2e=Wf().hasColorscale,U2e=Mh(),sAt=EA(),lAt=P0();V2e.exports=function(t,r){var n=B2e.getFromId(t,r.xaxis||"x"),a=B2e.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c,f={msUTC:!!(r.base||r.base===0)};r.orientation==="h"?(i=n.makeCalcdata(r,"x",f),s=a.makeCalcdata(r,"y"),l=O2e(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y",f),s=n.makeCalcdata(r,"x"),l=O2e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var v=Math.min(o.length,i.length),g=new Array(v),p=0;p{"use strict";var uAt=xi(),cAt=Xt();function fAt(e,t,r){var n=e._fullLayout,a=n["_"+r+"Text_minsize"];if(a){var i=n.uniformtext.mode==="hide",o;switch(r){case"funnelarea":case"pie":case"sunburst":o="g.slice";break;case"treemap":case"icicle":o="g.slice, g.pathbar";break;default:o="g.points > g.point"}t.selectAll(o).each(function(s){var l=s.transform;if(l){l.scale=i&&l.hide?0:a/l.fontSize;var u=uAt.select(this).select("text");cAt.setTransormAndDisplay(u,l)}})}}function hAt(e,t,r){if(r.uniformtext.mode){var n=H2e(e),a=r.uniformtext.minsize,i=t.scale*t.fontSize;t.hide=i{"use strict";var vAt=ni(),pAt=aa(),W2e=Xt().isArrayOrTypedArray;p2.coerceString=function(e,t,r){if(typeof t=="string"){if(t||!e.noBlank)return t}else if((typeof t=="number"||t===!0)&&!e.strict)return String(t);return r!==void 0?r:e.dflt};p2.coerceNumber=function(e,t,r){if(pAt(t)){t=+t;var n=e.min,a=e.max,i=n!==void 0&&ta;if(!i)return t}return r!==void 0?r:e.dflt};p2.coerceColor=function(e,t,r){return vAt.isValid(t)?t:r!==void 0?r:e.dflt};p2.coerceEnumerated=function(e,t,r){return e.coerceNumber&&(t=+t),e.values.indexOf(t)!==-1?t:r!==void 0?r:e.dflt};p2.getValue=function(e,t){var r;return W2e(e)?t{"use strict";var kA=xi(),gAt=ni(),CA=ea(),Y2e=Xt(),X2e=bi(),Z2e=kh().resizeText,EV=u1(),mAt=EV.textfont,yAt=EV.insidetextfont,xAt=EV.outsidetextfont,$f=KC();function _At(e){var t=kA.select(e).selectAll('g[class^="barlayer"]').selectAll("g.trace");Z2e(e,t,"bar");var r=t.size(),n=e._fullLayout;t.style("opacity",function(a){return a[0].trace.opacity}).each(function(a){(n.barmode==="stack"&&r>1||n.bargap===0&&n.bargroupgap===0&&!a[0].trace.marker.line.width)&&kA.select(this).attr("shape-rendering","crispEdges")}),t.selectAll("g.points").each(function(a){var i=kA.select(this),o=a[0].trace;$2e(i,o,e)}),X2e.getComponentMethod("errorbars","style")(t)}function $2e(e,t,r){CA.pointStyle(e.selectAll("path"),t,r),K2e(e,t,r)}function K2e(e,t,r){e.selectAll("text").each(function(n){var a=kA.select(this),i=Y2e.ensureUniformFontSize(r,J2e(a,n,t,r));CA.font(a,i)})}function bAt(e,t,r){var n=t[0].trace;n.selectedpoints?wAt(r,n,e):($2e(r,n,e),X2e.getComponentMethod("errorbars","style")(r))}function wAt(e,t,r){CA.selectedPointStyle(e.selectAll("path"),t),TAt(e.selectAll("text"),t,r)}function TAt(e,t,r){e.each(function(n){var a=kA.select(this),i;if(n.selected){i=Y2e.ensureUniformFontSize(r,J2e(a,n,t,r));var o=t.selected.textfont&&t.selected.textfont.color;o&&(i.color=o),CA.font(a,i)}else CA.selectedTextStyle(a,t)})}function J2e(e,t,r,n){var a=n._fullLayout.font,i=r.textfont;if(e.classed("bartext-inside")){var o=r_e(t,r);i=e_e(r,t.i,a,o)}else e.classed("bartext-outside")&&(i=t_e(r,t.i,a));return i}function Q2e(e,t,r){return kV(mAt,e.textfont,t,r)}function e_e(e,t,r,n){var a=Q2e(e,t,r),i=e._input.textfont===void 0||e._input.textfont.color===void 0||Array.isArray(e.textfont.color)&&e.textfont.color[t]===void 0;return i&&(a={color:gAt.contrast(n),family:a.family,size:a.size,weight:a.weight,style:a.style,variant:a.variant,textcase:a.textcase,lineposition:a.lineposition,shadow:a.shadow}),kV(yAt,e.insidetextfont,t,a)}function t_e(e,t,r){var n=Q2e(e,t,r);return kV(xAt,e.outsidetextfont,t,n)}function kV(e,t,r,n){t=t||{};var a=$f.getValue(t.family,r),i=$f.getValue(t.size,r),o=$f.getValue(t.color,r),s=$f.getValue(t.weight,r),l=$f.getValue(t.style,r),u=$f.getValue(t.variant,r),c=$f.getValue(t.textcase,r),f=$f.getValue(t.lineposition,r),v=$f.getValue(t.shadow,r);return{family:$f.coerceString(e.family,a,n.family),size:$f.coerceNumber(e.size,i,n.size),color:$f.coerceColor(e.color,o,n.color),weight:$f.coerceString(e.weight,s,n.weight),style:$f.coerceString(e.style,l,n.style),variant:$f.coerceString(e.variant,u,n.variant),textcase:$f.coerceString(e.variant,c,n.textcase),lineposition:$f.coerceString(e.variant,f,n.lineposition),shadow:$f.coerceString(e.variant,v,n.shadow)}}function r_e(e,t){return t.type==="waterfall"?t[e.dir].marker.color:e.mcc||e.mc||t.marker.color}n_e.exports={style:_At,styleTextPoints:K2e,styleOnSelect:bAt,getInsideTextFont:e_e,getOutsideTextFont:t_e,getBarColor:r_e,resizeText:Z2e}});var m2=fe((V1r,f_e)=>{"use strict";var JC=xi(),QC=aa(),mf=Xt(),AAt=as(),MAt=ni(),Gm=ea(),SAt=bi(),e7=Yi().tickText,i_e=kh(),EAt=i_e.recordMinTextSize,kAt=i_e.clearMinTextSize,CV=_v(),R3=KC(),CAt=Im(),a_e=u1(),LAt=a_e.text,PAt=a_e.textposition,FAt=Sd().appendArrayPointValue,od=CAt.TEXTPAD;function DAt(e){return e.id}function RAt(e){if(e.ids)return DAt}function LV(e){return(e>0)-(e<0)}function xp(e,t){return e0}function zAt(e,t,r,n,a,i){var o=t.xaxis,s=t.yaxis,l=e._fullLayout,u=e._context.staticPlot;a||(a={mode:l.barmode,norm:l.barmode,gap:l.bargap,groupgap:l.bargroupgap},kAt("bar",l));var c=mf.makeTraceGroups(n,r,"trace bars").each(function(f){var v=JC.select(this),g=f[0].trace,p=f[0].t,x=g.type==="waterfall",_=g.type==="funnel",y=g.type==="histogram",C=g.type==="bar",k=C||_,S=0;x&&g.connector.visible&&g.connector.mode==="between"&&(S=g.connector.line.width/2);var L=g.orientation==="h",w=s_e(a),A=mf.ensureSingle(v,"g","points"),T=RAt(g),m=A.selectAll("g.point").data(mf.identity,T);m.enter().append("g").classed("point",!0),m.exit().remove(),m.each(function(E,I){var R=JC.select(this),B=IAt(E,o,s,L),O=B[0][0],V=B[0][1],j=B[1][0],q=B[1][1],U=(L?V-O:q-j)===0;U&&k&&R3.getLineWidth(g,E)&&(U=!1),U||(U=!QC(O)||!QC(V)||!QC(j)||!QC(q)),E.isBlank=U,U&&(L?V=O:q=j),S&&!U&&(L?(O-=xp(O,V)*S,V+=xp(O,V)*S):(j-=xp(j,q)*S,q+=xp(j,q)*S));var J,ee;if(g.type==="waterfall"){if(!U){var ce=g[E.dir].marker;J=ce.line.width,ee=ce.color}}else J=R3.getLineWidth(g,E),ee=E.mc||g.marker.color;function ye(Te){var Ve=JC.round(J/2%1,2);return a.gap===0&&a.groupgap===0?JC.round(Math.round(Te)-Ve,2):Te}function xe(Te,Ve,$e){return $e&&Te===Ve?Te:Math.abs(Te-Ve)>=2?ye(Te):Te>Ve?Math.ceil(Te):Math.floor(Te)}var ue=MAt.opacity(ee),K=ue<1||J>.01?ye:xe;e._context.staticPlot||(O=K(O,V,L),V=K(V,O,L),j=K(j,q,!L),q=K(q,j,!L));var _e=L?o.c2p:s.c2p,ne;E.s0>0?ne=E._sMax:E.s0<0?ne=E._sMin:ne=E.s1>0?E._sMax:E._sMin;function ae(Te,Ve){if(!Te)return 0;var $e=Math.abs(L?q-j:V-O),ot=Math.abs(L?V-O:q-j),tt=K(Math.abs(_e(ne,!0)-_e(0,!0))),nt=E.hasB?Math.min($e/2,ot/2):Math.min($e/2,tt),We;if(Ve==="%"){var mt=Math.min(50,Te);We=$e*(mt/100)}else We=Te;return K(Math.max(Math.min(We,nt),0))}var pe=C||y?ae(p.cornerradiusvalue,p.cornerradiusform):0,ie,le,me="M"+O+","+j+"V"+q+"H"+V+"V"+j+"Z",be=0;if(pe&&E.s){var De=LV(E.s0)===0||LV(E.s)===LV(E.s0)?E.s1:E.s0;if(be=K(E.hasB?0:Math.abs(_e(ne,!0)-_e(De,!0))),be0?Math.sqrt(be*(2*pe-be)):0,ct=Ge>0?Math.max:Math.min;ie="M"+O+","+j+"V"+(q-Oe*ht)+"H"+ct(V-(pe-be)*Ge,O)+"A "+pe+","+pe+" 0 0 "+it+" "+V+","+(q-pe*ht-ze)+"V"+(j+pe*ht+ze)+"A "+pe+","+pe+" 0 0 "+it+" "+ct(V-(pe-be)*Ge,O)+","+(j+Oe*ht)+"Z"}else if(E.hasB)ie="M"+(O+pe*Ge)+","+j+"A "+pe+","+pe+" 0 0 "+it+" "+O+","+(j+pe*ht)+"V"+(q-pe*ht)+"A "+pe+","+pe+" 0 0 "+it+" "+(O+pe*Ge)+","+q+"H"+(V-pe*Ge)+"A "+pe+","+pe+" 0 0 "+it+" "+V+","+(q-pe*ht)+"V"+(j+pe*ht)+"A "+pe+","+pe+" 0 0 "+it+" "+(V-pe*Ge)+","+j+"Z";else{le=Math.abs(q-j)+be;var et=le0?Math.sqrt(be*(2*pe-be)):0,we=ht>0?Math.max:Math.min;ie="M"+(O+et*Ge)+","+j+"V"+we(q-(pe-be)*ht,j)+"A "+pe+","+pe+" 0 0 "+it+" "+(O+pe*Ge-qe)+","+q+"H"+(V-pe*Ge+qe)+"A "+pe+","+pe+" 0 0 "+it+" "+(V-et*Ge)+","+we(q-(pe-be)*ht,j)+"V"+j+"Z"}}else ie=me}else ie=me;var Le=o_e(mf.ensureSingle(R,"path"),l,a,i);if(Le.style("vector-effect",u?"none":"non-scaling-stroke").attr("d",isNaN((V-O)*(q-j))||U&&e._context.staticPlot?"M0,0Z":ie).call(Gm.setClipUrl,t.layerClipId,e),!l.uniformtext.mode&&w){var Ke=Gm.makePointStyleFns(g);Gm.singlePointStyle(E,Le,g,Ke,e)}qAt(e,t,R,f,I,O,V,j,q,pe,be,a,i),t.layerClipId&&Gm.hideOutsideRangePoint(E,R.select("text"),o,s,g.xcalendar,g.ycalendar)});var F=g.cliponaxis===!1;Gm.setClipUrl(v,F?null:t.layerClipId,e)});SAt.getComponentMethod("errorbars","plot")(e,c,t,a)}function qAt(e,t,r,n,a,i,o,s,l,u,c,f,v){var g=t.xaxis,p=t.yaxis,x=e._fullLayout,_;function y(me,be,De){var Ge=mf.ensureSingle(me,"text").text(be).attr({class:"bartext bartext-"+_,"text-anchor":"middle","data-notex":1}).call(Gm.font,De).call(AAt.convertToTspans,e);return Ge}var C=n[0].trace,k=C.orientation==="h",S=VAt(n,k,g,p),L=NAt(x,n,a,g,p);_=UAt(C,a);var w=f.mode==="stack"||f.mode==="relative",A=n[a],T=!w||A._outmost,m=A.hasB,F=u&&u-c>od;if(!L||_==="none"||(A.isBlank||i===o||s===l)&&(_==="auto"||_==="inside")){r.select("text").remove();return}var E=x.font,I=CV.getBarColor(n[a],C),R=CV.getInsideTextFont(C,a,E,I),B=CV.getOutsideTextFont(C,a,E),O=C.insidetextanchor||"end",V=r.datum();k?g.type==="log"&&V.s0<=0&&(g.range[0]0&&xe>0,_e;F?m?_e=g2(U-2*u,J,ye,xe,k)||g2(U,J-2*u,ye,xe,k):k?_e=g2(U-(u-c),J,ye,xe,k)||g2(U,J-2*(u-c),ye,xe,k):_e=g2(U,J-(u-c),ye,xe,k)||g2(U-2*(u-c),J,ye,xe,k):_e=g2(U,J,ye,xe,k),K&&_e?_="inside":(_="outside",ee.remove(),ee=null)}else _="inside";if(!ee){ue=mf.ensureUniformFontSize(e,_==="outside"?B:R),ee=y(r,L,ue);var ne=ee.attr("transform");if(ee.attr("transform",""),ce=Gm.bBox(ee.node()),ye=ce.width,xe=ce.height,ee.attr("transform",ne),ye<=0||xe<=0){ee.remove();return}}var ae=C.textangle,pe,ie;_==="outside"?(ie=C.constraintext==="both"||C.constraintext==="outside",pe=OAt(i,o,s,l,ce,{isHorizontal:k,constrained:ie,angle:ae,zeroBarDir:S})):(ie=C.constraintext==="both"||C.constraintext==="inside",pe=c_e(i,o,s,l,ce,{isHorizontal:k,constrained:ie,angle:ae,anchor:O,hasB:m,r:u,overhead:c})),pe.fontSize=ue.size,EAt(C.type==="histogram"?"bar":C.type,pe,x),A.transform=pe;var le=o_e(ee,x,f,v);mf.setTransormAndDisplay(le,pe)}function g2(e,t,r,n,a){if(e<0||t<0)return!1;var i=r<=e&&n<=t,o=r<=t&&n<=e,s=a?e>=r*(t/n):t>=n*(e/r);return i||o||s}function l_e(e){return e==="auto"?0:e}function u_e(e,t){var r=Math.PI/180*t,n=Math.abs(Math.sin(r)),a=Math.abs(Math.cos(r));return{x:e.width*a+e.height*n,y:e.width*n+e.height*a}}function c_e(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=i.anchor,c=u==="end",f=u==="start",v=i.leftToRight||0,g=(v+1)/2,p=1-g,x=i.hasB,_=i.r,y=i.overhead,C=a.width,k=a.height,S=Math.abs(t-e),L=Math.abs(n-r),w=S>2*od&&L>2*od?od:0;S-=2*w,L-=2*w;var A=l_e(l);l==="auto"&&!(C<=S&&k<=L)&&(C>S||k>L)&&(!(C>L||k>S)||Cod){var E=BAt(e,t,r,n,T,_,y,o,x);m=E.scale,F=E.pad}else m=1,s&&(m=Math.min(1,S/T.x,L/T.y)),F=0;var I=a.left*p+a.right*g,R=(a.top+a.bottom)/2,B=(e+od)*p+(t-od)*g,O=(r+n)/2,V=0,j=0;if(f||c){var q=(o?T.x:T.y)/2;_&&(c||x)&&(w+=F);var U=o?xp(e,t):xp(r,n);o?f?(B=e+U*w,V=-U*q):(B=t-U*w,V=U*q):f?(O=r+U*w,j=-U*q):(O=n-U*w,j=U*q)}return{textX:I,textY:R,targetX:B,targetY:O,anchorX:V,anchorY:j,scale:m,rotate:A}}function BAt(e,t,r,n,a,i,o,s,l){var u=Math.max(0,Math.abs(t-e)-2*od),c=Math.max(0,Math.abs(n-r)-2*od),f=i-od,v=o?f-Math.sqrt(f*f-(f-o)*(f-o)):f,g=l?f*2:s?f-o:2*v,p=l?f*2:s?2*v:f-o,x,_,y,C,k;return a.y/a.x>=c/(u-g)?C=c/a.y:a.y/a.x<=(c-p)/u?C=u/a.x:!l&&s?(x=a.x*a.x+a.y*a.y/4,_=-2*a.x*(u-f)-a.y*(c/2-f),y=(u-f)*(u-f)+(c/2-f)*(c/2-f)-f*f,C=(-_+Math.sqrt(_*_-4*x*y))/(2*x)):l?(x=(a.x*a.x+a.y*a.y)/4,_=-a.x*(u/2-f)-a.y*(c/2-f),y=(u/2-f)*(u/2-f)+(c/2-f)*(c/2-f)-f*f,C=(-_+Math.sqrt(_*_-4*x*y))/(2*x)):(x=a.x*a.x/4+a.y*a.y,_=-a.x*(u/2-f)-2*a.y*(c-f),y=(u/2-f)*(u/2-f)+(c-f)*(c-f)-f*f,C=(-_+Math.sqrt(_*_-4*x*y))/(2*x)),C=Math.min(1,C),s?k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(c-a.y*C)/2)*(f-(c-a.y*C)/2)))-o):k=Math.max(0,f-Math.sqrt(Math.max(0,f*f-(f-(u-a.x*C)/2)*(f-(u-a.x*C)/2)))-o),{scale:C,pad:k}}function OAt(e,t,r,n,a,i){var o=!!i.isHorizontal,s=!!i.constrained,l=i.angle||0,u=a.width,c=a.height,f=Math.abs(t-e),v=Math.abs(n-r),g;o?g=v>2*od?od:0:g=f>2*od?od:0;var p=1;s&&(p=o?Math.min(1,v/c):Math.min(1,f/u));var x=l_e(l),_=u_e(a,x),y=(o?_.x:_.y)/2,C=(a.left+a.right)/2,k=(a.top+a.bottom)/2,S=(e+t)/2,L=(r+n)/2,w=0,A=0,T;return(o?e===t:r===n)&&i.zeroBarDir?T=i.zeroBarDir:T=o?xp(t,e):xp(r,n),o?(S=t-T*g,w=T*y):(L=n+T*g,A=-T*y),{textX:C,textY:k,targetX:S,targetY:L,anchorX:w,anchorY:A,scale:p,rotate:x}}function NAt(e,t,r,n,a){var i=t[0].trace,o=i.texttemplate,s;return o?s=GAt(e,t,r,n,a):i.textinfo?s=HAt(t,r,n,a):s=R3.getValue(i.text,r),R3.coerceString(LAt,s)}function UAt(e,t){var r=R3.getValue(e.textposition,t);return R3.coerceEnumerated(PAt,r)}function VAt(e,t,r,n){for(var a=!1,i=!1,o=0;o0?a=!0:s<0&&(i=!0),a&&i)return 0}var l=t?r:n,u=-xp(l.range[0],l.range[1]);return i?a?0:-u:u}function GAt(e,t,r,n,a){var i=t[0].trace,o=mf.castOption(i,r,"texttemplate");if(!o)return"";var s=i.type==="histogram",l=i.type==="waterfall",u=i.type==="funnel",c=i.orientation==="h",f,v,g,p;c?(f="y",v=a,g="x",p=n):(f="x",v=n,g="y",p=a);function x(w){return e7(v,v.c2l(w),!0).text}function _(w){return e7(p,p.c2l(w),!0).text}var y=t[r],C={};C.label=y.p,C.labelLabel=C[f+"Label"]=x(y.p);var k=mf.castOption(i,y.i,"text");(k===0||k)&&(C.text=k),C.value=y.s,C.valueLabel=C[g+"Label"]=_(y.s);var S={};FAt(S,i,y.i),(s||S.x===void 0)&&(S.x=c?C.value:C.label),(s||S.y===void 0)&&(S.y=c?C.label:C.value),(s||S.xLabel===void 0)&&(S.xLabel=c?C.valueLabel:C.labelLabel),(s||S.yLabel===void 0)&&(S.yLabel=c?C.labelLabel:C.valueLabel),l&&(C.delta=+y.rawS||y.s,C.deltaLabel=_(C.delta),C.final=y.v,C.finalLabel=_(C.final),C.initial=C.final-C.delta,C.initialLabel=_(C.initial)),u&&(C.value=y.s,C.valueLabel=_(C.value),C.percentInitial=y.begR,C.percentInitialLabel=mf.formatPercent(y.begR),C.percentPrevious=y.difR,C.percentPreviousLabel=mf.formatPercent(y.difR),C.percentTotal=y.sumR,C.percenTotalLabel=mf.formatPercent(y.sumR));var L=mf.castOption(i,y.i,"customdata");return L&&(C.customdata=L),mf.texttemplateString({data:[S,C,i._meta],fallback:i.texttemplatefallback,labels:C,locale:e._d3locale,template:o})}function HAt(e,t,r,n){var a=e[0].trace,i=a.orientation==="h",o=a.type==="waterfall",s=a.type==="funnel";function l(L){var w=i?n:r;return e7(w,L,!0).text}function u(L){var w=i?r:n;return e7(w,+L,!0).text}var c=a.textinfo,f=e[t],v=c.split("+"),g=[],p,x=function(L){return v.indexOf(L)!==-1};if(x("label")&&g.push(l(e[t].p)),x("text")&&(p=mf.castOption(a,f.i,"text"),(p===0||p)&&g.push(p)),o){var _=+f.rawS||f.s,y=f.v,C=y-_;x("initial")&&g.push(u(C)),x("delta")&&g.push(u(_)),x("final")&&g.push(u(y))}if(s){x("value")&&g.push(u(f.s));var k=0;x("percent initial")&&k++,x("percent previous")&&k++,x("percent total")&&k++;var S=k>1;x("percent initial")&&(p=mf.formatPercent(f.begR),S&&(p+=" of initial"),g.push(p)),x("percent previous")&&(p=mf.formatPercent(f.difR),S&&(p+=" of previous"),g.push(p)),x("percent total")&&(p=mf.formatPercent(f.sumR),S&&(p+=" of total"),g.push(p))}return g.join("
")}f_e.exports={plot:zAt,toMoveInsideBar:c_e}});var I3=fe((G1r,p_e)=>{"use strict";var LA=kl(),jAt=bi(),h_e=ni(),WAt=Xt().fillText,YAt=KC().getLineWidth,PV=Yi().hoverLabelText,XAt=Wa().BADNUM;function ZAt(e,t,r,n,a){var i=d_e(e,t,r,n,a);if(i){var o=i.cd,s=o[0].trace,l=o[i.index];return i.color=v_e(s,l),jAt.getComponentMethod("errorbars","hoverInfo")(l,s,i),[i]}}function d_e(e,t,r,n,a){var i=e.cd,o=i[0].trace,s=i[0].t,l=n==="closest",u=o.type==="waterfall",c=e.maxHoverDistance,f=e.maxSpikeDistance,v,g,p,x,_,y,C;o.orientation==="h"?(v=r,g=t,p="y",x="x",_=O,y=I):(v=t,g=r,p="x",x="y",y=O,_=I);var k=o[p+"period"],S=l||k;function L(K){return A(K,-1)}function w(K){return A(K,1)}function A(K,_e){var ne=K.w;return K[p]+_e*ne/2}function T(K){return K[p+"End"]-K[p+"Start"]}var m=l?L:k?function(K){return K.p-T(K)/2}:function(K){return Math.min(L(K),K.p-s.bardelta/2)},F=l?w:k?function(K){return K.p+T(K)/2}:function(K){return Math.max(w(K),K.p+s.bardelta/2)};function E(K,_e,ne){return a.finiteRange&&(ne=0),LA.inbox(K-v,_e-v,ne+Math.min(1,Math.abs(_e-K)/C)-1)}function I(K){return E(m(K),F(K),c)}function R(K){return E(L(K),w(K),f)}function B(K){var _e=K[x];if(u){var ne=Math.abs(K.rawS)||0;g>0?_e+=ne:g<0&&(_e-=ne)}return _e}function O(K){var _e=g,ne=K.b,ae=B(K);return LA.inbox(ne-_e,ae-_e,c+(ae-_e)/(ae-ne)-1)}function V(K){var _e=g,ne=K.b,ae=B(K);return LA.inbox(ne-_e,ae-_e,f+(ae-_e)/(ae-ne)-1)}var j=e[p+"a"],q=e[x+"a"];C=Math.abs(j.r2c(j.range[1])-j.r2c(j.range[0]));function U(K){return(_(K)+y(K))/2}var J=LA.getDistanceFunction(n,_,y,U);if(LA.getClosest(i,J,e),e.index!==!1&&i[e.index].p!==XAt){S||(m=function(K){return Math.min(L(K),K.p-s.bargroupwidth/2)},F=function(K){return Math.max(w(K),K.p+s.bargroupwidth/2)});var ee=e.index,ce=i[ee],ye=o.base?ce.b+ce.s:ce.s;e[x+"0"]=e[x+"1"]=q.c2p(ce[x],!0),e[x+"LabelVal"]=ye;var xe=s.extents[s.extents.round(ce.p)];e[p+"0"]=j.c2p(l?m(ce):xe[0],!0),e[p+"1"]=j.c2p(l?F(ce):xe[1],!0);var ue=ce.orig_p!==void 0;return e[p+"LabelVal"]=ue?ce.orig_p:ce.p,e.labelLabel=PV(j,e[p+"LabelVal"],o[p+"hoverformat"]),e.valueLabel=PV(q,e[x+"LabelVal"],o[x+"hoverformat"]),e.baseLabel=PV(q,ce.b,o[x+"hoverformat"]),e.spikeDistance=(V(ce)+R(ce))/2,e[p+"Spike"]=j.c2p(ce.p,!0),WAt(ce,o,e),e.hovertemplate=o.hovertemplate,e}}function v_e(e,t){var r=t.mcc||e.marker.color,n=t.mlcc||e.marker.line.color,a=YAt(e,t);if(h_e.opacity(r))return r;if(h_e.opacity(n)&&a)return n}p_e.exports={hoverPoints:ZAt,hoverOnBars:d_e,getTraceColor:v_e}});var m_e=fe((H1r,g_e)=>{"use strict";g_e.exports=function(t,r,n){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),n.orientation==="h"?(t.label=t.y,t.value=t.x):(t.label=t.x,t.value=t.y),t}});var z3=fe((j1r,y_e)=>{"use strict";y_e.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=n[0].trace,s=o.type==="funnel",l=o.orientation==="h",u=[],c;if(r===!1)for(c=0;c{"use strict";x_e.exports={attributes:u1(),layoutAttributes:XC(),supplyDefaults:z0().supplyDefaults,crossTraceDefaults:z0().crossTraceDefaults,supplyLayoutDefaults:SV(),calc:G2e(),crossTraceCalc:i2().crossTraceCalc,colorbar:Zf(),arraysToCalcdata:EA(),plot:m2().plot,style:_v().style,styleOnSelect:_v().styleOnSelect,hoverPoints:I3().hoverPoints,eventData:m_e(),selectPoints:z3(),moduleType:"trace",name:"bar",basePlotModule:gu(),categories:["bar-like","cartesian","svg","bar","oriented","errorBarsOK","showLegend","zoomScale"],animatable:!0,meta:{}}});var w_e=fe((Y1r,b_e)=>{"use strict";b_e.exports=__e()});var PA=fe((X1r,S_e)=>{"use strict";var KAt=n1(),bv=Ol(),T_e=u1(),JAt=tc(),A_e=pl().axisHoverFormat,{hovertemplateAttrs:QAt,templatefallbackAttrs:e6t}=Oo(),fg=ta().extendFlat,q3=bv.marker,M_e=q3.line;S_e.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:bv.xperiod,yperiod:bv.yperiod,xperiod0:bv.xperiod0,yperiod0:bv.yperiod0,xperiodalignment:bv.xperiodalignment,yperiodalignment:bv.yperiodalignment,xhoverformat:A_e("x"),yhoverformat:A_e("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:fg({},q3.symbol,{arrayOk:!1,editType:"plot"}),opacity:fg({},q3.opacity,{arrayOk:!1,dflt:1,editType:"style"}),angle:fg({},q3.angle,{arrayOk:!1,editType:"calc"}),size:fg({},q3.size,{arrayOk:!1,editType:"calc"}),color:fg({},q3.color,{arrayOk:!1,editType:"style"}),line:{color:fg({},M_e.color,{arrayOk:!1,dflt:JAt.defaultLine,editType:"style"}),width:fg({},M_e.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:KAt(),whiskerwidth:{valType:"number",min:0,max:1,dflt:.5,editType:"calc"},showwhiskers:{valType:"boolean",editType:"calc"},offsetgroup:T_e.offsetgroup,alignmentgroup:T_e.alignmentgroup,selected:{marker:bv.selected.marker,editType:"style"},unselected:{marker:bv.unselected.marker,editType:"style"},text:fg({},bv.text,{}),hovertext:fg({},bv.hovertext,{}),hovertemplate:QAt({}),hovertemplatefallback:e6t(),hoveron:{valType:"flaglist",flags:["boxes","points"],dflt:"boxes+points",editType:"style"},zorder:bv.zorder}});var FA=fe((Z1r,E_e)=>{"use strict";E_e.exports={boxmode:{valType:"enumerated",values:["group","overlay"],dflt:"overlay",editType:"calc"},boxgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"},boxgroupgap:{valType:"number",min:0,max:1,dflt:.3,editType:"calc"}}});var RA=fe(($1r,P_e)=>{"use strict";var wv=Xt(),t6t=bi(),r6t=ni(),n6t=sp(),i6t=n2(),k_e=Yb(),DA=PA();function a6t(e,t,r,n){function a(p,x){return wv.coerce(e,t,DA,p,x)}if(C_e(e,t,a,n),t.visible!==!1){n6t(e,t,n,a),a("xhoverformat"),a("yhoverformat");var i=t._hasPreCompStats;i&&(a("lowerfence"),a("upperfence")),a("line.color",(e.marker||{}).color||r),a("line.width"),a("fillcolor",r6t.addOpacity(t.line.color,.5));var o=!1;if(i){var s=a("mean"),l=a("sd");s&&s.length&&(o=!0,l&&l.length&&(o="sd"))}a("whiskerwidth");var u=a("sizemode"),c;u==="quartiles"&&(c=a("boxmean",o)),a("showwhiskers",u==="quartiles"),(u==="sd"||c==="sd")&&a("sdmultiple"),a("width"),a("quartilemethod");var f=!1;if(i){var v=a("notchspan");v&&v.length&&(f=!0)}else wv.validate(e.notchwidth,DA.notchwidth)&&(f=!0);var g=a("notched",f);g&&a("notchwidth"),L_e(e,t,a,{prefix:"box"}),a("zorder")}}function C_e(e,t,r,n){function a(F){var E=0;return F&&F.length&&(E+=1,wv.isArrayOrTypedArray(F[0])&&F[0].length&&(E+=1)),E}function i(F){return wv.validate(e[F],DA[F])}var o=r("y"),s=r("x"),l;if(t.type==="box"){var u=r("q1"),c=r("median"),f=r("q3");t._hasPreCompStats=u&&u.length&&c&&c.length&&f&&f.length,l=Math.min(wv.minRowLength(u),wv.minRowLength(c),wv.minRowLength(f))}else t._hasPreCompStats=!1;var v=a(o),g=a(s),p=v&&wv.minRowLength(o),x=g&&wv.minRowLength(s),_=n.calendar,y={autotypenumbers:n.autotypenumbers},C,k;if(t._hasPreCompStats)switch(String(g)+String(v)){case"00":var S=i("x0")||i("dx"),L=i("y0")||i("dy");L&&!S?C="h":C="v",k=l;break;case"10":C="v",k=Math.min(l,x);break;case"20":C="h",k=Math.min(l,s.length);break;case"01":C="h",k=Math.min(l,p);break;case"02":C="v",k=Math.min(l,o.length);break;case"12":C="v",k=Math.min(l,x,o.length);break;case"21":C="h",k=Math.min(l,s.length,p);break;case"11":k=0;break;case"22":var w=!1,A;for(A=0;A0?(C="v",g>0?k=Math.min(x,p):k=Math.min(p)):g>0?(C="h",k=Math.min(x)):k=0;if(!k){t.visible=!1;return}t._length=k;var T=r("orientation",C);t._hasPreCompStats?T==="v"&&g===0?(r("x0",0),r("dx",1)):T==="h"&&v===0&&(r("y0",0),r("dy",1)):T==="v"&&g===0?r("x0"):T==="h"&&v===0&&r("y0");var m=t6t.getComponentMethod("calendars","handleTraceDefaults");m(e,t,["x","y"],n)}function L_e(e,t,r,n){var a=n.prefix,i=wv.coerce2(e,t,DA,"marker.outliercolor"),o=r("marker.line.outliercolor"),s="outliers";t._hasPreCompStats?s="all":(i||o)&&(s="suspectedoutliers");var l=r(a+"points",s);l?(r("jitter",l==="all"?.3:0),r("pointpos",l==="all"?-1.5:0),r("marker.symbol"),r("marker.opacity"),r("marker.size"),r("marker.angle"),r("marker.color",t.line.color),r("marker.line.color"),r("marker.line.width"),l==="suspectedoutliers"&&(r("marker.line.outliercolor",t.marker.color),r("marker.line.outlierwidth")),r("selected.marker.color"),r("unselected.marker.color"),r("selected.marker.size"),r("unselected.marker.size"),r("text"),r("hovertext")):delete t.marker;var u=r("hoveron");(u==="all"||u.indexOf("points")!==-1)&&(r("hovertemplate"),r("hovertemplatefallback")),wv.coerceSelectionMarkerOpacity(t,r)}function o6t(e,t){var r,n;function a(l){return wv.coerce(n._input,n,DA,l)}for(var i=0;i{"use strict";var s6t=bi(),l6t=Xt(),u6t=FA();function F_e(e,t,r,n,a){for(var i=a+"Layout",o=!1,s=0;s{"use strict";var DV=aa(),r7=Yi(),f6t=cp(),qu=Xt(),q0=Wa().BADNUM,hg=qu._;V_e.exports=function(t,r){var n=t._fullLayout,a=r7.getFromId(t,r.xaxis||"x"),i=r7.getFromId(t,r.yaxis||"y"),o=[],s=r.type==="violin"?"_numViolins":"_numBoxes",l,u,c,f,v,g,p;r.orientation==="h"?(c=a,f="x",v=i,g="y",p=!!r.yperiodalignment):(c=i,f="y",v=a,g="x",p=!!r.xperiodalignment);var x=h6t(r,g,v,n[s]),_=x[0],y=x[1],C=qu.distinctVals(_,v),k=C.vals,S=C.minDiff/2,L,w,A,T,m,F,E=(r.boxpoints||r.points)==="all"?qu.identity:function(it){return it.vL.uf};if(r._hasPreCompStats){var I=r[f],R=function(it){return c.d2c((r[it]||[])[l])},B=1/0,O=-1/0;for(l=0;l=L.q1&&L.q3>=L.med){var j=R("lowerfence");L.lf=j!==q0&&j<=L.q1?j:q_e(L,A,T);var q=R("upperfence");L.uf=q!==q0&&q>=L.q3?q:B_e(L,A,T);var U=R("mean");L.mean=U!==q0?U:T?qu.mean(A,T):(L.q1+L.q3)/2;var J=R("sd");L.sd=U!==q0&&J>=0?J:T?qu.stdev(A,T,L.mean):L.q3-L.q1,L.lo=O_e(L),L.uo=N_e(L);var ee=R("notchspan");ee=ee!==q0&&ee>0?ee:U_e(L,T),L.ln=L.med-ee,L.un=L.med+ee;var ce=L.lf,ye=L.uf;r.boxpoints&&A.length&&(ce=Math.min(ce,A[0]),ye=Math.max(ye,A[T-1])),r.notched&&(ce=Math.min(ce,L.ln),ye=Math.max(ye,L.un)),L.min=ce,L.max=ye}else{qu.warn(["Invalid input - make sure that q1 <= median <= q3","q1 = "+L.q1,"median = "+L.med,"q3 = "+L.q3].join(` `));var xe;L.med!==q0?xe=L.med:L.q1!==q0?L.q3!==q0?xe=(L.q1+L.q3)/2:xe=L.q1:L.q3!==q0?xe=L.q3:xe=0,L.med=xe,L.q1=L.q3=xe,L.lf=L.uf=xe,L.mean=L.sd=xe,L.ln=L.un=xe,L.min=L.max=xe}B=Math.min(B,L.min),O=Math.max(O,L.max),L.pts2=w.filter(E),o.push(L)}}r._extremes[c._id]=r7.findExtremes(c,[B,O],{padded:!0})}else{var ue=c.makeCalcdata(r,f),K=d6t(k,S),_e=k.length,ne=v6t(_e);for(l=0;l=0&&ae<_e&&(m={v:F,i:l},R_e(m,r,l),ne[ae].push(m))}var pe=1/0,ie=-1/0,le=r.quartilemethod,me=le==="exclusive",be=le==="inclusive";for(l=0;l<_e;l++)if(ne[l].length>0){if(L={},L.pos=L[g]=k[l],w=L.pts=ne[l].sort(I_e),A=L[f]=w.map(z_e),T=A.length,L.min=A[0],L.max=A[T-1],L.mean=qu.mean(A,T),L.sd=qu.stdev(A,T,L.mean)*r.sdmultiple,L.med=qu.interp(A,.5),T%2&&(me||be)){var De,Ge;me?(De=A.slice(0,T/2),Ge=A.slice(T/2+1)):be&&(De=A.slice(0,T/2+1),Ge=A.slice(T/2)),L.q1=qu.interp(De,.5),L.q3=qu.interp(Ge,.5)}else L.q1=qu.interp(A,.25),L.q3=qu.interp(A,.75);L.lf=q_e(L,A,T),L.uf=B_e(L,A,T),L.lo=O_e(L),L.uo=N_e(L);var ht=U_e(L,T);L.ln=L.med-ht,L.un=L.med+ht,pe=Math.min(pe,L.ln),ie=Math.max(ie,L.un),L.pts2=w.filter(E),o.push(L)}r.notched&&qu.isTypedArray(ue)&&(ue=Array.from(ue)),r._extremes[c._id]=r7.findExtremes(c,r.notched?ue.concat([pe,ie]):ue,{padded:!0})}return p6t(o,r),o.length>0?(o[0].t={num:n[s],dPos:S,posLetter:g,valLetter:f,labels:{med:hg(t,"median:"),min:hg(t,"min:"),q1:hg(t,"q1:"),q3:hg(t,"q3:"),max:hg(t,"max:"),mean:r.boxmean==="sd"||r.sizemode==="sd"?hg(t,"mean \xB1 \u03C3:").replace("\u03C3",r.sdmultiple===1?"\u03C3":r.sdmultiple+"\u03C3"):hg(t,"mean:"),lf:hg(t,"lower fence:"),uf:hg(t,"upper fence:")}},n[s]++,o):[{t:{empty:!0}}]};function h6t(e,t,r,n){var a=t in e,i=t+"0"in e,o="d"+t in e;if(a||i&&o){var s=r.makeCalcdata(e,t),l=f6t(e,r,t,s).vals;return[l,s]}var u;i?u=e[t+"0"]:"name"in e&&(r.type==="category"||DV(e.name)&&["linear","log"].indexOf(r.type)!==-1||qu.isDateTime(e.name)&&r.type==="date")?u=e.name:u=n;for(var c=r.type==="multicategory"?r.r2c_just_indices(u):r.d2c(u,0,e[t+"calendar"]),f=e._length,v=new Array(f),g=0;g{"use strict";var G_e=Yi(),g6t=Xt(),m6t=Jx().getAxisGroup,H_e=["v","h"];function y6t(e,t){for(var r=e.calcdata,n=t.xaxis,a=t.yaxis,i=0;i1,C=1-i[e+"gap"],k=1-i[e+"groupgap"];for(l=0;l0;if(A==="positive"?(q=T*(w?1:.5),ee=J,U=ee=F):A==="negative"?(q=ee=F,U=T*(w?1:.5),ce=J):(q=U=T,ee=ce=J),ne){var ae=S.pointpos,pe=S.jitter,ie=S.marker.size/2,le=0;ae+pe>=0&&(le=J*(ae+pe),le>q?(_e=!0,ue=ie,ye=le):le>ee&&(ue=ie,ye=q)),le<=q&&(ye=q);var me=0;ae-pe<=0&&(me=-J*(ae-pe),me>U?(_e=!0,K=ie,xe=me):me>ce&&(K=ie,xe=U)),me<=U&&(xe=U)}else ye=q,xe=U;var be=new Array(c.length);for(u=0;u{"use strict";var B3=xi(),y2=Xt(),x6t=ea(),Y_e=5,_6t=.01;function b6t(e,t,r,n){var a=e._context.staticPlot,i=t.xaxis,o=t.yaxis;y2.makeTraceGroups(n,r,"trace boxes").each(function(s){var l=B3.select(this),u=s[0],c=u.t,f=u.trace;if(c.wdPos=c.bdPos*f.whiskerwidth,f.visible!==!0||c.empty){l.remove();return}var v,g;f.orientation==="h"?(v=o,g=i):(v=i,g=o),X_e(l,{pos:v,val:g},f,c,a),Z_e(l,{x:i,y:o},f,c),$_e(l,{pos:v,val:g},f,c)})}function X_e(e,t,r,n,a){var i=r.orientation==="h",o=t.val,s=t.pos,l=!!s.rangebreaks,u=n.bPos,c=n.wdPos||0,f=n.bPosPxOffset||0,v=r.whiskerwidth||0,g=r.showwhiskers!==!1,p=r.notched||!1,x=p?1-2*r.notchwidth:1,_,y;Array.isArray(n.bdPos)?(_=n.bdPos[0],y=n.bdPos[1]):(_=n.bdPos,y=n.bdPos);var C=e.selectAll("path.box").data(r.type!=="violin"||r.box.visible?y2.identity:[]);C.enter().append("path").style("vector-effect",a?"none":"non-scaling-stroke").attr("class","box"),C.exit().remove(),C.each(function(k){if(k.empty)return B3.select(this).attr("d","M0,0Z");var S=s.c2l(k.pos+u,!0),L=s.l2p(S-_)+f,w=s.l2p(S+y)+f,A=l?(L+w)/2:s.l2p(S)+f,T=r.whiskerwidth,m=l?L*T+(1-T)*A:s.l2p(S-c)+f,F=l?w*T+(1-T)*A:s.l2p(S+c)+f,E=s.l2p(S-_*x)+f,I=s.l2p(S+y*x)+f,R=r.sizemode==="sd",B=o.c2p(R?k.mean-k.sd:k.q1,!0),O=R?o.c2p(k.mean+k.sd,!0):o.c2p(k.q3,!0),V=y2.constrain(R?o.c2p(k.mean,!0):o.c2p(k.med,!0),Math.min(B,O)+1,Math.max(B,O)-1),j=k.lf===void 0||r.boxpoints===!1||R,q=o.c2p(j?k.min:k.lf,!0),U=o.c2p(j?k.max:k.uf,!0),J=o.c2p(k.ln,!0),ee=o.c2p(k.un,!0);i?B3.select(this).attr("d","M"+V+","+E+"V"+I+"M"+B+","+L+"V"+w+(p?"H"+J+"L"+V+","+I+"L"+ee+","+w:"")+"H"+O+"V"+L+(p?"H"+ee+"L"+V+","+E+"L"+J+","+L:"")+"Z"+(g?"M"+B+","+A+"H"+q+"M"+O+","+A+"H"+U+(v===0?"":"M"+q+","+m+"V"+F+"M"+U+","+m+"V"+F):"")):B3.select(this).attr("d","M"+E+","+V+"H"+I+"M"+L+","+B+"H"+w+(p?"V"+J+"L"+I+","+V+"L"+w+","+ee:"")+"V"+O+"H"+L+(p?"V"+ee+"L"+E+","+V+"L"+L+","+J:"")+"Z"+(g?"M"+A+","+B+"V"+q+"M"+A+","+O+"V"+U+(v===0?"":"M"+m+","+q+"H"+F+"M"+m+","+U+"H"+F):""))})}function Z_e(e,t,r,n){var a=t.x,i=t.y,o=n.bdPos,s=n.bPos,l=r.boxpoints||r.points;y2.seedPseudoRandom();var u=function(v){return v.forEach(function(g){g.t=n,g.trace=r}),v},c=e.selectAll("g.points").data(l?u:[]);c.enter().append("g").attr("class","points"),c.exit().remove();var f=c.selectAll("path").data(function(v){var g,p=v.pts2,x=Math.max((v.max-v.min)/10,v.q3-v.q1),_=x*1e-9,y=x*_6t,C=[],k=0,S;if(r.jitter){if(x===0)for(k=1,C=new Array(p.length),g=0;gv.lo&&(F.so=!0)}return p});f.enter().append("path").classed("point",!0),f.exit().remove(),f.call(x6t.translatePoints,a,i)}function $_e(e,t,r,n){var a=t.val,i=t.pos,o=!!i.rangebreaks,s=n.bPos,l=n.bPosPxOffset||0,u=r.boxmean||(r.meanline||{}).visible,c,f;Array.isArray(n.bdPos)?(c=n.bdPos[0],f=n.bdPos[1]):(c=n.bdPos,f=n.bdPos);var v=e.selectAll("path.mean").data(r.type==="box"&&r.boxmean||r.type==="violin"&&r.box.visible&&r.meanline.visible?y2.identity:[]);v.enter().append("path").attr("class","mean").style({fill:"none","vector-effect":"non-scaling-stroke"}),v.exit().remove(),v.each(function(g){var p=i.c2l(g.pos+s,!0),x=i.l2p(p-c)+l,_=i.l2p(p+f)+l,y=o?(x+_)/2:i.l2p(p)+l,C=a.c2p(g.mean,!0),k=a.c2p(g.mean-g.sd,!0),S=a.c2p(g.mean+g.sd,!0);r.orientation==="h"?B3.select(this).attr("d","M"+C+","+x+"V"+_+(u==="sd"?"m0,0L"+k+","+y+"L"+C+","+x+"L"+S+","+y+"Z":"")):B3.select(this).attr("d","M"+x+","+C+"H"+_+(u==="sd"?"m0,0L"+y+","+k+"L"+x+","+C+"L"+y+","+S+"Z":""))})}K_e.exports={plot:b6t,plotBoxAndWhiskers:X_e,plotPoints:Z_e,plotBoxMean:$_e}});var a7=fe((tgr,J_e)=>{"use strict";var IV=xi(),zV=ni(),qV=ea();function w6t(e,t,r){var n=r||IV.select(e).selectAll("g.trace.boxes");n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=IV.select(this),o=a[0].trace,s=o.line.width;function l(f,v,g,p){f.style("stroke-width",v+"px").call(zV.stroke,g).call(zV.fill,p)}var u=i.selectAll("path.box");if(o.type==="candlestick")u.each(function(f){if(!f.empty){var v=IV.select(this),g=o[f.dir];l(v,g.line.width,g.line.color,g.fillcolor),v.style("opacity",o.selectedpoints&&!f.selected?.3:1)}});else{l(u,s,o.line.color,o.fillcolor),i.selectAll("path.mean").style({"stroke-width":s,"stroke-dasharray":2*s+"px,"+s+"px"}).call(zV.stroke,o.line.color);var c=i.selectAll("path.point");qV.pointStyle(c,o,e)}})}function T6t(e,t,r){var n=t[0].trace,a=r.selectAll("path.point");n.selectedpoints?qV.selectedPointStyle(a,n):qV.pointStyle(a,n,e)}J_e.exports={style:w6t,styleOnSelect:T6t}});var OV=fe((rgr,rbe)=>{"use strict";var A6t=Yi(),BV=Xt(),Hm=kl(),Q_e=ni(),M6t=BV.fillText;function S6t(e,t,r,n){var a=e.cd,i=a[0].trace,o=i.hoveron,s=[],l;return o.indexOf("boxes")!==-1&&(s=s.concat(ebe(e,t,r,n))),o.indexOf("points")!==-1&&(l=tbe(e,t,r)),n==="closest"?l?[l]:s:(l&&s.push(l),s)}function ebe(e,t,r,n){var a=e.cd,i=e.xa,o=e.ya,s=a[0].trace,l=a[0].t,u=s.type==="violin",c,f,v,g,p,x,_,y,C,k,S,L=l.bdPos,w,A,T=l.wHover,m=function(ie){return v.c2l(ie.pos)+l.bPos-v.c2l(x)};u&&s.side!=="both"?(s.side==="positive"&&(C=function(ie){var le=m(ie);return Hm.inbox(le,le+T,k)},w=L,A=0),s.side==="negative"&&(C=function(ie){var le=m(ie);return Hm.inbox(le-T,le,k)},w=0,A=L)):(C=function(ie){var le=m(ie);return Hm.inbox(le-T,le+T,k)},w=A=L);var F;u?F=function(ie){return Hm.inbox(ie.span[0]-p,ie.span[1]-p,k)}:F=function(ie){return Hm.inbox(ie.min-p,ie.max-p,k)},s.orientation==="h"?(p=t,x=r,_=F,y=C,c="y",v=o,f="x",g=i):(p=r,x=t,_=C,y=F,c="x",v=i,f="y",g=o);var E=Math.min(1,L/Math.abs(v.r2c(v.range[1])-v.r2c(v.range[0])));k=e.maxHoverDistance-E,S=e.maxSpikeDistance-E;function I(ie){return(_(ie)+y(ie))/2}var R=Hm.getDistanceFunction(n,_,y,I);if(Hm.getClosest(a,R,e),e.index===!1)return[];var B=a[e.index],O=s.line.color,V=(s.marker||{}).color;Q_e.opacity(O)&&s.line.width?e.color=O:Q_e.opacity(V)&&s.boxpoints?e.color=V:e.color=s.fillcolor,e[c+"0"]=v.c2p(B.pos+l.bPos-A,!0),e[c+"1"]=v.c2p(B.pos+l.bPos+w,!0),e[c+"LabelVal"]=B.orig_p!==void 0?B.orig_p:B.pos;var j=c+"Spike";e.spikeDistance=I(B)*S/k,e[j]=v.c2p(B.pos,!0);var q=s.boxmean||s.sizemode==="sd"||(s.meanline||{}).visible,U=s.boxpoints||s.points,J=U&&q?["max","uf","q3","med","mean","q1","lf","min"]:U&&!q?["max","uf","q3","med","q1","lf","min"]:!U&&q?["max","q3","med","mean","q1","min"]:["max","q3","med","q1","min"],ee=g.range[1]{"use strict";nbe.exports=function(t,r){return r.hoverOnBox&&(t.hoverOnBox=r.hoverOnBox),"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var NV=fe((igr,abe)=>{"use strict";abe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l;if(r===!1)for(s=0;s{"use strict";obe.exports={attributes:PA(),layoutAttributes:FA(),supplyDefaults:RA().supplyDefaults,crossTraceDefaults:RA().crossTraceDefaults,supplyLayoutDefaults:t7().supplyLayoutDefaults,calc:RV(),crossTraceCalc:n7().crossTraceCalc,plot:i7().plot,style:a7().style,styleOnSelect:a7().styleOnSelect,hoverPoints:OV().hoverPoints,eventData:ibe(),selectPoints:NV(),moduleType:"trace",name:"box",basePlotModule:gu(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","boxLayout","zoomScale"],meta:{}}});var ube=fe((ogr,lbe)=>{"use strict";lbe.exports=sbe()});var O3=fe((sgr,fbe)=>{"use strict";var E6t=_s(),{extendFlat:a0}=ta(),k6t=Ho(),{axisHoverFormat:UV}=pl(),C6t=Ds(),{hovertemplateAttrs:L6t,templatefallbackAttrs:cbe,texttemplateAttrs:P6t}=Oo(),B0=Ol();fbe.exports=a0({z:{valType:"data_array",editType:"calc"},x:a0({},B0.x,{impliedEdits:{xtype:"array"}}),x0:a0({},B0.x0,{impliedEdits:{xtype:"scaled"}}),dx:a0({},B0.dx,{impliedEdits:{xtype:"scaled"}}),y:a0({},B0.y,{impliedEdits:{ytype:"array"}}),y0:a0({},B0.y0,{impliedEdits:{ytype:"scaled"}}),dy:a0({},B0.dy,{impliedEdits:{ytype:"scaled"}}),xperiod:a0({},B0.xperiod,{impliedEdits:{xtype:"scaled"}}),yperiod:a0({},B0.yperiod,{impliedEdits:{ytype:"scaled"}}),xperiod0:a0({},B0.xperiod0,{impliedEdits:{xtype:"scaled"}}),yperiod0:a0({},B0.yperiod0,{impliedEdits:{ytype:"scaled"}}),xperiodalignment:a0({},B0.xperiodalignment,{impliedEdits:{xtype:"scaled"}}),yperiodalignment:a0({},B0.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:UV("x"),yhoverformat:UV("y"),zhoverformat:UV("z",1),hovertemplate:L6t(),hovertemplatefallback:cbe(),texttemplate:P6t({arrayOk:!1,editType:"plot"},{keys:["x","y","z","text"]}),texttemplatefallback:cbe({editType:"plot"}),textfont:C6t({editType:"plot",autoSize:!0,autoColor:!0,colorEditType:"style"}),showlegend:a0({},k6t.showlegend,{dflt:!1}),zorder:B0.zorder},E6t("",{cLetter:"z",autoColorDflt:!1}))});var s7=fe((lgr,dbe)=>{"use strict";var F6t=aa(),o7=Xt(),D6t=bi();dbe.exports=function(t,r,n,a,i,o){var s=n("z");i=i||"x",o=o||"y";var l,u;if(s===void 0||!s.length)return 0;if(o7.isArray1D(s)){l=n(i),u=n(o);var c=o7.minRowLength(l),f=o7.minRowLength(u);if(c===0||f===0)return 0;r._length=Math.min(c,f,s.length)}else{if(l=hbe(i,n),u=hbe(o,n),!R6t(s))return 0;n("transpose"),r._length=null}var v=D6t.getComponentMethod("calendars","handleTraceDefaults");return v(t,r,[i,o],a),!0};function hbe(e,t){var r=t(e),n=r?t(e+"type","array"):"scaled";return n==="scaled"&&(t(e+"0"),t("d"+e)),r}function R6t(e){for(var t=!0,r=!1,n=!1,a,i=0;i0&&(r=!0);for(var o=0;o{"use strict";var vbe=Xt();pbe.exports=function(t,r){t("texttemplate"),t("texttemplatefallback");var n=vbe.extendFlat({},r.font,{color:"auto",size:"auto"});vbe.coerceFont(t,"textfont",n)}});var VV=fe((cgr,gbe)=>{"use strict";gbe.exports=function(t,r,n){var a=n("zsmooth");a===!1&&(n("xgap"),n("ygap")),n("zhoverformat")}});var xbe=fe((fgr,ybe)=>{"use strict";var mbe=Xt(),I6t=s7(),z6t=IA(),q6t=sp(),B6t=VV(),O6t=Vc(),N6t=O3();ybe.exports=function(t,r,n,a){function i(s,l){return mbe.coerce(t,r,N6t,s,l)}var o=I6t(t,r,i,a);if(!o){r.visible=!1;return}q6t(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),z6t(i,a),B6t(t,r,i,a),i("hoverongaps"),i("connectgaps",mbe.isArray1D(r.z)&&r.zsmooth!==!1),O6t(t,r,a,i,{prefix:"",cLetter:"z"}),i("zorder")}});var GV=fe((hgr,_be)=>{"use strict";var N3=aa();_be.exports={count:function(e,t,r){return r[e]++,1},sum:function(e,t,r,n){var a=n[t];return N3(a)?(a=Number(a),r[e]+=a,a):0},avg:function(e,t,r,n,a){var i=n[t];return N3(i)&&(i=Number(i),r[e]+=i,a[e]++),0},min:function(e,t,r,n){var a=n[t];if(N3(a))if(a=Number(a),N3(r[e])){if(r[e]>a){var i=a-r[e];return r[e]=a,i}}else return r[e]=a,a;return 0},max:function(e,t,r,n){var a=n[t];if(N3(a))if(a=Number(a),N3(r[e])){if(r[e]{"use strict";bbe.exports={percent:function(e,t){for(var r=e.length,n=100/t,a=0;a{"use strict";wbe.exports=function(t,r){for(var n=t.length,a=0,i=0;i{"use strict";var U3=Wa(),x2=U3.ONEAVGYEAR,Tbe=U3.ONEAVGMONTH,u7=U3.ONEDAY,Abe=U3.ONEHOUR,Mbe=U3.ONEMIN,Sbe=U3.ONESEC,Ebe=Yi().tickIncrement;Lbe.exports=function(t,r,n,a,i){var o=-1.1*r,s=-.1*r,l=t-s,u=n[0],c=n[1],f=Math.min(l7(u+s,u+l,a,i),l7(c+s,c+l,a,i)),v=Math.min(l7(u+o,u+s,a,i),l7(c+o,c+s,a,i)),g,p;if(f>v&&vu7){var x=g===x2?1:6,_=g===x2?"M12":"M1";return function(y,C){var k=a.c2d(y,x2,i),S=k.indexOf("-",x);S>0&&(k=k.slice(0,S));var L=a.d2c(k,0,i);if(LSbe?e>u7?e>x2*1.1?x2:e>Tbe*1.1?Tbe:u7:e>Abe?Abe:e>Mbe?Mbe:Sbe:Math.pow(10,Math.floor(Math.log(e)/Math.LN10))}function U6t(e,t,r,n,a,i){if(n&&e>u7){var o=Cbe(t,a,i),s=Cbe(r,a,i),l=e===x2?0:1;return o[l]!==s[l]}return Math.floor(r/e)-Math.floor(t/e)>.1}function Cbe(e,t,r){var n=t.c2d(e,x2,r).split("-");return n[0]===""&&(n.unshift(),n[0]="-"+n[0]),n}});var ZV=fe((ggr,Ibe)=>{"use strict";var YV=aa(),sd=Xt(),Pbe=bi(),Tv=Yi(),{hasColorscale:Fbe}=Wf(),Dbe=Mh(),V6t=EA(),Rbe=GV(),G6t=HV(),H6t=jV(),j6t=WV();function W6t(e,t){var r=[],n=[],a=t.orientation==="h",i=Tv.getFromId(e,a?t.yaxis:t.xaxis),o=a?"y":"x",s={x:"y",y:"x"}[o],l=t[o+"calendar"],u=t.cumulative,c,f=XV(e,t,i,o),v=f[0],g=f[1],p=typeof v.size=="string",x=[],_=p?x:v,y=[],C=[],k=[],S=0,L=t.histnorm,w=t.histfunc,A=L.indexOf("density")!==-1,T,m,F;u.enabled&&A&&(L=L.replace(/ ?density$/,""),A=!1);var E=w==="max"||w==="min",I=E?null:0,R=Rbe.count,B=G6t[L],O=!1,V=function(le){return i.r2c(le,0,l)},j;for(sd.isArrayOrTypedArray(t[s])&&w!=="count"&&(j=t[s],O=w==="avg",R=Rbe[w]),c=V(v.start),m=V(v.end)+(c-Tv.tickIncrement(c,v.size,!1,l))/1e6;c=0&&F=ae;c--)if(n[c]){pe=c;break}for(c=ae;c<=pe;c++)if(YV(r[c])&&YV(n[c])){var ie={p:r[c],s:n[c],b:0};u.enabled||(ie.pts=k[c],ee?ie.ph0=ie.ph1=k[c].length?g[k[c][0]]:r[c]:(t._computePh=!0,ie.ph0=K(x[c]),ie.ph1=K(x[c+1],!0))),ne.push(ie)}return ne.length===1&&(ne[0].width1=Tv.tickIncrement(ne[0].p,v.size,!1,l)-ne[0].p),Fbe(t,"marker")&&Dbe(e,t,{vals:t.marker.color,containerStr:"marker",cLetter:"c"}),Fbe(t,"marker.line")&&Dbe(e,t,{vals:t.marker.line.color,containerStr:"marker.line",cLetter:"c"}),V6t(ne,t),sd.isArrayOrTypedArray(t.selectedpoints)&&sd.tagSelected(ne,t,xe),ne}function XV(e,t,r,n,a){var ue;var i=n+"bins",o=e._fullLayout,s=t["_"+n+"bingroup"],l=o._histogramBinOpts[s],u=o.barmode==="overlay",c,f,v,g,p,x,_,y=function(K){return r.r2c(K,0,g)},C=function(K){return r.c2r(K,0,g)},k=r.type==="date"?function(K){return K||K===0?sd.cleanDate(K,null,g):null}:function(K){return YV(K)?Number(K):null};function S(K,_e,ne){_e[K+"Found"]?(_e[K]=k(_e[K]),_e[K]===null&&(_e[K]=ne[K])):(x[K]=_e[K]=ne[K],sd.nestedProperty(f[0],i+"."+K).set(ne[K]))}if(t["_"+n+"autoBinFinished"])delete t["_"+n+"autoBinFinished"];else{f=l.traces;var L=[],w=!0,A=!1,T=!1;for(c=0;cr.r2l(j)&&(U=Tv.tickIncrement(U,l.size,!0,g)),R.start=r.l2r(U),V||sd.nestedProperty(t,i+".start").set(R.start)}var J=l.end,ee=r.r2l(I.end),ce=ee!==void 0;if((l.endFound||ce)&&ee!==r.r2l(J)){var ye=ce?ee:sd.aggNums(Math.max,null,p);R.end=r.l2r(ye),ce||sd.nestedProperty(t,i+".start").set(R.end)}var xe="autobin"+n;return t._input[xe]===!1&&(t._input[i]=sd.extendFlat({},t[i]||{}),delete t._input[xe],delete t[xe]),[R,p]}function Y6t(e,t,r,n,a){var i=e._fullLayout,o=X6t(e,t),s=!1,l=1/0,u=[t],c,f,v;for(c=0;c=0;n--)s(n);else if(t==="increasing"){for(n=1;n=0;n--)e[n]+=e[n+1];r==="exclude"&&(e.push(0),e.shift())}}Ibe.exports={calc:W6t,calcAllAutoBins:XV}});var Gbe=fe((mgr,Vbe)=>{"use strict";var zbe=Xt(),V3=Yi(),qbe=GV(),$6t=HV(),K6t=jV(),J6t=WV(),Bbe=ZV().calcAllAutoBins;Vbe.exports=function(t,r){var n=V3.getFromId(t,r.xaxis),a=V3.getFromId(t,r.yaxis),i=r.xcalendar,o=r.ycalendar,s=function(nt){return n.r2c(nt,0,i)},l=function(nt){return a.r2c(nt,0,o)},u=function(nt){return n.c2r(nt,0,i)},c=function(nt){return a.c2r(nt,0,o)},f,v,g,p,x=Bbe(t,r,n,"x"),_=x[0],y=x[1],C=Bbe(t,r,a,"y"),k=C[0],S=C[1],L=r._length;y.length>L&&y.splice(L,y.length-L),S.length>L&&S.splice(L,S.length-L);var w=[],A=[],T=[],m=typeof _.size=="string",F=typeof k.size=="string",E=[],I=[],R=m?E:_,B=F?I:k,O=0,V=[],j=[],q=r.histnorm,U=r.histfunc,J=q.indexOf("density")!==-1,ee=U==="max"||U==="min",ce=ee?null:0,ye=qbe.count,xe=$6t[q],ue=!1,K=[],_e=[],ne="z"in r?r.z:"marker"in r&&Array.isArray(r.marker.color)?r.marker.color:"";ne&&U!=="count"&&(ue=U==="avg",ye=qbe[U]);var ae=_.size,pe=s(_.start),ie=s(_.end)+(pe-V3.tickIncrement(pe,ae,!1,i))/1e6;for(f=pe;f=0&&g=0&&p{"use strict";var c1=Xt(),Hbe=Wa().BADNUM,jbe=cp();Wbe.exports=function(t,r,n,a,i,o){var s=t._length,l=r.makeCalcdata(t,a),u=n.makeCalcdata(t,i);l=jbe(t,r,a,l).vals,u=jbe(t,n,i,u).vals;var c=t.text,f=c!==void 0&&c1.isArray1D(c),v=t.hovertext,g=v!==void 0&&c1.isArray1D(v),p,x,_=c1.distinctVals(l),y=_.vals,C=c1.distinctVals(u),k=C.vals,S=[],L,w,A=k.length,T=y.length;for(p=0;p{"use strict";var Q6t=aa(),eMt=Xt(),f7=Wa().BADNUM;Ybe.exports=function(t,r,n,a){var i,o,s,l,u,c;function f(y){if(Q6t(y))return+y}if(r&&r.transpose){for(i=0,u=0;u{"use strict";var tMt=Xt(),Xbe=.01,rMt=[[-1,0],[1,0],[0,-1],[0,1]];function nMt(e){return .5-.25*Math.min(1,e*.5)}$be.exports=function(t,r){var n=1,a;for(Zbe(t,r),a=0;aXbe;a++)n=Zbe(t,r,nMt(n));return n>Xbe&&tMt.log("interp2d didn't converge quickly",n),t};function Zbe(e,t,r){var n=0,a,i,o,s,l,u,c,f,v,g,p,x,_;for(s=0;sx&&(n=Math.max(n,Math.abs(e[i][o]-p)/(_-x))))}return n}});var v7=fe((bgr,Kbe)=>{"use strict";var iMt=Xt().maxRowLength;Kbe.exports=function(t){var r=[],n={},a=[],i=t[0],o=[],s=[0,0,0],l=iMt(t),u,c,f,v,g,p,x,_;for(c=0;c=0;g--)v=a[g],c=v[0],f=v[1],p=((n[[c-1,f]]||s)[2]+(n[[c+1,f]]||s)[2]+(n[[c,f-1]]||s)[2]+(n[[c,f+1]]||s)[2])/20,p&&(x[v]=[c,f,p],a.splice(g,1),_=!0);if(!_)throw"findEmpties iterated with no new neighbors";for(v in x)n[v]=x[v],r.push(x[v])}return r.sort(function(y,C){return C[2]-y[2]})}});var $V=fe((wgr,e3e)=>{"use strict";var Jbe=bi(),Qbe=Xt().isArrayOrTypedArray;e3e.exports=function(t,r,n,a,i,o){var s=[],l=Jbe.traceIs(t,"contour"),u=Jbe.traceIs(t,"histogram"),c,f,v,g=Qbe(r)&&r.length>1;if(g&&!u&&o.type!=="category"){var p=r.length;if(p<=i){if(l)s=Array.from(r).slice(0,i);else if(i===1)o.type==="log"?s=[.5*r[0],2*r[0]]:s=[r[0]-.5,r[0]+.5];else if(o.type==="log"){for(s=[Math.pow(r[0],1.5)/Math.pow(r[1],.5)],v=1;v{"use strict";var t3e=bi(),KV=Xt(),p7=Yi(),r3e=cp(),aMt=Gbe(),oMt=Mh(),sMt=c7(),lMt=h7(),uMt=d7(),cMt=v7(),g7=$V(),JV=Wa().BADNUM;i3e.exports=function(t,r){var n=p7.getFromId(t,r.xaxis||"x"),a=p7.getFromId(t,r.yaxis||"y"),i=t3e.traceIs(r,"contour"),o=t3e.traceIs(r,"histogram"),s=i?"best":r.zsmooth,l,u,c,f,v,g,p,x,_,y,C;if(n._minDtick=0,a._minDtick=0,o)C=aMt(t,r),f=C.orig_x,l=C.x,u=C.x0,c=C.dx,x=C.orig_y,v=C.y,g=C.y0,p=C.dy,_=C.z;else{var k=r.z;KV.isArray1D(k)?(sMt(r,n,a,"x","y",["z"]),l=r._x,v=r._y,k=r._z):(f=r.x?n.makeCalcdata(r,"x"):[],x=r.y?a.makeCalcdata(r,"y"):[],l=r3e(r,n,"x",f).vals,v=r3e(r,a,"y",x).vals,r._x=l,r._y=v),u=r.x0,c=r.dx,g=r.y0,p=r.dy,_=lMt(k,r,n,a)}(n.rangebreaks||a.rangebreaks)&&(_=fMt(l,v,_),o||(l=n3e(l),v=n3e(v),r._x=l,r._y=v)),!o&&(i||r.connectgaps)&&(r._emptypoints=cMt(_),uMt(_,r._emptypoints));function S(R){s=r._input.zsmooth=r.zsmooth=!1,KV.warn('cannot use zsmooth: "fast": '+R)}function L(R){if(R.length>1){var B=(R[R.length-1]-R[0])/(R.length-1),O=Math.abs(B/100);for(y=0;yO)return!1}return!0}r._islinear=!1,n.type==="log"||a.type==="log"?s==="fast"&&S("log axis found"):L(l)?L(v)?r._islinear=!0:s==="fast"&&S("y scale is not linear"):s==="fast"&&S("x scale is not linear");var w=KV.maxRowLength(_),A=r.xtype==="scaled"?"":l,T=g7(r,A,u,c,w,n),m=r.ytype==="scaled"?"":v,F=g7(r,m,g,p,_.length,a);r._extremes[n._id]=p7.findExtremes(n,T),r._extremes[a._id]=p7.findExtremes(a,F);var E={x:T,y:F,z:_,text:r._text||r.text,hovertext:r._hovertext||r.hovertext};if(r.xperiodalignment&&f&&(E.orig_x=f),r.yperiodalignment&&x&&(E.orig_y=x),A&&A.length===T.length-1&&(E.xCenter=A),m&&m.length===F.length-1&&(E.yCenter=m),o&&(E.xRanges=C.xRanges,E.yRanges=C.yRanges,E.pts=C.pts),i||oMt(t,r,{vals:_,cLetter:"z"}),i&&r.contours&&r.contours.coloring==="heatmap"){var I={type:r.type==="contour"?"heatmap":"histogram2d",xcalendar:r.xcalendar,ycalendar:r.ycalendar};E.xfill=g7(I,A,u,c,w,n),E.yfill=g7(I,m,g,p,_.length,a)}return[E]};function n3e(e){for(var t=[],r=e.length,n=0;n{"use strict";y7.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"]];y7.STYLE=y7.CSS_DECLARATIONS.map(function(e){return e.join(": ")+"; "}).join("")});var eG=fe((Mgr,o3e)=>{"use strict";var a3e=x7(),hMt=ea(),QV=Xt(),G3=null;function dMt(){if(G3!==null)return G3;G3=!1;var e=QV.isSafari()||QV.isMacWKWebView()||QV.isIOS();if(window.navigator.userAgent&&!e){var t=Array.from(a3e.CSS_DECLARATIONS).reverse(),r=window.CSS&&window.CSS.supports||window.supportsCSS;if(typeof r=="function")G3=t.some(function(o){return r.apply(null,o)});else{var n=hMt.tester.append("image").attr("style",a3e.STYLE),a=window.getComputedStyle(n.node()),i=a.imageRendering;G3=t.some(function(o){var s=o[1];return i===s||i===s.toLowerCase()}),n.remove()}}return G3}o3e.exports=dMt});var _7=fe((Sgr,g3e)=>{"use strict";var s3e=xi(),vMt=bi(),pMt=ea(),gMt=Yi(),Av=Xt(),l3e=as(),mMt=cC(),u3e=ni(),yMt=js().extractOpts,xMt=js().makeColorScaleFuncFromTrace,_Mt=Q0(),bMt=nc(),tG=bMt.LINE_SPACING,wMt=eG(),TMt=x7().STYLE,v3e="heatmap-label";function p3e(e){return e.selectAll("g."+v3e)}function c3e(e){p3e(e).remove()}g3e.exports=function(e,t,r,n){var a=t.xaxis,i=t.yaxis;Av.makeTraceGroups(n,r,"hm").each(function(o){var s=s3e.select(this),l=o[0],u=l.trace,c=u.xgap||0,f=u.ygap||0,v=l.z,g=l.x,p=l.y,x=l.xCenter,_=l.yCenter,y=vMt.traceIs(u,"contour"),C=y?"best":u.zsmooth,k=v.length,S=Av.maxRowLength(v),L=!1,w=!1,A,T,m,F,E,I,R,B;for(I=0;A===void 0&&I0;)T=a.c2p(g[I]),I--;for(T0;)E=i.c2p(p[I]),I--;E=a._length||T<=0||F>=i._length||E<=0;if(U){var J=s.selectAll("image").data([]);J.exit().remove(),c3e(s);return}var ee,ce;O==="fast"?(ee=S,ce=k):(ee=j,ce=q);var ye=document.createElement("canvas");ye.width=ee,ye.height=ce;var xe=ye.getContext("2d",{willReadFrequently:!0}),ue=xMt(u,{noNumericCheck:!0,returnArray:!0}),K,_e;O==="fast"?(K=L?function(oa){return S-1-oa}:Av.identity,_e=w?function(oa){return k-1-oa}:Av.identity):(K=function(oa){return Av.constrain(Math.round(a.c2p(g[oa])-A),0,j)},_e=function(oa){return Av.constrain(Math.round(i.c2p(p[oa])-F),0,q)});var ne=_e(0),ae=[ne,ne],pe=L?0:1,ie=w?0:1,le=0,me=0,be=0,De=0,Ge,ht,it,Oe,ze;function ct(oa,Ma=0){if(oa===void 0)return[0,0,0,0];var Ga=ue(oa);return Ga[0]=Math.round(Ga[0]),Ga[1]=Math.round(Ga[1]),Ga[2]=Math.round(Ga[2]),le+=Ma,me+=Ga[0]*Ma,be+=Ga[1]*Ma,De+=Ga[2]*Ma,Ga}function et(oa,Ma,Ga,ss){var mo=oa[Ga.bin0];if(mo===void 0)return ct(void 0,1);var sl=oa[Ga.bin1],Eo=Ma[Ga.bin0],ao=Ma[Ga.bin1],Da=sl-mo||0,bl=Eo-mo||0,bo;return sl===void 0?ao===void 0?bo=0:Eo===void 0?bo=2*(ao-mo):bo=(2*ao-Eo-mo)*2/3:ao===void 0?Eo===void 0?bo=0:bo=(2*mo-sl-Eo)*2/3:Eo===void 0?bo=(2*ao-sl-mo)*2/3:bo=ao+mo-sl-Eo,ct(mo+Ga.frac*Da+ss.frac*(bl+Ga.frac*bo))}if(O!=="default"){var qe=0,we;try{we=new Uint8Array(ee*ce*4)}catch(oa){we=new Array(ee*ce*4)}if(O==="smooth"){var Le=x||g,Ke=_||p,Te=new Array(Le.length),Ve=new Array(Ke.length),$e=new Array(j),ot=x?h3e:f3e,tt=_?h3e:f3e,nt,We,mt;for(I=0;IKr||Kr>i._length))for(R=ft;Rdn||dn>a._length)){var xr=mMt({x:Nr,y:pr},u,e._fullLayout);xr.x=Nr,xr.y=pr;var Fr=l.z[I][R];Fr===void 0?(xr.z="",xr.zLabel=""):(xr.z=Fr,xr.zLabel=gMt.tickText(Ct,Fr,"hover").text);var Zr=l.text&&l.text[I]&&l.text[I][R];(Zr===void 0||Zr===!1)&&(Zr=""),xr.text=Zr;var Cn=Av.texttemplateString({data:[xr,u._meta],fallback:u.texttemplatefallback,labels:xr,locale:e._fullLayout._d3locale,template:Ot});if(Cn){var Dt=Cn.split("
"),At=Dt.length,Vt=0;for(B=0;B{"use strict";m3e.exports={min:"zmin",max:"zmax"}});var b7=fe((kgr,y3e)=>{"use strict";var AMt=xi();y3e.exports=function(t){AMt.select(t).selectAll(".hm image").style("opacity",function(r){return r.trace.opacity})}});var T7=fe((Cgr,_3e)=>{"use strict";var x3e=kl(),zA=Xt(),w7=zA.isArrayOrTypedArray,MMt=Yi(),SMt=js().extractOpts;_3e.exports=function(t,r,n,a,i){i||(i={});var o=i.isContour,s=t.cd[0],l=s.trace,u=t.xa,c=t.ya,f=s.x,v=s.y,g=s.z,p=s.xCenter,x=s.yCenter,_=s.zmask,y=l.zhoverformat,C=f,k=v,S,L,w,A;if(t.index!==!1){try{w=Math.round(t.index[1]),A=Math.round(t.index[0])}catch(J){zA.error("Error hovering on heatmap, pointNumber must be [row,col], found:",t.index);return}if(w<0||w>=g[0].length||A<0||A>g.length)return}else{if(x3e.inbox(r-f[0],r-f[f.length-1],0)>0||x3e.inbox(n-v[0],n-v[v.length-1],0)>0)return;if(o){var T;for(C=[2*f[0]-f[1]],T=1;T{"use strict";b3e.exports={attributes:O3(),supplyDefaults:xbe(),calc:m7(),plot:_7(),colorbar:H3(),style:b7(),hoverPoints:T7(),moduleType:"trace",name:"heatmap",basePlotModule:gu(),categories:["cartesian","svg","2dMap","showLegend"],meta:{}}});var A3e=fe((Pgr,T3e)=>{"use strict";T3e.exports=w3e()});var rG=fe((Fgr,M3e)=>{"use strict";M3e.exports=function(t,r){return{start:{valType:"any",editType:"calc"},end:{valType:"any",editType:"calc"},size:{valType:"any",editType:"calc"},editType:"calc"}}});var E3e=fe((Dgr,S3e)=>{"use strict";S3e.exports={eventDataKeys:["binNumber"]}});var A7=fe((Rgr,P3e)=>{"use strict";var o0=u1(),k3e=pl().axisHoverFormat,{hovertemplateAttrs:EMt,texttemplateAttrs:kMt,templatefallbackAttrs:C3e}=Oo(),nG=Ds(),L3e=rG(),CMt=E3e(),iG=ta().extendFlat;P3e.exports={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},xhoverformat:k3e("x"),yhoverformat:k3e("y"),text:iG({},o0.text,{}),hovertext:iG({},o0.hovertext,{}),orientation:o0.orientation,histfunc:{valType:"enumerated",values:["count","sum","avg","min","max"],dflt:"count",editType:"calc"},histnorm:{valType:"enumerated",values:["","percent","probability","density","probability density"],dflt:"",editType:"calc"},cumulative:{enabled:{valType:"boolean",dflt:!1,editType:"calc"},direction:{valType:"enumerated",values:["increasing","decreasing"],dflt:"increasing",editType:"calc"},currentbin:{valType:"enumerated",values:["include","exclude","half"],dflt:"include",editType:"calc"},editType:"calc"},nbinsx:{valType:"integer",min:0,dflt:0,editType:"calc"},xbins:L3e("x",!0),nbinsy:{valType:"integer",min:0,dflt:0,editType:"calc"},ybins:L3e("y",!0),autobinx:{valType:"boolean",dflt:null,editType:"calc"},autobiny:{valType:"boolean",dflt:null,editType:"calc"},bingroup:{valType:"string",dflt:"",editType:"calc"},hovertemplate:EMt({},{keys:CMt.eventDataKeys}),hovertemplatefallback:C3e(),texttemplate:kMt({arrayOk:!1,editType:"plot"},{keys:["label","value"]}),texttemplatefallback:C3e({editType:"plot"}),textposition:iG({},o0.textposition,{arrayOk:!1}),textfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),outsidetextfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextfont:nG({arrayOk:!1,editType:"plot",colorEditType:"style"}),insidetextanchor:o0.insidetextanchor,textangle:o0.textangle,cliponaxis:o0.cliponaxis,constraintext:o0.constraintext,marker:o0.marker,offsetgroup:o0.offsetgroup,alignmentgroup:o0.alignmentgroup,selected:o0.selected,unselected:o0.unselected,zorder:o0.zorder}});var I3e=fe((Igr,R3e)=>{"use strict";var F3e=bi(),qA=Xt(),D3e=ni(),LMt=z0().handleText,PMt=ZC(),FMt=A7();R3e.exports=function(t,r,n,a){function i(C,k){return qA.coerce(t,r,FMt,C,k)}var o=i("x"),s=i("y"),l=i("cumulative.enabled");l&&(i("cumulative.direction"),i("cumulative.currentbin")),i("text");var u=i("textposition");LMt(t,r,a,i,u,{moduleHasSelected:!0,moduleHasUnselected:!0,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat");var c=i("orientation",s&&!o?"h":"v"),f=c==="v"?"x":"y",v=c==="v"?"y":"x",g=o&&s?Math.min(qA.minRowLength(o)&&qA.minRowLength(s)):qA.minRowLength(r[f]||[]);if(!g){r.visible=!1;return}r._length=g;var p=F3e.getComponentMethod("calendars","handleTraceDefaults");p(t,r,["x","y"],a);var x=r[v];x&&i("histfunc"),i("histnorm"),i("autobin"+f),PMt(t,r,i,n,a),qA.coerceSelectionMarkerOpacity(r,i);var _=(r.marker.line||{}).color,y=F3e.getComponentMethod("errorbars","supplyDefaults");y(t,r,_||D3e.defaultLine,{axis:"y"}),y(t,r,_||D3e.defaultLine,{axis:"x",inherit:"y"}),i("zorder")}});var S7=fe((zgr,B3e)=>{"use strict";var BA=Xt(),DMt=El(),M7=bi().traceIs,RMt=n2(),IMt=z0().validateCornerradius,z3e=BA.nestedProperty,aG=Jx().getAxisGroup,q3e=[{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"}],zMt=["x","y"];B3e.exports=function(t,r){var n=r._histogramBinOpts={},a=[],i={},o=[],s,l,u,c,f,v,g;function p(O,V){return BA.coerce(s._input,s,s._module.attributes,O,V)}function x(O){return O.orientation==="v"?"x":"y"}function _(O,V){var j=DMt.getFromTrace({_fullLayout:r},O,V);return j.type}function y(O,V,j){var q=O.uid+"__"+j;V||(V=q);var U=_(O,j),J=O[j+"calendar"]||"",ee=n[V],ce=!0;ee&&(U===ee.axType&&J===ee.calendar?(ce=!1,ee.traces.push(O),ee.dirs.push(j)):(V=q,U!==ee.axType&&BA.warn(["Attempted to group the bins of trace",O.index,"set on a","type:"+U,"axis","with bins on","type:"+ee.axType,"axis."].join(" ")),J!==ee.calendar&&BA.warn(["Attempted to group the bins of trace",O.index,"set with a",J,"calendar","with bins",ee.calendar?"on a "+ee.calendar+" calendar":"w/o a set calendar"].join(" ")))),ce&&(n[V]={traces:[O],dirs:[j],axType:U,calendar:O[j+"calendar"]||""}),O["_"+j+"bingroup"]=V}for(f=0;f{"use strict";var qMt=I3().hoverPoints,BMt=Yi().hoverLabelText;O3e.exports=function(t,r,n,a,i){var o=qMt(t,r,n,a,i);if(o){t=o[0];var s=t.cd[t.index],l=t.cd[0].trace;if(!l.cumulative.enabled){var u=l.orientation==="h"?"y":"x";t[u+"Label"]=BMt(t[u+"a"],[s.ph0,s.ph1],l[u+"hoverformat"])}return o}}});var oG=fe((Bgr,U3e)=>{"use strict";U3e.exports=function(t,r,n,a,i){if(t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"zLabelVal"in r&&(t.z=r.zLabelVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),!(n.cumulative||{}).enabled){var o=Array.isArray(i)?a[0].pts[i[0]][i[1]]:a[i].pts;t.pointNumbers=o,t.binNumber=t.pointNumber,delete t.pointNumber,delete t.pointIndex,t.pointIndices=o}return t}});var G3e=fe((Ogr,V3e)=>{"use strict";V3e.exports={attributes:A7(),layoutAttributes:XC(),supplyDefaults:I3e(),crossTraceDefaults:S7(),supplyLayoutDefaults:SV(),calc:ZV().calc,crossTraceCalc:i2().crossTraceCalc,plot:m2().plot,layerName:"barlayer",style:_v().style,styleOnSelect:_v().styleOnSelect,colorbar:Zf(),hoverPoints:N3e(),selectPoints:z3(),eventData:oG(),moduleType:"trace",name:"histogram",basePlotModule:gu(),categories:["bar-like","cartesian","svg","bar","histogram","oriented","errorBarsOK","showLegend"],meta:{}}});var j3e=fe((Ngr,H3e)=>{"use strict";H3e.exports=G3e()});var k7=fe((Ugr,X3e)=>{"use strict";var _p=A7(),W3e=rG(),E7=O3(),OMt=Ho(),sG=pl().axisHoverFormat,{hovertemplateAttrs:NMt,texttemplateAttrs:UMt,templatefallbackAttrs:Y3e}=Oo(),VMt=_s(),OA=ta().extendFlat;X3e.exports=OA({x:_p.x,y:_p.y,z:{valType:"data_array",editType:"calc"},marker:{color:{valType:"data_array",editType:"calc"},editType:"calc"},histnorm:_p.histnorm,histfunc:_p.histfunc,nbinsx:_p.nbinsx,xbins:W3e("x"),nbinsy:_p.nbinsy,ybins:W3e("y"),autobinx:_p.autobinx,autobiny:_p.autobiny,bingroup:OA({},_p.bingroup,{}),xbingroup:OA({},_p.bingroup,{}),ybingroup:OA({},_p.bingroup,{}),xgap:E7.xgap,ygap:E7.ygap,zsmooth:E7.zsmooth,xhoverformat:sG("x"),yhoverformat:sG("y"),zhoverformat:sG("z",1),hovertemplate:NMt({},{keys:["z"]}),hovertemplatefallback:Y3e(),texttemplate:UMt({arrayOk:!1,editType:"plot"},{keys:["z"]}),texttemplatefallback:Y3e({editType:"plot"}),textfont:E7.textfont,showlegend:OA({},OMt.showlegend,{dflt:!1})},VMt("",{cLetter:"z",autoColorDflt:!1}))});var lG=fe((Vgr,$3e)=>{"use strict";var GMt=bi(),Z3e=Xt();$3e.exports=function(t,r,n,a){var i=n("x"),o=n("y"),s=Z3e.minRowLength(i),l=Z3e.minRowLength(o);if(!s||!l){r.visible=!1;return}r._length=Math.min(s,l);var u=GMt.getComponentMethod("calendars","handleTraceDefaults");u(t,r,["x","y"],a);var c=n("z")||n("marker.color");c&&n("histfunc"),n("histnorm"),n("autobinx"),n("autobiny")}});var J3e=fe((Ggr,K3e)=>{"use strict";var HMt=Xt(),jMt=lG(),WMt=VV(),YMt=Vc(),XMt=IA(),ZMt=k7();K3e.exports=function(t,r,n,a){function i(o,s){return HMt.coerce(t,r,ZMt,o,s)}jMt(t,r,i,a),r.visible!==!1&&(WMt(t,r,i,a),YMt(t,r,a,i,{prefix:"",cLetter:"z"}),i("hovertemplate"),i("hovertemplatefallback"),XMt(i,a),i("xhoverformat"),i("yhoverformat"))}});var twe=fe((Hgr,ewe)=>{"use strict";var $Mt=T7(),Q3e=Yi().hoverLabelText;ewe.exports=function(t,r,n,a,i){var o=$Mt(t,r,n,a,i);if(o){t=o[0];var s=t.index,l=s[0],u=s[1],c=t.cd[0],f=c.trace,v=c.xRanges[u],g=c.yRanges[l];return t.xLabel=Q3e(t.xa,[v[0],v[1]],f.xhoverformat),t.yLabel=Q3e(t.ya,[g[0],g[1]],f.yhoverformat),o}}});var nwe=fe((jgr,rwe)=>{"use strict";rwe.exports={attributes:k7(),supplyDefaults:J3e(),crossTraceDefaults:S7(),calc:m7(),plot:_7(),layerName:"heatmaplayer",colorbar:H3(),style:b7(),hoverPoints:twe(),eventData:oG(),moduleType:"trace",name:"histogram2d",basePlotModule:gu(),categories:["cartesian","svg","2dMap","histogram","showLegend"],meta:{}}});var awe=fe((Wgr,iwe)=>{"use strict";iwe.exports=nwe()});var C7=fe((Ygr,owe)=>{"use strict";owe.exports={COMPARISON_OPS:["=","!=","<",">=",">","<="],COMPARISON_OPS2:["=","<",">=",">","<="],INTERVAL_OPS:["[]","()","[)","(]","][",")(","](",")["],SET_OPS:["{}","}{"],CONSTRAINT_REDUCTION:{"=":"=","<":"<","<=":"<",">":">",">=":">","[]":"[]","()":"[]","[)":"[]","(]":"[]","][":"][",")(":"][","](":"][",")[":"]["}}});var NA=fe((Xgr,cwe)=>{"use strict";var Bu=O3(),L7=Ol(),lwe=pl(),uG=lwe.axisHoverFormat,KMt=lwe.descriptionOnlyNumbers,JMt=_s(),QMt=Uc().dash,eSt=Ds(),j3=ta().extendFlat,uwe=C7(),tSt=uwe.COMPARISON_OPS2,rSt=uwe.INTERVAL_OPS,swe=L7.line;cwe.exports=j3({z:Bu.z,x:Bu.x,x0:Bu.x0,dx:Bu.dx,y:Bu.y,y0:Bu.y0,dy:Bu.dy,xperiod:Bu.xperiod,yperiod:Bu.yperiod,xperiod0:L7.xperiod0,yperiod0:L7.yperiod0,xperiodalignment:Bu.xperiodalignment,yperiodalignment:Bu.yperiodalignment,text:Bu.text,hovertext:Bu.hovertext,transpose:Bu.transpose,xtype:Bu.xtype,ytype:Bu.ytype,xhoverformat:uG("x"),yhoverformat:uG("y"),zhoverformat:uG("z",1),hovertemplate:Bu.hovertemplate,hovertemplatefallback:Bu.hovertemplatefallback,texttemplate:j3({},Bu.texttemplate,{}),texttemplatefallback:Bu.texttemplatefallback,textfont:j3({},Bu.textfont,{}),hoverongaps:Bu.hoverongaps,connectgaps:j3({},Bu.connectgaps,{}),fillcolor:{valType:"color",editType:"calc"},autocontour:{valType:"boolean",dflt:!0,editType:"calc",impliedEdits:{"contours.start":void 0,"contours.end":void 0,"contours.size":void 0}},ncontours:{valType:"integer",dflt:15,min:1,editType:"calc"},contours:{type:{valType:"enumerated",values:["levels","constraint"],dflt:"levels",editType:"calc"},start:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},end:{valType:"number",dflt:null,editType:"plot",impliedEdits:{"^autocontour":!1}},size:{valType:"number",dflt:null,min:0,editType:"plot",impliedEdits:{"^autocontour":!1}},coloring:{valType:"enumerated",values:["fill","heatmap","lines","none"],dflt:"fill",editType:"calc"},showlines:{valType:"boolean",dflt:!0,editType:"plot"},showlabels:{valType:"boolean",dflt:!1,editType:"plot"},labelfont:eSt({editType:"plot",colorEditType:"style"}),labelformat:{valType:"string",dflt:"",editType:"plot",description:KMt("contour label")},operation:{valType:"enumerated",values:[].concat(tSt).concat(rSt),dflt:"=",editType:"calc"},value:{valType:"any",dflt:0,editType:"calc"},editType:"calc",impliedEdits:{autocontour:!1}},line:{color:j3({},swe.color,{editType:"style+colorbars"}),width:{valType:"number",min:0,editType:"style+colorbars"},dash:QMt,smoothing:j3({},swe.smoothing,{}),editType:"plot"},zorder:L7.zorder},JMt("",{cLetter:"z",autoColorDflt:!1,editTypeOverride:"calc"}))});var fG=fe((Zgr,hwe)=>{"use strict";var Ch=k7(),f1=NA(),nSt=_s(),cG=pl().axisHoverFormat,fwe=ta().extendFlat;hwe.exports=fwe({x:Ch.x,y:Ch.y,z:Ch.z,marker:Ch.marker,histnorm:Ch.histnorm,histfunc:Ch.histfunc,nbinsx:Ch.nbinsx,xbins:Ch.xbins,nbinsy:Ch.nbinsy,ybins:Ch.ybins,autobinx:Ch.autobinx,autobiny:Ch.autobiny,bingroup:Ch.bingroup,xbingroup:Ch.xbingroup,ybingroup:Ch.ybingroup,autocontour:f1.autocontour,ncontours:f1.ncontours,contours:f1.contours,line:{color:f1.line.color,width:fwe({},f1.line.width,{dflt:.5}),dash:f1.line.dash,smoothing:f1.line.smoothing,editType:"plot"},xhoverformat:cG("x"),yhoverformat:cG("y"),zhoverformat:cG("z",1),hovertemplate:Ch.hovertemplate,hovertemplatefallback:Ch.hovertemplatefallback,texttemplate:f1.texttemplate,texttemplatefallback:f1.texttemplatefallback,textfont:f1.textfont},nSt("",{cLetter:"z",editTypeOverride:"calc"}))});var P7=fe(($gr,dwe)=>{"use strict";dwe.exports=function(t,r,n,a){var i=a("contours.start"),o=a("contours.end"),s=i===!1||o===!1,l=n("contours.size"),u;s?u=r.autocontour=!0:u=n("autocontour",!1),(u||!l)&&n("ncontours")}});var hG=fe((Kgr,vwe)=>{"use strict";var iSt=Xt();vwe.exports=function(t,r,n,a){a||(a={});var i=t("contours.showlabels");if(i){var o=r.font;iSt.coerceFont(t,"contours.labelfont",o,{overrideDflt:{color:n}}),t("contours.labelformat")}a.hasHover!==!1&&t("zhoverformat")}});var F7=fe((Jgr,pwe)=>{"use strict";var aSt=Vc(),oSt=hG();pwe.exports=function(t,r,n,a,i){var o=n("contours.coloring"),s,l="";o==="fill"&&(s=n("contours.showlines")),s!==!1&&(o!=="lines"&&(l=n("line.color","#000")),n("line.width",.5),n("line.dash")),o!=="none"&&(t.showlegend!==!0&&(r.showlegend=!1),r._dfltShowLegend=!1,aSt(t,r,a,n,{prefix:"",cLetter:"z"})),n("line.smoothing"),oSt(n,a,l,i)}});var xwe=fe((Qgr,ywe)=>{"use strict";var gwe=Xt(),sSt=lG(),lSt=P7(),uSt=F7(),cSt=IA(),mwe=fG();ywe.exports=function(t,r,n,a){function i(s,l){return gwe.coerce(t,r,mwe,s,l)}function o(s){return gwe.coerce2(t,r,mwe,s)}sSt(t,r,i,a),r.visible!==!1&&(lSt(t,r,i,o),uSt(t,r,i,a),i("xhoverformat"),i("yhoverformat"),i("hovertemplate"),i("hovertemplatefallback"),r.contours&&r.contours.coloring==="heatmap"&&cSt(i,a))}});var pG=fe((emr,bwe)=>{"use strict";var vG=Yi(),dG=Xt();bwe.exports=function(t,r){var n=t.contours;if(t.autocontour){var a=t.zmin,i=t.zmax;(t.zauto||a===void 0)&&(a=dG.aggNums(Math.min,null,r)),(t.zauto||i===void 0)&&(i=dG.aggNums(Math.max,null,r));var o=_we(a,i,t.ncontours);n.size=o.dtick,n.start=vG.tickFirst(o),o.range.reverse(),n.end=vG.tickFirst(o),n.start===a&&(n.start+=n.size),n.end===i&&(n.end-=n.size),n.start>n.end&&(n.start=n.end=(n.start+n.end)/2),t._input.contours||(t._input.contours={}),dG.extendFlat(t._input.contours,{start:n.start,end:n.end,size:n.size}),t._input.autocontour=!0}else if(n.type!=="constraint"){var s=n.start,l=n.end,u=t._input.contours;if(s>l&&(n.start=u.start=l,l=n.end=u.end=s,s=n.start),!(n.size>0)){var c;s===l?c=1:c=_we(s,l,t.ncontours).dtick,u.size=n.size=c}}};function _we(e,t,r){var n={type:"linear",range:[e,t]};return vG.autoTicks(n,(t-e)/(r||15)),n}});var UA=fe((tmr,wwe)=>{"use strict";wwe.exports=function(t){return t.end+t.size/1e6}});var gG=fe((rmr,Awe)=>{"use strict";var Twe=js(),fSt=m7(),hSt=pG(),dSt=UA();Awe.exports=function(t,r){var n=fSt(t,r),a=n[0].z;hSt(r,a);var i=r.contours,o=Twe.extractOpts(r),s;if(i.coloring==="heatmap"&&o.auto&&r.autocontour===!1){var l=i.start,u=dSt(i),c=i.size||1,f=Math.floor((u-l)/c)+1;isFinite(c)||(c=1,f=1);var v=l-c/2,g=v+f*c;s=[v,g]}else s=a;return Twe.calc(t,r,{vals:s,cLetter:"z"}),n}});var VA=fe((nmr,Mwe)=>{"use strict";Mwe.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}}});var mG=fe((imr,Swe)=>{"use strict";var D7=VA();Swe.exports=function(t){var r=t[0].z,n=r.length,a=r[0].length,i=n===2||a===2,o,s,l,u,c,f,v,g,p;for(s=0;se?0:1)+(t[0][1]>e?0:2)+(t[1][1]>e?0:4)+(t[1][0]>e?0:8);if(r===5||r===10){var n=(t[0][0]+t[0][1]+t[1][0]+t[1][1])/4;return e>n?r===5?713:1114:r===5?104:208}return r===15?0:r}});var yG=fe((amr,Cwe)=>{"use strict";var R7=Xt(),W3=VA();Cwe.exports=function(t,r,n){var a,i,o,s,l;for(r=r||.01,n=n||.01,o=0;o20?(o=W3.CHOOSESADDLE[o][(s[0]||s[1])<0?0:1],e.crossings[i]=W3.SADDLEREMAINDER[o]):delete e.crossings[i],s=W3.NEWDELTA[o],!s){R7.log("Found bad marching index:",o,t,e.level);break}l.push(kwe(e,t,s)),t[0]+=s[0],t[1]+=s[1],i=t.join(","),GA(l[l.length-1],l[l.length-2],n,a)&&l.pop();var p=s[0]&&(t[0]<0||t[0]>c-2)||s[1]&&(t[1]<0||t[1]>u-2),x=t[0]===f[0]&&t[1]===f[1]&&s[0]===v[0]&&s[1]===v[1];if(x||r&&p)break;o=e.crossings[i]}g===1e4&&R7.log("Infinite loop in contour?");var _=GA(l[0],l[l.length-1],n,a),y=0,C=.2*e.smoothing,k=[],S=0,L,w,A,T,m,F,E,I,R,B,O;for(g=1;g=S;g--)if(L=k[g],L=S&&L+k[w]I&&R--,e.edgepaths[R]=O.concat(l,B));break}U||(e.edgepaths[I]=l.concat(B))}for(I=0;I20&&t?e===208||e===1114?n=r[0]===0?1:-1:a=r[1]===0?1:-1:W3.BOTTOMSTART.indexOf(e)!==-1?a=1:W3.LEFTSTART.indexOf(e)!==-1?n=1:W3.TOPSTART.indexOf(e)!==-1?a=-1:n=-1,[n,a]}function kwe(e,t,r){var n=t[0]+Math.max(r[0],0),a=t[1]+Math.max(r[1],0),i=e.z[a][n],o=e.xaxis,s=e.yaxis;if(r[1]){var l=(e.level-i)/(e.z[a][n+1]-i),u=(l!==1?(1-l)*o.c2l(e.x[n]):0)+(l!==0?l*o.c2l(e.x[n+1]):0);return[o.c2p(o.l2c(u),!0),s.c2p(e.y[a],!0),n+l,a]}else{var c=(e.level-i)/(e.z[a+1][n]-i),f=(c!==1?(1-c)*s.c2l(e.y[a]):0)+(c!==0?c*s.c2l(e.y[a+1]):0);return[o.c2p(e.x[n],!0),s.c2p(s.l2c(f),!0),n,a+c]}}});var Dwe=fe((omr,Fwe)=>{"use strict";var xG=C7(),mSt=aa();Fwe.exports={"[]":Lwe("[]"),"][":Lwe("]["),">":_G(">"),"<":_G("<"),"=":_G("=")};function Pwe(e,t){var r=Array.isArray(t),n;function a(i){return mSt(i)?+i:null}return xG.COMPARISON_OPS2.indexOf(e)!==-1?n=a(r?t[0]:t):xG.INTERVAL_OPS.indexOf(e)!==-1?n=r?[a(t[0]),a(t[1])]:[a(t),a(t)]:xG.SET_OPS.indexOf(e)!==-1&&(n=r?t.map(a):[a(t)]),n}function Lwe(e){return function(t){t=Pwe(e,t);var r=Math.min(t[0],t[1]),n=Math.max(t[0],t[1]);return{start:r,end:n,size:n-r}}}function _G(e){return function(t){return t=Pwe(e,t),{start:t,end:1/0,size:1/0}}}});var bG=fe((smr,Iwe)=>{"use strict";var Rwe=Xt(),ySt=Dwe(),xSt=UA();Iwe.exports=function(t,r,n){for(var a=t.type==="constraint"?ySt[t._operation](t.value):t,i=a.size,o=[],s=xSt(a),l=n.trace._carpetTrace,u=l?{xaxis:l.aaxis,yaxis:l.baxis,x:n.a,y:n.b}:{xaxis:r.xaxis,yaxis:r.yaxis,x:n.x,y:n.y},c=a.start;c1e3){Rwe.warn("Too many contours, clipping at 1000",t);break}return o}});var wG=fe((lmr,qwe)=>{"use strict";var Y3=Xt();qwe.exports=function(e,t){var r,n,a,i=function(l){return l.reverse()},o=function(l){return l};switch(t){case"=":case"<":return e;case">":for(e.length!==1&&Y3.warn("Contour data invalid for the specified inequality operation."),n=e[0],r=0;r{"use strict";Bwe.exports=function(e,t){var r=e[0],n=r.z,a;switch(t.type){case"levels":var i=Math.min(n[0][0],n[0][1]);for(a=0;ao.level||o.starts.length&&i===o.level)}break;case"constraint":if(r.prefixBoundary=!1,r.edgepaths.length)return;var s=r.x.length,l=r.y.length,u=-1/0,c=1/0;for(a=0;a":f>u&&(r.prefixBoundary=!0);break;case"<":(fu||r.starts.length&&g===c)&&(r.prefixBoundary=!0);break;case"][":v=Math.min(f[0],f[1]),g=Math.max(f[0],f[1]),vu&&(r.prefixBoundary=!0);break}break}}});var I7=fe(ld=>{"use strict";var jA=xi(),yf=Xt(),dg=ea(),_St=js(),Uwe=as(),Owe=Yi(),Nwe=Hp(),bSt=_7(),Vwe=mG(),Gwe=yG(),wSt=bG(),TSt=wG(),Hwe=TG(),HA=VA(),h1=HA.LABELOPTIMIZER;ld.plot=function(t,r,n,a){var i=r.xaxis,o=r.yaxis;yf.makeTraceGroups(a,n,"contour").each(function(s){var l=jA.select(this),u=s[0],c=u.trace,f=u.x,v=u.y,g=c.contours,p=wSt(g,r,u),x=yf.ensureSingle(l,"g","heatmapcoloring"),_=[];g.coloring==="heatmap"&&(_=[s]),bSt(t,r,_,x),Vwe(p),Gwe(p);var y=i.c2p(f[0],!0),C=i.c2p(f[f.length-1],!0),k=o.c2p(v[0],!0),S=o.c2p(v[v.length-1],!0),L=[[y,S],[C,S],[C,k],[y,k]],w=p;g.type==="constraint"&&(w=TSt(p,g._operation)),ASt(l,L,g),MSt(l,w,L,g),SSt(l,p,t,u,g),kSt(l,r,t,u,L)})};function ASt(e,t,r){var n=yf.ensureSingle(e,"g","contourbg"),a=n.selectAll("path").data(r.coloring==="fill"?[0]:[]);a.enter().append("path"),a.exit().remove(),a.attr("d","M"+t.join("L")+"Z").style("stroke","none")}function MSt(e,t,r,n){var a=n.coloring==="fill"||n.type==="constraint"&&n._operation!=="=",i="M"+r.join("L")+"Z";a&&Hwe(t,n);var o=yf.ensureSingle(e,"g","contourfill"),s=o.selectAll("path").data(a?t:[]);s.enter().append("path"),s.exit().remove(),s.each(function(l){var u=(l.prefixBoundary?i:"")+jwe(l,r);u?jA.select(this).attr("d",u).style("stroke","none"):jA.select(this).remove()})}function jwe(e,t){var r="",n=0,a=e.edgepaths.map(function(y,C){return C}),i=!0,o,s,l,u,c,f;function v(y){return Math.abs(y[1]-t[0][1])<.01}function g(y){return Math.abs(y[1]-t[2][1])<.01}function p(y){return Math.abs(y[0]-t[0][0])<.01}function x(y){return Math.abs(y[0]-t[2][0])<.01}for(;a.length;){for(f=dg.smoothopen(e.edgepaths[n],e.smoothing),r+=i?f:f.replace(/^M/,"L"),a.splice(a.indexOf(n),1),o=e.edgepaths[n][e.edgepaths[n].length-1],u=-1,l=0;l<4;l++){if(!o){yf.log("Missing end?",n,e);break}for(v(o)&&!x(o)?s=t[1]:p(o)?s=t[0]:g(o)?s=t[3]:x(o)&&(s=t[2]),c=0;c=0&&(s=_,u=c):Math.abs(o[1]-s[1])<.01?Math.abs(o[1]-_[1])<.01&&(_[0]-o[0])*(s[0]-_[0])>=0&&(s=_,u=c):yf.log("endpt to newendpt is not vert. or horz.",o,s,_)}if(o=s,u>=0)break;r+="L"+s}if(u===e.edgepaths.length){yf.log("unclosed perimeter path");break}n=u,i=a.indexOf(n)===-1,i&&(n=a[0],r+="Z")}for(n=0;nh1.MAXCOST*2)break;v&&(s/=2),o=u-s/2,l=o+s*1.5}if(f<=h1.MAXCOST)return c};function ESt(e,t,r,n){var a=t.width/2,i=t.height/2,o=e.x,s=e.y,l=e.theta,u=Math.cos(l)*a,c=Math.sin(l)*a,f=(o>n.center?n.right-o:o-n.left)/(u+Math.abs(Math.sin(l)*i)),v=(s>n.middle?n.bottom-s:s-n.top)/(Math.abs(c)+Math.cos(l)*i);if(f<1||v<1)return 1/0;var g=h1.EDGECOST*(1/(f-1)+1/(v-1));g+=h1.ANGLECOST*l*l;for(var p=o-u,x=s-c,_=o+u,y=s+c,C=0;C{"use strict";var LSt=xi(),AG=js(),PSt=UA();Wwe.exports=function(t){var r=t.contours,n=r.start,a=PSt(r),i=r.size||1,o=Math.floor((a-n)/i)+1,s=r.coloring==="lines"?0:1,l=AG.extractOpts(t);isFinite(i)||(i=1,o=1);var u=l.reversescale?AG.flipScale(l.colorscale):l.colorscale,c=u.length,f=new Array(c),v=new Array(c),g,p,x=l.min,_=l.max;if(r.coloring==="heatmap"){for(p=0;p=_)&&(n<=x&&(n=x),a>=_&&(a=_),o=Math.floor((a-n)/i)+1,s=0),p=0;px&&(f.unshift(x),v.unshift(v[0])),f[f.length-1]<_&&(f.push(_),v.push(v[v.length-1])))}return AG.makeColorScaleFunc({domain:f,range:v},{noNumericCheck:!0})}});var q7=fe((hmr,Xwe)=>{"use strict";var z7=xi(),Ywe=ea(),FSt=b7(),DSt=MG();Xwe.exports=function(t){var r=z7.select(t).selectAll("g.contour");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var a=z7.select(this),i=n[0].trace,o=i.contours,s=i.line,l=o.size||1,u=o.start,c=o.type==="constraint",f=!c&&o.coloring==="lines",v=!c&&o.coloring==="fill",g=f||v?DSt(i):null;a.selectAll("g.contourlevel").each(function(_){z7.select(this).selectAll("path").call(Ywe.lineGroupStyle,s.width,f?g(_.level):s.color,s.dash)});var p=o.labelfont;if(a.selectAll("g.contourlabels text").each(function(_){Ywe.font(z7.select(this),{weight:p.weight,style:p.style,variant:p.variant,textcase:p.textcase,lineposition:p.lineposition,shadow:p.shadow,family:p.family,size:p.size,color:p.color||(f?g(_.level):s.color)})}),c)a.selectAll("g.contourfill path").style("fill",i.fillcolor);else if(v){var x;a.selectAll("g.contourfill path").style("fill",function(_){return x===void 0&&(x=_.level),g(_.level+.5*l)}),x===void 0&&(x=u),a.selectAll("g.contourbg path").style("fill",g(x-.5*l))}}),FSt(t)}});var B7=fe((dmr,$we)=>{"use strict";var Zwe=js(),RSt=MG(),ISt=UA();function zSt(e,t,r){var n=t.contours,a=t.line,i=n.size||1,o=n.coloring,s=RSt(t,{isColorbar:!0});if(o==="heatmap"){var l=Zwe.extractOpts(t);r._fillgradient=l.reversescale?Zwe.flipScale(l.colorscale):l.colorscale,r._zrange=[l.min,l.max]}else o==="fill"&&(r._fillcolor=s);r._line={color:o==="lines"?s:a.color,width:n.showlines!==!1?a.width:0,dash:a.dash},r._levels={start:n.start,end:ISt(n),size:i}}$we.exports={min:"zmin",max:"zmax",calc:zSt}});var SG=fe((vmr,Kwe)=>{"use strict";var O7=ni(),qSt=T7();Kwe.exports=function(t,r,n,a,i){i||(i={}),i.isContour=!0;var o=qSt(t,r,n,a,i);return o&&o.forEach(function(s){var l=s.trace;l.contours.type==="constraint"&&(l.fillcolor&&O7.opacity(l.fillcolor)?s.color=O7.addOpacity(l.fillcolor,1):l.contours.showlines&&O7.opacity(l.line.color)&&(s.color=O7.addOpacity(l.line.color,1)))}),o}});var Qwe=fe((pmr,Jwe)=>{"use strict";Jwe.exports={attributes:fG(),supplyDefaults:xwe(),crossTraceDefaults:S7(),calc:gG(),plot:I7().plot,layerName:"contourlayer",style:q7(),colorbar:B7(),hoverPoints:SG(),moduleType:"trace",name:"histogram2dcontour",basePlotModule:gu(),categories:["cartesian","svg","2dMap","contour","histogram","showLegend"],meta:{}}});var t5e=fe((gmr,e5e)=>{"use strict";e5e.exports=Qwe()});var EG=fe((mmr,s5e)=>{"use strict";var r5e=aa(),BSt=hG(),a5e=ni(),n5e=a5e.addOpacity,OSt=a5e.opacity,o5e=C7(),i5e=Xt().isArrayOrTypedArray,NSt=o5e.CONSTRAINT_REDUCTION,USt=o5e.COMPARISON_OPS2;s5e.exports=function(t,r,n,a,i,o){var s=r.contours,l,u,c,f=n("contours.operation");if(s._operation=NSt[f],VSt(n,s),f==="="?l=s.showlines=!0:(l=n("contours.showlines"),c=n("fillcolor",n5e((t.line||{}).color||i,.5))),l){var v=c&&OSt(c)?n5e(r.fillcolor,1):i;u=n("line.color",v),n("line.width",2),n("line.dash")}n("line.smoothing"),BSt(n,a,u,o)};function VSt(e,t){var r;USt.indexOf(t.operation)===-1?(e("contours.value",[0,1]),i5e(t.value)?t.value.length>2?t.value=t.value.slice(2):t.length===0?t.value=[0,1]:t.length<2?(r=parseFloat(t.value[0]),t.value=[r,r+1]):t.value=[parseFloat(t.value[0]),parseFloat(t.value[1])]:r5e(t.value)&&(r=parseFloat(t.value),t.value=[r,r+1])):(e("contours.value",0),r5e(t.value)||(i5e(t.value)?t.value=parseFloat(t.value[0]):t.value=0))}});var c5e=fe((ymr,u5e)=>{"use strict";var kG=Xt(),GSt=s7(),HSt=sp(),jSt=EG(),WSt=P7(),YSt=F7(),XSt=IA(),l5e=NA();u5e.exports=function(t,r,n,a){function i(u,c){return kG.coerce(t,r,l5e,u,c)}function o(u){return kG.coerce2(t,r,l5e,u)}var s=GSt(t,r,i,a);if(!s){r.visible=!1;return}HSt(t,r,a,i),i("xhoverformat"),i("yhoverformat"),i("text"),i("hovertext"),i("hoverongaps"),i("hovertemplate"),i("hovertemplatefallback");var l=i("contours.type")==="constraint";i("connectgaps",kG.isArray1D(r.z)),l?jSt(t,r,i,a,n):(WSt(t,r,i,o),YSt(t,r,i,a)),r.contours&&r.contours.coloring==="heatmap"&&XSt(i,a),i("zorder")}});var h5e=fe((xmr,f5e)=>{"use strict";f5e.exports={attributes:NA(),supplyDefaults:c5e(),calc:gG(),plot:I7().plot,style:q7(),colorbar:B7(),hoverPoints:SG(),moduleType:"trace",name:"contour",basePlotModule:gu(),categories:["cartesian","svg","2dMap","contour","showLegend"],meta:{}}});var v5e=fe((_mr,d5e)=>{"use strict";d5e.exports=h5e()});var CG=fe((bmr,y5e)=>{"use strict";var{hovertemplateAttrs:ZSt,texttemplateAttrs:$St,templatefallbackAttrs:p5e}=Oo(),KSt=n1(),O0=Ol(),JSt=Ho(),g5e=_s(),QSt=Uc().dash,jm=ta().extendFlat,Mv=O0.marker,WA=O0.line,m5e=Mv.line;y5e.exports={a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},c:{valType:"data_array",editType:"calc"},sum:{valType:"number",dflt:0,min:0,editType:"calc"},mode:jm({},O0.mode,{dflt:"markers"}),text:jm({},O0.text,{}),texttemplate:$St({editType:"plot"},{keys:["a","b","c","text"]}),texttemplatefallback:p5e({editType:"plot"}),hovertext:jm({},O0.hovertext,{}),line:{color:WA.color,width:WA.width,dash:QSt,backoff:WA.backoff,shape:jm({},WA.shape,{values:["linear","spline"]}),smoothing:WA.smoothing,editType:"calc"},connectgaps:O0.connectgaps,cliponaxis:O0.cliponaxis,fill:jm({},O0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:KSt(),marker:jm({symbol:Mv.symbol,opacity:Mv.opacity,angle:Mv.angle,angleref:Mv.angleref,standoff:Mv.standoff,maxdisplayed:Mv.maxdisplayed,size:Mv.size,sizeref:Mv.sizeref,sizemin:Mv.sizemin,sizemode:Mv.sizemode,line:jm({width:m5e.width,dash:m5e.dash,editType:"calc"},g5e("marker.line")),gradient:Mv.gradient,editType:"calc"},g5e("marker")),textfont:O0.textfont,textposition:O0.textposition,selected:O0.selected,unselected:O0.unselected,hoverinfo:jm({},JSt.hoverinfo,{flags:["a","b","c","text","name"]}),hoveron:O0.hoveron,hovertemplate:ZSt(),hovertemplatefallback:p5e()}});var w5e=fe((wmr,b5e)=>{"use strict";var x5e=Xt(),eEt=r1(),X3=Is(),tEt=vv(),rEt=lp(),_5e=f3(),nEt=up(),iEt=a1(),aEt=CG();b5e.exports=function(t,r,n,a){function i(v,g){return x5e.coerce(t,r,aEt,v,g)}var o=i("a"),s=i("b"),l=i("c"),u;if(o?(u=o.length,s?(u=Math.min(u,s.length),l&&(u=Math.min(u,l.length))):l?u=Math.min(u,l.length):u=0):s&&l&&(u=Math.min(s.length,l.length)),!u){r.visible=!1;return}r._length=u,i("sum"),i("text"),i("hovertext"),r.hoveron!=="fills"&&(i("hovertemplate"),i("hovertemplatefallback"));var c=u{"use strict";var LG=Yi();T5e.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot;return a.aLabel=LG.tickText(i.aaxis,t.a,!0).text,a.bLabel=LG.tickText(i.baxis,t.b,!0).text,a.cLabel=LG.tickText(i.caxis,t.c,!0).text,a}});var k5e=fe((Amr,E5e)=>{"use strict";var PG=aa(),oEt=pv(),sEt=o1(),lEt=P0(),uEt=gv().calcMarkerSize,M5e=["a","b","c"],S5e={a:["b","c"],b:["a","c"],c:["a","b"]};E5e.exports=function(t,r){var n=t._fullLayout[r.subplot],a=n.sum,i=r.sum||a,o={a:r.a,b:r.b,c:r.c},s=r.ids,l,u,c,f,v,g;for(l=0;l{"use strict";var cEt=m3();C5e.exports=function(t,r,n){var a=r.plotContainer;a.select(".scatterlayer").selectAll("*").remove();for(var i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:a,layerClipId:r._hasClipOnAxisFalse?r.clipIdRelative:null},l=r.layers.frontplot.select("g.scatterlayer"),u=0;u{"use strict";var fEt=b3();P5e.exports=function(t,r,n,a){var i=fEt(t,r,n,a);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),i}var f=o.cd[o.index],v=o.trace,g=o.subplot;o.a=f.a,o.b=f.b,o.c=f.c,o.xLabelVal=void 0,o.yLabelVal=void 0;var p={};p[v.subplot]={_subplot:g};var x=v._module.formatLabels(f,v,p);o.aLabel=x.aLabel,o.bLabel=x.bLabel,o.cLabel=x.cLabel;var _=f.hi||v.hoverinfo,y=[];function C(S,L){y.push(S._hovertitle+": "+L)}if(!v.hovertemplate){var k=_.split("+");k.indexOf("all")!==-1&&(k=["a","b","c"]),k.indexOf("a")!==-1&&C(g.aaxis,o.aLabel),k.indexOf("b")!==-1&&C(g.baxis,o.bLabel),k.indexOf("c")!==-1&&C(g.caxis,o.cLabel)}return o.extraText=y.join("
"),o.hovertemplate=v.hovertemplate,i}});var R5e=fe((Emr,D5e)=>{"use strict";D5e.exports=function(t,r,n,a,i){if(r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),a[i]){var o=a[i];t.a=o.a,t.b=o.b,t.c=o.c}else t.a=r.a,t.b=r.b,t.c=r.c;return t}});var j5e=fe((kmr,H5e)=>{"use strict";var N5e=xi(),FG=bi(),vg=Xt(),d1=vg.strTranslate,N7=vg._,_2=ni(),U7=ea(),YA=Hp(),DG=ta().extendFlat,hEt=Hs(),Wm=Yi(),I5e=ed(),z5e=kl(),U5e=$p(),q5e=U5e.freeMode,dEt=U5e.rectMode,RG=qx(),vEt=Ac().prepSelect,pEt=Ac().selectOnClick,gEt=Ac().clearOutline,mEt=Ac().clearSelectionsCache,V5e=rc();function G5e(e,t){this.id=e.id,this.graphDiv=e.graphDiv,this.init(t),this.makeFramework(t),this.updateFx(t),this.aTickLayout=null,this.bTickLayout=null,this.cTickLayout=null}H5e.exports=G5e;var v1=G5e.prototype;v1.init=function(e){this.container=e._ternarylayer,this.defs=e._defs,this.layoutId=e._uid,this.traceHash={},this.layers={}};v1.plot=function(e,t){var r=this,n=t[r.id],a=t._size;r._hasClipOnAxisFalse=!1;for(var i=0;iZ3*u?(y=u,_=y*Z3):(_=l,y=_/Z3),C=o*_/l,k=s*y/u,p=t.l+t.w*a-_/2,x=t.t+t.h*(1-i)-y/2,r.x0=p,r.y0=x,r.w=_,r.h=y,r.sum=c,r.xaxis={type:"linear",range:[f+2*g-c,c-f-2*v],domain:[a-C/2,a+C/2],_id:"x"},YA(r.xaxis,r.graphDiv._fullLayout),r.xaxis.setScale(),r.xaxis.isPtWithinRange=function(B){return B.a>=r.aaxis.range[0]&&B.a<=r.aaxis.range[1]&&B.b>=r.baxis.range[1]&&B.b<=r.baxis.range[0]&&B.c>=r.caxis.range[1]&&B.c<=r.caxis.range[0]},r.yaxis={type:"linear",range:[f,c-v-g],domain:[i-k/2,i+k/2],_id:"y"},YA(r.yaxis,r.graphDiv._fullLayout),r.yaxis.setScale(),r.yaxis.isPtWithinRange=function(){return!0};var S=r.yaxis.domain[0],L=r.aaxis=DG({},e.aaxis,{range:[f,c-v-g],side:"left",tickangle:(+e.aaxis.tickangle||0)-30,domain:[S,S+k*Z3],anchor:"free",position:0,_id:"y",_length:_});YA(L,r.graphDiv._fullLayout),L.setScale();var w=r.baxis=DG({},e.baxis,{range:[c-f-g,v],side:"bottom",domain:r.xaxis.domain,anchor:"free",position:0,_id:"x",_length:_});YA(w,r.graphDiv._fullLayout),w.setScale();var A=r.caxis=DG({},e.caxis,{range:[c-f-v,g],side:"right",tickangle:(+e.caxis.tickangle||0)+30,domain:[S,S+k*Z3],anchor:"free",position:0,_id:"y",_length:_});YA(A,r.graphDiv._fullLayout),A.setScale();var T="M"+p+","+(x+y)+"h"+_+"l-"+_/2+",-"+y+"Z";r.clipDef.select("path").attr("d",T),r.layers.plotbg.select("path").attr("d",T);var m="M0,"+y+"h"+_+"l-"+_/2+",-"+y+"Z";r.clipDefRelative.select("path").attr("d",m);var F=d1(p,x);r.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",F),r.clipDefRelative.select("path").attr("transform",null);var E=d1(p-w._offset,x+y);r.layers.baxis.attr("transform",E),r.layers.bgrid.attr("transform",E);var I=d1(p+_/2,x)+"rotate(30)"+d1(0,-L._offset);r.layers.aaxis.attr("transform",I),r.layers.agrid.attr("transform",I);var R=d1(p+_/2,x)+"rotate(-30)"+d1(0,-A._offset);r.layers.caxis.attr("transform",R),r.layers.cgrid.attr("transform",R),r.drawAxes(!0),r.layers.aline.select("path").attr("d",L.showline?"M"+p+","+(x+y)+"l"+_/2+",-"+y:"M0,0").call(_2.stroke,L.linecolor||"#000").style("stroke-width",(L.linewidth||0)+"px"),r.layers.bline.select("path").attr("d",w.showline?"M"+p+","+(x+y)+"h"+_:"M0,0").call(_2.stroke,w.linecolor||"#000").style("stroke-width",(w.linewidth||0)+"px"),r.layers.cline.select("path").attr("d",A.showline?"M"+(p+_/2)+","+x+"l"+_/2+","+y:"M0,0").call(_2.stroke,A.linecolor||"#000").style("stroke-width",(A.linewidth||0)+"px"),r.graphDiv._context.staticPlot||r.initInteractions(),U7.setClipUrl(r.layers.frontplot,r._hasClipOnAxisFalse?null:r.clipId,r.graphDiv)};v1.drawAxes=function(e){var t=this,r=t.graphDiv,n=t.id.slice(7)+"title",a=t.layers,i=t.aaxis,o=t.baxis,s=t.caxis;if(t.drawAx(i),t.drawAx(o),t.drawAx(s),e){var l=Math.max(i.showticklabels?i.tickfont.size/2:0,(s.showticklabels?s.tickfont.size*.75:0)+(s.ticks==="outside"?s.ticklen*.87:0)),u=(o.showticklabels?o.tickfont.size:0)+(o.ticks==="outside"?o.ticklen:0)+3;a["a-title"]=RG.draw(r,"a"+n,{propContainer:i,propName:t.id+".aaxis.title.text",placeholder:N7(r,"Click to enter Component A title"),attributes:{x:t.x0+t.w/2,y:t.y0-i.title.font.size/3-l,"text-anchor":"middle"}}),a["b-title"]=RG.draw(r,"b"+n,{propContainer:o,propName:t.id+".baxis.title.text",placeholder:N7(r,"Click to enter Component B title"),attributes:{x:t.x0-u,y:t.y0+t.h+o.title.font.size*.83+u,"text-anchor":"middle"}}),a["c-title"]=RG.draw(r,"c"+n,{propContainer:s,propName:t.id+".caxis.title.text",placeholder:N7(r,"Click to enter Component C title"),attributes:{x:t.x0+t.w+u,y:t.y0+t.h+s.title.font.size*.83+u,"text-anchor":"middle"}})}};v1.drawAx=function(e){var t=this,r=t.graphDiv,n=e._name,a=n.charAt(0),i=e._id,o=t.layers[n],s=30,l=a+"tickLayout",u=yEt(e);t[l]!==u&&(o.selectAll("."+i+"tick").remove(),t[l]=u),e.setScale();var c=Wm.calcTicks(e),f=Wm.clipEnds(e,c),v=Wm.makeTransTickFn(e),g=Wm.getTickSigns(e)[2],p=vg.deg2rad(s),x=g*(e.linewidth||1)/2,_=g*e.ticklen,y=t.w,C=t.h,k=a==="b"?"M0,"+x+"l"+Math.sin(p)*_+","+Math.cos(p)*_:"M"+x+",0l"+Math.cos(p)*_+","+-Math.sin(p)*_,S={a:"M0,0l"+C+",-"+y/2,b:"M0,0l-"+y/2+",-"+C,c:"M0,0l-"+C+","+y/2}[a];Wm.drawTicks(r,e,{vals:e.ticks==="inside"?f:c,layer:o,path:k,transFn:v,crisp:!1}),Wm.drawGrid(r,e,{vals:f,layer:t.layers[a+"grid"],path:S,transFn:v,crisp:!1}),Wm.drawLabels(r,e,{vals:c,layer:o,transFn:v,labelFns:Wm.makeLabelFns(e,0,s)})};function yEt(e){return e.ticks+String(e.ticklen)+String(e.showticklabels)}var Yc=V5e.MINZOOM/2+.87,xEt="m-0.87,.5h"+Yc+"v3h-"+(Yc+5.2)+"l"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l2.6,1.5l-"+Yc/2+","+Yc*.87+"Z",_Et="m0.87,.5h-"+Yc+"v3h"+(Yc+5.2)+"l-"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l-2.6,1.5l"+Yc/2+","+Yc*.87+"Z",bEt="m0,1l"+Yc/2+","+Yc*.87+"l2.6,-1.5l-"+(Yc/2+2.6)+",-"+(Yc*.87+4.5)+"l-"+(Yc/2+2.6)+","+(Yc*.87+4.5)+"l2.6,1.5l"+Yc/2+",-"+Yc*.87+"Z",wEt="m0.5,0.5h5v-2h-5v-5h-2v5h-5v2h5v5h2Z",B5e=!0;v1.clearOutline=function(){mEt(this.dragOptions),gEt(this.dragOptions.gd)};v1.initInteractions=function(){var e=this,t=e.layers.plotbg.select("path").node(),r=e.graphDiv,n=r._fullLayout._zoomlayer,a,i;this.dragOptions={element:t,gd:r,plotinfo:{id:e.id,domain:r._fullLayout[e.id].domain,xaxis:e.xaxis,yaxis:e.yaxis},subplot:e.id,prepFn:function(E,I,R){e.dragOptions.xaxes=[e.xaxis],e.dragOptions.yaxes=[e.yaxis],a=r._fullLayout._invScaleX,i=r._fullLayout._invScaleY;var B=e.dragOptions.dragmode=r._fullLayout.dragmode;q5e(B)?e.dragOptions.minDrag=1:e.dragOptions.minDrag=void 0,B==="zoom"?(e.dragOptions.moveFn=w,e.dragOptions.clickFn=y,e.dragOptions.doneFn=A,C(E,I,R)):B==="pan"?(e.dragOptions.moveFn=m,e.dragOptions.clickFn=y,e.dragOptions.doneFn=F,T(),e.clearOutline(r)):(dEt(B)||q5e(B))&&vEt(E,I,R,e.dragOptions,B)}};var o,s,l,u,c,f,v,g,p,x;function _(E){var I={};return I[e.id+".aaxis.min"]=E.a,I[e.id+".baxis.min"]=E.b,I[e.id+".caxis.min"]=E.c,I}function y(E,I){var R=r._fullLayout.clickmode;O5e(r),E===2&&(r.emit("plotly_doubleclick",null),FG.call("_guiRelayout",r,_({a:0,b:0,c:0}))),R.indexOf("select")>-1&&E===1&&pEt(I,r,[e.xaxis],[e.yaxis],e.id,e.dragOptions),R.indexOf("event")>-1&&z5e.click(r,I,e.id)}function C(E,I,R){var B=t.getBoundingClientRect();o=I-B.left,s=R-B.top,r._fullLayout._calcInverseTransform(r);var O=r._fullLayout._invTransform,V=vg.apply3DTransform(O)(o,s);o=V[0],s=V[1],l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l,u=e.aaxis.range[1]-l.a,f=_2.luminosity(e.graphDiv._fullLayout[e.id].bgcolor),v="M0,"+e.h+"L"+e.w/2+", 0L"+e.w+","+e.h+"Z",g=!1,p=n.append("path").attr("class","zoombox").attr("transform",d1(e.x0,e.y0)).style({fill:f>.2?"rgba(0,0,0,0)":"rgba(255,255,255,0)","stroke-width":0}).attr("d",v),x=n.append("path").attr("class","zoombox-corners").attr("transform",d1(e.x0,e.y0)).style({fill:_2.background,stroke:_2.defaultLine,"stroke-width":1,opacity:0}).attr("d","M0,0Z"),e.clearOutline(r)}function k(E,I){return 1-I/e.h}function S(E,I){return 1-(E+(e.h-I)/Math.sqrt(3))/e.w}function L(E,I){return(E-(e.h-I)/Math.sqrt(3))/e.w}function w(E,I){var R=o+E*a,B=s+I*i,O=Math.max(0,Math.min(1,k(o,s),k(R,B))),V=Math.max(0,Math.min(1,S(o,s),S(R,B))),j=Math.max(0,Math.min(1,L(o,s),L(R,B))),q=(O/2+j)*e.w,U=(1-O/2-V)*e.w,J=(q+U)/2,ee=U-q,ce=(1-O)*e.h,ye=ce-ee/Z3;ee.2?"rgba(0,0,0,0.4)":"rgba(255,255,255,0.3)").duration(200),x.transition().style("opacity",1).duration(200),g=!0),r.emit("plotly_relayouting",_(c))}function A(){O5e(r),c!==l&&(FG.call("_guiRelayout",r,_(c)),B5e&&r.data&&r._context.showTips&&(vg.notifier(N7(r,"Double-click to zoom back out"),"long",r),B5e=!1))}function T(){l={a:e.aaxis.range[0],b:e.baxis.range[1],c:e.caxis.range[1]},c=l}function m(E,I){var R=E/e.xaxis._m,B=I/e.yaxis._m;c={a:l.a-B,b:l.b+(R+B)/2,c:l.c-(R-B)/2};var O=[c.a,c.b,c.c].sort(vg.sorterAsc),V={a:O.indexOf(c.a),b:O.indexOf(c.b),c:O.indexOf(c.c)};O[0]<0&&(O[1]+O[0]/2<0?(O[2]+=O[0]+O[1],O[0]=O[1]=0):(O[2]+=O[0]/2,O[1]+=O[0]/2,O[0]=0),c={a:O[V.a],b:O[V.b],c:O[V.c]},I=(l.a-c.a)*e.yaxis._m,E=(l.c-c.c-l.b+c.b)*e.xaxis._m);var j=d1(e.x0+E,e.y0+I);e.plotContainer.selectAll(".scatterlayer,.maplayer").attr("transform",j);var q=d1(-E,-I);e.clipDefRelative.select("path").attr("transform",q),e.aaxis.range=[c.a,e.sum-c.b-c.c],e.baxis.range=[e.sum-c.a-c.c,c.b],e.caxis.range=[e.sum-c.a-c.b,c.c],e.drawAxes(!1),e._hasClipOnAxisFalse&&e.plotContainer.select(".scatterlayer").selectAll(".trace").call(U7.hideOutsideRangePoints,e),r.emit("plotly_relayouting",_(c))}function F(){FG.call("_guiRelayout",r,_(c))}t.onmousemove=function(E){z5e.hover(r,E,e.id),r._fullLayout._lasthover=t,r._fullLayout._hoversubplot=e.id},t.onmouseout=function(E){r._dragging||I5e.unhover(r,E)},I5e.init(this.dragOptions)};function O5e(e){N5e.select(e).selectAll(".zoombox,.js-zoombox-backdrop,.js-zoombox-menu,.zoombox-corners").remove()}});var qG=fe((Cmr,W5e)=>{"use strict";var TEt=tc(),AEt=nl().attributes,Ko=pf(),MEt=rl().overrideAll,IG=ta().extendFlat,zG={title:{text:Ko.title.text,font:Ko.title.font},color:Ko.color,tickmode:Ko.minor.tickmode,nticks:IG({},Ko.nticks,{dflt:6,min:1}),tick0:Ko.tick0,dtick:Ko.dtick,tickvals:Ko.tickvals,ticktext:Ko.ticktext,ticks:Ko.ticks,ticklen:Ko.ticklen,tickwidth:Ko.tickwidth,tickcolor:Ko.tickcolor,ticklabelstep:Ko.ticklabelstep,showticklabels:Ko.showticklabels,labelalias:Ko.labelalias,showtickprefix:Ko.showtickprefix,tickprefix:Ko.tickprefix,showticksuffix:Ko.showticksuffix,ticksuffix:Ko.ticksuffix,showexponent:Ko.showexponent,exponentformat:Ko.exponentformat,minexponent:Ko.minexponent,separatethousands:Ko.separatethousands,tickfont:Ko.tickfont,tickangle:Ko.tickangle,tickformat:Ko.tickformat,tickformatstops:Ko.tickformatstops,hoverformat:Ko.hoverformat,showline:IG({},Ko.showline,{dflt:!0}),linecolor:Ko.linecolor,linewidth:Ko.linewidth,showgrid:IG({},Ko.showgrid,{dflt:!0}),gridcolor:Ko.gridcolor,gridwidth:Ko.gridwidth,griddash:Ko.griddash,layer:Ko.layer,min:{valType:"number",dflt:0,min:0}},V7=W5e.exports=MEt({domain:AEt({name:"ternary"}),bgcolor:{valType:"color",dflt:TEt.background},sum:{valType:"number",dflt:1,min:0},aaxis:zG,baxis:zG,caxis:zG},"plot","from-root");V7.uirevision={valType:"any",editType:"none"};V7.aaxis.uirevision=V7.baxis.uirevision=V7.caxis.uirevision={valType:"any",editType:"none"}});var b2=fe((Lmr,Y5e)=>{"use strict";var SEt=Xt(),EEt=Mo(),kEt=nl().defaults;Y5e.exports=function(t,r,n,a){var i=a.type,o=a.attributes,s=a.handleDefaults,l=a.partition||"x",u=r._subplots[i],c=u.length,f=c&&u[0].replace(/\d+$/,""),v,g;function p(C,k){return SEt.coerce(v,g,o,C,k)}for(var x=0;x{"use strict";var CEt=ni(),LEt=Mo(),G7=Xt(),PEt=b2(),FEt=gm(),DEt=mm(),REt=Ub(),IEt=Fx(),zEt=hA(),Z5e=qG(),X5e=["aaxis","baxis","caxis"];$5e.exports=function(t,r,n){PEt(t,r,n,{type:"ternary",attributes:Z5e,handleDefaults:qEt,font:r.font,paper_bgcolor:r.paper_bgcolor})};function qEt(e,t,r,n){var a=r("bgcolor"),i=r("sum");n.bgColor=CEt.combine(a,n.paper_bgcolor);for(var o,s,l,u=0;u=i&&(c.min=0,f.min=0,v.min=0,e.aaxis&&delete e.aaxis.min,e.baxis&&delete e.baxis.min,e.caxis&&delete e.caxis.min)}function BEt(e,t,r,n){var a=Z5e[t._name];function i(g,p){return G7.coerce(e,t,a,g,p)}i("uirevision",n.uirevision),t.type="linear";var o=i("color"),s=o!==a.color.dflt?o:r.font.color,l=t._name,u=l.charAt(0).toUpperCase(),c="Component "+u,f=i("title.text",c);t._hovertitle=f===c?f:u,G7.coerceFont(i,"title.font",r.font,{overrideDflt:{size:G7.bigFont(r.font.size),color:s}}),i("min"),IEt(e,t,i,"linear"),DEt(e,t,i,"linear"),FEt(e,t,i,"linear",{noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0}),REt(e,t,i,{outerTicks:!0});var v=i("showticklabels");v&&(G7.coerceFont(i,"tickfont",r.font,{overrideDflt:{color:s}}),i("tickangle"),i("tickformat")),zEt(e,t,i,{dfltColor:o,bgColor:r.bgColor,blend:60,showLine:!0,showGrid:!0,noZeroLine:!0,attributes:a}),i("hoverformat"),i("layer")}});var J5e=fe(Sv=>{"use strict";var OEt=j5e(),NEt=jf().getSubplotCalcData,UEt=Xt().counterRegex,$3="ternary";Sv.name=$3;var VEt=Sv.attr="subplot";Sv.idRoot=$3;Sv.idRegex=Sv.attrRegex=UEt($3);var GEt=Sv.attributes={};GEt[VEt]={valType:"subplotid",dflt:"ternary",editType:"calc"};Sv.layoutAttributes=qG();Sv.supplyLayoutDefaults=K5e();Sv.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,a=r._subplots[$3],i=0;i{"use strict";Q5e.exports={attributes:CG(),supplyDefaults:w5e(),colorbar:Zf(),formatLabels:A5e(),calc:k5e(),plot:L5e(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:F5e(),selectPoints:a2(),eventData:R5e(),moduleType:"trace",name:"scatterternary",basePlotModule:J5e(),categories:["ternary","symbols","showLegend","scatter-like"],meta:{}}});var r4e=fe((Rmr,t4e)=>{"use strict";t4e.exports=e4e()});var BG=fe((Imr,i4e)=>{"use strict";var oc=PA(),K3=ta().extendFlat,n4e=pl().axisHoverFormat;i4e.exports={y:oc.y,x:oc.x,x0:oc.x0,y0:oc.y0,xhoverformat:n4e("x"),yhoverformat:n4e("y"),name:K3({},oc.name,{}),orientation:K3({},oc.orientation,{}),bandwidth:{valType:"number",min:0,editType:"calc"},scalegroup:{valType:"string",dflt:"",editType:"calc"},scalemode:{valType:"enumerated",values:["width","count"],dflt:"width",editType:"calc"},spanmode:{valType:"enumerated",values:["soft","hard","manual"],dflt:"soft",editType:"calc"},span:{valType:"info_array",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}],editType:"calc"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,dflt:2,editType:"style"},editType:"plot"},fillcolor:oc.fillcolor,points:K3({},oc.boxpoints,{}),jitter:K3({},oc.jitter,{}),pointpos:K3({},oc.pointpos,{}),width:K3({},oc.width,{}),marker:oc.marker,text:oc.text,hovertext:oc.hovertext,hovertemplate:oc.hovertemplate,hovertemplatefallback:oc.hovertemplatefallback,quartilemethod:oc.quartilemethod,box:{visible:{valType:"boolean",dflt:!1,editType:"plot"},width:{valType:"number",min:0,max:1,dflt:.25,editType:"plot"},fillcolor:{valType:"color",editType:"style"},line:{color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"plot"},meanline:{visible:{valType:"boolean",dflt:!1,editType:"plot"},color:{valType:"color",editType:"style"},width:{valType:"number",min:0,editType:"style"},editType:"plot"},side:{valType:"enumerated",values:["both","positive","negative"],dflt:"both",editType:"calc"},offsetgroup:oc.offsetgroup,alignmentgroup:oc.alignmentgroup,selected:oc.selected,unselected:oc.unselected,hoveron:{valType:"flaglist",flags:["violins","points","kde"],dflt:"violins+points+kde",extras:["all"],editType:"style"},zorder:oc.zorder}});var UG=fe((zmr,a4e)=>{"use strict";var OG=FA(),NG=Xt().extendFlat;a4e.exports={violinmode:NG({},OG.boxmode,{}),violingap:NG({},OG.boxgap,{}),violingroupgap:NG({},OG.boxgroupgap,{})}});var c4e=fe((qmr,u4e)=>{"use strict";var o4e=Xt(),HEt=ni(),s4e=RA(),l4e=BG();u4e.exports=function(t,r,n,a){function i(L,w){return o4e.coerce(t,r,l4e,L,w)}function o(L,w){return o4e.coerce2(t,r,l4e,L,w)}if(s4e.handleSampleDefaults(t,r,i,a),r.visible!==!1){i("bandwidth"),i("side");var s=i("width");s||(i("scalegroup",r.name),i("scalemode"));var l=i("span"),u;Array.isArray(l)&&(u="manual"),i("spanmode",u);var c=i("line.color",(t.marker||{}).color||n),f=i("line.width"),v=i("fillcolor",HEt.addOpacity(r.line.color,.5));s4e.handlePointsDefaults(t,r,i,{prefix:""});var g=o("box.width"),p=o("box.fillcolor",v),x=o("box.line.color",c),_=o("box.line.width",f),y=i("box.visible",!!(g||p||x||_));y||(r.box={visible:!1});var C=o("meanline.color",c),k=o("meanline.width",f),S=i("meanline.visible",!!(C||k));S||(r.meanline={visible:!1}),i("quartilemethod"),i("zorder")}}});var h4e=fe((Bmr,f4e)=>{"use strict";var jEt=Xt(),WEt=UG(),YEt=t7();f4e.exports=function(t,r,n){function a(i,o){return jEt.coerce(t,r,WEt,i,o)}YEt._supply(t,r,n,a,"violin")}});var H7=fe(w2=>{"use strict";var XEt=Xt(),ZEt={gaussian:function(e){return 1/Math.sqrt(2*Math.PI)*Math.exp(-.5*e*e)}};w2.makeKDE=function(e,t,r){var n=r.length,a=ZEt.gaussian,i=e.bandwidth,o=1/(n*i);return function(s){for(var l=0,u=0;u{"use strict";var VG=Xt(),GG=Yi(),$Et=RV(),d4e=H7(),KEt=Wa().BADNUM;v4e.exports=function(t,r){var n=$Et(t,r);if(n[0].t.empty)return n;for(var a=t._fullLayout,i=GG.getFromId(t,r[r.orientation==="h"?"xaxis":"yaxis"]),o=1/0,s=-1/0,l=0,u=0,c=0;c{"use strict";var tkt=n7().setPositionOffset,g4e=["v","h"];m4e.exports=function(t,r){for(var n=t.calcdata,a=r.xaxis,i=r.yaxis,o=0;o{"use strict";var HG=xi(),jG=Xt(),rkt=ea(),WG=i7(),nkt=xU(),ikt=H7();x4e.exports=function(t,r,n,a){var i=t._context.staticPlot,o=t._fullLayout,s=r.xaxis,l=r.yaxis;function u(c,f){var v=nkt(c,{xaxis:s,yaxis:l,trace:f,connectGaps:!0,baseTolerance:.75,shape:"spline",simplify:!0,linearized:!0});return rkt.smoothopen(v[0],1)}jG.makeTraceGroups(a,n,"trace violins").each(function(c){var f=HG.select(this),v=c[0],g=v.t,p=v.trace;if(p.visible!==!0||g.empty){f.remove();return}var x=g.bPos,_=g.bdPos,y=r[g.valLetter+"axis"],C=r[g.posLetter+"axis"],k=p.side==="both",S=k||p.side==="positive",L=k||p.side==="negative",w=f.selectAll("path.violin").data(jG.identity);w.enter().append("path").style("vector-effect",i?"none":"non-scaling-stroke").attr("class","violin"),w.exit().remove(),w.each(function(B){var O=HG.select(this),V=B.density,j=V.length,q=C.c2l(B.pos+x,!0),U=C.l2p(q),J;if(p.width)J=g.maxKDE/_;else{var ee=o._violinScaleGroupStats[p.scalegroup];J=p.scalemode==="count"?ee.maxKDE/_*(ee.maxCount/B.pts.length):ee.maxKDE/_}var ce,ye,xe,ue,K,_e,ne;if(S){for(_e=new Array(j),ue=0;ue{"use strict";var b4e=xi(),J3=ni(),akt=Ld().stylePoints;w4e.exports=function(t){var r=b4e.select(t).selectAll("g.trace.violins");r.style("opacity",function(n){return n[0].trace.opacity}),r.each(function(n){var a=n[0].trace,i=b4e.select(this),o=a.box||{},s=o.line||{},l=a.meanline||{},u=l.width;i.selectAll("path.violin").style("stroke-width",a.line.width+"px").call(J3.stroke,a.line.color).call(J3.fill,a.fillcolor),i.selectAll("path.box").style("stroke-width",s.width+"px").call(J3.stroke,s.color).call(J3.fill,o.fillcolor);var c={"stroke-width":u+"px","stroke-dasharray":2*u+"px,"+u+"px"};i.selectAll("path.mean").style(c).call(J3.stroke,l.color),i.selectAll("path.meanline").style(c).call(J3.stroke,l.color),akt(i,a,t)})}});var E4e=fe((Hmr,S4e)=>{"use strict";var okt=ni(),YG=Xt(),skt=Yi(),A4e=OV(),M4e=H7();S4e.exports=function(t,r,n,a,i){i||(i={});var o=i.hoverLayer,s=t.cd,l=s[0].trace,u=l.hoveron,c=u.indexOf("violins")!==-1,f=u.indexOf("kde")!==-1,v=[],g,p;if(c||f){var x=A4e.hoverOnBoxes(t,r,n,a);if(f&&x.length>0){var _=t.xa,y=t.ya,C,k,S,L,w;l.orientation==="h"?(w=r,C="y",S=y,k="x",L=_):(w=n,C="x",S=_,k="y",L=y);var A=s[t.index];if(w>=A.span[0]&&w<=A.span[1]){var T=YG.extendFlat({},t),m=L.c2p(w,!0),F=M4e.getKdeValue(A,l,w),E=M4e.getPositionOnKdePath(A,l,m),I=S._offset,R=S._length;T[C+"0"]=E[0],T[C+"1"]=E[1],T[k+"0"]=T[k+"1"]=m,T[k+"Label"]=k+": "+skt.hoverLabelText(L,w,l[k+"hoverformat"])+", "+s[0].t.labels.kde+" "+F.toFixed(3);for(var B=0,O=0;O{"use strict";k4e.exports={attributes:BG(),layoutAttributes:UG(),supplyDefaults:c4e(),crossTraceDefaults:RA().crossTraceDefaults,supplyLayoutDefaults:h4e(),calc:p4e(),crossTraceCalc:y4e(),plot:_4e(),style:T4e(),styleOnSelect:Ld().styleOnSelect,hoverPoints:E4e(),selectPoints:NV(),moduleType:"trace",name:"violin",basePlotModule:gu(),categories:["cartesian","svg","symbols","oriented","box-violin","showLegend","violinLayout","zoomScale"],meta:{}}});var P4e=fe((Wmr,L4e)=>{"use strict";L4e.exports=C4e()});var D4e=fe((Ymr,F4e)=>{"use strict";F4e.exports={eventDataKeys:["percentInitial","percentPrevious","percentTotal"]}});var ZG=fe((Xmr,q4e)=>{"use strict";var il=u1(),XG=Ol().line,lkt=Ho(),R4e=pl().axisHoverFormat,{hovertemplateAttrs:ukt,texttemplateAttrs:ckt,templatefallbackAttrs:I4e}=Oo(),z4e=D4e(),pg=ta().extendFlat,fkt=ni();q4e.exports={x:il.x,x0:il.x0,dx:il.dx,y:il.y,y0:il.y0,dy:il.dy,xperiod:il.xperiod,yperiod:il.yperiod,xperiod0:il.xperiod0,yperiod0:il.yperiod0,xperiodalignment:il.xperiodalignment,yperiodalignment:il.yperiodalignment,xhoverformat:R4e("x"),yhoverformat:R4e("y"),hovertext:il.hovertext,hovertemplate:ukt({},{keys:z4e.eventDataKeys}),hovertemplatefallback:I4e(),hoverinfo:pg({},lkt.hoverinfo,{flags:["name","x","y","text","percent initial","percent previous","percent total"]}),textinfo:{valType:"flaglist",flags:["label","text","percent initial","percent previous","percent total","value"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:ckt({editType:"plot"},{keys:z4e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:I4e({editType:"plot"}),text:il.text,textposition:il.textposition,insidetextanchor:pg({},il.insidetextanchor,{dflt:"middle"}),textangle:pg({},il.textangle,{dflt:0}),textfont:il.textfont,insidetextfont:il.insidetextfont,outsidetextfont:il.outsidetextfont,constraintext:il.constraintext,cliponaxis:il.cliponaxis,orientation:pg({},il.orientation,{}),offset:pg({},il.offset,{arrayOk:!1}),width:pg({},il.width,{arrayOk:!1}),marker:hkt(),connector:{fillcolor:{valType:"color",editType:"style"},line:{color:pg({},XG.color,{dflt:fkt.defaultLine}),width:pg({},XG.width,{dflt:0,editType:"plot"}),dash:XG.dash,editType:"style"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:il.offsetgroup,alignmentgroup:il.alignmentgroup,zorder:il.zorder};function hkt(){var e=pg({},il.marker);return delete e.pattern,delete e.cornerradius,e}});var $G=fe((Zmr,B4e)=>{"use strict";B4e.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"}}});var JG=fe(($mr,N4e)=>{"use strict";var j7=Xt(),dkt=n2(),vkt=z0().handleText,pkt=r2(),gkt=sp(),O4e=ZG(),KG=ni();function mkt(e,t,r,n){function a(f,v){return j7.coerce(e,t,O4e,f,v)}var i=pkt(e,t,n,a);if(!i){t.visible=!1;return}gkt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("orientation",t.y&&!t.x?"v":"h"),a("offset"),a("width");var o=a("text");a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var s=a("textposition");vkt(e,t,n,a,s,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&!t.texttemplate&&a("textinfo",j7.isArrayOrTypedArray(o)?"text+value":"value");var l=a("marker.color",r);a("marker.line.color",KG.defaultLine),a("marker.line.width");var u=a("connector.visible");if(u){a("connector.fillcolor",ykt(l));var c=a("connector.line.width");c&&(a("connector.line.color"),a("connector.line.dash"))}a("zorder")}function ykt(e){var t=j7.isArrayOrTypedArray(e)?"#000":e;return KG.addOpacity(t,.5*KG.opacity(t))}function xkt(e,t){var r,n;function a(o){return j7.coerce(n._input,n,O4e,o)}for(var i=0;i{"use strict";var _kt=Xt(),bkt=$G();U4e.exports=function(e,t,r){var n=!1;function a(s,l){return _kt.coerce(e,t,bkt,s,l)}for(var i=0;i{"use strict";var Q3=Xt();G4e.exports=function(t,r){for(var n=0;n{"use strict";var j4e=Yi(),W4e=cp(),wkt=H4e(),Tkt=P0(),XA=Wa().BADNUM;Y4e.exports=function(t,r){var n=j4e.getFromId(t,r.xaxis||"x"),a=j4e.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c,f,v;r.orientation==="h"?(i=n.makeCalcdata(r,"x"),s=a.makeCalcdata(r,"y"),l=W4e(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=W4e(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;var g=Math.min(o.length,i.length),p=new Array(g);for(r._base=[],f=0;f{"use strict";var Z4e=i2().setGroupPositions;$4e.exports=function(t,r){var n=t._fullLayout,a=t._fullData,i=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,v;for(v=0;v{"use strict";var W7=xi(),Xm=Xt(),J4e=ea(),Ym=Wa().BADNUM,Akt=m2(),Mkt=kh().clearMinTextSize;eTe.exports=function(t,r,n,a){var i=t._fullLayout;Mkt("funnel",i),Skt(t,r,n,a),Ekt(t,r,n,a),Akt.plot(t,r,n,a,{mode:i.funnelmode,norm:i.funnelmode,gap:i.funnelgap,groupgap:i.funnelgroupgap})};function Skt(e,t,r,n){var a=t.xaxis,i=t.yaxis;Xm.makeTraceGroups(n,r,"trace bars").each(function(o){var s=W7.select(this),l=o[0].trace,u=Xm.ensureSingle(s,"g","regions");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.region").data(Xm.identity);f.enter().append("g").classed("region",!0),f.exit().remove();var v=f.size();f.each(function(g,p){if(!(p!==v-1&&!g.cNext)){var x=Q4e(g,a,i,c),_=x[0],y=x[1],C="";_[0]!==Ym&&y[0]!==Ym&&_[1]!==Ym&&y[1]!==Ym&&_[2]!==Ym&&y[2]!==Ym&&_[3]!==Ym&&y[3]!==Ym&&(c?C+="M"+_[0]+","+y[1]+"L"+_[2]+","+y[2]+"H"+_[3]+"L"+_[1]+","+y[1]+"Z":C+="M"+_[1]+","+y[1]+"L"+_[2]+","+y[3]+"V"+y[2]+"L"+_[1]+","+y[0]+"Z"),C===""&&(C="M0,0Z"),Xm.ensureSingle(W7.select(this),"path").attr("d",C).call(J4e.setClipUrl,t.layerClipId,e)}})})}function Ekt(e,t,r,n){var a=t.xaxis,i=t.yaxis;Xm.makeTraceGroups(n,r,"trace bars").each(function(o){var s=W7.select(this),l=o[0].trace,u=Xm.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible||!l.connector.line.width){u.remove();return}var c=l.orientation==="h",f=u.selectAll("g.line").data(Xm.identity);f.enter().append("g").classed("line",!0),f.exit().remove();var v=f.size();f.each(function(g,p){if(!(p!==v-1&&!g.cNext)){var x=Q4e(g,a,i,c),_=x[0],y=x[1],C="";_[3]!==void 0&&y[3]!==void 0&&(c?(C+="M"+_[0]+","+y[1]+"L"+_[2]+","+y[2],C+="M"+_[1]+","+y[1]+"L"+_[3]+","+y[2]):(C+="M"+_[1]+","+y[1]+"L"+_[2]+","+y[3],C+="M"+_[1]+","+y[0]+"L"+_[2]+","+y[2])),C===""&&(C="M0,0Z"),Xm.ensureSingle(W7.select(this),"path").attr("d",C).call(J4e.setClipUrl,t.layerClipId,e)}})})}function Q4e(e,t,r,n){var a=[],i=[],o=n?t:r,s=n?r:t;return a[0]=o.c2p(e.s0,!0),i[0]=s.c2p(e.p0,!0),a[1]=o.c2p(e.s1,!0),i[1]=s.c2p(e.p1,!0),a[2]=o.c2p(e.nextS0,!0),i[2]=s.c2p(e.nextP0,!0),a[3]=o.c2p(e.nextS1,!0),i[3]=s.c2p(e.nextP1,!0),n?[a,i]:[i,a]}});var iTe=fe((ryr,nTe)=>{"use strict";var ZA=xi(),rTe=ea(),eH=ni(),kkt=Y1().DESELECTDIM,Ckt=_v(),Lkt=kh().resizeText,Pkt=Ckt.styleTextPoints;function Fkt(e,t,r){var n=r||ZA.select(e).selectAll('g[class^="funnellayer"]').selectAll("g.trace");Lkt(e,n,"funnel"),n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=ZA.select(this),o=a[0].trace;i.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o.marker;ZA.select(this).call(eH.fill,s.mc||l.color).call(eH.stroke,s.mlc||l.line.color).call(rTe.dashLine,l.line.dash,s.mlw||l.line.width).style("opacity",o.selectedpoints&&!s.selected?kkt:1)}}),Pkt(i,o,e),i.selectAll(".regions").each(function(){ZA.select(this).selectAll("path").style("stroke-width",0).call(eH.fill,o.connector.fillcolor)}),i.selectAll(".lines").each(function(){var s=o.connector.line;rTe.lineGroupStyle(ZA.select(this).selectAll("path"),s.width,s.color,s.dash)})})}nTe.exports={style:Fkt}});var sTe=fe((nyr,oTe)=>{"use strict";var aTe=ni().opacity,Dkt=I3().hoverOnBars,tH=Xt().formatPercent;oTe.exports=function(t,r,n,a,i){var o=Dkt(t,r,n,a,i);if(o){var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=o.index,f=s[c],v=u?"x":"y";o[v+"LabelVal"]=f.s,o.percentInitial=f.begR,o.percentInitialLabel=tH(f.begR,1),o.percentPrevious=f.difR,o.percentPreviousLabel=tH(f.difR,1),o.percentTotal=f.sumR,o.percentTotalLabel=tH(f.sumR,1);var g=f.hi||l.hoverinfo,p=[];if(g&&g!=="none"&&g!=="skip"){var x=g==="all",_=g.split("+"),y=function(C){return x||_.indexOf(C)!==-1};y("percent initial")&&p.push(o.percentInitialLabel+" of initial"),y("percent previous")&&p.push(o.percentPreviousLabel+" of previous"),y("percent total")&&p.push(o.percentTotalLabel+" of total")}return o.extraText=p.join("
"),o.color=Rkt(l,f),[o]}};function Rkt(e,t){var r=e.marker,n=t.mc||r.color,a=t.mlc||r.line.color,i=t.mlw||r.line.width;if(aTe(n))return n;if(aTe(a)&&i)return a}});var uTe=fe((iyr,lTe)=>{"use strict";lTe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"percentInitial"in r&&(t.percentInitial=r.percentInitial),"percentPrevious"in r&&(t.percentPrevious=r.percentPrevious),"percentTotal"in r&&(t.percentTotal=r.percentTotal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var fTe=fe((ayr,cTe)=>{"use strict";cTe.exports={attributes:ZG(),layoutAttributes:$G(),supplyDefaults:JG().supplyDefaults,crossTraceDefaults:JG().crossTraceDefaults,supplyLayoutDefaults:V4e(),calc:X4e(),crossTraceCalc:K4e(),plot:tTe(),style:iTe().style,hoverPoints:sTe(),eventData:uTe(),selectPoints:z3(),moduleType:"trace",name:"funnel",basePlotModule:gu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var dTe=fe((oyr,hTe)=>{"use strict";hTe.exports=fTe()});var pTe=fe((syr,vTe)=>{"use strict";vTe.exports={eventDataKeys:["initial","delta","final"]}});var iH=fe((lyr,xTe)=>{"use strict";var qs=u1(),rH=Ol().line,Ikt=Ho(),gTe=pl().axisHoverFormat,{hovertemplateAttrs:zkt,texttemplateAttrs:qkt,templatefallbackAttrs:mTe}=Oo(),yTe=pTe(),ew=ta().extendFlat,Bkt=ni();function nH(e){return{marker:{color:ew({},qs.marker.color,{arrayOk:!1,editType:"style"}),line:{color:ew({},qs.marker.line.color,{arrayOk:!1,editType:"style"}),width:ew({},qs.marker.line.width,{arrayOk:!1,editType:"style"}),editType:"style"},editType:"style"},editType:"style"}}xTe.exports={measure:{valType:"data_array",dflt:[],editType:"calc"},base:{valType:"number",dflt:null,arrayOk:!1,editType:"calc"},x:qs.x,x0:qs.x0,dx:qs.dx,y:qs.y,y0:qs.y0,dy:qs.dy,xperiod:qs.xperiod,yperiod:qs.yperiod,xperiod0:qs.xperiod0,yperiod0:qs.yperiod0,xperiodalignment:qs.xperiodalignment,yperiodalignment:qs.yperiodalignment,xhoverformat:gTe("x"),yhoverformat:gTe("y"),hovertext:qs.hovertext,hovertemplate:zkt({},{keys:yTe.eventDataKeys}),hovertemplatefallback:mTe(),hoverinfo:ew({},Ikt.hoverinfo,{flags:["name","x","y","text","initial","delta","final"]}),textinfo:{valType:"flaglist",flags:["label","text","initial","delta","final"],extras:["none"],editType:"plot",arrayOk:!1},texttemplate:qkt({editType:"plot"},{keys:yTe.eventDataKeys.concat(["label"])}),texttemplatefallback:mTe({editType:"plot"}),text:qs.text,textposition:qs.textposition,insidetextanchor:qs.insidetextanchor,textangle:qs.textangle,textfont:qs.textfont,insidetextfont:qs.insidetextfont,outsidetextfont:qs.outsidetextfont,constraintext:qs.constraintext,cliponaxis:qs.cliponaxis,orientation:qs.orientation,offset:qs.offset,width:qs.width,increasing:nH("increasing"),decreasing:nH("decreasing"),totals:nH("intermediate sums and total"),connector:{line:{color:ew({},rH.color,{dflt:Bkt.defaultLine}),width:ew({},rH.width,{editType:"plot"}),dash:rH.dash,editType:"plot"},mode:{valType:"enumerated",values:["spanning","between"],dflt:"between",editType:"plot"},visible:{valType:"boolean",dflt:!0,editType:"plot"},editType:"plot"},offsetgroup:qs.offsetgroup,alignmentgroup:qs.alignmentgroup,zorder:qs.zorder}});var aH=fe((uyr,_Te)=>{"use strict";_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"}}});var tw=fe((cyr,bTe)=>{"use strict";bTe.exports={INCREASING:{COLOR:"#3D9970",SYMBOL:"\u25B2"},DECREASING:{COLOR:"#FF4136",SYMBOL:"\u25BC"}}});var sH=fe((fyr,MTe)=>{"use strict";var wTe=Xt(),Okt=n2(),Nkt=z0().handleText,Ukt=r2(),Vkt=sp(),TTe=iH(),Gkt=ni(),ATe=tw(),Hkt=ATe.INCREASING.COLOR,jkt=ATe.DECREASING.COLOR,Wkt="#4499FF";function oH(e,t,r){e(t+".marker.color",r),e(t+".marker.line.color",Gkt.defaultLine),e(t+".marker.line.width")}function Ykt(e,t,r,n){function a(u,c){return wTe.coerce(e,t,TTe,u,c)}var i=Ukt(e,t,n,a);if(!i){t.visible=!1;return}Vkt(e,t,n,a),a("xhoverformat"),a("yhoverformat"),a("measure"),a("orientation",t.x&&!t.y?"h":"v"),a("base"),a("offset"),a("width"),a("text"),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback");var o=a("textposition");Nkt(e,t,n,a,o,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!0,moduleHasCliponaxis:!0,moduleHasTextangle:!0,moduleHasInsideanchor:!0}),t.textposition!=="none"&&(a("texttemplate"),a("texttemplatefallback"),t.texttemplate||a("textinfo")),oH(a,"increasing",Hkt),oH(a,"decreasing",jkt),oH(a,"totals",Wkt);var s=a("connector.visible");if(s){a("connector.mode");var l=a("connector.line.width");l&&(a("connector.line.color"),a("connector.line.dash"))}a("zorder")}function Xkt(e,t){var r,n;function a(o){return wTe.coerce(n._input,n,TTe,o)}if(t.waterfallmode==="group")for(var i=0;i{"use strict";var Zkt=Xt(),$kt=aH();STe.exports=function(e,t,r){var n=!1;function a(s,l){return Zkt.coerce(e,t,$kt,s,l)}for(var i=0;i{"use strict";var kTe=Yi(),CTe=cp(),LTe=Xt().mergeArray,Kkt=P0(),PTe=Wa().BADNUM;function lH(e){return e==="a"||e==="absolute"}function uH(e){return e==="t"||e==="total"}FTe.exports=function(t,r){var n=kTe.getFromId(t,r.xaxis||"x"),a=kTe.getFromId(t,r.yaxis||"y"),i,o,s,l,u,c;r.orientation==="h"?(i=n.makeCalcdata(r,"x"),s=a.makeCalcdata(r,"y"),l=CTe(r,a,"y",s),u=!!r.yperiodalignment,c="y"):(i=a.makeCalcdata(r,"y"),s=n.makeCalcdata(r,"x"),l=CTe(r,n,"x",s),u=!!r.xperiodalignment,c="x"),o=l.vals;for(var f=Math.min(o.length,i.length),v=new Array(f),g=0,p,x=!1,_=0;_{"use strict";var RTe=i2().setGroupPositions;ITe.exports=function(t,r){var n=t._fullLayout,a=t._fullData,i=t.calcdata,o=r.xaxis,s=r.yaxis,l=[],u=[],c=[],f,v;for(v=0;v{"use strict";var qTe=xi(),Y7=Xt(),Jkt=ea(),rw=Wa().BADNUM,Qkt=m2(),e8t=kh().clearMinTextSize;BTe.exports=function(t,r,n,a){var i=t._fullLayout;e8t("waterfall",i),Qkt.plot(t,r,n,a,{mode:i.waterfallmode,norm:i.waterfallmode,gap:i.waterfallgap,groupgap:i.waterfallgroupgap}),t8t(t,r,n,a)};function t8t(e,t,r,n){var a=t.xaxis,i=t.yaxis;Y7.makeTraceGroups(n,r,"trace bars").each(function(o){var s=qTe.select(this),l=o[0].trace,u=Y7.ensureSingle(s,"g","lines");if(!l.connector||!l.connector.visible){u.remove();return}var c=l.orientation==="h",f=l.connector.mode,v=u.selectAll("g.line").data(Y7.identity);v.enter().append("g").classed("line",!0),v.exit().remove();var g=v.size();v.each(function(p,x){if(!(x!==g-1&&!p.cNext)){var _=r8t(p,a,i,c),y=_[0],C=_[1],k="";y[0]!==rw&&C[0]!==rw&&y[1]!==rw&&C[1]!==rw&&(f==="spanning"&&!p.isSum&&x>0&&(c?k+="M"+y[0]+","+C[1]+"V"+C[0]:k+="M"+y[1]+","+C[0]+"H"+y[0]),f!=="between"&&(p.isSum||x{"use strict";var X7=xi(),NTe=ea(),UTe=ni(),n8t=Y1().DESELECTDIM,i8t=_v(),a8t=kh().resizeText,o8t=i8t.styleTextPoints;function s8t(e,t,r){var n=r||X7.select(e).selectAll('g[class^="waterfalllayer"]').selectAll("g.trace");a8t(e,n,"waterfall"),n.style("opacity",function(a){return a[0].trace.opacity}),n.each(function(a){var i=X7.select(this),o=a[0].trace;i.selectAll(".point > path").each(function(s){if(!s.isBlank){var l=o[s.dir].marker;X7.select(this).call(UTe.fill,l.color).call(UTe.stroke,l.line.color).call(NTe.dashLine,l.line.dash,l.line.width).style("opacity",o.selectedpoints&&!s.selected?n8t:1)}}),o8t(i,o,e),i.selectAll(".lines").each(function(){var s=o.connector.line;NTe.lineGroupStyle(X7.select(this).selectAll("path"),s.width,s.color,s.dash)})})}VTe.exports={style:s8t}});var XTe=fe((myr,YTe)=>{"use strict";var l8t=Yi().hoverLabelText,HTe=ni().opacity,u8t=I3().hoverOnBars,jTe=tw(),WTe={increasing:jTe.INCREASING.SYMBOL,decreasing:jTe.DECREASING.SYMBOL};YTe.exports=function(t,r,n,a,i){var o=u8t(t,r,n,a,i);if(!o)return;var s=o.cd,l=s[0].trace,u=l.orientation==="h",c=u?"x":"y",f=u?t.xa:t.ya;function v(w){return l8t(f,w,l[c+"hoverformat"])}var g=o.index,p=s[g],x=p.isSum?p.b+p.s:p.rawS;o.initial=p.b+p.s-x,o.delta=x,o.final=o.initial+o.delta;var _=v(Math.abs(o.delta));o.deltaLabel=x<0?"("+_+")":_,o.finalLabel=v(o.final),o.initialLabel=v(o.initial);var y=p.hi||l.hoverinfo,C=[];if(y&&y!=="none"&&y!=="skip"){var k=y==="all",S=y.split("+"),L=function(w){return k||S.indexOf(w)!==-1};p.isSum||(L("final")&&(u?!L("x"):!L("y"))&&C.push(o.finalLabel),L("delta")&&(x<0?C.push(o.deltaLabel+" "+WTe.decreasing):C.push(o.deltaLabel+" "+WTe.increasing)),L("initial")&&C.push("Initial: "+o.initialLabel))}return C.length&&(o.extraText=C.join("
")),o.color=c8t(l,p),[o]};function c8t(e,t){var r=e[t.dir].marker,n=r.color,a=r.line.color,i=r.line.width;if(HTe(n))return n;if(HTe(a)&&i)return a}});var $Te=fe((yyr,ZTe)=>{"use strict";ZTe.exports=function(t,r){return t.x="xVal"in r?r.xVal:r.x,t.y="yVal"in r?r.yVal:r.y,"initial"in r&&(t.initial=r.initial),"delta"in r&&(t.delta=r.delta),"final"in r&&(t.final=r.final),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t}});var JTe=fe((xyr,KTe)=>{"use strict";KTe.exports={attributes:iH(),layoutAttributes:aH(),supplyDefaults:sH().supplyDefaults,crossTraceDefaults:sH().crossTraceDefaults,supplyLayoutDefaults:ETe(),calc:DTe(),crossTraceCalc:zTe(),plot:OTe(),style:GTe().style,hoverPoints:XTe(),eventData:$Te(),selectPoints:z3(),moduleType:"trace",name:"waterfall",basePlotModule:gu(),categories:["bar-like","cartesian","svg","oriented","showLegend","zoomScale"],meta:{}}});var eAe=fe((_yr,QTe)=>{"use strict";QTe.exports=JTe()});var nw=fe((byr,tAe)=>{"use strict";tAe.exports={colormodel:{rgb:{min:[0,0,0],max:[255,255,255],fmt:function(e){return e.slice(0,3)},suffix:["","",""]},rgba:{min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},rgba256:{colormodel:"rgba",zminDflt:[0,0,0,0],zmaxDflt:[255,255,255,255],min:[0,0,0,0],max:[255,255,255,1],fmt:function(e){return e.slice(0,4)},suffix:["","","",""]},hsl:{min:[0,0,0],max:[360,100,100],fmt:function(e){var t=e.slice(0,3);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%"]},hsla:{min:[0,0,0,0],max:[360,100,100,1],fmt:function(e){var t=e.slice(0,4);return t[1]=t[1]+"%",t[2]=t[2]+"%",t},suffix:["\xB0","%","%",""]}}}});var cH={};zp(cH,{default:()=>h8t});var rAe,nAe,Z7,iAe,aAe,oAe,sAe,lAe,f8t,h8t,fH=Co(()=>{"use strict";rAe=$0(ta()),nAe=$0(Ho()),Z7=$0(Oo()),iAe=$0(Ol()),aAe=$0(nw()),oAe=["rgb","rgba","rgba256","hsl","hsla"],sAe=[],lAe=[];for(let e of oAe){let t=aAe.colormodel[e];sAe.push(`For the \`${e}\` colormodel, it is [${(t.zminDflt||t.min).join(", ")}].`),lAe.push(`For the \`${e}\` colormodel, it is [${(t.zmaxDflt||t.max).join(", ")}].`)}f8t={source:{valType:"string",editType:"calc",description:["Specifies the data URI of the image to be visualized.",'The URI consists of "data:image/[][;base64\\\\],"'].join(" ")},z:{valType:"data_array",editType:"calc",description:["A 2-dimensional array in which each element is an array of 3 or 4 numbers representing a color."].join(" ")},colormodel:{valType:"enumerated",values:oAe,editType:"calc",description:["Color model used to map the numerical color components described in `z` into colors.","If `source` is specified, this attribute will be set to `rgba256`","otherwise it defaults to `rgb`."].join(" ")},zsmooth:{valType:"enumerated",values:["fast",!1],dflt:!1,editType:"plot",description:["Picks a smoothing algorithm used to smooth `z` data.","This only applies for image traces that use the `source` attribute."].join(" ")},zmin:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the lower bound for each color component.","Note that the default value will depend on the colormodel.",sAe.join(" ")].join(" ")},zmax:{valType:"info_array",items:[{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"},{valType:"number",editType:"calc"}],editType:"calc",description:["Array defining the higher bound for each color component.","Note that the default value will depend on the colormodel.",lAe.join(" ")].join(" ")},x0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's x position. The left edge of the image","(or the right edge if the x axis is reversed or dx is negative)","will be found at xmin=x0-dx/2"].join(" ")},y0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes",description:["Set the image's y position. The top edge of the image","(or the bottom edge if the y axis is NOT reversed or if dy is negative)","will be found at ymin=y0-dy/2. By default when an image trace is","included, the y axis will be reversed so that the image is right-side-up,","but you can disable this by setting yaxis.autorange=true or by providing","an explicit y axis range."].join(" ")},dx:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's horizontal size."},dy:{valType:"number",dflt:1,editType:"calc",description:"Set the pixel's vertical size"},text:{valType:"data_array",editType:"plot",description:"Sets the text elements associated with each z value."},hovertext:{valType:"data_array",editType:"plot",description:"Same as `text`."},hoverinfo:(0,rAe.extendFlat)({},nAe.default.hoverinfo,{flags:["x","y","z","color","name","text"],dflt:"x+y+z+text+name"}),hovertemplate:(0,Z7.hovertemplateAttrs)({},{keys:["z","color","colormodel"]}),hovertemplatefallback:(0,Z7.templatefallbackAttrs)(),zorder:iAe.zorder},h8t=f8t});var fAe=fe((wyr,cAe)=>{"use strict";var d8t=Xt(),v8t=(fH(),Gs(cH)).default,uAe=nw(),p8t=ag().IMAGE_URL_PREFIX;cAe.exports=function(t,r){function n(o,s){return d8t.coerce(t,r,v8t,o,s)}n("source"),r.source&&!r.source.match(p8t)&&delete r.source,r._hasSource=!!r.source;var a=n("z");if(r._hasZ=!(a===void 0||!a.length||!a[0]||!a[0].length),!r._hasZ&&!r._hasSource){r.visible=!1;return}n("x0"),n("y0"),n("dx"),n("dy");var i;r._hasZ?(n("colormodel","rgb"),i=uAe.colormodel[r.colormodel],n("zmin",i.zminDflt||i.min),n("zmax",i.zmaxDflt||i.max)):r._hasSource&&(r.colormodel="rgba256",i=uAe.colormodel[r.colormodel],r.zmin=i.zminDflt,r.zmax=i.zmaxDflt),n("zsmooth"),n("text"),n("hovertext"),n("hovertemplate"),n("hovertemplatefallback"),r._length=null,n("zorder")}});var gg=fe((Tyr,hH)=>{typeof Object.create=="function"?hH.exports=function(t,r){r&&(t.super_=r,t.prototype=Object.create(r.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}))}:hH.exports=function(t,r){if(r){t.super_=r;var n=function(){};n.prototype=r.prototype,t.prototype=new n,t.prototype.constructor=t}}});var dH=fe((Ayr,hAe)=>{hAe.exports=Mx().EventEmitter});var pAe=fe($7=>{"use strict";$7.byteLength=m8t;$7.toByteArray=x8t;$7.fromByteArray=w8t;var p1=[],Ev=[],g8t=typeof Uint8Array!="undefined"?Uint8Array:Array,vH="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";for(T2=0,dAe=vH.length;T20)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");r===-1&&(r=t);var n=r===t?0:4-r%4;return[r,n]}function m8t(e){var t=vAe(e),r=t[0],n=t[1];return(r+n)*3/4-n}function y8t(e,t,r){return(t+r)*3/4-r}function x8t(e){var t,r=vAe(e),n=r[0],a=r[1],i=new g8t(y8t(e,n,a)),o=0,s=a>0?n-4:n,l;for(l=0;l>16&255,i[o++]=t>>8&255,i[o++]=t&255;return a===2&&(t=Ev[e.charCodeAt(l)]<<2|Ev[e.charCodeAt(l+1)]>>4,i[o++]=t&255),a===1&&(t=Ev[e.charCodeAt(l)]<<10|Ev[e.charCodeAt(l+1)]<<4|Ev[e.charCodeAt(l+2)]>>2,i[o++]=t>>8&255,i[o++]=t&255),i}function _8t(e){return p1[e>>18&63]+p1[e>>12&63]+p1[e>>6&63]+p1[e&63]}function b8t(e,t,r){for(var n,a=[],i=t;is?s:o+i));return n===1?(t=e[r-1],a.push(p1[t>>2]+p1[t<<4&63]+"==")):n===2&&(t=(e[r-2]<<8)+e[r-1],a.push(p1[t>>10]+p1[t>>4&63]+p1[t<<2&63]+"=")),a.join("")}});var gAe=fe(pH=>{pH.read=function(e,t,r,n,a){var i,o,s=a*8-n-1,l=(1<>1,c=-7,f=r?a-1:0,v=r?-1:1,g=e[t+f];for(f+=v,i=g&(1<<-c)-1,g>>=-c,c+=s;c>0;i=i*256+e[t+f],f+=v,c-=8);for(o=i&(1<<-c)-1,i>>=-c,c+=n;c>0;o=o*256+e[t+f],f+=v,c-=8);if(i===0)i=1-u;else{if(i===l)return o?NaN:(g?-1:1)*(1/0);o=o+Math.pow(2,n),i=i-u}return(g?-1:1)*o*Math.pow(2,i-n)};pH.write=function(e,t,r,n,a,i){var o,s,l,u=i*8-a-1,c=(1<>1,v=a===23?Math.pow(2,-24)-Math.pow(2,-77):0,g=n?0:i-1,p=n?1:-1,x=t<0||t===0&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(l=Math.pow(2,-o))<1&&(o--,l*=2),o+f>=1?t+=v/l:t+=v*Math.pow(2,1-f),t*l>=2&&(o++,l/=2),o+f>=c?(s=0,o=c):o+f>=1?(s=(t*l-1)*Math.pow(2,a),o=o+f):(s=t*Math.pow(2,f-1)*Math.pow(2,a),o=0));a>=8;e[r+g]=s&255,g+=p,s/=256,a-=8);for(o=o<0;e[r+g]=o&255,g+=p,o/=256,u-=8);e[r+g-p]|=x*128}});var M2=fe(sw=>{"use strict";var gH=pAe(),aw=gAe(),mAe=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;sw.Buffer=Bn;sw.SlowBuffer=k8t;sw.INSPECT_MAX_BYTES=50;var K7=2147483647;sw.kMaxLength=K7;Bn.TYPED_ARRAY_SUPPORT=T8t();!Bn.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&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 T8t(){try{let e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),e.foo()===42}catch(e){return!1}}Object.defineProperty(Bn.prototype,"parent",{enumerable:!0,get:function(){if(Bn.isBuffer(this))return this.buffer}});Object.defineProperty(Bn.prototype,"offset",{enumerable:!0,get:function(){if(Bn.isBuffer(this))return this.byteOffset}});function mg(e){if(e>K7)throw new RangeError('The value "'+e+'" is invalid for option "size"');let t=new Uint8Array(e);return Object.setPrototypeOf(t,Bn.prototype),t}function Bn(e,t,r){if(typeof e=="number"){if(typeof t=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return _H(e)}return bAe(e,t,r)}Bn.poolSize=8192;function bAe(e,t,r){if(typeof e=="string")return M8t(e,t);if(ArrayBuffer.isView(e))return S8t(e);if(e==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(g1(e,ArrayBuffer)||e&&g1(e.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(g1(e,SharedArrayBuffer)||e&&g1(e.buffer,SharedArrayBuffer)))return yH(e,t,r);if(typeof e=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');let n=e.valueOf&&e.valueOf();if(n!=null&&n!==e)return Bn.from(n,t,r);let a=E8t(e);if(a)return a;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof e[Symbol.toPrimitive]=="function")return Bn.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}Bn.from=function(e,t,r){return bAe(e,t,r)};Object.setPrototypeOf(Bn.prototype,Uint8Array.prototype);Object.setPrototypeOf(Bn,Uint8Array);function wAe(e){if(typeof e!="number")throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function A8t(e,t,r){return wAe(e),e<=0?mg(e):t!==void 0?typeof r=="string"?mg(e).fill(t,r):mg(e).fill(t):mg(e)}Bn.alloc=function(e,t,r){return A8t(e,t,r)};function _H(e){return wAe(e),mg(e<0?0:bH(e)|0)}Bn.allocUnsafe=function(e){return _H(e)};Bn.allocUnsafeSlow=function(e){return _H(e)};function M8t(e,t){if((typeof t!="string"||t==="")&&(t="utf8"),!Bn.isEncoding(t))throw new TypeError("Unknown encoding: "+t);let r=TAe(e,t)|0,n=mg(r),a=n.write(e,t);return a!==r&&(n=n.slice(0,a)),n}function mH(e){let t=e.length<0?0:bH(e.length)|0,r=mg(t);for(let n=0;n=K7)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+K7.toString(16)+" bytes");return e|0}function k8t(e){return+e!=e&&(e=0),Bn.alloc(+e)}Bn.isBuffer=function(t){return t!=null&&t._isBuffer===!0&&t!==Bn.prototype};Bn.compare=function(t,r){if(g1(t,Uint8Array)&&(t=Bn.from(t,t.offset,t.byteLength)),g1(r,Uint8Array)&&(r=Bn.from(r,r.offset,r.byteLength)),!Bn.isBuffer(t)||!Bn.isBuffer(r))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(t===r)return 0;let n=t.length,a=r.length;for(let i=0,o=Math.min(n,a);ia.length?(Bn.isBuffer(o)||(o=Bn.from(o)),o.copy(a,i)):Uint8Array.prototype.set.call(a,o,i);else if(Bn.isBuffer(o))o.copy(a,i);else throw new TypeError('"list" argument must be an Array of Buffers');i+=o.length}return a};function TAe(e,t){if(Bn.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||g1(e,ArrayBuffer))return e.byteLength;if(typeof e!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);let r=e.length,n=arguments.length>2&&arguments[2]===!0;if(!n&&r===0)return 0;let a=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return xH(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return r*2;case"hex":return r>>>1;case"base64":return FAe(e).length;default:if(a)return n?-1:xH(e).length;t=(""+t).toLowerCase(),a=!0}}Bn.byteLength=TAe;function C8t(e,t,r){let n=!1;if((t===void 0||t<0)&&(t=0),t>this.length||((r===void 0||r>this.length)&&(r=this.length),r<=0)||(r>>>=0,t>>>=0,r<=t))return"";for(e||(e="utf8");;)switch(e){case"hex":return O8t(this,t,r);case"utf8":case"utf-8":return MAe(this,t,r);case"ascii":return q8t(this,t,r);case"latin1":case"binary":return B8t(this,t,r);case"base64":return I8t(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return N8t(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}Bn.prototype._isBuffer=!0;function A2(e,t,r){let n=e[t];e[t]=e[r],e[r]=n}Bn.prototype.swap16=function(){let t=this.length;if(t%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let r=0;rr&&(t+=" ... "),""};mAe&&(Bn.prototype[mAe]=Bn.prototype.inspect);Bn.prototype.compare=function(t,r,n,a,i){if(g1(t,Uint8Array)&&(t=Bn.from(t,t.offset,t.byteLength)),!Bn.isBuffer(t))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof t);if(r===void 0&&(r=0),n===void 0&&(n=t?t.length:0),a===void 0&&(a=0),i===void 0&&(i=this.length),r<0||n>t.length||a<0||i>this.length)throw new RangeError("out of range index");if(a>=i&&r>=n)return 0;if(a>=i)return-1;if(r>=n)return 1;if(r>>>=0,n>>>=0,a>>>=0,i>>>=0,this===t)return 0;let o=i-a,s=n-r,l=Math.min(o,s),u=this.slice(a,i),c=t.slice(r,n);for(let f=0;f2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,TH(r)&&(r=a?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(a)return-1;r=e.length-1}else if(r<0)if(a)r=0;else return-1;if(typeof t=="string"&&(t=Bn.from(t,n)),Bn.isBuffer(t))return t.length===0?-1:yAe(e,t,r,n,a);if(typeof t=="number")return t=t&255,typeof Uint8Array.prototype.indexOf=="function"?a?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):yAe(e,[t],r,n,a);throw new TypeError("val must be string, number or Buffer")}function yAe(e,t,r,n,a){let i=1,o=e.length,s=t.length;if(n!==void 0&&(n=String(n).toLowerCase(),n==="ucs2"||n==="ucs-2"||n==="utf16le"||n==="utf-16le")){if(e.length<2||t.length<2)return-1;i=2,o/=2,s/=2,r/=2}function l(c,f){return i===1?c[f]:c.readUInt16BE(f*i)}let u;if(a){let c=-1;for(u=r;uo&&(r=o-s),u=r;u>=0;u--){let c=!0;for(let f=0;fa&&(n=a)):n=a;let i=t.length;n>i/2&&(n=i/2);let o;for(o=0;o>>0,isFinite(n)?(n=n>>>0,a===void 0&&(a="utf8")):(a=n,n=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");let i=this.length-r;if((n===void 0||n>i)&&(n=i),t.length>0&&(n<0||r<0)||r>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");let o=!1;for(;;)switch(a){case"hex":return L8t(this,t,r,n);case"utf8":case"utf-8":return P8t(this,t,r,n);case"ascii":case"latin1":case"binary":return F8t(this,t,r,n);case"base64":return D8t(this,t,r,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return R8t(this,t,r,n);default:if(o)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),o=!0}};Bn.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function I8t(e,t,r){return t===0&&r===e.length?gH.fromByteArray(e):gH.fromByteArray(e.slice(t,r))}function MAe(e,t,r){r=Math.min(e.length,r);let n=[],a=t;for(;a239?4:i>223?3:i>191?2:1;if(a+s<=r){let l,u,c,f;switch(s){case 1:i<128&&(o=i);break;case 2:l=e[a+1],(l&192)===128&&(f=(i&31)<<6|l&63,f>127&&(o=f));break;case 3:l=e[a+1],u=e[a+2],(l&192)===128&&(u&192)===128&&(f=(i&15)<<12|(l&63)<<6|u&63,f>2047&&(f<55296||f>57343)&&(o=f));break;case 4:l=e[a+1],u=e[a+2],c=e[a+3],(l&192)===128&&(u&192)===128&&(c&192)===128&&(f=(i&15)<<18|(l&63)<<12|(u&63)<<6|c&63,f>65535&&f<1114112&&(o=f))}}o===null?(o=65533,s=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|o&1023),n.push(o),a+=s}return z8t(n)}var xAe=4096;function z8t(e){let t=e.length;if(t<=xAe)return String.fromCharCode.apply(String,e);let r="",n=0;for(;nn)&&(r=n);let a="";for(let i=t;in&&(t=n),r<0?(r+=n,r<0&&(r=0)):r>n&&(r=n),rr)throw new RangeError("Trying to access beyond buffer length")}Bn.prototype.readUintLE=Bn.prototype.readUIntLE=function(t,r,n){t=t>>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t],i=1,o=0;for(;++o>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t+--r],i=1;for(;r>0&&(i*=256);)a+=this[t+--r]*i;return a};Bn.prototype.readUint8=Bn.prototype.readUInt8=function(t,r){return t=t>>>0,r||Kf(t,1,this.length),this[t]};Bn.prototype.readUint16LE=Bn.prototype.readUInt16LE=function(t,r){return t=t>>>0,r||Kf(t,2,this.length),this[t]|this[t+1]<<8};Bn.prototype.readUint16BE=Bn.prototype.readUInt16BE=function(t,r){return t=t>>>0,r||Kf(t,2,this.length),this[t]<<8|this[t+1]};Bn.prototype.readUint32LE=Bn.prototype.readUInt32LE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),(this[t]|this[t+1]<<8|this[t+2]<<16)+this[t+3]*16777216};Bn.prototype.readUint32BE=Bn.prototype.readUInt32BE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]*16777216+(this[t+1]<<16|this[t+2]<<8|this[t+3])};Bn.prototype.readBigUInt64LE=Zm(function(t){t=t>>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=r+this[++t]*2**8+this[++t]*2**16+this[++t]*2**24,i=this[++t]+this[++t]*2**8+this[++t]*2**16+n*2**24;return BigInt(a)+(BigInt(i)<>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=r*2**24+this[++t]*2**16+this[++t]*2**8+this[++t],i=this[++t]*2**24+this[++t]*2**16+this[++t]*2**8+n;return(BigInt(a)<>>0,r=r>>>0,n||Kf(t,r,this.length);let a=this[t],i=1,o=0;for(;++o=i&&(a-=Math.pow(2,8*r)),a};Bn.prototype.readIntBE=function(t,r,n){t=t>>>0,r=r>>>0,n||Kf(t,r,this.length);let a=r,i=1,o=this[t+--a];for(;a>0&&(i*=256);)o+=this[t+--a]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*r)),o};Bn.prototype.readInt8=function(t,r){return t=t>>>0,r||Kf(t,1,this.length),this[t]&128?(255-this[t]+1)*-1:this[t]};Bn.prototype.readInt16LE=function(t,r){t=t>>>0,r||Kf(t,2,this.length);let n=this[t]|this[t+1]<<8;return n&32768?n|4294901760:n};Bn.prototype.readInt16BE=function(t,r){t=t>>>0,r||Kf(t,2,this.length);let n=this[t+1]|this[t]<<8;return n&32768?n|4294901760:n};Bn.prototype.readInt32LE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]|this[t+1]<<8|this[t+2]<<16|this[t+3]<<24};Bn.prototype.readInt32BE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),this[t]<<24|this[t+1]<<16|this[t+2]<<8|this[t+3]};Bn.prototype.readBigInt64LE=Zm(function(t){t=t>>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=this[t+4]+this[t+5]*2**8+this[t+6]*2**16+(n<<24);return(BigInt(a)<>>0,ow(t,"offset");let r=this[t],n=this[t+7];(r===void 0||n===void 0)&&$A(t,this.length-8);let a=(r<<24)+this[++t]*2**16+this[++t]*2**8+this[++t];return(BigInt(a)<>>0,r||Kf(t,4,this.length),aw.read(this,t,!0,23,4)};Bn.prototype.readFloatBE=function(t,r){return t=t>>>0,r||Kf(t,4,this.length),aw.read(this,t,!1,23,4)};Bn.prototype.readDoubleLE=function(t,r){return t=t>>>0,r||Kf(t,8,this.length),aw.read(this,t,!0,52,8)};Bn.prototype.readDoubleBE=function(t,r){return t=t>>>0,r||Kf(t,8,this.length),aw.read(this,t,!1,52,8)};function s0(e,t,r,n,a,i){if(!Bn.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>a||te.length)throw new RangeError("Index out of range")}Bn.prototype.writeUintLE=Bn.prototype.writeUIntLE=function(t,r,n,a){if(t=+t,r=r>>>0,n=n>>>0,!a){let s=Math.pow(2,8*n)-1;s0(this,t,r,n,s,0)}let i=1,o=0;for(this[r]=t&255;++o>>0,n=n>>>0,!a){let s=Math.pow(2,8*n)-1;s0(this,t,r,n,s,0)}let i=n-1,o=1;for(this[r+i]=t&255;--i>=0&&(o*=256);)this[r+i]=t/o&255;return r+n};Bn.prototype.writeUint8=Bn.prototype.writeUInt8=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,1,255,0),this[r]=t&255,r+1};Bn.prototype.writeUint16LE=Bn.prototype.writeUInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,65535,0),this[r]=t&255,this[r+1]=t>>>8,r+2};Bn.prototype.writeUint16BE=Bn.prototype.writeUInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,65535,0),this[r]=t>>>8,this[r+1]=t&255,r+2};Bn.prototype.writeUint32LE=Bn.prototype.writeUInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,4294967295,0),this[r+3]=t>>>24,this[r+2]=t>>>16,this[r+1]=t>>>8,this[r]=t&255,r+4};Bn.prototype.writeUint32BE=Bn.prototype.writeUInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,4294967295,0),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};function SAe(e,t,r,n,a){PAe(t,n,a,e,r,7);let i=Number(t&BigInt(4294967295));e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i,i=i>>8,e[r++]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,o=o>>8,e[r++]=o,r}function EAe(e,t,r,n,a){PAe(t,n,a,e,r,7);let i=Number(t&BigInt(4294967295));e[r+7]=i,i=i>>8,e[r+6]=i,i=i>>8,e[r+5]=i,i=i>>8,e[r+4]=i;let o=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=o,o=o>>8,e[r+2]=o,o=o>>8,e[r+1]=o,o=o>>8,e[r]=o,r+8}Bn.prototype.writeBigUInt64LE=Zm(function(t,r=0){return SAe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Bn.prototype.writeBigUInt64BE=Zm(function(t,r=0){return EAe(this,t,r,BigInt(0),BigInt("0xffffffffffffffff"))});Bn.prototype.writeIntLE=function(t,r,n,a){if(t=+t,r=r>>>0,!a){let l=Math.pow(2,8*n-1);s0(this,t,r,n,l-1,-l)}let i=0,o=1,s=0;for(this[r]=t&255;++i>0)-s&255;return r+n};Bn.prototype.writeIntBE=function(t,r,n,a){if(t=+t,r=r>>>0,!a){let l=Math.pow(2,8*n-1);s0(this,t,r,n,l-1,-l)}let i=n-1,o=1,s=0;for(this[r+i]=t&255;--i>=0&&(o*=256);)t<0&&s===0&&this[r+i+1]!==0&&(s=1),this[r+i]=(t/o>>0)-s&255;return r+n};Bn.prototype.writeInt8=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,1,127,-128),t<0&&(t=255+t+1),this[r]=t&255,r+1};Bn.prototype.writeInt16LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,32767,-32768),this[r]=t&255,this[r+1]=t>>>8,r+2};Bn.prototype.writeInt16BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,2,32767,-32768),this[r]=t>>>8,this[r+1]=t&255,r+2};Bn.prototype.writeInt32LE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,2147483647,-2147483648),this[r]=t&255,this[r+1]=t>>>8,this[r+2]=t>>>16,this[r+3]=t>>>24,r+4};Bn.prototype.writeInt32BE=function(t,r,n){return t=+t,r=r>>>0,n||s0(this,t,r,4,2147483647,-2147483648),t<0&&(t=4294967295+t+1),this[r]=t>>>24,this[r+1]=t>>>16,this[r+2]=t>>>8,this[r+3]=t&255,r+4};Bn.prototype.writeBigInt64LE=Zm(function(t,r=0){return SAe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});Bn.prototype.writeBigInt64BE=Zm(function(t,r=0){return EAe(this,t,r,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))});function kAe(e,t,r,n,a,i){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function CAe(e,t,r,n,a){return t=+t,r=r>>>0,a||kAe(e,t,r,4,34028234663852886e22,-34028234663852886e22),aw.write(e,t,r,n,23,4),r+4}Bn.prototype.writeFloatLE=function(t,r,n){return CAe(this,t,r,!0,n)};Bn.prototype.writeFloatBE=function(t,r,n){return CAe(this,t,r,!1,n)};function LAe(e,t,r,n,a){return t=+t,r=r>>>0,a||kAe(e,t,r,8,17976931348623157e292,-17976931348623157e292),aw.write(e,t,r,n,52,8),r+8}Bn.prototype.writeDoubleLE=function(t,r,n){return LAe(this,t,r,!0,n)};Bn.prototype.writeDoubleBE=function(t,r,n){return LAe(this,t,r,!1,n)};Bn.prototype.copy=function(t,r,n,a){if(!Bn.isBuffer(t))throw new TypeError("argument should be a Buffer");if(n||(n=0),!a&&a!==0&&(a=this.length),r>=t.length&&(r=t.length),r||(r=0),a>0&&a=this.length)throw new RangeError("Index out of range");if(a<0)throw new RangeError("sourceEnd out of bounds");a>this.length&&(a=this.length),t.length-r>>0,n=n===void 0?this.length:n>>>0,t||(t=0);let i;if(typeof t=="number")for(i=r;i2**32?a=_Ae(String(r)):typeof r=="bigint"&&(a=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(a=_Ae(a)),a+="n"),n+=` It must be ${t}. Received ${a}`,n},RangeError);function _Ae(e){let t="",r=e.length,n=e[0]==="-"?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function U8t(e,t,r){ow(t,"offset"),(e[t]===void 0||e[t+r]===void 0)&&$A(t,e.length-(r+1))}function PAe(e,t,r,n,a,i){if(e>r||e3?t===0||t===BigInt(0)?s=`>= 0${o} and < 2${o} ** ${(i+1)*8}${o}`:s=`>= -(2${o} ** ${(i+1)*8-1}${o}) and < 2 ** ${(i+1)*8-1}${o}`:s=`>= ${t}${o} and <= ${r}${o}`,new iw.ERR_OUT_OF_RANGE("value",s,e)}U8t(n,a,i)}function ow(e,t){if(typeof e!="number")throw new iw.ERR_INVALID_ARG_TYPE(t,"number",e)}function $A(e,t,r){throw Math.floor(e)!==e?(ow(e,r),new iw.ERR_OUT_OF_RANGE(r||"offset","an integer",e)):t<0?new iw.ERR_BUFFER_OUT_OF_BOUNDS:new iw.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}var V8t=/[^+/0-9A-Za-z-_]/g;function G8t(e){if(e=e.split("=")[0],e=e.trim().replace(V8t,""),e.length<2)return"";for(;e.length%4!==0;)e=e+"=";return e}function xH(e,t){t=t||1/0;let r,n=e.length,a=null,i=[];for(let o=0;o55295&&r<57344){if(!a){if(r>56319){(t-=3)>-1&&i.push(239,191,189);continue}else if(o+1===n){(t-=3)>-1&&i.push(239,191,189);continue}a=r;continue}if(r<56320){(t-=3)>-1&&i.push(239,191,189),a=r;continue}r=(a-55296<<10|r-56320)+65536}else a&&(t-=3)>-1&&i.push(239,191,189);if(a=null,r<128){if((t-=1)<0)break;i.push(r)}else if(r<2048){if((t-=2)<0)break;i.push(r>>6|192,r&63|128)}else if(r<65536){if((t-=3)<0)break;i.push(r>>12|224,r>>6&63|128,r&63|128)}else if(r<1114112){if((t-=4)<0)break;i.push(r>>18|240,r>>12&63|128,r>>6&63|128,r&63|128)}else throw new Error("Invalid code point")}return i}function H8t(e){let t=[];for(let r=0;r>8,a=r%256,i.push(a),i.push(n);return i}function FAe(e){return gH.toByteArray(G8t(e))}function J7(e,t,r,n){let a;for(a=0;a=t.length||a>=e.length);++a)t[a+r]=e[a];return a}function g1(e,t){return e instanceof t||e!=null&&e.constructor!=null&&e.constructor.name!=null&&e.constructor.name===t.name}function TH(e){return e!==e}var W8t=(function(){let e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){let n=r*16;for(let a=0;a<16;++a)t[n+a]=e[r]+e[a]}return t})();function Zm(e){return typeof BigInt=="undefined"?Y8t:e}function Y8t(){throw new Error("BigInt not supported")}});var Q7=fe((Cyr,DAe)=>{"use strict";DAe.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var t={},r=Symbol("test"),n=Object(r);if(typeof r=="string"||Object.prototype.toString.call(r)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var a=42;t[r]=a;for(var i in t)return!1;if(typeof Object.keys=="function"&&Object.keys(t).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(t).length!==0)return!1;var o=Object.getOwnPropertySymbols(t);if(o.length!==1||o[0]!==r||!Object.prototype.propertyIsEnumerable.call(t,r))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var s=Object.getOwnPropertyDescriptor(t,r);if(s.value!==a||s.enumerable!==!0)return!1}return!0}});var KA=fe((Lyr,RAe)=>{"use strict";var X8t=Q7();RAe.exports=function(){return X8t()&&!!Symbol.toStringTag}});var eL=fe((Pyr,IAe)=>{"use strict";IAe.exports=Object});var qAe=fe((Fyr,zAe)=>{"use strict";zAe.exports=Error});var OAe=fe((Dyr,BAe)=>{"use strict";BAe.exports=EvalError});var UAe=fe((Ryr,NAe)=>{"use strict";NAe.exports=RangeError});var GAe=fe((Iyr,VAe)=>{"use strict";VAe.exports=ReferenceError});var AH=fe((zyr,HAe)=>{"use strict";HAe.exports=SyntaxError});var lw=fe((qyr,jAe)=>{"use strict";jAe.exports=TypeError});var YAe=fe((Byr,WAe)=>{"use strict";WAe.exports=URIError});var ZAe=fe((Oyr,XAe)=>{"use strict";XAe.exports=Math.abs});var KAe=fe((Nyr,$Ae)=>{"use strict";$Ae.exports=Math.floor});var QAe=fe((Uyr,JAe)=>{"use strict";JAe.exports=Math.max});var t6e=fe((Vyr,e6e)=>{"use strict";e6e.exports=Math.min});var n6e=fe((Gyr,r6e)=>{"use strict";r6e.exports=Math.pow});var a6e=fe((Hyr,i6e)=>{"use strict";i6e.exports=Math.round});var s6e=fe((jyr,o6e)=>{"use strict";o6e.exports=Number.isNaN||function(t){return t!==t}});var u6e=fe((Wyr,l6e)=>{"use strict";var Z8t=s6e();l6e.exports=function(t){return Z8t(t)||t===0?t:t<0?-1:1}});var f6e=fe((Yyr,c6e)=>{"use strict";c6e.exports=Object.getOwnPropertyDescriptor});var S2=fe((Xyr,h6e)=>{"use strict";var tL=f6e();if(tL)try{tL([],"length")}catch(e){tL=null}h6e.exports=tL});var JA=fe((Zyr,d6e)=>{"use strict";var rL=Object.defineProperty||!1;if(rL)try{rL({},"a",{value:1})}catch(e){rL=!1}d6e.exports=rL});var g6e=fe(($yr,p6e)=>{"use strict";var v6e=typeof Symbol!="undefined"&&Symbol,$8t=Q7();p6e.exports=function(){return typeof v6e!="function"||typeof Symbol!="function"||typeof v6e("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:$8t()}});var MH=fe((Kyr,m6e)=>{"use strict";m6e.exports=typeof Reflect!="undefined"&&Reflect.getPrototypeOf||null});var SH=fe((Jyr,y6e)=>{"use strict";var K8t=eL();y6e.exports=K8t.getPrototypeOf||null});var b6e=fe((Qyr,_6e)=>{"use strict";var J8t="Function.prototype.bind called on incompatible ",Q8t=Object.prototype.toString,eCt=Math.max,tCt="[object Function]",x6e=function(t,r){for(var n=[],a=0;a{"use strict";var iCt=b6e();w6e.exports=Function.prototype.bind||iCt});var nL=fe((txr,T6e)=>{"use strict";T6e.exports=Function.prototype.call});var iL=fe((rxr,A6e)=>{"use strict";A6e.exports=Function.prototype.apply});var S6e=fe((nxr,M6e)=>{"use strict";M6e.exports=typeof Reflect!="undefined"&&Reflect&&Reflect.apply});var EH=fe((ixr,E6e)=>{"use strict";var aCt=uw(),oCt=iL(),sCt=nL(),lCt=S6e();E6e.exports=lCt||aCt.call(sCt,oCt)});var aL=fe((axr,k6e)=>{"use strict";var uCt=uw(),cCt=lw(),fCt=nL(),hCt=EH();k6e.exports=function(t){if(t.length<1||typeof t[0]!="function")throw new cCt("a function is required");return hCt(uCt,fCt,t)}});var R6e=fe((oxr,D6e)=>{"use strict";var dCt=aL(),C6e=S2(),P6e;try{P6e=[].__proto__===Array.prototype}catch(e){if(!e||typeof e!="object"||!("code"in e)||e.code!=="ERR_PROTO_ACCESS")throw e}var kH=!!P6e&&C6e&&C6e(Object.prototype,"__proto__"),F6e=Object,L6e=F6e.getPrototypeOf;D6e.exports=kH&&typeof kH.get=="function"?dCt([kH.get]):typeof L6e=="function"?function(t){return L6e(t==null?t:F6e(t))}:!1});var oL=fe((sxr,B6e)=>{"use strict";var I6e=MH(),z6e=SH(),q6e=R6e();B6e.exports=I6e?function(t){return I6e(t)}:z6e?function(t){if(!t||typeof t!="object"&&typeof t!="function")throw new TypeError("getProto: not an object");return z6e(t)}:q6e?function(t){return q6e(t)}:null});var CH=fe((lxr,O6e)=>{"use strict";var vCt=Function.prototype.call,pCt=Object.prototype.hasOwnProperty,gCt=uw();O6e.exports=gCt.call(vCt,pCt)});var uL=fe((uxr,j6e)=>{"use strict";var Jo,mCt=eL(),yCt=qAe(),xCt=OAe(),_Ct=UAe(),bCt=GAe(),dw=AH(),hw=lw(),wCt=YAe(),TCt=ZAe(),ACt=KAe(),MCt=QAe(),SCt=t6e(),ECt=n6e(),kCt=a6e(),CCt=u6e(),G6e=Function,LH=function(e){try{return G6e('"use strict"; return ('+e+").constructor;")()}catch(t){}},QA=S2(),LCt=JA(),PH=function(){throw new hw},PCt=QA?(function(){try{return arguments.callee,PH}catch(e){try{return QA(arguments,"callee").get}catch(t){return PH}}})():PH,cw=g6e()(),Jf=oL(),FCt=SH(),DCt=MH(),H6e=iL(),e6=nL(),fw={},RCt=typeof Uint8Array=="undefined"||!Jf?Jo:Jf(Uint8Array),E2={__proto__:null,"%AggregateError%":typeof AggregateError=="undefined"?Jo:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer=="undefined"?Jo:ArrayBuffer,"%ArrayIteratorPrototype%":cw&&Jf?Jf([][Symbol.iterator]()):Jo,"%AsyncFromSyncIteratorPrototype%":Jo,"%AsyncFunction%":fw,"%AsyncGenerator%":fw,"%AsyncGeneratorFunction%":fw,"%AsyncIteratorPrototype%":fw,"%Atomics%":typeof Atomics=="undefined"?Jo:Atomics,"%BigInt%":typeof BigInt=="undefined"?Jo:BigInt,"%BigInt64Array%":typeof BigInt64Array=="undefined"?Jo:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array=="undefined"?Jo:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView=="undefined"?Jo:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":yCt,"%eval%":eval,"%EvalError%":xCt,"%Float16Array%":typeof Float16Array=="undefined"?Jo:Float16Array,"%Float32Array%":typeof Float32Array=="undefined"?Jo:Float32Array,"%Float64Array%":typeof Float64Array=="undefined"?Jo:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry=="undefined"?Jo:FinalizationRegistry,"%Function%":G6e,"%GeneratorFunction%":fw,"%Int8Array%":typeof Int8Array=="undefined"?Jo:Int8Array,"%Int16Array%":typeof Int16Array=="undefined"?Jo:Int16Array,"%Int32Array%":typeof Int32Array=="undefined"?Jo:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":cw&&Jf?Jf(Jf([][Symbol.iterator]())):Jo,"%JSON%":typeof JSON=="object"?JSON:Jo,"%Map%":typeof Map=="undefined"?Jo:Map,"%MapIteratorPrototype%":typeof Map=="undefined"||!cw||!Jf?Jo:Jf(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":mCt,"%Object.getOwnPropertyDescriptor%":QA,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise=="undefined"?Jo:Promise,"%Proxy%":typeof Proxy=="undefined"?Jo:Proxy,"%RangeError%":_Ct,"%ReferenceError%":bCt,"%Reflect%":typeof Reflect=="undefined"?Jo:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set=="undefined"?Jo:Set,"%SetIteratorPrototype%":typeof Set=="undefined"||!cw||!Jf?Jo:Jf(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer=="undefined"?Jo:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":cw&&Jf?Jf(""[Symbol.iterator]()):Jo,"%Symbol%":cw?Symbol:Jo,"%SyntaxError%":dw,"%ThrowTypeError%":PCt,"%TypedArray%":RCt,"%TypeError%":hw,"%Uint8Array%":typeof Uint8Array=="undefined"?Jo:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray=="undefined"?Jo:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array=="undefined"?Jo:Uint16Array,"%Uint32Array%":typeof Uint32Array=="undefined"?Jo:Uint32Array,"%URIError%":wCt,"%WeakMap%":typeof WeakMap=="undefined"?Jo:WeakMap,"%WeakRef%":typeof WeakRef=="undefined"?Jo:WeakRef,"%WeakSet%":typeof WeakSet=="undefined"?Jo:WeakSet,"%Function.prototype.call%":e6,"%Function.prototype.apply%":H6e,"%Object.defineProperty%":LCt,"%Object.getPrototypeOf%":FCt,"%Math.abs%":TCt,"%Math.floor%":ACt,"%Math.max%":MCt,"%Math.min%":SCt,"%Math.pow%":ECt,"%Math.round%":kCt,"%Math.sign%":CCt,"%Reflect.getPrototypeOf%":DCt};if(Jf)try{null.error}catch(e){N6e=Jf(Jf(e)),E2["%Error.prototype%"]=N6e}var N6e,ICt=function e(t){var r;if(t==="%AsyncFunction%")r=LH("async function () {}");else if(t==="%GeneratorFunction%")r=LH("function* () {}");else if(t==="%AsyncGeneratorFunction%")r=LH("async function* () {}");else if(t==="%AsyncGenerator%"){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if(t==="%AsyncIteratorPrototype%"){var a=e("%AsyncGenerator%");a&&Jf&&(r=Jf(a.prototype))}return E2[t]=r,r},U6e={__proto__:null,"%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"]},t6=uw(),sL=CH(),zCt=t6.call(e6,Array.prototype.concat),qCt=t6.call(H6e,Array.prototype.splice),V6e=t6.call(e6,String.prototype.replace),lL=t6.call(e6,String.prototype.slice),BCt=t6.call(e6,RegExp.prototype.exec),OCt=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,NCt=/\\(\\)?/g,UCt=function(t){var r=lL(t,0,1),n=lL(t,-1);if(r==="%"&&n!=="%")throw new dw("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&r!=="%")throw new dw("invalid intrinsic syntax, expected opening `%`");var a=[];return V6e(t,OCt,function(i,o,s,l){a[a.length]=s?V6e(l,NCt,"$1"):o||i}),a},VCt=function(t,r){var n=t,a;if(sL(U6e,n)&&(a=U6e[n],n="%"+a[0]+"%"),sL(E2,n)){var i=E2[n];if(i===fw&&(i=ICt(n)),typeof i=="undefined"&&!r)throw new hw("intrinsic "+t+" exists, but is not available. Please file an issue!");return{alias:a,name:n,value:i}}throw new dw("intrinsic "+t+" does not exist!")};j6e.exports=function(t,r){if(typeof t!="string"||t.length===0)throw new hw("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof r!="boolean")throw new hw('"allowMissing" argument must be a boolean');if(BCt(/^%?[^%]*%?$/,t)===null)throw new dw("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=UCt(t),a=n.length>0?n[0]:"",i=VCt("%"+a+"%",r),o=i.name,s=i.value,l=!1,u=i.alias;u&&(a=u[0],qCt(n,zCt([0,1],u)));for(var c=1,f=!0;c=n.length){var x=QA(s,v);f=!!x,f&&"get"in x&&!("originalValue"in x.get)?s=x.get:s=s[v]}else f=sL(s,v),s=s[v];f&&!l&&(E2[o]=s)}}return s}});var k2=fe((cxr,X6e)=>{"use strict";var W6e=uL(),Y6e=aL(),GCt=Y6e([W6e("%String.prototype.indexOf%")]);X6e.exports=function(t,r){var n=W6e(t,!!r);return typeof n=="function"&&GCt(t,".prototype.")>-1?Y6e([n]):n}});var K6e=fe((fxr,$6e)=>{"use strict";var HCt=KA()(),jCt=k2(),FH=jCt("Object.prototype.toString"),cL=function(t){return HCt&&t&&typeof t=="object"&&Symbol.toStringTag in t?!1:FH(t)==="[object Arguments]"},Z6e=function(t){return cL(t)?!0:t!==null&&typeof t=="object"&&"length"in t&&typeof t.length=="number"&&t.length>=0&&FH(t)!=="[object Array]"&&"callee"in t&&FH(t.callee)==="[object Function]"},WCt=(function(){return cL(arguments)})();cL.isLegacyArguments=Z6e;$6e.exports=WCt?cL:Z6e});var nMe=fe((hxr,rMe)=>{"use strict";var J6e=k2(),YCt=KA()(),XCt=CH(),ZCt=S2(),IH;YCt?(Q6e=J6e("RegExp.prototype.exec"),DH={},fL=function(){throw DH},RH={toString:fL,valueOf:fL},typeof Symbol.toPrimitive=="symbol"&&(RH[Symbol.toPrimitive]=fL),IH=function(t){if(!t||typeof t!="object")return!1;var r=ZCt(t,"lastIndex"),n=r&&XCt(r,"value");if(!n)return!1;try{Q6e(t,RH)}catch(a){return a===DH}}):(eMe=J6e("Object.prototype.toString"),tMe="[object RegExp]",IH=function(t){return!t||typeof t!="object"&&typeof t!="function"?!1:eMe(t)===tMe});var Q6e,DH,fL,RH,eMe,tMe;rMe.exports=IH});var aMe=fe((dxr,iMe)=>{"use strict";var $Ct=k2(),KCt=nMe(),JCt=$Ct("RegExp.prototype.exec"),QCt=lw();iMe.exports=function(t){if(!KCt(t))throw new QCt("`regex` must be a RegExp");return function(n){return JCt(t,n)!==null}}});var sMe=fe((vxr,oMe)=>{"use strict";var e7t=function*(){}.constructor;oMe.exports=()=>e7t});var fMe=fe((pxr,cMe)=>{"use strict";var uMe=k2(),t7t=aMe(),r7t=t7t(/^\s*(?:function)?\*/),n7t=KA()(),lMe=oL(),i7t=uMe("Object.prototype.toString"),a7t=uMe("Function.prototype.toString"),o7t=sMe();cMe.exports=function(t){if(typeof t!="function")return!1;if(r7t(a7t(t)))return!0;if(!n7t){var r=i7t(t);return r==="[object GeneratorFunction]"}if(!lMe)return!1;var n=o7t();return n&&lMe(t)===n.prototype}});var pMe=fe((gxr,vMe)=>{"use strict";var dMe=Function.prototype.toString,vw=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,qH,hL;if(typeof vw=="function"&&typeof Object.defineProperty=="function")try{qH=Object.defineProperty({},"length",{get:function(){throw hL}}),hL={},vw(function(){throw 42},null,qH)}catch(e){e!==hL&&(vw=null)}else vw=null;var s7t=/^\s*class\b/,BH=function(t){try{var r=dMe.call(t);return s7t.test(r)}catch(n){return!1}},zH=function(t){try{return BH(t)?!1:(dMe.call(t),!0)}catch(r){return!1}},dL=Object.prototype.toString,l7t="[object Object]",u7t="[object Function]",c7t="[object GeneratorFunction]",f7t="[object HTMLAllCollection]",h7t="[object HTML document.all class]",d7t="[object HTMLCollection]",v7t=typeof Symbol=="function"&&!!Symbol.toStringTag,p7t=!(0 in[,]),OH=function(){return!1};typeof document=="object"&&(hMe=document.all,dL.call(hMe)===dL.call(document.all)&&(OH=function(t){if((p7t||!t)&&(typeof t=="undefined"||typeof t=="object"))try{var r=dL.call(t);return(r===f7t||r===h7t||r===d7t||r===l7t)&&t("")==null}catch(n){}return!1}));var hMe;vMe.exports=vw?function(t){if(OH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;try{vw(t,null,qH)}catch(r){if(r!==hL)return!1}return!BH(t)&&zH(t)}:function(t){if(OH(t))return!0;if(!t||typeof t!="function"&&typeof t!="object")return!1;if(v7t)return zH(t);if(BH(t))return!1;var r=dL.call(t);return r!==u7t&&r!==c7t&&!/^\[object HTML/.test(r)?!1:zH(t)}});var yMe=fe((mxr,mMe)=>{"use strict";var g7t=pMe(),m7t=Object.prototype.toString,gMe=Object.prototype.hasOwnProperty,y7t=function(t,r,n){for(var a=0,i=t.length;a=3&&(a=n),b7t(t)?y7t(t,r,a):typeof t=="string"?x7t(t,r,a):_7t(t,r,a)}});var _Me=fe((yxr,xMe)=>{"use strict";xMe.exports=["Float16Array","Float32Array","Float64Array","Int8Array","Int16Array","Int32Array","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","BigInt64Array","BigUint64Array"]});var wMe=fe((xxr,bMe)=>{"use strict";var NH=_Me(),w7t=typeof globalThis=="undefined"?window:globalThis;bMe.exports=function(){for(var t=[],r=0;r{"use strict";var TMe=JA(),T7t=AH(),pw=lw(),AMe=S2();MMe.exports=function(t,r,n){if(!t||typeof t!="object"&&typeof t!="function")throw new pw("`obj` must be an object or a function`");if(typeof r!="string"&&typeof r!="symbol")throw new pw("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new pw("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new pw("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new pw("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new pw("`loose`, if provided, must be a boolean");var a=arguments.length>3?arguments[3]:null,i=arguments.length>4?arguments[4]:null,o=arguments.length>5?arguments[5]:null,s=arguments.length>6?arguments[6]:!1,l=!!AMe&&AMe(t,r);if(TMe)TMe(t,r,{configurable:o===null&&l?l.configurable:!o,enumerable:a===null&&l?l.enumerable:!a,value:n,writable:i===null&&l?l.writable:!i});else if(s||!a&&!i&&!o)t[r]=n;else throw new T7t("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var GH=fe((bxr,EMe)=>{"use strict";var VH=JA(),SMe=function(){return!!VH};SMe.hasArrayLengthDefineBug=function(){if(!VH)return null;try{return VH([],"length",{value:1}).length!==1}catch(t){return!0}};EMe.exports=SMe});var FMe=fe((wxr,PMe)=>{"use strict";var A7t=uL(),kMe=UH(),M7t=GH()(),CMe=S2(),LMe=lw(),S7t=A7t("%Math.floor%");PMe.exports=function(t,r){if(typeof t!="function")throw new LMe("`fn` is not a function");if(typeof r!="number"||r<0||r>4294967295||S7t(r)!==r)throw new LMe("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],a=!0,i=!0;if("length"in t&&CMe){var o=CMe(t,"length");o&&!o.configurable&&(a=!1),o&&!o.writable&&(i=!1)}return(a||i||!n)&&(M7t?kMe(t,"length",r,!0,!0):kMe(t,"length",r)),t}});var RMe=fe((Txr,DMe)=>{"use strict";var E7t=uw(),k7t=iL(),C7t=EH();DMe.exports=function(){return C7t(E7t,k7t,arguments)}});var r6=fe((Axr,vL)=>{"use strict";var L7t=FMe(),IMe=JA(),P7t=aL(),zMe=RMe();vL.exports=function(t){var r=P7t(arguments),n=1+t.length-(arguments.length-1);return L7t(r,n>0?n:0,!0)};IMe?IMe(vL.exports,"apply",{value:zMe}):vL.exports.apply=zMe});var YH=fe((Mxr,NMe)=>{"use strict";var mL=yMe(),F7t=wMe(),qMe=r6(),jH=k2(),gL=S2(),pL=oL(),D7t=jH("Object.prototype.toString"),OMe=KA()(),BMe=typeof globalThis=="undefined"?window:globalThis,HH=F7t(),WH=jH("String.prototype.slice"),R7t=jH("Array.prototype.indexOf",!0)||function(t,r){for(var n=0;n-1}NMe.exports=function(t){if(!t||typeof t!="object")return!1;if(!OMe){var r=WH(D7t(t),8,-1);return q7t(r)?r:r!=="Object"?!1:z7t(t)}return gL?I7t(t):null}});var VMe=fe((Sxr,UMe)=>{"use strict";var B7t=YH();UMe.exports=function(t){return!!B7t(t)}});var $H=fe(Qo=>{"use strict";var O7t=K6e(),N7t=fMe(),bp=YH(),GMe=VMe();function gw(e){return e.call.bind(e)}var HMe=typeof BigInt!="undefined",jMe=typeof Symbol!="undefined",kv=gw(Object.prototype.toString),U7t=gw(Number.prototype.valueOf),V7t=gw(String.prototype.valueOf),G7t=gw(Boolean.prototype.valueOf);HMe&&(WMe=gw(BigInt.prototype.valueOf));var WMe;jMe&&(YMe=gw(Symbol.prototype.valueOf));var YMe;function i6(e,t){if(typeof e!="object")return!1;try{return t(e),!0}catch(r){return!1}}Qo.isArgumentsObject=O7t;Qo.isGeneratorFunction=N7t;Qo.isTypedArray=GMe;function H7t(e){return typeof Promise!="undefined"&&e instanceof Promise||e!==null&&typeof e=="object"&&typeof e.then=="function"&&typeof e.catch=="function"}Qo.isPromise=H7t;function j7t(e){return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?ArrayBuffer.isView(e):GMe(e)||ZMe(e)}Qo.isArrayBufferView=j7t;function W7t(e){return bp(e)==="Uint8Array"}Qo.isUint8Array=W7t;function Y7t(e){return bp(e)==="Uint8ClampedArray"}Qo.isUint8ClampedArray=Y7t;function X7t(e){return bp(e)==="Uint16Array"}Qo.isUint16Array=X7t;function Z7t(e){return bp(e)==="Uint32Array"}Qo.isUint32Array=Z7t;function $7t(e){return bp(e)==="Int8Array"}Qo.isInt8Array=$7t;function K7t(e){return bp(e)==="Int16Array"}Qo.isInt16Array=K7t;function J7t(e){return bp(e)==="Int32Array"}Qo.isInt32Array=J7t;function Q7t(e){return bp(e)==="Float32Array"}Qo.isFloat32Array=Q7t;function eLt(e){return bp(e)==="Float64Array"}Qo.isFloat64Array=eLt;function tLt(e){return bp(e)==="BigInt64Array"}Qo.isBigInt64Array=tLt;function rLt(e){return bp(e)==="BigUint64Array"}Qo.isBigUint64Array=rLt;function xL(e){return kv(e)==="[object Map]"}xL.working=typeof Map!="undefined"&&xL(new Map);function nLt(e){return typeof Map=="undefined"?!1:xL.working?xL(e):e instanceof Map}Qo.isMap=nLt;function _L(e){return kv(e)==="[object Set]"}_L.working=typeof Set!="undefined"&&_L(new Set);function iLt(e){return typeof Set=="undefined"?!1:_L.working?_L(e):e instanceof Set}Qo.isSet=iLt;function bL(e){return kv(e)==="[object WeakMap]"}bL.working=typeof WeakMap!="undefined"&&bL(new WeakMap);function aLt(e){return typeof WeakMap=="undefined"?!1:bL.working?bL(e):e instanceof WeakMap}Qo.isWeakMap=aLt;function ZH(e){return kv(e)==="[object WeakSet]"}ZH.working=typeof WeakSet!="undefined"&&ZH(new WeakSet);function oLt(e){return ZH(e)}Qo.isWeakSet=oLt;function wL(e){return kv(e)==="[object ArrayBuffer]"}wL.working=typeof ArrayBuffer!="undefined"&&wL(new ArrayBuffer);function XMe(e){return typeof ArrayBuffer=="undefined"?!1:wL.working?wL(e):e instanceof ArrayBuffer}Qo.isArrayBuffer=XMe;function TL(e){return kv(e)==="[object DataView]"}TL.working=typeof ArrayBuffer!="undefined"&&typeof DataView!="undefined"&&TL(new DataView(new ArrayBuffer(1),0,1));function ZMe(e){return typeof DataView=="undefined"?!1:TL.working?TL(e):e instanceof DataView}Qo.isDataView=ZMe;var XH=typeof SharedArrayBuffer!="undefined"?SharedArrayBuffer:void 0;function n6(e){return kv(e)==="[object SharedArrayBuffer]"}function $Me(e){return typeof XH=="undefined"?!1:(typeof n6.working=="undefined"&&(n6.working=n6(new XH)),n6.working?n6(e):e instanceof XH)}Qo.isSharedArrayBuffer=$Me;function sLt(e){return kv(e)==="[object AsyncFunction]"}Qo.isAsyncFunction=sLt;function lLt(e){return kv(e)==="[object Map Iterator]"}Qo.isMapIterator=lLt;function uLt(e){return kv(e)==="[object Set Iterator]"}Qo.isSetIterator=uLt;function cLt(e){return kv(e)==="[object Generator]"}Qo.isGeneratorObject=cLt;function fLt(e){return kv(e)==="[object WebAssembly.Module]"}Qo.isWebAssemblyCompiledModule=fLt;function KMe(e){return i6(e,U7t)}Qo.isNumberObject=KMe;function JMe(e){return i6(e,V7t)}Qo.isStringObject=JMe;function QMe(e){return i6(e,G7t)}Qo.isBooleanObject=QMe;function eSe(e){return HMe&&i6(e,WMe)}Qo.isBigIntObject=eSe;function tSe(e){return jMe&&i6(e,YMe)}Qo.isSymbolObject=tSe;function hLt(e){return KMe(e)||JMe(e)||QMe(e)||eSe(e)||tSe(e)}Qo.isBoxedPrimitive=hLt;function dLt(e){return typeof Uint8Array!="undefined"&&(XMe(e)||$Me(e))}Qo.isAnyArrayBuffer=dLt;["isProxy","isExternal","isModuleNamespaceObject"].forEach(function(e){Object.defineProperty(Qo,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})})});var KH=fe((kxr,rSe)=>{rSe.exports=function(t){return t&&typeof t=="object"&&typeof t.copy=="function"&&typeof t.fill=="function"&&typeof t.readUInt8=="function"}});var nj=fe(es=>{var nSe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},a=0;a=a)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),tj(t)?r.showHidden=t:t&&es._extend(r,t),L2(r.showHidden)&&(r.showHidden=!1),L2(r.depth)&&(r.depth=2),L2(r.colors)&&(r.colors=!1),L2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=pLt),EL(r,e,r.depth)}es.inspect=$m;$m.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]};$m.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function pLt(e,t){var r=$m.styles[t];return r?"\x1B["+$m.colors[r][0]+"m"+e+"\x1B["+$m.colors[r][1]+"m":e}function gLt(e,t){return e}function mLt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function EL(e,t,r){if(e.customInspect&&t&&SL(t.inspect)&&t.inspect!==es.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return LL(n)||(n=EL(e,n,r)),n}var a=yLt(e,t);if(a)return a;var i=Object.keys(t),o=mLt(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),o6(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return JH(t);if(i.length===0){if(SL(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(a6(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if(kL(t))return e.stylize(Date.prototype.toString.call(t),"date");if(o6(t))return JH(t)}var l="",u=!1,c=["{","}"];if(aSe(t)&&(u=!0,c=["[","]"]),SL(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(a6(t)&&(l=" "+RegExp.prototype.toString.call(t)),kL(t)&&(l=" "+Date.prototype.toUTCString.call(t)),o6(t)&&(l=" "+JH(t)),i.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return a6(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var v;return u?v=xLt(e,t,r,o,i):v=i.map(function(g){return ej(e,t,r,o,g,u)}),e.seen.pop(),_Lt(v,l,c)}function yLt(e,t){if(L2(t))return e.stylize("undefined","undefined");if(LL(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(oSe(t))return e.stylize(""+t,"number");if(tj(t))return e.stylize(""+t,"boolean");if(CL(t))return e.stylize("null","null")}function JH(e){return"["+Error.prototype.toString.call(e)+"]"}function xLt(e,t,r,n,a){for(var i=[],o=0,s=t.length;o-1&&(i?s=s.split(` `).map(function(u){return" "+u}).join(` `).slice(2):s=` `+s.split(` `).map(function(u){return" "+u}).join(` `))):s=e.stylize("[Circular]","special")),L2(o)){if(i&&a.match(/^\d+$/))return s;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function _Lt(e,t,r){var n=0,a=e.reduce(function(i,o){return n++,o.indexOf(` `)>=0&&n++,i+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}es.types=$H();function aSe(e){return Array.isArray(e)}es.isArray=aSe;function tj(e){return typeof e=="boolean"}es.isBoolean=tj;function CL(e){return e===null}es.isNull=CL;function bLt(e){return e==null}es.isNullOrUndefined=bLt;function oSe(e){return typeof e=="number"}es.isNumber=oSe;function LL(e){return typeof e=="string"}es.isString=LL;function wLt(e){return typeof e=="symbol"}es.isSymbol=wLt;function L2(e){return e===void 0}es.isUndefined=L2;function a6(e){return mw(e)&&rj(e)==="[object RegExp]"}es.isRegExp=a6;es.types.isRegExp=a6;function mw(e){return typeof e=="object"&&e!==null}es.isObject=mw;function kL(e){return mw(e)&&rj(e)==="[object Date]"}es.isDate=kL;es.types.isDate=kL;function o6(e){return mw(e)&&(rj(e)==="[object Error]"||e instanceof Error)}es.isError=o6;es.types.isNativeError=o6;function SL(e){return typeof e=="function"}es.isFunction=SL;function TLt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}es.isPrimitive=TLt;es.isBuffer=KH();function rj(e){return Object.prototype.toString.call(e)}function QH(e){return e<10?"0"+e.toString(10):e.toString(10)}var ALt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function MLt(){var e=new Date,t=[QH(e.getHours()),QH(e.getMinutes()),QH(e.getSeconds())].join(":");return[e.getDate(),ALt[e.getMonth()],t].join(" ")}es.log=function(){console.log("%s - %s",MLt(),es.format.apply(es,arguments))};es.inherits=gg();es._extend=function(e,t){if(!t||!mw(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function sSe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var C2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;es.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(C2&&t[C2]){var r=t[C2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,C2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,a,i=new Promise(function(l,u){n=l,a=u}),o=[],s=0;s{"use strict";function lSe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function uSe(e){for(var t=1;t0?this.tail.next=n:this.head=n,this.tail=n,++this.length}},{key:"unshift",value:function(r){var n={data:r,next:this.head};this.length===0&&(this.tail=n),this.head=n,++this.length}},{key:"shift",value:function(){if(this.length!==0){var r=this.head.data;return this.length===1?this.head=this.tail=null:this.head=this.head.next,--this.length,r}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(r){if(this.length===0)return"";for(var n=this.head,a=""+n.data;n=n.next;)a+=r+n.data;return a}},{key:"concat",value:function(r){if(this.length===0)return PL.alloc(0);for(var n=PL.allocUnsafe(r>>>0),a=this.head,i=0;a;)ILt(a.data,n,i),i+=a.data.length,a=a.next;return n}},{key:"consume",value:function(r,n){var a;return ro.length?o.length:r;if(s===o.length?i+=o:i+=o.slice(0,r),r-=s,r===0){s===o.length?(++a,n.next?this.head=n.next:this.head=this.tail=null):(this.head=n,n.data=o.slice(s));break}++a}return this.length-=a,i}},{key:"_getBuffer",value:function(r){var n=PL.allocUnsafe(r),a=this.head,i=1;for(a.data.copy(n),r-=a.data.length;a=a.next;){var o=a.data,s=r>o.length?o.length:r;if(o.copy(n,n.length-r,0,s),r-=s,r===0){s===o.length?(++i,a.next?this.head=a.next:this.head=this.tail=null):(this.head=a,a.data=o.slice(s));break}++i}return this.length-=i,n}},{key:RLt,value:function(r,n){return ij(this,uSe(uSe({},n),{},{depth:0,customInspect:!1}))}}]),e})()});var oj=fe((Pxr,pSe)=>{"use strict";function zLt(e,t){var r=this,n=this._readableState&&this._readableState.destroyed,a=this._writableState&&this._writableState.destroyed;return n||a?(t?t(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(aj,this,e)):process.nextTick(aj,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(i){!t&&i?r._writableState?r._writableState.errorEmitted?process.nextTick(FL,r):(r._writableState.errorEmitted=!0,process.nextTick(vSe,r,i)):process.nextTick(vSe,r,i):t?(process.nextTick(FL,r),t(i)):process.nextTick(FL,r)}),this)}function vSe(e,t){aj(e,t),FL(e)}function FL(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function qLt(){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 aj(e,t){e.emit("error",t)}function BLt(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}pSe.exports={destroy:zLt,undestroy:qLt,errorOrDestroy:BLt}});var P2=fe((Fxr,ySe)=>{"use strict";function OLt(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}var mSe={};function Cv(e,t,r){r||(r=Error);function n(i,o,s){return typeof t=="string"?t:t(i,o,s)}var a=(function(i){OLt(o,i);function o(s,l,u){return i.call(this,n(s,l,u))||this}return o})(r);a.prototype.name=r.name,a.prototype.code=e,mSe[e]=a}function gSe(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map(function(n){return String(n)}),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function NLt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function ULt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function VLt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}Cv("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError);Cv("ERR_INVALID_ARG_TYPE",function(e,t,r){var n;typeof t=="string"&&NLt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var a;if(ULt(e," argument"))a="The ".concat(e," ").concat(n," ").concat(gSe(t,"type"));else{var i=VLt(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(gSe(t,"type"))}return a+=". Received type ".concat(typeof r),a},TypeError);Cv("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF");Cv("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"});Cv("ERR_STREAM_PREMATURE_CLOSE","Premature close");Cv("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"});Cv("ERR_MULTIPLE_CALLBACK","Callback called multiple times");Cv("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable");Cv("ERR_STREAM_WRITE_AFTER_END","write after end");Cv("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError);Cv("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError);Cv("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event");ySe.exports.codes=mSe});var sj=fe((Dxr,xSe)=>{"use strict";var GLt=P2().codes.ERR_INVALID_OPT_VALUE;function HLt(e,t,r){return e.highWaterMark!=null?e.highWaterMark:t?e[r]:null}function jLt(e,t,r,n){var a=HLt(t,n,r);if(a!=null){if(!(isFinite(a)&&Math.floor(a)===a)||a<0){var i=n?r:"highWaterMark";throw new GLt(i,a)}return Math.floor(a)}return e.objectMode?16:16*1024}xSe.exports={getHighWaterMark:jLt}});var bSe=fe((Rxr,_Se)=>{_Se.exports=WLt;function WLt(e,t){if(lj("noDeprecation"))return e;var r=!1;function n(){if(!r){if(lj("throwDeprecation"))throw new Error(t);lj("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}return n}function lj(e){try{if(!window.localStorage)return!1}catch(r){return!1}var t=window.localStorage[e];return t==null?!1:String(t).toLowerCase()==="true"}});var fj=fe((Ixr,ESe)=>{"use strict";ESe.exports=sc;function TSe(e){var t=this;this.next=null,this.entry=null,this.finish=function(){x9t(t,e)}}var yw;sc.WritableState=l6;var YLt={deprecate:bSe()},ASe=dH(),RL=M2().Buffer,XLt=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function ZLt(e){return RL.from(e)}function $Lt(e){return RL.isBuffer(e)||e instanceof XLt}var cj=oj(),KLt=sj(),JLt=KLt.getHighWaterMark,Km=P2().codes,QLt=Km.ERR_INVALID_ARG_TYPE,e9t=Km.ERR_METHOD_NOT_IMPLEMENTED,t9t=Km.ERR_MULTIPLE_CALLBACK,r9t=Km.ERR_STREAM_CANNOT_PIPE,n9t=Km.ERR_STREAM_DESTROYED,i9t=Km.ERR_STREAM_NULL_VALUES,a9t=Km.ERR_STREAM_WRITE_AFTER_END,o9t=Km.ERR_UNKNOWN_ENCODING,xw=cj.errorOrDestroy;gg()(sc,ASe);function s9t(){}function l6(e,t,r){yw=yw||F2(),e=e||{},typeof r!="boolean"&&(r=t instanceof yw),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=JLt(this,e,"writableHighWaterMark",r),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var n=e.decodeStrings===!1;this.decodeStrings=!n,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(a){v9t(t,a)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new TSe(this)}l6.prototype.getBuffer=function(){for(var t=this.bufferedRequest,r=[];t;)r.push(t),t=t.next;return r};(function(){try{Object.defineProperty(l6.prototype,"buffer",{get:YLt.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}})();var DL;typeof Symbol=="function"&&Symbol.hasInstance&&typeof Function.prototype[Symbol.hasInstance]=="function"?(DL=Function.prototype[Symbol.hasInstance],Object.defineProperty(sc,Symbol.hasInstance,{value:function(t){return DL.call(this,t)?!0:this!==sc?!1:t&&t._writableState instanceof l6}})):DL=function(t){return t instanceof this};function sc(e){yw=yw||F2();var t=this instanceof yw;if(!t&&!DL.call(sc,this))return new sc(e);this._writableState=new l6(e,this,t),this.writable=!0,e&&(typeof e.write=="function"&&(this._write=e.write),typeof e.writev=="function"&&(this._writev=e.writev),typeof e.destroy=="function"&&(this._destroy=e.destroy),typeof e.final=="function"&&(this._final=e.final)),ASe.call(this)}sc.prototype.pipe=function(){xw(this,new r9t)};function l9t(e,t){var r=new a9t;xw(e,r),process.nextTick(t,r)}function u9t(e,t,r,n){var a;return r===null?a=new i9t:typeof r!="string"&&!t.objectMode&&(a=new QLt("chunk",["string","Buffer"],r)),a?(xw(e,a),process.nextTick(n,a),!1):!0}sc.prototype.write=function(e,t,r){var n=this._writableState,a=!1,i=!n.objectMode&&$Lt(e);return i&&!RL.isBuffer(e)&&(e=ZLt(e)),typeof t=="function"&&(r=t,t=null),i?t="buffer":t||(t=n.defaultEncoding),typeof r!="function"&&(r=s9t),n.ending?l9t(this,r):(i||u9t(this,n,e,r))&&(n.pendingcb++,a=f9t(this,n,i,e,t,r)),a};sc.prototype.cork=function(){this._writableState.corked++};sc.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,!e.writing&&!e.corked&&!e.bufferProcessing&&e.bufferedRequest&&MSe(this,e))};sc.prototype.setDefaultEncoding=function(t){if(typeof t=="string"&&(t=t.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((t+"").toLowerCase())>-1))throw new o9t(t);return this._writableState.defaultEncoding=t,this};Object.defineProperty(sc.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}});function c9t(e,t,r){return!e.objectMode&&e.decodeStrings!==!1&&typeof t=="string"&&(t=RL.from(t,r)),t}Object.defineProperty(sc.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}});function f9t(e,t,r,n,a,i){if(!r){var o=c9t(t,n,a);n!==o&&(r=!0,a="buffer",n=o)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length{"use strict";var _9t=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};CSe.exports=m1;var kSe=vj(),dj=fj();gg()(m1,kSe);for(hj=_9t(dj.prototype),IL=0;IL{var qL=M2(),y1=qL.Buffer;function LSe(e,t){for(var r in e)t[r]=e[r]}y1.from&&y1.alloc&&y1.allocUnsafe&&y1.allocUnsafeSlow?PSe.exports=qL:(LSe(qL,pj),pj.Buffer=D2);function D2(e,t,r){return y1(e,t,r)}D2.prototype=Object.create(y1.prototype);LSe(y1,D2);D2.from=function(e,t,r){if(typeof e=="number")throw new TypeError("Argument must not be a number");return y1(e,t,r)};D2.alloc=function(e,t,r){if(typeof e!="number")throw new TypeError("Argument must be a number");var n=y1(e);return t!==void 0?typeof r=="string"?n.fill(t,r):n.fill(t):n.fill(0),n};D2.allocUnsafe=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return y1(e)};D2.allocUnsafeSlow=function(e){if(typeof e!="number")throw new TypeError("Argument must be a number");return qL.SlowBuffer(e)}});var yj=fe(RSe=>{"use strict";var mj=FSe().Buffer,DSe=mj.isEncoding||function(e){switch(e=""+e,e&&e.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 T9t(e){if(!e)return"utf8";for(var t;;)switch(e){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 e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}function A9t(e){var t=T9t(e);if(typeof t!="string"&&(mj.isEncoding===DSe||!DSe(e)))throw new Error("Unknown encoding: "+e);return t||e}RSe.StringDecoder=u6;function u6(e){this.encoding=A9t(e);var t;switch(this.encoding){case"utf16le":this.text=L9t,this.end=P9t,t=4;break;case"utf8":this.fillLast=E9t,t=4;break;case"base64":this.text=F9t,this.end=D9t,t=3;break;default:this.write=R9t,this.end=I9t;return}this.lastNeed=0,this.lastTotal=0,this.lastChar=mj.allocUnsafe(t)}u6.prototype.write=function(e){if(e.length===0)return"";var t,r;if(this.lastNeed){if(t=this.fillLast(e),t===void 0)return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r>5===6?2:e>>4===14?3:e>>3===30?4:e>>6===2?-1:-2}function M9t(e,t,r){var n=t.length-1;if(n=0?(a>0&&(e.lastNeed=a-1),a):--n=0?(a>0&&(e.lastNeed=a-2),a):--n=0?(a>0&&(a===2?a=0:e.lastNeed=a-3),a):0))}function S9t(e,t,r){if((t[0]&192)!==128)return e.lastNeed=0,"\uFFFD";if(e.lastNeed>1&&t.length>1){if((t[1]&192)!==128)return e.lastNeed=1,"\uFFFD";if(e.lastNeed>2&&t.length>2&&(t[2]&192)!==128)return e.lastNeed=2,"\uFFFD"}}function E9t(e){var t=this.lastTotal-this.lastNeed,r=S9t(this,e,t);if(r!==void 0)return r;if(this.lastNeed<=e.length)return e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,t,0,e.length),this.lastNeed-=e.length}function k9t(e,t){var r=M9t(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)}function C9t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"\uFFFD":t}function L9t(e,t){if((e.length-t)%2===0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function P9t(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function F9t(e,t){var r=(e.length-t)%3;return r===0?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,r===1?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function D9t(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function R9t(e){return e.toString(this.encoding)}function I9t(e){return e&&e.length?this.write(e):""}});var BL=fe((Bxr,qSe)=>{"use strict";var ISe=P2().codes.ERR_STREAM_PREMATURE_CLOSE;function z9t(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),a=0;a{"use strict";var OL;function Jm(e,t,r){return t=O9t(t),t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function O9t(e){var t=N9t(e,"string");return typeof t=="symbol"?t:String(t)}function N9t(e,t){if(typeof e!="object"||e===null)return e;var r=e[Symbol.toPrimitive];if(r!==void 0){var n=r.call(e,t||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}var U9t=BL(),Qm=Symbol("lastResolve"),R2=Symbol("lastReject"),c6=Symbol("error"),NL=Symbol("ended"),I2=Symbol("lastPromise"),xj=Symbol("handlePromise"),z2=Symbol("stream");function ey(e,t){return{value:e,done:t}}function V9t(e){var t=e[Qm];if(t!==null){var r=e[z2].read();r!==null&&(e[I2]=null,e[Qm]=null,e[R2]=null,t(ey(r,!1)))}}function G9t(e){process.nextTick(V9t,e)}function H9t(e,t){return function(r,n){e.then(function(){if(t[NL]){r(ey(void 0,!0));return}t[xj](r,n)},n)}}var j9t=Object.getPrototypeOf(function(){}),W9t=Object.setPrototypeOf((OL={get stream(){return this[z2]},next:function(){var t=this,r=this[c6];if(r!==null)return Promise.reject(r);if(this[NL])return Promise.resolve(ey(void 0,!0));if(this[z2].destroyed)return new Promise(function(o,s){process.nextTick(function(){t[c6]?s(t[c6]):o(ey(void 0,!0))})});var n=this[I2],a;if(n)a=new Promise(H9t(n,this));else{var i=this[z2].read();if(i!==null)return Promise.resolve(ey(i,!1));a=new Promise(this[xj])}return this[I2]=a,a}},Jm(OL,Symbol.asyncIterator,function(){return this}),Jm(OL,"return",function(){var t=this;return new Promise(function(r,n){t[z2].destroy(null,function(a){if(a){n(a);return}r(ey(void 0,!0))})})}),OL),j9t),Y9t=function(t){var r,n=Object.create(W9t,(r={},Jm(r,z2,{value:t,writable:!0}),Jm(r,Qm,{value:null,writable:!0}),Jm(r,R2,{value:null,writable:!0}),Jm(r,c6,{value:null,writable:!0}),Jm(r,NL,{value:t._readableState.endEmitted,writable:!0}),Jm(r,xj,{value:function(i,o){var s=n[z2].read();s?(n[I2]=null,n[Qm]=null,n[R2]=null,i(ey(s,!1))):(n[Qm]=i,n[R2]=o)},writable:!0}),r));return n[I2]=null,U9t(t,function(a){if(a&&a.code!=="ERR_STREAM_PREMATURE_CLOSE"){var i=n[R2];i!==null&&(n[I2]=null,n[Qm]=null,n[R2]=null,i(a)),n[c6]=a;return}var o=n[Qm];o!==null&&(n[I2]=null,n[Qm]=null,n[R2]=null,o(ey(void 0,!0))),n[NL]=!0}),t.on("readable",G9t.bind(null,n)),n};BSe.exports=Y9t});var USe=fe((Nxr,NSe)=>{NSe.exports=function(){throw new Error("Readable.from is not available in the browser")}});var vj=fe((Vxr,KSe)=>{"use strict";KSe.exports=bs;var _w;bs.ReadableState=jSe;var Uxr=Mx().EventEmitter,HSe=function(t,r){return t.listeners(r).length},h6=dH(),UL=M2().Buffer,X9t=(typeof window!="undefined"||typeof window!="undefined"?window:typeof self!="undefined"?self:{}).Uint8Array||function(){};function Z9t(e){return UL.from(e)}function $9t(e){return UL.isBuffer(e)||e instanceof X9t}var _j=nj(),Wo;_j&&_j.debuglog?Wo=_j.debuglog("stream"):Wo=function(){};var K9t=dSe(),Ej=oj(),J9t=sj(),Q9t=J9t.getHighWaterMark,VL=P2().codes,ePt=VL.ERR_INVALID_ARG_TYPE,tPt=VL.ERR_STREAM_PUSH_AFTER_EOF,rPt=VL.ERR_METHOD_NOT_IMPLEMENTED,nPt=VL.ERR_STREAM_UNSHIFT_AFTER_END_EVENT,bw,bj,wj;gg()(bs,h6);var f6=Ej.errorOrDestroy,Tj=["error","close","destroy","pause","resume"];function iPt(e,t,r){if(typeof e.prependListener=="function")return e.prependListener(t,r);!e._events||!e._events[t]?e.on(t,r):Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]}function jSe(e,t,r){_w=_w||F2(),e=e||{},typeof r!="boolean"&&(r=t instanceof _w),this.objectMode=!!e.objectMode,r&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=Q9t(this,e,"readableHighWaterMark",r),this.buffer=new K9t,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=e.emitClose!==!1,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(bw||(bw=yj().StringDecoder),this.decoder=new bw(e.encoding),this.encoding=e.encoding)}function bs(e){if(_w=_w||F2(),!(this instanceof bs))return new bs(e);var t=this instanceof _w;this._readableState=new jSe(e,this,t),this.readable=!0,e&&(typeof e.read=="function"&&(this._read=e.read),typeof e.destroy=="function"&&(this._destroy=e.destroy)),h6.call(this)}Object.defineProperty(bs.prototype,"destroyed",{enumerable:!1,get:function(){return this._readableState===void 0?!1:this._readableState.destroyed},set:function(t){this._readableState&&(this._readableState.destroyed=t)}});bs.prototype.destroy=Ej.destroy;bs.prototype._undestroy=Ej.undestroy;bs.prototype._destroy=function(e,t){t(e)};bs.prototype.push=function(e,t){var r=this._readableState,n;return r.objectMode?n=!0:typeof e=="string"&&(t=t||r.defaultEncoding,t!==r.encoding&&(e=UL.from(e,t),t=""),n=!0),WSe(this,e,t,!1,n)};bs.prototype.unshift=function(e){return WSe(this,e,null,!0,!1)};function WSe(e,t,r,n,a){Wo("readableAddChunk",t);var i=e._readableState;if(t===null)i.reading=!1,sPt(e,i);else{var o;if(a||(o=aPt(i,t)),o)f6(e,o);else if(i.objectMode||t&&t.length>0)if(typeof t!="string"&&!i.objectMode&&Object.getPrototypeOf(t)!==UL.prototype&&(t=Z9t(t)),n)i.endEmitted?f6(e,new nPt):Aj(e,i,t,!0);else if(i.ended)f6(e,new tPt);else{if(i.destroyed)return!1;i.reading=!1,i.decoder&&!r?(t=i.decoder.write(t),i.objectMode||t.length!==0?Aj(e,i,t,!1):Sj(e,i)):Aj(e,i,t,!1)}else n||(i.reading=!1,Sj(e,i))}return!i.ended&&(i.length=VSe?e=VSe:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}function GSe(e,t){return e<=0||t.length===0&&t.ended?0:t.objectMode?1:e!==e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=oPt(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}bs.prototype.read=function(e){Wo("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(e!==0&&(t.emittedReadable=!1),e===0&&t.needReadable&&((t.highWaterMark!==0?t.length>=t.highWaterMark:t.length>0)||t.ended))return Wo("read: emitReadable",t.length,t.ended),t.length===0&&t.ended?Mj(this):GL(this),null;if(e=GSe(e,t),e===0&&t.ended)return t.length===0&&Mj(this),null;var n=t.needReadable;Wo("need readable",n),(t.length===0||t.length-e0?a=ZSe(e,t):a=null,a===null?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),t.length===0&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&Mj(this)),a!==null&&this.emit("data",a),a};function sPt(e,t){if(Wo("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?GL(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,YSe(e)))}}function GL(e){var t=e._readableState;Wo("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(Wo("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(YSe,e))}function YSe(e){var t=e._readableState;Wo("emitReadable_",t.destroyed,t.length,t.ended),!t.destroyed&&(t.length||t.ended)&&(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,kj(e)}function Sj(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(lPt,e,t))}function lPt(e,t){for(;!t.reading&&!t.ended&&(t.length1&&$Se(n.pipes,e)!==-1)&&!u&&(Wo("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function v(_){Wo("onerror",_),x(),e.removeListener("error",v),HSe(e,"error")===0&&f6(e,_)}iPt(e,"error",v);function g(){e.removeListener("finish",p),x()}e.once("close",g);function p(){Wo("onfinish"),e.removeListener("close",g),x()}e.once("finish",p);function x(){Wo("unpipe"),r.unpipe(e)}return e.emit("pipe",r),n.flowing||(Wo("pipe resume"),r.resume()),e};function uPt(e){return function(){var r=e._readableState;Wo("pipeOnDrain",r.awaitDrain),r.awaitDrain&&r.awaitDrain--,r.awaitDrain===0&&HSe(e,"data")&&(r.flowing=!0,kj(e))}}bs.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(t.pipesCount===0)return this;if(t.pipesCount===1)return e&&e!==t.pipes?this:(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r),this);if(!e){var n=t.pipes,a=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var i=0;i0,n.flowing!==!1&&this.resume()):e==="readable"&&!n.endEmitted&&!n.readableListening&&(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,Wo("on readable",n.length,n.reading),n.length?GL(this):n.reading||process.nextTick(cPt,this)),r};bs.prototype.addListener=bs.prototype.on;bs.prototype.removeListener=function(e,t){var r=h6.prototype.removeListener.call(this,e,t);return e==="readable"&&process.nextTick(XSe,this),r};bs.prototype.removeAllListeners=function(e){var t=h6.prototype.removeAllListeners.apply(this,arguments);return(e==="readable"||e===void 0)&&process.nextTick(XSe,this),t};function XSe(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function cPt(e){Wo("readable nexttick read 0"),e.read(0)}bs.prototype.resume=function(){var e=this._readableState;return e.flowing||(Wo("resume"),e.flowing=!e.readableListening,fPt(this,e)),e.paused=!1,this};function fPt(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(hPt,e,t))}function hPt(e,t){Wo("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),kj(e),t.flowing&&!t.reading&&e.read(0)}bs.prototype.pause=function(){return Wo("call pause flowing=%j",this._readableState.flowing),this._readableState.flowing!==!1&&(Wo("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this};function kj(e){var t=e._readableState;for(Wo("flow",t.flowing);t.flowing&&e.read()!==null;);}bs.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;e.on("end",function(){if(Wo("wrapped end"),r.decoder&&!r.ended){var o=r.decoder.end();o&&o.length&&t.push(o)}t.push(null)}),e.on("data",function(o){if(Wo("wrapped data"),r.decoder&&(o=r.decoder.write(o)),!(r.objectMode&&o==null)&&!(!r.objectMode&&(!o||!o.length))){var s=t.push(o);s||(n=!0,e.pause())}});for(var a in e)this[a]===void 0&&typeof e[a]=="function"&&(this[a]=(function(s){return function(){return e[s].apply(e,arguments)}})(a));for(var i=0;i=t.length?(t.decoder?r=t.buffer.join(""):t.buffer.length===1?r=t.buffer.first():r=t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r}function Mj(e){var t=e._readableState;Wo("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(dPt,t,e))}function dPt(e,t){if(Wo("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&e.length===0&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}typeof Symbol=="function"&&(bs.from=function(e,t){return wj===void 0&&(wj=USe()),wj(bs,e,t)});function $Se(e,t){for(var r=0,n=e.length;r{"use strict";QSe.exports=yg;var HL=P2().codes,vPt=HL.ERR_METHOD_NOT_IMPLEMENTED,pPt=HL.ERR_MULTIPLE_CALLBACK,gPt=HL.ERR_TRANSFORM_ALREADY_TRANSFORMING,mPt=HL.ERR_TRANSFORM_WITH_LENGTH_0,jL=F2();gg()(yg,jL);function yPt(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(n===null)return this.emit("error",new pPt);r.writechunk=null,r.writecb=null,t!=null&&this.push(t),n(e);var a=this._readableState;a.reading=!1,(a.needReadable||a.length{"use strict";tEe.exports=d6;var eEe=Cj();gg()(d6,eEe);function d6(e){if(!(this instanceof d6))return new d6(e);eEe.call(this,e)}d6.prototype._transform=function(e,t,r){r(null,e)}});var sEe=fe((jxr,oEe)=>{"use strict";var Lj;function _Pt(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}var aEe=P2().codes,bPt=aEe.ERR_MISSING_ARGS,wPt=aEe.ERR_STREAM_DESTROYED;function nEe(e){if(e)throw e}function TPt(e){return e.setHeader&&typeof e.abort=="function"}function APt(e,t,r,n){n=_Pt(n);var a=!1;e.on("close",function(){a=!0}),Lj===void 0&&(Lj=BL()),Lj(e,{readable:t,writable:r},function(o){if(o)return n(o);a=!0,n()});var i=!1;return function(o){if(!a&&!i){if(i=!0,TPt(e))return e.abort();if(typeof e.destroy=="function")return e.destroy();n(o||new wPt("pipe"))}}}function iEe(e){e()}function MPt(e,t){return e.pipe(t)}function SPt(e){return!e.length||typeof e[e.length-1]!="function"?nEe:e.pop()}function EPt(){for(var e=arguments.length,t=new Array(e),r=0;r0;return APt(o,l,u,function(c){a||(a=c),c&&i.forEach(iEe),!l&&(i.forEach(iEe),n(a))})});return t.reduce(MPt)}oEe.exports=EPt});var uEe=fe((Wxr,lEe)=>{lEe.exports=Lv;var Pj=Mx().EventEmitter,kPt=gg();kPt(Lv,Pj);Lv.Readable=vj();Lv.Writable=fj();Lv.Duplex=F2();Lv.Transform=Cj();Lv.PassThrough=rEe();Lv.finished=BL();Lv.pipeline=sEe();Lv.Stream=Lv;function Lv(){Pj.call(this)}Lv.prototype.pipe=function(e,t){var r=this;function n(c){e.writable&&e.write(c)===!1&&r.pause&&r.pause()}r.on("data",n);function a(){r.readable&&r.resume&&r.resume()}e.on("drain",a),!e._isStdio&&(!t||t.end!==!1)&&(r.on("end",o),r.on("close",s));var i=!1;function o(){i||(i=!0,e.end())}function s(){i||(i=!0,typeof e.destroy=="function"&&e.destroy())}function l(c){if(u(),Pj.listenerCount(this,"error")===0)throw c}r.on("error",l),e.on("error",l);function u(){r.removeListener("data",n),e.removeListener("drain",a),r.removeListener("end",o),r.removeListener("close",s),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",u),r.removeListener("close",u),e.removeListener("close",u)}return r.on("end",u),r.on("close",u),e.on("close",u),e.emit("pipe",r),e}});var Tw=fe(ts=>{var cEe=Object.getOwnPropertyDescriptors||function(t){for(var r=Object.keys(t),n={},a=0;a=a)return s;switch(s){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(l){return"[Circular]"}default:return s}}),o=n[r];r=3&&(r.depth=arguments[2]),arguments.length>=4&&(r.colors=arguments[3]),Ij(t)?r.showHidden=t:t&&ts._extend(r,t),B2(r.showHidden)&&(r.showHidden=!1),B2(r.depth)&&(r.depth=2),B2(r.colors)&&(r.colors=!1),B2(r.customInspect)&&(r.customInspect=!0),r.colors&&(r.stylize=LPt),ZL(r,e,r.depth)}ts.inspect=ty;ty.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]};ty.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"};function LPt(e,t){var r=ty.styles[t];return r?"\x1B["+ty.colors[r][0]+"m"+e+"\x1B["+ty.colors[r][1]+"m":e}function PPt(e,t){return e}function FPt(e){var t={};return e.forEach(function(r,n){t[r]=!0}),t}function ZL(e,t,r){if(e.customInspect&&t&&XL(t.inspect)&&t.inspect!==ts.inspect&&!(t.constructor&&t.constructor.prototype===t)){var n=t.inspect(r,e);return JL(n)||(n=ZL(e,n,r)),n}var a=DPt(e,t);if(a)return a;var i=Object.keys(t),o=FPt(i);if(e.showHidden&&(i=Object.getOwnPropertyNames(t)),p6(t)&&(i.indexOf("message")>=0||i.indexOf("description")>=0))return Fj(t);if(i.length===0){if(XL(t)){var s=t.name?": "+t.name:"";return e.stylize("[Function"+s+"]","special")}if(v6(t))return e.stylize(RegExp.prototype.toString.call(t),"regexp");if($L(t))return e.stylize(Date.prototype.toString.call(t),"date");if(p6(t))return Fj(t)}var l="",u=!1,c=["{","}"];if(hEe(t)&&(u=!0,c=["[","]"]),XL(t)){var f=t.name?": "+t.name:"";l=" [Function"+f+"]"}if(v6(t)&&(l=" "+RegExp.prototype.toString.call(t)),$L(t)&&(l=" "+Date.prototype.toUTCString.call(t)),p6(t)&&(l=" "+Fj(t)),i.length===0&&(!u||t.length==0))return c[0]+l+c[1];if(r<0)return v6(t)?e.stylize(RegExp.prototype.toString.call(t),"regexp"):e.stylize("[Object]","special");e.seen.push(t);var v;return u?v=RPt(e,t,r,o,i):v=i.map(function(g){return Rj(e,t,r,o,g,u)}),e.seen.pop(),IPt(v,l,c)}function DPt(e,t){if(B2(t))return e.stylize("undefined","undefined");if(JL(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(dEe(t))return e.stylize(""+t,"number");if(Ij(t))return e.stylize(""+t,"boolean");if(KL(t))return e.stylize("null","null")}function Fj(e){return"["+Error.prototype.toString.call(e)+"]"}function RPt(e,t,r,n,a){for(var i=[],o=0,s=t.length;o-1&&(i?s=s.split(` `).map(function(u){return" "+u}).join(` `).slice(2):s=` `+s.split(` `).map(function(u){return" "+u}).join(` `))):s=e.stylize("[Circular]","special")),B2(o)){if(i&&a.match(/^\d+$/))return s;o=JSON.stringify(""+a),o.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(o=o.slice(1,-1),o=e.stylize(o,"name")):(o=o.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),o=e.stylize(o,"string"))}return o+": "+s}function IPt(e,t,r){var n=0,a=e.reduce(function(i,o){return n++,o.indexOf(` `)>=0&&n++,i+o.replace(/\u001b\[\d\d?m/g,"").length+1},0);return a>60?r[0]+(t===""?"":t+` `)+" "+e.join(`, `)+" "+r[1]:r[0]+t+" "+e.join(", ")+" "+r[1]}ts.types=$H();function hEe(e){return Array.isArray(e)}ts.isArray=hEe;function Ij(e){return typeof e=="boolean"}ts.isBoolean=Ij;function KL(e){return e===null}ts.isNull=KL;function zPt(e){return e==null}ts.isNullOrUndefined=zPt;function dEe(e){return typeof e=="number"}ts.isNumber=dEe;function JL(e){return typeof e=="string"}ts.isString=JL;function qPt(e){return typeof e=="symbol"}ts.isSymbol=qPt;function B2(e){return e===void 0}ts.isUndefined=B2;function v6(e){return ww(e)&&zj(e)==="[object RegExp]"}ts.isRegExp=v6;ts.types.isRegExp=v6;function ww(e){return typeof e=="object"&&e!==null}ts.isObject=ww;function $L(e){return ww(e)&&zj(e)==="[object Date]"}ts.isDate=$L;ts.types.isDate=$L;function p6(e){return ww(e)&&(zj(e)==="[object Error]"||e instanceof Error)}ts.isError=p6;ts.types.isNativeError=p6;function XL(e){return typeof e=="function"}ts.isFunction=XL;function BPt(e){return e===null||typeof e=="boolean"||typeof e=="number"||typeof e=="string"||typeof e=="symbol"||typeof e=="undefined"}ts.isPrimitive=BPt;ts.isBuffer=KH();function zj(e){return Object.prototype.toString.call(e)}function Dj(e){return e<10?"0"+e.toString(10):e.toString(10)}var OPt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function NPt(){var e=new Date,t=[Dj(e.getHours()),Dj(e.getMinutes()),Dj(e.getSeconds())].join(":");return[e.getDate(),OPt[e.getMonth()],t].join(" ")}ts.log=function(){console.log("%s - %s",NPt(),ts.format.apply(ts,arguments))};ts.inherits=gg();ts._extend=function(e,t){if(!t||!ww(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};function vEe(e,t){return Object.prototype.hasOwnProperty.call(e,t)}var q2=typeof Symbol!="undefined"?Symbol("util.promisify.custom"):void 0;ts.promisify=function(t){if(typeof t!="function")throw new TypeError('The "original" argument must be of type Function');if(q2&&t[q2]){var r=t[q2];if(typeof r!="function")throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(r,q2,{value:r,enumerable:!1,writable:!1,configurable:!0}),r}function r(){for(var n,a,i=new Promise(function(l,u){n=l,a=u}),o=[],s=0;s{"use strict";function ry(e){"@babel/helpers - typeof";return ry=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ry(e)}function pEe(e,t){for(var r=0;r2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:r===2?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}else return"of ".concat(t," ").concat(String(e))}function JPt(e,t,r){return e.substr(!r||r<0?0:+r,t.length)===t}function QPt(e,t,r){return(r===void 0||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}function eFt(e,t,r){return typeof r!="number"&&(r=0),r+t.length>e.length?!1:e.indexOf(t,r)!==-1}g6("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError);g6("ERR_INVALID_ARG_TYPE",function(e,t,r){Aw===void 0&&(Aw=e9()),Aw(typeof e=="string","'name' must be a string");var n;typeof t=="string"&&JPt(t,"not ")?(n="must not be",t=t.replace(/^not /,"")):n="must be";var a;if(QPt(e," argument"))a="The ".concat(e," ").concat(n," ").concat(gEe(t,"type"));else{var i=eFt(e,".")?"property":"argument";a='The "'.concat(e,'" ').concat(i," ").concat(n," ").concat(gEe(t,"type"))}return a+=". Received type ".concat(ry(r)),a},TypeError);g6("ERR_INVALID_ARG_VALUE",function(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";qj===void 0&&(qj=Tw());var n=qj.inspect(t);return n.length>128&&(n="".concat(n.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(r,". Received ").concat(n)},TypeError,RangeError);g6("ERR_INVALID_RETURN_VALUE",function(e,t,r){var n;return r&&r.constructor&&r.constructor.name?n="instance of ".concat(r.constructor.name):n="type ".concat(ry(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(n,".")},TypeError);g6("ERR_MISSING_ARGS",function(){for(var e=arguments.length,t=new Array(e),r=0;r0,"At least one arg needs to be specified");var n="The ",a=t.length;switch(t=t.map(function(i){return'"'.concat(i,'"')}),a){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,a-1).join(", "),n+=", and ".concat(t[a-1]," arguments");break}return"".concat(n," must be specified")},TypeError);yEe.exports.codes=mEe});var kEe=fe((Zxr,EEe)=>{"use strict";function xEe(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(e,a).enumerable})),r.push.apply(r,n)}return r}function _Ee(e){for(var t=1;te.length)&&(r=e.length),e.substring(r-t.length,r)===t}function fFt(e,t){if(t=Math.floor(t),e.length==0||t==0)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+=e.substring(0,r-e.length),e}var wp="",m6="",y6="",Lh="",O2={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:"},hFt=10;function TEe(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach(function(n){r[n]=e[n]}),Object.defineProperty(r,"message",{value:e.message}),r}function x6(e){return Vj(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function dFt(e,t,r){var n="",a="",i=0,o="",s=!1,l=x6(e),u=l.split(` `),c=x6(t).split(` `),f=0,v="";if(r==="strictEqual"&&l0(e)==="object"&&l0(t)==="object"&&e!==null&&t!==null&&(r="strictEqualObject"),u.length===1&&c.length===1&&u[0]!==c[0]){var g=u[0].length+c[0].length;if(g<=hFt){if((l0(e)!=="object"||e===null)&&(l0(t)!=="object"||t===null)&&(e!==0||t!==0))return"".concat(O2[r],` `)+"".concat(u[0]," !== ").concat(c[0],` `)}else if(r!=="strictEqualObject"){var p=process.stderr&&process.stderr.isTTY?process.stderr.columns:80;if(g2&&(v=` `.concat(fFt(" ",f),"^"),f=0)}}}for(var x=u[u.length-1],_=c[c.length-1];x===_&&(f++<2?o=` `.concat(x).concat(o):n=x,u.pop(),c.pop(),!(u.length===0||c.length===0));)x=u[u.length-1],_=c[c.length-1];var y=Math.max(u.length,c.length);if(y===0){var C=l.split(` `);if(C.length>30)for(C[26]="".concat(wp,"...").concat(Lh);C.length>27;)C.pop();return"".concat(O2.notIdentical,` `).concat(C.join(` `),` `)}f>3&&(o=` `.concat(wp,"...").concat(Lh).concat(o),s=!0),n!==""&&(o=` `.concat(n).concat(o),n="");var k=0,S=O2[r]+` `.concat(m6,"+ actual").concat(Lh," ").concat(y6,"- expected").concat(Lh),L=" ".concat(wp,"...").concat(Lh," Lines skipped");for(f=0;f1&&f>2&&(w>4?(a+=` `.concat(wp,"...").concat(Lh),s=!0):w>3&&(a+=` `.concat(c[f-2]),k++),a+=` `.concat(c[f-1]),k++),i=f,n+=` `.concat(y6,"-").concat(Lh," ").concat(c[f]),k++;else if(c.length1&&f>2&&(w>4?(a+=` `.concat(wp,"...").concat(Lh),s=!0):w>3&&(a+=` `.concat(u[f-2]),k++),a+=` `.concat(u[f-1]),k++),i=f,a+=` `.concat(m6,"+").concat(Lh," ").concat(u[f]),k++;else{var A=c[f],T=u[f],m=T!==A&&(!wEe(T,",")||T.slice(0,-1)!==A);m&&wEe(A,",")&&A.slice(0,-1)===T&&(m=!1,T+=","),m?(w>1&&f>2&&(w>4?(a+=` `.concat(wp,"...").concat(Lh),s=!0):w>3&&(a+=` `.concat(u[f-2]),k++),a+=` `.concat(u[f-1]),k++),i=f,a+=` `.concat(m6,"+").concat(Lh," ").concat(T),n+=` `.concat(y6,"-").concat(Lh," ").concat(A),k+=2):(a+=n,n="",(w===1||f===0)&&(a+=` `.concat(T),k++))}if(k>20&&f30)for(g[26]="".concat(wp,"...").concat(Lh);g.length>27;)g.pop();g.length===1?i=r.call(this,"".concat(v," ").concat(g[0])):i=r.call(this,"".concat(v,` `).concat(g.join(` `),` `))}else{var p=x6(u),x="",_=O2[s];s==="notDeepEqual"||s==="notEqual"?(p="".concat(O2[s],` `).concat(p),p.length>1024&&(p="".concat(p.slice(0,1021),"..."))):(x="".concat(x6(c)),p.length>512&&(p="".concat(p.slice(0,509),"...")),x.length>512&&(x="".concat(x.slice(0,509),"...")),s==="deepEqual"||s==="equal"?p="".concat(_,` `).concat(p,` should equal `):x=" ".concat(s," ").concat(x)),i=r.call(this,"".concat(p).concat(x))}return Error.stackTraceLimit=f,i.generatedMessage=!o,Object.defineProperty(Nj(i),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),i.code="ERR_ASSERTION",i.actual=u,i.expected=c,i.operator=s,Error.captureStackTrace&&Error.captureStackTrace(Nj(i),l),i.stack,i.name="AssertionError",MEe(i)}return nFt(n,[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:t,value:function(i,o){return Vj(this,_Ee(_Ee({},o),{},{customInspect:!1,depth:0}))}}]),n})(Uj(Error),Vj.custom);EEe.exports=vFt});var Gj=fe(($xr,LEe)=>{"use strict";var CEe=Object.prototype.toString;LEe.exports=function(t){var r=CEe.call(t),n=r==="[object Arguments]";return n||(n=r!=="[object Array]"&&t!==null&&typeof t=="object"&&typeof t.length=="number"&&t.length>=0&&CEe.call(t.callee)==="[object Function]"),n}});var OEe=fe((Kxr,BEe)=>{"use strict";var qEe;Object.keys||(w6=Object.prototype.hasOwnProperty,Hj=Object.prototype.toString,PEe=Gj(),jj=Object.prototype.propertyIsEnumerable,FEe=!jj.call({toString:null},"toString"),DEe=jj.call(function(){},"prototype"),T6=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r9=function(e){var t=e.constructor;return t&&t.prototype===e},REe={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},IEe=(function(){if(typeof window=="undefined")return!1;for(var e in window)try{if(!REe["$"+e]&&w6.call(window,e)&&window[e]!==null&&typeof window[e]=="object")try{r9(window[e])}catch(t){return!0}}catch(t){return!0}return!1})(),zEe=function(e){if(typeof window=="undefined"||!IEe)return r9(e);try{return r9(e)}catch(t){return!1}},qEe=function(t){var r=t!==null&&typeof t=="object",n=Hj.call(t)==="[object Function]",a=PEe(t),i=r&&Hj.call(t)==="[object String]",o=[];if(!r&&!n&&!a)throw new TypeError("Object.keys called on a non-object");var s=DEe&&n;if(i&&t.length>0&&!w6.call(t,0))for(var l=0;l0)for(var u=0;u{"use strict";var pFt=Array.prototype.slice,gFt=Gj(),NEe=Object.keys,n9=NEe?function(t){return NEe(t)}:OEe(),UEe=Object.keys;n9.shim=function(){if(Object.keys){var t=(function(){var r=Object.keys(arguments);return r&&r.length===arguments.length})(1,2);t||(Object.keys=function(n){return gFt(n)?UEe(pFt.call(n)):UEe(n)})}else Object.keys=n9;return Object.keys||n9};VEe.exports=n9});var YEe=fe((Qxr,WEe)=>{"use strict";var mFt=Wj(),HEe=Q7()(),jEe=k2(),i9=eL(),yFt=jEe("Array.prototype.push"),GEe=jEe("Object.prototype.propertyIsEnumerable"),xFt=HEe?i9.getOwnPropertySymbols:null;WEe.exports=function(t,r){if(t==null)throw new TypeError("target must be an object");var n=i9(t);if(arguments.length===1)return n;for(var a=1;a{"use strict";var Yj=YEe(),_Ft=function(){if(!Object.assign)return!1;for(var e="abcdefghijklmnopqrst",t=e.split(""),r={},n=0;n{"use strict";var $Ee=function(e){return e!==e};KEe.exports=function(t,r){return t===0&&r===0?1/t===1/r:!!(t===r||$Ee(t)&&$Ee(r))}});var a9=fe((r2r,JEe)=>{"use strict";var wFt=Xj();JEe.exports=function(){return typeof Object.is=="function"?Object.is:wFt}});var rke=fe((n2r,tke)=>{"use strict";var QEe=uL(),eke=r6(),TFt=eke(QEe("String.prototype.indexOf"));tke.exports=function(t,r){var n=QEe(t,!!r);return typeof n=="function"&&TFt(t,".prototype.")>-1?eke(n):n}});var A6=fe((i2r,oke)=>{"use strict";var AFt=Wj(),MFt=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",SFt=Object.prototype.toString,EFt=Array.prototype.concat,nke=UH(),kFt=function(e){return typeof e=="function"&&SFt.call(e)==="[object Function]"},ike=GH()(),CFt=function(e,t,r,n){if(t in e){if(n===!0){if(e[t]===r)return}else if(!kFt(n)||!n())return}ike?nke(e,t,r,!0):nke(e,t,r)},ake=function(e,t){var r=arguments.length>2?arguments[2]:{},n=AFt(t);MFt&&(n=EFt.call(n,Object.getOwnPropertySymbols(t)));for(var a=0;a{"use strict";var LFt=a9(),PFt=A6();ske.exports=function(){var t=LFt();return PFt(Object,{is:t},{is:function(){return Object.is!==t}}),t}});var hke=fe((o2r,fke)=>{"use strict";var FFt=A6(),DFt=r6(),RFt=Xj(),uke=a9(),IFt=lke(),cke=DFt(uke(),Object);FFt(cke,{getPolyfill:uke,implementation:RFt,shim:IFt});fke.exports=cke});var Zj=fe((s2r,dke)=>{"use strict";dke.exports=function(t){return t!==t}});var $j=fe((l2r,vke)=>{"use strict";var zFt=Zj();vke.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:zFt}});var gke=fe((u2r,pke)=>{"use strict";var qFt=A6(),BFt=$j();pke.exports=function(){var t=BFt();return qFt(Number,{isNaN:t},{isNaN:function(){return Number.isNaN!==t}}),t}});var _ke=fe((c2r,xke)=>{"use strict";var OFt=r6(),NFt=A6(),UFt=Zj(),mke=$j(),VFt=gke(),yke=OFt(mke(),Number);NFt(yke,{getPolyfill:mke,implementation:UFt,shim:VFt});xke.exports=yke});var Nke=fe((f2r,Oke)=>{"use strict";function bke(e,t){return WFt(e)||jFt(e,t)||HFt(e,t)||GFt()}function GFt(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function HFt(e,t){if(e){if(typeof e=="string")return wke(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);if(r==="Object"&&e.constructor&&(r=e.constructor.name),r==="Map"||r==="Set")return Array.from(e);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return wke(e,t)}}function wke(e,t){(t==null||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r10)return!0;for(var t=0;t57)return!0}return e.length===10&&e>=Math.pow(2,32)}function l9(e){return Object.keys(e).filter(tDt).concat(c9(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function Ike(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,a=0,i=Math.min(r,n);a{"use strict";function Tp(e){"@babel/helpers - typeof";return Tp=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Tp(e)}function Uke(e,t){for(var r=0;r1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;a1?r-1:0),a=1;a{var C6=1e3,L6=C6*60,P6=L6*60,F6=P6*24,EDt=F6*365.25;a8e.exports=function(e,t){t=t||{};var r=typeof e;if(r==="string"&&e.length>0)return kDt(e);if(r==="number"&&isNaN(e)===!1)return t.long?LDt(e):CDt(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))};function kDt(e){if(e=String(e),!(e.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(e);if(t){var r=parseFloat(t[1]),n=(t[2]||"ms").toLowerCase();switch(n){case"years":case"year":case"yrs":case"yr":case"y":return r*EDt;case"days":case"day":case"d":return r*F6;case"hours":case"hour":case"hrs":case"hr":case"h":return r*P6;case"minutes":case"minute":case"mins":case"min":case"m":return r*L6;case"seconds":case"second":case"secs":case"sec":case"s":return r*C6;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return r;default:return}}}}function CDt(e){return e>=F6?Math.round(e/F6)+"d":e>=P6?Math.round(e/P6)+"h":e>=L6?Math.round(e/L6)+"m":e>=C6?Math.round(e/C6)+"s":e+"ms"}function LDt(e){return y9(e,F6,"day")||y9(e,P6,"hour")||y9(e,L6,"minute")||y9(e,C6,"second")||e+" ms"}function y9(e,t,r){if(!(e{Xs=s8e.exports=nW.debug=nW.default=nW;Xs.coerce=IDt;Xs.disable=DDt;Xs.enable=FDt;Xs.enabled=RDt;Xs.humanize=o8e();Xs.names=[];Xs.skips=[];Xs.formatters={};var rW;function PDt(e){var t=0,r;for(r in e)t=(t<<5)-t+e.charCodeAt(r),t|=0;return Xs.colors[Math.abs(t)%Xs.colors.length]}function nW(e){function t(){if(t.enabled){var r=t,n=+new Date,a=n-(rW||n);r.diff=a,r.prev=rW,r.curr=n,rW=n;for(var i=new Array(arguments.length),o=0;o{Fd=c8e.exports=l8e();Fd.log=BDt;Fd.formatArgs=qDt;Fd.save=ODt;Fd.load=u8e;Fd.useColors=zDt;Fd.storage=typeof chrome!="undefined"&&typeof chrome.storage!="undefined"?chrome.storage.local:NDt();Fd.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"];function zDt(){return typeof window!="undefined"&&window.process&&window.process.type==="renderer"?!0:typeof document!="undefined"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window!="undefined"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||typeof navigator!="undefined"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}Fd.formatters.j=function(e){try{return JSON.stringify(e)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}};function qDt(e){var t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+Fd.humanize(this.diff),!!t){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,a=0;e[0].replace(/%[a-zA-Z%]/g,function(i){i!=="%%"&&(n++,i==="%c"&&(a=n))}),e.splice(a,0,r)}}function BDt(){return typeof console=="object"&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}function ODt(e){try{e==null?Fd.storage.removeItem("debug"):Fd.storage.debug=e}catch(t){}}function u8e(){var e;try{e=Fd.storage.debug}catch(t){}return!e&&typeof process!="undefined"&&"env"in process&&(e=process.env.DEBUG),e}Fd.enable(u8e());function NDt(){try{return window.localStorage}catch(e){}}});var x8e=fe((v2r,y8e)=>{var Sw=e9(),oy=f8e()("stream-parser");y8e.exports=VDt;var d8e=-1,x9=0,UDt=1,v8e=2;function VDt(e){var t=e&&typeof e._transform=="function",r=e&&typeof e._write=="function";if(!t&&!r)throw new Error("must pass a Writable or Transform stream in");oy("extending Parser into stream"),e._bytes=GDt,e._skipBytes=HDt,t&&(e._passthrough=jDt),t?e._transform=YDt:e._write=WDt}function D6(e){oy("initializing parser stream"),e._parserBytesLeft=0,e._parserBuffers=[],e._parserBuffered=0,e._parserState=d8e,e._parserCallback=null,typeof e.push=="function"&&(e._parserOutput=e.push.bind(e)),e._parserInit=!0}function GDt(e,t){Sw(!this._parserCallback,'there is already a "callback" set!'),Sw(isFinite(e)&&e>0,'can only buffer a finite number of bytes > 0, got "'+e+'"'),this._parserInit||D6(this),oy("buffering %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=x9}function HDt(e,t){Sw(!this._parserCallback,'there is already a "callback" set!'),Sw(e>0,'can only skip > 0 bytes, got "'+e+'"'),this._parserInit||D6(this),oy("skipping %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=UDt}function jDt(e,t){Sw(!this._parserCallback,'There is already a "callback" set!'),Sw(e>0,'can only pass through > 0 bytes, got "'+e+'"'),this._parserInit||D6(this),oy("passing through %o bytes",e),this._parserBytesLeft=e,this._parserCallback=t,this._parserState=v8e}function WDt(e,t,r){this._parserInit||D6(this),oy("write(%o bytes)",e.length),typeof t=="function"&&(r=t),g8e(this,e,null,r)}function YDt(e,t,r){this._parserInit||D6(this),oy("transform(%o bytes)",e.length),typeof t!="function"&&(t=this._parserOutput),g8e(this,e,t,r)}function p8e(e,t,r,n){return e._parserBytesLeft<=0?n(new Error("got data but not currently parsing anything")):t.length<=e._parserBytesLeft?function(){return h8e(e,t,r,n)}:function(){var a=t.slice(0,e._parserBytesLeft);return h8e(e,a,r,function(i){if(i)return n(i);if(t.length>a.length)return function(){return p8e(e,t.slice(a.length),r,n)}})}}function h8e(e,t,r,n){if(e._parserBytesLeft-=t.length,oy("%o bytes left for stream piece",e._parserBytesLeft),e._parserState===x9?(e._parserBuffers.push(t),e._parserBuffered+=t.length):e._parserState===v8e&&r(t),e._parserBytesLeft===0){var a=e._parserCallback;if(a&&e._parserState===x9&&e._parserBuffers.length>1&&(t=Buffer.concat(e._parserBuffers,e._parserBuffered)),e._parserState!==x9&&(t=null),e._parserCallback=null,e._parserBuffered=0,e._parserState=d8e,e._parserBuffers.splice(0),a){var i=[];t&&i.push(t),r&&i.push(r);var o=a.length>i.length;o&&i.push(m8e(n));var s=a.apply(e,i);if(!o||n===s)return n}}else return n}var g8e=m8e(p8e);function m8e(e){return function(){for(var t=e.apply(this,arguments);typeof t=="function";)t=t();return t}}});var ds=fe(Ph=>{"use strict";var _8e=uEe().Transform,XDt=x8e();function R6(){_8e.call(this,{readableObjectMode:!0})}R6.prototype=Object.create(_8e.prototype);R6.prototype.constructor=R6;XDt(R6.prototype);Ph.ParserStream=R6;Ph.sliceEq=function(e,t,r){for(var n=t,a=0;a>16};Ph.readInt16BE=function(e,t){return Ph.readUInt16BE(e,t)<<16>>16};Ph.readUInt32LE=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16)+e[t+3]*16777216};Ph.readUInt32BE=function(e,t){return e[t]*16777216+(e[t+1]<<16|e[t+2]<<8|e[t+3])};Ph.readInt32LE=function(e,t){return Ph.readUInt32LE(e,t)|0};Ph.readInt32BE=function(e,t){return Ph.readUInt32BE(e,t)|0};function _9(e,t,r){Error.call(this),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||"",this.name=this.constructor.name,this.message=e,t&&(this.code=t),r&&(this.statusCode=r)}_9.prototype=Object.create(Error.prototype);_9.prototype.constructor=_9;Ph.ProbeError=_9});var b8e=fe((g2r,b9)=>{"use strict";var Ew=ds().readUInt16BE,aW=ds().readUInt32BE;function I6(e,t){if(e.length<4+t)return null;var r=aW(e,t);return e.length>4&15,n=e[4]&15,a=e[5]>>4&15,i=Ew(e,6),o=8,s=0;si.width||a.width===i.width&&a.height>i.height?a:i}),r=e.reduce(function(a,i){return a.height>i.height||a.height===i.height&&a.width>i.width?a:i}),n;return t.width>r.height||t.width===r.height&&t.height>r.width?n=t:n=r,n}b9.exports.readSizeFromMeta=function(e){var t={sizes:[],transforms:[],item_inf:{},item_loc:{}};if(QDt(e,t),!!t.sizes.length){var r=eRt(t.sizes),n=1;t.transforms.forEach(function(i){var o={1:6,2:5,3:8,4:7,5:4,6:3,7:2,8:1},s={1:4,2:3,3:2,4:1,5:6,6:5,7:8,8:7};if(i.type==="imir"&&(i.value===0?n=s[n]:(n=s[n],n=o[n],n=o[n])),i.type==="irot")for(var l=0;l{"use strict";function w9(e,t){var r=new Error(e);return r.code=t,r}function tRt(e){try{return decodeURIComponent(escape(e))}catch(t){return e}}function xg(e,t,r){this.input=e.subarray(t,r),this.start=t;var n=String.fromCharCode.apply(null,this.input.subarray(0,4));if(n!=="II*\0"&&n!=="MM\0*")throw w9("invalid TIFF signature","EBADDATA");this.big_endian=n[0]==="M"}xg.prototype.each=function(e){this.aborted=!1;var t=this.read_uint32(4);for(this.ifds_to_read=[{id:0,offset:t}];this.ifds_to_read.length>0&&!this.aborted;){var r=this.ifds_to_read.shift();r.offset&&this.scan_ifd(r.id,r.offset,e)}};xg.prototype.read_uint16=function(e){var t=this.input;if(e+2>t.length)throw w9("unexpected EOF","EBADDATA");return this.big_endian?t[e]*256+t[e+1]:t[e]+t[e+1]*256};xg.prototype.read_uint32=function(e){var t=this.input;if(e+4>t.length)throw w9("unexpected EOF","EBADDATA");return this.big_endian?t[e]*16777216+t[e+1]*65536+t[e+2]*256+t[e+3]:t[e]+t[e+1]*256+t[e+2]*65536+t[e+3]*16777216};xg.prototype.is_subifd_link=function(e,t){return e===0&&t===34665||e===0&&t===34853||e===34665&&t===40965};xg.prototype.exif_format_length=function(e){switch(e){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}};xg.prototype.exif_format_read=function(e,t){var r;switch(e){case 1:case 2:return r=this.input[t],r;case 6:return r=this.input[t],r|(r&128)*33554430;case 3:return r=this.read_uint16(t),r;case 8:return r=this.read_uint16(t),r|(r&32768)*131070;case 4:return r=this.read_uint32(t),r;case 9:return r=this.read_uint32(t),r|0;case 5:case 10:case 11:case 12:return null;case 7:return null;default:return null}};xg.prototype.scan_ifd=function(e,t,r){var n=this.read_uint16(t);t+=2;for(var a=0;athis.input.length)throw w9("unexpected EOF","EBADDATA");for(var v=[],g=c,p=0;p0&&(this.ifds_to_read.push({id:i,offset:v[0]}),f=!0);var _={is_big_endian:this.big_endian,ifd:e,tag:i,format:o,count:s,entry_offset:t+this.start,data_length:u,data_offset:c+this.start,value:v,is_subifd_link:f};if(r(_)===!1){this.aborted=!0;return}t+=12}e===0&&this.ifds_to_read.push({id:1,offset:this.read_uint32(t)})};oW.exports.ExifParser=xg;oW.exports.get_orientation=function(e){var t=0;try{return new xg(e,0,e.length).each(function(r){if(r.ifd===0&&r.tag===274&&Array.isArray(r.value))return t=r.value[0],!1}),t}catch(r){return-1}}});var T8e=fe((y2r,w8e)=>{"use strict";var rRt=ds().str2arr,nRt=ds().sliceEq,iRt=ds().readUInt32BE,A9=b8e(),aRt=T9(),oRt=rRt("ftyp");w8e.exports=function(e){if(nRt(e,4,oRt)){var t=A9.unbox(e,0);if(t){var r=A9.getMimeType(t.data);if(r){for(var n,a=t.end;;){var i=A9.unbox(e,a);if(!i)break;if(a=i.end,i.boxtype==="mdat")return;if(i.boxtype==="meta"){n=i.data;break}}if(n){var o=A9.readSizeFromMeta(n);if(o){var s={width:o.width,height:o.height,type:r.type,mime:r.mime,wUnits:"px",hUnits:"px"};if(o.variants.length>1&&(s.variants=o.variants),o.orientation&&(s.orientation=o.orientation),o.exif_location&&o.exif_location.offset+o.exif_location.length<=e.length){var l=iRt(e,o.exif_location.offset),u=e.slice(o.exif_location.offset+l+4,o.exif_location.offset+o.exif_location.length),c=aRt.get_orientation(u);c>0&&(s.orientation=c)}return s}}}}}}});var E8e=fe((x2r,S8e)=>{"use strict";var sRt=ds().str2arr,lRt=ds().sliceEq,A8e=ds().readInt16LE,M8e=ds().readInt32LE,uRt=ds().readUInt32LE,cRt=sRt("BM");S8e.exports=function(e){if(!(e.length<26)&&lRt(e,0,cRt)){var t,r,n=uRt(e,14);if(n===12)r=A8e(e,18),t=A8e(e,20);else if(n>12)r=M8e(e,18),t=M8e(e,22);else return;return{width:r,height:Math.abs(t),type:"bmp",mime:"image/bmp",wUnits:"px",hUnits:"px"}}}});var F8e=fe((_2r,P8e)=>{"use strict";var L8e=ds().str2arr,k8e=ds().sliceEq,C8e=ds().readUInt16LE,fRt=L8e("GIF87a"),hRt=L8e("GIF89a");P8e.exports=function(e){if(!(e.length<10)&&!(!k8e(e,0,fRt)&&!k8e(e,0,hRt)))return{width:C8e(e,6),height:C8e(e,8),type:"gif",mime:"image/gif",wUnits:"px",hUnits:"px"}}});var R8e=fe((b2r,D8e)=>{"use strict";var sW=ds().readUInt16LE,dRt=0,vRt=1,lW=16;D8e.exports=function(e){var t=sW(e,0),r=sW(e,2),n=sW(e,4);if(!(t!==dRt||r!==vRt||!n)&&!(e.length<6+n*lW)){for(var a=[],i={width:0,height:0},o=0;oi.width||l>i.height)&&(i=u)}return{width:i.width,height:i.height,variants:a,type:"ico",mime:"image/x-icon",wUnits:"px",hUnits:"px"}}}});var z8e=fe((w2r,I8e)=>{"use strict";var uW=ds().readUInt16BE,pRt=ds().str2arr,gRt=ds().sliceEq,mRt=T9(),yRt=pRt("Exif\0\0");I8e.exports=function(e){if(!(e.length<2)&&!(e[0]!==255||e[1]!==216||e[2]!==255))for(var t=2;;){for(;;){if(e.length-t<2)return;if(e[t++]===255)break}for(var r=e[t++],n;r===255;)r=e[t++];if(r>=208&&r<=217||r===1)n=0;else if(r>=192&&r<=254){if(e.length-t<2)return;n=uW(e,t)-2,t+=2}else return;if(r===217||r===218)return;var a;if(r===225&&n>=10&&gRt(e,t,yRt)&&(a=mRt.get_orientation(e.slice(t+6,t+n))),n>=5&&r>=192&&r<=207&&r!==196&&r!==200&&r!==204){if(e.length-t0&&(i.orientation=a),i}t+=n}}});var U8e=fe((T2r,N8e)=>{"use strict";var O8e=ds().str2arr,q8e=ds().sliceEq,B8e=ds().readUInt32BE,xRt=O8e(`\x89PNG\r  `),_Rt=O8e("IHDR");N8e.exports=function(e){if(!(e.length<24)&&q8e(e,0,xRt)&&q8e(e,12,_Rt))return{width:B8e(e,16),height:B8e(e,20),type:"png",mime:"image/png",wUnits:"px",hUnits:"px"}}});var H8e=fe((A2r,G8e)=>{"use strict";var bRt=ds().str2arr,wRt=ds().sliceEq,V8e=ds().readUInt32BE,TRt=bRt("8BPS\0");G8e.exports=function(e){if(!(e.length<22)&&wRt(e,0,TRt))return{width:V8e(e,18),height:V8e(e,14),type:"psd",mime:"image/vnd.adobe.photoshop",wUnits:"px",hUnits:"px"}}});var Y8e=fe((M2r,W8e)=>{"use strict";function ARt(e){return e===32||e===9||e===13||e===10}function kw(e){return typeof e=="number"&&isFinite(e)&&e>0}function MRt(e){var t=0,r=e.length;for(e[0]===239&&e[1]===187&&e[2]===191&&(t=3);t]*>/,ERt=/^<([-_.:a-zA-Z0-9]+:)?svg\s/,kRt=/[^-]\bwidth="([^%]+?)"|[^-]\bwidth='([^%]+?)'/,CRt=/\bheight="([^%]+?)"|\bheight='([^%]+?)'/,LRt=/\bview[bB]ox="(.+?)"|\bview[bB]ox='(.+?)'/,j8e=/in$|mm$|cm$|pt$|pc$|px$|em$|ex$/;function PRt(e){var t=e.match(kRt),r=e.match(CRt),n=e.match(LRt);return{width:t&&(t[1]||t[2]),height:r&&(r[1]||r[2]),viewbox:n&&(n[1]||n[2])}}function x1(e){return j8e.test(e)?e.match(j8e)[0]:"px"}W8e.exports=function(e){if(MRt(e)){for(var t="",r=0;r{"use strict";var $8e=ds().str2arr,X8e=ds().sliceEq,FRt=ds().readUInt16LE,DRt=ds().readUInt16BE,RRt=ds().readUInt32LE,IRt=ds().readUInt32BE,zRt=$8e("II*\0"),qRt=$8e("MM\0*");function M9(e,t,r){return r?DRt(e,t):FRt(e,t)}function cW(e,t,r){return r?IRt(e,t):RRt(e,t)}function Z8e(e,t,r){var n=M9(e,t+2,r),a=cW(e,t+4,r);return a!==1||n!==3&&n!==4?null:n===3?M9(e,t+8,r):cW(e,t+8,r)}K8e.exports=function(e){if(!(e.length<8)&&!(!X8e(e,0,zRt)&&!X8e(e,0,qRt))){var t=e[0]===77,r=cW(e,4,t)-8;if(!(r<0)){var n=r+8;if(!(e.length-n<2)){var a=M9(e,n+0,t)*12;if(!(a<=0)&&(n+=2,!(e.length-n{"use strict";var tCe=ds().str2arr,Q8e=ds().sliceEq,eCe=ds().readUInt16LE,fW=ds().readUInt32LE,BRt=T9(),ORt=tCe("RIFF"),NRt=tCe("WEBP");function URt(e,t){if(!(e[t+3]!==157||e[t+4]!==1||e[t+5]!==42))return{width:eCe(e,t+6)&16383,height:eCe(e,t+8)&16383,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}function VRt(e,t){if(e[t]===47){var r=fW(e,t+1);return{width:(r&16383)+1,height:(r>>14&16383)+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}}function GRt(e,t){return{width:(e[t+6]<<16|e[t+5]<<8|e[t+4])+1,height:(e[t+9]<<16|e[t+8]<<8|e[t+7])+1,type:"webp",mime:"image/webp",wUnits:"px",hUnits:"px"}}rCe.exports=function(e){if(!(e.length<16)&&!(!Q8e(e,0,ORt)||!Q8e(e,8,NRt))){var t=12,r=null,n=0,a=fW(e,4)+8;if(!(a>e.length)){for(;t+8=10?r=r||URt(e,t+8):i==="VP8L"&&o>=5?r=r||VRt(e,t+8):i==="VP8X"&&o>=10?r=r||GRt(e,t+8):i==="EXIF"&&(n=BRt.get_orientation(e.slice(t+8,t+8+o)),t=1/0),t+=8+o}if(r)return n>0&&(r.orientation=n),r}}}});var aCe=fe((k2r,iCe)=>{"use strict";iCe.exports={avif:T8e(),bmp:E8e(),gif:F8e(),ico:R8e(),jpeg:z8e(),png:U8e(),psd:H8e(),svg:Y8e(),tiff:J8e(),webp:nCe()}});var oCe=fe((C2r,dW)=>{"use strict";var hW=aCe();function HRt(e){for(var t=Object.keys(hW),r=0;r0&&n.height>0?n:null}return null}dW.exports=function(t){return HRt(t)};dW.exports.parsers=hW});var lCe=fe(sCe=>{"use strict";var jRt=oCe(),WRt=ag().IMAGE_URL_PREFIX,YRt=M2().Buffer;sCe.getImageSize=function(e){var t=e.replace(WRt,""),r=new YRt(t,"base64");return jRt(r)}});var fCe=fe((P2r,cCe)=>{"use strict";var uCe=Xt(),XRt=nw(),ZRt=aa(),S9=Yi(),$Rt=Xt().maxRowLength,KRt=lCe().getImageSize;cCe.exports=function(t,r){var n,a;if(r._hasZ)n=r.z.length,a=$Rt(r.z);else if(r._hasSource){var i=KRt(r.source);n=i.height,a=i.width}var o=S9.getFromId(t,r.xaxis||"x"),s=S9.getFromId(t,r.yaxis||"y"),l=o.d2c(r.x0)-r.dx/2,u=s.d2c(r.y0)-r.dy/2,c,f=[l,l+a*r.dx],v=[u,u+n*r.dy];if(o&&o.type==="log")for(c=0;c{"use strict";var tIt=xi(),N2=Xt(),hCe=N2.strTranslate,rIt=Q0(),nIt=nw(),iIt=eG(),aIt=x7().STYLE;dCe.exports=function(t,r,n,a){var i=r.xaxis,o=r.yaxis,s=!t._context._exportedPlot&&iIt();N2.makeTraceGroups(a,n,"im").each(function(l){var u=tIt.select(this),c=l[0],f=c.trace,v=(f.zsmooth==="fast"||f.zsmooth===!1&&s)&&!f._hasZ&&f._hasSource&&i.type==="linear"&&o.type==="linear";f._realImage=v;var g=c.z,p=c.x0,x=c.y0,_=c.w,y=c.h,C=f.dx,k=f.dy,S,L,w,A,T,m;for(m=0;S===void 0&&m<_;)S=i.c2p(p+m*C),m++;for(m=_;L===void 0&&m>0;)L=i.c2p(p+m*C),m--;for(m=0;A===void 0&&m0;)T=o.c2p(x+m*k),m--;if(LU[0];if(J||ee){var ce=S+E/2,ye=A+I/2;j+="transform:"+hCe(ce+"px",ye+"px")+"scale("+(J?-1:1)+","+(ee?-1:1)+")"+hCe(-ce+"px",-ye+"px")+";"}}V.attr("style",j);var xe=new Promise(function(ue){if(f._hasZ)ue();else if(f._hasSource)if(f._canvas&&f._canvas.el.width===_&&f._canvas.el.height===y&&f._canvas.source===f.source)ue();else{var K=document.createElement("canvas");K.width=_,K.height=y;var _e=K.getContext("2d",{willReadFrequently:!0});f._image=f._image||new Image;var ne=f._image;ne.onload=function(){_e.drawImage(ne,0,0),f._canvas={el:K,source:f.source},ue()},ne.setAttribute("src",f.source)}}).then(function(){var ue,K;if(f._hasZ)K=O(function(ae,pe){var ie=g[pe][ae];return N2.isTypedArray(ie)&&(ie=Array.from(ie)),ie}),ue=K.toDataURL("image/png");else if(f._hasSource)if(v)ue=f.source;else{var _e=f._canvas.el.getContext("2d",{willReadFrequently:!0}),ne=_e.getImageData(0,0,_,y).data;K=O(function(ae,pe){var ie=4*(pe*_+ae);return[ne[ie],ne[ie+1],ne[ie+2],ne[ie+3]]}),ue=K.toDataURL("image/png")}V.attr({"xlink:href":ue,height:I,width:E,x:S,y:A})});t._promises.push(xe)})}});var gCe=fe((D2r,pCe)=>{"use strict";var oIt=xi();pCe.exports=function(t){oIt.select(t).selectAll(".im image").style("opacity",function(r){return r[0].trace.opacity})}});var _Ce=fe((R2r,xCe)=>{"use strict";var mCe=kl(),yCe=Xt(),E9=yCe.isArrayOrTypedArray,sIt=nw();xCe.exports=function(t,r,n){var a=t.cd[0],i=a.trace,o=t.xa,s=t.ya;if(!(mCe.inbox(r-a.x0,r-(a.x0+a.w*i.dx),0)>0||mCe.inbox(n-a.y0,n-(a.y0+a.h*i.dy),0)>0)){var l=Math.floor((r-a.x0)/i.dx),u=Math.floor(Math.abs(n-a.y0)/i.dy),c;if(i._hasZ?c=a.z[u][l]:i._hasSource&&(c=i._canvas.el.getContext("2d",{willReadFrequently:!0}).getImageData(l,u,1,1).data),!!c){var f=a.hi||i.hoverinfo,v;if(f){var g=f.split("+");g.indexOf("all")!==-1&&(g=["color"]),g.indexOf("color")!==-1&&(v=!0)}var p=sIt.colormodel[i.colormodel],x=p.colormodel||i.colormodel,_=x.length,y=i._scaler(c),C=p.suffix,k=[];(i.hovertemplate||v)&&(k.push("["+[y[0]+C[0],y[1]+C[1],y[2]+C[2]].join(", ")),_===4&&k.push(", "+y[3]+C[3]),k.push("]"),k=k.join(""),t.extraText=x.toUpperCase()+": "+k);var S;E9(i.hovertext)&&E9(i.hovertext[u])?S=i.hovertext[u][l]:E9(i.text)&&E9(i.text[u])&&(S=i.text[u][l]);var L=s.c2p(a.y0+(u+.5)*i.dy),w=a.x0+(l+.5)*i.dx,A=a.y0+(u+.5)*i.dy,T="["+c.slice(0,i.colormodel.length).join(", ")+"]";return[yCe.extendFlat(t,{index:[u,l],x0:o.c2p(a.x0+l*i.dx),x1:o.c2p(a.x0+(l+1)*i.dx),y0:L,y1:L,color:y,xVal:w,xLabelVal:w,yVal:A,yLabelVal:A,zLabelVal:T,text:S,hovertemplateLabels:{zLabel:T,colorLabel:k,"color[0]Label":y[0]+C[0],"color[1]Label":y[1]+C[1],"color[2]Label":y[2]+C[2],"color[3]Label":y[3]+C[3]}})]}}}});var wCe=fe((I2r,bCe)=>{"use strict";bCe.exports=function(t,r){return"xVal"in r&&(t.x=r.xVal),"yVal"in r&&(t.y=r.yVal),r.xa&&(t.xaxis=r.xa),r.ya&&(t.yaxis=r.ya),t.color=r.color,t.colormodel=r.trace.colormodel,t.z||(t.z=r.color),t}});var ACe=fe((z2r,TCe)=>{"use strict";TCe.exports={attributes:(fH(),Gs(cH)).default,supplyDefaults:fAe(),calc:fCe(),plot:vCe(),style:gCe(),hoverPoints:_Ce(),eventData:wCe(),moduleType:"trace",name:"image",basePlotModule:gu(),categories:["cartesian","svg","2dMap","noSortingByValue"],animatable:!1,meta:{}}});var SCe=fe((q2r,MCe)=>{"use strict";MCe.exports=ACe()});var U2=fe((B2r,kCe)=>{"use strict";var k9=Ho(),lIt=nl().attributes,uIt=Ds(),cIt=tc(),{hovertemplateAttrs:fIt,texttemplateAttrs:hIt,templatefallbackAttrs:ECe}=Oo(),sy=ta().extendFlat,dIt=Uc().pattern,C9=uIt({editType:"plot",arrayOk:!0,colorEditType:"plot"});kCe.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:cIt.defaultLine,arrayOk:!0,editType:"style"},width:{valType:"number",min:0,dflt:0,arrayOk:!0,editType:"style"},editType:"calc"},pattern:dIt,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:sy({},k9.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:fIt({},{keys:["label","color","value","percent","text"]}),hovertemplatefallback:ECe(),texttemplate:hIt({editType:"plot"},{keys:["label","color","value","percent","text"]}),texttemplatefallback:ECe({editType:"plot"}),textposition:{valType:"enumerated",values:["inside","outside","auto","none"],dflt:"auto",arrayOk:!0,editType:"plot"},textfont:sy({},C9,{}),insidetextorientation:{valType:"enumerated",values:["horizontal","radial","tangential","auto"],dflt:"auto",editType:"plot"},insidetextfont:sy({},C9,{}),outsidetextfont:sy({},C9,{}),automargin:{valType:"boolean",dflt:!1,editType:"plot"},showlegend:sy({},k9.showlegend,{arrayOk:!0}),legend:sy({},k9.legend,{arrayOk:!0}),legendrank:sy({},k9.legendrank,{arrayOk:!0}),title:{text:{valType:"string",dflt:"",editType:"plot"},font:sy({},C9,{}),position:{valType:"enumerated",values:["top left","top center","top right","middle center","bottom left","bottom center","bottom right"],editType:"plot"},editType:"plot"},domain:lIt({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"}}});var V2=fe((O2r,PCe)=>{"use strict";var vIt=aa(),z6=Xt(),pIt=U2(),gIt=nl().defaults,mIt=z0().handleText,yIt=Xt().coercePattern;function CCe(e,t){var r=z6.isArrayOrTypedArray(e),n=z6.isArrayOrTypedArray(t),a=Math.min(r?e.length:1/0,n?t.length:1/0);if(isFinite(a)||(a=0),a&&n){for(var i,o=0;o0){i=!0;break}}i||(a=0)}return{hasLabels:r,hasValues:n,len:a}}function LCe(e,t,r,n,a){var i=n("marker.line.width");i&&n("marker.line.color",a?void 0:r.paper_bgcolor);var o=n("marker.colors");yIt(n,"marker.pattern",o),e.marker&&!t.marker.pattern.fgcolor&&(t.marker.pattern.fgcolor=e.marker.colors),t.marker.pattern.bgcolor||(t.marker.pattern.bgcolor=r.paper_bgcolor)}function xIt(e,t,r,n){function a(C,k){return z6.coerce(e,t,pIt,C,k)}var i=a("labels"),o=a("values"),s=CCe(i,o),l=s.len;if(t._hasLabels=s.hasLabels,t._hasValues=s.hasValues,!t._hasLabels&&t._hasValues&&(a("label0"),a("dlabel")),!l){t.visible=!1;return}t._length=l,LCe(e,t,n,a,!0),a("scalegroup");var u=a("text"),c=a("texttemplate");a("texttemplatefallback");var f;if(c||(f=a("textinfo",z6.isArrayOrTypedArray(u)?"text+percent":"percent")),a("hovertext"),a("hovertemplate"),a("hovertemplatefallback"),c||f&&f!=="none"){var v=a("textposition");mIt(e,t,n,a,v,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1});var g=Array.isArray(v)||v==="auto",p=g||v==="outside";p&&a("automargin"),(v==="inside"||v==="auto"||Array.isArray(v))&&a("insidetextorientation")}else f==="none"&&a("textposition","none");gIt(t,n,a);var x=a("hole"),_=a("title.text");if(_){var y=a("title.position",x?"middle center":"top center");!x&&y==="middle center"&&(t.title.position="top center"),z6.coerceFont(a,"title.font",n.font)}a("sort"),a("direction"),a("rotation"),a("pull")}PCe.exports={handleLabelsAndValues:CCe,handleMarkerDefaults:LCe,supplyDefaults:xIt}});var L9=fe((N2r,FCe)=>{"use strict";FCe.exports={hiddenlabels:{valType:"data_array",editType:"calc"},piecolorway:{valType:"colorlist",editType:"calc"},extendpiecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var RCe=fe((U2r,DCe)=>{"use strict";var _It=Xt(),bIt=L9();DCe.exports=function(t,r){function n(a,i){return _It.coerce(t,r,bIt,a,i)}n("hiddenlabels"),n("piecolorway",r.colorway),n("extendpiecolors")}});var Lw=fe((V2r,qCe)=>{"use strict";var wIt=aa(),Cw=ni(),TIt={};function AIt(e,t){var r=[],n=e._fullLayout,a=n.hiddenlabels||[],i=t.labels,o=t.marker.colors||[],s=t.values,l=t._length,u=t._hasValues&&l,c,f;if(t.dlabel)for(i=new Array(l),c=0;c=0});var S=t.type==="funnelarea"?x:t.sort;return S&&r.sort(function(L,w){return w.v-L.v}),r[0]&&(r[0].vTotal=p),r}function ICe(e){return function(r,n){if(!r||!Cw.isValid(r))return!1;let a=Cw.rgbaString(r);return e[n]||(e[n]=a),a}}function MIt(e,t){var r=(t||{}).type;r||(r="pie");var n=e._fullLayout,a=e.calcdata,i=n[r+"colorway"],o=n["_"+r+"colormap"];n["extend"+r+"colors"]&&(i=zCe(i,TIt));for(var s=0,l=0;l{"use strict";var SIt=Sd().appendArrayMultiPointValues;BCe.exports=function(t,r){var n={curveNumber:r.index,pointNumbers:t.pts,data:r._input,fullData:r,label:t.label,color:t.color,value:t.v,percent:t.percent,text:t.text,bbox:t.bbox,v:t.v};return t.pts.length===1&&(n.pointNumber=n.i=t.pts[0]),SIt(n,r,t.pts),r.type==="funnelarea"&&(delete n.v,delete n.i),n}});var R9=fe((H2r,o7e)=>{"use strict";var u0=xi(),EIt=Hs(),P9=kl(),jCe=ni(),_g=ea(),Qf=Xt(),kIt=Qf.strScale,NCe=Qf.strTranslate,vW=as(),WCe=kh(),CIt=WCe.recordMinTextSize,LIt=WCe.clearMinTextSize,YCe=Im().TEXTPAD,Aa=Sm(),F9=OCe(),UCe=Xt().isValidTextValue;function PIt(e,t){var r=e._context.staticPlot,n=e._fullLayout,a=n._size;LIt("pie",n),$Ce(t,e),n7e(t,a);var i=Qf.makeTraceGroups(n._pielayer,t,"trace").each(function(o){var s=u0.select(this),l=o[0],u=l.trace;NIt(o),s.attr("stroke-linejoin","round"),s.each(function(){var c=u0.select(this).selectAll("g.slice").data(o);c.enter().append("g").classed("slice",!0),c.exit().remove();var f=[[[],[]],[[],[]]],v=!1;c.each(function(S,L){if(S.hidden){u0.select(this).selectAll("path,g").remove();return}S.pointNumber=S.i,S.curveNumber=u.index,f[S.pxmid[1]<0?0:1][S.pxmid[0]<0?0:1].push(S);var w=l.cx,A=l.cy,T=u0.select(this),m=T.selectAll("path.surface").data([S]);if(m.enter().append("path").classed("surface",!0).style({"pointer-events":r?"none":"all"}),T.call(XCe,e,o),u.pull){var F=+Aa.castOption(u.pull,S.pts)||0;F>0&&(w+=F*S.pxmid[0],A+=F*S.pxmid[1])}S.cxFinal=w,S.cyFinal=A;function E(q,U,J,ee){var ce=ee*(U[0]-q[0]),ye=ee*(U[1]-q[1]);return"a"+ee*l.r+","+ee*l.r+" 0 "+S.largeArc+(J?" 1 ":" 0 ")+ce+","+ye}var I=u.hole;if(S.v===l.vTotal){var R="M"+(w+S.px0[0])+","+(A+S.px0[1])+E(S.px0,S.pxmid,!0,1)+E(S.pxmid,S.px0,!0,1)+"Z";I?m.attr("d","M"+(w+I*S.px0[0])+","+(A+I*S.px0[1])+E(S.px0,S.pxmid,!1,I)+E(S.pxmid,S.px0,!1,I)+"Z"+R):m.attr("d",R)}else{var B=E(S.px0,S.px1,!0,1);if(I){var O=1-I;m.attr("d","M"+(w+I*S.px1[0])+","+(A+I*S.px1[1])+E(S.px1,S.px0,!1,I)+"l"+O*S.px0[0]+","+O*S.px0[1]+B+"Z")}else m.attr("d","M"+w+","+A+"l"+S.px0[0]+","+S.px0[1]+B+"Z")}i7e(e,S,l);var V=Aa.castOption(u.textposition,S.pts),j=T.selectAll("g.slicetext").data(S.text&&V!=="none"?[0]:[]);j.enter().append("g").classed("slicetext",!0),j.exit().remove(),j.each(function(){var q=Qf.ensureSingle(u0.select(this),"text","",function(K){K.attr("data-notex",1)}),U=Qf.ensureUniformFontSize(e,V==="outside"?DIt(u,S,n.font):ZCe(u,S,n.font));q.text(S.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(_g.font,U).call(vW.convertToTspans,e);var J=_g.bBox(q.node()),ee;if(V==="outside")ee=HCe(J,S);else if(ee=KCe(J,S,l),V==="auto"&&ee.scale<1){var ce=Qf.ensureUniformFontSize(e,u.outsidetextfont);q.call(_g.font,ce),J=_g.bBox(q.node()),ee=HCe(J,S)}var ye=ee.textPosAngle,xe=ye===void 0?S.pxmid:D9(l.r,ye);if(ee.targetX=w+xe[0]*ee.rCenter+(ee.x||0),ee.targetY=A+xe[1]*ee.rCenter+(ee.y||0),a7e(ee,J),ee.outside){var ue=ee.targetY;S.yLabelMin=ue-J.height/2,S.yLabelMid=ue,S.yLabelMax=ue+J.height/2,S.labelExtraX=0,S.labelExtraY=0,v=!0}ee.fontSize=U.size,CIt(u.type,ee,n),o[L].transform=ee,Qf.setTransormAndDisplay(q,ee)})});var g=u0.select(this).selectAll("g.titletext").data(u.title.text?[0]:[]);if(g.enter().append("g").classed("titletext",!0),g.exit().remove(),g.each(function(){var S=Qf.ensureSingle(u0.select(this),"text","",function(A){A.attr("data-notex",1)}),L=u.title.text;u._meta&&(L=Qf.templateString(L,u._meta)),S.text(L).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(_g.font,u.title.font).call(vW.convertToTspans,e);var w;u.title.position==="middle center"?w=zIt(l):w=t7e(l,a),S.attr("transform",NCe(w.x,w.y)+kIt(Math.min(1,w.scale))+NCe(w.tx,w.ty))}),v&&BIt(f,u),FIt(c,u),v&&u.automargin){var p=_g.bBox(s.node()),x=u.domain,_=a.w*(x.x[1]-x.x[0]),y=a.h*(x.y[1]-x.y[0]),C=(.5*_-l.r)/a.w,k=(.5*y-l.r)/a.h;EIt.autoMargin(e,"pie."+u.uid+".automargin",{xl:x.x[0]-C,xr:x.x[1]+C,yb:x.y[0]-k,yt:x.y[1]+k,l:Math.max(l.cx-l.r-p.left,0),r:Math.max(p.right-(l.cx+l.r),0),b:Math.max(p.bottom-(l.cy+l.r),0),t:Math.max(l.cy-l.r-p.top,0),pad:5})}})});setTimeout(function(){i.selectAll("tspan").each(function(){var o=u0.select(this);o.attr("dy")&&o.attr("dy",o.attr("dy"))})},0)}function FIt(e,t){e.each(function(r){var n=u0.select(this);if(!r.labelExtraX&&!r.labelExtraY){n.select("path.textline").remove();return}var a=n.select("g.slicetext text");r.transform.targetX+=r.labelExtraX,r.transform.targetY+=r.labelExtraY,Qf.setTransormAndDisplay(a,r.transform);var i=r.cxFinal+r.pxmid[0],o=r.cyFinal+r.pxmid[1],s="M"+i+","+o,l=(r.yLabelMax-r.yLabelMin)*(r.pxmid[0]<0?-1:1)/4;if(r.labelExtraX){var u=r.labelExtraX*r.pxmid[1]/r.pxmid[0],c=r.yLabelMid+r.labelExtraY-(r.cyFinal+r.pxmid[1]);Math.abs(u)>Math.abs(c)?s+="l"+c*r.pxmid[0]/r.pxmid[1]+","+c+"H"+(i+r.labelExtraX+l):s+="l"+r.labelExtraX+","+u+"v"+(c-u)+"h"+l}else s+="V"+(r.yLabelMid+r.labelExtraY)+"h"+l;Qf.ensureSingle(n,"path","textline").call(jCe.stroke,t.outsidetextfont.color).attr({"stroke-width":Math.min(2,t.outsidetextfont.size/8),d:s,fill:"none"})})}function XCe(e,t,r){var n=r[0],a=n.cx,i=n.cy,o=n.trace,s=o.type==="funnelarea";"_hasHoverLabel"in o||(o._hasHoverLabel=!1),"_hasHoverEvent"in o||(o._hasHoverEvent=!1),e.on("mouseover",function(l){var u=t._fullLayout,c=t._fullData[o.index];if(!(t._dragging||u.hovermode===!1)){var f=c.hoverinfo;if(Array.isArray(f)&&(f=P9.castHoverinfo({hoverinfo:[Aa.castOption(f,l.pts)],_module:o._module},u,0)),f==="all"&&(f="label+text+value+percent+name"),c.hovertemplate||f!=="none"&&f!=="skip"&&f){var v=l.rInscribed||0,g=a+l.pxmid[0]*(1-v),p=i+l.pxmid[1]*(1-v),x=u.separators,_=[];if(f&&f.indexOf("label")!==-1&&_.push(l.label),l.text=Aa.castOption(c.hovertext||c.text,l.pts),f&&f.indexOf("text")!==-1){var y=l.text;Qf.isValidTextValue(y)&&_.push(y)}l.value=l.v,l.valueLabel=Aa.formatPieValue(l.v,x),f&&f.indexOf("value")!==-1&&_.push(l.valueLabel),l.percent=l.v/n.vTotal,l.percentLabel=Aa.formatPiePercent(l.percent,x),f&&f.indexOf("percent")!==-1&&_.push(l.percentLabel);var C=c.hoverlabel,k=C.font,S=[];P9.loneHover({trace:o,x0:g-v*n.r,x1:g+v*n.r,y:p,_x0:s?a+l.TL[0]:g-v*n.r,_x1:s?a+l.TR[0]:g+v*n.r,_y0:s?i+l.TL[1]:p-v*n.r,_y1:s?i+l.BL[1]:p+v*n.r,text:_.join("
"),name:c.hovertemplate||f.indexOf("name")!==-1?c.name:void 0,idealAlign:l.pxmid[0]<0?"left":"right",color:Aa.castOption(C.bgcolor,l.pts)||l.color,borderColor:Aa.castOption(C.bordercolor,l.pts),fontFamily:Aa.castOption(k.family,l.pts),fontSize:Aa.castOption(k.size,l.pts),fontColor:Aa.castOption(k.color,l.pts),nameLength:Aa.castOption(C.namelength,l.pts),textAlign:Aa.castOption(C.align,l.pts),hovertemplate:Aa.castOption(c.hovertemplate,l.pts),hovertemplateLabels:l,eventData:[F9(l,c)]},{container:u._hoverlayer.node(),outerContainer:u._paper.node(),gd:t,inOut_bbox:S}),l.bbox=S[0],o._hasHoverLabel=!0}o._hasHoverEvent=!0,t.emit("plotly_hover",{points:[F9(l,c)],event:u0.event})}}),e.on("mouseout",function(l){var u=t._fullLayout,c=t._fullData[o.index],f=u0.select(this).datum();o._hasHoverEvent&&(l.originalEvent=u0.event,t.emit("plotly_unhover",{points:[F9(f,c)],event:u0.event}),o._hasHoverEvent=!1),o._hasHoverLabel&&(P9.loneUnhover(u._hoverlayer.node()),o._hasHoverLabel=!1)}),e.on("click",function(l){var u=t._fullLayout,c=t._fullData[o.index];t._dragging||u.hovermode===!1||(t._hoverdata=[F9(l,c)],P9.click(t,u0.event))})}function DIt(e,t,r){var n=Aa.castOption(e.outsidetextfont.color,t.pts)||Aa.castOption(e.textfont.color,t.pts)||r.color,a=Aa.castOption(e.outsidetextfont.family,t.pts)||Aa.castOption(e.textfont.family,t.pts)||r.family,i=Aa.castOption(e.outsidetextfont.size,t.pts)||Aa.castOption(e.textfont.size,t.pts)||r.size,o=Aa.castOption(e.outsidetextfont.weight,t.pts)||Aa.castOption(e.textfont.weight,t.pts)||r.weight,s=Aa.castOption(e.outsidetextfont.style,t.pts)||Aa.castOption(e.textfont.style,t.pts)||r.style,l=Aa.castOption(e.outsidetextfont.variant,t.pts)||Aa.castOption(e.textfont.variant,t.pts)||r.variant,u=Aa.castOption(e.outsidetextfont.textcase,t.pts)||Aa.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Aa.castOption(e.outsidetextfont.lineposition,t.pts)||Aa.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Aa.castOption(e.outsidetextfont.shadow,t.pts)||Aa.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n,family:a,size:i,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function ZCe(e,t,r){var n=Aa.castOption(e.insidetextfont.color,t.pts);!n&&e._input.textfont&&(n=Aa.castOption(e._input.textfont.color,t.pts));var a=Aa.castOption(e.insidetextfont.family,t.pts)||Aa.castOption(e.textfont.family,t.pts)||r.family,i=Aa.castOption(e.insidetextfont.size,t.pts)||Aa.castOption(e.textfont.size,t.pts)||r.size,o=Aa.castOption(e.insidetextfont.weight,t.pts)||Aa.castOption(e.textfont.weight,t.pts)||r.weight,s=Aa.castOption(e.insidetextfont.style,t.pts)||Aa.castOption(e.textfont.style,t.pts)||r.style,l=Aa.castOption(e.insidetextfont.variant,t.pts)||Aa.castOption(e.textfont.variant,t.pts)||r.variant,u=Aa.castOption(e.insidetextfont.textcase,t.pts)||Aa.castOption(e.textfont.textcase,t.pts)||r.textcase,c=Aa.castOption(e.insidetextfont.lineposition,t.pts)||Aa.castOption(e.textfont.lineposition,t.pts)||r.lineposition,f=Aa.castOption(e.insidetextfont.shadow,t.pts)||Aa.castOption(e.textfont.shadow,t.pts)||r.shadow;return{color:n||jCe.contrast(t.color),family:a,size:i,weight:o,style:s,variant:l,textcase:u,lineposition:c,shadow:f}}function $Ce(e,t){for(var r,n,a=0;a=-4;C-=2)y(Math.PI*C,"tan");for(C=4;C>=-4;C-=2)y(Math.PI*(C+1),"tan")}if(f||g){for(C=4;C>=-4;C-=2)y(Math.PI*(C+1.5),"rad");for(C=4;C>=-4;C-=2)y(Math.PI*(C+.5),"rad")}}if(s||p||f){var k=Math.sqrt(e.width*e.width+e.height*e.height);if(_={scale:a*n*2/k,rCenter:1-a,rotate:0},_.textPosAngle=(t.startangle+t.stopangle)/2,_.scale>=1)return _;x.push(_)}(p||g)&&(_=VCe(e,n,o,l,u),_.textPosAngle=(t.startangle+t.stopangle)/2,x.push(_)),(p||v)&&(_=GCe(e,n,o,l,u),_.textPosAngle=(t.startangle+t.stopangle)/2,x.push(_));for(var S=0,L=0,w=0;w=1)break}return x[S]}function RIt(e,t){var r=e.startangle,n=e.stopangle;return r>t&&t>n||r0?1:-1)/2,y:i/(1+r*r/(n*n)),outside:!0}}function zIt(e){var t=Math.sqrt(e.titleBox.width*e.titleBox.width+e.titleBox.height*e.titleBox.height);return{x:e.cx,y:e.cy,scale:e.trace.hole*e.r*2/t,tx:0,ty:-e.titleBox.height/2+e.trace.title.font.size}}function t7e(e,t){var r=1,n=1,a,i=e.trace,o={x:e.cx,y:e.cy},s={tx:0,ty:0};s.ty+=i.title.font.size,a=r7e(i),i.title.position.indexOf("top")!==-1?(o.y-=(1+a)*e.r,s.ty-=e.titleBox.height):i.title.position.indexOf("bottom")!==-1&&(o.y+=(1+a)*e.r);var l=qIt(e.r,e.trace.aspectratio),u=t.w*(i.domain.x[1]-i.domain.x[0])/2;return i.title.position.indexOf("left")!==-1?(u=u+l,o.x-=(1+a)*l,s.tx+=e.titleBox.width/2):i.title.position.indexOf("center")!==-1?u*=2:i.title.position.indexOf("right")!==-1&&(u=u+l,o.x+=(1+a)*l,s.tx-=e.titleBox.width/2),r=u/e.titleBox.width,n=pW(e,t)/e.titleBox.height,{x:o.x,y:o.y,scale:Math.min(r,n),tx:s.tx,ty:s.ty}}function qIt(e,t){return e/(t===void 0?1:t)}function pW(e,t){var r=e.trace,n=t.h*(r.domain.y[1]-r.domain.y[0]);return Math.min(e.titleBox.height,n/2)}function r7e(e){var t=e.pull;if(!t)return 0;var r;if(Qf.isArrayOrTypedArray(t))for(t=0,r=0;rt&&(t=e.pull[r]);return t}function BIt(e,t){var r,n,a,i,o,s,l,u,c,f,v,g,p;function x(k,S){return k.pxmid[1]-S.pxmid[1]}function _(k,S){return S.pxmid[1]-k.pxmid[1]}function y(k,S){S||(S={});var L=S.labelExtraY+(n?S.yLabelMax:S.yLabelMin),w=n?k.yLabelMin:k.yLabelMax,A=n?k.yLabelMax:k.yLabelMin,T=k.cyFinal+o(k.px0[1],k.px1[1]),m=L-w,F,E,I,R,B,O;if(m*l>0&&(k.labelExtraY=m),!!Qf.isArrayOrTypedArray(t.pull))for(E=0;E=(Aa.castOption(t.pull,I.pts)||0))&&((k.pxmid[1]-I.pxmid[1])*l>0?(R=I.cyFinal+o(I.px0[1],I.px1[1]),m=R-w-k.labelExtraY,m*l>0&&(k.labelExtraY+=m)):(A+k.labelExtraY-T)*l>0&&(F=3*s*Math.abs(E-f.indexOf(k)),B=I.cxFinal+i(I.px0[0],I.px1[0]),O=B+F-(k.cxFinal+k.pxmid[0])-k.labelExtraX,O*s>0&&(k.labelExtraX+=O)))}for(n=0;n<2;n++)for(a=n?x:_,o=n?Math.max:Math.min,l=n?1:-1,r=0;r<2;r++){for(i=r?Math.max:Math.min,s=r?1:-1,u=e[n][r],u.sort(a),c=e[1-n][r],f=c.concat(u),g=[],v=0;v1?(u=r.r,c=u/a.aspectratio):(c=r.r,u=c*a.aspectratio),u*=(1+a.baseratio)/2,l=u*c}o=Math.min(o,l/r.vTotal)}for(n=0;nt.vTotal/2?1:0,u.halfangle=Math.PI*Math.min(u.v/t.vTotal,.5),u.ring=1-n.hole,u.rInscribed=IIt(u,t))}function D9(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}function i7e(e,t,r){var n=e._fullLayout,a=r.trace,i=a.texttemplate,o=a.textinfo;if(!i&&o&&o!=="none"){var s=o.split("+"),l=function(S){return s.indexOf(S)!==-1},u=l("label"),c=l("text"),f=l("value"),v=l("percent"),g=n.separators,p;if(p=u?[t.label]:[],c){var x=Aa.getFirstFilled(a.text,t.pts);UCe(x)&&p.push(x)}f&&p.push(Aa.formatPieValue(t.v,g)),v&&p.push(Aa.formatPiePercent(t.v/r.vTotal,g)),t.text=p.join("
")}function _(S){return{label:S.label,value:S.v,valueLabel:Aa.formatPieValue(S.v,n.separators),percent:S.v/r.vTotal,percentLabel:Aa.formatPiePercent(S.v/r.vTotal,n.separators),color:S.color,text:S.text,customdata:Qf.castOption(a,S.i,"customdata")}}if(i){var y=Qf.castOption(a,t.i,"texttemplate");if(!y)t.text="";else{var C=_(t),k=Aa.getFirstFilled(a.text,t.pts);(UCe(k)||k==="")&&(C.text=k),t.text=Qf.texttemplateString({data:[C,a._meta],fallback:a.texttemplatefallback,labels:C,locale:e._fullLayout._d3locale,template:y})}}}function a7e(e,t){var r=e.rotate*Math.PI/180,n=Math.cos(r),a=Math.sin(r),i=(t.left+t.right)/2,o=(t.top+t.bottom)/2;e.textX=i*n-o*a,e.textY=i*a+o*n,e.noCenter=!0}o7e.exports={plot:PIt,formatSliceLabel:i7e,transformInsideText:KCe,determineInsideTextFont:ZCe,positionTitleOutside:t7e,prerenderTitles:$Ce,layoutAreas:n7e,attachFxHandlers:XCe,computeTransform:a7e}});var u7e=fe((j2r,l7e)=>{"use strict";var s7e=xi(),UIt=Jb(),VIt=kh().resizeText;l7e.exports=function(t){var r=t._fullLayout._pielayer.selectAll(".trace");VIt(t,r,"pie"),r.each(function(n){var a=n[0],i=a.trace,o=s7e.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(s){s7e.select(this).call(UIt,s,i,t)})})}});var f7e=fe(Pw=>{"use strict";var c7e=Hs();Pw.name="pie";Pw.plot=function(e,t,r,n){c7e.plotBasePlot(Pw.name,e,t,r,n)};Pw.clean=function(e,t,r,n){c7e.cleanBasePlot(Pw.name,e,t,r,n)}});var d7e=fe((Y2r,h7e)=>{"use strict";h7e.exports={attributes:U2(),supplyDefaults:V2().supplyDefaults,supplyLayoutDefaults:RCe(),layoutAttributes:L9(),calc:Lw().calc,crossTraceCalc:Lw().crossTraceCalc,plot:R9().plot,style:u7e(),styleOne:Jb(),moduleType:"trace",name:"pie",basePlotModule:f7e(),categories:["pie-like","pie","showLegend"],meta:{}}});var p7e=fe((X2r,v7e)=>{"use strict";v7e.exports=d7e()});var m7e=fe(Fw=>{"use strict";var g7e=Hs();Fw.name="sunburst";Fw.plot=function(e,t,r,n){g7e.plotBasePlot(Fw.name,e,t,r,n)};Fw.clean=function(e,t,r,n){g7e.cleanBasePlot(Fw.name,e,t,r,n)}});var gW=fe(($2r,y7e)=>{"use strict";y7e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"linear",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"]}});var B6=fe((K2r,b7e)=>{"use strict";var GIt=Ho(),{hovertemplateAttrs:HIt,texttemplateAttrs:jIt,templatefallbackAttrs:x7e}=Oo(),WIt=_s(),YIt=nl().attributes,bg=U2(),_7e=gW(),q6=ta().extendFlat,XIt=Uc().pattern;b7e.exports={labels:{valType:"data_array",editType:"calc"},parents:{valType:"data_array",editType:"calc"},values:{valType:"data_array",editType:"calc"},branchvalues:{valType:"enumerated",values:["remainder","total"],dflt:"remainder",editType:"calc"},count:{valType:"flaglist",flags:["branches","leaves"],dflt:"leaves",editType:"calc"},level:{valType:"any",editType:"plot",anim:!0},maxdepth:{valType:"integer",editType:"plot",dflt:-1},marker:q6({colors:{valType:"data_array",editType:"calc"},line:{color:q6({},bg.marker.line.color,{dflt:null}),width:q6({},bg.marker.line.width,{dflt:1}),editType:"calc"},pattern:XIt,editType:"calc"},WIt("marker",{colorAttr:"colors",anim:!1})),leaf:{opacity:{valType:"number",editType:"style",min:0,max:1},editType:"plot"},text:bg.text,textinfo:{valType:"flaglist",flags:["label","text","value","current path","percent root","percent entry","percent parent"],extras:["none"],editType:"plot"},texttemplate:jIt({editType:"plot"},{keys:_7e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:x7e({editType:"plot"}),hovertext:bg.hovertext,hoverinfo:q6({},GIt.hoverinfo,{flags:["label","text","value","name","current path","percent root","percent entry","percent parent"],dflt:"label+text+value+name"}),hovertemplate:HIt({},{keys:_7e.eventDataKeys}),hovertemplatefallback:x7e(),textfont:bg.textfont,insidetextorientation:bg.insidetextorientation,insidetextfont:bg.insidetextfont,outsidetextfont:q6({},bg.outsidetextfont,{}),rotation:{valType:"angle",dflt:0,editType:"plot"},sort:bg.sort,root:{color:{valType:"color",editType:"calc",dflt:"rgba(0,0,0,0)"},editType:"calc"},domain:YIt({name:"sunburst",trace:!0,editType:"calc"})}});var mW=fe((J2r,w7e)=>{"use strict";w7e.exports={sunburstcolorway:{valType:"colorlist",editType:"calc"},extendsunburstcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var S7e=fe((Q2r,M7e)=>{"use strict";var T7e=Xt(),ZIt=B6(),$It=nl().defaults,KIt=z0().handleText,JIt=V2().handleMarkerDefaults,A7e=js(),QIt=A7e.hasColorscale,ezt=A7e.handleDefaults;M7e.exports=function(t,r,n,a){function i(v,g){return T7e.coerce(t,r,ZIt,v,g)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),JIt(t,r,a,i);var u=r._hasColorscale=QIt(t,"marker","colors")||(t.marker||{}).coloraxis;u&&ezt(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",u?1:.7);var c=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",T7e.isArrayOrTypedArray(c)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f="auto";KIt(t,r,a,i,f,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("insidetextorientation"),i("sort"),i("rotation"),i("root.color"),$It(r,a,i),r._length=null}});var k7e=fe((e_r,E7e)=>{"use strict";var tzt=Xt(),rzt=mW();E7e.exports=function(t,r){function n(a,i){return tzt.coerce(t,r,rzt,a,i)}n("sunburstcolorway",r.colorway),n("extendsunburstcolors")}});var O6=fe((I9,C7e)=>{(function(e,t){typeof I9=="object"&&typeof C7e!="undefined"?t(I9):(e=e||self,t(e.d3=e.d3||{}))})(I9,function(e){"use strict";function t(wt,Tt){return wt.parent===Tt.parent?1:2}function r(wt){return wt.reduce(n,0)/wt.length}function n(wt,Tt){return wt+Tt.x}function a(wt){return 1+wt.reduce(i,0)}function i(wt,Tt){return Math.max(wt,Tt.y)}function o(wt){for(var Tt;Tt=wt.children;)wt=Tt[0];return wt}function s(wt){for(var Tt;Tt=wt.children;)wt=Tt[Tt.length-1];return wt}function l(){var wt=t,Tt=1,Mt=1,Lt=!1;function ft(kt){var rr,pr=0;kt.eachAfter(function(Fr){var Zr=Fr.children;Zr?(Fr.x=r(Zr),Fr.y=a(Zr)):(Fr.x=rr?pr+=wt(Fr,rr):0,Fr.y=0,rr=Fr)});var Kr=o(kt),Nr=s(kt),dn=Kr.x-wt(Kr,Nr)/2,xr=Nr.x+wt(Nr,Kr)/2;return kt.eachAfter(Lt?function(Fr){Fr.x=(Fr.x-kt.x)*Tt,Fr.y=(kt.y-Fr.y)*Mt}:function(Fr){Fr.x=(Fr.x-dn)/(xr-dn)*Tt,Fr.y=(1-(kt.y?Fr.y/kt.y:1))*Mt})}return ft.separation=function(kt){return arguments.length?(wt=kt,ft):wt},ft.size=function(kt){return arguments.length?(Lt=!1,Tt=+kt[0],Mt=+kt[1],ft):Lt?null:[Tt,Mt]},ft.nodeSize=function(kt){return arguments.length?(Lt=!0,Tt=+kt[0],Mt=+kt[1],ft):Lt?[Tt,Mt]:null},ft}function u(wt){var Tt=0,Mt=wt.children,Lt=Mt&&Mt.length;if(!Lt)Tt=1;else for(;--Lt>=0;)Tt+=Mt[Lt].value;wt.value=Tt}function c(){return this.eachAfter(u)}function f(wt){var Tt=this,Mt,Lt=[Tt],ft,kt,rr;do for(Mt=Lt.reverse(),Lt=[];Tt=Mt.pop();)if(wt(Tt),ft=Tt.children,ft)for(kt=0,rr=ft.length;kt=0;--ft)Mt.push(Lt[ft]);return this}function g(wt){for(var Tt=this,Mt=[Tt],Lt=[],ft,kt,rr;Tt=Mt.pop();)if(Lt.push(Tt),ft=Tt.children,ft)for(kt=0,rr=ft.length;kt=0;)Mt+=Lt[ft].value;Tt.value=Mt})}function x(wt){return this.eachBefore(function(Tt){Tt.children&&Tt.children.sort(wt)})}function _(wt){for(var Tt=this,Mt=y(Tt,wt),Lt=[Tt];Tt!==Mt;)Tt=Tt.parent,Lt.push(Tt);for(var ft=Lt.length;wt!==Mt;)Lt.splice(ft,0,wt),wt=wt.parent;return Lt}function y(wt,Tt){if(wt===Tt)return wt;var Mt=wt.ancestors(),Lt=Tt.ancestors(),ft=null;for(wt=Mt.pop(),Tt=Lt.pop();wt===Tt;)ft=wt,wt=Mt.pop(),Tt=Lt.pop();return ft}function C(){for(var wt=this,Tt=[wt];wt=wt.parent;)Tt.push(wt);return Tt}function k(){var wt=[];return this.each(function(Tt){wt.push(Tt)}),wt}function S(){var wt=[];return this.eachBefore(function(Tt){Tt.children||wt.push(Tt)}),wt}function L(){var wt=this,Tt=[];return wt.each(function(Mt){Mt!==wt&&Tt.push({source:Mt.parent,target:Mt})}),Tt}function w(wt,Tt){var Mt=new E(wt),Lt=+wt.value&&(Mt.value=wt.value),ft,kt=[Mt],rr,pr,Kr,Nr;for(Tt==null&&(Tt=T);ft=kt.pop();)if(Lt&&(ft.value=+ft.data.value),(pr=Tt(ft.data))&&(Nr=pr.length))for(ft.children=new Array(Nr),Kr=Nr-1;Kr>=0;--Kr)kt.push(rr=ft.children[Kr]=new E(pr[Kr])),rr.parent=ft,rr.depth=ft.depth+1;return Mt.eachBefore(F)}function A(){return w(this).eachBefore(m)}function T(wt){return wt.children}function m(wt){wt.data=wt.data.data}function F(wt){var Tt=0;do wt.height=Tt;while((wt=wt.parent)&&wt.height<++Tt)}function E(wt){this.data=wt,this.depth=this.height=0,this.parent=null}E.prototype=w.prototype={constructor:E,count:c,each:f,eachAfter:g,eachBefore:v,sum:p,sort:x,path:_,ancestors:C,descendants:k,leaves:S,links:L,copy:A};var I=Array.prototype.slice;function R(wt){for(var Tt=wt.length,Mt,Lt;Tt;)Lt=Math.random()*Tt--|0,Mt=wt[Tt],wt[Tt]=wt[Lt],wt[Lt]=Mt;return wt}function B(wt){for(var Tt=0,Mt=(wt=R(I.call(wt))).length,Lt=[],ft,kt;Tt0&&Mt*Mt>Lt*Lt+ft*ft}function q(wt,Tt){for(var Mt=0;MtKr?(ft=(Nr+Kr-kt)/(2*Nr),pr=Math.sqrt(Math.max(0,Kr/Nr-ft*ft)),Mt.x=wt.x-ft*Lt-pr*rr,Mt.y=wt.y-ft*rr+pr*Lt):(ft=(Nr+kt-Kr)/(2*Nr),pr=Math.sqrt(Math.max(0,kt/Nr-ft*ft)),Mt.x=Tt.x+ft*Lt-pr*rr,Mt.y=Tt.y+ft*rr+pr*Lt)):(Mt.x=Tt.x+Mt.r,Mt.y=Tt.y)}function xe(wt,Tt){var Mt=wt.r+Tt.r-1e-6,Lt=Tt.x-wt.x,ft=Tt.y-wt.y;return Mt>0&&Mt*Mt>Lt*Lt+ft*ft}function ue(wt){var Tt=wt._,Mt=wt.next._,Lt=Tt.r+Mt.r,ft=(Tt.x*Mt.r+Mt.x*Tt.r)/Lt,kt=(Tt.y*Mt.r+Mt.y*Tt.r)/Lt;return ft*ft+kt*kt}function K(wt){this._=wt,this.next=null,this.previous=null}function _e(wt){if(!(ft=wt.length))return 0;var Tt,Mt,Lt,ft,kt,rr,pr,Kr,Nr,dn,xr;if(Tt=wt[0],Tt.x=0,Tt.y=0,!(ft>1))return Tt.r;if(Mt=wt[1],Tt.x=-Mt.r,Mt.x=Tt.r,Mt.y=0,!(ft>2))return Tt.r+Mt.r;ye(Mt,Tt,Lt=wt[2]),Tt=new K(Tt),Mt=new K(Mt),Lt=new K(Lt),Tt.next=Lt.previous=Mt,Mt.next=Tt.previous=Lt,Lt.next=Mt.previous=Tt;e:for(pr=3;pr0)throw new Error("cycle");return pr}return Mt.id=function(Lt){return arguments.length?(wt=pe(Lt),Mt):wt},Mt.parentId=function(Lt){return arguments.length?(Tt=pe(Lt),Mt):Tt},Mt}function Te(wt,Tt){return wt.parent===Tt.parent?1:2}function Ve(wt){var Tt=wt.children;return Tt?Tt[0]:wt.t}function $e(wt){var Tt=wt.children;return Tt?Tt[Tt.length-1]:wt.t}function ot(wt,Tt,Mt){var Lt=Mt/(Tt.i-wt.i);Tt.c-=Lt,Tt.s+=Mt,wt.c+=Lt,Tt.z+=Mt,Tt.m+=Mt}function tt(wt){for(var Tt=0,Mt=0,Lt=wt.children,ft=Lt.length,kt;--ft>=0;)kt=Lt[ft],kt.z+=Tt,kt.m+=Tt,Tt+=kt.s+(Mt+=kt.c)}function nt(wt,Tt,Mt){return wt.a.parent===Tt.parent?wt.a:Mt}function We(wt,Tt){this._=wt,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=Tt}We.prototype=Object.create(E.prototype);function mt(wt){for(var Tt=new We(wt,0),Mt,Lt=[Tt],ft,kt,rr,pr;Mt=Lt.pop();)if(kt=Mt._.children)for(Mt.children=new Array(pr=kt.length),rr=pr-1;rr>=0;--rr)Lt.push(ft=Mt.children[rr]=new We(kt[rr],rr)),ft.parent=Mt;return(Tt.parent=new We(null,0)).children=[Tt],Tt}function bt(){var wt=Te,Tt=1,Mt=1,Lt=null;function ft(Nr){var dn=mt(Nr);if(dn.eachAfter(kt),dn.parent.m=-dn.z,dn.eachBefore(rr),Lt)Nr.eachBefore(Kr);else{var xr=Nr,Fr=Nr,Zr=Nr;Nr.eachBefore(function(Qt){Qt.xFr.x&&(Fr=Qt),Qt.depth>Zr.depth&&(Zr=Qt)});var Cn=xr===Fr?1:wt(xr,Fr)/2,Dt=Cn-xr.x,At=Tt/(Fr.x+Cn+Dt),Vt=Mt/(Zr.depth||1);Nr.eachBefore(function(Qt){Qt.x=(Qt.x+Dt)*At,Qt.y=Qt.depth*Vt})}return Nr}function kt(Nr){var dn=Nr.children,xr=Nr.parent.children,Fr=Nr.i?xr[Nr.i-1]:null;if(dn){tt(Nr);var Zr=(dn[0].z+dn[dn.length-1].z)/2;Fr?(Nr.z=Fr.z+wt(Nr._,Fr._),Nr.m=Nr.z-Zr):Nr.z=Zr}else Fr&&(Nr.z=Fr.z+wt(Nr._,Fr._));Nr.parent.A=pr(Nr,Fr,Nr.parent.A||xr[0])}function rr(Nr){Nr._.x=Nr.z+Nr.parent.m,Nr.m+=Nr.parent.m}function pr(Nr,dn,xr){if(dn){for(var Fr=Nr,Zr=Nr,Cn=dn,Dt=Fr.parent.children[0],At=Fr.m,Vt=Zr.m,Qt=Cn.m,Ut=Dt.m,_r;Cn=$e(Cn),Fr=Ve(Fr),Cn&&Fr;)Dt=Ve(Dt),Zr=$e(Zr),Zr.a=Nr,_r=Cn.z+Qt-Fr.z-At+wt(Cn._,Fr._),_r>0&&(ot(nt(Cn,Nr,xr),Nr,_r),At+=_r,Vt+=_r),Qt+=Cn.m,At+=Fr.m,Ut+=Dt.m,Vt+=Zr.m;Cn&&!$e(Zr)&&(Zr.t=Cn,Zr.m+=Qt-Vt),Fr&&!Ve(Dt)&&(Dt.t=Fr,Dt.m+=At-Ut,xr=Nr)}return xr}function Kr(Nr){Nr.x*=Tt,Nr.y=Nr.depth*Mt}return ft.separation=function(Nr){return arguments.length?(wt=Nr,ft):wt},ft.size=function(Nr){return arguments.length?(Lt=!1,Tt=+Nr[0],Mt=+Nr[1],ft):Lt?null:[Tt,Mt]},ft.nodeSize=function(Nr){return arguments.length?(Lt=!0,Tt=+Nr[0],Mt=+Nr[1],ft):Lt?[Tt,Mt]:null},ft}function Yt(wt,Tt,Mt,Lt,ft){for(var kt=wt.children,rr,pr=-1,Kr=kt.length,Nr=wt.value&&(ft-Mt)/wt.value;++prQt&&(Qt=Nr),Jr=At*At*rn,Ut=Math.max(Qt/Jr,Jr/Vt),Ut>_r){At-=Nr;break}_r=Ut}rr.push(Kr={value:At,dice:Zr1?Lt:1)},Mt})(jt);function fr(){var wt=or,Tt=!1,Mt=1,Lt=1,ft=[0],kt=ie,rr=ie,pr=ie,Kr=ie,Nr=ie;function dn(Fr){return Fr.x0=Fr.y0=0,Fr.x1=Mt,Fr.y1=Lt,Fr.eachBefore(xr),ft=[0],Tt&&Fr.eachBefore(it),Fr}function xr(Fr){var Zr=ft[Fr.depth],Cn=Fr.x0+Zr,Dt=Fr.y0+Zr,At=Fr.x1-Zr,Vt=Fr.y1-Zr;At=Fr-1){var Qt=kt[xr];Qt.x0=Cn,Qt.y0=Dt,Qt.x1=At,Qt.y1=Vt;return}for(var Ut=Nr[xr],_r=Zr/2+Ut,rn=xr+1,Jr=Fr-1;rn>>1;Nr[qn]<_r?rn=qn+1:Jr=qn}_r-Nr[rn-1]Vt-Dt){var Ii=(Cn*Jn+At*ri)/Zr;dn(xr,rn,ri,Cn,Dt,Ii,Vt),dn(rn,Fr,Jn,Ii,Dt,At,Vt)}else{var Vi=(Dt*Jn+Vt*ri)/Zr;dn(xr,rn,ri,Cn,Dt,At,Vi),dn(rn,Fr,Jn,Cn,Vi,At,Vt)}}}function cr(wt,Tt,Mt,Lt,ft){(wt.depth&1?Yt:Oe)(wt,Tt,Mt,Lt,ft)}var Ct=(function wt(Tt){function Mt(Lt,ft,kt,rr,pr){if((Kr=Lt._squarify)&&Kr.ratio===Tt)for(var Kr,Nr,dn,xr,Fr=-1,Zr,Cn=Kr.length,Dt=Lt.value;++Fr1?Lt:1)},Mt})(jt);e.cluster=l,e.hierarchy=w,e.pack=be,e.packEnclose=B,e.packSiblings=ne,e.partition=ze,e.stratify=Ke,e.tree=bt,e.treemap=fr,e.treemapBinary=Ot,e.treemapDice=Oe,e.treemapResquarify=Ct,e.treemapSlice=Yt,e.treemapSliceDice=cr,e.treemapSquarify=or,Object.defineProperty(e,"__esModule",{value:!0})})});var U6=fe(N6=>{"use strict";var L7e=O6(),nzt=aa(),Dw=Xt(),izt=js().makeColorScaleFuncFromTrace,azt=Lw().makePullColorFn,ozt=Lw().generateExtendedColors,szt=js().calc,lzt=Wa().ALMOST_EQUAL,uzt={},czt={},fzt={};N6.calc=function(e,t){var r=e._fullLayout,n=t.ids,a=Dw.isArrayOrTypedArray(n),i=t.labels,o=t.parents,s=t.values,l=Dw.isArrayOrTypedArray(s),u=[],c={},f={},v=function(j,q){c[j]?c[j].push(q):c[j]=[q],f[q]=1},g=function(j){return j||typeof j=="number"},p=function(j){return!l||nzt(s[j])&&s[j]>=0},x,_,y;a?(x=Math.min(n.length,o.length),_=function(j){return g(n[j])&&p(j)},y=function(j){return String(n[j])}):(x=Math.min(i.length,o.length),_=function(j){return g(i[j])&&p(j)},y=function(j){return String(i[j])}),l&&(x=Math.min(x,s.length));for(var C=0;C1){for(var T=Dw.randstr(),m=0;m{});function b1(){}function D7e(){return this.rgb().formatHex()}function xzt(){return this.rgb().formatHex8()}function _zt(){return N7e(this).formatHsl()}function R7e(){return this.rgb().formatRgb()}function cy(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=hzt.exec(e))?(r=t[1].length,t=parseInt(t[1],16),r===6?I7e(t):r===3?new Xc(t>>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):r===8?q9(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):r===4?q9(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=dzt.exec(e))?new Xc(t[1],t[2],t[3],1):(t=vzt.exec(e))?new Xc(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=pzt.exec(e))?q9(t[1],t[2],t[3],t[4]):(t=gzt.exec(e))?q9(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=mzt.exec(e))?B7e(t[1],t[2]/100,t[3]/100,1):(t=yzt.exec(e))?B7e(t[1],t[2]/100,t[3]/100,t[4]):F7e.hasOwnProperty(e)?I7e(F7e[e]):e==="transparent"?new Xc(NaN,NaN,NaN,0):null}function I7e(e){return new Xc(e>>16&255,e>>8&255,e&255,1)}function q9(e,t,r,n){return n<=0&&(e=t=r=NaN),new Xc(e,t,r,n)}function G6(e){return e instanceof b1||(e=cy(e)),e?(e=e.rgb(),new Xc(e.r,e.g,e.b,e.opacity)):new Xc}function Iw(e,t,r,n){return arguments.length===1?G6(e):new Xc(e,t,r,n==null?1:n)}function Xc(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function z7e(){return`#${G2(this.r)}${G2(this.g)}${G2(this.b)}`}function bzt(){return`#${G2(this.r)}${G2(this.g)}${G2(this.b)}${G2((isNaN(this.opacity)?1:this.opacity)*255)}`}function q7e(){let e=O9(this.opacity);return`${e===1?"rgb(":"rgba("}${H2(this.r)}, ${H2(this.g)}, ${H2(this.b)}${e===1?")":`, ${e})`}`}function O9(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function H2(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function G2(e){return e=H2(e),(e<16?"0":"")+e.toString(16)}function B7e(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||r>=1?e=t=NaN:t<=0&&(e=NaN),new Mp(e,t,r,n)}function N7e(e){if(e instanceof Mp)return new Mp(e.h,e.s,e.l,e.opacity);if(e instanceof b1||(e=cy(e)),!e)return new Mp;if(e instanceof Mp)return e;e=e.rgb();var t=e.r/255,r=e.g/255,n=e.b/255,a=Math.min(t,r,n),i=Math.max(t,r,n),o=NaN,s=i-a,l=(i+a)/2;return s?(t===i?o=(r-n)/s+(r0&&l<1?0:o,new Mp(o,s,l,e.opacity)}function H6(e,t,r,n){return arguments.length===1?N7e(e):new Mp(e,t,r,n==null?1:n)}function Mp(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}function O7e(e){return e=(e||0)%360,e<0?e+360:e}function B9(e){return Math.max(0,Math.min(1,e||0))}function yW(e,t,r){return(e<60?t+(r-t)*e/60:e<180?r:e<240?t+(r-t)*(240-e)/60:t)*255}var uy,j2,Rw,V6,_1,hzt,dzt,vzt,pzt,gzt,mzt,yzt,F7e,N9=Co(()=>{z9();uy=.7,j2=1/uy,Rw="\\s*([+-]?\\d+)\\s*",V6="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",_1="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",hzt=/^#([0-9a-f]{3,8})$/,dzt=new RegExp(`^rgb\\(${Rw},${Rw},${Rw}\\)$`),vzt=new RegExp(`^rgb\\(${_1},${_1},${_1}\\)$`),pzt=new RegExp(`^rgba\\(${Rw},${Rw},${Rw},${V6}\\)$`),gzt=new RegExp(`^rgba\\(${_1},${_1},${_1},${V6}\\)$`),mzt=new RegExp(`^hsl\\(${V6},${_1},${_1}\\)$`),yzt=new RegExp(`^hsla\\(${V6},${_1},${_1},${V6}\\)$`),F7e={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};wg(b1,cy,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:D7e,formatHex:D7e,formatHex8:xzt,formatHsl:_zt,formatRgb:R7e,toString:R7e});wg(Xc,Iw,ly(b1,{brighter(e){return e=e==null?j2:Math.pow(j2,e),new Xc(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new Xc(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new Xc(H2(this.r),H2(this.g),H2(this.b),O9(this.opacity))},displayable(){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:z7e,formatHex:z7e,formatHex8:bzt,formatRgb:q7e,toString:q7e}));wg(Mp,H6,ly(b1,{brighter(e){return e=e==null?j2:Math.pow(j2,e),new Mp(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new Mp(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=this.h%360+(this.h<0)*360,t=isNaN(e)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*t,a=2*r-n;return new Xc(yW(e>=240?e-240:e+120,a,n),yW(e,a,n),yW(e<120?e+240:e-120,a,n),this.opacity)},clamp(){return new Mp(O7e(this.h),B9(this.s),B9(this.l),O9(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let e=O9(this.opacity);return`${e===1?"hsl(":"hsla("}${O7e(this.h)}, ${B9(this.s)*100}%, ${B9(this.l)*100}%${e===1?")":`, ${e})`}`}}))});var U9,V9,xW=Co(()=>{U9=Math.PI/180,V9=180/Math.PI});function W7e(e){if(e instanceof w1)return new w1(e.l,e.a,e.b,e.opacity);if(e instanceof Tg)return Y7e(e);e instanceof Xc||(e=G6(e));var t=TW(e.r),r=TW(e.g),n=TW(e.b),a=_W((.2225045*t+.7168786*r+.0606169*n)/V7e),i,o;return t===r&&r===n?i=o=a:(i=_W((.4360747*t+.3850649*r+.1430804*n)/U7e),o=_W((.0139322*t+.0971045*r+.7141733*n)/G7e)),new w1(116*a-16,500*(i-a),200*(a-o),e.opacity)}function qw(e,t,r,n){return arguments.length===1?W7e(e):new w1(e,t,r,n==null?1:n)}function w1(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function _W(e){return e>wzt?Math.pow(e,1/3):e/j7e+H7e}function bW(e){return e>zw?e*e*e:j7e*(e-H7e)}function wW(e){return 255*(e<=.0031308?12.92*e:1.055*Math.pow(e,1/2.4)-.055)}function TW(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function Tzt(e){if(e instanceof Tg)return new Tg(e.h,e.c,e.l,e.opacity);if(e instanceof w1||(e=W7e(e)),e.a===0&&e.b===0)return new Tg(NaN,0{z9();N9();xW();G9=18,U7e=.96422,V7e=1,G7e=.82521,H7e=4/29,zw=6/29,j7e=3*zw*zw,wzt=zw*zw*zw;wg(w1,qw,ly(b1,{brighter(e){return new w1(this.l+G9*(e==null?1:e),this.a,this.b,this.opacity)},darker(e){return new w1(this.l-G9*(e==null?1:e),this.a,this.b,this.opacity)},rgb(){var e=(this.l+16)/116,t=isNaN(this.a)?e:e+this.a/500,r=isNaN(this.b)?e:e-this.b/200;return t=U7e*bW(t),e=V7e*bW(e),r=G7e*bW(r),new Xc(wW(3.1338561*t-1.6168667*e-.4906146*r),wW(-.9787684*t+1.9161415*e+.033454*r),wW(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}}));wg(Tg,j6,ly(b1,{brighter(e){return new Tg(this.h,this.c,this.l+G9*(e==null?1:e),this.opacity)},darker(e){return new Tg(this.h,this.c,this.l-G9*(e==null?1:e),this.opacity)},rgb(){return Y7e(this).rgb()}}))});function Azt(e){if(e instanceof W2)return new W2(e.h,e.s,e.l,e.opacity);e instanceof Xc||(e=G6(e));var t=e.r/255,r=e.g/255,n=e.b/255,a=(K7e*n+Z7e*t-$7e*r)/(K7e+Z7e-$7e),i=n-a,o=(W6*(r-a)-MW*i)/H9,s=Math.sqrt(o*o+i*i)/(W6*a*(1-a)),l=s?Math.atan2(o,i)*V9-120:NaN;return new W2(l<0?l+360:l,s,a,e.opacity)}function Bw(e,t,r,n){return arguments.length===1?Azt(e):new W2(e,t,r,n==null?1:n)}function W2(e,t,r,n){this.h=+e,this.s=+t,this.l=+r,this.opacity=+n}var J7e,AW,MW,H9,W6,Z7e,$7e,K7e,Q7e=Co(()=>{z9();N9();xW();J7e=-.14861,AW=1.78277,MW=-.29227,H9=-.90649,W6=1.97294,Z7e=W6*H9,$7e=W6*AW,K7e=AW*MW-H9*J7e;wg(W2,Bw,ly(b1,{brighter(e){return e=e==null?j2:Math.pow(j2,e),new W2(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=e==null?uy:Math.pow(uy,e),new W2(this.h,this.s,this.l*e,this.opacity)},rgb(){var e=isNaN(this.h)?0:(this.h+120)*U9,t=+this.l,r=isNaN(this.s)?0:this.s*t*(1-t),n=Math.cos(e),a=Math.sin(e);return new Xc(255*(t+r*(J7e*n+AW*a)),255*(t+r*(MW*n+H9*a)),255*(t+r*(W6*n)),this.opacity)}}))});var Y2=Co(()=>{N9();X7e();Q7e()});function SW(e,t,r,n,a){var i=e*e,o=i*e;return((1-3*e+3*i-o)*t+(4-6*i+3*o)*r+(1+3*e+3*i-3*o)*n+o*a)/6}function j9(e){var t=e.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,t-1):Math.floor(r*t),a=e[n],i=e[n+1],o=n>0?e[n-1]:2*a-i,s=n{});function Y9(e){var t=e.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*t),a=e[(n+t-1)%t],i=e[n%t],o=e[(n+1)%t],s=e[(n+2)%t];return SW((r-n/t)*t,a,i,o,s)}}var EW=Co(()=>{W9()});var Ow,kW=Co(()=>{Ow=e=>()=>e});function eLe(e,t){return function(r){return e+r*t}}function Mzt(e,t,r){return e=Math.pow(e,r),t=Math.pow(t,r)-e,r=1/r,function(n){return Math.pow(e+n*t,r)}}function fy(e,t){var r=t-e;return r?eLe(e,r>180||r<-180?r-360*Math.round(r/360):r):Ow(isNaN(e)?t:e)}function tLe(e){return(e=+e)==1?yu:function(t,r){return r-t?Mzt(t,r,e):Ow(isNaN(t)?r:t)}}function yu(e,t){var r=t-e;return r?eLe(e,r):Ow(isNaN(e)?t:e)}var X2=Co(()=>{kW()});function rLe(e){return function(t){var r=t.length,n=new Array(r),a=new Array(r),i=new Array(r),o,s;for(o=0;o{Y2();W9();EW();X2();Y6=(function e(t){var r=tLe(t);function n(a,i){var o=r((a=Iw(a)).r,(i=Iw(i)).r),s=r(a.g,i.g),l=r(a.b,i.b),u=yu(a.opacity,i.opacity);return function(c){return a.r=o(c),a.g=s(c),a.b=l(c),a.opacity=u(c),a+""}}return n.gamma=e,n})(1);nLe=rLe(j9),iLe=rLe(Y9)});function Nw(e,t){t||(t=[]);var r=e?Math.min(t.length,e.length):0,n=t.slice(),a;return function(i){for(a=0;a{});function aLe(e,t){return(X9(t)?Nw:LW)(e,t)}function LW(e,t){var r=t?t.length:0,n=e?Math.min(r,e.length):0,a=new Array(n),i=new Array(r),o;for(o=0;o{X6();Z9()});function $9(e,t){var r=new Date;return e=+e,t=+t,function(n){return r.setTime(e*(1-n)+t*n),r}}var FW=Co(()=>{});function c0(e,t){return e=+e,t=+t,function(r){return e*(1-r)+t*r}}var Z6=Co(()=>{});function K9(e,t){var r={},n={},a;(e===null||typeof e!="object")&&(e={}),(t===null||typeof t!="object")&&(t={});for(a in t)a in e?r[a]=hy(e[a],t[a]):n[a]=t[a];return function(i){for(a in r)n[a]=r[a](i);return n}}var DW=Co(()=>{X6()});function Szt(e){return function(){return e}}function Ezt(e){return function(t){return e(t)+""}}function J9(e,t){var r=IW.lastIndex=RW.lastIndex=0,n,a,i,o=-1,s=[],l=[];for(e=e+"",t=t+"";(n=IW.exec(e))&&(a=RW.exec(t));)(i=a.index)>r&&(i=t.slice(r,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(a=a[0])?s[o]?s[o]+=a:s[++o]=a:(s[++o]=null,l.push({i:o,x:c0(n,a)})),r=RW.lastIndex;return r{Z6();IW=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,RW=new RegExp(IW.source,"g")});function hy(e,t){var r=typeof t,n;return t==null||r==="boolean"?Ow(t):(r==="number"?c0:r==="string"?(n=cy(t))?(t=n,Y6):J9:t instanceof cy?Y6:t instanceof Date?$9:X9(t)?Nw:Array.isArray(t)?LW:typeof t.valueOf!="function"&&typeof t.toString!="function"||isNaN(t)?K9:c0)(e,t)}var X6=Co(()=>{Y2();CW();PW();FW();Z6();DW();zW();kW();Z9()});function oLe(e){var t=e.length;return function(r){return e[Math.max(0,Math.min(t-1,Math.floor(r*t)))]}}var sLe=Co(()=>{});function lLe(e,t){var r=fy(+e,+t);return function(n){var a=r(n);return a-360*Math.floor(a/360)}}var uLe=Co(()=>{X2()});function cLe(e,t){return e=+e,t=+t,function(r){return Math.round(e*(1-r)+t*r)}}var fLe=Co(()=>{});function qW(e,t,r,n,a,i){var o,s,l;return(o=Math.sqrt(e*e+t*t))&&(e/=o,t/=o),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(s=Math.sqrt(r*r+n*n))&&(r/=s,n/=s,l/=s),e*n{hLe=180/Math.PI,Q9={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1}});function vLe(e){let t=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(e+"");return t.isIdentity?Q9:qW(t.a,t.b,t.c,t.d,t.e,t.f)}function pLe(e){return e==null?Q9:(eP||(eP=document.createElementNS("http://www.w3.org/2000/svg","g")),eP.setAttribute("transform",e),(e=eP.transform.baseVal.consolidate())?(e=e.matrix,qW(e.a,e.b,e.c,e.d,e.e,e.f)):Q9)}var eP,gLe=Co(()=>{dLe()});function mLe(e,t,r,n){function a(u){return u.length?u.pop()+" ":""}function i(u,c,f,v,g,p){if(u!==f||c!==v){var x=g.push("translate(",null,t,null,r);p.push({i:x-4,x:c0(u,f)},{i:x-2,x:c0(c,v)})}else(f||v)&&g.push("translate("+f+t+v+r)}function o(u,c,f,v){u!==c?(u-c>180?c+=360:c-u>180&&(u+=360),v.push({i:f.push(a(f)+"rotate(",null,n)-2,x:c0(u,c)})):c&&f.push(a(f)+"rotate("+c+n)}function s(u,c,f,v){u!==c?v.push({i:f.push(a(f)+"skewX(",null,n)-2,x:c0(u,c)}):c&&f.push(a(f)+"skewX("+c+n)}function l(u,c,f,v,g,p){if(u!==f||c!==v){var x=g.push(a(g)+"scale(",null,",",null,")");p.push({i:x-4,x:c0(u,f)},{i:x-2,x:c0(c,v)})}else(f!==1||v!==1)&&g.push(a(g)+"scale("+f+","+v+")")}return function(u,c){var f=[],v=[];return u=e(u),c=e(c),i(u.translateX,u.translateY,c.translateX,c.translateY,f,v),o(u.rotate,c.rotate,f,v),s(u.skewX,c.skewX,f,v),l(u.scaleX,u.scaleY,c.scaleX,c.scaleY,f,v),u=c=null,function(g){for(var p=-1,x=v.length,_;++p{Z6();gLe();yLe=mLe(vLe,"px, ","px)","deg)"),xLe=mLe(pLe,", ",")",")")});function bLe(e){return((e=Math.exp(e))+1/e)/2}function Czt(e){return((e=Math.exp(e))-1/e)/2}function Lzt(e){return((e=Math.exp(2*e))-1)/(e+1)}var kzt,wLe,TLe=Co(()=>{kzt=1e-12;wLe=(function e(t,r,n){function a(i,o){var s=i[0],l=i[1],u=i[2],c=o[0],f=o[1],v=o[2],g=c-s,p=f-l,x=g*g+p*p,_,y;if(x{Y2();X2();MLe=ALe(fy),SLe=ALe(yu)});function BW(e,t){var r=yu((e=qw(e)).l,(t=qw(t)).l),n=yu(e.a,t.a),a=yu(e.b,t.b),i=yu(e.opacity,t.opacity);return function(o){return e.l=r(o),e.a=n(o),e.b=a(o),e.opacity=i(o),e+""}}var kLe=Co(()=>{Y2();X2()});function CLe(e){return function(t,r){var n=e((t=j6(t)).h,(r=j6(r)).h),a=yu(t.c,r.c),i=yu(t.l,r.l),o=yu(t.opacity,r.opacity);return function(s){return t.h=n(s),t.c=a(s),t.l=i(s),t.opacity=o(s),t+""}}}var LLe,PLe,FLe=Co(()=>{Y2();X2();LLe=CLe(fy),PLe=CLe(yu)});function DLe(e){return(function t(r){r=+r;function n(a,i){var o=e((a=Bw(a)).h,(i=Bw(i)).h),s=yu(a.s,i.s),l=yu(a.l,i.l),u=yu(a.opacity,i.opacity);return function(c){return a.h=o(c),a.s=s(c),a.l=l(Math.pow(c,r)),a.opacity=u(c),a+""}}return n.gamma=t,n})(1)}var RLe,ILe,zLe=Co(()=>{Y2();X2();RLe=DLe(fy),ILe=DLe(yu)});function OW(e,t){t===void 0&&(t=e,e=hy);for(var r=0,n=t.length-1,a=t[0],i=new Array(n<0?0:n);r{X6()});function BLe(e,t){for(var r=new Array(t),n=0;n{});var Z2={};zp(Z2,{interpolate:()=>hy,interpolateArray:()=>aLe,interpolateBasis:()=>j9,interpolateBasisClosed:()=>Y9,interpolateCubehelix:()=>RLe,interpolateCubehelixLong:()=>ILe,interpolateDate:()=>$9,interpolateDiscrete:()=>oLe,interpolateHcl:()=>LLe,interpolateHclLong:()=>PLe,interpolateHsl:()=>MLe,interpolateHslLong:()=>SLe,interpolateHue:()=>lLe,interpolateLab:()=>BW,interpolateNumber:()=>c0,interpolateNumberArray:()=>Nw,interpolateObject:()=>K9,interpolateRgb:()=>Y6,interpolateRgbBasis:()=>nLe,interpolateRgbBasisClosed:()=>iLe,interpolateRound:()=>cLe,interpolateString:()=>J9,interpolateTransformCss:()=>yLe,interpolateTransformSvg:()=>xLe,interpolateZoom:()=>wLe,piecewise:()=>OW,quantize:()=>BLe});var $2=Co(()=>{X6();PW();W9();EW();FW();sLe();uLe();Z6();Z9();DW();fLe();zW();_Le();TLe();CW();ELe();kLe();FLe();zLe();qLe();OLe()});var tP=fe((Hbr,NLe)=>{"use strict";var Pzt=ea(),Fzt=ni();NLe.exports=function(t,r,n,a,i){var o=r.data.data,s=o.i,l=i||o.color;if(s>=0){r.i=o.i;var u=n.marker;u.pattern?(!u.colors||!u.pattern.shape)&&(u.color=l,r.color=l):(u.color=l,r.color=l),Pzt.pointStyle(t,n,a,r)}else Fzt.fill(t,l)}});var NW=fe((jbr,jLe)=>{"use strict";var ULe=xi(),VLe=ni(),GLe=Xt(),Dzt=kh().resizeText,Rzt=tP();function Izt(e){var t=e._fullLayout._sunburstlayer.selectAll(".trace");Dzt(e,t,"sunburst"),t.each(function(r){var n=ULe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){ULe.select(this).call(HLe,o,i,e)})})}function HLe(e,t,r,n){var a=t.data.data,i=!t.children,o=a.i,s=GLe.castOption(r,o,"marker.line.color")||VLe.defaultLine,l=GLe.castOption(r,o,"marker.line.width")||0;e.call(Rzt,t,r,n).style("stroke-width",l).call(VLe.stroke,s).style("opacity",i?r.leaf.opacity:null)}jLe.exports={style:Izt,styleOne:HLe}});var Ag=fe(to=>{"use strict";var K2=Xt(),zzt=ni(),qzt=np(),WLe=Sm();to.findEntryWithLevel=function(e,t){var r;return t&&e.eachAfter(function(n){if(to.getPtId(n)===t)return r=n.copy()}),r||e};to.findEntryWithChild=function(e,t){var r;return e.eachAfter(function(n){for(var a=n.children||[],i=0;i0)};to.getMaxDepth=function(e){return e.maxdepth>=0?e.maxdepth:1/0};to.isHeader=function(e,t){return!(to.isLeaf(e)||e.depth===t._maxDepth-1)};function YLe(e){return e.data.data.pid}to.getParent=function(e,t){return to.findEntryWithLevel(e,YLe(t))};to.listPath=function(e,t){var r=e.parent;if(!r)return[];var n=t?[r.data[t]]:[r];return to.listPath(r,t).concat(n)};to.getPath=function(e){return to.listPath(e,"label").join("/")+"/"};to.formatValue=WLe.formatPieValue;to.formatPercent=function(e,t){var r=K2.formatPercent(e,0);return r==="0%"&&(r=WLe.formatPiePercent(e,t)),r}});var J6=fe((Ybr,$Le)=>{"use strict";var Uw=xi(),XLe=bi(),Nzt=Sd().appendArrayPointValue,$6=kl(),ZLe=Xt(),Uzt=Rb(),Sc=Ag(),Vzt=Sm(),Gzt=Vzt.formatPieValue;$Le.exports=function(t,r,n,a,i){var o=a[0],s=o.trace,l=o.hierarchy,u=s.type==="sunburst",c=s.type==="treemap"||s.type==="icicle";"_hasHoverLabel"in s||(s._hasHoverLabel=!1),"_hasHoverEvent"in s||(s._hasHoverEvent=!1);var f=function(p){var x=n._fullLayout;if(!(n._dragging||x.hovermode===!1)){var _=n._fullData[s.index],y=p.data.data,C=y.i,k=Sc.isHierarchyRoot(p),S=Sc.getParent(l,p),L=Sc.getValue(p),w=function(ye){return ZLe.castOption(_,C,ye)},A=w("hovertemplate"),T=$6.castHoverinfo(_,x,C),m=x.separators,F;if(A||T&&T!=="none"&&T!=="skip"){var E,I;u&&(E=o.cx+p.pxmid[0]*(1-p.rInscribed),I=o.cy+p.pxmid[1]*(1-p.rInscribed)),c&&(E=p._hoverX,I=p._hoverY);var R={},B=[],O=[],V=function(ye){return B.indexOf(ye)!==-1};T&&(B=T==="all"?_._module.attributes.hoverinfo.flags:T.split("+")),R.label=y.label,V("label")&&R.label&&O.push(R.label),y.hasOwnProperty("v")&&(R.value=y.v,R.valueLabel=Gzt(R.value,m),V("value")&&O.push(R.valueLabel)),R.currentPath=p.currentPath=Sc.getPath(p.data),V("current path")&&!k&&O.push(R.currentPath);var j,q=[],U=function(){q.indexOf(j)===-1&&(O.push(j),q.push(j))};R.percentParent=p.percentParent=L/Sc.getValue(S),R.parent=p.parentString=Sc.getPtLabel(S),V("percent parent")&&(j=Sc.formatPercent(R.percentParent,m)+" of "+R.parent,U()),R.percentEntry=p.percentEntry=L/Sc.getValue(r),R.entry=p.entry=Sc.getPtLabel(r),V("percent entry")&&!k&&!p.onPathbar&&(j=Sc.formatPercent(R.percentEntry,m)+" of "+R.entry,U()),R.percentRoot=p.percentRoot=L/Sc.getValue(l),R.root=p.root=Sc.getPtLabel(l),V("percent root")&&!k&&(j=Sc.formatPercent(R.percentRoot,m)+" of "+R.root,U()),R.text=w("hovertext")||w("text"),V("text")&&(j=R.text,ZLe.isValidTextValue(j)&&O.push(j)),F=[K6(p,_,i.eventDataKeys)];var J={trace:_,y:I,_x0:p._x0,_x1:p._x1,_y0:p._y0,_y1:p._y1,text:O.join("
"),name:A||V("name")?_.name:void 0,color:w("hoverlabel.bgcolor")||y.color,borderColor:w("hoverlabel.bordercolor"),fontFamily:w("hoverlabel.font.family"),fontSize:w("hoverlabel.font.size"),fontColor:w("hoverlabel.font.color"),fontWeight:w("hoverlabel.font.weight"),fontStyle:w("hoverlabel.font.style"),fontVariant:w("hoverlabel.font.variant"),nameLength:w("hoverlabel.namelength"),textAlign:w("hoverlabel.align"),hovertemplate:A,hovertemplateLabels:R,eventData:F};u&&(J.x0=E-p.rInscribed*p.rpx1,J.x1=E+p.rInscribed*p.rpx1,J.idealAlign=p.pxmid[0]<0?"left":"right"),c&&(J.x=E,J.idealAlign=E<0?"left":"right");var ee=[];$6.loneHover(J,{container:x._hoverlayer.node(),outerContainer:x._paper.node(),gd:n,inOut_bbox:ee}),F[0].bbox=ee[0],s._hasHoverLabel=!0}if(c){var ce=t.select("path.surface");i.styleOne(ce,p,_,n,{hovered:!0})}s._hasHoverEvent=!0,n.emit("plotly_hover",{points:F||[K6(p,_,i.eventDataKeys)],event:Uw.event})}},v=function(p){var x=n._fullLayout,_=n._fullData[s.index],y=Uw.select(this).datum();if(s._hasHoverEvent&&(p.originalEvent=Uw.event,n.emit("plotly_unhover",{points:[K6(y,_,i.eventDataKeys)],event:Uw.event}),s._hasHoverEvent=!1),s._hasHoverLabel&&($6.loneUnhover(x._hoverlayer.node()),s._hasHoverLabel=!1),c){var C=t.select("path.surface");i.styleOne(C,y,_,n,{hovered:!1})}},g=function(p){var x=n._fullLayout,_=n._fullData[s.index],y=u&&(Sc.isHierarchyRoot(p)||Sc.isLeaf(p)),C=Sc.getPtId(p),k=Sc.isEntry(p)?Sc.findEntryWithChild(l,C):Sc.findEntryWithLevel(l,C),S=Sc.getPtId(k),L={points:[K6(p,_,i.eventDataKeys)],event:Uw.event};y||(L.nextLevel=S);var w=Uzt.triggerHandler(n,"plotly_"+s.type+"click",L);if(w!==!1&&x.hovermode&&(n._hoverdata=[K6(p,_,i.eventDataKeys)],$6.click(n,Uw.event)),!y&&w!==!1&&!n._dragging&&!n._transitioning){XLe.call("_storeDirectGUIEdit",_,x._tracePreGUI[_.uid],{level:_.level});var A={data:[{level:S}],traces:[s.index]},T={frame:{redraw:!1,duration:i.transitionTime},transition:{duration:i.transitionTime,easing:i.transitionEasing},mode:"immediate",fromcurrent:!0};$6.loneUnhover(x._hoverlayer.node()),XLe.call("animate",n,A,T)}};t.on("mouseover",f),t.on("mouseout",v),t.on("click",g)};function K6(e,t,r){for(var n=e.data.data,a={curveNumber:t.index,pointNumber:n.i,data:t._input,fullData:t},i=0;i{"use strict";var Q6=xi(),Hzt=O6(),Sp=($2(),Gs(Z2)).interpolate,KLe=ea(),Fh=Xt(),jzt=as(),t9e=kh(),JLe=t9e.recordMinTextSize,Wzt=t9e.clearMinTextSize,r9e=R9(),Yzt=Sm().getRotationAngle,Xzt=r9e.computeTransform,Zzt=r9e.transformInsideText,$zt=NW().styleOne,Kzt=_v().resizeText,Jzt=J6(),UW=gW(),Po=Ag();rP.plot=function(e,t,r,n){var a=e._fullLayout,i=a._sunburstlayer,o,s,l=!r,u=!a.uniformtext.mode&&Po.hasTransition(r);if(Wzt("sunburst",a),o=i.selectAll("g.trace.sunburst").data(t,function(f){return f[0].trace.uid}),o.enter().append("g").classed("trace",!0).classed("sunburst",!0).attr("stroke-linejoin","round"),o.order(),u){n&&(s=n());var c=Q6.transition().duration(r.duration).ease(r.easing).each("end",function(){s&&s()}).each("interrupt",function(){s&&s()});c.each(function(){i.selectAll("g.trace").each(function(f){QLe(e,f,this,r)})})}else o.each(function(f){QLe(e,f,this,r)}),a.uniformtext.mode&&Kzt(e,a._sunburstlayer.selectAll(".trace"),"sunburst");l&&o.exit().remove()};function QLe(e,t,r,n){var a=e._context.staticPlot,i=e._fullLayout,o=!i.uniformtext.mode&&Po.hasTransition(n),s=Q6.select(r),l=s.selectAll("g.slice"),u=t[0],c=u.trace,f=u.hierarchy,v=Po.findEntryWithLevel(f,c.level),g=Po.getMaxDepth(c),p=i._size,x=c.domain,_=p.w*(x.x[1]-x.x[0]),y=p.h*(x.y[1]-x.y[0]),C=.5*Math.min(_,y),k=u.cx=p.l+p.w*(x.x[1]+x.x[0])/2,S=u.cy=p.t+p.h*(1-x.y[0])-y/2;if(!v)return l.remove();var L=null,w={};o&&l.each(function(ue){w[Po.getPtId(ue)]={rpx0:ue.rpx0,rpx1:ue.rpx1,x0:ue.x0,x1:ue.x1,transform:ue.transform},!L&&Po.isEntry(ue)&&(L=ue)});var A=Qzt(v).descendants(),T=v.height+1,m=0,F=g;u.hasMultipleRoots&&Po.isHierarchyRoot(v)&&(A=A.slice(1),T-=1,m=1,F+=1),A=A.filter(function(ue){return ue.y1<=F});var E=Yzt(c.rotation);E&&A.forEach(function(ue){ue.x0+=E,ue.x1+=E});var I=Math.min(T,g),R=function(ue){return(ue-m)/I*C},B=function(ue,K){return[ue*Math.cos(K),-ue*Math.sin(K)]},O=function(ue){return Fh.pathAnnulus(ue.rpx0,ue.rpx1,ue.x0,ue.x1,k,S)},V=function(ue){return k+e9e(ue)[0]*(ue.transform.rCenter||0)+(ue.transform.x||0)},j=function(ue){return S+e9e(ue)[1]*(ue.transform.rCenter||0)+(ue.transform.y||0)};l=l.data(A,Po.getPtId),l.enter().append("g").classed("slice",!0),o?l.exit().transition().each(function(){var ue=Q6.select(this),K=ue.select("path.surface");K.transition().attrTween("d",function(ne){var ae=ee(ne);return function(pe){return O(ae(pe))}});var _e=ue.select("g.slicetext");_e.attr("opacity",0)}).remove():l.exit().remove(),l.order();var q=null;if(o&&L){var U=Po.getPtId(L);l.each(function(ue){q===null&&Po.getPtId(ue)===U&&(q=ue.x1)})}var J=l;o&&(J=J.transition().each("end",function(){var ue=Q6.select(this);Po.setSliceCursor(ue,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:!1})})),J.each(function(ue){var K=Q6.select(this),_e=Fh.ensureSingle(K,"path","surface",function(me){me.style("pointer-events",a?"none":"all")});ue.rpx0=R(ue.y0),ue.rpx1=R(ue.y1),ue.xmid=(ue.x0+ue.x1)/2,ue.pxmid=B(ue.rpx1,ue.xmid),ue.midangle=-(ue.xmid-Math.PI/2),ue.startangle=-(ue.x0-Math.PI/2),ue.stopangle=-(ue.x1-Math.PI/2),ue.halfangle=.5*Math.min(Fh.angleDelta(ue.x0,ue.x1)||Math.PI,Math.PI),ue.ring=1-ue.rpx0/ue.rpx1,ue.rInscribed=eqt(ue,c),o?_e.transition().attrTween("d",function(me){var be=ce(me);return function(De){return O(be(De))}}):_e.attr("d",O),K.call(Jzt,v,e,t,{eventDataKeys:UW.eventDataKeys,transitionTime:UW.CLICK_TRANSITION_TIME,transitionEasing:UW.CLICK_TRANSITION_EASING}).call(Po.setSliceCursor,e,{hideOnRoot:!0,hideOnLeaves:!0,isTransitioning:e._transitioning}),_e.call($zt,ue,c,e);var ne=Fh.ensureSingle(K,"g","slicetext"),ae=Fh.ensureSingle(ne,"text","",function(me){me.attr("data-notex",1)}),pe=Fh.ensureUniformFontSize(e,Po.determineTextFont(c,ue,i.font));ae.text(rP.formatSliceLabel(ue,v,c,t,i)).classed("slicetext",!0).attr("text-anchor","middle").call(KLe.font,pe).call(jzt.convertToTspans,e);var ie=KLe.bBox(ae.node());ue.transform=Zzt(ie,ue,u),ue.transform.targetX=V(ue),ue.transform.targetY=j(ue);var le=function(me,be){var De=me.transform;return Xzt(De,be),De.fontSize=pe.size,JLe(c.type,De,i),Fh.getTextTransform(De)};o?ae.transition().attrTween("transform",function(me){var be=ye(me);return function(De){return le(be(De),ie)}}):ae.attr("transform",le(ue,ie))});function ee(ue){var K=Po.getPtId(ue),_e=w[K],ne=w[Po.getPtId(v)],ae;if(ne){var pe=(ue.x1>ne.x1?2*Math.PI:0)+E;ae=ue.rpx1q?2*Math.PI:0)+E;_e={x0:ae,x1:ae}}else _e={rpx0:C,rpx1:C},Fh.extendFlat(_e,xe(ue));else _e={rpx0:0,rpx1:0};else _e={x0:E,x1:E};return Sp(_e,ne)}function ye(ue){var K=w[Po.getPtId(ue)],_e,ne=ue.transform;if(K)_e=K;else if(_e={rpx1:ue.rpx1,transform:{textPosAngle:ne.textPosAngle,scale:0,rotate:ne.rotate,rCenter:ne.rCenter,x:ne.x,y:ne.y}},L)if(ue.parent)if(q){var ae=ue.x1>q?2*Math.PI:0;_e.x0=_e.x1=ae}else Fh.extendFlat(_e,xe(ue));else _e.x0=_e.x1=E;else _e.x0=_e.x1=E;var pe=Sp(_e.transform.textPosAngle,ue.transform.textPosAngle),ie=Sp(_e.rpx1,ue.rpx1),le=Sp(_e.x0,ue.x0),me=Sp(_e.x1,ue.x1),be=Sp(_e.transform.scale,ne.scale),De=Sp(_e.transform.rotate,ne.rotate),Ge=ne.rCenter===0?3:_e.transform.rCenter===0?1/3:1,ht=Sp(_e.transform.rCenter,ne.rCenter),it=function(Oe){return ht(Math.pow(Oe,Ge))};return function(Oe){var ze=ie(Oe),ct=le(Oe),et=me(Oe),qe=it(Oe),we=B(ze,(ct+et)/2),Le=pe(Oe),Ke={pxmid:we,rpx1:ze,transform:{textPosAngle:Le,rCenter:qe,x:ne.x,y:ne.y}};return JLe(c.type,ne,i),{transform:{targetX:V(Ke),targetY:j(Ke),scale:be(Oe),rotate:De(Oe),rCenter:qe}}}}function xe(ue){var K=ue.parent,_e=w[Po.getPtId(K)],ne={};if(_e){var ae=K.children,pe=ae.indexOf(ue),ie=ae.length,le=Sp(_e.x0,_e.x1);ne.x0=le(pe/ie),ne.x1=le(pe/ie)}else ne.x0=ne.x1=0;return ne}}function Qzt(e){return Hzt.partition().size([2*Math.PI,e.height+1])(e)}rP.formatSliceLabel=function(e,t,r,n,a){var i=r.texttemplate,o=r.textinfo;if(!i&&(!o||o==="none"))return"";var s=a.separators,l=n[0],u=e.data.data,c=l.hierarchy,f=Po.isHierarchyRoot(e),v=Po.getParent(c,e),g=Po.getValue(e);if(!i){var p=o.split("+"),x=function(m){return p.indexOf(m)!==-1},_=[],y;if(x("label")&&u.label&&_.push(u.label),u.hasOwnProperty("v")&&x("value")&&_.push(Po.formatValue(u.v,s)),!f){x("current path")&&_.push(Po.getPath(e.data));var C=0;x("percent parent")&&C++,x("percent entry")&&C++,x("percent root")&&C++;var k=C>1;if(C){var S,L=function(m){y=Po.formatPercent(S,s),k&&(y+=" of "+m),_.push(y)};x("percent parent")&&!f&&(S=g/Po.getValue(v),L("parent")),x("percent entry")&&(S=g/Po.getValue(t),L("entry")),x("percent root")&&(S=g/Po.getValue(c),L("root"))}}return x("text")&&(y=Fh.castOption(r,u.i,"text"),Fh.isValidTextValue(y)&&_.push(y)),_.join("
")}var w=Fh.castOption(r,u.i,"texttemplate");if(!w)return"";var A={};u.label&&(A.label=u.label),u.hasOwnProperty("v")&&(A.value=u.v,A.valueLabel=Po.formatValue(u.v,s)),A.currentPath=Po.getPath(e.data),f||(A.percentParent=g/Po.getValue(v),A.percentParentLabel=Po.formatPercent(A.percentParent,s),A.parent=Po.getPtLabel(v)),A.percentEntry=g/Po.getValue(t),A.percentEntryLabel=Po.formatPercent(A.percentEntry,s),A.entry=Po.getPtLabel(t),A.percentRoot=g/Po.getValue(c),A.percentRootLabel=Po.formatPercent(A.percentRoot,s),A.root=Po.getPtLabel(c),u.hasOwnProperty("color")&&(A.color=u.color);var T=Fh.castOption(r,u.i,"text");return(Fh.isValidTextValue(T)||T==="")&&(A.text=T),A.customdata=Fh.castOption(r,u.i,"customdata"),Fh.texttemplateString({data:[A,r._meta],fallback:r.texttemplatefallback,labels:A,locale:a._d3locale,template:w})};function eqt(e){return e.rpx0===0&&Fh.isFullCircle([e.x0,e.x1])?1:Math.max(0,Math.min(1/(1+1/Math.sin(e.halfangle)),e.ring/2))}function e9e(e){return tqt(e.rpx1,e.transform.textPosAngle)}function tqt(e,t){return[e*Math.sin(t),-e*Math.cos(t)]}});var i9e=fe((Zbr,n9e)=>{"use strict";n9e.exports={moduleType:"trace",name:"sunburst",basePlotModule:m7e(),categories:[],animatable:!0,attributes:B6(),layoutAttributes:mW(),supplyDefaults:S7e(),supplyLayoutDefaults:k7e(),calc:U6().calc,crossTraceCalc:U6().crossTraceCalc,plot:nP().plot,style:NW().style,colorbar:Zf(),meta:{}}});var o9e=fe(($br,a9e)=>{"use strict";a9e.exports=i9e()});var l9e=fe(Vw=>{"use strict";var s9e=Hs();Vw.name="treemap";Vw.plot=function(e,t,r,n){s9e.plotBasePlot(Vw.name,e,t,r,n)};Vw.clean=function(e,t,r,n){s9e.cleanBasePlot(Vw.name,e,t,r,n)}});var J2=fe((Jbr,u9e)=>{"use strict";u9e.exports={CLICK_TRANSITION_TIME:750,CLICK_TRANSITION_EASING:"poly",eventDataKeys:["currentPath","root","entry","percentRoot","percentEntry","percentParent"],gapWithPathbar:1}});var iP=fe((Qbr,h9e)=>{"use strict";var{hovertemplateAttrs:rqt,texttemplateAttrs:nqt,templatefallbackAttrs:c9e}=Oo(),iqt=_s(),aqt=nl().attributes,Q2=U2(),Dv=B6(),f9e=J2(),VW=ta().extendFlat,oqt=Uc().pattern;h9e.exports={labels:Dv.labels,parents:Dv.parents,values:Dv.values,branchvalues:Dv.branchvalues,count:Dv.count,level:Dv.level,maxdepth:Dv.maxdepth,tiling:{packing:{valType:"enumerated",values:["squarify","binary","dice","slice","slice-dice","dice-slice"],dflt:"squarify",editType:"plot"},squarifyratio:{valType:"number",min:1,dflt:1,editType:"plot"},flip:{valType:"flaglist",flags:["x","y"],dflt:"",editType:"plot"},pad:{valType:"number",min:0,dflt:3,editType:"plot"},editType:"calc"},marker:VW({pad:{t:{valType:"number",min:0,editType:"plot"},l:{valType:"number",min:0,editType:"plot"},r:{valType:"number",min:0,editType:"plot"},b:{valType:"number",min:0,editType:"plot"},editType:"calc"},colors:Dv.marker.colors,pattern:oqt,depthfade:{valType:"enumerated",values:[!0,!1,"reversed"],editType:"style"},line:Dv.marker.line,cornerradius:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},iqt("marker",{colorAttr:"colors",anim:!1})),pathbar:{visible:{valType:"boolean",dflt:!0,editType:"plot"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},edgeshape:{valType:"enumerated",values:[">","<","|","/","\\"],dflt:">",editType:"plot"},thickness:{valType:"number",min:12,editType:"plot"},textfont:VW({},Q2.textfont,{}),editType:"calc"},text:Q2.text,textinfo:Dv.textinfo,texttemplate:nqt({editType:"plot"},{keys:f9e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:c9e({editType:"plot"}),hovertext:Q2.hovertext,hoverinfo:Dv.hoverinfo,hovertemplate:rqt({},{keys:f9e.eventDataKeys}),hovertemplatefallback:c9e(),textfont:Q2.textfont,insidetextfont:Q2.insidetextfont,outsidetextfont:VW({},Q2.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:Q2.sort,root:Dv.root,domain:aqt({name:"treemap",trace:!0,editType:"calc"})}});var GW=fe((e3r,d9e)=>{"use strict";d9e.exports={treemapcolorway:{valType:"colorlist",editType:"calc"},extendtreemapcolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var m9e=fe((t3r,g9e)=>{"use strict";var v9e=Xt(),sqt=iP(),lqt=ni(),uqt=nl().defaults,cqt=z0().handleText,fqt=Im().TEXTPAD,hqt=V2().handleMarkerDefaults,p9e=js(),dqt=p9e.hasColorscale,vqt=p9e.handleDefaults;g9e.exports=function(t,r,n,a){function i(_,y){return v9e.coerce(t,r,sqt,_,y)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth");var u=i("tiling.packing");u==="squarify"&&i("tiling.squarifyratio"),i("tiling.flip"),i("tiling.pad");var c=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",v9e.isArrayOrTypedArray(c)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f=i("pathbar.visible"),v="auto";cqt(t,r,a,i,v,{hasPathbar:f,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("textposition");var g=r.textposition.indexOf("bottom")!==-1;hqt(t,r,a,i);var p=r._hasColorscale=dqt(t,"marker","colors")||(t.marker||{}).coloraxis;p?vqt(t,r,a,i,{prefix:"marker.",cLetter:"c"}):i("marker.depthfade",!(r.marker.colors||[]).length);var x=r.textfont.size*2;i("marker.pad.t",g?x/4:x),i("marker.pad.l",x/4),i("marker.pad.r",x/4),i("marker.pad.b",g?x:x/4),i("marker.cornerradius"),r._hovered={marker:{line:{width:2,color:lqt.contrast(a.paper_bgcolor)}}},f&&(i("pathbar.thickness",r.pathbar.textfont.size+2*fqt),i("pathbar.side"),i("pathbar.edgeshape")),i("sort"),i("root.color"),uqt(r,a,i),r._length=null}});var x9e=fe((r3r,y9e)=>{"use strict";var pqt=Xt(),gqt=GW();y9e.exports=function(t,r){function n(a,i){return pqt.coerce(t,r,gqt,a,i)}n("treemapcolorway",r.colorway),n("extendtreemapcolors")}});var jW=fe(HW=>{"use strict";var _9e=U6();HW.calc=function(e,t){return _9e.calc(e,t)};HW.crossTraceCalc=function(e){return _9e._runCrossTraceCalc("treemap",e)}});var WW=fe((i3r,b9e)=>{"use strict";b9e.exports=function e(t,r,n){var a;n.swapXY&&(a=t.x0,t.x0=t.y0,t.y0=a,a=t.x1,t.x1=t.y1,t.y1=a),n.flipX&&(a=t.x0,t.x0=r[0]-t.x1,t.x1=r[0]-a),n.flipY&&(a=t.y0,t.y0=r[1]-t.y1,t.y1=r[1]-a);var i=t.children;if(i)for(var o=0;o{"use strict";var Gw=O6(),mqt=WW();w9e.exports=function(t,r,n){var a=n.flipX,i=n.flipY,o=n.packing==="dice-slice",s=n.pad[i?"bottom":"top"],l=n.pad[a?"right":"left"],u=n.pad[a?"left":"right"],c=n.pad[i?"top":"bottom"],f;o&&(f=l,l=s,s=f,f=u,u=c,c=f);var v=Gw.treemap().tile(yqt(n.packing,n.squarifyratio)).paddingInner(n.pad.inner).paddingLeft(l).paddingRight(u).paddingTop(s).paddingBottom(c).size(o?[r[1],r[0]]:r)(t);return(o||a||i)&&mqt(v,r,{swapXY:o,flipX:a,flipY:i}),v};function yqt(e,t){switch(e){case"squarify":return Gw.treemapSquarify.ratio(t);case"binary":return Gw.treemapBinary;case"dice":return Gw.treemapDice;case"slice":return Gw.treemapSlice;default:return Gw.treemapSliceDice}}});var aP=fe((o3r,S9e)=>{"use strict";var T9e=xi(),Hw=ni(),A9e=Xt(),XW=Ag(),xqt=kh().resizeText,_qt=tP();function bqt(e){var t=e._fullLayout._treemaplayer.selectAll(".trace");xqt(e,t,"treemap"),t.each(function(r){var n=T9e.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){T9e.select(this).call(M9e,o,i,e,{hovered:!1})})})}function M9e(e,t,r,n,a){var i=(a||{}).hovered,o=t.data.data,s=o.i,l,u,c=o.color,f=XW.isHierarchyRoot(t),v=1;if(i)l=r._hovered.marker.line.color,u=r._hovered.marker.line.width;else if(f&&c===r.root.color)v=100,l="rgba(0,0,0,0)",u=0;else if(l=A9e.castOption(r,s,"marker.line.color")||Hw.defaultLine,u=A9e.castOption(r,s,"marker.line.width")||0,!r._hasColorscale&&!t.onPathbar){var g=r.marker.depthfade;if(g){var p=Hw.combine(Hw.addOpacity(r._backgroundColor,.75),c),x;if(g===!0){var _=XW.getMaxDepth(r);isFinite(_)?XW.isLeaf(t)?x=0:x=r._maxVisibleLayers-(t.data.depth-r._entryDepth):x=t.data.height+1}else x=t.data.depth-r._entryDepth,r._atRootLevel||x++;if(x>0)for(var y=0;y{"use strict";var E9e=xi(),oP=Xt(),k9e=ea(),wqt=as(),Tqt=YW(),C9e=aP().styleOne,ZW=J2(),jw=Ag(),Aqt=J6(),$W=!0;L9e.exports=function(t,r,n,a,i){var o=i.barDifY,s=i.width,l=i.height,u=i.viewX,c=i.viewY,f=i.pathSlice,v=i.toMoveInsideSlice,g=i.strTransform,p=i.hasTransition,x=i.handleSlicesExit,_=i.makeUpdateSliceInterpolator,y=i.makeUpdateTextInterpolator,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,A=L.hierarchy,T=s/w._entryDepth,m=jw.listPath(n.data,"id"),F=Tqt(A.copy(),[s,l],{packing:"dice",pad:{inner:0,top:0,left:0,right:0,bottom:0}}).descendants();F=F.filter(function(I){var R=m.indexOf(I.data.id);return R===-1?!1:(I.x0=T*R,I.x1=T*(R+1),I.y0=o,I.y1=o+l,I.onPathbar=!0,!0)}),F.reverse(),a=a.data(F,jw.getPtId),a.enter().append("g").classed("pathbar",!0),x(a,$W,C,[s,l],f),a.order();var E=a;p&&(E=E.transition().each("end",function(){var I=E9e.select(this);jw.setSliceCursor(I,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:!1})})),E.each(function(I){I._x0=u(I.x0),I._x1=u(I.x1),I._y0=c(I.y0),I._y1=c(I.y1),I._hoverX=u(I.x1-Math.min(s,l)/2),I._hoverY=c(I.y1-l/2);var R=E9e.select(this),B=oP.ensureSingle(R,"path","surface",function(q){q.style("pointer-events",k?"none":"all")});p?B.transition().attrTween("d",function(q){var U=_(q,$W,C,[s,l]);return function(J){return f(U(J))}}):B.attr("d",f),R.call(Aqt,n,t,r,{styleOne:C9e,eventDataKeys:ZW.eventDataKeys,transitionTime:ZW.CLICK_TRANSITION_TIME,transitionEasing:ZW.CLICK_TRANSITION_EASING}).call(jw.setSliceCursor,t,{hideOnRoot:!1,hideOnLeaves:!1,isTransitioning:t._transitioning}),B.call(C9e,I,w,t,{hovered:!1}),I._text=(jw.getPtLabel(I)||"").split("
").join(" ")||"";var O=oP.ensureSingle(R,"g","slicetext"),V=oP.ensureSingle(O,"text","",function(q){q.attr("data-notex",1)}),j=oP.ensureUniformFontSize(t,jw.determineTextFont(w,I,S.font,{onPathbar:!0}));V.text(I._text||" ").classed("slicetext",!0).attr("text-anchor","start").call(k9e.font,j).call(wqt.convertToTspans,t),I.textBB=k9e.bBox(V.node()),I.transform=v(I,{fontSize:j.size,onPathbar:!0}),I.transform.fontSize=j.size,p?V.transition().attrTween("transform",function(q){var U=y(q,$W,C,[s,l]);return function(J){return g(U(J))}}):V.attr("transform",g(I))})}});var I9e=fe((l3r,R9e)=>{"use strict";var F9e=xi(),KW=($2(),Gs(Z2)).interpolate,dy=Ag(),eM=Xt(),D9e=Im().TEXTPAD,Mqt=m2(),Sqt=Mqt.toMoveInsideBar,Eqt=kh(),JW=Eqt.recordMinTextSize,kqt=J2(),Cqt=P9e();function e_(e){return dy.isHierarchyRoot(e)?"":dy.getPtId(e)}R9e.exports=function(t,r,n,a,i){var o=t._fullLayout,s=r[0],l=s.trace,u=l.type,c=u==="icicle",f=s.hierarchy,v=dy.findEntryWithLevel(f,l.level),g=F9e.select(n),p=g.selectAll("g.pathbar"),x=g.selectAll("g.slice");if(!v){p.remove(),x.remove();return}var _=dy.isHierarchyRoot(v),y=!o.uniformtext.mode&&dy.hasTransition(a),C=dy.getMaxDepth(l),k=function(Te){return Te.data.depth-v.data.depth-1?A+F:-(m+F):0,I={x0:T,x1:T,y0:E,y1:E+m},R=function(Te,Ve,$e){var ot=l.tiling.pad,tt=function(bt){return bt-ot<=Ve.x0},nt=function(bt){return bt+ot>=Ve.x1},We=function(bt){return bt-ot<=Ve.y0},mt=function(bt){return bt+ot>=Ve.y1};return Te.x0===Ve.x0&&Te.x1===Ve.x1&&Te.y0===Ve.y0&&Te.y1===Ve.y1?{x0:Te.x0,x1:Te.x1,y0:Te.y0,y1:Te.y1}:{x0:tt(Te.x0-ot)?0:nt(Te.x0-ot)?$e[0]:Te.x0,x1:tt(Te.x1+ot)?0:nt(Te.x1+ot)?$e[0]:Te.x1,y0:We(Te.y0-ot)?0:mt(Te.y0-ot)?$e[1]:Te.y0,y1:We(Te.y1+ot)?0:mt(Te.y1+ot)?$e[1]:Te.y1}},B=null,O={},V={},j=null,q=function(Te,Ve){return Ve?O[e_(Te)]:V[e_(Te)]},U=function(Te,Ve,$e,ot){if(Ve)return O[e_(f)]||I;var tt=V[l.level]||$e;return k(Te)?R(Te,tt,ot):{}};s.hasMultipleRoots&&_&&C++,l._maxDepth=C,l._backgroundColor=o.paper_bgcolor,l._entryDepth=v.data.depth,l._atRootLevel=_;var J=-w/2+S.l+S.w*(L.x[1]+L.x[0])/2,ee=-A/2+S.t+S.h*(1-(L.y[1]+L.y[0])/2),ce=function(Te){return J+Te},ye=function(Te){return ee+Te},xe=ye(0),ue=ce(0),K=function(Te){return ue+Te},_e=function(Te){return xe+Te};function ne(Te,Ve){return Te+","+Ve}var ae=K(0),pe=function(Te){Te.x=Math.max(ae,Te.x)},ie=l.pathbar.edgeshape,le=function(Te){var Ve=K(Math.max(Math.min(Te.x0,Te.x0),0)),$e=K(Math.min(Math.max(Te.x1,Te.x1),T)),ot=_e(Te.y0),tt=_e(Te.y1),nt=m/2,We={},mt={};We.x=Ve,mt.x=$e,We.y=mt.y=(ot+tt)/2;var bt={x:Ve,y:ot},Yt={x:$e,y:ot},jt={x:$e,y:tt},mr={x:Ve,y:tt};return ie===">"?(bt.x-=nt,Yt.x-=nt,jt.x-=nt,mr.x-=nt):ie==="/"?(jt.x-=nt,mr.x-=nt,We.x-=nt/2,mt.x-=nt/2):ie==="\\"?(bt.x-=nt,Yt.x-=nt,We.x-=nt/2,mt.x-=nt/2):ie==="<"&&(We.x-=nt,mt.x-=nt),pe(bt),pe(mr),pe(We),pe(Yt),pe(jt),pe(mt),"M"+ne(bt.x,bt.y)+"L"+ne(Yt.x,Yt.y)+"L"+ne(mt.x,mt.y)+"L"+ne(jt.x,jt.y)+"L"+ne(mr.x,mr.y)+"L"+ne(We.x,We.y)+"Z"},me=l[c?"tiling":"marker"].pad,be=function(Te){return l.textposition.indexOf(Te)!==-1},De=be("top"),Ge=be("left"),ht=be("right"),it=be("bottom"),Oe=function(Te){var Ve=ce(Te.x0),$e=ce(Te.x1),ot=ye(Te.y0),tt=ye(Te.y1),nt=$e-Ve,We=tt-ot;if(!nt||!We)return"";var mt=l.marker.cornerradius||0,bt=Math.min(mt,nt/2,We/2);bt&&Te.data&&Te.data.data&&Te.data.data.label&&(De&&(bt=Math.min(bt,me.t)),Ge&&(bt=Math.min(bt,me.l)),ht&&(bt=Math.min(bt,me.r)),it&&(bt=Math.min(bt,me.b)));var Yt=function(jt,mr){return bt?"a"+ne(bt,bt)+" 0 0 1 "+ne(jt,mr):""};return"M"+ne(Ve,ot+bt)+Yt(bt,-bt)+"L"+ne($e-bt,ot)+Yt(bt,bt)+"L"+ne($e,tt-bt)+Yt(-bt,bt)+"L"+ne(Ve+bt,tt)+Yt(-bt,-bt)+"Z"},ze=function(Te,Ve){var $e=Te.x0,ot=Te.x1,tt=Te.y0,nt=Te.y1,We=Te.textBB,mt=De||Ve.isHeader&&!it,bt=mt?"start":it?"end":"middle",Yt=be("right"),jt=be("left")||Ve.onPathbar,mr=jt?-1:Yt?1:0;if(Ve.isHeader){if($e+=(c?me:me.l)-D9e,ot-=(c?me:me.r)-D9e,$e>=ot){var or=($e+ot)/2;$e=or,ot=or}var fr;it?(fr=nt-(c?me:me.b),tt{"use strict";var Lqt=xi(),Pqt=Ag(),Fqt=kh(),Dqt=Fqt.clearMinTextSize,Rqt=_v().resizeText,z9e=I9e();q9e.exports=function(t,r,n,a,i){var o=i.type,s=i.drawDescendants,l=t._fullLayout,u=l["_"+o+"layer"],c,f,v=!n;if(Dqt(o,l),c=u.selectAll("g.trace."+o).data(r,function(p){return p[0].trace.uid}),c.enter().append("g").classed("trace",!0).classed(o,!0),c.order(),!l.uniformtext.mode&&Pqt.hasTransition(n)){a&&(f=a());var g=Lqt.transition().duration(n.duration).ease(n.easing).each("end",function(){f&&f()}).each("interrupt",function(){f&&f()});g.each(function(){u.selectAll("g.trace").each(function(p){z9e(t,p,this,n,s)})})}else c.each(function(p){z9e(t,p,this,n,s)}),l.uniformtext.mode&&Rqt(t,u.selectAll(".trace"),o);v&&c.exit().remove()}});var V9e=fe((c3r,U9e)=>{"use strict";var B9e=xi(),sP=Xt(),O9e=ea(),Iqt=as(),zqt=YW(),N9e=aP().styleOne,eY=J2(),vy=Ag(),qqt=J6(),Bqt=nP().formatSliceLabel,tY=!1;U9e.exports=function(t,r,n,a,i){var o=i.width,s=i.height,l=i.viewX,u=i.viewY,c=i.pathSlice,f=i.toMoveInsideSlice,v=i.strTransform,g=i.hasTransition,p=i.handleSlicesExit,x=i.makeUpdateSliceInterpolator,_=i.makeUpdateTextInterpolator,y=i.prevEntry,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,A=w.textposition.indexOf("left")!==-1,T=w.textposition.indexOf("right")!==-1,m=w.textposition.indexOf("bottom")!==-1,F=!m&&!w.marker.pad.t||m&&!w.marker.pad.b,E=zqt(n,[o,s],{packing:w.tiling.packing,squarifyratio:w.tiling.squarifyratio,flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1,pad:{inner:w.tiling.pad,top:w.marker.pad.t,left:w.marker.pad.l,right:w.marker.pad.r,bottom:w.marker.pad.b}}),I=E.descendants(),R=1/0,B=-1/0;I.forEach(function(U){var J=U.depth;J>=w._maxDepth?(U.x0=U.x1=(U.x0+U.x1)/2,U.y0=U.y1=(U.y0+U.y1)/2):(R=Math.min(R,J),B=Math.max(B,J))}),a=a.data(I,vy.getPtId),w._maxVisibleLayers=isFinite(B)?B-R+1:0,a.enter().append("g").classed("slice",!0),p(a,tY,C,[o,s],c),a.order();var O=null;if(g&&y){var V=vy.getPtId(y);a.each(function(U){O===null&&vy.getPtId(U)===V&&(O={x0:U.x0,x1:U.x1,y0:U.y0,y1:U.y1})})}var j=function(){return O||{x0:0,x1:o,y0:0,y1:s}},q=a;return g&&(q=q.transition().each("end",function(){var U=B9e.select(this);vy.setSliceCursor(U,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),q.each(function(U){var J=vy.isHeader(U,w);U._x0=l(U.x0),U._x1=l(U.x1),U._y0=u(U.y0),U._y1=u(U.y1),U._hoverX=l(U.x1-w.marker.pad.r),U._hoverY=u(m?U.y1-w.marker.pad.b/2:U.y0+w.marker.pad.t/2);var ee=B9e.select(this),ce=sP.ensureSingle(ee,"path","surface",function(ne){ne.style("pointer-events",k?"none":"all")});g?ce.transition().attrTween("d",function(ne){var ae=x(ne,tY,j(),[o,s]);return function(pe){return c(ae(pe))}}):ce.attr("d",c),ee.call(qqt,n,t,r,{styleOne:N9e,eventDataKeys:eY.eventDataKeys,transitionTime:eY.CLICK_TRANSITION_TIME,transitionEasing:eY.CLICK_TRANSITION_EASING}).call(vy.setSliceCursor,t,{isTransitioning:t._transitioning}),ce.call(N9e,U,w,t,{hovered:!1}),U.x0===U.x1||U.y0===U.y1?U._text="":J?U._text=F?"":vy.getPtLabel(U)||"":U._text=Bqt(U,n,w,r,S)||"";var ye=sP.ensureSingle(ee,"g","slicetext"),xe=sP.ensureSingle(ye,"text","",function(ne){ne.attr("data-notex",1)}),ue=sP.ensureUniformFontSize(t,vy.determineTextFont(w,U,S.font)),K=U._text||" ",_e=J&&K.indexOf("
")===-1;xe.text(K).classed("slicetext",!0).attr("text-anchor",T?"end":A||_e?"start":"middle").call(O9e.font,ue).call(Iqt.convertToTspans,t),U.textBB=O9e.bBox(xe.node()),U.transform=f(U,{fontSize:ue.size,isHeader:J}),U.transform.fontSize=ue.size,g?xe.transition().attrTween("transform",function(ne){var ae=_(ne,tY,j(),[o,s]);return function(pe){return v(ae(pe))}}):xe.attr("transform",v(U))}),O}});var H9e=fe((f3r,G9e)=>{"use strict";var Oqt=QW(),Nqt=V9e();G9e.exports=function(t,r,n,a){return Oqt(t,r,n,a,{type:"treemap",drawDescendants:Nqt})}});var W9e=fe((h3r,j9e)=>{"use strict";j9e.exports={moduleType:"trace",name:"treemap",basePlotModule:l9e(),categories:[],animatable:!0,attributes:iP(),layoutAttributes:GW(),supplyDefaults:m9e(),supplyLayoutDefaults:x9e(),calc:jW().calc,crossTraceCalc:jW().crossTraceCalc,plot:H9e(),style:aP().style,colorbar:Zf(),meta:{}}});var X9e=fe((d3r,Y9e)=>{"use strict";Y9e.exports=W9e()});var $9e=fe(Ww=>{"use strict";var Z9e=Hs();Ww.name="icicle";Ww.plot=function(e,t,r,n){Z9e.plotBasePlot(Ww.name,e,t,r,n)};Ww.clean=function(e,t,r,n){Z9e.cleanBasePlot(Ww.name,e,t,r,n)}});var rY=fe((p3r,Q9e)=>{"use strict";var{hovertemplateAttrs:Uqt,texttemplateAttrs:Vqt,templatefallbackAttrs:K9e}=Oo(),Gqt=_s(),Hqt=nl().attributes,tM=U2(),N0=B6(),lP=iP(),J9e=J2(),jqt=ta().extendFlat,Wqt=Uc().pattern;Q9e.exports={labels:N0.labels,parents:N0.parents,values:N0.values,branchvalues:N0.branchvalues,count:N0.count,level:N0.level,maxdepth:N0.maxdepth,tiling:{orientation:{valType:"enumerated",values:["v","h"],dflt:"h",editType:"plot"},flip:lP.tiling.flip,pad:{valType:"number",min:0,dflt:0,editType:"plot"},editType:"calc"},marker:jqt({colors:N0.marker.colors,line:N0.marker.line,pattern:Wqt,editType:"calc"},Gqt("marker",{colorAttr:"colors",anim:!1})),leaf:N0.leaf,pathbar:lP.pathbar,text:tM.text,textinfo:N0.textinfo,texttemplate:Vqt({editType:"plot"},{keys:J9e.eventDataKeys.concat(["label","value"])}),texttemplatefallback:K9e({editType:"plot"}),hovertext:tM.hovertext,hoverinfo:N0.hoverinfo,hovertemplate:Uqt({},{keys:J9e.eventDataKeys}),hovertemplatefallback:K9e(),textfont:tM.textfont,insidetextfont:tM.insidetextfont,outsidetextfont:lP.outsidetextfont,textposition:lP.textposition,sort:tM.sort,root:N0.root,domain:Hqt({name:"icicle",trace:!0,editType:"calc"})}});var nY=fe((g3r,ePe)=>{"use strict";ePe.exports={iciclecolorway:{valType:"colorlist",editType:"calc"},extendiciclecolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var iPe=fe((m3r,nPe)=>{"use strict";var tPe=Xt(),Yqt=rY(),Xqt=ni(),Zqt=nl().defaults,$qt=z0().handleText,Kqt=Im().TEXTPAD,Jqt=V2().handleMarkerDefaults,rPe=js(),Qqt=rPe.hasColorscale,eBt=rPe.handleDefaults;nPe.exports=function(t,r,n,a){function i(g,p){return tPe.coerce(t,r,Yqt,g,p)}var o=i("labels"),s=i("parents");if(!o||!o.length||!s||!s.length){r.visible=!1;return}var l=i("values");l&&l.length?i("branchvalues"):i("count"),i("level"),i("maxdepth"),i("tiling.orientation"),i("tiling.flip"),i("tiling.pad");var u=i("text");i("texttemplate"),i("texttemplatefallback"),r.texttemplate||i("textinfo",tPe.isArrayOrTypedArray(u)?"text+label":"label"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var c=i("pathbar.visible"),f="auto";$qt(t,r,a,i,f,{hasPathbar:c,moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1}),i("textposition"),Jqt(t,r,a,i);var v=r._hasColorscale=Qqt(t,"marker","colors")||(t.marker||{}).coloraxis;v&&eBt(t,r,a,i,{prefix:"marker.",cLetter:"c"}),i("leaf.opacity",v?1:.7),r._hovered={marker:{line:{width:2,color:Xqt.contrast(a.paper_bgcolor)}}},c&&(i("pathbar.thickness",r.pathbar.textfont.size+2*Kqt),i("pathbar.side"),i("pathbar.edgeshape")),i("sort"),i("root.color"),Zqt(r,a,i),r._length=null}});var oPe=fe((y3r,aPe)=>{"use strict";var tBt=Xt(),rBt=nY();aPe.exports=function(t,r){function n(a,i){return tBt.coerce(t,r,rBt,a,i)}n("iciclecolorway",r.colorway),n("extendiciclecolors")}});var aY=fe(iY=>{"use strict";var sPe=U6();iY.calc=function(e,t){return sPe.calc(e,t)};iY.crossTraceCalc=function(e){return sPe._runCrossTraceCalc("icicle",e)}});var uPe=fe((_3r,lPe)=>{"use strict";var nBt=O6(),iBt=WW();lPe.exports=function(t,r,n){var a=n.flipX,i=n.flipY,o=n.orientation==="h",s=n.maxDepth,l=r[0],u=r[1];s&&(l=(t.height+1)*r[0]/Math.min(t.height+1,s),u=(t.height+1)*r[1]/Math.min(t.height+1,s));var c=nBt.partition().padding(n.pad.inner).size(o?[r[1],l]:[r[0],u])(t);return(o||a||i)&&iBt(c,r,{swapXY:o,flipX:a,flipY:i}),c}});var oY=fe((b3r,vPe)=>{"use strict";var cPe=xi(),fPe=ni(),hPe=Xt(),aBt=kh().resizeText,oBt=tP();function sBt(e){var t=e._fullLayout._iciclelayer.selectAll(".trace");aBt(e,t,"icicle"),t.each(function(r){var n=cPe.select(this),a=r[0],i=a.trace;n.style("opacity",i.opacity),n.selectAll("path.surface").each(function(o){cPe.select(this).call(dPe,o,i,e)})})}function dPe(e,t,r,n){var a=t.data.data,i=!t.children,o=a.i,s=hPe.castOption(r,o,"marker.line.color")||fPe.defaultLine,l=hPe.castOption(r,o,"marker.line.width")||0;e.call(oBt,t,r,n).style("stroke-width",l).call(fPe.stroke,s).style("opacity",i?r.leaf.opacity:null)}vPe.exports={style:sBt,styleOne:dPe}});var xPe=fe((w3r,yPe)=>{"use strict";var pPe=xi(),uP=Xt(),gPe=ea(),lBt=as(),uBt=uPe(),mPe=oY().styleOne,sY=J2(),Yw=Ag(),cBt=J6(),fBt=nP().formatSliceLabel,lY=!1;yPe.exports=function(t,r,n,a,i){var o=i.width,s=i.height,l=i.viewX,u=i.viewY,c=i.pathSlice,f=i.toMoveInsideSlice,v=i.strTransform,g=i.hasTransition,p=i.handleSlicesExit,x=i.makeUpdateSliceInterpolator,_=i.makeUpdateTextInterpolator,y=i.prevEntry,C={},k=t._context.staticPlot,S=t._fullLayout,L=r[0],w=L.trace,A=w.textposition.indexOf("left")!==-1,T=w.textposition.indexOf("right")!==-1,m=w.textposition.indexOf("bottom")!==-1,F=uBt(n,[o,s],{flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1,orientation:w.tiling.orientation,pad:{inner:w.tiling.pad},maxDepth:w._maxDepth}),E=F.descendants(),I=1/0,R=-1/0;E.forEach(function(q){var U=q.depth;U>=w._maxDepth?(q.x0=q.x1=(q.x0+q.x1)/2,q.y0=q.y1=(q.y0+q.y1)/2):(I=Math.min(I,U),R=Math.max(R,U))}),a=a.data(E,Yw.getPtId),w._maxVisibleLayers=isFinite(R)?R-I+1:0,a.enter().append("g").classed("slice",!0),p(a,lY,C,[o,s],c),a.order();var B=null;if(g&&y){var O=Yw.getPtId(y);a.each(function(q){B===null&&Yw.getPtId(q)===O&&(B={x0:q.x0,x1:q.x1,y0:q.y0,y1:q.y1})})}var V=function(){return B||{x0:0,x1:o,y0:0,y1:s}},j=a;return g&&(j=j.transition().each("end",function(){var q=pPe.select(this);Yw.setSliceCursor(q,t,{hideOnRoot:!0,hideOnLeaves:!1,isTransitioning:!1})})),j.each(function(q){q._x0=l(q.x0),q._x1=l(q.x1),q._y0=u(q.y0),q._y1=u(q.y1),q._hoverX=l(q.x1-w.tiling.pad),q._hoverY=u(m?q.y1-w.tiling.pad/2:q.y0+w.tiling.pad/2);var U=pPe.select(this),J=uP.ensureSingle(U,"path","surface",function(xe){xe.style("pointer-events",k?"none":"all")});g?J.transition().attrTween("d",function(xe){var ue=x(xe,lY,V(),[o,s],{orientation:w.tiling.orientation,flipX:w.tiling.flip.indexOf("x")>-1,flipY:w.tiling.flip.indexOf("y")>-1});return function(K){return c(ue(K))}}):J.attr("d",c),U.call(cBt,n,t,r,{styleOne:mPe,eventDataKeys:sY.eventDataKeys,transitionTime:sY.CLICK_TRANSITION_TIME,transitionEasing:sY.CLICK_TRANSITION_EASING}).call(Yw.setSliceCursor,t,{isTransitioning:t._transitioning}),J.call(mPe,q,w,t,{hovered:!1}),q.x0===q.x1||q.y0===q.y1?q._text="":q._text=fBt(q,n,w,r,S)||"";var ee=uP.ensureSingle(U,"g","slicetext"),ce=uP.ensureSingle(ee,"text","",function(xe){xe.attr("data-notex",1)}),ye=uP.ensureUniformFontSize(t,Yw.determineTextFont(w,q,S.font));ce.text(q._text||" ").classed("slicetext",!0).attr("text-anchor",T?"end":A?"start":"middle").call(gPe.font,ye).call(lBt.convertToTspans,t),q.textBB=gPe.bBox(ce.node()),q.transform=f(q,{fontSize:ye.size}),q.transform.fontSize=ye.size,g?ce.transition().attrTween("transform",function(xe){var ue=_(xe,lY,V(),[o,s]);return function(K){return v(ue(K))}}):ce.attr("transform",v(q))}),B}});var bPe=fe((T3r,_Pe)=>{"use strict";var hBt=QW(),dBt=xPe();_Pe.exports=function(t,r,n,a){return hBt(t,r,n,a,{type:"icicle",drawDescendants:dBt})}});var TPe=fe((A3r,wPe)=>{"use strict";wPe.exports={moduleType:"trace",name:"icicle",basePlotModule:$9e(),categories:[],animatable:!0,attributes:rY(),layoutAttributes:nY(),supplyDefaults:iPe(),supplyLayoutDefaults:oPe(),calc:aY().calc,crossTraceCalc:aY().crossTraceCalc,plot:bPe(),style:oY().style,colorbar:Zf(),meta:{}}});var MPe=fe((M3r,APe)=>{"use strict";APe.exports=TPe()});var EPe=fe(Xw=>{"use strict";var SPe=Hs();Xw.name="funnelarea";Xw.plot=function(e,t,r,n){SPe.plotBasePlot(Xw.name,e,t,r,n)};Xw.clean=function(e,t,r,n){SPe.cleanBasePlot(Xw.name,e,t,r,n)}});var uY=fe((E3r,CPe)=>{"use strict";var eh=U2(),vBt=Ho(),pBt=nl().attributes,{hovertemplateAttrs:gBt,texttemplateAttrs:mBt,templatefallbackAttrs:kPe}=Oo(),t_=ta().extendFlat;CPe.exports={labels:eh.labels,label0:eh.label0,dlabel:eh.dlabel,values:eh.values,marker:{colors:eh.marker.colors,line:{color:t_({},eh.marker.line.color,{dflt:null}),width:t_({},eh.marker.line.width,{dflt:1}),editType:"calc"},pattern:eh.marker.pattern,editType:"calc"},text:eh.text,hovertext:eh.hovertext,scalegroup:t_({},eh.scalegroup,{}),textinfo:t_({},eh.textinfo,{flags:["label","text","value","percent"]}),texttemplate:mBt({editType:"plot"},{keys:["label","color","value","text","percent"]}),texttemplatefallback:kPe({editType:"plot"}),hoverinfo:t_({},vBt.hoverinfo,{flags:["label","text","value","percent","name"]}),hovertemplate:gBt({},{keys:["label","color","value","text","percent"]}),hovertemplatefallback:kPe(),textposition:t_({},eh.textposition,{values:["inside","none"],dflt:"inside"}),textfont:eh.textfont,insidetextfont:eh.insidetextfont,title:{text:eh.title.text,font:eh.title.font,position:t_({},eh.title.position,{values:["top left","top center","top right"],dflt:"top center"}),editType:"plot"},domain:pBt({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"}}});var cY=fe((k3r,LPe)=>{"use strict";var yBt=L9().hiddenlabels;LPe.exports={hiddenlabels:yBt,funnelareacolorway:{valType:"colorlist",editType:"calc"},extendfunnelareacolors:{valType:"boolean",dflt:!0,editType:"calc"}}});var DPe=fe((C3r,FPe)=>{"use strict";var PPe=Xt(),xBt=uY(),_Bt=nl().defaults,bBt=z0().handleText,wBt=V2().handleLabelsAndValues,TBt=V2().handleMarkerDefaults;FPe.exports=function(t,r,n,a){function i(x,_){return PPe.coerce(t,r,xBt,x,_)}var o=i("labels"),s=i("values"),l=wBt(o,s),u=l.len;if(r._hasLabels=l.hasLabels,r._hasValues=l.hasValues,!r._hasLabels&&r._hasValues&&(i("label0"),i("dlabel")),!u){r.visible=!1;return}r._length=u,TBt(t,r,a,i),i("scalegroup");var c=i("text"),f=i("texttemplate");i("texttemplatefallback");var v;if(f||(v=i("textinfo",Array.isArray(c)?"text+percent":"percent")),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),f||v&&v!=="none"){var g=i("textposition");bBt(t,r,a,i,g,{moduleHasSelected:!1,moduleHasUnselected:!1,moduleHasConstrain:!1,moduleHasCliponaxis:!1,moduleHasTextangle:!1,moduleHasInsideanchor:!1})}else v==="none"&&i("textposition","none");_Bt(r,a,i);var p=i("title.text");p&&(i("title.position"),PPe.coerceFont(i,"title.font",a.font)),i("aspectratio"),i("baseratio")}});var IPe=fe((L3r,RPe)=>{"use strict";var ABt=Xt(),MBt=cY();RPe.exports=function(t,r){function n(a,i){return ABt.coerce(t,r,MBt,a,i)}n("hiddenlabels"),n("funnelareacolorway",r.colorway),n("extendfunnelareacolors")}});var fY=fe((P3r,qPe)=>{"use strict";var zPe=Lw();function SBt(e,t){return zPe.calc(e,t)}function EBt(e){zPe.crossTraceCalc(e,{type:"funnelarea"})}qPe.exports={calc:SBt,crossTraceCalc:EBt}});var VPe=fe((F3r,UPe)=>{"use strict";var r_=xi(),hY=ea(),py=Xt(),kBt=py.strScale,BPe=py.strTranslate,OPe=as(),CBt=m2(),LBt=CBt.toMoveInsideBar,NPe=kh(),PBt=NPe.recordMinTextSize,FBt=NPe.clearMinTextSize,DBt=Sm(),Zw=R9(),RBt=Zw.attachFxHandlers,IBt=Zw.determineInsideTextFont,zBt=Zw.layoutAreas,qBt=Zw.prerenderTitles,BBt=Zw.positionTitleOutside,OBt=Zw.formatSliceLabel;UPe.exports=function(t,r){var n=t._context.staticPlot,a=t._fullLayout;FBt("funnelarea",a),qBt(r,t),zBt(r,a._size),py.makeTraceGroups(a._funnelarealayer,r,"trace").each(function(i){var o=r_.select(this),s=i[0],l=s.trace;UBt(i),o.each(function(){var u=r_.select(this).selectAll("g.slice").data(i);u.enter().append("g").classed("slice",!0),u.exit().remove(),u.each(function(f,v){if(f.hidden){r_.select(this).selectAll("path,g").remove();return}f.pointNumber=f.i,f.curveNumber=l.index;var g=s.cx,p=s.cy,x=r_.select(this),_=x.selectAll("path.surface").data([f]);_.enter().append("path").classed("surface",!0).style({"pointer-events":n?"none":"all"}),x.call(RBt,t,i);var y="M"+(g+f.TR[0])+","+(p+f.TR[1])+dY(f.TR,f.BR)+dY(f.BR,f.BL)+dY(f.BL,f.TL)+"Z";_.attr("d",y),OBt(t,f,s);var C=DBt.castOption(l.textposition,f.pts),k=x.selectAll("g.slicetext").data(f.text&&C!=="none"?[0]:[]);k.enter().append("g").classed("slicetext",!0),k.exit().remove(),k.each(function(){var S=py.ensureSingle(r_.select(this),"text","",function(I){I.attr("data-notex",1)}),L=py.ensureUniformFontSize(t,IBt(l,f,a.font));S.text(f.text).attr({class:"slicetext",transform:"","text-anchor":"middle"}).call(hY.font,L).call(OPe.convertToTspans,t);var w=hY.bBox(S.node()),A,T,m,F=Math.min(f.BL[1],f.BR[1])+p,E=Math.max(f.TL[1],f.TR[1])+p;T=Math.max(f.TL[0],f.BL[0])+g,m=Math.min(f.TR[0],f.BR[0])+g,A=LBt(T,m,F,E,w,{isHorizontal:!0,constrained:!0,angle:0,anchor:"middle"}),A.fontSize=L.size,PBt(l.type,A,a),i[v].transform=A,py.setTransormAndDisplay(S,A)})});var c=r_.select(this).selectAll("g.titletext").data(l.title.text?[0]:[]);c.enter().append("g").classed("titletext",!0),c.exit().remove(),c.each(function(){var f=py.ensureSingle(r_.select(this),"text","",function(p){p.attr("data-notex",1)}),v=l.title.text;l._meta&&(v=py.templateString(v,l._meta)),f.text(v).attr({class:"titletext",transform:"","text-anchor":"middle"}).call(hY.font,l.title.font).call(OPe.convertToTspans,t);var g=BBt(s,a._size);f.attr("transform",BPe(g.x,g.y)+kBt(Math.min(1,g.scale))+BPe(g.tx,g.ty))})})})};function dY(e,t){var r=t[0]-e[0],n=t[1]-e[1];return"l"+r+","+n}function NBt(e,t){return[.5*(e[0]+t[0]),.5*(e[1]+t[1])]}function UBt(e){if(!e.length)return;var t=e[0],r=t.trace,n=r.aspectratio,a=r.baseratio;a>.999&&(a=.999);var i=Math.pow(a,2),o=t.vTotal,s=o*i/(1-i),l=o,u=s/o;function c(){var R=Math.sqrt(u);return{x:R,y:-R}}function f(){var R=c();return[R.x,R.y]}var v,g=[];g.push(f());var p,x;for(p=e.length-1;p>-1;p--)if(x=e[p],!x.hidden){var _=x.v/l;u+=_,g.push(f())}var y=1/0,C=-1/0;for(p=0;p-1;p--)if(x=e[p],!x.hidden){F+=1;var E=g[F][0],I=g[F][1];x.TL=[-E,I],x.TR=[E,I],x.BL=T,x.BR=m,x.pxmid=NBt(x.TR,x.BR),T=x.TL,m=x.TR}}});var jPe=fe((D3r,HPe)=>{"use strict";var GPe=xi(),VBt=Jb(),GBt=kh().resizeText;HPe.exports=function(t){var r=t._fullLayout._funnelarealayer.selectAll(".trace");GBt(t,r,"funnelarea"),r.each(function(n){var a=n[0],i=a.trace,o=GPe.select(this);o.style({opacity:i.opacity}),o.selectAll("path.surface").each(function(s){GPe.select(this).call(VBt,s,i,t)})})}});var YPe=fe((R3r,WPe)=>{"use strict";WPe.exports={moduleType:"trace",name:"funnelarea",basePlotModule:EPe(),categories:["pie-like","funnelarea","showLegend"],attributes:uY(),layoutAttributes:cY(),supplyDefaults:DPe(),supplyLayoutDefaults:IPe(),calc:fY().calc,crossTraceCalc:fY().crossTraceCalc,plot:VPe(),style:jPe(),styleOne:Jb(),meta:{}}});var ZPe=fe((I3r,XPe)=>{"use strict";XPe.exports=YPe()});var xf=fe((z3r,$Pe)=>{"use strict";(function(){var e={1964:(function(a,i,o){a.exports={alpha_shape:o(3502),convex_hull:o(7352),delaunay_triangulate:o(7642),gl_cone3d:o(6405),gl_error3d:o(9165),gl_line3d:o(5714),gl_mesh3d:o(7201),gl_plot3d:o(4100),gl_scatter3d:o(8418),gl_streamtube3d:o(7815),gl_surface3d:o(9499),ndarray:o(9618),ndarray_linear_interpolate:o(4317)}}),4793:(function(a,i,o){"use strict";var s;var l=o(7507),u=o(3778),c=typeof Symbol=="function"&&typeof Symbol.for=="function"?Symbol.for("nodejs.util.inspect.custom"):null;i.hp=p,s=m,i.IS=50;var f=2147483647;s=f,p.TYPED_ARRAY_SUPPORT=v(),!p.TYPED_ARRAY_SUPPORT&&typeof console!="undefined"&&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 v(){try{var qe=new Uint8Array(1),we={foo:function(){return 42}};return Object.setPrototypeOf(we,Uint8Array.prototype),Object.setPrototypeOf(qe,we),qe.foo()===42}catch(Le){return!1}}Object.defineProperty(p.prototype,"parent",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.buffer}}),Object.defineProperty(p.prototype,"offset",{enumerable:!0,get:function(){if(p.isBuffer(this))return this.byteOffset}});function g(qe){if(qe>f)throw new RangeError('The value "'+qe+'" is invalid for option "size"');var we=new Uint8Array(qe);return Object.setPrototypeOf(we,p.prototype),we}function p(qe,we,Le){if(typeof qe=="number"){if(typeof we=="string")throw new TypeError('The "string" argument must be of type string. Received type number');return C(qe)}return x(qe,we,Le)}p.poolSize=8192;function x(qe,we,Le){if(typeof qe=="string")return k(qe,we);if(ArrayBuffer.isView(qe))return L(qe);if(qe==null)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof qe);if(ze(qe,ArrayBuffer)||qe&&ze(qe.buffer,ArrayBuffer)||typeof SharedArrayBuffer!="undefined"&&(ze(qe,SharedArrayBuffer)||qe&&ze(qe.buffer,SharedArrayBuffer)))return w(qe,we,Le);if(typeof qe=="number")throw new TypeError('The "value" argument must not be of type number. Received type number');var Ke=qe.valueOf&&qe.valueOf();if(Ke!=null&&Ke!==qe)return p.from(Ke,we,Le);var Te=A(qe);if(Te)return Te;if(typeof Symbol!="undefined"&&Symbol.toPrimitive!=null&&typeof qe[Symbol.toPrimitive]=="function")return p.from(qe[Symbol.toPrimitive]("string"),we,Le);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof qe)}p.from=function(qe,we,Le){return x(qe,we,Le)},Object.setPrototypeOf(p.prototype,Uint8Array.prototype),Object.setPrototypeOf(p,Uint8Array);function _(qe){if(typeof qe!="number")throw new TypeError('"size" argument must be of type number');if(qe<0)throw new RangeError('The value "'+qe+'" is invalid for option "size"')}function y(qe,we,Le){return _(qe),qe<=0?g(qe):we!==void 0?typeof Le=="string"?g(qe).fill(we,Le):g(qe).fill(we):g(qe)}p.alloc=function(qe,we,Le){return y(qe,we,Le)};function C(qe){return _(qe),g(qe<0?0:T(qe)|0)}p.allocUnsafe=function(qe){return C(qe)},p.allocUnsafeSlow=function(qe){return C(qe)};function k(qe,we){if((typeof we!="string"||we==="")&&(we="utf8"),!p.isEncoding(we))throw new TypeError("Unknown encoding: "+we);var Le=F(qe,we)|0,Ke=g(Le),Te=Ke.write(qe,we);return Te!==Le&&(Ke=Ke.slice(0,Te)),Ke}function S(qe){for(var we=qe.length<0?0:T(qe.length)|0,Le=g(we),Ke=0;Ke=f)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+f.toString(16)+" bytes");return qe|0}function m(qe){return+qe!=qe&&(qe=0),p.alloc(+qe)}p.isBuffer=function(we){return we!=null&&we._isBuffer===!0&&we!==p.prototype},p.compare=function(we,Le){if(ze(we,Uint8Array)&&(we=p.from(we,we.offset,we.byteLength)),ze(Le,Uint8Array)&&(Le=p.from(Le,Le.offset,Le.byteLength)),!p.isBuffer(we)||!p.isBuffer(Le))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(we===Le)return 0;for(var Ke=we.length,Te=Le.length,Ve=0,$e=Math.min(Ke,Te);Ve<$e;++Ve)if(we[Ve]!==Le[Ve]){Ke=we[Ve],Te=Le[Ve];break}return KeTe.length?p.from($e).copy(Te,Ve):Uint8Array.prototype.set.call(Te,$e,Ve);else if(p.isBuffer($e))$e.copy(Te,Ve);else throw new TypeError('"list" argument must be an Array of Buffers');Ve+=$e.length}return Te};function F(qe,we){if(p.isBuffer(qe))return qe.length;if(ArrayBuffer.isView(qe)||ze(qe,ArrayBuffer))return qe.byteLength;if(typeof qe!="string")throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof qe);var Le=qe.length,Ke=arguments.length>2&&arguments[2]===!0;if(!Ke&&Le===0)return 0;for(var Te=!1;;)switch(we){case"ascii":case"latin1":case"binary":return Le;case"utf8":case"utf-8":return De(qe).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return Le*2;case"hex":return Le>>>1;case"base64":return it(qe).length;default:if(Te)return Ke?-1:De(qe).length;we=(""+we).toLowerCase(),Te=!0}}p.byteLength=F;function E(qe,we,Le){var Ke=!1;if((we===void 0||we<0)&&(we=0),we>this.length||((Le===void 0||Le>this.length)&&(Le=this.length),Le<=0)||(Le>>>=0,we>>>=0,Le<=we))return"";for(qe||(qe="utf8");;)switch(qe){case"hex":return K(this,we,Le);case"utf8":case"utf-8":return ee(this,we,Le);case"ascii":return xe(this,we,Le);case"latin1":case"binary":return ue(this,we,Le);case"base64":return J(this,we,Le);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return _e(this,we,Le);default:if(Ke)throw new TypeError("Unknown encoding: "+qe);qe=(qe+"").toLowerCase(),Ke=!0}}p.prototype._isBuffer=!0;function I(qe,we,Le){var Ke=qe[we];qe[we]=qe[Le],qe[Le]=Ke}p.prototype.swap16=function(){var we=this.length;if(we%2!==0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var Le=0;LeLe&&(we+=" ... "),""},c&&(p.prototype[c]=p.prototype.inspect),p.prototype.compare=function(we,Le,Ke,Te,Ve){if(ze(we,Uint8Array)&&(we=p.from(we,we.offset,we.byteLength)),!p.isBuffer(we))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof we);if(Le===void 0&&(Le=0),Ke===void 0&&(Ke=we?we.length:0),Te===void 0&&(Te=0),Ve===void 0&&(Ve=this.length),Le<0||Ke>we.length||Te<0||Ve>this.length)throw new RangeError("out of range index");if(Te>=Ve&&Le>=Ke)return 0;if(Te>=Ve)return-1;if(Le>=Ke)return 1;if(Le>>>=0,Ke>>>=0,Te>>>=0,Ve>>>=0,this===we)return 0;for(var $e=Ve-Te,ot=Ke-Le,tt=Math.min($e,ot),nt=this.slice(Te,Ve),We=we.slice(Le,Ke),mt=0;mt2147483647?Le=2147483647:Le<-2147483648&&(Le=-2147483648),Le=+Le,ct(Le)&&(Le=Te?0:qe.length-1),Le<0&&(Le=qe.length+Le),Le>=qe.length){if(Te)return-1;Le=qe.length-1}else if(Le<0)if(Te)Le=0;else return-1;if(typeof we=="string"&&(we=p.from(we,Ke)),p.isBuffer(we))return we.length===0?-1:B(qe,we,Le,Ke,Te);if(typeof we=="number")return we=we&255,typeof Uint8Array.prototype.indexOf=="function"?Te?Uint8Array.prototype.indexOf.call(qe,we,Le):Uint8Array.prototype.lastIndexOf.call(qe,we,Le):B(qe,[we],Le,Ke,Te);throw new TypeError("val must be string, number or Buffer")}function B(qe,we,Le,Ke,Te){var Ve=1,$e=qe.length,ot=we.length;if(Ke!==void 0&&(Ke=String(Ke).toLowerCase(),Ke==="ucs2"||Ke==="ucs-2"||Ke==="utf16le"||Ke==="utf-16le")){if(qe.length<2||we.length<2)return-1;Ve=2,$e/=2,ot/=2,Le/=2}function tt(Yt,jt){return Ve===1?Yt[jt]:Yt.readUInt16BE(jt*Ve)}var nt;if(Te){var We=-1;for(nt=Le;nt<$e;nt++)if(tt(qe,nt)===tt(we,We===-1?0:nt-We)){if(We===-1&&(We=nt),nt-We+1===ot)return We*Ve}else We!==-1&&(nt-=nt-We),We=-1}else for(Le+ot>$e&&(Le=$e-ot),nt=Le;nt>=0;nt--){for(var mt=!0,bt=0;btTe&&(Ke=Te)):Ke=Te;var Ve=we.length;Ke>Ve/2&&(Ke=Ve/2);for(var $e=0;$e>>0,isFinite(Ke)?(Ke=Ke>>>0,Te===void 0&&(Te="utf8")):(Te=Ke,Ke=void 0);else throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");var Ve=this.length-Le;if((Ke===void 0||Ke>Ve)&&(Ke=Ve),we.length>0&&(Ke<0||Le<0)||Le>this.length)throw new RangeError("Attempt to write outside buffer bounds");Te||(Te="utf8");for(var $e=!1;;)switch(Te){case"hex":return O(this,we,Le,Ke);case"utf8":case"utf-8":return V(this,we,Le,Ke);case"ascii":case"latin1":case"binary":return j(this,we,Le,Ke);case"base64":return q(this,we,Le,Ke);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return U(this,we,Le,Ke);default:if($e)throw new TypeError("Unknown encoding: "+Te);Te=(""+Te).toLowerCase(),$e=!0}},p.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};function J(qe,we,Le){return we===0&&Le===qe.length?l.fromByteArray(qe):l.fromByteArray(qe.slice(we,Le))}function ee(qe,we,Le){Le=Math.min(qe.length,Le);for(var Ke=[],Te=we;Te239?4:Ve>223?3:Ve>191?2:1;if(Te+ot<=Le){var tt,nt,We,mt;switch(ot){case 1:Ve<128&&($e=Ve);break;case 2:tt=qe[Te+1],(tt&192)===128&&(mt=(Ve&31)<<6|tt&63,mt>127&&($e=mt));break;case 3:tt=qe[Te+1],nt=qe[Te+2],(tt&192)===128&&(nt&192)===128&&(mt=(Ve&15)<<12|(tt&63)<<6|nt&63,mt>2047&&(mt<55296||mt>57343)&&($e=mt));break;case 4:tt=qe[Te+1],nt=qe[Te+2],We=qe[Te+3],(tt&192)===128&&(nt&192)===128&&(We&192)===128&&(mt=(Ve&15)<<18|(tt&63)<<12|(nt&63)<<6|We&63,mt>65535&&mt<1114112&&($e=mt))}}$e===null?($e=65533,ot=1):$e>65535&&($e-=65536,Ke.push($e>>>10&1023|55296),$e=56320|$e&1023),Ke.push($e),Te+=ot}return ye(Ke)}var ce=4096;function ye(qe){var we=qe.length;if(we<=ce)return String.fromCharCode.apply(String,qe);for(var Le="",Ke=0;KeKe)&&(Le=Ke);for(var Te="",Ve=we;VeKe&&(we=Ke),Le<0?(Le+=Ke,Le<0&&(Le=0)):Le>Ke&&(Le=Ke),LeLe)throw new RangeError("Trying to access beyond buffer length")}p.prototype.readUintLE=p.prototype.readUIntLE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we],Ve=1,$e=0;++$e>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we+--Le],Ve=1;Le>0&&(Ve*=256);)Te+=this[we+--Le]*Ve;return Te},p.prototype.readUint8=p.prototype.readUInt8=function(we,Le){return we=we>>>0,Le||ne(we,1,this.length),this[we]},p.prototype.readUint16LE=p.prototype.readUInt16LE=function(we,Le){return we=we>>>0,Le||ne(we,2,this.length),this[we]|this[we+1]<<8},p.prototype.readUint16BE=p.prototype.readUInt16BE=function(we,Le){return we=we>>>0,Le||ne(we,2,this.length),this[we]<<8|this[we+1]},p.prototype.readUint32LE=p.prototype.readUInt32LE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),(this[we]|this[we+1]<<8|this[we+2]<<16)+this[we+3]*16777216},p.prototype.readUint32BE=p.prototype.readUInt32BE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]*16777216+(this[we+1]<<16|this[we+2]<<8|this[we+3])},p.prototype.readIntLE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=this[we],Ve=1,$e=0;++$e=Ve&&(Te-=Math.pow(2,8*Le)),Te},p.prototype.readIntBE=function(we,Le,Ke){we=we>>>0,Le=Le>>>0,Ke||ne(we,Le,this.length);for(var Te=Le,Ve=1,$e=this[we+--Te];Te>0&&(Ve*=256);)$e+=this[we+--Te]*Ve;return Ve*=128,$e>=Ve&&($e-=Math.pow(2,8*Le)),$e},p.prototype.readInt8=function(we,Le){return we=we>>>0,Le||ne(we,1,this.length),this[we]&128?(255-this[we]+1)*-1:this[we]},p.prototype.readInt16LE=function(we,Le){we=we>>>0,Le||ne(we,2,this.length);var Ke=this[we]|this[we+1]<<8;return Ke&32768?Ke|4294901760:Ke},p.prototype.readInt16BE=function(we,Le){we=we>>>0,Le||ne(we,2,this.length);var Ke=this[we+1]|this[we]<<8;return Ke&32768?Ke|4294901760:Ke},p.prototype.readInt32LE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]|this[we+1]<<8|this[we+2]<<16|this[we+3]<<24},p.prototype.readInt32BE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),this[we]<<24|this[we+1]<<16|this[we+2]<<8|this[we+3]},p.prototype.readFloatLE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),u.read(this,we,!0,23,4)},p.prototype.readFloatBE=function(we,Le){return we=we>>>0,Le||ne(we,4,this.length),u.read(this,we,!1,23,4)},p.prototype.readDoubleLE=function(we,Le){return we=we>>>0,Le||ne(we,8,this.length),u.read(this,we,!0,52,8)},p.prototype.readDoubleBE=function(we,Le){return we=we>>>0,Le||ne(we,8,this.length),u.read(this,we,!1,52,8)};function ae(qe,we,Le,Ke,Te,Ve){if(!p.isBuffer(qe))throw new TypeError('"buffer" argument must be a Buffer instance');if(we>Te||weqe.length)throw new RangeError("Index out of range")}p.prototype.writeUintLE=p.prototype.writeUIntLE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,Ke=Ke>>>0,!Te){var Ve=Math.pow(2,8*Ke)-1;ae(this,we,Le,Ke,Ve,0)}var $e=1,ot=0;for(this[Le]=we&255;++ot>>0,Ke=Ke>>>0,!Te){var Ve=Math.pow(2,8*Ke)-1;ae(this,we,Le,Ke,Ve,0)}var $e=Ke-1,ot=1;for(this[Le+$e]=we&255;--$e>=0&&(ot*=256);)this[Le+$e]=we/ot&255;return Le+Ke},p.prototype.writeUint8=p.prototype.writeUInt8=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,1,255,0),this[Le]=we&255,Le+1},p.prototype.writeUint16LE=p.prototype.writeUInt16LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,65535,0),this[Le]=we&255,this[Le+1]=we>>>8,Le+2},p.prototype.writeUint16BE=p.prototype.writeUInt16BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,65535,0),this[Le]=we>>>8,this[Le+1]=we&255,Le+2},p.prototype.writeUint32LE=p.prototype.writeUInt32LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,4294967295,0),this[Le+3]=we>>>24,this[Le+2]=we>>>16,this[Le+1]=we>>>8,this[Le]=we&255,Le+4},p.prototype.writeUint32BE=p.prototype.writeUInt32BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,4294967295,0),this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=we&255,Le+4},p.prototype.writeIntLE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,!Te){var Ve=Math.pow(2,8*Ke-1);ae(this,we,Le,Ke,Ve-1,-Ve)}var $e=0,ot=1,tt=0;for(this[Le]=we&255;++$e>0)-tt&255;return Le+Ke},p.prototype.writeIntBE=function(we,Le,Ke,Te){if(we=+we,Le=Le>>>0,!Te){var Ve=Math.pow(2,8*Ke-1);ae(this,we,Le,Ke,Ve-1,-Ve)}var $e=Ke-1,ot=1,tt=0;for(this[Le+$e]=we&255;--$e>=0&&(ot*=256);)we<0&&tt===0&&this[Le+$e+1]!==0&&(tt=1),this[Le+$e]=(we/ot>>0)-tt&255;return Le+Ke},p.prototype.writeInt8=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,1,127,-128),we<0&&(we=255+we+1),this[Le]=we&255,Le+1},p.prototype.writeInt16LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,32767,-32768),this[Le]=we&255,this[Le+1]=we>>>8,Le+2},p.prototype.writeInt16BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,2,32767,-32768),this[Le]=we>>>8,this[Le+1]=we&255,Le+2},p.prototype.writeInt32LE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,2147483647,-2147483648),this[Le]=we&255,this[Le+1]=we>>>8,this[Le+2]=we>>>16,this[Le+3]=we>>>24,Le+4},p.prototype.writeInt32BE=function(we,Le,Ke){return we=+we,Le=Le>>>0,Ke||ae(this,we,Le,4,2147483647,-2147483648),we<0&&(we=4294967295+we+1),this[Le]=we>>>24,this[Le+1]=we>>>16,this[Le+2]=we>>>8,this[Le+3]=we&255,Le+4};function pe(qe,we,Le,Ke,Te,Ve){if(Le+Ke>qe.length)throw new RangeError("Index out of range");if(Le<0)throw new RangeError("Index out of range")}function ie(qe,we,Le,Ke,Te){return we=+we,Le=Le>>>0,Te||pe(qe,we,Le,4,34028234663852886e22,-34028234663852886e22),u.write(qe,we,Le,Ke,23,4),Le+4}p.prototype.writeFloatLE=function(we,Le,Ke){return ie(this,we,Le,!0,Ke)},p.prototype.writeFloatBE=function(we,Le,Ke){return ie(this,we,Le,!1,Ke)};function le(qe,we,Le,Ke,Te){return we=+we,Le=Le>>>0,Te||pe(qe,we,Le,8,17976931348623157e292,-17976931348623157e292),u.write(qe,we,Le,Ke,52,8),Le+8}p.prototype.writeDoubleLE=function(we,Le,Ke){return le(this,we,Le,!0,Ke)},p.prototype.writeDoubleBE=function(we,Le,Ke){return le(this,we,Le,!1,Ke)},p.prototype.copy=function(we,Le,Ke,Te){if(!p.isBuffer(we))throw new TypeError("argument should be a Buffer");if(Ke||(Ke=0),!Te&&Te!==0&&(Te=this.length),Le>=we.length&&(Le=we.length),Le||(Le=0),Te>0&&Te=this.length)throw new RangeError("Index out of range");if(Te<0)throw new RangeError("sourceEnd out of bounds");Te>this.length&&(Te=this.length),we.length-Le>>0,Ke=Ke===void 0?this.length:Ke>>>0,we||(we=0);var $e;if(typeof we=="number")for($e=Le;$e55295&&Le<57344){if(!Te){if(Le>56319){(we-=3)>-1&&Ve.push(239,191,189);continue}else if($e+1===Ke){(we-=3)>-1&&Ve.push(239,191,189);continue}Te=Le;continue}if(Le<56320){(we-=3)>-1&&Ve.push(239,191,189),Te=Le;continue}Le=(Te-55296<<10|Le-56320)+65536}else Te&&(we-=3)>-1&&Ve.push(239,191,189);if(Te=null,Le<128){if((we-=1)<0)break;Ve.push(Le)}else if(Le<2048){if((we-=2)<0)break;Ve.push(Le>>6|192,Le&63|128)}else if(Le<65536){if((we-=3)<0)break;Ve.push(Le>>12|224,Le>>6&63|128,Le&63|128)}else if(Le<1114112){if((we-=4)<0)break;Ve.push(Le>>18|240,Le>>12&63|128,Le>>6&63|128,Le&63|128)}else throw new Error("Invalid code point")}return Ve}function Ge(qe){for(var we=[],Le=0;Le>8,Te=Le%256,Ve.push(Te),Ve.push(Ke);return Ve}function it(qe){return l.toByteArray(be(qe))}function Oe(qe,we,Le,Ke){for(var Te=0;Te=we.length||Te>=qe.length);++Te)we[Te+Le]=qe[Te];return Te}function ze(qe,we){return qe instanceof we||qe!=null&&qe.constructor!=null&&qe.constructor.name!=null&&qe.constructor.name===we.name}function ct(qe){return qe!==qe}var et=(function(){for(var qe="0123456789abcdef",we=new Array(256),Le=0;Le<16;++Le)for(var Ke=Le*16,Te=0;Te<16;++Te)we[Ke+Te]=qe[Le]+qe[Te];return we})()}),9216:(function(a){"use strict";a.exports=l,a.exports.isMobile=l,a.exports.default=l;let i=/(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,o=/CrOS/,s=/android|ipad|playbook|silk/i;function l(u){u||(u={});let c=u.ua;if(!c&&typeof navigator!="undefined"&&(c=navigator.userAgent),c&&c.headers&&typeof c.headers["user-agent"]=="string"&&(c=c.headers["user-agent"]),typeof c!="string")return!1;let f=i.test(c)&&!o.test(c)||!!u.tablet&&s.test(c);return!f&&u.tablet&&u.featureDetect&&navigator&&navigator.maxTouchPoints>1&&c.indexOf("Macintosh")!==-1&&c.indexOf("Safari")!==-1&&(f=!0),f}}),6296:(function(a,i,o){"use strict";a.exports=v;var s=o(7261),l=o(9977),u=o(1811);function c(g,p){this._controllerNames=Object.keys(g),this._controllerList=this._controllerNames.map(function(x){return g[x]}),this._mode=p,this._active=g[p],this._active||(this._mode="turntable",this._active=g.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 f=c.prototype;f.flush=function(g){for(var p=this._controllerList,x=0;x0)throw new Error("Invalid string. Length must be a multiple of 4");var L=k.indexOf("=");L===-1&&(L=S);var w=L===S?0:4-L%4;return[L,w]}function g(k){var S=v(k),L=S[0],w=S[1];return(L+w)*3/4-w}function p(k,S,L){return(S+L)*3/4-L}function x(k){var S,L=v(k),w=L[0],A=L[1],T=new l(p(k,w,A)),m=0,F=A>0?w-4:w,E;for(E=0;E>16&255,T[m++]=S>>8&255,T[m++]=S&255;return A===2&&(S=s[k.charCodeAt(E)]<<2|s[k.charCodeAt(E+1)]>>4,T[m++]=S&255),A===1&&(S=s[k.charCodeAt(E)]<<10|s[k.charCodeAt(E+1)]<<4|s[k.charCodeAt(E+2)]>>2,T[m++]=S>>8&255,T[m++]=S&255),T}function _(k){return o[k>>18&63]+o[k>>12&63]+o[k>>6&63]+o[k&63]}function y(k,S,L){for(var w,A=[],T=S;TF?F:m+T));return w===1?(S=k[L-1],A.push(o[S>>2]+o[S<<4&63]+"==")):w===2&&(S=(k[L-2]<<8)+k[L-1],A.push(o[S>>10]+o[S>>4&63]+o[S<<2&63]+"=")),A.join("")}}),3865:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]).add(c[0].mul(u[1])),u[1].mul(c[1]))}}),1318:(function(a){"use strict";a.exports=i;function i(o,s){return o[0].mul(s[1]).cmp(s[0].mul(o[1]))}}),8697:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]),u[1].mul(c[0]))}}),7842:(function(a,i,o){"use strict";var s=o(6330),l=o(1533),u=o(2651),c=o(6768),f=o(869),v=o(8697);a.exports=g;function g(p,x){if(s(p))return x?v(p,g(x)):[p[0].clone(),p[1].clone()];var _=0,y,C;if(l(p))y=p.clone();else if(typeof p=="string")y=c(p);else{if(p===0)return[u(0),u(1)];if(p===Math.floor(p))y=u(p);else{for(;p!==Math.floor(p);)p=p*Math.pow(2,256),_-=256;y=u(p)}}if(s(x))y.mul(x[1]),C=x[0].clone();else if(l(x))C=x.clone();else if(typeof x=="string")C=c(x);else if(!x)C=u(1);else if(x===Math.floor(x))C=u(x);else{for(;x!==Math.floor(x);)x=x*Math.pow(2,256),_+=256;C=u(x)}return _>0?y=y.ushln(_):_<0&&(C=C.ushln(-_)),f(y,C)}}),6330:(function(a,i,o){"use strict";var s=o(1533);a.exports=l;function l(u){return Array.isArray(u)&&u.length===2&&s(u[0])&&s(u[1])}}),5716:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return u.cmp(new s(0))}}),1369:(function(a,i,o){"use strict";var s=o(5716);a.exports=l;function l(u){var c=u.length,f=u.words,v=0;if(c===1)v=f[0];else if(c===2)v=f[0]+f[1]*67108864;else for(var g=0;g20?52:v+32}}),1533:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return u&&typeof u=="object"&&!!u.words}}),2651:(function(a,i,o){"use strict";var s=o(6859),l=o(2361);a.exports=u;function u(c){var f=l.exponent(c);return f<52?new s(c):new s(c*Math.pow(2,52-f)).ushln(f-52)}}),869:(function(a,i,o){"use strict";var s=o(2651),l=o(5716);a.exports=u;function u(c,f){var v=l(c),g=l(f);if(v===0)return[s(0),s(1)];if(g===0)return[s(0),s(0)];g<0&&(c=c.neg(),f=f.neg());var p=c.gcd(f);return p.cmpn(1)?[c.div(p),f.div(p)]:[c,f]}}),6768:(function(a,i,o){"use strict";var s=o(6859);a.exports=l;function l(u){return new s(u)}}),6504:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[0]),u[1].mul(c[1]))}}),7721:(function(a,i,o){"use strict";var s=o(5716);a.exports=l;function l(u){return s(u[0])*s(u[1])}}),5572:(function(a,i,o){"use strict";var s=o(869);a.exports=l;function l(u,c){return s(u[0].mul(c[1]).sub(u[1].mul(c[0])),u[1].mul(c[1]))}}),946:(function(a,i,o){"use strict";var s=o(1369),l=o(4025);a.exports=u;function u(c){var f=c[0],v=c[1];if(f.cmpn(0)===0)return 0;var g=f.abs().divmod(v.abs()),p=g.div,x=s(p),_=g.mod,y=f.negative!==v.negative?-1:1;if(_.cmpn(0)===0)return y*x;if(x){var C=l(x)+4,k=s(_.ushln(C).divRound(v));return y*(x+k*Math.pow(2,-C))}else{var S=v.bitLength()-_.bitLength()+53,k=s(_.ushln(S).divRound(v));return S<1023?y*k*Math.pow(2,-S):(k*=Math.pow(2,-1023),y*k*Math.pow(2,1023-S))}}}),2478:(function(a){"use strict";function i(f,v,g,p,x){for(var _=x+1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k>=0?(_=y,x=y-1):p=y+1}return _}function o(f,v,g,p,x){for(var _=x+1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k>0?(_=y,x=y-1):p=y+1}return _}function s(f,v,g,p,x){for(var _=p-1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k<0?(_=y,p=y+1):x=y-1}return _}function l(f,v,g,p,x){for(var _=p-1;p<=x;){var y=p+x>>>1,C=f[y],k=g!==void 0?g(C,v):C-v;k<=0?(_=y,p=y+1):x=y-1}return _}function u(f,v,g,p,x){for(;p<=x;){var _=p+x>>>1,y=f[_],C=g!==void 0?g(y,v):y-v;if(C===0)return _;C<=0?p=_+1:x=_-1}return-1}function c(f,v,g,p,x,_){return typeof g=="function"?_(f,v,g,p===void 0?0:p|0,x===void 0?f.length-1:x|0):_(f,v,void 0,g===void 0?0:g|0,p===void 0?f.length-1:p|0)}a.exports={ge:function(f,v,g,p,x){return c(f,v,g,p,x,i)},gt:function(f,v,g,p,x){return c(f,v,g,p,x,o)},lt:function(f,v,g,p,x){return c(f,v,g,p,x,s)},le:function(f,v,g,p,x){return c(f,v,g,p,x,l)},eq:function(f,v,g,p,x){return c(f,v,g,p,x,u)}}}),8828:(function(a,i){"use strict";"use restrict";var o=32;i.INT_BITS=o,i.INT_MAX=2147483647,i.INT_MIN=-1<0)-(u<0)},i.abs=function(u){var c=u>>o-1;return(u^c)-c},i.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},i.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},i.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}i.countTrailingZeros=s,i.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},i.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},i.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,v=c,g=7;for(f>>>=1;f;f>>>=1)v<<=1,v|=f&1,--g;u[c]=v<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},i.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},i.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},i.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},i.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},i.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}}),6859:(function(a,i,o){a=o.nmd(a),(function(s,l){"use strict";function u(j,q){if(!j)throw new Error(q||"Assertion failed")}function c(j,q){j.super_=q;var U=function(){};U.prototype=q.prototype,j.prototype=new U,j.prototype.constructor=j}function f(j,q,U){if(f.isBN(j))return j;this.negative=0,this.words=null,this.length=0,this.red=null,j!==null&&((q==="le"||q==="be")&&(U=q,q=10),this._init(j||0,q||10,U||"be"))}typeof s=="object"?s.exports=f:l.BN=f,f.BN=f,f.wordSize=26;var v;try{typeof window!="undefined"&&typeof window.Buffer!="undefined"?v=window.Buffer:v=o(7790).Buffer}catch(j){}f.isBN=function(q){return q instanceof f?!0:q!==null&&typeof q=="object"&&q.constructor.wordSize===f.wordSize&&Array.isArray(q.words)},f.max=function(q,U){return q.cmp(U)>0?q:U},f.min=function(q,U){return q.cmp(U)<0?q:U},f.prototype._init=function(q,U,J){if(typeof q=="number")return this._initNumber(q,U,J);if(typeof q=="object")return this._initArray(q,U,J);U==="hex"&&(U=16),u(U===(U|0)&&U>=2&&U<=36),q=q.toString().replace(/\s+/g,"");var ee=0;q[0]==="-"&&(ee++,this.negative=1),ee=0;ee-=3)ye=q[ee]|q[ee-1]<<8|q[ee-2]<<16,this.words[ce]|=ye<>>26-xe&67108863,xe+=24,xe>=26&&(xe-=26,ce++);else if(J==="le")for(ee=0,ce=0;ee>>26-xe&67108863,xe+=24,xe>=26&&(xe-=26,ce++);return this.strip()};function g(j,q){var U=j.charCodeAt(q);return U>=65&&U<=70?U-55:U>=97&&U<=102?U-87:U-48&15}function p(j,q,U){var J=g(j,U);return U-1>=q&&(J|=g(j,U-1)<<4),J}f.prototype._parseHex=function(q,U,J){this.length=Math.ceil((q.length-U)/6),this.words=new Array(this.length);for(var ee=0;ee=U;ee-=2)xe=p(q,U,ee)<=18?(ce-=18,ye+=1,this.words[ye]|=xe>>>26):ce+=8;else{var ue=q.length-U;for(ee=ue%2===0?U+1:U;ee=18?(ce-=18,ye+=1,this.words[ye]|=xe>>>26):ce+=8}this.strip()};function x(j,q,U,J){for(var ee=0,ce=Math.min(j.length,U),ye=q;ye=49?ee+=xe-49+10:xe>=17?ee+=xe-17+10:ee+=xe}return ee}f.prototype._parseBase=function(q,U,J){this.words=[0],this.length=1;for(var ee=0,ce=1;ce<=67108863;ce*=U)ee++;ee--,ce=ce/U|0;for(var ye=q.length-J,xe=ye%ee,ue=Math.min(ye,ye-xe)+J,K=0,_e=J;_e1&&this.words[this.length-1]===0;)this.length--;return this._normSign()},f.prototype._normSign=function(){return this.length===1&&this.words[0]===0&&(this.negative=0),this},f.prototype.inspect=function(){return(this.red?""};var _=["","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"],y=[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],C=[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];f.prototype.toString=function(q,U){q=q||10,U=U|0||1;var J;if(q===16||q==="hex"){J="";for(var ee=0,ce=0,ye=0;ye>>24-ee&16777215,ee+=2,ee>=26&&(ee-=26,ye--),ce!==0||ye!==this.length-1?J=_[6-ue.length]+ue+J:J=ue+J}for(ce!==0&&(J=ce.toString(16)+J);J.length%U!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}if(q===(q|0)&&q>=2&&q<=36){var K=y[q],_e=C[q];J="";var ne=this.clone();for(ne.negative=0;!ne.isZero();){var ae=ne.modn(_e).toString(q);ne=ne.idivn(_e),ne.isZero()?J=ae+J:J=_[K-ae.length]+ae+J}for(this.isZero()&&(J="0"+J);J.length%U!==0;)J="0"+J;return this.negative!==0&&(J="-"+J),J}u(!1,"Base should be between 2 and 36")},f.prototype.toNumber=function(){var q=this.words[0];return this.length===2?q+=this.words[1]*67108864:this.length===3&&this.words[2]===1?q+=4503599627370496+this.words[1]*67108864:this.length>2&&u(!1,"Number can only safely store up to 53 bits"),this.negative!==0?-q:q},f.prototype.toJSON=function(){return this.toString(16)},f.prototype.toBuffer=function(q,U){return u(typeof v!="undefined"),this.toArrayLike(v,q,U)},f.prototype.toArray=function(q,U){return this.toArrayLike(Array,q,U)},f.prototype.toArrayLike=function(q,U,J){var ee=this.byteLength(),ce=J||Math.max(1,ee);u(ee<=ce,"byte array longer than desired length"),u(ce>0,"Requested array length <= 0"),this.strip();var ye=U==="le",xe=new q(ce),ue,K,_e=this.clone();if(ye){for(K=0;!_e.isZero();K++)ue=_e.andln(255),_e.iushrn(8),xe[K]=ue;for(;K=4096&&(J+=13,U>>>=13),U>=64&&(J+=7,U>>>=7),U>=8&&(J+=4,U>>>=4),U>=2&&(J+=2,U>>>=2),J+U},f.prototype._zeroBits=function(q){if(q===0)return 26;var U=q,J=0;return(U&8191)===0&&(J+=13,U>>>=13),(U&127)===0&&(J+=7,U>>>=7),(U&15)===0&&(J+=4,U>>>=4),(U&3)===0&&(J+=2,U>>>=2),(U&1)===0&&J++,J},f.prototype.bitLength=function(){var q=this.words[this.length-1],U=this._countBits(q);return(this.length-1)*26+U};function k(j){for(var q=new Array(j.bitLength()),U=0;U>>ee}return q}f.prototype.zeroBits=function(){if(this.isZero())return 0;for(var q=0,U=0;Uq.length?this.clone().ior(q):q.clone().ior(this)},f.prototype.uor=function(q){return this.length>q.length?this.clone().iuor(q):q.clone().iuor(this)},f.prototype.iuand=function(q){var U;this.length>q.length?U=q:U=this;for(var J=0;Jq.length?this.clone().iand(q):q.clone().iand(this)},f.prototype.uand=function(q){return this.length>q.length?this.clone().iuand(q):q.clone().iuand(this)},f.prototype.iuxor=function(q){var U,J;this.length>q.length?(U=this,J=q):(U=q,J=this);for(var ee=0;eeq.length?this.clone().ixor(q):q.clone().ixor(this)},f.prototype.uxor=function(q){return this.length>q.length?this.clone().iuxor(q):q.clone().iuxor(this)},f.prototype.inotn=function(q){u(typeof q=="number"&&q>=0);var U=Math.ceil(q/26)|0,J=q%26;this._expand(U),J>0&&U--;for(var ee=0;ee0&&(this.words[ee]=~this.words[ee]&67108863>>26-J),this.strip()},f.prototype.notn=function(q){return this.clone().inotn(q)},f.prototype.setn=function(q,U){u(typeof q=="number"&&q>=0);var J=q/26|0,ee=q%26;return this._expand(J+1),U?this.words[J]=this.words[J]|1<q.length?(J=this,ee=q):(J=q,ee=this);for(var ce=0,ye=0;ye>>26;for(;ce!==0&&ye>>26;if(this.length=J.length,ce!==0)this.words[this.length]=ce,this.length++;else if(J!==this)for(;yeq.length?this.clone().iadd(q):q.clone().iadd(this)},f.prototype.isub=function(q){if(q.negative!==0){q.negative=0;var U=this.iadd(q);return q.negative=1,U._normSign()}else if(this.negative!==0)return this.negative=0,this.iadd(q),this.negative=1,this._normSign();var J=this.cmp(q);if(J===0)return this.negative=0,this.length=1,this.words[0]=0,this;var ee,ce;J>0?(ee=this,ce=q):(ee=q,ce=this);for(var ye=0,xe=0;xe>26,this.words[xe]=U&67108863;for(;ye!==0&&xe>26,this.words[xe]=U&67108863;if(ye===0&&xe>>26,ne=ue&67108863,ae=Math.min(K,q.length-1),pe=Math.max(0,K-j.length+1);pe<=ae;pe++){var ie=K-pe|0;ee=j.words[ie]|0,ce=q.words[pe]|0,ye=ee*ce+ne,_e+=ye/67108864|0,ne=ye&67108863}U.words[K]=ne|0,ue=_e|0}return ue!==0?U.words[K]=ue|0:U.length--,U.strip()}var L=function(q,U,J){var ee=q.words,ce=U.words,ye=J.words,xe=0,ue,K,_e,ne=ee[0]|0,ae=ne&8191,pe=ne>>>13,ie=ee[1]|0,le=ie&8191,me=ie>>>13,be=ee[2]|0,De=be&8191,Ge=be>>>13,ht=ee[3]|0,it=ht&8191,Oe=ht>>>13,ze=ee[4]|0,ct=ze&8191,et=ze>>>13,qe=ee[5]|0,we=qe&8191,Le=qe>>>13,Ke=ee[6]|0,Te=Ke&8191,Ve=Ke>>>13,$e=ee[7]|0,ot=$e&8191,tt=$e>>>13,nt=ee[8]|0,We=nt&8191,mt=nt>>>13,bt=ee[9]|0,Yt=bt&8191,jt=bt>>>13,mr=ce[0]|0,or=mr&8191,fr=mr>>>13,Ot=ce[1]|0,cr=Ot&8191,Ct=Ot>>>13,wt=ce[2]|0,Tt=wt&8191,Mt=wt>>>13,Lt=ce[3]|0,ft=Lt&8191,kt=Lt>>>13,rr=ce[4]|0,pr=rr&8191,Kr=rr>>>13,Nr=ce[5]|0,dn=Nr&8191,xr=Nr>>>13,Fr=ce[6]|0,Zr=Fr&8191,Cn=Fr>>>13,Dt=ce[7]|0,At=Dt&8191,Vt=Dt>>>13,Qt=ce[8]|0,Ut=Qt&8191,_r=Qt>>>13,rn=ce[9]|0,Jr=rn&8191,qn=rn>>>13;J.negative=q.negative^U.negative,J.length=19,ue=Math.imul(ae,or),K=Math.imul(ae,fr),K=K+Math.imul(pe,or)|0,_e=Math.imul(pe,fr);var ri=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ri>>>26)|0,ri&=67108863,ue=Math.imul(le,or),K=Math.imul(le,fr),K=K+Math.imul(me,or)|0,_e=Math.imul(me,fr),ue=ue+Math.imul(ae,cr)|0,K=K+Math.imul(ae,Ct)|0,K=K+Math.imul(pe,cr)|0,_e=_e+Math.imul(pe,Ct)|0;var Jn=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Jn>>>26)|0,Jn&=67108863,ue=Math.imul(De,or),K=Math.imul(De,fr),K=K+Math.imul(Ge,or)|0,_e=Math.imul(Ge,fr),ue=ue+Math.imul(le,cr)|0,K=K+Math.imul(le,Ct)|0,K=K+Math.imul(me,cr)|0,_e=_e+Math.imul(me,Ct)|0,ue=ue+Math.imul(ae,Tt)|0,K=K+Math.imul(ae,Mt)|0,K=K+Math.imul(pe,Tt)|0,_e=_e+Math.imul(pe,Mt)|0;var Ii=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Ii>>>26)|0,Ii&=67108863,ue=Math.imul(it,or),K=Math.imul(it,fr),K=K+Math.imul(Oe,or)|0,_e=Math.imul(Oe,fr),ue=ue+Math.imul(De,cr)|0,K=K+Math.imul(De,Ct)|0,K=K+Math.imul(Ge,cr)|0,_e=_e+Math.imul(Ge,Ct)|0,ue=ue+Math.imul(le,Tt)|0,K=K+Math.imul(le,Mt)|0,K=K+Math.imul(me,Tt)|0,_e=_e+Math.imul(me,Mt)|0,ue=ue+Math.imul(ae,ft)|0,K=K+Math.imul(ae,kt)|0,K=K+Math.imul(pe,ft)|0,_e=_e+Math.imul(pe,kt)|0;var Vi=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Vi>>>26)|0,Vi&=67108863,ue=Math.imul(ct,or),K=Math.imul(ct,fr),K=K+Math.imul(et,or)|0,_e=Math.imul(et,fr),ue=ue+Math.imul(it,cr)|0,K=K+Math.imul(it,Ct)|0,K=K+Math.imul(Oe,cr)|0,_e=_e+Math.imul(Oe,Ct)|0,ue=ue+Math.imul(De,Tt)|0,K=K+Math.imul(De,Mt)|0,K=K+Math.imul(Ge,Tt)|0,_e=_e+Math.imul(Ge,Mt)|0,ue=ue+Math.imul(le,ft)|0,K=K+Math.imul(le,kt)|0,K=K+Math.imul(me,ft)|0,_e=_e+Math.imul(me,kt)|0,ue=ue+Math.imul(ae,pr)|0,K=K+Math.imul(ae,Kr)|0,K=K+Math.imul(pe,pr)|0,_e=_e+Math.imul(pe,Kr)|0;var ra=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ra>>>26)|0,ra&=67108863,ue=Math.imul(we,or),K=Math.imul(we,fr),K=K+Math.imul(Le,or)|0,_e=Math.imul(Le,fr),ue=ue+Math.imul(ct,cr)|0,K=K+Math.imul(ct,Ct)|0,K=K+Math.imul(et,cr)|0,_e=_e+Math.imul(et,Ct)|0,ue=ue+Math.imul(it,Tt)|0,K=K+Math.imul(it,Mt)|0,K=K+Math.imul(Oe,Tt)|0,_e=_e+Math.imul(Oe,Mt)|0,ue=ue+Math.imul(De,ft)|0,K=K+Math.imul(De,kt)|0,K=K+Math.imul(Ge,ft)|0,_e=_e+Math.imul(Ge,kt)|0,ue=ue+Math.imul(le,pr)|0,K=K+Math.imul(le,Kr)|0,K=K+Math.imul(me,pr)|0,_e=_e+Math.imul(me,Kr)|0,ue=ue+Math.imul(ae,dn)|0,K=K+Math.imul(ae,xr)|0,K=K+Math.imul(pe,dn)|0,_e=_e+Math.imul(pe,xr)|0;var ha=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ha>>>26)|0,ha&=67108863,ue=Math.imul(Te,or),K=Math.imul(Te,fr),K=K+Math.imul(Ve,or)|0,_e=Math.imul(Ve,fr),ue=ue+Math.imul(we,cr)|0,K=K+Math.imul(we,Ct)|0,K=K+Math.imul(Le,cr)|0,_e=_e+Math.imul(Le,Ct)|0,ue=ue+Math.imul(ct,Tt)|0,K=K+Math.imul(ct,Mt)|0,K=K+Math.imul(et,Tt)|0,_e=_e+Math.imul(et,Mt)|0,ue=ue+Math.imul(it,ft)|0,K=K+Math.imul(it,kt)|0,K=K+Math.imul(Oe,ft)|0,_e=_e+Math.imul(Oe,kt)|0,ue=ue+Math.imul(De,pr)|0,K=K+Math.imul(De,Kr)|0,K=K+Math.imul(Ge,pr)|0,_e=_e+Math.imul(Ge,Kr)|0,ue=ue+Math.imul(le,dn)|0,K=K+Math.imul(le,xr)|0,K=K+Math.imul(me,dn)|0,_e=_e+Math.imul(me,xr)|0,ue=ue+Math.imul(ae,Zr)|0,K=K+Math.imul(ae,Cn)|0,K=K+Math.imul(pe,Zr)|0,_e=_e+Math.imul(pe,Cn)|0;var va=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(va>>>26)|0,va&=67108863,ue=Math.imul(ot,or),K=Math.imul(ot,fr),K=K+Math.imul(tt,or)|0,_e=Math.imul(tt,fr),ue=ue+Math.imul(Te,cr)|0,K=K+Math.imul(Te,Ct)|0,K=K+Math.imul(Ve,cr)|0,_e=_e+Math.imul(Ve,Ct)|0,ue=ue+Math.imul(we,Tt)|0,K=K+Math.imul(we,Mt)|0,K=K+Math.imul(Le,Tt)|0,_e=_e+Math.imul(Le,Mt)|0,ue=ue+Math.imul(ct,ft)|0,K=K+Math.imul(ct,kt)|0,K=K+Math.imul(et,ft)|0,_e=_e+Math.imul(et,kt)|0,ue=ue+Math.imul(it,pr)|0,K=K+Math.imul(it,Kr)|0,K=K+Math.imul(Oe,pr)|0,_e=_e+Math.imul(Oe,Kr)|0,ue=ue+Math.imul(De,dn)|0,K=K+Math.imul(De,xr)|0,K=K+Math.imul(Ge,dn)|0,_e=_e+Math.imul(Ge,xr)|0,ue=ue+Math.imul(le,Zr)|0,K=K+Math.imul(le,Cn)|0,K=K+Math.imul(me,Zr)|0,_e=_e+Math.imul(me,Cn)|0,ue=ue+Math.imul(ae,At)|0,K=K+Math.imul(ae,Vt)|0,K=K+Math.imul(pe,At)|0,_e=_e+Math.imul(pe,Vt)|0;var Xi=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Xi>>>26)|0,Xi&=67108863,ue=Math.imul(We,or),K=Math.imul(We,fr),K=K+Math.imul(mt,or)|0,_e=Math.imul(mt,fr),ue=ue+Math.imul(ot,cr)|0,K=K+Math.imul(ot,Ct)|0,K=K+Math.imul(tt,cr)|0,_e=_e+Math.imul(tt,Ct)|0,ue=ue+Math.imul(Te,Tt)|0,K=K+Math.imul(Te,Mt)|0,K=K+Math.imul(Ve,Tt)|0,_e=_e+Math.imul(Ve,Mt)|0,ue=ue+Math.imul(we,ft)|0,K=K+Math.imul(we,kt)|0,K=K+Math.imul(Le,ft)|0,_e=_e+Math.imul(Le,kt)|0,ue=ue+Math.imul(ct,pr)|0,K=K+Math.imul(ct,Kr)|0,K=K+Math.imul(et,pr)|0,_e=_e+Math.imul(et,Kr)|0,ue=ue+Math.imul(it,dn)|0,K=K+Math.imul(it,xr)|0,K=K+Math.imul(Oe,dn)|0,_e=_e+Math.imul(Oe,xr)|0,ue=ue+Math.imul(De,Zr)|0,K=K+Math.imul(De,Cn)|0,K=K+Math.imul(Ge,Zr)|0,_e=_e+Math.imul(Ge,Cn)|0,ue=ue+Math.imul(le,At)|0,K=K+Math.imul(le,Vt)|0,K=K+Math.imul(me,At)|0,_e=_e+Math.imul(me,Vt)|0,ue=ue+Math.imul(ae,Ut)|0,K=K+Math.imul(ae,_r)|0,K=K+Math.imul(pe,Ut)|0,_e=_e+Math.imul(pe,_r)|0;var oa=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(oa>>>26)|0,oa&=67108863,ue=Math.imul(Yt,or),K=Math.imul(Yt,fr),K=K+Math.imul(jt,or)|0,_e=Math.imul(jt,fr),ue=ue+Math.imul(We,cr)|0,K=K+Math.imul(We,Ct)|0,K=K+Math.imul(mt,cr)|0,_e=_e+Math.imul(mt,Ct)|0,ue=ue+Math.imul(ot,Tt)|0,K=K+Math.imul(ot,Mt)|0,K=K+Math.imul(tt,Tt)|0,_e=_e+Math.imul(tt,Mt)|0,ue=ue+Math.imul(Te,ft)|0,K=K+Math.imul(Te,kt)|0,K=K+Math.imul(Ve,ft)|0,_e=_e+Math.imul(Ve,kt)|0,ue=ue+Math.imul(we,pr)|0,K=K+Math.imul(we,Kr)|0,K=K+Math.imul(Le,pr)|0,_e=_e+Math.imul(Le,Kr)|0,ue=ue+Math.imul(ct,dn)|0,K=K+Math.imul(ct,xr)|0,K=K+Math.imul(et,dn)|0,_e=_e+Math.imul(et,xr)|0,ue=ue+Math.imul(it,Zr)|0,K=K+Math.imul(it,Cn)|0,K=K+Math.imul(Oe,Zr)|0,_e=_e+Math.imul(Oe,Cn)|0,ue=ue+Math.imul(De,At)|0,K=K+Math.imul(De,Vt)|0,K=K+Math.imul(Ge,At)|0,_e=_e+Math.imul(Ge,Vt)|0,ue=ue+Math.imul(le,Ut)|0,K=K+Math.imul(le,_r)|0,K=K+Math.imul(me,Ut)|0,_e=_e+Math.imul(me,_r)|0,ue=ue+Math.imul(ae,Jr)|0,K=K+Math.imul(ae,qn)|0,K=K+Math.imul(pe,Jr)|0,_e=_e+Math.imul(pe,qn)|0;var Ma=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Ma>>>26)|0,Ma&=67108863,ue=Math.imul(Yt,cr),K=Math.imul(Yt,Ct),K=K+Math.imul(jt,cr)|0,_e=Math.imul(jt,Ct),ue=ue+Math.imul(We,Tt)|0,K=K+Math.imul(We,Mt)|0,K=K+Math.imul(mt,Tt)|0,_e=_e+Math.imul(mt,Mt)|0,ue=ue+Math.imul(ot,ft)|0,K=K+Math.imul(ot,kt)|0,K=K+Math.imul(tt,ft)|0,_e=_e+Math.imul(tt,kt)|0,ue=ue+Math.imul(Te,pr)|0,K=K+Math.imul(Te,Kr)|0,K=K+Math.imul(Ve,pr)|0,_e=_e+Math.imul(Ve,Kr)|0,ue=ue+Math.imul(we,dn)|0,K=K+Math.imul(we,xr)|0,K=K+Math.imul(Le,dn)|0,_e=_e+Math.imul(Le,xr)|0,ue=ue+Math.imul(ct,Zr)|0,K=K+Math.imul(ct,Cn)|0,K=K+Math.imul(et,Zr)|0,_e=_e+Math.imul(et,Cn)|0,ue=ue+Math.imul(it,At)|0,K=K+Math.imul(it,Vt)|0,K=K+Math.imul(Oe,At)|0,_e=_e+Math.imul(Oe,Vt)|0,ue=ue+Math.imul(De,Ut)|0,K=K+Math.imul(De,_r)|0,K=K+Math.imul(Ge,Ut)|0,_e=_e+Math.imul(Ge,_r)|0,ue=ue+Math.imul(le,Jr)|0,K=K+Math.imul(le,qn)|0,K=K+Math.imul(me,Jr)|0,_e=_e+Math.imul(me,qn)|0;var Ga=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Ga>>>26)|0,Ga&=67108863,ue=Math.imul(Yt,Tt),K=Math.imul(Yt,Mt),K=K+Math.imul(jt,Tt)|0,_e=Math.imul(jt,Mt),ue=ue+Math.imul(We,ft)|0,K=K+Math.imul(We,kt)|0,K=K+Math.imul(mt,ft)|0,_e=_e+Math.imul(mt,kt)|0,ue=ue+Math.imul(ot,pr)|0,K=K+Math.imul(ot,Kr)|0,K=K+Math.imul(tt,pr)|0,_e=_e+Math.imul(tt,Kr)|0,ue=ue+Math.imul(Te,dn)|0,K=K+Math.imul(Te,xr)|0,K=K+Math.imul(Ve,dn)|0,_e=_e+Math.imul(Ve,xr)|0,ue=ue+Math.imul(we,Zr)|0,K=K+Math.imul(we,Cn)|0,K=K+Math.imul(Le,Zr)|0,_e=_e+Math.imul(Le,Cn)|0,ue=ue+Math.imul(ct,At)|0,K=K+Math.imul(ct,Vt)|0,K=K+Math.imul(et,At)|0,_e=_e+Math.imul(et,Vt)|0,ue=ue+Math.imul(it,Ut)|0,K=K+Math.imul(it,_r)|0,K=K+Math.imul(Oe,Ut)|0,_e=_e+Math.imul(Oe,_r)|0,ue=ue+Math.imul(De,Jr)|0,K=K+Math.imul(De,qn)|0,K=K+Math.imul(Ge,Jr)|0,_e=_e+Math.imul(Ge,qn)|0;var ss=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ss>>>26)|0,ss&=67108863,ue=Math.imul(Yt,ft),K=Math.imul(Yt,kt),K=K+Math.imul(jt,ft)|0,_e=Math.imul(jt,kt),ue=ue+Math.imul(We,pr)|0,K=K+Math.imul(We,Kr)|0,K=K+Math.imul(mt,pr)|0,_e=_e+Math.imul(mt,Kr)|0,ue=ue+Math.imul(ot,dn)|0,K=K+Math.imul(ot,xr)|0,K=K+Math.imul(tt,dn)|0,_e=_e+Math.imul(tt,xr)|0,ue=ue+Math.imul(Te,Zr)|0,K=K+Math.imul(Te,Cn)|0,K=K+Math.imul(Ve,Zr)|0,_e=_e+Math.imul(Ve,Cn)|0,ue=ue+Math.imul(we,At)|0,K=K+Math.imul(we,Vt)|0,K=K+Math.imul(Le,At)|0,_e=_e+Math.imul(Le,Vt)|0,ue=ue+Math.imul(ct,Ut)|0,K=K+Math.imul(ct,_r)|0,K=K+Math.imul(et,Ut)|0,_e=_e+Math.imul(et,_r)|0,ue=ue+Math.imul(it,Jr)|0,K=K+Math.imul(it,qn)|0,K=K+Math.imul(Oe,Jr)|0,_e=_e+Math.imul(Oe,qn)|0;var mo=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(mo>>>26)|0,mo&=67108863,ue=Math.imul(Yt,pr),K=Math.imul(Yt,Kr),K=K+Math.imul(jt,pr)|0,_e=Math.imul(jt,Kr),ue=ue+Math.imul(We,dn)|0,K=K+Math.imul(We,xr)|0,K=K+Math.imul(mt,dn)|0,_e=_e+Math.imul(mt,xr)|0,ue=ue+Math.imul(ot,Zr)|0,K=K+Math.imul(ot,Cn)|0,K=K+Math.imul(tt,Zr)|0,_e=_e+Math.imul(tt,Cn)|0,ue=ue+Math.imul(Te,At)|0,K=K+Math.imul(Te,Vt)|0,K=K+Math.imul(Ve,At)|0,_e=_e+Math.imul(Ve,Vt)|0,ue=ue+Math.imul(we,Ut)|0,K=K+Math.imul(we,_r)|0,K=K+Math.imul(Le,Ut)|0,_e=_e+Math.imul(Le,_r)|0,ue=ue+Math.imul(ct,Jr)|0,K=K+Math.imul(ct,qn)|0,K=K+Math.imul(et,Jr)|0,_e=_e+Math.imul(et,qn)|0;var sl=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(sl>>>26)|0,sl&=67108863,ue=Math.imul(Yt,dn),K=Math.imul(Yt,xr),K=K+Math.imul(jt,dn)|0,_e=Math.imul(jt,xr),ue=ue+Math.imul(We,Zr)|0,K=K+Math.imul(We,Cn)|0,K=K+Math.imul(mt,Zr)|0,_e=_e+Math.imul(mt,Cn)|0,ue=ue+Math.imul(ot,At)|0,K=K+Math.imul(ot,Vt)|0,K=K+Math.imul(tt,At)|0,_e=_e+Math.imul(tt,Vt)|0,ue=ue+Math.imul(Te,Ut)|0,K=K+Math.imul(Te,_r)|0,K=K+Math.imul(Ve,Ut)|0,_e=_e+Math.imul(Ve,_r)|0,ue=ue+Math.imul(we,Jr)|0,K=K+Math.imul(we,qn)|0,K=K+Math.imul(Le,Jr)|0,_e=_e+Math.imul(Le,qn)|0;var Eo=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Eo>>>26)|0,Eo&=67108863,ue=Math.imul(Yt,Zr),K=Math.imul(Yt,Cn),K=K+Math.imul(jt,Zr)|0,_e=Math.imul(jt,Cn),ue=ue+Math.imul(We,At)|0,K=K+Math.imul(We,Vt)|0,K=K+Math.imul(mt,At)|0,_e=_e+Math.imul(mt,Vt)|0,ue=ue+Math.imul(ot,Ut)|0,K=K+Math.imul(ot,_r)|0,K=K+Math.imul(tt,Ut)|0,_e=_e+Math.imul(tt,_r)|0,ue=ue+Math.imul(Te,Jr)|0,K=K+Math.imul(Te,qn)|0,K=K+Math.imul(Ve,Jr)|0,_e=_e+Math.imul(Ve,qn)|0;var ao=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(ao>>>26)|0,ao&=67108863,ue=Math.imul(Yt,At),K=Math.imul(Yt,Vt),K=K+Math.imul(jt,At)|0,_e=Math.imul(jt,Vt),ue=ue+Math.imul(We,Ut)|0,K=K+Math.imul(We,_r)|0,K=K+Math.imul(mt,Ut)|0,_e=_e+Math.imul(mt,_r)|0,ue=ue+Math.imul(ot,Jr)|0,K=K+Math.imul(ot,qn)|0,K=K+Math.imul(tt,Jr)|0,_e=_e+Math.imul(tt,qn)|0;var Da=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(Da>>>26)|0,Da&=67108863,ue=Math.imul(Yt,Ut),K=Math.imul(Yt,_r),K=K+Math.imul(jt,Ut)|0,_e=Math.imul(jt,_r),ue=ue+Math.imul(We,Jr)|0,K=K+Math.imul(We,qn)|0,K=K+Math.imul(mt,Jr)|0,_e=_e+Math.imul(mt,qn)|0;var bl=(xe+ue|0)+((K&8191)<<13)|0;xe=(_e+(K>>>13)|0)+(bl>>>26)|0,bl&=67108863,ue=Math.imul(Yt,Jr),K=Math.imul(Yt,qn),K=K+Math.imul(jt,Jr)|0,_e=Math.imul(jt,qn);var bo=(xe+ue|0)+((K&8191)<<13)|0;return xe=(_e+(K>>>13)|0)+(bo>>>26)|0,bo&=67108863,ye[0]=ri,ye[1]=Jn,ye[2]=Ii,ye[3]=Vi,ye[4]=ra,ye[5]=ha,ye[6]=va,ye[7]=Xi,ye[8]=oa,ye[9]=Ma,ye[10]=Ga,ye[11]=ss,ye[12]=mo,ye[13]=sl,ye[14]=Eo,ye[15]=ao,ye[16]=Da,ye[17]=bl,ye[18]=bo,xe!==0&&(ye[19]=xe,J.length++),J};Math.imul||(L=S);function w(j,q,U){U.negative=q.negative^j.negative,U.length=j.length+q.length;for(var J=0,ee=0,ce=0;ce>>26)|0,ee+=ye>>>26,ye&=67108863}U.words[ce]=xe,J=ye,ye=ee}return J!==0?U.words[ce]=J:U.length--,U.strip()}function A(j,q,U){var J=new T;return J.mulp(j,q,U)}f.prototype.mulTo=function(q,U){var J,ee=this.length+q.length;return this.length===10&&q.length===10?J=L(this,q,U):ee<63?J=S(this,q,U):ee<1024?J=w(this,q,U):J=A(this,q,U),J};function T(j,q){this.x=j,this.y=q}T.prototype.makeRBT=function(q){for(var U=new Array(q),J=f.prototype._countBits(q)-1,ee=0;ee>=1;return ee},T.prototype.permute=function(q,U,J,ee,ce,ye){for(var xe=0;xe>>1)ce++;return 1<>>13,J[2*ye+1]=ce&8191,ce=ce>>>13;for(ye=2*U;ye>=26,U+=ee/67108864|0,U+=ce>>>26,this.words[J]=ce&67108863}return U!==0&&(this.words[J]=U,this.length++),this.length=q===0?1:this.length,this},f.prototype.muln=function(q){return this.clone().imuln(q)},f.prototype.sqr=function(){return this.mul(this)},f.prototype.isqr=function(){return this.imul(this.clone())},f.prototype.pow=function(q){var U=k(q);if(U.length===0)return new f(1);for(var J=this,ee=0;ee=0);var U=q%26,J=(q-U)/26,ee=67108863>>>26-U<<26-U,ce;if(U!==0){var ye=0;for(ce=0;ce>>26-U}ye&&(this.words[ce]=ye,this.length++)}if(J!==0){for(ce=this.length-1;ce>=0;ce--)this.words[ce+J]=this.words[ce];for(ce=0;ce=0);var ee;U?ee=(U-U%26)/26:ee=0;var ce=q%26,ye=Math.min((q-ce)/26,this.length),xe=67108863^67108863>>>ce<ye)for(this.length-=ye,K=0;K=0&&(_e!==0||K>=ee);K--){var ne=this.words[K]|0;this.words[K]=_e<<26-ce|ne>>>ce,_e=ne&xe}return ue&&_e!==0&&(ue.words[ue.length++]=_e),this.length===0&&(this.words[0]=0,this.length=1),this.strip()},f.prototype.ishrn=function(q,U,J){return u(this.negative===0),this.iushrn(q,U,J)},f.prototype.shln=function(q){return this.clone().ishln(q)},f.prototype.ushln=function(q){return this.clone().iushln(q)},f.prototype.shrn=function(q){return this.clone().ishrn(q)},f.prototype.ushrn=function(q){return this.clone().iushrn(q)},f.prototype.testn=function(q){u(typeof q=="number"&&q>=0);var U=q%26,J=(q-U)/26,ee=1<=0);var U=q%26,J=(q-U)/26;if(u(this.negative===0,"imaskn works only with positive numbers"),this.length<=J)return this;if(U!==0&&J++,this.length=Math.min(J,this.length),U!==0){var ee=67108863^67108863>>>U<=67108864;U++)this.words[U]-=67108864,U===this.length-1?this.words[U+1]=1:this.words[U+1]++;return this.length=Math.max(this.length,U+1),this},f.prototype.isubn=function(q){if(u(typeof q=="number"),u(q<67108864),q<0)return this.iaddn(-q);if(this.negative!==0)return this.negative=0,this.iaddn(q),this.negative=1,this;if(this.words[0]-=q,this.length===1&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var U=0;U>26)-(ue/67108864|0),this.words[ce+J]=ye&67108863}for(;ce>26,this.words[ce+J]=ye&67108863;if(xe===0)return this.strip();for(u(xe===-1),xe=0,ce=0;ce>26,this.words[ce]=ye&67108863;return this.negative=1,this.strip()},f.prototype._wordDiv=function(q,U){var J=this.length-q.length,ee=this.clone(),ce=q,ye=ce.words[ce.length-1]|0,xe=this._countBits(ye);J=26-xe,J!==0&&(ce=ce.ushln(J),ee.iushln(J),ye=ce.words[ce.length-1]|0);var ue=ee.length-ce.length,K;if(U!=="mod"){K=new f(null),K.length=ue+1,K.words=new Array(K.length);for(var _e=0;_e=0;ae--){var pe=(ee.words[ce.length+ae]|0)*67108864+(ee.words[ce.length+ae-1]|0);for(pe=Math.min(pe/ye|0,67108863),ee._ishlnsubmul(ce,pe,ae);ee.negative!==0;)pe--,ee.negative=0,ee._ishlnsubmul(ce,1,ae),ee.isZero()||(ee.negative^=1);K&&(K.words[ae]=pe)}return K&&K.strip(),ee.strip(),U!=="div"&&J!==0&&ee.iushrn(J),{div:K||null,mod:ee}},f.prototype.divmod=function(q,U,J){if(u(!q.isZero()),this.isZero())return{div:new f(0),mod:new f(0)};var ee,ce,ye;return this.negative!==0&&q.negative===0?(ye=this.neg().divmod(q,U),U!=="mod"&&(ee=ye.div.neg()),U!=="div"&&(ce=ye.mod.neg(),J&&ce.negative!==0&&ce.iadd(q)),{div:ee,mod:ce}):this.negative===0&&q.negative!==0?(ye=this.divmod(q.neg(),U),U!=="mod"&&(ee=ye.div.neg()),{div:ee,mod:ye.mod}):(this.negative&q.negative)!==0?(ye=this.neg().divmod(q.neg(),U),U!=="div"&&(ce=ye.mod.neg(),J&&ce.negative!==0&&ce.isub(q)),{div:ye.div,mod:ce}):q.length>this.length||this.cmp(q)<0?{div:new f(0),mod:this}:q.length===1?U==="div"?{div:this.divn(q.words[0]),mod:null}:U==="mod"?{div:null,mod:new f(this.modn(q.words[0]))}:{div:this.divn(q.words[0]),mod:new f(this.modn(q.words[0]))}:this._wordDiv(q,U)},f.prototype.div=function(q){return this.divmod(q,"div",!1).div},f.prototype.mod=function(q){return this.divmod(q,"mod",!1).mod},f.prototype.umod=function(q){return this.divmod(q,"mod",!0).mod},f.prototype.divRound=function(q){var U=this.divmod(q);if(U.mod.isZero())return U.div;var J=U.div.negative!==0?U.mod.isub(q):U.mod,ee=q.ushrn(1),ce=q.andln(1),ye=J.cmp(ee);return ye<0||ce===1&&ye===0?U.div:U.div.negative!==0?U.div.isubn(1):U.div.iaddn(1)},f.prototype.modn=function(q){u(q<=67108863);for(var U=(1<<26)%q,J=0,ee=this.length-1;ee>=0;ee--)J=(U*J+(this.words[ee]|0))%q;return J},f.prototype.idivn=function(q){u(q<=67108863);for(var U=0,J=this.length-1;J>=0;J--){var ee=(this.words[J]|0)+U*67108864;this.words[J]=ee/q|0,U=ee%q}return this.strip()},f.prototype.divn=function(q){return this.clone().idivn(q)},f.prototype.egcd=function(q){u(q.negative===0),u(!q.isZero());var U=this,J=q.clone();U.negative!==0?U=U.umod(q):U=U.clone();for(var ee=new f(1),ce=new f(0),ye=new f(0),xe=new f(1),ue=0;U.isEven()&&J.isEven();)U.iushrn(1),J.iushrn(1),++ue;for(var K=J.clone(),_e=U.clone();!U.isZero();){for(var ne=0,ae=1;(U.words[0]&ae)===0&&ne<26;++ne,ae<<=1);if(ne>0)for(U.iushrn(ne);ne-- >0;)(ee.isOdd()||ce.isOdd())&&(ee.iadd(K),ce.isub(_e)),ee.iushrn(1),ce.iushrn(1);for(var pe=0,ie=1;(J.words[0]&ie)===0&&pe<26;++pe,ie<<=1);if(pe>0)for(J.iushrn(pe);pe-- >0;)(ye.isOdd()||xe.isOdd())&&(ye.iadd(K),xe.isub(_e)),ye.iushrn(1),xe.iushrn(1);U.cmp(J)>=0?(U.isub(J),ee.isub(ye),ce.isub(xe)):(J.isub(U),ye.isub(ee),xe.isub(ce))}return{a:ye,b:xe,gcd:J.iushln(ue)}},f.prototype._invmp=function(q){u(q.negative===0),u(!q.isZero());var U=this,J=q.clone();U.negative!==0?U=U.umod(q):U=U.clone();for(var ee=new f(1),ce=new f(0),ye=J.clone();U.cmpn(1)>0&&J.cmpn(1)>0;){for(var xe=0,ue=1;(U.words[0]&ue)===0&&xe<26;++xe,ue<<=1);if(xe>0)for(U.iushrn(xe);xe-- >0;)ee.isOdd()&&ee.iadd(ye),ee.iushrn(1);for(var K=0,_e=1;(J.words[0]&_e)===0&&K<26;++K,_e<<=1);if(K>0)for(J.iushrn(K);K-- >0;)ce.isOdd()&&ce.iadd(ye),ce.iushrn(1);U.cmp(J)>=0?(U.isub(J),ee.isub(ce)):(J.isub(U),ce.isub(ee))}var ne;return U.cmpn(1)===0?ne=ee:ne=ce,ne.cmpn(0)<0&&ne.iadd(q),ne},f.prototype.gcd=function(q){if(this.isZero())return q.abs();if(q.isZero())return this.abs();var U=this.clone(),J=q.clone();U.negative=0,J.negative=0;for(var ee=0;U.isEven()&&J.isEven();ee++)U.iushrn(1),J.iushrn(1);do{for(;U.isEven();)U.iushrn(1);for(;J.isEven();)J.iushrn(1);var ce=U.cmp(J);if(ce<0){var ye=U;U=J,J=ye}else if(ce===0||J.cmpn(1)===0)break;U.isub(J)}while(!0);return J.iushln(ee)},f.prototype.invm=function(q){return this.egcd(q).a.umod(q)},f.prototype.isEven=function(){return(this.words[0]&1)===0},f.prototype.isOdd=function(){return(this.words[0]&1)===1},f.prototype.andln=function(q){return this.words[0]&q},f.prototype.bincn=function(q){u(typeof q=="number");var U=q%26,J=(q-U)/26,ee=1<>>26,xe&=67108863,this.words[ye]=xe}return ce!==0&&(this.words[ye]=ce,this.length++),this},f.prototype.isZero=function(){return this.length===1&&this.words[0]===0},f.prototype.cmpn=function(q){var U=q<0;if(this.negative!==0&&!U)return-1;if(this.negative===0&&U)return 1;this.strip();var J;if(this.length>1)J=1;else{U&&(q=-q),u(q<=67108863,"Number is too big");var ee=this.words[0]|0;J=ee===q?0:eeq.length)return 1;if(this.length=0;J--){var ee=this.words[J]|0,ce=q.words[J]|0;if(ee!==ce){eece&&(U=1);break}}return U},f.prototype.gtn=function(q){return this.cmpn(q)===1},f.prototype.gt=function(q){return this.cmp(q)===1},f.prototype.gten=function(q){return this.cmpn(q)>=0},f.prototype.gte=function(q){return this.cmp(q)>=0},f.prototype.ltn=function(q){return this.cmpn(q)===-1},f.prototype.lt=function(q){return this.cmp(q)===-1},f.prototype.lten=function(q){return this.cmpn(q)<=0},f.prototype.lte=function(q){return this.cmp(q)<=0},f.prototype.eqn=function(q){return this.cmpn(q)===0},f.prototype.eq=function(q){return this.cmp(q)===0},f.red=function(q){return new O(q)},f.prototype.toRed=function(q){return u(!this.red,"Already a number in reduction context"),u(this.negative===0,"red works only with positives"),q.convertTo(this)._forceRed(q)},f.prototype.fromRed=function(){return u(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},f.prototype._forceRed=function(q){return this.red=q,this},f.prototype.forceRed=function(q){return u(!this.red,"Already a number in reduction context"),this._forceRed(q)},f.prototype.redAdd=function(q){return u(this.red,"redAdd works only with red numbers"),this.red.add(this,q)},f.prototype.redIAdd=function(q){return u(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,q)},f.prototype.redSub=function(q){return u(this.red,"redSub works only with red numbers"),this.red.sub(this,q)},f.prototype.redISub=function(q){return u(this.red,"redISub works only with red numbers"),this.red.isub(this,q)},f.prototype.redShl=function(q){return u(this.red,"redShl works only with red numbers"),this.red.shl(this,q)},f.prototype.redMul=function(q){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,q),this.red.mul(this,q)},f.prototype.redIMul=function(q){return u(this.red,"redMul works only with red numbers"),this.red._verify2(this,q),this.red.imul(this,q)},f.prototype.redSqr=function(){return u(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},f.prototype.redISqr=function(){return u(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},f.prototype.redSqrt=function(){return u(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},f.prototype.redInvm=function(){return u(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},f.prototype.redNeg=function(){return u(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},f.prototype.redPow=function(q){return u(this.red&&!q.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,q)};var m={k256:null,p224:null,p192:null,p25519:null};function F(j,q){this.name=j,this.p=new f(q,16),this.n=this.p.bitLength(),this.k=new f(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}F.prototype._tmp=function(){var q=new f(null);return q.words=new Array(Math.ceil(this.n/13)),q},F.prototype.ireduce=function(q){var U=q,J;do this.split(U,this.tmp),U=this.imulK(U),U=U.iadd(this.tmp),J=U.bitLength();while(J>this.n);var ee=J0?U.isub(this.p):U.strip!==void 0?U.strip():U._strip(),U},F.prototype.split=function(q,U){q.iushrn(this.n,0,U)},F.prototype.imulK=function(q){return q.imul(this.k)};function E(){F.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}c(E,F),E.prototype.split=function(q,U){for(var J=4194303,ee=Math.min(q.length,9),ce=0;ce>>22,ye=xe}ye>>>=22,q.words[ce-10]=ye,ye===0&&q.length>10?q.length-=10:q.length-=9},E.prototype.imulK=function(q){q.words[q.length]=0,q.words[q.length+1]=0,q.length+=2;for(var U=0,J=0;J>>=26,q.words[J]=ce,U=ee}return U!==0&&(q.words[q.length++]=U),q},f._prime=function(q){if(m[q])return m[q];var U;if(q==="k256")U=new E;else if(q==="p224")U=new I;else if(q==="p192")U=new R;else if(q==="p25519")U=new B;else throw new Error("Unknown prime "+q);return m[q]=U,U};function O(j){if(typeof j=="string"){var q=f._prime(j);this.m=q.p,this.prime=q}else u(j.gtn(1),"modulus must be greater than 1"),this.m=j,this.prime=null}O.prototype._verify1=function(q){u(q.negative===0,"red works only with positives"),u(q.red,"red works only with red numbers")},O.prototype._verify2=function(q,U){u((q.negative|U.negative)===0,"red works only with positives"),u(q.red&&q.red===U.red,"red works only with red numbers")},O.prototype.imod=function(q){return this.prime?this.prime.ireduce(q)._forceRed(this):q.umod(this.m)._forceRed(this)},O.prototype.neg=function(q){return q.isZero()?q.clone():this.m.sub(q)._forceRed(this)},O.prototype.add=function(q,U){this._verify2(q,U);var J=q.add(U);return J.cmp(this.m)>=0&&J.isub(this.m),J._forceRed(this)},O.prototype.iadd=function(q,U){this._verify2(q,U);var J=q.iadd(U);return J.cmp(this.m)>=0&&J.isub(this.m),J},O.prototype.sub=function(q,U){this._verify2(q,U);var J=q.sub(U);return J.cmpn(0)<0&&J.iadd(this.m),J._forceRed(this)},O.prototype.isub=function(q,U){this._verify2(q,U);var J=q.isub(U);return J.cmpn(0)<0&&J.iadd(this.m),J},O.prototype.shl=function(q,U){return this._verify1(q),this.imod(q.ushln(U))},O.prototype.imul=function(q,U){return this._verify2(q,U),this.imod(q.imul(U))},O.prototype.mul=function(q,U){return this._verify2(q,U),this.imod(q.mul(U))},O.prototype.isqr=function(q){return this.imul(q,q.clone())},O.prototype.sqr=function(q){return this.mul(q,q)},O.prototype.sqrt=function(q){if(q.isZero())return q.clone();var U=this.m.andln(3);if(u(U%2===1),U===3){var J=this.m.add(new f(1)).iushrn(2);return this.pow(q,J)}for(var ee=this.m.subn(1),ce=0;!ee.isZero()&&ee.andln(1)===0;)ce++,ee.iushrn(1);u(!ee.isZero());var ye=new f(1).toRed(this),xe=ye.redNeg(),ue=this.m.subn(1).iushrn(1),K=this.m.bitLength();for(K=new f(2*K*K).toRed(this);this.pow(K,ue).cmp(xe)!==0;)K.redIAdd(xe);for(var _e=this.pow(K,ee),ne=this.pow(q,ee.addn(1).iushrn(1)),ae=this.pow(q,ee),pe=ce;ae.cmp(ye)!==0;){for(var ie=ae,le=0;ie.cmp(ye)!==0;le++)ie=ie.redSqr();u(le=0;ce--){for(var _e=U.words[ce],ne=K-1;ne>=0;ne--){var ae=_e>>ne&1;if(ye!==ee[0]&&(ye=this.sqr(ye)),ae===0&&xe===0){ue=0;continue}xe<<=1,xe|=ae,ue++,!(ue!==J&&(ce!==0||ne!==0))&&(ye=this.mul(ye,ee[xe]),ue=0,xe=0)}K=26}return ye},O.prototype.convertTo=function(q){var U=q.umod(this.m);return U===q?U.clone():U},O.prototype.convertFrom=function(q){var U=q.clone();return U.red=null,U},f.mont=function(q){return new V(q)};function V(j){O.call(this,j),this.shift=this.m.bitLength(),this.shift%26!==0&&(this.shift+=26-this.shift%26),this.r=new f(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(V,O),V.prototype.convertTo=function(q){return this.imod(q.ushln(this.shift))},V.prototype.convertFrom=function(q){var U=this.imod(q.mul(this.rinv));return U.red=null,U},V.prototype.imul=function(q,U){if(q.isZero()||U.isZero())return q.words[0]=0,q.length=1,q;var J=q.imul(U),ee=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ce=J.isub(ee).iushrn(this.shift),ye=ce;return ce.cmp(this.m)>=0?ye=ce.isub(this.m):ce.cmpn(0)<0&&(ye=ce.iadd(this.m)),ye._forceRed(this)},V.prototype.mul=function(q,U){if(q.isZero()||U.isZero())return new f(0)._forceRed(this);var J=q.mul(U),ee=J.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),ce=J.isub(ee).iushrn(this.shift),ye=ce;return ce.cmp(this.m)>=0?ye=ce.isub(this.m):ce.cmpn(0)<0&&(ye=ce.iadd(this.m)),ye._forceRed(this)},V.prototype.invm=function(q){var U=this.imod(q._invmp(this.m).mul(this.r2));return U._forceRed(this)}})(a,this)}),6204:(function(a){"use strict";a.exports=i;function i(o){var s,l,u,c=o.length,f=0;for(s=0;s>>1;if(!(T<=0)){var m,F=s.mallocDouble(2*T*w),E=s.mallocInt32(w);if(w=f(C,T,F,E),w>0){if(T===1&&L)l.init(w),m=l.sweepComplete(T,S,0,w,F,E,0,w,F,E);else{var I=s.mallocDouble(2*T*A),R=s.mallocInt32(A);A=f(k,T,I,R),A>0&&(l.init(w+A),T===1?m=l.sweepBipartite(T,S,0,w,F,E,0,A,I,R):m=u(T,S,L,w,F,E,A,I,R),s.free(I),s.free(R))}s.free(F),s.free(E)}return m}}}var g;function p(C,k){g.push([C,k])}function x(C){return g=[],v(C,C,p,!0),g}function _(C,k){return g=[],v(C,k,p,!1),g}function y(C,k,S){switch(arguments.length){case 1:return x(C);case 2:return typeof k=="function"?v(C,C,k,!0):_(C,k);case 3:return v(C,k,S,!1);default:throw new Error("box-intersect: Invalid arguments")}}}),2455:(function(a,i){"use strict";function o(){function u(v,g,p,x,_,y,C,k,S,L,w){for(var A=2*v,T=x,m=A*x;T<_;++T,m+=A){var F=y[g+m],E=y[g+m+v],I=C[T];e:for(var R=k,B=A*k;RS-k?u(v,g,p,x,_,y,C,k,S,L,w):c(v,g,p,x,_,y,C,k,S,L,w)}return f}function s(){function u(p,x,_,y,C,k,S,L,w,A,T){for(var m=2*p,F=y,E=m*y;FA-w?y?u(p,x,_,C,k,S,L,w,A,T,m):c(p,x,_,C,k,S,L,w,A,T,m):y?f(p,x,_,C,k,S,L,w,A,T,m):v(p,x,_,C,k,S,L,w,A,T,m)}return g}function l(u){return u?o():s()}i.partial=l(!1),i.full=l(!0)}),7150:(function(a,i,o){"use strict";a.exports=j;var s=o(1888),l=o(8828),u=o(2455),c=u.partial,f=u.full,v=o(855),g=o(3545),p=o(8105),x=128,_=1<<22,y=1<<22,C=p("!(lo>=p0)&&!(p1>=hi)"),k=p("lo===p0"),S=p("lo0;){_e-=1;var pe=_e*T,ie=E[pe],le=E[pe+1],me=E[pe+2],be=E[pe+3],De=E[pe+4],Ge=E[pe+5],ht=_e*m,it=I[ht],Oe=I[ht+1],ze=Ge&1,ct=!!(Ge&16),et=ce,qe=ye,we=ue,Le=K;if(ze&&(et=ue,qe=K,we=ce,Le=ye),!(Ge&2&&(me=S(q,ie,le,me,et,qe,Oe),le>=me))&&!(Ge&4&&(le=L(q,ie,le,me,et,qe,it),le>=me))){var Ke=me-le,Te=De-be;if(ct){if(q*Ke*(Ke+Te)p&&_[A+g]>L;--w,A-=C){for(var T=A,m=A+C,F=0;F>>1,L=2*v,w=S,A=_[L*S+g];C=I?(w=E,A=I):F>=B?(w=m,A=F):(w=R,A=B):I>=B?(w=E,A=I):B>=F?(w=m,A=F):(w=R,A=B);for(var j=L*(k-1),q=L*w,O=0;O=p0)&&!(p1>=hi)":g};function o(p){return i[p]}function s(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m];if(I===S)if(T===E)T+=1,A+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function l(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m];if(IR;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function u(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+F];if(I<=S)if(T===E)T+=1,A+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function c(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+F];if(I<=S)if(T===E)T+=1,A+=L;else{for(var R=0;L>R;++R){var B=C[w+R];C[w+R]=C[A],C[A++]=B}var O=k[E];k[E]=k[T],k[T++]=O}}return T}function f(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m],R=C[w+F];if(I<=S&&S<=R)if(T===E)T+=1,A+=L;else{for(var B=0;L>B;++B){var O=C[w+B];C[w+B]=C[A],C[A++]=O}var V=k[E];k[E]=k[T],k[T++]=V}}return T}function v(p,x,_,y,C,k,S){for(var L=2*p,w=L*_,A=w,T=_,m=x,F=p+x,E=_;y>E;++E,w+=L){var I=C[w+m],R=C[w+F];if(IB;++B){var O=C[w+B];C[w+B]=C[A],C[A++]=O}var V=k[E];k[E]=k[T],k[T++]=V}}return T}function g(p,x,_,y,C,k,S,L){for(var w=2*p,A=w*_,T=A,m=_,F=x,E=p+x,I=_;y>I;++I,A+=w){var R=C[A+F],B=C[A+E];if(!(R>=S)&&!(L>=B))if(m===I)m+=1,T+=w;else{for(var O=0;w>O;++O){var V=C[A+O];C[A+O]=C[T],C[T++]=V}var j=k[I];k[I]=k[m],k[m++]=j}}return m}}),4192:(function(a){"use strict";a.exports=o;var i=32;function o(x,_){_<=4*i?s(0,_-1,x):p(0,_-1,x)}function s(x,_,y){for(var C=2*(x+1),k=x+1;k<=_;++k){for(var S=y[C++],L=y[C++],w=k,A=C-2;w-- >x;){var T=y[A-2],m=y[A-1];if(Ty[_+1]:!0}function g(x,_,y,C){x*=2;var k=C[x];return k<_?!0:k===_?C[x+1]>1,w=L-C,A=L+C,T=k,m=w,F=L,E=A,I=S,R=x+1,B=_-1,O=0;v(T,m,y)&&(O=T,T=m,m=O),v(E,I,y)&&(O=E,E=I,I=O),v(T,F,y)&&(O=T,T=F,F=O),v(m,F,y)&&(O=m,m=F,F=O),v(T,E,y)&&(O=T,T=E,E=O),v(F,E,y)&&(O=F,F=E,E=O),v(m,I,y)&&(O=m,m=I,I=O),v(m,F,y)&&(O=m,m=F,F=O),v(E,I,y)&&(O=E,E=I,I=O);for(var V=y[2*m],j=y[2*m+1],q=y[2*E],U=y[2*E+1],J=2*T,ee=2*F,ce=2*I,ye=2*k,xe=2*L,ue=2*S,K=0;K<2;++K){var _e=y[J+K],ne=y[ee+K],ae=y[ce+K];y[ye+K]=_e,y[xe+K]=ne,y[ue+K]=ae}u(w,x,y),u(A,_,y);for(var pe=R;pe<=B;++pe)if(g(pe,V,j,y))pe!==R&&l(pe,R,y),++R;else if(!g(pe,q,U,y))for(;;)if(g(B,q,U,y)){g(B,V,j,y)?(c(pe,R,B,y),++R,--B):(l(pe,B,y),--B);break}else{if(--B>>1;u(C,ne);for(var ae=0,pe=0,xe=0;xe=c)ie=ie-c|0,S(p,x,pe--,ie);else if(ie>=0)S(v,g,ae--,ie);else if(ie<=-c){ie=-ie-c|0;for(var le=0;le>>1;u(C,ne);for(var ae=0,pe=0,ie=0,xe=0;xe>1===C[2*xe+3]>>1&&(me=2,xe+=1),le<0){for(var be=-(le>>1)-1,De=0;De>1)-1;me===0?S(v,g,ae--,be):me===1?S(p,x,pe--,be):me===2&&S(_,y,ie--,be)}}}function T(F,E,I,R,B,O,V,j,q,U,J,ee){var ce=0,ye=2*F,xe=E,ue=E+F,K=1,_e=1;R?_e=c:K=c;for(var ne=B;ne>>1;u(C,le);for(var me=0,ne=0;ne=c?(De=!R,ae-=c):(De=!!R,ae-=1),De)L(v,g,me++,ae);else{var Ge=ee[ae],ht=ye*ae,it=J[ht+E+1],Oe=J[ht+E+1+F];e:for(var ze=0;ze>>1;u(C,ae);for(var pe=0,ue=0;ue=c)v[pe++]=K-c;else{K-=1;var le=J[K],me=ce*K,be=U[me+E+1],De=U[me+E+1+F];e:for(var Ge=0;Ge=0;--Ge)if(v[Ge]===K){for(var ze=Ge+1;ze0;){for(var k=g.pop(),_=g.pop(),S=-1,L=-1,y=x[_],A=1;A=0||(v.flip(_,k),u(f,v,g,S,_,L),u(f,v,g,_,L,S),u(f,v,g,L,k,S),u(f,v,g,k,S,L))}}}),5023:(function(a,i,o){"use strict";var s=o(2478);a.exports=g;function l(p,x,_,y,C,k,S){this.cells=p,this.neighbor=x,this.flags=y,this.constraint=_,this.active=C,this.next=k,this.boundary=S}var u=l.prototype;function c(p,x){return p[0]-x[0]||p[1]-x[1]||p[2]-x[2]}u.locate=(function(){var p=[0,0,0];return function(x,_,y){var C=x,k=_,S=y;return _0||S.length>0;){for(;k.length>0;){var m=k.pop();if(L[m]!==-C){L[m]=C;for(var F=w[m],E=0;E<3;++E){var I=T[3*m+E];I>=0&&L[I]===0&&(A[3*m+E]?S.push(I):(k.push(I),L[I]=C))}}}var R=S;S=k,k=R,S.length=0,C=-C}var B=v(w,L,x);return _?B.concat(y.boundary):B}}),8902:(function(a,i,o){"use strict";var s=o(2478),l=o(3250)[3],u=0,c=1,f=2;a.exports=S;function v(L,w,A,T,m){this.a=L,this.b=w,this.idx=A,this.lowerIds=T,this.upperIds=m}function g(L,w,A,T){this.a=L,this.b=w,this.type=A,this.idx=T}function p(L,w){var A=L.a[0]-w.a[0]||L.a[1]-w.a[1]||L.type-w.type;return A||L.type!==u&&(A=l(L.a,L.b,w.b),A)?A:L.idx-w.idx}function x(L,w){return l(L.a,L.b,w)}function _(L,w,A,T,m){for(var F=s.lt(w,T,x),E=s.gt(w,T,x),I=F;I1&&l(A[B[V-2]],A[B[V-1]],T)>0;)L.push([B[V-1],B[V-2],m]),V-=1;B.length=V,B.push(m);for(var O=R.upperIds,V=O.length;V>1&&l(A[O[V-2]],A[O[V-1]],T)<0;)L.push([O[V-2],O[V-1],m]),V-=1;O.length=V,O.push(m)}}function y(L,w){var A;return L.a[0]R[0]&&m.push(new g(R,I,f,F),new g(I,R,c,F))}m.sort(p);for(var B=m[0].a[0]-(1+Math.abs(m[0].a[0]))*Math.pow(2,-52),O=[new v([B,1],[B,0],-1,[],[],[],[])],V=[],F=0,j=m.length;F=0}})(),u.removeTriangle=function(v,g,p){var x=this.stars;c(x[v],g,p),c(x[g],p,v),c(x[p],v,g)},u.addTriangle=function(v,g,p){var x=this.stars;x[v].push(g,p),x[g].push(p,v),x[p].push(v,g)},u.opposite=function(v,g){for(var p=this.stars[g],x=1,_=p.length;x<_;x+=2)if(p[x]===v)return p[x-1];return-1},u.flip=function(v,g){var p=this.opposite(v,g),x=this.opposite(g,v);this.removeTriangle(v,g,p),this.removeTriangle(g,v,x),this.addTriangle(v,x,p),this.addTriangle(g,p,x)},u.edges=function(){for(var v=this.stars,g=[],p=0,x=v.length;p=0;--q){var _e=V[q];U=_e[0];var ne=B[U],ae=ne[0],pe=ne[1],ie=R[ae],le=R[pe];if((ie[0]-le[0]||ie[1]-le[1])<0){var me=ae;ae=pe,pe=me}ne[0]=ae;var be=ne[1]=_e[1],De;for(j&&(De=ne[2]);q>0&&V[q-1][0]===U;){var _e=V[--q],Ge=_e[1];j?B.push([be,Ge,De]):B.push([be,Ge]),be=Ge}j?B.push([be,pe,De]):B.push([be,pe])}return J}function w(R,B,O){for(var V=B.length,j=new s(V),q=[],U=0;UB[2]?1:0)}function m(R,B,O){if(R.length!==0){if(B)for(var V=0;V0||U.length>0}function I(R,B,O){var V;if(O){V=B;for(var j=new Array(B.length),q=0;qL+1)throw new Error(k+" map requires nshades to be at least size "+C.length);Array.isArray(g.alpha)?g.alpha.length!==2?w=[1,1]:w=g.alpha.slice():typeof g.alpha=="number"?w=[g.alpha,g.alpha]:w=[1,1],p=C.map(function(I){return Math.round(I.index*L)}),w[0]=Math.min(Math.max(w[0],0),1),w[1]=Math.min(Math.max(w[1],0),1);var T=C.map(function(I,R){var B=C[R].index,O=C[R].rgb.slice();return O.length===4&&O[3]>=0&&O[3]<=1||(O[3]=w[0]+(w[1]-w[0])*B),O}),m=[];for(A=0;A=0}function g(p,x,_,y){var C=s(x,_,y);if(C===0){var k=l(s(p,x,_)),S=l(s(p,x,y));if(k===S){if(k===0){var L=v(p,x,_),w=v(p,x,y);return L===w?0:L?1:-1}return 0}else{if(S===0)return k>0||v(p,x,y)?-1:1;if(k===0)return S>0||v(p,x,_)?1:-1}return l(S-k)}var A=s(p,x,_);if(A>0)return C>0&&s(p,x,y)>0?1:-1;if(A<0)return C>0||s(p,x,y)>0?1:-1;var T=s(p,x,y);return T>0||v(p,x,_)?1:-1}}),8572:(function(a){"use strict";a.exports=function(o){return o<0?-1:o>0?1:0}}),8507:(function(a){a.exports=s;var i=Math.min;function o(l,u){return l-u}function s(l,u){var c=l.length,f=l.length-u.length;if(f)return f;switch(c){case 0:return 0;case 1:return l[0]-u[0];case 2:return l[0]+l[1]-u[0]-u[1]||i(l[0],l[1])-i(u[0],u[1]);case 3:var v=l[0]+l[1],g=u[0]+u[1];if(f=v+l[2]-(g+u[2]),f)return f;var p=i(l[0],l[1]),x=i(u[0],u[1]);return i(p,l[2])-i(x,u[2])||i(p+l[2],v)-i(x+u[2],g);case 4:var _=l[0],y=l[1],C=l[2],k=l[3],S=u[0],L=u[1],w=u[2],A=u[3];return _+y+C+k-(S+L+w+A)||i(_,y,C,k)-i(S,L,w,A,S)||i(_+y,_+C,_+k,y+C,y+k,C+k)-i(S+L,S+w,S+A,L+w,L+A,w+A)||i(_+y+C,_+y+k,_+C+k,y+C+k)-i(S+L+w,S+L+A,S+w+A,L+w+A);default:for(var T=l.slice().sort(o),m=u.slice().sort(o),F=0;Fo[l][0]&&(l=u);return sl?[[l],[s]]:[[s]]}}),4750:(function(a,i,o){"use strict";a.exports=l;var s=o(3090);function l(u){var c=s(u),f=c.length;if(f<=2)return[];for(var v=new Array(f),g=c[f-1],p=0;p=g[S]&&(k+=1);y[C]=k}}return v}function f(v,g){try{return s(v,!0)}catch(y){var p=l(v);if(p.length<=g)return[];var x=u(v,p),_=s(x,!0);return c(_,p)}}}),4769:(function(a){"use strict";function i(s,l,u,c,f,v){var g=6*f*f-6*f,p=3*f*f-4*f+1,x=-6*f*f+6*f,_=3*f*f-2*f;if(s.length){v||(v=new Array(s.length));for(var y=s.length-1;y>=0;--y)v[y]=g*s[y]+p*l[y]+x*u[y]+_*c[y];return v}return g*s+p*l+x*u[y]+_*c}function o(s,l,u,c,f,v){var g=f-1,p=f*f,x=g*g,_=(1+2*f)*x,y=f*x,C=p*(3-2*f),k=p*g;if(s.length){v||(v=new Array(s.length));for(var S=s.length-1;S>=0;--S)v[S]=_*s[S]+y*l[S]+C*u[S]+k*c[S];return v}return _*s+y*l+C*u+k*c}a.exports=o,a.exports.derivative=i}),7642:(function(a,i,o){"use strict";var s=o(8954),l=o(1682);a.exports=v;function u(g,p){this.point=g,this.index=p}function c(g,p){for(var x=g.point,_=p.point,y=x.length,C=0;C=2)return!1;O[j]=q}return!0}):B=B.filter(function(O){for(var V=0;V<=_;++V){var j=F[O[V]];if(j<0)return!1;O[V]=j}return!0}),_&1)for(var k=0;k>>31},a.exports.exponent=function(C){var k=a.exports.hi(C);return(k<<1>>>21)-1023},a.exports.fraction=function(C){var k=a.exports.lo(C),S=a.exports.hi(C),L=S&(1<<20)-1;return S&2146435072&&(L+=1048576),[k,L]},a.exports.denormalized=function(C){var k=a.exports.hi(C);return!(k&2146435072)}}),1338:(function(a){"use strict";function i(l,u,c){var f=l[c]|0;if(f<=0)return[];var v=new Array(f),g;if(c===l.length-1)for(g=0;g0)return o(l|0,u);break;case"object":if(typeof l.length=="number")return i(l,u,0);break}return[]}a.exports=s}),3134:(function(a,i,o){"use strict";a.exports=l;var s=o(1682);function l(u,c){var f=u.length;if(typeof c!="number"){c=0;for(var v=0;v=_-1)for(var A=k.length-1,m=p-x[_-1],T=0;T=_-1)for(var w=k.length-1,A=p-x[_-1],T=0;T=0;--_)if(p[--x])return!1;return!0},f.jump=function(p){var x=this.lastT(),_=this.dimension;if(!(p0;--T)y.push(u(L[T-1],w[T-1],arguments[T])),C.push(0)}},f.push=function(p){var x=this.lastT(),_=this.dimension;if(!(p1e-6?1/S:0;this._time.push(p);for(var m=_;m>0;--m){var F=u(w[m-1],A[m-1],arguments[m]);y.push(F),C.push((F-y[k++])*T)}}},f.set=function(p){var x=this.dimension;if(!(p0;--L)_.push(u(k[L-1],S[L-1],arguments[L])),y.push(0)}},f.move=function(p){var x=this.lastT(),_=this.dimension;if(!(p<=x||arguments.length!==_+1)){var y=this._state,C=this._velocity,k=y.length-this.dimension,S=this.bounds,L=S[0],w=S[1],A=p-x,T=A>1e-6?1/A:0;this._time.push(p);for(var m=_;m>0;--m){var F=arguments[m];y.push(u(L[m-1],w[m-1],y[k++]+F)),C.push(F*T)}}},f.idle=function(p){var x=this.lastT();if(!(p=0;--T)y.push(u(L[T],w[T],y[k]+A*C[k])),C.push(0),k+=1}};function v(p){for(var x=new Array(p),_=0;_=0;--R){var m=F[R];E[R]<=0?F[R]=new s(m._color,m.key,m.value,F[R+1],m.right,m._count+1):F[R]=new s(m._color,m.key,m.value,m.left,F[R+1],m._count+1)}for(var R=F.length-1;R>1;--R){var B=F[R-1],m=F[R];if(B._color===o||m._color===o)break;var O=F[R-2];if(O.left===B)if(B.left===m){var V=O.right;if(V&&V._color===i)B._color=o,O.right=u(o,V),O._color=i,R-=1;else{if(O._color=i,O.left=B.right,B._color=o,B.right=O,F[R-2]=B,F[R-1]=m,c(O),c(B),R>=3){var j=F[R-3];j.left===O?j.left=B:j.right=B}break}}else{var V=O.right;if(V&&V._color===i)B._color=o,O.right=u(o,V),O._color=i,R-=1;else{if(B.right=m.left,O._color=i,O.left=m.right,m._color=o,m.left=B,m.right=O,F[R-2]=m,F[R-1]=B,c(O),c(B),c(m),R>=3){var j=F[R-3];j.left===O?j.left=m:j.right=m}break}}else if(B.right===m){var V=O.left;if(V&&V._color===i)B._color=o,O.left=u(o,V),O._color=i,R-=1;else{if(O._color=i,O.right=B.left,B._color=o,B.left=O,F[R-2]=B,F[R-1]=m,c(O),c(B),R>=3){var j=F[R-3];j.right===O?j.right=B:j.left=B}break}}else{var V=O.left;if(V&&V._color===i)B._color=o,O.left=u(o,V),O._color=i,R-=1;else{if(B.left=m.right,O._color=i,O.right=m.left,m._color=o,m.right=B,m.left=O,F[R-2]=m,F[R-1]=B,c(O),c(B),c(m),R>=3){var j=F[R-3];j.right===O?j.right=m:j.left=m}break}}}return F[0]._color=o,new f(T,F[0])};function g(w,A){if(A.left){var T=g(w,A.left);if(T)return T}var T=w(A.key,A.value);if(T)return T;if(A.right)return g(w,A.right)}function p(w,A,T,m){var F=A(w,m.key);if(F<=0){if(m.left){var E=p(w,A,T,m.left);if(E)return E}var E=T(m.key,m.value);if(E)return E}if(m.right)return p(w,A,T,m.right)}function x(w,A,T,m,F){var E=T(w,F.key),I=T(A,F.key),R;if(E<=0&&(F.left&&(R=x(w,A,T,m,F.left),R)||I>0&&(R=m(F.key,F.value),R)))return R;if(I>0&&F.right)return x(w,A,T,m,F.right)}v.forEach=function(A,T,m){if(this.root)switch(arguments.length){case 1:return g(A,this.root);case 2:return p(T,this._compare,A,this.root);case 3:return this._compare(T,m)>=0?void 0:x(T,m,this._compare,A,this.root)}},Object.defineProperty(v,"begin",{get:function(){for(var w=[],A=this.root;A;)w.push(A),A=A.left;return new _(this,w)}}),Object.defineProperty(v,"end",{get:function(){for(var w=[],A=this.root;A;)w.push(A),A=A.right;return new _(this,w)}}),v.at=function(w){if(w<0)return new _(this,[]);for(var A=this.root,T=[];;){if(T.push(A),A.left){if(w=A.right._count)break;A=A.right}else break}return new _(this,[])},v.ge=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E<=0&&(F=m.length),E<=0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.gt=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E<0&&(F=m.length),E<0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.lt=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E>0&&(F=m.length),E<=0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.le=function(w){for(var A=this._compare,T=this.root,m=[],F=0;T;){var E=A(w,T.key);m.push(T),E>=0&&(F=m.length),E<0?T=T.left:T=T.right}return m.length=F,new _(this,m)},v.find=function(w){for(var A=this._compare,T=this.root,m=[];T;){var F=A(w,T.key);if(m.push(T),F===0)return new _(this,m);F<=0?T=T.left:T=T.right}return new _(this,[])},v.remove=function(w){var A=this.find(w);return A?A.remove():this},v.get=function(w){for(var A=this._compare,T=this.root;T;){var m=A(w,T.key);if(m===0)return T.value;m<=0?T=T.left:T=T.right}};function _(w,A){this.tree=w,this._stack=A}var y=_.prototype;Object.defineProperty(y,"valid",{get:function(){return this._stack.length>0}}),Object.defineProperty(y,"node",{get:function(){return this._stack.length>0?this._stack[this._stack.length-1]:null},enumerable:!0}),y.clone=function(){return new _(this.tree,this._stack.slice())};function C(w,A){w.key=A.key,w.value=A.value,w.left=A.left,w.right=A.right,w._color=A._color,w._count=A._count}function k(w){for(var A,T,m,F,E=w.length-1;E>=0;--E){if(A=w[E],E===0){A._color=o;return}if(T=w[E-1],T.left===A){if(m=T.right,m.right&&m.right._color===i){if(m=T.right=l(m),F=m.right=l(m.right),T.right=m.left,m.left=T,m.right=F,m._color=T._color,A._color=o,T._color=o,F._color=o,c(T),c(m),E>1){var I=w[E-2];I.left===T?I.left=m:I.right=m}w[E-1]=m;return}else if(m.left&&m.left._color===i){if(m=T.right=l(m),F=m.left=l(m.left),T.right=F.left,m.left=F.right,F.left=T,F.right=m,F._color=T._color,T._color=o,m._color=o,A._color=o,c(T),c(m),c(F),E>1){var I=w[E-2];I.left===T?I.left=F:I.right=F}w[E-1]=F;return}if(m._color===o)if(T._color===i){T._color=o,T.right=u(i,m);return}else{T.right=u(i,m);continue}else{if(m=l(m),T.right=m.left,m.left=T,m._color=T._color,T._color=i,c(T),c(m),E>1){var I=w[E-2];I.left===T?I.left=m:I.right=m}w[E-1]=m,w[E]=T,E+11){var I=w[E-2];I.right===T?I.right=m:I.left=m}w[E-1]=m;return}else if(m.right&&m.right._color===i){if(m=T.left=l(m),F=m.right=l(m.right),T.left=F.right,m.right=F.left,F.right=T,F.left=m,F._color=T._color,T._color=o,m._color=o,A._color=o,c(T),c(m),c(F),E>1){var I=w[E-2];I.right===T?I.right=F:I.left=F}w[E-1]=F;return}if(m._color===o)if(T._color===i){T._color=o,T.left=u(i,m);return}else{T.left=u(i,m);continue}else{if(m=l(m),T.left=m.right,m.right=T,m._color=T._color,T._color=i,c(T),c(m),E>1){var I=w[E-2];I.right===T?I.right=m:I.left=m}w[E-1]=m,w[E]=T,E+1=0;--m){var T=w[m];T.left===w[m+1]?A[m]=new s(T._color,T.key,T.value,A[m+1],T.right,T._count):A[m]=new s(T._color,T.key,T.value,T.left,A[m+1],T._count)}if(T=A[A.length-1],T.left&&T.right){var F=A.length;for(T=T.left;T.right;)A.push(T),T=T.right;var E=A[F-1];A.push(new s(T._color,E.key,E.value,T.left,T.right,T._count)),A[F-1].key=T.key,A[F-1].value=T.value;for(var m=A.length-2;m>=F;--m)T=A[m],A[m]=new s(T._color,T.key,T.value,T.left,A[m+1],T._count);A[F-1].left=A[F]}if(T=A[A.length-1],T._color===i){var I=A[A.length-2];I.left===T?I.left=null:I.right===T&&(I.right=null),A.pop();for(var m=0;m0)return this._stack[this._stack.length-1].key},enumerable:!0}),Object.defineProperty(y,"value",{get:function(){if(this._stack.length>0)return this._stack[this._stack.length-1].value},enumerable:!0}),Object.defineProperty(y,"index",{get:function(){var w=0,A=this._stack;if(A.length===0){var T=this.tree.root;return T?T._count:0}else A[A.length-1].left&&(w=A[A.length-1].left._count);for(var m=A.length-2;m>=0;--m)A[m+1]===A[m].right&&(++w,A[m].left&&(w+=A[m].left._count));return w},enumerable:!0}),y.next=function(){var w=this._stack;if(w.length!==0){var A=w[w.length-1];if(A.right)for(A=A.right;A;)w.push(A),A=A.left;else for(w.pop();w.length>0&&w[w.length-1].right===A;)A=w[w.length-1],w.pop()}},Object.defineProperty(y,"hasNext",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].right)return!0;for(var A=w.length-1;A>0;--A)if(w[A-1].left===w[A])return!0;return!1}}),y.update=function(w){var A=this._stack;if(A.length===0)throw new Error("Can't update empty node!");var T=new Array(A.length),m=A[A.length-1];T[T.length-1]=new s(m._color,m.key,w,m.left,m.right,m._count);for(var F=A.length-2;F>=0;--F)m=A[F],m.left===A[F+1]?T[F]=new s(m._color,m.key,m.value,T[F+1],m.right,m._count):T[F]=new s(m._color,m.key,m.value,m.left,T[F+1],m._count);return new f(this.tree._compare,T[0])},y.prev=function(){var w=this._stack;if(w.length!==0){var A=w[w.length-1];if(A.left)for(A=A.left;A;)w.push(A),A=A.right;else for(w.pop();w.length>0&&w[w.length-1].left===A;)A=w[w.length-1],w.pop()}},Object.defineProperty(y,"hasPrev",{get:function(){var w=this._stack;if(w.length===0)return!1;if(w[w.length-1].left)return!0;for(var A=w.length-1;A>0;--A)if(w[A-1].right===w[A])return!0;return!1}});function S(w,A){return wA?1:0}function L(w){return new f(w||S,null)}}),3837:(function(a,i,o){"use strict";a.exports=R;var s=o(4935),l=o(501),u=o(5304),c=o(6429),f=o(6444),v=new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]),g=ArrayBuffer,p=DataView;function x(B){return g.isView(B)&&!(B instanceof p)}function _(B){return Array.isArray(B)||x(B)}function y(B,O){return B[0]=O[0],B[1]=O[1],B[2]=O[2],B}function C(B){this.gl=B,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.tickFontStyle=["normal","normal","normal"],this.tickFontWeight=["normal","normal","normal"],this.tickFontVariant=["normal","normal","normal"],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","sans-serif","sans-serif"],this.labelFontStyle=["normal","normal","normal"],this.labelFontWeight=["normal","normal","normal"],this.labelFontVariant=["normal","normal","normal"],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=u(B)}var k=C.prototype;k.update=function(B){B=B||{};function O(ae,pe,ie){if(ie in B){var le=B[ie],me=this[ie],be;(ae?_(le)&&_(le[0]):_(le))?this[ie]=be=[pe(le[0]),pe(le[1]),pe(le[2])]:this[ie]=be=[pe(le),pe(le),pe(le)];for(var De=0;De<3;++De)if(be[De]!==me[De])return!0}return!1}var V=O.bind(this,!1,Number),j=O.bind(this,!1,Boolean),q=O.bind(this,!1,String),U=O.bind(this,!0,function(ae){if(_(ae)){if(ae.length===3)return[+ae[0],+ae[1],+ae[2],1];if(ae.length===4)return[+ae[0],+ae[1],+ae[2],+ae[3]]}return[0,0,0,1]}),J,ee=!1,ce=!1;if("bounds"in B)for(var ye=B.bounds,xe=0;xe<2;++xe)for(var ue=0;ue<3;++ue)ye[xe][ue]!==this.bounds[xe][ue]&&(ce=!0),this.bounds[xe][ue]=ye[xe][ue];if("ticks"in B){J=B.ticks,ee=!0,this.autoTicks=!1;for(var xe=0;xe<3;++xe)this.tickSpacing[xe]=0}else V("tickSpacing")&&(this.autoTicks=!0,ce=!0);if(this._firstInit&&("ticks"in B||"tickSpacing"in B||(this.autoTicks=!0),ce=!0,ee=!0,this._firstInit=!1),ce&&this.autoTicks&&(J=f.create(this.bounds,this.tickSpacing),ee=!0),ee){for(var xe=0;xe<3;++xe)J[xe].sort(function(pe,ie){return pe.x-ie.x});f.equal(J,this.ticks)?ee=!1:this.ticks=J}j("tickEnable"),q("tickFont")&&(ee=!0),q("tickFontStyle")&&(ee=!0),q("tickFontWeight")&&(ee=!0),q("tickFontVariant")&&(ee=!0),V("tickSize"),V("tickAngle"),V("tickPad"),U("tickColor");var K=q("labels");q("labelFont")&&(K=!0),q("labelFontStyle")&&(K=!0),q("labelFontWeight")&&(K=!0),q("labelFontVariant")&&(K=!0),j("labelEnable"),V("labelSize"),V("labelPad"),U("labelColor"),j("lineEnable"),j("lineMirror"),V("lineWidth"),U("lineColor"),j("lineTickEnable"),j("lineTickMirror"),V("lineTickLength"),V("lineTickWidth"),U("lineTickColor"),j("gridEnable"),V("gridWidth"),U("gridColor"),j("zeroEnable"),U("zeroLineColor"),V("zeroLineWidth"),j("backgroundEnable"),U("backgroundColor");var _e=[{family:this.labelFont[0],style:this.labelFontStyle[0],weight:this.labelFontWeight[0],variant:this.labelFontVariant[0]},{family:this.labelFont[1],style:this.labelFontStyle[1],weight:this.labelFontWeight[1],variant:this.labelFontVariant[1]},{family:this.labelFont[2],style:this.labelFontStyle[2],weight:this.labelFontWeight[2],variant:this.labelFontVariant[2]}],ne=[{family:this.tickFont[0],style:this.tickFontStyle[0],weight:this.tickFontWeight[0],variant:this.tickFontVariant[0]},{family:this.tickFont[1],style:this.tickFontStyle[1],weight:this.tickFontWeight[1],variant:this.tickFontVariant[1]},{family:this.tickFont[2],style:this.tickFontStyle[2],weight:this.tickFontWeight[2],variant:this.tickFontVariant[2]}];this._text?this._text&&(K||ee)&&this._text.update(this.bounds,this.labels,_e,this.ticks,ne):this._text=s(this.gl,this.bounds,this.labels,_e,this.ticks,ne),this._lines&&ee&&(this._lines.dispose(),this._lines=null),this._lines||(this._lines=l(this.gl,this.bounds,this.ticks))};function S(){this.primalOffset=[0,0,0],this.primalMinor=[0,0,0],this.mirrorOffset=[0,0,0],this.mirrorMinor=[0,0,0]}var L=[new S,new S,new S];function w(B,O,V,j,q){for(var U=B.primalOffset,J=B.primalMinor,ee=B.mirrorOffset,ce=B.mirrorMinor,ye=j[O],xe=0;xe<3;++xe)if(O!==xe){var ue=U,K=ee,_e=J,ne=ce;ye&1<0?(_e[xe]=-1,ne[xe]=0):(_e[xe]=0,ne[xe]=1)}}var A=[0,0,0],T={model:v,view:v,projection:v,_ortho:!1};k.isOpaque=function(){return!0},k.isTransparent=function(){return!1},k.drawTransparent=function(B){};var m=0,F=[0,0,0],E=[0,0,0],I=[0,0,0];k.draw=function(B){B=B||T;for(var ie=this.gl,O=B.model||v,V=B.view||v,j=B.projection||v,q=this.bounds,U=B._ortho||!1,J=c(O,V,j,q,U),ee=J.cubeEdges,ce=J.axis,ye=V[12],xe=V[13],ue=V[14],K=V[15],_e=U?2:1,ne=_e*this.pixelRatio*(j[3]*ye+j[7]*xe+j[11]*ue+j[15]*K)/ie.drawingBufferHeight,ae=0;ae<3;++ae)this.lastCubeProps.cubeEdges[ae]=ee[ae],this.lastCubeProps.axis[ae]=ce[ae];for(var pe=L,ae=0;ae<3;++ae)w(L[ae],ae,this.bounds,ee,ce);for(var ie=this.gl,le=A,ae=0;ae<3;++ae)this.backgroundEnable[ae]?le[ae]=ce[ae]:le[ae]=0;this._background.draw(O,V,j,q,le,this.backgroundColor),this._lines.bind(O,V,j,this);for(var ae=0;ae<3;++ae){var me=[0,0,0];ce[ae]>0?me[ae]=q[1][ae]:me[ae]=q[0][ae];for(var be=0;be<2;++be){var De=(ae+1+be)%3,Ge=(ae+1+(be^1))%3;this.gridEnable[De]&&this._lines.drawGrid(De,Ge,this.bounds,me,this.gridColor[De],this.gridWidth[De]*this.pixelRatio)}for(var be=0;be<2;++be){var De=(ae+1+be)%3,Ge=(ae+1+(be^1))%3;this.zeroEnable[Ge]&&Math.min(q[0][Ge],q[1][Ge])<=0&&Math.max(q[0][Ge],q[1][Ge])>=0&&this._lines.drawZero(De,Ge,this.bounds,me,this.zeroLineColor[Ge],this.zeroLineWidth[Ge]*this.pixelRatio)}}for(var ae=0;ae<3;++ae){this.lineEnable[ae]&&this._lines.drawAxisLine(ae,this.bounds,pe[ae].primalOffset,this.lineColor[ae],this.lineWidth[ae]*this.pixelRatio),this.lineMirror[ae]&&this._lines.drawAxisLine(ae,this.bounds,pe[ae].mirrorOffset,this.lineColor[ae],this.lineWidth[ae]*this.pixelRatio);for(var ht=y(F,pe[ae].primalMinor),it=y(E,pe[ae].mirrorMinor),Oe=this.lineTickLength,be=0;be<3;++be){var ze=ne/O[5*be];ht[be]*=Oe[be]*ze,it[be]*=Oe[be]*ze}this.lineTickEnable[ae]&&this._lines.drawAxisTicks(ae,pe[ae].primalOffset,ht,this.lineTickColor[ae],this.lineTickWidth[ae]*this.pixelRatio),this.lineTickMirror[ae]&&this._lines.drawAxisTicks(ae,pe[ae].mirrorOffset,it,this.lineTickColor[ae],this.lineTickWidth[ae]*this.pixelRatio)}this._lines.unbind(),this._text.bind(O,V,j,this.pixelRatio);var ct,et=.5,qe,we;function Le(tt){we=[0,0,0],we[tt]=1}function Ke(tt,nt,We){var mt=(tt+1)%3,bt=(tt+2)%3,Yt=nt[mt],jt=nt[bt],mr=We[mt],or=We[bt];if(Yt>0&&or>0){Le(mt);return}else if(Yt>0&&or<0){Le(mt);return}else if(Yt<0&&or>0){Le(mt);return}else if(Yt<0&&or<0){Le(mt);return}else if(jt>0&&mr>0){Le(bt);return}else if(jt>0&&mr<0){Le(bt);return}else if(jt<0&&mr>0){Le(bt);return}else if(jt<0&&mr<0){Le(bt);return}}for(var ae=0;ae<3;++ae){for(var Te=pe[ae].primalMinor,Ve=pe[ae].mirrorMinor,$e=y(I,pe[ae].primalOffset),be=0;be<3;++be)this.lineTickEnable[ae]&&($e[be]+=ne*Te[be]*Math.max(this.lineTickLength[be],0)/O[5*be]);var ot=[0,0,0];if(ot[ae]=1,this.tickEnable[ae]){this.tickAngle[ae]===-3600?(this.tickAngle[ae]=0,this.tickAlign[ae]="auto"):this.tickAlign[ae]=-1,qe=1,ct=[this.tickAlign[ae],et,qe],ct[0]==="auto"?ct[0]=m:ct[0]=parseInt(""+ct[0]),we=[0,0,0],Ke(ae,Te,Ve);for(var be=0;be<3;++be)$e[be]+=ne*Te[be]*this.tickPad[be]/O[5*be];this._text.drawTicks(ae,this.tickSize[ae],this.tickAngle[ae],$e,this.tickColor[ae],ot,we,ct)}if(this.labelEnable[ae]){qe=0,we=[0,0,0],this.labels[ae].length>4&&(Le(ae),qe=1),ct=[this.labelAlign[ae],et,qe],ct[0]==="auto"?ct[0]=m:ct[0]=parseInt(""+ct[0]);for(var be=0;be<3;++be)$e[be]+=ne*Te[be]*this.labelPad[be]/O[5*be];$e[ae]+=.5*(q[0][ae]+q[1][ae]),this._text.drawLabel(ae,this.labelSize[ae],this.labelAngle[ae],$e,this.labelColor[ae],[0,0,0],we,ct)}}this._text.unbind()},k.dispose=function(){this._text.dispose(),this._lines.dispose(),this._background.dispose(),this._lines=null,this._text=null,this._background=null,this.gl=null};function R(B,O){var V=new C(B);return V.update(O),V}}),5304:(function(a,i,o){"use strict";a.exports=v;var s=o(2762),l=o(8116),u=o(1879).bg;function c(g,p,x,_){this.gl=g,this.buffer=p,this.vao=x,this.shader=_}var f=c.prototype;f.draw=function(g,p,x,_,y,C){for(var k=!1,S=0;S<3;++S)k=k||y[S];if(k){var L=this.gl;L.enable(L.POLYGON_OFFSET_FILL),L.polygonOffset(1,2),this.shader.bind(),this.shader.uniforms={model:g,view:p,projection:x,bounds:_,enable:y,colors:C},this.vao.bind(),this.vao.draw(this.gl.TRIANGLES,36),this.vao.unbind(),L.disable(L.POLYGON_OFFSET_FILL)}},f.dispose=function(){this.vao.dispose(),this.buffer.dispose(),this.shader.dispose()};function v(g){for(var p=[],x=[],_=0,y=0;y<3;++y)for(var C=(y+1)%3,k=(y+2)%3,S=[0,0,0],L=[0,0,0],w=-1;w<=1;w+=2){x.push(_,_+2,_+1,_+1,_+2,_+3),S[y]=w,L[y]=w;for(var A=-1;A<=1;A+=2){S[C]=A;for(var T=-1;T<=1;T+=2)S[k]=T,p.push(S[0],S[1],S[2],L[0],L[1],L[2]),_+=1}var m=C;C=k,k=m}var F=s(g,new Float32Array(p)),E=s(g,new Uint16Array(x),g.ELEMENT_ARRAY_BUFFER),I=l(g,[{buffer:F,type:g.FLOAT,size:3,offset:0,stride:24},{buffer:F,type:g.FLOAT,size:3,offset:12,stride:24}],E),R=u(g);return R.attributes.position.location=0,R.attributes.normal.location=1,new c(g,F,I,R)}}),6429:(function(a,i,o){"use strict";a.exports=w;var s=o(8828),l=o(6760),u=o(5202),c=o(3250),f=new Array(16),v=new Array(8),g=new Array(8),p=new Array(3),x=[0,0,0];(function(){for(var A=0;A<8;++A)v[A]=[1,1,1,1],g[A]=[1,1,1]})();function _(A,T,m){for(var F=0;F<4;++F){A[F]=m[12+F];for(var E=0;E<3;++E)A[F]+=T[E]*m[4*E+F]}}var y=[[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 C(A){for(var T=0;Tce&&(V|=1<ce){V|=1<g[R][1])&&(pe=R);for(var ie=-1,R=0;R<3;++R){var le=pe^1<g[me][0]&&(me=le)}}var be=k;be[0]=be[1]=be[2]=0,be[s.log2(ie^pe)]=pe&ie,be[s.log2(pe^me)]=pe&me;var De=me^7;De===V||De===ae?(De=ie^7,be[s.log2(me^De)]=De&me):be[s.log2(ie^De)]=De&ie;for(var Ge=S,ht=V,U=0;U<3;++U)ht&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); } `]),v=s([`precision highp float; #define GLSLIFY 1 uniform vec4 color; void main() { gl_FragColor = color; }`]);i.Q=function(x){return l(x,f,v,null,[{name:"position",type:"vec3"}])};var g=s([`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); } `]),p=s([`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]; }`]);i.bg=function(x){return l(x,g,p,null,[{name:"position",type:"vec3"},{name:"normal",type:"vec3"}])}}),4935:(function(a,i,o){"use strict";a.exports=C;var s=o(2762),l=o(8116),u=o(4359),c=o(1879).Q,f=window||process.global||{},v=f.__TEXT_CACHE||{};f.__TEXT_CACHE={};var g=3;function p(k,S,L,w){this.gl=k,this.shader=S,this.buffer=L,this.vao=w,this.tickOffset=this.tickCount=this.labelOffset=this.labelCount=null}var x=p.prototype,_=[0,0];x.bind=function(k,S,L,w){this.vao.bind(),this.shader.bind();var A=this.shader.uniforms;A.model=k,A.view=S,A.projection=L,A.pixelScale=w,_[0]=this.gl.drawingBufferWidth,_[1]=this.gl.drawingBufferHeight,this.shader.uniforms.resolution=_},x.unbind=function(){this.vao.unbind()},x.update=function(k,S,L,w,A){var T=[];function m(U,J,ee,ce,ye,xe){var ue=[ee.style,ee.weight,ee.variant,ee.family].join("_"),K=v[ue];K||(K=v[ue]={});var _e=K[J];_e||(_e=K[J]=y(J,{triangles:!0,font:ee.family,fontStyle:ee.style,fontWeight:ee.weight,fontVariant:ee.variant,textAlign:"center",textBaseline:"middle",lineSpacing:ye,styletags:xe}));for(var ne=(ce||12)/12,ae=_e.positions,pe=_e.cells,ie=0,le=pe.length;ie=0;--be){var De=ae[me[be]];T.push(ne*De[0],-ne*De[1],U)}}for(var F=[0,0,0],E=[0,0,0],I=[0,0,0],R=[0,0,0],B=1.25,O={breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0},V=0;V<3;++V){I[V]=T.length/g|0,m(.5*(k[0][V]+k[1][V]),S[V],L[V],12,B,O),R[V]=(T.length/g|0)-I[V],F[V]=T.length/g|0;for(var j=0;j=0&&(g=f.length-v-1);var p=Math.pow(10,g),x=Math.round(u*c*p),_=x+"";if(_.indexOf("e")>=0)return _;var y=x/p,C=x%p;x<0?(y=-Math.ceil(y)|0,C=-C|0):(y=Math.floor(y)|0,C=C|0);var k=""+y;if(x<0&&(k="-"+k),g){for(var S=""+C;S.length=u[0][v];--x)g.push({x:x*c[v],text:o(c[v],x)});f.push(g)}return f}function l(u,c){for(var f=0;f<3;++f){if(u[f].length!==c[f].length)return!1;for(var v=0;vk)throw new Error("gl-buffer: If resizing buffer, must not specify offset");return y.bufferSubData(C,w,L),k}function p(y,C){for(var k=s.malloc(y.length,C),S=y.length,L=0;L=0;--S){if(C[S]!==k)return!1;k*=y[S]}return!0}v.update=function(y,C){if(typeof C!="number"&&(C=-1),this.bind(),typeof y=="object"&&typeof y.shape!="undefined"){var k=y.dtype;if(c.indexOf(k)<0&&(k="float32"),this.type===this.gl.ELEMENT_ARRAY_BUFFER){var S=gl.getExtension("OES_element_index_uint");S&&k!=="uint16"?k="uint32":k="uint16"}if(k===y.dtype&&x(y.shape,y.stride))y.offset===0&&y.data.length===y.shape[0]?this.length=g(this.gl,this.type,this.length,this.usage,y.data,C):this.length=g(this.gl,this.type,this.length,this.usage,y.data.subarray(y.offset,y.shape[0]),C);else{var L=s.malloc(y.size,k),w=u(L,y.shape);l.assign(w,y),C<0?this.length=g(this.gl,this.type,this.length,this.usage,L,C):this.length=g(this.gl,this.type,this.length,this.usage,L.subarray(0,y.size),C),s.free(L)}}else if(Array.isArray(y)){var A;this.type===this.gl.ELEMENT_ARRAY_BUFFER?A=p(y,"uint16"):A=p(y,"float32"),C<0?this.length=g(this.gl,this.type,this.length,this.usage,A,C):this.length=g(this.gl,this.type,this.length,this.usage,A.subarray(0,y.length),C),s.free(A)}else if(typeof y=="object"&&typeof y.length=="number")this.length=g(this.gl,this.type,this.length,this.usage,y,C);else if(typeof y=="number"||y===void 0){if(C>=0)throw new Error("gl-buffer: Cannot specify offset when resizing buffer");y=y|0,y<=0&&(y=1),this.gl.bufferData(this.type,y|0,this.usage),this.length=y}else throw new Error("gl-buffer: Invalid data type")};function _(y,C,k,S){if(k=k||y.ARRAY_BUFFER,S=S||y.DYNAMIC_DRAW,k!==y.ARRAY_BUFFER&&k!==y.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(S!==y.DYNAMIC_DRAW&&S!==y.STATIC_DRAW&&S!==y.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 L=y.createBuffer(),w=new f(y,k,L,0,S);return w.update(C),w}a.exports=_}),6405:(function(a,i,o){"use strict";var s=o(2931);a.exports=function(u,c){var f=u.positions,v=u.vectors,g={positions:[],vertexIntensity:[],vertexIntensityBounds:u.vertexIntensityBounds,vectors:[],cells:[],coneOffset:u.coneOffset,colormap:u.colormap};if(u.positions.length===0)return c&&(c[0]=[0,0,0],c[1]=[0,0,0]),g;for(var p=0,x=1/0,_=-1/0,y=1/0,C=-1/0,k=1/0,S=-1/0,L=null,w=null,A=[],T=1/0,m=!1,F=u.coneSizemode==="raw",E=0;Ep&&(p=s.length(R)),E&&!F){var B=2*s.distance(L,I)/(s.length(w)+s.length(R));B?(T=Math.min(T,B),m=!1):m=!0}m||(L=I,w=R),A.push(R)}var O=[x,y,k],V=[_,C,S];c&&(c[0]=O,c[1]=V),p===0&&(p=1);var j=1/p;isFinite(T)||(T=1),g.vectorScale=T;var q=u.coneSize||(F?1:.5);u.absoluteConeSize&&(q=u.absoluteConeSize*j),g.coneScale=q;for(var E=0,U=0;E=1},y.isTransparent=function(){return this.opacity<1},y.pickSlots=1,y.setPickBase=function(A){this.pickId=A};function C(A){for(var T=p({colormap:A,nshades:256,format:"rgba"}),m=new Uint8Array(256*4),F=0;F<256;++F){for(var E=T[F],I=0;I<3;++I)m[4*F+I]=E[I];m[4*F+3]=E[3]*255}return g(m,[256,256,4],[4,0,1])}function k(A){for(var T=A.length,m=new Array(T),F=0;F0){var U=this.triShader;U.bind(),U.uniforms=B,this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}},y.drawPick=function(A){A=A||{};for(var T=this.gl,m=A.model||x,F=A.view||x,E=A.projection||x,I=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],R=0;R<3;++R)I[0][R]=Math.max(I[0][R],this.clipBounds[0][R]),I[1][R]=Math.min(I[1][R],this.clipBounds[1][R]);this._model=[].slice.call(m),this._view=[].slice.call(F),this._projection=[].slice.call(E),this._resolution=[T.drawingBufferWidth,T.drawingBufferHeight];var B={model:m,view:F,projection:E,clipBounds:I,tubeScale:this.tubeScale,vectorScale:this.vectorScale,coneScale:this.coneScale,coneOffset:this.coneOffset,pickId:this.pickId/255},O=this.pickShader;O.bind(),O.uniforms=B,this.triangleCount>0&&(this.triangleVAO.bind(),T.drawArrays(T.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind())},y.pick=function(A){if(!A||A.id!==this.pickId)return null;var T=A.value[0]+256*A.value[1]+65536*A.value[2],m=this.cells[T],F=this.positions[m[1]].slice(0,3),E={position:F,dataCoordinate:F,index:Math.floor(m[1]/48)};return this.traceType==="cone"?E.index=Math.floor(m[1]/48):this.traceType==="streamtube"&&(E.intensity=this.intensity[m[1]],E.velocity=this.vectors[m[1]].slice(0,3),E.divergence=this.vectors[m[1]][3],E.index=T),E},y.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 S(A,T){var m=s(A,T.meshShader.vertex,T.meshShader.fragment,null,T.meshShader.attributes);return m.attributes.position.location=0,m.attributes.color.location=2,m.attributes.uv.location=3,m.attributes.vector.location=4,m}function L(A,T){var m=s(A,T.pickShader.vertex,T.pickShader.fragment,null,T.pickShader.attributes);return m.attributes.position.location=0,m.attributes.id.location=1,m.attributes.vector.location=4,m}function w(A,T,m){var F=m.shaders;arguments.length===1&&(T=A,A=T.gl);var E=S(A,F),I=L(A,F),R=c(A,g(new Uint8Array([255,255,255,255]),[1,1,4]));R.generateMipmap(),R.minFilter=A.LINEAR_MIPMAP_LINEAR,R.magFilter=A.LINEAR;var B=l(A),O=l(A),V=l(A),j=l(A),q=l(A),U=u(A,[{buffer:B,type:A.FLOAT,size:4},{buffer:q,type:A.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:V,type:A.FLOAT,size:4},{buffer:j,type:A.FLOAT,size:2},{buffer:O,type:A.FLOAT,size:4}]),J=new _(A,R,E,I,B,O,q,V,j,U,m.traceType||"cone");return J.update(T),J}a.exports=w}),614:(function(a,i,o){var s=o(3236),l=s([`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; } `]),u=s([`#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=s([`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; } `]),f=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 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); }`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec3"}]},i.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec3"}]}}),737:(function(a){a.exports={0:"NONE",1:"ONE",2:"LINE_LOOP",3:"LINE_STRIP",4:"TRIANGLES",5:"TRIANGLE_STRIP",6:"TRIANGLE_FAN",256:"DEPTH_BUFFER_BIT",512:"NEVER",513:"LESS",514:"EQUAL",515:"LEQUAL",516:"GREATER",517:"NOTEQUAL",518:"GEQUAL",519:"ALWAYS",768:"SRC_COLOR",769:"ONE_MINUS_SRC_COLOR",770:"SRC_ALPHA",771:"ONE_MINUS_SRC_ALPHA",772:"DST_ALPHA",773:"ONE_MINUS_DST_ALPHA",774:"DST_COLOR",775:"ONE_MINUS_DST_COLOR",776:"SRC_ALPHA_SATURATE",1024:"STENCIL_BUFFER_BIT",1028:"FRONT",1029:"BACK",1032:"FRONT_AND_BACK",1280:"INVALID_ENUM",1281:"INVALID_VALUE",1282:"INVALID_OPERATION",1285:"OUT_OF_MEMORY",1286:"INVALID_FRAMEBUFFER_OPERATION",2304:"CW",2305:"CCW",2849:"LINE_WIDTH",2884:"CULL_FACE",2885:"CULL_FACE_MODE",2886:"FRONT_FACE",2928:"DEPTH_RANGE",2929:"DEPTH_TEST",2930:"DEPTH_WRITEMASK",2931:"DEPTH_CLEAR_VALUE",2932:"DEPTH_FUNC",2960:"STENCIL_TEST",2961:"STENCIL_CLEAR_VALUE",2962:"STENCIL_FUNC",2963:"STENCIL_VALUE_MASK",2964:"STENCIL_FAIL",2965:"STENCIL_PASS_DEPTH_FAIL",2966:"STENCIL_PASS_DEPTH_PASS",2967:"STENCIL_REF",2968:"STENCIL_WRITEMASK",2978:"VIEWPORT",3024:"DITHER",3042:"BLEND",3088:"SCISSOR_BOX",3089:"SCISSOR_TEST",3106:"COLOR_CLEAR_VALUE",3107:"COLOR_WRITEMASK",3317:"UNPACK_ALIGNMENT",3333:"PACK_ALIGNMENT",3379:"MAX_TEXTURE_SIZE",3386:"MAX_VIEWPORT_DIMS",3408:"SUBPIXEL_BITS",3410:"RED_BITS",3411:"GREEN_BITS",3412:"BLUE_BITS",3413:"ALPHA_BITS",3414:"DEPTH_BITS",3415:"STENCIL_BITS",3553:"TEXTURE_2D",4352:"DONT_CARE",4353:"FASTEST",4354:"NICEST",5120:"BYTE",5121:"UNSIGNED_BYTE",5122:"SHORT",5123:"UNSIGNED_SHORT",5124:"INT",5125:"UNSIGNED_INT",5126:"FLOAT",5386:"INVERT",5890:"TEXTURE",6401:"STENCIL_INDEX",6402:"DEPTH_COMPONENT",6406:"ALPHA",6407:"RGB",6408:"RGBA",6409:"LUMINANCE",6410:"LUMINANCE_ALPHA",7680:"KEEP",7681:"REPLACE",7682:"INCR",7683:"DECR",7936:"VENDOR",7937:"RENDERER",7938:"VERSION",9728:"NEAREST",9729:"LINEAR",9984:"NEAREST_MIPMAP_NEAREST",9985:"LINEAR_MIPMAP_NEAREST",9986:"NEAREST_MIPMAP_LINEAR",9987:"LINEAR_MIPMAP_LINEAR",10240:"TEXTURE_MAG_FILTER",10241:"TEXTURE_MIN_FILTER",10242:"TEXTURE_WRAP_S",10243:"TEXTURE_WRAP_T",10497:"REPEAT",10752:"POLYGON_OFFSET_UNITS",16384:"COLOR_BUFFER_BIT",32769:"CONSTANT_COLOR",32770:"ONE_MINUS_CONSTANT_COLOR",32771:"CONSTANT_ALPHA",32772:"ONE_MINUS_CONSTANT_ALPHA",32773:"BLEND_COLOR",32774:"FUNC_ADD",32777:"BLEND_EQUATION_RGB",32778:"FUNC_SUBTRACT",32779:"FUNC_REVERSE_SUBTRACT",32819:"UNSIGNED_SHORT_4_4_4_4",32820:"UNSIGNED_SHORT_5_5_5_1",32823:"POLYGON_OFFSET_FILL",32824:"POLYGON_OFFSET_FACTOR",32854:"RGBA4",32855:"RGB5_A1",32873:"TEXTURE_BINDING_2D",32926:"SAMPLE_ALPHA_TO_COVERAGE",32928:"SAMPLE_COVERAGE",32936:"SAMPLE_BUFFERS",32937:"SAMPLES",32938:"SAMPLE_COVERAGE_VALUE",32939:"SAMPLE_COVERAGE_INVERT",32968:"BLEND_DST_RGB",32969:"BLEND_SRC_RGB",32970:"BLEND_DST_ALPHA",32971:"BLEND_SRC_ALPHA",33071:"CLAMP_TO_EDGE",33170:"GENERATE_MIPMAP_HINT",33189:"DEPTH_COMPONENT16",33306:"DEPTH_STENCIL_ATTACHMENT",33635:"UNSIGNED_SHORT_5_6_5",33648:"MIRRORED_REPEAT",33901:"ALIASED_POINT_SIZE_RANGE",33902:"ALIASED_LINE_WIDTH_RANGE",33984:"TEXTURE0",33985:"TEXTURE1",33986:"TEXTURE2",33987:"TEXTURE3",33988:"TEXTURE4",33989:"TEXTURE5",33990:"TEXTURE6",33991:"TEXTURE7",33992:"TEXTURE8",33993:"TEXTURE9",33994:"TEXTURE10",33995:"TEXTURE11",33996:"TEXTURE12",33997:"TEXTURE13",33998:"TEXTURE14",33999:"TEXTURE15",34e3:"TEXTURE16",34001:"TEXTURE17",34002:"TEXTURE18",34003:"TEXTURE19",34004:"TEXTURE20",34005:"TEXTURE21",34006:"TEXTURE22",34007:"TEXTURE23",34008:"TEXTURE24",34009:"TEXTURE25",34010:"TEXTURE26",34011:"TEXTURE27",34012:"TEXTURE28",34013:"TEXTURE29",34014:"TEXTURE30",34015:"TEXTURE31",34016:"ACTIVE_TEXTURE",34024:"MAX_RENDERBUFFER_SIZE",34041:"DEPTH_STENCIL",34055:"INCR_WRAP",34056:"DECR_WRAP",34067:"TEXTURE_CUBE_MAP",34068:"TEXTURE_BINDING_CUBE_MAP",34069:"TEXTURE_CUBE_MAP_POSITIVE_X",34070:"TEXTURE_CUBE_MAP_NEGATIVE_X",34071:"TEXTURE_CUBE_MAP_POSITIVE_Y",34072:"TEXTURE_CUBE_MAP_NEGATIVE_Y",34073:"TEXTURE_CUBE_MAP_POSITIVE_Z",34074:"TEXTURE_CUBE_MAP_NEGATIVE_Z",34076:"MAX_CUBE_MAP_TEXTURE_SIZE",34338:"VERTEX_ATTRIB_ARRAY_ENABLED",34339:"VERTEX_ATTRIB_ARRAY_SIZE",34340:"VERTEX_ATTRIB_ARRAY_STRIDE",34341:"VERTEX_ATTRIB_ARRAY_TYPE",34342:"CURRENT_VERTEX_ATTRIB",34373:"VERTEX_ATTRIB_ARRAY_POINTER",34466:"NUM_COMPRESSED_TEXTURE_FORMATS",34467:"COMPRESSED_TEXTURE_FORMATS",34660:"BUFFER_SIZE",34661:"BUFFER_USAGE",34816:"STENCIL_BACK_FUNC",34817:"STENCIL_BACK_FAIL",34818:"STENCIL_BACK_PASS_DEPTH_FAIL",34819:"STENCIL_BACK_PASS_DEPTH_PASS",34877:"BLEND_EQUATION_ALPHA",34921:"MAX_VERTEX_ATTRIBS",34922:"VERTEX_ATTRIB_ARRAY_NORMALIZED",34930:"MAX_TEXTURE_IMAGE_UNITS",34962:"ARRAY_BUFFER",34963:"ELEMENT_ARRAY_BUFFER",34964:"ARRAY_BUFFER_BINDING",34965:"ELEMENT_ARRAY_BUFFER_BINDING",34975:"VERTEX_ATTRIB_ARRAY_BUFFER_BINDING",35040:"STREAM_DRAW",35044:"STATIC_DRAW",35048:"DYNAMIC_DRAW",35632:"FRAGMENT_SHADER",35633:"VERTEX_SHADER",35660:"MAX_VERTEX_TEXTURE_IMAGE_UNITS",35661:"MAX_COMBINED_TEXTURE_IMAGE_UNITS",35663:"SHADER_TYPE",35664:"FLOAT_VEC2",35665:"FLOAT_VEC3",35666:"FLOAT_VEC4",35667:"INT_VEC2",35668:"INT_VEC3",35669:"INT_VEC4",35670:"BOOL",35671:"BOOL_VEC2",35672:"BOOL_VEC3",35673:"BOOL_VEC4",35674:"FLOAT_MAT2",35675:"FLOAT_MAT3",35676:"FLOAT_MAT4",35678:"SAMPLER_2D",35680:"SAMPLER_CUBE",35712:"DELETE_STATUS",35713:"COMPILE_STATUS",35714:"LINK_STATUS",35715:"VALIDATE_STATUS",35716:"INFO_LOG_LENGTH",35717:"ATTACHED_SHADERS",35718:"ACTIVE_UNIFORMS",35719:"ACTIVE_UNIFORM_MAX_LENGTH",35720:"SHADER_SOURCE_LENGTH",35721:"ACTIVE_ATTRIBUTES",35722:"ACTIVE_ATTRIBUTE_MAX_LENGTH",35724:"SHADING_LANGUAGE_VERSION",35725:"CURRENT_PROGRAM",36003:"STENCIL_BACK_REF",36004:"STENCIL_BACK_VALUE_MASK",36005:"STENCIL_BACK_WRITEMASK",36006:"FRAMEBUFFER_BINDING",36007:"RENDERBUFFER_BINDING",36048:"FRAMEBUFFER_ATTACHMENT_OBJECT_TYPE",36049:"FRAMEBUFFER_ATTACHMENT_OBJECT_NAME",36050:"FRAMEBUFFER_ATTACHMENT_TEXTURE_LEVEL",36051:"FRAMEBUFFER_ATTACHMENT_TEXTURE_CUBE_MAP_FACE",36053:"FRAMEBUFFER_COMPLETE",36054:"FRAMEBUFFER_INCOMPLETE_ATTACHMENT",36055:"FRAMEBUFFER_INCOMPLETE_MISSING_ATTACHMENT",36057:"FRAMEBUFFER_INCOMPLETE_DIMENSIONS",36061:"FRAMEBUFFER_UNSUPPORTED",36064:"COLOR_ATTACHMENT0",36096:"DEPTH_ATTACHMENT",36128:"STENCIL_ATTACHMENT",36160:"FRAMEBUFFER",36161:"RENDERBUFFER",36162:"RENDERBUFFER_WIDTH",36163:"RENDERBUFFER_HEIGHT",36164:"RENDERBUFFER_INTERNAL_FORMAT",36168:"STENCIL_INDEX8",36176:"RENDERBUFFER_RED_SIZE",36177:"RENDERBUFFER_GREEN_SIZE",36178:"RENDERBUFFER_BLUE_SIZE",36179:"RENDERBUFFER_ALPHA_SIZE",36180:"RENDERBUFFER_DEPTH_SIZE",36181:"RENDERBUFFER_STENCIL_SIZE",36194:"RGB565",36336:"LOW_FLOAT",36337:"MEDIUM_FLOAT",36338:"HIGH_FLOAT",36339:"LOW_INT",36340:"MEDIUM_INT",36341:"HIGH_INT",36346:"SHADER_COMPILER",36347:"MAX_VERTEX_UNIFORM_VECTORS",36348:"MAX_VARYING_VECTORS",36349:"MAX_FRAGMENT_UNIFORM_VECTORS",37440:"UNPACK_FLIP_Y_WEBGL",37441:"UNPACK_PREMULTIPLY_ALPHA_WEBGL",37442:"CONTEXT_LOST_WEBGL",37443:"UNPACK_COLORSPACE_CONVERSION_WEBGL",37444:"BROWSER_DEFAULT_WEBGL"}}),5171:(function(a,i,o){var s=o(737);a.exports=function(u){return s[u]}}),9165:(function(a,i,o){"use strict";a.exports=_;var s=o(2762),l=o(8116),u=o(3436),c=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function f(y,C,k,S){this.gl=y,this.shader=S,this.buffer=C,this.vao=k,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 v=f.prototype;v.isOpaque=function(){return!this.hasAlpha},v.isTransparent=function(){return this.hasAlpha},v.drawTransparent=v.draw=function(y){var C=this.gl,k=this.shader.uniforms;this.shader.bind();var S=k.view=y.view||c,L=k.projection=y.projection||c;k.model=y.model||c,k.clipBounds=this.clipBounds,k.opacity=this.opacity;var w=S[12],A=S[13],T=S[14],m=S[15],F=y._ortho||!1,E=F?2:1,I=E*this.pixelRatio*(L[3]*w+L[7]*A+L[11]*T+L[15]*m)/C.drawingBufferHeight;this.vao.bind();for(var R=0;R<3;++R)C.lineWidth(this.lineWidth[R]*this.pixelRatio),k.capSize=this.capSize[R]*I,this.lineCount[R]&&C.drawArrays(C.LINES,this.lineOffset[R],this.lineCount[R]);this.vao.unbind()};function g(y,C){for(var k=0;k<3;++k)y[0][k]=Math.min(y[0][k],C[k]),y[1][k]=Math.max(y[1][k],C[k])}var p=(function(){for(var y=new Array(3),C=0;C<3;++C){for(var k=[],S=1;S<=2;++S)for(var L=-1;L<=1;L+=2){var w=(S+C)%3,A=[0,0,0];A[w]=L,k.push(A)}y[C]=k}return y})();function x(y,C,k,S){for(var L=p[S],w=0;w0){var B=F.slice();B[T]+=I[1][T],L.push(F[0],F[1],F[2],R[0],R[1],R[2],R[3],0,0,0,B[0],B[1],B[2],R[0],R[1],R[2],R[3],0,0,0),g(this.bounds,B),A+=2+x(L,B,R,T)}}}this.lineCount[T]=A-this.lineOffset[T]}this.buffer.update(L)}},v.dispose=function(){this.shader.dispose(),this.buffer.dispose(),this.vao.dispose()};function _(y){var C=y.gl,k=s(C),S=l(C,[{buffer:k,type:C.FLOAT,size:3,offset:0,stride:40},{buffer:k,type:C.FLOAT,size:4,offset:12,stride:40},{buffer:k,type:C.FLOAT,size:3,offset:28,stride:40}]),L=u(C);L.attributes.position.location=0,L.attributes.color.location=1,L.attributes.offset.location=2;var w=new f(C,k,S,L);return w.update(y),w}}),3436:(function(a,i,o){"use strict";var s=o(3236),l=o(9405),u=s([`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=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 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; }`]);a.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"offset",type:"vec3"}])}}),2260:(function(a,i,o){"use strict";var s=o(7766);a.exports=A;var l=null,u,c,f,v;function g(T){var m=T.getParameter(T.FRAMEBUFFER_BINDING),F=T.getParameter(T.RENDERBUFFER_BINDING),E=T.getParameter(T.TEXTURE_BINDING_2D);return[m,F,E]}function p(T,m){T.bindFramebuffer(T.FRAMEBUFFER,m[0]),T.bindRenderbuffer(T.RENDERBUFFER,m[1]),T.bindTexture(T.TEXTURE_2D,m[2])}function x(T,m){var F=T.getParameter(m.MAX_COLOR_ATTACHMENTS_WEBGL);l=new Array(F+1);for(var E=0;E<=F;++E){for(var I=new Array(F),R=0;R1&&O.drawBuffersWEBGL(l[B]);var J=F.getExtension("WEBGL_depth_texture");J?V?T.depth=y(F,I,R,J.UNSIGNED_INT_24_8_WEBGL,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):j&&(T.depth=y(F,I,R,F.UNSIGNED_SHORT,F.DEPTH_COMPONENT,F.DEPTH_ATTACHMENT)):j&&V?T._depth_rb=C(F,I,R,F.DEPTH_STENCIL,F.DEPTH_STENCIL_ATTACHMENT):j?T._depth_rb=C(F,I,R,F.DEPTH_COMPONENT16,F.DEPTH_ATTACHMENT):V&&(T._depth_rb=C(F,I,R,F.STENCIL_INDEX,F.STENCIL_ATTACHMENT));var ee=F.checkFramebufferStatus(F.FRAMEBUFFER);if(ee!==F.FRAMEBUFFER_COMPLETE){T._destroyed=!0,F.bindFramebuffer(F.FRAMEBUFFER,null),F.deleteFramebuffer(T.handle),T.handle=null,T.depth&&(T.depth.dispose(),T.depth=null),T._depth_rb&&(F.deleteRenderbuffer(T._depth_rb),T._depth_rb=null);for(var U=0;UI||F<0||F>I)throw new Error("gl-fbo: Can't resize FBO, invalid dimensions");T._shape[0]=m,T._shape[1]=F;for(var R=g(E),B=0;BR||F<0||F>R)throw new Error("gl-fbo: Parameters are too large for FBO");E=E||{};var B=1;if("color"in E){if(B=Math.max(E.color|0,0),B<0)throw new Error("gl-fbo: Must specify a nonnegative number of colors");if(B>1)if(I){if(B>T.getParameter(I.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 O=T.UNSIGNED_BYTE,V=T.getExtension("OES_texture_float");if(E.float&&B>0){if(!V)throw new Error("gl-fbo: Context does not support floating point textures");O=T.FLOAT}else E.preferFloat&&B>0&&V&&(O=T.FLOAT);var j=!0;"depth"in E&&(j=!!E.depth);var q=!1;return"stencil"in E&&(q=!!E.stencil),new S(T,m,F,O,B,j,q,I)}}),2992:(function(a,i,o){var s=o(3387).sprintf,l=o(5171),u=o(1848),c=o(1085);a.exports=f;function f(v,g,p){"use strict";var x=u(g)||"of unknown name (see npm glsl-shader-name)",_="unknown type";p!==void 0&&(_=p===l.FRAGMENT_SHADER?"fragment":"vertex");for(var y=s(`Error compiling %s shader %s: `,_,x),C=s("%s%s",y,v),k=v.split(` `),S={},L=0;L 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; } `]),f=s([`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); }`]),v=[{name:"position",type:"vec3"},{name:"nextPosition",type:"vec3"},{name:"arcLength",type:"float"},{name:"lineWidth",type:"float"},{name:"color",type:"vec4"}];i.createShader=function(g){return l(g,u,c,null,v)},i.createPickShader=function(g){return l(g,u,f,null,v)}}),5714:(function(a,i,o){"use strict";a.exports=T;var s=o(2762),l=o(8116),u=o(7766),c=new Uint8Array(4),f=new Float32Array(c.buffer);function v(m,F,E,I){return c[0]=I,c[1]=E,c[2]=F,c[3]=m,f[0]}var g=o(2478),p=o(9618),x=o(7319),_=x.createShader,y=x.createPickShader,C=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function k(m,F){for(var E=0,I=0;I<3;++I){var R=m[I]-F[I];E+=R*R}return Math.sqrt(E)}function S(m){for(var F=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],E=0;E<3;++E)F[0][E]=Math.max(m[0][E],F[0][E]),F[1][E]=Math.min(m[1][E],F[1][E]);return F}function L(m,F,E,I){this.arcLength=m,this.position=F,this.index=E,this.dataCoordinate=I}function w(m,F,E,I,R,B){this.gl=m,this.shader=F,this.pickShader=E,this.buffer=I,this.vao=R,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 A=w.prototype;A.isTransparent=function(){return this.hasAlpha},A.isOpaque=function(){return!this.hasAlpha},A.pickSlots=1,A.setPickBase=function(m){this.pickId=m},A.drawTransparent=A.draw=function(m){if(this.vertexCount){var F=this.gl,E=this.shader,I=this.vao;E.bind(),E.uniforms={model:m.model||C,view:m.view||C,projection:m.projection||C,clipBounds:S(this.clipBounds),dashTexture:this.texture.bind(),dashScale:this.dashScale/this.arcLength[this.arcLength.length-1],opacity:this.opacity,screenShape:[F.drawingBufferWidth,F.drawingBufferHeight],pixelRatio:this.pixelRatio},I.bind(),I.draw(F.TRIANGLE_STRIP,this.vertexCount),I.unbind()}},A.drawPick=function(m){if(this.vertexCount){var F=this.gl,E=this.pickShader,I=this.vao;E.bind(),E.uniforms={model:m.model||C,view:m.view||C,projection:m.projection||C,pickId:this.pickId,clipBounds:S(this.clipBounds),screenShape:[F.drawingBufferWidth,F.drawingBufferHeight],pixelRatio:this.pixelRatio},I.bind(),I.draw(F.TRIANGLE_STRIP,this.vertexCount),I.unbind()}},A.update=function(m){var F,E;this.dirty=!0;var I=!!m.connectGaps;"dashScale"in m&&(this.dashScale=m.dashScale),this.hasAlpha=!1,"opacity"in m&&(this.opacity=+m.opacity,this.opacity<1&&(this.hasAlpha=!0));var R=[],B=[],O=[],V=0,j=0,q=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],U=m.position||m.positions;if(U){var J=m.color||m.colors||[0,0,0,1],ee=m.lineWidth||1,ce=!1;e:for(F=1;F0){for(var ue=0;ue<24;++ue)R.push(R[R.length-12]);j+=2,ce=!0}continue e}q[0][E]=Math.min(q[0][E],ye[E],xe[E]),q[1][E]=Math.max(q[1][E],ye[E],xe[E])}var K,_e;Array.isArray(J[0])?(K=J.length>F-1?J[F-1]:J.length>0?J[J.length-1]:[0,0,0,1],_e=J.length>F?J[F]:J.length>0?J[J.length-1]:[0,0,0,1]):K=_e=J,K.length===3&&(K=[K[0],K[1],K[2],1]),_e.length===3&&(_e=[_e[0],_e[1],_e[2],1]),!this.hasAlpha&&K[3]<1&&(this.hasAlpha=!0);var ne;Array.isArray(ee)?ne=ee.length>F-1?ee[F-1]:ee.length>0?ee[ee.length-1]:[0,0,0,1]:ne=ee;var ae=V;if(V+=k(ye,xe),ce){for(E=0;E<2;++E)R.push(ye[0],ye[1],ye[2],xe[0],xe[1],xe[2],ae,ne,K[0],K[1],K[2],K[3]);j+=2,ce=!1}R.push(ye[0],ye[1],ye[2],xe[0],xe[1],xe[2],ae,ne,K[0],K[1],K[2],K[3],ye[0],ye[1],ye[2],xe[0],xe[1],xe[2],ae,-ne,K[0],K[1],K[2],K[3],xe[0],xe[1],xe[2],ye[0],ye[1],ye[2],V,-ne,_e[0],_e[1],_e[2],_e[3],xe[0],xe[1],xe[2],ye[0],ye[1],ye[2],V,ne,_e[0],_e[1],_e[2],_e[3]),j+=4}}if(this.buffer.update(R),B.push(V),O.push(U[U.length-1].slice()),this.bounds=q,this.vertexCount=j,this.points=O,this.arcLength=B,"dashes"in m){var pe=m.dashes,ie=pe.slice();for(ie.unshift(0),F=1;F1.0001)return null;E+=F[L]}return Math.abs(E-1)>.001?null:[w,v(p,F),F]}}),840:(function(a,i,o){var s=o(3236),l=s([`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; } `]),u=s([`#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=s([`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; }`]),f=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 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; }`]),v=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 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; }`]),g=s([`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; }`]),p=s([`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; }`]),x=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 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); }`]),_=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 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; }`]),y=s([`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))); }`]),C=s([`precision highp float; #define GLSLIFY 1 uniform vec3 contourColor; void main() { gl_FragColor = vec4(contourColor, 1.0); } `]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec3"},{name:"normal",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},i.wireShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"}]},i.pointShader={vertex:v,fragment:g,attributes:[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"pointSize",type:"float"}]},i.pickShader={vertex:p,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"id",type:"vec4"}]},i.pointPickShader={vertex:_,fragment:x,attributes:[{name:"position",type:"vec3"},{name:"pointSize",type:"float"},{name:"id",type:"vec4"}]},i.contourShader={vertex:y,fragment:C,attributes:[{name:"position",type:"vec3"}]}}),7201:(function(a,i,o){"use strict";var s=1e-6,l=1e-6,u=o(9405),c=o(2762),f=o(8116),v=o(7766),g=o(8406),p=o(6760),x=o(7608),_=o(9618),y=o(6729),C=o(7765),k=o(1888),S=o(840),L=o(7626),w=S.meshShader,A=S.wireShader,T=S.pointShader,m=S.pickShader,F=S.pointPickShader,E=S.contourShader,I=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1];function R(ue,K,_e,ne,ae,pe,ie,le,me,be,De,Ge,ht,it,Oe,ze,ct,et,qe,we,Le,Ke,Te,Ve,$e,ot,tt){this.gl=ue,this.pixelRatio=1,this.cells=[],this.positions=[],this.intensity=[],this.texture=K,this.dirty=!0,this.triShader=_e,this.lineShader=ne,this.pointShader=ae,this.pickShader=pe,this.pointPickShader=ie,this.contourShader=le,this.trianglePositions=me,this.triangleColors=De,this.triangleNormals=ht,this.triangleUVs=Ge,this.triangleIds=be,this.triangleVAO=it,this.triangleCount=0,this.lineWidth=1,this.edgePositions=Oe,this.edgeColors=ct,this.edgeUVs=et,this.edgeIds=ze,this.edgeVAO=qe,this.edgeCount=0,this.pointPositions=we,this.pointColors=Ke,this.pointUVs=Te,this.pointSizes=Ve,this.pointIds=Le,this.pointVAO=$e,this.pointCount=0,this.contourLineWidth=1,this.contourPositions=ot,this.contourVAO=tt,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=I,this._view=I,this._projection=I,this._resolution=[1,1]}var B=R.prototype;B.isOpaque=function(){return!this.hasAlpha},B.isTransparent=function(){return this.hasAlpha},B.pickSlots=1,B.setPickBase=function(ue){this.pickId=ue};function O(ue,K){if(!K||!K.length)return 1;for(var _e=0;_eue&&_e>0){var ne=(K[_e][0]-ue)/(K[_e][0]-K[_e-1][0]);return K[_e][1]*(1-ne)+ne*K[_e-1][1]}}return 1}function V(ue,K){for(var _e=y({colormap:ue,nshades:256,format:"rgba"}),ne=new Uint8Array(256*4),ae=0;ae<256;++ae){for(var pe=_e[ae],ie=0;ie<3;++ie)ne[4*ae+ie]=pe[ie];K?ne[4*ae+3]=255*O(ae/255,K):ne[4*ae+3]=255*pe[3]}return _(ne,[256,256,4],[4,0,1])}function j(ue){for(var K=ue.length,_e=new Array(K),ne=0;ne0){var ht=this.triShader;ht.bind(),ht.uniforms=le,this.triangleVAO.bind(),K.drawArrays(K.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()}if(this.edgeCount>0&&this.lineWidth>0){var ht=this.lineShader;ht.bind(),ht.uniforms=le,this.edgeVAO.bind(),K.lineWidth(this.lineWidth*this.pixelRatio),K.drawArrays(K.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()}if(this.pointCount>0){var ht=this.pointShader;ht.bind(),ht.uniforms=le,this.pointVAO.bind(),K.drawArrays(K.POINTS,0,this.pointCount),this.pointVAO.unbind()}if(this.contourEnable&&this.contourCount>0&&this.contourLineWidth>0){var ht=this.contourShader;ht.bind(),ht.uniforms=le,this.contourVAO.bind(),K.drawArrays(K.LINES,0,this.contourCount),this.contourVAO.unbind()}},B.drawPick=function(ue){ue=ue||{};for(var K=this.gl,_e=ue.model||I,ne=ue.view||I,ae=ue.projection||I,pe=[[-1e6,-1e6,-1e6],[1e6,1e6,1e6]],ie=0;ie<3;++ie)pe[0][ie]=Math.max(pe[0][ie],this.clipBounds[0][ie]),pe[1][ie]=Math.min(pe[1][ie],this.clipBounds[1][ie]);this._model=[].slice.call(_e),this._view=[].slice.call(ne),this._projection=[].slice.call(ae),this._resolution=[K.drawingBufferWidth,K.drawingBufferHeight];var le={model:_e,view:ne,projection:ae,clipBounds:pe,pickId:this.pickId/255},me=this.pickShader;if(me.bind(),me.uniforms=le,this.triangleCount>0&&(this.triangleVAO.bind(),K.drawArrays(K.TRIANGLES,0,this.triangleCount*3),this.triangleVAO.unbind()),this.edgeCount>0&&(this.edgeVAO.bind(),K.lineWidth(this.lineWidth*this.pixelRatio),K.drawArrays(K.LINES,0,this.edgeCount*2),this.edgeVAO.unbind()),this.pointCount>0){var me=this.pointPickShader;me.bind(),me.uniforms=le,this.pointVAO.bind(),K.drawArrays(K.POINTS,0,this.pointCount),this.pointVAO.unbind()}},B.pick=function(ue){if(!ue||ue.id!==this.pickId)return null;for(var K=ue.value[0]+256*ue.value[1]+65536*ue.value[2],_e=this.cells[K],ne=this.positions,ae=new Array(_e.length),pe=0;pe<_e.length;++pe)ae[pe]=ne[_e[pe]];var ie=ue.coord[0],le=ue.coord[1];if(!this.pickVertex){var me=this.positions[_e[0]],be=this.positions[_e[1]],De=this.positions[_e[2]],Ge=[(me[0]+be[0]+De[0])/3,(me[1]+be[1]+De[1])/3,(me[2]+be[2]+De[2])/3];return{_cellCenter:!0,position:[ie,le],index:K,cell:_e,cellId:K,intensity:this.intensity[K],dataCoordinate:Ge}}var ht=L(ae,[ie*this.pixelRatio,this._resolution[1]-le*this.pixelRatio],this._model,this._view,this._projection,this._resolution);if(!ht)return null;for(var it=ht[2],Oe=0,pe=0;pe<_e.length;++pe)Oe+=it[pe]*this.intensity[_e[pe]];return{position:ht[1],index:_e[ht[0]],cell:_e,cellId:K,intensity:Oe,dataCoordinate:this.positions[_e[ht[0]]]}},B.dispose=function(){this.texture.dispose(),this.triShader.dispose(),this.lineShader.dispose(),this.pointShader.dispose(),this.pickShader.dispose(),this.pointPickShader.dispose(),this.triangleVAO.dispose(),this.trianglePositions.dispose(),this.triangleColors.dispose(),this.triangleUVs.dispose(),this.triangleNormals.dispose(),this.triangleIds.dispose(),this.edgeVAO.dispose(),this.edgePositions.dispose(),this.edgeColors.dispose(),this.edgeUVs.dispose(),this.edgeIds.dispose(),this.pointVAO.dispose(),this.pointPositions.dispose(),this.pointColors.dispose(),this.pointUVs.dispose(),this.pointSizes.dispose(),this.pointIds.dispose(),this.contourVAO.dispose(),this.contourPositions.dispose(),this.contourShader.dispose()};function q(ue){var K=u(ue,w.vertex,w.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K.attributes.normal.location=4,K}function U(ue){var K=u(ue,A.vertex,A.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K}function J(ue){var K=u(ue,T.vertex,T.fragment);return K.attributes.position.location=0,K.attributes.color.location=2,K.attributes.uv.location=3,K.attributes.pointSize.location=4,K}function ee(ue){var K=u(ue,m.vertex,m.fragment);return K.attributes.position.location=0,K.attributes.id.location=1,K}function ce(ue){var K=u(ue,F.vertex,F.fragment);return K.attributes.position.location=0,K.attributes.id.location=1,K.attributes.pointSize.location=4,K}function ye(ue){var K=u(ue,E.vertex,E.fragment);return K.attributes.position.location=0,K}function xe(ue,K){arguments.length===1&&(K=ue,ue=K.gl);var _e=ue.getExtension("OES_standard_derivatives")||ue.getExtension("MOZ_OES_standard_derivatives")||ue.getExtension("WEBKIT_OES_standard_derivatives");if(!_e)throw new Error("derivatives not supported");var ne=q(ue),ae=U(ue),pe=J(ue),ie=ee(ue),le=ce(ue),me=ye(ue),be=v(ue,_(new Uint8Array([255,255,255,255]),[1,1,4]));be.generateMipmap(),be.minFilter=ue.LINEAR_MIPMAP_LINEAR,be.magFilter=ue.LINEAR;var De=c(ue),Ge=c(ue),ht=c(ue),it=c(ue),Oe=c(ue),ze=f(ue,[{buffer:De,type:ue.FLOAT,size:3},{buffer:Oe,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Ge,type:ue.FLOAT,size:4},{buffer:ht,type:ue.FLOAT,size:2},{buffer:it,type:ue.FLOAT,size:3}]),ct=c(ue),et=c(ue),qe=c(ue),we=c(ue),Le=f(ue,[{buffer:ct,type:ue.FLOAT,size:3},{buffer:we,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:et,type:ue.FLOAT,size:4},{buffer:qe,type:ue.FLOAT,size:2}]),Ke=c(ue),Te=c(ue),Ve=c(ue),$e=c(ue),ot=c(ue),tt=f(ue,[{buffer:Ke,type:ue.FLOAT,size:3},{buffer:ot,type:ue.UNSIGNED_BYTE,size:4,normalized:!0},{buffer:Te,type:ue.FLOAT,size:4},{buffer:Ve,type:ue.FLOAT,size:2},{buffer:$e,type:ue.FLOAT,size:1}]),nt=c(ue),We=f(ue,[{buffer:nt,type:ue.FLOAT,size:3}]),mt=new R(ue,be,ne,ae,pe,ie,le,me,De,Oe,Ge,ht,it,ze,ct,we,et,qe,Le,Ke,ot,Te,Ve,$e,tt,nt,We);return mt.update(K),mt}a.exports=xe}),4437:(function(a,i,o){"use strict";a.exports=g;var s=o(3025),l=o(6296),u=o(351),c=o(8512),f=o(24),v=o(7520);function g(p,x){p=p||document.body,x=x||{};var _=[.01,1/0];"distanceLimits"in x&&(_[0]=x.distanceLimits[0],_[1]=x.distanceLimits[1]),"zoomMin"in x&&(_[0]=x.zoomMin),"zoomMax"in x&&(_[1]=x.zoomMax);var y=l({center:x.center||[0,0,0],up:x.up||[0,1,0],eye:x.eye||[0,0,10],mode:x.mode||"orbit",distanceLimits:_}),C=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0],k=0,S=p.clientWidth,L=p.clientHeight,w={keyBindingMode:"rotate",enableWheel:!0,view:y,element:p,delay:x.delay||16,rotateSpeed:x.rotateSpeed||1,zoomSpeed:x.zoomSpeed||1,translateSpeed:x.translateSpeed||1,flipX:!!x.flipX,flipY:!!x.flipY,modes:y.modes,_ortho:x._ortho||x.projection&&x.projection.type==="orthographic"||!1,tick:function(){var A=s(),T=this.delay,m=A-2*T;y.idle(A-T),y.recalcMatrix(m),y.flush(A-(100+T*2));for(var F=!0,E=y.computedMatrix,I=0;I<16;++I)F=F&&C[I]===E[I],C[I]=E[I];var R=p.clientWidth===S&&p.clientHeight===L;return S=p.clientWidth,L=p.clientHeight,F?!R:(k=Math.exp(y.computedRadius[0]),!0)},lookAt:function(A,T,m){y.lookAt(y.lastT(),A,T,m)},rotate:function(A,T,m){y.rotate(y.lastT(),A,T,m)},pan:function(A,T,m){y.pan(y.lastT(),A,T,m)},translate:function(A,T,m){y.translate(y.lastT(),A,T,m)}};return Object.defineProperties(w,{matrix:{get:function(){return y.computedMatrix},set:function(A){return y.setMatrix(y.lastT(),A),y.computedMatrix},enumerable:!0},mode:{get:function(){return y.getMode()},set:function(A){var T=y.computedUp.slice(),m=y.computedEye.slice(),F=y.computedCenter.slice();if(y.setMode(A),A==="turntable"){var E=s();y._active.lookAt(E,m,F,T),y._active.lookAt(E+500,m,F,[0,0,1]),y._active.flush(E)}return y.getMode()},enumerable:!0},center:{get:function(){return y.computedCenter},set:function(A){return y.lookAt(y.lastT(),null,A),y.computedCenter},enumerable:!0},eye:{get:function(){return y.computedEye},set:function(A){return y.lookAt(y.lastT(),A),y.computedEye},enumerable:!0},up:{get:function(){return y.computedUp},set:function(A){return y.lookAt(y.lastT(),null,null,A),y.computedUp},enumerable:!0},distance:{get:function(){return k},set:function(A){return y.setDistance(y.lastT(),A),A},enumerable:!0},distanceLimits:{get:function(){return y.getDistanceLimits(_)},set:function(A){return y.setDistanceLimits(A),A},enumerable:!0}}),p.addEventListener("contextmenu",function(A){return A.preventDefault(),!1}),w._lastX=-1,w._lastY=-1,w._lastMods={shift:!1,control:!1,alt:!1,meta:!1},w.enableMouseListeners=function(){w.mouseListener=u(p,A),p.addEventListener("touchstart",function(T){var m=f(T.changedTouches[0],p);A(0,m[0],m[1],w._lastMods),A(1,m[0],m[1],w._lastMods)},v?{passive:!0}:!1),p.addEventListener("touchmove",function(T){var m=f(T.changedTouches[0],p);A(1,m[0],m[1],w._lastMods),T.preventDefault()},v?{passive:!1}:!1),p.addEventListener("touchend",function(T){A(0,w._lastX,w._lastY,w._lastMods)},v?{passive:!0}:!1);function A(T,m,F,E){var I=w.keyBindingMode;if(I!==!1){var R=I==="rotate",B=I==="pan",O=I==="zoom",V=!!E.control,j=!!E.alt,q=!!E.shift,U=!!(T&1),J=!!(T&2),ee=!!(T&4),ce=1/p.clientHeight,ye=ce*(m-w._lastX),xe=ce*(F-w._lastY),ue=w.flipX?1:-1,K=w.flipY?1:-1,_e=Math.PI*w.rotateSpeed,ne=s();if(w._lastX!==-1&&w._lastY!==-1&&((R&&U&&!V&&!j&&!q||U&&!V&&!j&&q)&&y.rotate(ne,ue*_e*ye,-K*_e*xe,0),(B&&U&&!V&&!j&&!q||J||U&&V&&!j&&!q)&&y.pan(ne,-w.translateSpeed*ye*k,w.translateSpeed*xe*k,0),O&&U&&!V&&!j&&!q||ee||U&&!V&&j&&!q)){var ae=-w.zoomSpeed*xe/window.innerHeight*(ne-y.lastT())*100;y.pan(ne,0,0,k*(Math.exp(ae)-1))}return w._lastX=m,w._lastY=F,w._lastMods=E,!0}}w.wheelListener=c(p,function(T,m){if(w.keyBindingMode!==!1&&w.enableWheel){var F=w.flipX?1:-1,E=w.flipY?1:-1,I=s();if(Math.abs(T)>Math.abs(m))y.rotate(I,0,0,-T*F*Math.PI*w.rotateSpeed/window.innerWidth);else if(!w._ortho){var R=-w.zoomSpeed*E*m/window.innerHeight*(I-y.lastT())/20;y.pan(I,0,0,k*(Math.exp(R)-1))}}},!0)},w.enableMouseListeners(),w}}),799:(function(a,i,o){var s=o(3236),l=o(9405),u=s([`precision mediump float; #define GLSLIFY 1 attribute vec2 position; varying vec2 uv; void main() { uv = position; gl_Position = vec4(position, 0, 1); }`]),c=s([`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); }`]);a.exports=function(f){return l(f,u,c,null,[{name:"position",type:"vec2"}])}}),4100:(function(a,i,o){"use strict";var s=o(4437),l=o(3837),u=o(5445),c=o(4449),f=o(3589),v=o(2260),g=o(7169),p=o(351),x=o(4772),_=o(4040),y=o(799),C=o(9216)({tablet:!0,featureDetect:!0});a.exports={createScene:A,createCamera:s};function k(){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 S(m,F){var E=null;try{E=m.getContext("webgl",F),E||(E=m.getContext("experimental-webgl",F))}catch(I){return null}return E}function L(m){var F=Math.round(Math.log(Math.abs(m))/Math.log(10));if(F<0){var E=Math.round(Math.pow(10,-F));return Math.ceil(m*E)/E}else if(F>0){var E=Math.round(Math.pow(10,F));return Math.ceil(m/E)*E}return Math.ceil(m)}function w(m){return typeof m=="boolean"?m:!0}function A(m){m=m||{},m.camera=m.camera||{};var F=m.canvas;if(!F)if(F=document.createElement("canvas"),m.container){var E=m.container;E.appendChild(F)}else document.body.appendChild(F);var I=m.gl;if(I||(m.glOptions&&(C=!!m.glOptions.preserveDrawingBuffer),I=S(F,m.glOptions||{premultipliedAlpha:!0,antialias:!0,preserveDrawingBuffer:C})),!I)throw new Error("webgl not supported");var R=m.bounds||[[-10,-10,-10],[10,10,10]],B=new k,O=v(I,I.drawingBufferWidth,I.drawingBufferHeight,{preferFloat:!C}),V=y(I),j=m.cameraObject&&m.cameraObject._ortho===!0||m.camera.projection&&m.camera.projection.type==="orthographic"||!1,q={eye:m.camera.eye||[2,0,0],center:m.camera.center||[0,0,0],up:m.camera.up||[0,1,0],zoomMin:m.camera.zoomMax||.1,zoomMax:m.camera.zoomMin||100,mode:m.camera.mode||"turntable",_ortho:j},U=m.axes||{},J=l(I,U);J.enable=!U.disable;var ee=m.spikes||{},ce=c(I,ee),ye=[],xe=[],ue=[],K=[],_e=!0,ie=!0,ne=new Array(16),ae=new Array(16),pe={view:null,projection:ne,model:ae,_ortho:!1},ie=!0,le=[I.drawingBufferWidth,I.drawingBufferHeight],me=m.cameraObject||s(F,q),be={gl:I,contextLost:!1,pixelRatio:m.pixelRatio||1,canvas:F,selection:B,camera:me,axes:J,axesPixels:null,spikes:ce,bounds:R,objects:ye,shape:le,aspect:m.aspectRatio||[1,1,1],pickRadius:m.pickRadius||10,zNear:m.zNear||.01,zFar:m.zFar||1e3,fovy:m.fovy||Math.PI/4,clearColor:m.clearColor||[0,0,0,0],autoResize:w(m.autoResize),autoBounds:w(m.autoBounds),autoScale:!!m.autoScale,autoCenter:w(m.autoCenter),clipToBounds:w(m.clipToBounds),snapToData:!!m.snapToData,onselect:m.onselect||null,onrender:m.onrender||null,onclick:m.onclick||null,cameraParams:pe,oncontextloss:null,mouseListener:null,_stopped:!1,getAspectratio:function(){return{x:this.aspect[0],y:this.aspect[1],z:this.aspect[2]}},setAspectratio:function(we){this.aspect[0]=we.x,this.aspect[1]=we.y,this.aspect[2]=we.z,ie=!0},setBounds:function(we,Le){this.bounds[0][we]=Le.min,this.bounds[1][we]=Le.max},setClearColor:function(we){this.clearColor=we},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)}},De=[I.drawingBufferWidth/be.pixelRatio|0,I.drawingBufferHeight/be.pixelRatio|0];function Ge(){if(!be._stopped&&be.autoResize){var we=F.parentNode,Le=1,Ke=1;we&&we!==document.body?(Le=we.clientWidth,Ke=we.clientHeight):(Le=window.innerWidth,Ke=window.innerHeight);var Te=Math.ceil(Le*be.pixelRatio)|0,Ve=Math.ceil(Ke*be.pixelRatio)|0;if(Te!==F.width||Ve!==F.height){F.width=Te,F.height=Ve;var $e=F.style;$e.position=$e.position||"absolute",$e.left="0px",$e.top="0px",$e.width=Le+"px",$e.height=Ke+"px",_e=!0}}}be.autoResize&&Ge(),window.addEventListener("resize",Ge);function ht(){for(var we=ye.length,Le=K.length,Ke=0;Ke0&&ue[Le-1]===0;)ue.pop(),K.pop().dispose()}be.update=function(we){be._stopped||(we=we||{},_e=!0,ie=!0)},be.add=function(we){be._stopped||(we.axes=J,ye.push(we),xe.push(-1),_e=!0,ie=!0,ht())},be.remove=function(we){if(!be._stopped){var Le=ye.indexOf(we);Le<0||(ye.splice(Le,1),xe.pop(),_e=!0,ie=!0,ht())}},be.dispose=function(){if(!be._stopped&&(be._stopped=!0,window.removeEventListener("resize",Ge),F.removeEventListener("webglcontextlost",it),be.mouseListener.enabled=!1,!be.contextLost)){J.dispose(),ce.dispose();for(var we=0;weB.distance)continue;for(var We=0;We1e-6?(C=Math.acos(k),S=Math.sin(C),L=Math.sin((1-u)*C)/S,w=Math.sin(u*C)/S):(L=1-u,w=u),o[0]=L*c+w*p,o[1]=L*f+w*x,o[2]=L*v+w*_,o[3]=L*g+w*y,o}}),5964:(function(a){"use strict";a.exports=function(i){return!i&&i!==0?"":i.toString()}}),9366:(function(a,i,o){"use strict";var s=o(4359);a.exports=u;var l={};function u(c,f,v){var g=[f.style,f.weight,f.variant,f.family].join("_"),p=l[g];if(p||(p=l[g]={}),c in p)return p[c];var x={textAlign:"center",textBaseline:"middle",lineHeight:1,font:f.family,fontStyle:f.style,fontWeight:f.weight,fontVariant:f.variant,lineSpacing:1.25,styletags:{breaklines:!0,bolds:!0,italics:!0,subscripts:!0,superscripts:!0}};x.triangles=!0;var _=s(c,x);x.triangles=!1;var y=s(c,x),C,k;if(v&&v!==1){for(C=0;C<_.positions.length;++C)for(k=0;k<_.positions[C].length;++k)_.positions[C][k]/=v;for(C=0;C 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=l([`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; } }`]),f=l([`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; } } `]),v=l([`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; } `]),g=l([`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); }`]),p=[{name:"position",type:"vec3"},{name:"color",type:"vec4"},{name:"glyph",type:"vec2"},{name:"id",type:"vec4"}],x={vertex:u,fragment:v,attributes:p},_={vertex:c,fragment:v,attributes:p},y={vertex:f,fragment:v,attributes:p},C={vertex:u,fragment:g,attributes:p},k={vertex:c,fragment:g,attributes:p},S={vertex:f,fragment:g,attributes:p};function L(w,A){var T=s(w,A),m=T.attributes;return m.position.location=0,m.color.location=1,m.glyph.location=2,m.id.location=3,T}i.createPerspective=function(w){return L(w,x)},i.createOrtho=function(w){return L(w,_)},i.createProject=function(w){return L(w,y)},i.createPickPerspective=function(w){return L(w,C)},i.createPickOrtho=function(w){return L(w,k)},i.createPickProject=function(w){return L(w,S)}}),8418:(function(a,i,o){"use strict";var s=o(5219),l=o(2762),u=o(8116),c=o(1888),f=o(6760),v=o(1283),g=o(9366),p=o(5964),x=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],_=ArrayBuffer,y=DataView;function C(ae){return _.isView(ae)&&!(ae instanceof y)}function k(ae){return Array.isArray(ae)||C(ae)}a.exports=ne;function S(ae,pe){var ie=ae[0],le=ae[1],me=ae[2],be=ae[3];return ae[0]=pe[0]*ie+pe[4]*le+pe[8]*me+pe[12]*be,ae[1]=pe[1]*ie+pe[5]*le+pe[9]*me+pe[13]*be,ae[2]=pe[2]*ie+pe[6]*le+pe[10]*me+pe[14]*be,ae[3]=pe[3]*ie+pe[7]*le+pe[11]*me+pe[15]*be,ae}function L(ae,pe,ie,le){return S(le,le,ie),S(le,le,pe),S(le,le,ae)}function w(ae,pe){this.index=ae,this.dataCoordinate=this.position=pe}function A(ae){return ae===!0||ae>1?1:ae}function T(ae,pe,ie,le,me,be,De,Ge,ht,it,Oe,ze){this.gl=ae,this.pixelRatio=1,this.shader=pe,this.orthoShader=ie,this.projectShader=le,this.pointBuffer=me,this.colorBuffer=be,this.glyphBuffer=De,this.idBuffer=Ge,this.vao=ht,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=it,this.pickOrthoShader=Oe,this.pickProjectShader=ze,this.points=[],this._selectResult=new w(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 m=T.prototype;m.pickSlots=1,m.setPickBase=function(ae){this.pickId=ae},m.isTransparent=function(){if(this.hasAlpha)return!0;for(var ae=0;ae<3;++ae)if(this.axesProject[ae]&&this.projectHasAlpha)return!0;return!1},m.isOpaque=function(){if(!this.hasAlpha)return!0;for(var ae=0;ae<3;++ae)if(this.axesProject[ae]&&!this.projectHasAlpha)return!0;return!1};var F=[0,0],E=[0,0,0],I=[0,0,0],R=[0,0,0,1],B=[0,0,0,1],O=x.slice(),V=[0,0,0],j=[[0,0,0],[0,0,0]];function q(ae){return ae[0]=ae[1]=ae[2]=0,ae}function U(ae,pe){return ae[0]=pe[0],ae[1]=pe[1],ae[2]=pe[2],ae[3]=1,ae}function J(ae,pe,ie,le){return ae[0]=pe[0],ae[1]=pe[1],ae[2]=pe[2],ae[ie]=le,ae}function ee(ae){for(var pe=j,ie=0;ie<2;++ie)for(var le=0;le<3;++le)pe[ie][le]=Math.max(Math.min(ae[ie][le],1e8),-1e8);return pe}function ce(ae,pe,ie,le){var me=pe.axesProject,be=pe.gl,De=ae.uniforms,Ge=ie.model||x,ht=ie.view||x,it=ie.projection||x,Oe=pe.axesBounds,ze=ee(pe.clipBounds),ct;pe.axes&&pe.axes.lastCubeProps?ct=pe.axes.lastCubeProps.axis:ct=[1,1,1],F[0]=2/be.drawingBufferWidth,F[1]=2/be.drawingBufferHeight,ae.bind(),De.view=ht,De.projection=it,De.screenSize=F,De.highlightId=pe.highlightId,De.highlightScale=pe.highlightScale,De.clipBounds=ze,De.pickGroup=pe.pickId/255,De.pixelRatio=le;for(var et=0;et<3;++et)if(me[et]){De.scale=pe.projectScale[et],De.opacity=pe.projectOpacity[et];for(var qe=O,we=0;we<16;++we)qe[we]=0;for(var we=0;we<4;++we)qe[5*we]=1;qe[5*et]=0,ct[et]<0?qe[12+et]=Oe[0][et]:qe[12+et]=Oe[1][et],f(qe,Ge,qe),De.model=qe;var Le=(et+1)%3,Ke=(et+2)%3,Te=q(E),Ve=q(I);Te[Le]=1,Ve[Ke]=1;var $e=L(it,ht,Ge,U(R,Te)),ot=L(it,ht,Ge,U(B,Ve));if(Math.abs($e[1])>Math.abs(ot[1])){var tt=$e;$e=ot,ot=tt,tt=Te,Te=Ve,Ve=tt;var nt=Le;Le=Ke,Ke=nt}$e[0]<0&&(Te[Le]=-1),ot[1]>0&&(Ve[Ke]=-1);for(var We=0,mt=0,we=0;we<4;++we)We+=Math.pow(Ge[4*Le+we],2),mt+=Math.pow(Ge[4*Ke+we],2);Te[Le]/=Math.sqrt(We),Ve[Ke]/=Math.sqrt(mt),De.axes[0]=Te,De.axes[1]=Ve,De.fragClipBounds[0]=J(V,ze[0],et,-1e8),De.fragClipBounds[1]=J(V,ze[1],et,1e8),pe.vao.bind(),pe.vao.draw(be.TRIANGLES,pe.vertexCount),pe.lineWidth>0&&(be.lineWidth(pe.lineWidth*le),pe.vao.draw(be.LINES,pe.lineVertexCount,pe.vertexCount)),pe.vao.unbind()}}var ye=[-1e8,-1e8,-1e8],xe=[1e8,1e8,1e8],ue=[ye,xe];function K(ae,pe,ie,le,me,be,De){var Ge=ie.gl;if((be===ie.projectHasAlpha||De)&&ce(pe,ie,le,me),be===ie.hasAlpha||De){ae.bind();var ht=ae.uniforms;ht.model=le.model||x,ht.view=le.view||x,ht.projection=le.projection||x,F[0]=2/Ge.drawingBufferWidth,F[1]=2/Ge.drawingBufferHeight,ht.screenSize=F,ht.highlightId=ie.highlightId,ht.highlightScale=ie.highlightScale,ht.fragClipBounds=ue,ht.clipBounds=ie.axes.bounds,ht.opacity=ie.opacity,ht.pickGroup=ie.pickId/255,ht.pixelRatio=me,ie.vao.bind(),ie.vao.draw(Ge.TRIANGLES,ie.vertexCount),ie.lineWidth>0&&(Ge.lineWidth(ie.lineWidth*me),ie.vao.draw(Ge.LINES,ie.lineVertexCount,ie.vertexCount)),ie.vao.unbind()}}m.draw=function(ae){var pe=this.useOrtho?this.orthoShader:this.shader;K(pe,this.projectShader,this,ae,this.pixelRatio,!1,!1)},m.drawTransparent=function(ae){var pe=this.useOrtho?this.orthoShader:this.shader;K(pe,this.projectShader,this,ae,this.pixelRatio,!0,!1)},m.drawPick=function(ae){var pe=this.useOrtho?this.pickOrthoShader:this.pickPerspectiveShader;K(pe,this.pickProjectShader,this,ae,1,!0,!0)},m.pick=function(ae){if(!ae||ae.id!==this.pickId)return null;var pe=ae.value[2]+(ae.value[1]<<8)+(ae.value[0]<<16);if(pe>=this.pointCount||pe<0)return null;var ie=this.points[pe],le=this._selectResult;le.index=pe;for(var me=0;me<3;++me)le.position[me]=le.dataCoordinate[me]=ie[me];return le},m.highlight=function(ae){if(!ae)this.highlightId=[1,1,1,1];else{var pe=ae.index,ie=pe&255,le=pe>>8&255,me=pe>>16&255;this.highlightId=[ie/255,le/255,me/255,0]}};function _e(ae,pe,ie,le){var me;k(ae)?pe0){var fr=0,Ot=Ke,cr=[0,0,0,1],Ct=[0,0,0,1],wt=k(ct)&&k(ct[0]),Tt=k(we)&&k(we[0]);e:for(var le=0;le0?1-mt[0][0]:Kr<0?1+mt[1][0]:1,Nr*=Nr>0?1-mt[0][1]:Nr<0?1+mt[1][1]:1;for(var dn=[Kr,Nr],Dt=nt.cells||[],At=nt.positions||[],ot=0;otthis.buffer.length){l.free(this.buffer);for(var k=this.buffer=l.mallocUint8(c(C*y*4)),S=0;Sk)for(y=k;yC)for(y=C;y=0){for(var j=V.type.charAt(V.type.length-1)|0,q=new Array(j),U=0;U=0;)J+=1;B[O]=J}var ee=new Array(k.length);function ce(){w.program=c.program(A,w._vref,w._fref,R,B);for(var ye=0;ye=0){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new s("","Invalid data type for attribute "+w+": "+A);f(p,x,T[0],y,m,C,w)}else if(A.indexOf("mat")>=0){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new s("","Invalid data type for attribute "+w+": "+A);v(p,x,T,y,m,C,w)}else throw new s("","Unknown data type for attribute "+w+": "+A);break}}return C}}),3327:(function(a,i,o){"use strict";var s=o(216),l=o(8866);a.exports=f;function u(v){return function(){return v}}function c(v,g){for(var p=new Array(v),x=0;x4)throw new l("","Invalid data type");switch(J.charAt(0)){case"b":case"i":v["uniform"+ee+"iv"](x[B],O);break;case"v":v["uniform"+ee+"fv"](x[B],O);break;default:throw new l("","Unrecognized data type for vector "+name+": "+J)}}else if(J.indexOf("mat")===0&&J.length===4){if(ee=J.charCodeAt(J.length-1)-48,ee<2||ee>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+J);v["uniformMatrix"+ee+"fv"](x[B],!1,O);break}else throw new l("","Unknown uniform data type for "+name+": "+J)}}}}}function C(A,T){if(typeof T!="object")return[[A,T]];var m=[];for(var F in T){var E=T[F],I=A;parseInt(F)+""===F?I+="["+F+"]":I+="."+F,typeof E=="object"?m.push.apply(m,C(I,E)):m.push([I,E])}return m}function k(A){switch(A){case"bool":return!1;case"int":case"sampler2D":case"samplerCube":return 0;case"float":return 0;default:var T=A.indexOf("vec");if(0<=T&&T<=1&&A.length===4+T){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new l("","Invalid data type");return A.charAt(0)==="b"?c(m,!1):c(m,0)}else if(A.indexOf("mat")===0&&A.length===4){var m=A.charCodeAt(A.length-1)-48;if(m<2||m>4)throw new l("","Invalid uniform dimension type for matrix "+name+": "+A);return c(m*m,0)}else throw new l("","Unknown uniform data type for "+name+": "+A)}}function S(A,T,m){if(typeof m=="object"){var F=L(m);Object.defineProperty(A,T,{get:u(F),set:y(m),enumerable:!0,configurable:!1})}else x[m]?Object.defineProperty(A,T,{get:_(m),set:y(m),enumerable:!0,configurable:!1}):A[T]=k(p[m].type)}function L(A){var T;if(Array.isArray(A)){T=new Array(A.length);for(var m=0;m1){p[0]in v||(v[p[0]]=[]),v=v[p[0]];for(var x=1;x1)for(var C=0;C<_.size;++C)p.push({name:_.name.replace("[0]","["+C+"]"),type:y});else p.push({name:_.name,type:y})}}return p}function c(f,v){for(var g=f.getProgramParameter(v,f.ACTIVE_ATTRIBUTES),p=[],x=0;x 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; } `]),u=s([`#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=s([`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; } `]),f=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 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); }`]);i.meshShader={vertex:l,fragment:u,attributes:[{name:"position",type:"vec4"},{name:"color",type:"vec4"},{name:"uv",type:"vec2"},{name:"vector",type:"vec4"}]},i.pickShader={vertex:c,fragment:f,attributes:[{name:"position",type:"vec4"},{name:"id",type:"vec4"},{name:"vector",type:"vec4"}]}}),7815:(function(a,i,o){"use strict";var s=o(2931),l=o(9970),u=["xyz","xzy","yxz","yzx","zxy","zyx"],c=function(S,L,w,A){for(var T=S.points,m=S.velocities,F=S.divergences,E=[],I=[],R=[],B=[],O=[],V=[],j=0,q=0,U=l.create(),J=l.create(),ee=8,ce=0;ce0)for(var K=0;KL)return A-1}return A},g=function(S,L,w){return Sw?w:S},p=function(S,L,w){var A=L.vectors,T=L.meshgrid,m=S[0],F=S[1],E=S[2],I=T[0].length,R=T[1].length,B=T[2].length,O=v(T[0],m),V=v(T[1],F),j=v(T[2],E),q=O+1,U=V+1,J=j+1;if(O=g(O,0,I-1),q=g(q,0,I-1),V=g(V,0,R-1),U=g(U,0,R-1),j=g(j,0,B-1),J=g(J,0,B-1),O<0||V<0||j<0||q>I-1||U>R-1||J>B-1)return s.create();var ee=T[0][O],ce=T[0][q],ye=T[1][V],xe=T[1][U],ue=T[2][j],K=T[2][J],_e=(m-ee)/(ce-ee),ne=(F-ye)/(xe-ye),ae=(E-ue)/(K-ue);isFinite(_e)||(_e=.5),isFinite(ne)||(ne=.5),isFinite(ae)||(ae=.5);var pe,ie,le,me,be,De;switch(w.reversedX&&(O=I-1-O,q=I-1-q),w.reversedY&&(V=R-1-V,U=R-1-U),w.reversedZ&&(j=B-1-j,J=B-1-J),w.filled){case 5:be=j,De=J,le=V*B,me=U*B,pe=O*B*R,ie=q*B*R;break;case 4:be=j,De=J,pe=O*B,ie=q*B,le=V*B*I,me=U*B*I;break;case 3:le=V,me=U,be=j*R,De=J*R,pe=O*R*B,ie=q*R*B;break;case 2:le=V,me=U,pe=O*R,ie=q*R,be=j*R*I,De=J*R*I;break;case 1:pe=O,ie=q,be=j*I,De=J*I,le=V*I*B,me=U*I*B;break;default:pe=O,ie=q,le=V*I,me=U*I,be=j*I*R,De=J*I*R;break}var Ge=A[pe+le+be],ht=A[pe+le+De],it=A[pe+me+be],Oe=A[pe+me+De],ze=A[ie+le+be],ct=A[ie+le+De],et=A[ie+me+be],qe=A[ie+me+De],we=s.create(),Le=s.create(),Ke=s.create(),Te=s.create();s.lerp(we,Ge,ze,_e),s.lerp(Le,ht,ct,_e),s.lerp(Ke,it,et,_e),s.lerp(Te,Oe,qe,_e);var Ve=s.create(),$e=s.create();s.lerp(Ve,we,Ke,ne),s.lerp($e,Le,Te,ne);var ot=s.create();return s.lerp(ot,Ve,$e,ae),ot},x=function(S,L){var w=L[0],A=L[1],T=L[2];return S[0]=w<0?-w:w,S[1]=A<0?-A:A,S[2]=T<0?-T:T,S},_=function(S){var L=1/0;S.sort(function(m,F){return m-F});for(var w=S.length,A=1;Aq||qeU||weJ)},ce=s.distance(L[0],L[1]),ye=10*ce/A,xe=ye*ye,ue=1,K=0,_e=w.length;_e>1&&(ue=y(w));for(var ne=0;ne<_e;ne++){var ae=s.create();s.copy(ae,w[ne]);var pe=[ae],ie=[],le=I(ae),me=ae;ie.push(le);var be=[],De=R(ae,le),Ge=s.length(De);isFinite(Ge)&&Ge>K&&(K=Ge),be.push(Ge),B.push({points:pe,velocities:ie,divergences:be});for(var ht=0;htxe&&s.scale(it,it,ye/Math.sqrt(Oe)),s.add(it,it,ae),le=I(it),s.squaredDistance(me,it)-xe>-1e-4*xe){pe.push(it),me=it,ie.push(le);var De=R(it,le),Ge=s.length(De);isFinite(Ge)&&Ge>K&&(K=Ge),be.push(Ge)}ae=it}}var ze=f(B,S.colormap,K,ue);return m?ze.tubeScale=m:(K===0&&(K=1),ze.tubeScale=T*.5*ue/K),ze};var C=o(6740),k=o(6405).createMesh;a.exports.createTubeMesh=function(S,L){return k(S,L,{shaders:C,traceType:"streamtube"})}}),990:(function(a,i,o){var s=o(9405),l=o(3236),u=l([`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; mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); vec4 worldPosition = (model * objectOffsetTranslation) * vec4(localCoordinate, 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=l([`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 \u2014 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; } `]),f=l([`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; mat4 objectOffsetTranslation = mat4(1.0) + mat4(vec4(0), vec4(0), vec4(0), vec4(objectOffset, 0)); vec4 worldPosition = (model * objectOffsetTranslation) * vec4(dataCoordinate, 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); } `]),v=l([`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)); } `]);i.createShader=function(g){var p=s(g,u,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},i.createPickShader=function(g){var p=s(g,u,v,null,[{name:"uv",type:"vec4"},{name:"f",type:"vec3"},{name:"normal",type:"vec3"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p.attributes.normal.location=2,p},i.createContourShader=function(g){var p=s(g,f,c,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p},i.createPickContourShader=function(g){var p=s(g,f,v,null,[{name:"uv",type:"vec4"},{name:"f",type:"float"}]);return p.attributes.uv.location=0,p.attributes.f.location=1,p}}),9499:(function(a,i,o){"use strict";a.exports=pe;var s=o(8828),l=o(2762),u=o(8116),c=o(7766),f=o(1888),v=o(6729),g=o(5298),p=o(9994),x=o(9618),_=o(3711),y=o(6760),C=o(7608),k=o(2478),S=o(6199),L=o(990),w=L.createShader,A=L.createContourShader,T=L.createPickShader,m=L.createPickContourShader,F=40,E=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],I=[[0,0],[0,1],[1,0],[1,1],[1,0],[0,1]],R=[[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 ie=0;ie<3;++ie){var le=R[ie],me=(ie+1)%3,be=(ie+2)%3;le[me+0]=1,le[be+3]=1,le[ie+6]=1}})();function B(ie,le,me,be,De){this.position=ie,this.index=le,this.uv=me,this.level=be,this.dataCoordinate=De}var O=256;function V(ie,le,me,be,De,Ge,ht,it,Oe,ze,ct,et,qe,we,Le){this.gl=ie,this.shape=le,this.bounds=me,this.objectOffset=Le,this.intensityBounds=[],this._shader=be,this._pickShader=De,this._coordinateBuffer=Ge,this._vao=ht,this._colorMap=it,this._contourShader=Oe,this._contourPickShader=ze,this._contourBuffer=ct,this._contourVAO=et,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=qe,this._dynamicVAO=we,this._dynamicOffsets=[0,0,0],this._dynamicCounts=[0,0,0],this.contourWidth=[1,1,1],this.contourLevels=[[1],[1],[1]],this.contourTint=[0,0,0],this.contourColor=[[.5,.5,.5,1],[.5,.5,.5,1],[.5,.5,.5,1]],this.showContour=!0,this.showSurface=!0,this.enableHighlight=[!0,!0,!0],this.highlightColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.highlightTint=[1,1,1],this.highlightLevel=[-1,-1,-1],this.enableDynamic=[!0,!0,!0],this.dynamicLevel=[NaN,NaN,NaN],this.dynamicColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.dynamicTint=[1,1,1],this.dynamicWidth=[1,1,1],this.axesBounds=[[1/0,1/0,1/0],[-1/0,-1/0,-1/0]],this.surfaceProject=[!1,!1,!1],this.contourProject=[[!1,!1,!1],[!1,!1,!1],[!1,!1,!1]],this.colorBounds=[!1,!1],this._field=[x(f.mallocFloat(1024),[0,0]),x(f.mallocFloat(1024),[0,0]),x(f.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 j=V.prototype;j.genColormap=function(ie,le){var me=!1,be=p([v({colormap:ie,nshades:O,format:"rgba"}).map(function(De,Ge){var ht=le?q(Ge/255,le):De[3];return ht<1&&(me=!0),[De[0],De[1],De[2],255*ht]})]);return g.divseq(be,255),this.hasAlphaScale=me,be},j.isTransparent=function(){return this.opacity<1||this.hasAlphaScale},j.isOpaque=function(){return!this.isTransparent()},j.pickSlots=1,j.setPickBase=function(ie){this.pickId=ie};function q(ie,le){if(!le||!le.length)return 1;for(var me=0;meie&&me>0){var be=(le[me][0]-ie)/(le[me][0]-le[me-1][0]);return le[me][1]*(1-be)+be*le[me-1][1]}}return 1}var U=[0,0,0],J={showSurface:!1,showContour:!1,projections:[E.slice(),E.slice(),E.slice()],clipBounds:[[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]],[[0,0,0],[0,0,0]]]};function ee(ie,le){var me,be,De,Ge=le.axes&&le.axes.lastCubeProps.axis||U,ht=le.showSurface,it=le.showContour;for(me=0;me<3;++me)for(ht=ht||le.surfaceProject[me],be=0;be<3;++be)it=it||le.contourProject[me][be];for(me=0;me<3;++me){var Oe=J.projections[me];for(be=0;be<16;++be)Oe[be]=0;for(be=0;be<4;++be)Oe[5*be]=1;Oe[5*me]=0,Oe[12+me]=le.axesBounds[+(Ge[me]>0)][me],y(Oe,ie.model,Oe);var ze=J.clipBounds[me];for(De=0;De<2;++De)for(be=0;be<3;++be)ze[De][be]=ie.clipBounds[De][be];ze[0][me]=-1e8,ze[1][me]=1e8}return J.showSurface=ht,J.showContour=it,J}var ce={model:E,view:E,projection:E,inverseModel:E.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},ye=E.slice(),xe=[1,0,0,0,1,0,0,0,1];function ue(ie,le){ie=ie||{};var me=this.gl;me.disable(me.CULL_FACE),this._colorMap.bind(0);var be=ce;be.model=ie.model||E,be.view=ie.view||E,be.projection=ie.projection||E,be.lowerBound=[this.bounds[0][0],this.bounds[0][1],this.colorBounds[0]||this.bounds[0][2]],be.upperBound=[this.bounds[1][0],this.bounds[1][1],this.colorBounds[1]||this.bounds[1][2]],be.objectOffset=this.objectOffset,be.contourColor=this.contourColor[0],be.inverseModel=C(be.inverseModel,be.model);for(var De=0;De<2;++De)for(var Ge=be.clipBounds[De],ht=0;ht<3;++ht)Ge[ht]=Math.min(Math.max(this.clipBounds[De][ht],-1e8),1e8);be.kambient=this.ambientLight,be.kdiffuse=this.diffuseLight,be.kspecular=this.specularLight,be.roughness=this.roughness,be.fresnel=this.fresnel,be.opacity=this.opacity,be.height=0,be.permutation=xe,be.vertexColor=this.vertexColor;var it=ye;for(y(it,be.view,be.model),y(it,be.projection,it),C(it,it),De=0;De<3;++De)be.eyePosition[De]=it[12+De]/it[15];var Oe=it[15];for(De=0;De<3;++De)Oe+=this.lightPosition[De]*it[4*De+3];for(De=0;De<3;++De){var ze=it[12+De];for(ht=0;ht<3;++ht)ze+=it[4*ht+De]*this.lightPosition[ht];be.lightPosition[De]=ze/Oe}var ct=ee(be,this);if(ct.showSurface){for(this._shader.bind(),this._shader.uniforms=be,this._vao.bind(),this.showSurface&&this._vertexCount&&this._vao.draw(me.TRIANGLES,this._vertexCount),De=0;De<3;++De)!this.surfaceProject[De]||!this.vertexCount||(this._shader.uniforms.model=ct.projections[De],this._shader.uniforms.clipBounds=ct.clipBounds[De],this._vao.draw(me.TRIANGLES,this._vertexCount));this._vao.unbind()}if(ct.showContour){var et=this._contourShader;be.kambient=1,be.kdiffuse=0,be.kspecular=0,be.opacity=1,et.bind(),et.uniforms=be;var qe=this._contourVAO;for(qe.bind(),De=0;De<3;++De)for(et.uniforms.permutation=R[De],me.lineWidth(this.contourWidth[De]*this.pixelRatio),ht=0;ht>4)/16)/255,De=Math.floor(be),Ge=be-De,ht=le[1]*(ie.value[1]+(ie.value[2]&15)/16)/255,it=Math.floor(ht),Oe=ht-it;De+=1,it+=1;var ze=me.position;ze[0]=ze[1]=ze[2]=0;for(var ct=0;ct<2;++ct)for(var et=ct?Ge:1-Ge,qe=0;qe<2;++qe)for(var we=qe?Oe:1-Oe,Le=De+ct,Ke=it+qe,Te=et*we,Ve=0;Ve<3;++Ve)ze[Ve]+=this._field[Ve].get(Le,Ke)*Te;for(var $e=this._pickResult.level,ot=0;ot<3;++ot)if($e[ot]=k.le(this.contourLevels[ot],ze[ot]),$e[ot]<0)this.contourLevels[ot].length>0&&($e[ot]=0);else if($e[ot]Math.abs(nt-ze[ot])&&($e[ot]+=1)}for(me.index[0]=Ge<.5?De:De+1,me.index[1]=Oe<.5?it:it+1,me.uv[0]=be/le[0],me.uv[1]=ht/le[1],Ve=0;Ve<3;++Ve)me.dataCoordinate[Ve]=this._field[Ve].get(me.index[0],me.index[1]);return me},j.padField=function(ie,le){var me=le.shape.slice(),be=ie.shape.slice();g.assign(ie.lo(1,1).hi(me[0],me[1]),le),g.assign(ie.lo(1).hi(me[0],1),le.hi(me[0],1)),g.assign(ie.lo(1,be[1]-1).hi(me[0],1),le.lo(0,me[1]-1).hi(me[0],1)),g.assign(ie.lo(0,1).hi(1,me[1]),le.hi(1)),g.assign(ie.lo(be[0]-1,1).hi(1,me[1]),le.lo(me[0]-1)),ie.set(0,0,le.get(0,0)),ie.set(0,be[1]-1,le.get(0,me[1]-1)),ie.set(be[0]-1,0,le.get(me[0]-1,0)),ie.set(be[0]-1,be[1]-1,le.get(me[0]-1,me[1]-1))};function _e(ie,le){return Array.isArray(ie)?[le(ie[0]),le(ie[1]),le(ie[2])]:[le(ie),le(ie),le(ie)]}function ne(ie){return Array.isArray(ie)?ie.length===3?[ie[0],ie[1],ie[2],1]:[ie[0],ie[1],ie[2],ie[3]]:[0,0,0,1]}function ae(ie){if(Array.isArray(ie)){if(Array.isArray(ie))return[ne(ie[0]),ne(ie[1]),ne(ie[2])];var le=ne(ie);return[le.slice(),le.slice(),le.slice()]}}j.update=function(ie){ie=ie||{},this.objectOffset=ie.objectOffset||this.objectOffset,this.dirty=!0,"contourWidth"in ie&&(this.contourWidth=_e(ie.contourWidth,Number)),"showContour"in ie&&(this.showContour=_e(ie.showContour,Boolean)),"showSurface"in ie&&(this.showSurface=!!ie.showSurface),"contourTint"in ie&&(this.contourTint=_e(ie.contourTint,Boolean)),"contourColor"in ie&&(this.contourColor=ae(ie.contourColor)),"contourProject"in ie&&(this.contourProject=_e(ie.contourProject,function(Ga){return _e(Ga,Boolean)})),"surfaceProject"in ie&&(this.surfaceProject=ie.surfaceProject),"dynamicColor"in ie&&(this.dynamicColor=ae(ie.dynamicColor)),"dynamicTint"in ie&&(this.dynamicTint=_e(ie.dynamicTint,Number)),"dynamicWidth"in ie&&(this.dynamicWidth=_e(ie.dynamicWidth,Number)),"opacity"in ie&&(this.opacity=ie.opacity),"opacityscale"in ie&&(this.opacityscale=ie.opacityscale),"colorBounds"in ie&&(this.colorBounds=ie.colorBounds),"vertexColor"in ie&&(this.vertexColor=ie.vertexColor?1:0),"colormap"in ie&&this._colorMap.setPixels(this.genColormap(ie.colormap,this.opacityscale));var le=ie.field||ie.coords&&ie.coords[2]||null,me=!1;if(le||(this._field[2].shape[0]||this._field[2].shape[2]?le=this._field[2].lo(1,1).hi(this._field[2].shape[0]-2,this._field[2].shape[1]-2):le=this._field[2].hi(0,0)),"field"in ie||"coords"in ie){var be=(le.shape[0]+2)*(le.shape[1]+2);be>this._field[2].data.length&&(f.freeFloat(this._field[2].data),this._field[2].data=f.mallocFloat(s.nextPow2(be))),this._field[2]=x(this._field[2].data,[le.shape[0]+2,le.shape[1]+2]),this.padField(this._field[2],le),this.shape=le.shape.slice();for(var De=this.shape,Ge=0;Ge<2;++Ge)this._field[2].size>this._field[Ge].data.length&&(f.freeFloat(this._field[Ge].data),this._field[Ge].data=f.mallocFloat(this._field[2].size)),this._field[Ge]=x(this._field[Ge].data,[De[0]+2,De[1]+2]);if(ie.coords){var ht=ie.coords;if(!Array.isArray(ht)||ht.length!==3)throw new Error("gl-surface: invalid coordinates for x/y");for(Ge=0;Ge<2;++Ge){var it=ht[Ge];for(qe=0;qe<2;++qe)if(it.shape[qe]!==De[qe])throw new Error("gl-surface: coords have incorrect shape");this.padField(this._field[Ge],it)}}else if(ie.ticks){var Oe=ie.ticks;if(!Array.isArray(Oe)||Oe.length!==2)throw new Error("gl-surface: invalid ticks");for(Ge=0;Ge<2;++Ge){var ze=Oe[Ge];if((Array.isArray(ze)||ze.length)&&(ze=x(ze)),ze.shape[0]!==De[Ge])throw new Error("gl-surface: invalid tick length");var ct=x(ze.data,De);ct.stride[Ge]=ze.stride[0],ct.stride[Ge^1]=0,this.padField(this._field[Ge],ct)}}else{for(Ge=0;Ge<2;++Ge){var et=[0,0];et[Ge]=1,this._field[Ge]=x(this._field[Ge].data,[De[0]+2,De[1]+2],et,0)}this._field[0].set(0,0,0);for(var qe=0;qe0){for(var oa=0;oa<5;++oa)xr.pop();wt-=1}continue e}}}Dt.push(wt)}this._contourOffsets[Fr]=Cn,this._contourCounts[Fr]=Dt}var Ma=f.mallocFloat(xr.length);for(Ge=0;GeB||I<0||I>B)throw new Error("gl-texture2d: Invalid texture size");return F._shape=[E,I],F.bind(),R.texImage2D(R.TEXTURE_2D,0,F.format,E,I,0,F.format,F.type,null),F._mipLevels=[0],F}function y(F,E,I,R,B,O){this.gl=F,this.handle=E,this.format=B,this.type=O,this._shape=[I,R],this._mipLevels=[0],this._magFilter=F.NEAREST,this._minFilter=F.NEAREST,this._wrapS=F.CLAMP_TO_EDGE,this._wrapT=F.CLAMP_TO_EDGE,this._anisoSamples=1;var V=this,j=[this._wrapS,this._wrapT];Object.defineProperties(j,[{get:function(){return V._wrapS},set:function(U){return V.wrapS=U}},{get:function(){return V._wrapT},set:function(U){return V.wrapT=U}}]),this._wrapVector=j;var q=[this._shape[0],this._shape[1]];Object.defineProperties(q,[{get:function(){return V._shape[0]},set:function(U){return V.width=U}},{get:function(){return V._shape[1]},set:function(U){return V.height=U}}]),this._shapeVector=q}var C=y.prototype;Object.defineProperties(C,{minFilter:{get:function(){return this._minFilter},set:function(F){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(F)>=0&&(E.getExtension("OES_texture_float_linear")||(F=E.NEAREST)),f.indexOf(F)<0)throw new Error("gl-texture2d: Unknown filter mode "+F);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MIN_FILTER,F),this._minFilter=F}},magFilter:{get:function(){return this._magFilter},set:function(F){this.bind();var E=this.gl;if(this.type===E.FLOAT&&c.indexOf(F)>=0&&(E.getExtension("OES_texture_float_linear")||(F=E.NEAREST)),f.indexOf(F)<0)throw new Error("gl-texture2d: Unknown filter mode "+F);return E.texParameteri(E.TEXTURE_2D,E.TEXTURE_MAG_FILTER,F),this._magFilter=F}},mipSamples:{get:function(){return this._anisoSamples},set:function(F){var E=this._anisoSamples;if(this._anisoSamples=Math.max(F,1)|0,E!==this._anisoSamples){var I=this.gl.getExtension("EXT_texture_filter_anisotropic");I&&this.gl.texParameterf(this.gl.TEXTURE_2D,I.TEXTURE_MAX_ANISOTROPY_EXT,this._anisoSamples)}return this._anisoSamples}},wrapS:{get:function(){return this._wrapS},set:function(F){if(this.bind(),v.indexOf(F)<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_S,F),this._wrapS=F}},wrapT:{get:function(){return this._wrapT},set:function(F){if(this.bind(),v.indexOf(F)<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);return this.gl.texParameteri(this.gl.TEXTURE_2D,this.gl.TEXTURE_WRAP_T,F),this._wrapT=F}},wrap:{get:function(){return this._wrapVector},set:function(F){if(Array.isArray(F)||(F=[F,F]),F.length!==2)throw new Error("gl-texture2d: Must specify wrap mode for rows and columns");for(var E=0;E<2;++E)if(v.indexOf(F[E])<0)throw new Error("gl-texture2d: Unknown wrap mode "+F);this._wrapS=F[0],this._wrapT=F[1];var I=this.gl;return this.bind(),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_S,this._wrapS),I.texParameteri(I.TEXTURE_2D,I.TEXTURE_WRAP_T,this._wrapT),F}},shape:{get:function(){return this._shapeVector},set:function(F){if(!Array.isArray(F))F=[F|0,F|0];else if(F.length!==2)throw new Error("gl-texture2d: Invalid texture shape");return _(this,F[0]|0,F[1]|0),[F[0]|0,F[1]|0]}},width:{get:function(){return this._shape[0]},set:function(F){return F=F|0,_(this,F,this._shape[1]),F}},height:{get:function(){return this._shape[1]},set:function(F){return F=F|0,_(this,this._shape[0],F),F}}}),C.bind=function(F){var E=this.gl;return F!==void 0&&E.activeTexture(E.TEXTURE0+(F|0)),E.bindTexture(E.TEXTURE_2D,this.handle),F!==void 0?F|0:E.getParameter(E.ACTIVE_TEXTURE)-E.TEXTURE0},C.dispose=function(){this.gl.deleteTexture(this.handle)},C.generateMipmap=function(){this.bind(),this.gl.generateMipmap(this.gl.TEXTURE_2D);for(var F=Math.min(this._shape[0],this._shape[1]),E=0;F>0;++E,F>>>=1)this._mipLevels.indexOf(E)<0&&this._mipLevels.push(E)},C.setPixels=function(F,E,I,R){var B=this.gl;this.bind(),Array.isArray(E)?(R=I,I=E[1]|0,E=E[0]|0):(E=E||0,I=I||0),R=R||0;var O=p(F)?F:F.raw;if(O){var V=this._mipLevels.indexOf(R)<0;V?(B.texImage2D(B.TEXTURE_2D,0,this.format,this.format,this.type,O),this._mipLevels.push(R)):B.texSubImage2D(B.TEXTURE_2D,R,E,I,this.format,this.type,O)}else if(F.shape&&F.stride&&F.data){if(F.shape.length<2||E+F.shape[1]>this._shape[1]>>>R||I+F.shape[0]>this._shape[0]>>>R||E<0||I<0)throw new Error("gl-texture2d: Texture dimensions are out of bounds");S(B,E,I,R,this.format,this.type,this._mipLevels,F)}else throw new Error("gl-texture2d: Unsupported data type")};function k(F,E){return F.length===3?E[2]===1&&E[1]===F[0]*F[2]&&E[0]===F[2]:E[0]===1&&E[1]===F[0]}function S(F,E,I,R,B,O,V,j){var q=j.dtype,U=j.shape.slice();if(U.length<2||U.length>3)throw new Error("gl-texture2d: Invalid ndarray, must be 2d or 3d");var J=0,ee=0,ce=k(U,j.stride.slice());q==="float32"?J=F.FLOAT:q==="float64"?(J=F.FLOAT,ce=!1,q="float32"):q==="uint8"?J=F.UNSIGNED_BYTE:(J=F.UNSIGNED_BYTE,ce=!1,q="uint8");var ye=1;if(U.length===2)ee=F.LUMINANCE,U=[U[0],U[1],1],j=s(j.data,U,[j.stride[0],j.stride[1],1],j.offset);else if(U.length===3){if(U[2]===1)ee=F.ALPHA;else if(U[2]===2)ee=F.LUMINANCE_ALPHA;else if(U[2]===3)ee=F.RGB;else if(U[2]===4)ee=F.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");ye=U[2]}else throw new Error("gl-texture2d: Invalid shape for texture");if((ee===F.LUMINANCE||ee===F.ALPHA)&&(B===F.LUMINANCE||B===F.ALPHA)&&(ee=B),ee!==B)throw new Error("gl-texture2d: Incompatible texture format for setPixels");var xe=j.size,ue=V.indexOf(R)<0;if(ue&&V.push(R),J===O&&ce)j.offset===0&&j.data.length===xe?ue?F.texImage2D(F.TEXTURE_2D,R,B,U[0],U[1],0,B,O,j.data):F.texSubImage2D(F.TEXTURE_2D,R,E,I,U[0],U[1],B,O,j.data):ue?F.texImage2D(F.TEXTURE_2D,R,B,U[0],U[1],0,B,O,j.data.subarray(j.offset,j.offset+xe)):F.texSubImage2D(F.TEXTURE_2D,R,E,I,U[0],U[1],B,O,j.data.subarray(j.offset,j.offset+xe));else{var K;O===F.FLOAT?K=u.mallocFloat32(xe):K=u.mallocUint8(xe);var _e=s(K,U,[U[2],U[2]*U[0],1]);J===F.FLOAT&&O===F.UNSIGNED_BYTE?x(_e,j):l.assign(_e,j),ue?F.texImage2D(F.TEXTURE_2D,R,B,U[0],U[1],0,B,O,K.subarray(0,xe)):F.texSubImage2D(F.TEXTURE_2D,R,E,I,U[0],U[1],B,O,K.subarray(0,xe)),O===F.FLOAT?u.freeFloat32(K):u.freeUint8(K)}}function L(F){var E=F.createTexture();return F.bindTexture(F.TEXTURE_2D,E),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MIN_FILTER,F.NEAREST),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_MAG_FILTER,F.NEAREST),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_S,F.CLAMP_TO_EDGE),F.texParameteri(F.TEXTURE_2D,F.TEXTURE_WRAP_T,F.CLAMP_TO_EDGE),E}function w(F,E,I,R,B){var O=F.getParameter(F.MAX_TEXTURE_SIZE);if(E<0||E>O||I<0||I>O)throw new Error("gl-texture2d: Invalid texture shape");if(B===F.FLOAT&&!F.getExtension("OES_texture_float"))throw new Error("gl-texture2d: Floating point textures not supported on this platform");var V=L(F);return F.texImage2D(F.TEXTURE_2D,0,R,E,I,0,R,B,null),new y(F,V,E,I,R,B)}function A(F,E,I,R,B,O){var V=L(F);return F.texImage2D(F.TEXTURE_2D,0,B,B,O,E),new y(F,V,I,R,B,O)}function T(F,E){var I=E.dtype,R=E.shape.slice(),B=F.getParameter(F.MAX_TEXTURE_SIZE);if(R[0]<0||R[0]>B||R[1]<0||R[1]>B)throw new Error("gl-texture2d: Invalid texture size");var O=k(R,E.stride.slice()),V=0;I==="float32"?V=F.FLOAT:I==="float64"?(V=F.FLOAT,O=!1,I="float32"):I==="uint8"?V=F.UNSIGNED_BYTE:(V=F.UNSIGNED_BYTE,O=!1,I="uint8");var j=0;if(R.length===2)j=F.LUMINANCE,R=[R[0],R[1],1],E=s(E.data,R,[E.stride[0],E.stride[1],1],E.offset);else if(R.length===3)if(R[2]===1)j=F.ALPHA;else if(R[2]===2)j=F.LUMINANCE_ALPHA;else if(R[2]===3)j=F.RGB;else if(R[2]===4)j=F.RGBA;else throw new Error("gl-texture2d: Invalid shape for pixel coords");else throw new Error("gl-texture2d: Invalid shape for texture");V===F.FLOAT&&!F.getExtension("OES_texture_float")&&(V=F.UNSIGNED_BYTE,O=!1);var q,U,J=E.size;if(O)E.offset===0&&E.data.length===J?q=E.data:q=E.data.subarray(E.offset,E.offset+J);else{var ee=[R[2],R[2]*R[0],1];U=u.malloc(J,I);var ce=s(U,R,ee,0);(I==="float32"||I==="float64")&&V===F.UNSIGNED_BYTE?x(ce,E):l.assign(ce,E),q=U.subarray(0,J)}var ye=L(F);return F.texImage2D(F.TEXTURE_2D,0,j,R[0],R[1],0,j,V,q),O||u.free(U),new y(F,ye,R[0],R[1],j,V)}function m(F){if(arguments.length<=1)throw new Error("gl-texture2d: Missing arguments for texture2d constructor");if(c||g(F),typeof arguments[1]=="number")return w(F,arguments[1],arguments[2],arguments[3]||F.RGBA,arguments[4]||F.UNSIGNED_BYTE);if(Array.isArray(arguments[1]))return w(F,arguments[1][0]|0,arguments[1][1]|0,arguments[2]||F.RGBA,arguments[3]||F.UNSIGNED_BYTE);if(typeof arguments[1]=="object"){var E=arguments[1],I=p(E)?E:E.raw;if(I)return A(F,I,E.width|0,E.height|0,arguments[2]||F.RGBA,arguments[3]||F.UNSIGNED_BYTE);if(E.shape&&E.data&&E.stride)return T(F,E)}throw new Error("gl-texture2d: Invalid arguments for texture2d constructor")}}),1433:(function(a){"use strict";function i(o,s,l){s?s.bind():o.bindBuffer(o.ELEMENT_ARRAY_BUFFER,null);var u=o.getParameter(o.MAX_VERTEX_ATTRIBS)|0;if(l){if(l.length>u)throw new Error("gl-vao: Too many vertex attributes");for(var c=0;c1?0:Math.acos(x)}}),9226:(function(a){a.exports=i;function i(o,s){return o[0]=Math.ceil(s[0]),o[1]=Math.ceil(s[1]),o[2]=Math.ceil(s[2]),o}}),3126:(function(a){a.exports=i;function i(o){var s=new Float32Array(3);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s}}),3990:(function(a){a.exports=i;function i(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o}}),1091:(function(a){a.exports=i;function i(){var o=new Float32Array(3);return o[0]=0,o[1]=0,o[2]=0,o}}),5911:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2];return o[0]=c*p-f*g,o[1]=f*v-u*p,o[2]=u*g-c*v,o}}),5455:(function(a,i,o){a.exports=o(7056)}),7056:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return Math.sqrt(l*l+u*u+c*c)}}),4008:(function(a,i,o){a.exports=o(6690)}),6690:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o}}),244:(function(a){a.exports=i;function i(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]}}),2613:(function(a){a.exports=1e-6}),9922:(function(a,i,o){a.exports=l;var s=o(2613);function l(u,c){var f=u[0],v=u[1],g=u[2],p=c[0],x=c[1],_=c[2];return Math.abs(f-p)<=s*Math.max(1,Math.abs(f),Math.abs(p))&&Math.abs(v-x)<=s*Math.max(1,Math.abs(v),Math.abs(x))&&Math.abs(g-_)<=s*Math.max(1,Math.abs(g),Math.abs(_))}}),9265:(function(a){a.exports=i;function i(o,s){return o[0]===s[0]&&o[1]===s[1]&&o[2]===s[2]}}),2681:(function(a){a.exports=i;function i(o,s){return o[0]=Math.floor(s[0]),o[1]=Math.floor(s[1]),o[2]=Math.floor(s[2]),o}}),5137:(function(a,i,o){a.exports=l;var s=o(1091)();function l(u,c,f,v,g,p){var x,_;for(c||(c=3),f||(f=0),v?_=Math.min(v*c+f,u.length):_=u.length,x=f;x<_;x+=c)s[0]=u[x],s[1]=u[x+1],s[2]=u[x+2],g(s,s,p),u[x]=s[0],u[x+1]=s[1],u[x+2]=s[2];return u}}),2825:(function(a){a.exports=i;function i(o,s,l){var u=new Float32Array(3);return u[0]=o,u[1]=s,u[2]=l,u}}),2931:(function(a,i,o){a.exports={EPSILON:o(2613),create:o(1091),clone:o(3126),angle:o(8192),fromValues:o(2825),copy:o(3990),set:o(1463),equals:o(9922),exactEquals:o(9265),add:o(5632),subtract:o(6843),sub:o(2229),multiply:o(5847),mul:o(4505),divide:o(6690),div:o(4008),min:o(8107),max:o(7417),floor:o(2681),ceil:o(9226),round:o(2447),scale:o(6621),scaleAndAdd:o(8489),distance:o(7056),dist:o(5455),squaredDistance:o(2953),sqrDist:o(6141),length:o(1387),len:o(868),squaredLength:o(3066),sqrLen:o(5486),negate:o(5093),inverse:o(811),normalize:o(3536),dot:o(244),cross:o(5911),lerp:o(6658),random:o(7636),transformMat4:o(5673),transformMat3:o(492),transformQuat:o(264),rotateX:o(6894),rotateY:o(109),rotateZ:o(8692),forEach:o(5137)}}),811:(function(a){a.exports=i;function i(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o}}),868:(function(a,i,o){a.exports=o(1387)}),1387:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2];return Math.sqrt(s*s+l*l+u*u)}}),6658:(function(a){a.exports=i;function i(o,s,l,u){var c=s[0],f=s[1],v=s[2];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=v+u*(l[2]-v),o}}),7417:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o}}),8107:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o}}),4505:(function(a,i,o){a.exports=o(5847)}),5847:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o}}),5093:(function(a){a.exports=i;function i(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o}}),3536:(function(a){a.exports=i;function i(o,s){var l=s[0],u=s[1],c=s[2],f=l*l+u*u+c*c;return f>0&&(f=1/Math.sqrt(f),o[0]=s[0]*f,o[1]=s[1]*f,o[2]=s[2]*f),o}}),7636:(function(a){a.exports=i;function i(o,s){s=s||1;var l=Math.random()*2*Math.PI,u=Math.random()*2-1,c=Math.sqrt(1-u*u)*s;return o[0]=Math.cos(l)*c,o[1]=Math.sin(l)*c,o[2]=u*s,o}}),6894:(function(a){a.exports=i;function i(o,s,l,u){var c=l[1],f=l[2],v=s[1]-c,g=s[2]-f,p=Math.sin(u),x=Math.cos(u);return o[0]=s[0],o[1]=c+v*x-g*p,o[2]=f+v*p+g*x,o}}),109:(function(a){a.exports=i;function i(o,s,l,u){var c=l[0],f=l[2],v=s[0]-c,g=s[2]-f,p=Math.sin(u),x=Math.cos(u);return o[0]=c+g*p+v*x,o[1]=s[1],o[2]=f+g*x-v*p,o}}),8692:(function(a){a.exports=i;function i(o,s,l,u){var c=l[0],f=l[1],v=s[0]-c,g=s[1]-f,p=Math.sin(u),x=Math.cos(u);return o[0]=c+v*x-g*p,o[1]=f+v*p+g*x,o[2]=s[2],o}}),2447:(function(a){a.exports=i;function i(o,s){return o[0]=Math.round(s[0]),o[1]=Math.round(s[1]),o[2]=Math.round(s[2]),o}}),6621:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o}}),8489:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o}}),1463:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s,o[1]=l,o[2]=u,o}}),6141:(function(a,i,o){a.exports=o(2953)}),5486:(function(a,i,o){a.exports=o(3066)}),2953:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2];return l*l+u*u+c*c}}),3066:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2];return s*s+l*l+u*u}}),2229:(function(a,i,o){a.exports=o(6843)}),6843:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o}}),492:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2];return o[0]=u*l[0]+c*l[3]+f*l[6],o[1]=u*l[1]+c*l[4]+f*l[7],o[2]=u*l[2]+c*l[5]+f*l[8],o}}),5673:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[3]*u+l[7]*c+l[11]*f+l[15];return v=v||1,o[0]=(l[0]*u+l[4]*c+l[8]*f+l[12])/v,o[1]=(l[1]*u+l[5]*c+l[9]*f+l[13])/v,o[2]=(l[2]*u+l[6]*c+l[10]*f+l[14])/v,o}}),264:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2],x=l[3],_=x*u+g*f-p*c,y=x*c+p*u-v*f,C=x*f+v*c-g*u,k=-v*u-g*c-p*f;return o[0]=_*x+k*-v+y*-p-C*-g,o[1]=y*x+k*-g+C*-v-_*-p,o[2]=C*x+k*-p+_*-g-y*-v,o}}),4361:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]+l[0],o[1]=s[1]+l[1],o[2]=s[2]+l[2],o[3]=s[3]+l[3],o}}),2335:(function(a){a.exports=i;function i(o){var s=new Float32Array(4);return s[0]=o[0],s[1]=o[1],s[2]=o[2],s[3]=o[3],s}}),2933:(function(a){a.exports=i;function i(o,s){return o[0]=s[0],o[1]=s[1],o[2]=s[2],o[3]=s[3],o}}),7536:(function(a){a.exports=i;function i(){var o=new Float32Array(4);return o[0]=0,o[1]=0,o[2]=0,o[3]=0,o}}),4691:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return Math.sqrt(l*l+u*u+c*c+f*f)}}),1373:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]/l[0],o[1]=s[1]/l[1],o[2]=s[2]/l[2],o[3]=s[3]/l[3],o}}),3750:(function(a){a.exports=i;function i(o,s){return o[0]*s[0]+o[1]*s[1]+o[2]*s[2]+o[3]*s[3]}}),3390:(function(a){a.exports=i;function i(o,s,l,u){var c=new Float32Array(4);return c[0]=o,c[1]=s,c[2]=l,c[3]=u,c}}),9970:(function(a,i,o){a.exports={create:o(7536),clone:o(2335),fromValues:o(3390),copy:o(2933),set:o(4578),add:o(4361),subtract:o(6860),multiply:o(3576),divide:o(1373),min:o(2334),max:o(160),scale:o(9288),scaleAndAdd:o(4844),distance:o(4691),squaredDistance:o(7960),length:o(6808),squaredLength:o(483),negate:o(1498),inverse:o(4494),normalize:o(5177),dot:o(3750),lerp:o(2573),random:o(9131),transformMat4:o(5352),transformQuat:o(4041)}}),4494:(function(a){a.exports=i;function i(o,s){return o[0]=1/s[0],o[1]=1/s[1],o[2]=1/s[2],o[3]=1/s[3],o}}),6808:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2],c=o[3];return Math.sqrt(s*s+l*l+u*u+c*c)}}),2573:(function(a){a.exports=i;function i(o,s,l,u){var c=s[0],f=s[1],v=s[2],g=s[3];return o[0]=c+u*(l[0]-c),o[1]=f+u*(l[1]-f),o[2]=v+u*(l[2]-v),o[3]=g+u*(l[3]-g),o}}),160:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.max(s[0],l[0]),o[1]=Math.max(s[1],l[1]),o[2]=Math.max(s[2],l[2]),o[3]=Math.max(s[3],l[3]),o}}),2334:(function(a){a.exports=i;function i(o,s,l){return o[0]=Math.min(s[0],l[0]),o[1]=Math.min(s[1],l[1]),o[2]=Math.min(s[2],l[2]),o[3]=Math.min(s[3],l[3]),o}}),3576:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l[0],o[1]=s[1]*l[1],o[2]=s[2]*l[2],o[3]=s[3]*l[3],o}}),1498:(function(a){a.exports=i;function i(o,s){return o[0]=-s[0],o[1]=-s[1],o[2]=-s[2],o[3]=-s[3],o}}),5177:(function(a){a.exports=i;function i(o,s){var l=s[0],u=s[1],c=s[2],f=s[3],v=l*l+u*u+c*c+f*f;return v>0&&(v=1/Math.sqrt(v),o[0]=l*v,o[1]=u*v,o[2]=c*v,o[3]=f*v),o}}),9131:(function(a,i,o){var s=o(5177),l=o(9288);a.exports=u;function u(c,f){return f=f||1,c[0]=Math.random(),c[1]=Math.random(),c[2]=Math.random(),c[3]=Math.random(),s(c,c),l(c,c,f),c}}),9288:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]*l,o[1]=s[1]*l,o[2]=s[2]*l,o[3]=s[3]*l,o}}),4844:(function(a){a.exports=i;function i(o,s,l,u){return o[0]=s[0]+l[0]*u,o[1]=s[1]+l[1]*u,o[2]=s[2]+l[2]*u,o[3]=s[3]+l[3]*u,o}}),4578:(function(a){a.exports=i;function i(o,s,l,u,c){return o[0]=s,o[1]=l,o[2]=u,o[3]=c,o}}),7960:(function(a){a.exports=i;function i(o,s){var l=s[0]-o[0],u=s[1]-o[1],c=s[2]-o[2],f=s[3]-o[3];return l*l+u*u+c*c+f*f}}),483:(function(a){a.exports=i;function i(o){var s=o[0],l=o[1],u=o[2],c=o[3];return s*s+l*l+u*u+c*c}}),6860:(function(a){a.exports=i;function i(o,s,l){return o[0]=s[0]-l[0],o[1]=s[1]-l[1],o[2]=s[2]-l[2],o[3]=s[3]-l[3],o}}),5352:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=s[3];return o[0]=l[0]*u+l[4]*c+l[8]*f+l[12]*v,o[1]=l[1]*u+l[5]*c+l[9]*f+l[13]*v,o[2]=l[2]*u+l[6]*c+l[10]*f+l[14]*v,o[3]=l[3]*u+l[7]*c+l[11]*f+l[15]*v,o}}),4041:(function(a){a.exports=i;function i(o,s,l){var u=s[0],c=s[1],f=s[2],v=l[0],g=l[1],p=l[2],x=l[3],_=x*u+g*f-p*c,y=x*c+p*u-v*f,C=x*f+v*c-g*u,k=-v*u-g*c-p*f;return o[0]=_*x+k*-v+y*-p-C*-g,o[1]=y*x+k*-g+C*-v-_*-p,o[2]=C*x+k*-p+_*-g-y*-v,o[3]=s[3],o}}),1848:(function(a,i,o){var s=o(4905),l=o(6468);a.exports=u;function u(c){for(var f=Array.isArray(c)?c:s(c),v=0;v0)continue;ot=Te.slice(0,1).join("")}return me(ot),xe+=ot.length,q=q.slice(ot.length),q.length}while(!0)}function qe(){return/[^a-fA-F0-9]/.test(V)?(me(q.join("")),O=v,R):(q.push(V),j=V,R+1)}function we(){return V==="."||/[eE]/.test(V)?(q.push(V),O=k,j=V,R+1):V==="x"&&q.length===1&&q[0]==="0"?(O=m,q.push(V),j=V,R+1):/[^\d]/.test(V)?(me(q.join("")),O=v,R):(q.push(V),j=V,R+1)}function Le(){return V==="f"&&(q.push(V),j=V,R+=1),/[eE]/.test(V)||(V==="-"||V==="+")&&/[eE]/.test(j)?(q.push(V),j=V,R+1):/[^\d]/.test(V)?(me(q.join("")),O=v,R):(q.push(V),j=V,R+1)}function Ke(){if(/[^\d\w_]/.test(V)){var Te=q.join("");return le[Te]?O=w:ie[Te]?O=L:O=S,me(q.join("")),O=v,R}return q.push(V),j=V,R+1}}}),3508:(function(a,i,o){var s=o(6852);s=s.slice().filter(function(l){return!/^(gl\_|texture)/.test(l)}),a.exports=s.concat(["gl_VertexID","gl_InstanceID","gl_Position","gl_PointSize","gl_FragCoord","gl_FrontFacing","gl_FragDepth","gl_PointCoord","gl_MaxVertexAttribs","gl_MaxVertexUniformVectors","gl_MaxVertexOutputVectors","gl_MaxFragmentInputVectors","gl_MaxVertexTextureImageUnits","gl_MaxCombinedTextureImageUnits","gl_MaxTextureImageUnits","gl_MaxFragmentUniformVectors","gl_MaxDrawBuffers","gl_MinProgramTexelOffset","gl_MaxProgramTexelOffset","gl_DepthRangeParameters","gl_DepthRange","trunc","round","roundEven","isnan","isinf","floatBitsToInt","floatBitsToUint","intBitsToFloat","uintBitsToFloat","packSnorm2x16","unpackSnorm2x16","packUnorm2x16","unpackUnorm2x16","packHalf2x16","unpackHalf2x16","outerProduct","transpose","determinant","inverse","texture","textureSize","textureProj","textureLod","textureOffset","texelFetch","texelFetchOffset","textureProjOffset","textureLodOffset","textureProjLod","textureProjLodOffset","textureGrad","textureGradOffset","textureProjGrad","textureProjGradOffset"])}),6852:(function(a){a.exports=["abs","acos","all","any","asin","atan","ceil","clamp","cos","cross","dFdx","dFdy","degrees","distance","dot","equal","exp","exp2","faceforward","floor","fract","gl_BackColor","gl_BackLightModelProduct","gl_BackLightProduct","gl_BackMaterial","gl_BackSecondaryColor","gl_ClipPlane","gl_ClipVertex","gl_Color","gl_DepthRange","gl_DepthRangeParameters","gl_EyePlaneQ","gl_EyePlaneR","gl_EyePlaneS","gl_EyePlaneT","gl_Fog","gl_FogCoord","gl_FogFragCoord","gl_FogParameters","gl_FragColor","gl_FragCoord","gl_FragData","gl_FragDepth","gl_FragDepthEXT","gl_FrontColor","gl_FrontFacing","gl_FrontLightModelProduct","gl_FrontLightProduct","gl_FrontMaterial","gl_FrontSecondaryColor","gl_LightModel","gl_LightModelParameters","gl_LightModelProducts","gl_LightProducts","gl_LightSource","gl_LightSourceParameters","gl_MaterialParameters","gl_MaxClipPlanes","gl_MaxCombinedTextureImageUnits","gl_MaxDrawBuffers","gl_MaxFragmentUniformComponents","gl_MaxLights","gl_MaxTextureCoords","gl_MaxTextureImageUnits","gl_MaxTextureUnits","gl_MaxVaryingFloats","gl_MaxVertexAttribs","gl_MaxVertexTextureImageUnits","gl_MaxVertexUniformComponents","gl_ModelViewMatrix","gl_ModelViewMatrixInverse","gl_ModelViewMatrixInverseTranspose","gl_ModelViewMatrixTranspose","gl_ModelViewProjectionMatrix","gl_ModelViewProjectionMatrixInverse","gl_ModelViewProjectionMatrixInverseTranspose","gl_ModelViewProjectionMatrixTranspose","gl_MultiTexCoord0","gl_MultiTexCoord1","gl_MultiTexCoord2","gl_MultiTexCoord3","gl_MultiTexCoord4","gl_MultiTexCoord5","gl_MultiTexCoord6","gl_MultiTexCoord7","gl_Normal","gl_NormalMatrix","gl_NormalScale","gl_ObjectPlaneQ","gl_ObjectPlaneR","gl_ObjectPlaneS","gl_ObjectPlaneT","gl_Point","gl_PointCoord","gl_PointParameters","gl_PointSize","gl_Position","gl_ProjectionMatrix","gl_ProjectionMatrixInverse","gl_ProjectionMatrixInverseTranspose","gl_ProjectionMatrixTranspose","gl_SecondaryColor","gl_TexCoord","gl_TextureEnvColor","gl_TextureMatrix","gl_TextureMatrixInverse","gl_TextureMatrixInverseTranspose","gl_TextureMatrixTranspose","gl_Vertex","greaterThan","greaterThanEqual","inversesqrt","length","lessThan","lessThanEqual","log","log2","matrixCompMult","max","min","mix","mod","normalize","not","notEqual","pow","radians","reflect","refract","sign","sin","smoothstep","sqrt","step","tan","texture2D","texture2DLod","texture2DProj","texture2DProjLod","textureCube","textureCubeLod","texture2DLodEXT","texture2DProjLodEXT","textureCubeLodEXT","texture2DGradEXT","texture2DProjGradEXT","textureCubeGradEXT"]}),7932:(function(a,i,o){var s=o(620);a.exports=s.slice().concat(["layout","centroid","smooth","case","mat2x2","mat2x3","mat2x4","mat3x2","mat3x3","mat3x4","mat4x2","mat4x3","mat4x4","uvec2","uvec3","uvec4","samplerCubeShadow","sampler2DArray","sampler2DArrayShadow","isampler2D","isampler3D","isamplerCube","isampler2DArray","usampler2D","usampler3D","usamplerCube","usampler2DArray","coherent","restrict","readonly","writeonly","resource","atomic_uint","noperspective","patch","sample","subroutine","common","partition","active","filter","image1D","image2D","image3D","imageCube","iimage1D","iimage2D","iimage3D","iimageCube","uimage1D","uimage2D","uimage3D","uimageCube","image1DArray","image2DArray","iimage1DArray","iimage2DArray","uimage1DArray","uimage2DArray","image1DShadow","image2DShadow","image1DArrayShadow","image2DArrayShadow","imageBuffer","iimageBuffer","uimageBuffer","sampler1DArray","sampler1DArrayShadow","isampler1D","isampler1DArray","usampler1D","usampler1DArray","isampler2DRect","usampler2DRect","samplerBuffer","isamplerBuffer","usamplerBuffer","sampler2DMS","isampler2DMS","usampler2DMS","sampler2DMSArray","isampler2DMSArray","usampler2DMSArray"])}),620:(function(a){a.exports=["precision","highp","mediump","lowp","attribute","const","uniform","varying","break","continue","do","for","while","if","else","in","out","inout","float","int","uint","void","bool","true","false","discard","return","mat2","mat3","mat4","vec2","vec3","vec4","ivec2","ivec3","ivec4","bvec2","bvec3","bvec4","sampler1D","sampler2D","sampler3D","samplerCube","sampler1DShadow","sampler2DShadow","struct","asm","class","union","enum","typedef","template","this","packed","goto","switch","default","inline","noinline","volatile","public","static","extern","external","interface","long","short","double","half","fixed","unsigned","input","output","hvec2","hvec3","hvec4","dvec2","dvec3","dvec4","fvec2","fvec3","fvec4","sampler2DRect","sampler3DRect","sampler2DRectShadow","sizeof","cast","namespace","using"]}),7827:(function(a){a.exports=["<<=",">>=","++","--","<<",">>","<=",">=","==","!=","&&","||","+=","-=","*=","/=","%=","&=","^^","^=","|=","(",")","[","]",".","!","~","*","/","%","+","-","<",">","&","^","|","?",":","=",",",";","{","}"]}),4905:(function(a,i,o){var s=o(5874);a.exports=l;function l(u,c){var f=s(c),v=[];return v=v.concat(f(u)),v=v.concat(f(null)),v}}),3236:(function(a){a.exports=function(i){typeof i=="string"&&(i=[i]);for(var o=[].slice.call(arguments,1),s=[],l=0;l>1,_=-7,y=l?c-1:0,C=l?-1:1,k=o[s+y];for(y+=C,f=k&(1<<-_)-1,k>>=-_,_+=g;_>0;f=f*256+o[s+y],y+=C,_-=8);for(v=f&(1<<-_)-1,f>>=-_,_+=u;_>0;v=v*256+o[s+y],y+=C,_-=8);if(f===0)f=1-x;else{if(f===p)return v?NaN:(k?-1:1)*(1/0);v=v+Math.pow(2,u),f=f-x}return(k?-1:1)*v*Math.pow(2,f-u)},i.write=function(o,s,l,u,c,f){var v,g,p,x=f*8-c-1,_=(1<>1,C=c===23?Math.pow(2,-24)-Math.pow(2,-77):0,k=u?0:f-1,S=u?1:-1,L=s<0||s===0&&1/s<0?1:0;for(s=Math.abs(s),isNaN(s)||s===1/0?(g=isNaN(s)?1:0,v=_):(v=Math.floor(Math.log(s)/Math.LN2),s*(p=Math.pow(2,-v))<1&&(v--,p*=2),v+y>=1?s+=C/p:s+=C*Math.pow(2,1-y),s*p>=2&&(v++,p/=2),v+y>=_?(g=0,v=_):v+y>=1?(g=(s*p-1)*Math.pow(2,c),v=v+y):(g=s*Math.pow(2,y-1)*Math.pow(2,c),v=0));c>=8;o[l+k]=g&255,k+=S,g/=256,c-=8);for(v=v<0;o[l+k]=v&255,k+=S,v/=256,x-=8);o[l+k-S]|=L*128}}),8954:(function(a,i,o){"use strict";a.exports=y;var s=o(3250),l=o(6803).Fw;function u(C,k,S){this.vertices=C,this.adjacent=k,this.boundary=S,this.lastVisited=-1}u.prototype.flip=function(){var C=this.vertices[0];this.vertices[0]=this.vertices[1],this.vertices[1]=C;var k=this.adjacent[0];this.adjacent[0]=this.adjacent[1],this.adjacent[1]=k};function c(C,k,S){this.vertices=C,this.cell=k,this.index=S}function f(C,k){return l(C.vertices,k.vertices)}function v(C){return function(){var k=this.tuple;return C.apply(this,k)}}function g(C){var k=s[C+1];return k||(k=s),v(k)}var p=[];function x(C,k,S){this.dimension=C,this.vertices=k,this.simplices=S,this.interior=S.filter(function(A){return!A.boundary}),this.tuple=new Array(C+1);for(var L=0;L<=C;++L)this.tuple[L]=this.vertices[L];var w=p[C];w||(w=p[C]=g(C)),this.orient=w}var _=x.prototype;_.handleBoundaryDegeneracy=function(C,k){var S=this.dimension,L=this.vertices.length-1,w=this.tuple,A=this.vertices,T=[C];for(C.lastVisited=-L;T.length>0;){C=T.pop();for(var m=C.adjacent,F=0;F<=S;++F){var E=m[F];if(!(!E.boundary||E.lastVisited<=-L)){for(var I=E.vertices,R=0;R<=S;++R){var B=I[R];B<0?w[R]=k:w[R]=A[B]}var O=this.orient();if(O>0)return E;E.lastVisited=-L,O===0&&T.push(E)}}}return null},_.walk=function(C,k){var S=this.vertices.length-1,L=this.dimension,w=this.vertices,A=this.tuple,T=k?this.interior.length*Math.random()|0:this.interior.length-1,m=this.interior[T];e:for(;!m.boundary;){for(var F=m.vertices,E=m.adjacent,I=0;I<=L;++I)A[I]=w[F[I]];m.lastVisited=S;for(var I=0;I<=L;++I){var R=E[I];if(!(R.lastVisited>=S)){var B=A[I];A[I]=C;var O=this.orient();if(A[I]=B,O<0){m=R;continue e}else R.boundary?R.lastVisited=-S:R.lastVisited=S}}return}return m},_.addPeaks=function(C,k){var S=this.vertices.length-1,L=this.dimension,w=this.vertices,A=this.tuple,T=this.interior,m=this.simplices,F=[k];k.lastVisited=S,k.vertices[k.vertices.indexOf(-1)]=S,k.boundary=!1,T.push(k);for(var E=[];F.length>0;){var k=F.pop(),I=k.vertices,R=k.adjacent,B=I.indexOf(S);if(!(B<0)){for(var O=0;O<=L;++O)if(O!==B){var V=R[O];if(!(!V.boundary||V.lastVisited>=S)){var j=V.vertices;if(V.lastVisited!==-S){for(var q=0,U=0;U<=L;++U)j[U]<0?(q=U,A[U]=C):A[U]=w[j[U]];var J=this.orient();if(J>0){j[q]=S,V.boundary=!1,T.push(V),F.push(V),V.lastVisited=S;continue}else V.lastVisited=-S}var ee=V.adjacent,ce=I.slice(),ye=R.slice(),xe=new u(ce,ye,!0);m.push(xe);var ue=ee.indexOf(k);if(!(ue<0)){ee[ue]=xe,ye[B]=V,ce[O]=-1,ye[O]=k,R[O]=xe,xe.flip();for(var U=0;U<=L;++U){var K=ce[U];if(!(K<0||K===S)){for(var _e=new Array(L-1),ne=0,ae=0;ae<=L;++ae){var pe=ce[ae];pe<0||ae===U||(_e[ne++]=pe)}E.push(new c(_e,xe,U))}}}}}}}E.sort(f);for(var O=0;O+1=0?T[F++]=m[I]:E=I&1;if(E===(C&1)){var R=T[0];T[0]=T[1],T[1]=R}k.push(T)}}return k};function y(C,k){var S=C.length;if(S===0)throw new Error("Must have at least d+1 points");var L=C[0].length;if(S<=L)throw new Error("Must input at least d+1 points");var w=C.slice(0,L+1),A=s.apply(void 0,w);if(A===0)throw new Error("Input not in general position");for(var T=new Array(L+1),m=0;m<=L;++m)T[m]=m;A<0&&(T[0]=1,T[1]=0);for(var F=new u(T,new Array(L+1),!1),E=F.adjacent,I=new Array(L+2),m=0;m<=L;++m){for(var R=T.slice(),B=0;B<=L;++B)B===m&&(R[B]=-1);var O=R[0];R[0]=R[1],R[1]=O;var V=new u(R,new Array(L+1),!0);E[m]=V,I[m]=V}I[L+1]=F;for(var m=0;m<=L;++m)for(var R=E[m].vertices,j=E[m].adjacent,B=0;B<=L;++B){var q=R[B];if(q<0){j[B]=F;continue}for(var U=0;U<=L;++U)E[U].vertices.indexOf(q)<0&&(j[B]=E[U])}for(var J=new x(L,w,I),ee=!!k,m=L+1;m3*(I+1)?x(this,E):this.left.insert(E):this.left=A([E]);else if(E[0]>this.mid)this.right?4*(this.right.count+1)>3*(I+1)?x(this,E):this.right.insert(E):this.right=A([E]);else{var R=s.ge(this.leftPoints,E,L),B=s.ge(this.rightPoints,E,w);this.leftPoints.splice(R,0,E),this.rightPoints.splice(B,0,E)}},v.remove=function(E){var I=this.count-this.leftPoints;if(E[1]3*(I-1))return _(this,E);var B=this.left.remove(E);return B===c?(this.left=null,this.count-=1,u):(B===u&&(this.count-=1),B)}else if(E[0]>this.mid){if(!this.right)return l;var O=this.left?this.left.count:0;if(4*O>3*(I-1))return _(this,E);var B=this.right.remove(E);return B===c?(this.right=null,this.count-=1,u):(B===u&&(this.count-=1),B)}else{if(this.count===1)return this.leftPoints[0]===E?c:l;if(this.leftPoints.length===1&&this.leftPoints[0]===E){if(this.left&&this.right){for(var V=this,j=this.left;j.right;)V=j,j=j.right;if(V===this)j.right=this.right;else{var q=this.left,B=this.right;V.count-=j.count,V.right=j.left,j.left=q,j.right=B}g(this,j),this.count=(this.left?this.left.count:0)+(this.right?this.right.count:0)+this.leftPoints.length}else this.left?g(this,this.left):g(this,this.right);return u}for(var q=s.ge(this.leftPoints,E,L);q=0&&E[B][1]>=I;--B){var O=R(E[B]);if(O)return O}}function k(E,I){for(var R=0;Rthis.mid){if(this.right){var R=this.right.queryPoint(E,I);if(R)return R}return C(this.rightPoints,E,I)}else return k(this.leftPoints,I)},v.queryInterval=function(E,I,R){if(Ethis.mid&&this.right){var B=this.right.queryInterval(E,I,R);if(B)return B}return Ithis.mid?C(this.rightPoints,E,R):k(this.leftPoints,R)};function S(E,I){return E-I}function L(E,I){var R=E[0]-I[0];return R||E[1]-I[1]}function w(E,I){var R=E[1]-I[1];return R||E[0]-I[0]}function A(E){if(E.length===0)return null;for(var I=[],R=0;R>1],O=[],V=[],j=[],R=0;R13)&&s!==32&&s!==133&&s!==160&&s!==5760&&s!==6158&&(s<8192||s>8205)&&s!==8232&&s!==8233&&s!==8239&&s!==8287&&s!==8288&&s!==12288&&s!==65279)return!1;return!0}}),395:(function(a){function i(o,s,l){return o*(1-l)+s*l}a.exports=i}),2652:(function(a,i,o){var s=o(4335),l=o(6864),u=o(1903),c=o(9921),f=o(7608),v=o(5665),g={length:o(1387),normalize:o(3536),dot:o(244),cross:o(5911)},p=l(),x=l(),_=[0,0,0,0],y=[[0,0,0],[0,0,0],[0,0,0]],C=[0,0,0];a.exports=function(A,T,m,F,E,I){if(T||(T=[0,0,0]),m||(m=[0,0,0]),F||(F=[0,0,0]),E||(E=[0,0,0,1]),I||(I=[0,0,0,1]),!s(p,A)||(u(x,p),x[3]=0,x[7]=0,x[11]=0,x[15]=1,Math.abs(c(x)<1e-8)))return!1;var R=p[3],B=p[7],O=p[11],V=p[12],j=p[13],q=p[14],U=p[15];if(R!==0||B!==0||O!==0){_[0]=R,_[1]=B,_[2]=O,_[3]=U;var J=f(x,x);if(!J)return!1;v(x,x),k(E,_,x)}else E[0]=E[1]=E[2]=0,E[3]=1;if(T[0]=V,T[1]=j,T[2]=q,S(y,p),m[0]=g.length(y[0]),g.normalize(y[0],y[0]),F[0]=g.dot(y[0],y[1]),L(y[1],y[1],y[0],1,-F[0]),m[1]=g.length(y[1]),g.normalize(y[1],y[1]),F[0]/=m[1],F[1]=g.dot(y[0],y[2]),L(y[2],y[2],y[0],1,-F[1]),F[2]=g.dot(y[1],y[2]),L(y[2],y[2],y[1],1,-F[2]),m[2]=g.length(y[2]),g.normalize(y[2],y[2]),F[1]/=m[2],F[2]/=m[2],g.cross(C,y[1],y[2]),g.dot(y[0],C)<0)for(var ee=0;ee<3;ee++)m[ee]*=-1,y[ee][0]*=-1,y[ee][1]*=-1,y[ee][2]*=-1;return I[0]=.5*Math.sqrt(Math.max(1+y[0][0]-y[1][1]-y[2][2],0)),I[1]=.5*Math.sqrt(Math.max(1-y[0][0]+y[1][1]-y[2][2],0)),I[2]=.5*Math.sqrt(Math.max(1-y[0][0]-y[1][1]+y[2][2],0)),I[3]=.5*Math.sqrt(Math.max(1+y[0][0]+y[1][1]+y[2][2],0)),y[2][1]>y[1][2]&&(I[0]=-I[0]),y[0][2]>y[2][0]&&(I[1]=-I[1]),y[1][0]>y[0][1]&&(I[2]=-I[2]),!0};function k(w,A,T){var m=A[0],F=A[1],E=A[2],I=A[3];return w[0]=T[0]*m+T[4]*F+T[8]*E+T[12]*I,w[1]=T[1]*m+T[5]*F+T[9]*E+T[13]*I,w[2]=T[2]*m+T[6]*F+T[10]*E+T[14]*I,w[3]=T[3]*m+T[7]*F+T[11]*E+T[15]*I,w}function S(w,A){w[0][0]=A[0],w[0][1]=A[1],w[0][2]=A[2],w[1][0]=A[4],w[1][1]=A[5],w[1][2]=A[6],w[2][0]=A[8],w[2][1]=A[9],w[2][2]=A[10]}function L(w,A,T,m,F){w[0]=A[0]*m+T[0]*F,w[1]=A[1]*m+T[1]*F,w[2]=A[2]*m+T[2]*F}}),4335:(function(a){a.exports=function(o,s){var l=s[15];if(l===0)return!1;for(var u=1/l,c=0;c<16;c++)o[c]=s[c]*u;return!0}}),7442:(function(a,i,o){var s=o(6658),l=o(7182),u=o(2652),c=o(9921),f=o(8648),v=_(),g=_(),p=_();a.exports=x;function x(k,S,L,w){if(c(S)===0||c(L)===0)return!1;var A=u(S,v.translate,v.scale,v.skew,v.perspective,v.quaternion),T=u(L,g.translate,g.scale,g.skew,g.perspective,g.quaternion);return!A||!T?!1:(s(p.translate,v.translate,g.translate,w),s(p.skew,v.skew,g.skew,w),s(p.scale,v.scale,g.scale,w),s(p.perspective,v.perspective,g.perspective,w),f(p.quaternion,v.quaternion,g.quaternion,w),l(k,p.translate,p.scale,p.skew,p.perspective,p.quaternion),!0)}function _(){return{translate:y(),scale:y(1),skew:y(),perspective:C(),quaternion:C()}}function y(k){return[k||0,k||0,k||0]}function C(){return[0,0,0,1]}}),7182:(function(a,i,o){var s={identity:o(7894),translate:o(7656),multiply:o(6760),create:o(6864),scale:o(2504),fromRotationTranslation:o(6743)},l=s.create(),u=s.create();a.exports=function(f,v,g,p,x,_){return s.identity(f),s.fromRotationTranslation(f,_,v),f[3]=x[0],f[7]=x[1],f[11]=x[2],f[15]=x[3],s.identity(u),p[2]!==0&&(u[9]=p[2],s.multiply(f,f,u)),p[1]!==0&&(u[9]=0,u[8]=p[1],s.multiply(f,f,u)),p[0]!==0&&(u[8]=0,u[4]=p[0],s.multiply(f,f,u)),s.scale(f,f,g),f}}),1811:(function(a,i,o){"use strict";var s=o(2478),l=o(7442),u=o(7608),c=o(5567),f=o(2408),v=o(7089),g=o(6582),p=o(7656),x=o(2504),_=o(3536),y=[0,0,0];a.exports=L;function C(w){this._components=w.slice(),this._time=[0],this.prevMatrix=w.slice(),this.nextMatrix=w.slice(),this.computedMatrix=w.slice(),this.computedInverse=w.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 k=C.prototype;k.recalcMatrix=function(w){var A=this._time,T=s.le(A,w),m=this.computedMatrix;if(!(T<0)){var F=this._components;if(T===A.length-1)for(var E=16*T,I=0;I<16;++I)m[I]=F[E++];else{for(var R=A[T+1]-A[T],E=16*T,B=this.prevMatrix,O=!0,I=0;I<16;++I)B[I]=F[E++];for(var V=this.nextMatrix,I=0;I<16;++I)V[I]=F[E++],O=O&&B[I]===V[I];if(R<1e-6||O)for(var I=0;I<16;++I)m[I]=B[I];else l(m,B,V,(w-A[T])/R)}var j=this.computedUp;j[0]=m[1],j[1]=m[5],j[2]=m[9],_(j,j);var q=this.computedInverse;u(q,m);var U=this.computedEye,J=q[15];U[0]=q[12]/J,U[1]=q[13]/J,U[2]=q[14]/J;for(var ee=this.computedCenter,ce=Math.exp(this.computedRadius[0]),I=0;I<3;++I)ee[I]=U[I]-m[2+4*I]*ce}},k.idle=function(w){if(!(w1&&s(u[g[y-2]],u[g[y-1]],_)<=0;)y-=1,g.pop();for(g.push(x),y=p.length;y>1&&s(u[p[y-2]],u[p[y-1]],_)>=0;)y-=1,p.pop();p.push(x)}for(var C=new Array(p.length+g.length-2),k=0,f=0,S=g.length;f0;--L)C[k++]=p[L];return C}}),351:(function(a,i,o){"use strict";a.exports=l;var s=o(4687);function l(u,c){c||(c=u,u=window);var f=0,v=0,g=0,p={shift:!1,alt:!1,control:!1,meta:!1},x=!1;function _(E){var I=!1;return"altKey"in E&&(I=I||E.altKey!==p.alt,p.alt=!!E.altKey),"shiftKey"in E&&(I=I||E.shiftKey!==p.shift,p.shift=!!E.shiftKey),"ctrlKey"in E&&(I=I||E.ctrlKey!==p.control,p.control=!!E.ctrlKey),"metaKey"in E&&(I=I||E.metaKey!==p.meta,p.meta=!!E.metaKey),I}function y(E,I){var R=s.x(I),B=s.y(I);"buttons"in I&&(E=I.buttons|0),(E!==f||R!==v||B!==g||_(I))&&(f=E|0,v=R||0,g=B||0,c&&c(f,v,g,p))}function C(E){y(0,E)}function k(){(f||v||g||p.shift||p.alt||p.meta||p.control)&&(v=g=0,f=0,p.shift=p.alt=p.control=p.meta=!1,c&&c(0,0,0,p))}function S(E){_(E)&&c&&c(f,v,g,p)}function L(E){s.buttons(E)===0?y(0,E):y(f,E)}function w(E){y(f|s.buttons(E),E)}function A(E){y(f&~s.buttons(E),E)}function T(){x||(x=!0,u.addEventListener("mousemove",L),u.addEventListener("mousedown",w),u.addEventListener("mouseup",A),u.addEventListener("mouseleave",C),u.addEventListener("mouseenter",C),u.addEventListener("mouseout",C),u.addEventListener("mouseover",C),u.addEventListener("blur",k),u.addEventListener("keyup",S),u.addEventListener("keydown",S),u.addEventListener("keypress",S),u!==window&&(window.addEventListener("blur",k),window.addEventListener("keyup",S),window.addEventListener("keydown",S),window.addEventListener("keypress",S)))}function m(){x&&(x=!1,u.removeEventListener("mousemove",L),u.removeEventListener("mousedown",w),u.removeEventListener("mouseup",A),u.removeEventListener("mouseleave",C),u.removeEventListener("mouseenter",C),u.removeEventListener("mouseout",C),u.removeEventListener("mouseover",C),u.removeEventListener("blur",k),u.removeEventListener("keyup",S),u.removeEventListener("keydown",S),u.removeEventListener("keypress",S),u!==window&&(window.removeEventListener("blur",k),window.removeEventListener("keyup",S),window.removeEventListener("keydown",S),window.removeEventListener("keypress",S)))}T();var F={element:u};return Object.defineProperties(F,{enabled:{get:function(){return x},set:function(E){E?T():m()},enumerable:!0},buttons:{get:function(){return f},enumerable:!0},x:{get:function(){return v},enumerable:!0},y:{get:function(){return g},enumerable:!0},mods:{get:function(){return p},enumerable:!0}}),F}}),24:(function(a){var i={left:0,top:0};a.exports=o;function o(l,u,c){u=u||l.currentTarget||l.srcElement,Array.isArray(c)||(c=[0,0]);var f=l.clientX||0,v=l.clientY||0,g=s(u);return c[0]=f-g.left,c[1]=v-g.top,c}function s(l){return l===window||l===document||l===document.body?i:l.getBoundingClientRect()}}),4687:(function(a,i){"use strict";function o(c){if(typeof c=="object"){if("buttons"in c)return c.buttons;if("which"in c){var f=c.which;if(f===2)return 4;if(f===3)return 2;if(f>0)return 1<=0)return 1<0){if(ye=1,K[ne++]=p(T[I],k,S,L),I+=J,w>0)for(ce=1,R=T[I],ae=K[ne]=p(R,k,S,L),le=K[ne+pe],De=K[ne+me],it=K[ne+Ge],(ae!==le||ae!==De||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,le,De,it,k,S,L),Oe=_e[ne]=xe++),ne+=1,I+=J,ce=2;ce0)for(ce=1,R=T[I],ae=K[ne]=p(R,k,S,L),le=K[ne+pe],De=K[ne+me],it=K[ne+Ge],(ae!==le||ae!==De||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,le,De,it,k,S,L),Oe=_e[ne]=xe++,it!==De&&g(_e[ne+me],Oe,j,U,De,it,k,S,L)),ne+=1,I+=J,ce=2;ce0){if(ce=1,K[ne++]=p(T[I],k,S,L),I+=J,A>0)for(ye=1,R=T[I],ae=K[ne]=p(R,k,S,L),De=K[ne+me],le=K[ne+pe],it=K[ne+Ge],(ae!==De||ae!==le||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,De,le,it,k,S,L),Oe=_e[ne]=xe++),ne+=1,I+=J,ye=2;ye0)for(ye=1,R=T[I],ae=K[ne]=p(R,k,S,L),De=K[ne+me],le=K[ne+pe],it=K[ne+Ge],(ae!==De||ae!==le||ae!==it)&&(O=T[I+B],j=T[I+V],U=T[I+q],v(ce,ye,R,O,j,U,ae,De,le,it,k,S,L),Oe=_e[ne]=xe++,it!==De&&g(_e[ne+me],Oe,U,O,it,De,k,S,L)),ne+=1,I+=J,ye=2;ye 0"),typeof f.vertex!="function"&&v("Must specify vertex creation function"),typeof f.cell!="function"&&v("Must specify cell creation function"),typeof f.phase!="function"&&v("Must specify phase function");for(var _=f.getters||[],y=new Array(p),C=0;C=0?y[C]=!0:y[C]=!1;return u(f.vertex,f.cell,f.phase,x,g,y)}}),6199:(function(a,i,o){"use strict";var s=o(1338),l={zero:function(L,w,A,T){var m=L[0],F=A[0];T|=0;var E=0,I=F;for(E=0;E2&&E[1]>2&&T(F.pick(-1,-1).lo(1,1).hi(E[0]-2,E[1]-2),m.pick(-1,-1,0).lo(1,1).hi(E[0]-2,E[1]-2),m.pick(-1,-1,1).lo(1,1).hi(E[0]-2,E[1]-2)),E[1]>2&&(A(F.pick(0,-1).lo(1).hi(E[1]-2),m.pick(0,-1,1).lo(1).hi(E[1]-2)),w(m.pick(0,-1,0).lo(1).hi(E[1]-2))),E[1]>2&&(A(F.pick(E[0]-1,-1).lo(1).hi(E[1]-2),m.pick(E[0]-1,-1,1).lo(1).hi(E[1]-2)),w(m.pick(E[0]-1,-1,0).lo(1).hi(E[1]-2))),E[0]>2&&(A(F.pick(-1,0).lo(1).hi(E[0]-2),m.pick(-1,0,0).lo(1).hi(E[0]-2)),w(m.pick(-1,0,1).lo(1).hi(E[0]-2))),E[0]>2&&(A(F.pick(-1,E[1]-1).lo(1).hi(E[0]-2),m.pick(-1,E[1]-1,0).lo(1).hi(E[0]-2)),w(m.pick(-1,E[1]-1,1).lo(1).hi(E[0]-2))),m.set(0,0,0,0),m.set(0,0,1,0),m.set(E[0]-1,0,0,0),m.set(E[0]-1,0,1,0),m.set(0,E[1]-1,0,0),m.set(0,E[1]-1,1,0),m.set(E[0]-1,E[1]-1,0,0),m.set(E[0]-1,E[1]-1,1,0),m}}function S(L){var w=L.join(),E=p[w];if(E)return E;for(var A=L.length,T=[_,y],m=1;m<=A;++m)T.push(C(m));var F=k,E=F.apply(void 0,T);return p[w]=E,E}a.exports=function(w,A,T){if(Array.isArray(T)||(typeof T=="string"?T=s(A.dimension,T):T=s(A.dimension,"clamp")),A.size===0)return w;if(A.dimension===0)return w.set(0),w;var m=S(T);return m(w,A)}}),4317:(function(a){"use strict";function i(c,f){var v=Math.floor(f),g=f-v,p=0<=v&&v0;){j<64?(w=j,j=0):(w=64,j-=64);for(var q=p[1]|0;q>0;){q<64?(A=q,q=0):(A=64,q-=64),y=O+j*m+q*F,S=V+j*I+q*R;var U=0,J=0,ee=0,ce=E,ye=m-T*E,xe=F-w*m,ue=B,K=I-T*B,_e=R-w*I;for(ee=0;ee0;){R<64?(w=R,R=0):(w=64,R-=64);for(var B=p[0]|0;B>0;){B<64?(L=B,B=0):(L=64,B-=64),y=E+R*T+B*A,S=I+R*F+B*m;var O=0,V=0,j=T,q=A-w*T,U=F,J=m-w*F;for(V=0;V0;){V<64?(A=V,V=0):(A=64,V-=64);for(var j=p[0]|0;j>0;){j<64?(L=j,j=0):(L=64,j-=64);for(var q=p[1]|0;q>0;){q<64?(w=q,q=0):(w=64,q-=64),y=B+V*F+j*T+q*m,S=O+V*R+j*E+q*I;var U=0,J=0,ee=0,ce=F,ye=T-A*F,xe=m-L*T,ue=R,K=E-A*R,_e=I-L*E;for(ee=0;eeC;){U=0,J=O-w;t:for(j=0;jce)break t;J+=E,U+=I}for(U=O,J=O-w,j=0;j>1,q=j-B,U=j+B,J=O,ee=q,ce=j,ye=U,xe=V,ue=k+1,K=S-1,_e=!0,ne,ae,pe,ie,le,me,be,De,Ge,ht=0,it=0,Oe=0,ze,ct,et,qe,we,Le,Ke,Te,Ve,$e,ot,tt,nt,We,mt,bt,Yt=F,jt=_(Yt),mr=_(Yt);ct=A*J,et=A*ee,bt=w;e:for(ze=0;ze0){ae=J,J=ee,ee=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ye,et=A*xe,bt=w;e:for(ze=0;ze0){ae=ye,ye=xe,xe=ae;break e}if(Oe<0)break e;bt+=I}ct=A*J,et=A*ce,bt=w;e:for(ze=0;ze0){ae=J,J=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ee,et=A*ce,bt=w;e:for(ze=0;ze0){ae=ee,ee=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ct=A*J,et=A*ye,bt=w;e:for(ze=0;ze0){ae=J,J=ye,ye=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ce,et=A*ye,bt=w;e:for(ze=0;ze0){ae=ce,ce=ye,ye=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ee,et=A*xe,bt=w;e:for(ze=0;ze0){ae=ee,ee=xe,xe=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ee,et=A*ce,bt=w;e:for(ze=0;ze0){ae=ee,ee=ce,ce=ae;break e}if(Oe<0)break e;bt+=I}ct=A*ye,et=A*xe,bt=w;e:for(ze=0;ze0){ae=ye,ye=xe,xe=ae;break e}if(Oe<0)break e;bt+=I}for(ct=A*J,et=A*ee,qe=A*ce,we=A*ye,Le=A*xe,Ke=A*O,Te=A*j,Ve=A*V,mt=0,bt=w,ze=0;ze0)K--;else if(Oe<0){for(ct=A*me,et=A*ue,qe=A*K,bt=w,ze=0;ze0)for(;;){be=w+K*A,mt=0;e:for(ze=0;ze0){if(--KV){e:for(;;){for(be=w+ue*A,mt=0,bt=w,ze=0;ze1&&C?S(y,C[0],C[1]):S(y)}var g={"uint32,1,0":function(x,_){return function(y){var C=y.data,k=y.offset|0,S=y.shape,L=y.stride,w=L[0]|0,A=S[0]|0,T=L[1]|0,m=S[1]|0,F=T,E=T,I=1;A<=32?x(0,A-1,C,k,w,T,A,m,F,E,I):_(0,A-1,C,k,w,T,A,m,F,E,I)}}};function p(x,_){var y=[_,x].join(","),C=g[y],k=c(x,_),S=v(x,_,k);return C(k,S)}a.exports=p}),446:(function(a,i,o){"use strict";var s=o(7640),l={};function u(c){var f=c.order,v=c.dtype,g=[f,v],p=g.join(":"),x=l[p];return x||(l[p]=x=s(f,v)),x(c),c}a.exports=u}),9618:(function(a,i,o){var s=o(7163),l=typeof Float64Array!="undefined";function u(_,y){return _[0]-y[0]}function c(){var _=this.stride,y=new Array(_.length),C;for(C=0;C=0&&(T=w|0,A+=F*T,m-=T),new k(this.data,m,F,A)},S.step=function(w){var A=this.shape[0],T=this.stride[0],m=this.offset,F=0,E=Math.ceil;return typeof w=="number"&&(F=w|0,F<0?(m+=T*(A-1),A=E(-A/F)):A=E(A/F),T*=F),new k(this.data,A,T,m)},S.transpose=function(w){w=w===void 0?0:w|0;var A=this.shape,T=this.stride;return new k(this.data,A[w],T[w],this.offset)},S.pick=function(w){var A=[],T=[],m=this.offset;typeof w=="number"&&w>=0?m=m+this.stride[0]*w|0:(A.push(this.shape[0]),T.push(this.stride[0]));var F=y[A.length+1];return F(this.data,A,T,m)},function(w,A,T,m){return new k(w,A[0],T[0],m)}},2:function(_,y,C){function k(L,w,A,T,m,F){this.data=L,this.shape=[w,A],this.stride=[T,m],this.offset=F|0}var S=k.prototype;return S.dtype=_,S.dimension=2,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]}}),Object.defineProperty(S,"order",{get:function(){return Math.abs(this.stride[0])>Math.abs(this.stride[1])?[1,0]:[0,1]}}),S.set=function(w,A,T){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*A,T):this.data[this.offset+this.stride[0]*w+this.stride[1]*A]=T},S.get=function(w,A){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*A):this.data[this.offset+this.stride[0]*w+this.stride[1]*A]},S.index=function(w,A){return this.offset+this.stride[0]*w+this.stride[1]*A},S.hi=function(w,A){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof A!="number"||A<0?this.shape[1]:A|0,this.stride[0],this.stride[1],this.offset)},S.lo=function(w,A){var T=this.offset,m=0,F=this.shape[0],E=this.shape[1],I=this.stride[0],R=this.stride[1];return typeof w=="number"&&w>=0&&(m=w|0,T+=I*m,F-=m),typeof A=="number"&&A>=0&&(m=A|0,T+=R*m,E-=m),new k(this.data,F,E,I,R,T)},S.step=function(w,A){var T=this.shape[0],m=this.shape[1],F=this.stride[0],E=this.stride[1],I=this.offset,R=0,B=Math.ceil;return typeof w=="number"&&(R=w|0,R<0?(I+=F*(T-1),T=B(-T/R)):T=B(T/R),F*=R),typeof A=="number"&&(R=A|0,R<0?(I+=E*(m-1),m=B(-m/R)):m=B(m/R),E*=R),new k(this.data,T,m,F,E,I)},S.transpose=function(w,A){w=w===void 0?0:w|0,A=A===void 0?1:A|0;var T=this.shape,m=this.stride;return new k(this.data,T[w],T[A],m[w],m[A],this.offset)},S.pick=function(w,A){var T=[],m=[],F=this.offset;typeof w=="number"&&w>=0?F=F+this.stride[0]*w|0:(T.push(this.shape[0]),m.push(this.stride[0])),typeof A=="number"&&A>=0?F=F+this.stride[1]*A|0:(T.push(this.shape[1]),m.push(this.stride[1]));var E=y[T.length+1];return E(this.data,T,m,F)},function(w,A,T,m){return new k(w,A[0],A[1],T[0],T[1],m)}},3:function(_,y,C){function k(L,w,A,T,m,F,E,I){this.data=L,this.shape=[w,A,T],this.stride=[m,F,E],this.offset=I|0}var S=k.prototype;return S.dtype=_,S.dimension=3,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]}}),Object.defineProperty(S,"order",{get:function(){var w=Math.abs(this.stride[0]),A=Math.abs(this.stride[1]),T=Math.abs(this.stride[2]);return w>A?A>T?[2,1,0]:w>T?[1,2,0]:[1,0,2]:w>T?[2,0,1]:T>A?[0,1,2]:[0,2,1]}}),S.set=function(w,A,T,m){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T,m):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T]=m},S.get=function(w,A,T){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T]},S.index=function(w,A,T){return this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T},S.hi=function(w,A,T){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof T!="number"||T<0?this.shape[2]:T|0,this.stride[0],this.stride[1],this.stride[2],this.offset)},S.lo=function(w,A,T){var m=this.offset,F=0,E=this.shape[0],I=this.shape[1],R=this.shape[2],B=this.stride[0],O=this.stride[1],V=this.stride[2];return typeof w=="number"&&w>=0&&(F=w|0,m+=B*F,E-=F),typeof A=="number"&&A>=0&&(F=A|0,m+=O*F,I-=F),typeof T=="number"&&T>=0&&(F=T|0,m+=V*F,R-=F),new k(this.data,E,I,R,B,O,V,m)},S.step=function(w,A,T){var m=this.shape[0],F=this.shape[1],E=this.shape[2],I=this.stride[0],R=this.stride[1],B=this.stride[2],O=this.offset,V=0,j=Math.ceil;return typeof w=="number"&&(V=w|0,V<0?(O+=I*(m-1),m=j(-m/V)):m=j(m/V),I*=V),typeof A=="number"&&(V=A|0,V<0?(O+=R*(F-1),F=j(-F/V)):F=j(F/V),R*=V),typeof T=="number"&&(V=T|0,V<0?(O+=B*(E-1),E=j(-E/V)):E=j(E/V),B*=V),new k(this.data,m,F,E,I,R,B,O)},S.transpose=function(w,A,T){w=w===void 0?0:w|0,A=A===void 0?1:A|0,T=T===void 0?2:T|0;var m=this.shape,F=this.stride;return new k(this.data,m[w],m[A],m[T],F[w],F[A],F[T],this.offset)},S.pick=function(w,A,T){var m=[],F=[],E=this.offset;typeof w=="number"&&w>=0?E=E+this.stride[0]*w|0:(m.push(this.shape[0]),F.push(this.stride[0])),typeof A=="number"&&A>=0?E=E+this.stride[1]*A|0:(m.push(this.shape[1]),F.push(this.stride[1])),typeof T=="number"&&T>=0?E=E+this.stride[2]*T|0:(m.push(this.shape[2]),F.push(this.stride[2]));var I=y[m.length+1];return I(this.data,m,F,E)},function(w,A,T,m){return new k(w,A[0],A[1],A[2],T[0],T[1],T[2],m)}},4:function(_,y,C){function k(L,w,A,T,m,F,E,I,R,B){this.data=L,this.shape=[w,A,T,m],this.stride=[F,E,I,R],this.offset=B|0}var S=k.prototype;return S.dtype=_,S.dimension=4,Object.defineProperty(S,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]}}),Object.defineProperty(S,"order",{get:C}),S.set=function(w,A,T,m,F){return _==="generic"?this.data.set(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m,F):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m]=F},S.get=function(w,A,T,m){return _==="generic"?this.data.get(this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m):this.data[this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m]},S.index=function(w,A,T,m){return this.offset+this.stride[0]*w+this.stride[1]*A+this.stride[2]*T+this.stride[3]*m},S.hi=function(w,A,T,m){return new k(this.data,typeof w!="number"||w<0?this.shape[0]:w|0,typeof A!="number"||A<0?this.shape[1]:A|0,typeof T!="number"||T<0?this.shape[2]:T|0,typeof m!="number"||m<0?this.shape[3]:m|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.offset)},S.lo=function(w,A,T,m){var F=this.offset,E=0,I=this.shape[0],R=this.shape[1],B=this.shape[2],O=this.shape[3],V=this.stride[0],j=this.stride[1],q=this.stride[2],U=this.stride[3];return typeof w=="number"&&w>=0&&(E=w|0,F+=V*E,I-=E),typeof A=="number"&&A>=0&&(E=A|0,F+=j*E,R-=E),typeof T=="number"&&T>=0&&(E=T|0,F+=q*E,B-=E),typeof m=="number"&&m>=0&&(E=m|0,F+=U*E,O-=E),new k(this.data,I,R,B,O,V,j,q,U,F)},S.step=function(w,A,T,m){var F=this.shape[0],E=this.shape[1],I=this.shape[2],R=this.shape[3],B=this.stride[0],O=this.stride[1],V=this.stride[2],j=this.stride[3],q=this.offset,U=0,J=Math.ceil;return typeof w=="number"&&(U=w|0,U<0?(q+=B*(F-1),F=J(-F/U)):F=J(F/U),B*=U),typeof A=="number"&&(U=A|0,U<0?(q+=O*(E-1),E=J(-E/U)):E=J(E/U),O*=U),typeof T=="number"&&(U=T|0,U<0?(q+=V*(I-1),I=J(-I/U)):I=J(I/U),V*=U),typeof m=="number"&&(U=m|0,U<0?(q+=j*(R-1),R=J(-R/U)):R=J(R/U),j*=U),new k(this.data,F,E,I,R,B,O,V,j,q)},S.transpose=function(w,A,T,m){w=w===void 0?0:w|0,A=A===void 0?1:A|0,T=T===void 0?2:T|0,m=m===void 0?3:m|0;var F=this.shape,E=this.stride;return new k(this.data,F[w],F[A],F[T],F[m],E[w],E[A],E[T],E[m],this.offset)},S.pick=function(w,A,T,m){var F=[],E=[],I=this.offset;typeof w=="number"&&w>=0?I=I+this.stride[0]*w|0:(F.push(this.shape[0]),E.push(this.stride[0])),typeof A=="number"&&A>=0?I=I+this.stride[1]*A|0:(F.push(this.shape[1]),E.push(this.stride[1])),typeof T=="number"&&T>=0?I=I+this.stride[2]*T|0:(F.push(this.shape[2]),E.push(this.stride[2])),typeof m=="number"&&m>=0?I=I+this.stride[3]*m|0:(F.push(this.shape[3]),E.push(this.stride[3]));var R=y[F.length+1];return R(this.data,F,E,I)},function(w,A,T,m){return new k(w,A[0],A[1],A[2],A[3],T[0],T[1],T[2],T[3],m)}},5:function(y,C,k){function S(w,A,T,m,F,E,I,R,B,O,V,j){this.data=w,this.shape=[A,T,m,F,E],this.stride=[I,R,B,O,V],this.offset=j|0}var L=S.prototype;return L.dtype=y,L.dimension=5,Object.defineProperty(L,"size",{get:function(){return this.shape[0]*this.shape[1]*this.shape[2]*this.shape[3]*this.shape[4]}}),Object.defineProperty(L,"order",{get:k}),L.set=function(A,T,m,F,E,I){return y==="generic"?this.data.set(this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E,I):this.data[this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E]=I},L.get=function(A,T,m,F,E){return y==="generic"?this.data.get(this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E):this.data[this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E]},L.index=function(A,T,m,F,E){return this.offset+this.stride[0]*A+this.stride[1]*T+this.stride[2]*m+this.stride[3]*F+this.stride[4]*E},L.hi=function(A,T,m,F,E){return new S(this.data,typeof A!="number"||A<0?this.shape[0]:A|0,typeof T!="number"||T<0?this.shape[1]:T|0,typeof m!="number"||m<0?this.shape[2]:m|0,typeof F!="number"||F<0?this.shape[3]:F|0,typeof E!="number"||E<0?this.shape[4]:E|0,this.stride[0],this.stride[1],this.stride[2],this.stride[3],this.stride[4],this.offset)},L.lo=function(A,T,m,F,E){var I=this.offset,R=0,B=this.shape[0],O=this.shape[1],V=this.shape[2],j=this.shape[3],q=this.shape[4],U=this.stride[0],J=this.stride[1],ee=this.stride[2],ce=this.stride[3],ye=this.stride[4];return typeof A=="number"&&A>=0&&(R=A|0,I+=U*R,B-=R),typeof T=="number"&&T>=0&&(R=T|0,I+=J*R,O-=R),typeof m=="number"&&m>=0&&(R=m|0,I+=ee*R,V-=R),typeof F=="number"&&F>=0&&(R=F|0,I+=ce*R,j-=R),typeof E=="number"&&E>=0&&(R=E|0,I+=ye*R,q-=R),new S(this.data,B,O,V,j,q,U,J,ee,ce,ye,I)},L.step=function(A,T,m,F,E){var I=this.shape[0],R=this.shape[1],B=this.shape[2],O=this.shape[3],V=this.shape[4],j=this.stride[0],q=this.stride[1],U=this.stride[2],J=this.stride[3],ee=this.stride[4],ce=this.offset,ye=0,xe=Math.ceil;return typeof A=="number"&&(ye=A|0,ye<0?(ce+=j*(I-1),I=xe(-I/ye)):I=xe(I/ye),j*=ye),typeof T=="number"&&(ye=T|0,ye<0?(ce+=q*(R-1),R=xe(-R/ye)):R=xe(R/ye),q*=ye),typeof m=="number"&&(ye=m|0,ye<0?(ce+=U*(B-1),B=xe(-B/ye)):B=xe(B/ye),U*=ye),typeof F=="number"&&(ye=F|0,ye<0?(ce+=J*(O-1),O=xe(-O/ye)):O=xe(O/ye),J*=ye),typeof E=="number"&&(ye=E|0,ye<0?(ce+=ee*(V-1),V=xe(-V/ye)):V=xe(V/ye),ee*=ye),new S(this.data,I,R,B,O,V,j,q,U,J,ee,ce)},L.transpose=function(A,T,m,F,E){A=A===void 0?0:A|0,T=T===void 0?1:T|0,m=m===void 0?2:m|0,F=F===void 0?3:F|0,E=E===void 0?4:E|0;var I=this.shape,R=this.stride;return new S(this.data,I[A],I[T],I[m],I[F],I[E],R[A],R[T],R[m],R[F],R[E],this.offset)},L.pick=function(A,T,m,F,E){var I=[],R=[],B=this.offset;typeof A=="number"&&A>=0?B=B+this.stride[0]*A|0:(I.push(this.shape[0]),R.push(this.stride[0])),typeof T=="number"&&T>=0?B=B+this.stride[1]*T|0:(I.push(this.shape[1]),R.push(this.stride[1])),typeof m=="number"&&m>=0?B=B+this.stride[2]*m|0:(I.push(this.shape[2]),R.push(this.stride[2])),typeof F=="number"&&F>=0?B=B+this.stride[3]*F|0:(I.push(this.shape[3]),R.push(this.stride[3])),typeof E=="number"&&E>=0?B=B+this.stride[4]*E|0:(I.push(this.shape[4]),R.push(this.stride[4]));var O=C[I.length+1];return O(this.data,I,R,B)},function(A,T,m,F){return new S(A,T[0],T[1],T[2],T[3],T[4],m[0],m[1],m[2],m[3],m[4],F)}}};function v(_,y){var C=y===-1?"T":String(y),k=f[C];return y===-1?k(_):y===0?k(_,p[_][0]):k(_,p[_],c)}function g(_){if(s(_))return"buffer";if(l)switch(Object.prototype.toString.call(_)){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(_)?"array":"generic"}var p={generic:[],buffer:[],array:[],float32:[],float64:[],int8:[],int16:[],int32:[],uint8_clamped:[],uint8:[],uint16:[],uint32:[],bigint64:[],biguint64:[]};function x(_,y,C,k){if(_===void 0){var m=p.array[0];return m([])}else typeof _=="number"&&(_=[_]);y===void 0&&(y=[_.length]);var S=y.length;if(C===void 0){C=new Array(S);for(var L=S-1,w=1;L>=0;--L)C[L]=w,w*=y[L]}if(k===void 0){k=0;for(var L=0;L>>0;a.exports=c;function c(f,v){if(isNaN(f)||isNaN(v))return NaN;if(f===v)return f;if(f===0)return v<0?-l:l;var g=s.hi(f),p=s.lo(f);return v>f==f>0?p===u?(g+=1,p=0):p+=1:p===0?(p=u,g-=1):p-=1,s.pack(p,g)}}),8406:(function(a,i){var o=1e-6,s=1e-6;i.vertexNormals=function(l,u,c){for(var f=u.length,v=new Array(f),g=c===void 0?o:c,p=0;pg)for(var I=v[y],R=1/Math.sqrt(T*F),E=0;E<3;++E){var B=(E+1)%3,O=(E+2)%3;I[E]+=R*(m[B]*A[O]-m[O]*A[B])}}for(var p=0;pg)for(var R=1/Math.sqrt(V),E=0;E<3;++E)I[E]*=R;else for(var E=0;E<3;++E)I[E]=0}return v},i.faceNormals=function(l,u,c){for(var f=l.length,v=new Array(f),g=c===void 0?s:c,p=0;pg?L=1/Math.sqrt(L):L=0;for(var y=0;y<3;++y)S[y]*=L;v[p]=S}return v}}),4081:(function(a){"use strict";a.exports=i;function i(o,s,l,u,c,f,v,g,p,x){var _=s+f+x;if(y>0){var y=Math.sqrt(_+1);o[0]=.5*(v-p)/y,o[1]=.5*(g-u)/y,o[2]=.5*(l-f)/y,o[3]=.5*y}else{var C=Math.max(s,f,x),y=Math.sqrt(2*C-_+1);s>=C?(o[0]=.5*y,o[1]=.5*(c+l)/y,o[2]=.5*(g+u)/y,o[3]=.5*(v-p)/y):f>=C?(o[0]=.5*(l+c)/y,o[1]=.5*y,o[2]=.5*(p+v)/y,o[3]=.5*(g-u)/y):(o[0]=.5*(u+g)/y,o[1]=.5*(v+p)/y,o[2]=.5*y,o[3]=.5*(l-c)/y)}return o}}),9977:(function(a,i,o){"use strict";a.exports=y;var s=o(9215),l=o(6582),u=o(7399),c=o(7608),f=o(4081);function v(C,k,S){return Math.sqrt(Math.pow(C,2)+Math.pow(k,2)+Math.pow(S,2))}function g(C,k,S,L){return Math.sqrt(Math.pow(C,2)+Math.pow(k,2)+Math.pow(S,2)+Math.pow(L,2))}function p(C,k){var S=k[0],L=k[1],w=k[2],A=k[3],T=g(S,L,w,A);T>1e-6?(C[0]=S/T,C[1]=L/T,C[2]=w/T,C[3]=A/T):(C[0]=C[1]=C[2]=0,C[3]=1)}function x(C,k,S){this.radius=s([S]),this.center=s(k),this.rotation=s(C),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 _=x.prototype;_.lastT=function(){return Math.max(this.radius.lastT(),this.center.lastT(),this.rotation.lastT())},_.recalcMatrix=function(C){this.radius.curve(C),this.center.curve(C),this.rotation.curve(C);var k=this.computedRotation;p(k,k);var S=this.computedMatrix;u(S,k);var L=this.computedCenter,w=this.computedEye,A=this.computedUp,T=Math.exp(this.computedRadius[0]);w[0]=L[0]+T*S[2],w[1]=L[1]+T*S[6],w[2]=L[2]+T*S[10],A[0]=S[1],A[1]=S[5],A[2]=S[9];for(var m=0;m<3;++m){for(var F=0,E=0;E<3;++E)F+=S[m+4*E]*w[E];S[12+m]=-F}},_.getMatrix=function(C,k){this.recalcMatrix(C);var S=this.computedMatrix;if(k){for(var L=0;L<16;++L)k[L]=S[L];return k}return S},_.idle=function(C){this.center.idle(C),this.radius.idle(C),this.rotation.idle(C)},_.flush=function(C){this.center.flush(C),this.radius.flush(C),this.rotation.flush(C)},_.pan=function(C,k,S,L){k=k||0,S=S||0,L=L||0,this.recalcMatrix(C);var w=this.computedMatrix,A=w[1],T=w[5],m=w[9],F=v(A,T,m);A/=F,T/=F,m/=F;var E=w[0],I=w[4],R=w[8],B=E*A+I*T+R*m;E-=A*B,I-=T*B,R-=m*B;var O=v(E,I,R);E/=O,I/=O,R/=O;var V=w[2],j=w[6],q=w[10],U=V*A+j*T+q*m,J=V*E+j*I+q*R;V-=U*A+J*E,j-=U*T+J*I,q-=U*m+J*R;var ee=v(V,j,q);V/=ee,j/=ee,q/=ee;var ce=E*k+A*S,ye=I*k+T*S,xe=R*k+m*S;this.center.move(C,ce,ye,xe);var ue=Math.exp(this.computedRadius[0]);ue=Math.max(1e-4,ue+L),this.radius.set(C,Math.log(ue))},_.rotate=function(C,k,S,L){this.recalcMatrix(C),k=k||0,S=S||0;var w=this.computedMatrix,A=w[0],T=w[4],m=w[8],F=w[1],E=w[5],I=w[9],R=w[2],B=w[6],O=w[10],V=k*A+S*F,j=k*T+S*E,q=k*m+S*I,U=-(B*q-O*j),J=-(O*V-R*q),ee=-(R*j-B*V),ce=Math.sqrt(Math.max(0,1-Math.pow(U,2)-Math.pow(J,2)-Math.pow(ee,2))),ye=g(U,J,ee,ce);ye>1e-6?(U/=ye,J/=ye,ee/=ye,ce/=ye):(U=J=ee=0,ce=1);var xe=this.computedRotation,ue=xe[0],K=xe[1],_e=xe[2],ne=xe[3],ae=ue*ce+ne*U+K*ee-_e*J,pe=K*ce+ne*J+_e*U-ue*ee,ie=_e*ce+ne*ee+ue*J-K*U,le=ne*ce-ue*U-K*J-_e*ee;if(L){U=R,J=B,ee=O;var me=Math.sin(L)/v(U,J,ee);U*=me,J*=me,ee*=me,ce=Math.cos(k),ae=ae*ce+le*U+pe*ee-ie*J,pe=pe*ce+le*J+ie*U-ae*ee,ie=ie*ce+le*ee+ae*J-pe*U,le=le*ce-ae*U-pe*J-ie*ee}var be=g(ae,pe,ie,le);be>1e-6?(ae/=be,pe/=be,ie/=be,le/=be):(ae=pe=ie=0,le=1),this.rotation.set(C,ae,pe,ie,le)},_.lookAt=function(C,k,S,L){this.recalcMatrix(C),S=S||this.computedCenter,k=k||this.computedEye,L=L||this.computedUp;var w=this.computedMatrix;l(w,k,S,L);var A=this.computedRotation;f(A,w[0],w[1],w[2],w[4],w[5],w[6],w[8],w[9],w[10]),p(A,A),this.rotation.set(C,A[0],A[1],A[2],A[3]);for(var T=0,m=0;m<3;++m)T+=Math.pow(S[m]-k[m],2);this.radius.set(C,.5*Math.log(Math.max(T,1e-6))),this.center.set(C,S[0],S[1],S[2])},_.translate=function(C,k,S,L){this.center.move(C,k||0,S||0,L||0)},_.setMatrix=function(C,k){var S=this.computedRotation;f(S,k[0],k[1],k[2],k[4],k[5],k[6],k[8],k[9],k[10]),p(S,S),this.rotation.set(C,S[0],S[1],S[2],S[3]);var L=this.computedMatrix;c(L,k);var w=L[15];if(Math.abs(w)>1e-6){var A=L[12]/w,T=L[13]/w,m=L[14]/w;this.recalcMatrix(C);var F=Math.exp(this.computedRadius[0]);this.center.set(C,A-L[2]*F,T-L[6]*F,m-L[10]*F),this.radius.idle(C)}else this.center.idle(C),this.radius.idle(C)},_.setDistance=function(C,k){k>0&&this.radius.set(C,Math.log(k))},_.setDistanceLimits=function(C,k){C>0?C=Math.log(C):C=-1/0,k>0?k=Math.log(k):k=1/0,k=Math.max(k,C),this.radius.bounds[0][0]=C,this.radius.bounds[1][0]=k},_.getDistanceLimits=function(C){var k=this.radius.bounds;return C?(C[0]=Math.exp(k[0][0]),C[1]=Math.exp(k[1][0]),C):[Math.exp(k[0][0]),Math.exp(k[1][0])]},_.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]}},_.fromJSON=function(C){var k=this.lastT(),S=C.center;S&&this.center.set(k,S[0],S[1],S[2]);var L=C.rotation;L&&this.rotation.set(k,L[0],L[1],L[2],L[3]);var w=C.distance;w&&w>0&&this.radius.set(k,Math.log(w)),this.setDistanceLimits(C.zoomMin,C.zoomMax)};function y(C){C=C||{};var k=C.center||[0,0,0],S=C.rotation||[0,0,0,1],L=C.radius||1;k=[].slice.call(k,0,3),S=[].slice.call(S,0,4),p(S,S);var w=new x(S,k,Math.log(L));return w.setDistanceLimits(C.zoomMin,C.zoomMax),("eye"in C||"up"in C)&&w.lookAt(0,C.eye,C.center,C.up),w}}),1371:(function(a,i,o){"use strict";var s=o(3233);a.exports=function(u,c,f){return f=typeof f!="undefined"?f+"":" ",s(f,c)+u}}),3202:(function(a){a.exports=function(o,s){s||(s=[0,""]),o=String(o);var l=parseFloat(o,10);return s[0]=l,s[1]=o.match(/[\d.\-\+]*\s*(.*)/)[1]||"",s}}),3088:(function(a,i,o){"use strict";a.exports=l;var s=o(3140);function l(u,c){for(var f=c.length|0,v=u.length,g=[new Array(f),new Array(f)],p=0;p0){I=g[O][F][0],B=O;break}R=I[B^1];for(var V=0;V<2;++V)for(var j=g[V][F],q=0;q0&&(I=U,R=J,B=V)}return E||I&&y(I,B),R}function k(m,F){var E=g[F][m][0],I=[m];y(E,F);for(var R=E[F^1],B=F;;){for(;R!==m;)I.push(R),R=C(I[I.length-2],R,!1);if(g[0][m].length+g[1][m].length===0)break;var O=I[I.length-1],V=m,j=I[1],q=C(O,V,!0);if(s(c[O],c[V],c[j],c[q])<0)break;I.push(m),R=C(O,V)}return I}function S(m,F){return F[1]===F[F.length-1]}for(var p=0;p0;){var A=g[0][p].length,T=k(p,L);S(w,T)?w.push.apply(w,T):(w.length>0&&_.push(w),w=T)}w.length>0&&_.push(w)}return _}}),5609:(function(a,i,o){"use strict";a.exports=l;var s=o(3134);function l(u,c){for(var f=s(u,c.length),v=new Array(c.length),g=new Array(c.length),p=[],x=0;x0;){var y=p.pop();v[y]=!1;for(var C=f[y],x=0;x0}A=A.filter(T);for(var m=A.length,F=new Array(m),E=new Array(m),w=0;w0;){var be=ie.pop(),De=ye[be];v(De,function(ze,ct){return ze-ct});var Ge=De.length,ht=le[be],it;if(ht===0){var j=A[be];it=[j]}for(var w=0;w=0)&&(le[Oe]=ht^1,ie.push(Oe),ht===0)){var j=A[Oe];pe(j)||(j.reverse(),it.push(j))}}ht===0&&me.push(it)}return me}}),5085:(function(a,i,o){a.exports=C;var s=o(3250)[3],l=o(4209),u=o(3352),c=o(2478);function f(){return!0}function v(k){return function(S,L){var w=k[S];return w?!!w.queryPoint(L,f):!1}}function g(k){for(var S={},L=0;L0&&S[w]===L[0])A=k[w-1];else return 1;for(var T=1;A;){var m=A.key,F=s(L,m[0],m[1]);if(m[0][0]0)T=-1,A=A.right;else return 0;else if(F>0)A=A.left;else if(F<0)T=1,A=A.right;else return 0}return T}}function x(k){return 1}function _(k){return function(L){return k(L[0],L[1])?0:1}}function y(k,S){return function(w){return k(w[0],w[1])?0:S(w)}}function C(k){for(var S=k.length,L=[],w=[],A=0,T=0;T=x?(m=1,E=x+2*C+S):(m=-C/x,E=C*m+S)):(m=0,k>=0?(F=0,E=S):-k>=y?(F=1,E=y+2*k+S):(F=-k/y,E=k*F+S));else if(F<0)F=0,C>=0?(m=0,E=S):-C>=x?(m=1,E=x+2*C+S):(m=-C/x,E=C*m+S);else{var I=1/T;m*=I,F*=I,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S}else{var R,B,O,V;m<0?(R=_+C,B=y+k,B>R?(O=B-R,V=x-2*_+y,O>=V?(m=1,F=0,E=x+2*C+S):(m=O/V,F=1-m,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S)):(m=0,B<=0?(F=1,E=y+2*k+S):k>=0?(F=0,E=S):(F=-k/y,E=k*F+S))):F<0?(R=_+k,B=x+C,B>R?(O=B-R,V=x-2*_+y,O>=V?(F=1,m=0,E=y+2*k+S):(F=O/V,m=1-F,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S)):(F=0,B<=0?(m=1,E=x+2*C+S):C>=0?(m=0,E=S):(m=-C/x,E=C*m+S))):(O=y+k-_-C,O<=0?(m=0,F=1,E=y+2*k+S):(V=x-2*_+y,O>=V?(m=1,F=0,E=x+2*C+S):(m=O/V,F=1-m,E=m*(x*m+_*F+2*C)+F*(_*m+y*F+2*k)+S)))}for(var j=1-m-F,p=0;p0){var y=f[g-1];if(s(x,y)===0&&u(y)!==_){g-=1;continue}}f[g++]=x}}return f.length=g,f}}),3233:(function(a){"use strict";var i="",o;a.exports=s;function s(l,u){if(typeof l!="string")throw new TypeError("expected a string");if(u===1)return l;if(u===2)return l+l;var c=l.length*u;if(o!==l||typeof o=="undefined")o=l,i="";else if(i.length>=c)return i.substr(0,c);for(;c>i.length&&u>1;)u&1&&(i+=l),u>>=1,l+=l;return i+=l,i=i.substr(0,c),i}}),3025:(function(a,i,o){a.exports=o.g.performance&&o.g.performance.now?function(){return performance.now()}:Date.now||function(){return+new Date}}),7004:(function(a){"use strict";a.exports=i;function i(o){for(var s=o.length,l=o[o.length-1],u=s,c=s-2;c>=0;--c){var f=l,v=o[c];l=f+v;var g=l-f,p=v-g;p&&(o[--u]=l,l=p)}for(var x=0,c=u;c0){if(B<=0)return O;V=R+B}else if(R<0){if(B>=0)return O;V=-(R+B)}else return O;var j=g*V;return O>=j||O<=-j?O:k(F,E,I)},function(F,E,I,R){var B=F[0]-R[0],O=E[0]-R[0],V=I[0]-R[0],j=F[1]-R[1],q=E[1]-R[1],U=I[1]-R[1],J=F[2]-R[2],ee=E[2]-R[2],ce=I[2]-R[2],ye=O*U,xe=V*q,ue=V*j,K=B*U,_e=B*q,ne=O*j,ae=J*(ye-xe)+ee*(ue-K)+ce*(_e-ne),pe=(Math.abs(ye)+Math.abs(xe))*Math.abs(J)+(Math.abs(ue)+Math.abs(K))*Math.abs(ee)+(Math.abs(_e)+Math.abs(ne))*Math.abs(ce),ie=p*pe;return ae>ie||-ae>ie?ae:S(F,E,I,R)}];function w(m){var F=L[m.length];return F||(F=L[m.length]=C(m.length)),F.apply(void 0,m)}function A(m,F,E,I,R,B,O){return function(j,q,U,J,ee){switch(arguments.length){case 0:case 1:return 0;case 2:return I(j,q);case 3:return R(j,q,U);case 4:return B(j,q,U,J);case 5:return O(j,q,U,J,ee)}for(var ce=new Array(arguments.length),ye=0;ye0&&x>0||p<0&&x<0)return!1;var _=s(v,c,f),y=s(g,c,f);return _>0&&y>0||_<0&&y<0?!1:p===0&&x===0&&_===0&&y===0?l(c,f,v,g):!0}}),8545:(function(a){"use strict";a.exports=o;function i(s,l){var u=s+l,c=u-s,f=u-c,v=l-c,g=s-f,p=g+v;return p?[p,u]:[u]}function o(s,l){var u=s.length|0,c=l.length|0;if(u===1&&c===1)return i(s[0],-l[0]);var f=u+c,v=new Array(f),g=0,p=0,x=0,_=Math.abs,y=s[p],C=_(y),k=-l[x],S=_(k),L,w;C=c?(L=y,p+=1,p=c?(L=y,p+=1,p>1,k=f[2*C+1];if(k===x)return C;x>1,k=f[2*C+1];if(k===x)return C;x>1,k=f[2*C+1];if(k===x)return C;x>1,k=f[2*C+1];if(k===x)return C;x>1,V=g(F[O],E);V<=0?(V===0&&(B=O),I=O+1):V>0&&(R=O-1)}return B}s=y;function C(F,E){for(var I=new Array(F.length),R=0,B=I.length;R=F.length||g(F[ye],O)!==0););}return I}s=C;function k(F,E){if(!E)return C(_(L(F,0)),F,0);for(var I=new Array(E),R=0;R>>U&1&&q.push(B[U]);E.push(q)}return x(E)}s=S;function L(F,E){if(E<0)return[];for(var I=[],R=(1<0)-(u<0)},i.abs=function(u){var c=u>>o-1;return(u^c)-c},i.min=function(u,c){return c^(u^c)&-(u65535)<<4,u>>>=c,f=(u>255)<<3,u>>>=f,c|=f,f=(u>15)<<2,u>>>=f,c|=f,f=(u>3)<<1,u>>>=f,c|=f,c|u>>1},i.log10=function(u){return u>=1e9?9:u>=1e8?8:u>=1e7?7:u>=1e6?6:u>=1e5?5:u>=1e4?4:u>=1e3?3:u>=100?2:u>=10?1:0},i.popCount=function(u){return u=u-(u>>>1&1431655765),u=(u&858993459)+(u>>>2&858993459),(u+(u>>>4)&252645135)*16843009>>>24};function s(u){var c=32;return u&=-u,u&&c--,u&65535&&(c-=16),u&16711935&&(c-=8),u&252645135&&(c-=4),u&858993459&&(c-=2),u&1431655765&&(c-=1),c}i.countTrailingZeros=s,i.nextPow2=function(u){return u+=u===0,--u,u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u+1},i.prevPow2=function(u){return u|=u>>>1,u|=u>>>2,u|=u>>>4,u|=u>>>8,u|=u>>>16,u-(u>>>1)},i.parity=function(u){return u^=u>>>16,u^=u>>>8,u^=u>>>4,u&=15,27030>>>u&1};var l=new Array(256);(function(u){for(var c=0;c<256;++c){var f=c,v=c,g=7;for(f>>>=1;f;f>>>=1)v<<=1,v|=f&1,--g;u[c]=v<>>8&255]<<16|l[u>>>16&255]<<8|l[u>>>24&255]},i.interleave2=function(u,c){return u&=65535,u=(u|u<<8)&16711935,u=(u|u<<4)&252645135,u=(u|u<<2)&858993459,u=(u|u<<1)&1431655765,c&=65535,c=(c|c<<8)&16711935,c=(c|c<<4)&252645135,c=(c|c<<2)&858993459,c=(c|c<<1)&1431655765,u|c<<1},i.deinterleave2=function(u,c){return u=u>>>c&1431655765,u=(u|u>>>1)&858993459,u=(u|u>>>2)&252645135,u=(u|u>>>4)&16711935,u=(u|u>>>16)&65535,u<<16>>16},i.interleave3=function(u,c,f){return u&=1023,u=(u|u<<16)&4278190335,u=(u|u<<8)&251719695,u=(u|u<<4)&3272356035,u=(u|u<<2)&1227133513,c&=1023,c=(c|c<<16)&4278190335,c=(c|c<<8)&251719695,c=(c|c<<4)&3272356035,c=(c|c<<2)&1227133513,u|=c<<1,f&=1023,f=(f|f<<16)&4278190335,f=(f|f<<8)&251719695,f=(f|f<<4)&3272356035,f=(f|f<<2)&1227133513,u|f<<2},i.deinterleave3=function(u,c){return u=u>>>c&1227133513,u=(u|u>>>2)&3272356035,u=(u|u>>>4)&251719695,u=(u|u>>>8)&4278190335,u=(u|u>>>16)&1023,u<<22>>22},i.nextCombination=function(u){var c=u|u-1;return c+1|(~c&-~c)-1>>>s(u)+1}}),2014:(function(a,i,o){"use strict";"use restrict";var s=o(3105),l=o(4623);function u(m){for(var F=0,E=Math.max,I=0,R=m.length;I>1,O=v(m[B],F);O<=0?(O===0&&(R=B),E=B+1):O>0&&(I=B-1)}return R}i.findCell=_;function y(m,F){for(var E=new Array(m.length),I=0,R=E.length;I=m.length||v(m[ce],B)!==0););}return E}i.incidence=y;function C(m,F){if(!F)return y(x(S(m,0)),m,0);for(var E=new Array(F),I=0;I>>q&1&&j.push(R[q]);F.push(j)}return p(F)}i.explode=k;function S(m,F){if(F<0)return[];for(var E=[],I=(1<>1:(K>>1)-1}function I(K){for(var _e=F(K);;){var ne=_e,ae=2*K+1,pe=2*(K+1),ie=K;if(ae0;){var ne=E(K);if(ne>=0){var ae=F(ne);if(_e0){var K=j[0];return m(0,J-1),J-=1,I(0),K}return-1}function O(K,_e){var ne=j[K];return C[ne]===_e?K:(C[ne]=-1/0,R(K),B(),C[ne]=_e,J+=1,R(J-1))}function V(K){if(!k[K]){k[K]=!0;var _e=_[K],ne=y[K];_[ne]>=0&&(_[ne]=_e),y[_e]>=0&&(y[_e]=ne),q[_e]>=0&&O(q[_e],T(_e)),q[ne]>=0&&O(q[ne],T(ne))}}for(var j=[],q=new Array(p),S=0;S>1;S>=0;--S)I(S);for(;;){var ee=B();if(ee<0||C[ee]>g)break;V(ee)}for(var ce=[],S=0;S=0&&ne>=0&&_e!==ne){var ae=q[_e],pe=q[ne];ae!==pe&&ue.push([ae,pe])}}),l.unique(l.normalize(ue)),{positions:ce,edges:ue}}}),1303:(function(a,i,o){"use strict";a.exports=u;var s=o(3250);function l(c,f){var v,g;if(f[0][0]f[1][0])v=f[1],g=f[0];else{var p=Math.min(c[0][1],c[1][1]),x=Math.max(c[0][1],c[1][1]),_=Math.min(f[0][1],f[1][1]),y=Math.max(f[0][1],f[1][1]);return x<_?x-_:p>y?p-y:x-y}var C,k;c[0][1]f[1][0])v=f[1],g=f[0];else return l(f,c);var p,x;if(c[0][0]c[1][0])p=c[1],x=c[0];else return-l(c,f);var _=s(v,g,x),y=s(v,g,p);if(_<0){if(y<=0)return _}else if(_>0){if(y>=0)return _}else if(y)return y;if(_=s(x,p,g),y=s(x,p,v),_<0){if(y<=0)return _}else if(_>0){if(y>=0)return _}else if(y)return y;return g[0]-x[0]}}),4209:(function(a,i,o){"use strict";a.exports=y;var s=o(2478),l=o(3840),u=o(3250),c=o(1303);function f(C,k,S){this.slabs=C,this.coordinates=k,this.horizontal=S}var v=f.prototype;function g(C,k){return C.y-k}function p(C,k){for(var S=null;C;){var L=C.key,w,A;L[0][0]0)if(k[0]!==L[1][0])S=C,C=C.right;else{var m=p(C.right,k);if(m)return m;C=C.left}else{if(k[0]!==L[1][0])return C;var m=p(C.right,k);if(m)return m;C=C.left}}return S}v.castUp=function(C){var k=s.le(this.coordinates,C[0]);if(k<0)return-1;var S=this.slabs[k],L=p(this.slabs[k],C),w=-1;if(L&&(w=L.value),this.coordinates[k]===C[0]){var A=null;if(L&&(A=L.key),k>0){var T=p(this.slabs[k-1],C);T&&(A?c(T.key,A)>0&&(A=T.key,w=T.value):(w=T.value,A=T.key))}var m=this.horizontal[k];if(m.length>0){var F=s.ge(m,C[1],g);if(F=m.length)return w;E=m[F]}}if(E.start)if(A){var I=u(A[0],A[1],[C[0],E.y]);A[0][0]>A[1][0]&&(I=-I),I>0&&(w=E.index)}else w=E.index;else E.y!==C[1]&&(w=E.index)}}}return w};function x(C,k,S,L){this.y=C,this.index=k,this.start=S,this.closed=L}function _(C,k,S,L){this.x=C,this.segment=k,this.create=S,this.index=L}function y(C){for(var k=C.length,S=2*k,L=new Array(S),w=0;w1&&(k=1);for(var S=1-k,L=p.length,w=new Array(L),A=0;A0||C>0&&w<0){var A=c(k,w,S,C);_.push(A),y.push(A.slice())}w<0?y.push(S.slice()):w>0?_.push(S.slice()):(_.push(S.slice()),y.push(S.slice())),C=w}return{positive:_,negative:y}}function v(p,x){for(var _=[],y=u(p[p.length-1],x),C=p[p.length-1],k=p[0],S=0;S0||y>0&&L<0)&&_.push(c(C,L,k,y)),L>=0&&_.push(k.slice()),y=L}return _}function g(p,x){for(var _=[],y=u(p[p.length-1],x),C=p[p.length-1],k=p[0],S=0;S0||y>0&&L<0)&&_.push(c(C,L,k,y)),L<=0&&_.push(k.slice()),y=L}return _}}),3387:(function(a,i,o){var s;(function(){"use strict";var l={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 u(p){return f(g(p),arguments)}function c(p,x){return u.apply(null,[p].concat(x||[]))}function f(p,x){var _=1,y=p.length,C,k="",S,L,w,A,T,m,F,E;for(S=0;S=0),w.type){case"b":C=parseInt(C,10).toString(2);break;case"c":C=String.fromCharCode(parseInt(C,10));break;case"d":case"i":C=parseInt(C,10);break;case"j":C=JSON.stringify(C,null,w.width?parseInt(w.width):0);break;case"e":C=w.precision?parseFloat(C).toExponential(w.precision):parseFloat(C).toExponential();break;case"f":C=w.precision?parseFloat(C).toFixed(w.precision):parseFloat(C);break;case"g":C=w.precision?String(Number(C.toPrecision(w.precision))):parseFloat(C);break;case"o":C=(parseInt(C,10)>>>0).toString(8);break;case"s":C=String(C),C=w.precision?C.substring(0,w.precision):C;break;case"t":C=String(!!C),C=w.precision?C.substring(0,w.precision):C;break;case"T":C=Object.prototype.toString.call(C).slice(8,-1).toLowerCase(),C=w.precision?C.substring(0,w.precision):C;break;case"u":C=parseInt(C,10)>>>0;break;case"v":C=C.valueOf(),C=w.precision?C.substring(0,w.precision):C;break;case"x":C=(parseInt(C,10)>>>0).toString(16);break;case"X":C=(parseInt(C,10)>>>0).toString(16).toUpperCase();break}l.json.test(w.type)?k+=C:(l.number.test(w.type)&&(!F||w.sign)?(E=F?"+":"-",C=C.toString().replace(l.sign,"")):E="",T=w.pad_char?w.pad_char==="0"?"0":w.pad_char.charAt(1):" ",m=w.width-(E+C).length,A=w.width&&m>0?T.repeat(m):"",k+=w.align?E+C+A:T==="0"?E+A+C:A+E+C)}return k}var v=Object.create(null);function g(p){if(v[p])return v[p];for(var x=p,_,y=[],C=0;x;){if((_=l.text.exec(x))!==null)y.push(_[0]);else if((_=l.modulo.exec(x))!==null)y.push("%");else if((_=l.placeholder.exec(x))!==null){if(_[2]){C|=1;var k=[],S=_[2],L=[];if((L=l.key.exec(S))!==null)for(k.push(L[1]);(S=S.substring(L[0].length))!=="";)if((L=l.key_access.exec(S))!==null)k.push(L[1]);else if((L=l.index_access.exec(S))!==null)k.push(L[1]);else throw new SyntaxError("[sprintf] failed to parse named argument key");else throw new SyntaxError("[sprintf] failed to parse named argument key");_[2]=k}else C|=2;if(C===3)throw new Error("[sprintf] mixing positional and named placeholders is not (yet) supported");y.push({placeholder:_[0],param_no:_[1],keys:_[2],sign:_[3],pad_char:_[4],align:_[5],width:_[6],precision:_[7],type:_[8]})}else throw new SyntaxError("[sprintf] unexpected placeholder");x=x.substring(_[0].length)}return v[p]=y}i.sprintf=u,i.vsprintf=c,typeof window!="undefined"&&(window.sprintf=u,window.vsprintf=c,s=(function(){return{sprintf:u,vsprintf:c}}).call(i,o,i,a),s!==void 0&&(a.exports=s))})()}),3711:(function(a,i,o){"use strict";a.exports=g;var s=o(2640),l=o(781),u={"2d":function(p,x,_){var y=p({order:x,scalarArguments:3,getters:_==="generic"?[0]:void 0,phase:function(k,S,L,w){return k>w|0},vertex:function(k,S,L,w,A,T,m,F,E,I,R,B,O){var V=(m<<0)+(F<<1)+(E<<2)+(I<<3)|0;if(!(V===0||V===15))switch(V){case 0:R.push([k-.5,S-.5]);break;case 1:R.push([k-.25-.25*(w+L-2*O)/(L-w),S-.25-.25*(A+L-2*O)/(L-A)]);break;case 2:R.push([k-.75-.25*(-w-L+2*O)/(w-L),S-.25-.25*(T+w-2*O)/(w-T)]);break;case 3:R.push([k-.5,S-.5-.5*(A+L+T+w-4*O)/(L-A+w-T)]);break;case 4:R.push([k-.25-.25*(T+A-2*O)/(A-T),S-.75-.25*(-A-L+2*O)/(A-L)]);break;case 5:R.push([k-.5-.5*(w+L+T+A-4*O)/(L-w+A-T),S-.5]);break;case 6:R.push([k-.5-.25*(-w-L+T+A)/(w-L+A-T),S-.5-.25*(-A-L+T+w)/(A-L+w-T)]);break;case 7:R.push([k-.75-.25*(T+A-2*O)/(A-T),S-.75-.25*(T+w-2*O)/(w-T)]);break;case 8:R.push([k-.75-.25*(-T-A+2*O)/(T-A),S-.75-.25*(-T-w+2*O)/(T-w)]);break;case 9:R.push([k-.5-.25*(w+L+-T-A)/(L-w+T-A),S-.5-.25*(A+L+-T-w)/(L-A+T-w)]);break;case 10:R.push([k-.5-.5*(-w-L+-T-A+4*O)/(w-L+T-A),S-.5]);break;case 11:R.push([k-.25-.25*(-T-A+2*O)/(T-A),S-.75-.25*(A+L-2*O)/(L-A)]);break;case 12:R.push([k-.5,S-.5-.5*(-A-L+-T-w+4*O)/(A-L+T-w)]);break;case 13:R.push([k-.75-.25*(w+L-2*O)/(L-w),S-.25-.25*(-T-w+2*O)/(T-w)]);break;case 14:R.push([k-.25-.25*(-w-L+2*O)/(w-L),S-.25-.25*(-A-L+2*O)/(A-L)]);break;case 15:R.push([k-.5,S-.5]);break}},cell:function(k,S,L,w,A,T,m,F,E){A?F.push([k,S]):F.push([S,k])}});return function(C,k){var S=[],L=[];return y(C,S,L,k),{positions:S,cells:L}}}};function c(p,x){var _=p.length+"d",y=u[_];if(y)return y(s,p,x)}function f(p,x){for(var _=l(p,x),y=_.length,C=new Array(y),k=new Array(y),S=0;SMath.max(w,A)?T[2]=1:w>Math.max(L,A)?T[0]=1:T[1]=1;for(var m=0,F=0,E=0;E<3;++E)m+=S[E]*S[E],F+=T[E]*S[E];for(var E=0;E<3;++E)T[E]-=F/m*S[E];return f(T,T),T}function _(S,L,w,A,T,m,F,E){this.center=s(w),this.up=s(A),this.right=s(T),this.radius=s([m]),this.angle=s([F,E]),this.angle.bounds=[[-1/0,-Math.PI/2],[1/0,Math.PI/2]],this.setDistanceLimits(S,L),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 I=0;I<16;++I)this.computedMatrix[I]=.5;this.recalcMatrix(0)}var y=_.prototype;y.setDistanceLimits=function(S,L){S>0?S=Math.log(S):S=-1/0,L>0?L=Math.log(L):L=1/0,L=Math.max(L,S),this.radius.bounds[0][0]=S,this.radius.bounds[1][0]=L},y.getDistanceLimits=function(S){var L=this.radius.bounds[0];return S?(S[0]=Math.exp(L[0][0]),S[1]=Math.exp(L[1][0]),S):[Math.exp(L[0][0]),Math.exp(L[1][0])]},y.recalcMatrix=function(S){this.center.curve(S),this.up.curve(S),this.right.curve(S),this.radius.curve(S),this.angle.curve(S);for(var L=this.computedUp,w=this.computedRight,A=0,T=0,m=0;m<3;++m)T+=L[m]*w[m],A+=L[m]*L[m];for(var F=Math.sqrt(A),E=0,m=0;m<3;++m)w[m]-=L[m]*T/A,E+=w[m]*w[m],L[m]/=F;for(var I=Math.sqrt(E),m=0;m<3;++m)w[m]/=I;var R=this.computedToward;c(R,L,w),f(R,R);for(var B=Math.exp(this.computedRadius[0]),O=this.computedAngle[0],V=this.computedAngle[1],j=Math.cos(O),q=Math.sin(O),U=Math.cos(V),J=Math.sin(V),ee=this.computedCenter,ce=j*U,ye=q*U,xe=J,ue=-j*J,K=-q*J,_e=U,ne=this.computedEye,ae=this.computedMatrix,m=0;m<3;++m){var pe=ce*w[m]+ye*R[m]+xe*L[m];ae[4*m+1]=ue*w[m]+K*R[m]+_e*L[m],ae[4*m+2]=pe,ae[4*m+3]=0}var ie=ae[1],le=ae[5],me=ae[9],be=ae[2],De=ae[6],Ge=ae[10],ht=le*Ge-me*De,it=me*be-ie*Ge,Oe=ie*De-le*be,ze=g(ht,it,Oe);ht/=ze,it/=ze,Oe/=ze,ae[0]=ht,ae[4]=it,ae[8]=Oe;for(var m=0;m<3;++m)ne[m]=ee[m]+ae[2+4*m]*B;for(var m=0;m<3;++m){for(var E=0,ct=0;ct<3;++ct)E+=ae[m+4*ct]*ne[ct];ae[12+m]=-E}ae[15]=1},y.getMatrix=function(S,L){this.recalcMatrix(S);var w=this.computedMatrix;if(L){for(var A=0;A<16;++A)L[A]=w[A];return L}return w};var C=[0,0,0];y.rotate=function(S,L,w,A){if(this.angle.move(S,L,w),A){this.recalcMatrix(S);var T=this.computedMatrix;C[0]=T[2],C[1]=T[6],C[2]=T[10];for(var m=this.computedUp,F=this.computedRight,E=this.computedToward,I=0;I<3;++I)T[4*I]=m[I],T[4*I+1]=F[I],T[4*I+2]=E[I];u(T,T,A,C);for(var I=0;I<3;++I)m[I]=T[4*I],F[I]=T[4*I+1];this.up.set(S,m[0],m[1],m[2]),this.right.set(S,F[0],F[1],F[2])}},y.pan=function(S,L,w,A){L=L||0,w=w||0,A=A||0,this.recalcMatrix(S);var T=this.computedMatrix,m=Math.exp(this.computedRadius[0]),F=T[1],E=T[5],I=T[9],R=g(F,E,I);F/=R,E/=R,I/=R;var B=T[0],O=T[4],V=T[8],j=B*F+O*E+V*I;B-=F*j,O-=E*j,V-=I*j;var q=g(B,O,V);B/=q,O/=q,V/=q;var U=B*L+F*w,J=O*L+E*w,ee=V*L+I*w;this.center.move(S,U,J,ee);var ce=Math.exp(this.computedRadius[0]);ce=Math.max(1e-4,ce+A),this.radius.set(S,Math.log(ce))},y.translate=function(S,L,w,A){this.center.move(S,L||0,w||0,A||0)},y.setMatrix=function(S,L,w,A){var T=1;typeof w=="number"&&(T=w|0),(T<0||T>3)&&(T=1);var m=(T+2)%3,F=(T+1)%3;L||(this.recalcMatrix(S),L=this.computedMatrix);var E=L[T],I=L[T+4],R=L[T+8];if(A){var O=Math.abs(E),V=Math.abs(I),j=Math.abs(R),q=Math.max(O,V,j);O===q?(E=E<0?-1:1,I=R=0):j===q?(R=R<0?-1:1,E=I=0):(I=I<0?-1:1,E=R=0)}else{var B=g(E,I,R);E/=B,I/=B,R/=B}var U=L[m],J=L[m+4],ee=L[m+8],ce=U*E+J*I+ee*R;U-=E*ce,J-=I*ce,ee-=R*ce;var ye=g(U,J,ee);U/=ye,J/=ye,ee/=ye;var xe=I*ee-R*J,ue=R*U-E*ee,K=E*J-I*U,_e=g(xe,ue,K);xe/=_e,ue/=_e,K/=_e,this.center.jump(S,Ke,Te,Ve),this.radius.idle(S),this.up.jump(S,E,I,R),this.right.jump(S,U,J,ee);var ne,ae;if(T===2){var pe=L[1],ie=L[5],le=L[9],me=pe*U+ie*J+le*ee,be=pe*xe+ie*ue+le*K;it<0?ne=-Math.PI/2:ne=Math.PI/2,ae=Math.atan2(be,me)}else{var De=L[2],Ge=L[6],ht=L[10],it=De*E+Ge*I+ht*R,Oe=De*U+Ge*J+ht*ee,ze=De*xe+Ge*ue+ht*K;ne=Math.asin(p(it)),ae=Math.atan2(ze,Oe)}this.angle.jump(S,ae,ne),this.recalcMatrix(S);var ct=L[2],et=L[6],qe=L[10],we=this.computedMatrix;l(we,L);var Le=we[15],Ke=we[12]/Le,Te=we[13]/Le,Ve=we[14]/Le,$e=Math.exp(this.computedRadius[0]);this.center.jump(S,Ke-ct*$e,Te-et*$e,Ve-qe*$e)},y.lastT=function(){return Math.max(this.center.lastT(),this.up.lastT(),this.right.lastT(),this.radius.lastT(),this.angle.lastT())},y.idle=function(S){this.center.idle(S),this.up.idle(S),this.right.idle(S),this.radius.idle(S),this.angle.idle(S)},y.flush=function(S){this.center.flush(S),this.up.flush(S),this.right.flush(S),this.radius.flush(S),this.angle.flush(S)},y.setDistance=function(S,L){L>0&&this.radius.set(S,Math.log(L))},y.lookAt=function(S,L,w,A){this.recalcMatrix(S),L=L||this.computedEye,w=w||this.computedCenter,A=A||this.computedUp;var T=A[0],m=A[1],F=A[2],E=g(T,m,F);if(!(E<1e-6)){T/=E,m/=E,F/=E;var I=L[0]-w[0],R=L[1]-w[1],B=L[2]-w[2],O=g(I,R,B);if(!(O<1e-6)){I/=O,R/=O,B/=O;var V=this.computedRight,j=V[0],q=V[1],U=V[2],J=T*j+m*q+F*U;j-=J*T,q-=J*m,U-=J*F;var ee=g(j,q,U);if(!(ee<.01&&(j=m*B-F*R,q=F*I-T*B,U=T*R-m*I,ee=g(j,q,U),ee<1e-6))){j/=ee,q/=ee,U/=ee,this.up.set(S,T,m,F),this.right.set(S,j,q,U),this.center.set(S,w[0],w[1],w[2]),this.radius.set(S,Math.log(O));var ce=m*U-F*q,ye=F*j-T*U,xe=T*q-m*j,ue=g(ce,ye,xe);ce/=ue,ye/=ue,xe/=ue;var K=T*I+m*R+F*B,_e=j*I+q*R+U*B,ne=ce*I+ye*R+xe*B,ae=Math.asin(p(K)),pe=Math.atan2(ne,_e),ie=this.angle._state,le=ie[ie.length-1],me=ie[ie.length-2];le=le%(2*Math.PI);var be=Math.abs(le+2*Math.PI-pe),De=Math.abs(le-pe),Ge=Math.abs(le-2*Math.PI-pe);be0?U.pop():new ArrayBuffer(j)}i.mallocArrayBuffer=C;function k(V){return new Uint8Array(C(V),0,V)}i.mallocUint8=k;function S(V){return new Uint16Array(C(2*V),0,V)}i.mallocUint16=S;function L(V){return new Uint32Array(C(4*V),0,V)}i.mallocUint32=L;function w(V){return new Int8Array(C(V),0,V)}i.mallocInt8=w;function A(V){return new Int16Array(C(2*V),0,V)}i.mallocInt16=A;function T(V){return new Int32Array(C(4*V),0,V)}i.mallocInt32=T;function m(V){return new Float32Array(C(4*V),0,V)}i.mallocFloat32=i.mallocFloat=m;function F(V){return new Float64Array(C(8*V),0,V)}i.mallocFloat64=i.mallocDouble=F;function E(V){return c?new Uint8ClampedArray(C(V),0,V):k(V)}i.mallocUint8Clamped=E;function I(V){return f?new BigUint64Array(C(8*V),0,V):null}i.mallocBigUint64=I;function R(V){return v?new BigInt64Array(C(8*V),0,V):null}i.mallocBigInt64=R;function B(V){return new DataView(C(V),0,V)}i.mallocDataView=B;function O(V){V=s.nextPow2(V);var j=s.log2(V),q=x[j];return q.length>0?q.pop():new u(V)}i.mallocBuffer=O,i.clearCache=function(){for(var j=0;j<32;++j)g.UINT8[j].length=0,g.UINT16[j].length=0,g.UINT32[j].length=0,g.INT8[j].length=0,g.INT16[j].length=0,g.INT32[j].length=0,g.FLOAT[j].length=0,g.DOUBLE[j].length=0,g.BIGUINT64[j].length=0,g.BIGINT64[j].length=0,g.UINT8C[j].length=0,p[j].length=0,x[j].length=0}}),1755:(function(a){"use strict";"use restrict";a.exports=i;function i(s){this.roots=new Array(s),this.ranks=new Array(s);for(var l=0;l",U="",J=q.length,ee=U.length,ce=O[0]===C||O[0]===L,ye=0,xe=-ee;ye>-1&&(ye=V.indexOf(q,ye),!(ye===-1||(xe=V.indexOf(U,ye+J),xe===-1)||xe<=ye));){for(var ue=ye;ue=xe)j[ue]=null,V=V.substr(0,ue)+" "+V.substr(ue+1);else if(j[ue]!==null){var K=j[ue].indexOf(O[0]);K===-1?j[ue]+=O:ce&&(j[ue]=j[ue].substr(0,K+1)+(1+parseInt(j[ue][K+1]))+j[ue].substr(K+2))}var _e=ye+J,ne=V.substr(_e,xe-_e),ae=ne.indexOf(q);ae!==-1?ye=ae:ye=xe+ee}return j}function T(B,O,V){for(var j=O.textAlign||"start",q=O.textBaseline||"alphabetic",U=[1<<30,1<<30],J=[0,0],ee=B.length,ce=0;ce/g,` `):V=V.replace(/\/g," ");var J="",ee=[];for(le=0;le-1?parseInt(Te[1+ot]):0,We=tt>-1?parseInt(Ve[1+tt]):0;nt!==We&&($e=$e.replace(Oe(),"?px "),De*=Math.pow(.75,We-nt),$e=$e.replace("?px ",Oe())),be+=.25*K*(We-nt)}if(U.superscripts===!0){var mt=Te.indexOf(C),bt=Ve.indexOf(C),Yt=mt>-1?parseInt(Te[1+mt]):0,jt=bt>-1?parseInt(Ve[1+bt]):0;Yt!==jt&&($e=$e.replace(Oe(),"?px "),De*=Math.pow(.75,jt-Yt),$e=$e.replace("?px ",Oe())),be-=.25*K*(jt-Yt)}if(U.bolds===!0){var mr=Te.indexOf(p)>-1,or=Ve.indexOf(p)>-1;!mr&&or&&(fr?$e=$e.replace("italic ","italic bold "):$e="bold "+$e),mr&&!or&&($e=$e.replace("bold ",""))}if(U.italics===!0){var fr=Te.indexOf(_)>-1,Ot=Ve.indexOf(_)>-1;!fr&&Ot&&($e="italic "+$e),fr&&!Ot&&($e=$e.replace("italic ",""))}O.font=$e}for(ie=0;ie0&&(q=j.size),j.lineSpacing&&j.lineSpacing>0&&(U=j.lineSpacing),j.styletags&&j.styletags.breaklines&&(J.breaklines=!!j.styletags.breaklines),j.styletags&&j.styletags.bolds&&(J.bolds=!!j.styletags.bolds),j.styletags&&j.styletags.italics&&(J.italics=!!j.styletags.italics),j.styletags&&j.styletags.subscripts&&(J.subscripts=!!j.styletags.subscripts),j.styletags&&j.styletags.superscripts&&(J.superscripts=!!j.styletags.superscripts)),V.font=[j.fontStyle,j.fontVariant,j.fontWeight,q+"px",j.font].filter(function(ce){return ce}).join(" "),V.textAlign="start",V.textBaseline="alphabetic",V.direction="ltr";var ee=m(O,V,B,q,U,J);return I(ee,j,q)}}),1538:(function(a){(function(){"use strict";if(typeof ses!="undefined"&&ses.ok&&!ses.ok())return;function o(E){E.permitHostObjects___&&E.permitHostObjects___(o)}typeof ses!="undefined"&&(ses.weakMapPermitHostObjects=o);var s=!1;if(typeof WeakMap=="function"){var l=WeakMap;if(!(typeof navigator!="undefined"&&/Firefox/.test(navigator.userAgent))){var u=new l,c=Object.freeze({});if(u.set(c,1),u.get(c)!==1)s=!0;else{a.exports=WeakMap;return}}}var f=Object.prototype.hasOwnProperty,v=Object.getOwnPropertyNames,g=Object.defineProperty,p=Object.isExtensible,x="weakmap:",_=x+"ident:"+Math.random()+"___";if(typeof crypto!="undefined"&&typeof crypto.getRandomValues=="function"&&typeof ArrayBuffer=="function"&&typeof Uint8Array=="function"){var y=new ArrayBuffer(25),C=new Uint8Array(y);crypto.getRandomValues(C),_=x+"rand:"+Array.prototype.map.call(C,function(E){return(E%36).toString(36)}).join("")+"___"}function k(E){return!(E.substr(0,x.length)==x&&E.substr(E.length-3)==="___")}if(g(Object,"getOwnPropertyNames",{value:function(I){return v(I).filter(k)}}),"getPropertyNames"in Object){var S=Object.getPropertyNames;g(Object,"getPropertyNames",{value:function(I){return S(I).filter(k)}})}function L(E){if(E!==Object(E))throw new TypeError("Not an object: "+E);var I=E[_];if(I&&I.key===E)return I;if(p(E)){I={key:E};try{return g(E,_,{value:I,writable:!1,enumerable:!1,configurable:!1}),I}catch(R){return}}}(function(){var E=Object.freeze;g(Object,"freeze",{value:function(O){return L(O),E(O)}});var I=Object.seal;g(Object,"seal",{value:function(O){return L(O),I(O)}});var R=Object.preventExtensions;g(Object,"preventExtensions",{value:function(O){return L(O),R(O)}})})();function w(E){return E.prototype=null,Object.freeze(E)}var A=!1;function T(){!A&&typeof console!="undefined"&&(A=!0,console.warn("WeakMap should be invoked as new WeakMap(), not WeakMap(). This will be an error in the future."))}var m=0,F=function(){this instanceof F||T();var E=[],I=[],R=m++;function B(q,U){var J,ee=L(q);return ee?R in ee?ee[R]:U:(J=E.indexOf(q),J>=0?I[J]:U)}function O(q){var U=L(q);return U?R in U:E.indexOf(q)>=0}function V(q,U){var J,ee=L(q);return ee?ee[R]=U:(J=E.indexOf(q),J>=0?I[J]=U:(J=E.length,I[J]=U,E[J]=q)),this}function j(q){var U=L(q),J,ee;return U?R in U&&delete U[R]:(J=E.indexOf(q),J<0?!1:(ee=E.length-1,E[J]=void 0,I[J]=I[ee],E[J]=E[ee],E.length=ee,I.length=ee,!0))}return Object.create(F.prototype,{get___:{value:w(B)},has___:{value:w(O)},set___:{value:w(V)},delete___:{value:w(j)}})};F.prototype=Object.create(Object.prototype,{get:{value:function(I,R){return this.get___(I,R)},writable:!0,configurable:!0},has:{value:function(I){return this.has___(I)},writable:!0,configurable:!0},set:{value:function(I,R){return this.set___(I,R)},writable:!0,configurable:!0},delete:{value:function(I){return this.delete___(I)},writable:!0,configurable:!0}}),typeof l=="function"?(function(){s&&typeof Proxy!="undefined"&&(Proxy=void 0);function E(){this instanceof F||T();var I=new l,R=void 0,B=!1;function O(U,J){return R?I.has(U)?I.get(U):R.get___(U,J):I.get(U,J)}function V(U){return I.has(U)||(R?R.has___(U):!1)}var j;s?j=function(U,J){return I.set(U,J),I.has(U)||(R||(R=new F),R.set(U,J)),this}:j=function(U,J){if(B)try{I.set(U,J)}catch(ee){R||(R=new F),R.set___(U,J)}else I.set(U,J);return this};function q(U){var J=!!I.delete(U);return R&&R.delete___(U)||J}return Object.create(F.prototype,{get___:{value:w(O)},has___:{value:w(V)},set___:{value:w(j)},delete___:{value:w(q)},permitHostObjects___:{value:w(function(U){if(U===o)B=!0;else throw new Error("bogus call to permitHostObjects___")})}})}E.prototype=F.prototype,a.exports=E,Object.defineProperty(WeakMap.prototype,"constructor",{value:WeakMap,enumerable:!1,configurable:!0,writable:!0})})():(typeof Proxy!="undefined"&&(Proxy=void 0),a.exports=F)})()}),236:(function(a,i,o){var s=o(8284);a.exports=l;function l(){var u={};return function(c){if((typeof c!="object"||c===null)&&typeof c!="function")throw new Error("Weakmap-shim: Key must be object");var f=c.valueOf(u);return f&&f.identity===u?f:s(c,u)}}}),8284:(function(a){a.exports=i;function i(o,s){var l={identity:s},u=o.valueOf;return Object.defineProperty(o,"valueOf",{value:function(c){return c!==s?u.apply(this,arguments):l},writable:!0}),l}}),606:(function(a,i,o){var s=o(236);a.exports=l;function l(){var u=s();return{get:function(c,f){var v=u(c);return v.hasOwnProperty("value")?v.value:f},set:function(c,f){return u(c).value=f,this},has:function(c){return"value"in u(c)},delete:function(c){return delete u(c).value}}}}),3349:(function(a){"use strict";function i(){return function(f,v,g,p,x,_){var y=f[0],C=g[0],k=[0],S=C;p|=0;var L=0,w=C;for(L=0;L=0!=T>=0&&x.push(k[0]+.5+.5*(A+T)/(A-T))}p+=w,++k[0]}}}function o(){return i()}var s=o;function l(f){var v={};return function(p,x,_){var y=p.dtype,C=p.order,k=[y,C.join()].join(),S=v[k];return S||(v[k]=S=f([y,C])),S(p.shape.slice(0),p.data,p.stride,p.offset|0,x,_)}}function u(f){return l(s.bind(void 0,f))}function c(f){return u({funcName:f.funcName})}a.exports=c({funcName:"zeroCrossings"})}),781:(function(a,i,o){"use strict";a.exports=l;var s=o(3349);function l(u,c){var f=[];return c=+c||0,s(u.hi(u.shape[0]-1),f,c),f}}),7790:(function(){})},t={};function r(a){var i=t[a];if(i!==void 0)return i.exports;var o=t[a]={id:a,loaded:!1,exports:{}};return e[a].call(o.exports,o,o.exports,r),o.loaded=!0,o.exports}(function(){r.g=(function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch(a){if(typeof window=="object")return window}})()})(),(function(){r.nmd=function(a){return a.paths=[],a.children||(a.children=[]),a}})();var n=r(1964);$Pe.exports=n})()});var Mg=fe((q3r,KPe)=>{"use strict";var{normalize:HBt}=ni();function jBt(e){return e?HBt(e):[0,0,0,1]}KPe.exports=jBt});var Sg=fe((B3r,nFe)=>{"use strict";var tFe=aa(),cP=js(),$w=ni(),WBt=tc().defaultLine,JPe=Gf().isArrayOrTypedArray,pY=$w.normalize(WBt),rFe=1;function QPe(e,t){return[e[0],e[1],e[2],e[3]*t]}function vY(e){return tFe(e)||!$w.isChannelArray(e)&&!$w.isValid(e)?pY:$w.normalize(e)}function eFe(e){return tFe(e)?e:rFe}function YBt(e,t,r){var n=e.color;n&&n._inputArray&&(n=n._inputArray);var a=JPe(n),i=JPe(t),o=cP.extractOpts(e),s=[],l,u,c,f,v;if(o.colorscale!==void 0?l=cP.makeColorScaleFuncFromTrace(e):l=vY,a?u=(p,x)=>p[x]===void 0?pY:o.colorscale===void 0?l(p[x]):$w.normalize(l(p[x])):u=vY,i?c=function(p,x){return p[x]===void 0?rFe:eFe(p[x])}:c=eFe,a||i)for(var g=0;g{"use strict";iFe.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]}});var fP=fe((N3r,aFe)=>{"use strict";aFe.exports={circle:"\u25CF","circle-open":"\u25CB",square:"\u25A0","square-open":"\u25A1",diamond:"\u25C6","diamond-open":"\u25C7",cross:"+",x:"\u274C"}});var sFe=fe((U3r,oFe)=>{"use strict";var ZBt=bi();function mY(e,t,r,n){if(!t||!t.visible)return null;for(var a=ZBt.getComponentMethod("errorbars","makeComputeError")(t),i=new Array(e.length),o=0;o0){var f=n.c2l(u);n._lowerLogErrorBound||(n._lowerLogErrorBound=f),n._lowerErrorBound=Math.min(n._lowerLogErrorBound,f)}}else i[o]=[-s[0]*r,s[1]*r]}return i}function $Bt(e){for(var t=0;t{"use strict";var JBt=xf().gl_line3d,lFe=xf().gl_scatter3d,QBt=xf().gl_error3d,eOt=xf().gl_mesh3d,tOt=xf().delaunay_triangulate,Eg=Xt(),dFe=Mg(),hP=Sg().formatColor,rOt=lT(),yY=gY(),nOt=fP(),iOt=Yi(),aOt=Sd().appendArrayPointValue,oOt=sFe();function vFe(e,t){this.scene=e,this.uid=t,this.linePlot=null,this.scatterPlot=null,this.errorBars=null,this.textMarkers=null,this.delaunayMesh=null,this.color=null,this.mode="",this.dataPoints=[],this.axesBounds=[[-1/0,-1/0,-1/0],[1/0,1/0,1/0]],this.textLabels=null,this.data=null}var _Y=vFe.prototype;_Y.handlePick=function(e){if(e.object&&(e.object===this.linePlot||e.object===this.delaunayMesh||e.object===this.textMarkers||e.object===this.scatterPlot)){var t=e.index=e.data.index;return e.object.highlight&&e.object.highlight(null),this.scatterPlot&&(e.object=this.scatterPlot,this.scatterPlot.highlight(e.data)),e.textLabel="",this.textLabels&&(Eg.isArrayOrTypedArray(this.textLabels)?(this.textLabels[t]||this.textLabels[t]===0)&&(e.textLabel=this.textLabels[t]):e.textLabel=this.textLabels),e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]],!0}};function sOt(e,t,r){var n=(r+1)%3,a=(r+2)%3,i=[],o=[],s;for(s=0;s-1?-1:e.indexOf("right")>-1?1:0}function cFe(e){return e==null?0:e.indexOf("top")>-1?-1:e.indexOf("bottom")>-1?1:0}function uOt(e){var t=0,r=0,n=[t,r];if(Array.isArray(e))for(var a=0;a=0){var u=sOt(s.position,s.delaunayColor,s.delaunayAxis);u.opacity=e.opacity,this.delaunayMesh?this.delaunayMesh.update(u):(u.gl=t,this.delaunayMesh=eOt(u),this.delaunayMesh._trace=this,this.scene.glplot.add(this.delaunayMesh))}else this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose(),this.delaunayMesh=null)};_Y.dispose=function(){this.linePlot&&(this.scene.glplot.remove(this.linePlot),this.linePlot.dispose()),this.scatterPlot&&(this.scene.glplot.remove(this.scatterPlot),this.scatterPlot.dispose()),this.errorBars&&(this.scene.glplot.remove(this.errorBars),this.errorBars.dispose()),this.textMarkers&&(this.scene.glplot.remove(this.textMarkers),this.textMarkers.dispose()),this.delaunayMesh&&(this.scene.glplot.remove(this.delaunayMesh),this.delaunayMesh.dispose())};function dOt(e,t){var r=new vFe(e,t.uid);return r.update(t),r}pFe.exports=dOt});var MY=fe((G3r,_Fe)=>{"use strict";var kg=Ol(),vOt=Ds(),AY=_s(),bY=pl().axisHoverFormat,{hovertemplateAttrs:pOt,texttemplateAttrs:gOt,templatefallbackAttrs:mFe}=Oo(),yFe=Ho(),mOt=gY(),yOt=fP(),Ep=ta().extendFlat,xOt=rl().overrideAll,xFe=(bx(),Gs(_x)).default,_Ot=kg.line,n_=kg.marker,bOt=n_.line,wOt=Ep({width:_Ot.width,dash:{valType:"enumerated",values:xFe(mOt),dflt:"solid"}},AY("line"));function wY(e){return{show:{valType:"boolean",dflt:!1},opacity:{valType:"number",min:0,max:1,dflt:1},scale:{valType:"number",min:0,max:10,dflt:2/3}}}var TY=_Fe.exports=xOt({x:kg.x,y:kg.y,z:{valType:"data_array"},text:Ep({},kg.text,{}),texttemplate:gOt(),texttemplatefallback:mFe({editType:"calc"}),hovertext:Ep({},kg.hovertext,{}),hovertemplate:pOt(),hovertemplatefallback:mFe(),xhoverformat:bY("x"),yhoverformat:bY("y"),zhoverformat:bY("z"),mode:Ep({},kg.mode,{dflt:"lines+markers"}),surfaceaxis:{valType:"enumerated",values:[-1,0,1,2],dflt:-1},surfacecolor:{valType:"color"},projection:{x:wY("x"),y:wY("y"),z:wY("z")},connectgaps:kg.connectgaps,line:wOt,marker:Ep({symbol:{valType:"enumerated",values:xFe(yOt),dflt:"circle",arrayOk:!0},size:Ep({},n_.size,{dflt:8}),sizeref:n_.sizeref,sizemin:n_.sizemin,sizemode:n_.sizemode,opacity:Ep({},n_.opacity,{arrayOk:!1}),colorbar:n_.colorbar,line:Ep({width:Ep({},bOt.width,{arrayOk:!1})},AY("marker.line"))},AY("marker")),textposition:Ep({},kg.textposition,{dflt:"top center"}),textfont:vOt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,variantValues:["normal","small-caps"]}),opacity:yFe.opacity,hoverinfo:Ep({},yFe.hoverinfo)},"calc","nested");TY.x.editType=TY.y.editType=TY.z.editType="calc+clearAxisTypes"});var TFe=fe((H3r,wFe)=>{"use strict";var bFe=bi(),TOt=Xt(),SY=Is(),AOt=vv(),MOt=lp(),SOt=up(),EOt=MY();wFe.exports=function(t,r,n,a){function i(g,p){return TOt.coerce(t,r,EOt,g,p)}var o=kOt(t,r,i,a);if(!o){r.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),i("mode"),SY.hasMarkers(r)&&AOt(t,r,n,a,i,{noAngle:!0,noLineDash:!0,noSelect:!0}),SY.hasLines(r)&&(i("connectgaps"),MOt(t,r,n,a,i)),SY.hasText(r)&&(i("texttemplate"),i("texttemplatefallback"),SOt(t,r,a,i,{noSelect:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}));var s=(r.line||{}).color,l=(r.marker||{}).color;i("surfaceaxis")>=0&&i("surfacecolor",s||l);for(var u=["x","y","z"],c=0;c<3;++c){var f="projection."+u[c];i(f+".show")&&(i(f+".opacity"),i(f+".scale"))}var v=bFe.getComponentMethod("errorbars","supplyDefaults");v(t,r,s||l||n,{axis:"z"}),v(t,r,s||l||n,{axis:"y",inherit:"z"}),v(t,r,s||l||n,{axis:"x",inherit:"z"})};function kOt(e,t,r,n){var a=0,i=r("x"),o=r("y"),s=r("z"),l=bFe.getComponentMethod("calendars","handleTraceDefaults");return l(e,t,["x","y","z"],n),i&&o&&s&&(a=Math.min(i.length,o.length,s.length),t._length=t._xlength=t._ylength=t._zlength=a),a}});var MFe=fe((j3r,AFe)=>{"use strict";var COt=o1(),LOt=pv();AFe.exports=function(t,r){var n=[{x:!1,y:!1,trace:r,t:{}}];return COt(n,r),LOt(t,r),n}});var EFe=fe((W3r,SFe)=>{SFe.exports=POt;function POt(e,t){if(typeof e!="string")throw new TypeError("must specify type string");if(t=t||{},typeof document=="undefined"&&!t.canvas)return null;var r=t.canvas||document.createElement("canvas");typeof t.width=="number"&&(r.width=t.width),typeof t.height=="number"&&(r.height=t.height);var n=t,a;try{var i=[e];e.indexOf("webgl")===0&&i.push("experimental-"+e);for(var o=0;o{var FOt=EFe();kFe.exports=function(t){return FOt("webgl",t)}});var EY=fe((X3r,PFe)=>{"use strict";var LFe=ni(),DOt=function(){};PFe.exports=function(t){for(var r in t)typeof t[r]=="function"&&(t[r]=DOt);t.destroy=function(){t.container.parentNode.removeChild(t.container)};var n=document.createElement("div");n.className="no-webgl",n.style.cursor="pointer",n.style.fontSize="24px",n.style.color=LFe.defaults[0],n.style.position="absolute",n.style.left=n.style.top="0px",n.style.width=n.style.height="100%",n.style["background-color"]=LFe.lightLine,n.style["z-index"]=30;var a=document.createElement("p");return a.textContent="WebGL is not supported by your browser - visit https://get.webgl.org for more info",a.style.position="relative",a.style.top="50%",a.style.left="50%",a.style.height="30%",a.style.width="50%",a.style.margin="-15% 0 0 -25%",n.appendChild(a),t.container.appendChild(n),t.container.style.background="#FFFFFF",t.container.onclick=function(){window.open("https://get.webgl.org")},!1}});var RFe=fe((Z3r,DFe)=>{"use strict";var i_=Mg(),ROt=Xt(),IOt=["xaxis","yaxis","zaxis"];function FFe(){this.bounds=[[-10,-10,-10],[10,10,10]],this.ticks=[[],[],[]],this.tickEnable=[!0,!0,!0],this.tickFont=["sans-serif","sans-serif","sans-serif"],this.tickSize=[12,12,12],this.tickFontWeight=["normal","normal","normal","normal"],this.tickFontStyle=["normal","normal","normal","normal"],this.tickFontVariant=["normal","normal","normal","normal"],this.tickAngle=[0,0,0],this.tickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.tickPad=[18,18,18],this.labels=["x","y","z"],this.labelEnable=[!0,!0,!0],this.labelFont=["Open Sans","Open Sans","Open Sans"],this.labelSize=[20,20,20],this.labelFontWeight=["normal","normal","normal","normal"],this.labelFontStyle=["normal","normal","normal","normal"],this.labelFontVariant=["normal","normal","normal","normal"],this.labelColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.labelPad=[30,30,30],this.lineEnable=[!0,!0,!0],this.lineMirror=[!1,!1,!1],this.lineWidth=[1,1,1],this.lineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.lineTickEnable=[!0,!0,!0],this.lineTickMirror=[!1,!1,!1],this.lineTickLength=[10,10,10],this.lineTickWidth=[1,1,1],this.lineTickColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.gridEnable=[!0,!0,!0],this.gridWidth=[1,1,1],this.gridColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroEnable=[!0,!0,!0],this.zeroLineColor=[[0,0,0,1],[0,0,0,1],[0,0,0,1]],this.zeroLineWidth=[2,2,2],this.backgroundEnable=[!0,!0,!0],this.backgroundColor=[[.8,.8,.8,.5],[.8,.8,.8,.5],[.8,.8,.8,.5]],this._defaultTickPad=this.tickPad.slice(),this._defaultLabelPad=this.labelPad.slice(),this._defaultLineTickLength=this.lineTickLength.slice()}var zOt=FFe.prototype;zOt.merge=function(e,t){for(var r=this,n=0;n<3;++n){var a=t[IOt[n]];if(!a.visible){r.tickEnable[n]=!1,r.labelEnable[n]=!1,r.lineEnable[n]=!1,r.lineTickEnable[n]=!1,r.gridEnable[n]=!1,r.zeroEnable[n]=!1,r.backgroundEnable[n]=!1;continue}r.labels[n]=e._meta?ROt.templateString(a.title.text,e._meta):a.title.text,"font"in a.title&&(a.title.font.color&&(r.labelColor[n]=i_(a.title.font.color)),a.title.font.family&&(r.labelFont[n]=a.title.font.family),a.title.font.size&&(r.labelSize[n]=a.title.font.size),a.title.font.weight&&(r.labelFontWeight[n]=a.title.font.weight),a.title.font.style&&(r.labelFontStyle[n]=a.title.font.style),a.title.font.variant&&(r.labelFontVariant[n]=a.title.font.variant)),"showline"in a&&(r.lineEnable[n]=a.showline),"linecolor"in a&&(r.lineColor[n]=i_(a.linecolor)),"linewidth"in a&&(r.lineWidth[n]=a.linewidth),"showgrid"in a&&(r.gridEnable[n]=a.showgrid),"gridcolor"in a&&(r.gridColor[n]=i_(a.gridcolor)),"gridwidth"in a&&(r.gridWidth[n]=a.gridwidth),a.type==="log"?r.zeroEnable[n]=!1:"zeroline"in a&&(r.zeroEnable[n]=a.zeroline),"zerolinecolor"in a&&(r.zeroLineColor[n]=i_(a.zerolinecolor)),"zerolinewidth"in a&&(r.zeroLineWidth[n]=a.zerolinewidth),"ticks"in a&&a.ticks?r.lineTickEnable[n]=!0:r.lineTickEnable[n]=!1,"ticklen"in a&&(r.lineTickLength[n]=r._defaultLineTickLength[n]=a.ticklen),"tickcolor"in a&&(r.lineTickColor[n]=i_(a.tickcolor)),"tickwidth"in a&&(r.lineTickWidth[n]=a.tickwidth),"tickangle"in a&&(r.tickAngle[n]=a.tickangle==="auto"?-3600:Math.PI*-a.tickangle/180),"showticklabels"in a&&(r.tickEnable[n]=a.showticklabels),"tickfont"in a&&(a.tickfont.color&&(r.tickColor[n]=i_(a.tickfont.color)),a.tickfont.family&&(r.tickFont[n]=a.tickfont.family),a.tickfont.size&&(r.tickSize[n]=a.tickfont.size),a.tickfont.weight&&(r.tickFontWeight[n]=a.tickfont.weight),a.tickfont.style&&(r.tickFontStyle[n]=a.tickfont.style),a.tickfont.variant&&(r.tickFontVariant[n]=a.tickfont.variant)),"mirror"in a?["ticks","all","allticks"].indexOf(a.mirror)!==-1?(r.lineTickMirror[n]=!0,r.lineMirror[n]=!0):a.mirror===!0?(r.lineTickMirror[n]=!1,r.lineMirror[n]=!0):(r.lineTickMirror[n]=!1,r.lineMirror[n]=!1):r.lineMirror[n]=!1,"showbackground"in a&&a.showbackground!==!1?(r.backgroundEnable[n]=!0,r.backgroundColor[n]=i_(a.backgroundcolor)):r.backgroundEnable[n]=!1}};function qOt(e,t){var r=new FFe;return r.merge(e,t),r}DFe.exports=qOt});var qFe=fe(($3r,zFe)=>{"use strict";var BOt=Mg(),OOt=["xaxis","yaxis","zaxis"];function IFe(){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 NOt=IFe.prototype;NOt.merge=function(e){for(var t=0;t<3;++t){var r=e[OOt[t]];if(!r.visible){this.enabled[t]=!1,this.drawSides[t]=!1;continue}this.enabled[t]=r.showspikes,this.colors[t]=BOt(r.spikecolor),this.drawSides[t]=r.spikesides,this.lineWidth[t]=r.spikethickness}};function UOt(e){var t=new IFe;return t.merge(e),t}zFe.exports=UOt});var NFe=fe((K3r,OFe)=>{"use strict";OFe.exports=WOt;var BFe=Yi(),VOt=Xt(),GOt=["xaxis","yaxis","zaxis"],HOt=[0,0,0];function jOt(e){for(var t=new Array(3),r=0;r<3;++r){for(var n=e[r],a=new Array(n.length),i=0;i/g," "));a[i]=u,o.tickmode=s}}t.ticks=a;for(var i=0;i<3;++i){HOt[i]=.5*(e.glplot.bounds[0][i]+e.glplot.bounds[1][i]);for(var c=0;c<2;++c)t.bounds[c][i]=e.glplot.bounds[c][i]}e.contourLevels=jOt(a)}});var YFe=fe((J3r,WFe)=>{"use strict";var GFe=xf().gl_plot3d,YOt=GFe.createCamera,UFe=GFe.createScene,XOt=CFe(),ZOt=Uk(),pP=bi(),Dd=Xt(),vP=Dd.preserveDrawingBuffer(),gP=Yi(),kp=kl(),$Ot=Mg(),KOt=EY(),JOt=VU(),QOt=RFe(),eNt=qFe(),tNt=NFe(),rNt=rp().applyAutorangeOptions,rM,dP,HFe=!1;function jFe(e,t){var r=document.createElement("div"),n=e.container;this.graphDiv=e.graphDiv;var a=document.createElementNS("http://www.w3.org/2000/svg","svg");a.style.position="absolute",a.style.top=a.style.left="0px",a.style.width=a.style.height="100%",a.style["z-index"]=20,a.style["pointer-events"]="none",r.appendChild(a),this.svgContainer=a,r.id=e.id,r.style.position="absolute",r.style.top=r.style.left="0px",r.style.width=r.style.height="100%",n.appendChild(r),this.fullLayout=t,this.id=e.id||"scene",this.fullSceneLayout=t[this.id],this.plotArgs=[[],{},{}],this.axesOptions=QOt(t,t[this.id]),this.spikeOptions=eNt(t[this.id]),this.container=r,this.staticMode=!!e.staticPlot,this.pixelRatio=this.pixelRatio||e.plotGlPixelRatio||2,this.dataScale=[1,1,1],this.contourLevels=[[],[],[]],this.convertAnnotations=pP.getComponentMethod("annotations3d","convert"),this.drawAnnotations=pP.getComponentMethod("annotations3d","draw"),this.initializeGLPlot()}var Dh=jFe.prototype;Dh.prepareOptions=function(){var e=this,t={canvas:e.canvas,gl:e.gl,glOptions:{preserveDrawingBuffer:vP,premultipliedAlpha:!0,antialias:!0},container:e.container,axes:e.axesOptions,spikes:e.spikeOptions,pickRadius:10,snapToData:!0,autoScale:!0,autoBounds:!1,cameraObject:e.camera,pixelRatio:e.pixelRatio};if(e.staticMode){if(!dP&&(rM=document.createElement("canvas"),dP=XOt({canvas:rM,preserveDrawingBuffer:!0,premultipliedAlpha:!0,antialias:!0}),!dP))throw new Error("error creating static canvas/context for image server");t.gl=dP,t.canvas=rM}return t};var VFe=!0;Dh.tryCreatePlot=function(){var e=this,t=e.prepareOptions(),r=!0;try{e.glplot=UFe(t)}catch(n){if(e.staticMode||!VFe||vP)r=!1;else{Dd.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{vP=t.glOptions.preserveDrawingBuffer=!0,e.glplot=UFe(t)}catch(a){vP=t.glOptions.preserveDrawingBuffer=!1,r=!1}}}return VFe=!1,r};Dh.initializeGLCamera=function(){var e=this,t=e.fullSceneLayout.camera,r=t.projection.type==="orthographic";e.camera=YOt(e.container,{center:[t.center.x,t.center.y,t.center.z],eye:[t.eye.x,t.eye.y,t.eye.z],up:[t.up.x,t.up.y,t.up.z],_ortho:r,zoomMin:.01,zoomMax:100,mode:"orbit"})};Dh.initializeGLPlot=function(){var e=this;e.initializeGLCamera();var t=e.tryCreatePlot();if(!t)return KOt(e);e.traces={},e.make4thDimension();var r=e.graphDiv,n=r.layout,a=function(){var o={};return e.isCameraChanged(n)&&(o[e.id+".camera"]=e.getCamera()),e.isAspectChanged(n)&&(o[e.id+".aspectratio"]=e.glplot.getAspectratio(),n[e.id].aspectmode!=="manual"&&(e.fullSceneLayout.aspectmode=n[e.id].aspectmode=o[e.id+".aspectmode"]="manual")),o},i=function(o){if(o.fullSceneLayout.dragmode!==!1){var s=a();o.saveLayout(n),o.graphDiv.emit("plotly_relayout",s)}};return e.glplot.canvas&&(e.glplot.canvas.addEventListener("mouseup",function(){i(e)}),e.glplot.canvas.addEventListener("touchstart",function(){HFe=!0}),e.glplot.canvas.addEventListener("wheel",function(o){if(r._context._scrollZoom.gl3d){if(e.camera._ortho){var s=o.deltaX>o.deltaY?1.1:.9090909090909091,l=e.glplot.getAspectratio();e.glplot.setAspectratio({x:s*l.x,y:s*l.y,z:s*l.z})}i(e)}},ZOt?{passive:!1}:!1),e.glplot.canvas.addEventListener("mousemove",function(){if(e.fullSceneLayout.dragmode!==!1&&e.camera.mouseListener.buttons!==0){var o=a();e.graphDiv.emit("plotly_relayouting",o)}}),e.staticMode||e.glplot.canvas.addEventListener("webglcontextlost",function(o){r&&r.emit&&r.emit("plotly_webglcontextlost",{event:o,layer:e.id})},!1)),e.glplot.oncontextloss=function(){e.recoverContext()},e.glplot.onrender=function(){e.render()},!0};Dh.render=function(){var e=this,t=e.graphDiv,r,n=e.svgContainer,a=e.container.getBoundingClientRect();t._fullLayout._calcInverseTransform(t);var i=t._fullLayout._invScaleX,o=t._fullLayout._invScaleY,s=a.width*i,l=a.height*o;n.setAttributeNS(null,"viewBox","0 0 "+s+" "+l),n.setAttributeNS(null,"width",s),n.setAttributeNS(null,"height",l),tNt(e),e.glplot.axes.update(e.axesOptions);for(var u=Object.keys(e.traces),c=null,f=e.glplot.selection,v=0;v")):r.type==="isosurface"||r.type==="volume"?(y.valueLabel=gP.hoverLabelText(e._mockAxis,e._mockAxis.d2l(f.traceCoordinate[3]),r.valuehoverformat),w.push("value: "+y.valueLabel),f.textLabel&&w.push(f.textLabel),L=w.join("
")):L=f.textLabel;var A={x:f.traceCoordinate[0],y:f.traceCoordinate[1],z:f.traceCoordinate[2],data:x._input,fullData:x,curveNumber:x.index,pointNumber:_};kp.appendArrayPointValue(A,x,_),r._module.eventData&&(A=x._module.eventData(A,f,x,{},_));var T={points:[A]};if(e.fullSceneLayout.hovermode){var m=[];kp.loneHover({trace:x,x:(.5+.5*p[0]/p[3])*s,y:(.5-.5*p[1]/p[3])*l,xLabel:y.xLabel,yLabel:y.yLabel,zLabel:y.zLabel,text:L,name:c.name,color:kp.castHoverOption(x,_,"bgcolor")||c.color,borderColor:kp.castHoverOption(x,_,"bordercolor"),fontFamily:kp.castHoverOption(x,_,"font.family"),fontSize:kp.castHoverOption(x,_,"font.size"),fontColor:kp.castHoverOption(x,_,"font.color"),nameLength:kp.castHoverOption(x,_,"namelength"),textAlign:kp.castHoverOption(x,_,"align"),hovertemplate:Dd.castOption(x,_,"hovertemplate"),hovertemplateLabels:Dd.extendFlat({},A,y),eventData:[A]},{container:n,gd:t,inOut_bbox:m}),A.bbox=m[0]}f.distance<5&&(f.buttons||HFe)?t.emit("plotly_click",T):t.emit("plotly_hover",T),this.oldEventData=T}else kp.loneUnhover(n),this.oldEventData&&t.emit("plotly_unhover",this.oldEventData),this.oldEventData=void 0;e.drawAnnotations(e)};Dh.recoverContext=function(){var e=this;e.glplot.dispose();var t=function(){if(e.glplot.gl.isContextLost()){requestAnimationFrame(t);return}if(!e.initializeGLPlot()){Dd.error("Catastrophic and unrecoverable WebGL error. Context lost.");return}e.plot.apply(e,e.plotArgs)};requestAnimationFrame(t)};var nM=["xaxis","yaxis","zaxis"];function nNt(e,t,r){for(var n=e.fullSceneLayout,a=0;a<3;a++){var i=nM[a],o=i.charAt(0),s=n[i],l=t[o],u=t[o+"calendar"],c=t["_"+o+"length"];if(!Dd.isArrayOrTypedArray(l))r[0][a]=Math.min(r[0][a],0),r[1][a]=Math.max(r[1][a],c-1);else for(var f,v=0;v<(c||l.length);v++)if(Dd.isArrayOrTypedArray(l[v]))for(var g=0;gx[1][o])x[0][o]=-1,x[1][o]=1;else{var E=x[1][o]-x[0][o];x[0][o]-=E/32,x[1][o]+=E/32}if(C=[x[0][o],x[1][o]],C=rNt(C,l),x[0][o]=C[0],x[1][o]=C[1],l.isReversed()){var I=x[0][o];x[0][o]=x[1][o],x[1][o]=I}}else C=l.range,x[0][o]=l.r2l(C[0]),x[1][o]=l.r2l(C[1]);x[0][o]===x[1][o]&&(x[0][o]-=1,x[1][o]+=1),_[o]=x[1][o]-x[0][o],l.range=[x[0][o],x[1][o]],l.limitRange(),n.glplot.setBounds(o,{min:l.range[0]*g[o],max:l.range[1]*g[o]})}var R,B=c.aspectmode;if(B==="cube")R=[1,1,1];else if(B==="manual"){var O=c.aspectratio;R=[O.x,O.y,O.z]}else if(B==="auto"||B==="data"){var V=[1,1,1];for(o=0;o<3;++o){l=c[nM[o]],u=l.type;var j=y[u];V[o]=Math.pow(j.acc,1/j.count)/g[o]}B==="data"||Math.max.apply(null,V)/Math.min.apply(null,V)<=4?R=V:R=[1,1,1]}else throw new Error("scene.js aspectRatio was not one of the enumerated types");c.aspectratio.x=f.aspectratio.x=R[0],c.aspectratio.y=f.aspectratio.y=R[1],c.aspectratio.z=f.aspectratio.z=R[2],n.glplot.setAspectratio(c.aspectratio),n.viewInitial.aspectratio||(n.viewInitial.aspectratio={x:c.aspectratio.x,y:c.aspectratio.y,z:c.aspectratio.z}),n.viewInitial.aspectmode||(n.viewInitial.aspectmode=c.aspectmode);var q=c.domain||null,U=t._size||null;if(q&&U){var J=n.container.style;J.position="absolute",J.left=U.l+q.x[0]*U.w+"px",J.top=U.t+(1-q.y[1])*U.h+"px",J.width=U.w*(q.x[1]-q.x[0])+"px",J.height=U.h*(q.y[1]-q.y[0])+"px"}n.glplot.redraw()}};Dh.destroy=function(){var e=this;e.glplot&&(e.camera.mouseListener.enabled=!1,e.container.removeEventListener("wheel",e.camera.wheelListener),e.camera=null,e.glplot.dispose(),e.container.parentNode.removeChild(e.container),e.glplot=null)};function aNt(e){return[[e.eye.x,e.eye.y,e.eye.z],[e.center.x,e.center.y,e.center.z],[e.up.x,e.up.y,e.up.z]]}function oNt(e){return{up:{x:e.up[0],y:e.up[1],z:e.up[2]},center:{x:e.center[0],y:e.center[1],z:e.center[2]},eye:{x:e.eye[0],y:e.eye[1],z:e.eye[2]},projection:{type:e._ortho===!0?"orthographic":"perspective"}}}Dh.getCamera=function(){var e=this;return e.camera.view.recalcMatrix(e.camera.view.lastT()),oNt(e.camera)};Dh.setViewport=function(e){var t=this,r=e.camera;t.camera.lookAt.apply(this,aNt(r)),t.glplot.setAspectratio(e.aspectratio);var n=r.projection.type==="orthographic",a=t.camera._ortho;n!==a&&(t.glplot.redraw(),t.glplot.clearRGBA(),t.glplot.dispose(),t.initializeGLPlot())};Dh.isCameraChanged=function(e){var t=this,r=t.getCamera(),n=Dd.nestedProperty(e,t.id+".camera"),a=n.get();function i(u,c,f,v){var g=["up","center","eye"],p=["x","y","z"];return c[g[f]]&&u[g[f]][p[v]]===c[g[f]][p[v]]}var o=!1;if(a===void 0)o=!0;else{for(var s=0;s<3;s++)for(var l=0;l<3;l++)if(!i(r,a,s,l)){o=!0;break}(!a.projection||r.projection&&r.projection.type!==a.projection.type)&&(o=!0)}return o};Dh.isAspectChanged=function(e){var t=this,r=t.glplot.getAspectratio(),n=Dd.nestedProperty(e,t.id+".aspectratio"),a=n.get();return a===void 0||a.x!==r.x||a.y!==r.y||a.z!==r.z};Dh.saveLayout=function(e){var t=this,r=t.fullLayout,n,a,i,o,s,l,u=t.isCameraChanged(e),c=t.isAspectChanged(e),f=u||c;if(f){var v={};if(u&&(n=t.getCamera(),a=Dd.nestedProperty(e,t.id+".camera"),i=a.get(),v[t.id+".camera"]=i),c&&(o=t.glplot.getAspectratio(),s=Dd.nestedProperty(e,t.id+".aspectratio"),l=s.get(),v[t.id+".aspectratio"]=l),pP.call("_storeDirectGUIEdit",e,r._preGUI,v),u){a.set(n);var g=Dd.nestedProperty(r,t.id+".camera");g.set(n)}if(c){s.set(o);var p=Dd.nestedProperty(r,t.id+".aspectratio");p.set(o),t.glplot.redraw()}}return f};Dh.updateFx=function(e,t){var r=this,n=r.camera;if(n)if(e==="orbit")n.mode="orbit",n.keyBindingMode="rotate";else if(e==="turntable"){n.up=[0,0,1],n.mode="turntable",n.keyBindingMode="rotate";var a=r.graphDiv,i=a._fullLayout,o=r.fullSceneLayout.camera,s=o.up.x,l=o.up.y,u=o.up.z;if(u/Math.sqrt(s*s+l*l+u*u)<.999){var c=r.id+".camera.up",f={x:0,y:0,z:1},v={};v[c]=f;var g=a.layout;pP.call("_storeDirectGUIEdit",g,i._preGUI,v),o.up=f,Dd.nestedProperty(g,c).set(f)}}else n.keyBindingMode=e;r.fullSceneLayout.hovermode=t};function sNt(e,t,r){for(var n=0,a=r-1;n0)for(var s=255/o,l=0;l<3;++l)e[i+l]=Math.min(s*e[i+l],255)}}Dh.toImage=function(e){var t=this;e||(e="png"),t.staticMode&&t.container.appendChild(rM),t.glplot.redraw();var r=t.glplot.gl,n=r.drawingBufferWidth,a=r.drawingBufferHeight;r.bindFramebuffer(r.FRAMEBUFFER,null);var i=new Uint8Array(n*a*4);r.readPixels(0,0,n,a,r.RGBA,r.UNSIGNED_BYTE,i),sNt(i,n,a),lNt(i,n,a);var o=document.createElement("canvas");o.width=n,o.height=a;var s=o.getContext("2d",{willReadFrequently:!0}),l=s.createImageData(n,a);l.data.set(i),s.putImageData(l,0,0);var u;switch(e){case"jpeg":u=o.toDataURL("image/jpeg");break;case"webp":u=o.toDataURL("image/webp");break;default:u=o.toDataURL("image/png")}return t.staticMode&&t.container.removeChild(rM),u};Dh.setConvert=function(){for(var e=this,t=0;t<3;t++){var r=e.fullSceneLayout[nM[t]];gP.setConvert(r,e.fullLayout),r.setScale=Dd.noop}};Dh.make4thDimension=function(){var e=this,t=e.graphDiv,r=t._fullLayout;e._mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},gP.setConvert(e._mockAxis,r)};WFe.exports=jFe});var ZFe=fe((Q3r,XFe)=>{"use strict";XFe.exports={scene:{valType:"subplotid",dflt:"scene",editType:"calc+clearAxisTypes"}}});var CY=fe((ewr,$Fe)=>{"use strict";var uNt=ni(),Va=pf(),kY=ta().extendFlat,cNt=rl().overrideAll;$Fe.exports=cNt({visible:Va.visible,showspikes:{valType:"boolean",dflt:!0},spikesides:{valType:"boolean",dflt:!0},spikethickness:{valType:"number",min:0,dflt:2},spikecolor:{valType:"color",dflt:uNt.defaultLine},showbackground:{valType:"boolean",dflt:!1},backgroundcolor:{valType:"color",dflt:"rgba(204, 204, 204, 0.5)"},showaxeslabels:{valType:"boolean",dflt:!0},color:Va.color,categoryorder:Va.categoryorder,categoryarray:Va.categoryarray,title:{text:Va.title.text,font:Va.title.font},type:kY({},Va.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Va.autotypenumbers,autorange:Va.autorange,autorangeoptions:{minallowed:Va.autorangeoptions.minallowed,maxallowed:Va.autorangeoptions.maxallowed,clipmin:Va.autorangeoptions.clipmin,clipmax:Va.autorangeoptions.clipmax,include:Va.autorangeoptions.include,editType:"plot"},rangemode:Va.rangemode,minallowed:Va.minallowed,maxallowed:Va.maxallowed,range:kY({},Va.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],anim:!1}),tickmode:Va.minor.tickmode,nticks:Va.nticks,tick0:Va.tick0,dtick:Va.dtick,tickvals:Va.tickvals,ticktext:Va.ticktext,ticks:Va.ticks,mirror:Va.mirror,ticklen:Va.ticklen,tickwidth:Va.tickwidth,tickcolor:Va.tickcolor,showticklabels:Va.showticklabels,labelalias:Va.labelalias,tickfont:Va.tickfont,tickangle:Va.tickangle,tickprefix:Va.tickprefix,showtickprefix:Va.showtickprefix,ticksuffix:Va.ticksuffix,showticksuffix:Va.showticksuffix,showexponent:Va.showexponent,exponentformat:Va.exponentformat,minexponent:Va.minexponent,separatethousands:Va.separatethousands,tickformat:Va.tickformat,tickformatstops:Va.tickformatstops,hoverformat:Va.hoverformat,showline:Va.showline,linecolor:Va.linecolor,linewidth:Va.linewidth,showgrid:Va.showgrid,gridcolor:kY({},Va.gridcolor,{dflt:"rgb(204, 204, 204)"}),gridwidth:Va.gridwidth,zeroline:Va.zeroline,zerolinecolor:Va.zerolinecolor,zerolinewidth:Va.zerolinewidth},"plot","from-root")});var DY=fe((twr,KFe)=>{"use strict";var LY=CY(),fNt=nl().attributes,PY=ta().extendFlat,hNt=Xt().counterRegex;function FY(e,t,r){return{x:{valType:"number",dflt:e,editType:"camera"},y:{valType:"number",dflt:t,editType:"camera"},z:{valType:"number",dflt:r,editType:"camera"},editType:"camera"}}KFe.exports={_arrayAttrRegexps:[hNt("scene",".annotations",!0)],bgcolor:{valType:"color",dflt:"rgba(0,0,0,0)",editType:"plot"},camera:{up:PY(FY(0,0,1),{}),center:PY(FY(0,0,0),{}),eye:PY(FY(1.25,1.25,1.25),{}),projection:{type:{valType:"enumerated",values:["perspective","orthographic"],dflt:"perspective",editType:"calc"},editType:"calc"},editType:"camera"},domain:fNt({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:LY,yaxis:LY,zaxis:LY,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"}});var tDe=fe((rwr,eDe)=>{"use strict";var dNt=ni(),JFe=Xt(),vNt=Mo(),pNt=CY(),gNt=SU(),mNt=vA(),QFe=["xaxis","yaxis","zaxis"],yNt=13600/187;eDe.exports=function(t,r,n){var a,i;function o(u,c){return JFe.coerce(a,i,pNt,u,c)}for(var s=0;s{"use strict";var xNt=Xt(),_Nt=ni(),bNt=bi(),wNt=b2(),TNt=tDe(),rDe=DY(),ANt=jf().getSubplotData,nDe="gl3d";iDe.exports=function(t,r,n){var a=r._basePlotModules.length>1;function i(o){if(!a){var s=xNt.validate(t[o],rDe[o]);if(s)return t[o]}}wNt(t,r,n,{type:nDe,attributes:rDe,handleDefaults:MNt,fullLayout:r,font:r.font,fullData:n,getDfltFromLayout:i,autotypenumbersDflt:r.autotypenumbers,paper_bgcolor:r.paper_bgcolor,calendar:r.calendar})};function MNt(e,t,r,n){for(var a=r("bgcolor"),i=_Nt.combine(a,n.paper_bgcolor),o=["up","center","eye"],s=0;s.999)&&(v="turntable")}else v="turntable";r("dragmode",v),r("hovermode",n.getDfltFromLayout("hovermode"))}});var gy=fe(Rd=>{"use strict";var SNt=rl().overrideAll,ENt=tm(),kNt=YFe(),CNt=jf().getSubplotData,LNt=Xt(),PNt=Q0(),Kw="gl3d",RY="scene";Rd.name=Kw;Rd.attr=RY;Rd.idRoot=RY;Rd.idRegex=Rd.attrRegex=LNt.counterRegex("scene");Rd.attributes=ZFe();Rd.layoutAttributes=DY();Rd.baseLayoutAttrOverrides=SNt({hoverlabel:ENt.hoverlabel},"plot","nested");Rd.supplyLayoutDefaults=aDe();Rd.plot=function(t){for(var r=t._fullLayout,n=t._fullData,a=r._subplots[Kw],i=0;i{"use strict";oDe.exports={plot:gFe(),attributes:MY(),markerSymbols:fP(),supplyDefaults:TFe(),colorbar:[{container:"marker",min:"cmin",max:"cmax"},{container:"line",min:"cmin",max:"cmax"}],calc:MFe(),moduleType:"trace",name:"scatter3d",basePlotModule:gy(),categories:["gl3d","symbols","showLegend","scatter-like"],meta:{}}});var uDe=fe((owr,lDe)=>{"use strict";lDe.exports=sDe()});var iM=fe((swr,hDe)=>{"use strict";var cDe=ni(),FNt=_s(),IY=pl().axisHoverFormat,{hovertemplateAttrs:DNt,templatefallbackAttrs:RNt}=Oo(),fDe=Ho(),zY=ta().extendFlat,INt=rl().overrideAll;function qY(e){return{valType:"boolean",dflt:!1}}function BY(e){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:qY("x"),y:qY("y"),z:qY("z")},color:{valType:"color",dflt:cDe.defaultLine},usecolormap:{valType:"boolean",dflt:!1},width:{valType:"number",min:1,max:16,dflt:2},highlight:{valType:"boolean",dflt:!0},highlightcolor:{valType:"color",dflt:cDe.defaultLine},highlightwidth:{valType:"number",min:1,max:16,dflt:2}}}var OY=hDe.exports=INt(zY({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:DNt(),hovertemplatefallback:RNt(),xhoverformat:IY("x"),yhoverformat:IY("y"),zhoverformat:IY("z"),connectgaps:{valType:"boolean",dflt:!1,editType:"calc"},surfacecolor:{valType:"data_array"}},FNt("",{colorAttr:"z or surfacecolor",showScaleDflt:!0,autoColorDflt:!1,editTypeOverride:"calc"}),{contours:{x:BY("x"),y:BY("y"),z:BY("z")},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,description:"Represents the level that incident rays are reflected in a single direction, causing shine."},roughness:{valType:"number",min:0,max:1,dflt:.5,description:"Alters specular reflection; the rougher the surface, the wider and less contrasty the shine."},fresnel:{valType:"number",min:0,max:5,dflt:.2}},opacity:{valType:"number",min:0,max:1,dflt:1},opacityscale:{valType:"any",editType:"calc"},hoverinfo:zY({},fDe.hoverinfo),showlegend:zY({},fDe.showlegend,{dflt:!1})}),"calc","nested");OY.x.editType=OY.y.editType=OY.z.editType="calc+clearAxisTypes"});var UY=fe((lwr,pDe)=>{"use strict";var zNt=bi(),dDe=Xt(),qNt=Vc(),BNt=iM(),NY=.1;function ONt(e,t){for(var r=[],n=32,a=0;a{"use strict";var gDe=Mh();mDe.exports=function(t,r){r.surfacecolor?gDe(t,r,{vals:r.surfacecolor,containerStr:"",cLetter:"c"}):gDe(t,r,{vals:r.z,containerStr:"",cLetter:"c"})}});var ADe=fe((cwr,TDe)=>{"use strict";var VNt=xf().gl_surface3d,Jw=xf().ndarray,GNt=xf().ndarray_linear_interpolate.d2,HNt=d7(),jNt=v7(),aM=Xt().isArrayOrTypedArray,WNt=Sg().parseColorScale,xDe=Mg(),YNt=js().extractOpts;function bDe(e,t,r){this.scene=e,this.uid=r,this.surface=t,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 Cp=bDe.prototype;Cp.getXat=function(e,t,r,n){var a=aM(this.data.x)?aM(this.data.x[0])?this.data.x[t][e]:this.data.x[e]:e;return r===void 0?a:n.d2l(a,0,r)};Cp.getYat=function(e,t,r,n){var a=aM(this.data.y)?aM(this.data.y[0])?this.data.y[t][e]:this.data.y[t]:t;return r===void 0?a:n.d2l(a,0,r)};Cp.getZat=function(e,t,r,n){var a=this.data.z[t][e];return a===null&&this.data.connectgaps&&this.data._interpolatedZ&&(a=this.data._interpolatedZ[t][e]),r===void 0?a:n.d2l(a,0,r)};Cp.handlePick=function(e){if(e.object===this.surface){var t=(e.data.index[0]-1)/this.dataScaleX-1,r=(e.data.index[1]-1)/this.dataScaleY-1,n=Math.max(Math.min(Math.round(t),this.data.z[0].length-1),0),a=Math.max(Math.min(Math.round(r),this.data._ylength-1),0);e.index=[n,a],e.traceCoordinate=[this.getXat(n,a),this.getYat(n,a),this.getZat(n,a)],e.dataCoordinate=[this.getXat(n,a,this.data.xcalendar,this.scene.fullSceneLayout.xaxis),this.getYat(n,a,this.data.ycalendar,this.scene.fullSceneLayout.yaxis),this.getZat(n,a,this.data.zcalendar,this.scene.fullSceneLayout.zaxis)];for(var i=0;i<3;i++){var o=e.dataCoordinate[i];o!=null&&(e.dataCoordinate[i]*=this.scene.dataScale[i])}var s=this.data.hovertext||this.data.text;return aM(s)&&s[a]&&s[a][n]!==void 0?e.textLabel=s[a][n]:s?e.textLabel=s:e.textLabel="",e.data.dataCoordinate=e.dataCoordinate.slice(),this.surface.highlight(e.data),this.scene.glplot.spikes.position=e.dataCoordinate,!0}};function XNt(e){var t=e[0].rgb,r=e[e.length-1].rgb;return t[0]===r[0]&&t[1]===r[1]&&t[2]===r[2]&&t[3]===r[3]}var Qw=[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 ZNt(e,t){if(e0){r=Qw[n];break}return r}function KNt(e,t){if(!(e<1||t<1)){for(var r=VY(e),n=VY(t),a=1,i=0;imP;)n--,n/=$Nt(n),n++,n<_De&&(n=mP);var a=Math.round(n/e);return a>1?a:1};function QNt(e,t,r){var n=r[8]+r[2]*t[0]+r[5]*t[1];return e[0]=(r[6]+r[0]*t[0]+r[3]*t[1])/n,e[1]=(r[7]+r[1]*t[0]+r[4]*t[1])/n,e}function eUt(e,t,r){return tUt(e,t,QNt,r),e}function tUt(e,t,r,n){for(var a=[0,0],i=e.shape[0],o=e.shape[1],s=0;s0&&this.contourStart[n]!==null&&this.contourEnd[n]!==null&&this.contourEnd[n]>this.contourStart[n]))for(t[n]=!0,a=this.contourStart[n];av&&(this.minValues[u]=v),this.maxValues[u]{"use strict";MDe.exports={attributes:iM(),supplyDefaults:UY().supplyDefaults,colorbar:{min:"cmin",max:"cmax"},calc:yDe(),plot:ADe(),moduleType:"trace",name:"surface",basePlotModule:gy(),categories:["gl3d","2dMap","showLegend"],meta:{}}});var kDe=fe((hwr,EDe)=>{"use strict";EDe.exports=SDe()});var e5=fe((dwr,LDe)=>{"use strict";var iUt=_s(),GY=pl().axisHoverFormat,{hovertemplateAttrs:aUt,templatefallbackAttrs:oUt}=Oo(),my=iM(),CDe=Ho(),yy=ta().extendFlat;LDe.exports=yy({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:aUt({editType:"calc"}),hovertemplatefallback:oUt({editType:"calc"}),xhoverformat:GY("x"),yhoverformat:GY("y"),zhoverformat:GY("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"}},iUt("",{colorAttr:"`intensity`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:my.opacity,flatshading:{valType:"boolean",dflt:!1,editType:"calc"},contour:{show:yy({},my.contours.x.show,{}),color:my.contours.x.color,width:my.contours.x.width,editType:"calc"},lightposition:{x:yy({},my.lightposition.x,{dflt:1e5}),y:yy({},my.lightposition.y,{dflt:1e5}),z:yy({},my.lightposition.z,{dflt:0}),editType:"calc"},lighting:yy({vertexnormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-12,editType:"calc",description:"Epsilon for vertex normals calculation avoids math issues arising from degenerate geometry."},facenormalsepsilon:{valType:"number",min:0,max:1,dflt:1e-6,editType:"calc",description:"Epsilon for face normals calculation avoids math issues arising from degenerate geometry."},editType:"calc"},my.lighting),hoverinfo:yy({},CDe.hoverinfo,{editType:"calc"}),showlegend:yy({},CDe.showlegend,{dflt:!1})})});var xP=fe((vwr,FDe)=>{"use strict";var sUt=_s(),yP=pl().axisHoverFormat,{hovertemplateAttrs:lUt,templatefallbackAttrs:uUt}=Oo(),oM=e5(),PDe=Ho(),HY=ta().extendFlat,cUt=rl().overrideAll;function jY(e){return{show:{valType:"boolean",dflt:!1},locations:{valType:"data_array",dflt:[]},fill:{valType:"number",min:0,max:1,dflt:1}}}function WY(e){return{show:{valType:"boolean",dflt:!0},fill:{valType:"number",min:0,max:1,dflt:1}}}var t5=FDe.exports=cUt(HY({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:jY("x"),y:jY("y"),z:jY("z")},caps:{x:WY("x"),y:WY("y"),z:WY("z")},text:{valType:"string",dflt:"",arrayOk:!0},hovertext:{valType:"string",dflt:"",arrayOk:!0},hovertemplate:lUt(),hovertemplatefallback:uUt(),xhoverformat:yP("x"),yhoverformat:yP("y"),zhoverformat:yP("z"),valuehoverformat:yP("value",1),showlegend:HY({},PDe.showlegend,{dflt:!1})},sUt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{opacity:oM.opacity,lightposition:oM.lightposition,lighting:oM.lighting,flatshading:oM.flatshading,contour:oM.contour,hoverinfo:HY({},PDe.hoverinfo)}),"calc","nested");t5.flatshading.dflt=!0;t5.lighting.facenormalsepsilon.dflt=0;t5.x.editType=t5.y.editType=t5.z.editType=t5.value.editType="calc+clearAxisTypes"});var YY=fe((pwr,RDe)=>{"use strict";var fUt=Xt(),hUt=bi(),dUt=xP(),vUt=Vc();function pUt(e,t,r,n){function a(i,o){return fUt.coerce(e,t,dUt,i,o)}DDe(e,t,r,n,a)}function DDe(e,t,r,n,a){var i=a("isomin"),o=a("isomax");o!=null&&i!==void 0&&i!==null&&i>o&&(t.isomin=null,t.isomax=null);var s=a("x"),l=a("y"),u=a("z"),c=a("value");if(!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length){t.visible=!1;return}var f=hUt.getComponentMethod("calendars","handleTraceDefaults");f(e,t,["x","y","z"],n),a("valuehoverformat"),["x","y","z"].forEach(function(x){a(x+"hoverformat");var _="caps."+x,y=a(_+".show");y&&a(_+".fill");var C="slices."+x,k=a(C+".show");k&&(a(C+".fill"),a(C+".locations"))});var v=a("spaceframe.show");v&&a("spaceframe.fill");var g=a("surface.show");g&&(a("surface.count"),a("surface.fill"),a("surface.pattern"));var p=a("contour.show");p&&(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(x){a(x)}),vUt(e,t,n,a,{prefix:"",cLetter:"c"}),t._length=null}RDe.exports={supplyDefaults:pUt,supplyIsoDefaults:DDe}});var _P=fe((gwr,zDe)=>{"use strict";var ZY=Xt(),gUt=Mh();function mUt(e,t){t._len=Math.min(t.u.length,t.v.length,t.w.length,t.x.length,t.y.length,t.z.length),t._u=T1(t.u,t._len),t._v=T1(t.v,t._len),t._w=T1(t.w,t._len),t._x=T1(t.x,t._len),t._y=T1(t.y,t._len),t._z=T1(t.z,t._len);var r=IDe(t);t._gridFill=r.fill,t._Xs=r.Xs,t._Ys=r.Ys,t._Zs=r.Zs,t._len=r.len;var n=0,a,i,o;t.starts&&(a=T1(t.starts.x||[]),i=T1(t.starts.y||[]),o=T1(t.starts.z||[]),n=Math.min(a.length,i.length,o.length)),t._startsX=a||[],t._startsY=i||[],t._startsZ=o||[];var s=0,l=1/0,u;for(u=0;u1&&(k=t[a-1],L=r[a-1],A=n[a-1]),i=0;ik?"-":"+")+"x"),p=p.replace("y",(S>L?"-":"+")+"y"),p=p.replace("z",(w>A?"-":"+")+"z");var E=function(){a=0,T=[],m=[],F=[]};(!a||a{"use strict";var yUt=Mh(),xUt=_P().processGrid,bP=_P().filter;qDe.exports=function(t,r){r._len=Math.min(r.x.length,r.y.length,r.z.length,r.value.length),r._x=bP(r.x,r._len),r._y=bP(r.y,r._len),r._z=bP(r.z,r._len),r._value=bP(r.value,r._len);var n=xUt(r);r._gridFill=n.fill,r._Xs=n.Xs,r._Ys=n.Ys,r._Zs=n.Zs,r._len=n.len;for(var a=1/0,i=-1/0,o=0;o{"use strict";BDe.exports=function(t,r,n,a){a=a||t.length;for(var i=new Array(a),o=0;o{"use strict";var _Ut=xf().gl_mesh3d,bUt=Sg().parseColorScale,wUt=Xt().isArrayOrTypedArray,TUt=Mg(),AUt=js().extractOpts,ODe=r5(),sM=function(e,t){for(var r=t.length-1;r>0;r--){var n=Math.min(t[r],t[r-1]),a=Math.max(t[r],t[r-1]);if(a>n&&n-1}function ee($e,ot){return $e===null?ot:$e}function ce($e,ot,tt){E();var nt=[ot],We=[tt];if(j>=1)nt=[ot],We=[tt];else if(j>0){var mt=U(ot,tt);nt=mt.xyzv,We=mt.abc}for(var bt=0;bt-1?tt[jt]:F(mr,or,fr);cr>-1?Yt[jt]=cr:Yt[jt]=R(mr,or,fr,ee($e,Ot))}B(Yt[0],Yt[1],Yt[2])}}function ye($e,ot,tt){var nt=function(We,mt,bt){ce($e,[ot[We],ot[mt],ot[bt]],[tt[We],tt[mt],tt[bt]])};nt(0,1,2),nt(2,3,0)}function xe($e,ot,tt){var nt=function(We,mt,bt){ce($e,[ot[We],ot[mt],ot[bt]],[tt[We],tt[mt],tt[bt]])};nt(0,1,2),nt(3,0,1),nt(2,3,0),nt(1,2,3)}function ue($e,ot,tt,nt){var We=$e[3];Went&&(We=nt);for(var mt=($e[3]-We)/($e[3]-ot[3]+1e-9),bt=[],Yt=0;Yt<4;Yt++)bt[Yt]=(1-mt)*$e[Yt]+mt*ot[Yt];return bt}function K($e,ot,tt){return $e>=ot&&$e<=tt}function _e($e){var ot=.001*(L-S);return $e>=S-ot&&$e<=L+ot}function ne($e){for(var ot=[],tt=0;tt<4;tt++){var nt=$e[tt];ot.push([e._x[nt],e._y[nt],e._z[nt],e._value[nt]])}return ot}var ae=3;function pe($e,ot,tt,nt,We,mt){mt||(mt=1),tt=[-1,-1,-1];var bt=!1,Yt=[K(ot[0][3],nt,We),K(ot[1][3],nt,We),K(ot[2][3],nt,We)];if(!Yt[0]&&!Yt[1]&&!Yt[2])return!1;var jt=function(or,fr,Ot){return _e(fr[0][3])&&_e(fr[1][3])&&_e(fr[2][3])?(ce(or,fr,Ot),!0):mtYt?[C,mt]:[mt,k];et(ot,jt[0],jt[1])}}var mr=[[Math.min(S,k),Math.max(S,k)],[Math.min(C,L),Math.max(C,L)]];["x","y","z"].forEach(function(or){for(var fr=[],Ot=0;Ot0&&(Lt.push(rr.id),or==="x"?ft.push([rr.distRatio,0,0]):or==="y"?ft.push([0,rr.distRatio,0]):ft.push([0,0,rr.distRatio]))}else or==="x"?Mt=Ke(1,g-1):or==="y"?Mt=Ke(1,p-1):Mt=Ke(1,x-1);Lt.length>0&&(or==="x"?fr[cr]=qe($e,Lt,Ct,wt,ft,fr[cr]):or==="y"?fr[cr]=we($e,Lt,Ct,wt,ft,fr[cr]):fr[cr]=Le($e,Lt,Ct,wt,ft,fr[cr]),cr++),Mt.length>0&&(or==="x"?fr[cr]=ht($e,Mt,Ct,wt,fr[cr]):or==="y"?fr[cr]=it($e,Mt,Ct,wt,fr[cr]):fr[cr]=Oe($e,Mt,Ct,wt,fr[cr]),cr++)}var pr=e.caps[or];pr.show&&pr.fill&&(q(pr.fill),or==="x"?fr[cr]=ht($e,[0,g-1],Ct,wt,fr[cr]):or==="y"?fr[cr]=it($e,[0,p-1],Ct,wt,fr[cr]):fr[cr]=Oe($e,[0,x-1],Ct,wt,fr[cr]),cr++)}}),s===0&&I(),e._meshX=w,e._meshY=A,e._meshZ=T,e._meshIntensity=m,e._Xs=c,e._Ys=f,e._Zs=v}return Ve(),e}function SUt(e,t){var r=e.glplot.gl,n=_Ut({gl:r}),a=new NDe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}VDe.exports={findNearestOnAxis:sM,generateIsoMeshes:UDe,createIsosurfaceTrace:SUt}});var HDe=fe((_wr,GDe)=>{"use strict";GDe.exports={attributes:xP(),supplyDefaults:YY().supplyDefaults,calc:$Y(),colorbar:{min:"cmin",max:"cmax"},plot:wP().createIsosurfaceTrace,moduleType:"trace",name:"isosurface",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var WDe=fe((bwr,jDe)=>{"use strict";jDe.exports=HDe()});var QY=fe((wwr,XDe)=>{"use strict";var EUt=_s(),Ou=xP(),kUt=iM(),YDe=Ho(),JY=ta().extendFlat,CUt=rl().overrideAll,TP=XDe.exports=CUt(JY({x:Ou.x,y:Ou.y,z:Ou.z,value:Ou.value,isomin:Ou.isomin,isomax:Ou.isomax,surface:Ou.surface,spaceframe:{show:{valType:"boolean",dflt:!1},fill:{valType:"number",min:0,max:1,dflt:1}},slices:Ou.slices,caps:Ou.caps,text:Ou.text,hovertext:Ou.hovertext,xhoverformat:Ou.xhoverformat,yhoverformat:Ou.yhoverformat,zhoverformat:Ou.zhoverformat,valuehoverformat:Ou.valuehoverformat,hovertemplate:Ou.hovertemplate,hovertemplatefallback:Ou.hovertemplatefallback},EUt("",{colorAttr:"`value`",showScaleDflt:!0,editTypeOverride:"calc"}),{colorbar:Ou.colorbar,opacity:Ou.opacity,opacityscale:kUt.opacityscale,lightposition:Ou.lightposition,lighting:Ou.lighting,flatshading:Ou.flatshading,contour:Ou.contour,hoverinfo:JY({},YDe.hoverinfo),showlegend:JY({},YDe.showlegend,{dflt:!1})}),"calc","nested");TP.x.editType=TP.y.editType=TP.z.editType=TP.value.editType="calc+clearAxisTypes"});var $De=fe((Twr,ZDe)=>{"use strict";var LUt=Xt(),PUt=QY(),FUt=YY().supplyIsoDefaults,DUt=UY().opacityscaleDefaults;ZDe.exports=function(t,r,n,a){function i(o,s){return LUt.coerce(t,r,PUt,o,s)}FUt(t,r,n,a,i),DUt(t,r,a,i)}});var eRe=fe((Awr,QDe)=>{"use strict";var RUt=xf().gl_mesh3d,IUt=Sg().parseColorScale,zUt=Xt().isArrayOrTypedArray,qUt=Mg(),BUt=js().extractOpts,KDe=r5(),eX=wP().findNearestOnAxis,OUt=wP().generateIsoMeshes;function JDe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.data=null,this.showContour=!1}var tX=JDe.prototype;tX.handlePick=function(e){if(e.object===this.mesh){var t=e.data.index,r=this.data._meshX[t],n=this.data._meshY[t],a=this.data._meshZ[t],i=this.data._Ys.length,o=this.data._Zs.length,s=eX(r,this.data._Xs).id,l=eX(n,this.data._Ys).id,u=eX(a,this.data._Zs).id,c=e.index=u+o*l+o*i*s;e.traceCoordinate=[this.data._meshX[c],this.data._meshY[c],this.data._meshZ[c],this.data._value[c]];var f=this.data.hovertext||this.data.text;return zUt(f)&&f[c]!==void 0?e.textLabel=f[c]:f&&(e.textLabel=f),!0}};tX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=OUt(e);function n(l,u,c,f){return u.map(function(v){return l.d2l(v,0,f)*c})}var a=KDe(n(r.xaxis,e._meshX,t.dataScale[0],e.xcalendar),n(r.yaxis,e._meshY,t.dataScale[1],e.ycalendar),n(r.zaxis,e._meshZ,t.dataScale[2],e.zcalendar)),i=KDe(e._meshI,e._meshJ,e._meshK),o={positions:a,cells:i,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,opacityscale:e.opacityscale,contourEnable:e.contour.show,contourColor:qUt(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading},s=BUt(e);o.vertexIntensity=e._meshIntensity,o.vertexIntensityBounds=[s.min,s.max],o.colormap=IUt(e),this.mesh.update(o)};tX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function NUt(e,t){var r=e.glplot.gl,n=RUt({gl:r}),a=new JDe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}QDe.exports=NUt});var rRe=fe((Mwr,tRe)=>{"use strict";tRe.exports={attributes:QY(),supplyDefaults:$De(),calc:$Y(),colorbar:{min:"cmin",max:"cmax"},plot:eRe(),moduleType:"trace",name:"volume",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var iRe=fe((Swr,nRe)=>{"use strict";nRe.exports=rRe()});var sRe=fe((Ewr,oRe)=>{"use strict";var UUt=bi(),aRe=Xt(),VUt=Vc(),GUt=e5();oRe.exports=function(t,r,n,a){function i(c,f){return aRe.coerce(t,r,GUt,c,f)}function o(c){var f=c.map(function(v){var g=i(v);return g&&aRe.isArrayOrTypedArray(g)?g:null});return f.every(function(v){return v&&v.length===f[0].length})&&f}var s=o(["x","y","z"]);if(!s){r.visible=!1;return}if(o(["i","j","k"]),r.i&&(!r.j||!r.k)||r.j&&(!r.k||!r.i)||r.k&&(!r.i||!r.j)){r.visible=!1;return}var l=UUt.getComponentMethod("calendars","handleTraceDefaults");l(t,r,["x","y","z"],a),["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(c){i(c)});var u=i("contour.show");u&&(i("contour.color"),i("contour.width")),"intensity"in t?(i("intensity"),i("intensitymode"),VUt(t,r,a,i,{prefix:"",cLetter:"c"})):(r.showscale=!1,"facecolor"in t?i("facecolor"):"vertexcolor"in t?i("vertexcolor"):i("color",n)),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var uRe=fe((kwr,lRe)=>{"use strict";var HUt=Mh();lRe.exports=function(t,r){r.intensity&&HUt(t,r,{vals:r.intensity,containerStr:"",cLetter:"c"})}});var vRe=fe((Cwr,dRe)=>{"use strict";var jUt=xf().gl_mesh3d,WUt=xf().delaunay_triangulate,YUt=xf().alpha_shape,XUt=xf().convex_hull,ZUt=Sg().parseColorScale,$Ut=Xt().isArrayOrTypedArray,aX=Mg(),KUt=js().extractOpts,cRe=r5();function hRe(e,t,r){this.scene=e,this.uid=r,this.mesh=t,this.name="",this.color="#fff",this.data=null,this.showContour=!1}var oX=hRe.prototype;oX.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index;e.data._cellCenter?e.traceCoordinate=e.data.dataCoordinate:e.traceCoordinate=[this.data.x[t],this.data.y[t],this.data.z[t]];var r=this.data.hovertext||this.data.text;return $Ut(r)&&r[t]!==void 0?e.textLabel=r[t]:r&&(e.textLabel=r),!0}};function fRe(e){for(var t=[],r=e.length,n=0;n=t-.5)return!1;return!0}oX.update=function(e){var t=this.scene,r=t.fullSceneLayout;this.data=e;var n=e.x.length,a=cRe(rX(r.xaxis,e.x,t.dataScale[0],e.xcalendar),rX(r.yaxis,e.y,t.dataScale[1],e.ycalendar),rX(r.zaxis,e.z,t.dataScale[2],e.zcalendar)),i;if(e.i&&e.j&&e.k){if(e.i.length!==e.j.length||e.j.length!==e.k.length||!iX(e.i,n)||!iX(e.j,n)||!iX(e.k,n))return;i=cRe(nX(e.i),nX(e.j),nX(e.k))}else e.alphahull===0?i=XUt(a):e.alphahull>0?i=YUt(e.alphahull,a):i=JUt(e.delaunayaxis,a);var o={positions:a,cells:i,lightPosition:[e.lightposition.x,e.lightposition.y,e.lightposition.z],ambient:e.lighting.ambient,diffuse:e.lighting.diffuse,specular:e.lighting.specular,roughness:e.lighting.roughness,fresnel:e.lighting.fresnel,vertexNormalsEpsilon:e.lighting.vertexnormalsepsilon,faceNormalsEpsilon:e.lighting.facenormalsepsilon,opacity:e.opacity,contourEnable:e.contour.show,contourColor:aX(e.contour.color).slice(0,3),contourWidth:e.contour.width,useFacetNormals:e.flatshading};if(e.intensity){var s=KUt(e);this.color="#fff";var l=e.intensitymode;o[l+"Intensity"]=e.intensity,o[l+"IntensityBounds"]=[s.min,s.max],o.colormap=ZUt(e)}else e.vertexcolor?(this.color=e.vertexcolor[0],o.vertexColors=fRe(e.vertexcolor)):e.facecolor?(this.color=e.facecolor[0],o.cellColors=fRe(e.facecolor)):(this.color=e.color,o.meshColor=aX(e.color));this.mesh.update(o)};oX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function QUt(e,t){var r=e.glplot.gl,n=jUt({gl:r}),a=new hRe(e,n,t.uid);return n._trace=a,a.update(t),e.glplot.add(n),a}dRe.exports=QUt});var gRe=fe((Lwr,pRe)=>{"use strict";pRe.exports={attributes:e5(),supplyDefaults:sRe(),calc:uRe(),colorbar:{min:"cmin",max:"cmax"},plot:vRe(),moduleType:"trace",name:"mesh3d",basePlotModule:gy(),categories:["gl3d","showLegend"],meta:{}}});var yRe=fe((Pwr,mRe)=>{"use strict";mRe.exports=gRe()});var lX=fe((Fwr,_Re)=>{"use strict";var eVt=_s(),n5=pl().axisHoverFormat,{hovertemplateAttrs:tVt,templatefallbackAttrs:rVt}=Oo(),nVt=e5(),xRe=Ho(),sX=ta().extendFlat,AP={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},sizemode:{valType:"enumerated",values:["scaled","absolute","raw"],editType:"calc",dflt:"scaled"},sizeref:{valType:"number",editType:"calc",min:0},anchor:{valType:"enumerated",editType:"calc",values:["tip","tail","cm","center"],dflt:"cm"},text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:tVt({editType:"calc"},{keys:["norm"]}),hovertemplatefallback:rVt({editType:"calc"}),uhoverformat:n5("u",1),vhoverformat:n5("v",1),whoverformat:n5("w",1),xhoverformat:n5("x"),yhoverformat:n5("y"),zhoverformat:n5("z"),showlegend:sX({},xRe.showlegend,{dflt:!1})};sX(AP,eVt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var iVt=["opacity","lightposition","lighting"];iVt.forEach(function(e){AP[e]=nVt[e]});AP.hoverinfo=sX({},xRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","text","name"],dflt:"x+y+z+norm+text+name"});_Re.exports=AP});var wRe=fe((Dwr,bRe)=>{"use strict";var aVt=Xt(),oVt=Vc(),sVt=lX();bRe.exports=function(t,r,n,a){function i(g,p){return aVt.coerce(t,r,sVt,g,p)}var o=i("u"),s=i("v"),l=i("w"),u=i("x"),c=i("y"),f=i("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}var v=i("sizemode");i("sizeref",v==="raw"?1:.5),i("anchor"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),oVt(t,r,a,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var ARe=fe((Rwr,TRe)=>{"use strict";var lVt=Mh();TRe.exports=function(t,r){for(var n=r.u,a=r.v,i=r.w,o=Math.min(r.x.length,r.y.length,r.z.length,n.length,a.length,i.length),s=-1/0,l=1/0,u=0;u{"use strict";var uVt=xf().gl_cone3d,cVt=xf().gl_cone3d.createConeMesh,fVt=Xt().simpleMap,hVt=Sg().parseColorScale,dVt=js().extractOpts,vVt=Xt().isArrayOrTypedArray,MRe=r5();function SRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var uX=SRe.prototype;uX.handlePick=function(e){if(e.object===this.mesh){var t=e.index=e.data.index,r=this.data.x[t],n=this.data.y[t],a=this.data.z[t],i=this.data.u[t],o=this.data.v[t],s=this.data.w[t];e.traceCoordinate=[r,n,a,i,o,s,Math.sqrt(i*i+o*o+s*s)];var l=this.data.hovertext||this.data.text;return vVt(l)&&l[t]!==void 0?e.textLabel=l[t]:l&&(e.textLabel=l),!0}};var pVt={xaxis:0,yaxis:1,zaxis:2},gVt={tip:1,tail:0,cm:.25,center:.5},mVt={tip:1,tail:1,cm:.75,center:.5};function ERe(e,t){var r=e.fullSceneLayout,n=e.dataScale,a={};function i(c,f){var v=r[f],g=n[pVt[f]];return fVt(c,function(p){return v.d2l(p)*g})}a.vectors=MRe(i(t.u,"xaxis"),i(t.v,"yaxis"),i(t.w,"zaxis"),t._len),a.positions=MRe(i(t.x,"xaxis"),i(t.y,"yaxis"),i(t.z,"zaxis"),t._len);var o=dVt(t);a.colormap=hVt(t),a.vertexIntensityBounds=[o.min/t._normMax,o.max/t._normMax],a.coneOffset=gVt[t.anchor];var s=t.sizemode;s==="scaled"?a.coneSize=t.sizeref||.5:s==="absolute"?a.coneSize=t.sizeref&&t._normMax?t.sizeref/t._normMax:.5:s==="raw"&&(a.coneSize=t.sizeref),a.coneSizemode=s;var l=uVt(a),u=t.lightposition;return l.lightPosition=[u.x,u.y,u.z],l.ambient=t.lighting.ambient,l.diffuse=t.lighting.diffuse,l.specular=t.lighting.specular,l.roughness=t.lighting.roughness,l.fresnel=t.lighting.fresnel,l.opacity=t.opacity,t._pad=mVt[t.anchor]*l.vectorScale*l.coneScale*t._normMax,l}uX.update=function(e){this.data=e;var t=ERe(this.scene,e);this.mesh.update(t)};uX.dispose=function(){this.scene.glplot.remove(this.mesh),this.mesh.dispose()};function yVt(e,t){var r=e.glplot.gl,n=ERe(e,t),a=cVt(r,n),i=new SRe(e,t.uid);return i.mesh=a,i.data=t,a._trace=i,e.glplot.add(a),i}kRe.exports=yVt});var PRe=fe((zwr,LRe)=>{"use strict";LRe.exports={moduleType:"trace",name:"cone",basePlotModule:gy(),categories:["gl3d","showLegend"],attributes:lX(),supplyDefaults:wRe(),colorbar:{min:"cmin",max:"cmax"},calc:ARe(),plot:CRe(),eventData:function(e,t){return e.norm=t.traceCoordinate[6],e},meta:{}}});var DRe=fe((qwr,FRe)=>{"use strict";FRe.exports=PRe()});var fX=fe((Bwr,IRe)=>{"use strict";var xVt=_s(),i5=pl().axisHoverFormat,{hovertemplateAttrs:_Vt,templatefallbackAttrs:bVt}=Oo(),wVt=e5(),RRe=Ho(),cX=ta().extendFlat,MP={x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},z:{valType:"data_array",editType:"calc+clearAxisTypes"},u:{valType:"data_array",editType:"calc"},v:{valType:"data_array",editType:"calc"},w:{valType:"data_array",editType:"calc"},starts:{x:{valType:"data_array",editType:"calc"},y:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},editType:"calc"},maxdisplayed:{valType:"integer",min:0,dflt:1e3,editType:"calc"},sizeref:{valType:"number",editType:"calc",min:0,dflt:1},text:{valType:"string",dflt:"",editType:"calc"},hovertext:{valType:"string",dflt:"",editType:"calc"},hovertemplate:_Vt({editType:"calc"},{keys:["tubex","tubey","tubez","tubeu","tubev","tubew","norm","divergence"]}),hovertemplatefallback:bVt({editType:"calc"}),uhoverformat:i5("u",1),vhoverformat:i5("v",1),whoverformat:i5("w",1),xhoverformat:i5("x"),yhoverformat:i5("y"),zhoverformat:i5("z"),showlegend:cX({},RRe.showlegend,{dflt:!1})};cX(MP,xVt("",{colorAttr:"u/v/w norm",showScaleDflt:!0,editTypeOverride:"calc"}));var TVt=["opacity","lightposition","lighting"];TVt.forEach(function(e){MP[e]=wVt[e]});MP.hoverinfo=cX({},RRe.hoverinfo,{editType:"calc",flags:["x","y","z","u","v","w","norm","divergence","text","name"],dflt:"x+y+z+norm+text+name"});IRe.exports=MP});var qRe=fe((Owr,zRe)=>{"use strict";var AVt=Xt(),MVt=Vc(),SVt=fX();zRe.exports=function(t,r,n,a){function i(v,g){return AVt.coerce(t,r,SVt,v,g)}var o=i("u"),s=i("v"),l=i("w"),u=i("x"),c=i("y"),f=i("z");if(!o||!o.length||!s||!s.length||!l||!l.length||!u||!u.length||!c||!c.length||!f||!f.length){r.visible=!1;return}i("starts.x"),i("starts.y"),i("starts.z"),i("maxdisplayed"),i("sizeref"),i("lighting.ambient"),i("lighting.diffuse"),i("lighting.specular"),i("lighting.roughness"),i("lighting.fresnel"),i("lightposition.x"),i("lightposition.y"),i("lightposition.z"),MVt(t,r,a,i,{prefix:"",cLetter:"c"}),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("uhoverformat"),i("vhoverformat"),i("whoverformat"),i("xhoverformat"),i("yhoverformat"),i("zhoverformat"),r._length=null}});var jRe=fe((Nwr,HRe)=>{"use strict";var NRe=xf().gl_streamtube3d,EVt=NRe.createTubeMesh,kVt=Xt(),CVt=Sg().parseColorScale,LVt=js().extractOpts,BRe=r5(),URe={xaxis:0,yaxis:1,zaxis:2};function VRe(e,t){this.scene=e,this.uid=t,this.mesh=null,this.data=null}var dX=VRe.prototype;dX.handlePick=function(e){var t=this.scene.fullSceneLayout,r=this.scene.dataScale;function n(o,s){var l=t[s],u=r[URe[s]];return l.l2c(o)/u}if(e.object===this.mesh){var a=e.data.position,i=e.data.velocity;return e.traceCoordinate=[n(a[0],"xaxis"),n(a[1],"yaxis"),n(a[2],"zaxis"),n(i[0],"xaxis"),n(i[1],"yaxis"),n(i[2],"zaxis"),e.data.intensity*this.data._normMax,e.data.divergence],e.textLabel=this.data.hovertext||this.data.text,!0}};function ORe(e){var t=e.length,r;return t>2?r=e.slice(1,t-1):t===2?r=[(e[0]+e[1])/2]:r=e,r}function hX(e){var t=e.length;return t===1?[.5,.5]:[e[1]-e[0],e[t-1]-e[t-2]]}function GRe(e,t){var r=e.fullSceneLayout,n=e.dataScale,a=t._len,i={};function o(I,R){var B=r[R],O=n[URe[R]];return kVt.simpleMap(I,function(V){return B.d2l(V)*O})}if(i.vectors=BRe(o(t._u,"xaxis"),o(t._v,"yaxis"),o(t._w,"zaxis"),a),!a)return{positions:[],cells:[]};var s=o(t._Xs,"xaxis"),l=o(t._Ys,"yaxis"),u=o(t._Zs,"zaxis");i.meshgrid=[s,l,u],i.gridFill=t._gridFill;var c=t._slen;if(c)i.startingPositions=BRe(o(t._startsX,"xaxis"),o(t._startsY,"yaxis"),o(t._startsZ,"zaxis"));else{for(var f=l[0],v=ORe(s),g=ORe(u),p=new Array(v.length*g.length),x=0,_=0;_{"use strict";WRe.exports={moduleType:"trace",name:"streamtube",basePlotModule:gy(),categories:["gl3d","showLegend"],attributes:fX(),supplyDefaults:qRe(),colorbar:{min:"cmin",max:"cmax"},calc:_P().calc,plot:jRe(),eventData:function(e,t){return e.tubex=e.x,e.tubey=e.y,e.tubez=e.z,e.tubeu=t.traceCoordinate[3],e.tubev=t.traceCoordinate[4],e.tubew=t.traceCoordinate[5],e.norm=t.traceCoordinate[6],e.divergence=t.traceCoordinate[7],delete e.x,delete e.y,delete e.z,e},meta:{}}});var ZRe=fe((Vwr,XRe)=>{"use strict";XRe.exports=YRe()});var a5=fe((Gwr,eIe)=>{"use strict";var{hovertemplateAttrs:FVt,texttemplateAttrs:DVt,templatefallbackAttrs:$Re}=Oo(),RVt=n1(),A1=Ol(),IVt=Ho(),KRe=_s(),zVt=Uc().dash,a_=ta().extendFlat,qVt=rl().overrideAll,Rv=A1.marker,JRe=A1.line,QRe=Rv.line;eIe.exports=qVt({lon:{valType:"data_array"},lat:{valType:"data_array"},locations:{valType:"data_array"},locationmode:{valType:"enumerated",values:["ISO-3","USA-states","country names","geojson-id"],dflt:"ISO-3"},geojson:{valType:"any",editType:"calc"},featureidkey:{valType:"string",editType:"calc",dflt:"id"},mode:a_({},A1.mode,{dflt:"markers"}),text:a_({},A1.text,{}),texttemplate:DVt({editType:"plot"},{keys:["lat","lon","location","text"]}),texttemplatefallback:$Re({editType:"plot"}),hovertext:a_({},A1.hovertext,{}),textfont:A1.textfont,textposition:A1.textposition,line:{color:JRe.color,width:JRe.width,dash:zVt},connectgaps:A1.connectgaps,marker:a_({symbol:Rv.symbol,opacity:Rv.opacity,angle:Rv.angle,angleref:a_({},Rv.angleref,{values:["previous","up","north"]}),standoff:Rv.standoff,size:Rv.size,sizeref:Rv.sizeref,sizemin:Rv.sizemin,sizemode:Rv.sizemode,colorbar:Rv.colorbar,line:a_({width:QRe.width,dash:QRe.dash},KRe("marker.line")),gradient:Rv.gradient},KRe("marker")),fill:{valType:"enumerated",values:["none","toself"],dflt:"none"},fillcolor:RVt(),selected:A1.selected,unselected:A1.unselected,hoverinfo:a_({},IVt.hoverinfo,{flags:["lon","lat","location","text","name"]}),hovertemplate:FVt(),hovertemplatefallback:$Re()},"calc","nested")});var rIe=fe((Hwr,tIe)=>{"use strict";var vX=Xt(),pX=Is(),BVt=vv(),OVt=lp(),NVt=up(),UVt=a1(),VVt=a5();tIe.exports=function(t,r,n,a){function i(g,p){return vX.coerce(t,r,VVt,g,p)}var o=i("locations"),s;if(o&&o.length){var l=i("geojson"),u;(typeof l=="string"&&l!==""||vX.isPlainObject(l))&&(u="geojson-id");var c=i("locationmode",u);c==="geojson-id"&&i("featureidkey"),s=o.length}else{var f=i("lon")||[],v=i("lat")||[];s=Math.min(f.length,v.length)}if(!s){r.visible=!1;return}r._length=s,i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("mode"),pX.hasMarkers(r)&&BVt(t,r,n,a,i,{gradient:!0}),pX.hasLines(r)&&(OVt(t,r,n,a,i),i("connectgaps")),pX.hasText(r)&&(i("texttemplate"),i("texttemplatefallback"),NVt(t,r,a,i)),i("fill"),r.fill!=="none"&&UVt(t,r,n,i),vX.coerceSelectionMarkerOpacity(r,i)}});var aIe=fe((jwr,iIe)=>{"use strict";var nIe=Yi();iIe.exports=function(t,r,n){var a={},i=n[r.geo]._subplot,o=i.mockAxis,s=t.lonlat;return a.lonLabel=nIe.tickText(o,o.c2l(s[0]),!0).text,a.latLabel=nIe.tickText(o,o.c2l(s[1]),!0).text,a}});var mX=fe((Wwr,uIe)=>{"use strict";var gX=aa(),oIe=Wa().BADNUM,GVt=pv(),HVt=o1(),jVt=P0(),WVt=Xt().isArrayOrTypedArray,sIe=Xt()._;function lIe(e){return e&&typeof e=="string"}uIe.exports=function(t,r){var n=WVt(r.locations),a=n?r.locations.length:r._length,i=new Array(a),o;r.geojson?o=function(v){return lIe(v)||gX(v)}:o=lIe;for(var s=0;s{"use strict";th.projNames={airy:"airy",aitoff:"aitoff","albers usa":"albersUsa",albers:"albers",august:"august","azimuthal equal area":"azimuthalEqualArea","azimuthal equidistant":"azimuthalEquidistant",baker:"baker",bertin1953:"bertin1953",boggs:"boggs",bonne:"bonne",bottomley:"bottomley",bromley:"bromley",collignon:"collignon","conic conformal":"conicConformal","conic equal area":"conicEqualArea","conic equidistant":"conicEquidistant",craig:"craig",craster:"craster","cylindrical equal area":"cylindricalEqualArea","cylindrical stereographic":"cylindricalStereographic",eckert1:"eckert1",eckert2:"eckert2",eckert3:"eckert3",eckert4:"eckert4",eckert5:"eckert5",eckert6:"eckert6",eisenlohr:"eisenlohr","equal earth":"equalEarth",equirectangular:"equirectangular",fahey:"fahey","foucaut sinusoidal":"foucautSinusoidal",foucaut:"foucaut",ginzburg4:"ginzburg4",ginzburg5:"ginzburg5",ginzburg6:"ginzburg6",ginzburg8:"ginzburg8",ginzburg9:"ginzburg9",gnomonic:"gnomonic","gringorten quincuncial":"gringortenQuincuncial",gringorten:"gringorten",guyou:"guyou",hammer:"hammer",hill:"hill",homolosine:"homolosine",hufnagel:"hufnagel",hyperelliptical:"hyperelliptical",kavrayskiy7:"kavrayskiy7",lagrange:"lagrange",larrivee:"larrivee",laskowski:"laskowski",loximuthal:"loximuthal",mercator:"mercator",miller:"miller",mollweide:"mollweide","mt flat polar parabolic":"mtFlatPolarParabolic","mt flat polar quartic":"mtFlatPolarQuartic","mt flat polar sinusoidal":"mtFlatPolarSinusoidal","natural earth":"naturalEarth","natural earth1":"naturalEarth1","natural earth2":"naturalEarth2","nell hammer":"nellHammer",nicolosi:"nicolosi",orthographic:"orthographic",patterson:"patterson","peirce quincuncial":"peirceQuincuncial",polyconic:"polyconic","rectangular polyconic":"rectangularPolyconic",robinson:"robinson",satellite:"satellite","sinu mollweide":"sinuMollweide",sinusoidal:"sinusoidal",stereographic:"stereographic",times:"times","transverse mercator":"transverseMercator","van der grinten":"vanDerGrinten","van der grinten2":"vanDerGrinten2","van der grinten3":"vanDerGrinten3","van der grinten4":"vanDerGrinten4",wagner4:"wagner4",wagner6:"wagner6",wiechel:"wiechel","winkel tripel":"winkel3",winkel3:"winkel3"};th.axesNames=["lonaxis","lataxis"];th.lonaxisSpan={orthographic:180,"azimuthal equal area":360,"azimuthal equidistant":360,"conic conformal":180,gnomonic:160,stereographic:180,"transverse mercator":180,"*":360};th.lataxisSpan={"conic conformal":150,stereographic:179.5,"*":180};th.fitboundsIncompatible=new Set(["albers usa","craig","peirce quincuncial","satellite"]);th.scopeDefaults={world:{lonaxisRange:[-180,180],lataxisRange:[-90,90],projType:"equirectangular",projRotate:[0,0,0]},usa:{lonaxisRange:[-180,-50],lataxisRange:[15,80],projType:"albers usa"},europe:{lonaxisRange:[-30,60],lataxisRange:[30,85],projType:"conic conformal",projRotate:[15,0,0],projParallels:[0,60]},asia:{lonaxisRange:[22,160],lataxisRange:[-15,55],projType:"mercator",projRotate:[0,0,0]},africa:{lonaxisRange:[-30,60],lataxisRange:[-40,40],projType:"mercator",projRotate:[0,0,0]},"north america":{lonaxisRange:[-180,-45],lataxisRange:[5,85],projType:"conic conformal",projRotate:[-100,0,0],projParallels:[29.5,45.5]},"south america":{lonaxisRange:[-100,-30],lataxisRange:[-60,15],projType:"mercator",projRotate:[0,0,0]},antarctica:{lonaxisRange:[-180,180],lataxisRange:[-90,-60],projType:"equirectangular",projRotate:[0,0,0]},oceania:{lonaxisRange:[-180,180],lataxisRange:[-50,25],projType:"equirectangular",projRotate:[0,0,0]}};th.clipPad=.001;th.precision=.1;th.landColor="#F0DC82";th.waterColor="#3399FF";th.locationmodeToLayer={"ISO-3":"countries","USA-states":"subunits","country names":"countries"};th.sphereSVG={type:"Sphere"};th.fillLayers={ocean:1,land:1,lakes:1};th.lineLayers={subunits:1,countries:1,coastlines:1,rivers:1,frame:1};th.layers=["bg","ocean","land","lakes","subunits","countries","coastlines","rivers","lataxis","lonaxis","frame","backplot","frontplot"];th.layersForChoropleth=["bg","ocean","land","subunits","countries","coastlines","lataxis","lonaxis","frame","backplot","rivers","lakes","frontplot"];th.layerNameToAdjective={ocean:"ocean",land:"land",lakes:"lake",subunits:"subunit",countries:"country",coastlines:"coastline",rivers:"river",frame:"frame"}});var yX=fe((SP,cIe)=>{(function(e,t){typeof SP=="object"&&typeof cIe!="undefined"?t(SP):(e=e||self,t(e.topojson=e.topojson||{}))})(SP,function(e){"use strict";function t(k){return k}function r(k){if(k==null)return t;var S,L,w=k.scale[0],A=k.scale[1],T=k.translate[0],m=k.translate[1];return function(F,E){E||(S=L=0);var I=2,R=F.length,B=new Array(R);for(B[0]=(S+=F[0])*w+T,B[1]=(L+=F[1])*A+m;IT&&(T=I[0]),I[1]m&&(m=I[1])}function E(I){switch(I.type){case"GeometryCollection":I.geometries.forEach(E);break;case"Point":F(I.coordinates);break;case"MultiPoint":I.coordinates.forEach(F);break}}k.arcs.forEach(function(I){for(var R=-1,B=I.length,O;++RT&&(T=O[0]),O[1]m&&(m=O[1])});for(L in k.objects)E(k.objects[L]);return[w,A,T,m]}function a(k,S){for(var L,w=k.length,A=w-S;A<--w;)L=k[A],k[A++]=k[w],k[w]=L}function i(k,S){return typeof S=="string"&&(S=k.objects[S]),S.type==="GeometryCollection"?{type:"FeatureCollection",features:S.geometries.map(function(L){return o(k,L)})}:o(k,S)}function o(k,S){var L=S.id,w=S.bbox,A=S.properties==null?{}:S.properties,T=s(k,S);return L==null&&w==null?{type:"Feature",properties:A,geometry:T}:w==null?{type:"Feature",id:L,properties:A,geometry:T}:{type:"Feature",id:L,bbox:w,properties:A,geometry:T}}function s(k,S){var L=r(k.transform),w=k.arcs;function A(R,B){B.length&&B.pop();for(var O=w[R<0?~R:R],V=0,j=O.length;V1)w=f(k,S,L);else for(A=0,w=new Array(T=k.arcs.length);A1)for(var B=1,O=F(I[0]),V,j;BO&&(j=I[0],I[0]=I[B],I[B]=j,O=V);return I}).filter(function(E){return E.length>0})}}function x(k,S){for(var L=0,w=k.length;L>>1;k[A]=2))throw new Error("n must be \u22652");E=k.bbox||n(k);var L=E[0],w=E[1],A=E[2],T=E[3],m;S={scale:[A-L?(A-L)/(m-1):1,T-w?(T-w)/(m-1):1],translate:[L,w]}}else E=k.bbox;var F=y(S),E,I,R=k.objects,B={};function O(q){return F(q)}function V(q){var U;switch(q.type){case"GeometryCollection":U={type:"GeometryCollection",geometries:q.geometries.map(V)};break;case"Point":U={type:"Point",coordinates:O(q.coordinates)};break;case"MultiPoint":U={type:"MultiPoint",coordinates:q.coordinates.map(O)};break;default:return q}return q.id!=null&&(U.id=q.id),q.bbox!=null&&(U.bbox=q.bbox),q.properties!=null&&(U.properties=q.properties),U}function j(q){var U=0,J=1,ee=q.length,ce,ye=new Array(ee);for(ye[0]=F(q[0],0);++U{"use strict";var xX=fIe.exports={},YVt=lM().locationmodeToLayer,XVt=yX().feature;xX.getTopojsonName=function(e){return[e.scope.replace(/ /g,"-"),"_",e.resolution.toString(),"m"].join("")};xX.getTopojsonPath=function(e,t){return e+=e.endsWith("/")?"":"/",`${e}${t}.json`};xX.getTopojsonFeatures=function(e,t){var r=YVt[e.locationmode],n=t.objects[r];return XVt(t,n).features}});var cM=fe(uM=>{"use strict";var ZVt=Wa().BADNUM;uM.calcTraceToLineCoords=function(e){for(var t=e[0].trace,r=t.connectgaps,n=[],a=[],i=0;i0&&(n.push(a),a=[])}return a.length>0&&n.push(a),n};uM.makeLine=function(e){return e.length===1?{type:"LineString",coordinates:e[0]}:{type:"MultiLineString",coordinates:e}};uM.makePolygon=function(e){if(e.length===1)return{type:"Polygon",coordinates:e};for(var t=new Array(e.length),r=0;r{"use strict";var bX=Object.defineProperty,$Vt=Object.getOwnPropertyDescriptor,KVt=Object.getOwnPropertyNames,JVt=Object.prototype.hasOwnProperty,QVt=(e,t)=>{for(var r in t)bX(e,r,{get:t[r],enumerable:!0})},eGt=(e,t,r,n)=>{if(t&&typeof t=="object"||typeof t=="function")for(let a of KVt(t))!JVt.call(e,a)&&a!==r&&bX(e,a,{get:()=>t[a],enumerable:!(n=$Vt(t,a))||n.enumerable});return e},tGt=e=>eGt(bX({},"__esModule",{value:!0}),e),hIe={};QVt(hIe,{COUNTRIES:()=>dIe,byAlpha2:()=>aGt,byAlpha3:()=>iGt,byM49:()=>oGt,createLookup:()=>vIe,lookup:()=>rGt,lookupAlpha3:()=>nGt,sanitize:()=>_X});pIe.exports=tGt(hIe);var dIe=[{iso3:"ABW",iso2:"AW",m49:"533",name:"Aruba",aliases:["\u{1F1E6}\u{1F1FC}","country of aruba","land aruba","pais aruba"]},{iso3:"AFG",iso2:"AF",m49:"004",name:"Afghanistan",aliases:["\u{1F1E6}\u{1F1EB}","affghanistan","affghanisthan","affghaunistan","afghania","afghanisthan","afghaunistan","afghaunistaun","afgoniston","de afghanistan islami jumhuriyat","owganystan","\u0430\u0444\u0493\u043E\u043D\u0438\u0441\u0442\u043E\u043D","\u0623\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646","\u062F \u0627\u0641\u063A\u0627\u0646\u0633\u062A\u0627\u0646 \u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u0647\u0648\u0631\u06CC\u062A"]},{iso3:"AGO",iso2:"AO",m49:"024",name:"Angola",aliases:["\u{1F1E6}\u{1F1F4}","republic of angola","republica de angola"]},{iso3:"AIA",iso2:"AI",m49:"660",name:"Anguilla",aliases:["\u{1F1E6}\u{1F1EE}","malliouhana"]},{iso3:"ALA",iso2:"AX",m49:"248",name:"\xC5land Islands",aliases:["\u{1F1E6}\u{1F1FD}","aaland","aaland islands","ahvenanmaa","aland","aland isles","aland region","alands lan","landskapet aland"]},{iso3:"ALB",iso2:"AL",m49:"008",name:"Albania",aliases:["\u{1F1E6}\u{1F1F1}","peoples republic of albania","peoples socialist republic of albania","republic of albania","republika e shqiperise","shqiperi","shqiperia","shqiperise","socialist republic of albania"]},{iso3:"AND",iso2:"AD",m49:"020",name:"Andorra",aliases:["\u{1F1E6}\u{1F1E9}","el pais dels pirineus","les valls dandorra","principality of andorra","principality of the valleys of andorra","principat dandorra","valls dandorra"]},{iso3:"ARE",iso2:"AE",m49:"784",name:"United Arab Emirates",aliases:["\u{1F1E6}\u{1F1EA}","emirates","uae","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A","\u0627\u0644\u0627\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062F\u0648\u0644\u0629 \u0627\u0644\u0625\u0645\u0627\u0631\u0627\u062A \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"ARG",iso2:"AR",m49:"032",name:"Argentina",aliases:["\u{1F1E6}\u{1F1F7}","argentine republic","nacion argentina","republic of argentina","republica argentina"]},{iso3:"ARM",iso2:"AM",m49:"051",name:"Armenia",aliases:["\u{1F1E6}\u{1F1F2}","hayastan","hayastani hanrapetutyun","republic of armenia","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576","\u0570\u0561\u0575\u0561\u057D\u057F\u0561\u0576\u056B \u0570\u0561\u0576\u0580\u0561\u057A\u0565\u057F\u0578\u0582\u0569\u0575\u0578\u0582\u0576","\u0570\u0561\u0575\u0584","\u0570\u0570"]},{iso3:"ASM",iso2:"AS",m49:"016",name:"American Samoa",aliases:["\u{1F1E6}\u{1F1F8}","amerika samoa","east samoa","samoa american","samoa united states","territory of american samoa","us samoa"]},{iso3:"ATA",iso2:"AQ",m49:"010",name:"Antarctica",aliases:["\u{1F1E6}\u{1F1F6}","antarctica treaty area"]},{iso3:"ATF",iso2:"TF",m49:"260",name:"French Southern Territories",aliases:["\u{1F1F9}\u{1F1EB}","taaf","terres australes et antarctiques francaises","terres australes francaises","terres australes francaises les","territoire des terres australes et antarctiques francaises"]},{iso3:"ATG",iso2:"AG",m49:"028",name:"Antigua and Barbuda",aliases:["\u{1F1E6}\u{1F1EC}","antigua","antigua barbuda","barbuda"]},{iso3:"AUS",iso2:"AU",m49:"036",name:"Australia",aliases:["\u{1F1E6}\u{1F1FA}","commonwealth of australia","new holland","new hollandia","nova hollandia"]},{iso3:"AUT",iso2:"AT",m49:"040",name:"Austria",aliases:["\u{1F1E6}\u{1F1F9}","osterreich","republic of austria","republik osterreich","zweite republik"]},{iso3:"AZE",iso2:"AZ",m49:"031",name:"Azerbaijan",aliases:["\u{1F1E6}\u{1F1FF}","az\u0259rbaycan","az\u0259rbaycan respublikas\u0131","republic of azerbaijan"]},{iso3:"BDI",iso2:"BI",m49:"108",name:"Burundi",aliases:["\u{1F1E7}\u{1F1EE}","gouvernement du burundi","la republique du burundi","republic of burundi","republika yu burundi","republika yuburundi","republique du burundi","repuburika yuburundi","uburundi"]},{iso3:"BEL",iso2:"BE",m49:"056",name:"Belgium",aliases:["\u{1F1E7}\u{1F1EA}","belg","belgie","belgien","belgique","kingdom of belgium","konigreich belgien","koninkrijk belgie","royaume de belgique"]},{iso3:"BEN",iso2:"BJ",m49:"204",name:"Benin",aliases:["\u{1F1E7}\u{1F1EF}","dahomey","la republique du benin","republic of benin","republique du benin"]},{iso3:"BES",iso2:"BQ",m49:"535",name:"Bonaire, Sint Eustatius and Saba",aliases:["\u{1F1E7}\u{1F1F6}","bes eilanden","bes islands","bijzondere gemeente","bonaire","bonaire saint eustatius and saba","bonaire sint eustatius en saba","caraibisch nederland","caribbean netherlands","caribisch nederland","hulanda karibense","islanan bes","netherlands antilles","saba","sint eustatius"]},{iso3:"BFA",iso2:"BF",m49:"854",name:"Burkina Faso",aliases:["\u{1F1E7}\u{1F1EB}","republic of burkina faso","republic of upper volta"]},{iso3:"BGD",iso2:"BD",m49:"050",name:"Bangladesh",aliases:["\u{1F1E7}\u{1F1E9}","bangla desh","gonaoprojatontri bangladesh","peoples republic of bangladesh","\u0997\u09A3\u09AA\u09CD\u09B0\u099C\u09BE\u09A4\u09A8\u09CD\u09A4\u09CD\u09B0\u09C0 \u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE \u09A6\u09C7\u09B6","\u09AC\u09BE\u0982\u09B2\u09BE\u09A6\u09C7\u09B6","\u09AC\u09BF\u09A1\u09BF"]},{iso3:"BGR",iso2:"BG",m49:"100",name:"Bulgaria",aliases:["\u{1F1E7}\u{1F1EC}","bulgarian republic","republic of bulgaria","republika bulgaria","republika bulgariya","\u0431\u0433","\u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u044A\u043B\u0433\u0430\u0440\u0438\u044F"]},{iso3:"BHR",iso2:"BH",m49:"048",name:"Bahrain",aliases:["\u{1F1E7}\u{1F1ED}","bahrein islands","kingdom of bahrain","\u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646","\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0628\u062D\u0631\u064A\u0646"]},{iso3:"BHS",iso2:"BS",m49:"044",name:"Bahamas",aliases:["\u{1F1E7}\u{1F1F8}","bahama islands","bahamas the","commonwealth of the bahamas"]},{iso3:"BIH",iso2:"BA",m49:"070",name:"Bosnia and Herzegovina",aliases:["\u{1F1E7}\u{1F1E6}","bosna","bosna i hercegovina","bosnia","bosnia and hercegovina","bosnia herzegovina","hercegovina","herzegovina","\u0431\u0438\u0445","\u0431\u043E\u0441\u043D\u0430","\u0431\u043E\u0441\u043D\u0430 \u0438 \u0445\u0435\u0440\u0446\u0435\u0433\u043E\u0432\u0438\u043D\u0430","\u0431\u0445"]},{iso3:"BLM",iso2:"BL",m49:"652",name:"Saint Barth\xE9lemy",aliases:["\u{1F1E7}\u{1F1F1}","collectivite doutre mer de saint barthelemy","collectivite territoriale de saint barthelemy","collectivity of saint barthelemy","saint barth","saint barths","saint barts","saint bartz"]},{iso3:"BLR",iso2:"BY",m49:"112",name:"Belarus",aliases:["\u{1F1E7}\u{1F1FE}","republic of belarus","respublika belarus","respublika byelarus","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u043A\u0430\u044F \u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430","\u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u0430\u044F \u0440\u0443\u0441\u044C","\u0431\u0435\u043B\u043E\u0440\u0443\u0441\u0441\u0438\u044F","\u0440\u0431","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C","\u0440\u044D\u0441\u043F\u0443\u0431\u043B\u0456\u043A\u0430 \u0431\u0435\u043B\u0430\u0440\u0443\u0441\u044C"]},{iso3:"BLZ",iso2:"BZ",m49:"084",name:"Belize",aliases:["\u{1F1E7}\u{1F1FF}"]},{iso3:"BMU",iso2:"BM",m49:"060",name:"Bermuda",aliases:["\u{1F1E7}\u{1F1F2}","barmuda","barmuda i","barmuda isl","barmuda islands","barmudas","bermoothes","bermuda islands","bermudas","bermudian islands","colony of bermuda","devils isles","isle of devils","somers islands","somers isles","summers isles","territory of bermuda","virgineola"]},{iso3:"BOL",iso2:"BO",m49:"068",name:"Bolivia (Plurinational State of)",aliases:["\u{1F1E7}\u{1F1F4}","bolivia","bulibiya","estado plurinacional de bolivia","plurinational state of bolivia","puliwya","republic of bolivia","republica de bolivia","volivia","wuliwiya","wuliwya"]},{iso3:"BRA",iso2:"BR",m49:"076",name:"Brazil",aliases:["\u{1F1E7}\u{1F1F7}","brasil","federative republic of brazil","pindorama","republica federativa do brasil"]},{iso3:"BRB",iso2:"BB",m49:"052",name:"Barbados",aliases:["\u{1F1E7}\u{1F1E7}","barbadoes"]},{iso3:"BRN",iso2:"BN",m49:"096",name:"Brunei Darussalam",aliases:["\u{1F1E7}\u{1F1F3}","brunei","nation of brunei the abode of peace","negara brunei darussalam"]},{iso3:"BTN",iso2:"BT",m49:"064",name:"Bhutan",aliases:["\u{1F1E7}\u{1F1F9}","kingdom of bhutan","\u0F60\u0F56\u0FB2\u0F74\u0F42","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F0B\u0F61\u0F74\u0F63\u0F0B","\u0F60\u0F56\u0FB2\u0F74\u0F42\u0F61\u0F74\u0F63\u0F0B\u0F0B"]},{iso3:"BVT",iso2:"BV",m49:"074",name:"Bouvet Island",aliases:["\u{1F1E7}\u{1F1FB}"]},{iso3:"BWA",iso2:"BW",m49:"072",name:"Botswana",aliases:["\u{1F1E7}\u{1F1FC}","lefatshe la botswana","republic of botswana"]},{iso3:"CAF",iso2:"CF",m49:"140",name:"Central African Republic",aliases:["\u{1F1E8}\u{1F1EB}","centrafricaine republique","centrafrique","central africa","kodorosese ti beafrika","la republique","rep centrafrique","republique centrafricaine"]},{iso3:"CAN",iso2:"CA",m49:"124",name:"Canada",aliases:["\u{1F1E8}\u{1F1E6}","le canada"]},{iso3:"CCK",iso2:"CC",m49:"166",name:"Cocos (Keeling) Islands",aliases:["\u{1F1E8}\u{1F1E8}","cocos islands","keeling islands","territory of the cocos keeling islands"]},{iso3:"CHE",iso2:"CH",m49:"756",name:"Switzerland",aliases:["\u{1F1E8}\u{1F1ED}","confederation helvetique","confederation suisse","confederazione elvetica","confederazione svizzera","confederaziun svizra","confoederatio helvetica","conf\u0153deratio helvetica","eidgenossenschaft","elvezia","helvetie","la confederation suisse","schweiz","schweizerische eidgenossenschaft","suisse","svizra","svizzera","swiss","swiss confederation"]},{iso3:"CHL",iso2:"CL",m49:"152",name:"Chile",aliases:["\u{1F1E8}\u{1F1F1}","republic of chile","republica de chile"]},{iso3:"CHN",iso2:"CN",m49:"156",name:"China",aliases:["\u{1F1E8}\u{1F1F3}","china pr","peoples republic of china","pr china","prc","\u4E2D\u534E\u4EBA\u6C11\u5171\u548C\u56FD","\u4E2D\u56FD"]},{iso3:"CIV",iso2:"CI",m49:"384",name:"C\xF4te d'Ivoire",aliases:["\u{1F1E8}\u{1F1EE}","cote ivoire","ivory coast","republic of cote divoire","republic of ivory coast","republic of the ivory coast","republique de cote divoire"]},{iso3:"CMR",iso2:"CM",m49:"120",name:"Cameroon",aliases:["\u{1F1E8}\u{1F1F2}","cameroun","la republique du cameroun","republic of cameroon","republique du cameroun"]},{iso3:"COD",iso2:"CD",m49:"180",name:"Democratic Republic of the Congo",aliases:["\u{1F1E8}\u{1F1E9}","congo belge","congo democratic republic of the","congo kinshasa","dem rep congo","dem republic of congo","dem republic of the congo","democratic republic of congo","dr congo","rd congo","rep demcongo","republic of the congo","republique democratique du congo","republique du zaire","zaire"]},{iso3:"COG",iso2:"CG",m49:"178",name:"Congo",aliases:["\u{1F1E8}\u{1F1EC}","congo brazza","congo brazzaville","congo republic","rep congo","republic of congo","republique du congo"]},{iso3:"COK",iso2:"CK",m49:"184",name:"Cook Islands",aliases:["\u{1F1E8}\u{1F1F0}","cook group","hervey islands"]},{iso3:"COL",iso2:"CO",m49:"170",name:"Colombia",aliases:["\u{1F1E8}\u{1F1F4}","republic of colombia","republica de colombia"]},{iso3:"COM",iso2:"KM",m49:"174",name:"Comoros",aliases:["\u{1F1F0}\u{1F1F2}","comores","comores archipel","etat comorien","lunion des comores","republique des comores","republique federale et islamique des comores","republique federale islamique des comores","territoire des comores","union des comores","union of the comoros","\u0625\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631","\u0627\u062A\u062D\u0627\u062F \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u0627\u0644\u0627\u062A\u062D\u0627\u062F \u0627\u0644\u0642\u0645\u0631\u064A","\u0627\u0644\u0642\u0645\u0631","\u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631 \u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0627\u062A\u062D\u0627\u062F\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u0632\u0631\u0627\u0644\u0642\u0645\u0631 \u0627\u0644\u0645\u062A\u062D\u062F\u0629"]},{iso3:"CPV",iso2:"CV",m49:"132",name:"Cabo Verde",aliases:["\u{1F1E8}\u{1F1FB}","cape verde","cape verde islands","kab verd","kabu verdi","kauberdi","republic of cabo verde","republic of cape verde","republica de cabo verde"]},{iso3:"CRI",iso2:"CR",m49:"188",name:"Costa Rica",aliases:["\u{1F1E8}\u{1F1F7}","republic of costa rica","republica de costa rica"]},{iso3:"CUB",iso2:"CU",m49:"192",name:"Cuba",aliases:["\u{1F1E8}\u{1F1FA}","isla juana","republic of cuba","republica de cuba"]},{iso3:"CUW",iso2:"CW",m49:"531",name:"Cura\xE7ao",aliases:["\u{1F1E8}\u{1F1FC}","corsou","corsouw","corsow","country of curacao","curacau","curacoa","curazao","cura\u03C2ao","curocao","island territory of curacao","korsou","land curacao","pais korsou"]},{iso3:"CXR",iso2:"CX",m49:"162",name:"Christmas Island",aliases:["\u{1F1E8}\u{1F1FD}","christmas island other territories","christmas island other territories australia","territory of christmas island"]},{iso3:"CYM",iso2:"KY",m49:"136",name:"Cayman Islands",aliases:["\u{1F1F0}\u{1F1FE}","caymans"]},{iso3:"CYP",iso2:"CY",m49:"196",name:"Cyprus",aliases:["\u{1F1E8}\u{1F1FE}","greek administration of southern cyprus","greek cypriot state","guney k\u0131br\u0131s","guney k\u0131br\u0131s rum cumhuriyeti","guney k\u0131br\u0131s rum kesimi","guney k\u0131br\u0131s rum yonetimi","kipriaki dhimokratia","k\u0131br\u0131s","k\u0131br\u0131s cumhuriyeti","k\u0131br\u0131s rum kesimi","kypriaki dimokratia","kypros","republic of cyprus","\u03BA\u03C5\u03C0\u03C1\u03B9\u03B1\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1","\u03BA\u03C5\u03C0\u03C1\u03BF\u03C2"]},{iso3:"CZE",iso2:"CZ",m49:"203",name:"Czechia",aliases:["\u{1F1E8}\u{1F1FF}","ceska republika","ceske kraje","ceske uzemi","ceske zeme","cesko","cr","czech republic"]},{iso3:"DEU",iso2:"DE",m49:"276",name:"Germany",aliases:["\u{1F1E9}\u{1F1EA}","br deutschland","bundesrepublik","bundesrepublik deutschland","deutschland","federal republic of germany"]},{iso3:"DJI",iso2:"DJ",m49:"262",name:"Djibouti",aliases:["\u{1F1E9}\u{1F1EF}","la republique de djibouti","republic of djibouti","republique de djibouti","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062C\u064A\u0628\u0648\u062A\u064A","\u062C\u064A\u0628\u0648\u062A\u064A"]},{iso3:"DMA",iso2:"DM",m49:"212",name:"Dominica",aliases:["\u{1F1E9}\u{1F1F2}","commonwealth of dominica","island of dominica","waitu kubuli"]},{iso3:"DNK",iso2:"DK",m49:"208",name:"Denmark",aliases:["\u{1F1E9}\u{1F1F0}","dania","danmark","denmark proper","kongeriget danmark","metropolitan denmark"]},{iso3:"DOM",iso2:"DO",m49:"214",name:"Dominican Republic",aliases:["\u{1F1E9}\u{1F1F4}","dominicana","domrep","haiti espanol","quisqueya","republica de santo domingo","republica dominicana","santo domingo"]},{iso3:"DZA",iso2:"DZ",m49:"012",name:"Algeria",aliases:["\u{1F1E9}\u{1F1FF}","peoples democratic republic of algeria","\u0627\u0644\u062C\u0632\u0627\u0626\u0631","\u0627\u0644\u062C\u0632\u0627\u064A\u0631","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062C\u0632\u0627\u0626\u0631\u064A\u0629 \u0627\u0644\u062F\u064A\u0645\u0642\u0631\u0627\u0637\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629","\u0627\u0644\u062F\u0632\u0627\u064A\u0631","\u062F\u0632\u0627\u064A\u0631"]},{iso3:"ECU",iso2:"EC",m49:"218",name:"Ecuador",aliases:["\u{1F1EA}\u{1F1E8}","ecuadorian state","el ecuador","estado ecuatoriano","republic of ecuador","republic of equator","republic of the equator","republica del ecuador"]},{iso3:"EGY",iso2:"EG",m49:"818",name:"Egypt",aliases:["\u{1F1EA}\u{1F1EC}","arab rep egypt","arab republic of egypt","rep egypt","republic of egypt","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0645\u0635\u0631 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0645\u0635\u0631"]},{iso3:"ERI",iso2:"ER",m49:"232",name:"Eritrea",aliases:["\u{1F1EA}\u{1F1F7}","ertra","hagere ertra","hagere iertra","iertra","iritriya","state of eritrea","\u0625\u0631\u062A\u0631\u064A\u0627","\u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u0631\u064A\u0627","\u0627\u0631\u062A\u064A\u0631\u064A\u0627","\u0627\u0631\u064A\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u062A\u0631\u064A\u0627","\u062F\u0648\u0644\u0629 \u0625\u0631\u064A\u062A\u0631\u064A\u0627","\u1203\u1308\u1228 \u12A4\u122D\u1275\u122B","\u12A4\u122D\u1275\u122B"]},{iso3:"ESH",iso2:"EH",m49:"732",name:"Western Sahara",aliases:["\u{1F1EA}\u{1F1ED}","southern provinces","spanish sahara","west sahara"]},{iso3:"ESP",iso2:"ES",m49:"724",name:"Spain",aliases:["\u{1F1EA}\u{1F1F8}","espana","estado espanol","kingdom of spain","reino de espana"]},{iso3:"EST",iso2:"EE",m49:"233",name:"Estonia",aliases:["\u{1F1EA}\u{1F1EA}","eesti","eesti noukogude sotsialistlik vabariik","eesti vabariik","estland","republic of estonia"]},{iso3:"ETH",iso2:"ET",m49:"231",name:"Ethiopia",aliases:["\u{1F1EA}\u{1F1F9}","federal democratic republic of ethiopia","ityopiya","yeityopiya federalawi demokrasiyawi ripeblik","yeityopiya hizbawi dimokrasiyawi ripublik","\u12A2\u1275\u12EE\u1335\u12EB","\u12E8\u12A2\u1275\u12EE\u1335\u12EB \u134C\u12F4\u122B\u120B\u12CA \u12F4\u121E\u12AD\u122B\u1232\u12EB\u12CA \u122A\u1350\u1265\u120A\u12AD"]},{iso3:"FIN",iso2:"FI",m49:"246",name:"Finland",aliases:["\u{1F1EB}\u{1F1EE}","republic of finland","republiken finland","suomen tasavalta","suomi"]},{iso3:"FJI",iso2:"FJ",m49:"242",name:"Fiji",aliases:["\u{1F1EB}\u{1F1EF}","fiji ganarajya","matanitu ko viti","matanitu tugalala o viti","republic of fiji","republic of the fiji islands","viti"]},{iso3:"FLK",iso2:"FK",m49:"238",name:"Falkland Islands (Malvinas)",aliases:["\u{1F1EB}\u{1F1F0}","colony of the falkland islands","falkland islands","falklands","islas malvinas","malvinas","malvinas islands"]},{iso3:"FRA",iso2:"FR",m49:"250",name:"France",aliases:["\u{1F1EB}\u{1F1F7}","fr","french republic","la france","la republique francaise","lhexagone","republique francaise"]},{iso3:"FRO",iso2:"FO",m49:"234",name:"Faroe Islands",aliases:["\u{1F1EB}\u{1F1F4}","faer oer","f\xE6r\xF8","faeroe is","faeroe islands","faeroe isles","f\xE6r\xF8erne","faeroes","far oer","faroe island","faroe isles","faroes","faroese islands","f\xF8roya","f\xF8royar","f\xF8royum"]},{iso3:"FSM",iso2:"FM",m49:"583",name:"Micronesia (Federated States of)",aliases:["\u{1F1EB}\u{1F1F2}","fed sts micronesia","fed sts of micronesia","federated states of micronesia","federated states of micronesia fsm","micronesia"]},{iso3:"GAB",iso2:"GA",m49:"266",name:"Gabon",aliases:["\u{1F1EC}\u{1F1E6}","gabonese republic","la republique gabonaise","le gabon","republique du gabon","republique gabonaise"]},{iso3:"GBR",iso2:"GB",m49:"826",name:"United Kingdom of Great Britain and Northern Ireland",aliases:["\u{1F1EC}\u{1F1E7}","britain","england","great britain","great britain and northern ireland","northern ireland","scotland","uk","united kingdom","wales"]},{iso3:"GEO",iso2:"GE",m49:"268",name:"Georgia",aliases:["\u{1F1EC}\u{1F1EA}","georgia country","republic of georgia","sakartvelo","\u049B\u044B\u0440\u04AD\u0442\u04D9\u044B\u043B\u0430","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD","\u10E1\u10D0\u10E5\u10D0\u10E0\u10D7\u10D5\u10D4\u10DA\u10DD\u10E1 \u10E0\u10D4\u10E1\u10DE\u10E3\u10D1\u10DA\u10D8\u10D9\u10D0"]},{iso3:"GGY",iso2:"GG",m49:"831",name:"Guernsey",aliases:["\u{1F1EC}\u{1F1EC}","bailiwick of guernsey","bailliage de guernesey","bailliage de guernesi","giernesi","great britain guernsey","guernesey","lisia"]},{iso3:"GHA",iso2:"GH",m49:"288",name:"Ghana",aliases:["\u{1F1EC}\u{1F1ED}","republic of ghana"]},{iso3:"GIB",iso2:"GI",m49:"292",name:"Gibraltar",aliases:["\u{1F1EC}\u{1F1EE}","rock of gibraltar"]},{iso3:"GIN",iso2:"GN",m49:"324",name:"Guinea",aliases:["\u{1F1EC}\u{1F1F3}","guinee","guinee conakry","republic of guinea","republique de guinee"]},{iso3:"GLP",iso2:"GP",m49:"312",name:"Guadeloupe",aliases:["\u{1F1EC}\u{1F1F5}"]},{iso3:"GMB",iso2:"GM",m49:"270",name:"Gambia",aliases:["\u{1F1EC}\u{1F1F2}","islamic republic of the gambia","republic of the gambia"]},{iso3:"GNB",iso2:"GW",m49:"624",name:"Guinea-Bissau",aliases:["\u{1F1EC}\u{1F1FC}","guine bissau","republic of guinea bissau","republica da guine bissau"]},{iso3:"GNQ",iso2:"GQ",m49:"226",name:"Equatorial Guinea",aliases:["\u{1F1EC}\u{1F1F6}","guine equatorial","guinea ecuatorial","guinea espanola","guinee equat","guinee equatoriale","la republique de guinee equatoriale","posesiones espanolas del golfo de guinea","provincia de la guinea ecuatorial","republic of equatorial guinea","republica da guine equatorial","republica de guinea ecuatorial","territorios espanoles del golfo de guinea"]},{iso3:"GRC",iso2:"GR",m49:"300",name:"Greece",aliases:["\u{1F1EC}\u{1F1F7}","ellada","ellas","elliniki dhimokratia","elliniki dimokratia","greek republic","hellas","hellas greece","hellenic republic","vasilion tis ellados","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1\u03C2","\u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1 \u03C4\u03B7\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03BF\u03C2","\u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B1\u03C2","\u03B5\u03BB\u03BB\u03B1\u03C2 \u03B5\u03BB\u03BB\u03B1\u03B4\u03B1","\u03B5\u03BB\u03BB\u03B7\u03BD\u03B9\u03BA\u03B7 \u03B4\u03B7\u03BC\u03BF\u03BA\u03C1\u03B1\u03C4\u03B9\u03B1"]},{iso3:"GRD",iso2:"GD",m49:"308",name:"Grenada",aliases:["\u{1F1EC}\u{1F1E9}"]},{iso3:"GRL",iso2:"GL",m49:"304",name:"Greenland",aliases:["\u{1F1EC}\u{1F1F1}","kalaallit nunaat"]},{iso3:"GTM",iso2:"GT",m49:"320",name:"Guatemala",aliases:["\u{1F1EC}\u{1F1F9}","republic of guatemala","republica de guatemala"]},{iso3:"GUF",iso2:"GF",m49:"254",name:"French Guiana",aliases:["\u{1F1EC}\u{1F1EB}","fr 973","guiana","guiana france","guyane","guyane francaise","gwiyann","gwiyann franse","lagwiyann"]},{iso3:"GUM",iso2:"GU",m49:"316",name:"Guam",aliases:["\u{1F1EC}\u{1F1FA}","guahan","guam usa","islan guahan","island of guam","territory of guam"]},{iso3:"GUY",iso2:"GY",m49:"328",name:"Guyana",aliases:["\u{1F1EC}\u{1F1FE}","co operative republic of guyana","republic of guyana"]},{iso3:"HKG",iso2:"HK",m49:"344",name:"Hong Kong",aliases:["\u{1F1ED}\u{1F1F0}","hksar","hong kong sar","hong kong special administrative region","hong kong special administrative region of the peoples republic of china","hongkong"]},{iso3:"HMD",iso2:"HM",m49:"334",name:"Heard Island and McDonald Islands",aliases:["\u{1F1ED}\u{1F1F2}","heard","heard & mcdonald islands","heard and macdonald islands","heard island","himi","mcdonald","mcdonald island","territory of heard island and mcdonald islands"]},{iso3:"HND",iso2:"HN",m49:"340",name:"Honduras",aliases:["\u{1F1ED}\u{1F1F3}","guaymuras","higueras","honduran republic","republic of honduras","republica de honduras"]},{iso3:"HRV",iso2:"HR",m49:"191",name:"Croatia",aliases:["\u{1F1ED}\u{1F1F7}","hrvatska","republic of croatia","republika hrvatska"]},{iso3:"HTI",iso2:"HT",m49:"332",name:"Haiti",aliases:["\u{1F1ED}\u{1F1F9}","ayiti","haitian republic","la republique dhaiti","repiblik d ayiti","republic of haiti","republique dhaiti"]},{iso3:"HUN",iso2:"HU",m49:"348",name:"Hungary",aliases:["\u{1F1ED}\u{1F1FA}","a magyar koztarsasag","a magyar nepkoztarsasag","harmadik magyar koztarsasag","magyar koztarsasag","magyar nepkoztarsasag","magyarorszag","mo"]},{iso3:"IDN",iso2:"ID",m49:"360",name:"Indonesia",aliases:["\u{1F1EE}\u{1F1E9}","negara kesatuan republik indonesia","nkri","republic of indonesia","republik indonesia"]},{iso3:"IMN",iso2:"IM",m49:"833",name:"Isle of Man",aliases:["\u{1F1EE}\u{1F1F2}","ellan vannin","i man","i mann","i mannin","isle of mann","mann","mannin","manx"]},{iso3:"IND",iso2:"IN",m49:"356",name:"India",aliases:["\u{1F1EE}\u{1F1F3}","al hind","bharat","bharat ganarajya","bharata","bharatvarsh","hindoostan","hindustan","indostan","republic of india","tenjiku","tianzhu","\u0906\u0930\u094D\u092F\u0935\u0930\u094D\u0924","\u0907\u0902\u0921\u093F\u092F\u093E","\u0907\u0923\u094D\u0921\u093F\u092F\u093E","\u092D\u093E\u0930\u0924","\u092D\u093E\u0930\u0924 \u0917\u0923\u0930\u093E\u091C\u094D\u092F","\u092D\u093E\u0930\u0924\u0935\u0930\u094D\u0937","\u0939\u093F\u0902\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u0941\u0938\u094D\u0924\u093E\u0928","\u0939\u093F\u0928\u094D\u0926\u094B\u0938\u094D\u0924\u093E\u0928"]},{iso3:"IOT",iso2:"IO",m49:"086",name:"British Indian Ocean Territory",aliases:["\u{1F1EE}\u{1F1F4}","biot"]},{iso3:"IRL",iso2:"IE",m49:"372",name:"Ireland",aliases:["\u{1F1EE}\u{1F1EA}","eire","hibernia","irish republic","poblacht na heireann","republic of ireland","southern ireland"]},{iso3:"IRN",iso2:"IR",m49:"364",name:"Iran (Islamic Republic of)",aliases:["\u{1F1EE}\u{1F1F7}","iran","islamic rep iran","islamic republic of iran","persia","\u0627\u06CC\u0631\u0627\u0646","\u0627\u06CC\u0631\u0627\u0646\u0632\u0645\u06CC\u0646","\u067E\u0627\u0631\u0633","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u064A\u0631\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u06CC \u0627\u0633\u0644\u0627\u0645\u06CC \u0627\u06CC\u0631\u0627\u0646","\u0643\u0634\u0648\u0631 \u0634\u0627\u0647\u0646\u0634\u0627\u0647\u06CC \u0627\u064A\u0631\u0627\u0646"]},{iso3:"IRQ",iso2:"IQ",m49:"368",name:"Iraq",aliases:["\u{1F1EE}\u{1F1F6}","eraq","iraqe","komar i eraq","republic of iraq","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642\u064A\u0629","\u0627\u0644\u0639\u0631\u0627\u0642","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0627\u0642","\u0639\u0631\u0627\u0642","\u0639\u06CE\u0631\u0627\u0642"]},{iso3:"ISL",iso2:"IS",m49:"352",name:"Iceland",aliases:["\u{1F1EE}\u{1F1F8}","icelandic republic","island","ly\xF0veldi\xF0 island","republic of iceland","ysland"]},{iso3:"ISR",iso2:"IL",m49:"376",name:"Israel",aliases:["\u{1F1EE}\u{1F1F1}","erez yisrael","medinat yisrael","state of israel","yisrael","\u05D9\u05E9\u05E8\u05D0\u05DC","\u05DE\u05D3\u05D9\u05E0\u05EA \u05D9\u05E9\u05E8\u05D0\u05DC"]},{iso3:"ITA",iso2:"IT",m49:"380",name:"Italy",aliases:["\u{1F1EE}\u{1F1F9}","il bel paese","italia","italian republic","repubblica italiana","republic of italy"]},{iso3:"JAM",iso2:"JM",m49:"388",name:"Jamaica",aliases:["\u{1F1EF}\u{1F1F2}","commonwealth of jamaica","jamieka","jomieka","jumieka"]},{iso3:"JEY",iso2:"JE",m49:"832",name:"Jersey",aliases:["\u{1F1EF}\u{1F1EA}","bailliage de jerri","bailliage de jersey","balliwick of jersey","i iersey","i jersey","iersey","iersey i","isle of jersey","jerri","jersey i","jersey island"]},{iso3:"JOR",iso2:"JO",m49:"400",name:"Jordan",aliases:["\u{1F1EF}\u{1F1F4}","giordania","hashemite kingdom of jordan","kingdom of jordan","state of jordan","yarden","\u0627\u0644\u0623\u0631\u062F\u0646","\u0627\u0644\u0627\u0631\u062F\u0646","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0623\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0627\u0631\u062F\u0646\u064A\u0629 \u0627\u0644\u0647\u0627\u0634\u0645\u064A\u0629"]},{iso3:"JPN",iso2:"JP",m49:"392",name:"Japan",aliases:["\u{1F1EF}\u{1F1F5}","state of japan","\u3042\u304D\u3064\u3057\u307E","\u304A\u304A\u3084\u3057\u307E","\u3057\u304D\u3057\u307E","\u30B8\u30E3\u30D1\u30F3","\u3057\u3093\u3057\u3085\u3046","\u306B\u3063\u307D\u3093","\u306B\u3063\u307D\u3093\u3053\u304F","\u306B\u307B\u3093","\u306B\u307B\u3093\u3053\u304F","\u3072\u3044\u305A\u308B\u304F\u306B","\u3075\u305D\u3046","\u5927\u516B\u5DDE","\u6276\u6728\u4E4B\u5730","\u6276\u6851","\u6276\u6851\u56FD","\u6577\u5CF6","\u65E5\u51FA\u308B\u56FD","\u65E5\u672C","\u6991\u6728\u4E4B\u5730","\u745E\u7A42\u56FD","\u795E\u5DDE","\u79CB\u6D25\u5CF6","\u8466\u539F\u4E2D\u56FD"]},{iso3:"KAZ",iso2:"KZ",m49:"398",name:"Kazakhstan",aliases:["\u{1F1F0}\u{1F1FF}","qazaqstan","qazaqstan respublikasy","republic of kazakhstan","\u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D","\u049B\u0430\u0437\u0430\u049B\u0441\u0442\u0430\u043D \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043A\u0430\u0437\u0430\u0445\u0441\u0442\u0430\u043D","\u0440\u043A"]},{iso3:"KEN",iso2:"KE",m49:"404",name:"Kenya",aliases:["\u{1F1F0}\u{1F1EA}","jamhuri ya kenya","republic of kenya"]},{iso3:"KGZ",iso2:"KG",m49:"417",name:"Kyrgyzstan",aliases:["\u{1F1F0}\u{1F1EC}","kyrgyz republic","kyrgyz respublikasy","kyrgyzstan respublikasy","\u043A\u0440","\u043A\u044B\u0440\u0433\u044B\u0437 \u0440\u0435\u0441\u043F\u0443\u0431\u043B\u0438\u043A\u0430\u0441\u044B","\u043A\u044B\u0440\u0433\u044B\u0437\u0441\u0442\u0430\u043D"]},{iso3:"KHM",iso2:"KH",m49:"116",name:"Cambodia",aliases:["\u{1F1F0}\u{1F1ED}","camboya","campuchia","kambodzha","kamboja","kampuchea","kingdom of cambodia","\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6","\u1796\u17D2\u179A\u17C7\u179A\u17B6\u1787\u17B6\u178E\u17B6\u1785\u1780\u17D2\u179A\u1780\u1798\u17D2\u1796\u17BB\u1787\u17B6"]},{iso3:"KIR",iso2:"KI",m49:"296",name:"Kiribati",aliases:["\u{1F1F0}\u{1F1EE}","republic of kiribati"]},{iso3:"KNA",iso2:"KN",m49:"659",name:"Saint Kitts and Nevis",aliases:["\u{1F1F0}\u{1F1F3}","federation of saint christopher and nevis","federation of saint kitts and nevis","kitts & nevis","nevis","saint christopher","saint christopher and nevis","saint kitts"]},{iso3:"KOR",iso2:"KR",m49:"410",name:"Republic of Korea",aliases:["\u{1F1F0}\u{1F1F7}","korea","korea republic","korea republic of","korea south","rep korea","s korea","south korea","taehan minguk","\uB0A8\uC870\uC120","\uB0A8\uD55C","\uB300\uD55C","\uB300\uD55C\uBBFC\uAD6D","\uCF54\uB9AC\uC544","\uD55C\uAD6D"]},{iso3:"KWT",iso2:"KW",m49:"414",name:"Kuwait",aliases:["\u{1F1F0}\u{1F1FC}","state of kuwait","\u0627\u0644\u0643\u0648\u064A\u062A","\u062F\u0648\u0644\u0629 \u0627\u0644\u0643\u0648\u064A\u062A"]},{iso3:"LAO",iso2:"LA",m49:"418",name:"Lao People's Democratic Republic",aliases:["\u{1F1F1}\u{1F1E6}","laos","sathalanalat paxathipatai paxaxon lao","\u0EAA\u0EB2\u0E97\u0EB2\u0EA5\u0EB0\u0E99\u0EB0\u0EA5\u0EB1\u0E94 \u0E9B\u0EB0\u0E8A\u0EB2\u0E97\u0EB4\u0E9B\u0EB0\u0EC4\u0E95 \u0E9B\u0EB0\u0E8A\u0EB2\u0E8A\u0EBB\u0E99\u0EA5\u0EB2\u0EA7","\u0E9B\u0EB0\u0EC0\u0E97\u0E94\u0EA5\u0EB2\u0EA7","\u0EA5\u0EB2\u0EA7"]},{iso3:"LBN",iso2:"LB",m49:"422",name:"Lebanon",aliases:["\u{1F1F1}\u{1F1E7}","lebanese republic","republic of lebanon","state of lebanon","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u0628\u0646\u0627\u0646\u064A\u0629","\u0644\u0628\u0646\u0627\u0646"]},{iso3:"LBR",iso2:"LR",m49:"430",name:"Liberia",aliases:["\u{1F1F1}\u{1F1F7}","liber","republic of liberia"]},{iso3:"LBY",iso2:"LY",m49:"434",name:"Libya",aliases:["\u{1F1F1}\u{1F1FE}","state of libya","\u0627\u0644\u062C\u0645\u0627\u0647\u064A\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629 \u0627\u0644\u0634\u0639\u0628\u064A\u0629 \u0627\u0644\u0625\u0634\u062A\u0631\u0627\u0643\u064A\u0629","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A","\u0627\u0644\u0644\u064A\u0628\u064A\u0629","\u0627\u0644\u0644\u064A\u0628\u064A\u0646","\u062F\u0648\u0644\u0629 \u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u0628\u064A\u0627","\u0644\u064A\u0628\u064A","\u0644\u064A\u0628\u064A\u0627","\u0644\u064A\u0628\u064A\u0629"]},{iso3:"LCA",iso2:"LC",m49:"662",name:"Saint Lucia",aliases:["\u{1F1F1}\u{1F1E8}","hewanorra","iyonola"]},{iso3:"LIE",iso2:"LI",m49:"438",name:"Liechtenstein",aliases:["\u{1F1F1}\u{1F1EE}","furstentum lichtenstein","furstentum liechtenstein","principality of liechtenstein"]},{iso3:"LKA",iso2:"LK",m49:"144",name:"Sri Lanka",aliases:["\u{1F1F1}\u{1F1F0}","ceylan","ceylon","democratic socialist republic of sri lanka","ilankaic cananayaka cocalicak kutiyarcu","lankava","prajatantravadi samajavadi janarajaya sri lanka","serendib","srilanka","taprobane","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0B9A\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B87\u0BB2\u0B99\u0BCD\u0B95\u0BC8 \u0B9A\u0BA9\u0BA8\u0BBE\u0BAF\u0B95 \u0B9A\u0BCB\u0BB7\u0BB2\u0BBF\u0B9A\u0B95\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B88\u0BB4\u0BAE\u0BCD","\u0B9A\u0BBF\u0BB2\u0BCB\u0BA9\u0BCD","\u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF \u0DB4\u0DCA\u0DBB\u0DA2\u0DCF\u0DAD\u0DB1\u0DCA\u0DAD\u0DCA\u0DBB\u0DC0\u0DCF\u0DAF\u0DD3 \u0DC3\u0DB8\u0DCF\u0DA2\u0DC0\u0DCF\u0DAF\u0DD3 \u0DA2\u0DB1\u0DBB\u0DA2\u0DBA","\u0DC1\u0DCA\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0","\u0DC1\u0DCA\u200D\u0DBB\u0DD3 \u0DBD\u0D82\u0D9A\u0DCF\u0DC0"]},{iso3:"LSO",iso2:"LS",m49:"426",name:"Lesotho",aliases:["\u{1F1F1}\u{1F1F8}","kingdom of lesotho","mmuso wa lesotho","mountain kingdom"]},{iso3:"LTU",iso2:"LT",m49:"440",name:"Lithuania",aliases:["\u{1F1F1}\u{1F1F9}","lietuva","lietuvos respublika","republic of lithuania"]},{iso3:"LUX",iso2:"LU",m49:"442",name:"Luxembourg",aliases:["\u{1F1F1}\u{1F1FA}","grand duche","grand duche de luxembourg","grand duchy of luxembourg","gro\xDFherzogtum luxemburg","groussherzogtum letzebuerg","le grand duche de luxembourg","letzebuerg","letzebuerger land","lux","luxemburg"]},{iso3:"LVA",iso2:"LV",m49:"428",name:"Latvia",aliases:["\u{1F1F1}\u{1F1FB}","latveja","latvejas republika","latvian republic","latvija","latvijas republika","letm\u043E","letm\u043E vabam\u043E","republic of latvia"]},{iso3:"MAC",iso2:"MO",m49:"446",name:"Macao",aliases:["\u{1F1F2}\u{1F1F4}","aomen","macao sar","macao special administrative region","macao special administrative region of the peoples republic of china","macau","macau rae da china","macau sar","macau special administrative region","macau special administrative region of the peoples republic of china","raem","regiao administrativa especial de macau","regiao administrativa especial de macau da republica popular da china","\u4E2D\u570B\u6FB3\u9580\u7279\u5225\u884C\u653F\u5340","\u6FB3\u9580"]},{iso3:"MAF",iso2:"MF",m49:"663",name:"Saint Martin (French Part)",aliases:["\u{1F1F2}\u{1F1EB}","collectivite de saint martin","collectivity of saint martin","saint martin","saint martin antilles francaises","saint martin france"]},{iso3:"MAR",iso2:"MA",m49:"504",name:"Morocco",aliases:["\u{1F1F2}\u{1F1E6}","kingdom of morocco","\u0627\u0644\u0645\u063A\u0631\u0628","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0645\u063A\u0631\u0628\u064A\u0629","\u2D30\u2D4E\u2D53\u2D54 \u2D4F \u2D61\u2D30\u2D3D\u2D53\u2D5B","\u2D30\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D55\u2D55\u2D53\u2D3D","\u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31","\u2D5C\u2D30\u2D33\u2D4D\u2D37\u2D49\u2D5C \u2D4F \u2D4D\u2D4E\u2D56\u2D54\u2D49\u2D31"]},{iso3:"MCO",iso2:"MC",m49:"492",name:"Monaco",aliases:["\u{1F1F2}\u{1F1E8}","fort hercule","la principaute de monaco","monaco rattachee au district de menton en 1793","munegu","principality and diocese of monaco","principality of monaco","principatu de munegu","principaute de monaco"]},{iso3:"MDA",iso2:"MD",m49:"498",name:"Republic of Moldova",aliases:["\u{1F1F2}\u{1F1E9}","moldavia","moldova","moldova republic of","moldova republica","r moldova","rep moldova","republica moldova","\u043C\u043E\u043B\u0434\u043E\u0432\u0430"]},{iso3:"MDG",iso2:"MG",m49:"450",name:"Madagascar",aliases:["\u{1F1F2}\u{1F1EC}","la republique de madagascar","madagasikara","repoblikani madagasikara","republic of madagascar","republique de madagascar"]},{iso3:"MDV",iso2:"MV",m49:"462",name:"Maldives",aliases:["\u{1F1F2}\u{1F1FB}","dhivehi raajjeyge jumhooriyyaa","republic of maldives","\u078B\u07A8\u0788\u07AC\u0780\u07A8 \u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AC","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07AA\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7","\u078B\u07A8\u0788\u07AC\u0780\u07A8\u0783\u07A7\u0787\u07B0\u0796\u07AD\u078E\u07AC \u0796\u07AA\u0789\u07B0\u0780\u07AB\u0783\u07A8\u0787\u07B0\u0794\u07A7"]},{iso3:"MEX",iso2:"MX",m49:"484",name:"Mexico",aliases:["\u{1F1F2}\u{1F1FD}","estados unidos mejicanos","estados unidos mexicanos","mejico","mexican republic","mexican united states","mexihco","mexihko","mexika sentik wexteyowalko","mexiko","mexko","mexko axkayotl","mexko tlalli","nueva espana","republica mejicana","republica mexicana","united mexican states","united states of mexico"]},{iso3:"MHL",iso2:"MH",m49:"584",name:"Marshall Islands",aliases:["\u{1F1F2}\u{1F1ED}","aelon kein ad","aolepan aorokin majel","jolet jen anij","majel","majol","republic of the marshall islands"]},{iso3:"MKD",iso2:"MK",m49:"807",name:"North Macedonia",aliases:["\u{1F1F2}\u{1F1F0}","former yugoslav republic of macedonia","fyr macedonia","fyrom","irjm","ish republika jugosllave e maqedonise","macedonia","maqedoni","maqedonia","maqedonia e veriut","republic of macedonia","republic of north macedonia","republika e maqedonise","republika e maqedonise se veriut","\u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430","\u0440\u043C","\u0440\u0441\u043C","\u0441\u0435\u0432\u0435\u0440\u043D\u0430 \u043C\u0430\u043A\u0435\u0434\u043E\u043D\u0438\u0458\u0430"]},{iso3:"MLI",iso2:"ML",m49:"466",name:"Mali",aliases:["\u{1F1F2}\u{1F1F1}","maali","republic of mali"]},{iso3:"MLT",iso2:"MT",m49:"470",name:"Malta",aliases:["\u{1F1F2}\u{1F1F9}","malta island","repubblika ta malta","republic of malta"]},{iso3:"MMR",iso2:"MM",m49:"104",name:"Myanmar",aliases:["\u{1F1F2}\u{1F1F2}","burma","pyidaungzu myanma naingngandaw","pyidaungzu thammada myanma naingngandaw","republic of the union of myanmar","union of burma","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F \u101E\u1019\u1039\u1019\u1010 \u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u200C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1015\u103C\u100A\u103A\u1011\u1031\u102C\u1004\u103A\u1005\u102F\u101E\u1019\u1039\u1019\u1010\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1017\u1019\u102C\u1015\u103C\u100A\u103A","\u1019\u103C\u1014\u103A\u1019\u102C","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036","\u1019\u103C\u1014\u103A\u1019\u102C\u1014\u102D\u102F\u1004\u103A\u1004\u1036\u1010\u1031\u102C\u103A","\u1019\u103C\u1014\u103A\u1019\u102C\u1015\u103C\u100A\u103A"]},{iso3:"MNE",iso2:"ME",m49:"499",name:"Montenegro",aliases:["\u{1F1F2}\u{1F1EA}","crna cora","\u0446\u0440\u043D\u0430 \u0433\u043E\u0440\u0430"]},{iso3:"MNG",iso2:"MN",m49:"496",name:"Mongolia",aliases:["\u{1F1F2}\u{1F1F3}","bugd nayramdah mongol ard uls","mongol uls","state of mongolia","\u043C\u043E\u043D\u0433\u043E\u043B","\u043C\u043E\u043D\u0433\u043E\u043B \u0443\u043B\u0441","\u182E\u1824\u1829\u182D\u1824\u182F \u1824\u182F\u1824\u1830"]},{iso3:"MNP",iso2:"MP",m49:"580",name:"Northern Mariana Islands",aliases:["\u{1F1F2}\u{1F1F5}","cnmi","commonwealth of the northern maria islands","commonwealth of the northern mariana islands","northern marianas","notte marianas","sankattan siha na islas marianas"]},{iso3:"MOZ",iso2:"MZ",m49:"508",name:"Mozambique",aliases:["\u{1F1F2}\u{1F1FF}","mocambique","republic of mozambique","republica de mocambique"]},{iso3:"MRT",iso2:"MR",m49:"478",name:"Mauritania",aliases:["\u{1F1F2}\u{1F1F7}","islamic republic of mauritania","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0625\u0633\u0644\u0627\u0645\u064A\u0629 \u0627\u0644\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0629","\u0645\u0648\u0631\u064A\u062A\u0627\u0646\u064A\u0627"]},{iso3:"MSR",iso2:"MS",m49:"500",name:"Montserrat",aliases:["\u{1F1F2}\u{1F1F8}","island of montserrat"]},{iso3:"MTQ",iso2:"MQ",m49:"474",name:"Martinique",aliases:["\u{1F1F2}\u{1F1F6}","territorial collectivity of martinique"]},{iso3:"MUS",iso2:"MU",m49:"480",name:"Mauritius",aliases:["\u{1F1F2}\u{1F1FA}","ile maurice","la republique de maurice","maurice","moris","republic of mauritius","republique de maurice"]},{iso3:"MWI",iso2:"MW",m49:"454",name:"Malawi",aliases:["\u{1F1F2}\u{1F1FC}","republic of malawi"]},{iso3:"MYS",iso2:"MY",m49:"458",name:"Malaysia",aliases:["\u{1F1F2}\u{1F1FE}","federation of malaysia","malaysia federation","negara seberang tambak","persekutuan malaysia"]},{iso3:"MYT",iso2:"YT",m49:"175",name:"Mayotte",aliases:["\u{1F1FE}\u{1F1F9}","departement de mayotte","departement region de mayotte","department of mayotte"]},{iso3:"NAM",iso2:"NA",m49:"516",name:"Namibia",aliases:["\u{1F1F3}\u{1F1E6}","republic of namibia"]},{iso3:"NCL",iso2:"NC",m49:"540",name:"New Caledonia",aliases:["\u{1F1F3}\u{1F1E8}","caledonie","kanaky","kanaky nouvelle caledonie","nouvelle caledonie","territoire de la nouvelle caledonie et dependances","territoire des nouvelle caledonie et dependances","territory of new caledonia and dependencies"]},{iso3:"NER",iso2:"NE",m49:"562",name:"Niger",aliases:["\u{1F1F3}\u{1F1EA}","jamhuriyar nijar","nijar","republic niger","republic of niger","republic of the niger"]},{iso3:"NFK",iso2:"NF",m49:"574",name:"Norfolk Island",aliases:["\u{1F1F3}\u{1F1EB}","norfolk island australia","norfolk island other territories","norfolk island other territories australia","territory of norfolk island"]},{iso3:"NGA",iso2:"NG",m49:"566",name:"Nigeria",aliases:["\u{1F1F3}\u{1F1EC}","federal republic of nigeria","naija"]},{iso3:"NIC",iso2:"NI",m49:"558",name:"Nicaragua",aliases:["\u{1F1F3}\u{1F1EE}","republic of nicaragua","republica de nicaragua"]},{iso3:"NIU",iso2:"NU",m49:"570",name:"Niue",aliases:["\u{1F1F3}\u{1F1FA}"]},{iso3:"NLD",iso2:"NL",m49:"528",name:"Kingdom of the Netherlands",aliases:["\u{1F1F3}\u{1F1F1}","hollandt","kingdom of netherlands","koninkrijk der nederlanden","nederland","nederlanden","nederlandt","netherlands","netherlands kingdom of the"]},{iso3:"NOR",iso2:"NO",m49:"578",name:"Norway",aliases:["\u{1F1F3}\u{1F1F4}","kingdom of norway","kongeriket noreg","kongeriket norge","noreg","norge"]},{iso3:"NPL",iso2:"NP",m49:"524",name:"Nepal",aliases:["\u{1F1F3}\u{1F1F5}","bal bo","bal poi yul","bal yul","balbo","balpo","balpo yul","nipal","sanghiya loktantrik ganatantra nepal","\u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u093F\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930\u093E\u0924\u094D\u092E\u0915 \u0928\u0947\u092A\u093E\u0932","\u0938\u0902\u0918\u0940\u092F \u0932\u094B\u0915\u0924\u093E\u0928\u094D\u0924\u094D\u0930\u093F\u0915 \u0917\u0923\u0924\u0928\u094D\u0924\u094D\u0930 \u0928\u0947\u092A\u093E\u0932"]},{iso3:"NRU",iso2:"NR",m49:"520",name:"Nauru",aliases:["\u{1F1F3}\u{1F1F7}","naoero","pleasant island","republic of nauru"]},{iso3:"NZL",iso2:"NZ",m49:"554",name:"New Zealand",aliases:["\u{1F1F3}\u{1F1FF}","aotearoa","aotearoa new zealand","dominion of new zealand"]},{iso3:"OMN",iso2:"OM",m49:"512",name:"Oman",aliases:["\u{1F1F4}\u{1F1F2}","sultanate of oman","uman","\u0633\u0644\u0637\u0646\u0629 \u0639\u0645\u0627\u0646","\u0639\u0645\u0627\u0646"]},{iso3:"PAK",iso2:"PK",m49:"586",name:"Pakistan",aliases:["\u{1F1F5}\u{1F1F0}","hoi quoc","islamic republic of pakistan","republic of pakistan","tay hoi","\u0627\u0633\u0644\u0627\u0645\u06CC \u062C\u0645\u06C1\u0648\u0631\u06CC\u06C1 \u067E\u0627\u06A9\u0633\u062A\u0627\u0646","\u0628\u0627\u06A9\u0633\u062A\u0627\u0646","\u067E\u0627\u06A9\u0633\u062A\u0627\u0646"]},{iso3:"PAN",iso2:"PA",m49:"591",name:"Panama",aliases:["\u{1F1F5}\u{1F1E6}","republic of panama","republica de panama"]},{iso3:"PCN",iso2:"PN",m49:"612",name:"Pitcairn",aliases:["\u{1F1F5}\u{1F1F3}","occas island","pisskern ali\u0435n","pitcairn henderson ducie and oeno islands","pitcairn island","pitcairn islands","pitkern ailen"]},{iso3:"PER",iso2:"PE",m49:"604",name:"Peru",aliases:["\u{1F1F5}\u{1F1EA}","piruw","piruw ripuwlika","republic of peru","republica del peru"]},{iso3:"PHL",iso2:"PH",m49:"608",name:"Philippines",aliases:["\u{1F1F5}\u{1F1ED}","philippine islands","republic of the philippines"]},{iso3:"PLW",iso2:"PW",m49:"585",name:"Palau",aliases:["\u{1F1F5}\u{1F1FC}","belau","peeloo","pelew","pelew islands","pellew","republic of belau","republic of palau","\u30D1\u30E9\u30AA","\u30D1\u30E9\u30AA\u5171\u548C\u56FD"]},{iso3:"PNG",iso2:"PG",m49:"598",name:"Papua New Guinea",aliases:["\u{1F1F5}\u{1F1EC}","independent state of papua new guinea","papua niugini"]},{iso3:"POL",iso2:"PL",m49:"616",name:"Poland",aliases:["\u{1F1F5}\u{1F1F1}","polska","republic of poland","rzeczpospolita polska"]},{iso3:"PRI",iso2:"PR",m49:"630",name:"Puerto Rico",aliases:["\u{1F1F5}\u{1F1F7}","boriken","borinquen","boriquen","commonwealth of puerto rico","estado libre asociado de puerto rico","free associated state of puerto rico","isla del encanto","island of enchantment","isle of enchantment","mancomunidad de puerto rico","porto rico","territorio de puerto rico","territorio estadounidense de puerto rico","territory of porto rico","territory of puerto rico"]},{iso3:"PRK",iso2:"KP",m49:"408",name:"Democratic People's Republic of Korea",aliases:["\u{1F1F0}\u{1F1F5}","choson minjujuui inmin konghwaguk","dpr korea","dprk","korea democratic peoples republic of","n korea","north korea","\uACF5\uD654\uAD6D","\uBD81\uC870\uC120","\uBD81\uD55C","\uC870\uC120","\uC870\uC120\uBBFC\uC8FC\uC8FC\uC758\uC778\uBBFC\uACF5\uD654\uAD6D"]},{iso3:"PRT",iso2:"PT",m49:"620",name:"Portugal",aliases:["\u{1F1F5}\u{1F1F9}","republica portuguesa"]},{iso3:"PRY",iso2:"PY",m49:"600",name:"Paraguay",aliases:["\u{1F1F5}\u{1F1FE}","paraguai","republic of paraguay","republica del paraguay","teta paraguai"]},{iso3:"PSE",iso2:"PS",m49:"275",name:"State of Palestine",aliases:["\u{1F1F5}\u{1F1F8}","palestine","palestine state of","palestinian authority","palestinian national authority","palestinian territory","west bank and gaza","\u0623\u0631\u0627\u0636\u064A \u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0623\u0631\u0627\u0636\u064A \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0633\u0644\u0637\u0629 \u0627\u0644\u0648\u0637\u0646\u064A\u0629 \u0627\u0644\u0641\u0644\u0633\u0637\u064A\u0646\u064A\u0629","\u0627\u0644\u0636\u0641\u0629 \u0627\u0644\u063A\u0631\u0628\u064A\u0629 \u0648\u0642\u0637\u0627\u0639 \u063A\u0632\u0629","\u062F\u0648\u0644\u0629 \u0641\u0644\u0633\u0637\u064A\u0646","\u0641\u0644\u0633\u0637\u064A\u0646"]},{iso3:"PYF",iso2:"PF",m49:"258",name:"French Polynesia",aliases:["\u{1F1F5}\u{1F1EB}","f oh","french establishments in oceania","french oceania","french settlements in oceania","polynesie francaise","territoire de la polynesie francaise","territory of french polynesia"]},{iso3:"QAT",iso2:"QA",m49:"634",name:"Qatar",aliases:["\u{1F1F6}\u{1F1E6}","state of qatar","\u0625\u0645\u0627\u0631\u0629 \u0642\u0637\u0631","\u062F\u0648\u0644\u0629 \u0642\u0637\u0631","\u0642\u0637\u0631"]},{iso3:"REU",iso2:"RE",m49:"638",name:"R\xE9union",aliases:["\u{1F1F7}\u{1F1EA}","ile bourbon","ile de la reunion","la reunion","re","region reunion","reunion island"]},{iso3:"ROU",iso2:"RO",m49:"642",name:"Romania",aliases:["\u{1F1F7}\u{1F1F4}"]},{iso3:"RUS",iso2:"RU",m49:"643",name:"Russian Federation",aliases:["\u{1F1F7}\u{1F1FA}","federation of russia","russia","\u0440\u043E\u0441\u0441\u0438\u0438\u0441\u043A\u0430\u044F \u0444\u0435\u0434\u0435\u0440\u0430\u0446\u0438\u044F","\u0440\u043E\u0441\u0441\u0438\u044F","\u0440\u0444"]},{iso3:"RWA",iso2:"RW",m49:"646",name:"Rwanda",aliases:["\u{1F1F7}\u{1F1FC}","igihugu cyimisozi igihumbi","jamhuri ya rwanda","la republique du rwanda","land of a thousand hills","republic of rwanda","republika yu rwanda","republique du rwanda","republique rwandaise","repubulika yu rwanda","u rwanda"]},{iso3:"SAU",iso2:"SA",m49:"682",name:"Saudi Arabia",aliases:["\u{1F1F8}\u{1F1E6}","kingdom of saudi arabia","\u0627\u0644\u062F\u0648\u0644\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u062F\u0648\u0644\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0629","\u0627\u0644\u0645\u0645\u0644\u0643\u0647","\u0627\u0644\u0645\u0645\u0644\u0643\u0647 \u0627\u0644\u0639\u0631\u0628\u064A\u0647 \u0627\u0644\u0633\u0639\u0648\u062F\u064A\u0647","\u0628\u0644\u0627\u062F \u0627\u0644\u062D\u0631\u0645\u064A\u0646 \u0627\u0644\u0634\u0631\u064A\u0641\u064A\u0646","\u062F\u0648\u0644\u0629 \u0622\u0644 \u0633\u0639\u0648\u062F","\u0633\u0639\u0648\u062F\u064A\u0629","\u0633\u0639\u0648\u062F\u064A\u0647","\u0645\u0646\u0628\u0639 \u0627\u0644\u0631\u0633\u0627\u0644\u0629","\u0645\u0647\u0628\u0637 \u0627\u0644\u0648\u062D\u064A"]},{iso3:"SDN",iso2:"SD",m49:"729",name:"Sudan",aliases:["\u{1F1F8}\u{1F1E9}","al sudan","as sudan","north sudan","republic of sudan","republic of the sudan","soudan","\u0627\u0644\u0633\u0648\u062F\u0627\u0646","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0633\u0648\u062F\u0627\u0646"]},{iso3:"SEN",iso2:"SN",m49:"686",name:"Senegal",aliases:["\u{1F1F8}\u{1F1F3}","la republique du senegal","republic of senegal","republique du senegal","sen","senegaal"]},{iso3:"SGP",iso2:"SG",m49:"702",name:"Singapore",aliases:["\u{1F1F8}\u{1F1EC}","garden city","lion city","republic of singapore","republik singapura","singapore city","singapura","spore","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BCD\u0BAA\u0BC2\u0BB0\u0BCD \u0B95\u0BC1\u0B9F\u0BBF\u0BAF\u0BB0\u0B9A\u0BC1","\u0B9A\u0BBF\u0B99\u0BCD\u0B95\u0BC8","\u0BB8\u0BBF\u0B99\u0BCD\u0B95\u0BAA\u0BC2\u0BB0\u0BCD"]},{iso3:"SGS",iso2:"GS",m49:"239",name:"South Georgia and the South Sandwich Islands",aliases:["\u{1F1EC}\u{1F1F8}","falkland islands dependencies","sgssi","south georgia","south georgia & south sandwich islands","south sandwich islands"]},{iso3:"SHN",iso2:"SH",m49:"654",name:"Saint Helena",aliases:["\u{1F1F8}\u{1F1ED}","ascension","saint helena and dependencies","saint helena ascension and tristan da cunha","tristan da cunha"]},{iso3:"SJM",iso2:"SJ",m49:"744",name:"Svalbard and Jan Mayen Islands",aliases:["\u{1F1F8}\u{1F1EF}","jan mayen","svalbard","svalbard and jan mayen","svalbard og jan mayen"]},{iso3:"SLB",iso2:"SB",m49:"090",name:"Solomon Islands",aliases:["\u{1F1F8}\u{1F1E7}"]},{iso3:"SLE",iso2:"SL",m49:"694",name:"Sierra Leone",aliases:["\u{1F1F8}\u{1F1F1}","republic of sierra leone"]},{iso3:"SLV",iso2:"SV",m49:"222",name:"El Salvador",aliases:["\u{1F1F8}\u{1F1FB}","republic of el salvador","republica de el salvador","salvador"]},{iso3:"SMR",iso2:"SM",m49:"674",name:"San Marino",aliases:["\u{1F1F8}\u{1F1F2}","most serene republic of san marino","repubblica di san marino","serenissima repubblica di san marino"]},{iso3:"SOM",iso2:"SO",m49:"706",name:"Somalia",aliases:["\u{1F1F8}\u{1F1F4}","as sumal","federal republic of somalia","jamhuuriyadda federaalka soomaaliya","jamhuuriyadda soomaaliyeed","soomaaliya","soomaaliyeey toosoo","\u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u062F\u064A\u0645\u0648\u0642\u0631\u0627\u0637\u064A\u0629","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0635\u0648\u0645\u0627\u0644 \u0627\u0644\u0641\u064A\u062F\u0631\u0627\u0644\u064A\u0629","\u0635\u0648\u0645\u0627\u0644"]},{iso3:"SPM",iso2:"PM",m49:"666",name:"Saint Pierre and Miquelon",aliases:["\u{1F1F5}\u{1F1F2}","collectivite territoriale de saint pierre et miquelon","miquelon","saint pierre","saint pierre et miquelon","territorial collectivity of saint pierre and miquelon"]},{iso3:"SRB",iso2:"RS",m49:"688",name:"Serbia",aliases:["\u{1F1F7}\u{1F1F8}","republic of serbia","republika srbija","\u0440\u0435\u043F\u0443\u0431\u043B\u0438\u043A\u0430 \u0441\u0440\u0431\u0438\u0458\u0430","\u0441\u0440\u0431\u0438\u0458\u0430"]},{iso3:"SSD",iso2:"SS",m49:"728",name:"South Sudan",aliases:["\u{1F1F8}\u{1F1F8}","republic of south sudan","southern sudan"]},{iso3:"STP",iso2:"ST",m49:"678",name:"Sao Tome and Principe",aliases:["\u{1F1F8}\u{1F1F9}","democratic republic of sao tome and principe","principe","republica democratica de sao tome e principe","sao tome","sao tome e principe","sao tome og principe"]},{iso3:"SUR",iso2:"SR",m49:"740",name:"Suriname",aliases:["\u{1F1F8}\u{1F1F7}","dutch guiana","republic of surinam","republic of suriname","republiek suriname","surinam","surrinam"]},{iso3:"SVK",iso2:"SK",m49:"703",name:"Slovakia",aliases:["\u{1F1F8}\u{1F1F0}","slovak republic","slovenska republika","slovensko"]},{iso3:"SVN",iso2:"SI",m49:"705",name:"Slovenia",aliases:["\u{1F1F8}\u{1F1EE}","republic of slovenia","republika slovenija","slovenija"]},{iso3:"SWE",iso2:"SE",m49:"752",name:"Sweden",aliases:["\u{1F1F8}\u{1F1EA}","kingdom of sweden","konungadomet sverige","konungariket sverige","kungadomet sverige","kungariket sverige","sverige","swedish kingdom"]},{iso3:"SWZ",iso2:"SZ",m49:"748",name:"Eswatini",aliases:["\u{1F1F8}\u{1F1FF}","kingdom of eswatini","kingdom of swaziland","swaziland","umbuso weswatini"]},{iso3:"SXM",iso2:"SX",m49:"534",name:"Sint Maarten (Dutch part)",aliases:["\u{1F1F8}\u{1F1FD}","country of sint maarten","eilandgebied sint maarten","land sint maarten","saint maarten","saint martin dutch part","sint maarten","sint martin"]},{iso3:"SYC",iso2:"SC",m49:"690",name:"Seychelles",aliases:["\u{1F1F8}\u{1F1E8}","la republique des seychelles","repiblik sesel","republic of seychelles","republique des seychelles"]},{iso3:"SYR",iso2:"SY",m49:"760",name:"Syrian Arab Republic",aliases:["\u{1F1F8}\u{1F1FE}","surya","syria","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u0639\u0631\u0628\u064A\u0629 \u0627\u0644\u0633\u0648\u0631\u064A\u0629","\u0627\u0644\u0634\u0627\u0645","\u0633\u0648\u0631\u064A\u0627","\u0633\u0648\u0631\u064A\u0629"]},{iso3:"TCA",iso2:"TC",m49:"796",name:"Turks and Caicos Islands",aliases:["\u{1F1F9}\u{1F1E8}","caicos","caicos islands","turks","turks & caicos","turks islands"]},{iso3:"TCD",iso2:"TD",m49:"148",name:"Chad",aliases:["\u{1F1F9}\u{1F1E9}","la republique du tchad","republic of chad","republique du tchad","tchad","\u062A\u0634\u0627\u062F","\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u062A\u0634\u0627\u062F"]},{iso3:"TGO",iso2:"TG",m49:"768",name:"Togo",aliases:["\u{1F1F9}\u{1F1EC}","la republique togolaise","republique togolaise","togolese republic"]},{iso3:"THA",iso2:"TH",m49:"764",name:"Thailand",aliases:["\u{1F1F9}\u{1F1ED}","kingdom of siam","kingdom of thailand","siam","thai","\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E44\u0E17\u0E22","\u0E1B\u0E23\u0E30\u0E40\u0E17\u0E28\u0E2A\u0E22\u0E32\u0E21","\u0E40\u0E21\u0E37\u0E2D\u0E07\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E44\u0E17\u0E22","\u0E23\u0E32\u0E0A\u0E2D\u0E32\u0E13\u0E32\u0E08\u0E31\u0E01\u0E23\u0E2A\u0E22\u0E32\u0E21","\u0E2A\u0E22\u0E32\u0E21"]},{iso3:"TJK",iso2:"TJ",m49:"762",name:"Tajikistan",aliases:["\u{1F1F9}\u{1F1EF}","jumhurii tojikiston","republic of tajikistan","\u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D","\u0442\u04B7","\u0442\u04B7\u043A","\u04B7\u0442","\u04B7\u0443\u043C\u04B3\u0443\u0440\u0438\u0438 \u0442\u043E\u04B7\u0438\u043A\u0438\u0441\u0442\u043E\u043D"]},{iso3:"TKL",iso2:"TK",m49:"772",name:"Tokelau",aliases:["\u{1F1F9}\u{1F1F0}","tokelau islands","union islands"]},{iso3:"TKM",iso2:"TM",m49:"795",name:"Turkmenistan",aliases:["\u{1F1F9}\u{1F1F2}"]},{iso3:"TLS",iso2:"TL",m49:"626",name:"Timor-Leste",aliases:["\u{1F1F9}\u{1F1F1}","democratic republic of timor leste","east timor","republica democratica de timor leste","republika demokratika timor lorosae","timor loro sae","timor lorosae"]},{iso3:"TON",iso2:"TO",m49:"776",name:"Tonga",aliases:["\u{1F1F9}\u{1F1F4}","friendly islands","kingdom of tonga","puleanga fakatui o tonga","tonga islands"]},{iso3:"TTO",iso2:"TT",m49:"780",name:"Trinidad and Tobago",aliases:["\u{1F1F9}\u{1F1F9}","republic of trinidad and tobago","tobago","trinidad"]},{iso3:"TUN",iso2:"TN",m49:"788",name:"Tunisia",aliases:["\u{1F1F9}\u{1F1F3}","republic of tunisia","tunisian republic","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u062A\u0648\u0646\u0633\u064A\u0629","\u062A\u0648\u0646\u0633","\u062A\u0648\u0646\u0633 \u0627\u0644\u062E\u0636\u0631\u0627\u0621"]},{iso3:"TUR",iso2:"TR",m49:"792",name:"T\xFCrkiye",aliases:["\u{1F1F9}\u{1F1F7}","republic of turkey","republic of turkiye","turkey","turkiye cumhuriyeti"]},{iso3:"TUV",iso2:"TV",m49:"798",name:"Tuvalu",aliases:["\u{1F1F9}\u{1F1FB}","ellice islands"]},{iso3:"TWN",iso2:"TW",m49:"158",name:"Taiwan",aliases:["\u{1F1F9}\u{1F1FC}","chinese republic","chinese taipei","chunghwa minkuo","chunghwa minkwo","conghwaminku","cunghwa minkwo","cyukamingkok","formosa","nanasian","nationalist china","republic of china","republic of china taiwan","roc","taivang","taiwan province of china","taiwan roc","taywan","taywang","teywan","\u4E2D\u83EF\u6C11\u570B","\u4E2D\u83EF\u6C11\u570B\uFF08\u81FA\u7063\uFF09","\u4E2D\u83EF\u81FA\u5317","\u53F0\u7063","\u81FA\u6F8E\u91D1\u99AC","\u81FA\u7063"]},{iso3:"TZA",iso2:"TZ",m49:"834",name:"United Republic of Tanzania",aliases:["\u{1F1F9}\u{1F1FF}","jamhuri ya muungano wa tanganyika na zanzibar","jamhuri ya muungano wa tanzania","tanzania","tanzania jamhuri ya muungano wa","tanzania united republic of","united republic of tanganyika and zanzibar"]},{iso3:"UGA",iso2:"UG",m49:"800",name:"Uganda",aliases:["\u{1F1FA}\u{1F1EC}","jamhuri ya uganda","lulu ya afrika","ouganda","pearl of africa","republic of uganda","ugandah"]},{iso3:"UKR",iso2:"UA",m49:"804",name:"Ukraine",aliases:["\u{1F1FA}\u{1F1E6}","ukr","ukraina","ukrainia","ukrayina","\u0432\u043A\u0440\u0430\u0456\u043D\u0430","\u0443\u043A\u0440\u0430\u0456\u043D\u0430"]},{iso3:"UMI",iso2:"UM",m49:"581",name:"United States Minor Outlying Islands",aliases:["\u{1F1FA}\u{1F1F2}","us minor outlying islands","us outlying islands","usmoi"]},{iso3:"URY",iso2:"UY",m49:"858",name:"Uruguay",aliases:["\u{1F1FA}\u{1F1FE}","eastern republic of uruguay","oriental republic of uruguay"]},{iso3:"USA",iso2:"US",m49:"840",name:"United States of America",aliases:["\u{1F1FA}\u{1F1F8}","amelika","amelika hui pu ia","amelika huipuia","amelika mokuaina hui pu ia","america","eeuu","eeuu de america","estados unidos","estados unidos de america","los estados","los estados unidos","los estados unidos de america","mokuaina hui pu ia","union americana","united states","us","us of a","us of america","usa"]},{iso3:"UZB",iso2:"UZ",m49:"860",name:"Uzbekistan",aliases:["\u{1F1FA}\u{1F1FF}","ozbek","ozbekiston","ozbekiston respublikasi","republic of uzbekistan","uzbekiston respublikasi"]},{iso3:"VAT",iso2:"VA",m49:"336",name:"Holy See",aliases:["\u{1F1FB}\u{1F1E6}","citta del vaticano","civitas vaticana","colle vaticano","papal state","santa sede citta del vaticano","state of vatican city","stato della citta del vaticano","status civitatis vaticanae","status civitatis vatican\xE6","vatican","vatican city","vatican city state","vaticano"]},{iso3:"VCT",iso2:"VC",m49:"670",name:"Saint Vincent and the Grenadines",aliases:["\u{1F1FB}\u{1F1E8}","grenadines","saint vincent","saint vincent and grenadines"]},{iso3:"VEN",iso2:"VE",m49:"862",name:"Venezuela (Bolivarian Republic of)",aliases:["\u{1F1FB}\u{1F1EA}","bolivarian republic of venezuela","br venezuela","estados unidos de venezuela","rb venezuela","republic of venezuela","republica bolivariana de venezuela","republica de venezuela","venezuela"]},{iso3:"VGB",iso2:"VG",m49:"092",name:"British Virgin Islands",aliases:["\u{1F1FB}\u{1F1EC}","bvi","virgin islands british","virgin islands of the united kingdom","virgin islands united kingdom"]},{iso3:"VIR",iso2:"VI",m49:"850",name:"United States Virgin Islands",aliases:["\u{1F1FB}\u{1F1EE}","american virgin islands","us virgin islands","virgin islands of the united states","virgin islands us"]},{iso3:"VNM",iso2:"VN",m49:"704",name:"Viet Nam",aliases:["\u{1F1FB}\u{1F1F3}","chxhcn viet nam","chxhcnvn","cong hoa xa hoi chu nghia viet nam","socialist republic of viet nam","socialist republic of vietnam","vietnam"]},{iso3:"VUT",iso2:"VU",m49:"548",name:"Vanuatu",aliases:["\u{1F1FB}\u{1F1FA}","la republique du vanuatu","republic of vanuatu","republique de vanuatu","ripablik blong vanuatu"]},{iso3:"WLF",iso2:"WF",m49:"876",name:"Wallis and Futuna Islands",aliases:["\u{1F1FC}\u{1F1EB}","collectivite des iles wallis et futuna","emeni simete","futuna","iles wallis et futuna","makape papilio","territoire de wallis et futuna","territoire des iles wallis et futuna","wallis","wallis & futuna","wallis et futuna"]},{iso3:"WSM",iso2:"WS",m49:"882",name:"Samoa",aliases:["\u{1F1FC}\u{1F1F8}","independent state of samoa","malo saoloto tutoatasi o samoa","samoa i sisifo","western samoa"]},{iso3:"YEM",iso2:"YE",m49:"887",name:"Yemen",aliases:["\u{1F1FE}\u{1F1EA}","rep yemen","republic of yemen","\u0627\u0644\u062C\u0645\u0647\u0648\u0631\u064A\u0629 \u0627\u0644\u064A\u0645\u0646\u064A\u0629","\u0627\u0644\u064A\u0645\u0646","\u062F\u0648\u0644\u0629 \u0627\u0644\u064A\u0645\u0646"]},{iso3:"ZAF",iso2:"ZA",m49:"710",name:"South Africa",aliases:["\u{1F1FF}\u{1F1E6}","aferika borwa","aforika borwa","afrika boroa","afrika borwa","afrika dzonga","afurika tshipembe","emzantsi afrika","iningizimu afrika","iriphabhulikhi ye ningizimu afrika","iriphabhulikhi yeningizimu afrika","iriphabhuliki yase ningizimu afrika","iriphabliki yasemzantsi afrika","iriphabliki yaseningizimu afrika","iriphabliki yom zantsi afrika","isewula afrika","repabliki ya afrika borwa","rephaboliki ya aforika borwa","rephaboliki ya afrika borwa","republic of south africa","republiek van suid afrika","riphabliki ra afrika dzonga","rsa","suid afrika","umzansi","umzantsi afrika","unie van suid afrika","union of south africa"]},{iso3:"ZMB",iso2:"ZM",m49:"894",name:"Zambia",aliases:["\u{1F1FF}\u{1F1F2}","northern rhodesia","republic of zambia"]},{iso3:"ZWE",iso2:"ZW",m49:"716",name:"Zimbabwe",aliases:["\u{1F1FF}\u{1F1FC}","ezimbabwe","izimbabwe","republic of zimbabwe","rhodesia","southern rhodesia","zimbabwe rhodesia","zimbagwe"]}];function _X(e){return e.normalize("NFD").replace(/[̀-ͯ]/g,"").normalize("NFC").toLowerCase().replace(/[ً-ٟ]/g,"").replace(/['‘’ʻʼʽˈ′`]/g,"").replace(/&/g," and ").replace(/([,(])\s*the\b/g,"$1").replace(/[.(),[\]]/g,"").replace(/[-–—]/g," ").replace(/\bst\b/g,"saint").trim().replace(/\s+/g," ").replace(/^the\s+/,"")}function vIe(e){let t=new Map,r=new Map,n=new Map;for(let s of e)t.set(s.iso3,s),s.iso2&&r.set(s.iso2,s),s.m49&&n.set(s.m49,s);let a=new Map;for(let s of e)for(let l of[s.name,...s.aliases]){let u=_X(l),c=a.get(u);if(c!==void 0&&c!==s.iso3)throw new Error(`Duplicate name/alias "${u}": ${c} vs ${s.iso3}`);a.set(u,s.iso3)}function i(s){if(s==null)return;let l=String(s).trim();if(!l)return;if(/^\d+$/.test(l)){let c=n.get(String(parseInt(l,10)).padStart(3,"0"));if(c)return c}if(/^[A-Za-z]{2}$/.test(l)){let c=r.get(l.toUpperCase());if(c)return c}if(/^[A-Za-z]{3}$/.test(l)){let c=t.get(l.toUpperCase());if(c)return c}let u=a.get(_X(l));return u===void 0?void 0:t.get(u)}function o(s){var l;return(l=i(s))==null?void 0:l.iso3}return{lookup:i,lookupAlpha3:o,byAlpha3:t,byAlpha2:r,byM49:n}}var fM=vIe(dIe),rGt=fM.lookup,nGt=fM.lookupAlpha3,iGt=fM.byAlpha3,aGt=fM.byAlpha2,oGt=fM.byM49});var LP=fe(Cs=>{"use strict";Object.defineProperty(Cs,"__esModule",{value:!0});var f0=63710088e-1,TX={centimeters:f0*100,centimetres:f0*100,degrees:360/(2*Math.PI),feet:f0*3.28084,inches:f0*39.37,kilometers:f0/1e3,kilometres:f0/1e3,meters:f0,metres:f0,miles:f0/1609.344,millimeters:f0*1e3,millimetres:f0*1e3,nauticalmiles:f0/1852,radians:1,yards:f0*1.0936},wX={acres:247105e-9,centimeters:1e4,centimetres:1e4,feet:10.763910417,hectares:1e-4,inches:1550.003100006,kilometers:1e-6,kilometres:1e-6,meters:1,metres:1,miles:386e-9,nauticalmiles:29155334959812285e-23,millimeters:1e6,millimetres:1e6,yards:1.195990046};function xy(e,t,r={}){let n={type:"Feature"};return(r.id===0||r.id)&&(n.id=r.id),r.bbox&&(n.bbox=r.bbox),n.properties=t||{},n.geometry=e,n}function sGt(e,t,r={}){switch(e){case"Point":return AX(t).geometry;case"LineString":return SX(t).geometry;case"Polygon":return MX(t).geometry;case"MultiPoint":return yIe(t).geometry;case"MultiLineString":return mIe(t).geometry;case"MultiPolygon":return xIe(t).geometry;default:throw new Error(e+" is invalid")}}function AX(e,t,r={}){if(!e)throw new Error("coordinates is required");if(!Array.isArray(e))throw new Error("coordinates must be an Array");if(e.length<2)throw new Error("coordinates must be at least 2 numbers long");if(!kP(e[0])||!kP(e[1]))throw new Error("coordinates must contain numbers");return xy({type:"Point",coordinates:e},t,r)}function lGt(e,t,r={}){return CP(e.map(n=>AX(n,t)),r)}function MX(e,t,r={}){for(let a of e){if(a.length<4)throw new Error("Each LinearRing of a Polygon must have 4 or more Positions.");if(a[a.length-1].length!==a[0].length)throw new Error("First and last Position are not equivalent.");for(let i=0;iMX(n,t)),r)}function SX(e,t,r={}){if(e.length<2)throw new Error("coordinates must be an array of two or more positions");return xy({type:"LineString",coordinates:e},t,r)}function cGt(e,t,r={}){return CP(e.map(n=>SX(n,t)),r)}function CP(e,t={}){let r={type:"FeatureCollection"};return t.id&&(r.id=t.id),t.bbox&&(r.bbox=t.bbox),r.features=e,r}function mIe(e,t,r={}){return xy({type:"MultiLineString",coordinates:e},t,r)}function yIe(e,t,r={}){return xy({type:"MultiPoint",coordinates:e},t,r)}function xIe(e,t,r={}){return xy({type:"MultiPolygon",coordinates:e},t,r)}function fGt(e,t,r={}){return xy({type:"GeometryCollection",geometries:e},t,r)}function hGt(e,t=0){if(t&&!(t>=0))throw new Error("precision must be a positive number");let r=Math.pow(10,t||0);return Math.round(e*r)/r}function _Ie(e,t="kilometers"){let r=TX[t];if(!r)throw new Error(t+" units is invalid");return e*r}function EX(e,t="kilometers"){let r=TX[t];if(!r)throw new Error(t+" units is invalid");return e/r}function dGt(e,t){return bIe(EX(e,t))}function vGt(e){let t=e%360;return t<0&&(t+=360),t}function pGt(e){return e=e%360,e>180?e-360:e<-180?e+360:e}function bIe(e){return e%(2*Math.PI)*180/Math.PI}function gGt(e){return e%360*Math.PI/180}function mGt(e,t="kilometers",r="kilometers"){if(!(e>=0))throw new Error("length must be a positive number");return _Ie(EX(e,t),r)}function yGt(e,t="meters",r="kilometers"){if(!(e>=0))throw new Error("area must be a positive number");let n=wX[t];if(!n)throw new Error("invalid original units");let a=wX[r];if(!a)throw new Error("invalid final units");return e/n*a}function kP(e){return!isNaN(e)&&e!==null&&!Array.isArray(e)}function xGt(e){return e!==null&&typeof e=="object"&&!Array.isArray(e)}function _Gt(e){if(!e)throw new Error("bbox is required");if(!Array.isArray(e))throw new Error("bbox must be an Array");if(e.length!==4&&e.length!==6)throw new Error("bbox must be an Array of 4 or 6 numbers");e.forEach(t=>{if(!kP(t))throw new Error("bbox must only contain numbers")})}function bGt(e){if(!e)throw new Error("id is required");if(["string","number"].indexOf(typeof e)===-1)throw new Error("id must be a number or a string")}Cs.areaFactors=wX;Cs.azimuthToBearing=pGt;Cs.bearingToAzimuth=vGt;Cs.convertArea=yGt;Cs.convertLength=mGt;Cs.degreesToRadians=gGt;Cs.earthRadius=f0;Cs.factors=TX;Cs.feature=xy;Cs.featureCollection=CP;Cs.geometry=sGt;Cs.geometryCollection=fGt;Cs.isNumber=kP;Cs.isObject=xGt;Cs.lengthToDegrees=dGt;Cs.lengthToRadians=EX;Cs.lineString=SX;Cs.lineStrings=cGt;Cs.multiLineString=mIe;Cs.multiPoint=yIe;Cs.multiPolygon=xIe;Cs.point=AX;Cs.points=lGt;Cs.polygon=MX;Cs.polygons=uGt;Cs.radiansToDegrees=bIe;Cs.radiansToLength=_Ie;Cs.round=hGt;Cs.validateBBox=_Gt;Cs.validateId=bGt});var FP=fe(_f=>{"use strict";Object.defineProperty(_f,"__esModule",{value:!0});var ud=LP();function hM(e,t,r){if(e!==null)for(var n,a,i,o,s,l,u,c=0,f=0,v,g=e.type,p=g==="FeatureCollection",x=g==="Feature",_=p?e.features.length:1,y=0;y<_;y++){u=p?e.features[y].geometry:x?e.geometry:e,v=u?u.type==="GeometryCollection":!1,s=v?u.geometries.length:1;for(var C=0;Cl||p>u||x>c){s=f,l=n,u=p,c=x,i=0;return}var _=ud.lineString.call(void 0,[s,f],r.properties);if(t(_,n,a,x,i)===!1)return!1;i++,s=f})===!1)return!1}}})}function kGt(e,t,r){var n=r,a=!1;return AIe(e,function(i,o,s,l,u){a===!1&&r===void 0?n=i:n=t(n,i,o,s,l,u),a=!0}),n}function MIe(e,t){if(!e)throw new Error("geojson is required");PP(e,function(r,n,a){if(r.geometry!==null){var i=r.geometry.type,o=r.geometry.coordinates;switch(i){case"LineString":if(t(r,n,a,0,0)===!1)return!1;break;case"Polygon":for(var s=0;s{"use strict";Object.defineProperty(DP,"__esModule",{value:!0});var SIe=LP(),FGt=FP();function CIe(e){return FGt.geomReduce.call(void 0,e,(t,r)=>t+DGt(r),0)}function DGt(e){let t=0,r;switch(e.type){case"Polygon":return EIe(e.coordinates);case"MultiPolygon":for(r=0;r0){t+=Math.abs(kIe(e[0]));for(let r=1;r=t?(n+2)%t:n+2],s=a[0]*CX,l=i[1]*CX,u=o[0]*CX;r+=(u-s)*Math.sin(l),n++}return r*RGt}var IGt=CIe;DP.area=CIe;DP.default=IGt});var FIe=fe(RP=>{"use strict";Object.defineProperty(RP,"__esModule",{value:!0});var zGt=LP(),qGt=FP();function PIe(e,t={}){let r=0,n=0,a=0;return qGt.coordEach.call(void 0,e,function(i){r+=i[0],n+=i[1],a++},!0),zGt.point.call(void 0,[r/a,n/a],t.properties)}var BGt=PIe;RP.centroid=PIe;RP.default=BGt});var RIe=fe((IP,DIe)=>{(function(e,t){t(typeof IP=="object"&&typeof DIe!="undefined"?IP:e.d3=e.d3||{})})(IP,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)<0?ie=me+1:le=me}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)>0?le=me:ie=me+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],me=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,me=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,me,be;if(ae==null){for(;++ie=le)for(me=be=le;++iele&&(me=le),be=le)for(me=be=le;++iele&&(me=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(me=Math.ceil(ae-ne+1));++le=0?(me>=L?10:me>=w?5:me>=A?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(me>=L?10:me>=w?5:me>=A?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),me=ie/le;return me>=L?le*=10:me>=w?le*=5:me>=A&&(le*=2),aeOe;)ze.pop(),--ct;var et=new Array(ct+1),qe;for(me=0;me<=ct;++me)qe=et[me]=[],qe.x0=me>0?ze[me-1]:it,qe.x1=me=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,me=Math.floor(le),be=+pe(ne[me],me,ne),De=+pe(ne[me+1],me+1,ne);return be+(De-be)*(le-me)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function V(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++ieme&&(me=le)}else for(;++ie=le)for(me=le;++ieme&&(me=le);return me}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,me,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)me[--le]=be[pe];return me}function J(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++iele&&(me=le)}else for(;++ie=le)for(me=le;++iele&&(me=le);return me}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,me,be=ne[le];for(ae==null&&(ae=t);++ie{(function(e,t){typeof zP=="object"&&typeof IIe!="undefined"?t(zP,RIe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(zP,(function(e,t){"use strict";function r(){return new n}function n(){this.reset()}n.prototype={constructor:n,reset:function(){this.s=this.t=0},add:function(Ze){i(a,Ze,this.t),i(this,a.s,this.s),this.s?this.t+=a.t:this.s=a.t},valueOf:function(){return this.s}};var a=new n;function i(Ze,yt,Wt){var zt=Ze.s=yt+Wt,hr=zt-yt,Ur=zt-hr;Ze.t=yt-Ur+(Wt-hr)}var o=1e-6,s=1e-12,l=Math.PI,u=l/2,c=l/4,f=l*2,v=180/l,g=l/180,p=Math.abs,x=Math.atan,_=Math.atan2,y=Math.cos,C=Math.ceil,k=Math.exp,S=Math.log,L=Math.pow,w=Math.sin,A=Math.sign||function(Ze){return Ze>0?1:Ze<0?-1:0},T=Math.sqrt,m=Math.tan;function F(Ze){return Ze>1?0:Ze<-1?l:Math.acos(Ze)}function E(Ze){return Ze>1?u:Ze<-1?-u:Math.asin(Ze)}function I(Ze){return(Ze=w(Ze/2))*Ze}function R(){}function B(Ze,yt){Ze&&V.hasOwnProperty(Ze.type)&&V[Ze.type](Ze,yt)}var O={Feature:function(Ze,yt){B(Ze.geometry,yt)},FeatureCollection:function(Ze,yt){for(var Wt=Ze.features,zt=-1,hr=Wt.length;++zt=0?1:-1,hr=zt*Wt,Ur=y(yt),Qr=w(yt),cn=K*Qr,yn=ue*Ur+cn*y(hr),Fn=cn*zt*w(hr);J.add(_(Fn,yn)),xe=Ze,ue=Ur,K=Qr}function le(Ze){return ee.reset(),U(Ze,_e),ee*2}function me(Ze){return[_(Ze[1],Ze[0]),E(Ze[2])]}function be(Ze){var yt=Ze[0],Wt=Ze[1],zt=y(Wt);return[zt*y(yt),zt*w(yt),w(Wt)]}function De(Ze,yt){return Ze[0]*yt[0]+Ze[1]*yt[1]+Ze[2]*yt[2]}function Ge(Ze,yt){return[Ze[1]*yt[2]-Ze[2]*yt[1],Ze[2]*yt[0]-Ze[0]*yt[2],Ze[0]*yt[1]-Ze[1]*yt[0]]}function ht(Ze,yt){Ze[0]+=yt[0],Ze[1]+=yt[1],Ze[2]+=yt[2]}function it(Ze,yt){return[Ze[0]*yt,Ze[1]*yt,Ze[2]*yt]}function Oe(Ze){var yt=T(Ze[0]*Ze[0]+Ze[1]*Ze[1]+Ze[2]*Ze[2]);Ze[0]/=yt,Ze[1]/=yt,Ze[2]/=yt}var ze,ct,et,qe,we,Le,Ke,Te,Ve=r(),$e,ot,tt={point:nt,lineStart:mt,lineEnd:bt,polygonStart:function(){tt.point=Yt,tt.lineStart=jt,tt.lineEnd=mr,Ve.reset(),_e.polygonStart()},polygonEnd:function(){_e.polygonEnd(),tt.point=nt,tt.lineStart=mt,tt.lineEnd=bt,J<0?(ze=-(et=180),ct=-(qe=90)):Ve>o?qe=90:Ve<-o&&(ct=-90),ot[0]=ze,ot[1]=et},sphere:function(){ze=-(et=180),ct=-(qe=90)}};function nt(Ze,yt){$e.push(ot=[ze=Ze,et=Ze]),ytqe&&(qe=yt)}function We(Ze,yt){var Wt=be([Ze*g,yt*g]);if(Te){var zt=Ge(Te,Wt),hr=[zt[1],-zt[0],0],Ur=Ge(hr,zt);Oe(Ur),Ur=me(Ur);var Qr=Ze-we,cn=Qr>0?1:-1,yn=Ur[0]*v*cn,Fn,en=p(Qr)>180;en^(cn*weqe&&(qe=Fn)):(yn=(yn+360)%360-180,en^(cn*weqe&&(qe=yt))),en?Zeor(ze,et)&&(et=Ze):or(Ze,et)>or(ze,et)&&(ze=Ze):et>=ze?(Zeet&&(et=Ze)):Ze>we?or(ze,Ze)>or(ze,et)&&(et=Ze):or(Ze,et)>or(ze,et)&&(ze=Ze)}else $e.push(ot=[ze=Ze,et=Ze]);ytqe&&(qe=yt),Te=Wt,we=Ze}function mt(){tt.point=We}function bt(){ot[0]=ze,ot[1]=et,tt.point=nt,Te=null}function Yt(Ze,yt){if(Te){var Wt=Ze-we;Ve.add(p(Wt)>180?Wt+(Wt>0?360:-360):Wt)}else Le=Ze,Ke=yt;_e.point(Ze,yt),We(Ze,yt)}function jt(){_e.lineStart()}function mr(){Yt(Le,Ke),_e.lineEnd(),p(Ve)>o&&(ze=-(et=180)),ot[0]=ze,ot[1]=et,Te=null}function or(Ze,yt){return(yt-=Ze)<0?yt+360:yt}function fr(Ze,yt){return Ze[0]-yt[0]}function Ot(Ze,yt){return Ze[0]<=Ze[1]?Ze[0]<=yt&&yt<=Ze[1]:ytor(zt[0],zt[1])&&(zt[1]=hr[1]),or(hr[0],zt[1])>or(zt[0],zt[1])&&(zt[0]=hr[0])):Ur.push(zt=hr);for(Qr=-1/0,Wt=Ur.length-1,yt=0,zt=Ur[Wt];yt<=Wt;zt=hr,++yt)hr=Ur[yt],(cn=or(zt[1],hr[0]))>Qr&&(Qr=cn,ze=hr[0],et=zt[1])}return $e=ot=null,ze===1/0||ct===1/0?[[NaN,NaN],[NaN,NaN]]:[[ze,ct],[et,qe]]}var Ct,wt,Tt,Mt,Lt,ft,kt,rr,pr,Kr,Nr,dn,xr,Fr,Zr,Cn,Dt={sphere:R,point:At,lineStart:Qt,lineEnd:rn,polygonStart:function(){Dt.lineStart=Jr,Dt.lineEnd=qn},polygonEnd:function(){Dt.lineStart=Qt,Dt.lineEnd=rn}};function At(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt);Vt(Wt*y(Ze),Wt*w(Ze),w(yt))}function Vt(Ze,yt,Wt){++Ct,Tt+=(Ze-Tt)/Ct,Mt+=(yt-Mt)/Ct,Lt+=(Wt-Lt)/Ct}function Qt(){Dt.point=Ut}function Ut(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt);Fr=Wt*y(Ze),Zr=Wt*w(Ze),Cn=w(yt),Dt.point=_r,Vt(Fr,Zr,Cn)}function _r(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt),zt=Wt*y(Ze),hr=Wt*w(Ze),Ur=w(yt),Qr=_(T((Qr=Zr*Ur-Cn*hr)*Qr+(Qr=Cn*zt-Fr*Ur)*Qr+(Qr=Fr*hr-Zr*zt)*Qr),Fr*zt+Zr*hr+Cn*Ur);wt+=Qr,ft+=Qr*(Fr+(Fr=zt)),kt+=Qr*(Zr+(Zr=hr)),rr+=Qr*(Cn+(Cn=Ur)),Vt(Fr,Zr,Cn)}function rn(){Dt.point=At}function Jr(){Dt.point=ri}function qn(){Jn(dn,xr),Dt.point=At}function ri(Ze,yt){dn=Ze,xr=yt,Ze*=g,yt*=g,Dt.point=Jn;var Wt=y(yt);Fr=Wt*y(Ze),Zr=Wt*w(Ze),Cn=w(yt),Vt(Fr,Zr,Cn)}function Jn(Ze,yt){Ze*=g,yt*=g;var Wt=y(yt),zt=Wt*y(Ze),hr=Wt*w(Ze),Ur=w(yt),Qr=Zr*Ur-Cn*hr,cn=Cn*zt-Fr*Ur,yn=Fr*hr-Zr*zt,Fn=T(Qr*Qr+cn*cn+yn*yn),en=E(Fn),vn=Fn&&-en/Fn;pr+=vn*Qr,Kr+=vn*cn,Nr+=vn*yn,wt+=en,ft+=en*(Fr+(Fr=zt)),kt+=en*(Zr+(Zr=hr)),rr+=en*(Cn+(Cn=Ur)),Vt(Fr,Zr,Cn)}function Ii(Ze){Ct=wt=Tt=Mt=Lt=ft=kt=rr=pr=Kr=Nr=0,U(Ze,Dt);var yt=pr,Wt=Kr,zt=Nr,hr=yt*yt+Wt*Wt+zt*zt;return hrl?Ze+Math.round(-Ze/f)*f:Ze,yt]}ha.invert=ha;function va(Ze,yt,Wt){return(Ze%=f)?yt||Wt?ra(oa(Ze),Ma(yt,Wt)):oa(Ze):yt||Wt?Ma(yt,Wt):ha}function Xi(Ze){return function(yt,Wt){return yt+=Ze,[yt>l?yt-f:yt<-l?yt+f:yt,Wt]}}function oa(Ze){var yt=Xi(Ze);return yt.invert=Xi(-Ze),yt}function Ma(Ze,yt){var Wt=y(Ze),zt=w(Ze),hr=y(yt),Ur=w(yt);function Qr(cn,yn){var Fn=y(yn),en=y(cn)*Fn,vn=w(cn)*Fn,mn=w(yn),Pn=mn*Wt+en*zt;return[_(vn*hr-Pn*Ur,en*Wt-mn*zt),E(Pn*hr+vn*Ur)]}return Qr.invert=function(cn,yn){var Fn=y(yn),en=y(cn)*Fn,vn=w(cn)*Fn,mn=w(yn),Pn=mn*hr-vn*Ur;return[_(vn*hr+mn*Ur,en*Wt+Pn*zt),E(Pn*Wt-en*zt)]},Qr}function Ga(Ze){Ze=va(Ze[0]*g,Ze[1]*g,Ze.length>2?Ze[2]*g:0);function yt(Wt){return Wt=Ze(Wt[0]*g,Wt[1]*g),Wt[0]*=v,Wt[1]*=v,Wt}return yt.invert=function(Wt){return Wt=Ze.invert(Wt[0]*g,Wt[1]*g),Wt[0]*=v,Wt[1]*=v,Wt},yt}function ss(Ze,yt,Wt,zt,hr,Ur){if(Wt){var Qr=y(yt),cn=w(yt),yn=zt*Wt;hr==null?(hr=yt+zt*f,Ur=yt-yn/2):(hr=mo(Qr,hr),Ur=mo(Qr,Ur),(zt>0?hrUr)&&(hr+=zt*f));for(var Fn,en=hr;zt>0?en>Ur:en1&&Ze.push(Ze.pop().concat(Ze.shift()))},result:function(){var Wt=Ze;return Ze=[],yt=null,Wt}}}function ao(Ze,yt){return p(Ze[0]-yt[0])=0;--cn)hr.point((vn=en[cn])[0],vn[1]);else zt(mn.x,mn.p.x,-1,hr);mn=mn.p}mn=mn.o,en=mn.z,Pn=!Pn}while(!mn.v);hr.lineEnd()}}}function bo(Ze){if(yt=Ze.length){for(var yt,Wt=0,zt=Ze[0],hr;++Wt=0?1:-1,Ya=Qa*Ha,ho=Ya>l,Pa=ki*Zi;if(Zs.add(_(Pa*Qa*w(Ya),Ci*na+Pa*y(Ya))),Qr+=ho?Ha+Qa*f:Ha,ho^Pn>=Wt^Un>=Wt){var Js=Ge(be(mn),be(pi));Oe(Js);var fs=Ge(Ur,Js);Oe(fs);var Io=(ho^Ha>=0?-1:1)*E(fs[2]);(zt>Io||zt===Io&&(Js[0]||Js[1]))&&(cn+=ho^Ha>=0?1:-1)}}return(Qr<-o||Qr0){for(yn||(hr.polygonStart(),yn=!0),hr.lineStart(),na=0;na1&&Gn&2&&Zi.push(Zi.pop().concat(Zi.shift())),en.push(Zi.filter(ut))}}return mn}}function ut(Ze){return Ze.length>1}function Jt(Ze,yt){return((Ze=Ze.x)[0]<0?Ze[1]-u-o:u-Ze[1])-((yt=yt.x)[0]<0?yt[1]-u-o:u-yt[1])}var er=Af(function(){return!0},wr,Dr,[-l,-u]);function wr(Ze){var yt=NaN,Wt=NaN,zt=NaN,hr;return{lineStart:function(){Ze.lineStart(),hr=1},point:function(Ur,Qr){var cn=Ur>0?l:-l,yn=p(Ur-yt);p(yn-l)0?u:-u),Ze.point(zt,Wt),Ze.lineEnd(),Ze.lineStart(),Ze.point(cn,Wt),Ze.point(Ur,Wt),hr=0):zt!==cn&&yn>=l&&(p(yt-zt)o?x((w(yt)*(Ur=y(zt))*w(Wt)-w(zt)*(hr=y(yt))*w(Ze))/(hr*Ur*Qr)):(yt+zt)/2}function Dr(Ze,yt,Wt,zt){var hr;if(Ze==null)hr=Wt*u,zt.point(-l,hr),zt.point(0,hr),zt.point(l,hr),zt.point(l,0),zt.point(l,-hr),zt.point(0,-hr),zt.point(-l,-hr),zt.point(-l,0),zt.point(-l,hr);else if(p(Ze[0]-yt[0])>o){var Ur=Ze[0]0,hr=p(yt)>o;function Ur(en,vn,mn,Pn){ss(Pn,Ze,Wt,mn,en,vn)}function Qr(en,vn){return y(en)*y(vn)>yt}function cn(en){var vn,mn,Pn,On,ki;return{lineStart:function(){On=Pn=!1,ki=1},point:function(Ci,qi){var pi=[Ci,qi],Un,Gn=Qr(Ci,qi),Zi=zt?Gn?0:Fn(Ci,qi):Gn?Fn(Ci+(Ci<0?l:-l),qi):0;if(!vn&&(On=Pn=Gn)&&en.lineStart(),Gn!==Pn&&(Un=yn(vn,pi),(!Un||ao(vn,Un)||ao(pi,Un))&&(pi[2]=1)),Gn!==Pn)ki=0,Gn?(en.lineStart(),Un=yn(pi,vn),en.point(Un[0],Un[1])):(Un=yn(vn,pi),en.point(Un[0],Un[1],2),en.lineEnd()),vn=Un;else if(hr&&vn&&zt^Gn){var na;!(Zi&mn)&&(na=yn(pi,vn,!0))&&(ki=0,zt?(en.lineStart(),en.point(na[0][0],na[0][1]),en.point(na[1][0],na[1][1]),en.lineEnd()):(en.point(na[1][0],na[1][1]),en.lineEnd(),en.lineStart(),en.point(na[0][0],na[0][1],3)))}Gn&&(!vn||!ao(vn,pi))&&en.point(pi[0],pi[1]),vn=pi,Pn=Gn,mn=Zi},lineEnd:function(){Pn&&en.lineEnd(),vn=null},clean:function(){return ki|(On&&Pn)<<1}}}function yn(en,vn,mn){var Pn=be(en),On=be(vn),ki=[1,0,0],Ci=Ge(Pn,On),qi=De(Ci,Ci),pi=Ci[0],Un=qi-pi*pi;if(!Un)return!mn&&en;var Gn=yt*qi/Un,Zi=-yt*pi/Un,na=Ge(ki,Ci),Ha=it(ki,Gn),Qa=it(Ci,Zi);ht(Ha,Qa);var Ya=na,ho=De(Ha,Ya),Pa=De(Ya,Ya),Js=ho*ho-Pa*(De(Ha,Ha)-1);if(!(Js<0)){var fs=T(Js),Io=it(Ya,(-ho-fs)/Pa);if(ht(Io,Ha),Io=me(Io),!mn)return Io;var oi=en[0],ro=vn[0],Go=en[1],Qs=vn[1],zl;ro0^Io[1]<(p(Io[0]-oi)l^(oi<=Io[0]&&Io[0]<=ro)){var Yl=it(Ya,(-ho+fs)/Pa);return ht(Yl,Ha),[Io,me(Yl)]}}}function Fn(en,vn){var mn=zt?Ze:l-Ze,Pn=0;return en<-mn?Pn|=1:en>mn&&(Pn|=2),vn<-mn?Pn|=4:vn>mn&&(Pn|=8),Pn}return Af(Qr,cn,Ur,zt?[0,-Ze]:[-l,Ze-l])}function Yr(Ze,yt,Wt,zt,hr,Ur){var Qr=Ze[0],cn=Ze[1],yn=yt[0],Fn=yt[1],en=0,vn=1,mn=yn-Qr,Pn=Fn-cn,On;if(On=Wt-Qr,!(!mn&&On>0)){if(On/=mn,mn<0){if(On0){if(On>vn)return;On>en&&(en=On)}if(On=hr-Qr,!(!mn&&On<0)){if(On/=mn,mn<0){if(On>vn)return;On>en&&(en=On)}else if(mn>0){if(On0)){if(On/=Pn,Pn<0){if(On0){if(On>vn)return;On>en&&(en=On)}if(On=Ur-cn,!(!Pn&&On<0)){if(On/=Pn,Pn<0){if(On>vn)return;On>en&&(en=On)}else if(Pn>0){if(On0&&(Ze[0]=Qr+en*mn,Ze[1]=cn+en*Pn),vn<1&&(yt[0]=Qr+vn*mn,yt[1]=cn+vn*Pn),!0}}}}}var Tn=1e9,Kn=-Tn;function Qn(Ze,yt,Wt,zt){function hr(Fn,en){return Ze<=Fn&&Fn<=Wt&&yt<=en&&en<=zt}function Ur(Fn,en,vn,mn){var Pn=0,On=0;if(Fn==null||(Pn=Qr(Fn,vn))!==(On=Qr(en,vn))||yn(Fn,en)<0^vn>0)do mn.point(Pn===0||Pn===3?Ze:Wt,Pn>1?zt:yt);while((Pn=(Pn+vn+4)%4)!==On);else mn.point(en[0],en[1])}function Qr(Fn,en){return p(Fn[0]-Ze)0?0:3:p(Fn[0]-Wt)0?2:1:p(Fn[1]-yt)0?1:0:en>0?3:2}function cn(Fn,en){return yn(Fn.x,en.x)}function yn(Fn,en){var vn=Qr(Fn,1),mn=Qr(en,1);return vn!==mn?vn-mn:vn===0?en[1]-Fn[1]:vn===1?Fn[0]-en[0]:vn===2?Fn[1]-en[1]:en[0]-Fn[0]}return function(Fn){var en=Fn,vn=Eo(),mn,Pn,On,ki,Ci,qi,pi,Un,Gn,Zi,na,Ha={point:Qa,lineStart:Js,lineEnd:fs,polygonStart:ho,polygonEnd:Pa};function Qa(oi,ro){hr(oi,ro)&&en.point(oi,ro)}function Ya(){for(var oi=0,ro=0,Go=Pn.length;rozt&&(lf-mc)*(zt-Yl)>($u-Yl)*(Ze-mc)&&++oi:$u<=zt&&(lf-mc)*(zt-Yl)<($u-Yl)*(Ze-mc)&&--oi;return oi}function ho(){en=vn,mn=[],Pn=[],na=!0}function Pa(){var oi=Ya(),ro=na&&oi,Go=(mn=t.merge(mn)).length;(ro||Go)&&(Fn.polygonStart(),ro&&(Fn.lineStart(),Ur(null,null,1,Fn),Fn.lineEnd()),Go&&bl(mn,cn,oi,Ur,Fn),Fn.polygonEnd()),en=Fn,mn=Pn=On=null}function Js(){Ha.point=Io,Pn&&Pn.push(On=[]),Zi=!0,Gn=!1,pi=Un=NaN}function fs(){mn&&(Io(ki,Ci),qi&&Gn&&vn.rejoin(),mn.push(vn.result())),Ha.point=Qa,Gn&&en.lineEnd()}function Io(oi,ro){var Go=hr(oi,ro);if(Pn&&On.push([oi,ro]),Zi)ki=oi,Ci=ro,qi=Go,Zi=!1,Go&&(en.lineStart(),en.point(oi,ro));else if(Go&&Gn)en.point(oi,ro);else{var Qs=[pi=Math.max(Kn,Math.min(Tn,pi)),Un=Math.max(Kn,Math.min(Tn,Un))],zl=[oi=Math.max(Kn,Math.min(Tn,oi)),ro=Math.max(Kn,Math.min(Tn,ro))];Yr(Qs,zl,Ze,yt,Wt,zt)?(Gn||(en.lineStart(),en.point(Qs[0],Qs[1])),en.point(zl[0],zl[1]),Go||en.lineEnd(),na=!1):Go&&(en.lineStart(),en.point(oi,ro),na=!1)}pi=oi,Un=ro,Gn=Go}return Ha}}function Ai(){var Ze=0,yt=0,Wt=960,zt=500,hr,Ur,Qr;return Qr={stream:function(cn){return hr&&Ur===cn?hr:hr=Qn(Ze,yt,Wt,zt)(Ur=cn)},extent:function(cn){return arguments.length?(Ze=+cn[0][0],yt=+cn[0][1],Wt=+cn[1][0],zt=+cn[1][1],hr=Ur=null,Qr):[[Ze,yt],[Wt,zt]]}}}var Ji=r(),Ra,ii,Za,ja={sphere:R,point:R,lineStart:qo,lineEnd:R,polygonStart:R,polygonEnd:R};function qo(){ja.point=Ka,ja.lineEnd=$a}function $a(){ja.point=ja.lineEnd=R}function Ka(Ze,yt){Ze*=g,yt*=g,Ra=Ze,ii=w(yt),Za=y(yt),ja.point=Oa}function Oa(Ze,yt){Ze*=g,yt*=g;var Wt=w(yt),zt=y(yt),hr=p(Ze-Ra),Ur=y(hr),Qr=w(hr),cn=zt*Qr,yn=Za*Wt-ii*zt*Ur,Fn=ii*Wt+Za*zt*Ur;Ji.add(_(T(cn*cn+yn*yn),Fn)),Ra=Ze,ii=Wt,Za=zt}function Ni(Ze){return Ji.reset(),U(Ze,ja),+Ji}var ka=[null,null],vs={type:"LineString",coordinates:ka};function yo(Ze,yt){return ka[0]=Ze,ka[1]=yt,Ni(vs)}var so={Feature:function(Ze,yt){return ko(Ze.geometry,yt)},FeatureCollection:function(Ze,yt){for(var Wt=Ze.features,zt=-1,hr=Wt.length;++zt0&&(hr=yo(Ze[Ur],Ze[Ur-1]),hr>0&&Wt<=hr&&zt<=hr&&(Wt+zt-hr)*(1-Math.pow((Wt-zt)/hr,2))o}).map(mn)).concat(t.range(C(Ur/Fn)*Fn,hr,Fn).filter(function(Un){return p(Un%vn)>o}).map(Pn))}return qi.lines=function(){return pi().map(function(Un){return{type:"LineString",coordinates:Un}})},qi.outline=function(){return{type:"Polygon",coordinates:[On(zt).concat(ki(Qr).slice(1),On(Wt).reverse().slice(1),ki(cn).reverse().slice(1))]}},qi.extent=function(Un){return arguments.length?qi.extentMajor(Un).extentMinor(Un):qi.extentMinor()},qi.extentMajor=function(Un){return arguments.length?(zt=+Un[0][0],Wt=+Un[1][0],cn=+Un[0][1],Qr=+Un[1][1],zt>Wt&&(Un=zt,zt=Wt,Wt=Un),cn>Qr&&(Un=cn,cn=Qr,Qr=Un),qi.precision(Ci)):[[zt,cn],[Wt,Qr]]},qi.extentMinor=function(Un){return arguments.length?(yt=+Un[0][0],Ze=+Un[1][0],Ur=+Un[0][1],hr=+Un[1][1],yt>Ze&&(Un=yt,yt=Ze,Ze=Un),Ur>hr&&(Un=Ur,Ur=hr,hr=Un),qi.precision(Ci)):[[yt,Ur],[Ze,hr]]},qi.step=function(Un){return arguments.length?qi.stepMajor(Un).stepMinor(Un):qi.stepMinor()},qi.stepMajor=function(Un){return arguments.length?(en=+Un[0],vn=+Un[1],qi):[en,vn]},qi.stepMinor=function(Un){return arguments.length?(yn=+Un[0],Fn=+Un[1],qi):[yn,Fn]},qi.precision=function(Un){return arguments.length?(Ci=+Un,mn=Ls(Ur,hr,90),Pn=$s(yt,Ze,Ci),On=Ls(cn,Qr,90),ki=$s(zt,Wt,Ci),qi):Ci},qi.extentMajor([[-180,-90+o],[180,90-o]]).extentMinor([[-180,-80-o],[180,80+o]])}function _u(){return Kc()()}function Gu(Ze,yt){var Wt=Ze[0]*g,zt=Ze[1]*g,hr=yt[0]*g,Ur=yt[1]*g,Qr=y(zt),cn=w(zt),yn=y(Ur),Fn=w(Ur),en=Qr*y(Wt),vn=Qr*w(Wt),mn=yn*y(hr),Pn=yn*w(hr),On=2*E(T(I(Ur-zt)+Qr*yn*I(hr-Wt))),ki=w(On),Ci=On?function(qi){var pi=w(qi*=On)/ki,Un=w(On-qi)/ki,Gn=Un*en+pi*mn,Zi=Un*vn+pi*Pn,na=Un*cn+pi*Fn;return[_(Zi,Gn)*v,_(na,T(Gn*Gn+Zi*Zi))*v]}:function(){return[Wt*v,zt*v]};return Ci.distance=On,Ci}function Ja(Ze){return Ze}var ps=r(),Sa=r(),ma,Ps,Ca,Pl,ll={point:R,lineStart:R,lineEnd:R,polygonStart:function(){ll.lineStart=Jc,ll.lineEnd=Bd},polygonEnd:function(){ll.lineStart=ll.lineEnd=ll.point=R,ps.add(p(Sa)),Sa.reset()},result:function(){var Ze=ps/2;return ps.reset(),Ze}};function Jc(){ll.point=lu}function lu(Ze,yt){ll.point=Mf,ma=Ca=Ze,Ps=Pl=yt}function Mf(Ze,yt){Sa.add(Pl*Ze-Ca*yt),Ca=Ze,Pl=yt}function Bd(){Mf(ma,Ps)}var Hu=1/0,Sf=Hu,kc=-Hu,Uo=kc,ns={point:Ks,lineStart:R,lineEnd:R,polygonStart:R,polygonEnd:R,result:function(){var Ze=[[Hu,Sf],[kc,Uo]];return kc=Uo=-(Sf=Hu=1/0),Ze}};function Ks(Ze,yt){Zekc&&(kc=Ze),ytUo&&(Uo=yt)}var Ef=0,ju=0,gs=0,bu=0,kf=0,ah=0,Od=0,Qc=0,uu=0,oh,hc,Fl,Yo,Ro={point:is,lineStart:Dl,lineEnd:Cc,polygonStart:function(){Ro.lineStart=sh,Ro.lineEnd=Y0},polygonEnd:function(){Ro.point=is,Ro.lineStart=Dl,Ro.lineEnd=Cc},result:function(){var Ze=uu?[Od/uu,Qc/uu]:ah?[bu/ah,kf/ah]:gs?[Ef/gs,ju/gs]:[NaN,NaN];return Ef=ju=gs=bu=kf=ah=Od=Qc=uu=0,Ze}};function is(Ze,yt){Ef+=Ze,ju+=yt,++gs}function Dl(){Ro.point=dc}function dc(Ze,yt){Ro.point=ef,is(Fl=Ze,Yo=yt)}function ef(Ze,yt){var Wt=Ze-Fl,zt=yt-Yo,hr=T(Wt*Wt+zt*zt);bu+=hr*(Fl+Ze)/2,kf+=hr*(Yo+yt)/2,ah+=hr,is(Fl=Ze,Yo=yt)}function Cc(){Ro.point=is}function sh(){Ro.point=Nd}function Y0(){Cf(oh,hc)}function Nd(Ze,yt){Ro.point=Cf,is(oh=Fl=Ze,hc=Yo=yt)}function Cf(Ze,yt){var Wt=Ze-Fl,zt=yt-Yo,hr=T(Wt*Wt+zt*zt);bu+=hr*(Fl+Ze)/2,kf+=hr*(Yo+yt)/2,ah+=hr,hr=Yo*Ze-Fl*yt,Od+=hr*(Fl+Ze),Qc+=hr*(Yo+yt),uu+=hr*3,is(Fl=Ze,Yo=yt)}function Vo(Ze){this._context=Ze}Vo.prototype={_radius:4.5,pointRadius:function(Ze){return this._radius=Ze,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(Ze,yt){switch(this._point){case 0:{this._context.moveTo(Ze,yt),this._point=1;break}case 1:{this._context.lineTo(Ze,yt);break}default:{this._context.moveTo(Ze+this._radius,yt),this._context.arc(Ze,yt,this._radius,0,f);break}}},result:R};var Ud=r(),zh,tf,Vd,rf,qh,vc={point:R,lineStart:function(){vc.point=dd},lineEnd:function(){zh&&Bh(tf,Vd),vc.point=R},polygonStart:function(){zh=!0},polygonEnd:function(){zh=null},result:function(){var Ze=+Ud;return Ud.reset(),Ze}};function dd(Ze,yt){vc.point=Bh,tf=rf=Ze,Vd=qh=yt}function Bh(Ze,yt){rf-=Ze,qh-=yt,Ud.add(T(rf*rf+qh*qh)),rf=Ze,qh=yt}function Wu(){this._string=[]}Wu.prototype={_radius:4.5,_circle:vd(4.5),pointRadius:function(Ze){return(Ze=+Ze)!==this._radius&&(this._radius=Ze,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(Ze,yt){switch(this._point){case 0:{this._string.push("M",Ze,",",yt),this._point=1;break}case 1:{this._string.push("L",Ze,",",yt);break}default:{this._circle==null&&(this._circle=vd(this._radius)),this._string.push("M",Ze,",",yt,this._circle);break}}},result:function(){if(this._string.length){var Ze=this._string.join("");return this._string=[],Ze}else return null}};function vd(Ze){return"m0,"+Ze+"a"+Ze+","+Ze+" 0 1,1 0,"+-2*Ze+"a"+Ze+","+Ze+" 0 1,1 0,"+2*Ze+"z"}function pd(Ze,yt){var Wt=4.5,zt,hr;function Ur(Qr){return Qr&&(typeof Wt=="function"&&hr.pointRadius(+Wt.apply(this,arguments)),U(Qr,zt(hr))),hr.result()}return Ur.area=function(Qr){return U(Qr,zt(ll)),ll.result()},Ur.measure=function(Qr){return U(Qr,zt(vc)),vc.result()},Ur.bounds=function(Qr){return U(Qr,zt(ns)),ns.result()},Ur.centroid=function(Qr){return U(Qr,zt(Ro)),Ro.result()},Ur.projection=function(Qr){return arguments.length?(zt=Qr==null?(Ze=null,Ja):(Ze=Qr).stream,Ur):Ze},Ur.context=function(Qr){return arguments.length?(hr=Qr==null?(yt=null,new Wu):new Vo(yt=Qr),typeof Wt!="function"&&hr.pointRadius(Wt),Ur):yt},Ur.pointRadius=function(Qr){return arguments.length?(Wt=typeof Qr=="function"?Qr:(hr.pointRadius(+Qr),+Qr),Ur):Wt},Ur.projection(Ze).context(yt)}function lh(Ze){return{stream:nf(Ze)}}function nf(Ze){return function(yt){var Wt=new uh;for(var zt in Ze)Wt[zt]=Ze[zt];return Wt.stream=yt,Wt}}function uh(){}uh.prototype={constructor:uh,point:function(Ze,yt){this.stream.point(Ze,yt)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};function af(Ze,yt,Wt){var zt=Ze.clipExtent&&Ze.clipExtent();return Ze.scale(150).translate([0,0]),zt!=null&&Ze.clipExtent(null),U(Wt,Ze.stream(ns)),yt(ns.result()),zt!=null&&Ze.clipExtent(zt),Ze}function gd(Ze,yt,Wt){return af(Ze,function(zt){var hr=yt[1][0]-yt[0][0],Ur=yt[1][1]-yt[0][1],Qr=Math.min(hr/(zt[1][0]-zt[0][0]),Ur/(zt[1][1]-zt[0][1])),cn=+yt[0][0]+(hr-Qr*(zt[1][0]+zt[0][0]))/2,yn=+yt[0][1]+(Ur-Qr*(zt[1][1]+zt[0][1]))/2;Ze.scale(150*Qr).translate([cn,yn])},Wt)}function Rl(Ze,yt,Wt){return gd(Ze,[[0,0],yt],Wt)}function ch(Ze,yt,Wt){return af(Ze,function(zt){var hr=+yt,Ur=hr/(zt[1][0]-zt[0][0]),Qr=(hr-Ur*(zt[1][0]+zt[0][0]))/2,cn=-Ur*zt[0][1];Ze.scale(150*Ur).translate([Qr,cn])},Wt)}function Lc(Ze,yt,Wt){return af(Ze,function(zt){var hr=+yt,Ur=hr/(zt[1][1]-zt[0][1]),Qr=-Ur*zt[0][0],cn=(hr-Ur*(zt[1][1]+zt[0][1]))/2;Ze.scale(150*Ur).translate([Qr,cn])},Wt)}var md=16,yd=y(30*g);function Lf(Ze,yt){return+yt?fh(Ze,yt):wu(Ze)}function wu(Ze){return nf({point:function(yt,Wt){yt=Ze(yt,Wt),this.stream.point(yt[0],yt[1])}})}function fh(Ze,yt){function Wt(zt,hr,Ur,Qr,cn,yn,Fn,en,vn,mn,Pn,On,ki,Ci){var qi=Fn-zt,pi=en-hr,Un=qi*qi+pi*pi;if(Un>4*yt&&ki--){var Gn=Qr+mn,Zi=cn+Pn,na=yn+On,Ha=T(Gn*Gn+Zi*Zi+na*na),Qa=E(na/=Ha),Ya=p(p(na)-1)yt||p((qi*fs+pi*Io)/Un-.5)>.3||Qr*mn+cn*Pn+yn*On2?oi[2]%360*g:0,fs()):[cn*v,yn*v,Fn*v]},Pa.angle=function(oi){return arguments.length?(vn=oi%360*g,fs()):vn*v},Pa.reflectX=function(oi){return arguments.length?(mn=oi?-1:1,fs()):mn<0},Pa.reflectY=function(oi){return arguments.length?(Pn=oi?-1:1,fs()):Pn<0},Pa.precision=function(oi){return arguments.length?(na=Lf(Ha,Zi=oi*oi),Io()):T(Zi)},Pa.fitExtent=function(oi,ro){return gd(Pa,oi,ro)},Pa.fitSize=function(oi,ro){return Rl(Pa,oi,ro)},Pa.fitWidth=function(oi,ro){return ch(Pa,oi,ro)},Pa.fitHeight=function(oi,ro){return Lc(Pa,oi,ro)};function fs(){var oi=Gl(Wt,0,0,mn,Pn,vn).apply(null,yt(Ur,Qr)),ro=(vn?Gl:Gd)(Wt,zt-oi[0],hr-oi[1],mn,Pn,vn);return en=va(cn,yn,Fn),Ha=ra(yt,ro),Qa=ra(en,Ha),na=Lf(Ha,Zi),Io()}function Io(){return Ya=ho=null,Pa}return function(){return yt=Ze.apply(this,arguments),Pa.invert=yt.invert&&Js,fs()}}function Hl(Ze){var yt=0,Wt=l/3,zt=xd(Ze),hr=zt(yt,Wt);return hr.parallels=function(Ur){return arguments.length?zt(yt=Ur[0]*g,Wt=Ur[1]*g):[yt*v,Wt*v]},hr}function _d(Ze){var yt=y(Ze);function Wt(zt,hr){return[zt*yt,w(hr)/yt]}return Wt.invert=function(zt,hr){return[zt/yt,E(hr*yt)]},Wt}function dh(Ze,yt){var Wt=w(Ze),zt=(Wt+w(yt))/2;if(p(zt)=.12&&Ci<.234&&ki>=-.425&&ki<-.214?hr:Ci>=.166&&Ci<.234&&ki>=-.214&&ki<-.115?Qr:Wt).invert(mn)},en.stream=function(mn){return Ze&&yt===mn?Ze:Ze=xo([Wt.stream(yt=mn),hr.stream(mn),Qr.stream(mn)])},en.precision=function(mn){return arguments.length?(Wt.precision(mn),hr.precision(mn),Qr.precision(mn),vn()):Wt.precision()},en.scale=function(mn){return arguments.length?(Wt.scale(mn),hr.scale(mn*.35),Qr.scale(mn),en.translate(Wt.translate())):Wt.scale()},en.translate=function(mn){if(!arguments.length)return Wt.translate();var Pn=Wt.scale(),On=+mn[0],ki=+mn[1];return zt=Wt.translate(mn).clipExtent([[On-.455*Pn,ki-.238*Pn],[On+.455*Pn,ki+.238*Pn]]).stream(Fn),Ur=hr.translate([On-.307*Pn,ki+.201*Pn]).clipExtent([[On-.425*Pn+o,ki+.12*Pn+o],[On-.214*Pn-o,ki+.234*Pn-o]]).stream(Fn),cn=Qr.translate([On-.205*Pn,ki+.212*Pn]).clipExtent([[On-.214*Pn+o,ki+.166*Pn+o],[On-.115*Pn-o,ki+.234*Pn-o]]).stream(Fn),vn()},en.fitExtent=function(mn,Pn){return gd(en,mn,Pn)},en.fitSize=function(mn,Pn){return Rl(en,mn,Pn)},en.fitWidth=function(mn,Pn){return ch(en,mn,Pn)},en.fitHeight=function(mn,Pn){return Lc(en,mn,Pn)};function vn(){return Ze=yt=null,en}return en.scale(1070)}function Tu(Ze){return function(yt,Wt){var zt=y(yt),hr=y(Wt),Ur=Ze(zt*hr);return[Ur*hr*w(yt),Ur*w(Wt)]}}function Au(Ze){return function(yt,Wt){var zt=T(yt*yt+Wt*Wt),hr=Ze(zt),Ur=w(hr),Qr=y(hr);return[_(yt*Ur,zt*Qr),E(zt&&Wt*Ur/zt)]}}var Il=Tu(function(Ze){return T(2/(1+Ze))});Il.invert=Au(function(Ze){return 2*E(Ze/2)});function g0(){return wl(Il).scale(124.75).clipAngle(180-.001)}var Yu=Tu(function(Ze){return(Ze=F(Ze))&&Ze/w(Ze)});Yu.invert=Au(function(Ze){return Ze});function Nh(){return wl(Yu).scale(79.4188).clipAngle(180-.001)}function Tl(Ze,yt){return[Ze,S(m((u+yt)/2))]}Tl.invert=function(Ze,yt){return[Ze,2*x(k(yt))-u]};function jl(){return Uh(Tl).scale(961/f)}function Uh(Ze){var yt=wl(Ze),Wt=yt.center,zt=yt.scale,hr=yt.translate,Ur=yt.clipExtent,Qr=null,cn,yn,Fn;yt.scale=function(vn){return arguments.length?(zt(vn),en()):zt()},yt.translate=function(vn){return arguments.length?(hr(vn),en()):hr()},yt.center=function(vn){return arguments.length?(Wt(vn),en()):Wt()},yt.clipExtent=function(vn){return arguments.length?(vn==null?Qr=cn=yn=Fn=null:(Qr=+vn[0][0],cn=+vn[0][1],yn=+vn[1][0],Fn=+vn[1][1]),en()):Qr==null?null:[[Qr,cn],[yn,Fn]]};function en(){var vn=l*zt(),mn=yt(Ga(yt.rotate()).invert([0,0]));return Ur(Qr==null?[[mn[0]-vn,mn[1]-vn],[mn[0]+vn,mn[1]+vn]]:Ze===Tl?[[Math.max(mn[0]-vn,Qr),cn],[Math.min(mn[0]+vn,yn),Fn]]:[[Qr,Math.max(mn[1]-vn,cn)],[yn,Math.min(mn[1]+vn,Fn)]])}return en()}function Vh(Ze){return m((u+Ze)/2)}function jd(Ze,yt){var Wt=y(Ze),zt=Ze===yt?w(Ze):S(Wt/y(yt))/S(Vh(yt)/Vh(Ze)),hr=Wt*L(Vh(Ze),zt)/zt;if(!zt)return Tl;function Ur(Qr,cn){hr>0?cn<-u+o&&(cn=-u+o):cn>u-o&&(cn=u-o);var yn=hr/L(Vh(cn),zt);return[yn*w(zt*Qr),hr-yn*y(zt*Qr)]}return Ur.invert=function(Qr,cn){var yn=hr-cn,Fn=A(zt)*T(Qr*Qr+yn*yn),en=_(Qr,p(yn))*A(yn);return yn*zt<0&&(en-=l*A(Qr)*A(yn)),[en/zt,2*x(L(hr/Fn,1/zt))-u]},Ur}function pc(){return Hl(jd).scale(109.5).parallels([30,30])}function gc(Ze,yt){return[Ze,yt]}gc.invert=gc;function of(){return wl(gc).scale(152.63)}function sf(Ze,yt){var Wt=y(Ze),zt=Ze===yt?w(Ze):(Wt-y(yt))/(yt-Ze),hr=Wt/zt+Ze;if(p(zt)o&&--zt>0);return[Ze/(.8707+(Ur=Wt*Wt)*(-.131979+Ur*(-.013791+Ur*Ur*Ur*(.003971-.001529*Ur)))),Wt]};function Td(){return wl(y0).scale(175.295)}function ul(Ze,yt){return[y(yt)*w(Ze),w(yt)]}ul.invert=Au(E);function Wl(){return wl(ul).scale(249.5).clipAngle(90+o)}function If(Ze,yt){var Wt=y(yt),zt=1+y(Ze)*Wt;return[Wt*w(Ze)/zt,w(yt)/zt]}If.invert=Au(function(Ze){return 2*x(Ze)});function vh(){return wl(If).scale(250).clipAngle(142)}function zf(Ze,yt){return[S(m((u+yt)/2)),-Ze]}zf.invert=function(Ze,yt){return[-yt,2*x(k(Ze))-u]};function qf(){var Ze=Uh(zf),yt=Ze.center,Wt=Ze.rotate;return Ze.center=function(zt){return arguments.length?yt([-zt[1],zt[0]]):(zt=yt(),[zt[1],-zt[0]])},Ze.rotate=function(zt){return arguments.length?Wt([zt[0],zt[1],zt.length>2?zt[2]+90:90]):(zt=Wt(),[zt[0],zt[1],zt[2]-90])},Wt([0,0,90]).scale(159.155)}e.geoAlbers=Hd,e.geoAlbersUsa=p0,e.geoArea=le,e.geoAzimuthalEqualArea=g0,e.geoAzimuthalEqualAreaRaw=Il,e.geoAzimuthalEquidistant=Nh,e.geoAzimuthalEquidistantRaw=Yu,e.geoBounds=cr,e.geoCentroid=Ii,e.geoCircle=sl,e.geoClipAntimeridian=er,e.geoClipCircle=bn,e.geoClipExtent=Ai,e.geoClipRectangle=Qn,e.geoConicConformal=pc,e.geoConicConformalRaw=jd,e.geoConicEqualArea=Pf,e.geoConicEqualAreaRaw=dh,e.geoConicEquidistant=bd,e.geoConicEquidistantRaw=sf,e.geoContains=rs,e.geoDistance=yo,e.geoEqualEarth=m0,e.geoEqualEarthRaw=Rf,e.geoEquirectangular=of,e.geoEquirectangularRaw=gc,e.geoGnomonic=Hh,e.geoGnomonicRaw=wd,e.geoGraticule=Kc,e.geoGraticule10=_u,e.geoIdentity=X0,e.geoInterpolate=Gu,e.geoLength=Ni,e.geoMercator=jl,e.geoMercatorRaw=Tl,e.geoNaturalEarth1=Td,e.geoNaturalEarth1Raw=y0,e.geoOrthographic=Wl,e.geoOrthographicRaw=ul,e.geoPath=pd,e.geoProjection=wl,e.geoProjectionMutator=xd,e.geoRotation=Ga,e.geoStereographic=vh,e.geoStereographicRaw=If,e.geoStream=U,e.geoTransform=lh,e.geoTransverseMercator=qf,e.geoTransverseMercatorRaw=zf,Object.defineProperty(e,"__esModule",{value:!0})}))});var BIe=fe((t5r,qIe)=>{"use strict";var zIe={alabama:"AL",alaska:"AK",arizona:"AZ",arkansas:"AR",california:"CA",colorado:"CO",connecticut:"CT",delaware:"DE","district of columbia":"DC",florida:"FL",georgia:"GA",hawaii:"HI",idaho:"ID",illinois:"IL",indiana:"IN",iowa:"IA",kansas:"KS",kentucky:"KY",louisiana:"LA",maine:"ME",maryland:"MD",massachusetts:"MA",michigan:"MI",minnesota:"MN",mississippi:"MS",missouri:"MO",montana:"MT",nebraska:"NE",nevada:"NV","new hampshire":"NH","new jersey":"NJ","new mexico":"NM","new york":"NY","north carolina":"NC","north dakota":"ND",ohio:"OH",oklahoma:"OK",oregon:"OR",pennsylvania:"PA","rhode island":"RI","south carolina":"SC","south dakota":"SD",tennessee:"TN",texas:"TX",utah:"UT",vermont:"VT",virginia:"VA",washington:"WA","washington dc":"DC","washington d.c.":"DC","west virginia":"WV",wisconsin:"WI",wyoming:"WY"},OGt=new Set(Object.values(zIe));qIe.exports={usaLocationAbbreviations:OGt,usaLocationList:zIe}});var OIe={};zp(OIe,{COUNTRIES_X:()=>NGt});var NGt,NIe=Co(()=>{"use strict";NGt=[{iso3:"XAC",iso2:"",m49:"",name:"Aksai Chin",aliases:[]},{iso3:"XAP",iso2:"",m49:"",name:"Arunachal Pradesh",aliases:[]},{iso3:"XBT",iso2:"",m49:"",name:"Bir Tawil",aliases:[]},{iso3:"XHT",iso2:"",m49:"",name:"Halaib Triangle",aliases:[]},{iso3:"XIT",iso2:"",m49:"",name:"Ilemi Triangle",aliases:[]},{iso3:"XJK",iso2:"",m49:"",name:"Jammu and Kashmir",aliases:[]}]});var Cg=fe((r5r,GIe)=>{"use strict";var UGt=xi(),{COUNTRIES:VGt,createLookup:GGt}=gIe(),{area:HGt}=LIe(),{centroid:jGt}=FIe(),{coordAll:WGt}=FP(),{geoBounds:YGt}=qP(),XGt=J4(),_y=W1(),ZGt=em(),$Gt=M4(),BP=NT(),{usaLocationAbbreviations:KGt,usaLocationList:JGt}=BIe(),{COUNTRIES_X:QGt}=(NIe(),Gs(OIe)),{lookupAlpha3:eHt}=GGt([...VGt,...QGt]),tHt={"ISO-3":XGt,"USA-states":nHt,"country names":rHt};function rHt(e){let t=eHt(e);return t||(_y.log("Unrecognized country name: "+e+"."),!1)}function nHt(e){e=e.trim();let t=KGt.has(e.toUpperCase())?e.toUpperCase():JGt[e.toLowerCase()];return t||(_y.log("Unrecognized US location: "+e+"."),!1)}function iHt(e,t,r){var a;if(!t||typeof t!="string")return!1;let n=tHt[e](t);if(n){let i;if(e==="USA-states"){i=[];for(let o of r)((a=o==null?void 0:o.properties)==null?void 0:a.gu)==="USA"&&i.push(o)}else i=r;for(let o of i)if(o.id===n)return o;_y.log(`Location with id ${n} does not have a matching topojson feature at this resolution.`)}return!1}var OP=360;function LX(e){for(let t=0;t0&&e[t+1][0]<0)return t;return null}function aHt(e){var t=e.geometry,r=t.coordinates,n=e.id,a=[],i,o,s,l;switch(n==="RUS"||n==="FJI"?i=function(u){var c;if(LX(u)===null)c=u;else for(c=new Array(u.length),l=0;lc?f[v++]=[u[l][0]+OP,u[l][1]]:l===c?(f[v++]=u[l],f[v++]=[u[l][0],-90]):f[v++]=u[l];var g=BP.tester(f);g.pts.pop(),a.push(g)}:i=function(u){a.push(BP.tester(u))},t.type){case"MultiPolygon":for(o=0;oa&&(a=s,r=o)}else r=t;return!r||!r.coordinates.some(l=>l.length>0)?[NaN,NaN]:jGt(r).geometry.coordinates}function lHt(e){var t=window.PlotlyGeoAssets||{},r=[];function n(l){return new Promise(function(u,c){UGt.json(l,function(f,v){if(f){delete t[l];var g=f.status===404?'GeoJSON at URL "'+l+'" does not exist.':"Unexpected error while fetching from "+l;return c(new Error(g))}return t[l]=v,u(v)})})}function a(l){return new Promise(function(u,c){var f=0,v=setInterval(function(){if(t[l]&&t[l]!=="pending")return clearInterval(v),u(t[l]);if(f>100)return clearInterval(v),c("Unexpected error while fetching from "+l);f++},50)})}for(var i=0;iDX(FX(e));function FX(e){try{return WGt(e)}catch(t){return[]}}function DX(e){if(e.length===0)return null;if(e.length===1){let[i,o]=e[0];return[i,o,i,o]}let[[t,r],[n,a]]=YGt({type:"MultiPoint",coordinates:e});return[t,r,VIe([t,n])[1],a]}var cHt=(e,t)=>t.fitbounds==="geojson"&&e.locationmode==="geojson-id",UIe=(e,t)=>cHt(e,t)?FX(PX(e)):[],fHt=(e,t)=>DX(UIe(e,t));function VIe([e,t]){return[e,e>t?t+OP:t]}GIe.exports={locationToFeature:iHt,feature2polygons:aHt,getTraceGeojson:PX,extractTraceFeature:oHt,fetchTraceGeoData:lHt,boundsOfCoords:DX,computeBbox:uHt,coordsOf:FX,doesCrossAntiMeridian:LX,fitGeojsonBbox:fHt,fitGeojsonCoords:UIe,unwrapLonRange:VIe,ANTIMERIDIAN_LON_SHIFT:OP}});var RX=fe((n5r,WIe)=>{"use strict";var hHt=xi(),dHt=ea(),HIe=ni(),jIe=Ld(),vHt=jIe.stylePoints,pHt=jIe.styleText;WIe.exports=function(t,r){r&&gHt(t,r)};function gHt(e,t){var r=t[0].trace,n=t[0].node3;n.style("opacity",t[0].trace.opacity),vHt(n,r,e),pHt(n,r,e),n.selectAll("path.js-line").style("fill","none").each(function(a){var i=hHt.select(this),o=a.trace,s=o.line||{};i.call(HIe.stroke,s.color).call(dHt.dashLine,s.dash||"",s.width||0),o.fill!=="none"&&i.call(HIe.fill,o.fillcolor)})}});var VP=fe((i5r,ZIe)=>{"use strict";var YIe=xi(),NP=Xt(),mHt=EP().getTopojsonFeatures,IX=cM(),UP=Cg(),XIe=rp().findExtremes,qX=Wa().BADNUM,yHt=gv().calcMarkerSize,zX=Is(),xHt=RX();function _Ht(e,t,r){var n=t.layers.frontplot.select(".scatterlayer"),a=NP.makeTraceGroups(n,r,"trace scattergeo");function i(o,s){o.lonlat[0]===qX&&YIe.select(s).remove()}a.selectAll("*").remove(),a.each(function(o){var s=YIe.select(this),l=o[0].trace;if(zX.hasLines(l)||l.fill!=="none"){var u=IX.calcTraceToLineCoords(o),c=l.fill!=="none"?IX.makePolygon(u):IX.makeLine(u);s.selectAll("path.js-line").data([{geojson:c,trace:l}]).enter().append("path").classed("js-line",!0).style("stroke-miterlimit",2)}zX.hasMarkers(l)&&s.selectAll("path.point").data(NP.identity).enter().append("path").classed("point",!0).each(function(f){i(f,this)}),zX.hasText(l)&&s.selectAll("g").data(NP.identity).enter().append("g").append("text").each(function(f){i(f,this)}),xHt(e,o)})}function bHt(e,t){var r=e[0].trace,n=t[r.geo],a=n._subplot,i=r._length,o,s;if(NP.isArrayOrTypedArray(r.locations)){var l=r.locationmode,u=l==="geojson-id"?UP.extractTraceFeature(e):mHt(r,a.topojson);for(o=0;o{"use strict";var THt=kl(),AHt=Wa().BADNUM,MHt=_3(),SHt=Xt().fillText,EHt=a5();$Ie.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.xa,s=t.ya,l=t.subplot,u=l.projection.isLonLatOverEdges,c=l.project;function f(C){var k=C.lonlat;if(k[0]===AHt||u(k))return 1/0;var S=c(k),L=c([r,n]),w=Math.abs(S[0]-L[0]),A=Math.abs(S[1]-L[1]),T=Math.max(3,C.mrc||0);return Math.max(Math.sqrt(w*w+A*A)-T,1-3/T)}if(THt.getClosest(a,f,t),t.index!==!1){var v=a[t.index],g=v.lonlat,p=[o.c2p(g),s.c2p(g)],x=v.mrc||1;t.x0=p[0]-x,t.x1=p[0]+x,t.y0=p[1]-x,t.y1=p[1]+x,t.loc=v.loc,t.lon=g[0],t.lat=g[1];var _={};_[i.geo]={_subplot:l};var y=i._module.formatLabels(v,i,_);return t.lonLabel=y.lonLabel,t.latLabel=y.latLabel,t.color=MHt(i,v),t.extraText=kHt(i,v,t,a[0].t.labels),t.hovertemplate=i.hovertemplate,[t]}};function kHt(e,t,r,n){if(e.hovertemplate)return;var a=t.hi||e.hoverinfo,i=a==="all"?EHt.hoverinfo.flags:a.split("+"),o=i.indexOf("location")!==-1&&Array.isArray(e.locations),s=i.indexOf("lon")!==-1,l=i.indexOf("lat")!==-1,u=i.indexOf("text")!==-1,c=[];function f(v){return v+"\xB0"}return o?c.push(t.loc):s&&l?c.push("("+f(r.latLabel)+", "+f(r.lonLabel)+")"):s?c.push(n.lon+f(r.lonLabel)):l&&c.push(n.lat+f(r.latLabel)),u&&SHt(t,e,c),c.join("
")}});var QIe=fe((o5r,JIe)=>{"use strict";JIe.exports=function(t,r,n,a,i){t.lon=r.lon,t.lat=r.lat,t.location=r.loc?r.loc:null;var o=a[i];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t}});var rze=fe((s5r,tze)=>{"use strict";var eze=Is(),CHt=Wa().BADNUM;tze.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l,u,c,f,v,g=!eze.hasMarkers(s)&&!eze.hasText(s);if(g)return[];if(r===!1)for(v=0;v{(function(e,t){t(typeof GP=="object"&&typeof nze!="undefined"?GP:e.d3=e.d3||{})})(GP,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)<0?ie=me+1:le=me}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)>0?le=me:ie=me+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],me=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,me=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,me,be;if(ae==null){for(;++ie=le)for(me=be=le;++iele&&(me=le),be=le)for(me=be=le;++iele&&(me=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(me=Math.ceil(ae-ne+1));++le=0?(me>=L?10:me>=w?5:me>=A?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(me>=L?10:me>=w?5:me>=A?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),me=ie/le;return me>=L?le*=10:me>=w?le*=5:me>=A&&(le*=2),aeOe;)ze.pop(),--ct;var et=new Array(ct+1),qe;for(me=0;me<=ct;++me)qe=et[me]=[],qe.x0=me>0?ze[me-1]:it,qe.x1=me=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,me=Math.floor(le),be=+pe(ne[me],me,ne),De=+pe(ne[me+1],me+1,ne);return be+(De-be)*(le-me)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function V(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++ieme&&(me=le)}else for(;++ie=le)for(me=le;++ieme&&(me=le);return me}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,me,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)me[--le]=be[pe];return me}function J(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++iele&&(me=le)}else for(;++ie=le)for(me=le;++iele&&(me=le);return me}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,me,be=ne[le];for(ae==null&&(ae=t);++ie{(function(e,t){typeof HP=="object"&&typeof aze!="undefined"?t(HP,qP(),ize()):t(e.d3=e.d3||{},e.d3,e.d3)})(HP,(function(e,t,r){"use strict";var n=Math.abs,a=Math.atan,i=Math.atan2,o=Math.cos,s=Math.exp,l=Math.floor,u=Math.log,c=Math.max,f=Math.min,v=Math.pow,g=Math.round,p=Math.sign||function(Me){return Me>0?1:Me<0?-1:0},x=Math.sin,_=Math.tan,y=1e-6,C=1e-12,k=Math.PI,S=k/2,L=k/4,w=Math.SQRT1_2,A=O(2),T=O(k),m=k*2,F=180/k,E=k/180;function I(Me){return Me?Me/Math.sin(Me):1}function R(Me){return Me>1?S:Me<-1?-S:Math.asin(Me)}function B(Me){return Me>1?0:Me<-1?k:Math.acos(Me)}function O(Me){return Me>0?Math.sqrt(Me):0}function V(Me){return Me=s(2*Me),(Me-1)/(Me+1)}function j(Me){return(s(Me)-s(-Me))/2}function q(Me){return(s(Me)+s(-Me))/2}function U(Me){return u(Me+O(Me*Me+1))}function J(Me){return u(Me+O(Me*Me-1))}function ee(Me){var Ce=_(Me/2),Be=2*u(o(Me/2))/(Ce*Ce);function Ne(Qe,Je){var lt=o(Qe),Gt=o(Je),Zt=x(Je),Nt=Gt*lt,Kt=-((1-Nt?u((1+Nt)/2)/(1-Nt):-.5)+Be/(1+Nt));return[Kt*Gt*x(Qe),Kt*Zt]}return Ne.invert=function(Qe,Je){var lt=O(Qe*Qe+Je*Je),Gt=-Me/2,Zt=50,Nt;if(!lt)return[0,0];do{var Kt=Gt/2,ur=o(Kt),Sr=x(Kt),Br=Sr/ur,ln=-u(n(ur));Gt-=Nt=(2/Br*ln-Be*Br-lt)/(-ln/(Sr*Sr)+1-Be/(2*ur*ur))*(ur<0?.7:1)}while(n(Nt)>y&&--Zt>0);var wn=x(Gt);return[i(Qe*wn,lt*o(Gt)),R(Je*wn/lt)]},Ne}function ce(){var Me=S,Ce=t.geoProjectionMutator(ee),Be=Ce(Me);return Be.radius=function(Ne){return arguments.length?Ce(Me=Ne*E):Me*F},Be.scale(179.976).clipAngle(147)}function ye(Me,Ce){var Be=o(Ce),Ne=I(B(Be*o(Me/=2)));return[2*Be*x(Me)*Ne,x(Ce)*Ne]}ye.invert=function(Me,Ce){if(!(Me*Me+4*Ce*Ce>k*k+y)){var Be=Me,Ne=Ce,Qe=25;do{var Je=x(Be),lt=x(Be/2),Gt=o(Be/2),Zt=x(Ne),Nt=o(Ne),Kt=x(2*Ne),ur=Zt*Zt,Sr=Nt*Nt,Br=lt*lt,ln=1-Sr*Gt*Gt,wn=ln?B(Nt*Gt)*O(In=1/ln):In=0,In,gi=2*wn*Nt*lt-Me,Bi=wn*Zt-Ce,mi=In*(Sr*Br+wn*Nt*Gt*ur),ia=In*(.5*Je*Kt-wn*2*Zt*lt),ua=In*.25*(Kt*lt-wn*Zt*Sr*Je),lo=In*(ur*Gt+wn*Br*Nt),Bo=ia*ua-lo*mi;if(!Bo)break;var Ua=(Bi*ia-gi*lo)/Bo,ls=(gi*ua-Bi*mi)/Bo;Be-=Ua,Ne-=ls}while((n(Ua)>y||n(ls)>y)&&--Qe>0);return[Be,Ne]}};function xe(){return t.geoProjection(ye).scale(152.63)}function ue(Me){var Ce=x(Me),Be=o(Me),Ne=Me>=0?1:-1,Qe=_(Ne*Me),Je=(1+Ce-Be)/2;function lt(Gt,Zt){var Nt=o(Zt),Kt=o(Gt/=2);return[(1+Nt)*x(Gt),(Ne*Zt>-i(Kt,Qe)-.001?0:-Ne*10)+Je+x(Zt)*Be-(1+Nt)*Ce*Kt]}return lt.invert=function(Gt,Zt){var Nt=0,Kt=0,ur=50;do{var Sr=o(Nt),Br=x(Nt),ln=o(Kt),wn=x(Kt),In=1+ln,gi=In*Br-Gt,Bi=Je+wn*Be-In*Ce*Sr-Zt,mi=In*Sr/2,ia=-Br*wn,ua=Ce*In*Br/2,lo=Be*ln+Ce*Sr*wn,Bo=ia*ua-lo*mi,Ua=(Bi*ia-gi*lo)/Bo/2,ls=(gi*ua-Bi*mi)/Bo;n(ls)>2&&(ls/=2),Nt-=Ua,Kt-=ls}while((n(Ua)>y||n(ls)>y)&&--ur>0);return Ne*Kt>-i(o(Nt),Qe)-.001?[Nt*2,Kt]:null},lt}function K(){var Me=20*E,Ce=Me>=0?1:-1,Be=_(Ce*Me),Ne=t.geoProjectionMutator(ue),Qe=Ne(Me),Je=Qe.stream;return Qe.parallel=function(lt){return arguments.length?(Be=_((Ce=(Me=lt*E)>=0?1:-1)*Me),Ne(Me)):Me*F},Qe.stream=function(lt){var Gt=Qe.rotate(),Zt=Je(lt),Nt=(Qe.rotate([0,0]),Je(lt)),Kt=Qe.precision();return Qe.rotate(Gt),Zt.sphere=function(){Nt.polygonStart(),Nt.lineStart();for(var ur=Ce*-180;Ce*ur<180;ur+=Ce*90)Nt.point(ur,Ce*90);if(Me)for(;Ce*(ur-=3*Ce*Kt)>=-180;)Nt.point(ur,Ce*-i(o(ur*E/2),Be)*F);Nt.lineEnd(),Nt.polygonEnd()},Zt},Qe.scale(218.695).center([0,28.0974])}function _e(Me,Ce){var Be=_(Ce/2),Ne=O(1-Be*Be),Qe=1+Ne*o(Me/=2),Je=x(Me)*Ne/Qe,lt=Be/Qe,Gt=Je*Je,Zt=lt*lt;return[4/3*Je*(3+Gt-3*Zt),4/3*lt*(3+3*Gt-Zt)]}_e.invert=function(Me,Ce){if(Me*=3/8,Ce*=3/8,!Me&&n(Ce)>1)return null;var Be=Me*Me,Ne=Ce*Ce,Qe=1+Be+Ne,Je=O((Qe-O(Qe*Qe-4*Ce*Ce))/2),lt=R(Je)/3,Gt=Je?J(n(Ce/Je))/3:U(n(Me))/3,Zt=o(lt),Nt=q(Gt),Kt=Nt*Nt-Zt*Zt;return[p(Me)*2*i(j(Gt)*Zt,.25-Kt),p(Ce)*2*i(Nt*x(lt),.25+Kt)]};function ne(){return t.geoProjection(_e).scale(66.1603)}var ae=O(8),pe=u(1+A);function ie(Me,Ce){var Be=n(Ce);return BeC&&--Ne>0);return[Me/(o(Be)*(ae-1/x(Be))),p(Ce)*Be]};function le(){return t.geoProjection(ie).scale(112.314)}function me(Me){var Ce=2*k/Me;function Be(Ne,Qe){var Je=t.geoAzimuthalEquidistantRaw(Ne,Qe);if(n(Ne)>S){var lt=i(Je[1],Je[0]),Gt=O(Je[0]*Je[0]+Je[1]*Je[1]),Zt=Ce*g((lt-S)/Ce)+S,Nt=i(x(lt-=Zt),2-o(lt));lt=Zt+R(k/Gt*x(Nt))-Nt,Je[0]=Gt*o(lt),Je[1]=Gt*x(lt)}return Je}return Be.invert=function(Ne,Qe){var Je=O(Ne*Ne+Qe*Qe);if(Je>S){var lt=i(Qe,Ne),Gt=Ce*g((lt-S)/Ce)+S,Zt=lt>Gt?-1:1,Nt=Je*o(Gt-lt),Kt=1/_(Zt*B((Nt-k)/O(k*(k-2*Nt)+Je*Je)));lt=Gt+2*a((Kt+Zt*O(Kt*Kt-3))/3),Ne=Je*o(lt),Qe=Je*x(lt)}return t.geoAzimuthalEquidistantRaw.invert(Ne,Qe)},Be}function be(){var Me=5,Ce=t.geoProjectionMutator(me),Be=Ce(Me),Ne=Be.stream,Qe=.01,Je=-o(Qe*E),lt=x(Qe*E);return Be.lobes=function(Gt){return arguments.length?Ce(Me=+Gt):Me},Be.stream=function(Gt){var Zt=Be.rotate(),Nt=Ne(Gt),Kt=(Be.rotate([0,0]),Ne(Gt));return Be.rotate(Zt),Nt.sphere=function(){Kt.polygonStart(),Kt.lineStart();for(var ur=0,Sr=360/Me,Br=2*k/Me,ln=90-180/Me,wn=S;ur0&&n(Qe)>y);return Ne<0?NaN:Be}function Oe(Me,Ce,Be){return Ce===void 0&&(Ce=40),Be===void 0&&(Be=C),function(Ne,Qe,Je,lt){var Gt,Zt,Nt;Je=Je===void 0?0:+Je,lt=lt===void 0?0:+lt;for(var Kt=0;KtGt){Je-=Zt/=2,lt-=Nt/=2;continue}Gt=ln;var wn=(Je>0?-1:1)*Be,In=(lt>0?-1:1)*Be,gi=Me(Je+wn,lt),Bi=Me(Je,lt+In),mi=(gi[0]-ur[0])/wn,ia=(gi[1]-ur[1])/wn,ua=(Bi[0]-ur[0])/In,lo=(Bi[1]-ur[1])/In,Bo=lo*mi-ia*ua,Ua=(n(Bo)<.5?.5:1)/Bo;if(Zt=(Br*ua-Sr*lo)*Ua,Nt=(Sr*ia-Br*mi)*Ua,Je+=Zt,lt+=Nt,n(Zt)0&&(Gt[1]*=1+Zt/1.5*Gt[0]*Gt[0]),Gt}return Ne.invert=Oe(Ne),Ne}function ct(){return t.geoProjection(ze()).rotate([-16.5,-42]).scale(176.57).center([7.93,.09])}function et(Me,Ce){var Be=Me*x(Ce),Ne=30,Qe;do Ce-=Qe=(Ce+x(Ce)-Be)/(1+o(Ce));while(n(Qe)>y&&--Ne>0);return Ce/2}function qe(Me,Ce,Be){function Ne(Qe,Je){return[Me*Qe*o(Je=et(Be,Je)),Ce*x(Je)]}return Ne.invert=function(Qe,Je){return Je=R(Je/Ce),[Qe/(Me*o(Je)),R((2*Je+x(2*Je))/Be)]},Ne}var we=qe(A/S,A,k);function Le(){return t.geoProjection(we).scale(169.529)}var Ke=2.00276,Te=1.11072;function Ve(Me,Ce){var Be=et(k,Ce);return[Ke*Me/(1/o(Ce)+Te/o(Be)),(Ce+A*x(Be))/Ke]}Ve.invert=function(Me,Ce){var Be=Ke*Ce,Ne=Ce<0?-L:L,Qe=25,Je,lt;do lt=Be-A*x(Ne),Ne-=Je=(x(2*Ne)+2*Ne-k*x(lt))/(2*o(2*Ne)+2+k*o(lt)*A*o(Ne));while(n(Je)>y&&--Qe>0);return lt=Be-A*x(Ne),[Me*(1/o(lt)+Te/o(Ne))/Ke,lt]};function $e(){return t.geoProjection(Ve).scale(160.857)}function ot(Me){var Ce=0,Be=t.geoProjectionMutator(Me),Ne=Be(Ce);return Ne.parallel=function(Qe){return arguments.length?Be(Ce=Qe*E):Ce*F},Ne}function tt(Me,Ce){return[Me*o(Ce),Ce]}tt.invert=function(Me,Ce){return[Me/o(Ce),Ce]};function nt(){return t.geoProjection(tt).scale(152.63)}function We(Me){if(!Me)return tt;var Ce=1/_(Me);function Be(Ne,Qe){var Je=Ce+Me-Qe,lt=Je&&Ne*o(Qe)/Je;return[Je*x(lt),Ce-Je*o(lt)]}return Be.invert=function(Ne,Qe){var Je=O(Ne*Ne+(Qe=Ce-Qe)*Qe),lt=Ce+Me-Je;return[Je/o(lt)*i(Ne,Qe),lt]},Be}function mt(){return ot(We).scale(123.082).center([0,26.1441]).parallel(45)}function bt(Me){function Ce(Be,Ne){var Qe=S-Ne,Je=Qe&&Be*Me*x(Qe)/Qe;return[Qe*x(Je)/Me,S-Qe*o(Je)]}return Ce.invert=function(Be,Ne){var Qe=Be*Me,Je=S-Ne,lt=O(Qe*Qe+Je*Je),Gt=i(Qe,Je);return[(lt?lt/x(lt):1)*Gt/Me,S-lt]},Ce}function Yt(){var Me=.5,Ce=t.geoProjectionMutator(bt),Be=Ce(Me);return Be.fraction=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(158.837)}var jt=qe(1,4/k,k);function mr(){return t.geoProjection(jt).scale(152.63)}function or(Me,Ce,Be,Ne,Qe,Je){var lt=o(Je),Gt;if(n(Me)>1||n(Je)>1)Gt=B(Be*Qe+Ce*Ne*lt);else{var Zt=x(Me/2),Nt=x(Je/2);Gt=2*R(O(Zt*Zt+Ce*Ne*Nt*Nt))}return n(Gt)>y?[Gt,i(Ne*x(Je),Ce*Qe-Be*Ne*lt)]:[0,0]}function fr(Me,Ce,Be){return B((Me*Me+Ce*Ce-Be*Be)/(2*Me*Ce))}function Ot(Me){return Me-2*k*l((Me+k)/(2*k))}function cr(Me,Ce,Be){for(var Ne=[[Me[0],Me[1],x(Me[1]),o(Me[1])],[Ce[0],Ce[1],x(Ce[1]),o(Ce[1])],[Be[0],Be[1],x(Be[1]),o(Be[1])]],Qe=Ne[2],Je,lt=0;lt<3;++lt,Qe=Je)Je=Ne[lt],Qe.v=or(Je[1]-Qe[1],Qe[3],Qe[2],Je[3],Je[2],Je[0]-Qe[0]),Qe.point=[0,0];var Gt=fr(Ne[0].v[0],Ne[2].v[0],Ne[1].v[0]),Zt=fr(Ne[0].v[0],Ne[1].v[0],Ne[2].v[0]),Nt=k-Gt;Ne[2].point[1]=0,Ne[0].point[0]=-(Ne[1].point[0]=Ne[0].v[0]/2);var Kt=[Ne[2].point[0]=Ne[0].point[0]+Ne[2].v[0]*o(Gt),2*(Ne[0].point[1]=Ne[1].point[1]=Ne[2].v[0]*x(Gt))];function ur(Sr,Br){var ln=x(Br),wn=o(Br),In=new Array(3),gi;for(gi=0;gi<3;++gi){var Bi=Ne[gi];if(In[gi]=or(Br-Bi[1],Bi[3],Bi[2],wn,ln,Sr-Bi[0]),!In[gi][0])return Bi.point;In[gi][1]=Ot(In[gi][1]-Bi.v[1])}var mi=Kt.slice();for(gi=0;gi<3;++gi){var ia=gi==2?0:gi+1,ua=fr(Ne[gi].v[0],In[gi][0],In[ia][0]);In[gi][1]<0&&(ua=-ua),gi?gi==1?(ua=Zt-ua,mi[0]-=In[gi][0]*o(ua),mi[1]-=In[gi][0]*x(ua)):(ua=Nt-ua,mi[0]+=In[gi][0]*o(ua),mi[1]+=In[gi][0]*x(ua)):(mi[0]+=In[gi][0]*o(ua),mi[1]-=In[gi][0]*x(ua))}return mi[0]/=3,mi[1]/=3,mi}return ur}function Ct(Me){return Me[0]*=E,Me[1]*=E,Me}function wt(){return Tt([0,22],[45,22],[22.5,-22]).scale(380).center([22.5,2])}function Tt(Me,Ce,Be){var Ne=t.geoCentroid({type:"MultiPoint",coordinates:[Me,Ce,Be]}),Qe=[-Ne[0],-Ne[1]],Je=t.geoRotation(Qe),lt=cr(Ct(Je(Me)),Ct(Je(Ce)),Ct(Je(Be)));lt.invert=Oe(lt);var Gt=t.geoProjection(lt).rotate(Qe),Zt=Gt.center;return delete Gt.rotate,Gt.center=function(Nt){return arguments.length?Zt(Je(Nt)):Je.invert(Zt())},Gt.clipAngle(90)}function Mt(Me,Ce){var Be=O(1-x(Ce));return[2/T*Me*Be,T*(1-Be)]}Mt.invert=function(Me,Ce){var Be=(Be=Ce/T-1)*Be;return[Be>0?Me*O(k/Be)/2:0,R(1-Be)]};function Lt(){return t.geoProjection(Mt).scale(95.6464).center([0,30])}function ft(Me){var Ce=_(Me);function Be(Ne,Qe){return[Ne,(Ne?Ne/x(Ne):1)*(x(Qe)*o(Ne)-Ce*o(Qe))]}return Be.invert=Ce?function(Ne,Qe){Ne&&(Qe*=x(Ne)/Ne);var Je=o(Ne);return[Ne,2*i(O(Je*Je+Ce*Ce-Qe*Qe)-Je,Ce-Qe)]}:function(Ne,Qe){return[Ne,R(Ne?Qe*_(Ne)/Ne:Qe)]},Be}function kt(){return ot(ft).scale(249.828).clipAngle(90)}var rr=O(3);function pr(Me,Ce){return[rr*Me*(2*o(2*Ce/3)-1)/T,rr*T*x(Ce/3)]}pr.invert=function(Me,Ce){var Be=3*R(Ce/(rr*T));return[T*Me/(rr*(2*o(2*Be/3)-1)),Be]};function Kr(){return t.geoProjection(pr).scale(156.19)}function Nr(Me){var Ce=o(Me);function Be(Ne,Qe){return[Ne*Ce,x(Qe)/Ce]}return Be.invert=function(Ne,Qe){return[Ne/Ce,R(Qe*Ce)]},Be}function dn(){return ot(Nr).parallel(38.58).scale(195.044)}function xr(Me){var Ce=o(Me);function Be(Ne,Qe){return[Ne*Ce,(1+Ce)*_(Qe/2)]}return Be.invert=function(Ne,Qe){return[Ne/Ce,a(Qe/(1+Ce))*2]},Be}function Fr(){return ot(xr).scale(124.75)}function Zr(Me,Ce){var Be=O(8/(3*k));return[Be*Me*(1-n(Ce)/k),Be*Ce]}Zr.invert=function(Me,Ce){var Be=O(8/(3*k)),Ne=Ce/Be;return[Me/(Be*(1-n(Ne)/k)),Ne]};function Cn(){return t.geoProjection(Zr).scale(165.664)}function Dt(Me,Ce){var Be=O(4-3*x(n(Ce)));return[2/O(6*k)*Me*Be,p(Ce)*O(2*k/3)*(2-Be)]}Dt.invert=function(Me,Ce){var Be=2-n(Ce)/O(2*k/3);return[Me*O(6*k)/(2*Be),p(Ce)*R((4-Be*Be)/3)]};function At(){return t.geoProjection(Dt).scale(165.664)}function Vt(Me,Ce){var Be=O(k*(4+k));return[2/Be*Me*(1+O(1-4*Ce*Ce/(k*k))),4/Be*Ce]}Vt.invert=function(Me,Ce){var Be=O(k*(4+k))/2;return[Me*Be/(1+O(1-Ce*Ce*(4+k)/(4*k))),Ce*Be/2]};function Qt(){return t.geoProjection(Vt).scale(180.739)}function Ut(Me,Ce){var Be=(2+S)*x(Ce);Ce/=2;for(var Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;Ne++){var Je=o(Ce);Ce-=Qe=(Ce+x(Ce)*(Je+2)-Be)/(2*Je*(1+Je))}return[2/O(k*(4+k))*Me*(1+o(Ce)),2*O(k/(4+k))*x(Ce)]}Ut.invert=function(Me,Ce){var Be=Ce*O((4+k)/k)/2,Ne=R(Be),Qe=o(Ne);return[Me/(2/O(k*(4+k))*(1+Qe)),R((Ne+Be*(Qe+2))/(2+S))]};function _r(){return t.geoProjection(Ut).scale(180.739)}function rn(Me,Ce){return[Me*(1+o(Ce))/O(2+k),2*Ce/O(2+k)]}rn.invert=function(Me,Ce){var Be=O(2+k),Ne=Ce*Be/2;return[Be*Me/(1+o(Ne)),Ne]};function Jr(){return t.geoProjection(rn).scale(173.044)}function qn(Me,Ce){for(var Be=(1+S)*x(Ce),Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;Ne++)Ce-=Qe=(Ce+x(Ce)-Be)/(1+o(Ce));return Be=O(2+k),[Me*(1+o(Ce))/Be,2*Ce/Be]}qn.invert=function(Me,Ce){var Be=1+S,Ne=O(Be/2);return[Me*2*Ne/(1+o(Ce*=Ne)),R((Ce+x(Ce))/Be)]};function ri(){return t.geoProjection(qn).scale(173.044)}var Jn=3+2*A;function Ii(Me,Ce){var Be=x(Me/=2),Ne=o(Me),Qe=O(o(Ce)),Je=o(Ce/=2),lt=x(Ce)/(Je+A*Ne*Qe),Gt=O(2/(1+lt*lt)),Zt=O((A*Je+(Ne+Be)*Qe)/(A*Je+(Ne-Be)*Qe));return[Jn*(Gt*(Zt-1/Zt)-2*u(Zt)),Jn*(Gt*lt*(Zt+1/Zt)-2*a(lt))]}Ii.invert=function(Me,Ce){if(!(Je=_e.invert(Me/1.2,Ce*1.065)))return null;var Be=Je[0],Ne=Je[1],Qe=20,Je;Me/=Jn,Ce/=Jn;do{var lt=Be/2,Gt=Ne/2,Zt=x(lt),Nt=o(lt),Kt=x(Gt),ur=o(Gt),Sr=o(Ne),Br=O(Sr),ln=Kt/(ur+A*Nt*Br),wn=ln*ln,In=O(2/(1+wn)),gi=A*ur+(Nt+Zt)*Br,Bi=A*ur+(Nt-Zt)*Br,mi=gi/Bi,ia=O(mi),ua=ia-1/ia,lo=ia+1/ia,Bo=In*ua-2*u(ia)-Me,Ua=In*ln*lo-2*a(ln)-Ce,ls=Kt&&w*Br*Zt*wn/Kt,cl=(A*Nt*ur+Br)/(2*(ur+A*Nt*Br)*(ur+A*Nt*Br)*Br),Eu=-.5*ln*In*In*In,el=Eu*ls,yc=Eu*cl,wi=(wi=2*ur+A*Br*(Nt-Zt))*wi*ia,Di=(A*Nt*ur*Br+Sr)/wi,fl=-(A*Zt*Kt)/(Br*wi),Fc=ua*el-2*Di/ia+In*(Di+Di/mi),du=ua*yc-2*fl/ia+In*(fl+fl/mi),ms=ln*lo*el-2*ls/(1+wn)+In*lo*ls+In*ln*(Di-Di/mi),ff=ln*lo*yc-2*cl/(1+wn)+In*lo*cl+In*ln*(fl-fl/mi),ku=du*ms-ff*Fc;if(!ku)break;var hl=(Ua*du-Bo*ff)/ku,mh=(Bo*ms-Ua*Fc)/ku;Be-=hl,Ne=c(-S,f(S,Ne-mh))}while((n(hl)>y||n(mh)>y)&&--Qe>0);return n(n(Ne)-S)Ne){var ur=O(Kt),Sr=i(Nt,Zt),Br=Be*g(Sr/Be),ln=Sr-Br,wn=Me*o(ln),In=(Me*x(ln)-ln*x(wn))/(S-wn),gi=ao(ln,In),Bi=(k-Me)/Da(gi,wn,k);Zt=ur;var mi=50,ia;do Zt-=ia=(Me+Da(gi,wn,Zt)*Bi-ur)/(gi(Zt)*Bi);while(n(ia)>y&&--mi>0);Nt=ln*x(Zt),ZtNe){var Zt=O(Gt),Nt=i(lt,Je),Kt=Be*g(Nt/Be),ur=Nt-Kt;Je=Zt*o(ur),lt=Zt*x(ur);for(var Sr=Je-S,Br=x(Je),ln=lt/Br,wn=Jey||n(ln)>y)&&--wn>0);return[ur,Sr]},Zt}var Zs=bo(2.8284,-1.6988,.75432,-.18071,1.76003,-.38914,.042555);function su(){return t.geoProjection(Zs).scale(149.995)}var fc=bo(2.583819,-.835827,.170354,-.038094,1.543313,-.411435,.082742);function Af(){return t.geoProjection(fc).scale(153.93)}var ut=bo(5/6*k,-.62636,-.0344,0,1.3493,-.05524,0,.045);function Jt(){return t.geoProjection(ut).scale(130.945)}function er(Me,Ce){var Be=Me*Me,Ne=Ce*Ce;return[Me*(1-.162388*Ne)*(.87-952426e-9*Be*Be),Ce*(1+Ne/12)]}er.invert=function(Me,Ce){var Be=Me,Ne=Ce,Qe=50,Je;do{var lt=Ne*Ne;Ne-=Je=(Ne*(1+lt/12)-Ce)/(1+lt/4)}while(n(Je)>y&&--Qe>0);Qe=50,Me/=1-.162388*lt;do{var Gt=(Gt=Be*Be)*Gt;Be-=Je=(Be*(.87-952426e-9*Gt)-Me)/(.87-.00476213*Gt)}while(n(Je)>y&&--Qe>0);return[Be,Ne]};function wr(){return t.geoProjection(er).scale(131.747)}var nn=bo(2.6516,-.76534,.19123,-.047094,1.36289,-.13965,.031762);function Dr(){return t.geoProjection(nn).scale(131.087)}function bn(Me){var Ce=Me(S,0)[0]-Me(-S,0)[0];function Be(Ne,Qe){var Je=Ne>0?-.5:.5,lt=Me(Ne+Je*k,Qe);return lt[0]-=Je*Ce,lt}return Me.invert&&(Be.invert=function(Ne,Qe){var Je=Ne>0?-.5:.5,lt=Me.invert(Ne+Je*Ce,Qe),Gt=lt[0]-Je*k;return Gt<-k?Gt+=2*k:Gt>k&&(Gt-=2*k),lt[0]=Gt,lt}),Be}function Yr(Me,Ce){var Be=p(Me),Ne=p(Ce),Qe=o(Ce),Je=o(Me)*Qe,lt=x(Me)*Qe,Gt=x(Ne*Ce);Me=n(i(lt,Gt)),Ce=R(Je),n(Me-S)>y&&(Me%=S);var Zt=Tn(Me>k/4?S-Me:Me,Ce);return Me>k/4&&(Gt=Zt[0],Zt[0]=-Zt[1],Zt[1]=-Gt),Zt[0]*=Be,Zt[1]*=-Ne,Zt}Yr.invert=function(Me,Ce){n(Me)>1&&(Me=p(Me)*2-Me),n(Ce)>1&&(Ce=p(Ce)*2-Ce);var Be=p(Me),Ne=p(Ce),Qe=-Be*Me,Je=-Ne*Ce,lt=Je/Qe<1,Gt=Kn(lt?Je:Qe,lt?Qe:Je),Zt=Gt[0],Nt=Gt[1],Kt=o(Nt);return lt&&(Zt=-S-Zt),[Be*(i(x(Zt)*Kt,-x(Nt))+k),Ne*R(o(Zt)*Kt)]};function Tn(Me,Ce){if(Ce===S)return[0,0];var Be=x(Ce),Ne=Be*Be,Qe=Ne*Ne,Je=1+Qe,lt=1+3*Qe,Gt=1-Qe,Zt=R(1/O(Je)),Nt=Gt+Ne*Je*Zt,Kt=(1-Be)/Nt,ur=O(Kt),Sr=Kt*Je,Br=O(Sr),ln=ur*Gt,wn,In;if(Me===0)return[0,-(ln+Ne*Br)];var gi=o(Ce),Bi=1/gi,mi=2*Be*gi,ia=(-3*Ne+Zt*lt)*mi,ua=(-Nt*gi-(1-Be)*ia)/(Nt*Nt),lo=.5*ua/ur,Bo=Gt*lo-2*Ne*ur*mi,Ua=Ne*Je*ua+Kt*lt*mi,ls=-Bi*mi,cl=-Bi*Ua,Eu=-2*Bi*Bo,el=4*Me/k,yc;if(Me>.222*k||Ce.175*k){if(wn=(ln+Ne*O(Sr*(1+Qe)-ln*ln))/(1+Qe),Me>k/4)return[wn,wn];var wi=wn,Di=.5*wn;wn=.5*(Di+wi),In=50;do{var fl=O(Sr-wn*wn),Fc=wn*(Eu+ls*fl)+cl*R(wn/Br)-el;if(!Fc)break;Fc<0?Di=wn:wi=wn,wn=.5*(Di+wi)}while(n(wi-Di)>y&&--In>0)}else{wn=y,In=25;do{var du=wn*wn,ms=O(Sr-du),ff=Eu+ls*ms,ku=wn*ff+cl*R(wn/Br)-el,hl=ff+(cl-ls*du)/ms;wn-=yc=ms?ku/hl:0}while(n(yc)>y&&--In>0)}return[wn,-ln-Ne*O(Sr-wn*wn)]}function Kn(Me,Ce){for(var Be=0,Ne=1,Qe=.5,Je=50;;){var lt=Qe*Qe,Gt=O(Qe),Zt=R(1/O(1+lt)),Nt=1-lt+Qe*(1+lt)*Zt,Kt=(1-Gt)/Nt,ur=O(Kt),Sr=Kt*(1+lt),Br=ur*(1-lt),ln=Sr-Me*Me,wn=O(ln),In=Ce+Br+Qe*wn;if(n(Ne-Be)0?Be=Qe:Ne=Qe,Qe=.5*(Be+Ne)}if(!Je)return null;var gi=R(Gt),Bi=o(gi),mi=1/Bi,ia=2*Gt*Bi,ua=(-3*Qe+Zt*(1+3*lt))*ia,lo=(-Nt*Bi-(1-Gt)*ua)/(Nt*Nt),Bo=.5*lo/ur,Ua=(1-lt)*Bo-2*Qe*ur*ia,ls=-2*mi*Ua,cl=-mi*ia,Eu=-mi*(Qe*(1+lt)*lo+Kt*(1+3*lt)*ia);return[k/4*(Me*(ls+cl*wn)+Eu*R(Me/O(Sr))),gi]}function Qn(){return t.geoProjection(bn(Yr)).scale(239.75)}function Ai(Me,Ce,Be){var Ne,Qe,Je;return Me?(Ne=Ji(Me,Be),Ce?(Qe=Ji(Ce,1-Be),Je=Qe[1]*Qe[1]+Be*Ne[0]*Ne[0]*Qe[0]*Qe[0],[[Ne[0]*Qe[2]/Je,Ne[1]*Ne[2]*Qe[0]*Qe[1]/Je],[Ne[1]*Qe[1]/Je,-Ne[0]*Ne[2]*Qe[0]*Qe[2]/Je],[Ne[2]*Qe[1]*Qe[2]/Je,-Be*Ne[0]*Ne[1]*Qe[0]/Je]]):[[Ne[0],0],[Ne[1],0],[Ne[2],0]]):(Qe=Ji(Ce,1-Be),[[0,Qe[0]/Qe[1]],[1/Qe[1],0],[Qe[2]/Qe[1],0]])}function Ji(Me,Ce){var Be,Ne,Qe,Je,lt;if(Ce=1-y)return Be=(1-Ce)/4,Ne=q(Me),Je=V(Me),Qe=1/Ne,lt=Ne*j(Me),[Je+Be*(lt-Me)/(Ne*Ne),Qe-Be*Je*Qe*(lt-Me),Qe+Be*Je*Qe*(lt+Me),2*a(s(Me))-S+Be*(lt-Me)/Ne];var Gt=[1,0,0,0,0,0,0,0,0],Zt=[O(Ce),0,0,0,0,0,0,0,0],Nt=0;for(Ne=O(1-Ce),lt=1;n(Zt[Nt]/Gt[Nt])>y&&Nt<8;)Be=Gt[Nt++],Zt[Nt]=(Be-Ne)/2,Gt[Nt]=(Be+Ne)/2,Ne=O(Be*Ne),lt*=2;Qe=lt*Gt[Nt]*Me;do Je=Zt[Nt]*x(Ne=Qe)/Gt[Nt],Qe=(R(Je)+Qe)/2;while(--Nt);return[x(Qe),Je=o(Qe),Je/o(Qe-Ne),Qe]}function Ra(Me,Ce,Be){var Ne=n(Me),Qe=n(Ce),Je=j(Qe);if(Ne){var lt=1/x(Ne),Gt=1/(_(Ne)*_(Ne)),Zt=-(Gt+Be*(Je*Je*lt*lt)-1+Be),Nt=(Be-1)*Gt,Kt=(-Zt+O(Zt*Zt-4*Nt))/2;return[ii(a(1/O(Kt)),Be)*p(Me),ii(a(O((Kt/Gt-1)/Be)),1-Be)*p(Ce)]}return[0,ii(a(Je),1-Be)*p(Ce)]}function ii(Me,Ce){if(!Ce)return Me;if(Ce===1)return u(_(Me/2+L));for(var Be=1,Ne=O(1-Ce),Qe=O(Ce),Je=0;n(Qe)>y;Je++){if(Me%k){var lt=a(Ne*_(Me)/Be);lt<0&&(lt+=k),Me+=lt+~~(Me/k)*k}else Me+=Me;Qe=(Be+Ne)/2,Ne=O(Be*Ne),Qe=((Be=Qe)-Ne)/2}return Me/(v(2,Je)*Be)}function Za(Me,Ce){var Be=(A-1)/(A+1),Ne=O(1-Be*Be),Qe=ii(S,Ne*Ne),Je=-1,lt=u(_(k/4+n(Ce)/2)),Gt=s(Je*lt)/O(Be),Zt=ja(Gt*o(Je*Me),Gt*x(Je*Me)),Nt=Ra(Zt[0],Zt[1],Ne*Ne);return[-Nt[1],(Ce>=0?1:-1)*(.5*Qe-Nt[0])]}function ja(Me,Ce){var Be=Me*Me,Ne=Ce+1,Qe=1-Be-Ce*Ce;return[.5*((Me>=0?S:-S)-i(Qe,2*Me)),-.25*u(Qe*Qe+4*Be)+.5*u(Ne*Ne+Be)]}function qo(Me,Ce){var Be=Ce[0]*Ce[0]+Ce[1]*Ce[1];return[(Me[0]*Ce[0]+Me[1]*Ce[1])/Be,(Me[1]*Ce[0]-Me[0]*Ce[1])/Be]}Za.invert=function(Me,Ce){var Be=(A-1)/(A+1),Ne=O(1-Be*Be),Qe=ii(S,Ne*Ne),Je=-1,lt=Ai(.5*Qe-Ce,-Me,Ne*Ne),Gt=qo(lt[0],lt[1]),Zt=i(Gt[1],Gt[0])/Je;return[Zt,2*a(s(.5/Je*u(Be*Gt[0]*Gt[0]+Be*Gt[1]*Gt[1])))-S]};function $a(){return t.geoProjection(bn(Za)).scale(151.496)}function Ka(Me){var Ce=x(Me),Be=o(Me),Ne=Oa(Me);Ne.invert=Oa(-Me);function Qe(Je,lt){var Gt=Ne(Je,lt);Je=Gt[0],lt=Gt[1];var Zt=x(lt),Nt=o(lt),Kt=o(Je),ur=B(Ce*Zt+Be*Nt*Kt),Sr=x(ur),Br=n(Sr)>y?ur/Sr:1;return[Br*Be*x(Je),(n(Je)>S?Br:-Br)*(Ce*Nt-Be*Zt*Kt)]}return Qe.invert=function(Je,lt){var Gt=O(Je*Je+lt*lt),Zt=-x(Gt),Nt=o(Gt),Kt=Gt*Nt,ur=-lt*Zt,Sr=Gt*Ce,Br=O(Kt*Kt+ur*ur-Sr*Sr),ln=i(Kt*Sr+ur*Br,ur*Sr-Kt*Br),wn=(Gt>S?-1:1)*i(Je*Zt,Gt*o(ln)*Nt+lt*x(ln)*Zt);return Ne.invert(wn,ln)},Qe}function Oa(Me){var Ce=x(Me),Be=o(Me);return function(Ne,Qe){var Je=o(Qe),lt=o(Ne)*Je,Gt=x(Ne)*Je,Zt=x(Qe);return[i(Gt,lt*Be-Zt*Ce),R(Zt*Be+lt*Ce)]}}function Ni(){var Me=0,Ce=t.geoProjectionMutator(Ka),Be=Ce(Me),Ne=Be.rotate,Qe=Be.stream,Je=t.geoCircle();return Be.parallel=function(lt){if(!arguments.length)return Me*F;var Gt=Be.rotate();return Ce(Me=lt*E).rotate(Gt)},Be.rotate=function(lt){return arguments.length?(Ne.call(Be,[lt[0],lt[1]-Me*F]),Je.center([-lt[0],-lt[1]]),Be):(lt=Ne.call(Be),lt[1]+=Me*F,lt)},Be.stream=function(lt){return lt=Qe(lt),lt.sphere=function(){lt.polygonStart();var Gt=.01,Zt=Je.radius(90-Gt)().coordinates[0],Nt=Zt.length-1,Kt=-1,ur;for(lt.lineStart();++Kt=0;)lt.point((ur=Zt[Kt])[0],ur[1]);lt.lineEnd(),lt.polygonEnd()},lt},Be.scale(79.4187).parallel(45).clipAngle(180-.001)}var ka=3,vs=R(1-1/ka)*F,yo=Nr(0);function so(Me){var Ce=vs*E,Be=Mt(k,Ce)[0]-Mt(-k,Ce)[0],Ne=yo(0,Ce)[1],Qe=Mt(0,Ce)[1],Je=T-Qe,lt=m/Me,Gt=4/m,Zt=Ne+Je*Je*4/m;function Nt(Kt,ur){var Sr,Br=n(ur);if(Br>Ce){var ln=f(Me-1,c(0,l((Kt+k)/lt)));Kt+=k*(Me-1)/Me-ln*lt,Sr=Mt(Kt,Br),Sr[0]=Sr[0]*m/Be-m*(Me-1)/(2*Me)+ln*m/Me,Sr[1]=Ne+(Sr[1]-Qe)*4*Je/m,ur<0&&(Sr[1]=-Sr[1])}else Sr=yo(Kt,ur);return Sr[0]*=Gt,Sr[1]/=Zt,Sr}return Nt.invert=function(Kt,ur){Kt/=Gt,ur*=Zt;var Sr=n(ur);if(Sr>Ne){var Br=f(Me-1,c(0,l((Kt+k)/lt)));Kt=(Kt+k*(Me-1)/Me-Br*lt)*Be/m;var ln=Mt.invert(Kt,.25*(Sr-Ne)*m/Je+Qe);return ln[0]-=k*(Me-1)/Me-Br*lt,ur<0&&(ln[1]=-ln[1]),ln}return yo.invert(Kt,ur)},Nt}function oo(Me,Ce){return[Me,Ce&1?90-y:vs]}function ko(Me,Ce){return[Me,Ce&1?-90+y:-vs]}function pa(Me){return[Me[0]*(1-y),Me[1]]}function la(Me){var Ce=[].concat(r.range(-180,180+Me/2,Me).map(oo),r.range(180,-180-Me/2,-Me).map(ko));return{type:"Polygon",coordinates:[Me===180?Ce.map(pa):Ce]}}function As(){var Me=4,Ce=t.geoProjectionMutator(so),Be=Ce(Me),Ne=Be.stream;return Be.lobes=function(Qe){return arguments.length?Ce(Me=+Qe):Me},Be.stream=function(Qe){var Je=Be.rotate(),lt=Ne(Qe),Gt=(Be.rotate([0,0]),Ne(Qe));return Be.rotate(Je),lt.sphere=function(){t.geoStream(la(180/Me),Gt)},lt},Be.scale(239.75)}function Ms(Me){var Ce=1+Me,Be=x(1/Ce),Ne=R(Be),Qe=2*O(k/(Je=k+4*Ne*Ce)),Je,lt=.5*Qe*(Ce+O(Me*(2+Me))),Gt=Me*Me,Zt=Ce*Ce;function Nt(Kt,ur){var Sr=1-x(ur),Br,ln;if(Sr&&Sr<2){var wn=S-ur,In=25,gi;do{var Bi=x(wn),mi=o(wn),ia=Ne+i(Bi,Ce-mi),ua=1+Zt-2*Ce*mi;wn-=gi=(wn-Gt*Ne-Ce*Bi+ua*ia-.5*Sr*Je)/(2*Ce*Bi*ia)}while(n(gi)>C&&--In>0);Br=Qe*O(ua),ln=Kt*ia/k}else Br=Qe*(Me+Sr),ln=Kt*Ne/k;return[Br*x(ln),lt-Br*o(ln)]}return Nt.invert=function(Kt,ur){var Sr=Kt*Kt+(ur-=lt)*ur,Br=(1+Zt-Sr/(Qe*Qe))/(2*Ce),ln=B(Br),wn=x(ln),In=Ne+i(wn,Ce-Br);return[R(Kt/O(Sr))*k/In,R(1-2*(ln-Gt*Ne-Ce*wn+(1+Zt-2*Ce*Br)*In)/Je)]},Nt}function xu(){var Me=1,Ce=t.geoProjectionMutator(Ms),Be=Ce(Me);return Be.ratio=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(167.774).center([0,18.67])}var rs=.7109889596207567,Ls=.0528035274542;function $s(Me,Ce){return Ce>-rs?(Me=we(Me,Ce),Me[1]+=Ls,Me):tt(Me,Ce)}$s.invert=function(Me,Ce){return Ce>-rs?we.invert(Me,Ce-Ls):tt.invert(Me,Ce)};function Kc(){return t.geoProjection($s).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}function _u(Me,Ce){return n(Ce)>rs?(Me=we(Me,Ce),Me[1]-=Ce>0?Ls:-Ls,Me):tt(Me,Ce)}_u.invert=function(Me,Ce){return n(Ce)>rs?we.invert(Me,Ce+(Ce>0?Ls:-Ls)):tt.invert(Me,Ce)};function Gu(){return t.geoProjection(_u).scale(152.63)}function Ja(Me,Ce,Be,Ne){var Qe=O(4*k/(2*Be+(1+Me-Ce/2)*x(2*Be)+(Me+Ce)/2*x(4*Be)+Ce/2*x(6*Be))),Je=O(Ne*x(Be)*O((1+Me*o(2*Be)+Ce*o(4*Be))/(1+Me+Ce))),lt=Be*Zt(1);function Gt(ur){return O(1+Me*o(2*ur)+Ce*o(4*ur))}function Zt(ur){var Sr=ur*Be;return(2*Sr+(1+Me-Ce/2)*x(2*Sr)+(Me+Ce)/2*x(4*Sr)+Ce/2*x(6*Sr))/Be}function Nt(ur){return Gt(ur)*x(ur)}var Kt=function(ur,Sr){var Br=Be*it(Zt,lt*x(Sr)/Be,Sr/k);isNaN(Br)&&(Br=Be*p(Sr));var ln=Qe*Gt(Br);return[ln*Je*ur/k*o(Br),ln/Je*x(Br)]};return Kt.invert=function(ur,Sr){var Br=it(Nt,Sr*Je/Qe);return[ur*k/(o(Br)*Qe*Je*Gt(Br)),R(Be*Zt(Br/Be)/lt)]},Be===0&&(Qe=O(Ne/k),Kt=function(ur,Sr){return[ur*Qe,x(Sr)/Qe]},Kt.invert=function(ur,Sr){return[ur/Qe,R(Sr*Qe)]}),Kt}function ps(){var Me=1,Ce=0,Be=45*E,Ne=2,Qe=t.geoProjectionMutator(Ja),Je=Qe(Me,Ce,Be,Ne);return Je.a=function(lt){return arguments.length?Qe(Me=+lt,Ce,Be,Ne):Me},Je.b=function(lt){return arguments.length?Qe(Me,Ce=+lt,Be,Ne):Ce},Je.psiMax=function(lt){return arguments.length?Qe(Me,Ce,Be=+lt*E,Ne):Be*F},Je.ratio=function(lt){return arguments.length?Qe(Me,Ce,Be,Ne=+lt):Ne},Je.scale(180.739)}function Sa(Me,Ce,Be,Ne,Qe,Je,lt,Gt,Zt,Nt,Kt){if(Kt.nanEncountered)return NaN;var ur,Sr,Br,ln,wn,In,gi,Bi,mi,ia;if(ur=Be-Ce,Sr=Me(Ce+ur*.25),Br=Me(Be-ur*.25),isNaN(Sr)){Kt.nanEncountered=!0;return}if(isNaN(Br)){Kt.nanEncountered=!0;return}return ln=ur*(Ne+4*Sr+Qe)/12,wn=ur*(Qe+4*Br+Je)/12,In=ln+wn,ia=(In-lt)/15,Nt>Zt?(Kt.maxDepthCount++,In+ia):Math.abs(ia)>1;do Zt[In]>Br?wn=In:ln=In,In=ln+wn>>1;while(In>ln);var gi=Zt[In+1]-Zt[In];return gi&&(gi=(Br-Zt[In+1])/gi),(In+1+gi)/lt}var ur=2*Kt(1)/k*Je/Be,Sr=function(Br,ln){var wn=Kt(n(x(ln))),In=Ne(wn)*Br;return wn/=ur,[In,ln>=0?wn:-wn]};return Sr.invert=function(Br,ln){var wn;return ln*=ur,n(ln)<1&&(wn=p(ln)*R(Qe(n(ln))*Je)),[Br/Ne(n(ln)),wn]},Sr}function Ca(){var Me=0,Ce=2.5,Be=1.183136,Ne=t.geoProjectionMutator(Ps),Qe=Ne(Me,Ce,Be);return Qe.alpha=function(Je){return arguments.length?Ne(Me=+Je,Ce,Be):Me},Qe.k=function(Je){return arguments.length?Ne(Me,Ce=+Je,Be):Ce},Qe.gamma=function(Je){return arguments.length?Ne(Me,Ce,Be=+Je):Be},Qe.scale(152.63)}function Pl(Me,Ce){return n(Me[0]-Ce[0])=0;--Zt)Be=Me[1][Zt],Ne=Be[0][0],Qe=Be[0][1],Je=Be[1][1],lt=Be[2][0],Gt=Be[2][1],Ce.push(ll([[lt-y,Gt-y],[lt-y,Je+y],[Ne+y,Je+y],[Ne+y,Qe-y]],30));return{type:"Polygon",coordinates:[r.merge(Ce)]}}function lu(Me,Ce,Be){var Ne,Qe;function Je(Zt,Nt){for(var Kt=Nt<0?-1:1,ur=Ce[+(Nt<0)],Sr=0,Br=ur.length-1;Srur[Sr][2][0];++Sr);var ln=Me(Zt-ur[Sr][1][0],Nt);return ln[0]+=Me(ur[Sr][1][0],Kt*Nt>Kt*ur[Sr][0][1]?ur[Sr][0][1]:Nt)[0],ln}Be?Je.invert=Be(Je):Me.invert&&(Je.invert=function(Zt,Nt){for(var Kt=Qe[+(Nt<0)],ur=Ce[+(Nt<0)],Sr=0,Br=Kt.length;Srln&&(wn=Br,Br=ln,ln=wn),[[ur,Br],[Sr,ln]]})}),lt):Ce.map(function(Nt){return Nt.map(function(Kt){return[[Kt[0][0]*F,Kt[0][1]*F],[Kt[1][0]*F,Kt[1][1]*F],[Kt[2][0]*F,Kt[2][1]*F]]})})},Ce!=null&<.lobes(Ce),lt}var Mf=[[[[-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 Bd(){return lu(Ve,Mf).scale(160.857)}var Hu=[[[[-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 Sf(){return lu(_u,Hu).scale(152.63)}var kc=[[[[-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 Uo(){return lu(we,kc).scale(169.529)}var ns=[[[[-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 Ks(){return lu(we,ns).scale(169.529).rotate([20,0])}var Ef=[[[[-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 ju(){return lu($s,Ef,Oe).rotate([-20,-55]).scale(164.263).center([0,-5.4036])}var gs=[[[[-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 bu(){return lu(tt,gs).scale(152.63).rotate([-20,0])}function kf(Me,Ce){return[3/m*Me*O(k*k/3-Ce*Ce),Ce]}kf.invert=function(Me,Ce){return[m/3*Me/O(k*k/3-Ce*Ce),Ce]};function ah(){return t.geoProjection(kf).scale(158.837)}function Od(Me){function Ce(Be,Ne){if(n(n(Ne)-S)2)return null;Be/=2,Ne/=2;var Je=Be*Be,lt=Ne*Ne,Gt=2*Ne/(1+Je+lt);return Gt=v((1+Gt)/(1-Gt),1/Me),[i(2*Be,1-Je-lt)/Me,R((Gt-1)/(Gt+1))]},Ce}function Qc(){var Me=.5,Ce=t.geoProjectionMutator(Od),Be=Ce(Me);return Be.spacing=function(Ne){return arguments.length?Ce(Me=+Ne):Me},Be.scale(124.75)}var uu=k/A;function oh(Me,Ce){return[Me*(1+O(o(Ce)))/2,Ce/(o(Ce/2)*o(Me/6))]}oh.invert=function(Me,Ce){var Be=n(Me),Ne=n(Ce),Qe=y,Je=S;Ney||n(In)>y)&&--Qe>0);return Qe&&[Be,Ne]};function Yo(){return t.geoProjection(Fl).scale(139.98)}function Ro(Me,Ce){return[x(Me)/o(Ce),_(Ce)*o(Me)]}Ro.invert=function(Me,Ce){var Be=Me*Me,Ne=Ce*Ce,Qe=Ne+1,Je=Be+Qe,lt=Me?w*O((Je-O(Je*Je-4*Be))/Be):1/O(Qe);return[R(Me*lt),p(Ce)*B(lt)]};function is(){return t.geoProjection(Ro).scale(144.049).clipAngle(90-.001)}function Dl(Me){var Ce=o(Me),Be=_(L+Me/2);function Ne(Qe,Je){var lt=Je-Me,Gt=n(lt)=0;)Kt=Me[Nt],ur=Kt[0]+Gt*(Br=ur)-Zt*Sr,Sr=Kt[1]+Gt*Sr+Zt*Br;return ur=Gt*(Br=ur)-Zt*Sr,Sr=Gt*Sr+Zt*Br,[ur,Sr]}return Be.invert=function(Ne,Qe){var Je=20,lt=Ne,Gt=Qe;do{for(var Zt=Ce,Nt=Me[Zt],Kt=Nt[0],ur=Nt[1],Sr=0,Br=0,ln;--Zt>=0;)Nt=Me[Zt],Sr=Kt+lt*(ln=Sr)-Gt*Br,Br=ur+lt*Br+Gt*ln,Kt=Nt[0]+lt*(ln=Kt)-Gt*ur,ur=Nt[1]+lt*ur+Gt*ln;Sr=Kt+lt*(ln=Sr)-Gt*Br,Br=ur+lt*Br+Gt*ln,Kt=lt*(ln=Kt)-Gt*ur-Ne,ur=lt*ur+Gt*ln-Qe;var wn=Sr*Sr+Br*Br,In,gi;lt-=In=(Kt*Sr+ur*Br)/wn,Gt-=gi=(ur*Sr-Kt*Br)/wn}while(n(In)+n(gi)>y*y&&--Je>0);if(Je){var Bi=O(lt*lt+Gt*Gt),mi=2*a(Bi*.5),ia=x(mi);return[i(lt*ia,Bi*o(mi)),Bi?R(Gt*ia/Bi):0]}},Be}var Y0=[[.9972523,0],[.0052513,-.0041175],[.0074606,.0048125],[-.0153783,-.1968253],[.0636871,-.1408027],[.3660976,-.2937382]],Nd=[[.98879,0],[0,0],[-.050909,0],[0,0],[.075528,0]],Cf=[[.984299,0],[.0211642,.0037608],[-.1036018,-.0575102],[-.0329095,-.0320119],[.0499471,.1223335],[.026046,.0899805],[7388e-7,-.1435792],[.0075848,-.1334108],[-.0216473,.0776645],[-.0225161,.0853673]],Vo=[[.9245,0],[0,0],[.01943,0]],Ud=[[.721316,0],[0,0],[-.00881625,-.00617325]];function zh(){return vc(Y0,[152,-64]).scale(1400).center([-160.908,62.4864]).clipAngle(30).angle(7.8)}function tf(){return vc(Nd,[95,-38]).scale(1e3).clipAngle(55).center([-96.5563,38.8675])}function Vd(){return vc(Cf,[120,-45]).scale(359.513).clipAngle(55).center([-117.474,53.0628])}function rf(){return vc(Vo,[-20,-18]).scale(209.091).center([20,16.7214]).clipAngle(82)}function qh(){return vc(Ud,[165,10]).scale(250).clipAngle(130).center([-165,-10])}function vc(Me,Ce){var Be=t.geoProjection(sh(Me)).rotate(Ce).clipAngle(90),Ne=t.geoRotation(Ce),Qe=Be.center;return delete Be.rotate,Be.center=function(Je){return arguments.length?Qe(Ne(Je)):Ne.invert(Qe())},Be}var dd=O(6),Bh=O(7);function Wu(Me,Ce){var Be=R(7*x(Ce)/(3*dd));return[dd*Me*(2*o(2*Be/3)-1)/Bh,9*x(Be/3)/Bh]}Wu.invert=function(Me,Ce){var Be=3*R(Ce*Bh/9);return[Me*Bh/(dd*(2*o(2*Be/3)-1)),R(x(Be)*3*dd/7)]};function vd(){return t.geoProjection(Wu).scale(164.859)}function pd(Me,Ce){for(var Be=(1+w)*x(Ce),Ne=Ce,Qe=0,Je;Qe<25&&(Ne-=Je=(x(Ne/2)+x(Ne)-Be)/(.5*o(Ne/2)+o(Ne)),!(n(Je)C&&--Ne>0);return Je=Be*Be,lt=Je*Je,Gt=Je*lt,[Me/(.84719-.13063*Je+Gt*Gt*(-.04515+.05494*Je-.02326*lt+.00331*Gt)),Be]};function gd(){return t.geoProjection(af).scale(175.295)}function Rl(Me,Ce){return[Me*(1+o(Ce))/2,2*(Ce-_(Ce/2))]}Rl.invert=function(Me,Ce){for(var Be=Ce/2,Ne=0,Qe=1/0;Ne<10&&n(Qe)>y;++Ne){var Je=o(Ce/2);Ce-=Qe=(Ce-_(Ce/2)-Be)/(1-.5/(Je*Je))}return[2*Me/(1+o(Ce)),Ce]};function ch(){return t.geoProjection(Rl).scale(152.63)}var Lc=[[[[-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 md(){return lu(De(1/0),Lc).rotate([20,0]).scale(152.63)}function yd(Me,Ce){var Be=x(Ce),Ne=o(Ce),Qe=p(Me);if(Me===0||n(Ce)===S)return[0,Ce];if(Ce===0)return[Me,0];if(n(Me)===S)return[Me*Ne,S*Be];var Je=k/(2*Me)-2*Me/k,lt=2*Ce/k,Gt=(1-lt*lt)/(Be-lt),Zt=Je*Je,Nt=Gt*Gt,Kt=1+Zt/Nt,ur=1+Nt/Zt,Sr=(Je*Be/Gt-Je/2)/Kt,Br=(Nt*Be/Zt+Gt/2)/ur,ln=Sr*Sr+Ne*Ne/Kt,wn=Br*Br-(Nt*Be*Be/Zt+Gt*Be-1)/ur;return[S*(Sr+O(ln)*Qe),S*(Br+O(wn<0?0:wn)*p(-Ce*Je)*Qe)]}yd.invert=function(Me,Ce){Me/=S,Ce/=S;var Be=Me*Me,Ne=Ce*Ce,Qe=Be+Ne,Je=k*k;return[Me?(Qe-1+O((1-Qe)*(1-Qe)+4*Be))/(2*Me)*S:0,it(function(lt){return Qe*(k*x(lt)-2*lt)*k+4*lt*lt*(Ce-x(lt))+2*k*lt-Je*Ce},0)]};function Lf(){return t.geoProjection(yd).scale(127.267)}var wu=1.0148,fh=.23185,Oh=-.14499,hh=.02406,Gd=wu,Gl=5*fh,wl=7*Oh,xd=9*hh,Hl=1.790857183;function _d(Me,Ce){var Be=Ce*Ce;return[Me,Ce*(wu+Be*Be*(fh+Be*(Oh+hh*Be)))]}_d.invert=function(Me,Ce){Ce>Hl?Ce=Hl:Ce<-Hl&&(Ce=-Hl);var Be=Ce,Ne;do{var Qe=Be*Be;Be-=Ne=(Be*(wu+Qe*Qe*(fh+Qe*(Oh+hh*Qe)))-Ce)/(Gd+Qe*Qe*(Gl+Qe*(wl+xd*Qe)))}while(n(Ne)>y);return[Me,Be]};function dh(){return t.geoProjection(_d).scale(139.319)}function Pf(Me,Ce){if(n(Ce)y&&--Qe>0);return lt=_(Ne),[(n(Ce)=0;)if(Ne=Ce[Gt],Be[0]===Ne[0]&&Be[1]===Ne[1]){if(Je)return[Je,Be];Je=Be}}}function Uh(Me){for(var Ce=Me.length,Be=[],Ne=Me[Ce-1],Qe=0;Qe0?[-Ne[0],0]:[180-Ne[0],180])};var Ce=pc.map(function(Be){return{face:Be,project:Me(Be)}});return[-1,0,0,1,0,1,4,5].forEach(function(Be,Ne){var Qe=Ce[Be];Qe&&(Qe.children||(Qe.children=[])).push(Ce[Ne])}),Yu(Ce[0],function(Be,Ne){return Ce[Be<-k/2?Ne<0?6:4:Be<0?Ne<0?2:0:BeNe^Br>Ne&&Be<(Sr-Nt)*(Ne-Kt)/(Br-Kt)+Nt&&(Qe=!Qe)}return Qe}function wd(Me,Ce){var Be=Ce.stream,Ne;if(!Be)throw new Error("invalid projection");switch(Me&&Me.type){case"Feature":Ne=X0;break;case"FeatureCollection":Ne=Hh;break;default:Ne=Td;break}return Ne(Me,Be)}function Hh(Me,Ce){return{type:"FeatureCollection",features:Me.features.map(function(Be){return X0(Be,Ce)})}}function X0(Me,Ce){return{type:"Feature",id:Me.id,properties:Me.properties,geometry:Td(Me.geometry,Ce)}}function y0(Me,Ce){return{type:"GeometryCollection",geometries:Me.geometries.map(function(Be){return Td(Be,Ce)})}}function Td(Me,Ce){if(!Me)return null;if(Me.type==="GeometryCollection")return y0(Me,Ce);var Be;switch(Me.type){case"Point":Be=If;break;case"MultiPoint":Be=If;break;case"LineString":Be=vh;break;case"MultiLineString":Be=vh;break;case"Polygon":Be=zf;break;case"MultiPolygon":Be=zf;break;case"Sphere":Be=zf;break;default:return null}return t.geoStream(Me,Ce(Be)),Be.result()}var ul=[],Wl=[],If={point:function(Me,Ce){ul.push([Me,Ce])},result:function(){var Me=ul.length?ul.length<2?{type:"Point",coordinates:ul[0]}:{type:"MultiPoint",coordinates:ul}:null;return ul=[],Me}},vh={lineStart:La,point:function(Me,Ce){ul.push([Me,Ce])},lineEnd:function(){ul.length&&(Wl.push(ul),ul=[])},result:function(){var Me=Wl.length?Wl.length<2?{type:"LineString",coordinates:Wl[0]}:{type:"MultiLineString",coordinates:Wl}:null;return Wl=[],Me}},zf={polygonStart:La,lineStart:La,point:function(Me,Ce){ul.push([Me,Ce])},lineEnd:function(){var Me=ul.length;if(Me){do ul.push(ul[0].slice());while(++Me<4);Wl.push(ul),ul=[]}},polygonEnd:La,result:function(){if(!Wl.length)return null;var Me=[],Ce=[];return Wl.forEach(function(Be){Rf(Be)?Me.push([Be]):Ce.push(Be)}),Ce.forEach(function(Be){var Ne=Be[0];Me.some(function(Qe){if(m0(Qe[0],Ne))return Qe.push(Be),!0})||Me.push([Be])}),Wl=[],Me.length?Me.length>1?{type:"MultiPolygon",coordinates:Me}:{type:"Polygon",coordinates:Me[0]}:null}};function qf(Me){var Ce=Me(S,0)[0]-Me(-S,0)[0];function Be(Ne,Qe){var Je=n(Ne)0?Ne-k:Ne+k,Qe),Gt=(lt[0]-lt[1])*w,Zt=(lt[0]+lt[1])*w;if(Je)return[Gt,Zt];var Nt=Ce*w,Kt=Gt>0^Zt>0?-1:1;return[Kt*Gt-p(Zt)*Nt,Kt*Zt-p(Gt)*Nt]}return Me.invert&&(Be.invert=function(Ne,Qe){var Je=(Ne+Qe)*w,lt=(Qe-Ne)*w,Gt=n(Je)<.5*Ce&&n(lt)<.5*Ce;if(!Gt){var Zt=Ce*w,Nt=Je>0^lt>0?-1:1,Kt=-Nt*Ne+(lt>0?1:-1)*Zt,ur=-Nt*Qe+(Je>0?1:-1)*Zt;Je=(-Kt-ur)*w,lt=(Kt-ur)*w}var Sr=Me.invert(Je,lt);return Gt||(Sr[0]+=Je>0?k:-k),Sr}),t.geoProjection(Be).rotate([-90,-90,45]).clipAngle(180-.001)}function Ze(){return qf(Yr).scale(176.423)}function yt(){return qf(Za).scale(111.48)}function Wt(Me,Ce){if(!(0<=(Ce=+Ce)&&Ce<=20))throw new Error("invalid digits");function Be(Nt){var Kt=Nt.length,ur=2,Sr=new Array(Kt);for(Sr[0]=+Nt[0].toFixed(Ce),Sr[1]=+Nt[1].toFixed(Ce);ur2||Br[0]!=Kt[0]||Br[1]!=Kt[1])&&(ur.push(Br),Kt=Br)}return ur.length===1&&Nt.length>1&&ur.push(Be(Nt[Nt.length-1])),ur}function Je(Nt){return Nt.map(Qe)}function lt(Nt){if(Nt==null)return Nt;var Kt;switch(Nt.type){case"GeometryCollection":Kt={type:"GeometryCollection",geometries:Nt.geometries.map(lt)};break;case"Point":Kt={type:"Point",coordinates:Be(Nt.coordinates)};break;case"MultiPoint":Kt={type:Nt.type,coordinates:Ne(Nt.coordinates)};break;case"LineString":Kt={type:Nt.type,coordinates:Qe(Nt.coordinates)};break;case"MultiLineString":case"Polygon":Kt={type:Nt.type,coordinates:Je(Nt.coordinates)};break;case"MultiPolygon":Kt={type:"MultiPolygon",coordinates:Nt.coordinates.map(Je)};break;default:return Nt}return Nt.bbox!=null&&(Kt.bbox=Nt.bbox),Kt}function Gt(Nt){var Kt={type:"Feature",properties:Nt.properties,geometry:lt(Nt.geometry)};return Nt.id!=null&&(Kt.id=Nt.id),Nt.bbox!=null&&(Kt.bbox=Nt.bbox),Kt}if(Me!=null)switch(Me.type){case"Feature":return Gt(Me);case"FeatureCollection":{var Zt={type:"FeatureCollection",features:Me.features.map(Gt)};return Me.bbox!=null&&(Zt.bbox=Me.bbox),Zt}default:return lt(Me)}return Me}function zt(Me){var Ce=x(Me);function Be(Ne,Qe){var Je=Ce?_(Ne*Ce/2)/Ce:Ne/2;if(!Qe)return[2*Je,-Me];var lt=2*a(Je*x(Qe)),Gt=1/_(Qe);return[x(lt)*Gt,Qe+(1-o(lt))*Gt-Me]}return Be.invert=function(Ne,Qe){if(n(Qe+=Me)y&&--Gt>0);var Sr=Ne*(Nt=_(lt)),Br=_(n(Qe)0?S:-S)*(Zt+Qe*(Kt-lt)/2+Qe*Qe*(Kt-2*Zt+lt)/2)]}Qr.invert=function(Me,Ce){var Be=Ce/S,Ne=Be*90,Qe=f(18,n(Ne/5)),Je=c(0,l(Qe));do{var lt=Ur[Je][1],Gt=Ur[Je+1][1],Zt=Ur[f(19,Je+2)][1],Nt=Zt-lt,Kt=Zt-2*Gt+lt,ur=2*(n(Be)-Gt)/Nt,Sr=Kt/Nt,Br=ur*(1-Sr*ur*(1-2*Sr*ur));if(Br>=0||Je===1){Ne=(Ce>=0?5:-5)*(Br+Qe);var ln=50,wn;do Qe=f(18,n(Ne)/5),Je=l(Qe),Br=Qe-Je,lt=Ur[Je][1],Gt=Ur[Je+1][1],Zt=Ur[f(19,Je+2)][1],Ne-=(wn=(Ce>=0?S:-S)*(Gt+Br*(Zt-lt)/2+Br*Br*(Zt-2*Gt+lt)/2)-Ce)*F;while(n(wn)>C&&--ln>0);break}}while(--Je>=0);var In=Ur[Je][0],gi=Ur[Je+1][0],Bi=Ur[f(19,Je+2)][0];return[Me/(gi+Br*(Bi-In)/2+Br*Br*(Bi-2*gi+In)/2),Ne*E]};function cn(){return t.geoProjection(Qr).scale(152.63)}function yn(Me){function Ce(Be,Ne){var Qe=o(Ne),Je=(Me-1)/(Me-Qe*o(Be));return[Je*Qe*x(Be),Je*x(Ne)]}return Ce.invert=function(Be,Ne){var Qe=Be*Be+Ne*Ne,Je=O(Qe),lt=(Me-O(1-Qe*(Me+1)/(Me-1)))/((Me-1)/Je+Je/(Me-1));return[i(Be*lt,Je*O(1-lt*lt)),Je?R(Ne*lt/Je):0]},Ce}function Fn(Me,Ce){var Be=yn(Me);if(!Ce)return Be;var Ne=o(Ce),Qe=x(Ce);function Je(lt,Gt){var Zt=Be(lt,Gt),Nt=Zt[1],Kt=Nt*Qe/(Me-1)+Ne;return[Zt[0]*Ne/Kt,Nt/Kt]}return Je.invert=function(lt,Gt){var Zt=(Me-1)/(Me-1-Gt*Qe);return Be.invert(Zt*lt,Zt*Gt*Ne)},Je}function en(){var Me=2,Ce=0,Be=t.geoProjectionMutator(Fn),Ne=Be(Me,Ce);return Ne.distance=function(Qe){return arguments.length?Be(Me=+Qe,Ce):Me},Ne.tilt=function(Qe){return arguments.length?Be(Me,Ce=Qe*E):Ce*F},Ne.scale(432.147).clipAngle(B(1/Me)*F-1e-6)}var vn=1e-4,mn=1e4,Pn=-180,On=Pn+vn,ki=180,Ci=ki-vn,qi=-90,pi=qi+vn,Un=90,Gn=Un-vn;function Zi(Me){return Me.length>0}function na(Me){return Math.floor(Me*mn)/mn}function Ha(Me){return Me===qi||Me===Un?[0,Me]:[Pn,na(Me)]}function Qa(Me){var Ce=Me[0],Be=Me[1],Ne=!1;return Ce<=On?(Ce=Pn,Ne=!0):Ce>=Ci&&(Ce=ki,Ne=!0),Be<=pi?(Be=qi,Ne=!0):Be>=Gn&&(Be=Un,Ne=!0),Ne?[Ce,Be]:Me}function Ya(Me){return Me.map(Qa)}function ho(Me,Ce,Be){for(var Ne=0,Qe=Me.length;Ne=Ci||Kt<=pi||Kt>=Gn){Je[lt]=Qa(Zt);for(var ur=lt+1;urOn&&Brpi&&ln=Gt)break;Be.push({index:-1,polygon:Ce,ring:Je=Je.slice(ur-1)}),Je[0]=Ha(Je[0][1]),lt=-1,Gt=Je.length}}}}function Pa(Me){var Ce,Be=Me.length,Ne={},Qe={},Je,lt,Gt,Zt,Nt;for(Ce=0;Ce0?k-Gt:Gt)*F],Nt=t.geoProjection(Me(lt)).rotate(Zt),Kt=t.geoRotation(Zt),ur=Nt.center;return delete Nt.rotate,Nt.center=function(Sr){return arguments.length?ur(Kt(Sr)):Kt.invert(ur())},Nt.clipAngle(90)}function Qs(Me){var Ce=o(Me);function Be(Ne,Qe){var Je=t.geoGnomonicRaw(Ne,Qe);return Je[0]*=Ce,Je}return Be.invert=function(Ne,Qe){return t.geoGnomonicRaw.invert(Ne/Ce,Qe)},Be}function zl(){return cu([-158,21.5],[-77,39]).clipAngle(60).scale(400)}function cu(Me,Ce){return Go(Qs,Me,Ce)}function Zu(Me){if(!(Me*=2))return t.geoAzimuthalEquidistantRaw;var Ce=-Me/2,Be=-Ce,Ne=Me*Me,Qe=_(Be),Je=.5/x(Be);function lt(Gt,Zt){var Nt=B(o(Zt)*o(Gt-Ce)),Kt=B(o(Zt)*o(Gt-Be)),ur=Zt<0?-1:1;return Nt*=Nt,Kt*=Kt,[(Nt-Kt)/(2*Me),ur*O(4*Ne*Kt-(Ne-Nt+Kt)*(Ne-Nt+Kt))/(2*Me)]}return lt.invert=function(Gt,Zt){var Nt=Zt*Zt,Kt=o(O(Nt+(Sr=Gt+Ce)*Sr)),ur=o(O(Nt+(Sr=Gt+Be)*Sr)),Sr,Br;return[i(Br=Kt-ur,Sr=(Kt+ur)*Qe),(Zt<0?-1:1)*B(O(Sr*Sr+Br*Br)*Je)]},lt}function mc(){return Yl([-158,21.5],[-77,39]).clipAngle(130).scale(122.571)}function Yl(Me,Ce){return Go(Zu,Me,Ce)}function lf(Me,Ce){if(n(Ce)y&&--Gt>0);return[p(Me)*(O(Qe*Qe+4)+Qe)*k/4,S*lt]};function Ju(){return t.geoProjection(fu).scale(127.16)}function Qu(Me,Ce,Be,Ne,Qe){function Je(lt,Gt){var Zt=Be*x(Ne*Gt),Nt=O(1-Zt*Zt),Kt=O(2/(1+Nt*o(lt*=Qe)));return[Me*Nt*Kt*x(lt),Ce*Zt*Kt]}return Je.invert=function(lt,Gt){var Zt=lt/Me,Nt=Gt/Ce,Kt=O(Zt*Zt+Nt*Nt),ur=2*R(Kt/2);return[i(lt*_(ur),Me*Kt)/Qe,Kt&&R(Gt*x(ur)/(Ce*Be*Kt))/Ne]},Je}function Wd(Me,Ce,Be,Ne){var Qe=k/3;Me=c(Me,y),Ce=c(Ce,y),Me=f(Me,S),Ce=f(Ce,k-y),Be=c(Be,0),Be=f(Be,100-y),Ne=c(Ne,y);var Je=Be/100+1,lt=Ne/100,Gt=B(Je*o(Qe))/Qe,Zt=x(Me)/x(Gt*S),Nt=Ce/k,Kt=O(lt*x(Me/2)/x(Ce/2)),ur=Kt/O(Nt*Zt*Gt),Sr=1/(Kt*O(Nt*Zt*Gt));return Qu(ur,Sr,Zt,Gt,Nt)}function x0(){var Me=65*E,Ce=60*E,Be=20,Ne=200,Qe=t.geoProjectionMutator(Wd),Je=Qe(Me,Ce,Be,Ne);return Je.poleline=function(lt){return arguments.length?Qe(Me=+lt*E,Ce,Be,Ne):Me*F},Je.parallels=function(lt){return arguments.length?Qe(Me,Ce=+lt*E,Be,Ne):Ce*F},Je.inflation=function(lt){return arguments.length?Qe(Me,Ce,Be=+lt,Ne):Be},Je.ratio=function(lt){return arguments.length?Qe(Me,Ce,Be,Ne=+lt):Ne},Je.scale(163.775)}function Bf(){return x0().poleline(65).parallels(60).inflation(0).ratio(200).scale(172.633)}var Al=4*k+3*O(3),Xl=2*O(2*k*O(3)/Al),cf=qe(Xl*O(3)/k,Xl,Al/6);function jh(){return t.geoProjection(cf).scale(176.84)}function Wh(Me,Ce){return[Me*O(1-3*Ce*Ce/(k*k)),Ce]}Wh.invert=function(Me,Ce){return[Me/O(1-3*Ce*Ce/(k*k)),Ce]};function Yh(){return t.geoProjection(Wh).scale(152.63)}function hu(Me,Ce){var Be=o(Ce),Ne=o(Me)*Be,Qe=1-Ne,Je=o(Me=i(x(Me)*Be,-x(Ce))),lt=x(Me);return Be=O(1-Ne*Ne),[lt*Be-Je*Qe,-Je*Be-lt*Qe]}hu.invert=function(Me,Ce){var Be=(Me*Me+Ce*Ce)/-2,Ne=O(-Be*(2+Be)),Qe=Ce*Be+Me*Ne,Je=Me*Be-Ce*Ne,lt=O(Je*Je+Qe*Qe);return[i(Ne*Qe,lt*(1+Be)),lt?-R(Ne*Je/lt):0]};function Mu(){return t.geoProjection(hu).rotate([0,-90,45]).scale(124.75).clipAngle(180-.001)}function _i(Me,Ce){var Be=ye(Me,Ce);return[(Be[0]+Me/S)/2,(Be[1]+Ce)/2]}_i.invert=function(Me,Ce){var Be=Me,Ne=Ce,Qe=25;do{var Je=o(Ne),lt=x(Ne),Gt=x(2*Ne),Zt=lt*lt,Nt=Je*Je,Kt=x(Be),ur=o(Be/2),Sr=x(Be/2),Br=Sr*Sr,ln=1-Nt*ur*ur,wn=ln?B(Je*ur)*O(In=1/ln):In=0,In,gi=.5*(2*wn*Je*Sr+Be/S)-Me,Bi=.5*(wn*lt+Ne)-Ce,mi=.5*In*(Nt*Br+wn*Je*ur*Zt)+.5/S,ia=In*(Kt*Gt/4-wn*lt*Sr),ua=.125*In*(Gt*Sr-wn*lt*Nt*Kt),lo=.5*In*(Zt*ur+wn*Br*Je)+.5,Bo=ia*ua-lo*mi,Ua=(Bi*ia-gi*lo)/Bo,ls=(gi*ua-Bi*mi)/Bo;Be-=Ua,Ne-=ls}while((n(Ua)>y||n(ls)>y)&&--Qe>0);return[Be,Ne]};function Su(){return t.geoProjection(_i).scale(158.837)}e.geoNaturalEarth=t.geoNaturalEarth1,e.geoNaturalEarthRaw=t.geoNaturalEarth1Raw,e.geoAiry=ce,e.geoAiryRaw=ee,e.geoAitoff=xe,e.geoAitoffRaw=ye,e.geoArmadillo=K,e.geoArmadilloRaw=ue,e.geoAugust=ne,e.geoAugustRaw=_e,e.geoBaker=le,e.geoBakerRaw=ie,e.geoBerghaus=be,e.geoBerghausRaw=me,e.geoBertin1953=ct,e.geoBertin1953Raw=ze,e.geoBoggs=$e,e.geoBoggsRaw=Ve,e.geoBonne=mt,e.geoBonneRaw=We,e.geoBottomley=Yt,e.geoBottomleyRaw=bt,e.geoBromley=mr,e.geoBromleyRaw=jt,e.geoChamberlin=Tt,e.geoChamberlinRaw=cr,e.geoChamberlinAfrica=wt,e.geoCollignon=Lt,e.geoCollignonRaw=Mt,e.geoCraig=kt,e.geoCraigRaw=ft,e.geoCraster=Kr,e.geoCrasterRaw=pr,e.geoCylindricalEqualArea=dn,e.geoCylindricalEqualAreaRaw=Nr,e.geoCylindricalStereographic=Fr,e.geoCylindricalStereographicRaw=xr,e.geoEckert1=Cn,e.geoEckert1Raw=Zr,e.geoEckert2=At,e.geoEckert2Raw=Dt,e.geoEckert3=Qt,e.geoEckert3Raw=Vt,e.geoEckert4=_r,e.geoEckert4Raw=Ut,e.geoEckert5=Jr,e.geoEckert5Raw=rn,e.geoEckert6=ri,e.geoEckert6Raw=qn,e.geoEisenlohr=Vi,e.geoEisenlohrRaw=Ii,e.geoFahey=va,e.geoFaheyRaw=ha,e.geoFoucaut=oa,e.geoFoucautRaw=Xi,e.geoFoucautSinusoidal=Ga,e.geoFoucautSinusoidalRaw=Ma,e.geoGilbert=sl,e.geoGingery=bl,e.geoGingeryRaw=Eo,e.geoGinzburg4=su,e.geoGinzburg4Raw=Zs,e.geoGinzburg5=Af,e.geoGinzburg5Raw=fc,e.geoGinzburg6=Jt,e.geoGinzburg6Raw=ut,e.geoGinzburg8=wr,e.geoGinzburg8Raw=er,e.geoGinzburg9=Dr,e.geoGinzburg9Raw=nn,e.geoGringorten=Qn,e.geoGringortenRaw=Yr,e.geoGuyou=$a,e.geoGuyouRaw=Za,e.geoHammer=ht,e.geoHammerRaw=De,e.geoHammerRetroazimuthal=Ni,e.geoHammerRetroazimuthalRaw=Ka,e.geoHealpix=As,e.geoHealpixRaw=so,e.geoHill=xu,e.geoHillRaw=Ms,e.geoHomolosine=Gu,e.geoHomolosineRaw=_u,e.geoHufnagel=ps,e.geoHufnagelRaw=Ja,e.geoHyperelliptical=Ca,e.geoHyperellipticalRaw=Ps,e.geoInterrupt=lu,e.geoInterruptedBoggs=Bd,e.geoInterruptedHomolosine=Sf,e.geoInterruptedMollweide=Uo,e.geoInterruptedMollweideHemispheres=Ks,e.geoInterruptedSinuMollweide=ju,e.geoInterruptedSinusoidal=bu,e.geoKavrayskiy7=ah,e.geoKavrayskiy7Raw=kf,e.geoLagrange=Qc,e.geoLagrangeRaw=Od,e.geoLarrivee=hc,e.geoLarriveeRaw=oh,e.geoLaskowski=Yo,e.geoLaskowskiRaw=Fl,e.geoLittrow=is,e.geoLittrowRaw=Ro,e.geoLoximuthal=dc,e.geoLoximuthalRaw=Dl,e.geoMiller=Cc,e.geoMillerRaw=ef,e.geoModifiedStereographic=vc,e.geoModifiedStereographicRaw=sh,e.geoModifiedStereographicAlaska=zh,e.geoModifiedStereographicGs48=tf,e.geoModifiedStereographicGs50=Vd,e.geoModifiedStereographicMiller=rf,e.geoModifiedStereographicLee=qh,e.geoMollweide=Le,e.geoMollweideRaw=we,e.geoMtFlatPolarParabolic=vd,e.geoMtFlatPolarParabolicRaw=Wu,e.geoMtFlatPolarQuartic=lh,e.geoMtFlatPolarQuarticRaw=pd,e.geoMtFlatPolarSinusoidal=uh,e.geoMtFlatPolarSinusoidalRaw=nf,e.geoNaturalEarth2=gd,e.geoNaturalEarth2Raw=af,e.geoNellHammer=ch,e.geoNellHammerRaw=Rl,e.geoInterruptedQuarticAuthalic=md,e.geoNicolosi=Lf,e.geoNicolosiRaw=yd,e.geoPatterson=dh,e.geoPattersonRaw=_d,e.geoPolyconic=Hd,e.geoPolyconicRaw=Pf,e.geoPolyhedral=Yu,e.geoPolyhedralButterfly=gc,e.geoPolyhedralCollignon=bd,e.geoPolyhedralWaterman=Gh,e.geoProject=wd,e.geoGringortenQuincuncial=Ze,e.geoPeirceQuincuncial=yt,e.geoPierceQuincuncial=yt,e.geoQuantize=Wt,e.geoQuincuncial=qf,e.geoRectangularPolyconic=hr,e.geoRectangularPolyconicRaw=zt,e.geoRobinson=cn,e.geoRobinsonRaw=Qr,e.geoSatellite=en,e.geoSatelliteRaw=Fn,e.geoSinuMollweide=Kc,e.geoSinuMollweideRaw=$s,e.geoSinusoidal=nt,e.geoSinusoidalRaw=tt,e.geoStitch=Io,e.geoTimes=ro,e.geoTimesRaw=oi,e.geoTwoPointAzimuthal=cu,e.geoTwoPointAzimuthalRaw=Qs,e.geoTwoPointAzimuthalUsa=zl,e.geoTwoPointEquidistant=Yl,e.geoTwoPointEquidistantRaw=Zu,e.geoTwoPointEquidistantUsa=mc,e.geoVanDerGrinten=$u,e.geoVanDerGrintenRaw=lf,e.geoVanDerGrinten2=gh,e.geoVanDerGrinten2Raw=ph,e.geoVanDerGrinten3=Ku,e.geoVanDerGrinten3Raw=uf,e.geoVanDerGrinten4=Ju,e.geoVanDerGrinten4Raw=fu,e.geoWagner=x0,e.geoWagner7=Bf,e.geoWagnerRaw=Wd,e.geoWagner4=jh,e.geoWagner4Raw=cf,e.geoWagner6=Yh,e.geoWagner6Raw=Wh,e.geoWiechel=Mu,e.geoWiechelRaw=hu,e.geoWinkel3=Su,e.geoWinkel3Raw=_i,Object.defineProperty(e,"__esModule",{value:!0})}))});var fze=fe((l5r,cze)=>{"use strict";var iu=xi(),BX=Xt(),LHt=bi(),o5=Math.PI/180,o_=180/Math.PI,NX={cursor:"pointer"},UX={cursor:"auto"};function PHt(e,t){var r=e.projection,n;return t._isScoped?n=FHt:t._isClipped?n=RHt:n=DHt,n(e,r)}cze.exports=PHt;function VX(e,t){return iu.behavior.zoom().translate(t.translate()).scaleExtent(t.scaleExtent()).scale(t.scale())}function GX(e,t,r){var n=e.id,a=e.graphDiv,i=a.layout,o=i[n],s=a._fullLayout,l=s[n],u={},c={};function f(v,g){u[n+"."+v]=BX.nestedProperty(o,v).get(),LHt.call("_storeDirectGUIEdit",i,s._preGUI,u);var p=BX.nestedProperty(l,v);p.get()!==g&&(p.set(g),BX.nestedProperty(o,v).set(g),c[n+"."+v]=g)}r(f),f("projection.scale",t.scale()/e.fitScale),f("fitbounds",!1),a.emit("plotly_relayout",c)}function FHt(e,t){var r=VX(e,t);function n(){iu.select(this).style(NX)}function a(){t.scale(iu.event.scale).translate(iu.event.translate),e.render(!0);var s=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":s[0],"geo.center.lat":s[1]})}function i(s){var l=t.invert(e.midPt);s("center.lon",l[0]),s("center.lat",l[1])}function o(){iu.select(this).style(UX),GX(e,t,i)}return r.on("zoomstart",n).on("zoom",a).on("zoomend",o),r}function DHt(e,t){var r=VX(e,t),n=2,a,i,o,s,l,u,c,f,v;function g(k){return t.invert(k)}function p(k){var S=g(k);if(!S)return!0;var L=t(S);return Math.abs(L[0]-k[0])>n||Math.abs(L[1]-k[1])>n}function x(){iu.select(this).style(NX);let{x:k,y:S,width:L,height:w}=this.getBBox();a=iu.event.sourceEvent?iu.mouse(this):[k+L/2,S+w/2],i=t.rotate(),o=t.translate(),s=i,l=g(a)}function _(){let{x:k,y:S,width:L,height:w}=this.getBBox();if(u=iu.event.sourceEvent?iu.mouse(this):[k+L/2,S+w/2],p(a)){r.scale(t.scale()),r.translate(t.translate());return}t.scale(iu.event.scale),t.translate([o[0],iu.event.translate[1]]),l?g(u)&&(f=g(u),c=[s[0]+(f[0]-l[0]),i[1],i[2]],t.rotate(c),s=c):(a=u,l=g(a)),v=!0,e.render(!0);var A=t.rotate(),T=t.invert(e.midPt);e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.center.lon":T[0],"geo.center.lat":T[1],"geo.projection.rotation.lon":-A[0]})}function y(){iu.select(this).style(UX),v&&GX(e,t,C)}function C(k){var S=t.rotate(),L=t.invert(e.midPt);k("projection.rotation.lon",-S[0]),k("center.lon",L[0]),k("center.lat",L[1])}return r.on("zoomstart",x).on("zoom",_).on("zoomend",y),r}function RHt(e,t){var r={r:t.rotate(),k:t.scale()},n=VX(e,t),a=VHt(n,"zoomstart","zoom","zoomend"),i=0,o=n.on,s;n.on("zoomstart",function(){iu.select(this).style(NX);let{x:v,y:g,width:p,height:x}=this.getBBox(),_=iu.event.sourceEvent?iu.mouse(this):[v+p/2,g+x/2],y=t.rotate(),C=y,k=t.translate(),S=IHt(y);s=jP(t,_),o.call(n,"zoom",function(){let{x:L,y:w,width:A,height:T}=this.getBBox(),m=iu.event.sourceEvent?iu.mouse(this):[L+A/2,w+T/2];if(t.scale(r.k=iu.event.scale),!s)_=m,s=jP(t,_);else if(jP(t,m)){t.rotate(y).translate(k);var F=jP(t,m),E=qHt(s,F),I=OHt(zHt(S,E)),R=r.r=BHt(I,s,C);(!isFinite(R[0])||!isFinite(R[1])||!isFinite(R[2]))&&(R=C),t.rotate(R),C=R}u(a.of(this,arguments))}),l(a.of(this,arguments))}).on("zoomend",function(){iu.select(this).style(UX),o.call(n,"zoom",null),c(a.of(this,arguments)),GX(e,t,f)}).on("zoom.redraw",function(){e.render(!0);var v=t.rotate();e.graphDiv.emit("plotly_relayouting",{"geo.projection.scale":t.scale()/e.fitScale,"geo.projection.rotation.lon":-v[0],"geo.projection.rotation.lat":-v[1]})});function l(v){i++||v({type:"zoomstart"})}function u(v){v({type:"zoom"})}function c(v){--i||v({type:"zoomend"})}function f(v){var g=t.rotate();v("projection.rotation.lon",-g[0]),v("projection.rotation.lat",-g[1])}return iu.rebind(n,a,"on")}function jP(e,t){var r=e.invert(t);return r&&isFinite(r[0])&&isFinite(r[1])&&NHt(r)}function IHt(e){var t=.5*e[0]*o5,r=.5*e[1]*o5,n=.5*e[2]*o5,a=Math.sin(t),i=Math.cos(t),o=Math.sin(r),s=Math.cos(r),l=Math.sin(n),u=Math.cos(n);return[i*s*u+a*o*l,a*s*u-i*o*l,i*o*u+a*s*l,i*s*l-a*o*u]}function zHt(e,t){var r=e[0],n=e[1],a=e[2],i=e[3],o=t[0],s=t[1],l=t[2],u=t[3];return[r*o-n*s-a*l-i*u,r*s+n*o+a*u-i*l,r*l-n*u+a*o+i*s,r*u+n*l-a*s+i*o]}function qHt(e,t){if(!(!e||!t)){var r=UHt(e,t),n=Math.sqrt(uze(r,r)),a=.5*Math.acos(Math.max(-1,Math.min(1,uze(e,t)))),i=Math.sin(a)/n;return n&&[Math.cos(a),r[2]*i,-r[1]*i,r[0]*i]}}function BHt(e,t,r){var n=OX(t,2,e[0]);n=OX(n,1,e[1]),n=OX(n,0,e[2]-r[2]);var a=t[0],i=t[1],o=t[2],s=n[0],l=n[1],u=n[2],c=Math.atan2(i,a)*o_,f=Math.sqrt(a*a+i*i),v,g;Math.abs(l)>f?(g=(l>0?90:-90)-c,v=0):(g=Math.asin(l/f)*o_-c,v=Math.sqrt(f*f-l*l));var p=180-g-2*c,x=(Math.atan2(u,s)-Math.atan2(o,v))*o_,_=(Math.atan2(u,s)-Math.atan2(o,-v))*o_,y=sze(r[0],r[1],g,x),C=sze(r[0],r[1],p,_);return y<=C?[g,x,r[2]]:[p,_,r[2]]}function sze(e,t,r,n){var a=lze(r-e),i=lze(n-t);return Math.sqrt(a*a+i*i)}function lze(e){return(e%360+540)%360-180}function OX(e,t,r){var n=r*o5,a=e.slice(),i=t===0?1:0,o=t===2?1:2,s=Math.cos(n),l=Math.sin(n);return a[i]=e[i]*s-e[o]*l,a[o]=e[o]*s+e[i]*l,a}function OHt(e){return[Math.atan2(2*(e[0]*e[1]+e[2]*e[3]),1-2*(e[1]*e[1]+e[2]*e[2]))*o_,Math.asin(Math.max(-1,Math.min(1,2*(e[0]*e[2]-e[3]*e[1]))))*o_,Math.atan2(2*(e[0]*e[3]+e[1]*e[2]),1-2*(e[2]*e[2]+e[3]*e[3]))*o_]}function NHt(e){var t=e[0]*o5,r=e[1]*o5,n=Math.cos(r);return[n*Math.cos(t),n*Math.sin(t),Math.sin(r)]}function uze(e,t){for(var r=0,n=0,a=e.length;n{"use strict";var M1=xi(),WX=qP(),GHt=WX.geoPath,HHt=WX.geoDistance,jHt=oze(),WHt=bi(),vM=Xt(),YHt=vM.strTranslate,WP=ni(),dM=ea(),hze=kl(),XHt=Hs(),jX=Yi(),{concatExtremes:ZHt,getAutoRange:dze,makePadFn:vze}=rp(),HX=ed(),$Ht=Ac().prepSelect,KHt=Ac().clearOutline,JHt=Ac().selectOnClick,QHt=fze(),Id=lM(),YX=Cg(),{unwrapLonRange:ejt}=YX,gze=EP(),tjt=yX().feature;function mze(e){this.id=e.id,this.graphDiv=e.graphDiv,this.container=e.container,this.topojsonURL=e.topojsonURL,this.isStatic=e.staticPlot,this.topojsonName=null,this.topojson=null,this.projection=null,this.scope=null,this.viewInitial=null,this.fitScale=null,this.bounds=null,this.midPt=null,this.hasChoropleth=!1,this.traceHash={},this.layers={},this.basePaths={},this.dataPaths={},this.dataPoints={},this.clipDef=null,this.clipRect=null,this.bgRect=null,this.makeFramework()}var Lp=mze.prototype;yze.exports=function(t){return new mze(t)};Lp.plot=function(e,t,r,n){var a=this;if(n)return a.update(e,t,!0);a._geoCalcData=e,a._fullLayout=t;var i=t[this.id],o=[],s=!1;for(var l in Id.layerNameToAdjective)if(l!=="frame"&&i["show"+l]){s=!0;break}for(var u=!1,c=0;c0&&o._module.calcGeoJSON(i,t)}if(!r){var s=this.updateProjection(e,t);if(s)return;(!this.viewInitial||this.scope!==n.scope)&&this.saveViewInitial(n)}this.scope=n.scope,this.updateBaseLayers(t,n),this.updateDims(t,n),this.updateFx(t,n),XHt.generalUpdatePerTraceModule(this.graphDiv,this,e,n);var l=this.layers.frontplot.select(".scatterlayer");this.dataPoints.point=l.selectAll(".point"),this.dataPoints.text=l.selectAll("text"),this.dataPaths.line=l.selectAll(".js-line");var u=this.layers.backplot.select(".choroplethlayer");this.dataPaths.choropleth=u.selectAll("path"),this._render()};Lp.updateProjection=function(e,t){var r=this.graphDiv,n=t[this.id],a=t._size,i=n.domain,o=n.projection,s=n.lonaxis,l=n.lataxis,u=s._ax,c=l._ax,f=this.projection=rjt(n),v=[[a.l+a.w*i.x[0],a.t+a.h*(1-i.y[1])],[a.l+a.w*i.x[1],a.t+a.h*(1-i.y[0])]],g=n.center||{},p=o.rotation||{},x=s.range||[],_=l.range||[];if(n.fitbounds){u._length=v[1][0]-v[0][0],c._length=v[1][1]-v[0][1],u.range=dze(r,u),c.range=dze(r,c);let O=[];for(let ue of e){let K=ue[0].trace;K.visible===!0&&K._module.fitCoords&&O.push(K._module.fitCoords(ue,n))}let V=ZHt(r,u),j=V.min.reduce((ue,{val:K})=>Math.min(ue,K),1/0),U=V.max.reduce((ue,{val:K})=>Math.max(ue,K),-1/0)-j,J=YX.boundsOfCoords(O.flat()),[ee,,ce]=J||[],ye=ce-ee;if(!!J&&(U>360||U<360&&yeMath.max(le,ue(me)),0),ne=V.max.reduce((le,me)=>Math.max(le,K(me)),0),ae=u._length-_e-ne,pe=ae>u._length/10?ye*u._length/ae:ye,ie=(ee+ce)/2;u.range=[ie-pe/2,ie+pe/2]}var y=(u.range[0]+u.range[1])/2,C=(c.range[0]+c.range[1])/2;if(n._isScoped)g={lon:y,lat:C};else if(n._isClipped){g={lon:y,lat:C},p={lon:y,lat:C,roll:p.roll};var k=o.type,S=Id.lonaxisSpan[k]/2||180,L=Id.lataxisSpan[k]/2||90;x=[y-S,y+S],_=[C-L,C+L]}else g={lon:y,lat:C},p={lon:y,lat:p.lat,roll:p.roll}}f.center([g.lon-p.lon,g.lat-p.lat]).rotate([-p.lon,-p.lat,p.roll]).parallels(o.parallels);var w=pze(x,_);f.fitExtent(v,w);var A=this.bounds=f.getBounds(w),T=this.fitScale=f.scale(),m=f.translate();if(f.scaleExtent=()=>{var j;let{minscale:O}=o,V=(j=o.maxscale)!=null?j:1/0;return[T*Math.min(O,V),T*Math.max(O,V)]},n.fitbounds){var F=f.getBounds(pze(u.range,c.range)),E=Math.min((A[1][0]-A[0][0])/(F[1][0]-F[0][0]),(A[1][1]-A[0][1])/(F[1][1]-F[0][1]));isFinite(E)?f.scale(E*T):vM.warn("Something went wrong during"+this.id+"fitbounds computations.")}else f.scale(o.scale*T);var I=this.midPt=[(A[0][0]+A[1][0])/2,(A[0][1]+A[1][1])/2];if(f.translate([m[0]+(I[0]-m[0]),m[1]+(I[1]-m[1])]).clipExtent(A),n._isAlbersUsa){var R=f([g.lon,g.lat]);if(R){var B=f.translate();f.translate([B[0]-(R[0]-B[0]),B[1]-(R[1]-B[1])])}}};Lp.updateBaseLayers=function(e,t){var r=this,n=r.topojson,a=r.layers,i=r.basePaths;function o(v){return v==="lonaxis"||v==="lataxis"}function s(v){return!!Id.lineLayers[v]}function l(v){return!!Id.fillLayers[v]}var u=this.hasChoropleth?Id.layersForChoropleth:Id.layers,c=u.filter(function(v){return s(v)||l(v)?t["show"+v]:o(v)?t[v].showgrid:!0}),f=r.framework.selectAll(".layer").data(c,String);f.exit().each(function(v){delete a[v],delete i[v],M1.select(this).remove()}),f.enter().append("g").attr("class",function(v){return"layer "+v}).each(function(v){var g=a[v]=M1.select(this);v==="bg"?r.bgRect=g.append("rect").style("pointer-events","all"):o(v)?i[v]=g.append("path").style("fill","none"):v==="backplot"?g.append("g").classed("choroplethlayer",!0):v==="frontplot"?g.append("g").classed("scatterlayer",!0):s(v)?i[v]=g.append("path").style("fill","none").style("stroke-miterlimit",2):l(v)&&(i[v]=g.append("path").style("stroke","none"))}),f.order(),f.each(function(v){var g=i[v],p=Id.layerNameToAdjective[v];v==="frame"?g.datum(Id.sphereSVG):s(v)||l(v)?g.datum(tjt(n,n.objects[v])):o(v)&&g.datum(njt(v,t,e)).call(WP.stroke,t[v].gridcolor).call(dM.dashLine,t[v].griddash,t[v].gridwidth),s(v)?g.call(WP.stroke,t[p+"color"]).call(dM.dashLine,"",t[p+"width"]):l(v)&&g.call(WP.fill,t[p+"color"])})};Lp.updateDims=function(e,t){var r=this.bounds,n=(t.framewidth||0)/2,a=r[0][0]-n,i=r[0][1]-n,o=r[1][0]-a+n,s=r[1][1]-i+n;dM.setRect(this.clipRect,a,i,o,s),this.bgRect.call(dM.setRect,a,i,o,s).call(WP.fill,t.bgcolor),this.xaxis._offset=a,this.xaxis._length=o,this.yaxis._offset=i,this.yaxis._length=s};Lp.updateFx=function(e,t){var r=this,n=r.graphDiv,a=r.bgRect,i=e.dragmode,o=e.clickmode;if(r.isStatic)return;function s(){var f=r.viewInitial,v={};for(var g in f)v[r.id+"."+g]=f[g];WHt.call("_guiRelayout",n,v),n.emit("plotly_doubleclick",null)}function l(f){return r.projection.invert([f[0]+r.xaxis._offset,f[1]+r.yaxis._offset])}var u=function(f,v){if(v.isRect){var g=f.range={};g[r.id]=[l([v.xmin,v.ymin]),l([v.xmax,v.ymax])]}else{var p=f.lassoPoints={};p[r.id]=v.map(l)}},c={element:r.bgRect.node(),gd:n,plotinfo:{id:r.id,xaxis:r.xaxis,yaxis:r.yaxis,fillRangeItems:u},xaxes:[r.xaxis],yaxes:[r.yaxis],subplot:r.id,clickFn:function(f){f===2&&KHt(n)}};if(i==="pan"){a.node().onmousedown=null;let f=QHt(r,t);if(a.call(f),!M1.event){let v=r.projection.scale(),[g,p]=r.projection.scaleExtent();(vp)&&f.event(a)}a.on("dblclick.zoom",s),n._context._scrollZoom.geo||a.on("wheel.zoom",null)}else(i==="select"||i==="lasso")&&(a.on(".zoom",null),c.prepFn=function(f,v,g){$Ht(f,v,g,c,i)},HX.init(c));a.on("mousemove",function(){var f=r.projection.invert(vM.getPositionFromD3Event());if(!f)return HX.unhover(n,M1.event);r.xaxis.p2c=function(){return f[0]},r.yaxis.p2c=function(){return f[1]},hze.hover(n,M1.event,r.id)}),a.on("mouseout",function(){n._dragging||HX.unhover(n,M1.event)}),a.on("click",function(){i!=="select"&&i!=="lasso"&&(o.indexOf("select")>-1&&JHt(M1.event,n,[r.xaxis],[r.yaxis],r.id,c),o.indexOf("event")>-1&&hze.click(n,M1.event))})};Lp.makeFramework=function(){var e=this,t=e.graphDiv,r=t._fullLayout,n="clip"+r._uid+e.id;e.clipDef=r._clips.append("clipPath").attr("id",n),e.clipRect=e.clipDef.append("rect"),e.framework=M1.select(e.container).append("g").attr("class","geo "+e.id).call(dM.setClipUrl,n,t),e.project=function(a){var i=e.projection(a);return i?[i[0]-e.xaxis._offset,i[1]-e.yaxis._offset]:[null,null]},e.xaxis={_id:"x",c2p:function(a){return e.project(a)[0]}},e.yaxis={_id:"y",c2p:function(a){return e.project(a)[1]}},e.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},jX.setConvert(e.mockAxis,r)};Lp.saveViewInitial=function(e){var t=e.center||{},r=e.projection,n=r.rotation||{};this.viewInitial={fitbounds:e.fitbounds,"projection.scale":r.scale};var a;e._isScoped?a={"center.lon":t.lon,"center.lat":t.lat}:e._isClipped?a={"projection.rotation.lon":n.lon,"projection.rotation.lat":n.lat,"center.lon":t.lon,"center.lat":t.lat}:a={"center.lon":t.lon,"center.lat":t.lat,"projection.rotation.lon":n.lon},vM.extendFlat(this.viewInitial,a)};Lp.render=function(e){this._hasMarkerAngles&&e?this.plot(this._geoCalcData,this._fullLayout,[],!0):this._render()};Lp._render=function(){var e=this.projection,t=e.getPath(),r;function n(i){var o=e(i.lonlat);return o?YHt(o[0],o[1]):null}function a(i){return e.isLonLatOverEdges(i.lonlat)?"none":null}for(r in this.basePaths)this.basePaths[r].attr("d",t);for(r in this.dataPaths)this.dataPaths[r].attr("d",function(i){return t(i.geojson)});for(r in this.dataPoints)this.dataPoints[r].attr("display",a).attr("transform",n)};function rjt(e){var t=e.projection,r=t.type,n=Id.projNames[r];n="geo"+vM.titleCase(n);for(var a=WX[n]||jHt[n],i=a(),o=e._isSatellite?Math.acos(1/t.distance)*180/Math.PI:e._isClipped?Id.lonaxisSpan[r]/2:null,s=["center","rotate","parallels","clipExtent"],l=function(f){return f?i:[]},u=0;up}else return!1},i.getPath=function(){return GHt().projection(i)},i.getBounds=function(f){return i.getPath().bounds(f)},i.precision(Id.precision),e._isSatellite&&i.tilt(t.tilt).distance(t.distance),o&&i.clipAngle(o-Id.clipPad),i}function njt(e,t,r){var n=1e-6,a=2.5,i=t[e],o=Id.scopeDefaults[t.scope],s,l,u;e==="lonaxis"?(s=o.lonaxisRange,l=o.lataxisRange,u=function(C,k){return[C,k]}):e==="lataxis"&&(s=o.lataxisRange,l=o.lonaxisRange,u=function(C,k){return[k,C]});var c={type:"linear",range:[s[0],s[1]-n],tick0:i.tick0,dtick:i.dtick};jX.setConvert(c,r);var f=jX.calcTicks(c);!t.isScoped&&e==="lonaxis"&&f.pop();for(var v=f.length,g=new Array(v),p=0;p{"use strict";var l5=tc(),ijt=nl().attributes,ajt=Uc().dash,s5=lM(),ojt=rl().overrideAll,_ze=(bx(),Gs(_x)).default,bze={range:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},showgrid:{valType:"boolean",dflt:!1},tick0:{valType:"number",dflt:0},dtick:{valType:"number"},gridcolor:{valType:"color",dflt:l5.lightLine},gridwidth:{valType:"number",min:0,dflt:1},griddash:ajt},sjt=wze.exports=ojt({domain:ijt({name:"geo"},{}),fitbounds:{valType:"enumerated",values:[!1,"locations","geojson"],dflt:"locations",editType:"plot"},resolution:{valType:"enumerated",values:[110,50],dflt:110,coerceNumber:!0},scope:{valType:"enumerated",values:_ze(s5.scopeDefaults),dflt:"world"},projection:{type:{valType:"enumerated",values:_ze(s5.projNames)},rotation:{lon:{valType:"number"},lat:{valType:"number"},roll:{valType:"number"}},tilt:{valType:"number",dflt:0},distance:{valType:"number",min:1.001,dflt:2},parallels:{valType:"info_array",items:[{valType:"number"},{valType:"number"}]},scale:{valType:"number",min:0,dflt:1},minscale:{valType:"number",min:0,dflt:0},maxscale:{valType:"number",min:0,dflt:null}},center:{lon:{valType:"number"},lat:{valType:"number"}},visible:{valType:"boolean",dflt:!0},showcoastlines:{valType:"boolean"},coastlinecolor:{valType:"color",dflt:l5.defaultLine},coastlinewidth:{valType:"number",min:0,dflt:1},showland:{valType:"boolean",dflt:!1},landcolor:{valType:"color",dflt:s5.landColor},showocean:{valType:"boolean",dflt:!1},oceancolor:{valType:"color",dflt:s5.waterColor},showlakes:{valType:"boolean",dflt:!1},lakecolor:{valType:"color",dflt:s5.waterColor},showrivers:{valType:"boolean",dflt:!1},rivercolor:{valType:"color",dflt:s5.waterColor},riverwidth:{valType:"number",min:0,dflt:1},showcountries:{valType:"boolean"},countrycolor:{valType:"color",dflt:l5.defaultLine},countrywidth:{valType:"number",min:0,dflt:1},showsubunits:{valType:"boolean"},subunitcolor:{valType:"color",dflt:l5.defaultLine},subunitwidth:{valType:"number",min:0,dflt:1},showframe:{valType:"boolean"},framecolor:{valType:"color",dflt:l5.defaultLine},framewidth:{valType:"number",min:0,dflt:1},bgcolor:{valType:"color",dflt:l5.background},lonaxis:bze,lataxis:bze},"plot","from-root");sjt.uirevision={valType:"any",editType:"none"}});var Mze=fe((f5r,Aze)=>{"use strict";var YP=Xt(),ljt=b2(),ujt=jf().getSubplotData,{unwrapLonRange:cjt}=Cg(),pM=lM(),fjt=XX(),Tze=pM.axesNames;Aze.exports=function(t,r,n){ljt(t,r,n,{type:"geo",attributes:fjt,handleDefaults:hjt,fullData:n,partition:"y"})};function hjt(e,t,r,n){var a=ujt(n.fullData,"geo",n.id),i=a.map(function(J){return J.index}),o=r("resolution"),s=r("scope"),l=pM.scopeDefaults[s],u=r("projection.type",l.projType),c=t._isAlbersUsa=u==="albers usa";c&&(s=t.scope="usa");var f=t._isScoped=s!=="world",v=t._isSatellite=u==="satellite",g=t._isConic=u.indexOf("conic")!==-1||u==="albers",p=t._isClipped=!!pM.lonaxisSpan[u];if(e.visible===!1){var x=YP.extendDeep({},t._template);x.showcoastlines=!1,x.showcountries=!1,x.showframe=!1,x.showlakes=!1,x.showland=!1,x.showocean=!1,x.showrivers=!1,x.showsubunits=!1,x.lonaxis&&(x.lonaxis.showgrid=!1),x.lataxis&&(x.lataxis.showgrid=!1),t._template=x}for(var _=r("visible"),y,C=0;C_e[ne]!=null)||pM.fitboundsIncompatible.has(u)?t.fitbounds=!1:ue.forEach(({dst:_e,key:ne})=>_e&&(_e[ne]=null))}}});var ZX=fe((h5r,kze)=>{"use strict";var djt=jf().getSubplotCalcData,vjt=Xt().counterRegex,pjt=xze(),S1="geo",Sze=vjt(S1),Eze={};Eze[S1]={valType:"subplotid",dflt:S1,editType:"calc"};function gjt(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[S1],a=0;a{"use strict";Cze.exports={attributes:a5(),supplyDefaults:rIe(),colorbar:Zf(),formatLabels:aIe(),calc:mX(),calcGeoJSON:VP().calcGeoJSON,fitCoords:VP().fitCoords,plot:VP().plot,style:RX(),styleOnSelect:Ld().styleOnSelect,hoverPoints:KIe(),eventData:QIe(),selectPoints:rze(),moduleType:"trace",name:"scattergeo",basePlotModule:ZX(),categories:["geo","symbols","showLegend","scatter-like"],meta:{}}});var Fze=fe((v5r,Pze)=>{"use strict";Pze.exports=Lze()});var gM=fe((p5r,Ize)=>{"use strict";var{hovertemplateAttrs:xjt,templatefallbackAttrs:_jt}=Oo(),wy=a5(),bjt=_s(),Dze=Ho(),wjt=tc().defaultLine,by=ta().extendFlat,Rze=wy.marker.line;Ize.exports=by({locations:{valType:"data_array",editType:"calc"},locationmode:wy.locationmode,z:{valType:"data_array",editType:"calc"},geojson:by({},wy.geojson,{}),featureidkey:wy.featureidkey,text:by({},wy.text,{}),hovertext:by({},wy.hovertext,{}),marker:{line:{color:by({},Rze.color,{dflt:wjt}),width:by({},Rze.width,{dflt:1}),editType:"calc"},opacity:{valType:"number",arrayOk:!0,min:0,max:1,dflt:1,editType:"style"},editType:"calc"},selected:{marker:{opacity:wy.selected.marker.opacity,editType:"plot"},editType:"plot"},unselected:{marker:{opacity:wy.unselected.marker.opacity,editType:"plot"},editType:"plot"},hoverinfo:by({},Dze.hoverinfo,{editType:"calc",flags:["location","z","text","name"]}),hovertemplate:xjt(),hovertemplatefallback:_jt(),showlegend:by({},Dze.showlegend,{dflt:!1})},bjt("",{cLetter:"z",editTypeOverride:"calc"}))});var qze=fe((g5r,zze)=>{"use strict";var XP=Xt(),Tjt=Vc(),Ajt=gM();zze.exports=function(t,r,n,a){function i(v,g){return XP.coerce(t,r,Ajt,v,g)}var o=i("locations"),s=i("z");if(!(o&&o.length&&XP.isArrayOrTypedArray(s)&&s.length)){r.visible=!1;return}r._length=Math.min(o.length,s.length);var l=i("geojson"),u;(typeof l=="string"&&l!==""||XP.isPlainObject(l))&&(u="geojson-id");var c=i("locationmode",u);c==="geojson-id"&&i("featureidkey"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var f=i("marker.line.width");f&&i("marker.line.color"),i("marker.opacity"),Tjt(t,r,a,i,{prefix:"",cLetter:"z"}),XP.coerceSelectionMarkerOpacity(r,i)}});var $X=fe((m5r,Nze)=>{"use strict";var Bze=aa(),Mjt=Wa().BADNUM,Sjt=Mh(),Ejt=o1(),kjt=P0();function Oze(e){return e&&typeof e=="string"}Nze.exports=function(t,r){var n=r._length,a=new Array(n),i;r.geojson?i=function(c){return Oze(c)||Bze(c)}:i=Oze;for(var o=0;o{"use strict";var Cjt=xi(),Ljt=ni(),KX=ea(),Pjt=js();function Fjt(e,t){t&&Uze(e,t)}function Uze(e,t){var r=t[0].trace,n=t[0].node3,a=n.selectAll(".choroplethlocation"),i=r.marker||{},o=i.line||{},s=Pjt.makeColorScaleFuncFromTrace(r);a.each(function(l){Cjt.select(this).attr("fill",s(l.z)).call(Ljt.stroke,l.mlc||o.color).call(KX.dashLine,"",l.mlw||o.width||0).style("opacity",i.opacity)}),KX.selectedPointStyle(a,r)}function Djt(e,t){var r=t[0].node3,n=t[0].trace;n.selectedpoints?KX.selectedPointStyle(r.selectAll(".choroplethlocation"),n):Uze(e,t)}Vze.exports={style:Fjt,styleOnSelect:Djt}});var $P=fe((x5r,jze)=>{"use strict";var Rjt=xi(),Gze=Xt(),s_=Cg(),Ijt=EP().getTopojsonFeatures,Hze=rp().findExtremes,zjt=ZP().style;function qjt(e,t,r){var n=t.layers.backplot.select(".choroplethlayer");Gze.makeTraceGroups(n,r,"trace choropleth").each(function(a){var i=Rjt.select(this),o=i.selectAll("path.choroplethlocation").data(Gze.identity);o.enter().append("path").classed("choroplethlocation",!0),o.exit().remove(),zjt(e,a)})}function Bjt(e,t){var r=e[0].trace,n=t[r.geo],a=n._subplot,i=r.locationmode,o=r._length,s=i==="geojson-id"?s_.extractTraceFeature(e):Ijt(r,a.topojson);let l=s_.fitGeojsonBbox(r,n);for(var u=[],c=[],f=0;f{"use strict";var Njt=Yi(),Ujt=gM(),Vjt=Xt().fillText,{ANTIMERIDIAN_LON_SHIFT:Gjt}=Cg();Wze.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.subplot,s,l,u,c,f=[r,n];let v=[r+Gjt,n];for(l=0;l")}}});var QX=fe((b5r,Yze)=>{"use strict";Yze.exports=function(t,r,n,a,i){t.location=r.location,t.z=r.z;var o=a[i];return o.fIn&&o.fIn.properties&&(t.properties=o.fIn.properties),t.ct=o.ct,t}});var eZ=fe((w5r,Xze)=>{"use strict";Xze.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l,u,c,f;if(r===!1)for(s=0;s{"use strict";Zze.exports={attributes:gM(),supplyDefaults:qze(),colorbar:H3(),calc:$X(),calcGeoJSON:$P().calcGeoJSON,fitCoords:$P().fitCoords,plot:$P().plot,style:ZP().style,styleOnSelect:ZP().styleOnSelect,hoverPoints:JX(),eventData:QX(),selectPoints:eZ(),moduleType:"trace",name:"choropleth",basePlotModule:ZX(),categories:["geo","noOpacity","showLegend"],meta:{}}});var Jze=fe((A5r,Kze)=>{"use strict";Kze.exports=$ze()});var KP=fe((M5r,eqe)=>{"use strict";var jjt=bi(),U0=Xt(),Wjt=_3();function Yjt(e,t,r,n){var a=e.cd,i=a[0].t,o=a[0].trace,s=e.xa,l=e.ya,u=i.x,c=i.y,f=s.c2p(t),v=l.c2p(r),g=e.distance,p;if(i.tree){var x=s.p2c(f-g),_=s.p2c(f+g),y=l.p2c(v-g),C=l.p2c(v+g);n==="x"?p=i.tree.range(Math.min(x,_),Math.min(l._rl[0],l._rl[1]),Math.max(x,_),Math.max(l._rl[0],l._rl[1])):p=i.tree.range(Math.min(x,_),Math.min(y,C),Math.max(x,_),Math.max(y,C))}else p=i.ids;var k,S,L,w,A,T,m,F,E,I=g;if(n==="x"){var R=!!o.xperiodalignment,B=!!o.yperiodalignment;for(A=0;A=Math.min(O,V)&&f<=Math.max(O,V)?0:1/0}if(T=Math.min(j,q)&&v<=Math.max(j,q)?0:1/0}E=Math.sqrt(T*T+m*m),S=p[A]}}}else for(A=p.length-1;A>-1;A--)k=p[A],L=u[k],w=c[k],T=s.c2p(L)-f,m=l.c2p(w)-v,F=Math.sqrt(T*T+m*m),F{"use strict";var tqe=20;rqe.exports={TOO_MANY_POINTS:1e5,SYMBOL_SDF_SIZE:200,SYMBOL_SIZE:tqe,SYMBOL_STROKE:tqe/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]}}});var mM=fe((E5r,oqe)=>{"use strict";var Xjt=Ho(),Zjt=Ds(),$jt=n1(),Ll=Ol(),nqe=pl().axisHoverFormat,iqe=_s(),Kjt=(bx(),Gs(_x)).default,tZ=ta().extendFlat,Jjt=rl().overrideAll,Qjt=Ty().DASHES,aqe=Ll.line,Lg=Ll.marker,eWt=Lg.line,Ay=oqe.exports=Jjt({x:Ll.x,x0:Ll.x0,dx:Ll.dx,y:Ll.y,y0:Ll.y0,dy:Ll.dy,xperiod:Ll.xperiod,yperiod:Ll.yperiod,xperiod0:Ll.xperiod0,yperiod0:Ll.yperiod0,xperiodalignment:Ll.xperiodalignment,yperiodalignment:Ll.yperiodalignment,xhoverformat:nqe("x"),yhoverformat:nqe("y"),text:Ll.text,hovertext:Ll.hovertext,textposition:Ll.textposition,textfont:Zjt({noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,editType:"calc",colorEditType:"style",arrayOk:!0,noNumericWeightValues:!0,variantValues:["normal","small-caps"]}),mode:{valType:"flaglist",flags:["lines","markers","text"],extras:["none"]},line:{color:aqe.color,width:aqe.width,shape:{valType:"enumerated",values:["linear","hv","vh","hvh","vhv"],dflt:"linear",editType:"plot"},dash:{valType:"enumerated",values:Kjt(Qjt),dflt:"solid"}},marker:tZ({},iqe("marker"),{symbol:Lg.symbol,angle:Lg.angle,size:Lg.size,sizeref:Lg.sizeref,sizemin:Lg.sizemin,sizemode:Lg.sizemode,opacity:Lg.opacity,colorbar:Lg.colorbar,line:tZ({},iqe("marker.line"),{width:eWt.width})}),connectgaps:Ll.connectgaps,fill:tZ({},Ll.fill,{dflt:"none"}),fillcolor:$jt(),selected:{marker:Ll.selected.marker,textfont:Ll.selected.textfont},unselected:{marker:Ll.unselected.marker,textfont:Ll.unselected.textfont},opacity:Xjt.opacity},"calc","nested");Ay.x.editType=Ay.y.editType=Ay.x0.editType=Ay.y0.editType="calc+clearAxisTypes";Ay.hovertemplate=Ll.hovertemplate;Ay.hovertemplatefallback=Ll.hovertemplatefallback;Ay.texttemplate=Ll.texttemplate;Ay.texttemplatefallback=Ll.texttemplatefallback});var JP=fe(rZ=>{"use strict";var sqe=Ty();rZ.isOpenSymbol=function(e){return typeof e=="string"?sqe.OPEN_RE.test(e):e%200>100};rZ.isDotSymbol=function(e){return typeof e=="string"?sqe.DOT_RE.test(e):e>200}});var cqe=fe((C5r,uqe)=>{"use strict";var lqe=Xt(),tWt=bi(),rWt=JP(),nWt=mM(),iWt=r1(),QP=Is(),aWt=r2(),oWt=sp(),sWt=vv(),lWt=lp(),uWt=a1(),cWt=up();uqe.exports=function(t,r,n,a){function i(g,p){return lqe.coerce(t,r,nWt,g,p)}var o=t.marker?rWt.isOpenSymbol(t.marker.symbol):!1,s=QP.isBubble(t),l=aWt(t,r,a,i);if(!l){r.visible=!1;return}oWt(t,r,a,i),i("xhoverformat"),i("yhoverformat");var u=l{"use strict";var fWt=cC();fqe.exports=function(t,r,n){var a=t.i;return"x"in t||(t.x=r._x[a]),"y"in t||(t.y=r._y[a]),fWt(t,r,n)}});var vqe=fe((P5r,dqe)=>{"use strict";function hWt(e,t,r,n,a){for(var i=a+1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>=0?(i=o,a=o-1):n=o+1}return i}function dWt(e,t,r,n,a){for(var i=a+1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l>0?(i=o,a=o-1):n=o+1}return i}function vWt(e,t,r,n,a){for(var i=n-1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<0?(i=o,n=o+1):a=o-1}return i}function pWt(e,t,r,n,a){for(var i=n-1;n<=a;){var o=n+a>>>1,s=e[o],l=r!==void 0?r(s,t):s-t;l<=0?(i=o,n=o+1):a=o-1}return i}function gWt(e,t,r,n,a){for(;n<=a;){var i=n+a>>>1,o=e[i],s=r!==void 0?r(o,t):o-t;if(s===0)return i;s<=0?n=i+1:a=i-1}return-1}function yM(e,t,r,n,a,i){return typeof r=="function"?i(e,t,r,n===void 0?0:n|0,a===void 0?e.length-1:a|0):i(e,t,void 0,r===void 0?0:r|0,n===void 0?e.length-1:n|0)}dqe.exports={ge:function(e,t,r,n,a){return yM(e,t,r,n,a,hWt)},gt:function(e,t,r,n,a){return yM(e,t,r,n,a,dWt)},lt:function(e,t,r,n,a){return yM(e,t,r,n,a,vWt)},le:function(e,t,r,n,a){return yM(e,t,r,n,a,pWt)},eq:function(e,t,r,n,a){return yM(e,t,r,n,a,gWt)}}});var nZ=fe((F5r,pqe)=>{pqe.exports=mWt;function mWt(e,t,r){return tr?r:e:et?t:e}});var E1=fe((D5r,mqe)=>{"use strict";mqe.exports=function(t,r,n){var a={},i,o;if(typeof r=="string"&&(r=gqe(r)),Array.isArray(r)){var s={};for(o=0;o{"use strict";var yWt=E1();yqe.exports=xWt;function xWt(e){var t;return arguments.length>1&&(e=arguments),typeof e=="string"?e=e.split(/\s/).map(parseFloat):typeof e=="number"&&(e=[e]),e.length&&typeof e[0]=="number"?e.length===1?t={width:e[0],height:e[0],x:0,y:0}:e.length===2?t={width:e[0],height:e[1],x:0,y:0}:t={x:e[0],y:e[1],width:e[2]-e[0]||0,height:e[3]-e[1]||0}:e&&(e=yWt(e,{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"}),t={x:e.left||0,y:e.top||0},e.width==null?e.right?t.width=e.right-t.x:t.width=0:t.width=e.width,e.height==null?e.bottom?t.height=e.bottom-t.y:t.height=0:t.height=e.height),t}});var l_=fe((I5r,xqe)=>{"use strict";xqe.exports=_Wt;function _Wt(e,t){if(!e||e.length==null)throw Error("Argument should be an array");t==null?t=1:t=Math.floor(t);for(var r=Array(t*2),n=0;na&&(a=e[o]),e[o]{"use strict";_qe.exports=function(){for(var t=0;t{wqe.exports=function(e){switch(e){case"int8":return Int8Array;case"int16":return Int16Array;case"int32":return Int32Array;case"uint8":return Uint8Array;case"uint16":return Uint16Array;case"uint32":return Uint32Array;case"float32":return Float32Array;case"float64":return Float64Array;case"array":return Array;case"uint8_clamped":return Uint8ClampedArray}}});var u_=fe((B5r,Aqe)=>{var Tqe=eF();Aqe.exports=bWt;function bWt(e,t,r){if(!e)throw new TypeError("must specify data as first parameter");if(r=+(r||0)|0,Array.isArray(e)&&e[0]&&typeof e[0][0]=="number"){var n=e[0].length,a=e.length*n,i,o,s,l;(!t||typeof t=="string")&&(t=new(Tqe(t||"float32"))(a+r));var u=t.length-r;if(a!==u)throw new Error("source length "+a+" ("+n+"x"+e.length+") does not match destination length "+u);for(i=0,s=r;i{"use strict";Mqe.exports=function(e){var t=typeof e;return e!==null&&(t==="object"||t==="function")}});var kqe=fe((N5r,Eqe)=>{"use strict";Eqe.exports=Math.log2||function(e){return Math.log(e)*Math.LOG2E}});var Iqe=fe((U5r,Rqe)=>{"use strict";var Cqe=vqe(),Lqe=nZ(),wWt=u5(),TWt=l_(),Pqe=E1(),aZ=bqe(),AWt=u_(),MWt=Sqe(),SWt=eF(),Fqe=kqe(),EWt=1073741824;Rqe.exports=function(t,r){r||(r={}),t=AWt(t,"float64"),r=Pqe(r,{bounds:"range bounds dataBox databox",maxDepth:"depth maxDepth maxdepth level maxLevel maxlevel levels",dtype:"type dtype format out dst output destination"});let n=aZ(r.maxDepth,255),a=aZ(r.bounds,TWt(t,2));a[0]===a[2]&&a[2]++,a[1]===a[3]&&a[3]++;let i=Dqe(t,a),o=t.length>>>1,s;r.dtype||(r.dtype="array"),typeof r.dtype=="string"?s=new(SWt(r.dtype))(o):r.dtype&&(s=r.dtype,Array.isArray(s)&&(s.length=o));for(let y=0;yn||w>EWt){for(let q=0;qce||m>ye||F=I||J===ee)return;let xe=l[U];ee===void 0&&(ee=xe.length);for(let me=J;me=S&&De<=w&&Ge>=L&&Ge<=A&&R.push(be)}let ue=u[U],K=ue[J*4+0],_e=ue[J*4+1],ne=ue[J*4+2],ae=ue[J*4+3],pe=O(ue,J+1),ie=q*.5,le=U+1;B(V,j,ie,le,K,_e||ne||ae||pe),B(V,j+ie,ie,le,_e,ne||ae||pe),B(V+ie,j,ie,le,ne,ae||pe),B(V+ie,j+ie,ie,le,ae,pe)}function O(V,j){let q=null,U=0;for(;q===null;)if(q=V[j*4+U],U++,U>V.length)return null;return q}return R}function x(y,C,k,S,L){let w=[];for(let A=0;A{"use strict";zqe.exports=Iqe()});var Bqe=fe((G5r,qqe)=>{qqe.exports=CWt;var oZ={a:7,c:6,h:1,l:2,m:2,q:4,s:4,t:2,v:1,z:0},kWt=/([astvzqmhlc])([^astvzqmhlc]*)/ig;function CWt(e){var t=[];return e.replace(kWt,function(r,n,a){var i=n.toLowerCase();for(a=PWt(a),i=="m"&&a.length>2&&(t.push([n].concat(a.splice(0,2))),i="l",n=n=="m"?"l":"L");;){if(a.length==oZ[i])return a.unshift(n),t.push(a);if(a.length{Oqe.exports=FWt;function FWt(e){var t=0,r=0,n=0,a=0;return e.map(function(i){i=i.slice();var o=i[0],s=o.toUpperCase();if(o!=s)switch(i[0]=s,o){case"a":i[6]+=n,i[7]+=a;break;case"v":i[1]+=a;break;case"h":i[1]+=n;break;default:for(var l=1;l{"use strict";Object.defineProperty(rF,"__esModule",{value:!0});var DWt=(function(){function e(t,r){var n=[],a=!0,i=!1,o=void 0;try{for(var s=t[Symbol.iterator](),l;!(a=(l=s.next()).done)&&(n.push(l.value),!(r&&n.length===r));a=!0);}catch(u){i=!0,o=u}finally{try{!a&&s.return&&s.return()}finally{if(i)throw o}}return n}return function(t,r){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return e(t,r);throw new TypeError("Invalid attempt to destructure non-iterable instance")}})(),xM=Math.PI*2,sZ=function(t,r,n,a,i,o,s){var l=t.x,u=t.y;l*=r,u*=n;var c=a*l-i*u,f=i*l+a*u;return{x:c+o,y:f+s}},RWt=function(t,r){var n=r===1.5707963267948966?.551915024494:r===-1.5707963267948966?-.551915024494:1.3333333333333333*Math.tan(r/4),a=Math.cos(t),i=Math.sin(t),o=Math.cos(t+r),s=Math.sin(t+r);return[{x:a-i*n,y:i+a*n},{x:o+s*n,y:s-o*n},{x:o,y:s}]},Uqe=function(t,r,n,a){var i=t*a-r*n<0?-1:1,o=t*n+r*a;return o>1&&(o=1),o<-1&&(o=-1),i*Math.acos(o)},IWt=function(t,r,n,a,i,o,s,l,u,c,f,v){var g=Math.pow(i,2),p=Math.pow(o,2),x=Math.pow(f,2),_=Math.pow(v,2),y=g*p-g*_-p*x;y<0&&(y=0),y/=g*_+p*x,y=Math.sqrt(y)*(s===l?-1:1);var C=y*i/o*v,k=y*-o/i*f,S=c*C-u*k+(t+n)/2,L=u*C+c*k+(r+a)/2,w=(f-C)/i,A=(v-k)/o,T=(-f-C)/i,m=(-v-k)/o,F=Uqe(1,0,w,A),E=Uqe(w,A,T,m);return l===0&&E>0&&(E-=xM),l===1&&E<0&&(E+=xM),[S,L,F,E]},zWt=function(t){var r=t.px,n=t.py,a=t.cx,i=t.cy,o=t.rx,s=t.ry,l=t.xAxisRotation,u=l===void 0?0:l,c=t.largeArcFlag,f=c===void 0?0:c,v=t.sweepFlag,g=v===void 0?0:v,p=[];if(o===0||s===0)return[];var x=Math.sin(u*xM/360),_=Math.cos(u*xM/360),y=_*(r-a)/2+x*(n-i)/2,C=-x*(r-a)/2+_*(n-i)/2;if(y===0&&C===0)return[];o=Math.abs(o),s=Math.abs(s);var k=Math.pow(y,2)/Math.pow(o,2)+Math.pow(C,2)/Math.pow(s,2);k>1&&(o*=Math.sqrt(k),s*=Math.sqrt(k));var S=IWt(r,n,a,i,o,s,f,g,x,_,y,C),L=DWt(S,4),w=L[0],A=L[1],T=L[2],m=L[3],F=Math.abs(m)/(xM/4);Math.abs(1-F)<1e-7&&(F=1);var E=Math.max(Math.ceil(F),1);m/=E;for(var I=0;I{"use strict";jqe.exports=BWt;var qWt=Gqe();function BWt(e){for(var t,r=[],n=0,a=0,i=0,o=0,s=null,l=null,u=0,c=0,f=0,v=e.length;f4?(n=g[g.length-4],a=g[g.length-3]):(n=u,a=c),r.push(g)}return r}function nF(e,t,r,n){return["C",e,t,r,n,r,n]}function Hqe(e,t,r,n,a,i){return["C",e/3+2/3*r,t/3+2/3*n,a/3+2/3*r,i/3+2/3*n,a,i]}});var lZ=fe((W5r,Yqe)=>{"use strict";Yqe.exports=function(t){return typeof t!="string"?!1:(t=t.trim(),!!(/^[mzlhvcsqta]\s*[-+.0-9][^mlhvzcsqta]+/i.test(t)&&/[\dz]$/i.test(t)&&t.length>4))}});var Zqe=fe((Y5r,Xqe)=>{"use strict";var OWt=Bqe(),NWt=Nqe(),UWt=Wqe(),VWt=lZ();Xqe.exports=GWt;function GWt(e){if(Array.isArray(e)&&e.length===1&&typeof e[0]=="string"&&(e=e[0]),typeof e=="string"){if(!VWt(e))throw Error("String is not an SVG path.");e=OWt(e)}if(!Array.isArray(e))throw Error("Argument should be a string or an array of path segments.");if(e=NWt(e),e=UWt(e),!e.length)return[0,0,0,0];for(var t=[1/0,1/0,-1/0,-1/0],r=0,n=e.length;rt[2]&&(t[2]=a[i+0]),a[i+1]>t[3]&&(t[3]=a[i+1]);return t}});var Qqe=fe((X5r,Jqe)=>{"use strict";Jqe.exports=HWt;var _M=1e20;function HWt(e,t){t||(t={});var r=t.cutoff==null?.25:t.cutoff,n=t.radius==null?8:t.radius,a=t.channel||0,i,o,s,l,u,c,f,v,g,p,x;if(ArrayBuffer.isView(e)||Array.isArray(e)){if(!t.width||!t.height)throw Error("For raw data width and height should be provided by options");i=t.width,o=t.height,l=e,t.stride?c=t.stride:c=Math.floor(e.length/i/o)}else window.HTMLCanvasElement&&e instanceof window.HTMLCanvasElement?(v=e,f=v.getContext("2d"),i=v.width,o=v.height,g=f.getImageData(0,0,i,o),l=g.data,c=4):window.CanvasRenderingContext2D&&e instanceof window.CanvasRenderingContext2D?(v=e.canvas,f=e,i=v.width,o=v.height,g=f.getImageData(0,0,i,o),l=g.data,c=4):window.ImageData&&e instanceof window.ImageData&&(g=e,i=e.width,o=e.height,l=g.data,c=4);if(s=Math.max(i,o),window.Uint8ClampedArray&&l instanceof window.Uint8ClampedArray||window.Uint8Array&&l instanceof window.Uint8Array)for(u=l,l=Array(i*o),p=0,x=Math.floor(u.length/c);pnBe});function nBe(e,t={}){if(!(0,tBe.default)(e))throw Error("Invalid SVG path");let r,n;t.shape||Array.isArray(t)?[r,n]=t.shape||t:(r=uZ.width=t.width||t.w||200,n=uZ.height=t.height||t.h||200);let a=Math.min(r,n),i=t.stroke||0,o=t.viewbox||t.viewBox||(0,eBe.default)(e),s=[r/(o[2]-o[0]),n/(o[3]-o[1])],l=Math.min(s[0]||0,s[1]||0)/2;Pp.fillStyle="black",Pp.fillRect(0,0,r,n),Pp.fillStyle="white",i&&(typeof i!="number"&&(i=1),Pp.strokeStyle=i>0?"white":"black",Pp.lineWidth=Math.abs(i)),Pp.translate(r*.5,n*.5),Pp.scale(l,l);let u=new Path2D(e);return Pp.fill(u),i&&Pp.stroke(u),Pp.setTransform(1,0,0,1,0,0),(0,rBe.default)(Pp,{cutoff:t.cutoff!=null?t.cutoff:.5,radius:t.radius!=null?t.radius:a*.5})}var eBe,tBe,rBe,uZ,Pp,aBe=Co(()=>{eBe=$0(Zqe()),tBe=$0(lZ()),rBe=$0(Qqe()),uZ=document.createElement("canvas"),Pp=uZ.getContext("2d",{willReadFrequently:!0})});var f_=fe((Z5r,gBe)=>{"use strict";var aF=aa(),jWt=(aBe(),Gs(iBe)).default,{normalize:iF}=ni(),WWt=bi(),h5=Xt(),Nu=h5.isArrayOrTypedArray,c5=ea(),oBe=El(),sBe=Sg().formatColor,f5=Is(),YWt=lT(),fZ=JP(),bM=Ty(),XWt=Y1().DESELECTDIM,lBe={start:1,left:1,end:-1,right:-1,middle:0,center:0,bottom:1,top:-1},ZWt=Sd().appendArrayPointValue;function $Wt(e,t){var r,n={marker:void 0,markerSel:void 0,markerUnsel:void 0,line:void 0,fill:void 0,errorX:void 0,errorY:void 0,text:void 0,textSel:void 0,textUnsel:void 0},a=e._context.plotGlPixelRatio;if(t.visible!==!0)return n;if(f5.hasText(t)&&(n.text=pBe(e,t),n.textSel=cBe(e,t,t.selected),n.textUnsel=cBe(e,t,t.unselected)),f5.hasMarkers(t)&&(n.marker=dZ(e,t),n.markerSel=hZ(e,t,t.selected),n.markerUnsel=hZ(e,t,t.unselected),!t.unselected&&Nu(t.marker.opacity))){var i=t.marker.opacity;for(n.markerUnsel.opacity=new Array(i.length),r=0;r500?"bold":"normal":e}function dZ(e,t){var r=t._length,n=t.marker,a={},i,o=Nu(n.symbol),s=Nu(n.angle),l=Nu(n.color),u=Nu(n.line.color),c=Nu(n.opacity),f=Nu(n.size),v=Nu(n.line.width),g;if(o||(g=fZ.isOpenSymbol(n.symbol)),o||l||u||c||s){a.symbols=new Array(r),a.angles=new Array(r),a.colors=new Array(r),a.borderColors=new Array(r);var p=n.symbol,x=n.angle,_=sBe(n,n.opacity,r),y=sBe(n.line,n.opacity,r);if(!Nu(y[0])){var C=y;for(y=Array(r),i=0;ibM.TOO_MANY_POINTS||f5.hasMarkers(t)?"rect":"round";if(u&&t.connectgaps){var f=i[0],v=i[1];for(o=0;o1?l[o]:l[0]:l,g=Nu(u)?u.length>1?u[o]:u[0]:u,p=lBe[v],x=lBe[g],_=c?c/.8+1:0,y=-x*_-x*.5;i.offset[o]=[p*_/f,y/f]}}return i}gBe.exports={style:$Wt,markerStyle:dZ,markerSelection:hZ,linePositions:JWt,errorBarPositions:QWt,textPosition:eYt}});var vZ=fe(($5r,mBe)=>{"use strict";var oF=Xt();mBe.exports=function(t,r){var n=r._scene,a={count:0,dirty:!0,lineOptions:[],fillOptions:[],markerOptions:[],markerSelectedOptions:[],markerUnselectedOptions:[],errorXOptions:[],errorYOptions:[],textOptions:[],textSelectedOptions:[],textUnselectedOptions:[],selectBatch:[],unselectBatch:[]},i={fill2d:!1,scatter2d:!1,error2d:!1,line2d:!1,glText:!1,select2d:!1};return r._scene||(n=r._scene={},n.init=function(){oF.extendFlat(n,i,a)},n.init(),n.update=function(s){var l=oF.repeat(s,n.count);if(n.fill2d&&n.fill2d.update(l),n.scatter2d&&n.scatter2d.update(l),n.line2d&&n.line2d.update(l),n.error2d&&n.error2d.update(l.concat(l)),n.select2d&&n.select2d.update(l),n.glText)for(var u=0;u{"use strict";var tYt=tF(),d5=Xt(),yBe=El(),rYt=rp().findExtremes,xBe=cp(),pZ=gv(),nYt=pZ.calcMarkerSize,iYt=pZ.calcAxisExpansion,aYt=pZ.setFirstScatter,oYt=pv(),v5=f_(),sYt=vZ(),_Be=Wa().BADNUM,lYt=Ty().TOO_MANY_POINTS;wBe.exports=function(t,r){var n=t._fullLayout,a=r._xA=yBe.getFromId(t,r.xaxis,"x"),i=r._yA=yBe.getFromId(t,r.yaxis,"y"),o=n._plots[r.xaxis+r.yaxis],s=r._length,l=s>=lYt,u=s*2,c={},f,v=a.makeCalcdata(r,"x"),g=i.makeCalcdata(r,"y"),p=xBe(r,a,"x",v),x=xBe(r,i,"y",g),_=p.vals,y=x.vals;r._x=_,r._y=y,r.xperiodalignment&&(r._origX=v,r._xStarts=p.starts,r._xEnds=p.ends),r.yperiodalignment&&(r._origY=g,r._yStarts=x.starts,r._yEnds=x.ends);var C=new Array(u),k=new Array(s);for(f=0;f1&&d5.extendFlat(o.line,v5.linePositions(e,r,n)),o.errorX||o.errorY){var s=v5.errorBarPositions(e,r,n,a,i);o.errorX&&d5.extendFlat(o.errorX,s.x),o.errorY&&d5.extendFlat(o.errorY,s.y)}return o.text&&(d5.extendFlat(o.text,{positions:n},v5.textPosition(e,r,o.text,o.marker)),d5.extendFlat(o.textSel,{positions:n},v5.textPosition(e,r,o.text,o.markerSel)),d5.extendFlat(o.textUnsel,{positions:n},v5.textPosition(e,r,o.text,o.markerUnsel))),o}});var gZ=fe((J5r,MBe)=>{"use strict";var ABe=Xt(),cYt=ni(),fYt=Y1().DESELECTDIM;function hYt(e){var t=e[0],r=t.trace,n=t.t,a=n._scene,i=n.index,o=a.selectBatch[i],s=a.unselectBatch[i],l=a.textOptions[i],u=a.textSelectedOptions[i]||{},c=a.textUnselectedOptions[i]||{},f=ABe.extendFlat({},l),v,g;if(o.length||s.length){var p=u.color,x=c.color,_=l.color,y=ABe.isArrayOrTypedArray(_);for(f.color=new Array(r._length),v=0;v{"use strict";var SBe=Is(),dYt=gZ().styleTextSelection;EBe.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s=n[0].trace,l=n[0].t,u=s._length,c=l.x,f=l.y,v=l._scene,g=l.index;if(!v)return o;var p=SBe.hasText(s),x=SBe.hasMarkers(s),_=!x&&!p;if(s.visible!==!0||_)return o;var y=[],C=[];if(r!==!1&&!r.degenerate)for(var k=0;k{"use strict";var vYt=KP();kBe.exports={moduleType:"trace",name:"scattergl",basePlotModule:gu(),categories:["gl","regl","cartesian","symbols","errorBarsOK","showLegend","scatter-like"],attributes:mM(),supplyDefaults:cqe(),crossTraceDefaults:aU(),colorbar:Zf(),formatLabels:hqe(),calc:TBe(),hoverPoints:vYt.hoverPoints,selectPoints:mZ(),meta:{}}});var PBe=fe((t4r,LBe)=>{"use strict";LBe.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]}});var IBe=fe((r4r,RBe)=>{"use strict";var FBe=PBe();RBe.exports=pYt;var DBe={red:0,orange:60,yellow:120,green:180,blue:240,purple:300};function pYt(e){var t,r=[],n=1,a;if(typeof e=="string")if(e=e.toLowerCase(),FBe[e])r=FBe[e].slice(),a="rgb";else if(e==="transparent")n=0,a="rgb",r=[0,0,0];else if(/^#[A-Fa-f0-9]+$/.test(e)){var i=e.slice(1),o=i.length,s=o<=4;n=1,s?(r=[parseInt(i[0]+i[0],16),parseInt(i[1]+i[1],16),parseInt(i[2]+i[2],16)],o===4&&(n=parseInt(i[3]+i[3],16)/255)):(r=[parseInt(i[0]+i[1],16),parseInt(i[2]+i[3],16),parseInt(i[4]+i[5],16)],o===8&&(n=parseInt(i[6]+i[7],16)/255)),r[0]||(r[0]=0),r[1]||(r[1]=0),r[2]||(r[2]=0),a="rgb"}else if(t=/^((?:rgb|hs[lvb]|hwb|cmyk?|xy[zy]|gray|lab|lchu?v?|[ly]uv|lms)a?)\s*\(([^\)]*)\)/.exec(e)){var l=t[1],u=l==="rgb",i=l.replace(/a$/,"");a=i;var o=i==="cmyk"?4:i==="gray"?1:3;r=t[2].trim().split(/\s*[,\/]\s*|\s+/).map(function(v,g){if(/%$/.test(v))return g===o?parseFloat(v)/100:i==="rgb"?parseFloat(v)*255/100:parseFloat(v);if(i[g]==="h"){if(/deg$/.test(v))return parseFloat(v);if(DBe[v]!==void 0)return DBe[v]}return parseFloat(v)}),l===i&&r.push(1),n=u||r[o]===void 0?1:r[o],r=r.slice(0,o)}else e.length>10&&/[0-9](?:\s|\/)/.test(e)&&(r=e.match(/([0-9]+)/g).map(function(c){return parseFloat(c)}),a=e.match(/([a-z])/ig).join("").toLowerCase());else isNaN(e)?Array.isArray(e)||e.length?(r=[e[0],e[1],e[2]],a="rgb",n=e.length===4?e[3]:1):e instanceof Object&&(e.r!=null||e.red!=null||e.R!=null?(a="rgb",r=[e.r||e.red||e.R||0,e.g||e.green||e.G||0,e.b||e.blue||e.B||0]):(a="hsl",r=[e.h||e.hue||e.H||0,e.s||e.saturation||e.S||0,e.l||e.lightness||e.L||e.b||e.brightness]),n=e.a||e.alpha||e.opacity||1,e.opacity!=null&&(n/=100)):(a="rgb",r=[e>>>16,(e&65280)>>>8,e&255]);return{space:a,values:r,alpha:n}}});var qBe=fe((n4r,zBe)=>{"use strict";var gYt=IBe();zBe.exports=function(t){Array.isArray(t)&&t.raw&&(t=String.raw.apply(null,arguments));var r,n,a,i=gYt(t);if(!i.space)return[];var o=[0,0,0],s=i.space[0]==="h"?[360,100,100]:[255,255,255];return r=Array(3),r[0]=Math.min(Math.max(i.values[0],o[0]),s[0]),r[1]=Math.min(Math.max(i.values[1],o[1]),s[1]),r[2]=Math.min(Math.max(i.values[2],o[2]),s[2]),i.space[0]==="h"&&(r=mYt(r)),r.push(Math.min(Math.max(i.alpha,0),1)),r};function mYt(e){var t=e[0]/360,r=e[1]/100,n=e[2]/100,a,i,o,s,l,u=0;if(r===0)return l=n*255,[l,l,l];for(i=n<.5?n*(1+r):n+r-n*r,a=2*n-i,s=[0,0,0];u<3;)o=t+1/3*-(u-1),o<0?o++:o>1&&o--,l=6*o<1?a+(i-a)*6*o:2*o<1?i:3*o<2?a+(i-a)*(2/3-o)*6:a,s[u++]=l*255;return s}});var wM=fe((i4r,BBe)=>{"use strict";var yYt=qBe(),xYt=eF();BBe.exports=function(t,r){(r==="float"||!r)&&(r="array"),r==="uint"&&(r="uint8"),r==="uint_clamped"&&(r="uint8_clamped");var n=xYt(r),a=new n(4),i=r!=="uint8"&&r!=="uint8_clamped";return(!t.length||typeof t=="string")&&(t=yYt(t),t[0]/=255,t[1]/=255,t[2]/=255),_Yt(t)?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:255,i&&(a[0]/=255,a[1]/=255,a[2]/=255,a[3]/=255),a):(i?(a[0]=t[0],a[1]=t[1],a[2]=t[2],a[3]=t[3]!=null?t[3]:1):(a[0]=Math.min(Math.max(Math.floor(t[0]*255),0),255),a[1]=Math.min(Math.max(Math.floor(t[1]*255),0),255),a[2]=Math.min(Math.max(Math.floor(t[2]*255),0),255),a[3]=t[3]==null?255:Math.min(Math.max(Math.floor(t[3]*255),0),255)),a)};function _Yt(e){return!!(e instanceof Uint8Array||e instanceof Uint8ClampedArray||Array.isArray(e)&&(e[0]>1||e[0]===0)&&(e[1]>1||e[1]===0)&&(e[2]>1||e[2]===0)&&(!e[3]||e[3]>1))}});var NBe=fe((a4r,lF)=>{"use strict";var sF=nZ();lF.exports=OBe;lF.exports.to=OBe;lF.exports.from=bYt;function OBe(e,t){t==null&&(t=!0);var r=e[0],n=e[1],a=e[2],i=e[3];i==null&&(i=t?1:255),t&&(r*=255,n*=255,a*=255,i*=255),r=sF(r,0,255)&255,n=sF(n,0,255)&255,a=sF(a,0,255)&255,i=sF(i,0,255)&255;var o=r*16777216+(n<<16)+(a<<8)+i;return o}function bYt(e,t){e=+e;var r=e>>>24,n=(e&16711680)>>>16,a=(e&65280)>>>8,i=e&255;return t===!1?[r,n,a,i]:[r/255,n/255,a/255,i/255]}});var VBe=fe((o4r,UBe)=>{UBe.exports=function(e){typeof e=="string"&&(e=[e]);for(var t=[].slice.call(arguments,1),r=[],n=0;n{"use strict";GBe.exports=function(t,r,n){Array.isArray(n)||(n=[].slice.call(arguments,2));for(var a=0,i=n.length;a{"use strict";p5.exports=TM;p5.exports.float32=p5.exports.float=TM;p5.exports.fract32=p5.exports.fract=wYt;var HBe=new Float32Array(1);function wYt(e,t){if(e.length){if(e instanceof Float32Array)return new Float32Array(e.length);t instanceof Float32Array||(t=TM(e));for(var r=0,n=t.length;r{"use strict";var TYt=wM(),AYt=l_(),MYt=NBe(),SYt=tF(),cF=VBe(),EYt=E1(),kYt=yZ(),CYt=u_(),fF=uF(),LYt=u5(),PYt=rh;function rh(e,t){if(!(this instanceof rh))return new rh(e,t);typeof e=="function"?(t||(t={}),t.regl=e):(t=e,e=null),t&&t.length&&(t.positions=t),e=t.regl;let r=e._gl,n,a=[],i={},o=[],s=[null],l=[null],u=255,c=100;this.tooManyColors=!1,n=e.texture({data:new Uint8Array(u*4),width:u,height:1,type:"uint8",format:"rgba",wrapS:"clamp",wrapT:"clamp",mag:"nearest",min:"nearest"}),Object.assign(this,{regl:e,gl:r,groups:o,markerCache:l,markerTextures:s,palette:a,paletteIds:i,paletteTexture:n,maxColors:u,maxSize:c,canvas:r.canvas}),this.update(t);let f={uniforms:{constPointSize:!!t.constPointSize,opacity:e.prop("opacity"),paletteSize:(p,x)=>[this.tooManyColors?0:u,n.height],pixelRatio:e.context("pixelRatio"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translate:e.prop("translate"),translateFract:e.prop("translateFract"),markerTexture:e.prop("markerTexture"),paletteTexture:n},attributes:{x:(p,x)=>x.xAttr||{buffer:x.positionBuffer,stride:8,offset:0},y:(p,x)=>x.yAttr||{buffer:x.positionBuffer,stride:8,offset:4},xFract:(p,x)=>x.xAttr?{constant:[0,0]}:{buffer:x.positionFractBuffer,stride:8,offset:0},yFract:(p,x)=>x.yAttr?{constant:[0,0]}:{buffer:x.positionFractBuffer,stride:8,offset:4},size:(p,x)=>x.size.length?{buffer:x.sizeBuffer,stride:2,offset:0}:{constant:[Math.round(x.size*255/this.maxSize)]},borderSize:(p,x)=>x.borderSize.length?{buffer:x.sizeBuffer,stride:2,offset:1}:{constant:[Math.round(x.borderSize*255/this.maxSize)]},colorId:(p,x)=>x.color.length?{buffer:x.colorBuffer,stride:this.tooManyColors?8:4,offset:0}:{constant:this.tooManyColors?a.slice(x.color*4,x.color*4+4):[x.color]},borderColorId:(p,x)=>x.borderColor.length?{buffer:x.colorBuffer,stride:this.tooManyColors?8:4,offset:this.tooManyColors?4:2}:{constant:this.tooManyColors?a.slice(x.borderColor*4,x.borderColor*4+4):[x.borderColor]},isActive:(p,x)=>x.activation===!0?{constant:[1]}:x.activation?x.activation:{constant:[0]}},blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:{enable:!1},depth:{enable:!1},elements:e.prop("elements"),count:e.prop("count"),offset:e.prop("offset"),primitive:"points"},v=Object.assign({},f);v.frag=cF([`precision highp float; #define GLSLIFY 1 uniform float opacity; uniform sampler2D markerTexture; varying vec4 fragColor, fragBorderColor; varying float fragWidth, fragBorderColorLevel, fragColorLevel; float smoothStep(float x, float y) { return 1.0 / (1.0 + exp(50.0*(x - y))); } void main() { float dist = texture2D(markerTexture, gl_PointCoord).r, delta = fragWidth; // max-distance alpha if (dist < 0.003) discard; // null-border case if (fragBorderColorLevel == fragColorLevel || fragBorderColor.a == 0.) { float colorAmt = smoothstep(.5 - delta, .5 + delta, dist); gl_FragColor = vec4(fragColor.rgb, colorAmt * fragColor.a * opacity); } else { float borderColorAmt = smoothstep(fragBorderColorLevel - delta, fragBorderColorLevel + delta, dist); float colorAmt = smoothstep(fragColorLevel - delta, fragColorLevel + delta, dist); vec4 color = fragBorderColor; color.a *= borderColorAmt; color = mix(color, fragColor, colorAmt); color.a *= opacity; gl_FragColor = color; } } `]),v.vert=cF([`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 scale, scaleFract, translate, translateFract, paletteSize; uniform sampler2D paletteTexture; const float maxSize = 100.; const float borderLevel = .5; varying vec4 fragColor, fragBorderColor; varying float fragPointSize, fragBorderRadius, fragWidth, fragBorderColorLevel, fragColorLevel; 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 = 2. * size * pointSizeScale; fragPointSize = size * pixelRatio; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; gl_Position = vec4(pos * 2. - 1., 0., 1.); fragColor = color; fragBorderColor = borderColor; fragWidth = 1. / gl_PointSize; fragBorderColorLevel = clamp(borderLevel - borderLevel * borderSize / size, 0., 1.); fragColorLevel = clamp(borderLevel + (1. - borderLevel) * borderSize / size, 0., 1.); } `]),this.drawMarker=e(v);let g=Object.assign({},f);g.frag=cF([`precision highp float; #define GLSLIFY 1 varying vec4 fragColor, fragBorderColor; varying float fragBorderRadius, fragWidth; uniform float opacity; float smoothStep(float edge0, float edge1, float x) { float t; t = clamp((x - edge0) / (edge1 - edge0), 0.0, 1.0); return t * t * (3.0 - 2.0 * t); } void main() { float radius, alpha = 1.0, delta = fragWidth; radius = length(2.0 * gl_PointCoord.xy - 1.0); if (radius > 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; } `]),g.vert=cF([`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; } `]),this.drawCircle=e(g)}rh.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};rh.prototype.render=function(){return arguments.length&&this.update(...arguments),this.draw(),this};rh.prototype.draw=function(){for(var e=arguments.length,t=new Array(e),r=0;r{this.drawItem(i)});return this};rh.prototype.drawItem=function(e,t){let{groups:r}=this,n=r[e];if(typeof t=="number"&&(e=t,n=r[t],t=null),!(n&&n.count&&n.opacity))return;n.activation[0]&&this.drawCircle(this.getMarkerDrawOptions(0,n,t));let a=[];for(let i=1;i{let f=n[c];if(u===void 0)return f;u===null?u={positions:null}:typeof u=="function"?u={ondraw:u}:typeof u[0]=="number"&&(u={positions:u}),u=EYt(u,{positions:"positions data points",snap:"snap cluster lod tree",size:"sizes size radius",borderSize:"borderSizes borderSize border-size bordersize borderWidth borderWidths border-width borderwidth stroke-width strokeWidth strokewidth outline",color:"colors color fill fill-color fillColor",borderColor:"borderColors borderColor stroke stroke-color strokeColor",marker:"markers marker shape",range:"range dataBox databox",viewport:"viewport viewPort viewBox viewbox",opacity:"opacity alpha transparency",bounds:"bound bounds boundaries limits",tooManyColors:"tooManyColors palette paletteMode optimizePalette enablePalette"}),u.positions===null&&(u.positions=[]),u.tooManyColors!=null&&(this.tooManyColors=u.tooManyColors),f||(n[c]=f={id:c,scale:null,translate:null,scaleFract:null,translateFract:null,activation:[],selectionBuffer:i.buffer({data:new Uint8Array(0),usage:"stream",type:"uint8"}),sizeBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),colorBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"uint8"}),positionBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"}),positionFractBuffer:i.buffer({data:new Uint8Array(0),usage:"dynamic",type:"float"})},u=Object.assign({},rh.defaults,u)),u.positions&&!("marker"in u)&&(u.marker=f.marker,delete f.marker),u.marker&&!("positions"in u)&&(u.positions=f.positions,delete f.positions);let v=0,g=0;if(kYt(f,u,[{snap:!0,size:(p,x)=>(p==null&&(p=rh.defaults.size),v+=p&&p.length?1:0,p),borderSize:(p,x)=>(p==null&&(p=rh.defaults.borderSize),v+=p&&p.length?1:0,p),opacity:parseFloat,color:(p,x)=>(p==null&&(p=rh.defaults.color),p=this.updateColor(p),g++,p),borderColor:(p,x)=>(p==null&&(p=rh.defaults.borderColor),p=this.updateColor(p),g++,p),bounds:(p,x,_)=>("range"in _||(_.range=null),p),positions:(p,x,_)=>{let{snap:y}=x,{positionBuffer:C,positionFractBuffer:k,selectionBuffer:S}=x;if(p.x||p.y)return p.x.length?x.xAttr={buffer:i.buffer(p.x),offset:0,stride:4,count:p.x.length}:x.xAttr={buffer:p.x.buffer,offset:p.x.offset*4||0,stride:(p.x.stride||1)*4,count:p.x.count},p.y.length?x.yAttr={buffer:i.buffer(p.y),offset:0,stride:4,count:p.y.length}:x.yAttr={buffer:p.y.buffer,offset:p.y.offset*4||0,stride:(p.y.stride||1)*4,count:p.y.count},x.count=Math.max(x.xAttr.count,x.yAttr.count),p;p=CYt(p,"float64");let L=x.count=Math.floor(p.length/2),w=x.bounds=L?AYt(p,2):null;if(!_.range&&!x.range&&(delete x.range,_.range=w),!_.marker&&!x.marker&&(delete x.marker,_.marker=null),y&&(y===!0||L>y)?x.tree=SYt(p,{bounds:w}):y&&y.length&&(x.tree=y),x.tree){let m={primitive:"points",usage:"static",data:x.tree,type:"uint32"};x.elements?x.elements(m):x.elements=i.elements(m)}var A=fF.float32(p);C({data:A,usage:"dynamic"});var T=fF.fract32(p,A);return k({data:T,usage:"dynamic"}),S({data:new Uint8Array(L),type:"uint8",usage:"stream"}),p}},{marker:(p,x,_)=>{let{activation:y}=x;if(y.forEach(C=>C&&C.destroy&&C.destroy()),y.length=0,!p||typeof p[0]=="number"){let C=this.addMarker(p);y[C]=!0}else{let C=[];for(let k=0,S=Math.min(p.length,x.count);k{let y=x.bounds;if(y)return p||(p=y),x.scale=[1/(p[2]-p[0]),1/(p[3]-p[1])],x.translate=[-p[0],-p[1]],x.scaleFract=fF.fract(x.scale),x.translateFract=fF.fract(x.translate),p},viewport:p=>LYt(p||[a.drawingBufferWidth,a.drawingBufferHeight])}]),v){let{count:p,size:x,borderSize:_,sizeBuffer:y}=f,C=new Uint8Array(p*2);if(x.length||_.length)for(let k=0;k=0)return a;let i;if(e instanceof Uint8Array||e instanceof Uint8ClampedArray)i=e;else{i=new Uint8Array(e.length);for(let s=0,l=e.length;sn*4&&(this.tooManyColors=!0),this.updatePalette(r),a.length===1?a[0]:a};rh.prototype.updatePalette=function(e){if(this.tooManyColors)return;let{maxColors:t,paletteTexture:r}=this,n=Math.ceil(e.length*.25/t);if(n>1){e=e.slice();for(let a=e.length*.25%t;a{e.sizeBuffer.destroy(),e.positionBuffer.destroy(),e.positionFractBuffer.destroy(),e.colorBuffer.destroy(),e.activation.forEach(t=>t&&t.destroy&&t.destroy()),e.selectionBuffer.destroy(),e.elements&&e.elements.destroy()}),this.groups.length=0,this.paletteTexture.destroy(),this.markerTextures.forEach(e=>e&&e.destroy&&e.destroy()),this};var FYt=function(e,t){var r=new PYt(e,t),n=r.render.bind(r);return Object.assign(n,{render:n,update:r.update.bind(r),draw:r.draw.bind(r),destroy:r.destroy.bind(r),regl:r.regl,gl:r.gl,canvas:r.gl.canvas,groups:r.groups,markers:r.markerCache,palette:r.palette}),n};jBe.exports=FYt});var Zc=fe((c4r,YBe)=>{"use strict";var WBe=Object.getOwnPropertySymbols,DYt=Object.prototype.hasOwnProperty,RYt=Object.prototype.propertyIsEnumerable;function IYt(e){if(e==null)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}function zYt(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de",Object.getOwnPropertyNames(e)[0]==="5")return!1;for(var t={},r=0;r<10;r++)t["_"+String.fromCharCode(r)]=r;var n=Object.getOwnPropertyNames(t).map(function(i){return t[i]});if(n.join("")!=="0123456789")return!1;var a={};return"abcdefghijklmnopqrst".split("").forEach(function(i){a[i]=i}),Object.keys(Object.assign({},a)).join("")==="abcdefghijklmnopqrst"}catch(i){return!1}}YBe.exports=zYt()?Object.assign:function(e,t){for(var r,n=IYt(e),a,i=1;i{"use strict";TZ.exports=vF;TZ.exports.default=vF;function vF(e,t,r){r=r||2;var n=t&&t.length,a=n?t[0]*r:e.length,i=ZBe(e,0,a,r,!0),o=[];if(!i||i.next===i.prev)return o;var s,l,u,c,f,v,g;if(n&&(i=UYt(e,t,i,r)),e.length>80*r){s=u=e[0],l=c=e[1];for(var p=r;pu&&(u=f),v>c&&(c=v);g=Math.max(u-s,c-l),g=g!==0?32767/g:0}return AM(i,o,r,s,l,g,0),o}function ZBe(e,t,r,n,a){var i,o;if(a===wZ(e,t,r,n)>0)for(i=t;i=t;i-=n)o=XBe(i,e[i],e[i+1],o);return o&&pF(o,o.next)&&(SM(o),o=o.next),o}function h_(e,t){if(!e)return e;t||(t=e);var r=e,n;do if(n=!1,!r.steiner&&(pF(r,r.next)||Uu(r.prev,r,r.next)===0)){if(SM(r),r=t=r.prev,r===r.next)break;n=!0}else r=r.next;while(n||r!==t);return t}function AM(e,t,r,n,a,i,o){if(e){!o&&i&&WYt(e,n,a,i);for(var s=e,l,u;e.prev!==e.next;){if(l=e.prev,u=e.next,i?BYt(e,n,a,i):qYt(e)){t.push(l.i/r|0),t.push(e.i/r|0),t.push(u.i/r|0),SM(e),e=u.next,s=u.next;continue}if(e=u,e===s){o?o===1?(e=OYt(h_(e),t,r),AM(e,t,r,n,a,i,2)):o===2&&NYt(e,t,r,n,a,i):AM(h_(e),t,r,n,a,i,1);break}}}}function qYt(e){var t=e.prev,r=e,n=e.next;if(Uu(t,r,n)>=0)return!1;for(var a=t.x,i=r.x,o=n.x,s=t.y,l=r.y,u=n.y,c=ai?a>o?a:o:i>o?i:o,g=s>l?s>u?s:u:l>u?l:u,p=n.next;p!==t;){if(p.x>=c&&p.x<=v&&p.y>=f&&p.y<=g&&g5(a,s,i,l,o,u,p.x,p.y)&&Uu(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function BYt(e,t,r,n){var a=e.prev,i=e,o=e.next;if(Uu(a,i,o)>=0)return!1;for(var s=a.x,l=i.x,u=o.x,c=a.y,f=i.y,v=o.y,g=sl?s>u?s:u:l>u?l:u,_=c>f?c>v?c:v:f>v?f:v,y=_Z(g,p,t,r,n),C=_Z(x,_,t,r,n),k=e.prevZ,S=e.nextZ;k&&k.z>=y&&S&&S.z<=C;){if(k.x>=g&&k.x<=x&&k.y>=p&&k.y<=_&&k!==a&&k!==o&&g5(s,c,l,f,u,v,k.x,k.y)&&Uu(k.prev,k,k.next)>=0||(k=k.prevZ,S.x>=g&&S.x<=x&&S.y>=p&&S.y<=_&&S!==a&&S!==o&&g5(s,c,l,f,u,v,S.x,S.y)&&Uu(S.prev,S,S.next)>=0))return!1;S=S.nextZ}for(;k&&k.z>=y;){if(k.x>=g&&k.x<=x&&k.y>=p&&k.y<=_&&k!==a&&k!==o&&g5(s,c,l,f,u,v,k.x,k.y)&&Uu(k.prev,k,k.next)>=0)return!1;k=k.prevZ}for(;S&&S.z<=C;){if(S.x>=g&&S.x<=x&&S.y>=p&&S.y<=_&&S!==a&&S!==o&&g5(s,c,l,f,u,v,S.x,S.y)&&Uu(S.prev,S,S.next)>=0)return!1;S=S.nextZ}return!0}function OYt(e,t,r){var n=e;do{var a=n.prev,i=n.next.next;!pF(a,i)&&$Be(a,n,n.next,i)&&MM(a,i)&&MM(i,a)&&(t.push(a.i/r|0),t.push(n.i/r|0),t.push(i.i/r|0),SM(n),SM(n.next),n=e=i),n=n.next}while(n!==e);return h_(n)}function NYt(e,t,r,n,a,i){var o=e;do{for(var s=o.next.next;s!==o.prev;){if(o.i!==s.i&&ZYt(o,s)){var l=KBe(o,s);o=h_(o,o.next),l=h_(l,l.next),AM(o,t,r,n,a,i,0),AM(l,t,r,n,a,i,0);return}s=s.next}o=o.next}while(o!==e)}function UYt(e,t,r,n){var a=[],i,o,s,l,u;for(i=0,o=t.length;i=r.next.y&&r.next.y!==r.y){var s=r.x+(a-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(s<=n&&s>i&&(i=s,o=r.x=r.x&&r.x>=u&&n!==r.x&&g5(ao.x||r.x===o.x&&jYt(o,r)))&&(o=r,f=v)),r=r.next;while(r!==l);return o}function jYt(e,t){return Uu(e.prev,e,t.prev)<0&&Uu(t.next,e,e.next)<0}function WYt(e,t,r,n){var a=e;do a.z===0&&(a.z=_Z(a.x,a.y,t,r,n)),a.prevZ=a.prev,a.nextZ=a.next,a=a.next;while(a!==e);a.prevZ.nextZ=null,a.prevZ=null,YYt(a)}function YYt(e){var t,r,n,a,i,o,s,l,u=1;do{for(r=e,e=null,i=null,o=0;r;){for(o++,n=r,s=0,t=0;t0||l>0&&n;)s!==0&&(l===0||!n||r.z<=n.z)?(a=r,r=r.nextZ,s--):(a=n,n=n.nextZ,l--),i?i.nextZ=a:e=a,a.prevZ=i,i=a;r=n}i.nextZ=null,u*=2}while(o>1);return e}function _Z(e,t,r,n,a){return e=(e-r)*a|0,t=(t-n)*a|0,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1}function XYt(e){var t=e,r=e;do(t.x=(e-o)*(i-s)&&(e-o)*(n-s)>=(r-o)*(t-s)&&(r-o)*(i-s)>=(a-o)*(n-s)}function ZYt(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!$Yt(e,t)&&(MM(e,t)&&MM(t,e)&&KYt(e,t)&&(Uu(e.prev,e,t.prev)||Uu(e,t.prev,t))||pF(e,t)&&Uu(e.prev,e,e.next)>0&&Uu(t.prev,t,t.next)>0)}function Uu(e,t,r){return(t.y-e.y)*(r.x-t.x)-(t.x-e.x)*(r.y-t.y)}function pF(e,t){return e.x===t.x&&e.y===t.y}function $Be(e,t,r,n){var a=dF(Uu(e,t,r)),i=dF(Uu(e,t,n)),o=dF(Uu(r,n,e)),s=dF(Uu(r,n,t));return!!(a!==i&&o!==s||a===0&&hF(e,r,t)||i===0&&hF(e,n,t)||o===0&&hF(r,e,n)||s===0&&hF(r,t,n))}function hF(e,t,r){return t.x<=Math.max(e.x,r.x)&&t.x>=Math.min(e.x,r.x)&&t.y<=Math.max(e.y,r.y)&&t.y>=Math.min(e.y,r.y)}function dF(e){return e>0?1:e<0?-1:0}function $Yt(e,t){var r=e;do{if(r.i!==e.i&&r.next.i!==e.i&&r.i!==t.i&&r.next.i!==t.i&&$Be(r,r.next,e,t))return!0;r=r.next}while(r!==e);return!1}function MM(e,t){return Uu(e.prev,e,e.next)<0?Uu(e,t,e.next)>=0&&Uu(e,e.prev,t)>=0:Uu(e,t,e.prev)<0||Uu(e,e.next,t)<0}function KYt(e,t){var r=e,n=!1,a=(e.x+t.x)/2,i=(e.y+t.y)/2;do r.y>i!=r.next.y>i&&r.next.y!==r.y&&a<(r.next.x-r.x)*(i-r.y)/(r.next.y-r.y)+r.x&&(n=!n),r=r.next;while(r!==e);return n}function KBe(e,t){var r=new bZ(e.i,e.x,e.y),n=new bZ(t.i,t.x,t.y),a=e.next,i=t.prev;return e.next=t,t.prev=e,r.next=a,a.prev=r,n.next=r,r.prev=n,i.next=n,n.prev=i,n}function XBe(e,t,r,n){var a=new bZ(e,t,r);return n?(a.next=n.next,a.prev=n,n.next.prev=a,n.next=a):(a.prev=a,a.next=a),a}function SM(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function bZ(e,t,r){this.i=e,this.x=t,this.y=r,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}vF.deviation=function(e,t,r,n){var a=t&&t.length,i=a?t[0]*r:e.length,o=Math.abs(wZ(e,0,i,r));if(a)for(var s=0,l=t.length;s0&&(n+=e[a-1].length,r.holes.push(n))}return r}});var eOe=fe((h4r,QBe)=>{"use strict";var JYt=l_();QBe.exports=QYt;function QYt(e,t,r){if(!e||e.length==null)throw Error("Argument should be an array");t==null&&(t=1),r==null&&(r=JYt(e,t));for(var n=0;n{"use strict";tOe.exports=function(){var e,t;if(typeof WeakMap!="function")return!1;try{e=new WeakMap([[t={},"one"],[{},"two"],[{},"three"]])}catch(r){return!1}return!(String(e)!=="[object WeakMap]"||typeof e.set!="function"||e.set({},1)!==e||typeof e.delete!="function"||typeof e.has!="function"||e.get(t)!=="one")}});var iOe=fe((v4r,nOe)=>{"use strict";nOe.exports=function(){}});var My=fe((p4r,aOe)=>{"use strict";var eXt=iOe()();aOe.exports=function(e){return e!==eXt&&e!==null}});var AZ=fe((g4r,sOe)=>{"use strict";var tXt=Object.create,rXt=Object.getPrototypeOf,oOe={};sOe.exports=function(){var e=Object.setPrototypeOf,t=arguments[0]||tXt;return typeof e!="function"?!1:rXt(e(t(null),oOe))===oOe}});var MZ=fe((m4r,lOe)=>{"use strict";var nXt=My(),iXt={function:!0,object:!0};lOe.exports=function(e){return nXt(e)&&iXt[typeof e]||!1}});var Pg=fe((y4r,uOe)=>{"use strict";var aXt=My();uOe.exports=function(e){if(!aXt(e))throw new TypeError("Cannot use null or undefined");return e}});var fOe=fe((x4r,cOe)=>{"use strict";var SZ=Object.create,gF;AZ()()||(gF=EZ());cOe.exports=(function(){var e,t,r;return!gF||gF.level!==1?SZ:(e={},t={},r={configurable:!1,enumerable:!1,writable:!0,value:void 0},Object.getOwnPropertyNames(Object.prototype).forEach(function(n){if(n==="__proto__"){t[n]={configurable:!0,enumerable:!1,writable:!0,value:void 0};return}t[n]=r}),Object.defineProperties(e,t),Object.defineProperty(gF,"nullPolyfill",{configurable:!1,enumerable:!1,writable:!1,value:e}),function(n,a){return SZ(n===null?e:n,a)})})()});var EZ=fe((_4r,hOe)=>{"use strict";var oXt=MZ(),sXt=Pg(),lXt=Object.prototype.isPrototypeOf,uXt=Object.defineProperty,cXt={configurable:!0,enumerable:!1,writable:!0,value:void 0},mF;mF=function(e,t){if(sXt(e),t===null||oXt(t))return e;throw new TypeError("Prototype must be null or an object")};hOe.exports=(function(e){var t,r;return e?(e.level===2?e.set?(r=e.set,t=function(n,a){return r.call(mF(n,a),a),n}):t=function(n,a){return mF(n,a).__proto__=a,n}:t=function n(a,i){var o;return mF(a,i),o=lXt.call(n.nullPolyfill,a),o&&delete n.nullPolyfill.__proto__,i===null&&(i=n.nullPolyfill),a.__proto__=i,o&&uXt(n.nullPolyfill,"__proto__",cXt),a},Object.defineProperty(t,"level",{configurable:!1,enumerable:!1,writable:!1,value:e.level})):null})((function(){var e=Object.create(null),t={},r,n=Object.getOwnPropertyDescriptor(Object.prototype,"__proto__");if(n){try{r=n.set,r.call(e,t)}catch(a){}if(Object.getPrototypeOf(e)===t)return{set:r,level:2}}return e.__proto__=t,Object.getPrototypeOf(e)===t?{level:2}:(e={},e.__proto__=t,Object.getPrototypeOf(e)===t?{level:1}:!1)})());fOe()});var yF=fe((b4r,dOe)=>{"use strict";dOe.exports=AZ()()?Object.setPrototypeOf:EZ()});var pOe=fe((w4r,vOe)=>{"use strict";var fXt=MZ();vOe.exports=function(e){if(!fXt(e))throw new TypeError(e+" is not an Object");return e}});var mOe=fe((T4r,gOe)=>{"use strict";var hXt=Object.create(null),dXt=Math.random;gOe.exports=function(){var e;do e=dXt().toString(36).slice(2);while(hXt[e]);return e}});var d_=fe((A4r,yOe)=>{"use strict";var vXt=void 0;yOe.exports=function(e){return e!==vXt&&e!==null}});var kZ=fe((M4r,xOe)=>{"use strict";var pXt=d_(),gXt={object:!0,function:!0,undefined:!0};xOe.exports=function(e){return pXt(e)?hasOwnProperty.call(gXt,typeof e):!1}});var bOe=fe((S4r,_Oe)=>{"use strict";var mXt=kZ();_Oe.exports=function(e){if(!mXt(e))return!1;try{return e.constructor?e.constructor.prototype===e:!1}catch(t){return!1}}});var TOe=fe((E4r,wOe)=>{"use strict";var yXt=bOe();wOe.exports=function(e){if(typeof e!="function"||!hasOwnProperty.call(e,"length"))return!1;try{if(typeof e.length!="number"||typeof e.call!="function"||typeof e.apply!="function")return!1}catch(t){return!1}return!yXt(e)}});var CZ=fe((k4r,AOe)=>{"use strict";var xXt=TOe(),_Xt=/^\s*class[\s{/}]/,bXt=Function.prototype.toString;AOe.exports=function(e){return!(!xXt(e)||_Xt.test(bXt.call(e)))}});var SOe=fe((C4r,MOe)=>{"use strict";MOe.exports=function(){var e=Object.assign,t;return typeof e!="function"?!1:(t={foo:"raz"},e(t,{bar:"dwa"},{trzy:"trzy"}),t.foo+t.bar+t.trzy==="razdwatrzy")}});var kOe=fe((L4r,EOe)=>{"use strict";EOe.exports=function(){try{return Object.keys("primitive"),!0}catch(e){return!1}}});var LOe=fe((P4r,COe)=>{"use strict";var wXt=My(),TXt=Object.keys;COe.exports=function(e){return TXt(wXt(e)?Object(e):e)}});var FOe=fe((F4r,POe)=>{"use strict";POe.exports=kOe()()?Object.keys:LOe()});var ROe=fe((D4r,DOe)=>{"use strict";var AXt=FOe(),MXt=Pg(),SXt=Math.max;DOe.exports=function(e,t){var r,n,a=SXt(arguments.length,2),i;for(e=Object(MXt(e)),i=function(o){try{e[o]=t[o]}catch(s){r||(r=s)}},n=1;n{"use strict";IOe.exports=SOe()()?Object.assign:ROe()});var LZ=fe((I4r,zOe)=>{"use strict";var EXt=My(),kXt=Array.prototype.forEach,CXt=Object.create,LXt=function(e,t){var r;for(r in e)t[r]=e[r]};zOe.exports=function(e){var t=CXt(null);return kXt.call(arguments,function(r){EXt(r)&&LXt(Object(r),t)}),t}});var BOe=fe((z4r,qOe)=>{"use strict";var PZ="razdwatrzy";qOe.exports=function(){return typeof PZ.contains!="function"?!1:PZ.contains("dwa")===!0&&PZ.contains("foo")===!1}});var NOe=fe((q4r,OOe)=>{"use strict";var PXt=String.prototype.indexOf;OOe.exports=function(e){return PXt.call(this,e,arguments[1])>-1}});var FZ=fe((B4r,UOe)=>{"use strict";UOe.exports=BOe()()?String.prototype.contains:NOe()});var Fg=fe((O4r,jOe)=>{"use strict";var _F=d_(),VOe=CZ(),GOe=xF(),HOe=LZ(),EM=FZ(),FXt=jOe.exports=function(e,t){var r,n,a,i,o;return arguments.length<2||typeof e!="string"?(i=t,t=e,e=null):i=arguments[2],_F(e)?(r=EM.call(e,"c"),n=EM.call(e,"e"),a=EM.call(e,"w")):(r=a=!0,n=!1),o={value:t,configurable:r,enumerable:n,writable:a},i?GOe(HOe(i),o):o};FXt.gs=function(e,t,r){var n,a,i,o;return typeof e!="string"?(i=r,r=t,t=e,e=null):i=arguments[3],_F(t)?VOe(t)?_F(r)?VOe(r)||(i=r,r=void 0):r=void 0:(i=t,t=r=void 0):t=void 0,_F(e)?(n=EM.call(e,"c"),a=EM.call(e,"e")):(n=!0,a=!1),o={get:t,set:r,configurable:n,enumerable:a},i?GOe(HOe(i),o):o}});var kM=fe((N4r,YOe)=>{"use strict";var WOe=Object.prototype.toString,DXt=WOe.call((function(){return arguments})());YOe.exports=function(e){return WOe.call(e)===DXt}});var CM=fe((U4r,ZOe)=>{"use strict";var XOe=Object.prototype.toString,RXt=XOe.call("");ZOe.exports=function(e){return typeof e=="string"||e&&typeof e=="object"&&(e instanceof String||XOe.call(e)===RXt)||!1}});var KOe=fe((V4r,$Oe)=>{"use strict";$Oe.exports=function(){return typeof globalThis!="object"||!globalThis?!1:globalThis.Array===Array}});var eNe=fe((G4r,QOe)=>{var JOe=function(){if(typeof self=="object"&&self)return self;if(typeof window=="object"&&window)return window;throw new Error("Unable to resolve global `this`")};QOe.exports=(function(){if(this)return this;try{Object.defineProperty(Object.prototype,"__global__",{get:function(){return this},configurable:!0})}catch(e){return JOe()}try{return __global__||JOe()}finally{delete Object.prototype.__global__}})()});var LM=fe((H4r,tNe)=>{"use strict";tNe.exports=KOe()()?globalThis:eNe()});var nNe=fe((j4r,rNe)=>{"use strict";var IXt=LM(),DZ={object:!0,symbol:!0};rNe.exports=function(){var e=IXt.Symbol,t;if(typeof e!="function")return!1;t=e("test symbol");try{String(t)}catch(r){return!1}return!(!DZ[typeof e.iterator]||!DZ[typeof e.toPrimitive]||!DZ[typeof e.toStringTag])}});var aNe=fe((W4r,iNe)=>{"use strict";iNe.exports=function(e){return e?typeof e=="symbol"?!0:!e.constructor||e.constructor.name!=="Symbol"?!1:e[e.constructor.toStringTag]==="Symbol":!1}});var RZ=fe((Y4r,oNe)=>{"use strict";var zXt=aNe();oNe.exports=function(e){if(!zXt(e))throw new TypeError(e+" is not a symbol");return e}});var fNe=fe((X4r,cNe)=>{"use strict";var sNe=Fg(),qXt=Object.create,lNe=Object.defineProperty,BXt=Object.prototype,uNe=qXt(null);cNe.exports=function(e){for(var t=0,r,n;uNe[e+(t||"")];)++t;return e+=t||"",uNe[e]=!0,r="@@"+e,lNe(BXt,r,sNe.gs(null,function(a){n||(n=!0,lNe(this,r,sNe(a)),n=!1)})),r}});var dNe=fe((Z4r,hNe)=>{"use strict";var Fp=Fg(),lc=LM().Symbol;hNe.exports=function(e){return Object.defineProperties(e,{hasInstance:Fp("",lc&&lc.hasInstance||e("hasInstance")),isConcatSpreadable:Fp("",lc&&lc.isConcatSpreadable||e("isConcatSpreadable")),iterator:Fp("",lc&&lc.iterator||e("iterator")),match:Fp("",lc&&lc.match||e("match")),replace:Fp("",lc&&lc.replace||e("replace")),search:Fp("",lc&&lc.search||e("search")),species:Fp("",lc&&lc.species||e("species")),split:Fp("",lc&&lc.split||e("split")),toPrimitive:Fp("",lc&&lc.toPrimitive||e("toPrimitive")),toStringTag:Fp("",lc&&lc.toStringTag||e("toStringTag")),unscopables:Fp("",lc&&lc.unscopables||e("unscopables"))})}});var gNe=fe(($4r,pNe)=>{"use strict";var vNe=Fg(),OXt=RZ(),PM=Object.create(null);pNe.exports=function(e){return Object.defineProperties(e,{for:vNe(function(t){return PM[t]?PM[t]:PM[t]=e(String(t))}),keyFor:vNe(function(t){var r;OXt(t);for(r in PM)if(PM[r]===t)return r})})}});var xNe=fe((K4r,yNe)=>{"use strict";var k1=Fg(),IZ=RZ(),bF=LM().Symbol,NXt=fNe(),UXt=dNe(),VXt=gNe(),GXt=Object.create,zZ=Object.defineProperties,wF=Object.defineProperty,cd,m5,mNe;if(typeof bF=="function")try{String(bF()),mNe=!0}catch(e){}else bF=null;m5=function(t){if(this instanceof m5)throw new TypeError("Symbol is not a constructor");return cd(t)};yNe.exports=cd=function e(t){var r;if(this instanceof e)throw new TypeError("Symbol is not a constructor");return mNe?bF(t):(r=GXt(m5.prototype),t=t===void 0?"":String(t),zZ(r,{__description__:k1("",t),__name__:k1("",NXt(t))}))};UXt(cd);VXt(cd);zZ(m5.prototype,{constructor:k1(cd),toString:k1("",function(){return this.__name__})});zZ(cd.prototype,{toString:k1(function(){return"Symbol ("+IZ(this).__description__+")"}),valueOf:k1(function(){return IZ(this)})});wF(cd.prototype,cd.toPrimitive,k1("",function(){var e=IZ(this);return typeof e=="symbol"?e:e.toString()}));wF(cd.prototype,cd.toStringTag,k1("c","Symbol"));wF(m5.prototype,cd.toStringTag,k1("c",cd.prototype[cd.toStringTag]));wF(m5.prototype,cd.toPrimitive,k1("c",cd.prototype[cd.toPrimitive]))});var Sy=fe((J4r,_Ne)=>{"use strict";_Ne.exports=nNe()()?LM().Symbol:xNe()});var wNe=fe((Q4r,bNe)=>{"use strict";var HXt=Pg();bNe.exports=function(){return HXt(this).length=0,this}});var y5=fe((eTr,TNe)=>{"use strict";TNe.exports=function(e){if(typeof e!="function")throw new TypeError(e+" is not a function");return e}});var MNe=fe((tTr,ANe)=>{"use strict";var jXt=d_(),WXt=kZ(),YXt=Object.prototype.toString;ANe.exports=function(e){if(!jXt(e))return null;if(WXt(e)){var t=e.toString;if(typeof t!="function"||t===YXt)return null}try{return""+e}catch(r){return null}}});var ENe=fe((rTr,SNe)=>{"use strict";SNe.exports=function(e){try{return e.toString()}catch(t){try{return String(e)}catch(r){return null}}}});var CNe=fe((nTr,kNe)=>{"use strict";var XXt=ENe(),ZXt=/[\n\r\u2028\u2029]/g;kNe.exports=function(e){var t=XXt(e);return t===null?"":(t.length>100&&(t=t.slice(0,99)+"\u2026"),t=t.replace(ZXt,function(r){switch(r){case` `:return"\\n";case"\r":return"\\r";case"\u2028":return"\\u2028";case"\u2029":return"\\u2029";default:throw new Error("Unexpected character")}}),t)}});var PNe=fe((iTr,LNe)=>{"use strict";var $Xt=MNe(),KXt=CNe();LNe.exports=function(e,t,r){r&&r.errorMessage&&(e=$Xt(r.errorMessage));var n=e.indexOf("%v"),a=n>-1?KXt(t):null;if(r&&r.name){var i=e.indexOf("%n");if(i>-1){if(n>-1){var o,s,l,u;return i>n?(o=a,l=n,s=r.name,u=i):(o=r.name,l=i,s=a,u=n),e.slice(0,l)+o+e.slice(l+2,u)+s+e.slice(u+2)}return e.slice(0,i)+r.name+e.slice(i+2)}}return n>-1?e.slice(0,n)+a+e.slice(n+2):e}});var qZ=fe((aTr,FNe)=>{"use strict";var JXt=d_(),QXt=PNe();FNe.exports=function(e,t,r){if(r&&!JXt(e)){if("default"in r)return r.default;if(r.isOptional)return null}var n=r&&r.Error||TypeError,a=new n(QXt(t,e,r));throw r&&r.errorCode&&(a.code=r.errorCode),a}});var RNe=fe((oTr,DNe)=>{"use strict";var eZt=qZ(),tZt=d_();DNe.exports=function(e){if(tZt(e))return e;var t=arguments[1],r=t&&t.name?"Expected a value for %n, received %v":"Cannot use %v";return eZt(e,r,t)}});var zNe=fe((sTr,INe)=>{"use strict";var rZt=qZ(),nZt=CZ();INe.exports=function(e){if(nZt(e))return e;var t=arguments[1],r=t&&t.name?"Expected a plain function for %n, received %v":"%v is not a plain function";return rZt(e,r,t)}});var BNe=fe((lTr,qNe)=>{"use strict";qNe.exports=function(){var e=Array.from,t,r;return typeof e!="function"?!1:(t=["raz","dwa"],r=e(t),!!(r&&r!==t&&r[1]==="dwa"))}});var NNe=fe((uTr,ONe)=>{"use strict";var iZt=Object.prototype.toString,aZt=RegExp.prototype.test.bind(/^[object [A-Za-z0-9]*Function]$/);ONe.exports=function(e){return typeof e=="function"&&aZt(iZt.call(e))}});var VNe=fe((cTr,UNe)=>{"use strict";UNe.exports=function(){var e=Math.sign;return typeof e!="function"?!1:e(10)===1&&e(-20)===-1}});var HNe=fe((fTr,GNe)=>{"use strict";GNe.exports=function(e){return e=Number(e),isNaN(e)||e===0?e:e>0?1:-1}});var WNe=fe((hTr,jNe)=>{"use strict";jNe.exports=VNe()()?Math.sign:HNe()});var XNe=fe((dTr,YNe)=>{"use strict";var oZt=WNe(),sZt=Math.abs,lZt=Math.floor;YNe.exports=function(e){return isNaN(e)?0:(e=Number(e),e===0||!isFinite(e)?e:oZt(e)*lZt(sZt(e)))}});var $Ne=fe((vTr,ZNe)=>{"use strict";var uZt=XNe(),cZt=Math.max;ZNe.exports=function(e){return cZt(0,uZt(e))}});var eUe=fe((pTr,QNe)=>{"use strict";var fZt=Sy().iterator,hZt=kM(),dZt=NNe(),vZt=$Ne(),KNe=y5(),pZt=Pg(),gZt=My(),mZt=CM(),JNe=Array.isArray,BZ=Function.prototype.call,v_={configurable:!0,enumerable:!0,writable:!0,value:null},OZ=Object.defineProperty;QNe.exports=function(e){var t=arguments[1],r=arguments[2],n,a,i,o,s,l,u,c,f,v;if(e=Object(pZt(e)),gZt(t)&&KNe(t),!this||this===Array||!dZt(this)){if(!t){if(hZt(e))return s=e.length,s!==1?Array.apply(null,e):(o=new Array(1),o[0]=e[0],o);if(JNe(e)){for(o=new Array(s=e.length),a=0;a=55296&&l<=56319&&(v+=e[++a])),v=t?BZ.call(t,r,v,i):v,n?(v_.value=v,OZ(o,i,v_)):o[i]=v,++i;s=i}}if(s===void 0)for(s=vZt(e.length),n&&(o=new n(s)),a=0;a{"use strict";tUe.exports=BNe()()?Array.from:eUe()});var iUe=fe((mTr,nUe)=>{"use strict";var yZt=rUe(),xZt=xF(),_Zt=Pg();nUe.exports=function(e){var t=Object(_Zt(e)),r=arguments[1],n=Object(arguments[2]);if(t!==e&&!r)return t;var a={};return r?yZt(r,function(i){(n.ensure||i in e)&&(a[i]=e[i])}):xZt(a,e),a}});var sUe=fe((yTr,oUe)=>{"use strict";var bZt=y5(),wZt=Pg(),TZt=Function.prototype.bind,aUe=Function.prototype.call,AZt=Object.keys,MZt=Object.prototype.propertyIsEnumerable;oUe.exports=function(e,t){return function(r,n){var a,i=arguments[2],o=arguments[3];return r=Object(wZt(r)),bZt(n),a=AZt(r),o&&a.sort(typeof o=="function"?TZt.call(o,r):void 0),typeof e!="function"&&(e=a[e]),aUe.call(e,a,function(s,l){return MZt.call(r,s)?aUe.call(n,i,r[s],s,r,l):t})}}});var uUe=fe((xTr,lUe)=>{"use strict";lUe.exports=sUe()("forEach")});var fUe=fe((_Tr,cUe)=>{"use strict";var SZt=y5(),EZt=uUe(),kZt=Function.prototype.call;cUe.exports=function(e,t){var r={},n=arguments[2];return SZt(t),EZt(e,function(a,i,o,s){r[i]=kZt.call(t,n,a,i,o,s)}),r}});var pUe=fe((bTr,vUe)=>{"use strict";var CZt=d_(),LZt=RNe(),hUe=zNe(),PZt=iUe(),FZt=LZ(),DZt=fUe(),RZt=Function.prototype.bind,IZt=Object.defineProperty,zZt=Object.prototype.hasOwnProperty,dUe;dUe=function(e,t,r){var n=LZt(t)&&hUe(t.value),a;return a=PZt(t),delete a.writable,delete a.value,a.get=function(){return!r.overwriteDefinition&&zZt.call(this,e)?n:(t.value=RZt.call(n,r.resolveContext?r.resolveContext(this):this),IZt(this,e,t),this[e])},a};vUe.exports=function(e){var t=FZt(arguments[1]);return CZt(t.resolveContext)&&hUe(t.resolveContext),DZt(e,function(r,n){return dUe(n,r,t)})}});var NZ=fe((wTr,xUe)=>{"use strict";var qZt=wNe(),BZt=xF(),OZt=y5(),NZt=Pg(),h0=Fg(),UZt=pUe(),gUe=Sy(),mUe=Object.defineProperty,yUe=Object.defineProperties,FM;xUe.exports=FM=function(e,t){if(!(this instanceof FM))throw new TypeError("Constructor requires 'new'");yUe(this,{__list__:h0("w",NZt(e)),__context__:h0("w",t),__nextIndex__:h0("w",0)}),t&&(OZt(t.on),t.on("_add",this._onAdd),t.on("_delete",this._onDelete),t.on("_clear",this._onClear))};delete FM.prototype.constructor;yUe(FM.prototype,BZt({_next:h0(function(){var e;if(this.__list__){if(this.__redo__&&(e=this.__redo__.shift(),e!==void 0))return e;if(this.__nextIndex__=this.__nextIndex__)){if(++this.__nextIndex__,!this.__redo__){mUe(this,"__redo__",h0("c",[e]));return}this.__redo__.forEach(function(t,r){t>=e&&(this.__redo__[r]=++t)},this),this.__redo__.push(e)}}),_onDelete:h0(function(e){var t;e>=this.__nextIndex__||(--this.__nextIndex__,this.__redo__&&(t=this.__redo__.indexOf(e),t!==-1&&this.__redo__.splice(t,1),this.__redo__.forEach(function(r,n){r>e&&(this.__redo__[n]=--r)},this)))}),_onClear:h0(function(){this.__redo__&&qZt.call(this.__redo__),this.__nextIndex__=0})})));mUe(FM.prototype,gUe.iterator,h0(function(){return this}))});var AUe=fe((TTr,TUe)=>{"use strict";var _Ue=yF(),bUe=FZ(),UZ=Fg(),VZt=Sy(),VZ=NZ(),wUe=Object.defineProperty,x5;x5=TUe.exports=function(e,t){if(!(this instanceof x5))throw new TypeError("Constructor requires 'new'");VZ.call(this,e),t?bUe.call(t,"key+value")?t="key+value":bUe.call(t,"key")?t="key":t="value":t="value",wUe(this,"__kind__",UZ("",t))};_Ue&&_Ue(x5,VZ);delete x5.prototype.constructor;x5.prototype=Object.create(VZ.prototype,{_resolve:UZ(function(e){return this.__kind__==="value"?this.__list__[e]:this.__kind__==="key+value"?[e,this.__list__[e]]:e})});wUe(x5.prototype,VZt.toStringTag,UZ("c","Array Iterator"))});var kUe=fe((ATr,EUe)=>{"use strict";var MUe=yF(),TF=Fg(),GZt=Sy(),GZ=NZ(),SUe=Object.defineProperty,_5;_5=EUe.exports=function(e){if(!(this instanceof _5))throw new TypeError("Constructor requires 'new'");e=String(e),GZ.call(this,e),SUe(this,"__length__",TF("",e.length))};MUe&&MUe(_5,GZ);delete _5.prototype.constructor;_5.prototype=Object.create(GZ.prototype,{_next:TF(function(){if(this.__list__){if(this.__nextIndex__=55296&&r<=56319?t+this.__list__[this.__nextIndex__++]:t)})});SUe(_5.prototype,GZt.toStringTag,TF("c","String Iterator"))});var LUe=fe((MTr,CUe)=>{"use strict";var HZt=kM(),jZt=My(),WZt=CM(),YZt=Sy().iterator,XZt=Array.isArray;CUe.exports=function(e){return jZt(e)?XZt(e)||WZt(e)||HZt(e)?!0:typeof e[YZt]=="function":!1}});var FUe=fe((STr,PUe)=>{"use strict";var ZZt=LUe();PUe.exports=function(e){if(!ZZt(e))throw new TypeError(e+" is not iterable");return e}});var HZ=fe((ETr,IUe)=>{"use strict";var $Zt=kM(),KZt=CM(),DUe=AUe(),JZt=kUe(),QZt=FUe(),RUe=Sy().iterator;IUe.exports=function(e){return typeof QZt(e)[RUe]=="function"?e[RUe]():$Zt(e)?new DUe(e):KZt(e)?new JZt(e):new DUe(e)}});var qUe=fe((kTr,zUe)=>{"use strict";var e$t=kM(),t$t=y5(),r$t=CM(),n$t=HZ(),i$t=Array.isArray,jZ=Function.prototype.call,a$t=Array.prototype.some;zUe.exports=function(e,t){var r,n=arguments[2],a,i,o,s,l,u,c;if(i$t(e)||e$t(e)?r="array":r$t(e)?r="string":e=n$t(e),t$t(t),i=function(){o=!0},r==="array"){a$t.call(e,function(f){return jZ.call(t,n,f,i),o});return}if(r==="string"){for(l=e.length,s=0;s=55296&&c<=56319&&(u+=e[++s])),jZ.call(t,n,u,i),!o);++s);return}for(a=e.next();!a.done;){if(jZ.call(t,n,a.value,i),o)return;a=e.next()}}});var OUe=fe((CTr,BUe)=>{"use strict";BUe.exports=(function(){return typeof WeakMap!="function"?!1:Object.prototype.toString.call(new WeakMap)==="[object WeakMap]"})()});var VUe=fe((LTr,UUe)=>{"use strict";var o$t=My(),MF=yF(),AF=pOe(),s$t=Pg(),l$t=mOe(),Dg=Fg(),u$t=HZ(),c$t=qUe(),f$t=Sy().toStringTag,NUe=OUe(),h$t=Array.isArray,YZ=Object.defineProperty,WZ=Object.prototype.hasOwnProperty,d$t=Object.getPrototypeOf,Ey;UUe.exports=Ey=function(){var e=arguments[0],t;if(!(this instanceof Ey))throw new TypeError("Constructor requires 'new'");return t=NUe&&MF&&WeakMap!==Ey?MF(new WeakMap,d$t(this)):this,o$t(e)&&(h$t(e)||(e=u$t(e))),YZ(t,"__weakMapData__",Dg("c","$weakMap$"+l$t())),e&&c$t(e,function(r){s$t(r),t.set(r[0],r[1])}),t};NUe&&(MF&&MF(Ey,WeakMap),Ey.prototype=Object.create(WeakMap.prototype,{constructor:Dg(Ey)}));Object.defineProperties(Ey.prototype,{delete:Dg(function(e){return WZ.call(AF(e),this.__weakMapData__)?(delete e[this.__weakMapData__],!0):!1}),get:Dg(function(e){if(WZ.call(AF(e),this.__weakMapData__))return e[this.__weakMapData__]}),has:Dg(function(e){return WZ.call(AF(e),this.__weakMapData__)}),set:Dg(function(e,t){return YZ(AF(e),this.__weakMapData__,Dg("c",t)),this}),toString:Dg(function(){return"[object WeakMap]"})});YZ(Ey.prototype,f$t,Dg("c","WeakMap"))});var XZ=fe((PTr,GUe)=>{"use strict";GUe.exports=rOe()()?WeakMap:VUe()});var jUe=fe((FTr,HUe)=>{"use strict";HUe.exports=function(e,t,r){if(typeof Array.prototype.findIndex=="function")return e.findIndex(t,r);if(typeof t!="function")throw new TypeError("predicate must be a function");var n=Object(e),a=n.length;if(a===0)return-1;for(var i=0;i{"use strict";var SF=wM(),v$t=l_(),$Z=Zc(),p$t=E1(),g$t=u_(),WUe=JBe(),m$t=eOe(),{float32:y$t,fract32:ZZ}=uF(),x$t=XZ(),YUe=u5(),_$t=jUe(),b$t=` precision highp float; attribute vec2 aCoord, bCoord, aCoordFract, bCoordFract; attribute vec4 color; attribute float lineEnd, lineTop; uniform vec2 scale, scaleFract, translate, translateFract; uniform float thickness, pixelRatio, id, depth; uniform vec4 viewport; varying vec4 fragColor; varying vec2 tangent; vec2 project(vec2 position, vec2 positionFract, vec2 scale, vec2 scaleFract, vec2 translate, vec2 translateFract) { // the order is important return position * scale + translate + positionFract * scale + translateFract + position * scaleFract + positionFract * scaleFract; } void main() { float lineStart = 1. - lineEnd; float lineOffset = lineTop * 2. - 1.; vec2 diff = (bCoord + bCoordFract - aCoord - aCoordFract); tangent = normalize(diff * scale * viewport.zw); vec2 normal = vec2(-tangent.y, tangent.x); vec2 position = project(aCoord, aCoordFract, scale, scaleFract, translate, translateFract) * lineStart + project(bCoord, bCoordFract, scale, scaleFract, translate, translateFract) * lineEnd + thickness * normal * .5 * lineOffset / viewport.zw; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); fragColor = color / 255.; } `,w$t=` precision highp float; uniform float dashLength, pixelRatio, thickness, opacity, id; uniform sampler2D dashTexture; varying vec4 fragColor; varying vec2 tangent; void main() { float alpha = 1.; 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; } `,T$t=` precision highp float; attribute vec2 position, positionFract; uniform vec4 color; uniform vec2 scale, scaleFract, translate, translateFract; uniform float pixelRatio, id; uniform vec4 viewport; uniform float opacity; varying vec4 fragColor; const float MAX_LINES = 256.; void main() { float depth = (MAX_LINES - 4. - id) / (MAX_LINES); vec2 position = position * scale + translate + positionFract * scale + translateFract + position * scaleFract + positionFract * scaleFract; gl_Position = vec4(position * 2.0 - 1.0, depth, 1); fragColor = color / 255.; fragColor.a *= opacity; } `,A$t=` precision highp float; varying vec4 fragColor; void main() { gl_FragColor = fragColor; } `,M$t=` precision highp float; attribute vec2 aCoord, bCoord, nextCoord, prevCoord; attribute vec4 aColor, bColor; attribute float lineEnd, lineTop; uniform vec2 scale, translate; uniform float thickness, pixelRatio, id, depth; uniform vec4 viewport; uniform float miterLimit, miterMode; varying vec4 fragColor; varying vec4 startCutoff, endCutoff; varying vec2 tangent; varying vec2 startCoord, endCoord; varying float enableStartMiter, enableEndMiter; const float REVERSE_THRESHOLD = -.875; const float MIN_DIFF = 1e-6; // TODO: possible optimizations: avoid overcalculating all for vertices and calc just one instead // TODO: precalculate dot products, normalize things beforehead etc. // TODO: refactor to rectangular algorithm 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); } bool isNaN( float val ){ return ( val < 0.0 || 0.0 < val || val == 0.0 ) ? false : true; } void main() { vec2 aCoord = aCoord, bCoord = bCoord, prevCoord = prevCoord, nextCoord = nextCoord; vec2 adjustedScale; adjustedScale.x = (abs(scale.x) < MIN_DIFF) ? MIN_DIFF : scale.x; adjustedScale.y = (abs(scale.y) < MIN_DIFF) ? MIN_DIFF : scale.y; vec2 scaleRatio = adjustedScale * viewport.zw; vec2 normalWidth = thickness / scaleRatio; float lineStart = 1. - lineEnd; float lineBot = 1. - lineTop; fragColor = (lineStart * aColor + lineEnd * bColor) / 255.; if (isNaN(aCoord.x) || isNaN(aCoord.y) || isNaN(bCoord.x) || isNaN(bCoord.y)) return; if (aCoord == prevCoord) prevCoord = aCoord + normalize(bCoord - aCoord); if (bCoord == nextCoord) nextCoord = bCoord - normalize(bCoord - aCoord); vec2 prevDiff = aCoord - prevCoord; vec2 currDiff = bCoord - aCoord; vec2 nextDiff = nextCoord - bCoord; vec2 prevTangent = normalize(prevDiff * scaleRatio); vec2 currTangent = normalize(currDiff * scaleRatio); vec2 nextTangent = normalize(nextDiff * scaleRatio); vec2 prevNormal = vec2(-prevTangent.y, prevTangent.x); vec2 currNormal = vec2(-currTangent.y, currTangent.x); vec2 nextNormal = vec2(-nextTangent.y, nextTangent.x); vec2 startJoinDirection = normalize(prevTangent - currTangent); vec2 endJoinDirection = normalize(currTangent - nextTangent); // collapsed/unidirectional segment cases // FIXME: there should be more elegant solution vec2 prevTanDiff = abs(prevTangent - currTangent); vec2 nextTanDiff = abs(nextTangent - currTangent); if (max(prevTanDiff.x, prevTanDiff.y) < MIN_DIFF) { startJoinDirection = currNormal; } if (max(nextTanDiff.x, nextTanDiff.y) < MIN_DIFF) { endJoinDirection = currNormal; } if (aCoord == bCoord) { endJoinDirection = startJoinDirection; currNormal = prevNormal; currTangent = prevTangent; } tangent = currTangent; //calculate join shifts relative to normals float startJoinShift = dot(currNormal, startJoinDirection); float endJoinShift = dot(currNormal, endJoinDirection); float startMiterRatio = abs(1. / startJoinShift); float endMiterRatio = abs(1. / endJoinShift); vec2 startJoin = startJoinDirection * startMiterRatio; vec2 endJoin = endJoinDirection * endMiterRatio; vec2 startTopJoin, startBotJoin, endTopJoin, endBotJoin; startTopJoin = sign(startJoinShift) * startJoin * .5; startBotJoin = -startTopJoin; endTopJoin = sign(endJoinShift) * endJoin * .5; endBotJoin = -endTopJoin; vec2 aTopCoord = aCoord + normalWidth * startTopJoin; vec2 bTopCoord = bCoord + normalWidth * endTopJoin; vec2 aBotCoord = aCoord + normalWidth * startBotJoin; vec2 bBotCoord = bCoord + normalWidth * endBotJoin; //miter anti-clipping float baClipping = distToLine(bCoord, aCoord, aBotCoord) / dot(normalize(normalWidth * endBotJoin), normalize(normalWidth.yx * vec2(-startBotJoin.y, startBotJoin.x))); float abClipping = distToLine(aCoord, bCoord, bTopCoord) / dot(normalize(normalWidth * startBotJoin), normalize(normalWidth.yx * vec2(-endBotJoin.y, endBotJoin.x))); //prevent close to reverse direction switch bool prevReverse = dot(currTangent, prevTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, prevNormal)) * min(length(prevDiff), length(currDiff)) < length(normalWidth * currNormal); bool nextReverse = dot(currTangent, nextTangent) <= REVERSE_THRESHOLD && abs(dot(currTangent, nextNormal)) * min(length(nextDiff), length(currDiff)) < length(normalWidth * currNormal); if (prevReverse) { //make join rectangular vec2 miterShift = normalWidth * startJoinDirection * miterLimit * .5; float normalAdjust = 1. - min(miterLimit / startMiterRatio, 1.); aBotCoord = aCoord + miterShift - normalAdjust * normalWidth * currNormal * .5; aTopCoord = aCoord + miterShift + normalAdjust * normalWidth * currNormal * .5; } else if (!nextReverse && baClipping > 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; } } } `,S$t=` 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; } `;XUe.exports=al;function al(e,t){if(!(this instanceof al))return new al(e,t);if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");this.gl=e._gl,this.regl=e,this.passes=[],this.shaders=al.shaders.has(e)?al.shaders.get(e):al.shaders.set(e,al.createShaders(e)).get(e),this.update(t)}al.dashMult=2;al.maxPatternLength=256;al.precisionThreshold=3e6;al.maxPoints=1e4;al.maxLines=2048;al.shaders=new x$t;al.createShaders=function(e){let t=e.buffer({usage:"static",type:"float",data:[0,1,0,0,1,1,1,0]}),r={primitive:"triangle strip",instances:e.prop("count"),count:4,offset:0,uniforms:{miterMode:(o,s)=>s.join==="round"?2:1,miterLimit:e.prop("miterLimit"),scale:e.prop("scale"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),thickness:e.prop("thickness"),dashTexture:e.prop("dashTexture"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),dashLength:e.prop("dashLength"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight],depth:e.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:(o,s)=>!s.overlay},stencil:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport")},n=e($Z({vert:b$t,frag:w$t,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},aCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8,divisor:1},bCoordFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:16,divisor:1},color:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1}}},r)),a;try{a=e($Z({cull:{enable:!0,face:"back"},vert:M$t,frag:S$t,attributes:{lineEnd:{buffer:t,divisor:0,stride:8,offset:0},lineTop:{buffer:t,divisor:0,stride:8,offset:4},aColor:{buffer:e.prop("colorBuffer"),stride:4,offset:0,divisor:1},bColor:{buffer:e.prop("colorBuffer"),stride:4,offset:4,divisor:1},prevCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:0,divisor:1},aCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:8,divisor:1},bCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:16,divisor:1},nextCoord:{buffer:e.prop("positionBuffer"),stride:8,offset:24,divisor:1}}},r))}catch(o){a=n}return{fill:e({primitive:"triangle",elements:(o,s)=>s.triangles,offset:0,vert:T$t,frag:A$t,uniforms:{scale:e.prop("scale"),color:e.prop("fill"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),translate:e.prop("translate"),opacity:e.prop("opacity"),pixelRatio:e.context("pixelRatio"),id:e.prop("id"),viewport:(o,s)=>[s.viewport.x,s.viewport.y,o.viewportWidth,o.viewportHeight]},attributes:{position:{buffer:e.prop("positionBuffer"),stride:8,offset:8},positionFract:{buffer:e.prop("positionFractBuffer"),stride:8,offset:8}},blend:r.blend,depth:{enable:!1},scissor:r.scissor,stencil:r.stencil,viewport:r.viewport}),rect:n,miter:a}};al.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};al.prototype.render=function(...e){e.length&&this.update(...e),this.draw()};al.prototype.draw=function(...e){return(e.length?e:this.passes).forEach((t,r)=>{if(t&&Array.isArray(t))return this.draw(...t);typeof t=="number"&&(t=this.passes[t]),t&&t.count>1&&t.opacity&&(this.regl._refresh(),t.fill&&t.triangles&&t.triangles.length>2&&this.shaders.fill(t),t.thickness&&(t.scale[0]*t.viewport.width>al.precisionThreshold||t.scale[1]*t.viewport.height>al.precisionThreshold?this.shaders.rect(t):t.join==="rect"||!t.join&&(t.thickness<=2||t.count>=al.maxPoints)?this.shaders.rect(t):this.shaders.miter(t)))}),this};al.prototype.update=function(e){if(!e)return;e.length!=null?typeof e[0]=="number"&&(e=[{positions:e}]):Array.isArray(e)||(e=[e]);let{regl:t,gl:r}=this;if(e.forEach((a,i)=>{let o=this.passes[i];if(a!==void 0){if(a===null){this.passes[i]=null;return}if(typeof a[0]=="number"&&(a={positions:a}),a=p$t(a,{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"}),o||(this.passes[i]=o={id:i,scale:null,scaleFract:null,translate:null,translateFract:null,count:0,hole:[],depth:0,dashLength:1,dashTexture:t.texture({channels:1,data:new Uint8Array([255]),width:1,height:1,mag:"linear",min:"linear"}),colorBuffer:t.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array}),positionBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array}),positionFractBuffer:t.buffer({usage:"dynamic",type:"float",data:new Uint8Array})},a=$Z({},al.defaults,a)),a.thickness!=null&&(o.thickness=parseFloat(a.thickness)),a.opacity!=null&&(o.opacity=parseFloat(a.opacity)),a.miterLimit!=null&&(o.miterLimit=parseFloat(a.miterLimit)),a.overlay!=null&&(o.overlay=!!a.overlay,iL-w),C=[],k=0,S=o.hole!=null?o.hole[0]:null;if(S!=null){let L=_$t(y,w=>w>=S);y=y.slice(0,L),y.push(S)}for(let L=0;Lm-S+(y[L]-k)),T=WUe(w,A);T=T.map(m=>m+k+(m+k{e.colorBuffer.destroy(),e.positionBuffer.destroy(),e.dashTexture.destroy()}),this.passes.length=0,this}});var QUe=fe((RTr,JUe)=>{"use strict";var E$t=l_(),k$t=wM(),C$t=yZ(),L$t=E1(),ZUe=Zc(),$Ue=u_(),{float32:P$t,fract32:JZ}=uF();JUe.exports=F$t;var KUe=[[1,0,0,1,0,0],[1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,-1,0,0],[-1,0,0,1,0,0],[1,0,0,1,0,0],[1,0,-1,0,0,1],[1,0,-1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,-1],[1,0,1,0,0,1],[1,0,-1,0,0,1],[-1,0,-1,0,0,1],[-1,0,-1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,-1],[-1,0,1,0,0,1],[-1,0,-1,0,0,1],[0,1,1,0,0,0],[0,1,-1,0,0,0],[0,-1,-1,0,0,0],[0,-1,-1,0,0,0],[0,1,1,0,0,0],[0,-1,1,0,0,0],[0,1,0,-1,1,0],[0,1,0,-1,-1,0],[0,1,0,1,-1,0],[0,1,0,1,1,0],[0,1,0,-1,1,0],[0,1,0,1,-1,0],[0,-1,0,-1,1,0],[0,-1,0,-1,-1,0],[0,-1,0,1,-1,0],[0,-1,0,1,1,0],[0,-1,0,-1,1,0],[0,-1,0,1,-1,0]];function F$t(e,t){if(typeof e=="function"?(t||(t={}),t.regl=e):t=e,t.length&&(t.positions=t),e=t.regl,!e.hasExtension("ANGLE_instanced_arrays"))throw Error("regl-error2d: `ANGLE_instanced_arrays` extension should be enabled");let r=e._gl,n,a,i,o,s,l,u={color:"black",capSize:5,lineWidth:1,opacity:1,viewport:null,range:null,offset:0,count:0,bounds:null,positions:[],errors:[]},c=[];return o=e.buffer({usage:"dynamic",type:"uint8",data:new Uint8Array(0)}),a=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),i=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),s=e.buffer({usage:"dynamic",type:"float",data:new Uint8Array(0)}),l=e.buffer({usage:"static",type:"float",data:KUe}),p(t),n=e({vert:` precision highp float; attribute vec2 position, positionFract; attribute vec4 error; attribute vec4 color; attribute vec2 direction, lineOffset, capOffset; uniform vec4 viewport; uniform float lineWidth, capSize; uniform vec2 scale, scaleFract, translate, translateFract; varying vec4 fragColor; void main() { fragColor = color / 255.; vec2 pixelOffset = lineWidth * lineOffset + (capSize + lineWidth) * capOffset; vec2 dxy = -step(.5, direction.xy) * error.xz + step(direction.xy, vec2(-.5)) * error.yw; vec2 position = position + dxy; vec2 pos = (position + translate) * scale + (positionFract + translateFract) * scale + (position + translate) * scaleFract + (positionFract + translateFract) * scaleFract; pos += pixelOffset / viewport.zw; gl_Position = vec4(pos * 2. - 1., 0, 1); } `,frag:` precision highp float; varying vec4 fragColor; uniform float opacity; void main() { gl_FragColor = fragColor; gl_FragColor.a *= opacity; } `,uniforms:{range:e.prop("range"),lineWidth:e.prop("lineWidth"),capSize:e.prop("capSize"),opacity:e.prop("opacity"),scale:e.prop("scale"),translate:e.prop("translate"),scaleFract:e.prop("scaleFract"),translateFract:e.prop("translateFract"),viewport:(_,y)=>[y.viewport.x,y.viewport.y,_.viewportWidth,_.viewportHeight]},attributes:{color:{buffer:o,offset:(_,y)=>y.offset*4,divisor:1},position:{buffer:a,offset:(_,y)=>y.offset*8,divisor:1},positionFract:{buffer:i,offset:(_,y)=>y.offset*8,divisor:1},error:{buffer:s,offset:(_,y)=>y.offset*16,divisor:1},direction:{buffer:l,stride:24,offset:0},lineOffset:{buffer:l,stride:24,offset:8},capOffset:{buffer:l,stride:24,offset:16}},primitive:"triangles",blend:{enable:!0,color:[0,0,0,0],equation:{rgb:"add",alpha:"add"},func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},depth:{enable:!1},scissor:{enable:!0,box:e.prop("viewport")},viewport:e.prop("viewport"),stencil:!1,instances:e.prop("count"),count:KUe.length}),ZUe(f,{update:p,draw:v,destroy:x,regl:e,gl:r,canvas:r.canvas,groups:c}),f;function f(_){_?p(_):_===null&&x(),v()}function v(_){if(typeof _=="number")return g(_);_&&!Array.isArray(_)&&(_=[_]),e._refresh(),c.forEach((y,C)=>{if(y){if(_&&(_[C]?y.draw=!0:y.draw=!1),!y.draw){y.draw=!0;return}g(C)}})}function g(_){typeof _=="number"&&(_=c[_]),_!=null&&_&&_.count&&_.color&&_.opacity&&_.positions&&_.positions.length>1&&(_.scaleRatio=[_.scale[0]*_.viewport.width,_.scale[1]*_.viewport.height],n(_),_.after&&_.after(_))}function p(_){if(!_)return;_.length!=null?typeof _[0]=="number"&&(_=[{positions:_}]):Array.isArray(_)||(_=[_]);let y=0,C=0;if(f.groups=c=_.map((L,w)=>{let A=c[w];if(L)typeof L=="function"?L={after:L}:typeof L[0]=="number"&&(L={positions:L});else return A;return L=L$t(L,{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"}),A||(c[w]=A={id:w,scale:null,translate:null,scaleFract:null,translateFract:null,draw:!0},L=ZUe({},u,L)),C$t(A,L,[{lineWidth:T=>+T*.5,capSize:T=>+T*.5,opacity:parseFloat,errors:T=>(T=$Ue(T),C+=T.length,T),positions:(T,m)=>(T=$Ue(T,"float64"),m.count=Math.floor(T.length/2),m.bounds=E$t(T,2),m.offset=y,y+=m.count,T)},{color:(T,m)=>{let F=m.count;if(T||(T="transparent"),!Array.isArray(T)||typeof T[0]=="number"){let I=T;T=Array(F);for(let R=0;R{let E=m.bounds;return T||(T=E),m.scale=[1/(T[2]-T[0]),1/(T[3]-T[1])],m.translate=[-T[0],-T[1]],m.scaleFract=JZ(m.scale),m.translateFract=JZ(m.translate),T},viewport:T=>{let m;return Array.isArray(T)?m={x:T[0],y:T[1],width:T[2]-T[0],height:T[3]-T[1]}:T?(m={x:T.x||T.left||0,y:T.y||T.top||0},T.right?m.width=T.right-m.x:m.width=T.w||T.width||0,T.bottom?m.height=T.bottom-m.y:m.height=T.h||T.height||0):m={x:0,y:0,width:r.drawingBufferWidth,height:r.drawingBufferHeight},m}}]),A}),y||C){let L=c.reduce((m,F,E)=>m+(F?F.count:0),0),w=new Float64Array(L*2),A=new Uint8Array(L*4),T=new Float32Array(L*4);c.forEach((m,F)=>{if(!m)return;let{positions:E,count:I,offset:R,color:B,errors:O}=m;I&&(A.set(B,R*4),T.set(O,R*4),w.set(E,R*2))});var k=P$t(w);a(k);var S=JZ(w,k);i(S),o(A),s(T)}}function x(){a.destroy(),i.destroy(),o.destroy(),s.destroy(),l.destroy()}}});var rVe=fe((ITr,tVe)=>{var eVe=/[\'\"]/;tVe.exports=function(t){return t?(eVe.test(t.charAt(0))&&(t=t.substr(1)),eVe.test(t.charAt(t.length-1))&&(t=t.substr(0,t.length-1)),t):""}});var QZ=fe((zTr,D$t)=>{D$t.exports=["inherit","initial","unset"]});var e$=fe((qTr,R$t)=>{R$t.exports=["caption","icon","menu","message-box","small-caption","status-bar"]});var t$=fe((BTr,I$t)=>{I$t.exports=["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"]});var r$=fe((OTr,z$t)=>{z$t.exports=["normal","italic","oblique"]});var n$=fe((NTr,q$t)=>{q$t.exports=["normal","condensed","semi-condensed","extra-condensed","ultra-condensed","expanded","semi-expanded","extra-expanded","ultra-expanded"]});var oVe=fe((UTr,aVe)=>{"use strict";function nVe(e,t){if(typeof e!="string")return[e];var r=[e];typeof t=="string"||Array.isArray(t)?t={brackets:t}:t||(t={});var n=t.brackets?Array.isArray(t.brackets)?t.brackets:[t.brackets]:["{}","[]","()"],a=t.escape||"___",i=!!t.flat;n.forEach(function(l){var u=new RegExp(["\\",l[0],"[^\\",l[0],"\\",l[1],"]*\\",l[1]].join("")),c=[];function f(v,g,p){var x=r.push(v.slice(l[0].length,-l[1].length))-1;return c.push(x),a+x+a}r.forEach(function(v,g){for(var p,x=0;v!=p;)if(p=v,v=v.replace(u,f),x++>1e4)throw Error("References have circular dependency. Please, check them.");r[g]=v}),c=c.reverse(),r=r.map(function(v){return c.forEach(function(g){v=v.replace(new RegExp("(\\"+a+g+"\\"+a+")","g"),l[0]+"$1"+l[1])}),v})});var o=new RegExp("\\"+a+"([0-9]+)\\"+a);function s(l,u,c){for(var f=[],v,g=0;v=o.exec(l);){if(g++>1e4)throw Error("Circular references in parenthesis");f.push(l.slice(0,v.index)),f.push(s(u[v[1]],u)),l=l.slice(v.index+v[0].length)}return f.push(l),f}return i?r:s(r[0],r)}function iVe(e,t){if(t&&t.flat){var r=t&&t.escape||"___",n=e[0],a;if(!n)return"";for(var i=new RegExp("\\"+r+"([0-9]+)\\"+r),o=0;n!=a;){if(o++>1e4)throw Error("Circular references in "+e);a=n,n=n.replace(i,s)}return n}return e.reduce(function l(u,c){return Array.isArray(c)&&(c=c.reduce(l,"")),u+c},"");function s(l,u){if(e[u]==null)throw Error("Reference "+u+"is undefined");return e[u]}}function i$(e,t){return Array.isArray(e)?iVe(e,t):nVe(e,t)}i$.parse=nVe;i$.stringify=iVe;aVe.exports=i$});var uVe=fe((VTr,lVe)=>{"use strict";var sVe=oVe();lVe.exports=function(t,r,n){if(t==null)throw Error("First argument should be a string");if(r==null)throw Error("Separator should be a string or a RegExp");n?(typeof n=="string"||Array.isArray(n))&&(n={ignore:n}):n={},n.escape==null&&(n.escape=!0),n.ignore==null?n.ignore=["[]","()","{}","<>",'""',"''","``","\u201C\u201D","\xAB\xBB"]:(typeof n.ignore=="string"&&(n.ignore=[n.ignore]),n.ignore=n.ignore.map(function(f){return f.length===1&&(f=f+f),f}));var a=sVe.parse(t,{flat:!0,brackets:n.ignore}),i=a[0],o=i.split(r);if(n.escape){for(var s=[],l=0;l{B$t.exports=["xx-small","x-small","small","medium","large","x-large","xx-large","larger","smaller"]});var a$=fe((HTr,fVe)=>{"use strict";var O$t=cVe();fVe.exports={isSize:function(t){return/^[\d\.]/.test(t)||t.indexOf("/")!==-1||O$t.indexOf(t)!==-1}}});var pVe=fe((jTr,vVe)=>{"use strict";var N$t=rVe(),U$t=QZ(),V$t=e$(),G$t=t$(),H$t=r$(),j$t=n$(),o$=uVe(),W$t=a$().isSize;vVe.exports=dVe;var DM=dVe.cache={};function dVe(e){if(typeof e!="string")throw new Error("Font argument must be a string.");if(DM[e])return DM[e];if(e==="")throw new Error("Cannot parse an empty string.");if(V$t.indexOf(e)!==-1)return DM[e]={system:e};for(var t={style:"normal",variant:"normal",weight:"normal",stretch:"normal",lineHeight:"normal",size:"1rem",family:["serif"]},r=o$(e,/\s+/),n;n=r.shift();){if(U$t.indexOf(n)!==-1)return["style","variant","weight","stretch"].forEach(function(i){t[i]=n}),DM[e]=t;if(H$t.indexOf(n)!==-1){t.style=n;continue}if(n==="normal"||n==="small-caps"){t.variant=n;continue}if(j$t.indexOf(n)!==-1){t.stretch=n;continue}if(G$t.indexOf(n)!==-1){t.weight=n;continue}if(W$t(n)){var a=o$(n,"/");if(t.size=a[0],a[1]!=null?t.lineHeight=hVe(a[1]):r[0]==="/"&&(r.shift(),t.lineHeight=hVe(r.shift())),!r.length)throw new Error("Missing required font-family.");return t.family=o$(r.join(" "),/\s*,\s*/).map(N$t),DM[e]=t}throw new Error("Unknown or unsupported font token: "+n)}throw new Error("Missing required font-size.")}function hVe(e){var t=parseFloat(e);return t.toString()===e?t:e}});var l$=fe((WTr,gVe)=>{"use strict";var Y$t=E1(),X$t=a$().isSize,Z$t=IM(QZ()),$$t=IM(e$()),K$t=IM(t$()),J$t=IM(r$()),Q$t=IM(n$()),eKt={normal:1,"small-caps":1},tKt={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"};gVe.exports=function(t){if(t=Y$t(t,{style:"style fontstyle fontStyle font-style slope distinction",variant:"variant font-variant fontVariant fontvariant var capitalization",weight:"weight w font-weight fontWeight fontweight",stretch:"stretch font-stretch fontStretch fontstretch width",size:"size s font-size fontSize fontsize height em emSize",lineHeight:"lh line-height lineHeight lineheight leading",family:"font family fontFamily font-family fontfamily type typeface face",system:"system reserved default global"}),t.system)return t.system&&RM(t.system,$$t),t.system;if(RM(t.style,J$t),RM(t.variant,eKt),RM(t.weight,K$t),RM(t.stretch,Q$t),t.size==null&&(t.size=s$.size),typeof t.size=="number"&&(t.size+="px"),!X$t)throw Error("Bad size value `"+t.size+"`");t.family||(t.family=s$.family),Array.isArray(t.family)&&(t.family.length||(t.family=[s$.family]),t.family=t.family.map(function(n){return tKt[n]?n:'"'+n+'"'}).join(", "));var r=[];return r.push(t.style),t.variant!==t.style&&r.push(t.variant),t.weight!==t.variant&&t.weight!==t.style&&r.push(t.weight),t.stretch!==t.weight&&t.stretch!==t.variant&&t.stretch!==t.style&&r.push(t.stretch),r.push(t.size+(t.lineHeight==null||t.lineHeight==="normal"||t.lineHeight+""=="1"?"":"/"+t.lineHeight)),r.push(t.family),r.filter(Boolean).join(" ")};function RM(e,t){if(e&&!t[e]&&!Z$t[e])throw Error("Unknown keyword `"+e+"`");return e}function IM(e){for(var t={},r=0;r{"use strict";mVe.exports={parse:pVe(),stringify:l$()}});var f$=fe((u$,c$)=>{(function(e,t){typeof u$=="object"&&typeof c$!="undefined"?c$.exports=t():e.createREGL=t()})(u$,(function(){"use strict";var e=function(Pe,Xe){for(var at=Object.keys(Xe),xt=0;xt1&&Xe===at&&(Xe==='"'||Xe==="'"))return['"'+o(Pe.substr(1,Pe.length-2))+'"'];var xt=/\[(false|true|null|\d+|'[^']*'|"[^"]*")\]/.exec(Pe);if(xt)return s(Pe.substr(0,xt.index)).concat(s(xt[1])).concat(s(Pe.substr(xt.index+xt[0].length)));var Et=Pe.split(".");if(Et.length===1)return['"'+o(Pe)+'"'];for(var Bt=[],St=0;St65535)<<4,Pe>>>=Xe,at=(Pe>255)<<3,Pe>>>=at,Xe|=at,at=(Pe>15)<<2,Pe>>>=at,Xe|=at,at=(Pe>3)<<1,Pe>>>=at,Xe|=at,Xe|Pe>>1}function q(){var Pe=T(8,function(){return[]});function Xe(Bt){var St=V(Bt),Pt=Pe[j(St)>>2];return Pt.length>0?Pt.pop():new ArrayBuffer(St)}function at(Bt){Pe[j(Bt.byteLength)>>2].push(Bt)}function xt(Bt,St){var Pt=null;switch(Bt){case m:Pt=new Int8Array(Xe(St),0,St);break;case F:Pt=new Uint8Array(Xe(St),0,St);break;case E:Pt=new Int16Array(Xe(2*St),0,St);break;case I:Pt=new Uint16Array(Xe(2*St),0,St);break;case R:Pt=new Int32Array(Xe(4*St),0,St);break;case B:Pt=new Uint32Array(Xe(4*St),0,St);break;case O:Pt=new Float32Array(Xe(4*St),0,St);break;default:return null}return Pt.length!==St?Pt.subarray(0,St):Pt}function Et(Bt){at(Bt.buffer)}return{alloc:Xe,free:at,allocType:xt,freeType:Et}}var U=q();U.zero=q();var J=3408,ee=3410,ce=3411,ye=3412,xe=3413,ue=3414,K=3415,_e=33901,ne=33902,ae=3379,pe=3386,ie=34921,le=36347,me=36348,be=35661,De=35660,Ge=34930,ht=36349,it=34076,Oe=34024,ze=7936,ct=7937,et=7938,qe=35724,we=34047,Le=36063,Ke=34852,Te=3553,Ve=34067,$e=34069,ot=33984,tt=6408,nt=5126,We=5121,mt=36160,bt=36053,Yt=36064,jt=16384,mr=function(Pe,Xe){var at=1;Xe.ext_texture_filter_anisotropic&&(at=Pe.getParameter(we));var xt=1,Et=1;Xe.webgl_draw_buffers&&(xt=Pe.getParameter(Ke),Et=Pe.getParameter(Le));var Bt=!!Xe.oes_texture_float;if(Bt){var St=Pe.createTexture();Pe.bindTexture(Te,St),Pe.texImage2D(Te,0,tt,1,1,0,tt,nt,null);var Pt=Pe.createFramebuffer();if(Pe.bindFramebuffer(mt,Pt),Pe.framebufferTexture2D(mt,Yt,Te,St,0),Pe.bindTexture(Te,null),Pe.checkFramebufferStatus(mt)!==bt)Bt=!1;else{Pe.viewport(0,0,1,1),Pe.clearColor(1,0,0,1),Pe.clear(jt);var $t=U.allocType(nt,4);Pe.readPixels(0,0,1,1,tt,nt,$t),Pe.getError()?Bt=!1:(Pe.deleteFramebuffer(Pt),Pe.deleteTexture(St),Bt=$t[0]===1),U.freeType($t)}}var Ht=typeof navigator!="undefined"&&(/MSIE/.test(navigator.userAgent)||/Trident\//.test(navigator.appVersion)||/Edge/.test(navigator.userAgent)),dr=!0;if(!Ht){var Xr=Pe.createTexture(),Or=U.allocType(We,36);Pe.activeTexture(ot),Pe.bindTexture(Ve,Xr),Pe.texImage2D($e,0,tt,3,3,0,tt,We,Or),U.freeType(Or),Pe.bindTexture(Ve,null),Pe.deleteTexture(Xr),dr=!Pe.getError()}return{colorBits:[Pe.getParameter(ee),Pe.getParameter(ce),Pe.getParameter(ye),Pe.getParameter(xe)],depthBits:Pe.getParameter(ue),stencilBits:Pe.getParameter(K),subpixelBits:Pe.getParameter(J),extensions:Object.keys(Xe).filter(function($r){return!!Xe[$r]}),maxAnisotropic:at,maxDrawbuffers:xt,maxColorAttachments:Et,pointSizeDims:Pe.getParameter(_e),lineWidthDims:Pe.getParameter(ne),maxViewportDims:Pe.getParameter(pe),maxCombinedTextureUnits:Pe.getParameter(be),maxCubeMapSize:Pe.getParameter(it),maxRenderbufferSize:Pe.getParameter(Oe),maxTextureUnits:Pe.getParameter(Ge),maxTextureSize:Pe.getParameter(ae),maxAttributes:Pe.getParameter(ie),maxVertexUniforms:Pe.getParameter(le),maxVertexTextureUnits:Pe.getParameter(De),maxVaryingVectors:Pe.getParameter(me),maxFragmentUniforms:Pe.getParameter(ht),glsl:Pe.getParameter(qe),renderer:Pe.getParameter(ct),vendor:Pe.getParameter(ze),version:Pe.getParameter(et),readFloat:Bt,npotTextureCube:dr}},or=function(Pe){return Pe instanceof Uint8Array||Pe instanceof Uint16Array||Pe instanceof Uint32Array||Pe instanceof Int8Array||Pe instanceof Int16Array||Pe instanceof Int32Array||Pe instanceof Float32Array||Pe instanceof Float64Array||Pe instanceof Uint8ClampedArray};function fr(Pe){return!!Pe&&typeof Pe=="object"&&Array.isArray(Pe.shape)&&Array.isArray(Pe.stride)&&typeof Pe.offset=="number"&&Pe.shape.length===Pe.stride.length&&(Array.isArray(Pe.data)||or(Pe.data))}var Ot=function(Pe){return Object.keys(Pe).map(function(Xe){return Pe[Xe]})},cr={shape:ft,flatten:Lt};function Ct(Pe,Xe,at){for(var xt=0;xt0){var yi;if(Array.isArray(Rr[0])){Yn=Ut(Rr);for(var Sn=1,An=1;An0){if(typeof Sn[0]=="number"){var jn=U.allocType(on.dtype,Sn.length);Ii(jn,Sn),Yn(jn,li),U.freeType(jn)}else if(Array.isArray(Sn[0])||or(Sn[0])){Vn=Ut(Sn);var Wn=Qt(Sn,Vn,on.dtype);Yn(Wn,li),U.freeType(Wn)}}}else if(fr(Sn)){Vn=Sn.shape;var si=Sn.stride,zi=0,da=0,ui=0,Li=0;Vn.length===1?(zi=Vn[0],da=1,ui=si[0],Li=0):Vn.length===2&&(zi=Vn[0],da=Vn[1],ui=si[0],Li=si[1]);var Ki=Array.isArray(Sn.data)?on.dtype:Jn(Sn.data),ca=U.allocType(Ki,zi*da);Vi(ca,Sn.data,zi,da,ui,Li,Sn.offset),Yn(ca,li),U.freeType(ca)}return Nn}return Lr||Nn(Tr),Nn._reglType="buffer",Nn._buffer=on,Nn.subdata=yi,at.profile&&(Nn.stats=on.stats),Nn.destroy=function(){Or(on)},Nn}function Er(){Ot(Bt).forEach(function(Tr){Tr.buffer=Pe.createBuffer(),Pe.bindBuffer(Tr.type,Tr.buffer),Pe.bufferData(Tr.type,Tr.persistentData||Tr.byteLength,Tr.usage)})}return at.profile&&(Xe.getTotalBufferSize=function(){var Tr=0;return Object.keys(Bt).forEach(function(Rr){Tr+=Bt[Rr].stats.size}),Tr}),{create:$r,createStream:$t,destroyStream:Ht,clear:function(){Ot(Bt).forEach(Or),Pt.forEach(Or)},getBuffer:function(Tr){return Tr&&Tr._buffer instanceof St?Tr._buffer:null},restore:Er,_initBuffer:Xr}}var ha=0,va=0,Xi=1,oa=1,Ma=4,Ga=4,ss={points:ha,point:va,lines:Xi,line:oa,triangles:Ma,triangle:Ga,"line loop":2,"line strip":3,"triangle strip":5,"triangle fan":6},mo=0,sl=1,Eo=4,ao=5120,Da=5121,bl=5122,bo=5123,Zs=5124,su=5125,fc=34963,Af=35040,ut=35044;function Jt(Pe,Xe,at,xt){var Et={},Bt=0,St={uint8:Da,uint16:bo};Xe.oes_element_index_uint&&(St.uint32=su);function Pt(Er){this.id=Bt++,Et[this.id]=this,this.buffer=Er,this.primType=Eo,this.vertCount=0,this.type=0}Pt.prototype.bind=function(){this.buffer.bind()};var $t=[];function Ht(Er){var Tr=$t.pop();return Tr||(Tr=new Pt(at.create(null,fc,!0,!1)._buffer)),Xr(Tr,Er,Af,-1,-1,0,0),Tr}function dr(Er){$t.push(Er)}function Xr(Er,Tr,Rr,Lr,an,on,Nn){Er.buffer.bind();var Yn;if(Tr){var yi=Nn;!Nn&&(!or(Tr)||fr(Tr)&&!or(Tr.data))&&(yi=Xe.oes_element_index_uint?su:bo),at._initBuffer(Er.buffer,Tr,Rr,yi,3)}else Pe.bufferData(fc,on,Rr),Er.buffer.dtype=Yn||Da,Er.buffer.usage=Rr,Er.buffer.dimension=3,Er.buffer.byteLength=on;if(Yn=Nn,!Nn){switch(Er.buffer.dtype){case Da:case ao:Yn=Da;break;case bo:case bl:Yn=bo;break;case su:case Zs:Yn=su;break;default:}Er.buffer.dtype=Yn}Er.type=Yn;var Sn=an;Sn<0&&(Sn=Er.buffer.byteLength,Yn===bo?Sn>>=1:Yn===su&&(Sn>>=2)),Er.vertCount=Sn;var An=Lr;if(Lr<0){An=Eo;var li=Er.buffer.dimension;li===1&&(An=mo),li===2&&(An=sl),li===3&&(An=Eo)}Er.primType=An}function Or(Er){xt.elementsCount--,delete Et[Er.id],Er.buffer.destroy(),Er.buffer=null}function $r(Er,Tr){var Rr=at.create(null,fc,!0),Lr=new Pt(Rr._buffer);xt.elementsCount++;function an(on){if(!on)Rr(),Lr.primType=Eo,Lr.vertCount=0,Lr.type=Da;else if(typeof on=="number")Rr(on),Lr.primType=Eo,Lr.vertCount=on|0,Lr.type=Da;else{var Nn=null,Yn=ut,yi=-1,Sn=-1,An=0,li=0;Array.isArray(on)||or(on)||fr(on)?Nn=on:("data"in on&&(Nn=on.data),"usage"in on&&(Yn=Vt[on.usage]),"primitive"in on&&(yi=ss[on.primitive]),"count"in on&&(Sn=on.count|0),"type"in on&&(li=St[on.type]),"length"in on?An=on.length|0:(An=Sn,li===bo||li===bl?An*=2:(li===su||li===Zs)&&(An*=4))),Xr(Lr,Nn,Yn,yi,Sn,An,li)}return an}return an(Er),an._reglType="elements",an._elements=Lr,an.subdata=function(on,Nn){return Rr.subdata(on,Nn),an},an.destroy=function(){Or(Lr)},an}return{create:$r,createStream:Ht,destroyStream:dr,getElements:function(Er){return typeof Er=="function"&&Er._elements instanceof Pt?Er._elements:null},clear:function(){Ot(Et).forEach(Or)}}}var er=new Float32Array(1),wr=new Uint32Array(er.buffer),nn=5123;function Dr(Pe){for(var Xe=U.allocType(nn,Pe.length),at=0;at>>31<<15,Bt=(xt<<1>>>24)-127,St=xt>>13&1023;if(Bt<-24)Xe[at]=Et;else if(Bt<-14){var Pt=-14-Bt;Xe[at]=Et+(St+1024>>Pt)}else Bt>15?Xe[at]=Et+31744:Xe[at]=Et+(Bt+15<<10)+St}return Xe}function bn(Pe){return Array.isArray(Pe)||or(Pe)}var Yr=34467,Tn=3553,Kn=34067,Qn=34069,Ai=6408,Ji=6406,Ra=6407,ii=6409,Za=6410,ja=32854,qo=32855,$a=36194,Ka=32819,Oa=32820,Ni=33635,ka=34042,vs=6402,yo=34041,so=35904,oo=35906,ko=36193,pa=33776,la=33777,As=33778,Ms=33779,xu=35986,rs=35987,Ls=34798,$s=35840,Kc=35841,_u=35842,Gu=35843,Ja=36196,ps=5121,Sa=5123,ma=5125,Ps=5126,Ca=10242,Pl=10243,ll=10497,Jc=33071,lu=33648,Mf=10240,Bd=10241,Hu=9728,Sf=9729,kc=9984,Uo=9985,ns=9986,Ks=9987,Ef=33170,ju=4352,gs=4353,bu=4354,kf=34046,ah=3317,Od=37440,Qc=37441,uu=37443,oh=37444,hc=33984,Fl=[kc,ns,Uo,Ks],Yo=[0,ii,Za,Ra,Ai],Ro={};Ro[ii]=Ro[Ji]=Ro[vs]=1,Ro[yo]=Ro[Za]=2,Ro[Ra]=Ro[so]=3,Ro[Ai]=Ro[oo]=4;function is(Pe){return"[object "+Pe+"]"}var Dl=is("HTMLCanvasElement"),dc=is("OffscreenCanvas"),ef=is("CanvasRenderingContext2D"),Cc=is("ImageBitmap"),sh=is("HTMLImageElement"),Y0=is("HTMLVideoElement"),Nd=Object.keys(kt).concat([Dl,dc,ef,Cc,sh,Y0]),Cf=[];Cf[ps]=1,Cf[Ps]=4,Cf[ko]=2,Cf[Sa]=2,Cf[ma]=4;var Vo=[];Vo[ja]=2,Vo[qo]=2,Vo[$a]=2,Vo[yo]=4,Vo[pa]=.5,Vo[la]=.5,Vo[As]=1,Vo[Ms]=1,Vo[xu]=.5,Vo[rs]=1,Vo[Ls]=1,Vo[$s]=.5,Vo[Kc]=.25,Vo[_u]=.5,Vo[Gu]=.25,Vo[Ja]=.5;function Ud(Pe){return Array.isArray(Pe)&&(Pe.length===0||typeof Pe[0]=="number")}function zh(Pe){if(!Array.isArray(Pe))return!1;var Xe=Pe.length;return!(Xe===0||!bn(Pe[0]))}function tf(Pe){return Object.prototype.toString.call(Pe)}function Vd(Pe){return tf(Pe)===Dl}function rf(Pe){return tf(Pe)===dc}function qh(Pe){return tf(Pe)===ef}function vc(Pe){return tf(Pe)===Cc}function dd(Pe){return tf(Pe)===sh}function Bh(Pe){return tf(Pe)===Y0}function Wu(Pe){if(!Pe)return!1;var Xe=tf(Pe);return Nd.indexOf(Xe)>=0?!0:Ud(Pe)||zh(Pe)||fr(Pe)}function vd(Pe){return kt[Object.prototype.toString.call(Pe)]|0}function pd(Pe,Xe){var at=Xe.length;switch(Pe.type){case ps:case Sa:case ma:case Ps:var xt=U.allocType(Pe.type,at);xt.set(Xe),Pe.data=xt;break;case ko:Pe.data=Dr(Xe);break;default:}}function lh(Pe,Xe){return U.allocType(Pe.type===ko?Ps:Pe.type,Xe)}function nf(Pe,Xe){Pe.type===ko?(Pe.data=Dr(Xe),U.freeType(Xe)):Pe.data=Xe}function uh(Pe,Xe,at,xt,Et,Bt){for(var St=Pe.width,Pt=Pe.height,$t=Pe.channels,Ht=St*Pt*$t,dr=lh(Pe,Ht),Xr=0,Or=0;Or=1;)Pt+=St*$t*$t,$t/=2;return Pt}else return St*at*xt}function gd(Pe,Xe,at,xt,Et,Bt,St){var Pt={"don't care":ju,"dont care":ju,nice:bu,fast:gs},$t={repeat:ll,clamp:Jc,mirror:lu},Ht={nearest:Hu,linear:Sf},dr=e({mipmap:Ks,"nearest mipmap nearest":kc,"linear mipmap nearest":Uo,"nearest mipmap linear":ns,"linear mipmap linear":Ks},Ht),Xr={none:0,browser:oh},Or={uint8:ps,rgba4:Ka,rgb565:Ni,"rgb5 a1":Oa},$r={alpha:Ji,luminance:ii,"luminance alpha":Za,rgb:Ra,rgba:Ai,rgba4:ja,"rgb5 a1":qo,rgb565:$a},Er={};Xe.ext_srgb&&($r.srgb=so,$r.srgba=oo),Xe.oes_texture_float&&(Or.float32=Or.float=Ps),Xe.oes_texture_half_float&&(Or.float16=Or["half float"]=ko),Xe.webgl_depth_texture&&(e($r,{depth:vs,"depth stencil":yo}),e(Or,{uint16:Sa,uint32:ma,"depth stencil":ka})),Xe.webgl_compressed_texture_s3tc&&e(Er,{"rgb s3tc dxt1":pa,"rgba s3tc dxt1":la,"rgba s3tc dxt3":As,"rgba s3tc dxt5":Ms}),Xe.webgl_compressed_texture_atc&&e(Er,{"rgb atc":xu,"rgba atc explicit alpha":rs,"rgba atc interpolated alpha":Ls}),Xe.webgl_compressed_texture_pvrtc&&e(Er,{"rgb pvrtc 4bppv1":$s,"rgb pvrtc 2bppv1":Kc,"rgba pvrtc 4bppv1":_u,"rgba pvrtc 2bppv1":Gu}),Xe.webgl_compressed_texture_etc1&&(Er["rgb etc1"]=Ja);var Tr=Array.prototype.slice.call(Pe.getParameter(Yr));Object.keys(Er).forEach(function(vr){var gn=Er[vr];Tr.indexOf(gn)>=0&&($r[vr]=gn)});var Rr=Object.keys($r);at.textureFormats=Rr;var Lr=[];Object.keys($r).forEach(function(vr){var gn=$r[vr];Lr[gn]=vr});var an=[];Object.keys(Or).forEach(function(vr){var gn=Or[vr];an[gn]=vr});var on=[];Object.keys(Ht).forEach(function(vr){var gn=Ht[vr];on[gn]=vr});var Nn=[];Object.keys(dr).forEach(function(vr){var gn=dr[vr];Nn[gn]=vr});var Yn=[];Object.keys($t).forEach(function(vr){var gn=$t[vr];Yn[gn]=vr});var yi=Rr.reduce(function(vr,gn){var xn=$r[gn];return xn===ii||xn===Ji||xn===ii||xn===Za||xn===vs||xn===yo||Xe.ext_srgb&&(xn===so||xn===oo)?vr[xn]=xn:xn===qo||gn.indexOf("rgba")>=0?vr[xn]=Ai:vr[xn]=Ra,vr},{});function Sn(){this.internalformat=Ai,this.format=Ai,this.type=ps,this.compressed=!1,this.premultiplyAlpha=!1,this.flipY=!1,this.unpackAlignment=1,this.colorSpace=oh,this.width=0,this.height=0,this.channels=0}function An(vr,gn){vr.internalformat=gn.internalformat,vr.format=gn.format,vr.type=gn.type,vr.compressed=gn.compressed,vr.premultiplyAlpha=gn.premultiplyAlpha,vr.flipY=gn.flipY,vr.unpackAlignment=gn.unpackAlignment,vr.colorSpace=gn.colorSpace,vr.width=gn.width,vr.height=gn.height,vr.channels=gn.channels}function li(vr,gn){if(!(typeof gn!="object"||!gn)){if("premultiplyAlpha"in gn&&(vr.premultiplyAlpha=gn.premultiplyAlpha),"flipY"in gn&&(vr.flipY=gn.flipY),"alignment"in gn&&(vr.unpackAlignment=gn.alignment),"colorSpace"in gn&&(vr.colorSpace=Xr[gn.colorSpace]),"type"in gn){var xn=gn.type;vr.type=Or[xn]}var Gi=vr.width,wo=vr.height,xs=vr.channels,Hi=!1;"shape"in gn?(Gi=gn.shape[0],wo=gn.shape[1],gn.shape.length===3&&(xs=gn.shape[2],Hi=!0)):("radius"in gn&&(Gi=wo=gn.radius),"width"in gn&&(Gi=gn.width),"height"in gn&&(wo=gn.height),"channels"in gn&&(xs=gn.channels,Hi=!0)),vr.width=Gi|0,vr.height=wo|0,vr.channels=xs|0;var ar=!1;if("format"in gn){var gr=gn.format,Pr=vr.internalformat=$r[gr];vr.format=yi[Pr],gr in Or&&("type"in gn||(vr.type=Or[gr])),gr in Er&&(vr.compressed=!0),ar=!0}!Hi&&ar?vr.channels=Ro[vr.format]:Hi&&!ar&&vr.channels!==Yo[vr.format]&&(vr.format=vr.internalformat=Yo[vr.channels])}}function Vn(vr){Pe.pixelStorei(Od,vr.flipY),Pe.pixelStorei(Qc,vr.premultiplyAlpha),Pe.pixelStorei(uu,vr.colorSpace),Pe.pixelStorei(ah,vr.unpackAlignment)}function jn(){Sn.call(this),this.xOffset=0,this.yOffset=0,this.data=null,this.needsFree=!1,this.element=null,this.needsCopy=!1}function Wn(vr,gn){var xn=null;if(Wu(gn)?xn=gn:gn&&(li(vr,gn),"x"in gn&&(vr.xOffset=gn.x|0),"y"in gn&&(vr.yOffset=gn.y|0),Wu(gn.data)&&(xn=gn.data)),gn.copy){var Gi=Et.viewportWidth,wo=Et.viewportHeight;vr.width=vr.width||Gi-vr.xOffset,vr.height=vr.height||wo-vr.yOffset,vr.needsCopy=!0}else if(!xn)vr.width=vr.width||1,vr.height=vr.height||1,vr.channels=vr.channels||4;else if(or(xn))vr.channels=vr.channels||4,vr.data=xn,!("type"in gn)&&vr.type===ps&&(vr.type=vd(xn));else if(Ud(xn))vr.channels=vr.channels||4,pd(vr,xn),vr.alignment=1,vr.needsFree=!0;else if(fr(xn)){var xs=xn.data;!Array.isArray(xs)&&vr.type===ps&&(vr.type=vd(xs));var Hi=xn.shape,ar=xn.stride,gr,Pr,pn,Mn,sn,tn;Hi.length===3?(pn=Hi[2],tn=ar[2]):(pn=1,tn=1),gr=Hi[0],Pr=Hi[1],Mn=ar[0],sn=ar[1],vr.alignment=1,vr.width=gr,vr.height=Pr,vr.channels=pn,vr.format=vr.internalformat=Yo[pn],vr.needsFree=!0,uh(vr,xs,Mn,sn,tn,xn.offset)}else if(Vd(xn)||rf(xn)||qh(xn))Vd(xn)||rf(xn)?vr.element=xn:vr.element=xn.canvas,vr.width=vr.element.width,vr.height=vr.element.height,vr.channels=4;else if(vc(xn))vr.element=xn,vr.width=xn.width,vr.height=xn.height,vr.channels=4;else if(dd(xn))vr.element=xn,vr.width=xn.naturalWidth,vr.height=xn.naturalHeight,vr.channels=4;else if(Bh(xn))vr.element=xn,vr.width=xn.videoWidth,vr.height=xn.videoHeight,vr.channels=4;else if(zh(xn)){var Hr=vr.width||xn[0].length,Mr=vr.height||xn.length,zr=vr.channels;bn(xn[0][0])?zr=zr||xn[0][0].length:zr=zr||1;for(var yr=cr.shape(xn),hn=1,kn=0;kn>=wo,xn.height>>=wo,Wn(xn,Gi[wo]),vr.mipmask|=1<=0&&!("faces"in gn)&&(vr.genMipmaps=!0)}if("mag"in gn){var Gi=gn.mag;vr.magFilter=Ht[Gi]}var wo=vr.wrapS,xs=vr.wrapT;if("wrap"in gn){var Hi=gn.wrap;typeof Hi=="string"?wo=xs=$t[Hi]:Array.isArray(Hi)&&(wo=$t[Hi[0]],xs=$t[Hi[1]])}else{if("wrapS"in gn){var ar=gn.wrapS;wo=$t[ar]}if("wrapT"in gn){var gr=gn.wrapT;xs=$t[gr]}}if(vr.wrapS=wo,vr.wrapT=xs,"anisotropic"in gn){var Pr=gn.anisotropic;vr.anisotropic=gn.anisotropic}if("mipmap"in gn){var pn=!1;switch(typeof gn.mipmap){case"string":vr.mipmapHint=Pt[gn.mipmap],vr.genMipmaps=!0,pn=!0;break;case"boolean":pn=vr.genMipmaps=gn.mipmap;break;case"object":vr.genMipmaps=!1,pn=!0;break;default:}pn&&!("min"in gn)&&(vr.minFilter=kc)}}function po(vr,gn){Pe.texParameteri(gn,Bd,vr.minFilter),Pe.texParameteri(gn,Mf,vr.magFilter),Pe.texParameteri(gn,Ca,vr.wrapS),Pe.texParameteri(gn,Pl,vr.wrapT),Xe.ext_texture_filter_anisotropic&&Pe.texParameteri(gn,kf,vr.anisotropic),vr.genMipmaps&&(Pe.hint(Ef,vr.mipmapHint),Pe.generateMipmap(gn))}var Xo=0,no={},Us=at.maxTextureUnits,ql=Array(Us).map(function(){return null});function Ta(vr){Sn.call(this),this.mipmask=0,this.internalformat=Ai,this.id=Xo++,this.refCount=1,this.target=vr,this.texture=Pe.createTexture(),this.unit=-1,this.bindCount=0,this.texInfo=new vo,St.profile&&(this.stats={size:0})}function vu(vr){Pe.activeTexture(hc),Pe.bindTexture(vr.target,vr.texture)}function ys(){var vr=ql[0];vr?Pe.bindTexture(vr.target,vr.texture):Pe.bindTexture(Tn,null)}function xc(vr){var gn=vr.texture,xn=vr.unit,Gi=vr.target;xn>=0&&(Pe.activeTexture(hc+xn),Pe.bindTexture(Gi,null),ql[xn]=null),Pe.deleteTexture(gn),vr.texture=null,vr.params=null,vr.pixels=null,vr.refCount=0,delete no[vr.id],Bt.textureCount--}e(Ta.prototype,{bind:function(){var vr=this;vr.bindCount+=1;var gn=vr.unit;if(gn<0){for(var xn=0;xn0)continue;Gi.unit=-1}ql[xn]=vr,gn=xn;break}gn>=Us,St.profile&&Bt.maxTextureUnits>sn)-pn,tn.height=tn.height||(xn.height>>sn)-Mn,vu(xn),zi(tn,Tn,pn,Mn,sn),ys(),Li(tn),Gi}function xs(Hi,ar){var gr=Hi|0,Pr=ar|0||gr;if(gr===xn.width&&Pr===xn.height)return Gi;Gi.width=xn.width=gr,Gi.height=xn.height=Pr,vu(xn);for(var pn=0;xn.mipmask>>pn;++pn){var Mn=gr>>pn,sn=Pr>>pn;if(!Mn||!sn)break;Pe.texImage2D(Tn,pn,xn.format,Mn,sn,0,xn.format,xn.type,null)}return ys(),St.profile&&(xn.stats.size=af(xn.internalformat,xn.type,gr,Pr,!1,!1)),Gi}return Gi(vr,gn),Gi.subimage=wo,Gi.resize=xs,Gi._reglType="texture2d",Gi._texture=xn,St.profile&&(Gi.stats=xn.stats),Gi.destroy=function(){xn.decRef()},Gi}function $l(vr,gn,xn,Gi,wo,xs){var Hi=new Ta(Kn);no[Hi.id]=Hi,Bt.cubeCount++;var ar=new Array(6);function gr(Mn,sn,tn,Hr,Mr,zr){var yr,hn=Hi.texInfo;for(vo.call(hn),yr=0;yr<6;++yr)ar[yr]=Na();if(typeof Mn=="number"||!Mn){var kn=Mn|0||1;for(yr=0;yr<6;++yr)ca(ar[yr],kn,kn)}else if(typeof Mn=="object")if(sn)Ia(ar[0],Mn),Ia(ar[1],sn),Ia(ar[2],tn),Ia(ar[3],Hr),Ia(ar[4],Mr),Ia(ar[5],zr);else if(_o(hn,Mn),li(Hi,Mn),"faces"in Mn){var Xn=Mn.faces;for(yr=0;yr<6;++yr)An(ar[yr],Hi),Ia(ar[yr],Xn[yr])}else for(yr=0;yr<6;++yr)Ia(ar[yr],Mn);for(An(Hi,ar[0]),hn.genMipmaps?Hi.mipmask=(ar[0].width<<1)-1:Hi.mipmask=ar[0].mipmask,Hi.internalformat=ar[0].internalformat,gr.width=ar[0].width,gr.height=ar[0].height,vu(Hi),yr=0;yr<6;++yr)Os(ar[yr],Qn+yr);for(po(hn,Kn),ys(),St.profile&&(Hi.stats.size=af(Hi.internalformat,Hi.type,gr.width,gr.height,hn.genMipmaps,!0)),gr.format=Lr[Hi.internalformat],gr.type=an[Hi.type],gr.mag=on[hn.magFilter],gr.min=Nn[hn.minFilter],gr.wrapS=Yn[hn.wrapS],gr.wrapT=Yn[hn.wrapT],yr=0;yr<6;++yr)Ns(ar[yr]);return gr}function Pr(Mn,sn,tn,Hr,Mr){var zr=tn|0,yr=Hr|0,hn=Mr|0,kn=ui();return An(kn,Hi),kn.width=0,kn.height=0,Wn(kn,sn),kn.width=kn.width||(Hi.width>>hn)-zr,kn.height=kn.height||(Hi.height>>hn)-yr,vu(Hi),zi(kn,Qn+Mn,zr,yr,hn),ys(),Li(kn),gr}function pn(Mn){var sn=Mn|0;if(sn!==Hi.width){gr.width=Hi.width=sn,gr.height=Hi.height=sn,vu(Hi);for(var tn=0;tn<6;++tn)for(var Hr=0;Hi.mipmask>>Hr;++Hr)Pe.texImage2D(Qn+tn,Hr,Hi.format,sn>>Hr,sn>>Hr,0,Hi.format,Hi.type,null);return ys(),St.profile&&(Hi.stats.size=af(Hi.internalformat,Hi.type,gr.width,gr.height,!1,!0)),gr}}return gr(vr,gn,xn,Gi,wo,xs),gr.subimage=Pr,gr.resize=pn,gr._reglType="textureCube",gr._texture=Hi,St.profile&&(gr.stats=Hi.stats),gr.destroy=function(){Hi.decRef()},gr}function xa(){for(var vr=0;vr>Gi,xn.height>>Gi,0,xn.internalformat,xn.type,null);else for(var wo=0;wo<6;++wo)Pe.texImage2D(Qn+wo,Gi,xn.internalformat,xn.width>>Gi,xn.height>>Gi,0,xn.internalformat,xn.type,null);po(xn.texInfo,xn.target)})}function Es(){for(var vr=0;vr=0?Ns=!0:$t.indexOf(vo)>=0&&(Ns=!1))),("depthTexture"in Ta||"depthStencilTexture"in Ta)&&(ql=!!(Ta.depthTexture||Ta.depthStencilTexture)),"depth"in Ta&&(typeof Ta.depth=="boolean"?Os=Ta.depth:(Xo=Ta.depth,Ss=!1)),"stencil"in Ta&&(typeof Ta.stencil=="boolean"?Ss=Ta.stencil:(no=Ta.stencil,Os=!1)),"depthStencil"in Ta&&(typeof Ta.depthStencil=="boolean"?Os=Ss=Ta.depthStencil:(Us=Ta.depthStencil,Os=!1,Ss=!1))}var ys=null,xc=null,Zl=null,$l=null;if(Array.isArray(Na))ys=Na.map(Er);else if(Na)ys=[Er(Na)];else for(ys=new Array(po),Ki=0;Ki0&&(Li.depth=Wn[0].depth,Li.stencil=Wn[0].stencil,Li.depthStencil=Wn[0].depthStencil),Wn[ui]?Wn[ui](Li):Wn[ui]=An(Li)}return e(si,{width:Ki,height:Ki,color:vo})}function zi(da){var ui,Li=da|0;if(Li===si.width)return si;var Ki=si.color;for(ui=0;ui=Ki.byteLength?ca.subdata(Ki):(ca.destroy(),An.buffers[da]=null)),An.buffers[da]||(ca=An.buffers[da]=Et.create(ui,pc,!1,!0)),Li.buffer=Et.getBuffer(ca),Li.size=Li.buffer.dimension|0,Li.normalized=!1,Li.type=Li.buffer.dtype,Li.offset=0,Li.stride=0,Li.divisor=0,Li.state=1,si[da]=1}else Et.getBuffer(ui)?(Li.buffer=Et.getBuffer(ui),Li.size=Li.buffer.dimension|0,Li.normalized=!1,Li.type=Li.buffer.dtype,Li.offset=0,Li.stride=0,Li.divisor=0,Li.state=1):Et.getBuffer(ui.buffer)?(Li.buffer=Et.getBuffer(ui.buffer),Li.size=(+ui.size||Li.buffer.dimension)|0,Li.normalized=!!ui.normalized||!1,"type"in ui?Li.type=Cn[ui.type]:Li.type=Li.buffer.dtype,Li.offset=(ui.offset||0)|0,Li.stride=(ui.stride||0)|0,Li.divisor=(ui.divisor||0)|0,Li.state=1):"x"in ui&&(Li.x=+ui.x||0,Li.y=+ui.y||0,Li.z=+ui.z||0,Li.w=+ui.w||0,Li.state=2)}for(var Ia=0;Ia1)for(var Vn=0;VnTr&&(Tr=Rr.stats.uniformsCount)}),Tr},at.getMaxAttributesCount=function(){var Tr=0;return dr.forEach(function(Rr){Rr.stats.attributesCount>Tr&&(Tr=Rr.stats.attributesCount)}),Tr});function Er(){Et={},Bt={};for(var Tr=0;Tr16&&(at=en(at,Pe.length*8));for(var xt=Array(16),Et=Array(16),Bt=0;Bt<16;Bt++)xt[Bt]=at[Bt]^909522486,Et[Bt]=at[Bt]^1549556828;var St=en(xt.concat(qf(Xe)),512+Xe.length*8);return Ze(en(Et.concat(St),768))}function Wl(Pe){for(var Xe=Hh?"0123456789ABCDEF":"0123456789abcdef",at="",xt,Et=0;Et>>4&15)+Xe.charAt(xt&15);return at}function If(Pe){for(var Xe="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",at="",xt=Pe.length,Et=0;EtPe.length*8?at+=X0:at+=Xe.charAt(Bt>>>6*(3-St)&63);return at}function vh(Pe,Xe){var at=Xe.length,xt=Array(),Et,Bt,St,Pt,$t=Array(Math.ceil(Pe.length/2));for(Et=0;Et<$t.length;Et++)$t[Et]=Pe.charCodeAt(Et*2)<<8|Pe.charCodeAt(Et*2+1);for(;$t.length>0;){for(Pt=Array(),St=0,Et=0;Et<$t.length;Et++)St=(St<<16)+$t[Et],Bt=Math.floor(St/at),St-=Bt*at,(Pt.length>0||Bt>0)&&(Pt[Pt.length]=Bt);xt[xt.length]=St,$t=Pt}var Ht="";for(Et=xt.length-1;Et>=0;Et--)Ht+=Xe.charAt(xt[Et]);var dr=Math.ceil(Pe.length*8/(Math.log(Xe.length)/Math.log(2)));for(Et=Ht.length;Et>>6&31,128|xt&63):xt<=65535?Xe+=String.fromCharCode(224|xt>>>12&15,128|xt>>>6&63,128|xt&63):xt<=2097151&&(Xe+=String.fromCharCode(240|xt>>>18&7,128|xt>>>12&63,128|xt>>>6&63,128|xt&63));return Xe}function qf(Pe){for(var Xe=Array(Pe.length>>2),at=0;at>5]|=(Pe.charCodeAt(at/8)&255)<<24-at%32;return Xe}function Ze(Pe){for(var Xe="",at=0;at>5]>>>24-at%32&255);return Xe}function yt(Pe,Xe){return Pe>>>Xe|Pe<<32-Xe}function Wt(Pe,Xe){return Pe>>>Xe}function zt(Pe,Xe,at){return Pe&Xe^~Pe&at}function hr(Pe,Xe,at){return Pe&Xe^Pe&at^Xe&at}function Ur(Pe){return yt(Pe,2)^yt(Pe,13)^yt(Pe,22)}function Qr(Pe){return yt(Pe,6)^yt(Pe,11)^yt(Pe,25)}function cn(Pe){return yt(Pe,7)^yt(Pe,18)^Wt(Pe,3)}function yn(Pe){return yt(Pe,17)^yt(Pe,19)^Wt(Pe,10)}var Fn=new Array(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);function en(Pe,Xe){var at=new Array(1779033703,-1150833019,1013904242,-1521486534,1359893119,-1694144372,528734635,1541459225),xt=new Array(64),Et,Bt,St,Pt,$t,Ht,dr,Xr,Or,$r,Er,Tr;for(Pe[Xe>>5]|=128<<24-Xe%32,Pe[(Xe+64>>9<<4)+15]=Xe,Or=0;Or>16)+(Xe>>16)+(at>>16);return xt<<16|at&65535}function mn(Pe){return Array.prototype.slice.call(Pe)}function Pn(Pe){return mn(Pe).join("")}function On(Pe){var Xe=Pe&&Pe.cache,at=0,xt=[],Et=[],Bt=[];function St(Er,Tr){var Rr=Tr&&Tr.stable;if(!Rr){for(var Lr=0;Lr0&&(Er.push(an,"="),Er.push.apply(Er,mn(arguments)),Er.push(";")),an}return e(Tr,{def:Lr,toString:function(){return Pn([Rr.length>0?"var "+Rr.join(",")+";":"",Pn(Er)])}})}function $t(){var Er=Pt(),Tr=Pt(),Rr=Er.toString,Lr=Tr.toString;function an(on,Nn){Tr(on,Nn,"=",Er.def(on,Nn),";")}return e(function(){Er.apply(Er,mn(arguments))},{def:Er.def,entry:Er,exit:Tr,save:an,set:function(on,Nn,Yn){an(on,Nn),Er(on,Nn,"=",Yn,";")},toString:function(){return Rr()+Lr()}})}function Ht(){var Er=Pn(arguments),Tr=$t(),Rr=$t(),Lr=Tr.toString,an=Rr.toString;return e(Tr,{then:function(){return Tr.apply(Tr,mn(arguments)),this},else:function(){return Rr.apply(Rr,mn(arguments)),this},toString:function(){var on=an();return on&&(on="else{"+on+"}"),Pn(["if(",Er,"){",Lr(),"}",on])}})}var dr=Pt(),Xr={};function Or(Er,Tr){var Rr=[];function Lr(){var yi="a"+Rr.length;return Rr.push(yi),yi}Tr=Tr||0;for(var an=0;an":516,notequal:517,"!=":517,"!==":517,gequal:518,">=":518,always:519},br={0:0,zero:0,keep:7680,replace:7681,increment:7682,decrement:7683,"increment wrap":34055,"decrement wrap":34056,invert:5386},kr={cw:ve,ccw:Se};function Gr(Pe){return Array.isArray(Pe)||or(Pe)||fr(Pe)}function Wr(Pe){return Pe.sort(function(Xe,at){return Xe===Al?-1:at===Al?1:Xe=1,xt>=2,Xe)}else if(at===Ha){var Et=Pe.data;return new Ar(Et.thisDep,Et.contextDep,Et.propDep,Xe)}else{if(at===Qa)return new Ar(!1,!1,!1,Xe);if(at===Ya){for(var Bt=!1,St=!1,Pt=!1,$t=0;$t=1&&(St=!0),dr>=2&&(Pt=!0)}else Ht.type===Ha&&(Bt=Bt||Ht.data.thisDep,St=St||Ht.data.contextDep,Pt=Pt||Ht.data.propDep)}return new Ar(Bt,St,Pt,Xe)}else return new Ar(at===na,at===Zi,at===Gn,Xe)}}var ai=new Ar(!1,!1,!1,function(){});function Mi(Pe,Xe,at,xt,Et,Bt,St,Pt,$t,Ht,dr,Xr,Or,$r,Er,Tr){var Rr=Ht.Record,Lr={add:32774,subtract:32778,"reverse subtract":32779};at.ext_blend_minmax&&(Lr.min=Ee,Lr.max=Re);var an=at.angle_instanced_arrays,on=at.webgl_draw_buffers,Nn=at.oes_vertex_array_object,Yn={dirty:!0,profile:Tr.profile},yi={},Sn=[],An={},li={};function Vn(ar){return ar.replace(".","_")}function jn(ar,gr,Pr){var pn=Vn(ar);Sn.push(ar),yi[pn]=Yn[pn]=!!Pr,An[pn]=gr}function Wn(ar,gr,Pr){var pn=Vn(ar);Sn.push(ar),Array.isArray(Pr)?(Yn[pn]=Pr.slice(),yi[pn]=Pr.slice()):Yn[pn]=yi[pn]=Pr,li[pn]=gr}function si(ar){return!!isNaN(ar)}jn(ho,wn),jn(Pa,ln),Wn(Js,"blendColor",[0,0,0,0]),Wn(fs,"blendEquationSeparate",[Rt,Rt]),Wn(Io,"blendFuncSeparate",[Ft,pt,Ft,pt]),jn(oi,gi,!0),Wn(ro,"depthFunc",ir),Wn(Go,"depthRange",[0,1]),Wn(Qs,"depthMask",!0),Wn(zl,zl,[!0,!0,!0,!0]),jn(cu,Br),Wn(Zu,"cullFace",te),Wn(mc,mc,Se),Wn(Yl,Yl,1),jn(lf,mi),Wn($u,"polygonOffset",[0,0]),jn(ph,ia),jn(gh,ua),Wn(uf,"sampleCoverage",[1,!1]),jn(Ku,In),Wn(fu,"stencilMask",-1),Wn(Ju,"stencilFunc",[rt,0,-1]),Wn(Qu,"stencilOpSeparate",[W,He,He,He]),Wn(Wd,"stencilOpSeparate",[te,He,He,He]),jn(x0,Bi),Wn(Bf,"scissor",[0,0,Pe.drawingBufferWidth,Pe.drawingBufferHeight]),Wn(Al,Al,[0,0,Pe.drawingBufferWidth,Pe.drawingBufferHeight]);var zi={gl:Pe,context:Or,strings:Xe,next:yi,current:Yn,draw:Xr,elements:Bt,buffer:Et,shader:dr,attributes:Ht.state,vao:Ht,uniforms:$t,framebuffer:Pt,extensions:at,timer:$r,isBufferArgs:Gr},da={primTypes:ss,compareFuncs:sr,blendFuncs:Vr,blendEquations:Lr,stencilOps:br,glTypes:Cn,orientationType:kr};on&&(da.backBuffer=[te],da.drawBuffer=T(xt.maxDrawbuffers,function(ar){return ar===0?[0]:T(ar,function(gr){return Cr+gr})}));var ui=0;function Li(){var ar=On({cache:Er}),gr=ar.link,Pr=ar.global;ar.id=ui++,ar.batchId="0";var pn=gr(zi),Mn=ar.shared={props:"a0"};Object.keys(zi).forEach(function(zr){Mn[zr]=Pr.def(pn,".",zr)});var sn=ar.next={},tn=ar.current={};Object.keys(li).forEach(function(zr){Array.isArray(Yn[zr])&&(sn[zr]=Pr.def(Mn.next,".",zr),tn[zr]=Pr.def(Mn.current,".",zr))});var Hr=ar.constants={};Object.keys(da).forEach(function(zr){Hr[zr]=Pr.def(JSON.stringify(da[zr]))}),ar.invoke=function(zr,yr){switch(yr.type){case Un:var hn=["this",Mn.context,Mn.props,ar.batchId];return zr.def(gr(yr.data),".call(",hn.slice(0,Math.max(yr.data.length+1,4)),")");case Gn:return zr.def(Mn.props,yr.data);case Zi:return zr.def(Mn.context,yr.data);case na:return zr.def("this",yr.data);case Ha:return yr.data.append(ar,zr),yr.data.ref;case Qa:return yr.data.toString();case Ya:return yr.data.map(function(kn){return ar.invoke(zr,kn)})}},ar.attribCache={};var Mr={};return ar.scopeAttrib=function(zr){var yr=Xe.id(zr);if(yr in Mr)return Mr[yr];var hn=Ht.scope[yr];hn||(hn=Ht.scope[yr]=new Rr);var kn=Mr[yr]=gr(hn);return kn},ar}function Ki(ar){var gr=ar.static,Pr=ar.dynamic,pn;if(Xl in gr){var Mn=!!gr[Xl];pn=zn(function(tn,Hr){return Mn}),pn.enable=Mn}else if(Xl in Pr){var sn=Pr[Xl];pn=Zn(sn,function(tn,Hr){return tn.invoke(Hr,sn)})}return pn}function ca(ar,gr){var Pr=ar.static,pn=ar.dynamic;if(cf in Pr){var Mn=Pr[cf];return Mn?(Mn=Pt.getFramebuffer(Mn),zn(function(tn,Hr){var Mr=tn.link(Mn),zr=tn.shared;Hr.set(zr.framebuffer,".next",Mr);var yr=zr.context;return Hr.set(yr,"."+Ne,Mr+".width"),Hr.set(yr,"."+Qe,Mr+".height"),Mr})):zn(function(tn,Hr){var Mr=tn.shared;Hr.set(Mr.framebuffer,".next","null");var zr=Mr.context;return Hr.set(zr,"."+Ne,zr+"."+Zt),Hr.set(zr,"."+Qe,zr+"."+Nt),"null"})}else if(cf in pn){var sn=pn[cf];return Zn(sn,function(tn,Hr){var Mr=tn.invoke(Hr,sn),zr=tn.shared,yr=zr.framebuffer,hn=Hr.def(yr,".getFramebuffer(",Mr,")");Hr.set(yr,".next",hn);var kn=zr.context;return Hr.set(kn,"."+Ne,hn+"?"+hn+".width:"+kn+"."+Zt),Hr.set(kn,"."+Qe,hn+"?"+hn+".height:"+kn+"."+Nt),hn})}else return null}function Ia(ar,gr,Pr){var pn=ar.static,Mn=ar.dynamic;function sn(Mr){if(Mr in pn){var zr=pn[Mr],yr=!0,hn=zr.x|0,kn=zr.y|0,Xn,sa;return"width"in zr?Xn=zr.width|0:yr=!1,"height"in zr?sa=zr.height|0:yr=!1,new Ar(!yr&&gr&&gr.thisDep,!yr&&gr&&gr.contextDep,!yr&&gr&&gr.propDep,function(fa,Qi){var $i=fa.shared.context,Fi=Xn;"width"in zr||(Fi=Qi.def($i,".",Ne,"-",hn));var ji=sa;return"height"in zr||(ji=Qi.def($i,".",Qe,"-",kn)),[hn,kn,Fi,ji]})}else if(Mr in Mn){var Oi=Mn[Mr],Pi=Zn(Oi,function(fa,Qi){var $i=fa.invoke(Qi,Oi),Fi=fa.shared.context,ji=Qi.def($i,".x|0"),Wi=Qi.def($i,".y|0"),Fa=Qi.def('"width" in ',$i,"?",$i,".width|0:","(",Fi,".",Ne,"-",ji,")"),Vs=Qi.def('"height" in ',$i,"?",$i,".height|0:","(",Fi,".",Qe,"-",Wi,")");return[ji,Wi,Fa,Vs]});return gr&&(Pi.thisDep=Pi.thisDep||gr.thisDep,Pi.contextDep=Pi.contextDep||gr.contextDep,Pi.propDep=Pi.propDep||gr.propDep),Pi}else return gr?new Ar(gr.thisDep,gr.contextDep,gr.propDep,function(fa,Qi){var $i=fa.shared.context;return[0,0,Qi.def($i,".",Ne),Qi.def($i,".",Qe)]}):null}var tn=sn(Al);if(tn){var Hr=tn;tn=new Ar(tn.thisDep,tn.contextDep,tn.propDep,function(Mr,zr){var yr=Hr.append(Mr,zr),hn=Mr.shared.context;return zr.set(hn,"."+Je,yr[2]),zr.set(hn,"."+lt,yr[3]),yr})}return{viewport:tn,scissor_box:sn(Bf)}}function Os(ar,gr){var Pr=ar.static,pn=typeof Pr[Wh]=="string"&&typeof Pr[jh]=="string";if(pn){if(Object.keys(gr.dynamic).length>0)return null;var Mn=gr.static,sn=Object.keys(Mn);if(sn.length>0&&typeof Mn[sn[0]]=="number"){for(var tn=[],Hr=0;Hr"+ji+"?"+yr+".constant["+ji+"]:0;"}).join(""),"}}else{","if(",Xn,"(",yr,".buffer)){",fa,"=",sa,".createStream(",ur,",",yr,".buffer);","}else{",fa,"=",sa,".getBuffer(",yr,".buffer);","}",Qi,'="type" in ',yr,"?",kn.glTypes,"[",yr,".type]:",fa,".dtype;",Oi.normalized,"=!!",yr,".normalized;");function $i(Fi){zr(Oi[Fi],"=",yr,".",Fi,"|0;")}return $i("size"),$i("offset"),$i("stride"),$i("divisor"),zr("}}"),zr.exit("if(",Oi.isStream,"){",sa,".destroyStream(",fa,");","}"),Oi}Mn[sn]=Zn(tn,Hr)}),Mn}function po(ar){var gr=ar.static,Pr=ar.dynamic,pn={};return Object.keys(gr).forEach(function(Mn){var sn=gr[Mn];pn[Mn]=zn(function(tn,Hr){return typeof sn=="number"||typeof sn=="boolean"?""+sn:tn.link(sn)})}),Object.keys(Pr).forEach(function(Mn){var sn=Pr[Mn];pn[Mn]=Zn(sn,function(tn,Hr){return tn.invoke(Hr,sn)})}),pn}function Xo(ar,gr,Pr,pn,Mn){var sn=ar.static,tn=ar.dynamic,Hr=Os(ar,gr),Mr=ca(ar,Mn),zr=Ia(ar,Mr,Mn),yr=Na(ar,Mn),hn=Ns(ar,Mn),kn=Ss(ar,Mn,Hr);function Xn($i){var Fi=zr[$i];Fi&&(hn[$i]=Fi)}Xn(Al),Xn(Vn(Bf));var sa=Object.keys(hn).length>0,Oi={framebuffer:Mr,draw:yr,shader:kn,state:hn,dirty:sa,scopeVAO:null,drawVAO:null,useVAO:!1,attributes:{}};if(Oi.profile=Ki(ar,Mn),Oi.uniforms=vo(Pr,Mn),Oi.drawVAO=Oi.scopeVAO=yr.vao,!Oi.drawVAO&&kn.program&&!Hr&&at.angle_instanced_arrays&&yr.static.elements){var Pi=!0,fa=kn.program.attributes.map(function($i){var Fi=gr.static[$i];return Pi=Pi&&!!Fi,Fi});if(Pi&&fa.length>0){var Qi=Ht.getVAO(Ht.createVAO({attributes:fa,elements:yr.static.elements}));Oi.drawVAO=new Ar(null,null,null,function($i,Fi){return $i.link(Qi)}),Oi.useVAO=!0}}return Hr?Oi.useVAO=!0:Oi.attributes=_o(gr,Mn),Oi.context=po(pn,Mn),Oi}function no(ar,gr,Pr){var pn=ar.shared,Mn=pn.context,sn=ar.scope();Object.keys(Pr).forEach(function(tn){gr.save(Mn,"."+tn);var Hr=Pr[tn],Mr=Hr.append(ar,gr);Array.isArray(Mr)?sn(Mn,".",tn,"=[",Mr.join(),"];"):sn(Mn,".",tn,"=",Mr,";")}),gr(sn)}function Us(ar,gr,Pr,pn){var Mn=ar.shared,sn=Mn.gl,tn=Mn.framebuffer,Hr;on&&(Hr=gr.def(Mn.extensions,".webgl_draw_buffers"));var Mr=ar.constants,zr=Mr.drawBuffer,yr=Mr.backBuffer,hn;Pr?hn=Pr.append(ar,gr):hn=gr.def(tn,".next"),pn||gr("if(",hn,"!==",tn,".cur){"),gr("if(",hn,"){",sn,".bindFramebuffer(",nr,",",hn,".framebuffer);"),on&&gr(Hr,".drawBuffersWEBGL(",zr,"[",hn,".colorAttachments.length]);"),gr("}else{",sn,".bindFramebuffer(",nr,",null);"),on&&gr(Hr,".drawBuffersWEBGL(",yr,");"),gr("}",tn,".cur=",hn,";"),pn||gr("}")}function ql(ar,gr,Pr){var pn=ar.shared,Mn=pn.gl,sn=ar.current,tn=ar.next,Hr=pn.current,Mr=pn.next,zr=ar.cond(Hr,".dirty");Sn.forEach(function(yr){var hn=Vn(yr);if(!(hn in Pr.state)){var kn,Xn;if(hn in tn){kn=tn[hn],Xn=sn[hn];var sa=T(Yn[hn].length,function(Pi){return zr.def(kn,"[",Pi,"]")});zr(ar.cond(sa.map(function(Pi,fa){return Pi+"!=="+Xn+"["+fa+"]"}).join("||")).then(Mn,".",li[hn],"(",sa,");",sa.map(function(Pi,fa){return Xn+"["+fa+"]="+Pi}).join(";"),";"))}else{kn=zr.def(Mr,".",hn);var Oi=ar.cond(kn,"!==",Hr,".",hn);zr(Oi),hn in An?Oi(ar.cond(kn).then(Mn,".enable(",An[hn],");").else(Mn,".disable(",An[hn],");"),Hr,".",hn,"=",kn,";"):Oi(Mn,".",li[hn],"(",kn,");",Hr,".",hn,"=",kn,";")}}}),Object.keys(Pr.state).length===0&&zr(Hr,".dirty=false;"),gr(zr)}function Ta(ar,gr,Pr,pn){var Mn=ar.shared,sn=ar.current,tn=Mn.current,Hr=Mn.gl,Mr;Wr(Object.keys(Pr)).forEach(function(zr){var yr=Pr[zr];if(!(pn&&!pn(yr))){var hn=yr.append(ar,gr);if(An[zr]){var kn=An[zr];En(yr)?(Mr=ar.link(hn,{stable:!0}),gr(ar.cond(Mr).then(Hr,".enable(",kn,");").else(Hr,".disable(",kn,");")),gr(tn,".",zr,"=",Mr,";")):(gr(ar.cond(hn).then(Hr,".enable(",kn,");").else(Hr,".disable(",kn,");")),gr(tn,".",zr,"=",hn,";"))}else if(bn(hn)){var Xn=sn[zr];gr(Hr,".",li[zr],"(",hn,");",hn.map(function(sa,Oi){return Xn+"["+Oi+"]="+sa}).join(";"),";")}else En(yr)?(Mr=ar.link(hn,{stable:!0}),gr(Hr,".",li[zr],"(",Mr,");",tn,".",zr,"=",Mr,";")):gr(Hr,".",li[zr],"(",hn,");",tn,".",zr,"=",hn,";")}})}function vu(ar,gr){an&&(ar.instancing=gr.def(ar.shared.extensions,".angle_instanced_arrays"))}function ys(ar,gr,Pr,pn,Mn){var sn=ar.shared,tn=ar.stats,Hr=sn.current,Mr=sn.timer,zr=Pr.profile;function yr(){return typeof performance=="undefined"?"Date.now()":"performance.now()"}var hn,kn;function Xn($i){hn=gr.def(),$i(hn,"=",yr(),";"),typeof Mn=="string"?$i(tn,".count+=",Mn,";"):$i(tn,".count++;"),$r&&(pn?(kn=gr.def(),$i(kn,"=",Mr,".getNumPendingQueries();")):$i(Mr,".beginQuery(",tn,");"))}function sa($i){$i(tn,".cpuTime+=",yr(),"-",hn,";"),$r&&(pn?$i(Mr,".pushScopeStats(",kn,",",Mr,".getNumPendingQueries(),",tn,");"):$i(Mr,".endQuery();"))}function Oi($i){var Fi=gr.def(Hr,".profile");gr(Hr,".profile=",$i,";"),gr.exit(Hr,".profile=",Fi,";")}var Pi;if(zr){if(En(zr)){zr.enable?(Xn(gr),sa(gr.exit),Oi("true")):Oi("false");return}Pi=zr.append(ar,gr),Oi(Pi)}else Pi=gr.def(Hr,".profile");var fa=ar.block();Xn(fa),gr("if(",Pi,"){",fa,"}");var Qi=ar.block();sa(Qi),gr.exit("if(",Pi,"){",Qi,"}")}function xc(ar,gr,Pr,pn,Mn){var sn=ar.shared;function tn(Mr){switch(Mr){case Bo:case Eu:case Di:return 2;case Ua:case el:case fl:return 3;case ls:case yc:case Fc:return 4;default:return 1}}function Hr(Mr,zr,yr){var hn=sn.gl,kn=gr.def(Mr,".location"),Xn=gr.def(sn.attributes,"[",kn,"]"),sa=yr.state,Oi=yr.buffer,Pi=[yr.x,yr.y,yr.z,yr.w],fa=["buffer","normalized","offset","stride"];function Qi(){gr("if(!",Xn,".buffer){",hn,".enableVertexAttribArray(",kn,");}");var Fi=yr.type,ji;if(yr.size?ji=gr.def(yr.size,"||",zr):ji=zr,gr("if(",Xn,".type!==",Fi,"||",Xn,".size!==",ji,"||",fa.map(function(Fa){return Xn+"."+Fa+"!=="+yr[Fa]}).join("||"),"){",hn,".bindBuffer(",ur,",",Oi,".buffer);",hn,".vertexAttribPointer(",[kn,ji,Fi,yr.normalized,yr.stride,yr.offset],");",Xn,".type=",Fi,";",Xn,".size=",ji,";",fa.map(function(Fa){return Xn+"."+Fa+"="+yr[Fa]+";"}).join(""),"}"),an){var Wi=yr.divisor;gr("if(",Xn,".divisor!==",Wi,"){",ar.instancing,".vertexAttribDivisorANGLE(",[kn,Wi],");",Xn,".divisor=",Wi,";}")}}function $i(){gr("if(",Xn,".buffer){",hn,".disableVertexAttribArray(",kn,");",Xn,".buffer=null;","}if(",ki.map(function(Fi,ji){return Xn+"."+Fi+"!=="+Pi[ji]}).join("||"),"){",hn,".vertexAttrib4f(",kn,",",Pi,");",ki.map(function(Fi,ji){return Xn+"."+Fi+"="+Pi[ji]+";"}).join(""),"}")}sa===qi?Qi():sa===pi?$i():(gr("if(",sa,"===",qi,"){"),Qi(),gr("}else{"),$i(),gr("}"))}pn.forEach(function(Mr){var zr=Mr.name,yr=Pr.attributes[zr],hn;if(yr){if(!Mn(yr))return;hn=yr.append(ar,gr)}else{if(!Mn(ai))return;var kn=ar.scopeAttrib(zr);hn={},Object.keys(new Rr).forEach(function(Xn){hn[Xn]=gr.def(kn,".",Xn)})}Hr(ar.link(Mr),tn(Mr.info.type),hn)})}function Zl(ar,gr,Pr,pn,Mn,sn){for(var tn=ar.shared,Hr=tn.gl,Mr,zr=0;zr1){for(var Dc=[],Kl=[],Vv=0;Vv>1)",Oi],");")}function Wi(){Pr(Pi,".drawArraysInstancedANGLE(",[kn,Xn,sa,Oi],");")}yr&&yr!=="null"?Qi?ji():(Pr("if(",yr,"){"),ji(),Pr("}else{"),Wi(),Pr("}")):Wi()}function Fi(){function ji(){Pr(sn+".drawElements("+[kn,sa,fa,Xn+"<<(("+fa+"-"+Ci+")>>1)"]+");")}function Wi(){Pr(sn+".drawArrays("+[kn,Xn,sa]+");")}yr&&yr!=="null"?Qi?ji():(Pr("if(",yr,"){"),ji(),Pr("}else{"),Wi(),Pr("}")):Wi()}an&&(typeof Oi!="number"||Oi>=0)?typeof Oi=="string"?(Pr("if(",Oi,">0){"),$i(),Pr("}else if(",Oi,"<0){"),Fi(),Pr("}")):$i():Fi()}function xa(ar,gr,Pr,pn,Mn){var sn=Li(),tn=sn.proc("body",Mn);return an&&(sn.instancing=tn.def(sn.shared.extensions,".angle_instanced_arrays")),ar(sn,tn,Pr,pn),sn.compile().body}function uo(ar,gr,Pr,pn){vu(ar,gr),Pr.useVAO?Pr.drawVAO?gr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,gr),");"):gr(ar.shared.vao,".setVAO(",ar.shared.vao,".targetVAO);"):(gr(ar.shared.vao,".setVAO(null);"),xc(ar,gr,Pr,pn.attributes,function(){return!0})),Zl(ar,gr,Pr,pn.uniforms,function(){return!0},!1),$l(ar,gr,gr,Pr)}function Es(ar,gr){var Pr=ar.proc("draw",1);vu(ar,Pr),no(ar,Pr,gr.context),Us(ar,Pr,gr.framebuffer),ql(ar,Pr,gr),Ta(ar,Pr,gr.state),ys(ar,Pr,gr,!1,!0);var pn=gr.shader.progVar.append(ar,Pr);if(Pr(ar.shared.gl,".useProgram(",pn,".program);"),gr.shader.program)uo(ar,Pr,gr,gr.shader.program);else{Pr(ar.shared.vao,".setVAO(null);");var Mn=ar.global.def("{}"),sn=Pr.def(pn,".id"),tn=Pr.def(Mn,"[",sn,"]");Pr(ar.cond(tn).then(tn,".call(this,a0);").else(tn,"=",Mn,"[",sn,"]=",ar.link(function(Hr){return xa(uo,ar,gr,Hr,1)}),"(",pn,");",tn,".call(this,a0);"))}Object.keys(gr.state).length>0&&Pr(ar.shared.current,".dirty=true;"),ar.shared.vao&&Pr(ar.shared.vao,".setVAO(null);")}function vr(ar,gr,Pr,pn){ar.batchId="a1",vu(ar,gr);function Mn(){return!0}xc(ar,gr,Pr,pn.attributes,Mn),Zl(ar,gr,Pr,pn.uniforms,Mn,!1),$l(ar,gr,gr,Pr)}function gn(ar,gr,Pr,pn){vu(ar,gr);var Mn=Pr.contextDep,sn=gr.def(),tn="a0",Hr="a1",Mr=gr.def();ar.shared.props=Mr,ar.batchId=sn;var zr=ar.scope(),yr=ar.scope();gr(zr.entry,"for(",sn,"=0;",sn,"<",Hr,";++",sn,"){",Mr,"=",tn,"[",sn,"];",yr,"}",zr.exit);function hn(fa){return fa.contextDep&&Mn||fa.propDep}function kn(fa){return!hn(fa)}if(Pr.needsContext&&no(ar,yr,Pr.context),Pr.needsFramebuffer&&Us(ar,yr,Pr.framebuffer),Ta(ar,yr,Pr.state,hn),Pr.profile&&hn(Pr.profile)&&ys(ar,yr,Pr,!1,!0),pn)Pr.useVAO?Pr.drawVAO?hn(Pr.drawVAO)?yr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,yr),");"):zr(ar.shared.vao,".setVAO(",Pr.drawVAO.append(ar,zr),");"):zr(ar.shared.vao,".setVAO(",ar.shared.vao,".targetVAO);"):(zr(ar.shared.vao,".setVAO(null);"),xc(ar,zr,Pr,pn.attributes,kn),xc(ar,yr,Pr,pn.attributes,hn)),Zl(ar,zr,Pr,pn.uniforms,kn,!1),Zl(ar,yr,Pr,pn.uniforms,hn,!0),$l(ar,zr,yr,Pr);else{var Xn=ar.global.def("{}"),sa=Pr.shader.progVar.append(ar,yr),Oi=yr.def(sa,".id"),Pi=yr.def(Xn,"[",Oi,"]");yr(ar.shared.gl,".useProgram(",sa,".program);","if(!",Pi,"){",Pi,"=",Xn,"[",Oi,"]=",ar.link(function(fa){return xa(vr,ar,Pr,fa,2)}),"(",sa,");}",Pi,".call(this,a0[",sn,"],",sn,");")}}function xn(ar,gr){var Pr=ar.proc("batch",2);ar.batchId="0",vu(ar,Pr);var pn=!1,Mn=!0;Object.keys(gr.context).forEach(function(Xn){pn=pn||gr.context[Xn].propDep}),pn||(no(ar,Pr,gr.context),Mn=!1);var sn=gr.framebuffer,tn=!1;sn?(sn.propDep?pn=tn=!0:sn.contextDep&&pn&&(tn=!0),tn||Us(ar,Pr,sn)):Us(ar,Pr,null),gr.state.viewport&&gr.state.viewport.propDep&&(pn=!0);function Hr(Xn){return Xn.contextDep&&pn||Xn.propDep}ql(ar,Pr,gr),Ta(ar,Pr,gr.state,function(Xn){return!Hr(Xn)}),(!gr.profile||!Hr(gr.profile))&&ys(ar,Pr,gr,!1,"a1"),gr.contextDep=pn,gr.needsContext=Mn,gr.needsFramebuffer=tn;var Mr=gr.shader.progVar;if(Mr.contextDep&&pn||Mr.propDep)gn(ar,Pr,gr,null);else{var zr=Mr.append(ar,Pr);if(Pr(ar.shared.gl,".useProgram(",zr,".program);"),gr.shader.program)gn(ar,Pr,gr,gr.shader.program);else{Pr(ar.shared.vao,".setVAO(null);");var yr=ar.global.def("{}"),hn=Pr.def(zr,".id"),kn=Pr.def(yr,"[",hn,"]");Pr(ar.cond(kn).then(kn,".call(this,a0,a1);").else(kn,"=",yr,"[",hn,"]=",ar.link(function(Xn){return xa(gn,ar,gr,Xn,2)}),"(",zr,");",kn,".call(this,a0,a1);"))}}Object.keys(gr.state).length>0&&Pr(ar.shared.current,".dirty=true;"),ar.shared.vao&&Pr(ar.shared.vao,".setVAO(null);")}function Gi(ar,gr){var Pr=ar.proc("scope",3);ar.batchId="a2";var pn=ar.shared,Mn=pn.current;if(no(ar,Pr,gr.context),gr.framebuffer&&gr.framebuffer.append(ar,Pr),Wr(Object.keys(gr.state)).forEach(function(Hr){var Mr=gr.state[Hr],zr=Mr.append(ar,Pr);bn(zr)?zr.forEach(function(yr,hn){si(yr)?Pr.set(ar.next[Hr],"["+hn+"]",yr):Pr.set(ar.next[Hr],"["+hn+"]",ar.link(yr,{stable:!0}))}):En(Mr)?Pr.set(pn.next,"."+Hr,ar.link(zr,{stable:!0})):Pr.set(pn.next,"."+Hr,zr)}),ys(ar,Pr,gr,!0,!0),[Yh,_i,Mu,Su,hu].forEach(function(Hr){var Mr=gr.draw[Hr];if(Mr){var zr=Mr.append(ar,Pr);si(zr)?Pr.set(pn.draw,"."+Hr,zr):Pr.set(pn.draw,"."+Hr,ar.link(zr),{stable:!0})}}),Object.keys(gr.uniforms).forEach(function(Hr){var Mr=gr.uniforms[Hr].append(ar,Pr);Array.isArray(Mr)&&(Mr="["+Mr.map(function(zr){return si(zr)?zr:ar.link(zr,{stable:!0})})+"]"),Pr.set(pn.uniforms,"["+ar.link(Xe.id(Hr),{stable:!0})+"]",Mr)}),Object.keys(gr.attributes).forEach(function(Hr){var Mr=gr.attributes[Hr].append(ar,Pr),zr=ar.scopeAttrib(Hr);Object.keys(new Rr).forEach(function(yr){Pr.set(zr,"."+yr,Mr[yr])})}),gr.scopeVAO){var sn=gr.scopeVAO.append(ar,Pr);si(sn)?Pr.set(pn.vao,".targetVAO",sn):Pr.set(pn.vao,".targetVAO",ar.link(sn,{stable:!0}))}function tn(Hr){var Mr=gr.shader[Hr];if(Mr){var zr=Mr.append(ar,Pr);si(zr)?Pr.set(pn.shader,"."+Hr,zr):Pr.set(pn.shader,"."+Hr,ar.link(zr,{stable:!0}))}}tn(jh),tn(Wh),Object.keys(gr.state).length>0&&(Pr(Mn,".dirty=true;"),Pr.exit(Mn,".dirty=true;")),Pr("a1(",ar.shared.context,",a0,",ar.batchId,");")}function wo(ar){if(!(typeof ar!="object"||bn(ar))){for(var gr=Object.keys(ar),Pr=0;Pr=0;--xa){var uo=zi[xa];uo&&uo(Er,null,0)}at.flush(),dr&&dr.update()}function Ia(){!Ki&&zi.length>0&&(Ki=g.next(ca))}function Os(){Ki&&(g.cancel(ca),Ki=null)}function Ss(xa){xa.preventDefault(),Et=!0,Os(),da.forEach(function(uo){uo()})}function Na(xa){at.getError(),Et=!1,Bt.restore(),yi.restore(),an.restore(),Sn.restore(),An.restore(),li.restore(),Nn.restore(),dr&&dr.restore(),Vn.procs.refresh(),Ia(),ui.forEach(function(uo){uo()})}si&&(si.addEventListener(de,Ss,!1),si.addEventListener(Ae,Na,!1));function Ns(){zi.length=0,Os(),si&&(si.removeEventListener(de,Ss),si.removeEventListener(Ae,Na)),yi.clear(),li.clear(),An.clear(),Nn.clear(),Sn.clear(),on.clear(),an.clear(),dr&&dr.clear(),Li.forEach(function(xa){xa()})}function vo(xa){function uo(sn){var tn=e({},sn);delete tn.uniforms,delete tn.attributes,delete tn.context,delete tn.vao,"stencil"in tn&&tn.stencil.op&&(tn.stencil.opBack=tn.stencil.opFront=tn.stencil.op,delete tn.stencil.op);function Hr(Mr){if(Mr in tn){var zr=tn[Mr];delete tn[Mr],Object.keys(zr).forEach(function(yr){tn[Mr+"."+yr]=zr[yr]})}}return Hr("blend"),Hr("depth"),Hr("cull"),Hr("stencil"),Hr("polygonOffset"),Hr("scissor"),Hr("sample"),"vao"in sn&&(tn.vao=sn.vao),tn}function Es(sn,tn){var Hr={},Mr={};return Object.keys(sn).forEach(function(zr){var yr=sn[zr];if(v.isDynamic(yr)){Mr[zr]=v.unbox(yr,zr);return}else if(tn&&Array.isArray(yr)){for(var hn=0;hn0)return ar.call(this,pn(sn|0),sn|0)}else if(Array.isArray(sn)){if(sn.length)return ar.call(this,sn,sn.length)}else return Hi.call(this,sn)}return e(Mn,{stats:wo,destroy:function(){xs.destroy()}})}var _o=li.setFBO=vo({framebuffer:v.define.call(null,Fe,"framebuffer")});function po(xa,uo){var Es=0;Vn.procs.poll();var vr=uo.color;vr&&(at.clearColor(+vr[0]||0,+vr[1]||0,+vr[2]||0,+vr[3]||0),Es|=N),"depth"in uo&&(at.clearDepth(+uo.depth),Es|=H),"stencil"in uo&&(at.clearStencil(uo.stencil|0),Es|=$),at.clear(Es)}function Xo(xa){if("framebuffer"in xa)if(xa.framebuffer&&xa.framebuffer_reglType==="framebufferCube")for(var uo=0;uo<6;++uo)_o(e({framebuffer:xa.framebuffer.faces[uo]},xa),po);else _o(xa,po);else po(null,xa)}function no(xa){zi.push(xa);function uo(){var Es=st(zi,xa);function vr(){var gn=st(zi,vr);zi[gn]=zi[zi.length-1],zi.length-=1,zi.length<=0&&Os()}zi[Es]=vr}return Ia(),{cancel:uo}}function Us(){var xa=Wn.viewport,uo=Wn.scissor_box;xa[0]=xa[1]=uo[0]=uo[1]=0,Er.viewportWidth=Er.framebufferWidth=Er.drawingBufferWidth=xa[2]=uo[2]=at.drawingBufferWidth,Er.viewportHeight=Er.framebufferHeight=Er.drawingBufferHeight=xa[3]=uo[3]=at.drawingBufferHeight}function ql(){Er.tick+=1,Er.time=vu(),Us(),Vn.procs.poll()}function Ta(){Sn.refresh(),Us(),Vn.procs.refresh(),dr&&dr.update()}function vu(){return(p()-Xr)/1e3}Ta();function ys(xa,uo){var Es;switch(xa){case"frame":return no(uo);case"lost":Es=da;break;case"restore":Es=ui;break;case"destroy":Es=Li;break;default:}return Es.push(uo),{cancel:function(){for(var vr=0;vr=0},read:jn,destroy:Ns,_gl:at,_refresh:Ta,poll:function(){ql(),dr&&dr.update()},now:vu,stats:Pt,getCachedCode:xc,preloadCachedCode:Zl});return Xe.onDone(null,$l),$l}return dt}))});var TVe=fe((XTr,wVe)=>{"use strict";var rKt=E1();wVe.exports=function(t){if(t?typeof t=="string"&&(t={container:t}):t={},_Ve(t)?t={container:t}:nKt(t)?t={container:t}:iKt(t)?t={gl:t}:t=rKt(t,{container:"container target element el canvas holder parent parentNode wrapper use ref root node",gl:"gl context webgl glContext",attrs:"attributes attrs contextAttributes",pixelRatio:"pixelRatio pxRatio px ratio pxratio pixelratio",width:"w width",height:"h height"},!0),t.pixelRatio||(t.pixelRatio=window.pixelRatio||1),t.gl)return t.gl;if(t.canvas&&(t.container=t.canvas.parentNode),t.container){if(typeof t.container=="string"){var r=document.querySelector(t.container);if(!r)throw Error("Element "+t.container+" is not found");t.container=r}_Ve(t.container)?(t.canvas=t.container,t.container=t.canvas.parentNode):t.canvas||(t.canvas=bVe(),t.container.appendChild(t.canvas),xVe(t))}else if(!t.canvas)if(typeof document!="undefined")t.container=document.body||document.documentElement,t.canvas=bVe(),t.container.appendChild(t.canvas),xVe(t);else throw Error("Not DOM environment. Use headless-gl.");return t.gl||["webgl","experimental-webgl","webgl-experimental"].some(function(n){try{t.gl=t.canvas.getContext(n,t.attrs)}catch(a){}return t.gl}),t.gl};function xVe(e){if(e.container)if(e.container==document.body)document.body.style.width||(e.canvas.width=e.width||e.pixelRatio*window.innerWidth),document.body.style.height||(e.canvas.height=e.height||e.pixelRatio*window.innerHeight);else{var t=e.container.getBoundingClientRect();e.canvas.width=e.width||t.right-t.left,e.canvas.height=e.height||t.bottom-t.top}}function _Ve(e){return typeof e.getContext=="function"&&"width"in e&&"height"in e}function nKt(e){return typeof e.nodeName=="string"&&typeof e.appendChild=="function"&&typeof e.getBoundingClientRect=="function"}function iKt(e){return typeof e.drawArrays=="function"||typeof e.drawElements=="function"}function bVe(){var e=document.createElement("canvas");return e.style.position="absolute",e.style.top=0,e.style.left=0,e}});var MVe=fe((ZTr,AVe)=>{"use strict";var aKt=l$(),oKt=[32,126];AVe.exports=sKt;function sKt(e){e=e||{};var t=e.shape?e.shape:e.canvas?[e.canvas.width,e.canvas.height]:[512,512],r=e.canvas||document.createElement("canvas"),n=e.font,a=typeof e.step=="number"?[e.step,e.step]:e.step||[32,32],i=e.chars||oKt;if(n&&typeof n!="string"&&(n=aKt(n)),!Array.isArray(i))i=String(i).split("");else if(i.length===2&&typeof i[0]=="number"&&typeof i[1]=="number"){for(var o=[],s=i[0],l=0;s<=i[1];s++)o[l++]=String.fromCharCode(s);i=o}t=t.slice(),r.width=t[0],r.height=t[1];var u=r.getContext("2d");u.fillStyle="#000",u.fillRect(0,0,r.width,r.height),u.font=n,u.textAlign="center",u.textBaseline="middle",u.fillStyle="#fff";for(var c=a[0]/2,f=a[1]/2,s=0;st[0]-a[0]/2&&(c=a[0]/2,f+=a[1]);return r}});var d$=fe(uc=>{"use strict";"use restrict";var h$=32;uc.INT_BITS=h$;uc.INT_MAX=2147483647;uc.INT_MIN=-1<0)-(e<0)};uc.abs=function(e){var t=e>>h$-1;return(e^t)-t};uc.min=function(e,t){return t^(e^t)&-(e65535)<<4,e>>>=t,r=(e>255)<<3,e>>>=r,t|=r,r=(e>15)<<2,e>>>=r,t|=r,r=(e>3)<<1,e>>>=r,t|=r,t|e>>1};uc.log10=function(e){return e>=1e9?9:e>=1e8?8:e>=1e7?7:e>=1e6?6:e>=1e5?5:e>=1e4?4:e>=1e3?3:e>=100?2:e>=10?1:0};uc.popCount=function(e){return e=e-(e>>>1&1431655765),e=(e&858993459)+(e>>>2&858993459),(e+(e>>>4)&252645135)*16843009>>>24};function SVe(e){var t=32;return e&=-e,e&&t--,e&65535&&(t-=16),e&16711935&&(t-=8),e&252645135&&(t-=4),e&858993459&&(t-=2),e&1431655765&&(t-=1),t}uc.countTrailingZeros=SVe;uc.nextPow2=function(e){return e+=e===0,--e,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e+1};uc.prevPow2=function(e){return e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e-(e>>>1)};uc.parity=function(e){return e^=e>>>16,e^=e>>>8,e^=e>>>4,e&=15,27030>>>e&1};var zM=new Array(256);(function(e){for(var t=0;t<256;++t){var r=t,n=t,a=7;for(r>>>=1;r;r>>>=1)n<<=1,n|=r&1,--a;e[t]=n<>>8&255]<<16|zM[e>>>16&255]<<8|zM[e>>>24&255]};uc.interleave2=function(e,t){return e&=65535,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,t&=65535,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,e|t<<1};uc.deinterleave2=function(e,t){return e=e>>>t&1431655765,e=(e|e>>>1)&858993459,e=(e|e>>>2)&252645135,e=(e|e>>>4)&16711935,e=(e|e>>>16)&65535,e<<16>>16};uc.interleave3=function(e,t,r){return e&=1023,e=(e|e<<16)&4278190335,e=(e|e<<8)&251719695,e=(e|e<<4)&3272356035,e=(e|e<<2)&1227133513,t&=1023,t=(t|t<<16)&4278190335,t=(t|t<<8)&251719695,t=(t|t<<4)&3272356035,t=(t|t<<2)&1227133513,e|=t<<1,r&=1023,r=(r|r<<16)&4278190335,r=(r|r<<8)&251719695,r=(r|r<<4)&3272356035,r=(r|r<<2)&1227133513,e|r<<2};uc.deinterleave3=function(e,t){return e=e>>>t&1227133513,e=(e|e>>>2)&3272356035,e=(e|e>>>4)&251719695,e=(e|e>>>8)&4278190335,e=(e|e>>>16)&1023,e<<22>>22};uc.nextCombination=function(e){var t=e|e-1;return t+1|(~t&-~t)-1>>>SVe(e)+1}});var CVe=fe((KTr,kVe)=>{"use strict";function EVe(e,t,r){var n=e[r]|0;if(n<=0)return[];var a=new Array(n),i;if(r===e.length-1)for(i=0;i0)return lKt(e|0,t);break;case"object":if(typeof e.length=="number")return EVe(e,t,0);break}return[]}kVe.exports=uKt});var HVe=fe(os=>{"use strict";var ky=d$(),Rh=CVe(),LVe=M2().Buffer;window.__TYPEDARRAY_POOL||(window.__TYPEDARRAY_POOL={UINT8:Rh([32,0]),UINT16:Rh([32,0]),UINT32:Rh([32,0]),BIGUINT64:Rh([32,0]),INT8:Rh([32,0]),INT16:Rh([32,0]),INT32:Rh([32,0]),BIGINT64:Rh([32,0]),FLOAT:Rh([32,0]),DOUBLE:Rh([32,0]),DATA:Rh([32,0]),UINT8C:Rh([32,0]),BUFFER:Rh([32,0])});var cKt=typeof Uint8ClampedArray!="undefined",fKt=typeof BigUint64Array!="undefined",hKt=typeof BigInt64Array!="undefined",Ec=window.__TYPEDARRAY_POOL;Ec.UINT8C||(Ec.UINT8C=Rh([32,0]));Ec.BIGUINT64||(Ec.BIGUINT64=Rh([32,0]));Ec.BIGINT64||(Ec.BIGINT64=Rh([32,0]));Ec.BUFFER||(Ec.BUFFER=Rh([32,0]));var EF=Ec.DATA,kF=Ec.BUFFER;os.free=function(t){if(LVe.isBuffer(t))kF[ky.log2(t.length)].push(t);else{if(Object.prototype.toString.call(t)!=="[object ArrayBuffer]"&&(t=t.buffer),!t)return;var r=t.length||t.byteLength,n=ky.log2(r)|0;EF[n].push(t)}};function PVe(e){if(e){var t=e.length||e.byteLength,r=ky.log2(t);EF[r].push(e)}}function dKt(e){PVe(e.buffer)}os.freeUint8=os.freeUint16=os.freeUint32=os.freeBigUint64=os.freeInt8=os.freeInt16=os.freeInt32=os.freeBigInt64=os.freeFloat32=os.freeFloat=os.freeFloat64=os.freeDouble=os.freeUint8Clamped=os.freeDataView=dKt;os.freeArrayBuffer=PVe;os.freeBuffer=function(t){kF[ky.log2(t.length)].push(t)};os.malloc=function(t,r){if(r===void 0||r==="arraybuffer")return d0(t);switch(r){case"uint8":return v$(t);case"uint16":return FVe(t);case"uint32":return DVe(t);case"int8":return RVe(t);case"int16":return IVe(t);case"int32":return zVe(t);case"float":case"float32":return qVe(t);case"double":case"float64":return BVe(t);case"uint8_clamped":return OVe(t);case"bigint64":return UVe(t);case"biguint64":return NVe(t);case"buffer":return GVe(t);case"data":case"dataview":return VVe(t);default:return null}return null};function d0(t){var t=ky.nextPow2(t),r=ky.log2(t),n=EF[r];return n.length>0?n.pop():new ArrayBuffer(t)}os.mallocArrayBuffer=d0;function v$(e){return new Uint8Array(d0(e),0,e)}os.mallocUint8=v$;function FVe(e){return new Uint16Array(d0(2*e),0,e)}os.mallocUint16=FVe;function DVe(e){return new Uint32Array(d0(4*e),0,e)}os.mallocUint32=DVe;function RVe(e){return new Int8Array(d0(e),0,e)}os.mallocInt8=RVe;function IVe(e){return new Int16Array(d0(2*e),0,e)}os.mallocInt16=IVe;function zVe(e){return new Int32Array(d0(4*e),0,e)}os.mallocInt32=zVe;function qVe(e){return new Float32Array(d0(4*e),0,e)}os.mallocFloat32=os.mallocFloat=qVe;function BVe(e){return new Float64Array(d0(8*e),0,e)}os.mallocFloat64=os.mallocDouble=BVe;function OVe(e){return cKt?new Uint8ClampedArray(d0(e),0,e):v$(e)}os.mallocUint8Clamped=OVe;function NVe(e){return fKt?new BigUint64Array(d0(8*e),0,e):null}os.mallocBigUint64=NVe;function UVe(e){return hKt?new BigInt64Array(d0(8*e),0,e):null}os.mallocBigInt64=UVe;function VVe(e){return new DataView(d0(e),0,e)}os.mallocDataView=VVe;function GVe(e){e=ky.nextPow2(e);var t=ky.log2(e),r=kF[t];return r.length>0?r.pop():new LVe(e)}os.mallocBuffer=GVe;os.clearCache=function(){for(var t=0;t<32;++t)Ec.UINT8[t].length=0,Ec.UINT16[t].length=0,Ec.UINT32[t].length=0,Ec.INT8[t].length=0,Ec.INT16[t].length=0,Ec.INT32[t].length=0,Ec.FLOAT[t].length=0,Ec.DOUBLE[t].length=0,Ec.BIGUINT64[t].length=0,Ec.BIGINT64[t].length=0,Ec.UINT8C[t].length=0,EF[t].length=0,kF[t].length=0}});var WVe=fe((QTr,jVe)=>{"use strict";var vKt=Object.prototype.toString;jVe.exports=function(e){var t;return vKt.call(e)==="[object Object]"&&(t=Object.getPrototypeOf(e),t===null||t===Object.getPrototypeOf({}))}});var p$=fe((eAr,YVe)=>{YVe.exports=function(t,r){r||(r=[0,""]),t=String(t);var n=parseFloat(t,10);return r[0]=n,r[1]=t.match(/[\d.\-\+]*\s*(.*)/)[1]||"",r}});var $Ve=fe((tAr,ZVe)=>{"use strict";var pKt=p$();ZVe.exports=XVe;var qM=96;function g$(e,t){var r=pKt(getComputedStyle(e).getPropertyValue(t));return r[0]*XVe(r[1],e)}function gKt(e,t){var r=document.createElement("div");r.style["font-size"]="128"+e,t.appendChild(r);var n=g$(r,"font-size")/128;return t.removeChild(r),n}function XVe(e,t){switch(t=t||document.body,e=(e||"px").trim().toLowerCase(),(t===window||t===document)&&(t=document.body),e){case"%":return t.clientHeight/100;case"ch":case"ex":return gKt(e,t);case"em":return g$(t,"font-size");case"rem":return g$(document.body,"font-size");case"vw":return window.innerWidth/100;case"vh":return window.innerHeight/100;case"vmin":return Math.min(window.innerWidth,window.innerHeight)/100;case"vmax":return Math.max(window.innerWidth,window.innerHeight)/100;case"in":return qM;case"cm":return qM/2.54;case"mm":return qM/25.4;case"pt":return qM/72;case"pc":return qM/6}return 1}});var QVe=fe((rAr,JVe)=>{"use strict";JVe.exports=PF;var mKt=PF.canvas=document.createElement("canvas"),CF=mKt.getContext("2d"),KVe=LF([32,126]);PF.createPairs=LF;PF.ascii=KVe;function PF(e,t){Array.isArray(e)&&(e=e.join(", "));var r={},n,a=16,i=.05;t&&(t.length===2&&typeof t[0]=="number"?n=LF(t):Array.isArray(t)?n=t:(t.o?n=LF(t.o):t.pairs&&(n=t.pairs),t.fontSize&&(a=t.fontSize),t.threshold!=null&&(i=t.threshold))),n||(n=KVe),CF.font=a+"px "+e;for(var o=0;oa*i){var c=(u-l)/a;r[s]=c*1e3}}return r}function LF(e){for(var t=[],r=e[0];r<=e[1];r++)for(var n=String.fromCharCode(r),a=e[0];a{"use strict";rGe.exports=Cy;Cy.canvas=document.createElement("canvas");Cy.cache={};function Cy(o,t){t||(t={}),(typeof o=="string"||Array.isArray(o))&&(t.family=o);var r=Array.isArray(t.family)?t.family.join(", "):t.family;if(!r)throw Error("`family` must be defined");var n=t.size||t.fontSize||t.em||48,a=t.weight||t.fontWeight||"",i=t.style||t.fontStyle||"",o=[i,a,n].join(" ")+"px "+r,s=t.origin||"top";if(Cy.cache[r]&&n<=Cy.cache[r].em)return eGe(Cy.cache[r],s);var l=t.canvas||Cy.canvas,u=l.getContext("2d"),c={upper:t.upper!==void 0?t.upper:"H",lower:t.lower!==void 0?t.lower:"x",descent:t.descent!==void 0?t.descent:"p",ascent:t.ascent!==void 0?t.ascent:"h",tittle:t.tittle!==void 0?t.tittle:"i",overshoot:t.overshoot!==void 0?t.overshoot:"O"},f=Math.ceil(n*1.5);l.height=f,l.width=f*.5,u.font=o;var v="H",g={top:0};u.clearRect(0,0,f,f),u.textBaseline="top",u.fillStyle="black",u.fillText(v,0,0);var p=C1(u.getImageData(0,0,f,f));u.clearRect(0,0,f,f),u.textBaseline="bottom",u.fillText(v,0,f);var x=C1(u.getImageData(0,0,f,f));g.lineHeight=g.bottom=f-x+p,u.clearRect(0,0,f,f),u.textBaseline="alphabetic",u.fillText(v,0,f);var _=C1(u.getImageData(0,0,f,f)),y=f-_-1+p;g.baseline=g.alphabetic=y,u.clearRect(0,0,f,f),u.textBaseline="middle",u.fillText(v,0,f*.5);var C=C1(u.getImageData(0,0,f,f));g.median=g.middle=f-C-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="hanging",u.fillText(v,0,f*.5);var k=C1(u.getImageData(0,0,f,f));g.hanging=f-k-1+p-f*.5,u.clearRect(0,0,f,f),u.textBaseline="ideographic",u.fillText(v,0,f);var S=C1(u.getImageData(0,0,f,f));if(g.ideographic=f-S-1+p,c.upper&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.upper,0,0),g.upper=C1(u.getImageData(0,0,f,f)),g.capHeight=g.baseline-g.upper),c.lower&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.lower,0,0),g.lower=C1(u.getImageData(0,0,f,f)),g.xHeight=g.baseline-g.lower),c.tittle&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.tittle,0,0),g.tittle=C1(u.getImageData(0,0,f,f))),c.ascent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.ascent,0,0),g.ascent=C1(u.getImageData(0,0,f,f))),c.descent&&(u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.descent,0,0),g.descent=tGe(u.getImageData(0,0,f,f))),c.overshoot){u.clearRect(0,0,f,f),u.textBaseline="top",u.fillText(c.overshoot,0,0);var L=tGe(u.getImageData(0,0,f,f));g.overshoot=L-y}for(var w in g)g[w]/=n;return g.em=n,Cy.cache[r]=g,eGe(g,s)}function eGe(e,t){var r={};typeof t=="string"&&(t=e[t]);for(var n in e)n!=="em"&&(r[n]=e[n]-t);return r}function C1(e){for(var t=e.height,r=e.data,n=3;n0;n-=4)if(r[n]!==0)return Math.floor((n-3)*.25/t)}});var sGe=fe((iAr,oGe)=>{"use strict";var b5=yVe(),yKt=E1(),xKt=f$(),_Kt=TVe(),bKt=XZ(),m$=wM(),wKt=MVe(),Ly=HVe(),TKt=u5(),AKt=WVe(),MKt=p$(),SKt=$Ve(),EKt=QVe(),kKt=Zc(),CKt=nGe(),LKt=u_(),PKt=d$(),iGe=PKt.nextPow2,aGe=new bKt,DF=!1;document.body&&(FF=document.body.appendChild(document.createElement("div")),FF.style.font="italic small-caps bold condensed 16px/2 cursive",getComputedStyle(FF).fontStretch&&(DF=!0),document.body.removeChild(FF));var FF,Bs=function(t){FKt(t)?(t={regl:t},this.gl=t.regl._gl):this.gl=_Kt(t),this.shader=aGe.get(this.gl),this.shader?this.regl=this.shader.regl:this.regl=t.regl||xKt({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(),aGe.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(AKt(t)?t:{})};Bs.prototype.createShader=function(){var t=this.regl,r=t({blend:{enable:!0,color:[0,0,0,1],func:{srcRGB:"src alpha",dstRGB:"one minus src alpha",srcAlpha:"one minus dst alpha",dstAlpha:"one"}},stencil:{enable:!1},depth:{enable:!1},count:t.prop("count"),offset:t.prop("offset"),attributes:{charOffset:{offset:4,stride:8,buffer:t.this("sizeBuffer")},width:{offset:0,stride:8,buffer:t.this("sizeBuffer")},char:t.this("charBuffer"),position:t.this("position")},uniforms:{atlasSize:function(a,i){return[i.atlas.width,i.atlas.height]},atlasDim:function(a,i){return[i.atlas.cols,i.atlas.rows]},atlas:function(a,i){return i.atlas.texture},charStep:function(a,i){return i.atlas.step},em:function(a,i){return i.atlas.em},color:t.prop("color"),opacity:t.prop("opacity"),viewport:t.this("viewportArray"),scale:t.this("scale"),align:t.prop("align"),baseline:t.prop("baseline"),translate:t.this("translate"),positionOffset:t.prop("positionOffset")},primitive:"points",viewport:t.this("viewport"),vert:` 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; }`}),n={};return{regl:t,draw:r,atlas:n}};Bs.prototype.update=function(t){var r=this;if(typeof t=="string")t={text:t};else if(!t)return;t=yKt(t,{position:"position positions coord coords coordinates",font:"font fontFace fontface typeface cssFont css-font family fontFamily",fontSize:"fontSize fontsize size font-size",text:"text texts chars characters value values symbols",align:"align alignment textAlign textbaseline",baseline:"baseline textBaseline textbaseline",direction:"dir direction textDirection",color:"color colour fill fill-color fillColor textColor textcolor",kerning:"kerning kern",range:"range dataBox",viewport:"vp viewport viewBox viewbox viewPort",opacity:"opacity alpha transparency visible visibility opaque",offset:"offset positionOffset padding shift indent indentation"},!0),t.opacity!=null&&(Array.isArray(t.opacity)?this.opacity=t.opacity.map(function(xe){return parseFloat(xe)}):this.opacity=parseFloat(t.opacity)),t.viewport!=null&&(this.viewport=TKt(t.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]),t.kerning!=null&&(this.kerning=t.kerning),t.offset!=null&&(typeof t.offset=="number"&&(t.offset=[t.offset,0]),this.positionOffset=LKt(t.offset)),t.direction&&(this.direction=t.direction),t.range&&(this.range=t.range,this.scale=[1/(t.range[2]-t.range[0]),1/(t.range[3]-t.range[1])],this.translate=[-t.range[0],-t.range[1]]),t.scale&&(this.scale=t.scale),t.translate&&(this.translate=t.translate),this.scale||(this.scale=[1/this.viewport.width,1/this.viewport.height]),this.translate||(this.translate=[0,0]),!this.font.length&&!t.font&&(t.font=Bs.baseFontSize+"px sans-serif");var n=!1,a=!1;if(t.font&&(Array.isArray(t.font)?t.font:[t.font]).forEach(function(xe,ue){if(typeof xe=="string")try{xe=b5.parse(xe)}catch(De){xe=b5.parse(Bs.baseFontSize+"px "+xe)}else{var K=xe.style,_e=xe.weight,ne=xe.stretch,ae=xe.variant;xe=b5.parse(b5.stringify(xe)),K&&(xe.style=K),_e&&(xe.weight=_e),ne&&(xe.stretch=ne),ae&&(xe.variant=ae)}var pe=b5.stringify({size:Bs.baseFontSize,family:xe.family,stretch:DF?xe.stretch:void 0,variant:xe.variant,weight:xe.weight,style:xe.style}),ie=MKt(xe.size),le=Math.round(ie[0]*SKt(ie[1]));if(le!==r.fontSize[ue]&&(a=!0,r.fontSize[ue]=le),(!r.font[ue]||pe!=r.font[ue].baseString)&&(n=!0,r.font[ue]=Bs.fonts[pe],!r.font[ue])){var me=xe.family.join(", "),be=[xe.style];xe.style!=xe.variant&&be.push(xe.variant),xe.variant!=xe.weight&&be.push(xe.weight),DF&&xe.weight!=xe.stretch&&be.push(xe.stretch),r.font[ue]={baseString:pe,family:me,weight:xe.weight,stretch:xe.stretch,style:xe.style,variant:xe.variant,width:{},kerning:{},metrics:CKt(me,{origin:"top",fontSize:Bs.baseFontSize,fontStyle:be.join(" ")})},Bs.fonts[pe]=r.font[ue]}}),(n||a)&&this.font.forEach(function(xe,ue){var K=b5.stringify({size:r.fontSize[ue],family:xe.family,stretch:DF?xe.stretch:void 0,variant:xe.variant,weight:xe.weight,style:xe.style});if(r.fontAtlas[ue]=r.shader.atlas[K],!r.fontAtlas[ue]){var _e=xe.metrics;r.shader.atlas[K]=r.fontAtlas[ue]={fontString:K,step:Math.ceil(r.fontSize[ue]*_e.bottom*.5)*2,em:r.fontSize[ue],cols:0,rows:0,height:0,width:0,chars:[],ids:{},texture:r.regl.texture()}}t.text==null&&(t.text=r.text)}),typeof t.text=="string"&&t.position&&t.position.length>2){for(var i=Array(t.position.length*.5),o=0;o2){for(var u=!t.position[0].length,c=Ly.mallocFloat(this.count*2),f=0,v=0;f1?r.align[ue]:r.align[0]:r.align;if(typeof K=="number")return K;switch(K){case"right":case"end":return-xe;case"center":case"centre":case"middle":return-xe*.5}return 0})),this.baseline==null&&t.baseline==null&&(t.baseline=0),t.baseline!=null&&(this.baseline=t.baseline,Array.isArray(this.baseline)||(this.baseline=[this.baseline]),this.baselineOffset=this.baseline.map(function(xe,ue){var K=(r.font[ue]||r.font[0]).metrics,_e=0;return _e+=K.bottom*.5,typeof xe=="number"?_e+=xe-K.baseline:_e+=-K[xe],_e*=-1,_e})),t.color!=null)if(t.color||(t.color="transparent"),typeof t.color=="string"||!isNaN(t.color))this.color=m$(t.color,"uint8");else{var O;if(typeof t.color[0]=="number"&&t.color.length>this.counts.length){var V=t.color.length;O=Ly.mallocUint8(V);for(var j=(t.color.subarray||t.color.slice).bind(t.color),q=0;q4||this.baselineOffset.length>1||this.align&&this.align.length>1||this.fontAtlas.length>1||this.positionOffset.length>2;if(ee){var ce=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(ce);for(var ye=0;ye1?this.counts[ye]:this.counts[0],offset:this.textOffsets.length>1?this.textOffsets[ye]:this.textOffsets[0],color:this.color?this.color.length<=4?this.color:this.color.subarray(ye*4,ye*4+4):[0,0,0,255],opacity:Array.isArray(this.opacity)?this.opacity[ye]:this.opacity,baseline:this.baselineOffset[ye]!=null?this.baselineOffset[ye]:this.baselineOffset[0],align:this.align?this.alignOffset[ye]!=null?this.alignOffset[ye]:this.alignOffset[0]:0,atlas:this.fontAtlas[ye]||this.fontAtlas[0],positionOffset:this.positionOffset.length>2?this.positionOffset.subarray(ye*2,ye*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=[]}};Bs.prototype.destroy=function(){};Bs.prototype.kerning=!0;Bs.prototype.position={constant:new Float32Array(2)};Bs.prototype.translate=null;Bs.prototype.scale=null;Bs.prototype.font=null;Bs.prototype.text="";Bs.prototype.positionOffset=[0,0];Bs.prototype.opacity=1;Bs.prototype.color=new Uint8Array([0,0,0,255]);Bs.prototype.alignOffset=[0,0];Bs.maxAtlasSize=1024;Bs.atlasCanvas=document.createElement("canvas");Bs.atlasContext=Bs.atlasCanvas.getContext("2d",{alpha:!1});Bs.baseFontSize=64;Bs.fonts={};function FKt(e){return typeof e=="function"&&e._gl&&e.prop&&e.texture&&e.buffer}oGe.exports=Bs});var RF=fe((aAr,lGe)=>{"use strict";var DKt=EY(),RKt=f$();lGe.exports=function(t,r,n){var a=t._fullLayout,i=!0;return a._glcanvas.each(function(o){if(o.regl){o.regl.preloadCachedCode(n);return}if(!(o.pick&&!a._has("parcoords"))){try{o.regl=RKt({canvas:this,attributes:{antialias:!o.pick,preserveDrawingBuffer:!0},pixelRatio:t._context.plotGlPixelRatio||window.devicePixelRatio,extensions:r||[],cachedCode:n||{}})}catch(s){i=!1}o.regl||(i=!1),i&&this.addEventListener("webglcontextlost",function(s){t&&t.emit&&t.emit("plotly_webglcontextlost",{event:s,layer:o.key})},!1)}}),i||DKt({container:a._glcontainer.node()}),i}});var x$=fe((y$,vGe)=>{"use strict";var uGe=xZ(),cGe=KZ(),IKt=QUe(),fGe=sGe(),hGe=Xt(),zKt=$p().selectMode,qKt=RF(),BKt=Is(),OKt=_U(),NKt=gZ().styleTextSelection,dGe={};function UKt(e,t,r,n){var a=e._size,i=e.width*n,o=e.height*n,s=a.l*n,l=a.b*n,u=a.r*n,c=a.t*n,f=a.w*n,v=a.h*n;return[s+t.domain[0]*f,l+r.domain[0]*v,i-u-(1-t.domain[1])*f,o-c-(1-r.domain[1])*v]}var y$=vGe.exports=function(t,r,n){if(n.length){var a=t._fullLayout,i=r._scene,o=r.xaxis,s=r.yaxis,l,u;if(i){var c=qKt(t,["ANGLE_instanced_arrays","OES_element_index_uint"],dGe);if(!c){i.init();return}var f=i.count,v=a._glcanvas.data()[0].regl;if(OKt(t,r,n),i.dirty){if((i.line2d||i.error2d)&&!(i.scatter2d||i.fill2d||i.glText)&&v.clear({color:!0,depth:!0}),i.error2d===!0&&(i.error2d=IKt(v)),i.line2d===!0&&(i.line2d=cGe(v)),i.scatter2d===!0&&(i.scatter2d=uGe(v)),i.fill2d===!0&&(i.fill2d=cGe(v)),i.glText===!0)for(i.glText=new Array(f),l=0;li.glText.length){var g=f-i.glText.length;for(l=0;lJ&&(isNaN(U[ee])||isNaN(U[ee+1]));)ee-=2;q.positions=U.slice(J,ee+2)}return q}),i.line2d.update(i.lineOptions)),i.error2d){var _=(i.errorXOptions||[]).concat(i.errorYOptions||[]).map(function(q){return q||{positions:[],errors:[]}});i.error2d.update(_)}i.scatter2d&&i.scatter2d.update(i.markerOptions),i.fillOrder=hGe.repeat(null,f),i.fill2d&&(i.fillOptions=i.fillOptions.map(function(q,U){var J=n[U];if(!(!q||!J||!J[0]||!J[0].trace)){var ee=J[0],ce=ee.trace,ye=ee.t,xe=i.lineOptions[U],ue,K,_e=[];ce._ownfill&&_e.push(U),ce._nexttrace&&_e.push(U+1),_e.length&&(i.fillOrder[U]=_e);var ne=[],ae=xe&&xe.positions||ye.positions,pe,ie;if(ce.fill==="tozeroy"){for(pe=0;pepe&&isNaN(ae[ie+1]);)ie-=2;ae[pe+1]!==0&&(ne=[ae[pe],0]),ne=ne.concat(ae.slice(pe,ie+2)),ae[ie+1]!==0&&(ne=ne.concat([ae[ie],0]))}else if(ce.fill==="tozerox"){for(pe=0;pepe&&isNaN(ae[ie]);)ie-=2;ae[pe]!==0&&(ne=[0,ae[pe+1]]),ne=ne.concat(ae.slice(pe,ie+2)),ae[ie]!==0&&(ne=ne.concat([0,ae[ie+1]]))}else if(ce.fill==="toself"||ce.fill==="tonext"){for(ne=[],ue=0,q.splitNull=!0,K=0;K-1;for(let[q]of n)if(q){var S=q.trace,L=q.t,w=L.index,A=S._length,T=L.x,m=L.y;if(S.selectedpoints||C||k){if(C||(C=!0),S.selectedpoints){var F=i.selectBatch[w]=S.selectedpoints,E={};for(u=0;u{"use strict";var pGe=CBe();pGe.plot=x$();gGe.exports=pGe});var xGe=fe((sAr,yGe)=>{"use strict";yGe.exports=mGe()});var _$=fe((lAr,TGe)=>{"use strict";var VKt=Ol(),wGe=_s(),_Ge=pl().axisHoverFormat,{hovertemplateAttrs:GKt,templatefallbackAttrs:HKt}=Oo(),BM=mM(),jKt=rc().idRegex,WKt=Mo().templatedArray,w5=ta().extendFlat,Rg=VKt.marker,YKt=Rg.line,XKt=w5(wGe("marker.line",{editTypeOverride:"calc"}),{width:w5({},YKt.width,{editType:"calc"}),editType:"calc"}),IF=w5(wGe("marker"),{symbol:Rg.symbol,angle:Rg.angle,size:w5({},Rg.size,{editType:"markerSize"}),sizeref:Rg.sizeref,sizemin:Rg.sizemin,sizemode:Rg.sizemode,opacity:Rg.opacity,colorbar:Rg.colorbar,line:XKt,editType:"calc"});IF.color.editType=IF.cmin.editType=IF.cmax.editType="style";function bGe(e){return{valType:"info_array",freeLength:!0,editType:"calc",items:{valType:"subplotid",regex:jKt[e],editType:"plot"}}}TGe.exports={dimensions:WKt("dimension",{visible:{valType:"boolean",dflt:!0,editType:"calc"},label:{valType:"string",editType:"calc"},values:{valType:"data_array",editType:"calc+clearAxisTypes"},axis:{type:{valType:"enumerated",values:["linear","log","date","category"],editType:"calc+clearAxisTypes"},matches:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc+clearAxisTypes"},editType:"calc+clearAxisTypes"}),text:w5({},BM.text,{}),hovertext:w5({},BM.hovertext,{}),hovertemplate:GKt(),hovertemplatefallback:HKt(),xhoverformat:_Ge("x"),yhoverformat:_Ge("y"),marker:IF,xaxes:bGe("x"),yaxes:bGe("y"),diagonal:{visible:{valType:"boolean",dflt:!0,editType:"calc"},editType:"calc"},showupperhalf:{valType:"boolean",dflt:!0,editType:"calc"},showlowerhalf:{valType:"boolean",dflt:!0,editType:"calc"},selected:{marker:BM.selected.marker,editType:"calc"},unselected:{marker:BM.unselected.marker,editType:"calc"},opacity:BM.opacity}});var zF=fe((uAr,AGe)=>{"use strict";AGe.exports=function(e,t,r,n){n||(n=1/0);var a,i;for(a=0;a{"use strict";var b$=Xt(),ZKt=Ah(),MGe=_$(),$Kt=Is(),KKt=vv(),JKt=zF(),QKt=JP().isOpenSymbol;SGe.exports=function(t,r,n,a){function i(g,p){return b$.coerce(t,r,MGe,g,p)}var o=ZKt(t,r,{name:"dimensions",handleItemDefaults:eJt}),s=i("diagonal.visible"),l=i("showupperhalf"),u=i("showlowerhalf"),c=JKt(r,o,"values");if(!c||!s&&!l&&!u){r.visible=!1;return}i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("xhoverformat"),i("yhoverformat"),KKt(t,r,n,a,i,{noAngleRef:!0,noLineDash:!0,noStandOff:!0});var f=QKt(r.marker.symbol),v=$Kt.isBubble(r);i("marker.line.width",f||v?1:0),tJt(t,r,a,i),b$.coerceSelectionMarkerOpacity(r,i)};function eJt(e,t){function r(a,i){return b$.coerce(e,t,MGe.dimensions,a,i)}r("label");var n=r("values");n&&n.length?r("visible"):t.visible=!1,r("axis.type"),r("axis.matches")}function tJt(e,t,r,n){var a=t.dimensions,i=a.length,o=t.showupperhalf,s=t.showlowerhalf,l=t.diagonal.visible,u,c,f=new Array(i),v=new Array(i);for(u=0;uc&&o||u{"use strict";var kGe=Xt();CGe.exports=function(t,r){var n=t._fullLayout,a=r.uid,i=n._splomScenes;i||(i=n._splomScenes={});var o={dirty:!0,selectBatch:[],unselectBatch:[]},s={matrix:!1,selectBatch:[],unselectBatch:[]},l=i[r.uid];return l||(l=i[a]=kGe.extendFlat({},o,s),l.draw=function(){l.matrix&&l.matrix.draw&&(l.selectBatch.length||l.unselectBatch.length?l.matrix.draw(l.unselectBatch,l.selectBatch):l.matrix.draw()),l.dirty=!1},l.destroy=function(){l.matrix&&l.matrix.destroy&&l.matrix.destroy(),l.matrixOptions=null,l.selectBatch=null,l.unselectBatch=null,l=null}),l.dirty||kGe.extendFlat(l,o),l}});var DGe=fe((hAr,FGe)=>{"use strict";var w$=Xt(),qF=El(),rJt=gv().calcMarkerSize,nJt=gv().calcAxisExpansion,iJt=pv(),PGe=f_().markerSelection,aJt=f_().markerStyle,oJt=LGe(),sJt=Wa().BADNUM,lJt=Ty().TOO_MANY_POINTS;FGe.exports=function(t,r){var n=r.dimensions,a=r._length,i={},o=i.cdata=[],s=i.data=[],l=r._visibleDims=[],u,c,f,v,g;function p(k,S){for(var L=k.makeCalcdata({v:S.values,vcalendar:r.calendar},"v"),w=0;wlJt,y;for(_?y=i.sizeAvg||Math.max(i.size,3):y=rJt(r,a),c=0;c{(function(){var e,t,r,n,a,i;typeof performance!="undefined"&&performance!==null&&performance.now?OM.exports=function(){return performance.now()}:typeof process!="undefined"&&process!==null&&process.hrtime?(OM.exports=function(){return(e()-a)/1e6},t=process.hrtime,e=function(){var o;return o=t(),o[0]*1e9+o[1]},n=e(),i=process.uptime()*1e9,a=n-i):Date.now?(OM.exports=function(){return Date.now()-r},r=Date.now()):(OM.exports=function(){return new Date().getTime()-r},r=new Date().getTime())}).call(RGe)});var qGe=fe((dAr,NF)=>{var uJt=IGe(),Ig=window,BF=["moz","webkit"],A5="AnimationFrame",M5=Ig["request"+A5],NM=Ig["cancel"+A5]||Ig["cancelRequest"+A5];for(T5=0;!M5&&T5{BGe.exports=function(t,r){var n=typeof t=="number",a=typeof r=="number";n&&!a?(r=t,t=0):!n&&!a&&(t=0,r=0),t=t|0,r=r|0;var i=r-t;if(i<0)throw new Error("array length must be positive");for(var o=new Array(i),s=0,l=t;s{"use strict";var cJt=xZ(),fJt=E1(),hJt=l_(),NGe=qGe(),dJt=OGe(),A$=u5(),vJt=u_();VGe.exports=Fy;function Fy(e,t){if(!(this instanceof Fy))return new Fy(e,t);this.traces=[],this.passes={},this.regl=e,this.scatter=cJt(e),this.canvas=this.scatter.canvas}Fy.prototype.render=function(...e){return e.length&&this.update(...e),this.regl.attributes.preserveDrawingBuffer?this.draw():(this.dirty?this.planned==null&&(this.planned=NGe(()=>{this.draw(),this.dirty=!0,this.planned=null})):(this.draw(),this.dirty=!0,NGe(()=>{this.dirty=!1})),this)};Fy.prototype.update=function(...e){if(!e.length)return;for(let n=0;n_||!a.lower&&x<_)continue;let y=pJt(a.id,x,_),C=this.passes[y]||(this.passes[y]={});if(n.data&&(n.transpose?C.positions={x:{buffer:a.buffer,offset:_,count:l,stride:s},y:{buffer:a.buffer,offset:x,count:l,stride:s}}:C.positions={x:{buffer:a.buffer,offset:_*l,count:l},y:{buffer:a.buffer,offset:x*l,count:l}},C.bounds=UF(a.bounds,x,_)),n.domain||n.viewport||n.data){let k=o?UF(a.padding,x,_):a.padding;if(a.domain){let[S,L,w,A]=UF(a.domain,x,_);C.viewport=[f+S*u+k[0],v+L*c+k[1],f+w*u-k[2],v+A*c-k[3]]}else C.viewport=[f+_*g+g*k[0],v+x*p+p*k[1],f+(_+1)*g-g*k[2],v+(x+1)*p-p*k[3]]}n.color&&(C.color=a.color),n.size&&(C.size=a.size),n.marker&&(C.marker=a.marker),n.borderSize&&(C.borderSize=a.borderSize),n.borderColor&&(C.borderColor=a.borderColor),n.opacity&&(C.opacity=a.opacity),n.range&&(C.range=i?UF(a.range,x,_):a.range||C.bounds),a.passes.push(y)}return this};Fy.prototype.draw=function(...e){if(!e.length)this.scatter.draw();else{let t=[];for(let r=0;r{t[i+s]=n})}this.scatter.draw(...t)}return this};Fy.prototype.destroy=function(){return this.traces.forEach(e=>{e.buffer&&e.buffer.destroy&&e.buffer.destroy()}),this.traces=null,this.passes=null,this.scatter.destroy(),this};function pJt(e,t,r){let n=e.id!=null?e.id:e,a=t,i=r;return n<<16|(a&255)<<8|i&255}function UF(e,t,r){let n,a,i,o,s,l,u,c,f=e[t],v=e[r];return f.length>2?(n=f[0],i=f[2],a=f[1],o=f[3]):f.length?(n=a=f[0],i=o=f[1]):(n=f.x,a=f.y,i=f.x+f.width,o=f.y+f.height),v.length>2?(s=v[0],u=v[2],l=v[1],c=v[3]):v.length?(s=l=v[0],u=c=v[1]):(s=v.x,l=v.y,u=v.x+v.width,c=v.y+v.height),[s,a,u,o]}function UGe(e){if(typeof e=="number")return[e,e,e,e];if(e.length===2)return[e[0],e[1],e[0],e[1]];{let t=A$(e);return[t.x,t.y,t.x+t.width,t.y+t.height]}}});var jGe=fe((gAr,HGe)=>{"use strict";var gJt=GGe(),M$=Xt(),VF=El(),mJt=$p().selectMode;HGe.exports=function(t,r,n){if(n.length)for(var a=0;a-1,E=mJt(c)||!!a.selectedpoints||F,I=!0;if(E){var R=a._length;if(a.selectedpoints){o.selectBatch=a.selectedpoints;var B=a.selectedpoints,O={};for(g=0;g{"use strict";WGe.getDimIndex=function(t,r){for(var n=r._id,a=n.charAt(0),i={x:0,y:1}[a],o=t._visibleDims,s=0;s{"use strict";var YGe=S$(),xJt=KP().calcHover,XGe=Yi().getFromId,_Jt=ta().extendFlat;function bJt(e,t,r,n,a){a||(a={});var i=(n||"").charAt(0)==="x",o=(n||"").charAt(0)==="y",s=ZGe(e,t,r);if((i||o)&&a.hoversubplots==="axis"&&s[0])for(var l=(i?e.xa:e.ya)._subplotsWith,u=a.gd,c=_Jt({},e),f=0;f{"use strict";var tHe=Xt(),JGe=tHe.pushUnique,QGe=Is(),eHe=S$();rHe.exports=function(t,r){var n=t.cd,a=n[0].trace,i=n[0].t,o=t.scene,s=o.matrixOptions.cdata,l=t.xaxis,u=t.yaxis,c=[];if(!o)return c;var f=!QGe.hasMarkers(a)&&!QGe.hasText(a);if(a.visible!==!0||f)return c;var v=eHe.getDimIndex(a,l),g=eHe.getDimIndex(a,u);if(v===!1||g===!1)return c;var p=i.xpx[v],x=i.ypx[g],_=s[v],y=s[g],C=(t.scene.selectBatch||[]).slice(),k=[];if(r!==!1&&!r.degenerate)for(var S=0;S<_.length;S++)r.contains([p[S],x[S]],null,S,t)?(c.push({pointNumber:S,x:_[S],y:y[S]}),JGe(C,S)):C.indexOf(S)!==-1?JGe(C,S):k.push(S);var L=o.matrixOptions;return!C.length&&!k.length?o.matrix.update(L,null):!o.selectBatch.length&&!o.unselectBatch.length&&o.matrix.update(o.unselectedOptions,tHe.extendFlat({},L,o.selectedOptions,o.viewOpts)),o.selectBatch=C,o.unselectBatch=k,c}});var oHe=fe((_Ar,aHe)=>{"use strict";var iHe=Xt(),wJt=pv(),TJt=f_().markerStyle;aHe.exports=function(t,r){var n=r.trace,a=t._fullLayout._splomScenes[n.uid];if(a){wJt(t,n),iHe.extendFlat(a.matrixOptions,TJt(t,n));var i=iHe.extendFlat({},a.matrixOptions,a.viewOpts);a.matrix.update(i,null)}}});var lHe=fe((bAr,sHe)=>{"use strict";var AJt=bi(),MJt=dV();sHe.exports={moduleType:"trace",name:"splom",categories:["gl","regl","cartesian","symbols","showLegend","scatter-like"],attributes:_$(),supplyDefaults:EGe(),colorbar:Zf(),calc:DGe(),plot:jGe(),hoverPoints:KGe().hoverPoints,selectPoints:nHe(),editStyle:oHe(),meta:{}};AJt.register(MJt)});var vHe=fe((wAr,dHe)=>{"use strict";var SJt=KZ(),EJt=bi(),kJt=RF(),CJt=jf().getModuleCalcData,Dy=gu(),uHe=El().getFromId,cHe=Yi().shouldShowZeroLine,fHe="splom",hHe={};function LJt(e){var t=e._fullLayout,r=EJt.getModule(fHe),n=CJt(e.calcdata,r)[0],a=kJt(e,["ANGLE_instanced_arrays","OES_element_index_uint"],hHe);a&&(t._hasOnlyLargeSploms&&E$(e),r.plot(e,{},n))}function PJt(e){var t=e.calcdata,r=e._fullLayout;r._hasOnlyLargeSploms&&E$(e);for(var n=0;n{"use strict";var pHe=lHe();pHe.basePlotModule=vHe(),gHe.exports=pHe});var xHe=fe((AAr,yHe)=>{"use strict";yHe.exports=mHe()});var L$=fe((MAr,_He)=>{"use strict";var IJt=_s(),k$=pf(),C$=Ds(),zJt=nl().attributes,GF=ta().extendFlat,qJt=Mo().templatedArray;_He.exports={domain:zJt({name:"parcoords",trace:!0,editType:"plot"}),labelangle:{valType:"angle",dflt:0,editType:"plot"},labelside:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},labelfont:C$({editType:"plot"}),tickfont:C$({autoShadowDflt:!0,editType:"plot"}),rangefont:C$({editType:"plot"}),dimensions:qJt("dimension",{label:{valType:"string",editType:"plot"},tickvals:GF({},k$.tickvals,{editType:"plot"}),ticktext:GF({},k$.ticktext,{editType:"plot"}),tickformat:GF({},k$.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:GF({editType:"calc"},IJt("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"}}});var UM=fe((SAr,bHe)=>{"use strict";bHe.exports={maxDimensionCount:60,overdrag:45,verticalPadding:2,tickDistance:50,canvasPixelRatio:1,blockLineCount:5e3,layers:["contextLineLayer","focusLineLayer","pickLineLayer"],axisTitleOffset:28,axisExtentOffset:10,bar:{width:4,captureWidth:10,fillColor:"magenta",fillOpacity:1,snapDuration:150,snapRatio:.25,snapClose:.01,strokeOpacity:1,strokeWidth:1,handleHeight:8,handleOpacity:1,handleOverlap:0},cn:{axisExtentText:"axis-extent-text",parcoordsLineLayers:"parcoords-line-layers",parcoordsLineLayer:"parcoords-lines",parcoords:"parcoords",parcoordsControlView:"parcoords-control-view",yAxis:"y-axis",axisOverlays:"axis-overlays",axis:"axis",axisHeading:"axis-heading",axisTitle:"axis-title",axisExtent:"axis-extent",axisExtentTop:"axis-extent-top",axisExtentTopText:"axis-extent-top-text",axisExtentBottom:"axis-extent-bottom",axisExtentBottomText:"axis-extent-bottom-text",axisBrush:"axis-brush"},id:{filterBarPattern:"filter-bar-pattern"}}});var L1=fe((EAr,THe)=>{"use strict";var BJt=J4();function wHe(e){return[e]}THe.exports={keyFun:function(e){return e.key},repeat:wHe,descend:BJt,wrap:wHe,unwrap:function(e){return e[0]}}});var D$=fe((kAr,RHe)=>{"use strict";var Vu=UM(),Dp=xi(),OJt=L1().keyFun,HF=L1().repeat,S5=Xt().sorterAsc,NJt=Xt().strTranslate,AHe=Vu.bar.snapRatio;function MHe(e,t){return e*(1-AHe)+t*AHe}var SHe=Vu.bar.snapClose;function UJt(e,t){return e*(1-SHe)+t*SHe}function WF(e,t,r,n){if(VJt(r,n))return r;var a=e?-1:1,i=0,o=t.length-1;if(a<0){var s=i;i=o,o=s}for(var l=t[i],u=l,c=i;a*c=t[r][0]&&e<=t[r][1])return!0;return!1}function GJt(e){e.attr("x",-Vu.bar.captureWidth/2).attr("width",Vu.bar.captureWidth)}function HJt(e){e.attr("visibility","visible").style("visibility","visible").attr("fill","yellow").attr("opacity",0)}function jJt(e){if(!e.brush.filterSpecified)return"0,"+e.height;for(var t=EHe(e.brush.filter.getConsolidated(),e.height),r=[0],n,a,i,o=t.length?t[0][0]:null,s=0;se[1]+r||t=.9*e[1]+.1*e[0]?"n":t<=.9*e[0]+.1*e[1]?"s":"ns"}function kHe(){Dp.select(document.body).style("cursor",null)}function F$(e){e.attr("stroke-dasharray",jJt)}function jF(e,t){var r=Dp.select(e).selectAll(".highlight, .highlight-shadow"),n=t?r.transition().duration(Vu.bar.snapDuration).each("end",t):r;F$(n)}function CHe(e,t){var r=e.brush,n=r.filterSpecified,a=NaN,i={},o;if(n){var s=e.height,l=r.filter.getConsolidated(),u=EHe(l,s),c=NaN,f=NaN,v=NaN;for(o=0;o<=u.length;o++){var g=u[o];if(g&&g[0]<=t&&t<=g[1]){c=o;break}else if(f=o?o-1:NaN,g&&g[0]>t){v=o;break}}if(a=c,isNaN(a)&&(isNaN(f)||isNaN(v)?a=isNaN(f)?v:f:a=t-u[f][1]=C[0]&&y<=C[1]){i.clickableOrdinalRange=C;break}}}return i}function YJt(e,t){Dp.event.sourceEvent.stopPropagation();var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=t.unitToPaddedPx.invert(r),a=t.brush,i=CHe(t,r),o=i.interval,s=a.svgBrush;if(s.wasDragged=!1,s.grabbingBar=i.region==="ns",s.grabbingBar){var l=o.map(t.unitToPaddedPx);s.grabPoint=r-l[0]-Vu.verticalPadding,s.barLength=l[1]-l[0]}s.clickableOrdinalRange=i.clickableOrdinalRange,s.stayingIntervals=t.multiselect&&a.filterSpecified?a.filter.getConsolidated():[],o&&(s.stayingIntervals=s.stayingIntervals.filter(function(u){return u[0]!==o[0]&&u[1]!==o[1]})),s.startExtent=i.region?o[i.region==="s"?1:0]:n,t.parent.inBrushDrag=!0,s.brushStartCallback()}function LHe(e,t){Dp.event.sourceEvent.stopPropagation();var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=t.brush.svgBrush;n.wasDragged=!0,n._dragging=!0,n.grabbingBar?n.newExtent=[r-n.grabPoint,r+n.barLength-n.grabPoint].map(t.unitToPaddedPx.invert):n.newExtent=[n.startExtent,t.unitToPaddedPx.invert(r)].sort(S5),t.brush.filterSpecified=!0,n.extent=n.stayingIntervals.concat([n.newExtent]),n.brushCallback(t),jF(e.parentNode)}function XJt(e,t){var r=t.brush,n=r.filter,a=r.svgBrush;a._dragging||(PHe(e,t),LHe(e,t),t.brush.svgBrush.wasDragged=!1),a._dragging=!1;var i=Dp.event;i.sourceEvent.stopPropagation();var o=a.grabbingBar;if(a.grabbingBar=!1,a.grabLocation=void 0,t.parent.inBrushDrag=!1,kHe(),!a.wasDragged){a.wasDragged=void 0,a.clickableOrdinalRange?r.filterSpecified&&t.multiselect?a.extent.push(a.clickableOrdinalRange):(a.extent=[a.clickableOrdinalRange],r.filterSpecified=!0):o?(a.extent=a.stayingIntervals,a.extent.length===0&&P$(r)):P$(r),a.brushCallback(t),jF(e.parentNode),a.brushEndCallback(r.filterSpecified?n.getConsolidated():[]);return}var s=function(){n.set(n.getConsolidated())};if(t.ordinal){var l=t.unitTickvals;l[l.length-1]a.newExtent[0];a.extent=a.stayingIntervals.concat(u?[a.newExtent]:[]),a.extent.length||P$(r),a.brushCallback(t),u?jF(e.parentNode,s):(s(),jF(e.parentNode))}else s();a.brushEndCallback(r.filterSpecified?n.getConsolidated():[])}function PHe(e,t){var r=t.height-Dp.mouse(e)[1]-2*Vu.verticalPadding,n=CHe(t,r),a="crosshair";n.clickableOrdinalRange?a="pointer":n.region&&(a=n.region+"-resize"),Dp.select(document.body).style("cursor",a)}function ZJt(e){e.on("mousemove",function(t){Dp.event.preventDefault(),t.parent.inBrushDrag||PHe(this,t)}).on("mouseleave",function(t){t.parent.inBrushDrag||kHe()}).call(Dp.behavior.drag().on("dragstart",function(t){YJt(this,t)}).on("drag",function(t){LHe(this,t)}).on("dragend",function(t){XJt(this,t)}))}function FHe(e,t){return e[0]-t[0]}function $Jt(e,t,r){var n=r._context.staticPlot,a=e.selectAll(".background").data(HF);a.enter().append("rect").classed("background",!0).call(GJt).call(HJt).style("pointer-events",n?"none":"auto").attr("transform",NJt(0,Vu.verticalPadding)),a.call(ZJt).attr("height",function(s){return s.height-Vu.verticalPadding});var i=e.selectAll(".highlight-shadow").data(HF);i.enter().append("line").classed("highlight-shadow",!0).attr("x",-Vu.bar.width/2).attr("stroke-width",Vu.bar.width+Vu.bar.strokeWidth).attr("stroke",t).attr("opacity",Vu.bar.strokeOpacity).attr("stroke-linecap","butt"),i.attr("y1",function(s){return s.height}).call(F$);var o=e.selectAll(".highlight").data(HF);o.enter().append("line").classed("highlight",!0).attr("x",-Vu.bar.width/2).attr("stroke-width",Vu.bar.width-Vu.bar.strokeWidth).attr("stroke",Vu.bar.fillColor).attr("opacity",Vu.bar.fillOpacity).attr("stroke-linecap","butt"),o.attr("y1",function(s){return s.height}).call(F$)}function KJt(e,t,r){var n=e.selectAll("."+Vu.cn.axisBrush).data(HF,OJt);n.enter().append("g").classed(Vu.cn.axisBrush,!0),$Jt(n,t,r)}function JJt(e){return e.svgBrush.extent.map(function(t){return t.slice()})}function P$(e){e.filterSpecified=!1,e.svgBrush.extent=[[-1/0,1/0]]}function QJt(e){return function(r){var n=r.brush,a=JJt(n),i=a.slice();n.filter.set(i),e()}}function DHe(e){for(var t=e.slice(),r=[],n,a=t.shift();a;){for(n=a.slice();(a=t.shift())&&a[0]<=n[1];)n[1]=Math.max(n[1],a[1]);r.push(n)}return r.length===1&&r[0][0]>r[0][1]&&(r=[]),r}function eQt(){var e=[],t,r;return{set:function(n){e=n.map(function(a){return a.slice().sort(S5)}).sort(FHe),e.length===1&&e[0][0]===-1/0&&e[0][1]===1/0&&(e=[[0,-1]]),t=DHe(e),r=e.reduce(function(a,i){return[Math.min(a[0],i[0]),Math.max(a[1],i[1])]},[1/0,-1/0])},get:function(){return e.slice()},getConsolidated:function(){return t},getBounds:function(){return r}}}function tQt(e,t,r,n,a,i){var o=eQt();return o.set(r),{filter:o,filterSpecified:t,svgBrush:{extent:[],brushStartCallback:n,brushCallback:QJt(a),brushEndCallback:i}}}function rQt(e,t){if(Array.isArray(e[0])?(e=e.map(function(n){return n.sort(S5)}),t.multiselect?e=DHe(e.sort(FHe)):e=[e[0]]):e=[e.sort(S5)],t.tickvals){var r=t.tickvals.slice().sort(S5);if(e=e.map(function(n){var a=[WF(0,r,n[0],[]),WF(1,r,n[1],[])];if(a[1]>a[0])return a}).filter(function(n){return n}),!e.length)return}return e.length>1?e:e[0]}RHe.exports={makeBrush:tQt,ensureAxisBrush:KJt,cleanRanges:rQt}});var qHe=fe((CAr,zHe)=>{"use strict";var Ry=Xt(),nQt=Wf().hasColorscale,iQt=Vc(),aQt=nl().defaults,oQt=Ah(),sQt=Yi(),IHe=L$(),lQt=D$(),R$=UM().maxDimensionCount,uQt=zF();function cQt(e,t,r,n,a){var i=a("line.color",r);if(nQt(e,"line")&&Ry.isArrayOrTypedArray(i)){if(i.length)return a("line.colorscale"),iQt(e,t,n,a,{prefix:"line.",cLetter:"c"}),i.length;t.line.color=r}return 1/0}function fQt(e,t,r,n){function a(u,c){return Ry.coerce(e,t,IHe.dimensions,u,c)}var i=a("values"),o=a("visible");if(i&&i.length||(o=t.visible=!1),o){a("label"),a("tickvals"),a("ticktext"),a("tickformat");var s=a("range");t._ax={_id:"y",type:"linear",showexponent:"all",exponentformat:"B",range:s},sQt.setConvert(t._ax,n.layout),a("multiselect");var l=a("constraintrange");l&&(t.constraintrange=lQt.cleanRanges(l,t))}}zHe.exports=function(t,r,n,a){function i(c,f){return Ry.coerce(t,r,IHe,c,f)}var o=t.dimensions;Array.isArray(o)&&o.length>R$&&(Ry.log("parcoords traces support up to "+R$+" dimensions at the moment"),o.splice(R$));var s=oQt(t,r,{name:"dimensions",layout:a,handleItemDefaults:fQt}),l=cQt(t,r,n,a,i);aQt(r,a,i),(!Array.isArray(s)||!s.length)&&(r.visible=!1),uQt(r,s,"values",l);var u=Ry.extendFlat({},a.font,{size:Math.round(a.font.size/1.2)});Ry.coerceFont(i,"labelfont",u),Ry.coerceFont(i,"tickfont",u,{autoShadowDflt:!0}),Ry.coerceFont(i,"rangefont",u),i("labelangle"),i("labelside"),i("unselected.line.color"),i("unselected.line.opacity")}});var OHe=fe((LAr,BHe)=>{"use strict";var hQt=Xt().isArrayOrTypedArray,I$=js(),dQt=L1().wrap;BHe.exports=function(t,r){var n,a;return I$.hasColorscale(r,"line")&&hQt(r.line.color)?(n=r.line.color,a=I$.extractOpts(r.line).colorscale,I$.calc(t,r,{vals:n,containerStr:"line",cLetter:"c"})):(n=vQt(r._length),a=[[0,r.line.color],[1,r.line.color]]),dQt({lineColor:n,cscale:a})};function vQt(e){for(var t=new Array(e),r=0;r{"use strict";var pQt=Xt().isTypedArray;YF.convertTypedArray=function(e){return pQt(e)?Array.prototype.slice.call(e):e};YF.isOrdinal=function(e){return!!e.tickvals};YF.isVisible=function(e){return e.visible||!("visible"in e)}});var ZHe=fe((FAr,XHe)=>{"use strict";var gQt=["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(` `),mQt=["precision highp float;","","varying vec4 fragColor;","","void main() {"," gl_FragColor = fragColor;","}"].join(` `),VM=UM().maxDimensionCount,jHe=Xt(),NHe=1e-6,XF=2048,yQt=new Uint8Array(4),UHe=new Uint8Array(4),VHe={shape:[256,1],format:"rgba",type:"uint8",mag:"nearest",min:"nearest"};function xQt(e){e.read({x:0,y:0,width:1,height:1,data:yQt})}function WHe(e,t,r,n,a){var i=e._gl;i.enable(i.SCISSOR_TEST),i.scissor(t,r,n,a),e.clear({color:[0,0,0,0],depth:1})}function _Qt(e,t,r,n,a,i){var o=i.key;function s(l){var u=Math.min(n,a-l*n);l===0&&(window.cancelAnimationFrame(r.currentRafs[o]),delete r.currentRafs[o],WHe(e,i.scissorX,i.scissorY,i.scissorWidth,i.viewBoxSize[1])),!r.clearOnly&&(i.count=2*u,i.offset=2*l*n,t(i),l*n+u>>8*t)%256/255}function TQt(e,t,r){for(var n=new Array(e*(VM+4)),a=0,i=0;iV&&(V=T[I].dim1.canvasX,B=I);E===0&&WHe(a,0,0,u.canvasWidth,u.canvasHeight);var j=k(r);for(I=0;I{"use strict";var bf=xi(),zg=Xt(),B$=zg.isArrayOrTypedArray,tje=zg.numberFormat,rje=ni(),nje=Yi(),kQt=zg.strRotate,P1=zg.strTranslate,CQt=as(),ZF=ea(),$He=js(),U$=L1(),Iv=U$.keyFun,F1=U$.repeat,ije=U$.unwrap,E5=z$(),Fo=UM(),aje=D$(),LQt=ZHe();function KHe(e,t,r){return zg.aggNums(e,null,t,r)}function oje(e,t){return V$(KHe(Math.min,e,t),KHe(Math.max,e,t))}function $F(e){var t=e.range;return t?V$(t[0],t[1]):oje(e.values,e._length)}function V$(e,t){return(isNaN(e)||!isFinite(e))&&(e=0),(isNaN(t)||!isFinite(t))&&(t=0),e===t&&(e===0?(e-=1,t+=1):(e*=.9,t*=1.1)),[e,t]}function PQt(e,t){return t?function(r,n){var a=t[n];return a==null?e(r):a}:e}function FQt(e,t,r,n,a){var i=$F(r);return n?bf.scale.ordinal().domain(n.map(PQt(tje(r.tickformat),a))).range(n.map(function(o){var s=(o-i[0])/(i[1]-i[0]);return e-t+s*(2*t-e)})):bf.scale.linear().domain(i).range([e-t,t])}function DQt(e,t){return bf.scale.linear().range([t,e-t])}function RQt(e,t){return bf.scale.linear().domain($F(e)).range([t,1-t])}function IQt(e){if(e.tickvals){var t=$F(e);return bf.scale.ordinal().domain(e.tickvals).range(e.tickvals.map(function(r){return(r-t[0])/(t[1]-t[0])}))}}function zQt(e){var t=e.map(function(i){return i[0]}),r=e.map(function(i){let[o,s,l]=rje.rgbaArray(i[1]);return bf.rgb(o,s,l)}),n=function(i){return function(o){return o[i]}},a="rgb".split("").map(function(i){return bf.scale.linear().clamp(!0).domain(t).range(r.map(n(i)))});return function(i){return a.map(function(o){return o(i)})}}function N$(e){return e.dimensions.some(function(t){return t.brush.filterSpecified})}function qQt(e,t,r){var n=ije(t),a=n.trace,i=E5.convertTypedArray(n.lineColor),o=a.line,s={color:rje.normalize(a.unselected.line.color),opacity:a.unselected.line.opacity},l=$He.extractOpts(o),u=l.reversescale?$He.flipScale(n.cscale):n.cscale,c=a.domain,f=a.dimensions,v=e.width,g=a.labelangle,p=a.labelside,x=a.labelfont,_=a.tickfont,y=a.rangefont,C=zg.extendDeepNoArrays({},o,{color:i.map(bf.scale.linear().domain($F({values:i,range:[l.min,l.max],_length:a._length}))),blockLineCount:Fo.blockLineCount,canvasOverdrag:Fo.overdrag*Fo.canvasPixelRatio}),k=Math.floor(v*(c.x[1]-c.x[0])),S=Math.floor(e.height*(c.y[1]-c.y[0])),L=e.margin||{l:80,r:80,t:100,b:80},w=k,A=S;return{key:r,colCount:f.filter(E5.isVisible).length,dimensions:f,tickDistance:Fo.tickDistance,unitToColor:zQt(u),lines:C,deselectedLines:s,labelAngle:g,labelSide:p,labelFont:x,tickFont:_,rangeFont:y,layoutWidth:v,layoutHeight:e.height,domain:c,translateX:c.x[0]*v,translateY:e.height-c.y[1]*e.height,pad:L,canvasWidth:w*Fo.canvasPixelRatio+2*C.canvasOverdrag,canvasHeight:A*Fo.canvasPixelRatio,width:w,height:A,canvasPixelRatio:Fo.canvasPixelRatio}}function BQt(e,t,r){var n=r.width,a=r.height,i=r.dimensions,o=r.canvasPixelRatio,s=function(v){return n*v/Math.max(1,r.colCount-1)},l=Fo.verticalPadding/a,u=DQt(a,Fo.verticalPadding),c={key:r.key,xScale:s,model:r,inBrushDrag:!1},f={};return c.dimensions=i.filter(E5.isVisible).map(function(v,g){var p=RQt(v,l),x=f[v.label];f[v.label]=(x||0)+1;var _=v.label+(x?"__"+x:""),y=v.constraintrange,C=y&&y.length;C&&!B$(y[0])&&(y=[y]);var k=C?y.map(function(R){return R.map(p)}):[[-1/0,1/0]],S=function(){var R=c;R.focusLayer&&R.focusLayer.render(R.panels,!0);var B=N$(R);!e.contextShown()&&B?(R.contextLayer&&R.contextLayer.render(R.panels,!0),e.contextShown(!0)):e.contextShown()&&!B&&(R.contextLayer&&R.contextLayer.render(R.panels,!0,!0),e.contextShown(!1))},L=v.values;L.length>v._length&&(L=L.slice(0,v._length));var w=v.tickvals,A;function T(R,B){return{val:R,text:A[B]}}function m(R,B){return R.val-B.val}if(B$(w)&&w.length){zg.isTypedArray(w)&&(w=Array.from(w)),A=v.ticktext,!B$(A)||!A.length?A=w.map(tje(v.tickformat)):A.length>w.length?A=A.slice(0,w.length):w.length>A.length&&(w=w.slice(0,A.length));for(var F=1;F=B||q>=O)return;var U=I.lineLayer.readPixel(j,O-1-q),J=U[3]!==0,ee=J?U[2]+256*(U[1]+256*U[0]):null,ce={x:j,y:q,clientX:R.clientX,clientY:R.clientY,dataIndex:I.model.key,curveNumber:ee};ee!==p&&(J?a.hover(ce):a.unhover&&a.unhover(ce),p=ee)}}),g.style("opacity",function(I){return I.pick?0:1}),s.style("background","rgba(255, 255, 255, 0)");var _=s.selectAll("."+Fo.cn.parcoords).data(v,Iv);_.exit().remove(),_.enter().append("g").classed(Fo.cn.parcoords,!0).style("shape-rendering","crispEdges").style("pointer-events","none"),_.attr("transform",function(I){return P1(I.model.translateX,I.model.translateY)});var y=_.selectAll("."+Fo.cn.parcoordsControlView).data(F1,Iv);y.enter().append("g").classed(Fo.cn.parcoordsControlView,!0),y.attr("transform",function(I){return P1(I.model.pad.l,I.model.pad.t)});var C=y.selectAll("."+Fo.cn.yAxis).data(function(I){return I.dimensions},Iv);C.enter().append("g").classed(Fo.cn.yAxis,!0),y.each(function(I){O$(C,I,u)}),g.each(function(I){if(I.viewModel){!I.lineLayer||a?I.lineLayer=LQt(this,I):I.lineLayer.update(I),(I.key||I.key===0)&&(I.viewModel[I.key]=I.lineLayer);var R=!I.context||a;I.lineLayer.render(I.viewModel.panels,R)}}),C.attr("transform",function(I){return P1(I.xScale(I.xIndex),0)}),C.call(bf.behavior.drag().origin(function(I){return I}).on("drag",function(I){var R=I.parent;f.linePickActive(!1),I.x=Math.max(-Fo.overdrag,Math.min(I.model.width+Fo.overdrag,bf.event.x)),I.canvasX=I.x*I.model.canvasPixelRatio,C.sort(function(B,O){return B.x-O.x}).each(function(B,O){B.xIndex=O,B.x=I===B?B.x:B.xScale(B.xIndex),B.canvasX=B.x*B.model.canvasPixelRatio}),O$(C,R,u),C.filter(function(B){return Math.abs(I.xIndex-B.xIndex)!==0}).attr("transform",function(B){return P1(B.xScale(B.xIndex),0)}),bf.select(this).attr("transform",P1(I.x,0)),C.each(function(B,O,V){V===I.parent.key&&(R.dimensions[O]=B)}),R.contextLayer&&R.contextLayer.render(R.panels,!1,!N$(R)),R.focusLayer.render&&R.focusLayer.render(R.panels)}).on("dragend",function(I){var R=I.parent;I.x=I.xScale(I.xIndex),I.canvasX=I.x*I.model.canvasPixelRatio,O$(C,R,u),bf.select(this).attr("transform",function(B){return P1(B.x,0)}),R.contextLayer&&R.contextLayer.render(R.panels,!1,!N$(R)),R.focusLayer&&R.focusLayer.render(R.panels),R.pickLayer&&R.pickLayer.render(R.panels,!0),f.linePickActive(!0),a&&a.axesMoved&&a.axesMoved(R.key,R.dimensions.map(function(B){return B.crossfilterDimensionIndex}))})),C.exit().remove();var k=C.selectAll("."+Fo.cn.axisOverlays).data(F1,Iv);k.enter().append("g").classed(Fo.cn.axisOverlays,!0),k.selectAll("."+Fo.cn.axis).remove();var S=k.selectAll("."+Fo.cn.axis).data(F1,Iv);S.enter().append("g").classed(Fo.cn.axis,!0),S.each(function(I){var R=I.model.height/I.model.tickDistance,B=I.domainScale,O=B.domain();bf.select(this).call(bf.svg.axis().orient("left").tickSize(4).outerTickSize(2).ticks(R,I.tickFormat).tickValues(I.ordinal?O:null).tickFormat(function(V){return E5.isOrdinal(I)?V:sje(I.model.dimensions[I.visibleIndex],V)}).scale(B)),ZF.font(S.selectAll("text"),I.model.tickFont)}),S.selectAll(".domain, .tick>line").attr("fill","none").attr("stroke","black").attr("stroke-opacity",.25).attr("stroke-width","1px"),S.selectAll("text").style("cursor","default");var L=k.selectAll("."+Fo.cn.axisHeading).data(F1,Iv);L.enter().append("g").classed(Fo.cn.axisHeading,!0);var w=L.selectAll("."+Fo.cn.axisTitle).data(F1,Iv);w.enter().append("text").classed(Fo.cn.axisTitle,!0).attr("text-anchor","middle").style("cursor","ew-resize").style("pointer-events",i?"none":"auto"),w.text(function(I){return I.label}).each(function(I){var R=bf.select(this);ZF.font(R,I.model.labelFont),CQt.convertToTspans(R,t)}).attr("transform",function(I){var R=QHe(I.model.labelAngle,I.model.labelSide),B=Fo.axisTitleOffset;return(R.dir>0?"":P1(0,2*B+I.model.height))+kQt(R.degrees)+P1(-B*R.dx,-B*R.dy)}).attr("text-anchor",function(I){var R=QHe(I.model.labelAngle,I.model.labelSide),B=Math.abs(R.dx),O=Math.abs(R.dy);return 2*B>O?R.dir*R.dx<0?"start":"end":"middle"});var A=k.selectAll("."+Fo.cn.axisExtent).data(F1,Iv);A.enter().append("g").classed(Fo.cn.axisExtent,!0);var T=A.selectAll("."+Fo.cn.axisExtentTop).data(F1,Iv);T.enter().append("g").classed(Fo.cn.axisExtentTop,!0),T.attr("transform",P1(0,-Fo.axisExtentOffset));var m=T.selectAll("."+Fo.cn.axisExtentTopText).data(F1,Iv);m.enter().append("text").classed(Fo.cn.axisExtentTopText,!0).call(JHe),m.text(function(I){return eje(I,!0)}).each(function(I){ZF.font(bf.select(this),I.model.rangeFont)});var F=A.selectAll("."+Fo.cn.axisExtentBottom).data(F1,Iv);F.enter().append("g").classed(Fo.cn.axisExtentBottom,!0),F.attr("transform",function(I){return P1(0,I.model.height+Fo.axisExtentOffset)});var E=F.selectAll("."+Fo.cn.axisExtentBottomText).data(F1,Iv);E.enter().append("text").classed(Fo.cn.axisExtentBottomText,!0).attr("dy","0.75em").call(JHe),E.text(function(I){return eje(I,!1)}).each(function(I){ZF.font(bf.select(this),I.model.rangeFont)}),aje.ensureAxisBrush(k,c,t)}});var H$=fe((G$,dje)=>{"use strict";var UQt=uje(),VQt=RF(),cje=z$().isVisible,hje={};function fje(e,t,r){var n=t.indexOf(r),a=e.indexOf(n);return a===-1&&(a+=t.length),a}function GQt(e,t){return function(n,a){return fje(e,t,n)-fje(e,t,a)}}var G$=dje.exports=function(t,r){var n=t._fullLayout,a=VQt(t,[],hje);if(a){var i={},o={},s={},l=n._size;r.forEach(function(g,p){var x=g[0].trace,_=s[p]=x.index;i[p]=t.data[_].dimensions,o[p]=t.data[_].dimensions.slice()});var u=function(g,p,x){var _=o[g][p],y=x.map(function(A){return A.slice()}),C="dimensions["+p+"].constraintrange",k=n._tracePreGUI[t._fullData[s[g]].uid];if(k[C]===void 0){var S=_.constraintrange;k[C]=S||null}var L=t._fullData[s[g]].dimensions[p];y.length?(y.length===1&&(y=y[0]),_.constraintrange=y,L.constraintrange=y.slice(),y=[y]):(delete _.constraintrange,delete L.constraintrange,y=null);var w={};w[C]=y,t.emit("plotly_restyle",[w,[s[g]]])},c=function(g){t.emit("plotly_hover",g)},f=function(g){t.emit("plotly_unhover",g)},v=function(g,p){var x=GQt(p,o[g].filter(cje));i[g].sort(x),o[g].filter(function(_){return!cje(_)}).sort(function(_){return o[g].indexOf(_)}).forEach(function(_){i[g].splice(i[g].indexOf(_),1),i[g].splice(o[g].indexOf(_),0,_)}),t.emit("plotly_restyle",[{dimensions:[i[g]]},[s[g]]])};UQt(t,r,{width:l.w,height:l.h,margin:{t:l.t,r:l.r,b:l.b,l:l.l}},{filterChanged:u,hover:c,unhover:f,axesMoved:v})}};G$.reglPrecompiled=hje});var pje=fe(GM=>{"use strict";var vje=xi(),HQt=jf().getModuleCalcData,jQt=H$(),WQt=Q0();GM.name="parcoords";GM.plot=function(e){var t=HQt(e.calcdata,"parcoords")[0];t.length&&jQt(e,t)};GM.clean=function(e,t,r,n){var a=n._has&&n._has("parcoords"),i=t._has&&t._has("parcoords");a&&!i&&(n._paperdiv.selectAll(".parcoords").remove(),n._glimages.selectAll("*").remove())};GM.toSVG=function(e){var t=e._fullLayout._glimages,r=vje.select(e).selectAll(".svg-container"),n=r.filter(function(i,o){return o===r.size()-1}).selectAll(".gl-canvas-context, .gl-canvas-focus");function a(){var i=this,o=i.toDataURL("image/png"),s=t.append("svg:image");s.attr({xmlns:WQt.svg,"xlink:href":o,preserveAspectRatio:"none",x:0,y:0,width:i.style.width,height:i.style.height})}n.each(a),window.setTimeout(function(){vje.selectAll("#filterBarPattern").attr("id","filterBarPattern")},60)}});var mje=fe((IAr,gje)=>{"use strict";gje.exports={attributes:L$(),supplyDefaults:qHe(),calc:OHe(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcoords",basePlotModule:pje(),categories:["gl","regl","noOpacity","noHover"],meta:{}}});var _je=fe((zAr,xje)=>{"use strict";var yje=mje();yje.plot=H$();xje.exports=yje});var wje=fe((qAr,bje)=>{"use strict";bje.exports=_je()});var j$=fe((BAr,Eje)=>{"use strict";var Aje=ta().extendFlat,YQt=Ho(),Tje=Ds(),XQt=_s(),{hovertemplateAttrs:Mje,templatefallbackAttrs:Sje}=Oo(),ZQt=nl().attributes,$Qt=Aje({editType:"calc"},XQt("line",{editTypeOverride:"calc"}),{shape:{valType:"enumerated",values:["linear","hspline"],dflt:"linear",editType:"plot"},hovertemplate:Mje({editType:"plot",arrayOk:!1},{keys:["count","probability"]}),hovertemplatefallback:Sje({editType:"plot"})});Eje.exports={domain:ZQt({name:"parcats",trace:!0,editType:"calc"}),hoverinfo:Aje({},YQt.hoverinfo,{flags:["count","probability"],editType:"plot",arrayOk:!1}),hoveron:{valType:"enumerated",values:["category","color","dimension"],dflt:"category",editType:"plot"},hovertemplate:Mje({editType:"plot",arrayOk:!1},{keys:["count","probability","category","categorycount","colorcount","bandcolorcount"]}),hovertemplatefallback:Sje({editType:"plot"}),arrangement:{valType:"enumerated",values:["perpendicular","freeform","fixed"],dflt:"perpendicular",editType:"plot"},bundlecolors:{valType:"boolean",dflt:!0,editType:"plot"},sortpaths:{valType:"enumerated",values:["forward","backward"],dflt:"forward",editType:"plot"},labelfont:Tje({editType:"calc"}),tickfont:Tje({autoShadowDflt:!0,editType:"calc"}),dimensions:{_isLinkedToArray:"dimension",label:{valType:"string",editType:"calc"},categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},values:{valType:"data_array",dflt:[],editType:"calc"},displayindex:{valType:"integer",editType:"calc"},editType:"calc",visible:{valType:"boolean",dflt:!0,editType:"calc"}},line:$Qt,counts:{valType:"number",min:0,dflt:1,arrayOk:!0,editType:"calc"},customdata:void 0,hoverlabel:void 0,ids:void 0,legend:void 0,legendgroup:void 0,legendrank:void 0,opacity:void 0,selectedpoints:void 0,showlegend:void 0}});var Lje=fe((OAr,Cje)=>{"use strict";var k5=Xt(),KQt=Wf().hasColorscale,JQt=Vc(),QQt=nl().defaults,eer=Ah(),kje=j$(),ter=zF(),rer=Gf().isTypedArraySpec;function ner(e,t,r,n,a){a("line.shape"),a("line.hovertemplate"),a("line.hovertemplatefallback");var i=a("line.color",n.colorway[0]);if(KQt(e,"line")&&k5.isArrayOrTypedArray(i)){if(i.length)return a("line.colorscale"),JQt(e,t,n,a,{prefix:"line.",cLetter:"c"}),i.length;t.line.color=r}return 1/0}function ier(e,t){function r(u,c){return k5.coerce(e,t,kje.dimensions,u,c)}var n=r("values"),a=r("visible");if(n&&n.length||(a=t.visible=!1),a){r("label"),r("displayindex",t._index);var i=e.categoryarray,o=k5.isArrayOrTypedArray(i)&&i.length>0||rer(i),s;o&&(s="array");var l=r("categoryorder",s);l==="array"?(r("categoryarray"),r("ticktext")):(delete e.categoryarray,delete e.ticktext),!o&&l==="array"&&(t.categoryorder="trace")}}Cje.exports=function(t,r,n,a){function i(u,c){return k5.coerce(t,r,kje,u,c)}var o=eer(t,r,{name:"dimensions",handleItemDefaults:ier}),s=ner(t,r,n,a,i);QQt(r,a,i),(!Array.isArray(o)||!o.length)&&(r.visible=!1),ter(r,o,"values",s),i("hoveron"),i("hovertemplate"),i("hovertemplatefallback"),i("arrangement"),i("bundlecolors"),i("sortpaths"),i("counts");var l=a.font;k5.coerceFont(i,"labelfont",l,{overrideDflt:{size:Math.round(l.size)}}),k5.coerceFont(i,"tickfont",l,{autoShadowDflt:!0,overrideDflt:{size:Math.round(l.size/1.2)}})}});var Fje=fe((NAr,Pje)=>{"use strict";var aer=L1().wrap,oer=Wf().hasColorscale,ser=Mh(),ler=Wq(),uer=ea(),HM=Xt(),cer=aa();Pje.exports=function(t,r){var n=HM.filterVisible(r.dimensions);if(n.length===0)return[];var a=n.map(function(m){var F;if(m.categoryorder==="trace")F=null;else if(m.categoryorder==="array")F=m.categoryarray;else{F=ler(m.values);for(var E=!0,I=0;I=e.length||t[e[r]]!==void 0)return!1;t[e[r]]=!0}return!0}});var Uje=fe((UAr,Nje)=>{"use strict";var Do=xi(),ber=($2(),Gs(Z2)).interpolateNumber,wer=Z8(),W$=ni(),YM=kl(),Iy=Xt(),jM=Iy.strTranslate,Dje=ea(),Ter=as();function Aer(e,t,r,n){var a=t._context.staticPlot,i=e.map(Ner.bind(0,t,r)),o=n.selectAll("g.parcatslayer").data([null]);o.enter().append("g").attr("class","parcatslayer").style("pointer-events",a?"none":"all");var s=o.selectAll("g.trace.parcats").data(i,qg),l=s.enter().append("g").attr("class","trace parcats");s.attr("transform",function(C){return jM(C.x,C.y)}),l.append("g").attr("class","paths");var u=s.select("g.paths"),c=u.selectAll("path.path").data(function(C){return C.paths},qg);c.attr("fill",function(C){return C.model.color});var f=c.enter().append("path").attr("class","path").attr("stroke-opacity",0).attr("fill",function(C){return C.model.color}).attr("fill-opacity",0);Z$(f),c.attr("d",function(C){return C.svgD}),f.empty()||c.sort(Y$),c.exit().remove(),c.on("mouseover",Ser).on("mouseout",Eer).on("click",ker),l.append("g").attr("class","dimensions");var v=s.select("g.dimensions"),g=v.selectAll("g.dimension").data(function(C){return C.dimensions},qg);g.enter().append("g").attr("class","dimension"),g.attr("transform",function(C){return jM(C.x,0)}),g.exit().remove();var p=g.selectAll("g.category").data(function(C){return C.categories},qg),x=p.enter().append("g").attr("class","category");p.attr("transform",function(C){return jM(0,C.y)}),x.append("rect").attr("class","catrect").attr("pointer-events","none"),p.select("rect.catrect").attr("fill","none").attr("width",function(C){return C.width}).attr("height",function(C){return C.height}),Ije(x);var _=p.selectAll("rect.bandrect").data(function(C){return C.bands},qg);_.each(function(){Iy.raiseToTop(this)}),_.attr("fill",function(C){return C.color});var y=_.enter().append("rect").attr("class","bandrect").attr("stroke-opacity",0).attr("fill",function(C){return C.color}).attr("fill-opacity",0);_.attr("fill",function(C){return C.color}).attr("width",function(C){return C.width}).attr("height",function(C){return C.height}).attr("y",function(C){return C.y}).attr("cursor",function(C){return C.parcatsViewModel.arrangement==="fixed"?"default":C.parcatsViewModel.arrangement==="perpendicular"?"ns-resize":"move"}),K$(y),_.exit().remove(),x.append("text").attr("class","catlabel").attr("pointer-events","none"),p.select("text.catlabel").attr("text-anchor",function(C){return WM(C)?"start":"end"}).attr("alignment-baseline","middle").style("fill","rgb(0, 0, 0)").attr("x",function(C){return WM(C)?C.width+5:-5}).attr("y",function(C){return C.height/2}).text(function(C){return C.model.categoryLabel}).each(function(C){Dje.font(Do.select(this),C.parcatsViewModel.categorylabelfont),Ter.convertToTspans(Do.select(this),t)}),x.append("text").attr("class","dimlabel"),p.select("text.dimlabel").attr("text-anchor","middle").attr("alignment-baseline","baseline").attr("cursor",function(C){return C.parcatsViewModel.arrangement==="fixed"?"default":"ew-resize"}).attr("x",function(C){return C.width/2}).attr("y",-5).text(function(C,k){return k===0?C.parcatsViewModel.model.dimensions[C.model.dimensionInd].dimensionLabel:null}).each(function(C){Dje.font(Do.select(this),C.parcatsViewModel.labelfont)}),p.selectAll("rect.bandrect").on("mouseover",Ier).on("mouseout",zer),p.exit().remove(),g.call(Do.behavior.drag().origin(function(C){return{x:C.x,y:0}}).on("dragstart",qer).on("drag",Ber).on("dragend",Oer)),s.each(function(C){C.traceSelection=Do.select(this),C.pathSelection=Do.select(this).selectAll("g.paths").selectAll("path.path"),C.dimensionSelection=Do.select(this).selectAll("g.dimensions").selectAll("g.dimension")}),s.exit().remove()}Nje.exports=function(e,t,r,n){Aer(r,e,n,t)};function qg(e){return e.key}function WM(e){var t=e.parcatsViewModel.dimensions.length,r=e.parcatsViewModel.dimensions[t-1].model.dimensionInd;return e.model.dimensionInd===r}function Y$(e,t){return e.model.rawColor>t.model.rawColor?1:e.model.rawColora)return 1;if(n!==a){var i=isNaN(n),o=isNaN(a);if(i!==o)return i?1:-1}}return e.length-t.length}function Ser(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){Iy.raiseToTop(this),$$(Do.select(this));var t=XM(e),r=X$(e);if(e.parcatsViewModel.graphDiv.emit("plotly_hover",{points:t,event:Do.event,constraints:r}),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var n=Do.mouse(this)[0],a=e.parcatsViewModel.graphDiv,i=e.parcatsViewModel.trace,o=a._fullLayout,s=o._paperdiv.node().getBoundingClientRect(),l=e.parcatsViewModel.graphDiv.getBoundingClientRect(),u,c,f;for(f=0;f"),w=Do.mouse(a)[0];YM.loneHover({trace:i,x:p-s.left+l.left,y:x-s.top+l.top,text:L,color:e.model.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:10,fontColor:_,idealAlign:wW$.mostReadable(t.model.color)).attr("stroke-width",.3)}function Cer(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",2.5)}function Ije(e){e.select("rect.catrect").attr("stroke","black").attr("stroke-width",1).attr("stroke-opacity",1)}function Ler(e){e.attr("stroke","black").attr("stroke-width",1.5)}function K$(e){e.attr("stroke","black").attr("stroke-width",.2).attr("stroke-opacity",1).attr("fill-opacity",1)}function KF(e){var t=e.parcatsViewModel.pathSelection,r=e.categoryViewModel.model.dimensionInd,n=e.categoryViewModel.model.categoryInd;return t.filter(function(a){return a.model.categoryInds[r]===n&&a.model.color===e.color})}function Per(e){var t=Do.select(e.parentNode).selectAll("rect.bandrect");t.each(function(r){var n=KF(r);$$(n),n.each(function(){Iy.raiseToTop(this)})}),Cer(Do.select(e.parentNode))}function Fer(e){var t=Do.select(e).datum(),r=KF(t);$$(r),r.each(function(){Iy.raiseToTop(this)}),Do.select(e.parentNode).selectAll("rect.bandrect").filter(function(n){return n.color===t.color}).each(function(){Iy.raiseToTop(this),Ler(Do.select(this))})}function J$(e,t,r){var n=Do.select(e).datum(),a=n.categoryViewModel.model,i=n.parcatsViewModel.graphDiv,o=Do.select(e.parentNode).selectAll("rect.bandrect"),s=[];o.each(function(u){var c=KF(u);c.each(function(f){Array.prototype.push.apply(s,XM(f))})});var l={};l[a.dimensionInd]=a.categoryValue,i.emit(t,{points:s,event:r,constraints:l})}function Q$(e,t,r){var n=Do.select(e).datum(),a=n.categoryViewModel.model,i=n.parcatsViewModel.graphDiv,o=KF(n),s=[];o.each(function(u){Array.prototype.push.apply(s,XM(u))});var l={};l[a.dimensionInd]=a.categoryValue,n.rawColor!==void 0&&(l.color=n.rawColor),i.emit(t,{points:s,event:r,constraints:l})}function zje(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,i=Do.select(r.parentNode).select("rect.catrect"),o=i.node().getBoundingClientRect(),s=i.datum(),l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=o.top+o.height/2,v,g;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(v=o.left,g="left"):(v=o.left+o.width,g="right");var p=s.model.count,x=s.model.categoryLabel,_=p/s.parcatsViewModel.model.count,y={countLabel:p,categoryLabel:x,probabilityLabel:_.toFixed(3)},C=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&C.push(["Count:",y.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&C.push(["P("+y.categoryLabel+"):",y.probabilityLabel].join(" "));var k=C.join("
");return{trace:c,x:n*(v-t.left),y:a*(f-t.top),text:k,color:"lightgray",borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontSize:12,fontColor:"black",idealAlign:g,hovertemplate:c.hovertemplate,hovertemplateLabels:y,eventData:[{data:c._input,fullData:c,count:p,category:x,probability:_}]}}function Der(e,t,r){var n=[];return Do.select(r.parentNode.parentNode).selectAll("g.category").select("rect.catrect").each(function(){var a=this;n.push(zje(e,t,a))}),n}function Rer(e,t,r){e._fullLayout._calcInverseTransform(e);var n=e._fullLayout._invScaleX,a=e._fullLayout._invScaleY,i=r.getBoundingClientRect(),o=Do.select(r).datum(),s=o.categoryViewModel,l=s.parcatsViewModel,u=l.model.dimensions[s.model.dimensionInd],c=l.trace,f=i.y+i.height/2,v,g;l.dimensions.length>1&&u.displayInd===l.dimensions.length-1?(v=i.left,g="left"):(v=i.left+i.width,g="right");var p=s.model.categoryLabel,x=o.parcatsViewModel.model.count,_=0;o.categoryViewModel.bands.forEach(function(F){F.color===o.color&&(_+=F.count)});var y=s.model.count,C=0;l.pathSelection.each(function(F){F.model.color===o.color&&(C+=F.model.count)});var k=_/x,S=_/C,L=_/y,w={countLabel:_,categoryLabel:p,probabilityLabel:k.toFixed(3)},A=[];s.parcatsViewModel.hoverinfoItems.indexOf("count")!==-1&&A.push(["Count:",w.countLabel].join(" ")),s.parcatsViewModel.hoverinfoItems.indexOf("probability")!==-1&&(A.push("P(color \u2229 "+p+"): "+w.probabilityLabel),A.push("P("+p+" | color): "+S.toFixed(3)),A.push("P(color | "+p+"): "+L.toFixed(3)));var T=A.join("
"),m=W$.mostReadable(o.color);return{trace:c,x:n*(v-t.left),y:a*(f-t.top),text:T,color:o.color,borderColor:"black",fontFamily:'Monaco, "Courier New", monospace',fontColor:m,fontSize:10,idealAlign:g,hovertemplate:c.hovertemplate,hovertemplateLabels:w,eventData:[{data:c._input,fullData:c,category:p,count:x,probability:k,categorycount:y,colorcount:C,bandcolorcount:_}]}}function Ier(e){if(!e.parcatsViewModel.dragDimension&&e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1){var t=Do.mouse(this)[1];if(t<-1)return;var r=e.parcatsViewModel.graphDiv,n=r._fullLayout,a=n._paperdiv.node().getBoundingClientRect(),i=e.parcatsViewModel.hoveron,o=this;if(i==="color"?(Fer(o),Q$(o,"plotly_hover",Do.event)):(Per(o),J$(o,"plotly_hover",Do.event)),e.parcatsViewModel.hoverinfoItems.indexOf("none")===-1){var s;i==="category"?s=zje(r,a,o):i==="color"?s=Rer(r,a,o):i==="dimension"&&(s=Der(r,a,o)),s&&YM.loneHover(s,{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:r})}}}function zer(e){var t=e.parcatsViewModel;if(!t.dragDimension&&(Z$(t.pathSelection),Ije(t.dimensionSelection.selectAll("g.category")),K$(t.dimensionSelection.selectAll("g.category").selectAll("rect.bandrect")),YM.loneUnhover(t.graphDiv._fullLayout._hoverlayer.node()),t.pathSelection.sort(Y$),t.hoverinfoItems.indexOf("skip")===-1)){var r=e.parcatsViewModel.hoveron,n=this;r==="color"?Q$(n,"plotly_unhover",Do.event):J$(n,"plotly_unhover",Do.event)}}function qer(e){e.parcatsViewModel.arrangement!=="fixed"&&(e.dragDimensionDisplayInd=e.model.displayInd,e.initialDragDimensionDisplayInds=e.parcatsViewModel.model.dimensions.map(function(t){return t.displayInd}),e.dragHasMoved=!1,e.dragCategoryDisplayInd=null,Do.select(this).selectAll("g.category").select("rect.catrect").each(function(t){var r=Do.mouse(this)[0],n=Do.mouse(this)[1];-2<=r&&r<=t.width+2&&-2<=n&&n<=t.height+2&&(e.dragCategoryDisplayInd=t.model.displayInd,e.initialDragCategoryDisplayInds=e.model.categories.map(function(a){return a.displayInd}),t.model.dragY=t.y,Iy.raiseToTop(this.parentNode),Do.select(this.parentNode).selectAll("rect.bandrect").each(function(a){a.yc.y+c.height/2&&(i.model.displayInd=c.model.displayInd,c.model.displayInd=s),e.dragCategoryDisplayInd=i.model.displayInd}if(e.dragCategoryDisplayInd===null||e.parcatsViewModel.arrangement==="freeform"){a.model.dragX=Do.event.x;var f=e.parcatsViewModel.dimensions[r],v=e.parcatsViewModel.dimensions[n];f!==void 0&&a.model.dragXv.x&&(a.model.displayInd=v.model.displayInd,v.model.displayInd=e.dragDimensionDisplayInd),e.dragDimensionDisplayInd=a.model.displayInd}tK(e.parcatsViewModel),eK(e.parcatsViewModel),Oje(e.parcatsViewModel),Bje(e.parcatsViewModel)}}function Oer(e){if(e.parcatsViewModel.arrangement!=="fixed"&&e.dragDimensionDisplayInd!==null){Do.select(this).selectAll("text").attr("font-weight","normal");var t={},r=qje(e.parcatsViewModel),n=e.parcatsViewModel.model.dimensions.map(function(v){return v.displayInd}),a=e.initialDragDimensionDisplayInds.some(function(v,g){return v!==n[g]});a&&n.forEach(function(v,g){var p=e.parcatsViewModel.model.dimensions[g].containerInd;t["dimensions["+p+"].displayindex"]=v});var i=!1;if(e.dragCategoryDisplayInd!==null){var o=e.model.categories.map(function(v){return v.displayInd});if(i=e.initialDragCategoryDisplayInds.some(function(v,g){return v!==o[g]}),i){var s=e.model.categories.slice().sort(function(v,g){return v.displayInd-g.displayInd}),l=s.map(function(v){return v.categoryValue}),u=s.map(function(v){return v.categoryLabel});t["dimensions["+e.model.containerInd+"].categoryarray"]=[l],t["dimensions["+e.model.containerInd+"].ticktext"]=[u],t["dimensions["+e.model.containerInd+"].categoryorder"]="array"}}if(e.parcatsViewModel.hoverinfoItems.indexOf("skip")===-1&&!e.dragHasMoved&&e.potentialClickBand&&(e.parcatsViewModel.hoveron==="color"?Q$(e.potentialClickBand,"plotly_click",Do.event.sourceEvent):J$(e.potentialClickBand,"plotly_click",Do.event.sourceEvent)),e.model.dragX=null,e.dragCategoryDisplayInd!==null){var c=e.parcatsViewModel.dimensions[e.dragDimensionDisplayInd].categories[e.dragCategoryDisplayInd];c.model.dragY=null,e.dragCategoryDisplayInd=null}e.dragDimensionDisplayInd=null,e.parcatsViewModel.dragDimension=null,e.dragHasMoved=null,e.potentialClickBand=null,tK(e.parcatsViewModel),eK(e.parcatsViewModel);var f=Do.transition().duration(300).ease("cubic-in-out");f.each(function(){Oje(e.parcatsViewModel,!0),Bje(e.parcatsViewModel,!0)}).each("end",function(){(a||i)&&wer.restyle(e.parcatsViewModel.graphDiv,t,[r])})}}function qje(e){for(var t,r=e.graphDiv._fullData,n=0;n=0;l--)u+="C"+o[l]+","+(t[l+1]+n)+" "+i[l]+","+(t[l]+n)+" "+(e[l]+r[l])+","+(t[l]+n),u+="l-"+r[l]+",0 ";return u+="Z",u}function eK(e){var t=e.dimensions,r=e.model,n=t.map(function(R){return R.categories.map(function(B){return B.y})}),a=e.model.dimensions.map(function(R){return R.categories.map(function(B){return B.displayInd})}),i=e.model.dimensions.map(function(R){return R.displayInd}),o=e.dimensions.map(function(R){return R.model.dimensionInd}),s=t.map(function(R){return R.x}),l=t.map(function(R){return R.width}),u=[];for(var c in r.paths)r.paths.hasOwnProperty(c)&&u.push(r.paths[c]);function f(R){var B=R.categoryInds.map(function(V,j){return a[j][V]}),O=o.map(function(V){return B[V]});return O}u.sort(function(R,B){var O=f(R),V=f(B);return e.sortpaths==="backward"&&(O.reverse(),V.reverse()),O.push(R.valueInds[0]),V.push(B.valueInds[0]),e.bundlecolors&&(O.unshift(R.rawColor),V.unshift(B.rawColor)),Mer(O,V)});for(var v=new Array(u.length),g=t[0].model.count,p=t[0].categories.map(function(R){return R.height}).reduce(function(R,B){return R+B}),x=0;x0?y=p*(_.count/g):y=0;for(var C=new Array(n.length),k=0;k<_.categoryInds.length;k++){var S=_.categoryInds[k],L=a[k][S],w=i[k];C[w]=n[w][L],n[w][L]+=y;var A=e.dimensions[w].categories[L],T=A.bands.length,m=A.bands[T-1];if(m===void 0||_.rawColor!==m.rawColor){var F=m===void 0?0:m.y+m.height;A.bands.push({key:F,color:_.color,rawColor:_.rawColor,height:y,width:A.width,count:_.count,y:F,categoryViewModel:A,parcatsViewModel:e})}else{var E=A.bands[T-1];E.height+=y,E.count+=_.count}}var I;e.pathShape==="hspline"?I=Rje(s,C,l,y,.5):I=Rje(s,C,l,y,0),v[x]={key:_.valueInds[0],model:_,height:y,leftXs:s,topYs:C,dimWidths:l,svgD:I,parcatsViewModel:e}}e.paths=v}function tK(e){var t=e.model.dimensions.map(function(o){return{displayInd:o.displayInd,dimensionInd:o.dimensionInd}});t.sort(function(o,s){return o.displayInd-s.displayInd});var r=[];for(var n in t){var a=t[n].dimensionInd,i=e.model.dimensions[a];r.push(Uer(e,i))}e.dimensions=r}function Uer(e,t){var r=40,n=16,a=e.model.dimensions.length,i=t.displayInd,o,s,l;a>1?o=(e.width-2*r-n)/(a-1):o=0,s=r,l=s+o*i;var u=[],c=e.model.maxCats,f=t.categories.length,v=8,g=t.count,p=e.height-v*(c-1),x,_,y,C,k,S=(c-f)*v/2,L=t.categories.map(function(w){return{displayInd:w.displayInd,categoryInd:w.categoryInd}});for(L.sort(function(w,A){return w.displayInd-A.displayInd}),k=0;k0?x=_.count/g*p:x=0,y={key:_.valueInds[0],model:_,width:n,height:x,y:_.dragY!==null?_.dragY:S,bands:[],parcatsViewModel:e},S=S+x+v,u.push(y);return{key:t.dimensionInd,x:t.dragX!==null?t.dragX:l,y:0,width:n,model:t,categories:u,parcatsViewModel:e,dragCategoryDisplayInd:null,dragDimensionDisplayInd:null,initialDragDimensionDisplayInds:null,initialDragCategoryDisplayInds:null,dragHasMoved:null,potentialClickBand:null}}});var rK=fe((VAr,Vje)=>{"use strict";var Ver=Uje();Vje.exports=function(t,r,n,a){var i=t._fullLayout,o=i._paper,s=i._size;Ver(t,o,r,{width:s.w,height:s.h,margin:{t:s.t,r:s.r,b:s.b,l:s.l}},n,a)}});var Hje=fe(JF=>{"use strict";var Ger=jf().getModuleCalcData,Her=rK(),Gje="parcats";JF.name=Gje;JF.plot=function(e,t,r,n){var a=Ger(e.calcdata,Gje);if(a.length){var i=a[0];Her(e,i,r,n)}};JF.clean=function(e,t,r,n){var a=n._has&&n._has("parcats"),i=t._has&&t._has("parcats");a&&!i&&n._paperdiv.selectAll(".parcats").remove()}});var Wje=fe((HAr,jje)=>{"use strict";jje.exports={attributes:j$(),supplyDefaults:Lje(),calc:Fje(),plot:rK(),colorbar:{container:"line",min:"cmin",max:"cmax"},moduleType:"trace",name:"parcats",basePlotModule:Hje(),categories:["noOpacity"],meta:{}}});var Xje=fe((jAr,Yje)=>{"use strict";Yje.exports=Wje()});var $je=fe((WAr,Zje)=>{"use strict";Zje.exports={version:8,name:"orto",metadata:{"maputnik:renderer":"mlgljs"},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}},{id:"waterway_tunnel",type:"line",source:"openmaptiles","source-layer":"waterway",minzoom:14,filter:["all",["in","class","river","stream","canal"],["==","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]},"line-dasharray":[2,4]}},{id:"waterway-other",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["!in","class","canal","river","stream"],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,2]]}}},{id:"waterway-stream-canal",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["in","class","canal","stream"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.3,stops:[[13,.5],[20,6]]}}},{id:"waterway-river",type:"line",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"waterway",filter:["all",["==","class","river"],["!=","brunnel","tunnel"]],layout:{"line-cap":"round"},paint:{"line-color":"#a0c8f0","line-width":{base:1.2,stops:[[10,.8],[20,4]]},"line-opacity":.5}},{id:"water-offset",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",maxzoom:8,filter:["==","$type","Polygon"],layout:{visibility:"visible"},paint:{"fill-opacity":0,"fill-color":"#a0c8f0","fill-translate":{base:1,stops:[[6,[2,0]],[8,[0,0]]]}}},{id:"water",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-color":"hsl(210, 67%, 85%)","fill-opacity":0}},{id:"water-pattern",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"water",layout:{visibility:"visible"},paint:{"fill-translate":[0,2.5],"fill-pattern":"wave","fill-opacity":1}},{id:"landcover-ice-shelf",type:"fill",metadata:{"mapbox:group":"1444849382550.77"},source:"openmaptiles","source-layer":"landcover",filter:["==","subclass","ice_shelf"],layout:{visibility:"visible"},paint:{"fill-color":"#fff","fill-opacity":{base:1,stops:[[0,.9],[10,.3]]}}},{id:"tunnel-service-track-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[15,1],[16,4],[20,11]]}}},{id:"tunnel-minor-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor"]],layout:{"line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,1]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"tunnel-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"tunnel-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.7}},{id:"tunnel-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-dasharray":[.5,.25],"line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"tunnel-path",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"tunnel-service-track",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","service","track"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-width":{base:1.2,stops:[[15.5,0],[16,2],[20,7.5]]}}},{id:"tunnel-minor",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","minor_road"]],layout:{"line-join":"round"},paint:{"line-color":"#fff","line-opacity":1,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"tunnel-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,10]]}}},{id:"tunnel-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fff4c6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-motorway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","motorway"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"#ffdaa6","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"tunnel-railway",type:"line",metadata:{"mapbox:group":"1444849354174.1904"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","tunnel"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]},"line-dasharray":[2,2]}},{id:"ferry",type:"line",source:"openmaptiles","source-layer":"transportation",filter:["all",["in","class","ferry"]],layout:{"line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(108, 159, 182, 1)","line-width":1.1,"line-dasharray":[2,2]}},{id:"aeroway-taxiway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","taxiway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,2],[17,12]]},"line-opacity":1}},{id:"aeroway-runway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:12,filter:["all",["in","class","runway"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(153, 153, 153, 1)","line-width":{base:1.5,stops:[[11,5],[17,55]]},"line-opacity":1}},{id:"aeroway-taxiway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","taxiway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,1],[17,10]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"aeroway-runway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"aeroway",minzoom:4,filter:["all",["in","class","runway"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"rgba(255, 255, 255, 1)","line-width":{base:1.5,stops:[[11,4],[17,50]]},"line-opacity":{base:1,stops:[[11,0],[12,1]]}}},{id:"highway-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-link-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"highway-minor-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#cfcdca","line-opacity":{stops:[[12,0],[12.5,0]]},"line-width":{base:1.2,stops:[[12,.5],[13,1],[14,4],[20,15]]}}},{id:"highway-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":.5,"line-width":{base:1.2,stops:[[8,1.5],[20,17]]}}},{id:"highway-primary-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[7,0],[8,.6]]},"line-width":{base:1.2,stops:[[7,0],[8,.6],[9,1.5],[20,22]]}}},{id:"highway-trunk-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-opacity":{stops:[[5,0],[6,.5]]},"line-width":{base:1.2,stops:[[5,0],[6,.6],[7,1.5],[20,22]]}}},{id:"highway-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:4,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]],layout:{"line-cap":"butt","line-join":"round",visibility:"visible"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[4,0],[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":{stops:[[4,0],[5,.5]]}}},{id:"highway-path",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","path"]]],paint:{"line-color":"#cba","line-dasharray":[1.5,.75],"line-width":{base:1.2,stops:[[15,1.2],[20,4]]}}},{id:"highway-motorway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:12,filter:["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway_link"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-link",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"highway-minor",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!=","brunnel","tunnel"],["in","class","minor","service","track"]]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fff","line-opacity":.5,"line-width":{base:1.2,stops:[[13.5,0],[14,2.5],[20,11.5]]}}},{id:"highway-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["!in","brunnel","bridge","tunnel"],["in","class","secondary","tertiary"]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[8,.5],[20,13]]},"line-opacity":.5}},{id:"highway-primary",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","primary"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[8.5,0],[9,.5],[20,18]]},"line-opacity":0}},{id:"highway-trunk",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["in","class","trunk"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"highway-motorway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",minzoom:5,filter:["all",["==","$type","LineString"],["all",["!in","brunnel","bridge","tunnel"],["==","class","motorway"]]],layout:{"line-cap":"round","line-join":"round",visibility:"visible"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"railway-transit",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-transit-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","transit"],["!in","brunnel","tunnel"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway-service",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],paint:{"line-color":"hsla(0, 0%, 73%, 0.77)","line-width":{base:1.4,stops:[[14,.4],[20,1]]}}},{id:"railway-service-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","class","rail"],["has","service"]]],layout:{visibility:"visible"},paint:{"line-color":"hsla(0, 0%, 73%, 0.68)","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,2],[20,6]]}}},{id:"railway",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"railway-hatching",type:"line",metadata:{"mapbox:group":"1444849345966.4436"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["!has","service"],["!in","brunnel","bridge","tunnel"],["==","class","rail"]]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"bridge-motorway-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-link-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[12,1],[13,3],[14,4],[20,15]]}}},{id:"bridge-secondary-tertiary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-opacity":1,"line-width":{base:1.2,stops:[[8,1.5],[20,28]]}}},{id:"bridge-trunk-primary-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"hsl(28, 76%, 67%)","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,26]]}}},{id:"bridge-motorway-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#e9ac77","line-width":{base:1.2,stops:[[5,.4],[6,.6],[7,1.5],[20,22]]},"line-opacity":.5}},{id:"bridge-path-casing",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#f8f4f0","line-width":{base:1.2,stops:[[15,1.2],[20,18]]}}},{id:"bridge-path",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","$type","LineString"],["all",["==","brunnel","bridge"],["==","class","path"]]],paint:{"line-color":"#cba","line-width":{base:1.2,stops:[[15,1.2],[20,4]]},"line-dasharray":[1.5,.75]}},{id:"bridge-motorway-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-link",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary_link","secondary_link","tertiary_link","trunk_link"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[12.5,0],[13,1.5],[14,2.5],[20,11.5]]}}},{id:"bridge-secondary-tertiary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","secondary","tertiary"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,20]]}}},{id:"bridge-trunk-primary",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["in","class","primary","trunk"]],layout:{"line-join":"round"},paint:{"line-color":"#fea","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]}}},{id:"bridge-motorway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","motorway"]],layout:{"line-join":"round"},paint:{"line-color":"#fc8","line-width":{base:1.2,stops:[[6.5,0],[7,.5],[20,18]]},"line-opacity":.5}},{id:"bridge-railway",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-width":{base:1.4,stops:[[14,.4],[15,.75],[20,2]]}}},{id:"bridge-railway-hatching",type:"line",metadata:{"mapbox:group":"1444849334699.1902"},source:"openmaptiles","source-layer":"transportation",filter:["all",["==","brunnel","bridge"],["==","class","rail"]],paint:{"line-color":"#bbb","line-dasharray":[.2,8],"line-width":{base:1.4,stops:[[14.5,0],[15,3],[20,8]]}}},{id:"cablecar",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,1],[19,2.5]]}}},{id:"cablecar-dash",type:"line",source:"openmaptiles","source-layer":"transportation",minzoom:13,filter:["==","class","cable_car"],layout:{visibility:"visible","line-cap":"round"},paint:{"line-color":"hsl(0, 0%, 70%)","line-width":{base:1,stops:[[11,3],[19,5.5]]},"line-dasharray":[2,3]}},{id:"boundary-land-level-4",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",[">=","admin_level",4],["<=","admin_level",8],["!=","maritime",1]],layout:{"line-join":"round"},paint:{"line-color":"#9e9cab","line-dasharray":[3,1,1,1],"line-width":{base:1.4,stops:[[4,.4],[5,1],[12,3]]},"line-opacity":.6}},{id:"boundary-land-level-2",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["==","admin_level",2],["!=","maritime",1],["!=","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 66%)","line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,2]]}}},{id:"boundary-land-disputed",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["!=","maritime",1],["==","disputed",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"hsl(248, 7%, 70%)","line-dasharray":[1,3],"line-width":{base:1,stops:[[0,.6],[4,1.4],[5,2],[12,8]]}}},{id:"boundary-water",type:"line",source:"openmaptiles","source-layer":"boundary",filter:["all",["in","admin_level",2,4],["==","maritime",1]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"rgba(154, 189, 214, 1)","line-width":{base:1,stops:[[0,.6],[4,1],[5,1],[12,1]]},"line-opacity":{stops:[[6,0],[10,0]]}}},{id:"waterway-name",type:"symbol",source:"openmaptiles","source-layer":"waterway",minzoom:13,filter:["all",["==","$type","LineString"],["has","name"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin} {name:nonlatin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","text-letter-spacing":.2,"symbol-spacing":350},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-lakeline",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["==","$type","LineString"],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"line","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-ocean",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["==","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":14,"text-field":"{name:latin}","text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"water-name-other",type:"symbol",source:"openmaptiles","source-layer":"water_name",filter:["all",["==","$type","Point"],["!in","class","ocean"]],layout:{"text-font":["Noto Sans Italic"],"text-size":{stops:[[0,10],[6,14]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":5,"text-rotation-alignment":"map","symbol-placement":"point","symbol-spacing":350,"text-letter-spacing":.2,visibility:"visible"},paint:{"text-color":"#74aee9","text-halo-width":1.5,"text-halo-color":"rgba(255,255,255,0.7)"}},{id:"poi-level-3",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:16,filter:["all",["==","$type","Point"],[">=","rank",25]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-2",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:15,filter:["all",["==","$type","Point"],["<=","rank",24],[">=","rank",15]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"poi-level-1",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:14,filter:["all",["==","$type","Point"],["<=","rank",14],["has","name"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":11,"text-max-width":9},paint:{"text-halo-blur":.5,"text-color":"rgba(191, 228, 172, 1)","text-halo-width":1,"text-halo-color":"rgba(30, 29, 29, 1)"}},{id:"poi-railway",type:"symbol",source:"openmaptiles","source-layer":"poi",minzoom:13,filter:["all",["==","$type","Point"],["has","name"],["==","class","railway"],["==","subclass","station"]],layout:{"text-padding":2,"text-font":["Noto Sans Regular"],"text-anchor":"top","icon-image":"{class}_11","text-field":`{name:latin} {name:nonlatin}`,"text-offset":[0,.6],"text-size":12,"text-max-width":9,"icon-optional":!1,"icon-ignore-placement":!1,"icon-allow-overlap":!1,"text-ignore-placement":!1,"text-allow-overlap":!1,"text-optional":!0},paint:{"text-halo-blur":.5,"text-color":"#666","text-halo-width":1,"text-halo-color":"#ffffff"}},{id:"road_oneway",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"road_oneway_opposite",type:"symbol",source:"openmaptiles","source-layer":"transportation",minzoom:15,filter:["all",["==","oneway",-1],["in","class","motorway","trunk","primary","secondary","tertiary","minor","service"]],layout:{"symbol-placement":"line","icon-image":"oneway","symbol-spacing":75,"icon-padding":2,"icon-rotation-alignment":"map","icon-rotate":-90,"icon-size":{stops:[[15,.5],[19,1]]}},paint:{"icon-opacity":.5}},{id:"highway-name-path",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15.5,filter:["==","class","path"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-color":"#f8f4f0","text-color":"hsl(30, 23%, 62%)","text-halo-width":.5}},{id:"highway-name-minor",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:15,filter:["all",["==","$type","LineString"],["in","class","minor","service","track"]],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-name-major",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:12.2,filter:["in","class","primary","secondary","tertiary","trunk"],layout:{"text-size":{base:1,stops:[[13,12],[14,13]]},"text-font":["Noto Sans Regular"],"text-field":"{name:latin} {name:nonlatin}","symbol-placement":"line","text-rotation-alignment":"map"},paint:{"text-halo-blur":.5,"text-color":"#765","text-halo-width":1}},{id:"highway-shield",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:8,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["!in","network","us-interstate","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"road_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-opacity":1,"text-color":"rgba(20, 19, 19, 1)","text-halo-color":"rgba(230, 221, 221, 0)","text-halo-width":2,"icon-color":"rgba(183, 18, 18, 1)","icon-opacity":.3,"icon-halo-color":"rgba(183, 55, 55, 0)"}},{id:"highway-shield-us-interstate",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:7,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-interstate"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[7,"point"],[7,"line"],[8,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"highway-shield-us-other",type:"symbol",source:"openmaptiles","source-layer":"transportation_name",minzoom:9,filter:["all",["<=","ref_length",6],["==","$type","LineString"],["in","network","us-highway","us-state"]],layout:{"text-size":10,"icon-image":"{network}_{ref_length}","icon-rotation-alignment":"viewport","symbol-spacing":200,"text-font":["Noto Sans Regular"],"symbol-placement":{base:1,stops:[[10,"point"],[11,"line"]]},"text-rotation-alignment":"viewport","icon-size":1,"text-field":"{ref}"},paint:{"text-color":"rgba(0, 0, 0, 1)"}},{id:"place-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:12,filter:["!in","class","city","town","village","country","continent"],layout:{"text-letter-spacing":.1,"text-size":{base:1.2,stops:[[12,10],[15,14]]},"text-font":["Noto Sans Bold"],"text-field":`{name:latin} {name:nonlatin}`,"text-transform":"uppercase","text-max-width":9,visibility:"visible"},paint:{"text-color":"rgba(255,255,255,1)","text-halo-width":1.2,"text-halo-color":"rgba(57, 28, 28, 1)"}},{id:"place-village",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",minzoom:10,filter:["==","class","village"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,12],[15,16]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(10, 9, 9, 0.8)"}},{id:"place-town",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["==","class","town"],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[10,14],[15,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(255, 255, 255, 1)","text-halo-width":1.2,"text-halo-color":"rgba(22, 22, 22, 0.8)"}},{id:"place-city",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["!=","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,visibility:"visible"},paint:{"text-color":"rgba(0, 0, 0, 1)","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-city-capital",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","capital",2],["==","class","city"]],layout:{"text-font":["Noto Sans Regular"],"text-size":{base:1.2,stops:[[7,14],[11,24]]},"text-field":`{name:latin} {name:nonlatin}`,"text-max-width":8,"icon-image":"star_11","text-offset":[.4,0],"icon-size":.8,"text-anchor":"left",visibility:"visible"},paint:{"text-color":"#333","text-halo-width":1.2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-other",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["!has","iso_a2"]],layout:{"text-font":["Noto Sans Italic"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-3",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],[">=","rank",3],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[3,11],[7,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-2",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",2],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[2,11],[5,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-country-1",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",filter:["all",["==","class","country"],["==","rank",1],["has","iso_a2"]],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":{stops:[[1,11],[4,17]]},"text-transform":"uppercase","text-max-width":6.25,visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}},{id:"place-continent",type:"symbol",metadata:{"mapbox:group":"1444849242106.713"},source:"openmaptiles","source-layer":"place",maxzoom:1,filter:["==","class","continent"],layout:{"text-font":["Noto Sans Bold"],"text-field":"{name:latin}","text-size":14,"text-max-width":6.25,"text-transform":"uppercase",visibility:"visible"},paint:{"text-halo-blur":1,"text-color":"#334","text-halo-width":2,"text-halo-color":"rgba(255,255,255,0.8)"}}],id:"qebnlkra6"}});var Jje=fe((YAr,Kje)=>{"use strict";Kje.exports={version:8,name:"orto",metadata:{},center:[1.537786,41.837539],zoom:12,bearing:0,pitch:0,light:{anchor:"viewport",color:"white",intensity:.4,position:[1.15,45,30]},sources:{ortoEsri:{type:"raster",tiles:["https://server.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/{z}/{y}/{x}"],tileSize:256,maxzoom:18,attribution:"ESRI © ESRI"},ortoInstaMaps:{type:"raster",tiles:["https://tilemaps.icgc.cat/mapfactory/wmts/orto_8_12/CAT3857/{z}/{x}/{y}.png"],tileSize:256,maxzoom:13},ortoICGC:{type:"raster",tiles:["https://geoserveis.icgc.cat/icc_mapesmultibase/noutm/wmts/orto/GRID3857/{z}/{x}/{y}.jpeg"],tileSize:256,minzoom:13.1,maxzoom:20},openmaptiles:{type:"vector",url:"https://geoserveis.icgc.cat/contextmaps/basemap.json"}},sprite:"https://geoserveis.icgc.cat/contextmaps/sprites/sprite@1",glyphs:"https://geoserveis.icgc.cat/contextmaps/glyphs/{fontstack}/{range}.pbf",layers:[{id:"background",type:"background",paint:{"background-color":"#F4F9F4"}},{id:"ortoEsri",type:"raster",source:"ortoEsri",maxzoom:16,layout:{visibility:"visible"}},{id:"ortoICGC",type:"raster",source:"ortoICGC",minzoom:13.1,maxzoom:19,layout:{visibility:"visible"}},{id:"ortoInstaMaps",type:"raster",source:"ortoInstaMaps",maxzoom:13,layout:{visibility:"visible"}}]}});var zy=fe((XAr,nWe)=>{"use strict";var jer=(bx(),Gs(_x)).default,Wer=$je(),Yer=Jje(),Xer='\xA9 OpenStreetMap contributors',Qje="https://basemaps.cartocdn.com/gl/positron-gl-style/style.json",eWe="https://basemaps.cartocdn.com/gl/dark-matter-gl-style/style.json",QF="https://basemaps.cartocdn.com/gl/voyager-gl-style/style.json",Zer="https://basemaps.cartocdn.com/gl/positron-nolabels-gl-style/style.json",$er="https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json",Ker="https://basemaps.cartocdn.com/gl/voyager-nolabels-gl-style/style.json",rWe={basic:QF,streets:QF,outdoors:QF,light:Qje,dark:eWe,satellite:Yer,"satellite-streets":Wer,"open-street-map":{id:"osm",version:8,sources:{"plotly-osm-tiles":{type:"raster",attribution:Xer,tiles:["https://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":Qje,"carto-darkmatter":eWe,"carto-voyager":QF,"carto-positron-nolabels":Zer,"carto-darkmatter-nolabels":$er,"carto-voyager-nolabels":Ker},tWe=jer(rWe);nWe.exports={styleValueDflt:"basic",stylesMap:rWe,styleValuesMap:tWe,traceLayerPrefix:"plotly-trace-layer-",layoutLayerPrefix:"plotly-layout-layer-",missingStyleErrorMsg:["No valid maplibre style found, please set `map.style` to one of:",tWe.join(", "),"or use a tile service."].join(` `),mapOnErrorMsg:"Map error.",fitBoundsPadding:20}});var ZM=fe((ZAr,lWe)=>{"use strict";var iWe=Xt(),aWe=ni().defaultLine,Jer=nl().attributes,Qer=Ds(),etr=Ol().textposition,ttr=rl().overrideAll,rtr=Mo().templatedArray,oWe=zy(),sWe=Qer({noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0});sWe.family.dflt="Open Sans Regular, Arial Unicode MS Regular";var ntr=lWe.exports=ttr({_arrayAttrRegexps:[iWe.counterRegex("map",".layers",!0)],domain:Jer({name:"map"}),style:{valType:"any",values:oWe.styleValuesMap,dflt:oWe.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},fitbounds:{valType:"enumerated",values:[!1,"locations"],dflt:"locations"},bounds:{west:{valType:"number"},east:{valType:"number"},south:{valType:"number"},north:{valType:"number"}},layers:rtr("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:aWe},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:aWe}},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:sWe,textposition:iWe.extendFlat({},etr,{arrayOk:!1})}})},"plot","from-root");ntr.uirevision={valType:"any",editType:"none"}});var eD=fe(($Ar,hWe)=>{"use strict";var{hovertemplateAttrs:itr,texttemplateAttrs:atr,templatefallbackAttrs:uWe}=Oo(),otr=n1(),$M=a5(),C5=Ol(),cWe=ZM(),str=Ho(),ltr=_s(),p_=ta().extendFlat,utr=rl().overrideAll,ctr=ZM(),fWe=$M.line,L5=$M.marker;hWe.exports=utr({lon:$M.lon,lat:$M.lat,cluster:{enabled:{valType:"boolean"},maxzoom:p_({},ctr.layers.maxzoom,{}),step:{valType:"number",arrayOk:!0,dflt:-1,min:-1},size:{valType:"number",arrayOk:!0,dflt:20,min:0},color:{valType:"color",arrayOk:!0},opacity:p_({},L5.opacity,{dflt:1})},mode:p_({},C5.mode,{dflt:"markers"}),text:p_({},C5.text,{}),texttemplate:atr({editType:"plot"},{keys:["lat","lon","text"]}),texttemplatefallback:uWe({editType:"plot"}),hovertext:p_({},C5.hovertext,{}),line:{color:fWe.color,width:fWe.width},connectgaps:C5.connectgaps,marker:p_({symbol:{valType:"string",dflt:"circle",arrayOk:!0},angle:{valType:"number",dflt:"auto",arrayOk:!0},allowoverlap:{valType:"boolean",dflt:!1},opacity:L5.opacity,size:L5.size,sizeref:L5.sizeref,sizemin:L5.sizemin,sizemode:L5.sizemode},ltr("marker")),fill:$M.fill,fillcolor:otr(),textfont:cWe.layers.symbol.textfont,textposition:cWe.layers.symbol.textposition,below:{valType:"string"},selected:{marker:C5.selected.marker},unselected:{marker:C5.unselected.marker},hoverinfo:p_({},str.hoverinfo,{flags:["lon","lat","text","name"]}),hovertemplate:itr(),hovertemplatefallback:uWe()},"calc","nested")});var nK=fe((KAr,dWe)=>{"use strict";var ftr=["Metropolis Black Italic","Metropolis Black","Metropolis Bold Italic","Metropolis Bold","Metropolis Extra Bold Italic","Metropolis Extra Bold","Metropolis Extra Light Italic","Metropolis Extra Light","Metropolis Light Italic","Metropolis Light","Metropolis Medium Italic","Metropolis Medium","Metropolis Regular Italic","Metropolis Regular","Metropolis Semi Bold Italic","Metropolis Semi Bold","Metropolis Thin Italic","Metropolis Thin","Open Sans Bold Italic","Open Sans Bold","Open Sans Extrabold Italic","Open Sans Extrabold","Open Sans Italic","Open Sans Light Italic","Open Sans Light","Open Sans Regular","Open Sans Semibold Italic","Open Sans Semibold","Klokantech Noto Sans Bold","Klokantech Noto Sans CJK Bold","Klokantech Noto Sans CJK Regular","Klokantech Noto Sans Italic","Klokantech Noto Sans Regular"];dWe.exports={isSupportedFont:function(e){return ftr.indexOf(e)!==-1}}});var gWe=fe((JAr,pWe)=>{"use strict";var KM=Xt(),iK=Is(),htr=vv(),dtr=lp(),vtr=up(),ptr=a1(),vWe=eD(),gtr=nK().isSupportedFont;pWe.exports=function(t,r,n,a){function i(y,C){return KM.coerce(t,r,vWe,y,C)}function o(y,C){return KM.coerce2(t,r,vWe,y,C)}var s=mtr(t,r,i);if(!s){r.visible=!1;return}if(i("text"),i("texttemplate"),i("texttemplatefallback"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("mode"),i("below"),iK.hasMarkers(r)){htr(t,r,n,a,i,{noLine:!0,noAngle:!0}),i("marker.allowoverlap"),i("marker.angle");var l=r.marker;l.symbol!=="circle"&&(KM.isArrayOrTypedArray(l.size)&&(l.size=l.size[0]),KM.isArrayOrTypedArray(l.color)&&(l.color=l.color[0]))}iK.hasLines(r)&&(dtr(t,r,n,a,i,{noDash:!0}),i("connectgaps"));var u=o("cluster.maxzoom"),c=o("cluster.step"),f=o("cluster.color",r.marker&&r.marker.color||n),v=o("cluster.size"),g=o("cluster.opacity"),p=u!==!1||c!==!1||f!==!1||v!==!1||g!==!1,x=i("cluster.enabled",p);if(x||iK.hasText(r)){var _=a.font.family;vtr(t,r,a,i,{noSelect:!0,noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0,font:{family:gtr(_)?_:"Open Sans Regular",weight:a.font.weight,style:a.font.style,size:a.font.size,color:a.font.color}})}i("fill"),r.fill!=="none"&&ptr(t,r,n,i),KM.coerceSelectionMarkerOpacity(r,i)};function mtr(e,t,r){var n=r("lon")||[],a=r("lat")||[],i=Math.min(n.length,a.length);return t._length=i,i}});var aK=fe((QAr,yWe)=>{"use strict";var mWe=Yi();yWe.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot,o=i.mockAxis,s=t.lonlat;return a.lonLabel=mWe.tickText(o,o.c2l(s[0]),!0).text,a.latLabel=mWe.tickText(o,o.c2l(s[1]),!0).text,a}});var oK=fe((e6r,_We)=>{"use strict";var xWe=Xt();_We.exports=function(t,r){var n=t.split(" "),a=n[0],i=n[1],o=xWe.isArrayOrTypedArray(r)?xWe.mean(r):r,s=.5+o/100,l=1.5+o/100,u=["",""],c=[0,0];switch(a){case"top":u[0]="top",c[1]=-l;break;case"bottom":u[0]="bottom",c[1]=l;break}switch(i){case"left":u[1]="right",c[0]=-s;break;case"right":u[1]="left",c[0]=s;break}var f;return u[0]&&u[1]?f=u.join("-"):u[0]?f=u[0]:u[1]?f=u[1]:f="center",{anchor:f,offset:c}}});var SWe=fe((t6r,MWe)=>{"use strict";var TWe=aa(),nh=Xt(),ytr=Wa().BADNUM,rD=cM(),bWe=js(),xtr=ea(),_tr=lT(),nD=Is(),btr=nK().isSupportedFont,wtr=oK(),Ttr=Sd().appendArrayPointValue,Atr=as().NEWLINES,Mtr=as().BR_TAG_ALL;MWe.exports=function(t,r){var n=r[0].trace,a=n.visible===!0&&n._length!==0,i=n.fill!=="none",o=nD.hasLines(n),s=nD.hasMarkers(n),l=nD.hasText(n),u=s&&n.marker.symbol==="circle",c=s&&n.marker.symbol!=="circle",f=n.cluster&&n.cluster.enabled,v=tD("fill"),g=tD("line"),p=tD("circle"),x=tD("symbol"),_={fill:v,line:g,circle:p,symbol:x};if(!a)return _;var y;if((i||o)&&(y=rD.calcTraceToLineCoords(r)),i&&(v.geojson=rD.makePolygon(y),v.layout.visibility="visible",nh.extendFlat(v.paint,{"fill-color":n.fillcolor})),o&&(g.geojson=rD.makeLine(y),g.layout.visibility="visible",nh.extendFlat(g.paint,{"line-width":n.line.width,"line-color":n.line.color,"line-opacity":n.opacity})),u){var C=Str(r);p.geojson=C.geojson,p.layout.visibility="visible",f&&(p.filter=["!",["has","point_count"]],_.cluster={type:"circle",filter:["has","point_count"],layout:{visibility:"visible"},paint:{"circle-color":lK(n.cluster.color,n.cluster.step),"circle-radius":lK(n.cluster.size,n.cluster.step),"circle-opacity":lK(n.cluster.opacity,n.cluster.step)}},_.clusterCount={type:"symbol",filter:["has","point_count"],paint:{},layout:{"text-field":"{point_count_abbreviated}","text-font":wWe(n),"text-size":12}}),nh.extendFlat(p.paint,{"circle-color":C.mcc,"circle-radius":C.mrc,"circle-opacity":C.mo})}if(u&&f&&(p.filter=["!",["has","point_count"]]),(c||l)&&(x.geojson=Etr(r,t),nh.extendFlat(x.layout,{visibility:"visible","icon-image":"{symbol}","text-field":"{text}"}),c&&(nh.extendFlat(x.layout,{"icon-size":n.marker.size/10}),"angle"in n.marker&&n.marker.angle!=="auto"&&nh.extendFlat(x.layout,{"icon-rotate":{type:"identity",property:"angle"},"icon-rotation-alignment":"map"}),x.layout["icon-allow-overlap"]=n.marker.allowoverlap,nh.extendFlat(x.paint,{"icon-opacity":n.opacity*n.marker.opacity,"icon-color":n.marker.color,"icon-halo-color":n.marker.color,"icon-halo-width":2,"icon-halo-blur":1.5})),l)){var k=(n.marker||{}).size,S=wtr(n.textposition,k);nh.extendFlat(x.layout,{"text-size":n.textfont.size,"text-anchor":S.anchor,"text-offset":S.offset,"text-font":wWe(n)}),nh.extendFlat(x.paint,{"text-color":n.textfont.color,"text-opacity":n.opacity})}return _};function tD(e){return{type:e,geojson:rD.makeBlank(),layout:{visibility:"none"},filter:null,paint:{}}}function Str(e){var t=e[0].trace,r=t.marker,n=t.selectedpoints,a=nh.isArrayOrTypedArray(r.color),i=nh.isArrayOrTypedArray(r.size),o=nh.isArrayOrTypedArray(r.opacity),s;function l(k){return t.opacity*k}function u(k){return k/2}var c;a&&(bWe.hasColorscale(t,"marker")?c=bWe.makeColorScaleFuncFromTrace(r):c=nh.identity);var f;i&&(f=_tr(t));var v;o&&(v=function(k){var S=TWe(k)?+nh.constrain(k,0,1):0;return l(S)});var g=[];for(s=0;s850?s+=" Black":a>750?s+=" Extra Bold":a>650?s+=" Bold":a>550?s+=" Semi Bold":a>450?s+=" Medium":a>350?s+=" Regular":a>250?s+=" Light":a>150?s+=" Extra Light":s+=" Thin"):i.slice(0,2).join(" ")==="Open Sans"?(s="Open Sans",a>750?s+=" Extrabold":a>650?s+=" Bold":a>550?s+=" Semibold":a>350?s+=" Regular":s+=" Light"):i.slice(0,3).join(" ")==="Klokantech Noto Sans"&&(s="Klokantech Noto Sans",i[3]==="CJK"&&(s+=" CJK"),s+=a>500?" Bold":" Regular")),o&&(s+=" Italic"),s==="Open Sans Regular Italic"?s="Open Sans Italic":s==="Open Sans Regular Bold"?s="Open Sans Bold":s==="Open Sans Regular Bold Italic"?s="Open Sans Bold Italic":s==="Klokantech Noto Sans Regular Italic"&&(s="Klokantech Noto Sans Italic"),btr(s)||(s=r);var l=s.split(", ");return l}});var LWe=fe((r6r,CWe)=>{"use strict";var ktr=Xt(),EWe=SWe(),P5=zy().traceLayerPrefix,zv={cluster:["cluster","clusterCount","circle"],nonCluster:["fill","line","circle","symbol"]};function kWe(e,t,r,n){this.type="scattermap",this.subplot=e,this.uid=t,this.clusterEnabled=r,this.isHidden=n,this.sourceIds={fill:"source-"+t+"-fill",line:"source-"+t+"-line",circle:"source-"+t+"-circle",symbol:"source-"+t+"-symbol",cluster:"source-"+t+"-circle",clusterCount:"source-"+t+"-circle"},this.layerIds={fill:P5+t+"-fill",line:P5+t+"-line",circle:P5+t+"-circle",symbol:P5+t+"-symbol",cluster:P5+t+"-cluster",clusterCount:P5+t+"-cluster-count"},this.below=null}var JM=kWe.prototype;JM.addSource=function(e,t,r){var n={type:"geojson",data:t.geojson};r&&r.enabled&&ktr.extendFlat(n,{cluster:!0,clusterMaxZoom:r.maxzoom});var a=this.subplot.map.getSource(this.sourceIds[e]);a?a.setData(t.geojson):this.subplot.map.addSource(this.sourceIds[e],n)};JM.setSourceData=function(e,t){this.subplot.map.getSource(this.sourceIds[e]).setData(t.geojson)};JM.addLayer=function(e,t,r){var n={type:t.type,id:this.layerIds[e],source:this.sourceIds[e],layout:t.layout,paint:t.paint};t.filter&&(n.filter=t.filter);for(var a=this.layerIds[e],i,o=this.subplot.getMapLayers(),s=0;s=0;L--){var w=S[L];a.removeLayer(u.layerIds[w])}k||a.removeSource(u.sourceIds.circle)}function v(k){for(var S=zv.nonCluster,L=0;L=0;L--){var w=S[L];a.removeLayer(u.layerIds[w]),k||a.removeSource(u.sourceIds[w])}}function p(k){l?f(k):g(k)}function x(k){s?c(k):v(k)}function _(){for(var k=s?zv.cluster:zv.nonCluster,S=0;S=0;n--){var a=r[n];t.removeLayer(this.layerIds[a]),t.removeSource(this.sourceIds[a])}};CWe.exports=function(t,r){var n=r[0].trace,a=n.cluster&&n.cluster.enabled,i=n.visible!==!0,o=new kWe(t,n.uid,a,i),s=EWe(t.gd,r),l=o.below=t.belowLookup["trace-"+n.uid],u,c,f;if(a)for(o.addSource("circle",s.circle,n.cluster),u=0;u{"use strict";var Ctr=kl(),uK=Xt(),Ltr=_3(),Ptr=uK.fillText,Ftr=Wa().BADNUM,Dtr=zy().traceLayerPrefix;function Rtr(e,t,r){var n=e.cd,a=n[0].trace,i=e.xa,o=e.ya,s=e.subplot,l=[],u=Dtr+a.uid+"-circle",c=a.cluster&&a.cluster.enabled;if(c){var f=s.map.queryRenderedFeatures(null,{layers:[u]});l=f.map(function(T){return T.id})}var v=t>=0?Math.floor((t+180)/360):Math.ceil((t-180)/360),g=v*360,p=t-g;function x(T){var m=T.lonlat;if(m[0]===Ftr||c&&l.indexOf(T.i+1)===-1)return 1/0;var F=uK.modHalf(m[0],360),E=m[1],I=s.project([F,E]),R=I.x-i.c2p([p,E]),B=I.y-o.c2p([F,r]),O=Math.max(3,T.mrc||0);return Math.max(Math.sqrt(R*R+B*B)-O,1-3/O)}if(Ctr.getClosest(n,x,e),e.index!==!1){var _=n[e.index],y=_.lonlat,C=[uK.modHalf(y[0],360)+g,y[1]],k=i.c2p(C),S=o.c2p(C),L=_.mrc||1;e.x0=k-L,e.x1=k+L,e.y0=S-L,e.y1=S+L;var w={};w[a.subplot]={_subplot:s};var A=a._module.formatLabels(_,a,w);return e.lonLabel=A.lonLabel,e.latLabel=A.latLabel,e.color=Ltr(a,_),e.extraText=PWe(a,_,n[0].t.labels),e.hovertemplate=a.hovertemplate,[e]}}function PWe(e,t,r){if(e.hovertemplate)return;var n=t.hi||e.hoverinfo,a=n.split("+"),i=a.indexOf("all")!==-1,o=a.indexOf("lon")!==-1,s=a.indexOf("lat")!==-1,l=t.lonlat,u=[];function c(f){return f+"\xB0"}return i||o&&s?u.push("("+c(l[1])+", "+c(l[0])+")"):o?u.push(r.lon+c(l[0])):s&&u.push(r.lat+c(l[1])),(i||a.indexOf("text")!==-1)&&Ptr(t,e,u),u.join("
")}FWe.exports={hoverPoints:Rtr,getExtraText:PWe}});var RWe=fe((i6r,DWe)=>{"use strict";DWe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t}});var zWe=fe((a6r,IWe)=>{"use strict";var Itr=Xt(),ztr=Is(),{BADNUM:qtr}=Wa();IWe.exports=function(t,r){var c;let{cd:n,xaxis:a,yaxis:i}=t,{trace:o}=n[0];if(!ztr.hasMarkers(o))return[];if(r===!1){for(let f of n)f.selected=0;return[]}let s=(c=a._subplot)==null?void 0:c.map,l=s!=null&&s.getRenderWorldCopies()&&r.xmax>r.xmin?s.transform.worldSize:0,u=[];for(let f=0;f{(function(e,t){typeof cK=="object"&&typeof fK!="undefined"?fK.exports=t():(e=typeof globalThis!="undefined"?globalThis:e||self,e.maplibregl=t())})(cK,(function(){"use strict";var e={},t={};function r(a,i,o){if(t[a]=o,a==="index"){var s="var sharedModule = {}; ("+t.shared+")(sharedModule); ("+t.worker+")(sharedModule);",l={};return t.shared(l),t.index(e,l),typeof window!="undefined"&&e.setWorkerUrl(window.URL.createObjectURL(new Blob([s],{type:"text/javascript"}))),e}}r("shared",["exports"],(function(a){"use strict";function i(M,h,b,D){return new(b||(b=Promise))((function(z,G){function X(Q){try{re(D.next(Q))}catch(he){G(he)}}function Z(Q){try{re(D.throw(Q))}catch(he){G(he)}}function re(Q){var he;Q.done?z(Q.value):(he=Q.value,he instanceof b?he:new b((function(oe){oe(he)}))).then(X,Z)}re((D=D.apply(M,h||[])).next())}))}function o(M,h){this.x=M,this.y=h}function s(M){return M&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M}var l,u;typeof SuppressedError=="function"&&SuppressedError,o.prototype={clone(){return new o(this.x,this.y)},add(M){return this.clone()._add(M)},sub(M){return this.clone()._sub(M)},multByPoint(M){return this.clone()._multByPoint(M)},divByPoint(M){return this.clone()._divByPoint(M)},mult(M){return this.clone()._mult(M)},div(M){return this.clone()._div(M)},rotate(M){return this.clone()._rotate(M)},rotateAround(M,h){return this.clone()._rotateAround(M,h)},matMult(M){return this.clone()._matMult(M)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(M){return this.x===M.x&&this.y===M.y},dist(M){return Math.sqrt(this.distSqr(M))},distSqr(M){let h=M.x-this.x,b=M.y-this.y;return h*h+b*b},angle(){return Math.atan2(this.y,this.x)},angleTo(M){return Math.atan2(this.y-M.y,this.x-M.x)},angleWith(M){return this.angleWithSep(M.x,M.y)},angleWithSep(M,h){return Math.atan2(this.x*h-this.y*M,this.x*M+this.y*h)},_matMult(M){let h=M[2]*this.x+M[3]*this.y;return this.x=M[0]*this.x+M[1]*this.y,this.y=h,this},_add(M){return this.x+=M.x,this.y+=M.y,this},_sub(M){return this.x-=M.x,this.y-=M.y,this},_mult(M){return this.x*=M,this.y*=M,this},_div(M){return this.x/=M,this.y/=M,this},_multByPoint(M){return this.x*=M.x,this.y*=M.y,this},_divByPoint(M){return this.x/=M.x,this.y/=M.y,this},_unit(){return this._div(this.mag()),this},_perp(){let M=this.y;return this.y=this.x,this.x=-M,this},_rotate(M){let h=Math.cos(M),b=Math.sin(M),D=b*this.x+h*this.y;return this.x=h*this.x-b*this.y,this.y=D,this},_rotateAround(M,h){let b=Math.cos(M),D=Math.sin(M),z=h.y+D*(this.x-h.x)+b*(this.y-h.y);return this.x=h.x+b*(this.x-h.x)-D*(this.y-h.y),this.y=z,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:o},o.convert=function(M){if(M instanceof o)return M;if(Array.isArray(M))return new o(+M[0],+M[1]);if(M.x!==void 0&&M.y!==void 0)return new o(+M.x,+M.y);throw new Error("Expected [x, y] or {x, y} point format")};var c=(function(){if(u)return l;function M(h,b,D,z){this.cx=3*h,this.bx=3*(D-h)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*b,this.by=3*(z-b)-this.cy,this.ay=1-this.cy-this.by,this.p1x=h,this.p1y=b,this.p2x=D,this.p2y=z}return u=1,l=M,M.prototype={sampleCurveX:function(h){return((this.ax*h+this.bx)*h+this.cx)*h},sampleCurveY:function(h){return((this.ay*h+this.by)*h+this.cy)*h},sampleCurveDerivativeX:function(h){return(3*this.ax*h+2*this.bx)*h+this.cx},solveCurveX:function(h,b){if(b===void 0&&(b=1e-6),h<0)return 0;if(h>1)return 1;for(var D=h,z=0;z<8;z++){var G=this.sampleCurveX(D)-h;if(Math.abs(G)G?Z=D:re=D,D=.5*(re-Z)+Z;return D},solve:function(h,b){return this.sampleCurveY(this.solveCurveX(h,b))}},l})(),f=s(c);let v,g;function p(){return v!=null||(v=typeof OffscreenCanvas!="undefined"&&new OffscreenCanvas(1,1).getContext("2d")&&typeof createImageBitmap=="function"),v}function x(){if(g==null&&(g=!1,p())){let h=new OffscreenCanvas(5,5).getContext("2d",{willReadFrequently:!0});if(h){for(let D=0;D<25;D++){let z=4*D;h.fillStyle=`rgb(${z},${z+1},${z+2})`,h.fillRect(D%5,Math.floor(D/5),1,1)}let b=h.getImageData(0,0,5,5).data;for(let D=0;D<100;D++)if(D%4!=3&&b[D]!==D){g=!0;break}}}return g||!1}var _=1e-6,y=typeof Float32Array!="undefined"?Float32Array:Array;function C(){var M=new y(9);return y!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[5]=0,M[6]=0,M[7]=0),M[0]=1,M[4]=1,M[8]=1,M}function k(M){return M[0]=1,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=1,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=1,M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M}function S(){var M=new y(3);return y!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0),M}function L(M){var h=M[0],b=M[1],D=M[2];return Math.sqrt(h*h+b*b+D*D)}function w(M,h,b){var D=new y(3);return D[0]=M,D[1]=h,D[2]=b,D}function A(M,h,b){return M[0]=h[0]+b[0],M[1]=h[1]+b[1],M[2]=h[2]+b[2],M}function T(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M[2]=h[2]*b,M}function m(M,h,b){var D=h[0],z=h[1],G=h[2],X=b[0],Z=b[1],re=b[2];return M[0]=z*re-G*Z,M[1]=G*X-D*re,M[2]=D*Z-z*X,M}var F,E=L;function I(M,h,b){var D=h[0],z=h[1],G=h[2],X=h[3];return M[0]=b[0]*D+b[4]*z+b[8]*G+b[12]*X,M[1]=b[1]*D+b[5]*z+b[9]*G+b[13]*X,M[2]=b[2]*D+b[6]*z+b[10]*G+b[14]*X,M[3]=b[3]*D+b[7]*z+b[11]*G+b[15]*X,M}function R(){var M=new y(4);return y!=Float32Array&&(M[0]=0,M[1]=0,M[2]=0),M[3]=1,M}function B(M,h,b,D){var z=arguments.length>4&&arguments[4]!==void 0?arguments[4]:"zyx",G=Math.PI/360;h*=G,D*=G,b*=G;var X=Math.sin(h),Z=Math.cos(h),re=Math.sin(b),Q=Math.cos(b),he=Math.sin(D),oe=Math.cos(D);switch(z){case"xyz":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"xzy":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe+X*re*he;break;case"yxz":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe-X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe+X*re*he;break;case"yzx":M[0]=X*Q*oe+Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"zxy":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he+X*re*oe,M[3]=Z*Q*oe-X*re*he;break;case"zyx":M[0]=X*Q*oe-Z*re*he,M[1]=Z*re*oe+X*Q*he,M[2]=Z*Q*he-X*re*oe,M[3]=Z*Q*oe+X*re*he;break;default:throw new Error("Unknown angle order "+z)}return M}function O(){var M=new y(2);return y!=Float32Array&&(M[0]=0,M[1]=0),M}function V(M,h){var b=new y(2);return b[0]=M,b[1]=h,b}S(),F=new y(4),y!=Float32Array&&(F[0]=0,F[1]=0,F[2]=0,F[3]=0),S(),w(1,0,0),w(0,1,0),R(),R(),C(),O();let j=8192;function q(M,h,b){return h*(j/(M.tileSize*Math.pow(2,b-M.tileID.overscaledZ)))}function U(M){return M instanceof Error?M:new Error(typeof M=="string"?M:String(M))}function J(M,h){return(M%h+h)%h}function ee(M,h,b){return M*(1-b)+h*b}function ce(M){if(M<=0)return 0;if(M>=1)return 1;let h=M*M,b=h*M;return 4*(M<.5?b:3*(M-h)+b-.75)}function ye(M,h,b,D){let z=new f(M,h,b,D);return G=>z.solve(G)}let xe=ye(.25,.1,.25,1);function ue(M,h,b){return Math.min(b,Math.max(h,M))}function K(M,h,b){let D=b-h,z=((M-h)%D+D)%D+h;return z===h?b:z}function _e(M,...h){for(let b of h)for(let D in b)M[D]=b[D];return M}let ne=1;function ae(M,h,b){let D={};for(let z in M)D[z]=h.call(this,M[z],z,M);return D}function pe(M,h,b){let D={};for(let z in M)h.call(this,M[z],z,M)&&(D[z]=M[z]);return D}function ie(M){return Array.isArray(M)?M.map(ie):typeof M=="object"&&M?ae(M,ie):M}let le={};function me(M){le[M]||(typeof console!="undefined"&&console.warn(M),le[M]=!0)}function be(M,h,b){return(b.y-M.y)*(h.x-M.x)>(h.y-M.y)*(b.x-M.x)}function De(M){return typeof WorkerGlobalScope!="undefined"&&M!==void 0&&M instanceof WorkerGlobalScope}let Ge=null;function ht(M){return typeof ImageBitmap!="undefined"&&M instanceof ImageBitmap}let it="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAAC0lEQVQYV2NgAAIAAAUAAarVyFEAAAAASUVORK5CYII=";function Oe(M,h,b,D,z){return i(this,void 0,void 0,(function*(){if(typeof VideoFrame=="undefined")throw new Error("VideoFrame not supported");let G=new VideoFrame(M,{timestamp:0});try{let X=G==null?void 0:G.format;if(!X||!X.startsWith("BGR")&&!X.startsWith("RGB"))throw new Error(`Unrecognized format ${X}`);let Z=X.startsWith("BGR"),re=new Uint8ClampedArray(D*z*4);if(yield G.copyTo(re,(function(Q,he,oe,ke,ge){let Ue=4*Math.max(-he,0),je=(Math.max(0,oe)-oe)*ke*4+Ue,vt=4*ke,gt=Math.max(0,he),It=Math.max(0,oe);return{rect:{x:gt,y:It,width:Math.min(Q.width,he+ke)-gt,height:Math.min(Q.height,oe+ge)-It},layout:[{offset:je,stride:vt}]}})(M,h,b,D,z)),Z)for(let Q=0;Q{M.removeEventListener(h,b,D)}}}function qe(M){return M*Math.PI/180}function we(M){return M/Math.PI*180}let Le={touchstart:!0,touchmove:!0,touchmoveWindow:!0,touchend:!0,touchcancel:!0},Ke={dblclick:!0,click:!0,mouseover:!0,mouseout:!0,mousedown:!0,mousemove:!0,mousemoveWindow:!0,mouseup:!0,mouseupWindow:!0,contextmenu:!0,wheel:!0},Te="AbortError";class Ve extends Error{constructor(h=Te){super(h instanceof Error?h.message:h),this.name=Te,h instanceof Error&&h.stack&&(this.stack=h.stack)}}function $e(M){return M instanceof Error&&M.name===Te}function ot(M){if(M.aborted)throw new Ve(M.reason)}let tt={MAX_PARALLEL_IMAGE_REQUESTS:16,MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:8,MAX_TILE_CACHE_ZOOM_LEVELS:5,REGISTERED_PROTOCOLS:{},WORKER_URL:""};function nt(M){return tt.REGISTERED_PROTOCOLS[M.substring(0,M.indexOf("://"))]}let We="global-dispatcher";class mt extends Error{constructor(h,b,D,z){super(`AJAXError: ${b} (${h}): ${D}`),this.status=h,this.statusText=b,this.url=D,this.body=z}}let bt=()=>{var M;return De(self)?(M=self.worker)===null||M===void 0?void 0:M.referrer:(window.location.protocol==="blob:"?window.parent:window).location.href},Yt=function(M,h){return i(this,void 0,void 0,(function*(){var b,D;if(M.url.includes("://")&&!/^https?:|^file:/.test(M.url)){let z=nt(M.url);if(z){let G=yield z(M,h);return G.data||M.type!=="arrayBuffer"?G:_e(G,{data:new ArrayBuffer(0)})}if(De(self)&&(!((b=self.worker)===null||b===void 0)&&b.actor))return self.worker.actor.sendAsync({type:"GR",data:M,targetMapId:We},h)}if(!(z=>{var G;return z.startsWith("file:")||((G=bt())===null||G===void 0?void 0:G.startsWith("file:"))&&!/^\w+:/.test(z)})(M.url)){if(fetch&&Request&&AbortController&&Object.hasOwn(Request.prototype,"signal"))return(function(z,G){return i(this,void 0,void 0,(function*(){let X=new Request(z.url,{method:z.method||"GET",body:z.body,credentials:z.credentials,headers:z.headers,cache:z.cache,referrer:bt(),referrerPolicy:z.referrerPolicy,signal:G.signal}),Z,re;z.type!=="json"||X.headers.has("Accept")||X.headers.set("Accept","application/json");try{Z=yield fetch(X)}catch(he){throw $e(he)?he:new mt(0,U(he).message,z.url,new Blob)}if(!Z.ok){let he=yield Z.blob();throw new mt(Z.status,Z.statusText,z.url,he)}re=z.type==="arrayBuffer"||z.type==="image"?Z.arrayBuffer():z.type==="json"?Z.json():Z.text();let Q=yield re;return ot(G.signal),{data:Q,cacheControl:Z.headers.get("Cache-Control"),expires:Z.headers.get("Expires"),etag:Z.headers.get("ETag")}}))})(M,h);if(De(self)&&(!((D=self.worker)===null||D===void 0)&&D.actor))return self.worker.actor.sendAsync({type:"GR",data:M,mustQueue:!0,targetMapId:We},h)}return(function(z,G){return new Promise(((X,Z)=>{var re;let Q=new XMLHttpRequest;Q.open(z.method||"GET",z.url,!0),z.type!=="arrayBuffer"&&z.type!=="image"||(Q.responseType="arraybuffer");for(let he in z.headers)Q.setRequestHeader(he,z.headers[he]);z.type==="json"&&(Q.responseType="text",!((re=z.headers)===null||re===void 0)&&re.Accept||Q.setRequestHeader("Accept","application/json")),Q.withCredentials=z.credentials==="include",Q.onerror=()=>{Z(new Error(Q.statusText))},Q.onload=()=>{if(!G.signal.aborted)if((Q.status>=200&&Q.status<300||Q.status===0)&&Q.response!==null){let he=Q.response;if(z.type==="json")try{he=JSON.parse(Q.response)}catch(oe){return void Z(oe)}X({data:he,cacheControl:Q.getResponseHeader("Cache-Control"),expires:Q.getResponseHeader("Expires"),etag:Q.getResponseHeader("ETag")})}else{let he=new Blob([Q.response],{type:Q.getResponseHeader("Content-Type")});Z(new mt(Q.status,Q.statusText,z.url,he))}},G.signal.addEventListener("abort",(()=>{Q.abort(),Z(new Ve(G.signal.reason))})),Q.send(z.body)}))})(M,h)}))};function jt(M){if(!M||M.indexOf("://")<=0||M.startsWith("data:image/")||M.startsWith("blob:"))return!0;let h=new URL(M),b=window.location;return h.protocol===b.protocol&&h.host===b.host}function mr(M,h,b){var D;!((D=b[M])===null||D===void 0)&&D.includes(h)||(b[M]||(b[M]=[]),b[M].push(h))}function or(M,h,b){if(b!=null&&b[M]){let D=b[M].indexOf(h);D!==-1&&b[M].splice(D,1)}}class fr{constructor(h,b={}){_e(this,b),this.type=h}}class Ot extends fr{constructor(h,b={}){super("error",_e({error:h},b))}}class cr{on(h,b){return this._listeners||(this._listeners={}),mr(h,b,this._listeners),{unsubscribe:()=>{this.off(h,b)}}}off(h,b){return or(h,b,this._listeners),or(h,b,this._oneTimeListeners),this}once(h,b){return b?(this._oneTimeListeners||(this._oneTimeListeners={}),mr(h,b,this._oneTimeListeners),this):new Promise((D=>this.once(h,D)))}fire(h,b){var D,z;typeof h=="string"&&(h=new fr(h,b||{}));let G=h.type;if(this.listens(G)){h.target=this;let X=!((D=this._listeners)===null||D===void 0)&&D[G]?this._listeners[G].slice():[];for(let Q of X)Q.call(this,h);let Z=!((z=this._oneTimeListeners)===null||z===void 0)&&z[G]?this._oneTimeListeners[G].slice():[];for(let Q of Z)or(G,Q,this._oneTimeListeners),Q.call(this,h);let re=this._eventedParent;re&&(_e(h,typeof this._eventedParentData=="function"?this._eventedParentData():this._eventedParentData),re.fire(h))}else h instanceof Ot&&console.error(h.error);return this}listens(h){var b,D,z,G,X;return((D=(b=this._listeners)===null||b===void 0?void 0:b[h])===null||D===void 0?void 0:D.length)>0||((G=(z=this._oneTimeListeners)===null||z===void 0?void 0:z[h])===null||G===void 0?void 0:G.length)>0||((X=this._eventedParent)===null||X===void 0?void 0:X.listens(h))}setEventedParent(h,b){return this._eventedParent=h,this._eventedParentData=b,this}}var Ct={$version:8,$root:{version:{required:!0,type:"enum",values:[8]},name:{type:"string"},metadata:{type:"*"},center:{type:"array",value:"number",length:2},centerAltitude:{type:"number"},zoom:{type:"number"},bearing:{type:"number",default:0,period:360,units:"degrees"},pitch:{type:"number",default:0,units:"degrees"},roll:{type:"number",default:0,units:"degrees"},state:{type:"state",default:{}},light:{type:"light"},sky:{type:"sky"},projection:{type:"projection"},terrain:{type:"terrain"},sources:{required:!0,type:"sources"},sprite:{type:"sprite"},glyphs:{type:"string"},"font-faces":{type:"fontFaces"},transition:{type:"transition"},layers:{required:!0,type:"array",value:"layer"}},sources:{"*":{type:"source"}},source:["source_vector","source_raster","source_raster_dem","source_geojson","source_video","source_image"],source_vector:{type:{required:!0,type:"enum",values:{vector:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},attribution:{type:"string"},promoteId:{type:"promoteId"},volatile:{type:"boolean",default:!1},encoding:{type:"enum",values:{mvt:{},mlt:{}},default:"mvt"},"*":{type:"*"}},source_raster:{type:{required:!0,type:"enum",values:{raster:{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},scheme:{type:"enum",values:{xyz:{},tms:{}},default:"xyz"},attribution:{type:"string"},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_raster_dem:{type:{required:!0,type:"enum",values:{"raster-dem":{}}},url:{type:"string"},tiles:{type:"array",value:"string"},bounds:{type:"array",value:"number",length:4,default:[-180,-85.051129,180,85.051129]},minzoom:{type:"number",default:0},maxzoom:{type:"number",default:22},tileSize:{type:"number",default:512,units:"pixels"},attribution:{type:"string"},encoding:{type:"enum",values:{terrarium:{},mapbox:{},custom:{}},default:"mapbox"},redFactor:{type:"number",default:1},blueFactor:{type:"number",default:1},greenFactor:{type:"number",default:1},baseShift:{type:"number",default:0},volatile:{type:"boolean",default:!1},"*":{type:"*"}},source_geojson:{type:{required:!0,type:"enum",values:{geojson:{}}},data:{required:!0,type:"*"},maxzoom:{type:"number",default:18},attribution:{type:"string"},buffer:{type:"number",default:128,maximum:512,minimum:0},filter:{type:"filter"},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"}},source_video:{type:{required:!0,type:"enum",values:{video:{}}},urls:{required:!0,type:"array",value:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},source_image:{type:{required:!0,type:"enum",values:{image:{}}},url:{required:!0,type:"string"},coordinates:{required:!0,type:"array",length:4,value:{type:"array",length:2,value:"number"}}},layer:{id:{type:"string",required:!0},type:{type:"enum",values:{fill:{},line:{},symbol:{},circle:{},heatmap:{},"fill-extrusion":{},raster:{},hillshade:{},"color-relief":{},background:{}},required:!0},metadata:{type:"*"},source:{type:"string"},"source-layer":{type:"string"},minzoom:{type:"number",minimum:0,maximum:24},maxzoom:{type:"number",minimum:0,maximum:24},filter:{type:"filter"},layout:{type:"layout"},paint:{type:"paint"}},layout:["layout_fill","layout_line","layout_circle","layout_heatmap","layout_fill-extrusion","layout_symbol","layout_raster","layout_hillshade","layout_color-relief","layout_background"],layout_background:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_fill:{"fill-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_circle:{"circle-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_heatmap:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_fill-extrusion":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_line:{"line-cap":{type:"enum",values:{butt:{},round:{},square:{}},default:"butt",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"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","feature"]},"property-type":"data-driven"},"line-round-limit":{type:"number",default:1.05,requires:[{"line-join":"round"}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"line-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_symbol:{"symbol-placement":{type:"enum",values:{point:{},line:{},"line-center":{}},default:"point",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-spacing":{type:"number",default:250,minimum:1,units:"pixels",requires:[{"symbol-placement":"line"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"symbol-avoid-edges":{type:"boolean",default:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"symbol-sort-key":{type:"number",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},"symbol-z-order":{type:"enum",values:{auto:{},"viewport-y":{},source:{}},default:"auto",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-allow-overlap":{type:"boolean",default:!1,requires:["icon-image",{"!":"icon-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"icon-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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:"padding",default:[2],units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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:{},"viewport-glyph":{},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-variable-anchor-offset":{type:"variableAnchorOffsetCollection",requires:["text-field",{"symbol-placement":["point"]}],expression:{interpolated:!0,parameters:["zoom","feature"]},"property-type":"data-driven"},"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",{"!":"text-overlap"}],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-overlap":{type:"enum",values:{never:{},always:{},cooperative:{}},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",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_raster:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},layout_hillshade:{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},"layout_color-relief":{visibility:{type:"enum",values:{visible:{},none:{}},default:"visible",expression:{interpolated:!1,parameters:["global-state"]},"property-type":"data-constant"}},filter:{type:"boolean",expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"data-driven"},filter_operator:{type:"enum",values:{"==":{},"!=":{},">":{},">=":{},"<":{},"<=":{},in:{},"!in":{},all:{},any:{},none:{},has:{},"!has":{}}},geometry_type:{type:"enum",values:{Point:{},LineString:{},Polygon:{}}},function:{expression:{type:"expression"},stops:{type:"array",value:"function_stop"},base:{type:"number",default:1,minimum:0},property:{type:"string",default:"$zoom"},type:{type:"enum",values:{identity:{},exponential:{},interval:{},categorical:{}},default:"exponential"},colorSpace:{type:"enum",values:{rgb:{},lab:{},hcl:{}},default:"rgb"},default:{type:"*",required:!1}},function_stop:{type:"array",minimum:0,maximum:24,value:["number","color"],length:2},expression:{type:"array",value:"expression_name",minimum:1},light:{anchor:{type:"enum",default:"viewport",values:{map:{},viewport:{}},"property-type":"data-constant",transition:!1,expression:{interpolated:!1,parameters:["zoom"]}},position:{type:"array",default:[1.15,210,30],length:3,value:"number","property-type":"data-constant",transition:!0,expression:{interpolated:!0,parameters:["zoom"]}},color:{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},intensity:{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},sky:{"sky-color":{type:"color","property-type":"data-constant",default:"#88C6FC",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-color":{type:"color","property-type":"data-constant",default:"#ffffff",expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"fog-ground-blend":{type:"number","property-type":"data-constant",default:.5,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"horizon-fog-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"sky-horizon-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0},"atmosphere-blend":{type:"number","property-type":"data-constant",default:.8,minimum:0,maximum:1,expression:{interpolated:!0,parameters:["zoom"]},transition:!0}},terrain:{source:{type:"string",required:!0},exaggeration:{type:"number",minimum:0,default:1}},projection:{type:{type:"projectionDefinition",default:"mercator","property-type":"data-constant",transition:!1,expression:{interpolated:!0,parameters:["zoom"]}}},paint:["paint_fill","paint_line","paint_circle","paint_heatmap","paint_fill-extrusion","paint_symbol","paint_raster","paint_hillshade","paint_color-relief","paint_background"],paint_fill:{"fill-antialias":{type:"boolean",default:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-outline-color":{type:"color",transition:!0,requires:[{"!":"fill-pattern"},{"fill-antialias":!0}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"}},"paint_fill-extrusion":{"fill-extrusion-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"fill-extrusion-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["fill-extrusion-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"fill-extrusion-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"fill-extrusion-height":{type:"number",default:0,minimum:0,units:"meters",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-base":{type:"number",default:0,minimum:0,units:"meters",transition:!0,requires:["fill-extrusion-height"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"fill-extrusion-vertical-gradient":{type:"boolean",default:!0,transition:!1,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_line:{"line-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"line-pattern"}],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"line-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["line-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"line-width":{type:"number",default:1,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-gap-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-offset":{type:"number",default:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"line-dasharray":{type:"array",value:"number",minimum:0,transition:!0,units:"line widths",requires:[{"!":"line-pattern"}],expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom","feature"]},"property-type":"cross-faded-data-driven"},"line-gradient":{type:"color",transition:!1,requires:[{"!":"line-dasharray"},{"!":"line-pattern"},{source:"geojson",has:{lineMetrics:!0}}],expression:{interpolated:!0,parameters:["line-progress"]},"property-type":"color-ramp"}},paint_circle:{"circle-radius":{type:"number",default:5,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-blur":{type:"number",default:0,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"circle-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["circle-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-scale":{type:"enum",values:{map:{},viewport:{}},default:"map",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-pitch-alignment":{type:"enum",values:{map:{},viewport:{}},default:"viewport",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"circle-stroke-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-color":{type:"color",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"circle-stroke-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"}},paint_heatmap:{"heatmap-radius":{type:"number",default:30,minimum:1,transition:!0,units:"pixels",expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-weight":{type:"number",default:1,minimum:0,transition:!1,expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"heatmap-intensity":{type:"number",default:1,minimum:0,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"heatmap-color":{type:"color",default:["interpolate",["linear"],["heatmap-density"],0,"rgba(0, 0, 255, 0)",.1,"royalblue",.3,"cyan",.5,"lime",.7,"yellow",1,"red"],transition:!1,expression:{interpolated:!0,parameters:["heatmap-density"]},"property-type":"color-ramp"},"heatmap-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_symbol:{"icon-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-color":{type:"color",default:"#000000",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"icon-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["icon-image"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"icon-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["icon-image","icon-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"text-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-color":{type:"color",default:"#000000",transition:!0,overridable:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-color":{type:"color",default:"rgba(0, 0, 0, 0)",transition:!0,requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-width":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-halo-blur":{type:"number",default:0,minimum:0,transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom","feature","feature-state"]},"property-type":"data-driven"},"text-translate":{type:"array",value:"number",length:2,default:[0,0],transition:!0,units:"pixels",requires:["text-field"],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"text-translate-anchor":{type:"enum",values:{map:{},viewport:{}},default:"map",requires:["text-field","text-translate"],expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_raster:{"raster-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-hue-rotate":{type:"number",default:0,period:360,transition:!0,units:"degrees",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-min":{type:"number",default:0,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-brightness-max":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-saturation":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"raster-contrast":{type:"number",default:0,minimum:-1,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-resampling":{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},"raster-fade-duration":{type:"number",default:300,minimum:0,transition:!1,units:"milliseconds",expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},paint_hillshade:{"hillshade-illumination-direction":{type:"numberArray",default:335,minimum:0,maximum:359,transition:!1,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-illumination-altitude":{type:"numberArray",default:45,minimum:0,maximum:90,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:"colorArray",default:"#000000",transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"hillshade-highlight-color":{type:"colorArray",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"},"hillshade-method":{type:"enum",values:{standard:{},basic:{},combined:{},igor:{},multidirectional:{}},default:"standard",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},"paint_color-relief":{"color-relief-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"color-relief-color":{type:"color",transition:!1,expression:{interpolated:!0,parameters:["elevation"]},"property-type":"color-ramp"},resampling:{type:"enum",values:{linear:{},nearest:{}},default:"linear",expression:{interpolated:!1,parameters:["zoom"]},"property-type":"data-constant"}},paint_background:{"background-color":{type:"color",default:"#000000",transition:!0,requires:[{"!":"background-pattern"}],expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"},"background-pattern":{type:"resolvedImage",transition:!0,expression:{interpolated:!1,parameters:["zoom"]},"property-type":"cross-faded"},"background-opacity":{type:"number",default:1,minimum:0,maximum:1,transition:!0,expression:{interpolated:!0,parameters:["zoom"]},"property-type":"data-constant"}},transition:{duration:{type:"number",default:300,minimum:0,units:"milliseconds"},delay:{type:"number",default:0,minimum:0,units:"milliseconds"}},"property-type":{"data-driven":{type:"property-type"},"cross-faded":{type:"property-type"},"cross-faded-data-driven":{type:"property-type"},"color-ramp":{type:"property-type"},"data-constant":{type:"property-type"},constant:{type:"property-type"}},promoteId:{"*":{type:"string"}},interpolation:{type:"array",value:"interpolation_name",minimum:1},interpolation_name:{type:"enum",values:{linear:{syntax:{overloads:[{parameters:[],"output-type":"interpolation"}],parameters:[]}},exponential:{syntax:{overloads:[{parameters:["base"],"output-type":"interpolation"}],parameters:[{name:"base",type:"number literal"}]}},"cubic-bezier":{syntax:{overloads:[{parameters:["x1","y1","x2","y2"],"output-type":"interpolation"}],parameters:[{name:"x1",type:"number literal"},{name:"y1",type:"number literal"},{name:"x2",type:"number literal"},{name:"y2",type:"number literal"}]}}}}};let wt=["type","source","source-layer","minzoom","maxzoom","filter","layout"];function Tt(M,h){let b={};for(let D in M)D!=="ref"&&(b[D]=M[D]);return wt.forEach((D=>{D in h&&(b[D]=h[D])})),b}function Mt(M,h){if(Array.isArray(M)){if(!Array.isArray(h)||M.length!==h.length)return!1;for(let b=0;b`:M.itemType.kind==="value"?"array":`array<${h}>`}return M.kind}let oa=[Dt,At,Vt,Qt,Ut,_r,ri,rn,va(Jr),Jn,Vi,Ii,ra,ha];function Ma(M,h){if(h.kind==="error")return null;if(M.kind==="array"){if(h.kind==="array"&&(h.N===0&&h.itemType.kind==="value"||!Ma(M.itemType,h.itemType))&&(typeof M.N!="number"||M.N===h.N))return null}else{if(M.kind===h.kind)return null;if(M.kind==="value"){for(let b of oa)if(!Ma(b,h))return null}}return`Expected ${Xi(M)} but found ${Xi(h)} instead.`}function Ga(M,h){return h.some((b=>b.kind===M.kind))}function ss(M,h){return h.some((b=>b==="null"?M===null:b==="array"?Array.isArray(M):b==="object"?M&&!Array.isArray(M)&&typeof M=="object":b===typeof M))}function mo(M,h){return M.kind==="array"&&h.kind==="array"?M.itemType.kind===h.itemType.kind&&typeof M.N=="number":M.kind===h.kind}let sl=.96422,Eo=.82521,ao=4/29,Da=6/29,bl=3*Da*Da,bo=Da*Da*Da,Zs=Math.PI/180,su=180/Math.PI;function fc(M){return(M%=360)<0&&(M+=360),M}function Af([M,h,b,D]){let z,G,X=Jt((.2225045*(M=ut(M))+.7168786*(h=ut(h))+.0606169*(b=ut(b)))/1);M===h&&h===b?z=G=X:(z=Jt((.4360747*M+.3850649*h+.1430804*b)/sl),G=Jt((.0139322*M+.0971045*h+.7141733*b)/Eo));let Z=116*X-16;return[Z<0?0:Z,500*(z-X),200*(X-G),D]}function ut(M){return M<=.04045?M/12.92:Math.pow((M+.055)/1.055,2.4)}function Jt(M){return M>bo?Math.pow(M,1/3):M/bl+ao}function er([M,h,b,D]){let z=(M+16)/116,G=isNaN(h)?z:z+h/500,X=isNaN(b)?z:z-b/200;return z=1*nn(z),G=sl*nn(G),X=Eo*nn(X),[wr(3.1338561*G-1.6168667*z-.4906146*X),wr(-.9787684*G+1.9161415*z+.033454*X),wr(.0719453*G-.2289914*z+1.4052427*X),D]}function wr(M){return(M=M<=.00304?12.92*M:1.055*Math.pow(M,1/2.4)-.055)<0?0:M>1?1:M}function nn(M){return M>Da?M*M*M:bl*(M-ao)}let Dr=Object.hasOwn||function(M,h){return Object.prototype.hasOwnProperty.call(M,h)};function bn(M,h){return Dr(M,h)?M[h]:void 0}function Yr(M){return parseInt(M.padEnd(2,M),16)/255}function Tn(M,h){return Kn(h?M/100:M,0,1)}function Kn(M,h,b){return Math.min(Math.max(h,M),b)}function Qn(M){return!M.some(Number.isNaN)}let Ai={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]};function Ji(M,h,b){return M+b*(h-M)}function Ra(M,h,b){return M.map(((D,z)=>Ji(D,h[z],b)))}class ii{constructor(h,b,D,z=1,G=!0){this.r=h,this.g=b,this.b=D,this.a=z,G||(this.r*=z,this.g*=z,this.b*=z,z||this.overwriteGetter("rgb",[h,b,D,z]))}static parse(h){if(h instanceof ii)return h;if(typeof h!="string")return;let b=(function(D){if((D=D.toLowerCase().trim())==="transparent")return[0,0,0,0];let z=bn(Ai,D);if(z){let[X,Z,re]=z;return[X/255,Z/255,re/255,1]}if(D.startsWith("#")&&/^#(?:[0-9a-f]{3,4}|[0-9a-f]{6}|[0-9a-f]{8})$/.test(D)){let X=D.length<6?1:2,Z=1;return[Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+=X)),Yr(D.slice(Z,Z+X)||"ff")]}if(D.startsWith("rgb")){let X=D.match(/^rgba?\(\s*([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s+|\s*(,)\s*)([\de.+-]+)(%)?(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(X){let[Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It]=X,_t=[he||" ",ge||" ",vt].join("");if(_t===" "||_t===" /"||_t===",,"||_t===",,,"){let qt=[Q,ke,je].join(""),tr=qt==="%%%"?100:qt===""?255:0;if(tr){let lr=[Kn(+re/tr,0,1),Kn(+oe/tr,0,1),Kn(+Ue/tr,0,1),gt?Tn(+gt,It):1];if(Qn(lr))return lr}}return}}let G=D.match(/^hsla?\(\s*([\de.+-]+)(?:deg)?(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s+|\s*(,)\s*)([\de.+-]+)%(?:\s*([,\/])\s*([\de.+-]+)(%)?)?\s*\)$/);if(G){let[X,Z,re,Q,he,oe,ke,ge,Ue]=G,je=[re||" ",he||" ",ke].join("");if(je===" "||je===" /"||je===",,"||je===",,,"){let vt=[+Z,Kn(+Q,0,100),Kn(+oe,0,100),ge?Tn(+ge,Ue):1];if(Qn(vt))return(function([gt,It,_t,qt]){function tr(lr){let qr=(lr+gt/30)%12,jr=It*Math.min(_t,1-_t);return _t-jr*Math.max(-1,Math.min(qr-3,9-qr,1))}return gt=fc(gt),It/=100,_t/=100,[tr(0),tr(8),tr(4),qt]})(vt)}}})(h);return b?new ii(...b,!1):void 0}get rgb(){let{r:h,g:b,b:D,a:z}=this,G=z||1/0;return this.overwriteGetter("rgb",[h/G,b/G,D/G,z])}get hcl(){return this.overwriteGetter("hcl",(function(h){let[b,D,z,G]=Af(h),X=Math.sqrt(D*D+z*z);return[Math.round(1e4*X)?fc(Math.atan2(z,D)*su):NaN,X,b,G]})(this.rgb))}get lab(){return this.overwriteGetter("lab",Af(this.rgb))}overwriteGetter(h,b){return Object.defineProperty(this,h,{value:b}),b}toString(){let[h,b,D,z]=this.rgb;return`rgba(${[h,b,D].map((G=>Math.round(255*G))).join(",")},${z})`}static interpolate(h,b,D,z="rgb"){switch(z){case"rgb":{let[G,X,Z,re]=Ra(h.rgb,b.rgb,D);return new ii(G,X,Z,re,!1)}case"hcl":{let[G,X,Z,re]=h.hcl,[Q,he,oe,ke]=b.hcl,ge,Ue;if(isNaN(G)||isNaN(Q))isNaN(G)?isNaN(Q)?ge=NaN:(ge=Q,Z!==1&&Z!==0||(Ue=he)):(ge=G,oe!==1&&oe!==0||(Ue=X));else{let _t=Q-G;Q>G&&_t>180?_t-=360:Q180&&(_t+=360),ge=G+D*_t}let[je,vt,gt,It]=(function([_t,qt,tr,lr]){return _t=isNaN(_t)?0:_t*Zs,er([tr,Math.cos(_t)*qt,Math.sin(_t)*qt,lr])})([ge,Ue!=null?Ue:Ji(X,he,D),Ji(Z,oe,D),Ji(re,ke,D)]);return new ii(je,vt,gt,It,!1)}case"lab":{let[G,X,Z,re]=er(Ra(h.lab,b.lab,D));return new ii(G,X,Z,re,!1)}}}}ii.black=new ii(0,0,0,1),ii.white=new ii(1,1,1,1),ii.transparent=new ii(0,0,0,0),ii.red=new ii(1,0,0,1);class Za{constructor(h,b,D){this.sensitivity=h?b?"variant":"case":b?"accent":"base",this.locale=D,this.collator=new Intl.Collator(this.locale?this.locale:[],{sensitivity:this.sensitivity,usage:"search"})}compare(h,b){return this.collator.compare(h,b)}resolvedLocale(){return new Intl.Collator(this.locale?this.locale:[]).resolvedOptions().locale}}let ja=["bottom","center","top"];class qo{constructor(h,b,D,z,G,X){this.text=h,this.image=b,this.scale=D,this.fontStack=z,this.textColor=G,this.verticalAlign=X}}class $a{constructor(h){this.sections=h}static fromString(h){return new $a([new qo(h,null,null,null,null,null)])}isEmpty(){return this.sections.length===0||!this.sections.some((h=>h.text.length!==0||h.image&&h.image.name.length!==0))}static factory(h){return h instanceof $a?h:$a.fromString(h)}toString(){return this.sections.length===0?"":this.sections.map((h=>h.text)).join("")}}class Ka{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Ka)return h;if(typeof h=="number")return new Ka([h,h,h,h]);if(Array.isArray(h)&&!(h.length<1||h.length>4)){for(let b of h)if(typeof b!="number")return;switch(h.length){case 1:h=[h[0],h[0],h[0],h[0]];break;case 2:h=[h[0],h[1],h[0],h[1]];break;case 3:h=[h[0],h[1],h[2],h[1]]}return new Ka(h)}}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D){return new Ka(Ra(h.values,b.values,D))}}class Oa{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Oa)return h;if(typeof h=="number")return new Oa([h]);if(Array.isArray(h)){for(let b of h)if(typeof b!="number")return;return new Oa(h)}}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D){return new Oa(Ra(h.values,b.values,D))}}class Ni{constructor(h){this.values=h.slice()}static parse(h){if(h instanceof Ni)return h;if(typeof h=="string"){let D=ii.parse(h);return D?new Ni([D]):void 0}if(!Array.isArray(h))return;let b=[];for(let D of h){if(typeof D!="string")return;let z=ii.parse(D);if(!z)return;b.push(z)}return new Ni(b)}toString(){return JSON.stringify(this.values)}static interpolate(h,b,D,z="rgb"){let G=[];if(h.values.length!=b.values.length)throw new Error(`colorArray: Arrays have mismatched length (${h.values.length} vs. ${b.values.length}), cannot interpolate.`);for(let X=0;X=0&&M<=255&&typeof h=="number"&&h>=0&&h<=255&&typeof b=="number"&&b>=0&&b<=255?D===void 0||typeof D=="number"&&D>=0&&D<=1?null:`Invalid rgba value [${[M,h,b,D].join(", ")}]: 'a' must be between 0 and 1.`:`Invalid rgba value [${(typeof D=="number"?[M,h,b,D]:[M,h,b]).join(", ")}]: 'r', 'g', and 'b' must be between 0 and 255.`}function pa(M){if(M===null||typeof M=="string"||typeof M=="boolean"||typeof M=="number"||M instanceof oo||M instanceof ii||M instanceof Za||M instanceof $a||M instanceof Ka||M instanceof Oa||M instanceof Ni||M instanceof yo||M instanceof so)return!0;if(Array.isArray(M)){for(let h of M)if(!pa(h))return!1;return!0}if(typeof M=="object"){for(let h in M)if(!pa(M[h]))return!1;return!0}return!1}function la(M){if(M===null)return Dt;if(typeof M=="string")return Vt;if(typeof M=="boolean")return Qt;if(typeof M=="number")return At;if(M instanceof ii)return Ut;if(M instanceof oo)return _r;if(M instanceof Za)return qn;if(M instanceof $a)return ri;if(M instanceof Ka)return Jn;if(M instanceof Oa)return Vi;if(M instanceof Ni)return Ii;if(M instanceof yo)return ha;if(M instanceof so)return ra;if(Array.isArray(M)){let h=M.length,b;for(let D of M){let z=la(D);if(b){if(b===z)continue;b=Jr;break}b=z}return va(b||Jr,h)}return rn}function As(M){let h=typeof M;return M===null?"":h==="string"||h==="number"||h==="boolean"?String(M):M instanceof ii||M instanceof oo||M instanceof $a||M instanceof Ka||M instanceof Oa||M instanceof Ni||M instanceof yo||M instanceof so?M.toString():JSON.stringify(M)}class Ms{constructor(h,b){this.type=h,this.value=b}static parse(h,b){if(h.length!==2)return b.error(`'literal' expression requires exactly one argument, but found ${h.length-1} instead.`);if(!pa(h[1]))return b.error("invalid value");let D=h[1],z=la(D),G=b.expectedType;return z.kind!=="array"||z.N!==0||!G||G.kind!=="array"||typeof G.N=="number"&&G.N!==0||(z=G),new Ms(z,D)}evaluate(){return this.value}eachChild(){}outputDefined(){return!0}}let xu={string:Vt,number:At,boolean:Qt,object:rn};class rs{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D,z=1,G=h[0];if(G==="array"){let Z,re;if(h.length>2){let Q=h[1];if(typeof Q!="string"||!(Q in xu)||Q==="object")return b.error('The item type argument of "array" must be one of string, number, boolean',1);Z=xu[Q],z++}else Z=Jr;if(h.length>3){if(h[2]!==null&&(typeof h[2]!="number"||h[2]<0||h[2]!==Math.floor(h[2])))return b.error('The length argument to "array" must be a positive integer literal',2);re=h[2],z++}D=va(Z,re)}else{if(!xu[G])throw new Error(`Types doesn't contain name = ${G}`);D=xu[G]}let X=[];for(;zh.outputDefined()))}}let Ls={"to-boolean":Qt,"to-color":Ut,"to-number":At,"to-string":Vt};class $s{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=h[0];if(!Ls[D])throw new Error(`Can't parse ${D} as it is not part of the known types`);if((D==="to-boolean"||D==="to-string")&&h.length!==2)return b.error("Expected one argument.");let z=Ls[D],G=[];for(let X=1;X4?`Invalid rgba value ${JSON.stringify(b)}: expected an array containing either three or four numeric values.`:ko(b[0],b[1],b[2],b[3]),!D))return new ii(b[0]/255,b[1]/255,b[2]/255,b[3])}throw new ka(D||`Could not parse color from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"padding":{let b;for(let D of this.args){b=D.evaluate(h);let z=Ka.parse(b);if(z)return z}throw new ka(`Could not parse padding from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"numberArray":{let b;for(let D of this.args){b=D.evaluate(h);let z=Oa.parse(b);if(z)return z}throw new ka(`Could not parse numberArray from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"colorArray":{let b;for(let D of this.args){b=D.evaluate(h);let z=Ni.parse(b);if(z)return z}throw new ka(`Could not parse colorArray from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"variableAnchorOffsetCollection":{let b;for(let D of this.args){b=D.evaluate(h);let z=yo.parse(b);if(z)return z}throw new ka(`Could not parse variableAnchorOffsetCollection from value '${typeof b=="string"?b:JSON.stringify(b)}'`)}case"number":{let b=null;for(let D of this.args){if(b=D.evaluate(h),b===null)return 0;let z=Number(b);if(!isNaN(z))return z}throw new ka(`Could not convert ${JSON.stringify(b)} to number.`)}case"formatted":return $a.fromString(As(this.args[0].evaluate(h)));case"resolvedImage":return so.fromString(As(this.args[0].evaluate(h)));case"projectionDefinition":return this.args[0].evaluate(h);default:return As(this.args[0].evaluate(h))}}eachChild(h){this.args.forEach(h)}outputDefined(){return this.args.every((h=>h.outputDefined()))}}let Kc=["Unknown","Point","LineString","Polygon"];class _u{constructor(){this.globals=null,this.feature=null,this.featureState=null,this.formattedSection=null,this._parseColorCache=new Map,this.availableImages=null,this.canonical=null}id(){return this.feature&&"id"in this.feature?this.feature.id:null}geometryType(){return this.feature?typeof this.feature.type=="number"?Kc[this.feature.type]:this.feature.type:null}geometry(){return this.feature&&"geometry"in this.feature?this.feature.geometry:null}canonicalID(){return this.canonical}properties(){return this.feature&&this.feature.properties||{}}parseColor(h){let b=this._parseColorCache.get(h);return b||(b=ii.parse(h),this._parseColorCache.set(h,b)),b}}class Gu{constructor(h,b,D=[],z,G=new Cn,X=[]){this.registry=h,this.path=D,this.key=D.map((Z=>`[${Z}]`)).join(""),this.scope=G,this.errors=X,this.expectedType=z,this._isConstant=b}parse(h,b,D,z,G={}){return b?this.concat(b,D,z)._parse(h,G):this._parse(h,G)}_parse(h,b){function D(z,G,X){return X==="assert"?new rs(G,[z]):X==="coerce"?new $s(G,[z]):z}if(h!==null&&typeof h!="string"&&typeof h!="boolean"&&typeof h!="number"||(h=["literal",h]),Array.isArray(h)){if(h.length===0)return this.error('Expected an array with at least one element. If you wanted a literal array, use ["literal", []].');let z=h[0];if(typeof z!="string")return this.error(`Expression name must be a string, but found ${typeof z} instead. If you wanted a literal array, use ["literal", [...]].`,0),null;let G=this.registry[z];if(G){let X=G.parse(h,this);if(!X)return null;if(this.expectedType){let Z=this.expectedType,re=X.type;if(Z.kind!=="string"&&Z.kind!=="number"&&Z.kind!=="boolean"&&Z.kind!=="object"&&Z.kind!=="array"||re.kind!=="value"){if(Z.kind==="projectionDefinition"&&["string","array"].includes(re.kind)||["color","formatted","resolvedImage"].includes(Z.kind)&&["value","string"].includes(re.kind)||["padding","numberArray"].includes(Z.kind)&&["value","number","array"].includes(re.kind)||Z.kind==="colorArray"&&["value","string","array"].includes(re.kind)||Z.kind==="variableAnchorOffsetCollection"&&["value","array"].includes(re.kind))X=D(X,Z,b.typeAnnotation||"coerce");else if(this.checkSubtype(Z,re))return null}else X=D(X,Z,b.typeAnnotation||"assert")}if(!(X instanceof Ms)&&X.type.kind!=="resolvedImage"&&this._isConstant(X)){let Z=new _u;try{X=new Ms(X.type,X.evaluate(Z))}catch(re){return this.error(re.message),null}}return X}return this.error(`Unknown expression "${z}". If you wanted a literal array, use ["literal", [...]].`,0)}return this.error(h===void 0?"'undefined' value invalid. Use null instead.":typeof h=="object"?'Bare objects invalid. Use ["literal", {...}] instead.':`Expected an array, but found ${typeof h} instead.`)}concat(h,b,D){let z=typeof h=="number"?this.path.concat(h):this.path,G=D?this.scope.concat(D):this.scope;return new Gu(this.registry,this._isConstant,z,b||null,G,this.errors)}error(h,...b){let D=`${this.key}${b.map((z=>`[${z}]`)).join("")}`;this.errors.push(new Zr(D,h))}checkSubtype(h,b){let D=Ma(h,b);return D&&this.error(D),D}}class Ja{constructor(h,b){this.type=b.type,this.bindings=[].concat(h),this.result=b}evaluate(h){return this.result.evaluate(h)}eachChild(h){for(let b of this.bindings)h(b[1]);h(this.result)}static parse(h,b){if(h.length<4)return b.error(`Expected at least 3 arguments, but found ${h.length-1} instead.`);let D=[];for(let G=1;G=D.length)throw new ka(`Array index out of bounds: ${b} > ${D.length-1}.`);if(b!==Math.floor(b))throw new ka(`Array index must be an integer, but found ${b} instead.`);return D[b]}eachChild(h){h(this.index),h(this.input)}outputDefined(){return!1}}class ma{constructor(h,b){this.type=Qt,this.needle=h,this.haystack=b}static parse(h,b){if(h.length!==3)return b.error(`Expected 2 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,Jr);return D&&z?Ga(D.type,[Qt,Vt,At,Dt,Jr])?new ma(D,z):b.error(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(D.type)} instead`):null}evaluate(h){let b=this.needle.evaluate(h),D=this.haystack.evaluate(h);if(!D)return!1;if(!ss(b,["boolean","string","number","null"]))throw new ka(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(la(b))} instead.`);if(!ss(D,["string","array"]))throw new ka(`Expected second argument to be of type array or string, but found ${Xi(la(D))} instead.`);return D.indexOf(b)>=0}eachChild(h){h(this.needle),h(this.haystack)}outputDefined(){return!0}}class Ps{constructor(h,b,D){this.type=At,this.needle=h,this.haystack=b,this.fromIndex=D}static parse(h,b){if(h.length<=2||h.length>=5)return b.error(`Expected 2 or 3 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,Jr);if(!D||!z)return null;if(!Ga(D.type,[Qt,Vt,At,Dt,Jr]))return b.error(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(D.type)} instead`);if(h.length===4){let G=b.parse(h[3],3,At);return G?new Ps(D,z,G):null}return new Ps(D,z)}evaluate(h){let b=this.needle.evaluate(h),D=this.haystack.evaluate(h);if(!ss(b,["boolean","string","number","null"]))throw new ka(`Expected first argument to be of type boolean, string, number or null, but found ${Xi(la(b))} instead.`);let z;if(this.fromIndex&&(z=this.fromIndex.evaluate(h)),ss(D,["string"])){let G=D.indexOf(b,z);return G===-1?-1:[...D.slice(0,G)].length}if(ss(D,["array"]))return D.indexOf(b,z);throw new ka(`Expected second argument to be of type array or string, but found ${Xi(la(D))} instead.`)}eachChild(h){h(this.needle),h(this.haystack),this.fromIndex&&h(this.fromIndex)}outputDefined(){return!1}}class Ca{constructor(h,b,D,z,G,X){this.inputType=h,this.type=b,this.input=D,this.cases=z,this.outputs=G,this.otherwise=X}static parse(h,b){if(h.length<5)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if(h.length%2!=1)return b.error("Expected an even number of arguments.");let D,z;b.expectedType&&b.expectedType.kind!=="value"&&(z=b.expectedType);let G={},X=[];for(let Q=2;QNumber.MAX_SAFE_INTEGER)return ke.error(`Branch labels must be integers no larger than ${Number.MAX_SAFE_INTEGER}.`);if(typeof Ue=="number"&&Math.floor(Ue)!==Ue)return ke.error("Numeric branch labels must be integer values.");if(D){if(ke.checkSubtype(D,la(Ue)))return null}else D=la(Ue);if(G[String(Ue)]!==void 0)return ke.error("Branch labels must be unique.");G[String(Ue)]=X.length}let ge=b.parse(oe,Q,z);if(!ge)return null;z=z||ge.type,X.push(ge)}let Z=b.parse(h[1],1,Jr);if(!Z)return null;let re=b.parse(h[h.length-1],h.length-1,z);return re?Z.type.kind!=="value"&&b.concat(1).checkSubtype(D,Z.type)?null:new Ca(D,z,Z,G,X,re):null}evaluate(h){let b=this.input.evaluate(h);return(la(b)===this.inputType&&this.outputs[this.cases[b]]||this.otherwise).evaluate(h)}eachChild(h){h(this.input),this.outputs.forEach(h),h(this.otherwise)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))&&this.otherwise.outputDefined()}}class Pl{constructor(h,b,D){this.type=h,this.branches=b,this.otherwise=D}static parse(h,b){if(h.length<4)return b.error(`Expected at least 3 arguments, but found only ${h.length-1}.`);if(h.length%2!=0)return b.error("Expected an odd number of arguments.");let D;b.expectedType&&b.expectedType.kind!=="value"&&(D=b.expectedType);let z=[];for(let X=1;Xb.outputDefined()))&&this.otherwise.outputDefined()}}class ll{constructor(h,b,D,z){this.type=h,this.input=b,this.beginIndex=D,this.endIndex=z}static parse(h,b){if(h.length<=2||h.length>=5)return b.error(`Expected 2 or 3 arguments, but found ${h.length-1} instead.`);let D=b.parse(h[1],1,Jr),z=b.parse(h[2],2,At);if(!D||!z)return null;if(!Ga(D.type,[va(Jr),Vt,Jr]))return b.error(`Expected first argument to be of type array or string, but found ${Xi(D.type)} instead`);if(h.length===4){let G=b.parse(h[3],3,At);return G?new ll(D.type,D,z,G):null}return new ll(D.type,D,z)}evaluate(h){let b=this.input.evaluate(h),D=this.beginIndex.evaluate(h),z;if(this.endIndex&&(z=this.endIndex.evaluate(h)),ss(b,["string"]))return[...b].slice(D,z).join("");if(ss(b,["array"]))return b.slice(D,z);throw new ka(`Expected first argument to be of type array or string, but found ${Xi(la(b))} instead.`)}eachChild(h){h(this.input),h(this.beginIndex),this.endIndex&&h(this.endIndex)}outputDefined(){return!1}}function Jc(M,h){let b=M.length-1,D,z,G=0,X=b,Z=0;for(;G<=X;)if(Z=Math.floor((G+X)/2),D=M[Z],z=M[Z+1],D<=h){if(Z===b||hh))throw new ka("Input is not a number.");X=Z-1}return 0}class lu{constructor(h,b,D){this.type=h,this.input=b,this.labels=[],this.outputs=[];for(let[z,G]of D)this.labels.push(z),this.outputs.push(G)}static parse(h,b){if(h.length-1<4)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if((h.length-1)%2!=0)return b.error("Expected an even number of arguments.");let D=b.parse(h[1],1,At);if(!D)return null;let z=[],G=null;b.expectedType&&b.expectedType.kind!=="value"&&(G=b.expectedType);for(let X=1;X=Z)return b.error('Input/output pairs for "step" expressions must be arranged with input values in strictly ascending order.',Q);let oe=b.parse(re,he,G);if(!oe)return null;G=G||oe.type,z.push([Z,oe])}return new lu(G,D,z)}evaluate(h){let b=this.labels,D=this.outputs;if(b.length===1)return D[0].evaluate(h);let z=this.input.evaluate(h);if(z<=b[0])return D[0].evaluate(h);let G=b.length;return z>=b[G-1]?D[G-1].evaluate(h):D[Jc(b,z)].evaluate(h)}eachChild(h){h(this.input);for(let b of this.outputs)h(b)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))}}function Mf(M){return M&&M.__esModule&&Object.prototype.hasOwnProperty.call(M,"default")?M.default:M}var Bd,Hu,Sf=(function(){if(Hu)return Bd;function M(h,b,D,z){this.cx=3*h,this.bx=3*(D-h)-this.cx,this.ax=1-this.cx-this.bx,this.cy=3*b,this.by=3*(z-b)-this.cy,this.ay=1-this.cy-this.by,this.p1x=h,this.p1y=b,this.p2x=D,this.p2y=z}return Hu=1,Bd=M,M.prototype={sampleCurveX:function(h){return((this.ax*h+this.bx)*h+this.cx)*h},sampleCurveY:function(h){return((this.ay*h+this.by)*h+this.cy)*h},sampleCurveDerivativeX:function(h){return(3*this.ax*h+2*this.bx)*h+this.cx},solveCurveX:function(h,b){if(b===void 0&&(b=1e-6),h<0)return 0;if(h>1)return 1;for(var D=h,z=0;z<8;z++){var G=this.sampleCurveX(D)-h;if(Math.abs(G)G?Z=D:re=D,D=.5*(re-Z)+Z;return D},solve:function(h,b){return this.sampleCurveY(this.solveCurveX(h,b))}},Bd})(),kc=Mf(Sf);class Uo{constructor(h,b,D,z,G){this.type=h,this.operator=b,this.interpolation=D,this.input=z,this.labels=[],this.outputs=[];for(let[X,Z]of G)this.labels.push(X),this.outputs.push(Z)}static interpolationFactor(h,b,D,z){let G=0;if(h.name==="exponential")G=ns(b,h.base,D,z);else if(h.name==="linear")G=ns(b,1,D,z);else if(h.name==="cubic-bezier"){let X=h.controlPoints;G=new kc(X[0],X[1],X[2],X[3]).solve(ns(b,1,D,z))}return G}static parse(h,b){let[D,z,G,...X]=h;if(!Array.isArray(z)||z.length===0)return b.error("Expected an interpolation type expression.",1);if(z[0]==="linear")z={name:"linear"};else if(z[0]==="exponential"){let Q=z[1];if(typeof Q!="number")return b.error("Exponential interpolation requires a numeric base.",1,1);z={name:"exponential",base:Q}}else{if(z[0]!=="cubic-bezier")return b.error(`Unknown interpolation type ${String(z[0])}`,1,0);{let Q=z.slice(1);if(Q.length!==4||Q.some((he=>typeof he!="number"||he<0||he>1)))return b.error("Cubic bezier interpolation requires four numeric arguments with values between 0 and 1.",1);z={name:"cubic-bezier",controlPoints:Q}}}if(h.length-1<4)return b.error(`Expected at least 4 arguments, but found only ${h.length-1}.`);if((h.length-1)%2!=0)return b.error("Expected an even number of arguments.");if(G=b.parse(G,2,At),!G)return null;let Z=[],re=null;D!=="interpolate-hcl"&&D!=="interpolate-lab"||b.expectedType==Ii?b.expectedType&&b.expectedType.kind!=="value"&&(re=b.expectedType):re=Ut;for(let Q=0;Q=he)return b.error('Input/output pairs for "interpolate" expressions must be arranged with input values in strictly ascending order.',ke);let Ue=b.parse(oe,ge,re);if(!Ue)return null;re=re||Ue.type,Z.push([he,Ue])}return mo(re,At)||mo(re,_r)||mo(re,Ut)||mo(re,Jn)||mo(re,Vi)||mo(re,Ii)||mo(re,ha)||mo(re,va(At))?new Uo(re,D,z,G,Z):b.error(`Type ${Xi(re)} is not interpolatable.`)}evaluate(h){let b=this.labels,D=this.outputs;if(b.length===1)return D[0].evaluate(h);let z=this.input.evaluate(h);if(z<=b[0])return D[0].evaluate(h);let G=b.length;if(z>=b[G-1])return D[G-1].evaluate(h);let X=Jc(b,z),Z=Uo.interpolationFactor(this.interpolation,z,b[X],b[X+1]),re=D[X].evaluate(h),Q=D[X+1].evaluate(h);switch(this.operator){case"interpolate":switch(this.type.kind){case"number":return Ji(re,Q,Z);case"color":return ii.interpolate(re,Q,Z);case"padding":return Ka.interpolate(re,Q,Z);case"colorArray":return Ni.interpolate(re,Q,Z);case"numberArray":return Oa.interpolate(re,Q,Z);case"variableAnchorOffsetCollection":return yo.interpolate(re,Q,Z);case"array":return Ra(re,Q,Z);case"projectionDefinition":return oo.interpolate(re,Q,Z)}case"interpolate-hcl":switch(this.type.kind){case"color":return ii.interpolate(re,Q,Z,"hcl");case"colorArray":return Ni.interpolate(re,Q,Z,"hcl")}case"interpolate-lab":switch(this.type.kind){case"color":return ii.interpolate(re,Q,Z,"lab");case"colorArray":return Ni.interpolate(re,Q,Z,"lab")}}}eachChild(h){h(this.input);for(let b of this.outputs)h(b)}outputDefined(){return this.outputs.every((h=>h.outputDefined()))}}function ns(M,h,b,D){let z=D-b,G=M-b;return z===0?0:h===1?G/z:(Math.pow(h,G)-1)/(Math.pow(h,z)-1)}let Ks={color:ii.interpolate,number:Ji,padding:Ka.interpolate,numberArray:Oa.interpolate,colorArray:Ni.interpolate,variableAnchorOffsetCollection:yo.interpolate,array:Ra};class Ef{constructor(h,b){this.type=h,this.args=b}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=null,z=b.expectedType;z&&z.kind!=="value"&&(D=z);let G=[];for(let Z of h.slice(1)){let re=b.parse(Z,1+G.length,D,void 0,{typeAnnotation:"omit"});if(!re)return null;D=D||re.type,G.push(re)}if(!D)throw new Error("No output type");let X=z&&G.some((Z=>Ma(z,Z.type)));return new Ef(X?Jr:D,G)}evaluate(h){let b,D=null,z=0;for(let G of this.args)if(z++,D=G.evaluate(h),D&&D instanceof so&&!D.available&&(b||(b=D.name),D=null,z===this.args.length&&(D=b)),D!==null)break;return D}eachChild(h){this.args.forEach(h)}outputDefined(){return this.args.every((h=>h.outputDefined()))}}function ju(M,h){return M==="=="||M==="!="?h.kind==="boolean"||h.kind==="string"||h.kind==="number"||h.kind==="null"||h.kind==="value":h.kind==="string"||h.kind==="number"||h.kind==="value"}function gs(M,h,b,D){return D.compare(h,b)===0}function bu(M,h,b){let D=M!=="=="&&M!=="!=";return class qWe{constructor(G,X,Z){this.type=Qt,this.lhs=G,this.rhs=X,this.collator=Z,this.hasUntypedArgument=G.type.kind==="value"||X.type.kind==="value"}static parse(G,X){if(G.length!==3&&G.length!==4)return X.error("Expected two or three arguments.");let Z=G[0],re=X.parse(G[1],1,Jr);if(!re)return null;if(!ju(Z,re.type))return X.concat(1).error(`"${Z}" comparisons are not supported for type '${Xi(re.type)}'.`);let Q=X.parse(G[2],2,Jr);if(!Q)return null;if(!ju(Z,Q.type))return X.concat(2).error(`"${Z}" comparisons are not supported for type '${Xi(Q.type)}'.`);if(re.type.kind!==Q.type.kind&&re.type.kind!=="value"&&Q.type.kind!=="value")return X.error(`Cannot compare types '${Xi(re.type)}' and '${Xi(Q.type)}'.`);D&&(re.type.kind==="value"&&Q.type.kind!=="value"?re=new rs(Q.type,[re]):re.type.kind!=="value"&&Q.type.kind==="value"&&(Q=new rs(re.type,[Q])));let he=null;if(G.length===4){if(re.type.kind!=="string"&&Q.type.kind!=="string"&&re.type.kind!=="value"&&Q.type.kind!=="value")return X.error("Cannot use collator to compare non-string types.");if(he=X.parse(G[3],3,qn),!he)return null}return new qWe(re,Q,he)}evaluate(G){let X=this.lhs.evaluate(G),Z=this.rhs.evaluate(G);if(D&&this.hasUntypedArgument){let re=la(X),Q=la(Z);if(re.kind!==Q.kind||re.kind!=="string"&&re.kind!=="number")throw new ka(`Expected arguments for "${M}" to be (string, string) or (number, number), but found (${re.kind}, ${Q.kind}) instead.`)}if(this.collator&&!D&&this.hasUntypedArgument){let re=la(X),Q=la(Z);if(re.kind!=="string"||Q.kind!=="string")return h(G,X,Z)}return this.collator?b(G,X,Z,this.collator.evaluate(G)):h(G,X,Z)}eachChild(G){G(this.lhs),G(this.rhs),this.collator&&G(this.collator)}outputDefined(){return!0}}}let kf=bu("==",(function(M,h,b){return h===b}),gs),ah=bu("!=",(function(M,h,b){return h!==b}),(function(M,h,b,D){return!gs(0,h,b,D)})),Od=bu("<",(function(M,h,b){return h",(function(M,h,b){return h>b}),(function(M,h,b,D){return D.compare(h,b)>0})),uu=bu("<=",(function(M,h,b){return h<=b}),(function(M,h,b,D){return D.compare(h,b)<=0})),oh=bu(">=",(function(M,h,b){return h>=b}),(function(M,h,b,D){return D.compare(h,b)>=0}));class hc{constructor(h,b,D){this.type=qn,this.locale=D,this.caseSensitive=h,this.diacriticSensitive=b}static parse(h,b){if(h.length!==2)return b.error("Expected one argument.");let D=h[1];if(typeof D!="object"||Array.isArray(D))return b.error("Collator options argument must be an object.");let z=b.parse(D["case-sensitive"]!==void 0&&D["case-sensitive"],1,Qt);if(!z)return null;let G=b.parse(D["diacritic-sensitive"]!==void 0&&D["diacritic-sensitive"],1,Qt);if(!G)return null;let X=null;return D.locale&&(X=b.parse(D.locale,1,Vt),!X)?null:new hc(z,G,X)}evaluate(h){return new Za(this.caseSensitive.evaluate(h),this.diacriticSensitive.evaluate(h),this.locale?this.locale.evaluate(h):null)}eachChild(h){h(this.caseSensitive),h(this.diacriticSensitive),this.locale&&h(this.locale)}outputDefined(){return!1}}class Fl{constructor(h,b,D,z,G,X){this.type=Vt,this.number=h,this.locale=b,this.currency=D,this.unit=z,this.minFractionDigits=G,this.maxFractionDigits=X}static parse(h,b){if(h.length!==3)return b.error("Expected two arguments.");let D=b.parse(h[1],1,At);if(!D)return null;let z=h[2];if(typeof z!="object"||Array.isArray(z))return b.error("NumberFormat options argument must be an object.");let G=null;if(z.locale&&(G=b.parse(z.locale,1,Vt),!G))return null;let X=null;if(z.currency&&(X=b.parse(z.currency,1,Vt),!X))return null;let Z=null;if(z.unit&&(Z=b.parse(z.unit,1,Vt),!Z))return null;if(X&&Z)return b.error("NumberFormat options `currency` and `unit` are mutually exclusive");let re=null;if(z["min-fraction-digits"]&&(re=b.parse(z["min-fraction-digits"],1,At),!re))return null;let Q=null;return z["max-fraction-digits"]&&(Q=b.parse(z["max-fraction-digits"],1,At),!Q)?null:new Fl(D,G,X,Z,re,Q)}evaluate(h){return new Intl.NumberFormat(this.locale?this.locale.evaluate(h):[],{style:this.currency?"currency":this.unit?"unit":"decimal",currency:this.currency?this.currency.evaluate(h):void 0,unit:this.unit?this.unit.evaluate(h):void 0,minimumFractionDigits:this.minFractionDigits?this.minFractionDigits.evaluate(h):void 0,maximumFractionDigits:this.maxFractionDigits?this.maxFractionDigits.evaluate(h):void 0}).format(this.number.evaluate(h))}eachChild(h){h(this.number),this.locale&&h(this.locale),this.currency&&h(this.currency),this.unit&&h(this.unit),this.minFractionDigits&&h(this.minFractionDigits),this.maxFractionDigits&&h(this.maxFractionDigits)}outputDefined(){return!1}}class Yo{constructor(h){this.type=ri,this.sections=h}static parse(h,b){if(h.length<2)return b.error("Expected at least one argument.");let D=h[1];if(!Array.isArray(D)&&typeof D=="object")return b.error("First argument must be an image or text section.");let z=[],G=!1;for(let X=1;X<=h.length-1;++X){let Z=h[X];if(G&&typeof Z=="object"&&!Array.isArray(Z)){G=!1;let re=null;if(Z["font-scale"]&&(re=b.parse(Z["font-scale"],1,At),!re))return null;let Q=null;if(Z["text-font"]&&(Q=b.parse(Z["text-font"],1,va(Vt)),!Q))return null;let he=null;if(Z["text-color"]&&(he=b.parse(Z["text-color"],1,Ut),!he))return null;let oe=null;if(Z["vertical-align"]){if(typeof Z["vertical-align"]=="string"&&!ja.includes(Z["vertical-align"]))return b.error(`'vertical-align' must be one of: 'bottom', 'center', 'top' but found '${Z["vertical-align"]}' instead.`);if(oe=b.parse(Z["vertical-align"],1,Vt),!oe)return null}let ke=z[z.length-1];ke.scale=re,ke.font=Q,ke.textColor=he,ke.verticalAlign=oe}else{let re=b.parse(h[X],1,Jr);if(!re)return null;let Q=re.type.kind;if(Q!=="string"&&Q!=="value"&&Q!=="null"&&Q!=="resolvedImage")return b.error("Formatted text type must be 'string', 'value', 'image' or 'null'.");G=!0,z.push({content:re,scale:null,font:null,textColor:null,verticalAlign:null})}}return new Yo(z)}evaluate(h){return new $a(this.sections.map((b=>{let D=b.content.evaluate(h);return la(D)===ra?new qo("",D,null,null,null,b.verticalAlign?b.verticalAlign.evaluate(h):null):new qo(As(D),null,b.scale?b.scale.evaluate(h):null,b.font?b.font.evaluate(h).join(","):null,b.textColor?b.textColor.evaluate(h):null,b.verticalAlign?b.verticalAlign.evaluate(h):null)})))}eachChild(h){for(let b of this.sections)h(b.content),b.scale&&h(b.scale),b.font&&h(b.font),b.textColor&&h(b.textColor),b.verticalAlign&&h(b.verticalAlign)}outputDefined(){return!1}}class Ro{constructor(h){this.type=ra,this.input=h}static parse(h,b){if(h.length!==2)return b.error("Expected two arguments.");let D=b.parse(h[1],1,Vt);return D?new Ro(D):b.error("No image name provided.")}evaluate(h){let b=this.input.evaluate(h),D=so.fromString(b);return D&&h.availableImages&&(D.available=h.availableImages.indexOf(b)>-1),D}eachChild(h){h(this.input)}outputDefined(){return!1}}class is{constructor(h){this.type=At,this.input=h}static parse(h,b){if(h.length!==2)return b.error(`Expected 1 argument, but found ${h.length-1} instead.`);let D=b.parse(h[1],1);return D?D.type.kind!=="array"&&D.type.kind!=="string"&&D.type.kind!=="value"?b.error(`Expected argument of type string or array, but found ${Xi(D.type)} instead.`):new is(D):null}evaluate(h){let b=this.input.evaluate(h);if(typeof b=="string")return[...b].length;if(Array.isArray(b))return b.length;throw new ka(`Expected value to be of type string or array, but found ${Xi(la(b))} instead.`)}eachChild(h){h(this.input)}outputDefined(){return!1}}let Dl=8192;function dc(M,h){let b=(180+M[0])/360,D=(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M[1]*Math.PI/360)))/360,z=Math.pow(2,h.z);return[Math.round(b*z*Dl),Math.round(D*z*Dl)]}function ef(M,h){let b=Math.pow(2,h.z);return[(z=(M[0]/Dl+h.x)/b,360*z-180),(D=(M[1]/Dl+h.y)/b,360/Math.PI*Math.atan(Math.exp((180-360*D)*Math.PI/180))-90)];var D,z}function Cc(M,h){M[0]=Math.min(M[0],h[0]),M[1]=Math.min(M[1],h[1]),M[2]=Math.max(M[2],h[0]),M[3]=Math.max(M[3],h[1])}function sh(M,h){return!(M[0]<=h[0]||M[2]>=h[2]||M[1]<=h[1]||M[3]>=h[3])}function Y0(M,h,b){let D=M[0]-h[0],z=M[1]-h[1],G=M[0]-b[0],X=M[1]-b[1];return D*X-G*z==0&&D*G<=0&&z*X<=0}function Nd(M,h,b,D){return(z=[D[0]-b[0],D[1]-b[1]])[0]*(G=[h[0]-M[0],h[1]-M[1]])[1]-z[1]*G[0]!=0&&!(!Vd(M,h,b,D)||!Vd(b,D,M,h));var z,G}function Cf(M,h,b){for(let D of b)for(let z=0;z(z=M)[1]!=(X=Z[re+1])[1]>z[1]&&z[0]<(X[0]-G[0])*(z[1]-G[1])/(X[1]-G[1])+G[0]&&(D=!D)}var z,G,X;return D}function Ud(M,h){for(let b of h)if(Vo(M,b))return!0;return!1}function zh(M,h){for(let b of M)if(!Vo(b,h))return!1;for(let b=0;b0&&Z<0||X<0&&Z>0}function rf(M,h,b){let D=[];for(let z=0;zb[2]){let z=.5*D,G=M[0]-b[0]>z?-D:b[0]-M[0]>z?D:0;G===0&&(G=M[0]-b[2]>z?-D:b[2]-M[0]>z?D:0),M[0]+=G}Cc(h,M)}function dd(M,h,b,D){let z=Math.pow(2,D.z)*Dl,G=[D.x*Dl,D.y*Dl],X=[];for(let Z of M)for(let re of Z){let Q=[re.x+G[0],re.y+G[1]];vc(Q,h,b,z),X.push(Q)}return X}function Bh(M,h,b,D){let z=Math.pow(2,D.z)*Dl,G=[D.x*Dl,D.y*Dl],X=[];for(let re of M){let Q=[];for(let he of re){let oe=[he.x+G[0],he.y+G[1]];Cc(h,oe),Q.push(oe)}X.push(Q)}if(h[2]-h[0]<=z/2){(Z=h)[0]=Z[1]=1/0,Z[2]=Z[3]=-1/0;for(let re of X)for(let Q of re)vc(Q,h,b,z)}var Z;return X}class Wu{constructor(h,b){this.type=Qt,this.geojson=h,this.geometries=b}static parse(h,b){if(h.length!==2)return b.error(`'within' expression requires exactly one argument, but found ${h.length-1} instead.`);if(pa(h[1])){let D=h[1];if(D.type==="FeatureCollection"){let z=[];for(let G of D.features){let{type:X,coordinates:Z}=G.geometry;X==="Polygon"&&z.push(Z),X==="MultiPolygon"&&z.push(...Z)}if(z.length)return new Wu(D,{type:"MultiPolygon",coordinates:z})}else if(D.type==="Feature"){let z=D.geometry.type;if(z==="Polygon"||z==="MultiPolygon")return new Wu(D,D.geometry)}else if(D.type==="Polygon"||D.type==="MultiPolygon")return new Wu(D,D)}return b.error("'within' expression requires valid geojson object that contains polygon geometry type.")}evaluate(h){if(h.geometry()!=null&&h.canonicalID()!=null){if(h.geometryType()==="Point")return(function(b,D){let z=[1/0,1/0,-1/0,-1/0],G=[1/0,1/0,-1/0,-1/0],X=b.canonicalID();if(D.type==="Polygon"){let Z=rf(D.coordinates,G,X),re=dd(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!Vo(Q,Z))return!1}if(D.type==="MultiPolygon"){let Z=qh(D.coordinates,G,X),re=dd(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!Ud(Q,Z))return!1}return!0})(h,this.geometries);if(h.geometryType()==="LineString")return(function(b,D){let z=[1/0,1/0,-1/0,-1/0],G=[1/0,1/0,-1/0,-1/0],X=b.canonicalID();if(D.type==="Polygon"){let Z=rf(D.coordinates,G,X),re=Bh(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!zh(Q,Z))return!1}if(D.type==="MultiPolygon"){let Z=qh(D.coordinates,G,X),re=Bh(b.geometry(),z,G,X);if(!sh(z,G))return!1;for(let Q of re)if(!tf(Q,Z))return!1}return!0})(h,this.geometries)}return!1}eachChild(){}outputDefined(){return!0}}let vd=class{constructor(M=[],h=(b,D)=>bD?1:0){if(this.data=M,this.length=this.data.length,this.compare=h,this.length>0)for(let b=(this.length>>1)-1;b>=0;b--)this._down(b)}push(M){this.data.push(M),this._up(this.length++)}pop(){if(this.length===0)return;let M=this.data[0],h=this.data.pop();return--this.length>0&&(this.data[0]=h,this._down(0)),M}peek(){return this.data[0]}_up(M){let{data:h,compare:b}=this,D=h[M];for(;M>0;){let z=M-1>>1,G=h[z];if(b(D,G)>=0)break;h[M]=G,M=z}h[M]=D}_down(M){let{data:h,compare:b}=this,D=this.length>>1,z=h[M];for(;M=0)break;h[M]=h[G],M=G}h[M]=z}};function pd(M,h,b=0,D=M.length-1,z=nf){for(;D>b;){if(D-b>600){let re=D-b+1,Q=h-b+1,he=Math.log(re),oe=.5*Math.exp(2*he/3),ke=.5*Math.sqrt(he*oe*(re-oe)/re)*(Q-re/2<0?-1:1);pd(M,h,Math.max(b,Math.floor(h-Q*oe/re+ke)),Math.min(D,Math.floor(h+(re-Q)*oe/re+ke)),z)}let G=M[h],X=b,Z=D;for(lh(M,b,h),z(M[D],G)>0&&lh(M,b,D);X0;)Z--}z(M[b],G)===0?lh(M,b,Z):(Z++,lh(M,Z,D)),Z<=h&&(b=Z+1),h<=Z&&(D=Z-1)}}function lh(M,h,b){let D=M[h];M[h]=M[b],M[b]=D}function nf(M,h){return Mh?1:0}function uh(M,h){if(M.length<=1)return[M];let b=[],D,z;for(let G of M){let X=gd(G);X!==0&&(G.area=Math.abs(X),z===void 0&&(z=X<0),z===X<0?(D&&b.push(D),D=[G]):D.push(G))}if(D&&b.push(D),h>1)for(let G=0;G1?(Q=h[re+1][0],he=h[re+1][1]):ge>0&&(Q+=oe/this.kx*ge,he+=ke/this.ky*ge)),oe=this.wrap(b[0]-Q)*this.kx,ke=(b[1]-he)*this.ky;let Ue=oe*oe+ke*ke;Ue180;)h-=360;return h}}function yd(M,h){return h[0]-M[0]}function Lf(M){return M[1]-M[0]+1}function wu(M,h){return M[1]>=M[0]&&M[1]M[1])return[null,null];let b=Lf(M);if(h){if(b===2)return[M,null];let z=Math.floor(b/2);return[[M[0],M[0]+z],[M[0]+z,M[1]]]}if(b===1)return[M,null];let D=Math.floor(b/2)-1;return[[M[0],M[0]+D],[M[0]+D+1,M[1]]]}function Oh(M,h){if(!wu(h,M.length))return[1/0,1/0,-1/0,-1/0];let b=[1/0,1/0,-1/0,-1/0];for(let D=h[0];D<=h[1];++D)Cc(b,M[D]);return b}function hh(M){let h=[1/0,1/0,-1/0,-1/0];for(let b of M)for(let D of b)Cc(h,D);return h}function Gd(M){return M[0]!==-1/0&&M[1]!==-1/0&&M[2]!==1/0&&M[3]!==1/0}function Gl(M,h,b){if(!Gd(M)||!Gd(h))return NaN;let D=0,z=0;return M[2]h[2]&&(D=M[0]-h[2]),M[1]>h[3]&&(z=M[1]-h[3]),M[3]=D)return D;if(sh(z,G)){if(Hd(M,h))return 0}else if(Hd(h,M))return 0;let X=1/0;for(let Z of M)for(let re=0,Q=Z.length,he=Q-1;re0;){let re=X.pop();if(re[0]>=G)continue;let Q=re[1],he=h?50:100;if(Lf(Q)<=he){if(!wu(Q,M.length))return NaN;if(h){let oe=Pf(M,Q,b,D);if(isNaN(oe)||oe===0)return oe;G=Math.min(G,oe)}else for(let oe=Q[0];oe<=Q[1];++oe){let ke=dh(M[oe],b,D);if(G=Math.min(G,ke),G===0)return 0}}else{let oe=fh(Q,h);p0(X,G,D,M,Z,oe[0]),p0(X,G,D,M,Z,oe[1])}}return G}function Il(M,h,b,D,z,G=1/0){let X=Math.min(G,z.distance(M[0],b[0]));if(X===0)return X;let Z=new vd([[0,[0,M.length-1],[0,b.length-1]]],yd);for(;Z.length>0;){let re=Z.pop();if(re[0]>=X)continue;let Q=re[1],he=re[2],oe=h?50:100,ke=D?50:100;if(Lf(Q)<=oe&&Lf(he)<=ke){if(!wu(Q,M.length)&&wu(he,b.length))return NaN;let ge;if(h&&D)ge=Hl(M,Q,b,he,z),X=Math.min(X,ge);else if(h&&!D){let Ue=M.slice(Q[0],Q[1]+1);for(let je=he[0];je<=he[1];++je)if(ge=wl(b[je],Ue,z),X=Math.min(X,ge),X===0)return X}else if(!h&&D){let Ue=b.slice(he[0],he[1]+1);for(let je=Q[0];je<=Q[1];++je)if(ge=wl(M[je],Ue,z),X=Math.min(X,ge),X===0)return X}else ge=_d(M,Q,b,he,z),X=Math.min(X,ge)}else{let ge=fh(Q,h),Ue=fh(he,D);Tu(Z,X,z,M,b,ge[0],Ue[0]),Tu(Z,X,z,M,b,ge[0],Ue[1]),Tu(Z,X,z,M,b,ge[1],Ue[0]),Tu(Z,X,z,M,b,ge[1],Ue[1])}}return X}function g0(M){return M.type==="MultiPolygon"?M.coordinates.map((h=>({type:"Polygon",coordinates:h}))):M.type==="MultiLineString"?M.coordinates.map((h=>({type:"LineString",coordinates:h}))):M.type==="MultiPoint"?M.coordinates.map((h=>({type:"Point",coordinates:h}))):[M]}class Yu{constructor(h,b){this.type=At,this.geojson=h,this.geometries=b}static parse(h,b){if(h.length!==2)return b.error(`'distance' expression requires exactly one argument, but found ${h.length-1} instead.`);if(pa(h[1])){let D=h[1];if(D.type==="FeatureCollection")return new Yu(D,D.features.map((z=>g0(z.geometry))).flat());if(D.type==="Feature")return new Yu(D,g0(D.geometry));if("type"in D&&"coordinates"in D)return new Yu(D,g0(D))}return b.error("'distance' expression requires valid geojson object that contains polygon geometry type.")}evaluate(h){if(h.geometry()!=null&&h.canonicalID()!=null){if(h.geometryType()==="Point")return(function(b,D){let z=b.geometry(),G=z.flat().map((re=>ef([re.x,re.y],b.canonical)));if(z.length===0)return NaN;let X=new md(G[0][1]),Z=1/0;for(let re of D){switch(re.type){case"Point":Z=Math.min(Z,Il(G,!1,[re.coordinates],!1,X,Z));break;case"LineString":Z=Math.min(Z,Il(G,!1,re.coordinates,!0,X,Z));break;case"Polygon":Z=Math.min(Z,Au(G,!1,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries);if(h.geometryType()==="LineString")return(function(b,D){let z=b.geometry(),G=z.flat().map((re=>ef([re.x,re.y],b.canonical)));if(z.length===0)return NaN;let X=new md(G[0][1]),Z=1/0;for(let re of D){switch(re.type){case"Point":Z=Math.min(Z,Il(G,!0,[re.coordinates],!1,X,Z));break;case"LineString":Z=Math.min(Z,Il(G,!0,re.coordinates,!0,X,Z));break;case"Polygon":Z=Math.min(Z,Au(G,!0,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries);if(h.geometryType()==="Polygon")return(function(b,D){let z=b.geometry();if(z.length===0||z[0].length===0)return NaN;let G=uh(z,0).map((re=>re.map((Q=>Q.map((he=>ef([he.x,he.y],b.canonical))))))),X=new md(G[0][0][0][1]),Z=1/0;for(let re of D)for(let Q of G){switch(re.type){case"Point":Z=Math.min(Z,Au([re.coordinates],!1,Q,X,Z));break;case"LineString":Z=Math.min(Z,Au(re.coordinates,!0,Q,X,Z));break;case"Polygon":Z=Math.min(Z,xo(Q,re.coordinates,X,Z))}if(Z===0)return Z}return Z})(h,this.geometries)}return NaN}eachChild(){}outputDefined(){return!0}}class Nh{constructor(h){this.type=Jr,this.key=h}static parse(h,b){if(h.length!==2)return b.error(`Expected 1 argument, but found ${h.length-1} instead.`);let D=h[1];return D==null?b.error("Global state property must be defined."):typeof D!="string"?b.error(`Global state property must be string, but found ${typeof h[1]} instead.`):new Nh(D)}evaluate(h){var b;let D=(b=h.globals)===null||b===void 0?void 0:b.globalState;return D&&Object.keys(D).length!==0?bn(D,this.key):null}eachChild(){}outputDefined(){return!1}}let Tl={"==":kf,"!=":ah,">":Qc,"<":Od,">=":oh,"<=":uu,array:rs,at:Sa,boolean:rs,case:Pl,coalesce:Ef,collator:hc,format:Yo,image:Ro,in:ma,"index-of":Ps,interpolate:Uo,"interpolate-hcl":Uo,"interpolate-lab":Uo,length:is,let:Ja,literal:Ms,match:Ca,number:rs,"number-format":Fl,object:rs,slice:ll,step:lu,string:rs,"to-boolean":$s,"to-color":$s,"to-number":$s,"to-string":$s,var:ps,within:Wu,distance:Yu,"global-state":Nh};class jl{constructor(h,b,D,z){this.name=h,this.type=b,this._evaluate=D,this.args=z}evaluate(h){return this._evaluate(h,this.args)}eachChild(h){this.args.forEach(h)}outputDefined(){return!1}static parse(h,b){let D=h[0],z=jl.definitions[D];if(!z)return b.error(`Unknown expression "${D}". If you wanted a literal array, use ["literal", [...]].`,0);let G=Array.isArray(z)?z[0]:z.type,X=Array.isArray(z)?[[z[1],z[2]]]:z.overloads,Z=X.filter((([Q])=>!Array.isArray(Q)||Q.length===h.length-1)),re=null;for(let[Q,he]of Z){re=new Gu(b.registry,gc,b.path,null,b.scope);let oe=[],ke=!1;for(let ge=1;ge{return ke=oe,Array.isArray(ke)?`(${ke.map(Xi).join(", ")})`:`(${Xi(ke.type)}...)`;var ke})).join(" | "),he=[];for(let oe=1;oe{b=h?b&&gc(D):b&&D instanceof Ms})),!!b&&of(M)&&bd(M,["zoom","heatmap-density","elevation","line-progress","accumulated","is-supported-script"])}function of(M){if(M instanceof jl&&(M.name==="get"&&M.args.length===1||M.name==="feature-state"||M.name==="has"&&M.args.length===1||M.name==="properties"||M.name==="geometry-type"||M.name==="id"||/^filter-/.test(M.name))||M instanceof Wu||M instanceof Yu)return!1;let h=!0;return M.eachChild((b=>{h&&!of(b)&&(h=!1)})),h}function sf(M){if(M instanceof jl&&M.name==="feature-state")return!1;let h=!0;return M.eachChild((b=>{h&&!sf(b)&&(h=!1)})),h}function bd(M,h){if(M instanceof jl&&h.indexOf(M.name)>=0)return!1;let b=!0;return M.eachChild((D=>{b&&!bd(D,h)&&(b=!1)})),b}function Gh(M){return{result:"success",value:M}}function Xu(M){return{result:"error",value:M}}function Pc(M){return M["property-type"]==="data-driven"||M["property-type"]==="cross-faded-data-driven"}function Ff(M){return!!M.expression&&M.expression.parameters.indexOf("zoom")>-1}function Df(M){return!!M.expression&&M.expression.interpolated}function La(M){return M instanceof Number?"number":M instanceof String?"string":M instanceof Boolean?"boolean":Array.isArray(M)?"array":M===null?"null":typeof M}function Rf(M){return typeof M=="object"&&M!==null&&!Array.isArray(M)&&la(M)===rn}function m0(M){return M}function wd(M,h){let b=M.stops&&typeof M.stops[0][0]=="object",D=b||!(b||M.property!==void 0),z=M.type||(Df(h)?"exponential":"interval"),G=(function(he){switch(he.type){case"color":return ii.parse;case"padding":return Ka.parse;case"numberArray":return Oa.parse;case"colorArray":return Ni.parse;default:return null}})(h);if(G&&((M=Fr({},M)).stops&&(M.stops=M.stops.map((he=>[he[0],G(he[1])]))),M.default=G(M.default?M.default:h.default)),M.colorSpace&&(X=M.colorSpace)!=="rgb"&&X!=="hcl"&&X!=="lab")throw new Error(`Unknown color space: "${M.colorSpace}"`);var X;let Z=(function(he){switch(he){case"exponential":return Td;case"interval":return y0;case"categorical":return X0;case"identity":return ul;default:throw new Error(`Unknown function type "${he}"`)}})(z),re,Q;if(z==="categorical"){re=Object.create(null);for(let he of M.stops)re[he[0]]=he[1];Q=typeof M.stops[0][0]}if(b){let he={},oe=[];for(let Ue=0;UeUe[0])),evaluate:({zoom:Ue},je)=>Td({stops:ke,base:M.base},h,Ue).evaluate(Ue,je)}}if(D){let he=z==="exponential"?{name:"exponential",base:M.base!==void 0?M.base:1}:null;return{kind:"camera",interpolationType:he,interpolationFactor:Uo.interpolationFactor.bind(void 0,he),zoomStops:M.stops.map((oe=>oe[0])),evaluate:({zoom:oe})=>Z(M,h,oe,re,Q)}}return{kind:"source",evaluate(he,oe){let ke=oe&&oe.properties?oe.properties[M.property]:void 0;return ke===void 0?Hh(M.default,h.default):Z(M,h,ke,re,Q)}}}function Hh(M,h,b){return M!==void 0?M:h!==void 0?h:b!==void 0?b:void 0}function X0(M,h,b,D,z){return Hh(typeof b===z?D[b]:void 0,M.default,h.default)}function y0(M,h,b){if(La(b)!=="number")return Hh(M.default,h.default);let D=M.stops.length;if(D===1||b<=M.stops[0][0])return M.stops[0][1];if(b>=M.stops[D-1][0])return M.stops[D-1][1];let z=Jc(M.stops.map((G=>G[0])),b);return M.stops[z][1]}function Td(M,h,b){let D=M.base!==void 0?M.base:1;if(La(b)!=="number")return Hh(M.default,h.default);let z=M.stops.length;if(z===1||b<=M.stops[0][0])return M.stops[0][1];if(b>=M.stops[z-1][0])return M.stops[z-1][1];let G=Jc(M.stops.map((he=>he[0])),b),X=(function(he,oe,ke,ge){let Ue=ge-ke,je=he-ke;return Ue===0?0:oe===1?je/Ue:(Math.pow(oe,je)-1)/(Math.pow(oe,Ue)-1)})(b,D,M.stops[G][0],M.stops[G+1][0]),Z=M.stops[G][1],re=M.stops[G+1][1],Q=Ks[h.type]||m0;return typeof Z.evaluate=="function"?{evaluate(...he){let oe=Z.evaluate.apply(void 0,he),ke=re.evaluate.apply(void 0,he);if(oe!==void 0&&ke!==void 0)return Q(oe,ke,X,M.colorSpace)}}:Q(Z,re,X,M.colorSpace)}function ul(M,h,b){switch(h.type){case"color":b=ii.parse(b);break;case"formatted":b=$a.fromString(b.toString());break;case"resolvedImage":b=so.fromString(b.toString());break;case"padding":b=Ka.parse(b);break;case"colorArray":b=Ni.parse(b);break;case"numberArray":b=Oa.parse(b);break;default:La(b)===h.type||h.type==="enum"&&h.values[b]||(b=void 0)}return Hh(b,M.default,h.default)}jl.register(Tl,{error:[{kind:"error"},[Vt],(M,[h])=>{throw new ka(h.evaluate(M))}],typeof:[Vt,[Jr],(M,[h])=>Xi(la(h.evaluate(M)))],"to-rgba":[va(At,4),[Ut],(M,[h])=>{let[b,D,z,G]=h.evaluate(M).rgb;return[255*b,255*D,255*z,G]}],rgb:[Ut,[At,At,At],Uh],rgba:[Ut,[At,At,At,At],Uh],has:{type:Qt,overloads:[[[Vt],(M,[h])=>Vh(h.evaluate(M),M.properties())],[[Vt,rn],(M,[h,b])=>Vh(h.evaluate(M),b.evaluate(M))]]},get:{type:Jr,overloads:[[[Vt],(M,[h])=>jd(h.evaluate(M),M.properties())],[[Vt,rn],(M,[h,b])=>jd(h.evaluate(M),b.evaluate(M))]]},"feature-state":[Jr,[Vt],(M,[h])=>jd(h.evaluate(M),M.featureState||{})],properties:[rn,[],M=>M.properties()],"geometry-type":[Vt,[],M=>M.geometryType()],id:[Jr,[],M=>M.id()],zoom:[At,[],M=>M.globals.zoom],"heatmap-density":[At,[],M=>M.globals.heatmapDensity||0],elevation:[At,[],M=>M.globals.elevation||0],"line-progress":[At,[],M=>M.globals.lineProgress||0],accumulated:[Jr,[],M=>M.globals.accumulated===void 0?null:M.globals.accumulated],"+":[At,pc(At),(M,h)=>{let b=0;for(let D of h)b+=D.evaluate(M);return b}],"*":[At,pc(At),(M,h)=>{let b=1;for(let D of h)b*=D.evaluate(M);return b}],"-":{type:At,overloads:[[[At,At],(M,[h,b])=>h.evaluate(M)-b.evaluate(M)],[[At],(M,[h])=>-h.evaluate(M)]]},"/":[At,[At,At],(M,[h,b])=>h.evaluate(M)/b.evaluate(M)],"%":[At,[At,At],(M,[h,b])=>h.evaluate(M)%b.evaluate(M)],ln2:[At,[],()=>Math.LN2],pi:[At,[],()=>Math.PI],e:[At,[],()=>Math.E],"^":[At,[At,At],(M,[h,b])=>Math.pow(h.evaluate(M),b.evaluate(M))],sqrt:[At,[At],(M,[h])=>Math.sqrt(h.evaluate(M))],log10:[At,[At],(M,[h])=>Math.log(h.evaluate(M))/Math.LN10],ln:[At,[At],(M,[h])=>Math.log(h.evaluate(M))],log2:[At,[At],(M,[h])=>Math.log(h.evaluate(M))/Math.LN2],sin:[At,[At],(M,[h])=>Math.sin(h.evaluate(M))],cos:[At,[At],(M,[h])=>Math.cos(h.evaluate(M))],tan:[At,[At],(M,[h])=>Math.tan(h.evaluate(M))],asin:[At,[At],(M,[h])=>Math.asin(h.evaluate(M))],acos:[At,[At],(M,[h])=>Math.acos(h.evaluate(M))],atan:[At,[At],(M,[h])=>Math.atan(h.evaluate(M))],min:[At,pc(At),(M,h)=>Math.min(...h.map((b=>b.evaluate(M))))],max:[At,pc(At),(M,h)=>Math.max(...h.map((b=>b.evaluate(M))))],abs:[At,[At],(M,[h])=>Math.abs(h.evaluate(M))],round:[At,[At],(M,[h])=>{let b=h.evaluate(M);return b<0?-Math.round(-b):Math.round(b)}],floor:[At,[At],(M,[h])=>Math.floor(h.evaluate(M))],ceil:[At,[At],(M,[h])=>Math.ceil(h.evaluate(M))],"filter-==":[Qt,[Vt,Jr],(M,[h,b])=>M.properties()[h.value]===b.value],"filter-id-==":[Qt,[Jr],(M,[h])=>M.id()===h.value],"filter-type-==":[Qt,[Vt],(M,[h])=>M.geometryType()===h.value],"filter-<":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D{let b=M.id(),D=h.value;return typeof b==typeof D&&b":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D>z}],"filter-id->":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b>D}],"filter-<=":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D<=z}],"filter-id-<=":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b<=D}],"filter->=":[Qt,[Vt,Jr],(M,[h,b])=>{let D=M.properties()[h.value],z=b.value;return typeof D==typeof z&&D>=z}],"filter-id->=":[Qt,[Jr],(M,[h])=>{let b=M.id(),D=h.value;return typeof b==typeof D&&b>=D}],"filter-has":[Qt,[Jr],(M,[h])=>h.value in M.properties()],"filter-has-id":[Qt,[],M=>M.id()!==null&&M.id()!==void 0],"filter-type-in":[Qt,[va(Vt)],(M,[h])=>h.value.indexOf(M.geometryType())>=0],"filter-id-in":[Qt,[va(Jr)],(M,[h])=>h.value.indexOf(M.id())>=0],"filter-in-small":[Qt,[Vt,va(Jr)],(M,[h,b])=>b.value.indexOf(M.properties()[h.value])>=0],"filter-in-large":[Qt,[Vt,va(Jr)],(M,[h,b])=>(function(D,z,G,X){for(;G<=X;){let Z=G+X>>1;if(z[Z]===D)return!0;z[Z]>D?X=Z-1:G=Z+1}return!1})(M.properties()[h.value],b.value,0,b.value.length-1)],all:{type:Qt,overloads:[[[Qt,Qt],(M,[h,b])=>h.evaluate(M)&&b.evaluate(M)],[pc(Qt),(M,h)=>{for(let b of h)if(!b.evaluate(M))return!1;return!0}]]},any:{type:Qt,overloads:[[[Qt,Qt],(M,[h,b])=>h.evaluate(M)||b.evaluate(M)],[pc(Qt),(M,h)=>{for(let b of h)if(b.evaluate(M))return!0;return!1}]]},"!":[Qt,[Qt],(M,[h])=>!h.evaluate(M)],"is-supported-script":[Qt,[Vt],(M,[h])=>{let b=M.globals&&M.globals.isSupportedScript;return!b||b(h.evaluate(M))}],upcase:[Vt,[Vt],(M,[h])=>h.evaluate(M).toUpperCase()],downcase:[Vt,[Vt],(M,[h])=>h.evaluate(M).toLowerCase()],concat:[Vt,pc(Jr),(M,h)=>h.map((b=>As(b.evaluate(M)))).join("")],split:[va(Vt),[Vt,Vt],(M,[h,b])=>h.evaluate(M).split(b.evaluate(M))],join:[Vt,[va(Vt),Vt],(M,[h,b])=>h.evaluate(M).join(b.evaluate(M))],"resolved-locale":[Vt,[qn],(M,[h])=>h.evaluate(M).resolvedLocale()]});class Wl{constructor(h,b,D){this.expression=h,this._warningHistory={},this._evaluator=new _u,this._defaultValue=b?(function(z){if(z.type==="color"&&Rf(z.default))return new ii(0,0,0,0);switch(z.type){case"color":return ii.parse(z.default)||null;case"padding":return Ka.parse(z.default)||null;case"numberArray":return Oa.parse(z.default)||null;case"colorArray":return Ni.parse(z.default)||null;case"variableAnchorOffsetCollection":return yo.parse(z.default)||null;case"projectionDefinition":return oo.parse(z.default)||null;default:return z.default===void 0?null:z.default}})(b):null,this._enumValues=b&&b.type==="enum"?b.values:null,this._globalState=D}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._evaluator.globals=h,this._evaluator.feature=b,this._evaluator.featureState=D,this._evaluator.canonical=z,this._evaluator.availableImages=G||null,this._evaluator.formattedSection=X,this.expression.evaluate(this._evaluator)}evaluate(h,b,D,z,G,X){this._globalState&&(h=hr(h,this._globalState)),this._evaluator.globals=h,this._evaluator.feature=b||null,this._evaluator.featureState=D||null,this._evaluator.canonical=z,this._evaluator.availableImages=G||null,this._evaluator.formattedSection=X||null;try{let Z=this.expression.evaluate(this._evaluator);if(Z==null||typeof Z=="number"&&Z!=Z)return this._defaultValue;if(this._enumValues&&!(Z in this._enumValues))throw new ka(`Expected value to be one of ${Object.keys(this._enumValues).map((re=>JSON.stringify(re))).join(", ")}, but found ${JSON.stringify(Z)} instead.`);return Z}catch(Z){return this._warningHistory[Z.message]||(this._warningHistory[Z.message]=!0,typeof console!="undefined"&&console.warn(Z.message)),this._defaultValue}}}function If(M){return Array.isArray(M)&&M.length>0&&typeof M[0]=="string"&&M[0]in Tl}function vh(M,h,b){let D=new Gu(Tl,gc,[],h?(function(G){let X={color:Ut,string:Vt,number:At,enum:Vt,boolean:Qt,formatted:ri,padding:Jn,numberArray:Vi,colorArray:Ii,projectionDefinition:_r,resolvedImage:ra,variableAnchorOffsetCollection:ha};return G.type==="array"?va(X[G.value]||Jr,G.length):X[G.type]})(h):void 0),z=D.parse(M,void 0,void 0,void 0,h&&h.type==="string"?{typeAnnotation:"coerce"}:void 0);return z?Gh(new Wl(z,h,b)):Xu(D.errors)}class zf{constructor(h,b,D){this.kind=h,this._styleExpression=b,this.isStateDependent=h!=="constant"&&!sf(b.expression),this.globalStateRefs=zt(b.expression),this._globalState=D}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(h,b,D,z,G,X)}evaluate(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluate(h,b,D,z,G,X)}}class qf{constructor(h,b,D,z,G){this.kind=h,this.zoomStops=D,this._styleExpression=b,this.isStateDependent=h!=="camera"&&!sf(b.expression),this.globalStateRefs=zt(b.expression),this.interpolationType=z,this._globalState=G}evaluateWithoutErrorHandling(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluateWithoutErrorHandling(h,b,D,z,G,X)}evaluate(h,b,D,z,G,X){return this._globalState&&(h=hr(h,this._globalState)),this._styleExpression.evaluate(h,b,D,z,G,X)}interpolationFactor(h,b,D){return this.interpolationType?Uo.interpolationFactor(this.interpolationType,h,b,D):0}}function Ze(M,h,b){let D=vh(M,h,b);if(D.result==="error")return D;let z=D.value.expression,G=of(z);if(!G&&!Pc(h))return Xu([new Zr("","data expressions not supported")]);let X=bd(z,["zoom"]);if(!X&&!Ff(h))return Xu([new Zr("","zoom expressions not supported")]);let Z=Wt(z);return Z||X?Z instanceof Zr?Xu([Z]):Z instanceof Uo&&!Df(h)?Xu([new Zr("",'"interpolate" expressions cannot be used with this property')]):Gh(Z?new qf(G?"camera":"composite",D.value,Z.labels,Z instanceof Uo?Z.interpolation:void 0,b):new zf(G?"constant":"source",D.value,b)):Xu([new Zr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.')])}class yt{constructor(h,b){this._parameters=h,this._specification=b,Fr(this,wd(this._parameters,this._specification))}static deserialize(h){return new yt(h._parameters,h._specification)}static serialize(h){return{_parameters:h._parameters,_specification:h._specification}}}function Wt(M){let h=null;if(M instanceof Ja)h=Wt(M.result);else if(M instanceof Ef){for(let b of M.args)if(h=Wt(b),h)break}else(M instanceof lu||M instanceof Uo)&&M.input instanceof jl&&M.input.name==="zoom"&&(h=M);return h instanceof Zr||M.eachChild((b=>{let D=Wt(b);D instanceof Zr?h=D:!h&&D?h=new Zr("",'"zoom" expression may only be used as input to a top-level "step" or "interpolate" expression.'):h&&D&&h!==D&&(h=new Zr("",'Only one zoom-based "step" or "interpolate" subexpression may be used in an expression.'))})),h}function zt(M,h=new Set){return M instanceof Nh&&h.add(M.key),M.eachChild((b=>{zt(b,h)})),h}function hr(M,h){let{zoom:b,heatmapDensity:D,elevation:z,lineProgress:G,isSupportedScript:X,accumulated:Z}=M!=null?M:{};return{zoom:b,heatmapDensity:D,elevation:z,lineProgress:G,isSupportedScript:X,accumulated:Z,globalState:h}}function Ur(M){if(M===!0||M===!1)return!0;if(!Array.isArray(M)||M.length===0)return!1;switch(M[0]){case"has":return M.length>=2&&M[1]!=="$id"&&M[1]!=="$type";case"in":return M.length>=3&&(typeof M[1]!="string"||Array.isArray(M[2]));case"!in":case"!has":case"none":return!1;case"==":case"!=":case">":case">=":case"<":case"<=":return M.length!==3||Array.isArray(M[1])||Array.isArray(M[2]);case"any":case"all":for(let h of M.slice(1))if(!Ur(h)&&typeof h!="boolean")return!1;return!0;default:return!0}}let Qr={type:"boolean",default:!1,transition:!1,"property-type":"data-driven",expression:{interpolated:!1,parameters:["zoom","feature"]}};function cn(M,h){if(M==null)return{filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set};Ur(M)||(M=en(M));let b=vh(M,Qr,h);if(b.result==="error")throw new Error(b.value.map((D=>`${D.key}: ${D.message}`)).join(", "));return{filter:(D,z,G)=>b.value.evaluate(D,z,{},G),needGeometry:Fn(M),getGlobalStateRefs:()=>zt(b.value.expression)}}function yn(M,h){return Mh?1:0}function Fn(M){if(!Array.isArray(M))return!1;if(M[0]==="within"||M[0]==="distance")return!0;for(let h=1;h"||h==="<="||h===">="?vn(M[1],M[2],h):h==="any"?(b=M.slice(1),["any"].concat(b.map(en))):h==="all"?["all"].concat(M.slice(1).map(en)):h==="none"?["all"].concat(M.slice(1).map(en).map(On)):h==="in"?mn(M[1],M.slice(2)):h==="!in"?On(mn(M[1],M.slice(2))):h==="has"?Pn(M[1]):h!=="!has"||On(Pn(M[1]));var b}function vn(M,h,b){switch(M){case"$type":return[`filter-type-${b}`,h];case"$id":return[`filter-id-${b}`,h];default:return[`filter-${b}`,M,h]}}function mn(M,h){if(h.length===0)return!1;switch(M){case"$type":return["filter-type-in",["literal",h]];case"$id":return["filter-id-in",["literal",h]];default:return h.length>200&&!h.some((b=>typeof b!=typeof h[0]))?["filter-in-large",M,["literal",h.sort(yn)]]:["filter-in-small",M,["literal",h]]}}function Pn(M){switch(M){case"$type":return!0;case"$id":return["filter-has-id"];default:return["filter-has",M]}}function On(M){return["!",M]}function ki(M){let h=typeof M;if(h==="number"||h==="boolean"||h==="string"||M==null)return JSON.stringify(M);if(Array.isArray(M)){let z="[";for(let G of M)z+=`${ki(G)},`;return`${z}]`}let b=Object.keys(M).sort(),D="{";for(let z=0;zD.maximum?[new xr(h,b,`${b} is greater than the maximum value ${D.maximum}`)]:[]}function Ha(M){let h=M.valueSpec,b=pi(M.value.type),D,z,G,X={},Z=b!=="categorical"&&M.value.property===void 0,re=!Z,Q=La(M.value.stops)==="array"&&La(M.value.stops[0])==="array"&&La(M.value.stops[0][0])==="object",he=Gn({key:M.key,value:M.value,valueSpec:M.styleSpec.function,validateSpec:M.validateSpec,style:M.style,styleSpec:M.styleSpec,objectElementValidators:{stops:function(ge){if(b==="identity")return[new xr(ge.key,ge.value,'identity function may not have a "stops" property')];let Ue=[],je=ge.value;return Ue=Ue.concat(Zi({key:ge.key,value:je,valueSpec:ge.valueSpec,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec,arrayElementValidator:oe})),La(je)==="array"&&je.length===0&&Ue.push(new xr(ge.key,je,"array must have at least one stop")),Ue},default:function(ge){return ge.validateSpec({key:ge.key,value:ge.value,valueSpec:h,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec})}}});return b==="identity"&&Z&&he.push(new xr(M.key,M.value,'missing required property "property"')),b==="identity"||M.value.stops||he.push(new xr(M.key,M.value,'missing required property "stops"')),b==="exponential"&&M.valueSpec.expression&&!Df(M.valueSpec)&&he.push(new xr(M.key,M.value,"exponential functions not supported")),M.styleSpec.$version>=8&&(re&&!Pc(M.valueSpec)?he.push(new xr(M.key,M.value,"property functions not supported")):Z&&!Ff(M.valueSpec)&&he.push(new xr(M.key,M.value,"zoom functions not supported"))),b!=="categorical"&&!Q||M.value.property!==void 0||he.push(new xr(M.key,M.value,'"property" property is required')),he;function oe(ge){let Ue=[],je=ge.value,vt=ge.key;if(La(je)!=="array")return[new xr(vt,je,`array expected, ${La(je)} found`)];if(je.length!==2)return[new xr(vt,je,`array length 2 expected, length ${je.length} found`)];if(Q){if(La(je[0])!=="object")return[new xr(vt,je,`object expected, ${La(je[0])} found`)];if(je[0].zoom===void 0)return[new xr(vt,je,"object stop key must have zoom")];if(je[0].value===void 0)return[new xr(vt,je,"object stop key must have value")];if(G&&G>pi(je[0].zoom))return[new xr(vt,je[0].zoom,"stop zoom values must appear in ascending order")];pi(je[0].zoom)!==G&&(G=pi(je[0].zoom),z=void 0,X={}),Ue=Ue.concat(Gn({key:`${vt}[0]`,value:je[0],valueSpec:{zoom:{}},validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec,objectElementValidators:{zoom:na,value:ke}}))}else Ue=Ue.concat(ke({key:`${vt}[0]`,value:je[0],validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec},je));return If(Un(je[1]))?Ue.concat([new xr(`${vt}[1]`,je[1],"expressions are not allowed in function stops.")]):Ue.concat(ge.validateSpec({key:`${vt}[1]`,value:je[1],valueSpec:h,validateSpec:ge.validateSpec,style:ge.style,styleSpec:ge.styleSpec}))}function ke(ge,Ue){let je=La(ge.value),vt=pi(ge.value),gt=ge.value!==null?ge.value:Ue;if(D){if(je!==D)return[new xr(ge.key,gt,`${je} stop domain type must match previous stop domain type ${D}`)]}else D=je;if(je!=="number"&&je!=="string"&&je!=="boolean")return[new xr(ge.key,gt,"stop domain value must be a number, string, or boolean")];if(je!=="number"&&b!=="categorical"){let It=`number expected, ${je} found`;return Pc(h)&&b===void 0&&(It+='\nIf you intended to use a categorical function, specify `"type": "categorical"`.'),[new xr(ge.key,gt,It)]}return b!=="categorical"||je!=="number"||isFinite(vt)&&Math.floor(vt)===vt?b!=="categorical"&&je==="number"&&z!==void 0&&vtnew xr(`${M.key}${D.key}`,M.value,D.message)));let b=h.value.expression||h.value._styleExpression.expression;if(M.expressionContext==="property"&&M.propertyKey==="text-font"&&!b.outputDefined())return[new xr(M.key,M.value,`Invalid data expression for "${M.propertyKey}". Output values must be contained as literals within the expression.`)];if(M.expressionContext==="property"&&M.propertyType==="layout"&&!sf(b))return[new xr(M.key,M.value,'"feature-state" data expressions are not supported with layout properties.')];if(M.expressionContext==="filter"&&!sf(b))return[new xr(M.key,M.value,'"feature-state" data expressions are not supported with filters.')];if(M.expressionContext&&M.expressionContext.indexOf("cluster")===0){if(!bd(b,["zoom","feature-state"]))return[new xr(M.key,M.value,'"zoom" and "feature-state" expressions are not supported with cluster properties.')];if(M.expressionContext==="cluster-initial"&&!of(b))return[new xr(M.key,M.value,"Feature data expressions are not supported with initial expression part of cluster properties.")]}return[]}function Ya(M){let h=M.key,b=M.value,D=La(b);return D!=="string"?[new xr(h,b,`color expected, ${D} found`)]:ii.parse(String(b))?[]:[new xr(h,b,`color expected, "${b}" found`)]}function ho(M){let h=M.key,b=M.value,D=M.valueSpec,z=[];return Array.isArray(D.values)?D.values.indexOf(pi(b))===-1&&z.push(new xr(h,b,`expected one of [${D.values.join(", ")}], ${JSON.stringify(b)} found`)):Object.keys(D.values).indexOf(pi(b))===-1&&z.push(new xr(h,b,`expected one of [${Object.keys(D.values).join(", ")}], ${JSON.stringify(b)} found`)),z}function Pa(M){return Ur(Un(M.value))?Qa(Fr({},M,{expressionContext:"filter",valueSpec:{value:"boolean"}})):Js(M)}function Js(M){let h=M.value,b=M.key;if(La(h)!=="array")return[new xr(b,h,`array expected, ${La(h)} found`)];let D=M.styleSpec,z,G=[];if(h.length<1)return[new xr(b,h,"filter array must have at least 1 element")];switch(G=G.concat(ho({key:`${b}[0]`,value:h[0],valueSpec:D.filter_operator,style:M.style,styleSpec:M.styleSpec})),pi(h[0])){case"<":case"<=":case">":case">=":h.length>=2&&pi(h[1])==="$type"&&G.push(new xr(b,h,`"$type" cannot be use with operator "${h[0]}"`));case"==":case"!=":h.length!==3&&G.push(new xr(b,h,`filter array for operator "${h[0]}" must have 3 elements`));case"in":case"!in":h.length>=2&&(z=La(h[1]),z!=="string"&&G.push(new xr(`${b}[1]`,h[1],`string expected, ${z} found`)));for(let X=2;X{oe in z&&D.push(new xr(G,z[oe],`"${oe}" is prohibited for ref layers`))})),X.layers.forEach((oe=>{pi(oe.id)===Q&&(he=oe)})),he?he.ref?D.push(new xr(G,z.ref,"ref cannot reference another ref layer")):re=pi(he.type):D.push(new xr(G,z.ref,`ref layer "${Q}" not found`))}else if(re!=="background")if(z.source){let he=X.sources&&X.sources[z.source],oe=he&&pi(he.type);he?oe==="vector"&&re==="raster"?D.push(new xr(G,z.source,`layer "${z.id}" requires a raster source`)):oe!=="raster-dem"&&re==="hillshade"||oe!=="raster-dem"&&re==="color-relief"?D.push(new xr(G,z.source,`layer "${z.id}" requires a raster-dem source`)):oe==="raster"&&re!=="raster"?D.push(new xr(G,z.source,`layer "${z.id}" requires a vector source`)):oe!=="vector"||z["source-layer"]?oe==="raster-dem"&&re!=="hillshade"&&re!=="color-relief"?D.push(new xr(G,z.source,"raster-dem source can only be used with layer type 'hillshade' or 'color-relief'.")):re!=="line"||!z.paint||!z.paint["line-gradient"]||oe==="geojson"&&he.lineMetrics||D.push(new xr(G,z,`layer "${z.id}" specifies a line-gradient, which requires a GeoJSON source with \`lineMetrics\` enabled.`)):D.push(new xr(G,z,`layer "${z.id}" must specify a "source-layer"`)):D.push(new xr(G,z.source,`source "${z.source}" not found`))}else D.push(new xr(G,z,'missing required property "source"'));return re==="raster"&&(!((h=z.paint)===null||h===void 0)&&h.resampling)&&(!((b=z.paint)===null||b===void 0)&&b["raster-resampling"])&&D.push(new xr(G,z.paint,`layer "${z.id}" redundantly specifies "resampling" and "raster-resampling" paint properties, but only one is allowed. It is advised to use "resampling".`)),D=D.concat(Gn({key:G,value:z,valueSpec:Z.layer,style:M.style,styleSpec:M.styleSpec,validateSpec:M.validateSpec,objectElementValidators:{"*":()=>[],type:()=>M.validateSpec({key:`${G}.type`,value:z.type,valueSpec:Z.layer.type,style:M.style,styleSpec:M.styleSpec,validateSpec:M.validateSpec,object:z,objectKey:"type"}),filter:Pa,layout:he=>Gn({layer:z,key:he.key,value:he.value,style:he.style,styleSpec:he.styleSpec,validateSpec:he.validateSpec,objectElementValidators:{"*":oe=>oi(Fr({layerType:re},oe))}}),paint:he=>Gn({layer:z,key:he.key,value:he.value,style:he.style,styleSpec:he.styleSpec,validateSpec:he.validateSpec,objectElementValidators:{"*":oe=>Io(Fr({layerType:re},oe))}})}})),D}function Go(M){let h=M.value,b=M.key,D=La(h);return D!=="string"?[new xr(b,h,`string expected, ${D} found`)]:[]}let Qs={promoteId:function({key:M,value:h}){if(La(h)==="string")return Go({key:M,value:h});{let b=[];for(let D in h)b.push(...Go({key:`${M}.${D}`,value:h[D]}));return b}}};function zl(M){let h=M.value,b=M.key,D=M.styleSpec,z=M.style,G=M.validateSpec;if(!h.type)return[new xr(b,h,'"type" is required')];let X=pi(h.type),Z;switch(X){case"vector":case"raster":return Z=Gn({key:b,value:h,valueSpec:D[`source_${X.replace("-","_")}`],style:M.style,styleSpec:D,objectElementValidators:Qs,validateSpec:G}),Z;case"raster-dem":return Z=(function(re){var Q;let he=(Q=re.sourceName)!==null&&Q!==void 0?Q:"",oe=re.value,ke=re.styleSpec,ge=ke.source_raster_dem,Ue=re.style,je=[],vt=La(oe);if(oe===void 0)return je;if(vt!=="object")return je.push(new xr("source_raster_dem",oe,`object expected, ${vt} found`)),je;let gt=pi(oe.encoding)==="custom",It=["redFactor","greenFactor","blueFactor","baseShift"],_t=re.value.encoding?`"${re.value.encoding}"`:"Default";for(let qt in oe)!gt&&It.includes(qt)?je.push(new xr(qt,oe[qt],`In "${he}": "${qt}" is only valid when "encoding" is set to "custom". ${_t} encoding found`)):ge[qt]?je=je.concat(re.validateSpec({key:qt,value:oe[qt],valueSpec:ge[qt],validateSpec:re.validateSpec,style:Ue,styleSpec:ke})):je.push(new xr(qt,oe[qt],`unknown property "${qt}"`));return je})({sourceName:b,value:h,style:M.style,styleSpec:D,validateSpec:G}),Z;case"geojson":if(Z=Gn({key:b,value:h,valueSpec:D.source_geojson,style:z,styleSpec:D,validateSpec:G,objectElementValidators:Qs}),h.cluster)for(let re in h.clusterProperties){let[Q,he]=h.clusterProperties[re],oe=typeof Q=="string"?[Q,["accumulated"],["get",re]]:Q;Z.push(...Qa({key:`${b}.${re}.map`,value:he,expressionContext:"cluster-map"})),Z.push(...Qa({key:`${b}.${re}.reduce`,value:oe,expressionContext:"cluster-reduce"}))}return Z;case"video":return Gn({key:b,value:h,valueSpec:D.source_video,style:z,validateSpec:G,styleSpec:D});case"image":return Gn({key:b,value:h,valueSpec:D.source_image,style:z,validateSpec:G,styleSpec:D});case"canvas":return[new xr(b,null,"Please use runtime APIs to add canvas sources, rather than including them in stylesheets.","source.canvas")];default:return ho({key:`${b}.type`,value:h.type,valueSpec:{values:["vector","raster","raster-dem","geojson","video","image"]}})}}function cu(M){let h=M.value,b=M.styleSpec,D=b.light,z=M.style,G=[],X=La(h);if(h===void 0)return G;if(X!=="object")return G=G.concat([new xr("light",h,`object expected, ${X} found`)]),G;for(let Z in h){let re=Z.match(/^(.*)-transition$/);G=G.concat(re&&D[re[1]]&&D[re[1]].transition?M.validateSpec({key:Z,value:h[Z],valueSpec:b.transition,validateSpec:M.validateSpec,style:z,styleSpec:b}):D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],validateSpec:M.validateSpec,style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)])}return G}function Zu(M){let h=M.value,b=M.styleSpec,D=b.sky,z=M.style,G=La(h);if(h===void 0)return[];if(G!=="object")return[new xr("sky",h,`object expected, ${G} found`)];let X=[];for(let Z in h)X=X.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return X}function mc(M){let h=M.value,b=M.styleSpec,D=b.terrain,z=M.style,G=[],X=La(h);if(h===void 0)return G;if(X!=="object")return G=G.concat([new xr("terrain",h,`object expected, ${X} found`)]),G;for(let Z in h)G=G.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],validateSpec:M.validateSpec,style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return G}function Yl(M){let h=[],b=M.value,D=M.key;if(Array.isArray(b)){let z=[],G=[];for(let X in b)b[X].id&&z.includes(b[X].id)&&h.push(new xr(D,b,`all the sprites' ids must be unique, but ${b[X].id} is duplicated`)),z.push(b[X].id),b[X].url&&G.includes(b[X].url)&&h.push(new xr(D,b,`all the sprites' URLs must be unique, but ${b[X].url} is duplicated`)),G.push(b[X].url),h=h.concat(Gn({key:`${D}[${X}]`,value:b[X],valueSpec:{id:{type:"string",required:!0},url:{type:"string",required:!0}},validateSpec:M.validateSpec}));return h}return Go({key:D,value:b})}function lf(M){return!!M&&M.constructor===Object}function $u(M){return lf(M.value)?[]:[new xr(M.key,M.value,`object expected, ${La(M.value)} found`)]}let ph={"*":()=>[],array:Zi,boolean:function(M){let h=M.value,b=M.key,D=La(h);return D!=="boolean"?[new xr(b,h,`boolean expected, ${D} found`)]:[]},number:na,color:Ya,constants:qi,enum:ho,filter:Pa,function:Ha,layer:ro,object:Gn,source:zl,light:cu,sky:Zu,terrain:mc,projection:function(M){let h=M.value,b=M.styleSpec,D=b.projection,z=M.style,G=La(h);if(h===void 0)return[];if(G!=="object")return[new xr("projection",h,`object expected, ${G} found`)];let X=[];for(let Z in h)X=X.concat(D[Z]?M.validateSpec({key:Z,value:h[Z],valueSpec:D[Z],style:z,styleSpec:b}):[new xr(Z,h[Z],`unknown property "${Z}"`)]);return X},projectionDefinition:function(M){let h=M.key,b=M.value;b=b instanceof String?b.valueOf():b;let D=La(b);return D!=="array"||(function(z){return Array.isArray(z)&&z.length===3&&typeof z[0]=="string"&&typeof z[1]=="string"&&typeof z[2]=="number"})(b)||(function(z){return!!["interpolate","step","literal"].includes(z[0])})(b)?["array","string"].includes(D)?[]:[new xr(h,b,`projection expected, invalid type "${D}" found`)]:[new xr(h,b,`projection expected, invalid array ${JSON.stringify(b)} found`)]},string:Go,formatted:function(M){return Go(M).length===0?[]:Qa(M)},resolvedImage:function(M){return Go(M).length===0?[]:Qa(M)},padding:function(M){let h=M.key,b=M.value;if(La(b)==="array"){if(b.length<1||b.length>4)return[new xr(h,b,`padding requires 1 to 4 values; ${b.length} values found`)];let D={type:"number"},z=[];for(let G=0;G[]}})),M.constants&&(b=b.concat(qi({key:"constants",value:M.constants}))),Ju(b)}function fu(M){return function(h){return M(Object.assign({},h,{validateSpec:gh}))}}function Ju(M){return[].concat(M).sort(((h,b)=>h.line-b.line))}function Qu(M){return function(...h){return Ju(M.apply(this,h))}}Ku.source=Qu(fu(zl)),Ku.sprite=Qu(fu(Yl)),Ku.glyphs=Qu(fu(uf)),Ku.light=Qu(fu(cu)),Ku.sky=Qu(fu(Zu)),Ku.terrain=Qu(fu(mc)),Ku.state=Qu(fu($u)),Ku.layer=Qu(fu(ro)),Ku.filter=Qu(fu(Pa)),Ku.paintProperty=Qu(fu(Io)),Ku.layoutProperty=Qu(fu(oi));let Wd={type:"enum","property-type":"data-constant",expression:{interpolated:!1,parameters:["global-state"]},values:{visible:{},none:{}},transition:!1,default:"visible"};class x0{constructor(h,b){this._globalState=b,this.setValue(h)}evaluate(){var h;return(h=this._literalValue)!==null&&h!==void 0?h:this._compiledValue.evaluate({})}setValue(h){if(h==null||h==="visible"||h==="none")return this._literalValue=h==="none"?"none":"visible",this._compiledValue=void 0,void(this._globalStateRefs=new Set);let b=vh(h,Wd,this._globalState);if(b.result==="error")throw this._literalValue="visible",this._compiledValue=void 0,new Error(b.value.map((D=>`${D.key}: ${D.message}`)).join(", "));this._literalValue=void 0,this._compiledValue=b.value,this._globalStateRefs=zt(b.value.expression)}getGlobalStateRefs(){return this._globalStateRefs}}let Bf=Ct,Al=Ku,Xl=Al.light,cf=Al.sky,jh=Al.paintProperty,Wh=Al.layoutProperty;function Yh(M,h){let b=!1;if(h!=null&&h.length)for(let D of h)M.fire(new Ot(new Error(D.message))),b=!0;return b}class hu{constructor(h,b,D){let z=this.cells=[];if(h instanceof ArrayBuffer){this.arrayBuffer=h;let X=new Int32Array(this.arrayBuffer);h=X[0],this.d=(b=X[1])+2*(D=X[2]);for(let re=0;re=oe[ge+0]&&z>=oe[ge+1])?(Z[ke]=!0,X.push(he[ke])):Z[ke]=!1}}}_forEachCell(h,b,D,z,G,X,Z,re){let Q=this._convertToCellCoord(h),he=this._convertToCellCoord(b),oe=this._convertToCellCoord(D),ke=this._convertToCellCoord(z);for(let ge=Q;ge<=oe;ge++)for(let Ue=he;Ue<=ke;Ue++){let je=this.d*Ue+ge;if((!re||re(this._convertFromCellCoord(ge),this._convertFromCellCoord(Ue),this._convertFromCellCoord(ge+1),this._convertFromCellCoord(Ue+1)))&&G.call(this,h,b,D,z,je,X,Z,re))return}}_convertFromCellCoord(h){return(h-this.padding)/this.scale}_convertToCellCoord(h){return Math.max(0,Math.min(this.d-1,Math.floor(h*this.scale)+this.padding))}toArrayBuffer(){if(this.arrayBuffer)return this.arrayBuffer;let h=this.cells,b=3+this.cells.length+1+1,D=0;for(let X of this.cells)D+=X.length;let z=new Int32Array(b+D+this.keys.length+this.bboxes.length);z[0]=this.extent,z[1]=this.n,z[2]=this.padding;let G=b;for(let X=0;XD?(this.lastIntegerZoom=D+1,this.lastIntegerZoomTime=b):this.lastFloorZoom{try{return new RegExp(`\\p{sc=${b}}`,"u").source}catch(D){return null}})).filter((b=>b));return new RegExp(h.join("|"),"u")}let ur=Kt(["Arab","Dupl","Mong","Ougr","Syrc"]);function Sr(M){return!ur.test(String.fromCodePoint(M))}function Br(M){return!(lt(M)||(h=M,/[\xA7\xA9\xAE\xB1\xBC-\xBE\xD7\xF7\u2016\u2020\u2021\u2030\u2031\u203B\u203C\u2042\u2047-\u2049\u2051\u2100-\u218F\u221E\u2234\u2235\u2300-\u2307\u230C-\u231F\u2324-\u2328\u232B\u237D-\u239A\u23BE-\u23CD\u23CF\u23D1-\u23DB\u23E2-\u2422\u2424-\u24FF\u25A0-\u2619\u2620-\u2767\u2776-\u2793\u2B12-\u2B2F\u2B50-\u2B59\u2BB8-\u2BEB\u3000-\u303F\u30A0-\u30FF\uE000-\uF8FF\uFE30-\uFE6F\uFF00-\uFFEF\uFFFC\uFFFD]|[\uDB80-\uDBFF][\uDC00-\uDFFF]/gim.test(String.fromCodePoint(h))));var h}let ln=Kt(["Adlm","Arab","Armi","Avst","Chrs","Cprt","Egyp","Elym","Gara","Hatr","Hebr","Hung","Khar","Lydi","Mand","Mani","Mend","Merc","Mero","Narb","Nbat","Nkoo","Orkh","Palm","Phli","Phlp","Phnx","Prti","Rohg","Samr","Sarb","Sogo","Syrc","Thaa","Todr","Yezi"]);function wn(M){return ln.test(String.fromCodePoint(M))}function In(M,h){return!(!h&&wn(M)||/[\u0900-\u0DFF\u0F00-\u109F\u1780-\u17FF]/gim.test(String.fromCodePoint(M)))}function gi(M){for(let h of M)if(wn(h.codePointAt(0)))return!0;return!1}let Bi=new class{constructor(){this.TIMEOUT=5e3,this.applyArabicShaping=null,this.processBidirectionalText=null,this.processStyledBidirectionalText=null,this.pluginStatus="unavailable",this.pluginURL=null,this.loadScriptResolve=()=>{}}setState(M){this.pluginStatus=M.pluginStatus,this.pluginURL=M.pluginURL}getState(){return{pluginStatus:this.pluginStatus,pluginURL:this.pluginURL}}setMethods(M){if(Bi.isParsed())throw new Error("RTL text plugin already registered.");this.applyArabicShaping=M.applyArabicShaping,this.processBidirectionalText=M.processBidirectionalText,this.processStyledBidirectionalText=M.processStyledBidirectionalText,this.loadScriptResolve()}isParsed(){return this.applyArabicShaping!=null&&this.processBidirectionalText!=null&&this.processStyledBidirectionalText!=null}getRTLTextPluginStatus(){return this.pluginStatus}syncState(M,h){return i(this,void 0,void 0,(function*(){if(this.isParsed())return this.getState();if(M.pluginStatus!=="loading")return this.setState(M),M;let b=M.pluginURL,D=new Promise((G=>{this.loadScriptResolve=G}));h(b);let z=new Promise((G=>setTimeout((()=>G()),this.TIMEOUT)));if(yield Promise.race([D,z]),this.isParsed()){let G={pluginStatus:"loaded",pluginURL:b};return this.setState(G),G}throw this.setState({pluginStatus:"error",pluginURL:""}),new Error(`RTL Text Plugin failed to import scripts from ${b}`)}))}};class mi{constructor(h,b){this.isSupportedScript=ia,this.zoom=h,b?(this.now=b.now||0,this.fadeDuration=b.fadeDuration||0,this.zoomHistory=b.zoomHistory||new Qe,this.transition=b.transition||{}):(this.now=0,this.fadeDuration=0,this.zoomHistory=new Qe,this.transition={})}crossFadingFactor(){return this.fadeDuration===0?1:Math.min((this.now-this.zoomHistory.lastIntegerZoomTime)/this.fadeDuration,1)}getCrossfadeParameters(){let h=this.zoom,b=h-Math.floor(h),D=this.crossFadingFactor();return h>this.zoomHistory.lastIntegerZoom?{fromScale:2,toScale:1,t:b+(1-b)*D}:{fromScale:.5,toScale:1,t:1-(1-D)*b}}}function ia(M){return(function(h,b){for(let D of h)if(!In(D.codePointAt(0),b))return!1;return!0})(M,Bi.getRTLTextPluginStatus()==="loaded")}let ua="-transition";class lo{constructor(h,b,D){this.property=h,this.value=b,this.expression=(function(z,G,X){if(Rf(z))return new yt(z,G);if(If(z)){let Z=Ze(z,G,X);if(Z.result==="error")throw new Error(Z.value.map((re=>`${re.key}: ${re.message}`)).join(", "));return Z.value}{let Z=z;return G.type==="color"&&typeof z=="string"?Z=ii.parse(z):G.type!=="padding"||typeof z!="number"&&!Array.isArray(z)?G.type!=="numberArray"||typeof z!="number"&&!Array.isArray(z)?G.type!=="colorArray"||typeof z!="string"&&!Array.isArray(z)?G.type==="variableAnchorOffsetCollection"&&Array.isArray(z)?Z=yo.parse(z):G.type==="projectionDefinition"&&typeof z=="string"&&(Z=oo.parse(z)):Z=Ni.parse(z):Z=Oa.parse(z):Z=Ka.parse(z),{globalStateRefs:new Set,_globalState:null,kind:"constant",evaluate:()=>Z}}})(b===void 0?h.specification.default:b,h.specification,D)}isDataDriven(){return this.expression.kind==="source"||this.expression.kind==="composite"}getGlobalStateRefs(){return this.expression.globalStateRefs||new Set}possiblyEvaluate(h,b,D){return this.property.possiblyEvaluate(this,h,b,D)}}class Bo{constructor(h,b){this.property=h,this.value=new lo(h,void 0,b)}transitioned(h,b){return new ls(this.property,this.value,b,_e({},h.transition,this.transition),h.now)}untransitioned(){return new ls(this.property,this.value,null,{},0)}}class Ua{constructor(h,b){this._properties=h,this._values=Object.create(h.defaultTransitionablePropertyValues),this._globalState=b}hasProperty(h){return h in this._properties.defaultTransitionablePropertyValues}getValue(h){return ie(this._values[h].value.value)}setValue(h,b){Object.hasOwn(this._values,h)||(this._values[h]=new Bo(this._values[h].property,this._globalState)),this._values[h].value=new lo(this._values[h].property,b===null?void 0:ie(b),this._globalState)}getTransition(h){return ie(this._values[h].transition)}setTransition(h,b){Object.hasOwn(this._values,h)||(this._values[h]=new Bo(this._values[h].property,this._globalState)),this._values[h].transition=ie(b)||void 0}serialize(){let h={};for(let b of Object.keys(this._values)){let D=this.getValue(b);D!==void 0&&(h[b]=D);let z=this.getTransition(b);z!==void 0&&(h[`${b}${ua}`]=z)}return h}transitioned(h,b){let D=new cl(this._properties);for(let z of Object.keys(this._values))D._values[z]=this._values[z].transitioned(h,b._values[z]);return D}untransitioned(){let h=new cl(this._properties);for(let b of Object.keys(this._values))h._values[b]=this._values[b].untransitioned();return h}}class ls{constructor(h,b,D,z,G){this.property=h,this.value=b,this.begin=G+z.delay||0,this.end=this.begin+z.duration||0,h.specification.transition&&(z.delay||z.duration)&&(this.prior=D)}possiblyEvaluate(h,b,D){let z=h.now||0,G=this.value.possiblyEvaluate(h,b,D),X=this.prior;if(X){if(z>this.end)return this.prior=null,G;if(this.value.isDataDriven())return this.prior=null,G;if(zz.zoomHistory.lastIntegerZoom?{from:h,to:b}:{from:D,to:b}}interpolate(h){return h}}class Fc{constructor(h){this.specification=h}possiblyEvaluate(h,b,D,z){if(h.value!==void 0){if(h.expression.kind==="constant"){let G=h.expression.evaluate(b,null,{},D,z);return this._calculate(G,G,G,b)}return this._calculate(h.expression.evaluate(new mi(Math.floor(b.zoom-1),b)),h.expression.evaluate(new mi(Math.floor(b.zoom),b)),h.expression.evaluate(new mi(Math.floor(b.zoom+1),b)),b)}}_calculate(h,b,D,z){return z.zoom>z.zoomHistory.lastIntegerZoom?{from:h,to:b}:{from:D,to:b}}interpolate(h){return h}}class du{constructor(h){this.specification=h}possiblyEvaluate(h,b,D,z){return!!h.expression.evaluate(b,null,{},D,z)}interpolate(){return!1}}class ms{constructor(h){this.properties=h,this.defaultPropertyValues={},this.defaultTransitionablePropertyValues={},this.defaultTransitioningPropertyValues={},this.defaultPossiblyEvaluatedValues={},this.overridableProperties=[];for(let b in h){let D=h[b];D.specification.overridable&&this.overridableProperties.push(b);let z=this.defaultPropertyValues[b]=new lo(D,void 0,void 0),G=this.defaultTransitionablePropertyValues[b]=new Bo(D,void 0);this.defaultTransitioningPropertyValues[b]=G.untransitioned(),this.defaultPossiblyEvaluatedValues[b]=z.possiblyEvaluate({})}}}_i("DataDrivenProperty",Di),_i("DataConstantProperty",wi),_i("CrossFadedDataDrivenProperty",fl),_i("CrossFadedProperty",Fc),_i("ColorRampProperty",du);let ff=" is a PAINT property not a LAYOUT property. Use get/setPaintProperty instead?",ku=" is a LAYOUT property not a PAINT property. Use get/setLayoutProperty instead?";class hl extends cr{constructor(h,b,D){if(super(),this.id=h.id,this.type=h.type,this._globalState=D,this._featureFilter={filter:()=>!0,needGeometry:!1,getGlobalStateRefs:()=>new Set},this._visibilityExpression=(function(z,G){return new x0(z,G)})(this.visibility,D),h.type!=="custom"&&(this.metadata=h.metadata,this.minzoom=h.minzoom,this.maxzoom=h.maxzoom,h.type!=="background"&&(this.source=h.source,this.sourceLayer=h["source-layer"],this.filter=h.filter,this._featureFilter=cn(h.filter,D)),b.layout&&(this._unevaluatedLayout=new Eu(b.layout,D)),b.paint)){this._transitionablePaint=new Ua(b.paint,D);for(let z in h.paint)this.setPaintProperty(z,h.paint[z],{validate:!1});for(let z in h.layout)this.setLayoutProperty(z,h.layout[z],{validate:!1});this._transitioningPaint=this._transitionablePaint.untransitioned(),this.paint=new yc(b.paint)}}setFilter(h){this.filter=h,this._featureFilter=cn(h,this._globalState)}getCrossfadeParameters(){return this._crossfadeParameters}getLayoutProperty(h){var b;if(h==="visibility")return this.visibility;if(!((b=this._transitionablePaint)===null||b===void 0)&&b.hasProperty(h))throw new Error(h+ff);if(!this._unevaluatedLayout)throw new Error(`Cannot get layout property "${h}" on layer type "${this.type}" which has no layout properties.`);return this._unevaluatedLayout.getValue(h)}getLayoutAffectingGlobalStateRefs(){let h=new Set;for(let b of this._visibilityExpression.getGlobalStateRefs())h.add(b);if(this._unevaluatedLayout)for(let b in this._unevaluatedLayout._values){let D=this._unevaluatedLayout._values[b];for(let z of D.getGlobalStateRefs())h.add(z)}for(let b of this._featureFilter.getGlobalStateRefs())h.add(b);return h}getPaintAffectingGlobalStateRefs(){var h;let b=new globalThis.Map;if(this._transitionablePaint)for(let D in this._transitionablePaint._values){let z=this._transitionablePaint._values[D].value;for(let G of z.getGlobalStateRefs()){let X=(h=b.get(G))!==null&&h!==void 0?h:[];X.push({name:D,value:z.value}),b.set(G,X)}}return b}getVisibilityAffectingGlobalStateRefs(){return this._visibilityExpression.getGlobalStateRefs()}setLayoutProperty(h,b,D={}){var z;if(h==="visibility")return this.visibility=b,this._visibilityExpression.setValue(b),void this.recalculateVisibility();!((z=this._transitionablePaint)===null||z===void 0)&&z.hasProperty(h)?this.fire(new Ot(new Error(h+ff))):b!=null&&this._validate(Wh,`layers.${this.id}.layout.${h}`,h,b,D)||this._unevaluatedLayout.setValue(h,b)}getPaintProperty(h){var b,D;if(h.endsWith(ua)){let z=h.slice(0,-11);if(z==="visibility"||!((b=this._unevaluatedLayout)===null||b===void 0)&&b.hasProperty(z))throw new Error(h+ku);return this._transitionablePaint.getTransition(z)}if(h==="visibility"||!((D=this._unevaluatedLayout)===null||D===void 0)&&D.hasProperty(h))throw new Error(h+ku);return this._transitionablePaint.getValue(h)}setPaintProperty(h,b,D={}){var z;if(h==="visibility"||!((z=this._unevaluatedLayout)===null||z===void 0)&&z.hasProperty(h))return this.fire(new Ot(new Error(h+ku))),!1;if(b!=null&&this._validate(jh,`layers.${this.id}.paint.${h}`,h,b,D))return!1;if(h.endsWith(ua))return this._transitionablePaint.setTransition(h.slice(0,-11),b||void 0),!1;{let G=this._transitionablePaint._values[h],X=G.property.specification["property-type"]==="cross-faded-data-driven",Z=G.value.isDataDriven(),re=G.value;this._transitionablePaint.setValue(h,b),this._handleSpecialPaintPropertyUpdate(h);let Q=this._transitionablePaint._values[h].value;return Q.isDataDriven()||Z||X||this._handleOverridablePaintPropertyUpdate(h,re,Q)}}_handleSpecialPaintPropertyUpdate(h){}_handleOverridablePaintPropertyUpdate(h,b,D){return!1}isHidden(h=this.minzoom,b=!1){return!!(this.minzoom&&h<(b?Math.floor(this.minzoom):this.minzoom))||!!(this.maxzoom&&h>=this.maxzoom)||this._evaluatedVisibility==="none"}updateTransitions(h){this._transitioningPaint=this._transitionablePaint.transitioned(h,this._transitioningPaint)}hasTransition(){return this._transitioningPaint.hasTransition()}recalculateVisibility(){this._evaluatedVisibility=this._visibilityExpression.evaluate()}recalculate(h,b){h.getCrossfadeParameters&&(this._crossfadeParameters=h.getCrossfadeParameters()),this._unevaluatedLayout&&(this.layout=this._unevaluatedLayout.possiblyEvaluate(h,void 0,b)),this.paint=this._transitioningPaint.possiblyEvaluate(h,void 0,b)}serialize(){var h,b;let D={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:(h=this._unevaluatedLayout)===null||h===void 0?void 0:h.serialize(),paint:(b=this._transitionablePaint)===null||b===void 0?void 0:b.serialize()};return this.visibility&&(D.layout||(D.layout={}),D.layout.visibility=this.visibility),pe(D,((z,G)=>!(z===void 0||G==="layout"&&!Object.keys(z).length||G==="paint"&&!Object.keys(z).length)))}_validate(h,b,D,z,G={}){return(G==null?void 0:G.validate)!==!1&&Yh(this,h.call(Al,{key:b,layerType:this.type,objectKey:D,value:z,styleSpec:Ct,style:{glyphs:!0,sprite:!0}}))}is3D(){return!1}isTileClipped(){return!1}hasOffscreenPass(){return!1}resize(){}isStateDependent(){for(let h in this.paint._values){let b=this.paint.get(h);if(b instanceof el&&Pc(b.property.specification)&&(b.value.kind==="source"||b.value.kind==="composite")&&b.value.isStateDependent)return!0}return!1}}let mh;var W={get paint(){return mh=mh||new ms({"raster-opacity":new wi(Ct.paint_raster["raster-opacity"]),"raster-hue-rotate":new wi(Ct.paint_raster["raster-hue-rotate"]),"raster-brightness-min":new wi(Ct.paint_raster["raster-brightness-min"]),"raster-brightness-max":new wi(Ct.paint_raster["raster-brightness-max"]),"raster-saturation":new wi(Ct.paint_raster["raster-saturation"]),"raster-contrast":new wi(Ct.paint_raster["raster-contrast"]),resampling:new wi(Ct.paint_raster.resampling),"raster-resampling":new wi(Ct.paint_raster["raster-resampling"]),"raster-fade-duration":new wi(Ct.paint_raster["raster-fade-duration"])})}};class te extends hl{constructor(h,b){super(h,W,b)}}let ve={Int8:Int8Array,Uint8:Uint8Array,Int16:Int16Array,Uint16:Uint16Array,Int32:Int32Array,Uint32:Uint32Array,Float32:Float32Array};class Se{constructor(h,b){this._structArray=h,this._pos1=b*this.size,this._pos2=this._pos1/2,this._pos4=this._pos1/4,this._pos8=this._pos1/8}}class Ee{constructor(){this.isTransferred=!1,this.capacity=-1,this.resize(0)}static serialize(h,b){return h._trim(),b&&(h.isTransferred=!0,b.push(h.arrayBuffer)),{length:h.length,arrayBuffer:h.arrayBuffer}}static deserialize(h){let b=Object.create(this.prototype);return b.arrayBuffer=h.arrayBuffer,b.length=h.length,b.capacity=h.arrayBuffer.byteLength/b.bytesPerElement,b._refreshViews(),b}_trim(){this.length!==this.capacity&&(this.capacity=this.length,this.arrayBuffer=this.arrayBuffer.slice(0,this.length*this.bytesPerElement),this._refreshViews())}clear(){this.length=0}resize(h){this.reserve(h),this.length=h}reserve(h){if(h>this.capacity){this.capacity=Math.max(h,Math.floor(5*this.capacity),128),this.arrayBuffer=new ArrayBuffer(this.capacity*this.bytesPerElement);let b=this.uint8;this._refreshViews(),b&&this.uint8.set(b)}}_refreshViews(){throw new Error("_refreshViews() must be implemented by each concrete StructArray layout")}freeBufferAfterUpload(){this.arrayBuffer=new ArrayBuffer(0),this._refreshViews()}}function Re(M,h=1){let b=0,D=0;return{members:M.map((z=>{let G=ve[z.type].BYTES_PER_ELEMENT,X=b=rt(b,Math.max(h,G)),Z=z.components||1;return D=Math.max(D,G),b+=G*Z,{name:z.name,type:z.type,components:Z,offset:X}})),size:rt(b,Math.max(D,h)),alignment:h}}function rt(M,h){return Math.ceil(M/h)*h}class He extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.int16[z+0]=b,this.int16[z+1]=D,h}}He.prototype.bytesPerElement=4,_i("StructArrayLayout2i4",He);class pt extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.int16[G+0]=b,this.int16[G+1]=D,this.int16[G+2]=z,h}}pt.prototype.bytesPerElement=6,_i("StructArrayLayout3i6",pt);class Ft extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z){let G=this.length;return this.resize(G+1),this.emplace(G,h,b,D,z)}emplace(h,b,D,z,G){let X=4*h;return this.int16[X+0]=b,this.int16[X+1]=D,this.int16[X+2]=z,this.int16[X+3]=G,h}}Ft.prototype.bytesPerElement=8,_i("StructArrayLayout4i8",Ft);class Rt extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=6*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.int16[re+2]=z,this.int16[re+3]=G,this.int16[re+4]=X,this.int16[re+5]=Z,h}}Rt.prototype.bytesPerElement=12,_i("StructArrayLayout2i4i12",Rt);class ir extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=4*h,Q=8*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.uint8[Q+4]=z,this.uint8[Q+5]=G,this.uint8[Q+6]=X,this.uint8[Q+7]=Z,h}}ir.prototype.bytesPerElement=8,_i("StructArrayLayout2i4ub8",ir);class nr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.float32[z+0]=b,this.float32[z+1]=D,h}}nr.prototype.bytesPerElement=8,_i("StructArrayLayout2f8",nr);class Cr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he){let oe=this.length;return this.resize(oe+1),this.emplace(oe,h,b,D,z,G,X,Z,re,Q,he)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe){let ke=10*h;return this.uint16[ke+0]=b,this.uint16[ke+1]=D,this.uint16[ke+2]=z,this.uint16[ke+3]=G,this.uint16[ke+4]=X,this.uint16[ke+5]=Z,this.uint16[ke+6]=re,this.uint16[ke+7]=Q,this.uint16[ke+8]=he,this.uint16[ke+9]=oe,h}}Cr.prototype.bytesPerElement=20,_i("StructArrayLayout10ui20",Cr);class Vr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re){let Q=this.length;return this.resize(Q+1),this.emplace(Q,h,b,D,z,G,X,Z,re)}emplace(h,b,D,z,G,X,Z,re,Q){let he=8*h;return this.uint16[he+0]=b,this.uint16[he+1]=D,this.uint16[he+2]=z,this.uint16[he+3]=G,this.uint16[he+4]=X,this.uint16[he+5]=Z,this.uint16[he+6]=re,this.uint16[he+7]=Q,h}}Vr.prototype.bytesPerElement=16,_i("StructArrayLayout8ui16",Vr);class sr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he,oe,ke){let ge=this.length;return this.resize(ge+1),this.emplace(ge,h,b,D,z,G,X,Z,re,Q,he,oe,ke)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge){let Ue=12*h;return this.int16[Ue+0]=b,this.int16[Ue+1]=D,this.int16[Ue+2]=z,this.int16[Ue+3]=G,this.uint16[Ue+4]=X,this.uint16[Ue+5]=Z,this.uint16[Ue+6]=re,this.uint16[Ue+7]=Q,this.int16[Ue+8]=he,this.int16[Ue+9]=oe,this.int16[Ue+10]=ke,this.int16[Ue+11]=ge,h}}sr.prototype.bytesPerElement=24,_i("StructArrayLayout4i4ui4i24",sr);class br extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.float32[G+0]=b,this.float32[G+1]=D,this.float32[G+2]=z,h}}br.prototype.bytesPerElement=12,_i("StructArrayLayout3f12",br);class kr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.uint32[1*h+0]=b,h}}kr.prototype.bytesPerElement=4,_i("StructArrayLayout1ul4",kr);class Gr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X,Z,re,Q){let he=this.length;return this.resize(he+1),this.emplace(he,h,b,D,z,G,X,Z,re,Q)}emplace(h,b,D,z,G,X,Z,re,Q,he){let oe=10*h,ke=5*h;return this.int16[oe+0]=b,this.int16[oe+1]=D,this.int16[oe+2]=z,this.int16[oe+3]=G,this.int16[oe+4]=X,this.int16[oe+5]=Z,this.uint32[ke+3]=re,this.uint16[oe+8]=Q,this.uint16[oe+9]=he,h}}Gr.prototype.bytesPerElement=20,_i("StructArrayLayout6i1ul2ui20",Gr);class Wr extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=6*h;return this.int16[re+0]=b,this.int16[re+1]=D,this.int16[re+2]=z,this.int16[re+3]=G,this.int16[re+4]=X,this.int16[re+5]=Z,h}}Wr.prototype.bytesPerElement=12,_i("StructArrayLayout2i2i2i12",Wr);class Ar extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G){let X=this.length;return this.resize(X+1),this.emplace(X,h,b,D,z,G)}emplace(h,b,D,z,G,X){let Z=4*h,re=8*h;return this.float32[Z+0]=b,this.float32[Z+1]=D,this.float32[Z+2]=z,this.int16[re+6]=G,this.int16[re+7]=X,h}}Ar.prototype.bytesPerElement=16,_i("StructArrayLayout2f1f2i16",Ar);class En extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer),this.int16=new Int16Array(this.arrayBuffer)}emplaceBack(h,b,D,z,G,X){let Z=this.length;return this.resize(Z+1),this.emplace(Z,h,b,D,z,G,X)}emplace(h,b,D,z,G,X,Z){let re=16*h,Q=4*h,he=8*h;return this.uint8[re+0]=b,this.uint8[re+1]=D,this.float32[Q+1]=z,this.float32[Q+2]=G,this.int16[he+6]=X,this.int16[he+7]=Z,h}}En.prototype.bytesPerElement=16,_i("StructArrayLayout2ub2f2i16",En);class zn extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.uint16[G+0]=b,this.uint16[G+1]=D,this.uint16[G+2]=z,h}}zn.prototype.bytesPerElement=6,_i("StructArrayLayout3ui6",zn);class Zn extends Ee{_refreshViews(){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)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt){let It=this.length;return this.resize(It+1),this.emplace(It,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It){let _t=24*h,qt=12*h,tr=48*h;return this.int16[_t+0]=b,this.int16[_t+1]=D,this.uint16[_t+2]=z,this.uint16[_t+3]=G,this.uint32[qt+2]=X,this.uint32[qt+3]=Z,this.uint32[qt+4]=re,this.uint16[_t+10]=Q,this.uint16[_t+11]=he,this.uint16[_t+12]=oe,this.float32[qt+7]=ke,this.float32[qt+8]=ge,this.uint8[tr+36]=Ue,this.uint8[tr+37]=je,this.uint8[tr+38]=vt,this.uint32[qt+10]=gt,this.int16[_t+22]=It,h}}Zn.prototype.bytesPerElement=48,_i("StructArrayLayout2i2ui3ul3ui2f3ub1ul1i48",Zn);class ai extends Ee{_refreshViews(){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)}emplaceBack(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn){let Ln=this.length;return this.resize(Ln+1),this.emplace(Ln,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn)}emplace(h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t,qt,tr,lr,qr,jr,_n,fn,Dn,Hn,Ln){let un=32*h,ei=16*h;return this.int16[un+0]=b,this.int16[un+1]=D,this.int16[un+2]=z,this.int16[un+3]=G,this.int16[un+4]=X,this.int16[un+5]=Z,this.int16[un+6]=re,this.int16[un+7]=Q,this.uint16[un+8]=he,this.uint16[un+9]=oe,this.uint16[un+10]=ke,this.uint16[un+11]=ge,this.uint16[un+12]=Ue,this.uint16[un+13]=je,this.uint16[un+14]=vt,this.uint16[un+15]=gt,this.uint16[un+16]=It,this.uint16[un+17]=_t,this.uint16[un+18]=qt,this.uint16[un+19]=tr,this.uint16[un+20]=lr,this.uint16[un+21]=qr,this.uint16[un+22]=jr,this.uint32[ei+12]=_n,this.float32[ei+13]=fn,this.float32[ei+14]=Dn,this.uint16[un+30]=Hn,this.uint16[un+31]=Ln,h}}ai.prototype.bytesPerElement=64,_i("StructArrayLayout8i15ui1ul2f2ui64",ai);class Mi extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.float32[1*h+0]=b,h}}Mi.prototype.bytesPerElement=4,_i("StructArrayLayout1f4",Mi);class Si extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=3*h;return this.uint16[6*h+0]=b,this.float32[G+1]=D,this.float32[G+2]=z,h}}Si.prototype.bytesPerElement=12,_i("StructArrayLayout1ui2f12",Si);class ya extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint32=new Uint32Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b,D){let z=this.length;return this.resize(z+1),this.emplace(z,h,b,D)}emplace(h,b,D,z){let G=4*h;return this.uint32[2*h+0]=b,this.uint16[G+2]=D,this.uint16[G+3]=z,h}}ya.prototype.bytesPerElement=8,_i("StructArrayLayout1ul2ui8",ya);class Y extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h,b){let D=this.length;return this.resize(D+1),this.emplace(D,h,b)}emplace(h,b,D){let z=2*h;return this.uint16[z+0]=b,this.uint16[z+1]=D,h}}Y.prototype.bytesPerElement=4,_i("StructArrayLayout2ui4",Y);class d extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.uint16=new Uint16Array(this.arrayBuffer)}emplaceBack(h){let b=this.length;return this.resize(b+1),this.emplace(b,h)}emplace(h,b){return this.uint16[1*h+0]=b,h}}d.prototype.bytesPerElement=2,_i("StructArrayLayout1ui2",d);class P extends Ee{_refreshViews(){this.uint8=new Uint8Array(this.arrayBuffer),this.float32=new Float32Array(this.arrayBuffer)}emplaceBack(h,b,D,z){let G=this.length;return this.resize(G+1),this.emplace(G,h,b,D,z)}emplace(h,b,D,z,G){let X=4*h;return this.float32[X+0]=b,this.float32[X+1]=D,this.float32[X+2]=z,this.float32[X+3]=G,h}}P.prototype.bytesPerElement=16,_i("StructArrayLayout4f16",P);class N extends Se{get anchorPointX(){return this._structArray.int16[this._pos2+0]}get anchorPointY(){return this._structArray.int16[this._pos2+1]}get x1(){return this._structArray.int16[this._pos2+2]}get y1(){return this._structArray.int16[this._pos2+3]}get x2(){return this._structArray.int16[this._pos2+4]}get y2(){return this._structArray.int16[this._pos2+5]}get featureIndex(){return this._structArray.uint32[this._pos4+3]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+8]}get bucketIndex(){return this._structArray.uint16[this._pos2+9]}get anchorPoint(){return new o(this.anchorPointX,this.anchorPointY)}}N.prototype.size=20;class H extends Gr{get(h){return new N(this,h)}}_i("CollisionBoxArray",H);class $ extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get glyphStartIndex(){return this._structArray.uint16[this._pos2+2]}get numGlyphs(){return this._structArray.uint16[this._pos2+3]}get vertexStartIndex(){return this._structArray.uint32[this._pos4+2]}get lineStartIndex(){return this._structArray.uint32[this._pos4+3]}get lineLength(){return this._structArray.uint32[this._pos4+4]}get segment(){return this._structArray.uint16[this._pos2+10]}get lowerSize(){return this._structArray.uint16[this._pos2+11]}get upperSize(){return this._structArray.uint16[this._pos2+12]}get lineOffsetX(){return this._structArray.float32[this._pos4+7]}get lineOffsetY(){return this._structArray.float32[this._pos4+8]}get writingMode(){return this._structArray.uint8[this._pos1+36]}get placedOrientation(){return this._structArray.uint8[this._pos1+37]}set placedOrientation(h){this._structArray.uint8[this._pos1+37]=h}get hidden(){return this._structArray.uint8[this._pos1+38]}set hidden(h){this._structArray.uint8[this._pos1+38]=h}get crossTileID(){return this._structArray.uint32[this._pos4+10]}set crossTileID(h){this._structArray.uint32[this._pos4+10]=h}get associatedIconIndex(){return this._structArray.int16[this._pos2+22]}}$.prototype.size=48;class se extends Zn{get(h){return new $(this,h)}}_i("PlacedSymbolArray",se);class de extends Se{get anchorX(){return this._structArray.int16[this._pos2+0]}get anchorY(){return this._structArray.int16[this._pos2+1]}get rightJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+2]}get centerJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+3]}get leftJustifiedTextSymbolIndex(){return this._structArray.int16[this._pos2+4]}get verticalPlacedTextSymbolIndex(){return this._structArray.int16[this._pos2+5]}get placedIconSymbolIndex(){return this._structArray.int16[this._pos2+6]}get verticalPlacedIconSymbolIndex(){return this._structArray.int16[this._pos2+7]}get key(){return this._structArray.uint16[this._pos2+8]}get textBoxStartIndex(){return this._structArray.uint16[this._pos2+9]}get textBoxEndIndex(){return this._structArray.uint16[this._pos2+10]}get verticalTextBoxStartIndex(){return this._structArray.uint16[this._pos2+11]}get verticalTextBoxEndIndex(){return this._structArray.uint16[this._pos2+12]}get iconBoxStartIndex(){return this._structArray.uint16[this._pos2+13]}get iconBoxEndIndex(){return this._structArray.uint16[this._pos2+14]}get verticalIconBoxStartIndex(){return this._structArray.uint16[this._pos2+15]}get verticalIconBoxEndIndex(){return this._structArray.uint16[this._pos2+16]}get featureIndex(){return this._structArray.uint16[this._pos2+17]}get numHorizontalGlyphVertices(){return this._structArray.uint16[this._pos2+18]}get numVerticalGlyphVertices(){return this._structArray.uint16[this._pos2+19]}get numIconVertices(){return this._structArray.uint16[this._pos2+20]}get numVerticalIconVertices(){return this._structArray.uint16[this._pos2+21]}get useRuntimeCollisionCircles(){return this._structArray.uint16[this._pos2+22]}get crossTileID(){return this._structArray.uint32[this._pos4+12]}set crossTileID(h){this._structArray.uint32[this._pos4+12]=h}get textBoxScale(){return this._structArray.float32[this._pos4+13]}get collisionCircleDiameter(){return this._structArray.float32[this._pos4+14]}get textAnchorOffsetStartIndex(){return this._structArray.uint16[this._pos2+30]}get textAnchorOffsetEndIndex(){return this._structArray.uint16[this._pos2+31]}}de.prototype.size=64;class Ae extends ai{get(h){return new de(this,h)}}_i("SymbolInstanceArray",Ae);class Fe extends Mi{getoffsetX(h){return this.float32[1*h+0]}}_i("GlyphOffsetArray",Fe);class Ie extends pt{getx(h){return this.int16[3*h+0]}gety(h){return this.int16[3*h+1]}gettileUnitDistanceFromAnchor(h){return this.int16[3*h+2]}}_i("SymbolLineVertexArray",Ie);class Ye extends Se{get textAnchor(){return this._structArray.uint16[this._pos2+0]}get textOffset0(){return this._structArray.float32[this._pos4+1]}get textOffset1(){return this._structArray.float32[this._pos4+2]}}Ye.prototype.size=12;class st extends Si{get(h){return new Ye(this,h)}}_i("TextAnchorOffsetArray",st);class dt extends Se{get featureIndex(){return this._structArray.uint32[this._pos4+0]}get sourceLayerIndex(){return this._structArray.uint16[this._pos2+2]}get bucketIndex(){return this._structArray.uint16[this._pos2+3]}}dt.prototype.size=8;class Pe extends ya{get(h){return new dt(this,h)}}_i("FeatureIndexArray",Pe);class Xe extends He{}class at extends He{}class xt extends He{}class Et extends Rt{}class Bt extends ir{}class St extends nr{}class Pt extends Cr{}class $t extends Vr{}class Ht extends sr{}class dr extends br{}class Xr extends kr{}class Or extends Wr{}class $r extends En{}class Er extends zn{}class Tr extends Y{}let Rr=Re([{name:"a_pos",components:2,type:"Int16"}],4),{members:Lr}=Rr;class an{constructor(h=[]){this._forceNewSegmentOnNextPrepare=!1,this.segments=h}prepareSegment(h,b,D,z){let G=this.segments[this.segments.length-1];return h>an.MAX_VERTEX_ARRAY_LENGTH&&me(`Max vertices per segment is ${an.MAX_VERTEX_ARRAY_LENGTH}: bucket requested ${h}. Consider using the \`fillLargeMeshArrays\` function if you require meshes with more than ${an.MAX_VERTEX_ARRAY_LENGTH} vertices.`),this._forceNewSegmentOnNextPrepare||!G||G.vertexLength+h>an.MAX_VERTEX_ARRAY_LENGTH||G.sortKey!==z?this.createNewSegment(b,D,z):G}createNewSegment(h,b,D){let z={vertexOffset:h.length,primitiveOffset:b.length,vertexLength:0,primitiveLength:0,vaos:{}};return D!==void 0&&(z.sortKey=D),this._forceNewSegmentOnNextPrepare=!1,this.segments.push(z),z}getOrCreateLatestSegment(h,b,D){return this.prepareSegment(0,h,b,D)}forceNewSegmentOnNextPrepare(){this._forceNewSegmentOnNextPrepare=!0}get(){return this.segments}destroy(){for(let h of this.segments)for(let b in h.vaos)h.vaos[b].destroy()}static simpleSegment(h,b,D,z){return new an([{vertexOffset:h,primitiveOffset:b,vertexLength:D,primitiveLength:z,vaos:{},sortKey:0}])}}function on(M,h){return 256*(M=ue(Math.floor(M),0,255))+ue(Math.floor(h),0,255)}an.MAX_VERTEX_ARRAY_LENGTH=Math.pow(2,16)-1,_i("SegmentVector",an);let Nn=Re([{name:"a_pattern_from",components:4,type:"Uint16"},{name:"a_pattern_to",components:4,type:"Uint16"},{name:"a_pixel_ratio_from",components:1,type:"Uint16"},{name:"a_pixel_ratio_to",components:1,type:"Uint16"}]),Yn=Re([{name:"a_dasharray_from",components:4,type:"Uint16"},{name:"a_dasharray_to",components:4,type:"Uint16"}]);var yi,Sn,An,li={exports:{}},Vn={exports:{}},jn={exports:{}},Wn=(function(){if(An)return li.exports;An=1;var M=(yi||(yi=1,Vn.exports=function(b,D){var z,G,X,Z,re,Q,he,oe;for(G=b.length-(z=3&b.length),X=D,re=3432918353,Q=461845907,oe=0;oe>>16)*re&65535)<<16)&4294967295)<<15|he>>>17))*Q+(((he>>>16)*Q&65535)<<16)&4294967295)<<13|X>>>19))+((5*(X>>>16)&65535)<<16)&4294967295))+((58964+(Z>>>16)&65535)<<16);switch(he=0,z){case 3:he^=(255&b.charCodeAt(oe+2))<<16;case 2:he^=(255&b.charCodeAt(oe+1))<<8;case 1:X^=he=(65535&(he=(he=(65535&(he^=255&b.charCodeAt(oe)))*re+(((he>>>16)*re&65535)<<16)&4294967295)<<15|he>>>17))*Q+(((he>>>16)*Q&65535)<<16)&4294967295}return X^=b.length,X=2246822507*(65535&(X^=X>>>16))+((2246822507*(X>>>16)&65535)<<16)&4294967295,X=3266489909*(65535&(X^=X>>>13))+((3266489909*(X>>>16)&65535)<<16)&4294967295,(X^=X>>>16)>>>0}),Vn.exports),h=(Sn||(Sn=1,jn.exports=function(b,D){for(var z,G=b.length,X=D^G,Z=0;G>=4;)z=1540483477*(65535&(z=255&b.charCodeAt(Z)|(255&b.charCodeAt(++Z))<<8|(255&b.charCodeAt(++Z))<<16|(255&b.charCodeAt(++Z))<<24))+((1540483477*(z>>>16)&65535)<<16),X=1540483477*(65535&X)+((1540483477*(X>>>16)&65535)<<16)^(z=1540483477*(65535&(z^=z>>>24))+((1540483477*(z>>>16)&65535)<<16)),G-=4,++Z;switch(G){case 3:X^=(255&b.charCodeAt(Z+2))<<16;case 2:X^=(255&b.charCodeAt(Z+1))<<8;case 1:X=1540483477*(65535&(X^=255&b.charCodeAt(Z)))+((1540483477*(X>>>16)&65535)<<16)}return X=1540483477*(65535&(X^=X>>>13))+((1540483477*(X>>>16)&65535)<<16),(X^=X>>>15)>>>0}),jn.exports);return li.exports=M,li.exports.murmur3=M,li.exports.murmur2=h,li.exports})(),si=s(Wn);class zi{constructor(){this.ids=[],this.positions=[],this.indexed=!1}add(h,b,D,z){this.ids.push(da(h)),this.positions.push(b,D,z)}getPositions(h){if(!this.indexed)throw new Error("Trying to get index, but feature positions are not indexed");let b=da(h),D=0,z=this.ids.length-1;for(;D>1;this.ids[X]>=b?z=X:D=X+1}let G=[];for(;this.ids[D]===b;)G.push({index:this.positions[3*D],start:this.positions[3*D+1],end:this.positions[3*D+2]}),D++;return G}static serialize(h,b){let D=new Float64Array(h.ids),z=new Uint32Array(h.positions);return ui(D,z,0,D.length-1),b&&b.push(D.buffer,z.buffer),{ids:D,positions:z}}static deserialize(h){let b=new zi;return b.ids=h.ids,b.positions=h.positions,b.indexed=!0,b}}function da(M){let h=+M;return!isNaN(h)&&h<=Number.MAX_SAFE_INTEGER?h:si(String(M))}function ui(M,h,b,D){for(;b>1],G=b-1,X=D+1;for(;;){do G++;while(M[G]z);if(G>=X)break;Li(M,G,X),Li(h,3*G,3*X),Li(h,3*G+1,3*X+1),Li(h,3*G+2,3*X+2)}X-b`u_${z}`)),this.type=D}setUniform(h,b,D){h.set(D.constantOr(this.value))}getBinding(h,b,D){return this.type==="color"?new Os(h,b):new ca(h,b)}}class vo{constructor(h,b){this.uniformNames=b.map((D=>`u_${D}`)),this.patternFrom=null,this.patternTo=null,this.pixelRatioFrom=1,this.pixelRatioTo=1}setConstantPatternPositions(h,b){this.pixelRatioFrom=b.pixelRatio,this.pixelRatioTo=h.pixelRatio,this.patternFrom=b.tlbr,this.patternTo=h.tlbr}setConstantDashPositions(h,b){this.dashTo=[0,h.y,h.height,h.width],this.dashFrom=[0,b.y,b.height,b.width]}setUniform(h,b,D,z){let G=null;z==="u_pattern_to"?G=this.patternTo:z==="u_pattern_from"?G=this.patternFrom:z==="u_dasharray_to"?G=this.dashTo:z==="u_dasharray_from"?G=this.dashFrom:z==="u_pixel_ratio_to"?G=this.pixelRatioTo:z==="u_pixel_ratio_from"&&(G=this.pixelRatioFrom),G!==null&&h.set(G)}getBinding(h,b,D){return D.startsWith("u_pattern")||D.startsWith("u_dasharray_")?new Ia(h,b):new ca(h,b)}}class _o{constructor(h,b,D,z){this.expression=h,this.type=D,this.maxValue=0,this.paintVertexAttributes=b.map((G=>({name:`a_${G}`,type:"Float32",components:D==="color"?2:1,offset:0}))),this.paintVertexArray=new z}populatePaintArray(h,b,D){let z=this.paintVertexArray.length,G=this.expression.evaluate(new mi(0,D),b,{},D.canonical,[],D.formattedSection);this.paintVertexArray.resize(h),this._setPaintValue(z,h,G)}updatePaintArray(h,b,D,z,G){let X=this.expression.evaluate(new mi(0,G),D,z);this._setPaintValue(h,b,X)}_setPaintValue(h,b,D){if(this.type==="color"){let z=Na(D);for(let G=h;G`u_${Z}_t`)),this.type=D,this.useIntegerZoom=z,this.zoom=G,this.maxValue=0,this.paintVertexAttributes=b.map((Z=>({name:`a_${Z}`,type:"Float32",components:D==="color"?4:2,offset:0}))),this.paintVertexArray=new X}populatePaintArray(h,b,D){let z=this.expression.evaluate(new mi(this.zoom,D),b,{},D.canonical,[],D.formattedSection),G=this.expression.evaluate(new mi(this.zoom+1,D),b,{},D.canonical,[],D.formattedSection),X=this.paintVertexArray.length;this.paintVertexArray.resize(h),this._setPaintValue(X,h,z,G)}updatePaintArray(h,b,D,z,G){let X=this.expression.evaluate(new mi(this.zoom,G),D,z),Z=this.expression.evaluate(new mi(this.zoom+1,G),D,z);this._setPaintValue(h,b,X,Z)}_setPaintValue(h,b,D,z){if(this.type==="color"){let G=Na(D),X=Na(z);for(let Z=h;Z`#define HAS_UNIFORM_${z}`)))}return h}getBinderAttributes(){let h=[];for(let b in this.binders){let D=this.binders[b];if(D instanceof _o||D instanceof po)for(let z of D.paintVertexAttributes)h.push(z.name);else if(D instanceof Xo){let z=D.getVertexAttributes();for(let G of z)h.push(G.name)}}return h}getBinderUniforms(){let h=[];for(let b in this.binders){let D=this.binders[b];if(D instanceof Ns||D instanceof vo||D instanceof po)for(let z of D.uniformNames)h.push(z)}return h}getPaintVertexBuffers(){return this._buffers}getUniforms(h,b){let D=[];for(let z in this.binders){let G=this.binders[z];if(G instanceof Ns||G instanceof vo||G instanceof po){for(let X of G.uniformNames)if(b[X]){let Z=G.getBinding(h,b[X],X);D.push({name:X,property:z,binding:Z})}}}return D}setUniforms(h,b,D,z){for(let{name:G,property:X,binding:Z}of b)this.binders[X].setUniform(Z,z,D.get(X),G)}updatePaintBuffers(h){this._buffers=[];for(let b in this.binders){let D=this.binders[b];if(h&&D instanceof Xo){let z=h.fromScale===2?D.zoomInPaintVertexBuffer:D.zoomOutPaintVertexBuffer;z&&this._buffers.push(z)}else(D instanceof _o||D instanceof po)&&D.paintVertexBuffer&&this._buffers.push(D.paintVertexBuffer)}}upload(h){for(let b in this.binders){let D=this.binders[b];(D instanceof _o||D instanceof po||D instanceof Xo)&&D.upload(h)}this.updatePaintBuffers()}destroy(){for(let h in this.binders){let b=this.binders[h];(b instanceof _o||b instanceof po||b instanceof Xo)&&b.destroy()}}}class Ta{constructor(h,b,D=()=>!0){this.programConfigurations={};for(let z of h)this.programConfigurations[z.id]=new ql(z,b,D);this.needsUpload=!1,this._featureMap=new zi,this._bufferOffset=0}populatePaintArrays(h,b,D,z){for(let G in this.programConfigurations)this.programConfigurations[G].populatePaintArrays(h,b,z);b.id!==void 0&&this._featureMap.add(b.id,D,this._bufferOffset,h),this._bufferOffset=h,this.needsUpload=!0}updatePaintArrays(h,b,D,z){for(let G of D)this.needsUpload=this.programConfigurations[G.id].updatePaintArrays(h,this._featureMap,b,G,z)||this.needsUpload}get(h){return this.programConfigurations[h]}upload(h){if(this.needsUpload){for(let b in this.programConfigurations)this.programConfigurations[b].upload(h);this.needsUpload=!1}}destroy(){for(let h in this.programConfigurations)this.programConfigurations[h].destroy()}}function vu(M,h){return{"text-opacity":["opacity"],"icon-opacity":["opacity"],"text-color":["fill_color"],"icon-color":["fill_color"],"text-halo-color":["halo_color"],"icon-halo-color":["halo_color"],"text-halo-blur":["halo_blur"],"icon-halo-blur":["halo_blur"],"text-halo-width":["halo_width"],"icon-halo-width":["halo_width"],"line-gap-width":["gapwidth"],"line-dasharray":["dasharray_to","dasharray_from"],"line-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"],"fill-extrusion-pattern":["pattern_to","pattern_from","pixel_ratio_to","pixel_ratio_from"]}[M]||[M.replace(`${h}-`,"").replace(/-/g,"_")]}function ys(M,h,b){let D={color:{source:nr,composite:P},number:{source:Mi,composite:nr}},z=(function(G){return{"line-pattern":{source:Pt,composite:Pt},"fill-pattern":{source:Pt,composite:Pt},"fill-extrusion-pattern":{source:Pt,composite:Pt},"line-dasharray":{source:$t,composite:$t}}[G]})(M);return(z==null?void 0:z[b])||D[h][b]}_i("ConstantBinder",Ns),_i("CrossFadedConstantBinder",vo),_i("SourceExpressionBinder",_o),_i("CrossFadedPatternBinder",no),_i("CrossFadedDasharrayBinder",Us),_i("CompositeExpressionBinder",po),_i("ProgramConfiguration",ql,{omit:["_buffers"]}),_i("ProgramConfigurationSet",Ta);let xc=Math.pow(2,14)-1,Zl=-xc-1;function $l(M){let h=j/M.extent,b=M.loadGeometry();for(let D of b)for(let z of D){let G=Math.round(z.x*h),X=Math.round(z.y*h);z.x=ue(G,Zl,xc),z.y=ue(X,Zl,xc),(Gz.x+1||Xz.y+1)&&me("Geometry exceeds allowed extent, reduce your vector tile buffer size")}return b}function xa(M,h){return{type:M.type,id:M.id,properties:M.properties,geometry:h?$l(M):[]}}let uo=-32768;function Es(M,h,b,D,z){M.emplaceBack(uo+8*h+D,uo+8*b+z)}class vr{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.layoutVertexArray=new at,this.indexArray=new Er,this.segments=new an,this.programConfigurations=new Ta(h.layers,h.zoom),this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){let z=this.layers[0],G=[],X=null,Z=!1,re=z.type==="heatmap";if(z.type==="circle"){let he=z;X=he.layout.get("circle-sort-key"),Z=!X.isConstant(),re||(re=he.paint.get("circle-pitch-alignment")==="map")}let Q=re?b.subdivisionGranularity.circle:1;for(let{feature:he,id:oe,index:ke,sourceLayerIndex:ge}of h){let Ue=this.layers[0]._featureFilter.needGeometry,je=xa(he,Ue);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),je,D))continue;let vt=Z?X.evaluate(je,{},D):void 0,gt={id:oe,properties:he.properties,type:he.type,sourceLayerIndex:ge,index:ke,geometry:Ue?je.geometry:$l(he),patterns:{},sortKey:vt};G.push(gt)}Z&&G.sort(((he,oe)=>he.sortKey-oe.sortKey));for(let he of G){let{geometry:oe,index:ke,sourceLayerIndex:ge}=he,Ue=h[ke].feature;this.addFeature(he,oe,ke,D,Q),b.featureIndex.insert(Ue,oe,ke,ge,this.index)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,Lr),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}addFeature(h,b,D,z,G=1){let X;switch(G){case 1:X=[0,7];break;case 3:X=[0,2,5,7];break;case 5:X=[0,1,3,4,6,7];break;case 7:X=[0,1,2,3,4,5,6,7];break;default:throw new Error(`Invalid circle bucket granularity: ${G}; valid values are 1, 3, 5, 7.`)}let Z=X.length;for(let re of b)for(let Q of re){let he=Q.x,oe=Q.y;if(he<0||he>=j||oe<0||oe>=j)continue;let ke=this.segments.prepareSegment(Z*Z,this.layoutVertexArray,this.indexArray,h.sortKey),ge=ke.vertexLength;for(let Ue=0;Ue1){if(xs(M,h))return!0;for(let D of h)if(ar(D,M,b))return!0}for(let D of M)if(ar(D,h,b))return!0;return!1}function xs(M,h){if(M.length===0||h.length===0)return!1;for(let b=0;b1?b:b.sub(h)._mult(z)._add(h))}function Pr(M,h){let b,D,z,G=!1;for(let X of M){b=X;for(let Z=0,re=b.length-1;Zh.y!=z.y>h.y&&h.x<(z.x-D.x)*(h.y-D.y)/(z.y-D.y)+D.x&&(G=!G)}return G}function pn(M,h){let b=!1;for(let D=0,z=M.length-1;Dh.y!=X.y>h.y&&h.x<(X.x-G.x)*(h.y-G.y)/(X.y-G.y)+G.x&&(b=!b)}return b}function Mn(M,h,b){let D=b[0],z=b[2];if(M.xz.x&&h.x>z.x||M.yz.y&&h.y>z.y)return!1;let G=be(M,h,b[0]);return G!==be(M,h,b[1])||G!==be(M,h,b[2])||G!==be(M,h,b[3])}function sn(M,h,b){let D=h.paint.get(M).value;return D.kind==="constant"?D.value:b.programConfigurations.get(h.id).getMaxValue(M)}function tn(M){return Math.sqrt(M[0]*M[0]+M[1]*M[1])}function Hr(M,h,b,D,z){if(!h[0]&&!h[1])return M;let G=o.convert(h)._mult(z);b==="viewport"&&G._rotate(-D);let X=[];for(let Z of M)X.push(Z.sub(G));return X}function Mr(M){let h=[];for(let b=0;bsa(_t,vt,gt,It)))})(Q,G,Z,re),Ue=he),Xn({queryGeometry:ge,size:Ue,transform:G,unwrappedTileID:Z,getElevation:re,pitchAlignment:ke,pitchScale:oe},z)}}class $i extends vr{}let Fi;_i("HeatmapBucket",$i,{omit:["layers"]});var ji={get paint(){return Fi=Fi||new ms({"heatmap-radius":new Di(Ct.paint_heatmap["heatmap-radius"]),"heatmap-weight":new Di(Ct.paint_heatmap["heatmap-weight"]),"heatmap-intensity":new wi(Ct.paint_heatmap["heatmap-intensity"]),"heatmap-color":new du(Ct.paint_heatmap["heatmap-color"]),"heatmap-opacity":new wi(Ct.paint_heatmap["heatmap-opacity"])})}};function Wi(M,{width:h,height:b},D,z){if(z){if(z instanceof Uint8ClampedArray)z=new Uint8Array(z.buffer);else if(z.length!==h*b*D)throw new RangeError(`mismatched image size. expected: ${z.length} but got: ${h*b*D}`)}else z=new Uint8Array(h*b*D);return M.width=h,M.height=b,M.data=z,M}function Fa(M,{width:h,height:b},D){if(h===M.width&&b===M.height)return;let z=Wi({},{width:h,height:b},D);Vs(M,z,{x:0,y:0},{x:0,y:0},{width:Math.min(M.width,h),height:Math.min(M.height,b)},D),M.width=h,M.height=b,M.data=z.data}function Vs(M,h,b,D,z,G){if(z.width===0||z.height===0)return h;if(z.width>M.width||z.height>M.height||b.x>M.width-z.width||b.y>M.height-z.height)throw new RangeError("out of range source coordinates for image copy");if(z.width>h.width||z.height>h.height||D.x>h.width-z.width||D.y>h.height-z.height)throw new RangeError("out of range destination coordinates for image copy");let X=M.data,Z=h.data;if(X===Z)throw new Error("srcData equals dstData, so image is already copied");for(let re=0;re{h[M.evaluationKey]=re;let Q=M.expression.evaluate(h);z.setPixel(X/4/b,Z/4,Q)};if(M.clips)for(let X=0,Z=0;Xthis.max&&(this.max=oe),oe=this.dim+1||b<-1||b>=this.dim+1)throw new RangeError(`Out of range source coordinates for DEM data. x: ${h}, y: ${b}, dim: ${this.dim}`);return(b+1)*this.stride+(h+1)}unpack(h,b,D){return h*this.redFactor+b*this.greenFactor+D*this.blueFactor-this.baseShift}pack(h){return yQ(h,this.getUnpackVector())}getPixels(){return new Kl({width:this.stride,height:this.stride},new Uint8Array(this.data.buffer))}backfillBorder(h,b,D){if(this.dim!==h.dim)throw new Error("dem dimension mismatch");let z=b*this.dim,G=b*this.dim+this.dim,X=D*this.dim,Z=D*this.dim+this.dim;switch(b){case-1:z=G-1;break;case 1:G=z+1}switch(D){case-1:X=Z-1;break;case 1:Z=X+1}let re=-b*this.dim,Q=-D*this.dim;for(let he=X;he0)for(let X=h;X=h;X-=D)G=TQ(X/D|0,M[X],M[X+1],G);return G&&N_(G,G.next)&&(u4(G),G=G.next),G}function rx(M,h){if(!M)return M;h||(h=M);let b,D=M;do if(b=!1,D.steiner||!N_(D,D.next)&&Cu(D.prev,D,D.next)!==0)D=D.next;else{if(u4(D),D=h=D.prev,D===D.next)break;b=!0}while(b||D!==h);return h}function o4(M,h,b,D,z,G,X){if(!M)return;!X&&G&&(function(re,Q,he,oe){let ke=re;do ke.z===0&&(ke.z=VR(ke.x,ke.y,Q,he,oe)),ke.prevZ=ke.prev,ke.nextZ=ke.next,ke=ke.next;while(ke!==re);ke.prevZ.nextZ=null,ke.prevZ=null,(function(ge){let Ue,je=1;do{let vt,gt=ge;ge=null;let It=null;for(Ue=0;gt;){Ue++;let _t=gt,qt=0;for(let lr=0;lr0||tr>0&&_t;)qt!==0&&(tr===0||!_t||gt.z<=_t.z)?(vt=gt,gt=gt.nextZ,qt--):(vt=_t,_t=_t.nextZ,tr--),It?It.nextZ=vt:ge=vt,vt.prevZ=It,It=vt;gt=_t}It.nextZ=null,je*=2}while(Ue>1)})(ke)})(M,D,z,G);let Z=M;for(;M.prev!==M.next;){let re=M.prev,Q=M.next;if(G?Wrt(M,D,z,G):jrt(M))h.push(re.i,M.i,Q.i),u4(M),M=Q.next,Z=Q.next;else if((M=Q)===Z){X?X===1?o4(M=Yrt(rx(M),h),h,b,D,z,G,2):X===2&&Xrt(M,h,b,D,z,G):o4(rx(M),h,b,D,z,G,1);break}}}function jrt(M){let h=M.prev,b=M,D=M.next;if(Cu(h,b,D)>=0)return!1;let z=h.x,G=b.x,X=D.x,Z=h.y,re=b.y,Q=D.y,he=Math.min(z,G,X),oe=Math.min(Z,re,Q),ke=Math.max(z,G,X),ge=Math.max(Z,re,Q),Ue=D.next;for(;Ue!==h;){if(Ue.x>=he&&Ue.x<=ke&&Ue.y>=oe&&Ue.y<=ge&&s4(z,Z,G,re,X,Q,Ue.x,Ue.y)&&Cu(Ue.prev,Ue,Ue.next)>=0)return!1;Ue=Ue.next}return!0}function Wrt(M,h,b,D){let z=M.prev,G=M,X=M.next;if(Cu(z,G,X)>=0)return!1;let Z=z.x,re=G.x,Q=X.x,he=z.y,oe=G.y,ke=X.y,ge=Math.min(Z,re,Q),Ue=Math.min(he,oe,ke),je=Math.max(Z,re,Q),vt=Math.max(he,oe,ke),gt=VR(ge,Ue,h,b,D),It=VR(je,vt,h,b,D),_t=M.prevZ,qt=M.nextZ;for(;_t&&_t.z>=gt&&qt&&qt.z<=It;){if(_t.x>=ge&&_t.x<=je&&_t.y>=Ue&&_t.y<=vt&&_t!==z&&_t!==X&&s4(Z,he,re,oe,Q,ke,_t.x,_t.y)&&Cu(_t.prev,_t,_t.next)>=0||(_t=_t.prevZ,qt.x>=ge&&qt.x<=je&&qt.y>=Ue&&qt.y<=vt&&qt!==z&&qt!==X&&s4(Z,he,re,oe,Q,ke,qt.x,qt.y)&&Cu(qt.prev,qt,qt.next)>=0))return!1;qt=qt.nextZ}for(;_t&&_t.z>=gt;){if(_t.x>=ge&&_t.x<=je&&_t.y>=Ue&&_t.y<=vt&&_t!==z&&_t!==X&&s4(Z,he,re,oe,Q,ke,_t.x,_t.y)&&Cu(_t.prev,_t,_t.next)>=0)return!1;_t=_t.prevZ}for(;qt&&qt.z<=It;){if(qt.x>=ge&&qt.x<=je&&qt.y>=Ue&&qt.y<=vt&&qt!==z&&qt!==X&&s4(Z,he,re,oe,Q,ke,qt.x,qt.y)&&Cu(qt.prev,qt,qt.next)>=0)return!1;qt=qt.nextZ}return!0}function Yrt(M,h){let b=M;do{let D=b.prev,z=b.next.next;!N_(D,z)&&bQ(D,b,b.next,z)&&l4(D,z)&&l4(z,D)&&(h.push(D.i,b.i,z.i),u4(b),u4(b.next),b=M=z),b=b.next}while(b!==M);return rx(b)}function Xrt(M,h,b,D,z,G){let X=M;do{let Z=X.next.next;for(;Z!==X.prev;){if(X.i!==Z.i&&Qrt(X,Z)){let re=wQ(X,Z);return X=rx(X,X.next),re=rx(re,re.next),o4(X,h,b,D,z,G,0),void o4(re,h,b,D,z,G,0)}Z=Z.next}X=X.next}while(X!==M)}function Zrt(M,h){let b=M.x-h.x;return b===0&&(b=M.y-h.y,b===0)&&(b=(M.next.y-M.y)/(M.next.x-M.x)-(h.next.y-h.y)/(h.next.x-h.x)),b}function $rt(M,h){let b=(function(z,G){let X=G,Z=z.x,re=z.y,Q,he=-1/0;if(N_(z,X))return X;do{if(N_(z,X.next))return X.next;if(re<=X.y&&re>=X.next.y&&X.next.y!==X.y){let je=X.x+(re-X.y)*(X.next.x-X.x)/(X.next.y-X.y);if(je<=Z&&je>he&&(he=je,Q=X.x=X.x&&X.x>=ke&&Z!==X.x&&_Q(reQ.x||X.x===Q.x&&Krt(Q,X)))&&(Q=X,Ue=je)}X=X.next}while(X!==oe);return Q})(M,h);if(!b)return h;let D=wQ(b,M);return rx(D,D.next),rx(b,b.next)}function Krt(M,h){return Cu(M.prev,M,h.prev)<0&&Cu(h.next,M,M.next)<0}function VR(M,h,b,D,z){return(M=1431655765&((M=858993459&((M=252645135&((M=16711935&((M=(M-b)*z|0)|M<<8))|M<<4))|M<<2))|M<<1))|(h=1431655765&((h=858993459&((h=252645135&((h=16711935&((h=(h-D)*z|0)|h<<8))|h<<4))|h<<2))|h<<1))<<1}function Jrt(M){let h=M,b=M;do(h.x=(M-X)*(G-Z)&&(M-X)*(D-Z)>=(b-X)*(h-Z)&&(b-X)*(G-Z)>=(z-X)*(D-Z)}function s4(M,h,b,D,z,G,X,Z){return!(M===X&&h===Z)&&_Q(M,h,b,D,z,G,X,Z)}function Qrt(M,h){return M.next.i!==h.i&&M.prev.i!==h.i&&!(function(b,D){let z=b;do{if(z.i!==b.i&&z.next.i!==b.i&&z.i!==D.i&&z.next.i!==D.i&&bQ(z,z.next,b,D))return!0;z=z.next}while(z!==b);return!1})(M,h)&&(l4(M,h)&&l4(h,M)&&(function(b,D){let z=b,G=!1,X=(b.x+D.x)/2,Z=(b.y+D.y)/2;do z.y>Z!=z.next.y>Z&&z.next.y!==z.y&&X<(z.next.x-z.x)*(Z-z.y)/(z.next.y-z.y)+z.x&&(G=!G),z=z.next;while(z!==b);return G})(M,h)&&(Cu(M.prev,M,h.prev)||Cu(M,h.prev,h))||N_(M,h)&&Cu(M.prev,M,M.next)>0&&Cu(h.prev,h,h.next)>0)}function Cu(M,h,b){return(h.y-M.y)*(b.x-h.x)-(h.x-M.x)*(b.y-h.y)}function N_(M,h){return M.x===h.x&&M.y===h.y}function bQ(M,h,b,D){let z=ES(Cu(M,h,b)),G=ES(Cu(M,h,D)),X=ES(Cu(b,D,M)),Z=ES(Cu(b,D,h));return z!==G&&X!==Z||!(z!==0||!SS(M,b,h))||!(G!==0||!SS(M,D,h))||!(X!==0||!SS(b,M,D))||!(Z!==0||!SS(b,h,D))}function SS(M,h,b){return h.x<=Math.max(M.x,b.x)&&h.x>=Math.min(M.x,b.x)&&h.y<=Math.max(M.y,b.y)&&h.y>=Math.min(M.y,b.y)}function ES(M){return M>0?1:M<0?-1:0}function l4(M,h){return Cu(M.prev,M,M.next)<0?Cu(M,h,M.next)>=0&&Cu(M,M.prev,h)>=0:Cu(M,h,M.prev)<0||Cu(M,M.next,h)<0}function wQ(M,h){let b=GR(M.i,M.x,M.y),D=GR(h.i,h.x,h.y),z=M.next,G=h.prev;return M.next=h,h.prev=M,b.next=z,z.prev=b,D.next=b,b.prev=D,G.next=D,D.prev=G,D}function TQ(M,h,b,D){let z=GR(M,h,b);return D?(z.next=D.next,z.prev=D,D.next.prev=z,D.next=z):(z.prev=z,z.next=z),z}function u4(M){M.next.prev=M.prev,M.prev.next=M.next,M.prevZ&&(M.prevZ.nextZ=M.nextZ),M.nextZ&&(M.nextZ.prevZ=M.prevZ)}function GR(M,h,b){return{i:M,x:h,y:b,prev:null,next:null,z:0,prevZ:null,nextZ:null,steiner:!1}}class U_{constructor(h,b){if(b>h)throw new Error("Min granularity must not be greater than base granularity.");this._baseZoomGranularity=h,this._minGranularity=b}getGranularityForZoomLevel(h){return Math.max(Math.floor(this._baseZoomGranularity/(1<32767||b>32767)throw new Error("Vertex coordinates are out of signed 16 bit integer range.");let D=0|Math.round(h),z=0|Math.round(b),G=this._getKey(D,z);if(this._vertexDictionary.has(G))return this._vertexDictionary.get(G);let X=this._vertexBuffer.length/2;return this._vertexDictionary.set(G,X),this._vertexBuffer.push(D,z),X}_subdivideTrianglesScanline(h){if(this._granularity<2)return(function(z,G){let X=[];for(let Z=0;Z0?(X.push(re),X.push(he),X.push(Q)):(X.push(re),X.push(Q),X.push(he))}return X})(this._vertexBuffer,h);let b=[],D=h.length;for(let z=0;z=1||tr<=0)||gt&&(QG)){oe>=z&&oe<=G&&X.push(D[(Z+1)%3]);continue}!gt&&qt>0&&X.push(this._vertexToIndex(re+Ue*qt,Q+je*qt));let lr=re+Ue*Math.max(qt,0),qr=re+Ue*Math.min(tr,1);vt||this._generateIntraEdgeVertices(X,re,Q,he,oe,lr,qr),!gt&&tr<1&&X.push(this._vertexToIndex(re+Ue*tr,Q+je*tr)),(gt||oe>=z&&oe<=G)&&X.push(D[(Z+1)%3]),!gt&&(oe<=z||oe>=G)&&this._generateInterEdgeVertices(X,re,Q,he,oe,ke,ge,qr,z,G)}return X}_generateIntraEdgeVertices(h,b,D,z,G,X,Z){let re=z-b,Q=G-D,he=Q===0,oe=he?Math.min(b,z):Math.min(X,Z),ke=he?Math.max(b,z):Math.max(X,Z),ge=Math.floor(oe/this._granularityCellSize)+1,Ue=Math.ceil(ke/this._granularityCellSize)-1;if(he?b=ge;je--){let vt=je*this._granularityCellSize;h.push(this._vertexToIndex(vt,D+Q*(vt-b)/re))}}_generateInterEdgeVertices(h,b,D,z,G,X,Z,re,Q,he){let oe=G-D,ke=X-z,ge=Z-G,Ue=(Q-G)/ge,je=(he-G)/ge,vt=Math.min(Ue,je),gt=Math.max(Ue,je),It=z+ke*vt,_t=Math.floor(Math.min(It,re)/this._granularityCellSize)+1,qt=Math.ceil(Math.max(It,re)/this._granularityCellSize)-1,tr=re=1||gt<=0){let jr=D-Z,_n=X+(b-X)*Math.min((Q-Z)/jr,(he-Z)/jr);_t=Math.floor(Math.min(_n,re)/this._granularityCellSize)+1,qt=Math.ceil(Math.max(_n,re)/this._granularityCellSize)-1,tr=re<_n}let qr=oe>0?he:Q;if(tr)for(let jr=_t;jr<=qt;jr++)h.push(this._vertexToIndex(jr*this._granularityCellSize,qr));else for(let jr=qt;jr>=_t;jr--)h.push(this._vertexToIndex(jr*this._granularityCellSize,qr))}_generateOutline(h){let b=[];for(let D of h){let z=nx(D,this._granularity,!0),G=this._pointArrayToIndices(z),X=[];for(let Z=1;ZG!=(X===V_)?(h.push(b),h.push(D),h.push(this._vertexToIndex(z,X)),h.push(D),h.push(this._vertexToIndex(G,X)),h.push(this._vertexToIndex(z,X))):(h.push(D),h.push(b),h.push(this._vertexToIndex(z,X)),h.push(this._vertexToIndex(G,X)),h.push(D),h.push(this._vertexToIndex(z,X)))}_fillPoles(h,b,D){let z=this._vertexBuffer,G=j,X=h.length;for(let Z=2;Z80*oe){vt=Q[0],gt=Q[1];let _t=vt,qt=gt;for(let tr=oe;tr_t&&(_t=lr),qr>qt&&(qt=qr)}It=Math.max(_t-vt,qt-gt),It=It!==0?32767/It:0}return o4(Ue,je,oe,vt,gt,It,0),je})(D,z),re=this._convertIndices(D,Z);G=this._subdivideTrianglesScanline(re)}catch(Z){console.error(Z)}let X=[];return b&&(X=this._generateOutline(h)),this._ensureNoPoleVertices(),this._handlePoles(G),{verticesFlattened:this._vertexBuffer,indicesTriangles:G,indicesLineList:X}}_convertIndices(h,b){let D=[];for(let z of b)D.push(this._vertexToIndex(h[2*z],h[2*z+1]));return D}_pointArrayToIndices(h){let b=[];for(let D of h)b.push(this._vertexToIndex(D.x,D.y));return b}}function AQ(M,h,b,D=!0){return new ent(b,h).subdividePolygonInternal(M,D)}function nx(M,h,b=!1){if(!M||M.length<1)return[];if(M.length<2)return[];let D=M[0],z=M[M.length-1],G=b&&(D.x!==z.x||D.y!==z.y);if(h<2)return G?[...M,M[0]]:[...M];let X=Math.floor(j/h),Z=[];Z.push(new o(M[0].x,M[0].y));let re=M.length,Q=G?re:re-1;for(let he=0;he0?(Math.floor(qr/X)+1)*X:(Math.ceil(qr/X)-1)*X,Dn=qt>0?(Math.floor(jr/X)+1)*X:(Math.ceil(jr/X)-1)*X,Hn=Math.abs(qr-fn),Ln=Math.abs(jr-Dn),un=Math.abs(qr-je),ei=Math.abs(jr-vt),ci=gt?Hn/tr:Number.POSITIVE_INFINITY,ti=It?Ln/lr:Number.POSITIVE_INFINITY;if((un<=Hn||!gt)&&(ei<=Ln||!It))break;if(ci=0?X-1:G-1,Q=(Z+1)%G,he=M[2*h[re]],oe=M[2*h[Q]],ke=M[2*h[X]],ge=M[2*h[X]+1],Ue=M[2*h[Z]+1],je=!1;if(heoe)je=!1;else{let vt=Ue-ge,gt=-(M[2*h[Z]]-ke),It=ge((oe-ke)*vt+(M[2*h[Q]+1]-ge)*gt)*It&&(je=!0)}if(je){let vt=h[re],gt=h[X],It=h[Z];vt!==gt&&vt!==It&>!==It&&b.push(It,gt,vt),X--,X<0&&(X=G-1)}else{let vt=h[Q],gt=h[X],It=h[Z];vt!==gt&&vt!==It&>!==It&&b.push(It,gt,vt),Z++,Z>=G&&(Z=0)}if(re===Q)break}}function MQ(M,h,b,D,z,G,X,Z,re){let Q=z.length/2,he=X&&Z&&re;if(Qan.MAX_VERTEX_ARRAY_LENGTH&&(qt=oe.createNewSegment(ke,ge),_t=It.count,fn=!0,Dn=!0,Hn=!0,tr=0);let Ln=f4(gt,Ue,vt,It,qr,fn,qt),un=f4(gt,Ue,vt,It,jr,Dn,qt),ei=f4(gt,Ue,vt,It,_n,Hn,qt);ge.emplaceBack(tr+Ln-_t,tr+un-_t,tr+ei-_t),qt.primitiveLength++}})(h,b,D,z,G,M),he&&(function(oe,ke,ge,Ue,je,vt){let gt=[];for(let lr=0;lran.MAX_VERTEX_ARRAY_LENGTH&&(qt=oe.createNewSegment(ke,ge),_t=It.count,fn=!0,Dn=!0,tr=0);let Hn=f4(gt,Ue,vt,It,jr,fn,qt),Ln=f4(gt,Ue,vt,It,_n,Dn,qt);ge.emplaceBack(tr+Hn-_t,tr+Ln-_t),qt.primitiveLength++}})(X,b,Z,z,re,M),h.forceNewSegmentOnNextPrepare(),X==null||X.forceNewSegmentOnNextPrepare()}function f4(M,h,b,D,z,G,X){if(G){let Z=D.count;return b(h[2*z],h[2*z+1]),M[z]=D.count,D.count++,X.vertexLength++,Z}return M[z]}class HR{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.patternFeatures=[],this.layoutVertexArray=new xt,this.indexArray=new Er,this.indexArray2=new Tr,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.segments2=new an,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.hasDependencies=MS("fill",this.layers,b);let z=this.layers[0].layout.get("fill-sort-key"),G=!z.isConstant(),X=[];for(let{feature:Z,id:re,index:Q,sourceLayerIndex:he}of h){let oe=this.layers[0]._featureFilter.needGeometry,ke=xa(Z,oe);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),ke,D))continue;let ge=G?z.evaluate(ke,{},D,b.availableImages):void 0,Ue={id:re,properties:Z.properties,type:Z.type,sourceLayerIndex:he,index:Q,geometry:oe?ke.geometry:$l(Z),patterns:{},sortKey:ge};X.push(Ue)}G&&X.sort(((Z,re)=>Z.sortKey-re.sortKey));for(let Z of X){let{geometry:re,index:Q,sourceLayerIndex:he}=Z;if(this.hasDependencies){let oe=UR("fill",this.layers,Z,{zoom:this.zoom},b);this.patternFeatures.push(oe)}else this.addFeature(Z,re,Q,D,{},b.subdivisionGranularity);b.featureIndex.insert(h[Q].feature,re,Q,he,this.index)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}addFeatures(h,b,D){for(let z of this.patternFeatures)this.addFeature(z,z.geometry,z.index,b,D,h.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,Hrt),this.indexBuffer=h.createIndexBuffer(this.indexArray),this.indexBuffer2=h.createIndexBuffer(this.indexArray2)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.indexBuffer2.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.segments2.destroy())}addFeature(h,b,D,z,G,X){for(let Z of uh(b,500)){let re=AQ(Z,z,X.fill.getGranularityForZoomLevel(z.z)),Q=this.layoutVertexArray;MQ(((he,oe)=>{Q.emplaceBack(he,oe)}),this.segments,this.layoutVertexArray,this.indexArray,re.verticesFlattened,re.indicesTriangles,this.segments2,this.indexArray2,re.indicesLineList)}this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,h,D,{imagePositions:G,canonical:z})}}let SQ,EQ;_i("FillBucket",HR,{omit:["layers","patternFeatures"]});var rnt={get paint(){return EQ=EQ||new ms({"fill-antialias":new wi(Ct.paint_fill["fill-antialias"]),"fill-opacity":new Di(Ct.paint_fill["fill-opacity"]),"fill-color":new Di(Ct.paint_fill["fill-color"]),"fill-outline-color":new Di(Ct.paint_fill["fill-outline-color"]),"fill-translate":new wi(Ct.paint_fill["fill-translate"]),"fill-translate-anchor":new wi(Ct.paint_fill["fill-translate-anchor"]),"fill-pattern":new fl(Ct.paint_fill["fill-pattern"])})},get layout(){return SQ=SQ||new ms({"fill-sort-key":new Di(Ct.layout_fill["fill-sort-key"])})}};class nnt extends hl{constructor(h,b){super(h,rnt,b)}recalculate(h,b){super.recalculate(h,b);let D=this.paint._values["fill-outline-color"];D.value.kind==="constant"&&D.value.value===void 0&&(this.paint._values["fill-outline-color"]=this.paint._values["fill-color"])}createBucket(h){return new HR(h)}queryRadius(){return tn(this.paint.get("fill-translate"))}queryIntersectsFeature({queryGeometry:h,geometry:b,transform:D,pixelsToTileUnits:z}){return Gi(Hr(h,this.paint.get("fill-translate"),this.paint.get("fill-translate-anchor"),-D.bearingInRadians,z),b)}isTileClipped(){return!0}}let int=Re([{name:"a_pos",components:2,type:"Int16"},{name:"a_normal_ed",components:4,type:"Int16"}],4),ant=Re([{name:"a_centroid",components:2,type:"Int16"}],4),{members:ont}=int;class h4{constructor(h,b,D,z,G){this.properties={},this.extent=D,this.type=0,this.id=void 0,this._pbf=h,this._geometry=-1,this._keys=z,this._values=G,h.readFields(snt,this,b)}loadGeometry(){let h=this._pbf;h.pos=this._geometry;let b=h.readVarint()+h.pos,D=[],z,G=1,X=0,Z=0,re=0;for(;h.pos>3}if(X--,G===1||G===2)Z+=h.readSVarint(),re+=h.readSVarint(),G===1&&(z&&D.push(z),z=[]),z&&z.push(new o(Z,re));else{if(G!==7)throw new Error(`unknown command ${G}`);z&&z.push(z[0].clone())}}return z&&D.push(z),D}bbox(){let h=this._pbf;h.pos=this._geometry;let b=h.readVarint()+h.pos,D=1,z=0,G=0,X=0,Z=1/0,re=-1/0,Q=1/0,he=-1/0;for(;h.pos>3}if(z--,D===1||D===2)G+=h.readSVarint(),X+=h.readSVarint(),Gre&&(re=G),Xhe&&(he=X);else if(D!==7)throw new Error(`unknown command ${D}`)}return[Z,Q,re,he]}toGeoJSON(h,b,D){let z=this.extent*Math.pow(2,D),G=this.extent*h,X=this.extent*b,Z=this.loadGeometry();function re(ke){return[360*(ke.x+G)/z-180,360/Math.PI*Math.atan(Math.exp((1-2*(ke.y+X)/z)*Math.PI))-90]}function Q(ke){return ke.map(re)}let he;if(this.type===1){let ke=[];for(let Ue of Z)ke.push(Ue[0]);let ge=Q(ke);he=ke.length===1?{type:"Point",coordinates:ge[0]}:{type:"MultiPoint",coordinates:ge}}else if(this.type===2){let ke=Z.map(Q);he=ke.length===1?{type:"LineString",coordinates:ke[0]}:{type:"MultiLineString",coordinates:ke}}else{if(this.type!==3)throw new Error("unknown feature type");{let ke=kQ(Z),ge=[];for(let Ue of ke)ge.push(Ue.map(Q));he=ge.length===1?{type:"Polygon",coordinates:ge[0]}:{type:"MultiPolygon",coordinates:ge}}}let oe={type:"Feature",geometry:he,properties:this.properties};return this.id!=null&&(oe.id=this.id),oe}}function snt(M,h,b){M===1?h.id=b.readVarint():M===2?(function(D,z){let G=D.readVarint()+D.pos;for(;D.pos=this._features.length)throw new Error("feature index out of bounds");this._pbf.pos=this._features[h];let b=this._pbf.readVarint()+this._pbf.pos;return new h4(this._pbf,b,this.extent,this._keys,this._values)}}function cnt(M,h,b){M===15?h.version=b.readVarint():M===1?h.name=b.readString():M===5?h.extent=b.readVarint():M===2?h._features.push(b.pos):M===3?h._keys.push(b.readString()):M===4&&h._values.push((function(D){let z=null,G=D.readVarint()+D.pos;for(;D.pos>3;z=X===1?D.readString():X===2?D.readFloat():X===3?D.readDouble():X===4?D.readVarint64():X===5?D.readVarint():X===6?D.readSVarint():X===7?D.readBoolean():null}if(z==null)throw new Error("unknown feature value");return z})(b))}class CQ{constructor(h,b){this.layers=h.readFields(fnt,{},b)}}function fnt(M,h,b){if(M===3){let D=new unt(b,b.readVarint()+b.pos);D.length&&(h[D.name]=D)}}let jR=Math.pow(2,13);function d4(M,h,b,D,z,G,X,Z){M.emplaceBack(h,b,2*Math.floor(D*jR)+X,z*jR*2,G*jR*2,Math.round(Z))}class WR{constructor(h){this.zoom=h.zoom,this.overscaling=h.overscaling,this.layers=h.layers,this.layerIds=this.layers.map((b=>b.id)),this.index=h.index,this.hasDependencies=!1,this.layoutVertexArray=new Et,this.centroidVertexArray=new Xe,this.indexArray=new Er,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.features=[],this.hasDependencies=MS("fill-extrusion",this.layers,b);for(let{feature:z,id:G,index:X,sourceLayerIndex:Z}of h){let re=this.layers[0]._featureFilter.needGeometry,Q=xa(z,re);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),Q,D))continue;let he={id:G,sourceLayerIndex:Z,index:X,geometry:re?Q.geometry:$l(z),properties:z.properties,type:z.type,patterns:{}};this.hasDependencies?this.features.push(UR("fill-extrusion",this.layers,he,{zoom:this.zoom},b)):this.addFeature(he,he.geometry,X,D,{},b.subdivisionGranularity),b.featureIndex.insert(z,he.geometry,X,Z,this.index,!0)}}addFeatures(h,b,D){for(let z of this.features){let{geometry:G}=z;this.addFeature(z,G,z.index,b,D,h.subdivisionGranularity)}}update(h,b,D){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D})}isEmpty(){return this.layoutVertexArray.length===0&&this.centroidVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,ont),this.centroidVertexBuffer=h.createVertexBuffer(this.centroidVertexArray,ant.members,!0),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy(),this.centroidVertexBuffer.destroy())}addFeature(h,b,D,z,G,X){for(let Z of uh(b,500)){let re={x:0,y:0,sampleCount:0},Q=this.layoutVertexArray.length;this.processPolygon(re,z,h,Z,X);let he=this.layoutVertexArray.length-Q,oe=Math.floor(re.x/re.sampleCount),ke=Math.floor(re.y/re.sampleCount);for(let ge=0;ge{d4(he,oe,ke,0,0,1,1,0)}),this.segments,this.layoutVertexArray,this.indexArray,Q.verticesFlattened,Q.indicesTriangles)}_generateSideFaces(h,b){let D=0;for(let z=1;zan.MAX_VERTEX_ARRAY_LENGTH&&(b.segment=this.segments.prepareSegment(4,this.layoutVertexArray,this.indexArray));let Z=G.sub(X)._perp()._unit(),re=X.dist(G);D+re>32768&&(D=0),d4(this.layoutVertexArray,G.x,G.y,Z.x,Z.y,0,0,D),d4(this.layoutVertexArray,G.x,G.y,Z.x,Z.y,0,1,D),D+=re,d4(this.layoutVertexArray,X.x,X.y,Z.x,Z.y,0,0,D),d4(this.layoutVertexArray,X.x,X.y,Z.x,Z.y,0,1,D);let Q=b.segment.vertexLength;this.indexArray.emplaceBack(Q,Q+2,Q+1),this.indexArray.emplaceBack(Q+1,Q+2,Q+3),b.segment.vertexLength+=4,b.segment.primitiveLength+=2}}}function hnt(M,h){for(let b=0;bj)||M.y===h.y&&(M.y<0||M.y>j)}function LQ(M){return M.every((h=>h.x<0))||M.every((h=>h.x>j))||M.every((h=>h.y<0))||M.every((h=>h.y>j))}let PQ;_i("FillExtrusionBucket",WR,{omit:["layers","features"]});var vnt={get paint(){return PQ=PQ||new ms({"fill-extrusion-opacity":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-opacity"]),"fill-extrusion-color":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-color"]),"fill-extrusion-translate":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-translate"]),"fill-extrusion-translate-anchor":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-translate-anchor"]),"fill-extrusion-pattern":new fl(Ct["paint_fill-extrusion"]["fill-extrusion-pattern"]),"fill-extrusion-height":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-height"]),"fill-extrusion-base":new Di(Ct["paint_fill-extrusion"]["fill-extrusion-base"]),"fill-extrusion-vertical-gradient":new wi(Ct["paint_fill-extrusion"]["fill-extrusion-vertical-gradient"])})}};class pnt extends hl{constructor(h,b){super(h,vnt,b)}createBucket(h){return new WR(h)}queryRadius(){return tn(this.paint.get("fill-extrusion-translate"))}is3D(){return!0}queryIntersectsFeature({queryGeometry:h,feature:b,featureState:D,geometry:z,transform:G,pixelsToTileUnits:X,pixelPosMatrix:Z}){let re=Hr(h,this.paint.get("fill-extrusion-translate"),this.paint.get("fill-extrusion-translate-anchor"),-G.bearingInRadians,X),Q=this.paint.get("fill-extrusion-height").evaluate(b,D),he=this.paint.get("fill-extrusion-base").evaluate(b,D),oe=(function(ge,Ue){let je=[];for(let vt of ge){let gt=[vt.x,vt.y,0,1];I(gt,gt,Ue),je.push(new o(gt[0]/gt[3],gt[1]/gt[3]))}return je})(re,Z),ke=(function(ge,Ue,je,vt){let gt=[],It=[],_t=vt[8]*Ue,qt=vt[9]*Ue,tr=vt[10]*Ue,lr=vt[11]*Ue,qr=vt[8]*je,jr=vt[9]*je,_n=vt[10]*je,fn=vt[11]*je;for(let Dn of ge){let Hn=[],Ln=[];for(let un of Dn){let ei=un.x,ci=un.y,ti=vt[0]*ei+vt[4]*ci+vt[12],di=vt[1]*ei+vt[5]*ci+vt[13],_a=vt[2]*ei+vt[6]*ci+vt[14],Ao=vt[3]*ei+vt[7]*ci+vt[15],us=_a+tr,ks=Ao+lr,Uf=ti+qr,Jl=di+jr,_c=_a+_n,zc=Ao+fn,Sl=new o((ti+_t)/ks,(di+qt)/ks);Sl.z=us/ks,Hn.push(Sl);let df=new o(Uf/zc,Jl/zc);df.z=_c/zc,Ln.push(df)}gt.push(Hn),It.push(Ln)}return[gt,It]})(z,he,Q,Z);return(function(ge,Ue,je){let vt=1/0;Gi(je,Ue)&&(vt=FQ(je,Ue[0]));for(let gt=0;gt>4;if(z!==1)throw new Error(`Got v${z} data when expected v1.`);let G=DQ[15&D];if(!G)throw new Error("Unrecognized array type.");let[X]=new Uint16Array(h,2,1),[Z]=new Uint32Array(h,4,1);return new CS(Z,X,G,h)}constructor(h,b=64,D=Float64Array,z){if(isNaN(h)||h<0)throw new Error(`Unpexpected numItems value: ${h}.`);this.numItems=+h,this.nodeSize=Math.min(Math.max(+b,2),65535),this.ArrayType=D,this.IndexArrayType=h<65536?Uint16Array:Uint32Array;let G=DQ.indexOf(this.ArrayType),X=2*h*this.ArrayType.BYTES_PER_ELEMENT,Z=h*this.IndexArrayType.BYTES_PER_ELEMENT,re=(8-Z%8)%8;if(G<0)throw new Error(`Unexpected typed array class: ${D}.`);z&&z instanceof ArrayBuffer?(this.data=z,this.ids=new this.IndexArrayType(this.data,8,h),this.coords=new this.ArrayType(this.data,8+Z+re,2*h),this._pos=2*h,this._finished=!0):(this.data=new ArrayBuffer(8+X+Z+re),this.ids=new this.IndexArrayType(this.data,8,h),this.coords=new this.ArrayType(this.data,8+Z+re,2*h),this._pos=0,this._finished=!1,new Uint8Array(this.data,0,2).set([219,16+G]),new Uint16Array(this.data,2,1)[0]=b,new Uint32Array(this.data,4,1)[0]=h)}add(h,b){let D=this._pos>>1;return this.ids[D]=D,this.coords[this._pos++]=h,this.coords[this._pos++]=b,D}finish(){let h=this._pos>>1;if(h!==this.numItems)throw new Error(`Added ${h} items when expected ${this.numItems}.`);return YR(this.ids,this.coords,this.nodeSize,0,this.numItems-1,0),this._finished=!0,this}range(h,b,D,z){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:G,coords:X,nodeSize:Z}=this,re=[0,G.length-1,0],Q=[];for(;re.length;){let he=re.pop()||0,oe=re.pop()||0,ke=re.pop()||0;if(oe-ke<=Z){for(let vt=ke;vt<=oe;vt++){let gt=X[2*vt],It=X[2*vt+1];gt>=h&><=D&&It>=b&&It<=z&&Q.push(G[vt])}continue}let ge=ke+oe>>1,Ue=X[2*ge],je=X[2*ge+1];Ue>=h&&Ue<=D&&je>=b&&je<=z&&Q.push(G[ge]),(he===0?h<=Ue:b<=je)&&(re.push(ke),re.push(ge-1),re.push(1-he)),(he===0?D>=Ue:z>=je)&&(re.push(ge+1),re.push(oe),re.push(1-he))}return Q}within(h,b,D){if(!this._finished)throw new Error("Data not yet indexed - call index.finish().");let{ids:z,coords:G,nodeSize:X}=this,Z=[0,z.length-1,0],re=[],Q=D*D;for(;Z.length;){let he=Z.pop()||0,oe=Z.pop()||0,ke=Z.pop()||0;if(oe-ke<=X){for(let vt=ke;vt<=oe;vt++)IQ(G[2*vt],G[2*vt+1],h,b)<=Q&&re.push(z[vt]);continue}let ge=ke+oe>>1,Ue=G[2*ge],je=G[2*ge+1];IQ(Ue,je,h,b)<=Q&&re.push(z[ge]),(he===0?h-D<=Ue:b-D<=je)&&(Z.push(ke),Z.push(ge-1),Z.push(1-he)),(he===0?h+D>=Ue:b+D>=je)&&(Z.push(ge+1),Z.push(oe),Z.push(1-he))}return re}}function YR(M,h,b,D,z,G){if(z-D<=b)return;let X=D+z>>1;RQ(M,h,X,D,z,G),YR(M,h,b,D,X-1,1-G),YR(M,h,b,X+1,z,1-G)}function RQ(M,h,b,D,z,G){for(;z>D;){if(z-D>600){let Q=z-D+1,he=b-D+1,oe=Math.log(Q),ke=.5*Math.exp(2*oe/3),ge=.5*Math.sqrt(oe*ke*(Q-ke)/Q)*(he-Q/2<0?-1:1);RQ(M,h,b,Math.max(D,Math.floor(b-he*ke/Q+ge)),Math.min(z,Math.floor(b+(Q-he)*ke/Q+ge)),G)}let X=h[2*b+G],Z=D,re=z;for(p4(M,h,D,b),h[2*z+G]>X&&p4(M,h,D,z);ZX;)re--}h[2*D+G]===X?p4(M,h,D,re):(re++,p4(M,h,re,z)),re<=b&&(D=re+1),b<=re&&(z=re-1)}}function p4(M,h,b,D){XR(M,b,D),XR(h,2*b,2*D),XR(h,2*b+1,2*D+1)}function XR(M,h,b){let D=M[h];M[h]=M[b],M[b]=D}function IQ(M,h,b,D){let z=M-b,G=h-D;return z*z+G*G}function ZR(M,h,b,D){let z=D,G=h+(b-h>>1),X,Z=b-h,re=M[h],Q=M[h+1],he=M[b],oe=M[b+1];for(let ke=h+3;kez)X=ke,z=ge;else if(ge===z){let Ue=Math.abs(ke-G);UeD&&(X-h>3&&ZR(M,h,X,D),M[X+2]=z,b-X>3&&ZR(M,X,b,D))}function gnt(M,h,b,D,z,G){let X=z-b,Z=G-D;if(X!==0||Z!==0){let re=((M-b)*X+(h-D)*Z)/(X*X+Z*Z);re>1?(b=z,D=G):re>0&&(b+=X*re,D+=Z*re)}return X=M-b,Z=h-D,X*X+Z*Z}function hf(M,h,b,D){let z={type:h,geom:b},G={id:M==null?null:M,type:z.type,geometry:z.geom,tags:D,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0};switch(z.type){case"Point":case"MultiPoint":g4(G,z.geom);break;case"LineString":g4(G,z.geom.points);break;case"Polygon":g4(G,z.geom[0].points);break;case"MultiLineString":for(let X of z.geom)g4(G,X.points);break;case"MultiPolygon":for(let X of z.geom)g4(G,X[0].points)}return G}function $R(M){M.points.length>64&&(M.points=new Float64Array(M.points))}function g4(M,h){for(let b=0;b0&&(X+=D?(z*he-Q*G)/2:Math.sqrt(Math.pow(Q-z,2)+Math.pow(he-G,2))),z=Q,G=he}let Z=h.points.length-3;h.points[2]=1,b>0&&ZR(h.points,0,Z,b),h.points[Z+2]=1,$R(h),h.size=Math.abs(X),h.start=0,h.end=h.size}function QR(M,h,b,D){for(let z=0;z1?1:b}function PS(M){let h={type:"Feature",geometry:mnt(M),properties:M.tags};return M.id!=null&&(h.id=M.id),h}function mnt(M){let{type:h,geometry:b}=M;switch(h){case"Point":return{type:h,coordinates:zQ(b[0],b[1])};case"MultiPoint":return{type:h,coordinates:FS(b)};case"LineString":return{type:h,coordinates:FS(b.points)};case"MultiLineString":case"Polygon":return{type:h,coordinates:b.map((D=>FS(D.points)))};case"MultiPolygon":return{type:h,coordinates:b.map((D=>D.map((z=>FS(z.points)))))}}}function FS(M){let h=[];for(let b=0;b=(b/=h)&&X=D)return null;let re=[];for(let Q of M){let he=z===yh.X?Q.minX:Q.minY,oe=z===yh.X?Q.maxX:Q.maxY;if(he>=b&&oe=D))switch(Q.type){case"Point":case"MultiPoint":ynt(Q,re,b,D,z);continue;case"LineString":xnt(Q,re,b,D,z,Z);continue;case"MultiLineString":_nt(Q,re,b,D,z);continue;case"Polygon":bnt(Q,re,b,D,z);continue;case"MultiPolygon":wnt(Q,re,b,D,z);continue}}return re.length?re:null}function ynt(M,h,b,D,z){let G=[];(function(X,Z,re,Q,he){for(let oe=0;oe=re&&ke<=Q&&j_(Z,X[oe],X[oe+1],X[oe+2])}})(M.geometry,G,b,D,z),G.length&&h.push(hf(M.id,G.length===3?"Point":"MultiPoint",G,M.tags))}function xnt(M,h,b,D,z,G){let X=[];if(OQ(M.geometry,X,b,D,z,!1,G.lineMetrics),X.length)if(G.lineMetrics)for(let Z of X)h.push(hf(M.id,"LineString",Z,M.tags));else h.push(X.length>1?hf(M.id,"MultiLineString",X,M.tags):hf(M.id,"LineString",X[0],M.tags))}function _nt(M,h,b,D,z){let G=[];eI(M.geometry,G,b,D,z,!1),G.length&&h.push(G.length!==1?hf(M.id,"MultiLineString",G,M.tags):hf(M.id,"LineString",G[0],M.tags))}function bnt(M,h,b,D,z){let G=[];eI(M.geometry,G,b,D,z,!0),G.length&&h.push(hf(M.id,"Polygon",G,M.tags))}function wnt(M,h,b,D,z){let G=[];for(let X of M.geometry){let Z=[];eI(X,Z,b,D,z,!0),Z.length&&G.push(Z)}G.length&&h.push(hf(M.id,"MultiPolygon",G,M.tags))}function OQ(M,h,b,D,z,G,X){let Z=NQ(M),re=z===yh.X?Tnt:Ant,Q,he,oe=M.start;for(let vt=0;vtb&&(he=re(Z,gt,It,qt,tr,b),X&&(Z.start=oe+Q*he)):lr>D?qr=b&&(he=re(Z,gt,It,qt,tr,b),jr=!0),qr>D&&lr<=D&&(he=re(Z,gt,It,qt,tr,D),jr=!0),!G&&jr&&(X&&(Z.end=oe+Q*he),h.push(Z),Z=NQ(M)),X&&(oe+=Q)}let ke=M.points.length-3,ge=M.points[ke],Ue=M.points[ke+1],je=z===yh.X?ge:Ue;je>=b&&je<=D&&j_(Z.points,ge,Ue,M.points[ke+2]),ke=Z.points.length-3,G&&ke>=3&&(Z.points[ke]!==Z.points[0]||Z.points[ke+1]!==Z.points[1])&&j_(Z.points,Z.points[0],Z.points[1],Z.points[2]),Z.points.length&&($R(Z),h.push(Z))}function NQ(M){return{points:[],size:M.size,start:M.start,end:M.end}}function eI(M,h,b,D,z,G){for(let X of M)OQ(X,h,b,D,z,G,!1)}function j_(M,h,b,D){M.push(h,b,D)}function Tnt(M,h,b,D,z,G){let X=(G-h)/(D-h);return j_(M.points,G,b+(z-b)*X,1),X}function Ant(M,h,b,D,z,G){let X=(G-b)/(z-b);return j_(M.points,h+(D-h)*X,G,1),X}function tI(M,h){let b=h.buffer/h.extent,D=M,z=O1(M,1,-1-b,b,yh.X,-1,2,h),G=O1(M,1,1-b,2+b,yh.X,-1,2,h);return(z||G)&&(D=O1(M,1,-b,1+b,yh.X,-1,2,h)||[],z&&(D=UQ(z,1).concat(D)),G&&(D=D.concat(UQ(G,-1)))),D}function UQ(M,h){let b=[];for(let D of M)switch(D.type){case"Point":case"MultiPoint":{let z=Mnt(D.geometry,h);b.push(hf(D.id,D.type,z,D.tags));continue}case"LineString":{let z=rI(D.geometry,h);b.push(hf(D.id,D.type,z,D.tags));continue}case"MultiLineString":case"Polygon":{let z=[];for(let G of D.geometry)z.push(rI(G,h));b.push(hf(D.id,D.type,z,D.tags));continue}case"MultiPolygon":{let z=[];for(let G of D.geometry){let X=[];for(let Z of G)X.push(rI(Z,h));z.push(X)}b.push(hf(D.id,D.type,z,D.tags));continue}}return b}function Mnt(M,h){let b=[];for(let D=0;D0||((X=h.addOrUpdateProperties)==null?void 0:X.length)>0;if(D){let Z=M[0],re=KR({type:"FeatureCollection",features:[{type:"Feature",id:Z.id,geometry:h.newGeometry,properties:z?VQ(Z.tags,h):Z.tags}]},b);return re=tI(re,b),re}if(z){let Z=[];for(let re of M){let Q=zo({},re);Q.tags=VQ(Q.tags,h),Z.push(Q)}return Z}return M}function VQ(M,h){if(h.removeAllProperties)return{};let b=zo({},M||{});if(h.removeProperties)for(let D of h.removeProperties)delete b[D];if(h.addOrUpdateProperties)for(let{key:D,value:z}of h.addOrUpdateProperties)b[D]=z;return b}(function(M){M[M.X=0]="X",M[M.Y=1]="Y"})(yh||(yh={}));let nI={minZoom:0,maxZoom:16,minPoints:2,radius:40,extent:512,nodeSize:64,log:!1,generateId:!1,reduce:null,map:M=>M};class Ent{constructor(h){this.options=Object.assign(Object.create(nI),h),this.trees=new Array(this.options.maxZoom+1),this.stride=this.options.reduce?7:6,this.clusterProps=[],this.points=[]}load(h){let b=[];for(let D of h){if(!D.geometry)continue;let[z,G]=D.geometry.coordinates,[X,Z]=[G_(z),H_(G)];b.push({id:D.id,type:"Point",geometry:[X,Z],tags:D.properties})}this.createIndex(b)}initialize(h){let b=[];for(let D of h)D.type==="Point"&&b.push(D);this.createIndex(b)}updateIndex(h,b,D){this.options=Object.assign(Object.create(nI),D.clusterOptions),this.initialize(h)}createIndex(h){let{log:b,minZoom:D,maxZoom:z}=this.options;b&&console.time("total time");let G=`prepare ${h.length} points`;b&&console.time(G),this.points=h;let X=[];for(let re=0;re=D;re--){let Q=Date.now();Z=this.trees[re]=this.createTree(this.cluster(Z,re)),b&&console.log("z%d: %d clusters in %dms",re,Z.numItems,Date.now()-Q)}b&&console.timeEnd("total time")}getClusters(h,b){return this.getClustersInternal(h,b).map((D=>PS(D)))}getClustersInternal(h,b){let D=((h[0]+180)%360+360)%360-180,z=Math.max(-90,Math.min(90,h[1])),G=h[2]===180?180:((h[2]+180)%360+360)%360-180,X=Math.max(-90,Math.min(90,h[3]));if(h[2]-h[0]>=360)D=-180,G=180;else if(D>G){let oe=this.getClustersInternal([D,z,180,X],b),ke=this.getClustersInternal([-180,z,G,X],b);return oe.concat(ke)}let Z=this.trees[this.limitZoom(b)],re=Z.range(G_(D),H_(X),G_(G),H_(z)),Q=Z.flatData,he=[];for(let oe of re){let ke=this.stride*oe;he.push(Q[ke+5]>1?knt(Q,ke,this.clusterProps):this.points[Q[ke+3]])}return he}getChildren(h){let b=this.getOriginId(h),D=this.getOriginZoom(h),z=new Error("No cluster with the specified id: "+h),G=this.trees[D];if(!G)throw z;let X=G.flatData;if(b*this.stride>=X.length)throw z;let Z=this.options.radius/(this.options.extent*Math.pow(2,D-1)),re=G.within(X[b*this.stride],X[b*this.stride+1],Z),Q=[];for(let he of re){let oe=he*this.stride;X[oe+4]===h&&Q.push(X[oe+5]>1?Cnt(X,oe,this.clusterProps):PS(this.points[X[oe+3]]))}if(Q.length===0)throw z;return Q}getLeaves(h,b,D){let z=[];return this.appendLeaves(z,h,b=b||10,D=D||0,0),z}getTile(h,b,D){let z=this.trees[this.limitZoom(h)];if(!z)return null;let G=Math.pow(2,h),{extent:X,radius:Z}=this.options,re=Z/X,Q=(D-re)/G,he=(D+1+re)/G,oe={transformed:!0,features:[],source:null,x:b,y:D,z:h};return this.addTileFeatures(z.range((b-re)/G,Q,(b+1+re)/G,he),z.flatData,b,D,G,oe),b===0&&this.addTileFeatures(z.range(1-re/G,Q,1,he),z.flatData,G,D,G,oe),b===G-1&&this.addTileFeatures(z.range(0,Q,re/G,he),z.flatData,-1,D,G,oe),oe}getClusterExpansionZoom(h){return this.getOriginZoom(h)}appendLeaves(h,b,D,z,G){let X=this.getChildren(b);for(let Z of X){let re=Z.properties;if(re!=null&&re.cluster?G+re.point_count<=z?G+=re.point_count:G=this.appendLeaves(h,re.cluster_id,D,z,G):G1,he,oe,ke;if(Q)he=iI(b,re,this.clusterProps),oe=b[re],ke=b[re+1];else{let je=this.points[b[re+3]];he=je.tags,[oe,ke]=je.geometry}let ge={type:1,geometry:[[Math.round(this.options.extent*(oe*G-D)),Math.round(this.options.extent*(ke*G-z))]],tags:he},Ue;Ue=Q||this.options.generateId?b[re+3]:this.points[b[re+3]].id,Ue!==void 0&&(ge.id=Ue),X.features.push(ge)}}limitZoom(h){return Math.max(this.options.minZoom,Math.min(Math.floor(+h),this.options.maxZoom+1))}cluster(h,b){let{radius:D,extent:z,reduce:G,minPoints:X}=this.options,Z=D/(z*Math.pow(2,b)),re=h.flatData,Q=[],he=this.stride;for(let oe=0;oeb&&(vt+=re[It+5])}if(vt>je&&vt>=X){let gt,It=ke*je,_t=ge*je,qt=-1,tr=(oe/he<<5)+(b+1)+this.points.length;for(let lr of Ue){let qr=lr*he;if(re[qr+2]<=b)continue;re[qr+2]=b;let jr=re[qr+5];It+=re[qr]*jr,_t+=re[qr+1]*jr,re[qr+4]=tr,G&&(gt||(gt=this.map(re,oe,!0),qt=this.clusterProps.length,this.clusterProps.push(gt)),G(gt,this.map(re,qr)))}re[oe+4]=tr,Q.push(It/vt,_t/vt,1/0,tr,-1,vt),G&&Q.push(qt)}else{for(let gt=0;gt1)for(let gt of Ue){let It=gt*he;if(!(re[It+2]<=b)){re[It+2]=b;for(let _t=0;_t>5}getOriginZoom(h){return(h-this.points.length)%32}map(h,b,D){if(h[b+5]>1){let X=this.clusterProps[h[b+6]];return D?Object.assign({},X):X}let z=this.points[h[b+3]].tags,G=this.options.map(z);return D&&G===z?Object.assign({},G):G}}function knt(M,h,b){return{id:M[h+3],type:"Point",tags:iI(M,h,b),geometry:[M[h],M[h+1]]}}function Cnt(M,h,b){return{type:"Feature",id:M[h+3],properties:iI(M,h,b),geometry:{type:"Point",coordinates:[qQ(M[h]),BQ(M[h+1])]}}}function iI(M,h,b){let D=M[h+5],z=D>=1e4?`${Math.round(D/1e3)}k`:D>=1e3?Math.round(D/100)/10+"k":D,G=M[h+6],X=G===-1?{}:Object.assign({},b[G]);return Object.assign(X,{cluster:!0,cluster_id:M[h+3],point_count:D,point_count_abbreviated:z})}let aI="geojsonvt_clip_start",oI="geojsonvt_clip_end";function GQ(M,h,b,D,z){let G=h===z.maxZoom?0:z.tolerance/((1<0&&h.size<(z?X:D))return void(b.numPoints+=h.points.length/3);let Z=[];for(let re=0;reX)&&(b.numSimplified++,Z.push(h.points[re],h.points[re+1])),b.numPoints++;z&&(function(re,Q){let he=0;for(let oe=0,ke=re.length,ge=ke-2;oe0===Q)for(let oe=0,ke=re.length;oe1&&(console.log("invalidating tiles"),console.time("invalidating")),this.invalidateTiles(b),D.debug>1&&console.timeEnd("invalidating");let[z,G,X]=[0,0,0],Z=GQ(h,z,G,X,D);Z.source=h;let re=DS(z,G,X);if(this.tiles[re]=Z,this.tileCoords.push({z,x:G,y:X,id:re}),D.debug){let Q=`z${z}`;this.stats[Q]=(this.stats[Q]||0)+1,this.total++}}getClusterExpansionZoom(h){return null}getChildren(h){return null}getLeaves(h,b,D){return null}getTile(h,b,D){let{extent:z,debug:G}=this.options,X=1<1&&console.log("drilling down to z%d-%d-%d",h,b,D);let re,Q=h,he=b,oe=D;for(;!re&&Q>0;)Q--,he>>=1,oe>>=1,re=this.tiles[DS(Q,he,oe)];return re!=null&&re.source?(G>1&&(console.log("found parent tile z%d-%d-%d",Q,he,oe),console.time("drilling down")),this.splitTile(re.source,Q,he,oe,h,b,D),G>1&&console.timeEnd("drilling down"),this.tiles[Z]?HQ(this.tiles[Z],z):null):null}splitTile(h,b,D,z,G,X,Z){let re=[h,b,D,z],Q=this.options,he=Q.debug;for(;re.length;){z=re.pop(),D=re.pop(),b=re.pop(),h=re.pop();let oe=1<1&&console.time("creation"),ge=this.tiles[ke]=GQ(h,b,D,z,Q),this.tileCoords.push({z:b,x:D,y:z,id:ke}),he)){he>1&&(console.log("tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",b,D,z,ge.numFeatures,ge.numPoints,ge.numSimplified),console.timeEnd("creation"));let jr=`z${b}`;this.stats[jr]=(this.stats[jr]||0)+1,this.total++}if(ge.source=h,G==null){if(b===Q.indexMaxZoom||ge.numPoints<=Q.indexMaxPoints)continue}else{if(b===Q.maxZoom||b===G)continue;if(G!=null){let jr=G-b;if(D!==X>>jr||z!==Z>>jr)continue}}if(ge.source=null,!h.length)continue;he>1&&console.time("clipping");let Ue=.5*Q.buffer/Q.extent,je=.5-Ue,vt=.5+Ue,gt=1+Ue,It=null,_t=null,qt=null,tr=null,lr=O1(h,oe,D-Ue,D+vt,yh.X,ge.minX,ge.maxX,Q),qr=O1(h,oe,D+je,D+gt,yh.X,ge.minX,ge.maxX,Q);lr&&(It=O1(lr,oe,z-Ue,z+vt,yh.Y,ge.minY,ge.maxY,Q),_t=O1(lr,oe,z+je,z+gt,yh.Y,ge.minY,ge.maxY,Q)),qr&&(qt=O1(qr,oe,z-Ue,z+vt,yh.Y,ge.minY,ge.maxY,Q),tr=O1(qr,oe,z+je,z+gt,yh.Y,ge.minY,ge.maxY,Q)),he>1&&console.timeEnd("clipping"),re.push(It||[],b+1,2*D,2*z),re.push(_t||[],b+1,2*D,2*z+1),re.push(qt||[],b+1,2*D+1,2*z),re.push(tr||[],b+1,2*D+1,2*z+1)}}invalidateTiles(h){if(!h.length)return;let b=this.options,{debug:D}=b,z=1/0,G=-1/0,X=1/0,Z=-1/0;for(let he of h)z=Math.min(z,he.minX),G=Math.max(G,he.maxX),X=Math.min(X,he.minY),Z=Math.max(Z,he.maxY);let re=b.buffer/b.extent,Q=new Set;for(let he in this.tiles){let oe=this.tiles[he],ke=1<=Ue||Z=vt)continue;let gt=!1;for(let It of h)if(It.maxX>=ge&&It.minX=je&&It.minY1&&console.log("invalidate tile z%d-%d-%d (features: %d, points: %d, simplified: %d)",oe.z,oe.x,oe.y,oe.numFeatures,oe.numPoints,oe.numSimplified);let It=`z${oe.z}`;this.stats[It]=(this.stats[It]||0)-1,this.total--}delete this.tiles[he],Q.add(he)}}Q.size&&(this.tileCoords=this.tileCoords.filter((he=>!Q.has(he.id))))}}function DS(M,h,b){return 32*((1<b.id)),this.index=h.index,this.hasDependencies=!1,this.patternFeatures=[],this.lineClipsArray=[],this.gradients={};for(let b of this.layers)this.gradients[b.id]={};this.layoutVertexArray=new Bt,this.layoutVertexArray2=new St,this.indexArray=new Er,this.programConfigurations=new Ta(h.layers,h.zoom),this.segments=new an,this.maxLineLength=0,this.stateDependentLayerIds=this.layers.filter((b=>b.isStateDependent())).map((b=>b.id))}populate(h,b,D){this.hasDependencies=MS("line",this.layers,b)||this.hasLineDasharray(this.layers);let z=this.layers[0].layout.get("line-sort-key"),G=!z.isConstant(),X=[];for(let{feature:Z,id:re,index:Q,sourceLayerIndex:he}of h){let oe=this.layers[0]._featureFilter.needGeometry,ke=xa(Z,oe);if(!this.layers[0]._featureFilter.filter(new mi(this.zoom),ke,D))continue;let ge=G?z.evaluate(ke,{},D):void 0,Ue={id:re,properties:Z.properties,type:Z.type,sourceLayerIndex:he,index:Q,geometry:oe?ke.geometry:$l(Z),patterns:{},dashes:{},sortKey:ge};X.push(Ue)}G&&X.sort(((Z,re)=>Z.sortKey-re.sortKey));for(let Z of X){let{geometry:re,index:Q,sourceLayerIndex:he}=Z;this.hasDependencies?(MS("line",this.layers,b)?UR("line",this.layers,Z,{zoom:this.zoom},b):this.hasLineDasharray(this.layers)&&this.addLineDashDependencies(this.layers,Z,this.zoom,b),this.patternFeatures.push(Z)):this.addFeature(Z,re,Q,D,{},{},b.subdivisionGranularity),b.featureIndex.insert(h[Q].feature,re,Q,he,this.index)}}update(h,b,D,z){this.stateDependentLayers.length&&this.programConfigurations.updatePaintArrays(h,b,this.stateDependentLayers,{imagePositions:D,dashPositions:z})}addFeatures(h,b,D,z){for(let G of this.patternFeatures)this.addFeature(G,G.geometry,G.index,b,D,z,h.subdivisionGranularity)}isEmpty(){return this.layoutVertexArray.length===0}uploadPending(){return!this.uploaded||this.programConfigurations.needsUpload}upload(h){this.uploaded||(this.layoutVertexArray2.length!==0&&(this.layoutVertexBuffer2=h.createVertexBuffer(this.layoutVertexArray2,Bnt)),this.layoutVertexBuffer=h.createVertexBuffer(this.layoutVertexArray,znt),this.indexBuffer=h.createIndexBuffer(this.indexArray)),this.programConfigurations.upload(h),this.uploaded=!0}destroy(){this.layoutVertexBuffer&&(this.layoutVertexBuffer.destroy(),this.indexBuffer.destroy(),this.programConfigurations.destroy(),this.segments.destroy())}lineFeatureClips(h){if(h.properties&&Object.hasOwn(h.properties,aI)&&Object.hasOwn(h.properties,oI))return{start:+h.properties[aI],end:+h.properties[oI]}}addFeature(h,b,D,z,G,X,Z){let re=this.layers[0].layout,Q=re.get("line-join").evaluate(h,{}),he=re.get("line-cap").evaluate(h,{}),oe=re.get("line-miter-limit").evaluate(h,{}),ke=re.get("line-round-limit").evaluate(h,{});this.lineClips=this.lineFeatureClips(h);for(let ge of b)this.addLine(ge,h,Q,he,oe,ke,z,Z);this.programConfigurations.populatePaintArrays(this.layoutVertexArray.length,h,D,{imagePositions:G,dashPositions:X,canonical:z})}addLine(h,b,D,z,G,X,Z,re){if(this.distance=0,this.scaledDistance=0,this.totalDistance=0,h=nx(h,Z?re.line.getGranularityForZoomLevel(Z.z):1),this.lineClips){this.lineClipsArray.push(this.lineClips);for(let _t=0;_t=2&&h[he-1].equals(h[he-2]);)he--;let oe=0;for(;oe0;if(_n&&_t>oe){let Ln=Ue.dist(je);if(Ln>2*ke){let un=Ue.sub(Ue.sub(je)._mult(ke/Ln)._round());this.updateDistance(je,un),this.addCurrentVertex(un,gt,0,0,ge),je=un}}let Dn=je&&vt,Hn=Dn?D:Q?"butt":z;if(Dn&&Hn==="round"&&(qrG&&(Hn="bevel"),Hn==="bevel"&&(qr>2&&(Hn="flipbevel"),qr100)qt=It.mult(-1);else{let Ln=qr*gt.add(It).mag()/gt.sub(It).mag();qt._perp()._mult(Ln*(fn?-1:1))}this.addCurrentVertex(Ue,qt,0,0,ge),this.addCurrentVertex(Ue,qt.mult(-1),0,0,ge)}else if(Hn==="bevel"||Hn==="fakeround"){let Ln=-Math.sqrt(qr*qr-1),un=fn?Ln:0,ei=fn?0:Ln;if(je&&this.addCurrentVertex(Ue,gt,un,ei,ge),Hn==="fakeround"){let ci=Math.round(180*jr/Math.PI/20);for(let ti=1;ti2*ke){let un=Ue.add(vt.sub(Ue)._mult(ke/Ln)._round());this.updateDistance(Ue,un),this.addCurrentVertex(un,It,0,0,ge),Ue=un}}}}addCurrentVertex(h,b,D,z,G,X=!1){let Z=b.y*z-b.x,re=-b.y-b.x*z;this.addHalfVertex(h,b.x+b.y*D,b.y-b.x*D,X,!1,D,G),this.addHalfVertex(h,Z,re,X,!0,-z,G),this.distance>WQ/2&&this.totalDistance===0&&(this.distance=0,this.updateScaledDistance(),this.addCurrentVertex(h,b,D,z,G,X))}addHalfVertex({x:h,y:b},D,z,G,X,Z,re){let Q=.5*(this.lineClips?this.scaledDistance*(WQ-1):this.scaledDistance);this.layoutVertexArray.emplaceBack((h<<1)+(G?1:0),(b<<1)+(X?1:0),Math.round(63*D)+128,Math.round(63*z)+128,1+(Z===0?0:Z<0?-1:1)|(63&Q)<<2,Q>>6),this.lineClips&&this.layoutVertexArray2.emplaceBack((this.scaledDistance-this.lineClips.start)/(this.lineClips.end-this.lineClips.start),this.lineClipsArray.length);let he=re.vertexLength++;this.e1>=0&&this.e2>=0&&(this.indexArray.emplaceBack(this.e1,he,this.e2),re.primitiveLength++),X?this.e2=he:this.e1=he}updateScaledDistance(){this.scaledDistance=this.lineClips?this.lineClips.start+(this.lineClips.end-this.lineClips.start)*this.distance/this.totalDistance:this.distance}updateDistance(h,b){this.distance+=h.dist(b),this.updateScaledDistance()}hasLineDasharray(h){for(let b of h){let D=b.paint.get("line-dasharray");if(D&&!D.isConstant())return!0}return!1}addLineDashDependencies(h,b,D,z){for(let G of h){let X=G.paint.get("line-dasharray");if(!X||X.value.kind==="constant")continue;let Z=G.layout.get("line-cap").evaluate(b,{})==="round",re={dasharray:X.value.evaluate({zoom:D-1},b,{}),round:Z},Q={dasharray:X.value.evaluate({zoom:D},b,{}),round:Z},he={dasharray:X.value.evaluate({zoom:D+1},b,{}),round:Z},oe=`${re.dasharray.join(",")},${re.round}`,ke=`${Q.dasharray.join(",")},${Q.round}`,ge=`${he.dasharray.join(",")},${he.round}`;z.dashDependencies[oe]=re,z.dashDependencies[ke]=Q,z.dashDependencies[ge]=he,b.dashes[G.id]={min:oe,mid:ke,max:ge}}}}let YQ,XQ;_i("LineBucket",lI,{omit:["layers","patternFeatures"]});var ZQ={get paint(){return XQ=XQ||new ms({"line-opacity":new Di(Ct.paint_line["line-opacity"]),"line-color":new Di(Ct.paint_line["line-color"]),"line-translate":new wi(Ct.paint_line["line-translate"]),"line-translate-anchor":new wi(Ct.paint_line["line-translate-anchor"]),"line-width":new Di(Ct.paint_line["line-width"]),"line-gap-width":new Di(Ct.paint_line["line-gap-width"]),"line-offset":new Di(Ct.paint_line["line-offset"]),"line-blur":new Di(Ct.paint_line["line-blur"]),"line-dasharray":new fl(Ct.paint_line["line-dasharray"]),"line-pattern":new fl(Ct.paint_line["line-pattern"]),"line-gradient":new du(Ct.paint_line["line-gradient"])})},get layout(){return YQ=YQ||new ms({"line-cap":new Di(Ct.layout_line["line-cap"]),"line-join":new Di(Ct.layout_line["line-join"]),"line-miter-limit":new Di(Ct.layout_line["line-miter-limit"]),"line-round-limit":new Di(Ct.layout_line["line-round-limit"]),"line-sort-key":new Di(Ct.layout_line["line-sort-key"])})}};class Nnt extends Di{possiblyEvaluate(h,b){return b=new mi(Math.floor(b.zoom),{now:b.now,fadeDuration:b.fadeDuration,zoomHistory:b.zoomHistory,transition:b.transition}),super.possiblyEvaluate(h,b)}evaluate(h,b,D,z){return b=_e({},b,{zoom:Math.floor(b.zoom)}),super.evaluate(h,b,D,z)}}let RS;class Unt extends hl{constructor(h,b){super(h,ZQ,b),this.gradientVersion=0,RS||(RS=new Nnt(ZQ.paint.properties["line-width"].specification),RS.useIntegerZoom=!0)}_handleSpecialPaintPropertyUpdate(h){if(h==="line-gradient"){let b=this.gradientExpression();this.stepInterpolant=!!(function(D){return D._styleExpression!==void 0})(b)&&b._styleExpression.expression instanceof lu,this.gradientVersion=(this.gradientVersion+1)%Number.MAX_SAFE_INTEGER}}gradientExpression(){return this._transitionablePaint._values["line-gradient"].value.expression}recalculate(h,b){super.recalculate(h,b),this.paint._values["line-floorwidth"]=RS.possiblyEvaluate(this._transitioningPaint._values["line-width"].value,h)}createBucket(h){return new lI(h)}queryRadius(h){let b=h,D=$Q(sn("line-width",this,b),sn("line-gap-width",this,b)),z=sn("line-offset",this,b);return D/2+Math.abs(z)+tn(this.paint.get("line-translate"))}queryIntersectsFeature({queryGeometry:h,feature:b,featureState:D,geometry:z,transform:G,pixelsToTileUnits:X}){let Z=Hr(h,this.paint.get("line-translate"),this.paint.get("line-translate-anchor"),-G.bearingInRadians,X),re=X/2*$Q(this.paint.get("line-width").evaluate(b,D),this.paint.get("line-gap-width").evaluate(b,D)),Q=this.paint.get("line-offset").evaluate(b,D);return Q&&(z=(function(he,oe){let ke=[];for(let ge of he){let Ue=Mr(ge),je=[];for(let vt=0;vt=3){for(let Ue of ge)if(pn(he,Ue))return!0}if(wo(he,ge,ke))return!0}return!1})(Z,z,re)}isTileClipped(){return!0}}function $Q(M,h){return h>0?h+2*M:M}let Vnt=Re([{name:"a_pos_offset",components:4,type:"Int16"},{name:"a_data",components:4,type:"Uint16"},{name:"a_pixeloffset",components:4,type:"Int16"}],4),Gnt=Re([{name:"a_projected_pos",components:3,type:"Float32"}],4);Re([{name:"a_fade_opacity",components:1,type:"Uint32"}],4);let Hnt=Re([{name:"a_placed",components:2,type:"Uint8"},{name:"a_shift",components:2,type:"Float32"},{name:"a_box_real",components:2,type:"Int16"}]);Re([{type:"Int16",name:"anchorPointX"},{type:"Int16",name:"anchorPointY"},{type:"Int16",name:"x1"},{type:"Int16",name:"y1"},{type:"Int16",name:"x2"},{type:"Int16",name:"y2"},{type:"Uint32",name:"featureIndex"},{type:"Uint16",name:"sourceLayerIndex"},{type:"Uint16",name:"bucketIndex"}]);let KQ=Re([{name:"a_pos",components:2,type:"Int16"},{name:"a_anchor_pos",components:2,type:"Int16"},{name:"a_extrude",components:2,type:"Int16"}],4),jnt=Re([{name:"a_pos",components:2,type:"Float32"},{name:"a_radius",components:1,type:"Float32"},{name:"a_flags",components:2,type:"Int16"}],4);function Wnt(M,h,b){let D=h.layout.get("text-transform").evaluate(b,{});return D==="uppercase"?M=M.toLocaleUpperCase():D==="lowercase"&&(M=M.toLocaleLowerCase()),Bi.applyArabicShaping&&(M=Bi.applyArabicShaping(M)),M}function Ynt(M,h,b){for(let D of M.sections)D.text=Wnt(D.text,h,b);return M}Re([{name:"triangle",components:3,type:"Uint16"}]),Re([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Uint16",name:"glyphStartIndex"},{type:"Uint16",name:"numGlyphs"},{type:"Uint32",name:"vertexStartIndex"},{type:"Uint32",name:"lineStartIndex"},{type:"Uint32",name:"lineLength"},{type:"Uint16",name:"segment"},{type:"Uint16",name:"lowerSize"},{type:"Uint16",name:"upperSize"},{type:"Float32",name:"lineOffsetX"},{type:"Float32",name:"lineOffsetY"},{type:"Uint8",name:"writingMode"},{type:"Uint8",name:"placedOrientation"},{type:"Uint8",name:"hidden"},{type:"Uint32",name:"crossTileID"},{type:"Int16",name:"associatedIconIndex"}]),Re([{type:"Int16",name:"anchorX"},{type:"Int16",name:"anchorY"},{type:"Int16",name:"rightJustifiedTextSymbolIndex"},{type:"Int16",name:"centerJustifiedTextSymbolIndex"},{type:"Int16",name:"leftJustifiedTextSymbolIndex"},{type:"Int16",name:"verticalPlacedTextSymbolIndex"},{type:"Int16",name:"placedIconSymbolIndex"},{type:"Int16",name:"verticalPlacedIconSymbolIndex"},{type:"Uint16",name:"key"},{type:"Uint16",name:"textBoxStartIndex"},{type:"Uint16",name:"textBoxEndIndex"},{type:"Uint16",name:"verticalTextBoxStartIndex"},{type:"Uint16",name:"verticalTextBoxEndIndex"},{type:"Uint16",name:"iconBoxStartIndex"},{type:"Uint16",name:"iconBoxEndIndex"},{type:"Uint16",name:"verticalIconBoxStartIndex"},{type:"Uint16",name:"verticalIconBoxEndIndex"},{type:"Uint16",name:"featureIndex"},{type:"Uint16",name:"numHorizontalGlyphVertices"},{type:"Uint16",name:"numVerticalGlyphVertices"},{type:"Uint16",name:"numIconVertices"},{type:"Uint16",name:"numVerticalIconVertices"},{type:"Uint16",name:"useRuntimeCollisionCircles"},{type:"Uint32",name:"crossTileID"},{type:"Float32",name:"textBoxScale"},{type:"Float32",name:"collisionCircleDiameter"},{type:"Uint16",name:"textAnchorOffsetStartIndex"},{type:"Uint16",name:"textAnchorOffsetEndIndex"}]),Re([{type:"Float32",name:"offsetX"}]),Re([{type:"Int16",name:"x"},{type:"Int16",name:"y"},{type:"Int16",name:"tileUnitDistanceFromAnchor"}]),Re([{type:"Uint16",name:"textAnchor"},{type:"Float32",components:2,name:"textOffset"}]);var Rc=24;let m4={"!":"\uFE15","#":"\uFF03",$:"\uFF04","%":"\uFF05","&":"\uFF06","(":"\uFE35",")":"\uFE36","*":"\uFF0A","+":"\uFF0B",",":"\uFE10","-":"\uFE32",".":"\u30FB","/":"\uFF0F",":":"\uFE13",";":"\uFE14","<":"\uFE3F","=":"\uFF1D",">":"\uFE40","?":"\uFE16","@":"\uFF20","[":"\uFE47","\\":"\uFF3C","]":"\uFE48","^":"\uFF3E",_:"\uFE33","`":"\uFF40","{":"\uFE37","|":"\u2015","}":"\uFE38","~":"\uFF5E","\xA2":"\uFFE0","\xA3":"\uFFE1","\xA5":"\uFFE5","\xA6":"\uFFE4","\xAC":"\uFFE2","\xAF":"\uFFE3","\u2013":"\uFE32","\u2014":"\uFE31","\u2018":"\uFE43","\u2019":"\uFE44","\u201C":"\uFE41","\u201D":"\uFE42","\u2026":"\uFE19","\u22EF":"\uFE19","\u2027":"\u30FB","\u20A9":"\uFFE6","\u3001":"\uFE11","\u3002":"\uFE12","\u3008":"\uFE3F","\u3009":"\uFE40","\u300A":"\uFE3D","\u300B":"\uFE3E","\u300C":"\uFE41","\u300D":"\uFE42","\u300E":"\uFE43","\u300F":"\uFE44","\u3010":"\uFE3B","\u3011":"\uFE3C","\u3014":"\uFE39","\u3015":"\uFE3A","\u3016":"\uFE17","\u3017":"\uFE18","\uFF01":"\uFE15","\uFF08":"\uFE35","\uFF09":"\uFE36","\uFF0C":"\uFE10","\uFF0D":"\uFE32","\uFF0E":"\u30FB","\uFF1A":"\uFE13","\uFF1B":"\uFE14","\uFF1C":"\uFE3F","\uFF1E":"\uFE40","\uFF1F":"\uFE16","\uFF3B":"\uFE47","\uFF3D":"\uFE48","\uFF3F":"\uFE33","\uFF5B":"\uFE37","\uFF5C":"\u2015","\uFF5D":"\uFE38","\uFF5F":"\uFE35","\uFF60":"\uFE36","\uFF61":"\uFE12","\uFF62":"\uFE41","\uFF63":"\uFE42"},Xnt={10:!0,32:!0,38:!0,41:!0,43:!0,45:!0,47:!0,173:!0,183:!0,8203:!0,8208:!0,8211:!0,8231:!0},Znt={40:!0};function JQ(M,h,b,D,z,G){if("fontStack"in h){let X=b[h.fontStack],Z=X==null?void 0:X[M];return Z?Z.metrics.advance*h.scale+z:0}{let X=D[h.imageName];return X?X.displaySize[0]*h.scale*Rc/G+z:0}}function QQ(M,h,b,D){let z=Math.pow(M-h,2);return D?MMath.max(h,this.sections[b].scale)),0)}getMaxImageSize(h){let b=0,D=0;for(let z=0;zD)))}addImageSection(h){let b=h.image?h.image.name:"";if(b.length===0)return void me("Can't add FormattedSection with an empty image.");let D=this.getNextImageSectionCharCode();D?(this.text+=String.fromCharCode(D),this.sections.push({scale:1,verticalAlign:h.verticalAlign||"bottom",imageName:b}),this.sectionIndex.push(this.sections.length-1)):me("Reached maximum number of images 6401")}getNextImageSectionCharCode(){return this.imageSectionID?this.imageSectionID>=63743?null:++this.imageSectionID:(this.imageSectionID=57344,this.imageSectionID)}determineLineBreaks(h,b,D,z,G){let X=[],Z=this.determineAverageLineWidth(h,b,D,z,G),re=this.hasZeroWidthSpaces(),Q=0,he=0,oe=this.text[Symbol.iterator](),ke=oe.next(),ge=this.text[Symbol.iterator]();ge.next();let Ue=ge.next(),je=this.text[Symbol.iterator]();je.next(),je.next();let vt=je.next();for(;!ke.done;){let gt=this.getSection(he),It=ke.value.codePointAt(0);if(Gt(It)||(Q+=JQ(It,gt,D,z,h,G)),!Ue.done){let _t=Je(It),qt=Ue.value.codePointAt(0);(Xnt[It]||_t||"imageName"in gt||!vt.done&&Znt[qt])&&X.push(eee(he+1,Q,Z,X,$nt(It,qt,_t&&re),!1))}he++,ke=oe.next(),Ue=ge.next(),vt=je.next()}return tee(eee(this.length(),Q,Z,X,0,!0))}determineAverageLineWidth(h,b,D,z,G){let X=0,Z=0;for(let re of this.text){let Q=this.getSection(Z);X+=JQ(re.codePointAt(0),Q,D,z,h,G),Z++}return X/Math.max(1,Math.ceil(X/b))}}let uI=4294967296,ree=1/uI,nee=typeof TextDecoder=="undefined"?null:new TextDecoder("utf-8");class IS{constructor(h=new Uint8Array(16)){this.buf=ArrayBuffer.isView(h)?h:new Uint8Array(h),this.dataView=new DataView(this.buf.buffer),this.pos=0,this.type=0,this.length=this.buf.length}readFields(h,b,D=this.length){for(;this.pos>3,X=this.pos;this.type=7&z,h(G,b,this),this.pos===X&&this.skip(z)}return b}readMessage(h,b){return this.readFields(h,b,this.readVarint()+this.pos)}readFixed32(){let h=this.dataView.getUint32(this.pos,!0);return this.pos+=4,h}readSFixed32(){let h=this.dataView.getInt32(this.pos,!0);return this.pos+=4,h}readFixed64(){let h=this.dataView.getUint32(this.pos,!0)+this.dataView.getUint32(this.pos+4,!0)*uI;return this.pos+=8,h}readSFixed64(){let h=this.dataView.getUint32(this.pos,!0)+this.dataView.getInt32(this.pos+4,!0)*uI;return this.pos+=8,h}readFloat(){let h=this.dataView.getFloat32(this.pos,!0);return this.pos+=4,h}readDouble(){let h=this.dataView.getFloat64(this.pos,!0);return this.pos+=8,h}readVarint(h){let b=this.buf,D,z;return z=b[this.pos++],D=127&z,z<128?D:(z=b[this.pos++],D|=(127&z)<<7,z<128?D:(z=b[this.pos++],D|=(127&z)<<14,z<128?D:(z=b[this.pos++],D|=(127&z)<<21,z<128?D:(z=b[this.pos],D|=(15&z)<<28,(function(G,X,Z){let re=Z.buf,Q,he;if(he=re[Z.pos++],Q=(112&he)>>4,he<128||(he=re[Z.pos++],Q|=(127&he)<<3,he<128)||(he=re[Z.pos++],Q|=(127&he)<<10,he<128)||(he=re[Z.pos++],Q|=(127&he)<<17,he<128)||(he=re[Z.pos++],Q|=(127&he)<<24,he<128)||(he=re[Z.pos++],Q|=(1&he)<<31,he<128))return Y_(G,Q,X);throw new Error("Expected varint not more than 10 bytes")})(D,h,this)))))}readVarint64(){return this.readVarint(!0)}readSVarint(){let h=this.readVarint();return h%2==1?(h+1)/-2:h/2}readBoolean(){return!!this.readVarint()}readString(){let h=this.readVarint()+this.pos,b=this.pos;return this.pos=h,h-b>=12&&nee?nee.decode(this.buf.subarray(b,h)):(function(D,z,G){let X="",Z=z;for(;Z239?4:re>223?3:re>191?2:1;if(Z+ge>G)break;ge===1?re<128&&(ke=re):ge===2?(Q=D[Z+1],(192&Q)==128&&(ke=(31&re)<<6|63&Q,ke<=127&&(ke=null))):ge===3?(Q=D[Z+1],he=D[Z+2],(192&Q)==128&&(192&he)==128&&(ke=(15&re)<<12|(63&Q)<<6|63&he,(ke<=2047||ke>=55296&&ke<=57343)&&(ke=null))):ge===4&&(Q=D[Z+1],he=D[Z+2],oe=D[Z+3],(192&Q)==128&&(192&he)==128&&(192&oe)==128&&(ke=(15&re)<<18|(63&Q)<<12|(63&he)<<6|63&oe,(ke<=65535||ke>=1114112)&&(ke=null))),ke===null?(ke=65533,ge=1):ke>65535&&(ke-=65536,X+=String.fromCharCode(ke>>>10&1023|55296),ke=56320|1023&ke),X+=String.fromCharCode(ke),Z+=ge}return X})(this.buf,b,h)}readBytes(){let h=this.readVarint()+this.pos,b=this.buf.subarray(this.pos,h);return this.pos=h,b}readPackedVarint(h=[],b){let D=this.readPackedEnd();for(;this.pos127;);else if(b===2)this.pos=this.readVarint()+this.pos;else if(b===5)this.pos+=4;else{if(b!==1)throw new Error(`Unimplemented type: ${b}`);this.pos+=8}}writeTag(h,b){this.writeVarint(h<<3|b)}realloc(h){let b=this.length||16;for(;b268435455||h<0?(function(b,D){let z,G;if(b>=0?(z=b%4294967296|0,G=b/4294967296|0):(z=~(-b%4294967296),G=~(-b/4294967296),4294967295^z?z=z+1|0:(z=0,G=G+1|0)),b>=18446744073709552e3||b<-18446744073709552e3)throw new Error("Given varint doesn't fit into 10 bytes");D.realloc(10),(function(X,Z,re){re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,X>>>=7,re.buf[re.pos++]=127&X|128,re.buf[re.pos]=127&(X>>>=7)})(z,0,D),(function(X,Z){let re=(7&X)<<4;Z.buf[Z.pos++]|=re|((X>>>=3)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X|((X>>>=7)?128:0),X&&(Z.buf[Z.pos++]=127&X)))))})(G,D)})(h,this):(this.realloc(4),this.buf[this.pos++]=127&h|(h>127?128:0),h<=127||(this.buf[this.pos++]=127&(h>>>=7)|(h>127?128:0),h<=127||(this.buf[this.pos++]=127&(h>>>=7)|(h>127?128:0),h<=127||(this.buf[this.pos++]=h>>>7&127))))}writeSVarint(h){this.writeVarint(h<0?2*-h-1:2*h)}writeBoolean(h){this.writeVarint(+h)}writeString(h){h=String(h),this.realloc(4*h.length),this.pos++;let b=this.pos;this.pos=(function(z,G,X){for(let Z,re,Q=0;Q55295&&Z<57344){if(!re){Z>56319||Q+1===G.length?(z[X++]=239,z[X++]=191,z[X++]=189):re=Z;continue}if(Z<56320){z[X++]=239,z[X++]=191,z[X++]=189,re=Z;continue}Z=re-55296<<10|Z-56320|65536,re=null}else re&&(z[X++]=239,z[X++]=191,z[X++]=189,re=null);Z<128?z[X++]=Z:(Z<2048?z[X++]=Z>>6|192:(Z<65536?z[X++]=Z>>12|224:(z[X++]=Z>>18|240,z[X++]=Z>>12&63|128),z[X++]=Z>>6&63|128),z[X++]=63&Z|128)}return X})(this.buf,h,this.pos);let D=this.pos-b;D>=128&&iee(b,D,this),this.pos=b-1,this.writeVarint(D),this.pos+=D}writeFloat(h){this.realloc(4),this.dataView.setFloat32(this.pos,h,!0),this.pos+=4}writeDouble(h){this.realloc(8),this.dataView.setFloat64(this.pos,h,!0),this.pos+=8}writeBytes(h){let b=h.length;this.writeVarint(b),this.realloc(b);for(let D=0;D=128&&iee(D,z,this),this.pos=D-1,this.writeVarint(z),this.pos+=z}writeMessage(h,b,D){this.writeTag(h,2),this.writeRawMessage(b,D)}writePackedVarint(h,b){b.length&&this.writeMessage(h,Knt,b)}writePackedSVarint(h,b){b.length&&this.writeMessage(h,Jnt,b)}writePackedBoolean(h,b){b.length&&this.writeMessage(h,tit,b)}writePackedFloat(h,b){b.length&&this.writeMessage(h,Qnt,b)}writePackedDouble(h,b){b.length&&this.writeMessage(h,eit,b)}writePackedFixed32(h,b){b.length&&this.writeMessage(h,rit,b)}writePackedSFixed32(h,b){b.length&&this.writeMessage(h,nit,b)}writePackedFixed64(h,b){b.length&&this.writeMessage(h,iit,b)}writePackedSFixed64(h,b){b.length&&this.writeMessage(h,ait,b)}writeBytesField(h,b){this.writeTag(h,2),this.writeBytes(b)}writeFixed32Field(h,b){this.writeTag(h,5),this.writeFixed32(b)}writeSFixed32Field(h,b){this.writeTag(h,5),this.writeSFixed32(b)}writeFixed64Field(h,b){this.writeTag(h,1),this.writeFixed64(b)}writeSFixed64Field(h,b){this.writeTag(h,1),this.writeSFixed64(b)}writeVarintField(h,b){this.writeTag(h,0),this.writeVarint(b)}writeSVarintField(h,b){this.writeTag(h,0),this.writeSVarint(b)}writeStringField(h,b){this.writeTag(h,2),this.writeString(b)}writeFloatField(h,b){this.writeTag(h,5),this.writeFloat(b)}writeDoubleField(h,b){this.writeTag(h,1),this.writeDouble(b)}writeBooleanField(h,b){this.writeVarintField(h,+b)}}function Y_(M,h,b){return b?4294967296*h+(M>>>0):4294967296*(h>>>0)+(M>>>0)}function iee(M,h,b){let D=h<=16383?1:h<=2097151?2:h<=268435455?3:Math.floor(Math.log(h)/(7*Math.LN2));b.realloc(D);for(let z=b.pos-1;z>=M;z--)b.buf[z+D]=b.buf[z]}function Knt(M,h){for(let b=0;bZ.h-X.h));let D=[{x:0,y:0,w:Math.max(Math.ceil(Math.sqrt(h/.95)),b),h:1/0}],z=0,G=0;for(let X of M)for(let Z=D.length-1;Z>=0;Z--){let re=D[Z];if(!(X.w>re.w||X.h>re.h)){if(X.x=re.x,X.y=re.y,G=Math.max(G,X.y+X.h),z=Math.max(z,X.x+X.w),X.w===re.w&&X.h===re.h){let Q=D.pop();Q&&Zje.toCodeUnitIndex(qr)));let lr=It(je.toString(),gt);for(let qr of lr){let jr=[...qr].map((()=>0));vt.push(new W_(qr,je.sections,jr))}}else if(_t){vt=[],gt=gt.map((_n=>je.toCodeUnitIndex(_n)));let lr=0,qr=[];for(let _n of je.text)qr.push(...Array(_n.length).fill(je.sectionIndex[lr])),lr++;let jr=_t(je.text,qr,gt);for(let _n of jr){let fn=[],Dn="";for(let Hn of _n[0])fn.push(_n[1][Dn.length]),Dn+=Hn;vt.push(new W_(_n[0],je.sections,fn))}}else vt=(function(lr,qr){let jr=[],_n=0;for(let fn of qr)jr.push(lr.substring(_n,fn)),_n=fn;return _nQ){let he=Math.ceil(G/Q);z*=he/X,X=he}return{x1:D,y1:z,x2:D+G,y2:z+X}}function uee(M,h,b,D,z,G){let X=M.image,Z;if(X.content){let vt=X.content,gt=X.pixelRatio||1;Z=[vt[0]/gt,vt[1]/gt,X.displaySize[0]-vt[2]/gt,X.displaySize[1]-vt[3]/gt]}let re=h.left*G,Q=h.right*G,he,oe,ke,ge;b==="width"||b==="both"?(ge=z[0]+re-D[3],oe=z[0]+Q+D[1]):(ge=z[0]+(re+Q-X.displaySize[0])/2,oe=ge+X.displaySize[0]);let Ue=h.top*G,je=h.bottom*G;return b==="height"||b==="both"?(he=z[1]+Ue-D[0],ke=z[1]+je+D[2]):(he=z[1]+(Ue+je-X.displaySize[1])/2,ke=he+X.displaySize[1]),{image:X,top:he,right:oe,bottom:ke,left:ge,collisionPadding:Z}}_i("ImagePosition",cI),_i("ImageAtlas",oee),a.ax=void 0,(Wg=a.ax||(a.ax={}))[Wg.none=0]="none",Wg[Wg.horizontal=1]="horizontal",Wg[Wg.vertical=2]="vertical",Wg[Wg.horizontalOnly=3]="horizontalOnly";let N1=128,Yg=32640;function cee(M,h){let{expression:b}=h;if(b.kind==="constant")return{kind:"constant",layoutSize:b.evaluate(new mi(M+1))};if(b.kind==="source")return{kind:"source"};{let{zoomStops:D,interpolationType:z}=b,G=0;for(;GX.id)),this.index=h.index,this.pixelRatio=h.pixelRatio,this.sourceLayerIndex=h.sourceLayerIndex,this.hasDependencies=!1,this.hasRTLText=!1,this.sortKeyRanges=[],this.collisionCircleArray=[];let b=this.layers[0]._unevaluatedLayout._values;this.textSizeData=cee(this.zoom,b["text-size"]),this.iconSizeData=cee(this.zoom,b["icon-size"]);let D=this.layers[0].layout,z=D.get("symbol-sort-key"),G=D.get("symbol-z-order");this.canOverlap=hI(D,"text-overlap","text-allow-overlap")!=="never"||hI(D,"icon-overlap","icon-allow-overlap")!=="never"||D.get("text-ignore-placement")||D.get("icon-ignore-placement"),this.sortFeaturesByKey=G!=="viewport-y"&&!z.isConstant(),this.sortFeaturesByY=(G==="viewport-y"||G==="auto"&&!this.sortFeaturesByKey)&&this.canOverlap,D.get("symbol-placement")==="point"&&(this.writingModes=D.get("text-writing-mode").map((X=>a.ax[X]))),this.stateDependentLayerIds=this.layers.filter((X=>X.isStateDependent())).map((X=>X.id)),this.sourceID=h.sourceID}createArrays(){this.text=new vI(new Ta(this.layers,this.zoom,(h=>h.startsWith("text")))),this.icon=new vI(new Ta(this.layers,this.zoom,(h=>h.startsWith("icon")))),this.glyphOffsetArray=new Fe,this.lineVertexArray=new Ie,this.symbolInstances=new Ae,this.textAnchorOffsets=new st}calculateGlyphDependencies(h,b,D,z,G){for(let X of h)if(b[X.codePointAt(0)]=!0,(D||z)&&G){let Z=m4[X];Z&&(b[Z.codePointAt(0)]=!0)}}populate(h,b,D){var z;let G=this.layers[0],X=G.layout,Z=X.get("text-font"),re=X.get("text-field"),Q=X.get("icon-image"),he=(re.value.kind!=="constant"||re.value.value instanceof $a&&!re.value.value.isEmpty()||re.value.value.toString().length>0)&&(Z.value.kind!=="constant"||Z.value.value.length>0),oe=Q.value.kind!=="constant"||!!Q.value.value||Object.keys(Q.parameters).length>0,ke=X.get("symbol-sort-key");if(this.features=[],!he&&!oe)return;let ge=b.iconDependencies,Ue=b.glyphDependencies,je=b.availableImages,vt=new mi(this.zoom);for(let{feature:gt,id:It,index:_t,sourceLayerIndex:qt}of h){let tr=G._featureFilter.needGeometry,lr=xa(gt,tr);if(!G._featureFilter.filter(vt,lr,D))continue;let qr,jr;if(tr||(lr.geometry=$l(gt)),he){let fn=G.getValueAndResolveTokens("text-field",lr,D,je),Dn=$a.factory(fn);this.hasRTLText||(this.hasRTLText=git(Dn)),(!this.hasRTLText||Bi.getRTLTextPluginStatus()==="unavailable"||this.hasRTLText&&Bi.isParsed())&&(qr=Ynt(Dn,G,lr))}if(oe){let fn=G.getValueAndResolveTokens("icon-image",lr,D,je);jr=fn instanceof so?fn:so.fromString(fn)}if(!qr&&!jr)continue;let _n=this.sortFeaturesByKey?ke.evaluate(lr,{},D):void 0;if(this.features.push({id:It,text:qr,icon:jr,index:_t,sourceLayerIndex:qt,geometry:lr.geometry,properties:gt.properties,type:h4.types[gt.type],sortKey:_n}),jr&&(ge[jr.name]=!0),qr){let fn=Z.evaluate(lr,{},D).join(","),Dn=X.get("text-rotation-alignment")!=="viewport"&&X.get("symbol-placement")!=="point";this.allowVerticalPlacement=(z=this.writingModes)===null||z===void 0?void 0:z.includes(a.ax.vertical);for(let Hn of qr.sections)if(Hn.image)ge[Hn.image.name]=!0;else{let Ln=Zt(qr.toString()),un=Hn.fontStack||fn;Ue[un]||(Ue[un]={}),this.calculateGlyphDependencies(Hn.text,Ue[un],Dn,this.allowVerticalPlacement,Ln)}}}X.get("symbol-placement")==="line"&&(this.features=(function(gt){let It={},_t={},qt=[],tr=0;function lr(fn){qt.push(gt[fn]),tr++}function qr(fn,Dn,Hn){let Ln=_t[fn];return delete _t[fn],_t[Dn]=Ln,qt[Ln].geometry[0].pop(),qt[Ln].geometry[0]=qt[Ln].geometry[0].concat(Hn[0]),Ln}function jr(fn,Dn,Hn){let Ln=It[Dn];return delete It[Dn],It[fn]=Ln,qt[Ln].geometry[0].shift(),qt[Ln].geometry[0]=Hn[0].concat(qt[Ln].geometry[0]),Ln}function _n(fn,Dn,Hn){let Ln=Hn?Dn[0][Dn[0].length-1]:Dn[0][0];return`${fn}:${Ln.x}:${Ln.y}`}for(let fn=0;fnfn.geometry))})(this.features)),this.sortFeaturesByKey&&this.features.sort(((gt,It)=>gt.sortKey-It.sortKey))}update(h,b,D){this.stateDependentLayers.length&&(this.text.programConfigurations.updatePaintArrays(h,b,this.layers,{imagePositions:D}),this.icon.programConfigurations.updatePaintArrays(h,b,this.layers,{imagePositions:D}))}isEmpty(){return this.symbolInstances.length===0&&!this.hasRTLText}uploadPending(){return!this.uploaded||this.text.programConfigurations.needsUpload||this.icon.programConfigurations.needsUpload}upload(h){!this.uploaded&&this.hasDebugData()&&(this.textCollisionBox.upload(h),this.iconCollisionBox.upload(h)),this.text.upload(h,this.sortFeaturesByY,!this.uploaded,this.text.programConfigurations.needsUpload),this.icon.upload(h,this.sortFeaturesByY,!this.uploaded,this.icon.programConfigurations.needsUpload),this.uploaded=!0}destroyDebugData(){this.textCollisionBox.destroy(),this.iconCollisionBox.destroy()}destroy(){this.text.destroy(),this.icon.destroy(),this.hasDebugData()&&this.destroyDebugData()}addToLineVertexArray(h,b){let D=this.lineVertexArray.length;if(h.segment!==void 0){let z=h.dist(b[h.segment+1]),G=h.dist(b[h.segment]),X={};for(let Z=h.segment+1;Z=0;Z--)X[Z]={x:b[Z].x,y:b[Z].y,tileUnitDistanceFromAnchor:G},Z>0&&(G+=b[Z-1].dist(b[Z]));for(let Z=0;Z0}hasIconData(){return this.icon.segments.get().length>0}hasDebugData(){return this.textCollisionBox&&this.iconCollisionBox}hasTextCollisionBoxData(){return this.hasDebugData()&&this.textCollisionBox.segments.get().length>0}hasIconCollisionBoxData(){return this.hasDebugData()&&this.iconCollisionBox.segments.get().length>0}addIndicesForPlacedSymbol(h,b){let D=h.placedSymbolArray.get(b),z=D.vertexStartIndex+4*D.numGlyphs;for(let G=D.vertexStartIndex;Gz[Z]-z[re]||G[re]-G[Z])),X}addToSortKeyRanges(h,b){let D=this.sortKeyRanges[this.sortKeyRanges.length-1];(D==null?void 0:D.sortKey)===b?D.symbolInstanceEnd=h+1:this.sortKeyRanges.push({sortKey:b,symbolInstanceStart:h,symbolInstanceEnd:h+1})}sortFeatures(h){if(this.sortFeaturesByY&&this.sortedAngle!==h&&!(this.text.segments.get().length>1||this.icon.segments.get().length>1)){this.symbolInstanceIndexes=this.getSortedSymbolIndexes(h),this.sortedAngle=h,this.text.indexArray.clear(),this.icon.indexArray.clear(),this.featureSortOrder=[];for(let b of this.symbolInstanceIndexes){let D=this.symbolInstances.get(b);this.featureSortOrder.push(D.featureIndex);let z=[D.rightJustifiedTextSymbolIndex,D.centerJustifiedTextSymbolIndex,D.leftJustifiedTextSymbolIndex];for(let G=0;G=0&&z.indexOf(X)===G&&this.addIndicesForPlacedSymbol(this.text,X)}D.verticalPlacedTextSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.text,D.verticalPlacedTextSymbolIndex),D.placedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,D.placedIconSymbolIndex),D.verticalPlacedIconSymbolIndex>=0&&this.addIndicesForPlacedSymbol(this.icon,D.verticalPlacedIconSymbolIndex)}this.text.indexBuffer&&this.text.indexBuffer.updateData(this.text.indexArray),this.icon.indexBuffer&&this.icon.indexBuffer.updateData(this.icon.indexArray)}}}let fee,hee;_i("SymbolBucket",X_,{omit:["layers","collisionBoxArray","features","compareText"]}),X_.MAX_GLYPHS=65535,X_.addDynamicAttributes=dI;var gI={get paint(){return hee=hee||new ms({"icon-opacity":new Di(Ct.paint_symbol["icon-opacity"]),"icon-color":new Di(Ct.paint_symbol["icon-color"]),"icon-halo-color":new Di(Ct.paint_symbol["icon-halo-color"]),"icon-halo-width":new Di(Ct.paint_symbol["icon-halo-width"]),"icon-halo-blur":new Di(Ct.paint_symbol["icon-halo-blur"]),"icon-translate":new wi(Ct.paint_symbol["icon-translate"]),"icon-translate-anchor":new wi(Ct.paint_symbol["icon-translate-anchor"]),"text-opacity":new Di(Ct.paint_symbol["text-opacity"]),"text-color":new Di(Ct.paint_symbol["text-color"],{runtimeType:Ut,getOverride:M=>M.textColor,hasOverride:M=>!!M.textColor}),"text-halo-color":new Di(Ct.paint_symbol["text-halo-color"]),"text-halo-width":new Di(Ct.paint_symbol["text-halo-width"]),"text-halo-blur":new Di(Ct.paint_symbol["text-halo-blur"]),"text-translate":new wi(Ct.paint_symbol["text-translate"]),"text-translate-anchor":new wi(Ct.paint_symbol["text-translate-anchor"])})},get layout(){return fee=fee||new ms({"symbol-placement":new wi(Ct.layout_symbol["symbol-placement"]),"symbol-spacing":new wi(Ct.layout_symbol["symbol-spacing"]),"symbol-avoid-edges":new wi(Ct.layout_symbol["symbol-avoid-edges"]),"symbol-sort-key":new Di(Ct.layout_symbol["symbol-sort-key"]),"symbol-z-order":new wi(Ct.layout_symbol["symbol-z-order"]),"icon-allow-overlap":new wi(Ct.layout_symbol["icon-allow-overlap"]),"icon-overlap":new wi(Ct.layout_symbol["icon-overlap"]),"icon-ignore-placement":new wi(Ct.layout_symbol["icon-ignore-placement"]),"icon-optional":new wi(Ct.layout_symbol["icon-optional"]),"icon-rotation-alignment":new wi(Ct.layout_symbol["icon-rotation-alignment"]),"icon-size":new Di(Ct.layout_symbol["icon-size"]),"icon-text-fit":new wi(Ct.layout_symbol["icon-text-fit"]),"icon-text-fit-padding":new wi(Ct.layout_symbol["icon-text-fit-padding"]),"icon-image":new Di(Ct.layout_symbol["icon-image"]),"icon-rotate":new Di(Ct.layout_symbol["icon-rotate"]),"icon-padding":new Di(Ct.layout_symbol["icon-padding"]),"icon-keep-upright":new wi(Ct.layout_symbol["icon-keep-upright"]),"icon-offset":new Di(Ct.layout_symbol["icon-offset"]),"icon-anchor":new Di(Ct.layout_symbol["icon-anchor"]),"icon-pitch-alignment":new wi(Ct.layout_symbol["icon-pitch-alignment"]),"text-pitch-alignment":new wi(Ct.layout_symbol["text-pitch-alignment"]),"text-rotation-alignment":new wi(Ct.layout_symbol["text-rotation-alignment"]),"text-field":new Di(Ct.layout_symbol["text-field"]),"text-font":new Di(Ct.layout_symbol["text-font"]),"text-size":new Di(Ct.layout_symbol["text-size"]),"text-max-width":new Di(Ct.layout_symbol["text-max-width"]),"text-line-height":new wi(Ct.layout_symbol["text-line-height"]),"text-letter-spacing":new Di(Ct.layout_symbol["text-letter-spacing"]),"text-justify":new Di(Ct.layout_symbol["text-justify"]),"text-radial-offset":new Di(Ct.layout_symbol["text-radial-offset"]),"text-variable-anchor":new wi(Ct.layout_symbol["text-variable-anchor"]),"text-variable-anchor-offset":new Di(Ct.layout_symbol["text-variable-anchor-offset"]),"text-anchor":new Di(Ct.layout_symbol["text-anchor"]),"text-max-angle":new wi(Ct.layout_symbol["text-max-angle"]),"text-writing-mode":new wi(Ct.layout_symbol["text-writing-mode"]),"text-rotate":new Di(Ct.layout_symbol["text-rotate"]),"text-padding":new wi(Ct.layout_symbol["text-padding"]),"text-keep-upright":new wi(Ct.layout_symbol["text-keep-upright"]),"text-transform":new Di(Ct.layout_symbol["text-transform"]),"text-offset":new Di(Ct.layout_symbol["text-offset"]),"text-allow-overlap":new wi(Ct.layout_symbol["text-allow-overlap"]),"text-overlap":new wi(Ct.layout_symbol["text-overlap"]),"text-ignore-placement":new wi(Ct.layout_symbol["text-ignore-placement"]),"text-optional":new wi(Ct.layout_symbol["text-optional"])})}};class dee{constructor(h){if(h.property.overrides===void 0)throw new Error("overrides must be provided to instantiate FormatSectionOverride class");this.type=h.property.overrides?h.property.overrides.runtimeType:Dt,this.defaultValue=h}evaluate(h){if(h.formattedSection){let b=this.defaultValue.property.overrides;if(b!=null&&b.hasOverride(h.formattedSection))return b.getOverride(h.formattedSection)}return h.feature&&h.featureState?this.defaultValue.evaluate(h.feature,h.featureState):this.defaultValue.property.specification.default}eachChild(h){this.defaultValue.isConstant()||h(this.defaultValue.value._styleExpression.expression)}outputDefined(){return!1}serialize(){return null}}_i("FormatSectionOverride",dee,{omit:["defaultValue"]});class BS extends hl{constructor(h,b){super(h,gI,b)}recalculate(h,b){if(super.recalculate(h,b),this.layout.get("icon-rotation-alignment")==="auto"&&(this.layout._values["icon-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-rotation-alignment")==="auto"&&(this.layout._values["text-rotation-alignment"]=this.layout.get("symbol-placement")!=="point"?"map":"viewport"),this.layout.get("text-pitch-alignment")==="auto"&&(this.layout._values["text-pitch-alignment"]=this.layout.get("text-rotation-alignment")==="map"?"map":"viewport"),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"){let D=this.layout.get("text-writing-mode");if(D){let z=[];for(let G of D)z.includes(G)||z.push(G);this.layout._values["text-writing-mode"]=z}else this.layout._values["text-writing-mode"]=["horizontal"]}this._setPaintOverrides()}getValueAndResolveTokens(h,b,D,z){let G=this.layout.get(h).evaluate(b,{},D,z),X=this._unevaluatedLayout._values[h];return X.isDataDriven()||If(X.value)||!G?G:(function(Z,re){return re.replace(/{([^{}]+)}/g,((Q,he)=>Z&&he in Z?String(Z[he]):""))})(b.properties,G)}createBucket(h){return new X_(h)}queryRadius(){return 0}queryIntersectsFeature(){throw new Error("Should take a different path in FeatureIndex")}_setPaintOverrides(){for(let h of gI.paint.overridableProperties){if(!BS.hasPaintOverride(this.layout,h))continue;let b=this.paint.get(h),D=new dee(b),z=new Wl(D,b.property.specification),G=null;G=b.value.kind==="constant"||b.value.kind==="source"?new zf("source",z):new qf("composite",z,b.value.zoomStops),this.paint._values[h]=new el(b.property,G,b.parameters)}}_handleOverridablePaintPropertyUpdate(h,b,D){return!(!this.layout||b.isDataDriven()||D.isDataDriven())&&BS.hasPaintOverride(this.layout,h)}static hasPaintOverride(h,b){let D=h.get("text-field"),z=gI.paint.properties[b],G=!1,X=Z=>{var re;for(let Q of Z)if(!((re=z.overrides)===null||re===void 0)&&re.hasOverride(Q))return void(G=!0)};if(D.value.kind==="constant"&&D.value.value instanceof $a)X(D.value.value.sections);else if(D.value.kind==="source"||D.value.kind==="composite"){let Z=Q=>{G||(Q instanceof Ms&&la(Q.value)===ri?X(Q.value.sections):Q instanceof Yo?X(Q.sections):Q.eachChild(Z))},re=D.value;re._styleExpression&&Z(re._styleExpression.expression)}return G}}let vee;var mit={get paint(){return vee=vee||new ms({"background-color":new wi(Ct.paint_background["background-color"]),"background-pattern":new Fc(Ct.paint_background["background-pattern"]),"background-opacity":new wi(Ct.paint_background["background-opacity"])})}};class yit extends hl{constructor(h,b){super(h,mit,b)}}class xit extends hl{constructor(h,b){super(h,{},b),this.onAdd=D=>{this.implementation.onAdd&&this.implementation.onAdd(D,D.painter.context.gl)},this.onRemove=D=>{this.implementation.onRemove&&this.implementation.onRemove(D,D.painter.context.gl)},this.implementation=h}is3D(){return this.implementation.renderingMode==="3d"}hasOffscreenPass(){return this.implementation.prerender!==void 0}recalculate(){}updateTransitions(){}hasTransition(){return!1}serialize(){throw new Error("Custom layers cannot be serialized")}}class _it{constructor(h){this._methodToThrottle=h,this._triggered=!1,this._channel=new MessageChannel,this._channel.port2.onmessage=()=>{this._triggered=!1,this._methodToThrottle()}}trigger(){var h;this._triggered||(this._triggered=!0,(h=this._channel)===null||h===void 0||h.port1.postMessage(!0))}remove(){delete this._channel,this._methodToThrottle=()=>{}}}let bit={once:!0},mI=63710088e-1;class Xg{constructor(h,b){if(isNaN(h)||isNaN(b))throw new Error(`Invalid LngLat object: (${h}, ${b})`);if(this.lng=+h,this.lat=+b,this.lat>90||this.lat<-90)throw new Error("Invalid LngLat latitude value: must be between -90 and 90")}wrap(){return new Xg(K(this.lng,-180,180),this.lat)}toArray(){return[this.lng,this.lat]}toString(){return`LngLat(${this.lng}, ${this.lat})`}distanceTo(h){let b=Math.PI/180,D=this.lat*b,z=h.lat*b,G=Math.sin(D)*Math.sin(z)+Math.cos(D)*Math.cos(z)*Math.cos((h.lng-this.lng)*b);return mI*Math.acos(Math.min(G,1))}static convert(h){if(h instanceof Xg)return h;if(Array.isArray(h)&&(h.length===2||h.length===3))return new Xg(Number(h[0]),Number(h[1]));if(!Array.isArray(h)&&typeof h=="object"&&h!==null)return new Xg(Number("lng"in h?h.lng:h.lon),Number(h.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 [, ]")}}let pee=2*Math.PI*mI;function gee(M){return pee*Math.cos(M*Math.PI/180)}function mee(M){return(180+M)/360}function yee(M){return(180-180/Math.PI*Math.log(Math.tan(Math.PI/4+M*Math.PI/360)))/360}function xee(M,h){return M/gee(h)}function _ee(M){return 360*M-180}function OS(M){return 360/Math.PI*Math.atan(Math.exp((180-360*M)*Math.PI/180))-90}function bee(M,h){return M*gee(OS(h))}class y4{constructor(h,b,D=0){this.x=+h,this.y=+b,this.z=+D}static fromLngLat(h,b=0){let D=Xg.convert(h);return new y4(mee(D.lng),yee(D.lat),xee(b,D.lat))}toLngLat(){return new Xg(_ee(this.x),OS(this.y))}toAltitude(){return bee(this.z,this.y)}meterInMercatorCoordinateUnits(){return 1/pee*(h=OS(this.y),1/Math.cos(h*Math.PI/180));var h}}function wee(M,h,b){var D=2*Math.PI*6378137/256/Math.pow(2,b);return[M*D-2*Math.PI*6378137/2,h*D-2*Math.PI*6378137/2]}class yI{constructor(h,b,D){if(!(function(z,G,X){return!(z<0||z>25||X<0||X>=Math.pow(2,z)||G<0||G>=Math.pow(2,z))})(h,b,D))throw new Error(`x=${b}, y=${D}, z=${h} outside of bounds. 0<=x<${Math.pow(2,h)}, 0<=y<${Math.pow(2,h)} 0<=z<=25 `);this.z=h,this.x=b,this.y=D,this.key=Z_(0,h,h,b,D)}equals(h){return this.z===h.z&&this.x===h.x&&this.y===h.y}url(h,b,D){let z=(X=this.y,Z=this.z,re=wee(256*(G=this.x),256*(X=Math.pow(2,Z)-X-1),Z),Q=wee(256*(G+1),256*(X+1),Z),re[0]+","+re[1]+","+Q[0]+","+Q[1]);var G,X,Z,re,Q;let he=(function(oe,ke,ge){let Ue="";for(let je=oe;je>0;je--){let vt=1<1?"@2x":"").replace(/{quadkey}/g,he).replace(/{bbox-epsg-3857}/g,z)}isChildOf(h){let b=this.z-h.z;return b>0&&h.x===this.x>>b&&h.y===this.y>>b}getTilePoint(h){let b=Math.pow(2,this.z);return new o((h.x*b-this.x)*j,(h.y*b-this.y)*j)}toString(){return`${this.z}/${this.x}/${this.y}`}}class Tee{constructor(h,b){this.wrap=h,this.canonical=b,this.key=Z_(h,b.z,b.z,b.x,b.y)}}class Yd{constructor(h,b,D,z,G){if(this.terrainRttPosMatrix32f=null,h= z; overscaledZ = ${h}; z = ${D}`);this.overscaledZ=h,this.wrap=b,this.canonical=new yI(D,+z,+G),this.key=Z_(b,h,D,z,G)}clone(){return new Yd(this.overscaledZ,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)}equals(h){return this.overscaledZ===h.overscaledZ&&this.wrap===h.wrap&&this.canonical.equals(h.canonical)}scaledTo(h){if(h>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${h}; overscaledZ = ${this.overscaledZ}`);let b=this.canonical.z-h;return h>this.canonical.z?new Yd(h,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y):new Yd(h,this.wrap,h,this.canonical.x>>b,this.canonical.y>>b)}isOverscaled(){return this.overscaledZ>this.canonical.z}calculateScaledKey(h,b){if(h>this.overscaledZ)throw new Error(`targetZ > this.overscaledZ; targetZ = ${h}; overscaledZ = ${this.overscaledZ}`);let D=this.canonical.z-h;return h>this.canonical.z?Z_(this.wrap*+b,h,this.canonical.z,this.canonical.x,this.canonical.y):Z_(this.wrap*+b,h,h,this.canonical.x>>D,this.canonical.y>>D)}isChildOf(h){if(h.wrap!==this.wrap||this.overscaledZ-h.overscaledZ<=0)return!1;if(h.overscaledZ===0)return this.overscaledZ>0;let b=this.canonical.z-h.canonical.z;return!(b<0)&&h.canonical.x===this.canonical.x>>b&&h.canonical.y===this.canonical.y>>b}children(h){if(this.overscaledZ>=h)return[new Yd(this.overscaledZ+1,this.wrap,this.canonical.z,this.canonical.x,this.canonical.y)];let b=this.canonical.z+1,D=2*this.canonical.x,z=2*this.canonical.y;return[new Yd(b,this.wrap,b,D,z),new Yd(b,this.wrap,b,D+1,z),new Yd(b,this.wrap,b,D,z+1),new Yd(b,this.wrap,b,D+1,z+1)]}isLessThan(h){return this.wraph.wrap)&&(this.overscaledZh.overscaledZ)&&(this.canonical.xh.canonical.x)&&this.canonical.y=0&&h=0&&b=Q)return null;let oe=this.canonical.x+z,ke=this.wrap;return oe<0?(ke-=Math.ceil(-oe/Q),oe=(oe%Q+Q)%Q):oe>=Q&&(ke+=Math.floor(oe/Q),oe%=Q),{tileID:new Yd(this.overscaledZ,ke,re,oe,he),x:X,y:Z}}}function Z_(M,h,b,D,z){(M*=2)<0&&(M=-1*M-1);let G=1<this.maxX||this.minY>this.maxY)&&(this.minX=1/0,this.maxX=-1/0,this.minY=1/0,this.maxY=-1/0),this}shrinkBy(h){return this.expandBy(-h)}map(h){let b=new ix;return b.extend(h(new o(this.minX,this.minY))),b.extend(h(new o(this.maxX,this.minY))),b.extend(h(new o(this.minX,this.maxY))),b.extend(h(new o(this.maxX,this.maxY))),b}static fromPoints(h){let b=new ix;for(let D of h)b.extend(D);return b}contains(h){return h.x>=this.minX&&h.x<=this.maxX&&h.y>=this.minY&&h.y<=this.maxY}empty(){return this.minX>this.maxX}width(){return this.maxX-this.minX}height(){return this.maxY-this.minY}covers(h){return!this.empty()&&!h.empty()&&h.minX>=this.minX&&h.maxX<=this.maxX&&h.minY>=this.minY&&h.maxY<=this.maxY}intersects(h){return!this.empty()&&!h.empty()&&h.minX<=this.maxX&&h.maxX>=this.minX&&h.minY<=this.maxY&&h.maxY>=this.minY}}class Aee{constructor(h){this._stringToNumber={},this._numberToString=[];for(let b=0;b=this._numberToString.length)throw new Error(`Out of bounds. Index requested n=${h} can't be >= this._numberToString.length ${this._numberToString.length}`);return this._numberToString[h]}}class Mee{constructor(h,b,D,z,G){this.type="Feature",this._vectorTileFeature=h,this._x=D,this._y=z,this._z=b,this.properties=h.properties,this.id=G}projectPoint(h,b,D,z){return[360*(h.x+b)/z-180,360/Math.PI*Math.atan(Math.exp((1-2*(h.y+D)/z)*Math.PI))-90]}projectLine(h,b,D,z){return h.map((G=>this.projectPoint(G,b,D,z)))}get geometry(){if(this._geometry)return this._geometry;let h=this._vectorTileFeature,b=h.extent*Math.pow(2,this._z),D=h.extent*this._x,z=h.extent*this._y,G=h.loadGeometry();switch(h.type){case 1:{let X=[];for(let re of G)X.push(re[0]);let Z=this.projectLine(X,D,z,b);this._geometry=X.length===1?{type:"Point",coordinates:Z[0]}:{type:"MultiPoint",coordinates:Z};break}case 2:{let X=G.map((Z=>this.projectLine(Z,D,z,b)));this._geometry=X.length===1?{type:"LineString",coordinates:X[0]}:{type:"MultiLineString",coordinates:X};break}case 3:{let X=kQ(G),Z=[];for(let re of X)Z.push(re.map((Q=>this.projectLine(Q,D,z,b))));this._geometry=Z.length===1?{type:"Polygon",coordinates:Z[0]}:{type:"MultiPolygon",coordinates:Z};break}default:throw new Error(`unknown feature type: ${h.type}`)}return this._geometry}set geometry(h){this._geometry=h}toJSON(){let h={geometry:this.geometry};for(let b in this)b!=="_geometry"&&b!=="_vectorTileFeature"&&b!=="_x"&&b!=="_y"&&b!=="_z"&&(h[b]=this[b]);return h}}class $_{constructor(h,b,D){this._name=h,this.dataBuffer=b,typeof D=="number"?this._size=D:(this.nullabilityBuffer=D,this._size=D.size())}getValue(h){return this.nullabilityBuffer&&!this.nullabilityBuffer.get(h)?null:this.getValueFromBuffer(h)}has(h){var b;return((b=this.nullabilityBuffer)==null?void 0:b.get(h))||!this.nullabilityBuffer}get name(){return this._name}get size(){return this._size}}class NS extends $_{}class xI extends NS{getValueFromBuffer(h){return this.dataBuffer[h]}}class _I extends NS{getValueFromBuffer(h){return this.dataBuffer[h]}}class See extends $_{constructor(h,b,D,z){super(h,b,z),this.delta=D}}class bI extends See{constructor(h,b,D,z){super(h,Int32Array.of(b),D,z)}getValueFromBuffer(h){return this.dataBuffer[0]+h*this.delta}}class wI extends $_{constructor(h,b,D,z){super(h,z?Int32Array.of(b):Uint32Array.of(b),D)}getValueFromBuffer(h){return this.dataBuffer[0]}}class wit{constructor(h,b,D,z,G=4096){this._name=h,this._geometryVector=b,this._idVector=D,this._propertyVectors=z,this._extent=G}get name(){return this._name}get idVector(){return this._idVector}get geometryVector(){return this._geometryVector}get propertyVectors(){return this._propertyVectors}getPropertyVector(h){return this.propertyVectorsMap||(this.propertyVectorsMap=new Map(this._propertyVectors.map((b=>[b.name,b])))),this.propertyVectorsMap.get(h)}get numFeatures(){return this.geometryVector.numGeometries}get extent(){return this._extent}getFeatures(){let h=[],b=this.geometryVector.getGeometries();for(let D=0;D>>32-M;let AI=TI,U1=256;function MI(M,h){return M-M%h}function Tit(M){let h=M>>>0;return((255&h)<<24|(65280&h)<<8|h>>>8&65280|h>>>24&255)>>>0}let SI=(function(){if(!Number.isFinite(65536))return 65536;let M=MI(Math.floor(65536),U1);return M===0?U1:M})(),Ait=3*SI/U1+SI|0;function kee(){let M=new Uint8Array(Ait);return{dataToBePacked:new Array(33),dataPointers:new Int32Array(33),byteContainer:M,byteContainerI32:new Int32Array(M.buffer,M.byteOffset,M.byteLength>>>2),exceptionSizes:new Int32Array(33)}}function Mit(M,h,b,D,z){switch(z){case 1:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0;Z[Q++]=ke>>>0&1,Z[Q++]=ke>>>1&1,Z[Q++]=ke>>>2&1,Z[Q++]=ke>>>3&1,Z[Q++]=ke>>>4&1,Z[Q++]=ke>>>5&1,Z[Q++]=ke>>>6&1,Z[Q++]=ke>>>7&1,Z[Q++]=ke>>>8&1,Z[Q++]=ke>>>9&1,Z[Q++]=ke>>>10&1,Z[Q++]=ke>>>11&1,Z[Q++]=ke>>>12&1,Z[Q++]=ke>>>13&1,Z[Q++]=ke>>>14&1,Z[Q++]=ke>>>15&1,Z[Q++]=ke>>>16&1,Z[Q++]=ke>>>17&1,Z[Q++]=ke>>>18&1,Z[Q++]=ke>>>19&1,Z[Q++]=ke>>>20&1,Z[Q++]=ke>>>21&1,Z[Q++]=ke>>>22&1,Z[Q++]=ke>>>23&1,Z[Q++]=ke>>>24&1,Z[Q++]=ke>>>25&1,Z[Q++]=ke>>>26&1,Z[Q++]=ke>>>27&1,Z[Q++]=ke>>>28&1,Z[Q++]=ke>>>29&1,Z[Q++]=ke>>>30&1,Z[Q++]=ke>>>31&1}})(M,h,b,D);break;case 2:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0;Z[Q++]=ke>>>0&3,Z[Q++]=ke>>>2&3,Z[Q++]=ke>>>4&3,Z[Q++]=ke>>>6&3,Z[Q++]=ke>>>8&3,Z[Q++]=ke>>>10&3,Z[Q++]=ke>>>12&3,Z[Q++]=ke>>>14&3,Z[Q++]=ke>>>16&3,Z[Q++]=ke>>>18&3,Z[Q++]=ke>>>20&3,Z[Q++]=ke>>>22&3,Z[Q++]=ke>>>24&3,Z[Q++]=ke>>>26&3,Z[Q++]=ke>>>28&3,Z[Q++]=ke>>>30&3,Z[Q++]=ge>>>0&3,Z[Q++]=ge>>>2&3,Z[Q++]=ge>>>4&3,Z[Q++]=ge>>>6&3,Z[Q++]=ge>>>8&3,Z[Q++]=ge>>>10&3,Z[Q++]=ge>>>12&3,Z[Q++]=ge>>>14&3,Z[Q++]=ge>>>16&3,Z[Q++]=ge>>>18&3,Z[Q++]=ge>>>20&3,Z[Q++]=ge>>>22&3,Z[Q++]=ge>>>24&3,Z[Q++]=ge>>>26&3,Z[Q++]=ge>>>28&3,Z[Q++]=ge>>>30&3}})(M,h,b,D);break;case 3:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0;Z[Q++]=ke>>>0&7,Z[Q++]=ke>>>3&7,Z[Q++]=ke>>>6&7,Z[Q++]=ke>>>9&7,Z[Q++]=ke>>>12&7,Z[Q++]=ke>>>15&7,Z[Q++]=ke>>>18&7,Z[Q++]=ke>>>21&7,Z[Q++]=ke>>>24&7,Z[Q++]=ke>>>27&7,Z[Q++]=7&(ke>>>30|(1&ge)<<2),Z[Q++]=ge>>>1&7,Z[Q++]=ge>>>4&7,Z[Q++]=ge>>>7&7,Z[Q++]=ge>>>10&7,Z[Q++]=ge>>>13&7,Z[Q++]=ge>>>16&7,Z[Q++]=ge>>>19&7,Z[Q++]=ge>>>22&7,Z[Q++]=ge>>>25&7,Z[Q++]=ge>>>28&7,Z[Q++]=7&(ge>>>31|(3&Ue)<<1),Z[Q++]=Ue>>>2&7,Z[Q++]=Ue>>>5&7,Z[Q++]=Ue>>>8&7,Z[Q++]=Ue>>>11&7,Z[Q++]=Ue>>>14&7,Z[Q++]=Ue>>>17&7,Z[Q++]=Ue>>>20&7,Z[Q++]=Ue>>>23&7,Z[Q++]=Ue>>>26&7,Z[Q++]=Ue>>>29&7}})(M,h,b,D);break;case 4:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0;Z[Q++]=ke>>>0&15,Z[Q++]=ke>>>4&15,Z[Q++]=ke>>>8&15,Z[Q++]=ke>>>12&15,Z[Q++]=ke>>>16&15,Z[Q++]=ke>>>20&15,Z[Q++]=ke>>>24&15,Z[Q++]=ke>>>28&15,Z[Q++]=ge>>>0&15,Z[Q++]=ge>>>4&15,Z[Q++]=ge>>>8&15,Z[Q++]=ge>>>12&15,Z[Q++]=ge>>>16&15,Z[Q++]=ge>>>20&15,Z[Q++]=ge>>>24&15,Z[Q++]=ge>>>28&15,Z[Q++]=Ue>>>0&15,Z[Q++]=Ue>>>4&15,Z[Q++]=Ue>>>8&15,Z[Q++]=Ue>>>12&15,Z[Q++]=Ue>>>16&15,Z[Q++]=Ue>>>20&15,Z[Q++]=Ue>>>24&15,Z[Q++]=Ue>>>28&15,Z[Q++]=je>>>0&15,Z[Q++]=je>>>4&15,Z[Q++]=je>>>8&15,Z[Q++]=je>>>12&15,Z[Q++]=je>>>16&15,Z[Q++]=je>>>20&15,Z[Q++]=je>>>24&15,Z[Q++]=je>>>28&15}})(M,h,b,D);break;case 5:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0;Z[Q++]=ke>>>0&31,Z[Q++]=ke>>>5&31,Z[Q++]=ke>>>10&31,Z[Q++]=ke>>>15&31,Z[Q++]=ke>>>20&31,Z[Q++]=ke>>>25&31,Z[Q++]=31&(ke>>>30|(7&ge)<<2),Z[Q++]=ge>>>3&31,Z[Q++]=ge>>>8&31,Z[Q++]=ge>>>13&31,Z[Q++]=ge>>>18&31,Z[Q++]=ge>>>23&31,Z[Q++]=31&(ge>>>28|(1&Ue)<<4),Z[Q++]=Ue>>>1&31,Z[Q++]=Ue>>>6&31,Z[Q++]=Ue>>>11&31,Z[Q++]=Ue>>>16&31,Z[Q++]=Ue>>>21&31,Z[Q++]=Ue>>>26&31,Z[Q++]=31&(Ue>>>31|(15&je)<<1),Z[Q++]=je>>>4&31,Z[Q++]=je>>>9&31,Z[Q++]=je>>>14&31,Z[Q++]=je>>>19&31,Z[Q++]=je>>>24&31,Z[Q++]=31&(je>>>29|(3&vt)<<3),Z[Q++]=vt>>>2&31,Z[Q++]=vt>>>7&31,Z[Q++]=vt>>>12&31,Z[Q++]=vt>>>17&31,Z[Q++]=vt>>>22&31,Z[Q++]=vt>>>27&31}})(M,h,b,D);break;case 6:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0,gt=G[he++]>>>0;Z[Q++]=ke>>>0&63,Z[Q++]=ke>>>6&63,Z[Q++]=ke>>>12&63,Z[Q++]=ke>>>18&63,Z[Q++]=ke>>>24&63,Z[Q++]=63&(ke>>>30|(15&ge)<<2),Z[Q++]=ge>>>4&63,Z[Q++]=ge>>>10&63,Z[Q++]=ge>>>16&63,Z[Q++]=ge>>>22&63,Z[Q++]=63&(ge>>>28|(3&Ue)<<4),Z[Q++]=Ue>>>2&63,Z[Q++]=Ue>>>8&63,Z[Q++]=Ue>>>14&63,Z[Q++]=Ue>>>20&63,Z[Q++]=Ue>>>26&63,Z[Q++]=je>>>0&63,Z[Q++]=je>>>6&63,Z[Q++]=je>>>12&63,Z[Q++]=je>>>18&63,Z[Q++]=je>>>24&63,Z[Q++]=63&(je>>>30|(15&vt)<<2),Z[Q++]=vt>>>4&63,Z[Q++]=vt>>>10&63,Z[Q++]=vt>>>16&63,Z[Q++]=vt>>>22&63,Z[Q++]=63&(vt>>>28|(3>)<<4),Z[Q++]=gt>>>2&63,Z[Q++]=gt>>>8&63,Z[Q++]=gt>>>14&63,Z[Q++]=gt>>>20&63,Z[Q++]=gt>>>26&63}})(M,h,b,D);break;case 7:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0,gt=G[he++]>>>0,It=G[he++]>>>0;Z[Q++]=ke>>>0&127,Z[Q++]=ke>>>7&127,Z[Q++]=ke>>>14&127,Z[Q++]=ke>>>21&127,Z[Q++]=127&(ke>>>28|(7&ge)<<4),Z[Q++]=ge>>>3&127,Z[Q++]=ge>>>10&127,Z[Q++]=ge>>>17&127,Z[Q++]=ge>>>24&127,Z[Q++]=127&(ge>>>31|(63&Ue)<<1),Z[Q++]=Ue>>>6&127,Z[Q++]=Ue>>>13&127,Z[Q++]=Ue>>>20&127,Z[Q++]=127&(Ue>>>27|(3&je)<<5),Z[Q++]=je>>>2&127,Z[Q++]=je>>>9&127,Z[Q++]=je>>>16&127,Z[Q++]=je>>>23&127,Z[Q++]=127&(je>>>30|(31&vt)<<2),Z[Q++]=vt>>>5&127,Z[Q++]=vt>>>12&127,Z[Q++]=vt>>>19&127,Z[Q++]=127&(vt>>>26|(1>)<<6),Z[Q++]=gt>>>1&127,Z[Q++]=gt>>>8&127,Z[Q++]=gt>>>15&127,Z[Q++]=gt>>>22&127,Z[Q++]=127&(gt>>>29|(15&It)<<3),Z[Q++]=It>>>4&127,Z[Q++]=It>>>11&127,Z[Q++]=It>>>18&127,Z[Q++]=It>>>25&127}})(M,h,b,D);break;case 8:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<8;oe++){let ke=G[he++]>>>0,ge=G[he++]>>>0,Ue=G[he++]>>>0,je=G[he++]>>>0,vt=G[he++]>>>0,gt=G[he++]>>>0,It=G[he++]>>>0,_t=G[he++]>>>0;Z[Q++]=ke>>>0&255,Z[Q++]=ke>>>8&255,Z[Q++]=ke>>>16&255,Z[Q++]=ke>>>24&255,Z[Q++]=ge>>>0&255,Z[Q++]=ge>>>8&255,Z[Q++]=ge>>>16&255,Z[Q++]=ge>>>24&255,Z[Q++]=Ue>>>0&255,Z[Q++]=Ue>>>8&255,Z[Q++]=Ue>>>16&255,Z[Q++]=Ue>>>24&255,Z[Q++]=je>>>0&255,Z[Q++]=je>>>8&255,Z[Q++]=je>>>16&255,Z[Q++]=je>>>24&255,Z[Q++]=vt>>>0&255,Z[Q++]=vt>>>8&255,Z[Q++]=vt>>>16&255,Z[Q++]=vt>>>24&255,Z[Q++]=gt>>>0&255,Z[Q++]=gt>>>8&255,Z[Q++]=gt>>>16&255,Z[Q++]=gt>>>24&255,Z[Q++]=It>>>0&255,Z[Q++]=It>>>8&255,Z[Q++]=It>>>16&255,Z[Q++]=It>>>24&255,Z[Q++]=_t>>>0&255,Z[Q++]=_t>>>8&255,Z[Q++]=_t>>>16&255,Z[Q++]=_t>>>24&255}})(M,h,b,D);break;case 16:(function(G,X,Z,re){let Q=re,he=X;for(let oe=0;oe<128;oe++){let ke=G[he++]>>>0;Z[Q++]=65535&ke,Z[Q++]=ke>>>16&65535}})(M,h,b,D);break;default:(function(G,X,Z,re,Q){let he=AI[Q]>>>0,oe=X,ke=0,ge=G[oe]>>>0,Ue=re;for(let je=0;je<8;je++){for(let vt=0;vt<32;vt++)if(ke+Q<=32)Z[Ue+vt]=ge>>>ke&he,ke+=Q,ke===32&&(ke=0,oe++,vt!==31&&(ge=G[oe]>>>0));else{let gt=32-ke,It=ge>>>ke;oe++,ge=G[oe]>>>0;let _t=Q-gt;Z[Ue+vt]=(It|(ge&-1>>>32-_t>>>0)<>>0)}})(M,h,b,D,z)}return h+(z<<3)|0}function Sit(M,h,b,D){if(b+2>h)throw new Error(`FastPFOR decode: byteContainer underflow at block=${D} (need 2 bytes for [bitWidth, exceptionCount], bytePos=${b}, byteSize=${h})`);let z=M[b++],G=M[b++];if(z>32)throw new Error(`FastPFOR decode: invalid bitWidth=${z} at block=${D} (expected 0..32). This likely indicates corrupted or truncated input.`);return{bitWidth:z,exceptionCount:G,bytePosIn:b}}function Eit(M,h,b,D,z,G,X,Z,re){let{maxBits:Q,exceptionBitWidth:he,bytePosIn:oe}=(function(vt,gt,It,_t,qt,tr){if(It+1>gt)throw new Error(`FastPFOR decode: exception header underflow at block=${tr} (need 1 byte for maxBits, bytePos=${It}, byteSize=${gt})`);let lr=vt[It++];if(lr<_t||lr>32)throw new Error(`FastPFOR decode: invalid maxBits=${lr} at block=${tr} (bitWidth=${_t}, expected ${_t}..32)`);let qr=lr-_t|0;if(qr<1||qr>32)throw new Error(`FastPFOR decode: invalid exceptionBitWidth=${qr} at block=${tr} (bitWidth=${_t}, maxBits=${lr})`);if(It+qt>gt)throw new Error(`FastPFOR decode: exception positions underflow at block=${tr} (need=${qt}, have=${gt-It})`);return{maxBits:lr,exceptionBitWidth:qr,bytePosIn:It}})(z,G,X,b,D,re);if(X=oe,he===1){let vt=1<je)throw new Error(`FastPFOR decode: exception stream overflow for exceptionBitWidth=${he} (ptr=${Ue}, need ${D}, size=${je}) at block ${re}`);for(let vt=0;vtM.length-1)throw new Error(`FastPFOR decode: invalid whereMeta=${Z} at pageStart=${X} (expected > 0 and pageStart+whereMeta < encoded.length=${M.length})`);let re=X+1|0,Q=X+Z|0,he=M[Q]>>>0,oe=he+3>>>2,ke=Q+1,ge=ke+oe;if(ge>=M.length)throw new Error(`FastPFOR decode: invalid byteSize=${he} (metaInts=${oe}, pageStart=${X}, packedEnd=${Q}, byteContainerStart=${ke}) causes bitmapPos=${ge} out of bounds (encoded.length=${M.length})`);let Ue=(function(gt,It,_t,qt){qt.byteContainer.length<_t&&(qt.byteContainer=new Uint8Array(2*_t),qt.byteContainerI32=void 0);let tr=qt.byteContainer,lr=_t>>>2;if(3&tr.byteOffset)for(let jr=0;jr>>8&255,tr[fn+2|0]=_n>>>16&255,tr[fn+3|0]=_n>>>24&255}else{let jr=qt.byteContainerI32;(!jr||jr.buffer!==tr.buffer||jr.byteOffset!==tr.byteOffset||jr.length>>2)),jr.set(gt.subarray(It,It+lr))}let qr=3&_t;if(qr>0){let jr=0|gt[It+lr|0],_n=lr<<2;for(let fn=0;fn>>(fn<<3)&255}return tr})(M,ke,he,G),je=he,vt=(function(gt,It,_t){let qt=0|gt[It++],tr=_t.dataToBePacked;for(let lr=2;lr<=32;lr=lr+1|0){if(!(qt>>>lr-1&1))continue;if(It>=gt.length)throw new Error(`FastPFOR decode: truncated exception stream header (bitWidth=${lr}, streamWordIndex=${It}, needWords=1, availableWords=${gt.length-It}, encodedWords=${gt.length})`);let qr=gt[It++]>>>0,jr=MI(qr+31,32),_n=qr*lr+31>>>5;if(It+_n>gt.length)throw new Error(`FastPFOR decode: truncated exception stream (bitWidth=${lr}, size=${qr}, streamWordIndex=${It}, needWords=${_n}, availableWords=${gt.length-It}, encodedWords=${gt.length})`);let fn=tr[lr];(!fn||fn.length>>5)|0,_t.exceptionSizes[lr]=qr}return It})(M,ge,G);return G.dataPointers.fill(0),(function(gt,It,_t,qt,tr,lr,qr,jr,_n,fn){let Dn=0|_t,Hn=0;for(let Ln=0;Ln0&&(Hn=Eit(tr,ti,ei,ci,jr,_n,Hn,fn,Ln))}if(Dn!==qt)throw new Error(`FastPFOR decode: packed region mismatch (pageStart=${It}, packedStart=${_t}, consumedPackedEnd=${Dn}, expectedPackedEnd=${qt}, packedWords=${qt-_t}, encoded.length=${gt.length})`)})(M,X,re,Q,h,0|D,z/U1|0,Ue,je,G),vt}function Cit(M,h,b,D,z){switch(z){case 2:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0;oe[ge++]=Ue>>>0&3,oe[ge++]=Ue>>>2&3,oe[ge++]=Ue>>>4&3,oe[ge++]=Ue>>>6&3,oe[ge++]=Ue>>>8&3,oe[ge++]=Ue>>>10&3,oe[ge++]=Ue>>>12&3,oe[ge++]=Ue>>>14&3,oe[ge++]=Ue>>>16&3,oe[ge++]=Ue>>>18&3,oe[ge++]=Ue>>>20&3,oe[ge++]=Ue>>>22&3,oe[ge++]=Ue>>>24&3,oe[ge++]=Ue>>>26&3,oe[ge++]=Ue>>>28&3,oe[ge++]=Ue>>>30&3,oe[ge++]=je>>>0&3,oe[ge++]=je>>>2&3,oe[ge++]=je>>>4&3,oe[ge++]=je>>>6&3,oe[ge++]=je>>>8&3,oe[ge++]=je>>>10&3,oe[ge++]=je>>>12&3,oe[ge++]=je>>>14&3,oe[ge++]=je>>>16&3,oe[ge++]=je>>>18&3,oe[ge++]=je>>>20&3,oe[ge++]=je>>>22&3,oe[ge++]=je>>>24&3,oe[ge++]=je>>>26&3,oe[ge++]=je>>>28&3,oe[ge]=je>>>30&3})(M,h,b,D);case 3:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0;oe[ge++]=Ue>>>0&7,oe[ge++]=Ue>>>3&7,oe[ge++]=Ue>>>6&7,oe[ge++]=Ue>>>9&7,oe[ge++]=Ue>>>12&7,oe[ge++]=Ue>>>15&7,oe[ge++]=Ue>>>18&7,oe[ge++]=Ue>>>21&7,oe[ge++]=Ue>>>24&7,oe[ge++]=Ue>>>27&7,oe[ge++]=7&(Ue>>>30|(1&je)<<2),oe[ge++]=je>>>1&7,oe[ge++]=je>>>4&7,oe[ge++]=je>>>7&7,oe[ge++]=je>>>10&7,oe[ge++]=je>>>13&7,oe[ge++]=je>>>16&7,oe[ge++]=je>>>19&7,oe[ge++]=je>>>22&7,oe[ge++]=je>>>25&7,oe[ge++]=je>>>28&7,oe[ge++]=7&(je>>>31|(3&vt)<<1),oe[ge++]=vt>>>2&7,oe[ge++]=vt>>>5&7,oe[ge++]=vt>>>8&7,oe[ge++]=vt>>>11&7,oe[ge++]=vt>>>14&7,oe[ge++]=vt>>>17&7,oe[ge++]=vt>>>20&7,oe[ge++]=vt>>>23&7,oe[ge++]=vt>>>26&7,oe[ge]=vt>>>29&7})(M,h,b,D);case 4:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0;oe[ge++]=Ue>>>0&15,oe[ge++]=Ue>>>4&15,oe[ge++]=Ue>>>8&15,oe[ge++]=Ue>>>12&15,oe[ge++]=Ue>>>16&15,oe[ge++]=Ue>>>20&15,oe[ge++]=Ue>>>24&15,oe[ge++]=Ue>>>28&15,oe[ge++]=je>>>0&15,oe[ge++]=je>>>4&15,oe[ge++]=je>>>8&15,oe[ge++]=je>>>12&15,oe[ge++]=je>>>16&15,oe[ge++]=je>>>20&15,oe[ge++]=je>>>24&15,oe[ge++]=je>>>28&15,oe[ge++]=vt>>>0&15,oe[ge++]=vt>>>4&15,oe[ge++]=vt>>>8&15,oe[ge++]=vt>>>12&15,oe[ge++]=vt>>>16&15,oe[ge++]=vt>>>20&15,oe[ge++]=vt>>>24&15,oe[ge++]=vt>>>28&15,oe[ge++]=gt>>>0&15,oe[ge++]=gt>>>4&15,oe[ge++]=gt>>>8&15,oe[ge++]=gt>>>12&15,oe[ge++]=gt>>>16&15,oe[ge++]=gt>>>20&15,oe[ge++]=gt>>>24&15,oe[ge]=gt>>>28&15})(M,h,b,D);case 5:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0;oe[ge++]=Ue>>>0&31,oe[ge++]=Ue>>>5&31,oe[ge++]=Ue>>>10&31,oe[ge++]=Ue>>>15&31,oe[ge++]=Ue>>>20&31,oe[ge++]=Ue>>>25&31,oe[ge++]=31&(Ue>>>30|(7&je)<<2),oe[ge++]=je>>>3&31,oe[ge++]=je>>>8&31,oe[ge++]=je>>>13&31,oe[ge++]=je>>>18&31,oe[ge++]=je>>>23&31,oe[ge++]=31&(je>>>28|(1&vt)<<4),oe[ge++]=vt>>>1&31,oe[ge++]=vt>>>6&31,oe[ge++]=vt>>>11&31,oe[ge++]=vt>>>16&31,oe[ge++]=vt>>>21&31,oe[ge++]=vt>>>26&31,oe[ge++]=31&(vt>>>31|(15>)<<1),oe[ge++]=gt>>>4&31,oe[ge++]=gt>>>9&31,oe[ge++]=gt>>>14&31,oe[ge++]=gt>>>19&31,oe[ge++]=gt>>>24&31,oe[ge++]=31&(gt>>>29|(3&It)<<3),oe[ge++]=It>>>2&31,oe[ge++]=It>>>7&31,oe[ge++]=It>>>12&31,oe[ge++]=It>>>17&31,oe[ge++]=It>>>22&31,oe[ge]=It>>>27&31})(M,h,b,D);case 6:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0;oe[ge++]=Ue>>>0&63,oe[ge++]=Ue>>>6&63,oe[ge++]=Ue>>>12&63,oe[ge++]=Ue>>>18&63,oe[ge++]=Ue>>>24&63,oe[ge++]=63&(Ue>>>30|(15&je)<<2),oe[ge++]=je>>>4&63,oe[ge++]=je>>>10&63,oe[ge++]=je>>>16&63,oe[ge++]=je>>>22&63,oe[ge++]=63&(je>>>28|(3&vt)<<4),oe[ge++]=vt>>>2&63,oe[ge++]=vt>>>8&63,oe[ge++]=vt>>>14&63,oe[ge++]=vt>>>20&63,oe[ge++]=vt>>>26&63,oe[ge++]=gt>>>0&63,oe[ge++]=gt>>>6&63,oe[ge++]=gt>>>12&63,oe[ge++]=gt>>>18&63,oe[ge++]=gt>>>24&63,oe[ge++]=63&(gt>>>30|(15&It)<<2),oe[ge++]=It>>>4&63,oe[ge++]=It>>>10&63,oe[ge++]=It>>>16&63,oe[ge++]=It>>>22&63,oe[ge++]=63&(It>>>28|(3&_t)<<4),oe[ge++]=_t>>>2&63,oe[ge++]=_t>>>8&63,oe[ge++]=_t>>>14&63,oe[ge++]=_t>>>20&63,oe[ge]=_t>>>26&63})(M,h,b,D);case 7:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0;oe[ge++]=Ue>>>0&127,oe[ge++]=Ue>>>7&127,oe[ge++]=Ue>>>14&127,oe[ge++]=Ue>>>21&127,oe[ge++]=127&(Ue>>>28|(7&je)<<4),oe[ge++]=je>>>3&127,oe[ge++]=je>>>10&127,oe[ge++]=je>>>17&127,oe[ge++]=je>>>24&127,oe[ge++]=127&(je>>>31|(63&vt)<<1),oe[ge++]=vt>>>6&127,oe[ge++]=vt>>>13&127,oe[ge++]=vt>>>20&127,oe[ge++]=127&(vt>>>27|(3>)<<5),oe[ge++]=gt>>>2&127,oe[ge++]=gt>>>9&127,oe[ge++]=gt>>>16&127,oe[ge++]=gt>>>23&127,oe[ge++]=127&(gt>>>30|(31&It)<<2),oe[ge++]=It>>>5&127,oe[ge++]=It>>>12&127,oe[ge++]=It>>>19&127,oe[ge++]=127&(It>>>26|(1&_t)<<6),oe[ge++]=_t>>>1&127,oe[ge++]=_t>>>8&127,oe[ge++]=_t>>>15&127,oe[ge++]=_t>>>22&127,oe[ge++]=127&(_t>>>29|(15&qt)<<3),oe[ge++]=qt>>>4&127,oe[ge++]=qt>>>11&127,oe[ge++]=qt>>>18&127,oe[ge]=qt>>>25&127})(M,h,b,D);case 8:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0;oe[ge++]=Ue>>>0&255,oe[ge++]=Ue>>>8&255,oe[ge++]=Ue>>>16&255,oe[ge++]=Ue>>>24&255,oe[ge++]=je>>>0&255,oe[ge++]=je>>>8&255,oe[ge++]=je>>>16&255,oe[ge++]=je>>>24&255,oe[ge++]=vt>>>0&255,oe[ge++]=vt>>>8&255,oe[ge++]=vt>>>16&255,oe[ge++]=vt>>>24&255,oe[ge++]=gt>>>0&255,oe[ge++]=gt>>>8&255,oe[ge++]=gt>>>16&255,oe[ge++]=gt>>>24&255,oe[ge++]=It>>>0&255,oe[ge++]=It>>>8&255,oe[ge++]=It>>>16&255,oe[ge++]=It>>>24&255,oe[ge++]=_t>>>0&255,oe[ge++]=_t>>>8&255,oe[ge++]=_t>>>16&255,oe[ge++]=_t>>>24&255,oe[ge++]=qt>>>0&255,oe[ge++]=qt>>>8&255,oe[ge++]=qt>>>16&255,oe[ge++]=qt>>>24&255,oe[ge++]=tr>>>0&255,oe[ge++]=tr>>>8&255,oe[ge++]=tr>>>16&255,oe[ge]=tr>>>24&255})(M,h,b,D);case 9:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0;oe[ge++]=Ue>>>0&511,oe[ge++]=Ue>>>9&511,oe[ge++]=Ue>>>18&511,oe[ge++]=511&(Ue>>>27|(15&je)<<5),oe[ge++]=je>>>4&511,oe[ge++]=je>>>13&511,oe[ge++]=je>>>22&511,oe[ge++]=511&(je>>>31|(255&vt)<<1),oe[ge++]=vt>>>8&511,oe[ge++]=vt>>>17&511,oe[ge++]=511&(vt>>>26|(7>)<<6),oe[ge++]=gt>>>3&511,oe[ge++]=gt>>>12&511,oe[ge++]=gt>>>21&511,oe[ge++]=511&(gt>>>30|(127&It)<<2),oe[ge++]=It>>>7&511,oe[ge++]=It>>>16&511,oe[ge++]=511&(It>>>25|(3&_t)<<7),oe[ge++]=_t>>>2&511,oe[ge++]=_t>>>11&511,oe[ge++]=_t>>>20&511,oe[ge++]=511&(_t>>>29|(63&qt)<<3),oe[ge++]=qt>>>6&511,oe[ge++]=qt>>>15&511,oe[ge++]=511&(qt>>>24|(1&tr)<<8),oe[ge++]=tr>>>1&511,oe[ge++]=tr>>>10&511,oe[ge++]=tr>>>19&511,oe[ge++]=511&(tr>>>28|(31&lr)<<4),oe[ge++]=lr>>>5&511,oe[ge++]=lr>>>14&511,oe[ge]=lr>>>23&511})(M,h,b,D);case 10:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0;oe[ge++]=Ue>>>0&1023,oe[ge++]=Ue>>>10&1023,oe[ge++]=Ue>>>20&1023,oe[ge++]=1023&(Ue>>>30|(255&je)<<2),oe[ge++]=je>>>8&1023,oe[ge++]=je>>>18&1023,oe[ge++]=1023&(je>>>28|(63&vt)<<4),oe[ge++]=vt>>>6&1023,oe[ge++]=vt>>>16&1023,oe[ge++]=1023&(vt>>>26|(15>)<<6),oe[ge++]=gt>>>4&1023,oe[ge++]=gt>>>14&1023,oe[ge++]=1023&(gt>>>24|(3&It)<<8),oe[ge++]=It>>>2&1023,oe[ge++]=It>>>12&1023,oe[ge++]=It>>>22&1023,oe[ge++]=_t>>>0&1023,oe[ge++]=_t>>>10&1023,oe[ge++]=_t>>>20&1023,oe[ge++]=1023&(_t>>>30|(255&qt)<<2),oe[ge++]=qt>>>8&1023,oe[ge++]=qt>>>18&1023,oe[ge++]=1023&(qt>>>28|(63&tr)<<4),oe[ge++]=tr>>>6&1023,oe[ge++]=tr>>>16&1023,oe[ge++]=1023&(tr>>>26|(15&lr)<<6),oe[ge++]=lr>>>4&1023,oe[ge++]=lr>>>14&1023,oe[ge++]=1023&(lr>>>24|(3&qr)<<8),oe[ge++]=qr>>>2&1023,oe[ge++]=qr>>>12&1023,oe[ge]=qr>>>22&1023})(M,h,b,D);case 11:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0;oe[ge++]=Ue>>>0&2047,oe[ge++]=Ue>>>11&2047,oe[ge++]=2047&(Ue>>>22|(1&je)<<10),oe[ge++]=je>>>1&2047,oe[ge++]=je>>>12&2047,oe[ge++]=2047&(je>>>23|(3&vt)<<9),oe[ge++]=vt>>>2&2047,oe[ge++]=vt>>>13&2047,oe[ge++]=2047&(vt>>>24|(7>)<<8),oe[ge++]=gt>>>3&2047,oe[ge++]=gt>>>14&2047,oe[ge++]=2047&(gt>>>25|(15&It)<<7),oe[ge++]=It>>>4&2047,oe[ge++]=It>>>15&2047,oe[ge++]=2047&(It>>>26|(31&_t)<<6),oe[ge++]=_t>>>5&2047,oe[ge++]=_t>>>16&2047,oe[ge++]=2047&(_t>>>27|(63&qt)<<5),oe[ge++]=qt>>>6&2047,oe[ge++]=qt>>>17&2047,oe[ge++]=2047&(qt>>>28|(127&tr)<<4),oe[ge++]=tr>>>7&2047,oe[ge++]=tr>>>18&2047,oe[ge++]=2047&(tr>>>29|(255&lr)<<3),oe[ge++]=lr>>>8&2047,oe[ge++]=lr>>>19&2047,oe[ge++]=2047&(lr>>>30|(511&qr)<<2),oe[ge++]=qr>>>9&2047,oe[ge++]=qr>>>20&2047,oe[ge++]=2047&(qr>>>31|(1023&jr)<<1),oe[ge++]=jr>>>10&2047,oe[ge]=jr>>>21&2047})(M,h,b,D);case 12:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0,_n=Q[he+11]>>>0;oe[ge++]=Ue>>>0&4095,oe[ge++]=Ue>>>12&4095,oe[ge++]=4095&(Ue>>>24|(15&je)<<8),oe[ge++]=je>>>4&4095,oe[ge++]=je>>>16&4095,oe[ge++]=4095&(je>>>28|(255&vt)<<4),oe[ge++]=vt>>>8&4095,oe[ge++]=vt>>>20&4095,oe[ge++]=gt>>>0&4095,oe[ge++]=gt>>>12&4095,oe[ge++]=4095&(gt>>>24|(15&It)<<8),oe[ge++]=It>>>4&4095,oe[ge++]=It>>>16&4095,oe[ge++]=4095&(It>>>28|(255&_t)<<4),oe[ge++]=_t>>>8&4095,oe[ge++]=_t>>>20&4095,oe[ge++]=qt>>>0&4095,oe[ge++]=qt>>>12&4095,oe[ge++]=4095&(qt>>>24|(15&tr)<<8),oe[ge++]=tr>>>4&4095,oe[ge++]=tr>>>16&4095,oe[ge++]=4095&(tr>>>28|(255&lr)<<4),oe[ge++]=lr>>>8&4095,oe[ge++]=lr>>>20&4095,oe[ge++]=qr>>>0&4095,oe[ge++]=qr>>>12&4095,oe[ge++]=4095&(qr>>>24|(15&jr)<<8),oe[ge++]=jr>>>4&4095,oe[ge++]=jr>>>16&4095,oe[ge++]=4095&(jr>>>28|(255&_n)<<4),oe[ge++]=_n>>>8&4095,oe[ge]=_n>>>20&4095})(M,h,b,D);case 16:return void(function(Q,he,oe,ke){let ge=ke,Ue=Q[he]>>>0,je=Q[he+1]>>>0,vt=Q[he+2]>>>0,gt=Q[he+3]>>>0,It=Q[he+4]>>>0,_t=Q[he+5]>>>0,qt=Q[he+6]>>>0,tr=Q[he+7]>>>0,lr=Q[he+8]>>>0,qr=Q[he+9]>>>0,jr=Q[he+10]>>>0,_n=Q[he+11]>>>0,fn=Q[he+12]>>>0,Dn=Q[he+13]>>>0,Hn=Q[he+14]>>>0,Ln=Q[he+15]>>>0;oe[ge++]=Ue>>>0&65535,oe[ge++]=Ue>>>16&65535,oe[ge++]=je>>>0&65535,oe[ge++]=je>>>16&65535,oe[ge++]=vt>>>0&65535,oe[ge++]=vt>>>16&65535,oe[ge++]=gt>>>0&65535,oe[ge++]=gt>>>16&65535,oe[ge++]=It>>>0&65535,oe[ge++]=It>>>16&65535,oe[ge++]=_t>>>0&65535,oe[ge++]=_t>>>16&65535,oe[ge++]=qt>>>0&65535,oe[ge++]=qt>>>16&65535,oe[ge++]=tr>>>0&65535,oe[ge++]=tr>>>16&65535,oe[ge++]=lr>>>0&65535,oe[ge++]=lr>>>16&65535,oe[ge++]=qr>>>0&65535,oe[ge++]=qr>>>16&65535,oe[ge++]=jr>>>0&65535,oe[ge++]=jr>>>16&65535,oe[ge++]=_n>>>0&65535,oe[ge++]=_n>>>16&65535,oe[ge++]=fn>>>0&65535,oe[ge++]=fn>>>16&65535,oe[ge++]=Dn>>>0&65535,oe[ge++]=Dn>>>16&65535,oe[ge++]=Hn>>>0&65535,oe[ge++]=Hn>>>16&65535,oe[ge++]=Ln>>>0&65535,oe[ge]=Ln>>>16&65535})(M,h,b,D);case 32:for(let Q=0;Q<32;Q=Q+1|0)b[D+Q|0]=0|M[h+Q|0];return}let G=AI[z]>>>0,X=h,Z=0,re=M[X]>>>0;for(let Q=0;Q<32;Q++)if(Z+z<=32)b[D+Q]=re>>>Z&G,Z+=z,Z===32&&(Z=0,X++,Q!==31&&(re=M[X]>>>0));else{let he=32-Z,oe=re>>>Z;X++,re=M[X]>>>0,b[D+Q]=(oe|(re&AI[z-he]>>>0)<=64)throw new Error("Varint too long")}return h.set(z),b}function Pit(M,h){let b,D;return D=M[h.get()],h.increment(),b=127&D,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<7,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<14,D<128?b:(D=M[h.get()],h.increment(),b|=(127&D)<<21,D<128?b:(D=M[h.get()],b|=(15&D)<<28,(function(z,G,X){let Z,re;if(re=G[X.get()],X.increment(),Z=(112&re)>>4,re<128||(re=G[X.get()],X.increment(),Z|=(127&re)<<3,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<10,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<17,re<128)||(re=G[X.get()],X.increment(),Z|=(127&re)<<24,re<128)||(re=G[X.get()],X.increment(),Z|=(1&re)<<31,re<128))return 4294967296*Z+(z>>>0);throw new Error("Expected varint not more than 10 bytes")})(b,M,h)))))}function Fs(M){return M>>>1^-(1&M)}function Zh(M){return M>>BigInt(1)^-(BigInt(1)&M)}function J_(M){return M%2==1?(M+1)/-2:M/2}function EI(M,h,b){if(b===void 0){b=0;for(let G=0;G=4)for(;D=4)for(;D=4)for(let D=M[0];b>4],Z=null;switch(X){case Of.DATA:Z={dictionaryType:Object.values(Hv)[15&G]};break;case Of.OFFSET:Z={offsetType:Object.values(ax)[15&G]};break;case Of.LENGTH:Z={lengthType:Object.values(Xd)[15&G]}}z.increment();let re=D[z.get()],Q=Object.values(To)[re>>5],he=Object.values(To)[re>>2&7],oe=Object.values(Zg)[3&re];z.increment();let ke=xh(D,z,2),ge=ke[0];return{physicalStreamType:X,logicalStreamType:Z,logicalLevelTechnique1:Q,logicalLevelTechnique2:he,physicalLevelTechnique:oe,numValues:ge,byteLength:ke[1],decompressedCount:ge}})(M,h);return b.logicalLevelTechnique1===To.MORTON?(function(D,z,G){let X=xh(z,G,2);return{physicalStreamType:D.physicalStreamType,logicalStreamType:D.logicalStreamType,logicalLevelTechnique1:D.logicalLevelTechnique1,logicalLevelTechnique2:D.logicalLevelTechnique2,physicalLevelTechnique:D.physicalLevelTechnique,numValues:D.numValues,byteLength:D.byteLength,decompressedCount:D.decompressedCount,numBits:X[0],coordinateShift:X[1]}})(b,M,h):To.RLE!==b.logicalLevelTechnique1&&To.RLE!==b.logicalLevelTechnique2||Zg.NONE===b.physicalLevelTechnique?b:(function(D,z,G){let X=xh(z,G,2);return{physicalStreamType:D.physicalStreamType,logicalStreamType:D.logicalStreamType,logicalLevelTechnique1:D.logicalLevelTechnique1,logicalLevelTechnique2:D.logicalLevelTechnique2,physicalLevelTechnique:D.physicalLevelTechnique,numValues:D.numValues,byteLength:D.byteLength,decompressedCount:X[1],runs:X[0],numRleValues:X[1]}})(b,M,h)}(function(M){M.PRESENT="PRESENT",M.DATA="DATA",M.OFFSET="OFFSET",M.LENGTH="LENGTH"})(Of||(Of={})),(function(M){M.NONE="NONE",M.SINGLE="SINGLE",M.SHARED="SHARED",M.VERTEX="VERTEX",M.MORTON="MORTON",M.FSST="FSST"})(Hv||(Hv={})),(function(M){M.VERTEX="VERTEX",M.INDEX="INDEX",M.STRING="STRING",M.KEY="KEY"})(ax||(ax={})),(function(M){M.VAR_BINARY="VAR_BINARY",M.GEOMETRIES="GEOMETRIES",M.PARTS="PARTS",M.RINGS="RINGS",M.TRIANGLES="TRIANGLES",M.SYMBOL="SYMBOL",M.DICTIONARY="DICTIONARY"})(Xd||(Xd={})),(function(M){M[M.FLAT=0]="FLAT",M[M.CONST=1]="CONST",M[M.SEQUENCE=2]="SEQUENCE",M[M.DICTIONARY=3]="DICTIONARY",M[M.FSST_DICTIONARY=4]="FSST_DICTIONARY"})(Ml||(Ml={}));class jv{constructor(h,b){this.values=h,this._size=b}get(h){let b=Math.floor(h/8);return(this.values[b]>>h%8&1)==1}set(h,b){let D=Math.floor(h/8);this.values[D]=this.values[D]|(b?1:0)<>h%8&1}size(){return this._size}getBuffer(){return this.values}}function Q_(M,h,b){if(!h)return M;let D=h.size(),z=new M.constructor(D),G=0;for(let X=0;X=4)for(;ge>>0;for(let ke=1;ke>>0;return oe})(X.logicalLevelTechnique2===To.RLE?EI(G,X.runs,X.numRleValues):G);break;case To.RLE:Q=EI(G,X.runs,X.numRleValues);break;case To.MORTON:CI(G),Q=G;break;case To.COMPONENTWISE_DELTA:Q=(function(he){if(he.length<2)return new Uint32Array(he);let oe=new Uint32Array(he.length);oe[0]=Fs(he[0])>>>0,oe[1]=Fs(he[1])>>>0;for(let ke=2;ke>>0,oe[ke+1]=oe[ke-1]+Fs(he[ke+1])>>>0;return oe})(G);break;case To.NONE:Q=G;break;default:throw new Error(`The specified Logical level technique is not supported: ${X.logicalLevelTechnique1}`)}return re?Q_(Q,re,0):Q})(eb(M,h,b),b,0,z)}function Kg(M,h,b){return(function(D,z){if(z.logicalLevelTechnique1===To.DELTA&&z.logicalLevelTechnique2===To.NONE)return(function(G){let X=new Int32Array(G.length+1);X[0]=0,X[1]=Fs(G[0]);let Z=X[1];for(let re=2;re!==X.length;++re)Z+=Fs(G[re-1]),X[re]=X[re-1]+Z;return new Uint32Array(X)})(D);if(z.logicalLevelTechnique1===To.RLE&&z.logicalLevelTechnique2===To.NONE)return(function(G,X,Z){let re=new Uint32Array(Z+1);re[0]=0;let Q=1,he=re[0];for(let oe=0;oe>>2,je=(function(gt,It){if(It<=gt.encodedWords.length)return gt.encodedWords;let _t=new Uint32Array(Math.max(16,2*It));return gt.encodedWords=_t,_t})(ke,Ue);(function(gt,It,_t,qt){if(It<0||_t<0||It+_t>gt.length)throw new RangeError(`decodeBigEndianInt32sInto: out of bounds (offset=${It}, byteLength=${_t}, bytes.length=${gt.length})`);let tr=Math.floor(_t/4),lr=_t%4!=0,qr=lr?tr+1:tr;if(qt.length0){let jr=gt.byteOffset+It;if(3&jr)for(let _n=0;_n0){let jr=0|gt[qt];if(qt=qt+1|0,255&jr)throw new Error(`FastPFOR decode: invalid alignedLength=${jr} (expected multiple of 256)`);if(tr+jr>lr.length)throw new Error(`FastPFOR decode: output buffer too small (outPos=${tr}, alignedLength=${jr}, out.length=${lr.length})`);qt=(function(_n,fn,Dn,Hn,Ln,un){let ei=Hn+MI(Ln,U1),ci=Hn,ti=Dn;for(;ci!==ei;){let di=Math.min(SI,ei-ci);ti=kit(_n,fn,ti,ci,di,un),ci=ci+di|0}return ti})(gt,lr,qt,tr,jr,qr),tr=tr+jr|0}return(function(jr,_n,fn,Dn,Hn,Ln){if(Ln===0)return _n;let un=0,ei=_n,ci=_n+fn,ti=Hn,di=Hn,_a=Hn+Ln,Ao=0,us=0;for(;ei>>un&255;if(un+=8,ei+=un>>>5,un&=31,Ao|=(127&ks)<28)throw new Error(`FastPFOR VByte: unterminated value (expected MSB=1 terminator within 5 bytes; shift=${us}, partial=${Ao}, decoded=${di-ti}/${Ln}, inPos=${ei}, inEnd=${ci})`)}if(di!==_a)throw new Error(`FastPFOR VByte: truncated stream (decoded=${di-ti}, expected=${Ln}, consumedWords=${ei-_n}/${fn}, vbyteStart=${_n}, vbyteEnd=${ci})`)})(gt,qt,gt.length-qt|0,lr,tr,It-tr|0),lr})(je.subarray(0,Ue),Q,ke.decoderWorkspace);return oe.add(he),vt})(z,G,X,Z,(function(re=16){if(re<0)throw new RangeError(`initialEncodedWordCapacity must be >= 0, got ${re}`);let Q=Math.max(16,0|re);return{encodedWords:new Uint32Array(Q),decoderWorkspace:kee()}})(X>>>2))})(M,b.numValues,b.byteLength,h);case Zg.VARINT:return xh(M,h,b.numValues);case Zg.NONE:{let z=h.get();h.add(b.byteLength);let G=M.subarray(z,h.get());return new Uint32Array(G)}default:throw new Error(`Specified physicalLevelTechnique ${D} is not supported (yet).`)}}function PI(M,h,b){let D=eb(M,h,b);return D.length===1?D[0]:(function(z){return z[1]})(D)}function Dee(M,h,b){return(function(D){if(D.length===2){let z=Fs(D[1]);return[z,z]}return[Fs(D[2]),Fs(D[3])]})(eb(M,h,b))}function Ree(M,h,b){return(function(D){if(D.length===2){let z=Zh(D[1]);return[z,z]}return[Zh(D[2]),Zh(D[3])]})(K_(M,h,b.numValues))}function Iee(M,h,b,D){return(function(z,G,X){let Z;switch(G.logicalLevelTechnique1){case To.DELTA:Z=(function(re){let Q=new BigUint64Array(re.length);Q[0]=BigInt.asUintN(64,Zh(re[0]));for(let he=1;he>1,h)-b}}function Oee(M,h){let b=0;for(let D=0;D>D;return b}function tb(M,h,b,D,z,G,X){return M===$g.MORTON?(function(Z,re,Q,he,oe,ke){let ge=new Array(oe?he+1:he);for(let Ue=0;Ue[tr])),D+=_t,z+=_t}break;case Ic.LINESTRING:{let _t,qt;vt?(_t=ge[z]-ge[z-1],z++):_t=ke[D]-ke[D-1],D++,je?(qt=rb(gt,Z,_t,!1),Z+=2*_t):(qt=tb(h.vertexBufferType,gt,Ue,re,_t,!1,Q),re+=_t),b[X++]=[qt],oe&&G++}break;case Ic.POLYGON:{let _t=ke[D]-ke[D-1];D++;let qt=new Array(_t-1),tr,lr=ge[z]-ge[z-1];if(z++,je){tr=rb(gt,Z,lr,!0),Z+=2*lr;for(let qr=0;qr0&&je.push(je[0]),ke.push(je)}h[he]=ke,G&&Q++}break;case Ic.MULTIPOLYGON:{let oe=G[Q]-G[Q-1];Q++;let ke=[];for(let ge=0;ge0&>.push(gt[0]),ke.push(gt)}}h[he]=ke}}return h}[Symbol.iterator](){return null}}function Hee(M,h,b,D,z,G){return new Fit(M,h,b,D,z,G)}class Fit extends Gee{constructor(h,b,D,z,G,X){super(D,z,G,X),this._numGeometries=h,this._geometryType=b}geometryType(h){return this._geometryType}get numGeometries(){return this._numGeometries}containsSingleGeometryType(){return!0}}function jee(M,h,b,D,z){return new Dit(M,h,b,D,z)}class Dit extends Gee{constructor(h,b,D,z,G){super(b,D,z,G),this._geometryTypes=h}geometryType(h){return this._geometryTypes[h]}get numGeometries(){return this._geometryTypes.length}containsSingleGeometryType(){return!1}}function Rit(M,h,b,D,z){let G=$h(M,b),X,Z,re,Q;if(US(G,D,M,b)===Ml.CONST){let It=PI(M,b,G),_t,qt,tr,lr;for(let qr=0;qrb?h[G++]:1);return D}function Wee(M,h,b,D){let z=new Uint32Array(h[h.length-1]+1),G=0;z[0]=G;let X=1,Z=0;for(let re=0;re=ke);){let ge=X[Q.increment()];if(ge<=127){let Ue=ge+3,je=X[Q.increment()],vt=Math.min(oe+Ue,Z);he.fill(je,oe,vt),oe=vt}else{let Ue=256-ge;for(let je=0;je=12?qit.decode(M.subarray(h,b)):(function(D,z,G){let X="",Z=z;for(;Z239?4:re>223?3:re>191?2:1;if(Z+ge>G)break;ge===1?re<128&&(ke=re):ge===2?(Q=D[Z+1],(192&Q)==128&&(ke=(31&re)<<6|63&Q,ke<=127&&(ke=null))):ge===3?(Q=D[Z+1],he=D[Z+2],(192&Q)==128&&(192&he)==128&&(ke=(15&re)<<12|(63&Q)<<6|63&he,(ke<=2047||ke>=55296&&ke<=57343)&&(ke=null))):ge===4&&(Q=D[Z+1],he=D[Z+2],oe=D[Z+3],(192&Q)==128&&(192&he)==128&&(192&oe)==128&&(ke=(15&re)<<18|(63&Q)<<12|(63&he)<<6|63&oe,(ke<=65535||ke>=1114112)&&(ke=null))),ke===null?(ke=65533,ge=1):ke>65535&&(ke-=65536,X+=String.fromCharCode(ke>>>10&1023|55296),ke=56320|1023&ke),X+=String.fromCharCode(ke),Z+=ge}return X})(M,h,b)}class II extends $_{constructor(h,b,D,z){super(h,D,z),this.offsetBuffer=b}}class Xee extends II{constructor(h,b,D,z){super(h,b,D,z!=null?z:b.length-1)}getValueFromBuffer(h){return RI(this.dataBuffer,this.offsetBuffer[h],this.offsetBuffer[h+1])}}class nb extends II{constructor(h,b,D,z,G){super(h,D,z,G!=null?G:b.length),this.indexBuffer=b,this.indexBuffer=b}getValueFromBuffer(h){let b=this.indexBuffer[h];return RI(this.dataBuffer,this.offsetBuffer[b],this.offsetBuffer[b+1])}}class Zee extends II{constructor(h,b,D,z,G,X,Z){super(h,D,z,Z),this.indexBuffer=b,this.symbolOffsetBuffer=G,this.symbolTableBuffer=X}getValueFromBuffer(h){this.decodedDictionary==null&&(this.symbolLengthBuffer==null&&(this.symbolLengthBuffer=this.offsetToLengthBuffer(this.symbolOffsetBuffer)),this.decodedDictionary=(function(D,z,G){let X=[],Z=new Array(z.length).fill(0);for(let re=1;re=10}function Jee(M){return M===30}function Oit(M){if(M.type==="scalarType"){let h=M.scalarType;if(h.type==="physicalType")switch(h.physicalType){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:case 8:default:return!1;case 9:return!0}if(h.type==="logicalType")return!1}else if(M.type==="complexType"){let h=M.complexType;if(h.type==="physicalType")switch(h.physicalType){case 0:case 1:return!0;default:return!1}}return console.warn("Unexpected column type in hasStreamCount",M),!1}function Nit(M){var h;return M.type==="complexType"&&((h=M.complexType)==null?void 0:h.type)==="physicalType"&&M.complexType.physicalType===0}let Uit=new TextDecoder;function zI(M,h){let b=xh(M,h,1)[0];if(b===0)return"";let D=h.get(),z=M.subarray(D,D+b);return h.add(b),Uit.decode(z)}function Qee(M,h){let b=xh(M,h,1)[0]>>>0;if(b<10||b>30)throw new Error(`Unsupported field type code ${b}. Supported: 10-29(scalars), 30(STRUCT)`);let D=$ee(b);if(Kee(b)&&(D.name=zI(M,h)),Jee(b)){let z=xh(M,h,1)[0]>>>0;D.complexType.children=new Array(z);for(let G=0;G>>0,D=$ee(b);if(!D)throw new Error(`Unsupported column type code ${b}. Supported: 0-3(ID), 4(GEOMETRY), 10-29(scalars), 30(STRUCT)`);if(Kee(b)?D.name=zI(M,h):b>=0&&b<=3?D.name="id":b===4&&(D.name="geometry"),Jee(b)){let z=xh(M,h,1)[0]>>>0,G=D.complexType;G.children=new Array(z);for(let X=0;X>>0,G=xh(M,h,1)[0]>>>0;D.columns=new Array(G);for(let X=0;X=4)for(;tr>>0,oe=X.get()+he;if(oe>D.length)throw new Error(`Block overruns tile: ${oe} > ${D.length}`);if(xh(D,X,1)[0]>>>0!=1){X.set(oe);continue}let[ke,ge]=Git(D,X),Ue=ke.featureTables[0],je=null,vt=null,gt=[],It=0;for(let qt of Ue.columns){let tr=qt.name;if((re=qt).type==="scalarType"&&((Q=re.scalarType)==null?void 0:Q.type)==="logicalType"&&re.scalarType.logicalType===0){let lr=null;if(qt.nullable){let jr=$h(D,X),_n=X.get(),fn=x4(D,jr.numValues,jr.byteLength,X);X.set(_n+jr.byteLength),lr=new jv(fn,jr.numValues)}let qr=$h(D,X);It=lr?lr.size():qr.decompressedCount,je=Hit(D,qt,X,tr,qr,lr!=null?lr:It,G)}else if(Nit(qt)){let lr=xh(D,X,1)[0];if(It===0){let qr=X.get();It=$h(D,X).decompressedCount,X.set(qr)}vt=Rit(D,lr,X,It)}else{let lr=Oit(qt)?xh(D,X,1)[0]:1;if(lr===0)continue;let qr=Bit(D,X,qt,lr,It);if(qr)if(Array.isArray(qr))for(let jr of qr)gt.push(jr);else gt.push(qr)}}let _t=new wit(Ue.name,vt,je,gt,ge);Z.push(_t),X.set(oe)}var re;return Z})(new Uint8Array(h));this.layers=b.reduce(((D,z)=>Object.assign(Object.assign({},D),{[z.name]:new Wit(z)})),{})}}class Yit{constructor(h,b){this.feature=h,this.type=h.type,this.properties=h.tags?h.tags:{},this.extent=b,"id"in h&&(typeof h.id=="string"?this.id=parseInt(h.id,10):typeof h.id!="number"||isNaN(h.id)||(this.id=h.id))}loadGeometry(){let h=[],b=this.feature.type===1?[this.feature.geometry]:this.feature.geometry;for(let D of b){let z=[];for(let G of D)z.push(new o(G[0],G[1]));h.push(z)}return h}}let b4="_geojsonTileLayer";function Xit(M,h,b=""){h.writeVarintField(15,M.version||1),h.writeStringField(1,M.name||""),h.writeVarintField(5,M.extent||4096);let D={jsonPrefix:b,keys:[],values:[],keycache:{},valuecache:{}};for(let X=0;X>31}function Kit(M,h){let b=M.loadGeometry(),D=M.type,z=0,G=0;for(let X of b){let Z=1;D===1&&(Z=X.length),h.writeVarint(qI(1,Z));let re=D===3?X.length-1:X.length;for(let Q=0;Q=0&&he[3]>=0&&re.insert(Z,he[0],he[1],he[2],he[3])}}loadVTLayers(){return this.vtLayers||(this.vtLayers=this.encoding!=="mlt"?new CQ(new IS(this.rawTileData)).layers:new ete(this.rawTileData).layers,this.sourceLayerCoder=new Aee(this.vtLayers?Object.keys(this.vtLayers).sort():[b4])),this.vtLayers}query(h,b,D,z){this.loadVTLayers();let G=h.params,X=j/h.tileSize/h.scale,Z=cn(G.filter,G.globalState),re=h.queryGeometry,Q=h.queryPadding*X,he=ix.fromPoints(re),oe=this.grid.query(he.minX-Q,he.minY-Q,he.maxX+Q,he.maxY+Q),ke=ix.fromPoints(h.cameraQueryGeometry).expandBy(Q),ge=this.grid3D.query(ke.minX,ke.minY,ke.maxX,ke.maxY,((vt,gt,It,_t)=>(function(qt,tr,lr,qr,jr){for(let fn of qt)if(tr<=fn.x&&lr<=fn.y&&qr>=fn.x&&jr>=fn.y)return!0;let _n=[new o(tr,lr),new o(tr,jr),new o(qr,jr),new o(qr,lr)];if(qt.length>2){for(let fn of _n)if(pn(qt,fn))return!0}for(let fn=0;fn(It||(It=$l(_t)),qt.queryIntersectsFeature({queryGeometry:re,feature:_t,featureState:tr,geometry:It,zoom:this.z,transform:h.transform,pixelsToTileUnits:X,pixelPosMatrix:h.pixelPosMatrix,unwrappedTileID:this.tileID.toUnwrapped(),getElevation:h.getElevation}))))}return Ue}loadMatchingFeature(h,b,D,z,G,X,Z,re,Q,he,oe){let ke=this.bucketLayerIDs[b];if(X&&!ke.some((vt=>X.has(vt))))return;let ge=this.sourceLayerCoder.decode(D),Ue=this.vtLayers[ge].feature(z);if(G.needGeometry){let vt=xa(Ue,!0);if(!G.filter(new mi(this.tileID.overscaledZ),vt,this.tileID.canonical))return}else if(!G.filter(new mi(this.tileID.overscaledZ),Ue))return;let je=this.getId(Ue,ge);for(let vt of ke){if(X&&!X.has(vt))continue;let gt=re[vt];if(!gt)continue;let It={};je&&he&&(It=he.getState(gt.sourceLayer||b4,je));let _t=_e({},Q[vt]);_t.paint=nte(_t.paint,gt.paint,Ue,It,Z),_t.layout=nte(_t.layout,gt.layout,Ue,It,Z);let qt=!oe||oe(Ue,gt,It);if(!qt)continue;let tr=new Mee(Ue,this.z,this.x,this.y,je);tr.layer=_t;let lr=h[vt];lr===void 0&&(lr=h[vt]=[]),lr.push({featureIndex:z,feature:tr,intersectionZ:qt})}}lookupSymbolFeatures(h,b,D,z,G,X,Z,re){let Q={};this.loadVTLayers();let he=cn(G.filterSpec,G.globalState);for(let oe of h)this.loadMatchingFeature(Q,D,z,oe,he,X,Z,re,b);return Q}hasLayer(h){for(let b of this.bucketLayerIDs)for(let D of b)if(h===D)return!0;return!1}getId(h,b){var D;let z=h.id;return this.promoteId&&(z=h.properties[typeof this.promoteId=="string"?this.promoteId:this.promoteId[b]],typeof z=="boolean"&&(z=Number(z)),z===void 0&&(!((D=h.properties)===null||D===void 0)&&D.cluster)&&this.promoteId&&(z=Number(h.properties.cluster_id))),z}}function nte(M,h,b,D,z){return ae(M,((G,X)=>{let Z=h instanceof yc?h.get(X):null;return Z!=null&&Z.evaluate?Z.evaluate(b,D,z):Z}))}function Qit(M,h){return h-M}function ite(M,h,b,D,z){let G=[];for(let X of M){let Z;for(let re=0;re=D&&he.x>=D||(Q.x>=D?Q=new o(D,Q.y+(D-Q.x)/(he.x-Q.x)*(he.y-Q.y))._round():he.x>=D&&(he=new o(D,Q.y+(D-Q.x)/(he.x-Q.x)*(he.y-Q.y))._round()),Q.y>=z&&he.y>=z||(Q.y>=z?Q=new o(Q.x+(z-Q.y)/(he.y-Q.y)*(he.x-Q.x),z)._round():he.y>=z&&(he=new o(Q.x+(z-Q.y)/(he.y-Q.y)*(he.x-Q.x),z)._round()),Z&&Q.equals(Z[Z.length-1])||(Z=[Q],G.push(Z)),Z.push(he)))))}}return G}function ate(M,h,b,D,z){switch(h){case 1:return(function(G,X,Z,re){let Q=[];for(let he of G)for(let oe of he){let ke=re===0?oe.x:oe.y;ke>=X&&ke<=Z&&Q.push([oe])}return Q})(M,b,D,z);case 2:return ote(M,b,D,z,!1);case 3:return ote(M,b,D,z,!0)}return[]}function eat(M,h,b,D,z){let G=D===0?tat:rat,X=[],Z=[];for(let he=0;heh&&X.push(G(oe,ke,h)):ge>b?Ue=h&&(X.push(G(oe,ke,h)),je=!0),Ue>b&&ge<=b&&(X.push(G(oe,ke,b)),je=!0),!z&&je&&(Z.push(X),X=[])}let re=M.length-1,Q=D===0?M[re].x:M[re].y;return Q>=h&&Q<=b&&X.push(M[re]),z&&X.length>0&&!X[0].equals(X[X.length-1])&&X.push(new o(X[0].x,X[0].y)),X.length>0&&Z.push(X),Z}function ote(M,h,b,D,z){let G=[];for(let X of M){let Z=eat(X,h,b,D,z);Z.length>0&&G.push(...Z)}return G}function tat(M,h,b){return new o(b,M.y+(b-M.x)/(h.x-M.x)*(h.y-M.y))}function rat(M,h,b){return new o(M.x+(b-M.y)/(h.y-M.y)*(h.x-M.x),b)}_i("FeatureIndex",rte,{omit:["rawTileData","sourceLayerCoder"]});class Jg extends o{constructor(h,b,D,z){super(h,b),this.angle=D,z!==void 0&&(this.segment=z)}clone(){return new Jg(this.x,this.y,this.angle,this.segment)}}function ste(M,h,b,D,z){if(h.segment===void 0||b===0)return!0;let G=h,X=h.segment+1,Z=0;for(;Z>-b/2;){if(X--,X<0)return!1;Z-=M[X].dist(G),G=M[X]}Z+=M[X].dist(M[X+1]),X++;let re=[],Q=0;for(;ZD;)Q-=re.shift().angleDelta;if(Q>z)return!1;X++,Z+=he.dist(oe)}return!0}function lte(M){let h=0;for(let b=0;bQ){let Ue=(Q-re)/ge,je=Ks.number(oe.x,ke.x,Ue),vt=Ks.number(oe.y,ke.y,Ue),gt=new Jg(je,vt,ke.angleTo(oe),he);return gt._round(),!X||ste(M,gt,Z,X,h)?gt:void 0}re+=ge}}function iat(M,h,b,D,z,G,X,Z,re){let Q=ute(D,G,X),he=cte(D,z),oe=he*X,ke=M[0].x===0||M[0].x===re||M[0].y===0||M[0].y===re;return h-oe=0&&qt=0&&tr=0&&ke+Q<=he){let lr=new Jg(qt,tr,It,Ue);lr._round(),D&&!ste(M,lr,G,D,z)||ge.push(lr)}}oe+=gt}return Z||ge.length||X||(ge=fte(M,oe/2,b,D,z,G,X,!0,re)),ge}function hte(M,h,b,D){let z=[],G=M.image,X=G.pixelRatio,Z=G.paddedRect.w-2,re=G.paddedRect.h-2,Q={x1:M.left,y1:M.top,x2:M.right,y2:M.bottom},he=G.stretchX||[[0,Z]],oe=G.stretchY||[[0,re]],ke=(un,ei)=>un+ei[1]-ei[0],ge=he.reduce(ke,0),Ue=oe.reduce(ke,0),je=Z-ge,vt=re-Ue,gt=0,It=ge,_t=0,qt=Ue,tr=0,lr=je,qr=0,jr=vt;if(G.content&&D){let un=G.content,ei=un[2]-un[0],ci=un[3]-un[1];(G.textFitWidth||G.textFitHeight)&&(Q=lee(M)),gt=VS(he,0,un[0]),_t=VS(oe,0,un[1]),It=VS(he,un[0],un[2]),qt=VS(oe,un[1],un[3]),tr=un[0]-gt,qr=un[1]-_t,lr=ei-It,jr=ci-qt}let _n=Q.x1,fn=Q.y1,Dn=Q.x2-_n,Hn=Q.y2-fn,Ln=(un,ei,ci,ti)=>{let di=GS(un.stretch-gt,It,Dn,_n),_a=HS(un.fixed-tr,lr,un.stretch,ge),Ao=GS(ei.stretch-_t,qt,Hn,fn),us=HS(ei.fixed-qr,jr,ei.stretch,Ue),ks=GS(ci.stretch-gt,It,Dn,_n),Uf=HS(ci.fixed-tr,lr,ci.stretch,ge),Jl=GS(ti.stretch-_t,qt,Hn,fn),_c=HS(ti.fixed-qr,jr,ti.stretch,Ue),zc=new o(di,Ao),Sl=new o(ks,Ao),df=new o(ks,Jl),_h=new o(di,Jl),bh=new o(_a/X,us/X),Ad=new o(Uf/X,_c/X),Vf=h*Math.PI/180;if(Vf){let qc=Math.sin(Vf),Bl=Math.cos(Vf),ec=[Bl,-qc,qc,Bl];zc._matMult(ec),Sl._matMult(ec),_h._matMult(ec),df._matMult(ec)}let Md=un.stretch+un.fixed,Z0=ei.stretch+ei.fixed;return{tl:zc,tr:Sl,bl:_h,br:df,tex:{x:G.paddedRect.x+1+Md,y:G.paddedRect.y+1+Z0,w:ci.stretch+ci.fixed-Md,h:ti.stretch+ti.fixed-Z0},writingMode:void 0,glyphOffset:[0,0],sectionIndex:0,pixelOffsetTL:bh,pixelOffsetBR:Ad,minFontScaleX:lr/X/Dn,minFontScaleY:jr/X/Hn,isSDF:b}};if(D&&(G.stretchX||G.stretchY)){let un=dte(he,je,ge),ei=dte(oe,vt,Ue);for(let ci=0;ci0&&(je=Math.max(10,je),this.circleDiameter=je)}else{let ke=!((oe=X.image)===null||oe===void 0)&&oe.content&&(X.image.textFitWidth||X.image.textFitHeight)?lee(X):{x1:X.left,y1:X.top,x2:X.right,y2:X.bottom};ke.y1=ke.y1*Z-re[0],ke.y2=ke.y2*Z+re[2],ke.x1=ke.x1*Z-re[3],ke.x2=ke.x2*Z+re[1];let ge=X.collisionPadding;if(ge&&(ke.x1-=ge[0]*Z,ke.y1-=ge[1]*Z,ke.x2+=ge[2]*Z,ke.y2+=ge[3]*Z),he){let Ue=new o(ke.x1,ke.y1),je=new o(ke.x2,ke.y1),vt=new o(ke.x1,ke.y2),gt=new o(ke.x2,ke.y2),It=he*Math.PI/180;Ue._rotate(It),je._rotate(It),vt._rotate(It),gt._rotate(It),ke.x1=Math.min(Ue.x,je.x,vt.x,gt.x),ke.x2=Math.max(Ue.x,je.x,vt.x,gt.x),ke.y1=Math.min(Ue.y,je.y,vt.y,gt.y),ke.y2=Math.max(Ue.y,je.y,vt.y,gt.y)}h.emplaceBack(b.x,b.y,ke.x1,ke.y1,ke.x2,ke.y2,D,z,G)}this.boxEndIndex=h.length}}class aat{constructor(h=[],b=(D,z)=>Dz?1:0){if(this.data=h,this.length=this.data.length,this.compare=b,this.length>0)for(let D=(this.length>>1)-1;D>=0;D--)this._down(D)}push(h){this.data.push(h),this._up(this.length++)}pop(){if(this.length===0)return;let h=this.data[0],b=this.data.pop();return--this.length>0&&(this.data[0]=b,this._down(0)),h}peek(){return this.data[0]}_up(h){let{data:b,compare:D}=this,z=b[h];for(;h>0;){let G=h-1>>1,X=b[G];if(D(z,X)>=0)break;b[h]=X,h=G}b[h]=z}_down(h){let{data:b,compare:D}=this,z=this.length>>1,G=b[h];for(;h=0)break;b[h]=b[X],h=X}b[h]=G}}function oat(M,h=1){let b=ix.fromPoints(M[0]),D=Math.min(b.width(),b.height()),z=D/2,G=new aat([],sat),{minX:X,minY:Z,maxX:re,maxY:Q}=b;if(D===0)return new o(X,Z);for(let ke=X;keoe.d||!oe.d)&&(oe=ke),ke.max-oe.d<=h||(z=ke.h/2,G.push(new ib(ke.p.x-z,ke.p.y-z,z,M)),G.push(new ib(ke.p.x+z,ke.p.y-z,z,M)),G.push(new ib(ke.p.x-z,ke.p.y+z,z,M)),G.push(new ib(ke.p.x+z,ke.p.y+z,z,M)))}return he.d>0&&oe.d-he.d<=h?he.p:oe.p}function sat(M,h){return h.max-M.max}class ib{constructor(h,b,D,z){this.p=new o(h,b),this.h=D,this.d=(function(G,X){let Z=!1,re=1/0;for(let Q of X)for(let he=0,oe=Q.length,ke=oe-1;heG.y!=Ue.y>G.y&&G.x<(Ue.x-ge.x)*(G.y-ge.y)/(Ue.y-ge.y)+ge.x&&(Z=!Z),re=Math.min(re,gr(G,ge,Ue))}return(Z?1:-1)*Math.sqrt(re)})(this.p,z),this.max=this.d+this.h*Math.SQRT2}}var Nf;a.aM=void 0,(Nf=a.aM||(a.aM={}))[Nf.center=1]="center",Nf[Nf.left=2]="left",Nf[Nf.right=3]="right",Nf[Nf.top=4]="top",Nf[Nf.bottom=5]="bottom",Nf[Nf["top-left"]=6]="top-left",Nf[Nf["top-right"]=7]="top-right",Nf[Nf["bottom-left"]=8]="bottom-left",Nf[Nf["bottom-right"]=9]="bottom-right";let BI=Number.POSITIVE_INFINITY;function vte(M,h){return h[1]!==BI?(function(b,D,z){let G=0,X=0;switch(D=Math.abs(D),z=Math.abs(z),b){case"top-right":case"top-left":case"top":X=z-7;break;case"bottom-right":case"bottom-left":case"bottom":X=7-z}switch(b){case"top-right":case"bottom-right":case"right":G=-D;break;case"top-left":case"bottom-left":case"left":G=D}return[G,X]})(M,h[0],h[1]):(function(b,D){let z=0,G=0;D<0&&(D=0);let X=D/Math.SQRT2;switch(b){case"top-right":case"top-left":G=X-7;break;case"bottom-right":case"bottom-left":G=7-X;break;case"bottom":G=7-D;break;case"top":G=D-7}switch(b){case"top-right":case"bottom-right":z=-X;break;case"top-left":case"bottom-left":z=X;break;case"left":z=D;break;case"right":z=-D}return[z,G]})(M,h[0])}function pte(M,h,b){var D;let z=M.layout,G=(D=z.get("text-variable-anchor-offset"))===null||D===void 0?void 0:D.evaluate(h,{},b);if(G){let Z=G.values,re=[];for(let Q=0;Qke*Rc));he.startsWith("top")?oe[1]-=7:he.startsWith("bottom")&&(oe[1]+=7),re[Q+1]=oe}return new yo(re)}let X=z.get("text-variable-anchor");if(X){let Z;Z=M._unevaluatedLayout.getValue("text-radial-offset")!==void 0?[z.get("text-radial-offset").evaluate(h,{},b)*Rc,BI]:z.get("text-offset").evaluate(h,{},b).map((Q=>Q*Rc));let re=[];for(let Q of X)re.push(Q,vte(Q,Z));return new yo(re)}return null}function OI(M){switch(M){case"right":case"top-right":case"bottom-right":return"right";case"left":case"top-left":case"bottom-left":return"left"}return"center"}function lat(M,h,b,D,z,G,X,Z,re,Q,he,oe){let ke=G.textMaxSize.evaluate(h,{});ke===void 0&&(ke=X);let ge=M.layers[0].layout,Ue=ge.get("icon-offset").evaluate(h,{},he),je=mte(b.horizontal),vt=X/24,gt=M.tilePixelRatio*vt,It=M.tilePixelRatio*ke/24,_t=M.tilePixelRatio*Z,qt=M.tilePixelRatio*ge.get("symbol-spacing"),tr=ge.get("text-padding")*M.tilePixelRatio,lr=(function(ci,ti,di,_a=1){let Ao=ci.get("icon-padding").evaluate(ti,{},di),us=Ao==null?void 0:Ao.values;return[us[0]*_a,us[1]*_a,us[2]*_a,us[3]*_a]})(ge,h,he,M.tilePixelRatio),qr=ge.get("text-max-angle")/180*Math.PI,jr=ge.get("text-rotation-alignment")!=="viewport"&&ge.get("symbol-placement")!=="point",_n=ge.get("icon-rotation-alignment")==="map"&&ge.get("symbol-placement")!=="point",fn=ge.get("symbol-placement"),Dn=qt/2,Hn=ge.get("icon-text-fit"),Ln;D&&Hn!=="none"&&(M.allowVerticalPlacement&&b.vertical&&(Ln=uee(D,b.vertical,Hn,ge.get("icon-text-fit-padding"),Ue,vt)),je&&(D=uee(D,je,Hn,ge.get("icon-text-fit-padding"),Ue,vt)));let un=he?oe.line.getGranularityForZoomLevel(he.z):1,ei=(ci,ti)=>{ti.x<0||ti.x>=j||ti.y<0||ti.y>=j||(function(di,_a,Ao,us,ks,Uf,Jl,_c,zc,Sl,df,_h,bh,Ad,Vf,Md,Z0,qc,Bl,ec,Ql,Bc,V1,Wv,w4){let Qg=di.addToLineVertexArray(_a,Ao),ox,ab,ob,sb,yte=0,xte=0,_te=0,bte=0,NI=-1,UI=-1,G1={},wte=si("");if(di.allowVerticalPlacement&&us.vertical){let wh=_c.layout.get("text-rotate").evaluate(Ql,{},Wv)+90;ob=new jS(zc,_a,Sl,df,_h,us.vertical,bh,Ad,Vf,wh),Jl&&(sb=new jS(zc,_a,Sl,df,_h,Jl,Z0,qc,Vf,wh))}if(ks){let wh=_c.layout.get("icon-rotate").evaluate(Ql,{}),_0=_c.layout.get("icon-text-fit")!=="none",sx=hte(ks,wh,V1,_0),Xv=Jl?hte(Jl,wh,V1,_0):void 0;ab=new jS(zc,_a,Sl,df,_h,ks,Z0,qc,!1,wh),yte=4*sx.length;let lx=di.iconSizeData,Ip=null;lx.kind==="source"?(Ip=[N1*_c.layout.get("icon-size").evaluate(Ql,{})],Ip[0]>Yg&&me(`${di.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)):lx.kind==="composite"&&(Ip=[N1*Bc.compositeIconSizes[0].evaluate(Ql,{},Wv),N1*Bc.compositeIconSizes[1].evaluate(Ql,{},Wv)],(Ip[0]>Yg||Ip[1]>Yg)&&me(`${di.layerIds[0]}: Value for "icon-size" is >= 255. Reduce your "icon-size".`)),di.addSymbols(di.icon,sx,Ip,ec,Bl,Ql,a.ax.none,_a,Qg.lineStartIndex,Qg.lineLength,-1,Wv),NI=di.icon.placedSymbolArray.length-1,Xv&&(xte=4*Xv.length,di.addSymbols(di.icon,Xv,Ip,ec,Bl,Ql,a.ax.vertical,_a,Qg.lineStartIndex,Qg.lineLength,-1,Wv),UI=di.icon.placedSymbolArray.length-1)}let Tte=Object.keys(us.horizontal);for(let wh of Tte){let _0=us.horizontal[wh];if(!ox){wte=si(_0.text);let Xv=_c.layout.get("text-rotate").evaluate(Ql,{},Wv);ox=new jS(zc,_a,Sl,df,_h,_0,bh,Ad,Vf,Xv)}let sx=_0.positionedLines.length===1;if(_te+=gte(di,_a,_0,Uf,_c,Vf,Ql,Md,Qg,us.vertical?a.ax.horizontal:a.ax.horizontalOnly,sx?Tte:[wh],G1,NI,Bc,Wv),sx)break}us.vertical&&(bte+=gte(di,_a,us.vertical,Uf,_c,Vf,Ql,Md,Qg,a.ax.vertical,["vertical"],G1,UI,Bc,Wv));let cat=ox?ox.boxStartIndex:di.collisionBoxArray.length,fat=ox?ox.boxEndIndex:di.collisionBoxArray.length,hat=ob?ob.boxStartIndex:di.collisionBoxArray.length,dat=ob?ob.boxEndIndex:di.collisionBoxArray.length,vat=ab?ab.boxStartIndex:di.collisionBoxArray.length,pat=ab?ab.boxEndIndex:di.collisionBoxArray.length,gat=sb?sb.boxStartIndex:di.collisionBoxArray.length,mat=sb?sb.boxEndIndex:di.collisionBoxArray.length,Yv=-1,WS=(wh,_0)=>wh!=null&&wh.circleDiameter?Math.max(wh.circleDiameter,_0):_0;Yv=WS(ox,Yv),Yv=WS(ob,Yv),Yv=WS(ab,Yv),Yv=WS(sb,Yv);let Ate=Yv>-1?1:0;Ate&&(Yv*=w4/Rc),di.glyphOffsetArray.length>=X_.MAX_GLYPHS&&me("Too many glyphs being rendered in a tile. See https://github.com/mapbox/mapbox-gl-js/issues/2907"),Ql.sortKey!==void 0&&di.addToSortKeyRanges(di.symbolInstances.length,Ql.sortKey);let yat=pte(_c,Ql,Wv),[xat,_at]=(function(wh,_0){let sx=wh.length,Xv=_0==null?void 0:_0.values;if((Xv==null?void 0:Xv.length)>0)for(let lx=0;lx=0?G1.right:-1,G1.center>=0?G1.center:-1,G1.left>=0?G1.left:-1,G1.vertical||-1,NI,UI,wte,cat,fat,hat,dat,vat,pat,gat,mat,Sl,_te,bte,yte,xte,Ate,0,bh,Yv,xat,_at)})(M,ti,ci,b,D,z,Ln,M.layers[0],M.collisionBoxArray,h.index,h.sourceLayerIndex,M.index,gt,[tr,tr,tr,tr],jr,re,_t,lr,_n,Ue,h,G,Q,he,X)};if(fn==="line")for(let ci of ite(h.geometry,0,0,j,j)){let ti=nx(ci,un),di=iat(ti,qt,qr,b.vertical||je,D,24,It,M.overscaling,j);for(let _a of di)je&&uat(M,je.text,Dn,_a)||ei(ti,_a)}else if(fn==="line-center"){for(let ci of h.geometry)if(ci.length>1){let ti=nx(ci,un),di=nat(ti,qr,b.vertical||je,D,24,It);di&&ei(ti,di)}}else if(h.type==="Polygon")for(let ci of uh(h.geometry,0)){let ti=oat(ci,16);ei(nx(ci[0],un,!0),new Jg(ti.x,ti.y,0))}else if(h.type==="LineString")for(let ci of h.geometry){let ti=nx(ci,un);ei(ti,new Jg(ti[0].x,ti[0].y,0))}else if(h.type==="Point")for(let ci of h.geometry)for(let ti of ci)ei([ti],new Jg(ti.x,ti.y,0))}function gte(M,h,b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue){let je=(function(It,_t,qt,tr,lr,qr,jr,_n){let fn=tr.layout.get("text-rotate").evaluate(qr,{})*Math.PI/180,Dn=[];for(let Hn of _t.positionedLines)for(let Ln of Hn.positionedGlyphs){if(!Ln.rect)continue;let un=Ln.rect||{},ei=4,ci=!0,ti=1,di=0,_a=(lr||_n)&&Ln.vertical,Ao=Ln.metrics.advance*Ln.scale/2;if(_n&&_t.verticalizable&&(di=Hn.lineOffset/2-(Ln.imageName?-(Rc-Ln.metrics.width*Ln.scale)/2:(Ln.scale-1)*Rc)),Ln.imageName){let qc=jr[Ln.imageName];ci=qc.sdf,ti=qc.pixelRatio,ei=1/ti}let us=lr?[Ln.x+Ao,Ln.y]:[0,0],ks=lr?[0,0]:[Ln.x+Ao+qt[0],Ln.y+qt[1]-di],Uf=[0,0];_a&&(Uf=ks,ks=[0,0]);let Jl=Ln.metrics.isDoubleResolution?2:1,_c=(Ln.metrics.left-ei)*Ln.scale-Ao+ks[0],zc=(-Ln.metrics.top-ei)*Ln.scale+ks[1],Sl=_c+un.w/Jl*Ln.scale/ti,df=zc+un.h/Jl*Ln.scale/ti,_h=new o(_c,zc),bh=new o(Sl,zc),Ad=new o(_c,df),Vf=new o(Sl,df);if(_a){let qc=new o(-Ao,Ao- -17),Bl=-Math.PI/2,ec=12-Ao,Ql=new o(22-ec,-(Ln.imageName?ec:0)),Bc=new o(...Uf);_h._rotateAround(Bl,qc)._add(Ql)._add(Bc),bh._rotateAround(Bl,qc)._add(Ql)._add(Bc),Ad._rotateAround(Bl,qc)._add(Ql)._add(Bc),Vf._rotateAround(Bl,qc)._add(Ql)._add(Bc)}if(fn){let qc=Math.sin(fn),Bl=Math.cos(fn),ec=[Bl,-qc,qc,Bl];_h._matMult(ec),bh._matMult(ec),Ad._matMult(ec),Vf._matMult(ec)}let Md=new o(0,0),Z0=new o(0,0);Dn.push({tl:_h,tr:bh,bl:Ad,br:Vf,tex:un,writingMode:_t.writingMode,glyphOffset:us,sectionIndex:Ln.sectionIndex,isSDF:ci,pixelOffsetTL:Md,pixelOffsetBR:Z0,minFontScaleX:0,minFontScaleY:0})}return Dn})(0,b,Z,z,G,X,D,M.allowVerticalPlacement),vt=M.textSizeData,gt=null;vt.kind==="source"?(gt=[N1*z.layout.get("text-size").evaluate(X,{})],gt[0]>Yg&&me(`${M.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)):vt.kind==="composite"&&(gt=[N1*ge.compositeTextSizes[0].evaluate(X,{},Ue),N1*ge.compositeTextSizes[1].evaluate(X,{},Ue)],(gt[0]>Yg||gt[1]>Yg)&&me(`${M.layerIds[0]}: Value for "text-size" is >= 255. Reduce your "text-size".`)),M.addSymbols(M.text,je,gt,Z,G,X,Q,h,re.lineStartIndex,re.lineLength,ke,Ue);for(let It of he)oe[It]=M.text.placedSymbolArray.length-1;return 4*je.length}function mte(M){for(let h in M)return M[h];return null}function uat(M,h,b,D){let z=M.compareText;if(h in z){let G=z[h];for(let X=G.length-1;X>=0;X--)if(D.dist(G[X])this.process())),this.subscription=et(this.target,"message",(b=>this.receive(b)),!1),this.globalScope=De(self)?M:window}registerMessageHandler(M,h){this.messageHandlers[M]=h}unregisterMessageHandler(M){delete this.messageHandlers[M]}sendAsync(M,h){return new Promise(((b,D)=>{let z=Math.round(1e18*Math.random()).toString(36).substring(0,10),G=h?et(h.signal,"abort",(()=>{G==null||G.unsubscribe(),delete this.resolveRejects[z];let re={id:z,type:"",origin:location.origin,targetMapId:M.targetMapId,sourceMapId:this.mapId};this.target.postMessage(re)}),bit):null;this.resolveRejects[z]={resolve:re=>{G==null||G.unsubscribe(),b(re)},reject:re=>{G==null||G.unsubscribe(),D(re)}};let X=[],Z=Object.assign(Object.assign({},M),{id:z,sourceMapId:this.mapId,origin:location.origin,data:Be(M.data,X)});this.target.postMessage(Z,{transfer:X})}))}receive(M){let h=M.data,b=h.id,D=["file://","resource://android","null"],z=[h.origin,location.origin],G=h.origin===location.origin,X=z.some((Z=>D.includes(Z)));if((G||X)&&(!h.targetMapId||this.mapId===h.targetMapId)){if(h.type===""){delete this.tasks[b];let Z=this.abortControllers[b];return delete this.abortControllers[b],void(Z&&Z.abort())}if(De(self)||h.mustQueue)return this.tasks[b]=h,this.taskQueue.push(b),void this.invoker.trigger();this.processTask(b,h)}}process(){if(this.taskQueue.length===0)return;let M=this.taskQueue.shift(),h=this.tasks[M];delete this.tasks[M],this.taskQueue.length>0&&this.invoker.trigger(),h&&this.processTask(M,h)}processTask(M,h){return i(this,void 0,void 0,(function*(){if(h.type===""){let z=this.resolveRejects[M];return delete this.resolveRejects[M],z?void(h.error?z.reject(U(Ne(h.error))):z.resolve(Ne(h.data))):void 0}if(!this.messageHandlers[h.type])return void this.completeTask(M,new Error(`Could not find a registered handler for ${h.type}, map ID: ${this.mapId}, available handlers: ${Object.keys(this.messageHandlers).join(", ")}`));let b=Ne(h.data),D=new AbortController;this.abortControllers[M]=D;try{let z=yield this.messageHandlers[h.type](h.sourceMapId,b,D);this.completeTask(M,null,z)}catch(z){this.completeTask(M,U(z))}}))}completeTask(M,h,b){let D=[];delete this.abortControllers[M];let z={id:M,type:"",sourceMapId:this.mapId,origin:location.origin,error:h?Be(h):null,data:Be(b,D)};this.target.postMessage(z,{transfer:D})}remove(){this.invoker.remove(),this.subscription.unsubscribe()}},a.O=function(){var M=new y(16);return y!=Float32Array&&(M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[11]=0,M[12]=0,M[13]=0,M[14]=0),M[0]=1,M[5]=1,M[10]=1,M[15]=1,M},a.P=o,a.Q=function(M,h,b){var D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je=b[0],vt=b[1],gt=b[2];return h===M?(M[12]=h[0]*je+h[4]*vt+h[8]*gt+h[12],M[13]=h[1]*je+h[5]*vt+h[9]*gt+h[13],M[14]=h[2]*je+h[6]*vt+h[10]*gt+h[14],M[15]=h[3]*je+h[7]*vt+h[11]*gt+h[15]):(z=h[1],G=h[2],X=h[3],Z=h[4],re=h[5],Q=h[6],he=h[7],oe=h[8],ke=h[9],ge=h[10],Ue=h[11],M[0]=D=h[0],M[1]=z,M[2]=G,M[3]=X,M[4]=Z,M[5]=re,M[6]=Q,M[7]=he,M[8]=oe,M[9]=ke,M[10]=ge,M[11]=Ue,M[12]=D*je+Z*vt+oe*gt+h[12],M[13]=z*je+re*vt+ke*gt+h[13],M[14]=G*je+Q*vt+ge*gt+h[14],M[15]=X*je+he*vt+Ue*gt+h[15]),M},a.R=Kl,a.S=function(M,h,b){var D=b[0],z=b[1],G=b[2];return M[0]=h[0]*D,M[1]=h[1]*D,M[2]=h[2]*D,M[3]=h[3]*D,M[4]=h[4]*z,M[5]=h[5]*z,M[6]=h[6]*z,M[7]=h[7]*z,M[8]=h[8]*G,M[9]=h[9]*G,M[10]=h[10]*G,M[11]=h[11]*G,M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15],M},a.T=NR,a.U=function(M,h,b){var D=h[0],z=h[1],G=h[2],X=h[3],Z=h[4],re=h[5],Q=h[6],he=h[7],oe=h[8],ke=h[9],ge=h[10],Ue=h[11],je=h[12],vt=h[13],gt=h[14],It=h[15],_t=b[0],qt=b[1],tr=b[2],lr=b[3];return M[0]=_t*D+qt*Z+tr*oe+lr*je,M[1]=_t*z+qt*re+tr*ke+lr*vt,M[2]=_t*G+qt*Q+tr*ge+lr*gt,M[3]=_t*X+qt*he+tr*Ue+lr*It,M[4]=(_t=b[4])*D+(qt=b[5])*Z+(tr=b[6])*oe+(lr=b[7])*je,M[5]=_t*z+qt*re+tr*ke+lr*vt,M[6]=_t*G+qt*Q+tr*ge+lr*gt,M[7]=_t*X+qt*he+tr*Ue+lr*It,M[8]=(_t=b[8])*D+(qt=b[9])*Z+(tr=b[10])*oe+(lr=b[11])*je,M[9]=_t*z+qt*re+tr*ke+lr*vt,M[10]=_t*G+qt*Q+tr*ge+lr*gt,M[11]=_t*X+qt*he+tr*Ue+lr*It,M[12]=(_t=b[12])*D+(qt=b[13])*Z+(tr=b[14])*oe+(lr=b[15])*je,M[13]=_t*z+qt*re+tr*ke+lr*vt,M[14]=_t*G+qt*Q+tr*ge+lr*gt,M[15]=_t*X+qt*he+tr*Ue+lr*It,M},a.V=function(M,h){let b={};for(let D of h)D in M&&(b[D]=M[D]);return b},a.W=Xg,a.X=K,a.Y=yee,a.Z=mee,a._=i,a.a=Ve,a.a$=function(M){var h=new y(3);return h[0]=M[0],h[1]=M[1],h[2]=M[2],h},a.a0=p,a.a1=x,a.a2=Oe,a.a3=Yd,a.a4=_ee,a.a5=OS,a.a6=j,a.a7=y4,a.a8=ix,a.a9=25,a.aA=function(M){var h=M[0],b=M[1];return Math.sqrt(h*h+b*b)},a.aB=function(M){return M[0]=0,M[1]=0,M},a.aC=function(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M},a.aD=dI,a.aE=I,a.aF=function(M,h,b,D){let z=h.y-M.y,G=h.x-M.x,X=D.y-b.y,Z=D.x-b.x,re=X*G-Z*z;if(re===0)return null;let Q=(Z*(M.y-b.y)-X*(M.x-b.x))/re;return new o(M.x+Q*G,M.y+Q*z)},a.aG=ite,a.aH=gn,a.aI=function(M){let h=1/0,b=1/0,D=-1/0,z=-1/0;for(let G of M)h=Math.min(h,G.x),b=Math.min(b,G.y),D=Math.max(D,G.x),z=Math.max(z,G.y);return[h,b,D,z]},a.aJ=Rc,a.aK=q,a.aL=function(M,h,b,D,z=!1){if(!b[0]&&!b[1])return[0,0];let G=z?D==="map"?-M.bearingInRadians:0:D==="viewport"?M.bearingInRadians:0;if(G){let X=Math.sin(G),Z=Math.cos(G);b=[b[0]*Z-b[1]*X,b[0]*X+b[1]*Z]}return[z?b[0]:q(h,b[0],M.zoom),z?b[1]:q(h,b[1],M.zoom)]},a.aN=hI,a.aO=OI,a.aP=fI,a.aQ=M=>M.type==="symbol",a.aR=CS,a.aS=Re,a.aT=kS,a.aU=Xe,a.aV=an,a.aW=Er,a.aX=we,a.aY=bee,a.aZ=T,a.a_=A,a.aa=yI,a.ab=M=>{let h=window.document.createElement("video");return h.muted=!0,new Promise((b=>{h.onloadstart=()=>{b(h)};for(let D of M){let z=window.document.createElement("source");jt(D)||(h.crossOrigin="Anonymous"),z.src=D,h.appendChild(z)}}))},a.ac=xr,a.ad=function(){return ne++},a.ae=H,a.af=X_,a.ag=b4,a.ah=cn,a.ai=xa,a.aj=Mee,a.ak=function(M){let h={};if(M.replace(/(?:^|(?:\s*\,\s*))([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)(?:\=(?:([^\x00-\x20\(\)<>@\,;\:\\"\/\[\]\?\=\{\}\x7F]+)|(?:\"((?:[^"\\]|\\.)*)\")))?/g,((b,D,z,G)=>{let X=z||G;return h[D]=!X||X.toLowerCase(),""})),h["max-age"]){let b=parseInt(h["max-age"],10);isNaN(b)?delete h["max-age"]:h["max-age"]=b}return h},a.al=ue,a.am=85.051129,a.an=qe,a.ao=function(M){return Math.pow(2,M)},a.ap=k,a.aq=xee,a.ar=function(M){return Math.log(M)/Math.LN2},a.as=function(M){var h=M[0],b=M[1];return h*h+b*b},a.at=function(M){if(!M.length)return new Set;let h=Math.max(...M.map((re=>re.canonical.z))),b=1/0,D=-1/0,z=1/0,G=-1/0,X=[];for(let re of M){let{x:Q,y:he,z:oe}=re.canonical,ke=Math.pow(2,h-oe),ge=Q*ke,Ue=he*ke;X.push({id:re,x:ge,y:Ue}),geD&&(D=ge),UeG&&(G=Ue)}let Z=new Set;for(let re of X)re.x!==b&&re.x!==D&&re.y!==z&&re.y!==G||Z.add(re.id);return Z},a.au=function(M,h){let b=Math.abs(2*M.wrap)-+(M.wrap<0),D=Math.abs(2*h.wrap)-+(h.wrap<0);return M.overscaledZ-h.overscaledZ||D-b||h.canonical.y-M.canonical.y||h.canonical.x-M.canonical.x},a.av=class{constructor(M,h){this.max=M,this.onRemove=h,this.reset()}reset(){for(let M in this.data)for(let h of this.data[M])h.timeout&&clearTimeout(h.timeout),this.onRemove(h.value);return this.data={},this.order=[],this}add(M,h,b){let D=M.wrapped().key;this.data[D]===void 0&&(this.data[D]=[]);let z={value:h,timeout:void 0};if(b!==void 0&&(z.timeout=setTimeout((()=>{this.remove(M,z)}),b)),this.data[D].push(z),this.order.push(D),this.order.length>this.max){let G=this._getAndRemoveByKey(this.order[0]);G&&this.onRemove(G)}return this}has(M){return M.wrapped().key in this.data}getAndRemove(M){return this.has(M)?this._getAndRemoveByKey(M.wrapped().key):null}_getAndRemoveByKey(M){let h=this.data[M].shift();return h.timeout&&clearTimeout(h.timeout),this.data[M].length===0&&delete this.data[M],this.order.splice(this.order.indexOf(M),1),h.value}getByKey(M){let h=this.data[M];return h?h[0].value:null}get(M){return this.has(M)?this.data[M.wrapped().key][0].value:null}remove(M,h){if(!this.has(M))return this;let b=M.wrapped().key,D=h===void 0?0:this.data[b].indexOf(h),z=this.data[b][D];return this.data[b].splice(D,1),z.timeout&&clearTimeout(z.timeout),this.data[b].length===0&&delete this.data[b],this.onRemove(z.value),this.order.splice(this.order.indexOf(b),1),this}setMaxSize(M){for(this.max=M;this.order.length>this.max;){let h=this._getAndRemoveByKey(this.order[0]);h&&this.onRemove(h)}return this}filter(M){let h=[];for(let b in this.data)for(let D of this.data[b])M(D.value)||h.push(D);for(let b of h)this.remove(b.value.tileID,b)}},a.aw=function(M,h){let b=0,D=0;if(M.kind==="constant")D=M.layoutSize;else if(M.kind!=="source"){let{interpolationType:z,minZoom:G,maxZoom:X}=M,Z=z?ue(Uo.interpolationFactor(z,h,G,X),0,1):0;M.kind==="camera"?D=Ks.number(M.minSize,M.maxSize,Z):b=Z}return{uSizeT:b,uSize:D}},a.ay=function(M,{uSize:h,uSizeT:b},{lowerSize:D,upperSize:z}){return M.kind==="source"?D/N1:M.kind==="composite"?Ks.number(D/N1,z/N1,b):h},a.az=O,a.b=ht,a.b$=Os,a.b0=function(M,h,b){return M[0]=h[0]-b[0],M[1]=h[1]-b[1],M[2]=h[2]-b[2],M},a.b1=function(M,h){var b=h[0],D=h[1],z=h[2],G=b*b+D*D+z*z;return G>0&&(G=1/Math.sqrt(G)),M[0]=h[0]*G,M[1]=h[1]*G,M[2]=h[2]*G,M},a.b2=m,a.b3=function(M,h){return M[0]*h[0]+M[1]*h[1]+M[2]*h[2]},a.b4=function(M,h,b){return M[0]=h[0]*b[0],M[1]=h[1]*b[1],M[2]=h[2]*b[2],M[3]=h[3]*b[3],M},a.b5=L,a.b6=function(M,h,b){let D=h[0]*b[0]+h[1]*b[1]+h[2]*b[2];return D===0?null:(-(M[0]*b[0]+M[1]*b[1]+M[2]*b[2])-b[3])/D},a.b7=E,a.b8=function(M,h,b){return M[0]=h[0]*b,M[1]=h[1]*b,M[2]=h[2]*b,M[3]=h[3]*b,M},a.b9=function(M,h){return M[0]*h[0]+M[1]*h[1]+M[2]*h[2]+M[3]},a.bA=B,a.bB=function(M,h,b){var D=b[0],z=b[1],G=b[2],X=b[3],Z=h[0],re=h[1],Q=h[2],he=z*Q-G*re,oe=G*Z-D*Q,ke=D*re-z*Z;return M[0]=Z+X*(he+=he)+z*(ke+=ke)-G*(oe+=oe),M[1]=re+X*oe+G*he-D*ke,M[2]=Q+X*ke+D*oe-z*he,M},a.bC=function(M,h,b){let D=(z=[M[0],M[1],M[2],h[0],h[1],h[2],b[0],b[1],b[2]])[0]*((he=z[8])*(X=z[4])-(Z=z[5])*(Q=z[7]))+z[1]*(-he*(G=z[3])+Z*(re=z[6]))+z[2]*(Q*G-X*re);var z,G,X,Z,re,Q,he;if(D===0)return null;let oe=m([],[h[0],h[1],h[2]],[b[0],b[1],b[2]]),ke=m([],[b[0],b[1],b[2]],[M[0],M[1],M[2]]),ge=m([],[M[0],M[1],M[2]],[h[0],h[1],h[2]]),Ue=T([],oe,-M[3]);return A(Ue,Ue,T([],ke,-h[3])),A(Ue,Ue,T([],ge,-b[3])),T(Ue,Ue,1/D),Ue},a.bD=mI,a.bE=function(){return new Float64Array(4)},a.bF=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[0]*Math.cos(D)-z[1]*Math.sin(D),G[1]=z[0]*Math.sin(D)+z[1]*Math.cos(D),G[2]=z[2],M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bG=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[0],G[1]=z[1]*Math.cos(D)-z[2]*Math.sin(D),G[2]=z[1]*Math.sin(D)+z[2]*Math.cos(D),M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bH=function(M,h,b,D){var z=[],G=[];return z[0]=h[0]-b[0],z[1]=h[1]-b[1],z[2]=h[2]-b[2],G[0]=z[2]*Math.sin(D)+z[0]*Math.cos(D),G[1]=z[1],G[2]=z[2]*Math.cos(D)-z[0]*Math.sin(D),M[0]=G[0]+b[0],M[1]=G[1]+b[1],M[2]=G[2]+b[2],M},a.bI=function(M,h,b){var D=Math.sin(b),z=Math.cos(b),G=h[0],X=h[1],Z=h[2],re=h[3],Q=h[8],he=h[9],oe=h[10],ke=h[11];return h!==M&&(M[4]=h[4],M[5]=h[5],M[6]=h[6],M[7]=h[7],M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15]),M[0]=G*z-Q*D,M[1]=X*z-he*D,M[2]=Z*z-oe*D,M[3]=re*z-ke*D,M[8]=G*D+Q*z,M[9]=X*D+he*z,M[10]=Z*D+oe*z,M[11]=re*D+ke*z,M},a.bJ=function(M,h){let b=J(M,360),D=J(h,360),z=D-b,G=D>b?z-360:z+360;return Math.abs(z)0?X:-X},a.bM=function(M,h){let b=J(M,2*Math.PI),D=J(h,2*Math.PI);return Math.min(Math.abs(b-D),Math.abs(b-D+2*Math.PI),Math.abs(b-D-2*Math.PI))},a.bN=function(){let M={},h=Ct.$version;for(let b in Ct.$root){let D=Ct.$root[b];if(D.required){let z=null;z=b==="version"?h:D.type==="array"?[]:{},z!=null&&(M[b]=z)}}return M},a.bO=bt,a.bP=Qe,a.bQ=function M(h,b){if(Array.isArray(h)){if(!Array.isArray(b)||h.length!==b.length)return!1;for(let D=0;DM.type==="raster",a.bV=ie,a.bW=function(M,h){if(!M)return[{command:"setStyle",args:[h]}];let b=[];try{if(!Mt(M.version,h.version))return[{command:"setStyle",args:[h]}];Mt(M.center,h.center)||b.push({command:"setCenter",args:[h.center]}),Mt(M.state,h.state)||b.push({command:"setGlobalState",args:[h.state]}),Mt(M.centerAltitude,h.centerAltitude)||b.push({command:"setCenterAltitude",args:[h.centerAltitude]}),Mt(M.zoom,h.zoom)||b.push({command:"setZoom",args:[h.zoom]}),Mt(M.bearing,h.bearing)||b.push({command:"setBearing",args:[h.bearing]}),Mt(M.pitch,h.pitch)||b.push({command:"setPitch",args:[h.pitch]}),Mt(M.roll,h.roll)||b.push({command:"setRoll",args:[h.roll]}),Mt(M.sprite,h.sprite)||b.push({command:"setSprite",args:[h.sprite]}),Mt(M.glyphs,h.glyphs)||b.push({command:"setGlyphs",args:[h.glyphs]}),Mt(M.transition,h.transition)||b.push({command:"setTransition",args:[h.transition]}),Mt(M.light,h.light)||b.push({command:"setLight",args:[h.light]}),Mt(M.terrain,h.terrain)||b.push({command:"setTerrain",args:[h.terrain]}),Mt(M.sky,h.sky)||b.push({command:"setSky",args:[h.sky]}),Mt(M.projection,h.projection)||b.push({command:"setProjection",args:[h.projection]});let D={},z=[];(function(X,Z,re,Q){let he;for(he in Z=Z||{},X=X||{})Object.prototype.hasOwnProperty.call(X,he)&&(Object.prototype.hasOwnProperty.call(Z,he)||kt(he,re,Q));for(he in Z)Object.prototype.hasOwnProperty.call(Z,he)&&(Object.prototype.hasOwnProperty.call(X,he)?Mt(X[he],Z[he])||(X[he].type==="geojson"&&Z[he].type==="geojson"&&pr(X,Z,he)?Lt(re,{command:"setGeoJSONSourceData",args:[he,Z[he].data]}):rr(he,Z,re,Q)):ft(he,Z,re))})(M.sources,h.sources,z,D);let G=[];M.layers&&M.layers.forEach((X=>{"source"in X&&D[X.source]?b.push({command:"removeLayer",args:[X.id]}):G.push(X)})),b=b.concat(z),(function(X,Z,re){Z=Z||[];let Q=(X=X||[]).map(Nr),he=Z.map(Nr),oe=X.reduce(dn,{}),ke=Z.reduce(dn,{}),ge=Q.slice(),Ue=Object.create(null),je,vt,gt,It,_t;for(let qt=0,tr=0;qt_?(z=Math.acos(G),X=Math.sin(z),Z=Math.sin((1-D)*z)/X,re=Math.sin(D*z)/X):(Z=1-D,re=D),M[0]=Z*Q+re*ge,M[1]=Z*he+re*Ue,M[2]=Z*oe+re*je,M[3]=Z*ke+re*vt,M},a.bm=function(M){let h=new Float64Array(9);var b,D,z,G,X,Z,re,Q,he,oe,ke,ge,Ue,je,vt,gt,It,_t;oe=(z=(D=M)[0])*(re=z+z),ke=(G=D[1])*re,Ue=(X=D[2])*re,je=X*(Q=G+G),gt=(Z=D[3])*re,It=Z*Q,_t=Z*(he=X+X),(b=h)[0]=1-(ge=G*Q)-(vt=X*he),b[3]=ke-_t,b[6]=Ue+It,b[1]=ke+_t,b[4]=1-oe-vt,b[7]=je-gt,b[2]=Ue-It,b[5]=je+gt,b[8]=1-oe-ge;let qt=we(-Math.asin(ue(h[2],-1,1))),tr,lr;return Math.hypot(h[5],h[8])<.001?(tr=0,lr=-we(Math.atan2(h[3],h[4]))):(tr=we(h[5]===0&&h[8]===0?0:Math.atan2(h[5],h[8])),lr=we(h[1]===0&&h[0]===0?0:Math.atan2(h[1],h[0]))),{roll:tr,pitch:qt+90,bearing:lr}},a.bn=function(M,h){return M.roll==h.roll&&M.pitch==h.pitch&&M.bearing==h.bearing},a.bo=ii,a.bp=ca,a.bq=V_,a.br=c4,a.bs=U_,a.bt=ee,a.bu=ce,a.bv=oo,a.bw=function(M,h,b,D,z){return ee(D,z,ue((M-h)/(b-h),0,1))},a.bx=function(M,h,b,D){return M[0]=h[0]+b[0]*D,M[1]=h[1]+b[1]*D,M[2]=h[2]+b[2]*D,M},a.by=J,a.bz=function(){return new Float64Array(3)},a.c=tt,a.c$=vh,a.c0=class extends Ki{constructor(M,h){super(M,h),this.current=Ss}set(M){if(M[12]!==this.current[12]||M[0]!==this.current[0])return this.current=M,void this.gl.uniformMatrix4fv(this.location,!1,M);for(let h=1;h<16;h++)if(M[h]!==this.current[h]){this.current=M,this.gl.uniformMatrix4fv(this.location,!1,M);break}}},a.c1=Ia,a.c2=class extends Ki{constructor(M,h){super(M,h),this.current=[0,0,0]}set(M){M[0]===this.current[0]&&M[1]===this.current[1]&&M[2]===this.current[2]||(this.current=M,this.gl.uniform3f(this.location,M[0],M[1],M[2]))}},a.c3=class extends Ki{constructor(M,h){super(M,h),this.current=[0,0]}set(M){M[0]===this.current[0]&&M[1]===this.current[1]||(this.current=M,this.gl.uniform2f(this.location,M[0],M[1]))}},a.c4=C,a.c5=function(M,h){var b=Math.sin(h),D=Math.cos(h);return M[0]=D,M[1]=b,M[2]=0,M[3]=-b,M[4]=D,M[5]=0,M[6]=0,M[7]=0,M[8]=1,M},a.c6=function(M,h,b){var D=h[0],z=h[1],G=h[2];return M[0]=D*b[0]+z*b[3]+G*b[6],M[1]=D*b[1]+z*b[4]+G*b[7],M[2]=D*b[2]+z*b[5]+G*b[8],M},a.c7=function(M,h,b,D,z,G,X){var Z=1/(h-b),re=1/(D-z),Q=1/(G-X);return M[0]=-2*Z,M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=-2*re,M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=2*Q,M[11]=0,M[12]=(h+b)*Z,M[13]=(z+D)*re,M[14]=(X+G)*Q,M[15]=1,M},a.c8=class extends Ki{constructor(M,h){super(M,h),this.current=new Array}set(M){if(M!=this.current){this.current=M;let h=new Float32Array(4*M.length);for(let b=0;b25||D<0||D>=1||b<0||b>=1)},a.cE=function(M,h){return M[0]=h[0],M[1]=0,M[2]=0,M[3]=0,M[4]=0,M[5]=h[1],M[6]=0,M[7]=0,M[8]=0,M[9]=0,M[10]=h[2],M[11]=0,M[12]=0,M[13]=0,M[14]=0,M[15]=1,M},a.cF=class extends pt{},a.cG=mt,a.cH=function(M,h){tt.REGISTERED_PROTOCOLS[M]=h},a.cI=function(M){delete tt.REGISTERED_PROTOCOLS[M]},a.cJ=function(M,h){let b={};for(let z=0;zei*Rc))}let Dn=re?"center":z.get("text-justify").evaluate(oe,{},M.canonical),Hn=z.get("symbol-placement")==="point"?z.get("text-max-width").evaluate(oe,{},M.canonical)*Rc:1/0,Ln=()=>{M.bucket.allowVerticalPlacement&&Zt(lr)&&(vt.vertical=zS(gt,M.glyphMap,M.glyphPositions,M.imagePositions,ke,Hn,Z,_n,"left",jr,_t,a.ax.vertical,!0,Ue,ge))};if(!re&&fn){let un=new Set;if(Dn==="auto")for(let ci=0;ciXit(Z,re,G)),D.layers[X])})(M,b,h),b.finish()},a.cT=function(M,h,b,D,z,G){let X=ate(M,h,b,z,0);return X=ate(X,h,D,G,1),X},a.cU=class{constructor(M){this.maxEntries=M,this.map=new Map}get(M){let h=this.map.get(M);return h!==void 0&&(this.map.delete(M),this.map.set(M,h)),h}set(M,h){if(this.map.has(M))this.map.delete(M);else if(this.map.size>=this.maxEntries){let b=this.map.keys().next().value;this.map.delete(b)}this.map.set(M,h)}clear(){this.map.clear()}},a.cV=CQ,a.cW=IS,a.cX=ete,a.cY=function(M,h,b,D,z){return i(this,void 0,void 0,(function*(){if(x())try{return yield Oe(M,h,b,D,z)}catch(G){}return(function(G,X,Z,re,Q){let he=G.width,oe=G.height;ze&&ct||(ze=new OffscreenCanvas(he,oe),ct=ze.getContext("2d",{willReadFrequently:!0})),ze.width=he,ze.height=oe,ct.drawImage(G,0,0,he,oe);let ke=ct.getImageData(X,Z,re,Q);return ct.clearRect(0,0,he,oe),ke.data})(M,h,b,D,z)}))},a.cZ=mQ,a.c_=class{constructor(M,h){this.layers={[b4]:this},this.name=b4,this.version=h?h.version:1,this.extent=h?h.extent:4096,this.length=M.length,this.features=M}feature(M){return new Yit(this.features[M],this.extent)}},a.ca=class extends Ar{},a.cb=jnt,a.cc=class extends zn{},a.cd=Xh,a.ce=function(M){return M<=1?1:Math.pow(2,Math.ceil(Math.log(M)/Math.LN2))},a.cf=Gv,a.cg=function(M,h,b){var D=h[0],z=h[1],G=h[2],X=b[3]*D+b[7]*z+b[11]*G+b[15];return M[0]=(b[0]*D+b[4]*z+b[8]*G+b[12])/(X=X||1),M[1]=(b[1]*D+b[5]*z+b[9]*G+b[13])/X,M[2]=(b[2]*D+b[6]*z+b[10]*G+b[14])/X,M},a.ch=class extends Ft{},a.ci=class extends d{},a.cj=function(M,h){return M[0]===h[0]&&M[1]===h[1]&&M[2]===h[2]&&M[3]===h[3]&&M[4]===h[4]&&M[5]===h[5]&&M[6]===h[6]&&M[7]===h[7]&&M[8]===h[8]&&M[9]===h[9]&&M[10]===h[10]&&M[11]===h[11]&&M[12]===h[12]&&M[13]===h[13]&&M[14]===h[14]&&M[15]===h[15]},a.ck=function(M,h){var b=M[0],D=M[1],z=M[2],G=M[3],X=M[4],Z=M[5],re=M[6],Q=M[7],he=M[8],oe=M[9],ke=M[10],ge=M[11],Ue=M[12],je=M[13],vt=M[14],gt=M[15],It=h[0],_t=h[1],qt=h[2],tr=h[3],lr=h[4],qr=h[5],jr=h[6],_n=h[7],fn=h[8],Dn=h[9],Hn=h[10],Ln=h[11],un=h[12],ei=h[13],ci=h[14],ti=h[15];return Math.abs(b-It)<=_*Math.max(1,Math.abs(b),Math.abs(It))&&Math.abs(D-_t)<=_*Math.max(1,Math.abs(D),Math.abs(_t))&&Math.abs(z-qt)<=_*Math.max(1,Math.abs(z),Math.abs(qt))&&Math.abs(G-tr)<=_*Math.max(1,Math.abs(G),Math.abs(tr))&&Math.abs(X-lr)<=_*Math.max(1,Math.abs(X),Math.abs(lr))&&Math.abs(Z-qr)<=_*Math.max(1,Math.abs(Z),Math.abs(qr))&&Math.abs(re-jr)<=_*Math.max(1,Math.abs(re),Math.abs(jr))&&Math.abs(Q-_n)<=_*Math.max(1,Math.abs(Q),Math.abs(_n))&&Math.abs(he-fn)<=_*Math.max(1,Math.abs(he),Math.abs(fn))&&Math.abs(oe-Dn)<=_*Math.max(1,Math.abs(oe),Math.abs(Dn))&&Math.abs(ke-Hn)<=_*Math.max(1,Math.abs(ke),Math.abs(Hn))&&Math.abs(ge-Ln)<=_*Math.max(1,Math.abs(ge),Math.abs(Ln))&&Math.abs(Ue-un)<=_*Math.max(1,Math.abs(Ue),Math.abs(un))&&Math.abs(je-ei)<=_*Math.max(1,Math.abs(je),Math.abs(ei))&&Math.abs(vt-ci)<=_*Math.max(1,Math.abs(vt),Math.abs(ci))&&Math.abs(gt-ti)<=_*Math.max(1,Math.abs(gt),Math.abs(ti))},a.cl=function(M,h){return M[0]=h[0],M[1]=h[1],M[2]=h[2],M[3]=h[3],M[4]=h[4],M[5]=h[5],M[6]=h[6],M[7]=h[7],M[8]=h[8],M[9]=h[9],M[10]=h[10],M[11]=h[11],M[12]=h[12],M[13]=h[13],M[14]=h[14],M[15]=h[15],M},a.cm=M=>M.type==="circle",a.cn=M=>M.type==="heatmap",a.co=M=>M.type==="line",a.cp=M=>M.type==="fill",a.cq=M=>M.type==="fill-extrusion",a.cr=M=>M.type==="hillshade",a.cs=M=>M.type==="color-relief",a.ct=M=>M.type==="background",a.cu=M=>M.type==="custom",a.cv=ye,a.cw=function(M,h,b){if(h<=0)return M;let D=1/h;return b===void 0||Math.abs(b)<1e-10?Math.round(M*D)/D:(b>0?Math.ceil(M*D-1e-9):Math.floor(M*D+1e-10))/D},a.cx=function(M,h,b){let D=V(h.x-b.x,h.y-b.y),z=V(M.x-b.x,M.y-b.y);var G,X;return we(Math.atan2(D[0]*z[1]-D[1]*z[0],(G=D)[0]*(X=z)[0]+G[1]*X[1]))},a.cy=xe,a.cz=function(M,h){var b;if(!Ke[h])return!1;let D=M==null?void 0:M.target,z=((b=D==null?void 0:D.ownerDocument)===null||b===void 0?void 0:b.defaultView)||window;return M instanceof z.MouseEvent||M instanceof z.WheelEvent},a.d=U,a.d0=class{constructor(M,h){let b=(h=this.options=Object.assign({},Rnt,h)).debug;if(b&&console.time("preprocess data"),h.maxZoom<0||h.maxZoom>24)throw new Error("maxZoom should be in the 0-24 range");if(h.promoteId&&h.generateId)throw new Error("promoteId and generateId cannot be used together.");let D=KR(M,h);b&&(console.timeEnd("preprocess data"),console.log("index: maxZoom: %d, maxPoints: %d",h.indexMaxZoom,h.indexMaxPoints),console.time("generate tiles")),D=tI(D,h),h.updateable&&(this.source=D),this.initializeIndex(D,h)}initializeIndex(M,h){this.tileIndex=h.cluster?new Ent(h.clusterOptions):new Dnt(h),M.length&&this.tileIndex.initialize(M)}getTile(M,h,b){return h=+h,b=+b,(M=+M)<0||M>24?null:this.tileIndex.getTile(M,h,b)}updateData(M,h){let b=this.options;if(!b.updateable)throw new Error("to update tile geojson `updateable` option must be set to true");let{affected:D,source:z}=(function(G,X,Z){let re=(function(he,oe){var ke,ge;return he?{removeAll:he.removeAll,remove:new Set(he.remove||[]),add:new Map((ke=he.add)==null?void 0:ke.map((Ue=>[oe.promoteId?Ue.properties[oe.promoteId]:Ue.id,Ue]))),update:new Map((ge=he.update)==null?void 0:ge.map((Ue=>[Ue.id,Ue])))}:{remove:new Set,add:new Map,update:new Map}})(X,Z),Q=[];if(re.removeAll&&(Q=G,G=[]),re.remove.size||re.add.size){let he=[];for(let oe of G)(re.remove.has(oe.id)||re.add.has(oe.id))&&he.push(oe);if(he.length){Q.push(...he);let oe=new Set(he.map((ke=>ke.id)));G=G.filter((ke=>!oe.has(ke.id)))}if(re.add.size){let oe=KR({type:"FeatureCollection",features:Array.from(re.add.values())},Z);oe=tI(oe,Z),Q.push(...oe),G.push(...oe)}}if(re.update.size){let he=new Map,oe=[];for(let ke of G)re.update.has(ke.id)?he.set(ke.id,[...he.get(ke.id)||[],ke]):oe.push(ke);for(let[ke,ge]of re.update){let Ue=he.get(ke);if(!Ue||Ue.length===0)continue;let je=Snt(Ue,ge,Z);Q.push(...Ue,...je),oe.push(...je)}G=oe}return{affected:Q,source:G}})(this.source,M,b);h&&({affected:D,source:z}=this.filterUpdate(z,D,h)),D.length&&(this.source=z,this.tileIndex.updateIndex(z,D,b))}filterUpdate(M,h,b){let D=new Set;for(let z of M)z.id!=null&&(b(PS(z))||(h.push(z),D.add(z.id)));return{affected:h,source:M=M.filter((z=>!D.has(z.id)))}}getData(){if(!this.options.updateable)throw new Error("to retrieve data the `updateable` option must be set to true");return{type:"FeatureCollection",features:this.source.map((M=>PS(M)))}}updateClusterOptions(M,h){let b=this.options.cluster;this.options.cluster=M,this.options.clusterOptions=h,b!=M?this.initializeIndex(this.source,this.options):this.tileIndex.updateIndex(this.source,[],this.options)}getClusterExpansionZoom(M){return this.tileIndex.getClusterExpansionZoom(M)}getClusterChildren(M){return this.tileIndex.getChildren(M)}getClusterLeaves(M,h,b){return this.tileIndex.getLeaves(M,h,b)}},a.d1=Bi,a.e=_e,a.f=jt,a.g=nt,a.h=M=>i(void 0,void 0,void 0,(function*(){if(M.byteLength===0)return createImageBitmap(new ImageData(1,1));let h=new Blob([new Uint8Array(M)],{type:"image/png"});try{return createImageBitmap(h)}catch(b){throw new Error(`Could not load image because of ${U(b).message}. Please make sure to use a supported image type such as PNG or JPEG. Note that SVGs are not supported.`)}})),a.i=De,a.j=M=>new Promise(((h,b)=>{let D=new Image;D.onload=()=>{h(D),URL.revokeObjectURL(D.src),D.onload=null,window.requestAnimationFrame((()=>D.src=it))},D.onerror=()=>b(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."));let z=new Blob([new Uint8Array(M)],{type:"image/png"});D.src=M.byteLength?URL.createObjectURL(z):it})),a.k=(M,h)=>Yt(_e(M,{type:"json"}),h),a.l=Ot,a.m=Yt,a.n=fr,a.o=(M,h)=>Yt(_e(M,{type:"arrayBuffer"}),h),a.p=aee,a.q=function(M){return new IS(M).readFields(oit,[])},a.r=function(M){return/[\u02EA\u02EB\u1100-\u11FF\u2E80-\u2FDF\u3000-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u4DBF\u4E00-\uA48C\uA490-\uA4C6\uA960-\uA97C\uAC00-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFE10-\uFE1F\uFE30-\uFE4F\uFF00-\uFFEF]|\uD81B[\uDFE0-\uDFFF]|[\uD81C-\uD822\uD840-\uD868\uD86A-\uD86D\uD86F-\uD872\uD874-\uD879\uD880-\uD883\uD885-\uD88C][\uDC00-\uDFFF]|\uD823[\uDC00-\uDCD5\uDCFF-\uDD1E\uDD80-\uDDF2]|\uD82B[\uDFF0-\uDFFF]|\uD82C[\uDC00-\uDEFB]|\uD83C[\uDE00-\uDEFF]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEAD\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0\uDFF0-\uDFFF]|\uD87B[\uDC00-\uDE5D]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A\uDF50-\uDFFF]|\uD88D[\uDC00-\uDC79]/gim.test(String.fromCodePoint(M))},a.s=et,a.t=Dc,a.u=ms,a.v=Bf,a.w=me,a.x=Ct,a.y=Ua,a.z=Xl})),r("worker",["./shared"],(function(a){"use strict";class i{constructor(A,T){this.keyCache={},A&&this.replace(A,T)}replace(A,T){this._layerConfigs={},this._layers={},this.update(A,[],T)}update(A,T,m){for(let E of A){this._layerConfigs[E.id]=E;let I=this._layers[E.id]=a.bT(E,m);I._featureFilter=a.ah(I.filter,m),this.keyCache[E.id]&&delete this.keyCache[E.id]}for(let E of T)delete this.keyCache[E],delete this._layerConfigs[E],delete this._layers[E];this.familiesBySource={};let F=a.cJ(Object.values(this._layerConfigs),this.keyCache);for(let E of F){let I=E.map((q=>this._layers[q.id])),R=I[0];if(R.isHidden())continue;let B=R.source||"",O=this.familiesBySource[B];O||(O=this.familiesBySource[B]={});let V=R.sourceLayer||a.ag,j=O[V];j||(j=O[V]=[]),j.push(I)}}}class o{constructor(A){let T={},m=[];for(let R in A){let B=A[R],O=T[R]={};for(let V in B){let j=B[+V];if(!j||j.bitmap.width===0||j.bitmap.height===0)continue;let q={x:0,y:0,w:j.bitmap.width+2,h:j.bitmap.height+2};m.push(q),O[V]={rect:q,metrics:j.metrics}}}let{w:F,h:E}=a.p(m),I=new a.t({width:F||1,height:E||1});for(let R in A){let B=A[R];for(let O in B){let V=B[+O];if(!V||V.bitmap.width===0||V.bitmap.height===0)continue;let j=T[R][O].rect;a.t.copy(V.bitmap,I,{x:0,y:0},{x:j.x+1,y:j.y+1},V.bitmap)}}this.image=I,this.positions=T}}a.cK("GlyphAtlas",o);class s{constructor(A){this.tileID=new a.a3(A.tileID.overscaledZ,A.tileID.wrap,A.tileID.canonical.z,A.tileID.canonical.x,A.tileID.canonical.y),this.uid=A.uid,this.zoom=A.zoom,this.pixelRatio=A.pixelRatio,this.tileSize=A.tileSize,this.source=A.source,this.overscaling=this.tileID.overscaleFactor(),this.showCollisionBoxes=A.showCollisionBoxes,this.collectResourceTiming=!!A.collectResourceTiming,this.returnDependencies=!!A.returnDependencies,this.promoteId=A.promoteId,this.inFlightDependencies=[]}parse(A,T,m,F,E){return a._(this,void 0,void 0,(function*(){this.status="parsing",this.data=A,this.collisionBoxArray=new a.ae;let I=new a.cL(Object.keys(A.layers).sort()),R=new a.cM(this.tileID,this.promoteId);R.bucketLayerIDs=[];let B={},O={featureIndex:R,iconDependencies:{},patternDependencies:{},glyphDependencies:{},dashDependencies:{},availableImages:m,subdivisionGranularity:E},V=T.familiesBySource[this.source];for(let ie in V){let le=A.layers[ie];if(!le)continue;le.version===1&&a.w(`Vector tile source "${this.source}" layer "${ie}" does not use vector tile spec v2 and therefore may have some rendering errors.`);let me=I.encode(ie),be=[];for(let De=0;Deht.id))))}}let j=a.bY(O.glyphDependencies,(ie=>Object.keys(ie).map(Number)));for(let ie of this.inFlightDependencies)ie==null||ie.abort();this.inFlightDependencies=[];let q=Promise.resolve({});if(Object.keys(j).length){let ie=new AbortController;this.inFlightDependencies.push(ie),q=F.sendAsync({type:"GG",data:{stacks:j,source:this.source,tileID:this.tileID,type:"glyphs"}},ie)}let U=Object.keys(O.iconDependencies),J=Promise.resolve({});if(U.length){let ie=new AbortController;this.inFlightDependencies.push(ie),J=F.sendAsync({type:"GI",data:{icons:U,source:this.source,tileID:this.tileID,type:"icons"}},ie)}let ee=Object.keys(O.patternDependencies),ce=Promise.resolve({});if(ee.length){let ie=new AbortController;this.inFlightDependencies.push(ie),ce=F.sendAsync({type:"GI",data:{icons:ee,source:this.source,tileID:this.tileID,type:"patterns"}},ie)}let ye=O.dashDependencies,xe=Promise.resolve({});if(Object.keys(ye).length){let ie=new AbortController;this.inFlightDependencies.push(ie),xe=F.sendAsync({type:"GDA",data:{dashes:ye}},ie)}let[ue,K,_e,ne]=yield Promise.all([q,J,ce,xe]),ae=new o(ue),pe=new a.cN(K,_e);for(let ie in B){let le=B[ie];le instanceof a.af?(l(le.layers,this.zoom,m),a.cO({bucket:le,glyphMap:ue,glyphPositions:ae.positions,imageMap:K,imagePositions:pe.iconPositions,showCollisionBoxes:this.showCollisionBoxes,canonical:this.tileID.canonical,subdivisionGranularity:O.subdivisionGranularity})):le.hasDependencies&&(le instanceof a.cP||le instanceof a.cQ||le instanceof a.cR)&&(l(le.layers,this.zoom,m),le.addFeatures(O,this.tileID.canonical,pe.patternPositions,ne))}return this.status="done",{buckets:Object.values(B).filter((ie=>!ie.isEmpty())),featureIndex:R,collisionBoxArray:this.collisionBoxArray,glyphAtlasImage:ae.image,imageAtlas:pe,dashPositions:ne,glyphMap:this.returnDependencies?ue:null,iconMap:this.returnDependencies?K:null,glyphPositions:this.returnDependencies?ae.positions:null}}))}}function l(w,A,T){let m=new a.J(A);for(let F of w)F.recalculate(m,T)}class u{constructor(){this.loading={},this.loaded={},this.parsing={}}startLoading(A,T){this.loading[A]=T}finishLoading(A){delete this.loading[A]}abort(A){let T=this.loading[A];T!=null&&T.abort&&(T.abort.abort(),delete this.loading[A])}setParsing(A,T){this.parsing[A]=T}consumeParsing(A){let T=this.parsing[A];if(T)return delete this.parsing[A],T}clearParsing(A){delete this.parsing[A]}markLoaded(A,T){this.loaded[A]=T}getLoaded(A){let T=this.loaded[A];if(T)return T}removeLoaded(A){delete this.loaded[A]}clearLoaded(){this.loaded={}}}class c{constructor(A){this.start=`${A}#start`,this.end=`${A}#end`,this.measure=A,performance.mark(this.start)}finish(){performance.mark(this.end);let A=performance.getEntriesByName(this.measure);return A.length===0&&(performance.measure(this.measure,this.start,this.end),A=performance.getEntriesByName(this.measure),performance.clearMarks(this.start),performance.clearMarks(this.end),performance.clearMeasures(this.measure)),A}}class f{constructor(A,T,m,F,E){this.type=A,this.properties=m||{},this.extent=E,this.pointsArray=T,this.id=F}loadGeometry(){return this.pointsArray.map((A=>A.map((T=>new a.P(T.x,T.y)))))}}class v{constructor(A,T,m){this.version=2,this._myFeatures=A,this.name=T,this.length=A.length,this.extent=m}feature(A){return this._myFeatures[A]}}class g{constructor(){this.layers={}}addLayer(A){this.layers[A.name]=A}}function p(w){let A=a.cS(w);return A.byteOffset===0&&A.byteLength===A.buffer.byteLength||(A=new Uint8Array(A)),{vectorTile:w,rawData:A.buffer}}function x(w,A,T){let{extent:m}=w,F=Math.pow(2,T.z-A.z),E=(T.x-A.x*F)*m,I=(T.y-A.y*F)*m,R=[];for(let B=0;B0&&V.addLayer(ee)}let q=p(V);return this.overzoomedTileResultCache.set(B,q),q}reloadTile(A){return a._(this,void 0,void 0,(function*(){let T=A.uid,m=this.tileState.getLoaded(T);if(!m)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(m.showCollisionBoxes=A.showCollisionBoxes,m.status==="parsing"){let F=this.tileState.consumeParsing(T);return yield this._parseWorkerTile(m,A,F)}if(m.status==="done"&&m.vectorTile)return yield this._parseWorkerTile(m,A)}))}abortTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.abort(A.uid)}))}removeTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.removeLoaded(A.uid)}))}}class y{constructor(){this.loaded={}}loadTile(A){return a._(this,void 0,void 0,(function*(){let{uid:T,encoding:m,rawImageData:F,redFactor:E,greenFactor:I,blueFactor:R,baseShift:B}=A,O=F.width+2,V=F.height+2,j=a.b(F)?new a.R({width:O,height:V},yield a.cY(F,-1,-1,O,V)):F,q=new a.cZ(T,j,m,E,I,R,B);return this.loaded||(this.loaded={}),this.loaded[T]=q,q}))}removeTile(A){let T=this.loaded,m=A.uid;T!=null&&T[m]&&delete T[m]}}class C{constructor(A,T,m,F=k){this.actor=A,this.layerIndex=T,this.availableImages=m,this.tileState=new u,this._createGeoJSONIndex=F}loadVectorTile(A){if(!this._geoJSONIndex)throw new Error("Unable to parse the data into a cluster or geojson");let{z:T,x:m,y:F}=A.tileID.canonical,E=this._geoJSONIndex.getTile(T,m,F);return E?p(new a.c_(E.features,{version:2,extent:a.a6})):null}loadTile(A){return a._(this,void 0,void 0,(function*(){let{uid:T}=A,m=new s(A);m.abort=new AbortController;try{let F=this.loadVectorTile(A);if(!F)return null;let{vectorTile:E,rawData:I}=F;m.vectorTile=E,this.tileState.markLoaded(T,m);let R={rawData:I};this.tileState.setParsing(T,R);try{return yield this._parseWorkerTile(m,A,R)}finally{this.tileState.clearParsing(T)}}catch(F){throw m.status="done",this.tileState.markLoaded(T,m),F}}))}_reloadLoadedTile(A){return a._(this,void 0,void 0,(function*(){let T=A.uid,m=this.tileState.getLoaded(T);if(!m)throw new Error("Should not be trying to reload a tile that was never loaded or has been removed");if(m.showCollisionBoxes=A.showCollisionBoxes,m.status==="parsing"){let F=this.tileState.consumeParsing(T);return yield this._parseWorkerTile(m,A,F)}if(m.status==="done"&&m.vectorTile)return yield this._parseWorkerTile(m,A)}))}_parseWorkerTile(A,T,m){return a._(this,void 0,void 0,(function*(){let F=yield A.parse(A.vectorTile,this.layerIndex,this.availableImages,this.actor,T.subdivisionGranularity);if(m){let{rawData:E}=m;F=a.e({rawTileData:E.slice(0),encoding:"mvt"},F)}return F}))}abortTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.abort(A.uid)}))}removeTile(A){return a._(this,void 0,void 0,(function*(){this.tileState.removeLoaded(A.uid)}))}loadData(A){return a._(this,void 0,void 0,(function*(){var T;(T=this._pendingRequest)===null||T===void 0||T.abort();let m=this._startRequestTiming(A);this._pendingRequest=new AbortController;try{yield this.loadAndProcessGeoJSON(A,this._pendingRequest),delete this._pendingRequest,this.tileState.clearLoaded();let F={};return A.request&&(F.data=A.data),this._finishRequestTiming(m,A,F),F}catch(F){if(delete this._pendingRequest,!a.$(F))throw F;return{abandoned:!0}}}))}_startRequestTiming(A){var T;if(!((T=A.request)===null||T===void 0)&&T.collectResourceTiming)return new c(A.request.url)}_finishRequestTiming(A,T,m){let F=A==null?void 0:A.finish();F&&(m.resourceTiming={[T.source]:JSON.parse(JSON.stringify(F))})}reloadTile(A){return this.tileState.getLoaded(A.uid)?this._reloadLoadedTile(A):this.loadTile(A)}loadAndProcessGeoJSON(A,T){return a._(this,void 0,void 0,(function*(){var m;if(A.request&&(A.data=(yield a.k(A.request,T)).data),A.data)return A.data=this._filterGeoJSON(A.data,A.filter),void(this._geoJSONIndex=this._createGeoJSONIndex(A.data,A));if(A.dataDiff)return(m=this._geoJSONIndex)!==null&&m!==void 0||(this._geoJSONIndex=this._createGeoJSONIndex({type:"FeatureCollection",features:[]},A)),void this._geoJSONIndex.updateData(A.dataDiff,this._getFilterPredicate(A.filter));if(A.updateCluster&&this._geoJSONIndex.updateClusterOptions(A.geojsonVtOptions.cluster,S(A)),this._geoJSONIndex==null)throw new Error(`Input data given to '${A.source}' is not a valid GeoJSON object.`)}))}_filterGeoJSON(A,T){if(A.type!=="FeatureCollection")return A;let m=this._getFilterPredicate(T);return m?{type:"FeatureCollection",features:A.features.filter((F=>m(F)))}:A}_getFilterPredicate(A){if(typeof A!="boolean"&&!(A!=null&&A.length))return;let T=a.c$(A,{type:"boolean","property-type":"data-driven",overridable:!1,transition:!1});if(T.result==="error")throw new Error(T.value.map((m=>`${m.key}: ${m.message}`)).join(", "));return m=>T.value.evaluate({zoom:0},m)}removeSource(A){return a._(this,void 0,void 0,(function*(){var T;(T=this._pendingRequest)===null||T===void 0||T.abort()}))}getClusterExpansionZoom(A){return this._geoJSONIndex.getClusterExpansionZoom(A.clusterId)}getClusterChildren(A){return this._geoJSONIndex.getClusterChildren(A.clusterId)}getClusterLeaves(A){return this._geoJSONIndex.getClusterLeaves(A.clusterId,A.limit,A.offset)}}function k(w,A){let T=a.e(A.geojsonVtOptions||{},{updateable:!0,clusterOptions:S(A)});return new a.d0(w,T)}function S({geojsonVtOptions:w,clusterProperties:A}){if(!A||!w.clusterOptions)return w.clusterOptions;let T={},m={},F={accumulated:null,zoom:0},E={properties:null},I=Object.keys(A);for(let R of I){let[B,O]=A[R],V=a.c$(O),j=a.c$(typeof B=="string"?[B,["accumulated"],["get",R]]:B);T[R]=V.value,m[R]=j.value}return w.clusterOptions.map=R=>{E.properties=R;let B={};for(let O of I)B[O]=T[O].evaluate(F,E);return B},w.clusterOptions.reduce=(R,B)=>{E.properties=B;for(let O of I)F.accumulated=R[O],R[O]=m[O].evaluate(F,E)},w.clusterOptions}class L{constructor(A){this.self=A,this.actor=new a.N(A),this.layerIndexes={},this.availableImages={},this.workerSources={},this.demWorkerSources={},this.externalWorkerSourceTypes={},this.globalStates=new Map,this.self.registerWorkerSource=(T,m)=>{if(this.externalWorkerSourceTypes[T])throw new Error(`Worker source with name "${T}" already registered.`);this.externalWorkerSourceTypes[T]=m},this.self.addProtocol=a.cH,this.self.removeProtocol=a.cI,this.self.registerRTLTextPlugin=T=>{a.d1.setMethods(T)},this.self.makeRequest=a.m,this.actor.registerMessageHandler("LDT",((T,m)=>this._getDEMWorkerSource(T,m.source).loadTile(m))),this.actor.registerMessageHandler("RDT",((T,m)=>a._(this,void 0,void 0,(function*(){this._getDEMWorkerSource(T,m.source).removeTile(m)})))),this.actor.registerMessageHandler("GCEZ",((T,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(T,m.type,m.source).getClusterExpansionZoom(m)})))),this.actor.registerMessageHandler("GCC",((T,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(T,m.type,m.source).getClusterChildren(m)})))),this.actor.registerMessageHandler("GCL",((T,m)=>a._(this,void 0,void 0,(function*(){return this._getWorkerSource(T,m.type,m.source).getClusterLeaves(m)})))),this.actor.registerMessageHandler("LD",((T,m)=>this._getWorkerSource(T,m.type,m.source).loadData(m))),this.actor.registerMessageHandler("LT",((T,m)=>this._getWorkerSource(T,m.type,m.source).loadTile(m))),this.actor.registerMessageHandler("RT",((T,m)=>this._getWorkerSource(T,m.type,m.source).reloadTile(m))),this.actor.registerMessageHandler("AT",((T,m)=>this._getWorkerSource(T,m.type,m.source).abortTile(m))),this.actor.registerMessageHandler("RMT",((T,m)=>this._getWorkerSource(T,m.type,m.source).removeTile(m))),this.actor.registerMessageHandler("RS",((T,m)=>a._(this,void 0,void 0,(function*(){var F,E;if(!(!((E=(F=this.workerSources[T])===null||F===void 0?void 0:F[m.type])===null||E===void 0)&&E[m.source]))return;let I=this.workerSources[T][m.type][m.source];delete this.workerSources[T][m.type][m.source],I.removeSource!==void 0&&I.removeSource(m)})))),this.actor.registerMessageHandler("RM",(T=>a._(this,void 0,void 0,(function*(){delete this.layerIndexes[T],delete this.availableImages[T],delete this.workerSources[T],delete this.demWorkerSources[T],this.globalStates.delete(T)})))),this.actor.registerMessageHandler("SR",((T,m)=>a._(this,void 0,void 0,(function*(){this.referrer=m})))),this.actor.registerMessageHandler("SRPS",((T,m)=>this._syncRTLPluginState(T,m))),this.actor.registerMessageHandler("IS",((T,m)=>a._(this,void 0,void 0,(function*(){this.self.importScripts(m)})))),this.actor.registerMessageHandler("SI",((T,m)=>this._setImages(T,m))),this.actor.registerMessageHandler("UL",((T,m)=>a._(this,void 0,void 0,(function*(){this._getLayerIndex(T).update(m.layers,m.removedIds,this._getGlobalState(T))})))),this.actor.registerMessageHandler("UGS",((T,m)=>a._(this,void 0,void 0,(function*(){let F=this._getGlobalState(T);for(let E in m)F[E]=m[E]})))),this.actor.registerMessageHandler("SL",((T,m)=>a._(this,void 0,void 0,(function*(){this._getLayerIndex(T).replace(m,this._getGlobalState(T))}))))}_getGlobalState(A){let T=this.globalStates.get(A);return T||(T={},this.globalStates.set(A,T)),T}_setImages(A,T){return a._(this,void 0,void 0,(function*(){this.availableImages[A]=T;for(let m in this.workerSources[A]){let F=this.workerSources[A][m];for(let E in F)F[E].availableImages=T}}))}_syncRTLPluginState(A,T){return a._(this,void 0,void 0,(function*(){return yield a.d1.syncState(T,this.self.importScripts)}))}_getAvailableImages(A){let T=this.availableImages[A];return T||(T=[]),T}_getLayerIndex(A){let T=this.layerIndexes[A];return T||(T=this.layerIndexes[A]=new i),T}_getWorkerSource(A,T,m){var F,E;if((F=this.workerSources)[A]||(F[A]={}),(E=this.workerSources[A])[T]||(E[T]={}),!this.workerSources[A][T][m]){let I={sendAsync:(R,B)=>(R.targetMapId=A,this.actor.sendAsync(R,B))};switch(T){case"vector":this.workerSources[A][T][m]=new _(I,this._getLayerIndex(A),this._getAvailableImages(A));break;case"geojson":this.workerSources[A][T][m]=new C(I,this._getLayerIndex(A),this._getAvailableImages(A));break;default:this.workerSources[A][T][m]=new this.externalWorkerSourceTypes[T](I,this._getLayerIndex(A),this._getAvailableImages(A))}}return this.workerSources[A][T][m]}_getDEMWorkerSource(A,T){var m,F;return(m=this.demWorkerSources)[A]||(m[A]={}),(F=this.demWorkerSources[A])[T]||(F[T]=new y),this.demWorkerSources[A][T]}}return a.i(self)&&(self.worker=new L(self)),L})),r("index",["exports","./shared"],(function(a,i){"use strict";var o="5.24.0";function s(){var Y=new i.A(4);return i.A!=Float32Array&&(Y[1]=0,Y[2]=0),Y[0]=1,Y[3]=1,Y}let l,u,c,f={frame(Y,d,P,N){let H=N||window,$=H.requestAnimationFrame((de=>{se(),d(de)})),{unsubscribe:se}=i.s(Y.signal,"abort",(()=>{se(),H.cancelAnimationFrame($),P(new i.a(Y.signal.reason))}),!1)},frameAsync(Y,d){return new Promise(((P,N)=>{this.frame(Y,P,N,d)}))},getImageData(Y,d=0){return this.getImageCanvasContext(Y).getImageData(-d,-d,Y.width+2*d,Y.height+2*d)},getImageCanvasContext(Y){let d=window.document.createElement("canvas"),P=d.getContext("2d",{willReadFrequently:!0});if(!P)throw new Error("failed to create canvas 2d context");return d.width=Y.width,d.height=Y.height,P.drawImage(Y,0,0,Y.width,Y.height),P},resolveURL:Y=>(l||(l=document.createElement("a")),l.href=Y,l.href),hardwareConcurrency:typeof navigator!="undefined"&&navigator.hardwareConcurrency||4,get prefersReducedMotion(){return c!==void 0?c:!!matchMedia&&(u!=null||(u=matchMedia("(prefers-reduced-motion: reduce)")),u.matches)},set prefersReducedMotion(Y){c=Y}},v=new class{constructor(){this._frozenAt=null}getCurrentTime(){return this._frozenAt!==null?this._frozenAt:performance.now()}setNow(Y){this._frozenAt=Y}restoreNow(){this._frozenAt=null}isFrozen(){return this._frozenAt!==null}};function g(){return v.getCurrentTime()}var p,x;class _{static create(d,P,N){let H=window.document.createElement(d);return P!==void 0&&(H.className=P),N&&N.appendChild(H),H}static createNS(d,P){return window.document.createElementNS(d,P)}static disableDrag(){_.docStyle&&_.selectProp&&(_.userSelect=_.docStyle[_.selectProp],_.docStyle[_.selectProp]="none")}static enableDrag(){_.docStyle&&_.selectProp&&(_.docStyle[_.selectProp]=_.userSelect)}static suppressClickInternal(d){d.preventDefault(),d.stopPropagation(),window.removeEventListener("click",_.suppressClickInternal,!0)}static suppressClick(){window.addEventListener("click",_.suppressClickInternal,!0),window.setTimeout((()=>{window.removeEventListener("click",_.suppressClickInternal,!0)}),0)}static getScale(d){let P=d.getBoundingClientRect();return{x:P.width/d.offsetWidth||1,y:P.height/d.offsetHeight||1,boundingClientRect:P}}static getPoint(d,P,N){let H=P.boundingClientRect;return new i.P((N.clientX-H.left)/P.x-d.clientLeft,(N.clientY-H.top)/P.y-d.clientTop)}static mousePos(d,P){let N=_.getScale(d);return _.getPoint(d,N,P)}static touchPos(d,P){let N=[],H=_.getScale(d);for(let $ of P)N.push(_.getPoint(d,H,$));return N}static sanitize(d){let P=new DOMParser().parseFromString(d,"text/html").body||document.createElement("body"),N=P.querySelectorAll("script");for(let H of N)H.remove();return _.clean(P),P.innerHTML}static isPossiblyDangerous(d,P){let N=P.replace(/\s+/g,"").toLowerCase();return!(!["src","href","xlink:href"].includes(d)||!N.includes("javascript:")&&!N.includes("data:"))||!!d.startsWith("on")||void 0}static clean(d){let P=d.children;for(let N of P)_.removeAttributes(N),_.clean(N)}static removeAttributes(d){for(let{name:P,value:N}of d.attributes)_.isPossiblyDangerous(P,N)&&d.removeAttribute(P)}}_.docStyle=typeof window!="undefined"&&((p=window.document)===null||p===void 0?void 0:p.documentElement.style),_.selectProp=!_.docStyle||"userSelect"in _.docStyle?"userSelect":"webkitUserSelect",(function(Y){let d,P,N,H;Y.resetRequestQueue=()=>{d=[],P=0,N=0,H={}},Y.addThrottleControl=Ae=>{let Fe=N++;return H[Fe]=Ae,Fe},Y.removeThrottleControl=Ae=>{delete H[Ae],se()},Y.getImage=(Ae,Fe,Ie=!0)=>new Promise(((Ye,st)=>{Ae.headers||(Ae.headers={}),Ae.headers.accept="image/webp,*/*",i.e(Ae,{type:"image"}),d.push({abortController:Fe,requestParameters:Ae,supportImageRefresh:Ie,state:"queued",onError:dt=>{st(dt)},onSuccess:dt=>{Ye(dt)}}),se()}));let $=Ae=>i._(this,void 0,void 0,(function*(){Ae.state="running";let{requestParameters:Fe,supportImageRefresh:Ie,onError:Ye,onSuccess:st,abortController:dt}=Ae,Pe=Ie===!1&&!i.i(self)&&!i.g(Fe.url)&&(!Fe.headers||Object.keys(Fe.headers).reduce(((xt,Et)=>xt&&Et==="accept"),!0));P++;let Xe=Pe?de(Fe,dt):i.m(Fe,dt);try{let xt=yield Xe;delete Ae.abortController,Ae.state="completed",xt.data instanceof HTMLImageElement||i.b(xt.data)?st(xt):xt.data&&st({data:yield(at=xt.data,typeof createImageBitmap=="function"?i.h(at):i.j(at)),cacheControl:xt.cacheControl,expires:xt.expires})}catch(xt){delete Ae.abortController,Ye(i.d(xt))}finally{P--,se()}var at})),se=()=>{let Ae=(()=>{for(let Fe of Object.keys(H))if(H[Fe]())return!0;return!1})()?i.c.MAX_PARALLEL_IMAGE_REQUESTS_PER_FRAME:i.c.MAX_PARALLEL_IMAGE_REQUESTS;for(let Fe=P;Fe0;Fe++){let Ie=d.shift();Ie.abortController.signal.aborted?Fe--:$(Ie)}},de=(Ae,Fe)=>new Promise(((Ie,Ye)=>{let st=new Image,dt=Ae.url,Pe=Ae.credentials;Pe&&Pe==="include"?st.crossOrigin="use-credentials":(Pe&&Pe==="same-origin"||!i.f(dt))&&(st.crossOrigin="anonymous"),Fe.signal.addEventListener("abort",(()=>{st.src="",Ye(new i.a(Fe.signal.reason))})),st.fetchPriority="high",st.onload=()=>{st.onerror=st.onload=null,Ie({data:st})},st.onerror=()=>{st.onerror=st.onload=null,Fe.signal.aborted||Ye(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."))},st.src=dt}))})(x||(x={})),x.resetRequestQueue();class y{constructor(d){this._transformRequestFn=d!=null?d:null}transformRequest(d,P){return this._transformRequestFn&&this._transformRequestFn(d,P)||{url:d}}setTransformRequest(d){this._transformRequestFn=d}}function C(Y){let d=[];if(typeof Y=="string")d.push({id:"default",url:Y});else if(Y&&Y.length>0){let P=[];for(let{id:N,url:H}of Y){let $=`${N}${H}`;P.includes($)||(P.push($),d.push({id:N,url:H}))}}return d}function k(Y,d,P){try{let N=new URL(Y);return N.pathname+=`${d}${P}`,N.toString()}catch(N){throw new Error(`Invalid sprite URL "${Y}", must be absolute. Modify style specification directly or use TransformStyleFunction to correct the issue dynamically`)}}function S(Y){let{userImage:d}=Y;return!(!(d!=null&&d.render)||!d.render()||(Y.data.replace(new Uint8Array(d.data.buffer)),0))}class L extends i.E{constructor(){super(),this.images={},this.updatedImages={},this.callbackDispatchedThisFrame={},this.loaded=!1,this.requestors=[],this.patterns={},this.atlasImage=new i.R({width:1,height:1}),this.dirty=!0}destroy(){this.atlasTexture&&(this.atlasTexture.destroy(),this.atlasTexture=null);for(let d of Object.keys(this.images))this.removeImage(d);this.patterns={},this.atlasImage=new i.R({width:1,height:1}),this.dirty=!0}isLoaded(){return this.loaded}setLoaded(d){if(this.loaded!==d&&(this.loaded=d,d)){for(let{ids:P,promiseResolve:N}of this.requestors)N(this._getImagesForIds(P));this.requestors=[]}}getImage(d){let P=this.images[d];if(P&&!P.data&&P.spriteData){let N=P.spriteData;P.data=new i.R({width:N.width,height:N.height},N.context.getImageData(N.x,N.y,N.width,N.height).data),P.spriteData=null}return P}addImage(d,P){if(this.images[d])throw new Error(`Image id ${d} already exist, use updateImage instead`);this._validate(d,P)&&(this.images[d]=P)}_validate(d,P){let N=!0,H=P.data||P.spriteData;return this._validateStretch(P.stretchX,H==null?void 0:H.width)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "stretchX" value`))),N=!1),this._validateStretch(P.stretchY,H==null?void 0:H.height)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "stretchY" value`))),N=!1),this._validateContent(P.content,P)||(this.fire(new i.l(new Error(`Image "${d}" has invalid "content" value`))),N=!1),N}_validateStretch(d,P){if(!d)return!0;let N=0;for(let H of d){if(H[0]=d[1]))}updateImage(d,P,N=!0){let H=this.getImage(d);if(N&&(H.data.width!==P.data.width||H.data.height!==P.data.height))throw new Error(`size mismatch between old image (${H.data.width}x${H.data.height}) and new image (${P.data.width}x${P.data.height}).`);P.version=H.version+1,this.images[d]=P,this.updatedImages[d]=!0}removeImage(d){var P;let N=this.images[d];delete this.images[d],delete this.patterns[d],!((P=N.userImage)===null||P===void 0)&&P.onRemove&&N.userImage.onRemove()}listImages(){return Object.keys(this.images)}getImages(d){return new Promise(((P,N)=>{let H=!0;if(!this.isLoaded())for(let $ of d)this.images[$]||(H=!1);this.isLoaded()||H?P(this._getImagesForIds(d)):this.requestors.push({ids:d,promiseResolve:P})}))}_getImagesForIds(d){var P;let N={};for(let H of d){let $=this.getImage(H);$||(this.fire(new i.n("styleimagemissing",{id:H})),$=this.getImage(H)),$?N[H]={data:$.data.clone(),pixelRatio:$.pixelRatio,sdf:$.sdf,version:$.version,stretchX:$.stretchX,stretchY:$.stretchY,content:$.content,textFitWidth:$.textFitWidth,textFitHeight:$.textFitHeight,hasRenderCallback:!!(!((P=$.userImage)===null||P===void 0)&&P.render)}:i.w(`Image "${H}" could not be loaded. Please make sure you have added the image with map.addImage() or a "sprite" property in your style. You can provide missing images by listening for the "styleimagemissing" map event.`)}return N}getPixelSize(){let{width:d,height:P}=this.atlasImage;return{width:d,height:P}}getPattern(d){let P=this.patterns[d],N=this.getImage(d);if(!N)return null;if(P&&P.position.version===N.version)return P.position;if(P)P.position.version=N.version;else{let H={w:N.data.width+2,h:N.data.height+2,x:0,y:0},$=new i.I(H,N);this.patterns[d]={bin:H,position:$}}return this._updatePatternAtlas(),this.patterns[d].position}bind(d){let P=d.gl;this.atlasTexture?this.dirty&&(this.atlasTexture.update(this.atlasImage),this.dirty=!1):this.atlasTexture=new i.T(d,this.atlasImage,P.RGBA),this.atlasTexture.bind(P.LINEAR,P.CLAMP_TO_EDGE)}_updatePatternAtlas(){let d=[];for(let $ in this.patterns)d.push(this.patterns[$].bin);let{w:P,h:N}=i.p(d),H=this.atlasImage;H.resize({width:P||1,height:N||1});for(let $ in this.patterns){let{bin:se}=this.patterns[$],de=se.x+1,Ae=se.y+1,Fe=this.getImage($).data,Ie=Fe.width,Ye=Fe.height;i.R.copy(Fe,H,{x:0,y:0},{x:de,y:Ae},{width:Ie,height:Ye}),i.R.copy(Fe,H,{x:0,y:Ye-1},{x:de,y:Ae-1},{width:Ie,height:1}),i.R.copy(Fe,H,{x:0,y:0},{x:de,y:Ae+Ye},{width:Ie,height:1}),i.R.copy(Fe,H,{x:Ie-1,y:0},{x:de-1,y:Ae},{width:1,height:Ye}),i.R.copy(Fe,H,{x:0,y:0},{x:de+Ie,y:Ae},{width:1,height:Ye})}this.dirty=!0}beginFrame(){this.callbackDispatchedThisFrame={}}dispatchRenderCallbacks(d){for(let P of d){if(this.callbackDispatchedThisFrame[P])continue;this.callbackDispatchedThisFrame[P]=!0;let N=this.getImage(P);N||i.w(`Image with ID: "${P}" was not found`),S(N)&&this.updateImage(P,N)}}cloneImages(){let d={};for(let P in this.images){let N=this.images[P];d[P]=Object.assign(Object.assign({},N),{data:N.data?N.data.clone():null})}return d}}let w=1e20,A=new Float64Array(256);for(let Y=0;Y<256;Y++){let d=.5-Math.pow(Y/255,.45454545454545453);A[Y]=d*Math.abs(d)}function T(Y,d,P,N,H,$,se,de,Ae){for(let Fe=d;Fe-1);Ae++,$[Ae]=de,se[Ae]=Fe,se[Ae+1]=w}for(let de=0,Ae=0;de/[-\w]+/.test(H)?H:`'${CSS.escape(H)}'`)).join(",");return new E.TinySDF({fontSize:48,buffer:6,radius:16,cutoff:.25,fontFamily:N,fontWeight:this._fontWeight(P[0]),fontStyle:this._fontStyle(P[0]),lang:this.lang})}_fontStyle(d){return/italic/i.test(d)?"italic":/oblique/i.test(d)?"oblique":"normal"}_fontWeight(d){let P={thin:100,hairline:100,"extra light":200,"ultra light":200,light:300,normal:400,regular:400,medium:500,semibold:600,demibold:600,bold:700,"extra bold":800,"ultra bold":800,black:900,heavy:900,"extra black":950,"ultra black":950},N;for(let[H,$]of Object.entries(P))new RegExp(`\\b${H}\\b`,"i").test(d)&&(N=`${$}`);return N}destroy(){for(let d in this.entries){let P=this.entries[d];P.tinySDF=null,P.ideographTinySDF=null,P.glyphs={},P.requests={},P.ranges={}}this.entries={}}}E.loadGlyphRange=function(Y,d,P,N){return i._(this,void 0,void 0,(function*(){let H=256*d,$=H+255,se=yield N.transformRequest(P.replace("{fontstack}",Y).replace("{range}",`${H}-${$}`),"Glyphs"),de=yield i.o(se,new AbortController);if(!(de!=null&&de.data))throw new Error(`Could not load glyph range. range: ${d}, ${H}-${$}`);let Ae={};for(let Fe of i.q(de.data))Ae[Fe.id]=Fe;return Ae}))},E.TinySDF=class{constructor({fontSize:Y=24,buffer:d=3,radius:P=8,cutoff:N=.25,fontFamily:H="sans-serif",fontWeight:$="normal",fontStyle:se="normal",lang:de=null}={}){this.buffer=d,this.radius=P,this.cutoff=N,this.lang=de;let Ae=this.size=Y+4*d,Fe=this._createCanvas(Ae),Ie=this.ctx=Fe.getContext("2d",{willReadFrequently:!0});Ie.font=`${se} ${$} ${Y}px ${H}`,Ie.textBaseline="alphabetic",Ie.textAlign="left",Ie.fillStyle="black",this.gridOuter=new Float64Array(Ae*Ae),this.gridInner=new Float64Array(Ae*Ae),this.f=new Float64Array(Ae),this.z=new Float64Array(Ae+1),this.v=new Uint16Array(Ae)}_createCanvas(Y){if(typeof OffscreenCanvas!="undefined")return new OffscreenCanvas(Y,Y);let d=document.createElement("canvas");return d.width=d.height=Y,d}draw(Y){let{width:d,actualBoundingBoxAscent:P,actualBoundingBoxDescent:N,actualBoundingBoxLeft:H,actualBoundingBoxRight:$}=this.ctx.measureText(Y),se=Math.ceil(P),de=Math.floor(H),Ae=Math.max(0,Math.min(this.size-this.buffer,Math.ceil($)-de)),Fe=Math.max(0,Math.min(this.size-this.buffer,se+Math.ceil(N))),Ie=Ae+2*this.buffer,Ye=Fe+2*this.buffer,st=Math.max(Ie*Ye,0),dt=new Uint8ClampedArray(st),Pe={data:dt,width:Ie,height:Ye,glyphWidth:Ae,glyphHeight:Fe,glyphTop:se,glyphLeft:de,glyphAdvance:d};if(Ae===0||Fe===0)return Pe;let{ctx:Xe,buffer:at,gridInner:xt,gridOuter:Et}=this;this.lang&&(Xe.lang=this.lang),Xe.clearRect(at,at,Ae,Fe),Xe.fillText(Y,at-de,at+se);let Bt=Xe.getImageData(at,at,Ae,Fe);Et.fill(w,0,st),xt.fill(0,0,st);let St=3;for(let Ht=0;Ht1&&(Ae=d[++de]);let Ie=Math.abs(Fe-Ae.left),Ye=Math.abs(Fe-Ae.right),st=Math.min(Ie,Ye),dt,Pe=$/N*(H+1);if(Ae.isDash){let Xe=H-Math.abs(Pe);dt=Math.sqrt(st*st+Xe*Xe)}else dt=H-Math.sqrt(st*st+Pe*Pe);this.data[se+Fe]=Math.max(0,Math.min(255,dt+128))}}}addRegularDash(d){for(let de=d.length-1;de>=0;--de){let Ae=d[de],Fe=d[de+1];Ae.zeroLength?d.splice(de,1):Fe&&Fe.isDash===Ae.isDash&&(Fe.left=Ae.left,d.splice(de,1))}let P=d[0],N=d[d.length-1];P.isDash===N.isDash&&(P.left=N.left-this.width,N.right=P.right+this.width);let H=this.width*this.nextRow,$=0,se=d[$];for(let de=0;de1&&(se=d[++$]);let Ae=Math.abs(de-se.left),Fe=Math.abs(de-se.right),Ie=Math.min(Ae,Fe);this.data[H+de]=Math.max(0,Math.min(255,(se.isDash?Ie:-Ie)+128))}}addDash(d,P){let N=P?7:0,H=2*N+1;if(this.nextRow+H>this.height)return i.w("LineAtlas out of space"),null;let $=0;for(let de of d)$+=de;if($!==0){let de=this.width/$,Ae=this.getDashRanges(d,this.width,de);P?this.addRoundDash(Ae,de,N):this.addRegularDash(Ae)}let se={y:this.nextRow+N,height:2*N,width:$};return this.nextRow+=H,this.dirty=!0,se}bind(d){let P=d.gl;this.texture?(P.bindTexture(P.TEXTURE_2D,this.texture),this.dirty&&(this.dirty=!1,P.texSubImage2D(P.TEXTURE_2D,0,0,0,this.width,this.height,P.ALPHA,P.UNSIGNED_BYTE,this.data))):(this.texture=P.createTexture(),P.bindTexture(P.TEXTURE_2D,this.texture),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_S,P.REPEAT),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_WRAP_T,P.REPEAT),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MIN_FILTER,P.LINEAR),P.texParameteri(P.TEXTURE_2D,P.TEXTURE_MAG_FILTER,P.LINEAR),P.texImage2D(P.TEXTURE_2D,0,P.ALPHA,this.width,this.height,0,P.ALPHA,P.UNSIGNED_BYTE,this.data))}}let q="maplibre_preloaded_worker_pool";class U{constructor(){this.active={}}acquire(d){if(!this.workers)for(this.workers=[];this.workers.lengthi.m(d,P)))),ce}function K(Y,d){let P=i.O();return i.Q(P,P,[1,1,0]),i.S(P,P,[.5*Y.width,.5*Y.height,1]),Y.calculatePosMatrix?i.U(P,P,Y.calculatePosMatrix(d.toUnwrapped())):P}function _e(Y,d,P,N,H,$,se){var de;let Ae=(function(st,dt,Pe){if(st)for(let Xe of st){let at=dt[Xe];if((at==null?void 0:at.source)===Pe&&at.type==="fill-extrusion")return!0}else for(let Xe in dt){let at=dt[Xe];if(at.source===Pe&&at.type==="fill-extrusion")return!0}return!1})((de=H==null?void 0:H.layers)!==null&&de!==void 0?de:null,d,Y.id),Fe=$.maxPitchScaleFactor(),Ie=Y.tilesIn(N,Fe,Ae);Ie.sort(ne);let Ye=[];for(let st of Ie)Ye.push({wrappedTileID:st.tileID.wrapped().key,queryResults:st.tile.queryRenderedFeatures(d,P,Y.getState(),st.queryGeometry,st.cameraQueryGeometry,st.scale,H,$,Fe,K($,st.tileID),se?(dt,Pe)=>se(st.tileID,dt,Pe):void 0)});return(function(st,dt){for(let Pe in st)for(let Xe of st[Pe])ae(Xe,dt);return st})((function(st){let dt={},Pe={};for(let{queryResults:Xe,wrappedTileID:at}of st){Pe[at]||(Pe[at]={});let xt=Pe[at];for(let Et in Xe){let Bt=Xe[Et];xt[Et]||(xt[Et]={});let St=xt[Et];dt[Et]||(dt[Et]=[]);for(let Pt of Bt)St[Pt.featureIndex]||(St[Pt.featureIndex]=!0,dt[Et].push(Pt))}}return dt})(Ye),Y)}function ne(Y,d){let P=Y.tileID,N=d.tileID;return P.overscaledZ-N.overscaledZ||P.canonical.y-N.canonical.y||P.wrap-N.wrap||P.canonical.x-N.canonical.x}function ae(Y,d){let P=Y.feature,N=d.getFeatureState(P.layer["source-layer"],P.id);P.source=P.layer.source,P.layer["source-layer"]&&(P.sourceLayer=P.layer["source-layer"]),P.state=N}function pe(Y,d,P,N){return i._(this,void 0,void 0,(function*(){let H=Y;if(Y.url?H=(yield i.k(yield d.transformRequest(Y.url,"Source"),P)).data:yield f.frameAsync(P,N),!H)return null;let $=i.V(i.e(H,Y),["tiles","minzoom","maxzoom","attribution","bounds","scheme","tileSize","encoding"]);return"vector_layers"in H&&H.vector_layers&&($.vectorLayerIds=H.vector_layers.map((se=>se.id))),$}))}class ie{constructor(d,P){d&&(P?this.setSouthWest(d).setNorthEast(P):Array.isArray(d)&&(d.length===4?this.setSouthWest([d[0],d[1]]).setNorthEast([d[2],d[3]]):this.setSouthWest(d[0]).setNorthEast(d[1])))}setNorthEast(d){return this._ne=d instanceof i.W?new i.W(d.lng,d.lat):i.W.convert(d),this}setSouthWest(d){return this._sw=d instanceof i.W?new i.W(d.lng,d.lat):i.W.convert(d),this}extend(d){let P=this._sw,N=this._ne,H,$;if(d instanceof i.W)H=d,$=d;else{if(!(d instanceof ie))return Array.isArray(d)?d.length===4||d.every(Array.isArray)?this.extend(ie.convert(d)):this.extend(i.W.convert(d)):d&&("lng"in d||"lon"in d)&&"lat"in d?this.extend(i.W.convert(d)):this;if(H=d._sw,$=d._ne,!H||!$)return this}return P||N?(P.lng=Math.min(H.lng,P.lng),P.lat=Math.min(H.lat,P.lat),N.lng=Math.max($.lng,N.lng),N.lat=Math.max($.lat,N.lat)):(this._sw=new i.W(H.lng,H.lat),this._ne=new i.W($.lng,$.lat)),this}getCenter(){return new i.W((this._sw.lng+this._ne.lng)/2,(this._sw.lat+this._ne.lat)/2)}getSouthWest(){return this._sw}getNorthEast(){return this._ne}getNorthWest(){return new i.W(this.getWest(),this.getNorth())}getSouthEast(){return new i.W(this.getEast(),this.getSouth())}getWest(){return this._sw.lng}getSouth(){return this._sw.lat}getEast(){return this._ne.lng}getNorth(){return this._ne.lat}toArray(){return[this._sw.toArray(),this._ne.toArray()]}toString(){return`LngLatBounds(${this._sw.toString()}, ${this._ne.toString()})`}isEmpty(){return!(this._sw&&this._ne)}contains(d){let{lng:P,lat:N}=i.W.convert(d),H=this._sw.lng<=P&&P<=this._ne.lng;return this._sw.lng>this._ne.lng&&(H=this._sw.lng>=P&&P>=this._ne.lng),this._sw.lat<=N&&N<=this._ne.lat&&H}intersects(d){if(!((d=ie.convert(d)).getNorth()>=this.getSouth()&&d.getSouth()<=this.getNorth()))return!1;let P=Math.abs(this.getEast()-this.getWest()),N=Math.abs(d.getEast()-d.getWest());if(P>=360||N>=360)return!0;let H=i.X(this.getWest(),-180,180),$=i.X(this.getEast(),-180,180),se=i.X(d.getWest(),-180,180),de=i.X(d.getEast(),-180,180),Ae=H>$,Fe=se>de;return!(!Ae||!Fe)||(Ae?de>=H||se<=$:Fe?$>=se||H<=de:se<=$&&de>=H)}static convert(d){return d instanceof ie?d:d&&new ie(d)}static fromLngLat(d,P=0){let N=360*P/40075017,H=N/Math.cos(Math.PI/180*d.lat);return new ie(new i.W(d.lng-H,d.lat-N),new i.W(d.lng+H,d.lat+N))}adjustAntiMeridian(){let d=new i.W(this._sw.lng,this._sw.lat),P=new i.W(this._ne.lng,this._ne.lat);return new ie(d,d.lng>P.lng?new i.W(P.lng+360,P.lat):P)}}class le{constructor(d,P,N){this.bounds=ie.convert(this.validateBounds(d)),this.minzoom=P||0,this.maxzoom=N||24}validateBounds(d){return Array.isArray(d)&&d.length===4?[Math.max(-180,d[0]),Math.max(-90,d[1]),Math.min(180,d[2]),Math.min(90,d[3])]:[-180,-90,180,90]}contains(d){let P=Math.pow(2,d.z),N=Math.floor(i.Z(this.bounds.getWest())*P),H=Math.floor(i.Y(this.bounds.getNorth())*P),$=Math.ceil(i.Z(this.bounds.getEast())*P),se=Math.ceil(i.Y(this.bounds.getSouth())*P);return d.x>=N&&d.x<$&&d.y>=H&&d.y{this._options.tiles=d})),this}setUrl(d){return this.setSourceProperty((()=>{this.url=d,this._options.url=d})),this}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}serialize(){return i.e({},this._options)}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),N={request:yield this.map._requestManager.transformRequest(P,"Tile"),uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,tileSize:this.tileSize*d.tileID.overscaleFactor(),type:this.type,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity,encoding:this.encoding,overzoomParameters:yield this._getOverzoomParameters(d),etag:d.etag};N.request.collectResourceTiming=this._collectResourceTiming;let H="RT";if(d.actor&&d.state!=="expired"){if(d.state==="loading")return new Promise((($,se)=>{d.reloadPromise={resolve:$,reject:se}}))}else d.actor=this.dispatcher.getActor(),H="LT";d.abortController=new AbortController;try{let $=yield d.actor.sendAsync({type:H,data:N},d.abortController);if(delete d.abortController,d.aborted)return;this._afterTileLoadWorkerResponse(d,$);let se={};return $!=null&&$.etagUnmodified&&(se.unmodified=!0),se}catch($){if(delete d.abortController,d.aborted)return;if($&&$.status!==404)throw $;this._afterTileLoadWorkerResponse(d,null)}}))}_getOverzoomParameters(d){return i._(this,void 0,void 0,(function*(){if(d.tileID.canonical.z<=this.maxzoom||this.map._zoomLevelsToOverscale===void 0)return;let P=d.tileID.scaledTo(this.maxzoom).canonical,N=P.url(this.tiles,this.map.getPixelRatio(),this.scheme);return{maxZoomTileID:P,overzoomRequest:yield this.map._requestManager.transformRequest(N,"Tile")}}))}_afterTileLoadWorkerResponse(d,P){if(P!=null&&P.resourceTiming&&(d.resourceTiming=P.resourceTiming),P&&this.map._refreshExpiredTiles&&d.setExpiryData(P),d.etag=P==null?void 0:P.etag,d.loadVectorData(P,this.map.painter),d.reloadPromise){let N=d.reloadPromise;d.reloadPromise=null,this.loadTile(d).then(N.resolve).catch(N.reject)}}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController),d.actor&&(yield d.actor.sendAsync({type:"AT",data:{uid:d.uid,type:this.type,source:this.id}}))}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.unloadVectorData(),d.actor&&(yield d.actor.sendAsync({type:"RMT",data:{uid:d.uid,type:this.type,source:this.id}}))}))}hasTransition(){return!1}}class be extends i.E{constructor(d,P,N,H){super(),this.id=d,this.dispatcher=N,this.setEventedParent(H),this.type="raster",this.minzoom=0,this.maxzoom=22,this.roundZoom=!0,this.scheme="xyz",this.tileSize=512,this._loaded=!1,this._options=i.e({type:"raster"},P),i.e(this,i.V(P,["url","scheme","tileSize"]))}load(){return i._(this,arguments,void 0,(function*(d=!1){this._loaded=!1,this.fire(new i.n("dataloading",{dataType:"source"})),this._tileJSONRequest=new AbortController;try{let P=yield pe(this._options,this.map._requestManager,this._tileJSONRequest,this.map._ownerWindow);this._tileJSONRequest=null,this._loaded=!0,P&&(i.e(this,P),P.bounds&&(this.tileBounds=new le(P.bounds,this.minzoom,this.maxzoom)),this.fire(new i.n("data",{dataType:"source",sourceDataType:"metadata"})),this.fire(new i.n("data",{dataType:"source",sourceDataType:"content",sourceDataChanged:d})))}catch(P){this._tileJSONRequest=null,this._loaded=!0,i.$(P)||this.fire(new i.l(i.d(P)))}}))}loaded(){return this._loaded}onAdd(d){this.map=d,this.load()}onRemove(){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null)}setSourceProperty(d){this._tileJSONRequest&&(this._tileJSONRequest.abort(),this._tileJSONRequest=null),d(),this.load(!0)}setTiles(d){return this.setSourceProperty((()=>{this._options.tiles=d})),this}setUrl(d){return this.setSourceProperty((()=>{this.url=d,this._options.url=d})),this}serialize(){return i.e({},this._options)}hasTile(d){return!this.tileBounds||this.tileBounds.contains(d.canonical)}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme);d.abortController=new AbortController;try{let N=yield x.getImage(yield this.map._requestManager.transformRequest(P,"Tile"),d.abortController,this.map._refreshExpiredTiles);if(delete d.abortController,d.aborted)return void(d.state="unloaded");if(N!=null&&N.data){this.map._refreshExpiredTiles&&(N.cacheControl||N.expires)&&d.setExpiryData({cacheControl:N.cacheControl,expires:N.expires});let H=this.map.painter.context,$=H.gl,se=N.data;d.texture=this.map.painter.getTileTexture(se.width),d.texture?d.texture.update(se,{useMipmap:!0}):(d.texture=new i.T(H,se,$.RGBA,{useMipmap:!0}),d.texture.bind($.LINEAR,$.CLAMP_TO_EDGE,$.LINEAR_MIPMAP_NEAREST)),d.state="loaded"}}catch(N){if(delete d.abortController,d.aborted)d.state="unloaded";else if(N)throw d.state="errored",N}}))}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController)}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.texture&&this.map.painter.saveTileTexture(d.texture)}))}hasTransition(){return!1}}class De extends be{constructor(d,P,N,H){super(d,P,N,H),this.type="raster-dem",this.maxzoom=22,this._options=i.e({type:"raster-dem"},P),this.encoding=P.encoding||"mapbox",this.redFactor=P.redFactor,this.greenFactor=P.greenFactor,this.blueFactor=P.blueFactor,this.baseShift=P.baseShift}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.tileID.canonical.url(this.tiles,this.map.getPixelRatio(),this.scheme),N=yield this.map._requestManager.transformRequest(P,"Tile");d.neighboringTiles=this._getNeighboringTiles(d.tileID),d.abortController=new AbortController;try{let H=yield x.getImage(N,d.abortController,this.map._refreshExpiredTiles);if(delete d.abortController,d.aborted)return void(d.state="unloaded");if(H!=null&&H.data){let $=H.data;this.map._refreshExpiredTiles&&(H.cacheControl||H.expires)&&d.setExpiryData({cacheControl:H.cacheControl,expires:H.expires});let se=i.b($)&&i.a0()?$:yield this.readImageNow($),de={type:this.type,uid:d.uid,source:this.id,rawImageData:se,encoding:this.encoding,redFactor:this.redFactor,greenFactor:this.greenFactor,blueFactor:this.blueFactor,baseShift:this.baseShift};if(d.actor&&d.state!=="expired"&&d.state!=="reloading")return;d.actor&&d.state!=="expired"||(d.actor=this.dispatcher.getActor()),d.dem=yield d.actor.sendAsync({type:"LDT",data:de}),d.needsHillshadePrepare=!0,d.needsTerrainPrepare=!0,d.state="loaded"}}catch(H){if(delete d.abortController,d.aborted)d.state="unloaded";else if(H)throw d.state="errored",H}}))}readImageNow(d){return i._(this,void 0,void 0,(function*(){if(typeof VideoFrame!="undefined"&&i.a1()){let P=d.width+2,N=d.height+2;try{return new i.R({width:P,height:N},yield i.a2(d,-1,-1,P,N))}catch(H){}}return f.getImageData(d,1)}))}_getNeighboringTiles(d){let P=d.canonical,N=Math.pow(2,P.z),H=(P.x-1+N)%N,$=P.x===0?d.wrap-1:d.wrap,se=(P.x+1+N)%N,de=P.x+1===N?d.wrap+1:d.wrap,Ae={};return Ae[new i.a3(d.overscaledZ,$,P.z,H,P.y).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,de,P.z,se,P.y).key]={backfilled:!1},P.y>0&&(Ae[new i.a3(d.overscaledZ,$,P.z,H,P.y-1).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,d.wrap,P.z,P.x,P.y-1).key]={backfilled:!1},Ae[new i.a3(d.overscaledZ,de,P.z,se,P.y-1).key]={backfilled:!1}),P.y+1$.key===N));H>-1&&Y.addOrUpdateProperties.splice(H,1)}return(Y.removeAllProperties||d.removeAllProperties)&&(P.removeAllProperties=!0),(Y.removeProperties||d.removeProperties)&&(P.removeProperties=[...Y.removeProperties||[],...d.removeProperties||[]]),(Y.addOrUpdateProperties||d.addOrUpdateProperties)&&(P.addOrUpdateProperties=[...Y.addOrUpdateProperties||[],...d.addOrUpdateProperties||[]]),(Y.newGeometry||d.newGeometry)&&(P.newGeometry=d.newGeometry||Y.newGeometry),P}function it(Y){var d,P;if(!Y)return{};let N={};return N.removeAll=Y.removeAll,N.remove=new Set(Y.remove||[]),N.add=new Map((d=Y.add)===null||d===void 0?void 0:d.map((H=>[H.id,H]))),N.update=new Map((P=Y.update)===null||P===void 0?void 0:P.map((H=>[H.id,H]))),N}function Oe(Y){return Y&&Y.length!==0?typeof Y[0]=="number"?[Y]:Y.flatMap((d=>Oe(d))):[]}function ze(Y){return Y.type==="GeometryCollection"?Y.geometries.flatMap((d=>ze(d))):Oe(Y.coordinates)}function ct(Y){let d=new ie,P;switch(Y.type){case"FeatureCollection":P=Y.features.flatMap((N=>ze(N.geometry)));break;case"Feature":P=ze(Y.geometry);break;default:P=ze(Y)}if(P.length===0)return d;for(let N of P){let[H,$]=N;d.extend([H,$])}return d}class et extends i.E{constructor(d,P,N,H){super(),this.id=d,this.type="geojson",this.minzoom=0,this.maxzoom=18,this.tileSize=512,this.isTileClipped=!0,this.reparseOverscaled=!0,this._removed=!1,this._isUpdatingWorker=!1,this._pendingWorkerUpdate={data:P.data},this.actor=N.getActor(),this.setEventedParent(H),this._data=typeof P.data=="string"?{url:P.data}:{geojson:P.data},this._options=i.e({},P),this._collectResourceTiming=P.collectResourceTiming,P.maxzoom!==void 0&&(this.maxzoom=P.maxzoom),P.type&&(this.type=P.type),P.attribution&&(this.attribution=P.attribution),this.promoteId=P.promoteId,P.clusterMaxZoom!==void 0&&this.maxzoom<=P.clusterMaxZoom&&i.w(`The maxzoom value "${this.maxzoom}" is expected to be greater than the clusterMaxZoom value "${P.clusterMaxZoom}".`),this.workerOptions=i.e({source:this.id,geojsonVtOptions:{buffer:this._pixelsToTileUnits(P.buffer!==void 0?P.buffer:128),tolerance:this._pixelsToTileUnits(P.tolerance!==void 0?P.tolerance:.375),extent:i.a6,maxZoom:this.maxzoom,lineMetrics:P.lineMetrics||!1,generateId:P.generateId||!1,promoteId:typeof P.promoteId=="string"?P.promoteId:void 0,cluster:P.cluster||!1,clusterOptions:{maxZoom:this._getClusterMaxZoom(P.clusterMaxZoom),minPoints:Math.max(2,P.clusterMinPoints||2),extent:i.a6,radius:this._pixelsToTileUnits(P.clusterRadius||50),log:!1,generateId:P.generateId||!1}},clusterProperties:P.clusterProperties,filter:P.filter},P.workerOptions)}_hasPendingWorkerUpdate(){return this._pendingWorkerUpdate.data!==void 0||this._pendingWorkerUpdate.diff!==void 0||this._pendingWorkerUpdate.updateCluster}_pixelsToTileUnits(d){return d*(i.a6/this.tileSize)}_getClusterMaxZoom(d){let P=d?Math.round(d):this.maxzoom-1;return Number.isInteger(d)||d===void 0||i.w(`Integer expected for option 'clusterMaxZoom': provided value "${d}" rounded to "${P}"`),P}load(){return i._(this,void 0,void 0,(function*(){yield this._updateWorkerData()}))}onAdd(d){this.map=d,this.load()}setData(d,P){this._data=typeof d=="string"?{url:d}:{geojson:d},this._pendingWorkerUpdate={data:d};let N=this._updateWorkerData();return P?N:this}updateData(d,P){this._pendingWorkerUpdate.diff=(function(H,$){if(!H)return $||{};if(!$)return H||{};let se=it(H),de=it($);(function(Fe,Ie){Ie.removeAll&&(Fe.add.clear(),Fe.update.clear(),Fe.remove.clear(),Ie.remove.clear());for(let Ye of Ie.remove)Fe.add.delete(Ye),Fe.update.delete(Ye);for(let[Ye,st]of Ie.update){let dt=Fe.update.get(Ye);dt&&(Ie.update.set(Ye,ht(dt,st)),Fe.update.delete(Ye))}})(se,de);let Ae={};if((se.removeAll||de.removeAll)&&(Ae.removeAll=!0),Ae.remove=new Set([...se.remove,...de.remove]),Ae.add=new Map([...se.add,...de.add]),Ae.update=new Map([...se.update,...de.update]),Ae.remove.size&&Ae.add.size)for(let Fe of Ae.add.keys())Ae.remove.delete(Fe);return(function(Fe){let Ie={};return Fe.removeAll&&(Ie.removeAll=Fe.removeAll),Fe.remove&&(Ie.remove=Array.from(Fe.remove)),Fe.add&&(Ie.add=Array.from(Fe.add.values())),Fe.update&&(Ie.update=Array.from(Fe.update.values())),Ie})(Ae)})(this._pendingWorkerUpdate.diff,d);let N=this._updateWorkerData();return P?N:this}getData(){return i._(this,void 0,void 0,(function*(){return this._data.url&&(yield this.once("data")),this._data.geojson?this._data.geojson:{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}}))}getBounds(){return i._(this,void 0,void 0,(function*(){return ct(yield this.getData())}))}setClusterOptions(d){return this.workerOptions.geojsonVtOptions.cluster=d.cluster,d.clusterRadius!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.radius=this._pixelsToTileUnits(d.clusterRadius)),d.clusterMaxZoom!==void 0&&(this.workerOptions.geojsonVtOptions.clusterOptions.maxZoom=this._getClusterMaxZoom(d.clusterMaxZoom)),this._pendingWorkerUpdate.updateCluster=!0,this._updateWorkerData(),this}getClusterExpansionZoom(d){return this.actor.sendAsync({type:"GCEZ",data:{type:this.type,clusterId:d,source:this.id}})}getClusterChildren(d){return this.actor.sendAsync({type:"GCC",data:{type:this.type,clusterId:d,source:this.id}})}getClusterLeaves(d,P,N){return this.actor.sendAsync({type:"GCL",data:{type:this.type,source:this.id,clusterId:d,limit:P,offset:N}})}_updateWorkerData(){return i._(this,void 0,void 0,(function*(){if(this._isUpdatingWorker)return;if(!this._hasPendingWorkerUpdate())return void i.w(`No pending worker updates for GeoJSONSource ${this.id}.`);let{data:d,diff:P,updateCluster:N}=this._pendingWorkerUpdate,H=this._getLoadGeoJSONParameters(d,P,N);d!==void 0?this._pendingWorkerUpdate.data=void 0:P?this._pendingWorkerUpdate.diff=void 0:N&&(this._pendingWorkerUpdate.updateCluster=void 0),yield this._dispatchWorkerUpdate(H)}))}_getLoadGeoJSONParameters(d,P,N){return i._(this,void 0,void 0,(function*(){let H=i.e({type:this.type},this.workerOptions);return typeof d=="string"?(H.request=yield this.map._requestManager.transformRequest(f.resolveURL(d),"Source"),H.request.collectResourceTiming=this._collectResourceTiming,H):d!==void 0?(H.data=d,H):P?(H.dataDiff=P,H):N?(H.updateCluster=!0,H):void 0}))}_dispatchWorkerUpdate(d){return i._(this,void 0,void 0,(function*(){this._isUpdatingWorker=!0,this.fire(new i.n("dataloading",{dataType:"source"}));try{let P=yield d,N=yield this.actor.sendAsync({type:"LD",data:P});if(this._isUpdatingWorker=!1,this._removed||N.abandoned)return void this.fire(new i.n("dataabort",{dataType:"source"}));N.data&&(this._data={geojson:N.data});let H=this._applyDiffToSource(P.dataDiff),$=this._getShouldReloadTileOptions(H),se={dataType:"source"};this._applyResourceTiming(se,N),this.fire(new i.n("data",Object.assign(Object.assign({},se),{sourceDataType:"metadata"}))),this.fire(new i.n("data",Object.assign(Object.assign({},se),{sourceDataType:"content",shouldReloadTileOptions:$})))}catch(P){if(this._isUpdatingWorker=!1,this._removed)return void this.fire(new i.n("dataabort",{dataType:"source"}));this.fire(new i.l(i.d(P)))}finally{this._hasPendingWorkerUpdate()&&this._updateWorkerData()}}))}_applyResourceTiming(d,P){var N;if(!this._collectResourceTiming)return;let H=(N=P.resourceTiming)===null||N===void 0?void 0:N[this.id];if(!H)return;let $=H.slice(0);$!=null&&$.length&&i.e(d,{resourceTiming:$})}_applyDiffToSource(d){if(!d)return;let P=typeof this.promoteId=="string"?this.promoteId:void 0;if(!this._data.url&&!this._data.updateable){let H=(function($,se){let de=new Map;if($==null||$.type==null)return de;if($.type==="Feature"){let Ae=Ge($,se);return Ae==null?void 0:(de.set(Ae,$),de)}if($.type==="FeatureCollection"){let Ae=new Set;for(let Fe of $.features){let Ie=Ge(Fe,se);if(Ie==null||Ae.has(Ie))return;Ae.add(Ie),de.set(Ie,Fe)}return de}})(this._data.geojson,P);if(!H)throw new Error(`GeoJSONSource "${this.id}": GeoJSON data is not compatible with updateData`);this._data={updateable:H}}if(!this._data.updateable)return;let N=(function(H,$,se){var de,Ae;let Fe=[];if($.removeAll)H.clear();else if($.remove)for(let Ie of $.remove){let Ye=H.get(Ie);Ye&&(Fe.push(Ye.geometry),H.delete(Ie))}if($.add)for(let Ie of $.add){let Ye=Ge(Ie,se);if(Ye==null)continue;let st=H.get(Ye);st&&Fe.push(st.geometry),Fe.push(Ie.geometry),H.set(Ye,Ie)}if($.update)for(let Ie of $.update){let Ye=H.get(Ie.id);if(!Ye)continue;let st=!!Ie.newGeometry,dt=Ie.removeAllProperties||((de=Ie.removeProperties)===null||de===void 0?void 0:de.length)>0||((Ae=Ie.addOrUpdateProperties)===null||Ae===void 0?void 0:Ae.length)>0;if(!st&&!dt)continue;Fe.push(Ye.geometry);let Pe=Object.assign({},Ye);if(H.set(Ie.id,Pe),st&&(Fe.push(Ie.newGeometry),Pe.geometry=Ie.newGeometry),dt){if(Pe.properties=Ie.removeAllProperties?{}:Object.assign({},Pe.properties||{}),Ie.removeProperties)for(let Xe of Ie.removeProperties)delete Pe.properties[Xe];if(Ie.addOrUpdateProperties)for(let{key:Xe,value:at}of Ie.addOrUpdateProperties)Pe.properties[Xe]=at}}return Fe})(this._data.updateable,d,P);return d.removeAll||this._options.cluster?void 0:N}_getShouldReloadTileOptions(d){if(d)return{affectedBounds:d.filter(Boolean).map((P=>ct(P)))}}shouldReloadTile(d,{affectedBounds:P}){if(d.state==="loading")return!0;if(d.state==="unloaded")return!1;let{buffer:N,extent:H}=this.workerOptions.geojsonVtOptions,$=(function({x:se,y:de,z:Ae},Fe=0){let Ie=i.a4((se-Fe)/Math.pow(2,Ae)),Ye=i.a5((de+1+Fe)/Math.pow(2,Ae)),st=i.a4((se+1+Fe)/Math.pow(2,Ae)),dt=i.a5((de-Fe)/Math.pow(2,Ae));return new ie([Ie,Ye],[st,dt])})(d.tileID.canonical,N/H);for(let se of P)if($.intersects(se))return!0;return!1}loaded(){return!this._isUpdatingWorker&&!this._hasPendingWorkerUpdate()}loadTile(d){return i._(this,void 0,void 0,(function*(){let P=d.actor?"RT":"LT";d.actor=this.actor;let N={type:this.type,uid:d.uid,tileID:d.tileID,zoom:d.tileID.overscaledZ,maxZoom:this.maxzoom,tileSize:this.tileSize,source:this.id,pixelRatio:this.map.getPixelRatio(),showCollisionBoxes:this.map.showCollisionBoxes,promoteId:this.promoteId,subdivisionGranularity:this.map.style.projection.subdivisionGranularity};d.abortController=new AbortController;let H=yield this.actor.sendAsync({type:P,data:N},d.abortController);delete d.abortController,d.unloadVectorData(),d.aborted||d.loadVectorData(H,this.map.painter,P==="RT")}))}abortTile(d){return i._(this,void 0,void 0,(function*(){d.abortController&&(d.abortController.abort(),delete d.abortController),d.aborted=!0}))}unloadTile(d){return i._(this,void 0,void 0,(function*(){d.unloadVectorData(),yield this.actor.sendAsync({type:"RMT",data:{uid:d.uid,type:this.type,source:this.id}})}))}onRemove(){this._removed=!0,this.actor.sendAsync({type:"RS",data:{type:this.type,source:this.id}})}serialize(){return i.e({},this._options,{type:this.type,data:this._data.updateable?{type:"FeatureCollection",features:Array.from(this._data.updateable.values())}:this._data.url||this._data.geojson})}hasTransition(){return!1}}class qe extends i.E{constructor(d,P,N,H){super(),this.flippedWindingOrder=!1,this.id=d,this.dispatcher=N,this.coordinates=P.coordinates,this.type="image",this.minzoom=0,this.maxzoom=22,this.tileSize=512,this.tiles={},this._loaded=!1,this.setEventedParent(H),this.options=P}load(d){return i._(this,void 0,void 0,(function*(){this._loaded=!1,this.fire(new i.n("dataloading",{dataType:"source"})),this.url=this.options.url,this._request=new AbortController;try{let P=yield x.getImage(yield this.map._requestManager.transformRequest(this.url,"Image"),this._request);this._request=null,this._loaded=!0,P!=null&&P.data&&(this.image=P.data,d&&(this.coordinates=d),this._finishLoading())}catch(P){this._request=null,this._loaded=!0,i.$(P)||this.fire(new i.l(i.d(P)))}}))}loaded(){return this._loaded}updateImage(d){return d.url?(this._request&&(this._request.abort(),this._request=null),this.options.url=d.url,this.load(d.coordinates).finally((()=>this.texture=null)),this):this}_finishLoading(){this.map&&(this.setCoordinates(this.coordinates),this.fire(new i.n("data",{dataType:"source",sourceDataType:"metadata"})))}onAdd(d){this.map=d,this.load()}onRemove(){this._request&&(this._request.abort(),this._request=null)}setCoordinates(d){this.coordinates=d;let P=d.map(i.a7.fromLngLat);var N;return this.tileID=(function(H){let $=i.a8.fromPoints(H),se=$.width(),de=$.height(),Ae=Math.max(se,de),Fe=Math.max(0,Math.floor(-Math.log(Ae)/Math.LN2)),Ie=Math.pow(2,Fe);return new i.aa(Fe,Math.floor(($.minX+$.maxX)/2*Ie),Math.floor(($.minY+$.maxY)/2*Ie))})(P),this.terrainTileRanges=this._getOverlappingTileRanges(P),this.minzoom=this.maxzoom=this.tileID.z,this.tileCoords=P.map((H=>this.tileID.getTilePoint(H)._round())),this.flippedWindingOrder=((N=this.tileCoords)[1].x-N[0].x)*(N[2].y-N[0].y)-(N[1].y-N[0].y)*(N[2].x-N[0].x)<0,this.fire(new i.n("data",{dataType:"source",sourceDataType:"content"})),this}prepare(){if(Object.keys(this.tiles).length===0||!this.image)return;let d=this.map.painter.context,P=d.gl;this.texture||(this.texture=new i.T(d,this.image,P.RGBA),this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE));let N=!1;for(let H in this.tiles){let $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture,N=!0)}N&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}loadTile(d){return i._(this,void 0,void 0,(function*(){var P;!((P=this.tileID)===null||P===void 0)&&P.equals(d.tileID.canonical)?(this.tiles[String(d.tileID.wrap)]=d,d.buckets={}):d.state="errored"}))}serialize(){return{type:"image",url:this.options.url,coordinates:this.coordinates}}hasTransition(){return!1}_getOverlappingTileRanges(d){let{minX:P,minY:N,maxX:H,maxY:$}=i.a8.fromPoints(d),se={};for(let de=0;de<=i.a9;de++){let Ae=Math.pow(2,de),Fe=Math.floor(P*Ae),Ie=Math.floor(N*Ae),Ye=Math.floor(H*Ae),st=Math.floor($*Ae),dt=(Fe%Ae+Ae)%Ae,Pe=Ye%Ae,Xe=Math.floor(Fe/Ae),at=Math.floor(Ye/Ae);se[de]={minWrap:Xe,maxWrap:at,minTileXWrapped:dt,maxTileXWrapped:Pe,minTileY:Ie,maxTileY:st}}return se}}class we extends qe{constructor(d,P,N,H){super(d,P,N,H),this._onPlayingHandler=()=>{var $;($=this.map)===null||$===void 0||$.triggerRepaint()},this.roundZoom=!0,this.type="video",this.options=P}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!1;let d=this.options;this.urls=[];for(let P of d.urls)this.urls.push((yield this.map._requestManager.transformRequest(P,"Source")).url);try{let P=yield i.ab(this.urls);if(this._loaded=!0,!P)return;this.video=P,this.video.loop=!0,this.video.addEventListener("playing",this._onPlayingHandler),this.map&&this.video.play(),this._finishLoading()}catch(P){this.fire(new i.l(i.d(P)))}}))}pause(){this.video&&this.video.pause()}play(){this.video&&this.video.play()}seek(d){if(this.video){let P=this.video.seekable;dP.end(0)?this.fire(new i.l(new i.ac(`sources.${this.id}`,null,`Playback for this video can be set only between the ${P.start(0)} and ${P.end(0)}-second mark.`))):this.video.currentTime=d}}getVideo(){return this.video}onAdd(d){this.map||(this.map=d,this.load(),this.video&&(this.video.play(),this.setCoordinates(this.coordinates)))}onRemove(){super.onRemove(),this.video&&(this.video.removeEventListener("playing",this._onPlayingHandler),this.video.pause())}prepare(){if(Object.keys(this.tiles).length===0||this.video.readyState<2)return;let d=this.map.painter.context,P=d.gl;this.texture?this.video.paused||(this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE),P.texSubImage2D(P.TEXTURE_2D,0,0,0,P.RGBA,P.UNSIGNED_BYTE,this.video)):(this.texture=new i.T(d,this.video,P.RGBA),this.texture.bind(P.LINEAR,P.CLAMP_TO_EDGE));let N=!1;for(let H in this.tiles){let $=this.tiles[H];$.state!=="loaded"&&($.state="loaded",$.texture=this.texture,N=!0)}N&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"video",urls:this.urls,coordinates:this.coordinates}}hasTransition(){return this.video&&!this.video.paused}}class Le extends qe{constructor(d,P,N,H){super(d,P,N,H),P.coordinates?Array.isArray(P.coordinates)&&P.coordinates.length===4&&!P.coordinates.some(($=>!Array.isArray($)||$.length!==2||$.some((se=>typeof se!="number"))))||this.fire(new i.l(new i.ac(`sources.${d}`,null,'"coordinates" property must be an array of 4 longitude/latitude array pairs'))):this.fire(new i.l(new i.ac(`sources.${d}`,null,'missing required property "coordinates"'))),P.animate&&typeof P.animate!="boolean"&&this.fire(new i.l(new i.ac(`sources.${d}`,null,'optional "animate" property must be a boolean value'))),P.canvas?typeof P.canvas=="string"||P.canvas instanceof HTMLCanvasElement||this.fire(new i.l(new i.ac(`sources.${d}`,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 i.l(new i.ac(`sources.${d}`,null,'missing required property "canvas"'))),this.options=P,this.animate=P.animate===void 0||P.animate}load(){return i._(this,void 0,void 0,(function*(){this._loaded=!0,this.canvas||(this.canvas=this.options.canvas instanceof HTMLCanvasElement?this.options.canvas:document.getElementById(this.options.canvas)),this.width=this.canvas.width,this.height=this.canvas.height,this._hasInvalidDimensions()?this.fire(new i.l(new Error("Canvas dimensions cannot be less than or equal to zero."))):(this.play=function(){this._playing=!0,this.map.triggerRepaint()},this.pause=function(){this._playing&&(this.prepare(),this._playing=!1)},this._finishLoading())}))}getCanvas(){return this.canvas}onAdd(d){this.map=d,this.load(),this.canvas&&this.animate&&this.play()}onRemove(){this.pause()}prepare(){let d=!1;if(this.canvas.width!==this.width&&(this.width=this.canvas.width,d=!0),this.canvas.height!==this.height&&(this.height=this.canvas.height,d=!0),this._hasInvalidDimensions()||Object.keys(this.tiles).length===0)return;let P=this.map.painter.context,N=P.gl;this.texture?(d||this._playing)&&this.texture.update(this.canvas,{premultiply:!0}):(this.texture=new i.T(P,this.canvas,N.RGBA,{premultiply:!0}),this.texture.bind(N.LINEAR,N.CLAMP_TO_EDGE));let H=!1;for(let $ in this.tiles){let se=this.tiles[$];se.state!=="loaded"&&(se.state="loaded",se.texture=this.texture,H=!0)}H&&this.fire(new i.n("data",{dataType:"source",sourceDataType:"idle",sourceId:this.id}))}serialize(){return{type:"canvas",animate:this.animate,canvas:this.options.canvas,coordinates:this.coordinates}}hasTransition(){return this._playing}_hasInvalidDimensions(){for(let d of[this.canvas.width,this.canvas.height])if(isNaN(d)||d<=0)return!0;return!1}}let Ke={},Te=Y=>{switch(Y){case"geojson":return et;case"image":return qe;case"raster":return be;case"raster-dem":return De;case"vector":return me;case"video":return we;case"canvas":return Le}return Ke[Y]},Ve="RTLPluginLoaded";class $e extends i.E{constructor(){super(...arguments),this.status="unavailable",this.url=null,this.dispatcher=ue()}_syncState(d){return this.status=d,this.dispatcher.broadcast("SRPS",{pluginStatus:d,pluginURL:this.url}).catch((P=>{throw this.status="error",P}))}getRTLTextPluginStatus(){return this.status}clearRTLTextPlugin(){this.status="unavailable",this.url=null}setRTLTextPlugin(d){return i._(this,arguments,void 0,(function*(P,N=!1){if(this.url)throw new Error("setRTLTextPlugin cannot be called multiple times.");if(this.url=f.resolveURL(P),!this.url)throw new Error(`requested url ${P} is invalid`);if(this.status==="unavailable"){if(!N)return this._requestImport();this.status="deferred",this._syncState(this.status)}else if(this.status==="requested")return this._requestImport()}))}_requestImport(){return i._(this,void 0,void 0,(function*(){yield this._syncState("loading"),this.status="loaded",this.fire(new i.n(Ve))}))}lazyLoad(){this.status==="unavailable"?this.status="requested":this.status==="deferred"&&this._requestImport()}}let ot=null;function tt(){return ot||(ot=new $e),ot}var nt,We;(function(Y){Y[Y.Base=0]="Base",Y[Y.Parent=1]="Parent"})(nt||(nt={})),(function(Y){Y[Y.Departing=0]="Departing",Y[Y.Incoming=1]="Incoming"})(We||(We={}));class mt{constructor(d,P){this.timeAdded=0,this.fadeEndTime=0,this.fadeOpacity=1,this.tileID=d,this.uid=i.ad(),this.uses=0,this.tileSize=P,this.buckets={},this.expirationTime=null,this.queryPadding=0,this.hasSymbolBuckets=!1,this.hasRTLText=!1,this.dependencies={},this.rtt=[],this.rttFingerprint={},this.expiredRequestCount=0,this.state="loading"}isRenderable(d){return this.hasData()&&(!this.fadeEndTime||this.fadeOpacity>0)&&(d||!this.holdingForSymbolFade())}setCrossFadeLogic({fadingRole:d,fadingDirection:P,fadingParentID:N,fadeEndTime:H}){this.resetFadeLogic(),this.fadingRole=d,this.fadingDirection=P,this.fadingParentID=N,this.fadeEndTime=H}setSelfFadeLogic(d){this.resetFadeLogic(),this.selfFading=!0,this.fadeEndTime=d}resetFadeLogic(){this.fadingRole=null,this.fadingDirection=null,this.fadingParentID=null,this.selfFading=!1,this.timeAdded=g(),this.fadeEndTime=0,this.fadeOpacity=1}wasRequested(){return this.state==="errored"||this.state==="loaded"||this.state==="reloading"}clearTextures(d){this.demTexture&&d.saveTileTexture(this.demTexture),this.demTexture=null}loadVectorData(d,P,N){if((d==null?void 0:d.etagUnmodified)!==!0)if(this.hasData()&&this.unloadVectorData(),this.state="loaded",d){d.featureIndex&&(this.latestFeatureIndex=d.featureIndex,d.rawTileData?(this.latestRawTileData=d.rawTileData,this.latestEncoding=d.encoding,this.latestFeatureIndex.rawTileData=d.rawTileData,this.latestFeatureIndex.encoding=d.encoding):this.latestRawTileData&&(this.latestFeatureIndex.rawTileData=this.latestRawTileData,this.latestFeatureIndex.encoding=this.latestEncoding)),this.collisionBoxArray=d.collisionBoxArray,this.buckets=(function(H,$){let se={};if(!$)return se;for(let de of H){let Ae=de.layerIds.map((Fe=>$.getLayer(Fe))).filter(Boolean);if(Ae.length!==0){de.layers=Ae,de.stateDependentLayerIds&&(de.stateDependentLayers=de.stateDependentLayerIds.map((Fe=>Ae.filter((Ie=>Ie.id===Fe))[0])));for(let Fe of Ae)se[Fe.id]=de}}return se})(d.buckets,P==null?void 0:P.style),this.hasSymbolBuckets=!1;for(let H in this.buckets){let $=this.buckets[H];if($ instanceof i.af){if(this.hasSymbolBuckets=!0,!N)break;$.justReloaded=!0}}if(this.hasRTLText=!1,this.hasSymbolBuckets)for(let H in this.buckets){let $=this.buckets[H];if($ instanceof i.af&&$.hasRTLText){this.hasRTLText=!0,tt().lazyLoad();break}}this.queryPadding=0;for(let H in this.buckets){let $=this.buckets[H];this.queryPadding=Math.max(this.queryPadding,P.style.getLayer(H).queryRadius($))}d.imageAtlas&&(this.imageAtlas=d.imageAtlas),d.glyphAtlasImage&&(this.glyphAtlasImage=d.glyphAtlasImage),this.dashPositions=d.dashPositions}else this.collisionBoxArray=new i.ae;else this.state="loaded"}unloadVectorData(){for(let d in this.buckets)this.buckets[d].destroy();this.buckets={},this.imageAtlasTexture&&this.imageAtlasTexture.destroy(),this.glyphAtlasTexture&&this.glyphAtlasTexture.destroy(),this.imageAtlas=null,this.dashPositions=null,this.latestFeatureIndex=null,this.state="unloaded"}getBucket(d){return this.buckets[d.id]}upload(d){for(let N in this.buckets){let H=this.buckets[N];H.uploadPending()&&H.upload(d)}let P=d.gl;this.imageAtlas&&!this.imageAtlas.uploaded&&(this.imageAtlasTexture=new i.T(d,this.imageAtlas.image,P.RGBA),this.imageAtlas.uploaded=!0),this.glyphAtlasImage&&(this.glyphAtlasTexture=new i.T(d,this.glyphAtlasImage,P.ALPHA),this.glyphAtlasImage=null)}prepare(d){this.imageAtlas&&this.imageAtlas.patchUpdatedImages(d,this.imageAtlasTexture)}queryRenderedFeatures(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye){var st;return!((st=this.latestFeatureIndex)===null||st===void 0)&&st.rawTileData?this.latestFeatureIndex.query({queryGeometry:H,cameraQueryGeometry:$,scale:se,tileSize:this.tileSize,pixelPosMatrix:Ie,transform:Ae,params:de,queryPadding:this.queryPadding*Fe,getElevation:Ye},d,P,N):{}}querySourceFeatures(d,P){let N=this.latestFeatureIndex;if(!(N!=null&&N.rawTileData))return;let H=N.loadVTLayers(),$=P!=null&&P.sourceLayer?P.sourceLayer:"",se=H[i.ag]||H[$];if(!se)return;let de=i.ah(P==null?void 0:P.filter,P==null?void 0:P.globalState),{z:Ae,x:Fe,y:Ie}=this.tileID.canonical,Ye={z:Ae,x:Fe,y:Ie};for(let st=0;stN)H=!1;else if(P)if(this.expirationTime({zoom:0,x:0,y:0,wrap:Pt,fullyVisible:!1}),Bt=[],St=[];if(Y.renderWorldCopies&&se.allowWorldCopies())for(let Pt=1;Pt<=3;Pt++)Bt.push(Et(-Pt)),Bt.push(Et(Pt));for(Bt.push(Et(0));Bt.length>0;){let Pt=Bt.pop(),$t=Pt.x,Ht=Pt.y,dr=Pt.fullyVisible,Xr={x:$t,y:Ht,z:Pt.zoom},Or=se.getTileBoundingVolume(Xr,Pt.wrap,Y.elevation,d);if(!dr){let Rr=Ct(P,Or,N);if(Rr===0)continue;dr=Rr===2}let $r=se.distanceToTile2d(H.x,H.y,Xr,Or),Er=Ae;de&&(Er=(d.calculateTileZoom||Mt)(Y.zoom+i.ar(Y.tileSize/d.tileSize),$r,at,xt,Y.fov)),Er=(d.roundZoom?Math.round:Math.floor)(Er),Er=Math.max(0,Er);let Tr=Math.min(Er,Ie);if(Pt.wrap=se.getWrap($,Xr,Pt.wrap),Pt.zoom>=Tr){if(Pt.zoom>1),wrap:Pt.wrap,fullyVisible:dr})}return St.sort(((Pt,$t)=>Pt.distanceSq-$t.distanceSq)).map((Pt=>Pt.tileID))}let kt=i.a8.fromPoints([new i.P(0,0),new i.P(i.a6,i.a6)]);function rr(Y){return Y==="raster"||Y==="image"||Y==="video"}function pr(Y,d,P,N,H,$,se){if(!d.hasData())return!1;let{tileID:de,fadingRole:Ae,fadingDirection:Fe,fadingParentID:Ie}=d;if(Ae===nt.Base&&Fe===We.Incoming&&Ie)return P[Ie.key]=Ie,!0;let Ye=Math.max(de.overscaledZ-H,$);for(let st=de.overscaledZ-1;st>=Ye;st--){let dt=de.scaledTo(st),Pe=Y.getLoadedTile(dt);if(Pe)return d.setCrossFadeLogic({fadingRole:nt.Base,fadingDirection:We.Incoming,fadingParentID:Pe.tileID,fadeEndTime:N+se}),Pe.setCrossFadeLogic({fadingRole:nt.Parent,fadingDirection:We.Departing,fadeEndTime:N+se}),P[dt.key]=dt,!0}return!1}function Kr(Y,d,P,N,H,$){if(!d.hasData())return!1;let se=d.tileID.children(H),de=Nr(Y,d,se,P,N,H,$);if(de)return!0;for(let Ae of se)Nr(Y,d,Ae.children(H),P,N,H,$)&&(de=!0);return de}function Nr(Y,d,P,N,H,$,se){if(P[0].overscaledZ>=$)return!1;let de=!1;for(let Ae of P){let Fe=Y.getLoadedTile(Ae);if(!Fe)continue;let{fadingRole:Ie,fadingDirection:Ye,fadingParentID:st}=Fe;Ie===nt.Base&&Ye===We.Departing&&st||(Fe.setCrossFadeLogic({fadingRole:nt.Base,fadingDirection:We.Departing,fadingParentID:d.tileID,fadeEndTime:H+se}),d.setCrossFadeLogic({fadingRole:nt.Parent,fadingDirection:We.Incoming,fadeEndTime:H+se})),N[Ae.key]=Ae,de=!0}return de}function dn(Y,d,P,N){let H=Y.tileID;return!!Y.selfFading||!Y.hasData()&&!!d.has(H)&&(Y.setSelfFadeLogic(P+N),!0)}function xr(Y,d){var P;Y.needsHillshadePrepare=!0,Y.needsTerrainPrepare=!0;let N=d.tileID.canonical.x-Y.tileID.canonical.x,H=d.tileID.canonical.y-Y.tileID.canonical.y,$=Math.pow(2,Y.tileID.canonical.z),se=d.tileID.key;N===0&&H===0||Math.abs(H)>1||(Math.abs(N)>1&&(Math.abs(N+$)===1?N+=$:Math.abs(N-$)===1&&(N-=$)),d.dem&&Y.dem&&(Y.dem.backfillBorder(d.dem,N,H),!((P=Y.neighboringTiles)===null||P===void 0)&&P[se]&&(Y.neighboringTiles[se].backfilled=!0)))}class Fr{constructor(){this._tiles={}}handleWrapJump(d){let P={};for(let N in this._tiles){let H=this._tiles[N];H.tileID=H.tileID.unwrapTo(H.tileID.wrap+d),P[H.tileID.key]=H}this._tiles=P}setFeatureState(d,P){for(let N in this._tiles)this._tiles[N].setFeatureState(d,P)}getAllTiles(){return Object.values(this._tiles)}getAllIds(d=!1){return d?Object.values(this._tiles).map((P=>P.tileID)).sort(i.au).map((P=>P.key)):Object.keys(this._tiles)}getTileById(d){return this._tiles[d]}setTile(d,P){this._tiles[d]=P}deleteTileById(d){delete this._tiles[d]}getLoadedTile(d){let P=this.getTileById(d.key);return P!=null&&P.hasData()?P:null}isIdRenderable(d,P=!1){var N;return(N=this.getTileById(d))===null||N===void 0?void 0:N.isRenderable(P)}getRenderableIds(d=0,P){let N=[];for(let H of this.getAllIds())this.isIdRenderable(H,P)&&N.push(this.getTileById(H));return P?N.sort(((H,$)=>{let se=H.tileID,de=$.tileID,Ae=new i.P(se.canonical.x,se.canonical.y)._rotate(-d),Fe=new i.P(de.canonical.x,de.canonical.y)._rotate(-d);return se.overscaledZ-de.overscaledZ||Fe.y-Ae.y||Fe.x-Ae.x})).map((H=>H.tileID.key)):N.map((H=>H.tileID)).sort(i.au).map((H=>H.key))}}class Zr extends i.E{constructor(d,P,N){super(),this.id=d,this.dispatcher=N,this.on("data",(H=>{this._dataHandler(H)})),this.on("dataloading",(()=>{this._sourceErrored=!1})),this.on("error",(()=>{this._sourceErrored=this._source.loaded()})),this._source=((H,$,se,de)=>{let Ae=new(Te($.type))(H,$,se,de);if(Ae.id!==H)throw new Error(`Expected Source id to be ${H} instead of ${Ae.id}`);return Ae})(d,P,N,this),this._inViewTiles=new Fr,this._outOfViewCache=new i.av(0,(H=>this._unloadTile(H))),this._timers={},this._maxTileCacheSize=null,this._maxTileCacheZoomLevels=null,this._rasterFadeDuration=0,this._maxFadingAncestorLevels=5,this._state=new bt,this._didEmitContent=!1,this._updated=!1}onAdd(d){var P;this.map=d,this._maxTileCacheSize=d?d._maxTileCacheSize:null,this._maxTileCacheZoomLevels=d?d._maxTileCacheZoomLevels:null,!((P=this._source)===null||P===void 0)&&P.onAdd&&this._source.onAdd(d)}onRemove(d){var P;for(let N of this._inViewTiles.getAllTiles())N.unloadVectorData();this.clearTiles(),!((P=this._source)===null||P===void 0)&&P.onRemove&&this._source.onRemove(d),this._inViewTiles=new Fr}loaded(){if(this._sourceErrored)return!0;if(!this._sourceLoaded||!this._source.loaded())return!1;if(!(this.used===void 0&&this.usedForTerrain===void 0||this.used||this.usedForTerrain))return!0;if(!this._updated)return!1;for(let d of this._inViewTiles.getAllTiles())if(d.state!=="loaded"&&d.state!=="errored")return!1;return!0}getSource(){return this._source}getState(){return this._state}pause(){this._paused=!0}resume(){if(!this._paused)return;let d=this._shouldReloadOnResume;this._paused=!1,this._shouldReloadOnResume=!1,d&&this.reload(),this.transform&&this.update(this.transform,this.terrain)}_loadTile(d,P,N){return i._(this,void 0,void 0,(function*(){try{let H=yield this._source.loadTile(d);this._tileLoaded(d,P,N,H)}catch(H){d.state="errored",H.status!==404?this._source.fire(new i.l(i.d(H),{tile:d})):this.update(this.transform,this.terrain)}}))}_unloadTile(d){this._source.unloadTile&&this._source.unloadTile(d)}_abortTile(d){this._source.abortTile&&this._source.abortTile(d),this._source.fire(new i.n("dataabort",{tile:d,coord:d.tileID,dataType:"source"}))}serialize(){return this._source.serialize()}prepare(d){this._source.prepare&&this._source.prepare(),this._state.coalesceChanges(this._inViewTiles,this.map?this.map.painter:null);for(let P of this._inViewTiles.getAllTiles())P.upload(d),P.prepare(this.map.style.imageManager)}getIds(){return this._inViewTiles.getAllIds(!0)}getRenderableIds(d){var P;return this._inViewTiles.getRenderableIds((P=this.transform)===null||P===void 0?void 0:P.bearingInRadians,d)}hasRenderableParent(d){let P=d.overscaledZ-1;if(P>=this._source.minzoom){let N=this.getLoadedTile(d.scaledTo(P));if(N)return this._inViewTiles.isIdRenderable(N.tileID.key)}return!1}reload(d,P=void 0){if(this._paused)this._shouldReloadOnResume=!0;else{this._outOfViewCache.reset();for(let N of this._inViewTiles.getAllIds()){let H=this._inViewTiles.getTileById(N);P&&!this._source.shouldReloadTile(H,P)||(d?this._reloadTile(N,"expired"):H.state!=="errored"&&this._reloadTile(N,"reloading"))}}}_reloadTile(d,P){return i._(this,void 0,void 0,(function*(){let N=this._inViewTiles.getTileById(d);N&&(N.state!=="loading"&&(N.state=P),yield this._loadTile(N,d,P))}))}_tileLoaded(d,P,N,H){d.timeAdded=g(),d.selfFading&&(d.fadeEndTime=d.timeAdded+this._rasterFadeDuration),N==="expired"&&(d.refreshedUponExpiration=!0),this._setTileReloadTimer(P,d),H!=null&&H.unmodified||(this.getSource().type==="raster-dem"&&d.dem&&(function($,se){var de,Ae,Fe;let Ie=se.getRenderableIds();for(let Ye of Ie){if(!(!((de=$.neighboringTiles)===null||de===void 0)&&de[Ye]))continue;let st=se.getTileById(Ye);$.neighboringTiles[Ye].backfilled||xr($,st),!((Fe=(Ae=st.neighboringTiles)===null||Ae===void 0?void 0:Ae[$.tileID.key])===null||Fe===void 0)&&Fe.backfilled||xr(st,$)}})(d,this._inViewTiles),this._state.initializeTileState(d,this.map?this.map.painter:null),d.aborted||this._source.fire(new i.n("data",{dataType:"source",tile:d,coord:d.tileID})))}getTile(d){return this.getTileByID(d.key)}getTileByID(d){return this._inViewTiles.getTileById(d)}_retainLoadedChildren(d,P){let N=this._getLoadedDescendents(P),H=new Set;for(let $ of P){let se=N[$.key];if(!(se!=null&&se.length)){H.add($);continue}let de=$.overscaledZ+Zr.maxOverzooming,Ae=se.filter((Ye=>Ye.tileID.overscaledZ<=de));if(!Ae.length){H.add($);continue}let Fe=Math.min(...Ae.map((Ye=>Ye.tileID.overscaledZ))),Ie=Ae.filter((Ye=>Ye.tileID.overscaledZ===Fe)).map((Ye=>Ye.tileID));for(let Ye of Ie)d[Ye.key]=Ye;this._areDescendentsComplete(Ie,Fe,$.overscaledZ)||H.add($)}return H}_getLoadedDescendents(d){var P;let N={};for(let H of this._inViewTiles.getAllTiles().filter(($=>$.hasData())))for(let $ of d)H.tileID.isChildOf($)&&(N[P=$.key]||(N[P]=[]),N[$.key].push(H));return N}_areDescendentsComplete(d,P,N){return d.length===1&&d[0].isOverscaled()?d[0].overscaledZ===P:Math.pow(4,P-N)===d.length}getLoadedTile(d){return this._inViewTiles.getLoadedTile(d)}updateCacheSize(d){let P=Math.ceil(d.width/this._source.tileSize)+1,N=Math.ceil(d.height/this._source.tileSize)+1,H=Math.floor(P*N*(this._maxTileCacheZoomLevels===null?i.c.MAX_TILE_CACHE_ZOOM_LEVELS:this._maxTileCacheZoomLevels)),$=typeof this._maxTileCacheSize=="number"?Math.min(this._maxTileCacheSize,H):H;this._outOfViewCache.setMaxSize($)}handleWrapJump(d){let P=Math.round((d-(this._prevLng===void 0?d:this._prevLng))/360);this._prevLng=d,P&&(this._inViewTiles.handleWrapJump(P),this._resetTileReloadTimers())}update(d,P){if(!this._sourceLoaded||this._paused)return;let N;this.transform=d,this.terrain=P,this.updateCacheSize(d),this.handleWrapJump(this.transform.center.lng),this.used||this.usedForTerrain?this._source.tileID?N=d.getVisibleUnwrappedCoordinates(this._source.tileID).map((Ae=>new i.a3(Ae.canonical.z,Ae.wrap,Ae.canonical.z,Ae.canonical.x,Ae.canonical.y))):(N=ft(d,{tileSize:this.usedForTerrain?this.tileSize:this._source.tileSize,minzoom:this._source.minzoom,maxzoom:this._source.type==="vector"&&this.map._zoomLevelsToOverscale!==void 0?d.maxZoom-this.map._zoomLevelsToOverscale:this._source.maxzoom,roundZoom:!this.usedForTerrain&&this._source.roundZoom,reparseOverscaled:this._source.reparseOverscaled,terrain:P,calculateTileZoom:this._source.calculateTileZoom}),this._source.hasTile&&(N=N.filter((Ae=>this._source.hasTile(Ae))))):N=[],this.usedForTerrain&&(N=this._addTerrainIdealTiles(N));let H=N.length===0&&!this._updated&&this._didEmitContent;this._updated=!0,H&&this.fire(new i.n("data",{sourceDataType:"idle",dataType:"source",sourceId:this.id}));let $=Lt(d,this._source),se=this._updateRetainedTiles(N,$),de=rr(this._source.type);de&&this._rasterFadeDuration>0&&!P&&(function(Ae,Fe,Ie,Ye,st,dt,Pe){let Xe=g(),at=i.at(Fe);for(let xt of Fe){let Et=Ae.getTileById(xt.key);Et.fadingDirection!==We.Departing&&Et.fadeOpacity!==0||Et.resetFadeLogic(),pr(Ae,Et,Ie,Xe,Ye,st,Pe)||Kr(Ae,Et,Ie,Xe,dt,Pe)||dn(Et,at,Xe,Pe)||Et.resetFadeLogic()}})(this._inViewTiles,N,se,this._maxFadingAncestorLevels,this._source.minzoom,this._source.maxzoom,this._rasterFadeDuration),de?this._cleanUpRasterTiles(se):this._cleanUpVectorTiles(se)}_cleanUpRasterTiles(d){for(let P of this._inViewTiles.getAllIds())d[P]||this._removeTile(P)}_cleanUpVectorTiles(d){for(let P of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(P);d[P]?N.clearSymbolFadeHold():N.hasSymbolBuckets?N.holdingForSymbolFade()?N.symbolFadeFinished()&&this._removeTile(P):N.setSymbolHoldDuration(this.map._fadeDuration):this._removeTile(P)}}_addTerrainIdealTiles(d){let P=[];for(let N of d)if(N.canonical.z>this._source.minzoom){let H=N.scaledTo(N.canonical.z-1);P.push(H);let $=N.scaledTo(Math.max(this._source.minzoom,Math.min(N.canonical.z,5)));P.push($)}return d.concat(P)}releaseSymbolFadeTiles(){for(let d of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(d).holdingForSymbolFade()&&this._removeTile(d)}_updateRetainedTiles(d,P){var N;let H=new Set;for(let Fe of d)this._addTile(Fe).hasData()||H.add(Fe);let $=d.reduce(((Fe,Ie)=>(Fe[Ie.key]=Ie,Fe)),{}),se=this._retainLoadedChildren($,H),de={},Ae=Math.max(P-Zr.maxUnderzooming,this._source.minzoom);for(let Fe of se){let Ie=this._inViewTiles.getTileById(Fe.key),Ye=Ie==null?void 0:Ie.wasRequested();for(let st=Fe.overscaledZ-1;st>=Ae;--st){let dt=Fe.scaledTo(st);if(de[dt.key])break;if(de[dt.key]=!0,Ie=this.getTile(dt),!Ie&&Ye&&(Ie=this._addTile(dt)),Ie){let Pe=Ie.hasData();if((Pe||!(!((N=this.map)===null||N===void 0)&&N.cancelPendingTileRequestsWhileZooming)||Ye)&&($[dt.key]=dt),Ye=Ie.wasRequested(),Pe)break}}}return $}_addTile(d){let P=this._inViewTiles.getTileById(d.key);if(P)return P;P=this._outOfViewCache.getAndRemove(d),P&&(P.resetFadeLogic(),this._setTileReloadTimer(d.key,P),P.tileID=d,this._state.initializeTileState(P,this.map?this.map.painter:null));let N=P;return P||(P=new mt(d,this._source.tileSize*d.overscaleFactor()),this._loadTile(P,d.key,P.state)),P.uses++,this._inViewTiles.setTile(d.key,P),N||this._source.fire(new i.n("dataloading",{tile:P,coord:P.tileID,dataType:"source"})),P}_setTileReloadTimer(d,P){this._clearTileReloadTimer(d);let N=P.getExpiryTimeout();N&&(this._timers[d]=setTimeout((()=>{this._reloadTile(d,"expired"),delete this._timers[d]}),N))}_clearTileReloadTimer(d){let P=this._timers[d];P&&(clearTimeout(P),delete this._timers[d])}_resetTileReloadTimers(){for(let d in this._timers)clearTimeout(this._timers[d]),delete this._timers[d];for(let d of this._inViewTiles.getAllIds()){let P=this._inViewTiles.getTileById(d);this._setTileReloadTimer(d,P)}}refreshTiles(d){for(let P of this._inViewTiles.getAllIds()){let N=this._inViewTiles.getTileById(P);(this._inViewTiles.isIdRenderable(P)||N.state=="errored")&&d.some((H=>H.equals(N.tileID.canonical)))&&this._reloadTile(P,"expired")}}_removeTile(d){let P=this._inViewTiles.getTileById(d);P&&(P.uses--,this._inViewTiles.deleteTileById(d),this._clearTileReloadTimer(d),P.uses>0||(P.hasData()&&P.state!=="reloading"?this._outOfViewCache.add(P.tileID,P,P.getExpiryTimeout()):(P.aborted=!0,this._abortTile(P),this._unloadTile(P))))}_dataHandler(d){d.dataType==="source"&&(d.sourceDataType!=="metadata"?d.sourceDataType==="content"&&this._sourceLoaded&&!this._paused&&(this.reload(d.sourceDataChanged,d.shouldReloadTileOptions),this.transform&&this.update(this.transform,this.terrain),this._didEmitContent=!0):this._sourceLoaded=!0)}clearTiles(){this._shouldReloadOnResume=!1,this._paused=!1;for(let d of this._inViewTiles.getAllIds())this._removeTile(d);this._outOfViewCache.reset()}tilesIn(d,P,N){let H=[],$=this.transform;if(!$)return H;let se=$.getCoveringTilesDetailsProvider().allowWorldCopies(),de=N?$.getCameraQueryGeometry(d):d,Ae=dt=>$.screenPointToMercatorCoordinate(dt,this.terrain),Fe=this.transformBbox(d,Ae,!se),Ie=this.transformBbox(de,Ae,!se),Ye=this.getIds(),st=i.a8.fromPoints(Ie);for(let dt of Ye){let Pe=this._inViewTiles.getTileById(dt);if(Pe.holdingForSymbolFade())continue;let Xe=se?[Pe.tileID]:[Pe.tileID.unwrapTo(-1),Pe.tileID.unwrapTo(0)],at=Math.pow(2,$.zoom-Pe.tileID.overscaledZ),xt=P*Pe.queryPadding*i.a6/Pe.tileSize/at;for(let Et of Xe){let Bt=st.map((St=>Et.getTilePoint(new i.a7(St.x,St.y))));if(Bt.expandBy(xt),Bt.intersects(kt)){let St=Fe.map(($t=>Et.getTilePoint($t))),Pt=Ie.map(($t=>Et.getTilePoint($t)));H.push({tile:Pe,tileID:se?Et:Et.unwrapTo(0),queryGeometry:St,cameraQueryGeometry:Pt,scale:at})}}}return H}transformBbox(d,P,N){let H=d.map(P);if(N){let $=i.a8.fromPoints(d);$.shrinkBy(.001*Math.min($.width(),$.height()));let se=$.map(P);i.a8.fromPoints(H).covers(se)||(H=H.map((de=>de.x>.5?new i.a7(de.x-1,de.y,de.z):de)))}return H}getVisibleCoordinates(d){let P=this.getRenderableIds(d).map((N=>this._inViewTiles.getTileById(N).tileID));return this.transform&&this.transform.populateCache(P),P}hasTransition(){return!!this._source.hasTransition()||rr(this._source.type)&&(function(d,P){if(P<=0)return!1;let N=g();for(let H of d.getAllTiles())if(H.fadeEndTime>=N)return!0;return!1})(this._inViewTiles,this._rasterFadeDuration)}setRasterFadeDuration(d){this._rasterFadeDuration=d}setFeatureState(d,P,N){d||(d=i.ag),this._state.updateState(d,P,N)}removeFeatureState(d,P,N){d||(d=i.ag),this._state.removeFeatureState(d,P,N)}getFeatureState(d,P){return d||(d=i.ag),this._state.getState(d,P)}setDependencies(d,P,N){let H=this._inViewTiles.getTileById(d);H&&H.setDependencies(P,N)}reloadTilesForDependencies(d,P){for(let N of this._inViewTiles.getAllIds())this._inViewTiles.getTileById(N).hasDependency(d,P)&&this._reloadTile(N,"reloading");this._outOfViewCache.filter((N=>!N.hasDependency(d,P)))}areTilesLoaded(){for(let d of this._inViewTiles.getAllTiles())if(d.state!=="loaded"&&d.state!=="errored")return!1;return!0}}Zr.maxUnderzooming=10,Zr.maxOverzooming=3;class Cn{constructor(d,P){this.reset(d,P)}reset(d,P){this.points=d||[],this._distances=[0];for(let N=1;N0?(H-se)/de:0;return this.points[$].mult(1-Ae).add(this.points[P].mult(Ae))}}function Dt(Y,d){let P=!0;return Y==="always"||Y!=="never"&&d!=="never"||(P=!1),P}class At{constructor(d,P,N){let H=this.boxCells=[],$=this.circleCells=[];this.xCellCount=Math.ceil(d/N),this.yCellCount=Math.ceil(P/N);for(let se=0;sethis.width||H<0||P>this.height)return[];let Ae=[];if(d<=0&&P<=0&&this.width<=N&&this.height<=H){if($)return[{key:null,x1:d,y1:P,x2:N,y2:H}];for(let Fe=0;Fe0}hitTestCircle(d,P,N,H,$){let se=d-N,de=d+N,Ae=P-N,Fe=P+N;if(de<0||se>this.width||Fe<0||Ae>this.height)return!1;let Ie=[];return this._forEachCell(se,Ae,de,Fe,this._queryCellCircle,Ie,{hitTest:!0,overlapMode:H,circle:{x:d,y:P,radius:N},seenUids:{box:{},circle:{}}},$),Ie.length>0}_queryCell(d,P,N,H,$,se,de,Ae){let{seenUids:Fe,hitTest:Ie,overlapMode:Ye}=de,st=this.boxCells[$],dt=1e-6;if(st!==null){let Xe=this.bboxes;for(let at of st)if(!Fe.box[at]){Fe.box[at]=!0;let xt=4*at,Et=this.boxKeys[at];if(d<=Xe[xt+2]+dt&&P<=Xe[xt+3]+dt&&N>=Xe[xt+0]-dt&&H>=Xe[xt+1]-dt&&(!Ae||Ae(Et))&&(!Ie||!Dt(Ye,Et.overlapMode))&&(se.push({key:Et,x1:Xe[xt],y1:Xe[xt+1],x2:Xe[xt+2],y2:Xe[xt+3]}),Ie))return!0}}let Pe=this.circleCells[$];if(Pe!==null){let Xe=this.circles;for(let at of Pe)if(!Fe.circle[at]){Fe.circle[at]=!0;let xt=3*at,Et=this.circleKeys[at];if(this._circleAndRectCollide(Xe[xt],Xe[xt+1],Xe[xt+2],d,P,N,H)&&(!Ae||Ae(Et))&&(!Ie||!Dt(Ye,Et.overlapMode))){let Bt=Xe[xt],St=Xe[xt+1],Pt=Xe[xt+2];if(se.push({key:Et,x1:Bt-Pt,y1:St-Pt,x2:Bt+Pt,y2:St+Pt}),Ie)return!0}}}return!1}_queryCellCircle(d,P,N,H,$,se,de,Ae){let{circle:Fe,seenUids:Ie,overlapMode:Ye}=de,st=this.boxCells[$];if(st!==null){let Pe=this.bboxes;for(let Xe of st)if(!Ie.box[Xe]){Ie.box[Xe]=!0;let at=4*Xe,xt=this.boxKeys[Xe];if(this._circleAndRectCollide(Fe.x,Fe.y,Fe.radius,Pe[at+0],Pe[at+1],Pe[at+2],Pe[at+3])&&(!Ae||Ae(xt))&&!Dt(Ye,xt.overlapMode))return se.push(!0),!0}}let dt=this.circleCells[$];if(dt!==null){let Pe=this.circles;for(let Xe of dt)if(!Ie.circle[Xe]){Ie.circle[Xe]=!0;let at=3*Xe,xt=this.circleKeys[Xe];if(this._circlesCollide(Pe[at],Pe[at+1],Pe[at+2],Fe.x,Fe.y,Fe.radius)&&(!Ae||Ae(xt))&&!Dt(Ye,xt.overlapMode))return se.push(!0),!0}}}_forEachCell(d,P,N,H,$,se,de,Ae){let Fe=this._convertToXCellCoord(d),Ie=this._convertToYCellCoord(P),Ye=this._convertToXCellCoord(N),st=this._convertToYCellCoord(H);for(let dt=Fe;dt<=Ye;dt++)for(let Pe=Ie;Pe<=st;Pe++)if($.call(this,d,P,N,H,this.xCellCount*Pe+dt,se,de,Ae))return}_convertToXCellCoord(d){return Math.max(0,Math.min(this.xCellCount-1,Math.floor(d*this.xScale)))}_convertToYCellCoord(d){return Math.max(0,Math.min(this.yCellCount-1,Math.floor(d*this.yScale)))}_circlesCollide(d,P,N,H,$,se){let de=H-d,Ae=$-P,Fe=N+se;return Fe*Fe>de*de+Ae*Ae}_circleAndRectCollide(d,P,N,H,$,se,de){let Ae=(se-H)/2,Fe=Math.abs(d-(H+Ae));if(Fe>Ae+N)return!1;let Ie=(de-$)/2,Ye=Math.abs(P-($+Ie));if(Ye>Ie+N)return!1;if(Fe<=Ae||Ye<=Ie)return!0;let st=Fe-Ae,dt=Ye-Ie;return st*st+dt*dt<=N*N}}function Vt(Y,d){let P=1/(d[0]*d[0]+d[1]*d[1]+d[2]*d[2]),N=1/(d[8]*d[8]+d[9]*d[9]+d[10]*d[10]),H=d[0]*P,$=d[4]*P,se=d[8]*N,de=d[1]*P,Ae=d[5]*P,Fe=d[9]*N,Ie=d[2]*P,Ye=d[6]*P,st=d[10]*N;Y[0]=H,Y[1]=$,Y[2]=se,Y[4]=de,Y[5]=Ae,Y[6]=Fe,Y[8]=Ie,Y[9]=Ye,Y[10]=st;let dt=d[12],Pe=d[13],Xe=d[14];return Y[12]=-H*dt-de*Pe-Ie*Xe,Y[13]=-$*dt-Ae*Pe-Ye*Xe,Y[14]=-se*dt-Fe*Pe-st*Xe,Y[3]=0,Y[7]=0,Y[11]=0,Y[15]=1,Y}let Qt=i.O();function Ut(Y,d,P){let N=i.O();if(!Y){let{vecSouth:Ye,vecEast:st}=rn(d),dt=s();dt[0]=st[0],dt[1]=st[1],dt[2]=Ye[0],dt[3]=Ye[1],H=dt,(Ie=(se=($=dt)[0])*(Fe=$[3])-(Ae=$[2])*(de=$[1]))&&(H[0]=Fe*(Ie=1/Ie),H[1]=-de*Ie,H[2]=-Ae*Ie,H[3]=se*Ie),N[0]=dt[0],N[1]=dt[1],N[4]=dt[2],N[5]=dt[3]}var H,$,se,de,Ae,Fe,Ie;return i.S(N,N,[1/P,1/P,1]),N}function _r(Y,d,P,N){if(Y){let H=i.O();if(!d){let{vecSouth:$,vecEast:se}=rn(P);H[0]=se[0],H[1]=se[1],H[4]=$[0],H[5]=$[1]}return i.S(H,H,[N,N,1]),H}return P.pixelsToClipSpaceMatrix}function rn(Y){let d=Math.cos(Y.rollInRadians),P=Math.sin(Y.rollInRadians),N=Math.cos(Y.pitchInRadians),H=Math.cos(Y.bearingInRadians),$=Math.sin(Y.bearingInRadians),se=i.az();se[0]=-H*N*P-$*d,se[1]=-$*N*P+H*d;let de=i.aA(se);de<1e-9?i.aB(se):i.aC(se,se,1/de);let Ae=i.az();Ae[0]=H*N*d-$*P,Ae[1]=$*N*d+H*P;let Fe=i.aA(Ae);return Fe<1e-9?i.aB(Ae):i.aC(Ae,Ae,1/Fe),{vecEast:Ae,vecSouth:se}}function Jr(Y,d,P,N){let H;N?(H=[Y,d,N(Y,d),1],i.aE(H,H,P)):(H=[Y,d,0,1],ao(H,H,P));let $=H[3];return{point:new i.P(H[0]/$,H[1]/$),signedDistanceFromCamera:$,isOccluded:!1}}function qn(Y,d){return .5+Y/d*.5}function ri(Y,d){return Y.x>=-d[0]&&Y.x<=d[0]&&Y.y>=-d[1]&&Y.y<=d[1]}function Jn(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st){let dt=P?Y.textSizeData:Y.iconSizeData,Pe=i.aw(dt,d.transform.zoom),Xe=[256/d.width*2+1,256/d.height*2+1],at=P?Y.text.dynamicLayoutVertexArray:Y.icon.dynamicLayoutVertexArray;at.clear();let xt=Y.lineVertexArray,Et=P?Y.text.placedSymbolArray:Y.icon.placedSymbolArray,Bt=d.transform.width/d.transform.height,St=!1;for(let Pt=0;PtMath.abs(P.x-d.x)*N?{useVertical:!0}:(Y===i.ax.vertical?d.yP.x)?{needsFlipping:!0}:null}function ra(Y){let{projectionContext:d,pitchedLabelPlaneMatrixInverse:P,symbol:N,fontSize:H,flip:$,keepUpright:se,glyphOffsetArray:de,dynamicLayoutVertexArray:Ae,aspectRatio:Fe,rotateToLine:Ie}=Y,Ye=H/24,st=N.lineOffsetX*Ye,dt=N.lineOffsetY*Ye,Pe;if(N.numGlyphs>1){let Xe=N.glyphStartIndex+N.numGlyphs,at=N.lineStartIndex,xt=N.lineStartIndex+N.lineLength,Et=Ii(Ye,de,st,dt,$,N,Ie,d);if(!Et)return{notEnoughRoom:!0};let Bt=oa(Et.first.point.x,Et.first.point.y,d,P),St=oa(Et.last.point.x,Et.last.point.y,d,P);if(se&&!$){let Pt=Vi(N.writingMode,Bt,St,Fe);if(Pt)return Pt}Pe=[Et.first];for(let Pt=N.glyphStartIndex+1;Pt0?Bt.point:ha(d.tileAnchorPoint,Et,at,1,d),Pt=oa(at.x,at.y,d,P),$t=oa(St.x,St.y,d,P),Ht=Vi(N.writingMode,Pt,$t,Fe);if(Ht)return Ht}let Xe=mo(Ye*de.getoffsetX(N.glyphStartIndex),st,dt,$,N.segment,N.lineStartIndex,N.lineStartIndex+N.lineLength,d,Ie);if(!Xe||d.projectionCache.anyProjectionOccluded)return{notEnoughRoom:!0};Pe=[Xe]}for(let Xe of Pe)i.aD(Ae,Xe.point,Xe.angle);return{}}function ha(Y,d,P,N,H){let $=Y.add(Y.sub(d)._unit()),se=Xi($.x,$.y,H).point,de=P.sub(se);return P.add(de._mult(N/de.mag()))}function va(Y,d,P){let N=d.projectionCache;if(N.projections[Y])return N.projections[Y];let H=new i.P(d.lineVertexArray.getx(Y),d.lineVertexArray.gety(Y)),$=Xi(H.x,H.y,d);if($.signedDistanceFromCamera>0)return N.projections[Y]=$.point,N.anyProjectionOccluded||(N.anyProjectionOccluded=$.isOccluded),$.point;let se=Y-P.direction;return ha(P.distanceFromAnchor===0?d.tileAnchorPoint:new i.P(d.lineVertexArray.getx(se),d.lineVertexArray.gety(se)),H,P.previousVertex,P.absOffsetX-P.distanceFromAnchor+1,d)}function Xi(Y,d,P){let N=Y+P.translation[0],H=d+P.translation[1],$;return P.pitchWithMap?($=Jr(N,H,P.pitchedLabelPlaneMatrix,P.getElevation),$.isOccluded=!1):($=P.transform.projectTileCoordinates(N,H,P.unwrappedTileID,P.getElevation),$.point.x=(.5*$.point.x+.5)*P.width,$.point.y=(.5*-$.point.y+.5)*P.height),$}function oa(Y,d,P,N){if(P.pitchWithMap){let H=[Y,d,0,1];return i.aE(H,H,N),P.transform.projectTileCoordinates(H[0]/H[3],H[1]/H[3],P.unwrappedTileID,P.getElevation).point}return{x:Y/P.width*2-1,y:1-d/P.height*2}}function Ma(Y,d,P){return P.transform.projectTileCoordinates(Y,d,P.unwrappedTileID,P.getElevation)}function Ga(Y,d,P){return Y._unit()._perp()._mult(d*P)}function ss(Y,d,P,N,H,$,se,de,Ae){if(de.projectionCache.offsets[Y])return de.projectionCache.offsets[Y];let Fe=P.add(d);if(Y+Ae.direction=H)return de.projectionCache.offsets[Y]=Fe,Fe;let Ie=va(Y+Ae.direction,de,Ae),Ye=Ga(Ie.sub(P),se,Ae.direction),st=P.add(Ye),dt=Ie.add(Ye);return de.projectionCache.offsets[Y]=i.aF($,Fe,st,dt)||Fe,de.projectionCache.offsets[Y]}function mo(Y,d,P,N,H,$,se,de,Ae){let Fe=N?Y-d:Y+d,Ie=Fe>0?1:-1,Ye=0;N&&(Ie*=-1,Ye=Math.PI),Ie<0&&(Ye+=Math.PI);let st,dt=Ie>0?$+H:$+H+1;de.projectionCache.cachedAnchorPoint?st=de.projectionCache.cachedAnchorPoint:(st=Xi(de.tileAnchorPoint.x,de.tileAnchorPoint.y,de).point,de.projectionCache.cachedAnchorPoint=st);let Pe,Xe,at=st,xt=st,Et=0,Bt=0,St=Math.abs(Fe),Pt=[],$t;for(;Et+Bt<=St;){if(dt+=Ie,dt<$||dt>=se)return null;Et+=Bt,xt=at,Xe=Pe;let Xr={absOffsetX:St,direction:Ie,distanceFromAnchor:Et,previousVertex:xt};if(at=va(dt,de,Xr),P===0)Pt.push(xt),$t=at.sub(xt);else{let Or,$r=at.sub(xt);Or=$r.mag()===0?Ga(va(dt+Ie,de,Xr).sub(at),P,Ie):Ga($r,P,Ie),Xe||(Xe=xt.add(Or)),Pe=ss(dt,Or,at,$,se,Xe,P,de,Xr),Pt.push(Xe),$t=Pe.sub(Xe)}Bt=$t.mag()}let Ht=$t._mult((St-Et)/Bt)._add(Xe||xt),dr=Ye+Math.atan2(at.y-xt.y,at.x-xt.x);return Pt.push(Ht),{point:Ht,angle:Ae?dr:0,path:Pt}}let sl=new Float32Array([-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0,-1/0,-1/0,0]);function Eo(Y,d){for(let P=0;P=1;on--)Rr.push(Er.path[on]);for(let on=1;onNn.signedDistanceFromCamera<=0))?[]:on.map((Nn=>Nn.point))}let an=[];if(Rr.length>0){let on=Rr[0].clone(),Nn=Rr[0].clone();for(let Yn=1;Yn=Xr.x&&Nn.x<=Or.x&&on.y>=Xr.y&&Nn.y<=Or.y?[Rr]:Nn.xOr.x||Nn.yOr.y?[]:i.aG([Rr],Xr.x,Xr.y,Or.x,Or.y)}for(let on of an){$r.reset(on,.25*dr);let Nn=0;Nn=$r.length<=.5*dr?1:Math.ceil($r.paddedLength/Lr)+1;for(let Yn=0;Yn{let Ae=Jr(de.x,de.y,se,$.getElevation),Fe=$.transform.projectTileCoordinates(Ae.point.x,Ae.point.y,$.unwrappedTileID,$.getElevation);return Fe.point.x=(.5*Fe.point.x+.5)*$.width,Fe.point.y=(.5*-Fe.point.y+.5)*$.height,Fe}))})(d,P);return(function(H){let $=0,se=0,de=0,Ae=0;for(let Fe=0;Fese&&(se=Ae,$=de));return H.slice($,$+se)})(N)}queryRenderedSymbols(d){if(d.length===0||this.grid.keysLength()===0&&this.ignoredGrid.keysLength()===0)return{};let P=[],N=new i.a8;for(let Ye of d){let st=new i.P(Ye.x+Da,Ye.y+Da);N.extend(st),P.push(st)}let{minX:H,minY:$,maxX:se,maxY:de}=N,Ae=this.grid.query(H,$,se,de).concat(this.ignoredGrid.query(H,$,se,de)),Fe={},Ie={};for(let Ye of Ae){let st=Ye.key;if(Fe[st.bucketInstanceId]===void 0&&(Fe[st.bucketInstanceId]={}),Fe[st.bucketInstanceId][st.featureIndex])continue;let dt=[new i.P(Ye.x1,Ye.y1),new i.P(Ye.x2,Ye.y1),new i.P(Ye.x2,Ye.y2),new i.P(Ye.x1,Ye.y2)];i.aH(P,dt)&&(Fe[st.bucketInstanceId][st.featureIndex]=!0,Ie[st.bucketInstanceId]===void 0&&(Ie[st.bucketInstanceId]=[]),Ie[st.bucketInstanceId].push(st.featureIndex))}return Ie}insertCollisionBox(d,P,N,H,$,se){(N?this.ignoredGrid:this.grid).insert({bucketInstanceId:H,featureIndex:$,collisionGroupID:se,overlapMode:P},d[0],d[1],d[2],d[3])}insertCollisionCircles(d,P,N,H,$,se){let de=N?this.ignoredGrid:this.grid,Ae={bucketInstanceId:H,featureIndex:$,collisionGroupID:se,overlapMode:P};for(let Fe=0;Fe=this.screenRightBoundary||Hthis.screenBottomBoundary}isInsideGrid(d,P,N,H){return N>=0&&d=0&&Pthis.projectAndGetPerspectiveRatio(Lr.x,Lr.y,H,Fe,Ye)));Tr=Rr.some((Lr=>!Lr.isOccluded)),Er=Rr.map((Lr=>new i.P(Lr.x,Lr.y)))}else Tr=!0;return{box:i.aI(Er),allPointsOccluded:!Tr}}}class bo{constructor(d,P,N,H){this.opacity=d?Math.max(0,Math.min(1,d.opacity+(d.placed?P:-P))):H&&N?1:0,this.placed=N}isHidden(){return this.opacity===0&&!this.placed}}class Zs{constructor(d,P,N,H,$){this.text=new bo(d?d.text:null,P,N,$),this.icon=new bo(d?d.icon:null,P,H,$)}isHidden(){return this.text.isHidden()&&this.icon.isHidden()}}class su{constructor(d,P,N){this.text=d,this.icon=P,this.skipFade=N}}class fc{constructor(d,P,N,H,$){this.bucketInstanceId=d,this.featureIndex=P,this.sourceLayerIndex=N,this.bucketIndex=H,this.tileID=$}}class Af{constructor(d){this.crossSourceCollisions=d,this.maxGroupID=0,this.collisionGroups={}}get(d){if(this.crossSourceCollisions)return{ID:0,predicate:null};if(!this.collisionGroups[d]){let P=++this.maxGroupID;this.collisionGroups[d]={ID:P,predicate:N=>N.collisionGroupID===P}}return this.collisionGroups[d]}}function ut(Y,d,P,N,H){let{horizontalAlign:$,verticalAlign:se}=i.aP(Y);return new i.P(-($-.5)*d+N[0]*H,-(se-.5)*P+N[1]*H)}class Jt{constructor(d,P,N,H,$){this.transform=d.clone(),this.terrain=P,this.collisionIndex=new bl(this.transform),this.placements={},this.opacities={},this.variableOffsets={},this.stale=!1,this.commitTime=0,this.fadeDuration=N,this.retainedQueryData={},this.collisionGroups=new Af(H),this.collisionCircleArrays={},this.collisionBoxArrays=new Map,this.prevPlacement=$,$&&($.prevPlacement=void 0),this.placedOrientations={}}_getTerrainElevationFunc(d){let P=this.terrain;return P?(N,H)=>P.getElevation(d,N,H):null}getBucketParts(d,P,N,H){let $=N.getBucket(P),se=N.latestFeatureIndex;if(!$||!se||P.id!==$.layerIds[0])return;let de=N.collisionBoxArray,Ae=$.layers[0].layout,Fe=$.layers[0].paint,Ie=Math.pow(2,this.transform.zoom-N.tileID.overscaledZ),Ye=N.tileSize/i.a6,st=N.tileID.toUnwrapped(),dt=Ae.get("text-rotation-alignment")==="map",Pe=i.aK(N,1,this.transform.zoom),Xe=i.aL(this.collisionIndex.transform,N,Fe.get("text-translate"),Fe.get("text-translate-anchor")),at=i.aL(this.collisionIndex.transform,N,Fe.get("icon-translate"),Fe.get("icon-translate-anchor")),xt=Ut(dt,this.transform,Pe);this.retainedQueryData[$.bucketInstanceId]=new fc($.bucketInstanceId,se,$.sourceLayerIndex,$.index,N.tileID);let Et={bucket:$,layout:Ae,translationText:Xe,translationIcon:at,unwrappedTileID:st,pitchedLabelPlaneMatrix:xt,scale:Ie,textPixelRatio:Ye,holdingForFade:N.holdingForSymbolFade(),collisionBoxArray:de,partiallyEvaluatedTextSize:i.aw($.textSizeData,this.transform.zoom),collisionGroup:this.collisionGroups.get($.sourceID)};if(H)for(let Bt of $.sortKeyRanges){let{sortKey:St,symbolInstanceStart:Pt,symbolInstanceEnd:$t}=Bt;d.push({sortKey:St,symbolInstanceStart:Pt,symbolInstanceEnd:$t,parameters:Et})}else d.push({symbolInstanceStart:0,symbolInstanceEnd:$.symbolInstances.length,parameters:Et})}attemptAnchorPlacement(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,dt,Pe,Xe,at,xt,Et,Bt,St){var Pt,$t,Ht;let dr=i.aM[d.textAnchor],Xr=[d.textOffset0,d.textOffset1],Or=ut(dr,N,H,Xr,$),$r=this.collisionIndex.placeCollisionBox(P,st,Ae,Fe,Ie,de,se,at,Ye.predicate,Bt,Or,St);if((!Et||this.collisionIndex.placeCollisionBox(Et,st,Ae,Fe,Ie,de,se,xt,Ye.predicate,Bt,Or,St).placeable)&&$r.placeable){let Er;if(!((Pt=this.prevPlacement)===null||Pt===void 0)&&Pt.variableOffsets[dt.crossTileID]&&(!((Ht=($t=this.prevPlacement)===null||$t===void 0?void 0:$t.placements[dt.crossTileID])===null||Ht===void 0)&&Ht.text)&&(Er=this.prevPlacement.variableOffsets[dt.crossTileID].anchor),dt.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");return this.variableOffsets[dt.crossTileID]={textOffset:Xr,width:N,height:H,anchor:dr,textBoxScale:$,prevAnchor:Er},this.markUsedJustification(Pe,dr,dt,Xe),Pe.allowVerticalPlacement&&(this.markUsedOrientation(Pe,Xe,dt),this.placedOrientations[dt.crossTileID]=Xe),{shift:Or,placedGlyphBoxes:$r}}}placeLayerBucketPart(d,P,N){let{bucket:H,layout:$,translationText:se,translationIcon:de,unwrappedTileID:Ae,pitchedLabelPlaneMatrix:Fe,textPixelRatio:Ie,holdingForFade:Ye,collisionBoxArray:st,partiallyEvaluatedTextSize:dt,collisionGroup:Pe}=d.parameters,Xe=$.get("text-optional"),at=$.get("icon-optional"),xt=i.aN($,"text-overlap","text-allow-overlap"),Et=xt==="always",Bt=i.aN($,"icon-overlap","icon-allow-overlap"),St=Bt==="always",Pt=$.get("text-rotation-alignment")==="map",$t=$.get("text-pitch-alignment")==="map",Ht=$.get("icon-text-fit")!=="none",dr=$.get("symbol-z-order")==="viewport-y",Xr=Et&&(St||!H.hasIconData()||at),Or=St&&(Et||!H.hasTextData()||Xe);!H.collisionArrays&&st&&H.deserializeCollisionBoxes(st);let $r=this.retainedQueryData[H.bucketInstanceId].tileID,Er=this._getTerrainElevationFunc($r),Tr=this.transform.getFastPathSimpleProjectionMatrix($r),Rr=(Lr,an,on)=>{var Nn,Yn;if(P[Lr.crossTileID])return;if(Ye)return void(this.placements[Lr.crossTileID]=new su(!1,!1,!1));let yi=!1,Sn=!1,An=!0,li=null,Vn={box:null,placeable:!1,offscreen:null,occluded:!1},jn={placeable:!1},Wn=null,si=null,zi=null,da=0,ui=0,Li=0;an.textFeatureIndex?da=an.textFeatureIndex:Lr.useRuntimeCollisionCircles&&(da=Lr.featureIndex),an.verticalTextFeatureIndex&&(ui=an.verticalTextFeatureIndex);let Ki=an.textBox;if(Ki){let Ss=_o=>{let po=i.ax.horizontal;if(H.allowVerticalPlacement&&!_o&&this.prevPlacement){let Xo=this.prevPlacement.placedOrientations[Lr.crossTileID];Xo&&(this.placedOrientations[Lr.crossTileID]=Xo,po=Xo,this.markUsedOrientation(H,po,Lr))}return po},Na=(_o,po)=>{if(H.allowVerticalPlacement&&Lr.numVerticalGlyphVertices>0&&an.verticalTextBox){for(let Xo of H.writingModes)if(Xo===i.ax.vertical?(Vn=po(),jn=Vn):Vn=_o(),Vn==null?void 0:Vn.placeable)break}else Vn=_o()},Ns=Lr.textAnchorOffsetStartIndex,vo=Lr.textAnchorOffsetEndIndex;if(vo===Ns){let _o=(po,Xo)=>{let no=this.collisionIndex.placeCollisionBox(po,xt,Ie,$r,Ae,$t,Pt,se,Pe.predicate,Er,void 0,Tr);return no!=null&&no.placeable&&(this.markUsedOrientation(H,Xo,Lr),this.placedOrientations[Lr.crossTileID]=Xo),no};Na((()=>_o(Ki,i.ax.horizontal)),(()=>{let po=an.verticalTextBox;return H.allowVerticalPlacement&&Lr.numVerticalGlyphVertices>0&&po?_o(po,i.ax.vertical):{box:null,offscreen:null}})),Ss(Vn==null?void 0:Vn.placeable)}else{let _o=i.aM[(Yn=(Nn=this.prevPlacement)===null||Nn===void 0?void 0:Nn.variableOffsets[Lr.crossTileID])===null||Yn===void 0?void 0:Yn.anchor],po=(no,Us,ql)=>{let Ta=no.x2-no.x1,vu=no.y2-no.y1,ys=Lr.textBoxScale,xc=Ht&&Bt==="never"?Us:null,Zl=null,$l=xt==="never"?1:2,xa="never";_o&&$l++;for(let uo=0;uo<$l;uo++){for(let Es=Ns;Espo(Ki,an.iconBox,i.ax.horizontal)),(()=>{let no=an.verticalTextBox;return H.allowVerticalPlacement&&!(Vn!=null&&Vn.placeable)&&Lr.numVerticalGlyphVertices>0&&no?po(no,an.verticalIconBox,i.ax.vertical):{box:null,occluded:!0,offscreen:null}})),Vn&&(yi=Vn.placeable,An=Vn.offscreen);let Xo=Ss(Vn==null?void 0:Vn.placeable);if(!yi&&this.prevPlacement){let no=this.prevPlacement.variableOffsets[Lr.crossTileID];no&&(this.variableOffsets[Lr.crossTileID]=no,this.markUsedJustification(H,no.anchor,Lr,Xo))}}}if(Wn=Vn,yi=Wn==null?void 0:Wn.placeable,An=Wn==null?void 0:Wn.offscreen,Lr.useRuntimeCollisionCircles&&Lr.centerJustifiedTextSymbolIndex>=0){let Ss=H.text.placedSymbolArray.get(Lr.centerJustifiedTextSymbolIndex),Na=i.ay(H.textSizeData,dt,Ss),Ns=$.get("text-padding");si=this.collisionIndex.placeCollisionCircles(xt,Ss,H.lineVertexArray,H.glyphOffsetArray,Na,Ae,Fe,N,$t,Pe.predicate,Lr.collisionCircleDiameter,Ns,se,Er),si.circles.length&&si.collisionDetected&&!N&&i.w("Collisions detected, but collision boxes are not shown"),yi=Et||si.circles.length>0&&!si.collisionDetected,An&&(An=si.offscreen)}if(an.iconFeatureIndex&&(Li=an.iconFeatureIndex),an.iconBox){let Ss=Na=>this.collisionIndex.placeCollisionBox(Na,Bt,Ie,$r,Ae,$t,Pt,de,Pe.predicate,Er,Ht&&li?li:void 0,Tr);jn&&jn.placeable&&an.verticalIconBox?(zi=Ss(an.verticalIconBox),Sn=zi.placeable):(zi=Ss(an.iconBox),Sn=zi.placeable),An&&(An=zi.offscreen)}let ca=Xe||Lr.numHorizontalGlyphVertices===0&&Lr.numVerticalGlyphVertices===0,Ia=at||Lr.numIconVertices===0;ca||Ia?Ia?ca||Sn&&(Sn=yi):yi=Sn&&yi:Sn=yi=Sn&&yi;let Os=Sn&&zi.placeable;if(yi&&Wn.placeable&&this.collisionIndex.insertCollisionBox(Wn.box,xt,$.get("text-ignore-placement"),H.bucketInstanceId,jn&&jn.placeable&&ui?ui:da,Pe.ID),Os&&this.collisionIndex.insertCollisionBox(zi.box,Bt,$.get("icon-ignore-placement"),H.bucketInstanceId,Li,Pe.ID),si&&yi&&this.collisionIndex.insertCollisionCircles(si.circles,xt,$.get("text-ignore-placement"),H.bucketInstanceId,da,Pe.ID),N&&this.storeCollisionData(H.bucketInstanceId,on,an,Wn,zi,si),Lr.crossTileID===0)throw new Error("symbolInstance.crossTileID can't be 0");if(H.bucketInstanceId===0)throw new Error("bucket.bucketInstanceId can't be 0");this.placements[Lr.crossTileID]=new su((yi||Xr)&&!(Wn!=null&&Wn.occluded),(Sn||Or)&&!(zi!=null&&zi.occluded),An||H.justReloaded),P[Lr.crossTileID]=!0};if(dr){if(d.symbolInstanceStart!==0)throw new Error("bucket.bucketInstanceId should be 0");let Lr=H.getSortedSymbolIndexes(-this.transform.bearingInRadians);for(let an=Lr.length-1;an>=0;--an){let on=Lr[an];Rr(H.symbolInstances.get(on),H.collisionArrays[on],on)}}else for(let Lr=d.symbolInstanceStart;Lr=0&&(d.text.placedSymbolArray.get(de).crossTileID=$>=0&&de!==$?0:N.crossTileID)}markUsedOrientation(d,P,N){let H=P===i.ax.horizontal||P===i.ax.horizontalOnly?P:0,$=P===i.ax.vertical?P:0,se=[N.leftJustifiedTextSymbolIndex,N.centerJustifiedTextSymbolIndex,N.rightJustifiedTextSymbolIndex];for(let de of se)d.text.placedSymbolArray.get(de).placedOrientation=H;N.verticalPlacedTextSymbolIndex&&(d.text.placedSymbolArray.get(N.verticalPlacedTextSymbolIndex).placedOrientation=$)}commit(d){this.commitTime=d,this.zoomAtLastRecencyCheck=this.transform.zoom;let P=this.prevPlacement,N=!1;this.prevZoomAdjustment=P?P.zoomAdjustment(this.transform.zoom):0;let H=P?P.symbolFadeChange(d):1,$=P?P.opacities:{},se=P?P.variableOffsets:{},de=P?P.placedOrientations:{};for(let Ae in this.placements){let Fe=this.placements[Ae],Ie=$[Ae];Ie?(this.opacities[Ae]=new Zs(Ie,H,Fe.text,Fe.icon),N||(N=Fe.text!==Ie.text.placed),N||(N=Fe.icon!==Ie.icon.placed)):(this.opacities[Ae]=new Zs(null,H,Fe.text,Fe.icon,Fe.skipFade),N||(N=Fe.text||Fe.icon))}for(let Ae in $){let Fe=$[Ae];if(!this.opacities[Ae]){let Ie=new Zs(Fe,H,!1,!1);Ie.isHidden()||(this.opacities[Ae]=Ie,N||(N=Fe.text.placed),N||(N=Fe.icon.placed))}}for(let Ae in se)this.variableOffsets[Ae]||!this.opacities[Ae]||this.opacities[Ae].isHidden()||(this.variableOffsets[Ae]=se[Ae]);for(let Ae in de)this.placedOrientations[Ae]||!this.opacities[Ae]||this.opacities[Ae].isHidden()||(this.placedOrientations[Ae]=de[Ae]);if(P&&P.lastPlacementChangeTime===void 0)throw new Error("Last placement time for previous placement is not defined");N?this.lastPlacementChangeTime=d:typeof this.lastPlacementChangeTime!="number"&&(this.lastPlacementChangeTime=P?P.lastPlacementChangeTime:d)}updateLayerOpacities(d,P){let N={};for(let H of P){let $=H.getBucket(d);$&&H.latestFeatureIndex&&d.id===$.layerIds[0]&&this.updateBucketOpacities($,H.tileID,N,H.collisionBoxArray)}}updateBucketOpacities(d,P,N,H){d.hasTextData()&&(d.text.opacityVertexArray.clear(),d.text.hasVisibleVertices=!1),d.hasIconData()&&(d.icon.opacityVertexArray.clear(),d.icon.hasVisibleVertices=!1),d.hasIconCollisionBoxData()&&d.iconCollisionBox.collisionVertexArray.clear(),d.hasTextCollisionBoxData()&&d.textCollisionBox.collisionVertexArray.clear();let $=d.layers[0],se=$.layout,de=new Zs(null,0,!1,!1,!0),Ae=se.get("text-allow-overlap"),Fe=se.get("icon-allow-overlap"),Ie=$._unevaluatedLayout.hasValue("text-variable-anchor")||$._unevaluatedLayout.hasValue("text-variable-anchor-offset"),Ye=se.get("text-rotation-alignment")==="map",st=se.get("text-pitch-alignment")==="map",dt=se.get("icon-text-fit")!=="none",Pe=new Zs(null,0,Ae&&(Fe||!d.hasIconData()||se.get("icon-optional")),Fe&&(Ae||!d.hasTextData()||se.get("text-optional")),!0);!d.collisionArrays&&H&&(d.hasIconCollisionBoxData()||d.hasTextCollisionBoxData())&&d.deserializeCollisionBoxes(H);let Xe=(xt,Et,Bt)=>{for(let St=0;St0,dr=this.placedOrientations[Et.crossTileID],Xr=dr===i.ax.vertical,Or=dr===i.ax.horizontal||dr===i.ax.horizontalOnly;if(Bt>0||St>0){let Er=Qn($t.text);Xe(d.text,Bt,Xr?Ai:Er),Xe(d.text,St,Or?Ai:Er);let Tr=$t.text.isHidden(),Rr=[Et.rightJustifiedTextSymbolIndex,Et.centerJustifiedTextSymbolIndex,Et.leftJustifiedTextSymbolIndex];for(let on of Rr)on>=0&&(d.text.placedSymbolArray.get(on).hidden=Tr||Xr?1:0);Et.verticalPlacedTextSymbolIndex>=0&&(d.text.placedSymbolArray.get(Et.verticalPlacedTextSymbolIndex).hidden=Tr||Or?1:0);let Lr=this.variableOffsets[Et.crossTileID];Lr&&this.markUsedJustification(d,Lr.anchor,Et,dr);let an=this.placedOrientations[Et.crossTileID];an&&(this.markUsedJustification(d,"left",Et,an),this.markUsedOrientation(d,an,Et))}if(Ht){let Er=Qn($t.icon),Tr=!(dt&&Et.verticalPlacedIconSymbolIndex&&Xr);Et.placedIconSymbolIndex>=0&&(Xe(d.icon,Et.numIconVertices,Tr?Er:Ai),d.icon.placedSymbolArray.get(Et.placedIconSymbolIndex).hidden=$t.icon.isHidden()),Et.verticalPlacedIconSymbolIndex>=0&&(Xe(d.icon,Et.numVerticalIconVertices,Tr?Ai:Er),d.icon.placedSymbolArray.get(Et.verticalPlacedIconSymbolIndex).hidden=$t.icon.isHidden())}let $r=at!=null&&at.has(xt)?at.get(xt):{text:null,icon:null};if(d.hasIconCollisionBoxData()||d.hasTextCollisionBoxData()){let Er=d.collisionArrays[xt];if(Er){let Tr=new i.P(0,0);if(Er.textBox||Er.verticalTextBox){let Rr=!0;if(Ie){let Lr=this.variableOffsets[Pt];Lr?(Tr=ut(Lr.anchor,Lr.width,Lr.height,Lr.textOffset,Lr.textBoxScale),Ye&&Tr._rotate(st?-this.transform.bearingInRadians:this.transform.bearingInRadians)):Rr=!1}if(Er.textBox||Er.verticalTextBox){let Lr;Er.textBox&&(Lr=Xr),Er.verticalTextBox&&(Lr=Or),er(d.textCollisionBox.collisionVertexArray,$t.text.placed,!Rr||Lr,$r.text,Tr.x,Tr.y)}}if(Er.iconBox||Er.verticalIconBox){let Rr=!!(!Or&&Er.verticalIconBox),Lr;Er.iconBox&&(Lr=Rr),Er.verticalIconBox&&(Lr=!Rr),er(d.iconCollisionBox.collisionVertexArray,$t.icon.placed,Lr,$r.icon,dt?Tr.x:0,dt?Tr.y:0)}}}}if(d.sortFeatures(-this.transform.bearingInRadians),this.retainedQueryData[d.bucketInstanceId]&&(this.retainedQueryData[d.bucketInstanceId].featureSortOrder=d.featureSortOrder),d.hasTextData()&&d.text.opacityVertexBuffer&&d.text.opacityVertexBuffer.updateData(d.text.opacityVertexArray),d.hasIconData()&&d.icon.opacityVertexBuffer&&d.icon.opacityVertexBuffer.updateData(d.icon.opacityVertexArray),d.hasIconCollisionBoxData()&&d.iconCollisionBox.collisionVertexBuffer&&d.iconCollisionBox.collisionVertexBuffer.updateData(d.iconCollisionBox.collisionVertexArray),d.hasTextCollisionBoxData()&&d.textCollisionBox.collisionVertexBuffer&&d.textCollisionBox.collisionVertexBuffer.updateData(d.textCollisionBox.collisionVertexArray),d.text.opacityVertexArray.length!==d.text.layoutVertexArray.length/4)throw new Error(`bucket.text.opacityVertexArray.length (= ${d.text.opacityVertexArray.length}) !== bucket.text.layoutVertexArray.length (= ${d.text.layoutVertexArray.length}) / 4`);if(d.icon.opacityVertexArray.length!==d.icon.layoutVertexArray.length/4)throw new Error(`bucket.icon.opacityVertexArray.length (= ${d.icon.opacityVertexArray.length}) !== bucket.icon.layoutVertexArray.length (= ${d.icon.layoutVertexArray.length}) / 4`);d.bucketInstanceId in this.collisionCircleArrays&&(d.collisionCircleArray=this.collisionCircleArrays[d.bucketInstanceId],delete this.collisionCircleArrays[d.bucketInstanceId])}symbolFadeChange(d){return this.fadeDuration===0?1:(d-this.commitTime)/this.fadeDuration+this.prevZoomAdjustment}zoomAdjustment(d){return Math.max(0,(this.transform.zoom-d)/1.5)}hasTransitions(d){return this.stale||d-this.lastPlacementChangeTimed}setStale(){this.stale=!0}}function er(Y,d,P,N,H,$){N&&N.length!==0||(N=[0,0,0,0]);let se=N[0]-Da,de=N[1]-Da,Ae=N[2]-Da,Fe=N[3]-Da;Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,se,de),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,Ae,de),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,Ae,Fe),Y.emplaceBack(d?1:0,P?1:0,H||0,$||0,se,Fe)}let wr=Math.pow(2,25),nn=Math.pow(2,24),Dr=Math.pow(2,17),bn=Math.pow(2,16),Yr=Math.pow(2,9),Tn=Math.pow(2,8),Kn=Math.pow(2,1);function Qn(Y){if(Y.opacity===0&&!Y.placed)return 0;if(Y.opacity===1&&Y.placed)return 4294967295;let d=Y.placed?1:0,P=Math.floor(127*Y.opacity);return P*wr+d*nn+P*Dr+d*bn+P*Yr+d*Tn+P*Kn+d}let Ai=0;class Ji{constructor(d){this._sortAcrossTiles=d.layout.get("symbol-z-order")!=="viewport-y"&&!d.layout.get("symbol-sort-key").isConstant(),this._currentTileIndex=0,this._currentPartIndex=0,this._seenCrossTileIDs={},this._bucketParts=[]}continuePlacement(d,P,N,H,$){let se=this._bucketParts;for(;this._currentTileIndexde.sortKey-Ae.sortKey)));this._currentPartIndex!this._forceFullPlacement&&g()-H>2;for(;this._currentPlacementIndex>=0;){let se=P[d[this._currentPlacementIndex]],de=this.placement.collisionIndex.transform.zoom;if(i.aQ(se)&&se.layout&&(!se.minzoom||se.minzoom<=de)&&(!se.maxzoom||se.maxzoom>de)){if(this._inProgressLayer||(this._inProgressLayer=new Ji(se)),this._inProgressLayer.continuePlacement(N[se.source],this.placement,this._showCollisionBoxes,se,$))return;delete this._inProgressLayer}this._currentPlacementIndex--}this._done=!0}commit(d){return this.placement.commit(d),this.placement}}let ii=512/i.a6/2;class Za{constructor(d,P,N){this.tileID=d,this.bucketInstanceId=N,this._symbolsByKey={};let H=new Map;for(let $=0;$({x:Math.floor(Ae.anchorX*ii),y:Math.floor(Ae.anchorY*ii)}))),crossTileIDs:se.map((Ae=>Ae.crossTileID))};if(de.positions.length>128){let Ae=new i.aR(de.positions.length,16,Uint16Array);for(let{x:Fe,y:Ie}of de.positions)Ae.add(Fe,Ie);Ae.finish(),delete de.positions,de.index=Ae}this._symbolsByKey[$]=de}}getScaledCoordinates(d,P){let{x:N,y:H,z:$}=this.tileID.canonical,{x:se,y:de,z:Ae}=P.canonical,Fe=ii/Math.pow(2,Ae-$),Ie=(de*i.a6+d.anchorY)*Fe,Ye=H*i.a6*ii;return{x:Math.floor((se*i.a6+d.anchorX)*Fe-N*i.a6*ii),y:Math.floor(Ie-Ye)}}findMatches(d,P,N){let H=this.tileID.canonical.zd))}}class ja{constructor(){this.maxCrossTileID=0}generate(){return++this.maxCrossTileID}}class qo{constructor(){this.indexes={},this.usedCrossTileIDs={},this.lng=0}handleWrapJump(d){let P=Math.round((d-this.lng)/360);if(P!==0)for(let N in this.indexes){let H=this.indexes[N],$={};for(let se in H){let de=H[se];de.tileID=de.tileID.unwrapTo(de.tileID.wrap+P),$[de.tileID.key]=de}this.indexes[N]=$}this.lng=d}addBucket(d,P,N){var H,$,se;if(!((H=this.indexes[d.overscaledZ])===null||H===void 0)&&H[d.key]){if(this.indexes[d.overscaledZ][d.key].bucketInstanceId===P.bucketInstanceId)return!1;this.removeBucketCrossTileIDs(d.overscaledZ,this.indexes[d.overscaledZ][d.key])}for(let Ae=0;Aed.overscaledZ)for(let Ie in Fe){let Ye=Fe[Ie];Ye.tileID.isChildOf(d)&&Ye.findMatches(P.symbolInstances,d,de)}else{let Ie=Fe[d.scaledTo(Number(Ae)).key];Ie&&Ie.findMatches(P.symbolInstances,d,de)}}for(let Ae=0;Ae 0.95) return 1.0;return (d+depthOpacity(frag+vec3(0.0,0.01,0.0)))/2.0; #else return 1.0; #endif }float ele(vec2 pos) { #ifdef TERRAIN3D vec4 rgb=(texture(u_terrain,pos)*255.0)*u_terrain_unpack;return rgb.r+rgb.g+rgb.b-u_terrain_unpack.a; #else return 0.0; #endif }float get_elevation(vec2 pos) { #ifdef TERRAIN3D #ifdef GLOBE if ((pos.y <-32767.5) || (pos.y > 32766.5)) {return 0.0;} #endif vec2 coord=(u_terrain_matrix*vec4(pos,0.0,1.0)).xy*u_terrain_dim+1.0;vec2 f=fract(coord);vec2 c=(floor(coord)+0.5)/(u_terrain_dim+2.0);float d=1.0/(u_terrain_dim+2.0);float tl=ele(c);float tr=ele(c+vec2(d,0.0));float bl=ele(c+vec2(0.0,d));float br=ele(c+vec2(d,d));float elevation=mix(mix(tl,tr,f.x),mix(bl,br,f.x),f.y);return elevation*u_terrain_exaggeration; #else return 0.0; #endif }const float PI=3.141592653589793;uniform mat4 u_projection_matrix;`),projectionMercator:Ni("","float projectLineThickness(float tileY) {return 1.0;}float projectCircleRadius(float tileY) {return 1.0;}vec4 projectTile(vec2 p) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);return result;}vec4 projectTile(vec2 p,vec2 rawPos) {vec4 result=u_projection_matrix*vec4(p,0.0,1.0);if (rawPos.y <-32767.5 || rawPos.y > 32766.5) {result.z=-10000000.0;}return result;}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return u_projection_matrix*vec4(posInTile,elevation,1.0);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {return projectTileWithElevation(posInTile,elevation);}"),projectionGlobe:Ni("",`#define GLOBE_RADIUS 6371008.8 uniform highp vec4 u_projection_tile_mercator_coords;uniform highp vec4 u_projection_clipping_plane;uniform highp float u_projection_transition;uniform mat4 u_projection_fallback_matrix;vec3 globeRotateVector(vec3 vec,vec2 angles) {vec3 axisRight=vec3(vec.z,0.0,-vec.x);vec3 axisUp=cross(axisRight,vec);axisRight=normalize(axisRight);axisUp=normalize(axisUp);vec2 t=tan(angles);return normalize(vec+axisRight*t.x+axisUp*t.y);}mat3 globeGetRotationMatrix(vec3 spherePos) {vec3 axisRight=vec3(spherePos.z,0.0,-spherePos.x);vec3 axisDown=cross(axisRight,spherePos);axisRight=normalize(axisRight);axisDown=normalize(axisDown);return mat3(axisRight,axisDown,spherePos );}float circumferenceRatioAtTileY(float tileY) {float mercator_pos_y=u_projection_tile_mercator_coords.y+u_projection_tile_mercator_coords.w*tileY;float spherical_y=2.0*atan(exp(PI-(mercator_pos_y*PI*2.0)))-PI*0.5;return cos(spherical_y);}float projectLineThickness(float tileY) {float thickness=1.0/circumferenceRatioAtTileY(tileY); if (u_projection_transition < 0.999) {return mix(1.0,thickness,u_projection_transition);} else {return thickness;}}vec3 projectToSphere(vec2 translatedPos,vec2 rawPos) {vec2 mercator_pos=u_projection_tile_mercator_coords.xy+u_projection_tile_mercator_coords.zw*translatedPos;vec2 spherical;spherical.x=mercator_pos.x*PI*2.0+PI;spherical.y=2.0*atan(exp(PI-(mercator_pos.y*PI*2.0)))-PI*0.5;float len=cos(spherical.y);vec3 pos=vec3(sin(spherical.x)*len,sin(spherical.y),cos(spherical.x)*len );if (rawPos.y <-32767.5) {pos=vec3(0.0,1.0,0.0);}if (rawPos.y > 32766.5) {pos=vec3(0.0,-1.0,0.0);}return pos;}vec3 projectToSphere(vec2 posInTile) {return projectToSphere(posInTile,vec2(0.0,0.0));}float globeComputeClippingZ(vec3 spherePos) {return (1.0-(dot(spherePos,u_projection_clipping_plane.xyz)+u_projection_clipping_plane.w));}vec4 interpolateProjection(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);globePosition.z=globeComputeClippingZ(elevatedPos)*globePosition.w;if (u_projection_transition > 0.999) {return globePosition;}vec4 flatPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);const float z_globeness_threshold=0.2;vec4 result=globePosition;result.z=mix(0.0,globePosition.z,clamp((u_projection_transition-z_globeness_threshold)/(1.0-z_globeness_threshold),0.0,1.0));result.xyw=mix(flatPosition.xyw,globePosition.xyw,u_projection_transition);if ((posInTile.y <-32767.5) || (posInTile.y > 32766.5)) {result=globePosition;const float poles_hidden_anim_percentage=0.02;result.z=mix(globePosition.z,100.0,pow(max((1.0-u_projection_transition)/poles_hidden_anim_percentage,0.0),8.0));}return result;}vec4 interpolateProjectionFor3D(vec2 posInTile,vec3 spherePos,float elevation) {vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);vec4 globePosition=u_projection_matrix*vec4(elevatedPos,1.0);if (u_projection_transition > 0.999) {return globePosition;}vec4 fallbackPosition=u_projection_fallback_matrix*vec4(posInTile,elevation,1.0);return mix(fallbackPosition,globePosition,u_projection_transition);}vec4 projectTile(vec2 posInTile) {return interpolateProjection(posInTile,projectToSphere(posInTile),0.0);}vec4 projectTile(vec2 posInTile,vec2 rawPos) {return interpolateProjection(posInTile,projectToSphere(posInTile,rawPos),0.0);}vec4 projectTileWithElevation(vec2 posInTile,float elevation) {return interpolateProjection(posInTile,projectToSphere(posInTile),elevation);}vec4 projectTileFor3D(vec2 posInTile,float elevation) {vec3 spherePos=projectToSphere(posInTile,posInTile);return interpolateProjectionFor3D(posInTile,spherePos,elevation);}`),background:Ni(`uniform vec4 u_color;uniform float u_opacity;void main() {fragColor=u_color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),backgroundPattern:Ni(`uniform vec2 u_pattern_tl_a;uniform vec2 u_pattern_br_a;uniform vec2 u_pattern_tl_b;uniform vec2 u_pattern_br_b;uniform vec2 u_texsize;uniform float u_mix;uniform float u_opacity;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;void main() {vec2 imagecoord=mod(v_pos_a,1.0);vec2 pos=mix(u_pattern_tl_a/u_texsize,u_pattern_br_a/u_texsize,imagecoord);vec4 color1=texture(u_image,pos);vec2 imagecoord_b=mod(v_pos_b,1.0);vec2 pos2=mix(u_pattern_tl_b/u_texsize,u_pattern_br_b/u_texsize,imagecoord_b);vec4 color2=texture(u_image,pos2);fragColor=mix(color1,color2,u_mix)*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform vec2 u_pattern_size_a;uniform vec2 u_pattern_size_b;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform float u_scale_a;uniform float u_scale_b;uniform float u_tile_units_to_pixels;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;void main() {gl_Position=projectTile(a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_a*u_pattern_size_a,u_tile_units_to_pixels,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,u_scale_b*u_pattern_size_b,u_tile_units_to_pixels,a_pos);}"),circle:Ni(`in vec3 v_data;in float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 extrude=v_data.xy;float extrude_length=length(extrude);float antialiased_blur=v_data.z;float opacity_t=smoothstep(0.0,antialiased_blur,extrude_length-1.0);float color_t=stroke_width < 0.01 ? 0.0 : smoothstep(antialiased_blur,0.0,extrude_length-radius/(radius+stroke_width));fragColor=v_visibility*opacity_t*mix(color*opacity,stroke_color*stroke_opacity,color_t);const float epsilon=0.5/255.0;if (fragColor.r < epsilon && fragColor.g < epsilon && fragColor.b < epsilon && fragColor.a < epsilon) {discard;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform bool u_scale_with_map;uniform bool u_pitch_with_map;uniform vec2 u_extrude_scale;uniform highp float u_globe_extrude_scale;uniform lowp float u_device_pixel_ratio;uniform highp float u_camera_to_center_distance;uniform vec2 u_translate;in vec2 a_pos;out vec3 v_data;out float v_visibility; #pragma mapbox: define highp vec4 color #pragma mapbox: define mediump float radius #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define highp vec4 stroke_color #pragma mapbox: define mediump float stroke_width #pragma mapbox: define lowp float stroke_opacity void main(void) { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize mediump float radius #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize highp vec4 stroke_color #pragma mapbox: initialize mediump float stroke_width #pragma mapbox: initialize lowp float stroke_opacity vec2 pos_raw=a_pos+32768.0;vec2 extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);vec2 circle_center=floor(pos_raw/8.0)+u_translate;float ele=get_elevation(circle_center);v_visibility=calculate_visibility(projectTileWithElevation(circle_center,ele));if (u_pitch_with_map) { #ifdef GLOBE vec3 center_vector=projectToSphere(circle_center); #endif float angle_scale=u_globe_extrude_scale;vec2 corner_position=circle_center;if (u_scale_with_map) {angle_scale*=(radius+stroke_width);corner_position+=extrude*u_extrude_scale*(radius+stroke_width);} else { #ifdef GLOBE vec4 projected_center=interpolateProjection(circle_center,center_vector,ele); #else vec4 projected_center=projectTileWithElevation(circle_center,ele); #endif corner_position+=extrude*u_extrude_scale*(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);angle_scale*=(radius+stroke_width)*(projected_center.w/u_camera_to_center_distance);} #ifdef GLOBE vec2 angles=extrude*angle_scale;vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(corner_position,corner_vector,ele); #else gl_Position=projectTileWithElevation(corner_position,ele); #endif } else {gl_Position=projectTileWithElevation(circle_center,ele);if (gl_Position.z/gl_Position.w > 1.0) {gl_Position.xy=vec2(10000.0);}if (u_scale_with_map) {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*u_camera_to_center_distance;} else {gl_Position.xy+=extrude*(radius+stroke_width)*u_extrude_scale*gl_Position.w;}}float antialiasblur=-max(1.0/u_device_pixel_ratio/(radius+stroke_width),blur);v_data=vec3(extrude.x,extrude.y,antialiasblur);}`),clippingMask:Ni(Ka,"in vec2 a_pos;void main() {gl_Position=projectTile(a_pos);}"),heatmap:Ni(`uniform highp float u_intensity;in vec2 v_extrude; #pragma mapbox: define highp float weight #define GAUSS_COEF 0.3989422804014327 void main() { #pragma mapbox: initialize highp float weight float d=-0.5*3.0*3.0*dot(v_extrude,v_extrude);float val=weight*u_intensity*GAUSS_COEF*exp(d);fragColor=vec4(val,1.0,1.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform float u_extrude_scale;uniform float u_opacity;uniform float u_intensity;uniform highp float u_globe_extrude_scale;in vec2 a_pos;out vec2 v_extrude; #pragma mapbox: define highp float weight #pragma mapbox: define mediump float radius const highp float ZERO=1.0/255.0/16.0; #define GAUSS_COEF 0.3989422804014327 void main(void) { #pragma mapbox: initialize highp float weight #pragma mapbox: initialize mediump float radius vec2 pos_raw=a_pos+32768.0;vec2 unscaled_extrude=vec2(mod(pos_raw,8.0)/7.0*2.0-1.0);float S=sqrt(-2.0*log(ZERO/weight/u_intensity/GAUSS_COEF))/3.0;v_extrude=S*unscaled_extrude;vec2 extrude=v_extrude*radius*u_extrude_scale;vec2 circle_center=floor(pos_raw/8.0); #ifdef GLOBE vec2 angles=v_extrude*radius*u_globe_extrude_scale;vec3 center_vector=projectToSphere(circle_center);vec3 corner_vector=globeRotateVector(center_vector,angles);gl_Position=interpolateProjection(circle_center+extrude,corner_vector,0.0); #else gl_Position=projectTileFor3D(circle_center+extrude,get_elevation(circle_center)); #endif }`),heatmapTexture:Ni(`uniform sampler2D u_image;uniform sampler2D u_color_ramp;uniform float u_opacity;in vec2 v_pos;void main() {float t=texture(u_image,v_pos).r;vec4 color=texture(u_color_ramp,vec2(t,0.5));fragColor=color*u_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(0.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_world;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=u_matrix*vec4(a_pos*u_world,0,1);v_pos.x=a_pos.x;v_pos.y=1.0-a_pos.y;}"),collisionBox:Ni("in float v_placed;in float v_notUsed;void main() {float alpha=0.5;fragColor=vec4(1.0,0.0,0.0,1.0)*alpha;if (v_placed > 0.5) {fragColor=vec4(0.0,0.0,1.0,0.5)*alpha;}if (v_notUsed > 0.5) {fragColor*=.1;}}","in vec2 a_anchor_pos;in vec2 a_placed;in vec2 a_box_real;uniform vec2 u_pixel_extrude_scale;out float v_placed;out float v_notUsed;void main() {gl_Position=projectTileWithElevation(a_anchor_pos,get_elevation(a_anchor_pos));gl_Position.xy=((a_box_real+0.5)*u_pixel_extrude_scale*2.0-1.0)*vec2(1.0,-1.0)*gl_Position.w;if (gl_Position.z/gl_Position.w < 1.1) {gl_Position.z=0.5;}v_placed=a_placed.x;v_notUsed=a_placed.y;}"),collisionCircle:Ni("in float v_radius;in vec2 v_extrude;in float v_collision;void main() {float alpha=0.5;float stroke_radius=0.9;float distance_to_center=length(v_extrude);float distance_to_edge=abs(distance_to_center-v_radius);float opacity_t=smoothstep(-stroke_radius,0.0,-distance_to_edge);vec4 color=mix(vec4(0.0,0.0,1.0,0.5),vec4(1.0,0.0,0.0,1.0),v_collision);fragColor=color*alpha*opacity_t;}","in vec2 a_pos;in float a_radius;in vec2 a_flags;uniform vec2 u_viewport_size;out float v_radius;out vec2 v_extrude;out float v_collision;void main() {float radius=a_radius;float collision=a_flags.x;float vertexIdx=a_flags.y;vec2 quadVertexOffset=vec2(mix(-1.0,1.0,float(vertexIdx >=2.0)),mix(-1.0,1.0,float(vertexIdx >=1.0 && vertexIdx <=2.0)));vec2 quadVertexExtent=quadVertexOffset*radius;float padding_factor=1.2;v_radius=radius;v_extrude=quadVertexExtent*padding_factor;v_collision=collision;gl_Position=vec4((a_pos/u_viewport_size*2.0-1.0)*vec2(1.0,-1.0),0.0,1.0)+vec4(quadVertexExtent*padding_factor/u_viewport_size*2.0,0.0,0.0);}"),colorRelief:Ni(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;uniform vec4 u_unpack;uniform sampler2D u_elevation_stops;uniform sampler2D u_color_stops;uniform int u_color_ramp_size;uniform float u_opacity;in vec2 v_pos;float getElevation(vec2 coord) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}float getElevationStop(int stop) {float x=(float(stop)+0.5)/float(u_color_ramp_size);vec4 data=texture(u_elevation_stops,vec2(x,0))*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {float el=getElevation(v_pos);int r=(u_color_ramp_size-1);int l=0;float el_l=getElevationStop(l);float el_r=getElevationStop(r);while(r-l > 1){int m=(r+l)/2;float el_m=getElevationStop(m);if(el < el_m){r=m;el_r=el_m;}else {l=m;el_l=el_m;}}float x=(float(l)+(el-el_l)/(el_r-el_l)+0.5)/float(u_color_ramp_size);fragColor=u_opacity*texture(u_color_stops,vec2(x,0)); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform vec2 u_dimension;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);highp vec2 epsilon=1.0/u_dimension;float scale=(u_dimension.x-2.0)/u_dimension.x;v_pos=(a_pos/8192.0)*scale+epsilon;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),debug:Ni("uniform highp vec4 u_color;uniform sampler2D u_overlay;in vec2 v_uv;void main() {vec4 overlay_color=texture(u_overlay,v_uv);fragColor=mix(u_color,overlay_color,overlay_color.a);}","in vec2 a_pos;out vec2 v_uv;uniform float u_overlay_scale;void main() {v_uv=a_pos/8192.0;gl_Position=projectTileWithElevation(a_pos*u_overlay_scale,get_elevation(a_pos));}"),depth:Ni(Ka,`in vec2 a_pos;void main() { #ifdef GLOBE gl_Position=projectTileFor3D(a_pos,0.0); #else gl_Position=u_projection_matrix*vec4(a_pos,0.0,1.0); #endif }`),fill:Ni(`#pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity fragColor=color*opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_fill_translate;in vec2 a_pos; #pragma mapbox: define highp vec4 color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 color #pragma mapbox: initialize lowp float opacity gl_Position=projectTile(a_pos+u_fill_translate,a_pos);}`),fillOutline:Ni(`in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=outline_color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_world;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif #pragma mapbox: define highp vec4 outline_color #pragma mapbox: define lowp float opacity void main() { #pragma mapbox: initialize highp vec4 outline_color #pragma mapbox: initialize lowp float opacity gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif }`),fillOutlinePattern:Ni(`uniform vec2 u_texsize;uniform sampler2D u_image;uniform float u_fade;in vec2 v_pos_a;in vec2 v_pos_b;in vec2 v_pos; #ifdef GLOBE in float v_depth; #endif #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_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=texture(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=texture(u_image,pos2);float dist=length(v_pos-gl_FragCoord.xy);float alpha=1.0-smoothstep(0.0,1.0,dist);fragColor=mix(color1,color2,u_fade)*alpha*opacity; #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_world;uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b;out vec2 v_pos; #ifdef GLOBE out float v_depth; #endif #pragma mapbox: define lowp float opacity #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 opacity #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;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileRatio,a_pos);v_pos=(gl_Position.xy/gl_Position.w+1.0)/2.0*u_world; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif }`),fillPattern:Ni(`#ifdef GL_ES precision highp float; #endif uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b; #pragma mapbox: define lowp float opacity #pragma mapbox: define lowp vec4 pattern_from #pragma mapbox: define lowp vec4 pattern_to void main() { #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump vec4 pattern_from #pragma mapbox: initialize mediump vec4 pattern_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=texture(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=texture(u_image,pos2);fragColor=mix(color1,color2,u_fade)*opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_pixel_coord_upper;uniform vec2 u_pixel_coord_lower;uniform vec3 u_scale;uniform vec2 u_fill_translate;in vec2 a_pos;out vec2 v_pos_a;out vec2 v_pos_b; #pragma mapbox: define lowp float opacity #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 opacity #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 tileZoomRatio=u_scale.x;float fromScale=u_scale.y;float toScale=u_scale.z;vec2 display_size_a=(pattern_br_a-pattern_tl_a)/pixel_ratio_from;vec2 display_size_b=(pattern_br_b-pattern_tl_b)/pixel_ratio_to;gl_Position=projectTile(a_pos+u_fill_translate,a_pos);v_pos_a=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,fromScale*display_size_a,tileZoomRatio,a_pos);v_pos_b=get_pattern_pos(u_pixel_coord_upper,u_pixel_coord_lower,toScale*display_size_b,tileZoomRatio,a_pos);}`),fillExtrusion:Ni(`in vec4 v_color;void main() {fragColor=v_color; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;uniform float u_vertical_gradient;uniform lowp float u_opacity;uniform vec2 u_fill_translate;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D in vec2 a_centroid; #endif out vec4 v_color; #pragma mapbox: define highp float base #pragma mapbox: define highp float height #pragma mapbox: define highp vec4 color void main() { #pragma mapbox: initialize highp float base #pragma mapbox: initialize highp float height #pragma mapbox: initialize highp vec4 color vec3 normal=a_normal_ed.xyz; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); #endif 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;vec3 normalForLighting=normal/16384.0;float directional=clamp(dot(normalForLighting,u_lightpos),0.0,1.0); #ifdef GLOBE mat3 rotMatrix=globeGetRotationMatrix(spherePos);normalForLighting=rotMatrix*normalForLighting;directional=mix(directional,clamp(dot(normalForLighting,u_lightpos_globe),0.0,1.0),u_projection_transition); #endif 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;}`),fillExtrusionPattern:Ni(`uniform vec2 u_texsize;uniform float u_fade;uniform sampler2D u_image;in vec2 v_pos_a;in vec2 v_pos_b;in 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=texture(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=texture(u_image,pos2);vec4 mixedColor=mix(color1,color2,u_fade);fragColor=mixedColor*v_lighting; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`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 vec2 u_fill_translate;uniform vec3 u_lightcolor;uniform lowp vec3 u_lightpos;uniform lowp vec3 u_lightpos_globe;uniform lowp float u_lightintensity;in vec2 a_pos;in vec4 a_normal_ed; #ifdef TERRAIN3D in vec2 a_centroid; #endif #ifdef GLOBE out vec3 v_sphere_pos; #endif out vec2 v_pos_a;out vec2 v_pos_b;out 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; #ifdef TERRAIN3D float height_terrain3d_offset=get_elevation(a_centroid);float base_terrain3d_offset=height_terrain3d_offset-(base > 0.0 ? 0.0 : 10.0); #else float height_terrain3d_offset=0.0;float base_terrain3d_offset=0.0; #endif base=max(0.0,base)+base_terrain3d_offset;height=max(0.0,height)+height_terrain3d_offset;float t=mod(normal.x,2.0);float elevation=t > 0.0 ? height : base;vec2 posInTile=a_pos+u_fill_translate; #ifdef GLOBE vec3 spherePos=projectToSphere(posInTile,a_pos);vec3 elevatedPos=spherePos*(1.0+elevation/GLOBE_RADIUS);v_sphere_pos=elevatedPos;gl_Position=interpolateProjectionFor3D(posInTile,spherePos,elevation); #else gl_Position=u_projection_matrix*vec4(posInTile,elevation,1.0); #endif vec2 pos=normal.x==1.0 && normal.y==0.0 && normal.z==16384.0 ? a_pos : vec2(edgedistance,elevation*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;}`),hillshadePrepare:Ni(`#ifdef GL_ES precision highp float; #endif uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_dimension;uniform float u_zoom;uniform vec4 u_unpack;float getElevation(vec2 coord,float bias) {vec4 data=texture(u_image,coord)*255.0;data.a=-1.0;return dot(data,u_unpack);}void main() {vec2 epsilon=1.0/u_dimension;float tileSize=u_dimension.x-2.0;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))*tileSize/pow(2.0,exaggeration+(28.2562-u_zoom));fragColor=clamp(vec4(deriv.x/8.0+0.5,deriv.y/8.0+0.5,1.0,1.0),0.0,1.0); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;uniform vec2 u_dimension;in vec2 a_pos;in vec2 a_texture_pos;out 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;}"),hillshade:Ni(`uniform sampler2D u_image;in vec2 v_pos;uniform vec2 u_latrange;uniform float u_exaggeration;uniform vec4 u_accent;uniform int u_method;uniform float u_altitudes[NUM_ILLUMINATION_SOURCES];uniform float u_azimuths[NUM_ILLUMINATION_SOURCES];uniform vec4 u_shadows[NUM_ILLUMINATION_SOURCES];uniform vec4 u_highlights[NUM_ILLUMINATION_SOURCES]; #define PI 3.141592653589793 #define STANDARD 0 #define COMBINED 1 #define IGOR 2 #define MULTIDIRECTIONAL 3 #define BASIC 4 float get_aspect(vec2 deriv){return deriv.x !=0.0 ? atan(deriv.y,-deriv.x) : PI/2.0*(deriv.y > 0.0 ? 1.0 :-1.0);}void igor_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float aspect=get_aspect(deriv);float azimuth=u_azimuths[0]+PI;float slope_stength=atan(length(deriv))*2.0/PI;float aspect_strength=1.0-abs(mod((aspect+azimuth)/PI+0.5,2.0)-1.0);float shadow_strength=slope_stength*aspect_strength;float highlight_strength=slope_stength*(1.0-aspect_strength);fragColor=u_shadows[0]*shadow_strength+u_highlights[0]*highlight_strength;}void standard_hillshade(vec2 deriv){float azimuth=u_azimuths[0]+PI;float slope=atan(0.625*length(deriv));float aspect=get_aspect(deriv);float intensity=u_exaggeration;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_shadows[0],u_highlights[0],shade)*sin(scaledSlope)*clamp(intensity*2.0,0.0,1.0);fragColor=accent_color*(1.0-shade_color.a)+shade_color;}void basic_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor=u_highlights[0]*(2.0*shade-1.0);}else {fragColor=u_shadows[0]*(1.0-2.0*shade);}}void multidirectional_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;fragColor=vec4(0,0,0,0);for(int i=0; i < NUM_ILLUMINATION_SOURCES; i++){float cos_alt=cos(u_altitudes[i]);float sin_alt=sin(u_altitudes[i]);float cos_az=-cos(u_azimuths[i]);float sin_az=-sin(u_azimuths[i]);float cang=(sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv));float shade=clamp(cang,0.0,1.0);if(shade > 0.5){fragColor+=u_highlights[i]*(2.0*shade-1.0)/float(NUM_ILLUMINATION_SOURCES);}else {fragColor+=u_shadows[i]*(1.0-2.0*shade)/float(NUM_ILLUMINATION_SOURCES);}}}void combined_hillshade(vec2 deriv){deriv=deriv*u_exaggeration*2.0;float azimuth=u_azimuths[0]+PI;float cos_az=cos(azimuth);float sin_az=sin(azimuth);float cos_alt=cos(u_altitudes[0]);float sin_alt=sin(u_altitudes[0]);float cang=acos((sin_alt-(deriv.y*cos_az*cos_alt-deriv.x*sin_az*cos_alt))/sqrt(1.0+dot(deriv,deriv)));cang=clamp(cang,0.0,PI/2.0);float shade=cang*atan(length(deriv))*4.0/PI/PI;float highlight=(PI/2.0-cang)*atan(length(deriv))*4.0/PI/PI;fragColor=u_shadows[0]*shade+u_highlights[0]*highlight;}void main() {vec4 pixel=texture(u_image,v_pos);float scaleFactor=cos(radians((u_latrange[0]-u_latrange[1])*(1.0-v_pos.y)+u_latrange[1]));vec2 deriv=((pixel.rg*8.0)-4.0)/scaleFactor;if (u_method==BASIC) {basic_hillshade(deriv);} else if (u_method==COMBINED) {combined_hillshade(deriv);} else if (u_method==IGOR) {igor_hillshade(deriv);} else if (u_method==MULTIDIRECTIONAL) {multidirectional_hillshade(deriv);} else if (u_method==STANDARD) {standard_hillshade(deriv);} else {standard_hillshade(deriv);} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,"uniform mat4 u_matrix;in vec2 a_pos;out vec2 v_pos;void main() {gl_Position=projectTile(a_pos,a_pos);v_pos=a_pos/8192.0;if (a_pos.y <-32767.5) {v_pos.y=0.0;}if (a_pos.y > 32766.5) {v_pos.y=1.0;}}"),line:Ni(`uniform lowp float u_device_pixel_ratio;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif #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);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform vec2 u_units_to_pixels;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp float v_linesofar; #ifdef GLOBE out float v_depth; #endif #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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),lineGradient:Ni(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;in vec2 v_width2;in vec2 v_normal;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif #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=texture(u_image,v_uv);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv; #ifdef GLOBE out float v_depth; #endif #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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_width2=vec2(outset,inset);}`),linePattern:Ni(`#ifdef GL_ES precision highp float; #endif uniform lowp float u_device_pixel_ratio;uniform vec2 u_texsize;uniform float u_fade;uniform mediump vec3 u_scale;uniform sampler2D u_image;in vec2 v_normal;in vec2 v_width2;in float v_linesofar;in float v_gamma_scale;in float v_width; #ifdef GLOBE in float v_depth; #endif #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(texture(u_image,pos_a),texture(u_image,pos_b),u_fade);fragColor=color*alpha*opacity; #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform vec2 u_units_to_pixels;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;out vec2 v_normal;out vec2 v_width2;out float v_linesofar;out float v_gamma_scale;out float v_width; #ifdef GLOBE out float v_depth; #endif #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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif v_linesofar=a_linesofar;v_width2=vec2(outset,inset);v_width=floorwidth;}`),lineSDF:Ni(`uniform lowp float u_device_pixel_ratio;uniform lowp float u_lineatlas_width;uniform sampler2D u_image;uniform float u_mix;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale; #ifdef GLOBE in float v_depth; #endif #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 #pragma mapbox: define mediump vec4 dasharray_from #pragma mapbox: define mediump vec4 dasharray_to 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 #pragma mapbox: initialize mediump vec4 dasharray_from #pragma mapbox: initialize mediump vec4 dasharray_to 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=texture(u_image,v_tex_a).a;float sdfdist_b=texture(u_image,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0/u_device_pixel_ratio)/min(dasharray_from.w,dasharray_to.w);alpha*=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 in vec2 a_pos_normal;in vec4 a_data;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out vec2 v_tex_a;out vec2 v_tex_b;out float v_gamma_scale; #ifdef GLOBE out float v_depth; #endif #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 #pragma mapbox: define mediump vec4 dasharray_from #pragma mapbox: define mediump vec4 dasharray_to 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 #pragma mapbox: initialize mediump vec4 dasharray_from #pragma mapbox: initialize mediump vec4 dasharray_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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),lineGradientSDF:Ni(`uniform lowp float u_device_pixel_ratio;uniform sampler2D u_image;uniform sampler2D u_image_dash;uniform float u_mix;uniform lowp float u_lineatlas_width;in vec2 v_normal;in vec2 v_width2;in vec2 v_tex_a;in vec2 v_tex_b;in float v_gamma_scale;in highp vec2 v_uv; #ifdef GLOBE in float v_depth; #endif #pragma mapbox: define lowp float blur #pragma mapbox: define lowp float opacity #pragma mapbox: define mediump float width #pragma mapbox: define lowp float floorwidth #pragma mapbox: define mediump vec4 dasharray_from #pragma mapbox: define mediump vec4 dasharray_to void main() { #pragma mapbox: initialize lowp float blur #pragma mapbox: initialize lowp float opacity #pragma mapbox: initialize mediump float width #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 dasharray_from #pragma mapbox: initialize mediump vec4 dasharray_to 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=texture(u_image,v_uv);float sdfdist_a=texture(u_image_dash,v_tex_a).a;float sdfdist_b=texture(u_image_dash,v_tex_b).a;float sdfdist=mix(sdfdist_a,sdfdist_b,u_mix);float sdfgamma=(u_lineatlas_width/256.0)/min(dasharray_from.w,dasharray_to.w);float dash_alpha=smoothstep(0.5-sdfgamma/floorwidth,0.5+sdfgamma/floorwidth,sdfdist);fragColor=color*(alpha*dash_alpha*opacity); #ifdef GLOBE if (v_depth > 1.0) {discard;} #endif #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,` #define scale 0.015873016 #define LINE_DISTANCE_SCALE 2.0 in vec2 a_pos_normal;in vec4 a_data;in float a_uv_x;in float a_split_index;uniform vec2 u_translation;uniform mediump float u_ratio;uniform lowp float u_device_pixel_ratio;uniform vec2 u_units_to_pixels;uniform float u_image_height;uniform float u_tileratio;uniform float u_crossfade_from;uniform float u_crossfade_to;uniform float u_lineatlas_height;out vec2 v_normal;out vec2 v_width2;out float v_gamma_scale;out highp vec2 v_uv;out vec2 v_tex_a;out vec2 v_tex_b; #ifdef GLOBE out float v_depth; #endif #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 #pragma mapbox: define mediump vec4 dasharray_from #pragma mapbox: define mediump vec4 dasharray_to 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 #pragma mapbox: initialize lowp float floorwidth #pragma mapbox: initialize mediump vec4 dasharray_from #pragma mapbox: initialize mediump vec4 dasharray_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;float texel_height=1.0/u_image_height;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);float adjustedThickness=projectLineThickness(pos.y);vec4 projected_no_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation);vec4 projected_with_extrude=projectTile(pos+offset2/u_ratio*adjustedThickness+u_translation+dist/u_ratio*adjustedThickness);gl_Position=projected_with_extrude; #ifdef GLOBE v_depth=gl_Position.z/gl_Position.w; #endif #ifdef TERRAIN3D v_gamma_scale=1.0; #else float extrude_length_without_perspective=length(dist);float extrude_length_with_perspective=length((projected_with_extrude.xy-projected_no_extrude.xy)/projected_with_extrude.w*u_units_to_pixels);v_gamma_scale=extrude_length_without_perspective/extrude_length_with_perspective; #endif float u_patternscale_a_x=u_tileratio/dasharray_from.w/u_crossfade_from;float u_patternscale_a_y=-dasharray_from.z/2.0/u_lineatlas_height;float u_patternscale_b_x=u_tileratio/dasharray_to.w/u_crossfade_to;float u_patternscale_b_y=-dasharray_to.z/2.0/u_lineatlas_height;v_tex_a=vec2(a_linesofar*u_patternscale_a_x/floorwidth,normal.y*u_patternscale_a_y+(float(dasharray_from.y)+0.5)/u_lineatlas_height);v_tex_b=vec2(a_linesofar*u_patternscale_b_x/floorwidth,normal.y*u_patternscale_b_y+(float(dasharray_to.y)+0.5)/u_lineatlas_height);v_width2=vec2(outset,inset);}`),raster:Ni(`uniform float u_fade_t;uniform float u_opacity;uniform sampler2D u_image0;uniform sampler2D u_image1;in vec2 v_pos0;in 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=texture(u_image0,v_pos0);vec4 color1=texture(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);fragColor=vec4(mix(u_high_vec,u_low_vec,rgb)*color.a,color.a); #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`uniform vec2 u_tl_parent;uniform float u_scale_parent;uniform float u_buffer_scale;uniform vec4 u_coords_top;uniform vec4 u_coords_bottom;in vec2 a_pos;out vec2 v_pos0;out vec2 v_pos1;void main() {vec2 fractionalPos=a_pos/8192.0;vec2 position=mix(mix(u_coords_top.xy,u_coords_top.zw,fractionalPos.x),mix(u_coords_bottom.xy,u_coords_bottom.zw,fractionalPos.x),fractionalPos.y);gl_Position=projectTile(position,position);v_pos0=((fractionalPos-0.5)/u_buffer_scale)+0.5; #ifdef GLOBE if (a_pos.y <-32767.5) {v_pos0.y=0.0;}if (a_pos.y > 32766.5) {v_pos0.y=1.0;} #endif v_pos1=(v_pos0*u_scale_parent)+u_tl_parent;}`),symbolIcon:Ni(`uniform sampler2D u_texture;in vec2 v_tex;in float v_total_opacity;void main() {fragColor=texture(u_texture,v_tex)*v_total_opacity; #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform vec2 u_texsize;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec2 v_tex;out float v_total_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;float ele=get_elevation(a_pos);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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float visibility=calculate_visibility(projectedPoint);v_total_opacity=opacity*max(0.0,min(visibility,fade_opacity[0]+fade_change));if (v_total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset/16.0)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}gl_Position=finalPos;v_tex=a_tex/u_texsize;}`),symbolSDF:Ni(`#define SDF_PX 8.0 uniform bool u_is_halo;uniform bool u_is_plain;uniform sampler2D u_texture;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;uniform bool u_is_text;in vec2 v_data0;in vec3 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #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 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 total_opacity=v_data1[2];float fontScale=u_is_text ? size/24.0 : size;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float inner_edge=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out_text,color_alpha_out_halo;if (u_is_plain){highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(inner_edge-gamma_scaled,inner_edge+gamma_scaled,dist);color_alpha_out_text=total_opacity*alpha*fill_color;}if (u_is_halo) {float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);float inner_edge_halo=inner_edge+gamma_halo*gamma_scale;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(inner_edge_halo-gamma_scaled_halo,inner_edge_halo+gamma_scaled_halo,dist);highp float halo_edge=(6.0-halo_width/fontScale)/SDF_PX;alpha_halo= min(smoothstep(halo_edge-gamma_scaled_halo,halo_edge+gamma_scaled_halo,dist),1.0-alpha_halo);color_alpha_out_halo=total_opacity*alpha_halo*halo_color;}if (u_is_plain && u_is_halo) {fragColor=color_alpha_out_text+(1.-color_alpha_out_text.a)*color_alpha_out_halo;} else if (u_is_halo){fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out_text;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`in vec4 a_pos_offset;in vec4 a_data;in vec4 a_pixeloffset;in vec3 a_projected_pos;in 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_label_plane_matrix;uniform mat4 u_coord_matrix;uniform bool u_is_text;uniform bool u_pitch_with_map;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;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_translation;uniform float u_pitched_scale;out vec2 v_data0;out 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/16.0;vec2 a_minFontScale=a_pixeloffset.zw/256.0;float ele=get_elevation(a_pos);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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*max(a_minFontScale,fontScale)+a_pxoffset)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0=a_tex/u_texsize;v_data1=vec3(gamma_scale,size,total_opacity);}`),symbolTextAndIcon:Ni(`#define SDF_PX 8.0 #define SDF 1.0 #define ICON 0.0 uniform bool u_is_halo;uniform bool u_is_text;uniform sampler2D u_texture;uniform sampler2D u_texture_icon;uniform highp float u_gamma_scale;uniform lowp float u_device_pixel_ratio;in vec4 v_data0;in vec4 v_data1; #pragma mapbox: define highp vec4 fill_color #pragma mapbox: define highp vec4 halo_color #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 halo_width #pragma mapbox: initialize lowp float halo_blur float total_opacity=v_data1[2];if (v_data1.w==ICON) {vec2 tex_icon=v_data0.zw;fragColor=texture(u_texture_icon,tex_icon)*total_opacity; #ifdef OVERDRAW_INSPECTOR 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;highp float gamma=EDGE_GAMMA/(fontScale*u_gamma_scale);lowp float buff=(256.0-64.0)/256.0;lowp float dist=texture(u_texture,tex).a;lowp vec4 color_alpha_out,color_alpha_out_halo;if (u_is_text) {highp float gamma_scaled=gamma*gamma_scale;highp float alpha=smoothstep(buff-gamma_scaled,buff+gamma_scaled,dist);color_alpha_out=fill_color*(alpha*total_opacity);}if (u_is_halo) {highp float gamma_halo=(halo_blur*1.19/SDF_PX+EDGE_GAMMA)/(fontScale*u_gamma_scale);lowp float buff_halo=(6.0-halo_width/fontScale)/SDF_PX;highp float gamma_scaled_halo=gamma_halo*gamma_scale;highp float alpha_halo=smoothstep(buff_halo-gamma_scaled_halo,buff_halo+gamma_scaled_halo,dist);color_alpha_out_halo=halo_color*(alpha_halo*total_opacity);}if (u_is_text && u_is_halo) {fragColor=color_alpha_out+(1.-color_alpha_out.a)*color_alpha_out_halo;} else if (u_is_halo) {fragColor=color_alpha_out_halo;} else {fragColor=color_alpha_out;} #ifdef OVERDRAW_INSPECTOR fragColor=vec4(1.0); #endif }`,`in vec4 a_pos_offset;in vec4 a_data;in vec3 a_projected_pos;in 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_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;uniform bool u_is_along_line;uniform bool u_is_variable_anchor;uniform vec2 u_translation;uniform float u_pitched_scale;out vec4 v_data0;out 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;float ele=get_elevation(a_pos);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;}vec2 translated_a_pos=a_pos+u_translation;vec4 projectedPoint=projectTileWithElevation(translated_a_pos,ele);vec2 fade_opacity=unpack_opacity(a_fade_opacity);float visibility=calculate_visibility(projectedPoint);float fade_change=fade_opacity[1] > 0.5 ? u_fade_change :-u_fade_change;float interpolated_fade_opacity=max(0.0,min(visibility,fade_opacity[0]+fade_change));float total_opacity=opacity*interpolated_fade_opacity;if (total_opacity < 0.1){gl_Position=vec4(-2.,-2.,-2.,1.);return;}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=projectTileWithElevation(translated_a_pos+vec2(1,0),ele);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;if (u_is_along_line || u_is_variable_anchor) {projected_pos=vec4(a_projected_pos.xy,ele,1.0);} else if (u_pitch_with_map) {projected_pos=u_label_plane_matrix*vec4(a_projected_pos.xy+u_translation,ele,1.0);} else {projected_pos=u_label_plane_matrix*projectTileWithElevation(a_projected_pos.xy+u_translation,ele);}float z=float(u_pitch_with_map)*projected_pos.z/projected_pos.w;float projectionScaling=1.0; #ifdef GLOBE if(u_pitch_with_map && !u_is_along_line) {float anchor_pos_tile_y=(u_coord_matrix*vec4(projected_pos.xy/projected_pos.w,z,1.0)).y;projectionScaling=mix(projectionScaling,1.0/circumferenceRatioAtTileY(anchor_pos_tile_y)*u_pitched_scale,u_projection_transition);} #endif vec4 finalPos=u_coord_matrix*vec4(projected_pos.xy/projected_pos.w+rotation_matrix*(a_offset/32.0*fontScale)*projectionScaling,z,1.0);if(u_pitch_with_map) {finalPos=projectTileWithElevation(finalPos.xy,finalPos.z);}float gamma_scale=finalPos.w;gl_Position=finalPos;v_data0.xy=a_tex/u_texsize;v_data0.zw=a_tex/u_texsize_icon;v_data1=vec4(gamma_scale,size,total_opacity,is_sdf);}`),terrain:Ni("uniform sampler2D u_texture;uniform vec4 u_fog_color;uniform vec4 u_horizon_color;uniform float u_fog_ground_blend;uniform float u_fog_ground_blend_opacity;uniform float u_horizon_fog_blend;uniform bool u_is_globe_mode;in vec2 v_texture_pos;in float v_fog_depth;const float gamma=2.2;vec4 gammaToLinear(vec4 color) {return pow(color,vec4(gamma));}vec4 linearToGamma(vec4 color) {return pow(color,vec4(1.0/gamma));}void main() {vec4 surface_color=texture(u_texture,vec2(v_texture_pos.x,1.0-v_texture_pos.y));if (!u_is_globe_mode && u_fog_ground_blend_opacity > 0.0 && v_fog_depth > u_fog_ground_blend) {vec4 surface_color_linear=gammaToLinear(surface_color);float blend_color=smoothstep(0.0,1.0,max((v_fog_depth-u_horizon_fog_blend)/(1.0-u_horizon_fog_blend),0.0));vec4 fog_horizon_color_linear=mix(gammaToLinear(u_fog_color),gammaToLinear(u_horizon_color),blend_color);float factor_fog=max(v_fog_depth-u_fog_ground_blend,0.0)/(1.0-u_fog_ground_blend);fragColor=linearToGamma(mix(surface_color_linear,fog_horizon_color_linear,pow(factor_fog,2.0)*u_fog_ground_blend_opacity));} else {fragColor=surface_color;}}","in vec3 a_pos3d;uniform mat4 u_fog_matrix;uniform float u_ele_delta;out vec2 v_texture_pos;out float v_fog_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);vec4 pos=u_fog_matrix*vec4(a_pos3d.xy,ele,1.0);v_fog_depth=pos.z/pos.w*0.5+0.5;}"),terrainDepth:Ni("in float v_depth;const highp vec4 bitSh=vec4(256.*256.*256.,256.*256.,256.,1.);const highp vec4 bitMsk=vec4(0.,vec3(1./256.0));highp vec4 pack(highp float value) {highp vec4 comp=fract(value*bitSh);comp-=comp.xxyz*bitMsk;return comp;}void main() {fragColor=pack(v_depth);}","in vec3 a_pos3d;uniform float u_ele_delta;out float v_depth;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);v_depth=gl_Position.z/gl_Position.w;}"),terrainCoords:Ni("precision mediump float;uniform sampler2D u_texture;uniform float u_terrain_coords_id;in vec2 v_texture_pos;void main() {vec4 rgba=texture(u_texture,v_texture_pos);fragColor=vec4(rgba.r,rgba.g,rgba.b,u_terrain_coords_id);}","in vec3 a_pos3d;uniform float u_ele_delta;out vec2 v_texture_pos;void main() {float ele=get_elevation(a_pos3d.xy);float ele_delta=a_pos3d.z==1.0 ? u_ele_delta : 0.0;v_texture_pos=a_pos3d.xy/8192.0;gl_Position=projectTileFor3D(a_pos3d.xy,ele-ele_delta);}"),projectionErrorMeasurement:Ni("in vec4 v_output_error_encoded;void main() {fragColor=v_output_error_encoded;}","in vec2 a_pos;uniform highp float u_input;uniform highp float u_output_expected;out vec4 v_output_error_encoded;void main() {float real_output=2.0*atan(exp(PI-(u_input*PI*2.0)))-PI*0.5;float error=real_output-u_output_expected;float abs_error=abs(error)*128.0;v_output_error_encoded.x=min(floor(abs_error*256.0),255.0)/255.0;abs_error-=v_output_error_encoded.x;v_output_error_encoded.y=min(floor(abs_error*65536.0),255.0)/255.0;abs_error-=v_output_error_encoded.x/255.0;v_output_error_encoded.z=min(floor(abs_error*16777216.0),255.0)/255.0;v_output_error_encoded.w=error >=0.0 ? 1.0 : 0.0;gl_Position=vec4(a_pos,0.0,1.0);}"),atmosphere:Ni(`#ifdef GL_ES precision highp float; #endif in vec3 view_direction;uniform vec3 u_sun_pos;uniform vec3 u_globe_position;uniform float u_globe_radius;uniform float u_atmosphere_blend;/**Shader use from https:*Made some change to adapt to MapLibre Globe geometry*/const float PI=3.141592653589793;const int iSteps=5;const int jSteps=3;/*radius of the planet*/const float EARTH_RADIUS=6371e3;/*radius of the atmosphere*/const float ATMOS_RADIUS=6471e3;vec2 rsi(vec3 r0,vec3 rd,float sr) {float a=dot(rd,rd);float b=2.0*dot(rd,r0);float c=dot(r0,r0)-(sr*sr);float d=(b*b)-4.0*a*c;if (d < 0.0) return vec2(1e5,-1e5);return vec2((-b-sqrt(d))/(2.0*a),(-b+sqrt(d))/(2.0*a));}vec4 atmosphere(vec3 r,vec3 r0,vec3 pSun,float iSun,float rPlanet,float rAtmos,vec3 kRlh,float kMie,float shRlh,float shMie,float g) {pSun=normalize(pSun);r=normalize(r);vec2 p=rsi(r0,r,rAtmos);if (p.x > p.y) {return vec4(0.0,0.0,0.0,1.0);}if (p.x < 0.0) {p.x=0.0;}vec3 pos=r0+r*p.x;vec2 p2=rsi(r0,r,rPlanet);if (p2.x <=p2.y && p2.x > 0.0) {p.y=min(p.y,p2.x);}float iStepSize=(p.y-p.x)/float(iSteps);float iTime=p.x+iStepSize*0.5;vec3 totalRlh=vec3(0,0,0);vec3 totalMie=vec3(0,0,0);float iOdRlh=0.0;float iOdMie=0.0;float mu=dot(r,pSun);float mumu=mu*mu;float gg=g*g;float pRlh=3.0/(16.0*PI)*(1.0+mumu);float pMie=3.0/(8.0*PI)*((1.0-gg)*(mumu+1.0))/(pow(1.0+gg-2.0*mu*g,1.5)*(2.0+gg));for (int i=0; i < iSteps; i++) {vec3 iPos=r0+r*iTime;float iHeight=length(iPos)-rPlanet;float odStepRlh=exp(-iHeight/shRlh)*iStepSize;float odStepMie=exp(-iHeight/shMie)*iStepSize;iOdRlh+=odStepRlh;iOdMie+=odStepMie;float jStepSize=rsi(iPos,pSun,rAtmos).y/float(jSteps);float jTime=jStepSize*0.5;float jOdRlh=0.0;float jOdMie=0.0;for (int j=0; j < jSteps; j++) {vec3 jPos=iPos+pSun*jTime;float jHeight=length(jPos)-rPlanet;jOdRlh+=exp(-jHeight/shRlh)*jStepSize;jOdMie+=exp(-jHeight/shMie)*jStepSize;jTime+=jStepSize;}vec3 attn=exp(-(kMie*(iOdMie+jOdMie)+kRlh*(iOdRlh+jOdRlh)));totalRlh+=odStepRlh*attn;totalMie+=odStepMie*attn;iTime+=iStepSize;}float opacity=exp(-(length(kRlh)*length(totalRlh)+kMie*length(totalMie)));vec3 color=iSun*(pRlh*kRlh*totalRlh+pMie*kMie*totalMie);return vec4(color,opacity);}void main() {vec3 scale_camera_pos=-u_globe_position*EARTH_RADIUS/u_globe_radius;vec4 color=atmosphere(normalize(view_direction),scale_camera_pos,u_sun_pos,22.0,EARTH_RADIUS,ATMOS_RADIUS,vec3(5.5e-6,13.0e-6,22.4e-6),21e-6,8e3,1.2e3,0.758 );color.rgb=1.0-exp(-1.0*color.rgb);color=pow(color,vec4(1.0/2.2));fragColor=vec4(color.rgb,1.0-color.a)*u_atmosphere_blend;}`,"in vec2 a_pos;uniform mat4 u_inv_proj_matrix;out vec3 view_direction;void main() {view_direction=(u_inv_proj_matrix*vec4(a_pos,0.0,1.0)).xyz;gl_Position=vec4(a_pos,0.0,1.0);}"),sky:Ni("uniform vec4 u_sky_color;uniform vec4 u_horizon_color;uniform vec2 u_horizon;uniform vec2 u_horizon_normal;uniform float u_sky_horizon_blend;uniform float u_sky_blend;void main() {float x=gl_FragCoord.x;float y=gl_FragCoord.y;float blend=(y-u_horizon.y)*u_horizon_normal.y+(x-u_horizon.x)*u_horizon_normal.x;if (blend > 0.0) {if (blend < u_sky_horizon_blend) {fragColor=mix(u_sky_color,u_horizon_color,pow(1.0-blend/u_sky_horizon_blend,2.0));} else {fragColor=u_sky_color;}}fragColor=mix(fragColor,vec4(vec3(0.0),0.0),u_sky_blend);}","in vec2 a_pos;void main() {gl_Position=vec4(a_pos,1.0,1.0);}")};function Ni(Y,d){let P=/#pragma mapbox: ([\w]+) ([\w]+) ([\w]+) ([\w]+)/g,N=d.match(/in ([\w]+) ([\w]+)/g),H=Y.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),$=d.match(/uniform ([\w]+) ([\w]+)([\s]*)([\w]*)/g),se=$?$.concat(H):H,de={};return{fragmentSource:Y=Y.replace(P,((Ae,Fe,Ie,Ye,st)=>(de[st]=!0,Fe==="define"?` #ifndef HAS_UNIFORM_u_${st} in ${Ie} ${Ye} ${st}; #else uniform ${Ie} ${Ye} u_${st}; #endif `:` #ifdef HAS_UNIFORM_u_${st} ${Ie} ${Ye} ${st} = u_${st}; #endif `))),vertexSource:d=d.replace(P,((Ae,Fe,Ie,Ye,st)=>{let dt=Ye==="float"?"vec2":"vec4",Pe=st.match(/color/)?"color":dt;return de[st]?Fe==="define"?` #ifndef HAS_UNIFORM_u_${st} uniform lowp float u_${st}_t; in ${Ie} ${dt} a_${st}; out ${Ie} ${Ye} ${st}; #else uniform ${Ie} ${Ye} u_${st}; #endif `:Pe==="vec4"?` #ifndef HAS_UNIFORM_u_${st} ${st} = a_${st}; #else ${Ie} ${Ye} ${st} = u_${st}; #endif `:` #ifndef HAS_UNIFORM_u_${st} ${st} = unpack_mix_${Pe}(a_${st}, u_${st}_t); #else ${Ie} ${Ye} ${st} = u_${st}; #endif `:Fe==="define"?` #ifndef HAS_UNIFORM_u_${st} uniform lowp float u_${st}_t; in ${Ie} ${dt} a_${st}; #else uniform ${Ie} ${Ye} u_${st}; #endif `:Pe==="vec4"?` #ifndef HAS_UNIFORM_u_${st} ${Ie} ${Ye} ${st} = a_${st}; #else ${Ie} ${Ye} ${st} = u_${st}; #endif `:` #ifndef HAS_UNIFORM_u_${st} ${Ie} ${Ye} ${st} = unpack_mix_${Pe}(a_${st}, u_${st}_t); #else ${Ie} ${Ye} ${st} = u_${st}; #endif `})),staticAttributes:N,staticUniforms:se}}class ka{constructor(d,P,N){this.vertexBuffer=d,this.indexBuffer=P,this.segments=N}destroy(){this.vertexBuffer.destroy(),this.indexBuffer.destroy(),this.segments.destroy(),this.vertexBuffer=null,this.indexBuffer=null,this.segments=null}}var vs=i.aS([{name:"a_pos",type:"Int16",components:2}]);let yo="#define PROJECTION_MERCATOR",so="mercator";class oo{constructor(){this._cachedMesh=null}get name(){return"mercator"}get useSubdivision(){return!1}get shaderVariantName(){return so}get shaderDefine(){return yo}get shaderPreludeCode(){return Oa.projectionMercator}get vertexShaderPreludeCode(){return Oa.projectionMercator.vertexSource}get subdivisionGranularity(){return i.aT.noSubdivision}get useGlobeControls(){return!1}get transitionState(){return 0}get latitudeErrorCorrectionRadians(){return 0}destroy(){}updateGPUdependent(d){}getMeshFromTileID(d,P,N,H,$){if(this._cachedMesh)return this._cachedMesh;let se=new i.aU;se.emplaceBack(0,0),se.emplaceBack(i.a6,0),se.emplaceBack(0,i.a6),se.emplaceBack(i.a6,i.a6);let de=d.createVertexBuffer(se,vs.members),Ae=i.aV.simpleSegment(0,0,4,2),Fe=new i.aW;Fe.emplaceBack(1,0,2),Fe.emplaceBack(1,2,3);let Ie=d.createIndexBuffer(Fe);return this._cachedMesh=new ka(de,Ie,Ae),this._cachedMesh}recalculate(){}hasTransition(){return!1}setErrorQueryLatitudeDegrees(d){}}class ko{constructor(d=0,P=0,N=0,H=0){if(isNaN(d)||d<0||isNaN(P)||P<0||isNaN(N)||N<0||isNaN(H)||H<0)throw new Error("Invalid value for edge-insets, top, bottom, left and right must all be numbers");this.top=d,this.bottom=P,this.left=N,this.right=H}interpolate(d,P,N){return P.top!=null&&d.top!=null&&(this.top=i.H.number(d.top,P.top,N)),P.bottom!=null&&d.bottom!=null&&(this.bottom=i.H.number(d.bottom,P.bottom,N)),P.left!=null&&d.left!=null&&(this.left=i.H.number(d.left,P.left,N)),P.right!=null&&d.right!=null&&(this.right=i.H.number(d.right,P.right,N)),this}getCenter(d,P){let N=i.al((this.left+d-this.right)/2,0,d),H=i.al((this.top+P-this.bottom)/2,0,P);return new i.P(N,H)}equals(d){return this.top===d.top&&this.bottom===d.bottom&&this.left===d.left&&this.right===d.right}clone(){return new ko(this.top,this.bottom,this.left,this.right)}toJSON(){return{top:this.top,bottom:this.bottom,left:this.left,right:this.right}}}function pa(Y,d){if(!Y.renderWorldCopies||Y.lngRange)return;let P=d.lng-Y.center.lng;d.lng+=P>180?-360:P<-180?360:0}function la(Y){return Math.max(0,Math.floor(Y))}class As{constructor(d,P){var N;this.applyConstrain=(H,$)=>this._constrainOverride!==null?this._constrainOverride(H,$):this._callbacks.defaultConstrain(H,$),this._callbacks=d,this._tileSize=512,this._renderWorldCopies=(P==null?void 0:P.renderWorldCopies)===void 0||!!(P!=null&&P.renderWorldCopies),this._minZoom=(P==null?void 0:P.minZoom)||0,this._maxZoom=(P==null?void 0:P.maxZoom)||22,this._minPitch=(P==null?void 0:P.minPitch)==null?0:P==null?void 0:P.minPitch,this._maxPitch=(P==null?void 0:P.maxPitch)==null?60:P==null?void 0:P.maxPitch,this._constrainOverride=(N=P==null?void 0:P.constrainOverride)!==null&&N!==void 0?N:null,this.setMaxBounds(),this._width=0,this._height=0,this._center=new i.W(0,0),this._elevation=0,this._zoom=0,this._tileZoom=la(this._zoom),this._scale=i.ao(this._zoom),this._bearingInRadians=0,this._fovInRadians=.6435011087932844,this._pitchInRadians=0,this._rollInRadians=0,this._unmodified=!0,this._edgeInsets=new ko,this._minElevationForCurrentTile=0,this._autoCalculateNearFarZ=!0}apply(d,P,N){this._constrainOverride=d.constrainOverride,this._latRange=d.latRange,this._lngRange=d.lngRange,this._width=d.width,this._height=d.height,this._center=d.center,this._elevation=d.elevation,this._minElevationForCurrentTile=d.minElevationForCurrentTile,this._zoom=d.zoom,this._tileZoom=la(this._zoom),this._scale=i.ao(this._zoom),this._bearingInRadians=d.bearingInRadians,this._fovInRadians=d.fovInRadians,this._pitchInRadians=d.pitchInRadians,this._rollInRadians=d.rollInRadians,this._unmodified=d.unmodified,this._edgeInsets=new ko(d.padding.top,d.padding.bottom,d.padding.left,d.padding.right),this._minZoom=d.minZoom,this._maxZoom=d.maxZoom,this._minPitch=d.minPitch,this._maxPitch=d.maxPitch,this._renderWorldCopies=d.renderWorldCopies,this._cameraToCenterDistance=d.cameraToCenterDistance,this._nearZ=d.nearZ,this._farZ=d.farZ,this._autoCalculateNearFarZ=!N&&d.autoCalculateNearFarZ,P&&this.constrainInternal(),this._calcMatrices()}get pixelsToClipSpaceMatrix(){return this._pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._clipSpaceToPixelsMatrix}get minElevationForCurrentTile(){return this._minElevationForCurrentTile}setMinElevationForCurrentTile(d){this._minElevationForCurrentTile=d}get tileSize(){return this._tileSize}get tileZoom(){return this._tileZoom}get scale(){return this._scale}get width(){return this._width}get height(){return this._height}get bearingInRadians(){return this._bearingInRadians}get lngRange(){return this._lngRange}get latRange(){return this._latRange}get pixelsToGLUnits(){return this._pixelsToGLUnits}get minZoom(){return this._minZoom}setMinZoom(d){this._minZoom!==d&&(this._minZoom=d,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get maxZoom(){return this._maxZoom}setMaxZoom(d){this._maxZoom!==d&&(this._maxZoom=d,this.setZoom(this.applyConstrain(this._center,this.zoom).zoom))}get minPitch(){return this._minPitch}setMinPitch(d){this._minPitch!==d&&(this._minPitch=d,this.setPitch(Math.max(this.pitch,d)))}get maxPitch(){return this._maxPitch}setMaxPitch(d){this._maxPitch!==d&&(this._maxPitch=d,this.setPitch(Math.min(this.pitch,d)))}get renderWorldCopies(){return this._renderWorldCopies}setRenderWorldCopies(d){d===void 0?d=!0:d===null&&(d=!1),this._renderWorldCopies=d}get constrainOverride(){return this._constrainOverride}setConstrainOverride(d){d===void 0&&(d=null),this._constrainOverride!==d&&(this._constrainOverride=d,this.constrainInternal(),this._calcMatrices())}get worldSize(){return this._tileSize*this._scale}get centerOffset(){return this.centerPoint._sub(this.size._div(2))}get size(){return new i.P(this._width,this._height)}get bearing(){return this._bearingInRadians/Math.PI*180}setBearing(d){let P=i.X(d,-180,180)*Math.PI/180;var N,H,$,se,de,Ae,Fe,Ie,Ye;this._bearingInRadians!==P&&(this._unmodified=!1,this._bearingInRadians=P,this._calcMatrices(),this._rotationMatrix=s(),N=this._rotationMatrix,$=-this._bearingInRadians,se=(H=this._rotationMatrix)[0],de=H[1],Ae=H[2],Fe=H[3],Ie=Math.sin($),Ye=Math.cos($),N[0]=se*Ye+Ae*Ie,N[1]=de*Ye+Fe*Ie,N[2]=se*-Ie+Ae*Ye,N[3]=de*-Ie+Fe*Ye)}get rotationMatrix(){return this._rotationMatrix}get pitchInRadians(){return this._pitchInRadians}get pitch(){return this._pitchInRadians/Math.PI*180}setPitch(d){let P=i.al(d,this.minPitch,this.maxPitch)/180*Math.PI;this._pitchInRadians!==P&&(this._unmodified=!1,this._pitchInRadians=P,this._calcMatrices())}get rollInRadians(){return this._rollInRadians}get roll(){return this._rollInRadians/Math.PI*180}setRoll(d){let P=d/180*Math.PI;this._rollInRadians!==P&&(this._unmodified=!1,this._rollInRadians=P,this._calcMatrices())}get fovInRadians(){return this._fovInRadians}get fov(){return i.aX(this._fovInRadians)}setFov(d){d=i.al(d,.1,150),this.fov!==d&&(this._unmodified=!1,this._fovInRadians=i.an(d),this._calcMatrices())}get zoom(){return this._zoom}setZoom(d){let P=this.applyConstrain(this._center,d).zoom;this._zoom!==P&&(this._unmodified=!1,this._zoom=P,this._tileZoom=Math.max(0,Math.floor(P)),this._scale=i.ao(P),this.constrainInternal(),this._calcMatrices())}get center(){return this._center}setCenter(d){d.lat===this._center.lat&&d.lng===this._center.lng||(this._unmodified=!1,this._center=d,this.constrainInternal(),this._calcMatrices())}get elevation(){return this._elevation}setElevation(d){d!==this._elevation&&(this._elevation=d,this.constrainInternal(),this._calcMatrices())}get padding(){return this._edgeInsets.toJSON()}setPadding(d){this._edgeInsets.equals(d)||(this._unmodified=!1,this._edgeInsets.interpolate(this._edgeInsets,d,1),this._calcMatrices())}get centerPoint(){return this._edgeInsets.getCenter(this._width,this._height)}get pixelsPerMeter(){return this._pixelPerMeter}get unmodified(){return this._unmodified}get cameraToCenterDistance(){return this._cameraToCenterDistance}get nearZ(){return this._nearZ}get farZ(){return this._farZ}get autoCalculateNearFarZ(){return this._autoCalculateNearFarZ}overrideNearFarZ(d,P){this._autoCalculateNearFarZ=!1,this._nearZ=d,this._farZ=P,this._calcMatrices()}clearNearFarZOverride(){this._autoCalculateNearFarZ=!0,this._calcMatrices()}isPaddingEqual(d){return this._edgeInsets.equals(d)}interpolatePadding(d,P,N){this._unmodified=!1,this._edgeInsets.interpolate(d,P,N),this.constrainInternal(),this._calcMatrices()}resize(d,P,N=!0){this._width=d,this._height=P,N&&this.constrainInternal(),this._calcMatrices()}getMaxBounds(){var d,P;return((d=this._latRange)===null||d===void 0?void 0:d.length)!==2||((P=this._lngRange)===null||P===void 0?void 0:P.length)!==2?null:new ie([this._lngRange[0],this._latRange[0]],[this._lngRange[1],this._latRange[1]])}setMaxBounds(d){d?(this._lngRange=[d.getWest(),d.getEast()],this._latRange=[d.getSouth(),d.getNorth()],this.constrainInternal()):(this._lngRange=null,this._latRange=[-i.am,i.am])}getCameraQueryGeometry(d,P){if(P.length===1)return[P[0],d];{let{minX:N,minY:H,maxX:$,maxY:se}=i.a8.fromPoints(P).extend(d);return[new i.P(N,H),new i.P($,H),new i.P($,se),new i.P(N,se),new i.P(N,H)]}}constrainInternal(){if(!this.center||!this._width||!this._height||this._constraining)return;this._constraining=!0;let d=this._unmodified,{center:P,zoom:N}=this.applyConstrain(this.center,this.zoom);this.setCenter(P),this.setZoom(N),this._unmodified=d,this._constraining=!1}_calcMatrices(){if(this._width&&this._height){this._pixelsToGLUnits=[2/this._width,-2/this._height];let d=i.ap(new Float64Array(16));i.S(d,d,[this._width/2,-this._height/2,1]),i.Q(d,d,[1,-1,0]),this._clipSpaceToPixelsMatrix=d,d=i.ap(new Float64Array(16)),i.S(d,d,[1,-1,1]),i.Q(d,d,[-1,-1,0]),i.S(d,d,[2/this._width,2/this._height,1]),this._pixelsToClipSpaceMatrix=d,this._cameraToCenterDistance=.5/Math.tan(this.fovInRadians/2)*this._height}this._callbacks.calcMatrices()}calculateCenterFromCameraLngLatAlt(d,P,N,H){let $=N!==void 0?N:this.bearing,se=H=H!==void 0?H:this.pitch,{distanceToCenter:de,clampedElevation:Ae}=this._distanceToCenterFromAltElevationPitch(P,this.elevation,se),{x:Fe,y:Ie}=cr(se,$),Ye=i.a7.fromLngLat(d,P),st,dt,Pe=i.aY(1,Ye.y),Xe=0;do{if(Xe+=1,Xe>10)break;dt=de/Pe,st=new i.a7(Ye.x+Fe*dt,Ye.y+Ie*dt),Pe=1/st.meterInMercatorCoordinateUnits()}while(Math.abs(de-dt*Pe)>1e-12);return{center:st.toLngLat(),elevation:Ae,zoom:i.ar(this.height/2/Math.tan(this.fovInRadians/2)/dt/this.tileSize)}}recalculateZoomAndCenter(d){if(this.elevation-d==0)return;let P=1/this.worldSize,N=i.aq(1,this.center.lat)*this.worldSize,H=i.a7.fromLngLat(this.center,this.elevation),$=H.x/P,se=H.y/P,de=H.z/P,Ae=this.pitch,Fe=this.bearing,{x:Ie,y:Ye,z:st}=cr(Ae,Fe),dt=this.cameraToCenterDistance,Pe=$+dt*-Ie,Xe=se+dt*-Ye,at=de+dt*st,{distanceToCenter:xt,clampedElevation:Et}=this._distanceToCenterFromAltElevationPitch(at/N,d,Ae),Bt=xt*N,St=new i.a7((Pe+Ie*Bt)*P,(Xe+Ye*Bt)*P,0).toLngLat(),Pt=i.aq(1,St.lat),$t=i.ar(this.height/2/Math.tan(this.fovInRadians/2)/xt/Pt/this.tileSize);this._elevation=Et,this._center=St,this.setZoom($t)}_distanceToCenterFromAltElevationPitch(d,P,N){let H=-Math.cos(i.an(N)),$=d-P,se,de=P;return H*$>=0||Math.abs(H)<.1?(se=1e4,de=d+se*H):se=-$/H,{distanceToCenter:se,clampedElevation:de}}getCameraPoint(){let d=Math.tan(this.pitchInRadians)*(this.cameraToCenterDistance||1);return this.centerPoint.add(new i.P(d*Math.sin(this.rollInRadians),d*Math.cos(this.rollInRadians)))}getCameraAltitude(){return Math.cos(this.pitchInRadians)*this._cameraToCenterDistance/this._pixelPerMeter+this.elevation}getCameraLngLat(){let d=i.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this.cameraToCenterDistance/d).toLngLat()}getMercatorTileCoordinates(d){if(!d)return[0,0,1,1];let P=d.canonical.z>=0?1<this.max[0]||d.aabb.min[1]>this.max[1]||d.aabb.min[2]>this.max[2]||d.aabb.max[0]0?(P+=d[H]*this.min[H],N+=d[H]*this.max[H]):(N+=d[H]*this.min[H],P+=d[H]*this.max[H]);return P>=0?2:N<0?0:1}}class xu{distanceToTile2d(d,P,N,H){let $=H,se=$.distanceX([d,P]),de=$.distanceY([d,P]);return Math.hypot(se,de)}getWrap(d,P,N){return N}getTileBoundingVolume(d,P,N,H){var $,se;let de=0,Ae=0;if(H!=null&&H.terrain){let Ie=new i.a3(d.z,P,d.z,d.x,d.y),Ye=H.terrain.getMinMaxElevation(Ie);de=($=Ye.minElevation)!==null&&$!==void 0?$:Math.min(0,N),Ae=(se=Ye.maxElevation)!==null&&se!==void 0?se:Math.max(0,N)}let Fe=1<H}allowWorldCopies(){return!0}prepareNextFrame(){}}class rs{constructor(d,P,N){this.points=d,this.planes=P,this.aabb=N}static fromInvProjectionMatrix(d,P=1,N=0,H,$){let se=$?[[6,5,4],[0,1,2],[0,3,7],[2,1,5],[3,2,6],[0,4,5]]:[[0,1,2],[6,5,4],[0,3,7],[2,1,5],[3,2,6],[0,4,5]],de=Math.pow(2,N),Ae=[[-1,1,-1,1],[1,1,-1,1],[1,-1,-1,1],[-1,-1,-1,1],[-1,1,1,1],[1,1,1,1],[1,-1,1,1],[-1,-1,1,1]].map((st=>(function(dt,Pe,Xe,at){let xt=i.aE([],dt,Pe),Et=1/xt[3]/Xe*at;return i.b4(xt,xt,[Et,Et,1/xt[3],Et])})(st,d,P,de)));H&&(function(st,dt,Pe,Xe){let at=Xe?4:0,xt=Xe?0:4,Et=0,Bt=[],St=[];for(let Ht=0;Ht<4;Ht++){let dr=i.b0([],st[Ht+xt],st[Ht+at]),Xr=i.b5(dr);i.aZ(dr,dr,1/Xr),Bt.push(Xr),St.push(dr)}for(let Ht=0;Ht<4;Ht++){let dr=i.b6(st[Ht+at],St[Ht],Pe);Et=dr!==null&&dr>=0?Math.max(Et,dr):Math.max(Et,Bt[Ht])}let Pt=(function(Ht,dr){let Xr=i.b0([],Ht[dr[0]],Ht[dr[1]]),Or=i.b0([],Ht[dr[2]],Ht[dr[1]]),$r=[0,0,0,0];return i.b1($r,i.b2([],Xr,Or)),$r[3]=-i.b3($r,Ht[dr[0]]),$r})(st,dt),$t=(function(Ht,dr){let Xr=i.b7(Ht),Or=i.b8([],Ht,1/Xr),$r=i.b0([],dr,i.aZ([],Or,i.b3(dr,Or))),Er=i.b7($r);if(Er>0){let Tr=Math.sqrt(1-Or[3]*Or[3]),Rr=i.aZ([],Or,-Or[3]),Lr=i.a_([],Rr,i.aZ([],$r,Tr/Er));return i.b9(dr,Lr)}return null})(Pe,Pt);if($t!==null){let Ht=$t/i.b3(St[0],Pt);Et=Math.min(Et,Ht)}for(let Ht=0;Ht<4;Ht++){let dr=Math.min(Et,Bt[Ht]);st[Ht+xt]=[st[Ht+at][0]+St[Ht][0]*dr,st[Ht+at][1]+St[Ht][1]*dr,st[Ht+at][2]+St[Ht][2]*dr,1]}})(Ae,se[0],H,$);let Fe=se.map((st=>{let dt=i.b0([],Ae[st[0]],Ae[st[1]]),Pe=i.b0([],Ae[st[2]],Ae[st[1]]),Xe=i.b1([],i.b2([],dt,Pe)),at=-i.b3(Xe,Ae[st[1]]);return Xe.concat(at)})),Ie=[Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY,Number.POSITIVE_INFINITY],Ye=[Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY,Number.NEGATIVE_INFINITY];for(let st of Ae)for(let dt=0;dt<3;dt++)Ie[dt]=Math.min(Ie[dt],st[dt]),Ye[dt]=Math.max(Ye[dt],st[dt]);return new rs(Ae,Fe,new Ms(Ie,Ye))}}class Ls{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(d){this._helper.setMinZoom(d)}setMaxZoom(d){this._helper.setMaxZoom(d)}setMinPitch(d){this._helper.setMinPitch(d)}setMaxPitch(d){this._helper.setMaxPitch(d)}setRenderWorldCopies(d){this._helper.setRenderWorldCopies(d)}setBearing(d){this._helper.setBearing(d)}setPitch(d){this._helper.setPitch(d)}setRoll(d){this._helper.setRoll(d)}setFov(d){this._helper.setFov(d)}setZoom(d){this._helper.setZoom(d)}setCenter(d){this._helper.setCenter(d)}setElevation(d){this._helper.setElevation(d)}setMinElevationForCurrentTile(d){this._helper.setMinElevationForCurrentTile(d)}setPadding(d){this._helper.setPadding(d)}interpolatePadding(d,P,N){this._helper.interpolatePadding(d,P,N)}isPaddingEqual(d){return this._helper.isPaddingEqual(d)}resize(d,P,N=!0){this._helper.resize(d,P,N)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(d){this._helper.setMaxBounds(d)}setConstrainOverride(d){this._helper.setConstrainOverride(d)}overrideNearFarZ(d,P){this._helper.overrideNearFarZ(d,P)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(d){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),d)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}setTransitionState(d,P){}constructor(d){this._posMatrixCache=new Map,this._alignedPosMatrixCache=new Map,this._fogMatrixCacheF32=new Map,this.defaultConstrain=(P,N)=>{N=i.al(+N,this.minZoom,this.maxZoom);let H={center:new i.W(P.lng,P.lat),zoom:N},$=this._helper._lngRange;if(!this._helper._renderWorldCopies&&$===null){let St=179.9999999999;$=[-St,St]}let se=this.tileSize*i.ao(H.zoom),de=0,Ae=se,Fe=0,Ie=se,Ye=0,st=0,{x:dt,y:Pe}=this.size;if(this._helper._latRange){let St=this._helper._latRange;de=i.Y(St[1])*se,Ae=i.Y(St[0])*se,Ae-deAe&&(Et=Ae-St)}if($){let St=(Fe+Ie)/2,Pt=Xe;this._helper._renderWorldCopies&&(Pt=i.X(Xe,St-se/2,St+se/2));let $t=dt/2;Pt-$tIe&&(xt=Ie-$t)}if(xt!==void 0||Et!==void 0){let St=new i.P(xt!=null?xt:Xe,Et!=null?Et:at);H.center=mr(se,St).wrap()}return H},this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._coveringTilesDetailsProvider=new xu}clone(){let d=new Ls;return d.apply(this,!1),d}apply(d,P,N){this._helper.apply(d,P,N)}get cameraPosition(){return this._cameraPosition}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._viewProjMatrix}get inverseProjectionMatrix(){return this._invProjMatrix}get mercatorMatrix(){return this._mercatorMatrix}getVisibleUnwrappedCoordinates(d){let P=[new i.ba(0,d)];if(this._helper._renderWorldCopies){let N=this.screenPointToMercatorCoordinate(new i.P(0,0)),H=this.screenPointToMercatorCoordinate(new i.P(this._helper._width,0)),$=this.screenPointToMercatorCoordinate(new i.P(this._helper._width,this._helper._height)),se=this.screenPointToMercatorCoordinate(new i.P(0,this._helper._height)),de=Math.floor(Math.min(N.x,H.x,$.x,se.x)),Ae=Math.floor(Math.max(N.x,H.x,$.x,se.x)),Fe=1;for(let Ie=de-Fe;Ie<=Ae+Fe;Ie++)Ie!==0&&P.push(new i.ba(Ie,d))}return P}getCameraFrustum(){return rs.fromInvProjectionMatrix(this._invViewProjMatrix,this.worldSize)}getClippingPlane(){return null}getCoveringTilesDetailsProvider(){return this._coveringTilesDetailsProvider}recalculateZoomAndCenter(d){let P=this.screenPointToLocation(this.centerPoint,d),N=d?d.getElevationForLngLatZoom(P,this._helper._tileZoom):0;this._helper.recalculateZoomAndCenter(N)}setLocationAtPoint(d,P){let N=i.aq(this.elevation,this.center.lat),H=this.screenPointToMercatorCoordinateAtZ(P,N),$=this.screenPointToMercatorCoordinateAtZ(this.centerPoint,N),se=i.a7.fromLngLat(d),de=new i.a7(se.x-(H.x-$.x),se.y-(H.y-$.y));this.setCenter(de==null?void 0:de.toLngLat()),this._helper._renderWorldCopies&&this.setCenter(this.center.wrap())}locationToScreenPoint(d,P){return P?this.coordinatePoint(i.a7.fromLngLat(d),P.getElevationForLngLat(d,this),this._pixelMatrix3D):this.coordinatePoint(i.a7.fromLngLat(d))}screenPointToLocation(d,P){var N;return(N=this.screenPointToMercatorCoordinate(d,P))===null||N===void 0?void 0:N.toLngLat()}screenPointToMercatorCoordinate(d,P){if(P){let N=P.pointCoordinate(d);if(N!=null)return N}return this.screenPointToMercatorCoordinateAtZ(d)}screenPointToMercatorCoordinateAtZ(d,P){let N=P||0,H=[d.x,d.y,0,1],$=[d.x,d.y,1,1];i.aE(H,H,this._pixelMatrixInverse),i.aE($,$,this._pixelMatrixInverse);let se=H[3],de=$[3],Ae=H[1]/se,Fe=$[1]/de,Ie=H[2]/se,Ye=$[2]/de,st=Ie===Ye?0:(N-Ie)/(Ye-Ie);return new i.a7(i.H.number(H[0]/se,$[0]/de,st)/this.worldSize,i.H.number(Ae,Fe,st)/this.worldSize,N)}coordinatePoint(d,P=0,N=this._pixelMatrix){let H=[d.x*this.worldSize,d.y*this.worldSize,P,1];return i.aE(H,H,N),new i.P(H[0]/H[3],H[1]/H[3])}getBounds(){let d=Math.max(0,this._helper._height/2-or(this));return new ie().extend(this.screenPointToLocation(new i.P(0,d))).extend(this.screenPointToLocation(new i.P(this._helper._width,d))).extend(this.screenPointToLocation(new i.P(this._helper._width,this._helper._height))).extend(this.screenPointToLocation(new i.P(0,this._helper._height)))}isPointOnMapSurface(d,P){return P?P.pointCoordinate(d)!=null:d.y>this.height/2-or(this)}calculatePosMatrix(d,P=!1,N){var H;let $=(H=d.key)!==null&&H!==void 0?H:i.bb(d.wrap,d.canonical.z,d.canonical.z,d.canonical.x,d.canonical.y),se=P?this._alignedPosMatrixCache:this._posMatrixCache;if(se.has($)){let Fe=se.get($);return N?Fe.f32:Fe.f64}let de=fr(d,this.worldSize);i.U(de,P?this._alignedProjMatrix:this._viewProjMatrix,de);let Ae={f64:de,f32:new Float32Array(de)};return se.set($,Ae),N?Ae.f32:Ae.f64}calculateFogMatrix(d){let P=d.key,N=this._fogMatrixCacheF32;if(N.has(P))return N.get(P);let H=fr(d,this.worldSize);return i.U(H,this._fogMatrix,H),N.set(P,new Float32Array(H)),N.get(P)}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}_calculateNearFarZIfNeeded(d,P,N){if(!this._helper.autoCalculateNearFarZ)return;let H=Math.min(this.elevation,this.minElevationForCurrentTile,this.getCameraAltitude()-100),$=d-H*this._helper._pixelPerMeter/Math.cos(P),se=H<0?$:d,de=Math.PI/2+this.pitchInRadians,Ae=i.an(this.fov)*(Math.abs(Math.cos(i.an(this.roll)))*this.height+Math.abs(Math.sin(i.an(this.roll)))*this.width)/this.height*(.5+N.y/this.height),Fe=Math.sin(Ae)*se/Math.sin(i.al(Math.PI-de-Ae,.01,Math.PI-.01)),Ie=or(this),Ye=Math.atan(Ie/this._helper.cameraToCenterDistance),st=i.an(.75),dt=Ye>st?2*Ye*(.5+N.y/(2*Ie)):st,Pe=Math.sin(dt)*se/Math.sin(i.al(Math.PI-de-dt,.01,Math.PI-.01)),Xe=Math.min(Fe,Pe);this._helper._farZ=1.01*(Math.cos(Math.PI/2-P)*Xe+se),this._helper._nearZ=this._helper._height/50}_calcMatrices(){if(!this._helper._height)return;let d=this.centerOffset,P=jt(this.worldSize,this.center),N=P.x,H=P.y;this._helper._pixelPerMeter=i.aq(1,this.center.lat)*this.worldSize;let $=i.an(Math.min(this.pitch,Yt)),se=Math.max(this._helper.cameraToCenterDistance/2,this._helper.cameraToCenterDistance+this._helper._elevation*this._helper._pixelPerMeter/Math.cos($)),de;var Ae,Fe;this._calculateNearFarZIfNeeded(se,$,d),de=new Float64Array(16),i.bc(de,this.fovInRadians,this._helper._width/this._helper._height,this._helper._nearZ,this._helper._farZ),this._invProjMatrix=new Float64Array(16),(Ae=this._invProjMatrix)[0]=1/(Fe=de)[0],Ae[1]=0,Ae[2]=0,Ae[3]=0,Ae[4]=0,Ae[5]=1/Fe[5],Ae[6]=0,Ae[7]=0,Ae[8]=0,Ae[9]=0,Ae[10]=0,Ae[11]=1/Fe[14],Ae[12]=0,Ae[13]=0,Ae[14]=-1,Ae[15]=Fe[10]/Fe[14],de[8]=2*-d.x/this._helper._width,de[9]=2*d.y/this._helper._height,this._projectionMatrix=i.bd(de),i.S(de,de,[1,-1,1]),i.Q(de,de,[0,0,-this._helper.cameraToCenterDistance]),i.be(de,de,-this.rollInRadians),i.bf(de,de,this.pitchInRadians),i.be(de,de,-this.bearingInRadians),i.Q(de,de,[-N,-H,0]),this._mercatorMatrix=i.S([],de,[this.worldSize,this.worldSize,this.worldSize]),i.S(de,de,[1,1,this._helper._pixelPerMeter]),this._pixelMatrix=i.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,de),i.Q(de,de,[0,0,-this.elevation]),this._viewProjMatrix=de,this._invViewProjMatrix=i.bg([],de);let Ie=[0,0,-1,1];i.aE(Ie,Ie,this._invViewProjMatrix),this._cameraPosition=[Ie[0]/Ie[3],Ie[1]/Ie[3],Ie[2]/Ie[3]],this._fogMatrix=new Float64Array(16),i.bc(this._fogMatrix,this.fovInRadians,this.width/this.height,se,this._helper._farZ),this._fogMatrix[8]=2*-d.x/this.width,this._fogMatrix[9]=2*d.y/this.height,i.S(this._fogMatrix,this._fogMatrix,[1,-1,1]),i.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.cameraToCenterDistance]),i.be(this._fogMatrix,this._fogMatrix,-this.rollInRadians),i.bf(this._fogMatrix,this._fogMatrix,this.pitchInRadians),i.be(this._fogMatrix,this._fogMatrix,-this.bearingInRadians),i.Q(this._fogMatrix,this._fogMatrix,[-N,-H,0]),i.S(this._fogMatrix,this._fogMatrix,[1,1,this._helper._pixelPerMeter]),i.Q(this._fogMatrix,this._fogMatrix,[0,0,-this.elevation]),this._pixelMatrix3D=i.U(new Float64Array(16),this.clipSpaceToPixelsMatrix,de);let Ye=this._helper._width%2/2,st=this._helper._height%2/2,dt=Math.cos(this.bearingInRadians),Pe=Math.sin(-this.bearingInRadians),Xe=N-Math.round(N)+dt*Ye+Pe*st,at=H-Math.round(H)+dt*st+Pe*Ye,xt=new Float64Array(de);if(i.Q(xt,xt,[Xe>.5?Xe-1:Xe,at>.5?at-1:at,0]),this._alignedProjMatrix=xt,de=i.bg(new Float64Array(16),this._pixelMatrix),!de)throw new Error("failed to invert matrix");this._pixelMatrixInverse=de,this._clearMatrixCaches()}_clearMatrixCaches(){this._posMatrixCache.clear(),this._alignedPosMatrixCache.clear(),this._fogMatrixCacheF32.clear()}maxPitchScaleFactor(){if(!this._pixelMatrixInverse)return 1;let d=this.screenPointToMercatorCoordinate(new i.P(0,0)),P=[d.x*this.worldSize,d.y*this.worldSize,0,1];return i.aE(P,P,this._pixelMatrix)[3]/this._helper.cameraToCenterDistance}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){let d=i.aq(1,this.center.lat)*this.worldSize;return Ot(this.center,this.elevation,this.pitch,this.bearing,this._helper.cameraToCenterDistance/d).toLngLat()}lngLatToCameraDepth(d,P){let N=i.a7.fromLngLat(d),H=[N.x*this.worldSize,N.y*this.worldSize,P,1];return i.aE(H,H,this._viewProjMatrix),H[2]/H[3]}getProjectionData(d){let{overscaledTileID:P,aligned:N,applyTerrainMatrix:H}=d,$=this._helper.getMercatorTileCoordinates(P),se=P?this.calculatePosMatrix(P,N,!0):null,de;return de=P!=null&&P.terrainRttPosMatrix32f&&H?P.terrainRttPosMatrix32f:se||i.bh(),{mainMatrix:de,tileMercatorCoords:$,clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:de}}isLocationOccluded(d){return!1}getPixelScale(){return 1}getCircleRadiusCorrection(){return 1}getPitchedTextCorrection(d,P,N){return 1}transformLightDirection(d){return i.a$(d)}getRayDirectionFromPixel(d){throw new Error("Not implemented.")}projectTileCoordinates(d,P,N,H){let $=this.calculatePosMatrix(N),se;H?(se=[d,P,H(d,P),1],i.aE(se,se,$)):(se=[d,P,0,1],ao(se,se,$));let de=se[3];return{point:new i.P(se[0]/de,se[1]/de),signedDistanceFromCamera:de,isOccluded:!1}}populateCache(d){for(let P of d)this.calculatePosMatrix(P)}getMatrixForModel(d,P){let N=i.a7.fromLngLat(d,P),H=N.meterInMercatorCoordinateUnits(),$=i.bi();return i.Q($,$,[N.x,N.y,N.z]),i.be($,$,Math.PI),i.bf($,$,Math.PI/2),i.S($,$,[-H,H,H]),$}getProjectionDataForCustomLayer(d=!0){let P=new i.a3(0,0,0,0,0),N=this.getProjectionData({overscaledTileID:P,applyGlobeMatrix:d}),H=fr(P,this.worldSize);i.U(H,this._viewProjMatrix,H),N.tileMercatorCoords=[0,0,1,1];let $=[i.a6,i.a6,this.worldSize/this._helper.pixelsPerMeter],se=i.bj();return i.S(se,H,$),N.fallbackMatrix=se,N.mainMatrix=se,N}getFastPathSimpleProjectionMatrix(d){return this.calculatePosMatrix(d)}}function $s(){i.w("Map cannot fit within canvas with the given bounds, padding, and/or offset.")}function Kc(Y){if(Y.useSlerp)if(Y.k<1){let d=i.bk(Y.startEulerAngles.roll,Y.startEulerAngles.pitch,Y.startEulerAngles.bearing),P=i.bk(Y.endEulerAngles.roll,Y.endEulerAngles.pitch,Y.endEulerAngles.bearing),N=new Float64Array(4);i.bl(N,d,P,Y.k);let H=i.bm(N);Y.tr.setRoll(H.roll),Y.tr.setPitch(H.pitch),Y.tr.setBearing(H.bearing)}else Y.tr.setRoll(Y.endEulerAngles.roll),Y.tr.setPitch(Y.endEulerAngles.pitch),Y.tr.setBearing(Y.endEulerAngles.bearing);else Y.tr.setRoll(i.H.number(Y.startEulerAngles.roll,Y.endEulerAngles.roll,Y.k)),Y.tr.setPitch(i.H.number(Y.startEulerAngles.pitch,Y.endEulerAngles.pitch,Y.k)),Y.tr.setBearing(i.H.number(Y.startEulerAngles.bearing,Y.endEulerAngles.bearing,Y.k))}function _u(Y,d,P,N,H){let $=H.padding,se=jt(H.worldSize,P.getNorthWest()),de=jt(H.worldSize,P.getNorthEast()),Ae=jt(H.worldSize,P.getSouthEast()),Fe=jt(H.worldSize,P.getSouthWest()),Ie=i.an(-N),Ye=se.rotate(Ie),st=de.rotate(Ie),dt=Ae.rotate(Ie),Pe=Fe.rotate(Ie),Xe=new i.P(Math.max(Ye.x,st.x,Pe.x,dt.x),Math.max(Ye.y,st.y,Pe.y,dt.y)),at=new i.P(Math.min(Ye.x,st.x,Pe.x,dt.x),Math.min(Ye.y,st.y,Pe.y,dt.y)),xt=Xe.sub(at),Et=(H.width-($.left+$.right+d.left+d.right))/xt.x,Bt=(H.height-($.top+$.bottom+d.top+d.bottom))/xt.y;if(Bt<0||Et<0)return void $s();let St=Math.min(i.ar(H.scale*Math.min(Et,Bt)),Y.maxZoom),Pt=i.P.convert(Y.offset),$t=new i.P((d.left-d.right)/2,(d.top-d.bottom)/2).rotate(i.an(N)),Ht=Pt.add($t).mult(H.scale/i.ao(St));return{center:mr(H.worldSize,se.add(Ae).div(2).sub(Ht)),zoom:St,bearing:N}}class Gu{get useGlobeControls(){return!1}handlePanInertia(d,P){let N=d.mag(),H=Math.abs(or(P));return{easingOffset:d.mult(Math.min(.75*H/N,1)),easingCenter:P.center}}handleMapControlsRollPitchBearingZoom(d,P){d.bearingDelta&&P.setBearing(P.bearing+d.bearingDelta),d.pitchDelta&&P.setPitch(P.pitch+d.pitchDelta),d.rollDelta&&P.setRoll(P.roll+d.rollDelta),d.zoomDelta&&P.setZoom(P.zoom+d.zoomDelta)}handleMapControlsPan(d,P,N){d.around.distSqr(P.centerPoint)<.01||P.setLocationAtPoint(N,d.around)}cameraForBoxAndBearing(d,P,N,H,$){return _u(d,P,N,H,$)}handleJumpToCenterZoom(d,P){d.zoom!==(P.zoom!==void 0?+P.zoom:d.zoom)&&d.setZoom(+P.zoom),P.center!==void 0&&d.setCenter(i.W.convert(P.center))}handleEaseTo(d,P){let N=d.zoom,H=d.padding,$={roll:d.roll,pitch:d.pitch,bearing:d.bearing},se={roll:P.roll===void 0?d.roll:P.roll,pitch:P.pitch===void 0?d.pitch:P.pitch,bearing:P.bearing===void 0?d.bearing:P.bearing},de=P.zoom!==void 0,Ae=!d.isPaddingEqual(P.padding),Fe=!1,Ie=de?+P.zoom:d.zoom,Ye=d.centerPoint.add(P.offsetAsPoint),st=d.screenPointToLocation(Ye),{center:dt,zoom:Pe}=d.applyConstrain(i.W.convert(P.center||st),Ie!=null?Ie:N);pa(d,dt);let Xe=jt(d.worldSize,st),at=jt(d.worldSize,dt).sub(Xe),xt=i.ao(Pe-N);return Fe=Pe!==N,{easeFunc:Et=>{if(Fe&&d.setZoom(i.H.number(N,Pe,Et)),i.bn($,se)||Kc({startEulerAngles:$,endEulerAngles:se,tr:d,k:Et,useSlerp:$.roll!=se.roll}),Ae&&(d.interpolatePadding(H,P.padding,Et),Ye=d.centerPoint.add(P.offsetAsPoint)),P.around)d.setLocationAtPoint(P.around,P.aroundPoint);else{let Bt=i.ao(d.zoom-N),St=Pe>N?Math.min(2,xt):Math.max(.5,xt),Pt=Math.pow(St,1-Et),$t=mr(d.worldSize,Xe.add(at.mult(Et*Pt)).mult(Bt));d.setLocationAtPoint(d.renderWorldCopies?$t.wrap():$t,Ye)}},isZooming:Fe,elevationCenter:dt}}handleFlyTo(d,P){let N=P.zoom!==void 0,H=d.zoom,$=d.applyConstrain(i.W.convert(P.center||P.locationAtOffset),N?+P.zoom:H),se=$.center,de=$.zoom;pa(d,se);let Ae=jt(d.worldSize,P.locationAtOffset),Fe=jt(d.worldSize,se).sub(Ae),Ie=Fe.mag(),Ye=i.ao(de-H),st;if(P.minZoom!==void 0){let dt=Math.min(+P.minZoom,H,de),Pe=d.applyConstrain(se,dt).zoom;st=i.ao(Pe-H)}return{easeFunc:(dt,Pe,Xe,at)=>{d.setZoom(dt===1?de:H+i.ar(Pe));let xt=dt===1?se:mr(d.worldSize,Ae.add(Fe.mult(Xe)).mult(Pe));d.setLocationAtPoint(d.renderWorldCopies?xt.wrap():xt,at)},scaleOfZoom:Ye,targetCenter:se,scaleOfMinZoom:st,pixelPathLength:Ie}}}class Ja{constructor(d,P,N){this.blendFunction=d,this.blendColor=P,this.mask=N}}Ja.Replace=[1,0],Ja.disabled=new Ja(Ja.Replace,i.bo.transparent,[!1,!1,!1,!1]),Ja.unblended=new Ja(Ja.Replace,i.bo.transparent,[!0,!0,!0,!0]),Ja.alphaBlended=new Ja([1,771],i.bo.transparent,[!0,!0,!0,!0]);let ps=2305;class Sa{constructor(d,P,N){this.enable=d,this.mode=P,this.frontFace=N}}Sa.disabled=new Sa(!1,1029,ps),Sa.backCCW=new Sa(!0,1029,ps),Sa.frontCCW=new Sa(!0,1028,ps);class ma{constructor(d,P,N){this.func=d,this.mask=P,this.range=N}}ma.ReadOnly=!1,ma.ReadWrite=!0,ma.disabled=new ma(519,ma.ReadOnly,[0,1]);let Ps=7680;class Ca{constructor(d,P,N,H,$,se){this.test=d,this.ref=P,this.mask=N,this.fail=H,this.depthFail=$,this.pass=se}}function Pl(Y){return typeof WebGL2RenderingContext!="undefined"&&Y instanceof WebGL2RenderingContext}Ca.disabled=new Ca({func:519,mask:0},0,0,Ps,Ps,Ps);class ll{get awaitingQuery(){return!!this._readbackQueue}constructor(d){this._readbackWaitFrames=4,this._measureWaitFrames=6,this._texWidth=1,this._texHeight=1,this._measuredError=0,this._updateCount=0,this._lastReadbackFrame=-1e3,this._readbackQueue=null,this._cachedRenderContext=d;let P=d.context,N=P.gl;this._texFormat=N.RGBA,this._texType=N.UNSIGNED_BYTE;let H=new i.aU;H.emplaceBack(-1,-1),H.emplaceBack(2,-1),H.emplaceBack(-1,2);let $=new i.aW;$.emplaceBack(0,1,2),this._fullscreenTriangle=new ka(P.createVertexBuffer(H,vs.members),P.createIndexBuffer($),i.aV.simpleSegment(0,0,H.length,$.length)),this._resultBuffer=new Uint8Array(4),P.activeTexture.set(N.TEXTURE1);let se=N.createTexture();N.bindTexture(N.TEXTURE_2D,se),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_S,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_WRAP_T,N.CLAMP_TO_EDGE),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MIN_FILTER,N.NEAREST),N.texParameteri(N.TEXTURE_2D,N.TEXTURE_MAG_FILTER,N.NEAREST),N.texImage2D(N.TEXTURE_2D,0,this._texFormat,this._texWidth,this._texHeight,0,this._texFormat,this._texType,null),this._fbo=P.createFramebuffer(this._texWidth,this._texHeight,!1,!1),this._fbo.colorAttachment.set(se),Pl(N)&&(this._pbo=N.createBuffer(),N.bindBuffer(N.PIXEL_PACK_BUFFER,this._pbo),N.bufferData(N.PIXEL_PACK_BUFFER,4,N.STREAM_READ),N.bindBuffer(N.PIXEL_PACK_BUFFER,null))}destroy(){let d=this._cachedRenderContext.context.gl;this._fullscreenTriangle.destroy(),this._fbo.destroy(),d.deleteBuffer(this._pbo),this._fullscreenTriangle=null,this._fbo=null,this._pbo=null,this._resultBuffer=null}updateErrorLoop(d,P){let N=this._updateCount;return this._readbackQueue?N>=this._readbackQueue.frameNumberIssued+this._readbackWaitFrames&&this._tryReadback():N>=this._lastReadbackFrame+this._measureWaitFrames&&this._renderErrorTexture(d,P),this._updateCount++,this._measuredError}_bindFramebuffer(){let d=this._cachedRenderContext.context,P=d.gl;d.activeTexture.set(P.TEXTURE1),P.bindTexture(P.TEXTURE_2D,this._fbo.colorAttachment.get()),d.bindFramebuffer.set(this._fbo.framebuffer)}_renderErrorTexture(d,P){let N=this._cachedRenderContext.context,H=N.gl;if(this._bindFramebuffer(),N.viewport.set([0,0,this._texWidth,this._texHeight]),N.clear({color:i.bo.transparent}),this._cachedRenderContext.useProgram("projectionErrorMeasurement").draw(N,H.TRIANGLES,ma.disabled,Ca.disabled,Ja.unblended,Sa.disabled,(($,se)=>({u_input:$,u_output_expected:se}))(d,P),null,null,"$clipping",this._fullscreenTriangle.vertexBuffer,this._fullscreenTriangle.indexBuffer,this._fullscreenTriangle.segments),this._pbo&&Pl(H)){H.bindBuffer(H.PIXEL_PACK_BUFFER,this._pbo),H.readBuffer(H.COLOR_ATTACHMENT0),H.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,0),H.bindBuffer(H.PIXEL_PACK_BUFFER,null);let $=H.fenceSync(H.SYNC_GPU_COMMANDS_COMPLETE,0);H.flush(),this._readbackQueue={frameNumberIssued:this._updateCount,sync:$}}else this._readbackQueue={frameNumberIssued:this._updateCount,sync:null}}_tryReadback(){let d=this._cachedRenderContext.context.gl;if(this._pbo&&this._readbackQueue&&Pl(d)){let P=d.clientWaitSync(this._readbackQueue.sync,0,0);if(P===d.WAIT_FAILED)return i.w("WebGL2 clientWaitSync failed."),this._readbackQueue=null,void(this._lastReadbackFrame=this._updateCount);if(P===d.TIMEOUT_EXPIRED)return;d.bindBuffer(d.PIXEL_PACK_BUFFER,this._pbo),d.getBufferSubData(d.PIXEL_PACK_BUFFER,0,this._resultBuffer,0,4),d.bindBuffer(d.PIXEL_PACK_BUFFER,null)}else this._bindFramebuffer(),d.readPixels(0,0,this._texWidth,this._texHeight,this._texFormat,this._texType,this._resultBuffer);this._readbackQueue=null,this._measuredError=ll._parseRGBA8float(this._resultBuffer),this._lastReadbackFrame=this._updateCount}static _parseRGBA8float(d){let P=0;return P+=d[0]/256,P+=d[1]/65536,P+=d[2]/16777216,d[3]<127&&(P=-P),P/128}}let Jc=i.a6/128;function lu(Y,d){let P=Y.granularity!==void 0?Math.max(Y.granularity,1):1,N=P+(Y.generateBorders?2:0),H=P+(Y.extendToNorthPole||Y.generateBorders?1:0)+(Y.extendToSouthPole||Y.generateBorders?1:0),$=N+1,se=H+1,de=Y.generateBorders?-1:0,Ae=Y.generateBorders||Y.extendToNorthPole?-1:0,Fe=P+(Y.generateBorders?1:0),Ie=P+(Y.generateBorders||Y.extendToSouthPole?1:0),Ye=$*se,st=N*H*6,dt=$*se>65536;if(dt&&d==="16bit")throw new Error("Granularity is too large and meshes would not fit inside 16 bit vertex indices.");let Pe=dt||d==="32bit",Xe=new Int16Array(2*Ye),at=0;for(let Bt=Ae;Bt<=Ie;Bt++)for(let St=de;St<=Fe;St++){let Pt=St/P*i.a6;St===-1&&(Pt=-Jc),St===P+1&&(Pt=i.a6+Jc);let $t=Bt/P*i.a6;Bt===-1&&($t=Y.extendToNorthPole?i.bq:-Jc),Bt===P+1&&($t=Y.extendToSouthPole?i.br:i.a6+Jc),Xe[at++]=Pt,Xe[at++]=$t}let xt=Pe?new Uint32Array(st):new Uint16Array(st),Et=0;for(let Bt=0;Bt0}get latitudeErrorCorrectionRadians(){return this._verticalPerspectiveProjection.latitudeErrorCorrectionRadians}get currentProjection(){return this.useGlobeRendering?this._verticalPerspectiveProjection:this._mercatorProjection}get name(){return"globe"}get useSubdivision(){return this.currentProjection.useSubdivision}get shaderVariantName(){return this.currentProjection.shaderVariantName}get shaderDefine(){return this.currentProjection.shaderDefine}get shaderPreludeCode(){return this.currentProjection.shaderPreludeCode}get vertexShaderPreludeCode(){return this.currentProjection.vertexShaderPreludeCode}get subdivisionGranularity(){return this.currentProjection.subdivisionGranularity}get useGlobeControls(){return this.transitionState>0}destroy(){this._mercatorProjection.destroy(),this._verticalPerspectiveProjection.destroy()}updateGPUdependent(d){this._mercatorProjection.updateGPUdependent(d),this._verticalPerspectiveProjection.updateGPUdependent(d)}getMeshFromTileID(d,P,N,H,$){return this.currentProjection.getMeshFromTileID(d,P,N,H,$)}setProjection(d){this._transitionable.setValue("type",(d==null?void 0:d.type)||"mercator")}updateTransitions(d){this._transitioning=this._transitionable.transitioned(d,this._transitioning)}hasTransition(){return this._transitioning.hasTransition()||this.currentProjection.hasTransition()}recalculate(d){this.properties=this._transitioning.possiblyEvaluate(d)}setErrorQueryLatitudeDegrees(d){this._verticalPerspectiveProjection.setErrorQueryLatitudeDegrees(d),this._mercatorProjection.setErrorQueryLatitudeDegrees(d)}}function kc(Y){let d=Ks(Y.worldSize,Y.center.lat);return 2*Math.PI*d}function Uo(Y,d,P,N,H){let $=1/(1<1e-6){let N=Y[0]/P,H=Math.acos(Y[2]/P),$=(N>0?H:-H)/Math.PI*180;return new i.W(i.X($,-180,180),d)}return new i.W(0,d)}function ju(Y){return Math.cos(Y*Math.PI/180)}function gs(Y,d){let P=ju(Y),N=ju(d);return i.ar(N/P)}function bu(Y,d){let P=Y.rotate(d.bearingInRadians),N=d.zoom+gs(d.center.lat,0),H=i.bt(1/ju(d.center.lat),1/ju(Math.min(Math.abs(d.center.lat),60)),i.bw(N,7,3,0,1)),$=360/kc({worldSize:d.worldSize,center:{lat:d.center.lat}});return new i.W(d.center.lng-P.x*$*H,i.al(d.center.lat+P.y*$,-i.am,i.am))}function kf(Y){let d=.5*Y,P=Math.sin(d),N=Math.cos(d);return Math.log(P+N)-Math.log(N-P)}function ah(Y,d,P,N){let H=Y.lat+P*N;if(Math.abs(P)>1){let $=(Math.sign(Y.lat+P)!==Math.sign(Y.lat)?-Math.abs(Y.lat):Math.abs(Y.lat))*Math.PI/180,se=Math.abs(Y.lat+P)*Math.PI/180,de=kf($+N*(se-$)),Ae=kf($),Fe=kf(se);return new i.W(Y.lng+d*((de-Ae)/(Fe-Ae)),H)}return new i.W(Y.lng+d*N,H)}class Od{constructor(d){this._cachePrevious=new Map,this._cache=new Map,this._hadAnyChanges=!1,this._boundingVolumeFactory=d}swapBuffers(){if(!this._hadAnyChanges)return;let d=this._cachePrevious;this._cachePrevious=this._cache,this._cache=d,this._cache.clear(),this._hadAnyChanges=!1}getTileBoundingVolume(d,P,N,H){let $=`${d.z}_${d.x}_${d.y}_${H!=null&&H.terrain?"t":""}`,se=this._cache.get($);if(se)return se;let de=this._cachePrevious.get($);if(de)return this._cache.set($,de),de;let Ae=this._boundingVolumeFactory(d,P,N,H);return this._cache.set($,Ae),this._hadAnyChanges=!0,Ae}}class Qc{constructor(d,P,N,H){this.min=N,this.max=H,this.points=d,this.planes=P}static fromAabb(d,P){let N=[];for(let H=0;H<8;H++)N.push([1&~H?d[0]:P[0],(H>>1&1)==1?P[1]:d[1],(H>>2&1)==1?P[2]:d[2]]);return new Qc(N,[[-1,0,0,P[0]],[1,0,0,-d[0]],[0,-1,0,P[1]],[0,1,0,-d[1]],[0,0,-1,P[2]],[0,0,1,-d[2]]],d,P)}static fromCenterSizeAngles(d,P,N){let H=i.bA([],N[0],N[1],N[2]),$=i.bB([],[P[0],0,0],H),se=i.bB([],[0,P[1],0],H),de=i.bB([],[0,0,P[2]],H),Ae=[...d],Fe=[...d];for(let Ye=0;Ye<8;Ye++)for(let st=0;st<3;st++){let dt=d[st]+$[st]*(1&~Ye?-1:1)+se[st]*((Ye>>1&1)==1?1:-1)+de[st]*((Ye>>2&1)==1?1:-1);Ae[st]=Math.min(Ae[st],dt),Fe[st]=Math.max(Fe[st],dt)}let Ie=[];for(let Ye=0;Ye<8;Ye++){let st=[...d];i.a_(st,st,i.aZ([],$,1&~Ye?-1:1)),i.a_(st,st,i.aZ([],se,(Ye>>1&1)==1?1:-1)),i.a_(st,st,i.aZ([],de,(Ye>>2&1)==1?1:-1)),Ie.push(st)}return new Qc(Ie,[[...$,-i.b3($,Ie[0])],[...se,-i.b3(se,Ie[0])],[...de,-i.b3(de,Ie[0])],[-$[0],-$[1],-$[2],-i.b3($,Ie[7])],[-se[0],-se[1],-se[2],-i.b3(se,Ie[7])],[-de[0],-de[1],-de[2],-i.b3(de,Ie[7])]],Ae,Fe)}intersectsFrustum(d){let P=!0,N=this.points.length,H=this.planes.length,$=d.planes.length,se=d.points.length;for(let de=0;de<$;de++){let Ae=d.planes[de],Fe=0;for(let Ie=0;Ie=0&&Fe++}if(Fe===0)return 0;Fe=0&&Fe++}if(Fe===0)return 0}return 1}intersectsPlane(d){let P=this.points.length,N=0;for(let H=0;H=0&&N++}return N===P?2:N===0?0:1}}function uu(Y,d,P){let N=Y-d;return N<0?-N:Math.max(0,N-P)}function oh(Y,d,P,N,H){let $=Y-P,se;return se=$<0?Math.min(-$,1+$-H):$>H?Math.min(Math.max($-H,0),1-$):0,Math.max(se,uu(d,N,H))}class hc{constructor(){this._boundingVolumeCache=new Od(this._computeTileBoundingVolume)}prepareNextFrame(){this._boundingVolumeCache.swapBuffers()}distanceToTile2d(d,P,N,H){let $=1<4}allowWorldCopies(){return!1}getTileBoundingVolume(d,P,N,H){return this._boundingVolumeCache.getTileBoundingVolume(d,P,N,H)}_computeTileBoundingVolume(d,P,N,H){var $,se;let de=0,Ae=0;if(H!=null&&H.terrain){let Fe=new i.a3(d.z,P,d.z,d.x,d.y),Ie=H.terrain.getMinMaxElevation(Fe);de=($=Ie.minElevation)!==null&&$!==void 0?$:Math.min(0,N),Ae=(se=Ie.maxElevation)!==null&&se!==void 0?se:Math.max(0,N)}if(de/=i.bD,Ae/=i.bD,de+=1,Ae+=1,d.z<=0)return Qc.fromAabb([-Ae,-Ae,-Ae],[Ae,Ae,Ae]);if(d.z===1)return Qc.fromAabb([d.x===0?-Ae:0,d.y===0?0:-Ae,-Ae],[d.x===0?0:Ae,d.y===0?Ae:0,Ae]);{let Fe=[Uo(0,0,d.x,d.y,d.z),Uo(i.a6,0,d.x,d.y,d.z),Uo(i.a6,i.a6,d.x,d.y,d.z),Uo(0,i.a6,d.x,d.y,d.z)],Ie=[];for(let $r of Fe)Ie.push(i.aZ([],$r,Ae));if(Ae!==de)for(let $r of Fe)Ie.push(i.aZ([],$r,de));d.y===0&&Ie.push([0,1,0]),d.y===(1<=(1<{let H=i.al(P.lat,-i.am,i.am),$=i.al(+N,this.minZoom+gs(0,H),this.maxZoom);return{center:new i.W(P.lng,H),zoom:$}},this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._coveringTilesDetailsProvider=new hc}clone(){let d=new Yo;return d.apply(this,!1),d}apply(d,P,N){this._globeLatitudeErrorCorrectionRadians=N||0,this._helper.apply(d,P)}get projectionMatrix(){return this._projectionMatrix}get modelViewProjectionMatrix(){return this._globeViewProjMatrixNoCorrection}get inverseProjectionMatrix(){return this._globeProjMatrixInverted}get cameraPosition(){let d=i.bz();return d[0]=this._cameraPosition[0],d[1]=this._cameraPosition[1],d[2]=this._cameraPosition[2],d}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}getProjectionData(d){let{overscaledTileID:P,applyGlobeMatrix:N}=d,H=this._helper.getMercatorTileCoordinates(P);return{mainMatrix:this._globeViewProjMatrix32f,tileMercatorCoords:H,clippingPlane:this._cachedClippingPlane,projectionTransition:N?1:0,fallbackMatrix:this._globeViewProjMatrix32f}}_computeClippingPlane(d){let P=this.pitchInRadians,N=this.cameraToCenterDistance/d,H=Math.sin(P)*N,$=Math.cos(P)*N+1,se=1/Math.sqrt(H*H+$*$)*1,de=-H,Ae=$,Fe=Math.sqrt(de*de+Ae*Ae);de/=Fe,Ae/=Fe;let Ie=[0,de,Ae];i.bF(Ie,Ie,[0,0,0],-this.bearingInRadians),i.bG(Ie,Ie,[0,0,0],-1*this.center.lat*Math.PI/180),i.bH(Ie,Ie,[0,0,0],this.center.lng*Math.PI/180);let Ye=1/i.b5(Ie);return i.aZ(Ie,Ie,Ye),[...Ie,-se*Ye]}isLocationOccluded(d){return!this.isSurfacePointVisible(ns(d))}transformLightDirection(d){let P=this._helper._center.lng*Math.PI/180,N=this._helper._center.lat*Math.PI/180,H=Math.cos(N),$=[Math.sin(P)*H,Math.sin(N),Math.cos(P)*H],se=[$[2],0,-$[0]],de=[0,0,0];i.b2(de,se,$),i.b1(se,se),i.b1(de,de);let Ae=[0,0,0];return i.b1(Ae,[se[0]*d[0]+de[0]*d[1]+$[0]*d[2],se[1]*d[0]+de[1]*d[1]+$[1]*d[2],se[2]*d[0]+de[2]*d[1]+$[2]*d[2]]),Ae}getPixelScale(){return 1/Math.cos(this._helper._center.lat*Math.PI/180)}getCircleRadiusCorrection(){return Math.cos(this._helper._center.lat*Math.PI/180)}getPitchedTextCorrection(d,P,N){let H=(function(de,Ae,Fe){let Ie=1/(1<$&&($=st),dtde&&(de=dt)}let Ie=[Fe.lng+se,Fe.lat+Ae,Fe.lng+$,Fe.lat+de];return this.isSurfacePointOnScreen([0,1,0])&&(Ie[3]=90,Ie[0]=-180,Ie[2]=180),this.isSurfacePointOnScreen([0,-1,0])&&(Ie[1]=-90,Ie[0]=-180,Ie[2]=180),new ie(Ie)}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}setLocationAtPoint(d,P){let N=ns(this.unprojectScreenPoint(P)),H=ns(d),$=i.bz();i.bK($);let se=i.bz();i.bH(se,N,$,-this.center.lng*Math.PI/180),i.bG(se,se,$,this.center.lat*Math.PI/180);let de=H[0]*H[0]+H[2]*H[2],Ae=se[0]*se[0];if(de=-xt&&Pe<=xt,Bt=at>=-xt&&at<=xt,St,Pt;if(Et&&Bt){let Xr=this.center.lng*Math.PI/180,Or=this.center.lat*Math.PI/180;i.bM(Ye,Xr)+i.bM(Pe,Or)=0}isSurfacePointOnScreen(d){if(!this.isSurfacePointVisible(d))return!1;let P=i.bE();return i.aE(P,[...d,1],this._globeViewProjMatrixNoCorrection),P[0]/=P[3],P[1]/=P[3],P[2]/=P[3],P[0]>-1&&P[0]<1&&P[1]>-1&&P[1]<1&&P[2]>-1&&P[2]<1}rayPlanetIntersection(d,P){let N=i.b3(d,P),H=i.bz(),$=i.bz();i.aZ($,P,N),i.b0(H,d,$);let se=1-i.b3(H,H);if(se<0)return null;let de=i.b3(d,d)-1,Ae=-N+(N<0?1:-1)*Math.sqrt(se),Fe=de/Ae,Ie=Ae;return{tMin:Math.min(Fe,Ie),tMax:Math.max(Fe,Ie)}}unprojectScreenPoint(d){let P=this._cameraPosition,N=this.getRayDirectionFromPixel(d),H=this.rayPlanetIntersection(P,N);if(H){let Ie=i.bz();i.a_(Ie,P,[N[0]*H.tMin,N[1]*H.tMin,N[2]*H.tMin]);let Ye=i.bz();return i.b1(Ye,Ie),Ef(Ye)}let $=this._cachedClippingPlane,se=$[0]*N[0]+$[1]*N[1]+$[2]*N[2],de=-i.b9($,P)/se,Ae=i.bz();if(de>0)i.a_(Ae,P,[N[0]*de,N[1]*de,N[2]*de]);else{let Ie=i.bz();i.a_(Ie,P,[2*N[0],2*N[1],2*N[2]]);let Ye=i.b9(this._cachedClippingPlane,Ie);i.b0(Ae,Ie,[this._cachedClippingPlane[0]*Ye,this._cachedClippingPlane[1]*Ye,this._cachedClippingPlane[2]*Ye])}let Fe=(function(Ie){let Ye=i.bz();return Ye[0]=Ie[0]*-Ie[3],Ye[1]=Ie[1]*-Ie[3],Ye[2]=Ie[2]*-Ie[3],{center:Ye,radius:Math.sqrt(1-Ie[3]*Ie[3])}})($);return Ef((function(Ie,Ye,st){let dt=i.bz();i.b0(dt,st,Ie);let Pe=i.bz();return i.bx(Pe,Ie,dt,Ye/i.b7(dt)),Pe})(Fe.center,Fe.radius,Ae))}getMatrixForModel(d,P){let N=i.W.convert(d),H=1/i.bD,$=i.bi();return i.bI($,$,N.lng/180*Math.PI),i.bf($,$,-N.lat/180*Math.PI),i.Q($,$,[0,0,1+P/i.bD]),i.bf($,$,.5*Math.PI),i.S($,$,[H,H,H]),$}getProjectionDataForCustomLayer(d=!0){let P=this.getProjectionData({overscaledTileID:new i.a3(0,0,0,0,0),applyGlobeMatrix:d});return P.tileMercatorCoords=[0,0,1,1],P}getFastPathSimpleProjectionMatrix(d){}}class Ro{get pixelsToClipSpaceMatrix(){return this._helper.pixelsToClipSpaceMatrix}get clipSpaceToPixelsMatrix(){return this._helper.clipSpaceToPixelsMatrix}get pixelsToGLUnits(){return this._helper.pixelsToGLUnits}get centerOffset(){return this._helper.centerOffset}get size(){return this._helper.size}get rotationMatrix(){return this._helper.rotationMatrix}get centerPoint(){return this._helper.centerPoint}get pixelsPerMeter(){return this._helper.pixelsPerMeter}setMinZoom(d){this._helper.setMinZoom(d)}setMaxZoom(d){this._helper.setMaxZoom(d)}setMinPitch(d){this._helper.setMinPitch(d)}setMaxPitch(d){this._helper.setMaxPitch(d)}setRenderWorldCopies(d){this._helper.setRenderWorldCopies(d)}setBearing(d){this._helper.setBearing(d)}setPitch(d){this._helper.setPitch(d)}setRoll(d){this._helper.setRoll(d)}setFov(d){this._helper.setFov(d)}setZoom(d){this._helper.setZoom(d)}setCenter(d){this._helper.setCenter(d)}setElevation(d){this._helper.setElevation(d)}setMinElevationForCurrentTile(d){this._helper.setMinElevationForCurrentTile(d)}setPadding(d){this._helper.setPadding(d)}interpolatePadding(d,P,N){this._helper.interpolatePadding(d,P,N)}isPaddingEqual(d){return this._helper.isPaddingEqual(d)}resize(d,P,N=!0){this._helper.resize(d,P,N)}getMaxBounds(){return this._helper.getMaxBounds()}setMaxBounds(d){this._helper.setMaxBounds(d)}setConstrainOverride(d){this._helper.setConstrainOverride(d)}overrideNearFarZ(d,P){this._helper.overrideNearFarZ(d,P)}clearNearFarZOverride(){this._helper.clearNearFarZOverride()}getCameraQueryGeometry(d){return this._helper.getCameraQueryGeometry(this.getCameraPoint(),d)}get tileSize(){return this._helper.tileSize}get tileZoom(){return this._helper.tileZoom}get scale(){return this._helper.scale}get worldSize(){return this._helper.worldSize}get width(){return this._helper.width}get height(){return this._helper.height}get lngRange(){return this._helper.lngRange}get latRange(){return this._helper.latRange}get minZoom(){return this._helper.minZoom}get maxZoom(){return this._helper.maxZoom}get zoom(){return this._helper.zoom}get center(){return this._helper.center}get minPitch(){return this._helper.minPitch}get maxPitch(){return this._helper.maxPitch}get pitch(){return this._helper.pitch}get pitchInRadians(){return this._helper.pitchInRadians}get roll(){return this._helper.roll}get rollInRadians(){return this._helper.rollInRadians}get bearing(){return this._helper.bearing}get bearingInRadians(){return this._helper.bearingInRadians}get fov(){return this._helper.fov}get fovInRadians(){return this._helper.fovInRadians}get elevation(){return this._helper.elevation}get minElevationForCurrentTile(){return this._helper.minElevationForCurrentTile}get padding(){return this._helper.padding}get unmodified(){return this._helper.unmodified}get renderWorldCopies(){return this._helper.renderWorldCopies}get cameraToCenterDistance(){return this._helper.cameraToCenterDistance}get constrainOverride(){return this._helper.constrainOverride}get nearZ(){return this._helper.nearZ}get farZ(){return this._helper.farZ}get autoCalculateNearFarZ(){return this._helper.autoCalculateNearFarZ}get isGlobeRendering(){return this._globeness>0}setTransitionState(d,P){this._globeness=d,this._globeLatitudeErrorCorrectionRadians=P,this._calcMatrices(),this._verticalPerspectiveTransform.getCoveringTilesDetailsProvider().prepareNextFrame(),this._mercatorTransform.getCoveringTilesDetailsProvider().prepareNextFrame()}get currentTransform(){return this.isGlobeRendering?this._verticalPerspectiveTransform:this._mercatorTransform}constructor(d){this._globeLatitudeErrorCorrectionRadians=0,this._globeness=1,this.defaultConstrain=(P,N)=>this.currentTransform.defaultConstrain(P,N),this.applyConstrain=(P,N)=>this._helper.applyConstrain(P,N),this._helper=new As({calcMatrices:()=>this._calcMatrices(),defaultConstrain:(P,N)=>this.defaultConstrain(P,N)},d),this._globeness=1,this._mercatorTransform=new Ls,this._verticalPerspectiveTransform=new Yo}clone(){let d=new Ro;return d._globeness=this._globeness,d._globeLatitudeErrorCorrectionRadians=this._globeLatitudeErrorCorrectionRadians,d.apply(this,!1),d}apply(d,P){this._helper.apply(d,P),this._mercatorTransform.apply(this,!1),this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians)}get projectionMatrix(){return this.currentTransform.projectionMatrix}get modelViewProjectionMatrix(){return this.currentTransform.modelViewProjectionMatrix}get inverseProjectionMatrix(){return this.currentTransform.inverseProjectionMatrix}get cameraPosition(){return this.currentTransform.cameraPosition}getProjectionData(d){let P=this._mercatorTransform.getProjectionData(d),N=this._verticalPerspectiveTransform.getProjectionData(d);return{mainMatrix:this.isGlobeRendering?N.mainMatrix:P.mainMatrix,clippingPlane:N.clippingPlane,tileMercatorCoords:N.tileMercatorCoords,projectionTransition:d.applyGlobeMatrix?this._globeness:0,fallbackMatrix:P.fallbackMatrix}}isLocationOccluded(d){return this.currentTransform.isLocationOccluded(d)}transformLightDirection(d){return this.currentTransform.transformLightDirection(d)}getPixelScale(){return i.bt(this._mercatorTransform.getPixelScale(),this._verticalPerspectiveTransform.getPixelScale(),this._globeness)}getCircleRadiusCorrection(){return i.bt(this._mercatorTransform.getCircleRadiusCorrection(),this._verticalPerspectiveTransform.getCircleRadiusCorrection(),this._globeness)}getPitchedTextCorrection(d,P,N){let H=this._mercatorTransform.getPitchedTextCorrection(d,P,N),$=this._verticalPerspectiveTransform.getPitchedTextCorrection(d,P,N);return i.bt(H,$,this._globeness)}projectTileCoordinates(d,P,N,H){return this.currentTransform.projectTileCoordinates(d,P,N,H)}_calcMatrices(){this._helper._width&&this._helper._height&&(this._verticalPerspectiveTransform.apply(this,!1,this._globeLatitudeErrorCorrectionRadians),this._helper._nearZ=this._verticalPerspectiveTransform.nearZ,this._helper._farZ=this._verticalPerspectiveTransform.farZ,this._mercatorTransform.apply(this,!0,this.isGlobeRendering),this._helper._nearZ=this._mercatorTransform.nearZ,this._helper._farZ=this._mercatorTransform.farZ)}calculateFogMatrix(d){return this.currentTransform.calculateFogMatrix(d)}getVisibleUnwrappedCoordinates(d){return this.currentTransform.getVisibleUnwrappedCoordinates(d)}getCameraFrustum(){return this.currentTransform.getCameraFrustum()}getClippingPlane(){return this.currentTransform.getClippingPlane()}getCoveringTilesDetailsProvider(){return this.currentTransform.getCoveringTilesDetailsProvider()}recalculateZoomAndCenter(d){this._mercatorTransform.recalculateZoomAndCenter(d),this._verticalPerspectiveTransform.recalculateZoomAndCenter(d)}maxPitchScaleFactor(){return this._mercatorTransform.maxPitchScaleFactor()}getCameraPoint(){return this._helper.getCameraPoint()}getCameraAltitude(){return this._helper.getCameraAltitude()}getCameraLngLat(){return this._helper.getCameraLngLat()}lngLatToCameraDepth(d,P){return this.currentTransform.lngLatToCameraDepth(d,P)}populateCache(d){this._mercatorTransform.populateCache(d),this._verticalPerspectiveTransform.populateCache(d)}getBounds(){return this.currentTransform.getBounds()}calculateCenterFromCameraLngLatAlt(d,P,N,H){return this._helper.calculateCenterFromCameraLngLatAlt(d,P,N,H)}setLocationAtPoint(d,P){if(!this.isGlobeRendering)return this._mercatorTransform.setLocationAtPoint(d,P),void this.apply(this._mercatorTransform,!1);this._verticalPerspectiveTransform.setLocationAtPoint(d,P),this.apply(this._verticalPerspectiveTransform,!1)}locationToScreenPoint(d,P){return this.currentTransform.locationToScreenPoint(d,P)}screenPointToMercatorCoordinate(d,P){return this.currentTransform.screenPointToMercatorCoordinate(d,P)}screenPointToLocation(d,P){return this.currentTransform.screenPointToLocation(d,P)}isPointOnMapSurface(d,P){return this.currentTransform.isPointOnMapSurface(d,P)}getRayDirectionFromPixel(d){return this._verticalPerspectiveTransform.getRayDirectionFromPixel(d)}getMatrixForModel(d,P){return this.currentTransform.getMatrixForModel(d,P)}getProjectionDataForCustomLayer(d=!0){let P=this._mercatorTransform.getProjectionDataForCustomLayer(d);if(!this.isGlobeRendering)return P;let N=this._verticalPerspectiveTransform.getProjectionDataForCustomLayer(d);return N.fallbackMatrix=P.mainMatrix,N}getFastPathSimpleProjectionMatrix(d){return this.currentTransform.getFastPathSimpleProjectionMatrix(d)}}class is{get useGlobeControls(){return!0}handlePanInertia(d,P){let N=bu(d,P);return Math.abs(N.lng-P.center.lng)>180&&(N.lng=P.center.lng+179.5*Math.sign(N.lng-P.center.lng)),{easingCenter:N,easingOffset:new i.P(0,0)}}handleMapControlsRollPitchBearingZoom(d,P){let N=d.around,H=P.screenPointToLocation(N);d.bearingDelta&&P.setBearing(P.bearing+d.bearingDelta),d.pitchDelta&&P.setPitch(P.pitch+d.pitchDelta),d.rollDelta&&P.setRoll(P.roll+d.rollDelta);let $=P.zoom;d.zoomDelta&&P.setZoom(P.zoom+d.zoomDelta);let se=P.zoom-$;if(se===0)return;let de=i.bJ(P.center.lng,H.lng),Ae=de/(Math.abs(de/180)+1),Fe=i.bJ(P.center.lat,H.lat),Ie=P.getRayDirectionFromPixel(N),Ye=P.cameraPosition,st=-1*i.b3(Ye,Ie),dt=i.bz();i.a_(dt,Ye,[Ie[0]*st,Ie[1]*st,Ie[2]*st]);let Pe=i.b5(dt)-1,Xe=Math.exp(.5*-Math.max(Pe-.3,0)),at=Ks(P.worldSize,P.center.lat)/Math.min(P.width,P.height),xt=i.bw(at,.9,.5,1,.25),Et=(1-i.ao(-se))*Math.min(Xe,xt),Bt=P.center.lat,St=P.zoom,Pt=new i.W(P.center.lng+Ae*Et,i.al(P.center.lat+Fe*Et,-i.am,i.am));P.setLocationAtPoint(H,N);let $t=P.center,Ht=i.bw(Math.abs(de),45,85,0,1),dr=i.bw(at,.75,.35,0,1),Xr=Math.pow(Math.max(Ht,dr),.25),Or=i.bJ($t.lng,Pt.lng),$r=i.bJ($t.lat,Pt.lat);P.setCenter(new i.W($t.lng+Or*Xr,$t.lat+$r*Xr).wrap()),P.setZoom(St+gs(Bt,P.center.lat))}handleMapControlsPan(d,P,N){if(!d.panDelta)return;let H=P.center.lat,$=P.zoom;P.setCenter(bu(d.panDelta,P).wrap()),P.setZoom($+gs(H,P.center.lat))}cameraForBoxAndBearing(d,P,N,H,$){let se=_u(d,P,N,H,$),de=P.left/$.width*2-1,Ae=($.width-P.right)/$.width*2-1,Fe=P.top/$.height*-2+1,Ie=($.height-P.bottom)/$.height*-2+1,Ye=i.bJ(N.getWest(),N.getEast())<0,st=Ye?N.getEast():N.getWest(),dt=Ye?N.getWest():N.getEast(),Pe=Math.max(N.getNorth(),N.getSouth()),Xe=Math.min(N.getNorth(),N.getSouth()),at=st+.5*i.bJ(st,dt),xt=Pe+.5*i.bJ(Pe,Xe),Et=$.clone();Et.setCenter(se.center),Et.setBearing(se.bearing),Et.setPitch(0),Et.setRoll(0),Et.setZoom(se.zoom);let Bt=Et.modelViewProjectionMatrix,St=[ns(N.getNorthWest()),ns(N.getNorthEast()),ns(N.getSouthWest()),ns(N.getSouthEast()),ns(new i.W(dt,xt)),ns(new i.W(st,xt)),ns(new i.W(at,Pe)),ns(new i.W(at,Xe))],Pt=ns(se.center),$t=Number.POSITIVE_INFINITY;for(let Ht of St)de<0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"x",de))),Ae>0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"x",Ae))),Fe>0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"y",Fe))),Ie<0&&($t=is.getLesserNonNegativeNonNull($t,is.solveVectorScale(Ht,Pt,Bt,"y",Ie)));if(Number.isFinite($t)&&$t!==0)return se.zoom=Math.min(Et.zoom+i.ar($t),d.maxZoom),se;$s()}handleJumpToCenterZoom(d,P){let N=d.center.lat,H=d.applyConstrain(P.center?i.W.convert(P.center):d.center,d.zoom).center;d.setCenter(H.wrap());let $=P.zoom!==void 0?+P.zoom:d.zoom+gs(N,H.lat);d.zoom!==$&&d.setZoom($)}handleEaseTo(d,P){let N=d.zoom,H=d.center,$=d.padding,se={roll:d.roll,pitch:d.pitch,bearing:d.bearing},de={roll:P.roll===void 0?d.roll:P.roll,pitch:P.pitch===void 0?d.pitch:P.pitch,bearing:P.bearing===void 0?d.bearing:P.bearing},Ae=P.zoom!==void 0,Fe=!d.isPaddingEqual(P.padding),Ie=!1,Ye=P.center?i.W.convert(P.center):H,st=d.applyConstrain(Ye,N).center;pa(d,st);let dt=d.clone();dt.setCenter(st),dt.setZoom(Ae?+P.zoom:N+gs(H.lat,Ye.lat)),dt.setBearing(P.bearing);let Pe=new i.P(i.al(d.centerPoint.x+P.offsetAsPoint.x,0,d.width),i.al(d.centerPoint.y+P.offsetAsPoint.y,0,d.height));dt.setLocationAtPoint(st,Pe);let Xe=(P.offset&&P.offsetAsPoint.mag())>0?dt.center:st,at=Ae?+P.zoom:N+gs(H.lat,Xe.lat),xt=N+gs(H.lat,0),Et=at+gs(Xe.lat,0),Bt=i.bJ(H.lng,Xe.lng),St=i.bJ(H.lat,Xe.lat),Pt=i.ao(Et-xt);return Ie=at!==N,{easeFunc:$t=>{if(i.bn(se,de)||Kc({startEulerAngles:se,endEulerAngles:de,tr:d,k:$t,useSlerp:se.roll!=de.roll}),Fe&&d.interpolatePadding($,P.padding,$t),P.around)i.w("Easing around a point is not supported under globe projection."),d.setLocationAtPoint(P.around,P.aroundPoint);else{let Ht=Et>xt?Math.min(2,Pt):Math.max(.5,Pt),dr=Math.pow(Ht,1-$t),Xr=ah(H,Bt,St,$t*dr);d.setCenter(Xr.wrap())}if(Ie){let Ht=i.H.number(xt,Et,$t)+gs(0,d.center.lat);d.setZoom(Ht)}},isZooming:Ie,elevationCenter:Xe}}handleFlyTo(d,P){let N=P.zoom!==void 0,H=d.center,$=d.zoom,se=d.padding,de=!d.isPaddingEqual(P.padding),Ae=d.applyConstrain(i.W.convert(P.center||P.locationAtOffset),$).center,Fe=N?+P.zoom:d.zoom+gs(d.center.lat,Ae.lat),Ie=d.clone();Ie.setCenter(Ae),Ie.setZoom(Fe),Ie.setBearing(P.bearing);let Ye=new i.P(i.al(d.centerPoint.x+P.offsetAsPoint.x,0,d.width),i.al(d.centerPoint.y+P.offsetAsPoint.y,0,d.height));Ie.setLocationAtPoint(Ae,Ye);let st=Ie.center;pa(d,st);let dt=(function(St,Pt,$t){let Ht=ns(Pt),dr=ns($t),Xr=i.b3(Ht,dr),Or=Math.acos(Xr),$r=kc(St);return Or/(2*Math.PI)*$r})(d,H,st),Pe=$+gs(H.lat,0),Xe=Fe+gs(st.lat,0),at=i.ao(Xe-Pe),xt;if(typeof P.minZoom=="number"){let St=+P.minZoom+gs(st.lat,0),Pt=Math.min(St,Pe,Xe)+gs(0,st.lat),$t=d.applyConstrain(st,Pt).zoom+gs(st.lat,0);xt=i.ao($t-Pe)}let Et=i.bJ(H.lng,st.lng),Bt=i.bJ(H.lat,st.lat);return{easeFunc:(St,Pt,$t,Ht)=>{let dr=ah(H,Et,Bt,$t);de&&d.interpolatePadding(se,P.padding,St);let Xr=St===1?st:dr;d.setCenter(Xr.wrap());let Or=Pe+i.ar(Pt);d.setZoom(St===1?Fe:Or+gs(0,Xr.lat))},scaleOfZoom:at,targetCenter:st,scaleOfMinZoom:xt,pixelPathLength:dt}}static solveVectorScale(d,P,N,H,$){let se=H==="x"?[N[0],N[4],N[8],N[12]]:[N[1],N[5],N[9],N[13]],de=[N[3],N[7],N[11],N[15]],Ae=d[0]*se[0]+d[1]*se[1]+d[2]*se[2],Fe=d[0]*de[0]+d[1]*de[1]+d[2]*de[2],Ie=P[0]*se[0]+P[1]*se[1]+P[2]*se[2],Ye=P[0]*de[0]+P[1]*de[1]+P[2]*de[2];return Ie+$*Fe===Ae+$*Ye||de[3]*(Ae-Ie)+se[3]*(Ye-Fe)+Ae*Ye==Ie*Fe?null:(Ie+se[3]-$*Ye-$*de[3])/(Ie-Ae-$*Ye+$*Fe)}static getLesserNonNegativeNonNull(d,P){return P!==null&&P>=0&&Pi.C(Y,d==null?void 0:d.filter((P=>P.identifier!=="source.canvas"))),ef=i.bN();class Cc extends i.E{constructor(d,P={}){var N,H;super(),this._rtlPluginLoaded=()=>{for(let se in this.tileManagers){let de=this.tileManagers[se].getSource().type;de!=="vector"&&de!=="geojson"||this.tileManagers[se].reload()}},this.map=d,this.dispatcher=new xe(ye(),d._getMapId()),this.dispatcher.registerMessageHandler("GG",((se,de)=>this.getGlyphs(se,de))),this.dispatcher.registerMessageHandler("GI",((se,de)=>this.getImages(se,de))),this.dispatcher.registerMessageHandler("GDA",((se,de)=>this.getDashes(se,de))),this.imageManager=new L,this.imageManager.setEventedParent(this);let $=((N=d._container)===null||N===void 0?void 0:N.lang)||typeof document!="undefined"&&((H=document.documentElement)===null||H===void 0?void 0:H.lang)||void 0;this.glyphManager=new E(d._requestManager,P.localIdeographFontFamily,$),this.lineAtlas=new j(256,512),this.crossTileSymbolIndex=new $a,this._setInitialValues(),this._resetUpdates(),this.dispatcher.broadcast("SR",i.bO()),tt().on(Ve,this._rtlPluginLoaded),this.on("data",(se=>{if(se.dataType!=="source"||se.sourceDataType!=="metadata")return;let de=this.tileManagers[se.sourceId];if(!de)return;let Ae=de.getSource();if(Ae!=null&&Ae.vectorLayerIds)for(let Fe in this._layers){let Ie=this._layers[Fe];Ie.source===Ae.id&&this._validateLayer(Ie)}}))}_setInitialValues(){var d;this._spritesImagesIds={},this._layers={},this._order=[],this.tileManagers={},this.zoomHistory=new i.bP,this._availableImages=[],this._globalState={},this._serializedLayers={},this.stylesheet=null,this.light=null,this.sky=null,this.projection&&(this.projection.destroy(),delete this.projection),this._loaded=!1,this._changed=!1,this._updatedLayers={},this._updatedSources={},this._changedImages={},this._glyphsDidChange=!1,this._updatedPaintProps={},this._layerOrderChanged=!1,this.crossTileSymbolIndex=new(((d=this.crossTileSymbolIndex)===null||d===void 0?void 0:d.constructor)||Object),this.pauseablePlacement=void 0,this.placement=void 0,this.z=0}setGlobalStateProperty(d,P){var N,H,$;this._checkLoaded();let se=P===null?($=(H=(N=this.stylesheet.state)===null||N===void 0?void 0:N[d])===null||H===void 0?void 0:H.default)!==null&&$!==void 0?$:null:P;if(i.bQ(se,this._globalState[d]))return this;this._globalState[d]=se,this._applyGlobalStateChanges([d])}getGlobalState(){return this._globalState}setGlobalState(d){this._checkLoaded();let P=[];for(let N in d)!i.bQ(this._globalState[N],d[N].default)&&(P.push(N),this._globalState[N]=d[N].default);this._applyGlobalStateChanges(P)}_applyGlobalStateChanges(d){if(d.length===0)return;let P=new Set,N={};for(let H of d){N[H]=this._globalState[H];for(let $ in this._layers){let se=this._layers[$],de=se.getLayoutAffectingGlobalStateRefs(),Ae=se.getPaintAffectingGlobalStateRefs(),Fe=se.getVisibilityAffectingGlobalStateRefs();if(de.has(H)&&P.add(se.source),Ae.has(H))for(let{name:Ie,value:Ye}of Ae.get(H))this._updatePaintProperty(se,Ie,Ye);Fe!=null&&Fe.has(H)&&(se.recalculateVisibility(),this._updateLayer(se))}}this.dispatcher.broadcast("UGS",N);for(let H in this.tileManagers)P.has(H)&&(this._reloadSource(H),this._changed=!0)}loadURL(d){return i._(this,arguments,void 0,(function*(P,N={},H){this.fire(new i.n("dataloading",{dataType:"style"})),N.validate=typeof N.validate!="boolean"||N.validate,this._loadStyleRequest=new AbortController;let $=this._loadStyleRequest;try{let se=yield this.map._requestManager.transformRequest(P,"Style");i.bR($.signal);let de=yield i.k(se,$);this._loadStyleRequest===$&&(this._loadStyleRequest=null),this._load(de.data,N,H)}catch(se){this._loadStyleRequest===$&&(this._loadStyleRequest=null),se&&!$.signal.aborted&&this.fire(new i.l(i.d(se)))}}))}loadJSON(d,P={},N){this.fire(new i.n("dataloading",{dataType:"style"})),this._frameRequest=new AbortController,f.frameAsync(this._frameRequest,this.map._ownerWindow).then((()=>{this._frameRequest=null,P.validate=P.validate!==!1,this._load(d,P,N)})).catch((()=>{}))}loadEmpty(){this.fire(new i.n("dataloading",{dataType:"style"})),this._load(ef,{validate:!1})}_load(d,P,N){var H,$;let se=P.transformStyle?P.transformStyle(N,d):d;if(!P.validate||!dc(this,i.F(se))){se=Object.assign({},se),this._loaded=!0,this.stylesheet=se;for(let de in se.sources)this.addSource(de,se.sources[de],{validate:!1});se.sprite?this._loadSprite(se.sprite):this.imageManager.setLoaded(!0),this.glyphManager.setURL(se.glyphs),this._createLayers(),this.light=new B(this.stylesheet.light),this._setProjectionInternal(((H=this.stylesheet.projection)===null||H===void 0?void 0:H.type)||"mercator"),this.sky=new V(this.stylesheet.sky),this.map.setTerrain(($=this.stylesheet.terrain)!==null&&$!==void 0?$:null),this.fire(new i.n("data",{dataType:"style"})),this.fire(new i.n("style.load"))}}_createLayers(){var d,P,N;let H=i.bS(this.stylesheet.layers);this.setGlobalState((d=this.stylesheet.state)!==null&&d!==void 0?d:null),this.dispatcher.broadcast("SL",H),this._order=H.map(($=>$.id)),this._layers={},this._serializedLayers=null;for(let $ of H){let se=i.bT($,this._globalState);if(se.setEventedParent(this,{layer:{id:$.id}}),this._layers[$.id]=se,i.bU(se)&&this.tileManagers[se.source]){let de=(N=(P=$.paint)===null||P===void 0?void 0:P["raster-fade-duration"])!==null&&N!==void 0?N:se.paint.get("raster-fade-duration");this.tileManagers[se.source].setRasterFadeDuration(de)}}}_loadSprite(d,P=!1,N=void 0){this.imageManager.setLoaded(!1);let H=new AbortController,$;this._spriteRequest=H,(function(se,de,Ae,Fe){return i._(this,void 0,void 0,(function*(){let Ie=C(se),Ye=Ae>1?"@2x":"",st={},dt={};for(let{id:Pe,url:Xe}of Ie){let at=yield de.transformRequest(k(Xe,Ye,".json"),"SpriteJSON");st[Pe]=i.k(at,Fe);let xt=yield de.transformRequest(k(Xe,Ye,".png"),"SpriteImage");dt[Pe]=x.getImage(xt,Fe)}return yield Promise.all([...Object.values(st),...Object.values(dt)]),(function(Pe,Xe){return i._(this,void 0,void 0,(function*(){let at={};for(let xt in Pe){at[xt]={};let Et=f.getImageCanvasContext((yield Xe[xt]).data),Bt=(yield Pe[xt]).data;for(let St in Bt){let{width:Pt,height:$t,x:Ht,y:dr,sdf:Xr,pixelRatio:Or,stretchX:$r,stretchY:Er,content:Tr,textFitWidth:Rr,textFitHeight:Lr}=Bt[St];at[xt][St]={data:null,pixelRatio:Or,sdf:Xr,stretchX:$r,stretchY:Er,content:Tr,textFitWidth:Rr,textFitHeight:Lr,spriteData:{width:Pt,height:$t,x:Ht,y:dr,context:Et}}}}return at}))})(st,dt)}))})(d,this.map._requestManager,this.map.getPixelRatio(),this._spriteRequest).then((se=>{if(this._spriteRequest=null,se)for(let de in se){this._spritesImagesIds[de]=[];let Ae=this._spritesImagesIds[de]?this._spritesImagesIds[de].filter((Fe=>!(Fe in se))):[];for(let Fe of Ae)this.imageManager.removeImage(Fe),this._changedImages[Fe]=!0;for(let Fe in se[de]){let Ie=de==="default"?Fe:`${de}:${Fe}`;this._spritesImagesIds[de].push(Ie),Ie in this.imageManager.images?this.imageManager.updateImage(Ie,se[de][Fe],!1):this.imageManager.addImage(Ie,se[de][Fe]),P&&(this._changedImages[Ie]=!0)}}})).catch((se=>{this._spriteRequest=null,$=se,H.signal.aborted||this.fire(new i.l($))})).finally((()=>{this.imageManager.setLoaded(!0),this._availableImages=this.imageManager.listImages(),P&&(this._changed=!0),this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"})),N&&N($)}))}_unloadSprite(){for(let d of Object.values(this._spritesImagesIds).flat())this.imageManager.removeImage(d),this._changedImages[d]=!0;this._spritesImagesIds={},this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}_validateLayer(d){let P=this.tileManagers[d.source];if(!P)return;let N=d.sourceLayer;if(!N)return;let H=P.getSource();(H.type==="geojson"||H.vectorLayerIds&&!H.vectorLayerIds.includes(N))&&this.fire(new i.l(new Error(`Source layer "${N}" does not exist on source "${H.id}" as specified by style layer "${d.id}".`)))}loaded(){if(!this._loaded||Object.keys(this._updatedSources).length)return!1;for(let d in this.tileManagers)if(!this.tileManagers[d].loaded())return!1;return this.imageManager.isLoaded()}_serializeByIds(d,P=!1){let N=this._serializedAllLayers();if(!d||d.length===0)return Object.values(P?i.bV(N):N);let H=[];for(let $ of d)if(N[$]){let se=P?i.bV(N[$]):N[$];H.push(se)}return H}_serializedAllLayers(){let d=this._serializedLayers;if(d)return d;d=this._serializedLayers={};let P=Object.keys(this._layers);for(let N of P){let H=this._layers[N];H.type!=="custom"&&(d[N]=H.serialize())}return d}hasTransitions(){var d,P,N;if(!((d=this.light)===null||d===void 0)&&d.hasTransition()||!((P=this.sky)===null||P===void 0)&&P.hasTransition()||!((N=this.projection)===null||N===void 0)&&N.hasTransition())return!0;for(let H in this.tileManagers)if(this.tileManagers[H].hasTransition())return!0;for(let H in this._layers)if(this._layers[H].hasTransition())return!0;return!1}_checkLoaded(){if(!this._loaded)throw new Error("Style is not done loading.")}update(d){if(!this._loaded)return;let P=this._changed;if(P){let H=Object.keys(this._updatedLayers),$=Object.keys(this._removedLayers);(H.length||$.length)&&this._updateWorkerLayers(H,$);for(let se in this._updatedSources){let de=this._updatedSources[se];if(de==="reload")this._reloadSource(se);else{if(de!=="clear")throw new Error(`Invalid action ${de}`);this._clearSource(se)}}this._updateTilesForChangedImages(),this._updateTilesForChangedGlyphs();for(let se in this._updatedPaintProps)this._layers[se].updateTransitions(d);this.light.updateTransitions(d),this.sky.updateTransitions(d),this._resetUpdates()}let N={};for(let H in this.tileManagers){let $=this.tileManagers[H];N[H]=$.used,$.used=!1}for(let H of this._order){let $=this._layers[H];$.recalculate(d,this._availableImages),!$.isHidden(d.zoom)&&$.source&&(this.tileManagers[$.source].used=!0)}for(let H in N){let $=this.tileManagers[H];!!N[H]!=!!$.used&&$.fire(new i.n("data",{sourceDataType:"visibility",dataType:"source",sourceId:H}))}this.light.recalculate(d),this.sky.recalculate(d),this.projection.recalculate(d),this.z=d.zoom,P&&this.fire(new i.n("data",{dataType:"style"}))}_updateTilesForChangedImages(){let d=Object.keys(this._changedImages);if(d.length){for(let P in this.tileManagers)this.tileManagers[P].reloadTilesForDependencies(["icons","patterns"],d);this._changedImages={}}}_updateTilesForChangedGlyphs(){if(this._glyphsDidChange){for(let d in this.tileManagers)this.tileManagers[d].reloadTilesForDependencies(["glyphs"],[""]);this._glyphsDidChange=!1}}_updateWorkerLayers(d,P){this.dispatcher.broadcast("UL",{layers:this._serializeByIds(d,!1),removedIds:P})}_resetUpdates(){this._changed=!1,this._updatedLayers={},this._removedLayers={},this._updatedSources={},this._updatedPaintProps={},this._changedImages={},this._glyphsDidChange=!1}setState(d,P={}){var N;this._checkLoaded();let H=this.serialize();if(d=P.transformStyle?P.transformStyle(H,d):d,((N=P.validate)===null||N===void 0||N)&&dc(this,i.F(d)))return!1;(d=i.bV(d)).layers=i.bS(d.layers);let $=i.bW(H,d),se=this._getOperationsToPerform($);if(se.unimplemented.length>0)throw new Error(`Unimplemented: ${se.unimplemented.join(", ")}.`);if(se.operations.length===0)return!1;for(let de of se.operations)de();return this.stylesheet=d,this._serializedLayers=null,this.fire(new i.n("style.load",{style:this})),!0}_getOperationsToPerform(d){let P=[],N=[];for(let H of d)switch(H.command){case"setCenter":case"setZoom":case"setBearing":case"setPitch":case"setRoll":continue;case"addLayer":P.push((()=>this.addLayer.apply(this,H.args)));break;case"removeLayer":P.push((()=>this.removeLayer.apply(this,H.args)));break;case"setPaintProperty":P.push((()=>this.setPaintProperty.apply(this,H.args)));break;case"setLayoutProperty":P.push((()=>this.setLayoutProperty.apply(this,H.args)));break;case"setFilter":P.push((()=>this.setFilter.apply(this,H.args)));break;case"addSource":P.push((()=>this.addSource.apply(this,H.args)));break;case"removeSource":P.push((()=>this.removeSource.apply(this,H.args)));break;case"setLayerZoomRange":P.push((()=>this.setLayerZoomRange.apply(this,H.args)));break;case"setLight":P.push((()=>this.setLight.apply(this,H.args)));break;case"setGeoJSONSourceData":P.push((()=>this.setGeoJSONSourceData.apply(this,H.args)));break;case"setGlyphs":P.push((()=>this.setGlyphs.apply(this,H.args)));break;case"setSprite":P.push((()=>this.setSprite.apply(this,H.args)));break;case"setTerrain":P.push((()=>this.map.setTerrain.apply(this,H.args)));break;case"setSky":P.push((()=>this.setSky.apply(this,H.args)));break;case"setProjection":this.setProjection.apply(this,H.args);break;case"setGlobalState":P.push((()=>this.setGlobalState.apply(this,H.args)));break;case"setTransition":P.push((()=>{}));break;default:N.push(H.command)}return{operations:P,unimplemented:N}}addImage(d,P){if(this.getImage(d))return this.fire(new i.l(new Error(`An image named "${d}" already exists.`)));this.imageManager.addImage(d,P),this._afterImageUpdated(d)}updateImage(d,P){this.imageManager.updateImage(d,P)}getImage(d){return this.imageManager.getImage(d)}removeImage(d){if(!this.getImage(d))return this.fire(new i.l(new Error(`An image named "${d}" does not exist.`)));this.imageManager.removeImage(d),this._afterImageUpdated(d)}_afterImageUpdated(d){this._availableImages=this.imageManager.listImages(),this._changedImages[d]=!0,this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}listImages(){return this._checkLoaded(),this.imageManager.listImages()}addSource(d,P,N={}){var H;if(this._checkLoaded(),this.tileManagers[d]!==void 0)throw new Error(`Source "${d}" already exists.`);if(!P.type)throw new Error(`The type property must be defined, but only the following properties were given: ${Object.keys(P).join(", ")}.`);if(["vector","raster","geojson","video","image"].includes(P.type)&&this._validate(i.F.source,`sources.${d}`,P,null,N))return;!((H=this.map)===null||H===void 0)&&H._collectResourceTiming&&(P.collectResourceTiming=!0);let $=this.tileManagers[d]=new Zr(d,P,this.dispatcher);$.style=this,$.setEventedParent(this,(()=>({isSourceLoaded:$.loaded(),source:$.serialize(),sourceId:d}))),$.onAdd(this.map),this._changed=!0}removeSource(d){if(this._checkLoaded(),this.tileManagers[d]===void 0)throw new Error(`There is no source with this ID=${d}`);for(let N in this._layers)if(this._layers[N].source===d)return this.fire(new i.l(new Error(`Source "${d}" cannot be removed while layer "${N}" is using it.`)));let P=this.tileManagers[d];delete this.tileManagers[d],delete this._updatedSources[d],P.fire(new i.n("data",{sourceDataType:"metadata",dataType:"source",sourceId:d})),P.setEventedParent(null),P.onRemove(this.map),this._changed=!0}setGeoJSONSourceData(d,P){if(this._checkLoaded(),this.tileManagers[d]===void 0)throw new Error(`There is no source with this ID=${d}`);let N=this.tileManagers[d].getSource();if(N.type!=="geojson")throw new Error(`geojsonSource.type is ${N.type}, which is !== 'geojson`);N.setData(P),this._changed=!0}getSource(d){var P;return(P=this.tileManagers[d])===null||P===void 0?void 0:P.getSource()}addLayer(d,P,N={}){this._checkLoaded();let H=d.id;if(this.getLayer(H))return void this.fire(new i.l(new Error(`Layer "${H}" already exists on this map.`)));let $;if(d.type==="custom"){if(dc(this,i.bX(d)))return;$=i.bT(d,this._globalState)}else{if("source"in d&&typeof d.source=="object"&&(this.addSource(H,d.source),d=i.bV(d),d=i.e(d,{source:H})),this._validate(i.F.layer,`layers.${H}`,d,{arrayIndex:-1},N))return;$=i.bT(d,this._globalState),this._validateLayer($),$.setEventedParent(this,{layer:{id:H}})}let se=P?this._order.indexOf(P):this._order.length;if(P&&se===-1)this.fire(new i.l(new Error(`Cannot add layer "${H}" before non-existing layer "${P}".`)));else{if(this._order.splice(se,0,H),this._layerOrderChanged=!0,this._layers[H]=$,this._removedLayers[H]&&$.source&&$.type!=="custom"){let de=this._removedLayers[H];delete this._removedLayers[H],de.type!==$.type?this._updatedSources[$.source]="clear":(this._updatedSources[$.source]="reload",this.tileManagers[$.source].pause())}this._updateLayer($),$.onAdd&&$.onAdd(this.map)}}moveLayer(d,P){if(this._checkLoaded(),this._changed=!0,!this._layers[d])return void this.fire(new i.l(new Error(`The layer '${d}' does not exist in the map's style and cannot be moved.`)));if(d===P)return;let N=this._order.indexOf(d);this._order.splice(N,1);let H=P?this._order.indexOf(P):this._order.length;P&&H===-1?this.fire(new i.l(new Error(`Cannot move layer "${d}" before non-existing layer "${P}".`))):(this._order.splice(H,0,d),this._layerOrderChanged=!0)}removeLayer(d){this._checkLoaded();let P=this._layers[d];if(!P)return void this.fire(new i.l(new Error(`Cannot remove non-existing layer "${d}".`)));P.setEventedParent(null);let N=this._order.indexOf(d);this._order.splice(N,1),this._layerOrderChanged=!0,this._changed=!0,this._removedLayers[d]=P,delete this._layers[d],this._serializedLayers&&delete this._serializedLayers[d],delete this._updatedLayers[d],delete this._updatedPaintProps[d],P.onRemove&&P.onRemove(this.map)}getLayer(d){return this._layers[d]}getLayersOrder(){return[...this._order]}hasLayer(d){return d in this._layers}setLayerZoomRange(d,P,N){this._checkLoaded();let H=this.getLayer(d);H?H.minzoom===P&&H.maxzoom===N||(P!=null&&(H.minzoom=P),N!=null&&(H.maxzoom=N),this._updateLayer(H)):this.fire(new i.l(new Error(`Cannot set the zoom range of non-existing layer "${d}".`)))}setFilter(d,P,N={}){this._checkLoaded();let H=this.getLayer(d);if(H){if(!i.bQ(H.filter,P))return P==null?(H.setFilter(void 0),void this._updateLayer(H)):void(this._validate(i.F.filter,`layers.${H.id}.filter`,P,null,N)||(H.setFilter(i.bV(P)),this._updateLayer(H)))}else this.fire(new i.l(new Error(`Cannot filter non-existing layer "${d}".`)))}getFilter(d){return i.bV(this.getLayer(d).filter)}setLayoutProperty(d,P,N,H={}){this._checkLoaded();let $=this.getLayer(d);$?i.bQ($.getLayoutProperty(P),N)||($.setLayoutProperty(P,N,H),this._updateLayer($)):this.fire(new i.l(new Error(`Cannot style non-existing layer "${d}".`)))}getLayoutProperty(d,P){let N=this.getLayer(d);if(N)return N.getLayoutProperty(P);this.fire(new i.l(new Error(`Cannot get style of non-existing layer "${d}".`)))}setPaintProperty(d,P,N,H={}){this._checkLoaded();let $=this.getLayer(d);$?i.bQ($.getPaintProperty(P),N)||this._updatePaintProperty($,P,N,H):this.fire(new i.l(new Error(`Cannot style non-existing layer "${d}".`)))}_updatePaintProperty(d,P,N,H={}){d.setPaintProperty(P,N,H)&&this._updateLayer(d),i.bU(d)&&P==="raster-fade-duration"&&this.tileManagers[d.source].setRasterFadeDuration(N),this._changed=!0,this._updatedPaintProps[d.id]=!0,this._serializedLayers=null}getPaintProperty(d,P){return this.getLayer(d).getPaintProperty(P)}setFeatureState(d,P){this._checkLoaded();let N=d.source,H=d.sourceLayer,$=this.tileManagers[N];if($===void 0)return void this.fire(new i.l(new Error(`The source '${N}' does not exist in the map's style.`)));let se=$.getSource().type;se==="geojson"&&H?this.fire(new i.l(new Error("GeoJSON sources cannot have a sourceLayer parameter."))):se!=="vector"||H?(d.id===void 0&&this.fire(new i.l(new Error("The feature id parameter must be provided."))),$.setFeatureState(H,d.id,P)):this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}removeFeatureState(d,P){this._checkLoaded();let N=d.source,H=this.tileManagers[N];if(H===void 0)return void this.fire(new i.l(new Error(`The source '${N}' does not exist in the map's style.`)));let $=H.getSource().type,se=$==="vector"?d.sourceLayer:void 0;$!=="vector"||se?P&&typeof d.id!="string"&&typeof d.id!="number"?this.fire(new i.l(new Error("A feature id is required to remove its specific state property."))):H.removeFeatureState(se,d.id,P):this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")))}getFeatureState(d){this._checkLoaded();let P=d.source,N=d.sourceLayer,H=this.tileManagers[P];if(H!==void 0)return H.getSource().type!=="vector"||N?(d.id===void 0&&this.fire(new i.l(new Error("The feature id parameter must be provided."))),H.getFeatureState(N,d.id)):void this.fire(new i.l(new Error("The sourceLayer parameter must be provided for vector source types.")));this.fire(new i.l(new Error(`The source '${P}' does not exist in the map's style.`)))}getTransition(){var d;return i.e({duration:300,delay:0},(d=this.stylesheet)===null||d===void 0?void 0:d.transition)}serialize(){if(!this._loaded)return;let d=i.bY(this.tileManagers,($=>$.serialize())),P=this._serializeByIds(this._order,!0),N=this.map.getTerrain()||void 0,H=this.stylesheet;return i.bZ({version:H.version,name:H.name,metadata:H.metadata,light:H.light,sky:H.sky,center:H.center,zoom:H.zoom,bearing:H.bearing,pitch:H.pitch,sprite:H.sprite,glyphs:H.glyphs,transition:H.transition,projection:H.projection,sources:d,layers:P,terrain:N},($=>$!==void 0))}_updateLayer(d){this._updatedLayers[d.id]=!0,d.source&&!this._updatedSources[d.source]&&this.tileManagers[d.source].getSource().type!=="raster"&&(this._updatedSources[d.source]="reload",this.tileManagers[d.source].pause()),this._serializedLayers=null,this._changed=!0}_flattenAndSortRenderedFeatures(d){let P=se=>this._layers[se].type==="fill-extrusion",N={},H=[];for(let se=this._order.length-1;se>=0;se--){let de=this._order[se];if(P(de)){N[de]=se;for(let Ae of d){let Fe=Ae[de];if(Fe)for(let Ie of Fe)H.push(Ie)}}}H.sort(((se,de)=>de.intersectionZ-se.intersectionZ));let $=[];for(let se=this._order.length-1;se>=0;se--){let de=this._order[se];if(P(de))for(let Ae=H.length-1;Ae>=0;Ae--){let Fe=H[Ae].feature;if(N[Fe.layer.id]this.map.terrain.getElevation(Ie,Ye,st):void 0));return this.placement&&$.push((function(Fe,Ie,Ye,st,dt,Pe,Xe){let at={},xt=Pe.queryRenderedSymbols(st),Et=[];for(let Bt of Object.keys(xt).map(Number))Et.push(Xe[Bt]);Et.sort(ne);for(let Bt of Et){let St=Bt.featureIndex.lookupSymbolFeatures(xt[Bt.bucketInstanceId],Ie,Bt.bucketIndex,Bt.sourceLayerIndex,{filterSpec:dt.filter,globalState:dt.globalState},dt.layers,dt.availableImages,Fe);for(let Pt in St){at[Pt]||(at[Pt]=[]);let $t=St[Pt];$t.sort(((Ht,dr)=>{let Xr=Bt.featureSortOrder;if(Xr){let Or=Xr.indexOf(Ht.featureIndex);return Xr.indexOf(dr.featureIndex)-Or}return dr.featureIndex-Ht.featureIndex}));for(let Ht of $t)at[Pt].push(Ht)}}return(function(Bt,St,Pt){for(let $t in Bt)for(let Ht of Bt[$t])ae(Ht,Pt[St[$t].source]);return Bt})(at,Fe,Ye)})(this._layers,se,this.tileManagers,d,Ae,this.placement.collisionIndex,this.placement.retainedQueryData)),this._flattenAndSortRenderedFeatures($)}querySourceFeatures(d,P){P!=null&&P.filter&&this._validate(i.F.filter,"querySourceFeatures.filter",P.filter,null,P);let N=this.tileManagers[d];return N?(function(H,$){let se=H.getRenderableIds().map((Fe=>H.getTileByID(Fe))),de=[],Ae={};for(let Fe of se){let Ie=Fe.tileID.canonical.key;Ae[Ie]||(Ae[Ie]=!0,Fe.querySourceFeatures(de,$))}return de})(N,P?Object.assign(Object.assign({},P),{globalState:this._globalState}):{globalState:this._globalState}):[]}getLight(){return this.light.getLight()}setLight(d,P={}){this._checkLoaded();let N=this.light.getLight(),H=!1;for(let se in d)if(!i.bQ(d[se],N[se])){H=!0;break}if(!H)return;let $={now:g(),transition:i.e({duration:300,delay:0},this.stylesheet.transition)};this.light.setLight(d,P),this.light.updateTransitions($)}getProjection(){var d;return(d=this.stylesheet)===null||d===void 0?void 0:d.projection}setProjection(d){this._checkLoaded();let P=d!=null?d:{type:"mercator"};if(this.stylesheet.projection=d,this.projection){if(this.projection.name===P.type)return;this.projection.destroy(),delete this.projection}this._setProjectionInternal(P.type)}getSky(){var d;return(d=this.stylesheet)===null||d===void 0?void 0:d.sky}setSky(d,P={}){this._checkLoaded();let N=this.getSky(),H=!1;if(!d&&!N)return;if(d&&!N)H=!0;else if(!d&&N)H=!0;else for(let se in d)if(!i.bQ(d[se],N[se])){H=!0;break}if(!H)return;let $={now:g(),transition:i.e({duration:300,delay:0},this.stylesheet.transition)};this.stylesheet.sky=d,this.sky.setSky(d,P),this.sky.updateTransitions($)}_setProjectionInternal(d){let P=(function(N,H){let $={constrainOverride:H};if(Array.isArray(N)){let se=new Sf({type:N});return{projection:se,transform:new Ro($),cameraHelper:new Dl(se)}}switch(N){case"mercator":return{projection:new oo,transform:new Ls($),cameraHelper:new Gu};case"globe":{let se=new Sf({type:["interpolate",["linear"],["zoom"],11,"vertical-perspective",12,"mercator"]});return{projection:se,transform:new Ro($),cameraHelper:new Dl(se)}}case"vertical-perspective":return{projection:new Bd,transform:new Yo($),cameraHelper:new is};default:return i.w(`Unknown projection name: ${N}. Falling back to mercator projection.`),{projection:new oo,transform:new Ls($),cameraHelper:new Gu}}})(d,this.map.transformConstrain);this.projection=P.projection,this.map.migrateProjection(P.transform,P.cameraHelper);for(let N in this.tileManagers)this.tileManagers[N].reload()}_validate(d,P,N,H,$={}){return($==null?void 0:$.validate)!==!1&&dc(this,d.call(i.F,i.e({key:P,style:this.serialize(),value:N,styleSpec:i.x},H)))}_remove(d=!0){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null),tt().off(Ve,this._rtlPluginLoaded);for(let P in this._layers)this._layers[P].setEventedParent(null);for(let P in this.tileManagers){let N=this.tileManagers[P];N.setEventedParent(null),N.onRemove(this.map)}this.imageManager.setEventedParent(null),this.setEventedParent(null),d&&this.dispatcher.broadcast("RM",void 0),this.dispatcher.remove(d)}_clearSource(d){this.tileManagers[d].clearTiles()}_reloadSource(d){this.tileManagers[d].resume(),this.tileManagers[d].reload()}_updateSources(d){for(let P in this.tileManagers)this.tileManagers[P].update(d,this.map.terrain)}_generateCollisionBoxes(){for(let d in this.tileManagers)this._reloadSource(d)}_updatePlacement(d,P,N,H,$=!1){let se=!1,de=!1,Ae={};for(let Fe of this._order){let Ie=this._layers[Fe];if(Ie.type!=="symbol")continue;if(!Ae[Ie.source]){let st=this.tileManagers[Ie.source];Ae[Ie.source]=st.getRenderableIds(!0).map((dt=>st.getTileByID(dt))).sort(((dt,Pe)=>Pe.tileID.overscaledZ-dt.tileID.overscaledZ||(dt.tileID.isLessThan(Pe.tileID)?-1:1)))}let Ye=this.crossTileSymbolIndex.addLayer(Ie,Ae[Ie.source],d.center.lng);se||(se=Ye)}if(this.crossTileSymbolIndex.pruneUnusedLayers(this._order),$||($=this._layerOrderChanged||N===0),($||!this.pauseablePlacement||this.pauseablePlacement.isDone()&&!this.placement.stillRecent(g(),d.zoom))&&(this.pauseablePlacement=new Ra(d,this.map.terrain,this._order,$,P,N,H,this.placement),this._layerOrderChanged=!1),this.pauseablePlacement.isDone()?this.placement.setStale():(this.pauseablePlacement.continuePlacement(this._order,this._layers,Ae),this.pauseablePlacement.isDone()&&(this.placement=this.pauseablePlacement.commit(g()),de=!0),se&&this.pauseablePlacement.placement.setStale()),de||se)for(let Fe of this._order){let Ie=this._layers[Fe];Ie.type==="symbol"&&this.placement.updateLayerOpacities(Ie,Ae[Ie.source])}return!this.pauseablePlacement.isDone()||this.placement.hasTransitions(g())}_releaseSymbolFadeTiles(){for(let d in this.tileManagers)this.tileManagers[d].releaseSymbolFadeTiles()}getImages(d,P){return i._(this,void 0,void 0,(function*(){let N=yield this.imageManager.getImages(P.icons);this._updateTilesForChangedImages();let H=this.tileManagers[P.source];return H&&H.setDependencies(P.tileID.key,P.type,P.icons),N}))}getGlyphs(d,P){return i._(this,void 0,void 0,(function*(){let N=yield this.glyphManager.getGlyphs(P.stacks),H=this.tileManagers[P.source];return H&&H.setDependencies(P.tileID.key,P.type,[""]),N}))}getGlyphsUrl(){return this.stylesheet.glyphs||null}setGlyphs(d,P={}){this._checkLoaded(),d&&this._validate(i.F.glyphs,"glyphs",d,null,P)||(this._glyphsDidChange=!0,this.stylesheet.glyphs=d,this.glyphManager.entries={},this.glyphManager.setURL(d))}getDashes(d,P){return i._(this,void 0,void 0,(function*(){let N={};for(let[H,$]of Object.entries(P.dashes))N[H]=this.lineAtlas.getDash($.dasharray,$.round);return N}))}addSprite(d,P,N={},H){this._checkLoaded();let $=[{id:d,url:P}],se=[...C(this.stylesheet.sprite),...$];this._validate(i.F.sprite,"sprite",se,null,N)||(this.stylesheet.sprite=se,this._loadSprite($,!0,H))}removeSprite(d){this._checkLoaded();let P=C(this.stylesheet.sprite);if(P.find((N=>N.id===d))){if(this._spritesImagesIds[d])for(let N of this._spritesImagesIds[d])this.imageManager.removeImage(N),this._changedImages[N]=!0;P.splice(P.findIndex((N=>N.id===d)),1),this.stylesheet.sprite=P.length>0?P:void 0,delete this._spritesImagesIds[d],this._availableImages=this.imageManager.listImages(),this._changed=!0,this.dispatcher.broadcast("SI",this._availableImages),this.fire(new i.n("data",{dataType:"style"}))}else this.fire(new i.l(new Error(`Sprite "${d}" doesn't exists on this map.`)))}getSprite(){return C(this.stylesheet.sprite)}setSprite(d,P={},N){this._checkLoaded(),d&&this._validate(i.F.sprite,"sprite",d,null,P)||(this.stylesheet.sprite=d,d?this._loadSprite(d,!0,N):(this._unloadSprite(),N&&N(null)))}destroy(){this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._loadStyleRequest&&(this._loadStyleRequest.abort(),this._loadStyleRequest=null),this._spriteRequest&&(this._spriteRequest.abort(),this._spriteRequest=null);for(let d in this.tileManagers){let P=this.tileManagers[d];P.setEventedParent(null),P.onRemove(this.map)}this.tileManagers={},this.imageManager&&(this.imageManager.setEventedParent(null),this.imageManager.destroy(),this._availableImages=[],this._spritesImagesIds={}),this.glyphManager&&this.glyphManager.destroy();for(let d in this._layers){let P=this._layers[d];P.setEventedParent(null),P.onRemove&&P.onRemove(this.map)}this._setInitialValues(),this.setEventedParent(null),this.dispatcher.unregisterMessageHandler("GG"),this.dispatcher.unregisterMessageHandler("GI"),this.dispatcher.unregisterMessageHandler("GDA"),this.dispatcher.remove(!0),this._listeners={},this._oneTimeListeners={}}}var sh=i.aS([{name:"a_pos",type:"Int16",components:2},{name:"a_texture_pos",type:"Int16",components:2}]);class Y0{constructor(){this.boundProgram=null,this.boundLayoutVertexBuffer=null,this.boundPaintVertexBuffers=[],this.boundIndexBuffer=null,this.boundVertexOffset=null,this.boundDynamicVertexBuffer=null,this.vao=null}bind(d,P,N,H,$,se,de,Ae,Fe){this.context=d;let Ie=this.boundPaintVertexBuffers.length!==H.length;for(let Ye=0;!Ie&&Ye({u_texture:0,u_ele_delta:Y,u_fog_matrix:d,u_fog_color:P?P.properties.get("fog-color"):i.bo.white,u_fog_ground_blend:P?P.properties.get("fog-ground-blend"):1,u_fog_ground_blend_opacity:H?0:P?P.calculateFogBlendOpacity(N):0,u_horizon_color:P?P.properties.get("horizon-color"):i.bo.white,u_horizon_fog_blend:P?P.properties.get("horizon-fog-blend"):1,u_is_globe_mode:H?1:0}),Cf={mainMatrix:"u_projection_matrix",tileMercatorCoords:"u_projection_tile_mercator_coords",clippingPlane:"u_projection_clipping_plane",projectionTransition:"u_projection_transition",fallbackMatrix:"u_projection_fallback_matrix"};function Vo(Y){let d=[];for(let P of Y){if(P===null)continue;let N=P.split(" ");d.push(N.pop())}return d}class Ud{constructor(d,P,N,H,$,se,de,Ae,Fe=[]){let Ie=d.gl;this.program=Ie.createProgram();let Ye=Vo(P.staticAttributes),st=N?N.getBinderAttributes():[],dt=Ye.concat(st),Pe=Oa.prelude.staticUniforms?Vo(Oa.prelude.staticUniforms):[],Xe=de.staticUniforms?Vo(de.staticUniforms):[],at=P.staticUniforms?Vo(P.staticUniforms):[],xt=N?N.getBinderUniforms():[],Et=Pe.concat(Xe).concat(at).concat(xt),Bt=[];for(let Or of Et)Bt.includes(Or)||Bt.push(Or);let St=N?N.defines():[];Pl(Ie)&&St.unshift("#version 300 es"),$&&St.push("#define OVERDRAW_INSPECTOR;"),se&&St.push("#define TERRAIN3D;"),Ae&&St.push(Ae),Fe&&St.push(...Fe);let Pt=St.concat(Oa.prelude.fragmentSource,de.fragmentSource,P.fragmentSource).join(` `),$t=St.concat(Oa.prelude.vertexSource,de.vertexSource,P.vertexSource).join(` `);Pl(Ie)||(Pt=(function(Or){return Or.replace(/\bin\s/g,"varying ").replace("out highp vec4 fragColor;","").replace(/fragColor/g,"gl_FragColor").replace(/texture\(/g,"texture2D(")})(Pt),$t=(function(Or){return Or.replace(/\bin\s/g,"attribute ").replace(/\bout\s/g,"varying ").replace(/texture\(/g,"texture2D(")})($t));let Ht=Ie.createShader(Ie.FRAGMENT_SHADER);if(Ie.isContextLost())return void(this.failedToCreate=!0);if(Ie.shaderSource(Ht,Pt),Ie.compileShader(Ht),!Ie.getShaderParameter(Ht,Ie.COMPILE_STATUS))throw new Error(`Could not compile fragment shader: ${Ie.getShaderInfoLog(Ht)}`);Ie.attachShader(this.program,Ht);let dr=Ie.createShader(Ie.VERTEX_SHADER);if(Ie.isContextLost())return void(this.failedToCreate=!0);if(Ie.shaderSource(dr,$t),Ie.compileShader(dr),!Ie.getShaderParameter(dr,Ie.COMPILE_STATUS))throw new Error(`Could not compile vertex shader: ${Ie.getShaderInfoLog(dr)}`);Ie.attachShader(this.program,dr),this.attributes={};let Xr={};this.numAttributes=dt.length;for(let Or=0;Or({u_depth:new i.b_(Or,$r.u_depth),u_terrain:new i.b_(Or,$r.u_terrain),u_terrain_dim:new i.bp(Or,$r.u_terrain_dim),u_terrain_matrix:new i.c0(Or,$r.u_terrain_matrix),u_terrain_unpack:new i.c1(Or,$r.u_terrain_unpack),u_terrain_exaggeration:new i.bp(Or,$r.u_terrain_exaggeration)}))(d,Xr),this.projectionUniforms=((Or,$r)=>({u_projection_matrix:new i.c0(Or,$r.u_projection_matrix),u_projection_tile_mercator_coords:new i.c1(Or,$r.u_projection_tile_mercator_coords),u_projection_clipping_plane:new i.c1(Or,$r.u_projection_clipping_plane),u_projection_transition:new i.bp(Or,$r.u_projection_transition),u_projection_fallback_matrix:new i.c0(Or,$r.u_projection_fallback_matrix)}))(d,Xr),this.binderUniforms=N?N.getUniforms(d,Xr):[]}draw(d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,dt,Pe,Xe,at,xt,Et,Bt){var St;let Pt=d.gl;if(this.failedToCreate)return;if(d.program.set(this.program),d.setDepthMode(N),d.setStencilMode(H),d.setColorMode($),d.setCullFace(se),Ae){d.activeTexture.set(Pt.TEXTURE2),Pt.bindTexture(Pt.TEXTURE_2D,Ae.depthTexture),d.activeTexture.set(Pt.TEXTURE3),Pt.bindTexture(Pt.TEXTURE_2D,Ae.texture);for(let Ht in this.terrainUniforms)this.terrainUniforms[Ht].set(Ae[Ht])}if(Fe)for(let Ht in Fe)this.projectionUniforms[Cf[Ht]].set(Fe[Ht]);if(de)for(let Ht in this.fixedUniforms)this.fixedUniforms[Ht].set(de[Ht]);at&&at.setUniforms(d,this.binderUniforms,Pe,{zoom:Xe});let $t=0;switch(P){case Pt.LINES:$t=2;break;case Pt.TRIANGLES:$t=3;break;case Pt.LINE_STRIP:$t=1}for(let Ht of dt.get())Ht.vaos||(Ht.vaos={}),(St=Ht.vaos)[Ie]||(St[Ie]=new Y0),Ht.vaos[Ie].bind(d,this,Ye,at?at.getPaintVertexBuffers():[],st,Ht.vertexOffset,xt,Et,Bt),Pt.drawElements(P,Ht.primitiveLength*$t,Pt.UNSIGNED_SHORT,Ht.primitiveOffset*$t*2)}}function zh(Y,d,P){let N=1/i.aK(P,1,d.transform.tileZoom),H=Math.pow(2,P.tileID.overscaledZ),$=P.tileSize*Math.pow(2,d.transform.tileZoom)/H,se=$*(P.tileID.canonical.x+P.tileID.wrap*H),de=$*P.tileID.canonical.y;return{u_image:0,u_texsize:P.imageAtlasTexture.size,u_scale:[N,Y.fromScale,Y.toScale],u_fade:Y.t,u_pixel_coord_upper:[se>>16,de>>16],u_pixel_coord_lower:[65535&se,65535&de]}}let tf=(Y,d,P,N)=>{let H=Y.style.light,$=H.properties.get("position"),se=[$.x,$.y,$.z],de=i.c4();H.properties.get("anchor")==="viewport"&&i.c5(de,Y.transform.bearingInRadians),i.c6(se,se,de);let Ae=Y.transform.transformLightDirection(se),Fe=H.properties.get("color");return{u_lightpos:se,u_lightpos_globe:Ae,u_lightintensity:H.properties.get("intensity"),u_lightcolor:[Fe.r,Fe.g,Fe.b],u_vertical_gradient:+d,u_opacity:P,u_fill_translate:N}},Vd=(Y,d,P,N,H,$,se)=>i.e(tf(Y,d,P,N),zh($,Y,se),{u_height_factor:-Math.pow(2,H.overscaledZ)/se.tileSize/8}),rf=(Y,d,P,N)=>i.e(zh(d,Y,P),{u_fill_translate:N}),qh=(Y,d)=>({u_world:Y,u_fill_translate:d}),vc=(Y,d,P,N,H)=>i.e(rf(Y,d,P,H),{u_world:N}),dd=(Y,d,P,N,H)=>{let $=Y.transform,se,de,Ae=0;if(P.paint.get("circle-pitch-alignment")==="map"){let Fe=i.aK(d,1,$.zoom);se=!0,de=[Fe,Fe],Ae=Fe/(i.a6*Math.pow(2,d.tileID.overscaledZ))*2*Math.PI*H}else se=!1,de=$.pixelsToGLUnits;return{u_camera_to_center_distance:$.cameraToCenterDistance,u_scale_with_map:+(P.paint.get("circle-pitch-scale")==="map"),u_pitch_with_map:+se,u_device_pixel_ratio:Y.pixelRatio,u_extrude_scale:de,u_globe_extrude_scale:Ae,u_translate:N}},Bh=Y=>({u_pixel_extrude_scale:[1/Y.width,1/Y.height]}),Wu=Y=>({u_viewport_size:[Y.width,Y.height]}),vd=(Y,d=1)=>({u_color:Y,u_overlay:0,u_overlay_scale:d}),pd=(Y,d,P,N)=>{let H=i.aK(Y,1,d)/(i.a6*Math.pow(2,Y.tileID.overscaledZ))*2*Math.PI*N;return{u_extrude_scale:i.aK(Y,1,d),u_intensity:P,u_globe_extrude_scale:H}},lh=(Y,d,P,N)=>{let H=i.O();i.c7(H,0,Y.width,Y.height,0,0,1);let $=Y.context.gl;return{u_matrix:H,u_world:[$.drawingBufferWidth,$.drawingBufferHeight],u_image:P,u_color_ramp:N,u_opacity:d.paint.get("heatmap-opacity")}},nf=(Y,d,P)=>{let N=P.paint.get("hillshade-accent-color"),H;switch(P.paint.get("hillshade-method")){case"basic":H=4;break;case"combined":H=1;break;case"igor":H=2;break;case"multidirectional":H=3;break;default:H=0}let $=P.getIlluminationProperties();for(let se=0;se<$.directionRadians.length;se++)P.paint.get("hillshade-illumination-anchor")==="viewport"&&($.directionRadians[se]+=Y.transform.bearingInRadians);return{u_image:0,u_latrange:af(0,d.tileID),u_exaggeration:P.paint.get("hillshade-exaggeration"),u_altitudes:$.altitudeRadians,u_azimuths:$.directionRadians,u_accent:N,u_method:H,u_highlights:$.highlightColor,u_shadows:$.shadowColor}},uh=(Y,d)=>{let P=d.stride,N=i.O();return i.c7(N,0,i.a6,-i.a6,0,0,1),i.Q(N,N,[0,-i.a6,0]),{u_matrix:N,u_image:1,u_dimension:[P,P],u_zoom:Y.overscaledZ,u_unpack:d.getUnpackVector()}};function af(Y,d){let P=Math.pow(2,d.canonical.z),N=d.canonical.y;return[new i.a7(0,N/P).toLngLat().lat,new i.a7(0,(N+1)/P).toLngLat().lat]}let gd=(Y,d,P=0)=>({u_image:0,u_unpack:d.getUnpackVector(),u_dimension:[d.stride,d.stride],u_elevation_stops:1,u_color_stops:4,u_color_ramp_size:P,u_opacity:Y.paint.get("color-relief-opacity")}),Rl=(Y,d,P,N)=>{let H=Y.transform;return{u_translation:wu(Y,d,P),u_ratio:N/i.aK(d,1,H.zoom),u_device_pixel_ratio:Y.pixelRatio,u_units_to_pixels:[1/H.pixelsToGLUnits[0],1/H.pixelsToGLUnits[1]]}},ch=(Y,d,P,N,H)=>i.e(Rl(Y,d,P,N),{u_image:0,u_image_height:H}),Lc=(Y,d,P,N,H)=>{let $=Y.transform,se=Lf(d,$);return{u_translation:wu(Y,d,P),u_texsize:d.imageAtlasTexture.size,u_ratio:N/i.aK(d,1,$.zoom),u_device_pixel_ratio:Y.pixelRatio,u_image:0,u_scale:[se,H.fromScale,H.toScale],u_fade:H.t,u_units_to_pixels:[1/$.pixelsToGLUnits[0],1/$.pixelsToGLUnits[1]]}},md=(Y,d,P,N,H)=>{let $=Lf(d,Y.transform);return i.e(Rl(Y,d,P,N),{u_tileratio:$,u_crossfade_from:H.fromScale,u_crossfade_to:H.toScale,u_image:0,u_mix:H.t,u_lineatlas_width:Y.lineAtlas.width,u_lineatlas_height:Y.lineAtlas.height})},yd=(Y,d,P,N,H,$)=>{let se=Lf(d,Y.transform);return i.e(Rl(Y,d,P,N),{u_image:0,u_image_height:$,u_tileratio:se,u_crossfade_from:H.fromScale,u_crossfade_to:H.toScale,u_image_dash:1,u_mix:H.t,u_lineatlas_width:Y.lineAtlas.width,u_lineatlas_height:Y.lineAtlas.height})};function Lf(Y,d){return 1/i.aK(Y,1,d.tileZoom)}function wu(Y,d,P){return i.aL(Y.transform,d,P.paint.get("line-translate"),P.paint.get("line-translate-anchor"))}let fh=(Y,d,P,N,H)=>{return{u_tl_parent:Y,u_scale_parent:d,u_buffer_scale:1,u_fade_t:P.mix,u_opacity:P.opacity*N.paint.get("raster-opacity"),u_image0:0,u_image1:1,u_brightness_low:N.paint.get("raster-brightness-min"),u_brightness_high:N.paint.get("raster-brightness-max"),u_saturation_factor:(se=N.paint.get("raster-saturation"),se>0?1-1/(1.001-se):-se),u_contrast_factor:($=N.paint.get("raster-contrast"),$>0?1/(1-$):1+$),u_spin_weights:Oh(N.paint.get("raster-hue-rotate")),u_coords_top:[H[0].x,H[0].y,H[1].x,H[1].y],u_coords_bottom:[H[3].x,H[3].y,H[2].x,H[2].y]};var $,se};function Oh(Y){Y*=Math.PI/180;let d=Math.sin(Y),P=Math.cos(Y);return[(2*P+1)/3,(-Math.sqrt(3)*d-P+1)/3,(Math.sqrt(3)*d-P+1)/3]}let hh=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st)=>{let dt=se.transform;return{u_is_size_zoom_constant:+(Y==="constant"||Y==="source"),u_is_size_feature_constant:+(Y==="constant"||Y==="camera"),u_size_t:d?d.uSizeT:0,u_size:d?d.uSize:0,u_camera_to_center_distance:dt.cameraToCenterDistance,u_pitch:dt.pitch/360*2*Math.PI,u_rotate_symbol:+P,u_aspect_ratio:dt.width/dt.height,u_fade_change:se.options.fadeDuration?se.symbolFadeChange:1,u_label_plane_matrix:de,u_coord_matrix:Ae,u_is_text:+Ie,u_pitch_with_map:+N,u_is_along_line:H,u_is_variable_anchor:$,u_texsize:Ye,u_texture:0,u_translation:Fe,u_pitched_scale:st}},Gd=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st,dt)=>{let Pe=se.transform;return i.e(hh(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,dt),{u_gamma_scale:N?Math.cos(Pe.pitch*Math.PI/180)*Pe.cameraToCenterDistance:1,u_device_pixel_ratio:se.pixelRatio,u_is_halo:st?1:0,u_is_plain:1})},Gl=(Y,d,P,N,H,$,se,de,Ae,Fe,Ie,Ye,st)=>i.e(Gd(Y,d,P,N,H,$,se,de,Ae,Fe,!0,Ie,!0,st),{u_texsize_icon:Ye,u_texture_icon:1}),wl=(Y,d)=>({u_opacity:Y,u_color:d}),xd=(Y,d,P,N,H)=>i.e((function($,se,de,Ae){let Fe=de.imageManager.getPattern($.from.toString()),Ie=de.imageManager.getPattern($.to.toString()),{width:Ye,height:st}=de.imageManager.getPixelSize(),dt=Math.pow(2,Ae.tileID.overscaledZ),Pe=Ae.tileSize*Math.pow(2,de.transform.tileZoom)/dt,Xe=Pe*(Ae.tileID.canonical.x+Ae.tileID.wrap*dt),at=Pe*Ae.tileID.canonical.y;return{u_image:0,u_pattern_tl_a:Fe.tl,u_pattern_br_a:Fe.br,u_pattern_tl_b:Ie.tl,u_pattern_br_b:Ie.br,u_texsize:[Ye,st],u_mix:se.t,u_pattern_size_a:Fe.displaySize,u_pattern_size_b:Ie.displaySize,u_scale_a:se.fromScale,u_scale_b:se.toScale,u_tile_units_to_pixels:1/i.aK(Ae,1,de.transform.tileZoom),u_pixel_coord_upper:[Xe>>16,at>>16],u_pixel_coord_lower:[65535&Xe,65535&at]}})(P,H,d,N),{u_opacity:Y}),Hl=(Y,d)=>{},_d={fillExtrusion:(Y,d)=>({u_lightpos:new i.c2(Y,d.u_lightpos),u_lightpos_globe:new i.c2(Y,d.u_lightpos_globe),u_lightintensity:new i.bp(Y,d.u_lightintensity),u_lightcolor:new i.c2(Y,d.u_lightcolor),u_vertical_gradient:new i.bp(Y,d.u_vertical_gradient),u_opacity:new i.bp(Y,d.u_opacity),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillExtrusionPattern:(Y,d)=>({u_lightpos:new i.c2(Y,d.u_lightpos),u_lightpos_globe:new i.c2(Y,d.u_lightpos_globe),u_lightintensity:new i.bp(Y,d.u_lightintensity),u_lightcolor:new i.c2(Y,d.u_lightcolor),u_vertical_gradient:new i.bp(Y,d.u_vertical_gradient),u_height_factor:new i.bp(Y,d.u_height_factor),u_opacity:new i.bp(Y,d.u_opacity),u_fill_translate:new i.c3(Y,d.u_fill_translate),u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade)}),fill:(Y,d)=>({u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillPattern:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillOutline:(Y,d)=>({u_world:new i.c3(Y,d.u_world),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),fillOutlinePattern:(Y,d)=>({u_world:new i.c3(Y,d.u_world),u_image:new i.b_(Y,d.u_image),u_texsize:new i.c3(Y,d.u_texsize),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade),u_fill_translate:new i.c3(Y,d.u_fill_translate)}),circle:(Y,d)=>({u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_scale_with_map:new i.b_(Y,d.u_scale_with_map),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_extrude_scale:new i.c3(Y,d.u_extrude_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_globe_extrude_scale:new i.bp(Y,d.u_globe_extrude_scale),u_translate:new i.c3(Y,d.u_translate)}),collisionBox:(Y,d)=>({u_pixel_extrude_scale:new i.c3(Y,d.u_pixel_extrude_scale)}),collisionCircle:(Y,d)=>({u_viewport_size:new i.c3(Y,d.u_viewport_size)}),debug:(Y,d)=>({u_color:new i.b$(Y,d.u_color),u_overlay:new i.b_(Y,d.u_overlay),u_overlay_scale:new i.bp(Y,d.u_overlay_scale)}),depth:Hl,clippingMask:Hl,heatmap:(Y,d)=>({u_extrude_scale:new i.bp(Y,d.u_extrude_scale),u_intensity:new i.bp(Y,d.u_intensity),u_globe_extrude_scale:new i.bp(Y,d.u_globe_extrude_scale)}),heatmapTexture:(Y,d)=>({u_matrix:new i.c0(Y,d.u_matrix),u_world:new i.c3(Y,d.u_world),u_image:new i.b_(Y,d.u_image),u_color_ramp:new i.b_(Y,d.u_color_ramp),u_opacity:new i.bp(Y,d.u_opacity)}),hillshade:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_latrange:new i.c3(Y,d.u_latrange),u_exaggeration:new i.bp(Y,d.u_exaggeration),u_altitudes:new i.c9(Y,d.u_altitudes),u_azimuths:new i.c9(Y,d.u_azimuths),u_accent:new i.b$(Y,d.u_accent),u_method:new i.b_(Y,d.u_method),u_shadows:new i.c8(Y,d.u_shadows),u_highlights:new i.c8(Y,d.u_highlights)}),hillshadePrepare:(Y,d)=>({u_matrix:new i.c0(Y,d.u_matrix),u_image:new i.b_(Y,d.u_image),u_dimension:new i.c3(Y,d.u_dimension),u_zoom:new i.bp(Y,d.u_zoom),u_unpack:new i.c1(Y,d.u_unpack)}),colorRelief:(Y,d)=>({u_image:new i.b_(Y,d.u_image),u_unpack:new i.c1(Y,d.u_unpack),u_dimension:new i.c3(Y,d.u_dimension),u_elevation_stops:new i.b_(Y,d.u_elevation_stops),u_color_stops:new i.b_(Y,d.u_color_stops),u_color_ramp_size:new i.b_(Y,d.u_color_ramp_size),u_opacity:new i.bp(Y,d.u_opacity)}),line:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels)}),lineGradient:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_image_height:new i.bp(Y,d.u_image_height)}),linePattern:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_texsize:new i.c3(Y,d.u_texsize),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_image:new i.b_(Y,d.u_image),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_scale:new i.c2(Y,d.u_scale),u_fade:new i.bp(Y,d.u_fade)}),lineSDF:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_mix:new i.bp(Y,d.u_mix),u_tileratio:new i.bp(Y,d.u_tileratio),u_crossfade_from:new i.bp(Y,d.u_crossfade_from),u_crossfade_to:new i.bp(Y,d.u_crossfade_to),u_lineatlas_width:new i.bp(Y,d.u_lineatlas_width),u_lineatlas_height:new i.bp(Y,d.u_lineatlas_height)}),lineGradientSDF:(Y,d)=>({u_translation:new i.c3(Y,d.u_translation),u_ratio:new i.bp(Y,d.u_ratio),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_units_to_pixels:new i.c3(Y,d.u_units_to_pixels),u_image:new i.b_(Y,d.u_image),u_image_height:new i.bp(Y,d.u_image_height),u_tileratio:new i.bp(Y,d.u_tileratio),u_crossfade_from:new i.bp(Y,d.u_crossfade_from),u_crossfade_to:new i.bp(Y,d.u_crossfade_to),u_image_dash:new i.b_(Y,d.u_image_dash),u_mix:new i.bp(Y,d.u_mix),u_lineatlas_width:new i.bp(Y,d.u_lineatlas_width),u_lineatlas_height:new i.bp(Y,d.u_lineatlas_height)}),raster:(Y,d)=>({u_tl_parent:new i.c3(Y,d.u_tl_parent),u_scale_parent:new i.bp(Y,d.u_scale_parent),u_buffer_scale:new i.bp(Y,d.u_buffer_scale),u_fade_t:new i.bp(Y,d.u_fade_t),u_opacity:new i.bp(Y,d.u_opacity),u_image0:new i.b_(Y,d.u_image0),u_image1:new i.b_(Y,d.u_image1),u_brightness_low:new i.bp(Y,d.u_brightness_low),u_brightness_high:new i.bp(Y,d.u_brightness_high),u_saturation_factor:new i.bp(Y,d.u_saturation_factor),u_contrast_factor:new i.bp(Y,d.u_contrast_factor),u_spin_weights:new i.c2(Y,d.u_spin_weights),u_coords_top:new i.c1(Y,d.u_coords_top),u_coords_bottom:new i.c1(Y,d.u_coords_bottom)}),symbolIcon:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texture:new i.b_(Y,d.u_texture),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),symbolSDF:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texture:new i.b_(Y,d.u_texture),u_gamma_scale:new i.bp(Y,d.u_gamma_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_is_halo:new i.b_(Y,d.u_is_halo),u_is_plain:new i.b_(Y,d.u_is_plain),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),symbolTextAndIcon:(Y,d)=>({u_is_size_zoom_constant:new i.b_(Y,d.u_is_size_zoom_constant),u_is_size_feature_constant:new i.b_(Y,d.u_is_size_feature_constant),u_size_t:new i.bp(Y,d.u_size_t),u_size:new i.bp(Y,d.u_size),u_camera_to_center_distance:new i.bp(Y,d.u_camera_to_center_distance),u_pitch:new i.bp(Y,d.u_pitch),u_rotate_symbol:new i.b_(Y,d.u_rotate_symbol),u_aspect_ratio:new i.bp(Y,d.u_aspect_ratio),u_fade_change:new i.bp(Y,d.u_fade_change),u_label_plane_matrix:new i.c0(Y,d.u_label_plane_matrix),u_coord_matrix:new i.c0(Y,d.u_coord_matrix),u_is_text:new i.b_(Y,d.u_is_text),u_pitch_with_map:new i.b_(Y,d.u_pitch_with_map),u_is_along_line:new i.b_(Y,d.u_is_along_line),u_is_variable_anchor:new i.b_(Y,d.u_is_variable_anchor),u_texsize:new i.c3(Y,d.u_texsize),u_texsize_icon:new i.c3(Y,d.u_texsize_icon),u_texture:new i.b_(Y,d.u_texture),u_texture_icon:new i.b_(Y,d.u_texture_icon),u_gamma_scale:new i.bp(Y,d.u_gamma_scale),u_device_pixel_ratio:new i.bp(Y,d.u_device_pixel_ratio),u_is_halo:new i.b_(Y,d.u_is_halo),u_translation:new i.c3(Y,d.u_translation),u_pitched_scale:new i.bp(Y,d.u_pitched_scale)}),background:(Y,d)=>({u_opacity:new i.bp(Y,d.u_opacity),u_color:new i.b$(Y,d.u_color)}),backgroundPattern:(Y,d)=>({u_opacity:new i.bp(Y,d.u_opacity),u_image:new i.b_(Y,d.u_image),u_pattern_tl_a:new i.c3(Y,d.u_pattern_tl_a),u_pattern_br_a:new i.c3(Y,d.u_pattern_br_a),u_pattern_tl_b:new i.c3(Y,d.u_pattern_tl_b),u_pattern_br_b:new i.c3(Y,d.u_pattern_br_b),u_texsize:new i.c3(Y,d.u_texsize),u_mix:new i.bp(Y,d.u_mix),u_pattern_size_a:new i.c3(Y,d.u_pattern_size_a),u_pattern_size_b:new i.c3(Y,d.u_pattern_size_b),u_scale_a:new i.bp(Y,d.u_scale_a),u_scale_b:new i.bp(Y,d.u_scale_b),u_pixel_coord_upper:new i.c3(Y,d.u_pixel_coord_upper),u_pixel_coord_lower:new i.c3(Y,d.u_pixel_coord_lower),u_tile_units_to_pixels:new i.bp(Y,d.u_tile_units_to_pixels)}),terrain:(Y,d)=>({u_texture:new i.b_(Y,d.u_texture),u_ele_delta:new i.bp(Y,d.u_ele_delta),u_fog_matrix:new i.c0(Y,d.u_fog_matrix),u_fog_color:new i.b$(Y,d.u_fog_color),u_fog_ground_blend:new i.bp(Y,d.u_fog_ground_blend),u_fog_ground_blend_opacity:new i.bp(Y,d.u_fog_ground_blend_opacity),u_horizon_color:new i.b$(Y,d.u_horizon_color),u_horizon_fog_blend:new i.bp(Y,d.u_horizon_fog_blend),u_is_globe_mode:new i.bp(Y,d.u_is_globe_mode)}),terrainDepth:(Y,d)=>({u_ele_delta:new i.bp(Y,d.u_ele_delta)}),terrainCoords:(Y,d)=>({u_texture:new i.b_(Y,d.u_texture),u_terrain_coords_id:new i.bp(Y,d.u_terrain_coords_id),u_ele_delta:new i.bp(Y,d.u_ele_delta)}),projectionErrorMeasurement:(Y,d)=>({u_input:new i.bp(Y,d.u_input),u_output_expected:new i.bp(Y,d.u_output_expected)}),atmosphere:(Y,d)=>({u_sun_pos:new i.c2(Y,d.u_sun_pos),u_atmosphere_blend:new i.bp(Y,d.u_atmosphere_blend),u_globe_position:new i.c2(Y,d.u_globe_position),u_globe_radius:new i.bp(Y,d.u_globe_radius),u_inv_proj_matrix:new i.c0(Y,d.u_inv_proj_matrix)}),sky:(Y,d)=>({u_sky_color:new i.b$(Y,d.u_sky_color),u_horizon_color:new i.b$(Y,d.u_horizon_color),u_horizon:new i.c3(Y,d.u_horizon),u_horizon_normal:new i.c3(Y,d.u_horizon_normal),u_sky_horizon_blend:new i.bp(Y,d.u_sky_horizon_blend),u_sky_blend:new i.bp(Y,d.u_sky_blend)})};class dh{constructor(d,P,N){this.context=d;let H=d.gl;this.buffer=H.createBuffer(),this.dynamicDraw=!!N,this.context.unbindVAO(),d.bindElementBuffer.set(this.buffer),H.bufferData(H.ELEMENT_ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?H.DYNAMIC_DRAW:H.STATIC_DRAW),this.dynamicDraw||P.freeBufferAfterUpload()}bind(){this.context.bindElementBuffer.set(this.buffer)}updateData(d){let P=this.context.gl;if(!this.dynamicDraw)throw new Error("Attempted to update data while not in dynamic mode.");this.context.unbindVAO(),this.bind(),P.bufferSubData(P.ELEMENT_ARRAY_BUFFER,0,d.arrayBuffer)}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}let Pf={Int8:"BYTE",Uint8:"UNSIGNED_BYTE",Int16:"SHORT",Uint16:"UNSIGNED_SHORT",Int32:"INT",Uint32:"UNSIGNED_INT",Float32:"FLOAT"};class Hd{constructor(d,P,N,H){this.length=P.length,this.attributes=N,this.itemSize=P.bytesPerElement,this.dynamicDraw=H,this.context=d;let $=d.gl;this.buffer=$.createBuffer(),d.bindVertexBuffer.set(this.buffer),$.bufferData($.ARRAY_BUFFER,P.arrayBuffer,this.dynamicDraw?$.DYNAMIC_DRAW:$.STATIC_DRAW),this.dynamicDraw||P.freeBufferAfterUpload()}bind(){this.context.bindVertexBuffer.set(this.buffer)}updateData(d){if(d.length!==this.length)throw new Error(`Length of new data is ${d.length}, which doesn't match current length of ${this.length}`);let P=this.context.gl;this.bind(),P.bufferSubData(P.ARRAY_BUFFER,0,d.arrayBuffer)}enableAttributes(d,P){for(let N of this.attributes){let H=P.attributes[N.name];H!==void 0&&d.enableVertexAttribArray(H)}}setVertexAttribPointers(d,P,N){for(let H of this.attributes){let $=P.attributes[H.name];$!==void 0&&d.vertexAttribPointer($,H.components,d[Pf[H.type]],!1,this.itemSize,H.offset+this.itemSize*(N||0))}}destroy(){this.buffer&&(this.context.gl.deleteBuffer(this.buffer),delete this.buffer)}}class xo{constructor(d){this.gl=d.gl,this.default=this.getDefault(),this.current=this.default,this.dirty=!1}get(){return this.current}set(d){}getDefault(){return this.default}setDefault(){this.set(this.default)}}class p0 extends xo{getDefault(){return i.bo.transparent}set(d){let P=this.current;(d.r!==P.r||d.g!==P.g||d.b!==P.b||d.a!==P.a||this.dirty)&&(this.gl.clearColor(d.r,d.g,d.b,d.a),this.current=d,this.dirty=!1)}}class Tu extends xo{getDefault(){return 1}set(d){(d!==this.current||this.dirty)&&(this.gl.clearDepth(d),this.current=d,this.dirty=!1)}}class Au extends xo{getDefault(){return 0}set(d){(d!==this.current||this.dirty)&&(this.gl.clearStencil(d),this.current=d,this.dirty=!1)}}class Il extends xo{getDefault(){return[!0,!0,!0,!0]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||d[3]!==P[3]||this.dirty)&&(this.gl.colorMask(d[0],d[1],d[2],d[3]),this.current=d,this.dirty=!1)}}class g0 extends xo{getDefault(){return!0}set(d){(d!==this.current||this.dirty)&&(this.gl.depthMask(d),this.current=d,this.dirty=!1)}}class Yu extends xo{getDefault(){return 255}set(d){(d!==this.current||this.dirty)&&(this.gl.stencilMask(d),this.current=d,this.dirty=!1)}}class Nh extends xo{getDefault(){return{func:this.gl.ALWAYS,ref:0,mask:255}}set(d){let P=this.current;(d.func!==P.func||d.ref!==P.ref||d.mask!==P.mask||this.dirty)&&(this.gl.stencilFunc(d.func,d.ref,d.mask),this.current=d,this.dirty=!1)}}class Tl extends xo{getDefault(){let d=this.gl;return[d.KEEP,d.KEEP,d.KEEP]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||this.dirty)&&(this.gl.stencilOp(d[0],d[1],d[2]),this.current=d,this.dirty=!1)}}class jl extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.STENCIL_TEST):P.disable(P.STENCIL_TEST),this.current=d,this.dirty=!1}}class Uh extends xo{getDefault(){return[0,1]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||this.dirty)&&(this.gl.depthRange(d[0],d[1]),this.current=d,this.dirty=!1)}}class Vh extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.DEPTH_TEST):P.disable(P.DEPTH_TEST),this.current=d,this.dirty=!1}}class jd extends xo{getDefault(){return this.gl.LESS}set(d){(d!==this.current||this.dirty)&&(this.gl.depthFunc(d),this.current=d,this.dirty=!1)}}class pc extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.BLEND):P.disable(P.BLEND),this.current=d,this.dirty=!1}}class gc extends xo{getDefault(){let d=this.gl;return[d.ONE,d.ZERO]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||this.dirty)&&(this.gl.blendFunc(d[0],d[1]),this.current=d,this.dirty=!1)}}class of extends xo{getDefault(){return i.bo.transparent}set(d){let P=this.current;(d.r!==P.r||d.g!==P.g||d.b!==P.b||d.a!==P.a||this.dirty)&&(this.gl.blendColor(d.r,d.g,d.b,d.a),this.current=d,this.dirty=!1)}}class sf extends xo{getDefault(){return this.gl.FUNC_ADD}set(d){(d!==this.current||this.dirty)&&(this.gl.blendEquation(d),this.current=d,this.dirty=!1)}}class bd extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;d?P.enable(P.CULL_FACE):P.disable(P.CULL_FACE),this.current=d,this.dirty=!1}}class Gh extends xo{getDefault(){return this.gl.BACK}set(d){(d!==this.current||this.dirty)&&(this.gl.cullFace(d),this.current=d,this.dirty=!1)}}class Xu extends xo{getDefault(){return this.gl.CCW}set(d){(d!==this.current||this.dirty)&&(this.gl.frontFace(d),this.current=d,this.dirty=!1)}}class Pc extends xo{getDefault(){return null}set(d){(d!==this.current||this.dirty)&&(this.gl.useProgram(d),this.current=d,this.dirty=!1)}}class Ff extends xo{getDefault(){return this.gl.TEXTURE0}set(d){(d!==this.current||this.dirty)&&(this.gl.activeTexture(d),this.current=d,this.dirty=!1)}}class Df extends xo{getDefault(){let d=this.gl;return[0,0,d.drawingBufferWidth,d.drawingBufferHeight]}set(d){let P=this.current;(d[0]!==P[0]||d[1]!==P[1]||d[2]!==P[2]||d[3]!==P[3]||this.dirty)&&(this.gl.viewport(d[0],d[1],d[2],d[3]),this.current=d,this.dirty=!1)}}class La extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindFramebuffer(P.FRAMEBUFFER,d),this.current=d,this.dirty=!1}}class Rf extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindRenderbuffer(P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}class m0 extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindTexture(P.TEXTURE_2D,d),this.current=d,this.dirty=!1}}class wd extends xo{getDefault(){return null}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.bindBuffer(P.ARRAY_BUFFER,d),this.current=d,this.dirty=!1}}class Hh extends xo{getDefault(){return null}set(d){let P=this.gl;P.bindBuffer(P.ELEMENT_ARRAY_BUFFER,d),this.current=d,this.dirty=!1}}class X0 extends xo{getDefault(){return null}set(d){var P;if(d===this.current&&!this.dirty)return;let N=this.gl;Pl(N)?N.bindVertexArray(d):(P=N.getExtension("OES_vertex_array_object"))===null||P===void 0||P.bindVertexArrayOES(d),this.current=d,this.dirty=!1}}class y0 extends xo{getDefault(){return 4}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_ALIGNMENT,d),this.current=d,this.dirty=!1}}class Td extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_PREMULTIPLY_ALPHA_WEBGL,d),this.current=d,this.dirty=!1}}class ul extends xo{getDefault(){return!1}set(d){if(d===this.current&&!this.dirty)return;let P=this.gl;P.pixelStorei(P.UNPACK_FLIP_Y_WEBGL,d),this.current=d,this.dirty=!1}}class Wl extends xo{constructor(d,P){super(d),this.context=d,this.parent=P}getDefault(){return null}}class If extends Wl{setDirty(){this.dirty=!0}set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferTexture2D(P.FRAMEBUFFER,P.COLOR_ATTACHMENT0,P.TEXTURE_2D,d,0),this.current=d,this.dirty=!1}}class vh extends Wl{set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_ATTACHMENT,P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}class zf extends Wl{set(d){if(d===this.current&&!this.dirty)return;this.context.bindFramebuffer.set(this.parent);let P=this.gl;P.framebufferRenderbuffer(P.FRAMEBUFFER,P.DEPTH_STENCIL_ATTACHMENT,P.RENDERBUFFER,d),this.current=d,this.dirty=!1}}let qf="Framebuffer is not complete";class Ze{constructor(d,P,N,H,$){this.context=d,this.width=P,this.height=N;let se=d.gl,de=this.framebuffer=se.createFramebuffer();if(this.colorAttachment=new If(d,de),H)this.depthAttachment=$?new zf(d,de):new vh(d,de);else if($)throw new Error("Stencil cannot be set without depth");if(se.checkFramebufferStatus(se.FRAMEBUFFER)!==se.FRAMEBUFFER_COMPLETE)throw new Error(qf)}destroy(){let d=this.context.gl,P=this.colorAttachment.get();if(P&&d.deleteTexture(P),this.depthAttachment){let N=this.depthAttachment.get();N&&d.deleteRenderbuffer(N)}d.deleteFramebuffer(this.framebuffer)}}class yt{constructor(d){var P,N;if(this.gl=d,this.clearColor=new p0(this),this.clearDepth=new Tu(this),this.clearStencil=new Au(this),this.colorMask=new Il(this),this.depthMask=new g0(this),this.stencilMask=new Yu(this),this.stencilFunc=new Nh(this),this.stencilOp=new Tl(this),this.stencilTest=new jl(this),this.depthRange=new Uh(this),this.depthTest=new Vh(this),this.depthFunc=new jd(this),this.blend=new pc(this),this.blendFunc=new gc(this),this.blendColor=new of(this),this.blendEquation=new sf(this),this.cullFace=new bd(this),this.cullFaceSide=new Gh(this),this.frontFace=new Xu(this),this.program=new Pc(this),this.activeTexture=new Ff(this),this.viewport=new Df(this),this.bindFramebuffer=new La(this),this.bindRenderbuffer=new Rf(this),this.bindTexture=new m0(this),this.bindVertexBuffer=new wd(this),this.bindElementBuffer=new Hh(this),this.bindVertexArray=new X0(this),this.pixelStoreUnpack=new y0(this),this.pixelStoreUnpackPremultiplyAlpha=new Td(this),this.pixelStoreUnpackFlipY=new ul(this),this.extTextureFilterAnisotropic=d.getExtension("EXT_texture_filter_anisotropic"),this.extTextureFilterAnisotropic&&(this.extTextureFilterAnisotropicMax=d.getParameter(this.extTextureFilterAnisotropic.MAX_TEXTURE_MAX_ANISOTROPY_EXT)),this.maxTextureSize=d.getParameter(d.MAX_TEXTURE_SIZE),Pl(d)){this.HALF_FLOAT=d.HALF_FLOAT;let H=d.getExtension("EXT_color_buffer_half_float");this.RGBA16F=(P=d.RGBA16F)!==null&&P!==void 0?P:H==null?void 0:H.RGBA16F_EXT,this.RGB16F=(N=d.RGB16F)!==null&&N!==void 0?N:H==null?void 0:H.RGB16F_EXT,d.getExtension("EXT_color_buffer_float")}else{d.getExtension("EXT_color_buffer_half_float"),d.getExtension("OES_texture_half_float_linear");let H=d.getExtension("OES_texture_half_float");this.HALF_FLOAT=H==null?void 0:H.HALF_FLOAT_OES}}setDefault(){this.unbindVAO(),this.clearColor.setDefault(),this.clearDepth.setDefault(),this.clearStencil.setDefault(),this.colorMask.setDefault(),this.depthMask.setDefault(),this.stencilMask.setDefault(),this.stencilFunc.setDefault(),this.stencilOp.setDefault(),this.stencilTest.setDefault(),this.depthRange.setDefault(),this.depthTest.setDefault(),this.depthFunc.setDefault(),this.blend.setDefault(),this.blendFunc.setDefault(),this.blendColor.setDefault(),this.blendEquation.setDefault(),this.cullFace.setDefault(),this.cullFaceSide.setDefault(),this.frontFace.setDefault(),this.program.setDefault(),this.activeTexture.setDefault(),this.bindFramebuffer.setDefault(),this.pixelStoreUnpack.setDefault(),this.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.pixelStoreUnpackFlipY.setDefault()}setDirty(){this.clearColor.dirty=!0,this.clearDepth.dirty=!0,this.clearStencil.dirty=!0,this.colorMask.dirty=!0,this.depthMask.dirty=!0,this.stencilMask.dirty=!0,this.stencilFunc.dirty=!0,this.stencilOp.dirty=!0,this.stencilTest.dirty=!0,this.depthRange.dirty=!0,this.depthTest.dirty=!0,this.depthFunc.dirty=!0,this.blend.dirty=!0,this.blendFunc.dirty=!0,this.blendColor.dirty=!0,this.blendEquation.dirty=!0,this.cullFace.dirty=!0,this.cullFaceSide.dirty=!0,this.frontFace.dirty=!0,this.program.dirty=!0,this.activeTexture.dirty=!0,this.viewport.dirty=!0,this.bindFramebuffer.dirty=!0,this.bindRenderbuffer.dirty=!0,this.bindTexture.dirty=!0,this.bindVertexBuffer.dirty=!0,this.bindElementBuffer.dirty=!0,this.bindVertexArray.dirty=!0,this.pixelStoreUnpack.dirty=!0,this.pixelStoreUnpackPremultiplyAlpha.dirty=!0,this.pixelStoreUnpackFlipY.dirty=!0}createIndexBuffer(d,P){return new dh(this,d,P)}createVertexBuffer(d,P,N){return new Hd(this,d,P,N)}createRenderbuffer(d,P,N){let H=this.gl,$=H.createRenderbuffer();return this.bindRenderbuffer.set($),H.renderbufferStorage(H.RENDERBUFFER,d,P,N),this.bindRenderbuffer.set(null),$}createFramebuffer(d,P,N,H){return new Ze(this,d,P,N,H)}clear({color:d,depth:P,stencil:N}){let H=this.gl,$=0;d&&($|=H.COLOR_BUFFER_BIT,this.clearColor.set(d),this.colorMask.set([!0,!0,!0,!0])),P!==void 0&&($|=H.DEPTH_BUFFER_BIT,this.depthRange.set([0,1]),this.clearDepth.set(P),this.depthMask.set(!0)),N!==void 0&&($|=H.STENCIL_BUFFER_BIT,this.clearStencil.set(N),this.stencilMask.set(255)),H.clear($)}setCullFace(d){d.enable===!1?this.cullFace.set(!1):(this.cullFace.set(!0),this.cullFaceSide.set(d.mode),this.frontFace.set(d.frontFace))}setDepthMode(d){d.func!==this.gl.ALWAYS||d.mask?(this.depthTest.set(!0),this.depthFunc.set(d.func),this.depthMask.set(d.mask),this.depthRange.set(d.range)):this.depthTest.set(!1)}setStencilMode(d){d.test.func!==this.gl.ALWAYS||d.mask?(this.stencilTest.set(!0),this.stencilMask.set(d.mask),this.stencilOp.set([d.fail,d.depthFail,d.pass]),this.stencilFunc.set({func:d.test.func,ref:d.ref,mask:d.test.mask})):this.stencilTest.set(!1)}setColorMode(d){i.bQ(d.blendFunction,Ja.Replace)?this.blend.set(!1):(this.blend.set(!0),this.blendFunc.set(d.blendFunction),this.blendColor.set(d.blendColor)),this.colorMask.set(d.mask)}createVertexArray(){var d;return Pl(this.gl)?this.gl.createVertexArray():(d=this.gl.getExtension("OES_vertex_array_object"))===null||d===void 0?void 0:d.createVertexArrayOES()}deleteVertexArray(d){var P;Pl(this.gl)?this.gl.deleteVertexArray(d):(P=this.gl.getExtension("OES_vertex_array_object"))===null||P===void 0||P.deleteVertexArrayOES(d)}unbindVAO(){this.bindVertexArray.set(null)}}let Wt;function zt(Y,d,P,N,H){var $,se;let de=Y.context,Ae=Y.transform,Fe=de.gl,Ie=Y.useProgram("collisionBox"),Ye=[],st=0,dt=0;for(let Bt of N){let St=d.getTile(Bt).getBucket(P);if(!St)continue;let Pt=H?St.textCollisionBox:St.iconCollisionBox,$t=St.collisionCircleArray;$t.length>0&&(Ye.push({circleArray:$t,circleOffset:dt,coord:Bt}),st+=$t.length/4,dt=st),Pt&&Ie.draw(de,Fe.LINES,ma.disabled,Ca.disabled,Y.colorModeForRenderPass(),Sa.disabled,Bh(Y.transform),($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Bt),Ae.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),P.id,Pt.layoutVertexBuffer,Pt.indexBuffer,Pt.segments,null,Y.transform.zoom,null,null,Pt.collisionVertexBuffer)}if(!H||!Ye.length)return;let Pe=Y.useProgram("collisionCircle"),Xe=new i.ca;Xe.resize(4*st),Xe._trim();let at=0;for(let Bt of Ye)for(let St=0;St=0&&(Xe[xt.associatedIconIndex]={shiftedAnchor:Lr,angle:an})}else Eo(xt.numGlyphs,dt)}if(Ae){Pe.clear();let at=Y.icon.placedSymbolArray;for(let xt=0;xtY.style.map.terrain.getElevation(Rr,Ta,vu):null,ql=P.layout.get("text-rotation-alignment")==="map";Jn(an,Y,H,Ki,no,Bt,Fe,ql,Rr.toUnwrapped(),xt.width,xt.height,Ia,Us)}let Ns=H&&Xr||Na,vo=St||Ns?hr:Bt?Ki:Y.transform.clipSpaceToPixelsMatrix,_o=Yn&&P.paint.get(H?"text-halo-width":"icon-halo-width").constantOr(1)!==0,po;po=Yn?an.iconsInText?Gl(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,jn,da,$r):Gd(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,H,jn,_o,$r):hh(yi.kind,li,Pt,Bt,St,Ns,Y,vo,ca,Ia,H,jn,$r);let Xo={program:An,buffers:on,uniformValues:po,projectionData:Os,atlasTexture:Wn,atlasTextureIcon:ui,atlasInterpolation:si,atlasInterpolationIcon:zi,isSDF:Yn,hasHalo:_o};if($t&&an.canOverlap){Ht=!0;let no=on.segments.get();for(let Us of no)Or.push({segments:new i.aV([Us]),sortKey:Us.sortKey,state:Xo,terrainData:Vn})}else Or.push({segments:on.segments,sortKey:0,state:Xo,terrainData:Vn})}Ht&&Or.sort(((Rr,Lr)=>Rr.sortKey-Lr.sortKey));let Er=(Pe=P.paint.get(H?"text-halo-width":"icon-halo-width").constantOr(null))!==null&&Pe!==void 0?Pe:1/0,Tr=P.layout.get("text-letter-spacing").constantOr(0)*i.aJ<0||Er>1;for(let Rr of Or){let Lr=Rr.state;Xe.activeTexture.set(at.TEXTURE0),Lr.atlasTexture.bind(Lr.atlasInterpolation,at.CLAMP_TO_EDGE),Lr.atlasTextureIcon&&(Xe.activeTexture.set(at.TEXTURE1),Lr.atlasTextureIcon&&Lr.atlasTextureIcon.bind(Lr.atlasInterpolationIcon,at.CLAMP_TO_EDGE));let an=Lr.isSDF&&Lr.hasHalo;if(an){let on=Lr.uniformValues;on.u_is_halo=1,Tr&&(on.u_is_plain=0,en(Lr.buffers,Rr.segments,P,Y,Lr.program,dr,Ie,Ye,on,Lr.projectionData,Rr.terrainData),on.u_is_halo=0,on.u_is_plain=1)}en(Lr.buffers,Rr.segments,P,Y,Lr.program,dr,Ie,Ye,Lr.uniformValues,Lr.projectionData,Rr.terrainData),an&&!Tr&&(Lr.uniformValues.u_is_halo=0)}}function en(Y,d,P,N,H,$,se,de,Ae,Fe,Ie){let Ye=N.context;H.draw(Ye,Ye.gl.TRIANGLES,$,se,de,Sa.backCCW,Ae,Ie,Fe,P.id,Y.layoutVertexBuffer,Y.indexBuffer,d,P.paint,N.transform.zoom,Y.programConfigurations.get(P.id),Y.dynamicLayoutVertexBuffer,Y.opacityVertexBuffer)}function vn(Y,d,P,N,H){let $=Y.context,se=$.gl,de=Ca.disabled,Ae=new Ja([se.ONE,se.ONE],i.bo.transparent,[!0,!0,!0,!0]),Fe=d.getBucket(P);if(!Fe)return;let Ie=N.key,Ye=P.heatmapFbos.get(Ie);Ye||(Ye=Pn($,d.tileSize,d.tileSize),P.heatmapFbos.set(Ie,Ye)),$.bindFramebuffer.set(Ye.framebuffer),$.viewport.set([0,0,d.tileSize,d.tileSize]),$.clear({color:i.bo.transparent});let st=Fe.programConfigurations.get(P.id),dt=Y.useProgram("heatmap",st,!H),Pe=Y.transform.getProjectionData({overscaledTileID:d.tileID,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Xe=Y.style.map.terrain.getTerrainData(N);dt.draw($,se.TRIANGLES,ma.disabled,de,Ae,Sa.disabled,pd(d,Y.transform.zoom,P.paint.get("heatmap-intensity"),1),Xe,Pe,P.id,Fe.layoutVertexBuffer,Fe.indexBuffer,Fe.segments,P.paint,Y.transform.zoom,st)}function mn(Y,d,P,N,H){let $=Y.context,se=$.gl,de=Y.transform;$.setColorMode(Y.colorModeForRenderPass());let Ae=On($,d),Fe=P.key,Ie=d.heatmapFbos.get(Fe);if(!Ie)return;$.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,Ie.colorAttachment.get()),$.activeTexture.set(se.TEXTURE1),Ae.bind(se.LINEAR,se.CLAMP_TO_EDGE);let Ye=de.getProjectionData({overscaledTileID:P,applyTerrainMatrix:H,applyGlobeMatrix:!N});Y.useProgram("heatmapTexture").draw($,se.TRIANGLES,ma.disabled,Ca.disabled,Y.colorModeForRenderPass(),Sa.disabled,lh(Y,d,0,1),null,Ye,d.id,Y.rasterBoundsBuffer,Y.quadTriangleIndexBuffer,Y.rasterBoundsSegments,d.paint,de.zoom),Ie.destroy(),d.heatmapFbos.delete(Fe)}function Pn(Y,d,P){var N,H;let $=Y.gl,se=$.createTexture();$.bindTexture($.TEXTURE_2D,se),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_S,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_WRAP_T,$.CLAMP_TO_EDGE),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MIN_FILTER,$.LINEAR),$.texParameteri($.TEXTURE_2D,$.TEXTURE_MAG_FILTER,$.LINEAR);let de=(N=Y.HALF_FLOAT)!==null&&N!==void 0?N:$.UNSIGNED_BYTE,Ae=(H=Y.RGBA16F)!==null&&H!==void 0?H:$.RGBA;$.texImage2D($.TEXTURE_2D,0,Ae,d,P,0,$.RGBA,de,null);let Fe=Y.createFramebuffer(d,P,!1,!1);return Fe.colorAttachment.set(se),Fe}function On(Y,d){return d.colorRampTexture||(d.colorRampTexture=new i.T(Y,d.colorRamp,Y.gl.RGBA)),d.colorRampTexture}function ki(Y,d,P,N,H,$,se,de){let Ae=256;if(H.stepInterpolant){let Fe=d.getSource().maxzoom,Ie=se.canonical.z===Fe?Math.ceil(1<Y.options.anisotropicFilterPitch&&dt.texParameterf(dt.TEXTURE_2D,st.extTextureFilterAnisotropic.TEXTURE_MAX_ANISOTROPY_EXT,st.extTextureFilterAnisotropicMax);let Rr=(Ie=Y.style.map.terrain)===null||Ie===void 0?void 0:Ie.getTerrainData(Ht),Lr=Xe.getProjectionData({overscaledTileID:Ht,aligned:Et,applyGlobeMatrix:!Fe,applyTerrainMatrix:!0}),an=fh(Er,$r,Tr.fadeMix,P,de),on=at.getMeshFromTileID(st,Ht.canonical,$,se,"raster");Pe.draw(st,dt.TRIANGLES,dr,H?H[Ht.overscaledZ]:Ca.disabled,xt,Ae?Sa.frontCCW:Sa.backCCW,an,Rr,Lr,P.id,on.vertexBuffer,on.indexBuffer,on.segments)}}function Js(Y,d,P,N){let H={parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:{tileOpacity:1,parentTileOpacity:1,fadeMix:{opacity:1,mix:0}}};if(P===0||N)return H;if(Y.fadingParentID){let $=d.getLoadedTile(Y.fadingParentID);if(!$)return H;let se=Math.pow(2,$.tileID.overscaledZ-Y.tileID.overscaledZ),de=[Y.tileID.canonical.x*se%1,Y.tileID.canonical.y*se%1],Ae=(function(Fe,Ie,Ye){let st=g(),dt=(st-Ie.timeAdded)/Ye,Pe=Fe.fadingDirection===We.Incoming,Xe=i.al((st-Fe.timeAdded)/Ye,0,1),at=i.al(1-dt,0,1),xt=Pe?Xe:at;return{tileOpacity:xt,parentTileOpacity:Pe?at:Xe,fadeMix:{opacity:1,mix:1-xt}}})(Y,$,P);return{parentTile:$,parentScaleBy:se,parentTopLeft:de,fadeValues:Ae}}if(Y.selfFading){let $=(function(se,de){let Ae=(g()-se.timeAdded)/de,Fe=i.al(Ae,0,1);return{tileOpacity:Fe,fadeMix:{opacity:Fe,mix:0}}})(Y,P);return{parentTile:null,parentScaleBy:1,parentTopLeft:[0,0],fadeValues:$}}return H}let fs=new i.bo(1,0,0,1),Io=new i.bo(0,1,0,1),oi=new i.bo(0,0,1,1),ro=new i.bo(1,0,1,1),Go=new i.bo(0,1,1,1);function Qs(Y,d,P,N){cu(Y,0,d+P/2,Y.transform.width,P,N)}function zl(Y,d,P,N){cu(Y,d-P/2,0,P,Y.transform.height,N)}function cu(Y,d,P,N,H,$){let se=Y.context,de=se.gl;de.enable(de.SCISSOR_TEST),de.scissor(d*Y.pixelRatio,P*Y.pixelRatio,N*Y.pixelRatio,H*Y.pixelRatio),se.clear({color:$}),de.disable(de.SCISSOR_TEST)}function Zu(Y,d,P){var N;let H=Y.context,$=H.gl,se=Y.useProgram("debug"),de=ma.disabled,Ae=Ca.disabled,Fe=Y.colorModeForRenderPass(),Ie="$debug",Ye=(N=Y.style.map.terrain)===null||N===void 0?void 0:N.getTerrainData(P);H.activeTexture.set($.TEXTURE0);let st=d.getTileByID(P.key).latestRawTileData,dt=Math.floor(((st==null?void 0:st.byteLength)||0)/1024),Pe=d.getTile(P).tileSize,Xe=512/Math.min(Pe,512)*(P.overscaledZ/Y.transform.zoom)*.5,at=P.canonical.toString();P.overscaledZ!==P.canonical.z&&(at+=` => ${P.overscaledZ}`),(function(Et,Bt){Et.initDebugOverlayCanvas();let St=Et.debugOverlayCanvas,Pt=Et.context.gl,$t=Et.debugOverlayCanvas.getContext("2d");$t.clearRect(0,0,St.width,St.height),$t.shadowColor="white",$t.shadowBlur=2,$t.lineWidth=1.5,$t.strokeStyle="white",$t.textBaseline="top",$t.font="bold 36px Open Sans, sans-serif",$t.fillText(Bt,5,5),$t.strokeText(Bt,5,5),Et.debugOverlayTexture.update(St),Et.debugOverlayTexture.bind(Pt.LINEAR,Pt.CLAMP_TO_EDGE)})(Y,`${at} ${dt}kB`);let xt=Y.transform.getProjectionData({overscaledTileID:P,applyGlobeMatrix:!0,applyTerrainMatrix:!0});se.draw(H,$.TRIANGLES,de,Ae,Ja.alphaBlended,Sa.disabled,vd(i.bo.transparent,Xe),null,xt,Ie,Y.debugBuffer,Y.quadTriangleIndexBuffer,Y.debugSegments),se.draw(H,$.LINE_STRIP,de,Ae,Fe,Sa.disabled,vd(i.bo.red),Ye,xt,Ie,Y.debugBuffer,Y.tileBorderIndexBuffer,Y.debugSegments)}function mc(Y,d,P,N){let{isRenderingGlobe:H}=N,$=Y.context,se=$.gl,de=Y.transform,Ae=Y.colorModeForRenderPass(),Fe=Y.getDepthModeFor3D(),Ie=Y.useProgram("terrain");$.bindFramebuffer.set(null),$.viewport.set([0,0,Y.width,Y.height]);for(let Ye of P){let st=d.getTerrainMesh(Ye.tileID),dt=Y.renderToTexture.getTexture(Ye),Pe=d.getTerrainData(Ye.tileID);$.activeTexture.set(se.TEXTURE0),se.bindTexture(se.TEXTURE_2D,dt.texture);let Xe=d.getMeshFrameDelta(de.zoom),at=de.calculateFogMatrix(Ye.tileID.toUnwrapped()),xt=Nd(Xe,at,Y.style.sky,de.pitch,H),Et=de.getProjectionData({overscaledTileID:Ye.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Ie.draw($,se.TRIANGLES,Fe,Ca.disabled,Ae,Sa.backCCW,xt,Pe,Et,"terrain",st.vertexBuffer,st.indexBuffer,st.segments)}}function Yl(Y,d){if(!d.mesh){let P=new i.aU;P.emplaceBack(-1,-1),P.emplaceBack(1,-1),P.emplaceBack(1,1),P.emplaceBack(-1,1);let N=new i.aW;N.emplaceBack(0,1,2),N.emplaceBack(0,2,3),d.mesh=new ka(Y.createVertexBuffer(P,vs.members),Y.createIndexBuffer(N),i.aV.simpleSegment(0,0,P.length,N.length))}return d.mesh}let lf={symbol:function(Y,d,P,N,H,$){if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=$,de=Ca.disabled,Ae=Y.colorModeForRenderPass();(P._unevaluatedLayout.hasValue("text-variable-anchor")||P._unevaluatedLayout.hasValue("text-variable-anchor-offset"))&&(function(Fe,Ie,Ye,st,dt,Pe,Xe,at,xt){var Et;let Bt=Ie.transform,St=Ie.style.map.terrain,Pt=dt==="map",$t=Pe==="map";for(let Ht of Fe){let dr=st.getTile(Ht),Xr=dr.getBucket(Ye);if(!(!((Et=Xr==null?void 0:Xr.text)===null||Et===void 0)&&Et.segments.get().length))continue;let Or=i.aw(Xr.textSizeData,Bt.zoom),$r=i.aK(dr,1,Ie.transform.zoom),Er=Ut(Pt,Ie.transform,$r),Tr=Ye.layout.get("icon-text-fit")!=="none"&&Xr.hasIconData();if(Or){let Rr=Math.pow(2,Bt.zoom-dr.tileID.overscaledZ),Lr=St?(an,on)=>St.getElevation(Ht,an,on):null;cn(Xr,Pt,$t,xt,Bt,Er,Rr,Or,Tr,i.aL(Bt,dr,Xe,at),Ht.toUnwrapped(),Lr)}}})(N,Y,P,d,P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),H),P.paint.get("icon-opacity").constantOr(1)!==0&&Fn(Y,d,P,N,!1,P.paint.get("icon-translate"),P.paint.get("icon-translate-anchor"),P.layout.get("icon-rotation-alignment"),P.layout.get("icon-pitch-alignment"),P.layout.get("icon-keep-upright"),de,Ae,se),P.paint.get("text-opacity").constantOr(1)!==0&&Fn(Y,d,P,N,!0,P.paint.get("text-translate"),P.paint.get("text-translate-anchor"),P.layout.get("text-rotation-alignment"),P.layout.get("text-pitch-alignment"),P.layout.get("text-keep-upright"),de,Ae,se),d.map.showCollisionBoxes&&(zt(Y,d,P,N,!0),zt(Y,d,P,N,!1))},circle:function(Y,d,P,N,H){var $;if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=H,de=P.paint.get("circle-opacity"),Ae=P.paint.get("circle-stroke-width"),Fe=P.paint.get("circle-stroke-opacity"),Ie=!P.layout.get("circle-sort-key").isConstant();if(de.constantOr(1)===0&&(Ae.constantOr(1)===0||Fe.constantOr(1)===0))return;let Ye=Y.context,st=Ye.gl,dt=Y.transform,Pe=Y.getDepthModeForSublayer(0,ma.ReadOnly),Xe=Ca.disabled,at=Y.colorModeForRenderPass(),xt=[],Et=dt.getCircleRadiusCorrection();for(let Bt of N){let St=d.getTile(Bt),Pt=St.getBucket(P);if(!Pt)continue;let $t=P.paint.get("circle-translate"),Ht=P.paint.get("circle-translate-anchor"),dr=i.aL(dt,St,$t,Ht),Xr=Pt.programConfigurations.get(P.id),Or=Y.useProgram("circle",Xr),$r=Pt.layoutVertexBuffer,Er=Pt.indexBuffer,Tr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Bt),Rr={programConfiguration:Xr,program:Or,layoutVertexBuffer:$r,indexBuffer:Er,uniformValues:dd(Y,St,P,dr,Et),terrainData:Tr,projectionData:dt.getProjectionData({overscaledTileID:Bt,applyGlobeMatrix:!se,applyTerrainMatrix:!0})};if(Ie){let Lr=Pt.segments.get();for(let an of Lr)xt.push({segments:new i.aV([an]),sortKey:an.sortKey,state:Rr})}else xt.push({segments:Pt.segments,sortKey:0,state:Rr})}Ie&&xt.sort(((Bt,St)=>Bt.sortKey-St.sortKey));for(let Bt of xt){let{programConfiguration:St,program:Pt,layoutVertexBuffer:$t,indexBuffer:Ht,uniformValues:dr,terrainData:Xr,projectionData:Or}=Bt.state;Pt.draw(Ye,st.TRIANGLES,Pe,Xe,at,Sa.backCCW,dr,Xr,Or,P.id,$t,Ht,Bt.segments,P.paint,Y.transform.zoom,St)}},heatmap:function(Y,d,P,N,H){if(P.paint.get("heatmap-opacity")===0)return;let $=Y.context,{isRenderingToTexture:se,isRenderingGlobe:de}=H;if(Y.style.map.terrain){for(let Ae of N){let Fe=d.getTile(Ae);d.hasRenderableParent(Ae)||(Y.renderPass==="offscreen"?vn(Y,Fe,P,Ae,de):Y.renderPass==="translucent"&&mn(Y,P,Ae,se,de))}$.viewport.set([0,0,Y.width,Y.height])}else Y.renderPass==="offscreen"?(function(Ae,Fe,Ie,Ye){let st=Ae.context,dt=st.gl,Pe=Ae.transform,Xe=Ca.disabled,at=new Ja([dt.ONE,dt.ONE],i.bo.transparent,[!0,!0,!0,!0]);(function(xt,Et,Bt){let St=xt.gl;xt.activeTexture.set(St.TEXTURE1),xt.viewport.set([0,0,Et.width/4,Et.height/4]);let Pt=Bt.heatmapFbos.get(i.cd);Pt?(St.bindTexture(St.TEXTURE_2D,Pt.colorAttachment.get()),xt.bindFramebuffer.set(Pt.framebuffer)):(Pt=Pn(xt,Et.width/4,Et.height/4),Bt.heatmapFbos.set(i.cd,Pt))})(st,Ae,Ie),st.clear({color:i.bo.transparent});for(let xt of Ye){if(Fe.hasRenderableParent(xt))continue;let Et=Fe.getTile(xt),Bt=Et.getBucket(Ie);if(!Bt)continue;let St=Bt.programConfigurations.get(Ie.id),Pt=Ae.useProgram("heatmap",St),$t=Pe.getProjectionData({overscaledTileID:xt,applyGlobeMatrix:!0,applyTerrainMatrix:!1}),Ht=Pe.getCircleRadiusCorrection();Pt.draw(st,dt.TRIANGLES,ma.disabled,Xe,at,Sa.backCCW,pd(Et,Pe.zoom,Ie.paint.get("heatmap-intensity"),Ht),null,$t,Ie.id,Bt.layoutVertexBuffer,Bt.indexBuffer,Bt.segments,Ie.paint,Pe.zoom,St)}st.viewport.set([0,0,Ae.width,Ae.height])})(Y,d,P,N):Y.renderPass==="translucent"&&(function(Ae,Fe){let Ie=Ae.context,Ye=Ie.gl;Ie.setColorMode(Ae.colorModeForRenderPass());let st=Fe.heatmapFbos.get(i.cd);st&&(Ie.activeTexture.set(Ye.TEXTURE0),Ye.bindTexture(Ye.TEXTURE_2D,st.colorAttachment.get()),Ie.activeTexture.set(Ye.TEXTURE1),On(Ie,Fe).bind(Ye.LINEAR,Ye.CLAMP_TO_EDGE),Ae.useProgram("heatmapTexture").draw(Ie,Ye.TRIANGLES,ma.disabled,Ca.disabled,Ae.colorModeForRenderPass(),Sa.disabled,lh(Ae,Fe,0,1),null,null,Fe.id,Ae.viewportBuffer,Ae.quadTriangleIndexBuffer,Ae.viewportSegments,Fe.paint,Ae.transform.zoom))})(Y,P)},line:function(Y,d,P,N,H){var $;if(Y.renderPass!=="translucent")return;let{isRenderingToTexture:se}=H,de=P.paint.get("line-opacity"),Ae=P.paint.get("line-width");if(de.constantOr(1)===0||Ae.constantOr(1)===0)return;let Fe=Y.getDepthModeForSublayer(0,ma.ReadOnly),Ie=Y.colorModeForRenderPass(),Ye=P.paint.get("line-dasharray"),st=Ye.constantOr(1),dt=P.paint.get("line-pattern"),Pe=dt.constantOr(1),Xe=P.paint.get("line-gradient"),at=P.getCrossfadeParameters(),xt;xt=Pe?"linePattern":st&&Xe?"lineGradientSDF":st?"lineSDF":Xe?"lineGradient":"line";let Et=Y.context,Bt=Et.gl,St=Y.transform,Pt=!0;for(let $t of N){let Ht=d.getTile($t);if(Pe&&!Ht.patternsLoaded())continue;let dr=Ht.getBucket(P);if(!dr)continue;let Xr=dr.programConfigurations.get(P.id),Or=Y.context.program.get(),$r=Y.useProgram(xt,Xr),Er=Pt||$r.program!==Or,Tr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData($t),Rr=dt.constantOr(null),Lr=Ye==null?void 0:Ye.constantOr(null);if(Rr&&Ht.imageAtlas){let yi=Ht.imageAtlas,Sn=yi.patternPositions[Rr.to.toString()],An=yi.patternPositions[Rr.from.toString()];Sn&&An&&Xr.setConstantPatternPositions(Sn,An)}else if(Lr){let yi=P.layout.get("line-cap").constantOr(null)==="round",Sn=Y.lineAtlas.getDash(Lr.to,yi),An=Y.lineAtlas.getDash(Lr.from,yi);Xr.setConstantDashPositions(Sn,An)}let an=St.getProjectionData({overscaledTileID:$t,applyGlobeMatrix:!se,applyTerrainMatrix:!0}),on=St.getPixelScale(),Nn;Pe?(Nn=Lc(Y,Ht,P,on,at),Ci(Et,Bt,Ht,Xr,at)):st&&Xe?(Nn=yd(Y,Ht,P,on,at,dr.lineClipsArray.length),Un(Y,d,Et,Bt,P,dr,$t,Xr,at)):st?(Nn=md(Y,Ht,P,on,at),qi(Y,Et,Bt,Xr,Er,at)):Xe?(Nn=ch(Y,Ht,P,on,dr.lineClipsArray.length),pi(Y,d,Et,Bt,P,dr,$t)):Nn=Rl(Y,Ht,P,on);let Yn=Y.stencilModeForClipping($t);$r.draw(Et,Bt.TRIANGLES,Fe,Yn,Ie,Sa.disabled,Nn,Tr,an,P.id,dr.layoutVertexBuffer,dr.indexBuffer,dr.segments,P.paint,Y.transform.zoom,Xr,dr.layoutVertexBuffer2),Pt=!1}},fill:function(Y,d,P,N,H){let $=P.paint.get("fill-color"),se=P.paint.get("fill-opacity");if(se.constantOr(1)===0)return;let{isRenderingToTexture:de}=H,Ae=Y.colorModeForRenderPass(),Fe=P.paint.get("fill-pattern"),Ie=Y.opaquePassEnabledForLayer()&&!Fe.constantOr(1)&&$.constantOr(i.bo.transparent).a===1&&se.constantOr(0)===1?"opaque":"translucent";if(Y.renderPass===Ie){let Ye=Y.getDepthModeForSublayer(1,Y.renderPass==="opaque"?ma.ReadWrite:ma.ReadOnly);Zi(Y,d,P,N,Ye,Ae,!1,de)}if(Y.renderPass==="translucent"&&P.paint.get("fill-antialias")){let Ye=Y.getDepthModeForSublayer(P.getPaintProperty("fill-outline-color")?2:0,ma.ReadOnly);Zi(Y,d,P,N,Ye,Ae,!0,de)}},fillExtrusion:function(Y,d,P,N,H){let $=P.paint.get("fill-extrusion-opacity");if($===0)return;let{isRenderingToTexture:se}=H;if(Y.renderPass==="translucent"){let de=new ma(Y.context.gl.LEQUAL,ma.ReadWrite,Y.depthRangeFor3D);if($!==1||P.paint.get("fill-extrusion-pattern").constantOr(1))na(Y,d,P,N,de,Ca.disabled,Ja.disabled,se),na(Y,d,P,N,de,Y.stencilModeFor3D(),Y.colorModeForRenderPass(),se);else{let Ae=Y.colorModeForRenderPass();na(Y,d,P,N,de,Ca.disabled,Ae,se)}}},hillshade:function(Y,d,P,N,H){if(Y.renderPass!=="offscreen"&&Y.renderPass!=="translucent")return;let{isRenderingToTexture:$}=H,se=Y.context,de=Y.style.projection.useSubdivision,Ae=Y.getDepthModeForSublayer(0,ma.ReadOnly),Fe=Y.colorModeForRenderPass();if(Y.renderPass==="offscreen")(function(Ie,Ye,st,dt,Pe,Xe,at){let xt=Ie.context,Et=xt.gl,Bt=dt.paint.get("resampling")==="nearest"?Et.NEAREST:Et.LINEAR;for(let St of st){let Pt=Ye.getTile(St),$t=Pt.dem;if(!($t!=null&&$t.data)||!Pt.needsHillshadePrepare)continue;let Ht=$t.dim,dr=$t.stride,Xr=$t.getPixels();if(xt.activeTexture.set(Et.TEXTURE1),xt.pixelStoreUnpackPremultiplyAlpha.set(!1),Pt.demTexture||(Pt.demTexture=Ie.getTileTexture(dr)),Pt.demTexture){let $r=Pt.demTexture;$r.update(Xr,{premultiply:!1}),$r.bind(Et.NEAREST,Et.CLAMP_TO_EDGE)}else Pt.demTexture=new i.T(xt,Xr,Et.RGBA,{premultiply:!1}),Pt.demTexture.bind(Et.NEAREST,Et.CLAMP_TO_EDGE);xt.activeTexture.set(Et.TEXTURE0);let Or=Pt.fbo;if(!Or){let $r=new i.T(xt,{width:Ht,height:Ht,data:null},Et.RGBA);$r.bind(Bt,Et.CLAMP_TO_EDGE),Or=Pt.fbo=xt.createFramebuffer(Ht,Ht,!0,!1),Or.colorAttachment.set($r.texture)}xt.bindFramebuffer.set(Or.framebuffer),xt.viewport.set([0,0,Ht,Ht]),Ie.useProgram("hillshadePrepare").draw(xt,Et.TRIANGLES,Pe,Xe,at,Sa.disabled,uh(Pt.tileID,$t),null,null,dt.id,Ie.rasterBoundsBuffer,Ie.quadTriangleIndexBuffer,Ie.rasterBoundsSegments),Pt.needsHillshadePrepare=!1}})(Y,d,N,P,Ae,Ca.disabled,Fe),se.viewport.set([0,0,Y.width,Y.height]);else if(Y.renderPass==="translucent")if(de){let[Ie,Ye,st]=Y.stencilConfigForOverlapTwoPass(N);Ha(Y,d,P,st,Ie,Ae,Fe,!1,$),Ha(Y,d,P,st,Ye,Ae,Fe,!0,$)}else{let[Ie,Ye]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Ha(Y,d,P,Ye,Ie,Ae,Fe,!1,$)}},colorRelief:function(Y,d,P,N,H){if(Y.renderPass!=="translucent"||!N.length)return;let{isRenderingToTexture:$}=H,se=Y.style.projection.useSubdivision,de=Y.getDepthModeForSublayer(0,ma.ReadOnly),Ae=Y.colorModeForRenderPass();if(se){let[Fe,Ie,Ye]=Y.stencilConfigForOverlapTwoPass(N);Ya(Y,d,P,Ye,Fe,de,Ae,!1,$),Ya(Y,d,P,Ye,Ie,de,Ae,!0,$)}else{let[Fe,Ie]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Ya(Y,d,P,Ie,Fe,de,Ae,!1,$)}},raster:function(Y,d,P,N,H){if(Y.renderPass!=="translucent"||P.paint.get("raster-opacity")===0||!N.length)return;let{isRenderingToTexture:$}=H,se=d.getSource(),de=Y.style.projection.useSubdivision;if(se instanceof qe)Pa(Y,d,P,N,null,!1,!1,se.tileCoords,se.flippedWindingOrder,$);else if(de){let[Ae,Fe,Ie]=Y.stencilConfigForOverlapTwoPass(N);Pa(Y,d,P,Ie,Ae,!1,!0,ho,!1,$),Pa(Y,d,P,Ie,Fe,!0,!0,ho,!1,$)}else{let[Ae,Fe]=Y.getStencilConfigForOverlapAndUpdateStencilID(N);Pa(Y,d,P,Fe,Ae,!1,!0,ho,!1,$)}},background:function(Y,d,P,N,H){var $;let se=P.paint.get("background-color"),de=P.paint.get("background-opacity");if(de===0)return;let{isRenderingToTexture:Ae}=H,Fe=Y.context,Ie=Fe.gl,Ye=Y.style.projection,st=Y.transform,dt=st.tileSize,Pe=P.paint.get("background-pattern");if(Y.isPatternMissing(Pe))return;let Xe=!Pe&&se.a===1&&de===1&&Y.opaquePassEnabledForLayer()?"opaque":"translucent";if(Y.renderPass!==Xe)return;let at=Ca.disabled,xt=Y.getDepthModeForSublayer(0,Xe==="opaque"?ma.ReadWrite:ma.ReadOnly),Et=Y.colorModeForRenderPass(),Bt=Y.useProgram(Pe?"backgroundPattern":"background"),St=N||ft(st,{tileSize:dt,terrain:Y.style.map.terrain});Pe&&(Fe.activeTexture.set(Ie.TEXTURE0),Y.imageManager.bind(Y.context));let Pt=P.getCrossfadeParameters();for(let $t of St){let Ht=st.getProjectionData({overscaledTileID:$t,applyGlobeMatrix:!Ae,applyTerrainMatrix:!0}),dr=Pe?xd(de,Y,Pe,{tileID:$t,tileSize:dt},Pt):wl(de,se),Xr=($=Y.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData($t),Or=Ye.getMeshFromTileID(Fe,$t.canonical,!1,!0,"raster");Bt.draw(Fe,Ie.TRIANGLES,xt,at,Et,Sa.backCCW,dr,Xr,Ht,P.id,Or.vertexBuffer,Or.indexBuffer,Or.segments)}},sky:function(Y,d){let P=Y.context,N=P.gl,H=((Ie,Ye,st)=>{let dt=Math.cos(Ye.rollInRadians),Pe=Math.sin(Ye.rollInRadians),Xe=or(Ye),at=Ye.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}).projectionTransition;return{u_sky_color:Ie.properties.get("sky-color"),u_horizon_color:Ie.properties.get("horizon-color"),u_horizon:[(Ye.width/2-Xe*Pe)*st,(Ye.height/2+Xe*dt)*st],u_horizon_normal:[-Pe,dt],u_sky_horizon_blend:Ie.properties.get("sky-horizon-blend")*Ye.height/2*st,u_sky_blend:at}})(d,Y.style.map.transform,Y.pixelRatio),$=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),se=Ca.disabled,de=Y.colorModeForRenderPass(),Ae=Y.useProgram("sky"),Fe=Yl(P,d);Ae.draw(P,N.TRIANGLES,$,se,de,Sa.disabled,H,null,void 0,"sky",Fe.vertexBuffer,Fe.indexBuffer,Fe.segments)},atmosphere:function(Y,d,P){let N=Y.context,H=N.gl,$=Y.useProgram("atmosphere"),se=new ma(H.LEQUAL,ma.ReadOnly,[0,1]),de=Y.transform,Ae=(function(at,xt){let Et=at.properties.get("position"),Bt=[-Et.x,-Et.y,-Et.z],St=i.ap(new Float64Array(16));return at.properties.get("anchor")==="map"&&(i.be(St,St,xt.rollInRadians),i.bf(St,St,-xt.pitchInRadians),i.be(St,St,xt.bearingInRadians),i.bf(St,St,xt.center.lat*Math.PI/180),i.bI(St,St,-xt.center.lng*Math.PI/180)),i.cg(Bt,Bt,St),Bt})(P,Y.transform),Fe=de.getProjectionData({overscaledTileID:null,applyGlobeMatrix:!0,applyTerrainMatrix:!0}),Ie=d.properties.get("atmosphere-blend")*Fe.projectionTransition;if(Ie===0)return;let Ye=Ks(de.worldSize,de.center.lat),st=de.inverseProjectionMatrix,dt=new Float64Array(4);dt[3]=1,i.aE(dt,dt,de.modelViewProjectionMatrix),dt[0]/=dt[3],dt[1]/=dt[3],dt[2]/=dt[3],dt[3]=1,i.aE(dt,dt,st),dt[0]/=dt[3],dt[1]/=dt[3],dt[2]/=dt[3],dt[3]=1;let Pe=((at,xt,Et,Bt,St)=>({u_sun_pos:at,u_atmosphere_blend:xt,u_globe_position:Et,u_globe_radius:Bt,u_inv_proj_matrix:St}))(Ae,Ie,[dt[0],dt[1],dt[2]],Ye,st),Xe=Yl(N,d);$.draw(N,H.TRIANGLES,se,Ca.disabled,Ja.alphaBlended,Sa.disabled,Pe,null,null,"atmosphere",Xe.vertexBuffer,Xe.indexBuffer,Xe.segments)},custom:function(Y,d,P,N){let{isRenderingGlobe:H}=N,$=Y.context,se=P.implementation,de=Y.style.projection,Ae=Y.transform,Fe=Ae.getProjectionDataForCustomLayer(H),Ie={farZ:Ae.farZ,nearZ:Ae.nearZ,fov:Ae.fov*Math.PI/180,modelViewProjectionMatrix:Ae.modelViewProjectionMatrix,projectionMatrix:Ae.projectionMatrix,shaderData:{variantName:de.shaderVariantName,vertexShaderPrelude:`const float PI = 3.141592653589793; uniform mat4 u_projection_matrix; ${de.shaderPreludeCode.vertexSource}`,define:de.shaderDefine},defaultProjectionData:Fe},Ye=se.renderingMode?se.renderingMode:"2d";if(Y.renderPass==="offscreen"){let st=se.prerender;st&&(Y.setCustomLayerDefaults(),$.setColorMode(Y.colorModeForRenderPass()),st.call(se,$.gl,Ie),$.setDirty(),Y.setBaseState())}else if(Y.renderPass==="translucent"){Y.setCustomLayerDefaults(),$.setColorMode(Y.colorModeForRenderPass()),$.setStencilMode(Ca.disabled);let st=Ye==="3d"?Y.getDepthModeFor3D():Y.getDepthModeForSublayer(0,ma.ReadOnly);$.setDepthMode(st),se.render($.gl,Ie),$.setDirty(),Y.setBaseState(),$.bindFramebuffer.set(null)}},debug:function(Y,d,P){for(let N of P)Zu(Y,d,N)},debugPadding:function(Y){let d=Y.transform.padding;Qs(Y,Y.transform.height-(d.top||0),3,fs),Qs(Y,d.bottom||0,3,Io),zl(Y,d.left||0,3,oi),zl(Y,Y.transform.width-(d.right||0),3,ro);let P=Y.transform.centerPoint;(function(N,H,$,se){cu(N,H-1,$-10,2,20,se),cu(N,H-10,$-1,20,2,se)})(Y,P.x,Y.transform.height-P.y,Go)},terrainDepth:function(Y,d){let P=Y.context,N=P.gl,H=Y.transform,$=Ja.unblended,se=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),de=d.tileManager.getRenderableTiles(),Ae=Y.useProgram("terrainDepth");P.bindFramebuffer.set(d.getFramebuffer("depth").framebuffer),P.viewport.set([0,0,Y.width/devicePixelRatio,Y.height/devicePixelRatio]),P.clear({color:i.bo.transparent,depth:1});for(let Fe of de){let Ie=d.getTerrainMesh(Fe.tileID),Ye=d.getTerrainData(Fe.tileID),st=H.getProjectionData({overscaledTileID:Fe.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0}),dt={u_ele_delta:d.getMeshFrameDelta(H.zoom)};Ae.draw(P,N.TRIANGLES,se,Ca.disabled,$,Sa.backCCW,dt,Ye,st,"terrain",Ie.vertexBuffer,Ie.indexBuffer,Ie.segments)}P.bindFramebuffer.set(null),P.viewport.set([0,0,Y.width,Y.height])},terrainCoords:function(Y,d){let P=Y.context,N=P.gl,H=Y.transform,$=Ja.unblended,se=new ma(N.LEQUAL,ma.ReadWrite,[0,1]),de=d.getCoordsTexture(),Ae=d.tileManager.getRenderableTiles(),Fe=Y.useProgram("terrainCoords");P.bindFramebuffer.set(d.getFramebuffer("coords").framebuffer),P.viewport.set([0,0,Y.width/devicePixelRatio,Y.height/devicePixelRatio]),P.clear({color:i.bo.transparent,depth:1}),d.coordsIndex=[];for(let Ie of Ae){let Ye=d.getTerrainMesh(Ie.tileID),st=d.getTerrainData(Ie.tileID);P.activeTexture.set(N.TEXTURE0),N.bindTexture(N.TEXTURE_2D,de.texture);let dt={u_terrain_coords_id:(255-d.coordsIndex.length)/255,u_texture:0,u_ele_delta:d.getMeshFrameDelta(H.zoom)},Pe=H.getProjectionData({overscaledTileID:Ie.tileID,applyTerrainMatrix:!1,applyGlobeMatrix:!0});Fe.draw(P,N.TRIANGLES,se,Ca.disabled,$,Sa.backCCW,dt,st,Pe,"terrain",Ye.vertexBuffer,Ye.indexBuffer,Ye.segments),d.coordsIndex.push(Ie.tileID.key)}P.bindFramebuffer.set(null),P.viewport.set([0,0,Y.width,Y.height])}};class $u{constructor(d,P){this.drawFunctions=lf,this.context=new yt(d),this.transform=P,this._tileTextures={},this.terrainFacilitator={depthDirty:!0,coordsDirty:!1,matrix:i.ap(new Float64Array(16)),renderTime:0},this.setup(),this.numSublayers=Zr.maxOverzooming+Zr.maxUnderzooming+1,this.depthEpsilon=1/Math.pow(2,16),this.crossTileSymbolIndex=new $a}resize(d,P,N){if(this.width=Math.floor(d*N),this.height=Math.floor(P*N),this.pixelRatio=N,this.context.viewport.set([0,0,this.width,this.height]),this.style)for(let H of this.style._order)this.style._layers[H].resize()}setup(){let d=this.context,P=new i.aU;P.emplaceBack(0,0),P.emplaceBack(i.a6,0),P.emplaceBack(0,i.a6),P.emplaceBack(i.a6,i.a6),this.tileExtentBuffer=d.createVertexBuffer(P,vs.members),this.tileExtentSegments=i.aV.simpleSegment(0,0,4,2);let N=new i.aU;N.emplaceBack(0,0),N.emplaceBack(i.a6,0),N.emplaceBack(0,i.a6),N.emplaceBack(i.a6,i.a6),this.debugBuffer=d.createVertexBuffer(N,vs.members),this.debugSegments=i.aV.simpleSegment(0,0,4,5);let H=new i.ch;H.emplaceBack(0,0,0,0),H.emplaceBack(i.a6,0,i.a6,0),H.emplaceBack(0,i.a6,0,i.a6),H.emplaceBack(i.a6,i.a6,i.a6,i.a6),this.rasterBoundsBuffer=d.createVertexBuffer(H,sh.members),this.rasterBoundsSegments=i.aV.simpleSegment(0,0,4,2);let $=new i.aU;$.emplaceBack(0,0),$.emplaceBack(i.a6,0),$.emplaceBack(0,i.a6),$.emplaceBack(i.a6,i.a6),this.rasterBoundsBufferPosOnly=d.createVertexBuffer($,vs.members),this.rasterBoundsSegmentsPosOnly=i.aV.simpleSegment(0,0,4,5);let se=new i.aU;se.emplaceBack(0,0),se.emplaceBack(1,0),se.emplaceBack(0,1),se.emplaceBack(1,1),this.viewportBuffer=d.createVertexBuffer(se,vs.members),this.viewportSegments=i.aV.simpleSegment(0,0,4,2);let de=new i.ci;de.emplaceBack(0),de.emplaceBack(1),de.emplaceBack(3),de.emplaceBack(2),de.emplaceBack(0),this.tileBorderIndexBuffer=d.createIndexBuffer(de);let Ae=new i.aW;Ae.emplaceBack(1,0,2),Ae.emplaceBack(1,2,3),this.quadTriangleIndexBuffer=d.createIndexBuffer(Ae);let Fe=this.context.gl;this.stencilClearMode=new Ca({func:Fe.ALWAYS,mask:0},0,255,Fe.ZERO,Fe.ZERO,Fe.ZERO),this.tileExtentMesh=new ka(this.tileExtentBuffer,this.quadTriangleIndexBuffer,this.tileExtentSegments)}clearStencil(){let d=this.context,P=d.gl;this.nextStencilID=1,this.currentStencilSource=void 0;let N=i.O();i.c7(N,0,this.width,this.height,0,0,1),i.S(N,N,[P.drawingBufferWidth,P.drawingBufferHeight,0]);let H={mainMatrix:N,tileMercatorCoords:[0,0,1,1],clippingPlane:[0,0,0,0],projectionTransition:0,fallbackMatrix:N};this.useProgram("clippingMask",null,!0).draw(d,P.TRIANGLES,ma.disabled,this.stencilClearMode,Ja.disabled,Sa.disabled,null,null,H,"$clipping",this.viewportBuffer,this.quadTriangleIndexBuffer,this.viewportSegments)}_renderTileClippingMasks(d,P,N){if(this.currentStencilSource===d.source||!d.isTileClipped()||!(P!=null&&P.length))return;this.currentStencilSource=d.source,this.nextStencilID+P.length>256&&this.clearStencil();let H=this.context;H.setColorMode(Ja.disabled),H.setDepthMode(ma.disabled);let $={};for(let se of P)$[se.key]=this.nextStencilID++;this._renderTileMasks($,P,N,!0),this._renderTileMasks($,P,N,!1),this._tileClippingMaskIDs=$}_renderTileMasks(d,P,N,H){var $;let se=this.context,de=se.gl,Ae=this.style.projection,Fe=this.transform,Ie=this.useProgram("clippingMask");for(let Ye of P){let st=d[Ye.key],dt=($=this.style.map.terrain)===null||$===void 0?void 0:$.getTerrainData(Ye),Pe=Ae.getMeshFromTileID(this.context,Ye.canonical,H,!0,"stencil"),Xe=Fe.getProjectionData({overscaledTileID:Ye,applyGlobeMatrix:!N,applyTerrainMatrix:!0});Ie.draw(se,de.TRIANGLES,ma.disabled,new Ca({func:de.ALWAYS,mask:0},st,255,de.KEEP,de.KEEP,de.REPLACE),Ja.disabled,N?Sa.disabled:Sa.backCCW,null,dt,Xe,"$clipping",Pe.vertexBuffer,Pe.indexBuffer,Pe.segments)}}_renderTilesDepthBuffer(){var d;let P=this.context,N=P.gl,H=this.style.projection,$=this.transform,se=this.useProgram("depth"),de=this.getDepthModeFor3D(),Ae=ft($,{tileSize:$.tileSize});for(let Fe of Ae){let Ie=(d=this.style.map.terrain)===null||d===void 0?void 0:d.getTerrainData(Fe),Ye=H.getMeshFromTileID(this.context,Fe.canonical,!0,!0,"raster"),st=$.getProjectionData({overscaledTileID:Fe,applyGlobeMatrix:!0,applyTerrainMatrix:!0});se.draw(P,N.TRIANGLES,de,Ca.disabled,Ja.disabled,Sa.backCCW,null,Ie,st,"$clipping",Ye.vertexBuffer,Ye.indexBuffer,Ye.segments)}}stencilModeFor3D(){this.currentStencilSource=void 0,this.nextStencilID+1>256&&this.clearStencil();let d=this.nextStencilID++,P=this.context.gl;return new Ca({func:P.NOTEQUAL,mask:255},d,255,P.KEEP,P.KEEP,P.REPLACE)}stencilModeForClipping(d){let P=this.context.gl;return new Ca({func:P.EQUAL,mask:255},this._tileClippingMaskIDs[d.key],0,P.KEEP,P.KEEP,P.REPLACE)}getStencilConfigForOverlapAndUpdateStencilID(d){let P=this.context.gl,N=d.sort(((se,de)=>de.overscaledZ-se.overscaledZ)),H=N[N.length-1].overscaledZ,$=N[0].overscaledZ-H+1;if($>1){this.currentStencilSource=void 0,this.nextStencilID+$>256&&this.clearStencil();let se={};for(let de=0;de<$;de++)se[de+H]=new Ca({func:P.GEQUAL,mask:255},de+this.nextStencilID,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID+=$,[se,N]}return[{[H]:Ca.disabled},N]}stencilConfigForOverlapTwoPass(d){let P=this.context.gl,N=d.sort(((se,de)=>de.overscaledZ-se.overscaledZ)),H=N[N.length-1].overscaledZ,$=N[0].overscaledZ-H+1;if(this.clearStencil(),$>1){let se={},de={};for(let Ae=0;Ae<$;Ae++)se[Ae+H]=new Ca({func:P.GREATER,mask:255},$+1+Ae,255,P.KEEP,P.KEEP,P.REPLACE),de[Ae+H]=new Ca({func:P.GREATER,mask:255},1+Ae,255,P.KEEP,P.KEEP,P.REPLACE);return this.nextStencilID=2*$+1,[se,de,N]}return this.nextStencilID=3,[{[H]:new Ca({func:P.GREATER,mask:255},2,255,P.KEEP,P.KEEP,P.REPLACE)},{[H]:new Ca({func:P.GREATER,mask:255},1,255,P.KEEP,P.KEEP,P.REPLACE)},N]}colorModeForRenderPass(){let d=this.context.gl;return this._showOverdrawInspector?new Ja([d.CONSTANT_COLOR,d.ONE],new i.bo(.125,.125,.125,0),[!0,!0,!0,!0]):this.renderPass==="opaque"?Ja.unblended:Ja.alphaBlended}getDepthModeForSublayer(d,P,N){if(!this.opaquePassEnabledForLayer())return ma.disabled;let H=1-((1+this.currentLayer)*this.numSublayers+d)*this.depthEpsilon;return new ma(N||this.context.gl.LEQUAL,P,[H,H])}getDepthModeFor3D(){return new ma(this.context.gl.LEQUAL,ma.ReadWrite,this.depthRangeFor3D)}opaquePassEnabledForLayer(){return this.currentLayer0};for(let dt in de){let Pe=de[dt];Pe.used&&Pe.prepare(this.context),Ae[dt]=Pe.getVisibleCoordinates(!1),Fe[dt]=Ae[dt].slice().reverse(),Ie[dt]=Pe.getVisibleCoordinates(!0).reverse()}this.opaquePassCutoff=1/0;for(let dt=0;dtthis.useProgram(dt)}),this.context.viewport.set([0,0,this.width,this.height]),this.context.bindFramebuffer.set(null),this.context.clear({color:P.showOverdrawInspector?i.bo.black:i.bo.transparent,depth:1}),this.clearStencil(),this.style.sky&&this.drawFunctions.sky(this,this.style.sky),this._showOverdrawInspector=P.showOverdrawInspector,this.depthRangeFor3D=[0,1-(d._order.length+2)*this.numSublayers*this.depthEpsilon],!this.renderToTexture)for(this.renderPass="opaque",this.currentLayer=se.length-1;this.currentLayer>=0;this.currentLayer--){let dt=this.style._layers[se[this.currentLayer]],Pe=de[dt.source],Xe=Ae[dt.source];this._renderTileClippingMasks(dt,Xe,!1),this.renderLayer(this,Pe,dt,Xe,Ye)}this.renderPass="translucent";let st=!1;for(this.currentLayer=0;this.currentLayerPt.source&&!Pt.isHidden(Xe)?[Pe.tileManagers[Pt.source]]:[])),Et=xt.filter((Pt=>Pt.getSource().type==="vector")),Bt=xt.filter((Pt=>Pt.getSource().type!=="vector")),St=Pt=>{(!at||at.getSource().maxzoom0?P.pop():null}isPatternMissing(d){if(!d)return!1;if(!d.from||!d.to)return!0;let P=this.imageManager.getPattern(d.from.toString()),N=this.imageManager.getPattern(d.to.toString());return!P||!N}useProgram(d,P,N=!1,H=[]){var $;this.cache||(this.cache={});let se=!!this.style.map.terrain,de=this.style.projection,Ae=N?Oa.projectionMercator:de.shaderPreludeCode,Fe=N?yo:de.shaderDefine,Ie=d+(P?P.cacheKey:"")+`/${N?so:de.shaderVariantName}`+(this._showOverdrawInspector?"/overdraw":"")+(se?"/terrain":"")+(H?`/${H.join("/")}`:"");return($=this.cache)[Ie]||($[Ie]=new Ud(this.context,Oa[d],P,_d[d],this._showOverdrawInspector,se,Ae,Fe,H)),this.cache[Ie]}setCustomLayerDefaults(){this.context.unbindVAO(),this.context.cullFace.setDefault(),this.context.activeTexture.setDefault(),this.context.pixelStoreUnpack.setDefault(),this.context.pixelStoreUnpackPremultiplyAlpha.setDefault(),this.context.pixelStoreUnpackFlipY.setDefault()}setBaseState(){let d=this.context.gl;this.context.cullFace.set(!1),this.context.viewport.set([0,0,this.width,this.height]),this.context.blendEquation.set(d.FUNC_ADD)}initDebugOverlayCanvas(){this.debugOverlayCanvas==null&&(this.debugOverlayCanvas=document.createElement("canvas"),this.debugOverlayCanvas.width=512,this.debugOverlayCanvas.height=512,this.debugOverlayTexture=new i.T(this.context,this.debugOverlayCanvas,this.context.gl.RGBA))}destroy(){var d,P;if(this._tileTextures){for(let N in this._tileTextures){let H=this._tileTextures[N];if(H)for(let $ of H)$.destroy()}this._tileTextures={}}if(this.tileExtentBuffer&&this.tileExtentBuffer.destroy(),this.debugBuffer&&this.debugBuffer.destroy(),this.rasterBoundsBuffer&&this.rasterBoundsBuffer.destroy(),this.rasterBoundsBufferPosOnly&&this.rasterBoundsBufferPosOnly.destroy(),this.viewportBuffer&&this.viewportBuffer.destroy(),this.tileBorderIndexBuffer&&this.tileBorderIndexBuffer.destroy(),this.quadTriangleIndexBuffer&&this.quadTriangleIndexBuffer.destroy(),this.tileExtentMesh&&((d=this.tileExtentMesh.vertexBuffer)===null||d===void 0||d.destroy()),this.tileExtentMesh&&((P=this.tileExtentMesh.indexBuffer)===null||P===void 0||P.destroy()),this.debugOverlayTexture&&this.debugOverlayTexture.destroy(),this.cache){for(let N in this.cache){let H=this.cache[N];H!=null&&H.program&&this.context.gl.deleteProgram(H.program)}this.cache={}}this.context&&this.context.setDefault()}overLimit(){let{drawingBufferWidth:d,drawingBufferHeight:P}=this.context.gl;return this.width!==d||this.height!==P}}function ph(Y,d){let P,N=!1,H=null,$=()=>{H=null,N&&(Y(...P),H=setTimeout($,d),N=!1)};return(...se)=>(N=!0,P=se,H||$(),H)}$u.MAX_TEXTURE_POOL_SIZE_PER_BUCKET=50;class gh{constructor(d){this._getCurrentHash=()=>{let P=window.location.hash.replace("#","");if(this._hashName){let N,H=P.split("&").map(($=>$.split("=")));for(let $ of H)$[0]===this._hashName&&(N=$);return(N&&N[1]||"").split("/")}return P.split("/")},this._onHashChange=()=>{let P=this._getCurrentHash();if(!this._isValidHash(P))return!1;let N=this._map.dragRotate.isEnabled()&&this._map.touchZoomRotate.isEnabled()?+(P[3]||0):this._map.getBearing();return this._map.jumpTo({center:[+P[2],+P[1]],zoom:+P[0],bearing:N,pitch:+(P[4]||0)}),!0},this._updateHashUnthrottled=()=>{let P=window.location.href.replace(/(#.*)?$/,this.getHashString());window.history.replaceState(window.history.state,null,P)},this._removeHash=()=>{let P=this._getCurrentHash();if(P.length===0)return;let N=P.join("/"),H=N;H.split("&").length>0&&(H=H.split("&")[0]),this._hashName&&(H=`${this._hashName}=${N}`);let $=window.location.hash.replace(H,"");$.startsWith("#&")?$=$.slice(0,1)+$.slice(2):$==="#"&&($="");let se=window.location.href.replace(/(#.+)?$/,$);se=se.replace("&&","&"),window.history.replaceState(window.history.state,null,se)},this._updateHash=ph(this._updateHashUnthrottled,300),this._hashName=d&&encodeURIComponent(d)}addTo(d){return this._map=d,addEventListener("hashchange",this._onHashChange,!1),this._map.on("moveend",this._updateHash),this}remove(){return removeEventListener("hashchange",this._onHashChange,!1),this._map.off("moveend",this._updateHash),clearTimeout(this._updateHash()),this._removeHash(),delete this._map,this}getHashString(d){let P=this._map.getCenter(),N=Math.round(100*this._map.getZoom())/100,H=Math.ceil((N*Math.LN2+Math.log(512/360/.5))/Math.LN10),$=Math.pow(10,H),se=Math.round(P.lng*$)/$,de=Math.round(P.lat*$)/$,Ae=this._map.getBearing(),Fe=this._map.getPitch(),Ie="";if(Ie+=d?`/${se}/${de}/${N}`:`${N}/${de}/${se}`,(Ae||Fe)&&(Ie+="/"+Math.round(10*Ae)/10),Fe&&(Ie+=`/${Math.round(Fe)}`),this._hashName){let Ye=this._hashName,st=!1,dt=window.location.hash.slice(1).split("&").map((Pe=>{let Xe=Pe.split("=")[0];return Xe===Ye?(st=!0,`${Xe}=${Ie}`):Pe})).filter((Pe=>Pe));return st||dt.push(`${Ye}=${Ie}`),`#${dt.join("&")}`}return`#${Ie}`}_isValidHash(d){if(d.length<3||d.some(isNaN))return!1;try{new i.W(+d[2],+d[1])}catch($){return!1}let P=+d[0],N=+(d[3]||0),H=+(d[4]||0);return P>=this._map.getMinZoom()&&P<=this._map.getMaxZoom()&&N>=-180&&N<=180&&H>=this._map.getMinPitch()&&H<=this._map.getMaxPitch()}}let uf={linearity:.3,easing:i.cv(0,0,.3,1)},Ku=i.e({deceleration:2500,maxSpeed:1400},uf),fu=i.e({deceleration:20,maxSpeed:1400},uf),Ju=i.e({deceleration:1e3,maxSpeed:360},uf),Qu=i.e({deceleration:1e3,maxSpeed:90},uf),Wd=i.e({deceleration:1e3,maxSpeed:360},uf);class x0{constructor(d){this._map=d,this.clear()}clear(){this._inertiaBuffer=[]}record(d){this._drainInertiaBuffer(),this._inertiaBuffer.push({time:g(),settings:d})}_drainInertiaBuffer(){let d=this._inertiaBuffer,P=g();for(;d.length>0&&P-d[0].time>160;)d.shift()}_onMoveEnd(d){if(this._drainInertiaBuffer(),this._inertiaBuffer.length<2)return;let P={zoom:0,bearing:0,pitch:0,roll:0,pan:new i.P(0,0),pinchAround:void 0,around:void 0};for(let{settings:$}of this._inertiaBuffer)P.zoom+=$.zoomDelta||0,P.bearing+=$.bearingDelta||0,P.pitch+=$.pitchDelta||0,P.roll+=$.rollDelta||0,$.panDelta&&P.pan._add($.panDelta),$.around&&(P.around=$.around),$.pinchAround&&(P.pinchAround=$.pinchAround);let N=this._inertiaBuffer[this._inertiaBuffer.length-1].time-this._inertiaBuffer[0].time,H={};if(P.pan.mag()){let $=Al(P.pan.mag(),N,i.e({},Ku,d||{})),se=P.pan.mult($.amount/P.pan.mag()),de=this._map.cameraHelper.handlePanInertia(se,this._map.transform);H.center=de.easingCenter,H.offset=de.easingOffset,Bf(H,$)}if(P.zoom){let $=Al(P.zoom,N,fu);H.zoom=i.cw(this._map.transform.zoom+$.amount,this._map.getZoomSnap(),$.amount),Bf(H,$)}if(P.bearing){let $=Al(P.bearing,N,Ju);H.bearing=this._map.transform.bearing+i.al($.amount,-179,179),Bf(H,$)}if(P.pitch){let $=Al(P.pitch,N,Qu);H.pitch=this._map.transform.pitch+$.amount,Bf(H,$)}if(P.roll){let $=Al(P.roll,N,Wd);H.roll=this._map.transform.roll+i.al($.amount,-179,179),Bf(H,$)}if(H.zoom||H.bearing){let $=P.pinchAround===void 0?P.around:P.pinchAround;H.around=$?this._map.unproject($):this._map.getCenter()}return this.clear(),i.e(H,{noMoveStart:!0})}}function Bf(Y,d){(!Y.duration||Y.durationP.unproject(Ae))),de=$.reduce(((Ae,Fe,Ie,Ye)=>Ae.add(Fe.div(Ye.length))),new i.P(0,0));super(d,{points:$,point:de,lngLats:se,lngLat:P.unproject(de),originalEvent:N}),this._defaultPrevented=!1}}class jh extends i.n{preventDefault(){this._defaultPrevented=!0}get defaultPrevented(){return this._defaultPrevented}constructor(d,P,N){super(d,{originalEvent:N}),this._defaultPrevented=!1}}class Wh{constructor(d,P){this._map=d,this._clickTolerance=P.clickTolerance}reset(){delete this._mousedownPos}wheel(d){return this._firePreventable(new jh(d.type,this._map,d))}mousedown(d,P){return this._mousedownPos=P,this._firePreventable(new Xl(d.type,this._map,d))}mouseup(d){this._map.fire(new Xl(d.type,this._map,d))}click(d,P){this._mousedownPos&&this._mousedownPos.dist(P)>=this._clickTolerance||this._map.fire(new Xl(d.type,this._map,d))}dblclick(d){return this._firePreventable(new Xl(d.type,this._map,d))}mouseover(d){this._map.fire(new Xl(d.type,this._map,d))}mouseout(d){this._map.fire(new Xl(d.type,this._map,d))}touchstart(d){return this._firePreventable(new cf(d.type,this._map,d))}touchmove(d){this._map.fire(new cf(d.type,this._map,d))}touchend(d){this._map.fire(new cf(d.type,this._map,d))}touchcancel(d){this._map.fire(new cf(d.type,this._map,d))}_firePreventable(d){if(this._map.fire(d),d.defaultPrevented)return{}}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class Yh{constructor(d){this._map=d}reset(){this._delayContextMenu=!1,this._ignoreContextMenu=!0,delete this._contextMenuEvent}mousemove(d){this._map.fire(new Xl(d.type,this._map,d))}mousedown(){this._delayContextMenu=!0,this._ignoreContextMenu=!1}mouseup(){this._delayContextMenu=!1,this._contextMenuEvent&&(this._map.fire(new Xl("contextmenu",this._map,this._contextMenuEvent)),delete this._contextMenuEvent)}contextmenu(d){this._delayContextMenu?this._contextMenuEvent=d:this._ignoreContextMenu||this._map.fire(new Xl(d.type,this._map,d)),this._map.listens("contextmenu")&&d.preventDefault()}isEnabled(){return!0}isActive(){return!1}enable(){}disable(){}}class hu{constructor(d){this._map=d}get transform(){return this._map._requestedCameraState||this._map.transform}get center(){return{lng:this.transform.center.lng,lat:this.transform.center.lat}}get zoom(){return this.transform.zoom}get pitch(){return this.transform.pitch}get bearing(){return this.transform.bearing}unproject(d){return this.transform.screenPointToLocation(i.P.convert(d),this._map.terrain)}}class Mu{constructor(d,P){this._map=d,this._tr=new hu(d),this._el=d.getCanvasContainer(),this._container=d.getContainer(),this._clickTolerance=P.clickTolerance||1,P.boxZoom&&typeof P.boxZoom=="object"&&(this._boxZoomEnd=P.boxZoom.boxZoomEnd)}isEnabled(){return!!this._enabled}isActive(){return!!this._active}enable(){this.isEnabled()||(this._enabled=!0)}disable(){this.isEnabled()&&(this._enabled=!1)}mousedown(d,P){this.isEnabled()&&d.shiftKey&&d.button===0&&(_.disableDrag(),this._startPos=this._lastPos=P,this._active=!0)}mousemoveWindow(d,P){if(!this._active)return;let N=P;if(this._lastPos.equals(N)||!this._box&&N.dist(this._startPos)$.fitScreenCoordinates(N,H,this._tr.bearing,{linear:!0})};this._fireEvent("boxzoomcancel",d)}keydown(d){this._active&&d.keyCode===27&&(this.reset(),this._fireEvent("boxzoomcancel",d))}reset(){this._active=!1,this._container.classList.remove("maplibregl-crosshair"),this._box&&(this._box.remove(),this._box=null),_.enableDrag(),delete this._startPos,delete this._lastPos}_fireEvent(d,P){return this._map.fire(new i.n(d,{originalEvent:P}))}}function _i(Y,d){if(Y.length!==d.length)throw new Error(`The number of touches and points are not equal - touches ${Y.length}, points ${d.length}`);let P={};for(let N=0;Nthis.numTouches)&&(this.aborted=!0),this.aborted||(this.startTime===void 0&&(this.startTime=d.timeStamp),N.length===this.numTouches&&(this.centroid=(function(H){let $=new i.P(0,0);for(let se of H)$._add(se);return $.div(H.length)})(P),this.touches=_i(N,P)))}touchmove(d,P,N){if(this.aborted||!this.centroid)return;let H=_i(N,P);for(let $ in this.touches){let se=H[$];(!se||se.dist(this.touches[$])>30)&&(this.aborted=!0)}}touchend(d,P,N){if((!this.centroid||d.timeStamp-this.startTime>500)&&(this.aborted=!0),N.length===0){let H=!this.aborted&&this.centroid;if(this.reset(),H)return H}}}class Me{constructor(d){this.singleTap=new Su(d),this.numTaps=d.numTaps,this.reset()}reset(){this.lastTime=1/0,delete this.lastTap,this.count=0,this.singleTap.reset()}touchstart(d,P,N){this.singleTap.touchstart(d,P,N)}touchmove(d,P,N){this.singleTap.touchmove(d,P,N)}touchend(d,P,N){let H=this.singleTap.touchend(d,P,N);if(H){let $=d.timeStamp-this.lastTime<500,se=!this.lastTap||this.lastTap.dist(H)<30;if($&&se||this.reset(),this.count++,this.lastTime=d.timeStamp,this.lastTap=H,this.count===this.numTaps)return this.reset(),H}}}class Ce{constructor(d){this._tr=new hu(d),this._zoomIn=new Me({numTouches:1,numTaps:2}),this._zoomOut=new Me({numTouches:2,numTaps:1}),this.reset()}reset(){this._active=!1,this._zoomIn.reset(),this._zoomOut.reset()}touchstart(d,P,N){this._zoomIn.touchstart(d,P,N),this._zoomOut.touchstart(d,P,N)}touchmove(d,P,N){this._zoomIn.touchmove(d,P,N),this._zoomOut.touchmove(d,P,N)}touchend(d,P,N){let H=this._zoomIn.touchend(d,P,N),$=this._zoomOut.touchend(d,P,N),se=this._tr;return H?(this._active=!0,d.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:de=>de.easeTo({duration:300,zoom:i.cw(se.zoom+1,de.getZoomSnap()),around:se.unproject(H)},{originalEvent:d})}):$?(this._active=!0,d.preventDefault(),setTimeout((()=>this.reset()),0),{cameraAnimation:de=>de.easeTo({duration:300,zoom:i.cw(se.zoom-1,de.getZoomSnap()),around:se.unproject($)},{originalEvent:d})}):void 0}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Be{constructor(d){this._enabled=!!d.enable,this._moveStateManager=d.moveStateManager,this._clickTolerance=d.clickTolerance||1,this._moveFunction=d.move,this._activateOnStart=!!d.activateOnStart,d.assignEvents(this),this.reset()}reset(d){this._active=!1,this._moved=!1,delete this._lastPoint,this._moveStateManager.endMove(d)}_move(...d){let P=this._moveFunction(...d);if(P.bearingDelta||P.pitchDelta||P.rollDelta||P.around||P.panDelta)return this._active=!0,P}dragStart(d,P){this.isEnabled()&&!this._lastPoint&&this._moveStateManager.isValidStartEvent(d)&&(this._moveStateManager.startMove(d),this._lastPoint=Array.isArray(P)?P[0]:P,this._activateOnStart&&this._lastPoint&&(this._active=!0))}dragMove(d,P){if(!this.isEnabled())return;let N=this._lastPoint;if(!N)return;if(d.preventDefault(),!this._moveStateManager.isValidMoveEvent(d))return void this.reset(d);let H=Array.isArray(P)?P[0]:P;return!this._moved&&H.dist(N)!0}),P=new Gt){this.mouseMoveStateManager=d,this.oneFingerTouchMoveStateManager=P}_executeRelevantHandler(d,P,N){return d instanceof MouseEvent?P(d):typeof TouchEvent!="undefined"&&d instanceof TouchEvent?N(d):void 0}startMove(d){this._executeRelevantHandler(d,(P=>{this.mouseMoveStateManager.startMove(P)}),(P=>{this.oneFingerTouchMoveStateManager.startMove(P)}))}endMove(d){this._executeRelevantHandler(d,(P=>{this.mouseMoveStateManager.endMove(P)}),(P=>{this.oneFingerTouchMoveStateManager.endMove(P)}))}isValidStartEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidStartEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidStartEvent(P)))}isValidMoveEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidMoveEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidMoveEvent(P)))}isValidEndEvent(d){return this._executeRelevantHandler(d,(P=>this.mouseMoveStateManager.isValidEndEvent(P)),(P=>this.oneFingerTouchMoveStateManager.isValidEndEvent(P)))}}let Nt=Y=>{Y.mousedown=Y.dragStart,Y.mousemoveWindow=Y.dragMove,Y.mouseup=Y.dragEnd,Y.contextmenu=d=>{d.preventDefault()}};class Kt{constructor(d,P){this._clickTolerance=d.clickTolerance||1,this._map=P,this.reset()}reset(){this._active=!1,this._touches={},this._sum=new i.P(0,0)}_shouldBePrevented(d){return d<(this._map.cooperativeGestures.isEnabled()?2:1)}touchstart(d,P,N){return this._calculateTransform(d,P,N)}touchmove(d,P,N){if(this._active){if(!this._shouldBePrevented(N.length))return d.preventDefault(),this._calculateTransform(d,P,N);this._map.cooperativeGestures.notifyGestureBlocked("touch_pan",d)}}touchend(d,P,N){this._calculateTransform(d,P,N),this._active&&this._shouldBePrevented(N.length)&&this.reset()}touchcancel(){this.reset()}_calculateTransform(d,P,N){N.length>0&&(this._active=!0);let H=_i(N,P),$=new i.P(0,0),se=new i.P(0,0),de=0;for(let Fe in H){let Ie=H[Fe],Ye=this._touches[Fe];Ye&&($._add(Ie),se._add(Ie.sub(Ye)),de++,H[Fe]=Ie)}if(this._touches=H,this._shouldBePrevented(de)||!se.mag())return;let Ae=se.div(de);return this._sum._add(Ae),this._sum.mag()Math.abs(Y.x)}class Bi extends ur{constructor(d){super(),this._currentTouchCount=0,this._map=d}reset(){super.reset(),this._valid=void 0,delete this._firstMove,delete this._lastPoints}touchstart(d,P,N){super.touchstart(d,P,N),this._currentTouchCount=N.length}_start(d){this._lastPoints=d,gi(d[0].sub(d[1]))&&(this._valid=!1)}_move(d,P,N){if(this._map.cooperativeGestures.isEnabled()&&this._currentTouchCount<3)return;let H=d[0].sub(this._lastPoints[0]),$=d[1].sub(this._lastPoints[1]);return this._valid=this.gestureBeginsVertically(H,$,N.timeStamp),this._valid?(this._lastPoints=d,this._active=!0,{pitchDelta:(H.y+$.y)/2*-.5}):void 0}gestureBeginsVertically(d,P,N){if(this._valid!==void 0)return this._valid;let H=d.mag()>=2,$=P.mag()>=2;if(!H&&!$)return;if(!H||!$)return this._firstMove===void 0&&(this._firstMove=N),N-this._firstMove<100&&void 0;let se=d.y>0==P.y>0;return gi(d)&&gi(P)&&se}}let mi={panStep:100,bearingStep:15,pitchStep:10};class ia{constructor(d){this._tr=new hu(d);let P=mi;this._panStep=P.panStep,this._bearingStep=P.bearingStep,this._pitchStep=P.pitchStep,this._rotationDisabled=!1}reset(){this._active=!1}keydown(d){if(d.altKey||d.ctrlKey||d.metaKey)return;let P=0,N=0,H=0,$=0,se=0;switch(d.keyCode){case 61:case 107:case 171:case 187:P=1;break;case 189:case 109:case 173:P=-1;break;case 37:d.shiftKey?N=-1:(d.preventDefault(),$=-1);break;case 39:d.shiftKey?N=1:(d.preventDefault(),$=1);break;case 38:d.shiftKey?H=1:(d.preventDefault(),se=-1);break;case 40:d.shiftKey?H=-1:(d.preventDefault(),se=1);break;default:return}return this._rotationDisabled&&(N=0,H=0),{cameraAnimation:de=>{let Ae=this._tr;de.easeTo({duration:300,easeId:"keyboardHandler",easing:ua,zoom:P?i.cw(Ae.zoom+P*(d.shiftKey?2:1),de.getZoomSnap()):Ae.zoom,bearing:Ae.bearing+N*this._bearingStep,pitch:Ae.pitch+H*this._pitchStep,offset:[-$*this._panStep,-se*this._panStep],center:Ae.center},{originalEvent:d})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}disableRotation(){this._rotationDisabled=!0}enableRotation(){this._rotationDisabled=!1}}function ua(Y){return Y*(2-Y)}let lo=4.000244140625,Bo=1/450;class Ua{constructor(d,P){this._onTimeout=N=>{this._type="wheel",this._delta-=this._lastValue,this._active||this._start(N)},this._map=d,this._tr=new hu(d),this._triggerRenderFrame=P,this._delta=0,this._defaultZoomRate=.01,this._wheelZoomRate=Bo}setZoomRate(d){this._defaultZoomRate=d}setWheelZoomRate(d){this._wheelZoomRate=d}isEnabled(){return!!this._enabled}isActive(){return!!this._active||this._finishTimeout!==void 0}isZooming(){return!!this._zooming}enable(d){this.isEnabled()||(this._enabled=!0,this._aroundCenter=!!d&&d.around==="center")}disable(){this.isEnabled()&&(this._enabled=!1)}_shouldBePrevented(d){return!!this._map.cooperativeGestures.isEnabled()&&!(d.ctrlKey||this._map.cooperativeGestures.isBypassed(d))}wheel(d){if(!this.isEnabled())return;if(this._shouldBePrevented(d))return void this._map.cooperativeGestures.notifyGestureBlocked("wheel_zoom",d);let P=d.deltaMode===WheelEvent.DOM_DELTA_LINE?40*d.deltaY:d.deltaY,N=g(),H=N-(this._lastWheelEventTime||0);this._lastWheelEventTime=N,P!==0&&P%lo==0?this._type="wheel":P!==0&&Math.abs(P)<4?this._type="trackpad":H>400?(this._type=null,this._lastValue=P,this._timeout=setTimeout(this._onTimeout,40,d)):this._type||(this._type=Math.abs(H*P)<200?"trackpad":"wheel",this._timeout&&(clearTimeout(this._timeout),this._timeout=null,P+=this._lastValue)),d.shiftKey&&P&&(P/=4),this._type&&(this._lastWheelEvent=d,this._delta-=P,this._active||this._start(d)),d.preventDefault()}_start(d){if(!this._delta)return;this._needsRerender=!1,this._active=!0,this.isZooming()||(this._zooming=!0),this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout);let P=_.mousePos(this._map.getCanvas(),d),N=this._tr;this._aroundPoint=this._aroundCenter?N.transform.locationToScreenPoint(i.W.convert(N.center)):P,this._needsRerender||(this._needsRerender=!0,this._triggerRenderFrame())}renderFrame(){if(!this._needsRerender||(this._needsRerender=!1,!this.isActive()))return;let d=this._tr.transform;if(typeof this._lastExpectedZoom=="number"){let de=d.zoom-this._lastExpectedZoom;typeof this._startZoom=="number"&&(this._startZoom+=de),typeof this._targetZoom=="number"&&(this._targetZoom+=de)}if(this._delta!==0){let de=this._type==="wheel"&&Math.abs(this._delta)>lo?this._wheelZoomRate:this._defaultZoomRate,Ae=2/(1+Math.exp(-Math.abs(this._delta*de)));this._delta<0&&Ae!==0&&(Ae=1/Ae);let Fe=typeof this._targetZoom!="number"?d.scale:i.ao(this._targetZoom),Ie=d.applyConstrain(d.getCameraLngLat(),i.ar(Fe*Ae)).zoom,Ye=this._map.getZoomSnap();if(this._type==="wheel"&&Ye>0){let st=i.cw(d.zoom,Ye);this._targetZoom=i.cw(Ie,Ye,Ie-st)}else this._targetZoom=Ie;this._type==="wheel"&&(this._startZoom=d.zoom,this._easing=this._smoothOutEasing(200)),this._delta=0}let P=typeof this._targetZoom!="number"?d.zoom:this._targetZoom,N=this._startZoom,H=this._easing,$,se=!1;if(this._type==="wheel"&&N&&H){let de=g()-this._lastWheelEventTime,Ae=Math.min((de+5)/200,1),Fe=H(Ae);$=i.H.number(N,P,Fe),Ae<1?this._needsRerender=!0:se=!0}else $=P,se=!0;return this._active=!0,se&&(this._active=!1,this._finishTimeout=setTimeout((()=>{this._zooming=!1,this._triggerRenderFrame(),delete this._targetZoom,delete this._lastExpectedZoom,delete this._finishTimeout}),200)),this._lastExpectedZoom=$,{noInertia:!0,needsRenderFrame:!se,zoomDelta:$-d.zoom,around:this._aroundPoint,originalEvent:this._lastWheelEvent}}_smoothOutEasing(d){let P=i.cy;if(this._prevEase){let N=this._prevEase,H=(g()-N.start)/N.duration,$=N.easing(H+.01)-N.easing(H),se=.27/Math.sqrt($*$+1e-4)*.01,de=Math.sqrt(.0729-se*se);P=i.cv(se,de,.25,1)}return this._prevEase={start:g(),duration:d,easing:P},P}reset(){this._active=!1,this._zooming=!1,delete this._targetZoom,delete this._lastExpectedZoom,this._finishTimeout&&(clearTimeout(this._finishTimeout),delete this._finishTimeout)}}class ls{constructor(d,P){this._clickZoom=d,this._tapZoom=P}enable(){this._clickZoom.enable(),this._tapZoom.enable()}disable(){this._clickZoom.disable(),this._tapZoom.disable()}isEnabled(){return this._clickZoom.isEnabled()&&this._tapZoom.isEnabled()}isActive(){return this._clickZoom.isActive()||this._tapZoom.isActive()}}class cl{constructor(d){this._tr=new hu(d),this.reset()}reset(){this._active=!1}dblclick(d,P){return d.preventDefault(),{cameraAnimation:N=>{N.easeTo({duration:300,zoom:i.cw(this._tr.zoom+(d.shiftKey?-1:1),N.getZoomSnap()),around:this._tr.unproject(P)},{originalEvent:d})}}}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class Eu{constructor(){this._tap=new Me({numTouches:1,numTaps:1}),this._zoomRate=1,this.reset()}setZoomRate(d){this._zoomRate=d!=null?d:1}reset(){this._active=!1,delete this._swipePoint,delete this._swipeTouch,delete this._tapTime,delete this._tapPoint,this._tap.reset()}touchstart(d,P,N){if(!this._swipePoint)if(this._tapTime){let H=P[0],$=d.timeStamp-this._tapTime<500,se=this._tapPoint.dist(H)<30;$&&se?N.length>0&&(this._swipePoint=H,this._swipeTouch=N[0].identifier):this.reset()}else this._tap.touchstart(d,P,N)}touchmove(d,P,N){if(this._tapTime){if(this._swipePoint){if(N[0].identifier!==this._swipeTouch)return;let H=P[0],$=H.y-this._swipePoint.y;return this._swipePoint=H,d.preventDefault(),this._active=!0,{zoomDelta:$/128*this._zoomRate}}}else this._tap.touchmove(d,P,N)}touchend(d,P,N){if(this._tapTime)this._swipePoint&&N.length===0&&this.reset();else{let H=this._tap.touchend(d,P,N);H&&(this._tapTime=d.timeStamp,this._tapPoint=H)}}touchcancel(){this.reset()}enable(){this._enabled=!0}disable(){this._enabled=!1,this.reset()}isEnabled(){return this._enabled}isActive(){return this._active}}class el{constructor(d,P,N){this._el=d,this._mousePan=P,this._touchPan=N}enable(d){this._inertiaOptions=d||{},this._mousePan.enable(),this._touchPan.enable(),this._el.classList.add("maplibregl-touch-drag-pan")}disable(){this._mousePan.disable(),this._touchPan.disable(),this._el.classList.remove("maplibregl-touch-drag-pan")}isEnabled(){return this._mousePan.isEnabled()&&this._touchPan.isEnabled()}isActive(){return this._mousePan.isActive()||this._touchPan.isActive()}}class yc{constructor(d,P,N,H){this._pitchWithRotate=d.pitchWithRotate,this._rollEnabled=d.rollEnabled,this._mouseRotate=P,this._mousePitch=N,this._mouseRoll=H}enable(){this._mouseRotate.enable(),this._pitchWithRotate&&this._mousePitch.enable(),this._rollEnabled&&this._mouseRoll.enable()}disable(){this._mouseRotate.disable(),this._mousePitch.disable(),this._mouseRoll.disable()}isEnabled(){return this._mouseRotate.isEnabled()&&(!this._pitchWithRotate||this._mousePitch.isEnabled())&&(!this._rollEnabled||this._mouseRoll.isEnabled())}isActive(){return this._mouseRotate.isActive()||this._mousePitch.isActive()||this._mouseRoll.isActive()}}class wi{constructor(d,P,N,H){this._el=d,this._touchZoom=P,this._touchRotate=N,this._tapDragZoom=H,this._rotationDisabled=!1,this._enabled=!0}enable(d){this._touchZoom.enable(d),this._rotationDisabled||this._touchRotate.enable(d),this._tapDragZoom.enable(),this._el.classList.add("maplibregl-touch-zoom-rotate")}disable(){this._touchZoom.disable(),this._touchRotate.disable(),this._tapDragZoom.disable(),this._el.classList.remove("maplibregl-touch-zoom-rotate")}isEnabled(){return this._touchZoom.isEnabled()&&(this._rotationDisabled||this._touchRotate.isEnabled())&&this._tapDragZoom.isEnabled()}isActive(){return this._touchZoom.isActive()||this._touchRotate.isActive()||this._tapDragZoom.isActive()}setZoomRate(d){this._touchZoom.setZoomRate(d),this._tapDragZoom.setZoomRate(d)}setZoomThreshold(d){this._touchZoom.setZoomThreshold(d)}disableRotation(){this._rotationDisabled=!0,this._touchRotate.disable()}enableRotation(){this._rotationDisabled=!1,this._touchZoom.isEnabled()&&this._touchRotate.enable()}}class Di{constructor(d,P){this._bypassKey=navigator.userAgent.includes("Mac")?"metaKey":"ctrlKey",this._map=d,this._options=P,this._enabled=!1}isActive(){return!1}reset(){}_setupUI(){if(this._container)return;let d=this._map.getCanvasContainer();d.classList.add("maplibregl-cooperative-gestures"),this._container=_.create("div","maplibregl-cooperative-gesture-screen",d);let P=this._map._getUIString("CooperativeGesturesHandler.WindowsHelpText");this._bypassKey==="metaKey"&&(P=this._map._getUIString("CooperativeGesturesHandler.MacHelpText"));let N=this._map._getUIString("CooperativeGesturesHandler.MobileHelpText"),H=document.createElement("div");H.className="maplibregl-desktop-message",H.textContent=P,this._container.appendChild(H);let $=document.createElement("div");$.className="maplibregl-mobile-message",$.textContent=N,this._container.appendChild($),this._container.setAttribute("aria-hidden","true")}_destroyUI(){this._container&&(this._container.remove(),this._map.getCanvasContainer().classList.remove("maplibregl-cooperative-gestures")),delete this._container}enable(){this._setupUI(),this._enabled=!0}disable(){this._enabled=!1,this._destroyUI()}isEnabled(){return this._enabled}isBypassed(d){return d[this._bypassKey]}notifyGestureBlocked(d,P){this._enabled&&(this._map.fire(new i.n("cooperativegestureprevented",{gestureType:d,originalEvent:P})),this._container.classList.add("maplibregl-show"),setTimeout((()=>{this._container.classList.remove("maplibregl-show")}),100))}}let fl=Y=>Y.zoom||Y.drag||Y.roll||Y.pitch||Y.rotate;class Fc extends i.n{}function du(Y){var d;return((d=Y.panDelta)===null||d===void 0?void 0:d.mag())||Y.zoomDelta||Y.bearingDelta||Y.pitchDelta||Y.rollDelta}class ms{get _ownerDocument(){var d;return((d=this._el)===null||d===void 0?void 0:d.ownerDocument)||document}get _ownerWindow(){var d,P;return((P=(d=this._el)===null||d===void 0?void 0:d.ownerDocument)===null||P===void 0?void 0:P.defaultView)||window}constructor(d,P){this.handleWindowEvent=H=>{this.handleEvent(H,`${H.type}Window`)},this.handleEvent=(H,$)=>{if(H.type==="blur")return void this.stop(!0);this._updatingCamera=!0;let se=H.type==="renderFrame"?void 0:H,de={needsRenderFrame:!1},Ae={},Fe={};for(let{handlerName:st,handler:dt,allowed:Pe}of this._handlers){if(!dt.isEnabled())continue;let Xe;if(this._blockedByActive(Fe,Pe,st))dt.reset();else if(dt[$||H.type]){if(i.cz(H,$||H.type)){let at=_.mousePos(this._map.getCanvas(),H);Xe=dt[$||H.type](H,at)}else if(i.cA(H,$||H.type)){let at=this._getMapTouches(H.touches),xt=_.touchPos(this._map.getCanvas(),at);Xe=dt[$||H.type](H,xt,at)}else i.cB($||H.type)||(Xe=dt[$||H.type](H));this.mergeHandlerResult(de,Ae,Xe,st,se),Xe!=null&&Xe.needsRenderFrame&&this._triggerRenderFrame()}(Xe||dt.isActive())&&(Fe[st]=dt)}let Ie={};for(let st in this._previousActiveHandlers)Fe[st]||(Ie[st]=se);this._previousActiveHandlers=Fe,(Object.keys(Ie).length||du(de))&&(this._changes.push([de,Ae,Ie]),this._triggerRenderFrame()),(Object.keys(Fe).length||du(de))&&this._map._stop(!0),this._updatingCamera=!1;let{cameraAnimation:Ye}=de;Ye&&(this._inertia.clear(),this._fireEvents({},{},!0),this._changes=[],Ye(this._map))},this._map=d,this._el=this._map.getCanvasContainer(),this._handlers=[],this._handlersById={},this._changes=[],this._inertia=new x0(d),this._bearingSnap=P.bearingSnap,this._previousActiveHandlers={},this._eventsInProgress={},this._addDefaultHandlers(P);let N=this._el;this._listeners=[[N,"touchstart",{passive:!0}],[N,"touchmove",{passive:!1}],[N,"touchend",void 0],[N,"touchcancel",void 0],[N,"mousedown",void 0],[N,"mousemove",void 0],[N,"mouseup",void 0],[this._ownerDocument,"mousemove",{capture:!0}],[this._ownerDocument,"mouseup",void 0],[N,"mouseover",void 0],[N,"mouseout",void 0],[N,"dblclick",void 0],[N,"click",void 0],[N,"keydown",{capture:!1}],[N,"keyup",void 0],[N,"wheel",{passive:!1}],[N,"contextmenu",void 0],[this._ownerWindow,"blur",void 0]];for(let[H,$,se]of this._listeners)H.addEventListener($,H===this._ownerDocument?this.handleWindowEvent:this.handleEvent,se)}destroy(){for(let[d,P,N]of this._listeners)d.removeEventListener(P,d===this._ownerDocument?this.handleWindowEvent:this.handleEvent,N)}_addDefaultHandlers(d){let P=this._map,N=P.getCanvasContainer();this._add("mapEvent",new Wh(P,d));let H=P.boxZoom=new Mu(P,d);this._add("boxZoom",H),d.interactive&&d.boxZoom&&H.enable();let $=P.cooperativeGestures=new Di(P,d.cooperativeGestures);this._add("cooperativeGestures",$),d.cooperativeGestures&&$.enable();let se=new Ce(P),de=new cl(P);P.doubleClickZoom=new ls(de,se),this._add("tapZoom",se),this._add("clickZoom",de),d.interactive&&d.doubleClickZoom&&P.doubleClickZoom.enable();let Ae=new Eu;this._add("tapDragZoom",Ae);let Fe=P.touchPitch=new Bi(P);this._add("touchPitch",Fe),d.interactive&&d.touchPitch&&P.touchPitch.enable(d.touchPitch);let Ie=()=>P.project(P.getCenter()),Ye=(function({enable:St,clickTolerance:Pt,aroundCenter:$t=!0,minPixelCenterThreshold:Ht=100,rotateDegreesPerPixelMoved:dr=.8},Xr){let Or=new lt({checkCorrectEvent:$r=>$r.button===0&&$r.ctrlKey||$r.button===2&&!$r.ctrlKey});return new Be({clickTolerance:Pt,move:($r,Er)=>{let Tr=Xr();if($t&&Math.abs(Tr.y-$r.y)>Ht)return{bearingDelta:i.cx(new i.P($r.x,Er.y),Er,Tr)};let Rr=(Er.x-$r.x)*dr;return $t&&Er.ydr.button===0&&dr.ctrlKey||dr.button===2});return new Be({clickTolerance:Pt,move:(dr,Xr)=>({pitchDelta:(Xr.y-dr.y)*$t}),moveStateManager:Ht,enable:St,assignEvents:Nt})})(d),dt=(function({enable:St,clickTolerance:Pt,rollDegreesPerPixelMoved:$t=.3},Ht){let dr=new lt({checkCorrectEvent:Xr=>Xr.button===2&&Xr.ctrlKey});return new Be({clickTolerance:Pt,move:(Xr,Or)=>{let $r=Ht(),Er=(Or.x-Xr.x)*$t;return Or.y<$r.y&&(Er=-Er),{rollDelta:Er}},moveStateManager:dr,enable:St,assignEvents:Nt})})(d,Ie);P.dragRotate=new yc(d,Ye,st,dt),this._add("mouseRotate",Ye,["mousePitch"]),this._add("mousePitch",st,["mouseRotate","mouseRoll"]),this._add("mouseRoll",dt,["mousePitch"]),d.interactive&&d.dragRotate&&P.dragRotate.enable();let Pe=(function({enable:St,clickTolerance:Pt}){let $t=new lt({checkCorrectEvent:Ht=>Ht.button===0&&!Ht.ctrlKey});return new Be({clickTolerance:Pt,move:(Ht,dr)=>({around:dr,panDelta:dr.sub(Ht)}),activateOnStart:!0,moveStateManager:$t,enable:St,assignEvents:Nt})})(d),Xe=new Kt(d,P);P.dragPan=new el(N,Pe,Xe),this._add("mousePan",Pe),this._add("touchPan",Xe,["touchZoom","touchRotate"]),d.interactive&&d.dragPan&&P.dragPan.enable(d.dragPan);let at=new In,xt=new ln;P.touchZoomRotate=new wi(N,xt,at,Ae),this._add("touchRotate",at,["touchPan","touchZoom"]),this._add("touchZoom",xt,["touchPan","touchRotate"]),d.interactive&&d.touchZoomRotate&&P.touchZoomRotate.enable(d.touchZoomRotate),this._add("blockableMapEvent",new Yh(P));let Et=P.scrollZoom=new Ua(P,(()=>this._triggerRenderFrame()));this._add("scrollZoom",Et,["mousePan"]),d.interactive&&d.scrollZoom&&P.scrollZoom.enable(d.scrollZoom);let Bt=P.keyboard=new ia(P);this._add("keyboard",Bt),d.interactive&&d.keyboard&&P.keyboard.enable()}_add(d,P,N){this._handlers.push({handlerName:d,handler:P,allowed:N}),this._handlersById[d]=P}stop(d){if(!this._updatingCamera){for(let{handler:P}of this._handlers)P.reset();this._inertia.clear(),this._fireEvents({},{},d),this._changes=[]}}isActive(){for(let{handler:d}of this._handlers)if(d.isActive())return!0;return!1}isZooming(){return!!this._eventsInProgress.zoom||this._map.scrollZoom.isZooming()}isRotating(){return!!this._eventsInProgress.rotate}isMoving(){return!!fl(this._eventsInProgress)||this.isZooming()}_blockedByActive(d,P,N){for(let H in d)if(H!==N&&!(P!=null&&P.includes(H)))return!0;return!1}_getMapTouches(d){let P=[];for(let N of d)this._el.contains(N.target)&&P.push(N);return P}mergeHandlerResult(d,P,N,H,$){if(!N)return;i.e(d,N);let se={handlerName:H,originalEvent:N.originalEvent||$};N.zoomDelta!==void 0&&(P.zoom=se),N.panDelta!==void 0&&(P.drag=se),N.rollDelta!==void 0&&(P.roll=se),N.pitchDelta!==void 0&&(P.pitch=se),N.bearingDelta!==void 0&&(P.rotate=se)}_applyChanges(){let d={},P={},N={};for(let[H,$,se]of this._changes)H.panDelta&&(d.panDelta=(d.panDelta||new i.P(0,0))._add(H.panDelta)),H.zoomDelta&&(d.zoomDelta=(d.zoomDelta||0)+H.zoomDelta),H.bearingDelta&&(d.bearingDelta=(d.bearingDelta||0)+H.bearingDelta),H.pitchDelta&&(d.pitchDelta=(d.pitchDelta||0)+H.pitchDelta),H.rollDelta&&(d.rollDelta=(d.rollDelta||0)+H.rollDelta),H.around!==void 0&&(d.around=H.around),H.pinchAround!==void 0&&(d.pinchAround=H.pinchAround),H.noInertia&&(d.noInertia=H.noInertia),i.e(P,$),i.e(N,se);this._updateMapTransform(d,P,N),this._changes=[]}_updateMapTransform(d,P,N){let H=this._map,$=H._getTransformForUpdate(),se=H.terrain;if(!(du(d)||se&&this._terrainMovement))return void this._fireEvents(P,N,!0);H._stop(!0);let{panDelta:de,zoomDelta:Ae,bearingDelta:Fe,pitchDelta:Ie,rollDelta:Ye,around:st,pinchAround:dt}=d;dt!==void 0&&(st=dt),st||(st=H.transform.centerPoint),se&&!$.isPointOnMapSurface(st)&&(st=$.centerPoint);let Pe={panDelta:de,zoomDelta:Ae,rollDelta:Ye,pitchDelta:Ie,bearingDelta:Fe,around:st};this._map.cameraHelper.useGlobeControls&&!$.isPointOnMapSurface(st)&&(st=$.centerPoint);let Xe=st.distSqr($.centerPoint)<.01?$.center:$.screenPointToLocation(de?st.sub(de):st);this._handleMapControls({terrain:se,tr:$,deltasForHelper:Pe,preZoomAroundLoc:Xe,combinedEventsInProgress:P,panDelta:de}),H._applyUpdatedTransform($),this._map._update(),d.noInertia||this._inertia.record(d),this._fireEvents(P,N,!0)}_handleMapControls({terrain:d,tr:P,deltasForHelper:N,preZoomAroundLoc:H,combinedEventsInProgress:$,panDelta:se}){let de=this._map.cameraHelper;if(de.handleMapControlsRollPitchBearingZoom(N,P),d)return de.useGlobeControls?(this._terrainMovement||!$.drag&&!$.zoom||(this._terrainMovement=!0,this._map._elevationFreeze=!0),void de.handleMapControlsPan(N,P,H)):this._terrainMovement||!$.drag&&!$.zoom?void($.drag&&this._terrainMovement&&se?P.setCenter(P.screenPointToLocation(P.centerPoint.sub(se))):de.handleMapControlsPan(N,P,H)):(this._terrainMovement=!0,this._map._elevationFreeze=!0,void de.handleMapControlsPan(N,P,H));de.handleMapControlsPan(N,P,H)}_fireEvents(d,P,N){let H=fl(this._eventsInProgress),$=fl(d),se={};for(let Ye in d){let{originalEvent:st}=d[Ye];this._eventsInProgress[Ye]||(se[`${Ye}start`]=st),this._eventsInProgress[Ye]=d[Ye]}!H&&$&&this._fireEvent("movestart",$.originalEvent);for(let Ye in se)this._fireEvent(Ye,se[Ye]);$&&this._fireEvent("move",$.originalEvent);for(let Ye in d){let{originalEvent:st}=d[Ye];this._fireEvent(Ye,st)}let de={},Ae;for(let Ye in this._eventsInProgress){let{handlerName:st,originalEvent:dt}=this._eventsInProgress[Ye];this._handlersById[st].isActive()||(delete this._eventsInProgress[Ye],Ae=P[st]||dt,de[`${Ye}end`]=Ae)}for(let Ye in de)this._fireEvent(Ye,de[Ye]);let Fe=fl(this._eventsInProgress),Ie=(H||$)&&!Fe;if(Ie&&this._terrainMovement){this._map._elevationFreeze=!1,this._terrainMovement=!1;let Ye=this._map._getTransformForUpdate();this._map.getCenterClampedToGround()&&Ye.recalculateZoomAndCenter(this._map.terrain),this._map._applyUpdatedTransform(Ye)}if(N&&Ie){this._updatingCamera=!0;let Ye=this._inertia._onMoveEnd(this._map.dragPan._inertiaOptions),st=dt=>dt!==0&&-this._bearingSnap{delete this._frameId,this.handleEvent(new Fc("renderFrame",{timeStamp:d})),this._applyChanges()}))}_triggerRenderFrame(){this._frameId===void 0&&(this._frameId=this._requestFrame())}}class ff extends i.E{constructor(d,P,N){super(),this._renderFrameCallback=()=>{let H=Math.min((g()-this._easeStart)/this._easeOptions.duration,1);this._onEaseFrame(this._easeOptions.easing(H)),H<1&&this._easeFrameId?this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback):this.stop()},this._moving=!1,this._zooming=!1,this.transform=d,this._bearingSnap=N.bearingSnap,this._zoomSnap=N.zoomSnap,this.cameraHelper=P,this.on("moveend",(()=>{delete this._requestedCameraState}))}migrateProjection(d,P){d.apply(this.transform,!0),this.transform=d,this.cameraHelper=P}getCenter(){return new i.W(this.transform.center.lng,this.transform.center.lat)}setCenter(d,P){return this.jumpTo({center:d},P)}getCenterElevation(){return this.transform.elevation}setCenterElevation(d,P){return this.jumpTo({elevation:d},P),this}getCenterClampedToGround(){return this._centerClampedToGround}setCenterClampedToGround(d){this._centerClampedToGround=d}panBy(d,P,N){return d=i.P.convert(d).mult(-1),this.panTo(this.transform.center,i.e({offset:d},P),N)}panTo(d,P,N){return this.easeTo(i.e({center:d},P),N)}getZoom(){return this.transform.zoom}setZoom(d,P){return this.jumpTo({zoom:d},P),this}zoomTo(d,P,N){return this.easeTo(i.e({zoom:d},P),N)}zoomIn(d,P){return this.zoomTo(i.cw(this.getZoom()+1,this._zoomSnap),d,P),this}zoomOut(d,P){return this.zoomTo(i.cw(this.getZoom()-1,this._zoomSnap),d,P),this}getVerticalFieldOfView(){return this.transform.fov}setVerticalFieldOfView(d,P){return d!=this.transform.fov&&(this.transform.setFov(d),this.fire(new i.n("movestart",P)).fire(new i.n("move",P)).fire(new i.n("moveend",P))),this}getBearing(){return this.transform.bearing}setZoomSnap(d){return this._zoomSnap=d,this}getZoomSnap(){return this._zoomSnap}setBearing(d,P){return this.jumpTo({bearing:d},P),this}getPadding(){return this.transform.padding}setPadding(d,P){return this.jumpTo({padding:d},P),this}rotateTo(d,P,N){return this.easeTo(i.e({bearing:d},P),N)}resetNorth(d,P){return this.rotateTo(0,i.e({duration:1e3},d),P),this}resetNorthPitch(d,P){return this.easeTo(i.e({bearing:0,pitch:0,roll:0,duration:1e3},d),P),this}snapToNorth(d,P){return Math.abs(this.getBearing()){Xe.easeFunc(at),this.terrain&&!d.freezeElevation&&this._updateElevation(at),this._applyUpdatedTransform(N),this._fireMoveEvents(P)}),(at=>{this.terrain&&d.freezeElevation&&this._finalizeElevation(),this._afterEase(P,at)}),d),this}_prepareEase(d,P,N={}){this._moving=!0,P||N.moving||this.fire(new i.n("movestart",d)),this._zooming&&!N.zooming&&this.fire(new i.n("zoomstart",d)),this._rotating&&!N.rotating&&this.fire(new i.n("rotatestart",d)),this._pitching&&!N.pitching&&this.fire(new i.n("pitchstart",d)),this._rolling&&!N.rolling&&this.fire(new i.n("rollstart",d))}_prepareElevation(d){this._elevationCenter=d,this._elevationStart=this.transform.elevation,this._elevationTarget=this.terrain.getElevationForLngLatZoom(d,this.transform.tileZoom),this._elevationFreeze=!0}_updateElevation(d){this._elevationStart!==void 0&&this._elevationCenter!==void 0||this._prepareElevation(this.transform.center),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom));let P=this.terrain.getElevationForLngLatZoom(this._elevationCenter,this.transform.tileZoom);if(d<1&&P!==this._elevationTarget){let N=this._elevationTarget-this._elevationStart;this._elevationStart+=d*(N-(P-(N*d+this._elevationStart))/(1-d)),this._elevationTarget=P}this.transform.setElevation(i.H.number(this._elevationStart,this._elevationTarget,d))}_finalizeElevation(){this._elevationFreeze=!1,this.getCenterClampedToGround()&&this.transform.recalculateZoomAndCenter(this.terrain)}_getTransformForUpdate(){return this.transformCameraUpdate||this.terrain?(this._requestedCameraState||(this._requestedCameraState=this.transform.clone()),this._requestedCameraState):this.transform}_elevateCameraIfInsideTerrain(d){if(!this.terrain&&d.elevation>=0&&d.pitch<=90)return{};let P=d.getCameraLngLat(),N=d.getCameraAltitude(),H=this.terrain?this.terrain.getElevationForLngLatZoom(P,d.zoom):0;if(Nthis._elevateCameraIfInsideTerrain(H))),this.transformCameraUpdate&&P.push((H=>this.transformCameraUpdate(H))),!P.length)return;let N=d.clone();for(let H of P){let $=N.clone(),{center:se,zoom:de,roll:Ae,pitch:Fe,bearing:Ie,elevation:Ye}=H($);se&&$.setCenter(se),Ye!==void 0&&$.setElevation(Ye),de!==void 0&&$.setZoom(de),Ae!==void 0&&$.setRoll(Ae),Fe!==void 0&&$.setPitch(Fe),Ie!==void 0&&$.setBearing(Ie),N.apply($,!1)}this.transform.apply(N,!1)}_fireMoveEvents(d){this.fire(new i.n("move",d)),this._zooming&&this.fire(new i.n("zoom",d)),this._rotating&&this.fire(new i.n("rotate",d)),this._pitching&&this.fire(new i.n("pitch",d)),this._rolling&&this.fire(new i.n("roll",d))}_afterEase(d,P){if(this._easeId&&P&&this._easeId===P)return;delete this._easeId;let N=this._zooming,H=this._rotating,$=this._pitching,se=this._rolling;this._moving=!1,this._zooming=!1,this._rotating=!1,this._pitching=!1,this._rolling=!1,this._padding=!1,N&&this.fire(new i.n("zoomend",d)),H&&this.fire(new i.n("rotateend",d)),$&&this.fire(new i.n("pitchend",d)),se&&this.fire(new i.n("rollend",d)),this.fire(new i.n("moveend",d))}flyTo(d,P){if(!d.essential&&f.prefersReducedMotion){let Er=i.V(d,["center","zoom","bearing","pitch","roll","elevation","padding"]);return this.jumpTo(Er,P)}this.stop(),"zoom"in(d=i.e({offset:[0,0],speed:1.2,curve:1.42,easing:i.cy},d))&&this._zoomSnap&&(d.zoom=i.cw(d.zoom,this._zoomSnap));let N=this._getTransformForUpdate(),H=N.bearing,$=N.pitch,se=N.roll,de=N.padding,Ae="bearing"in d?this._normalizeBearing(d.bearing,H):H,Fe="pitch"in d?+d.pitch:$,Ie="roll"in d?this._normalizeBearing(d.roll,se):se,Ye="padding"in d?d.padding:N.padding,st=i.P.convert(d.offset),dt=N.centerPoint.add(st),Pe=N.screenPointToLocation(dt),Xe=this.cameraHelper.handleFlyTo(N,{bearing:Ae,pitch:Fe,roll:Ie,padding:Ye,locationAtOffset:Pe,offsetAsPoint:st,center:d.center,minZoom:d.minZoom,zoom:d.zoom}),at=d.curve,xt=Math.max(N.width,N.height),Et=xt/Xe.scaleOfZoom,Bt=Xe.pixelPathLength;typeof Xe.scaleOfMinZoom=="number"&&(at=Math.sqrt(xt/Xe.scaleOfMinZoom/Bt*2));let St=at*at;function Pt(Er){let Tr=(Et*Et-xt*xt+(Er?-1:1)*St*St*Bt*Bt)/(2*(Er?Et:xt)*St*Bt);return Math.log(Math.sqrt(Tr*Tr+1)-Tr)}function $t(Er){return(Math.exp(Er)-Math.exp(-Er))/2}function Ht(Er){return(Math.exp(Er)+Math.exp(-Er))/2}let dr=Pt(!1),Xr=function(Er){return Ht(dr)/Ht(dr+at*Er)},Or=function(Er){return xt*((Ht(dr)*($t(Tr=dr+at*Er)/Ht(Tr))-$t(dr))/St)/Bt;var Tr},$r=(Pt(!0)-dr)/at;if(Math.abs(Bt)<2e-6||!isFinite($r)){if(Math.abs(xt-Et)<1e-6)return this.easeTo(d,P);let Er=Et0,Xr=Tr=>Math.exp(Er*at*Tr)}return d.duration="duration"in d?+d.duration:1e3*$r/("screenSpeed"in d?+d.screenSpeed/at:+d.speed),d.maxDuration&&d.duration>d.maxDuration&&(d.duration=0),this._zooming=!0,this._rotating=H!==Ae,this._pitching=Fe!==$,this._rolling=Ie!==se,this._padding=!N.isPaddingEqual(Ye),this._prepareEase(P,!1),this.terrain&&this._prepareElevation(Xe.targetCenter),this._ease((Er=>{let Tr=Er*$r,Rr=1/Xr(Tr),Lr=Or(Tr);this._rotating&&N.setBearing(i.H.number(H,Ae,Er)),this._pitching&&N.setPitch(i.H.number($,Fe,Er)),this._rolling&&N.setRoll(i.H.number(se,Ie,Er)),this._padding&&(N.interpolatePadding(de,Ye,Er),dt=N.centerPoint.add(st)),Xe.easeFunc(Er,Rr,Lr,dt),this.terrain&&!d.freezeElevation&&this._updateElevation(Er),this._applyUpdatedTransform(N),this._fireMoveEvents(P)}),(()=>{this.terrain&&d.freezeElevation&&this._finalizeElevation(),this._afterEase(P)}),d),this}isEasing(){return!!this._easeFrameId}stop(){return this._stop()}_stop(d,P){var N;if(this._easeFrameId&&(this._cancelRenderFrame(this._easeFrameId),delete this._easeFrameId,delete this._onEaseFrame),this._onEaseEnd){let H=this._onEaseEnd;delete this._onEaseEnd,H.call(this,P)}return d||(N=this.handlers)===null||N===void 0||N.stop(!1),this}_ease(d,P,N){N.animate===!1||N.duration===0?(d(1),P()):(this._easeStart=g(),this._easeOptions=N,this._onEaseFrame=d,this._onEaseEnd=P,this._easeFrameId=this._requestRenderFrame(this._renderFrameCallback))}_normalizeBearing(d,P){d=i.X(d,-180,180);let N=Math.abs(d-P);return Math.abs(d-360-P)MapLibre'};class hl{constructor(d=ku){this._toggleAttribution=()=>{this._container.classList.contains("maplibregl-compact")&&(this._container.classList.contains("maplibregl-compact-show")?(this._container.setAttribute("open",""),this._container.classList.remove("maplibregl-compact-show")):(this._container.classList.add("maplibregl-compact-show"),this._container.removeAttribute("open")))},this._updateData=P=>{!P||P.sourceDataType!=="metadata"&&P.sourceDataType!=="visibility"&&P.dataType!=="style"&&P.type!=="terrain"||this._updateAttributions()},this._updateCompact=()=>{this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact===!1?this._container.setAttribute("open",""):this._container.classList.contains("maplibregl-compact")||this._container.classList.contains("maplibregl-attrib-empty")||(this._container.setAttribute("open",""),this._container.classList.add("maplibregl-compact","maplibregl-compact-show")):(this._container.setAttribute("open",""),this._container.classList.contains("maplibregl-compact")&&this._container.classList.remove("maplibregl-compact","maplibregl-compact-show"))},this._updateCompactMinimize=()=>{this._container.classList.contains("maplibregl-compact")&&this._container.classList.contains("maplibregl-compact-show")&&this._container.classList.remove("maplibregl-compact-show")},this.options=d}getDefaultPosition(){return"bottom-right"}onAdd(d){return this._map=d,this._compact=this.options.compact,this._container=_.create("details","maplibregl-ctrl maplibregl-ctrl-attrib"),this._compactButton=_.create("summary","maplibregl-ctrl-attrib-button",this._container),this._compactButton.addEventListener("click",this._toggleAttribution),this._setElementTitle(this._compactButton,"ToggleAttribution"),this._innerContainer=_.create("div","maplibregl-ctrl-attrib-inner",this._container),this._updateAttributions(),this._updateCompact(),this._map.on("styledata",this._updateData),this._map.on("sourcedata",this._updateData),this._map.on("terrain",this._updateData),this._map.on("resize",this._updateCompact),this._map.on("drag",this._updateCompactMinimize),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateData),this._map.off("sourcedata",this._updateData),this._map.off("terrain",this._updateData),this._map.off("resize",this._updateCompact),this._map.off("drag",this._updateCompactMinimize),this._map=void 0,this._compact=void 0,this._attribHTML=void 0}_setElementTitle(d,P){let N=this._map._getUIString(`AttributionControl.${P}`);d.title=N,d.setAttribute("aria-label",N)}_updateAttributions(){if(!this._map.style)return;let d=[];if(this.options.customAttribution&&(Array.isArray(this.options.customAttribution)?d=d.concat(this.options.customAttribution.map((H=>typeof H!="string"?"":H))):typeof this.options.customAttribution=="string"&&d.push(this.options.customAttribution)),this._map.style.stylesheet){let H=this._map.style.stylesheet;this.styleOwner=H.owner,this.styleId=H.id}let P=this._map.style.tileManagers;for(let H in P){let $=P[H];if($.used||$.usedForTerrain){let se=$.getSource();se.attribution&&!d.includes(se.attribution)&&d.push(se.attribution)}}d=d.filter((H=>String(H).trim())),d.sort(((H,$)=>H.length-$.length)),d=d.filter(((H,$)=>{for(let se=$+1;se{let P=this._container.children;if(P.length){let N=P[0];this._map.getCanvasContainer().offsetWidth<=640||this._compact?this._compact!==!1&&N.classList.add("maplibregl-compact"):N.classList.remove("maplibregl-compact")}},this.options=d}getDefaultPosition(){return"bottom-left"}onAdd(d){var P;this._map=d,this._compact=(P=this.options)===null||P===void 0?void 0:P.compact,this._container=_.create("div","maplibregl-ctrl");let N=_.create("a","maplibregl-ctrl-logo");return N.target="_blank",N.rel="noopener nofollow",N.href="https://maplibre.org/",N.setAttribute("aria-label",this._map._getUIString("LogoControl.Title")),N.setAttribute("rel","noopener nofollow"),this._container.appendChild(N),this._container.style.display="block",this._map.on("resize",this._updateCompact),this._updateCompact(),this._container}onRemove(){this._container.remove(),this._map.off("resize",this._updateCompact),this._map=void 0,this._compact=void 0}}class W{constructor(){this._queue=[],this._id=0,this._cleared=!1,this._currentlyRunning=!1}add(d){let P=++this._id;return this._queue.push({callback:d,id:P,cancelled:!1}),P}remove(d){let P=this._currentlyRunning,N=P?this._queue.concat(P):this._queue;for(let H of N)if(H.id===d)return void(H.cancelled=!0)}run(d=0){if(this._currentlyRunning)throw new Error("Attempting to run(), but is already running.");let P=this._currentlyRunning=this._queue;this._queue=[];for(let N of P)if(!N.cancelled&&(N.callback(d),this._cleared))break;this._cleared=!1,this._currentlyRunning=!1}clear(){this._currentlyRunning&&(this._cleared=!0),this._queue=[]}}var te=i.aS([{name:"a_pos3d",type:"Int16",components:3}]);class ve extends i.E{constructor(d){super(),this._lastTilesetChange=g(),this.tileManager=d,this._tiles={},this._renderableTilesKeys=[],this._sourceTileCache={},this.minzoom=0,this.maxzoom=22,this.deltaZoom=1,this.tileSize=d._source.tileSize*2**this.deltaZoom,d.usedForTerrain=!0,d.tileSize=this.tileSize}destruct(){this.tileManager.usedForTerrain=!1,this.tileManager.tileSize=null}getSource(){return this.tileManager._source}update(d,P){this.tileManager.update(d,P),this._renderableTilesKeys=[];let N={};for(let H of ft(d,{tileSize:this.tileSize,minzoom:this.minzoom,maxzoom:this.maxzoom,reparseOverscaled:!1,terrain:P,calculateTileZoom:this.tileManager._source.calculateTileZoom}))N[H.key]=!0,this._renderableTilesKeys.push(H.key),this._tiles[H.key]||(H.terrainRttPosMatrix32f=new Float64Array(16),i.c7(H.terrainRttPosMatrix32f,0,i.a6,i.a6,0,0,1),this._tiles[H.key]=new mt(H,this.tileSize),this._lastTilesetChange=g());for(let H in this._tiles)N[H]||delete this._tiles[H]}freeRtt(d){for(let P in this._tiles){let N=this._tiles[P];(!d||N.tileID.equals(d)||N.tileID.isChildOf(d)||d.isChildOf(N.tileID))&&(N.rtt=[])}}getRenderableTiles(){return this._renderableTilesKeys.map((d=>this.getTileByID(d)))}getTileByID(d){return this._tiles[d]}getTerrainCoords(d,P){return P?this._getTerrainCoordsForTileRanges(d,P):this._getTerrainCoordsForRegularTile(d)}_getTerrainCoordsForRegularTile(d){let P={};for(let N of this._renderableTilesKeys){let H=this._tiles[N].tileID,$=d.clone(),se=i.bj();if(H.canonical.equals(d.canonical))i.c7(se,0,i.a6,i.a6,0,0,1);else if(H.canonical.isChildOf(d.canonical)){let de=H.canonical.z-d.canonical.z,Ae=H.canonical.x-(H.canonical.x>>de<>de<>de;i.c7(se,0,Ie,Ie,0,0,1),i.Q(se,se,[-Ae*Ie,-Fe*Ie,0])}else{if(!d.canonical.isChildOf(H.canonical))continue;{let de=d.canonical.z-H.canonical.z,Ae=d.canonical.x-(d.canonical.x>>de<>de<>de;i.c7(se,0,i.a6,i.a6,0,0,1),i.Q(se,se,[Ae*Ie,Fe*Ie,0]),i.S(se,se,[1/2**de,1/2**de,0])}}$.terrainRttPosMatrix32f=new Float32Array(se),P[N]=$}return P}_getTerrainCoordsForTileRanges(d,P){let N={};for(let H of this._renderableTilesKeys){let $=this._tiles[H].tileID;if(!this._isWithinTileRanges($,P))continue;let se=d.clone(),de=i.bj();if($.canonical.z===d.canonical.z){let Ae=d.canonical.x-$.canonical.x+d.wrap*(1<d.canonical.z){let Ae=$.canonical.z-d.canonical.z,Fe=$.canonical.x-($.canonical.x>>Ae<>Ae<>Ae),st=d.canonical.y-($.canonical.y>>Ae),dt=i.a6>>Ae;i.c7(de,0,dt,dt,0,0,1),i.Q(de,de,[-Fe*dt+Ye*i.a6,-Ie*dt+st*i.a6,0])}else{let Ae=d.canonical.z-$.canonical.z,Fe=d.canonical.x-(d.canonical.x>>Ae<>Ae<>Ae)-$.canonical.x,st=(d.canonical.y>>Ae)-$.canonical.y,dt=i.a6<$.maxzoom&&(se=$.maxzoom),se<$.minzoom)return;(N=this._sourceTileCache)[H=d.key]||(N[H]=d.scaledTo(se).key);let de=this.findTileInCaches(this._sourceTileCache[d.key]);if(!(de!=null&&de.dem)&&P)for(;se>=$.minzoom&&!(de!=null&&de.dem);)de=this.findTileInCaches(d.scaledTo(se--).key);return de}findTileInCaches(d){let P=this.tileManager.getTileByID(d);return P||(P=this.tileManager._outOfViewCache.getByKey(d),P)}anyTilesAfterTime(d=Date.now()){return this._lastTilesetChange>=d}_isWithinTileRanges(d,P){let N=P[d.canonical.z];return!!N&&(d.wrap>N.minWrap||d.wrap=N.minTileXWrapped&&d.canonical.x<=N.maxTileXWrapped&&d.canonical.y>=N.minTileY&&d.canonical.y<=N.maxTileY)}}class Se{constructor(d,P,N){this._meshCache={},this.painter=d,this.tileManager=new ve(P),this.options=N,this.exaggeration=typeof N.exaggeration=="number"?N.exaggeration:1,this.qualityFactor=2,this.meshSize=128,this._demMatrixCache={},this.coordsIndex=[],this._coordsTextureSize=1024}destroy(){this._fbo&&(this._fbo.destroy(),this._fbo=null),this._fboCoordsTexture&&(this._fboCoordsTexture.destroy(),this._fboCoordsTexture=null),this._fboDepthTexture&&(this._fboDepthTexture.destroy(),this._fboDepthTexture=null),this._emptyDemTexture&&(this._emptyDemTexture.destroy(),this._emptyDemTexture=null),this._emptyDepthTexture&&(this._emptyDepthTexture.destroy(),this._emptyDepthTexture=null),this._coordsTexture&&(this._coordsTexture.destroy(),this._coordsTexture=null);for(let d in this._meshCache)this._meshCache[d].destroy();this._meshCache={},this.tileManager.destruct()}getDEMElevation(d,P,N,H=i.a6){var $;let se=d.normalizeCoordinates(P,N,H);if(!se)return 0;let de=this.getTerrainData(se.tileID),Ae=($=de.tile)===null||$===void 0?void 0:$.dem;if(!Ae)return 0;let Fe=i.cC([],[se.x/H*i.a6,se.y/H*i.a6],de.u_terrain_matrix),Ie=[Fe[0]*Ae.dim,Fe[1]*Ae.dim],Ye=Math.floor(Ie[0]),st=Math.floor(Ie[1]),dt=Ie[0]-Ye,Pe=Ie[1]-st;return Ae.get(Ye,st)*(1-dt)*(1-Pe)+Ae.get(Ye+1,st)*dt*(1-Pe)+Ae.get(Ye,st+1)*(1-dt)*Pe+Ae.get(Ye+1,st+1)*dt*Pe}getElevationForLngLatZoom(d,P){if(!i.cD(P,d.wrap()))return 0;let{tileID:N,mercatorX:H,mercatorY:$}=this._getOverscaledTileIDFromLngLatZoom(d,P);return this.getElevation(N,H%i.a6,$%i.a6,i.a6)}getElevationForLngLat(d,P){let N=ft(P,{maxzoom:this.tileManager.maxzoom,minzoom:this.tileManager.minzoom,tileSize:512,terrain:this}),H=0;for(let $ of N)$.canonical.z>H&&(H=Math.min($.canonical.z,this.tileManager.maxzoom));return this.getElevationForLngLatZoom(d,H)}getElevation(d,P,N,H=i.a6){return this.getDEMElevation(d,P,N,H)*this.exaggeration}getTerrainData(d){var P,N;if(!this._emptyDemTexture){let se=this.painter.context,de=new i.R({width:1,height:1},new Uint8Array(4));this._emptyDepthTexture=new i.T(se,de,se.gl.RGBA,{premultiply:!1}),this._emptyDemUnpack=[0,0,0,0],this._emptyDemTexture=new i.T(se,new i.R({width:1,height:1}),se.gl.RGBA,{premultiply:!1}),this._emptyDemTexture.bind(se.gl.NEAREST,se.gl.CLAMP_TO_EDGE),this._emptyDemMatrix=i.ap([])}let H=this.tileManager.getSourceTile(d,!0);if(H!=null&&H.dem&&(!H.demTexture||H.needsTerrainPrepare)){let se=this.painter.context;H.demTexture=this.painter.getTileTexture(H.dem.stride),H.demTexture?H.demTexture.update(H.dem.getPixels(),{premultiply:!1}):H.demTexture=new i.T(se,H.dem.getPixels(),se.gl.RGBA,{premultiply:!1}),H.demTexture.bind(se.gl.NEAREST,se.gl.CLAMP_TO_EDGE),H.needsTerrainPrepare=!1}let $=H&&H.toString()+H.tileID.key+d.key;if($&&!this._demMatrixCache[$]){let se=this.tileManager.getSource().maxzoom,de=d.canonical.z-H.tileID.canonical.z;d.overscaledZ>d.canonical.z&&(d.canonical.z>=se?de=d.canonical.z-se:i.w("cannot calculate elevation if elevation maxzoom > source.maxzoom"));let Ae=d.canonical.x-(d.canonical.x>>de<>de<>8<<4|$>>8,P[se+3]=0;let N=new i.R({width:this._coordsTextureSize,height:this._coordsTextureSize},new Uint8Array(P.buffer)),H=new i.T(d,N,d.gl.RGBA,{premultiply:!1});return H.bind(d.gl.NEAREST,d.gl.CLAMP_TO_EDGE),this._coordsTexture=H,H}pointCoordinate(d){this.painter.maybeDrawDepth(!0),this.painter.maybeDrawCoords();let P=new Uint8Array(4),N=this.painter.context,H=N.gl,$=Math.round(d.x*this.painter.pixelRatio/devicePixelRatio),se=Math.round(d.y*this.painter.pixelRatio/devicePixelRatio),de=Math.round(this.painter.height/devicePixelRatio);N.bindFramebuffer.set(this.getFramebuffer("coords").framebuffer),H.readPixels($,de-se-1,1,1,H.RGBA,H.UNSIGNED_BYTE,P),N.bindFramebuffer.set(null);let Ae=P[0]+(P[2]>>4<<8),Fe=P[1]+((15&P[2])<<8),Ie=this.coordsIndex[255-P[3]],Ye=Ie&&this.tileManager.getTileByID(Ie);if(!Ye)return null;let st=this._coordsTextureSize,dt=(1<0,H=N&&d.canonical.y===0,$=N&&d.canonical.y===(1<d.id!==P)),this._recentlyUsed.push(d.id)}stampObject(d){d.stamp=++this._stamp}getOrCreateFreeObject(){for(let P of this._recentlyUsed)if(!this._objects[P].inUse)return this._objects[P];if(this._objects.length>=this._size)throw new Error("No free RenderPool available, call freeAllObjects() required!");let d=this._createObject(this._objects.length);return this._objects.push(d),d}freeObject(d){d.inUse=!1}freeAllObjects(){for(let d of this._objects)this.freeObject(d)}isFull(){return!(this._objects.length!d.inUse))===!1}}let Re={background:!0,fill:!0,line:!0,raster:!0,hillshade:!0,"color-relief":!0};class rt{constructor(d,P){this.painter=d,this.terrain=P,this.pool=new Ee(d.context,30,P.tileManager.tileSize*P.qualityFactor)}destruct(){this.pool.destruct()}getTexture(d){return this.pool.getObjectForId(d.rtt[this._stacks.length-1].id).texture}prepareForRender(d,P){var N,H,$;this._stacks=[],this._prevType=null,this._rttTiles=[],this._renderableTiles=this.terrain.tileManager.getRenderableTiles(),this._renderableLayerIds=d._order.filter((se=>!d._layers[se].isHidden(P))),this._coordsAscending={};for(let se in d.tileManagers){this._coordsAscending[se]={};let de=d.tileManagers[se].getVisibleCoordinates(),Ae=d.tileManagers[se].getSource(),Fe=Ae instanceof qe?Ae.terrainTileRanges:null;for(let Ie of de){let Ye=this.terrain.tileManager.getTerrainCoords(Ie,Fe);for(let st in Ye)($=this._coordsAscending[se])[st]||($[st]=[]),this._coordsAscending[se][st].push(Ye[st])}}this._rttFingerprints={};for(let se of d._order){let de=d._layers[se],Ae=de.source;if(Re[de.type]&&!this._rttFingerprints[Ae]){this._rttFingerprints[Ae]={};let Fe=(H=(N=d.tileManagers[Ae])===null||N===void 0?void 0:N.getState().revision)!==null&&H!==void 0?H:0;for(let Ie in this._coordsAscending[Ae])this._rttFingerprints[Ae][Ie]=`${this._coordsAscending[Ae][Ie].map((Ye=>Ye.key)).sort().join()}#${Fe}`}}for(let se of this._renderableTiles)for(let de in this._rttFingerprints){let Ae=this._rttFingerprints[de][se.tileID.key];Ae&&Ae!==se.rttFingerprint[de]&&(se.rtt=[])}}renderLayer(d,P){if(d.isHidden(this.painter.transform.zoom))return!1;let N=Object.assign(Object.assign({},P),{isRenderingToTexture:!0}),H=d.type,$=this.painter,se=this._renderableLayerIds[this._renderableLayerIds.length-1]===d.id;if(Re[H]&&(this._prevType&&Re[this._prevType]||this._stacks.push([]),this._prevType=H,this._stacks[this._stacks.length-1].push(d.id),!se))return!0;if(Re[this._prevType]||Re[H]&&se){this._prevType=H;let de=this._stacks.length-1,Ae=this._stacks[de]||[];for(let Fe of this._renderableTiles){if(this.pool.isFull()&&(mc(this.painter,this.terrain,this._rttTiles,N),this._rttTiles=[],this.pool.freeAllObjects()),this._rttTiles.push(Fe),Fe.rtt[de]){let Ye=this.pool.getObjectForId(Fe.rtt[de].id);if(Ye.stamp===Fe.rtt[de].stamp){this.pool.useObject(Ye);continue}}let Ie=this.pool.getOrCreateFreeObject();this.pool.useObject(Ie),this.pool.stampObject(Ie),Fe.rtt[de]={id:Ie.id,stamp:Ie.stamp},$.context.bindFramebuffer.set(Ie.fbo.framebuffer),$.context.clear({color:i.bo.transparent,stencil:0}),$.currentStencilSource=void 0;for(let Ye of Ae){let st=$.style._layers[Ye],dt=st.source?this._coordsAscending[st.source][Fe.tileID.key]:[Fe.tileID];$.context.viewport.set([0,0,Ie.fbo.width,Ie.fbo.height]),$._renderTileClippingMasks(st,dt,!0),$.renderLayer($,$.style.tileManagers[st.source],st,dt,N),st.source&&(Fe.rttFingerprint[st.source]=this._rttFingerprints[st.source][Fe.tileID.key])}}return mc(this.painter,this.terrain,this._rttTiles,N),this._rttTiles=[],this.pool.freeAllObjects(),Re[H]}return!1}}let He={"AttributionControl.ToggleAttribution":"Toggle attribution","AttributionControl.MapFeedback":"Map feedback","FullscreenControl.Enter":"Enter fullscreen","FullscreenControl.Exit":"Exit fullscreen","GeolocateControl.FindMyLocation":"Find my location","GeolocateControl.LocationNotAvailable":"Location not available","LogoControl.Title":"MapLibre logo","Map.Title":"Map","Marker.Title":"Map marker","NavigationControl.ResetBearing":"Drag to rotate map, click to reset north","NavigationControl.ZoomIn":"Zoom in","NavigationControl.ZoomOut":"Zoom out","Popup.Close":"Close popup","ScaleControl.Feet":"ft","ScaleControl.Meters":"m","ScaleControl.Kilometers":"km","ScaleControl.Miles":"mi","ScaleControl.NauticalMiles":"nm","GlobeControl.Enable":"Enable globe","GlobeControl.Disable":"Disable globe","TerrainControl.Enable":"Enable terrain","TerrainControl.Disable":"Disable terrain","CooperativeGesturesHandler.WindowsHelpText":"Use Ctrl + scroll to zoom the map","CooperativeGesturesHandler.MacHelpText":"Use \u2318 + scroll to zoom the map","CooperativeGesturesHandler.MobileHelpText":"Use two fingers to move the map"},pt=o,Ft={hash:!1,interactive:!0,bearingSnap:7,zoomSnap:0,attributionControl:ku,maplibreLogo:!1,refreshExpiredTiles:!0,canvasContextAttributes:{antialias:!1,preserveDrawingBuffer:!1,powerPreference:"high-performance",failIfMajorPerformanceCaveat:!1,desynchronized:!1,contextType:void 0},scrollZoom:!0,minZoom:-2,maxZoom:22,minPitch:0,maxPitch:60,boxZoom:!0,dragRotate:!0,dragPan:!0,keyboard:!0,doubleClickZoom:!0,touchZoomRotate:!0,touchPitch:!0,cooperativeGestures:!1,trackResize:!0,center:[0,0],elevation:0,zoom:0,bearing:0,pitch:0,roll:0,renderWorldCopies:!0,maxTileCacheSize:null,maxTileCacheZoomLevels:i.c.MAX_TILE_CACHE_ZOOM_LEVELS,transformRequest:null,transformCameraUpdate:null,transformConstrain:null,fadeDuration:300,crossSourceCollisions:!0,clickTolerance:3,localIdeographFontFamily:"sans-serif",pitchWithRotate:!0,rollEnabled:!1,reduceMotion:void 0,validateStyle:!0,maxCanvasSize:[4096,4096],cancelPendingTileRequestsWhileZooming:!0,centerClampedToGround:!0,experimentalZoomLevelsToOverscale:void 0,anisotropicFilterPitch:20},Rt=class extends ff{get _ownerWindow(){var Y,d;return((d=(Y=this._container)===null||Y===void 0?void 0:Y.ownerDocument)===null||d===void 0?void 0:d.defaultView)||window}constructor(Y){var d,P,N;let H=Object.assign(Object.assign(Object.assign({},Ft),Y),{canvasContextAttributes:Object.assign(Object.assign({},Ft.canvasContextAttributes),Y.canvasContextAttributes)});if(H.minZoom!=null&&H.maxZoom!=null&&H.minZoom>H.maxZoom)throw new Error("maxZoom must be greater than or equal to minZoom");if(H.minPitch!=null&&H.maxPitch!=null&&H.minPitch>H.maxPitch)throw new Error("maxPitch must be greater than or equal to minPitch");if(H.minPitch!=null&&H.minPitch<0)throw new Error("minPitch must be greater than or equal to 0");if(H.maxPitch!=null&&H.maxPitch>180)throw new Error("maxPitch must be less than or equal to 180");let $=new Ls,se=new Gu;H.minZoom!==void 0&&$.setMinZoom(H.minZoom),H.maxZoom!==void 0&&$.setMaxZoom(H.maxZoom),H.minPitch!==void 0&&$.setMinPitch(H.minPitch),H.maxPitch!==void 0&&$.setMaxPitch(H.maxPitch),H.renderWorldCopies!==void 0&&$.setRenderWorldCopies(H.renderWorldCopies),H.transformConstrain!==null&&$.setConstrainOverride(H.transformConstrain),super($,se,{bearingSnap:H.bearingSnap,zoomSnap:H.zoomSnap}),this._idleTriggered=!1,this._crossFadingFactor=1,this._renderTaskQueue=new W,this._controls=[],this._mapId=i.ad(),this._lostContextStyle={style:null,images:null},this._contextLost=Ae=>{if(Ae.preventDefault(),this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this.painter.destroy(),this._lostContextStyle=this._getStyleAndImages(),this.style){for(let Fe of Object.values(this.style._layers))if(Fe.type==="custom"&&console.warn(`Custom layer with id '${Fe.id}' cannot be restored after WebGL context loss. You will need to re-add it manually after context restoration.`),Fe._listeners)for(let[Ie]of Object.entries(Fe._listeners))console.warn(`Custom layer with id '${Fe.id}' had event listeners for event '${Ie}' which cannot be restored after WebGL context loss. You will need to re-add them manually after context restoration.`);this.style.destroy(),this.style=null,this.fire(new i.n("webglcontextlost",{originalEvent:Ae}))}else this.fire(new i.n("webglcontextlost",{originalEvent:Ae}))},this._contextRestored=Ae=>{this._lostContextStyle.style&&this.setStyle(this._lostContextStyle.style,{diff:!1}),this._lostContextStyle.images&&this.style&&(this.style.imageManager.images=this._lostContextStyle.images),this._lostContextStyle={style:null,images:null},this._setupPainter(),this.resize(),this._update(),this._resizeInternal(),this.fire(new i.n("webglcontextrestored",{originalEvent:Ae}))},this._onMapScroll=Ae=>{if(Ae.target===this._container)return this._container.scrollTop=0,this._container.scrollLeft=0,!1},this._onWindowOnline=()=>{this._update()},this._interactive=H.interactive,this._maxTileCacheSize=H.maxTileCacheSize,this._maxTileCacheZoomLevels=H.maxTileCacheZoomLevels,this._canvasContextAttributes=Object.assign({},H.canvasContextAttributes),this._trackResize=H.trackResize===!0,this._bearingSnap=H.bearingSnap,this._zoomSnap=H.zoomSnap,this._centerClampedToGround=H.centerClampedToGround,this._refreshExpiredTiles=H.refreshExpiredTiles===!0,this._fadeDuration=H.fadeDuration,this._crossSourceCollisions=H.crossSourceCollisions===!0,this._collectResourceTiming=H.collectResourceTiming===!0,this._locale=Object.assign(Object.assign({},He),H.locale),this._clickTolerance=H.clickTolerance,this._overridePixelRatio=H.pixelRatio,this._maxCanvasSize=H.maxCanvasSize,this._zoomLevelsToOverscale=H.experimentalZoomLevelsToOverscale,this.transformCameraUpdate=H.transformCameraUpdate,this.transformConstrain=H.transformConstrain,this.cancelPendingTileRequestsWhileZooming=H.cancelPendingTileRequestsWhileZooming===!0,this.setAnisotropicFilterPitch(H.anisotropicFilterPitch),H.reduceMotion!==void 0&&(f.prefersReducedMotion=H.reduceMotion),this._imageQueueHandle=x.addThrottleControl((()=>this.isMoving())),this._requestManager=new y(H.transformRequest),this._container=this._resolveContainer(H.container),H.maxBounds&&this.setMaxBounds(H.maxBounds),this._setupContainer(),this._setupPainter(),this.on("move",(()=>this._update(!1))),this.on("moveend",(()=>this._update(!1))),this.on("zoom",(()=>this._update(!0))),this.on("terrain",(()=>{this.painter.terrainFacilitator.depthDirty=!0,this._update(!0)})),this.once("idle",(()=>this._idleTriggered=!0)),typeof window!="undefined"&&(this._ownerWindow.addEventListener("online",this._onWindowOnline,!1),this._setupResizeObserver()),this.handlers=new ms(this,H),this._hash=H.hash?new gh(typeof H.hash=="string"&&H.hash||void 0).addTo(this):void 0,!((d=this._hash)===null||d===void 0)&&d._onHashChange()||(this.jumpTo({center:H.center,elevation:H.elevation,zoom:H.zoom,bearing:H.bearing,pitch:H.pitch,roll:H.roll}),H.bounds&&(this.resize(),this.fitBounds(H.bounds,i.e({},H.fitBoundsOptions,{duration:0}))));let de=typeof H.style=="string"||((N=(P=H.style)===null||P===void 0?void 0:P.projection)===null||N===void 0?void 0:N.type)!=="globe";this.resize(null,de),this._localIdeographFontFamily=H.localIdeographFontFamily,this._validateStyle=H.validateStyle,H.style&&this.setStyle(H.style,{localIdeographFontFamily:H.localIdeographFontFamily}),H.attributionControl&&this.addControl(new hl(typeof H.attributionControl=="boolean"?void 0:H.attributionControl)),H.maplibreLogo&&this.addControl(new mh,H.logoPosition),this.on("style.load",(()=>{if(de||this._resizeTransform(),this.transform.unmodified){let Ae=i.V(this.style.stylesheet,["center","zoom","bearing","pitch","roll"]);this.jumpTo(Ae)}})),this.on("data",(Ae=>{this._update(Ae.dataType==="style"),this.fire(new i.n(`${Ae.dataType}data`,Ae))})),this.on("dataloading",(Ae=>{this.fire(new i.n(`${Ae.dataType}dataloading`,Ae))})),this.on("dataabort",(Ae=>{this.fire(new i.n("sourcedataabort",Ae))}))}_getMapId(){return this._mapId}setGlobalStateProperty(Y,d){return this.style.setGlobalStateProperty(Y,d),this._update(!0)}getGlobalState(){return this.style.getGlobalState()}addControl(Y,d){if(d===void 0&&(d=Y.getDefaultPosition?Y.getDefaultPosition():"top-right"),!(Y!=null&&Y.onAdd))return this.fire(new i.l(new Error("Invalid argument to map.addControl(). Argument must be a control with onAdd and onRemove methods.")));let P=Y.onAdd(this);this._controls.push(Y);let N=this._controlPositions[d];return d.includes("bottom")?N.insertBefore(P,N.firstChild):N.appendChild(P),this}removeControl(Y){if(!(Y!=null&&Y.onRemove))return this.fire(new i.l(new Error("Invalid argument to map.removeControl(). Argument must be a control with onAdd and onRemove methods.")));let d=this._controls.indexOf(Y);return d>-1&&this._controls.splice(d,1),Y.onRemove(this),this}hasControl(Y){return this._controls.includes(Y)}coveringTiles(Y){return ft(this.transform,Y)}calculateCameraOptionsFromTo(Y,d,P,N){return N==null&&this.terrain&&(N=this.terrain.getElevationForLngLat(P,this.transform)),super.calculateCameraOptionsFromTo(Y,d,P,N)}resize(Y,d=!0){if(this._lostContextStyle.style!==null)return this;this._resizeInternal(d);let P=!this._moving;return P&&(this.stop(),this.fire(new i.n("movestart",Y)).fire(new i.n("move",Y))),this.fire(new i.n("resize",Y)),P&&this.fire(new i.n("moveend",Y)),this}_resizeInternal(Y=!0){let[d,P]=this._containerDimensions(),N=this._getClampedPixelRatio(d,P);if(this._resizeCanvas(d,P,N),this.painter.resize(d,P,N),this.painter.overLimit()){let H=this.painter.context.gl;this._maxCanvasSize=[H.drawingBufferWidth,H.drawingBufferHeight];let $=this._getClampedPixelRatio(d,P);this._resizeCanvas(d,P,$),this.painter.resize(d,P,$)}this._resizeTransform(Y)}_resizeTransform(Y=!0){var d;let[P,N]=this._containerDimensions();this.transform.resize(P,N,Y),(d=this._requestedCameraState)===null||d===void 0||d.resize(P,N,Y)}_getClampedPixelRatio(Y,d){let{0:P,1:N}=this._maxCanvasSize,H=this.getPixelRatio(),$=Y*H,se=d*H;return Math.min($>P?P/$:1,se>N?N/se:1)*H}getPixelRatio(){var Y;return(Y=this._overridePixelRatio)!==null&&Y!==void 0?Y:devicePixelRatio}setPixelRatio(Y){this._overridePixelRatio=Y,this.resize()}getBounds(){return this.transform.getBounds()}getMaxBounds(){return this.transform.getMaxBounds()}setMaxBounds(Y){return this.transform.setMaxBounds(ie.convert(Y)),this._update()}setMinZoom(Y){if((Y=Y==null?-2:Y)>=-2&&Y<=this.transform.maxZoom){let d=this.transform.zoom,P=this._getTransformForUpdate();return P.setMinZoom(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.zoom&&this.fire(new i.n("zoomstart")).fire(new i.n("zoom")).fire(new i.n("zoomend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("minZoom must be between -2 and the current maxZoom, inclusive")}getMinZoom(){return this.transform.minZoom}setMaxZoom(Y){if((Y=Y==null?22:Y)>=this.transform.minZoom){let d=this.transform.zoom,P=this._getTransformForUpdate();return P.setMaxZoom(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.zoom&&this.fire(new i.n("zoomstart")).fire(new i.n("zoom")).fire(new i.n("zoomend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("maxZoom must be greater than the current minZoom")}getMaxZoom(){return this.transform.maxZoom}setMinPitch(Y){if((Y=Y==null?0:Y)<0)throw new Error("minPitch must be greater than or equal to 0");if(Y>=0&&Y<=this.transform.maxPitch){let d=this.transform.pitch,P=this._getTransformForUpdate();return P.setMinPitch(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.pitch&&this.fire(new i.n("pitchstart")).fire(new i.n("pitch")).fire(new i.n("pitchend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("minPitch must be between 0 and the current maxPitch, inclusive")}getMinPitch(){return this.transform.minPitch}setMaxPitch(Y){if((Y=Y==null?60:Y)>180)throw new Error("maxPitch must be less than or equal to 180");if(Y>=this.transform.minPitch){let d=this.transform.pitch,P=this._getTransformForUpdate();return P.setMaxPitch(Y),this._applyUpdatedTransform(P),this._update(),d!==this.transform.pitch&&this.fire(new i.n("pitchstart")).fire(new i.n("pitch")).fire(new i.n("pitchend")).fire(new i.n("movestart")).fire(new i.n("move")).fire(new i.n("moveend")),this}throw new Error("maxPitch must be greater than the current minPitch")}getMaxPitch(){return this.transform.maxPitch}getAnisotropicFilterPitch(){return this._anisotropicFilterPitch}setAnisotropicFilterPitch(Y){if((Y=Y==null?20:Y)>180)throw new Error("anisotropicFilterPitch must be less than or equal to 180");if(Y<0)throw new Error("anisotropicFilterPitch must be greater than or equal to 0");return this._anisotropicFilterPitch=Y,this._update()}getRenderWorldCopies(){return this.transform.renderWorldCopies}setRenderWorldCopies(Y){return this.transform.setRenderWorldCopies(Y),this._update()}setTransformConstrain(Y){return this.transform.setConstrainOverride(Y),this._update()}project(Y){return this.transform.locationToScreenPoint(i.W.convert(Y),this.style&&this.terrain)}unproject(Y){return this.transform.screenPointToLocation(i.P.convert(Y),this.terrain)}isMoving(){var Y;return this._moving||((Y=this.handlers)===null||Y===void 0?void 0:Y.isMoving())}isZooming(){var Y;return this._zooming||((Y=this.handlers)===null||Y===void 0?void 0:Y.isZooming())}isRotating(){var Y;return this._rotating||((Y=this.handlers)===null||Y===void 0?void 0:Y.isRotating())}_createDelegatedListener(Y,d,P){if(Y==="mouseenter"||Y==="mouseover"){let N=!1;return{layers:d,listener:P,delegates:{mousemove:$=>{let se=d.filter((Ae=>this.getLayer(Ae))),de=se.length!==0?this.queryRenderedFeatures($.point,{layers:se}):[];de.length?N||(N=!0,P.call(this,new Xl(Y,this,$.originalEvent,{features:de}))):N=!1},mouseout:()=>{N=!1}}}}if(Y==="mouseleave"||Y==="mouseout"){let N=!1;return{layers:d,listener:P,delegates:{mousemove:se=>{let de=d.filter((Ae=>this.getLayer(Ae)));(de.length!==0?this.queryRenderedFeatures(se.point,{layers:de}):[]).length?N=!0:N&&(N=!1,P.call(this,new Xl(Y,this,se.originalEvent)))},mouseout:se=>{N&&(N=!1,P.call(this,new Xl(Y,this,se.originalEvent)))}}}}{let N=H=>{let $=d.filter((de=>this.getLayer(de))),se=$.length!==0?this.queryRenderedFeatures(H.point,{layers:$}):[];se.length&&(H.features=se,P.call(this,H),delete H.features)};return{layers:d,listener:P,delegates:{[Y]:N}}}}_saveDelegatedListener(Y,d){var P;this._delegatedListeners||(this._delegatedListeners={}),(P=this._delegatedListeners)[Y]||(P[Y]=[]),this._delegatedListeners[Y].push(d)}_removeDelegatedListener(Y,d,P){var N;if(!(!((N=this._delegatedListeners)===null||N===void 0)&&N[Y]))return;let H=this._delegatedListeners[Y];for(let $=0;$d.includes(de)))){for(let de in se.delegates)this.off(de,se.delegates[de]);return void H.splice($,1)}}}on(Y,d,P){if(P===void 0)return super.on(Y,d);let N=typeof d=="string"?[d]:d,H=this._createDelegatedListener(Y,N,P);this._saveDelegatedListener(Y,H);for(let $ in H.delegates)this.on($,H.delegates[$]);return{unsubscribe:()=>{this._removeDelegatedListener(Y,N,P)}}}once(Y,d,P){if(P===void 0)return super.once(Y,d);let N=typeof d=="string"?[d]:d,H=this._createDelegatedListener(Y,N,P);for(let $ in H.delegates){let se=H.delegates[$];H.delegates[$]=(...de)=>{this._removeDelegatedListener(Y,N,P),se(...de)}}this._saveDelegatedListener(Y,H);for(let $ in H.delegates)this.once($,H.delegates[$]);return this}off(Y,d,P){return P===void 0?super.off(Y,d):(this._removeDelegatedListener(Y,typeof d=="string"?[d]:d,P),this)}queryRenderedFeatures(Y,d){if(!this.style)return[];let P,N=Y instanceof i.P||Array.isArray(Y),H=N?Y:[[0,0],[this.transform.width,this.transform.height]];if(d||(d=(N?{}:Y)||{}),H instanceof i.P||typeof H[0]=="number")P=[i.P.convert(H)];else{let $=i.P.convert(H[0]),se=i.P.convert(H[1]);P=[$,new i.P(se.x,$.y),se,new i.P($.x,se.y),$]}return this.style.queryRenderedFeatures(P,d,this.transform)}querySourceFeatures(Y,d){return this.style.querySourceFeatures(Y,d)}setStyle(Y,d){return(d=i.e({},{localIdeographFontFamily:this._localIdeographFontFamily,validate:this._validateStyle},d)).diff!==!1&&d.localIdeographFontFamily===this._localIdeographFontFamily&&this.style&&Y?(this._diffStyle(Y,d),this):(this._localIdeographFontFamily=d.localIdeographFontFamily,this._updateStyle(Y,d))}setTransformRequest(Y){return this._requestManager.setTransformRequest(Y),this}_getUIString(Y){let d=this._locale[Y];if(d==null)throw new Error(`Missing UI string '${Y}'`);return d}_updateStyle(Y,d){var P,N,H;if((P=this._diffStyleRequest)===null||P===void 0||P.abort(),this._diffStyleRequest=null,d.transformStyle&&this.style&&!this.style._loaded)return void this.style.once("style.load",(()=>this._updateStyle(Y,d)));let $=this.style&&d.transformStyle?this.style.serialize():void 0;return this.style&&(this.style.setEventedParent(null),this.style._remove(!Y)),Y?(this.style=new Cc(this,d||{}),this.style.setEventedParent(this,{style:this.style}),typeof Y=="string"?this.style.loadURL(Y,d,$):this.style.loadJSON(Y,d,$),this):(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),(H=(N=this.style)===null||N===void 0?void 0:N.projection)===null||H===void 0||H.destroy(),delete this.style,this)}_lazyInitEmptyStyle(){this.style||(this.style=new Cc(this,{}),this.style.setEventedParent(this,{style:this.style}),this.style.loadEmpty())}_diffStyle(Y,d){return i._(this,void 0,void 0,(function*(){var P;if((P=this._diffStyleRequest)===null||P===void 0||P.abort(),typeof Y=="string"){let N=Y;this._diffStyleRequest=new AbortController;let H=this._diffStyleRequest;try{let $=yield this._requestManager.transformRequest(N,"Style");if(H.signal.aborted)return void(this._diffStyleRequest=null);let se=yield i.k($,H);this._diffStyleRequest=null,this._updateDiff(se.data,d)}catch($){this._diffStyleRequest=null,i.$($)||this.fire(new i.l(i.d($)))}}else typeof Y=="object"&&(this._diffStyleRequest=null,this._updateDiff(Y,d))}))}_updateDiff(Y,d){try{this.style.setState(Y,d)&&this._update(!0)}catch(P){i.w(`Unable to perform style diff: ${i.d(P).message}. Rebuilding the style from scratch.`),this._updateStyle(Y,d)}}getStyle(){if(this.style)return this.style.serialize()}_getStyleAndImages(){return this.style?{style:this.style.serialize(),images:this.style.imageManager.cloneImages()}:{style:null,images:{}}}isStyleLoaded(){if(this.style)return this.style.loaded();i.w("There is no style added to the map.")}addSource(Y,d){return this._lazyInitEmptyStyle(),this.style.addSource(Y,d),this._update(!0)}isSourceLoaded(Y){var d;let P=(d=this.style)===null||d===void 0?void 0:d.tileManagers[Y];if(P!==void 0)return P.loaded();this.fire(new i.l(new Error(`There is no tile manager with ID '${Y}'`)))}setTerrain(Y){if(this.style._checkLoaded(),this._terrainDataCallback&&this.style.off("data",this._terrainDataCallback),Y){let d=this.style.tileManagers[Y.source];if(!d)throw new Error(`cannot load terrain, because there exists no source with ID: ${Y.source}`);this.terrain===null&&d.reload();for(let P in this.style._layers){let N=this.style._layers[P];N.type==="hillshade"&&N.source===Y.source&&i.w("You are using the same source for a hillshade layer and for 3D terrain. Please consider using two separate sources to improve rendering quality."),N.type==="color-relief"&&N.source===Y.source&&i.w("You are using the same source for a color-relief layer and for 3D terrain. Please consider using two separate sources to improve rendering quality.")}this.terrain=new Se(this.painter,d,Y),this.painter.renderToTexture=new rt(this.painter,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._terrainDataCallback=P=>{var N;P.dataType==="style"?this.terrain.tileManager.freeRtt():P.dataType==="source"&&P.tile&&(P.sourceId!==Y.source||this._elevationFreeze||(this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))),((N=P.source)===null||N===void 0?void 0:N.type)==="image"?this.terrain.tileManager.freeRtt():this.terrain.tileManager.freeRtt(P.tile.tileID))},this.style.on("data",this._terrainDataCallback)}else this.terrain&&this.terrain.destroy(),this.terrain=null,this.painter.renderToTexture&&this.painter.renderToTexture.destruct(),this.painter.renderToTexture=null,this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0);return this.fire(new i.n("terrain",{terrain:Y})),this}getTerrain(){var Y,d;return(d=(Y=this.terrain)===null||Y===void 0?void 0:Y.options)!==null&&d!==void 0?d:null}areTilesLoaded(){var Y;let d=(Y=this.style)===null||Y===void 0?void 0:Y.tileManagers;for(let P of Object.values(d))if(!P.areTilesLoaded())return!1;return!0}removeSource(Y){return this.style.removeSource(Y),this._update(!0)}getSource(Y){return this.style.getSource(Y)}setSourceTileLodParams(Y,d,P){if(P){let N=this.getSource(P);if(!N)throw new Error(`There is no source with ID "${P}", cannot set LOD parameters`);N.calculateTileZoom=Tt(Math.max(1,Y),Math.max(1,d))}else for(let N in this.style.tileManagers)this.style.tileManagers[N].getSource().calculateTileZoom=Tt(Math.max(1,Y),Math.max(1,d));return this._update(!0),this}refreshTiles(Y,d){let P=this.style.tileManagers[Y];if(!P)throw new Error(`There is no tile manager with ID "${Y}", cannot refresh tile`);d===void 0?P.reload(!0):P.refreshTiles(d.map((N=>new i.aa(N.z,N.x,N.y))))}addImage(Y,d,P={}){let{pixelRatio:N=1,sdf:H=!1,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe}=P;if(this._lazyInitEmptyStyle(),!(d instanceof HTMLImageElement||i.b(d))){if(d.width===void 0||d.height===void 0)return this.fire(new i.l(new Error("Invalid arguments to map.addImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));{let{width:Ie,height:Ye,data:st}=d,dt=d;return this.style.addImage(Y,{data:new i.R({width:Ie,height:Ye},new Uint8Array(st)),pixelRatio:N,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe,sdf:H,version:0,userImage:dt}),dt.onAdd&&dt.onAdd(this,Y),this}}{let{width:Ie,height:Ye,data:st}=f.getImageData(d);this.style.addImage(Y,{data:new i.R({width:Ie,height:Ye},st),pixelRatio:N,stretchX:$,stretchY:se,content:de,textFitWidth:Ae,textFitHeight:Fe,sdf:H,version:0})}}updateImage(Y,d){let P=this.style.getImage(Y);if(!P)return this.fire(new i.l(new Error("The map has no image with that id. If you are adding a new image use `map.addImage(...)` instead.")));let N=d instanceof HTMLImageElement||i.b(d)?f.getImageData(d):d,{width:H,height:$,data:se}=N;if(H===void 0||$===void 0)return this.fire(new i.l(new Error("Invalid arguments to map.updateImage(). The second argument must be an `HTMLImageElement`, `ImageData`, `ImageBitmap`, or object with `width`, `height`, and `data` properties with the same format as `ImageData`")));if(H!==P.data.width||$!==P.data.height)return this.fire(new i.l(new Error("The width and height of the updated image must be that same as the previous version of the image")));let de=!(d instanceof HTMLImageElement||i.b(d));return P.data.replace(se,de),this.style.updateImage(Y,P),this}getImage(Y){return this.style.getImage(Y)}hasImage(Y){return Y?!!this.style.getImage(Y):(this.fire(new i.l(new Error("Missing required image id"))),!1)}removeImage(Y){this.style.removeImage(Y)}loadImage(Y){return i._(this,void 0,void 0,(function*(){return x.getImage(yield this._requestManager.transformRequest(Y,"Image"),new AbortController)}))}listImages(){return this.style.listImages()}addLayer(Y,d){return this._lazyInitEmptyStyle(),this.style.addLayer(Y,d),this._update(!0)}moveLayer(Y,d){return this.style.moveLayer(Y,d),this._update(!0)}removeLayer(Y){return this.style.removeLayer(Y),this._update(!0)}getLayer(Y){return this.style.getLayer(Y)}getLayersOrder(){return this.style.getLayersOrder()}setLayerZoomRange(Y,d,P){return this.style.setLayerZoomRange(Y,d,P),this._update(!0)}setFilter(Y,d,P={}){return this.style.setFilter(Y,d,P),this._update(!0)}getFilter(Y){return this.style.getFilter(Y)}setPaintProperty(Y,d,P,N={}){return this.style.setPaintProperty(Y,d,P,N),this._update(!0)}getPaintProperty(Y,d){return this.style.getPaintProperty(Y,d)}setLayoutProperty(Y,d,P,N={}){return this.style.setLayoutProperty(Y,d,P,N),this._update(!0)}getLayoutProperty(Y,d){return this.style.getLayoutProperty(Y,d)}setGlyphs(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setGlyphs(Y,d),this._update(!0)}getGlyphs(){return this.style.getGlyphsUrl()}addSprite(Y,d,P={}){return this._lazyInitEmptyStyle(),this.style.addSprite(Y,d,P,(N=>{N||this._update(!0)})),this}removeSprite(Y){return this._lazyInitEmptyStyle(),this.style.removeSprite(Y),this._update(!0)}getSprite(){return this.style.getSprite()}setSprite(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setSprite(Y,d,(P=>{P||this._update(!0)})),this}setLight(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setLight(Y,d),this._update(!0)}getLight(){return this.style.getLight()}setSky(Y,d={}){return this._lazyInitEmptyStyle(),this.style.setSky(Y,d),this._update(!0)}getSky(){return this.style.getSky()}setFeatureState(Y,d){return this.style.setFeatureState(Y,d),this._update()}removeFeatureState(Y,d){return this.style.removeFeatureState(Y,d),this._update()}getFeatureState(Y){return this.style.getFeatureState(Y)}getContainer(){return this._container}getCanvasContainer(){return this._canvasContainer}getCanvas(){return this._canvas}_containerDimensions(){let Y=0,d=0;return this._container&&(Y=this._container.clientWidth||400,d=this._container.clientHeight||300),[Y,d]}_setupResizeObserver(){var Y;let d=!1,P=ph((H=>{this._trackResize&&!this._removed&&(this.resize(H),this.redraw())}),50),N=(Y=this._ownerWindow.ResizeObserver)!==null&&Y!==void 0?Y:ResizeObserver;this._resizeObserver=new N((H=>{d?P(H):d=!0})),this._resizeObserver.observe(this._container)}_resolveContainer(Y){if(typeof Y=="string"){let d=document.getElementById(Y);if(!d)throw new Error(`Container '${Y}' not found.`);return d}if(Y instanceof HTMLElement||Y&&typeof Y=="object"&&Y.nodeType===1)return Y;throw new Error("Invalid type: 'container' must be a String or HTMLElement.")}_setupContainer(){let Y=this._container;Y.classList.add("maplibregl-map");let d=this._canvasContainer=_.create("div","maplibregl-canvas-container",Y);this._interactive&&d.classList.add("maplibregl-interactive"),this._canvas=_.create("canvas","maplibregl-canvas",d),this._canvas.addEventListener("webglcontextlost",this._contextLost,!1),this._canvas.addEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.setAttribute("tabindex",this._interactive?"0":"-1"),this._canvas.setAttribute("aria-label",this._getUIString("Map.Title")),this._canvas.setAttribute("role","region");let P=this._containerDimensions(),N=this._getClampedPixelRatio(P[0],P[1]);this._resizeCanvas(P[0],P[1],N);let H=this._controlContainer=_.create("div","maplibregl-control-container",Y),$=this._controlPositions={};for(let se of["top-left","top-right","bottom-left","bottom-right"])$[se]=_.create("div",`maplibregl-ctrl-${se} `,H);this._container.addEventListener("scroll",this._onMapScroll,!1)}_resizeCanvas(Y,d,P){this._canvas.width=Math.floor(P*Y),this._canvas.height=Math.floor(P*d),this._canvas.style.width=`${Y}px`,this._canvas.style.height=`${d}px`}_setupPainter(){let Y=Object.assign(Object.assign({},this._canvasContextAttributes),{alpha:!0,depth:!0,stencil:!0,premultipliedAlpha:!0}),d=null;this._canvas.addEventListener("webglcontextcreationerror",(N=>{d={requestedAttributes:Y},N&&(d.statusMessage=N.statusMessage,d.type=N.type)}),{once:!0});let P=null;if(P=this._canvasContextAttributes.contextType?this._canvas.getContext(this._canvasContextAttributes.contextType,Y):this._canvas.getContext("webgl2",Y)||this._canvas.getContext("webgl",Y),!P){let N="Failed to initialize WebGL";throw d?(d.message=N,new Error(JSON.stringify(d))):new Error(N)}this.painter=new $u(P,this.transform)}migrateProjection(Y,d){super.migrateProjection(Y,d),this.painter.transform=Y,this.fire(new i.n("projectiontransition",{newProjection:this.style.projection.name}))}loaded(){return!this._styleDirty&&!this._sourcesDirty&&!!this.style&&this.style.loaded()}_update(Y){var d;return!((d=this.style)===null||d===void 0)&&d._loaded?(this._styleDirty||(this._styleDirty=Y),this._sourcesDirty=!0,this.triggerRepaint(),this):this}_requestRenderFrame(Y){return this._update(),this._renderTaskQueue.add(Y)}_cancelRenderFrame(Y){this._renderTaskQueue.remove(Y)}_render(Y){var d,P,N,H,$,se;let de=this._idleTriggered?this._fadeDuration:0,Ae=((d=this.style.projection)===null||d===void 0?void 0:d.transitionState)>0;if(this.painter.context.setDirty(),this.painter.setBaseState(),this._renderTaskQueue.run(Y),this._removed)return;let Fe=!1;if(this.style&&this._styleDirty){this._styleDirty=!1;let st=this.transform.zoom,dt=g();this.style.zoomHistory.update(st,dt);let Pe=new i.J(st,{now:dt,fadeDuration:de,zoomHistory:this.style.zoomHistory,transition:this.style.getTransition()}),Xe=Pe.crossFadingFactor();Xe===1&&Xe===this._crossFadingFactor||(Fe=!0,this._crossFadingFactor=Xe),this.style.update(Pe)}let Ie=((P=this.style.projection)===null||P===void 0?void 0:P.transitionState)>0!==Ae;(N=this.style.projection)===null||N===void 0||N.setErrorQueryLatitudeDegrees(this.transform.center.lat),this.transform.setTransitionState((H=this.style.projection)===null||H===void 0?void 0:H.transitionState,($=this.style.projection)===null||$===void 0?void 0:$.latitudeErrorCorrectionRadians),this.style&&(this._sourcesDirty||Ie)&&(this._sourcesDirty=!1,this.style._updateSources(this.transform)),this.terrain?(this.terrain.tileManager.update(this.transform,this.terrain),this.transform.setMinElevationForCurrentTile(this.terrain.getMinTileElevationForLngLatZoom(this.transform.center,this.transform.tileZoom)),!this._elevationFreeze&&this._centerClampedToGround&&this.transform.setElevation(this.terrain.getElevationForLngLatZoom(this.transform.center,this.transform.tileZoom))):(this.transform.setMinElevationForCurrentTile(0),this._centerClampedToGround&&this.transform.setElevation(0)),this._placementDirty=(se=this.style)===null||se===void 0?void 0:se._updatePlacement(this.transform,this.showCollisionBoxes,de,this._crossSourceCollisions,Ie),this.painter.render(this.style,{showTileBoundaries:this.showTileBoundaries,showOverdrawInspector:this._showOverdrawInspector,rotating:this.isRotating(),zooming:this.isZooming(),moving:this.isMoving(),fadeDuration:de,showPadding:this.showPadding,anisotropicFilterPitch:this.getAnisotropicFilterPitch()}),this.fire(new i.n("render")),this.loaded()&&!this._loaded&&(this._loaded=!0,this.fire(new i.n("load"))),this.style&&(this.style.hasTransitions()||Fe)&&(this._styleDirty=!0),this.style&&!this._placementDirty&&this.style._releaseSymbolFadeTiles();let Ye=this._sourcesDirty||this._styleDirty||this._placementDirty;return Ye||this._repaint?this.triggerRepaint():!this.isMoving()&&this.loaded()&&this.fire(new i.n("idle")),!this._loaded||this._fullyLoaded||Ye||(this._fullyLoaded=!0),this}redraw(){return this.style&&(this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._render(0)),this}remove(){var Y,d;this._hash&&this._hash.remove();for(let N of this._controls)N.onRemove(this);this._controls=[],this._frameRequest&&(this._frameRequest.abort(),this._frameRequest=null),this._renderTaskQueue.clear(),(Y=this._diffStyleRequest)===null||Y===void 0||Y.abort(),this.painter.destroy(),this.handlers.destroy(),delete this.handlers,this.setStyle(null),typeof window!="undefined"&&this._ownerWindow.removeEventListener("online",this._onWindowOnline,!1),x.removeThrottleControl(this._imageQueueHandle),(d=this._resizeObserver)===null||d===void 0||d.disconnect();let P=this.painter.context.gl.getExtension("WEBGL_lose_context");P!=null&&P.loseContext&&P.loseContext(),this._canvas.removeEventListener("webglcontextrestored",this._contextRestored,!1),this._canvas.removeEventListener("webglcontextlost",this._contextLost,!1),this._canvasContainer.remove(),this._controlContainer.remove(),this._container.removeEventListener("scroll",this._onMapScroll,!1),this._container.classList.remove("maplibregl-map"),this._removed=!0,this.fire(new i.n("remove"))}triggerRepaint(){this.style&&!this._frameRequest&&(this._frameRequest=new AbortController,f.frame(this._frameRequest,(Y=>{this._frameRequest=null;try{this._render(Y)}catch(d){if(!i.$(d)&&!(function(P){return P.message===qf})(d))throw d}}),(()=>{}),this._ownerWindow))}get showTileBoundaries(){return!!this._showTileBoundaries}set showTileBoundaries(Y){this._showTileBoundaries!==Y&&(this._showTileBoundaries=Y,this._update())}get showPadding(){return!!this._showPadding}set showPadding(Y){this._showPadding!==Y&&(this._showPadding=Y,this._update())}get showCollisionBoxes(){return!!this._showCollisionBoxes}set showCollisionBoxes(Y){this._showCollisionBoxes!==Y&&(this._showCollisionBoxes=Y,Y?this.style._generateCollisionBoxes():this._update())}get showOverdrawInspector(){return!!this._showOverdrawInspector}set showOverdrawInspector(Y){this._showOverdrawInspector!==Y&&(this._showOverdrawInspector=Y,this._update())}get repaint(){return!!this._repaint}set repaint(Y){this._repaint!==Y&&(this._repaint=Y,this.triggerRepaint())}get vertices(){return!!this._vertices}set vertices(Y){this._vertices=Y,this._update()}get version(){return pt}getCameraTargetElevation(){return this.transform.elevation}getProjection(){return this.style.getProjection()}setProjection(Y){return this._lazyInitEmptyStyle(),this.style.setProjection(Y),this._update(!0)}},ir={showCompass:!0,showZoom:!0,visualizePitch:!1,visualizeRoll:!0};class nr{constructor(d,P,N=!1){this.mousedown=$=>{this.startMove($,_.mousePos(this.element,$)),window.addEventListener("mousemove",this.mousemove),window.addEventListener("mouseup",this.mouseup)},this.mousemove=$=>{this.move($,_.mousePos(this.element,$))},this.mouseup=$=>{this._rotatePitchHandler.dragEnd($),this.offTemp()},this.touchstart=$=>{$.targetTouches.length!==1?this.reset():(this._startPos=this._lastPos=_.touchPos(this.element,$.targetTouches)[0],this.startMove($,this._startPos),window.addEventListener("touchmove",this.touchmove,{passive:!1}),window.addEventListener("touchend",this.touchend))},this.touchmove=$=>{$.targetTouches.length!==1?this.reset():(this._lastPos=_.touchPos(this.element,$.targetTouches)[0],this.move($,this._lastPos))},this.touchend=$=>{$.targetTouches.length===0&&this._startPos&&this._lastPos&&this._startPos.dist(this._lastPos){this._rotatePitchHandler.reset(),delete this._startPos,delete this._lastPos,this.offTemp()},this._clickTolerance=10,this.element=P;let H=new Zt;this._rotatePitchHandler=new Be({clickTolerance:3,move:($,se)=>{let de=P.getBoundingClientRect(),Ae=new i.P((de.bottom-de.top)/2,(de.right-de.left)/2);return{bearingDelta:i.cx(new i.P($.x,se.y),se,Ae),pitchDelta:N?-.5*(se.y-$.y):void 0}},moveStateManager:H,enable:!0,assignEvents:()=>{}}),this.map=d,P.addEventListener("mousedown",this.mousedown),P.addEventListener("touchstart",this.touchstart,{passive:!1}),P.addEventListener("touchcancel",this.reset)}startMove(d,P){this._rotatePitchHandler.dragStart(d,P),_.disableDrag()}move(d,P){let N=this.map,{bearingDelta:H,pitchDelta:$}=this._rotatePitchHandler.dragMove(d,P)||{};H&&N.setBearing(N.getBearing()+H),$&&N.setPitch(N.getPitch()+$)}off(){let d=this.element;d.removeEventListener("mousedown",this.mousedown),d.removeEventListener("touchstart",this.touchstart),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend),d.removeEventListener("touchcancel",this.reset),this.offTemp()}offTemp(){_.enableDrag(),window.removeEventListener("mousemove",this.mousemove),window.removeEventListener("mouseup",this.mouseup),window.removeEventListener("touchmove",this.touchmove),window.removeEventListener("touchend",this.touchend)}}let Cr;function Vr(Y,d,P,N=!1){if(N||!P.getCoveringTilesDetailsProvider().allowWorldCopies())return Y==null?void 0:Y.wrap();let H=new i.W(Y.lng,Y.lat);if(Y=new i.W(Y.lng,Y.lat),d){let $=new i.W(Y.lng-360,Y.lat),se=new i.W(Y.lng+360,Y.lat),de=P.locationToScreenPoint(Y).distSqr(d);P.locationToScreenPoint($).distSqr(d)180;){let $=P.locationToScreenPoint(Y);if($.x>=0&&$.y>=0&&$.x<=P.width&&$.y<=P.height)break;Y.lng>P.center.lng?Y.lng-=360:Y.lng+=360}return Y.lng!==H.lng&&P.isPointOnMapSurface(P.locationToScreenPoint(Y))?Y:H}let sr={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 br(Y,d,P){let N=Y.classList;for(let H in sr)N.remove(`maplibregl-${P}-anchor-${H}`);N.add(`maplibregl-${P}-anchor-${d}`)}class kr extends i.E{constructor(d){if(super(),this._onClick=P=>{this.fire(new i.n("click",{originalEvent:P}))},this._onKeyPress=P=>{P.code!=="Space"&&P.code!=="Enter"||this.togglePopup()},this._onMapClick=P=>{let N=P.originalEvent.target,H=this._element;this._popup&&(N===H||H.contains(N))&&this.togglePopup()},this._update=P=>{if(!this._map)return;let N=this._map.loaded()&&!this._map.isMoving();((P==null?void 0:P.type)==="terrain"||(P==null?void 0:P.type)==="render"&&!N)&&this._map.once("render",this._update),this._lngLat=Vr(this._lngLat,this._flatPos,this._map.transform),this._flatPos=this._pos=this._map.project(this._lngLat)._add(this._offset),this._map.terrain&&(this._flatPos=this._map.transform.locationToScreenPoint(this._lngLat)._add(this._offset));let H="";this._rotationAlignment==="viewport"||this._rotationAlignment==="auto"?H=`rotateZ(${this._rotation}deg)`:this._rotationAlignment==="map"&&(H=`rotateZ(${this._rotation-this._map.getBearing()}deg)`);let $="";this._pitchAlignment==="viewport"||this._pitchAlignment==="auto"?$="rotateX(0deg)":this._pitchAlignment==="map"&&($=`rotateX(${this._map.getPitch()}deg)`),this._subpixelPositioning||P&&P.type!=="moveend"||(this._pos=this._pos.round()),this._element.style.transform=`${sr[this._anchor]} translate(${this._pos.x}px, ${this._pos.y}px) ${$} ${H}`,f.frameAsync(new AbortController,this._map._ownerWindow).then((()=>{this._updateOpacity((P==null?void 0:P.type)==="moveend")})).catch((()=>{}))},this._onMove=P=>{if(!this._isDragging){let N=this._clickTolerance||this._map._clickTolerance;this._isDragging=P.point.dist(this._pointerdownPos)>=N}this._isDragging&&(this._pos=P.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 i.n("dragstart"))),this.fire(new i.n("drag")))},this._onUp=()=>{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 i.n("dragend")),this._state="inactive"},this._addDragHandler=P=>{this._element.contains(P.originalEvent.target)&&(P.preventDefault(),this._positionDelta=P.point.sub(this._pos).add(this._offset),this._pointerdownPos=P.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))},this._anchor=(d==null?void 0:d.anchor)||"center",this._color=(d==null?void 0:d.color)||"#3FB1CE",this._scale=(d==null?void 0:d.scale)||1,this._draggable=(d==null?void 0:d.draggable)||!1,this._clickTolerance=(d==null?void 0:d.clickTolerance)||0,this._subpixelPositioning=(d==null?void 0:d.subpixelPositioning)||!1,this._isDragging=!1,this._state="inactive",this._rotation=(d==null?void 0:d.rotation)||0,this._rotationAlignment=(d==null?void 0:d.rotationAlignment)||"auto",this._pitchAlignment=d!=null&&d.pitchAlignment&&d.pitchAlignment!=="auto"?d.pitchAlignment:this._rotationAlignment,this.setOpacity(d==null?void 0:d.opacity,d==null?void 0:d.opacityWhenCovered),d==null?void 0:d.element)this._element=d.element,this._offset=i.P.convert((d==null?void 0:d.offset)||[0,0]);else{this._defaultMarker=!0,this._element=_.create("div");let P=_.createNS("http://www.w3.org/2000/svg","svg"),N=41,H=27;P.setAttributeNS(null,"display","block"),P.setAttributeNS(null,"height",`${N}px`),P.setAttributeNS(null,"width",`${H}px`),P.setAttributeNS(null,"viewBox",`0 0 ${H} ${N}`);let $=_.createNS("http://www.w3.org/2000/svg","g");$.setAttributeNS(null,"stroke","none"),$.setAttributeNS(null,"stroke-width","1"),$.setAttributeNS(null,"fill","none"),$.setAttributeNS(null,"fill-rule","evenodd");let se=_.createNS("http://www.w3.org/2000/svg","g");se.setAttributeNS(null,"fill-rule","nonzero");let de=_.createNS("http://www.w3.org/2000/svg","g");de.setAttributeNS(null,"transform","translate(3.0, 29.0)"),de.setAttributeNS(null,"fill","#000000");let Ae=[{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"}];for(let xt of Ae){let Et=_.createNS("http://www.w3.org/2000/svg","ellipse");Et.setAttributeNS(null,"opacity","0.04"),Et.setAttributeNS(null,"cx","10.5"),Et.setAttributeNS(null,"cy","5.80029008"),Et.setAttributeNS(null,"rx",xt.rx),Et.setAttributeNS(null,"ry",xt.ry),de.appendChild(Et)}let Fe=_.createNS("http://www.w3.org/2000/svg","g");Fe.setAttributeNS(null,"fill",this._color);let Ie=_.createNS("http://www.w3.org/2000/svg","path");Ie.setAttributeNS(null,"d","M27,13.5 C27,19.074644 20.250001,27.000002 14.75,34.500002 C14.016665,35.500004 12.983335,35.500004 12.25,34.500002 C6.7499993,27.000002 0,19.222562 0,13.5 C0,6.0441559 6.0441559,0 13.5,0 C20.955844,0 27,6.0441559 27,13.5 Z"),Fe.appendChild(Ie);let Ye=_.createNS("http://www.w3.org/2000/svg","g");Ye.setAttributeNS(null,"opacity","0.25"),Ye.setAttributeNS(null,"fill","#000000");let st=_.createNS("http://www.w3.org/2000/svg","path");st.setAttributeNS(null,"d","M13.5,0 C6.0441559,0 0,6.0441559 0,13.5 C0,19.222562 6.7499993,27 12.25,34.5 C13,35.522727 14.016664,35.500004 14.75,34.5 C20.250001,27 27,19.074644 27,13.5 C27,6.0441559 20.955844,0 13.5,0 Z M13.5,1 C20.415404,1 26,6.584596 26,13.5 C26,15.898657 24.495584,19.181431 22.220703,22.738281 C19.945823,26.295132 16.705119,30.142167 13.943359,33.908203 C13.743445,34.180814 13.612715,34.322738 13.5,34.441406 C13.387285,34.322738 13.256555,34.180814 13.056641,33.908203 C10.284481,30.127985 7.4148684,26.314159 5.015625,22.773438 C2.6163816,19.232715 1,15.953538 1,13.5 C1,6.584596 6.584596,1 13.5,1 Z"),Ye.appendChild(st);let dt=_.createNS("http://www.w3.org/2000/svg","g");dt.setAttributeNS(null,"transform","translate(6.0, 7.0)"),dt.setAttributeNS(null,"fill","#FFFFFF");let Pe=_.createNS("http://www.w3.org/2000/svg","g");Pe.setAttributeNS(null,"transform","translate(8.0, 8.0)");let Xe=_.createNS("http://www.w3.org/2000/svg","circle");Xe.setAttributeNS(null,"fill","#000000"),Xe.setAttributeNS(null,"opacity","0.25"),Xe.setAttributeNS(null,"cx","5.5"),Xe.setAttributeNS(null,"cy","5.5"),Xe.setAttributeNS(null,"r","5.4999962");let at=_.createNS("http://www.w3.org/2000/svg","circle");at.setAttributeNS(null,"fill","#FFFFFF"),at.setAttributeNS(null,"cx","5.5"),at.setAttributeNS(null,"cy","5.5"),at.setAttributeNS(null,"r","5.4999962"),Pe.appendChild(Xe),Pe.appendChild(at),se.appendChild(de),se.appendChild(Fe),se.appendChild(Ye),se.appendChild(dt),se.appendChild(Pe),P.appendChild(se),P.setAttributeNS(null,"height",N*this._scale+"px"),P.setAttributeNS(null,"width",H*this._scale+"px"),this._element.appendChild(P),this._offset=i.P.convert((d==null?void 0:d.offset)||[0,-14])}if(this._element.classList.add("maplibregl-marker"),this._element.addEventListener("dragstart",(P=>{P.preventDefault()})),this._element.addEventListener("mousedown",(P=>{P.preventDefault()})),br(this._element,this._anchor,"marker"),d==null?void 0:d.className)for(let P of d.className.split(" "))this._element.classList.add(P);this._popup=null}addTo(d){return this.remove(),this._map=d,this._element.hasAttribute("aria-label")||this._element.setAttribute("aria-label",d._getUIString("Marker.Title")),this._element.hasAttribute("role")||this._element.setAttribute("role","button"),d.getCanvasContainer().appendChild(this._element),d.on("move",this._update),d.on("moveend",this._update),d.on("terrain",this._update),d.on("projectiontransition",this._update),this._element.addEventListener("click",this._onClick),this.setDraggable(this._draggable),this._update(),this._map.on("click",this._onMapClick),this}remove(){return this._opacityTimeout&&(clearTimeout(this._opacityTimeout),delete this._opacityTimeout),this._map&&(this._map.off("click",this._onMapClick),this._map.off("move",this._update),this._map.off("moveend",this._update),this._map.off("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousedown",this._addDragHandler),this._map.off("touchstart",this._addDragHandler),this._map.off("mouseup",this._onUp),this._map.off("touchend",this._onUp),this._map.off("mousemove",this._onMove),this._map.off("touchmove",this._onMove),delete this._map),this._element.removeEventListener("click",this._onClick),this._element.remove(),this._popup&&this._popup.remove(),this}getLngLat(){return this._lngLat}setLngLat(d){return this._lngLat=i.W.convert(d),this._pos=null,this._popup&&this._popup.setLngLat(this._lngLat),this._update(),this}getElement(){return this._element}setPopup(d){if(this._popup&&(this._popup.remove(),this._popup=null,this._element.removeEventListener("keypress",this._onKeyPress),this._originalTabIndex||this._element.removeAttribute("tabindex")),d){if(!("offset"in d.options)){let H=Math.abs(13.5)/Math.SQRT2;d.options.offset=this._defaultMarker?{top:[0,0],"top-left":[0,0],"top-right":[0,0],bottom:[0,-38.1],"bottom-left":[H,-1*(38.1-13.5+H)],"bottom-right":[-H,-1*(38.1-13.5+H)],left:[13.5,-1*(38.1-13.5)],right:[-13.5,-1*(38.1-13.5)]}:this._offset}this._popup=d,this._originalTabIndex=this._element.getAttribute("tabindex"),this._originalTabIndex||this._element.setAttribute("tabindex","0"),this._element.addEventListener("keypress",this._onKeyPress)}return this}setSubpixelPositioning(d){return this._subpixelPositioning=d,this}getPopup(){return this._popup}togglePopup(){let d=this._popup;return this._element.style.opacity===this._opacityWhenCovered?this:d?(d.isOpen()?d.remove():(d.setLngLat(this._lngLat),d.addTo(this._map)),this):this}_updateOpacity(d=!1){var P,N;let H=(P=this._map)===null||P===void 0?void 0:P.terrain,$=this._map.transform.isLocationOccluded(this._lngLat);if(!H||$){let dt=$?this._opacityWhenCovered:this._opacity;return void(this._element.style.opacity!==dt&&(this._element.style.opacity=dt,this._element.classList.toggle("maplibregl-marker-covered",$)))}if(d)this._opacityTimeout=null;else{if(this._opacityTimeout)return;this._opacityTimeout=setTimeout((()=>{this._opacityTimeout=null}),100)}let se=this._map,de=se.terrain.depthAtPoint(this._pos),Ae=se.terrain.getElevationForLngLat(this._lngLat,se.transform);if(se.transform.lngLatToCameraDepth(this._lngLat,Ae)-de<.006)return this._element.style.opacity=this._opacity,void this._element.classList.remove("maplibregl-marker-covered");let Fe=-this._offset.y/se.transform.pixelsPerMeter,Ie=Math.sin(se.getPitch()*Math.PI/180)*Fe,Ye=se.terrain.depthAtPoint(new i.P(this._pos.x,this._pos.y-this._offset.y)),st=se.transform.lngLatToCameraDepth(this._lngLat,Ae+Ie)-Ye>.006;!((N=this._popup)===null||N===void 0)&&N.isOpen()&&st&&this._popup.remove(),this._element.style.opacity=st?this._opacityWhenCovered:this._opacity,this._element.classList.toggle("maplibregl-marker-covered",st)}getOffset(){return this._offset}setOffset(d){return this._offset=i.P.convert(d),this._update(),this}addClassName(d){this._element.classList.add(d)}removeClassName(d){this._element.classList.remove(d)}toggleClassName(d){return this._element.classList.toggle(d)}setDraggable(d){return this._draggable=!!d,this._map&&(d?(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}isDraggable(){return this._draggable}setRotation(d){return this._rotation=d||0,this._update(),this}getRotation(){return this._rotation}setRotationAlignment(d){return this._rotationAlignment=d||"auto",this._update(),this}getRotationAlignment(){return this._rotationAlignment}setPitchAlignment(d){return this._pitchAlignment=d&&d!=="auto"?d:this._rotationAlignment,this._update(),this}getPitchAlignment(){return this._pitchAlignment}setOpacity(d,P){return(this._opacity===void 0||d===void 0&&P===void 0)&&(this._opacity="1",this._opacityWhenCovered="0.2"),d!==void 0&&(this._opacity=String(d)),P!==void 0&&(this._opacityWhenCovered=String(P)),this._map&&this._updateOpacity(!0),this}}let Gr={positionOptions:{enableHighAccuracy:!1,maximumAge:0,timeout:6e3},fitBoundsOptions:{maxZoom:15},trackUserLocation:!1,showAccuracyCircle:!0,showUserLocation:!0},Wr=0,Ar=!1,En={maxWidth:100,unit:"metric"};function zn(Y,d,P){let N=(P==null?void 0:P.maxWidth)||100,H=Y._container.clientHeight/2,$=Y._container.clientWidth/2,se=Y.unproject([$-N/2,H]),de=Y.unproject([$+N/2,H]),Ae=Math.round(Y.project(de).x-Y.project(se).x),Fe=Math.min(N,Ae,Y._container.clientWidth),Ie=se.distanceTo(de);if((P==null?void 0:P.unit)==="imperial"){let Ye=3.2808*Ie;Ye>5280?Zn(d,Fe,Ye/5280,Y._getUIString("ScaleControl.Miles")):Zn(d,Fe,Ye,Y._getUIString("ScaleControl.Feet"))}else(P==null?void 0:P.unit)==="nautical"?Zn(d,Fe,Ie/1852,Y._getUIString("ScaleControl.NauticalMiles")):Ie>=1e3?Zn(d,Fe,Ie/1e3,Y._getUIString("ScaleControl.Kilometers")):Zn(d,Fe,Ie,Y._getUIString("ScaleControl.Meters"))}function Zn(Y,d,P,N){let H=(function($){let se=Math.pow(10,`${Math.floor($)}`.length-1),de=$/se;return de=de>=10?10:de>=5?5:de>=3?3:de>=2?2:de>=1?1:(function(Ae){let Fe=Math.pow(10,Math.ceil(-Math.log(Ae)/Math.LN10));return Math.round(Ae*Fe)/Fe})(de),se*de})(P);Y.style.width=d*(H/P)+"px",Y.innerHTML=`${H} ${N}`}let ai={closeButton:!0,closeOnClick:!0,focusAfterOpen:!0,className:"",maxWidth:"240px",subpixelPositioning:!1,locationOccludedOpacity:void 0,padding:void 0},Mi=["a[href]","[tabindex]:not([tabindex='-1'])","[contenteditable]:not([contenteditable='false'])","button:not([disabled])","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].join(", ");function Si(Y){if(Y){if(typeof Y=="number"){let d=Math.round(Math.abs(Y)/Math.SQRT2);return{center:new i.P(0,0),top:new i.P(0,Y),"top-left":new i.P(d,d),"top-right":new i.P(-d,d),bottom:new i.P(0,-Y),"bottom-left":new i.P(d,-d),"bottom-right":new i.P(-d,-d),left:new i.P(Y,0),right:new i.P(-Y,0)}}if(Y instanceof i.P||Array.isArray(Y)){let d=i.P.convert(Y);return{center:d,top:d,"top-left":d,"top-right":d,bottom:d,"bottom-left":d,"bottom-right":d,left:d,right:d}}return{center:i.P.convert(Y.center||[0,0]),top:i.P.convert(Y.top||[0,0]),"top-left":i.P.convert(Y["top-left"]||[0,0]),"top-right":i.P.convert(Y["top-right"]||[0,0]),bottom:i.P.convert(Y.bottom||[0,0]),"bottom-left":i.P.convert(Y["bottom-left"]||[0,0]),"bottom-right":i.P.convert(Y["bottom-right"]||[0,0]),left:i.P.convert(Y.left||[0,0]),right:i.P.convert(Y.right||[0,0])}}return Si(new i.P(0,0))}let ya=o;a.AJAXError=i.cG,a.EXTENT=i.a6,a.Event=i.n,a.Evented=i.E,a.LngLat=i.W,a.MercatorCoordinate=i.a7,a.Point=i.P,a.addProtocol=i.cH,a.config=i.c,a.removeProtocol=i.cI,a.AttributionControl=hl,a.BoxZoomHandler=Mu,a.CanvasSource=Le,a.CooperativeGesturesHandler=Di,a.DoubleClickZoomHandler=ls,a.DragPanHandler=el,a.DragRotateHandler=yc,a.EdgeInsets=ko,a.FullscreenControl=class extends i.E{constructor(Y={}){var d;super(),this._onFullscreenChange=()=>{var P;let N=window.document.fullscreenElement||window.document.webkitFullscreenElement;for(;!((P=N==null?void 0:N.shadowRoot)===null||P===void 0)&&P.fullscreenElement;)N=N.shadowRoot.fullscreenElement;N===this._container!==this._fullscreen&&this._handleFullscreenChange()},this._onClickFullscreen=()=>{this._isFullscreen()?this._exitFullscreen():this._requestFullscreen()},this._fullscreen=!1,this._pseudo=(d=Y.pseudo)!==null&&d!==void 0&&d,Y!=null&&Y.container&&(Y.container instanceof HTMLElement?this._container=Y.container:i.w("Full screen control 'container' must be a DOM element.")),"onfullscreenchange"in document?this._fullscreenchange="fullscreenchange":"onmozfullscreenchange"in document?this._fullscreenchange="mozfullscreenchange":"onwebkitfullscreenchange"in document?this._fullscreenchange="webkitfullscreenchange":"onmsfullscreenchange"in document&&(this._fullscreenchange="MSFullscreenChange")}onAdd(Y){return this._map=Y,this._container||(this._container=this._map.getContainer()),this._controlContainer=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),this._controlContainer}onRemove(){this._controlContainer.remove(),this._map=null,window.document.removeEventListener(this._fullscreenchange,this._onFullscreenChange)}_setupUI(){let Y=this._fullscreenButton=_.create("button","maplibregl-ctrl-fullscreen",this._controlContainer);_.create("span","maplibregl-ctrl-icon",Y).setAttribute("aria-hidden","true"),Y.type="button",this._updateTitle(),this._fullscreenButton.addEventListener("click",this._onClickFullscreen),window.document.addEventListener(this._fullscreenchange,this._onFullscreenChange)}_updateTitle(){let Y=this._getTitle();this._fullscreenButton.setAttribute("aria-label",Y),this._fullscreenButton.title=Y}_getTitle(){return this._map._getUIString(this._isFullscreen()?"FullscreenControl.Exit":"FullscreenControl.Enter")}_isFullscreen(){return this._fullscreen}_handleFullscreenChange(){this._fullscreen=!this._fullscreen,this._fullscreenButton.classList.toggle("maplibregl-ctrl-shrink"),this._fullscreenButton.classList.toggle("maplibregl-ctrl-fullscreen"),this._updateTitle(),this._fullscreen?(this.fire(new i.n("fullscreenstart")),this._prevCooperativeGesturesEnabled=this._map.cooperativeGestures.isEnabled(),this._map.cooperativeGestures.disable()):(this.fire(new i.n("fullscreenend")),this._prevCooperativeGesturesEnabled&&this._map.cooperativeGestures.enable())}_exitFullscreen(){this._pseudo?this._togglePseudoFullScreen():window.document.exitFullscreen?window.document.exitFullscreen():window.document.webkitCancelFullScreen?window.document.webkitCancelFullScreen():this._togglePseudoFullScreen()}_requestFullscreen(){this._pseudo?this._togglePseudoFullScreen():this._container.requestFullscreen?this._container.requestFullscreen():this._container.webkitRequestFullscreen?this._container.webkitRequestFullscreen():this._togglePseudoFullScreen()}_togglePseudoFullScreen(){this._container.classList.toggle("maplibregl-pseudo-fullscreen"),this._handleFullscreenChange(),this._map.resize()}},a.GeoJSONSource=et,a.GeolocateControl=class extends i.E{constructor(Y){super(),this._onSuccess=d=>{if(this._map){if(this._isOutOfMapMaxBounds(d))return this._setErrorState(),this.fire(new i.n("outofmaxbounds",d)),this._updateMarker(),void this._finish();if(this.options.trackUserLocation)switch(this._lastKnownPosition=d,this._watchState){case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"BACKGROUND":case"BACKGROUND_ERROR":this._watchState="BACKGROUND",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background");break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}this.options.showUserLocation&&this._watchState!=="OFF"&&this._updateMarker(d),this.options.trackUserLocation&&this._watchState!=="ACTIVE_LOCK"||this._updateCamera(d),this.options.showUserLocation&&this._dotElement.classList.remove("maplibregl-user-location-dot-stale"),this.fire(new i.n("geolocate",d)),this._finish()}},this._updateCamera=d=>{let P=new i.W(d.coords.longitude,d.coords.latitude),N=d.coords.accuracy,H=this._map.getBearing(),$=i.e({bearing:H},this.options.fitBoundsOptions),se=ie.fromLngLat(P,N);this._map.fitBounds(se,$,{geolocateSource:!0})},this._updateMarker=d=>{if(d){let P=new i.W(d.coords.longitude,d.coords.latitude);this._accuracyCircleMarker.setLngLat(P).addTo(this._map),this._userLocationDotMarker.setLngLat(P).addTo(this._map),this._accuracy=d.coords.accuracy,this._updateCircleRadiusIfNeeded()}else this._userLocationDotMarker.remove(),this._accuracyCircleMarker.remove()},this._onUpdate=()=>{this._updateCircleRadiusIfNeeded()},this._onError=d=>{if(this._map){if(d.code===1){this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.disabled=!0;let P=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P),this._geolocationWatchID!==void 0&&this._clearWatch()}else{if(d.code===3&&Ar)return;this._setErrorState()}this._watchState!=="OFF"&&this.options.showUserLocation&&this._dotElement.classList.add("maplibregl-user-location-dot-stale"),this.fire(new i.n("error",d)),this._finish()}},this._finish=()=>{this._timeoutId&&clearTimeout(this._timeoutId),this._timeoutId=void 0},this._onMoveStart=d=>{if(!this._map)return;let P=(d==null?void 0:d[0])instanceof ResizeObserverEntry;d.geolocateSource||this._watchState!=="ACTIVE_LOCK"||P||this._map.isZooming()||(this._watchState="BACKGROUND",this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this.fire(new i.n("trackuserlocationend")),this.fire(new i.n("userlocationlostfocus")))},this._setupUI=()=>{this._map&&(this._container.addEventListener("contextmenu",(d=>{d.preventDefault()})),this._geolocateButton=_.create("button","maplibregl-ctrl-geolocate",this._container),_.create("span","maplibregl-ctrl-icon",this._geolocateButton).setAttribute("aria-hidden","true"),this._geolocateButton.type="button",this._geolocateButton.disabled=!0)},this._finishSetupUI=d=>{if(this._map){if(d===!1){i.w("Geolocation support is not available so the GeolocateControl will be disabled.");let P=this._map._getUIString("GeolocateControl.LocationNotAvailable");this._geolocateButton.disabled=!0,this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P)}else{let P=this._map._getUIString("GeolocateControl.FindMyLocation");this._geolocateButton.disabled=!1,this._geolocateButton.title=P,this._geolocateButton.setAttribute("aria-label",P)}this.options.trackUserLocation&&(this._geolocateButton.setAttribute("aria-pressed","false"),this._watchState="OFF"),this.options.showUserLocation&&(this._dotElement=_.create("div","maplibregl-user-location-dot"),this._userLocationDotMarker=new kr({element:this._dotElement}),this._circleElement=_.create("div","maplibregl-user-location-accuracy-circle"),this._accuracyCircleMarker=new kr({element:this._circleElement,pitchAlignment:"map"}),this.options.trackUserLocation&&(this._watchState="OFF"),this._map.on("zoom",this._onUpdate),this._map.on("move",this._onUpdate),this._map.on("rotate",this._onUpdate),this._map.on("pitch",this._onUpdate)),this._geolocateButton.addEventListener("click",(()=>this.trigger())),this._setup=!0,this.options.trackUserLocation&&this._map.on("movestart",this._onMoveStart)}},this.options=i.e({},Gr,Y)}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._setupUI(),(function(){return i._(this,arguments,void 0,(function*(d=!1){if(Cr!==void 0&&!d)return Cr;if(window.navigator.permissions===void 0)return Cr=!!window.navigator.geolocation,Cr;try{Cr=(yield window.navigator.permissions.query({name:"geolocation"})).state!=="denied"}catch(P){Cr=!!window.navigator.geolocation}return Cr}))})().then((d=>this._finishSetupUI(d))),this._container}onRemove(){this._geolocationWatchID!==void 0&&(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(),this._container.remove(),this._map.off("movestart",this._onMoveStart),this._map.off("zoom",this._onUpdate),this._map.off("move",this._onUpdate),this._map.off("rotate",this._onUpdate),this._map.off("pitch",this._onUpdate),this._map=void 0,Wr=0,Ar=!1}_isOutOfMapMaxBounds(Y){let d=this._map.getMaxBounds(),P=Y.coords;return d&&(P.longituded.getEast()||P.latituded.getNorth())}_setErrorState(){switch(this._watchState){case"WAITING_ACTIVE":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error");break;case"ACTIVE_LOCK":this._watchState="ACTIVE_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"BACKGROUND":this._watchState="BACKGROUND_ERROR",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-background-error"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting");break;case"ACTIVE_ERROR":case"BACKGROUND_ERROR":case"OFF":case void 0:break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}}_updateCircleRadiusIfNeeded(){let Y=this._userLocationDotMarker.getLngLat();if(!(this.options.showUserLocation&&this.options.showAccuracyCircle&&this._accuracy&&Y))return;let d=this._map.project(Y),P=this._map.unproject([d.x+100,d.y]),N=Y.distanceTo(P)/100,H=2*this._accuracy/N;this._circleElement.style.width=`${H.toFixed(2)}px`,this._circleElement.style.height=`${H.toFixed(2)}px`}trigger(){if(!this._setup)return i.w("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 i.n("trackuserlocationstart"));break;case"WAITING_ACTIVE":case"ACTIVE_LOCK":case"ACTIVE_ERROR":case"BACKGROUND_ERROR":Wr--,Ar=!1,this._watchState="OFF",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-active-error"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background-error"),this.fire(new i.n("trackuserlocationend"));break;case"BACKGROUND":this._watchState="ACTIVE_LOCK",this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-background"),this._lastKnownPosition&&this._updateCamera(this._lastKnownPosition),this.fire(new i.n("trackuserlocationstart")),this.fire(new i.n("userlocationfocus"));break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}switch(this._watchState){case"WAITING_ACTIVE":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"ACTIVE_LOCK":this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-active");break;case"OFF":break;default:throw new Error(`Unexpected watchState ${this._watchState}`)}if(this._watchState==="OFF"&&this._geolocationWatchID!==void 0)this._clearWatch();else if(this._geolocationWatchID===void 0){let Y;this._geolocateButton.classList.add("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","true"),Wr++,Wr>1?(Y={maximumAge:6e5,timeout:0},Ar=!0):(Y=this.options.positionOptions,Ar=!1),this._geolocationWatchID=window.navigator.geolocation.watchPosition(this._onSuccess,this._onError,Y)}}else window.navigator.geolocation.getCurrentPosition(this._onSuccess,this._onError,this.options.positionOptions),this._timeoutId=setTimeout(this._finish,1e4);return!0}_clearWatch(){window.navigator.geolocation.clearWatch(this._geolocationWatchID),this._geolocationWatchID=void 0,this._geolocateButton.classList.remove("maplibregl-ctrl-geolocate-waiting"),this._geolocateButton.setAttribute("aria-pressed","false"),this.options.showUserLocation&&this._updateMarker(null)}},a.GlobeControl=class{constructor(){this._toggleProjection=()=>{var Y;let d=(Y=this._map.getProjection())===null||Y===void 0?void 0:Y.type;this._map.setProjection(d!=="mercator"&&d?{type:"mercator"}:{type:"globe"}),this._updateGlobeIcon()},this._updateGlobeIcon=()=>{var Y;this._globeButton.classList.remove("maplibregl-ctrl-globe"),this._globeButton.classList.remove("maplibregl-ctrl-globe-enabled"),((Y=this._map.getProjection())===null||Y===void 0?void 0:Y.type)==="globe"?(this._globeButton.classList.add("maplibregl-ctrl-globe-enabled"),this._globeButton.title=this._map._getUIString("GlobeControl.Disable")):(this._globeButton.classList.add("maplibregl-ctrl-globe"),this._globeButton.title=this._map._getUIString("GlobeControl.Enable"))}}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._globeButton=_.create("button","maplibregl-ctrl-globe",this._container),_.create("span","maplibregl-ctrl-icon",this._globeButton).setAttribute("aria-hidden","true"),this._globeButton.type="button",this._globeButton.addEventListener("click",this._toggleProjection),this._updateGlobeIcon(),this._map.on("styledata",this._updateGlobeIcon),this._map.on("projectiontransition",this._updateGlobeIcon),this._container}onRemove(){this._container.remove(),this._map.off("styledata",this._updateGlobeIcon),this._map.off("projectiontransition",this._updateGlobeIcon),this._globeButton.removeEventListener("click",this._toggleProjection),this._map=void 0}},a.Hash=gh,a.ImageSource=qe,a.KeyboardHandler=ia,a.LngLatBounds=ie,a.LogoControl=mh,a.Map=Rt,a.MapLibreMap=Rt,a.MapMouseEvent=Xl,a.MapTouchEvent=cf,a.MapWheelEvent=jh,a.Marker=kr,a.NavigationControl=class{constructor(Y){this._updateZoomButtons=()=>{let d=this._map.getZoom(),P=d===this._map.getMaxZoom(),N=d===this._map.getMinZoom();this._zoomInButton.disabled=P,this._zoomOutButton.disabled=N,this._zoomInButton.setAttribute("aria-disabled",P.toString()),this._zoomOutButton.setAttribute("aria-disabled",N.toString())},this._rotateCompassArrow=()=>{this._compassIcon.style.transform=this.options.visualizePitch&&this.options.visualizeRoll?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateZ(${-this._map.transform.roll}deg) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizePitch?`scale(${1/Math.pow(Math.cos(this._map.transform.pitchInRadians),.5)}) rotateX(${this._map.transform.pitch}deg) rotateZ(${-this._map.transform.bearing}deg)`:this.options.visualizeRoll?`rotate(${-this._map.transform.bearing-this._map.transform.roll}deg)`:`rotate(${-this._map.transform.bearing}deg)`},this._setButtonTitle=(d,P)=>{let N=this._map._getUIString(`NavigationControl.${P}`);d.title=N,d.setAttribute("aria-label",N)},this.options=i.e({},ir,Y),this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._container.addEventListener("contextmenu",(d=>d.preventDefault())),this.options.showZoom&&(this._zoomInButton=this._createButton("maplibregl-ctrl-zoom-in",(d=>this._map.zoomIn({},{originalEvent:d}))),_.create("span","maplibregl-ctrl-icon",this._zoomInButton).setAttribute("aria-hidden","true"),this._zoomOutButton=this._createButton("maplibregl-ctrl-zoom-out",(d=>this._map.zoomOut({},{originalEvent:d}))),_.create("span","maplibregl-ctrl-icon",this._zoomOutButton).setAttribute("aria-hidden","true")),this.options.showCompass&&(this._compass=this._createButton("maplibregl-ctrl-compass",(d=>{this.options.visualizePitch?this._map.resetNorthPitch({},{originalEvent:d}):this._map.resetNorth({},{originalEvent:d})})),this._compassIcon=_.create("span","maplibregl-ctrl-icon",this._compass),this._compassIcon.setAttribute("aria-hidden","true"))}onAdd(Y){return this._map=Y,this.options.showZoom&&(this._setButtonTitle(this._zoomInButton,"ZoomIn"),this._setButtonTitle(this._zoomOutButton,"ZoomOut"),this._map.on("zoom",this._updateZoomButtons),this._updateZoomButtons()),this.options.showCompass&&(this._setButtonTitle(this._compass,"ResetBearing"),this.options.visualizePitch&&this._map.on("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.on("roll",this._rotateCompassArrow),this._map.on("rotate",this._rotateCompassArrow),this._rotateCompassArrow(),this._handler=new nr(this._map,this._compass,this.options.visualizePitch)),this._container}onRemove(){this._container.remove(),this.options.showZoom&&this._map.off("zoom",this._updateZoomButtons),this.options.showCompass&&(this.options.visualizePitch&&this._map.off("pitch",this._rotateCompassArrow),this.options.visualizeRoll&&this._map.off("roll",this._rotateCompassArrow),this._map.off("rotate",this._rotateCompassArrow),this._handler.off(),delete this._handler),delete this._map}_createButton(Y,d){let P=_.create("button",Y,this._container);return P.type="button",P.addEventListener("click",d),P}},a.Popup=class extends i.E{constructor(Y){super(),this._updateOpacity=()=>{this.options.locationOccludedOpacity!==void 0&&(this._container.style.opacity=this._map.transform.isLocationOccluded(this.getLngLat())?`${this.options.locationOccludedOpacity}`:"")},this.remove=()=>(this._content&&this._content.remove(),this._container&&(this._container.remove(),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("terrain",this._update),this._map.off("projectiontransition",this._update),this._map.off("mousemove",this._update),this._map.off("mouseup",this._update),this._map.off("drag",this._update),this._map._canvasContainer.classList.remove("maplibregl-track-pointer"),delete this._map,this.fire(new i.n("close"))),this),this._update=d=>{if(!this._map||!this._lngLat&&!this._trackPointer||!this._content)return;if(!this._container){if(this._container=_.create("div","maplibregl-popup",this._map.getContainer()),this._tip=_.create("div","maplibregl-popup-tip",this._container),this._container.appendChild(this._content),this.options.className)for(let de of this.options.className.split(" "))this._container.classList.add(de);this._closeButton&&this._closeButton.setAttribute("aria-label",this._map._getUIString("Popup.Close")),this._trackPointer&&this._container.classList.add("maplibregl-popup-track-pointer")}let P;if(this.options.maxWidth&&this._container.style.maxWidth!==this.options.maxWidth&&(this._container.style.maxWidth=this.options.maxWidth),this._lngLat=Vr(this._lngLat,this._flatPos,this._map.transform,this._trackPointer),d&&"point"in d&&d.point&&(P=d.point),this._trackPointer&&!P)return;let N=this._flatPos=this._pos=this._trackPointer&&P?P:this._map.project(this._lngLat);this._map.terrain&&(this._flatPos=this._trackPointer&&P?P:this._map.transform.locationToScreenPoint(this._lngLat));let H=this.options.anchor,$=Si(this.options.offset);if(!H){let de=this._container.offsetWidth,Ae=this._container.offsetHeight,Fe=(function(Ye){var st,dt,Pe,Xe;return Ye?{top:(st=Ye.top)!==null&&st!==void 0?st:0,right:(dt=Ye.right)!==null&&dt!==void 0?dt:0,bottom:(Pe=Ye.bottom)!==null&&Pe!==void 0?Pe:0,left:(Xe=Ye.left)!==null&&Xe!==void 0?Xe:0}:{top:0,right:0,bottom:0,left:0}})(this.options.padding),Ie;Ie=N.y+$.bottom.ythis._map.transform.height-Ae-Fe.bottom?["bottom"]:[],N.xthis._map.transform.width-de/2-Fe.right&&Ie.push("right"),H=Ie.length===0?"bottom":Ie.join("-")}let se=N.add($[H]);this.options.subpixelPositioning||(se=se.round()),this._container.style.transform=`${sr[H]} translate(${se.x}px,${se.y}px)`,br(this._container,H,"popup"),this._updateOpacity()},this._onClose=()=>{this.remove()},this.options=i.e(Object.create(ai),Y)}addTo(Y){return this._map&&this.remove(),this._map=Y,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._map.on("terrain",this._update),this._map.on("projectiontransition",this._update),this._update(),this._focusFirstElement(),this._trackPointer?(this._map.on("mousemove",this._update),this._map.on("mouseup",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")):this._map.on("move",this._update),this.fire(new i.n("open")),this}isOpen(){return!!this._map}getLngLat(){return this._lngLat}setLngLat(Y){return this._lngLat=i.W.convert(Y),this._pos=null,this._flatPos=null,this._trackPointer=!1,this._update(),this._map&&(this._map.on("move",this._update),this._map.off("mousemove",this._update),this._container&&this._container.classList.remove("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.remove("maplibregl-track-pointer")),this}trackPointer(){return this._trackPointer=!0,this._pos=null,this._flatPos=null,this._update(),this._map&&(this._map.off("move",this._update),this._map.on("mousemove",this._update),this._map.on("drag",this._update),this._container&&this._container.classList.add("maplibregl-popup-track-pointer"),this._map._canvasContainer.classList.add("maplibregl-track-pointer")),this}getElement(){return this._container}setText(Y){return this.setDOMContent(document.createTextNode(Y))}setHTML(Y){let d=document.createDocumentFragment(),P=document.createElement("body"),N;for(P.innerHTML=Y;N=P.firstChild,N;)d.appendChild(N);return this.setDOMContent(d)}getMaxWidth(){var Y;return(Y=this._container)===null||Y===void 0?void 0:Y.style.maxWidth}setMaxWidth(Y){return this.options.maxWidth=Y,this._update(),this}setDOMContent(Y){if(this._content)for(;this._content.hasChildNodes();)this._content.firstChild&&this._content.removeChild(this._content.firstChild);else this._content=_.create("div","maplibregl-popup-content",this._container);return this._content.appendChild(Y),this._createCloseButton(),this._update(),this._focusFirstElement(),this}addClassName(Y){return this._container&&this._container.classList.add(Y),this}removeClassName(Y){return this._container&&this._container.classList.remove(Y),this}setOffset(Y){return this.options.offset=Y,this._update(),this}toggleClassName(Y){if(this._container)return this._container.classList.toggle(Y)}setSubpixelPositioning(Y){this.options.subpixelPositioning=Y}setPadding(Y){this.options.padding=Y,this._update()}_createCloseButton(){this.options.closeButton&&(this._closeButton=_.create("button","maplibregl-popup-close-button",this._content),this._closeButton.type="button",this._closeButton.innerHTML="×",this._closeButton.addEventListener("click",this._onClose))}_focusFirstElement(){if(!this.options.focusAfterOpen||!this._container)return;let Y=this._container.querySelector(Mi);Y&&Y.focus()}},a.RasterDEMTileSource=De,a.RasterTileSource=be,a.ScaleControl=class{constructor(Y){this._onMove=()=>{zn(this._map,this._container,this.options)},this.setUnit=d=>{this.options.unit=d,zn(this._map,this._container,this.options)},this.options=Object.assign(Object.assign({},En),Y)}getDefaultPosition(){return"bottom-left"}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-scale",Y.getContainer()),this._map.on("move",this._onMove),this._onMove(),this._container}onRemove(){this._container.remove(),this._map.off("move",this._onMove),this._map=void 0}},a.ScrollZoomHandler=Ua,a.Style=Cc,a.TerrainControl=class{constructor(Y){this._toggleTerrain=()=>{this._map.getTerrain()?this._map.setTerrain(null):this._map.setTerrain(this.options),this._updateTerrainIcon()},this._updateTerrainIcon=()=>{this._terrainButton.classList.remove("maplibregl-ctrl-terrain"),this._terrainButton.classList.remove("maplibregl-ctrl-terrain-enabled"),this._map.terrain?(this._terrainButton.classList.add("maplibregl-ctrl-terrain-enabled"),this._terrainButton.title=this._map._getUIString("TerrainControl.Disable")):(this._terrainButton.classList.add("maplibregl-ctrl-terrain"),this._terrainButton.title=this._map._getUIString("TerrainControl.Enable"))},this.options=Y}onAdd(Y){return this._map=Y,this._container=_.create("div","maplibregl-ctrl maplibregl-ctrl-group"),this._terrainButton=_.create("button","maplibregl-ctrl-terrain",this._container),_.create("span","maplibregl-ctrl-icon",this._terrainButton).setAttribute("aria-hidden","true"),this._terrainButton.type="button",this._terrainButton.addEventListener("click",this._toggleTerrain),this._updateTerrainIcon(),this._map.on("terrain",this._updateTerrainIcon),this._container}onRemove(){this._container.remove(),this._map.off("terrain",this._updateTerrainIcon),this._map=void 0}},a.TwoFingersTouchPitchHandler=Bi,a.TwoFingersTouchRotateHandler=In,a.TwoFingersTouchZoomHandler=ln,a.TwoFingersTouchZoomRotateHandler=wi,a.VectorTileSource=me,a.VideoSource=we,a.addSourceType=(Y,d)=>i._(void 0,void 0,void 0,(function*(){if(Te(Y))throw new Error(`A source type called "${Y}" already exists.`);((P,N)=>{Ke[P]=N})(Y,d)})),a.clearPrewarmedResources=function(){let Y=ee;Y&&(Y.isPreloaded()&&Y.numActive()===1?(Y.release(q),ee=null):console.warn("Could not clear WebWorkers since there are active Map instances that still reference it. The pre-warmed WebWorker pool can only be cleared when all map instances have been removed with map.remove()"))},a.createTileMesh=lu,a.getGlobalDispatcher=ue,a.getMaxParallelImageRequests=function(){return i.c.MAX_PARALLEL_IMAGE_REQUESTS},a.getRTLTextPluginStatus=function(){return tt().getRTLTextPluginStatus()},a.getVersion=function(){return ya},a.getWorkerCount=function(){return U.workerCount},a.getWorkerUrl=function(){return i.c.WORKER_URL},a.importScriptInWorkers=function(Y){return ue().broadcast("IS",Y)},a.isTimeFrozen=function(){return v.isFrozen()},a.now=g,a.prewarm=function(){ye().acquire(q)},a.restoreNow=function(){v.restoreNow()},a.setMaxParallelImageRequests=function(Y){i.c.MAX_PARALLEL_IMAGE_REQUESTS=Y},a.setNow=function(Y){v.setNow(Y)},a.setRTLTextPlugin=function(Y,d){return tt().setRTLTextPlugin(Y,d)},a.setWorkerCount=function(Y){U.workerCount=Y},a.setWorkerUrl=function(Y){i.c.WORKER_URL=Y}}));var n=e;return n}))});var GWe=fe((I6r,VWe)=>{"use strict";var g_=Xt(),Btr=as().sanitizeHTML,Otr=oK(),OWe=zy();function NWe(e,t){this.subplot=e,this.uid=e.uid+"-"+t,this.index=t,this.idSource="source-"+this.uid,this.idLayer=OWe.layoutLayerPrefix+this.uid,this.sourceType=null,this.source=null,this.layerType=null,this.below=null,this.visible=!1}var qv=NWe.prototype;qv.update=function(t){this.visible?this.needsNewImage(t)?this.updateImage(t):this.needsNewSource(t)?(this.removeLayer(),this.updateSource(t),this.updateLayer(t)):this.needsNewLayer(t)?this.updateLayer(t):this.updateStyle(t):(this.updateSource(t),this.updateLayer(t)),this.visible=oD(t)};qv.needsNewImage=function(e){var t=this.subplot.map;return t.getSource(this.idSource)&&this.sourceType==="image"&&e.sourcetype==="image"&&(this.source!==e.source||JSON.stringify(this.coordinates)!==JSON.stringify(e.coordinates))};qv.needsNewSource=function(e){return this.sourceType!==e.sourcetype||JSON.stringify(this.source)!==JSON.stringify(e.source)||this.layerType!==e.type};qv.needsNewLayer=function(e){return this.layerType!==e.type||this.below!==this.subplot.belowLookup["layout-"+this.index]};qv.lookupBelow=function(){return this.subplot.belowLookup["layout-"+this.index]};qv.updateImage=function(e){var t=this.subplot.map;t.getSource(this.idSource).updateImage({url:e.source,coordinates:e.coordinates});var r=this.findFollowingMapLayerId(this.lookupBelow());r!==null&&this.subplot.map.moveLayer(this.idLayer,r)};qv.updateSource=function(e){var t=this.subplot.map;if(t.getSource(this.idSource)&&t.removeSource(this.idSource),this.sourceType=e.sourcetype,this.source=e.source,!!oD(e)){var r=Ntr(e);t.addSource(this.idSource,r)}};qv.findFollowingMapLayerId=function(e){if(e==="traces")for(var t=this.subplot.getMapLayers(),r=0;r0){for(var r=0;r0}function UWe(e){var t={},r={};switch(e.type){case"circle":g_.extendFlat(r,{"circle-radius":e.circle.radius,"circle-color":e.color,"circle-opacity":e.opacity});break;case"line":g_.extendFlat(r,{"line-width":e.line.width,"line-color":e.color,"line-opacity":e.opacity,"line-dasharray":e.line.dash});break;case"fill":g_.extendFlat(r,{"fill-color":e.color,"fill-outline-color":e.fill.outlinecolor,"fill-opacity":e.opacity});break;case"symbol":var n=e.symbol,a=Otr(n.textposition,n.iconsize);g_.extendFlat(t,{"icon-image":n.icon,"icon-size":n.iconsize/10,"text-field":n.text,"text-size":n.textfont.size,"text-anchor":a.anchor,"text-offset":a.offset,"symbol-placement":n.placement}),g_.extendFlat(r,{"icon-color":e.color,"text-color":n.textfont.color,"text-opacity":e.opacity});break;case"raster":g_.extendFlat(r,{"raster-fade-duration":0,"raster-opacity":e.opacity});break}return{layout:t,paint:r}}function Ntr(e){var t=e.sourcetype,r=e.source,n={type:t},a;return t==="geojson"?a="data":t==="vector"?a=typeof r=="string"?"url":"tiles":t==="raster"?(a="tiles",n.tileSize=256):t==="image"&&(a="url",n.coordinates=e.coordinates),n[a]=r,e.sourceattribution&&(n.attribution=Btr(e.sourceattribution)),n}VWe.exports=function(t,r,n){var a=new NWe(t,r);return a.update(n),a}});var QWe=fe((z6r,JWe)=>{"use strict";var hK=BWe(),lD=Xt(),WWe=Cg(),HWe=bi(),Utr=Yi(),Vtr=ed(),sD=kl(),YWe=$p(),Gtr=YWe.drawMode,Htr=YWe.selectMode,jtr=Ac().prepSelect,Wtr=Ac().clearOutline,Ytr=Ac().clearSelectionsCache,Xtr=Ac().selectOnClick,qy=zy(),Ztr=GWe();function XWe(e,t){this.id=t,this.gd=e;var r=e._fullLayout,n=e._context;this.container=r._glcontainer.node(),this.isStatic=n.staticPlot,this.uid=r._uid+"-"+this.id,this.div=null,this.xaxis=null,this.yaxis=null,this.createFramework(r),this.map=null,this.styleObj=null,this.traceHash={},this.layerList=[],this.belowLookup={},this.dragging=!1,this.wheeling=!1}var cc=XWe.prototype;cc.plot=function(e,t,r){var n=this,a;n.map?a=new Promise(function(i,o){n.updateMap(e,t,i,o)}):a=new Promise(function(i,o){n.createMap(e,t,i,o)}),r.push(a)};cc.createMap=function(e,t,r,n){var a=this,i=t[a.id],o=a.styleObj=KWe(i.style),s=i.bounds,l=s?[[s.west,s.south],[s.east,s.north]]:null;let u={container:a.div,style:o.style,center:dK(i.center),zoom:i.zoom,bearing:i.bearing,pitch:i.pitch,maxBounds:l,interactive:!a.isStatic,canvasContextAttributes:{preserveDrawingBuffer:a.isStatic},doubleClickZoom:!1,boxZoom:!1,attributionControl:!1},c=i._fitBounds;c&&(u.bounds=[[c.west,c.south],[c.east,c.north]],u.fitBoundsOptions={padding:qy.fitBoundsPadding});let f=a.map=new hK.Map(u).addControl(new hK.AttributionControl({compact:!0}));var v={};f.on("styleimagemissing",function(p){var x=p.id;if(!v[x]&&/^[a-zA-Z0-9-]+$/.test(x)){v[x]=!0;var _=new Image(15,15);_.onload=function(){f.addImage(x,_,{sdf:!0})},_.crossOrigin="Anonymous",_.src="https://cdn.jsdelivr.net/npm/@mapbox/maki@8.2.0/icons/"+x+".svg"}}),f.setTransformRequest(function(p){return p=p.replace("https://fonts.openmaptiles.org/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),p=p.replace("https://tiles.basemaps.cartocdn.com/fonts/Open Sans Extrabold","https://fonts.openmaptiles.org/Open Sans Extra Bold"),p=p.replace("https://fonts.openmaptiles.org/Open Sans Regular,Arial Unicode MS Regular","https://fonts.openmaptiles.org/Klokantech Noto Sans Regular"),{url:p}}),f._canvas.style.left="0px",f._canvas.style.top="0px",a.rejectOnError(n),a.isStatic||a.initFx(e,t);var g=[];g.push(new Promise(function(p){f.once("load",p)})),g=g.concat(WWe.fetchTraceGeoData(e)),Promise.all(g).then(function(){c&&ZWe(a,i),$We(a,i),a.fillBelowLookup(e,t),a.updateData(e),a.updateLayout(t),a.resolveOnRender(r)}).catch(n)};cc.updateMap=function(e,t,r,n){var a=this,i=a.map,o=t[this.id];a.rejectOnError(n);var s=[],l=KWe(o.style);JSON.stringify(a.styleObj)!==JSON.stringify(l)&&(a.styleObj=l,i.setStyle(l.style),a.traceHash={},s.push(new Promise(function(u){i.once("styledata",u)}))),s=s.concat(WWe.fetchTraceGeoData(e)),Promise.all(s).then(function(){a.fillBelowLookup(e,t),a.updateData(e);let u=o._fitBounds;u&&(i.fitBounds([[u.west,u.south],[u.east,u.north]],{padding:qy.fitBoundsPadding,animate:!1}),ZWe(a,o),$We(a,o)),a.updateLayout(t),a.resolveOnRender(r)}).catch(n)};function ZWe(e,t){let{center:r,zoom:n}=e.getView();t._input.center=t.center=r,t._input.zoom=t.zoom=n,t._input._fitView={center:zo({},r),zoom:n}}function $We(e,t){let r=e.getView();e.viewInitial={center:lD.extendFlat({},r.center),bearing:t.bearing,pitch:t.pitch,zoom:r.zoom}}cc.fillBelowLookup=function(e,t){var r=t[this.id],n=r.layers,a,i,o=this.belowLookup={},s=!1;for(a=0;a1)for(a=0;at.project(n).x,_subplot:t},t.yaxis={_id:"y",c2p:n=>t.project(n).y,_subplot:t},t.updateFramework(e),t.mockAxis={type:"linear",showexponent:"all",exponentformat:"B"},Utr.setConvert(t.mockAxis,e)};cc.initFx=function(e,t){var r=this,n=r.gd,a=r.map;a.on("moveend",function(s){if(r.map){var l=n._fullLayout;if(s.originalEvent||r.wheeling){var u=l[r.id];HWe.call("_storeDirectGUIEdit",n.layout,l._preGUI,r.getViewEdits(u));var c=r.getView();u._input.center=u.center=c.center,u._input.zoom=u.zoom=c.zoom,u._input.bearing=u.bearing=c.bearing,u._input.pitch=u.pitch=c.pitch,n.emit("plotly_relayout",r.getViewEditsWithDerived(c))}s.originalEvent&&s.originalEvent.type==="mouseup"?r.dragging=!1:r.wheeling&&(r.wheeling=!1),l&&l._rehover&&l._rehover()}}),a.on("wheel",function(){r.wheeling=!0}),a.on("mousemove",function(s){var l=r.div.getBoundingClientRect(),u=[s.originalEvent.offsetX,s.originalEvent.offsetY];s.target.getBoundingClientRect=function(){return l},r.xaxis.p2c=function(){return a.unproject(u).lng},r.yaxis.p2c=function(){return a.unproject(u).lat},n._fullLayout._rehover=function(){n._fullLayout._hoversubplot===r.id&&n._fullLayout[r.id]&&sD.hover(n,s,r.id)},sD.hover(n,s,r.id),n._fullLayout._hoversubplot=r.id});function i(){sD.loneUnhover(t._hoverlayer)}a.on("dragstart",function(){r.dragging=!0,i()}),a.on("zoomstart",i),a.on("mouseout",function(){n._fullLayout._hoversubplot=null});function o(){var s=r.getView();n.emit("plotly_relayouting",r.getViewEditsWithDerived(s))}a.on("drag",o),a.on("zoom",o),a.on("dblclick",function(){var s=n._fullLayout[r.id];HWe.call("_storeDirectGUIEdit",n.layout,n._fullLayout._preGUI,r.getViewEdits(s));var l=r.viewInitial;a.setCenter(dK(l.center)),a.setZoom(l.zoom),a.setBearing(l.bearing),a.setPitch(l.pitch);var u=r.getView();s._input.center=s.center=u.center,s._input.zoom=s.zoom=u.zoom,s._input.bearing=s.bearing=u.bearing,s._input.pitch=s.pitch=u.pitch,n.emit("plotly_doubleclick",null),n.emit("plotly_relayout",r.getViewEditsWithDerived(u))}),r.clearOutline=function(){Ytr(r.dragOptions),Wtr(r.dragOptions.gd)},r.onClickInPanFn=function(s){return function(l){var u=n._fullLayout.clickmode;u.indexOf("select")>-1&&Xtr(l.originalEvent,n,[r.xaxis],[r.yaxis],r.id,s),u.indexOf("event")>-1&&sD.click(n,l.originalEvent)}}};cc.updateFx=function(e){var t=this,r=t.map,n=t.gd;if(t.isStatic)return;function a(l){var u=t.map.unproject(l);return[u.lng,u.lat]}var i=e.dragmode,o;o=function(l,u){if(u.isRect){var c=l.range={};c[t.id]=[a([u.xmin,u.ymin]),a([u.xmax,u.ymax])]}else{var f=l.lassoPoints={};f[t.id]=u.map(a)}};var s=t.dragOptions;t.dragOptions=lD.extendDeep(s||{},{dragmode:e.dragmode,element:t.div,gd:n,plotinfo:{id:t.id,domain:e[t.id].domain,xaxis:t.xaxis,yaxis:t.yaxis,fillRangeItems:o},xaxes:[t.xaxis],yaxes:[t.yaxis],subplot:t.id}),r.off("click",t.onClickInPanHandler),Htr(i)||Gtr(i)?(r.dragPan.disable(),r.on("zoomstart",t.clearOutline),t.dragOptions.prepFn=function(l,u,c){jtr(l,u,c,t.dragOptions,i)},Vtr.init(t.dragOptions)):(r.dragPan.enable(),r.off("zoomstart",t.clearOutline),t.div.onmousedown=null,t.div.ontouchstart=null,t.div.removeEventListener("touchstart",t.div._ontouchstart),t.onClickInPanHandler=t.onClickInPanFn(t.dragOptions),r.on("click",t.onClickInPanHandler))};cc.updateFramework=function(e){var t=e[this.id].domain,r=e._size,n=this.div.style;n.width=r.w*(t.x[1]-t.x[0])+"px",n.height=r.h*(t.y[1]-t.y[0])+"px",n.left=r.l+t.x[0]*r.w+"px",n.top=r.t+(1-t.y[1])*r.h+"px",this.xaxis._offset=r.l+t.x[0]*r.w,this.xaxis._length=r.w*(t.x[1]-t.x[0]),this.yaxis._offset=r.t+(1-t.y[1])*r.h,this.yaxis._length=r.h*(t.y[1]-t.y[0])};cc.updateLayers=function(e){var t=e[this.id],r=t.layers,n=this.layerList,a;if(r.length!==n.length){for(a=0;a$tr});function $tr(e,t){let r=[];for(let l of e){if(l.subplot!==t||l.visible!==!0)continue;if(l.type==="choroplethmap")return null;let{lat:u,lon:c}=l;if(!c||!u)continue;let f=Math.min(c.length,u.length);for(let v=0;v{"use strict";eYe=$0(Cg())});var aYe=fe((B6r,iYe)=>{"use strict";var vK=Xt(),Ktr=b2(),Jtr=Ah(),nYe=ZM(),{getMapFitBounds:Qtr}=(rYe(),Gs(tYe));iYe.exports=function(t,r,n){Ktr(t,r,n,{type:"map",attributes:nYe,handleDefaults:err,partition:"y",fullData:n})};function err(e,t,r,n){r("style"),r("center.lon"),r("center.lat"),r("zoom"),r("bearing"),r("pitch");let a=r("fitbounds");var i=r("bounds.west"),o=r("bounds.east"),s=r("bounds.south"),l=r("bounds.north");(i===void 0||o===void 0||s===void 0||l===void 0)&&delete t.bounds,Jtr(e,t,{name:"layers",handleItemDefaults:trr}),t._fitBounds=null;let{_fitView:{center:u,zoom:c}={},center:f,zoom:v}=e,g=(f==null?void 0:f.lon)===(u==null?void 0:u.lon)&&(f==null?void 0:f.lat)===(u==null?void 0:u.lat)&&v===c;if(a&&g){let p=Qtr(n.fullData,n.id);p&&(t._fitBounds=p)}t._input=e}function trr(e,t){function r(l,u){return vK.coerce(e,t,nYe.layers,l,u)}var n=r("visible");if(n){var a=r("sourcetype"),i=a==="raster"||a==="image";r("source"),r("sourceattribution"),a==="vector"&&r("sourcelayer"),a==="image"&&r("coordinates");var o;i&&(o="raster");var s=r("type",o);i&&s!=="raster"&&(s=t.type="raster",vK.log("Source types *raster* and *image* must drawn *raster* layer type.")),r("below"),r("color"),r("opacity"),r("minzoom"),r("maxzoom"),s==="circle"&&r("circle.radius"),s==="line"&&(r("line.width"),r("line.dash")),s==="fill"&&r("fill.outlinecolor"),s==="symbol"&&(r("symbol.icon"),r("symbol.iconsize"),r("symbol.text"),vK.coerceFont(r,"symbol.textfont",void 0,{noFontVariant:!0,noFontShadow:!0,noFontLineposition:!0,noFontTextcase:!0}),r("symbol.textposition"),r("symbol.placement"))}}});var uD=fe(V0=>{"use strict";var pK=Xt(),oYe=pK.strTranslate,rrr=pK.strScale,nrr=jf().getSubplotCalcData,irr=Q0(),arr=xi(),sYe=ea(),orr=as(),srr=QWe(),By="map";V0.name=By;V0.attr="subplot";V0.idRoot=By;V0.idRegex=V0.attrRegex=pK.counterRegex(By);V0.attributes={subplot:{valType:"subplotid",dflt:"map",editType:"calc"}};V0.layoutAttributes=ZM();V0.supplyLayoutDefaults=aYe();V0.plot=function(t){for(var r=t._fullLayout,n=t.calcdata,a=r._subplots[By],i=0;ix/2){var _=f.split("|").join("
");g.text(_).attr("data-unformatted",_).call(orr.convertToTspans,e),p=sYe.bBox(g.node())}g.attr("transform",oYe(-3,-p.height+8)),v.insert("rect",".static-attribution").attr({x:-p.width-6,y:-p.height-3,width:p.width+6,height:p.height+3,fill:"rgba(255, 255, 255, 0.75)"});var y=1;p.width+6>x&&(y=x/(p.width+6));var C=[n.l+n.w*o.x[1],n.t+n.h*(1-o.y[0])];v.attr("transform",oYe(C[0],C[1])+rrr(y))}};V0.updateFx=function(e){for(var t=e._fullLayout,r=t._subplots[By],n=0;n{"use strict";lYe.exports={attributes:eD(),supplyDefaults:gWe(),colorbar:Zf(),formatLabels:aK(),calc:mX(),plot:LWe(),hoverPoints:aD().hoverPoints,eventData:RWe(),selectPoints:zWe(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.update(t)}},moduleType:"trace",name:"scattermap",basePlotModule:uD(),categories:["map","gl","symbols","showLegend","scatter-like"],meta:{}}});var fYe=fe((U6r,cYe)=>{"use strict";cYe.exports=uYe()});var gK=fe((V6r,hYe)=>{"use strict";var Bg=gM(),lrr=_s(),{hovertemplateAttrs:urr,templatefallbackAttrs:crr}=Oo(),frr=Ho(),Oy=ta().extendFlat;hYe.exports=Oy({locations:{valType:"data_array",editType:"calc"},z:{valType:"data_array",editType:"calc"},geojson:{valType:"any",editType:"calc"},featureidkey:Oy({},Bg.featureidkey,{}),below:{valType:"string",editType:"plot"},text:Bg.text,hovertext:Bg.hovertext,marker:{line:{color:Oy({},Bg.marker.line.color,{editType:"plot"}),width:Oy({},Bg.marker.line.width,{editType:"plot"}),editType:"calc"},opacity:Oy({},Bg.marker.opacity,{editType:"plot"}),editType:"calc"},selected:{marker:{opacity:Oy({},Bg.selected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},unselected:{marker:{opacity:Oy({},Bg.unselected.marker.opacity,{editType:"plot"}),editType:"plot"},editType:"plot"},hoverinfo:Bg.hoverinfo,hovertemplate:urr({},{keys:["properties"]}),hovertemplatefallback:crr(),showlegend:Oy({},frr.showlegend,{dflt:!1})},lrr("",{cLetter:"z",editTypeOverride:"calc"}))});var vYe=fe((G6r,dYe)=>{"use strict";var QM=Xt(),hrr=Vc(),drr=gK();dYe.exports=function(t,r,n,a){function i(c,f){return QM.coerce(t,r,drr,c,f)}var o=i("locations"),s=i("z"),l=i("geojson");if(!QM.isArrayOrTypedArray(o)||!o.length||!QM.isArrayOrTypedArray(s)||!s.length||!(typeof l=="string"&&l!==""||QM.isPlainObject(l))){r.visible=!1;return}i("featureidkey"),r._length=Math.min(o.length,s.length),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback");var u=i("marker.line.width");u&&i("marker.line.color"),i("marker.opacity"),hrr(t,r,a,i,{prefix:"",cLetter:"z"}),QM.coerceSelectionMarkerOpacity(r,i)}});var mK=fe((H6r,mYe)=>{"use strict";var vrr=aa(),Og=Xt(),prr=js(),grr=ea(),mrr=cM().makeBlank,pYe=Cg();function yrr(e){var t=e[0].trace,r=t.visible===!0&&t._length!==0,n={layout:{visibility:"none"},paint:{}},a={layout:{visibility:"none"},paint:{}},i=t._opts={fill:n,line:a,geojson:mrr()};if(!r)return i;var o=pYe.extractTraceFeature(e);if(!o)return i;var s=prr.makeColorScaleFuncFromTrace(t),l=t.marker,u=l.line||{},c;Og.isArrayOrTypedArray(l.opacity)&&(c=function(C){var k=C.mo;return vrr(k)?+Og.constrain(k,0,1):0});var f;Og.isArrayOrTypedArray(u.color)&&(f=function(C){return C.mlc});var v;Og.isArrayOrTypedArray(u.width)&&(v=function(C){return C.mlw});for(var g=0;g{"use strict";var xYe=mK().convert,xrr=mK().convertOnSelect,yYe=zy().traceLayerPrefix;function _Ye(e,t){this.type="choroplethmap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["fill",yYe+t+"-fill"],["line",yYe+t+"-line"]],this.below=null}var F5=_Ye.prototype;F5.update=function(e){this._update(xYe(e)),e[0].trace._glTrace=this};F5.updateOnSelect=function(e){this._update(xrr(e))};F5._update=function(e){var t=this.subplot,r=this.layerList,n=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(e.geojson),n!==this.below&&(this._removeLayers(),this._addLayers(e,n),this.below=n);for(var a=0;a=0;r--)e.removeLayer(t[r][1])};F5.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};bYe.exports=function(t,r){var n=r[0].trace,a=new _Ye(t,n.uid),i=a.sourceId,o=xYe(r),s=a.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(i,{type:"geojson",data:o.geojson}),a._addLayers(o,s),r[0].trace._glTrace=a,a}});var AYe=fe((W6r,TYe)=>{"use strict";TYe.exports={attributes:gK(),supplyDefaults:vYe(),colorbar:H3(),calc:$X(),plot:wYe(),hoverPoints:JX(),eventData:QX(),selectPoints:eZ(),styleOnSelect:function(e,t){if(t){var r=t[0].trace;r._glTrace.updateOnSelect(t)}},getBelow:function(e,t){for(var r=t.getMapLayers(),n=r.length-2;n>=0;n--){var a=r[n].id;if(typeof a=="string"&&a.indexOf("water")===0){for(var i=n+1;i{"use strict";MYe.exports=AYe()});var xK=fe((X6r,kYe)=>{"use strict";var _rr=_s(),{hovertemplateAttrs:brr,templatefallbackAttrs:wrr}=Oo(),EYe=Ho(),cD=eD(),yK=ta().extendFlat;kYe.exports=yK({lon:cD.lon,lat:cD.lat,z:{valType:"data_array",editType:"calc"},radius:{valType:"number",editType:"plot",arrayOk:!0,min:1,dflt:30},below:{valType:"string",editType:"plot"},text:cD.text,hovertext:cD.hovertext,hoverinfo:yK({},EYe.hoverinfo,{flags:["lon","lat","z","text","name"]}),hovertemplate:brr(),hovertemplatefallback:wrr(),showlegend:yK({},EYe.showlegend,{dflt:!1})},_rr("",{cLetter:"z",editTypeOverride:"calc"}))});var LYe=fe((Z6r,CYe)=>{"use strict";var Trr=Xt(),Arr=Vc(),Mrr=xK();CYe.exports=function(t,r,n,a){function i(u,c){return Trr.coerce(t,r,Mrr,u,c)}var o=i("lon")||[],s=i("lat")||[],l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,i("z"),i("radius"),i("below"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),Arr(t,r,a,i,{prefix:"",cLetter:"z"})}});var DYe=fe(($6r,FYe)=>{"use strict";var _K=aa(),Srr=Xt().isArrayOrTypedArray,bK=Wa().BADNUM,Err=Mh(),PYe=Xt()._;FYe.exports=function(t,r){for(var n=r._length,a=new Array(n),i=r.z,o=Srr(i)&&i.length,s=0;s{"use strict";var krr=aa(),wK=Xt(),RYe=ni(),IYe=js(),zYe=Wa().BADNUM,Crr=cM().makeBlank;qYe.exports=function(t){var r=t[0].trace,n=r.visible===!0&&r._length!==0,a={layout:{visibility:"none"},paint:{}},i=r._opts={heatmap:a,geojson:Crr()};if(!n)return i;var o=[],s,l=r.z,u=r.radius,c=wK.isArrayOrTypedArray(l)&&l.length,f=wK.isArrayOrTypedArray(u);for(s=0;s0?+u[s]:0),o.push({type:"Feature",geometry:{type:"Point",coordinates:g},properties:p})}}var _=IYe.extractOpts(r),y=_.reversescale?IYe.flipScale(_.colorscale):_.colorscale,C=y[0][1],k=RYe.opacity(C)<1?C:RYe.addOpacity(C,0),S=["interpolate",["linear"],["heatmap-density"],0,k];for(s=1;s{"use strict";var OYe=BYe(),Lrr=zy().traceLayerPrefix;function NYe(e,t){this.type="densitymap",this.subplot=e,this.uid=t,this.sourceId="source-"+t,this.layerList=[["heatmap",Lrr+t+"-heatmap"]],this.below=null}var fD=NYe.prototype;fD.update=function(e){var t=this.subplot,r=this.layerList,n=OYe(e),a=t.belowLookup["trace-"+this.uid];t.map.getSource(this.sourceId).setData(n.geojson),a!==this.below&&(this._removeLayers(),this._addLayers(n,a),this.below=a);for(var i=0;i=0;r--)e.removeLayer(t[r][1])};fD.dispose=function(){var e=this.subplot.map;this._removeLayers(),e.removeSource(this.sourceId)};UYe.exports=function(t,r){var n=r[0].trace,a=new NYe(t,n.uid),i=a.sourceId,o=OYe(r),s=a.below=t.belowLookup["trace-"+n.uid];return t.map.addSource(i,{type:"geojson",data:o.geojson}),a._addLayers(o,s),a}});var HYe=fe((Q6r,GYe)=>{"use strict";var Prr=Yi(),Frr=aD().hoverPoints,Drr=aD().getExtraText;GYe.exports=function(t,r,n){var a=Frr(t,r,n);if(a){var i=a[0],o=i.cd,s=o[0].trace,l=o[i.index];if(delete i.color,"z"in l){var u=i.subplot.mockAxis;i.z=l.z,i.zLabel=Prr.tickText(u,u.c2l(l.z),"hover").text}return i.extraText=Drr(s,l,o[0].t.labels),[i]}}});var WYe=fe((eMr,jYe)=>{"use strict";jYe.exports=function(t,r){return t.lon=r.lon,t.lat=r.lat,t.z=r.z,t}});var XYe=fe((tMr,YYe)=>{"use strict";YYe.exports={attributes:xK(),supplyDefaults:LYe(),colorbar:H3(),formatLabels:aK(),calc:DYe(),plot:VYe(),hoverPoints:HYe(),eventData:WYe(),getBelow:function(e,t){for(var r=t.getMapLayers(),n=0;n{"use strict";ZYe.exports=XYe()});var AK=fe((iMr,tXe)=>{"use strict";var Rrr=Ds(),Irr=Ho(),KYe=tc(),TK=hb(),zrr=nl().attributes,{hovertemplateAttrs:JYe,templatefallbackAttrs:QYe}=Oo(),qrr=_s(),Brr=Mo().templatedArray,Orr=pl().descriptionOnlyNumbers,eXe=ta().extendFlat,Nrr=rl().overrideAll,nMr=tXe.exports=Nrr({hoverinfo:eXe({},Irr.hoverinfo,{flags:[],arrayOk:!1}),hoverlabel:TK.hoverlabel,domain:zrr({name:"sankey",trace:!0}),orientation:{valType:"enumerated",values:["v","h"],dflt:"h"},direction:{valType:"enumerated",values:["forward","reversed"],dflt:"forward"},valueformat:{valType:"string",dflt:".3s",description:Orr("value")},valuesuffix:{valType:"string",dflt:""},arrangement:{valType:"enumerated",values:["snap","perpendicular","freeform","fixed"],dflt:"snap"},textfont:Rrr({autoShadowDflt:!0}),customdata:void 0,node:{label:{valType:"data_array",dflt:[]},groups:{valType:"info_array",impliedEdits:{x:[],y:[]},dimensions:2,freeLength:!0,dflt:[],items:{valType:"number",editType:"calc"}},x:{valType:"data_array",dflt:[]},y:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:KYe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:.5,arrayOk:!0}},pad:{valType:"number",arrayOk:!1,min:0,dflt:20},thickness:{valType:"number",arrayOk:!1,min:1,dflt:20},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:TK.hoverlabel,hovertemplate:JYe({},{keys:["value","label"]}),hovertemplatefallback:QYe(),align:{valType:"enumerated",values:["justify","left","right","center"],dflt:"justify"},sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}},link:{arrowlen:{valType:"number",min:0,dflt:0},label:{valType:"data_array",dflt:[]},color:{valType:"color",arrayOk:!0},hovercolor:{valType:"color",arrayOk:!0},customdata:{valType:"data_array",editType:"calc"},line:{color:{valType:"color",dflt:KYe.defaultLine,arrayOk:!0},width:{valType:"number",min:0,dflt:0,arrayOk:!0}},source:{valType:"data_array",dflt:[]},target:{valType:"data_array",dflt:[]},value:{valType:"data_array",dflt:[]},hoverinfo:{valType:"enumerated",values:["all","none","skip"],dflt:"all"},hoverlabel:TK.hoverlabel,hovertemplate:JYe({},{keys:["value","label"]}),hovertemplatefallback:QYe(),colorscales:Brr("concentrationscales",{editType:"calc",label:{valType:"string",editType:"calc",dflt:""},cmax:{valType:"number",editType:"calc",dflt:1},cmin:{valType:"number",editType:"calc",dflt:0},colorscale:eXe(qrr().colorscale,{dflt:[[0,"white"],[1,"black"]]})}),sort:{valType:"enumerated",values:["auto","input"],dflt:"auto"}}},"calc","nested")});var aXe=fe((aMr,iXe)=>{"use strict";var D5=Xt(),hD=AK(),m_=ni(),Urr=nl().defaults,rXe=AT(),nXe=Mo(),Vrr=Ah();iXe.exports=function(t,r,n,a){function i(S,L){return D5.coerce(t,r,hD,S,L)}var o=D5.extendDeep(a.hoverlabel,t.hoverlabel),s=t.node,l=nXe.newContainer(r,"node");function u(S,L){return D5.coerce(s,l,hD.node,S,L)}u("label"),u("groups"),u("x"),u("y"),u("pad"),u("thickness"),u("line.color"),u("line.width"),u("hoverinfo",t.hoverinfo),rXe(s,l,u,o),u("hovertemplate"),u("align"),u("sort");var c=a.colorway;let f=S=>c[S%c.length];u("color",l.label.map((S,L)=>m_.addOpacity(f(L),.8))),u("customdata");var v=t.link||{},g=nXe.newContainer(r,"link");function p(S,L){return D5.coerce(v,g,hD.link,S,L)}p("label"),p("arrowlen"),p("source"),p("target"),p("value"),p("line.color"),p("line.width"),p("hoverinfo",t.hoverinfo),rXe(v,g,p,o),p("hovertemplate"),p("sort");var x=m_.luminosity(a.paper_bgcolor)<.333,_=x?"rgba(255, 255, 255, 0.6)":"rgba(0, 0, 0, 0.2)",y=p("color",_);function C(S){if(!m_.isValid(S))return S;let L=m_.opacity(S);return L<=.8?m_.addOpacity(S,L+.2):x?m_.brighten(S,10):m_.adjustLightness(S,-10)}p("hovercolor",Array.isArray(y)?y.map(C):C(y)),p("customdata"),Vrr(v,g,{name:"colorscales",handleItemDefaults:Grr}),Urr(r,a,i),i("orientation"),i("direction"),i("valueformat"),i("valuesuffix");let k=l.x.length&&l.y.length?"freeform":void 0;i("arrangement",k),D5.coerceFont(i,"textfont",a.font,{autoShadowDflt:!0}),r._length=null};function Grr(e,t){function r(n,a){return D5.coerce(e,t,hD.link.colorscales,n,a)}r("label"),r("cmin"),r("cmax"),r("colorscale")}});var MK=fe((oMr,oXe)=>{"use strict";oXe.exports=Hrr;function Hrr(e){for(var t=e.length,r=new Array(t),n=new Array(t),a=new Array(t),i=new Array(t),o=new Array(t),s=new Array(t),l=0;l0;){_=C[C.length-1];var k=e[_];if(i[_]=0&&s[_].push(o[L])}i[_]=S}else{if(n[_]===r[_]){for(var w=[],A=[],T=0,S=y.length-1;S>=0;--S){var m=y[S];if(a[m]=!1,w.push(m),A.push(s[m]),T+=s[m].length,o[m]=c.length,m===_){y.length=S;break}}c.push(w);for(var F=new Array(T),S=0;S{"use strict";var jrr=MK(),R5=Xt(),Wrr=L1().wrap,eS=R5.isArrayOrTypedArray,sXe=R5.isIndex,lXe=js();function Yrr(e){var t=e.node,r=e.link,n=[],a=eS(r.color),i=eS(r.hovercolor),o=eS(r.customdata),s={},l={},u=r.colorscales.length,c;for(c=0;cp&&(p=r.source[c]),r.target[c]>p&&(p=r.target[c]);var x=p+1;e.node._count=x;var _,y=e.node.groups,C={};for(c=0;c0&&sXe(T,x)&&sXe(m,x)&&!(C.hasOwnProperty(T)&&C.hasOwnProperty(m)&&C[T]===C[m])){C.hasOwnProperty(m)&&(m=C[m]),C.hasOwnProperty(T)&&(T=C[T]),T=+T,m=+m,s[T]=s[m]=!0;var F="";r.label&&r.label[c]&&(F=r.label[c]);var E=null;F&&l.hasOwnProperty(F)&&(E=l[F]),n.push({pointNumber:c,label:F,color:a?r.color[c]:r.color,hovercolor:i?r.hovercolor[c]:r.hovercolor,customdata:o?r.customdata[c]:r.customdata,concentrationscale:E,source:T,target:m,value:+A}),w.source.push(T),w.target.push(m)}}var I=x+y.length,R=eS(t.color),B=eS(t.customdata),O=[];for(c=0;cx-1,childrenNodes:[],pointNumber:c,label:V,color:R?t.color[c]:t.color,customdata:B?t.customdata[c]:t.customdata})}var j=!1;return Xrr(I,w.source,w.target)&&(j=!0),{circular:j,links:n,nodes:O,groups:y,groupLookup:C}}function Xrr(e,t,r){for(var n=R5.init2dArray(e,0),a=0;a1})}uXe.exports=function(t,r){var n=Yrr(r);return Wrr({circular:n.circular,_nodes:n.nodes,_links:n.links,_groups:n.groups,_groupLookup:n.groupLookup})}});var hXe=fe((dD,fXe)=>{(function(e,t){typeof dD=="object"&&typeof fXe!="undefined"?t(dD):(e=e||self,t(e.d3=e.d3||{}))})(dD,function(e){"use strict";function t(A){var T=+this._x.call(null,A),m=+this._y.call(null,A);return r(this.cover(T,m),T,m,A)}function r(A,T,m,F){if(isNaN(T)||isNaN(m))return A;var E,I=A._root,R={data:F},B=A._x0,O=A._y0,V=A._x1,j=A._y1,q,U,J,ee,ce,ye,xe,ue;if(!I)return A._root=R,A;for(;I.length;)if((ce=T>=(q=(B+V)/2))?B=q:V=q,(ye=m>=(U=(O+j)/2))?O=U:j=U,E=I,!(I=I[xe=ye<<1|ce]))return E[xe]=R,A;if(J=+A._x.call(null,I.data),ee=+A._y.call(null,I.data),T===J&&m===ee)return R.next=I,E?E[xe]=R:A._root=R,A;do E=E?E[xe]=new Array(4):A._root=new Array(4),(ce=T>=(q=(B+V)/2))?B=q:V=q,(ye=m>=(U=(O+j)/2))?O=U:j=U;while((xe=ye<<1|ce)===(ue=(ee>=U)<<1|J>=q));return E[ue]=I,E[xe]=R,A}function n(A){var T,m,F=A.length,E,I,R=new Array(F),B=new Array(F),O=1/0,V=1/0,j=-1/0,q=-1/0;for(m=0;mj&&(j=E),Iq&&(q=I));if(O>j||V>q)return this;for(this.cover(O,V).cover(j,q),m=0;mA||A>=E||F>T||T>=I;)switch(V=(Tj||(B=ee.y0)>q||(O=ee.x1)=xe)<<1|A>=ye)&&(ee=U[U.length-1],U[U.length-1]=U[U.length-1-ce],U[U.length-1-ce]=ee)}else{var ue=A-+this._x.call(null,J.data),K=T-+this._y.call(null,J.data),_e=ue*ue+K*K;if(_e=(U=(R+O)/2))?R=U:O=U,(ce=q>=(J=(B+V)/2))?B=J:V=J,T=m,!(m=m[ye=ce<<1|ee]))return this;if(!m.length)break;(T[ye+1&3]||T[ye+2&3]||T[ye+3&3])&&(F=T,xe=ye)}for(;m.data!==A;)if(E=m,!(m=m.next))return this;return(I=m.next)&&delete m.next,E?(I?E.next=I:delete E.next,this):T?(I?T[ye]=I:delete T[ye],(m=T[0]||T[1]||T[2]||T[3])&&m===(T[3]||T[2]||T[1]||T[0])&&!m.length&&(F?F[xe]=m:this._root=m),this):(this._root=I,this)}function c(A){for(var T=0,m=A.length;T{(function(e,t){t(typeof vD=="object"&&typeof dXe!="undefined"?vD:e.d3=e.d3||{})})(vD,(function(e){"use strict";var t="$";function r(){}r.prototype=n.prototype={constructor:r,has:function(x){return t+x in this},get:function(x){return this[t+x]},set:function(x,_){return this[t+x]=_,this},remove:function(x){var _=t+x;return _ in this&&delete this[_]},clear:function(){for(var x in this)x[0]===t&&delete this[x]},keys:function(){var x=[];for(var _ in this)_[0]===t&&x.push(_.slice(1));return x},values:function(){var x=[];for(var _ in this)_[0]===t&&x.push(this[_]);return x},entries:function(){var x=[];for(var _ in this)_[0]===t&&x.push({key:_.slice(1),value:this[_]});return x},size:function(){var x=0;for(var _ in this)_[0]===t&&++x;return x},empty:function(){for(var x in this)if(x[0]===t)return!1;return!0},each:function(x){for(var _ in this)_[0]===t&&x(this[_],_.slice(1),this)}};function n(x,_){var y=new r;if(x instanceof r)x.each(function(w,A){y.set(A,w)});else if(Array.isArray(x)){var C=-1,k=x.length,S;if(_==null)for(;++C=x.length)return y!=null&&w.sort(y),C!=null?C(w):w;for(var F=-1,E=w.length,I=x[A++],R,B,O=n(),V,j=T();++Fx.length)return w;var T,m=_[A-1];return C!=null&&A>=x.length?T=w.entries():(T=[],w.each(function(F,E){T.push({key:E,values:L(F,A)})})),m!=null?T.sort(function(F,E){return m(F.key,E.key)}):T}return k={object:function(w){return S(w,0,i,o)},map:function(w){return S(w,0,s,l)},entries:function(w){return L(S(w,0,s,l),0)},key:function(w){return x.push(w),k},sortKeys:function(w){return _[x.length-1]=w,k},sortValues:function(w){return y=w,k},rollup:function(w){return C=w,k}}}function i(){return{}}function o(x,_,y){x[_]=y}function s(){return n()}function l(x,_,y){x.set(_,y)}function u(){}var c=n.prototype;u.prototype=f.prototype={constructor:u,has:c.has,add:function(x){return x+="",this[t+x]=x,this},remove:c.remove,clear:c.clear,values:c.keys,size:c.size,empty:c.empty,each:c.each};function f(x,_){var y=new u;if(x instanceof u)x.each(function(S){y.add(S)});else if(x){var C=-1,k=x.length;if(_==null)for(;++C{(function(e,t){typeof pD=="object"&&typeof vXe!="undefined"?t(pD):(e=e||self,t(e.d3=e.d3||{}))})(pD,function(e){"use strict";var t={value:function(){}};function r(){for(var s=0,l=arguments.length,u={},c;s=0&&(c=u.slice(f+1),u=u.slice(0,f)),u&&!l.hasOwnProperty(u))throw new Error("unknown type: "+u);return{type:u,name:c}})}n.prototype=r.prototype={constructor:n,on:function(s,l){var u=this._,c=a(s+"",u),f,v=-1,g=c.length;if(arguments.length<2){for(;++v0)for(var u=new Array(f),c=0,f,v;c{(function(e,t){typeof gD=="object"&&typeof gXe!="undefined"?t(gD):(e=e||self,t(e.d3=e.d3||{}))})(gD,function(e){"use strict";var t=0,r=0,n=0,a=1e3,i,o,s=0,l=0,u=0,c=typeof performance=="object"&&performance.now?performance:Date,f=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(A){setTimeout(A,17)};function v(){return l||(f(g),l=c.now()+u)}function g(){l=0}function p(){this._call=this._time=this._next=null}p.prototype=x.prototype={constructor:p,restart:function(A,T,m){if(typeof A!="function")throw new TypeError("callback is not a function");m=(m==null?v():+m)+(T==null?0:+T),!this._next&&o!==this&&(o?o._next=this:i=this,o=this),this._call=A,this._time=m,S()},stop:function(){this._call&&(this._call=null,this._time=1/0,S())}};function x(A,T,m){var F=new p;return F.restart(A,T,m),F}function _(){v(),++t;for(var A=i,T;A;)(T=l-A._time)>=0&&A._call.call(null,T),A=A._next;--t}function y(){l=(s=c.now())+u,t=r=0;try{_()}finally{t=0,k(),l=0}}function C(){var A=c.now(),T=A-s;T>a&&(u-=T,s=A)}function k(){for(var A,T=i,m,F=1/0;T;)T._call?(F>T._time&&(F=T._time),A=T,T=T._next):(m=T._next,T._next=null,T=A?A._next=m:i=m);o=A,S(F)}function S(A){if(!t){r&&(r=clearTimeout(r));var T=A-l;T>24?(A<1/0&&(r=setTimeout(y,A-c.now()-u)),n&&(n=clearInterval(n))):(n||(s=c.now(),n=setInterval(C,a)),t=1,f(y))}}function L(A,T,m){var F=new p;return T=T==null?0:+T,F.restart(function(E){F.stop(),A(E+T)},T,m),F}function w(A,T,m){var F=new p,E=T;return T==null?(F.restart(A,T,m),F):(T=+T,m=m==null?v():+m,F.restart(function I(R){R+=E,F.restart(I,E+=T,m),A(R)},T,m),F)}e.interval=w,e.now=v,e.timeout=L,e.timer=x,e.timerFlush=_,Object.defineProperty(e,"__esModule",{value:!0})})});var xXe=fe((mD,yXe)=>{(function(e,t){typeof mD=="object"&&typeof yXe!="undefined"?t(mD,hXe(),SK(),pXe(),mXe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,e.d3)})(mD,(function(e,t,r,n,a){"use strict";function i(A,T){var m;A==null&&(A=0),T==null&&(T=0);function F(){var E,I=m.length,R,B=0,O=0;for(E=0;Eq.index){var me=U-pe.x-pe.vx,be=J-pe.y-pe.vy,De=me*me+be*be;DeU+le||neJ+le||aeO.r&&(O.r=O[V].r)}function B(){if(T){var O,V=T.length,j;for(m=new Array(V),O=0;O1?(ce==null?B.remove(ee):B.set(ee,J(ce)),T):B.get(ee)},find:function(ee,ce,ye){var xe=0,ue=A.length,K,_e,ne,ae,pe;for(ye==null?ye=1/0:ye*=ye,xe=0;xe1?(V.on(ee,ce),T):V.on(ee)}}}function k(){var A,T,m,F=o(-30),E,I=1,R=1/0,B=.81;function O(U){var J,ee=A.length,ce=t.quadtree(A,p,x).visitAfter(j);for(m=U,J=0;J=R)return;(U.data!==T||U.next)&&(ye===0&&(ye=s(),K+=ye*ye),xe===0&&(xe=s(),K+=xe*xe),K{(function(e,t){typeof yD=="object"&&typeof _Xe!="undefined"?t(yD):(e=typeof globalThis!="undefined"?globalThis:e||self,t(e.d3=e.d3||{}))})(yD,(function(e){"use strict";function t(Dt,At){return DtAt?1:Dt>=At?0:NaN}function r(Dt){let At=Dt,Vt=Dt;Dt.length===1&&(At=(rn,Jr)=>Dt(rn)-Jr,Vt=n(Dt));function Qt(rn,Jr,qn,ri){for(qn==null&&(qn=0),ri==null&&(ri=rn.length);qn>>1;Vt(rn[Jn],Jr)<0?qn=Jn+1:ri=Jn}return qn}function Ut(rn,Jr,qn,ri){for(qn==null&&(qn=0),ri==null&&(ri=rn.length);qn>>1;Vt(rn[Jn],Jr)>0?ri=Jn:qn=Jn+1}return qn}function _r(rn,Jr,qn,ri){qn==null&&(qn=0),ri==null&&(ri=rn.length);let Jn=Qt(rn,Jr,qn,ri-1);return Jn>qn&&At(rn[Jn-1],Jr)>-At(rn[Jn],Jr)?Jn-1:Jn}return{left:Qt,center:_r,right:Ut}}function n(Dt){return(At,Vt)=>t(Dt(At),Vt)}function a(Dt){return Dt===null?NaN:+Dt}function*i(Dt,At){if(At===void 0)for(let Vt of Dt)Vt!=null&&(Vt=+Vt)>=Vt&&(yield Vt);else{let Vt=-1;for(let Qt of Dt)(Qt=At(Qt,++Vt,Dt))!=null&&(Qt=+Qt)>=Qt&&(yield Qt)}}let o=r(t),s=o.right,l=o.left,u=r(a).center;function c(Dt,At){let Vt=0;if(At===void 0)for(let Qt of Dt)Qt!=null&&(Qt=+Qt)>=Qt&&++Vt;else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Ut=+Ut)>=Ut&&++Vt}return Vt}function f(Dt){return Dt.length|0}function v(Dt){return!(Dt>0)}function g(Dt){return typeof Dt!="object"||"length"in Dt?Dt:Array.from(Dt)}function p(Dt){return At=>Dt(...At)}function x(...Dt){let At=typeof Dt[Dt.length-1]=="function"&&p(Dt.pop());Dt=Dt.map(g);let Vt=Dt.map(f),Qt=Dt.length-1,Ut=new Array(Qt+1).fill(0),_r=[];if(Qt<0||Vt.some(v))return _r;for(;;){_r.push(Ut.map((Jr,qn)=>Dt[qn][Jr]));let rn=Qt;for(;++Ut[rn]===Vt[rn];){if(rn===0)return At?_r.map(At):_r;Ut[rn--]=0}}}function _(Dt,At){var Vt=0,Qt=0;return Float64Array.from(Dt,At===void 0?Ut=>Vt+=+Ut||0:Ut=>Vt+=+At(Ut,Qt++,Dt)||0)}function y(Dt,At){return AtDt?1:At>=Dt?0:NaN}function C(Dt,At){let Vt=0,Qt,Ut=0,_r=0;if(At===void 0)for(let rn of Dt)rn!=null&&(rn=+rn)>=rn&&(Qt=rn-Ut,Ut+=Qt/++Vt,_r+=Qt*(rn-Ut));else{let rn=-1;for(let Jr of Dt)(Jr=At(Jr,++rn,Dt))!=null&&(Jr=+Jr)>=Jr&&(Qt=Jr-Ut,Ut+=Qt/++Vt,_r+=Qt*(Jr-Ut))}if(Vt>1)return _r/(Vt-1)}function k(Dt,At){let Vt=C(Dt,At);return Vt&&Math.sqrt(Vt)}function S(Dt,At){let Vt,Qt;if(At===void 0)for(let Ut of Dt)Ut!=null&&(Vt===void 0?Ut>=Ut&&(Vt=Qt=Ut):(Vt>Ut&&(Vt=Ut),Qt=_r&&(Vt=Qt=_r):(Vt>_r&&(Vt=_r),Qt<_r&&(Qt=_r)))}return[Vt,Qt]}class L{constructor(){this._partials=new Float64Array(32),this._n=0}add(At){let Vt=this._partials,Qt=0;for(let Ut=0;Ut0){for(rn=At[--Vt];Vt>0&&(Qt=rn,Ut=At[--Vt],rn=Qt+Ut,_r=Ut-(rn-Qt),!_r););Vt>0&&(_r<0&&At[Vt-1]<0||_r>0&&At[Vt-1]>0)&&(Ut=_r*2,Qt=rn+Ut,Ut==Qt-rn&&(rn=Qt))}return rn}}function w(Dt,At){let Vt=new L;if(At===void 0)for(let Qt of Dt)(Qt=+Qt)&&Vt.add(Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=+At(Ut,++Qt,Dt))&&Vt.add(Ut)}return+Vt}function A(Dt,At){let Vt=new L,Qt=-1;return Float64Array.from(Dt,At===void 0?Ut=>Vt.add(+Ut||0):Ut=>Vt.add(+At(Ut,++Qt,Dt)||0))}class T extends Map{constructor(At,Vt=R){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:Vt}}),At!=null)for(let[Qt,Ut]of At)this.set(Qt,Ut)}get(At){return super.get(F(this,At))}has(At){return super.has(F(this,At))}set(At,Vt){return super.set(E(this,At),Vt)}delete(At){return super.delete(I(this,At))}}class m extends Set{constructor(At,Vt=R){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:Vt}}),At!=null)for(let Qt of At)this.add(Qt)}has(At){return super.has(F(this,At))}add(At){return super.add(E(this,At))}delete(At){return super.delete(I(this,At))}}function F({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)?Dt.get(Qt):Vt}function E({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)?Dt.get(Qt):(Dt.set(Qt,Vt),Vt)}function I({_intern:Dt,_key:At},Vt){let Qt=At(Vt);return Dt.has(Qt)&&(Vt=Dt.get(Vt),Dt.delete(Qt)),Vt}function R(Dt){return Dt!==null&&typeof Dt=="object"?Dt.valueOf():Dt}function B(Dt){return Dt}function O(Dt,...At){return ce(Dt,B,B,At)}function V(Dt,...At){return ce(Dt,Array.from,B,At)}function j(Dt,At,...Vt){return ce(Dt,B,At,Vt)}function q(Dt,At,...Vt){return ce(Dt,Array.from,At,Vt)}function U(Dt,...At){return ce(Dt,B,ee,At)}function J(Dt,...At){return ce(Dt,Array.from,ee,At)}function ee(Dt){if(Dt.length!==1)throw new Error("duplicate key");return Dt[0]}function ce(Dt,At,Vt,Qt){return(function Ut(_r,rn){if(rn>=Qt.length)return Vt(_r);let Jr=new T,qn=Qt[rn++],ri=-1;for(let Jn of _r){let Ii=qn(Jn,++ri,_r),Vi=Jr.get(Ii);Vi?Vi.push(Jn):Jr.set(Ii,[Jn])}for(let[Jn,Ii]of Jr)Jr.set(Jn,Ut(Ii,rn));return At(Jr)})(Dt,0)}function ye(Dt,At){return Array.from(At,Vt=>Dt[Vt])}function xe(Dt,...At){if(typeof Dt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");Dt=Array.from(Dt);let[Vt=t]=At;if(Vt.length===1||At.length>1){let Qt=Uint32Array.from(Dt,(Ut,_r)=>_r);return At.length>1?(At=At.map(Ut=>Dt.map(Ut)),Qt.sort((Ut,_r)=>{for(let rn of At){let Jr=t(rn[Ut],rn[_r]);if(Jr)return Jr}})):(Vt=Dt.map(Vt),Qt.sort((Ut,_r)=>t(Vt[Ut],Vt[_r]))),ye(Dt,Qt)}return Dt.sort(Vt)}function ue(Dt,At,Vt){return(At.length===1?xe(j(Dt,At,Vt),(([Qt,Ut],[_r,rn])=>t(Ut,rn)||t(Qt,_r))):xe(O(Dt,Vt),(([Qt,Ut],[_r,rn])=>At(Ut,rn)||t(Qt,_r)))).map(([Qt])=>Qt)}var K=Array.prototype,_e=K.slice;function ne(Dt){return function(){return Dt}}var ae=Math.sqrt(50),pe=Math.sqrt(10),ie=Math.sqrt(2);function le(Dt,At,Vt){var Qt,Ut=-1,_r,rn,Jr;if(At=+At,Dt=+Dt,Vt=+Vt,Dt===At&&Vt>0)return[Dt];if((Qt=At0){let qn=Math.round(Dt/Jr),ri=Math.round(At/Jr);for(qn*JrAt&&--ri,rn=new Array(_r=ri-qn+1);++Ut<_r;)rn[Ut]=(qn+Ut)*Jr}else{Jr=-Jr;let qn=Math.round(Dt*Jr),ri=Math.round(At*Jr);for(qn/JrAt&&--ri,rn=new Array(_r=ri-qn+1);++Ut<_r;)rn[Ut]=(qn+Ut)/Jr}return Qt&&rn.reverse(),rn}function me(Dt,At,Vt){var Qt=(At-Dt)/Math.max(0,Vt),Ut=Math.floor(Math.log(Qt)/Math.LN10),_r=Qt/Math.pow(10,Ut);return Ut>=0?(_r>=ae?10:_r>=pe?5:_r>=ie?2:1)*Math.pow(10,Ut):-Math.pow(10,-Ut)/(_r>=ae?10:_r>=pe?5:_r>=ie?2:1)}function be(Dt,At,Vt){var Qt=Math.abs(At-Dt)/Math.max(0,Vt),Ut=Math.pow(10,Math.floor(Math.log(Qt)/Math.LN10)),_r=Qt/Ut;return _r>=ae?Ut*=10:_r>=pe?Ut*=5:_r>=ie&&(Ut*=2),At0?(Dt=Math.floor(Dt/Ut)*Ut,At=Math.ceil(At/Ut)*Ut):Ut<0&&(Dt=Math.ceil(Dt*Ut)/Ut,At=Math.floor(At*Ut)/Ut),Qt=Ut}}function Ge(Dt){return Math.ceil(Math.log(c(Dt))/Math.LN2)+1}function ht(){var Dt=B,At=S,Vt=Ge;function Qt(Ut){Array.isArray(Ut)||(Ut=Array.from(Ut));var _r,rn=Ut.length,Jr,qn=new Array(rn);for(_r=0;_r=Ii)if(Xi>=Ii&&At===S){let Ma=me(Jn,Ii,oa);isFinite(Ma)&&(Ma>0?Ii=(Math.floor(Ii/Ma)+1)*Ma:Ma<0&&(Ii=(Math.ceil(Ii*-Ma)+1)/-Ma))}else Vi.pop()}for(var ra=Vi.length;Vi[0]<=Jn;)Vi.shift(),--ra;for(;Vi[ra-1]>Ii;)Vi.pop(),--ra;var ha=new Array(ra+1),va;for(_r=0;_r<=ra;++_r)va=ha[_r]=[],va.x0=_r>0?Vi[_r-1]:Jn,va.x1=_r=Qt)&&(Vt=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Vt=Ut)&&(Vt=Ut)}return Vt}function Oe(Dt,At){let Vt;if(At===void 0)for(let Qt of Dt)Qt!=null&&(Vt>Qt||Vt===void 0&&Qt>=Qt)&&(Vt=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=At(Ut,++Qt,Dt))!=null&&(Vt>Ut||Vt===void 0&&Ut>=Ut)&&(Vt=Ut)}return Vt}function ze(Dt,At,Vt=0,Qt=Dt.length-1,Ut=t){for(;Qt>Vt;){if(Qt-Vt>600){let qn=Qt-Vt+1,ri=At-Vt+1,Jn=Math.log(qn),Ii=.5*Math.exp(2*Jn/3),Vi=.5*Math.sqrt(Jn*Ii*(qn-Ii)/qn)*(ri-qn/2<0?-1:1),ra=Math.max(Vt,Math.floor(At-ri*Ii/qn+Vi)),ha=Math.min(Qt,Math.floor(At+(qn-ri)*Ii/qn+Vi));ze(Dt,At,ra,ha,Ut)}let _r=Dt[At],rn=Vt,Jr=Qt;for(ct(Dt,Vt,At),Ut(Dt[Qt],_r)>0&&ct(Dt,Vt,Qt);rn0;)--Jr}Ut(Dt[Vt],_r)===0?ct(Dt,Vt,Jr):(++Jr,ct(Dt,Jr,Qt)),Jr<=At&&(Vt=Jr+1),At<=Jr&&(Qt=Jr-1)}return Dt}function ct(Dt,At,Vt){let Qt=Dt[At];Dt[At]=Dt[Vt],Dt[Vt]=Qt}function et(Dt,At,Vt){if(Dt=Float64Array.from(i(Dt,Vt)),!!(Qt=Dt.length)){if((At=+At)<=0||Qt<2)return Oe(Dt);if(At>=1)return it(Dt);var Qt,Ut=(Qt-1)*At,_r=Math.floor(Ut),rn=it(ze(Dt,_r).subarray(0,_r+1)),Jr=Oe(Dt.subarray(_r+1));return rn+(Jr-rn)*(Ut-_r)}}function qe(Dt,At,Vt=a){if(Qt=Dt.length){if((At=+At)<=0||Qt<2)return+Vt(Dt[0],0,Dt);if(At>=1)return+Vt(Dt[Qt-1],Qt-1,Dt);var Qt,Ut=(Qt-1)*At,_r=Math.floor(Ut),rn=+Vt(Dt[_r],_r,Dt),Jr=+Vt(Dt[_r+1],_r+1,Dt);return rn+(Jr-rn)*(Ut-_r)}}function we(Dt,At,Vt){return Math.ceil((Vt-At)/(2*(et(Dt,.75)-et(Dt,.25))*Math.pow(c(Dt),-1/3)))}function Le(Dt,At,Vt){return Math.ceil((Vt-At)/(3.5*k(Dt)*Math.pow(c(Dt),-1/3)))}function Ke(Dt,At){let Vt,Qt=-1,Ut=-1;if(At===void 0)for(let _r of Dt)++Ut,_r!=null&&(Vt<_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);else for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(Vt<_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);return Qt}function Te(Dt,At){let Vt=0,Qt=0;if(At===void 0)for(let Ut of Dt)Ut!=null&&(Ut=+Ut)>=Ut&&(++Vt,Qt+=Ut);else{let Ut=-1;for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(_r=+_r)>=_r&&(++Vt,Qt+=_r)}if(Vt)return Qt/Vt}function Ve(Dt,At){return et(Dt,.5,At)}function*$e(Dt){for(let At of Dt)yield*Cte(At)}function ot(Dt){return Array.from($e(Dt))}function tt(Dt,At){let Vt,Qt=-1,Ut=-1;if(At===void 0)for(let _r of Dt)++Ut,_r!=null&&(Vt>_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);else for(let _r of Dt)(_r=At(_r,++Ut,Dt))!=null&&(Vt>_r||Vt===void 0&&_r>=_r)&&(Vt=_r,Qt=Ut);return Qt}function nt(Dt,At=We){let Vt=[],Qt,Ut=!1;for(let _r of Dt)Ut&&Vt.push(At(Qt,_r)),Qt=_r,Ut=!0;return Vt}function We(Dt,At){return[Dt,At]}function mt(Dt,At,Vt){Dt=+Dt,At=+At,Vt=(Ut=arguments.length)<2?(At=Dt,Dt=0,1):Ut<3?1:+Vt;for(var Qt=-1,Ut=Math.max(0,Math.ceil((At-Dt)/Vt))|0,_r=new Array(Ut);++Qt0:t(rn,rn)===0)&&(Vt=_r,Ut=rn,Qt=!0)}}else for(let Ut of Dt)(Qt?At(Ut,Vt)>0:At(Ut,Ut)===0)&&(Vt=Ut,Qt=!0);return Vt}function mr(Dt,At=t){if(At.length===1)return Ke(Dt,At);let Vt,Qt=-1,Ut=-1;for(let _r of Dt)++Ut,(Qt<0?At(_r,_r)===0:At(_r,Vt)>0)&&(Vt=_r,Qt=Ut);return Qt}function or(Dt,At){let Vt=Yt(Dt,At);return Vt<0?void 0:Vt}var fr=Ot(Math.random);function Ot(Dt){return function(Vt,Qt=0,Ut=Vt.length){let _r=Ut-(Qt=+Qt);for(;_r;){let rn=Dt()*_r--|0,Jr=Vt[_r+Qt];Vt[_r+Qt]=Vt[rn+Qt],Vt[rn+Qt]=Jr}return Vt}}function cr(Dt,At){let Vt=0;if(At===void 0)for(let Qt of Dt)(Qt=+Qt)&&(Vt+=Qt);else{let Qt=-1;for(let Ut of Dt)(Ut=+At(Ut,++Qt,Dt))&&(Vt+=Ut)}return Vt}function Ct(Dt){if(!(_r=Dt.length))return[];for(var At=-1,Vt=Oe(Dt,wt),Qt=new Array(Vt);++AtAt(Vt,Qt,Dt))}function rr(Dt,At,Vt){if(typeof At!="function")throw new TypeError("reducer is not a function");let Qt=Dt[Symbol.iterator](),Ut,_r,rn=-1;if(arguments.length<3){if({done:Ut,value:Vt}=Qt.next(),Ut)return;++rn}for(;{done:Ut,value:_r}=Qt.next(),!Ut;)Vt=At(Vt,_r,++rn,Dt);return Vt}function pr(Dt){if(typeof Dt[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(Dt).reverse()}function Kr(Dt,...At){Dt=new Set(Dt);for(let Vt of At)for(let Qt of Vt)Dt.delete(Qt);return Dt}function Nr(Dt,At){let Vt=At[Symbol.iterator](),Qt=new Set;for(let Ut of Dt){if(Qt.has(Ut))return!1;let _r,rn;for(;({value:_r,done:rn}=Vt.next())&&!rn;){if(Object.is(Ut,_r))return!1;Qt.add(_r)}}return!0}function dn(Dt){return Dt instanceof Set?Dt:new Set(Dt)}function xr(Dt,...At){Dt=new Set(Dt),At=At.map(dn);e:for(let Vt of Dt)for(let Qt of At)if(!Qt.has(Vt)){Dt.delete(Vt);continue e}return Dt}function Fr(Dt,At){let Vt=Dt[Symbol.iterator](),Qt=new Set;for(let Ut of At){if(Qt.has(Ut))continue;let _r,rn;for(;{value:_r,done:rn}=Vt.next();){if(rn)return!1;if(Qt.add(_r),Object.is(Ut,_r))break}}return!0}function Zr(Dt,At){return Fr(At,Dt)}function Cn(...Dt){let At=new Set;for(let Vt of Dt)for(let Qt of Vt)At.add(Qt);return At}e.Adder=L,e.InternMap=T,e.InternSet=m,e.ascending=t,e.bin=ht,e.bisect=s,e.bisectCenter=u,e.bisectLeft=l,e.bisectRight=s,e.bisector=r,e.count=c,e.cross=x,e.cumsum=_,e.descending=y,e.deviation=k,e.difference=Kr,e.disjoint=Nr,e.every=Mt,e.extent=S,e.fcumsum=A,e.filter=ft,e.fsum=w,e.greatest=jt,e.greatestIndex=mr,e.group=O,e.groupSort=ue,e.groups=V,e.histogram=ht,e.index=U,e.indexes=J,e.intersection=xr,e.least=bt,e.leastIndex=Yt,e.map=kt,e.max=it,e.maxIndex=Ke,e.mean=Te,e.median=Ve,e.merge=ot,e.min=Oe,e.minIndex=tt,e.nice=De,e.pairs=nt,e.permute=ye,e.quantile=et,e.quantileSorted=qe,e.quickselect=ze,e.range=mt,e.reduce=rr,e.reverse=pr,e.rollup=j,e.rollups=q,e.scan=or,e.shuffle=fr,e.shuffler=Ot,e.some=Lt,e.sort=xe,e.subset=Zr,e.sum=cr,e.superset=Fr,e.thresholdFreedmanDiaconis=we,e.thresholdScott=Le,e.thresholdSturges=Ge,e.tickIncrement=me,e.tickStep=be,e.ticks=le,e.transpose=Ct,e.union=Cn,e.variance=C,e.zip=Tt,Object.defineProperty(e,"__esModule",{value:!0})}))});var TXe=fe((xD,wXe)=>{(function(e,t){typeof xD=="object"&&typeof wXe!="undefined"?t(xD):(e=e||self,t(e.d3=e.d3||{}))})(xD,function(e){"use strict";var t=Math.PI,r=2*t,n=1e-6,a=r-n;function i(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function o(){return new i}i.prototype=o.prototype={constructor:i,moveTo:function(s,l){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(s,l){this._+="L"+(this._x1=+s)+","+(this._y1=+l)},quadraticCurveTo:function(s,l,u,c){this._+="Q"+ +s+","+ +l+","+(this._x1=+u)+","+(this._y1=+c)},bezierCurveTo:function(s,l,u,c,f,v){this._+="C"+ +s+","+ +l+","+ +u+","+ +c+","+(this._x1=+f)+","+(this._y1=+v)},arcTo:function(s,l,u,c,f){s=+s,l=+l,u=+u,c=+c,f=+f;var v=this._x1,g=this._y1,p=u-s,x=c-l,_=v-s,y=g-l,C=_*_+y*y;if(f<0)throw new Error("negative radius: "+f);if(this._x1===null)this._+="M"+(this._x1=s)+","+(this._y1=l);else if(C>n)if(!(Math.abs(y*p-x*_)>n)||!f)this._+="L"+(this._x1=s)+","+(this._y1=l);else{var k=u-v,S=c-g,L=p*p+x*x,w=k*k+S*S,A=Math.sqrt(L),T=Math.sqrt(C),m=f*Math.tan((t-Math.acos((L+C-w)/(2*A*T)))/2),F=m/T,E=m/A;Math.abs(F-1)>n&&(this._+="L"+(s+F*_)+","+(l+F*y)),this._+="A"+f+","+f+",0,0,"+ +(y*k>_*S)+","+(this._x1=s+E*p)+","+(this._y1=l+E*x)}},arc:function(s,l,u,c,f,v){s=+s,l=+l,u=+u,v=!!v;var g=u*Math.cos(c),p=u*Math.sin(c),x=s+g,_=l+p,y=1^v,C=v?c-f:f-c;if(u<0)throw new Error("negative radius: "+u);this._x1===null?this._+="M"+x+","+_:(Math.abs(this._x1-x)>n||Math.abs(this._y1-_)>n)&&(this._+="L"+x+","+_),u&&(C<0&&(C=C%r+r),C>a?this._+="A"+u+","+u+",0,1,"+y+","+(s-g)+","+(l-p)+"A"+u+","+u+",0,1,"+y+","+(this._x1=x)+","+(this._y1=_):C>n&&(this._+="A"+u+","+u+",0,"+ +(C>=t)+","+y+","+(this._x1=s+u*Math.cos(f))+","+(this._y1=l+u*Math.sin(f))))},rect:function(s,l,u,c){this._+="M"+(this._x0=this._x1=+s)+","+(this._y0=this._y1=+l)+"h"+ +u+"v"+ +c+"h"+-u+"Z"},toString:function(){return this._}},e.path=o,Object.defineProperty(e,"__esModule",{value:!0})})});var EK=fe((_D,AXe)=>{(function(e,t){typeof _D=="object"&&typeof AXe!="undefined"?t(_D,TXe()):(e=e||self,t(e.d3=e.d3||{},e.d3))})(_D,function(e,t){"use strict";function r(ut){return function(){return ut}}var n=Math.abs,a=Math.atan2,i=Math.cos,o=Math.max,s=Math.min,l=Math.sin,u=Math.sqrt,c=1e-12,f=Math.PI,v=f/2,g=2*f;function p(ut){return ut>1?0:ut<-1?f:Math.acos(ut)}function x(ut){return ut>=1?v:ut<=-1?-v:Math.asin(ut)}function _(ut){return ut.innerRadius}function y(ut){return ut.outerRadius}function C(ut){return ut.startAngle}function k(ut){return ut.endAngle}function S(ut){return ut&&ut.padAngle}function L(ut,Jt,er,wr,nn,Dr,bn,Yr){var Tn=er-ut,Kn=wr-Jt,Qn=bn-nn,Ai=Yr-Dr,Ji=Ai*Tn-Qn*Kn;if(!(Ji*JiAs*As+Ms*Ms&&(yo=oo,so=ko),{cx:yo,cy:so,x01:-Qn,y01:-Ai,x11:yo*(nn/Ni-1),y11:so*(nn/Ni-1)}}function A(){var ut=_,Jt=y,er=r(0),wr=null,nn=C,Dr=k,bn=S,Yr=null;function Tn(){var Kn,Qn,Ai=+ut.apply(this,arguments),Ji=+Jt.apply(this,arguments),Ra=nn.apply(this,arguments)-v,ii=Dr.apply(this,arguments)-v,Za=n(ii-Ra),ja=ii>Ra;if(Yr||(Yr=Kn=t.path()),Jic))Yr.moveTo(0,0);else if(Za>g-c)Yr.moveTo(Ji*i(Ra),Ji*l(Ra)),Yr.arc(0,0,Ji,Ra,ii,!ja),Ai>c&&(Yr.moveTo(Ai*i(ii),Ai*l(ii)),Yr.arc(0,0,Ai,ii,Ra,ja));else{var qo=Ra,$a=ii,Ka=Ra,Oa=ii,Ni=Za,ka=Za,vs=bn.apply(this,arguments)/2,yo=vs>c&&(wr?+wr.apply(this,arguments):u(Ai*Ai+Ji*Ji)),so=s(n(Ji-Ai)/2,+er.apply(this,arguments)),oo=so,ko=so,pa,la;if(yo>c){var As=x(yo/Ai*l(vs)),Ms=x(yo/Ji*l(vs));(Ni-=As*2)>c?(As*=ja?1:-1,Ka+=As,Oa-=As):(Ni=0,Ka=Oa=(Ra+ii)/2),(ka-=Ms*2)>c?(Ms*=ja?1:-1,qo+=Ms,$a-=Ms):(ka=0,qo=$a=(Ra+ii)/2)}var xu=Ji*i(qo),rs=Ji*l(qo),Ls=Ai*i(Oa),$s=Ai*l(Oa);if(so>c){var Kc=Ji*i($a),_u=Ji*l($a),Gu=Ai*i(Ka),Ja=Ai*l(Ka),ps;if(Zac?ko>c?(pa=w(Gu,Ja,xu,rs,Ji,ko,ja),la=w(Kc,_u,Ls,$s,Ji,ko,ja),Yr.moveTo(pa.cx+pa.x01,pa.cy+pa.y01),koc)||!(Ni>c)?Yr.lineTo(Ls,$s):oo>c?(pa=w(Ls,$s,Kc,_u,Ai,-oo,ja),la=w(xu,rs,Gu,Ja,Ai,-oo,ja),Yr.lineTo(pa.cx+pa.x01,pa.cy+pa.y01),oo=Ji;--Ra)Yr.point($a[Ra],Ka[Ra]);Yr.lineEnd(),Yr.areaEnd()}ja&&($a[Ai]=+ut(Za,Ai,Qn),Ka[Ai]=+er(Za,Ai,Qn),Yr.point(Jt?+Jt(Za,Ai,Qn):$a[Ai],wr?+wr(Za,Ai,Qn):Ka[Ai]))}if(qo)return Yr=null,qo+""||null}function Kn(){return I().defined(nn).curve(bn).context(Dr)}return Tn.x=function(Qn){return arguments.length?(ut=typeof Qn=="function"?Qn:r(+Qn),Jt=null,Tn):ut},Tn.x0=function(Qn){return arguments.length?(ut=typeof Qn=="function"?Qn:r(+Qn),Tn):ut},Tn.x1=function(Qn){return arguments.length?(Jt=Qn==null?null:typeof Qn=="function"?Qn:r(+Qn),Tn):Jt},Tn.y=function(Qn){return arguments.length?(er=typeof Qn=="function"?Qn:r(+Qn),wr=null,Tn):er},Tn.y0=function(Qn){return arguments.length?(er=typeof Qn=="function"?Qn:r(+Qn),Tn):er},Tn.y1=function(Qn){return arguments.length?(wr=Qn==null?null:typeof Qn=="function"?Qn:r(+Qn),Tn):wr},Tn.lineX0=Tn.lineY0=function(){return Kn().x(ut).y(er)},Tn.lineY1=function(){return Kn().x(ut).y(wr)},Tn.lineX1=function(){return Kn().x(Jt).y(er)},Tn.defined=function(Qn){return arguments.length?(nn=typeof Qn=="function"?Qn:r(!!Qn),Tn):nn},Tn.curve=function(Qn){return arguments.length?(bn=Qn,Dr!=null&&(Yr=bn(Dr)),Tn):bn},Tn.context=function(Qn){return arguments.length?(Qn==null?Dr=Yr=null:Yr=bn(Dr=Qn),Tn):Dr},Tn}function B(ut,Jt){return Jtut?1:Jt>=ut?0:NaN}function O(ut){return ut}function V(){var ut=O,Jt=B,er=null,wr=r(0),nn=r(g),Dr=r(0);function bn(Yr){var Tn,Kn=Yr.length,Qn,Ai,Ji=0,Ra=new Array(Kn),ii=new Array(Kn),Za=+wr.apply(this,arguments),ja=Math.min(g,Math.max(-g,nn.apply(this,arguments)-Za)),qo,$a=Math.min(Math.abs(ja)/Kn,Dr.apply(this,arguments)),Ka=$a*(ja<0?-1:1),Oa;for(Tn=0;Tn0&&(Ji+=Oa);for(Jt!=null?Ra.sort(function(Ni,ka){return Jt(ii[Ni],ii[ka])}):er!=null&&Ra.sort(function(Ni,ka){return er(Yr[Ni],Yr[ka])}),Tn=0,Ai=Ji?(ja-Kn*Ka)/Ji:0;Tn0?Oa*Ai:0)+Ka,ii[Qn]={data:Yr[Qn],index:Tn,value:Oa,startAngle:Za,endAngle:qo,padAngle:$a};return ii}return bn.value=function(Yr){return arguments.length?(ut=typeof Yr=="function"?Yr:r(+Yr),bn):ut},bn.sortValues=function(Yr){return arguments.length?(Jt=Yr,er=null,bn):Jt},bn.sort=function(Yr){return arguments.length?(er=Yr,Jt=null,bn):er},bn.startAngle=function(Yr){return arguments.length?(wr=typeof Yr=="function"?Yr:r(+Yr),bn):wr},bn.endAngle=function(Yr){return arguments.length?(nn=typeof Yr=="function"?Yr:r(+Yr),bn):nn},bn.padAngle=function(Yr){return arguments.length?(Dr=typeof Yr=="function"?Yr:r(+Yr),bn):Dr},bn}var j=U(m);function q(ut){this._curve=ut}q.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(ut,Jt){this._curve.point(Jt*Math.sin(ut),Jt*-Math.cos(ut))}};function U(ut){function Jt(er){return new q(ut(er))}return Jt._curve=ut,Jt}function J(ut){var Jt=ut.curve;return ut.angle=ut.x,delete ut.x,ut.radius=ut.y,delete ut.y,ut.curve=function(er){return arguments.length?Jt(U(er)):Jt()._curve},ut}function ee(){return J(I().curve(j))}function ce(){var ut=R().curve(j),Jt=ut.curve,er=ut.lineX0,wr=ut.lineX1,nn=ut.lineY0,Dr=ut.lineY1;return ut.angle=ut.x,delete ut.x,ut.startAngle=ut.x0,delete ut.x0,ut.endAngle=ut.x1,delete ut.x1,ut.radius=ut.y,delete ut.y,ut.innerRadius=ut.y0,delete ut.y0,ut.outerRadius=ut.y1,delete ut.y1,ut.lineStartAngle=function(){return J(er())},delete ut.lineX0,ut.lineEndAngle=function(){return J(wr())},delete ut.lineX1,ut.lineInnerRadius=function(){return J(nn())},delete ut.lineY0,ut.lineOuterRadius=function(){return J(Dr())},delete ut.lineY1,ut.curve=function(bn){return arguments.length?Jt(U(bn)):Jt()._curve},ut}function ye(ut,Jt){return[(Jt=+Jt)*Math.cos(ut-=Math.PI/2),Jt*Math.sin(ut)]}var xe=Array.prototype.slice;function ue(ut){return ut.source}function K(ut){return ut.target}function _e(ut){var Jt=ue,er=K,wr=F,nn=E,Dr=null;function bn(){var Yr,Tn=xe.call(arguments),Kn=Jt.apply(this,Tn),Qn=er.apply(this,Tn);if(Dr||(Dr=Yr=t.path()),ut(Dr,+wr.apply(this,(Tn[0]=Kn,Tn)),+nn.apply(this,Tn),+wr.apply(this,(Tn[0]=Qn,Tn)),+nn.apply(this,Tn)),Yr)return Dr=null,Yr+""||null}return bn.source=function(Yr){return arguments.length?(Jt=Yr,bn):Jt},bn.target=function(Yr){return arguments.length?(er=Yr,bn):er},bn.x=function(Yr){return arguments.length?(wr=typeof Yr=="function"?Yr:r(+Yr),bn):wr},bn.y=function(Yr){return arguments.length?(nn=typeof Yr=="function"?Yr:r(+Yr),bn):nn},bn.context=function(Yr){return arguments.length?(Dr=Yr==null?null:Yr,bn):Dr},bn}function ne(ut,Jt,er,wr,nn){ut.moveTo(Jt,er),ut.bezierCurveTo(Jt=(Jt+wr)/2,er,Jt,nn,wr,nn)}function ae(ut,Jt,er,wr,nn){ut.moveTo(Jt,er),ut.bezierCurveTo(Jt,er=(er+nn)/2,wr,er,wr,nn)}function pe(ut,Jt,er,wr,nn){var Dr=ye(Jt,er),bn=ye(Jt,er=(er+nn)/2),Yr=ye(wr,er),Tn=ye(wr,nn);ut.moveTo(Dr[0],Dr[1]),ut.bezierCurveTo(bn[0],bn[1],Yr[0],Yr[1],Tn[0],Tn[1])}function ie(){return _e(ne)}function le(){return _e(ae)}function me(){var ut=_e(pe);return ut.angle=ut.x,delete ut.x,ut.radius=ut.y,delete ut.y,ut}var be={draw:function(ut,Jt){var er=Math.sqrt(Jt/f);ut.moveTo(er,0),ut.arc(0,0,er,0,g)}},De={draw:function(ut,Jt){var er=Math.sqrt(Jt/5)/2;ut.moveTo(-3*er,-er),ut.lineTo(-er,-er),ut.lineTo(-er,-3*er),ut.lineTo(er,-3*er),ut.lineTo(er,-er),ut.lineTo(3*er,-er),ut.lineTo(3*er,er),ut.lineTo(er,er),ut.lineTo(er,3*er),ut.lineTo(-er,3*er),ut.lineTo(-er,er),ut.lineTo(-3*er,er),ut.closePath()}},Ge=Math.sqrt(1/3),ht=Ge*2,it={draw:function(ut,Jt){var er=Math.sqrt(Jt/ht),wr=er*Ge;ut.moveTo(0,-er),ut.lineTo(wr,0),ut.lineTo(0,er),ut.lineTo(-wr,0),ut.closePath()}},Oe=.8908130915292852,ze=Math.sin(f/10)/Math.sin(7*f/10),ct=Math.sin(g/10)*ze,et=-Math.cos(g/10)*ze,qe={draw:function(ut,Jt){var er=Math.sqrt(Jt*Oe),wr=ct*er,nn=et*er;ut.moveTo(0,-er),ut.lineTo(wr,nn);for(var Dr=1;Dr<5;++Dr){var bn=g*Dr/5,Yr=Math.cos(bn),Tn=Math.sin(bn);ut.lineTo(Tn*er,-Yr*er),ut.lineTo(Yr*wr-Tn*nn,Tn*wr+Yr*nn)}ut.closePath()}},we={draw:function(ut,Jt){var er=Math.sqrt(Jt),wr=-er/2;ut.rect(wr,wr,er,er)}},Le=Math.sqrt(3),Ke={draw:function(ut,Jt){var er=-Math.sqrt(Jt/(Le*3));ut.moveTo(0,er*2),ut.lineTo(-Le*er,-er),ut.lineTo(Le*er,-er),ut.closePath()}},Te=-.5,Ve=Math.sqrt(3)/2,$e=1/Math.sqrt(12),ot=($e/2+1)*3,tt={draw:function(ut,Jt){var er=Math.sqrt(Jt/ot),wr=er/2,nn=er*$e,Dr=wr,bn=er*$e+er,Yr=-Dr,Tn=bn;ut.moveTo(wr,nn),ut.lineTo(Dr,bn),ut.lineTo(Yr,Tn),ut.lineTo(Te*wr-Ve*nn,Ve*wr+Te*nn),ut.lineTo(Te*Dr-Ve*bn,Ve*Dr+Te*bn),ut.lineTo(Te*Yr-Ve*Tn,Ve*Yr+Te*Tn),ut.lineTo(Te*wr+Ve*nn,Te*nn-Ve*wr),ut.lineTo(Te*Dr+Ve*bn,Te*bn-Ve*Dr),ut.lineTo(Te*Yr+Ve*Tn,Te*Tn-Ve*Yr),ut.closePath()}},nt=[be,De,it,we,qe,Ke,tt];function We(){var ut=r(be),Jt=r(64),er=null;function wr(){var nn;if(er||(er=nn=t.path()),ut.apply(this,arguments).draw(er,+Jt.apply(this,arguments)),nn)return er=null,nn+""||null}return wr.type=function(nn){return arguments.length?(ut=typeof nn=="function"?nn:r(nn),wr):ut},wr.size=function(nn){return arguments.length?(Jt=typeof nn=="function"?nn:r(+nn),wr):Jt},wr.context=function(nn){return arguments.length?(er=nn==null?null:nn,wr):er},wr}function mt(){}function bt(ut,Jt,er){ut._context.bezierCurveTo((2*ut._x0+ut._x1)/3,(2*ut._y0+ut._y1)/3,(ut._x0+2*ut._x1)/3,(ut._y0+2*ut._y1)/3,(ut._x0+4*ut._x1+Jt)/6,(ut._y0+4*ut._y1+er)/6)}function Yt(ut){this._context=ut}Yt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:bt(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:bt(this,ut,Jt);break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt}};function jt(ut){return new Yt(ut)}function mr(ut){this._context=ut}mr.prototype={areaStart:mt,areaEnd:mt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._x2=ut,this._y2=Jt;break;case 1:this._point=2,this._x3=ut,this._y3=Jt;break;case 2:this._point=3,this._x4=ut,this._y4=Jt,this._context.moveTo((this._x0+4*this._x1+ut)/6,(this._y0+4*this._y1+Jt)/6);break;default:bt(this,ut,Jt);break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt}};function or(ut){return new mr(ut)}function fr(ut){this._context=ut}fr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var er=(this._x0+4*this._x1+ut)/6,wr=(this._y0+4*this._y1+Jt)/6;this._line?this._context.lineTo(er,wr):this._context.moveTo(er,wr);break;case 3:this._point=4;default:bt(this,ut,Jt);break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt}};function Ot(ut){return new fr(ut)}function cr(ut,Jt){this._basis=new Yt(ut),this._beta=Jt}cr.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var ut=this._x,Jt=this._y,er=ut.length-1;if(er>0)for(var wr=ut[0],nn=Jt[0],Dr=ut[er]-wr,bn=Jt[er]-nn,Yr=-1,Tn;++Yr<=er;)Tn=Yr/er,this._basis.point(this._beta*ut[Yr]+(1-this._beta)*(wr+Tn*Dr),this._beta*Jt[Yr]+(1-this._beta)*(nn+Tn*bn));this._x=this._y=null,this._basis.lineEnd()},point:function(ut,Jt){this._x.push(+ut),this._y.push(+Jt)}};var Ct=(function ut(Jt){function er(wr){return Jt===1?new Yt(wr):new cr(wr,Jt)}return er.beta=function(wr){return ut(+wr)},er})(.85);function wt(ut,Jt,er){ut._context.bezierCurveTo(ut._x1+ut._k*(ut._x2-ut._x0),ut._y1+ut._k*(ut._y2-ut._y0),ut._x2+ut._k*(ut._x1-Jt),ut._y2+ut._k*(ut._y1-er),ut._x2,ut._y2)}function Tt(ut,Jt){this._context=ut,this._k=(1-Jt)/6}Tt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:wt(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2,this._x1=ut,this._y1=Jt;break;case 2:this._point=3;default:wt(this,ut,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Mt=(function ut(Jt){function er(wr){return new Tt(wr,Jt)}return er.tension=function(wr){return ut(+wr)},er})(0);function Lt(ut,Jt){this._context=ut,this._k=(1-Jt)/6}Lt.prototype={areaStart:mt,areaEnd:mt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._x3=ut,this._y3=Jt;break;case 1:this._point=2,this._context.moveTo(this._x4=ut,this._y4=Jt);break;case 2:this._point=3,this._x5=ut,this._y5=Jt;break;default:wt(this,ut,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var ft=(function ut(Jt){function er(wr){return new Lt(wr,Jt)}return er.tension=function(wr){return ut(+wr)},er})(0);function kt(ut,Jt){this._context=ut,this._k=(1-Jt)/6}kt.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:wt(this,ut,Jt);break}this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var rr=(function ut(Jt){function er(wr){return new kt(wr,Jt)}return er.tension=function(wr){return ut(+wr)},er})(0);function pr(ut,Jt,er){var wr=ut._x1,nn=ut._y1,Dr=ut._x2,bn=ut._y2;if(ut._l01_a>c){var Yr=2*ut._l01_2a+3*ut._l01_a*ut._l12_a+ut._l12_2a,Tn=3*ut._l01_a*(ut._l01_a+ut._l12_a);wr=(wr*Yr-ut._x0*ut._l12_2a+ut._x2*ut._l01_2a)/Tn,nn=(nn*Yr-ut._y0*ut._l12_2a+ut._y2*ut._l01_2a)/Tn}if(ut._l23_a>c){var Kn=2*ut._l23_2a+3*ut._l23_a*ut._l12_a+ut._l12_2a,Qn=3*ut._l23_a*(ut._l23_a+ut._l12_a);Dr=(Dr*Kn+ut._x1*ut._l23_2a-Jt*ut._l12_2a)/Qn,bn=(bn*Kn+ut._y1*ut._l23_2a-er*ut._l12_2a)/Qn}ut._context.bezierCurveTo(wr,nn,Dr,bn,ut._x2,ut._y2)}function Kr(ut,Jt){this._context=ut,this._alpha=Jt}Kr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){if(ut=+ut,Jt=+Jt,this._point){var er=this._x2-ut,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2;break;case 2:this._point=3;default:pr(this,ut,Jt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Nr=(function ut(Jt){function er(wr){return Jt?new Kr(wr,Jt):new Tt(wr,0)}return er.alpha=function(wr){return ut(+wr)},er})(.5);function dn(ut,Jt){this._context=ut,this._alpha=Jt}dn.prototype={areaStart:mt,areaEnd:mt,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x3,this._y3),this._context.closePath();break}case 2:{this._context.lineTo(this._x3,this._y3),this._context.closePath();break}case 3:{this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5);break}}},point:function(ut,Jt){if(ut=+ut,Jt=+Jt,this._point){var er=this._x2-ut,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=ut,this._y3=Jt;break;case 1:this._point=2,this._context.moveTo(this._x4=ut,this._y4=Jt);break;case 2:this._point=3,this._x5=ut,this._y5=Jt;break;default:pr(this,ut,Jt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var xr=(function ut(Jt){function er(wr){return Jt?new dn(wr,Jt):new Lt(wr,0)}return er.alpha=function(wr){return ut(+wr)},er})(.5);function Fr(ut,Jt){this._context=ut,this._alpha=Jt}Fr.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){if(ut=+ut,Jt=+Jt,this._point){var er=this._x2-ut,wr=this._y2-Jt;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(er*er+wr*wr,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:pr(this,ut,Jt);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=ut,this._y0=this._y1,this._y1=this._y2,this._y2=Jt}};var Zr=(function ut(Jt){function er(wr){return Jt?new Fr(wr,Jt):new kt(wr,0)}return er.alpha=function(wr){return ut(+wr)},er})(.5);function Cn(ut){this._context=ut}Cn.prototype={areaStart:mt,areaEnd:mt,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(ut,Jt){ut=+ut,Jt=+Jt,this._point?this._context.lineTo(ut,Jt):(this._point=1,this._context.moveTo(ut,Jt))}};function Dt(ut){return new Cn(ut)}function At(ut){return ut<0?-1:1}function Vt(ut,Jt,er){var wr=ut._x1-ut._x0,nn=Jt-ut._x1,Dr=(ut._y1-ut._y0)/(wr||nn<0&&-0),bn=(er-ut._y1)/(nn||wr<0&&-0),Yr=(Dr*nn+bn*wr)/(wr+nn);return(At(Dr)+At(bn))*Math.min(Math.abs(Dr),Math.abs(bn),.5*Math.abs(Yr))||0}function Qt(ut,Jt){var er=ut._x1-ut._x0;return er?(3*(ut._y1-ut._y0)/er-Jt)/2:Jt}function Ut(ut,Jt,er){var wr=ut._x0,nn=ut._y0,Dr=ut._x1,bn=ut._y1,Yr=(Dr-wr)/3;ut._context.bezierCurveTo(wr+Yr,nn+Yr*Jt,Dr-Yr,bn-Yr*er,Dr,bn)}function _r(ut){this._context=ut}_r.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:Ut(this,this._t0,Qt(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(ut,Jt){var er=NaN;if(ut=+ut,Jt=+Jt,!(ut===this._x1&&Jt===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2;break;case 2:this._point=3,Ut(this,Qt(this,er=Vt(this,ut,Jt)),er);break;default:Ut(this,this._t0,er=Vt(this,ut,Jt));break}this._x0=this._x1,this._x1=ut,this._y0=this._y1,this._y1=Jt,this._t0=er}}};function rn(ut){this._context=new Jr(ut)}(rn.prototype=Object.create(_r.prototype)).point=function(ut,Jt){_r.prototype.point.call(this,Jt,ut)};function Jr(ut){this._context=ut}Jr.prototype={moveTo:function(ut,Jt){this._context.moveTo(Jt,ut)},closePath:function(){this._context.closePath()},lineTo:function(ut,Jt){this._context.lineTo(Jt,ut)},bezierCurveTo:function(ut,Jt,er,wr,nn,Dr){this._context.bezierCurveTo(Jt,ut,wr,er,Dr,nn)}};function qn(ut){return new _r(ut)}function ri(ut){return new rn(ut)}function Jn(ut){this._context=ut}Jn.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var ut=this._x,Jt=this._y,er=ut.length;if(er)if(this._line?this._context.lineTo(ut[0],Jt[0]):this._context.moveTo(ut[0],Jt[0]),er===2)this._context.lineTo(ut[1],Jt[1]);else for(var wr=Ii(ut),nn=Ii(Jt),Dr=0,bn=1;bn=0;--Jt)nn[Jt]=(bn[Jt]-nn[Jt+1])/Dr[Jt];for(Dr[er-1]=(ut[er]+nn[er-1])/2,Jt=0;Jt=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(ut,Jt){switch(ut=+ut,Jt=+Jt,this._point){case 0:this._point=1,this._line?this._context.lineTo(ut,Jt):this._context.moveTo(ut,Jt);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,Jt),this._context.lineTo(ut,Jt);else{var er=this._x*(1-this._t)+ut*this._t;this._context.lineTo(er,this._y),this._context.lineTo(er,Jt)}break}}this._x=ut,this._y=Jt}};function ha(ut){return new ra(ut,.5)}function va(ut){return new ra(ut,0)}function Xi(ut){return new ra(ut,1)}function oa(ut,Jt){if((bn=ut.length)>1)for(var er=1,wr,nn,Dr=ut[Jt[0]],bn,Yr=Dr.length;er=0;)er[Jt]=Jt;return er}function Ga(ut,Jt){return ut[Jt]}function ss(){var ut=r([]),Jt=Ma,er=oa,wr=Ga;function nn(Dr){var bn=ut.apply(this,arguments),Yr,Tn=Dr.length,Kn=bn.length,Qn=new Array(Kn),Ai;for(Yr=0;Yr0){for(var er,wr,nn=0,Dr=ut[0].length,bn;nn0)for(var er,wr=0,nn,Dr,bn,Yr,Tn,Kn=ut[Jt[0]].length;wr0?(nn[0]=bn,nn[1]=bn+=Dr):Dr<0?(nn[1]=Yr,nn[0]=Yr+=Dr):(nn[0]=0,nn[1]=Dr)}function Eo(ut,Jt){if((nn=ut.length)>0){for(var er=0,wr=ut[Jt[0]],nn,Dr=wr.length;er0)||!((Dr=(nn=ut[Jt[0]]).length)>0))){for(var er=0,wr=1,nn,Dr,bn;wrDr&&(Dr=nn,er=Jt);return er}function bo(ut){var Jt=ut.map(Zs);return Ma(ut).sort(function(er,wr){return Jt[er]-Jt[wr]})}function Zs(ut){for(var Jt=0,er=-1,wr=ut.length,nn;++er{(function(e,t){typeof bD=="object"&&typeof MXe!="undefined"?t(bD,bXe(),EK()):(e=e||self,t(e.d3=e.d3||{},e.d3,e.d3))})(bD,function(e,t,r){"use strict";function n(w){return w.target.depth}function a(w){return w.depth}function i(w,A){return A-1-w.height}function o(w,A){return w.sourceLinks.length?w.depth:A-1}function s(w){return w.targetLinks.length?w.depth:w.sourceLinks.length?t.min(w.sourceLinks,n)-1:0}function l(w){return function(){return w}}function u(w,A){return f(w.source,A.source)||w.index-A.index}function c(w,A){return f(w.target,A.target)||w.index-A.index}function f(w,A){return w.y0-A.y0}function v(w){return w.value}function g(w){return w.index}function p(w){return w.nodes}function x(w){return w.links}function _(w,A){let T=w.get(A);if(!T)throw new Error("missing: "+A);return T}function y({nodes:w}){for(let A of w){let T=A.y0,m=T;for(let F of A.sourceLinks)F.y0=T+F.width/2,T+=F.width;for(let F of A.targetLinks)F.y1=m+F.width/2,m+=F.width}}function C(){let w=0,A=0,T=1,m=1,F=24,E=8,I,R=g,B=o,O,V,j=p,q=x,U=6,J=2/3;function ee(){let it={nodes:j.apply(null,arguments),links:q.apply(null,arguments)};return ce(it),ye(it),xe(it),ue(it),ne(it),y(it),it}ee.update=function(it){return y(it),it},ee.nodeId=function(it){return arguments.length?(R=typeof it=="function"?it:l(it),ee):R},ee.nodeAlign=function(it){return arguments.length?(B=typeof it=="function"?it:l(it),ee):B},ee.nodeSort=function(it){return arguments.length?(O=it,ee):O},ee.nodeWidth=function(it){return arguments.length?(F=+it,ee):F},ee.nodePadding=function(it){return arguments.length?(E=I=+it,ee):E},ee.nodes=function(it){return arguments.length?(j=typeof it=="function"?it:l(it),ee):j},ee.links=function(it){return arguments.length?(q=typeof it=="function"?it:l(it),ee):q},ee.linkSort=function(it){return arguments.length?(V=it,ee):V},ee.size=function(it){return arguments.length?(w=A=0,T=+it[0],m=+it[1],ee):[T-w,m-A]},ee.extent=function(it){return arguments.length?(w=+it[0][0],T=+it[1][0],A=+it[0][1],m=+it[1][1],ee):[[w,A],[T,m]]},ee.iterations=function(it){return arguments.length?(U=+it,ee):U};function ce({nodes:it,links:Oe}){for(let[ct,et]of it.entries())et.index=ct,et.sourceLinks=[],et.targetLinks=[];let ze=new Map(it.map((ct,et)=>[R(ct,et,it),ct]));for(let[ct,et]of Oe.entries()){et.index=ct;let{source:qe,target:we}=et;typeof qe!="object"&&(qe=et.source=_(ze,qe)),typeof we!="object"&&(we=et.target=_(ze,we)),qe.sourceLinks.push(et),we.targetLinks.push(et)}if(V!=null)for(let{sourceLinks:ct,targetLinks:et}of it)ct.sort(V),et.sort(V)}function ye({nodes:it}){for(let Oe of it)Oe.value=Oe.fixedValue===void 0?Math.max(t.sum(Oe.sourceLinks,v),t.sum(Oe.targetLinks,v)):Oe.fixedValue}function xe({nodes:it}){let Oe=it.length,ze=new Set(it),ct=new Set,et=0;for(;ze.size;){for(let qe of ze){qe.depth=et;for(let{target:we}of qe.sourceLinks)ct.add(we)}if(++et>Oe)throw new Error("circular link");ze=ct,ct=new Set}}function ue({nodes:it}){let Oe=it.length,ze=new Set(it),ct=new Set,et=0;for(;ze.size;){for(let qe of ze){qe.height=et;for(let{source:we}of qe.targetLinks)ct.add(we)}if(++et>Oe)throw new Error("circular link");ze=ct,ct=new Set}}function K({nodes:it}){let Oe=t.max(it,et=>et.depth)+1,ze=(T-w-F)/(Oe-1),ct=new Array(Oe);for(let et of it){let qe=Math.max(0,Math.min(Oe-1,Math.floor(B.call(null,et,Oe))));et.layer=qe,et.x0=w+qe*ze,et.x1=et.x0+F,ct[qe]?ct[qe].push(et):ct[qe]=[et]}if(O)for(let et of ct)et.sort(O);return ct}function _e(it){let Oe=t.min(it,ze=>(m-A-(ze.length-1)*I)/t.sum(ze,v));for(let ze of it){let ct=A;for(let et of ze){et.y0=ct,et.y1=ct+et.value*Oe,ct=et.y1+I;for(let qe of et.sourceLinks)qe.width=qe.value*Oe}ct=(m-ct+I)/(ze.length+1);for(let et=0;etze.length)-1)),_e(Oe);for(let ze=0;ze0))continue;let Te=(Le/Ke-we.y0)*Oe;we.y0+=Te,we.y1+=Te,be(we)}O===void 0&&qe.sort(f),ie(qe,ze)}}function pe(it,Oe,ze){for(let ct=it.length,et=ct-2;et>=0;--et){let qe=it[et];for(let we of qe){let Le=0,Ke=0;for(let{target:Ve,value:$e}of we.sourceLinks){let ot=$e*(Ve.layer-we.layer);Le+=ht(we,Ve)*ot,Ke+=ot}if(!(Ke>0))continue;let Te=(Le/Ke-we.y0)*Oe;we.y0+=Te,we.y1+=Te,be(we)}O===void 0&&qe.sort(f),ie(qe,ze)}}function ie(it,Oe){let ze=it.length>>1,ct=it[ze];me(it,ct.y0-I,ze-1,Oe),le(it,ct.y1+I,ze+1,Oe),me(it,m,it.length-1,Oe),le(it,A,0,Oe)}function le(it,Oe,ze,ct){for(;ze1e-6&&(et.y0+=qe,et.y1+=qe),Oe=et.y1+I}}function me(it,Oe,ze,ct){for(;ze>=0;--ze){let et=it[ze],qe=(et.y1-Oe)*ct;qe>1e-6&&(et.y0-=qe,et.y1-=qe),Oe=et.y0-I}}function be({sourceLinks:it,targetLinks:Oe}){if(V===void 0){for(let{source:{sourceLinks:ze}}of Oe)ze.sort(c);for(let{target:{targetLinks:ze}}of it)ze.sort(u)}}function De(it){if(V===void 0)for(let{sourceLinks:Oe,targetLinks:ze}of it)Oe.sort(c),ze.sort(u)}function Ge(it,Oe){let ze=it.y0-(it.sourceLinks.length-1)*I/2;for(let{target:ct,width:et}of it.sourceLinks){if(ct===Oe)break;ze+=et+I}for(let{source:ct,width:et}of Oe.targetLinks){if(ct===it)break;ze-=et}return ze}function ht(it,Oe){let ze=Oe.y0-(Oe.targetLinks.length-1)*I/2;for(let{source:ct,width:et}of Oe.targetLinks){if(ct===it)break;ze+=et+I}for(let{target:ct,width:et}of it.sourceLinks){if(ct===Oe)break;ze-=et}return ze}return ee}function k(w){return[w.source.x1,w.y0]}function S(w){return[w.target.x0,w.y1]}function L(){return r.linkHorizontal().source(k).target(S)}e.sankey=C,e.sankeyCenter=s,e.sankeyJustify=o,e.sankeyLeft=a,e.sankeyLinkHorizontal=L,e.sankeyRight=i,Object.defineProperty(e,"__esModule",{value:!0})})});var kXe=fe((wD,EXe)=>{(function(e,t){t(typeof wD=="object"&&typeof EXe!="undefined"?wD:e.d3=e.d3||{})})(wD,(function(e){"use strict";function t(ne,ae){return neae?1:ne>=ae?0:NaN}function r(ne){return ne.length===1&&(ne=n(ne)),{left:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)<0?ie=me+1:le=me}return ie},right:function(ae,pe,ie,le){for(ie==null&&(ie=0),le==null&&(le=ae.length);ie>>1;ne(ae[me],pe)>0?le=me:ie=me+1}return ie}}}function n(ne){return function(ae,pe){return t(ne(ae),pe)}}var a=r(t),i=a.right,o=a.left;function s(ne,ae){ae==null&&(ae=l);for(var pe=0,ie=ne.length-1,le=ne[0],me=new Array(ie<0?0:ie);pene?1:ae>=ne?0:NaN}function f(ne){return ne===null?NaN:+ne}function v(ne,ae){var pe=ne.length,ie=0,le=-1,me=0,be,De,Ge=0;if(ae==null)for(;++le1)return Ge/(ie-1)}function g(ne,ae){var pe=v(ne,ae);return pe&&Math.sqrt(pe)}function p(ne,ae){var pe=ne.length,ie=-1,le,me,be;if(ae==null){for(;++ie=le)for(me=be=le;++iele&&(me=le),be=le)for(me=be=le;++iele&&(me=le),be0)return[ne];if((ie=ae0)for(ne=Math.ceil(ne/De),ae=Math.floor(ae/De),be=new Array(me=Math.ceil(ae-ne+1));++le=0?(me>=L?10:me>=w?5:me>=A?2:1)*Math.pow(10,le):-Math.pow(10,-le)/(me>=L?10:me>=w?5:me>=A?2:1)}function F(ne,ae,pe){var ie=Math.abs(ae-ne)/Math.max(0,pe),le=Math.pow(10,Math.floor(Math.log(ie)/Math.LN10)),me=ie/le;return me>=L?le*=10:me>=w?le*=5:me>=A&&(le*=2),aeOe;)ze.pop(),--ct;var et=new Array(ct+1),qe;for(me=0;me<=ct;++me)qe=et[me]=[],qe.x0=me>0?ze[me-1]:it,qe.x1=me=1)return+pe(ne[ie-1],ie-1,ne);var ie,le=(ie-1)*ae,me=Math.floor(le),be=+pe(ne[me],me,ne),De=+pe(ne[me+1],me+1,ne);return be+(De-be)*(le-me)}}function B(ne,ae,pe){return ne=y.call(ne,f).sort(t),Math.ceil((pe-ae)/(2*(R(ne,.75)-R(ne,.25))*Math.pow(ne.length,-1/3)))}function O(ne,ae,pe){return Math.ceil((pe-ae)/(3.5*g(ne)*Math.pow(ne.length,-1/3)))}function V(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++ieme&&(me=le)}else for(;++ie=le)for(me=le;++ieme&&(me=le);return me}function j(ne,ae){var pe=ne.length,ie=pe,le=-1,me,be=0;if(ae==null)for(;++le=0;)for(be=ne[ae],pe=be.length;--pe>=0;)me[--le]=be[pe];return me}function J(ne,ae){var pe=ne.length,ie=-1,le,me;if(ae==null){for(;++ie=le)for(me=le;++iele&&(me=le)}else for(;++ie=le)for(me=le;++iele&&(me=le);return me}function ee(ne,ae){for(var pe=ae.length,ie=new Array(pe);pe--;)ie[pe]=ne[ae[pe]];return ie}function ce(ne,ae){if(pe=ne.length){var pe,ie=0,le=0,me,be=ne[le];for(ae==null&&(ae=t);++ie{var Zrr=MK();CXe.exports=function(t,r){var n=[],a=[],i=[],o={},s=[],l;function u(k){i[k]=!1,o.hasOwnProperty(k)&&Object.keys(o[k]).forEach(function(S){delete o[k][S],i[S]&&u(S)})}function c(k){var S=!1;a.push(k),i[k]=!0;var L,w;for(L=0;L=k})}function g(k){v(k);for(var S=t,L=Zrr(S),w=L.components.filter(function(R){return R.length>1}),A=1/0,T,m=0;m{(function(e,t){typeof TD=="object"&&typeof PXe!="undefined"?t(TD,kXe(),SK(),EK(),LXe()):t(e.d3=e.d3||{},e.d3,e.d3,e.d3,null)})(TD,(function(e,t,r,n,a){"use strict";a=a&&a.hasOwnProperty("default")?a.default:a;function i(Oe){return Oe.target.depth}function o(Oe){return Oe.depth}function s(Oe,ze){return ze-1-Oe.height}function l(Oe,ze){return Oe.sourceLinks.length?Oe.depth:ze-1}function u(Oe){return Oe.targetLinks.length?Oe.depth:Oe.sourceLinks.length?t.min(Oe.sourceLinks,i)-1:0}function c(Oe){return function(){return Oe}}var f=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(Oe){return typeof Oe}:function(Oe){return Oe&&typeof Symbol=="function"&&Oe.constructor===Symbol&&Oe!==Symbol.prototype?"symbol":typeof Oe};function v(Oe,ze){return p(Oe.source,ze.source)||Oe.index-ze.index}function g(Oe,ze){return p(Oe.target,ze.target)||Oe.index-ze.index}function p(Oe,ze){return Oe.partOfCycle===ze.partOfCycle?Oe.y0-ze.y0:Oe.circularLinkType==="top"||ze.circularLinkType==="bottom"?-1:1}function x(Oe){return Oe.value}function _(Oe){return(Oe.y0+Oe.y1)/2}function y(Oe){return _(Oe.source)}function C(Oe){return _(Oe.target)}function k(Oe){return Oe.index}function S(Oe){return Oe.nodes}function L(Oe){return Oe.links}function w(Oe,ze){var ct=Oe.get(ze);if(!ct)throw new Error("missing: "+ze);return ct}function A(Oe,ze){return ze(Oe)}var T=25,m=10,F=.3;function E(){var Oe=0,ze=0,ct=1,et=1,qe=24,we,Le=k,Ke=l,Te=S,Ve=L,$e=32,ot=2,tt,nt=null;function We(){var Ot={nodes:Te.apply(null,arguments),links:Ve.apply(null,arguments)};mt(Ot),I(Ot,Le,nt),bt(Ot),mr(Ot),R(Ot,Le),or(Ot,$e,Le),fr(Ot);for(var cr=4,Ct=0;Ct0?cr+T+m:cr,Ct=Ct>0?Ct+T+m:Ct,wt=wt>0?wt+T+m:wt,Tt=Tt>0?Tt+T+m:Tt,{top:cr,bottom:Ct,left:Tt,right:wt}}function jt(Ot,cr){var Ct=t.max(Ot.nodes,function(rr){return rr.column}),wt=ct-Oe,Tt=et-ze,Mt=wt+cr.right+cr.left,Lt=Tt+cr.top+cr.bottom,ft=wt/Mt,kt=Tt/Lt;return Oe=Oe*ft+cr.left,ct=cr.right==0?ct:ct*ft,ze=ze*kt+cr.top,et=et*kt,Ot.nodes.forEach(function(rr){rr.x0=Oe+rr.column*((ct-Oe-qe)/Ct),rr.x1=rr.x0+qe}),kt}function mr(Ot){var cr,Ct,wt;for(cr=Ot.nodes,Ct=[],wt=0;cr.length;++wt,cr=Ct,Ct=[])cr.forEach(function(Tt){Tt.depth=wt,Tt.sourceLinks.forEach(function(Mt){Ct.indexOf(Mt.target)<0&&!Mt.circular&&Ct.push(Mt.target)})});for(cr=Ot.nodes,Ct=[],wt=0;cr.length;++wt,cr=Ct,Ct=[])cr.forEach(function(Tt){Tt.height=wt,Tt.targetLinks.forEach(function(Mt){Ct.indexOf(Mt.source)<0&&!Mt.circular&&Ct.push(Mt.source)})});Ot.nodes.forEach(function(Tt){Tt.column=Math.floor(Ke.call(null,Tt,wt))})}function or(Ot,cr,Ct){var wt=r.nest().key(function(rr){return rr.column}).sortKeys(t.ascending).entries(Ot.nodes).map(function(rr){return rr.values});Lt(Ct),kt();for(var Tt=1,Mt=cr;Mt>0;--Mt)ft(Tt*=.99,Ct),kt();function Lt(rr){if(tt){var pr=1/0;wt.forEach(function(xr){var Fr=et*tt/(xr.length+1);pr=Fr0))if(xr==0&&dn==1)Zr=Fr.y1-Fr.y0,Fr.y0=et/2-Zr/2,Fr.y1=et/2+Zr/2;else if(xr==Kr-1&&dn==1)Zr=Fr.y1-Fr.y0,Fr.y0=et/2-Zr/2,Fr.y1=et/2+Zr/2;else{var Cn=0,Dt=t.mean(Fr.sourceLinks,C),At=t.mean(Fr.targetLinks,y);Dt&&At?Cn=(Dt+At)/2:Cn=Dt||At;var Vt=(Cn-_(Fr))*rr;Fr.y0+=Vt,Fr.y1+=Vt}})})}function kt(){wt.forEach(function(rr){var pr,Kr,Nr=ze,dn=rr.length,xr;for(rr.sort(p),xr=0;xr0&&(pr.y0+=Kr,pr.y1+=Kr),Nr=pr.y1+we;if(Kr=Nr-we-et,Kr>0)for(Nr=pr.y0-=Kr,pr.y1-=Kr,xr=dn-2;xr>=0;--xr)pr=rr[xr],Kr=pr.y1+we-Nr,Kr>0&&(pr.y0-=Kr,pr.y1-=Kr),Nr=pr.y0})}}function fr(Ot){Ot.nodes.forEach(function(cr){cr.sourceLinks.sort(g),cr.targetLinks.sort(v)}),Ot.nodes.forEach(function(cr){var Ct=cr.y0,wt=Ct,Tt=cr.y1,Mt=Tt;cr.sourceLinks.forEach(function(Lt){Lt.circular?(Lt.y0=Tt-Lt.width/2,Tt=Tt-Lt.width):(Lt.y0=Ct+Lt.width/2,Ct+=Lt.width)}),cr.targetLinks.forEach(function(Lt){Lt.circular?(Lt.y1=Mt-Lt.width/2,Mt=Mt-Lt.width):(Lt.y1=wt+Lt.width/2,wt+=Lt.width)})})}return We}function I(Oe,ze,ct){var et=0;if(ct===null){for(var qe=[],we=0;weze.source.column)}function V(Oe,ze){var ct=0;Oe.sourceLinks.forEach(function(qe){ct=qe.circular&&!ht(qe,ze)?ct+1:ct});var et=0;return Oe.targetLinks.forEach(function(qe){et=qe.circular&&!ht(qe,ze)?et+1:et}),ct+et}function j(Oe){var ze=Oe.source.sourceLinks,ct=0;ze.forEach(function(we){ct=we.circular?ct+1:ct});var et=Oe.target.targetLinks,qe=0;return et.forEach(function(we){qe=we.circular?qe+1:qe}),!(ct>1||qe>1)}function q(Oe,ze,ct){return Oe.sort(ee),Oe.forEach(function(et,qe){var we=0;if(ht(et,ct)&&j(et))et.circularPathData.verticalBuffer=we+et.width/2;else{var Le=0;for(Le;Lewe?Ke:we}et.circularPathData.verticalBuffer=we+et.width/2}}),Oe}function U(Oe,ze,ct,et){var qe=5,we=t.min(Oe.links,function(Te){return Te.source.y0});Oe.links.forEach(function(Te){Te.circular&&(Te.circularPathData={})});var Le=Oe.links.filter(function(Te){return Te.circularLinkType=="top"});q(Le,ze,et);var Ke=Oe.links.filter(function(Te){return Te.circularLinkType=="bottom"});q(Ke,ze,et),Oe.links.forEach(function(Te){if(Te.circular){if(Te.circularPathData.arcRadius=Te.width+m,Te.circularPathData.leftNodeBuffer=qe,Te.circularPathData.rightNodeBuffer=qe,Te.circularPathData.sourceWidth=Te.source.x1-Te.source.x0,Te.circularPathData.sourceX=Te.source.x0+Te.circularPathData.sourceWidth,Te.circularPathData.targetX=Te.target.x0,Te.circularPathData.sourceY=Te.y0,Te.circularPathData.targetY=Te.y1,ht(Te,et)&&j(Te))Te.circularPathData.leftSmallArcRadius=m+Te.width/2,Te.circularPathData.leftLargeArcRadius=m+Te.width/2,Te.circularPathData.rightSmallArcRadius=m+Te.width/2,Te.circularPathData.rightLargeArcRadius=m+Te.width/2,Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Te.source.y1+T+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=Te.source.y0-T-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius);else{var Ve=Te.source.column,$e=Te.circularLinkType,ot=Oe.links.filter(function(We){return We.source.column==Ve&&We.circularLinkType==$e});Te.circularLinkType=="bottom"?ot.sort(ye):ot.sort(ce);var tt=0;ot.forEach(function(We,mt){We.circularLinkID==Te.circularLinkID&&(Te.circularPathData.leftSmallArcRadius=m+Te.width/2+tt,Te.circularPathData.leftLargeArcRadius=m+Te.width/2+mt*ze+tt),tt=tt+We.width}),Ve=Te.target.column,ot=Oe.links.filter(function(We){return We.target.column==Ve&&We.circularLinkType==$e}),Te.circularLinkType=="bottom"?ot.sort(ue):ot.sort(xe),tt=0,ot.forEach(function(We,mt){We.circularLinkID==Te.circularLinkID&&(Te.circularPathData.rightSmallArcRadius=m+Te.width/2+tt,Te.circularPathData.rightLargeArcRadius=m+Te.width/2+mt*ze+tt),tt=tt+We.width}),Te.circularLinkType=="bottom"?(Te.circularPathData.verticalFullExtent=Math.max(ct,Te.source.y1,Te.target.y1)+T+Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent-Te.circularPathData.rightLargeArcRadius):(Te.circularPathData.verticalFullExtent=we-T-Te.circularPathData.verticalBuffer,Te.circularPathData.verticalLeftInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.leftLargeArcRadius,Te.circularPathData.verticalRightInnerExtent=Te.circularPathData.verticalFullExtent+Te.circularPathData.rightLargeArcRadius)}Te.circularPathData.leftInnerExtent=Te.circularPathData.sourceX+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightInnerExtent=Te.circularPathData.targetX-Te.circularPathData.rightNodeBuffer,Te.circularPathData.leftFullExtent=Te.circularPathData.sourceX+Te.circularPathData.leftLargeArcRadius+Te.circularPathData.leftNodeBuffer,Te.circularPathData.rightFullExtent=Te.circularPathData.targetX-Te.circularPathData.rightLargeArcRadius-Te.circularPathData.rightNodeBuffer}if(Te.circular)Te.path=J(Te);else{var nt=n.linkHorizontal().source(function(We){var mt=We.source.x0+(We.source.x1-We.source.x0),bt=We.y0;return[mt,bt]}).target(function(We){var mt=We.target.x0,bt=We.y1;return[mt,bt]});Te.path=nt(Te)}})}function J(Oe){var ze="";return Oe.circularLinkType=="top"?ze="M"+Oe.circularPathData.sourceX+" "+Oe.circularPathData.sourceY+" L"+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.sourceY+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftSmallArcRadius+" 0 0 0 "+Oe.circularPathData.leftFullExtent+" "+(Oe.circularPathData.sourceY-Oe.circularPathData.leftSmallArcRadius)+" L"+Oe.circularPathData.leftFullExtent+" "+Oe.circularPathData.verticalLeftInnerExtent+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftLargeArcRadius+" 0 0 0 "+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" L"+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightLargeArcRadius+" 0 0 0 "+Oe.circularPathData.rightFullExtent+" "+Oe.circularPathData.verticalRightInnerExtent+" L"+Oe.circularPathData.rightFullExtent+" "+(Oe.circularPathData.targetY-Oe.circularPathData.rightSmallArcRadius)+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightSmallArcRadius+" 0 0 0 "+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.targetY+" L"+Oe.circularPathData.targetX+" "+Oe.circularPathData.targetY:ze="M"+Oe.circularPathData.sourceX+" "+Oe.circularPathData.sourceY+" L"+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.sourceY+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftSmallArcRadius+" 0 0 1 "+Oe.circularPathData.leftFullExtent+" "+(Oe.circularPathData.sourceY+Oe.circularPathData.leftSmallArcRadius)+" L"+Oe.circularPathData.leftFullExtent+" "+Oe.circularPathData.verticalLeftInnerExtent+" A"+Oe.circularPathData.leftLargeArcRadius+" "+Oe.circularPathData.leftLargeArcRadius+" 0 0 1 "+Oe.circularPathData.leftInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" L"+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.verticalFullExtent+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightLargeArcRadius+" 0 0 1 "+Oe.circularPathData.rightFullExtent+" "+Oe.circularPathData.verticalRightInnerExtent+" L"+Oe.circularPathData.rightFullExtent+" "+(Oe.circularPathData.targetY+Oe.circularPathData.rightSmallArcRadius)+" A"+Oe.circularPathData.rightLargeArcRadius+" "+Oe.circularPathData.rightSmallArcRadius+" 0 0 1 "+Oe.circularPathData.rightInnerExtent+" "+Oe.circularPathData.targetY+" L"+Oe.circularPathData.targetX+" "+Oe.circularPathData.targetY,ze}function ee(Oe,ze){return K(Oe)==K(ze)?Oe.circularLinkType=="bottom"?ye(Oe,ze):ce(Oe,ze):K(ze)-K(Oe)}function ce(Oe,ze){return Oe.y0-ze.y0}function ye(Oe,ze){return ze.y0-Oe.y0}function xe(Oe,ze){return Oe.y1-ze.y1}function ue(Oe,ze){return ze.y1-Oe.y1}function K(Oe){return Oe.target.column-Oe.source.column}function _e(Oe){return Oe.target.x0-Oe.source.x1}function ne(Oe,ze){var ct=B(Oe),et=_e(ze)/Math.tan(ct),qe=Ge(Oe)=="up"?Oe.y1+et:Oe.y1-et;return qe}function ae(Oe,ze){var ct=B(Oe),et=_e(ze)/Math.tan(ct),qe=Ge(Oe)=="up"?Oe.y1-et:Oe.y1+et;return qe}function pe(Oe,ze,ct,et){Oe.links.forEach(function(qe){if(!qe.circular&&qe.target.column-qe.source.column>1){var we=qe.source.column+1,Le=qe.target.column-1,Ke=1,Te=Le-we+1;for(Ke=1;we<=Le;we++,Ke++)Oe.nodes.forEach(function(Ve){if(Ve.column==we){var $e=Ke/(Te+1),ot=Math.pow(1-$e,3),tt=3*$e*Math.pow(1-$e,2),nt=3*Math.pow($e,2)*(1-$e),We=Math.pow($e,3),mt=ot*qe.y0+tt*qe.y0+nt*qe.y1+We*qe.y1,bt=mt-qe.width/2,Yt=mt+qe.width/2,jt;bt>Ve.y0&&btVe.y0&&YtVe.y1&&le(mr,jt,ze,ct)})):btVe.y1&&(jt=Yt-Ve.y0+10,Ve=le(Ve,jt,ze,ct),Oe.nodes.forEach(function(mr){A(mr,et)==A(Ve,et)||mr.column!=Ve.column||mr.y0Ve.y1&&le(mr,jt,ze,ct)}))}})}})}function ie(Oe,ze){return Oe.y0>ze.y0&&Oe.y0ze.y0&&Oe.y1ze.y1}function le(Oe,ze,ct,et){return Oe.y0+ze>=ct&&Oe.y1+ze<=et&&(Oe.y0=Oe.y0+ze,Oe.y1=Oe.y1+ze,Oe.targetLinks.forEach(function(qe){qe.y1=qe.y1+ze}),Oe.sourceLinks.forEach(function(qe){qe.y0=qe.y0+ze})),Oe}function me(Oe,ze,ct,et){Oe.nodes.forEach(function(qe){et&&qe.y+(qe.y1-qe.y0)>ze&&(qe.y=qe.y-(qe.y+(qe.y1-qe.y0)-ze));var we=Oe.links.filter(function(Te){return A(Te.source,ct)==A(qe,ct)}),Le=we.length;Le>1&&we.sort(function(Te,Ve){if(!Te.circular&&!Ve.circular){if(Te.target.column==Ve.target.column)return Te.y1-Ve.y1;if(De(Te,Ve)){if(Te.target.column>Ve.target.column){var $e=ae(Ve,Te);return Te.y1-$e}if(Ve.target.column>Te.target.column){var ot=ae(Te,Ve);return ot-Ve.y1}}else return Te.y1-Ve.y1}if(Te.circular&&!Ve.circular)return Te.circularLinkType=="top"?-1:1;if(Ve.circular&&!Te.circular)return Ve.circularLinkType=="top"?1:-1;if(Te.circular&&Ve.circular)return Te.circularLinkType===Ve.circularLinkType&&Te.circularLinkType=="top"?Te.target.column===Ve.target.column?Te.target.y1-Ve.target.y1:Ve.target.column-Te.target.column:Te.circularLinkType===Ve.circularLinkType&&Te.circularLinkType=="bottom"?Te.target.column===Ve.target.column?Ve.target.y1-Te.target.y1:Te.target.column-Ve.target.column:Te.circularLinkType=="top"?-1:1});var Ke=qe.y0;we.forEach(function(Te){Te.y0=Ke+Te.width/2,Ke=Ke+Te.width}),we.forEach(function(Te,Ve){if(Te.circularLinkType=="bottom"){var $e=Ve+1,ot=0;for($e;$e1&&qe.sort(function(Ke,Te){if(!Ke.circular&&!Te.circular){if(Ke.source.column==Te.source.column)return Ke.y0-Te.y0;if(De(Ke,Te)){if(Te.source.column0?"up":"down"}function ht(Oe,ze){return A(Oe.source,ze)==A(Oe.target,ze)}function it(Oe,ze,ct){var et=Oe.nodes,qe=Oe.links,we=!1,Le=!1;if(qe.forEach(function(tt){tt.circularLinkType=="top"?we=!0:tt.circularLinkType=="bottom"&&(Le=!0)}),we==!1||Le==!1){var Ke=t.min(et,function(tt){return tt.y0}),Te=t.max(et,function(tt){return tt.y1}),Ve=Te-Ke,$e=ct-ze,ot=$e/Ve;et.forEach(function(tt){var nt=(tt.y1-tt.y0)*ot;tt.y0=(tt.y0-Ke)*ot,tt.y1=tt.y0+nt}),qe.forEach(function(tt){tt.y0=(tt.y0-Ke)*ot,tt.y1=(tt.y1-Ke)*ot,tt.width=tt.width*ot})}}e.sankeyCircular=E,e.sankeyCenter=u,e.sankeyLeft=o,e.sankeyRight=s,e.sankeyJustify=l,Object.defineProperty(e,"__esModule",{value:!0})}))});var kK=fe((cMr,DXe)=>{"use strict";DXe.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"}}});var YXe=fe((fMr,WXe)=>{"use strict";var RXe=xXe(),$rr=($2(),Gs(Z2)).interpolateNumber,I5=xi(),tS=SXe(),Krr=FXe(),ws=kK(),D1=ni(),Jrr=ea(),R1=Xt(),y_=R1.strTranslate,IXe=R1.strRotate,PK=L1(),rS=PK.keyFun,AD=PK.repeat,UXe=PK.unwrap,zXe=as(),Qrr=bi(),VXe=nc(),enr=VXe.CAP_SHIFT,tnr=VXe.LINE_SPACING,rnr=3;function nnr(e,t,r){var n=UXe(t),a=n.trace,i=a.domain,o=a.orientation==="h",s=a.direction==="reversed",l=a.node.pad,u=a.node.thickness,c={justify:tS.sankeyJustify,left:tS.sankeyLeft,right:tS.sankeyRight,center:tS.sankeyCenter}[a.node.align],f=e.width*(i.x[1]-i.x[0]),v=e.height*(i.y[1]-i.y[0]),g=n._nodes,p=n._links,x=n.circular,_;x?_=Krr.sankeyCircular().circularLinkGap(0):_=tS.sankey(),_.iterations(ws.sankeyIterations).size(o?[f,v]:[v,f]).nodeWidth(u).nodePadding(l).nodeId(function(V){return V.pointNumber}).nodeAlign(c).nodes(g).links(p);function y(V){a[V].sort==="input"&&(x?R1.warn(`Circular Sankey diagrams do not support the "input" ${V}.sort mode; falling back to the default sort.`):_[`${V}Sort`](null))}y("link"),y("node");var C=_();_.nodePadding()=J||(U=J-q.y0,U>1e-6&&(q.y0+=U,q.y1+=U)),J=q.y1+l})}function I(V){var j=V.map(function(xe,ue){return{x0:xe.x0,index:ue}}).sort(function(xe,ue){return xe.x0-ue.x0}),q=[],U=-1,J,ee=-1/0,ce;for(k=0;kee+u&&(U+=1,J=ye.x0),ee=ye.x0,q[U]||(q[U]=[]),q[U].push(ye),ce=J-ye.x0,ye.x0+=ce,ye.x1+=ce}return q}if(a.node.x.length&&a.node.y.length){for(k=0;k0?" L "+a.targetX+" "+a.targetY:"")+"Z"):(r="M "+(a.targetX-t)+" "+(a.targetY-n)+" L "+(a.rightInnerExtent-t)+" "+(a.targetY-n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightSmallArcRadius+n)+" 0 0 0 "+(a.rightFullExtent-n-t)+" "+(a.targetY+a.rightSmallArcRadius)+" L "+(a.rightFullExtent-n-t)+" "+a.verticalRightInnerExtent,i&&o?r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-n-t)+" "+(a.verticalFullExtent+n)+" L "+(a.rightFullExtent+n-t-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent+n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent:i?r+=" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightFullExtent-t-n-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" L "+(a.leftFullExtent+n+(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent:r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightInnerExtent-t)+" "+(a.verticalFullExtent+n)+" L "+a.leftInnerExtent+" "+(a.verticalFullExtent+n)+" A "+(a.leftLargeArcRadius+n)+" "+(a.leftLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+a.verticalLeftInnerExtent,r+=" L "+(a.leftFullExtent+n)+" "+(a.sourceY+a.leftSmallArcRadius)+" A "+(a.leftLargeArcRadius+n)+" "+(a.leftSmallArcRadius+n)+" 0 0 0 "+a.leftInnerExtent+" "+(a.sourceY-n)+" L "+a.sourceX+" "+(a.sourceY-n)+" L "+a.sourceX+" "+(a.sourceY+n)+" L "+a.leftInnerExtent+" "+(a.sourceY+n)+" A "+(a.leftLargeArcRadius-n)+" "+(a.leftSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n)+" "+(a.sourceY+a.leftSmallArcRadius)+" L "+(a.leftFullExtent-n)+" "+a.verticalLeftInnerExtent,i&&o?r+=" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.leftFullExtent-n-(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" L "+(a.rightFullExtent+n-t+(a.rightLargeArcRadius-n))+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent:i?r+=" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.leftFullExtent+n)+" "+(a.verticalFullExtent+n)+" L "+(a.rightFullExtent-t-n)+" "+(a.verticalFullExtent+n)+" A "+(a.rightLargeArcRadius+n)+" "+(a.rightLargeArcRadius+n)+" 0 0 0 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent:r+=" A "+(a.leftLargeArcRadius-n)+" "+(a.leftLargeArcRadius-n)+" 0 0 1 "+a.leftInnerExtent+" "+(a.verticalFullExtent-n)+" L "+(a.rightInnerExtent-t)+" "+(a.verticalFullExtent-n)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightLargeArcRadius-n)+" 0 0 1 "+(a.rightFullExtent+n-t)+" "+a.verticalRightInnerExtent,r+=" L "+(a.rightFullExtent+n-t)+" "+(a.targetY+a.rightSmallArcRadius)+" A "+(a.rightLargeArcRadius-n)+" "+(a.rightSmallArcRadius-n)+" 0 0 1 "+(a.rightInnerExtent-t)+" "+(a.targetY+n)+" L "+(a.targetX-t)+" "+(a.targetY+n)+(t>0?" L "+a.targetX+" "+a.targetY:"")+"Z"),r}function FK(){var e=.5;function t(r){var n=r.linkArrowLength;if(r.link.circular)return anr(r.link,n);var a=Math.abs((r.link.target.x0-r.link.source.x1)/2);n>a&&(n=a);var i=r.link.source.x1,o=r.link.target.x0-n,s=$rr(i,o),l=s(e),u=s(1-e),c=r.link.y0-r.link.width/2,f=r.link.y0+r.link.width/2,v=r.link.y1-r.link.width/2,g=r.link.y1+r.link.width/2,p="M"+i+","+c,x="C"+l+","+c+" "+u+","+v+" "+o+","+v,_="C"+u+","+g+" "+l+","+f+" "+i+","+f,y=n>0?"L"+(o+n)+","+(v+r.link.width/2):"";return y+="L"+o+","+g,p+x+y+_+"Z"}return t}function onr(e,t){var r=ws.nodePadAcross,n=e.nodePad/2;t.dx=t.x1-t.x0,t.dy=t.y1-t.y0;var a=t.dx,i=Math.max(.5,t.dy),o="node_"+t.pointNumber;return t.group&&(o=R1.randstr()),t.trace=e.trace,t.curveNumber=e.trace.index,{index:t.pointNumber,key:o,partOfGroup:t.partOfGroup||!1,group:t.group,traceId:e.key,trace:e.trace,node:t,nodePad:e.nodePad,nodeLineColor:e.nodeLineColor,nodeLineWidth:e.nodeLineWidth,textFont:e.textFont,size:e.horizontal?e.height:e.width,visibleWidth:Math.ceil(a),visibleHeight:i,zoneX:-r,zoneY:-n,zoneWidth:a+2*r,zoneHeight:i+2*n,labelY:e.horizontal?t.dy/2+1:t.dx/2+1,left:t.originalLayer===1,sizeAcross:e.width,forceLayouts:e.forceLayouts,horizontal:e.horizontal,reversed:e.reversed,rgb:D1.rgb(t.color),alpha:D1.parse(t.color).alpha,valueFormat:e.valueFormat,valueSuffix:e.valueSuffix,sankey:e.sankey,graph:e.graph,arrangement:e.arrangement,uniqueNodeLabelPathId:[e.guid,e.key,o].join("_"),interactionState:e.interactionState,figure:e}}function LK(e){e.attr("transform",function(t){return y_(t.node.x0.toFixed(3),t.node.y0.toFixed(3))})}function snr(e){e.call(LK)}function GXe(e,t){e.call(snr),t.attr("d",FK())}function qXe(e){e.attr("width",function(t){return t.node.x1-t.node.x0}).attr("height",function(t){return t.visibleHeight})}function CK(e){return e.link.width>1||e.linkLineWidth>0}function BXe(e){return e.horizontal?e.reversed?y_(e.translateX+e.width,e.translateY)+"matrix(-1 0 0 1 0 0)":y_(e.translateX,e.translateY)+"matrix(1 0 0 1 0 0)":e.reversed?y_(e.translateX,e.translateY+e.height)+"matrix(0 -1 1 0 0 0)":y_(e.translateX,e.translateY)+"matrix(0 1 1 0 0 0)"}function OXe(e,t,r){e.on(".basic",null).on("mouseover.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.hover(this,n,t),n.interactionState.hovered=[this,n])}).on("mousemove.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.follow(this,n),n.interactionState.hovered=[this,n])}).on("mouseout.basic",function(n){!n.interactionState.dragInProgress&&!n.partOfGroup&&(r.unhover(this,n,t),n.interactionState.hovered=!1)}).on("click.basic",function(n){n.interactionState.hovered&&(r.unhover(this,n,t),n.interactionState.hovered=!1),!n.interactionState.dragInProgress&&!n.partOfGroup&&r.select(this,n,t)})}function lnr(e,t,r,n){var a=I5.behavior.drag().origin(function(i){return{x:i.node.x0+i.visibleWidth/2,y:i.node.y0+i.visibleHeight/2}}).on("dragstart",function(i){if(i.arrangement!=="fixed"&&(R1.ensureSingle(n._fullLayout._infolayer,"g","dragcover",function(s){n._fullLayout._dragCover=s}),R1.raiseToTop(this),i.interactionState.dragInProgress=i.node,NXe(i.node),i.interactionState.hovered&&(r.nodeEvents.unhover.apply(0,i.interactionState.hovered),i.interactionState.hovered=!1),i.arrangement==="snap")){var o=i.traceId+"|"+i.key;i.forceLayouts[o]?i.forceLayouts[o].alpha(1):unr(e,o,i,n),cnr(e,t,i,o,n)}}).on("drag",function(i){if(i.arrangement!=="fixed"){var o=I5.event.x,s=I5.event.y;i.arrangement==="snap"?(i.node.x0=o-i.visibleWidth/2,i.node.x1=o+i.visibleWidth/2,i.node.y0=s-i.visibleHeight/2,i.node.y1=s+i.visibleHeight/2):(i.arrangement==="freeform"&&(i.node.x0=o-i.visibleWidth/2,i.node.x1=o+i.visibleWidth/2),s=Math.max(0,Math.min(i.size-i.visibleHeight/2,s)),i.node.y0=s-i.visibleHeight/2,i.node.y1=s+i.visibleHeight/2),NXe(i.node),i.arrangement!=="snap"&&(i.sankey.update(i.graph),GXe(e.filter(jXe(i)),t))}}).on("dragend",function(i){if(i.arrangement!=="fixed"){i.interactionState.dragInProgress=!1;for(var o=0;o0)window.requestAnimationFrame(i);else{var l=r.node.originalX;r.node.x0=l-r.visibleWidth/2,r.node.x1=l+r.visibleWidth/2,HXe(r,a)}})}function fnr(e,t,r,n){return function(){for(var i=0,o=0;o0&&n.forceLayouts[t].alpha(0)}}function HXe(e,t){for(var r=[],n=[],a=0;aCK(_)?D1.rgb(_.linkLineColor):_.rgb).style("stroke-opacity",_=>CK(_)?D1.opacity(_.linkLineColor):_.alpha).style("fill",_=>_.rgb).style("fill-opacity",_=>_.alpha).style("stroke-width",_=>CK(_)?_.linkLineWidth:1).attr("d",FK()),f.style("opacity",function(){return e._context.staticPlot||o||s?1:0}).transition().ease(ws.ease).duration(ws.duration).style("opacity",1),f.exit().transition().ease(ws.ease).duration(ws.duration).style("opacity",0).remove();var v=u.selectAll("."+ws.cn.sankeyNodeSet).data(AD,rS);v.enter().append("g").classed(ws.cn.sankeyNodeSet,!0),v.style("cursor",function(_){switch(_.arrangement){case"fixed":return"default";case"perpendicular":return"ns-resize";default:return"move"}});var g=v.selectAll("."+ws.cn.sankeyNode).data(function(_){var y=_.graph.nodes;return hnr(y),y.map(onr.bind(null,_))},rS);g.enter().append("g").classed(ws.cn.sankeyNode,!0).call(LK).style("opacity",function(_){return(e._context.staticPlot||o)&&!_.partOfGroup?1:0}),g.call(OXe,u,a.nodeEvents).call(lnr,f,a,e),g.transition().ease(ws.ease).duration(ws.duration).call(LK).style("opacity",function(_){return _.partOfGroup?0:1}),g.exit().transition().ease(ws.ease).duration(ws.duration).style("opacity",0).remove();var p=g.selectAll("."+ws.cn.nodeRect).data(AD);p.enter().append("rect").classed(ws.cn.nodeRect,!0).call(qXe),p.style("stroke-width",function(_){return _.nodeLineWidth}).style("stroke",function(_){return D1.rgb(_.nodeLineColor)}).style("stroke-opacity",function(_){return D1.opacity(_.nodeLineColor)}).style("fill",_=>_.rgb).style("fill-opacity",_=>_.alpha),p.transition().ease(ws.ease).duration(ws.duration).call(qXe);var x=g.selectAll("."+ws.cn.nodeLabel).data(AD);x.enter().append("text").classed(ws.cn.nodeLabel,!0).style("cursor","default"),x.attr("data-notex",1).text(function(_){return _.node.label}).each(function(_){var y=I5.select(this);Jrr.font(y,_.textFont),zXe.convertToTspans(y,e)}).attr("text-anchor",function(_){return _.horizontal&&_.left!==_.reversed?"end":"start"}).attr("transform",function(_){var y=I5.select(this),C=zXe.lineCount(y),k=_.textFont.size*((C-1)*tnr-enr),S=_.nodeLineWidth/2+rnr;if(!_.horizontal){var A=_.reversed?(_.visibleWidth+k)/2:(_.visibleWidth-k)/2,L=_.reversed?IXe(90):"scale(-1,1)"+IXe(90);return y_(A,S)+L}var w=S,A=(_.visibleHeight-k)/2;return _.left?w=-w:w+=_.visibleWidth,y_(w,A)+(_.reversed?"scale(-1,1)":"")}),x.transition().ease(ws.ease).duration(ws.duration)}});var IK=fe((hMr,rZe)=>{"use strict";var fd=xi(),RK=Xt(),MD=RK.numberFormat,pnr=YXe(),z5=kl(),gnr=ni(),Ny=kK().cn,nS=RK._;function XXe(e){return e!==""}function q5(e,t){return e.filter(function(r){return r.key===t.traceId})}function ZXe(e,t){fd.select(e).select("path").style("fill-opacity",t),fd.select(e).select("rect").style("fill-opacity",t)}function $Xe(e){fd.select(e).select("text.name").style("fill","black")}function KXe(e){return function(t){return e.node.sourceLinks.indexOf(t.link)!==-1||e.node.targetLinks.indexOf(t.link)!==-1}}function JXe(e){return function(t){return t.node.sourceLinks.indexOf(e.link)!==-1||t.node.targetLinks.indexOf(e.link)!==-1}}function QXe(e,t,r){t&&r&&q5(r,t).selectAll("."+Ny.sankeyLink).filter(KXe(t)).call(eZe.bind(0,t,r,!1))}function DK(e,t,r){t&&r&&q5(r,t).selectAll("."+Ny.sankeyLink).filter(KXe(t)).call(tZe.bind(0,t,r,!1))}function eZe(e,t,r,n){n.style("fill",function(a){if(!a.link.concentrationscale)return a.hoverRgb}).style("fill-opacity",function(a){if(!a.link.concentrationscale)return a.hoverAlpha}),n.each(function(a){var i=a.link.label;i!==""&&q5(t,e).selectAll("."+Ny.sankeyLink).filter(function(o){return o.link.label===i}).style("fill",function(o){if(!o.link.concentrationscale)return o.hoverRgb}).style("fill-opacity",function(o){if(!o.link.concentrationscale)return o.hoverAlpha})}),r&&q5(t,e).selectAll("."+Ny.sankeyNode).filter(JXe(e)).call(QXe)}function tZe(e,t,r,n){n.style("fill",function(a){return a.rgb}).style("fill-opacity",function(a){return a.alpha}),n.each(function(a){var i=a.link.label;i!==""&&q5(t,e).selectAll("."+Ny.sankeyLink).filter(function(o){return o.link.label===i}).style("fill",o=>o.rgb).style("fill-opacity",o=>o.alpha)}),r&&q5(t,e).selectAll(Ny.sankeyNode).filter(JXe(e)).call(DK)}function Vl(e,t){var r=e.hoverlabel||{},n=RK.nestedProperty(r,t).get();return Array.isArray(n)?!1:n}rZe.exports=function(t,r){for(var n=t._fullLayout,a=n._paper,i=n._size,o=0;o"),color:Vl(A,"bgcolor")||gnr.addOpacity(I.color,1),borderColor:Vl(A,"bordercolor"),fontFamily:Vl(A,"font.family"),fontSize:Vl(A,"font.size"),fontColor:Vl(A,"font.color"),fontWeight:Vl(A,"font.weight"),fontStyle:Vl(A,"font.style"),fontVariant:Vl(A,"font.variant"),fontTextcase:Vl(A,"font.textcase"),fontLineposition:Vl(A,"font.lineposition"),fontShadow:Vl(A,"font.shadow"),nameLength:Vl(A,"namelength"),textAlign:Vl(A,"align"),idealAlign:fd.event.x"),color:Vl(A,"bgcolor")||w.rgb,borderColor:Vl(A,"bordercolor"),fontFamily:Vl(A,"font.family"),fontSize:Vl(A,"font.size"),fontColor:Vl(A,"font.color"),fontWeight:Vl(A,"font.weight"),fontStyle:Vl(A,"font.style"),fontVariant:Vl(A,"font.variant"),fontTextcase:Vl(A,"font.textcase"),fontLineposition:Vl(A,"font.lineposition"),fontShadow:Vl(A,"font.shadow"),nameLength:Vl(A,"namelength"),textAlign:Vl(A,"align"),idealAlign:"left",hovertemplate:A.hovertemplate,hovertemplateLabels:B,eventData:[w.node]},{container:n._hoverlayer.node(),outerContainer:n._paper.node(),gd:t});ZXe(j,.85),$Xe(j)}}},S=function(L,w,A){t._fullLayout.hovermode!==!1&&(fd.select(L).call(DK,w,A),w.node.trace.node.hoverinfo!=="skip"&&(w.node.fullData=w.node.trace,t.emit("plotly_unhover",{event:fd.event,points:[w.node]})),z5.loneUnhover(n._hoverlayer.node()))};pnr(t,a,r,{width:i.w,height:i.h,margin:{t:i.t,r:i.r,b:i.b,l:i.l}},{linkEvents:{hover:u,follow:x,unhover:_,select:l},nodeEvents:{hover:C,follow:k,unhover:S,select:y}})}});var nZe=fe(x_=>{"use strict";var mnr=rl().overrideAll,ynr=jf().getModuleCalcData,xnr=IK(),_nr=tm(),bnr=np(),wnr=ed(),Tnr=Ac().prepSelect,zK=Xt(),Anr=bi(),SD="sankey";x_.name=SD;x_.baseLayoutAttrOverrides=mnr({hoverlabel:_nr.hoverlabel},"plot","nested");x_.plot=function(e){var t=ynr(e.calcdata,SD)[0];xnr(e,t),x_.updateFx(e)};x_.clean=function(e,t,r,n){var a=n._has&&n._has(SD),i=t._has&&t._has(SD);a&&!i&&(n._paperdiv.selectAll(".sankey").remove(),n._paperdiv.selectAll(".bgsankey").remove())};x_.updateFx=function(e){for(var t=0;t{"use strict";iZe.exports=function(t,r){for(var n=t.cd,a=[],i=n[0].trace,o=i._sankey,s=o.graph.nodes,l=i.orientation==="v",u=i.direction==="reversed",c=0;c{"use strict";oZe.exports={attributes:AK(),supplyDefaults:aXe(),calc:cXe(),plot:IK(),moduleType:"trace",name:"sankey",basePlotModule:nZe(),selectPoints:aZe(),categories:["noOpacity"],meta:{}}});var uZe=fe((gMr,lZe)=>{"use strict";lZe.exports=sZe()});var fZe=fe(B5=>{"use strict";var cZe=Hs();B5.name="indicator";B5.plot=function(e,t,r,n){cZe.plotBasePlot(B5.name,e,t,r,n)};B5.clean=function(e,t,r,n){cZe.cleanBasePlot(B5.name,e,t,r,n)}});var BK=fe((yMr,mZe)=>{"use strict";var Uy=ta().extendFlat,dZe=ta().extendDeep,Snr=rl().overrideAll,vZe=Ds(),pZe=tc(),Enr=nl().attributes,au=pf(),knr=Mo().templatedArray,ED=tw(),hZe=pl().descriptionOnlyNumbers,qK=vZe({editType:"plot",colorEditType:"plot"}),iS={color:{valType:"color",editType:"plot"},line:{color:{valType:"color",dflt:pZe.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"},gZe={valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],editType:"plot"},Cnr=knr("step",dZe({},iS,{range:gZe}));mZe.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:Enr({name:"indicator",trace:!0,editType:"calc"}),title:{text:{valType:"string",editType:"plot"},align:{valType:"enumerated",values:["left","center","right"],editType:"plot"},font:Uy({},qK,{}),editType:"plot"},number:{valueformat:{valType:"string",dflt:"",editType:"plot",description:hZe("value")},font:Uy({},qK,{}),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:hZe("value")},increasing:{symbol:{valType:"string",dflt:ED.INCREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:ED.INCREASING.COLOR,editType:"plot"},editType:"plot"},decreasing:{symbol:{valType:"string",dflt:ED.DECREASING.SYMBOL,editType:"plot"},color:{valType:"color",dflt:ED.DECREASING.COLOR,editType:"plot"},editType:"plot"},font:Uy({},qK,{}),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:dZe({},iS,{color:{dflt:"green"}}),bgcolor:{valType:"color",editType:"plot"},bordercolor:{valType:"color",dflt:pZe.defaultLine,editType:"plot"},borderwidth:{valType:"number",min:0,dflt:1,editType:"plot"},axis:Snr({range:gZe,visible:Uy({},au.visible,{dflt:!0}),tickmode:au.minor.tickmode,nticks:au.nticks,tick0:au.tick0,dtick:au.dtick,tickvals:au.tickvals,ticktext:au.ticktext,ticks:Uy({},au.ticks,{dflt:"outside"}),ticklen:au.ticklen,tickwidth:au.tickwidth,tickcolor:au.tickcolor,ticklabelstep:au.ticklabelstep,showticklabels:au.showticklabels,labelalias:au.labelalias,tickfont:vZe({}),tickangle:au.tickangle,tickformat:au.tickformat,tickformatstops:au.tickformatstops,tickprefix:au.tickprefix,showtickprefix:au.showtickprefix,ticksuffix:au.ticksuffix,showticksuffix:au.showticksuffix,separatethousands:au.separatethousands,exponentformat:au.exponentformat,minexponent:au.minexponent,showexponent:au.showexponent,editType:"plot"},"plot"),steps:Cnr,threshold:{line:{color:Uy({},iS.line.color,{}),width:Uy({},iS.line.width,{dflt:1}),editType:"plot"},thickness:Uy({},iS.thickness,{dflt:.85}),value:{valType:"number",editType:"calc",dflt:!1},editType:"plot"},editType:"plot"}}});var OK=fe((xMr,yZe)=>{"use strict";yZe.exports={defaultNumberFontSize:80,bulletNumberDomainSize:.25,bulletPadding:.025,innerRadius:.75,valueThickness:.5,titlePadding:5,horizontalPadding:10}});var bZe=fe((_Mr,_Ze)=>{"use strict";var I1=Xt(),CD=BK(),Lnr=nl().defaults,xZe=Mo(),Pnr=Ah(),kD=OK(),Fnr=Fx(),Dnr=Ub(),Rnr=gm(),Inr=mm();function znr(e,t,r,n){function a(w,A){return I1.coerce(e,t,CD,w,A)}Lnr(t,n,a),a("mode"),t._hasNumber=t.mode.indexOf("number")!==-1,t._hasDelta=t.mode.indexOf("delta")!==-1,t._hasGauge=t.mode.indexOf("gauge")!==-1;var i=a("value");t._range=[0,typeof i=="number"?1.5*i:1];var o=new Array(2),s;if(t._hasNumber){a("number.valueformat");var l=I1.extendFlat({},n.font);l.size=void 0,I1.coerceFont(a,"number.font",l),t.number.font.size===void 0&&(t.number.font.size=kD.defaultNumberFontSize,o[0]=!0),a("number.prefix"),a("number.suffix"),s=t.number.font.size}var u;if(t._hasDelta){var c=I1.extendFlat({},n.font);c.size=void 0,I1.coerceFont(a,"delta.font",c),t.delta.font.size===void 0&&(t.delta.font.size=(t._hasNumber?.5:1)*(s||kD.defaultNumberFontSize),o[1]=!0),a("delta.reference",t.value),a("delta.relative"),a("delta.valueformat",t.delta.relative?"2%":""),a("delta.increasing.symbol"),a("delta.increasing.color"),a("delta.decreasing.symbol"),a("delta.decreasing.color"),a("delta.position"),a("delta.prefix"),a("delta.suffix"),u=t.delta.font.size}t._scaleNumbers=(!t._hasNumber||o[0])&&(!t._hasDelta||o[1])||!1;var f=I1.extendFlat({},n.font);f.size=.25*(s||u||kD.defaultNumberFontSize),I1.coerceFont(a,"title.font",f),a("title.text");var v,g,p,x;function _(w,A){return I1.coerce(v,g,CD.gauge,w,A)}function y(w,A){return I1.coerce(p,x,CD.gauge.axis,w,A)}if(t._hasGauge){v=e.gauge,v||(v={}),g=xZe.newContainer(t,"gauge"),_("shape");var C=t._isBullet=t.gauge.shape==="bullet";C||a("title.align","center");var k=t._isAngular=t.gauge.shape==="angular";k||a("align","center"),_("bgcolor",n.paper_bgcolor),_("borderwidth"),_("bordercolor"),_("bar.color"),_("bar.line.color"),_("bar.line.width");var S=kD.valueThickness*(t.gauge.shape==="bullet"?.5:1);_("bar.thickness",S),Pnr(v,g,{name:"steps",handleItemDefaults:qnr}),_("threshold.value"),_("threshold.thickness"),_("threshold.line.width"),_("threshold.line.color"),p={},v&&(p=v.axis||{}),x=xZe.newContainer(g,"axis"),y("visible"),t._range=y("range",t._range);var L={font:n.font,noAutotickangles:!0,outerTicks:!0,noTicklabelshift:!0,noTicklabelstandoff:!0};Fnr(p,x,y,"linear"),Inr(p,x,y,"linear",L),Rnr(p,x,y,"linear",L),Dnr(p,x,y,L)}else a("title.align","center"),a("align","center"),t._isAngular=t._isBullet=!1;t._length=null}function qnr(e,t){function r(n,a){return I1.coerce(e,t,CD.gauge.steps,n,a)}r("color"),r("line.color"),r("line.width"),r("range"),r("thickness")}_Ze.exports={supplyDefaults:znr}});var TZe=fe((bMr,wZe)=>{"use strict";function Bnr(e,t){var r=[],n=t.value;typeof t._lastValue!="number"&&(t._lastValue=t.value);var a=t._lastValue,i=a;return t._hasDelta&&typeof t.delta.reference=="number"&&(i=t.delta.reference),r[0]={y:n,lastY:a,delta:n-i,relativeDelta:(n-i)/i},r}wZe.exports={calc:Bnr}});var CZe=fe((wMr,kZe)=>{"use strict";var A_=xi(),Onr=($2(),Gs(Z2)).interpolate,AZe=($2(),Gs(Z2)).interpolateNumber,Vy=Xt(),Nnr=Vy.strScale,oS=Vy.strTranslate,Unr=Vy.rad2deg,Vnr=nc().MID_SHIFT,T_=ea(),__=OK(),PD=as(),ih=Yi(),Gnr=vA(),Hnr=gC(),jnr=pf(),O5=ni(),NK={left:"start",center:"middle",right:"end"},b_={left:0,center:.5,right:1},MZe=/[yzafpnµmkMGTPEZY]/;function sS(e){return e&&e.duration>0}kZe.exports=function(t,r,n,a){var i=t._fullLayout,o;sS(n)&&a&&(o=a()),Vy.makeTraceGroups(i._indicatorlayer,r,"trace").each(function(s){var l=s[0],u=l.trace,c=A_.select(this),f=u._hasGauge,v=u._isAngular,g=u._isBullet,p=u.domain,x={w:i._size.w*(p.x[1]-p.x[0]),h:i._size.h*(p.y[1]-p.y[0]),l:i._size.l+i._size.w*p.x[0],r:i._size.r+i._size.w*(1-p.x[1]),t:i._size.t+i._size.h*(1-p.y[1]),b:i._size.b+i._size.h*p.y[0]},_=x.l+x.w/2,y=x.t+x.h/2,C=Math.min(x.w/2,x.h),k=__.innerRadius*C,S,L,w,A=u.align||"center";if(L=y,!f)S=x.l+b_[A]*x.w,w=function(j){return SZe(j,x.w,x.h)};else if(v&&(S=_,L=y+C/2,w=function(j){return $nr(j,.9*k)}),g){var T=__.bulletPadding,m=1-__.bulletNumberDomainSize+T;S=x.l+(m+(1-m)*b_[A])*x.w,w=function(j){return SZe(j,(__.bulletNumberDomainSize-T)*x.w,x.h)}}Xnr(t,c,s,{numbersX:S,numbersY:L,numbersScaler:w,transitionOpts:n,onComplete:o});var F,E;f&&(F={range:u.gauge.axis.range,color:u.gauge.bgcolor,line:{color:u.gauge.bordercolor,width:0},thickness:1},E={range:u.gauge.axis.range,color:"rgba(0, 0, 0, 0)",line:{color:u.gauge.bordercolor,width:u.gauge.borderwidth},thickness:1});var I=c.selectAll("g.angular").data(v?s:[]);I.exit().remove();var R=c.selectAll("g.angularaxis").data(v?s:[]);R.exit().remove(),v&&Ynr(t,c,s,{radius:C,innerRadius:k,gauge:I,layer:R,size:x,gaugeBg:F,gaugeOutline:E,transitionOpts:n,onComplete:o});var B=c.selectAll("g.bullet").data(g?s:[]);B.exit().remove();var O=c.selectAll("g.bulletaxis").data(g?s:[]);O.exit().remove(),g&&Wnr(t,c,s,{gauge:B,layer:O,size:x,gaugeBg:F,gaugeOutline:E,transitionOpts:n,onComplete:o});var V=c.selectAll("text.title").data(s);V.exit().remove(),V.enter().append("text").classed("title",!0),V.attr("text-anchor",function(){return g?NK.right:NK[u.title.align]}).text(u.title.text).call(T_.font,u.title.font).call(PD.convertToTspans,t),V.attr("transform",function(){var j=x.l+x.w*b_[u.title.align],q,U=__.titlePadding,J=T_.bBox(V.node());if(f){if(v)if(u.gauge.axis.visible){var ee=T_.bBox(R.node());q=ee.top-U-J.bottom}else q=x.t+x.h/2-C/2-J.bottom-U;g&&(q=L-(J.top+J.bottom)/2,j=x.l-__.bulletPadding*x.w)}else q=u._numbersTop-U-J.bottom;return oS(j,q)})})};function Wnr(e,t,r,n){var a=r[0].trace,i=n.gauge,o=n.layer,s=n.gaugeBg,l=n.gaugeOutline,u=n.size,c=a.domain,f=n.transitionOpts,v=n.onComplete,g,p,x,_,y;i.enter().append("g").classed("bullet",!0),i.attr("transform",oS(u.l,u.t)),o.enter().append("g").classed("bulletaxis",!0).classed("crisp",!0),o.selectAll("g.xbulletaxistick,path,text").remove();var C=u.h,k=a.gauge.bar.thickness*C,S=c.x[0],L=c.x[0]+(c.x[1]-c.x[0])*(a._hasNumber||a._hasDelta?1-__.bulletNumberDomainSize:1);g=aS(e,a.gauge.axis),g._id="xbulletaxis",g.domain=[S,L],g.setScale(),p=ih.calcTicks(g),x=ih.makeTransTickFn(g),_=ih.getTickSigns(g)[2],y=u.t+u.h,g.visible&&(ih.drawTicks(e,g,{vals:g.ticks==="inside"?ih.clipEnds(g,p):p,layer:o,path:ih.makeTickPath(g,y,_),transFn:x}),ih.drawLabels(e,g,{vals:p,layer:o,transFn:x,labelFns:ih.makeLabelFns(g,y)}));function w(R){R.attr("width",function(B){return Math.max(0,g.c2p(B.range[1])-g.c2p(B.range[0]))}).attr("x",function(B){return g.c2p(B.range[0])}).attr("y",function(B){return .5*(1-B.thickness)*C}).attr("height",function(B){return B.thickness*C})}var A=[s].concat(a.gauge.steps),T=i.selectAll("g.bg-bullet").data(A);T.enter().append("g").classed("bg-bullet",!0).append("rect"),T.select("rect").call(w).call(w_),T.exit().remove();var m=i.selectAll("g.value-bullet").data([a.gauge.bar]);m.enter().append("g").classed("value-bullet",!0).append("rect"),m.select("rect").attr("height",k).attr("y",(C-k)/2).call(w_),sS(f)?m.select("rect").transition().duration(f.duration).ease(f.easing).each("end",function(){v&&v()}).each("interrupt",function(){v&&v()}).attr("width",Math.max(0,g.c2p(Math.min(a.gauge.axis.range[1],r[0].y)))):m.select("rect").attr("width",typeof r[0].y=="number"?Math.max(0,g.c2p(Math.min(a.gauge.axis.range[1],r[0].y))):0),m.exit().remove();var F=r.filter(function(){return a.gauge.threshold.value||a.gauge.threshold.value===0}),E=i.selectAll("g.threshold-bullet").data(F);E.enter().append("g").classed("threshold-bullet",!0).append("line"),E.select("line").attr("x1",g.c2p(a.gauge.threshold.value)).attr("x2",g.c2p(a.gauge.threshold.value)).attr("y1",(1-a.gauge.threshold.thickness)/2*C).attr("y2",(1-(1-a.gauge.threshold.thickness)/2)*C).call(O5.stroke,a.gauge.threshold.line.color).style("stroke-width",a.gauge.threshold.line.width),E.exit().remove();var I=i.selectAll("g.gauge-outline").data([l]);I.enter().append("g").classed("gauge-outline",!0).append("rect"),I.select("rect").call(w).call(w_),I.exit().remove()}function Ynr(e,t,r,n){var a=r[0].trace,i=n.size,o=n.radius,s=n.innerRadius,l=n.gaugeBg,u=n.gaugeOutline,c=[i.l+i.w/2,i.t+i.h/2+o/2],f=n.gauge,v=n.layer,g=n.transitionOpts,p=n.onComplete,x=Math.PI/2;function _(ce){var ye=a.gauge.axis.range[0],xe=a.gauge.axis.range[1],ue=(ce-ye)/(xe-ye)*Math.PI-x;return ue<-x?-x:ue>x?x:ue}function y(ce){return A_.svg.arc().innerRadius((s+o)/2-ce/2*(o-s)).outerRadius((s+o)/2+ce/2*(o-s)).startAngle(-x)}function C(ce){ce.attr("d",function(ye){return y(ye.thickness).startAngle(_(ye.range[0])).endAngle(_(ye.range[1]))()})}var k,S,L,w;f.enter().append("g").classed("angular",!0),f.attr("transform",oS(c[0],c[1])),v.enter().append("g").classed("angularaxis",!0).classed("crisp",!0),v.selectAll("g.xangularaxistick,path,text").remove(),k=aS(e,a.gauge.axis),k.type="linear",k.range=a.gauge.axis.range,k._id="xangularaxis",k.ticklabeloverflow="allow",k.setScale();var A=function(ce){return(k.range[0]-ce.x)/(k.range[1]-k.range[0])*Math.PI+Math.PI},T={},m=ih.makeLabelFns(k,0),F=m.labelStandoff;T.xFn=function(ce){var ye=A(ce);return Math.cos(ye)*F},T.yFn=function(ce){var ye=A(ce),xe=Math.sin(ye)>0?.2:1;return-Math.sin(ye)*(F+ce.fontSize*xe)+Math.abs(Math.cos(ye))*(ce.fontSize*Vnr)},T.anchorFn=function(ce){var ye=A(ce),xe=Math.cos(ye);return Math.abs(xe)<.1?"middle":xe>0?"start":"end"},T.heightFn=function(ce,ye,xe){var ue=A(ce);return-.5*(1+Math.sin(ue))*xe};var E=function(ce){return oS(c[0]+o*Math.cos(ce),c[1]-o*Math.sin(ce))};L=function(ce){return E(A(ce))};var I=function(ce){var ye=A(ce);return E(ye)+"rotate("+-Unr(ye)+")"};if(S=ih.calcTicks(k),w=ih.getTickSigns(k)[2],k.visible){w=k.ticks==="inside"?-1:1;var R=(k.linewidth||1)/2;ih.drawTicks(e,k,{vals:S,layer:v,path:"M"+w*R+",0h"+w*k.ticklen,transFn:I}),ih.drawLabels(e,k,{vals:S,layer:v,transFn:L,labelFns:T})}var B=[l].concat(a.gauge.steps),O=f.selectAll("g.bg-arc").data(B);O.enter().append("g").classed("bg-arc",!0).append("path"),O.select("path").call(C).call(w_),O.exit().remove();var V=y(a.gauge.bar.thickness),j=f.selectAll("g.value-arc").data([a.gauge.bar]);j.enter().append("g").classed("value-arc",!0).append("path");var q=j.select("path");sS(g)?(q.transition().duration(g.duration).ease(g.easing).each("end",function(){p&&p()}).each("interrupt",function(){p&&p()}).attrTween("d",Znr(V,_(r[0].lastY),_(r[0].y))),a._lastValue=r[0].y):q.attr("d",typeof r[0].y=="number"?V.endAngle(_(r[0].y)):"M0,0Z"),q.call(w_),j.exit().remove(),B=[];var U=a.gauge.threshold.value;(U||U===0)&&B.push({range:[U,U],color:a.gauge.threshold.color,line:{color:a.gauge.threshold.line.color,width:a.gauge.threshold.line.width},thickness:a.gauge.threshold.thickness});var J=f.selectAll("g.threshold-arc").data(B);J.enter().append("g").classed("threshold-arc",!0).append("path"),J.select("path").call(C).call(w_),J.exit().remove();var ee=f.selectAll("g.gauge-outline").data([u]);ee.enter().append("g").classed("gauge-outline",!0).append("path"),ee.select("path").call(C).call(w_),ee.exit().remove()}function Xnr(e,t,r,n){var a=r[0].trace,i=n.numbersX,o=n.numbersY,s=a.align||"center",l=NK[s],u=n.transitionOpts,c=n.onComplete,f=Vy.ensureSingle(t,"g","numbers"),v,g,p,x=[];a._hasNumber&&x.push("number"),a._hasDelta&&(x.push("delta"),a.delta.position==="left"&&x.reverse());var _=f.selectAll("text").data(x);_.enter().append("text"),_.attr("text-anchor",function(){return l}).attr("class",function(E){return E}).attr("x",null).attr("y",null).attr("dx",null).attr("dy",null),_.exit().remove();function y(E,I,R,B){if(E.match("s")&&R>=0!=B>=0&&!I(R).slice(-1).match(MZe)&&!I(B).slice(-1).match(MZe)){var O=E.slice().replace("s","f").replace(/\d+/,function(j){return parseInt(j)-1}),V=aS(e,{tickformat:O});return function(j){return Math.abs(j)<1?ih.tickText(V,j).text:I(j)}}else return I}function C(){var E=aS(e,{tickformat:a.number.valueformat},a._range);E.setScale(),ih.prepTicks(E);var I=function(j){return ih.tickText(E,j).text},R=a.number.suffix,B=a.number.prefix,O=f.select("text.number");function V(){var j=typeof r[0].y=="number"?B+I(r[0].y)+R:"-";O.text(j).call(T_.font,a.number.font).call(PD.convertToTspans,e)}return sS(u)?O.transition().duration(u.duration).ease(u.easing).each("end",function(){V(),c&&c()}).each("interrupt",function(){V(),c&&c()}).attrTween("text",function(){var j=A_.select(this),q=AZe(r[0].lastY,r[0].y);a._lastValue=r[0].y;var U=y(a.number.valueformat,I,r[0].lastY,r[0].y);return function(J){j.text(B+U(q(J))+R)}}):V(),v=EZe(B+I(r[0].y)+R,a.number.font,l,e),O}function k(){var E=aS(e,{tickformat:a.delta.valueformat},a._range);E.setScale(),ih.prepTicks(E);var I=function(J){return ih.tickText(E,J).text},R=a.delta.suffix,B=a.delta.prefix,O=function(J){var ee=a.delta.relative?J.relativeDelta:J.delta;return ee},V=function(J,ee){return J===0||typeof J!="number"||isNaN(J)?"-":(J>0?a.delta.increasing.symbol:a.delta.decreasing.symbol)+B+ee(J)+R},j=function(J){return J.delta>=0?a.delta.increasing.color:a.delta.decreasing.color};a._deltaLastValue===void 0&&(a._deltaLastValue=O(r[0]));var q=f.select("text.delta");q.call(T_.font,a.delta.font).call(O5.fill,j({delta:a._deltaLastValue}));function U(){q.text(V(O(r[0]),I)).call(O5.fill,j(r[0])).call(PD.convertToTspans,e)}return sS(u)?q.transition().duration(u.duration).ease(u.easing).tween("text",function(){var J=A_.select(this),ee=O(r[0]),ce=a._deltaLastValue,ye=y(a.delta.valueformat,I,ce,ee),xe=AZe(ce,ee);return a._deltaLastValue=ee,function(ue){J.text(V(xe(ue),ye)),J.call(O5.fill,j({delta:xe(ue)}))}}).each("end",function(){U(),c&&c()}).each("interrupt",function(){U(),c&&c()}):U(),g=EZe(V(O(r[0]),I),a.delta.font,l,e),q}var S=a.mode+a.align,L;if(a._hasDelta&&(L=k(),S+=a.delta.position+a.delta.font.size+a.delta.font.family+a.delta.valueformat,S+=a.delta.increasing.symbol+a.delta.decreasing.symbol,p=g),a._hasNumber&&(C(),S+=a.number.font.size+a.number.font.family+a.number.valueformat+a.number.suffix+a.number.prefix,p=v),a._hasDelta&&a._hasNumber){var w=[(v.left+v.right)/2,(v.top+v.bottom)/2],A=[(g.left+g.right)/2,(g.top+g.bottom)/2],T,m,F=.75*a.delta.font.size;a.delta.position==="left"&&(T=LD(a,"deltaPos",0,-1*(v.width*b_[a.align]+g.width*(1-b_[a.align])+F),S,Math.min),m=w[1]-A[1],p={width:v.width+g.width+F,height:Math.max(v.height,g.height),left:g.left+T,right:v.right,top:Math.min(v.top,g.top+m),bottom:Math.max(v.bottom,g.bottom+m)}),a.delta.position==="right"&&(T=LD(a,"deltaPos",0,v.width*(1-b_[a.align])+g.width*b_[a.align]+F,S,Math.max),m=w[1]-A[1],p={width:v.width+g.width+F,height:Math.max(v.height,g.height),left:v.left,right:g.right+T,top:Math.min(v.top,g.top+m),bottom:Math.max(v.bottom,g.bottom+m)}),a.delta.position==="bottom"&&(T=null,m=g.height,p={width:Math.max(v.width,g.width),height:v.height+g.height,left:Math.min(v.left,g.left),right:Math.max(v.right,g.right),top:v.bottom-v.height,bottom:v.bottom+g.height}),a.delta.position==="top"&&(T=null,m=v.top,p={width:Math.max(v.width,g.width),height:v.height+g.height,left:Math.min(v.left,g.left),right:Math.max(v.right,g.right),top:v.bottom-v.height-g.height,bottom:v.bottom}),L.attr({dx:T,dy:m})}(a._hasNumber||a._hasDelta)&&f.attr("transform",function(){var E=n.numbersScaler(p);S+=E[2];var I=LD(a,"numbersScale",1,E[0],S,Math.min),R;a._scaleNumbers||(I=1),a._isAngular?R=o-I*p.bottom:R=o-I*(p.top+p.bottom)/2,a._numbersTop=I*p.top+R;var B=p[s];s==="center"&&(B=(p.left+p.right)/2);var O=i-I*B;return O=LD(a,"numbersTranslate",0,O,S,Math.max),oS(O,R)+Nnr(I)})}function w_(e){e.each(function(t){O5.stroke(A_.select(this),t.line.color)}).each(function(t){O5.fill(A_.select(this),t.color)}).style("stroke-width",function(t){return t.line.width})}function Znr(e,t,r){return function(){var n=Onr(t,r);return function(a){return e.endAngle(n(a))()}}}function aS(e,t,r){var n=e._fullLayout,a=Vy.extendFlat({type:"linear",ticks:"outside",range:r,showline:!0},t),i={type:"linear",_id:"x"+t._id},o={letter:"x",font:n.font,noAutotickangles:!0,noHover:!0,noTickson:!0};function s(l,u){return Vy.coerce(a,i,jnr,l,u)}return Gnr(a,i,s,o,n),Hnr(a,i,s,o),i}function SZe(e,t,r){var n=Math.min(t/e.width,r/e.height);return[n,e,t+"x"+r]}function $nr(e,t){var r=Math.sqrt(e.width/2*(e.width/2)+e.height*e.height),n=t/r;return[n,e,t]}function EZe(e,t,r,n){var a=document.createElementNS("http://www.w3.org/2000/svg","text"),i=A_.select(a);return i.text(e).attr("x",0).attr("y",0).attr("text-anchor",r).attr("data-unformatted",e).call(PD.convertToTspans,n).call(T_.font,t),T_.bBox(i.node())}function LD(e,t,r,n,a,i){var o="_cache"+t;e[o]&&e[o].key===a||(e[o]={key:a,value:r});var s=Vy.aggNums(i,null,[e[o].value,n],2);return e[o].value=s,s}});var PZe=fe((TMr,LZe)=>{"use strict";LZe.exports={moduleType:"trace",name:"indicator",basePlotModule:fZe(),categories:["svg","noOpacity","noHover"],animatable:!0,attributes:BK(),supplyDefaults:bZe().supplyDefaults,calc:TZe().calc,plot:CZe(),meta:{}}});var DZe=fe((AMr,FZe)=>{"use strict";FZe.exports=PZe()});var UK=fe((SMr,qZe)=>{"use strict";var RZe=Fm(),FD=ta().extendFlat,Knr=rl().overrideAll,IZe=Ds(),Jnr=nl().attributes,zZe=pl().descriptionOnlyNumbers,MMr=qZe.exports=Knr({domain:Jnr({name:"table",trace:!0}),columnwidth:{valType:"number",arrayOk:!0,dflt:null},columnorder:{valType:"data_array"},header:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:zZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:28},align:FD({},RZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:FD({},IZe({arrayOk:!0}))},cells:{values:{valType:"data_array",dflt:[]},format:{valType:"data_array",dflt:[],description:zZe("cell value")},prefix:{valType:"string",arrayOk:!0,dflt:null},suffix:{valType:"string",arrayOk:!0,dflt:null},height:{valType:"number",dflt:20},align:FD({},RZe.align,{arrayOk:!0}),line:{width:{valType:"number",arrayOk:!0,dflt:1},color:{valType:"color",arrayOk:!0,dflt:"grey"}},fill:{color:{valType:"color",arrayOk:!0,dflt:"white"}},font:FD({},IZe({arrayOk:!0}))}},"calc","from-root")});var OZe=fe((EMr,BZe)=>{"use strict";var VK=Xt(),Qnr=UK(),eir=nl().defaults;function tir(e,t){for(var r=e.columnorder||[],n=e.header.values.length,a=r.slice(0,n),i=a.slice().sort(function(l,u){return l-u}),o=a.map(function(l){return i.indexOf(l)}),s=o.length;s{"use strict";var rir=L1().wrap;NZe.exports=function(){return rir({})}});var GK=fe((CMr,VZe)=>{"use strict";VZe.exports={cellPad:8,columnExtentOffset:10,columnTitleOffset:28,emptyHeaderHeight:16,latexCheck:/^\$.*\$$/,goldenRatio:1.618,lineBreaker:"
",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"}}});var KZe=fe((LMr,$Ze)=>{"use strict";var GZe=GK(),jK=ta().extendFlat,nir=aa(),iir=Gf().isTypedArray,DD=Gf().isArrayOrTypedArray;$Ze.exports=function(t,r){var n=HK(r.cells.values),a=function(m){return m.slice(r.header.values.length,m.length)},i=HK(r.header.values);i.length&&!i[0].length&&(i[0]=[""],i=HK(i));var o=i.concat(a(n).map(function(){return ZZe((i[0]||[""]).length)})),s=r.domain,l=Math.floor(t._fullLayout._size.w*(s.x[1]-s.x[0])),u=Math.floor(t._fullLayout._size.h*(s.y[1]-s.y[0])),c=r.header.values.length?o[0].map(function(){return r.header.height}):[GZe.emptyHeaderHeight],f=n.length?n[0].map(function(){return r.cells.height}):[],v=c.reduce(HZe,0),g=u-v,p=g+GZe.uplift,x=YZe(f,p),_=YZe(c,v),y=WZe(_,[]),C=WZe(x,y),k={},S=r.columnorder;DD(S)&&(S=Array.from(S)),S=S.concat(a(n.map(function(m,F){return F})));var L=o.map(function(m,F){var E=DD(r.columnwidth)?r.columnwidth[Math.min(F,r.columnwidth.length-1)]:r.columnwidth;return nir(E)?Number(E):1}),w=L.reduce(HZe,0);L=L.map(function(m){return m/w*l});var A=Math.max(WK(r.header.line.width),WK(r.cells.line.width)),T={key:r.uid+t._context.staticPlot,translateX:s.x[0]*t._fullLayout._size.w,translateY:t._fullLayout._size.h*(1-s.y[1]),size:t._fullLayout._size,width:l,maxLineWidth:A,height:u,columnOrder:S,groupHeight:u,rowBlocks:C,headerRowBlocks:y,scrollY:0,cells:jK({},r.cells,{values:n}),headerCells:jK({},r.header,{values:o}),gdColumns:o.map(function(m){return m[0]}),gdColumnsOriginalOrder:o.map(function(m){return m[0]}),prevPages:[0,0],scrollbarState:{scrollbarScrollInProgress:!1},columns:o.map(function(m,F){var E=k[m];k[m]=(E||0)+1;var I=m+"__"+k[m];return{key:I,label:m,specIndex:F,xIndex:S[F],xScale:jZe,x:void 0,calcdata:void 0,columnWidth:L[F]}})};return T.columns.forEach(function(m){m.calcdata=T,m.x=jZe(m)}),T};function WK(e){if(DD(e)){for(var t=0,r=0;r=t||u===e.length-1)&&(r[a]=o,o.key=l++,o.firstRowIndex=s,o.lastRowIndex=u,o=XZe(),a+=i,s=u+1,i=0);return r}function XZe(){return{firstRowIndex:null,lastRowIndex:null,rows:[]}}});var JZe=fe(YK=>{"use strict";var RD=ta().extendFlat;YK.splitToPanels=function(e){var t=[0,0],r=RD({},e,{key:"header",type:"header",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!0,values:e.calcdata.headerCells.values[e.specIndex],rowBlocks:e.calcdata.headerRowBlocks,calcdata:RD({},e.calcdata,{cells:e.calcdata.headerCells})}),n=RD({},e,{key:"cells1",type:"cells",page:0,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks}),a=RD({},e,{key:"cells2",type:"cells",page:1,prevPages:t,currentRepaint:[null,null],dragHandle:!1,values:e.calcdata.cells.values[e.specIndex],rowBlocks:e.calcdata.rowBlocks});return[n,a,r]};YK.splitToCells=function(e){var t=air(e);return(e.values||[]).slice(t[0],t[1]).map(function(r,n){var a=typeof r=="string"&&r.match(/[<$&> ]/)?"_keybuster_"+Math.random():"";return{keyWithinBlock:n+a,key:t[0]+n,column:e,calcdata:e.calcdata,page:e.page,rowBlocks:e.rowBlocks,value:r}})};function air(e){var t=e.rowBlocks[e.page],r=t?t.rows[0].rowIndex:0,n=t?r+t.rows.length:0;return[r,n]}});var nJ=fe((FMr,u$e)=>{"use strict";var Ei=GK(),_l=xi(),XK=Xt(),oir=XK.numberFormat,Ts=L1(),ZK=ea(),sir=as(),lir=Xt().raiseToTop,Bv=Xt().strTranslate,uir=Xt().cancelTransition,cir=KZe(),a$e=JZe(),QZe=ni();u$e.exports=function(t,r){var n=!t._context.staticPlot,a=t._fullLayout._paper.selectAll("."+Ei.cn.table).data(r.map(function(C){var k=Ts.unwrap(C),S=k.trace;return cir(t,S)}),Ts.keyFun);a.exit().remove(),a.enter().append("g").classed(Ei.cn.table,!0).attr("overflow","visible").style("box-sizing","content-box").style("position","absolute").style("left",0).style("overflow","visible").style("shape-rendering","crispEdges").style("pointer-events","all"),a.attr("width",function(C){return C.width+C.size.l+C.size.r}).attr("height",function(C){return C.height+C.size.t+C.size.b}).attr("transform",function(C){return Bv(C.translateX,C.translateY)});var i=a.selectAll("."+Ei.cn.tableControlView).data(Ts.repeat,Ts.keyFun),o=i.enter().append("g").classed(Ei.cn.tableControlView,!0).style("box-sizing","content-box");if(n){var s="onwheel"in document?"wheel":"mousewheel";o.on("mousemove",function(C){i.filter(function(k){return C===k}).call(lS,t)}).on(s,function(C){if(!C.scrollbarState.wheeling){C.scrollbarState.wheeling=!0;var k=C.scrollY+_l.event.deltaY,S=zD(t,i,null,k)(C);S||(_l.event.stopPropagation(),_l.event.preventDefault()),C.scrollbarState.wheeling=!1}}).call(lS,t,!0)}i.attr("transform",function(C){return Bv(C.size.l,C.size.t)});var l=i.selectAll("."+Ei.cn.scrollBackground).data(Ts.repeat,Ts.keyFun);l.enter().append("rect").classed(Ei.cn.scrollBackground,!0).attr("fill","none"),l.attr("width",function(C){return C.width}).attr("height",function(C){return C.height}),i.each(function(C){ZK.setClipUrl(_l.select(this),e$e(t,C),t)});var u=i.selectAll("."+Ei.cn.yColumn).data(function(C){return C.columns},Ts.keyFun);u.enter().append("g").classed(Ei.cn.yColumn,!0),u.exit().remove(),u.attr("transform",function(C){return Bv(C.x,0)}),n&&u.call(_l.behavior.drag().origin(function(C){var k=_l.select(this);return n$e(k,C,-Ei.uplift),lir(this),C.calcdata.columnDragInProgress=!0,lS(i.filter(function(S){return C.calcdata.key===S.key}),t),C}).on("drag",function(C){var k=_l.select(this),S=function(A){return(C===A?_l.event.x:A.x)+A.columnWidth/2};C.x=Math.max(-Ei.overdrag,Math.min(C.calcdata.width+Ei.overdrag-C.columnWidth,_l.event.x));var L=o$e(u).filter(function(A){return A.calcdata.key===C.calcdata.key}),w=L.sort(function(A,T){return S(A)-S(T)});w.forEach(function(A,T){A.xIndex=T,A.x=C===A?A.x:A.xScale(A)}),u.filter(function(A){return C!==A}).transition().ease(Ei.transitionEase).duration(Ei.transitionDuration).attr("transform",function(A){return Bv(A.x,0)}),k.call(uir).attr("transform",Bv(C.x,-Ei.uplift))}).on("dragend",function(C){var k=_l.select(this),S=C.calcdata;C.x=C.xScale(C),C.calcdata.columnDragInProgress=!1,n$e(k,C,0),_ir(t,S,S.columns.map(function(L){return L.xIndex}))})),u.each(function(C){ZK.setClipUrl(_l.select(this),t$e(t,C),t)});var c=u.selectAll("."+Ei.cn.columnBlock).data(a$e.splitToPanels,Ts.keyFun);c.enter().append("g").classed(Ei.cn.columnBlock,!0).attr("id",function(C){return C.key}),c.style("cursor",function(C){return C.dragHandle?"ew-resize":C.calcdata.scrollbarState.barWiggleRoom?"ns-resize":"default"});var f=c.filter(bir),v=c.filter(eJ);n&&v.call(_l.behavior.drag().origin(function(C){return _l.event.stopPropagation(),C}).on("drag",zD(t,i,-1)).on("dragend",function(){})),$K(t,i,f,c),$K(t,i,v,c);var g=i.selectAll("."+Ei.cn.scrollAreaClip).data(Ts.repeat,Ts.keyFun);g.enter().append("clipPath").classed(Ei.cn.scrollAreaClip,!0).attr("id",function(C){return e$e(t,C)});var p=g.selectAll("."+Ei.cn.scrollAreaClipRect).data(Ts.repeat,Ts.keyFun);p.enter().append("rect").classed(Ei.cn.scrollAreaClipRect,!0).attr("x",-Ei.overdrag).attr("y",-Ei.uplift).attr("fill","none"),p.attr("width",function(C){return C.width+2*Ei.overdrag}).attr("height",function(C){return C.height+Ei.uplift});var x=u.selectAll("."+Ei.cn.columnBoundary).data(Ts.repeat,Ts.keyFun);x.enter().append("g").classed(Ei.cn.columnBoundary,!0);var _=u.selectAll("."+Ei.cn.columnBoundaryClippath).data(Ts.repeat,Ts.keyFun);_.enter().append("clipPath").classed(Ei.cn.columnBoundaryClippath,!0),_.attr("id",function(C){return t$e(t,C)});var y=_.selectAll("."+Ei.cn.columnBoundaryRect).data(Ts.repeat,Ts.keyFun);y.enter().append("rect").classed(Ei.cn.columnBoundaryRect,!0).attr("fill","none"),y.attr("width",function(C){return C.columnWidth+2*ID(C)}).attr("height",function(C){return C.calcdata.height+2*ID(C)+Ei.uplift}).attr("x",function(C){return-ID(C)}).attr("y",function(C){return-ID(C)}),tJ(null,v,i)};function ID(e){return Math.ceil(e.calcdata.maxLineWidth/2)}function e$e(e,t){return"clip"+e._fullLayout._uid+"_scrollAreaBottomClip_"+t.key}function t$e(e,t){return"clip"+e._fullLayout._uid+"_columnBoundaryClippath_"+t.calcdata.key+"_"+t.specIndex}function o$e(e){return[].concat.apply([],e.map(function(t){return t})).map(function(t){return t.__data__})}function lS(e,t,r){function n(u){var c=u.rowBlocks;return JK(c,c.length-1)+(c.length?qD(c[c.length-1],1/0):1)}var a=e.selectAll("."+Ei.cn.scrollbarKit).data(Ts.repeat,Ts.keyFun);a.enter().append("g").classed(Ei.cn.scrollbarKit,!0).style("shape-rendering","geometricPrecision"),a.each(function(u){var c=u.scrollbarState;c.totalHeight=n(u),c.scrollableAreaHeight=u.groupHeight-KK(u),c.currentlyVisibleHeight=Math.min(c.totalHeight,c.scrollableAreaHeight),c.ratio=c.currentlyVisibleHeight/c.totalHeight,c.barLength=Math.max(c.ratio*c.currentlyVisibleHeight,Ei.goldenRatio*Ei.scrollbarWidth),c.barWiggleRoom=c.currentlyVisibleHeight-c.barLength,c.wiggleRoom=Math.max(0,c.totalHeight-c.scrollableAreaHeight),c.topY=c.barWiggleRoom===0?0:u.scrollY/c.wiggleRoom*c.barWiggleRoom,c.bottomY=c.topY+c.barLength,c.dragMultiplier=c.wiggleRoom/c.barWiggleRoom}).attr("transform",function(u){var c=u.width+Ei.scrollbarWidth/2+Ei.scrollbarOffset;return Bv(c,KK(u))});var i=a.selectAll("."+Ei.cn.scrollbar).data(Ts.repeat,Ts.keyFun);i.enter().append("g").classed(Ei.cn.scrollbar,!0);var o=i.selectAll("."+Ei.cn.scrollbarSlider).data(Ts.repeat,Ts.keyFun);o.enter().append("g").classed(Ei.cn.scrollbarSlider,!0),o.attr("transform",function(u){return Bv(0,u.scrollbarState.topY||0)});var s=o.selectAll("."+Ei.cn.scrollbarGlyph).data(Ts.repeat,Ts.keyFun);s.enter().append("line").classed(Ei.cn.scrollbarGlyph,!0).attr("stroke","black").attr("stroke-width",Ei.scrollbarWidth).attr("stroke-linecap","round").attr("y1",Ei.scrollbarWidth/2),s.attr("y2",function(u){return u.scrollbarState.barLength-Ei.scrollbarWidth/2}).attr("stroke-opacity",function(u){return u.columnDragInProgress||!u.scrollbarState.barWiggleRoom||r?0:.4}),s.transition().delay(0).duration(0),s.transition().delay(Ei.scrollbarHideDelay).duration(Ei.scrollbarHideDuration).attr("stroke-opacity",0);var l=i.selectAll("."+Ei.cn.scrollbarCaptureZone).data(Ts.repeat,Ts.keyFun);l.enter().append("line").classed(Ei.cn.scrollbarCaptureZone,!0).attr("stroke","white").attr("stroke-opacity",.01).attr("stroke-width",Ei.scrollbarCaptureWidth).attr("stroke-linecap","butt").attr("y1",0).on("mousedown",function(u){var c=_l.event.y,f=this.getBoundingClientRect(),v=u.scrollbarState,g=c-f.top,p=_l.scale.linear().domain([0,v.scrollableAreaHeight]).range([0,v.totalHeight]).clamp(!0);v.topY<=g&&g<=v.bottomY||zD(t,e,null,p(g-v.barLength/2))(u)}).call(_l.behavior.drag().origin(function(u){return _l.event.stopPropagation(),u.scrollbarState.scrollbarScrollInProgress=!0,u}).on("drag",zD(t,e)).on("dragend",function(){})),l.attr("y2",function(u){return u.scrollbarState.scrollableAreaHeight}),t._context.staticPlot&&(s.remove(),l.remove())}function $K(e,t,r,n){var a=fir(r),i=hir(a);gir(i);var o=dir(i);yir(o);var s=pir(i),l=vir(s);mir(l),s$e(l,t,n,e),rJ(i)}function fir(e){var t=e.selectAll("."+Ei.cn.columnCells).data(Ts.repeat,Ts.keyFun);return t.enter().append("g").classed(Ei.cn.columnCells,!0),t.exit().remove(),t}function hir(e){var t=e.selectAll("."+Ei.cn.columnCell).data(a$e.splitToCells,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ei.cn.columnCell,!0),t.exit().remove(),t}function dir(e){var t=e.selectAll("."+Ei.cn.cellRect).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("rect").classed(Ei.cn.cellRect,!0),t}function vir(e){var t=e.selectAll("."+Ei.cn.cellText).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("text").classed(Ei.cn.cellText,!0).style("cursor",function(){return"auto"}).on("mousedown",function(){_l.event.stopPropagation()}),t}function pir(e){var t=e.selectAll("."+Ei.cn.cellTextHolder).data(Ts.repeat,function(r){return r.keyWithinBlock});return t.enter().append("g").classed(Ei.cn.cellTextHolder,!0).style("shape-rendering","geometricPrecision"),t}function gir(e){e.each(function(t,r){var n=t.calcdata.cells.font,a=t.column.specIndex,i={size:hd(n.size,a,r),color:hd(n.color,a,r),family:hd(n.family,a,r),weight:hd(n.weight,a,r),style:hd(n.style,a,r),variant:hd(n.variant,a,r),textcase:hd(n.textcase,a,r),lineposition:hd(n.lineposition,a,r),shadow:hd(n.shadow,a,r)};t.rowNumber=t.key,t.align=hd(t.calcdata.cells.align,a,r),t.cellBorderWidth=hd(t.calcdata.cells.line.width,a,r),t.font=i})}function mir(e){e.each(function(t){ZK.font(_l.select(this),t.font)})}function yir(e){e.attr("width",function(t){return t.column.columnWidth}).attr("stroke-width",function(t){return t.cellBorderWidth}).each(function(t){var r=_l.select(this);QZe.stroke(r,hd(t.calcdata.cells.line.color,t.column.specIndex,t.rowNumber)),QZe.fill(r,hd(t.calcdata.cells.fill.color,t.column.specIndex,t.rowNumber))})}function s$e(e,t,r,n){e.text(function(a){var i=a.column.specIndex,o=a.rowNumber,s=a.value,l=typeof s=="string",u=l&&s.match(/
/i),c=!l||u;a.mayHaveMarkup=l&&s.match(/[<&>]/);var f=xir(s);a.latex=f;var v=f?"":hd(a.calcdata.cells.prefix,i,o)||"",g=f?"":hd(a.calcdata.cells.suffix,i,o)||"",p=f?null:hd(a.calcdata.cells.format,i,o)||null,x=v+(p?oir(p)(a.value):a.value)+g,_;a.wrappingNeeded=!a.wrapped&&!c&&!f&&(_=r$e(x)),a.cellHeightMayIncrease=u||f||a.mayHaveMarkup||(_===void 0?r$e(x):_),a.needsConvertToTspans=a.mayHaveMarkup||a.wrappingNeeded||a.latex;var y;if(a.wrappingNeeded){var C=Ei.wrapSplitCharacter===" "?x.replace(/a&&n.push(i),a+=l}return n}function tJ(e,t,r){var n=o$e(t)[0];if(n!==void 0){var a=n.rowBlocks,i=n.calcdata,o=JK(a,a.length),s=n.calcdata.groupHeight-KK(n),l=i.scrollY=Math.max(0,Math.min(o-s,i.scrollY)),u=wir(a,l,s);u.length===1&&(u[0]===a.length-1?u.unshift(u[0]-1):u.push(u[0]+1)),u[0]%2&&u.reverse(),t.each(function(c,f){c.page=u[f],c.scrollY=l}),t.attr("transform",function(c){var f=JK(c.rowBlocks,c.page)-c.scrollY;return Bv(0,f)}),e&&(i$e(e,r,t,u,n.prevPages,n,0),i$e(e,r,t,u,n.prevPages,n,1),lS(r,e))}}function zD(e,t,r,n){return function(i){var o=i.calcdata?i.calcdata:i,s=t.filter(function(f){return o.key===f.key}),l=r||o.scrollbarState.dragMultiplier,u=o.scrollY;o.scrollY=n===void 0?o.scrollY+l*_l.event.dy:n;var c=s.selectAll("."+Ei.cn.yColumn).selectAll("."+Ei.cn.columnBlock).filter(eJ);return tJ(e,c,s),o.scrollY===u}}function i$e(e,t,r,n,a,i,o){var s=n[o]!==a[o];s&&(clearTimeout(i.currentRepaint[o]),i.currentRepaint[o]=setTimeout(function(){var l=r.filter(function(u,c){return c===o&&n[c]!==a[c]});$K(e,t,l,r),a[o]=n[o]}))}function Tir(e,t,r,n){return function(){var i=_l.select(t.parentNode);i.each(function(o){var s=o.fragments;i.selectAll("tspan.line").each(function(x,_){s[_].width=this.getComputedTextLength()});var l=s[s.length-1].width,u=s.slice(0,-1),c=[],f,v,g=0,p=o.column.columnWidth-2*Ei.cellPad;for(o.value="";u.length;)f=u.shift(),v=f.width+l,g+v>p&&(o.value+=c.join(Ei.wrapSpacer)+Ei.lineBreaker,c=[],g=0),c.push(f.text),g+=v;g&&(o.value+=c.join(Ei.wrapSpacer)),o.wrapped=!0}),i.selectAll("tspan.line").remove(),s$e(i.select("."+Ei.cn.cellText),r,e,n),_l.select(t.parentNode.parentNode).call(rJ)}}function Air(e,t,r,n,a){return function(){if(!a.settledY){var o=_l.select(t.parentNode),s=QK(a),l=a.key-s.firstRowIndex,u=s.rows[l].rowHeight,c=a.cellHeightMayIncrease?t.parentNode.getBoundingClientRect().height+2*Ei.cellPad:u,f=Math.max(c,u),v=f-s.rows[l].rowHeight;v&&(s.rows[l].rowHeight=f,e.selectAll("."+Ei.cn.columnCell).call(rJ),tJ(null,e.filter(eJ),0),lS(r,n,!0)),o.attr("transform",function(){var g=this,p=g.parentNode,x=p.getBoundingClientRect(),_=_l.select(g.parentNode).select("."+Ei.cn.cellRect).node().getBoundingClientRect(),y=g.transform.baseVal.consolidate(),C=_.top-x.top+(y?y.matrix.f:Ei.cellPad);return Bv(l$e(a,_l.select(g.parentNode).select("."+Ei.cn.cellTextHolder).node().getBoundingClientRect().width),C)}),a.settledY=!0}}}function l$e(e,t){switch(e.align){case"left":return Ei.cellPad;case"right":return e.column.columnWidth-(t||0)-Ei.cellPad;case"center":return(e.column.columnWidth-(t||0))/2;default:return Ei.cellPad}}function rJ(e){e.attr("transform",function(t){var r=t.rowBlocks[0].auxiliaryBlocks.reduce(function(o,s){return o+qD(s,1/0)},0),n=QK(t),a=qD(n,t.key),i=a+r;return Bv(0,i)}).selectAll("."+Ei.cn.cellRect).attr("height",function(t){return Sir(QK(t),t.key).rowHeight})}function JK(e,t){for(var r=0,n=t-1;n>=0;n--)r+=Mir(e[n]);return r}function qD(e,t){for(var r=0,n=0;n{"use strict";var Eir=jf().getModuleCalcData,kir=nJ(),BD="table";OD.name=BD;OD.plot=function(e){var t=Eir(e.calcdata,BD)[0];t.length&&kir(e,t)};OD.clean=function(e,t,r,n){var a=n._has&&n._has(BD),i=t._has&&t._has(BD);a&&!i&&n._paperdiv.selectAll(".table").remove()}});var h$e=fe((RMr,f$e)=>{"use strict";f$e.exports={attributes:UK(),supplyDefaults:OZe(),calc:UZe(),plot:nJ(),moduleType:"trace",name:"table",basePlotModule:c$e(),categories:["noOpacity"],meta:{}}});var v$e=fe((IMr,d$e)=>{"use strict";d$e.exports=h$e()});var x$e=fe((zMr,y$e)=>{"use strict";var p$e=Ds(),g$e=tc(),iJ=pf(),Cir=pl().descriptionWithDates,Lir=rl().overrideAll,m$e=Uc().dash,aJ=ta().extendFlat;y$e.exports={color:{valType:"color",editType:"calc"},smoothing:{valType:"number",dflt:1,min:0,max:1.3,editType:"calc"},title:{text:{valType:"string",dflt:"",editType:"calc"},font:p$e({editType:"calc"}),offset:{valType:"number",dflt:10,editType:"calc"},editType:"calc"},type:{valType:"enumerated",values:["-","linear","date","category"],dflt:"-",editType:"calc"},autotypenumbers:iJ.autotypenumbers,autorange:{valType:"enumerated",values:[!0,!1,"reversed"],dflt:!0,editType:"calc"},rangemode:{valType:"enumerated",values:["normal","tozero","nonnegative"],dflt:"normal",editType:"calc"},range:{valType:"info_array",editType:"calc",items:[{valType:"any",editType:"calc"},{valType:"any",editType:"calc"}]},fixedrange:{valType:"boolean",dflt:!1,editType:"calc"},cheatertype:{valType:"enumerated",values:["index","value"],dflt:"value",editType:"calc"},tickmode:{valType:"enumerated",values:["linear","array"],dflt:"array",editType:"calc"},nticks:{valType:"integer",min:0,dflt:0,editType:"calc"},tickvals:{valType:"data_array",editType:"calc"},ticktext:{valType:"data_array",editType:"calc"},showticklabels:{valType:"enumerated",values:["start","end","both","none"],dflt:"start",editType:"calc"},labelalias:aJ({},iJ.labelalias,{editType:"calc"}),tickfont:p$e({editType:"calc"}),tickangle:{valType:"angle",dflt:"auto",editType:"calc"},tickprefix:{valType:"string",dflt:"",editType:"calc"},showtickprefix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},ticksuffix:{valType:"string",dflt:"",editType:"calc"},showticksuffix:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},showexponent:{valType:"enumerated",values:["all","first","last","none"],dflt:"all",editType:"calc"},exponentformat:{valType:"enumerated",values:["none","e","E","power","SI","B","SI extended"],dflt:"B",editType:"calc"},minexponent:{valType:"number",dflt:3,min:0,editType:"calc"},separatethousands:{valType:"boolean",dflt:!1,editType:"calc"},tickformat:{valType:"string",dflt:"",editType:"calc",description:Cir("tick label")},tickformatstops:Lir(iJ.tickformatstops,"calc","from-root"),categoryorder:{valType:"enumerated",values:["trace","category ascending","category descending","array"],dflt:"trace",editType:"calc"},categoryarray:{valType:"data_array",editType:"calc"},labelpadding:{valType:"integer",dflt:10,editType:"calc"},labelprefix:{valType:"string",editType:"calc"},labelsuffix:{valType:"string",dflt:"",editType:"calc"},showline:{valType:"boolean",dflt:!1,editType:"calc"},linecolor:{valType:"color",dflt:g$e.defaultLine,editType:"calc"},linewidth:{valType:"number",min:0,dflt:1,editType:"calc"},gridcolor:{valType:"color",editType:"calc"},gridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},griddash:aJ({},m$e,{editType:"calc"}),showgrid:{valType:"boolean",dflt:!0,editType:"calc"},minorgridcount:{valType:"integer",min:0,dflt:0,editType:"calc"},minorgridwidth:{valType:"number",min:0,dflt:1,editType:"calc"},minorgriddash:aJ({},m$e,{editType:"calc"}),minorgridcolor:{valType:"color",dflt:g$e.lightLine,editType:"calc"},startline:{valType:"boolean",editType:"calc"},startlinecolor:{valType:"color",editType:"calc"},startlinewidth:{valType:"number",dflt:1,editType:"calc"},endline:{valType:"boolean",editType:"calc"},endlinewidth:{valType:"number",dflt:1,editType:"calc"},endlinecolor:{valType:"color",editType:"calc"},tick0:{valType:"number",min:0,dflt:0,editType:"calc"},dtick:{valType:"number",min:0,dflt:1,editType:"calc"},arraytick0:{valType:"integer",min:0,dflt:0,editType:"calc"},arraydtick:{valType:"integer",min:1,dflt:1,editType:"calc"},editType:"calc"}});var UD=fe((qMr,w$e)=>{"use strict";var Pir=Ds(),_$e=x$e(),b$e=tc(),ND=Pir({editType:"calc"}),Fir=Ol().zorder;ND.family.dflt='"Open Sans", verdana, arial, sans-serif';ND.size.dflt=12;ND.color.dflt=b$e.defaultLine;w$e.exports={carpet:{valType:"string",editType:"calc"},x:{valType:"data_array",editType:"calc+clearAxisTypes"},y:{valType:"data_array",editType:"calc+clearAxisTypes"},a:{valType:"data_array",editType:"calc"},a0:{valType:"number",dflt:0,editType:"calc"},da:{valType:"number",dflt:1,editType:"calc"},b:{valType:"data_array",editType:"calc"},b0:{valType:"number",dflt:0,editType:"calc"},db:{valType:"number",dflt:1,editType:"calc"},cheaterslope:{valType:"number",dflt:1,editType:"calc"},aaxis:_$e,baxis:_$e,font:ND,color:{valType:"color",dflt:b$e.defaultLine,editType:"plot"},zorder:Fir}});var M$e=fe((BMr,A$e)=>{"use strict";var T$e=Xt().isArray1D;A$e.exports=function(t,r,n){var a=n("x"),i=a&&a.length,o=n("y"),s=o&&o.length;if(!i&&!s)return!1;if(r._cheater=!a,(!i||T$e(a))&&(!s||T$e(o))){var l=i?a.length:1/0;s&&(l=Math.min(l,o.length)),r.a&&r.a.length&&(l=Math.min(l,r.a.length)),r.b&&r.b.length&&(l=Math.min(l,r.b.length)),r._length=l}else r._length=null;return!0}});var k$e=fe((OMr,E$e)=>{"use strict";var Dir=UD(),S$e=ni().addOpacity,Rir=bi(),uS=Xt(),Iir=Fx(),zir=gm(),qir=mm(),Bir=dC(),Oir=Hp(),Nir=Yb();E$e.exports=function(t,r,n){var a=n.letter,i=n.font||{},o=Dir[a+"axis"];function s(m,F){return uS.coerce(t,r,o,m,F)}function l(m,F){return uS.coerce2(t,r,o,m,F)}n.name&&(r._name=n.name,r._id=n.name),s("autotypenumbers",n.autotypenumbersDflt);var u=s("type");if(u==="-"&&(n.data&&Uir(r,n.data),r.type==="-"?r.type="linear":u=t.type=r.type),s("smoothing"),s("cheatertype"),s("showticklabels"),s("labelprefix",a+" = "),s("labelsuffix"),s("showtickprefix"),s("showticksuffix"),s("separatethousands"),s("tickformat"),s("exponentformat"),s("minexponent"),s("showexponent"),s("categoryorder"),s("tickmode"),s("tickvals"),s("ticktext"),s("tick0"),s("dtick"),r.tickmode==="array"&&(s("arraytick0"),s("arraydtick")),s("labelpadding"),r._hovertitle=a,u==="date"){var c=Rir.getComponentMethod("calendars","handleDefaults");c(t,r,"calendar",n.calendar)}Oir(r,n.fullLayout),r.c2p=uS.identity;var f=s("color",n.dfltColor),v=f===t.color?f:i.color,g=s("title.text");g&&(uS.coerceFont(s,"title.font",i,{overrideDflt:{size:uS.bigFont(i.size),color:v}}),s("title.offset")),s("tickangle");var p=s("autorange",!r.isValidRange(t.range));p&&s("rangemode"),s("range"),r.cleanRange(),s("fixedrange"),Iir(t,r,s,u),qir(t,r,s,u,n),zir(t,r,s,u,n),Bir(t,r,s,{data:n.data,dataAttr:a});var x=s("gridcolor",S$e(f,.3)),_=l("gridwidth"),y=l("griddash"),C=s("showgrid");C||(delete r.gridcolor,delete r.gridwidth,delete r.griddash);var k=l("startlinecolor",f),S=l("startlinewidth",_),L=s("startline",r.showgrid||!!k||!!S);L||(delete r.startlinecolor,delete r.startlinewidth);var w=l("endlinecolor",f),A=l("endlinewidth",_),T=s("endline",r.showgrid||!!w||!!A);return T||(delete r.endlinecolor,delete r.endlinewidth),C?(s("minorgridcount"),s("minorgridwidth",_),s("minorgriddash",y),s("minorgridcolor",S$e(x,.06)),r.minorgridcount||(delete r.minorgridwidth,delete r.minorgriddash,delete r.minorgridcolor)):(delete r.gridcolor,delete r.gridwidth,delete r.griddash),r.showticklabels==="none"&&(delete r.tickfont,delete r.tickangle,delete r.showexponent,delete r.exponentformat,delete r.minexponent,delete r.tickformat,delete r.showticksuffix,delete r.showtickprefix),r.showticksuffix||delete r.ticksuffix,r.showtickprefix||delete r.tickprefix,s("tickmode"),r};function Uir(e,t){if(e.type==="-"){var r=e._id,n=r.charAt(0),a=n+"calendar",i=e[a];e.type=Nir(t,i,{autotypenumbers:e.autotypenumbers})}}});var L$e=fe((NMr,C$e)=>{"use strict";var Vir=k$e(),Gir=Mo();C$e.exports=function(t,r,n,a,i){var o=a("a");o||(a("da"),a("a0"));var s=a("b");s||(a("db"),a("b0")),Hir(t,r,n,i)};function Hir(e,t,r,n){var a=["aaxis","baxis"];a.forEach(function(i){var o=i.charAt(0),s=e[i]||{},l=Gir.newContainer(t,i),u={noAutotickangles:!0,noTicklabelshift:!0,noTicklabelstandoff:!0,noTicklabelstep:!0,tickfont:"x",id:o+"axis",letter:o,font:t.font,name:i,data:e[o],calendar:t.calendar,dfltColor:n,bgColor:r.paper_bgcolor,autotypenumbersDflt:r.autotypenumbers,fullLayout:r};Vir(s,l,u),l._categories=l._categories||[],!e[i]&&s.type!=="-"&&(e[i]={type:s.type})})}});var D$e=fe((UMr,F$e)=>{"use strict";var P$e=Xt(),jir=M$e(),Wir=L$e(),Yir=UD(),Xir=tc();F$e.exports=function(t,r,n,a){function i(l,u){return P$e.coerce(t,r,Yir,l,u)}r._clipPathId="clip"+r.uid+"carpet";var o=i("color",Xir.defaultLine);if(P$e.coerceFont(i,"font",a.font),i("carpet"),Wir(t,r,a,i,o),!r.a||!r.b){r.visible=!1;return}r.a.length<3&&(r.aaxis.smoothing=0),r.b.length<3&&(r.baxis.smoothing=0);var s=jir(t,r,i);s||(r.visible=!1),r._cheater&&i("cheaterslope"),i("zorder")}});var oJ=fe((VMr,R$e)=>{"use strict";var Zir=Xt().isArrayOrTypedArray;R$e.exports=function(t,r,n){var a;for(Zir(t)?t.length>r.length&&(t=t.slice(0,r.length)):t=[],a=0;a{"use strict";I$e.exports=function(t,r,n){if(t.length===0)return"";var a,i=[],o=n?3:1;for(a=0;a{"use strict";z$e.exports=function(t,r,n,a,i,o){var s=i[0]*t.dpdx(r),l=i[1]*t.dpdy(n),u=1,c=1;if(o){var f=Math.sqrt(i[0]*i[0]+i[1]*i[1]),v=Math.sqrt(o[0]*o[0]+o[1]*o[1]),g=(i[0]*o[0]+i[1]*o[1])/f/v;c=Math.max(0,g)}var p=Math.atan2(l,s)*180/Math.PI;return p<-90?(p+=180,u=-u):p>90&&(p-=180,u=-u),{angle:p,flip:u,p:t.c2p(a,r,n),offsetMultplier:c}}});var j$e=fe((jMr,H$e)=>{"use strict";var jD=xi(),VD=ea(),GD=oJ(),N$e=sJ(),cS=q$e(),lJ=as(),v0=Xt(),U$e=v0.strRotate,HD=v0.strTranslate,V$e=nc();H$e.exports=function(t,r,n,a){var i=t._context.staticPlot,o=r.xaxis,s=r.yaxis,l=t._fullLayout,u=l._clips;v0.makeTraceGroups(a,n,"trace").each(function(c){var f=jD.select(this),v=c[0],g=v.trace,p=g.aaxis,x=g.baxis,_=v0.ensureSingle(f,"g","minorlayer"),y=v0.ensureSingle(f,"g","majorlayer"),C=v0.ensureSingle(f,"g","boundarylayer"),k=v0.ensureSingle(f,"g","labellayer");f.style("opacity",g.opacity),N5(o,s,y,p,"a",p._gridlines,!0,i),N5(o,s,y,x,"b",x._gridlines,!0,i),N5(o,s,_,p,"a",p._minorgridlines,!0,i),N5(o,s,_,x,"b",x._minorgridlines,!0,i),N5(o,s,C,p,"a-boundary",p._boundarylines,i),N5(o,s,C,x,"b-boundary",x._boundarylines,i);var S=B$e(t,o,s,g,v,k,p._labels,"a-label"),L=B$e(t,o,s,g,v,k,x._labels,"b-label");Kir(t,k,g,v,o,s,S,L),$ir(g,v,u,o,s)})};function $ir(e,t,r,n,a){var i,o,s,l,u=r.select("#"+e._clipPathId);u.size()||(u=r.append("clipPath").classed("carpetclip",!0));var c=v0.ensureSingle(u,"path","carpetboundary"),f=t.clipsegments,v=[];for(l=0;l0?"start":"end","data-notex":1}).call(VD.font,f.font).text(f.text).call(lJ.convertToTspans,e),y=VD.bBox(this);_.attr("transform",HD(g.p[0],g.p[1])+U$e(g.angle)+HD(f.axis.labelpadding*x,y.height*.3)),u=Math.max(u,y.width+f.axis.labelpadding)}),l.exit().remove(),c.maxExtent=u,c}function Kir(e,t,r,n,a,i,o,s){var l,u,c,f,v=v0.aggNums(Math.min,null,r.a),g=v0.aggNums(Math.max,null,r.a),p=v0.aggNums(Math.min,null,r.b),x=v0.aggNums(Math.max,null,r.b);l=.5*(v+g),u=p,c=r.ab2xy(l,u,!0),f=r.dxyda_rough(l,u),o.angle===void 0&&v0.extendFlat(o,cS(r,a,i,c,r.dxydb_rough(l,u))),O$e(e,t,r,n,c,f,r.aaxis,a,i,o,"a-title"),l=v,u=.5*(p+x),c=r.ab2xy(l,u,!0),f=r.dxydb_rough(l,u),s.angle===void 0&&v0.extendFlat(s,cS(r,a,i,c,r.dxyda_rough(l,u))),O$e(e,t,r,n,c,f,r.baxis,a,i,s,"b-title")}var G$e=V$e.LINE_SPACING,Jir=(1-V$e.MID_SHIFT)/G$e+1;function O$e(e,t,r,n,a,i,o,s,l,u,c){var f=[];o.title.text&&f.push(o.title.text);var v=t.selectAll("text."+c).data(f),g=u.maxExtent;v.enter().append("text").classed(c,!0),v.each(function(){var p=cS(r,s,l,a,i);["start","both"].indexOf(o.showticklabels)===-1&&(g=0);var x=o.title.font.size;g+=x+o.title.offset;var _=u.angle+(u.flip<0?180:0),y=(_-p.angle+450)%360,C=y>90&&y<270,k=jD.select(this);k.text(o.title.text).call(lJ.convertToTspans,e),C&&(g=(-lJ.lineCount(k)+Jir)*G$e*x-g),k.attr("transform",HD(p.p[0],p.p[1])+U$e(p.angle)+HD(0,g)).attr("text-anchor","middle").call(VD.font,o.title.font)}),v.exit().remove()}});var Y$e=fe((WMr,W$e)=>{"use strict";var WD=Xt().isArrayOrTypedArray;W$e.exports=function(e,t,r){var n,a,i,o,s,l,u=[],c=WD(e)?e.length:e,f=WD(t)?t.length:t,v=WD(e)?e:null,g=WD(t)?t:null;v&&(i=(v.length-1)/(v[v.length-1]-v[0])/(c-1)),g&&(o=(g.length-1)/(g[g.length-1]-g[0])/(f-1));var p,x=1/0,_=-1/0;for(a=0;a{"use strict";var X$e=Xt().isArrayOrTypedArray;$$e.exports=function(e){return Z$e(e,0)};function Z$e(e,t){if(!X$e(e)||t>=10)return null;for(var r=1/0,n=-1/0,a=e.length,i=0;i{"use strict";var Qir=Yi(),Gy=ta().extendFlat;J$e.exports=function(t,r,n){var a,i,o,s,l,u,c,f,v,g,p,x,_,y,C=t["_"+r],k=t[r+"axis"],S=k._gridlines=[],L=k._minorgridlines=[],w=k._boundarylines=[],A=t["_"+n],T=t[n+"axis"];k.tickmode==="array"&&(k.tickvals=C.slice());var m=t._xctrl,F=t._yctrl,E=m[0].length,I=m.length,R=t._a.length,B=t._b.length;Qir.prepTicks(k),k.tickmode==="array"&&delete k.tickvals;var O=k.smoothing?3:1;function V(q){var U,J,ee,ce,ye,xe,ue,K,_e,ne,ae,pe,ie=[],le=[],me={};if(r==="b")for(J=t.b2j(q),ee=Math.floor(Math.max(0,Math.min(B-2,J))),ce=J-ee,me.length=B,me.crossLength=R,me.xy=function(be){return t.evalxy([],be,J)},me.dxy=function(be,De){return t.dxydi([],be,ee,De,ce)},U=0;U0&&(_e=t.dxydi([],U-1,ee,0,ce),ie.push(ye[0]+_e[0]/3),le.push(ye[1]+_e[1]/3),ne=t.dxydi([],U-1,ee,1,ce),ie.push(K[0]-ne[0]/3),le.push(K[1]-ne[1]/3)),ie.push(K[0]),le.push(K[1]),ye=K;else for(U=t.a2i(q),xe=Math.floor(Math.max(0,Math.min(R-2,U))),ue=U-xe,me.length=R,me.crossLength=B,me.xy=function(be){return t.evalxy([],U,be)},me.dxy=function(be,De){return t.dxydj([],xe,be,ue,De)},J=0;J0&&(ae=t.dxydj([],xe,J-1,ue,0),ie.push(ye[0]+ae[0]/3),le.push(ye[1]+ae[1]/3),pe=t.dxydj([],xe,J-1,ue,1),ie.push(K[0]-pe[0]/3),le.push(K[1]-pe[1]/3)),ie.push(K[0]),le.push(K[1]),ye=K;return me.axisLetter=r,me.axis=k,me.crossAxis=T,me.value=q,me.constvar=n,me.index=f,me.x=ie,me.y=le,me.smoothing=T.smoothing,me}function j(q){var U,J,ee,ce,ye,xe=[],ue=[],K={};if(K.length=C.length,K.crossLength=A.length,r==="b")for(ee=Math.max(0,Math.min(B-2,q)),ye=Math.min(1,Math.max(0,q-ee)),K.xy=function(_e){return t.evalxy([],_e,q)},K.dxy=function(_e,ne){return t.dxydi([],_e,ee,ne,ye)},U=0;UC.length-1)&&S.push(Gy(j(i),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u;fC.length-1)&&!(p<0||p>C.length-1))for(x=C[o],_=C[p],a=0;aC[C.length-1])&&L.push(Gy(V(g),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash})));k.startline&&w.push(Gy(j(0),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&w.push(Gy(j(C.length-1),{color:k.endlinecolor,width:k.endlinewidth}))}else{for(s=5e-15,l=[Math.floor((C[C.length-1]-k.tick0)/k.dtick*(1+s)),Math.ceil((C[0]-k.tick0)/k.dtick/(1+s))].sort(function(q,U){return q-U}),u=l[0],c=l[1],f=u;f<=c;f++)v=k.tick0+k.dtick*f,S.push(Gy(V(v),{color:k.gridcolor,width:k.gridwidth,dash:k.griddash}));for(f=u-1;fC[C.length-1])&&L.push(Gy(V(g),{color:k.minorgridcolor,width:k.minorgridwidth,dash:k.minorgriddash}));k.startline&&w.push(Gy(V(C[0]),{color:k.startlinecolor,width:k.startlinewidth})),k.endline&&w.push(Gy(V(C[C.length-1]),{color:k.endlinecolor,width:k.endlinewidth}))}}});var nKe=fe((ZMr,rKe)=>{"use strict";var eKe=Yi(),tKe=ta().extendFlat;rKe.exports=function(t,r){var n,a,i,o,s,l=r._labels=[],u=r._gridlines;for(n=0;n{"use strict";iKe.exports=function(t,r,n,a){var i,o,s,l=[],u=!!n.smoothing,c=!!a.smoothing,f=t[0].length-1,v=t.length-1;for(i=0,o=[],s=[];i<=f;i++)o[i]=t[0][i],s[i]=r[0][i];for(l.push({x:o,y:s,bicubic:u}),i=0,o=[],s=[];i<=v;i++)o[i]=t[i][f],s[i]=r[i][f];for(l.push({x:o,y:s,bicubic:c}),i=f,o=[],s=[];i>=0;i--)o[f-i]=t[v][i],s[f-i]=r[v][i];for(l.push({x:o,y:s,bicubic:u}),i=v,o=[],s=[];i>=0;i--)o[v-i]=t[i][0],s[v-i]=r[i][0];return l.push({x:o,y:s,bicubic:c}),l}});var sKe=fe((KMr,oKe)=>{"use strict";var ear=Xt();oKe.exports=function(t,r,n){var a,i,o,s=[],l=[],u=t[0].length,c=t.length;function f(ee,ce){var ye=0,xe,ue=0;return ee>0&&(xe=t[ce][ee-1])!==void 0&&(ue++,ye+=xe),ee0&&(xe=t[ce-1][ee])!==void 0&&(ue++,ye+=xe),ce0&&i0&&aT);return ear.log("Smoother converged to",m,"after",E,"iterations"),t}});var uKe=fe((JMr,lKe)=>{"use strict";lKe.exports={RELATIVE_CULL_TOLERANCE:1e-6}});var hKe=fe((QMr,fKe)=>{"use strict";var cKe=.5;fKe.exports=function(t,r,n,a){var i=t[0]-r[0],o=t[1]-r[1],s=n[0]-r[0],l=n[1]-r[1],u=Math.pow(i*i+o*o,cKe/2),c=Math.pow(s*s+l*l,cKe/2),f=(c*c*i-u*u*s)*a,v=(c*c*o-u*u*l)*a,g=c*(u+c)*3,p=u*(u+c)*3;return[[r[0]+(g&&f/g),r[1]+(g&&v/g)],[r[0]-(p&&f/p),r[1]-(p&&v/p)]]}});var vKe=fe((eSr,dKe)=>{"use strict";var uJ=hKe(),YD=Xt().ensureArray;function U5(e,t,r){var n=-.5*r[0]+1.5*t[0],a=-.5*r[1]+1.5*t[1];return[(2*n+e[0])/3,(2*a+e[1])/3]}dKe.exports=function(t,r,n,a,i,o){var s,l,u,c,f,v,g,p,x,_,y=n[0].length,C=n.length,k=i?3*y-2:y,S=o?3*C-2:C;for(t=YD(t,S),r=YD(r,S),u=0;u{"use strict";pKe.exports=function(e,t,r,n,a){var i=t-2,o=r-2;return n&&a?function(s,l,u){s||(s=[]);var c,f,v,g,p,x,_=Math.max(0,Math.min(Math.floor(l),i)),y=Math.max(0,Math.min(Math.floor(u),o)),C=Math.max(0,Math.min(1,l-_)),k=Math.max(0,Math.min(1,u-y));_*=3,y*=3;var S=C*C,L=S*C,w=1-C,A=w*w,T=A*w,m=k*k,F=m*k,E=1-k,I=E*E,R=I*E;for(x=0;x{"use strict";mKe.exports=function(e,t,r){return t&&r?function(n,a,i,o,s){n||(n=[]);var l,u,c,f,v,g;a*=3,i*=3;var p=o*o,x=1-o,_=x*x,y=x*o*2,C=-3*_,k=3*(_-y),S=3*(y-p),L=3*p,w=s*s,A=w*s,T=1-s,m=T*T,F=m*T;for(g=0;g{"use strict";xKe.exports=function(e,t,r){return t&&r?function(n,a,i,o,s){n||(n=[]);var l,u,c,f,v,g;a*=3,i*=3;var p=o*o,x=p*o,_=1-o,y=_*_,C=y*_,k=s*s,S=1-s,L=S*S,w=S*s*2,A=-3*L,T=3*(L-w),m=3*(w-k),F=3*k;for(g=0;g{"use strict";var bKe=uKe(),wKe=VE().findBin,tar=vKe(),rar=gKe(),nar=yKe(),iar=_Ke();TKe.exports=function(t){var r=t._a,n=t._b,a=r.length,i=n.length,o=t.aaxis,s=t.baxis,l=r[0],u=r[a-1],c=n[0],f=n[i-1],v=r[r.length-1]-r[0],g=n[n.length-1]-n[0],p=v*bKe.RELATIVE_CULL_TOLERANCE,x=g*bKe.RELATIVE_CULL_TOLERANCE;l-=p,u+=p,c-=x,f+=x,t.isVisible=function(_,y){return _>l&&_c&&yu||yf},t.setScale=function(){var _=t._x,y=t._y,C=tar(t._xctrl,t._yctrl,_,y,o.smoothing,s.smoothing);t._xctrl=C[0],t._yctrl=C[1],t.evalxy=rar([t._xctrl,t._yctrl],a,i,o.smoothing,s.smoothing),t.dxydi=nar([t._xctrl,t._yctrl],o.smoothing,s.smoothing),t.dxydj=iar([t._xctrl,t._yctrl],o.smoothing,s.smoothing)},t.i2a=function(_){var y=Math.max(0,Math.floor(_[0]),a-2),C=_[0]-y;return(1-C)*r[y]+C*r[y+1]},t.j2b=function(_){var y=Math.max(0,Math.floor(_[1]),a-2),C=_[1]-y;return(1-C)*n[y]+C*n[y+1]},t.ij2ab=function(_){return[t.i2a(_[0]),t.j2b(_[1])]},t.a2i=function(_){var y=Math.max(0,Math.min(wKe(_,r),a-2)),C=r[y],k=r[y+1];return Math.max(0,Math.min(a-1,y+(_-C)/(k-C)))},t.b2j=function(_){var y=Math.max(0,Math.min(wKe(_,n),i-2)),C=n[y],k=n[y+1];return Math.max(0,Math.min(i-1,y+(_-C)/(k-C)))},t.ab2ij=function(_){return[t.a2i(_[0]),t.b2j(_[1])]},t.i2c=function(_,y){return t.evalxy([],_,y)},t.ab2xy=function(_,y,C){if(!C&&(_r[a-1]|yn[i-1]))return[!1,!1];var k=t.a2i(_),S=t.b2j(y),L=t.evalxy([],k,S);if(C){var w=0,A=0,T=[],m,F,E,I;_r[a-1]?(m=a-2,F=1,w=(_-r[a-1])/(r[a-1]-r[a-2])):(m=Math.max(0,Math.min(a-2,Math.floor(k))),F=k-m),yn[i-1]?(E=i-2,I=1,A=(y-n[i-1])/(n[i-1]-n[i-2])):(E=Math.max(0,Math.min(i-2,Math.floor(S))),I=S-E),w&&(t.dxydi(T,m,E,F,I),L[0]+=T[0]*w,L[1]+=T[1]*w),A&&(t.dxydj(T,m,E,F,I),L[0]+=T[0]*A,L[1]+=T[1]*A)}return L},t.c2p=function(_,y,C){return[y.c2p(_[0]),C.c2p(_[1])]},t.p2x=function(_,y,C){return[y.p2c(_[0]),C.p2c(_[1])]},t.dadi=function(_){var y=Math.max(0,Math.min(r.length-2,_));return r[y+1]-r[y]},t.dbdj=function(_){var y=Math.max(0,Math.min(n.length-2,_));return n[y+1]-n[y]},t.dxyda=function(_,y,C,k){var S=t.dxydi(null,_,y,C,k),L=t.dadi(_,C);return[S[0]/L,S[1]/L]},t.dxydb=function(_,y,C,k){var S=t.dxydj(null,_,y,C,k),L=t.dbdj(y,k);return[S[0]/L,S[1]/L]},t.dxyda_rough=function(_,y,C){var k=v*(C||.1),S=t.ab2xy(_+k,y,!0),L=t.ab2xy(_-k,y,!0);return[(S[0]-L[0])*.5/k,(S[1]-L[1])*.5/k]},t.dxydb_rough=function(_,y,C){var k=g*(C||.1),S=t.ab2xy(_,y+k,!0),L=t.ab2xy(_,y-k,!0);return[(S[0]-L[0])*.5/k,(S[1]-L[1])*.5/k]},t.dpdx=function(_){return _._m},t.dpdy=function(_){return _._m}}});var FKe=fe((aSr,PKe)=>{"use strict";var XD=Yi(),MKe=Xt().isArray1D,aar=Y$e(),SKe=K$e(),EKe=Q$e(),kKe=nKe(),oar=aKe(),CKe=h7(),LKe=sKe(),sar=c7(),lar=AKe();PKe.exports=function(t,r){var n=XD.getFromId(t,r.xaxis),a=XD.getFromId(t,r.yaxis),i=r.aaxis,o=r.baxis,s=r.x,l=r.y,u=[];s&&MKe(s)&&u.push("x"),l&&MKe(l)&&u.push("y"),u.length&&sar(r,i,o,"a","b",u);var c=r._a=r._a||r.a,f=r._b=r._b||r.b;s=r._x||r.x,l=r._y||r.y;var v={};if(r._cheater){var g=i.cheatertype==="index"?c.length:c,p=o.cheatertype==="index"?f.length:f;s=aar(g,p,r.cheaterslope)}r._x=s=CKe(s),r._y=l=CKe(l),LKe(s,c,f),LKe(l,c,f),lar(r),r.setScale();var x=SKe(s),_=SKe(l),y=.5*(x[1]-x[0]),C=.5*(x[1]+x[0]),k=.5*(_[1]-_[0]),S=.5*(_[1]+_[0]),L=1.3;return x=[C-y*L,C+y*L],_=[S-k*L,S+k*L],r._extremes[n._id]=XD.findExtremes(n,x,{padded:!0}),r._extremes[a._id]=XD.findExtremes(a,_,{padded:!0}),EKe(r,"a","b"),EKe(r,"b","a"),kKe(r,i),kKe(r,o),v.clipsegments=oar(r._xctrl,r._yctrl,i,o),v.x=s,v.y=l,v.a=c,v.b=f,[v]}});var RKe=fe((oSr,DKe)=>{"use strict";DKe.exports={attributes:UD(),supplyDefaults:D$e(),plot:j$e(),calc:FKe(),animatable:!0,isContainer:!0,moduleType:"trace",name:"carpet",basePlotModule:gu(),categories:["cartesian","svg","carpet","carpetAxis","notLegendIsolatable","noMultiCategory","noHover","noSortingByValue"],meta:{}}});var zKe=fe((sSr,IKe)=>{"use strict";IKe.exports=RKe()});var cJ=fe((lSr,NKe)=>{"use strict";var uar=n1(),G0=Ol(),car=Ho(),{hovertemplateAttrs:far,texttemplateAttrs:har,templatefallbackAttrs:qKe}=Oo(),BKe=_s(),Hy=ta().extendFlat,Ov=G0.marker,V5=G0.line,OKe=Ov.line;NKe.exports={carpet:{valType:"string",editType:"calc"},a:{valType:"data_array",editType:"calc"},b:{valType:"data_array",editType:"calc"},mode:Hy({},G0.mode,{dflt:"markers"}),text:Hy({},G0.text,{}),texttemplate:har({editType:"plot"},{keys:["a","b","text"]}),texttemplatefallback:qKe({editType:"plot"}),hovertext:Hy({},G0.hovertext,{}),line:{color:V5.color,width:V5.width,dash:V5.dash,backoff:V5.backoff,shape:Hy({},V5.shape,{values:["linear","spline"]}),smoothing:V5.smoothing,editType:"calc"},connectgaps:G0.connectgaps,fill:Hy({},G0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:uar(),marker:Hy({symbol:Ov.symbol,opacity:Ov.opacity,maxdisplayed:Ov.maxdisplayed,angle:Ov.angle,angleref:Ov.angleref,standoff:Ov.standoff,size:Ov.size,sizeref:Ov.sizeref,sizemin:Ov.sizemin,sizemode:Ov.sizemode,line:Hy({width:OKe.width,dash:OKe.dash,editType:"calc"},BKe("marker.line")),gradient:Ov.gradient,editType:"calc"},BKe("marker")),textfont:G0.textfont,textposition:G0.textposition,selected:G0.selected,unselected:G0.unselected,hoverinfo:Hy({},car.hoverinfo,{flags:["a","b","text","name"]}),hoveron:G0.hoveron,hovertemplate:far(),hovertemplatefallback:qKe(),zorder:G0.zorder}});var HKe=fe((uSr,GKe)=>{"use strict";var UKe=Xt(),dar=r1(),G5=Is(),par=vv(),gar=lp(),VKe=f3(),mar=up(),yar=a1(),xar=cJ();GKe.exports=function(t,r,n,a){function i(v,g){return UKe.coerce(t,r,xar,v,g)}i("carpet"),r.xaxis="x",r.yaxis="y";var o=i("a"),s=i("b"),l=Math.min(o.length,s.length);if(!l){r.visible=!1;return}r._length=l,i("text"),i("texttemplate"),i("texttemplatefallback"),i("hovertext");var u=l{"use strict";jKe.exports=function(t,r){var n={},a=r._carpet,i=a.ab2ij([t.a,t.b]),o=Math.floor(i[0]),s=i[0]-o,l=Math.floor(i[1]),u=i[1]-l,c=a.evalxy([],o,l,s,u);return n.yLabel=c[1].toFixed(3),n}});var ZD=fe((fSr,YKe)=>{"use strict";YKe.exports=function(e,t){for(var r=e._fullData.length,n,a=0;a{"use strict";var XKe=aa(),_ar=pv(),bar=o1(),war=P0(),Tar=gv().calcMarkerSize,Aar=ZD();ZKe.exports=function(t,r){var n=r._carpetTrace=Aar(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){var a;r.xaxis=n.xaxis,r.yaxis=n.yaxis;var i=r._length,o=new Array(i),s,l,u=!1;for(a=0;a{"use strict";var Mar=m3(),KKe=Yi(),Sar=ea();JKe.exports=function(t,r,n,a){var i,o,s,l=n[0][0].carpet,u=KKe.getFromId(t,l.xaxis||"x"),c=KKe.getFromId(t,l.yaxis||"y"),f={xaxis:u,yaxis:c,plot:r.plot};for(i=0;i{"use strict";var Ear=b3(),kar=Xt().fillText;eJe.exports=function(t,r,n,a){var i=Ear(t,r,n,a);if(!i||i[0].index===!1)return;var o=i[0];if(o.index===void 0){var s=1-o.y0/t.ya._length,l=t.xa._length,u=l*s/2,c=l-u;return o.x0=Math.max(Math.min(o.x0,c),u),o.x1=Math.max(Math.min(o.x1,c),u),i}var f=o.cd[o.index];o.a=f.a,o.b=f.b,o.xLabelVal=void 0,o.yLabelVal=void 0;var v=o.trace,g=v._carpet,p=v._module.formatLabels(f,v);o.yLabel=p.yLabel,delete o.text;var x=[];function _(k,S){var L;k.labelprefix&&k.labelprefix.length>0?L=k.labelprefix.replace(/ = $/,""):L=k._hovertitle,x.push(L+": "+S.toFixed(3)+k.labelsuffix)}if(!v.hovertemplate){var y=f.hi||v.hoverinfo,C=y.split("+");C.indexOf("all")!==-1&&(C=["a","b","text"]),C.indexOf("a")!==-1&&_(g.aaxis,f.a),C.indexOf("b")!==-1&&_(g.baxis,f.b),x.push("y: "+o.yLabel),C.indexOf("text")!==-1&&kar(f,v,x),o.extraText=x.join("
")}return i}});var nJe=fe((pSr,rJe)=>{"use strict";rJe.exports=function(t,r,n,a,i){var o=a[i];return t.a=o.a,t.b=o.b,t.y=o.y,t}});var aJe=fe((gSr,iJe)=>{"use strict";iJe.exports={attributes:cJ(),supplyDefaults:HKe(),colorbar:Zf(),formatLabels:WKe(),calc:$Ke(),plot:QKe(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:tJe(),selectPoints:a2(),eventData:nJe(),moduleType:"trace",name:"scattercarpet",basePlotModule:gu(),categories:["svg","carpet","symbols","showLegend","carpetDependent","zoomScale"],meta:{}}});var sJe=fe((mSr,oJe)=>{"use strict";oJe.exports=aJe()});var fJ=fe((ySr,lJe)=>{"use strict";var Nv=O3(),Ng=NA(),Car=_s(),Lar=ta().extendFlat,z1=Ng.contours;lJe.exports=Lar({carpet:{valType:"string",editType:"calc"},z:Nv.z,a:Nv.x,a0:Nv.x0,da:Nv.dx,b:Nv.y,b0:Nv.y0,db:Nv.dy,text:Nv.text,hovertext:Nv.hovertext,transpose:Nv.transpose,atype:Nv.xtype,btype:Nv.ytype,fillcolor:Ng.fillcolor,autocontour:Ng.autocontour,ncontours:Ng.ncontours,contours:{type:z1.type,start:z1.start,end:z1.end,size:z1.size,coloring:{valType:"enumerated",values:["fill","lines","none"],dflt:"fill",editType:"calc"},showlines:z1.showlines,showlabels:z1.showlabels,labelfont:z1.labelfont,labelformat:z1.labelformat,operation:z1.operation,value:z1.value,editType:"calc",impliedEdits:{autocontour:!1}},line:{color:Ng.line.color,width:Ng.line.width,dash:Ng.line.dash,smoothing:Ng.line.smoothing,editType:"plot"},zorder:Ng.zorder},Car("",{cLetter:"z",autoColorDflt:!1}))});var hJ=fe((xSr,fJe)=>{"use strict";var uJe=Xt(),Par=s7(),cJe=fJ(),Far=EG(),Dar=P7(),Rar=F7();fJe.exports=function(t,r,n,a){function i(u,c){return uJe.coerce(t,r,cJe,u,c)}function o(u){return uJe.coerce2(t,r,cJe,u)}if(i("carpet"),t.a&&t.b){var s=Par(t,r,i,a,"a","b");if(!s){r.visible=!1;return}i("text");var l=i("contours.type")==="constraint";l?Far(t,r,i,a,n,{hasHover:!1}):(Dar(t,r,i,o),Rar(t,r,i,a,{hasHover:!1}))}else r._defaultColor=n,r._length=null;i("zorder")}});var pJe=fe((_Sr,vJe)=>{"use strict";var Iar=Mh(),hJe=Xt(),zar=c7(),qar=h7(),Bar=d7(),Oar=v7(),dJe=$V(),Nar=hJ(),Uar=ZD(),Var=pG();vJe.exports=function(t,r){var n=r._carpetTrace=Uar(t,r);if(!(!n||!n.visible||n.visible==="legendonly")){if(!r.a||!r.b){var a=t.data[n.index],i=t.data[r.index];i.a||(i.a=a.a),i.b||(i.b=a.b),Nar(i,r,r._defaultColor,t._fullLayout)}var o=Gar(t,r);return Var(r,r._z),o}};function Gar(e,t){var r=t._carpetTrace,n=r.aaxis,a=r.baxis,i,o,s,l,u,c,f;n._minDtick=0,a._minDtick=0,hJe.isArray1D(t.z)&&zar(t,n,a,"a","b",["z"]),i=t._a=t._a||t.a,l=t._b=t._b||t.b,i=i?n.makeCalcdata(t,"_a"):[],l=l?a.makeCalcdata(t,"_b"):[],o=t.a0||0,s=t.da||1,u=t.b0||0,c=t.db||1,f=t._z=qar(t._z||t.z,t.transpose),t._emptypoints=Oar(f),Bar(f,t._emptypoints);var v=hJe.maxRowLength(f),g=t.xtype==="scaled"?"":i,p=dJe(t,g,o,s,v,n),x=t.ytype==="scaled"?"":l,_=dJe(t,x,u,c,f.length,a),y={a:p,b:_,z:f};return t.contours.type==="levels"&&t.contours.coloring!=="none"&&Iar(e,t,{vals:f,containerStr:"",cLetter:"z"}),[y]}});var mJe=fe((bSr,gJe)=>{"use strict";var Har=Xt().isArrayOrTypedArray;gJe.exports=function(e,t,r,n){var a,i,o,s,l,u,c,f,v,g,p,x,_,y=Har(r)?"a":"b",C=y==="a"?e.aaxis:e.baxis,k=C.smoothing,S=y==="a"?e.a2i:e.b2j,L=y==="a"?r:n,w=y==="a"?n:r,A=y==="a"?t.a.length:t.b.length,T=y==="a"?t.b.length:t.a.length,m=Math.floor(y==="a"?e.b2j(w):e.a2i(w)),F=y==="a"?function(ce){return e.evalxy([],ce,m)}:function(ce){return e.evalxy([],m,ce)};k&&(o=Math.max(0,Math.min(T-2,m)),s=m-o,i=y==="a"?function(ce,ye){return e.dxydi([],ce,o,ye,s)}:function(ce,ye){return e.dxydj([],o,ce,s,ye)});var E=S(L[0]),I=S(L[1]),R=E0?Math.floor:Math.ceil,V=R>0?Math.ceil:Math.floor,j=R>0?Math.min:Math.max,q=R>0?Math.max:Math.min,U=O(E+B),J=V(I-B);c=F(E);var ee=[[c]];for(a=U;a*R{"use strict";var KD=xi(),JD=oJ(),wJe=sJ(),fS=ea(),Ug=Xt(),jar=mG(),War=yG(),M_=I7(),$D=VA(),Yar=wG(),Xar=bG(),Zar=TG(),$ar=ZD(),yJe=mJe();TJe.exports=function(t,r,n,a){var i=r.xaxis,o=r.yaxis;Ug.makeTraceGroups(a,n,"contour").each(function(s){var l=KD.select(this),u=s[0],c=u.trace,f=c._carpetTrace=$ar(t,c),v=t.calcdata[f.index][0];if(!f.visible||f.visible==="legendonly")return;var g=u.a,p=u.b,x=c.contours,_=Xar(x,r,u),y=x.type==="constraint",C=x._operation,k=y?C==="="?"lines":"fill":x.coloring;function S(O){var V=f.ab2xy(O[0],O[1],!0);return[i.c2p(V[0]),o.c2p(V[1])]}var L=[[g[0],p[p.length-1]],[g[g.length-1],p[p.length-1]],[g[g.length-1],p[0]],[g[0],p[0]]];jar(_);var w=(g[g.length-1]-g[0])*1e-8,A=(p[p.length-1]-p[0])*1e-8;War(_,w,A);var T=_;x.type==="constraint"&&(T=Yar(_,C)),Kar(_,S);var m,F,E,I,R=[];for(I=v.clipsegments.length-1;I>=0;I--)m=v.clipsegments[I],F=JD([],m.x,i.c2p),E=JD([],m.y,o.c2p),F.reverse(),E.reverse(),R.push(wJe(F,E,m.bicubic));var B="M"+R.join("L")+"Z";eor(l,v.clipsegments,i,o,y,k),tor(c,l,i,o,T,L,S,f,v,k,B),Jar(l,_,t,u,x,r,f),fS.setClipUrl(l,f._clipPathId,t)})};function Kar(e,t){var r,n,a,i,o,s,l,u,c;for(r=0;r_&&(n.max=_),n.len=n.max-n.min}function xJe(e,t,r){var n=e.getPointAtLength(t),a=e.getPointAtLength(r),i=a.x-n.x,o=a.y-n.y,s=Math.sqrt(i*i+o*o);return[i/s,o/s]}function _Je(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]);return[e[0]/t,e[1]/t]}function bJe(e,t){var r=Math.abs(e[0]*t[0]+e[1]*t[1]),n=Math.sqrt(1-r*r);return n/r}function eor(e,t,r,n,a,i){var o,s,l,u,c=Ug.ensureSingle(e,"g","contourbg"),f=c.selectAll("path").data(i==="fill"&&!a?[0]:[]);f.enter().append("path"),f.exit().remove();var v=[];for(u=0;u=0&&(g=F,x=_):Math.abs(v[1]-g[1])=0&&(g=F,x=_):Ug.log("endpt to newendpt is not vert. or horz.",v,g,F)}if(x>=0)break;u+=T(v,g),v=g}if(x===t.edgepaths.length){Ug.log("unclosed perimeter path");break}l=x,f=c.indexOf(l)===-1,f&&(l=c[0],u+=T(v,g)+"Z",v=null)}for(l=0;l{"use strict";MJe.exports={attributes:fJ(),supplyDefaults:hJ(),colorbar:B7(),calc:pJe(),plot:AJe(),style:q7(),moduleType:"trace",name:"contourcarpet",basePlotModule:gu(),categories:["cartesian","svg","carpet","contour","symbols","showLegend","hasLines","carpetDependent","noHover","noSortingByValue"],meta:{}}});var kJe=fe((ASr,EJe)=>{"use strict";EJe.exports=SJe()});var eR=fe((MSr,DJe)=>{"use strict";var QD=Xt().extendFlat,hS=Ol(),CJe=pl().axisHoverFormat,{hovertemplateAttrs:nor,templatefallbackAttrs:ior}=Oo(),PJe=Uc().dash,aor=hb(),FJe=tw(),oor=FJe.INCREASING.COLOR,sor=FJe.DECREASING.COLOR,dJ=hS.line;function LJe(e){return{line:{color:QD({},dJ.color,{dflt:e}),width:dJ.width,dash:PJe,editType:"style"},editType:"style"}}DJe.exports={xperiod:hS.xperiod,xperiod0:hS.xperiod0,xperiodalignment:hS.xperiodalignment,xhoverformat:CJe("x"),yhoverformat:CJe("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:QD({},dJ.width,{}),dash:QD({},PJe,{}),editType:"style"},increasing:LJe(oor),decreasing:LJe(sor),text:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertext:{valType:"string",dflt:"",arrayOk:!0,editType:"calc"},hovertemplate:nor({},{keys:["open","high","low","close"]}),hovertemplatefallback:ior(),tickwidth:{valType:"number",min:0,max:.5,dflt:.3,editType:"calc"},hoverlabel:QD({},aor.hoverlabel,{split:{valType:"boolean",dflt:!1,editType:"style"}}),zorder:hS.zorder}});var vJ=fe((SSr,RJe)=>{"use strict";var lor=bi(),uor=Xt();RJe.exports=function(t,r,n,a){var i=n("x"),o=n("open"),s=n("high"),l=n("low"),u=n("close");n("hoverlabel.split");var c=lor.getComponentMethod("calendars","handleTraceDefaults");if(c(t,r,["x"],a),!!(o&&s&&l&&u)){var f=Math.min(o.length,s.length,l.length,u.length);return i&&(f=Math.min(f,uor.minRowLength(i))),r._length=f,f}}});var qJe=fe((ESr,zJe)=>{"use strict";var cor=Xt(),hor=vJ(),dor=sp(),vor=eR();zJe.exports=function(t,r,n,a){function i(s,l){return cor.coerce(t,r,vor,s,l)}var o=hor(t,r,i,a);if(!o){r.visible=!1;return}dor(t,r,a,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),i("line.dash"),IJe(t,r,i,"increasing"),IJe(t,r,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("tickwidth"),a._requestRangeslider[r.xaxis]=!0,i("zorder")};function IJe(e,t,r,n){r(n+".line.color"),r(n+".line.width",t.line.width),r(n+".line.dash",t.line.dash)}});var pJ=fe((kSr,OJe)=>{"use strict";var H5=Xt(),tR=H5._,rR=Yi(),por=cp(),dS=Wa().BADNUM;function gor(e,t){var r=rR.getFromId(e,t.xaxis),n=rR.getFromId(e,t.yaxis),a=yor(e,r,t),i=t._minDiff;t._minDiff=null;var o=t._origX;t._origX=null;var s=t._xcalc;t._xcalc=null;var l=BJe(e,t,o,s,n,mor);return t._extremes[r._id]=rR.findExtremes(r,s,{vpad:i/2}),l.length?(H5.extendFlat(l[0].t,{wHover:i/2,tickLen:a}),l):[{t:{empty:!0}}]}function mor(e,t,r,n){return{o:e,h:t,l:r,c:n}}function BJe(e,t,r,n,a,i){for(var o=a.makeCalcdata(t,"open"),s=a.makeCalcdata(t,"high"),l=a.makeCalcdata(t,"low"),u=a.makeCalcdata(t,"close"),c=H5.isArrayOrTypedArray(t.text),f=H5.isArrayOrTypedArray(t.hovertext),v=!0,g=null,p=!!t.xperiodalignment,x=[],_=0;_g):v=L>C,g=L;var w=i(C,k,S,L);w.pos=y,w.yc=(C+L)/2,w.i=_,w.dir=v?"increasing":"decreasing",w.x=w.pos,w.y=[S,k],p&&(w.orig_p=r[_]),c&&(w.tx=t.text[_]),f&&(w.htx=t.hovertext[_]),x.push(w)}else x.push({pos:y,empty:!0})}return t._extremes[a._id]=rR.findExtremes(a,H5.concat(l,s),{padded:!0}),x.length&&(x[0].t={labels:{open:tR(e,"open:")+" ",high:tR(e,"high:")+" ",low:tR(e,"low:")+" ",close:tR(e,"close:")+" "}}),x}function yor(e,t,r){var n=r._minDiff;if(!n){var a=e._fullData,i=[];n=1/0;var o;for(o=0;o{"use strict";var xor=xi(),NJe=Xt();UJe.exports=function(t,r,n,a){var i=r.yaxis,o=r.xaxis,s=!!o.rangebreaks;NJe.makeTraceGroups(a,n,"trace ohlc").each(function(l){var u=xor.select(this),c=l[0],f=c.t,v=c.trace;if(v.visible!==!0||f.empty){u.remove();return}var g=f.tickLen,p=u.selectAll("path").data(NJe.identity);p.enter().append("path"),p.exit().remove(),p.attr("d",function(x){if(x.empty)return"M0,0Z";var _=o.c2p(x.pos-g,!0),y=o.c2p(x.pos+g,!0),C=s?(_+y)/2:o.c2p(x.pos,!0),k=i.c2p(x.o,!0),S=i.c2p(x.h,!0),L=i.c2p(x.l,!0),w=i.c2p(x.c,!0);return"M"+_+","+k+"H"+C+"M"+C+","+S+"V"+L+"M"+y+","+w+"H"+C})})}});var HJe=fe((LSr,GJe)=>{"use strict";var gJ=xi(),_or=ea(),bor=ni();GJe.exports=function(t,r,n){var a=n||gJ.select(t).selectAll("g.ohlclayer").selectAll("g.trace");a.style("opacity",function(i){return i[0].trace.opacity}),a.each(function(i){var o=i[0].trace;gJ.select(this).selectAll("path").each(function(s){if(!s.empty){var l=o[s.dir].line;gJ.select(this).style("fill","none").call(bor.stroke,l.color).call(_or.dashLine,l.dash,l.width).style("opacity",o.selectedpoints&&!s.selected?.3:1)}})})}});var yJ=fe((PSr,ZJe)=>{"use strict";var mJ=Yi(),wor=Xt(),nR=kl(),Tor=ni(),Aor=Xt().fillText,jJe=tw(),Mor={increasing:jJe.INCREASING.SYMBOL,decreasing:jJe.DECREASING.SYMBOL};function Sor(e,t,r,n){var a=e.cd,i=a[0].trace;return i.hoverlabel.split?YJe(e,t,r,n):XJe(e,t,r,n)}function WJe(e,t,r,n){var a=e.cd,i=e.xa,o=a[0].trace,s=a[0].t,l=o.type,u=l==="ohlc"?"l":"min",c=l==="ohlc"?"h":"max",f,v,g=s.bPos||0,p=function(F){return F.pos+g-t},x=s.bdPos||s.tickLen,_=s.wHover,y=Math.min(1,x/Math.abs(i.r2c(i.range[1])-i.r2c(i.range[0])));f=e.maxHoverDistance-y,v=e.maxSpikeDistance-y;function C(F){var E=p(F);return nR.inbox(E-_,E+_,f)}function k(F){var E=F[u],I=F[c];return E===I||nR.inbox(E-r,I-r,f)}function S(F){return(C(F)+k(F))/2}var L=nR.getDistanceFunction(n,C,k,S);if(nR.getClosest(a,L,e),e.index===!1)return null;var w=a[e.index];if(w.empty)return null;var A=w.dir,T=o[A],m=T.line.color;return Tor.opacity(m)&&T.line.width?e.color=m:e.color=T.fillcolor,e.x0=i.c2p(w.pos+g-x,!0),e.x1=i.c2p(w.pos+g+x,!0),e.xLabelVal=w.orig_p!==void 0?w.orig_p:w.pos,e.spikeDistance=S(w)*v/f,e.xSpike=i.c2p(w.pos,!0),e}function YJe(e,t,r,n){var a=e.cd,i=e.ya,o=a[0].trace,s=a[0].t,l=[],u=WJe(e,t,r,n);if(!u)return[];var c=a[u.index],f=c.hi||o.hoverinfo||"";if(f==="none"||f==="skip")return[];for(var v=["high","open","close","low"],g={},p=0;p"+s.labels[x]+mJ.hoverLabelText(i,_,o.yhoverformat)):(C=wor.extendFlat({},u),C.y0=C.y1=y,C.yLabelVal=_,C.yLabel=s.labels[x]+mJ.hoverLabelText(i,_,o.yhoverformat),C.name="",l.push(C),g[_]=C)}return l}function XJe(e,t,r,n){var a=e.cd,i=e.ya,o=a[0].trace,s=a[0].t,l=WJe(e,t,r,n);if(!l)return[];var u=l.index,c=a[u],f=l.index=c.i,v=c.dir;function g(S){return s.labels[S]+mJ.hoverLabelText(i,o[S][f],o.yhoverformat)}var p=c.hi||o.hoverinfo||"",x=p.split("+"),_=p==="all",y=_||x.indexOf("y")!==-1,C=_||x.indexOf("text")!==-1,k=y?[g("open"),g("high"),g("low"),g("close")+" "+Mor[v]]:[];return C&&Aor(c,o,k),l.extraText=k.join("
"),l.y0=l.y1=i.c2p(c.yc,!0),[l]}ZJe.exports={hoverPoints:Sor,hoverSplit:YJe,hoverOnPoints:XJe}});var xJ=fe((FSr,$Je)=>{"use strict";$Je.exports=function(t,r){var n=t.cd,a=t.xaxis,i=t.yaxis,o=[],s,l=n[0].t.bPos||0;if(r===!1)for(s=0;s{"use strict";KJe.exports={moduleType:"trace",name:"ohlc",basePlotModule:gu(),categories:["cartesian","svg","showLegend"],meta:{},attributes:eR(),supplyDefaults:qJe(),calc:pJ().calc,plot:VJe(),style:HJe(),hoverPoints:yJ().hoverPoints,selectPoints:xJ()}});var eQe=fe((RSr,QJe)=>{"use strict";QJe.exports=JJe()});var bJ=fe((ISr,nQe)=>{"use strict";var _J=Xt().extendFlat,tQe=pl().axisHoverFormat,zd=eR(),j5=PA();function rQe(e){return{line:{color:_J({},j5.line.color,{dflt:e}),width:j5.line.width,editType:"style"},fillcolor:j5.fillcolor,editType:"style"}}nQe.exports={xperiod:zd.xperiod,xperiod0:zd.xperiod0,xperiodalignment:zd.xperiodalignment,xhoverformat:tQe("x"),yhoverformat:tQe("y"),x:zd.x,open:zd.open,high:zd.high,low:zd.low,close:zd.close,line:{width:_J({},j5.line.width,{}),editType:"style"},increasing:rQe(zd.increasing.line.color.dflt),decreasing:rQe(zd.decreasing.line.color.dflt),text:zd.text,hovertext:zd.hovertext,hovertemplate:zd.hovertemplate,hovertemplatefallback:zd.hovertemplatefallback,whiskerwidth:_J({},j5.whiskerwidth,{dflt:0}),hoverlabel:zd.hoverlabel,zorder:j5.zorder}});var oQe=fe((zSr,aQe)=>{"use strict";var Eor=Xt(),kor=ni(),Cor=vJ(),Lor=sp(),Por=bJ();aQe.exports=function(t,r,n,a){function i(s,l){return Eor.coerce(t,r,Por,s,l)}var o=Cor(t,r,i,a);if(!o){r.visible=!1;return}Lor(t,r,a,i,{x:!0}),i("xhoverformat"),i("yhoverformat"),i("line.width"),iQe(t,r,i,"increasing"),iQe(t,r,i,"decreasing"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),i("whiskerwidth"),a._requestRangeslider[r.xaxis]=!0,i("zorder")};function iQe(e,t,r,n){var a=r(n+".line.color");r(n+".line.width",t.line.width),r(n+".fillcolor",kor.addOpacity(a,.5))}});var cQe=fe((qSr,uQe)=>{"use strict";var sQe=Xt(),lQe=Yi(),For=cp(),Dor=pJ().calcCommon;uQe.exports=function(e,t){var r=e._fullLayout,n=lQe.getFromId(e,t.xaxis),a=lQe.getFromId(e,t.yaxis),i=n.makeCalcdata(t,"x"),o=For(t,n,"x",i).vals,s=Dor(e,t,i,o,a,Ror);return s.length?(sQe.extendFlat(s[0].t,{num:r._numBoxes,dPos:sQe.distinctVals(o).minDiff/2,posLetter:"x",valLetter:"y"}),r._numBoxes++,s):[{t:{empty:!0}}]};function Ror(e,t,r,n){return{min:r,q1:Math.min(e,n),med:n,q3:Math.max(e,n),max:t}}});var hQe=fe((BSr,fQe)=>{"use strict";fQe.exports={moduleType:"trace",name:"candlestick",basePlotModule:gu(),categories:["cartesian","svg","showLegend","candlestick","boxLayout"],meta:{},attributes:bJ(),layoutAttributes:FA(),supplyLayoutDefaults:t7().supplyLayoutDefaults,crossTraceCalc:n7().crossTraceCalc,supplyDefaults:oQe(),calc:cQe(),plot:i7().plot,layerName:"boxlayer",style:a7().style,hoverPoints:yJ().hoverPoints,selectPoints:xJ()}});var vQe=fe((OSr,dQe)=>{"use strict";dQe.exports=hQe()});var TJ=fe((NSr,pQe)=>{"use strict";var aR=Xt(),Ior=Hp(),iR=aR.deg2rad,wJ=aR.rad2deg;pQe.exports=function(t,r,n){switch(Ior(t,n),t._id){case"x":case"radialaxis":zor(t,r);break;case"angularaxis":Oor(t,r);break}};function zor(e,t){var r=t._subplot;e.setGeometry=function(){var n=e._rl[0],a=e._rl[1],i=r.innerRadius,o=(r.radius-i)/(a-n),s=i/o,l=n>a?function(u){return u<=0}:function(u){return u>=0};e.c2g=function(u){var c=e.c2l(u)-n;return(l(c)?c:0)+s},e.g2c=function(u){return e.l2c(u+n-s)},e.g2p=function(u){return u*o},e.c2p=function(u){return e.g2p(e.c2g(u))}}}function qor(e,t){return t==="degrees"?iR(e):e}function Bor(e,t){return t==="degrees"?wJ(e):e}function Oor(e,t){var r=e.type;if(r==="linear"){var n=e.d2c,a=e.c2d;e.d2c=function(i,o){return qor(n(i),o)},e.c2d=function(i,o){return a(Bor(i,o))}}e.makeCalcdata=function(i,o){var s=i[o],l=i._length,u,c,f=function(_){return e.d2c(_,i.thetaunit)};if(s)for(u=new Array(l),c=0;c{"use strict";gQe.exports={attr:"subplot",name:"polar",axisNames:["angularaxis","radialaxis"],axisName2dataArray:{angularaxis:"theta",radialaxis:"r"},layerNames:["draglayer","plotbg","backplot","angular-grid","radial-grid","frontplot","angular-line","radial-line","angular-axis","radial-axis"],radialDragBoxSize:50,angularDragBoxSize:30,cornerLen:25,cornerHalfWidth:2,MINDRAG:8,MINZOOM:20,OFFEDGE:20}});var lR=fe((VSr,bQe)=>{"use strict";var S_=Xt(),mQe=NT().tester,AJ=S_.findIndexOfMin,xQe=S_.isAngleInsideSector,Nor=S_.angleDelta,yQe=S_.angleDist;function Uor(e,t,r,n,a){if(!xQe(t,n))return!1;var i,o;r[0]0?o:1/0},n=AJ(t,r),a=S_.mod(n+1,t.length);return[t[n],t[a]]}function sR(e){return Math.abs(e)>1e-10?e:0}function MJ(e,t,r){t=t||0,r=r||0;for(var n=e.length,a=new Array(n),i=0;i{"use strict";function wQe(e){return e<0?-1:e>0?1:0}function Y5(e){var t=e[0],r=e[1];if(!isFinite(t)||!isFinite(r))return[1,0];var n=(t+1)*(t+1)+r*r;return[(t*t+r*r-1)/n,2*r/n]}function X5(e,t){var r=t[0],n=t[1];return[r*e.radius+e.cx,-n*e.radius+e.cy]}function TQe(e,t){return t*e.radius}function Zor(e,t,r,n){var a=X5(e,Y5([r,t])),i=a[0],o=a[1],s=X5(e,Y5([n,t])),l=s[0],u=s[1];if(t===0)return["M"+i+","+o,"L"+l+","+u].join(" ");var c=TQe(e,1/Math.abs(t));return["M"+i+","+o,"A"+c+","+c+" 0 0,"+(t<0?1:0)+" "+l+","+u].join(" ")}function $or(e,t,r,n){var a=TQe(e,1/(t+1)),i=X5(e,Y5([t,r])),o=i[0],s=i[1],l=X5(e,Y5([t,n])),u=l[0],c=l[1];if(wQe(r)!==wQe(n)){var f=X5(e,Y5([t,0])),v=f[0],g=f[1];return["M"+o+","+s,"A"+a+","+a+" 0 0,"+(0{"use strict";var E_=xi(),C_=bi(),ol=Xt(),q1=ol.strRotate,$c=ol.strTranslate,hR=ni(),vS=ea(),Kor=Hs(),qd=Yi(),Jor=Hp(),Qor=TJ(),esr=rp().doAutoRange,Vg=NN(),fR=ed(),MQe=kl(),tsr=qx(),rsr=Ac().prepSelect,nsr=Ac().selectOnClick,EJ=Ac().clearOutline,SQe=np(),EQe=ST(),kQe=RT().redrawReglTraces,isr=nc().MID_SHIFT,jy=oR(),Gg=lR(),dR=SJ(),uR=dR.smith,asr=dR.reactanceArc,osr=dR.resistanceArc,cR=dR.smithTransform,ssr=ol._,CQe=ol.mod,Wy=ol.deg2rad,k_=ol.rad2deg;function LQe(e,t,r){this.isSmith=r||!1,this.id=t,this.gd=e,this._hasClipOnAxisFalse=null,this.vangles=null,this.radialAxisAngle=null,this.traceHash={},this.layers={},this.clipPaths={},this.clipIds={},this.viewInitial={};var n=e._fullLayout,a="clip"+n._uid+t;this.clipIds.forTraces=a+"-for-traces",this.clipPaths.forTraces=n._clips.append("clipPath").attr("id",this.clipIds.forTraces),this.clipPaths.forTraces.append("path"),this.framework=n["_"+(r?"smith":"polar")+"layer"].append("g").attr("class",t),this.getHole=function(i){return this.isSmith?0:i.hole},this.getSector=function(i){return this.isSmith?[0,360]:i.sector},this.getRadial=function(i){return this.isSmith?i.realaxis:i.radialaxis},this.getAngular=function(i){return this.isSmith?i.imaginaryaxis:i.angularaxis},r||(this.radialTickLayout=null,this.angularTickLayout=null)}var wf=LQe.prototype;DQe.exports=function(t,r,n){return new LQe(t,r,n)};wf.plot=function(e,t){for(var r=this,n=t[r.id],a=!1,i=0;i_?(y=u,C=u*_,L=(c-C)/a.h/2,k=[s[0],s[1]],S=[l[0]+L,l[1]-L]):(y=c/_,C=c,L=(u-y)/a.w/2,k=[s[0]+L,s[1]-L],S=[l[0],l[1]]),r.xLength2=y,r.yLength2=C,r.xDomain2=k,r.yDomain2=S;var w=r.xOffset2=a.l+a.w*k[0],A=r.yOffset2=a.t+a.h*(1-S[1]),T=r.radius=y/g,m=r.innerRadius=r.getHole(t)*T,F=r.cx=w-T*v[0],E=r.cy=A+T*v[3],I=r.cxx=F-w,R=r.cyy=E-A,B=i.side,O;B==="counterclockwise"?(O=B,B="top"):B==="clockwise"&&(O=B,B="bottom"),r.radialAxis=r.mockAxis(e,t,i,{_id:"x",side:B,_trueSide:O,domain:[m/a.w,T/a.w]}),r.angularAxis=r.mockAxis(e,t,o,{side:"right",domain:[0,Math.PI],autorange:!1}),r.doAutoRange(e,t),r.updateAngularAxis(e,t),r.updateRadialAxis(e,t),r.updateRadialAxisTitle(e,t),r.xaxis=r.mockCartesianAxis(e,t,{_id:"x",domain:k}),r.yaxis=r.mockCartesianAxis(e,t,{_id:"y",domain:S});var V=r.pathSubplot();r.clipPaths.forTraces.select("path").attr("d",V).attr("transform",$c(I,R)),n.frontplot.attr("transform",$c(w,A)).call(vS.setClipUrl,r._hasClipOnAxisFalse?null:r.clipIds.forTraces,r.gd),n.bg.attr("d",V).attr("transform",$c(F,E)).call(hR.fill,t.bgcolor)};wf.mockAxis=function(e,t,r,n){var a=ol.extendFlat({},r,n);return Qor(a,t,e),a};wf.mockCartesianAxis=function(e,t,r){var n=this,a=n.isSmith,i=r._id,o=ol.extendFlat({type:"linear"},r);Jor(o,e);var s={x:[0,2],y:[1,3]};return o.setRange=function(){var l=n.sectorBBox,u=s[i],c=n.radialAxis._rl,f=(c[1]-c[0])/(1-n.getHole(t));o.range=[l[u[0]]*f,l[u[1]]*f]},o.isPtWithinRange=i==="x"&&!a?function(l){return n.isPtInside(l)}:function(){return!0},o.setRange(),o.setScale(),o};wf.doAutoRange=function(e,t){var r=this,n=r.gd,a=r.radialAxis,i=r.getRadial(t);esr(n,a);var o=a.range;if(i.range=o.slice(),i._input.range=o.slice(),a._rl=[a.r2l(o[0],null,"gregorian"),a.r2l(o[1],null,"gregorian")],a.minallowed!==void 0){var s=a.r2l(a.minallowed);a._rl[0]>a._rl[1]?a._rl[1]=Math.max(a._rl[1],s):a._rl[0]=Math.max(a._rl[0],s)}if(a.maxallowed!==void 0){var l=a.r2l(a.maxallowed);a._rl[0]90&&c<=270&&(f.tickangle=180);var p=g?function(T){var m=cR(r,uR([T.x,0]));return $c(m[0]-s,m[1]-l)}:function(T){return $c(f.l2p(T.x)+o,0)},x=g?function(T){return osr(r,T.x,-1/0,1/0)}:function(T){return r.pathArc(f.r2p(T.x)+o)},_=PQe(u);if(r.radialTickLayout!==_&&(a["radial-axis"].selectAll(".xtick").remove(),r.radialTickLayout=_),v){f.setScale();var y=0,C=g?(f.tickvals||[]).filter(function(T){return T>=0}).map(function(T){return qd.tickText(f,T,!0,!1)}):qd.calcTicks(f),k=g?C:qd.clipEnds(f,C),S=qd.getTickSigns(f)[2];g&&((f.ticks==="top"&&f.side==="bottom"||f.ticks==="bottom"&&f.side==="top")&&(S=-S),f.ticks==="top"&&f.side==="top"&&(y=-f.ticklen),f.ticks==="bottom"&&f.side==="bottom"&&(y=f.ticklen)),qd.drawTicks(n,f,{vals:C,layer:a["radial-axis"],path:qd.makeTickPath(f,0,S),transFn:p,crisp:!1}),qd.drawGrid(n,f,{vals:k,layer:a["radial-grid"],path:x,transFn:ol.noop,crisp:!1}),qd.drawLabels(n,f,{vals:C,layer:a["radial-axis"],transFn:p,labelFns:qd.makeLabelFns(f,y)})}var L=r.radialAxisAngle=r.vangles?k_(FQe(Wy(u.angle),r.vangles)):u.angle,w=$c(s,l),A=w+q1(-L);pS(a["radial-axis"],v&&(u.showticklabels||u.ticks),{transform:A}),pS(a["radial-grid"],v&&u.showgrid,{transform:g?"":w}),pS(a["radial-line"].select("line"),v&&u.showline,{x1:g?-i:o,y1:0,x2:i,y2:0,transform:A}).attr("stroke-width",u.linewidth).call(hR.stroke,u.linecolor)};wf.updateRadialAxisTitle=function(e,t,r){if(!this.isSmith){var n=this,a=n.gd,i=n.radius,o=n.cx,s=n.cy,l=n.getRadial(t),u=n.id+"title",c=0;if(l.title){var f=vS.bBox(n.layers["radial-axis"].node()).height,v=l.title.font.size,g=l.side;c=g==="top"?v:g==="counterclockwise"?-(f+v*.4):f+v*.8}var p=r!==void 0?r:n.radialAxisAngle,x=Wy(p),_=Math.cos(x),y=Math.sin(x),C=o+i/2*_+c*y,k=s-i/2*y+c*_;n.layers["radial-axis-title"]=tsr.draw(a,u,{propContainer:l,propName:n.id+".radialaxis.title.text",placeholder:ssr(a,"Click to enter radial axis title"),attributes:{x:C,y:k,"text-anchor":"middle"},transform:{rotate:-p}})}};wf.updateAngularAxis=function(e,t){var r=this,n=r.gd,a=r.layers,i=r.radius,o=r.innerRadius,s=r.cx,l=r.cy,u=r.getAngular(t),c=r.angularAxis,f=r.isSmith;f||(r.fillViewInitialKey("angularaxis.rotation",u.rotation),c.setGeometry(),c.setScale());var v=f?function(m){var F=cR(r,uR([0,m.x]));return Math.atan2(F[0]-s,F[1]-l)-Math.PI/2}:function(m){return c.t2g(m.x)};c.type==="linear"&&c.thetaunit==="radians"&&(c.tick0=k_(c.tick0),c.dtick=k_(c.dtick));var g=function(m){return $c(s+i*Math.cos(m),l-i*Math.sin(m))},p=f?function(m){var F=cR(r,uR([0,m.x]));return $c(F[0],F[1])}:function(m){return g(v(m))},x=f?function(m){var F=cR(r,uR([0,m.x])),E=Math.atan2(F[0]-s,F[1]-l)-Math.PI/2;return $c(F[0],F[1])+q1(-k_(E))}:function(m){var F=v(m);return g(F)+q1(-k_(F))},_=f?function(m){return asr(r,m.x,0,1/0)}:function(m){var F=v(m),E=Math.cos(F),I=Math.sin(F);return"M"+[s+o*E,l-o*I]+"L"+[s+i*E,l-i*I]},y=qd.makeLabelFns(c,0),C=y.labelStandoff,k={};k.xFn=function(m){var F=v(m);return Math.cos(F)*C},k.yFn=function(m){var F=v(m),E=Math.sin(F)>0?.2:1;return-Math.sin(F)*(C+m.fontSize*E)+Math.abs(Math.cos(F))*(m.fontSize*isr)},k.anchorFn=function(m){var F=v(m),E=Math.cos(F);return Math.abs(E)<.1?"middle":E>0?"start":"end"},k.heightFn=function(m,F,E){var I=v(m);return-.5*(1+Math.sin(I))*E};var S=PQe(u);r.angularTickLayout!==S&&(a["angular-axis"].selectAll("."+c._id+"tick").remove(),r.angularTickLayout=S);var L=f?[1/0].concat(c.tickvals||[]).map(function(m){return qd.tickText(c,m,!0,!1)}):qd.calcTicks(c);f&&(L[0].text="\u221E",L[0].fontSize*=1.75);var w;if(t.gridshape==="linear"?(w=L.map(v),ol.angleDelta(w[0],w[1])<0&&(w=w.slice().reverse())):w=null,r.vangles=w,c.type==="category"&&(L=L.filter(function(m){return ol.isAngleInsideSector(v(m),r.sectorInRad)})),c.visible){var A=c.ticks==="inside"?-1:1,T=(c.linewidth||1)/2;qd.drawTicks(n,c,{vals:L,layer:a["angular-axis"],path:"M"+A*T+",0h"+A*c.ticklen,transFn:x,crisp:!1}),qd.drawGrid(n,c,{vals:L,layer:a["angular-grid"],path:_,transFn:ol.noop,crisp:!1}),qd.drawLabels(n,c,{vals:L,layer:a["angular-axis"],repositionOnUpdate:!0,transFn:p,labelFns:k})}pS(a["angular-line"].select("path"),u.showline,{d:r.pathSubplot(),transform:$c(s,l)}).attr("stroke-width",u.linewidth).call(hR.stroke,u.linecolor)};wf.updateFx=function(e,t){if(!this.gd._context.staticPlot){var r=!this.isSmith;r&&(this.updateAngularDrag(e),this.updateRadialDrag(e,t,0),this.updateRadialDrag(e,t,1)),this.updateHoverAndMainDrag(e)}};wf.updateHoverAndMainDrag=function(e){var t=this,r=t.isSmith,n=t.gd,a=t.layers,i=e._zoomlayer,o=jy.MINZOOM,s=jy.OFFEDGE,l=t.radius,u=t.innerRadius,c=t.cx,f=t.cy,v=t.cxx,g=t.cyy,p=t.sectorInRad,x=t.vangles,_=t.radialAxis,y=Gg.clampTiny,C=Gg.findXYatLength,k=Gg.findEnclosingVertexAngles,S=jy.cornerHalfWidth,L=jy.cornerLen/2,w,A,T=Vg.makeDragger(a,"path","maindrag",e.dragmode===!1?"none":"crosshair");E_.select(T).attr("d",t.pathSubplot()).attr("transform",$c(c,f)),T.onmousemove=function(be){MQe.hover(n,be,t.id),n._fullLayout._lasthover=T,n._fullLayout._hoversubplot=t.id},T.onmouseout=function(be){n._dragging||fR.unhover(n,be)};var m={element:T,gd:n,subplot:t.id,plotinfo:{id:t.id,xaxis:t.xaxis,yaxis:t.yaxis},xaxes:[t.xaxis],yaxes:[t.yaxis]},F,E,I,R,B,O,V,j,q;function U(be,De){return Math.sqrt(be*be+De*De)}function J(be,De){return U(be-v,De-g)}function ee(be,De){return Math.atan2(g-De,be-v)}function ce(be,De){return[be*Math.cos(De),be*Math.sin(-De)]}function ye(be,De){if(be===0)return t.pathSector(2*S);var Ge=L/be,ht=De-Ge,it=De+Ge,Oe=Math.max(0,Math.min(be,l)),ze=Oe-S,ct=Oe+S;return"M"+ce(ze,ht)+"A"+[ze,ze]+" 0,0,0 "+ce(ze,it)+"L"+ce(ct,it)+"A"+[ct,ct]+" 0,0,1 "+ce(ct,ht)+"Z"}function xe(be,De,Ge){if(be===0)return t.pathSector(2*S);var ht=ce(be,De),it=ce(be,Ge),Oe=y((ht[0]+it[0])/2),ze=y((ht[1]+it[1])/2),ct,et;if(Oe&&ze){var qe=ze/Oe,we=-1/qe,Le=C(S,qe,Oe,ze);ct=C(L,we,Le[0][0],Le[0][1]),et=C(L,we,Le[1][0],Le[1][1])}else{var Ke,Te;ze?(Ke=L,Te=S):(Ke=S,Te=L),ct=[[Oe-Ke,ze-Te],[Oe+Ke,ze-Te]],et=[[Oe-Ke,ze+Te],[Oe+Ke,ze+Te]]}return"M"+ct.join("L")+"L"+et.reverse().join("L")+"Z"}function ue(){I=null,R=null,B=t.pathSubplot(),O=!1;var be=n._fullLayout[t.id];V=hR.luminosity(be.bgcolor),j=Vg.makeZoombox(i,V,c,f,B),j.attr("fill-rule","evenodd"),q=Vg.makeCorners(i,c,f),EJ(n)}function K(be,De){return De=Math.max(Math.min(De,l),u),beo?(be-1&&be===1&&nsr(De,n,[t.xaxis],[t.yaxis],t.id,m),Ge.indexOf("event")>-1&&MQe.click(n,De,t.id)}m.prepFn=function(be,De,Ge){var ht=n._fullLayout.dragmode,it=T.getBoundingClientRect();n._fullLayout._calcInverseTransform(n);var Oe=n._fullLayout._invTransform;w=n._fullLayout._invScaleX,A=n._fullLayout._invScaleY;var ze=ol.apply3DTransform(Oe)(De-it.left,Ge-it.top);if(F=ze[0],E=ze[1],x){var ct=Gg.findPolygonOffset(l,p[0],p[1],x);F+=v+ct[0],E+=g+ct[1]}switch(ht){case"zoom":m.clickFn=me,r||(x?m.moveFn=pe:m.moveFn=ne,m.doneFn=ie,ue(be,De,Ge));break;case"select":case"lasso":rsr(be,De,Ge,m,ht);break}},fR.init(m)};wf.updateRadialDrag=function(e,t,r){var n=this,a=n.gd,i=n.layers,o=n.radius,s=n.innerRadius,l=n.cx,u=n.cy,c=n.radialAxis,f=jy.radialDragBoxSize,v=f/2;if(!c.visible)return;var g=Wy(n.radialAxisAngle),p=c._rl,x=p[0],_=p[1],y=p[r],C=.75*(p[1]-p[0])/(1-n.getHole(t))/o,k,S,L;r?(k=l+(o+v)*Math.cos(g),S=u-(o+v)*Math.sin(g),L="radialdrag"):(k=l+(s-v)*Math.cos(g),S=u-(s-v)*Math.sin(g),L="radialdrag-inner");var w=Vg.makeRectDragger(i,L,"crosshair",-v,-v,f,f),A={element:w,gd:a};e.dragmode===!1&&(A.dragmode=!1),pS(E_.select(w),c.visible&&s0!=(r?F>x:F<_)){F=null;return}var U=a._fullLayout,J=U[n.id];c.range[r]=F,c._rl[r]=F,n.updateRadialAxis(U,J),n.xaxis.setRange(),n.xaxis.setScale(),n.yaxis.setRange(),n.yaxis.setScale();var ee=!1;for(var ce in n.traceHash){var ye=n.traceHash[ce],xe=ol.filterVisible(ye),ue=ye[0][0].trace._module;ue.plot(a,n,xe,J),C_.traceIs(ce,"gl")&&xe.length&&(ee=!0)}ee&&(EQe(a),kQe(a))}A.prepFn=function(){T=null,m=null,F=null,A.moveFn=E,A.doneFn=R,EJ(a)},A.clampFn=function(V,j){return Math.sqrt(V*V+j*j)=90||a>90&&i>=450?g=1:s<=0&&u<=0?g=0:g=Math.max(s,u),a<=180&&i>=180||a>180&&i>=540?c=-1:o>=0&&l>=0?c=0:c=Math.min(o,l),a<=270&&i>=270||a>270&&i>=630?f=-1:s>=0&&u>=0?f=0:f=Math.min(s,u),i>=360?v=1:o<=0&&l<=0?v=0:v=Math.max(o,l),[c,f,v,g]}function FQe(e,t){var r=function(a){return ol.angleDist(e,a)},n=ol.findIndexOfMin(t,r);return t[n]}function pS(e,t,r){return t?(e.attr("display",null),e.attr(r)):e&&e.attr("display","none"),e}});var CJ=fe((jSr,OQe)=>{"use strict";var usr=tc(),Ea=pf(),csr=nl().attributes,H0=Xt().extendFlat,RQe=rl().overrideAll,IQe=RQe({color:Ea.color,showline:H0({},Ea.showline,{dflt:!0}),linecolor:Ea.linecolor,linewidth:Ea.linewidth,showgrid:H0({},Ea.showgrid,{dflt:!0}),gridcolor:Ea.gridcolor,gridwidth:Ea.gridwidth,griddash:Ea.griddash},"plot","from-root"),zQe=RQe({tickmode:Ea.minor.tickmode,nticks:Ea.nticks,tick0:Ea.tick0,dtick:Ea.dtick,tickvals:Ea.tickvals,ticktext:Ea.ticktext,ticks:Ea.ticks,ticklen:Ea.ticklen,tickwidth:Ea.tickwidth,tickcolor:Ea.tickcolor,ticklabelstep:Ea.ticklabelstep,showticklabels:Ea.showticklabels,labelalias:Ea.labelalias,minorloglabels:Ea.minorloglabels,showtickprefix:Ea.showtickprefix,tickprefix:Ea.tickprefix,showticksuffix:Ea.showticksuffix,ticksuffix:Ea.ticksuffix,showexponent:Ea.showexponent,exponentformat:Ea.exponentformat,minexponent:Ea.minexponent,separatethousands:Ea.separatethousands,tickfont:Ea.tickfont,tickangle:Ea.tickangle,tickformat:Ea.tickformat,tickformatstops:Ea.tickformatstops,layer:Ea.layer},"plot","from-root"),qQe={visible:H0({},Ea.visible,{dflt:!0}),type:H0({},Ea.type,{values:["-","linear","log","date","category"]}),autotypenumbers:Ea.autotypenumbers,autorangeoptions:{minallowed:Ea.autorangeoptions.minallowed,maxallowed:Ea.autorangeoptions.maxallowed,clipmin:Ea.autorangeoptions.clipmin,clipmax:Ea.autorangeoptions.clipmax,include:Ea.autorangeoptions.include,editType:"plot"},autorange:H0({},Ea.autorange,{editType:"plot"}),rangemode:{valType:"enumerated",values:["tozero","nonnegative","normal"],dflt:"tozero",editType:"calc"},minallowed:H0({},Ea.minallowed,{editType:"plot"}),maxallowed:H0({},Ea.maxallowed,{editType:"plot"}),range:H0({},Ea.range,{items:[{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}},{valType:"any",editType:"plot",impliedEdits:{"^autorange":!1}}],editType:"plot"}),categoryorder:Ea.categoryorder,categoryarray:Ea.categoryarray,angle:{valType:"angle",editType:"plot"},autotickangles:Ea.autotickangles,side:{valType:"enumerated",values:["clockwise","counterclockwise"],dflt:"clockwise",editType:"plot"},title:{text:H0({},Ea.title.text,{editType:"plot",dflt:""}),font:H0({},Ea.title.font,{editType:"plot"}),editType:"plot"},hoverformat:Ea.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};H0(qQe,IQe,zQe);var BQe={visible:H0({},Ea.visible,{dflt:!0}),type:{valType:"enumerated",values:["-","linear","category"],dflt:"-",editType:"calc",_noTemplating:!0},autotypenumbers:Ea.autotypenumbers,categoryorder:Ea.categoryorder,categoryarray:Ea.categoryarray,thetaunit:{valType:"enumerated",values:["radians","degrees"],dflt:"degrees",editType:"calc"},period:{valType:"number",editType:"calc",min:0},direction:{valType:"enumerated",values:["counterclockwise","clockwise"],dflt:"counterclockwise",editType:"calc"},rotation:{valType:"angle",editType:"calc"},hoverformat:Ea.hoverformat,uirevision:{valType:"any",editType:"none"},editType:"calc"};H0(BQe,IQe,zQe);OQe.exports={domain:csr({name:"polar",editType:"plot"}),sector:{valType:"info_array",items:[{valType:"number",editType:"plot"},{valType:"number",editType:"plot"}],dflt:[0,360],editType:"plot"},hole:{valType:"number",min:0,max:1,dflt:0,editType:"plot"},bgcolor:{valType:"color",editType:"plot",dflt:usr.background},radialaxis:qQe,angularaxis:BQe,gridshape:{valType:"enumerated",values:["circular","linear"],dflt:"circular",editType:"plot"},uirevision:{valType:"any",editType:"none"},editType:"calc"}});var GQe=fe((WSr,VQe)=>{"use strict";var vR=Xt(),fsr=ni(),hsr=Mo(),dsr=b2(),vsr=jf().getSubplotData,psr=Fx(),gsr=Ub(),msr=gm(),ysr=mm(),xsr=dC(),_sr=hA(),bsr=pO(),wsr=Yb(),UQe=CJ(),Tsr=TJ(),pR=oR(),NQe=pR.axisNames;function Asr(e,t,r,n){var a=r("bgcolor");n.bgColor=fsr.combine(a,n.paper_bgcolor);var i=r("sector");r("hole");var o=vsr(n.fullData,pR.name,n.id),s=n.layoutOut,l;function u(j,q){return r(l+"."+j,q)}for(var c=0;c{"use strict";var Ssr=jf().getSubplotCalcData,Esr=Xt().counterRegex,ksr=kJ(),jQe=oR(),WQe=jQe.attr,L_=jQe.name,HQe=Esr(L_),YQe={};YQe[WQe]={valType:"subplotid",dflt:L_,editType:"calc"};function Csr(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[L_],a=0;a{"use strict";var{hovertemplateAttrs:Psr,texttemplateAttrs:Fsr,templatefallbackAttrs:ZQe}=Oo(),mR=ta().extendFlat,Dsr=n1(),j0=Ol(),Rsr=Ho(),Z5=j0.line;$Qe.exports={mode:j0.mode,r:{valType:"data_array",editType:"calc+clearAxisTypes"},theta:{valType:"data_array",editType:"calc+clearAxisTypes"},r0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dr:{valType:"number",dflt:1,editType:"calc"},theta0:{valType:"any",dflt:0,editType:"calc+clearAxisTypes"},dtheta:{valType:"number",editType:"calc"},thetaunit:{valType:"enumerated",values:["radians","degrees","gradians"],dflt:"degrees",editType:"calc+clearAxisTypes"},text:j0.text,texttemplate:Fsr({editType:"plot"},{keys:["r","theta","text"]}),texttemplatefallback:ZQe({editType:"plot"}),hovertext:j0.hovertext,line:{color:Z5.color,width:Z5.width,dash:Z5.dash,backoff:Z5.backoff,shape:mR({},Z5.shape,{values:["linear","spline"]}),smoothing:Z5.smoothing,editType:"calc"},connectgaps:j0.connectgaps,marker:j0.marker,cliponaxis:mR({},j0.cliponaxis,{dflt:!1}),textposition:j0.textposition,textfont:j0.textfont,fill:mR({},j0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:Dsr(),hoverinfo:mR({},Rsr.hoverinfo,{flags:["r","theta","text","name"]}),hoveron:j0.hoveron,hovertemplate:Psr(),hovertemplatefallback:ZQe(),selected:j0.selected,unselected:j0.unselected}});var xR=fe((ZSr,QQe)=>{"use strict";var yR=Xt(),$5=Is(),Isr=vv(),zsr=lp(),KQe=f3(),qsr=up(),Bsr=a1(),Osr=r1().PTS_LINESONLY,Nsr=gS();function Usr(e,t,r,n){function a(s,l){return yR.coerce(e,t,Nsr,s,l)}var i=JQe(e,t,n,a);if(!i){t.visible=!1;return}a("thetaunit"),a("mode",i{"use strict";var Vsr=Xt(),eet=Yi();tet.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot,o,s;i?(o=i.radialAxis,s=i.angularAxis):(i=n[r.subplot],o=i.radialaxis,s=i.angularaxis);var l=o.c2l(t.r);a.rLabel=eet.tickText(o,l,!0).text;var u=s.thetaunit==="degrees"?Vsr.rad2deg(t.theta):t.theta;return a.thetaLabel=eet.tickText(s,u,!0).text,a}});var iet=fe((KSr,net)=>{"use strict";var ret=aa(),Gsr=Wa().BADNUM,Hsr=Yi(),jsr=pv(),Wsr=o1(),Ysr=P0(),Xsr=gv().calcMarkerSize;net.exports=function(t,r){for(var n=t._fullLayout,a=r.subplot,i=n[a].radialaxis,o=n[a].angularaxis,s=i.makeCalcdata(r,"r"),l=o.makeCalcdata(r,"theta"),u=r._length,c=new Array(u),f=0;f{"use strict";var Zsr=m3(),aet=Wa().BADNUM;oet.exports=function(t,r,n){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=r.radialAxis,u=r.angularAxis,c=0;c{"use strict";var $sr=b3();function Ksr(e,t,r,n){var a=$sr(e,t,r,n);if(!(!a||a[0].index===!1)){var i=a[0];if(i.index===void 0)return a;var o=e.subplot,s=i.cd[i.index],l=i.trace;if(o.isPtInside(s))return i.xLabelVal=void 0,i.yLabelVal=void 0,uet(s,l,o,i),i.hovertemplate=l.hovertemplate,a}}function uet(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="r",i._hovertitle="\u03B8";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.rLabel=s.rLabel,n.thetaLabel=s.thetaLabel;var l=e.hi||t.hoverinfo,u=[];function c(v,g){u.push(v._hovertitle+": "+g)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["r","theta","text"]),f.indexOf("r")!==-1&&c(a,n.rLabel),f.indexOf("theta")!==-1&&c(i,n.thetaLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}cet.exports={hoverPoints:Ksr,makeHoverPointText:uet}});var het=fe((eEr,fet)=>{"use strict";fet.exports={moduleType:"trace",name:"scatterpolar",basePlotModule:gR(),categories:["polar","symbols","showLegend","scatter-like"],attributes:gS(),supplyDefaults:xR().supplyDefaults,colorbar:Zf(),formatLabels:_R(),calc:iet(),plot:set(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:bR().hoverPoints,selectPoints:a2(),meta:{}}});var vet=fe((tEr,det)=>{"use strict";det.exports=het()});var LJ=fe((iEr,get)=>{"use strict";var pet=gS(),{cliponaxis:rEr,hoveron:nEr}=pet,Jsr=Ete(pet,["cliponaxis","hoveron"]),{connectgaps:Qsr,line:{color:elr,dash:tlr,width:rlr},fill:nlr,fillcolor:ilr,marker:alr,textfont:olr,textposition:slr}=mM();get.exports=tl(zo({},Jsr),{connectgaps:Qsr,fill:nlr,fillcolor:ilr,line:{color:elr,dash:tlr,editType:"calc",width:rlr},marker:alr,textfont:olr,textposition:slr})});var xet=fe((oEr,yet)=>{"use strict";var met=Xt(),PJ=Is(),llr=xR().handleRThetaDefaults,ulr=vv(),clr=lp(),flr=up(),hlr=a1(),dlr=r1().PTS_LINESONLY,vlr=LJ();yet.exports=function(t,r,n,a){function i(s,l){return met.coerce(t,r,vlr,s,l)}var o=llr(t,r,a,i);if(!o){r.visible=!1;return}i("thetaunit"),i("mode",o{"use strict";var plr=_R();_et.exports=function(t,r,n){var a=t.i;return"r"in t||(t.r=r._r[a]),"theta"in t||(t.theta=r._theta[a]),plr(t,r,n)}});var Tet=fe((lEr,wet)=>{"use strict";var glr=pv(),mlr=gv().calcMarkerSize,ylr=f_(),xlr=Yi(),_lr=Ty().TOO_MANY_POINTS;wet.exports=function(t,r){var n=t._fullLayout,a=r.subplot,i=n[a].radialaxis,o=n[a].angularaxis,s=r._r=i.makeCalcdata(r,"r"),l=r._theta=o.makeCalcdata(r,"theta"),u=r._length,c={};u{"use strict";var blr=KP(),wlr=bR().makeHoverPointText;function Tlr(e,t,r,n){var a=e.cd,i=a[0].t,o=i.r,s=i.theta,l=blr.hoverPoints(e,t,r,n);if(!(!l||l[0].index===!1)){var u=l[0];if(u.index===void 0)return l;var c=e.subplot,f=u.cd[u.index],v=u.trace;if(f.r=o[u.index],f.theta=s[u.index],!!c.isPtInside(f))return u.xLabelVal=void 0,u.yLabelVal=void 0,wlr(f,v,c,u),l}}Aet.exports={hoverPoints:Tlr}});var ket=fe((cEr,Eet)=>{"use strict";Eet.exports={moduleType:"trace",name:"scatterpolargl",basePlotModule:gR(),categories:["gl","regl","polar","symbols","showLegend","scatter-like"],attributes:LJ(),supplyDefaults:xet(),colorbar:Zf(),formatLabels:bet(),calc:Tet(),hoverPoints:Met().hoverPoints,selectPoints:mZ(),meta:{}}});var Cet=fe((fEr,FJ)=>{"use strict";var Alr=tF(),Mlr=aa(),Slr=x$(),Elr=vZ(),wR=f_(),TR=Xt(),klr=Ty().TOO_MANY_POINTS,Clr={};FJ.exports=function(t,r,n){if(n.length){var a=r.radialAxis,i=r.angularAxis,o=Elr(t,r);return n.forEach(function(s){if(!(!s||!s[0]||!s[0].trace)){var l=s[0],u=l.trace,c=l.t,f=u._length,v=c.r,g=c.theta,p=c.opts,x,_=v.slice(),y=g.slice();for(x=0;x=klr&&(p.marker.cluster=c.tree),p.marker&&(p.markerSel.positions=p.markerUnsel.positions=p.marker.positions=C),p.line&&C.length>1&&TR.extendFlat(p.line,wR.linePositions(t,u,C)),p.text&&(TR.extendFlat(p.text,{positions:C},wR.textPosition(t,u,p.text,p.marker)),TR.extendFlat(p.textSel,{positions:C},wR.textPosition(t,u,p.text,p.markerSel)),TR.extendFlat(p.textUnsel,{positions:C},wR.textPosition(t,u,p.text,p.markerUnsel))),p.fill&&!o.fill2d&&(o.fill2d=!0),p.marker&&!o.scatter2d&&(o.scatter2d=!0),p.line&&!o.line2d&&(o.line2d=!0),p.text&&!o.glText&&(o.glText=!0),o.lineOptions.push(p.line),o.fillOptions.push(p.fill),o.markerOptions.push(p.marker),o.markerSelectedOptions.push(p.markerSel),o.markerUnselectedOptions.push(p.markerUnsel),o.textOptions.push(p.text),o.textSelectedOptions.push(p.textSel),o.textUnselectedOptions.push(p.textUnsel),o.selectBatch.push([]),o.unselectBatch.push([]),c.x=k,c.y=S,c.rawx=k,c.rawy=S,c.r=v,c.theta=g,c.positions=C,c._scene=o,c.index=o.count,o.count++}}),Slr(t,r,n)}};FJ.exports.reglPrecompiled=Clr});var Fet=fe((hEr,Pet)=>{"use strict";var Let=ket();Let.plot=Cet();Pet.exports=Let});var Ret=fe((dEr,Det)=>{"use strict";Det.exports=Fet()});var DJ=fe((vEr,Iet)=>{"use strict";var{hovertemplateAttrs:Llr,templatefallbackAttrs:Plr}=Oo(),K5=ta().extendFlat,Yy=gS(),Xy=u1();Iet.exports={r:Yy.r,theta:Yy.theta,r0:Yy.r0,dr:Yy.dr,theta0:Yy.theta0,dtheta:Yy.dtheta,thetaunit:Yy.thetaunit,base:K5({},Xy.base,{}),offset:K5({},Xy.offset,{}),width:K5({},Xy.width,{}),text:K5({},Xy.text,{}),hovertext:K5({},Xy.hovertext,{}),marker:Flr(),hoverinfo:Yy.hoverinfo,hovertemplate:Llr(),hovertemplatefallback:Plr(),selected:Xy.selected,unselected:Xy.unselected};function Flr(){var e=K5({},Xy.marker);return delete e.cornerradius,e}});var RJ=fe((pEr,zet)=>{"use strict";zet.exports={barmode:{valType:"enumerated",values:["stack","overlay"],dflt:"stack",editType:"calc"},bargap:{valType:"number",dflt:.1,min:0,max:1,editType:"calc"}}});var Oet=fe((gEr,Bet)=>{"use strict";var qet=Xt(),Dlr=xR().handleRThetaDefaults,Rlr=ZC(),Ilr=DJ();Bet.exports=function(t,r,n,a){function i(s,l){return qet.coerce(t,r,Ilr,s,l)}var o=Dlr(t,r,a,i);if(!o){r.visible=!1;return}i("thetaunit"),i("base"),i("offset"),i("width"),i("text"),i("hovertext"),i("hovertemplate"),i("hovertemplatefallback"),Rlr(t,r,i,n,a),qet.coerceSelectionMarkerOpacity(r,i)}});var Uet=fe((mEr,Net)=>{"use strict";var zlr=Xt(),qlr=RJ();Net.exports=function(e,t,r){var n={},a;function i(l,u){return zlr.coerce(e[a]||{},t[a],qlr,l,u)}for(var o=0;o{"use strict";var Vet=Wf().hasColorscale,Get=Mh(),Blr=Xt().isArrayOrTypedArray,Olr=EA(),Nlr=i2().setGroupPositions,Ulr=P0(),Vlr=bi().traceIs,Glr=Xt().extendFlat;function Hlr(e,t){for(var r=e._fullLayout,n=t.subplot,a=r[n].radialaxis,i=r[n].angularaxis,o=a.makeCalcdata(t,"r"),s=i.makeCalcdata(t,"theta"),l=t._length,u=new Array(l),c=o,f=s,v=0;v{"use strict";var jet=xi(),AR=aa(),J5=Xt(),Wlr=ea(),zJ=lR();Wet.exports=function(t,r,n){var a=t._context.staticPlot,i=r.xaxis,o=r.yaxis,s=r.radialAxis,l=r.angularAxis,u=Ylr(r),c=r.layers.frontplot.select("g.barlayer");J5.makeTraceGroups(c,n,"trace bars").each(function(){var f=jet.select(this),v=J5.ensureSingle(f,"g","points"),g=v.selectAll("g.point").data(J5.identity);g.enter().append("g").style("vector-effect",a?"none":"non-scaling-stroke").style("stroke-miterlimit",2).classed("point",!0),g.exit().remove(),g.each(function(p){var x=jet.select(this),_=p.rp0=s.c2p(p.s0),y=p.rp1=s.c2p(p.s1),C=p.thetag0=l.c2g(p.p0),k=p.thetag1=l.c2g(p.p1),S;if(!AR(_)||!AR(y)||!AR(C)||!AR(k)||_===y||C===k)S="M0,0Z";else{var L=s.c2g(p.s1),w=(C+k)/2;p.ct=[i.c2p(L*Math.cos(w)),o.c2p(L*Math.sin(w))],S=u(_,y,C,k)}J5.ensureSingle(x,"path").attr("d",S)}),Wlr.setClipUrl(f,r._hasClipOnAxisFalse?r.clipIds.forTraces:null,t)})};function Ylr(e){var t=e.cxx,r=e.cyy;return e.vangles?function(n,a,i,o){var s,l;J5.angleDelta(i,o)>0?(s=i,l=o):(s=o,l=i);var u=zJ.findEnclosingVertexAngles(s,e.vangles)[0],c=zJ.findEnclosingVertexAngles(l,e.vangles)[1],f=[u,(s+l)/2,c];return zJ.pathPolygonAnnulus(n,a,s,l,f,t,r)}:function(n,a,i,o){return J5.pathAnnulus(n,a,i,o,t,r)}}});var Zet=fe((_Er,Xet)=>{"use strict";var Xlr=kl(),qJ=Xt(),Zlr=I3().getTraceColor,$lr=qJ.fillText,Klr=bR().makeHoverPointText,Jlr=lR().isPtInsidePolygon;Xet.exports=function(t,r,n){var a=t.cd,i=a[0].trace,o=t.subplot,s=o.radialAxis,l=o.angularAxis,u=o.vangles,c=u?Jlr:qJ.isPtInsideSector,f=t.maxHoverDistance,v=l._period||2*Math.PI,g=Math.abs(s.g2p(Math.sqrt(r*r+n*n))),p=Math.atan2(n,r);s.range[0]>s.range[1]&&(p+=Math.PI);var x=function(k){return c(g,p,[k.rp0,k.rp1],[k.thetag0,k.thetag1],u)?f+Math.min(1,Math.abs(k.thetag1-k.thetag0)/v)-1+(k.rp1-g)/(k.rp1-k.rp0)-1:1/0};if(Xlr.getClosest(a,x,t),t.index!==!1){var _=t.index,y=a[_];t.x0=t.x1=y.ct[0],t.y0=t.y1=y.ct[1];var C=qJ.extendFlat({},y,{r:y.s,theta:y.p});return $lr(y,i,t),Klr(C,i,o,t),t.hovertemplate=i.hovertemplate,t.color=Zlr(i,y),t.xLabelVal=t.yLabelVal=void 0,y.s<0&&(t.idealAlign="left"),[t]}}});var Ket=fe((bEr,$et)=>{"use strict";$et.exports={moduleType:"trace",name:"barpolar",basePlotModule:gR(),categories:["polar","bar","showLegend"],attributes:DJ(),layoutAttributes:RJ(),supplyDefaults:Oet(),supplyLayoutDefaults:Uet(),calc:IJ().calc,crossTraceCalc:IJ().crossTraceCalc,plot:Yet(),colorbar:Zf(),formatLabels:_R(),style:_v().style,styleOnSelect:_v().styleOnSelect,hoverPoints:Zet(),selectPoints:z3(),meta:{}}});var Qet=fe((wEr,Jet)=>{"use strict";Jet.exports=Ket()});var BJ=fe((TEr,ett)=>{"use strict";ett.exports={attr:"subplot",name:"smith",axisNames:["realaxis","imaginaryaxis"],axisName2dataArray:{imaginaryaxis:"imag",realaxis:"real"}}});var OJ=fe((AEr,itt)=>{"use strict";var Qlr=tc(),ou=pf(),eur=nl().attributes,Zy=Xt().extendFlat,ttt=rl().overrideAll,rtt=ttt({color:ou.color,showline:Zy({},ou.showline,{dflt:!0}),linecolor:ou.linecolor,linewidth:ou.linewidth,showgrid:Zy({},ou.showgrid,{dflt:!0}),gridcolor:ou.gridcolor,gridwidth:ou.gridwidth,griddash:ou.griddash},"plot","from-root"),ntt=ttt({ticklen:ou.ticklen,tickwidth:Zy({},ou.tickwidth,{dflt:2}),tickcolor:ou.tickcolor,showticklabels:ou.showticklabels,labelalias:ou.labelalias,showtickprefix:ou.showtickprefix,tickprefix:ou.tickprefix,showticksuffix:ou.showticksuffix,ticksuffix:ou.ticksuffix,tickfont:ou.tickfont,tickformat:ou.tickformat,hoverformat:ou.hoverformat,layer:ou.layer},"plot","from-root"),tur=Zy({visible:Zy({},ou.visible,{dflt:!0}),tickvals:{dflt:[.2,.5,1,2,5],valType:"data_array",editType:"plot"},tickangle:Zy({},ou.tickangle,{dflt:90}),ticks:{valType:"enumerated",values:["top","bottom",""],editType:"ticks"},side:{valType:"enumerated",values:["top","bottom"],dflt:"top",editType:"plot"},editType:"calc"},rtt,ntt),rur=Zy({visible:Zy({},ou.visible,{dflt:!0}),tickvals:{valType:"data_array",editType:"plot"},ticks:ou.ticks,editType:"calc"},rtt,ntt);itt.exports={domain:eur({name:"smith",editType:"plot"}),bgcolor:{valType:"color",editType:"plot",dflt:Qlr.background},realaxis:tur,imaginaryaxis:rur,editType:"calc"}});var stt=fe((MEr,ott)=>{"use strict";var Q5=Xt(),nur=ni(),iur=Mo(),aur=b2(),our=jf().getSubplotData,sur=mm(),lur=gm(),uur=hA(),cur=Hp(),e4=OJ(),NJ=BJ(),att=NJ.axisNames,fur=dur(function(e){return Q5.isTypedArray(e)&&(e=Array.from(e)),e.slice().reverse().map(function(t){return-t}).concat([0]).concat(e)},String);function hur(e,t,r,n){var a=r("bgcolor");n.bgColor=nur.combine(a,n.paper_bgcolor);var i=our(n.fullData,NJ.name,n.id),o=n.layoutOut,s;function l(L,w){return r(s+"."+L,w)}for(var u=0;u{"use strict";var vur=jf().getSubplotCalcData,pur=Xt().counterRegex,gur=kJ(),utt=BJ(),ctt=utt.attr,P_=utt.name,ltt=pur(P_),ftt={};ftt[ctt]={valType:"subplotid",dflt:P_,editType:"calc"};function mur(e){for(var t=e._fullLayout,r=e.calcdata,n=t._subplots[P_],a=0;a{"use strict";var{hovertemplateAttrs:xur,texttemplateAttrs:_ur,templatefallbackAttrs:vtt}=Oo(),MR=ta().extendFlat,bur=n1(),W0=Ol(),wur=Ho(),t4=W0.line;ptt.exports={mode:W0.mode,real:{valType:"data_array",editType:"calc+clearAxisTypes"},imag:{valType:"data_array",editType:"calc+clearAxisTypes"},text:W0.text,texttemplate:_ur({editType:"plot"},{keys:["real","imag","text"]}),texttemplatefallback:vtt({editType:"plot"}),hovertext:W0.hovertext,line:{color:t4.color,width:t4.width,dash:t4.dash,backoff:t4.backoff,shape:MR({},t4.shape,{values:["linear","spline"]}),smoothing:t4.smoothing,editType:"calc"},connectgaps:W0.connectgaps,marker:W0.marker,cliponaxis:MR({},W0.cliponaxis,{dflt:!1}),textposition:W0.textposition,textfont:W0.textfont,fill:MR({},W0.fill,{values:["none","toself","tonext"],dflt:"none"}),fillcolor:bur(),hoverinfo:MR({},wur.hoverinfo,{flags:["real","imag","text","name"]}),hoveron:W0.hoveron,hovertemplate:xur(),hovertemplatefallback:vtt(),selected:W0.selected,unselected:W0.unselected}});var ytt=fe((kEr,mtt)=>{"use strict";var SR=Xt(),r4=Is(),Tur=vv(),Aur=lp(),gtt=f3(),Mur=up(),Sur=a1(),Eur=r1().PTS_LINESONLY,kur=UJ();mtt.exports=function(t,r,n,a){function i(l,u){return SR.coerce(t,r,kur,l,u)}var o=Cur(t,r,a,i);if(!o){r.visible=!1;return}i("mode",o{"use strict";var xtt=Yi();_tt.exports=function(t,r,n){var a={},i=n[r.subplot]._subplot;return a.realLabel=xtt.tickText(i.radialAxis,t.real,!0).text,a.imagLabel=xtt.tickText(i.angularAxis,t.imag,!0).text,a}});var Att=fe((LEr,Ttt)=>{"use strict";var wtt=aa(),Lur=Wa().BADNUM,Pur=pv(),Fur=o1(),Dur=P0(),Rur=gv().calcMarkerSize;Ttt.exports=function(t,r){for(var n=t._fullLayout,a=r.subplot,i=n[a].realaxis,o=n[a].imaginaryaxis,s=i.makeCalcdata(r,"real"),l=o.makeCalcdata(r,"imag"),u=r._length,c=new Array(u),f=0;f{"use strict";var Iur=m3(),Mtt=Wa().BADNUM,zur=SJ(),qur=zur.smith;Stt.exports=function(t,r,n){for(var a=r.layers.frontplot.select("g.scatterlayer"),i=r.xaxis,o=r.yaxis,s={xaxis:i,yaxis:o,plot:r.framework,layerClipId:r._hasClipOnAxisFalse?r.clipIds.forTraces:null},l=0;l{"use strict";var Bur=b3();function Our(e,t,r,n){var a=Bur(e,t,r,n);if(!(!a||a[0].index===!1)){var i=a[0];if(i.index===void 0)return a;var o=e.subplot,s=i.cd[i.index],l=i.trace;if(o.isPtInside(s))return i.xLabelVal=void 0,i.yLabelVal=void 0,ktt(s,l,o,i),i.hovertemplate=l.hovertemplate,a}}function ktt(e,t,r,n){var a=r.radialAxis,i=r.angularAxis;a._hovertitle="real",i._hovertitle="imag";var o={};o[t.subplot]={_subplot:r};var s=t._module.formatLabels(e,t,o);n.realLabel=s.realLabel,n.imagLabel=s.imagLabel;var l=e.hi||t.hoverinfo,u=[];function c(v,g){u.push(v._hovertitle+": "+g)}if(!t.hovertemplate){var f=l.split("+");f.indexOf("all")!==-1&&(f=["real","imag","text"]),f.indexOf("real")!==-1&&c(a,n.realLabel),f.indexOf("imag")!==-1&&c(i,n.imagLabel),f.indexOf("text")!==-1&&n.text&&(u.push(n.text),delete n.text),n.extraText=u.join("
")}}Ctt.exports={hoverPoints:Our,makeHoverPointText:ktt}});var Ftt=fe((DEr,Ptt)=>{"use strict";Ptt.exports={moduleType:"trace",name:"scattersmith",basePlotModule:dtt(),categories:["smith","symbols","showLegend","scatter-like"],attributes:UJ(),supplyDefaults:ytt(),colorbar:Zf(),formatLabels:btt(),calc:Att(),plot:Ett(),style:Ld().style,styleOnSelect:Ld().styleOnSelect,hoverPoints:Ltt().hoverPoints,selectPoints:a2(),meta:{}}});var Rtt=fe((REr,Dtt)=>{"use strict";Dtt.exports=Ftt()});var GJ=fe((IEr,Itt)=>{"use strict";var Nur=Ho(),Uur=Oo().hovertemplateAttrs,ER=pl().axisHoverFormat,VJ=ta().extendFlat,Vur=_s(),Gur=Uc().dash,Hur=Fm(),F_=Ol(),jur={x:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},x0:F_.x0,dx:F_.dx,y:{valType:"data_array",editType:"calc+clearAxisTypes",anim:!0},y0:F_.y0,dy:F_.dy,u:{valType:"data_array",editType:"calc",anim:!0},v:{valType:"data_array",editType:"calc",anim:!0},arrowref:{valType:"enumerated",values:["paper","data"],dflt:"data",editType:"calc"},lengthmode:{valType:"enumerated",values:["scaled","raw"],editType:"calc",dflt:"scaled"},lengthfactor:{valType:"number",min:0,editType:"calc",dflt:1},anchor:{valType:"enumerated",values:["tip","tail","center"],dflt:"tail",editType:"calc"},xhoverformat:ER("x"),yhoverformat:ER("y"),uhoverformat:ER("u","noDate"),vhoverformat:ER("v","noDate"),hoverinfo:VJ({},Nur.hoverinfo,{flags:["x","y","u","v","text","name"],dflt:"all"}),hovertemplate:Uur({},{keys:["x","y","u","v","text","name"]}),text:F_.text,textposition:F_.textposition,textfont:F_.textfont,marker:VJ({arrowsize:VJ({},Hur.arrowsize,{editType:"calc"}),line:{width:{valType:"number",min:0,dflt:2,editType:"style"},dash:Gur,editType:"style"},editType:"calc"},Vur("marker",{showScaleDflt:!0,editTypeOverride:"calc"})),selected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"},unselected:{marker:{color:{valType:"color",editType:"style"},line:{width:{valType:"number",min:0,editType:"style"},editType:"style"},editType:"style"},textfont:{color:{valType:"color",editType:"style"},editType:"style"},editType:"style"}};Itt.exports=jur});var qtt=fe((zEr,ztt)=>{"use strict";var mS=Xt(),Wur=GJ(),Yur=r2(),Xur=Wf().hasColorscale,Zur=Vc();ztt.exports=function(t,r,n,a){function i(p,x){return mS.coerce(t,r,Wur,p,x)}var o=Yur(t,r,a,i);if(!o){r.visible=!1;return}var s=i("u"),l=i("v");if(!mS.isArrayOrTypedArray(s)||s.length===0){r.u=new Array(o);for(var u=0;u{"use strict";var Hg=Xt(),n4=Yi(),yS=aa(),Btt=Wa().BADNUM,$ur=Mh(),Kur=P0(),Jur=.97;Ott.exports=function(t,r){let n=r._xA=n4.getFromId(t,r.xaxis||"x","x"),a=r._yA=n4.getFromId(t,r.yaxis||"y","y"),i=n.makeCalcdata(r,"x"),o=a.makeCalcdata(r,"y"),s=Math.min(i.length,o.length);r._length=s;let l=new Array(s);var u=1/0,c=-1/0,f=1/0,v=-1/0;let g=r.marker.color,p=Hg.isArrayOrTypedArray(g),x=r.u||[],_=r.v||[],{anchor:y,lengthmode:C,arrowref:k}=r,S=y==="tip",L=y==="center";for(var w=1/0,A=-1/0,T=1/0,m=-1/0,F=1/0,E=-1/0,I=1/0,R=-1/0,B=0,O=0;OA&&(A=i[O]),o[O]m&&(m=o[O]),UE&&(E=U),JR&&(R=J);var ee=Math.sqrt(U*U+J*J);if(ee>c&&(c=ee),eev&&(v=ce))}}else V.x=Btt,V.y=Btt}if(r._maxNorm=c,C==="scaled"||k==="paper"){let ie=A-w,le=m-T;var ye;ie===0&&le===0?ye=1:ye=(ie+le+Math.sqrt((ie-le)*(ie-le)+4*B*ie*le))/(2*(B-1)),ye*=Jur,r._scaleFactor=ye/r._maxNorm}else r._scaleFactor=1;r._scaleFactor*=r.lengthfactor;let xe=new Array(s),ue=new Array(s),K=new Array(s),_e=new Array(s);for(var ne,ae,O=0;O{"use strict";Utt.exports=function(t,r){}});var kR=fe((OEr,jtt)=>{"use strict";var HJ=xi(),Gtt=Xt(),xS=ea(),Qur=js(),ecr=Y1().DESELECTDIM;function jJ(e,t){var r=t.marker||{},n=Qur.makeColorScaleFuncFromTrace(r);e.style("stroke",function(a){var i=r.color,o;if(Gtt.isArrayOrTypedArray(i)&&i.length>a.i&&isFinite(i[a.i]))o=i[a.i];else{var s=t.u&&t.u[a.i]||0,l=t.v&&t.v[a.i]||0;o=Math.sqrt(s*s+l*l)}return n(o)})}function tcr(e){var t=HJ.select(e).selectAll("g.trace.quiver");t.each(function(r){Htt(e,r,HJ.select(this))})}function rcr(e,t,r){Htt(e,t,r)}function Htt(e,t,r){var n=t[0].trace,a=n.marker||{},i=a.line||{},o=Gtt.isArrayOrTypedArray(a.color)?void 0:a.color,s=n._hasColorscale;if(r)if(n.selectedpoints){var l=(n.selected||{}).marker||{},u=(n.unselected||{}).marker||{},c=l.line||{},f=u.line||{};r.selectAll("path.js-line").each(function(g){var p=HJ.select(this),x=!g.selected,_=x?u.color:l.color,y=x?f.width!==void 0?f.width:i.width:c.width!==void 0?c.width:i.width;_?(xS.lineGroupStyle(p,y,_,i.dash),p.style("stroke-opacity",1)):(xS.lineGroupStyle(p,y,o,i.dash),s&&jJ(p,n),p.style("stroke-opacity",x?ecr:1))}),xS.selectedTextStyle(r.selectAll("text"),n)}else{var v=r.selectAll("path.js-line");v.call(xS.lineGroupStyle,i.width,o,i.dash),s&&jJ(v,n),v.style("stroke-opacity",1),xS.textPointStyle(r.selectAll("text"),n,e)}}jtt.exports={style:tcr,styleOnSelect:rcr,colorscaleStroke:jJ}});var Xtt=fe((NEr,Ytt)=>{"use strict";var Rp=xi(),ncr=Xt(),_S=ea(),icr=kR().colorscaleStroke,CR=Math.PI/12,acr=5.8,ocr=1.5,scr=.7;Ytt.exports=function(t,r,n,a,i,o){var s,l,u=!i,c=!!i&&i.duration>0;if(s=a.selectAll("g.trace").data(n,function(v){return v[0].trace.uid}),s.enter().append("g").attr("class",function(v){return"trace quiver trace"+v[0].trace.uid}).style("stroke-miterlimit",2),s.order(),c){o&&(l=o());var f=Rp.transition().duration(i.duration).ease(i.easing).each("end",function(){l&&l()}).each("interrupt",function(){l&&l()});f.each(function(){a.selectAll("g.trace").each(function(v,g){Wtt(t,g,r,v,n,this,i)})})}else s.each(function(v,g){Wtt(t,g,r,v,n,this,i)});u&&s.exit().remove()};function Wtt(e,t,r,n,a,i,o){var s=n[0].trace,l=r.xaxis,u=r.yaxis;n[0][r.isRangePlot?"nodeRangePlot3":"node3"]=Rp.select(i);var c=Rp.select(i).selectAll("g.lines").data([n]);c.enter().append("g").classed("lines",!0),_S.setClipUrl(c,r.layerClipId,e);var f=c.selectAll("path.js-line").data(n);f.enter().append("path").classed("js-line",!0).style("vector-effect","non-scaling-stroke"),f.exit().remove();let{anchor:v,maxNorm:g=0,arrowref:p}=s,x=p==="paper"?s._scaleFactor*Math.sqrt(Math.abs(l._m*u._m)):s._scaleFactor,_=s.marker.arrowsize;f.each(function(A){let T=Rp.select(this);if(A.x===void 0||A.y===void 0){T.attr("d",null);return}let m=(p==="paper"?A._u*Math.sign(l._m):Rp.round(l._m*A._u))*x,F=(p==="paper"?A._v*Math.sign(u._m):Rp.round(u._m*A._v))*x,E=(s._input.marker||{}).arrowsize!==void 0;var I,R,B,O;v==="tip"?(I=l.c2p(A.x)-m,B=u.c2p(A.y)-F,R=l.c2p(A.x),O=u.c2p(A.y)):v==="center"?(I=l.c2p(A.x)-m/2,B=u.c2p(A.y)-F/2,R=l.c2p(A.x)+m/2,O=u.c2p(A.y)+F/2):(I=l.c2p(A.x),B=u.c2p(A.y),R=l.c2p(A.x)+m,O=u.c2p(A.y)+F),A._px0=I,A._py0=B,A._px1=R,A._py1=O;var V=s.marker.line.width;E||(V=Math.max(V,ocr));let j=Math.sqrt((R-I)*(R-I)+(O-B)*(O-B)),q=scr*j,U=Math.min(acr*_*V,q),J=Math.atan2(O-B,R-I),ee=R-U*Math.cos(J-CR),ce=O-U*Math.sin(J-CR),ye=R-U*Math.cos(J+CR),xe=O-U*Math.sin(J+CR),ue="M"+I+","+B+"L"+R+","+O+"L"+ee+","+ce+"L"+R+","+O+"L"+ye+","+xe;T.attr("d",ue)});var y=s.marker||{},C=y.line||{},k=ncr.isArrayOrTypedArray(y.color)?void 0:y.color;_S.lineGroupStyle(f,C.width,k,C.dash),s._hasColorscale&&icr(f,s);var S=Rp.select(i).selectAll("g.text").data([n]);S.enter().append("g").classed("text",!0),_S.setClipUrl(S,r.layerClipId,e);var L=S.selectAll("g.textpoint").data(n);if(L.enter().append("g").classed("textpoint",!0).append("text"),L.exit().remove(),L.each(function(A){var T=Rp.select(this),m=_S.translatePoint(A,T.select("text"),l,u);m||T.remove()}),L.selectAll("text").call(_S.textPointStyle,s,e).each(function(A){var T=l.c2p(A.x),m=u.c2p(A.y);Rp.select(this).selectAll("tspan.line").each(function(){Rp.select(this).attr({x:T,y:m})})}),o&&o.duration>0){var w=Rp.transition().duration(o.duration).ease(o.easing);f.transition(w).style("opacity",1)}}});var Ktt=fe((UEr,$tt)=>{"use strict";var Ztt=Xt(),lcr=kl(),ucr=_3();function ccr(e,t,r,n,a,i){let o=a-r,s=i-n,l=o*o+s*s;if(!l)return Math.sqrt((e-r)*(e-r)+(t-n)*(t-n));var u=((e-r)*o+(t-n)*s)/l;u=Math.max(0,Math.min(1,u));let c=r+u*o,f=n+u*s;return Math.sqrt((e-c)*(e-c)+(t-f)*(t-f))}$tt.exports=function(t,r,n,a){var i=t.cd,o=i[0].trace,s=t.xa,l=t.ya,u=s.c2p(r),c=l.c2p(n),f=function(k){return k._px0===void 0?1/0:ccr(u,c,k._px0,k._py0,k._px1,k._py1)};if(lcr.getClosest(i,f,t),t.index!==!1){var v=i[t.index],g=s.c2p(v.x,!0),p=l.c2p(v.y,!0),x=Math.sqrt((u-g)*(u-g)+(c-p)*(c-p));t.index=v.i;var _=o.u?o.u[v.i]:0,y=o.v?o.v[v.i]:0,C="u: "+_+", v: "+y;return Ztt.extendFlat(t,{color:ucr(o,v),x0:g-3,x1:g+3,xLabelVal:v.x,y0:p-3,y1:p+3,yLabelVal:v.y,uLabelVal:_,vLabelVal:y,extraText:C,spikeDistance:x,hovertemplate:o.hovertemplate}),Ztt.fillText(v,o,t),[t]}}});var ert=fe((VEr,Qtt)=>{"use strict";var LR=Yi(),Jtt=Xt();Qtt.exports=function(t,r,n){var a={},i={_fullLayout:n},o=LR.getFromTrace(i,r,"x"),s=LR.getFromTrace(i,r,"y"),l=t.x,u=t.y;a.xLabel=LR.tickText(o,o.c2l(l),!0).text,a.yLabel=LR.tickText(s,s.c2l(u),!0).text;var c=r.u?r.u[t.i]:0,f=r.v?r.v[t.i]:0,v=r.uhoverformat,g=r.vhoverformat;return a.uLabel=v?Jtt.numberFormat(v)(c):String(c),a.vLabel=g?Jtt.numberFormat(g)(f):String(f),a}});var rrt=fe((GEr,trt)=>{"use strict";trt.exports=function(t,r,n,a,i){return t.x=r.x,t.y=r.y,t.u=n.u?n.u[i]:void 0,t.v=n.v?n.v[i]:void 0,t}});var irt=fe((HEr,nrt)=>{"use strict";nrt.exports={moduleType:"trace",name:"quiver",basePlotModule:gu(),categories:["cartesian","svg","showLegend","scatter-like","zoomScale"],attributes:GJ(),supplyDefaults:qtt(),calc:Ntt(),crossTraceCalc:Vtt(),plot:Xtt(),style:kR().style,styleOnSelect:kR().styleOnSelect,hoverPoints:Ktt(),formatLabels:ert(),eventData:rrt(),selectPoints:a2(),colorbar:Zf(),animatable:!0,meta:{}}});var ort=fe((jEr,art)=>{"use strict";art.exports=irt()});var Ih=fe((WEr,lrt)=>{var FR=Zc();function srt(){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={}}FR(srt.prototype,{instance:function(e,t){e=(e||"gregorian").toLowerCase(),t=t||"";var r=this._localCals[e+"-"+t];if(!r&&this.calendars[e]&&(r=new this.calendars[e](t),this._localCals[e+"-"+t]=r),!r)throw(this.local.invalidCalendar||this.regionalOptions[""].invalidCalendar).replace(/\{0\}/,e);return r},newDate:function(e,t,r,n,a){return n=(e!=null&&e.year?e.calendar():typeof n=="string"?this.instance(n,a):n)||this.instance(),n.newDate(e,t,r)},substituteDigits:function(e){return function(t){return(t+"").replace(/[0-9]/g,function(r){return e[r]})}},substituteChineseDigits:function(e,t){return function(r){for(var n="",a=0;r>0;){var i=r%10;n=(i===0?"":e[i]+t[a])+n,a++,r=Math.floor(r/10)}return n.indexOf(e[1]+t[1])===0&&(n=n.substr(1)),n||e[0]}}});function WJ(e,t,r,n){if(this._calendar=e,this._year=t,this._month=r,this._day=n,this._calendar._validateLevel===0&&!this._calendar.isValid(this._year,this._month,this._day))throw(io.local.invalidDate||io.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name)}function PR(e,t){return e=""+e,"000000".substring(0,t-e.length)+e}FR(WJ.prototype,{newDate:function(e,t,r){return this._calendar.newDate(e==null?this:e,t,r)},year:function(e){return arguments.length===0?this._year:this.set(e,"y")},month:function(e){return arguments.length===0?this._month:this.set(e,"m")},day:function(e){return arguments.length===0?this._day:this.set(e,"d")},date:function(e,t,r){if(!this._calendar.isValid(e,t,r))throw(io.local.invalidDate||io.regionalOptions[""].invalidDate).replace(/\{0\}/,this._calendar.local.name);return this._year=e,this._month=t,this._day=r,this},leapYear:function(){return this._calendar.leapYear(this)},epoch:function(){return this._calendar.epoch(this)},formatYear:function(){return this._calendar.formatYear(this)},monthOfYear:function(){return this._calendar.monthOfYear(this)},weekOfYear:function(){return this._calendar.weekOfYear(this)},daysInYear:function(){return this._calendar.daysInYear(this)},dayOfYear:function(){return this._calendar.dayOfYear(this)},daysInMonth:function(){return this._calendar.daysInMonth(this)},dayOfWeek:function(){return this._calendar.dayOfWeek(this)},weekDay:function(){return this._calendar.weekDay(this)},extraInfo:function(){return this._calendar.extraInfo(this)},add:function(e,t){return this._calendar.add(this,e,t)},set:function(e,t){return this._calendar.set(this,e,t)},compareTo:function(e){if(this._calendar.name!==e._calendar.name)throw(io.local.differentCalendars||io.regionalOptions[""].differentCalendars).replace(/\{0\}/,this._calendar.local.name).replace(/\{1\}/,e._calendar.local.name);var t=this._year!==e._year?this._year-e._year:this._month!==e._month?this.monthOfYear()-e.monthOfYear():this._day-e._day;return t===0?0:t<0?-1:1},calendar:function(){return this._calendar},toJD:function(){return this._calendar.toJD(this)},fromJD:function(e){return this._calendar.fromJD(e)},toJSDate:function(){return this._calendar.toJSDate(this)},fromJSDate:function(e){return this._calendar.fromJSDate(e)},toString:function(){return(this.year()<0?"-":"")+PR(Math.abs(this.year()),4)+"-"+PR(this.month(),2)+"-"+PR(this.day(),2)}});function YJ(){this.shortYearCutoff="+10"}FR(YJ.prototype,{_validateLevel:0,newDate:function(e,t,r){return e==null?this.today():(e.year&&(this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),r=e.day(),t=e.month(),e=e.year()),new WJ(this,e,t,r))},today:function(){return this.fromJSDate(new Date)},epoch:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return t.year()<0?this.local.epochs[0]:this.local.epochs[1]},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return(t.year()<0?"-":"")+PR(Math.abs(t.year()),4)},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear),12},monthOfYear:function(e,t){var r=this._validate(e,t,this.minDay,io.local.invalidMonth||io.regionalOptions[""].invalidMonth);return(r.month()+this.monthsInYear(r)-this.firstMonth)%this.monthsInYear(r)+this.minMonth},fromMonthOfYear:function(e,t){var r=(t+this.firstMonth-2*this.minMonth)%this.monthsInYear(e)+this.minMonth;return this._validate(e,r,this.minDay,io.local.invalidMonth||io.regionalOptions[""].invalidMonth),r},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,io.local.invalidYear||io.regionalOptions[""].invalidYear);return this.leapYear(t)?366:365},dayOfYear:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate);return n.toJD()-this.newDate(n.year(),this.fromMonthOfYear(n.year(),this.minMonth),this.minDay).toJD()+1},daysInWeek:function(){return 7},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate);return(Math.floor(this.toJD(n))+2)%this.daysInWeek()},extraInfo:function(e,t,r){return this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),{}},add:function(e,t,r){return this._validate(e,this.minMonth,this.minDay,io.local.invalidDate||io.regionalOptions[""].invalidDate),this._correctAdd(e,this._add(e,t,r),t,r)},_add:function(e,t,r){if(this._validateLevel++,r==="d"||r==="w"){var n=e.toJD()+t*(r==="w"?this.daysInWeek():1),a=e.calendar().fromJD(n);return this._validateLevel--,[a.year(),a.month(),a.day()]}try{var i=e.year()+(r==="y"?t:0),o=e.monthOfYear()+(r==="m"?t:0),a=e.day(),s=function(c){for(;of-1+c.minMonth;)i++,o-=f,f=c.monthsInYear(i)};r==="y"?(e.month()!==this.fromMonthOfYear(i,o)&&(o=this.newDate(i,e.month(),this.minDay).monthOfYear()),o=Math.min(o,this.monthsInYear(i)),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o)))):r==="m"&&(s(this),a=Math.min(a,this.daysInMonth(i,this.fromMonthOfYear(i,o))));var l=[i,this.fromMonthOfYear(i,o),a];return this._validateLevel--,l}catch(u){throw this._validateLevel--,u}},_correctAdd:function(e,t,r,n){if(!this.hasYearZero&&(n==="y"||n==="m")&&(t[0]===0||e.year()>0!=t[0]>0)){var a={y:[1,1,"y"],m:[1,this.monthsInYear(-1),"m"],w:[this.daysInWeek(),this.daysInYear(-1),"d"],d:[1,this.daysInYear(-1),"d"]}[n],i=r<0?-1:1;t=this._add(e,r*a[0]+i*a[1],a[2])}return e.date(t[0],t[1],t[2])},set:function(e,t,r){this._validate(e,this.minMonth,this.minDay,io.local.invalidDate||io.regionalOptions[""].invalidDate);var n=r==="y"?t:e.year(),a=r==="m"?t:e.month(),i=r==="d"?t:e.day();return(r==="y"||r==="m")&&(i=Math.min(i,this.daysInMonth(n,a))),e.date(n,a,i)},isValid:function(e,t,r){this._validateLevel++;var n=this.hasYearZero||e!==0;if(n){var a=this.newDate(e,t,this.minDay);n=t>=this.minMonth&&t-this.minMonth=this.minDay&&r-this.minDay13.5?13:1),u=a-(l>2.5?4716:4715);return u<=0&&u--,this.newDate(u,l,s)},toJSDate:function(e,t,r){var n=this._validate(e,t,r,io.local.invalidDate||io.regionalOptions[""].invalidDate),a=new Date(n.year(),n.month()-1,n.day());return a.setHours(0),a.setMinutes(0),a.setSeconds(0),a.setMilliseconds(0),a.setHours(a.getHours()>12?a.getHours()+2:0),a},fromJSDate:function(e){return this.newDate(e.getFullYear(),e.getMonth()+1,e.getDate())}});var io=lrt.exports=new srt;io.cdate=WJ;io.baseCalendar=YJ;io.calendars.gregorian=XJ});var urt=fe(()=>{var ZJ=Zc(),Tf=Ih();ZJ(Tf.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"});Tf.local=Tf.regionalOptions[""];ZJ(Tf.cdate.prototype,{formatDate:function(e,t){return typeof e!="string"&&(t=e,e=""),this._calendar.formatDate(e||"",this,t)}});ZJ(Tf.baseCalendar.prototype,{UNIX_EPOCH:Tf.instance().newDate(1970,1,1).toJD(),SECS_PER_DAY:1440*60,TICKS_EPOCH:Tf.instance().jdEpoch,TICKS_PER_DAY:1440*60*1e7,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(e,t,r){if(typeof e!="string"&&(r=t,t=e,e=""),!t)return"";if(t.calendar()!==this)throw Tf.local.invalidFormat||Tf.regionalOptions[""].invalidFormat;e=e||this.local.dateFormat,r=r||{};for(var n=r.dayNamesShort||this.local.dayNamesShort,a=r.dayNames||this.local.dayNames,i=r.monthNumbers||this.local.monthNumbers,o=r.monthNamesShort||this.local.monthNamesShort,s=r.monthNames||this.local.monthNames,l=r.calculateWeek||this.local.calculateWeek,u=function(S,L){for(var w=1;k+w1},c=function(S,L,w,A){var T=""+L;if(u(S,A))for(;T.length1},C=function(I,R){var B=y(I,R),O=[2,3,B?4:2,B?4:2,10,11,20]["oyYJ@!".indexOf(I)+1],V=new RegExp("^-?\\d{1,"+O+"}"),j=t.substring(T).match(V);if(!j)throw(Tf.local.missingNumberAt||Tf.regionalOptions[""].missingNumberAt).replace(/\{0\}/,T);return T+=j[0].length,parseInt(j[0],10)},k=this,S=function(){if(typeof s=="function"){y("m");var I=s.call(k,t.substring(T));return T+=I.length,I}return C("m")},L=function(I,R,B,O){for(var V=y(I,O)?B:R,j=0;j-1){v=1,g=p;for(var E=this.daysInMonth(f,v);g>E;E=this.daysInMonth(f,v))v++,g-=E}return c>-1?this.fromJD(c):this.newDate(f,v,g)},determineDate:function(e,t,r,n,a){r&&typeof r!="object"&&(a=n,n=r,r=null),typeof n!="string"&&(a=n,n="");var i=this,o=function(s){try{return i.parseDate(n,s,a)}catch(f){}s=s.toLowerCase();for(var l=(s.match(/^c/)&&r?r.newDate():null)||i.today(),u=/([+-]?[0-9]+)\s*(d|w|m|y)?/g,c=u.exec(s);c;)l.add(parseInt(c[1],10),c[2]||"d"),c=u.exec(s);return l};return t=t?t.newDate():null,e=e==null?t:typeof e=="string"?o(e):typeof e=="number"?isNaN(e)||e===1/0||e===-1/0?t:i.today().add(e,"d"):i.newDate(e),e}})});var crt=fe(()=>{var $y=Ih(),fcr=Zc(),$J=$y.instance();function DR(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}DR.prototype=new $y.baseCalendar;fcr(DR.prototype,{name:"Chinese",jdEpoch:17214255e-1,hasYearZero:!1,minMonth:0,firstMonth:0,minDay:1,regionalOptions:{"":{name:"Chinese",epochs:["BEC","EC"],monthNumbers:function(e,t){if(typeof e=="string"){var r=e.match(dcr);return r?r[0]:""}var n=this._validateYear(e),a=e.month(),i=""+this.toChineseMonth(n,a);return t&&i.length<2&&(i="0"+i),this.isIntercalaryMonth(n,a)&&(i+="i"),i},monthNames:function(e){if(typeof e=="string"){var t=e.match(vcr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=this.toChineseMonth(r,n),i=["\u4E00\u6708","\u4E8C\u6708","\u4E09\u6708","\u56DB\u6708","\u4E94\u6708","\u516D\u6708","\u4E03\u6708","\u516B\u6708","\u4E5D\u6708","\u5341\u6708","\u5341\u4E00\u6708","\u5341\u4E8C\u6708"][a-1];return this.isIntercalaryMonth(r,n)&&(i="\u95F0"+i),i},monthNamesShort:function(e){if(typeof e=="string"){var t=e.match(pcr);return t?t[0]:""}var r=this._validateYear(e),n=e.month(),a=this.toChineseMonth(r,n),i=["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"][a-1];return this.isIntercalaryMonth(r,n)&&(i="\u95F0"+i),i},parseMonth:function(e,t){e=this._validateYear(e);var r=parseInt(t),n;if(isNaN(r))t[0]==="\u95F0"&&(n=!0,t=t.substring(1)),t[t.length-1]==="\u6708"&&(t=t.substring(0,t.length-1)),r=1+["\u4E00","\u4E8C","\u4E09","\u56DB","\u4E94","\u516D","\u4E03","\u516B","\u4E5D","\u5341","\u5341\u4E00","\u5341\u4E8C"].indexOf(t);else{var a=t[t.length-1];n=a==="i"||a==="I"}var i=this.toMonthIndex(e,r,n);return i},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(e,t){if(e.year&&(e=e.year()),typeof e!="number"||e<1888||e>2111)throw t.replace(/\{0\}/,this.local.name);return e},toMonthIndex:function(e,t,r){var n=this.intercalaryMonth(e),a=r&&t!==n;if(a||t<1||t>12)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var i;return n?!r&&t<=n?i=t-1:i=t:i=t-1,i},toChineseMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e),n=r?12:11;if(t<0||t>n)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var a;return r?t>13;return r},isIntercalaryMonth:function(e,t){e.year&&(e=e.year(),t=e.month());var r=this.intercalaryMonth(e);return!!r&&r===t},leapYear:function(e){return this.intercalaryMonth(e)!==0},weekOfYear:function(e,t,r){var n=this._validateYear(e,$y.local.invalidyear),a=Jy[n-Jy[0]],i=a>>9&4095,o=a>>5&15,s=a&31,l;l=$J.newDate(i,o,s),l.add(4-(l.dayOfWeek()||7),"d");var u=this.toJD(e,t,r)-l.toJD();return 1+Math.floor(u/7)},monthsInYear:function(e){return this.leapYear(e)?13:12},daysInMonth:function(e,t){e.year&&(t=e.month(),e=e.year()),e=this._validateYear(e);var r=Ky[e-Ky[0]],n=r>>13,a=n?12:11;if(t>a)throw $y.local.invalidMonth.replace(/\{0\}/,this.local.name);var i=r&1<<12-t?30:29;return i},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,i,r,$y.local.invalidDate);e=this._validateYear(n.year()),t=n.month(),r=n.day();var a=this.isIntercalaryMonth(e,t),i=this.toChineseMonth(e,t),o=mcr(e,i,r,a);return $J.toJD(o.year,o.month,o.day)},fromJD:function(e){var t=$J.fromJD(e),r=gcr(t.year(),t.month(),t.day()),n=this.toMonthIndex(r.year,r.month,r.isIntercalary);return this.newDate(r.year,n,r.day)},fromString:function(e){var t=e.match(hcr),r=this._validateYear(+t[1]),n=+t[2],a=!!t[3],i=this.toMonthIndex(r,n,a),o=+t[4];return this.newDate(r,i,o)},add:function(e,t,r){var n=e.year(),a=e.month(),i=this.isIntercalaryMonth(n,a),o=this.toChineseMonth(n,a),s=Object.getPrototypeOf(DR.prototype).add.call(this,e,t,r);if(r==="y"){var l=s.year(),u=s.month(),c=this.isIntercalaryMonth(l,o),f=i&&c?this.toMonthIndex(l,o,!0):this.toMonthIndex(l,o,!1);f!==u&&s.month(f)}return s}});var hcr=/^\s*(-?\d\d\d\d|\d\d)[-/](\d?\d)([iI]?)[-/](\d?\d)/m,dcr=/^\d?\d[iI]?/m,vcr=/^闰?十?[一二三四五六七八九]?月/m,pcr=/^闰?十?[一二三四五六七八九]?/m;$y.calendars.chinese=DR;var Ky=[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],Jy=[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 gcr(e,t,r,n){var a,i;if(typeof e=="object")a=e,i=t||{};else{var o=typeof e=="number"&&e>=1888&&e<=2111;if(!o)throw new Error("Solar year outside range 1888-2111");var s=typeof t=="number"&&t>=1&&t<=12;if(!s)throw new Error("Solar month outside range 1 - 12");var l=typeof r=="number"&&r>=1&&r<=31;if(!l)throw new Error("Solar day outside range 1 - 31");a={year:e,month:t,day:r},i=n||{}}var u=Jy[a.year-Jy[0]],c=a.year<<9|a.month<<5|a.day;i.year=c>=u?a.year:a.year-1,u=Jy[i.year-Jy[0]];var f=u>>9&4095,v=u>>5&15,g=u&31,p,x=new Date(f,v-1,g),_=new Date(a.year,a.month-1,a.day);p=Math.round((_-x)/(24*3600*1e3));var y=Ky[i.year-Ky[0]],C;for(C=0;C<13;C++){var k=y&1<<12-C?30:29;if(p>13;return!S||C=1888&&e<=2111;if(!s)throw new Error("Lunar year outside range 1888-2111");var l=typeof t=="number"&&t>=1&&t<=12;if(!l)throw new Error("Lunar month outside range 1 - 12");var u=typeof r=="number"&&r>=1&&r<=30;if(!u)throw new Error("Lunar day outside range 1 - 30");var c;typeof n=="object"?(c=!1,i=n):(c=!!n,i=a||{}),o={year:e,month:t,day:r,isIntercalary:c}}var f;f=o.day-1;var v=Ky[o.year-Ky[0]],g=v>>13,p;g&&(o.month>g||o.isIntercalary)?p=o.month:p=o.month-1;for(var x=0;x>9&4095,k=y>>5&15,S=y&31,L=new Date(C,k-1,S+f);return i.year=L.getFullYear(),i.month=1+L.getMonth(),i.day=L.getDate(),i}});var frt=fe(()=>{var D_=Ih(),ycr=Zc();function KJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}KJ.prototype=new D_.baseCalendar;ycr(KJ.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(r){var t=this._validate(r,this.minMonth,this.minDay,D_.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,D_.local.invalidYear||D_.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,D_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,D_.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-(n-1)*30+1;return this.newDate(r,n,a)}});D_.calendars.coptic=KJ});var hrt=fe(()=>{var jg=Ih(),xcr=Zc();function JJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}JJ.prototype=new jg.baseCalendar;xcr(JJ.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(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),!1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),13},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,jg.local.invalidYear),400},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/8)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,jg.local.invalidMonth);return this.daysPerMonth[r.month()-1]},daysInWeek:function(){return 8},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return(n.day()+1)%8},weekDay:function(e,t,r){var n=this.dayOfWeek(e,t,r);return n>=2&&n<=6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return{century:_cr[Math.floor((n.year()-1)/100)+1]||""}},toJD:function(e,t,r){var n=this._validate(e,t,r,jg.local.invalidDate);return e=n.year()+(n.year()<0?1:0),t=n.month(),r=n.day(),r+(t>1?16:0)+(t>2?(t-2)*32:0)+(e-1)*400+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e+.5)-Math.floor(this.jdEpoch)-1;var t=Math.floor(e/400)+1;e-=(t-1)*400,e+=e>15?16:0;var r=Math.floor(e/32)+1,n=e-(r-1)*32+1;return this.newDate(t<=0?t-1:t,r,n)}});var _cr={20:"Fruitbat",21:"Anchovy"};jg.calendars.discworld=JJ});var drt=fe(()=>{var R_=Ih(),bcr=Zc();function QJ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}QJ.prototype=new R_.baseCalendar;bcr(QJ.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(r){var t=this._validate(r,this.minMonth,this.minDay,R_.local.invalidYear),r=t.year()+(t.year()<0?1:0);return r%4===3||r%4===-1},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,R_.local.invalidYear||R_.regionalOptions[""].invalidYear),13},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,R_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===13&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,R_.local.invalidDate);return e=n.year(),e<0&&e++,n.day()+(n.month()-1)*30+(e-1)*365+Math.floor(e/4)+this.jdEpoch-1},fromJD:function(e){var t=Math.floor(e)+.5-this.jdEpoch,r=Math.floor((t-Math.floor((t+366)/1461))/365)+1;r<=0&&r--,t=Math.floor(e)+.5-this.newDate(r,1,1).toJD();var n=Math.floor(t/30)+1,a=t-(n-1)*30+1;return this.newDate(r,n,a)}});R_.calendars.ethiopian=QJ});var vrt=fe(()=>{var Qy=Ih(),wcr=Zc();function eQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}eQ.prototype=new Qy.baseCalendar;wcr(eQ.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(e){var t=this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear);return this._leapYear(t.year())},_leapYear:function(e){return e=e<0?e+1:e,RR(e*7+1,19)<7},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear),this._leapYear(e.year?e.year():e)?13:12},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Qy.local.invalidYear);return e=t.year(),this.toJD(e===-1?1:e+1,7,1)-this.toJD(e,7,1)},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,Qy.local.invalidMonth),t===12&&this.leapYear(e)||t===8&&RR(this.daysInYear(e),10)===5?30:t===9&&RR(this.daysInYear(e),10)===3?29:this.daysPerMonth[t-1]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Qy.local.invalidDate);return{yearType:(this.leapYear(n)?"embolismic":"common")+" "+["deficient","regular","complete"][this.daysInYear(n)%10-3]}},toJD:function(e,t,r){var n=this._validate(e,t,r,Qy.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=e<=0?e+1:e,i=this.jdEpoch+this._delay1(a)+this._delay2(a)+r+1;if(t<7){for(var o=7;o<=this.monthsInYear(e);o++)i+=this.daysInMonth(e,o);for(var o=1;o=this.toJD(t===-1?1:t+1,7,1);)t++;for(var r=ethis.toJD(t,r,this.daysInMonth(t,r));)r++;var n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});function RR(e,t){return e-t*Math.floor(e/t)}Qy.calendars.hebrew=eQ});var prt=fe(()=>{var bS=Ih(),Tcr=Zc();function tQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}tQ.prototype=new bS.baseCalendar;Tcr(tQ.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\u012Bs","Yawm al-jum'a","Yawm as-sabt"],dayNamesShort:["Aha","Ith","Thu","Arb","Kha","Jum","Sab"],dayNamesMin:["Ah","It","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,bS.local.invalidYear);return(t.year()*11+14)%30<11},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){return this.leapYear(e)?355:354},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,bS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,bS.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e=e<=0?e+1:e,r+Math.ceil(29.5*(t-1))+(e-1)*354+Math.floor((3+11*e)/30)+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=Math.floor((30*(e-this.jdEpoch)+10646)/10631);t=t<=0?t-1:t;var r=Math.min(12,Math.ceil((e-29-this.toJD(t,1,1))/29.5)+1),n=e-this.toJD(t,r,1)+1;return this.newDate(t,r,n)}});bS.calendars.islamic=tQ});var grt=fe(()=>{var wS=Ih(),Acr=Zc();function rQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}rQ.prototype=new wS.baseCalendar;Acr(rQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,wS.local.invalidYear),r=t.year()<0?t.year()+1:t.year();return r%4===0},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(4-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,wS.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(e,t,r){var n=this._validate(e,t,r,wS.local.invalidDate);return e=n.year(),t=n.month(),r=n.day(),e<0&&e++,t<=2&&(e--,t+=12),Math.floor(365.25*(e+4716))+Math.floor(30.6001*(t+1))+r-1524.5},fromJD:function(e){var t=Math.floor(e+.5),r=t+1524,n=Math.floor((r-122.1)/365.25),a=Math.floor(365.25*n),i=Math.floor((r-a)/30.6001),o=i-Math.floor(i<14?1:13),s=n-Math.floor(o>2?4716:4715),l=r-a-Math.floor(30.6001*i);return s<=0&&s--,this.newDate(s,o,l)}});wS.calendars.julian=rQ});var yrt=fe(()=>{var Uv=Ih(),Mcr=Zc();function iQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}iQ.prototype=new Uv.baseCalendar;Mcr(iQ.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(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),!1},formatYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear);e=t.year();var r=Math.floor(e/400);e=e%400,e+=e<0?400:0;var n=Math.floor(e/20);return r+"."+n+"."+e%20},forYear:function(e){if(e=e.split("."),e.length<3)throw"Invalid Mayan year";for(var t=0,r=0;r19||r>0&&n<0)throw"Invalid Mayan year";t=t*20+n}return t},monthsInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),18},weekOfYear:function(e,t,r){return this._validate(e,t,r,Uv.local.invalidDate),0},daysInYear:function(e){return this._validate(e,this.minMonth,this.minDay,Uv.local.invalidYear),360},daysInMonth:function(e,t){return this._validate(e,t,this.minDay,Uv.local.invalidMonth),20},daysInWeek:function(){return 5},dayOfWeek:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate);return n.day()},weekDay:function(e,t,r){return this._validate(e,t,r,Uv.local.invalidDate),!0},extraInfo:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate),a=n.toJD(),i=this._toHaab(a),o=this._toTzolkin(a);return{haabMonthName:this.local.haabMonths[i[0]-1],haabMonth:i[0],haabDay:i[1],tzolkinDayName:this.local.tzolkinMonths[o[0]-1],tzolkinDay:o[0],tzolkinTrecena:o[1]}},_toHaab:function(e){e-=this.jdEpoch;var t=nQ(e+8+340,365);return[Math.floor(t/20)+1,nQ(t,20)]},_toTzolkin:function(e){return e-=this.jdEpoch,[mrt(e+20,20),mrt(e+4,13)]},toJD:function(e,t,r){var n=this._validate(e,t,r,Uv.local.invalidDate);return n.day()+n.month()*20+n.year()*360+this.jdEpoch},fromJD:function(e){e=Math.floor(e)+.5-this.jdEpoch;var t=Math.floor(e/360);e=e%360,e+=e<0?360:0;var r=Math.floor(e/20),n=e%20;return this.newDate(t,r,n)}});function nQ(e,t){return e-t*Math.floor(e/t)}function mrt(e,t){return nQ(e-1,t)+1}Uv.calendars.mayan=iQ});var _rt=fe(()=>{var I_=Ih(),Scr=Zc();function aQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}aQ.prototype=new I_.baseCalendar;var xrt=I_.instance("gregorian");Scr(aQ.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(e){var t=this._validate(e,this.minMonth,this.minDay,I_.local.invalidYear||I_.regionalOptions[""].invalidYear);return xrt.leapYear(t.year()+(t.year()<1?1:0)+1469)},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(1-(n.dayOfWeek()||7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,I_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,I_.local.invalidMonth),a=n.year();a<0&&a++;for(var i=n.day(),o=1;o=this.toJD(t+1,1,1);)t++;for(var r=e-Math.floor(this.toJD(t,1,1)+.5)+1,n=1;r>this.daysInMonth(t,n);)r-=this.daysInMonth(t,n),n++;return this.newDate(t,n,r)}});I_.calendars.nanakshahi=aQ});var brt=fe(()=>{var z_=Ih(),Ecr=Zc();function oQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}oQ.prototype=new z_.baseCalendar;Ecr(oQ.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(e){return this.daysInYear(e)!==this.daysPerYear},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,z_.local.invalidYear);if(e=t.year(),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined")return this.daysPerYear;for(var r=0,n=this.minMonth;n<=12;n++)r+=this.NEPALI_CALENDAR_DATA[e][n];return r},daysInMonth:function(e,t){return e.year&&(t=e.month(),e=e.year()),this._validate(e,t,this.minDay,z_.local.invalidMonth),typeof this.NEPALI_CALENDAR_DATA[e]=="undefined"?this.daysPerMonth[t-1]:this.NEPALI_CALENDAR_DATA[e][t]},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==6},toJD:function(e,t,r){var n=this._validate(e,t,r,z_.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=z_.instance(),i=0,o=t,s=e;this._createMissingCalendarData(e);var l=e-(o>9||o===9&&r>=this.NEPALI_CALENDAR_DATA[s][0]?56:57);for(t!==9&&(i=r,o--);o!==9;)o<=0&&(o=12,s--),i+=this.NEPALI_CALENDAR_DATA[s][o],o--;return t===9?(i+=r-this.NEPALI_CALENDAR_DATA[s][0],i<0&&(i+=a.daysInYear(l))):i+=this.NEPALI_CALENDAR_DATA[s][9]-this.NEPALI_CALENDAR_DATA[s][0],a.newDate(l,1,1).add(i,"d").toJD()},fromJD:function(e){var t=z_.instance(),r=t.fromJD(e),n=r.year(),a=r.dayOfYear(),i=n+56;this._createMissingCalendarData(i);for(var o=9,s=this.NEPALI_CALENDAR_DATA[i][0],l=this.NEPALI_CALENDAR_DATA[i][o]-s+1;a>l;)o++,o>12&&(o=1,i++),l+=this.NEPALI_CALENDAR_DATA[i][o];var u=this.NEPALI_CALENDAR_DATA[i][o]-(l-a);return this.newDate(i,o,u)},_createMissingCalendarData:function(e){var t=this.daysPerMonth.slice(0);t.unshift(17);for(var r=e-1;r{var i4=Ih(),kcr=Zc();function zR(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}function IR(e){var t=e-475;e<0&&t++;var r=.242197,n=r*t,a=r*(t+1),i=n-Math.floor(n),o=a-Math.floor(a);return i>o}zR.prototype=new i4.baseCalendar;kcr(zR.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","Dey","Bahman","Esfand"],monthNamesShort:["Far","Ord","Kho","Tir","Mor","Sha","Meh","Aba","Aza","Dey","Bah","Esf"],dayNames:["Yekshanbeh","Doshanbeh","Seshanbeh","Chah\u0101rshanbeh","Panjshanbeh","Jom'eh","Shanbeh"],dayNamesShort:["Yek","Do","Se","Cha","Panj","Jom","Sha"],dayNamesMin:["Ye","Do","Se","Ch","Pa","Jo","Sh"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!1}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,i4.local.invalidYear);return IR(t.year())},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-((n.dayOfWeek()+1)%7),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,i4.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===12&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,i4.local.invalidDate);e=n.year(),t=n.month(),r=n.day();var a=0;if(e>0)for(var i=1;i0?e-1:e)*365+a+this.jdEpoch-1},fromJD:function(e){e=Math.floor(e)+.5;var t=475+(e-this.toJD(475,1,1))/365.242197,r=Math.floor(t);r<=0&&r--,e>this.toJD(r,12,IR(r)?30:29)&&(r++,r===0&&r++);var n=e-this.toJD(r,1,1)+1,a=n<=186?Math.ceil(n/31):Math.ceil((n-6)/30),i=e-this.toJD(r,a,1)+1;return this.newDate(r,a,i)}});i4.calendars.persian=zR;i4.calendars.jalali=zR});var Trt=fe(()=>{var q_=Ih(),Ccr=Zc(),qR=q_.instance();function sQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}sQ.prototype=new q_.baseCalendar;Ccr(sQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,q_.local.invalidYear),r=this._t2gYear(t.year());return qR.leapYear(r)},weekOfYear:function(a,t,r){var n=this._validate(a,this.minMonth,this.minDay,q_.local.invalidYear),a=this._t2gYear(n.year());return qR.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,q_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,q_.local.invalidDate),a=this._t2gYear(n.year());return qR.toJD(a,n.month(),n.day())},fromJD:function(e){var t=qR.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)},_g2tYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)}});q_.calendars.taiwan=sQ});var Art=fe(()=>{var B_=Ih(),Lcr=Zc(),BR=B_.instance();function lQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}lQ.prototype=new B_.baseCalendar;Lcr(lQ.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(r){var t=this._validate(r,this.minMonth,this.minDay,B_.local.invalidYear),r=this._t2gYear(t.year());return BR.leapYear(r)},weekOfYear:function(a,t,r){var n=this._validate(a,this.minMonth,this.minDay,B_.local.invalidYear),a=this._t2gYear(n.year());return BR.weekOfYear(a,n.month(),n.day())},daysInMonth:function(e,t){var r=this._validate(e,t,this.minDay,B_.local.invalidMonth);return this.daysPerMonth[r.month()-1]+(r.month()===2&&this.leapYear(r.year())?1:0)},weekDay:function(e,t,r){return(this.dayOfWeek(e,t,r)||7)<6},toJD:function(a,t,r){var n=this._validate(a,t,r,B_.local.invalidDate),a=this._t2gYear(n.year());return BR.toJD(a,n.month(),n.day())},fromJD:function(e){var t=BR.fromJD(e),r=this._g2tYear(t.year());return this.newDate(r,t.month(),t.day())},_t2gYear:function(e){return e-this.yearsOffset-(e>=1&&e<=this.yearsOffset?1:0)},_g2tYear:function(e){return e+this.yearsOffset+(e>=-this.yearsOffset&&e<=-1?1:0)}});B_.calendars.thai=lQ});var Mrt=fe(()=>{var O_=Ih(),Pcr=Zc();function uQ(e){this.local=this.regionalOptions[e||""]||this.regionalOptions[""]}uQ.prototype=new O_.baseCalendar;Pcr(uQ.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\u0101th\u0101\u2019","Yawm al-Arba\u2018\u0101\u2019","Yawm al-Kham\u012Bs","Yawm al-Jum\u2018a","Yawm al-Sabt"],dayNamesMin:["Ah","Ith","Th","Ar","Kh","Ju","Sa"],digits:null,dateFormat:"yyyy/mm/dd",firstDay:6,isRTL:!0}},leapYear:function(e){var t=this._validate(e,this.minMonth,this.minDay,O_.local.invalidYear);return this.daysInYear(t.year())===355},weekOfYear:function(e,t,r){var n=this.newDate(e,t,r);return n.add(-n.dayOfWeek(),"d"),Math.floor((n.dayOfYear()-1)/7)+1},daysInYear:function(e){for(var t=0,r=1;r<=12;r++)t+=this.daysInMonth(e,r);return t},daysInMonth:function(e,t){for(var r=this._validate(e,t,this.minDay,O_.local.invalidMonth),n=r.toJD()-24e5+.5,a=0,i=0;in)return ex[a]-ex[a-1];a++}return 30},weekDay:function(e,t,r){return this.dayOfWeek(e,t,r)!==5},toJD:function(e,t,r){var n=this._validate(e,t,r,O_.local.invalidDate),a=12*(n.year()-1)+n.month()-15292,i=n.day()+ex[a-1]-1;return i+24e5-.5},fromJD:function(e){for(var t=e-24e5+.5,r=0,n=0;nt);n++)r++;var a=r+15292,i=Math.floor((a-1)/12),o=i+1,s=a-12*i,l=t-ex[r-1]+1;return this.newDate(o,s,l)},isValid:function(e,t,r){var n=O_.baseCalendar.prototype.isValid.apply(this,arguments);return n&&(e=e.year!=null?e.year:e,n=e>=1276&&e<=1500),n},_validate:function(e,t,r,n){var a=O_.baseCalendar.prototype._validate.apply(this,arguments);if(a.year<1276||a.year>1500)throw n.replace(/\{0\}/,this.local.name);return a}});O_.calendars.ummalqura=uQ;var ex=[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]});var Ert=fe((Tkr,Srt)=>{"use strict";Srt.exports=Ih();urt();crt();frt();hrt();drt();vrt();prt();grt();yrt();_rt();brt();wrt();Trt();Art();Mrt()});var Rrt=fe((Akr,Drt)=>{"use strict";var Crt=Ert(),TS=Xt(),Lrt=Wa(),Fcr=Lrt.EPOCHJD,Dcr=Lrt.ONEDAY,hQ={valType:"enumerated",values:TS.sortObjectKeys(Crt.calendars),editType:"calc",dflt:"gregorian"},Prt=function(e,t,r,n){var a={};return a[r]=hQ,TS.coerce(e,t,a,r,n)},Rcr=function(e,t,r,n){for(var a=0;a{"use strict";Irt.exports=Rrt()});var Ncr=fe((Skr,Brt)=>{var qrt=_2e();qrt.register([w_e(),ube(),A3e(),j3e(),awe(),t5e(),v5e(),r4e(),P4e(),dTe(),eAe(),SCe(),p7e(),o9e(),X9e(),MPe(),ZPe(),uDe(),kDe(),WDe(),iRe(),yRe(),DRe(),ZRe(),Fze(),Jze(),xGe(),xHe(),wje(),Xje(),fYe(),SYe(),$Ye(),uZe(),DZe(),v$e(),zKe(),sJe(),kJe(),eQe(),vQe(),vet(),Ret(),Qet(),Rtt(),ort(),zrt()]);Brt.exports=qrt});return Ncr();})(); /*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT */ /*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh */ /*! * Determine if an object is a Buffer * * @author Feross Aboukhadijeh * @license MIT */ /*! * pad-left * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT license. */ /*! * repeat-string * * Copyright (c) 2014-2015, Jon Schlinkert. * Licensed under the MIT License. */ /*! Bundled license information: native-promise-only/lib/npo.src.js: (*! Native Promise Only v0.8.1 (c) Kyle Simpson MIT License: http://getify.mit-license.org *) polybooljs/index.js: (* * @copyright 2016 Sean Connelly (@voidqk), http://syntheti.cc * @license MIT * @preserve Project Home: https://github.com/voidqk/polybooljs *) ieee754/index.js: (*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh *) buffer/index.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) safe-buffer/index.js: (*! safe-buffer. MIT License. Feross Aboukhadijeh *) assert/build/internal/util/comparisons.js: (*! * The buffer module from node.js, for the browser. * * @author Feross Aboukhadijeh * @license MIT *) object-assign/index.js: (* object-assign (c) Sindre Sorhus @license MIT *) maplibre-gl/dist/maplibre-gl.js: (** * MapLibre GL JS * @license 3-Clause BSD. Full text of license: https://github.com/maplibre/maplibre-gl-js/blob/v5.24.0/LICENSE.txt *) */ window.Plotly = Plotly; return Plotly; }));